ses 0.14.4 → 0.15.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +52 -0
- package/NEWS.md +36 -0
- package/dist/lockdown.cjs +1508 -2331
- package/dist/lockdown.mjs +1508 -2331
- package/dist/lockdown.umd.js +1508 -2331
- package/dist/lockdown.umd.min.js +1 -1
- package/dist/ses.cjs +1508 -2331
- package/dist/ses.mjs +1508 -2331
- package/dist/ses.umd.js +1508 -2331
- package/dist/ses.umd.min.js +1 -1
- package/index.d.ts +1 -1
- package/index.js +3 -11
- package/package.json +8 -8
- package/src/environment-options.js +125 -0
- package/src/error/stringify-utils.js +24 -1
- package/src/error/tame-console.js +1 -3
- package/src/lockdown-shim.js +76 -100
- package/src/make-hardener.js +2 -2
- package/src/whitelist-intrinsics.js +3 -3
- package/src/whitelist.js +13 -0
package/dist/lockdown.umd.min.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";(functors=>{function cell(name,value){const observers=[];return{get:function(){return value},set:function(newValue){value=newValue;for(const observe of observers)observe(value)},observe:function(observe){observers.push(observe),observe(value)},enumerable:!0}}const cells=[{globalThis:cell(),Array:cell(),Date:cell(),Float32Array:cell(),JSON:cell(),Map:cell(),Math:cell(),Object:cell(),Promise:cell(),Proxy:cell(),Reflect:cell(),FERAL_REG_EXP:cell(),Set:cell(),String:cell(),WeakMap:cell(),WeakSet:cell(),FERAL_ERROR:cell(),RangeError:cell(),ReferenceError:cell(),SyntaxError:cell(),TypeError:cell(),assign:cell(),create:cell(),defineProperties:cell(),entries:cell(),freeze:cell(),getOwnPropertyDescriptor:cell(),getOwnPropertyDescriptors:cell(),getOwnPropertyNames:cell(),getPrototypeOf:cell(),is:cell(),isExtensible:cell(),keys:cell(),objectPrototype:cell(),seal:cell(),setPrototypeOf:cell(),values:cell(),speciesSymbol:cell(),toStringTagSymbol:cell(),iteratorSymbol:cell(),matchAllSymbol:cell(),stringifyJson:cell(),fromEntries:cell(),defineProperty:cell(),apply:cell(),construct:cell(),reflectGet:cell(),reflectGetOwnPropertyDescriptor:cell(),reflectHas:cell(),reflectIsExtensible:cell(),ownKeys:cell(),reflectPreventExtensions:cell(),reflectSet:cell(),isArray:cell(),arrayPrototype:cell(),mapPrototype:cell(),proxyRevocable:cell(),regexpPrototype:cell(),setPrototype:cell(),stringPrototype:cell(),weakmapPrototype:cell(),weaksetPrototype:cell(),functionPrototype:cell(),promisePrototype:cell(),uncurryThis:cell(),objectHasOwnProperty:cell(),arrayFilter:cell(),arrayForEach:cell(),arrayIncludes:cell(),arrayJoin:cell(),arrayMap:cell(),arrayPop:cell(),arrayPush:cell(),arraySlice:cell(),arraySome:cell(),arraySort:cell(),iterateArray:cell(),mapSet:cell(),mapGet:cell(),mapHas:cell(),iterateMap:cell(),setAdd:cell(),setForEach:cell(),setHas:cell(),iterateSet:cell(),regexpTest:cell(),regexpExec:cell(),matchAllRegExp:cell(),stringEndsWith:cell(),stringIncludes:cell(),stringIndexOf:cell(),stringMatch:cell(),stringReplace:cell(),stringSearch:cell(),stringSlice:cell(),stringSplit:cell(),stringStartsWith:cell(),iterateString:cell(),weakmapDelete:cell(),weakmapGet:cell(),weakmapHas:cell(),weakmapSet:cell(),weaksetAdd:cell(),weaksetGet:cell(),weaksetHas:cell(),functionToString:cell(),promiseAll:cell(),promiseCatch:cell(),promiseThen:cell(),getConstructorOf:cell(),immutableObject:cell(),isObject:cell(),isError:cell(),FERAL_EVAL:cell(),FERAL_FUNCTION:cell()},{},{an:cell(),bestEffortStringify:cell()},{},{unredactedDetails:cell(),loggedErrorHandler:cell(),makeAssert:cell(),assert:cell()},{makeEvaluateFactory:cell()},{isValidIdentifierName:cell(),getScopeConstants:cell()},{createScopeHandler:cell()},{getSourceURL:cell()},{rejectHtmlComments:cell(),evadeHtmlCommentTest:cell(),rejectImportExpressions:cell(),evadeImportExpressionTest:cell(),rejectSomeDirectEvalExpressions:cell(),mandatoryTransforms:cell(),applyTransforms:cell()},{makeSafeEvaluator:cell()},{provideCompartmentEvaluator:cell(),compartmentEvaluate:cell()},{makeEvalFunction:cell()},{makeFunctionConstructor:cell()},{constantProperties:cell(),universalPropertyNames:cell(),initialGlobalPropertyNames:cell(),sharedGlobalPropertyNames:cell(),uniqueGlobalPropertyNames:cell(),NativeErrors:cell(),FunctionInstance:cell(),isAccessorPermit:cell(),whitelist:cell()},{setGlobalObjectConstantProperties:cell(),setGlobalObjectMutableProperties:cell()},{makeAlias:cell(),load:cell()},{deferExports:cell(),getDeferredExports:cell()},{makeThirdPartyModuleInstance:cell(),makeModuleInstance:cell()},{link:cell(),instantiate:cell()},{InertCompartment:cell(),CompartmentPrototype:cell(),makeCompartmentConstructor:cell()},{getAnonymousIntrinsics:cell()},{makeIntrinsicsCollector:cell(),getGlobalIntrinsics:cell()},{minEnablements:cell(),moderateEnablements:cell(),severeEnablements:cell()},{default:cell()},{makeLoggingConsoleKit:cell(),makeCausalConsole:cell(),filterConsole:cell(),consoleWhitelist:cell(),BASE_CONSOLE_LEVEL:cell()},{tameConsole:cell()},{filterFileName:cell(),shortenCallSiteString:cell(),tameV8ErrorConstructor:cell()},{default:cell()},{makeHardener:cell()},{default:cell()},{tameDomains:cell()},{default:cell()},{tameFunctionToString:cell()},{default:cell()},{default:cell()},{default:cell()},{default:cell()},{repairIntrinsics:cell(),makeLockdown:cell()},{}],namespaces=cells.map(cells=>Object.create(null,cells));for(let index=0;index<namespaces.length;index+=1)cells[index]["*"]=cell(0,namespaces[index]);functors[0]({imports(entries){new Map(entries)},liveVar:{},onceVar:{universalThis:cells[0].globalThis.set,Array:cells[0].Array.set,Date:cells[0].Date.set,Float32Array:cells[0].Float32Array.set,JSON:cells[0].JSON.set,Map:cells[0].Map.set,Math:cells[0].Math.set,Object:cells[0].Object.set,Promise:cells[0].Promise.set,Proxy:cells[0].Proxy.set,Reflect:cells[0].Reflect.set,FERAL_REG_EXP:cells[0].FERAL_REG_EXP.set,Set:cells[0].Set.set,String:cells[0].String.set,WeakMap:cells[0].WeakMap.set,WeakSet:cells[0].WeakSet.set,FERAL_ERROR:cells[0].FERAL_ERROR.set,RangeError:cells[0].RangeError.set,ReferenceError:cells[0].ReferenceError.set,SyntaxError:cells[0].SyntaxError.set,TypeError:cells[0].TypeError.set,assign:cells[0].assign.set,create:cells[0].create.set,defineProperties:cells[0].defineProperties.set,entries:cells[0].entries.set,freeze:cells[0].freeze.set,getOwnPropertyDescriptor:cells[0].getOwnPropertyDescriptor.set,getOwnPropertyDescriptors:cells[0].getOwnPropertyDescriptors.set,getOwnPropertyNames:cells[0].getOwnPropertyNames.set,getPrototypeOf:cells[0].getPrototypeOf.set,is:cells[0].is.set,isExtensible:cells[0].isExtensible.set,keys:cells[0].keys.set,objectPrototype:cells[0].objectPrototype.set,seal:cells[0].seal.set,setPrototypeOf:cells[0].setPrototypeOf.set,values:cells[0].values.set,speciesSymbol:cells[0].speciesSymbol.set,toStringTagSymbol:cells[0].toStringTagSymbol.set,iteratorSymbol:cells[0].iteratorSymbol.set,matchAllSymbol:cells[0].matchAllSymbol.set,stringifyJson:cells[0].stringifyJson.set,fromEntries:cells[0].fromEntries.set,defineProperty:cells[0].defineProperty.set,apply:cells[0].apply.set,construct:cells[0].construct.set,reflectGet:cells[0].reflectGet.set,reflectGetOwnPropertyDescriptor:cells[0].reflectGetOwnPropertyDescriptor.set,reflectHas:cells[0].reflectHas.set,reflectIsExtensible:cells[0].reflectIsExtensible.set,ownKeys:cells[0].ownKeys.set,reflectPreventExtensions:cells[0].reflectPreventExtensions.set,reflectSet:cells[0].reflectSet.set,isArray:cells[0].isArray.set,arrayPrototype:cells[0].arrayPrototype.set,mapPrototype:cells[0].mapPrototype.set,proxyRevocable:cells[0].proxyRevocable.set,regexpPrototype:cells[0].regexpPrototype.set,setPrototype:cells[0].setPrototype.set,stringPrototype:cells[0].stringPrototype.set,weakmapPrototype:cells[0].weakmapPrototype.set,weaksetPrototype:cells[0].weaksetPrototype.set,functionPrototype:cells[0].functionPrototype.set,promisePrototype:cells[0].promisePrototype.set,uncurryThis:cells[0].uncurryThis.set,objectHasOwnProperty:cells[0].objectHasOwnProperty.set,arrayFilter:cells[0].arrayFilter.set,arrayForEach:cells[0].arrayForEach.set,arrayIncludes:cells[0].arrayIncludes.set,arrayJoin:cells[0].arrayJoin.set,arrayMap:cells[0].arrayMap.set,arrayPop:cells[0].arrayPop.set,arrayPush:cells[0].arrayPush.set,arraySlice:cells[0].arraySlice.set,arraySome:cells[0].arraySome.set,arraySort:cells[0].arraySort.set,iterateArray:cells[0].iterateArray.set,mapSet:cells[0].mapSet.set,mapGet:cells[0].mapGet.set,mapHas:cells[0].mapHas.set,iterateMap:cells[0].iterateMap.set,setAdd:cells[0].setAdd.set,setForEach:cells[0].setForEach.set,setHas:cells[0].setHas.set,iterateSet:cells[0].iterateSet.set,regexpTest:cells[0].regexpTest.set,regexpExec:cells[0].regexpExec.set,matchAllRegExp:cells[0].matchAllRegExp.set,stringEndsWith:cells[0].stringEndsWith.set,stringIncludes:cells[0].stringIncludes.set,stringIndexOf:cells[0].stringIndexOf.set,stringMatch:cells[0].stringMatch.set,stringReplace:cells[0].stringReplace.set,stringSearch:cells[0].stringSearch.set,stringSlice:cells[0].stringSlice.set,stringSplit:cells[0].stringSplit.set,stringStartsWith:cells[0].stringStartsWith.set,iterateString:cells[0].iterateString.set,weakmapDelete:cells[0].weakmapDelete.set,weakmapGet:cells[0].weakmapGet.set,weakmapHas:cells[0].weakmapHas.set,weakmapSet:cells[0].weakmapSet.set,weaksetAdd:cells[0].weaksetAdd.set,weaksetGet:cells[0].weaksetGet.set,weaksetHas:cells[0].weaksetHas.set,functionToString:cells[0].functionToString.set,promiseAll:cells[0].promiseAll.set,promiseCatch:cells[0].promiseCatch.set,promiseThen:cells[0].promiseThen.set,getConstructorOf:cells[0].getConstructorOf.set,immutableObject:cells[0].immutableObject.set,isObject:cells[0].isObject.set,isError:cells[0].isError.set,FERAL_EVAL:cells[0].FERAL_EVAL.set,FERAL_FUNCTION:cells[0].FERAL_FUNCTION.set}}),functors[1]({imports(entries){new Map(entries)},liveVar:{},onceVar:{}}),functors[2]({imports(entries){const map=new Map(entries);for(const[name,observers]of map.get("../commons.js")){const cell=cells[0][name];if(void 0===cell)throw new ReferenceError("Cannot import name "+name);for(const observer of observers)cell.observe(observer)}},liveVar:{},onceVar:{an:cells[2].an.set,bestEffortStringify:cells[2].bestEffortStringify.set}}),functors[3]({imports(entries){new Map(entries)},liveVar:{},onceVar:{}}),functors[4]({imports(entries){const map=new Map(entries);for(const[name,observers]of map.get("../commons.js")){const cell=cells[0][name];if(void 0===cell)throw new ReferenceError("Cannot import name "+name);for(const observer of observers)cell.observe(observer)}for(const[name,observers]of map.get("./internal-types.js")){const cell=cells[1][name];if(void 0===cell)throw new ReferenceError("Cannot import name "+name);for(const observer of observers)cell.observe(observer)}for(const[name,observers]of map.get("./stringify-utils.js")){const cell=cells[2][name];if(void 0===cell)throw new ReferenceError("Cannot import name "+name);for(const observer of observers)cell.observe(observer)}for(const[name,observers]of map.get("./types.js")){const cell=cells[3][name];if(void 0===cell)throw new ReferenceError("Cannot import name "+name);for(const observer of observers)cell.observe(observer)}},liveVar:{},onceVar:{unredactedDetails:cells[4].unredactedDetails.set,loggedErrorHandler:cells[4].loggedErrorHandler.set,makeAssert:cells[4].makeAssert.set,assert:cells[4].assert.set}}),functors[5]({imports(entries){const map=new Map(entries);for(const[name,observers]of map.get("./commons.js")){const cell=cells[0][name];if(void 0===cell)throw new ReferenceError("Cannot import name "+name);for(const observer of observers)cell.observe(observer)}},liveVar:{},onceVar:{makeEvaluateFactory:cells[5].makeEvaluateFactory.set}}),functors[6]({imports(entries){const map=new Map(entries);for(const[name,observers]of map.get("./commons.js")){const cell=cells[0][name];if(void 0===cell)throw new ReferenceError("Cannot import name "+name);for(const observer of observers)cell.observe(observer)}},liveVar:{},onceVar:{isValidIdentifierName:cells[6].isValidIdentifierName.set,getScopeConstants:cells[6].getScopeConstants.set}}),functors[7]({imports(entries){const map=new Map(entries);for(const[name,observers]of map.get("./commons.js")){const cell=cells[0][name];if(void 0===cell)throw new ReferenceError("Cannot import name "+name);for(const observer of observers)cell.observe(observer)}for(const[name,observers]of map.get("./error/assert.js")){const cell=cells[4][name];if(void 0===cell)throw new ReferenceError("Cannot import name "+name);for(const observer of observers)cell.observe(observer)}},liveVar:{},onceVar:{createScopeHandler:cells[7].createScopeHandler.set}}),functors[8]({imports(entries){const map=new Map(entries);for(const[name,observers]of map.get("./commons.js")){const cell=cells[0][name];if(void 0===cell)throw new ReferenceError("Cannot import name "+name);for(const observer of observers)cell.observe(observer)}},liveVar:{},onceVar:{getSourceURL:cells[8].getSourceURL.set}}),functors[9]({imports(entries){const map=new Map(entries);for(const[name,observers]of map.get("./commons.js")){const cell=cells[0][name];if(void 0===cell)throw new ReferenceError("Cannot import name "+name);for(const observer of observers)cell.observe(observer)}for(const[name,observers]of map.get("./get-source-url.js")){const cell=cells[8][name];if(void 0===cell)throw new ReferenceError("Cannot import name "+name);for(const observer of observers)cell.observe(observer)}},liveVar:{},onceVar:{rejectHtmlComments:cells[9].rejectHtmlComments.set,evadeHtmlCommentTest:cells[9].evadeHtmlCommentTest.set,rejectImportExpressions:cells[9].rejectImportExpressions.set,evadeImportExpressionTest:cells[9].evadeImportExpressionTest.set,rejectSomeDirectEvalExpressions:cells[9].rejectSomeDirectEvalExpressions.set,mandatoryTransforms:cells[9].mandatoryTransforms.set,applyTransforms:cells[9].applyTransforms.set}}),functors[10]({imports(entries){const map=new Map(entries);for(const[name,observers]of map.get("./commons.js")){const cell=cells[0][name];if(void 0===cell)throw new ReferenceError("Cannot import name "+name);for(const observer of observers)cell.observe(observer)}for(const[name,observers]of map.get("./error/assert.js")){const cell=cells[4][name];if(void 0===cell)throw new ReferenceError("Cannot import name "+name);for(const observer of observers)cell.observe(observer)}for(const[name,observers]of map.get("./make-evaluate-factory.js")){const cell=cells[5][name];if(void 0===cell)throw new ReferenceError("Cannot import name "+name);for(const observer of observers)cell.observe(observer)}for(const[name,observers]of map.get("./scope-constants.js")){const cell=cells[6][name];if(void 0===cell)throw new ReferenceError("Cannot import name "+name);for(const observer of observers)cell.observe(observer)}for(const[name,observers]of map.get("./scope-handler.js")){const cell=cells[7][name];if(void 0===cell)throw new ReferenceError("Cannot import name "+name);for(const observer of observers)cell.observe(observer)}for(const[name,observers]of map.get("./transforms.js")){const cell=cells[9][name];if(void 0===cell)throw new ReferenceError("Cannot import name "+name);for(const observer of observers)cell.observe(observer)}},liveVar:{},onceVar:{makeSafeEvaluator:cells[10].makeSafeEvaluator.set}}),functors[11]({imports(entries){const map=new Map(entries);for(const[name,observers]of map.get("./commons.js")){const cell=cells[0][name];if(void 0===cell)throw new ReferenceError("Cannot import name "+name);for(const observer of observers)cell.observe(observer)}for(const[name,observers]of map.get("./make-safe-evaluator.js")){const cell=cells[10][name];if(void 0===cell)throw new ReferenceError("Cannot import name "+name);for(const observer of observers)cell.observe(observer)}for(const[name,observers]of map.get("./transforms.js")){const cell=cells[9][name];if(void 0===cell)throw new ReferenceError("Cannot import name "+name);for(const observer of observers)cell.observe(observer)}},liveVar:{},onceVar:{provideCompartmentEvaluator:cells[11].provideCompartmentEvaluator.set,compartmentEvaluate:cells[11].compartmentEvaluate.set}}),functors[12]({imports(entries){new Map(entries)},liveVar:{},onceVar:{makeEvalFunction:cells[12].makeEvalFunction.set}}),functors[13]({imports(entries){const map=new Map(entries);for(const[name,observers]of map.get("./commons.js")){const cell=cells[0][name];if(void 0===cell)throw new ReferenceError("Cannot import name "+name);for(const observer of observers)cell.observe(observer)}for(const[name,observers]of map.get("./error/assert.js")){const cell=cells[4][name];if(void 0===cell)throw new ReferenceError("Cannot import name "+name);for(const observer of observers)cell.observe(observer)}},liveVar:{},onceVar:{makeFunctionConstructor:cells[13].makeFunctionConstructor.set}}),functors[14]({imports(entries){new Map(entries)},liveVar:{},onceVar:{constantProperties:cells[14].constantProperties.set,universalPropertyNames:cells[14].universalPropertyNames.set,initialGlobalPropertyNames:cells[14].initialGlobalPropertyNames.set,sharedGlobalPropertyNames:cells[14].sharedGlobalPropertyNames.set,uniqueGlobalPropertyNames:cells[14].uniqueGlobalPropertyNames.set,NativeErrors:cells[14].NativeErrors.set,FunctionInstance:cells[14].FunctionInstance.set,isAccessorPermit:cells[14].isAccessorPermit.set,whitelist:cells[14].whitelist.set}}),functors[15]({imports(entries){const map=new Map(entries);for(const[name,observers]of map.get("./commons.js")){const cell=cells[0][name];if(void 0===cell)throw new ReferenceError("Cannot import name "+name);for(const observer of observers)cell.observe(observer)}for(const[name,observers]of map.get("./make-eval-function.js")){const cell=cells[12][name];if(void 0===cell)throw new ReferenceError("Cannot import name "+name);for(const observer of observers)cell.observe(observer)}for(const[name,observers]of map.get("./make-function-constructor.js")){const cell=cells[13][name];if(void 0===cell)throw new ReferenceError("Cannot import name "+name);for(const observer of observers)cell.observe(observer)}for(const[name,observers]of map.get("./whitelist.js")){const cell=cells[14][name];if(void 0===cell)throw new ReferenceError("Cannot import name "+name);for(const observer of observers)cell.observe(observer)}},liveVar:{},onceVar:{setGlobalObjectConstantProperties:cells[15].setGlobalObjectConstantProperties.set,setGlobalObjectMutableProperties:cells[15].setGlobalObjectMutableProperties.set}}),functors[16]({imports(entries){const map=new Map(entries);for(const[name,observers]of map.get("./commons.js")){const cell=cells[0][name];if(void 0===cell)throw new ReferenceError("Cannot import name "+name);for(const observer of observers)cell.observe(observer)}for(const[name,observers]of map.get("./error/assert.js")){const cell=cells[4][name];if(void 0===cell)throw new ReferenceError("Cannot import name "+name);for(const observer of observers)cell.observe(observer)}},liveVar:{},onceVar:{makeAlias:cells[16].makeAlias.set,load:cells[16].load.set}}),functors[17]({imports(entries){const map=new Map(entries);for(const[name,observers]of map.get("./commons.js")){const cell=cells[0][name];if(void 0===cell)throw new ReferenceError("Cannot import name "+name);for(const observer of observers)cell.observe(observer)}for(const[name,observers]of map.get("./error/assert.js")){const cell=cells[4][name];if(void 0===cell)throw new ReferenceError("Cannot import name "+name);for(const observer of observers)cell.observe(observer)}for(const[name,observers]of map.get("./module-load.js")){const cell=cells[16][name];if(void 0===cell)throw new ReferenceError("Cannot import name "+name);for(const observer of observers)cell.observe(observer)}},liveVar:{},onceVar:{deferExports:cells[17].deferExports.set,getDeferredExports:cells[17].getDeferredExports.set}}),functors[18]({imports(entries){const map=new Map(entries);for(const[name,observers]of map.get("./commons.js")){const cell=cells[0][name];if(void 0===cell)throw new ReferenceError("Cannot import name "+name);for(const observer of observers)cell.observe(observer)}for(const[name,observers]of map.get("./compartment-evaluate.js")){const cell=cells[11][name];if(void 0===cell)throw new ReferenceError("Cannot import name "+name);for(const observer of observers)cell.observe(observer)}for(const[name,observers]of map.get("./error/assert.js")){const cell=cells[4][name];if(void 0===cell)throw new ReferenceError("Cannot import name "+name);for(const observer of observers)cell.observe(observer)}for(const[name,observers]of map.get("./module-proxy.js")){const cell=cells[17][name];if(void 0===cell)throw new ReferenceError("Cannot import name "+name);for(const observer of observers)cell.observe(observer)}},liveVar:{},onceVar:{makeThirdPartyModuleInstance:cells[18].makeThirdPartyModuleInstance.set,makeModuleInstance:cells[18].makeModuleInstance.set}}),functors[19]({imports(entries){const map=new Map(entries);for(const[name,observers]of map.get("./commons.js")){const cell=cells[0][name];if(void 0===cell)throw new ReferenceError("Cannot import name "+name);for(const observer of observers)cell.observe(observer)}for(const[name,observers]of map.get("./error/assert.js")){const cell=cells[4][name];if(void 0===cell)throw new ReferenceError("Cannot import name "+name);for(const observer of observers)cell.observe(observer)}for(const[name,observers]of map.get("./module-instance.js")){const cell=cells[18][name];if(void 0===cell)throw new ReferenceError("Cannot import name "+name);for(const observer of observers)cell.observe(observer)}},liveVar:{},onceVar:{link:cells[19].link.set,instantiate:cells[19].instantiate.set}}),functors[20]({imports(entries){const map=new Map(entries);for(const[name,observers]of map.get("./commons.js")){const cell=cells[0][name];if(void 0===cell)throw new ReferenceError("Cannot import name "+name);for(const observer of observers)cell.observe(observer)}for(const[name,observers]of map.get("./compartment-evaluate.js")){const cell=cells[11][name];if(void 0===cell)throw new ReferenceError("Cannot import name "+name);for(const observer of observers)cell.observe(observer)}for(const[name,observers]of map.get("./error/assert.js")){const cell=cells[4][name];if(void 0===cell)throw new ReferenceError("Cannot import name "+name);for(const observer of observers)cell.observe(observer)}for(const[name,observers]of map.get("./global-object.js")){const cell=cells[15][name];if(void 0===cell)throw new ReferenceError("Cannot import name "+name);for(const observer of observers)cell.observe(observer)}for(const[name,observers]of map.get("./make-safe-evaluator.js")){const cell=cells[10][name];if(void 0===cell)throw new ReferenceError("Cannot import name "+name);for(const observer of observers)cell.observe(observer)}for(const[name,observers]of map.get("./module-link.js")){const cell=cells[19][name];if(void 0===cell)throw new ReferenceError("Cannot import name "+name);for(const observer of observers)cell.observe(observer)}for(const[name,observers]of map.get("./module-load.js")){const cell=cells[16][name];if(void 0===cell)throw new ReferenceError("Cannot import name "+name);for(const observer of observers)cell.observe(observer)}for(const[name,observers]of map.get("./module-proxy.js")){const cell=cells[17][name];if(void 0===cell)throw new ReferenceError("Cannot import name "+name);for(const observer of observers)cell.observe(observer)}for(const[name,observers]of map.get("./scope-constants.js")){const cell=cells[6][name];if(void 0===cell)throw new ReferenceError("Cannot import name "+name);for(const observer of observers)cell.observe(observer)}for(const[name,observers]of map.get("./whitelist.js")){const cell=cells[14][name];if(void 0===cell)throw new ReferenceError("Cannot import name "+name);for(const observer of observers)cell.observe(observer)}},liveVar:{},onceVar:{InertCompartment:cells[20].InertCompartment.set,CompartmentPrototype:cells[20].CompartmentPrototype.set,makeCompartmentConstructor:cells[20].makeCompartmentConstructor.set}}),functors[21]({imports(entries){const map=new Map(entries);for(const[name,observers]of map.get("./commons.js")){const cell=cells[0][name];if(void 0===cell)throw new ReferenceError("Cannot import name "+name);for(const observer of observers)cell.observe(observer)}for(const[name,observers]of map.get("./compartment-shim.js")){const cell=cells[20][name];if(void 0===cell)throw new ReferenceError("Cannot import name "+name);for(const observer of observers)cell.observe(observer)}},liveVar:{},onceVar:{getAnonymousIntrinsics:cells[21].getAnonymousIntrinsics.set}}),functors[22]({imports(entries){const map=new Map(entries);for(const[name,observers]of map.get("./commons.js")){const cell=cells[0][name];if(void 0===cell)throw new ReferenceError("Cannot import name "+name);for(const observer of observers)cell.observe(observer)}for(const[name,observers]of map.get("./whitelist.js")){const cell=cells[14][name];if(void 0===cell)throw new ReferenceError("Cannot import name "+name);for(const observer of observers)cell.observe(observer)}},liveVar:{},onceVar:{makeIntrinsicsCollector:cells[22].makeIntrinsicsCollector.set,getGlobalIntrinsics:cells[22].getGlobalIntrinsics.set}}),functors[23]({imports(entries){new Map(entries)},liveVar:{},onceVar:{minEnablements:cells[23].minEnablements.set,moderateEnablements:cells[23].moderateEnablements.set,severeEnablements:cells[23].severeEnablements.set}}),functors[24]({imports(entries){const map=new Map(entries);for(const[name,observers]of map.get("./commons.js")){const cell=cells[0][name];if(void 0===cell)throw new ReferenceError("Cannot import name "+name);for(const observer of observers)cell.observe(observer)}for(const[name,observers]of map.get("./enablements.js")){const cell=cells[23][name];if(void 0===cell)throw new ReferenceError("Cannot import name "+name);for(const observer of observers)cell.observe(observer)}},liveVar:{},onceVar:{default:cells[24].default.set}}),functors[25]({imports(entries){const map=new Map(entries);for(const[name,observers]of map.get("../commons.js")){const cell=cells[0][name];if(void 0===cell)throw new ReferenceError("Cannot import name "+name);for(const observer of observers)cell.observe(observer)}for(const[name,observers]of map.get("./internal-types.js")){const cell=cells[1][name];if(void 0===cell)throw new ReferenceError("Cannot import name "+name);for(const observer of observers)cell.observe(observer)}for(const[name,observers]of map.get("./types.js")){const cell=cells[3][name];if(void 0===cell)throw new ReferenceError("Cannot import name "+name);for(const observer of observers)cell.observe(observer)}},liveVar:{},onceVar:{makeLoggingConsoleKit:cells[25].makeLoggingConsoleKit.set,makeCausalConsole:cells[25].makeCausalConsole.set,filterConsole:cells[25].filterConsole.set,consoleWhitelist:cells[25].consoleWhitelist.set,BASE_CONSOLE_LEVEL:cells[25].BASE_CONSOLE_LEVEL.set}}),functors[26]({imports(entries){const map=new Map(entries);for(const[name,observers]of map.get("../commons.js")){const cell=cells[0][name];if(void 0===cell)throw new ReferenceError("Cannot import name "+name);for(const observer of observers)cell.observe(observer)}for(const[name,observers]of map.get("./assert.js")){const cell=cells[4][name];if(void 0===cell)throw new ReferenceError("Cannot import name "+name);for(const observer of observers)cell.observe(observer)}for(const[name,observers]of map.get("./console.js")){const cell=cells[25][name];if(void 0===cell)throw new ReferenceError("Cannot import name "+name);for(const observer of observers)cell.observe(observer)}for(const[name,observers]of map.get("./internal-types.js")){const cell=cells[1][name];if(void 0===cell)throw new ReferenceError("Cannot import name "+name);for(const observer of observers)cell.observe(observer)}for(const[name,observers]of map.get("./types.js")){const cell=cells[3][name];if(void 0===cell)throw new ReferenceError("Cannot import name "+name);for(const observer of observers)cell.observe(observer)}},liveVar:{},onceVar:{tameConsole:cells[26].tameConsole.set}}),functors[27]({imports(entries){const map=new Map(entries);for(const[name,observers]of map.get("../commons.js")){const cell=cells[0][name];if(void 0===cell)throw new ReferenceError("Cannot import name "+name);for(const observer of observers)cell.observe(observer)}},liveVar:{},onceVar:{filterFileName:cells[27].filterFileName.set,shortenCallSiteString:cells[27].shortenCallSiteString.set,tameV8ErrorConstructor:cells[27].tameV8ErrorConstructor.set}}),functors[28]({imports(entries){const map=new Map(entries);for(const[name,observers]of map.get("../commons.js")){const cell=cells[0][name];if(void 0===cell)throw new ReferenceError("Cannot import name "+name);for(const observer of observers)cell.observe(observer)}for(const[name,observers]of map.get("../whitelist.js")){const cell=cells[14][name];if(void 0===cell)throw new ReferenceError("Cannot import name "+name);for(const observer of observers)cell.observe(observer)}for(const[name,observers]of map.get("./tame-v8-error-constructor.js")){const cell=cells[27][name];if(void 0===cell)throw new ReferenceError("Cannot import name "+name);for(const observer of observers)cell.observe(observer)}},liveVar:{},onceVar:{default:cells[28].default.set}}),functors[29]({imports(entries){const map=new Map(entries);for(const[name,observers]of map.get("./commons.js")){const cell=cells[0][name];if(void 0===cell)throw new ReferenceError("Cannot import name "+name);for(const observer of observers)cell.observe(observer)}},liveVar:{},onceVar:{makeHardener:cells[29].makeHardener.set}}),functors[30]({imports(entries){const map=new Map(entries);for(const[name,observers]of map.get("./commons.js")){const cell=cells[0][name];if(void 0===cell)throw new ReferenceError("Cannot import name "+name);for(const observer of observers)cell.observe(observer)}},liveVar:{},onceVar:{default:cells[30].default.set}}),functors[31]({imports(entries){const map=new Map(entries);for(const[name,observers]of map.get("./commons.js")){const cell=cells[0][name];if(void 0===cell)throw new ReferenceError("Cannot import name "+name);for(const observer of observers)cell.observe(observer)}},liveVar:{},onceVar:{tameDomains:cells[31].tameDomains.set}}),functors[32]({imports(entries){const map=new Map(entries);for(const[name,observers]of map.get("./commons.js")){const cell=cells[0][name];if(void 0===cell)throw new ReferenceError("Cannot import name "+name);for(const observer of observers)cell.observe(observer)}},liveVar:{},onceVar:{default:cells[32].default.set}}),functors[33]({imports(entries){const map=new Map(entries);for(const[name,observers]of map.get("./commons.js")){const cell=cells[0][name];if(void 0===cell)throw new ReferenceError("Cannot import name "+name);for(const observer of observers)cell.observe(observer)}},liveVar:{},onceVar:{tameFunctionToString:cells[33].tameFunctionToString.set}}),functors[34]({imports(entries){const map=new Map(entries);for(const[name,observers]of map.get("./commons.js")){const cell=cells[0][name];if(void 0===cell)throw new ReferenceError("Cannot import name "+name);for(const observer of observers)cell.observe(observer)}for(const[name,observers]of map.get("./error/assert.js")){const cell=cells[4][name];if(void 0===cell)throw new ReferenceError("Cannot import name "+name);for(const observer of observers)cell.observe(observer)}},liveVar:{},onceVar:{default:cells[34].default.set}}),functors[35]({imports(entries){const map=new Map(entries);for(const[name,observers]of map.get("./commons.js")){const cell=cells[0][name];if(void 0===cell)throw new ReferenceError("Cannot import name "+name);for(const observer of observers)cell.observe(observer)}},liveVar:{},onceVar:{default:cells[35].default.set}}),functors[36]({imports(entries){const map=new Map(entries);for(const[name,observers]of map.get("./commons.js")){const cell=cells[0][name];if(void 0===cell)throw new ReferenceError("Cannot import name "+name);for(const observer of observers)cell.observe(observer)}},liveVar:{},onceVar:{default:cells[36].default.set}}),functors[37]({imports(entries){const map=new Map(entries);for(const[name,observers]of map.get("./commons.js")){const cell=cells[0][name];if(void 0===cell)throw new ReferenceError("Cannot import name "+name);for(const observer of observers)cell.observe(observer)}for(const[name,observers]of map.get("./whitelist.js")){const cell=cells[14][name];if(void 0===cell)throw new ReferenceError("Cannot import name "+name);for(const observer of observers)cell.observe(observer)}},liveVar:{},onceVar:{default:cells[37].default.set}}),functors[38]({imports(entries){const map=new Map(entries);for(const[name,observers]of map.get("./commons.js")){const cell=cells[0][name];if(void 0===cell)throw new ReferenceError("Cannot import name "+name);for(const observer of observers)cell.observe(observer)}for(const[name,observers]of map.get("./enable-property-overrides.js")){const cell=cells[24][name];if(void 0===cell)throw new ReferenceError("Cannot import name "+name);for(const observer of observers)cell.observe(observer)}for(const[name,observers]of map.get("./error/assert.js")){const cell=cells[4][name];if(void 0===cell)throw new ReferenceError("Cannot import name "+name);for(const observer of observers)cell.observe(observer)}for(const[name,observers]of map.get("./error/tame-console.js")){const cell=cells[26][name];if(void 0===cell)throw new ReferenceError("Cannot import name "+name);for(const observer of observers)cell.observe(observer)}for(const[name,observers]of map.get("./error/tame-error-constructor.js")){const cell=cells[28][name];if(void 0===cell)throw new ReferenceError("Cannot import name "+name);for(const observer of observers)cell.observe(observer)}for(const[name,observers]of map.get("./global-object.js")){const cell=cells[15][name];if(void 0===cell)throw new ReferenceError("Cannot import name "+name);for(const observer of observers)cell.observe(observer)}for(const[name,observers]of map.get("./intrinsics.js")){const cell=cells[22][name];if(void 0===cell)throw new ReferenceError("Cannot import name "+name);for(const observer of observers)cell.observe(observer)}for(const[name,observers]of map.get("./make-hardener.js")){const cell=cells[29][name];if(void 0===cell)throw new ReferenceError("Cannot import name "+name);for(const observer of observers)cell.observe(observer)}for(const[name,observers]of map.get("./make-safe-evaluator.js")){const cell=cells[10][name];if(void 0===cell)throw new ReferenceError("Cannot import name "+name);for(const observer of observers)cell.observe(observer)}for(const[name,observers]of map.get("./tame-date-constructor.js")){const cell=cells[30][name];if(void 0===cell)throw new ReferenceError("Cannot import name "+name);for(const observer of observers)cell.observe(observer)}for(const[name,observers]of map.get("./tame-domains.js")){const cell=cells[31][name];if(void 0===cell)throw new ReferenceError("Cannot import name "+name);for(const observer of observers)cell.observe(observer)}for(const[name,observers]of map.get("./tame-function-constructors.js")){const cell=cells[32][name];if(void 0===cell)throw new ReferenceError("Cannot import name "+name);for(const observer of observers)cell.observe(observer)}for(const[name,observers]of map.get("./tame-function-tostring.js")){const cell=cells[33][name];if(void 0===cell)throw new ReferenceError("Cannot import name "+name);for(const observer of observers)cell.observe(observer)}for(const[name,observers]of map.get("./tame-locale-methods.js")){const cell=cells[34][name];if(void 0===cell)throw new ReferenceError("Cannot import name "+name);for(const observer of observers)cell.observe(observer)}for(const[name,observers]of map.get("./tame-math-object.js")){const cell=cells[35][name];if(void 0===cell)throw new ReferenceError("Cannot import name "+name);for(const observer of observers)cell.observe(observer)}for(const[name,observers]of map.get("./tame-regexp-constructor.js")){const cell=cells[36][name];if(void 0===cell)throw new ReferenceError("Cannot import name "+name);for(const observer of observers)cell.observe(observer)}for(const[name,observers]of map.get("./whitelist-intrinsics.js")){const cell=cells[37][name];if(void 0===cell)throw new ReferenceError("Cannot import name "+name);for(const observer of observers)cell.observe(observer)}for(const[name,observers]of map.get("./whitelist.js")){const cell=cells[14][name];if(void 0===cell)throw new ReferenceError("Cannot import name "+name);for(const observer of observers)cell.observe(observer)}},liveVar:{},onceVar:{repairIntrinsics:cells[38].repairIntrinsics.set,makeLockdown:cells[38].makeLockdown.set}}),functors[39]({imports(entries){const map=new Map(entries);for(const[name,observers]of map.get("./src/commons.js")){const cell=cells[0][name];if(void 0===cell)throw new ReferenceError("Cannot import name "+name);for(const observer of observers)cell.observe(observer)}for(const[name,observers]of map.get("./src/compartment-shim.js")){const cell=cells[20][name];if(void 0===cell)throw new ReferenceError("Cannot import name "+name);for(const observer of observers)cell.observe(observer)}for(const[name,observers]of map.get("./src/error/assert.js")){const cell=cells[4][name];if(void 0===cell)throw new ReferenceError("Cannot import name "+name);for(const observer of observers)cell.observe(observer)}for(const[name,observers]of map.get("./src/get-anonymous-intrinsics.js")){const cell=cells[21][name];if(void 0===cell)throw new ReferenceError("Cannot import name "+name);for(const observer of observers)cell.observe(observer)}for(const[name,observers]of map.get("./src/intrinsics.js")){const cell=cells[22][name];if(void 0===cell)throw new ReferenceError("Cannot import name "+name);for(const observer of observers)cell.observe(observer)}for(const[name,observers]of map.get("./src/lockdown-shim.js")){const cell=cells[38][name];if(void 0===cell)throw new ReferenceError("Cannot import name "+name);for(const observer of observers)cell.observe(observer)}for(const[name,observers]of map.get("./src/tame-function-tostring.js")){const cell=cells[33][name];if(void 0===cell)throw new ReferenceError("Cannot import name "+name);for(const observer of observers)cell.observe(observer)}},liveVar:{},onceVar:{}})})([({imports:$h_imports,liveVar:$h_live,onceVar:$h_once})=>{$h_imports([]);const universalThis=globalThis;$h_once.universalThis(universalThis);const{Array:Array,Date:Date,Float32Array:Float32Array,JSON:JSON,Map:Map,Math:Math,Object:Object,Promise:Promise,Proxy:Proxy,Reflect:Reflect,RegExp:FERAL_REG_EXP,Set:Set,String:String,WeakMap:WeakMap,WeakSet:WeakSet}=globalThis;$h_once.Array(Array),$h_once.Date(Date),$h_once.Float32Array(Float32Array),$h_once.JSON(JSON),$h_once.Map(Map),$h_once.Math(Math),$h_once.Object(Object),$h_once.Promise(Promise),$h_once.Proxy(Proxy),$h_once.Reflect(Reflect),$h_once.FERAL_REG_EXP(FERAL_REG_EXP),$h_once.Set(Set),$h_once.String(String),$h_once.WeakMap(WeakMap),$h_once.WeakSet(WeakSet);const{Error:FERAL_ERROR,RangeError:RangeError,ReferenceError:ReferenceError,SyntaxError:SyntaxError,TypeError:TypeError}=globalThis;$h_once.FERAL_ERROR(FERAL_ERROR),$h_once.RangeError(RangeError),$h_once.ReferenceError(ReferenceError),$h_once.SyntaxError(SyntaxError),$h_once.TypeError(TypeError);const{assign:assign,create:create,defineProperties:defineProperties,entries:entries,freeze:freeze,getOwnPropertyDescriptor:getOwnPropertyDescriptor,getOwnPropertyDescriptors:getOwnPropertyDescriptors,getOwnPropertyNames:getOwnPropertyNames,getPrototypeOf:getPrototypeOf,is:is,isExtensible:isExtensible,keys:keys,prototype:objectPrototype,seal:seal,setPrototypeOf:setPrototypeOf,values:values}=Object;$h_once.assign(assign),$h_once.create(create),$h_once.defineProperties(defineProperties),$h_once.entries(entries),$h_once.freeze(freeze),$h_once.getOwnPropertyDescriptor(getOwnPropertyDescriptor),$h_once.getOwnPropertyDescriptors(getOwnPropertyDescriptors),$h_once.getOwnPropertyNames(getOwnPropertyNames),$h_once.getPrototypeOf(getPrototypeOf),$h_once.is(is),$h_once.isExtensible(isExtensible),$h_once.keys(keys),$h_once.objectPrototype(objectPrototype),$h_once.seal(seal),$h_once.setPrototypeOf(setPrototypeOf),$h_once.values(values);const{species:speciesSymbol,toStringTag:toStringTagSymbol,iterator:iteratorSymbol,matchAll:matchAllSymbol}=Symbol;$h_once.speciesSymbol(speciesSymbol),$h_once.toStringTagSymbol(toStringTagSymbol),$h_once.iteratorSymbol(iteratorSymbol),$h_once.matchAllSymbol(matchAllSymbol);const{stringify:stringifyJson}=JSON;$h_once.stringifyJson(stringifyJson);const fromEntries=Object.fromEntries||(entryPairs=>{const result={};for(const[prop,val]of entryPairs)result[prop]=val;return result});$h_once.fromEntries(fromEntries);const{defineProperty:originalDefineProperty}=Object;$h_once.defineProperty((object,prop,descriptor)=>{const result=originalDefineProperty(object,prop,descriptor);if(result!==object)throw TypeError(`Please report that the original defineProperty silently failed to set ${stringifyJson(String(prop))}. (SES_DEFINE_PROPERTY_FAILED_SILENTLY)`);return result});const{apply:apply,construct:construct,get:reflectGet,getOwnPropertyDescriptor:reflectGetOwnPropertyDescriptor,has:reflectHas,isExtensible:reflectIsExtensible,ownKeys:ownKeys,preventExtensions:reflectPreventExtensions,set:reflectSet}=Reflect;$h_once.apply(apply),$h_once.construct(construct),$h_once.reflectGet(reflectGet),$h_once.reflectGetOwnPropertyDescriptor(reflectGetOwnPropertyDescriptor),$h_once.reflectHas(reflectHas),$h_once.reflectIsExtensible(reflectIsExtensible),$h_once.ownKeys(ownKeys),$h_once.reflectPreventExtensions(reflectPreventExtensions),$h_once.reflectSet(reflectSet);const{isArray:isArray,prototype:arrayPrototype}=Array;$h_once.isArray(isArray),$h_once.arrayPrototype(arrayPrototype);const{prototype:mapPrototype}=Map;$h_once.mapPrototype(mapPrototype);const{revocable:proxyRevocable}=Proxy;$h_once.proxyRevocable(proxyRevocable);const{prototype:regexpPrototype}=RegExp;$h_once.regexpPrototype(regexpPrototype);const{prototype:setPrototype}=Set;$h_once.setPrototype(setPrototype);const{prototype:stringPrototype}=String;$h_once.stringPrototype(stringPrototype);const{prototype:weakmapPrototype}=WeakMap;$h_once.weakmapPrototype(weakmapPrototype);const{prototype:weaksetPrototype}=WeakSet;$h_once.weaksetPrototype(weaksetPrototype);const{prototype:functionPrototype}=Function;$h_once.functionPrototype(functionPrototype);const{prototype:promisePrototype}=Promise;$h_once.promisePrototype(promisePrototype);const uncurryThis=fn=>(thisArg,...args)=>apply(fn,thisArg,args);$h_once.uncurryThis(uncurryThis);const objectHasOwnProperty=uncurryThis(objectPrototype.hasOwnProperty);$h_once.objectHasOwnProperty(objectHasOwnProperty);const arrayFilter=uncurryThis(arrayPrototype.filter);$h_once.arrayFilter(arrayFilter);const arrayForEach=uncurryThis(arrayPrototype.forEach);$h_once.arrayForEach(arrayForEach);const arrayIncludes=uncurryThis(arrayPrototype.includes);$h_once.arrayIncludes(arrayIncludes);const arrayJoin=uncurryThis(arrayPrototype.join);$h_once.arrayJoin(arrayJoin);const arrayMap=uncurryThis(arrayPrototype.map);$h_once.arrayMap(arrayMap);const arrayPop=uncurryThis(arrayPrototype.pop);$h_once.arrayPop(arrayPop);const arrayPush=uncurryThis(arrayPrototype.push);$h_once.arrayPush(arrayPush);const arraySlice=uncurryThis(arrayPrototype.slice);$h_once.arraySlice(arraySlice);const arraySome=uncurryThis(arrayPrototype.some);$h_once.arraySome(arraySome);const arraySort=uncurryThis(arrayPrototype.sort);$h_once.arraySort(arraySort);const iterateArray=uncurryThis(arrayPrototype[iteratorSymbol]);$h_once.iterateArray(iterateArray);const mapSet=uncurryThis(mapPrototype.set);$h_once.mapSet(mapSet);const mapGet=uncurryThis(mapPrototype.get);$h_once.mapGet(mapGet);const mapHas=uncurryThis(mapPrototype.has);$h_once.mapHas(mapHas);const iterateMap=uncurryThis(mapPrototype[iteratorSymbol]);$h_once.iterateMap(iterateMap);const setAdd=uncurryThis(setPrototype.add);$h_once.setAdd(setAdd);const setForEach=uncurryThis(setPrototype.forEach);$h_once.setForEach(setForEach);const setHas=uncurryThis(setPrototype.has);$h_once.setHas(setHas);const iterateSet=uncurryThis(setPrototype[iteratorSymbol]);$h_once.iterateSet(iterateSet);const regexpTest=uncurryThis(regexpPrototype.test);$h_once.regexpTest(regexpTest);const regexpExec=uncurryThis(regexpPrototype.exec);$h_once.regexpExec(regexpExec);const matchAllRegExp=uncurryThis(regexpPrototype[matchAllSymbol]);$h_once.matchAllRegExp(matchAllRegExp);const stringEndsWith=uncurryThis(stringPrototype.endsWith);$h_once.stringEndsWith(stringEndsWith);const stringIncludes=uncurryThis(stringPrototype.includes);$h_once.stringIncludes(stringIncludes);const stringIndexOf=uncurryThis(stringPrototype.indexOf);$h_once.stringIndexOf(stringIndexOf);const stringMatch=uncurryThis(stringPrototype.match);$h_once.stringMatch(stringMatch);const stringReplace=uncurryThis(stringPrototype.replace);$h_once.stringReplace(stringReplace);const stringSearch=uncurryThis(stringPrototype.search);$h_once.stringSearch(stringSearch);const stringSlice=uncurryThis(stringPrototype.slice);$h_once.stringSlice(stringSlice);const stringSplit=uncurryThis(stringPrototype.split);$h_once.stringSplit(stringSplit);const stringStartsWith=uncurryThis(stringPrototype.startsWith);$h_once.stringStartsWith(stringStartsWith);const iterateString=uncurryThis(stringPrototype[iteratorSymbol]);$h_once.iterateString(iterateString);const weakmapDelete=uncurryThis(weakmapPrototype.delete);$h_once.weakmapDelete(weakmapDelete);const weakmapGet=uncurryThis(weakmapPrototype.get);$h_once.weakmapGet(weakmapGet);const weakmapHas=uncurryThis(weakmapPrototype.has);$h_once.weakmapHas(weakmapHas);const weakmapSet=uncurryThis(weakmapPrototype.set);$h_once.weakmapSet(weakmapSet);const weaksetAdd=uncurryThis(weaksetPrototype.add);$h_once.weaksetAdd(weaksetAdd);const weaksetGet=uncurryThis(weaksetPrototype.get);$h_once.weaksetGet(weaksetGet);const weaksetHas=uncurryThis(weaksetPrototype.has);$h_once.weaksetHas(weaksetHas);const functionToString=uncurryThis(functionPrototype.toString);$h_once.functionToString(functionToString);const{all:all}=Promise;$h_once.promiseAll(promises=>apply(all,Promise,[promises]));const promiseCatch=uncurryThis(promisePrototype.catch);$h_once.promiseCatch(promiseCatch);const promiseThen=uncurryThis(promisePrototype.then);$h_once.promiseThen(promiseThen);$h_once.getConstructorOf(fn=>reflectGet(getPrototypeOf(fn),"constructor"));const immutableObject=freeze(create(null));$h_once.immutableObject(immutableObject);$h_once.isObject(value=>Object(value)===value);$h_once.isError(value=>value instanceof FERAL_ERROR);const FERAL_EVAL=eval;$h_once.FERAL_EVAL(FERAL_EVAL);const FERAL_FUNCTION=Function;$h_once.FERAL_FUNCTION(FERAL_FUNCTION)},({imports:$h_imports,liveVar:$h_live,onceVar:$h_once})=>{$h_imports([])},({imports:$h_imports,liveVar:$h_live,onceVar:$h_once})=>{let Set,String,freeze,is,isError,setAdd,setHas,stringStartsWith,stringIncludes,stringifyJson,toStringTagSymbol;$h_imports([["../commons.js",[["Set",[$h_a=>Set=$h_a]],["String",[$h_a=>String=$h_a]],["freeze",[$h_a=>freeze=$h_a]],["is",[$h_a=>is=$h_a]],["isError",[$h_a=>isError=$h_a]],["setAdd",[$h_a=>setAdd=$h_a]],["setHas",[$h_a=>setHas=$h_a]],["stringStartsWith",[$h_a=>stringStartsWith=$h_a]],["stringIncludes",[$h_a=>stringIncludes=$h_a]],["stringifyJson",[$h_a=>stringifyJson=$h_a]],["toStringTagSymbol",[$h_a=>toStringTagSymbol=$h_a]]]]]);const an=str=>(str=""+str).length>=1&&stringIncludes("aeiouAEIOU",str[0])?"an "+str:"a "+str;$h_once.an(an),freeze(an);const bestEffortStringify=(payload,spaces)=>{const seenSet=new Set,replacer=(_,val)=>{switch(typeof val){case"object":return null===val?null:setHas(seenSet,val)?"[Seen]":(setAdd(seenSet,val),isError(val)?`[${val.name}: ${val.message}]`:toStringTagSymbol in val?`[${val[toStringTagSymbol]}]`:val);case"function":return`[Function ${val.name||"<anon>"}]`;case"string":return stringStartsWith(val,"[")?`[${val}]`:val;case"undefined":case"symbol":return`[${String(val)}]`;case"bigint":return`[${val}n]`;case"number":return is(val,NaN)?"[NaN]":val===1/0?"[Infinity]":val===-1/0?"[-Infinity]":val;default:return val}};try{return stringifyJson(payload,replacer,spaces)}catch(_err){return"[Something that failed to stringify]"}};$h_once.bestEffortStringify(bestEffortStringify),freeze(bestEffortStringify)},({imports:$h_imports,liveVar:$h_live,onceVar:$h_once})=>{$h_imports([])},({imports:$h_imports,liveVar:$h_live,onceVar:$h_once})=>{let RangeError,TypeError,WeakMap,arrayJoin,arrayMap,arrayPop,arrayPush,assign,freeze,globalThis,is,isError,stringIndexOf,stringReplace,stringSlice,stringStartsWith,weakmapDelete,weakmapGet,weakmapHas,weakmapSet,an,bestEffortStringify;$h_imports([["../commons.js",[["RangeError",[$h_a=>RangeError=$h_a]],["TypeError",[$h_a=>TypeError=$h_a]],["WeakMap",[$h_a=>WeakMap=$h_a]],["arrayJoin",[$h_a=>arrayJoin=$h_a]],["arrayMap",[$h_a=>arrayMap=$h_a]],["arrayPop",[$h_a=>arrayPop=$h_a]],["arrayPush",[$h_a=>arrayPush=$h_a]],["assign",[$h_a=>assign=$h_a]],["freeze",[$h_a=>freeze=$h_a]],["globalThis",[$h_a=>globalThis=$h_a]],["is",[$h_a=>is=$h_a]],["isError",[$h_a=>isError=$h_a]],["stringIndexOf",[$h_a=>stringIndexOf=$h_a]],["stringReplace",[$h_a=>stringReplace=$h_a]],["stringSlice",[$h_a=>stringSlice=$h_a]],["stringStartsWith",[$h_a=>stringStartsWith=$h_a]],["weakmapDelete",[$h_a=>weakmapDelete=$h_a]],["weakmapGet",[$h_a=>weakmapGet=$h_a]],["weakmapHas",[$h_a=>weakmapHas=$h_a]],["weakmapSet",[$h_a=>weakmapSet=$h_a]]]],["./stringify-utils.js",[["an",[$h_a=>an=$h_a]],["bestEffortStringify",[$h_a=>bestEffortStringify=$h_a]]]],["./types.js",[]],["./internal-types.js",[]]]);const declassifiers=new WeakMap,quote=(payload,spaces)=>{const result=freeze({toString:freeze(()=>bestEffortStringify(payload,spaces))});return weakmapSet(declassifiers,result,payload),result};freeze(quote);const hiddenDetailsMap=new WeakMap,getMessageString=({template:template,args:args})=>{const parts=[template[0]];for(let i=0;i<args.length;i+=1){const arg=args[i];let argStr;argStr=weakmapHas(declassifiers,arg)?""+arg:isError(arg)?`(${an(arg.name)})`:`(${an(typeof arg)})`,arrayPush(parts,argStr,template[i+1])}return arrayJoin(parts,"")},DetailsTokenProto=freeze({toString(){const hiddenDetails=weakmapGet(hiddenDetailsMap,this);return void 0===hiddenDetails?"[Not a DetailsToken]":getMessageString(hiddenDetails)}});freeze(DetailsTokenProto.toString);const redactedDetails=(template,...args)=>{const detailsToken=freeze({__proto__:DetailsTokenProto});return weakmapSet(hiddenDetailsMap,detailsToken,{template:template,args:args}),detailsToken};freeze(redactedDetails);const unredactedDetails=(template,...args)=>(args=arrayMap(args,arg=>weakmapHas(declassifiers,arg)?arg:quote(arg)),redactedDetails(template,...args));$h_once.unredactedDetails(unredactedDetails),freeze(unredactedDetails);const getLogArgs=({template:template,args:args})=>{const logArgs=[template[0]];for(let i=0;i<args.length;i+=1){let arg=args[i];weakmapHas(declassifiers,arg)&&(arg=weakmapGet(declassifiers,arg));const priorWithoutSpace=stringReplace(arrayPop(logArgs)||"",/ $/,"");""!==priorWithoutSpace&&arrayPush(logArgs,priorWithoutSpace);const nextWithoutSpace=stringReplace(template[i+1],/^ /,"");arrayPush(logArgs,arg,nextWithoutSpace)}return""===logArgs[logArgs.length-1]&&arrayPop(logArgs),logArgs},hiddenMessageLogArgs=new WeakMap;let errorTagNum=0;const errorTags=new WeakMap,tagError=(err,optErrorName=err.name)=>{let errorTag=weakmapGet(errorTags,err);return void 0!==errorTag||(errorTagNum+=1,errorTag=`${optErrorName}#${errorTagNum}`,weakmapSet(errorTags,err,errorTag)),errorTag},makeError=(optDetails=redactedDetails`Assert failed`,ErrorConstructor=globalThis.Error,{errorName:errorName}={})=>{"string"==typeof optDetails&&(optDetails=redactedDetails([optDetails]));const hiddenDetails=weakmapGet(hiddenDetailsMap,optDetails);if(void 0===hiddenDetails)throw new TypeError("unrecognized details "+quote(optDetails));const error=new ErrorConstructor(getMessageString(hiddenDetails));return weakmapSet(hiddenMessageLogArgs,error,getLogArgs(hiddenDetails)),void 0!==errorName&&tagError(error,errorName),error};freeze(makeError);const hiddenNoteLogArgsArrays=new WeakMap,hiddenNoteCallbackArrays=new WeakMap,note=(error,detailsNote)=>{"string"==typeof detailsNote&&(detailsNote=redactedDetails([detailsNote]));const hiddenDetails=weakmapGet(hiddenDetailsMap,detailsNote);if(void 0===hiddenDetails)throw new TypeError("unrecognized details "+quote(detailsNote));const logArgs=getLogArgs(hiddenDetails),callbacks=weakmapGet(hiddenNoteCallbackArrays,error);if(void 0!==callbacks)for(const callback of callbacks)callback(error,logArgs);else{const logArgsArray=weakmapGet(hiddenNoteLogArgsArrays,error);void 0!==logArgsArray?arrayPush(logArgsArray,logArgs):weakmapSet(hiddenNoteLogArgsArrays,error,[logArgs])}};freeze(note);const loggedErrorHandler={getStackString:globalThis.getStackString||(error=>{if(!("stack"in error))return"";const stackString=""+error.stack,pos=stringIndexOf(stackString,"\n");return stringStartsWith(stackString," ")||-1===pos?stackString:stringSlice(stackString,pos+1)}),tagError:error=>tagError(error),resetErrorTagNum:()=>{errorTagNum=0},getMessageLogArgs:error=>weakmapGet(hiddenMessageLogArgs,error),takeMessageLogArgs:error=>{const result=weakmapGet(hiddenMessageLogArgs,error);return weakmapDelete(hiddenMessageLogArgs,error),result},takeNoteLogArgsArray:(error,callback)=>{const result=weakmapGet(hiddenNoteLogArgsArrays,error);if(weakmapDelete(hiddenNoteLogArgsArrays,error),void 0!==callback){const callbacks=weakmapGet(hiddenNoteCallbackArrays,error);callbacks?arrayPush(callbacks,callback):weakmapSet(hiddenNoteCallbackArrays,error,[callback])}return result||[]}};$h_once.loggedErrorHandler(loggedErrorHandler),freeze(loggedErrorHandler);const makeAssert=(optRaise,unredacted=!1)=>{const details=unredacted?unredactedDetails:redactedDetails,fail=(optDetails=details`Assert failed`,ErrorConstructor=globalThis.Error)=>{const reason=makeError(optDetails,ErrorConstructor);throw void 0!==optRaise&&optRaise(reason),reason};function baseAssert(flag,optDetails=details`Check failed`,ErrorConstructor=globalThis.Error){if(!flag)throw fail(optDetails,ErrorConstructor)}freeze(fail);const equal=(actual,expected,optDetails=details`Expected ${actual} is same as ${expected}`,ErrorConstructor=RangeError)=>{baseAssert(is(actual,expected),optDetails,ErrorConstructor)};freeze(equal);const assertTypeof=(specimen,typename,optDetails)=>{baseAssert("string"==typeof typename,details`${quote(typename)} must be a string`),void 0===optDetails&&(optDetails=details([""," must be "+an(typename)],specimen)),equal(typeof specimen,typename,optDetails,TypeError)};freeze(assertTypeof);const assert=assign(baseAssert,{error:makeError,fail:fail,equal:equal,typeof:assertTypeof,string:(specimen,optDetails)=>assertTypeof(specimen,"string",optDetails),note:note,details:details,quote:quote,makeAssert:makeAssert});return freeze(assert)};$h_once.makeAssert(makeAssert),freeze(makeAssert);const assert=makeAssert();$h_once.assert(assert)},({imports:$h_imports,liveVar:$h_live,onceVar:$h_once})=>{let FERAL_FUNCTION,arrayJoin;$h_imports([["./commons.js",[["FERAL_FUNCTION",[$h_a=>FERAL_FUNCTION=$h_a]],["arrayJoin",[$h_a=>arrayJoin=$h_a]]]]]);$h_once.makeEvaluateFactory((constants=[])=>{const optimizer=function(constants){return 0===constants.length?"":`const {${arrayJoin(constants,",")}} = this;`}(constants);return FERAL_FUNCTION(`\n with (this) {\n ${optimizer}\n return function() {\n 'use strict';\n return eval(arguments[0]);\n };\n }\n `)})},({imports:$h_imports,liveVar:$h_live,onceVar:$h_once})=>{let arrayFilter,arrayIncludes,getOwnPropertyDescriptor,getOwnPropertyNames,objectHasOwnProperty,regexpTest;$h_imports([["./commons.js",[["arrayFilter",[$h_a=>arrayFilter=$h_a]],["arrayIncludes",[$h_a=>arrayIncludes=$h_a]],["getOwnPropertyDescriptor",[$h_a=>getOwnPropertyDescriptor=$h_a]],["getOwnPropertyNames",[$h_a=>getOwnPropertyNames=$h_a]],["objectHasOwnProperty",[$h_a=>objectHasOwnProperty=$h_a]],["regexpTest",[$h_a=>regexpTest=$h_a]]]]]);const keywords=["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"],identifierPattern=/^[a-zA-Z_$][\w$]*$/,isValidIdentifierName=name=>"eval"!==name&&!arrayIncludes(keywords,name)&®expTest(identifierPattern,name);function isImmutableDataProperty(obj,name){const desc=getOwnPropertyDescriptor(obj,name);return!1===desc.configurable&&!1===desc.writable&&objectHasOwnProperty(desc,"value")}$h_once.isValidIdentifierName(isValidIdentifierName);$h_once.getScopeConstants((globalObject,localObject={})=>{const globalNames=getOwnPropertyNames(globalObject),localNames=getOwnPropertyNames(localObject),localConstants=arrayFilter(localNames,name=>isValidIdentifierName(name)&&isImmutableDataProperty(localObject,name));return[...arrayFilter(globalNames,name=>!arrayIncludes(localNames,name)&&isValidIdentifierName(name)&&isImmutableDataProperty(globalObject,name)),...localConstants]})},({imports:$h_imports,liveVar:$h_live,onceVar:$h_once})=>{let FERAL_EVAL,Proxy,String,TypeError,create,freeze,getOwnPropertyDescriptor,getOwnPropertyDescriptors,globalThis,immutableObject,objectHasOwnProperty,reflectGet,reflectSet,assert;$h_imports([["./commons.js",[["FERAL_EVAL",[$h_a=>FERAL_EVAL=$h_a]],["Proxy",[$h_a=>Proxy=$h_a]],["String",[$h_a=>String=$h_a]],["TypeError",[$h_a=>TypeError=$h_a]],["create",[$h_a=>create=$h_a]],["freeze",[$h_a=>freeze=$h_a]],["getOwnPropertyDescriptor",[$h_a=>getOwnPropertyDescriptor=$h_a]],["getOwnPropertyDescriptors",[$h_a=>getOwnPropertyDescriptors=$h_a]],["globalThis",[$h_a=>globalThis=$h_a]],["immutableObject",[$h_a=>immutableObject=$h_a]],["objectHasOwnProperty",[$h_a=>objectHasOwnProperty=$h_a]],["reflectGet",[$h_a=>reflectGet=$h_a]],["reflectSet",[$h_a=>reflectSet=$h_a]]]],["./error/assert.js",[["assert",[$h_a=>assert=$h_a]]]]]);const{details:d,quote:q}=assert,alwaysThrowHandler=new Proxy(immutableObject,freeze({get(_shadow,prop){assert.fail(d`Please report unexpected scope handler trap: ${q(String(prop))}`)}}));$h_once.createScopeHandler((globalObject,localObject={},{sloppyGlobalsMode:sloppyGlobalsMode=!1}={})=>{let allowNextEvalToBeUnsafe=!1;return{admitOneUnsafeEvalNext:()=>{allowNextEvalToBeUnsafe=!0},resetOneUnsafeEvalNext:()=>{const wasSet=allowNextEvalToBeUnsafe;return allowNextEvalToBeUnsafe=!1,wasSet},scopeHandler:freeze(create(alwaysThrowHandler,getOwnPropertyDescriptors({get(_shadow,prop){if("symbol"!=typeof prop)return"eval"===prop&&!0===allowNextEvalToBeUnsafe?(allowNextEvalToBeUnsafe=!1,FERAL_EVAL):prop in localObject?reflectGet(localObject,prop,globalObject):reflectGet(globalObject,prop)},set(_shadow,prop,value){if(prop in localObject){const desc=getOwnPropertyDescriptor(localObject,prop);return objectHasOwnProperty(desc,"value")?reflectSet(localObject,prop,value):reflectSet(localObject,prop,value,globalObject)}return reflectSet(globalObject,prop,value)},has:(_shadow,prop)=>sloppyGlobalsMode||allowNextEvalToBeUnsafe&&"eval"===prop||prop in localObject||prop in globalObject||prop in globalThis,getPrototypeOf:()=>null,getOwnPropertyDescriptor(_target,prop){const quotedProp=q(String(prop));console.warn("getOwnPropertyDescriptor trap on scopeHandler for "+quotedProp,(new TypeError).stack)}})))}})},({imports:$h_imports,liveVar:$h_live,onceVar:$h_once})=>{let FERAL_REG_EXP,regexpExec,stringSlice;$h_imports([["./commons.js",[["FERAL_REG_EXP",[$h_a=>FERAL_REG_EXP=$h_a]],["regexpExec",[$h_a=>regexpExec=$h_a]],["stringSlice",[$h_a=>stringSlice=$h_a]]]]]);const sourceMetaEntriesRegExp=new FERAL_REG_EXP("(?:\\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*$");$h_once.getSourceURL(src=>{let sourceURL="<unknown>";for(;src.length>0;){const match=regexpExec(sourceMetaEntriesRegExp,src);if(null===match)break;src=stringSlice(src,0,src.length-match[0].length),"sourceURL"===match[3]?sourceURL=match[4]:"sourceURL"===match[1]&&(sourceURL=match[2])}return sourceURL})},({imports:$h_imports,liveVar:$h_live,onceVar:$h_once})=>{let FERAL_REG_EXP,SyntaxError,stringReplace,stringSearch,stringSlice,stringSplit,getSourceURL;function getLineNumber(src,pattern){const index=stringSearch(src,pattern);if(index<0)return-1;const adjustment="\n"===src[index]?1:0;return stringSplit(stringSlice(src,0,index),"\n").length+adjustment}$h_imports([["./commons.js",[["FERAL_REG_EXP",[$h_a=>FERAL_REG_EXP=$h_a]],["SyntaxError",[$h_a=>SyntaxError=$h_a]],["stringReplace",[$h_a=>stringReplace=$h_a]],["stringSearch",[$h_a=>stringSearch=$h_a]],["stringSlice",[$h_a=>stringSlice=$h_a]],["stringSplit",[$h_a=>stringSplit=$h_a]]]],["./get-source-url.js",[["getSourceURL",[$h_a=>getSourceURL=$h_a]]]]]);const htmlCommentPattern=new FERAL_REG_EXP("(?:\x3c!--|--\x3e)","g"),rejectHtmlComments=src=>{const lineNumber=getLineNumber(src,htmlCommentPattern);if(lineNumber<0)return src;const name=getSourceURL(src);throw new SyntaxError(`Possible HTML comment rejected at ${name}:${lineNumber}. (SES_HTML_COMMENT_REJECTED)`)};$h_once.rejectHtmlComments(rejectHtmlComments);$h_once.evadeHtmlCommentTest(src=>stringReplace(src,htmlCommentPattern,match=>"<"===match[0]?"< ! --":"-- >"));const importPattern=new FERAL_REG_EXP("(^|[^.])\\bimport(\\s*(?:\\(|/[/*]))","g"),rejectImportExpressions=src=>{const lineNumber=getLineNumber(src,importPattern);if(lineNumber<0)return src;const name=getSourceURL(src);throw new SyntaxError(`Possible import expression rejected at ${name}:${lineNumber}. (SES_IMPORT_REJECTED)`)};$h_once.rejectImportExpressions(rejectImportExpressions);$h_once.evadeImportExpressionTest(src=>stringReplace(src,importPattern,(_,p1,p2)=>`${p1}__import__${p2}`));const someDirectEvalPattern=new FERAL_REG_EXP("(^|[^.])\\beval(\\s*\\()","g");$h_once.rejectSomeDirectEvalExpressions(src=>{const lineNumber=getLineNumber(src,someDirectEvalPattern);if(lineNumber<0)return src;const name=getSourceURL(src);throw new SyntaxError(`Possible direct eval expression rejected at ${name}:${lineNumber}. (SES_EVAL_REJECTED)`)});$h_once.mandatoryTransforms(source=>(source=rejectHtmlComments(source),source=rejectImportExpressions(source)));$h_once.applyTransforms((source,transforms)=>{for(const transform of transforms)source=transform(source);return source})},({imports:$h_imports,liveVar:$h_live,onceVar:$h_once})=>{let WeakSet,apply,immutableObject,proxyRevocable,weaksetAdd,getScopeConstants,createScopeHandler,applyTransforms,mandatoryTransforms,makeEvaluateFactory,assert;$h_imports([["./commons.js",[["WeakSet",[$h_a=>WeakSet=$h_a]],["apply",[$h_a=>apply=$h_a]],["immutableObject",[$h_a=>immutableObject=$h_a]],["proxyRevocable",[$h_a=>proxyRevocable=$h_a]],["weaksetAdd",[$h_a=>weaksetAdd=$h_a]]]],["./scope-constants.js",[["getScopeConstants",[$h_a=>getScopeConstants=$h_a]]]],["./scope-handler.js",[["createScopeHandler",[$h_a=>createScopeHandler=$h_a]]]],["./transforms.js",[["applyTransforms",[$h_a=>applyTransforms=$h_a]],["mandatoryTransforms",[$h_a=>mandatoryTransforms=$h_a]]]],["./make-evaluate-factory.js",[["makeEvaluateFactory",[$h_a=>makeEvaluateFactory=$h_a]]]],["./error/assert.js",[["assert",[$h_a=>assert=$h_a]]]]]);const{details:d}=assert;$h_once.makeSafeEvaluator(({globalObject:globalObject,localObject:localObject={},globalTransforms:globalTransforms=[],sloppyGlobalsMode:sloppyGlobalsMode=!1,knownScopeProxies:knownScopeProxies=new WeakSet}={})=>{const{scopeHandler:scopeHandler,admitOneUnsafeEvalNext:admitOneUnsafeEvalNext,resetOneUnsafeEvalNext:resetOneUnsafeEvalNext}=createScopeHandler(globalObject,localObject,{sloppyGlobalsMode:sloppyGlobalsMode}),{proxy:scopeProxy,revoke:revokeScopeProxy}=proxyRevocable(immutableObject,scopeHandler);let evaluate;weaksetAdd(knownScopeProxies,scopeProxy);return{safeEvaluate:(source,{localTransforms:localTransforms=[]}={})=>{let err;(()=>{if(!evaluate){const constants=getScopeConstants(globalObject,localObject),evaluateFactory=makeEvaluateFactory(constants);evaluate=apply(evaluateFactory,scopeProxy,[])}})(),source=applyTransforms(source,[...localTransforms,...globalTransforms,mandatoryTransforms]),admitOneUnsafeEvalNext();try{return apply(evaluate,globalObject,[source])}catch(e){throw err=e,e}finally{resetOneUnsafeEvalNext()&&(revokeScopeProxy(),assert.fail(d`handler did not reset allowNextEvalToBeUnsafe ${err}`))}}}})},({imports:$h_imports,liveVar:$h_live,onceVar:$h_once})=>{let TypeError,arrayPush,create,defineProperties,getOwnPropertyDescriptors,evadeHtmlCommentTest,evadeImportExpressionTest,rejectSomeDirectEvalExpressions,makeSafeEvaluator;$h_imports([["./commons.js",[["TypeError",[$h_a=>TypeError=$h_a]],["arrayPush",[$h_a=>arrayPush=$h_a]],["create",[$h_a=>create=$h_a]],["defineProperties",[$h_a=>defineProperties=$h_a]],["getOwnPropertyDescriptors",[$h_a=>getOwnPropertyDescriptors=$h_a]]]],["./transforms.js",[["evadeHtmlCommentTest",[$h_a=>evadeHtmlCommentTest=$h_a]],["evadeImportExpressionTest",[$h_a=>evadeImportExpressionTest=$h_a]],["rejectSomeDirectEvalExpressions",[$h_a=>rejectSomeDirectEvalExpressions=$h_a]]]],["./make-safe-evaluator.js",[["makeSafeEvaluator",[$h_a=>makeSafeEvaluator=$h_a]]]]]);const provideCompartmentEvaluator=(compartmentFields,options)=>{const{sloppyGlobalsMode:sloppyGlobalsMode=!1,__moduleShimLexicals__:__moduleShimLexicals__}=options;let safeEvaluate;if(void 0!==__moduleShimLexicals__||sloppyGlobalsMode){let{globalTransforms:globalTransforms}=compartmentFields;const{globalObject:globalObject,globalLexicals:globalLexicals,knownScopeProxies:knownScopeProxies}=compartmentFields;let localObject=globalLexicals;void 0!==__moduleShimLexicals__&&(globalTransforms=void 0,localObject=create(null,getOwnPropertyDescriptors(globalLexicals)),defineProperties(localObject,getOwnPropertyDescriptors(__moduleShimLexicals__))),({safeEvaluate:safeEvaluate}=makeSafeEvaluator({globalObject:globalObject,localObject:localObject,globalTransforms:globalTransforms,sloppyGlobalsMode:sloppyGlobalsMode,knownScopeProxies:knownScopeProxies}))}else({safeEvaluate:safeEvaluate}=compartmentFields);return{safeEvaluate:safeEvaluate}};$h_once.provideCompartmentEvaluator(provideCompartmentEvaluator);$h_once.compartmentEvaluate((compartmentFields,source,options)=>{if("string"!=typeof source)throw new TypeError("first argument of evaluate() must be a string");const{transforms:transforms=[],__evadeHtmlCommentTest__:__evadeHtmlCommentTest__=!1,__evadeImportExpressionTest__:__evadeImportExpressionTest__=!1,__rejectSomeDirectEvalExpressions__:__rejectSomeDirectEvalExpressions__=!0}=options,localTransforms=[...transforms];!0===__evadeHtmlCommentTest__&&arrayPush(localTransforms,evadeHtmlCommentTest),!0===__evadeImportExpressionTest__&&arrayPush(localTransforms,evadeImportExpressionTest),!0===__rejectSomeDirectEvalExpressions__&&arrayPush(localTransforms,rejectSomeDirectEvalExpressions);const{safeEvaluate:safeEvaluate}=provideCompartmentEvaluator(compartmentFields,options);return safeEvaluate(source,{localTransforms:localTransforms})})},({imports:$h_imports,liveVar:$h_live,onceVar:$h_once})=>{$h_imports([]);$h_once.makeEvalFunction(safeEvaluate=>source=>"string"!=typeof source?source:safeEvaluate(source))},({imports:$h_imports,liveVar:$h_live,onceVar:$h_once})=>{let FERAL_FUNCTION,arrayJoin,arrayPop,defineProperties,getPrototypeOf,assert;$h_imports([["./commons.js",[["FERAL_FUNCTION",[$h_a=>FERAL_FUNCTION=$h_a]],["arrayJoin",[$h_a=>arrayJoin=$h_a]],["arrayPop",[$h_a=>arrayPop=$h_a]],["defineProperties",[$h_a=>defineProperties=$h_a]],["getPrototypeOf",[$h_a=>getPrototypeOf=$h_a]]]],["./error/assert.js",[["assert",[$h_a=>assert=$h_a]]]]]);$h_once.makeFunctionConstructor(safeEvaluate=>{const newFunction=function(_body){const bodyText=""+(arrayPop(arguments)||""),parameters=""+arrayJoin(arguments,",");new FERAL_FUNCTION(parameters,""),new FERAL_FUNCTION(bodyText);const src=`(function anonymous(${parameters}\n) {\n${bodyText}\n})`;return safeEvaluate(src)};return defineProperties(newFunction,{prototype:{value:FERAL_FUNCTION.prototype,writable:!1,enumerable:!1,configurable:!1}}),assert(getPrototypeOf(FERAL_FUNCTION)===FERAL_FUNCTION.prototype,"Function prototype is the same accross compartments"),assert(getPrototypeOf(newFunction)===FERAL_FUNCTION.prototype,"Function constructor prototype is the same accross compartments"),newFunction})},({imports:$h_imports,liveVar:$h_live,onceVar:$h_once})=>{$h_imports([]);const constantProperties={Infinity:1/0,NaN:NaN,undefined:void 0};$h_once.constantProperties(constantProperties);$h_once.universalPropertyNames({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"});$h_once.initialGlobalPropertyNames({Date:"%InitialDate%",Error:"%InitialError%",RegExp:"%InitialRegExp%",Math:"%InitialMath%",getStackString:"%InitialGetStackString%"});$h_once.sharedGlobalPropertyNames({Date:"%SharedDate%",Error:"%SharedError%",RegExp:"%SharedRegExp%",Math:"%SharedMath%"});$h_once.uniqueGlobalPropertyNames({globalThis:"%UniqueGlobalThis%",eval:"%UniqueEval%",Function:"%UniqueFunction%",Compartment:"%UniqueCompartment%"});const NativeErrors=[EvalError,RangeError,ReferenceError,SyntaxError,TypeError,URIError];$h_once.NativeErrors(NativeErrors);const FunctionInstance={"[[Proto]]":"%FunctionPrototype%",length:"number",name:"string"};$h_once.FunctionInstance(FunctionInstance);const fn=FunctionInstance,asyncFn={"[[Proto]]":"%AsyncFunctionPrototype%"},getter={get:fn,set:"undefined"},accessor={get:fn,set:fn};function NativeError(prototype){return{"[[Proto]]":"%SharedError%",prototype:prototype}}function NativeErrorPrototype(constructor){return{"[[Proto]]":"%ErrorPrototype%",constructor:constructor,message:"string",name:"string",toString:!1}}function TypedArray(prototype){return{"[[Proto]]":"%TypedArray%",BYTES_PER_ELEMENT:"number",prototype:prototype}}function TypedArrayPrototype(constructor){return{"[[Proto]]":"%TypedArrayPrototype%",BYTES_PER_ELEMENT:"number",constructor:constructor}}$h_once.isAccessorPermit(permit=>permit===getter||permit===accessor);const SharedMath={E:"number",LN10:"number",LN2:"number",LOG10E:"number",LOG2E:"number",PI:"number",SQRT1_2:"number",SQRT2:"number","@@toStringTag":"string",abs:fn,acos:fn,acosh:fn,asin:fn,asinh:fn,atan:fn,atanh:fn,atan2:fn,cbrt:fn,ceil:fn,clz32:fn,cos:fn,cosh:fn,exp:fn,expm1:fn,floor:fn,fround:fn,hypot:fn,imul:fn,log:fn,log1p:fn,log10:fn,log2:fn,max:fn,min:fn,pow:fn,round:fn,sign:fn,sin:fn,sinh:fn,sqrt:fn,tan:fn,tanh:fn,trunc:fn,idiv:!1,idivmod:!1,imod:!1,imuldiv:!1,irem:!1,mod:!1},whitelist={"[[Proto]]":null,"%ThrowTypeError%":fn,Infinity:"number",NaN:"number",undefined:"undefined","%UniqueEval%":fn,isFinite:fn,isNaN:fn,parseFloat:fn,parseInt:fn,decodeURI:fn,decodeURIComponent:fn,encodeURI:fn,encodeURIComponent:fn,Object:{"[[Proto]]":"%FunctionPrototype%",assign:fn,create:fn,defineProperties:fn,defineProperty:fn,entries:fn,freeze:fn,fromEntries:fn,getOwnPropertyDescriptor:fn,getOwnPropertyDescriptors:fn,getOwnPropertyNames:fn,getOwnPropertySymbols:fn,getPrototypeOf:fn,is:fn,isExtensible:fn,isFrozen:fn,isSealed:fn,keys:fn,preventExtensions:fn,prototype:"%ObjectPrototype%",seal:fn,setPrototypeOf:fn,values:fn},"%ObjectPrototype%":{"[[Proto]]":null,constructor:"Object",hasOwnProperty:fn,isPrototypeOf:fn,propertyIsEnumerable:fn,toLocaleString:fn,toString:fn,valueOf:fn,"--proto--":accessor,__defineGetter__:fn,__defineSetter__:fn,__lookupGetter__:fn,__lookupSetter__:fn},"%UniqueFunction%":{"[[Proto]]":"%FunctionPrototype%",prototype:"%FunctionPrototype%"},"%InertFunction%":{"[[Proto]]":"%FunctionPrototype%",prototype:"%FunctionPrototype%"},"%FunctionPrototype%":{apply:fn,bind:fn,call:fn,constructor:"%InertFunction%",toString:fn,"@@hasInstance":fn,caller:!1,arguments:!1},Boolean:{"[[Proto]]":"%FunctionPrototype%",prototype:"%BooleanPrototype%"},"%BooleanPrototype%":{constructor:"Boolean",toString:fn,valueOf:fn},Symbol:{"[[Proto]]":"%FunctionPrototype%",asyncIterator:"symbol",for:fn,hasInstance:"symbol",isConcatSpreadable:"symbol",iterator:"symbol",keyFor:fn,match:"symbol",matchAll:"symbol",prototype:"%SymbolPrototype%",replace:"symbol",search:"symbol",species:"symbol",split:"symbol",toPrimitive:"symbol",toStringTag:"symbol",unscopables:"symbol"},"%SymbolPrototype%":{constructor:"Symbol",description:getter,toString:fn,valueOf:fn,"@@toPrimitive":fn,"@@toStringTag":"string"},"%InitialError%":{"[[Proto]]":"%FunctionPrototype%",prototype:"%ErrorPrototype%",captureStackTrace:fn,stackTraceLimit:accessor,prepareStackTrace:accessor},"%SharedError%":{"[[Proto]]":"%FunctionPrototype%",prototype:"%ErrorPrototype%",captureStackTrace:fn,stackTraceLimit:accessor,prepareStackTrace:accessor},"%ErrorPrototype%":{constructor:"%SharedError%",message:"string",name:"string",toString:fn,at:!1,stack:!1},EvalError:NativeError("%EvalErrorPrototype%"),RangeError:NativeError("%RangeErrorPrototype%"),ReferenceError:NativeError("%ReferenceErrorPrototype%"),SyntaxError:NativeError("%SyntaxErrorPrototype%"),TypeError:NativeError("%TypeErrorPrototype%"),URIError:NativeError("%URIErrorPrototype%"),"%EvalErrorPrototype%":NativeErrorPrototype("EvalError"),"%RangeErrorPrototype%":NativeErrorPrototype("RangeError"),"%ReferenceErrorPrototype%":NativeErrorPrototype("ReferenceError"),"%SyntaxErrorPrototype%":NativeErrorPrototype("SyntaxError"),"%TypeErrorPrototype%":NativeErrorPrototype("TypeError"),"%URIErrorPrototype%":NativeErrorPrototype("URIError"),Number:{"[[Proto]]":"%FunctionPrototype%",EPSILON:"number",isFinite:fn,isInteger:fn,isNaN:fn,isSafeInteger:fn,MAX_SAFE_INTEGER:"number",MAX_VALUE:"number",MIN_SAFE_INTEGER:"number",MIN_VALUE:"number",NaN:"number",NEGATIVE_INFINITY:"number",parseFloat:fn,parseInt:fn,POSITIVE_INFINITY:"number",prototype:"%NumberPrototype%"},"%NumberPrototype%":{constructor:"Number",toExponential:fn,toFixed:fn,toLocaleString:fn,toPrecision:fn,toString:fn,valueOf:fn},BigInt:{"[[Proto]]":"%FunctionPrototype%",asIntN:fn,asUintN:fn,prototype:"%BigIntPrototype%",bitLength:!1,fromArrayBuffer:!1},"%BigIntPrototype%":{constructor:"BigInt",toLocaleString:fn,toString:fn,valueOf:fn,"@@toStringTag":"string"},"%InitialMath%":{...SharedMath,random:fn},"%SharedMath%":SharedMath,"%InitialDate%":{"[[Proto]]":"%FunctionPrototype%",now:fn,parse:fn,prototype:"%DatePrototype%",UTC:fn},"%SharedDate%":{"[[Proto]]":"%FunctionPrototype%",now:fn,parse:fn,prototype:"%DatePrototype%",UTC:fn},"%DatePrototype%":{constructor:"%SharedDate%",getDate:fn,getDay:fn,getFullYear:fn,getHours:fn,getMilliseconds:fn,getMinutes:fn,getMonth:fn,getSeconds:fn,getTime:fn,getTimezoneOffset:fn,getUTCDate:fn,getUTCDay:fn,getUTCFullYear:fn,getUTCHours:fn,getUTCMilliseconds:fn,getUTCMinutes:fn,getUTCMonth:fn,getUTCSeconds:fn,setDate:fn,setFullYear:fn,setHours:fn,setMilliseconds:fn,setMinutes:fn,setMonth:fn,setSeconds:fn,setTime:fn,setUTCDate:fn,setUTCFullYear:fn,setUTCHours:fn,setUTCMilliseconds:fn,setUTCMinutes:fn,setUTCMonth:fn,setUTCSeconds:fn,toDateString:fn,toISOString:fn,toJSON:fn,toLocaleDateString:fn,toLocaleString:fn,toLocaleTimeString:fn,toString:fn,toTimeString:fn,toUTCString:fn,valueOf:fn,"@@toPrimitive":fn,getYear:fn,setYear:fn,toGMTString:fn},String:{"[[Proto]]":"%FunctionPrototype%",fromCharCode:fn,fromCodePoint:fn,prototype:"%StringPrototype%",raw:fn,fromArrayBuffer:!1},"%StringPrototype%":{length:"number",charAt:fn,charCodeAt:fn,codePointAt:fn,concat:fn,constructor:"String",endsWith:fn,includes:fn,indexOf:fn,lastIndexOf:fn,localeCompare:fn,match:fn,matchAll:fn,normalize:fn,padEnd:fn,padStart:fn,repeat:fn,replace:fn,replaceAll:fn,search:fn,slice:fn,split:fn,startsWith:fn,substring:fn,toLocaleLowerCase:fn,toLocaleUpperCase:fn,toLowerCase:fn,toString:fn,toUpperCase:fn,trim:fn,trimEnd:fn,trimStart:fn,valueOf:fn,"@@iterator":fn,substr:fn,anchor:fn,big:fn,blink:fn,bold:fn,fixed:fn,fontcolor:fn,fontsize:fn,italics:fn,link:fn,small:fn,strike:fn,sub:fn,sup:fn,trimLeft:fn,trimRight:fn,compare:!1,at:fn},"%StringIteratorPrototype%":{"[[Proto]]":"%IteratorPrototype%",next:fn,"@@toStringTag":"string"},"%InitialRegExp%":{"[[Proto]]":"%FunctionPrototype%",prototype:"%RegExpPrototype%","@@species":getter,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":getter},"%RegExpPrototype%":{constructor:"%SharedRegExp%",exec:fn,dotAll:getter,flags:getter,global:getter,ignoreCase:getter,"@@match":fn,"@@matchAll":fn,multiline:getter,"@@replace":fn,"@@search":fn,source:getter,"@@split":fn,sticky:getter,test:fn,toString:fn,unicode:getter,compile:!1,hasIndices:!1},"%RegExpStringIteratorPrototype%":{"[[Proto]]":"%IteratorPrototype%",next:fn,"@@toStringTag":"string"},Array:{"[[Proto]]":"%FunctionPrototype%",from:fn,isArray:fn,of:fn,prototype:"%ArrayPrototype%","@@species":getter,at:fn},"%ArrayPrototype%":{length:"number",concat:fn,constructor:"Array",copyWithin:fn,entries:fn,every:fn,fill:fn,filter:fn,find:fn,findIndex:fn,flat:fn,flatMap:fn,forEach:fn,includes:fn,indexOf:fn,join:fn,keys:fn,lastIndexOf:fn,map:fn,pop:fn,push:fn,reduce:fn,reduceRight:fn,reverse:fn,shift:fn,slice:fn,some:fn,sort:fn,splice:fn,toLocaleString:fn,toString:fn,unshift:fn,values:fn,"@@iterator":fn,"@@unscopables":{"[[Proto]]":null,copyWithin:"boolean",entries:"boolean",fill:"boolean",find:"boolean",findIndex:"boolean",flat:"boolean",flatMap:"boolean",includes:"boolean",keys:"boolean",values:"boolean",at:!1},at:!1},"%ArrayIteratorPrototype%":{"[[Proto]]":"%IteratorPrototype%",next:fn,"@@toStringTag":"string"},"%TypedArray%":{"[[Proto]]":"%FunctionPrototype%",from:fn,of:fn,prototype:"%TypedArrayPrototype%","@@species":getter},"%TypedArrayPrototype%":{buffer:getter,byteLength:getter,byteOffset:getter,constructor:"%TypedArray%",copyWithin:fn,entries:fn,every:fn,fill:fn,filter:fn,find:fn,findIndex:fn,forEach:fn,includes:fn,indexOf:fn,join:fn,keys:fn,lastIndexOf:fn,length:getter,map:fn,reduce:fn,reduceRight:fn,reverse:fn,set:fn,slice:fn,some:fn,sort:fn,subarray:fn,toLocaleString:fn,toString:fn,values:fn,"@@iterator":fn,"@@toStringTag":getter,at:!1},BigInt64Array:TypedArray("%BigInt64ArrayPrototype%"),BigUint64Array:TypedArray("%BigUint64ArrayPrototype%"),Float32Array:TypedArray("%Float32ArrayPrototype%"),Float64Array:TypedArray("%Float64ArrayPrototype%"),Int16Array:TypedArray("%Int16ArrayPrototype%"),Int32Array:TypedArray("%Int32ArrayPrototype%"),Int8Array:TypedArray("%Int8ArrayPrototype%"),Uint16Array:TypedArray("%Uint16ArrayPrototype%"),Uint32Array:TypedArray("%Uint32ArrayPrototype%"),Uint8Array:TypedArray("%Uint8ArrayPrototype%"),Uint8ClampedArray:TypedArray("%Uint8ClampedArrayPrototype%"),"%BigInt64ArrayPrototype%":TypedArrayPrototype("BigInt64Array"),"%BigUint64ArrayPrototype%":TypedArrayPrototype("BigUint64Array"),"%Float32ArrayPrototype%":TypedArrayPrototype("Float32Array"),"%Float64ArrayPrototype%":TypedArrayPrototype("Float64Array"),"%Int16ArrayPrototype%":TypedArrayPrototype("Int16Array"),"%Int32ArrayPrototype%":TypedArrayPrototype("Int32Array"),"%Int8ArrayPrototype%":TypedArrayPrototype("Int8Array"),"%Uint16ArrayPrototype%":TypedArrayPrototype("Uint16Array"),"%Uint32ArrayPrototype%":TypedArrayPrototype("Uint32Array"),"%Uint8ArrayPrototype%":TypedArrayPrototype("Uint8Array"),"%Uint8ClampedArrayPrototype%":TypedArrayPrototype("Uint8ClampedArray"),Map:{"[[Proto]]":"%FunctionPrototype%","@@species":getter,prototype:"%MapPrototype%"},"%MapPrototype%":{clear:fn,constructor:"Map",delete:fn,entries:fn,forEach:fn,get:fn,has:fn,keys:fn,set:fn,size:getter,values:fn,"@@iterator":fn,"@@toStringTag":"string"},"%MapIteratorPrototype%":{"[[Proto]]":"%IteratorPrototype%",next:fn,"@@toStringTag":"string"},Set:{"[[Proto]]":"%FunctionPrototype%",prototype:"%SetPrototype%","@@species":getter},"%SetPrototype%":{add:fn,clear:fn,constructor:"Set",delete:fn,entries:fn,forEach:fn,has:fn,keys:fn,size:getter,values:fn,"@@iterator":fn,"@@toStringTag":"string"},"%SetIteratorPrototype%":{"[[Proto]]":"%IteratorPrototype%",next:fn,"@@toStringTag":"string"},WeakMap:{"[[Proto]]":"%FunctionPrototype%",prototype:"%WeakMapPrototype%"},"%WeakMapPrototype%":{constructor:"WeakMap",delete:fn,get:fn,has:fn,set:fn,"@@toStringTag":"string"},WeakSet:{"[[Proto]]":"%FunctionPrototype%",prototype:"%WeakSetPrototype%"},"%WeakSetPrototype%":{add:fn,constructor:"WeakSet",delete:fn,has:fn,"@@toStringTag":"string"},ArrayBuffer:{"[[Proto]]":"%FunctionPrototype%",isView:fn,prototype:"%ArrayBufferPrototype%","@@species":getter,fromString:!1,fromBigInt:!1},"%ArrayBufferPrototype%":{byteLength:getter,constructor:"ArrayBuffer",slice:fn,"@@toStringTag":"string",concat:!1},SharedArrayBuffer:!1,"%SharedArrayBufferPrototype%":!1,DataView:{"[[Proto]]":"%FunctionPrototype%",BYTES_PER_ELEMENT:"number",prototype:"%DataViewPrototype%"},"%DataViewPrototype%":{buffer:getter,byteLength:getter,byteOffset:getter,constructor:"DataView",getBigInt64:fn,getBigUint64:fn,getFloat32:fn,getFloat64:fn,getInt8:fn,getInt16:fn,getInt32:fn,getUint8:fn,getUint16:fn,getUint32:fn,setBigInt64:fn,setBigUint64:fn,setFloat32:fn,setFloat64:fn,setInt8:fn,setInt16:fn,setInt32:fn,setUint8:fn,setUint16:fn,setUint32:fn,"@@toStringTag":"string"},Atomics:!1,JSON:{parse:fn,stringify:fn,"@@toStringTag":"string"},"%IteratorPrototype%":{"@@iterator":fn},"%AsyncIteratorPrototype%":{"@@asyncIterator":fn},"%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:fn,return:fn,throw:fn,"@@toStringTag":"string"},"%AsyncGeneratorPrototype%":{"[[Proto]]":"%AsyncIteratorPrototype%",constructor:"%AsyncGenerator%",next:fn,return:fn,throw:fn,"@@toStringTag":"string"},HandledPromise:{"[[Proto]]":"Promise",applyFunction:fn,applyFunctionSendOnly:fn,applyMethod:fn,applyMethodSendOnly:fn,get:fn,getSendOnly:fn,prototype:"%PromisePrototype%",resolve:fn},Promise:{"[[Proto]]":"%FunctionPrototype%",all:fn,allSettled:fn,any:!1,prototype:"%PromisePrototype%",race:fn,reject:fn,resolve:fn,"@@species":getter},"%PromisePrototype%":{catch:fn,constructor:"Promise",finally:fn,then:fn,"@@toStringTag":"string"},"%InertAsyncFunction%":{"[[Proto]]":"%InertFunction%",prototype:"%AsyncFunctionPrototype%"},"%AsyncFunctionPrototype%":{"[[Proto]]":"%FunctionPrototype%",constructor:"%InertAsyncFunction%","@@toStringTag":"string"},Reflect:{apply:fn,construct:fn,defineProperty:fn,deleteProperty:fn,get:fn,getOwnPropertyDescriptor:fn,getPrototypeOf:fn,has:fn,isExtensible:fn,ownKeys:fn,preventExtensions:fn,set:fn,setPrototypeOf:fn,"@@toStringTag":"string"},Proxy:{"[[Proto]]":"%FunctionPrototype%",revocable:fn},escape:fn,unescape:fn,"%UniqueCompartment%":{"[[Proto]]":"%FunctionPrototype%",prototype:"%CompartmentPrototype%",toString:fn},"%InertCompartment%":{"[[Proto]]":"%FunctionPrototype%",prototype:"%CompartmentPrototype%",toString:fn},"%CompartmentPrototype%":{constructor:"%InertCompartment%",evaluate:fn,globalThis:getter,name:getter,toString:fn,__isKnownScopeProxy__:fn,import:asyncFn,load:asyncFn,importNow:fn,module:fn},lockdown:fn,harden:fn,"%InitialGetStackString%":fn};$h_once.whitelist(whitelist)},({imports:$h_imports,liveVar:$h_live,onceVar:$h_once})=>{let defineProperty,objectHasOwnProperty,entries,makeEvalFunction,makeFunctionConstructor,constantProperties,universalPropertyNames;$h_imports([["./commons.js",[["defineProperty",[$h_a=>defineProperty=$h_a]],["objectHasOwnProperty",[$h_a=>objectHasOwnProperty=$h_a]],["entries",[$h_a=>entries=$h_a]]]],["./make-eval-function.js",[["makeEvalFunction",[$h_a=>makeEvalFunction=$h_a]]]],["./make-function-constructor.js",[["makeFunctionConstructor",[$h_a=>makeFunctionConstructor=$h_a]]]],["./whitelist.js",[["constantProperties",[$h_a=>constantProperties=$h_a]],["universalPropertyNames",[$h_a=>universalPropertyNames=$h_a]]]]]);$h_once.setGlobalObjectConstantProperties(globalObject=>{for(const[name,constant]of entries(constantProperties))defineProperty(globalObject,name,{value:constant,writable:!1,enumerable:!1,configurable:!1})});$h_once.setGlobalObjectMutableProperties((globalObject,{intrinsics:intrinsics,newGlobalPropertyNames:newGlobalPropertyNames,makeCompartmentConstructor:makeCompartmentConstructor,safeEvaluate:safeEvaluate,markVirtualizedNativeFunction:markVirtualizedNativeFunction})=>{for(const[name,intrinsicName]of entries(universalPropertyNames))objectHasOwnProperty(intrinsics,intrinsicName)&&defineProperty(globalObject,name,{value:intrinsics[intrinsicName],writable:!0,enumerable:!1,configurable:!0});for(const[name,intrinsicName]of entries(newGlobalPropertyNames))objectHasOwnProperty(intrinsics,intrinsicName)&&defineProperty(globalObject,name,{value:intrinsics[intrinsicName],writable:!0,enumerable:!1,configurable:!0});const perCompartmentGlobals={globalThis:globalObject,eval:makeEvalFunction(safeEvaluate),Function:makeFunctionConstructor(safeEvaluate)};perCompartmentGlobals.Compartment=makeCompartmentConstructor(makeCompartmentConstructor,intrinsics,markVirtualizedNativeFunction);for(const[name,value]of entries(perCompartmentGlobals))defineProperty(globalObject,name,{value:value,writable:!0,enumerable:!1,configurable:!0}),"function"==typeof value&&markVirtualizedNativeFunction(value)})},({imports:$h_imports,liveVar:$h_live,onceVar:$h_once})=>{let ReferenceError,TypeError,Map,Set,arrayJoin,arrayMap,arrayPush,create,freeze,mapGet,mapHas,mapSet,setAdd,promiseCatch,promiseThen,values,weakmapGet,assert;$h_imports([["./commons.js",[["ReferenceError",[$h_a=>ReferenceError=$h_a]],["TypeError",[$h_a=>TypeError=$h_a]],["Map",[$h_a=>Map=$h_a]],["Set",[$h_a=>Set=$h_a]],["arrayJoin",[$h_a=>arrayJoin=$h_a]],["arrayMap",[$h_a=>arrayMap=$h_a]],["arrayPush",[$h_a=>arrayPush=$h_a]],["create",[$h_a=>create=$h_a]],["freeze",[$h_a=>freeze=$h_a]],["mapGet",[$h_a=>mapGet=$h_a]],["mapHas",[$h_a=>mapHas=$h_a]],["mapSet",[$h_a=>mapSet=$h_a]],["setAdd",[$h_a=>setAdd=$h_a]],["promiseCatch",[$h_a=>promiseCatch=$h_a]],["promiseThen",[$h_a=>promiseThen=$h_a]],["values",[$h_a=>values=$h_a]],["weakmapGet",[$h_a=>weakmapGet=$h_a]]]],["./error/assert.js",[["assert",[$h_a=>assert=$h_a]]]]]);const{details:d,quote:q}=assert,noop=()=>{};$h_once.makeAlias((compartment,specifier)=>freeze({compartment:compartment,specifier:specifier}));const loadRecord=async(compartmentPrivateFields,moduleAliases,compartment,moduleSpecifier,staticModuleRecord,pendingJobs,moduleLoads,errors)=>{const{resolveHook:resolveHook,moduleRecords:moduleRecords}=weakmapGet(compartmentPrivateFields,compartment),resolvedImports=((imports,resolveHook,fullReferrerSpecifier)=>{const resolvedImports=create(null);for(const importSpecifier of imports){const fullSpecifier=resolveHook(importSpecifier,fullReferrerSpecifier);resolvedImports[importSpecifier]=fullSpecifier}return freeze(resolvedImports)})(staticModuleRecord.imports,resolveHook,moduleSpecifier),moduleRecord=freeze({compartment:compartment,staticModuleRecord:staticModuleRecord,moduleSpecifier:moduleSpecifier,resolvedImports:resolvedImports});for(const fullSpecifier of values(resolvedImports)){const dependencyLoaded=memoizedLoadWithErrorAnnotation(compartmentPrivateFields,moduleAliases,compartment,fullSpecifier,pendingJobs,moduleLoads,errors);setAdd(pendingJobs,promiseThen(dependencyLoaded,noop,error=>{arrayPush(errors,error)}))}return mapSet(moduleRecords,moduleSpecifier,moduleRecord),moduleRecord},memoizedLoadWithErrorAnnotation=async(compartmentPrivateFields,moduleAliases,compartment,moduleSpecifier,pendingJobs,moduleLoads,errors)=>{const{name:compartmentName}=weakmapGet(compartmentPrivateFields,compartment);let compartmentLoading=mapGet(moduleLoads,compartment);void 0===compartmentLoading&&(compartmentLoading=new Map,mapSet(moduleLoads,compartment,compartmentLoading));let moduleLoading=mapGet(compartmentLoading,moduleSpecifier);return void 0!==moduleLoading||(moduleLoading=promiseCatch((async(compartmentPrivateFields,moduleAliases,compartment,moduleSpecifier,pendingJobs,moduleLoads,errors)=>{const{importHook:importHook,moduleMap:moduleMap,moduleMapHook:moduleMapHook,moduleRecords:moduleRecords}=weakmapGet(compartmentPrivateFields,compartment);let aliasNamespace=moduleMap[moduleSpecifier];if(void 0===aliasNamespace&&void 0!==moduleMapHook&&(aliasNamespace=moduleMapHook(moduleSpecifier)),"string"==typeof aliasNamespace)assert.fail(d`Cannot map module ${q(moduleSpecifier)} to ${q(aliasNamespace)} in parent compartment, not yet implemented`,TypeError);else if(void 0!==aliasNamespace){const alias=weakmapGet(moduleAliases,aliasNamespace);void 0===alias&&assert.fail(d`Cannot map module ${q(moduleSpecifier)} because the value is not a module exports namespace, or is from another realm`,ReferenceError);const aliasRecord=await memoizedLoadWithErrorAnnotation(compartmentPrivateFields,moduleAliases,alias.compartment,alias.specifier,pendingJobs,moduleLoads,errors);return mapSet(moduleRecords,moduleSpecifier,aliasRecord),aliasRecord}if(mapHas(moduleRecords,moduleSpecifier))return mapGet(moduleRecords,moduleSpecifier);const staticModuleRecord=await importHook(moduleSpecifier);if(null!==staticModuleRecord&&"object"==typeof staticModuleRecord||assert.fail(d`importHook must return a promise for an object, for module ${q(moduleSpecifier)} in compartment ${q(compartment.name)}`),void 0!==staticModuleRecord.record){const{compartment:aliasCompartment=compartment,specifier:aliasSpecifier=moduleSpecifier,record:aliasModuleRecord}=staticModuleRecord,aliasRecord=await loadRecord(compartmentPrivateFields,moduleAliases,aliasCompartment,aliasSpecifier,aliasModuleRecord,pendingJobs,moduleLoads,errors);return mapSet(moduleRecords,moduleSpecifier,aliasRecord),aliasRecord}return loadRecord(compartmentPrivateFields,moduleAliases,compartment,moduleSpecifier,staticModuleRecord,pendingJobs,moduleLoads,errors)})(compartmentPrivateFields,moduleAliases,compartment,moduleSpecifier,pendingJobs,moduleLoads,errors),error=>{throw assert.note(error,d`${error.message}, loading ${q(moduleSpecifier)} in compartment ${q(compartmentName)}`),error}),mapSet(compartmentLoading,moduleSpecifier,moduleLoading)),moduleLoading};$h_once.load(async(compartmentPrivateFields,moduleAliases,compartment,moduleSpecifier)=>{const{name:compartmentName}=weakmapGet(compartmentPrivateFields,compartment),pendingJobs=new Set,moduleLoads=new Map,errors=[],dependencyLoaded=memoizedLoadWithErrorAnnotation(compartmentPrivateFields,moduleAliases,compartment,moduleSpecifier,pendingJobs,moduleLoads,errors);setAdd(pendingJobs,promiseThen(dependencyLoaded,noop,error=>{arrayPush(errors,error)}));for(const job of pendingJobs)await job;if(errors.length>0)throw new TypeError(`Failed to load module ${q(moduleSpecifier)} in package ${q(compartmentName)} (${errors.length} underlying failures: ${arrayJoin(arrayMap(errors,error=>error.message),", ")}`)})},({imports:$h_imports,liveVar:$h_live,onceVar:$h_once})=>{let makeAlias,Proxy,TypeError,create,freeze,mapGet,mapHas,mapSet,ownKeys,reflectGet,reflectGetOwnPropertyDescriptor,reflectHas,reflectIsExtensible,reflectPreventExtensions,weakmapSet,assert;$h_imports([["./module-load.js",[["makeAlias",[$h_a=>makeAlias=$h_a]]]],["./commons.js",[["Proxy",[$h_a=>Proxy=$h_a]],["TypeError",[$h_a=>TypeError=$h_a]],["create",[$h_a=>create=$h_a]],["freeze",[$h_a=>freeze=$h_a]],["mapGet",[$h_a=>mapGet=$h_a]],["mapHas",[$h_a=>mapHas=$h_a]],["mapSet",[$h_a=>mapSet=$h_a]],["ownKeys",[$h_a=>ownKeys=$h_a]],["reflectGet",[$h_a=>reflectGet=$h_a]],["reflectGetOwnPropertyDescriptor",[$h_a=>reflectGetOwnPropertyDescriptor=$h_a]],["reflectHas",[$h_a=>reflectHas=$h_a]],["reflectIsExtensible",[$h_a=>reflectIsExtensible=$h_a]],["reflectPreventExtensions",[$h_a=>reflectPreventExtensions=$h_a]],["weakmapSet",[$h_a=>weakmapSet=$h_a]]]],["./error/assert.js",[["assert",[$h_a=>assert=$h_a]]]]]);const{quote:q}=assert,deferExports=()=>{let active=!1;const proxiedExports=create(null);return freeze({activate(){active=!0},proxiedExports:proxiedExports,exportsProxy:new Proxy(proxiedExports,{get(_target,name,receiver){if(!active)throw new TypeError(`Cannot get property ${q(name)} of module exports namespace, the module has not yet begun to execute`);return reflectGet(proxiedExports,name,receiver)},set(_target,name,_value){throw new TypeError(`Cannot set property ${q(name)} of module exports namespace`)},has(_target,name){if(!active)throw new TypeError(`Cannot check property ${q(name)}, the module has not yet begun to execute`);return reflectHas(proxiedExports,name)},deleteProperty(_target,name){throw new TypeError(`Cannot delete property ${q(name)}s of module exports namespace`)},ownKeys(_target){if(!active)throw new TypeError("Cannot enumerate keys, the module has not yet begun to execute");return ownKeys(proxiedExports)},getOwnPropertyDescriptor(_target,name){if(!active)throw new TypeError(`Cannot get own property descriptor ${q(name)}, the module has not yet begun to execute`);return reflectGetOwnPropertyDescriptor(proxiedExports,name)},preventExtensions(_target){if(!active)throw new TypeError("Cannot prevent extensions of module exports namespace, the module has not yet begun to execute");return reflectPreventExtensions(proxiedExports)},isExtensible(){if(!active)throw new TypeError("Cannot check extensibility of module exports namespace, the module has not yet begun to execute");return reflectIsExtensible(proxiedExports)},getPrototypeOf:_target=>null,setPrototypeOf(_target,_proto){throw new TypeError("Cannot set prototype of module exports namespace")},defineProperty(_target,name,_descriptor){throw new TypeError(`Cannot define property ${q(name)} of module exports namespace`)},apply(_target,_thisArg,_args){throw new TypeError("Cannot call module exports namespace, it is not a function")},construct(_target,_args){throw new TypeError("Cannot construct module exports namespace, it is not a constructor")}})})};$h_once.deferExports(deferExports);$h_once.getDeferredExports((compartment,compartmentPrivateFields,moduleAliases,specifier)=>{const{deferredExports:deferredExports}=compartmentPrivateFields;if(!mapHas(deferredExports,specifier)){const deferred=deferExports();weakmapSet(moduleAliases,deferred.exportsProxy,makeAlias(compartment,specifier)),mapSet(deferredExports,specifier,deferred)}return mapGet(deferredExports,specifier)})},({imports:$h_imports,liveVar:$h_live,onceVar:$h_once})=>{let assert,getDeferredExports,ReferenceError,SyntaxError,TypeError,arrayForEach,arrayIncludes,arrayPush,arraySome,arraySort,create,defineProperty,entries,freeze,isArray,keys,mapGet,weakmapGet,compartmentEvaluate;$h_imports([["./error/assert.js",[["assert",[$h_a=>assert=$h_a]]]],["./module-proxy.js",[["getDeferredExports",[$h_a=>getDeferredExports=$h_a]]]],["./commons.js",[["ReferenceError",[$h_a=>ReferenceError=$h_a]],["SyntaxError",[$h_a=>SyntaxError=$h_a]],["TypeError",[$h_a=>TypeError=$h_a]],["arrayForEach",[$h_a=>arrayForEach=$h_a]],["arrayIncludes",[$h_a=>arrayIncludes=$h_a]],["arrayPush",[$h_a=>arrayPush=$h_a]],["arraySome",[$h_a=>arraySome=$h_a]],["arraySort",[$h_a=>arraySort=$h_a]],["create",[$h_a=>create=$h_a]],["defineProperty",[$h_a=>defineProperty=$h_a]],["entries",[$h_a=>entries=$h_a]],["freeze",[$h_a=>freeze=$h_a]],["isArray",[$h_a=>isArray=$h_a]],["keys",[$h_a=>keys=$h_a]],["mapGet",[$h_a=>mapGet=$h_a]],["weakmapGet",[$h_a=>weakmapGet=$h_a]]]],["./compartment-evaluate.js",[["compartmentEvaluate",[$h_a=>compartmentEvaluate=$h_a]]]]]);const{quote:q}=assert;$h_once.makeThirdPartyModuleInstance((compartmentPrivateFields,staticModuleRecord,compartment,moduleAliases,moduleSpecifier,resolvedImports)=>{const{exportsProxy:exportsProxy,proxiedExports:proxiedExports,activate:activate}=getDeferredExports(compartment,weakmapGet(compartmentPrivateFields,compartment),moduleAliases,moduleSpecifier),notifiers=create(null);if(staticModuleRecord.exports){if(!isArray(staticModuleRecord.exports)||arraySome(staticModuleRecord.exports,name=>"string"!=typeof name))throw new TypeError('SES third-party static module record "exports" property must be an array of strings for module '+moduleSpecifier);arrayForEach(staticModuleRecord.exports,name=>{let value=proxiedExports[name];const updaters=[];defineProperty(proxiedExports,name,{get:()=>value,set:newValue=>{value=newValue;for(const updater of updaters)updater(newValue)},enumerable:!0,configurable:!1}),notifiers[name]=update=>{arrayPush(updaters,update),update(value)}})}let activated=!1;return freeze({notifiers:notifiers,exportsProxy:exportsProxy,execute(){activated||(activate(),activated=!0,staticModuleRecord.execute(proxiedExports,compartment,resolvedImports))}})});$h_once.makeModuleInstance((privateFields,moduleAliases,moduleRecord,importedInstances)=>{const{compartment:compartment,moduleSpecifier:moduleSpecifier,staticModuleRecord:staticModuleRecord}=moduleRecord,{reexports:exportAlls=[],__syncModuleProgram__:functorSource,__fixedExportMap__:fixedExportMap={},__liveExportMap__:liveExportMap={}}=staticModuleRecord,compartmentFields=weakmapGet(privateFields,compartment),{__shimTransforms__:__shimTransforms__}=compartmentFields,{exportsProxy:exportsProxy,proxiedExports:proxiedExports,activate:activate}=getDeferredExports(compartment,compartmentFields,moduleAliases,moduleSpecifier),exportsProps=create(null),localLexicals=create(null),onceVar=create(null),liveVar=create(null),localGetNotify=create(null),notifiers=create(null);arrayForEach(entries(fixedExportMap),([fixedExportName,[localName]])=>{let fixedGetNotify=localGetNotify[localName];if(!fixedGetNotify){let value,tdz=!0,optUpdaters=[];const get=()=>{if(tdz)throw new ReferenceError(`binding ${q(localName)} not yet initialized`);return value},init=freeze(initValue=>{if(!tdz)throw new TypeError(`Internal: binding ${q(localName)} already initialized`);value=initValue;const updaters=optUpdaters;optUpdaters=null,tdz=!1;for(const updater of updaters)updater(initValue);return initValue});fixedGetNotify={get:get,notify:updater=>{updater!==init&&(tdz?arrayPush(optUpdaters,updater):updater(value))}},localGetNotify[localName]=fixedGetNotify,onceVar[localName]=init}exportsProps[fixedExportName]={get:fixedGetNotify.get,set:void 0,enumerable:!0,configurable:!1},notifiers[fixedExportName]=fixedGetNotify.notify}),arrayForEach(entries(liveExportMap),([liveExportName,[localName,setProxyTrap]])=>{let liveGetNotify=localGetNotify[localName];if(!liveGetNotify){let value,tdz=!0;const updaters=[],get=()=>{if(tdz)throw new ReferenceError(`binding ${q(liveExportName)} not yet initialized`);return value},update=freeze(newValue=>{value=newValue,tdz=!1;for(const updater of updaters)updater(newValue)}),set=newValue=>{if(tdz)throw new ReferenceError(`binding ${q(localName)} not yet initialized`);value=newValue;for(const updater of updaters)updater(newValue)};liveGetNotify={get:get,notify:updater=>{updater!==update&&(arrayPush(updaters,updater),tdz||updater(value))}},localGetNotify[localName]=liveGetNotify,setProxyTrap&&defineProperty(localLexicals,localName,{get:get,set:set,enumerable:!0,configurable:!1}),liveVar[localName]=update}exportsProps[liveExportName]={get:liveGetNotify.get,set:void 0,enumerable:!0,configurable:!1},notifiers[liveExportName]=liveGetNotify.notify});function imports(updateRecord){const candidateAll=create(null);candidateAll.default=!1;for(const[specifier,importUpdaters]of updateRecord){const instance=mapGet(importedInstances,specifier);instance.execute();const{notifiers:importNotifiers}=instance;for(const[importName,updaters]of importUpdaters){const importNotify=importNotifiers[importName];if(!importNotify)throw SyntaxError(`The requested module '${specifier}' does not provide an export named '${importName}'`);for(const updater of updaters)importNotify(updater)}if(arrayIncludes(exportAlls,specifier))for(const[importName,importNotify]of entries(importNotifiers))void 0===candidateAll[importName]?candidateAll[importName]=importNotify:candidateAll[importName]=!1}for(const[importName,notify]of entries(candidateAll))if(!notifiers[importName]&&!1!==notify){let value;notifiers[importName]=notify;notify(newValue=>value=newValue),exportsProps[importName]={get:()=>value,set:void 0,enumerable:!0,configurable:!1}}arrayForEach(arraySort(keys(exportsProps)),k=>defineProperty(proxiedExports,k,exportsProps[k])),freeze(proxiedExports),activate()}notifiers["*"]=update=>{update(proxiedExports)};let thrownError,optFunctor=compartmentEvaluate(compartmentFields,functorSource,{globalObject:compartment.globalThis,transforms:__shimTransforms__,__moduleShimLexicals__:localLexicals}),didThrow=!1;return freeze({notifiers:notifiers,exportsProxy:exportsProxy,execute:function(){if(optFunctor){const functor=optFunctor;optFunctor=null;try{functor(freeze({imports:freeze(imports),onceVar:freeze(onceVar),liveVar:freeze(liveVar)}))}catch(e){didThrow=!0,thrownError=e}}if(didThrow)throw thrownError}})})},({imports:$h_imports,liveVar:$h_live,onceVar:$h_once})=>{let assert,makeModuleInstance,makeThirdPartyModuleInstance,Map,ReferenceError,TypeError,entries,isArray,isObject,mapGet,mapHas,mapSet,weakmapGet;$h_imports([["./error/assert.js",[["assert",[$h_a=>assert=$h_a]]]],["./module-instance.js",[["makeModuleInstance",[$h_a=>makeModuleInstance=$h_a]],["makeThirdPartyModuleInstance",[$h_a=>makeThirdPartyModuleInstance=$h_a]]]],["./commons.js",[["Map",[$h_a=>Map=$h_a]],["ReferenceError",[$h_a=>ReferenceError=$h_a]],["TypeError",[$h_a=>TypeError=$h_a]],["entries",[$h_a=>entries=$h_a]],["isArray",[$h_a=>isArray=$h_a]],["isObject",[$h_a=>isObject=$h_a]],["mapGet",[$h_a=>mapGet=$h_a]],["mapHas",[$h_a=>mapHas=$h_a]],["mapSet",[$h_a=>mapSet=$h_a]],["weakmapGet",[$h_a=>weakmapGet=$h_a]]]]]);const{quote:q}=assert,link=(compartmentPrivateFields,moduleAliases,compartment,moduleSpecifier)=>{const{name:compartmentName,moduleRecords:moduleRecords}=weakmapGet(compartmentPrivateFields,compartment),moduleRecord=mapGet(moduleRecords,moduleSpecifier);if(void 0===moduleRecord)throw new ReferenceError(`Missing link to module ${q(moduleSpecifier)} from compartment ${q(compartmentName)}`);return instantiate(compartmentPrivateFields,moduleAliases,moduleRecord)};$h_once.link(link);const instantiate=(compartmentPrivateFields,moduleAliases,moduleRecord)=>{const{compartment:compartment,moduleSpecifier:moduleSpecifier,resolvedImports:resolvedImports,staticModuleRecord:staticModuleRecord}=moduleRecord,{instances:instances}=weakmapGet(compartmentPrivateFields,compartment);if(mapHas(instances,moduleSpecifier))return mapGet(instances,moduleSpecifier);!function(staticModuleRecord,moduleSpecifier){assert(isObject(staticModuleRecord),`Static module records must be of type object, got ${q(staticModuleRecord)}, for module ${q(moduleSpecifier)}`);const{imports:imports,exports:exports,reexports:reexports=[]}=staticModuleRecord;assert(isArray(imports),`Property 'imports' of a static module record must be an array, got ${q(imports)}, for module ${q(moduleSpecifier)}`),assert(isArray(exports),`Property 'exports' of a precompiled module record must be an array, got ${q(exports)}, for module ${q(moduleSpecifier)}`),assert(isArray(reexports),`Property 'reexports' of a precompiled module record must be an array if present, got ${q(reexports)}, for module ${q(moduleSpecifier)}`)}(staticModuleRecord,moduleSpecifier);const importedInstances=new Map;let moduleInstance;if(function(staticModuleRecord){return"string"==typeof staticModuleRecord.__syncModuleProgram__}(staticModuleRecord))!function(staticModuleRecord,moduleSpecifier){const{__fixedExportMap__:__fixedExportMap__,__liveExportMap__:__liveExportMap__}=staticModuleRecord;assert(isObject(__fixedExportMap__),`Property '__fixedExportMap__' of a precompiled module record must be an object, got ${q(__fixedExportMap__)}, for module ${q(moduleSpecifier)}`),assert(isObject(__liveExportMap__),`Property '__liveExportMap__' of a precompiled module record must be an object, got ${q(__liveExportMap__)}, for module ${q(moduleSpecifier)}`)}(staticModuleRecord,moduleSpecifier),moduleInstance=makeModuleInstance(compartmentPrivateFields,moduleAliases,moduleRecord,importedInstances);else{if(!function(staticModuleRecord){return"function"==typeof staticModuleRecord.execute}(staticModuleRecord))throw new TypeError("importHook must return a static module record, got "+q(staticModuleRecord));!function(staticModuleRecord,moduleSpecifier){const{exports:exports}=staticModuleRecord;assert(isArray(exports),`Property 'exports' of a third-party static module record must be an array, got ${q(exports)}, for module ${q(moduleSpecifier)}`)}(staticModuleRecord,moduleSpecifier),moduleInstance=makeThirdPartyModuleInstance(compartmentPrivateFields,staticModuleRecord,compartment,moduleAliases,moduleSpecifier,resolvedImports)}mapSet(instances,moduleSpecifier,moduleInstance);for(const[importSpecifier,resolvedSpecifier]of entries(resolvedImports)){const importedInstance=link(compartmentPrivateFields,moduleAliases,compartment,resolvedSpecifier);mapSet(importedInstances,importSpecifier,importedInstance)}return moduleInstance};$h_once.instantiate(instantiate)},({imports:$h_imports,liveVar:$h_live,onceVar:$h_once})=>{let Map,ReferenceError,TypeError,WeakMap,WeakSet,arrayFilter,arrayJoin,assign,defineProperties,entries,freeze,getOwnPropertyNames,promiseThen,weakmapGet,weakmapSet,weaksetHas,setGlobalObjectConstantProperties,setGlobalObjectMutableProperties,isValidIdentifierName,sharedGlobalPropertyNames,load,link,getDeferredExports,assert,compartmentEvaluate,makeSafeEvaluator;$h_imports([["./commons.js",[["Map",[$h_a=>Map=$h_a]],["ReferenceError",[$h_a=>ReferenceError=$h_a]],["TypeError",[$h_a=>TypeError=$h_a]],["WeakMap",[$h_a=>WeakMap=$h_a]],["WeakSet",[$h_a=>WeakSet=$h_a]],["arrayFilter",[$h_a=>arrayFilter=$h_a]],["arrayJoin",[$h_a=>arrayJoin=$h_a]],["assign",[$h_a=>assign=$h_a]],["defineProperties",[$h_a=>defineProperties=$h_a]],["entries",[$h_a=>entries=$h_a]],["freeze",[$h_a=>freeze=$h_a]],["getOwnPropertyNames",[$h_a=>getOwnPropertyNames=$h_a]],["promiseThen",[$h_a=>promiseThen=$h_a]],["weakmapGet",[$h_a=>weakmapGet=$h_a]],["weakmapSet",[$h_a=>weakmapSet=$h_a]],["weaksetHas",[$h_a=>weaksetHas=$h_a]]]],["./global-object.js",[["setGlobalObjectConstantProperties",[$h_a=>setGlobalObjectConstantProperties=$h_a]],["setGlobalObjectMutableProperties",[$h_a=>setGlobalObjectMutableProperties=$h_a]]]],["./scope-constants.js",[["isValidIdentifierName",[$h_a=>isValidIdentifierName=$h_a]]]],["./whitelist.js",[["sharedGlobalPropertyNames",[$h_a=>sharedGlobalPropertyNames=$h_a]]]],["./module-load.js",[["load",[$h_a=>load=$h_a]]]],["./module-link.js",[["link",[$h_a=>link=$h_a]]]],["./module-proxy.js",[["getDeferredExports",[$h_a=>getDeferredExports=$h_a]]]],["./error/assert.js",[["assert",[$h_a=>assert=$h_a]]]],["./compartment-evaluate.js",[["compartmentEvaluate",[$h_a=>compartmentEvaluate=$h_a]]]],["./make-safe-evaluator.js",[["makeSafeEvaluator",[$h_a=>makeSafeEvaluator=$h_a]]]]]);const{quote:q}=assert,moduleAliases=new WeakMap,privateFields=new WeakMap,assertModuleHooks=compartment=>{const{importHook:importHook,resolveHook:resolveHook}=weakmapGet(privateFields,compartment);if("function"!=typeof importHook||"function"!=typeof resolveHook)throw new TypeError("Compartment must be constructed with an importHook and a resolveHook for it to be able to load modules")},InertCompartment=function(_endowments={},_modules={},_options={}){throw new TypeError("Compartment.prototype.constructor is not a valid constructor.")};$h_once.InertCompartment(InertCompartment);const compartmentImportNow=(compartment,specifier)=>{const{execute:execute,exportsProxy:exportsProxy}=link(privateFields,moduleAliases,compartment,specifier);return execute(),exportsProxy},CompartmentPrototype={constructor:InertCompartment,get globalThis(){return weakmapGet(privateFields,this).globalObject},get name(){return weakmapGet(privateFields,this).name},evaluate(source,options={}){const compartmentFields=weakmapGet(privateFields,this);return compartmentEvaluate(compartmentFields,source,options)},toString:()=>"[object Compartment]",__isKnownScopeProxy__(value){const{knownScopeProxies:knownScopeProxies}=weakmapGet(privateFields,this);return weaksetHas(knownScopeProxies,value)},module(specifier){if("string"!=typeof specifier)throw new TypeError("first argument of module() must be a string");assertModuleHooks(this);const{exportsProxy:exportsProxy}=getDeferredExports(this,weakmapGet(privateFields,this),moduleAliases,specifier);return exportsProxy},async import(specifier){if("string"!=typeof specifier)throw new TypeError("first argument of import() must be a string");return assertModuleHooks(this),promiseThen(load(privateFields,moduleAliases,this,specifier),()=>({namespace:compartmentImportNow(this,specifier)}))},async load(specifier){if("string"!=typeof specifier)throw new TypeError("first argument of load() must be a string");return assertModuleHooks(this),load(privateFields,moduleAliases,this,specifier)},importNow(specifier){if("string"!=typeof specifier)throw new TypeError("first argument of importNow() must be a string");return assertModuleHooks(this),compartmentImportNow(this,specifier)}};$h_once.CompartmentPrototype(CompartmentPrototype),defineProperties(InertCompartment,{prototype:{value:CompartmentPrototype}});$h_once.makeCompartmentConstructor((targetMakeCompartmentConstructor,intrinsics,markVirtualizedNativeFunction)=>{function Compartment(endowments={},moduleMap={},options={}){if(void 0===new.target)throw new TypeError("Class constructor Compartment cannot be invoked without 'new'");const{name:name="<unknown>",transforms:transforms=[],__shimTransforms__:__shimTransforms__=[],globalLexicals:globalLexicalsOption={},resolveHook:resolveHook,importHook:importHook,moduleMapHook:moduleMapHook}=options,globalTransforms=[...transforms,...__shimTransforms__],moduleRecords=new Map,instances=new Map,deferredExports=new Map;for(const[specifier,aliasNamespace]of entries(moduleMap||{})){if("string"==typeof aliasNamespace)throw new TypeError(`Cannot map module ${q(specifier)} to ${q(aliasNamespace)} in parent compartment`);if(void 0===weakmapGet(moduleAliases,aliasNamespace))throw ReferenceError(`Cannot map module ${q(specifier)} because it has no known compartment in this realm`)}const invalidNames=arrayFilter(getOwnPropertyNames(globalLexicalsOption),identifier=>!isValidIdentifierName(identifier));if(invalidNames.length)throw new TypeError(`Cannot create compartment with invalid names for global lexicals: ${arrayJoin(invalidNames,", ")}; these names would not be lexically mentionable`);const globalLexicals=freeze({...globalLexicalsOption}),globalObject={};setGlobalObjectConstantProperties(globalObject);const knownScopeProxies=new WeakSet,{safeEvaluate:safeEvaluate}=makeSafeEvaluator({globalObject:globalObject,localObject:globalLexicals,globalTransforms:globalTransforms,sloppyGlobalsMode:!1,knownScopeProxies:knownScopeProxies});setGlobalObjectMutableProperties(globalObject,{intrinsics:intrinsics,newGlobalPropertyNames:sharedGlobalPropertyNames,makeCompartmentConstructor:targetMakeCompartmentConstructor,safeEvaluate:safeEvaluate,markVirtualizedNativeFunction:markVirtualizedNativeFunction}),assign(globalObject,endowments),weakmapSet(privateFields,this,{name:name,globalTransforms:globalTransforms,globalObject:globalObject,knownScopeProxies:knownScopeProxies,globalLexicals:globalLexicals,safeEvaluate:safeEvaluate,resolveHook:resolveHook,importHook:importHook,moduleMap:moduleMap,moduleMapHook:moduleMapHook,moduleRecords:moduleRecords,__shimTransforms__:__shimTransforms__,deferredExports:deferredExports,instances:instances})}return Compartment.prototype=CompartmentPrototype,Compartment})},({imports:$h_imports,liveVar:$h_live,onceVar:$h_once})=>{let FERAL_FUNCTION,Float32Array,Map,Set,String,getOwnPropertyDescriptor,getPrototypeOf,iterateArray,iterateMap,iterateSet,iterateString,matchAllRegExp,matchAllSymbol,regexpPrototype,InertCompartment;function getConstructorOf(obj){return getPrototypeOf(obj).constructor}$h_imports([["./commons.js",[["FERAL_FUNCTION",[$h_a=>FERAL_FUNCTION=$h_a]],["Float32Array",[$h_a=>Float32Array=$h_a]],["Map",[$h_a=>Map=$h_a]],["Set",[$h_a=>Set=$h_a]],["String",[$h_a=>String=$h_a]],["getOwnPropertyDescriptor",[$h_a=>getOwnPropertyDescriptor=$h_a]],["getPrototypeOf",[$h_a=>getPrototypeOf=$h_a]],["iterateArray",[$h_a=>iterateArray=$h_a]],["iterateMap",[$h_a=>iterateMap=$h_a]],["iterateSet",[$h_a=>iterateSet=$h_a]],["iterateString",[$h_a=>iterateString=$h_a]],["matchAllRegExp",[$h_a=>matchAllRegExp=$h_a]],["matchAllSymbol",[$h_a=>matchAllSymbol=$h_a]],["regexpPrototype",[$h_a=>regexpPrototype=$h_a]]]],["./compartment-shim.js",[["InertCompartment",[$h_a=>InertCompartment=$h_a]]]]]);$h_once.getAnonymousIntrinsics(()=>{const InertFunction=FERAL_FUNCTION.prototype.constructor,ThrowTypeError=getOwnPropertyDescriptor(function(){return arguments}(),"callee").get,StringIteratorObject=iterateString(new String),StringIteratorPrototype=getPrototypeOf(StringIteratorObject),RegExpStringIterator=regexpPrototype[matchAllSymbol]&&matchAllRegExp(/./),RegExpStringIteratorPrototype=RegExpStringIterator&&getPrototypeOf(RegExpStringIterator),ArrayIteratorObject=iterateArray([]),ArrayIteratorPrototype=getPrototypeOf(ArrayIteratorObject),TypedArray=getPrototypeOf(Float32Array),MapIteratorObject=iterateMap(new Map),MapIteratorPrototype=getPrototypeOf(MapIteratorObject),SetIteratorObject=iterateSet(new Set),SetIteratorPrototype=getPrototypeOf(SetIteratorObject),IteratorPrototype=getPrototypeOf(ArrayIteratorPrototype);const GeneratorFunction=getConstructorOf((function*(){})),Generator=GeneratorFunction.prototype;const AsyncGeneratorFunction=getConstructorOf((async function*(){})),AsyncGenerator=AsyncGeneratorFunction.prototype,AsyncGeneratorPrototype=AsyncGenerator.prototype,AsyncIteratorPrototype=getPrototypeOf(AsyncGeneratorPrototype);return{"%InertFunction%":InertFunction,"%ArrayIteratorPrototype%":ArrayIteratorPrototype,"%InertAsyncFunction%":getConstructorOf((async function(){})),"%AsyncGenerator%":AsyncGenerator,"%InertAsyncGeneratorFunction%":AsyncGeneratorFunction,"%AsyncGeneratorPrototype%":AsyncGeneratorPrototype,"%AsyncIteratorPrototype%":AsyncIteratorPrototype,"%Generator%":Generator,"%InertGeneratorFunction%":GeneratorFunction,"%IteratorPrototype%":IteratorPrototype,"%MapIteratorPrototype%":MapIteratorPrototype,"%RegExpStringIteratorPrototype%":RegExpStringIteratorPrototype,"%SetIteratorPrototype%":SetIteratorPrototype,"%StringIteratorPrototype%":StringIteratorPrototype,"%ThrowTypeError%":ThrowTypeError,"%TypedArray%":TypedArray,"%InertCompartment%":InertCompartment}})},({imports:$h_imports,liveVar:$h_live,onceVar:$h_once})=>{let TypeError,WeakSet,arrayFilter,defineProperty,entries,freeze,getOwnPropertyDescriptor,getOwnPropertyDescriptors,globalThis,is,isObject,objectHasOwnProperty,values,weaksetHas,constantProperties,sharedGlobalPropertyNames,universalPropertyNames,whitelist;$h_imports([["./commons.js",[["TypeError",[$h_a=>TypeError=$h_a]],["WeakSet",[$h_a=>WeakSet=$h_a]],["arrayFilter",[$h_a=>arrayFilter=$h_a]],["defineProperty",[$h_a=>defineProperty=$h_a]],["entries",[$h_a=>entries=$h_a]],["freeze",[$h_a=>freeze=$h_a]],["getOwnPropertyDescriptor",[$h_a=>getOwnPropertyDescriptor=$h_a]],["getOwnPropertyDescriptors",[$h_a=>getOwnPropertyDescriptors=$h_a]],["globalThis",[$h_a=>globalThis=$h_a]],["is",[$h_a=>is=$h_a]],["isObject",[$h_a=>isObject=$h_a]],["objectHasOwnProperty",[$h_a=>objectHasOwnProperty=$h_a]],["values",[$h_a=>values=$h_a]],["weaksetHas",[$h_a=>weaksetHas=$h_a]]]],["./whitelist.js",[["constantProperties",[$h_a=>constantProperties=$h_a]],["sharedGlobalPropertyNames",[$h_a=>sharedGlobalPropertyNames=$h_a]],["universalPropertyNames",[$h_a=>universalPropertyNames=$h_a]],["whitelist",[$h_a=>whitelist=$h_a]]]]]);const isFunction=obj=>"function"==typeof obj;function initProperty(obj,name,desc){if(objectHasOwnProperty(obj,name)){const preDesc=getOwnPropertyDescriptor(obj,name);if(!is(preDesc.value,desc.value)||preDesc.get!==desc.get||preDesc.set!==desc.set||preDesc.writable!==desc.writable||preDesc.enumerable!==desc.enumerable||preDesc.configurable!==desc.configurable)throw new TypeError("Conflicting definitions of "+name)}defineProperty(obj,name,desc)}function sampleGlobals(globalObject,newPropertyNames){const newIntrinsics={__proto__:null};for(const[globalName,intrinsicName]of entries(newPropertyNames))objectHasOwnProperty(globalObject,globalName)&&(newIntrinsics[intrinsicName]=globalObject[globalName]);return newIntrinsics}const makeIntrinsicsCollector=()=>{const intrinsics={__proto__:null};let pseudoNatives;const addIntrinsics=newIntrinsics=>{!function(obj,descs){for(const[name,desc]of entries(descs))initProperty(obj,name,desc)}(intrinsics,getOwnPropertyDescriptors(newIntrinsics))};freeze(addIntrinsics);const completePrototypes=()=>{for(const[name,intrinsic]of entries(intrinsics)){if(!isObject(intrinsic))continue;if(!objectHasOwnProperty(intrinsic,"prototype"))continue;const permit=whitelist[name];if("object"!=typeof permit)throw new TypeError("Expected permit object at whitelist."+name);const namePrototype=permit.prototype;if(!namePrototype)throw new TypeError(name+".prototype property not whitelisted");if("string"!=typeof namePrototype||!objectHasOwnProperty(whitelist,namePrototype))throw new TypeError(`Unrecognized ${name}.prototype whitelist entry`);const intrinsicPrototype=intrinsic.prototype;if(objectHasOwnProperty(intrinsics,namePrototype)){if(intrinsics[namePrototype]!==intrinsicPrototype)throw new TypeError("Conflicting bindings of "+namePrototype)}else intrinsics[namePrototype]=intrinsicPrototype}};freeze(completePrototypes);const finalIntrinsics=()=>(freeze(intrinsics),pseudoNatives=new WeakSet(arrayFilter(values(intrinsics),isFunction)),intrinsics);freeze(finalIntrinsics);const isPseudoNative=obj=>{if(!pseudoNatives)throw new TypeError("isPseudoNative can only be called after finalIntrinsics");return weaksetHas(pseudoNatives,obj)};freeze(isPseudoNative);const intrinsicsCollector={addIntrinsics:addIntrinsics,completePrototypes:completePrototypes,finalIntrinsics:finalIntrinsics,isPseudoNative:isPseudoNative};return freeze(intrinsicsCollector),addIntrinsics(constantProperties),addIntrinsics(sampleGlobals(globalThis,universalPropertyNames)),intrinsicsCollector};$h_once.makeIntrinsicsCollector(makeIntrinsicsCollector);$h_once.getGlobalIntrinsics(globalObject=>{const{addIntrinsics:addIntrinsics,finalIntrinsics:finalIntrinsics}=makeIntrinsicsCollector();return addIntrinsics(sampleGlobals(globalObject,sharedGlobalPropertyNames)),finalIntrinsics()})},({imports:$h_imports,liveVar:$h_live,onceVar:$h_once})=>{$h_imports([]);$h_once.minEnablements({"%ObjectPrototype%":{toString:!0},"%FunctionPrototype%":{toString:!0},"%ErrorPrototype%":{name:!0}});const moderateEnablements={"%ObjectPrototype%":{toString:!0,valueOf:!0},"%ArrayPrototype%":{toString:!0,push:!0},"%FunctionPrototype%":{constructor:!0,bind:!0,toString:!0},"%ErrorPrototype%":{constructor:!0,message:!0,name:!0,toString:!0},"%TypeErrorPrototype%":{constructor:!0,message:!0,name:!0},"%SyntaxErrorPrototype%":{message:!0,name:!0},"%RangeErrorPrototype%":{message:!0,name:!0},"%URIErrorPrototype%":{message:!0,name:!0},"%EvalErrorPrototype%":{message:!0,name:!0},"%ReferenceErrorPrototype%":{message:!0,name:!0},"%PromisePrototype%":{constructor:!0},"%TypedArrayPrototype%":"*","%Generator%":{constructor:!0,name:!0,toString:!0},"%IteratorPrototype%":{toString:!0}};$h_once.moderateEnablements(moderateEnablements);const severeEnablements={...moderateEnablements,"%ObjectPrototype%":"*","%TypedArrayPrototype%":"*"};$h_once.severeEnablements(severeEnablements)},({imports:$h_imports,liveVar:$h_live,onceVar:$h_once})=>{let Set,String,TypeError,arrayForEach,defineProperty,getOwnPropertyDescriptor,getOwnPropertyDescriptors,getOwnPropertyNames,isObject,objectHasOwnProperty,ownKeys,setHas,minEnablements,moderateEnablements,severeEnablements;$h_imports([["./commons.js",[["Set",[$h_a=>Set=$h_a]],["String",[$h_a=>String=$h_a]],["TypeError",[$h_a=>TypeError=$h_a]],["arrayForEach",[$h_a=>arrayForEach=$h_a]],["defineProperty",[$h_a=>defineProperty=$h_a]],["getOwnPropertyDescriptor",[$h_a=>getOwnPropertyDescriptor=$h_a]],["getOwnPropertyDescriptors",[$h_a=>getOwnPropertyDescriptors=$h_a]],["getOwnPropertyNames",[$h_a=>getOwnPropertyNames=$h_a]],["isObject",[$h_a=>isObject=$h_a]],["objectHasOwnProperty",[$h_a=>objectHasOwnProperty=$h_a]],["ownKeys",[$h_a=>ownKeys=$h_a]],["setHas",[$h_a=>setHas=$h_a]]]],["./enablements.js",[["minEnablements",[$h_a=>minEnablements=$h_a]],["moderateEnablements",[$h_a=>moderateEnablements=$h_a]],["severeEnablements",[$h_a=>severeEnablements=$h_a]]]]]),$h_once.default((function(intrinsics,overrideTaming,overrideDebug=[]){const debugProperties=new Set(overrideDebug);function enable(path,obj,prop,desc){if("value"in desc&&desc.configurable){const{value:value}=desc;function getter(){return value}defineProperty(getter,"originalValue",{value:value,writable:!1,enumerable:!1,configurable:!1});const isDebug=setHas(debugProperties,prop);defineProperty(obj,prop,{get:getter,set:function(newValue){if(obj===this)throw new TypeError(`Cannot assign to read only property '${String(prop)}' of '${path}'`);objectHasOwnProperty(this,prop)?this[prop]=newValue:(isDebug&&console.error(new TypeError("Override property "+prop)),defineProperty(this,prop,{value:newValue,writable:!0,enumerable:!0,configurable:!0}))},enumerable:desc.enumerable,configurable:desc.configurable})}}function enableProperty(path,obj,prop){const desc=getOwnPropertyDescriptor(obj,prop);desc&&enable(path,obj,prop,desc)}function enableAllProperties(path,obj){const descs=getOwnPropertyDescriptors(obj);descs&&arrayForEach(ownKeys(descs),prop=>enable(path,obj,prop,descs[prop]))}let plan;switch(overrideTaming){case"min":plan=minEnablements;break;case"moderate":plan=moderateEnablements;break;case"severe":plan=severeEnablements;break;default:throw new TypeError("unrecognized overrideTaming "+overrideTaming)}!function enableProperties(path,obj,plan){for(const prop of getOwnPropertyNames(plan)){const desc=getOwnPropertyDescriptor(obj,prop);if(!desc||desc.get||desc.set)continue;const subPath=`${path}.${String(prop)}`,subPlan=plan[prop];if(!0===subPlan)enableProperty(subPath,obj,prop);else if("*"===subPlan)enableAllProperties(subPath,desc.value);else{if(!isObject(subPlan))throw new TypeError("Unexpected override enablement plan "+subPath);enableProperties(subPath,desc.value,subPlan)}}}("root",intrinsics,plan)}))},({imports:$h_imports,liveVar:$h_live,onceVar:$h_once})=>{let WeakSet,arrayFilter,arrayMap,arrayPush,defineProperty,freeze,fromEntries,isError,stringEndsWith,weaksetAdd,weaksetHas;$h_imports([["../commons.js",[["WeakSet",[$h_a=>WeakSet=$h_a]],["arrayFilter",[$h_a=>arrayFilter=$h_a]],["arrayMap",[$h_a=>arrayMap=$h_a]],["arrayPush",[$h_a=>arrayPush=$h_a]],["defineProperty",[$h_a=>defineProperty=$h_a]],["freeze",[$h_a=>freeze=$h_a]],["fromEntries",[$h_a=>fromEntries=$h_a]],["isError",[$h_a=>isError=$h_a]],["stringEndsWith",[$h_a=>stringEndsWith=$h_a]],["weaksetAdd",[$h_a=>weaksetAdd=$h_a]],["weaksetHas",[$h_a=>weaksetHas=$h_a]]]],["./types.js",[]],["./internal-types.js",[]]]);const consoleLevelMethods=freeze([["debug","debug"],["log","log"],["info","info"],["warn","warn"],["error","error"],["trace","log"],["dirxml","log"],["group","log"],["groupCollapsed","log"]]),consoleOtherMethods=freeze([["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]]),consoleWhitelist=freeze([...consoleLevelMethods,...consoleOtherMethods]);$h_once.consoleWhitelist(consoleWhitelist);const makeLoggingConsoleKit=(loggedErrorHandler,{shouldResetForDebugging:shouldResetForDebugging=!1}={})=>{shouldResetForDebugging&&loggedErrorHandler.resetErrorTagNum();let logArray=[];const loggingConsole=fromEntries(arrayMap(consoleWhitelist,([name,_])=>{const method=(...args)=>{arrayPush(logArray,[name,...args])};return defineProperty(method,"name",{value:name}),[name,freeze(method)]}));freeze(loggingConsole);const takeLog=()=>{const result=freeze(logArray);return logArray=[],result};freeze(takeLog);return freeze({loggingConsole:loggingConsole,takeLog:takeLog})};$h_once.makeLoggingConsoleKit(makeLoggingConsoleKit),freeze(makeLoggingConsoleKit);const ErrorInfo={NOTE:"ERROR_NOTE:",MESSAGE:"ERROR_MESSAGE:"};freeze(ErrorInfo);$h_once.BASE_CONSOLE_LEVEL("debug");const makeCausalConsole=(baseConsole,loggedErrorHandler)=>{const{getStackString:getStackString,tagError:tagError,takeMessageLogArgs:takeMessageLogArgs,takeNoteLogArgsArray:takeNoteLogArgsArray}=loggedErrorHandler,extractErrorArgs=(logArgs,subErrorsSink)=>arrayMap(logArgs,arg=>isError(arg)?(arrayPush(subErrorsSink,arg),`(${tagError(arg)})`):arg),logErrorInfo=(error,kind,logArgs,subErrorsSink)=>{const errorTag=tagError(error),errorName=kind===ErrorInfo.MESSAGE?errorTag+":":`${errorTag} ${kind}`,argTags=extractErrorArgs(logArgs,subErrorsSink);baseConsole.debug(errorName,...argTags)},logSubErrors=(subErrors,optTag)=>{if(0===subErrors.length)return;if(1===subErrors.length&&void 0===optTag)return void logError(subErrors[0]);let label;label=1===subErrors.length?"Nested error":`Nested ${subErrors.length} errors`,void 0!==optTag&&(label=`${label} under ${optTag}`),baseConsole.group(label);try{for(const subError of subErrors)logError(subError)}finally{baseConsole.groupEnd()}},errorsLogged=new WeakSet,noteCallback=(error,noteLogArgs)=>{const subErrors=[];logErrorInfo(error,ErrorInfo.NOTE,noteLogArgs,subErrors),logSubErrors(subErrors,tagError(error))},logError=error=>{if(weaksetHas(errorsLogged,error))return;const errorTag=tagError(error);weaksetAdd(errorsLogged,error);const subErrors=[],messageLogArgs=takeMessageLogArgs(error),noteLogArgsArray=takeNoteLogArgsArray(error,noteCallback);void 0===messageLogArgs?baseConsole.debug(errorTag+":",error.message):logErrorInfo(error,ErrorInfo.MESSAGE,messageLogArgs,subErrors);let stackString=getStackString(error);"string"==typeof stackString&&stackString.length>=1&&!stringEndsWith(stackString,"\n")&&(stackString+="\n"),baseConsole.debug(stackString);for(const noteLogArgs of noteLogArgsArray)logErrorInfo(error,ErrorInfo.NOTE,noteLogArgs,subErrors);logSubErrors(subErrors,errorTag)},levelMethods=arrayMap(consoleLevelMethods,([level,_])=>{const levelMethod=(...logArgs)=>{const subErrors=[],argTags=extractErrorArgs(logArgs,subErrors);baseConsole[level](...argTags),logSubErrors(subErrors)};return defineProperty(levelMethod,"name",{value:level}),[level,freeze(levelMethod)]}),otherMethodNames=arrayFilter(consoleOtherMethods,([name,_])=>name in baseConsole),otherMethods=arrayMap(otherMethodNames,([name,_])=>{const otherMethod=(...args)=>{baseConsole[name](...args)};return defineProperty(otherMethod,"name",{value:name}),[name,freeze(otherMethod)]}),causalConsole=fromEntries([...levelMethods,...otherMethods]);return freeze(causalConsole)};$h_once.makeCausalConsole(makeCausalConsole),freeze(makeCausalConsole);const filterConsole=(baseConsole,filter,_topic)=>{const whitelist=arrayFilter(consoleWhitelist,([name,_])=>name in baseConsole),methods=arrayMap(whitelist,([name,severity])=>[name,freeze((...args)=>{(void 0===severity||filter.canLog(severity))&&baseConsole[name](...args)})]),filteringConsole=fromEntries(methods);return freeze(filteringConsole)};$h_once.filterConsole(filterConsole),freeze(filterConsole)},({imports:$h_imports,liveVar:$h_live,onceVar:$h_once})=>{let TypeError,globalThis,defaultHandler,makeCausalConsole;$h_imports([["../commons.js",[["TypeError",[$h_a=>TypeError=$h_a]],["globalThis",[$h_a=>globalThis=$h_a]]]],["./assert.js",[["loggedErrorHandler",[$h_a=>defaultHandler=$h_a]]]],["./console.js",[["makeCausalConsole",[$h_a=>makeCausalConsole=$h_a]]]],["./types.js",[]],["./internal-types.js",[]]]);const originalConsole=console;$h_once.tameConsole((consoleTaming="safe",errorTrapping="platform",optGetStackString)=>{if("safe"!==consoleTaming&&"unsafe"!==consoleTaming)throw new TypeError("unrecognized consoleTaming "+consoleTaming);if("unsafe"===consoleTaming)return{console:originalConsole};let loggedErrorHandler;loggedErrorHandler=void 0===optGetStackString?defaultHandler:{...defaultHandler,getStackString:optGetStackString};const causalConsole=makeCausalConsole(originalConsole,loggedErrorHandler);return"none"!==errorTrapping&&void 0!==globalThis.process&&globalThis.process.on("uncaughtException",error=>{causalConsole.error(error),"platform"===errorTrapping||"exit"===errorTrapping?globalThis.process.exit(globalThis.process.exitCode||-1):"abort"===errorTrapping&&globalThis.process.abort()}),"none"!==errorTrapping&&void 0!==globalThis.window&&globalThis.window.addEventListener("error",event=>{event.preventDefault();const stackString=loggedErrorHandler.getStackString(event.error);causalConsole.error(stackString),"exit"!==errorTrapping&&"abort"!==errorTrapping||(globalThis.window.location.href="about:blank")}),{console:causalConsole}})},({imports:$h_imports,liveVar:$h_live,onceVar:$h_once})=>{let WeakMap,WeakSet,apply,arrayFilter,arrayJoin,arrayMap,arraySlice,create,defineProperties,fromEntries,reflectSet,regexpExec,regexpTest,weakmapGet,weakmapHas,weakmapSet,weaksetAdd,weaksetHas;$h_imports([["../commons.js",[["WeakMap",[$h_a=>WeakMap=$h_a]],["WeakSet",[$h_a=>WeakSet=$h_a]],["apply",[$h_a=>apply=$h_a]],["arrayFilter",[$h_a=>arrayFilter=$h_a]],["arrayJoin",[$h_a=>arrayJoin=$h_a]],["arrayMap",[$h_a=>arrayMap=$h_a]],["arraySlice",[$h_a=>arraySlice=$h_a]],["create",[$h_a=>create=$h_a]],["defineProperties",[$h_a=>defineProperties=$h_a]],["fromEntries",[$h_a=>fromEntries=$h_a]],["reflectSet",[$h_a=>reflectSet=$h_a]],["regexpExec",[$h_a=>regexpExec=$h_a]],["regexpTest",[$h_a=>regexpTest=$h_a]],["weakmapGet",[$h_a=>weakmapGet=$h_a]],["weakmapHas",[$h_a=>weakmapHas=$h_a]],["weakmapSet",[$h_a=>weakmapSet=$h_a]],["weaksetAdd",[$h_a=>weaksetAdd=$h_a]],["weaksetHas",[$h_a=>weaksetHas=$h_a]]]]]);const safeV8CallSiteMethodNames=["getTypeName","getFunctionName","getMethodName","getFileName","getLineNumber","getColumnNumber","getEvalOrigin","isToplevel","isEval","isNative","isConstructor","isAsync","getPosition","getScriptNameOrSourceURL","toString"],safeV8CallSiteFacet=callSite=>{const o=fromEntries(arrayMap(safeV8CallSiteMethodNames,name=>{const method=callSite[name];return[name,()=>apply(method,callSite,[])]}));return create(o,{})},FILENAME_CENSORS=[/\/node_modules\//,/^(?:node:)?internal\//,/\/packages\/ses\/src\/error\/assert.js$/,/\/packages\/eventual-send\/src\//],filterFileName=fileName=>{if(!fileName)return!0;for(const filter of FILENAME_CENSORS)if(regexpTest(filter,fileName))return!1;return!0};$h_once.filterFileName(filterFileName);const CALLSITE_PATTERNS=[/^((?:.*[( ])?)[:/\w_-]*\/\.\.\.\/(.+)$/,/^((?:.*[( ])?)[:/\w_-]*\/(packages\/.+)$/],shortenCallSiteString=callSiteString=>{for(const filter of CALLSITE_PATTERNS){const match=regexpExec(filter,callSiteString);if(match)return arrayJoin(arraySlice(match,1),"")}return callSiteString};$h_once.shortenCallSiteString(shortenCallSiteString);$h_once.tameV8ErrorConstructor((OriginalError,InitialError,errorTaming,stackFiltering)=>{const originalCaptureStackTrace=OriginalError.captureStackTrace,callSiteFilter=callSite=>"verbose"===stackFiltering||filterFileName(callSite.getFileName()),callSiteStringifier=callSite=>{let callSiteString=""+callSite;return"concise"===stackFiltering&&(callSiteString=shortenCallSiteString(callSiteString)),"\n at "+callSiteString},stackStringFromSST=(_error,sst)=>arrayJoin(arrayMap(arrayFilter(sst,callSiteFilter),callSiteStringifier),""),ssts=new WeakMap,tamedMethods={captureStackTrace(error,optFn=tamedMethods.captureStackTrace){"function"!=typeof originalCaptureStackTrace?reflectSet(error,"stack",""):apply(originalCaptureStackTrace,OriginalError,[error,optFn])},getStackString(error){weakmapHas(ssts,error)||error.stack;const sst=weakmapGet(ssts,error);return sst?stackStringFromSST(0,sst):""},prepareStackTrace(error,sst){if(weakmapSet(ssts,error,sst),"unsafe"===errorTaming){return`${error}${stackStringFromSST(0,sst)}`}return""}},defaultPrepareFn=tamedMethods.prepareStackTrace;OriginalError.prepareStackTrace=defaultPrepareFn;const systemPrepareFnSet=new WeakSet([defaultPrepareFn]),systemPrepareFnFor=inputPrepareFn=>{if(weaksetHas(systemPrepareFnSet,inputPrepareFn))return inputPrepareFn;const systemMethods={prepareStackTrace:(error,sst)=>(weakmapSet(ssts,error,sst),inputPrepareFn(error,(sst=>arrayMap(sst,safeV8CallSiteFacet))(sst)))};return weaksetAdd(systemPrepareFnSet,systemMethods.prepareStackTrace),systemMethods.prepareStackTrace};return defineProperties(InitialError,{captureStackTrace:{value:tamedMethods.captureStackTrace,writable:!0,enumerable:!1,configurable:!0},prepareStackTrace:{get:()=>OriginalError.prepareStackTrace,set(inputPrepareStackTraceFn){if("function"==typeof inputPrepareStackTraceFn){const systemPrepareFn=systemPrepareFnFor(inputPrepareStackTraceFn);OriginalError.prepareStackTrace=systemPrepareFn}else OriginalError.prepareStackTrace=defaultPrepareFn},enumerable:!1,configurable:!0}}),tamedMethods.getStackString})},({imports:$h_imports,liveVar:$h_live,onceVar:$h_once})=>{let FERAL_ERROR,TypeError,apply,construct,defineProperties,setPrototypeOf,getOwnPropertyDescriptor,NativeErrors,tameV8ErrorConstructor;$h_imports([["../commons.js",[["FERAL_ERROR",[$h_a=>FERAL_ERROR=$h_a]],["TypeError",[$h_a=>TypeError=$h_a]],["apply",[$h_a=>apply=$h_a]],["construct",[$h_a=>construct=$h_a]],["defineProperties",[$h_a=>defineProperties=$h_a]],["setPrototypeOf",[$h_a=>setPrototypeOf=$h_a]],["getOwnPropertyDescriptor",[$h_a=>getOwnPropertyDescriptor=$h_a]]]],["../whitelist.js",[["NativeErrors",[$h_a=>NativeErrors=$h_a]]]],["./tame-v8-error-constructor.js",[["tameV8ErrorConstructor",[$h_a=>tameV8ErrorConstructor=$h_a]]]]]);const stackDesc=getOwnPropertyDescriptor(FERAL_ERROR.prototype,"stack"),stackGetter=stackDesc&&stackDesc.get,tamedMethods={getStackString:error=>"function"==typeof stackGetter?apply(stackGetter,error,[]):"stack"in error?""+error.stack:""};$h_once.default((function(errorTaming="safe",stackFiltering="concise"){if("safe"!==errorTaming&&"unsafe"!==errorTaming)throw new TypeError("unrecognized errorTaming "+errorTaming);if("concise"!==stackFiltering&&"verbose"!==stackFiltering)throw new TypeError("unrecognized stackFiltering "+stackFiltering);const ErrorPrototype=FERAL_ERROR.prototype,platform="function"==typeof FERAL_ERROR.captureStackTrace?"v8":"unknown",{captureStackTrace:originalCaptureStackTrace}=FERAL_ERROR,makeErrorConstructor=(_={})=>{const ResultError=function(...rest){let error;return error=void 0===new.target?apply(FERAL_ERROR,this,rest):construct(FERAL_ERROR,rest,new.target),"v8"===platform&&apply(originalCaptureStackTrace,FERAL_ERROR,[error,ResultError]),error};return defineProperties(ResultError,{length:{value:1},prototype:{value:ErrorPrototype,writable:!1,enumerable:!1,configurable:!1}}),ResultError},InitialError=makeErrorConstructor({powers:"original"}),SharedError=makeErrorConstructor({powers:"none"});defineProperties(ErrorPrototype,{constructor:{value:SharedError}});for(const NativeError of NativeErrors)setPrototypeOf(NativeError,SharedError);defineProperties(InitialError,{stackTraceLimit:{get(){if("number"==typeof FERAL_ERROR.stackTraceLimit)return FERAL_ERROR.stackTraceLimit},set(newLimit){"number"==typeof newLimit&&("number"!=typeof FERAL_ERROR.stackTraceLimit||(FERAL_ERROR.stackTraceLimit=newLimit))},enumerable:!1,configurable:!0}}),defineProperties(SharedError,{stackTraceLimit:{get(){},set(_newLimit){},enumerable:!1,configurable:!0}});let initialGetStackString=tamedMethods.getStackString;return"v8"===platform&&(initialGetStackString=tameV8ErrorConstructor(FERAL_ERROR,InitialError,errorTaming,stackFiltering)),{"%InitialGetStackString%":initialGetStackString,"%InitialError%":InitialError,"%SharedError%":SharedError}}))},({imports:$h_imports,liveVar:$h_live,onceVar:$h_once})=>{let Set,String,TypeError,WeakMap,WeakSet,arrayForEach,freeze,getOwnPropertyDescriptors,getPrototypeOf,isObject,objectHasOwnProperty,ownKeys,setAdd,setForEach,setHas,weakmapGet,weakmapSet,weaksetAdd,weaksetHas;$h_imports([["./commons.js",[["Set",[$h_a=>Set=$h_a]],["String",[$h_a=>String=$h_a]],["TypeError",[$h_a=>TypeError=$h_a]],["WeakMap",[$h_a=>WeakMap=$h_a]],["WeakSet",[$h_a=>WeakSet=$h_a]],["arrayForEach",[$h_a=>arrayForEach=$h_a]],["freeze",[$h_a=>freeze=$h_a]],["getOwnPropertyDescriptors",[$h_a=>getOwnPropertyDescriptors=$h_a]],["getPrototypeOf",[$h_a=>getPrototypeOf=$h_a]],["isObject",[$h_a=>isObject=$h_a]],["objectHasOwnProperty",[$h_a=>objectHasOwnProperty=$h_a]],["ownKeys",[$h_a=>ownKeys=$h_a]],["setAdd",[$h_a=>setAdd=$h_a]],["setForEach",[$h_a=>setForEach=$h_a]],["setHas",[$h_a=>setHas=$h_a]],["weakmapGet",[$h_a=>weakmapGet=$h_a]],["weakmapSet",[$h_a=>weakmapSet=$h_a]],["weaksetAdd",[$h_a=>weaksetAdd=$h_a]],["weaksetHas",[$h_a=>weaksetHas=$h_a]]]]]);$h_once.makeHardener(()=>{const hardened=new WeakSet,{harden:harden}={harden(root){const toFreeze=new Set,paths=new WeakMap;function enqueue(val,path){if(!isObject(val))return;const type=typeof val;if("object"!==type&&"function"!==type)throw new TypeError("Unexpected typeof: "+type);weaksetHas(hardened,val)||setHas(toFreeze,val)||(setAdd(toFreeze,val),weakmapSet(paths,val,path))}function freezeAndTraverse(obj){freeze(obj);const path=weakmapGet(paths,obj)||"unknown",descs=getOwnPropertyDescriptors(obj);enqueue(getPrototypeOf(obj),path+".__proto__"),arrayForEach(ownKeys(descs),name=>{const pathname=`${path}.${String(name)}`,desc=descs[name];objectHasOwnProperty(desc,"value")?enqueue(desc.value,""+pathname):(enqueue(desc.get,pathname+"(get)"),enqueue(desc.set,pathname+"(set)"))})}function markHardened(value){weaksetAdd(hardened,value)}return enqueue(root),setForEach(toFreeze,freezeAndTraverse),setForEach(toFreeze,markHardened),root}};return harden})},({imports:$h_imports,liveVar:$h_live,onceVar:$h_once})=>{let Date,TypeError,apply,construct,defineProperties;$h_imports([["./commons.js",[["Date",[$h_a=>Date=$h_a]],["TypeError",[$h_a=>TypeError=$h_a]],["apply",[$h_a=>apply=$h_a]],["construct",[$h_a=>construct=$h_a]],["defineProperties",[$h_a=>defineProperties=$h_a]]]]]),$h_once.default((function(dateTaming="safe"){if("safe"!==dateTaming&&"unsafe"!==dateTaming)throw new TypeError("unrecognized dateTaming "+dateTaming);const OriginalDate=Date,DatePrototype=OriginalDate.prototype,tamedMethods={now:()=>NaN},makeDateConstructor=({powers:powers="none"}={})=>{let ResultDate;return ResultDate="original"===powers?function(...rest){return void 0===new.target?apply(OriginalDate,void 0,rest):construct(OriginalDate,rest,new.target)}:function(...rest){return void 0===new.target?"Invalid Date":(0===rest.length&&(rest=[NaN]),construct(OriginalDate,rest,new.target))},defineProperties(ResultDate,{length:{value:7},prototype:{value:DatePrototype,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}}),ResultDate},InitialDate=makeDateConstructor({powers:"original"}),SharedDate=makeDateConstructor({powers:"none"});return defineProperties(InitialDate,{now:{value:Date.now,writable:!0,enumerable:!1,configurable:!0}}),defineProperties(SharedDate,{now:{value:tamedMethods.now,writable:!0,enumerable:!1,configurable:!0}}),defineProperties(DatePrototype,{constructor:{value:SharedDate}}),{"%InitialDate%":InitialDate,"%SharedDate%":SharedDate}}))},({imports:$h_imports,liveVar:$h_live,onceVar:$h_once})=>{let TypeError,globalThis,getOwnPropertyDescriptor,defineProperty;function tameDomains(domainTaming="safe"){if("safe"!==domainTaming&&"unsafe"!==domainTaming)throw new TypeError("unrecognized domainTaming "+domainTaming);if("unsafe"!==domainTaming&&"object"==typeof globalThis.process&&null!==globalThis.process){const domainDescriptor=getOwnPropertyDescriptor(globalThis.process,"domain");if(void 0!==domainDescriptor&&void 0!==domainDescriptor.get)throw new TypeError("SES failed to lockdown, Node.js domains have been initialized (SES_NO_DOMAINS)");defineProperty(globalThis.process,"domain",{value:null,configurable:!1,writable:!1,enumerable:!1})}}$h_imports([["./commons.js",[["TypeError",[$h_a=>TypeError=$h_a]],["globalThis",[$h_a=>globalThis=$h_a]],["getOwnPropertyDescriptor",[$h_a=>getOwnPropertyDescriptor=$h_a]],["defineProperty",[$h_a=>defineProperty=$h_a]]]]]),Object.defineProperty(tameDomains,"name",{value:"tameDomains"}),$h_once.tameDomains(tameDomains)},({imports:$h_imports,liveVar:$h_live,onceVar:$h_once})=>{let FERAL_FUNCTION,SyntaxError,TypeError,defineProperties,getPrototypeOf,setPrototypeOf;$h_imports([["./commons.js",[["FERAL_FUNCTION",[$h_a=>FERAL_FUNCTION=$h_a]],["SyntaxError",[$h_a=>SyntaxError=$h_a]],["TypeError",[$h_a=>TypeError=$h_a]],["defineProperties",[$h_a=>defineProperties=$h_a]],["getPrototypeOf",[$h_a=>getPrototypeOf=$h_a]],["setPrototypeOf",[$h_a=>setPrototypeOf=$h_a]]]]]),$h_once.default((function(){try{FERAL_FUNCTION.prototype.constructor("return 1")}catch(ignore){return{}}const newIntrinsics={};function repairFunction(name,intrinsicName,declaration){let FunctionInstance;try{FunctionInstance=(0,eval)(declaration)}catch(e){if(e instanceof SyntaxError)return;throw e}const FunctionPrototype=getPrototypeOf(FunctionInstance),InertConstructor=function(){throw new TypeError("Function.prototype.constructor is not a valid constructor.")};defineProperties(InertConstructor,{prototype:{value:FunctionPrototype},name:{value:name,writable:!1,enumerable:!1,configurable:!0}}),defineProperties(FunctionPrototype,{constructor:{value:InertConstructor}}),InertConstructor!==FERAL_FUNCTION.prototype.constructor&&setPrototypeOf(InertConstructor,FERAL_FUNCTION.prototype.constructor),newIntrinsics[intrinsicName]=InertConstructor}return repairFunction("Function","%InertFunction%","(function(){})"),repairFunction("GeneratorFunction","%InertGeneratorFunction%","(function*(){})"),repairFunction("AsyncFunction","%InertAsyncFunction%","(async function(){})"),repairFunction("AsyncGeneratorFunction","%InertAsyncGeneratorFunction%","(async function*(){})"),newIntrinsics}))},({imports:$h_imports,liveVar:$h_live,onceVar:$h_once})=>{let WeakSet,defineProperty,freeze,functionPrototype,functionToString,stringEndsWith,weaksetAdd,weaksetHas;$h_imports([["./commons.js",[["WeakSet",[$h_a=>WeakSet=$h_a]],["defineProperty",[$h_a=>defineProperty=$h_a]],["freeze",[$h_a=>freeze=$h_a]],["functionPrototype",[$h_a=>functionPrototype=$h_a]],["functionToString",[$h_a=>functionToString=$h_a]],["stringEndsWith",[$h_a=>stringEndsWith=$h_a]],["weaksetAdd",[$h_a=>weaksetAdd=$h_a]],["weaksetHas",[$h_a=>weaksetHas=$h_a]]]]]);let markVirtualizedNativeFunction;$h_once.tameFunctionToString(()=>{if(void 0===markVirtualizedNativeFunction){const virtualizedNativeFunctions=new WeakSet;defineProperty(functionPrototype,"toString",{value:{toString(){const str=functionToString(this,[]);return stringEndsWith(str,") { [native code] }")||!weaksetHas(virtualizedNativeFunctions,this)?str:`function ${this.name}() { [native code] }`}}.toString}),markVirtualizedNativeFunction=freeze(func=>weaksetAdd(virtualizedNativeFunctions,func))}return markVirtualizedNativeFunction})},({imports:$h_imports,liveVar:$h_live,onceVar:$h_once})=>{let String,TypeError,defineProperty,getOwnPropertyNames,isObject,regexpExec,assert;$h_imports([["./commons.js",[["String",[$h_a=>String=$h_a]],["TypeError",[$h_a=>TypeError=$h_a]],["defineProperty",[$h_a=>defineProperty=$h_a]],["getOwnPropertyNames",[$h_a=>getOwnPropertyNames=$h_a]],["isObject",[$h_a=>isObject=$h_a]],["regexpExec",[$h_a=>regexpExec=$h_a]]]],["./error/assert.js",[["assert",[$h_a=>assert=$h_a]]]]]);const{details:d,quote:q}=assert,localePattern=/^(\w*[a-z])Locale([A-Z]\w*)$/,nonLocaleCompare={localeCompare(that){if(null==this)throw new TypeError('Cannot localeCompare with null or undefined "this" value');const s=""+this;return s<(that=""+that)?-1:s>that?1:(assert(s===that,d`expected ${q(s)} and ${q(that)} to compare`),0)}}.localeCompare;$h_once.default((function(intrinsics,localeTaming="safe"){if("safe"!==localeTaming&&"unsafe"!==localeTaming)throw new TypeError("unrecognized localeTaming "+localeTaming);if("unsafe"!==localeTaming){defineProperty(String.prototype,"localeCompare",{value:nonLocaleCompare});for(const intrinsicName of getOwnPropertyNames(intrinsics)){const intrinsic=intrinsics[intrinsicName];if(isObject(intrinsic))for(const methodName of getOwnPropertyNames(intrinsic)){const match=regexpExec(localePattern,methodName);if(match){assert("function"==typeof intrinsic[methodName],d`expected ${q(methodName)} to be a function`);const nonLocaleMethodName=`${match[1]}${match[2]}`,method=intrinsic[nonLocaleMethodName];assert("function"==typeof method,d`function ${q(nonLocaleMethodName)} not found`),defineProperty(intrinsic,methodName,{value:method})}}}}}))},({imports:$h_imports,liveVar:$h_live,onceVar:$h_once})=>{let Math,TypeError,create,getOwnPropertyDescriptors,objectPrototype;$h_imports([["./commons.js",[["Math",[$h_a=>Math=$h_a]],["TypeError",[$h_a=>TypeError=$h_a]],["create",[$h_a=>create=$h_a]],["getOwnPropertyDescriptors",[$h_a=>getOwnPropertyDescriptors=$h_a]],["objectPrototype",[$h_a=>objectPrototype=$h_a]]]]]),$h_once.default((function(mathTaming="safe"){if("safe"!==mathTaming&&"unsafe"!==mathTaming)throw new TypeError("unrecognized mathTaming "+mathTaming);const originalMath=Math,initialMath=originalMath,{random:_,...otherDescriptors}=getOwnPropertyDescriptors(originalMath);return{"%InitialMath%":initialMath,"%SharedMath%":create(objectPrototype,otherDescriptors)}}))},({imports:$h_imports,liveVar:$h_live,onceVar:$h_once})=>{let FERAL_REG_EXP,TypeError,construct,defineProperties,getOwnPropertyDescriptor,speciesSymbol;$h_imports([["./commons.js",[["FERAL_REG_EXP",[$h_a=>FERAL_REG_EXP=$h_a]],["TypeError",[$h_a=>TypeError=$h_a]],["construct",[$h_a=>construct=$h_a]],["defineProperties",[$h_a=>defineProperties=$h_a]],["getOwnPropertyDescriptor",[$h_a=>getOwnPropertyDescriptor=$h_a]],["speciesSymbol",[$h_a=>speciesSymbol=$h_a]]]]]),$h_once.default((function(regExpTaming="safe"){if("safe"!==regExpTaming&&"unsafe"!==regExpTaming)throw new TypeError("unrecognized regExpTaming "+regExpTaming);const RegExpPrototype=FERAL_REG_EXP.prototype,makeRegExpConstructor=(_={})=>{const ResultRegExp=function(...rest){return void 0===new.target?FERAL_REG_EXP(...rest):construct(FERAL_REG_EXP,rest,new.target)};return defineProperties(ResultRegExp,{length:{value:2},prototype:{value:RegExpPrototype,writable:!1,enumerable:!1,configurable:!1},[speciesSymbol]:getOwnPropertyDescriptor(FERAL_REG_EXP,speciesSymbol)}),ResultRegExp},InitialRegExp=makeRegExpConstructor(),SharedRegExp=makeRegExpConstructor();return"unsafe"!==regExpTaming&&delete RegExpPrototype.compile,defineProperties(RegExpPrototype,{constructor:{value:SharedRegExp}}),{"%InitialRegExp%":InitialRegExp,"%SharedRegExp%":SharedRegExp}}))},({imports:$h_imports,liveVar:$h_live,onceVar:$h_once})=>{let whitelist,FunctionInstance,isAccessorPermit,String,TypeError,arrayIncludes,getOwnPropertyDescriptor,getPrototypeOf,isObject,objectHasOwnProperty,ownKeys,stringSlice;function asStringPropertyName(path,prop){if("string"==typeof prop)return prop;if("symbol"==typeof prop)return"@@"+stringSlice(String(prop),14,-1);throw new TypeError(`Unexpected property name type ${path} ${prop}`)}$h_imports([["./whitelist.js",[["whitelist",[$h_a=>whitelist=$h_a]],["FunctionInstance",[$h_a=>FunctionInstance=$h_a]],["isAccessorPermit",[$h_a=>isAccessorPermit=$h_a]]]],["./commons.js",[["String",[$h_a=>String=$h_a]],["TypeError",[$h_a=>TypeError=$h_a]],["arrayIncludes",[$h_a=>arrayIncludes=$h_a]],["getOwnPropertyDescriptor",[$h_a=>getOwnPropertyDescriptor=$h_a]],["getPrototypeOf",[$h_a=>getPrototypeOf=$h_a]],["isObject",[$h_a=>isObject=$h_a]],["objectHasOwnProperty",[$h_a=>objectHasOwnProperty=$h_a]],["ownKeys",[$h_a=>ownKeys=$h_a]],["stringSlice",[$h_a=>stringSlice=$h_a]]]]]),$h_once.default((function(intrinsics,markVirtualizedNativeFunction){const primitives=["undefined","boolean","number","string","symbol"];function isAllowedPropertyValue(path,value,prop,permit){if("object"==typeof permit)return visitProperties(path,value,permit),!0;if(!1===permit)return!1;if("string"==typeof permit)if("prototype"===prop||"constructor"===prop){if(objectHasOwnProperty(intrinsics,permit)){if(value!==intrinsics[permit])throw new TypeError("Does not match whitelist "+path);return!0}}else if(arrayIncludes(primitives,permit)){if(typeof value!==permit)throw new TypeError(`At ${path} expected ${permit} not ${typeof value}`);return!0}throw new TypeError(`Unexpected whitelist permit ${permit} at ${path}`)}function isAllowedProperty(path,obj,prop,permit){const desc=getOwnPropertyDescriptor(obj,prop);if(objectHasOwnProperty(desc,"value")){if(isAccessorPermit(permit))throw new TypeError("Accessor expected at "+path);return isAllowedPropertyValue(path,desc.value,prop,permit)}if(!isAccessorPermit(permit))throw new TypeError("Accessor not expected at "+path);return isAllowedPropertyValue(path+"<get>",desc.get,prop,permit.get)&&isAllowedPropertyValue(path+"<set>",desc.set,prop,permit.set)}function getSubPermit(obj,permit,prop){const permitProp="__proto__"===prop?"--proto--":prop;return objectHasOwnProperty(permit,permitProp)?permit[permitProp]:"function"==typeof obj&&(markVirtualizedNativeFunction(obj),objectHasOwnProperty(FunctionInstance,permitProp))?FunctionInstance[permitProp]:void 0}function visitProperties(path,obj,permit){if(void 0===obj)return;!function(path,obj,protoName){if(!isObject(obj))throw new TypeError(`Object expected: ${path}, ${obj}, ${protoName}`);const proto=getPrototypeOf(obj);if(null!==proto||null!==protoName){if(void 0!==protoName&&"string"!=typeof protoName)throw new TypeError(`Malformed whitelist permit ${path}.__proto__`);if(proto!==intrinsics[protoName||"%ObjectPrototype%"])throw new TypeError(`Unexpected intrinsic ${path}.__proto__ at ${protoName}`)}}(path,obj,permit["[[Proto]]"]);for(const prop of ownKeys(obj)){const propString=asStringPropertyName(path,prop),subPath=`${path}.${propString}`,subPermit=getSubPermit(obj,permit,propString);if(!subPermit||!isAllowedProperty(subPath,obj,prop,subPermit)){!1!==subPermit&&console.log("Removing "+subPath);try{delete obj[prop]}catch(err){throw prop in obj?console.error("failed to delete "+subPath,err):console.error(`deleting ${subPath} threw`,err),err}}}}visitProperties("intrinsics",intrinsics,whitelist)}))},({imports:$h_imports,liveVar:$h_live,onceVar:$h_once})=>{let globalThis,is,keys,ownKeys,makeHardener,makeIntrinsicsCollector,whitelistIntrinsics,tameFunctionConstructors,tameDateConstructor,tameMathObject,tameRegExpConstructor,enablePropertyOverrides,tameLocaleMethods,setGlobalObjectConstantProperties,setGlobalObjectMutableProperties,makeSafeEvaluator,initialGlobalPropertyNames,tameFunctionToString,tameDomains,tameConsole,tameErrorConstructor,assert,makeAssert;$h_imports([["./commons.js",[["globalThis",[$h_a=>globalThis=$h_a]],["is",[$h_a=>is=$h_a]],["keys",[$h_a=>keys=$h_a]],["ownKeys",[$h_a=>ownKeys=$h_a]]]],["./make-hardener.js",[["makeHardener",[$h_a=>makeHardener=$h_a]]]],["./intrinsics.js",[["makeIntrinsicsCollector",[$h_a=>makeIntrinsicsCollector=$h_a]]]],["./whitelist-intrinsics.js",[["default",[$h_a=>whitelistIntrinsics=$h_a]]]],["./tame-function-constructors.js",[["default",[$h_a=>tameFunctionConstructors=$h_a]]]],["./tame-date-constructor.js",[["default",[$h_a=>tameDateConstructor=$h_a]]]],["./tame-math-object.js",[["default",[$h_a=>tameMathObject=$h_a]]]],["./tame-regexp-constructor.js",[["default",[$h_a=>tameRegExpConstructor=$h_a]]]],["./enable-property-overrides.js",[["default",[$h_a=>enablePropertyOverrides=$h_a]]]],["./tame-locale-methods.js",[["default",[$h_a=>tameLocaleMethods=$h_a]]]],["./global-object.js",[["setGlobalObjectConstantProperties",[$h_a=>setGlobalObjectConstantProperties=$h_a]],["setGlobalObjectMutableProperties",[$h_a=>setGlobalObjectMutableProperties=$h_a]]]],["./make-safe-evaluator.js",[["makeSafeEvaluator",[$h_a=>makeSafeEvaluator=$h_a]]]],["./whitelist.js",[["initialGlobalPropertyNames",[$h_a=>initialGlobalPropertyNames=$h_a]]]],["./tame-function-tostring.js",[["tameFunctionToString",[$h_a=>tameFunctionToString=$h_a]]]],["./tame-domains.js",[["tameDomains",[$h_a=>tameDomains=$h_a]]]],["./error/tame-console.js",[["tameConsole",[$h_a=>tameConsole=$h_a]]]],["./error/tame-error-constructor.js",[["default",[$h_a=>tameErrorConstructor=$h_a]]]],["./error/assert.js",[["assert",[$h_a=>assert=$h_a]],["makeAssert",[$h_a=>makeAssert=$h_a]]]]]);const{details:d,quote:q}=assert;let firstOptions;const harden=makeHardener(),alreadyHardenedIntrinsics=()=>!1,repairIntrinsics=(makeCompartmentConstructor,compartmentPrototype,getAnonymousIntrinsics,options={})=>{options={...firstOptions,...options};const{dateTaming:dateTaming="safe",errorTaming:errorTaming="safe",mathTaming:mathTaming="safe",errorTrapping:errorTrapping="platform",regExpTaming:regExpTaming="safe",localeTaming:localeTaming="safe",consoleTaming:consoleTaming="safe",overrideTaming:overrideTaming="moderate",overrideDebug:overrideDebug=[],stackFiltering:stackFiltering="concise",domainTaming:domainTaming="unsafe",__allowUnsafeMonkeyPatching__:__allowUnsafeMonkeyPatching__="safe",...extraOptions}=options,extraOptionsNames=ownKeys(extraOptions);if(assert(0===extraOptionsNames.length,d`lockdown(): non supported option ${q(extraOptionsNames)}`),firstOptions){for(const name of keys(firstOptions))assert(options[name]===firstOptions[name],d`lockdown(): cannot re-invoke with different option ${q(name)}`);return alreadyHardenedIntrinsics}firstOptions={dateTaming:dateTaming,errorTaming:errorTaming,mathTaming:mathTaming,regExpTaming:regExpTaming,localeTaming:localeTaming,consoleTaming:consoleTaming,overrideTaming:overrideTaming,overrideDebug:overrideDebug,stackFiltering:stackFiltering,domainTaming:domainTaming,__allowUnsafeMonkeyPatching__:__allowUnsafeMonkeyPatching__};if(globalThis.Function.prototype.constructor!==globalThis.Function&&"function"==typeof globalThis.harden&&"function"==typeof globalThis.lockdown&&globalThis.Date.prototype.constructor!==globalThis.Date&&"function"==typeof globalThis.Date.now&&is(globalThis.Date.prototype.constructor.now(),NaN))return console.log("Seems to already be locked down. Skipping second lockdown"),alreadyHardenedIntrinsics;tameDomains(domainTaming);const{addIntrinsics:addIntrinsics,completePrototypes:completePrototypes,finalIntrinsics:finalIntrinsics}=makeIntrinsicsCollector();addIntrinsics({harden:harden}),addIntrinsics(tameFunctionConstructors()),addIntrinsics(tameDateConstructor(dateTaming)),addIntrinsics(tameErrorConstructor(errorTaming,stackFiltering)),addIntrinsics(tameMathObject(mathTaming)),addIntrinsics(tameRegExpConstructor(regExpTaming)),addIntrinsics(getAnonymousIntrinsics()),completePrototypes();const intrinsics=finalIntrinsics();let optGetStackString;"unsafe"!==errorTaming&&(optGetStackString=intrinsics["%InitialGetStackString%"]);const consoleRecord=tameConsole(consoleTaming,errorTrapping,optGetStackString);globalThis.console=consoleRecord.console,"unsafe"===errorTaming&&globalThis.assert===assert&&(globalThis.assert=makeAssert(void 0,!0)),tameLocaleMethods(intrinsics,localeTaming);const markVirtualizedNativeFunction=tameFunctionToString();whitelistIntrinsics(intrinsics,markVirtualizedNativeFunction),setGlobalObjectConstantProperties(globalThis);const{safeEvaluate:safeEvaluate}=makeSafeEvaluator({globalObject:globalThis});return setGlobalObjectMutableProperties(globalThis,{intrinsics:intrinsics,newGlobalPropertyNames:initialGlobalPropertyNames,makeCompartmentConstructor:makeCompartmentConstructor,safeEvaluate:safeEvaluate,markVirtualizedNativeFunction:markVirtualizedNativeFunction}),function(){return enablePropertyOverrides(intrinsics,overrideTaming,overrideDebug),"unsafe"!==__allowUnsafeMonkeyPatching__&&harden(intrinsics),globalThis.harden=harden,!0}};$h_once.repairIntrinsics(repairIntrinsics);$h_once.makeLockdown((makeCompartmentConstructor,compartmentPrototype,getAnonymousIntrinsics)=>(options={})=>repairIntrinsics(makeCompartmentConstructor,0,getAnonymousIntrinsics,options)())},({imports:$h_imports,liveVar:$h_live,onceVar:$h_once})=>{let globalThis,TypeError,assign,tameFunctionToString,getGlobalIntrinsics,getAnonymousIntrinsics,makeLockdown,makeCompartmentConstructor,CompartmentPrototype,assert;if($h_imports([["./src/commons.js",[["globalThis",[$h_a=>globalThis=$h_a]],["TypeError",[$h_a=>TypeError=$h_a]],["assign",[$h_a=>assign=$h_a]]]],["./src/tame-function-tostring.js",[["tameFunctionToString",[$h_a=>tameFunctionToString=$h_a]]]],["./src/intrinsics.js",[["getGlobalIntrinsics",[$h_a=>getGlobalIntrinsics=$h_a]]]],["./src/get-anonymous-intrinsics.js",[["getAnonymousIntrinsics",[$h_a=>getAnonymousIntrinsics=$h_a]]]],["./src/lockdown-shim.js",[["makeLockdown",[$h_a=>makeLockdown=$h_a]]]],["./src/compartment-shim.js",[["makeCompartmentConstructor",[$h_a=>makeCompartmentConstructor=$h_a]],["CompartmentPrototype",[$h_a=>CompartmentPrototype=$h_a]]]],["./src/error/assert.js",[["assert",[$h_a=>assert=$h_a]]]]]),function(){return this}())throw new TypeError("SES failed to initialize, sloppy mode (SES_NO_SLOPPY)");const markVirtualizedNativeFunction=tameFunctionToString(),Compartment=makeCompartmentConstructor(makeCompartmentConstructor,getGlobalIntrinsics(globalThis),markVirtualizedNativeFunction);assign(globalThis,{lockdown:makeLockdown(makeCompartmentConstructor,CompartmentPrototype,getAnonymousIntrinsics),Compartment:Compartment,assert:assert})}]);
|
|
1
|
+
"use strict";(()=>{const functors=[({imports:$h_imports,liveVar:$h_live,onceVar:$h_once})=>{$h_imports([]);const universalThis=globalThis;$h_once.universalThis(universalThis);const{Array:Array,Date:Date,Float32Array:Float32Array,JSON:JSON,Map:Map,Math:Math,Object:Object,Promise:Promise,Proxy:Proxy,Reflect:Reflect,RegExp:FERAL_REG_EXP,Set:Set,String:String,WeakMap:WeakMap,WeakSet:WeakSet}=globalThis;$h_once.Array(Array),$h_once.Date(Date),$h_once.Float32Array(Float32Array),$h_once.JSON(JSON),$h_once.Map(Map),$h_once.Math(Math),$h_once.Object(Object),$h_once.Promise(Promise),$h_once.Proxy(Proxy),$h_once.Reflect(Reflect),$h_once.FERAL_REG_EXP(FERAL_REG_EXP),$h_once.Set(Set),$h_once.String(String),$h_once.WeakMap(WeakMap),$h_once.WeakSet(WeakSet);const{Error:FERAL_ERROR,RangeError:RangeError,ReferenceError:ReferenceError,SyntaxError:SyntaxError,TypeError:TypeError}=globalThis;$h_once.FERAL_ERROR(FERAL_ERROR),$h_once.RangeError(RangeError),$h_once.ReferenceError(ReferenceError),$h_once.SyntaxError(SyntaxError),$h_once.TypeError(TypeError);const{assign:assign,create:create,defineProperties:defineProperties,entries:entries,freeze:freeze,getOwnPropertyDescriptor:getOwnPropertyDescriptor,getOwnPropertyDescriptors:getOwnPropertyDescriptors,getOwnPropertyNames:getOwnPropertyNames,getPrototypeOf:getPrototypeOf,is:is,isExtensible:isExtensible,keys:keys,prototype:objectPrototype,seal:seal,setPrototypeOf:setPrototypeOf,values:values}=Object;$h_once.assign(assign),$h_once.create(create),$h_once.defineProperties(defineProperties),$h_once.entries(entries),$h_once.freeze(freeze),$h_once.getOwnPropertyDescriptor(getOwnPropertyDescriptor),$h_once.getOwnPropertyDescriptors(getOwnPropertyDescriptors),$h_once.getOwnPropertyNames(getOwnPropertyNames),$h_once.getPrototypeOf(getPrototypeOf),$h_once.is(is),$h_once.isExtensible(isExtensible),$h_once.keys(keys),$h_once.objectPrototype(objectPrototype),$h_once.seal(seal),$h_once.setPrototypeOf(setPrototypeOf),$h_once.values(values);const{species:speciesSymbol,toStringTag:toStringTagSymbol,iterator:iteratorSymbol,matchAll:matchAllSymbol}=Symbol;$h_once.speciesSymbol(speciesSymbol),$h_once.toStringTagSymbol(toStringTagSymbol),$h_once.iteratorSymbol(iteratorSymbol),$h_once.matchAllSymbol(matchAllSymbol);const{stringify:stringifyJson}=JSON;$h_once.stringifyJson(stringifyJson);const fromEntries=Object.fromEntries||(entryPairs=>{const result={};for(const[prop,val]of entryPairs)result[prop]=val;return result});$h_once.fromEntries(fromEntries);const{defineProperty:originalDefineProperty}=Object;$h_once.defineProperty((object,prop,descriptor)=>{const result=originalDefineProperty(object,prop,descriptor);if(result!==object)throw TypeError(`Please report that the original defineProperty silently failed to set ${stringifyJson(String(prop))}. (SES_DEFINE_PROPERTY_FAILED_SILENTLY)`);return result});const{apply:apply,construct:construct,get:reflectGet,getOwnPropertyDescriptor:reflectGetOwnPropertyDescriptor,has:reflectHas,isExtensible:reflectIsExtensible,ownKeys:ownKeys,preventExtensions:reflectPreventExtensions,set:reflectSet}=Reflect;$h_once.apply(apply),$h_once.construct(construct),$h_once.reflectGet(reflectGet),$h_once.reflectGetOwnPropertyDescriptor(reflectGetOwnPropertyDescriptor),$h_once.reflectHas(reflectHas),$h_once.reflectIsExtensible(reflectIsExtensible),$h_once.ownKeys(ownKeys),$h_once.reflectPreventExtensions(reflectPreventExtensions),$h_once.reflectSet(reflectSet);const{isArray:isArray,prototype:arrayPrototype}=Array;$h_once.isArray(isArray),$h_once.arrayPrototype(arrayPrototype);const{prototype:mapPrototype}=Map;$h_once.mapPrototype(mapPrototype);const{revocable:proxyRevocable}=Proxy;$h_once.proxyRevocable(proxyRevocable);const{prototype:regexpPrototype}=RegExp;$h_once.regexpPrototype(regexpPrototype);const{prototype:setPrototype}=Set;$h_once.setPrototype(setPrototype);const{prototype:stringPrototype}=String;$h_once.stringPrototype(stringPrototype);const{prototype:weakmapPrototype}=WeakMap;$h_once.weakmapPrototype(weakmapPrototype);const{prototype:weaksetPrototype}=WeakSet;$h_once.weaksetPrototype(weaksetPrototype);const{prototype:functionPrototype}=Function;$h_once.functionPrototype(functionPrototype);const{prototype:promisePrototype}=Promise;$h_once.promisePrototype(promisePrototype);const uncurryThis=fn=>(thisArg,...args)=>apply(fn,thisArg,args);$h_once.uncurryThis(uncurryThis);const objectHasOwnProperty=uncurryThis(objectPrototype.hasOwnProperty);$h_once.objectHasOwnProperty(objectHasOwnProperty);const arrayFilter=uncurryThis(arrayPrototype.filter);$h_once.arrayFilter(arrayFilter);const arrayForEach=uncurryThis(arrayPrototype.forEach);$h_once.arrayForEach(arrayForEach);const arrayIncludes=uncurryThis(arrayPrototype.includes);$h_once.arrayIncludes(arrayIncludes);const arrayJoin=uncurryThis(arrayPrototype.join);$h_once.arrayJoin(arrayJoin);const arrayMap=uncurryThis(arrayPrototype.map);$h_once.arrayMap(arrayMap);const arrayPop=uncurryThis(arrayPrototype.pop);$h_once.arrayPop(arrayPop);const arrayPush=uncurryThis(arrayPrototype.push);$h_once.arrayPush(arrayPush);const arraySlice=uncurryThis(arrayPrototype.slice);$h_once.arraySlice(arraySlice);const arraySome=uncurryThis(arrayPrototype.some);$h_once.arraySome(arraySome);const arraySort=uncurryThis(arrayPrototype.sort);$h_once.arraySort(arraySort);const iterateArray=uncurryThis(arrayPrototype[iteratorSymbol]);$h_once.iterateArray(iterateArray);const mapSet=uncurryThis(mapPrototype.set);$h_once.mapSet(mapSet);const mapGet=uncurryThis(mapPrototype.get);$h_once.mapGet(mapGet);const mapHas=uncurryThis(mapPrototype.has);$h_once.mapHas(mapHas);const iterateMap=uncurryThis(mapPrototype[iteratorSymbol]);$h_once.iterateMap(iterateMap);const setAdd=uncurryThis(setPrototype.add);$h_once.setAdd(setAdd);const setForEach=uncurryThis(setPrototype.forEach);$h_once.setForEach(setForEach);const setHas=uncurryThis(setPrototype.has);$h_once.setHas(setHas);const iterateSet=uncurryThis(setPrototype[iteratorSymbol]);$h_once.iterateSet(iterateSet);const regexpTest=uncurryThis(regexpPrototype.test);$h_once.regexpTest(regexpTest);const regexpExec=uncurryThis(regexpPrototype.exec);$h_once.regexpExec(regexpExec);const matchAllRegExp=uncurryThis(regexpPrototype[matchAllSymbol]);$h_once.matchAllRegExp(matchAllRegExp);const stringEndsWith=uncurryThis(stringPrototype.endsWith);$h_once.stringEndsWith(stringEndsWith);const stringIncludes=uncurryThis(stringPrototype.includes);$h_once.stringIncludes(stringIncludes);const stringIndexOf=uncurryThis(stringPrototype.indexOf);$h_once.stringIndexOf(stringIndexOf);const stringMatch=uncurryThis(stringPrototype.match);$h_once.stringMatch(stringMatch);const stringReplace=uncurryThis(stringPrototype.replace);$h_once.stringReplace(stringReplace);const stringSearch=uncurryThis(stringPrototype.search);$h_once.stringSearch(stringSearch);const stringSlice=uncurryThis(stringPrototype.slice);$h_once.stringSlice(stringSlice);const stringSplit=uncurryThis(stringPrototype.split);$h_once.stringSplit(stringSplit);const stringStartsWith=uncurryThis(stringPrototype.startsWith);$h_once.stringStartsWith(stringStartsWith);const iterateString=uncurryThis(stringPrototype[iteratorSymbol]);$h_once.iterateString(iterateString);const weakmapDelete=uncurryThis(weakmapPrototype.delete);$h_once.weakmapDelete(weakmapDelete);const weakmapGet=uncurryThis(weakmapPrototype.get);$h_once.weakmapGet(weakmapGet);const weakmapHas=uncurryThis(weakmapPrototype.has);$h_once.weakmapHas(weakmapHas);const weakmapSet=uncurryThis(weakmapPrototype.set);$h_once.weakmapSet(weakmapSet);const weaksetAdd=uncurryThis(weaksetPrototype.add);$h_once.weaksetAdd(weaksetAdd);const weaksetGet=uncurryThis(weaksetPrototype.get);$h_once.weaksetGet(weaksetGet);const weaksetHas=uncurryThis(weaksetPrototype.has);$h_once.weaksetHas(weaksetHas);const functionToString=uncurryThis(functionPrototype.toString);$h_once.functionToString(functionToString);const{all:all}=Promise;$h_once.promiseAll(promises=>apply(all,Promise,[promises]));const promiseCatch=uncurryThis(promisePrototype.catch);$h_once.promiseCatch(promiseCatch);const promiseThen=uncurryThis(promisePrototype.then);$h_once.promiseThen(promiseThen);$h_once.getConstructorOf(fn=>reflectGet(getPrototypeOf(fn),"constructor"));const immutableObject=freeze(create(null));$h_once.immutableObject(immutableObject);$h_once.isObject(value=>Object(value)===value);$h_once.isError(value=>value instanceof FERAL_ERROR);const FERAL_EVAL=eval;$h_once.FERAL_EVAL(FERAL_EVAL);const FERAL_FUNCTION=Function;$h_once.FERAL_FUNCTION(FERAL_FUNCTION)},({imports:$h_imports,liveVar:$h_live,onceVar:$h_once})=>{$h_imports([])},({imports:$h_imports,liveVar:$h_live,onceVar:$h_once})=>{let Set,String,arrayJoin,arraySlice,freeze,is,isError,setAdd,setHas,stringIncludes,stringStartsWith,stringifyJson,toStringTagSymbol;$h_imports([["../commons.js",[["Set",[$h_a=>Set=$h_a]],["String",[$h_a=>String=$h_a]],["arrayJoin",[$h_a=>arrayJoin=$h_a]],["arraySlice",[$h_a=>arraySlice=$h_a]],["freeze",[$h_a=>freeze=$h_a]],["is",[$h_a=>is=$h_a]],["isError",[$h_a=>isError=$h_a]],["setAdd",[$h_a=>setAdd=$h_a]],["setHas",[$h_a=>setHas=$h_a]],["stringIncludes",[$h_a=>stringIncludes=$h_a]],["stringStartsWith",[$h_a=>stringStartsWith=$h_a]],["stringifyJson",[$h_a=>stringifyJson=$h_a]],["toStringTagSymbol",[$h_a=>toStringTagSymbol=$h_a]]]]]);$h_once.enJoin((terms,conjunction)=>{if(0===terms.length)return"(none)";if(1===terms.length)return terms[0];if(2===terms.length){const[first,second]=terms;return`${first} ${conjunction} ${second}`}return`${arrayJoin(arraySlice(terms,0,-1),", ")}, ${conjunction} ${terms[terms.length-1]}`});const an=str=>(str=""+str).length>=1&&stringIncludes("aeiouAEIOU",str[0])?"an "+str:"a "+str;$h_once.an(an),freeze(an);const bestEffortStringify=(payload,spaces)=>{const seenSet=new Set,replacer=(_,val)=>{switch(typeof val){case"object":return null===val?null:setHas(seenSet,val)?"[Seen]":(setAdd(seenSet,val),isError(val)?`[${val.name}: ${val.message}]`:toStringTagSymbol in val?`[${val[toStringTagSymbol]}]`:val);case"function":return`[Function ${val.name||"<anon>"}]`;case"string":return stringStartsWith(val,"[")?`[${val}]`:val;case"undefined":case"symbol":return`[${String(val)}]`;case"bigint":return`[${val}n]`;case"number":return is(val,NaN)?"[NaN]":val===1/0?"[Infinity]":val===-1/0?"[-Infinity]":val;default:return val}};try{return stringifyJson(payload,replacer,spaces)}catch(_err){return"[Something that failed to stringify]"}};$h_once.bestEffortStringify(bestEffortStringify),freeze(bestEffortStringify)},({imports:$h_imports,liveVar:$h_live,onceVar:$h_once})=>{$h_imports([])},({imports:$h_imports,liveVar:$h_live,onceVar:$h_once})=>{let RangeError,TypeError,WeakMap,arrayJoin,arrayMap,arrayPop,arrayPush,assign,freeze,globalThis,is,isError,stringIndexOf,stringReplace,stringSlice,stringStartsWith,weakmapDelete,weakmapGet,weakmapHas,weakmapSet,an,bestEffortStringify;$h_imports([["../commons.js",[["RangeError",[$h_a=>RangeError=$h_a]],["TypeError",[$h_a=>TypeError=$h_a]],["WeakMap",[$h_a=>WeakMap=$h_a]],["arrayJoin",[$h_a=>arrayJoin=$h_a]],["arrayMap",[$h_a=>arrayMap=$h_a]],["arrayPop",[$h_a=>arrayPop=$h_a]],["arrayPush",[$h_a=>arrayPush=$h_a]],["assign",[$h_a=>assign=$h_a]],["freeze",[$h_a=>freeze=$h_a]],["globalThis",[$h_a=>globalThis=$h_a]],["is",[$h_a=>is=$h_a]],["isError",[$h_a=>isError=$h_a]],["stringIndexOf",[$h_a=>stringIndexOf=$h_a]],["stringReplace",[$h_a=>stringReplace=$h_a]],["stringSlice",[$h_a=>stringSlice=$h_a]],["stringStartsWith",[$h_a=>stringStartsWith=$h_a]],["weakmapDelete",[$h_a=>weakmapDelete=$h_a]],["weakmapGet",[$h_a=>weakmapGet=$h_a]],["weakmapHas",[$h_a=>weakmapHas=$h_a]],["weakmapSet",[$h_a=>weakmapSet=$h_a]]]],["./stringify-utils.js",[["an",[$h_a=>an=$h_a]],["bestEffortStringify",[$h_a=>bestEffortStringify=$h_a]]]],["./types.js",[]],["./internal-types.js",[]]]);const declassifiers=new WeakMap,quote=(payload,spaces)=>{const result=freeze({toString:freeze(()=>bestEffortStringify(payload,spaces))});return weakmapSet(declassifiers,result,payload),result};freeze(quote);const hiddenDetailsMap=new WeakMap,getMessageString=({template:template,args:args})=>{const parts=[template[0]];for(let i=0;i<args.length;i+=1){const arg=args[i];let argStr;argStr=weakmapHas(declassifiers,arg)?""+arg:isError(arg)?`(${an(arg.name)})`:`(${an(typeof arg)})`,arrayPush(parts,argStr,template[i+1])}return arrayJoin(parts,"")},DetailsTokenProto=freeze({toString(){const hiddenDetails=weakmapGet(hiddenDetailsMap,this);return void 0===hiddenDetails?"[Not a DetailsToken]":getMessageString(hiddenDetails)}});freeze(DetailsTokenProto.toString);const redactedDetails=(template,...args)=>{const detailsToken=freeze({__proto__:DetailsTokenProto});return weakmapSet(hiddenDetailsMap,detailsToken,{template:template,args:args}),detailsToken};freeze(redactedDetails);const unredactedDetails=(template,...args)=>(args=arrayMap(args,arg=>weakmapHas(declassifiers,arg)?arg:quote(arg)),redactedDetails(template,...args));$h_once.unredactedDetails(unredactedDetails),freeze(unredactedDetails);const getLogArgs=({template:template,args:args})=>{const logArgs=[template[0]];for(let i=0;i<args.length;i+=1){let arg=args[i];weakmapHas(declassifiers,arg)&&(arg=weakmapGet(declassifiers,arg));const priorWithoutSpace=stringReplace(arrayPop(logArgs)||"",/ $/,"");""!==priorWithoutSpace&&arrayPush(logArgs,priorWithoutSpace);const nextWithoutSpace=stringReplace(template[i+1],/^ /,"");arrayPush(logArgs,arg,nextWithoutSpace)}return""===logArgs[logArgs.length-1]&&arrayPop(logArgs),logArgs},hiddenMessageLogArgs=new WeakMap;let errorTagNum=0;const errorTags=new WeakMap,tagError=(err,optErrorName=err.name)=>{let errorTag=weakmapGet(errorTags,err);return void 0!==errorTag||(errorTagNum+=1,errorTag=`${optErrorName}#${errorTagNum}`,weakmapSet(errorTags,err,errorTag)),errorTag},makeError=(optDetails=redactedDetails`Assert failed`,ErrorConstructor=globalThis.Error,{errorName:errorName}={})=>{"string"==typeof optDetails&&(optDetails=redactedDetails([optDetails]));const hiddenDetails=weakmapGet(hiddenDetailsMap,optDetails);if(void 0===hiddenDetails)throw new TypeError("unrecognized details "+quote(optDetails));const error=new ErrorConstructor(getMessageString(hiddenDetails));return weakmapSet(hiddenMessageLogArgs,error,getLogArgs(hiddenDetails)),void 0!==errorName&&tagError(error,errorName),error};freeze(makeError);const hiddenNoteLogArgsArrays=new WeakMap,hiddenNoteCallbackArrays=new WeakMap,note=(error,detailsNote)=>{"string"==typeof detailsNote&&(detailsNote=redactedDetails([detailsNote]));const hiddenDetails=weakmapGet(hiddenDetailsMap,detailsNote);if(void 0===hiddenDetails)throw new TypeError("unrecognized details "+quote(detailsNote));const logArgs=getLogArgs(hiddenDetails),callbacks=weakmapGet(hiddenNoteCallbackArrays,error);if(void 0!==callbacks)for(const callback of callbacks)callback(error,logArgs);else{const logArgsArray=weakmapGet(hiddenNoteLogArgsArrays,error);void 0!==logArgsArray?arrayPush(logArgsArray,logArgs):weakmapSet(hiddenNoteLogArgsArrays,error,[logArgs])}};freeze(note);const loggedErrorHandler={getStackString:globalThis.getStackString||(error=>{if(!("stack"in error))return"";const stackString=""+error.stack,pos=stringIndexOf(stackString,"\n");return stringStartsWith(stackString," ")||-1===pos?stackString:stringSlice(stackString,pos+1)}),tagError:error=>tagError(error),resetErrorTagNum:()=>{errorTagNum=0},getMessageLogArgs:error=>weakmapGet(hiddenMessageLogArgs,error),takeMessageLogArgs:error=>{const result=weakmapGet(hiddenMessageLogArgs,error);return weakmapDelete(hiddenMessageLogArgs,error),result},takeNoteLogArgsArray:(error,callback)=>{const result=weakmapGet(hiddenNoteLogArgsArrays,error);if(weakmapDelete(hiddenNoteLogArgsArrays,error),void 0!==callback){const callbacks=weakmapGet(hiddenNoteCallbackArrays,error);callbacks?arrayPush(callbacks,callback):weakmapSet(hiddenNoteCallbackArrays,error,[callback])}return result||[]}};$h_once.loggedErrorHandler(loggedErrorHandler),freeze(loggedErrorHandler);const makeAssert=(optRaise,unredacted=!1)=>{const details=unredacted?unredactedDetails:redactedDetails,fail=(optDetails=details`Assert failed`,ErrorConstructor=globalThis.Error)=>{const reason=makeError(optDetails,ErrorConstructor);throw void 0!==optRaise&&optRaise(reason),reason};function baseAssert(flag,optDetails=details`Check failed`,ErrorConstructor=globalThis.Error){if(!flag)throw fail(optDetails,ErrorConstructor)}freeze(fail);const equal=(actual,expected,optDetails=details`Expected ${actual} is same as ${expected}`,ErrorConstructor=RangeError)=>{baseAssert(is(actual,expected),optDetails,ErrorConstructor)};freeze(equal);const assertTypeof=(specimen,typename,optDetails)=>{baseAssert("string"==typeof typename,details`${quote(typename)} must be a string`),void 0===optDetails&&(optDetails=details([""," must be "+an(typename)],specimen)),equal(typeof specimen,typename,optDetails,TypeError)};freeze(assertTypeof);const assert=assign(baseAssert,{error:makeError,fail:fail,equal:equal,typeof:assertTypeof,string:(specimen,optDetails)=>assertTypeof(specimen,"string",optDetails),note:note,details:details,quote:quote,makeAssert:makeAssert});return freeze(assert)};$h_once.makeAssert(makeAssert),freeze(makeAssert);const assert=makeAssert();$h_once.assert(assert)},({imports:$h_imports,liveVar:$h_live,onceVar:$h_once})=>{let FERAL_FUNCTION,arrayJoin;$h_imports([["./commons.js",[["FERAL_FUNCTION",[$h_a=>FERAL_FUNCTION=$h_a]],["arrayJoin",[$h_a=>arrayJoin=$h_a]]]]]);$h_once.makeEvaluateFactory((constants=[])=>{const optimizer=function(constants){return 0===constants.length?"":`const {${arrayJoin(constants,",")}} = this;`}(constants);return FERAL_FUNCTION(`\n with (this) {\n ${optimizer}\n return function() {\n 'use strict';\n return eval(arguments[0]);\n };\n }\n `)})},({imports:$h_imports,liveVar:$h_live,onceVar:$h_once})=>{let arrayFilter,arrayIncludes,getOwnPropertyDescriptor,getOwnPropertyNames,objectHasOwnProperty,regexpTest;$h_imports([["./commons.js",[["arrayFilter",[$h_a=>arrayFilter=$h_a]],["arrayIncludes",[$h_a=>arrayIncludes=$h_a]],["getOwnPropertyDescriptor",[$h_a=>getOwnPropertyDescriptor=$h_a]],["getOwnPropertyNames",[$h_a=>getOwnPropertyNames=$h_a]],["objectHasOwnProperty",[$h_a=>objectHasOwnProperty=$h_a]],["regexpTest",[$h_a=>regexpTest=$h_a]]]]]);const keywords=["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"],identifierPattern=/^[a-zA-Z_$][\w$]*$/,isValidIdentifierName=name=>"eval"!==name&&!arrayIncludes(keywords,name)&®expTest(identifierPattern,name);function isImmutableDataProperty(obj,name){const desc=getOwnPropertyDescriptor(obj,name);return!1===desc.configurable&&!1===desc.writable&&objectHasOwnProperty(desc,"value")}$h_once.isValidIdentifierName(isValidIdentifierName);$h_once.getScopeConstants((globalObject,localObject={})=>{const globalNames=getOwnPropertyNames(globalObject),localNames=getOwnPropertyNames(localObject),localConstants=arrayFilter(localNames,name=>isValidIdentifierName(name)&&isImmutableDataProperty(localObject,name));return[...arrayFilter(globalNames,name=>!arrayIncludes(localNames,name)&&isValidIdentifierName(name)&&isImmutableDataProperty(globalObject,name)),...localConstants]})},({imports:$h_imports,liveVar:$h_live,onceVar:$h_once})=>{let FERAL_EVAL,Proxy,String,TypeError,create,freeze,getOwnPropertyDescriptor,getOwnPropertyDescriptors,globalThis,immutableObject,objectHasOwnProperty,reflectGet,reflectSet,assert;$h_imports([["./commons.js",[["FERAL_EVAL",[$h_a=>FERAL_EVAL=$h_a]],["Proxy",[$h_a=>Proxy=$h_a]],["String",[$h_a=>String=$h_a]],["TypeError",[$h_a=>TypeError=$h_a]],["create",[$h_a=>create=$h_a]],["freeze",[$h_a=>freeze=$h_a]],["getOwnPropertyDescriptor",[$h_a=>getOwnPropertyDescriptor=$h_a]],["getOwnPropertyDescriptors",[$h_a=>getOwnPropertyDescriptors=$h_a]],["globalThis",[$h_a=>globalThis=$h_a]],["immutableObject",[$h_a=>immutableObject=$h_a]],["objectHasOwnProperty",[$h_a=>objectHasOwnProperty=$h_a]],["reflectGet",[$h_a=>reflectGet=$h_a]],["reflectSet",[$h_a=>reflectSet=$h_a]]]],["./error/assert.js",[["assert",[$h_a=>assert=$h_a]]]]]);const{details:d,quote:q}=assert,alwaysThrowHandler=new Proxy(immutableObject,freeze({get(_shadow,prop){assert.fail(d`Please report unexpected scope handler trap: ${q(String(prop))}`)}}));$h_once.createScopeHandler((globalObject,localObject={},{sloppyGlobalsMode:sloppyGlobalsMode=!1}={})=>{let allowNextEvalToBeUnsafe=!1;return{admitOneUnsafeEvalNext:()=>{allowNextEvalToBeUnsafe=!0},resetOneUnsafeEvalNext:()=>{const wasSet=allowNextEvalToBeUnsafe;return allowNextEvalToBeUnsafe=!1,wasSet},scopeHandler:freeze(create(alwaysThrowHandler,getOwnPropertyDescriptors({get(_shadow,prop){if("symbol"!=typeof prop)return"eval"===prop&&!0===allowNextEvalToBeUnsafe?(allowNextEvalToBeUnsafe=!1,FERAL_EVAL):prop in localObject?reflectGet(localObject,prop,globalObject):reflectGet(globalObject,prop)},set(_shadow,prop,value){if(prop in localObject){const desc=getOwnPropertyDescriptor(localObject,prop);return objectHasOwnProperty(desc,"value")?reflectSet(localObject,prop,value):reflectSet(localObject,prop,value,globalObject)}return reflectSet(globalObject,prop,value)},has:(_shadow,prop)=>sloppyGlobalsMode||allowNextEvalToBeUnsafe&&"eval"===prop||prop in localObject||prop in globalObject||prop in globalThis,getPrototypeOf:()=>null,getOwnPropertyDescriptor(_target,prop){const quotedProp=q(String(prop));console.warn("getOwnPropertyDescriptor trap on scopeHandler for "+quotedProp,(new TypeError).stack)}})))}})},({imports:$h_imports,liveVar:$h_live,onceVar:$h_once})=>{let FERAL_REG_EXP,regexpExec,stringSlice;$h_imports([["./commons.js",[["FERAL_REG_EXP",[$h_a=>FERAL_REG_EXP=$h_a]],["regexpExec",[$h_a=>regexpExec=$h_a]],["stringSlice",[$h_a=>stringSlice=$h_a]]]]]);const sourceMetaEntriesRegExp=new FERAL_REG_EXP("(?:\\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*$");$h_once.getSourceURL(src=>{let sourceURL="<unknown>";for(;src.length>0;){const match=regexpExec(sourceMetaEntriesRegExp,src);if(null===match)break;src=stringSlice(src,0,src.length-match[0].length),"sourceURL"===match[3]?sourceURL=match[4]:"sourceURL"===match[1]&&(sourceURL=match[2])}return sourceURL})},({imports:$h_imports,liveVar:$h_live,onceVar:$h_once})=>{let FERAL_REG_EXP,SyntaxError,stringReplace,stringSearch,stringSlice,stringSplit,getSourceURL;function getLineNumber(src,pattern){const index=stringSearch(src,pattern);if(index<0)return-1;const adjustment="\n"===src[index]?1:0;return stringSplit(stringSlice(src,0,index),"\n").length+adjustment}$h_imports([["./commons.js",[["FERAL_REG_EXP",[$h_a=>FERAL_REG_EXP=$h_a]],["SyntaxError",[$h_a=>SyntaxError=$h_a]],["stringReplace",[$h_a=>stringReplace=$h_a]],["stringSearch",[$h_a=>stringSearch=$h_a]],["stringSlice",[$h_a=>stringSlice=$h_a]],["stringSplit",[$h_a=>stringSplit=$h_a]]]],["./get-source-url.js",[["getSourceURL",[$h_a=>getSourceURL=$h_a]]]]]);const htmlCommentPattern=new FERAL_REG_EXP("(?:\x3c!--|--\x3e)","g"),rejectHtmlComments=src=>{const lineNumber=getLineNumber(src,htmlCommentPattern);if(lineNumber<0)return src;const name=getSourceURL(src);throw new SyntaxError(`Possible HTML comment rejected at ${name}:${lineNumber}. (SES_HTML_COMMENT_REJECTED)`)};$h_once.rejectHtmlComments(rejectHtmlComments);$h_once.evadeHtmlCommentTest(src=>stringReplace(src,htmlCommentPattern,match=>"<"===match[0]?"< ! --":"-- >"));const importPattern=new FERAL_REG_EXP("(^|[^.])\\bimport(\\s*(?:\\(|/[/*]))","g"),rejectImportExpressions=src=>{const lineNumber=getLineNumber(src,importPattern);if(lineNumber<0)return src;const name=getSourceURL(src);throw new SyntaxError(`Possible import expression rejected at ${name}:${lineNumber}. (SES_IMPORT_REJECTED)`)};$h_once.rejectImportExpressions(rejectImportExpressions);$h_once.evadeImportExpressionTest(src=>stringReplace(src,importPattern,(_,p1,p2)=>`${p1}__import__${p2}`));const someDirectEvalPattern=new FERAL_REG_EXP("(^|[^.])\\beval(\\s*\\()","g");$h_once.rejectSomeDirectEvalExpressions(src=>{const lineNumber=getLineNumber(src,someDirectEvalPattern);if(lineNumber<0)return src;const name=getSourceURL(src);throw new SyntaxError(`Possible direct eval expression rejected at ${name}:${lineNumber}. (SES_EVAL_REJECTED)`)});$h_once.mandatoryTransforms(source=>(source=rejectHtmlComments(source),source=rejectImportExpressions(source)));$h_once.applyTransforms((source,transforms)=>{for(const transform of transforms)source=transform(source);return source})},({imports:$h_imports,liveVar:$h_live,onceVar:$h_once})=>{let WeakSet,apply,immutableObject,proxyRevocable,weaksetAdd,getScopeConstants,createScopeHandler,applyTransforms,mandatoryTransforms,makeEvaluateFactory,assert;$h_imports([["./commons.js",[["WeakSet",[$h_a=>WeakSet=$h_a]],["apply",[$h_a=>apply=$h_a]],["immutableObject",[$h_a=>immutableObject=$h_a]],["proxyRevocable",[$h_a=>proxyRevocable=$h_a]],["weaksetAdd",[$h_a=>weaksetAdd=$h_a]]]],["./scope-constants.js",[["getScopeConstants",[$h_a=>getScopeConstants=$h_a]]]],["./scope-handler.js",[["createScopeHandler",[$h_a=>createScopeHandler=$h_a]]]],["./transforms.js",[["applyTransforms",[$h_a=>applyTransforms=$h_a]],["mandatoryTransforms",[$h_a=>mandatoryTransforms=$h_a]]]],["./make-evaluate-factory.js",[["makeEvaluateFactory",[$h_a=>makeEvaluateFactory=$h_a]]]],["./error/assert.js",[["assert",[$h_a=>assert=$h_a]]]]]);const{details:d}=assert;$h_once.makeSafeEvaluator(({globalObject:globalObject,localObject:localObject={},globalTransforms:globalTransforms=[],sloppyGlobalsMode:sloppyGlobalsMode=!1,knownScopeProxies:knownScopeProxies=new WeakSet}={})=>{const{scopeHandler:scopeHandler,admitOneUnsafeEvalNext:admitOneUnsafeEvalNext,resetOneUnsafeEvalNext:resetOneUnsafeEvalNext}=createScopeHandler(globalObject,localObject,{sloppyGlobalsMode:sloppyGlobalsMode}),{proxy:scopeProxy,revoke:revokeScopeProxy}=proxyRevocable(immutableObject,scopeHandler);let evaluate;weaksetAdd(knownScopeProxies,scopeProxy);return{safeEvaluate:(source,{localTransforms:localTransforms=[]}={})=>{let err;(()=>{if(!evaluate){const constants=getScopeConstants(globalObject,localObject),evaluateFactory=makeEvaluateFactory(constants);evaluate=apply(evaluateFactory,scopeProxy,[])}})(),source=applyTransforms(source,[...localTransforms,...globalTransforms,mandatoryTransforms]),admitOneUnsafeEvalNext();try{return apply(evaluate,globalObject,[source])}catch(e){throw err=e,e}finally{resetOneUnsafeEvalNext()&&(revokeScopeProxy(),assert.fail(d`handler did not reset allowNextEvalToBeUnsafe ${err}`))}}}})},({imports:$h_imports,liveVar:$h_live,onceVar:$h_once})=>{let TypeError,arrayPush,create,defineProperties,getOwnPropertyDescriptors,evadeHtmlCommentTest,evadeImportExpressionTest,rejectSomeDirectEvalExpressions,makeSafeEvaluator;$h_imports([["./commons.js",[["TypeError",[$h_a=>TypeError=$h_a]],["arrayPush",[$h_a=>arrayPush=$h_a]],["create",[$h_a=>create=$h_a]],["defineProperties",[$h_a=>defineProperties=$h_a]],["getOwnPropertyDescriptors",[$h_a=>getOwnPropertyDescriptors=$h_a]]]],["./transforms.js",[["evadeHtmlCommentTest",[$h_a=>evadeHtmlCommentTest=$h_a]],["evadeImportExpressionTest",[$h_a=>evadeImportExpressionTest=$h_a]],["rejectSomeDirectEvalExpressions",[$h_a=>rejectSomeDirectEvalExpressions=$h_a]]]],["./make-safe-evaluator.js",[["makeSafeEvaluator",[$h_a=>makeSafeEvaluator=$h_a]]]]]);const provideCompartmentEvaluator=(compartmentFields,options)=>{const{sloppyGlobalsMode:sloppyGlobalsMode=!1,__moduleShimLexicals__:__moduleShimLexicals__}=options;let safeEvaluate;if(void 0!==__moduleShimLexicals__||sloppyGlobalsMode){let{globalTransforms:globalTransforms}=compartmentFields;const{globalObject:globalObject,globalLexicals:globalLexicals,knownScopeProxies:knownScopeProxies}=compartmentFields;let localObject=globalLexicals;void 0!==__moduleShimLexicals__&&(globalTransforms=void 0,localObject=create(null,getOwnPropertyDescriptors(globalLexicals)),defineProperties(localObject,getOwnPropertyDescriptors(__moduleShimLexicals__))),({safeEvaluate:safeEvaluate}=makeSafeEvaluator({globalObject:globalObject,localObject:localObject,globalTransforms:globalTransforms,sloppyGlobalsMode:sloppyGlobalsMode,knownScopeProxies:knownScopeProxies}))}else({safeEvaluate:safeEvaluate}=compartmentFields);return{safeEvaluate:safeEvaluate}};$h_once.provideCompartmentEvaluator(provideCompartmentEvaluator);$h_once.compartmentEvaluate((compartmentFields,source,options)=>{if("string"!=typeof source)throw new TypeError("first argument of evaluate() must be a string");const{transforms:transforms=[],__evadeHtmlCommentTest__:__evadeHtmlCommentTest__=!1,__evadeImportExpressionTest__:__evadeImportExpressionTest__=!1,__rejectSomeDirectEvalExpressions__:__rejectSomeDirectEvalExpressions__=!0}=options,localTransforms=[...transforms];!0===__evadeHtmlCommentTest__&&arrayPush(localTransforms,evadeHtmlCommentTest),!0===__evadeImportExpressionTest__&&arrayPush(localTransforms,evadeImportExpressionTest),!0===__rejectSomeDirectEvalExpressions__&&arrayPush(localTransforms,rejectSomeDirectEvalExpressions);const{safeEvaluate:safeEvaluate}=provideCompartmentEvaluator(compartmentFields,options);return safeEvaluate(source,{localTransforms:localTransforms})})},({imports:$h_imports,liveVar:$h_live,onceVar:$h_once})=>{$h_imports([]);$h_once.makeEvalFunction(safeEvaluate=>source=>"string"!=typeof source?source:safeEvaluate(source))},({imports:$h_imports,liveVar:$h_live,onceVar:$h_once})=>{let FERAL_FUNCTION,arrayJoin,arrayPop,defineProperties,getPrototypeOf,assert;$h_imports([["./commons.js",[["FERAL_FUNCTION",[$h_a=>FERAL_FUNCTION=$h_a]],["arrayJoin",[$h_a=>arrayJoin=$h_a]],["arrayPop",[$h_a=>arrayPop=$h_a]],["defineProperties",[$h_a=>defineProperties=$h_a]],["getPrototypeOf",[$h_a=>getPrototypeOf=$h_a]]]],["./error/assert.js",[["assert",[$h_a=>assert=$h_a]]]]]);$h_once.makeFunctionConstructor(safeEvaluate=>{const newFunction=function(_body){const bodyText=""+(arrayPop(arguments)||""),parameters=""+arrayJoin(arguments,",");new FERAL_FUNCTION(parameters,""),new FERAL_FUNCTION(bodyText);const src=`(function anonymous(${parameters}\n) {\n${bodyText}\n})`;return safeEvaluate(src)};return defineProperties(newFunction,{prototype:{value:FERAL_FUNCTION.prototype,writable:!1,enumerable:!1,configurable:!1}}),assert(getPrototypeOf(FERAL_FUNCTION)===FERAL_FUNCTION.prototype,"Function prototype is the same accross compartments"),assert(getPrototypeOf(newFunction)===FERAL_FUNCTION.prototype,"Function constructor prototype is the same accross compartments"),newFunction})},({imports:$h_imports,liveVar:$h_live,onceVar:$h_once})=>{$h_imports([]);const constantProperties={Infinity:1/0,NaN:NaN,undefined:void 0};$h_once.constantProperties(constantProperties);$h_once.universalPropertyNames({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"});$h_once.initialGlobalPropertyNames({Date:"%InitialDate%",Error:"%InitialError%",RegExp:"%InitialRegExp%",Math:"%InitialMath%",getStackString:"%InitialGetStackString%"});$h_once.sharedGlobalPropertyNames({Date:"%SharedDate%",Error:"%SharedError%",RegExp:"%SharedRegExp%",Math:"%SharedMath%"});$h_once.uniqueGlobalPropertyNames({globalThis:"%UniqueGlobalThis%",eval:"%UniqueEval%",Function:"%UniqueFunction%",Compartment:"%UniqueCompartment%"});const NativeErrors=[EvalError,RangeError,ReferenceError,SyntaxError,TypeError,URIError];$h_once.NativeErrors(NativeErrors);const FunctionInstance={"[[Proto]]":"%FunctionPrototype%",length:"number",name:"string"};$h_once.FunctionInstance(FunctionInstance);const fn=FunctionInstance,asyncFn={"[[Proto]]":"%AsyncFunctionPrototype%"},getter={get:fn,set:"undefined"},accessor={get:fn,set:fn};function NativeError(prototype){return{"[[Proto]]":"%SharedError%",prototype:prototype}}function NativeErrorPrototype(constructor){return{"[[Proto]]":"%ErrorPrototype%",constructor:constructor,message:"string",name:"string",toString:!1}}function TypedArray(prototype){return{"[[Proto]]":"%TypedArray%",BYTES_PER_ELEMENT:"number",prototype:prototype}}function TypedArrayPrototype(constructor){return{"[[Proto]]":"%TypedArrayPrototype%",BYTES_PER_ELEMENT:"number",constructor:constructor}}$h_once.isAccessorPermit(permit=>permit===getter||permit===accessor);const SharedMath={E:"number",LN10:"number",LN2:"number",LOG10E:"number",LOG2E:"number",PI:"number",SQRT1_2:"number",SQRT2:"number","@@toStringTag":"string",abs:fn,acos:fn,acosh:fn,asin:fn,asinh:fn,atan:fn,atanh:fn,atan2:fn,cbrt:fn,ceil:fn,clz32:fn,cos:fn,cosh:fn,exp:fn,expm1:fn,floor:fn,fround:fn,hypot:fn,imul:fn,log:fn,log1p:fn,log10:fn,log2:fn,max:fn,min:fn,pow:fn,round:fn,sign:fn,sin:fn,sinh:fn,sqrt:fn,tan:fn,tanh:fn,trunc:fn,idiv:!1,idivmod:!1,imod:!1,imuldiv:!1,irem:!1,mod:!1},whitelist={"[[Proto]]":null,"%ThrowTypeError%":fn,Infinity:"number",NaN:"number",undefined:"undefined","%UniqueEval%":fn,isFinite:fn,isNaN:fn,parseFloat:fn,parseInt:fn,decodeURI:fn,decodeURIComponent:fn,encodeURI:fn,encodeURIComponent:fn,Object:{"[[Proto]]":"%FunctionPrototype%",assign:fn,create:fn,defineProperties:fn,defineProperty:fn,entries:fn,freeze:fn,fromEntries:fn,getOwnPropertyDescriptor:fn,getOwnPropertyDescriptors:fn,getOwnPropertyNames:fn,getOwnPropertySymbols:fn,getPrototypeOf:fn,is:fn,isExtensible:fn,isFrozen:fn,isSealed:fn,keys:fn,preventExtensions:fn,prototype:"%ObjectPrototype%",seal:fn,setPrototypeOf:fn,values:fn,hasOwn:fn},"%ObjectPrototype%":{"[[Proto]]":null,constructor:"Object",hasOwnProperty:fn,isPrototypeOf:fn,propertyIsEnumerable:fn,toLocaleString:fn,toString:fn,valueOf:fn,"--proto--":accessor,__defineGetter__:fn,__defineSetter__:fn,__lookupGetter__:fn,__lookupSetter__:fn},"%UniqueFunction%":{"[[Proto]]":"%FunctionPrototype%",prototype:"%FunctionPrototype%"},"%InertFunction%":{"[[Proto]]":"%FunctionPrototype%",prototype:"%FunctionPrototype%"},"%FunctionPrototype%":{apply:fn,bind:fn,call:fn,constructor:"%InertFunction%",toString:fn,"@@hasInstance":fn,caller:!1,arguments:!1},Boolean:{"[[Proto]]":"%FunctionPrototype%",prototype:"%BooleanPrototype%"},"%BooleanPrototype%":{constructor:"Boolean",toString:fn,valueOf:fn},Symbol:{"[[Proto]]":"%FunctionPrototype%",asyncIterator:"symbol",for:fn,hasInstance:"symbol",isConcatSpreadable:"symbol",iterator:"symbol",keyFor:fn,match:"symbol",matchAll:"symbol",prototype:"%SymbolPrototype%",replace:"symbol",search:"symbol",species:"symbol",split:"symbol",toPrimitive:"symbol",toStringTag:"symbol",unscopables:"symbol"},"%SymbolPrototype%":{constructor:"Symbol",description:getter,toString:fn,valueOf:fn,"@@toPrimitive":fn,"@@toStringTag":"string"},"%InitialError%":{"[[Proto]]":"%FunctionPrototype%",prototype:"%ErrorPrototype%",captureStackTrace:fn,stackTraceLimit:accessor,prepareStackTrace:accessor},"%SharedError%":{"[[Proto]]":"%FunctionPrototype%",prototype:"%ErrorPrototype%",captureStackTrace:fn,stackTraceLimit:accessor,prepareStackTrace:accessor},"%ErrorPrototype%":{constructor:"%SharedError%",message:"string",name:"string",toString:fn,at:!1,stack:!1},EvalError:NativeError("%EvalErrorPrototype%"),RangeError:NativeError("%RangeErrorPrototype%"),ReferenceError:NativeError("%ReferenceErrorPrototype%"),SyntaxError:NativeError("%SyntaxErrorPrototype%"),TypeError:NativeError("%TypeErrorPrototype%"),URIError:NativeError("%URIErrorPrototype%"),"%EvalErrorPrototype%":NativeErrorPrototype("EvalError"),"%RangeErrorPrototype%":NativeErrorPrototype("RangeError"),"%ReferenceErrorPrototype%":NativeErrorPrototype("ReferenceError"),"%SyntaxErrorPrototype%":NativeErrorPrototype("SyntaxError"),"%TypeErrorPrototype%":NativeErrorPrototype("TypeError"),"%URIErrorPrototype%":NativeErrorPrototype("URIError"),Number:{"[[Proto]]":"%FunctionPrototype%",EPSILON:"number",isFinite:fn,isInteger:fn,isNaN:fn,isSafeInteger:fn,MAX_SAFE_INTEGER:"number",MAX_VALUE:"number",MIN_SAFE_INTEGER:"number",MIN_VALUE:"number",NaN:"number",NEGATIVE_INFINITY:"number",parseFloat:fn,parseInt:fn,POSITIVE_INFINITY:"number",prototype:"%NumberPrototype%"},"%NumberPrototype%":{constructor:"Number",toExponential:fn,toFixed:fn,toLocaleString:fn,toPrecision:fn,toString:fn,valueOf:fn},BigInt:{"[[Proto]]":"%FunctionPrototype%",asIntN:fn,asUintN:fn,prototype:"%BigIntPrototype%",bitLength:!1,fromArrayBuffer:!1},"%BigIntPrototype%":{constructor:"BigInt",toLocaleString:fn,toString:fn,valueOf:fn,"@@toStringTag":"string"},"%InitialMath%":{...SharedMath,random:fn},"%SharedMath%":SharedMath,"%InitialDate%":{"[[Proto]]":"%FunctionPrototype%",now:fn,parse:fn,prototype:"%DatePrototype%",UTC:fn},"%SharedDate%":{"[[Proto]]":"%FunctionPrototype%",now:fn,parse:fn,prototype:"%DatePrototype%",UTC:fn},"%DatePrototype%":{constructor:"%SharedDate%",getDate:fn,getDay:fn,getFullYear:fn,getHours:fn,getMilliseconds:fn,getMinutes:fn,getMonth:fn,getSeconds:fn,getTime:fn,getTimezoneOffset:fn,getUTCDate:fn,getUTCDay:fn,getUTCFullYear:fn,getUTCHours:fn,getUTCMilliseconds:fn,getUTCMinutes:fn,getUTCMonth:fn,getUTCSeconds:fn,setDate:fn,setFullYear:fn,setHours:fn,setMilliseconds:fn,setMinutes:fn,setMonth:fn,setSeconds:fn,setTime:fn,setUTCDate:fn,setUTCFullYear:fn,setUTCHours:fn,setUTCMilliseconds:fn,setUTCMinutes:fn,setUTCMonth:fn,setUTCSeconds:fn,toDateString:fn,toISOString:fn,toJSON:fn,toLocaleDateString:fn,toLocaleString:fn,toLocaleTimeString:fn,toString:fn,toTimeString:fn,toUTCString:fn,valueOf:fn,"@@toPrimitive":fn,getYear:fn,setYear:fn,toGMTString:fn},String:{"[[Proto]]":"%FunctionPrototype%",fromCharCode:fn,fromCodePoint:fn,prototype:"%StringPrototype%",raw:fn,fromArrayBuffer:!1},"%StringPrototype%":{length:"number",charAt:fn,charCodeAt:fn,codePointAt:fn,concat:fn,constructor:"String",endsWith:fn,includes:fn,indexOf:fn,lastIndexOf:fn,localeCompare:fn,match:fn,matchAll:fn,normalize:fn,padEnd:fn,padStart:fn,repeat:fn,replace:fn,replaceAll:fn,search:fn,slice:fn,split:fn,startsWith:fn,substring:fn,toLocaleLowerCase:fn,toLocaleUpperCase:fn,toLowerCase:fn,toString:fn,toUpperCase:fn,trim:fn,trimEnd:fn,trimStart:fn,valueOf:fn,"@@iterator":fn,substr:fn,anchor:fn,big:fn,blink:fn,bold:fn,fixed:fn,fontcolor:fn,fontsize:fn,italics:fn,link:fn,small:fn,strike:fn,sub:fn,sup:fn,trimLeft:fn,trimRight:fn,compare:!1,at:fn},"%StringIteratorPrototype%":{"[[Proto]]":"%IteratorPrototype%",next:fn,"@@toStringTag":"string"},"%InitialRegExp%":{"[[Proto]]":"%FunctionPrototype%",prototype:"%RegExpPrototype%","@@species":getter,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":getter},"%RegExpPrototype%":{constructor:"%SharedRegExp%",exec:fn,dotAll:getter,flags:getter,global:getter,ignoreCase:getter,"@@match":fn,"@@matchAll":fn,multiline:getter,"@@replace":fn,"@@search":fn,source:getter,"@@split":fn,sticky:getter,test:fn,toString:fn,unicode:getter,compile:!1,hasIndices:!1},"%RegExpStringIteratorPrototype%":{"[[Proto]]":"%IteratorPrototype%",next:fn,"@@toStringTag":"string"},Array:{"[[Proto]]":"%FunctionPrototype%",from:fn,isArray:fn,of:fn,prototype:"%ArrayPrototype%","@@species":getter,at:fn},"%ArrayPrototype%":{length:"number",concat:fn,constructor:"Array",copyWithin:fn,entries:fn,every:fn,fill:fn,filter:fn,find:fn,findIndex:fn,flat:fn,flatMap:fn,forEach:fn,includes:fn,indexOf:fn,join:fn,keys:fn,lastIndexOf:fn,map:fn,pop:fn,push:fn,reduce:fn,reduceRight:fn,reverse:fn,shift:fn,slice:fn,some:fn,sort:fn,splice:fn,toLocaleString:fn,toString:fn,unshift:fn,values:fn,"@@iterator":fn,"@@unscopables":{"[[Proto]]":null,copyWithin:"boolean",entries:"boolean",fill:"boolean",find:"boolean",findIndex:"boolean",flat:"boolean",flatMap:"boolean",includes:"boolean",keys:"boolean",values:"boolean",at:!1},at:!1,findLast:fn,findLastIndex:fn},"%ArrayIteratorPrototype%":{"[[Proto]]":"%IteratorPrototype%",next:fn,"@@toStringTag":"string"},"%TypedArray%":{"[[Proto]]":"%FunctionPrototype%",from:fn,of:fn,prototype:"%TypedArrayPrototype%","@@species":getter},"%TypedArrayPrototype%":{buffer:getter,byteLength:getter,byteOffset:getter,constructor:"%TypedArray%",copyWithin:fn,entries:fn,every:fn,fill:fn,filter:fn,find:fn,findIndex:fn,forEach:fn,includes:fn,indexOf:fn,join:fn,keys:fn,lastIndexOf:fn,length:getter,map:fn,reduce:fn,reduceRight:fn,reverse:fn,set:fn,slice:fn,some:fn,sort:fn,subarray:fn,toLocaleString:fn,toString:fn,values:fn,"@@iterator":fn,"@@toStringTag":getter,at:!1,findLast:fn,findLastIndex:fn},BigInt64Array:TypedArray("%BigInt64ArrayPrototype%"),BigUint64Array:TypedArray("%BigUint64ArrayPrototype%"),Float32Array:TypedArray("%Float32ArrayPrototype%"),Float64Array:TypedArray("%Float64ArrayPrototype%"),Int16Array:TypedArray("%Int16ArrayPrototype%"),Int32Array:TypedArray("%Int32ArrayPrototype%"),Int8Array:TypedArray("%Int8ArrayPrototype%"),Uint16Array:TypedArray("%Uint16ArrayPrototype%"),Uint32Array:TypedArray("%Uint32ArrayPrototype%"),Uint8Array:TypedArray("%Uint8ArrayPrototype%"),Uint8ClampedArray:TypedArray("%Uint8ClampedArrayPrototype%"),"%BigInt64ArrayPrototype%":TypedArrayPrototype("BigInt64Array"),"%BigUint64ArrayPrototype%":TypedArrayPrototype("BigUint64Array"),"%Float32ArrayPrototype%":TypedArrayPrototype("Float32Array"),"%Float64ArrayPrototype%":TypedArrayPrototype("Float64Array"),"%Int16ArrayPrototype%":TypedArrayPrototype("Int16Array"),"%Int32ArrayPrototype%":TypedArrayPrototype("Int32Array"),"%Int8ArrayPrototype%":TypedArrayPrototype("Int8Array"),"%Uint16ArrayPrototype%":TypedArrayPrototype("Uint16Array"),"%Uint32ArrayPrototype%":TypedArrayPrototype("Uint32Array"),"%Uint8ArrayPrototype%":TypedArrayPrototype("Uint8Array"),"%Uint8ClampedArrayPrototype%":TypedArrayPrototype("Uint8ClampedArray"),Map:{"[[Proto]]":"%FunctionPrototype%","@@species":getter,prototype:"%MapPrototype%"},"%MapPrototype%":{clear:fn,constructor:"Map",delete:fn,entries:fn,forEach:fn,get:fn,has:fn,keys:fn,set:fn,size:getter,values:fn,"@@iterator":fn,"@@toStringTag":"string"},"%MapIteratorPrototype%":{"[[Proto]]":"%IteratorPrototype%",next:fn,"@@toStringTag":"string"},Set:{"[[Proto]]":"%FunctionPrototype%",prototype:"%SetPrototype%","@@species":getter},"%SetPrototype%":{add:fn,clear:fn,constructor:"Set",delete:fn,entries:fn,forEach:fn,has:fn,keys:fn,size:getter,values:fn,"@@iterator":fn,"@@toStringTag":"string"},"%SetIteratorPrototype%":{"[[Proto]]":"%IteratorPrototype%",next:fn,"@@toStringTag":"string"},WeakMap:{"[[Proto]]":"%FunctionPrototype%",prototype:"%WeakMapPrototype%"},"%WeakMapPrototype%":{constructor:"WeakMap",delete:fn,get:fn,has:fn,set:fn,"@@toStringTag":"string"},WeakSet:{"[[Proto]]":"%FunctionPrototype%",prototype:"%WeakSetPrototype%"},"%WeakSetPrototype%":{add:fn,constructor:"WeakSet",delete:fn,has:fn,"@@toStringTag":"string"},ArrayBuffer:{"[[Proto]]":"%FunctionPrototype%",isView:fn,prototype:"%ArrayBufferPrototype%","@@species":getter,fromString:!1,fromBigInt:!1},"%ArrayBufferPrototype%":{byteLength:getter,constructor:"ArrayBuffer",slice:fn,"@@toStringTag":"string",concat:!1,transfer:fn,resize:fn,resizable:getter,maxByteLength:getter},SharedArrayBuffer:!1,"%SharedArrayBufferPrototype%":!1,DataView:{"[[Proto]]":"%FunctionPrototype%",BYTES_PER_ELEMENT:"number",prototype:"%DataViewPrototype%"},"%DataViewPrototype%":{buffer:getter,byteLength:getter,byteOffset:getter,constructor:"DataView",getBigInt64:fn,getBigUint64:fn,getFloat32:fn,getFloat64:fn,getInt8:fn,getInt16:fn,getInt32:fn,getUint8:fn,getUint16:fn,getUint32:fn,setBigInt64:fn,setBigUint64:fn,setFloat32:fn,setFloat64:fn,setInt8:fn,setInt16:fn,setInt32:fn,setUint8:fn,setUint16:fn,setUint32:fn,"@@toStringTag":"string"},Atomics:!1,JSON:{parse:fn,stringify:fn,"@@toStringTag":"string"},"%IteratorPrototype%":{"@@iterator":fn},"%AsyncIteratorPrototype%":{"@@asyncIterator":fn},"%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:fn,return:fn,throw:fn,"@@toStringTag":"string"},"%AsyncGeneratorPrototype%":{"[[Proto]]":"%AsyncIteratorPrototype%",constructor:"%AsyncGenerator%",next:fn,return:fn,throw:fn,"@@toStringTag":"string"},HandledPromise:{"[[Proto]]":"Promise",applyFunction:fn,applyFunctionSendOnly:fn,applyMethod:fn,applyMethodSendOnly:fn,get:fn,getSendOnly:fn,prototype:"%PromisePrototype%",resolve:fn},Promise:{"[[Proto]]":"%FunctionPrototype%",all:fn,allSettled:fn,any:!1,prototype:"%PromisePrototype%",race:fn,reject:fn,resolve:fn,"@@species":getter},"%PromisePrototype%":{catch:fn,constructor:"Promise",finally:fn,then:fn,"@@toStringTag":"string"},"%InertAsyncFunction%":{"[[Proto]]":"%InertFunction%",prototype:"%AsyncFunctionPrototype%"},"%AsyncFunctionPrototype%":{"[[Proto]]":"%FunctionPrototype%",constructor:"%InertAsyncFunction%","@@toStringTag":"string"},Reflect:{apply:fn,construct:fn,defineProperty:fn,deleteProperty:fn,get:fn,getOwnPropertyDescriptor:fn,getPrototypeOf:fn,has:fn,isExtensible:fn,ownKeys:fn,preventExtensions:fn,set:fn,setPrototypeOf:fn,"@@toStringTag":"string"},Proxy:{"[[Proto]]":"%FunctionPrototype%",revocable:fn},escape:fn,unescape:fn,"%UniqueCompartment%":{"[[Proto]]":"%FunctionPrototype%",prototype:"%CompartmentPrototype%",toString:fn},"%InertCompartment%":{"[[Proto]]":"%FunctionPrototype%",prototype:"%CompartmentPrototype%",toString:fn},"%CompartmentPrototype%":{constructor:"%InertCompartment%",evaluate:fn,globalThis:getter,name:getter,toString:fn,__isKnownScopeProxy__:fn,import:asyncFn,load:asyncFn,importNow:fn,module:fn},lockdown:fn,harden:fn,"%InitialGetStackString%":fn};$h_once.whitelist(whitelist)},({imports:$h_imports,liveVar:$h_live,onceVar:$h_once})=>{let defineProperty,objectHasOwnProperty,entries,makeEvalFunction,makeFunctionConstructor,constantProperties,universalPropertyNames;$h_imports([["./commons.js",[["defineProperty",[$h_a=>defineProperty=$h_a]],["objectHasOwnProperty",[$h_a=>objectHasOwnProperty=$h_a]],["entries",[$h_a=>entries=$h_a]]]],["./make-eval-function.js",[["makeEvalFunction",[$h_a=>makeEvalFunction=$h_a]]]],["./make-function-constructor.js",[["makeFunctionConstructor",[$h_a=>makeFunctionConstructor=$h_a]]]],["./whitelist.js",[["constantProperties",[$h_a=>constantProperties=$h_a]],["universalPropertyNames",[$h_a=>universalPropertyNames=$h_a]]]]]);$h_once.setGlobalObjectConstantProperties(globalObject=>{for(const[name,constant]of entries(constantProperties))defineProperty(globalObject,name,{value:constant,writable:!1,enumerable:!1,configurable:!1})});$h_once.setGlobalObjectMutableProperties((globalObject,{intrinsics:intrinsics,newGlobalPropertyNames:newGlobalPropertyNames,makeCompartmentConstructor:makeCompartmentConstructor,safeEvaluate:safeEvaluate,markVirtualizedNativeFunction:markVirtualizedNativeFunction})=>{for(const[name,intrinsicName]of entries(universalPropertyNames))objectHasOwnProperty(intrinsics,intrinsicName)&&defineProperty(globalObject,name,{value:intrinsics[intrinsicName],writable:!0,enumerable:!1,configurable:!0});for(const[name,intrinsicName]of entries(newGlobalPropertyNames))objectHasOwnProperty(intrinsics,intrinsicName)&&defineProperty(globalObject,name,{value:intrinsics[intrinsicName],writable:!0,enumerable:!1,configurable:!0});const perCompartmentGlobals={globalThis:globalObject,eval:makeEvalFunction(safeEvaluate),Function:makeFunctionConstructor(safeEvaluate)};perCompartmentGlobals.Compartment=makeCompartmentConstructor(makeCompartmentConstructor,intrinsics,markVirtualizedNativeFunction);for(const[name,value]of entries(perCompartmentGlobals))defineProperty(globalObject,name,{value:value,writable:!0,enumerable:!1,configurable:!0}),"function"==typeof value&&markVirtualizedNativeFunction(value)})},({imports:$h_imports,liveVar:$h_live,onceVar:$h_once})=>{let ReferenceError,TypeError,Map,Set,arrayJoin,arrayMap,arrayPush,create,freeze,mapGet,mapHas,mapSet,setAdd,promiseCatch,promiseThen,values,weakmapGet,assert;$h_imports([["./commons.js",[["ReferenceError",[$h_a=>ReferenceError=$h_a]],["TypeError",[$h_a=>TypeError=$h_a]],["Map",[$h_a=>Map=$h_a]],["Set",[$h_a=>Set=$h_a]],["arrayJoin",[$h_a=>arrayJoin=$h_a]],["arrayMap",[$h_a=>arrayMap=$h_a]],["arrayPush",[$h_a=>arrayPush=$h_a]],["create",[$h_a=>create=$h_a]],["freeze",[$h_a=>freeze=$h_a]],["mapGet",[$h_a=>mapGet=$h_a]],["mapHas",[$h_a=>mapHas=$h_a]],["mapSet",[$h_a=>mapSet=$h_a]],["setAdd",[$h_a=>setAdd=$h_a]],["promiseCatch",[$h_a=>promiseCatch=$h_a]],["promiseThen",[$h_a=>promiseThen=$h_a]],["values",[$h_a=>values=$h_a]],["weakmapGet",[$h_a=>weakmapGet=$h_a]]]],["./error/assert.js",[["assert",[$h_a=>assert=$h_a]]]]]);const{details:d,quote:q}=assert,noop=()=>{};$h_once.makeAlias((compartment,specifier)=>freeze({compartment:compartment,specifier:specifier}));const loadRecord=async(compartmentPrivateFields,moduleAliases,compartment,moduleSpecifier,staticModuleRecord,pendingJobs,moduleLoads,errors)=>{const{resolveHook:resolveHook,moduleRecords:moduleRecords}=weakmapGet(compartmentPrivateFields,compartment),resolvedImports=((imports,resolveHook,fullReferrerSpecifier)=>{const resolvedImports=create(null);for(const importSpecifier of imports){const fullSpecifier=resolveHook(importSpecifier,fullReferrerSpecifier);resolvedImports[importSpecifier]=fullSpecifier}return freeze(resolvedImports)})(staticModuleRecord.imports,resolveHook,moduleSpecifier),moduleRecord=freeze({compartment:compartment,staticModuleRecord:staticModuleRecord,moduleSpecifier:moduleSpecifier,resolvedImports:resolvedImports});for(const fullSpecifier of values(resolvedImports)){const dependencyLoaded=memoizedLoadWithErrorAnnotation(compartmentPrivateFields,moduleAliases,compartment,fullSpecifier,pendingJobs,moduleLoads,errors);setAdd(pendingJobs,promiseThen(dependencyLoaded,noop,error=>{arrayPush(errors,error)}))}return mapSet(moduleRecords,moduleSpecifier,moduleRecord),moduleRecord},memoizedLoadWithErrorAnnotation=async(compartmentPrivateFields,moduleAliases,compartment,moduleSpecifier,pendingJobs,moduleLoads,errors)=>{const{name:compartmentName}=weakmapGet(compartmentPrivateFields,compartment);let compartmentLoading=mapGet(moduleLoads,compartment);void 0===compartmentLoading&&(compartmentLoading=new Map,mapSet(moduleLoads,compartment,compartmentLoading));let moduleLoading=mapGet(compartmentLoading,moduleSpecifier);return void 0!==moduleLoading||(moduleLoading=promiseCatch((async(compartmentPrivateFields,moduleAliases,compartment,moduleSpecifier,pendingJobs,moduleLoads,errors)=>{const{importHook:importHook,moduleMap:moduleMap,moduleMapHook:moduleMapHook,moduleRecords:moduleRecords}=weakmapGet(compartmentPrivateFields,compartment);let aliasNamespace=moduleMap[moduleSpecifier];if(void 0===aliasNamespace&&void 0!==moduleMapHook&&(aliasNamespace=moduleMapHook(moduleSpecifier)),"string"==typeof aliasNamespace)assert.fail(d`Cannot map module ${q(moduleSpecifier)} to ${q(aliasNamespace)} in parent compartment, not yet implemented`,TypeError);else if(void 0!==aliasNamespace){const alias=weakmapGet(moduleAliases,aliasNamespace);void 0===alias&&assert.fail(d`Cannot map module ${q(moduleSpecifier)} because the value is not a module exports namespace, or is from another realm`,ReferenceError);const aliasRecord=await memoizedLoadWithErrorAnnotation(compartmentPrivateFields,moduleAliases,alias.compartment,alias.specifier,pendingJobs,moduleLoads,errors);return mapSet(moduleRecords,moduleSpecifier,aliasRecord),aliasRecord}if(mapHas(moduleRecords,moduleSpecifier))return mapGet(moduleRecords,moduleSpecifier);const staticModuleRecord=await importHook(moduleSpecifier);if(null!==staticModuleRecord&&"object"==typeof staticModuleRecord||assert.fail(d`importHook must return a promise for an object, for module ${q(moduleSpecifier)} in compartment ${q(compartment.name)}`),void 0!==staticModuleRecord.record){const{compartment:aliasCompartment=compartment,specifier:aliasSpecifier=moduleSpecifier,record:aliasModuleRecord}=staticModuleRecord,aliasRecord=await loadRecord(compartmentPrivateFields,moduleAliases,aliasCompartment,aliasSpecifier,aliasModuleRecord,pendingJobs,moduleLoads,errors);return mapSet(moduleRecords,moduleSpecifier,aliasRecord),aliasRecord}return loadRecord(compartmentPrivateFields,moduleAliases,compartment,moduleSpecifier,staticModuleRecord,pendingJobs,moduleLoads,errors)})(compartmentPrivateFields,moduleAliases,compartment,moduleSpecifier,pendingJobs,moduleLoads,errors),error=>{throw assert.note(error,d`${error.message}, loading ${q(moduleSpecifier)} in compartment ${q(compartmentName)}`),error}),mapSet(compartmentLoading,moduleSpecifier,moduleLoading)),moduleLoading};$h_once.load(async(compartmentPrivateFields,moduleAliases,compartment,moduleSpecifier)=>{const{name:compartmentName}=weakmapGet(compartmentPrivateFields,compartment),pendingJobs=new Set,moduleLoads=new Map,errors=[],dependencyLoaded=memoizedLoadWithErrorAnnotation(compartmentPrivateFields,moduleAliases,compartment,moduleSpecifier,pendingJobs,moduleLoads,errors);setAdd(pendingJobs,promiseThen(dependencyLoaded,noop,error=>{arrayPush(errors,error)}));for(const job of pendingJobs)await job;if(errors.length>0)throw new TypeError(`Failed to load module ${q(moduleSpecifier)} in package ${q(compartmentName)} (${errors.length} underlying failures: ${arrayJoin(arrayMap(errors,error=>error.message),", ")}`)})},({imports:$h_imports,liveVar:$h_live,onceVar:$h_once})=>{let makeAlias,Proxy,TypeError,create,freeze,mapGet,mapHas,mapSet,ownKeys,reflectGet,reflectGetOwnPropertyDescriptor,reflectHas,reflectIsExtensible,reflectPreventExtensions,weakmapSet,assert;$h_imports([["./module-load.js",[["makeAlias",[$h_a=>makeAlias=$h_a]]]],["./commons.js",[["Proxy",[$h_a=>Proxy=$h_a]],["TypeError",[$h_a=>TypeError=$h_a]],["create",[$h_a=>create=$h_a]],["freeze",[$h_a=>freeze=$h_a]],["mapGet",[$h_a=>mapGet=$h_a]],["mapHas",[$h_a=>mapHas=$h_a]],["mapSet",[$h_a=>mapSet=$h_a]],["ownKeys",[$h_a=>ownKeys=$h_a]],["reflectGet",[$h_a=>reflectGet=$h_a]],["reflectGetOwnPropertyDescriptor",[$h_a=>reflectGetOwnPropertyDescriptor=$h_a]],["reflectHas",[$h_a=>reflectHas=$h_a]],["reflectIsExtensible",[$h_a=>reflectIsExtensible=$h_a]],["reflectPreventExtensions",[$h_a=>reflectPreventExtensions=$h_a]],["weakmapSet",[$h_a=>weakmapSet=$h_a]]]],["./error/assert.js",[["assert",[$h_a=>assert=$h_a]]]]]);const{quote:q}=assert,deferExports=()=>{let active=!1;const proxiedExports=create(null);return freeze({activate(){active=!0},proxiedExports:proxiedExports,exportsProxy:new Proxy(proxiedExports,{get(_target,name,receiver){if(!active)throw new TypeError(`Cannot get property ${q(name)} of module exports namespace, the module has not yet begun to execute`);return reflectGet(proxiedExports,name,receiver)},set(_target,name,_value){throw new TypeError(`Cannot set property ${q(name)} of module exports namespace`)},has(_target,name){if(!active)throw new TypeError(`Cannot check property ${q(name)}, the module has not yet begun to execute`);return reflectHas(proxiedExports,name)},deleteProperty(_target,name){throw new TypeError(`Cannot delete property ${q(name)}s of module exports namespace`)},ownKeys(_target){if(!active)throw new TypeError("Cannot enumerate keys, the module has not yet begun to execute");return ownKeys(proxiedExports)},getOwnPropertyDescriptor(_target,name){if(!active)throw new TypeError(`Cannot get own property descriptor ${q(name)}, the module has not yet begun to execute`);return reflectGetOwnPropertyDescriptor(proxiedExports,name)},preventExtensions(_target){if(!active)throw new TypeError("Cannot prevent extensions of module exports namespace, the module has not yet begun to execute");return reflectPreventExtensions(proxiedExports)},isExtensible(){if(!active)throw new TypeError("Cannot check extensibility of module exports namespace, the module has not yet begun to execute");return reflectIsExtensible(proxiedExports)},getPrototypeOf:_target=>null,setPrototypeOf(_target,_proto){throw new TypeError("Cannot set prototype of module exports namespace")},defineProperty(_target,name,_descriptor){throw new TypeError(`Cannot define property ${q(name)} of module exports namespace`)},apply(_target,_thisArg,_args){throw new TypeError("Cannot call module exports namespace, it is not a function")},construct(_target,_args){throw new TypeError("Cannot construct module exports namespace, it is not a constructor")}})})};$h_once.deferExports(deferExports);$h_once.getDeferredExports((compartment,compartmentPrivateFields,moduleAliases,specifier)=>{const{deferredExports:deferredExports}=compartmentPrivateFields;if(!mapHas(deferredExports,specifier)){const deferred=deferExports();weakmapSet(moduleAliases,deferred.exportsProxy,makeAlias(compartment,specifier)),mapSet(deferredExports,specifier,deferred)}return mapGet(deferredExports,specifier)})},({imports:$h_imports,liveVar:$h_live,onceVar:$h_once})=>{let assert,getDeferredExports,ReferenceError,SyntaxError,TypeError,arrayForEach,arrayIncludes,arrayPush,arraySome,arraySort,create,defineProperty,entries,freeze,isArray,keys,mapGet,weakmapGet,compartmentEvaluate;$h_imports([["./error/assert.js",[["assert",[$h_a=>assert=$h_a]]]],["./module-proxy.js",[["getDeferredExports",[$h_a=>getDeferredExports=$h_a]]]],["./commons.js",[["ReferenceError",[$h_a=>ReferenceError=$h_a]],["SyntaxError",[$h_a=>SyntaxError=$h_a]],["TypeError",[$h_a=>TypeError=$h_a]],["arrayForEach",[$h_a=>arrayForEach=$h_a]],["arrayIncludes",[$h_a=>arrayIncludes=$h_a]],["arrayPush",[$h_a=>arrayPush=$h_a]],["arraySome",[$h_a=>arraySome=$h_a]],["arraySort",[$h_a=>arraySort=$h_a]],["create",[$h_a=>create=$h_a]],["defineProperty",[$h_a=>defineProperty=$h_a]],["entries",[$h_a=>entries=$h_a]],["freeze",[$h_a=>freeze=$h_a]],["isArray",[$h_a=>isArray=$h_a]],["keys",[$h_a=>keys=$h_a]],["mapGet",[$h_a=>mapGet=$h_a]],["weakmapGet",[$h_a=>weakmapGet=$h_a]]]],["./compartment-evaluate.js",[["compartmentEvaluate",[$h_a=>compartmentEvaluate=$h_a]]]]]);const{quote:q}=assert;$h_once.makeThirdPartyModuleInstance((compartmentPrivateFields,staticModuleRecord,compartment,moduleAliases,moduleSpecifier,resolvedImports)=>{const{exportsProxy:exportsProxy,proxiedExports:proxiedExports,activate:activate}=getDeferredExports(compartment,weakmapGet(compartmentPrivateFields,compartment),moduleAliases,moduleSpecifier),notifiers=create(null);if(staticModuleRecord.exports){if(!isArray(staticModuleRecord.exports)||arraySome(staticModuleRecord.exports,name=>"string"!=typeof name))throw new TypeError('SES third-party static module record "exports" property must be an array of strings for module '+moduleSpecifier);arrayForEach(staticModuleRecord.exports,name=>{let value=proxiedExports[name];const updaters=[];defineProperty(proxiedExports,name,{get:()=>value,set:newValue=>{value=newValue;for(const updater of updaters)updater(newValue)},enumerable:!0,configurable:!1}),notifiers[name]=update=>{arrayPush(updaters,update),update(value)}})}let activated=!1;return freeze({notifiers:notifiers,exportsProxy:exportsProxy,execute(){activated||(activate(),activated=!0,staticModuleRecord.execute(proxiedExports,compartment,resolvedImports))}})});$h_once.makeModuleInstance((privateFields,moduleAliases,moduleRecord,importedInstances)=>{const{compartment:compartment,moduleSpecifier:moduleSpecifier,staticModuleRecord:staticModuleRecord}=moduleRecord,{reexports:exportAlls=[],__syncModuleProgram__:functorSource,__fixedExportMap__:fixedExportMap={},__liveExportMap__:liveExportMap={}}=staticModuleRecord,compartmentFields=weakmapGet(privateFields,compartment),{__shimTransforms__:__shimTransforms__}=compartmentFields,{exportsProxy:exportsProxy,proxiedExports:proxiedExports,activate:activate}=getDeferredExports(compartment,compartmentFields,moduleAliases,moduleSpecifier),exportsProps=create(null),localLexicals=create(null),onceVar=create(null),liveVar=create(null),localGetNotify=create(null),notifiers=create(null);arrayForEach(entries(fixedExportMap),([fixedExportName,[localName]])=>{let fixedGetNotify=localGetNotify[localName];if(!fixedGetNotify){let value,tdz=!0,optUpdaters=[];const get=()=>{if(tdz)throw new ReferenceError(`binding ${q(localName)} not yet initialized`);return value},init=freeze(initValue=>{if(!tdz)throw new TypeError(`Internal: binding ${q(localName)} already initialized`);value=initValue;const updaters=optUpdaters;optUpdaters=null,tdz=!1;for(const updater of updaters)updater(initValue);return initValue});fixedGetNotify={get:get,notify:updater=>{updater!==init&&(tdz?arrayPush(optUpdaters,updater):updater(value))}},localGetNotify[localName]=fixedGetNotify,onceVar[localName]=init}exportsProps[fixedExportName]={get:fixedGetNotify.get,set:void 0,enumerable:!0,configurable:!1},notifiers[fixedExportName]=fixedGetNotify.notify}),arrayForEach(entries(liveExportMap),([liveExportName,[localName,setProxyTrap]])=>{let liveGetNotify=localGetNotify[localName];if(!liveGetNotify){let value,tdz=!0;const updaters=[],get=()=>{if(tdz)throw new ReferenceError(`binding ${q(liveExportName)} not yet initialized`);return value},update=freeze(newValue=>{value=newValue,tdz=!1;for(const updater of updaters)updater(newValue)}),set=newValue=>{if(tdz)throw new ReferenceError(`binding ${q(localName)} not yet initialized`);value=newValue;for(const updater of updaters)updater(newValue)};liveGetNotify={get:get,notify:updater=>{updater!==update&&(arrayPush(updaters,updater),tdz||updater(value))}},localGetNotify[localName]=liveGetNotify,setProxyTrap&&defineProperty(localLexicals,localName,{get:get,set:set,enumerable:!0,configurable:!1}),liveVar[localName]=update}exportsProps[liveExportName]={get:liveGetNotify.get,set:void 0,enumerable:!0,configurable:!1},notifiers[liveExportName]=liveGetNotify.notify});function imports(updateRecord){const candidateAll=create(null);candidateAll.default=!1;for(const[specifier,importUpdaters]of updateRecord){const instance=mapGet(importedInstances,specifier);instance.execute();const{notifiers:importNotifiers}=instance;for(const[importName,updaters]of importUpdaters){const importNotify=importNotifiers[importName];if(!importNotify)throw SyntaxError(`The requested module '${specifier}' does not provide an export named '${importName}'`);for(const updater of updaters)importNotify(updater)}if(arrayIncludes(exportAlls,specifier))for(const[importName,importNotify]of entries(importNotifiers))void 0===candidateAll[importName]?candidateAll[importName]=importNotify:candidateAll[importName]=!1}for(const[importName,notify]of entries(candidateAll))if(!notifiers[importName]&&!1!==notify){let value;notifiers[importName]=notify;notify(newValue=>value=newValue),exportsProps[importName]={get:()=>value,set:void 0,enumerable:!0,configurable:!1}}arrayForEach(arraySort(keys(exportsProps)),k=>defineProperty(proxiedExports,k,exportsProps[k])),freeze(proxiedExports),activate()}notifiers["*"]=update=>{update(proxiedExports)};let thrownError,optFunctor=compartmentEvaluate(compartmentFields,functorSource,{globalObject:compartment.globalThis,transforms:__shimTransforms__,__moduleShimLexicals__:localLexicals}),didThrow=!1;return freeze({notifiers:notifiers,exportsProxy:exportsProxy,execute:function(){if(optFunctor){const functor=optFunctor;optFunctor=null;try{functor(freeze({imports:freeze(imports),onceVar:freeze(onceVar),liveVar:freeze(liveVar)}))}catch(e){didThrow=!0,thrownError=e}}if(didThrow)throw thrownError}})})},({imports:$h_imports,liveVar:$h_live,onceVar:$h_once})=>{let assert,makeModuleInstance,makeThirdPartyModuleInstance,Map,ReferenceError,TypeError,entries,isArray,isObject,mapGet,mapHas,mapSet,weakmapGet;$h_imports([["./error/assert.js",[["assert",[$h_a=>assert=$h_a]]]],["./module-instance.js",[["makeModuleInstance",[$h_a=>makeModuleInstance=$h_a]],["makeThirdPartyModuleInstance",[$h_a=>makeThirdPartyModuleInstance=$h_a]]]],["./commons.js",[["Map",[$h_a=>Map=$h_a]],["ReferenceError",[$h_a=>ReferenceError=$h_a]],["TypeError",[$h_a=>TypeError=$h_a]],["entries",[$h_a=>entries=$h_a]],["isArray",[$h_a=>isArray=$h_a]],["isObject",[$h_a=>isObject=$h_a]],["mapGet",[$h_a=>mapGet=$h_a]],["mapHas",[$h_a=>mapHas=$h_a]],["mapSet",[$h_a=>mapSet=$h_a]],["weakmapGet",[$h_a=>weakmapGet=$h_a]]]]]);const{quote:q}=assert,link=(compartmentPrivateFields,moduleAliases,compartment,moduleSpecifier)=>{const{name:compartmentName,moduleRecords:moduleRecords}=weakmapGet(compartmentPrivateFields,compartment),moduleRecord=mapGet(moduleRecords,moduleSpecifier);if(void 0===moduleRecord)throw new ReferenceError(`Missing link to module ${q(moduleSpecifier)} from compartment ${q(compartmentName)}`);return instantiate(compartmentPrivateFields,moduleAliases,moduleRecord)};$h_once.link(link);const instantiate=(compartmentPrivateFields,moduleAliases,moduleRecord)=>{const{compartment:compartment,moduleSpecifier:moduleSpecifier,resolvedImports:resolvedImports,staticModuleRecord:staticModuleRecord}=moduleRecord,{instances:instances}=weakmapGet(compartmentPrivateFields,compartment);if(mapHas(instances,moduleSpecifier))return mapGet(instances,moduleSpecifier);!function(staticModuleRecord,moduleSpecifier){assert(isObject(staticModuleRecord),`Static module records must be of type object, got ${q(staticModuleRecord)}, for module ${q(moduleSpecifier)}`);const{imports:imports,exports:exports,reexports:reexports=[]}=staticModuleRecord;assert(isArray(imports),`Property 'imports' of a static module record must be an array, got ${q(imports)}, for module ${q(moduleSpecifier)}`),assert(isArray(exports),`Property 'exports' of a precompiled module record must be an array, got ${q(exports)}, for module ${q(moduleSpecifier)}`),assert(isArray(reexports),`Property 'reexports' of a precompiled module record must be an array if present, got ${q(reexports)}, for module ${q(moduleSpecifier)}`)}(staticModuleRecord,moduleSpecifier);const importedInstances=new Map;let moduleInstance;if(function(staticModuleRecord){return"string"==typeof staticModuleRecord.__syncModuleProgram__}(staticModuleRecord))!function(staticModuleRecord,moduleSpecifier){const{__fixedExportMap__:__fixedExportMap__,__liveExportMap__:__liveExportMap__}=staticModuleRecord;assert(isObject(__fixedExportMap__),`Property '__fixedExportMap__' of a precompiled module record must be an object, got ${q(__fixedExportMap__)}, for module ${q(moduleSpecifier)}`),assert(isObject(__liveExportMap__),`Property '__liveExportMap__' of a precompiled module record must be an object, got ${q(__liveExportMap__)}, for module ${q(moduleSpecifier)}`)}(staticModuleRecord,moduleSpecifier),moduleInstance=makeModuleInstance(compartmentPrivateFields,moduleAliases,moduleRecord,importedInstances);else{if(!function(staticModuleRecord){return"function"==typeof staticModuleRecord.execute}(staticModuleRecord))throw new TypeError("importHook must return a static module record, got "+q(staticModuleRecord));!function(staticModuleRecord,moduleSpecifier){const{exports:exports}=staticModuleRecord;assert(isArray(exports),`Property 'exports' of a third-party static module record must be an array, got ${q(exports)}, for module ${q(moduleSpecifier)}`)}(staticModuleRecord,moduleSpecifier),moduleInstance=makeThirdPartyModuleInstance(compartmentPrivateFields,staticModuleRecord,compartment,moduleAliases,moduleSpecifier,resolvedImports)}mapSet(instances,moduleSpecifier,moduleInstance);for(const[importSpecifier,resolvedSpecifier]of entries(resolvedImports)){const importedInstance=link(compartmentPrivateFields,moduleAliases,compartment,resolvedSpecifier);mapSet(importedInstances,importSpecifier,importedInstance)}return moduleInstance};$h_once.instantiate(instantiate)},({imports:$h_imports,liveVar:$h_live,onceVar:$h_once})=>{let Map,ReferenceError,TypeError,WeakMap,WeakSet,arrayFilter,arrayJoin,assign,defineProperties,entries,freeze,getOwnPropertyNames,promiseThen,weakmapGet,weakmapSet,weaksetHas,setGlobalObjectConstantProperties,setGlobalObjectMutableProperties,isValidIdentifierName,sharedGlobalPropertyNames,load,link,getDeferredExports,assert,compartmentEvaluate,makeSafeEvaluator;$h_imports([["./commons.js",[["Map",[$h_a=>Map=$h_a]],["ReferenceError",[$h_a=>ReferenceError=$h_a]],["TypeError",[$h_a=>TypeError=$h_a]],["WeakMap",[$h_a=>WeakMap=$h_a]],["WeakSet",[$h_a=>WeakSet=$h_a]],["arrayFilter",[$h_a=>arrayFilter=$h_a]],["arrayJoin",[$h_a=>arrayJoin=$h_a]],["assign",[$h_a=>assign=$h_a]],["defineProperties",[$h_a=>defineProperties=$h_a]],["entries",[$h_a=>entries=$h_a]],["freeze",[$h_a=>freeze=$h_a]],["getOwnPropertyNames",[$h_a=>getOwnPropertyNames=$h_a]],["promiseThen",[$h_a=>promiseThen=$h_a]],["weakmapGet",[$h_a=>weakmapGet=$h_a]],["weakmapSet",[$h_a=>weakmapSet=$h_a]],["weaksetHas",[$h_a=>weaksetHas=$h_a]]]],["./global-object.js",[["setGlobalObjectConstantProperties",[$h_a=>setGlobalObjectConstantProperties=$h_a]],["setGlobalObjectMutableProperties",[$h_a=>setGlobalObjectMutableProperties=$h_a]]]],["./scope-constants.js",[["isValidIdentifierName",[$h_a=>isValidIdentifierName=$h_a]]]],["./whitelist.js",[["sharedGlobalPropertyNames",[$h_a=>sharedGlobalPropertyNames=$h_a]]]],["./module-load.js",[["load",[$h_a=>load=$h_a]]]],["./module-link.js",[["link",[$h_a=>link=$h_a]]]],["./module-proxy.js",[["getDeferredExports",[$h_a=>getDeferredExports=$h_a]]]],["./error/assert.js",[["assert",[$h_a=>assert=$h_a]]]],["./compartment-evaluate.js",[["compartmentEvaluate",[$h_a=>compartmentEvaluate=$h_a]]]],["./make-safe-evaluator.js",[["makeSafeEvaluator",[$h_a=>makeSafeEvaluator=$h_a]]]]]);const{quote:q}=assert,moduleAliases=new WeakMap,privateFields=new WeakMap,assertModuleHooks=compartment=>{const{importHook:importHook,resolveHook:resolveHook}=weakmapGet(privateFields,compartment);if("function"!=typeof importHook||"function"!=typeof resolveHook)throw new TypeError("Compartment must be constructed with an importHook and a resolveHook for it to be able to load modules")},InertCompartment=function(_endowments={},_modules={},_options={}){throw new TypeError("Compartment.prototype.constructor is not a valid constructor.")};$h_once.InertCompartment(InertCompartment);const compartmentImportNow=(compartment,specifier)=>{const{execute:execute,exportsProxy:exportsProxy}=link(privateFields,moduleAliases,compartment,specifier);return execute(),exportsProxy},CompartmentPrototype={constructor:InertCompartment,get globalThis(){return weakmapGet(privateFields,this).globalObject},get name(){return weakmapGet(privateFields,this).name},evaluate(source,options={}){const compartmentFields=weakmapGet(privateFields,this);return compartmentEvaluate(compartmentFields,source,options)},toString:()=>"[object Compartment]",__isKnownScopeProxy__(value){const{knownScopeProxies:knownScopeProxies}=weakmapGet(privateFields,this);return weaksetHas(knownScopeProxies,value)},module(specifier){if("string"!=typeof specifier)throw new TypeError("first argument of module() must be a string");assertModuleHooks(this);const{exportsProxy:exportsProxy}=getDeferredExports(this,weakmapGet(privateFields,this),moduleAliases,specifier);return exportsProxy},async import(specifier){if("string"!=typeof specifier)throw new TypeError("first argument of import() must be a string");return assertModuleHooks(this),promiseThen(load(privateFields,moduleAliases,this,specifier),()=>({namespace:compartmentImportNow(this,specifier)}))},async load(specifier){if("string"!=typeof specifier)throw new TypeError("first argument of load() must be a string");return assertModuleHooks(this),load(privateFields,moduleAliases,this,specifier)},importNow(specifier){if("string"!=typeof specifier)throw new TypeError("first argument of importNow() must be a string");return assertModuleHooks(this),compartmentImportNow(this,specifier)}};$h_once.CompartmentPrototype(CompartmentPrototype),defineProperties(InertCompartment,{prototype:{value:CompartmentPrototype}});$h_once.makeCompartmentConstructor((targetMakeCompartmentConstructor,intrinsics,markVirtualizedNativeFunction)=>{function Compartment(endowments={},moduleMap={},options={}){if(void 0===new.target)throw new TypeError("Class constructor Compartment cannot be invoked without 'new'");const{name:name="<unknown>",transforms:transforms=[],__shimTransforms__:__shimTransforms__=[],globalLexicals:globalLexicalsOption={},resolveHook:resolveHook,importHook:importHook,moduleMapHook:moduleMapHook}=options,globalTransforms=[...transforms,...__shimTransforms__],moduleRecords=new Map,instances=new Map,deferredExports=new Map;for(const[specifier,aliasNamespace]of entries(moduleMap||{})){if("string"==typeof aliasNamespace)throw new TypeError(`Cannot map module ${q(specifier)} to ${q(aliasNamespace)} in parent compartment`);if(void 0===weakmapGet(moduleAliases,aliasNamespace))throw ReferenceError(`Cannot map module ${q(specifier)} because it has no known compartment in this realm`)}const invalidNames=arrayFilter(getOwnPropertyNames(globalLexicalsOption),identifier=>!isValidIdentifierName(identifier));if(invalidNames.length)throw new TypeError(`Cannot create compartment with invalid names for global lexicals: ${arrayJoin(invalidNames,", ")}; these names would not be lexically mentionable`);const globalLexicals=freeze({...globalLexicalsOption}),globalObject={};setGlobalObjectConstantProperties(globalObject);const knownScopeProxies=new WeakSet,{safeEvaluate:safeEvaluate}=makeSafeEvaluator({globalObject:globalObject,localObject:globalLexicals,globalTransforms:globalTransforms,sloppyGlobalsMode:!1,knownScopeProxies:knownScopeProxies});setGlobalObjectMutableProperties(globalObject,{intrinsics:intrinsics,newGlobalPropertyNames:sharedGlobalPropertyNames,makeCompartmentConstructor:targetMakeCompartmentConstructor,safeEvaluate:safeEvaluate,markVirtualizedNativeFunction:markVirtualizedNativeFunction}),assign(globalObject,endowments),weakmapSet(privateFields,this,{name:name,globalTransforms:globalTransforms,globalObject:globalObject,knownScopeProxies:knownScopeProxies,globalLexicals:globalLexicals,safeEvaluate:safeEvaluate,resolveHook:resolveHook,importHook:importHook,moduleMap:moduleMap,moduleMapHook:moduleMapHook,moduleRecords:moduleRecords,__shimTransforms__:__shimTransforms__,deferredExports:deferredExports,instances:instances})}return Compartment.prototype=CompartmentPrototype,Compartment})},({imports:$h_imports,liveVar:$h_live,onceVar:$h_once})=>{let TypeError,WeakSet,arrayFilter,defineProperty,entries,freeze,getOwnPropertyDescriptor,getOwnPropertyDescriptors,globalThis,is,isObject,objectHasOwnProperty,values,weaksetHas,constantProperties,sharedGlobalPropertyNames,universalPropertyNames,whitelist;$h_imports([["./commons.js",[["TypeError",[$h_a=>TypeError=$h_a]],["WeakSet",[$h_a=>WeakSet=$h_a]],["arrayFilter",[$h_a=>arrayFilter=$h_a]],["defineProperty",[$h_a=>defineProperty=$h_a]],["entries",[$h_a=>entries=$h_a]],["freeze",[$h_a=>freeze=$h_a]],["getOwnPropertyDescriptor",[$h_a=>getOwnPropertyDescriptor=$h_a]],["getOwnPropertyDescriptors",[$h_a=>getOwnPropertyDescriptors=$h_a]],["globalThis",[$h_a=>globalThis=$h_a]],["is",[$h_a=>is=$h_a]],["isObject",[$h_a=>isObject=$h_a]],["objectHasOwnProperty",[$h_a=>objectHasOwnProperty=$h_a]],["values",[$h_a=>values=$h_a]],["weaksetHas",[$h_a=>weaksetHas=$h_a]]]],["./whitelist.js",[["constantProperties",[$h_a=>constantProperties=$h_a]],["sharedGlobalPropertyNames",[$h_a=>sharedGlobalPropertyNames=$h_a]],["universalPropertyNames",[$h_a=>universalPropertyNames=$h_a]],["whitelist",[$h_a=>whitelist=$h_a]]]]]);const isFunction=obj=>"function"==typeof obj;function initProperty(obj,name,desc){if(objectHasOwnProperty(obj,name)){const preDesc=getOwnPropertyDescriptor(obj,name);if(!is(preDesc.value,desc.value)||preDesc.get!==desc.get||preDesc.set!==desc.set||preDesc.writable!==desc.writable||preDesc.enumerable!==desc.enumerable||preDesc.configurable!==desc.configurable)throw new TypeError("Conflicting definitions of "+name)}defineProperty(obj,name,desc)}function sampleGlobals(globalObject,newPropertyNames){const newIntrinsics={__proto__:null};for(const[globalName,intrinsicName]of entries(newPropertyNames))objectHasOwnProperty(globalObject,globalName)&&(newIntrinsics[intrinsicName]=globalObject[globalName]);return newIntrinsics}const makeIntrinsicsCollector=()=>{const intrinsics={__proto__:null};let pseudoNatives;const addIntrinsics=newIntrinsics=>{!function(obj,descs){for(const[name,desc]of entries(descs))initProperty(obj,name,desc)}(intrinsics,getOwnPropertyDescriptors(newIntrinsics))};freeze(addIntrinsics);const completePrototypes=()=>{for(const[name,intrinsic]of entries(intrinsics)){if(!isObject(intrinsic))continue;if(!objectHasOwnProperty(intrinsic,"prototype"))continue;const permit=whitelist[name];if("object"!=typeof permit)throw new TypeError("Expected permit object at whitelist."+name);const namePrototype=permit.prototype;if(!namePrototype)throw new TypeError(name+".prototype property not whitelisted");if("string"!=typeof namePrototype||!objectHasOwnProperty(whitelist,namePrototype))throw new TypeError(`Unrecognized ${name}.prototype whitelist entry`);const intrinsicPrototype=intrinsic.prototype;if(objectHasOwnProperty(intrinsics,namePrototype)){if(intrinsics[namePrototype]!==intrinsicPrototype)throw new TypeError("Conflicting bindings of "+namePrototype)}else intrinsics[namePrototype]=intrinsicPrototype}};freeze(completePrototypes);const finalIntrinsics=()=>(freeze(intrinsics),pseudoNatives=new WeakSet(arrayFilter(values(intrinsics),isFunction)),intrinsics);freeze(finalIntrinsics);const isPseudoNative=obj=>{if(!pseudoNatives)throw new TypeError("isPseudoNative can only be called after finalIntrinsics");return weaksetHas(pseudoNatives,obj)};freeze(isPseudoNative);const intrinsicsCollector={addIntrinsics:addIntrinsics,completePrototypes:completePrototypes,finalIntrinsics:finalIntrinsics,isPseudoNative:isPseudoNative};return freeze(intrinsicsCollector),addIntrinsics(constantProperties),addIntrinsics(sampleGlobals(globalThis,universalPropertyNames)),intrinsicsCollector};$h_once.makeIntrinsicsCollector(makeIntrinsicsCollector);$h_once.getGlobalIntrinsics(globalObject=>{const{addIntrinsics:addIntrinsics,finalIntrinsics:finalIntrinsics}=makeIntrinsicsCollector();return addIntrinsics(sampleGlobals(globalObject,sharedGlobalPropertyNames)),finalIntrinsics()})},({imports:$h_imports,liveVar:$h_live,onceVar:$h_once})=>{$h_imports([]);$h_once.minEnablements({"%ObjectPrototype%":{toString:!0},"%FunctionPrototype%":{toString:!0},"%ErrorPrototype%":{name:!0}});const moderateEnablements={"%ObjectPrototype%":{toString:!0,valueOf:!0},"%ArrayPrototype%":{toString:!0,push:!0},"%FunctionPrototype%":{constructor:!0,bind:!0,toString:!0},"%ErrorPrototype%":{constructor:!0,message:!0,name:!0,toString:!0},"%TypeErrorPrototype%":{constructor:!0,message:!0,name:!0},"%SyntaxErrorPrototype%":{message:!0,name:!0},"%RangeErrorPrototype%":{message:!0,name:!0},"%URIErrorPrototype%":{message:!0,name:!0},"%EvalErrorPrototype%":{message:!0,name:!0},"%ReferenceErrorPrototype%":{message:!0,name:!0},"%PromisePrototype%":{constructor:!0},"%TypedArrayPrototype%":"*","%Generator%":{constructor:!0,name:!0,toString:!0},"%IteratorPrototype%":{toString:!0}};$h_once.moderateEnablements(moderateEnablements);const severeEnablements={...moderateEnablements,"%ObjectPrototype%":"*","%TypedArrayPrototype%":"*"};$h_once.severeEnablements(severeEnablements)},({imports:$h_imports,liveVar:$h_live,onceVar:$h_once})=>{let Set,String,TypeError,arrayForEach,defineProperty,getOwnPropertyDescriptor,getOwnPropertyDescriptors,getOwnPropertyNames,isObject,objectHasOwnProperty,ownKeys,setHas,minEnablements,moderateEnablements,severeEnablements;$h_imports([["./commons.js",[["Set",[$h_a=>Set=$h_a]],["String",[$h_a=>String=$h_a]],["TypeError",[$h_a=>TypeError=$h_a]],["arrayForEach",[$h_a=>arrayForEach=$h_a]],["defineProperty",[$h_a=>defineProperty=$h_a]],["getOwnPropertyDescriptor",[$h_a=>getOwnPropertyDescriptor=$h_a]],["getOwnPropertyDescriptors",[$h_a=>getOwnPropertyDescriptors=$h_a]],["getOwnPropertyNames",[$h_a=>getOwnPropertyNames=$h_a]],["isObject",[$h_a=>isObject=$h_a]],["objectHasOwnProperty",[$h_a=>objectHasOwnProperty=$h_a]],["ownKeys",[$h_a=>ownKeys=$h_a]],["setHas",[$h_a=>setHas=$h_a]]]],["./enablements.js",[["minEnablements",[$h_a=>minEnablements=$h_a]],["moderateEnablements",[$h_a=>moderateEnablements=$h_a]],["severeEnablements",[$h_a=>severeEnablements=$h_a]]]]]),$h_once.default((function(intrinsics,overrideTaming,overrideDebug=[]){const debugProperties=new Set(overrideDebug);function enable(path,obj,prop,desc){if("value"in desc&&desc.configurable){const{value:value}=desc;function getter(){return value}defineProperty(getter,"originalValue",{value:value,writable:!1,enumerable:!1,configurable:!1});const isDebug=setHas(debugProperties,prop);defineProperty(obj,prop,{get:getter,set:function(newValue){if(obj===this)throw new TypeError(`Cannot assign to read only property '${String(prop)}' of '${path}'`);objectHasOwnProperty(this,prop)?this[prop]=newValue:(isDebug&&console.error(new TypeError("Override property "+prop)),defineProperty(this,prop,{value:newValue,writable:!0,enumerable:!0,configurable:!0}))},enumerable:desc.enumerable,configurable:desc.configurable})}}function enableProperty(path,obj,prop){const desc=getOwnPropertyDescriptor(obj,prop);desc&&enable(path,obj,prop,desc)}function enableAllProperties(path,obj){const descs=getOwnPropertyDescriptors(obj);descs&&arrayForEach(ownKeys(descs),prop=>enable(path,obj,prop,descs[prop]))}let plan;switch(overrideTaming){case"min":plan=minEnablements;break;case"moderate":plan=moderateEnablements;break;case"severe":plan=severeEnablements;break;default:throw new TypeError("unrecognized overrideTaming "+overrideTaming)}!function enableProperties(path,obj,plan){for(const prop of getOwnPropertyNames(plan)){const desc=getOwnPropertyDescriptor(obj,prop);if(!desc||desc.get||desc.set)continue;const subPath=`${path}.${String(prop)}`,subPlan=plan[prop];if(!0===subPlan)enableProperty(subPath,obj,prop);else if("*"===subPlan)enableAllProperties(subPath,desc.value);else{if(!isObject(subPlan))throw new TypeError("Unexpected override enablement plan "+subPath);enableProperties(subPath,desc.value,subPlan)}}}("root",intrinsics,plan)}))},({imports:$h_imports,liveVar:$h_live,onceVar:$h_once})=>{let arrayPush,arraySlice,freeze,assert;$h_imports([["./commons.js",[["arrayPush",[$h_a=>arrayPush=$h_a]],["arraySlice",[$h_a=>arraySlice=$h_a]],["freeze",[$h_a=>freeze=$h_a]]]],["./error/assert.js",[["assert",[$h_a=>assert=$h_a]]]]]);const{details:X,quote:q}=assert,makeEnvironmentCaptor=aGlobal=>{const capturedEnvironmentOptionNames=[],getEnvironmentOption=(optionName,defaultSetting)=>{assert.typeof(optionName,"string",X`Environment option name ${q(optionName)} must be a string.`),assert.typeof(defaultSetting,"string",X`Environment option default setting ${q(defaultSetting)} must be a string.`);let setting=defaultSetting;const globalProcess=aGlobal.process;if(globalProcess&&"object"==typeof globalProcess){const globalEnv=globalProcess.env;if(globalEnv&&"object"==typeof globalEnv&&optionName in globalEnv){arrayPush(capturedEnvironmentOptionNames,optionName);const optionValue=globalEnv[optionName];assert.typeof(optionValue,"string",X`Environment option named ${q(optionName)}, if present, must have a corresponding string value, got ${q(optionValue)}`),setting=optionValue}}return assert(void 0===setting||"string"==typeof setting,X`Environment option value ${q(setting)}, if present, must be a string.`),setting};freeze(getEnvironmentOption);const getCapturedEnvironmentOptionNames=()=>freeze(arraySlice(capturedEnvironmentOptionNames));return freeze(getCapturedEnvironmentOptionNames),{getEnvironmentOption:getEnvironmentOption,getCapturedEnvironmentOptionNames:getCapturedEnvironmentOptionNames}};$h_once.makeEnvironmentCaptor(makeEnvironmentCaptor),freeze(makeEnvironmentCaptor)},({imports:$h_imports,liveVar:$h_live,onceVar:$h_once})=>{let WeakSet,arrayFilter,arrayMap,arrayPush,defineProperty,freeze,fromEntries,isError,stringEndsWith,weaksetAdd,weaksetHas;$h_imports([["../commons.js",[["WeakSet",[$h_a=>WeakSet=$h_a]],["arrayFilter",[$h_a=>arrayFilter=$h_a]],["arrayMap",[$h_a=>arrayMap=$h_a]],["arrayPush",[$h_a=>arrayPush=$h_a]],["defineProperty",[$h_a=>defineProperty=$h_a]],["freeze",[$h_a=>freeze=$h_a]],["fromEntries",[$h_a=>fromEntries=$h_a]],["isError",[$h_a=>isError=$h_a]],["stringEndsWith",[$h_a=>stringEndsWith=$h_a]],["weaksetAdd",[$h_a=>weaksetAdd=$h_a]],["weaksetHas",[$h_a=>weaksetHas=$h_a]]]],["./types.js",[]],["./internal-types.js",[]]]);const consoleLevelMethods=freeze([["debug","debug"],["log","log"],["info","info"],["warn","warn"],["error","error"],["trace","log"],["dirxml","log"],["group","log"],["groupCollapsed","log"]]),consoleOtherMethods=freeze([["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]]),consoleWhitelist=freeze([...consoleLevelMethods,...consoleOtherMethods]);$h_once.consoleWhitelist(consoleWhitelist);const makeLoggingConsoleKit=(loggedErrorHandler,{shouldResetForDebugging:shouldResetForDebugging=!1}={})=>{shouldResetForDebugging&&loggedErrorHandler.resetErrorTagNum();let logArray=[];const loggingConsole=fromEntries(arrayMap(consoleWhitelist,([name,_])=>{const method=(...args)=>{arrayPush(logArray,[name,...args])};return defineProperty(method,"name",{value:name}),[name,freeze(method)]}));freeze(loggingConsole);const takeLog=()=>{const result=freeze(logArray);return logArray=[],result};freeze(takeLog);return freeze({loggingConsole:loggingConsole,takeLog:takeLog})};$h_once.makeLoggingConsoleKit(makeLoggingConsoleKit),freeze(makeLoggingConsoleKit);const ErrorInfo={NOTE:"ERROR_NOTE:",MESSAGE:"ERROR_MESSAGE:"};freeze(ErrorInfo);$h_once.BASE_CONSOLE_LEVEL("debug");const makeCausalConsole=(baseConsole,loggedErrorHandler)=>{const{getStackString:getStackString,tagError:tagError,takeMessageLogArgs:takeMessageLogArgs,takeNoteLogArgsArray:takeNoteLogArgsArray}=loggedErrorHandler,extractErrorArgs=(logArgs,subErrorsSink)=>arrayMap(logArgs,arg=>isError(arg)?(arrayPush(subErrorsSink,arg),`(${tagError(arg)})`):arg),logErrorInfo=(error,kind,logArgs,subErrorsSink)=>{const errorTag=tagError(error),errorName=kind===ErrorInfo.MESSAGE?errorTag+":":`${errorTag} ${kind}`,argTags=extractErrorArgs(logArgs,subErrorsSink);baseConsole.debug(errorName,...argTags)},logSubErrors=(subErrors,optTag)=>{if(0===subErrors.length)return;if(1===subErrors.length&&void 0===optTag)return void logError(subErrors[0]);let label;label=1===subErrors.length?"Nested error":`Nested ${subErrors.length} errors`,void 0!==optTag&&(label=`${label} under ${optTag}`),baseConsole.group(label);try{for(const subError of subErrors)logError(subError)}finally{baseConsole.groupEnd()}},errorsLogged=new WeakSet,noteCallback=(error,noteLogArgs)=>{const subErrors=[];logErrorInfo(error,ErrorInfo.NOTE,noteLogArgs,subErrors),logSubErrors(subErrors,tagError(error))},logError=error=>{if(weaksetHas(errorsLogged,error))return;const errorTag=tagError(error);weaksetAdd(errorsLogged,error);const subErrors=[],messageLogArgs=takeMessageLogArgs(error),noteLogArgsArray=takeNoteLogArgsArray(error,noteCallback);void 0===messageLogArgs?baseConsole.debug(errorTag+":",error.message):logErrorInfo(error,ErrorInfo.MESSAGE,messageLogArgs,subErrors);let stackString=getStackString(error);"string"==typeof stackString&&stackString.length>=1&&!stringEndsWith(stackString,"\n")&&(stackString+="\n"),baseConsole.debug(stackString);for(const noteLogArgs of noteLogArgsArray)logErrorInfo(error,ErrorInfo.NOTE,noteLogArgs,subErrors);logSubErrors(subErrors,errorTag)},levelMethods=arrayMap(consoleLevelMethods,([level,_])=>{const levelMethod=(...logArgs)=>{const subErrors=[],argTags=extractErrorArgs(logArgs,subErrors);baseConsole[level](...argTags),logSubErrors(subErrors)};return defineProperty(levelMethod,"name",{value:level}),[level,freeze(levelMethod)]}),otherMethodNames=arrayFilter(consoleOtherMethods,([name,_])=>name in baseConsole),otherMethods=arrayMap(otherMethodNames,([name,_])=>{const otherMethod=(...args)=>{baseConsole[name](...args)};return defineProperty(otherMethod,"name",{value:name}),[name,freeze(otherMethod)]}),causalConsole=fromEntries([...levelMethods,...otherMethods]);return freeze(causalConsole)};$h_once.makeCausalConsole(makeCausalConsole),freeze(makeCausalConsole);const filterConsole=(baseConsole,filter,_topic)=>{const whitelist=arrayFilter(consoleWhitelist,([name,_])=>name in baseConsole),methods=arrayMap(whitelist,([name,severity])=>[name,freeze((...args)=>{(void 0===severity||filter.canLog(severity))&&baseConsole[name](...args)})]),filteringConsole=fromEntries(methods);return freeze(filteringConsole)};$h_once.filterConsole(filterConsole),freeze(filterConsole)},({imports:$h_imports,liveVar:$h_live,onceVar:$h_once})=>{let TypeError,globalThis,defaultHandler,makeCausalConsole;$h_imports([["../commons.js",[["TypeError",[$h_a=>TypeError=$h_a]],["globalThis",[$h_a=>globalThis=$h_a]]]],["./assert.js",[["loggedErrorHandler",[$h_a=>defaultHandler=$h_a]]]],["./console.js",[["makeCausalConsole",[$h_a=>makeCausalConsole=$h_a]]]],["./types.js",[]],["./internal-types.js",[]]]);const originalConsole=console;$h_once.tameConsole((consoleTaming="safe",errorTrapping="platform",optGetStackString)=>{if("safe"!==consoleTaming&&"unsafe"!==consoleTaming)throw new TypeError("unrecognized consoleTaming "+consoleTaming);if("unsafe"===consoleTaming)return{console:originalConsole};let loggedErrorHandler;loggedErrorHandler=void 0===optGetStackString?defaultHandler:{...defaultHandler,getStackString:optGetStackString};const causalConsole=makeCausalConsole(originalConsole,loggedErrorHandler);return"none"!==errorTrapping&&void 0!==globalThis.process&&globalThis.process.on("uncaughtException",error=>{causalConsole.error(error),"platform"===errorTrapping||"exit"===errorTrapping?globalThis.process.exit(globalThis.process.exitCode||-1):"abort"===errorTrapping&&globalThis.process.abort()}),"none"!==errorTrapping&&void 0!==globalThis.window&&globalThis.window.addEventListener("error",event=>{event.preventDefault(),causalConsole.error(event.error),"exit"!==errorTrapping&&"abort"!==errorTrapping||(globalThis.window.location.href="about:blank")}),{console:causalConsole}})},({imports:$h_imports,liveVar:$h_live,onceVar:$h_once})=>{let WeakMap,WeakSet,apply,arrayFilter,arrayJoin,arrayMap,arraySlice,create,defineProperties,fromEntries,reflectSet,regexpExec,regexpTest,weakmapGet,weakmapHas,weakmapSet,weaksetAdd,weaksetHas;$h_imports([["../commons.js",[["WeakMap",[$h_a=>WeakMap=$h_a]],["WeakSet",[$h_a=>WeakSet=$h_a]],["apply",[$h_a=>apply=$h_a]],["arrayFilter",[$h_a=>arrayFilter=$h_a]],["arrayJoin",[$h_a=>arrayJoin=$h_a]],["arrayMap",[$h_a=>arrayMap=$h_a]],["arraySlice",[$h_a=>arraySlice=$h_a]],["create",[$h_a=>create=$h_a]],["defineProperties",[$h_a=>defineProperties=$h_a]],["fromEntries",[$h_a=>fromEntries=$h_a]],["reflectSet",[$h_a=>reflectSet=$h_a]],["regexpExec",[$h_a=>regexpExec=$h_a]],["regexpTest",[$h_a=>regexpTest=$h_a]],["weakmapGet",[$h_a=>weakmapGet=$h_a]],["weakmapHas",[$h_a=>weakmapHas=$h_a]],["weakmapSet",[$h_a=>weakmapSet=$h_a]],["weaksetAdd",[$h_a=>weaksetAdd=$h_a]],["weaksetHas",[$h_a=>weaksetHas=$h_a]]]]]);const safeV8CallSiteMethodNames=["getTypeName","getFunctionName","getMethodName","getFileName","getLineNumber","getColumnNumber","getEvalOrigin","isToplevel","isEval","isNative","isConstructor","isAsync","getPosition","getScriptNameOrSourceURL","toString"],safeV8CallSiteFacet=callSite=>{const o=fromEntries(arrayMap(safeV8CallSiteMethodNames,name=>{const method=callSite[name];return[name,()=>apply(method,callSite,[])]}));return create(o,{})},FILENAME_CENSORS=[/\/node_modules\//,/^(?:node:)?internal\//,/\/packages\/ses\/src\/error\/assert.js$/,/\/packages\/eventual-send\/src\//],filterFileName=fileName=>{if(!fileName)return!0;for(const filter of FILENAME_CENSORS)if(regexpTest(filter,fileName))return!1;return!0};$h_once.filterFileName(filterFileName);const CALLSITE_PATTERNS=[/^((?:.*[( ])?)[:/\w_-]*\/\.\.\.\/(.+)$/,/^((?:.*[( ])?)[:/\w_-]*\/(packages\/.+)$/],shortenCallSiteString=callSiteString=>{for(const filter of CALLSITE_PATTERNS){const match=regexpExec(filter,callSiteString);if(match)return arrayJoin(arraySlice(match,1),"")}return callSiteString};$h_once.shortenCallSiteString(shortenCallSiteString);$h_once.tameV8ErrorConstructor((OriginalError,InitialError,errorTaming,stackFiltering)=>{const originalCaptureStackTrace=OriginalError.captureStackTrace,callSiteFilter=callSite=>"verbose"===stackFiltering||filterFileName(callSite.getFileName()),callSiteStringifier=callSite=>{let callSiteString=""+callSite;return"concise"===stackFiltering&&(callSiteString=shortenCallSiteString(callSiteString)),"\n at "+callSiteString},stackStringFromSST=(_error,sst)=>arrayJoin(arrayMap(arrayFilter(sst,callSiteFilter),callSiteStringifier),""),ssts=new WeakMap,tamedMethods={captureStackTrace(error,optFn=tamedMethods.captureStackTrace){"function"!=typeof originalCaptureStackTrace?reflectSet(error,"stack",""):apply(originalCaptureStackTrace,OriginalError,[error,optFn])},getStackString(error){weakmapHas(ssts,error)||error.stack;const sst=weakmapGet(ssts,error);return sst?stackStringFromSST(0,sst):""},prepareStackTrace(error,sst){if(weakmapSet(ssts,error,sst),"unsafe"===errorTaming){return`${error}${stackStringFromSST(0,sst)}`}return""}},defaultPrepareFn=tamedMethods.prepareStackTrace;OriginalError.prepareStackTrace=defaultPrepareFn;const systemPrepareFnSet=new WeakSet([defaultPrepareFn]),systemPrepareFnFor=inputPrepareFn=>{if(weaksetHas(systemPrepareFnSet,inputPrepareFn))return inputPrepareFn;const systemMethods={prepareStackTrace:(error,sst)=>(weakmapSet(ssts,error,sst),inputPrepareFn(error,(sst=>arrayMap(sst,safeV8CallSiteFacet))(sst)))};return weaksetAdd(systemPrepareFnSet,systemMethods.prepareStackTrace),systemMethods.prepareStackTrace};return defineProperties(InitialError,{captureStackTrace:{value:tamedMethods.captureStackTrace,writable:!0,enumerable:!1,configurable:!0},prepareStackTrace:{get:()=>OriginalError.prepareStackTrace,set(inputPrepareStackTraceFn){if("function"==typeof inputPrepareStackTraceFn){const systemPrepareFn=systemPrepareFnFor(inputPrepareStackTraceFn);OriginalError.prepareStackTrace=systemPrepareFn}else OriginalError.prepareStackTrace=defaultPrepareFn},enumerable:!1,configurable:!0}}),tamedMethods.getStackString})},({imports:$h_imports,liveVar:$h_live,onceVar:$h_once})=>{let FERAL_ERROR,TypeError,apply,construct,defineProperties,setPrototypeOf,getOwnPropertyDescriptor,NativeErrors,tameV8ErrorConstructor;$h_imports([["../commons.js",[["FERAL_ERROR",[$h_a=>FERAL_ERROR=$h_a]],["TypeError",[$h_a=>TypeError=$h_a]],["apply",[$h_a=>apply=$h_a]],["construct",[$h_a=>construct=$h_a]],["defineProperties",[$h_a=>defineProperties=$h_a]],["setPrototypeOf",[$h_a=>setPrototypeOf=$h_a]],["getOwnPropertyDescriptor",[$h_a=>getOwnPropertyDescriptor=$h_a]]]],["../whitelist.js",[["NativeErrors",[$h_a=>NativeErrors=$h_a]]]],["./tame-v8-error-constructor.js",[["tameV8ErrorConstructor",[$h_a=>tameV8ErrorConstructor=$h_a]]]]]);const stackDesc=getOwnPropertyDescriptor(FERAL_ERROR.prototype,"stack"),stackGetter=stackDesc&&stackDesc.get,tamedMethods={getStackString:error=>"function"==typeof stackGetter?apply(stackGetter,error,[]):"stack"in error?""+error.stack:""};$h_once.default((function(errorTaming="safe",stackFiltering="concise"){if("safe"!==errorTaming&&"unsafe"!==errorTaming)throw new TypeError("unrecognized errorTaming "+errorTaming);if("concise"!==stackFiltering&&"verbose"!==stackFiltering)throw new TypeError("unrecognized stackFiltering "+stackFiltering);const ErrorPrototype=FERAL_ERROR.prototype,platform="function"==typeof FERAL_ERROR.captureStackTrace?"v8":"unknown",{captureStackTrace:originalCaptureStackTrace}=FERAL_ERROR,makeErrorConstructor=(_={})=>{const ResultError=function(...rest){let error;return error=void 0===new.target?apply(FERAL_ERROR,this,rest):construct(FERAL_ERROR,rest,new.target),"v8"===platform&&apply(originalCaptureStackTrace,FERAL_ERROR,[error,ResultError]),error};return defineProperties(ResultError,{length:{value:1},prototype:{value:ErrorPrototype,writable:!1,enumerable:!1,configurable:!1}}),ResultError},InitialError=makeErrorConstructor({powers:"original"}),SharedError=makeErrorConstructor({powers:"none"});defineProperties(ErrorPrototype,{constructor:{value:SharedError}});for(const NativeError of NativeErrors)setPrototypeOf(NativeError,SharedError);defineProperties(InitialError,{stackTraceLimit:{get(){if("number"==typeof FERAL_ERROR.stackTraceLimit)return FERAL_ERROR.stackTraceLimit},set(newLimit){"number"==typeof newLimit&&("number"!=typeof FERAL_ERROR.stackTraceLimit||(FERAL_ERROR.stackTraceLimit=newLimit))},enumerable:!1,configurable:!0}}),defineProperties(SharedError,{stackTraceLimit:{get(){},set(_newLimit){},enumerable:!1,configurable:!0}});let initialGetStackString=tamedMethods.getStackString;return"v8"===platform&&(initialGetStackString=tameV8ErrorConstructor(FERAL_ERROR,InitialError,errorTaming,stackFiltering)),{"%InitialGetStackString%":initialGetStackString,"%InitialError%":InitialError,"%SharedError%":SharedError}}))},({imports:$h_imports,liveVar:$h_live,onceVar:$h_once})=>{let FERAL_FUNCTION,Float32Array,Map,Set,String,getOwnPropertyDescriptor,getPrototypeOf,iterateArray,iterateMap,iterateSet,iterateString,matchAllRegExp,matchAllSymbol,regexpPrototype,InertCompartment;function getConstructorOf(obj){return getPrototypeOf(obj).constructor}$h_imports([["./commons.js",[["FERAL_FUNCTION",[$h_a=>FERAL_FUNCTION=$h_a]],["Float32Array",[$h_a=>Float32Array=$h_a]],["Map",[$h_a=>Map=$h_a]],["Set",[$h_a=>Set=$h_a]],["String",[$h_a=>String=$h_a]],["getOwnPropertyDescriptor",[$h_a=>getOwnPropertyDescriptor=$h_a]],["getPrototypeOf",[$h_a=>getPrototypeOf=$h_a]],["iterateArray",[$h_a=>iterateArray=$h_a]],["iterateMap",[$h_a=>iterateMap=$h_a]],["iterateSet",[$h_a=>iterateSet=$h_a]],["iterateString",[$h_a=>iterateString=$h_a]],["matchAllRegExp",[$h_a=>matchAllRegExp=$h_a]],["matchAllSymbol",[$h_a=>matchAllSymbol=$h_a]],["regexpPrototype",[$h_a=>regexpPrototype=$h_a]]]],["./compartment-shim.js",[["InertCompartment",[$h_a=>InertCompartment=$h_a]]]]]);$h_once.getAnonymousIntrinsics(()=>{const InertFunction=FERAL_FUNCTION.prototype.constructor,ThrowTypeError=getOwnPropertyDescriptor(function(){return arguments}(),"callee").get,StringIteratorObject=iterateString(new String),StringIteratorPrototype=getPrototypeOf(StringIteratorObject),RegExpStringIterator=regexpPrototype[matchAllSymbol]&&matchAllRegExp(/./),RegExpStringIteratorPrototype=RegExpStringIterator&&getPrototypeOf(RegExpStringIterator),ArrayIteratorObject=iterateArray([]),ArrayIteratorPrototype=getPrototypeOf(ArrayIteratorObject),TypedArray=getPrototypeOf(Float32Array),MapIteratorObject=iterateMap(new Map),MapIteratorPrototype=getPrototypeOf(MapIteratorObject),SetIteratorObject=iterateSet(new Set),SetIteratorPrototype=getPrototypeOf(SetIteratorObject),IteratorPrototype=getPrototypeOf(ArrayIteratorPrototype);const GeneratorFunction=getConstructorOf((function*(){})),Generator=GeneratorFunction.prototype;const AsyncGeneratorFunction=getConstructorOf((async function*(){})),AsyncGenerator=AsyncGeneratorFunction.prototype,AsyncGeneratorPrototype=AsyncGenerator.prototype,AsyncIteratorPrototype=getPrototypeOf(AsyncGeneratorPrototype);return{"%InertFunction%":InertFunction,"%ArrayIteratorPrototype%":ArrayIteratorPrototype,"%InertAsyncFunction%":getConstructorOf((async function(){})),"%AsyncGenerator%":AsyncGenerator,"%InertAsyncGeneratorFunction%":AsyncGeneratorFunction,"%AsyncGeneratorPrototype%":AsyncGeneratorPrototype,"%AsyncIteratorPrototype%":AsyncIteratorPrototype,"%Generator%":Generator,"%InertGeneratorFunction%":GeneratorFunction,"%IteratorPrototype%":IteratorPrototype,"%MapIteratorPrototype%":MapIteratorPrototype,"%RegExpStringIteratorPrototype%":RegExpStringIteratorPrototype,"%SetIteratorPrototype%":SetIteratorPrototype,"%StringIteratorPrototype%":StringIteratorPrototype,"%ThrowTypeError%":ThrowTypeError,"%TypedArray%":TypedArray,"%InertCompartment%":InertCompartment}})},({imports:$h_imports,liveVar:$h_live,onceVar:$h_once})=>{let Set,String,TypeError,WeakMap,WeakSet,arrayForEach,freeze,getOwnPropertyDescriptors,getPrototypeOf,isObject,objectHasOwnProperty,ownKeys,setAdd,setForEach,setHas,weakmapGet,weakmapSet,weaksetAdd,weaksetHas;$h_imports([["./commons.js",[["Set",[$h_a=>Set=$h_a]],["String",[$h_a=>String=$h_a]],["TypeError",[$h_a=>TypeError=$h_a]],["WeakMap",[$h_a=>WeakMap=$h_a]],["WeakSet",[$h_a=>WeakSet=$h_a]],["arrayForEach",[$h_a=>arrayForEach=$h_a]],["freeze",[$h_a=>freeze=$h_a]],["getOwnPropertyDescriptors",[$h_a=>getOwnPropertyDescriptors=$h_a]],["getPrototypeOf",[$h_a=>getPrototypeOf=$h_a]],["isObject",[$h_a=>isObject=$h_a]],["objectHasOwnProperty",[$h_a=>objectHasOwnProperty=$h_a]],["ownKeys",[$h_a=>ownKeys=$h_a]],["setAdd",[$h_a=>setAdd=$h_a]],["setForEach",[$h_a=>setForEach=$h_a]],["setHas",[$h_a=>setHas=$h_a]],["weakmapGet",[$h_a=>weakmapGet=$h_a]],["weakmapSet",[$h_a=>weakmapSet=$h_a]],["weaksetAdd",[$h_a=>weaksetAdd=$h_a]],["weaksetHas",[$h_a=>weaksetHas=$h_a]]]]]);$h_once.makeHardener(()=>{const hardened=new WeakSet,{harden:harden}={harden(root){const toFreeze=new Set,paths=new WeakMap;function enqueue(val,path){if(!isObject(val))return;const type=typeof val;if("object"!==type&&"function"!==type)throw new TypeError("Unexpected typeof: "+type);weaksetHas(hardened,val)||setHas(toFreeze,val)||(setAdd(toFreeze,val),weakmapSet(paths,val,path))}function freezeAndTraverse(obj){freeze(obj);const path=weakmapGet(paths,obj)||"unknown",descs=getOwnPropertyDescriptors(obj);enqueue(getPrototypeOf(obj),path+".__proto__"),arrayForEach(ownKeys(descs),name=>{const pathname=`${path}.${String(name)}`,desc=descs[name];objectHasOwnProperty(desc,"value")?enqueue(desc.value,""+pathname):(enqueue(desc.get,pathname+"(get)"),enqueue(desc.set,pathname+"(set)"))})}function markHardened(value){weaksetAdd(hardened,value)}return enqueue(root),setForEach(toFreeze,freezeAndTraverse),setForEach(toFreeze,markHardened),root}};return harden})},({imports:$h_imports,liveVar:$h_live,onceVar:$h_once})=>{let Date,TypeError,apply,construct,defineProperties;$h_imports([["./commons.js",[["Date",[$h_a=>Date=$h_a]],["TypeError",[$h_a=>TypeError=$h_a]],["apply",[$h_a=>apply=$h_a]],["construct",[$h_a=>construct=$h_a]],["defineProperties",[$h_a=>defineProperties=$h_a]]]]]),$h_once.default((function(dateTaming="safe"){if("safe"!==dateTaming&&"unsafe"!==dateTaming)throw new TypeError("unrecognized dateTaming "+dateTaming);const OriginalDate=Date,DatePrototype=OriginalDate.prototype,tamedMethods={now:()=>NaN},makeDateConstructor=({powers:powers="none"}={})=>{let ResultDate;return ResultDate="original"===powers?function(...rest){return void 0===new.target?apply(OriginalDate,void 0,rest):construct(OriginalDate,rest,new.target)}:function(...rest){return void 0===new.target?"Invalid Date":(0===rest.length&&(rest=[NaN]),construct(OriginalDate,rest,new.target))},defineProperties(ResultDate,{length:{value:7},prototype:{value:DatePrototype,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}}),ResultDate},InitialDate=makeDateConstructor({powers:"original"}),SharedDate=makeDateConstructor({powers:"none"});return defineProperties(InitialDate,{now:{value:Date.now,writable:!0,enumerable:!1,configurable:!0}}),defineProperties(SharedDate,{now:{value:tamedMethods.now,writable:!0,enumerable:!1,configurable:!0}}),defineProperties(DatePrototype,{constructor:{value:SharedDate}}),{"%InitialDate%":InitialDate,"%SharedDate%":SharedDate}}))},({imports:$h_imports,liveVar:$h_live,onceVar:$h_once})=>{let TypeError,globalThis,getOwnPropertyDescriptor,defineProperty;function tameDomains(domainTaming="safe"){if("safe"!==domainTaming&&"unsafe"!==domainTaming)throw new TypeError("unrecognized domainTaming "+domainTaming);if("unsafe"!==domainTaming&&"object"==typeof globalThis.process&&null!==globalThis.process){const domainDescriptor=getOwnPropertyDescriptor(globalThis.process,"domain");if(void 0!==domainDescriptor&&void 0!==domainDescriptor.get)throw new TypeError("SES failed to lockdown, Node.js domains have been initialized (SES_NO_DOMAINS)");defineProperty(globalThis.process,"domain",{value:null,configurable:!1,writable:!1,enumerable:!1})}}$h_imports([["./commons.js",[["TypeError",[$h_a=>TypeError=$h_a]],["globalThis",[$h_a=>globalThis=$h_a]],["getOwnPropertyDescriptor",[$h_a=>getOwnPropertyDescriptor=$h_a]],["defineProperty",[$h_a=>defineProperty=$h_a]]]]]),Object.defineProperty(tameDomains,"name",{value:"tameDomains"}),$h_once.tameDomains(tameDomains)},({imports:$h_imports,liveVar:$h_live,onceVar:$h_once})=>{let FERAL_FUNCTION,SyntaxError,TypeError,defineProperties,getPrototypeOf,setPrototypeOf;$h_imports([["./commons.js",[["FERAL_FUNCTION",[$h_a=>FERAL_FUNCTION=$h_a]],["SyntaxError",[$h_a=>SyntaxError=$h_a]],["TypeError",[$h_a=>TypeError=$h_a]],["defineProperties",[$h_a=>defineProperties=$h_a]],["getPrototypeOf",[$h_a=>getPrototypeOf=$h_a]],["setPrototypeOf",[$h_a=>setPrototypeOf=$h_a]]]]]),$h_once.default((function(){try{FERAL_FUNCTION.prototype.constructor("return 1")}catch(ignore){return{}}const newIntrinsics={};function repairFunction(name,intrinsicName,declaration){let FunctionInstance;try{FunctionInstance=(0,eval)(declaration)}catch(e){if(e instanceof SyntaxError)return;throw e}const FunctionPrototype=getPrototypeOf(FunctionInstance),InertConstructor=function(){throw new TypeError("Function.prototype.constructor is not a valid constructor.")};defineProperties(InertConstructor,{prototype:{value:FunctionPrototype},name:{value:name,writable:!1,enumerable:!1,configurable:!0}}),defineProperties(FunctionPrototype,{constructor:{value:InertConstructor}}),InertConstructor!==FERAL_FUNCTION.prototype.constructor&&setPrototypeOf(InertConstructor,FERAL_FUNCTION.prototype.constructor),newIntrinsics[intrinsicName]=InertConstructor}return repairFunction("Function","%InertFunction%","(function(){})"),repairFunction("GeneratorFunction","%InertGeneratorFunction%","(function*(){})"),repairFunction("AsyncFunction","%InertAsyncFunction%","(async function(){})"),repairFunction("AsyncGeneratorFunction","%InertAsyncGeneratorFunction%","(async function*(){})"),newIntrinsics}))},({imports:$h_imports,liveVar:$h_live,onceVar:$h_once})=>{let WeakSet,defineProperty,freeze,functionPrototype,functionToString,stringEndsWith,weaksetAdd,weaksetHas;$h_imports([["./commons.js",[["WeakSet",[$h_a=>WeakSet=$h_a]],["defineProperty",[$h_a=>defineProperty=$h_a]],["freeze",[$h_a=>freeze=$h_a]],["functionPrototype",[$h_a=>functionPrototype=$h_a]],["functionToString",[$h_a=>functionToString=$h_a]],["stringEndsWith",[$h_a=>stringEndsWith=$h_a]],["weaksetAdd",[$h_a=>weaksetAdd=$h_a]],["weaksetHas",[$h_a=>weaksetHas=$h_a]]]]]);let markVirtualizedNativeFunction;$h_once.tameFunctionToString(()=>{if(void 0===markVirtualizedNativeFunction){const virtualizedNativeFunctions=new WeakSet;defineProperty(functionPrototype,"toString",{value:{toString(){const str=functionToString(this,[]);return stringEndsWith(str,") { [native code] }")||!weaksetHas(virtualizedNativeFunctions,this)?str:`function ${this.name}() { [native code] }`}}.toString}),markVirtualizedNativeFunction=freeze(func=>weaksetAdd(virtualizedNativeFunctions,func))}return markVirtualizedNativeFunction})},({imports:$h_imports,liveVar:$h_live,onceVar:$h_once})=>{let String,TypeError,defineProperty,getOwnPropertyNames,isObject,regexpExec,assert;$h_imports([["./commons.js",[["String",[$h_a=>String=$h_a]],["TypeError",[$h_a=>TypeError=$h_a]],["defineProperty",[$h_a=>defineProperty=$h_a]],["getOwnPropertyNames",[$h_a=>getOwnPropertyNames=$h_a]],["isObject",[$h_a=>isObject=$h_a]],["regexpExec",[$h_a=>regexpExec=$h_a]]]],["./error/assert.js",[["assert",[$h_a=>assert=$h_a]]]]]);const{details:d,quote:q}=assert,localePattern=/^(\w*[a-z])Locale([A-Z]\w*)$/,nonLocaleCompare={localeCompare(that){if(null==this)throw new TypeError('Cannot localeCompare with null or undefined "this" value');const s=""+this;return s<(that=""+that)?-1:s>that?1:(assert(s===that,d`expected ${q(s)} and ${q(that)} to compare`),0)}}.localeCompare;$h_once.default((function(intrinsics,localeTaming="safe"){if("safe"!==localeTaming&&"unsafe"!==localeTaming)throw new TypeError("unrecognized localeTaming "+localeTaming);if("unsafe"!==localeTaming){defineProperty(String.prototype,"localeCompare",{value:nonLocaleCompare});for(const intrinsicName of getOwnPropertyNames(intrinsics)){const intrinsic=intrinsics[intrinsicName];if(isObject(intrinsic))for(const methodName of getOwnPropertyNames(intrinsic)){const match=regexpExec(localePattern,methodName);if(match){assert("function"==typeof intrinsic[methodName],d`expected ${q(methodName)} to be a function`);const nonLocaleMethodName=`${match[1]}${match[2]}`,method=intrinsic[nonLocaleMethodName];assert("function"==typeof method,d`function ${q(nonLocaleMethodName)} not found`),defineProperty(intrinsic,methodName,{value:method})}}}}}))},({imports:$h_imports,liveVar:$h_live,onceVar:$h_once})=>{let Math,TypeError,create,getOwnPropertyDescriptors,objectPrototype;$h_imports([["./commons.js",[["Math",[$h_a=>Math=$h_a]],["TypeError",[$h_a=>TypeError=$h_a]],["create",[$h_a=>create=$h_a]],["getOwnPropertyDescriptors",[$h_a=>getOwnPropertyDescriptors=$h_a]],["objectPrototype",[$h_a=>objectPrototype=$h_a]]]]]),$h_once.default((function(mathTaming="safe"){if("safe"!==mathTaming&&"unsafe"!==mathTaming)throw new TypeError("unrecognized mathTaming "+mathTaming);const originalMath=Math,initialMath=originalMath,{random:_,...otherDescriptors}=getOwnPropertyDescriptors(originalMath);return{"%InitialMath%":initialMath,"%SharedMath%":create(objectPrototype,otherDescriptors)}}))},({imports:$h_imports,liveVar:$h_live,onceVar:$h_once})=>{let FERAL_REG_EXP,TypeError,construct,defineProperties,getOwnPropertyDescriptor,speciesSymbol;$h_imports([["./commons.js",[["FERAL_REG_EXP",[$h_a=>FERAL_REG_EXP=$h_a]],["TypeError",[$h_a=>TypeError=$h_a]],["construct",[$h_a=>construct=$h_a]],["defineProperties",[$h_a=>defineProperties=$h_a]],["getOwnPropertyDescriptor",[$h_a=>getOwnPropertyDescriptor=$h_a]],["speciesSymbol",[$h_a=>speciesSymbol=$h_a]]]]]),$h_once.default((function(regExpTaming="safe"){if("safe"!==regExpTaming&&"unsafe"!==regExpTaming)throw new TypeError("unrecognized regExpTaming "+regExpTaming);const RegExpPrototype=FERAL_REG_EXP.prototype,makeRegExpConstructor=(_={})=>{const ResultRegExp=function(...rest){return void 0===new.target?FERAL_REG_EXP(...rest):construct(FERAL_REG_EXP,rest,new.target)};return defineProperties(ResultRegExp,{length:{value:2},prototype:{value:RegExpPrototype,writable:!1,enumerable:!1,configurable:!1},[speciesSymbol]:getOwnPropertyDescriptor(FERAL_REG_EXP,speciesSymbol)}),ResultRegExp},InitialRegExp=makeRegExpConstructor(),SharedRegExp=makeRegExpConstructor();return"unsafe"!==regExpTaming&&delete RegExpPrototype.compile,defineProperties(RegExpPrototype,{constructor:{value:SharedRegExp}}),{"%InitialRegExp%":InitialRegExp,"%SharedRegExp%":SharedRegExp}}))},({imports:$h_imports,liveVar:$h_live,onceVar:$h_once})=>{let whitelist,FunctionInstance,isAccessorPermit,String,TypeError,arrayIncludes,getOwnPropertyDescriptor,getPrototypeOf,isObject,objectHasOwnProperty,ownKeys,stringSlice;function asStringPropertyName(path,prop){if("string"==typeof prop)return prop;if("symbol"==typeof prop)return"@@"+stringSlice(String(prop),14,-1);throw new TypeError(`Unexpected property name type ${path} ${prop}`)}$h_imports([["./whitelist.js",[["whitelist",[$h_a=>whitelist=$h_a]],["FunctionInstance",[$h_a=>FunctionInstance=$h_a]],["isAccessorPermit",[$h_a=>isAccessorPermit=$h_a]]]],["./commons.js",[["String",[$h_a=>String=$h_a]],["TypeError",[$h_a=>TypeError=$h_a]],["arrayIncludes",[$h_a=>arrayIncludes=$h_a]],["getOwnPropertyDescriptor",[$h_a=>getOwnPropertyDescriptor=$h_a]],["getPrototypeOf",[$h_a=>getPrototypeOf=$h_a]],["isObject",[$h_a=>isObject=$h_a]],["objectHasOwnProperty",[$h_a=>objectHasOwnProperty=$h_a]],["ownKeys",[$h_a=>ownKeys=$h_a]],["stringSlice",[$h_a=>stringSlice=$h_a]]]]]),$h_once.default((function(intrinsics,markVirtualizedNativeFunction){const primitives=["undefined","boolean","number","string","symbol"];function isAllowedPropertyValue(path,value,prop,permit){if("object"==typeof permit)return visitProperties(path,value,permit),!0;if(!1===permit)return!1;if("string"==typeof permit)if("prototype"===prop||"constructor"===prop){if(objectHasOwnProperty(intrinsics,permit)){if(value!==intrinsics[permit])throw new TypeError("Does not match whitelist "+path);return!0}}else if(arrayIncludes(primitives,permit)){if(typeof value!==permit)throw new TypeError(`At ${path} expected ${permit} not ${typeof value}`);return!0}throw new TypeError(`Unexpected whitelist permit ${permit} at ${path}`)}function isAllowedProperty(path,obj,prop,permit){const desc=getOwnPropertyDescriptor(obj,prop);if(objectHasOwnProperty(desc,"value")){if(isAccessorPermit(permit))throw new TypeError("Accessor expected at "+path);return isAllowedPropertyValue(path,desc.value,prop,permit)}if(!isAccessorPermit(permit))throw new TypeError("Accessor not expected at "+path);return isAllowedPropertyValue(path+"<get>",desc.get,prop,permit.get)&&isAllowedPropertyValue(path+"<set>",desc.set,prop,permit.set)}function getSubPermit(obj,permit,prop){const permitProp="__proto__"===prop?"--proto--":prop;return objectHasOwnProperty(permit,permitProp)?permit[permitProp]:"function"==typeof obj&&(markVirtualizedNativeFunction(obj),objectHasOwnProperty(FunctionInstance,permitProp))?FunctionInstance[permitProp]:void 0}function visitProperties(path,obj,permit){if(void 0===obj)return;!function(path,obj,protoName){if(!isObject(obj))throw new TypeError(`Object expected: ${path}, ${obj}, ${protoName}`);const proto=getPrototypeOf(obj);if(null!==proto||null!==protoName){if(void 0!==protoName&&"string"!=typeof protoName)throw new TypeError(`Malformed whitelist permit ${path}.__proto__`);if(proto!==intrinsics[protoName||"%ObjectPrototype%"])throw new TypeError(`Unexpected intrinsic ${path}.__proto__ at ${protoName}`)}}(path,obj,permit["[[Proto]]"]);for(const prop of ownKeys(obj)){const propString=asStringPropertyName(path,prop),subPath=`${path}.${propString}`,subPermit=getSubPermit(obj,permit,propString);if(!subPermit||!isAllowedProperty(subPath,obj,prop,subPermit)){!1!==subPermit&&console.warn("Removing "+subPath);try{delete obj[prop]}catch(err){throw prop in obj?console.error("failed to delete "+subPath,err):console.error(`deleting ${subPath} threw`,err),err}}}}visitProperties("intrinsics",intrinsics,whitelist)}))},({imports:$h_imports,liveVar:$h_live,onceVar:$h_once})=>{let TypeError,arrayFilter,arrayMap,globalThis,is,ownKeys,stringSplit,enJoin,makeHardener,makeIntrinsicsCollector,whitelistIntrinsics,tameFunctionConstructors,tameDateConstructor,tameMathObject,tameRegExpConstructor,enablePropertyOverrides,tameLocaleMethods,setGlobalObjectConstantProperties,setGlobalObjectMutableProperties,makeSafeEvaluator,initialGlobalPropertyNames,tameFunctionToString,tameDomains,tameConsole,tameErrorConstructor,assert,makeAssert,makeEnvironmentCaptor,getAnonymousIntrinsics,makeCompartmentConstructor;$h_imports([["./commons.js",[["TypeError",[$h_a=>TypeError=$h_a]],["arrayFilter",[$h_a=>arrayFilter=$h_a]],["arrayMap",[$h_a=>arrayMap=$h_a]],["globalThis",[$h_a=>globalThis=$h_a]],["is",[$h_a=>is=$h_a]],["ownKeys",[$h_a=>ownKeys=$h_a]],["stringSplit",[$h_a=>stringSplit=$h_a]]]],["./error/stringify-utils.js",[["enJoin",[$h_a=>enJoin=$h_a]]]],["./make-hardener.js",[["makeHardener",[$h_a=>makeHardener=$h_a]]]],["./intrinsics.js",[["makeIntrinsicsCollector",[$h_a=>makeIntrinsicsCollector=$h_a]]]],["./whitelist-intrinsics.js",[["default",[$h_a=>whitelistIntrinsics=$h_a]]]],["./tame-function-constructors.js",[["default",[$h_a=>tameFunctionConstructors=$h_a]]]],["./tame-date-constructor.js",[["default",[$h_a=>tameDateConstructor=$h_a]]]],["./tame-math-object.js",[["default",[$h_a=>tameMathObject=$h_a]]]],["./tame-regexp-constructor.js",[["default",[$h_a=>tameRegExpConstructor=$h_a]]]],["./enable-property-overrides.js",[["default",[$h_a=>enablePropertyOverrides=$h_a]]]],["./tame-locale-methods.js",[["default",[$h_a=>tameLocaleMethods=$h_a]]]],["./global-object.js",[["setGlobalObjectConstantProperties",[$h_a=>setGlobalObjectConstantProperties=$h_a]],["setGlobalObjectMutableProperties",[$h_a=>setGlobalObjectMutableProperties=$h_a]]]],["./make-safe-evaluator.js",[["makeSafeEvaluator",[$h_a=>makeSafeEvaluator=$h_a]]]],["./whitelist.js",[["initialGlobalPropertyNames",[$h_a=>initialGlobalPropertyNames=$h_a]]]],["./tame-function-tostring.js",[["tameFunctionToString",[$h_a=>tameFunctionToString=$h_a]]]],["./tame-domains.js",[["tameDomains",[$h_a=>tameDomains=$h_a]]]],["./error/tame-console.js",[["tameConsole",[$h_a=>tameConsole=$h_a]]]],["./error/tame-error-constructor.js",[["default",[$h_a=>tameErrorConstructor=$h_a]]]],["./error/assert.js",[["assert",[$h_a=>assert=$h_a]],["makeAssert",[$h_a=>makeAssert=$h_a]]]],["./environment-options.js",[["makeEnvironmentCaptor",[$h_a=>makeEnvironmentCaptor=$h_a]]]],["./get-anonymous-intrinsics.js",[["getAnonymousIntrinsics",[$h_a=>getAnonymousIntrinsics=$h_a]]]],["./compartment-shim.js",[["makeCompartmentConstructor",[$h_a=>makeCompartmentConstructor=$h_a]]]]]);const{details:d,quote:q}=assert;let priorLockdown;const harden=makeHardener(),repairIntrinsics=(options={})=>{const{getEnvironmentOption:getenv,getCapturedEnvironmentOptionNames:getCapturedEnvironmentOptionNames}=makeEnvironmentCaptor(globalThis),{errorTaming:errorTaming=getenv("LOCKDOWN_ERROR_TAMING","safe"),errorTrapping:errorTrapping=getenv("LOCKDOWN_ERROR_TRAPPING","platform"),regExpTaming:regExpTaming=getenv("LOCKDOWN_REGEXP_TAMING","safe"),localeTaming:localeTaming=getenv("LOCKDOWN_LOCALE_TAMING","safe"),consoleTaming:consoleTaming=getenv("LOCKDOWN_CONSOLE_TAMING","safe"),overrideTaming:overrideTaming=getenv("LOCKDOWN_OVERRIDE_TAMING","moderate"),stackFiltering:stackFiltering=getenv("LOCKDOWN_STACK_FILTERING","concise"),domainTaming:domainTaming=getenv("LOCKDOWN_DOMAIN_TAMING","safe"),overrideDebug:overrideDebug=arrayFilter(stringSplit(getenv("LOCKDOWN_OVERRIDE_DEBUG",""),","),debugName=>""!==debugName),__allowUnsafeMonkeyPatching__:__allowUnsafeMonkeyPatching__=getenv("__LOCKDOWN_ALLOW_UNSAFE_MONKEY_PATCHING__","safe"),dateTaming:dateTaming="safe",mathTaming:mathTaming="safe",...extraOptions}=options,capturedEnvironmentOptionNames=getCapturedEnvironmentOptionNames();capturedEnvironmentOptionNames.length>0&&console.warn("SES Lockdown using options from environment variables "+enJoin(arrayMap(capturedEnvironmentOptionNames,q),"and"));const extraOptionsNames=ownKeys(extraOptions);assert(0===extraOptionsNames.length,d`lockdown(): non supported option ${q(extraOptionsNames)}`),assert(void 0===priorLockdown,`Already locked down at ${priorLockdown} (SES_ALREADY_LOCKED_DOWN)`,TypeError),priorLockdown=new TypeError("Prior lockdown (SES_ALREADY_LOCKED_DOWN)"),priorLockdown.stack;if(globalThis.Function.prototype.constructor!==globalThis.Function&&"function"==typeof globalThis.harden&&"function"==typeof globalThis.lockdown&&globalThis.Date.prototype.constructor!==globalThis.Date&&"function"==typeof globalThis.Date.now&&is(globalThis.Date.prototype.constructor.now(),NaN))throw new TypeError("Already locked down but not by this SES instance (SES_MULTIPLE_INSTANCES)");tameDomains(domainTaming);const{addIntrinsics:addIntrinsics,completePrototypes:completePrototypes,finalIntrinsics:finalIntrinsics}=makeIntrinsicsCollector();addIntrinsics({harden:harden}),addIntrinsics(tameFunctionConstructors()),addIntrinsics(tameDateConstructor(dateTaming)),addIntrinsics(tameErrorConstructor(errorTaming,stackFiltering)),addIntrinsics(tameMathObject(mathTaming)),addIntrinsics(tameRegExpConstructor(regExpTaming)),addIntrinsics(getAnonymousIntrinsics()),completePrototypes();const intrinsics=finalIntrinsics();let optGetStackString;"unsafe"!==errorTaming&&(optGetStackString=intrinsics["%InitialGetStackString%"]);const consoleRecord=tameConsole(consoleTaming,errorTrapping,optGetStackString);globalThis.console=consoleRecord.console,"unsafe"===errorTaming&&globalThis.assert===assert&&(globalThis.assert=makeAssert(void 0,!0)),tameLocaleMethods(intrinsics,localeTaming);const markVirtualizedNativeFunction=tameFunctionToString();whitelistIntrinsics(intrinsics,markVirtualizedNativeFunction),setGlobalObjectConstantProperties(globalThis);const{safeEvaluate:safeEvaluate}=makeSafeEvaluator({globalObject:globalThis});return setGlobalObjectMutableProperties(globalThis,{intrinsics:intrinsics,newGlobalPropertyNames:initialGlobalPropertyNames,makeCompartmentConstructor:makeCompartmentConstructor,safeEvaluate:safeEvaluate,markVirtualizedNativeFunction:markVirtualizedNativeFunction}),function(){return enablePropertyOverrides(intrinsics,overrideTaming,overrideDebug),"unsafe"!==__allowUnsafeMonkeyPatching__&&harden(intrinsics),globalThis.harden=harden,!0}};$h_once.repairIntrinsics(repairIntrinsics);$h_once.lockdown((options={})=>{repairIntrinsics(options)()})},({imports:$h_imports,liveVar:$h_live,onceVar:$h_once})=>{let globalThis,TypeError,assign,tameFunctionToString,getGlobalIntrinsics,lockdown,makeCompartmentConstructor,assert;if($h_imports([["./src/commons.js",[["globalThis",[$h_a=>globalThis=$h_a]],["TypeError",[$h_a=>TypeError=$h_a]],["assign",[$h_a=>assign=$h_a]]]],["./src/tame-function-tostring.js",[["tameFunctionToString",[$h_a=>tameFunctionToString=$h_a]]]],["./src/intrinsics.js",[["getGlobalIntrinsics",[$h_a=>getGlobalIntrinsics=$h_a]]]],["./src/lockdown-shim.js",[["lockdown",[$h_a=>lockdown=$h_a]]]],["./src/compartment-shim.js",[["makeCompartmentConstructor",[$h_a=>makeCompartmentConstructor=$h_a]]]],["./src/error/assert.js",[["assert",[$h_a=>assert=$h_a]]]]]),function(){return this}())throw new TypeError("SES failed to initialize, sloppy mode (SES_NO_SLOPPY)");const markVirtualizedNativeFunction=tameFunctionToString(),Compartment=makeCompartmentConstructor(makeCompartmentConstructor,getGlobalIntrinsics(globalThis),markVirtualizedNativeFunction);assign(globalThis,{lockdown:lockdown,Compartment:Compartment,assert:assert})}];function cell(name,value){const observers=[];return{get:function(){return value},set:function(newValue){value=newValue;for(const observe of observers)observe(value)},observe:function(observe){observers.push(observe),observe(value)},enumerable:!0}}const cells=[{globalThis:cell(),Array:cell(),Date:cell(),Float32Array:cell(),JSON:cell(),Map:cell(),Math:cell(),Object:cell(),Promise:cell(),Proxy:cell(),Reflect:cell(),FERAL_REG_EXP:cell(),Set:cell(),String:cell(),WeakMap:cell(),WeakSet:cell(),FERAL_ERROR:cell(),RangeError:cell(),ReferenceError:cell(),SyntaxError:cell(),TypeError:cell(),assign:cell(),create:cell(),defineProperties:cell(),entries:cell(),freeze:cell(),getOwnPropertyDescriptor:cell(),getOwnPropertyDescriptors:cell(),getOwnPropertyNames:cell(),getPrototypeOf:cell(),is:cell(),isExtensible:cell(),keys:cell(),objectPrototype:cell(),seal:cell(),setPrototypeOf:cell(),values:cell(),speciesSymbol:cell(),toStringTagSymbol:cell(),iteratorSymbol:cell(),matchAllSymbol:cell(),stringifyJson:cell(),fromEntries:cell(),defineProperty:cell(),apply:cell(),construct:cell(),reflectGet:cell(),reflectGetOwnPropertyDescriptor:cell(),reflectHas:cell(),reflectIsExtensible:cell(),ownKeys:cell(),reflectPreventExtensions:cell(),reflectSet:cell(),isArray:cell(),arrayPrototype:cell(),mapPrototype:cell(),proxyRevocable:cell(),regexpPrototype:cell(),setPrototype:cell(),stringPrototype:cell(),weakmapPrototype:cell(),weaksetPrototype:cell(),functionPrototype:cell(),promisePrototype:cell(),uncurryThis:cell(),objectHasOwnProperty:cell(),arrayFilter:cell(),arrayForEach:cell(),arrayIncludes:cell(),arrayJoin:cell(),arrayMap:cell(),arrayPop:cell(),arrayPush:cell(),arraySlice:cell(),arraySome:cell(),arraySort:cell(),iterateArray:cell(),mapSet:cell(),mapGet:cell(),mapHas:cell(),iterateMap:cell(),setAdd:cell(),setForEach:cell(),setHas:cell(),iterateSet:cell(),regexpTest:cell(),regexpExec:cell(),matchAllRegExp:cell(),stringEndsWith:cell(),stringIncludes:cell(),stringIndexOf:cell(),stringMatch:cell(),stringReplace:cell(),stringSearch:cell(),stringSlice:cell(),stringSplit:cell(),stringStartsWith:cell(),iterateString:cell(),weakmapDelete:cell(),weakmapGet:cell(),weakmapHas:cell(),weakmapSet:cell(),weaksetAdd:cell(),weaksetGet:cell(),weaksetHas:cell(),functionToString:cell(),promiseAll:cell(),promiseCatch:cell(),promiseThen:cell(),getConstructorOf:cell(),immutableObject:cell(),isObject:cell(),isError:cell(),FERAL_EVAL:cell(),FERAL_FUNCTION:cell()},{},{an:cell(),bestEffortStringify:cell(),enJoin:cell()},{},{unredactedDetails:cell(),loggedErrorHandler:cell(),makeAssert:cell(),assert:cell()},{makeEvaluateFactory:cell()},{isValidIdentifierName:cell(),getScopeConstants:cell()},{createScopeHandler:cell()},{getSourceURL:cell()},{rejectHtmlComments:cell(),evadeHtmlCommentTest:cell(),rejectImportExpressions:cell(),evadeImportExpressionTest:cell(),rejectSomeDirectEvalExpressions:cell(),mandatoryTransforms:cell(),applyTransforms:cell()},{makeSafeEvaluator:cell()},{provideCompartmentEvaluator:cell(),compartmentEvaluate:cell()},{makeEvalFunction:cell()},{makeFunctionConstructor:cell()},{constantProperties:cell(),universalPropertyNames:cell(),initialGlobalPropertyNames:cell(),sharedGlobalPropertyNames:cell(),uniqueGlobalPropertyNames:cell(),NativeErrors:cell(),FunctionInstance:cell(),isAccessorPermit:cell(),whitelist:cell()},{setGlobalObjectConstantProperties:cell(),setGlobalObjectMutableProperties:cell()},{makeAlias:cell(),load:cell()},{deferExports:cell(),getDeferredExports:cell()},{makeThirdPartyModuleInstance:cell(),makeModuleInstance:cell()},{link:cell(),instantiate:cell()},{InertCompartment:cell(),CompartmentPrototype:cell(),makeCompartmentConstructor:cell()},{makeIntrinsicsCollector:cell(),getGlobalIntrinsics:cell()},{minEnablements:cell(),moderateEnablements:cell(),severeEnablements:cell()},{default:cell()},{makeEnvironmentCaptor:cell()},{makeLoggingConsoleKit:cell(),makeCausalConsole:cell(),filterConsole:cell(),consoleWhitelist:cell(),BASE_CONSOLE_LEVEL:cell()},{tameConsole:cell()},{filterFileName:cell(),shortenCallSiteString:cell(),tameV8ErrorConstructor:cell()},{default:cell()},{getAnonymousIntrinsics:cell()},{makeHardener:cell()},{default:cell()},{tameDomains:cell()},{default:cell()},{tameFunctionToString:cell()},{default:cell()},{default:cell()},{default:cell()},{default:cell()},{repairIntrinsics:cell(),lockdown:cell()},{}],namespaces=cells.map(cells=>Object.create(null,cells));for(let index=0;index<namespaces.length;index+=1)cells[index]["*"]=cell(0,namespaces[index]);function observeImports(map,importName,importIndex){for(const[name,observers]of map.get(importName)){const cell=cells[importIndex][name];if(void 0===cell)throw new ReferenceError("Cannot import name "+name);for(const observer of observers)cell.observe(observer)}}functors[0]({imports(entries){new Map(entries)},liveVar:{},onceVar:{universalThis:cells[0].globalThis.set,Array:cells[0].Array.set,Date:cells[0].Date.set,Float32Array:cells[0].Float32Array.set,JSON:cells[0].JSON.set,Map:cells[0].Map.set,Math:cells[0].Math.set,Object:cells[0].Object.set,Promise:cells[0].Promise.set,Proxy:cells[0].Proxy.set,Reflect:cells[0].Reflect.set,FERAL_REG_EXP:cells[0].FERAL_REG_EXP.set,Set:cells[0].Set.set,String:cells[0].String.set,WeakMap:cells[0].WeakMap.set,WeakSet:cells[0].WeakSet.set,FERAL_ERROR:cells[0].FERAL_ERROR.set,RangeError:cells[0].RangeError.set,ReferenceError:cells[0].ReferenceError.set,SyntaxError:cells[0].SyntaxError.set,TypeError:cells[0].TypeError.set,assign:cells[0].assign.set,create:cells[0].create.set,defineProperties:cells[0].defineProperties.set,entries:cells[0].entries.set,freeze:cells[0].freeze.set,getOwnPropertyDescriptor:cells[0].getOwnPropertyDescriptor.set,getOwnPropertyDescriptors:cells[0].getOwnPropertyDescriptors.set,getOwnPropertyNames:cells[0].getOwnPropertyNames.set,getPrototypeOf:cells[0].getPrototypeOf.set,is:cells[0].is.set,isExtensible:cells[0].isExtensible.set,keys:cells[0].keys.set,objectPrototype:cells[0].objectPrototype.set,seal:cells[0].seal.set,setPrototypeOf:cells[0].setPrototypeOf.set,values:cells[0].values.set,speciesSymbol:cells[0].speciesSymbol.set,toStringTagSymbol:cells[0].toStringTagSymbol.set,iteratorSymbol:cells[0].iteratorSymbol.set,matchAllSymbol:cells[0].matchAllSymbol.set,stringifyJson:cells[0].stringifyJson.set,fromEntries:cells[0].fromEntries.set,defineProperty:cells[0].defineProperty.set,apply:cells[0].apply.set,construct:cells[0].construct.set,reflectGet:cells[0].reflectGet.set,reflectGetOwnPropertyDescriptor:cells[0].reflectGetOwnPropertyDescriptor.set,reflectHas:cells[0].reflectHas.set,reflectIsExtensible:cells[0].reflectIsExtensible.set,ownKeys:cells[0].ownKeys.set,reflectPreventExtensions:cells[0].reflectPreventExtensions.set,reflectSet:cells[0].reflectSet.set,isArray:cells[0].isArray.set,arrayPrototype:cells[0].arrayPrototype.set,mapPrototype:cells[0].mapPrototype.set,proxyRevocable:cells[0].proxyRevocable.set,regexpPrototype:cells[0].regexpPrototype.set,setPrototype:cells[0].setPrototype.set,stringPrototype:cells[0].stringPrototype.set,weakmapPrototype:cells[0].weakmapPrototype.set,weaksetPrototype:cells[0].weaksetPrototype.set,functionPrototype:cells[0].functionPrototype.set,promisePrototype:cells[0].promisePrototype.set,uncurryThis:cells[0].uncurryThis.set,objectHasOwnProperty:cells[0].objectHasOwnProperty.set,arrayFilter:cells[0].arrayFilter.set,arrayForEach:cells[0].arrayForEach.set,arrayIncludes:cells[0].arrayIncludes.set,arrayJoin:cells[0].arrayJoin.set,arrayMap:cells[0].arrayMap.set,arrayPop:cells[0].arrayPop.set,arrayPush:cells[0].arrayPush.set,arraySlice:cells[0].arraySlice.set,arraySome:cells[0].arraySome.set,arraySort:cells[0].arraySort.set,iterateArray:cells[0].iterateArray.set,mapSet:cells[0].mapSet.set,mapGet:cells[0].mapGet.set,mapHas:cells[0].mapHas.set,iterateMap:cells[0].iterateMap.set,setAdd:cells[0].setAdd.set,setForEach:cells[0].setForEach.set,setHas:cells[0].setHas.set,iterateSet:cells[0].iterateSet.set,regexpTest:cells[0].regexpTest.set,regexpExec:cells[0].regexpExec.set,matchAllRegExp:cells[0].matchAllRegExp.set,stringEndsWith:cells[0].stringEndsWith.set,stringIncludes:cells[0].stringIncludes.set,stringIndexOf:cells[0].stringIndexOf.set,stringMatch:cells[0].stringMatch.set,stringReplace:cells[0].stringReplace.set,stringSearch:cells[0].stringSearch.set,stringSlice:cells[0].stringSlice.set,stringSplit:cells[0].stringSplit.set,stringStartsWith:cells[0].stringStartsWith.set,iterateString:cells[0].iterateString.set,weakmapDelete:cells[0].weakmapDelete.set,weakmapGet:cells[0].weakmapGet.set,weakmapHas:cells[0].weakmapHas.set,weakmapSet:cells[0].weakmapSet.set,weaksetAdd:cells[0].weaksetAdd.set,weaksetGet:cells[0].weaksetGet.set,weaksetHas:cells[0].weaksetHas.set,functionToString:cells[0].functionToString.set,promiseAll:cells[0].promiseAll.set,promiseCatch:cells[0].promiseCatch.set,promiseThen:cells[0].promiseThen.set,getConstructorOf:cells[0].getConstructorOf.set,immutableObject:cells[0].immutableObject.set,isObject:cells[0].isObject.set,isError:cells[0].isError.set,FERAL_EVAL:cells[0].FERAL_EVAL.set,FERAL_FUNCTION:cells[0].FERAL_FUNCTION.set}}),functors[1]({imports(entries){new Map(entries)},liveVar:{},onceVar:{}}),functors[2]({imports(entries){observeImports(new Map(entries),"../commons.js",0)},liveVar:{},onceVar:{an:cells[2].an.set,bestEffortStringify:cells[2].bestEffortStringify.set,enJoin:cells[2].enJoin.set}}),functors[3]({imports(entries){new Map(entries)},liveVar:{},onceVar:{}}),functors[4]({imports(entries){const map=new Map(entries);observeImports(map,"../commons.js",0),observeImports(map,"./internal-types.js",1),observeImports(map,"./stringify-utils.js",2),observeImports(map,"./types.js",3)},liveVar:{},onceVar:{unredactedDetails:cells[4].unredactedDetails.set,loggedErrorHandler:cells[4].loggedErrorHandler.set,makeAssert:cells[4].makeAssert.set,assert:cells[4].assert.set}}),functors[5]({imports(entries){observeImports(new Map(entries),"./commons.js",0)},liveVar:{},onceVar:{makeEvaluateFactory:cells[5].makeEvaluateFactory.set}}),functors[6]({imports(entries){observeImports(new Map(entries),"./commons.js",0)},liveVar:{},onceVar:{isValidIdentifierName:cells[6].isValidIdentifierName.set,getScopeConstants:cells[6].getScopeConstants.set}}),functors[7]({imports(entries){const map=new Map(entries);observeImports(map,"./commons.js",0),observeImports(map,"./error/assert.js",4)},liveVar:{},onceVar:{createScopeHandler:cells[7].createScopeHandler.set}}),functors[8]({imports(entries){observeImports(new Map(entries),"./commons.js",0)},liveVar:{},onceVar:{getSourceURL:cells[8].getSourceURL.set}}),functors[9]({imports(entries){const map=new Map(entries);observeImports(map,"./commons.js",0),observeImports(map,"./get-source-url.js",8)},liveVar:{},onceVar:{rejectHtmlComments:cells[9].rejectHtmlComments.set,evadeHtmlCommentTest:cells[9].evadeHtmlCommentTest.set,rejectImportExpressions:cells[9].rejectImportExpressions.set,evadeImportExpressionTest:cells[9].evadeImportExpressionTest.set,rejectSomeDirectEvalExpressions:cells[9].rejectSomeDirectEvalExpressions.set,mandatoryTransforms:cells[9].mandatoryTransforms.set,applyTransforms:cells[9].applyTransforms.set}}),functors[10]({imports(entries){const map=new Map(entries);observeImports(map,"./commons.js",0),observeImports(map,"./error/assert.js",4),observeImports(map,"./make-evaluate-factory.js",5),observeImports(map,"./scope-constants.js",6),observeImports(map,"./scope-handler.js",7),observeImports(map,"./transforms.js",9)},liveVar:{},onceVar:{makeSafeEvaluator:cells[10].makeSafeEvaluator.set}}),functors[11]({imports(entries){const map=new Map(entries);observeImports(map,"./commons.js",0),observeImports(map,"./make-safe-evaluator.js",10),observeImports(map,"./transforms.js",9)},liveVar:{},onceVar:{provideCompartmentEvaluator:cells[11].provideCompartmentEvaluator.set,compartmentEvaluate:cells[11].compartmentEvaluate.set}}),functors[12]({imports(entries){new Map(entries)},liveVar:{},onceVar:{makeEvalFunction:cells[12].makeEvalFunction.set}}),functors[13]({imports(entries){const map=new Map(entries);observeImports(map,"./commons.js",0),observeImports(map,"./error/assert.js",4)},liveVar:{},onceVar:{makeFunctionConstructor:cells[13].makeFunctionConstructor.set}}),functors[14]({imports(entries){new Map(entries)},liveVar:{},onceVar:{constantProperties:cells[14].constantProperties.set,universalPropertyNames:cells[14].universalPropertyNames.set,initialGlobalPropertyNames:cells[14].initialGlobalPropertyNames.set,sharedGlobalPropertyNames:cells[14].sharedGlobalPropertyNames.set,uniqueGlobalPropertyNames:cells[14].uniqueGlobalPropertyNames.set,NativeErrors:cells[14].NativeErrors.set,FunctionInstance:cells[14].FunctionInstance.set,isAccessorPermit:cells[14].isAccessorPermit.set,whitelist:cells[14].whitelist.set}}),functors[15]({imports(entries){const map=new Map(entries);observeImports(map,"./commons.js",0),observeImports(map,"./make-eval-function.js",12),observeImports(map,"./make-function-constructor.js",13),observeImports(map,"./whitelist.js",14)},liveVar:{},onceVar:{setGlobalObjectConstantProperties:cells[15].setGlobalObjectConstantProperties.set,setGlobalObjectMutableProperties:cells[15].setGlobalObjectMutableProperties.set}}),functors[16]({imports(entries){const map=new Map(entries);observeImports(map,"./commons.js",0),observeImports(map,"./error/assert.js",4)},liveVar:{},onceVar:{makeAlias:cells[16].makeAlias.set,load:cells[16].load.set}}),functors[17]({imports(entries){const map=new Map(entries);observeImports(map,"./commons.js",0),observeImports(map,"./error/assert.js",4),observeImports(map,"./module-load.js",16)},liveVar:{},onceVar:{deferExports:cells[17].deferExports.set,getDeferredExports:cells[17].getDeferredExports.set}}),functors[18]({imports(entries){const map=new Map(entries);observeImports(map,"./commons.js",0),observeImports(map,"./compartment-evaluate.js",11),observeImports(map,"./error/assert.js",4),observeImports(map,"./module-proxy.js",17)},liveVar:{},onceVar:{makeThirdPartyModuleInstance:cells[18].makeThirdPartyModuleInstance.set,makeModuleInstance:cells[18].makeModuleInstance.set}}),functors[19]({imports(entries){const map=new Map(entries);observeImports(map,"./commons.js",0),observeImports(map,"./error/assert.js",4),observeImports(map,"./module-instance.js",18)},liveVar:{},onceVar:{link:cells[19].link.set,instantiate:cells[19].instantiate.set}}),functors[20]({imports(entries){const map=new Map(entries);observeImports(map,"./commons.js",0),observeImports(map,"./compartment-evaluate.js",11),observeImports(map,"./error/assert.js",4),observeImports(map,"./global-object.js",15),observeImports(map,"./make-safe-evaluator.js",10),observeImports(map,"./module-link.js",19),observeImports(map,"./module-load.js",16),observeImports(map,"./module-proxy.js",17),observeImports(map,"./scope-constants.js",6),observeImports(map,"./whitelist.js",14)},liveVar:{},onceVar:{InertCompartment:cells[20].InertCompartment.set,CompartmentPrototype:cells[20].CompartmentPrototype.set,makeCompartmentConstructor:cells[20].makeCompartmentConstructor.set}}),functors[21]({imports(entries){const map=new Map(entries);observeImports(map,"./commons.js",0),observeImports(map,"./whitelist.js",14)},liveVar:{},onceVar:{makeIntrinsicsCollector:cells[21].makeIntrinsicsCollector.set,getGlobalIntrinsics:cells[21].getGlobalIntrinsics.set}}),functors[22]({imports(entries){new Map(entries)},liveVar:{},onceVar:{minEnablements:cells[22].minEnablements.set,moderateEnablements:cells[22].moderateEnablements.set,severeEnablements:cells[22].severeEnablements.set}}),functors[23]({imports(entries){const map=new Map(entries);observeImports(map,"./commons.js",0),observeImports(map,"./enablements.js",22)},liveVar:{},onceVar:{default:cells[23].default.set}}),functors[24]({imports(entries){const map=new Map(entries);observeImports(map,"./commons.js",0),observeImports(map,"./error/assert.js",4)},liveVar:{},onceVar:{makeEnvironmentCaptor:cells[24].makeEnvironmentCaptor.set}}),functors[25]({imports(entries){const map=new Map(entries);observeImports(map,"../commons.js",0),observeImports(map,"./internal-types.js",1),observeImports(map,"./types.js",3)},liveVar:{},onceVar:{makeLoggingConsoleKit:cells[25].makeLoggingConsoleKit.set,makeCausalConsole:cells[25].makeCausalConsole.set,filterConsole:cells[25].filterConsole.set,consoleWhitelist:cells[25].consoleWhitelist.set,BASE_CONSOLE_LEVEL:cells[25].BASE_CONSOLE_LEVEL.set}}),functors[26]({imports(entries){const map=new Map(entries);observeImports(map,"../commons.js",0),observeImports(map,"./assert.js",4),observeImports(map,"./console.js",25),observeImports(map,"./internal-types.js",1),observeImports(map,"./types.js",3)},liveVar:{},onceVar:{tameConsole:cells[26].tameConsole.set}}),functors[27]({imports(entries){observeImports(new Map(entries),"../commons.js",0)},liveVar:{},onceVar:{filterFileName:cells[27].filterFileName.set,shortenCallSiteString:cells[27].shortenCallSiteString.set,tameV8ErrorConstructor:cells[27].tameV8ErrorConstructor.set}}),functors[28]({imports(entries){const map=new Map(entries);observeImports(map,"../commons.js",0),observeImports(map,"../whitelist.js",14),observeImports(map,"./tame-v8-error-constructor.js",27)},liveVar:{},onceVar:{default:cells[28].default.set}}),functors[29]({imports(entries){const map=new Map(entries);observeImports(map,"./commons.js",0),observeImports(map,"./compartment-shim.js",20)},liveVar:{},onceVar:{getAnonymousIntrinsics:cells[29].getAnonymousIntrinsics.set}}),functors[30]({imports(entries){observeImports(new Map(entries),"./commons.js",0)},liveVar:{},onceVar:{makeHardener:cells[30].makeHardener.set}}),functors[31]({imports(entries){observeImports(new Map(entries),"./commons.js",0)},liveVar:{},onceVar:{default:cells[31].default.set}}),functors[32]({imports(entries){observeImports(new Map(entries),"./commons.js",0)},liveVar:{},onceVar:{tameDomains:cells[32].tameDomains.set}}),functors[33]({imports(entries){observeImports(new Map(entries),"./commons.js",0)},liveVar:{},onceVar:{default:cells[33].default.set}}),functors[34]({imports(entries){observeImports(new Map(entries),"./commons.js",0)},liveVar:{},onceVar:{tameFunctionToString:cells[34].tameFunctionToString.set}}),functors[35]({imports(entries){const map=new Map(entries);observeImports(map,"./commons.js",0),observeImports(map,"./error/assert.js",4)},liveVar:{},onceVar:{default:cells[35].default.set}}),functors[36]({imports(entries){observeImports(new Map(entries),"./commons.js",0)},liveVar:{},onceVar:{default:cells[36].default.set}}),functors[37]({imports(entries){observeImports(new Map(entries),"./commons.js",0)},liveVar:{},onceVar:{default:cells[37].default.set}}),functors[38]({imports(entries){const map=new Map(entries);observeImports(map,"./commons.js",0),observeImports(map,"./whitelist.js",14)},liveVar:{},onceVar:{default:cells[38].default.set}}),functors[39]({imports(entries){const map=new Map(entries);observeImports(map,"./commons.js",0),observeImports(map,"./compartment-shim.js",20),observeImports(map,"./enable-property-overrides.js",23),observeImports(map,"./environment-options.js",24),observeImports(map,"./error/assert.js",4),observeImports(map,"./error/stringify-utils.js",2),observeImports(map,"./error/tame-console.js",26),observeImports(map,"./error/tame-error-constructor.js",28),observeImports(map,"./get-anonymous-intrinsics.js",29),observeImports(map,"./global-object.js",15),observeImports(map,"./intrinsics.js",21),observeImports(map,"./make-hardener.js",30),observeImports(map,"./make-safe-evaluator.js",10),observeImports(map,"./tame-date-constructor.js",31),observeImports(map,"./tame-domains.js",32),observeImports(map,"./tame-function-constructors.js",33),observeImports(map,"./tame-function-tostring.js",34),observeImports(map,"./tame-locale-methods.js",35),observeImports(map,"./tame-math-object.js",36),observeImports(map,"./tame-regexp-constructor.js",37),observeImports(map,"./whitelist-intrinsics.js",38),observeImports(map,"./whitelist.js",14)},liveVar:{},onceVar:{repairIntrinsics:cells[39].repairIntrinsics.set,lockdown:cells[39].lockdown.set}}),functors[40]({imports(entries){const map=new Map(entries);observeImports(map,"./src/commons.js",0),observeImports(map,"./src/compartment-shim.js",20),observeImports(map,"./src/error/assert.js",4),observeImports(map,"./src/intrinsics.js",21),observeImports(map,"./src/lockdown-shim.js",39),observeImports(map,"./src/tame-function-tostring.js",34)},liveVar:{},onceVar:{}})})();
|