@agoric/xsnap-lockdown 0.14.1-upgrade-16-dev-0df76a7.0 → 0.14.1-upgrade-17-dev-e67cd91.0
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.
|
@@ -1 +1 @@
|
|
|
1
|
-
{"moduleFormat":"nestedEvaluate","source":"function getExportWithNestedEvaluate(filePrefix) {\n 'use strict';\n // Serialised sources.\n if (filePrefix === undefined) {\n filePrefix = \"/bundled-source/...\";\n }\n const moduleFormat = \"nestedEvaluate\";\n const entrypoint = \"packages/xsnap-lockdown/lib/ses-boot-debug.js\";\n const sourceBundle = {\n \"node_modules/@endo/base64/atob.js\": \"'use strict';Object.defineProperty(exports,'__esModule',{value:true});require('./decode.js');var\\n\\ndecode=require('./src/decode.js');/**\\n * @param {string} encodedData a binary string containing base64-encoded data\\n * @returns {string} an ASCII string containing decoded data from `encodedData`\\n */\\nconst atob=(encodedData)=>{\\nconst buf=decode.decodeBase64(encodedData);\\nreturn String.fromCharCode(...buf);};exports.atob=atob;\",\n \"node_modules/@endo/base64/btoa.js\": \"'use strict';Object.defineProperty(exports,'__esModule',{value:true});require('./encode.js');var\\n\\nencode=require('./src/encode.js');/**\\n * @param {string} stringToEncode the binary string to encode\\n * @returns {string} an ASCII string containing the base64 representation of `stringToEncode`\\n */\\nconst btoa=(stringToEncode)=>{\\nconst bytes=stringToEncode.split('').map((char)=>{\\nconst b=char.charCodeAt(0);\\nif(b>0xff){\\nthrow Error(`btoa: character out of range: ${char}`);}\\n\\nreturn b;});\\n\\nconst buf=new Uint8Array(bytes);\\nreturn encode.encodeBase64(buf);};exports.btoa=btoa;\",\n \"node_modules/@endo/base64/decode.js\": \"'use strict';Object.defineProperty(exports,'__esModule',{value:true});var decode=require('./src/decode.js');exports.decodeBase64=decode.decodeBase64;\",\n \"node_modules/@endo/base64/encode.js\": \"'use strict';Object.defineProperty(exports,'__esModule',{value:true});var encode=require('./src/encode.js');exports.encodeBase64=encode.encodeBase64;\",\n \"node_modules/@endo/base64/shim.js\": \"'use strict';var atob=require('./atob.js');var btoa=require('./btoa.js');/* global globalThis */\\n\\n\\n\\n\\nif(globalThis.atob===undefined){\\nglobalThis.atob=atob.atob;}\\n\\n\\nif(globalThis.btoa===undefined){\\nglobalThis.btoa=btoa.btoa;}\",\n \"node_modules/@endo/base64/src/common.js\": \"'use strict';Object.defineProperty(exports,'__esModule',{value:true});/* @ts-check*/\\n\\nconst padding='=';\\n\\nconst alphabet64=\\n'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/';\\n\\n/**\\n * The numeric value corresponding to each letter of the alphabet.\\n * If an alphabet is named for the Greek letters alpha and beta, then clearly a\\n * monodu is named for the corresponding Greek numbers mono and duo.\\n *\\n * @type {Record<string, number>}\\n */\\nconst monodu64={};\\nfor(let i=0;i<alphabet64.length;i+=1){\\nconst c=alphabet64[i];\\nmonodu64[c]=i;}exports.alphabet64=alphabet64;exports.monodu64=monodu64;exports.padding=padding;\",\n \"node_modules/@endo/base64/src/decode.js\": \"'use strict';Object.defineProperty(exports,'__esModule',{value:true});var\\n\\n\\n\\n\\n\\ncommon=require('./common.js');/* @ts-check*/ /**\\n * Decodes a Base64 string into bytes, as specified in\\n * https://tools.ietf.org/html/rfc4648#section-4\\n *\\n * XSnap is a JavaScript engine based on Moddable/XS.\\n * The algorithm below is orders of magnitude too slow on this VM, but it\\n * arranges a native binding on the global object.\\n * We use that if it is available instead.\\n *\\n * This function is exported from this *file* for use in benchmarking,\\n * but is not part of the *module*'s public API.\\n *\\n * @param {string} string Base64-encoded string\\n * @param {string} [name] The name of the string as it will appear in error\\n * messages.\\n * @returns {Uint8Array} decoded bytes\\n */\\nconst jsDecodeBase64=(string,name='<unknown>')=>{\\nconst data=new Uint8Array(Math.ceil(string.length*4/3));\\nlet register=0;\\nlet quantum=0;\\nlet i=0;/* index in string*/\\nlet j=0;/* index in data*/\\n\\nwhile(i<string.length&&string[i]!==common.padding){\\nconst number=common.monodu64[string[i]];\\nif(number===undefined){\\nthrow Error(`Invalid base64 character ${string[i]} in string ${name}`);}\\n\\nregister=register<<6|number;\\nquantum+=6;\\nif(quantum>=8){\\nquantum-=8;\\ndata[j]=register>>>quantum;\\nj+=1;\\nregister&=(1<<quantum)-1;}\\n\\ni+=1;}\\n\\n\\nwhile(quantum>0){\\nif(i===string.length||string[i]!==common.padding){\\nthrow Error(`Missing padding at offset ${i} of string ${name}`);}\\n\\n/* We MAY reject non-zero padding bits, but choose not to.*/\\n/* https://datatracker.ietf.org/doc/html/rfc4648#section-3.5*/\\ni+=1;\\nquantum-=2;}\\n\\n\\nif(i<string.length){\\nthrow Error(\\n`Base64 string has trailing garbage ${string.substr(\\ni)\\n} in string ${name}`);}\\n\\n\\n\\nreturn data.subarray(0,j);};\\n\\n\\n/* The XS Base64.decode function is faster, but might return ArrayBuffer (not*/\\n/* Uint8Array). Adapt it to our needs.*/\\nconst adaptDecoder=\\n(nativeDecodeBase64)=>\\n(...args)=>{\\nconst decoded=nativeDecodeBase64(...args);\\nif(decoded instanceof Uint8Array){\\nreturn decoded;}\\n\\nreturn new Uint8Array(decoded);};\\n\\n\\n/** @type {typeof jsDecodeBase64} */\\nconst decodeBase64=\\nglobalThis.Base64!==undefined?\\nadaptDecoder(globalThis.Base64.decode):\\njsDecodeBase64;exports.decodeBase64=decodeBase64;exports.jsDecodeBase64=jsDecodeBase64;\",\n \"node_modules/@endo/base64/src/encode.js\": \"'use strict';Object.defineProperty(exports,'__esModule',{value:true});var\\n\\n\\n\\n\\n\\ncommon=require('./common.js');/* @ts-check*/ /**\\n * Encodes bytes into a Base64 string, as specified in\\n * https://tools.ietf.org/html/rfc4648#section-4\\n *\\n * XSnap is a JavaScript engine based on Moddable/XS.\\n * The algorithm below is orders of magnitude too slow on this VM, but it\\n * arranges a native binding on the global object.\\n * We use that if it is available instead.\\n *\\n * This function is exported from this *file* for use in benchmarking,\\n * but is not part of the *module*'s public API.\\n *\\n * @param {Uint8Array} data\\n * @returns {string} base64 encoding\\n */\\nconst jsEncodeBase64=(data)=>{\\n/* A cursory benchmark shows that string concatenation is about 25% faster*/\\n/* than building an array and joining it in v8, in 2020, for strings of about*/\\n/* 100 long.*/\\nlet string='';\\nlet register=0;\\nlet quantum=0;\\n\\nfor(let i=0;i<data.length;i+=1){\\nconst b=data[i];\\nregister=register<<8|b;\\nquantum+=8;\\nif(quantum===24){\\nstring+=\\ncommon.alphabet64[register>>>18&0x3f]+\\ncommon.alphabet64[register>>>12&0x3f]+\\ncommon.alphabet64[register>>>6&0x3f]+\\ncommon.alphabet64[register>>>0&0x3f];\\nregister=0;\\nquantum=0;}}\\n\\n\\n\\nswitch(quantum){\\ncase 0:\\nbreak;\\ncase 8:\\nstring+=\\ncommon.alphabet64[register>>>2&0x3f]+\\ncommon.alphabet64[register<<4&0x3f]+\\ncommon.padding+\\ncommon.padding;\\nbreak;\\ncase 16:\\nstring+=\\ncommon.alphabet64[register>>>10&0x3f]+\\ncommon.alphabet64[register>>>4&0x3f]+\\ncommon.alphabet64[register<<2&0x3f]+\\ncommon.padding;\\nbreak;\\ndefault:\\nthrow Error(`internal: bad quantum ${quantum}`);}\\n\\nreturn string;};\\n\\n\\n/** @type {typeof jsEncodeBase64} */\\nconst encodeBase64=\\nglobalThis.Base64!==undefined?globalThis.Base64.encode:jsEncodeBase64;exports.encodeBase64=encodeBase64;exports.jsEncodeBase64=jsEncodeBase64;\",\n \"node_modules/@endo/env-options/index.js\": \"'use strict';Object.defineProperty(exports,'__esModule',{value:true});var envOptions=require('./src/env-options.js');exports.environmentOptionsListHas=envOptions.environmentOptionsListHas;exports.getEnvironmentOption=envOptions.getEnvironmentOption;exports.getEnvironmentOptionsList=envOptions.getEnvironmentOptionsList;exports.makeEnvironmentCaptor=envOptions.makeEnvironmentCaptor;\",\n \"node_modules/@endo/env-options/src/env-options.js\": \"'use strict';\\n\\n\\n\\n\\n\\n\\n\\nObject.defineProperty(exports,'__esModule',{value:true});/* global globalThis */ /* @ts-check*/ /* `@endo/env-options` needs to be imported quite early, and so should*/ /* avoid importing from ses or anything that depends on ses.*/ /* /////////////////////////////////////////////////////////////////////////////*/ /* Prelude of cheap good - enough imitations of things we'd use or*/ /* do differently if we could depend on ses*/\\n\\nconst{freeze}=Object;\\nconst{apply}=Reflect;\\n\\n/* Should be equivalent to the one in ses' commons.js even though it*/\\n/* uses the other technique.*/\\nconst uncurryThis=\\n(fn)=>\\n(receiver,...args)=>\\napply(fn,receiver,args);\\nconst arrayPush=uncurryThis(Array.prototype.push);\\nconst arrayIncludes=uncurryThis(Array.prototype.includes);\\nconst stringSplit=uncurryThis(String.prototype.split);\\n\\nconst q=JSON.stringify;\\n\\nconst Fail=(literals,...args)=>{\\nlet msg=literals[0];\\nfor(let i=0;i<args.length;i+=1){\\nmsg=`${msg}${args[i]}${literals[i+1]}`;}\\n\\nthrow Error(msg);};\\n\\n\\n/* end prelude*/\\n/* /////////////////////////////////////////////////////////////////////////////*/\\n\\n/**\\n * `makeEnvironmentCaptor` provides a mechanism for getting environment\\n * variables, if they are needed, and a way to catalog the names of all\\n * the environment variables that were captured.\\n *\\n * @param {object} aGlobal\\n * @param {boolean} [dropNames] Defaults to false. If true, don't track\\n * names used.\\n */\\nconst makeEnvironmentCaptor=(aGlobal,dropNames=false)=>{\\nconst capturedEnvironmentOptionNames=[];\\n\\n/**\\n * Gets an environment option by name and returns the option value or the\\n * given default.\\n *\\n * @param {string} optionName\\n * @param {string} defaultSetting\\n * @param {string[]} [optOtherValues]\\n * If provided, the option value must be included or match `defaultSetting`.\\n * @returns {string}\\n */\\nconst getEnvironmentOption=(\\noptionName,\\ndefaultSetting,\\noptOtherValues=undefined)=>\\n{\\ntypeof optionName==='string'||\\nFail`Environment option name ${q(optionName)} must be a string.`;\\ntypeof defaultSetting==='string'||\\nFail`Environment option default setting ${q(\\ndefaultSetting)\\n} must be a string.`;\\n\\n/** @type {string} */\\nlet setting=defaultSetting;\\nconst globalProcess=aGlobal.process||undefined;\\nconst globalEnv=\\ntypeof globalProcess==='object'&&globalProcess.env||undefined;\\nif(typeof globalEnv==='object'){\\nif(optionName in globalEnv){\\nif(!dropNames){\\narrayPush(capturedEnvironmentOptionNames,optionName);}\\n\\nconst optionValue=globalEnv[optionName];\\n/* eslint-disable-next-line @endo/no-polymorphic-call*/\\ntypeof optionValue==='string'||\\nFail`Environment option named ${q(\\noptionName)\\n}, if present, must have a corresponding string value, got ${q(\\noptionValue)\\n}`;\\nsetting=optionValue;}}\\n\\n\\noptOtherValues===undefined||\\nsetting===defaultSetting||\\narrayIncludes(optOtherValues,setting)||\\nFail`Unrecognized ${q(optionName)} value ${q(\\nsetting)\\n}. Expected one of ${q([defaultSetting,...optOtherValues])}`;\\nreturn setting;};\\n\\nfreeze(getEnvironmentOption);\\n\\n/**\\n * @param {string} optionName\\n * @returns {string[]}\\n */\\nconst getEnvironmentOptionsList=(optionName)=>{\\nconst option=getEnvironmentOption(optionName,'');\\nreturn freeze(option===''?[]:stringSplit(option,','));};\\n\\nfreeze(getEnvironmentOptionsList);\\n\\nconst environmentOptionsListHas=(optionName,element)=>\\narrayIncludes(getEnvironmentOptionsList(optionName),element);\\n\\nconst getCapturedEnvironmentOptionNames=()=>{\\nreturn freeze([...capturedEnvironmentOptionNames]);};\\n\\nfreeze(getCapturedEnvironmentOptionNames);\\n\\nreturn freeze({\\ngetEnvironmentOption,\\ngetEnvironmentOptionsList,\\nenvironmentOptionsListHas,\\ngetCapturedEnvironmentOptionNames});};\\n\\n\\nfreeze(makeEnvironmentCaptor);\\n\\n/**\\n * For the simple case, where the global in question is `globalThis` and no\\n * reporting of option names is desired.\\n */\\nconst{\\ngetEnvironmentOption,\\ngetEnvironmentOptionsList,\\nenvironmentOptionsListHas}=\\nmakeEnvironmentCaptor(globalThis,true);exports.environmentOptionsListHas=environmentOptionsListHas;exports.getEnvironmentOption=getEnvironmentOption;exports.getEnvironmentOptionsList=getEnvironmentOptionsList;exports.makeEnvironmentCaptor=makeEnvironmentCaptor;\",\n \"node_modules/@endo/eventual-send/shim.js\": \"'use strict';var handledPromise=require('./src/handled-promise.js');/* global globalThis */\\n\\n\\nif(typeof globalThis.HandledPromise==='undefined'){\\nglobalThis.HandledPromise=handledPromise.makeHandledPromise();}\",\n \"node_modules/@endo/eventual-send/src/handled-promise.js\": \"'use strict';Object.defineProperty(exports,'__esModule',{value:true});var trackTurns=require('./track-turns.js');var local=require('./local.js');var postponed=require('./postponed.js');/*/ <reference types=\\\"ses\\\" />*/\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\nconst{Fail,details:X,quote:q}=assert;\\n\\nconst{\\ncreate,\\nfreeze,\\ngetOwnPropertyDescriptor,\\ngetOwnPropertyDescriptors,\\ndefineProperties,\\ngetPrototypeOf,\\nsetPrototypeOf,\\nisFrozen,\\nis:objectIs}=\\nObject;\\n\\nconst{apply,construct,ownKeys}=Reflect;\\n\\nconst SEND_ONLY_RE=/^(.*)SendOnly$/;\\n\\n/**\\n * Coerce to an object property (string or symbol).\\n *\\n * @param {any} specimen\\n * @returns {string | symbol}\\n */\\nconst coerceToObjectProperty=(specimen)=>{\\nif(typeof specimen==='symbol'){\\nreturn specimen;}\\n\\nreturn String(specimen);};\\n\\n\\n/* the following method (makeHandledPromise) is part*/\\n/* of the shim, and will not be exported by the module once the feature*/\\n/* becomes a part of standard javascript*/\\n\\n/**\\n * Create a HandledPromise class to have it support eventual send\\n * (wavy-dot) operations.\\n *\\n * Based heavily on nanoq\\n * https://github.com/drses/nanoq/blob/master/src/nanoq.js\\n *\\n * Original spec for the infix-bang (predecessor to wavy-dot) desugaring:\\n * https://web.archive.org/web/20161026162206/http://wiki.ecmascript.org/doku.php?id=strawman:concurrency\\n *\\n */\\nconst makeHandledPromise=()=>{\\nconst presenceToHandler=new WeakMap();\\n/** @type {WeakMap<any, any>} */\\nconst presenceToPromise=new WeakMap();\\nconst promiseToPendingHandler=new WeakMap();\\nconst promiseToPresence=new WeakMap();\\nconst forwardedPromiseToPromise=new WeakMap();/* forwarding, union-find-ish*/\\n\\n/**\\n * You can imagine a forest of trees in which the roots of each tree is an\\n * unresolved HandledPromise or a non-Promise, and each node's parent is the\\n * HandledPromise to which it was forwarded. We maintain that mapping of\\n * forwarded HandledPromise to its resolution in forwardedPromiseToPromise.\\n *\\n * We use something like the description of \\\"Find\\\" with \\\"Path splitting\\\"\\n * to propagate changes down to the children efficiently:\\n * https://en.wikipedia.org/wiki/Disjoint-set_data_structure\\n *\\n * @param {any} target Any value.\\n * @returns {any} If the target was a HandledPromise, the most-resolved parent\\n * of it, otherwise the target.\\n */\\nconst shorten=(target)=>{\\nlet p=target;\\n/* Find the most-resolved value for p.*/\\nwhile(forwardedPromiseToPromise.has(p)){\\np=forwardedPromiseToPromise.get(p);}\\n\\nconst presence=promiseToPresence.get(p);\\nif(presence){\\n/* Presences are final, so it is ok to propagate*/\\n/* this upstream.*/\\nwhile(!objectIs(target,p)){\\nconst parent=forwardedPromiseToPromise.get(target);\\nforwardedPromiseToPromise.delete(target);\\npromiseToPendingHandler.delete(target);\\npromiseToPresence.set(target,presence);\\ntarget=parent;}}else\\n\\n{\\n/* We propagate p and remove all other pending handlers*/\\n/* upstream.*/\\n/* Note that everything except presences is covered here.*/\\nwhile(!objectIs(target,p)){\\nconst parent=forwardedPromiseToPromise.get(target);\\nforwardedPromiseToPromise.set(target,p);\\npromiseToPendingHandler.delete(target);\\ntarget=parent;}}\\n\\n\\nreturn target;};\\n\\n\\n/**\\n * This special handler accepts Promises, and forwards\\n * handled Promises to their corresponding fulfilledHandler.\\n *\\n * @type {Required<Handler<any>>}\\n */\\nlet forwardingHandler;\\nlet handle;\\n\\n/**\\n * @param {string} handlerName\\n * @param {Handler<any>} handler\\n * @param {string} operation\\n * @param {any} o\\n * @param {any[]} opArgs\\n * @param {Promise<unknown>} [returnedP]\\n * @returns {any}\\n */\\nconst dispatchToHandler=(\\nhandlerName,\\nhandler,\\noperation,\\no,\\nopArgs,\\nreturnedP)=>\\n{\\nlet actualOp=operation;\\n\\nconst matchSendOnly=SEND_ONLY_RE.exec(actualOp);\\n\\nconst makeResult=(result)=>matchSendOnly?undefined:result;\\n\\nif(matchSendOnly){\\n/* We don't specify the resulting promise if it is sendonly.*/\\nreturnedP=undefined;}\\n\\n\\nif(matchSendOnly&&typeof handler[actualOp]!=='function'){\\n/* Substitute for sendonly with the corresponding non-sendonly operation.*/\\nactualOp=matchSendOnly[1];}\\n\\n\\n/* Fast path: just call the actual operation.*/\\nconst hfn=handler[actualOp];\\nif(typeof hfn==='function'){\\nconst result=apply(hfn,handler,[o,...opArgs,returnedP]);\\nreturn makeResult(result);}\\n\\n\\nif(actualOp==='applyMethod'){\\n/* Compose a missing applyMethod by get followed by applyFunction.*/\\nconst[prop,args]=opArgs;\\nconst getResultP=handle(\\no,\\n'get',\\n/* The argument to 'get' is a string or symbol.*/\\n[coerceToObjectProperty(prop)],\\nundefined);\\n\\nreturn makeResult(handle(getResultP,'applyFunction',[args],returnedP));}\\n\\n\\n/* BASE CASE: applyFunction bottoms out into applyMethod, if it exists.*/\\nif(actualOp==='applyFunction'){\\nconst amfn=handler.applyMethod;\\nif(typeof amfn==='function'){\\n/* Downlevel a missing applyFunction to applyMethod with undefined name.*/\\nconst[args]=opArgs;\\nconst result=apply(amfn,handler,[o,undefined,[args],returnedP]);\\nreturn makeResult(result);}}\\n\\n\\n\\nthrow assert.fail(\\nX`${q(handlerName)} is defined but has no methods needed for ${q(\\noperation)\\n} (has ${q(local.getMethodNames(handler))})`,\\nTypeError);};\\n\\n\\n\\n/** @typedef {{new <R>(executor: HandledExecutor<R>, unfulfilledHandler?: Handler<Promise<unknown>>): Promise<R>, prototype: Promise<unknown>} & PromiseConstructor & HandledPromiseStaticMethods} HandledPromiseConstructor */\\n/** @type {HandledPromiseConstructor} */\\nlet HandledPromise;\\n\\n/**\\n * This *needs* to be a `function X` so that we can use it as a constructor.\\n *\\n * @template R\\n * @param {HandledExecutor<R>} executor\\n * @param {Handler<Promise<R>>} [pendingHandler]\\n * @returns {Promise<R>}\\n */\\nfunction baseHandledPromise(executor,pendingHandler=undefined){\\nnew.target||Fail`must be invoked with \\\"new\\\"`;\\nlet handledResolve;\\nlet handledReject;\\nlet resolved=false;\\nlet resolvedTarget=null;\\nlet handledP;\\nlet continueForwarding=()=>{};\\nconst assertNotYetForwarded=()=>{\\n!forwardedPromiseToPromise.has(handledP)||\\nassert.fail(X`internal: already forwarded`,TypeError);};\\n\\nconst superExecutor=(superResolve,superReject)=>{\\nhandledResolve=(value)=>{\\nif(resolved){\\nreturn;}\\n\\nassertNotYetForwarded();\\nvalue=shorten(value);\\nlet targetP;\\nif(\\npromiseToPendingHandler.has(value)||\\npromiseToPresence.has(value))\\n{\\ntargetP=value;}else\\n{\\n/* We're resolving to a non-promise, so remove our handler.*/\\npromiseToPendingHandler.delete(handledP);\\ntargetP=presenceToPromise.get(value);}\\n\\n/* Ensure our data structure is a proper tree (avoid cycles).*/\\nif(targetP&&!objectIs(targetP,handledP)){\\nforwardedPromiseToPromise.set(handledP,targetP);}else\\n{\\nforwardedPromiseToPromise.delete(handledP);}\\n\\n\\n/* Remove stale pending handlers, set to canonical form.*/\\nshorten(handledP);\\n\\n/* Finish the resolution.*/\\nsuperResolve(value);\\nresolved=true;\\nresolvedTarget=value;\\n\\n/* We're resolved, so forward any postponed operations to us.*/\\ncontinueForwarding();};\\n\\nhandledReject=(reason)=>{\\nif(resolved){\\nreturn;}\\n\\nharden(reason);\\nassertNotYetForwarded();\\npromiseToPendingHandler.delete(handledP);\\nresolved=true;\\nsuperReject(reason);\\ncontinueForwarding();};};\\n\\n\\nhandledP=harden(construct(Promise,[superExecutor],new.target));\\n\\nif(!pendingHandler){\\n/* This is insufficient for actual remote handled Promises*/\\n/* (too many round-trips), but is an easy way to create a*/\\n/* local handled Promise.*/\\n[pendingHandler,continueForwarding]=\\npostponed.makePostponedHandler(HandledPromise);}\\n\\n\\nconst validateHandler=(h)=>{\\nObject(h)===h||\\nassert.fail(X`Handler ${h} cannot be a primitive`,TypeError);};\\n\\nvalidateHandler(pendingHandler);\\n\\n/* Until the handled promise is resolved, we use the pendingHandler.*/\\npromiseToPendingHandler.set(handledP,pendingHandler);\\n\\nconst rejectHandled=(reason)=>{\\nif(resolved){\\nreturn;}\\n\\nassertNotYetForwarded();\\nhandledReject(reason);};\\n\\n\\nconst resolveWithPresence=(\\npresenceHandler=pendingHandler,\\noptions={})=>\\n{\\nif(resolved){\\nreturn resolvedTarget;}\\n\\nassertNotYetForwarded();\\ntry{\\n/* Sanity checks.*/\\nvalidateHandler(presenceHandler);\\n\\nconst{proxy:proxyOpts}=options;\\nlet presence;\\nif(proxyOpts){\\nconst{\\nhandler:proxyHandler,\\ntarget:proxyTarget,\\nrevokerCallback}=\\nproxyOpts;\\nif(revokerCallback){\\n/* Create a proxy and its revoke function.*/\\nconst{proxy,revoke}=Proxy.revocable(\\nproxyTarget,\\nproxyHandler);\\n\\npresence=proxy;\\nrevokerCallback(revoke);}else\\n{\\npresence=new Proxy(proxyTarget,proxyHandler);}}else\\n\\n{\\n/* Default presence.*/\\npresence=create(null);}\\n\\n\\n/* Validate and install our mapped target (i.e. presence).*/\\nresolvedTarget=presence;\\n\\n/* Create table entries for the presence mapped to the*/\\n/* fulfilledHandler.*/\\npresenceToPromise.set(resolvedTarget,handledP);\\npromiseToPresence.set(handledP,resolvedTarget);\\npresenceToHandler.set(resolvedTarget,presenceHandler);\\n\\n/* We committed to this presence, so resolve.*/\\nhandledResolve(resolvedTarget);\\nreturn resolvedTarget;}\\ncatch(e){\\nassert.note(e,X`during resolveWithPresence`);\\nhandledReject(e);\\nthrow e;}};\\n\\n\\n\\nconst resolveHandled=(target)=>{\\nif(resolved){\\nreturn;}\\n\\nassertNotYetForwarded();\\ntry{\\n/* Resolve the target.*/\\nhandledResolve(target);}\\ncatch(e){\\nhandledReject(e);}};\\n\\n\\n\\n/* Invoke the callback to let the user resolve/reject.*/\\nexecutor(resolveHandled,rejectHandled,resolveWithPresence);\\n\\nreturn handledP;}\\n\\n\\n/**\\n * If the promise `p` is safe, then during the evaluation of the\\n * expressopns `p.then` and `await p`, `p` cannot mount a reentrancy attack.\\n * Unfortunately, due to limitations of the current JavaScript standard,\\n * it seems impossible to prevent `p` from mounting a reentrancy attack\\n * during the evaluation of `isSafePromise(p)`, and therefore during\\n * operations like `HandledPromise.resolve(p)` that call\\n * `isSafePromise(p)` synchronously.\\n *\\n * The `@endo/marshal` package defines a related notion of a passable\\n * promise, i.e., one for which which `passStyleOf(p) === 'promise'`. All\\n * passable promises are also safe. But not vice versa because the\\n * requirements for a promise to be passable are slightly greater. A safe\\n * promise must not override `then` or `constructor`. A passable promise\\n * must not have any own properties. The requirements are otherwise\\n * identical.\\n *\\n * @param {Promise} p\\n * @returns {boolean}\\n */\\nconst isSafePromise=(p)=>{\\nreturn(\\nisFrozen(p)&&\\ngetPrototypeOf(p)===Promise.prototype&&\\nPromise.resolve(p)===p&&\\ngetOwnPropertyDescriptor(p,'then')===undefined&&\\ngetOwnPropertyDescriptor(p,'constructor')===undefined);};\\n\\n\\n\\n/** @type {HandledPromiseStaticMethods & Pick<PromiseConstructor, 'resolve'>} */\\nconst staticMethods={\\nget(target,prop){\\nprop=coerceToObjectProperty(prop);\\nreturn handle(target,'get',[prop]);},\\n\\ngetSendOnly(target,prop){\\nprop=coerceToObjectProperty(prop);\\nhandle(target,'getSendOnly',[prop]).catch(()=>{});},\\n\\napplyFunction(target,args){\\n/* Ensure args is an array.*/\\nargs=[...args];\\nreturn handle(target,'applyFunction',[args]);},\\n\\napplyFunctionSendOnly(target,args){\\n/* Ensure args is an array.*/\\nargs=[...args];\\nhandle(target,'applyFunctionSendOnly',[args]).catch(()=>{});},\\n\\napplyMethod(target,prop,args){\\nprop=coerceToObjectProperty(prop);\\n/* Ensure args is an array.*/\\nargs=[...args];\\nreturn handle(target,'applyMethod',[prop,args]);},\\n\\napplyMethodSendOnly(target,prop,args){\\nprop=coerceToObjectProperty(prop);\\n/* Ensure args is an array.*/\\nargs=[...args];\\nhandle(target,'applyMethodSendOnly',[prop,args]).catch(()=>{});},\\n\\nresolve(value){\\n/* Resolving a Presence returns the pre-registered handled promise.*/\\nlet resolvedPromise=presenceToPromise.get(/** @type {any} */value);\\nif(!resolvedPromise){\\nresolvedPromise=Promise.resolve(value);}\\n\\n/* Prevent any proxy trickery.*/\\nharden(resolvedPromise);\\nif(isSafePromise(resolvedPromise)){\\n/* We can use the `resolvedPromise` directly, since it is guaranteed to*/\\n/* have a `then` which is actually `Promise.prototype.then`.*/\\nreturn resolvedPromise;}\\n\\n/* Assimilate the `resolvedPromise` as an actual frozen Promise, by*/\\n/* treating `resolvedPromise` as if it is a non-promise thenable.*/\\nconst executeThen=(resolve,reject)=>\\nresolvedPromise.then(resolve,reject);\\nreturn harden(\\nPromise.resolve().then(()=>new HandledPromise(executeThen)));}};\\n\\n\\n\\n\\nconst makeForwarder=(operation,localImpl)=>{\\nreturn(o,...args)=>{\\n/* We are in another turn already, and have the naked object.*/\\nconst presenceHandler=presenceToHandler.get(o);\\nif(!presenceHandler){\\nreturn localImpl(o,...args);}\\n\\nreturn dispatchToHandler(\\n'presenceHandler',\\npresenceHandler,\\noperation,\\no,\\nargs);};};\\n\\n\\n\\n\\n/* eslint-disable-next-line prefer-const*/\\nforwardingHandler={\\nget:makeForwarder('get',local.localGet),\\ngetSendOnly:makeForwarder('getSendOnly',local.localGet),\\napplyFunction:makeForwarder('applyFunction',local.localApplyFunction),\\napplyFunctionSendOnly:makeForwarder(\\n'applyFunctionSendOnly',\\nlocal.localApplyFunction),\\n\\napplyMethod:makeForwarder('applyMethod',local.localApplyMethod),\\napplyMethodSendOnly:makeForwarder('applyMethodSendOnly',local.localApplyMethod)};\\n\\n\\nhandle=(...handleArgs)=>{\\n/* We're in SES mode, so we should harden.*/\\nharden(handleArgs);\\nconst[_p,operation,opArgs,...dispatchArgs]=handleArgs;\\nlet[p]=handleArgs;\\nconst doDispatch=(handlerName,handler,o)=>\\ndispatchToHandler(\\nhandlerName,\\nhandler,\\noperation,\\no,\\nopArgs,\\n/* eslint-disable-next-line no-use-before-define*/\\n...(dispatchArgs.length===0?[returnedP]:dispatchArgs));\\n\\nconst[trackedDoDispatch]=trackTurns.trackTurns([doDispatch]);\\nconst returnedP=new HandledPromise((resolve,reject)=>{\\n/* We run in a future turn to prevent synchronous attacks,*/\\nlet raceIsOver=false;\\n\\nconst win=(handlerName,handler,o)=>{\\nif(raceIsOver){\\nreturn;}\\n\\ntry{\\nresolve(harden(trackedDoDispatch(handlerName,handler,o)));}\\ncatch(reason){\\nreject(harden(reason));}\\n\\nraceIsOver=true;};\\n\\n\\nconst lose=(reason)=>{\\nif(raceIsOver){\\nreturn;}\\n\\nreject(harden(reason));\\nraceIsOver=true;};\\n\\n\\n/* This contestant tries to win with the target's resolution.*/\\nstaticMethods.\\nresolve(p).\\nthen((o)=>win('forwardingHandler',forwardingHandler,o)).\\ncatch(lose);\\n\\n/* This contestant sleeps a turn, but then tries to win immediately.*/\\nstaticMethods.\\nresolve().\\nthen(()=>{\\np=shorten(p);\\nconst pendingHandler=promiseToPendingHandler.get(p);\\nif(pendingHandler){\\n/* resolve to the answer from the specific pending handler,*/\\nwin('pendingHandler',pendingHandler,p);}else\\nif(!p||typeof p.then!=='function'){\\n/* Not a Thenable, so use it.*/\\nwin('forwardingHandler',forwardingHandler,p);}else\\nif(promiseToPresence.has(p)){\\n/* We have the object synchronously, so resolve with it.*/\\nconst o=promiseToPresence.get(p);\\nwin('forwardingHandler',forwardingHandler,o);}\\n\\n/* If we made it here without winning, then we will wait*/\\n/* for the other contestant to win instead.*/}).\\n\\ncatch(lose);});\\n\\n\\n/* We return a handled promise with the default pending handler. This*/\\n/* prevents a race between the above Promise.resolves and pipelining.*/\\nreturn harden(returnedP);};\\n\\n\\n/* Add everything needed on the constructor.*/\\nbaseHandledPromise.prototype=Promise.prototype;\\nsetPrototypeOf(baseHandledPromise,Promise);\\ndefineProperties(\\nbaseHandledPromise,\\ngetOwnPropertyDescriptors(staticMethods));\\n\\n\\n/* FIXME: This is really ugly to bypass the type system, but it will be better*/\\n/* once we use Promise.delegated and don't have any [[Constructor]] behaviours.*/\\n/* @ts-expect-error cast*/\\nHandledPromise=baseHandledPromise;\\n\\n/* We're a vetted shim which runs before `lockdown` allows*/\\n/* `harden(HandledPromise)` to function, but single-level `freeze` is a*/\\n/* suitable replacement because all mutable objects reachable afterwards are*/\\n/* intrinsics hardened by lockdown.*/\\nfreeze(HandledPromise);\\nfor(const key of ownKeys(HandledPromise)){\\n/* prototype is the intrinsic Promise.prototype to be hardened by lockdown.*/\\nif(key!=='prototype'){\\nfreeze(HandledPromise[key]);}}\\n\\n\\n\\nreturn HandledPromise;};\\n\\n\\n/**\\n * @template T\\n * @typedef {{\\n * get?(p: T, name: PropertyKey, returnedP?: Promise<unknown>): unknown;\\n * getSendOnly?(p: T, name: PropertyKey): void;\\n * applyFunction?(p: T, args: unknown[], returnedP?: Promise<unknown>): unknown;\\n * applyFunctionSendOnly?(p: T, args: unknown[]): void;\\n * applyMethod?(p: T, name: PropertyKey | undefined, args: unknown[], returnedP?: Promise<unknown>): unknown;\\n * applyMethodSendOnly?(p: T, name: PropertyKey | undefined, args: unknown[]): void;\\n * }} Handler\\n */\\n\\n/**\\n * @template {{}} T\\n * @typedef {{\\n * proxy?: {\\n * handler: ProxyHandler<T>;\\n * target: unknown;\\n * revokerCallback?(revoker: () => void): void;\\n * };\\n * }} ResolveWithPresenceOptionsBag\\n */\\n\\n/**\\n * @template [R = unknown]\\n * @typedef {(\\n * resolveHandled: (value?: R) => void,\\n * rejectHandled: (reason?: unknown) => void,\\n * resolveWithPresence: (presenceHandler: Handler<{}>, options?: ResolveWithPresenceOptionsBag<{}>) => object,\\n * ) => void} HandledExecutor\\n */\\n\\n/**\\n * @template [R = unknown]\\n * @typedef {{\\n * resolve(value?: R): void;\\n * reject(reason: unknown): void;\\n * resolveWithPresence(presenceHandler?: Handler<{}>, options?: ResolveWithPresenceOptionsBag<{}>): object;\\n * }} Settler\\n */\\n\\n/**\\n * @typedef {{\\n * applyFunction(target: unknown, args: unknown[]): Promise<unknown>;\\n * applyFunctionSendOnly(target: unknown, args: unknown[]): void;\\n * applyMethod(target: unknown, prop: PropertyKey | undefined, args: unknown[]): Promise<unknown>;\\n * applyMethodSendOnly(target: unknown, prop: PropertyKey, args: unknown[]): void;\\n * get(target: unknown, prop: PropertyKey): Promise<unknown>;\\n * getSendOnly(target: unknown, prop: PropertyKey): void;\\n * }} HandledPromiseStaticMethods\\n */\\n\\n/** @typedef {ReturnType<typeof makeHandledPromise>} HandledPromiseConstructor */exports.makeHandledPromise=makeHandledPromise;\",\n \"node_modules/@endo/eventual-send/src/local.js\": \"'use strict';Object.defineProperty(exports,'__esModule',{value:true});var messageBreakpoints=require('./message-breakpoints.js');\\n\\nconst{details:X,quote:q,Fail}=assert;\\n\\nconst{getOwnPropertyDescriptors,getPrototypeOf,freeze}=Object;\\nconst{apply,ownKeys}=Reflect;\\n\\nconst ntypeof=(specimen)=>specimen===null?'null':typeof specimen;\\n\\nconst onDelivery=messageBreakpoints.makeMessageBreakpointTester('ENDO_DELIVERY_BREAKPOINTS');\\n\\n/**\\n * TODO Consolidate with `isObject` that's currently in `@endo/marshal`\\n *\\n * @param {any} val\\n * @returns {boolean}\\n */\\nconst isObject=(val)=>Object(val)===val;\\n\\n/**\\n * Prioritize symbols as earlier than strings.\\n *\\n * @param {string|symbol} a\\n * @param {string|symbol} b\\n * @returns {-1 | 0 | 1}\\n */\\nconst compareStringified=(a,b)=>{\\nif(typeof a===typeof b){\\nconst left=String(a);\\nconst right=String(b);\\n/* eslint-disable-next-line no-nested-ternary*/\\nreturn left<right?-1:left>right?1:0;}\\n\\nif(typeof a==='symbol'){\\nassert(typeof b==='string');\\nreturn-1;}\\n\\nassert(typeof a==='string');\\nassert(typeof b==='symbol');\\nreturn 1;};\\n\\n\\n/**\\n * @param {any} val\\n * @returns {(string|symbol)[]}\\n */\\nconst getMethodNames=(val)=>{\\nlet layer=val;\\nconst names=new Set();/* Set to deduplicate*/\\nwhile(layer!==null&&layer!==Object.prototype){\\n/* be tolerant of non-objects*/\\nconst descs=getOwnPropertyDescriptors(layer);\\nfor(const name of ownKeys(descs)){\\n/* In case a method is overridden by a non-method,*/\\n/* test `val[name]` rather than `layer[name]`*/\\nif(typeof val[name]==='function'){\\nnames.add(name);}}\\n\\n\\nif(!isObject(val)){\\nbreak;}\\n\\nlayer=getPrototypeOf(layer);}\\n\\nreturn harden([...names].sort(compareStringified));};\\n\\n/* The top level of the eventual send modules can be evaluated before*/\\n/* ses creates `harden`, and so cannot rely on `harden` at top level.*/\\nfreeze(getMethodNames);\\n\\nconst localApplyFunction=(recipient,args)=>{\\ntypeof recipient==='function'||\\nassert.fail(\\nX`Cannot invoke target as a function; typeof target is ${q(\\nntypeof(recipient))\\n}`,\\nTypeError);\\n\\nif(onDelivery&&onDelivery.shouldBreakpoint(recipient,undefined)){\\n/* eslint-disable-next-line no-debugger*/\\ndebugger;/* STEP INTO APPLY*/\\n/* Stopped at a breakpoint on this delivery of an eventual function call*/\\n/* so that you can step *into* the following `apply` in order to see the*/\\n/* function call as it happens. Or step *over* to see what happens*/\\n/* after the function call returns.*/}\\n\\nconst result=apply(recipient,undefined,args);\\nreturn result;};\\n\\n\\nconst localApplyMethod=(recipient,methodName,args)=>{\\nif(methodName===undefined||methodName===null){\\n/* Base case; bottom out to apply functions.*/\\nreturn localApplyFunction(recipient,args);}\\n\\nif(recipient===undefined||recipient===null){\\nassert.fail(\\nX`Cannot deliver ${q(methodName)} to target; typeof target is ${q(\\nntypeof(recipient))\\n}`,\\nTypeError);}\\n\\n\\nconst fn=recipient[methodName];\\nif(fn===undefined){\\nassert.fail(\\nX`target has no method ${q(methodName)}, has ${q(\\ngetMethodNames(recipient))\\n}`,\\nTypeError);}\\n\\n\\nconst ftype=ntypeof(fn);\\ntypeof fn==='function'||\\nFail`invoked method ${q(methodName)} is not a function; it is a ${q(\\nftype)\\n}`;\\nif(onDelivery&&onDelivery.shouldBreakpoint(recipient,methodName)){\\n/* eslint-disable-next-line no-debugger*/\\ndebugger;/* STEP INTO APPLY*/\\n/* Stopped at a breakpoint on this delivery of an eventual method call*/\\n/* so that you can step *into* the following `apply` in order to see the*/\\n/* method call as it happens. Or step *over* to see what happens*/\\n/* after the method call returns.*/}\\n\\nconst result=apply(fn,recipient,args);\\nreturn result;};\\n\\n\\nconst localGet=(t,key)=>t[key];exports.getMethodNames=getMethodNames;exports.localApplyFunction=localApplyFunction;exports.localApplyMethod=localApplyMethod;exports.localGet=localGet;\",\n \"node_modules/@endo/eventual-send/src/message-breakpoints.js\": \"'use strict';Object.defineProperty(exports,'__esModule',{value:true});require('../../env-options/index.js');var envOptions=require('../../env-options/src/env-options.js');\\n\\nconst{quote:q,Fail}=assert;\\n\\nconst{hasOwn,freeze,entries}=Object;\\n\\n/**\\n * @typedef {string | '*'} MatchStringTag\\n * A star `'*'` matches any recipient. Otherwise, the string is\\n * matched against the value of a recipient's `@@toStringTag`\\n * after stripping out any leading `'Alleged: '` or `'DebugName: '`\\n * prefix. For objects defined with `Far` this is the first argument,\\n * known as the `farName`. For exos, this is the tag.\\n */\\n/**\\n * @typedef {string | '*'} MatchMethodName\\n * A star `'*'` matches any method name. Otherwise, the string is\\n * matched against the method name. Currently, this is only an exact match.\\n * However, beware that we may introduce a string syntax for\\n * symbol method names.\\n */\\n/**\\n * @typedef {number | '*'} MatchCountdown\\n * A star `'*'` will always breakpoint. Otherwise, the string\\n * must be a non-negative integer. Once that is zero, always breakpoint.\\n * Otherwise decrement by one each time it matches until it reaches zero.\\n * In other words, the countdown represents the number of\\n * breakpoint occurrences to skip before actually breakpointing.\\n */\\n\\n/**\\n * This is the external JSON representation, in which\\n * - the outer property name is the class-like tag or '*',\\n * - the inner property name is the method name or '*',\\n * - the value is a non-negative integer countdown or '*'.\\n *\\n * @typedef {Record<MatchStringTag, Record<MatchMethodName, MatchCountdown>>} MessageBreakpoints\\n */\\n\\n/**\\n * This is the internal JSON representation, in which\\n * - the outer property name is the method name or '*',\\n * - the inner property name is the class-like tag or '*',\\n * - the value is a non-negative integer countdown or '*'.\\n *\\n * @typedef {Record<MatchMethodName, Record<MatchStringTag, MatchCountdown>>} BreakpointTable\\n */\\n\\n/**\\n * @typedef {object} MessageBreakpointTester\\n * @property {() => MessageBreakpoints} getBreakpoints\\n * @property {(newBreakpoints?: MessageBreakpoints) => void} setBreakpoints\\n * @property {(\\n * recipient: object,\\n * methodName: string | symbol | undefined\\n * ) => boolean} shouldBreakpoint\\n */\\n\\n/**\\n * @param {any} val\\n * @returns {val is Record<string, any>}\\n */\\nconst isJSONRecord=(val)=>\\ntypeof val==='object'&&val!==null&&!Array.isArray(val);\\n\\n/**\\n * Return `tag` after stripping off any `'Alleged: '` or `'DebugName: '`\\n * prefix if present.\\n * ```js\\n * simplifyTag('Alleged: moola issuer') === 'moola issuer'\\n * ```\\n * If there are multiple such prefixes, only the outer one is removed.\\n *\\n * @param {string} tag\\n * @returns {string}\\n */\\nconst simplifyTag=(tag)=>{\\nfor(const prefix of['Alleged: ','DebugName: ']){\\nif(tag.startsWith(prefix)){\\nreturn tag.slice(prefix.length);}}\\n\\n\\nreturn tag;};\\n\\n\\n/**\\n * @param {string} optionName\\n * @returns {MessageBreakpointTester | undefined}\\n */\\nconst makeMessageBreakpointTester=(optionName)=>{\\nlet breakpoints=JSON.parse(envOptions.getEnvironmentOption(optionName,'null'));\\n\\nif(breakpoints===null){\\nreturn undefined;}\\n\\n\\n/** @type {BreakpointTable} */\\nlet breakpointsTable;\\n\\nconst getBreakpoints=()=>breakpoints;\\nfreeze(getBreakpoints);\\n\\nconst setBreakpoints=(newBreakpoints=breakpoints)=>{\\nisJSONRecord(newBreakpoints)||\\nFail`Expected ${q(optionName)} option to be a JSON breakpoints record`;\\n\\n/** @type {BreakpointTable} */\\n/* @ts-expect-error confused by __proto__*/\\nconst newBreakpointsTable={__proto__:null};\\n\\nfor(const[tag,methodBPs]of entries(newBreakpoints)){\\ntag===simplifyTag(tag)||\\nFail`Just use simple tag ${q(simplifyTag(tag))} rather than ${q(tag)}`;\\nisJSONRecord(methodBPs)||\\nFail`Expected ${q(optionName)} option's ${q(\\ntag)\\n} to be a JSON methods breakpoints record`;\\nfor(const[methodName,count]of entries(methodBPs)){\\ncount==='*'||\\ntypeof count==='number'&&\\nNumber.isSafeInteger(count)&&\\ncount>=0||\\nFail`Expected ${q(optionName)} option's ${q(tag)}.${q(\\nmethodName)\\n} to be \\\"*\\\" or a non-negative integer`;\\n\\nconst classBPs=hasOwn(newBreakpointsTable,methodName)?\\nnewBreakpointsTable[methodName]:\\nnewBreakpointsTable[methodName]={\\n/* @ts-expect-error confused by __proto__*/\\n__proto__:null};\\n\\nclassBPs[tag]=count;}}\\n\\n\\nbreakpoints=newBreakpoints;\\nbreakpointsTable=newBreakpointsTable;};\\n\\nfreeze(setBreakpoints);\\n\\nconst shouldBreakpoint=(recipient,methodName)=>{\\nif(methodName===undefined||methodName===null){\\n/* TODO enable function breakpointing*/\\nreturn false;}\\n\\nconst classBPs=breakpointsTable[methodName]||breakpointsTable['*'];\\nif(classBPs===undefined){\\nreturn false;}\\n\\nlet tag=simplifyTag(recipient[Symbol.toStringTag]);\\nlet count=classBPs[tag];\\nif(count===undefined){\\ntag='*';\\ncount=classBPs[tag];\\nif(count===undefined){\\nreturn false;}}\\n\\n\\nif(count==='*'){\\nreturn true;}\\n\\nif(count===0){\\nreturn true;}\\n\\nassert(typeof count==='number'&&count>=1);\\nclassBPs[tag]=count-1;\\nreturn false;};\\n\\nfreeze(shouldBreakpoint);\\n\\nconst breakpointTester=freeze({\\ngetBreakpoints,\\nsetBreakpoints,\\nshouldBreakpoint});\\n\\nbreakpointTester.setBreakpoints();\\nreturn breakpointTester;};\\n\\nfreeze(makeMessageBreakpointTester);exports.makeMessageBreakpointTester=makeMessageBreakpointTester;\",\n \"node_modules/@endo/eventual-send/src/postponed.js\": \"'use strict';\\n\\nObject.defineProperty(exports,'__esModule',{value:true});/*/ <reference types=\\\"ses\\\" />*/ /**\\n * Create a simple postponedHandler that just postpones until donePostponing is\\n * called.\\n *\\n * @param {IMPORT('./types').HandledPromiseConstructor} HandledPromise\\n * @returns {[Required<IMPORT('./types').Handler<any>>, () => void]} postponedHandler and donePostponing callback.\\n */\\nconst makePostponedHandler=(HandledPromise)=>{\\n/** @type {() => void} */\\nlet donePostponing;\\n\\nconst interlockP=new Promise((resolve)=>{\\ndonePostponing=()=>resolve(undefined);});\\n\\n\\nconst makePostponedOperation=(postponedOperation)=>{\\n/* Just wait until the handler is resolved/rejected.*/\\nreturn function postpone(x,...args){\\n/* console.log(`forwarding ${postponedOperation} ${args[0]}`);*/\\nreturn new HandledPromise((resolve,reject)=>{\\ninterlockP.\\nthen((_)=>{\\nresolve(HandledPromise[postponedOperation](x,...args));}).\\n\\ncatch(reject);});};};\\n\\n\\n\\n\\n/** @type {Required<IMPORT('./types').Handler<any>>} */\\nconst postponedHandler={\\nget:makePostponedOperation('get'),\\ngetSendOnly:makePostponedOperation('getSendOnly'),\\napplyFunction:makePostponedOperation('applyFunction'),\\napplyFunctionSendOnly:makePostponedOperation('applyFunctionSendOnly'),\\napplyMethod:makePostponedOperation('applyMethod'),\\napplyMethodSendOnly:makePostponedOperation('applyMethodSendOnly')};\\n\\n\\n/* @ts-expect-error 2454*/\\nassert(donePostponing);\\n\\nreturn[postponedHandler,donePostponing];};exports.makePostponedHandler=makePostponedHandler;\",\n \"node_modules/@endo/eventual-send/src/track-turns.js\": \"'use strict';Object.defineProperty(exports,'__esModule',{value:true});require('../../env-options/index.js');var\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\nenvOptions=require('../../env-options/src/env-options.js');/* global globalThis */ /* NOTE: We can't import these because they're not in scope before lockdown.*/ /* import { assert, details as X, Fail } from '@agoric/assert';*/ /* WARNING: Global Mutable State!*/ /* This state is communicated to `assert` that makes it available to the*/ /* causal console, which affects the console log output. Normally we*/ /* regard the ability to see console log output as a meta-level privilege*/ /* analogous to the ability to debug. Aside from that, this module should*/ /* not have any observably mutable state.*/\\n\\nlet hiddenPriorError;\\nlet hiddenCurrentTurn=0;\\nlet hiddenCurrentEvent=0;\\n\\n/* Turn on if you seem to be losing error logging at the top of the event loop*/\\nconst VERBOSE=envOptions.environmentOptionsListHas('DEBUG','track-turns');\\n\\n/* Track-turns is disabled by default and can be enabled by an environment*/\\n/* option.*/\\nconst ENABLED=\\nenvOptions.getEnvironmentOption('TRACK_TURNS','disabled',['enabled'])==='enabled';\\n\\n/* We hoist the following functions out of trackTurns() to discourage the*/\\n/* closures from holding onto 'args' or 'func' longer than necessary,*/\\n/* which we've seen cause HandledPromise arguments to be retained for*/\\n/* a surprisingly long time.*/\\n\\nconst addRejectionNote=(detailsNote)=>(reason)=>{\\nif(reason instanceof Error){\\nassert.note(reason,detailsNote);}\\n\\nif(VERBOSE){\\nconsole.log('REJECTED at top of event loop',reason);}};\\n\\n\\n\\nconst wrapFunction=\\n(func,sendingError,X)=>\\n(...args)=>{\\nhiddenPriorError=sendingError;\\nhiddenCurrentTurn+=1;\\nhiddenCurrentEvent=0;\\ntry{\\nlet result;\\ntry{\\nresult=func(...args);}\\ncatch(err){\\nif(err instanceof Error){\\nassert.note(\\nerr,\\nX`Thrown from: ${hiddenPriorError}:${hiddenCurrentTurn}.${hiddenCurrentEvent}`);}\\n\\n\\nif(VERBOSE){\\nconsole.log('THROWN to top of event loop',err);}\\n\\nthrow err;}\\n\\n/* Must capture this now, not when the catch triggers.*/\\nconst detailsNote=X`Rejection from: ${hiddenPriorError}:${hiddenCurrentTurn}.${hiddenCurrentEvent}`;\\nPromise.resolve(result).catch(addRejectionNote(detailsNote));\\nreturn result;}finally\\n{\\nhiddenPriorError=undefined;}};\\n\\n\\n\\n/**\\n * Given a list of `TurnStarterFn`s, returns a list of `TurnStarterFn`s whose\\n * `this`-free call behaviors are not observably different to those that\\n * cannot see console output. The only purpose is to cause additional\\n * information to appear on the console.\\n *\\n * The call to `trackTurns` is itself a sending event, that occurs in some call\\n * stack in some turn number at some event number within that turn. Each call\\n * to any of the returned `TurnStartFn`s is a receiving event that begins a new\\n * turn. This sending event caused each of those receiving events.\\n *\\n * @template {TurnStarterFn[]} T\\n * @param {T} funcs\\n * @returns {T}\\n */\\nconst trackTurns=(funcs)=>{\\nif(!ENABLED||typeof globalThis==='undefined'||!globalThis.assert){\\nreturn funcs;}\\n\\nconst{details:X}=assert;\\n\\nhiddenCurrentEvent+=1;\\nconst sendingError=Error(\\n`Event: ${hiddenCurrentTurn}.${hiddenCurrentEvent}`);\\n\\nif(hiddenPriorError!==undefined){\\nassert.note(sendingError,X`Caused by: ${hiddenPriorError}`);}\\n\\n\\nreturn(/** @type {T} */\\nfuncs.map((func)=>func&&wrapFunction(func,sendingError,X)));};\\n\\n\\n\\n/**\\n * An optional function that is not this-sensitive, expected to be called at\\n * bottom of stack to start a new turn.\\n *\\n * @typedef {((...args: any[]) => any) | undefined} TurnStarterFn\\n */exports.trackTurns=trackTurns;\",\n \"node_modules/@endo/init/debug.js\": \"'use strict';require('./pre-remoting.js');require('../lockdown/commit-debug.js');/* debug.js - call lockdown with default Agoric shims*/\",\n \"node_modules/@endo/init/pre-remoting.js\": \"'use strict';require('./pre.js');require('../eventual-send/shim.js');/* pre-remoting.js - shims necessary to use @endo/far*/\",\n \"node_modules/@endo/init/pre.js\": \"'use strict';Object.defineProperty(exports,'__esModule',{value:true});var pre=require('../lockdown/pre.js');require('../base64/shim.js');require('../promise-kit/shim.js');/* Generic preamble for all shims.*/exports.lockdown=pre.lockdown;\",\n \"node_modules/@endo/lockdown/commit-debug.js\": \"'use strict';Object.defineProperty(exports,'__esModule',{value:true});var pre=require('./pre.js');/* commit-debug.js - debug version of commit.js*/\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\nlockdown({\\n/* The default `{errorTaming: 'safe'}` setting, if possible, redacts the*/\\n/* stack trace info from the error instances, so that it is not available*/\\n/* merely by saying `errorInstance.stack`. However, some tools, such as*/\\n/* Ava, will look for the stack there and become much less useful if it is*/\\n/* missing.*/\\n/**/\\n/* NOTE TO REVIEWERS: If you see the following line commented out,*/\\n/* this may be a development accident that should be fixed before merging.*/\\n/**/\\nerrorTaming:'unsafe',\\n\\n/* The default `{stackFiltering: 'concise'}` setting usually makes for a*/\\n/* better debugging experience, by severely reducing the noisy distractions*/\\n/* of the normal verbose stack traces. Which is why we comment*/\\n/* out the `'verbose'` setting is commented out below. However, some*/\\n/* tools look for the full filename that it expects in order*/\\n/* to fetch the source text for diagnostics,*/\\n/**/\\n/* Another reason for not commenting it out: The cause*/\\n/* of the bug may be anywhere, so the `'noise'` thrown out by the default*/\\n/* `'concise'` setting may also contain the signal you need. To see it,*/\\n/* uncomment out the following line. But please do not commit it in that*/\\n/* state.*/\\n/**/\\n/* NOTE TO REVIEWERS: If you see the following line *not* commented out,*/\\n/* this may be a development accident that MUST be fixed before merging.*/\\n/**/\\n/* stackFiltering: 'verbose',*/\\n\\n/* The default `{overrideTaming: 'moderate'}` setting does not hurt the*/\\n/* debugging experience much. But it will introduce noise into, for example,*/\\n/* the vscode debugger's object inspector. During debug and test, if you can*/\\n/* avoid legacy code that needs the `'moderate'` setting, then the `'min'`*/\\n/* setting reduces debugging noise yet further, by turning fewer inherited*/\\n/* properties into accessors.*/\\n/**/\\n/* NOTE TO REVIEWERS: If you see the following line commented out,*/\\n/* this may be a development accident that should be fixed before merging.*/\\n/**/\\noverrideTaming:'min',\\n\\n/* The default `{consoleTaming: 'safe'}` setting usually makes for a*/\\n/* better debugging experience, by wrapping the original `console` with*/\\n/* the SES replacement `console` that provides more information about*/\\n/* errors, expecially those thrown by the `assert` system. However,*/\\n/* in case the SES `console` is getting in the way, we provide the*/\\n/* `'unsafe'` option for leaving the original `console` in place.*/\\n/**/\\n/* NOTE TO REVIEWERS: If you see the following line *not* commented out,*/\\n/* this may be a development accident that should be fixed before merging.*/\\n/**/\\n/* consoleTaming: 'unsafe',*/\\n\\n/* Domain taming causes lockdown to throw an error if the Node.js domain*/\\n/* module has already been loaded, and causes loading the domain module*/\\n/* to throw an error if it is pulled into the working set later.*/\\n/* This is because domains may add domain properties to promises and other*/\\n/* callbacks and that these domain objects provide a means to escape*/\\n/* containment.*/\\n/* However, our platform still depends on systems like standardthings/esm*/\\n/* which ultimately pull in domains.*/\\n/* For now, we are resigned to leave this hole open, knowing that all*/\\n/* contract code will be run under XS to avoid this vulnerability.*/\\ndomainTaming:'unsafe'});exports.lockdown=pre.lockdown;\",\n \"node_modules/@endo/lockdown/post.js\": \"'use strict';\\n\\nObject.defineProperty(exports,'__esModule',{value:true});/* global globalThis */ /* The post lockdown thunk.*/\\nvar postLockdown=()=>{\\n/* Even on non-v8, we tame the start compartment's Error constructor so*/\\n/* this assignment is not rejected, even if it does nothing.*/\\nError.stackTraceLimit=Infinity;\\n\\nharden(globalThis.TextEncoder);/* Absent in eshost*/\\nharden(globalThis.TextDecoder);/* Absent in eshost*/\\nharden(globalThis.URL);/* Absent only on XSnap*/\\nharden(globalThis.Base64);/* Present only on XSnap*/};exports[\\\"default\\\"]=postLockdown;\",\n \"node_modules/@endo/lockdown/pre.js\": \"'use strict';Object.defineProperty(exports,'__esModule',{value:true});require('../../ses/index.js');var post=require('./post.js');/* pre.js - set up the default lockdown function*/\\n\\n\\n\\n\\n\\n\\n\\n\\n\\nconst rawLockdown=globalThis.lockdown;\\n\\n/** @type {typeof rawLockdown} */\\nconst lockdown=(defaultOptions)=>{\\n/* For testing under Ava, and also sometimes for testing and debugging in*/\\n/* general, when safety is not needed, you perhaps want to use*/\\n/* packages/SwingSet/tools/install-ses-debug.js instead of this one.*/\\n/* If you're using a prepare-test-env-ava.js, it is probably already doing that*/\\n/* for you.*/\\n\\n/* The `@endo/init` package exists so the \\\"main\\\" of production code*/\\n/* can start with the following import or its equivalent.*/\\n/* ```js*/\\n/* import '@endo/init';*/\\n/* ```*/\\n/* But production code must also be tested. Normal ocap discipline of passing*/\\n/* explicit arguments into the `lockdown`*/\\n/* call would require an awkward structuring of start modules, since*/\\n/* the `init` module calls `lockdown` during its initialization,*/\\n/* before any explicit code in the start module gets to run. Even if other code*/\\n/* does get to run first, the `lockdown` call in this module happens during*/\\n/* module initialization, before it can legitimately receive parameters by*/\\n/* explicit parameter passing.*/\\n/**/\\n/* Instead, for now, `init` violates normal ocap discipline by feature*/\\n/* testing global state for a passed \\\"parameter\\\". This is something that a*/\\n/* module can but normally should not do, during initialization or otherwise.*/\\n/* Initialization is often awkward.*/\\n/**/\\n/* The `init` module tests, first,*/\\n/* for a JavaScript global named `LOCKDOWN_OPTIONS`, and second, for an*/\\n/* environment*/\\n/* variable named `LOCKDOWN_OPTIONS`. If either is present, its value should be*/\\n/* a JSON encoding of the options bag to pass to the `lockdown` call. If so,*/\\n/* then `init` calls `lockdown` with those options. If there is no such*/\\n/* feature, `init` calls `lockdown` with appropriate settings for*/\\n/* production use.*/\\n\\nlet optionsString;\\nif(typeof LOCKDOWN_OPTIONS==='string'){\\noptionsString=LOCKDOWN_OPTIONS;\\nconsole.warn(\\n`'@endo/lockdown' sniffed and found a 'LOCKDOWN_OPTIONS' global variable\\\\n`);}else\\n\\nif(\\ntypeof process==='object'&&\\ntypeof process.env.LOCKDOWN_OPTIONS==='string')\\n{\\noptionsString=process.env.LOCKDOWN_OPTIONS;\\nconsole.warn(\\n`'@endo/lockdown' sniffed and found a 'LOCKDOWN_OPTIONS' environment variable\\\\n`);}\\n\\n\\n\\nif(typeof optionsString==='string'){\\nlet options;\\ntry{\\noptions=JSON.parse(optionsString);}\\ncatch(err){\\nconsole.error('Environment variable LOCKDOWN_OPTIONS must be JSON',err);\\nthrow err;}\\n\\nif(typeof options!=='object'||Array.isArray(options)){\\nconst err=TypeError(\\n'Environment variable LOCKDOWN_OPTIONS must be a JSON object');\\n\\nconsole.error('',err,options);\\nthrow err;}\\n\\nrawLockdown({\\n...options,\\n/* See comment on domainTaming below.*/\\ndomainTaming:'unsafe'});}else\\n\\nif(defaultOptions){\\nrawLockdown({\\n...defaultOptions,\\n/* See comment on domainTaming below.*/\\ndomainTaming:'unsafe'});}else\\n\\n{\\nrawLockdown({\\n/* The default `{errorTaming: 'safe'}` setting, if possible, redacts the*/\\n/* stack trace info from the error instances, so that it is not available*/\\n/* merely by saying `errorInstance.stack`. However, some tools*/\\n/* will look for the stack there and become much less useful if it is*/\\n/* missing. In production, the settings in this file need to preserve*/\\n/* security, so the 'unsafe' setting below MUST always be commented out*/\\n/* except during private development.*/\\n/**/\\n/* NOTE TO REVIEWERS: If you see the following line *not* commented out,*/\\n/* this may be a development accident that MUST be fixed before merging.*/\\n/**/\\n/* errorTaming: 'unsafe',*/\\n/**/\\n/**/\\n/* The default `{stackFiltering: 'concise'}` setting usually makes for a*/\\n/* better debugging experience, by severely reducing the noisy distractions*/\\n/* of the normal verbose stack traces. Which is why we comment*/\\n/* out the `'verbose'` setting is commented out below. However, some*/\\n/* tools look for the full filename that it expects in order*/\\n/* to fetch the source text for diagnostics,*/\\n/**/\\n/* Another reason for not commenting it out: The cause*/\\n/* of the bug may be anywhere, so the `'noise'` thrown out by the default*/\\n/* `'concise'` setting may also contain the signal you need. To see it,*/\\n/* uncomment out the following line. But please do not commit it in that*/\\n/* state.*/\\n/**/\\n/* NOTE TO REVIEWERS: If you see the following line *not* commented out,*/\\n/* this may be a development accident that MUST be fixed before merging.*/\\n/**/\\n/* stackFiltering: 'verbose',*/\\n/**/\\n/**/\\n/* The default `{overrideTaming: 'moderate'}` setting does not hurt the*/\\n/* debugging experience much. But it will introduce noise into, for example,*/\\n/* the vscode debugger's object inspector. During debug and test, if you can*/\\n/* avoid legacy code that needs the `'moderate'` setting, then the `'min'`*/\\n/* setting reduces debugging noise yet further, by turning fewer inherited*/\\n/* properties into accessors.*/\\n/**/\\n/* NOTE TO REVIEWERS: If you see the following line *not* commented out,*/\\n/* this may be a development accident that MUST be fixed before merging.*/\\n/**/\\n/* overrideTaming: 'min',*/\\n/**/\\n/**/\\n/* The default `{consoleTaming: 'safe'}` setting usually makes for a*/\\n/* better debugging experience, by wrapping the original `console` with*/\\n/* the SES replacement `console` that provides more information about*/\\n/* errors, expecially those thrown by the `assert` system. However,*/\\n/* in case the SES `console` is getting in the way, we provide the*/\\n/* `'unsafe'` option for leaving the original `console` in place.*/\\n/**/\\n/* NOTE TO REVIEWERS: If you see the following line *not* commented out,*/\\n/* this may be a development accident that MUST be fixed before merging.*/\\n/**/\\n/* consoleTaming: 'unsafe',*/\\n\\n/* Domain taming causes lockdown to throw an error if the Node.js domain*/\\n/* module has already been loaded, and causes loading the domain module*/\\n/* to throw an error if it is pulled into the working set later.*/\\n/* This is because domains may add domain properties to promises and other*/\\n/* callbacks and that these domain objects provide a means to escape*/\\n/* containment.*/\\n/* However, our platform still depends on systems like standardthings/esm*/\\n/* which ultimately pull in domains.*/\\n/* For now, we are resigned to leave this hole open, knowing that all*/\\n/* contract code will be run under XS to avoid this vulnerability.*/\\ndomainTaming:'unsafe'});}\\n\\n\\n\\n/* We are now in the \\\"Start Compartment\\\". Our global has all the same*/\\n/* powerful things it had before, but the primordials have changed to make*/\\n/* them safe to use in the arguments of API calls we make into more limited*/\\n/* compartments*/\\n\\n/* 'Compartment', 'assert', and 'harden' are now present in our global scope.*/\\npost[\\\"default\\\"]();};\\n\\n\\nglobalThis.lockdown=lockdown;exports.lockdown=lockdown;\",\n \"node_modules/@endo/promise-kit/shim.js\": \"'use strict';var\\n\\nmemoRace=require('./src/memo-race.js');/* Unconditionally replace with a non-leaking version*/\\nPromise.race=memoRace.memoRace;\",\n \"node_modules/@endo/promise-kit/src/memo-race.js\": \"'use strict';Object.defineProperty(exports,'__esModule',{value:true});/* Initial version authored by Brian Kim:\\nhttps://github.com/nodejs/node/issues/17469#issuecomment-685216777\\n This is free and unencumbered software released into the public domain.\\n Anyone is free to copy, modify, publish, use, compile, sell, or\\ndistribute this software, either in source code form or as a compiled\\nbinary, for any purpose, commercial or non-commercial, and by any\\nmeans.\\n In jurisdictions that recognize copyright laws, the author or authors\\nof this software dedicate any and all copyright interest in the\\nsoftware to the public domain. We make this dedication for the benefit\\nof the public at large and to the detriment of our heirs and\\nsuccessors. We intend this dedication to be an overt act of\\nrelinquishment in perpetuity of all present and future rights to this\\nsoftware under copyright law.\\n THE SOFTWARE IS PROVIDED \\\"AS IS\\\", WITHOUT WARRANTY OF ANY KIND,\\nEXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\\nMERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.\\nIN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR\\nOTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,\\nARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR\\nOTHER DEALINGS IN THE SOFTWARE.\\n For more information, please refer to <http://unlicense.org/>\\n*/\\n\\n\\n\\n\\n\\n\\n\\nconst isObject=(value)=>Object(value)===value;\\n\\n/**\\n * @template [T=any]\\n * @typedef {object} Deferred\\n * @property {(value?: IMPORT(\\\"./types.js\\\").ERef<T> ) => void} resolve\\n * @property {(err?: any ) => void} reject\\n */\\n\\n/**\\n * @typedef { never\\n * | {settled: false, deferreds: Set<Deferred>}\\n * | {settled: true, deferreds?: undefined}\\n * } PromiseMemoRecord\\n */\\n\\n/* Keys are the values passed to race, values are a record of data containing a*/\\n/* set of deferreds and whether the value has settled.*/\\n/** @type {WeakMap<object, PromiseMemoRecord>} */\\nconst knownPromises=new WeakMap();\\n\\n/**\\n * @param {PromiseMemoRecord | undefined} record\\n * @returns {Set<Deferred>}\\n */\\nconst markSettled=(record)=>{\\nif(!record||record.settled){\\nreturn new Set();}\\n\\n\\nconst{deferreds}=record;\\nObject.assign(record,{\\ndeferreds:undefined,\\nsettled:true});\\n\\nObject.freeze(record);\\nreturn deferreds;};\\n\\n\\n/**\\n *\\n * @param {any} value\\n * @returns {PromiseMemoRecord}\\n */\\nconst getMemoRecord=(value)=>{\\nif(!isObject(value)){\\n/* If the contender is a primitive, attempting to use it as a key in the*/\\n/* weakmap would throw an error. Luckily, it is safe to call*/\\n/* `Promise.resolve(contender).then` on a primitive value multiple times*/\\n/* because the promise fulfills immediately. So we fake a settled record.*/\\nreturn harden({settled:true});}\\n\\n\\nlet record=knownPromises.get(value);\\n\\nif(!record){\\nrecord={deferreds:new Set(),settled:false};\\nknownPromises.set(value,record);\\n/* This call to `then` happens once for the lifetime of the value.*/\\nPromise.resolve(value).then(\\n(val)=>{\\nfor(const{resolve}of markSettled(record)){\\nresolve(val);}},\\n\\n\\n(err)=>{\\nfor(const{reject}of markSettled(record)){\\nreject(err);}});}\\n\\n\\n\\n\\nreturn record;};\\n\\n\\nconst{race}={\\n/**\\n * Creates a Promise that is resolved or rejected when any of the provided Promises are resolved\\n * or rejected.\\n *\\n * Unlike `Promise.race` it cleans up after itself so a non-resolved value doesn't hold onto\\n * the result promise.\\n *\\n * @template T\\n * @template {PromiseConstructor} [P=PromiseConstructor]\\n * @this {P}\\n * @param {Iterable<T>} values An iterable of Promises.\\n * @returns {Promise<Awaited<T>>} A new Promise.\\n */\\nrace(values){\\nlet deferred;\\n/** @type {T[]} */\\nconst cachedValues=[];\\nconst C=this;\\nconst result=new C((resolve,reject)=>{\\ndeferred={resolve,reject};\\nfor(const value of values){\\ncachedValues.push(value);\\nconst{settled,deferreds}=getMemoRecord(value);\\nif(settled){\\n/* If the contender is settled (including primitives), it is safe*/\\n/* to call `Promise.resolve(value).then` on it.*/\\nC.resolve(value).then(resolve,reject);}else\\n{\\ndeferreds.add(deferred);}}});\\n\\n\\n\\n\\n/* The finally callback executes when any value settles, preventing any of*/\\n/* the unresolved values from retaining a reference to the resolved value.*/\\nreturn result.finally(()=>{\\nfor(const value of cachedValues){\\nconst{deferreds}=getMemoRecord(value);\\nif(deferreds){\\ndeferreds.delete(deferred);}}});}};exports.memoRace=race;\",\n \"node_modules/ses/index.js\": \"'use strict';require('./src/lockdown-shim.js');require('./src/compartment-shim.js');require('./src/assert-shim.js');require('./src/console-shim.js');/* Copyright (C) 2018 Agoric*/\",\n \"node_modules/ses/src/assert-shim.js\": \"'use strict';var commons=require('./commons.js');var assert=require('./error/assert.js');\\n\\n\\ncommons.globalThis.assert=assert.assert;\",\n \"node_modules/ses/src/assert-sloppy-mode.js\": \"'use strict';var\\n\\ncommons=require('./commons.js');/** getThis returns globalThis in sloppy mode or undefined in strict mode. */\\nfunction getThis(){\\nreturn this;}\\n\\n\\nif(getThis()){\\n/* See https://github.com/endojs/endo/blob/master/packages/ses/error-codes/SES_NO_SLOPPY.md*/\\nthrow commons.TypeError(`SES failed to initialize, sloppy mode (SES_NO_SLOPPY)`);}\",\n \"node_modules/ses/src/commons.js\": \"'use strict';\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\nObject.defineProperty(exports,'__esModule',{value:true});/* global globalThis */ /* eslint-disable no-restricted-globals */ /**\\n * commons.js\\n * Declare shorthand functions. Sharing these declarations across modules\\n * improves on consistency and minification. Unused declarations are\\n * dropped by the tree shaking process.\\n *\\n * We capture these, not just for brevity, but for security. If any code\\n * modifies Object to change what 'assign' points to, the Compartment shim\\n * would be corrupted.\\n */ /* We cannot use globalThis as the local name since it would capture the*/ /* lexical name.*/const universalThis=globalThis;const{Array,Date,FinalizationRegistry,Float32Array,JSON,\\nMap,\\nMath,\\nNumber,\\nObject:Object$1,\\nPromise:Promise$1,\\nProxy,\\nReflect,\\nRegExp:FERAL_REG_EXP,\\nSet,\\nString,\\nSymbol,\\nWeakMap,\\nWeakSet}=\\nglobalThis;\\n\\nconst{\\n/* The feral Error constructor is safe for internal use, but must not be*/\\n/* revealed to post-lockdown code in any compartment including the start*/\\n/* compartment since in V8 at least it bears stack inspection capabilities.*/\\nError:FERAL_ERROR,\\nRangeError,\\nReferenceError,\\nSyntaxError,\\nTypeError,\\nAggregateError}=\\nglobalThis;\\n\\nconst{\\nassign,\\ncreate,\\ndefineProperties,\\nentries,\\nfreeze,\\ngetOwnPropertyDescriptor,\\ngetOwnPropertyDescriptors,\\ngetOwnPropertyNames,\\ngetPrototypeOf,\\nis,\\nisFrozen,\\nisSealed,\\nisExtensible,\\nkeys,\\nprototype:objectPrototype,\\nseal,\\npreventExtensions,\\nsetPrototypeOf,\\nvalues,\\nfromEntries}=\\nObject$1;\\n\\nconst{\\nspecies:speciesSymbol,\\ntoStringTag:toStringTagSymbol,\\niterator:iteratorSymbol,\\nmatchAll:matchAllSymbol,\\nunscopables:unscopablesSymbol,\\nkeyFor:symbolKeyFor,\\nfor:symbolFor}=\\nSymbol;\\n\\nconst{isInteger}=Number;\\n\\nconst{stringify:stringifyJson}=JSON;\\n\\n/* Needed only for the Safari bug workaround below*/\\nconst{defineProperty:originalDefineProperty}=Object$1;\\n\\nconst defineProperty=(object,prop,descriptor)=>{\\n/* We used to do the following, until we had to reopen Safari bug*/\\n/* https://bugs.webkit.org/show_bug.cgi?id=222538#c17*/\\n/* Once this is fixed, we may restore it.*/\\n/* // Object.defineProperty is allowed to fail silently so we use*/\\n/* // Object.defineProperties instead.*/\\n/* return defineProperties(object, { [prop]: descriptor });*/\\n\\n/* Instead, to workaround the Safari bug*/\\nconst result=originalDefineProperty(object,prop,descriptor);\\nif(result!==object){\\n/* See https://github.com/endojs/endo/blob/master/packages/ses/error-codes/SES_DEFINE_PROPERTY_FAILED_SILENTLY.md*/\\nthrow TypeError(\\n`Please report that the original defineProperty silently failed to set ${stringifyJson(\\nString(prop))\\n}. (SES_DEFINE_PROPERTY_FAILED_SILENTLY)`);}\\n\\n\\nreturn result;};\\n\\n\\nconst{\\napply,\\nconstruct,\\nget:reflectGet,\\ngetOwnPropertyDescriptor:reflectGetOwnPropertyDescriptor,\\nhas:reflectHas,\\nisExtensible:reflectIsExtensible,\\nownKeys,\\npreventExtensions:reflectPreventExtensions,\\nset:reflectSet}=\\nReflect;\\n\\nconst{isArray,prototype:arrayPrototype}=Array;\\nconst{prototype:mapPrototype}=Map;\\nconst{revocable:proxyRevocable}=Proxy;\\nconst{prototype:regexpPrototype}=RegExp;\\nconst{prototype:setPrototype}=Set;\\nconst{prototype:stringPrototype}=String;\\nconst{prototype:weakmapPrototype}=WeakMap;\\nconst{prototype:weaksetPrototype}=WeakSet;\\nconst{prototype:functionPrototype}=Function;\\nconst{prototype:promisePrototype}=Promise$1;\\nconst{prototype:generatorPrototype}=getPrototypeOf(\\n/* eslint-disable-next-line no-empty-function, func-names*/\\nfunction*(){});\\n\\n\\nconst typedArrayPrototype=getPrototypeOf(Uint8Array.prototype);\\n\\nconst{bind}=functionPrototype;\\n\\n/**\\n * uncurryThis()\\n * Equivalent of: fn => (thisArg, ...args) => apply(fn, thisArg, args)\\n *\\n * See those reference for a complete explanation:\\n * http://wiki.ecmascript.org/doku.php?id=conventions:safe_meta_programming\\n * which only lives at\\n * http://web.archive.org/web/20160805225710/http://wiki.ecmascript.org/doku.php?id=conventions:safe_meta_programming\\n *\\n * @type {<F extends (this: any, ...args: any[]) => any>(fn: F) => ((thisArg: ThisParameterType<F>, ...args: Parameters<F>) => ReturnType<F>)}\\n */\\nconst uncurryThis=bind.bind(bind.call);/* eslint-disable-line @endo/no-polymorphic-call*/\\n\\nconst objectHasOwnProperty=uncurryThis(objectPrototype.hasOwnProperty);\\n/**/\\nconst arrayFilter=uncurryThis(arrayPrototype.filter);\\nconst arrayForEach=uncurryThis(arrayPrototype.forEach);\\nconst arrayIncludes=uncurryThis(arrayPrototype.includes);\\nconst arrayJoin=uncurryThis(arrayPrototype.join);\\n/** @type {<T, U>(thisArg: readonly T[], callbackfn: (value: T, index: number, array: T[]) => U, cbThisArg?: any) => U[]} */\\nconst arrayMap=/** @type {any} */uncurryThis(arrayPrototype.map);\\nconst arrayFlatMap=/** @type {any} */\\nuncurryThis(arrayPrototype.flatMap);\\n\\nconst arrayPop=uncurryThis(arrayPrototype.pop);\\n/** @type {<T>(thisArg: T[], ...items: T[]) => number} */\\nconst arrayPush=uncurryThis(arrayPrototype.push);\\nconst arraySlice=uncurryThis(arrayPrototype.slice);\\nconst arraySome=uncurryThis(arrayPrototype.some);\\nconst arraySort=uncurryThis(arrayPrototype.sort);\\nconst iterateArray=uncurryThis(arrayPrototype[iteratorSymbol]);\\n/**/\\nconst mapSet=uncurryThis(mapPrototype.set);\\nconst mapGet=uncurryThis(mapPrototype.get);\\nconst mapHas=uncurryThis(mapPrototype.has);\\nconst mapDelete=uncurryThis(mapPrototype.delete);\\nconst mapEntries=uncurryThis(mapPrototype.entries);\\nconst iterateMap=uncurryThis(mapPrototype[iteratorSymbol]);\\n/**/\\nconst setAdd=uncurryThis(setPrototype.add);\\nconst setDelete=uncurryThis(setPrototype.delete);\\nconst setForEach=uncurryThis(setPrototype.forEach);\\nconst setHas=uncurryThis(setPrototype.has);\\nconst iterateSet=uncurryThis(setPrototype[iteratorSymbol]);\\n/**/\\nconst regexpTest=uncurryThis(regexpPrototype.test);\\nconst regexpExec=uncurryThis(regexpPrototype.exec);\\nconst matchAllRegExp=uncurryThis(regexpPrototype[matchAllSymbol]);\\n/**/\\nconst stringEndsWith=uncurryThis(stringPrototype.endsWith);\\nconst stringIncludes=uncurryThis(stringPrototype.includes);\\nconst stringIndexOf=uncurryThis(stringPrototype.indexOf);\\nconst stringMatch=uncurryThis(stringPrototype.match);\\nconst generatorNext=uncurryThis(generatorPrototype.next);\\nconst generatorThrow=uncurryThis(generatorPrototype.throw);\\n\\n/**\\n * @type { &\\n * ((thisArg: string, searchValue: { [Symbol.replace](string: string, replaceValue: string): string; }, replaceValue: string) => string) &\\n * ((thisArg: string, searchValue: { [Symbol.replace](string: string, replacer: (substring: string, ...args: any[]) => string): string; }, replacer: (substring: string, ...args: any[]) => string) => string)\\n * }\\n */\\nconst stringReplace=/** @type {any} */\\nuncurryThis(stringPrototype.replace);\\n\\nconst stringSearch=uncurryThis(stringPrototype.search);\\nconst stringSlice=uncurryThis(stringPrototype.slice);\\n/** @type {(thisArg: string, splitter: string | RegExp | { [Symbol.split](string: string, limit?: number): string[]; }, limit?: number) => string[]} */\\nconst stringSplit=uncurryThis(stringPrototype.split);\\nconst stringStartsWith=uncurryThis(stringPrototype.startsWith);\\nconst iterateString=uncurryThis(stringPrototype[iteratorSymbol]);\\n/**/\\nconst weakmapDelete=uncurryThis(weakmapPrototype.delete);\\n/** @type {<K extends {}, V>(thisArg: WeakMap<K, V>, ...args: Parameters<WeakMap<K,V>['get']>) => ReturnType<WeakMap<K,V>['get']>} */\\nconst weakmapGet=uncurryThis(weakmapPrototype.get);\\nconst weakmapHas=uncurryThis(weakmapPrototype.has);\\nconst weakmapSet=uncurryThis(weakmapPrototype.set);\\n/**/\\nconst weaksetAdd=uncurryThis(weaksetPrototype.add);\\nconst weaksetHas=uncurryThis(weaksetPrototype.has);\\n/**/\\nconst functionToString=uncurryThis(functionPrototype.toString);\\nconst functionBind=uncurryThis(bind);\\n/**/\\nconst{all}=Promise$1;\\nconst promiseAll=(promises)=>apply(all,Promise$1,[promises]);\\nconst promiseCatch=uncurryThis(promisePrototype.catch);\\n/** @type {<T, TResult1 = T, TResult2 = never>(thisArg: T, onfulfilled?: ((value: T) => TResult1 | PromiseLike<TResult1>) | undefined | null, onrejected?: ((reason: any) => TResult2 | PromiseLike<TResult2>) | undefined | null) => Promise<TResult1 | TResult2>} */\\nconst promiseThen=/** @type {any} */\\nuncurryThis(promisePrototype.then);\\n\\n/**/\\nconst finalizationRegistryRegister=\\nFinalizationRegistry&&uncurryThis(FinalizationRegistry.prototype.register);\\nconst finalizationRegistryUnregister=\\nFinalizationRegistry&&\\nuncurryThis(FinalizationRegistry.prototype.unregister);\\n\\n/**\\n * getConstructorOf()\\n * Return the constructor from an instance.\\n *\\n * @param {Function} fn\\n */\\nconst getConstructorOf=(fn)=>\\nreflectGet(getPrototypeOf(fn),'constructor');\\n\\n/**\\n * immutableObject\\n * An immutable (frozen) empty object that is safe to share.\\n */\\nconst immutableObject=freeze(create(null));\\n\\n/**\\n * isObject tests whether a value is an object.\\n * Today, this is equivalent to:\\n *\\n * const isObject = value => {\\n * if (value === null) return false;\\n * const type = typeof value;\\n * return type === 'object' || type === 'function';\\n * };\\n *\\n * But this is not safe in the face of possible evolution of the language, for\\n * example new types or semantics of records and tuples.\\n * We use this implementation despite the unnecessary allocation implied by\\n * attempting to box a primitive.\\n *\\n * @param {any} value\\n */\\nconst isObject=(value)=>Object$1(value)===value;\\n\\n/**\\n * isError tests whether an object inherits from the intrinsic\\n * `Error.prototype`.\\n * We capture the original error constructor as FERAL_ERROR to provide a clear\\n * signal for reviewers that we are handling an object with excess authority,\\n * like stack trace inspection, that we are carefully hiding from client code.\\n * Checking instanceof happens to be safe, but to avoid uttering FERAL_ERROR\\n * for such a trivial case outside commons.js, we provide a utility function.\\n *\\n * @param {any} value\\n */\\nconst isError=(value)=>value instanceof FERAL_ERROR;\\n\\n/* The original unsafe untamed eval function, which must not escape.*/\\n/* Sample at module initialization time, which is before lockdown can*/\\n/* repair it. Use it only to build powerless abstractions.*/\\n/* eslint-disable-next-line no-eval*/\\nconst FERAL_EVAL=eval;\\n\\n/* The original unsafe untamed Function constructor, which must not escape.*/\\n/* Sample at module initialization time, which is before lockdown can*/\\n/* repair it. Use it only to build powerless abstractions.*/\\nconst FERAL_FUNCTION=Function;\\n\\nconst noEvalEvaluate=()=>{\\n/* See https://github.com/endojs/endo/blob/master/packages/ses/error-codes/SES_NO_EVAL.md*/\\nthrow TypeError('Cannot eval with evalTaming set to \\\"noEval\\\" (SES_NO_EVAL)');};\\n\\n\\n/* ////////////////// FERAL_STACK_GETTER FERAL_STACK_SETTER ////////////////////*/\\n\\nconst er1StackDesc=getOwnPropertyDescriptor(Error('er1'),'stack');\\nconst er2StackDesc=getOwnPropertyDescriptor(TypeError('er2'),'stack');\\n\\nlet feralStackGetter;\\nlet feralStackSetter;\\nif(er1StackDesc&&er2StackDesc&&er1StackDesc.get){\\n/* We should only encounter this case on v8 because of its problematic*/\\n/* error own stack accessor behavior.*/\\n/* Note that FF/SpiderMonkey, Moddable/XS, and the error stack proposal*/\\n/* all inherit a stack accessor property from Error.prototype, which is*/\\n/* great. That case needs no heroics to secure.*/\\nif(\\n/* In the v8 case as we understand it, all errors have an own stack*/\\n/* accessor property, but within the same realm, all these accessor*/\\n/* properties have the same getter and have the same setter.*/\\n/* This is therefore the case that we repair.*/\\ntypeof er1StackDesc.get==='function'&&\\ner1StackDesc.get===er2StackDesc.get&&\\ntypeof er1StackDesc.set==='function'&&\\ner1StackDesc.set===er2StackDesc.set)\\n{\\n/* Otherwise, we have own stack accessor properties that are outside*/\\n/* our expectations, that therefore need to be understood better*/\\n/* before we know how to repair them.*/\\nferalStackGetter=freeze(er1StackDesc.get);\\nferalStackSetter=freeze(er1StackDesc.set);}else\\n{\\n/* See https://github.com/endojs/endo/blob/master/packages/ses/error-codes/SES_UNEXPECTED_ERROR_OWN_STACK_ACCESSOR.md*/\\nthrow TypeError(\\n'Unexpected Error own stack accessor functions (SES_UNEXPECTED_ERROR_OWN_STACK_ACCESSOR)');}}\\n\\n\\n\\n\\n/**\\n * If on a v8 with the problematic error own stack accessor behavior,\\n * `FERAL_STACK_GETTER` will be the shared getter of all those accessors\\n * and `FERAL_STACK_SETTER` will be the shared setter. On any platform\\n * without this problem, `FERAL_STACK_GETTER` and `FERAL_STACK_SETTER` are\\n * both `undefined`.\\n *\\n * @type {(() => any) | undefined}\\n */\\nconst FERAL_STACK_GETTER=feralStackGetter;\\n\\n/**\\n * If on a v8 with the problematic error own stack accessor behavior,\\n * `FERAL_STACK_GETTER` will be the shared getter of all those accessors\\n * and `FERAL_STACK_SETTER` will be the shared setter. On any platform\\n * without this problem, `FERAL_STACK_GETTER` and `FERAL_STACK_SETTER` are\\n * both `undefined`.\\n *\\n * @type {((newValue: any) => void) | undefined}\\n */\\nconst FERAL_STACK_SETTER=feralStackSetter;exports.AggregateError=AggregateError;exports.Array=Array;exports.Date=Date;exports.FERAL_ERROR=FERAL_ERROR;exports.FERAL_EVAL=FERAL_EVAL;exports.FERAL_FUNCTION=FERAL_FUNCTION;exports.FERAL_REG_EXP=FERAL_REG_EXP;exports.FERAL_STACK_GETTER=FERAL_STACK_GETTER;exports.FERAL_STACK_SETTER=FERAL_STACK_SETTER;exports.FinalizationRegistry=FinalizationRegistry;exports.Float32Array=Float32Array;exports.JSON=JSON;exports.Map=Map;exports.Math=Math;exports.Number=Number;exports.Object=Object$1;exports.Promise=Promise$1;exports.Proxy=Proxy;exports.RangeError=RangeError;exports.ReferenceError=ReferenceError;exports.Reflect=Reflect;exports.Set=Set;exports.String=String;exports.Symbol=Symbol;exports.SyntaxError=SyntaxError;exports.TypeError=TypeError;exports.WeakMap=WeakMap;exports.WeakSet=WeakSet;exports.apply=apply;exports.arrayFilter=arrayFilter;exports.arrayFlatMap=arrayFlatMap;exports.arrayForEach=arrayForEach;exports.arrayIncludes=arrayIncludes;exports.arrayJoin=arrayJoin;exports.arrayMap=arrayMap;exports.arrayPop=arrayPop;exports.arrayPrototype=arrayPrototype;exports.arrayPush=arrayPush;exports.arraySlice=arraySlice;exports.arraySome=arraySome;exports.arraySort=arraySort;exports.assign=assign;exports.construct=construct;exports.create=create;exports.defineProperties=defineProperties;exports.defineProperty=defineProperty;exports.entries=entries;exports.finalizationRegistryRegister=finalizationRegistryRegister;exports.finalizationRegistryUnregister=finalizationRegistryUnregister;exports.freeze=freeze;exports.fromEntries=fromEntries;exports.functionBind=functionBind;exports.functionPrototype=functionPrototype;exports.functionToString=functionToString;exports.generatorNext=generatorNext;exports.generatorPrototype=generatorPrototype;exports.generatorThrow=generatorThrow;exports.getConstructorOf=getConstructorOf;exports.getOwnPropertyDescriptor=getOwnPropertyDescriptor;exports.getOwnPropertyDescriptors=getOwnPropertyDescriptors;exports.getOwnPropertyNames=getOwnPropertyNames;exports.getPrototypeOf=getPrototypeOf;exports.globalThis=universalThis;exports.immutableObject=immutableObject;exports.is=is;exports.isArray=isArray;exports.isError=isError;exports.isExtensible=isExtensible;exports.isFrozen=isFrozen;exports.isInteger=isInteger;exports.isObject=isObject;exports.isSealed=isSealed;exports.iterateArray=iterateArray;exports.iterateMap=iterateMap;exports.iterateSet=iterateSet;exports.iterateString=iterateString;exports.iteratorSymbol=iteratorSymbol;exports.keys=keys;exports.mapDelete=mapDelete;exports.mapEntries=mapEntries;exports.mapGet=mapGet;exports.mapHas=mapHas;exports.mapPrototype=mapPrototype;exports.mapSet=mapSet;exports.matchAllRegExp=matchAllRegExp;exports.matchAllSymbol=matchAllSymbol;exports.noEvalEvaluate=noEvalEvaluate;exports.objectHasOwnProperty=objectHasOwnProperty;exports.objectPrototype=objectPrototype;exports.ownKeys=ownKeys;exports.preventExtensions=preventExtensions;exports.promiseAll=promiseAll;exports.promiseCatch=promiseCatch;exports.promisePrototype=promisePrototype;exports.promiseThen=promiseThen;exports.proxyRevocable=proxyRevocable;exports.reflectGet=reflectGet;exports.reflectGetOwnPropertyDescriptor=reflectGetOwnPropertyDescriptor;exports.reflectHas=reflectHas;exports.reflectIsExtensible=reflectIsExtensible;exports.reflectPreventExtensions=reflectPreventExtensions;exports.reflectSet=reflectSet;exports.regexpExec=regexpExec;exports.regexpPrototype=regexpPrototype;exports.regexpTest=regexpTest;exports.seal=seal;exports.setAdd=setAdd;exports.setDelete=setDelete;exports.setForEach=setForEach;exports.setHas=setHas;exports.setPrototype=setPrototype;exports.setPrototypeOf=setPrototypeOf;exports.speciesSymbol=speciesSymbol;exports.stringEndsWith=stringEndsWith;exports.stringIncludes=stringIncludes;exports.stringIndexOf=stringIndexOf;exports.stringMatch=stringMatch;exports.stringPrototype=stringPrototype;exports.stringReplace=stringReplace;exports.stringSearch=stringSearch;exports.stringSlice=stringSlice;exports.stringSplit=stringSplit;exports.stringStartsWith=stringStartsWith;exports.stringifyJson=stringifyJson;exports.symbolFor=symbolFor;exports.symbolKeyFor=symbolKeyFor;exports.toStringTagSymbol=toStringTagSymbol;exports.typedArrayPrototype=typedArrayPrototype;exports.uncurryThis=uncurryThis;exports.unscopablesSymbol=unscopablesSymbol;exports.values=values;exports.weakmapDelete=weakmapDelete;exports.weakmapGet=weakmapGet;exports.weakmapHas=weakmapHas;exports.weakmapPrototype=weakmapPrototype;exports.weakmapSet=weakmapSet;exports.weaksetAdd=weaksetAdd;exports.weaksetHas=weaksetHas;exports.weaksetPrototype=weaksetPrototype;\",\n \"node_modules/ses/src/compartment-evaluate.js\": \"'use strict';Object.defineProperty(exports,'__esModule',{value:true});var commons=require('./commons.js');var transforms=require('./transforms.js');var makeSafeEvaluator=require('./make-safe-evaluator.js');/*/ <reference types=\\\"ses\\\">*/\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\nconst provideCompartmentEvaluator=(compartmentFields,options)=>{\\nconst{sloppyGlobalsMode=false,__moduleShimLexicals__=undefined}=\\noptions;\\n\\nlet safeEvaluate;\\n\\nif(__moduleShimLexicals__===undefined&&!sloppyGlobalsMode){\\n({safeEvaluate}=compartmentFields);}else\\n{\\n/* The scope proxy or global lexicals are different from the*/\\n/* shared evaluator so we need to build a new one*/\\n\\nlet{globalTransforms}=compartmentFields;\\nconst{globalObject}=compartmentFields;\\n\\nlet moduleLexicals;\\nif(__moduleShimLexicals__!==undefined){\\n/* When using `evaluate` for ESM modules, as should only occur from the*/\\n/* module-shim's module-instance.js, we do not reveal the SES-shim's*/\\n/* module-to-program translation, as this is not standardizable behavior.*/\\n/* However, the `localTransforms` will come from the `__shimTransforms__`*/\\n/* Compartment option in this case, which is a non-standardizable escape*/\\n/* hatch so programs designed specifically for the SES-shim*/\\n/* implementation may opt-in to use the same transforms for `evaluate`*/\\n/* and `import`, at the expense of being tightly coupled to SES-shim.*/\\nglobalTransforms=undefined;\\n\\nmoduleLexicals=commons.create(\\nnull,\\ncommons.getOwnPropertyDescriptors(__moduleShimLexicals__));}\\n\\n\\n\\n({safeEvaluate}=makeSafeEvaluator.makeSafeEvaluator({\\nglobalObject,\\nmoduleLexicals,\\nglobalTransforms,\\nsloppyGlobalsMode}));}\\n\\n\\n\\nreturn{safeEvaluate};};\\n\\n\\nconst compartmentEvaluate=(compartmentFields,source,options)=>{\\n/* Perform this check first to avoid unnecessary sanitizing.*/\\n/* TODO Maybe relax string check and coerce instead:*/\\n/* https://github.com/tc39/proposal-dynamic-code-brand-checks*/\\nif(typeof source!=='string'){\\nthrow commons.TypeError('first argument of evaluate() must be a string');}\\n\\n\\n/* Extract options, and shallow-clone transforms.*/\\nconst{\\ntransforms:transforms$1=[],\\n__evadeHtmlCommentTest__=false,\\n__evadeImportExpressionTest__=false,\\n__rejectSomeDirectEvalExpressions__=true/* Note default on*/}=\\noptions;\\nconst localTransforms=[...transforms$1];\\nif(__evadeHtmlCommentTest__===true){\\ncommons.arrayPush(localTransforms,transforms.evadeHtmlCommentTest);}\\n\\nif(__evadeImportExpressionTest__===true){\\ncommons.arrayPush(localTransforms,transforms.evadeImportExpressionTest);}\\n\\nif(__rejectSomeDirectEvalExpressions__===true){\\ncommons.arrayPush(localTransforms,transforms.rejectSomeDirectEvalExpressions);}\\n\\n\\nconst{safeEvaluate}=provideCompartmentEvaluator(\\ncompartmentFields,\\noptions);\\n\\n\\nreturn safeEvaluate(source,{\\nlocalTransforms});};exports.compartmentEvaluate=compartmentEvaluate;exports.provideCompartmentEvaluator=provideCompartmentEvaluator;\",\n \"node_modules/ses/src/compartment-shim.js\": \"'use strict';var commons=require('./commons.js');var compartment=require('./compartment.js');var tameFunctionTostring=require('./tame-function-tostring.js');var intrinsics=require('./intrinsics.js');/*/ <reference types=\\\"ses\\\"/>*/\\n\\n\\n\\n\\n\\n\\nconst markVirtualizedNativeFunction=tameFunctionTostring.tameFunctionToString();\\n\\n/* @ts-ignore Compartment is definitely on globalThis.*/\\ncommons.globalThis.Compartment=compartment.makeCompartmentConstructor(\\ncompartment.makeCompartmentConstructor,\\nintrinsics.getGlobalIntrinsics(commons.globalThis),\\nmarkVirtualizedNativeFunction);\",\n \"node_modules/ses/src/compartment.js\": \"'use strict';Object.defineProperty(exports,'__esModule',{value:true});var commons=require('./commons.js');var globalObject=require('./global-object.js');var permits=require('./permits.js');var moduleLoad=require('./module-load.js');var moduleLink=require('./module-link.js');var moduleProxy=require('./module-proxy.js');var assert=require('./error/assert.js');var compartmentEvaluate=require('./compartment-evaluate.js');var makeSafeEvaluator=require('./make-safe-evaluator.js');/* @ts-check*/\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\nconst{quote:q}=assert.assert;\\n\\n/* moduleAliases associates every public module exports namespace with its*/\\n/* corresponding compartment and specifier so they can be used to link modules*/\\n/* across compartments.*/\\n/* The mechanism to thread an alias is to use the compartment.module function*/\\n/* to obtain the exports namespace of a foreign module and pass it into another*/\\n/* compartment's moduleMap constructor option.*/\\nconst moduleAliases=new commons.WeakMap();\\n\\n/* privateFields captures the private state for each compartment.*/\\nconst privateFields=new commons.WeakMap();\\n\\n/* Compartments do not need an importHook or resolveHook to be useful*/\\n/* as a vessel for evaluating programs.*/\\n/* However, any method that operates the module system will throw an exception*/\\n/* if these hooks are not available.*/\\nconst assertModuleHooks=(compartment)=>{\\nconst{importHook,resolveHook}=commons.weakmapGet(privateFields,compartment);\\nif(typeof importHook!=='function'||typeof resolveHook!=='function'){\\nthrow commons.TypeError(\\n'Compartment must be constructed with an importHook and a resolveHook for it to be able to load modules');}};\\n\\n\\n\\n\\nconst InertCompartment=function Compartment(\\n_endowments={},\\n_modules={},\\n_options={})\\n{\\nthrow commons.TypeError(\\n'Compartment.prototype.constructor is not a valid constructor.');};\\n\\n\\n\\n/**\\n * @param {Compartment} compartment\\n * @param {string} specifier\\n */\\nconst compartmentImportNow=(compartment,specifier)=>{\\nconst{execute,exportsProxy}=moduleLink.link(\\nprivateFields,\\nmoduleAliases,\\ncompartment,\\nspecifier);\\n\\nexecute();\\nreturn exportsProxy;};\\n\\n\\nconst CompartmentPrototype={\\nconstructor:InertCompartment,\\n\\nget globalThis(){\\nreturn commons.weakmapGet(privateFields,this).globalObject;},\\n\\n\\nget name(){\\nreturn commons.weakmapGet(privateFields,this).name;},\\n\\n\\n/**\\n * @param {string} source is a JavaScript program grammar construction.\\n * @param {object} [options]\\n * @param {Array<IMPORT('./lockdown-shim').Transform>} [options.transforms]\\n * @param {boolean} [options.sloppyGlobalsMode]\\n * @param {object} [options.__moduleShimLexicals__]\\n * @param {boolean} [options.__evadeHtmlCommentTest__]\\n * @param {boolean} [options.__evadeImportExpressionTest__]\\n * @param {boolean} [options.__rejectSomeDirectEvalExpressions__]\\n */\\nevaluate(source,options={}){\\nconst compartmentFields=commons.weakmapGet(privateFields,this);\\nreturn compartmentEvaluate.compartmentEvaluate(compartmentFields,source,options);},\\n\\n\\nmodule(specifier){\\nif(typeof specifier!=='string'){\\nthrow commons.TypeError('first argument of module() must be a string');}\\n\\n\\nassertModuleHooks(this);\\n\\nconst{exportsProxy}=moduleProxy.getDeferredExports(\\nthis,\\ncommons.weakmapGet(privateFields,this),\\nmoduleAliases,\\nspecifier);\\n\\n\\nreturn exportsProxy;},\\n\\n\\nasync import(specifier){\\nif(typeof specifier!=='string'){\\nthrow commons.TypeError('first argument of import() must be a string');}\\n\\n\\nassertModuleHooks(this);\\n\\nreturn commons.promiseThen(\\nmoduleLoad.load(privateFields,moduleAliases,this,specifier),\\n()=>{\\n/* The namespace box is a contentious design and likely to be a breaking*/\\n/* change in an appropriately numbered future version.*/\\nconst namespace=compartmentImportNow(\\n/** @type {Compartment} */this,\\nspecifier);\\n\\nreturn{namespace};});},\\n\\n\\n\\n\\nasync load(specifier){\\nif(typeof specifier!=='string'){\\nthrow commons.TypeError('first argument of load() must be a string');}\\n\\n\\nassertModuleHooks(this);\\n\\nreturn moduleLoad.load(privateFields,moduleAliases,this,specifier);},\\n\\n\\nimportNow(specifier){\\nif(typeof specifier!=='string'){\\nthrow commons.TypeError('first argument of importNow() must be a string');}\\n\\n\\nassertModuleHooks(this);\\nmoduleLoad.loadNow(privateFields,moduleAliases,this,specifier);\\nreturn compartmentImportNow(/** @type {Compartment} */this,specifier);}};\\n\\n\\n\\n/* This causes `String(new Compartment())` to evaluate to `[object Compartment]`.*/\\n/* The descriptor follows the conventions of other globals with @@toStringTag*/\\n/* properties, e.g. Math.*/\\ncommons.defineProperties(CompartmentPrototype,{\\n[commons.toStringTagSymbol]:{\\nvalue:'Compartment',\\nwritable:false,\\nenumerable:false,\\nconfigurable:true}});\\n\\n\\n\\ncommons.defineProperties(InertCompartment,{\\nprototype:{value:CompartmentPrototype}});\\n\\n\\n/**\\n * @callback MakeCompartmentConstructor\\n * @param {MakeCompartmentConstructor} targetMakeCompartmentConstructor\\n * @param {Record<string, any>} intrinsics\\n * @param {(object: object) => void} markVirtualizedNativeFunction\\n * @returns {Compartment['constructor']}\\n */\\n\\n/** @type {MakeCompartmentConstructor} */\\nconst makeCompartmentConstructor=(\\ntargetMakeCompartmentConstructor,\\nintrinsics,\\nmarkVirtualizedNativeFunction)=>\\n{\\nfunction Compartment(endowments={},moduleMap={},options={}){\\nif(new.target===undefined){\\nthrow commons.TypeError(\\n\\\"Class constructor Compartment cannot be invoked without 'new'\\\");}\\n\\n\\n\\n/* Extract options, and shallow-clone transforms.*/\\nconst{\\nname='<unknown>',\\ntransforms=[],\\n__shimTransforms__=[],\\nresolveHook,\\nimportHook,\\nimportNowHook,\\nmoduleMapHook,\\nimportMetaHook}=\\noptions;\\nconst globalTransforms=[...transforms,...__shimTransforms__];\\n\\n/* Map<FullSpecifier, ModuleCompartmentRecord>*/\\nconst moduleRecords=new commons.Map();\\n/* Map<FullSpecifier, ModuleInstance>*/\\nconst instances=new commons.Map();\\n/* Map<FullSpecifier, {ExportsProxy, ProxiedExports, activate()}>*/\\nconst deferredExports=new commons.Map();\\n\\n/* Validate given moduleMap.*/\\n/* The module map gets translated on-demand in module-load.js and the*/\\n/* moduleMap can be invalid in ways that cannot be detected in the*/\\n/* constructor, but these checks allow us to throw early for a better*/\\n/* developer experience.*/\\nfor(const[specifier,aliasNamespace]of commons.entries(moduleMap||{})){\\nif(typeof aliasNamespace==='string'){\\n/* TODO implement parent module record retrieval.*/\\nthrow commons.TypeError(\\n`Cannot map module ${q(specifier)} to ${q(\\naliasNamespace)\\n} in parent compartment`);}else\\n\\nif(commons.weakmapGet(moduleAliases,aliasNamespace)===undefined){\\n/* TODO create and link a synthetic module instance from the given*/\\n/* namespace object.*/\\nthrow commons.ReferenceError(\\n`Cannot map module ${q(\\nspecifier)\\n} because it has no known compartment in this realm`);}}\\n\\n\\n\\n\\nconst globalObject$1={};\\n\\nglobalObject.setGlobalObjectSymbolUnscopables(globalObject$1);\\n\\n/* We must initialize all constant properties first because*/\\n/* `makeSafeEvaluator` may use them to create optimized bindings*/\\n/* in the evaluator.*/\\n/* TODO: consider merging into a single initialization if internal*/\\n/* evaluator is no longer eagerly created*/\\nglobalObject.setGlobalObjectConstantProperties(globalObject$1);\\n\\nconst{safeEvaluate}=makeSafeEvaluator.makeSafeEvaluator({\\nglobalObject:globalObject$1,\\nglobalTransforms,\\nsloppyGlobalsMode:false});\\n\\n\\nglobalObject.setGlobalObjectMutableProperties(globalObject$1,{\\nintrinsics,\\nnewGlobalPropertyNames:permits.sharedGlobalPropertyNames,\\nmakeCompartmentConstructor:targetMakeCompartmentConstructor,\\nmarkVirtualizedNativeFunction});\\n\\n\\n/* TODO: maybe add evalTaming to the Compartment constructor 3rd options?*/\\nglobalObject.setGlobalObjectEvaluators(\\nglobalObject$1,\\nsafeEvaluate,\\nmarkVirtualizedNativeFunction);\\n\\n\\ncommons.assign(globalObject$1,endowments);\\n\\ncommons.weakmapSet(privateFields,this,{\\nname:`${name}`,\\nglobalTransforms,\\nglobalObject:globalObject$1,\\nsafeEvaluate,\\nresolveHook,\\nimportHook,\\nimportNowHook,\\nmoduleMap,\\nmoduleMapHook,\\nimportMetaHook,\\nmoduleRecords,\\n__shimTransforms__,\\ndeferredExports,\\ninstances});}\\n\\n\\n\\nCompartment.prototype=CompartmentPrototype;\\n\\nreturn Compartment;};exports.CompartmentPrototype=CompartmentPrototype;exports.InertCompartment=InertCompartment;exports.makeCompartmentConstructor=makeCompartmentConstructor;\",\n \"node_modules/ses/src/console-shim.js\": \"'use strict';var commons=require('./commons.js');var console=require('./error/console.js');var\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\nassert=require('./error/assert.js');/* TODO possible additional exports. Some are privileged.*/ /* export { loggedErrorHandler };*/ /* export {*/ /* makeCausalConsole,*/ /* consoleLevelMethods,*/ /* consoleOtherMethods,*/ /* makeLoggingConsoleKit,*/ /* filterConsole,*/ /* pumpLogToConsole,*/ /* } from './src/error/console.js';*/ /* export { assertLogs, throwsAndLogs } from './src/error/throws-and-logs.js';*/ /**\\n * Makes a Console like the\\n * [SES causal `console`](https://github.com/endojs/endo/blob/master/packages/ses/src/error/README.md)\\n * but whose output is redirected to the supplied `logger` function.\\n */\\nconst makeCausalConsoleFromLoggerForSesAva=\\nconsole.defineCausalConsoleFromLogger(assert.loggedErrorHandler);\\n\\n/**\\n *`makeCausalConsoleFromLoggerForSesAva` is privileged because it exposes\\n * unredacted error info onto the `Logger` provided by the caller. It\\n * should not be made available to non-privileged code.\\n *\\n * Further, we consider this particular API choice to be experimental\\n * and may change in the future. It is currently only intended for use by\\n * `@endo/ses-ava`, with which it will be co-maintained.\\n *\\n * Thus, this `console-shim.js` makes `makeCausalConsoleFromLoggerForSesAva`\\n * available on `globalThis` which it *assumes* is the global of the start\\n * compartment and is therefore allowed to hold powers that should not be\\n * available in constructed compartments. It makes it available as the value of\\n * a global property named by a registered symbol named\\n * `MAKE_CAUSAL_CONSOLE_FROM_LOGGER_KEY_FOR_SES_AVA`.\\n *\\n * Anyone accessing this, including `@endo/ses-ava`, should feature test for\\n * this and be tolerant of its absence. It may indeed disappear from later\\n * versions of the ses-shim.\\n */\\nconst MAKE_CAUSAL_CONSOLE_FROM_LOGGER_KEY_FOR_SES_AVA=commons.symbolFor(\\n'MAKE_CAUSAL_CONSOLE_FROM_LOGGER_KEY_FOR_SES_AVA');\\n\\n\\ncommons.globalThis[MAKE_CAUSAL_CONSOLE_FROM_LOGGER_KEY_FOR_SES_AVA]=\\nmakeCausalConsoleFromLoggerForSesAva;\",\n \"node_modules/ses/src/enable-property-overrides.js\": \"'use strict';Object.defineProperty(exports,'__esModule',{value:true});var commons=require('./commons.js');var\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\nenablements=require('./enablements.js');/* Adapted from SES/Caja*/ /**\\n * For a special set of properties defined in the `enablement` whitelist,\\n * `enablePropertyOverrides` ensures that the effect of freezing does not\\n * suppress the ability to override these properties on derived objects by\\n * simple assignment.\\n *\\n * Because of lack of sufficient foresight at the time, ES5 unfortunately\\n * specified that a simple assignment to a non-existent property must fail if\\n * it would override an non-writable data property of the same name in the\\n * shadow of the prototype chain. In retrospect, this was a mistake, the\\n * so-called \\\"override mistake\\\". But it is now too late and we must live with\\n * the consequences.\\n *\\n * As a result, simply freezing an object to make it tamper proof has the\\n * unfortunate side effect of breaking previously correct code that is\\n * considered to have followed JS best practices, if this previous code used\\n * assignment to override.\\n *\\n * For the enabled properties, `enablePropertyOverrides` effectively shims what\\n * the assignment behavior would have been in the absence of the override\\n * mistake. However, the shim produces an imperfect emulation. It shims the\\n * behavior by turning these data properties into accessor properties, where\\n * the accessor's getter and setter provide the desired behavior. For\\n * non-reflective operations, the illusion is perfect. However, reflective\\n * operations like `getOwnPropertyDescriptor` see the descriptor of an accessor\\n * property rather than the descriptor of a data property. At the time of this\\n * writing, this is the best we know how to do.\\n *\\n * To the getter of the accessor we add a property named\\n * `'originalValue'` whose value is, as it says, the value that the\\n * data property had before being converted to an accessor property. We add\\n * this extra property to the getter for two reason:\\n *\\n * The harden algorithm walks the own properties reflectively, i.e., with\\n * `getOwnPropertyDescriptor` semantics, rather than `[[Get]]` semantics. When\\n * it sees an accessor property, it does not invoke the getter. Rather, it\\n * proceeds to walk both the getter and setter as part of its transitive\\n * traversal. Without this extra property, `enablePropertyOverrides` would have\\n * hidden the original data property value from `harden`, which would be bad.\\n * Instead, by exposing that value in an own data property on the getter,\\n * `harden` finds and walks it anyway.\\n *\\n * We enable a form of cooperative emulation, giving reflective code an\\n * opportunity to cooperate in upholding the illusion. When such cooperative\\n * reflective code sees an accessor property, where the accessor's getter\\n * has an `originalValue` property, it knows that the getter is\\n * alleging that it is the result of the `enablePropertyOverrides` conversion\\n * pattern, so it can decide to cooperatively \\\"pretend\\\" that it sees a data\\n * property with that value.\\n *\\n * @param {Record<string, any>} intrinsics\\n * @param {'min' | 'moderate' | 'severe'} overrideTaming\\n * @param {Iterable<string | symbol>} [overrideDebug]\\n */\\nfunction enablePropertyOverrides(\\nintrinsics,\\noverrideTaming,\\noverrideDebug=[])\\n{\\nconst debugProperties=new commons.Set(overrideDebug);\\nfunction enable(path,obj,prop,desc){\\nif('value'in desc&&desc.configurable){\\nconst{value}=desc;\\n\\nconst isDebug=commons.setHas(debugProperties,prop);\\n\\n/* We use concise method syntax to be `this` sensitive, but still*/\\n/* omit a prototype property or [[Construct]] behavior.*/\\n/* @ts-expect-error We know there is an accessor descriptor there*/\\nconst{get:getter,set:setter}=commons.getOwnPropertyDescriptor(\\n{\\nget[prop](){\\nreturn value;},\\n\\nset[prop](newValue){\\nif(obj===this){\\nthrow commons.TypeError(\\n`Cannot assign to read only property '${commons.String(\\nprop)\\n}' of '${path}'`);}\\n\\n\\nif(commons.objectHasOwnProperty(this,prop)){\\nthis[prop]=newValue;}else\\n{\\nif(isDebug){\\n/* eslint-disable-next-line @endo/no-polymorphic-call*/\\nconsole.error(commons.TypeError(`Override property ${prop}`));}\\n\\ncommons.defineProperty(this,prop,{\\nvalue:newValue,\\nwritable:true,\\nenumerable:true,\\nconfigurable:true});}}},\\n\\n\\n\\n\\nprop);\\n\\n\\ncommons.defineProperty(getter,'originalValue',{\\nvalue,\\nwritable:false,\\nenumerable:false,\\nconfigurable:false});\\n\\n\\ncommons.defineProperty(obj,prop,{\\nget:getter,\\nset:setter,\\nenumerable:desc.enumerable,\\nconfigurable:desc.configurable});}}\\n\\n\\n\\n\\nfunction enableProperty(path,obj,prop){\\nconst desc=commons.getOwnPropertyDescriptor(obj,prop);\\nif(!desc){\\nreturn;}\\n\\nenable(path,obj,prop,desc);}\\n\\n\\nfunction enableAllProperties(path,obj){\\nconst descs=commons.getOwnPropertyDescriptors(obj);\\nif(!descs){\\nreturn;}\\n\\n/* TypeScript does not allow symbols to be used as indexes because it*/\\n/* cannot recokon types of symbolized properties.*/\\ncommons.arrayForEach(commons.ownKeys(descs),(prop)=>enable(path,obj,prop,descs[prop]));}\\n\\n\\nfunction enableProperties(path,obj,plan){\\nfor(const prop of commons.ownKeys(plan)){\\nconst desc=commons.getOwnPropertyDescriptor(obj,prop);\\nif(!desc||desc.get||desc.set){\\n/* No not a value property, nothing to do.*/\\n/* eslint-disable-next-line no-continue*/\\ncontinue;}\\n\\n\\n/* In case `prop` is a symbol, we first coerce it with `String`,*/\\n/* purely for diagnostic purposes.*/\\nconst subPath=`${path}.${commons.String(prop)}`;\\nconst subPlan=plan[prop];\\n\\nif(subPlan===true){\\nenableProperty(subPath,obj,prop);}else\\nif(subPlan==='*'){\\nenableAllProperties(subPath,desc.value);}else\\nif(commons.isObject(subPlan)){\\nenableProperties(subPath,desc.value,subPlan);}else\\n{\\nthrow commons.TypeError(`Unexpected override enablement plan ${subPath}`);}}}\\n\\n\\n\\n\\nlet plan;\\nswitch(overrideTaming){\\ncase'min':{\\nplan=enablements.minEnablements;\\nbreak;}\\n\\ncase'moderate':{\\nplan=enablements.moderateEnablements;\\nbreak;}\\n\\ncase'severe':{\\nplan=enablements.severeEnablements;\\nbreak;}\\n\\ndefault:{\\nthrow commons.TypeError(`unrecognized overrideTaming ${overrideTaming}`);}}\\n\\n\\n\\n/* Do the repair.*/\\nenableProperties('root',intrinsics,plan);}exports[\\\"default\\\"]=enablePropertyOverrides;\",\n \"node_modules/ses/src/enablements.js\": \"'use strict';Object.defineProperty(exports,'__esModule',{value:true});var\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\ncommons=require('./commons.js');/**\\n * @file Exports {@code enablements}, a recursively defined\\n * JSON record defining the optimum set of intrinsics properties\\n * that need to be \\\"repaired\\\" before hardening is applied on\\n * enviromments subject to the override mistake.\\n *\\n * @author JF Paradis\\n * @author Mark S. Miller\\n */ /**\\n * <p>Because \\\"repairing\\\" replaces data properties with accessors, every\\n * time a repaired property is accessed, the associated getter is invoked,\\n * which degrades the runtime performance of all code executing in the\\n * repaired enviromment, compared to the non-repaired case. In order\\n * to maintain performance, we only repair the properties of objects\\n * for which hardening causes a breakage of their normal intended usage.\\n *\\n * There are three unwanted cases:\\n * <ul>\\n * <li>Overriding properties on objects typically used as records,\\n * namely {@code \\\"Object\\\"} and {@code \\\"Array\\\"}. In the case of arrays,\\n * the situation is unintentional, a given program might not be aware\\n * that non-numerical properties are stored on the underlying object\\n * instance, not on the array. When an object is typically used as a\\n * map, we repair all of its prototype properties.\\n * <li>Overriding properties on objects that provide defaults on their\\n * prototype and that programs typically set using an assignment, such as\\n * {@code \\\"Error.prototype.message\\\"} and {@code \\\"Function.prototype.name\\\"}\\n * (both default to \\\"\\\").\\n * <li>Setting-up a prototype chain, where a constructor is set to extend\\n * another one. This is typically set by assignment, for example\\n * {@code \\\"Child.prototype.constructor = Child\\\"}, instead of invoking\\n * Object.defineProperty();\\n *\\n * <p>Each JSON record enumerates the disposition of the properties on\\n * some corresponding intrinsic object.\\n *\\n * <p>For each such record, the values associated with its property\\n * names can be:\\n * <ul>\\n * <li>true, in which case this property is simply repaired. The\\n * value associated with that property is not traversed. For\\n * example, {@code \\\"Function.prototype.name\\\"} leads to true,\\n * meaning that the {@code \\\"name\\\"} property of {@code\\n * \\\"Function.prototype\\\"} should be repaired (which is needed\\n * when inheriting from @code{Function} and setting the subclass's\\n * {@code \\\"prototype.name\\\"} property). If the property is\\n * already an accessor property, it is not repaired (because\\n * accessors are not subject to the override mistake).\\n * <li>\\\"*\\\", in which case this property is not repaired but the\\n * value associated with that property are traversed and repaired.\\n * <li>Another record, in which case this property is not repaired\\n * and that next record represents the disposition of the object\\n * which is its value. For example,{@code \\\"FunctionPrototype\\\"}\\n * leads to another record explaining which properties {@code\\n * Function.prototype} need to be repaired.\\n */ /**\\n * Minimal enablements when all the code is modern and known not to\\n * step into the override mistake, except for the following pervasive\\n * cases.\\n */const minEnablements={'%ObjectPrototype%':{toString:true},'%FunctionPrototype%':{toString:true/* set by \\\"rollup\\\"*/},'%ErrorPrototype%':{name:true/* set by \\\"precond\\\", \\\"ava\\\", \\\"node-fetch\\\"*/},'%IteratorPrototype%':{toString:true,/* https://github.com/tc39/proposal-iterator-helpers*/constructor:true,/* https://github.com/tc39/proposal-iterator-helpers*/[commons.toStringTagSymbol]:true}};/**\\n * Moderate enablements are usually good enough for legacy compat.\\n */const moderateEnablements={'%ObjectPrototype%':{toString:true,valueOf:true},'%ArrayPrototype%':{toString:true,push:true,/* set by \\\"Google Analytics\\\"*/concat:true,/* set by mobx generated code (old TS compiler?)*/[commons.iteratorSymbol]:true/* set by mobx generated code (old TS compiler?)*/},/* Function.prototype has no 'prototype' property to enable.*/ /* Function instances have their own 'name' and 'length' properties*/ /* which are configurable and non-writable. Thus, they are already*/ /* non-assignable anyway.*/'%FunctionPrototype%':{constructor:true,/* set by \\\"regenerator-runtime\\\"*/bind:true,/* set by \\\"underscore\\\", \\\"express\\\"*/toString:true/* set by \\\"rollup\\\"*/},'%ErrorPrototype%':{constructor:true,/* set by \\\"fast-json-patch\\\", \\\"node-fetch\\\"*/message:true,name:true,/* set by \\\"precond\\\", \\\"ava\\\", \\\"node-fetch\\\", \\\"node 14\\\"*/toString:true/* set by \\\"bluebird\\\"*/},'%TypeErrorPrototype%':{constructor:true,/* set by \\\"readable-stream\\\"*/message:true,/* set by \\\"tape\\\"*/\\nname:true/* set by \\\"readable-stream\\\", \\\"node 14\\\"*/},\\n\\n\\n'%SyntaxErrorPrototype%':{\\nmessage:true,/* to match TypeErrorPrototype.message*/\\nname:true/* set by \\\"node 14\\\"*/},\\n\\n\\n'%RangeErrorPrototype%':{\\nmessage:true,/* to match TypeErrorPrototype.message*/\\nname:true/* set by \\\"node 14\\\"*/},\\n\\n\\n'%URIErrorPrototype%':{\\nmessage:true,/* to match TypeErrorPrototype.message*/\\nname:true/* set by \\\"node 14\\\"*/},\\n\\n\\n'%EvalErrorPrototype%':{\\nmessage:true,/* to match TypeErrorPrototype.message*/\\nname:true/* set by \\\"node 14\\\"*/},\\n\\n\\n'%ReferenceErrorPrototype%':{\\nmessage:true,/* to match TypeErrorPrototype.message*/\\nname:true/* set by \\\"node 14\\\"*/},\\n\\n\\n/* https://github.com/endojs/endo/issues/550*/\\n'%AggregateErrorPrototype%':{\\nmessage:true,/* to match TypeErrorPrototype.message*/\\nname:true/* set by \\\"node 14\\\"?*/},\\n\\n\\n'%PromisePrototype%':{\\nconstructor:true/* set by \\\"core-js\\\"*/},\\n\\n\\n'%TypedArrayPrototype%':'*',/* set by https://github.com/feross/buffer*/\\n\\n'%Generator%':{\\nconstructor:true,\\nname:true,\\ntoString:true},\\n\\n\\n'%IteratorPrototype%':{\\ntoString:true,\\n/* https://github.com/tc39/proposal-iterator-helpers*/\\nconstructor:true,\\n/* https://github.com/tc39/proposal-iterator-helpers*/\\n[commons.toStringTagSymbol]:true}};\\n\\n\\n\\n/**\\n * The 'severe' enablement are needed because of issues tracked at\\n * https://github.com/endojs/endo/issues/576\\n *\\n * They are like the `moderate` enablements except for the entries below.\\n */\\nconst severeEnablements={\\n...moderateEnablements,\\n\\n/**\\n * Rollup (as used at least by vega) and webpack\\n * (as used at least by regenerator) both turn exports into assignments\\n * to a big `exports` object that inherits directly from\\n * `Object.prototype`. Some of the exported names we've seen include\\n * `hasOwnProperty`, `constructor`, and `toString`. But the strategy used\\n * by rollup and webpack potentionally turns any exported name\\n * into an assignment rejected by the override mistake. That's why\\n * the `severe` enablements takes the extreme step of enabling\\n * everything on `Object.prototype`.\\n *\\n * In addition, code doing inheritance manually will often override\\n * the `constructor` property on the new prototype by assignment. We've\\n * seen this several times.\\n *\\n * The cost of enabling all these is that they create a miserable debugging\\n * experience specifically on Node.\\n * https://github.com/Agoric/agoric-sdk/issues/2324\\n * explains how it confused the Node console.\\n *\\n * (TODO Reexamine the vscode situation. I think it may have improved\\n * since the following paragraph was written.)\\n *\\n * The vscode debugger's object inspector shows the own data properties of\\n * an object, which is typically what you want, but also shows both getter\\n * and setter for every accessor property whether inherited or own.\\n * With the `'*'` setting here, all the properties inherited from\\n * `Object.prototype` are accessors, creating an unusable display as seen\\n * at As explained at\\n * https://github.com/endojs/endo/blob/master/packages/ses/docs/lockdown.md#overridetaming-options\\n * Open the triangles at the bottom of that section.\\n */\\n'%ObjectPrototype%':'*',\\n\\n/**\\n * The widely used Buffer defined at https://github.com/feross/buffer\\n * on initialization, manually creates the equivalent of a subclass of\\n * `TypedArray`, which it then initializes by assignment. These assignments\\n * include enough of the `TypeArray` methods that here, the `severe`\\n * enablements just enable them all.\\n */\\n'%TypedArrayPrototype%':'*',\\n\\n/**\\n * Needed to work with Immer before https://github.com/immerjs/immer/pull/914\\n * is accepted.\\n */\\n'%MapPrototype%':'*',\\n\\n/**\\n * Needed to work with Immer before https://github.com/immerjs/immer/pull/914\\n * is accepted.\\n */\\n'%SetPrototype%':'*'};exports.minEnablements=minEnablements;exports.moderateEnablements=moderateEnablements;exports.severeEnablements=severeEnablements;\",\n \"node_modules/ses/src/error/assert.js\": \"'use strict';Object.defineProperty(exports,'__esModule',{value:true});var commons=require('../commons.js');var stringifyUtils=require('./stringify-utils.js');require('./types.js');require('./internal-types.js');var\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\nnoteLogArgs=require('./note-log-args.js');/* Copyright (C) 2019 Agoric, under Apache License 2.0*/ /**\\n * @import {BaseAssert, Assert, AssertionFunctions, AssertionUtilities, StringablePayload, DetailsToken, MakeAssert} from '../../types.js'\\n */ /* For our internal debugging purposes, uncomment*/ /* const internalDebugConsole = console;*/ /* /////////////////////////////////////////////////////////////////////////////*/ /** @type {WeakMap<StringablePayload, any>} */const declassifiers=new commons.WeakMap();\\n/** @type {AssertionUtilities['quote']} */\\nconst quote=(payload,spaces=undefined)=>{\\nconst result=commons.freeze({\\ntoString:commons.freeze(()=>stringifyUtils.bestEffortStringify(payload,spaces))});\\n\\ncommons.weakmapSet(declassifiers,result,payload);\\nreturn result;};\\n\\ncommons.freeze(quote);\\n\\nconst canBeBare=commons.freeze(/^[\\\\w:-]( ?[\\\\w:-])*$/);\\n\\n/**\\n * @type {AssertionUtilities['bare']}\\n */\\nconst bare=(payload,spaces=undefined)=>{\\nif(typeof payload!=='string'||!commons.regexpTest(canBeBare,payload)){\\nreturn quote(payload,spaces);}\\n\\nconst result=commons.freeze({\\ntoString:commons.freeze(()=>payload)});\\n\\ncommons.weakmapSet(declassifiers,result,payload);\\nreturn result;};\\n\\ncommons.freeze(bare);\\n\\n/* /////////////////////////////////////////////////////////////////////////////*/\\n\\n/**\\n * @typedef {object} HiddenDetails\\n *\\n * Captures the arguments passed to the `details` template string tag.\\n *\\n * @property {TemplateStringsArray | string[]} template\\n * @property {any[]} args\\n */\\n\\n/**\\n * @type {WeakMap<DetailsToken, HiddenDetails>}\\n *\\n * Maps from a details token which a `details` template literal returned\\n * to a record of the contents of that template literal expression.\\n */\\nconst hiddenDetailsMap=new commons.WeakMap();\\n\\n/**\\n * @param {HiddenDetails} hiddenDetails\\n * @returns {string}\\n */\\nconst getMessageString=({template,args})=>{\\nconst parts=[template[0]];\\nfor(let i=0;i<args.length;i+=1){\\nconst arg=args[i];\\nlet argStr;\\nif(commons.weakmapHas(declassifiers,arg)){\\nargStr=`${arg}`;}else\\nif(commons.isError(arg)){\\nargStr=`(${stringifyUtils.an(arg.name)})`;}else\\n{\\nargStr=`(${stringifyUtils.an(typeof arg)})`;}\\n\\ncommons.arrayPush(parts,argStr,template[i+1]);}\\n\\nreturn commons.arrayJoin(parts,'');};\\n\\n\\n/**\\n * Give detailsTokens a toString behavior. To minimize the overhead of\\n * creating new detailsTokens, we do this with an\\n * inherited `this` sensitive `toString` method, even though we normally\\n * avoid `this` sensitivity. To protect the method from inappropriate\\n * `this` application, it does something interesting only for objects\\n * registered in `redactedDetails`, which should be exactly the detailsTokens.\\n *\\n * The printing behavior must not reveal anything redacted, so we just use\\n * the same `getMessageString` we use to construct the redacted message\\n * string for a thrown assertion error.\\n */\\nconst DetailsTokenProto=commons.freeze({\\ntoString(){\\nconst hiddenDetails=commons.weakmapGet(hiddenDetailsMap,this);\\nif(hiddenDetails===undefined){\\nreturn'[Not a DetailsToken]';}\\n\\nreturn getMessageString(hiddenDetails);}});\\n\\n\\ncommons.freeze(DetailsTokenProto.toString);\\n\\n/**\\n * Normally this is the function exported as `assert.details` and often\\n * spelled `d`. However, if the `{errorTaming: 'unsafe'}` option is given to\\n * `lockdown`, then `unredactedDetails` is used instead.\\n *\\n * There are some unconditional uses of `redactedDetails` in this module. All\\n * of them should be uses where the template literal has no redacted\\n * substitution values. In those cases, the two are equivalent.\\n *\\n * @type {AssertionUtilities['details']}\\n */\\nconst redactedDetails=(template,...args)=>{\\n/* Keep in mind that the vast majority of calls to `details` creates*/\\n/* a details token that is never used, so this path must remain as fast as*/\\n/* possible. Hence we store what we've got with little processing, postponing*/\\n/* all the work to happen only if needed, for example, if an assertion fails.*/\\nconst detailsToken=commons.freeze({__proto__:DetailsTokenProto});\\ncommons.weakmapSet(hiddenDetailsMap,detailsToken,{template,args});\\nreturn(/** @type {DetailsToken} */ /** @type {unknown} */detailsToken);};\\n\\ncommons.freeze(redactedDetails);\\n\\n/**\\n * `unredactedDetails` is like `details` except that it does not redact\\n * anything. It acts like `details` would act if all substitution values\\n * were wrapped with the `quote` function above (the function normally\\n * spelled `q`). If the `{errorTaming: 'unsafe'}` option is given to\\n * `lockdown`, then the lockdown-shim arranges for the global `assert` to be\\n * one whose `details` property is `unredactedDetails`.\\n * This setting optimizes the debugging and testing experience at the price\\n * of safety. `unredactedDetails` also sacrifices the speed of `details`,\\n * which is usually fine in debugging and testing.\\n *\\n * @type {AssertionUtilities['details']}\\n */\\nconst unredactedDetails=(template,...args)=>{\\nargs=commons.arrayMap(args,(arg)=>\\ncommons.weakmapHas(declassifiers,arg)?arg:quote(arg));\\n\\nreturn redactedDetails(template,...args);};\\n\\ncommons.freeze(unredactedDetails);\\n\\n\\n/**\\n * @param {HiddenDetails} hiddenDetails\\n * @returns {LogArgs}\\n */\\nconst getLogArgs=({template,args})=>{\\nconst logArgs=[template[0]];\\nfor(let i=0;i<args.length;i+=1){\\nlet arg=args[i];\\nif(commons.weakmapHas(declassifiers,arg)){\\narg=commons.weakmapGet(declassifiers,arg);}\\n\\n/* Remove the extra spaces (since console.error puts them*/\\n/* between each cause).*/\\nconst priorWithoutSpace=commons.stringReplace(commons.arrayPop(logArgs)||'',/ $/,'');\\nif(priorWithoutSpace!==''){\\ncommons.arrayPush(logArgs,priorWithoutSpace);}\\n\\nconst nextWithoutSpace=commons.stringReplace(template[i+1],/^ /,'');\\ncommons.arrayPush(logArgs,arg,nextWithoutSpace);}\\n\\nif(logArgs[logArgs.length-1]===''){\\ncommons.arrayPop(logArgs);}\\n\\nreturn logArgs;};\\n\\n\\n/**\\n * @type {WeakMap<Error, LogArgs>}\\n *\\n * Maps from an error object to the log args that are a more informative\\n * alternative message for that error. When logging the error, these\\n * log args should be preferred to `error.message`.\\n */\\nconst hiddenMessageLogArgs=new commons.WeakMap();\\n\\n/* So each error tag will be unique.*/\\nlet errorTagNum=0;\\n\\n/**\\n * @type {WeakMap<Error, string>}\\n */\\nconst errorTags=new commons.WeakMap();\\n\\n/**\\n * @param {Error} err\\n * @param {string=} optErrorName\\n * @returns {string}\\n */\\nconst tagError=(err,optErrorName=err.name)=>{\\nlet errorTag=commons.weakmapGet(errorTags,err);\\nif(errorTag!==undefined){\\nreturn errorTag;}\\n\\nerrorTagNum+=1;\\nerrorTag=`${optErrorName}#${errorTagNum}`;\\ncommons.weakmapSet(errorTags,err,errorTag);\\nreturn errorTag;};\\n\\n\\n/**\\n * Make reasonable best efforts to make a `Passable` error.\\n * - `sanitizeError` will remove any \\\"extraneous\\\" own properties already added\\n * by the host,\\n * such as `fileName`,`lineNumber` on FireFox or `line` on Safari.\\n * - If any such \\\"extraneous\\\" properties were removed, `sanitizeError` will\\n * annotate\\n * the error with them, so they still appear on the causal console\\n * log output for diagnostic purposes, but not be otherwise visible.\\n * - `sanitizeError` will ensure that any expected properties already\\n * added by the host are data\\n * properties, converting accessor properties to data properties as needed,\\n * such as `stack` on v8 (Chrome, Brave, Edge?)\\n * - `sanitizeError` will freeze the error, preventing any correct engine from\\n * adding or\\n * altering any of the error's own properties `sanitizeError` is done.\\n *\\n * However, `sanitizeError` will not, for example, `harden`\\n * (i.e., deeply freeze)\\n * or ensure that the `cause` or `errors` property satisfy the `Passable`\\n * constraints. The purpose of `sanitizeError` is only to protect against\\n * mischief the host may have already added to the error as created,\\n * not to ensure that the error is actually Passable. For that,\\n * see `toPassableError` in `@endo/pass-style`.\\n *\\n * @param {Error} error\\n */\\nconst sanitizeError=(error)=>{\\nconst descs=commons.getOwnPropertyDescriptors(error);\\nconst{\\nname:_nameDesc,\\nmessage:_messageDesc,\\nerrors:_errorsDesc=undefined,\\ncause:_causeDesc=undefined,\\nstack:_stackDesc=undefined,\\n...restDescs}=\\ndescs;\\n\\nconst restNames=commons.ownKeys(restDescs);\\nif(restNames.length>=1){\\nfor(const name of restNames){\\ndelete error[name];}\\n\\nconst droppedNote=commons.create(commons.objectPrototype,restDescs);\\n/* eslint-disable-next-line no-use-before-define*/\\nnote(\\nerror,\\nredactedDetails`originally with properties ${quote(droppedNote)}`);}\\n\\n\\nfor(const name of commons.ownKeys(error)){\\n/* @ts-expect-error TS still confused by symbols as property names*/\\nconst desc=descs[name];\\nif(desc&&commons.objectHasOwnProperty(desc,'get')){\\ncommons.defineProperty(error,name,{\\nvalue:error[name]/* invoke the getter to convert to data property*/});}}\\n\\n\\n\\ncommons.freeze(error);};\\n\\n\\n/**\\n * @type {AssertionUtilities['error']}\\n */\\nconst makeError=(\\noptDetails=redactedDetails`Assert failed`,\\nerrConstructor=commons.globalThis.Error,\\n{\\nerrorName=undefined,\\ncause=undefined,\\nerrors=undefined,\\nsanitize=true}=\\n{})=>\\n{\\nif(typeof optDetails==='string'){\\n/* If it is a string, use it as the literal part of the template so*/\\n/* it doesn't get quoted.*/\\noptDetails=redactedDetails([optDetails]);}\\n\\nconst hiddenDetails=commons.weakmapGet(hiddenDetailsMap,optDetails);\\nif(hiddenDetails===undefined){\\nthrow commons.TypeError(`unrecognized details ${quote(optDetails)}`);}\\n\\nconst messageString=getMessageString(hiddenDetails);\\nconst opts=cause&&{cause};\\nlet error;\\nif(\\ntypeof commons.AggregateError!=='undefined'&&\\nerrConstructor===commons.AggregateError)\\n{\\nerror=commons.AggregateError(errors||[],messageString,opts);}else\\n{\\nerror=/** @type {ErrorConstructor} */errConstructor(\\nmessageString,\\nopts);\\n\\nif(errors!==undefined){\\n/* Since we need to tolerate `errors` on an AggregateError, may as*/\\n/* well tolerate it on all errors.*/\\ncommons.defineProperty(error,'errors',{\\nvalue:errors,\\nwritable:true,\\nenumerable:false,\\nconfigurable:true});}}\\n\\n\\n\\ncommons.weakmapSet(hiddenMessageLogArgs,error,getLogArgs(hiddenDetails));\\nif(errorName!==undefined){\\ntagError(error,errorName);}\\n\\nif(sanitize){\\nsanitizeError(error);}\\n\\n/* The next line is a particularly fruitful place to put a breakpoint.*/\\nreturn error;};\\n\\ncommons.freeze(makeError);\\n\\n/* /////////////////////////////////////////////////////////////////////////////*/\\n\\nconst{addLogArgs,takeLogArgsArray}=noteLogArgs.makeNoteLogArgsArrayKit();\\n\\n/**\\n * @type {WeakMap<Error, NoteCallback[]>}\\n *\\n * An augmented console will normally only take the hidden noteArgs array once,\\n * when it logs the error being annotated. Once that happens, further\\n * annotations of that error should go to the console immediately. We arrange\\n * that by accepting a note-callback function from the console as an optional\\n * part of that taking operation. Normally there will only be at most one\\n * callback per error, but that depends on console behavior which we should not\\n * assume. We make this an array of callbacks so multiple registrations\\n * are independent.\\n */\\nconst hiddenNoteCallbackArrays=new commons.WeakMap();\\n\\n/** @type {AssertionUtilities['note']} */\\nconst note=(error,detailsNote)=>{\\nif(typeof detailsNote==='string'){\\n/* If it is a string, use it as the literal part of the template so*/\\n/* it doesn't get quoted.*/\\ndetailsNote=redactedDetails([detailsNote]);}\\n\\nconst hiddenDetails=commons.weakmapGet(hiddenDetailsMap,detailsNote);\\nif(hiddenDetails===undefined){\\nthrow commons.TypeError(`unrecognized details ${quote(detailsNote)}`);}\\n\\nconst logArgs=getLogArgs(hiddenDetails);\\nconst callbacks=commons.weakmapGet(hiddenNoteCallbackArrays,error);\\nif(callbacks!==undefined){\\nfor(const callback of callbacks){\\ncallback(error,logArgs);}}else\\n\\n{\\naddLogArgs(error,logArgs);}};\\n\\n\\ncommons.freeze(note);\\n\\n/**\\n * The unprivileged form that just uses the de facto `error.stack` property.\\n * The start compartment normally has a privileged `globalThis.getStackString`\\n * which should be preferred if present.\\n *\\n * @param {Error} error\\n * @returns {string}\\n */\\nconst defaultGetStackString=(error)=>{\\nif(!('stack'in error)){\\nreturn'';}\\n\\nconst stackString=`${error.stack}`;\\nconst pos=commons.stringIndexOf(stackString,'\\\\n');\\nif(commons.stringStartsWith(stackString,' ')||pos===-1){\\nreturn stackString;}\\n\\nreturn commons.stringSlice(stackString,pos+1);/* exclude the initial newline*/};\\n\\n\\n/** @type {LoggedErrorHandler} */\\nconst loggedErrorHandler={\\ngetStackString:commons.globalThis.getStackString||defaultGetStackString,\\ntagError:(error)=>tagError(error),\\nresetErrorTagNum:()=>{\\nerrorTagNum=0;},\\n\\ngetMessageLogArgs:(error)=>commons.weakmapGet(hiddenMessageLogArgs,error),\\ntakeMessageLogArgs:(error)=>{\\nconst result=commons.weakmapGet(hiddenMessageLogArgs,error);\\ncommons.weakmapDelete(hiddenMessageLogArgs,error);\\nreturn result;},\\n\\ntakeNoteLogArgsArray:(error,callback)=>{\\nconst result=takeLogArgsArray(error);\\nif(callback!==undefined){\\nconst callbacks=commons.weakmapGet(hiddenNoteCallbackArrays,error);\\nif(callbacks){\\ncommons.arrayPush(callbacks,callback);}else\\n{\\ncommons.weakmapSet(hiddenNoteCallbackArrays,error,[callback]);}}\\n\\n\\nreturn result||[];}};\\n\\n\\ncommons.freeze(loggedErrorHandler);\\n\\n\\n/* /////////////////////////////////////////////////////////////////////////////*/\\n\\n/**\\n * @type {MakeAssert}\\n */\\nconst makeAssert=(optRaise=undefined,unredacted=false)=>{\\nconst details=unredacted?unredactedDetails:redactedDetails;\\nconst assertFailedDetails=details`Check failed`;\\n\\n/** @type {AssertionFunctions['fail']} */\\nconst fail=(\\noptDetails=assertFailedDetails,\\nerrConstructor=undefined,\\noptions=undefined)=>\\n{\\nconst reason=makeError(optDetails,errConstructor,options);\\nif(optRaise!==undefined){\\n/* @ts-ignore returns `never` doesn't mean it isn't callable*/\\noptRaise(reason);}\\n\\nthrow reason;};\\n\\ncommons.freeze(fail);\\n\\n/** @type {AssertionUtilities['Fail']} */\\nconst Fail=(template,...args)=>fail(details(template,...args));\\n\\n/* Don't freeze or export `baseAssert` until we add methods.*/\\n/* TODO If I change this from a `function` function to an arrow*/\\n/* function, I seem to get type errors from TypeScript. Why?*/\\n/** @type {BaseAssert} */\\nfunction baseAssert(\\nflag,\\noptDetails=undefined,\\nerrConstructor=undefined,\\noptions=undefined)\\n{\\nflag||fail(optDetails,errConstructor,options);}\\n\\n\\n/** @type {AssertionFunctions['equal']} */\\nconst equal=(\\nactual,\\nexpected,\\noptDetails=undefined,\\nerrConstructor=undefined,\\noptions=undefined)=>\\n{\\ncommons.is(actual,expected)||\\nfail(\\noptDetails||details`Expected ${actual} is same as ${expected}`,\\nerrConstructor||commons.RangeError,\\noptions);};\\n\\n\\ncommons.freeze(equal);\\n\\n/** @type {AssertionFunctions['typeof']} */\\nconst assertTypeof=(specimen,typename,optDetails)=>{\\n/* This will safely fall through if typename is not a string,*/\\n/* which is what we want.*/\\n/* eslint-disable-next-line valid-typeof*/\\nif(typeof specimen===typename){\\nreturn;}\\n\\ntypeof typename==='string'||Fail`${quote(typename)} must be a string`;\\n\\nif(optDetails===undefined){\\n/* Embed the type phrase without quotes.*/\\nconst typeWithDeterminer=stringifyUtils.an(typename);\\noptDetails=details`${specimen} must be ${bare(typeWithDeterminer)}`;}\\n\\nfail(optDetails,commons.TypeError);};\\n\\ncommons.freeze(assertTypeof);\\n\\n/** @type {AssertionFunctions['string']} */\\nconst assertString=(specimen,optDetails=undefined)=>\\nassertTypeof(specimen,'string',optDetails);\\n\\n/* Note that \\\"assert === baseAssert\\\"*/\\n/** @type {Assert} */\\nconst assert=commons.assign(baseAssert,{\\nerror:makeError,\\nfail,\\nequal,\\ntypeof:assertTypeof,\\nstring:assertString,\\nnote,\\ndetails,\\nFail,\\nquote,\\nbare,\\nmakeAssert});\\n\\nreturn commons.freeze(assert);};\\n\\ncommons.freeze(makeAssert);\\n\\n\\n/** @type {Assert} */\\nconst assert=makeAssert();exports.assert=assert;exports.loggedErrorHandler=loggedErrorHandler;exports.makeAssert=makeAssert;exports.sanitizeError=sanitizeError;exports.unredactedDetails=unredactedDetails;\",\n \"node_modules/ses/src/error/console.js\": \"'use strict';Object.defineProperty(exports,'__esModule',{value:true});var commons=require('../commons.js');require('./types.js');\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\nrequire('./internal-types.js');/* @ts-check*/ /* For our internal debugging purposes, uncomment*/ /* const internalDebugConsole = console;*/ /* The whitelists of console methods, from:*/ /* Whatwg \\\"living standard\\\" https://console.spec.whatwg.org/*/ /* Node https://nodejs.org/dist/latest-v14.x/docs/api/console.html*/ /* MDN https://developer.mozilla.org/en-US/docs/Web/API/Console_API*/ /* TypeScript https://openstapps.gitlab.io/projectmanagement/interfaces/_node_modules__types_node_globals_d_.console.html*/ /* Chrome https://developers.google.com/web/tools/chrome-devtools/console/api*/ /* All console level methods have parameters (fmt?, ...args)*/ /* where the argument sequence `fmt?, ...args` formats args according to*/ /* fmt if fmt is a format string. Otherwise, it just renders them all as values*/ /* separated by spaces.*/ /* https://console.spec.whatwg.org/#formatter*/ /* https://nodejs.org/docs/latest/api/util.html#util_util_format_format_args*/ /* For the causal console, all occurrences of `fmt, ...args` or `...args` by*/ /* itself must check for the presence of an error to ask the*/ /* `loggedErrorHandler` to handle.*/ /* In theory we should do a deep inspection to detect for example an array*/ /* containing an error. We currently do not detect these and may never.*/ /** @typedef {keyof VirtualConsole | 'profile' | 'profileEnd'} ConsoleProps */ /**\\n * Those console methods whose actual parameters are `(fmt?, ...args)`\\n * even if their TypeScript types claim otherwise.\\n *\\n * Each is paired with what we consider to be their log severity level.\\n * This is the same as the log severity of these on other\\n * platform console implementations when they all agree.\\n *\\n * @type {readonly [ConsoleProps, LogSeverity | undefined][]}\\n */\\nconst consoleLevelMethods=commons.freeze([\\n['debug','debug'],/* (fmt?, ...args) verbose level on Chrome*/\\n['log','log'],/* (fmt?, ...args) info level on Chrome*/\\n['info','info'],/* (fmt?, ...args)*/\\n['warn','warn'],/* (fmt?, ...args)*/\\n['error','error'],/* (fmt?, ...args)*/\\n\\n['trace','log'],/* (fmt?, ...args)*/\\n['dirxml','log'],/* (fmt?, ...args) but TS typed (...data)*/\\n['group','log'],/* (fmt?, ...args) but TS typed (...label)*/\\n['groupCollapsed','log']/* (fmt?, ...args) but TS typed (...label)*/]);\\n\\n\\n/**\\n * Those console methods other than those already enumerated by\\n * `consoleLevelMethods`.\\n *\\n * Each is paired with what we consider to be their log severity level.\\n * This is the same as the log severity of these on other\\n * platform console implementations when they all agree.\\n *\\n * @type {readonly [ConsoleProps, LogSeverity | undefined][]}\\n */\\nconst consoleOtherMethods=commons.freeze([\\n['assert','error'],/* (value, fmt?, ...args)*/\\n['timeLog','log'],/* (label?, ...args) no fmt string*/\\n\\n/* Insensitive to whether any argument is an error. All arguments can pass*/\\n/* thru to baseConsole as is.*/\\n['clear',undefined],/* ()*/\\n['count','info'],/* (label?)*/\\n['countReset',undefined],/* (label?)*/\\n['dir','log'],/* (item, options?)*/\\n['groupEnd','log'],/* ()*/\\n/* In theory tabular data may be or contain an error. However, we currently*/\\n/* do not detect these and may never.*/\\n['table','log'],/* (tabularData, properties?)*/\\n['time','info'],/* (label?)*/\\n['timeEnd','info'],/* (label?)*/\\n\\n/* Node Inspector only, MDN, and TypeScript, but not whatwg*/\\n['profile',undefined],/* (label?)*/\\n['profileEnd',undefined],/* (label?)*/\\n['timeStamp',undefined]/* (label?)*/]);\\n\\n\\n/** @type {readonly [ConsoleProps, LogSeverity | undefined][]} */\\nconst consoleWhitelist=commons.freeze([\\n...consoleLevelMethods,\\n...consoleOtherMethods]);\\n\\n\\n/**\\n * consoleOmittedProperties is currently unused. I record and maintain it here\\n * with the intention that it be treated like the `false` entries in the main\\n * SES whitelist: that seeing these on the original console is expected, but\\n * seeing anything else that's outside the whitelist is surprising and should\\n * provide a diagnostic.\\n *\\n * const consoleOmittedProperties = freeze([\\n * 'memory', // Chrome\\n * 'exception', // FF, MDN\\n * '_ignoreErrors', // Node\\n * '_stderr', // Node\\n * '_stderrErrorHandler', // Node\\n * '_stdout', // Node\\n * '_stdoutErrorHandler', // Node\\n * '_times', // Node\\n * 'context', // Chrome, Node\\n * 'record', // Safari\\n * 'recordEnd', // Safari\\n *\\n * 'screenshot', // Safari\\n * // Symbols\\n * '@@toStringTag', // Chrome: \\\"Object\\\", Safari: \\\"Console\\\"\\n * // A variety of other symbols also seen on Node\\n * ]);\\n */\\n\\n/* //////////////////////////// Logging Console ////////////////////////////////*/\\n\\n/** @type {MakeLoggingConsoleKit} */\\nconst makeLoggingConsoleKit=(\\nloggedErrorHandler,\\n{shouldResetForDebugging=false}={})=>\\n{\\nif(shouldResetForDebugging){\\n/* eslint-disable-next-line @endo/no-polymorphic-call*/\\nloggedErrorHandler.resetErrorTagNum();}\\n\\n\\n/* Not frozen!*/\\nlet logArray=[];\\n\\nconst loggingConsole=commons.fromEntries(\\ncommons.arrayMap(consoleWhitelist,([name,_])=>{\\n/* Use an arrow function so that it doesn't come with its own name in*/\\n/* its printed form. Instead, we're hoping that tooling uses only*/\\n/* the `.name` property set below.*/\\n/**\\n * @param {...any} args\\n */\\nconst method=(...args)=>{\\ncommons.arrayPush(logArray,[name,...args]);};\\n\\ncommons.defineProperty(method,'name',{value:name});\\nreturn[name,commons.freeze(method)];}));\\n\\n\\ncommons.freeze(loggingConsole);\\n\\nconst takeLog=()=>{\\nconst result=commons.freeze(logArray);\\nlogArray=[];\\nreturn result;};\\n\\ncommons.freeze(takeLog);\\n\\nconst typedLoggingConsole=/** @type {VirtualConsole} */loggingConsole;\\n\\nreturn commons.freeze({loggingConsole:typedLoggingConsole,takeLog});};\\n\\ncommons.freeze(makeLoggingConsoleKit);\\n\\n/**\\n * Makes the same calls on a `baseConsole` that were made on a\\n * `loggingConsole` to produce this `log`. In this way, a logging console\\n * can be used as a buffer to delay the application of these calls to a\\n * `baseConsole`.\\n *\\n * @param {LogRecord[]} log\\n * @param {VirtualConsole} baseConsole\\n */\\nconst pumpLogToConsole=(log,baseConsole)=>{\\nfor(const[name,...args]of log){\\n/* eslint-disable-next-line @endo/no-polymorphic-call*/\\nbaseConsole[name](...args);}};\\n\\n\\n/* //////////////////////////// Causal Console /////////////////////////////////*/\\n\\n/** @type {ErrorInfo} */\\nconst ErrorInfo={\\nNOTE:'ERROR_NOTE:',\\nMESSAGE:'ERROR_MESSAGE:',\\nCAUSE:'cause:',\\nERRORS:'errors:'};\\n\\ncommons.freeze(ErrorInfo);\\n\\n/** @type {MakeCausalConsole} */\\nconst makeCausalConsole=(baseConsole,loggedErrorHandler)=>{\\nif(!baseConsole){\\nreturn undefined;}\\n\\n\\nconst{getStackString,tagError,takeMessageLogArgs,takeNoteLogArgsArray}=\\nloggedErrorHandler;\\n\\n/**\\n * @param {ReadonlyArray<any>} logArgs\\n * @param {Array<any>} subErrorsSink\\n * @returns {any}\\n */\\nconst extractErrorArgs=(logArgs,subErrorsSink)=>{\\nconst argTags=commons.arrayMap(logArgs,(arg)=>{\\nif(commons.isError(arg)){\\ncommons.arrayPush(subErrorsSink,arg);\\nreturn`(${tagError(arg)})`;}\\n\\nreturn arg;});\\n\\nreturn argTags;};\\n\\n\\n/**\\n * @param {LogSeverity} severity\\n * @param {Error} error\\n * @param {ErrorInfoKind} kind\\n * @param {readonly any[]} logArgs\\n * @param {Array<Error>} subErrorsSink\\n */\\nconst logErrorInfo=(severity,error,kind,logArgs,subErrorsSink)=>{\\nconst errorTag=tagError(error);\\nconst errorName=\\nkind===ErrorInfo.MESSAGE?`${errorTag}:`:`${errorTag} ${kind}`;\\nconst argTags=extractErrorArgs(logArgs,subErrorsSink);\\n/* eslint-disable-next-line @endo/no-polymorphic-call*/\\nbaseConsole[severity](errorName,...argTags);};\\n\\n\\n/**\\n * Logs the `subErrors` within a group name mentioning `optTag`.\\n *\\n * @param {LogSeverity} severity\\n * @param {Error[]} subErrors\\n * @param {string | undefined} optTag\\n * @returns {void}\\n */\\nconst logSubErrors=(severity,subErrors,optTag=undefined)=>{\\nif(subErrors.length===0){\\nreturn;}\\n\\nif(subErrors.length===1&&optTag===undefined){\\n/* eslint-disable-next-line no-use-before-define*/\\nlogError(severity,subErrors[0]);\\nreturn;}\\n\\nlet label;\\nif(subErrors.length===1){\\nlabel=`Nested error`;}else\\n{\\nlabel=`Nested ${subErrors.length} errors`;}\\n\\nif(optTag!==undefined){\\nlabel=`${label} under ${optTag}`;}\\n\\n/* eslint-disable-next-line @endo/no-polymorphic-call*/\\nbaseConsole.group(label);\\ntry{\\nfor(const subError of subErrors){\\n/* eslint-disable-next-line no-use-before-define*/\\nlogError(severity,subError);}}finally\\n\\n{\\n/* eslint-disable-next-line @endo/no-polymorphic-call*/\\nbaseConsole.groupEnd();}};\\n\\n\\n\\nconst errorsLogged=new commons.WeakSet();\\n\\n/** @type {(severity: LogSeverity) => NoteCallback} */\\nconst makeNoteCallback=(severity)=>(error,noteLogArgs)=>{\\nconst subErrors=[];\\n/* Annotation arrived after the error has already been logged,*/\\n/* so just log the annotation immediately, rather than remembering it.*/\\nlogErrorInfo(severity,error,ErrorInfo.NOTE,noteLogArgs,subErrors);\\nlogSubErrors(severity,subErrors,tagError(error));};\\n\\n\\n/**\\n * @param {LogSeverity} severity\\n * @param {Error} error\\n */\\nconst logError=(severity,error)=>{\\nif(commons.weaksetHas(errorsLogged,error)){\\nreturn;}\\n\\nconst errorTag=tagError(error);\\ncommons.weaksetAdd(errorsLogged,error);\\nconst subErrors=[];\\nconst messageLogArgs=takeMessageLogArgs(error);\\nconst noteLogArgsArray=takeNoteLogArgsArray(\\nerror,\\nmakeNoteCallback(severity));\\n\\n/* Show the error's most informative error message*/\\nif(messageLogArgs===undefined){\\n/* If there is no message log args, then just show the message that*/\\n/* the error itself carries.*/\\n/* eslint-disable-next-line @endo/no-polymorphic-call*/\\nbaseConsole[severity](`${errorTag}:`,error.message);}else\\n{\\n/* If there is one, we take it to be strictly more informative than the*/\\n/* message string carried by the error, so show it *instead*.*/\\nlogErrorInfo(\\nseverity,\\nerror,\\nErrorInfo.MESSAGE,\\nmessageLogArgs,\\nsubErrors);}\\n\\n\\n/* After the message but before any other annotations, show the stack.*/\\nlet stackString=getStackString(error);\\nif(\\ntypeof stackString==='string'&&\\nstackString.length>=1&&\\n!commons.stringEndsWith(stackString,'\\\\n'))\\n{\\nstackString+='\\\\n';}\\n\\n/* eslint-disable-next-line @endo/no-polymorphic-call*/\\nbaseConsole[severity](stackString);\\n/* Show the other annotations on error*/\\nif(error.cause){\\nlogErrorInfo(severity,error,ErrorInfo.CAUSE,[error.cause],subErrors);}\\n\\n/* @ts-expect-error AggregateError has an `errors` property.*/\\nif(error.errors){\\n/* @ts-expect-error AggregateError has an `errors` property.*/\\nlogErrorInfo(severity,error,ErrorInfo.ERRORS,error.errors,subErrors);}\\n\\nfor(const noteLogArgs of noteLogArgsArray){\\nlogErrorInfo(severity,error,ErrorInfo.NOTE,noteLogArgs,subErrors);}\\n\\n/* explain all the errors seen in the messages already emitted.*/\\nlogSubErrors(severity,subErrors,errorTag);};\\n\\n\\nconst levelMethods=commons.arrayMap(consoleLevelMethods,([level,_])=>{\\n/**\\n * @param {...any} logArgs\\n */\\nconst levelMethod=(...logArgs)=>{\\nconst subErrors=[];\\nconst argTags=extractErrorArgs(logArgs,subErrors);\\n/* eslint-disable-next-line @endo/no-polymorphic-call*/\\nbaseConsole[level](...argTags);\\n/* @ts-expect-error ConsoleProp vs LogSeverity mismatch*/\\nlogSubErrors(level,subErrors);};\\n\\ncommons.defineProperty(levelMethod,'name',{value:level});\\nreturn[level,commons.freeze(levelMethod)];});\\n\\nconst otherMethodNames=commons.arrayFilter(\\nconsoleOtherMethods,\\n([name,_])=>name in baseConsole);\\n\\nconst otherMethods=commons.arrayMap(otherMethodNames,([name,_])=>{\\n/**\\n * @param {...any} args\\n */\\nconst otherMethod=(...args)=>{\\n/* @ts-ignore*/\\n/* eslint-disable-next-line @endo/no-polymorphic-call*/\\nbaseConsole[name](...args);\\nreturn undefined;};\\n\\ncommons.defineProperty(otherMethod,'name',{value:name});\\nreturn[name,commons.freeze(otherMethod)];});\\n\\n\\nconst causalConsole=commons.fromEntries([...levelMethods,...otherMethods]);\\nreturn(/** @type {VirtualConsole} */commons.freeze(causalConsole));};\\n\\ncommons.freeze(makeCausalConsole);\\n\\n/**\\n * @typedef {(...args: unknown[]) => void} Logger\\n */\\n\\n/**\\n * This is a rather horrible kludge to indent the output to a logger in\\n * the case where some arguments are strings containing newlines. Part of\\n * the problem is that console-like loggers, including the one in ava,\\n * join the string arguments of the log message with a space.\\n * Because of this, there's an extra space at the beginning of each of\\n * the split lines. So this kludge compensated by putting an extra empty\\n * string at the beginning, so that the logger will add the same extra\\n * joiner.\\n * TODO: Fix this horrible kludge, and indent in a sane manner.\\n *\\n * @param {string} str\\n * @param {string} sep\\n * @param {string[]} indents\\n * @returns {string[]}\\n */\\nconst indentAfterAllSeps=(str,sep,indents)=>{\\nconst[firstLine,...restLines]=commons.stringSplit(str,sep);\\nconst indentedRest=commons.arrayFlatMap(restLines,(line)=>[sep,...indents,line]);\\nreturn['',firstLine,...indentedRest];};\\n\\n\\n/**\\n * @param {LoggedErrorHandler} loggedErrorHandler\\n */\\nconst defineCausalConsoleFromLogger=(loggedErrorHandler)=>{\\n/**\\n * Implement the `VirtualConsole` API badly by turning all calls into\\n * calls on `tlogger`. We need to do this to have `console` logging\\n * turn into calls to Ava's `t.log`, so these console log messages\\n * are output in the right place.\\n *\\n * @param {Logger} tlogger\\n * @returns {VirtualConsole}\\n */\\nconst makeCausalConsoleFromLogger=(tlogger)=>{\\nconst indents=[];\\nconst logWithIndent=(...args)=>{\\nif(indents.length>0){\\nargs=commons.arrayFlatMap(args,(arg)=>\\ntypeof arg==='string'&&commons.stringIncludes(arg,'\\\\n')?\\nindentAfterAllSeps(arg,'\\\\n',indents):\\n[arg]);\\n\\nargs=[...indents,...args];}\\n\\nreturn tlogger(...args);};\\n\\nconst makeNamed=(name,fn)=>\\n({[name]:(...args)=>fn(...args)})[name];\\n\\nconst baseConsole=commons.fromEntries([\\n...commons.arrayMap(consoleLevelMethods,([name])=>[\\nname,\\nmakeNamed(name,logWithIndent)]),\\n\\n...commons.arrayMap(consoleOtherMethods,([name])=>[\\nname,\\nmakeNamed(name,(...args)=>logWithIndent(name,...args))])]);\\n\\n\\n/* https://console.spec.whatwg.org/#grouping*/\\nfor(const name of['group','groupCollapsed']){\\nif(baseConsole[name]){\\nbaseConsole[name]=makeNamed(name,(...args)=>{\\nif(args.length>=1){\\n/* Prefix the logged data with \\\"group\\\" or \\\"groupCollapsed\\\".*/\\nlogWithIndent(...args);}\\n\\n/* A single space is enough;*/\\n/* the host console will separate them with additional spaces.*/\\ncommons.arrayPush(indents,' ');});}}\\n\\n\\n\\nif(baseConsole.groupEnd){\\nbaseConsole.groupEnd=makeNamed('groupEnd',(...args)=>{\\ncommons.arrayPop(indents);});}\\n\\n\\nharden(baseConsole);\\nconst causalConsole=makeCausalConsole(\\n/** @type {VirtualConsole} */baseConsole,\\nloggedErrorHandler);\\n\\nreturn(/** @type {VirtualConsole} */causalConsole);};\\n\\nreturn commons.freeze(makeCausalConsoleFromLogger);};\\n\\ncommons.freeze(defineCausalConsoleFromLogger);\\n\\n/* ///////////////////////// Filter Console ////////////////////////////////////*/\\n\\n/** @type {FilterConsole} */\\nconst filterConsole=(baseConsole,filter,_topic=undefined)=>{\\n/* TODO do something with optional topic string*/\\nconst whitelist=commons.arrayFilter(\\nconsoleWhitelist,\\n([name,_])=>name in baseConsole);\\n\\nconst methods=commons.arrayMap(whitelist,([name,severity])=>{\\n/**\\n * @param {...any} args\\n */\\nconst method=(...args)=>{\\n/* eslint-disable-next-line @endo/no-polymorphic-call*/\\nif(severity===undefined||filter.canLog(severity)){\\n/* @ts-ignore*/\\n/* eslint-disable-next-line @endo/no-polymorphic-call*/\\nbaseConsole[name](...args);}};\\n\\n\\nreturn[name,commons.freeze(method)];});\\n\\nconst filteringConsole=commons.fromEntries(methods);\\nreturn(/** @type {VirtualConsole} */commons.freeze(filteringConsole));};\\n\\ncommons.freeze(filterConsole);exports.consoleLevelMethods=consoleLevelMethods;exports.consoleOtherMethods=consoleOtherMethods;exports.defineCausalConsoleFromLogger=defineCausalConsoleFromLogger;exports.filterConsole=filterConsole;exports.makeCausalConsole=makeCausalConsole;exports.makeLoggingConsoleKit=makeLoggingConsoleKit;exports.pumpLogToConsole=pumpLogToConsole;\",\n \"node_modules/ses/src/error/internal-types.js\": \"\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n'use strict';/* @ts-check*/ /**\\n * @typedef {readonly any[]} LogArgs\\n *\\n * This is an array suitable to be used as arguments of a console\\n * level message *after* the format string argument. It is the result of\\n * a `details` template string and consists of alternating literal strings\\n * and substitution values, starting with a literal string. At least that\\n * first literal string is always present.\\n */ /**\\n * @callback NoteCallback\\n *\\n * @param {Error} error\\n * @param {LogArgs} noteLogArgs\\n * @returns {void}\\n */ /**\\n * @callback GetStackString\\n * @param {Error} error\\n * @returns {string=}\\n */ /**\\n * @typedef {object} LoggedErrorHandler\\n *\\n * Used to parameterize `makeCausalConsole` to give it access to potentially\\n * hidden information to augment the logging of errors.\\n *\\n * @property {GetStackString} getStackString\\n * @property {(error: Error) => string} tagError\\n * @property {() => void} resetErrorTagNum for debugging purposes only\\n * @property {(error: Error) => (LogArgs | undefined)} getMessageLogArgs\\n * @property {(error: Error) => (LogArgs | undefined)} takeMessageLogArgs\\n * @property {(error: Error, callback?: NoteCallback) => LogArgs[] } takeNoteLogArgsArray\\n */ /* /////////////////////////////////////////////////////////////////////////////*/ /**\\n * @typedef {readonly [string, ...any[]]} LogRecord\\n */ /**\\n * @typedef {object} LoggingConsoleKit\\n * @property {VirtualConsole} loggingConsole\\n * @property {() => readonly LogRecord[]} takeLog\\n */ /**\\n * @typedef {object} MakeLoggingConsoleKitOptions\\n * @property {boolean=} shouldResetForDebugging\\n */ /**\\n * @callback MakeLoggingConsoleKit\\n *\\n * A logging console just accumulates the contents of all whitelisted calls,\\n * making them available to callers of `takeLog()`. Calling `takeLog()`\\n * consumes these, so later calls to `takeLog()` will only provide a log of\\n * calls that have happened since then.\\n *\\n * @param {LoggedErrorHandler} loggedErrorHandler\\n * @param {MakeLoggingConsoleKitOptions=} options\\n * @returns {LoggingConsoleKit}\\n */ /**\\n * @typedef {{\\n * NOTE: 'ERROR_NOTE:',\\n * MESSAGE: 'ERROR_MESSAGE:',\\n * CAUSE: 'cause:',\\n * ERRORS: 'errors:',\\n * }} ErrorInfo\\n */ /**\\n * @typedef {ErrorInfo[keyof ErrorInfo]} ErrorInfoKind\\n */ /**\\n * @callback MakeCausalConsole\\n *\\n * Makes a causal console wrapper of a `baseConsole`, where the causal console\\n * calls methods of the `loggedErrorHandler` to customize how it handles logged\\n * errors.\\n *\\n * @param {VirtualConsole | undefined} baseConsole\\n * @param {LoggedErrorHandler} loggedErrorHandler\\n * @returns {VirtualConsole | undefined}\\n */\",\n \"node_modules/ses/src/error/note-log-args.js\": \"'use strict';Object.defineProperty(exports,'__esModule',{value:true});var makeLruCachemap=require('../make-lru-cachemap.js');require('./internal-types.js');/* @ts-check*/\\n\\n\\n\\n\\n\\n\\nconst{freeze}=Object;\\nconst{isSafeInteger}=Number;\\n\\nconst defaultLoggedErrorsBudget=1000;\\nconst defaultArgsPerErrorBudget=100;\\n\\n/**\\n * @param {number} [errorsBudget]\\n * @param {number} [argsPerErrorBudget]\\n */\\nconst makeNoteLogArgsArrayKit=(\\nerrorsBudget=defaultLoggedErrorsBudget,\\nargsPerErrorBudget=defaultArgsPerErrorBudget)=>\\n{\\nif(!isSafeInteger(argsPerErrorBudget)||argsPerErrorBudget<1){\\nthrow TypeError(\\n'argsPerErrorBudget must be a safe positive integer number');}\\n\\n\\n\\n/**\\n * @type {WeakMap<Error, LogArgs[]>}\\n *\\n * Maps from an error to an array of log args, where each log args is\\n * remembered as an annotation on that error. This can be used, for example,\\n * to keep track of additional causes of the error. The elements of any\\n * log args may include errors which are associated with further annotations.\\n * An augmented console, like the causal console of `console.js`, could\\n * then retrieve the graph of such annotations.\\n */\\nconst noteLogArgsArrayMap=makeLruCachemap.makeLRUCacheMap(errorsBudget);\\n\\n/**\\n * @param {Error} error\\n * @param {LogArgs} logArgs\\n */\\nconst addLogArgs=(error,logArgs)=>{\\nconst logArgsArray=noteLogArgsArrayMap.get(error);\\nif(logArgsArray!==undefined){\\nif(logArgsArray.length>=argsPerErrorBudget){\\nlogArgsArray.shift();}\\n\\nlogArgsArray.push(logArgs);}else\\n{\\nnoteLogArgsArrayMap.set(error,[logArgs]);}};\\n\\n\\nfreeze(addLogArgs);\\n\\n/**\\n * @param {Error} error\\n * @returns {LogArgs[] | undefined}\\n */\\nconst takeLogArgsArray=(error)=>{\\nconst result=noteLogArgsArrayMap.get(error);\\nnoteLogArgsArrayMap.delete(error);\\nreturn result;};\\n\\nfreeze(takeLogArgsArray);\\n\\nreturn freeze({\\naddLogArgs,\\ntakeLogArgsArray});};\\n\\n\\nfreeze(makeNoteLogArgsArrayKit);exports.makeNoteLogArgsArrayKit=makeNoteLogArgsArrayKit;\",\n \"node_modules/ses/src/error/stringify-utils.js\": \"'use strict';Object.defineProperty(exports,'__esModule',{value:true});var\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\ncommons=require('../commons.js');/* @ts-check*/ /** @import {StringablePayload} from '../../types.js' */ /**\\n * Joins English terms with commas and an optional conjunction.\\n *\\n * @param {(string | StringablePayload)[]} terms\\n * @param {\\\"and\\\" | \\\"or\\\"} conjunction\\n */\\nconst enJoin=(terms,conjunction)=>{\\nif(terms.length===0){\\nreturn'(none)';}else\\nif(terms.length===1){\\nreturn terms[0];}else\\nif(terms.length===2){\\nconst[first,second]=terms;\\nreturn`${first} ${conjunction} ${second}`;}else\\n{\\nreturn`${commons.arrayJoin(commons.arraySlice(terms,0,-1),', ')}, ${conjunction} ${\\nterms[terms.length-1]\\n}`;}};\\n\\n\\n\\n/**\\n * Prepend the correct indefinite article onto a noun, typically a typeof\\n * result, e.g., \\\"an object\\\" vs. \\\"a number\\\"\\n *\\n * @param {string} str The noun to prepend\\n * @returns {string} The noun prepended with a/an\\n */\\nconst an=(str)=>{\\nstr=`${str}`;\\nif(str.length>=1&&commons.stringIncludes('aeiouAEIOU',str[0])){\\nreturn`an ${str}`;}\\n\\nreturn`a ${str}`;};\\n\\ncommons.freeze(an);\\n\\n\\n/**\\n * Like `JSON.stringify` but does not blow up if given a cycle or a bigint.\\n * This is not\\n * intended to be a serialization to support any useful unserialization,\\n * or any programmatic use of the resulting string. The string is intended\\n * *only* for showing a human under benign conditions, in order to be\\n * informative enough for some\\n * logging purposes. As such, this `bestEffortStringify` has an\\n * imprecise specification and may change over time.\\n *\\n * The current `bestEffortStringify` possibly emits too many \\\"seen\\\"\\n * markings: Not only for cycles, but also for repeated subtrees by\\n * object identity.\\n *\\n * As a best effort only for diagnostic interpretation by humans,\\n * `bestEffortStringify` also turns various cases that normal\\n * `JSON.stringify` skips or errors on, like `undefined` or bigints,\\n * into strings that convey their meaning. To distinguish this from\\n * strings in the input, these synthesized strings always begin and\\n * end with square brackets. To distinguish those strings from an\\n * input string with square brackets, and input string that starts\\n * with an open square bracket `[` is itself placed in square brackets.\\n *\\n * @param {any} payload\\n * @param {(string|number)=} spaces\\n * @returns {string}\\n */\\nconst bestEffortStringify=(payload,spaces=undefined)=>{\\nconst seenSet=new commons.Set();\\nconst replacer=(_,val)=>{\\nswitch(typeof val){\\ncase'object':{\\nif(val===null){\\nreturn null;}\\n\\nif(commons.setHas(seenSet,val)){\\nreturn'[Seen]';}\\n\\ncommons.setAdd(seenSet,val);\\nif(commons.isError(val)){\\nreturn`[${val.name}: ${val.message}]`;}\\n\\nif(commons.toStringTagSymbol in val){\\n/* For the built-ins that have or inherit a `Symbol.toStringTag`-named*/\\n/* property, most of them inherit the default `toString` method,*/\\n/* which will print in a similar manner: `\\\"[object Foo]\\\"` vs*/\\n/* `\\\"[Foo]\\\"`. The exceptions are*/\\n/* * `Symbol.prototype`, `BigInt.prototype`, `String.prototype`*/\\n/* which don't matter to us since we handle primitives*/\\n/* separately and we don't care about primitive wrapper objects.*/\\n/* * TODO*/\\n/* `Date.prototype`, `TypedArray.prototype`.*/\\n/* Hmmm, we probably should make special cases for these. We're*/\\n/* not using these yet, so it's not urgent. But others will run*/\\n/* into these.*/\\n/**/\\n/* Once #2018 is closed, the only objects in our code that have or*/\\n/* inherit a `Symbol.toStringTag`-named property are remotables*/\\n/* or their remote presences.*/\\n/* This printing will do a good job for these without*/\\n/* violating abstraction layering. This behavior makes sense*/\\n/* purely in terms of JavaScript concepts. That's some of the*/\\n/* motivation for choosing that representation of remotables*/\\n/* and their remote presences in the first place.*/\\nreturn`[${val[commons.toStringTagSymbol]}]`;}\\n\\nif(commons.isArray(val)){\\nreturn val;}\\n\\nconst names=commons.keys(val);\\nif(names.length<2){\\nreturn val;}\\n\\nlet sorted=true;\\nfor(let i=1;i<names.length;i+=1){\\nif(names[i-1]>=names[i]){\\nsorted=false;\\nbreak;}}\\n\\n\\nif(sorted){\\nreturn val;}\\n\\ncommons.arraySort(names);\\nconst entries=commons.arrayMap(names,(name)=>[name,val[name]]);\\nreturn commons.fromEntries(entries);}\\n\\ncase'function':{\\nreturn`[Function ${val.name||'<anon>'}]`;}\\n\\ncase'string':{\\nif(commons.stringStartsWith(val,'[')){\\nreturn`[${val}]`;}\\n\\nreturn val;}\\n\\ncase'undefined':\\ncase'symbol':{\\nreturn`[${commons.String(val)}]`;}\\n\\ncase'bigint':{\\nreturn`[${val}n]`;}\\n\\ncase'number':{\\nif(commons.is(val,NaN)){\\nreturn'[NaN]';}else\\nif(val===Infinity){\\nreturn'[Infinity]';}else\\nif(val===-Infinity){\\nreturn'[-Infinity]';}\\n\\nreturn val;}\\n\\ndefault:{\\nreturn val;}}};\\n\\n\\n\\ntry{\\nreturn commons.stringifyJson(payload,replacer,spaces);}\\ncatch(_err){\\n/* Don't do anything more fancy here if there is any*/\\n/* chance that might throw, unless you surround that*/\\n/* with another try-catch-recovery. For example,*/\\n/* the caught thing might be a proxy or other exotic*/\\n/* object rather than an error. The proxy might throw*/\\n/* whenever it is possible for it to.*/\\nreturn'[Something that failed to stringify]';}};\\n\\n\\ncommons.freeze(bestEffortStringify);exports.an=an;exports.bestEffortStringify=bestEffortStringify;exports.enJoin=enJoin;\",\n \"node_modules/ses/src/error/tame-console.js\": \"'use strict';Object.defineProperty(exports,'__esModule',{value:true});var commons=require('../commons.js');var assert=require('./assert.js');var console=require('./console.js');var unhandledRejection=require('./unhandled-rejection.js');require('./types.js');require('./internal-types.js');/* @ts-check*/\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\nconst failFast=(message)=>{\\nthrow commons.TypeError(message);};\\n\\n\\nconst wrapLogger=(logger,thisArg)=>\\ncommons.freeze((...args)=>commons.apply(logger,thisArg,args));\\n\\n/**\\n * Wrap console unless suppressed.\\n * At the moment, the console is considered a host power in the start\\n * compartment, and not a primordial. Hence it is absent from the whilelist\\n * and bypasses the intrinsicsCollector.\\n *\\n * @param {\\\"safe\\\" | \\\"unsafe\\\"} consoleTaming\\n * @param {\\\"platform\\\" | \\\"exit\\\" | \\\"abort\\\" | \\\"report\\\" | \\\"none\\\"} [errorTrapping]\\n * @param {\\\"report\\\" | \\\"none\\\"} [unhandledRejectionTrapping]\\n * @param {GetStackString=} optGetStackString\\n */\\nconst tameConsole=(\\nconsoleTaming='safe',\\nerrorTrapping='platform',\\nunhandledRejectionTrapping='report',\\noptGetStackString=undefined)=>\\n{\\nconsoleTaming==='safe'||\\nconsoleTaming==='unsafe'||\\nfailFast(`unrecognized consoleTaming ${consoleTaming}`);\\n\\nlet loggedErrorHandler;\\nif(optGetStackString===undefined){\\nloggedErrorHandler=assert.loggedErrorHandler;}else\\n{\\nloggedErrorHandler={\\n...assert.loggedErrorHandler,\\ngetStackString:optGetStackString};}\\n\\n\\n\\n/* eslint-disable-next-line no-restricted-globals*/\\nconst originalConsole=/** @type {VirtualConsole} */\\n/* eslint-disable-next-line no-nested-ternary*/\\ntypeof commons.globalThis.console!=='undefined'?\\ncommons.globalThis.console:\\ntypeof commons.globalThis.print==='function'?\\n/* Make a good-enough console for eshost (including only functions that*/\\n/* log at a specific level with no special argument interpretation).*/\\n/* https://console.spec.whatwg.org/#logging*/\\n((p)=>commons.freeze({debug:p,log:p,info:p,warn:p,error:p}))(\\n/* eslint-disable-next-line no-undef*/\\nwrapLogger(commons.globalThis.print)):\\n\\nundefined;\\n\\n\\n/* Upgrade a log-only console (as in `eshost -h SpiderMonkey`).*/\\nif(originalConsole&&originalConsole.log){\\nfor(const methodName of['warn','error']){\\nif(!originalConsole[methodName]){\\ncommons.defineProperty(originalConsole,methodName,{\\nvalue:wrapLogger(originalConsole.log,originalConsole)});}}}\\n\\n\\n\\n\\n\\nconst ourConsole=/** @type {VirtualConsole} */\\nconsoleTaming==='unsafe'?\\noriginalConsole:\\nconsole.makeCausalConsole(originalConsole,loggedErrorHandler);\\n\\n\\n/* Attach platform-specific error traps such that any error that gets thrown*/\\n/* at top-of-turn (the bottom of stack) will get logged by our causal*/\\n/* console, revealing the diagnostic information associated with the error,*/\\n/* including the stack from when the error was created.*/\\n\\n/* In the following Node.js and web browser cases, `process` and `window` are*/\\n/* spelled as `globalThis` properties to avoid the overweaning gaze of*/\\n/* Parcel, which dutifully installs an unnecessary `process` shim if we ever*/\\n/* utter that. That unnecessary shim forces the whole bundle into sloppy mode,*/\\n/* which in turn breaks SES's strict mode invariant.*/\\n\\n/* Disable the polymorphic check for the rest of this file. It's too noisy*/\\n/* when dealing with platform APIs.*/\\n/* eslint-disable @endo/no-polymorphic-call */\\n\\n/* Node.js*/\\nconst globalProcess=commons.globalThis.process||undefined;\\nif(\\nerrorTrapping!=='none'&&\\ntypeof globalProcess==='object'&&\\ntypeof globalProcess.on==='function')\\n{\\nlet terminate;\\nif(errorTrapping==='platform'||errorTrapping==='exit'){\\nconst{exit}=globalProcess;\\n/* If there is a function-valued process.on but no function-valued process.exit,*/\\n/* fail early without caring whether errorTrapping is \\\"platform\\\" only by default.*/\\ntypeof exit==='function'||failFast('missing process.exit');\\nterminate=()=>exit(globalProcess.exitCode||-1);}else\\nif(errorTrapping==='abort'){\\nterminate=globalProcess.abort;\\ntypeof terminate==='function'||failFast('missing process.abort');}\\n\\n\\nglobalProcess.on('uncaughtException',(error)=>{\\n/* causalConsole is born frozen so not vulnerable to method tampering.*/\\nourConsole.error(error);\\nif(terminate){\\nterminate();}});}\\n\\n\\n\\nif(\\nunhandledRejectionTrapping!=='none'&&\\ntypeof globalProcess==='object'&&\\ntypeof globalProcess.on==='function')\\n{\\nconst handleRejection=(reason)=>{\\n/* 'platform' and 'report' just log the reason.*/\\nourConsole.error('SES_UNHANDLED_REJECTION:',reason);};\\n\\n/* Maybe track unhandled promise rejections.*/\\nconst h=unhandledRejection.makeRejectionHandlers(handleRejection);\\nif(h){\\n/* Rejection handlers are supported.*/\\nglobalProcess.on('unhandledRejection',h.unhandledRejectionHandler);\\nglobalProcess.on('rejectionHandled',h.rejectionHandledHandler);\\nglobalProcess.on('exit',h.processTerminationHandler);}}\\n\\n\\n\\n/* Browser*/\\nconst globalWindow=commons.globalThis.window||undefined;\\nif(\\nerrorTrapping!=='none'&&\\ntypeof globalWindow==='object'&&\\ntypeof globalWindow.addEventListener==='function')\\n{\\nglobalWindow.addEventListener('error',(event)=>{\\nevent.preventDefault();\\n/* 'platform' and 'report' just log the reason.*/\\nourConsole.error(event.error);\\nif(errorTrapping==='exit'||errorTrapping==='abort'){\\nglobalWindow.location.href=`about:blank`;}});}\\n\\n\\n\\nif(\\nunhandledRejectionTrapping!=='none'&&\\ntypeof globalWindow==='object'&&\\ntypeof globalWindow.addEventListener==='function')\\n{\\nconst handleRejection=(reason)=>{\\nourConsole.error('SES_UNHANDLED_REJECTION:',reason);};\\n\\n\\nconst h=unhandledRejection.makeRejectionHandlers(handleRejection);\\nif(h){\\n/* Rejection handlers are supported.*/\\nglobalWindow.addEventListener('unhandledrejection',(event)=>{\\nevent.preventDefault();\\nh.unhandledRejectionHandler(event.reason,event.promise);});\\n\\n\\nglobalWindow.addEventListener('rejectionhandled',(event)=>{\\nevent.preventDefault();\\nh.rejectionHandledHandler(event.promise);});\\n\\n\\nglobalWindow.addEventListener('beforeunload',(_event)=>{\\nh.processTerminationHandler();});}}\\n\\n\\n\\n/* eslint-enable @endo/no-polymorphic-call */\\n\\nreturn{console:ourConsole};};exports.tameConsole=tameConsole;\",\n \"node_modules/ses/src/error/tame-error-constructor.js\": \"'use strict';Object.defineProperty(exports,'__esModule',{value:true});var commons=require('../commons.js');var permits=require('../permits.js');var\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\ntameV8ErrorConstructor=require('./tame-v8-error-constructor.js');/* Present on at least FF and XS. Proposed by Error-proposal. The original*/ /* is dangerous, so tameErrorConstructor replaces it with a safe one.*/ /* We grab the original here before it gets replaced.*/\\nconst stackDesc=commons.getOwnPropertyDescriptor(commons.FERAL_ERROR.prototype,'stack');\\nconst stackGetter=stackDesc&&stackDesc.get;\\n\\n/* Use concise methods to obtain named functions without constructors.*/\\nconst tamedMethods={\\ngetStackString(error){\\nif(typeof stackGetter==='function'){\\nreturn commons.apply(stackGetter,error,[]);}else\\nif('stack'in error){\\n/* The fallback is to just use the de facto `error.stack` if present*/\\nreturn`${error.stack}`;}\\n\\nreturn'';}};\\n\\n\\n\\nfunction tameErrorConstructor(\\nerrorTaming='safe',\\nstackFiltering='concise')\\n{\\nif(errorTaming!=='safe'&&errorTaming!=='unsafe'){\\nthrow commons.TypeError(`unrecognized errorTaming ${errorTaming}`);}\\n\\nif(stackFiltering!=='concise'&&stackFiltering!=='verbose'){\\nthrow commons.TypeError(`unrecognized stackFiltering ${stackFiltering}`);}\\n\\nconst ErrorPrototype=commons.FERAL_ERROR.prototype;\\n\\nconst platform=\\ntypeof commons.FERAL_ERROR.captureStackTrace==='function'?'v8':'unknown';\\nconst{captureStackTrace:originalCaptureStackTrace}=commons.FERAL_ERROR;\\n\\nconst makeErrorConstructor=(_={})=>{\\n/* eslint-disable-next-line no-shadow*/\\nconst ResultError=function Error(...rest){\\nlet error;\\nif(new.target===undefined){\\nerror=commons.apply(commons.FERAL_ERROR,this,rest);}else\\n{\\nerror=commons.construct(commons.FERAL_ERROR,rest,new.target);}\\n\\nif(platform==='v8'){\\n/* TODO Likely expensive!*/\\ncommons.apply(originalCaptureStackTrace,commons.FERAL_ERROR,[error,ResultError]);}\\n\\nreturn error;};\\n\\ncommons.defineProperties(ResultError,{\\nlength:{value:1},\\nprototype:{\\nvalue:ErrorPrototype,\\nwritable:false,\\nenumerable:false,\\nconfigurable:false}});\\n\\n\\nreturn ResultError;};\\n\\nconst InitialError=makeErrorConstructor({powers:'original'});\\nconst SharedError=makeErrorConstructor({powers:'none'});\\ncommons.defineProperties(ErrorPrototype,{\\nconstructor:{value:SharedError}});\\n\\n\\nfor(const NativeError of permits.NativeErrors){\\ncommons.setPrototypeOf(NativeError,SharedError);}\\n\\n\\n/* https://v8.dev/docs/stack-trace-api#compatibility advises that*/\\n/* programmers can \\\"always\\\" set `Error.stackTraceLimit`*/\\n/* even on non-v8 platforms. On non-v8*/\\n/* it will have no effect, but this advice only makes sense*/\\n/* if the assignment itself does not fail, which it would*/\\n/* if `Error` were naively frozen. Hence, we add setters that*/\\n/* accept but ignore the assignment on non-v8 platforms.*/\\ncommons.defineProperties(InitialError,{\\nstackTraceLimit:{\\nget(){\\nif(typeof commons.FERAL_ERROR.stackTraceLimit==='number'){\\n/* FERAL_ERROR.stackTraceLimit is only on v8*/\\nreturn commons.FERAL_ERROR.stackTraceLimit;}\\n\\nreturn undefined;},\\n\\nset(newLimit){\\nif(typeof newLimit!=='number'){\\n/* silently do nothing. This behavior doesn't precisely*/\\n/* emulate v8 edge-case behavior. But given the purpose*/\\n/* of this emulation, having edge cases err towards*/\\n/* harmless seems the safer option.*/\\nreturn;}\\n\\nif(typeof commons.FERAL_ERROR.stackTraceLimit==='number'){\\n/* FERAL_ERROR.stackTraceLimit is only on v8*/\\ncommons.FERAL_ERROR.stackTraceLimit=newLimit;\\n/* We place the useless return on the next line to ensure*/\\n/* that anything we place after the if in the future only*/\\n/* happens if the then-case does not.*/\\n/* eslint-disable-next-line no-useless-return*/\\nreturn;}},\\n\\n\\n/* WTF on v8 stackTraceLimit is enumerable*/\\nenumerable:false,\\nconfigurable:true}});\\n\\n\\n\\n/* The default SharedError much be completely powerless even on v8,*/\\n/* so the lenient `stackTraceLimit` accessor does nothing on all*/\\n/* platforms.*/\\ncommons.defineProperties(SharedError,{\\nstackTraceLimit:{\\nget(){\\nreturn undefined;},\\n\\nset(_newLimit){\\n/* do nothing*/},\\n\\nenumerable:false,\\nconfigurable:true}});\\n\\n\\n\\nif(platform==='v8'){\\n/* `SharedError.prepareStackTrace`, if it exists, must also be*/\\n/* powerless. However, from what we've heard, depd expects to be able to*/\\n/* assign to it without the assignment throwing. It is normally a function*/\\n/* that returns a stack string to be magically added to error objects.*/\\n/* However, as long as we're adding a lenient standin, we may as well*/\\n/* accommodate any who expect to get a function they can call and get*/\\n/* a string back. This prepareStackTrace is a do-nothing function that*/\\n/* always returns the empty string.*/\\ncommons.defineProperties(SharedError,{\\nprepareStackTrace:{\\nget(){\\nreturn()=>'';},\\n\\nset(_prepareFn){\\n/* do nothing*/},\\n\\nenumerable:false,\\nconfigurable:true},\\n\\ncaptureStackTrace:{\\nvalue:(errorish,_constructorOpt)=>{\\ncommons.defineProperty(errorish,'stack',{\\nvalue:''});},\\n\\n\\nwritable:false,\\nenumerable:false,\\nconfigurable:true}});}\\n\\n\\n\\n\\nlet initialGetStackString=tamedMethods.getStackString;\\nif(platform==='v8'){\\ninitialGetStackString=tameV8ErrorConstructor.tameV8ErrorConstructor(\\ncommons.FERAL_ERROR,\\nInitialError,\\nerrorTaming,\\nstackFiltering);}else\\n\\nif(errorTaming==='unsafe'){\\n/* v8 has too much magic around their 'stack' own property for it to*/\\n/* coexist cleanly with this accessor. So only install it on non-v8*/\\n\\n/* Error.prototype.stack property as proposed at*/\\n/* https://tc39.es/proposal-error-stacks/*/\\n/* with the fix proposed at*/\\n/* https://github.com/tc39/proposal-error-stacks/issues/46*/\\n/* On others, this still protects from the override mistake,*/\\n/* essentially like enable-property-overrides.js would*/\\n/* once this accessor property itself is frozen, as will happen*/\\n/* later during lockdown.*/\\n/**/\\n/* However, there is here a change from the intent in the current*/\\n/* state of the proposal. If experience tells us whether this change*/\\n/* is a good idea, we should modify the proposal accordingly. There is*/\\n/* much code in the world that assumes `error.stack` is a string. So*/\\n/* where the proposal accommodates secure operation by making the*/\\n/* property optional, we instead accommodate secure operation by*/\\n/* having the secure form always return only the stable part, the*/\\n/* stringified error instance, and omitting all the frame information*/\\n/* rather than omitting the property.*/\\ncommons.defineProperties(ErrorPrototype,{\\nstack:{\\nget(){\\nreturn initialGetStackString(this);},\\n\\nset(newValue){\\ncommons.defineProperties(this,{\\nstack:{\\nvalue:newValue,\\nwritable:true,\\nenumerable:true,\\nconfigurable:true}});}}});}else\\n\\n\\n\\n\\n\\n{\\n/* v8 has too much magic around their 'stack' own property for it to*/\\n/* coexist cleanly with this accessor. So only install it on non-v8*/\\ncommons.defineProperties(ErrorPrototype,{\\nstack:{\\nget(){\\n/* https://github.com/tc39/proposal-error-stacks/issues/46*/\\n/* allows this to not add an unpleasant newline. Otherwise*/\\n/* we should fix this.*/\\nreturn`${this}`;},\\n\\nset(newValue){\\ncommons.defineProperties(this,{\\nstack:{\\nvalue:newValue,\\nwritable:true,\\nenumerable:true,\\nconfigurable:true}});}}});}\\n\\n\\n\\n\\n\\n\\n\\nreturn{\\n'%InitialGetStackString%':initialGetStackString,\\n'%InitialError%':InitialError,\\n'%SharedError%':SharedError};}exports[\\\"default\\\"]=tameErrorConstructor;\",\n \"node_modules/ses/src/error/tame-v8-error-constructor.js\": \"'use strict';Object.defineProperty(exports,'__esModule',{value:true});var\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\ncommons=require('../commons.js');/* Whitelist names from https://v8.dev/docs/stack-trace-api*/ /* Whitelisting only the names used by error-stack-shim/src/v8StackFrames*/ /* callSiteToFrame to shim the error stack proposal.*/\\nconst safeV8CallSiteMethodNames=[\\n/* suppress 'getThis' definitely*/\\n'getTypeName',\\n/* suppress 'getFunction' definitely*/\\n'getFunctionName',\\n'getMethodName',\\n'getFileName',\\n'getLineNumber',\\n'getColumnNumber',\\n'getEvalOrigin',\\n'isToplevel',\\n'isEval',\\n'isNative',\\n'isConstructor',\\n'isAsync',\\n/* suppress 'isPromiseAll' for now*/\\n/* suppress 'getPromiseIndex' for now*/\\n\\n/* Additional names found by experiment, absent from*/\\n/* https://v8.dev/docs/stack-trace-api*/\\n'getPosition',\\n'getScriptNameOrSourceURL',\\n\\n'toString'/* TODO replace to use only whitelisted info*/];\\n\\n\\n/* TODO this is a ridiculously expensive way to attenuate callsites.*/\\n/* Before that matters, we should switch to a reasonable representation.*/\\nconst safeV8CallSiteFacet=(callSite)=>{\\nconst methodEntry=(name)=>{\\nconst method=callSite[name];\\nreturn[name,()=>commons.apply(method,callSite,[])];};\\n\\nconst o=commons.fromEntries(commons.arrayMap(safeV8CallSiteMethodNames,methodEntry));\\nreturn commons.create(o,{});};\\n\\n\\nconst safeV8SST=(sst)=>commons.arrayMap(sst,safeV8CallSiteFacet);\\n\\n/* If it has `/node_modules/` anywhere in it, on Node it is likely*/\\n/* to be a dependent package of the current package, and so to*/\\n/* be an infrastructure frame to be dropped from concise stack traces.*/\\nconst FILENAME_NODE_DEPENDENTS_CENSOR=/\\\\/node_modules\\\\//;\\n\\n/* If it begins with `internal/` or `node:internal` then it is likely*/\\n/* part of the node infrustructre itself, to be dropped from concise*/\\n/* stack traces.*/\\nconst FILENAME_NODE_INTERNALS_CENSOR=/^(?:node:)?internal\\\\//;\\n\\n/* Frames within the `assert.js` package should be dropped from*/\\n/* concise stack traces, as these are just steps towards creating the*/\\n/* error object in question.*/\\nconst FILENAME_ASSERT_CENSOR=/\\\\/packages\\\\/ses\\\\/src\\\\/error\\\\/assert.js$/;\\n\\n/* Frames within the `eventual-send` shim should be dropped so that concise*/\\n/* deep stacks omit the internals of the eventual-sending mechanism causing*/\\n/* asynchronous messages to be sent.*/\\n/* Note that the eventual-send package will move from agoric-sdk to*/\\n/* Endo, so this rule will be of general interest.*/\\nconst FILENAME_EVENTUAL_SEND_CENSOR=/\\\\/packages\\\\/eventual-send\\\\/src\\\\//;\\n\\n/* Any stack frame whose `fileName` matches any of these censor patterns*/\\n/* will be omitted from concise stacks.*/\\n/* TODO Enable users to configure FILENAME_CENSORS via `lockdown` options.*/\\nconst FILENAME_CENSORS=[\\nFILENAME_NODE_DEPENDENTS_CENSOR,\\nFILENAME_NODE_INTERNALS_CENSOR,\\nFILENAME_ASSERT_CENSOR,\\nFILENAME_EVENTUAL_SEND_CENSOR];\\n\\n\\n/* Should a stack frame with this as its fileName be included in a concise*/\\n/* stack trace?*/\\n/* Exported only so it can be unit tested.*/\\n/* TODO Move so that it applies not just to v8.*/\\nconst filterFileName=(fileName)=>{\\nif(!fileName){\\n/* Stack frames with no fileName should appear in concise stack traces.*/\\nreturn true;}\\n\\nfor(const filter of FILENAME_CENSORS){\\nif(commons.regexpTest(filter,fileName)){\\nreturn false;}}\\n\\n\\nreturn true;};\\n\\n\\n/* The ad-hoc rule of the current pattern is that any likely-file-path or*/\\n/* likely url-path prefix, ending in a `/.../` should get dropped.*/\\n/* Anything to the left of the likely path text is kept.*/\\n/* Everything to the right of `/.../` is kept. Thus*/\\n/* `'Object.bar (/vat-v1/.../eventual-send/test/test-deep-send.js:13:21)'`*/\\n/* simplifies to*/\\n/* `'Object.bar (eventual-send/test/test-deep-send.js:13:21)'`.*/\\n/**/\\n/* See thread starting at*/\\n/* https://github.com/Agoric/agoric-sdk/issues/2326#issuecomment-773020389*/\\nconst CALLSITE_ELLIPSES_PATTERN=/^((?:.*[( ])?)[:/\\\\w_-]*\\\\/\\\\.\\\\.\\\\.\\\\/(.+)$/;\\n\\n/* The ad-hoc rule of the current pattern is that any likely-file-path or*/\\n/* likely url-path prefix, ending in a `/` and prior to `package/` should get*/\\n/* dropped.*/\\n/* Anything to the left of the likely path prefix text is kept. `package/` and*/\\n/* everything to its right is kept. Thus*/\\n/* `'Object.bar (/Users/markmiller/src/ongithub/agoric/agoric-sdk/packages/eventual-send/test/test-deep-send.js:13:21)'`*/\\n/* simplifies to*/\\n/* `'Object.bar (packages/eventual-send/test/test-deep-send.js:13:21)'`.*/\\n/* Note that `/packages/` is a convention for monorepos encouraged by*/\\n/* lerna.*/\\nconst CALLSITE_PACKAGES_PATTERN=/^((?:.*[( ])?)[:/\\\\w_-]*\\\\/(packages\\\\/.+)$/;\\n\\n/* The use of these callSite patterns below assumes that any match will bind*/\\n/* capture groups containing the parts of the original string we want*/\\n/* to keep. The parts outside those capture groups will be dropped from concise*/\\n/* stacks.*/\\n/* TODO Enable users to configure CALLSITE_PATTERNS via `lockdown` options.*/\\nconst CALLSITE_PATTERNS=[\\nCALLSITE_ELLIPSES_PATTERN,\\nCALLSITE_PACKAGES_PATTERN];\\n\\n\\n/* For a stack frame that should be included in a concise stack trace, if*/\\n/* `callSiteString` is the original stringified stack frame, return the*/\\n/* possibly-shorter stringified stack frame that should be shown instead.*/\\n/* Exported only so it can be unit tested.*/\\n/* TODO Move so that it applies not just to v8.*/\\nconst shortenCallSiteString=(callSiteString)=>{\\nfor(const filter of CALLSITE_PATTERNS){\\nconst match=commons.regexpExec(filter,callSiteString);\\nif(match){\\nreturn commons.arrayJoin(commons.arraySlice(match,1),'');}}\\n\\n\\nreturn callSiteString;};\\n\\n\\nconst tameV8ErrorConstructor=(\\nOriginalError,\\nInitialError,\\nerrorTaming,\\nstackFiltering)=>\\n{\\n/* TODO: Proper CallSite types*/\\n/** @typedef {{}} CallSite */\\n\\nconst originalCaptureStackTrace=OriginalError.captureStackTrace;\\n\\n/* const callSiteFilter = _callSite => true;*/\\nconst callSiteFilter=(callSite)=>{\\nif(stackFiltering==='verbose'){\\nreturn true;}\\n\\n/* eslint-disable-next-line @endo/no-polymorphic-call*/\\nreturn filterFileName(callSite.getFileName());};\\n\\n\\nconst callSiteStringifier=(callSite)=>{\\nlet callSiteString=`${callSite}`;\\nif(stackFiltering==='concise'){\\ncallSiteString=shortenCallSiteString(callSiteString);}\\n\\nreturn`\\\\n at ${callSiteString}`;};\\n\\n\\nconst stackStringFromSST=(_error,sst)=>\\ncommons.arrayJoin(\\ncommons.arrayMap(commons.arrayFilter(sst,callSiteFilter),callSiteStringifier),\\n'');\\n\\n\\n/**\\n * @typedef {object} StructuredStackInfo\\n * @property {CallSite[]} callSites\\n * @property {undefined} [stackString]\\n */\\n\\n/**\\n * @typedef {object} ParsedStackInfo\\n * @property {undefined} [callSites]\\n * @property {string} stackString\\n */\\n\\n/* Mapping from error instance to the stack for that instance.*/\\n/* The stack info is either the structured stack trace*/\\n/* or the generated tamed stack string*/\\n/** @type {WeakMap<Error, ParsedStackInfo | StructuredStackInfo>} */\\nconst stackInfos=new commons.WeakMap();\\n\\n/* Use concise methods to obtain named functions without constructors.*/\\nconst tamedMethods={\\n/* The optional `optFn` argument is for cutting off the bottom of*/\\n/* the stack --- for capturing the stack only above the topmost*/\\n/* call to that function. Since this isn't the \\\"real\\\" captureStackTrace*/\\n/* but instead calls the real one, if no other cutoff is provided,*/\\n/* we cut this one off.*/\\ncaptureStackTrace(error,optFn=tamedMethods.captureStackTrace){\\nif(typeof originalCaptureStackTrace==='function'){\\n/* OriginalError.captureStackTrace is only on v8*/\\ncommons.apply(originalCaptureStackTrace,OriginalError,[error,optFn]);\\nreturn;}\\n\\ncommons.reflectSet(error,'stack','');},\\n\\n/* Shim of proposed special power, to reside by default only*/\\n/* in the start compartment, for getting the stack traceback*/\\n/* string associated with an error.*/\\n/* See https://tc39.es/proposal-error-stacks/*/\\ngetStackString(error){\\nlet stackInfo=commons.weakmapGet(stackInfos,error);\\n\\nif(stackInfo===undefined){\\n/* The following will call `prepareStackTrace()` synchronously*/\\n/* which will populate stackInfos*/\\n/* eslint-disable-next-line no-void*/\\nvoid error.stack;\\nstackInfo=commons.weakmapGet(stackInfos,error);\\nif(!stackInfo){\\nstackInfo={stackString:''};\\ncommons.weakmapSet(stackInfos,error,stackInfo);}}\\n\\n\\n\\n/* prepareStackTrace() may generate the stackString*/\\n/* if errorTaming === 'unsafe'*/\\n\\nif(stackInfo.stackString!==undefined){\\nreturn stackInfo.stackString;}\\n\\n\\nconst stackString=stackStringFromSST(error,stackInfo.callSites);\\ncommons.weakmapSet(stackInfos,error,{stackString});\\n\\nreturn stackString;},\\n\\nprepareStackTrace(error,sst){\\nif(errorTaming==='unsafe'){\\nconst stackString=stackStringFromSST(error,sst);\\ncommons.weakmapSet(stackInfos,error,{stackString});\\nreturn`${error}${stackString}`;}else\\n{\\ncommons.weakmapSet(stackInfos,error,{callSites:sst});\\nreturn'';}}};\\n\\n\\n\\n\\n/* A prepareFn is a prepareStackTrace function.*/\\n/* An sst is a `structuredStackTrace`, which is an array of*/\\n/* callsites.*/\\n/* A user prepareFn is a prepareFn defined by a client of this API,*/\\n/* and provided by assigning to `Error.prepareStackTrace`.*/\\n/* A user prepareFn should only receive an attenuated sst, which*/\\n/* is an array of attenuated callsites.*/\\n/* A system prepareFn is the prepareFn created by this module to*/\\n/* be installed on the real `Error` constructor, to receive*/\\n/* an original sst, i.e., an array of unattenuated callsites.*/\\n/* An input prepareFn is a function the user assigns to*/\\n/* `Error.prepareStackTrace`, which might be a user prepareFn or*/\\n/* a system prepareFn previously obtained by reading*/\\n/* `Error.prepareStackTrace`.*/\\n\\nconst defaultPrepareFn=tamedMethods.prepareStackTrace;\\n\\nOriginalError.prepareStackTrace=defaultPrepareFn;\\n\\n/* A weakset branding some functions as system prepareFns, all of which*/\\n/* must be defined by this module, since they can receive an*/\\n/* unattenuated sst.*/\\nconst systemPrepareFnSet=new commons.WeakSet([defaultPrepareFn]);\\n\\nconst systemPrepareFnFor=(inputPrepareFn)=>{\\nif(commons.weaksetHas(systemPrepareFnSet,inputPrepareFn)){\\nreturn inputPrepareFn;}\\n\\n/* Use concise methods to obtain named functions without constructors.*/\\nconst systemMethods={\\nprepareStackTrace(error,sst){\\ncommons.weakmapSet(stackInfos,error,{callSites:sst});\\nreturn inputPrepareFn(error,safeV8SST(sst));}};\\n\\n\\ncommons.weaksetAdd(systemPrepareFnSet,systemMethods.prepareStackTrace);\\nreturn systemMethods.prepareStackTrace;};\\n\\n\\n/* Note `stackTraceLimit` accessor already defined by*/\\n/* tame-error-constructor.js*/\\ncommons.defineProperties(InitialError,{\\ncaptureStackTrace:{\\nvalue:tamedMethods.captureStackTrace,\\nwritable:true,\\nenumerable:false,\\nconfigurable:true},\\n\\nprepareStackTrace:{\\nget(){\\nreturn OriginalError.prepareStackTrace;},\\n\\nset(inputPrepareStackTraceFn){\\nif(typeof inputPrepareStackTraceFn==='function'){\\nconst systemPrepareFn=systemPrepareFnFor(inputPrepareStackTraceFn);\\nOriginalError.prepareStackTrace=systemPrepareFn;}else\\n{\\nOriginalError.prepareStackTrace=defaultPrepareFn;}},\\n\\n\\nenumerable:false,\\nconfigurable:true}});\\n\\n\\n\\nreturn tamedMethods.getStackString;};exports.filterFileName=filterFileName;exports.shortenCallSiteString=shortenCallSiteString;exports.tameV8ErrorConstructor=tameV8ErrorConstructor;\",\n \"node_modules/ses/src/error/types.js\": \"\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n'use strict';/* @ts-check*/ /** @import {GenericErrorConstructor, AssertMakeErrorOptions, DetailsToken, StringablePayload} from '../../types.js' */ /**\\n * @typedef {object} VirtualConsole\\n * @property {Console['debug']} debug\\n * @property {Console['log']} log\\n * @property {Console['info']} info\\n * @property {Console['warn']} warn\\n * @property {Console['error']} error\\n *\\n * @property {Console['trace']} trace\\n * @property {Console['dirxml']} dirxml\\n * @property {Console['group']} group\\n * @property {Console['groupCollapsed']} groupCollapsed\\n *\\n * @property {Console['assert']} assert\\n * @property {Console['timeLog']} timeLog\\n *\\n * @property {Console['clear']} clear\\n * @property {Console['count']} count\\n * @property {Console['countReset']} countReset\\n * @property {Console['dir']} dir\\n * @property {Console['groupEnd']} groupEnd\\n *\\n * @property {Console['table']} table\\n * @property {Console['time']} time\\n * @property {Console['timeEnd']} timeEnd\\n * @property {Console['timeStamp']} timeStamp\\n */ /* This is deliberately *not* JSDoc, it is a regular comment.\\n *\\n * TODO: We'd like to add the following properties to the above\\n * VirtualConsole, but they currently cause conflicts where\\n * some Typescript implementations don't have these properties\\n * on the Console type.\\n *\\n * @property {Console['profile']} profile\\n * @property {Console['profileEnd']} profileEnd\\n */ /**\\n * @typedef {'debug' | 'log' | 'info' | 'warn' | 'error'} LogSeverity\\n */ /**\\n * @typedef ConsoleFilter\\n * @property {(severity: LogSeverity) => boolean} canLog\\n */ /**\\n * @callback FilterConsole\\n * @param {VirtualConsole} baseConsole\\n * @param {ConsoleFilter} filter\\n * @param {string} [topic]\\n * @returns {VirtualConsole}\\n */\",\n \"node_modules/ses/src/error/unhandled-rejection.js\": \"'use strict';Object.defineProperty(exports,'__esModule',{value:true});var\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\ncommons=require('../commons.js');/* @ts-check*/ /**\\n * Create rejection-tracking machinery compatible with Node.js and browsers.\\n *\\n * Note that modern browsers *prevent* access to the 'unhandledrejection' and\\n * 'rejectionhandled' events needed:\\n * - in cross-origin mode, like when served from file://\\n * - in the browser console (interactively typed-in code)\\n * - in the debugger\\n *\\n * Then, they just look like: `Uncaught (in promise) Error: ...` and don't\\n * implement the machinery.\\n *\\n * The solution is to serve your web page from an http:// or https:// web server\\n * and execute actual code.\\n *\\n * @param {(reason: unknown) => void} reportReason report the reason for an\\n * unhandled rejection.\\n */\\nconst makeRejectionHandlers=(reportReason)=>{\\nif(commons.FinalizationRegistry===undefined){\\nreturn undefined;}\\n\\n\\n/** @typedef {number} ReasonId */\\nlet lastReasonId=0;\\n\\n/** @type {Map<ReasonId, unknown>} */\\nconst idToReason=new commons.Map();\\n\\n/** @type {(() => void) | undefined} */\\nlet cancelChecking;\\n\\nconst removeReasonId=(reasonId)=>{\\ncommons.mapDelete(idToReason,reasonId);\\nif(cancelChecking&&idToReason.size===0){\\n/* No more unhandled rejections to check, just cancel the check.*/\\ncancelChecking();\\ncancelChecking=undefined;}};\\n\\n\\n\\n/** @type {WeakMap<Promise, ReasonId>} */\\nconst promiseToReasonId=new commons.WeakMap();\\n\\n/**\\n * Clean up and report the reason for a GCed unhandled rejection.\\n *\\n * @param {ReasonId} heldReasonId\\n */\\nconst finalizeDroppedPromise=(heldReasonId)=>{\\nif(commons.mapHas(idToReason,heldReasonId)){\\nconst reason=commons.mapGet(idToReason,heldReasonId);\\nremoveReasonId(heldReasonId);\\nreportReason(reason);}};\\n\\n\\n\\n/** @type {FinalizationRegistry<ReasonId>} */\\nconst promiseToReason=new commons.FinalizationRegistry(finalizeDroppedPromise);\\n\\n/**\\n * Track a rejected promise and its corresponding reason if there is no\\n * rejection handler synchronously attached.\\n *\\n * @param {unknown} reason\\n * @param {Promise} pr\\n */\\nconst unhandledRejectionHandler=(reason,pr)=>{\\nlastReasonId+=1;\\nconst reasonId=lastReasonId;\\n\\n/* Update bookkeeping.*/\\ncommons.mapSet(idToReason,reasonId,reason);\\ncommons.weakmapSet(promiseToReasonId,pr,reasonId);\\ncommons.finalizationRegistryRegister(promiseToReason,pr,reasonId,pr);};\\n\\n\\n/**\\n * Deal with the addition of a handler to a previously rejected promise.\\n *\\n * Just remove it from our list. Let the FinalizationRegistry or\\n * processTermination report any GCed unhandled rejected promises.\\n *\\n * @param {Promise} pr\\n */\\nconst rejectionHandledHandler=(pr)=>{\\nconst reasonId=commons.weakmapGet(promiseToReasonId,pr);\\nremoveReasonId(reasonId);};\\n\\n\\n/**\\n * Report all the unhandled rejections, now that we are abruptly terminating\\n * the agent cluster.\\n */\\nconst processTerminationHandler=()=>{\\nfor(const[reasonId,reason]of commons.mapEntries(idToReason)){\\nremoveReasonId(reasonId);\\nreportReason(reason);}};\\n\\n\\n\\nreturn{\\nrejectionHandledHandler,\\nunhandledRejectionHandler,\\nprocessTerminationHandler};};exports.makeRejectionHandlers=makeRejectionHandlers;\",\n \"node_modules/ses/src/eval-scope.js\": \"'use strict';Object.defineProperty(exports,'__esModule',{value:true});var commons=require('./commons.js');var assert=require('./error/assert.js');\\n\\n\\n\\nconst{Fail}=assert.assert;\\n\\n/* We attempt to frustrate stack bumping attacks on the safe evaluator*/\\n/* (`make-safe-evaluator.js`).*/\\n/* A stack bumping attack forces an API call to throw a stack overflow*/\\n/* `RangeError` at an inopportune time.*/\\n/* The attacker arranges for the stack to be sufficiently deep that the API*/\\n/* consumes exactly enough stack frames to throw an exception.*/\\n/**/\\n/* For the safe evaluator, an exception thrown between adding and then deleting*/\\n/* `eval` on `evalScope` could leak the real `eval` to an attacker's lexical*/\\n/* scope.*/\\n/* This would be sufficiently disastrous that we guard against it twice.*/\\n/* First, we delete `eval` from `evalScope` immediately before rendering it to*/\\n/* the guest program's lexical scope.*/\\n/**/\\n/* If the attacker manages to arrange for `eval` to throw an exception after we*/\\n/* call `allowNextEvalToBeUnsafe` but before the guest program accesses `eval`,*/\\n/* it would be able to access `eval` once more in its own code.*/\\n/* Although they could do no harm with a direct `eval`, they would be able to*/\\n/* escape to the true global scope with an indirect `eval`.*/\\n/**/\\n/* prepareStack(depth, () => {*/\\n/* (eval)('');*/\\n/* });*/\\n/* const unsafeEval = (eval);*/\\n/* const safeEval = (eval);*/\\n/* const realGlobal = unsafeEval('globalThis');*/\\n/**/\\n/* To protect against that case, we also delete `eval` from the `evalScope` in*/\\n/* a `finally` block surrounding the call to the safe evaluator.*/\\n/* The only way to reach this case is if `eval` remains on `evalScope` due to*/\\n/* an attack, so we assume that attack would have have invalided our isolation*/\\n/* and revoke all future access to the evaluator.*/\\n/**/\\n/* To defeat a stack bumping attack, we must use fewer stack frames to recover*/\\n/* in that `finally` block than we used in the `try` block.*/\\n/* We have no reliable guarantees about how many stack frames a block of*/\\n/* JavaScript will consume.*/\\n/* Function inlining, tail-call optimization, variations in the size of a stack*/\\n/* frame, and block scopes may affect the depth of the stack.*/\\n/* The only number of acceptable stack frames to use in the finally block is*/\\n/* zero.*/\\n/* We only use property assignment and deletion in the safe evaluator's*/\\n/* `finally` block.*/\\n/* We use `delete evalScope.eval` to withhold the evaluator.*/\\n/* We assign an envelope object over `evalScopeKit.revoked` to revoke the*/\\n/* evaluator.*/\\n/**/\\n/* This is why we supply a meaningfully named function for*/\\n/* `allowNextEvalToBeUnsafe` but do not provide a corresponding*/\\n/* `revokeAccessToUnsafeEval` or even simply `revoke`.*/\\n/* These recovery routines are expressed inline in the safe evaluator.*/\\n\\nconst makeEvalScopeKit=()=>{\\nconst evalScope=commons.create(null);\\nconst oneTimeEvalProperties=commons.freeze({\\neval:{\\nget(){\\ndelete evalScope.eval;\\nreturn commons.FERAL_EVAL;},\\n\\nenumerable:false,\\nconfigurable:true}});\\n\\n\\n\\nconst evalScopeKit={\\nevalScope,\\nallowNextEvalToBeUnsafe(){\\nconst{revoked}=evalScopeKit;\\nif(revoked!==null){\\nFail`a handler did not reset allowNextEvalToBeUnsafe ${revoked.err}`;}\\n\\n/* Allow next reference to eval produce the unsafe FERAL_EVAL.*/\\n/* We avoid defineProperty because it consumes an extra stack frame taming*/\\n/* its return value.*/\\ncommons.defineProperties(evalScope,oneTimeEvalProperties);},\\n\\n/** @type {null | { err: any }} */\\nrevoked:null};\\n\\n\\nreturn evalScopeKit;};exports.makeEvalScopeKit=makeEvalScopeKit;\",\n \"node_modules/ses/src/get-anonymous-intrinsics.js\": \"'use strict';Object.defineProperty(exports,'__esModule',{value:true});var commons=require('./commons.js');var\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\ncompartment=require('./compartment.js');/**\\n * Object.getConstructorOf()\\n * Helper function to improve readability, similar to Object.getPrototypeOf().\\n *\\n * @param {object} obj\\n */\\nfunction getConstructorOf(obj){\\nreturn commons.getPrototypeOf(obj).constructor;}\\n\\n\\n/* getAnonymousIntrinsics uses a utility function to construct an arguments*/\\n/* object, since it cannot have one of its own and also be a const export.*/\\nfunction makeArguments(){\\n/* eslint-disable-next-line prefer-rest-params*/\\nreturn arguments;}\\n\\n\\n/**\\n * getAnonymousIntrinsics()\\n * Get the intrinsics not otherwise reachable by named own property\\n * traversal from the global object.\\n *\\n * @returns {object}\\n */\\nconst getAnonymousIntrinsics=()=>{\\nconst InertFunction=commons.FERAL_FUNCTION.prototype.constructor;\\n\\n/* 9.2.4.1 %ThrowTypeError%*/\\n\\nconst argsCalleeDesc=commons.getOwnPropertyDescriptor(makeArguments(),'callee');\\nconst ThrowTypeError=argsCalleeDesc&&argsCalleeDesc.get;\\n\\n/* 21.1.5.2 The %StringIteratorPrototype% Object*/\\n\\n/* eslint-disable-next-line no-new-wrappers*/\\nconst StringIteratorObject=commons.iterateString(new commons.String());\\nconst StringIteratorPrototype=commons.getPrototypeOf(StringIteratorObject);\\n\\n/* 21.2.7.1 The %RegExpStringIteratorPrototype% Object*/\\nconst RegExpStringIterator=\\ncommons.regexpPrototype[commons.matchAllSymbol]&&commons.matchAllRegExp(/./);\\nconst RegExpStringIteratorPrototype=\\nRegExpStringIterator&&commons.getPrototypeOf(RegExpStringIterator);\\n\\n/* 22.1.5.2 The %ArrayIteratorPrototype% Object*/\\n\\n/* eslint-disable-next-line no-array-constructor*/\\nconst ArrayIteratorObject=commons.iterateArray([]);\\nconst ArrayIteratorPrototype=commons.getPrototypeOf(ArrayIteratorObject);\\n\\n/* 22.2.1 The %TypedArray% Intrinsic Object*/\\n\\nconst TypedArray=commons.getPrototypeOf(commons.Float32Array);\\n\\n/* 23.1.5.2 The %MapIteratorPrototype% Object*/\\n\\nconst MapIteratorObject=commons.iterateMap(new commons.Map());\\nconst MapIteratorPrototype=commons.getPrototypeOf(MapIteratorObject);\\n\\n/* 23.2.5.2 The %SetIteratorPrototype% Object*/\\n\\nconst SetIteratorObject=commons.iterateSet(new commons.Set());\\nconst SetIteratorPrototype=commons.getPrototypeOf(SetIteratorObject);\\n\\n/* 25.1.2 The %IteratorPrototype% Object*/\\n\\nconst IteratorPrototype=commons.getPrototypeOf(ArrayIteratorPrototype);\\n\\n/* 25.2.1 The GeneratorFunction Constructor*/\\n\\n/* eslint-disable-next-line no-empty-function*/\\nfunction*GeneratorFunctionInstance(){}\\nconst GeneratorFunction=getConstructorOf(GeneratorFunctionInstance);\\n\\n/* 25.2.3 Properties of the GeneratorFunction Prototype Object*/\\n\\nconst Generator=GeneratorFunction.prototype;\\n\\n/* 25.3.1 The AsyncGeneratorFunction Constructor*/\\n\\n/* eslint-disable-next-line no-empty-function*/\\nasync function*AsyncGeneratorFunctionInstance(){}\\nconst AsyncGeneratorFunction=getConstructorOf(\\nAsyncGeneratorFunctionInstance);\\n\\n\\n/* 25.3.2.2 AsyncGeneratorFunction.prototype*/\\nconst AsyncGenerator=AsyncGeneratorFunction.prototype;\\n/* 25.5.1 Properties of the AsyncGenerator Prototype Object*/\\nconst AsyncGeneratorPrototype=AsyncGenerator.prototype;\\nconst AsyncIteratorPrototype=commons.getPrototypeOf(AsyncGeneratorPrototype);\\n\\n/* 25.7.1 The AsyncFunction Constructor*/\\n\\n/* eslint-disable-next-line no-empty-function*/\\nasync function AsyncFunctionInstance(){}\\nconst AsyncFunction=getConstructorOf(AsyncFunctionInstance);\\n\\nconst intrinsics={\\n'%InertFunction%':InertFunction,\\n'%ArrayIteratorPrototype%':ArrayIteratorPrototype,\\n'%InertAsyncFunction%':AsyncFunction,\\n'%AsyncGenerator%':AsyncGenerator,\\n'%InertAsyncGeneratorFunction%':AsyncGeneratorFunction,\\n'%AsyncGeneratorPrototype%':AsyncGeneratorPrototype,\\n'%AsyncIteratorPrototype%':AsyncIteratorPrototype,\\n'%Generator%':Generator,\\n'%InertGeneratorFunction%':GeneratorFunction,\\n'%IteratorPrototype%':IteratorPrototype,\\n'%MapIteratorPrototype%':MapIteratorPrototype,\\n'%RegExpStringIteratorPrototype%':RegExpStringIteratorPrototype,\\n'%SetIteratorPrototype%':SetIteratorPrototype,\\n'%StringIteratorPrototype%':StringIteratorPrototype,\\n'%ThrowTypeError%':ThrowTypeError,\\n'%TypedArray%':TypedArray,\\n'%InertCompartment%':compartment.InertCompartment};\\n\\n\\nif(commons.globalThis.Iterator){\\nintrinsics['%IteratorHelperPrototype%']=commons.getPrototypeOf(\\n/* eslint-disable-next-line @endo/no-polymorphic-call*/\\ncommons.globalThis.Iterator.from([]).take(0));\\n\\nintrinsics['%WrapForValidIteratorPrototype%']=commons.getPrototypeOf(\\n/* eslint-disable-next-line @endo/no-polymorphic-call*/\\ncommons.globalThis.Iterator.from({next(){}}));}\\n\\n\\n\\nif(commons.globalThis.AsyncIterator){\\nintrinsics['%AsyncIteratorHelperPrototype%']=commons.getPrototypeOf(\\n/* eslint-disable-next-line @endo/no-polymorphic-call*/\\ncommons.globalThis.AsyncIterator.from([]).take(0));\\n\\nintrinsics['%WrapForValidAsyncIteratorPrototype%']=commons.getPrototypeOf(\\n/* eslint-disable-next-line @endo/no-polymorphic-call*/\\ncommons.globalThis.AsyncIterator.from({next(){}}));}\\n\\n\\n\\nreturn intrinsics;};exports.getAnonymousIntrinsics=getAnonymousIntrinsics;\",\n \"node_modules/ses/src/get-source-url.js\": \"'use strict';Object.defineProperty(exports,'__esModule',{value:true});var\\n\\ncommons=require('./commons.js');/* Captures a key and value of the form #key=value or @key=value*/\\nconst sourceMetaEntryRegExp=\\n'\\\\\\\\s*[@#]\\\\\\\\s*([a-zA-Z][a-zA-Z0-9]*)\\\\\\\\s*=\\\\\\\\s*([^\\\\\\\\s\\\\\\\\*]*)';\\n/* Captures either a one-line or multi-line comment containing*/\\n/* one #key=value or @key=value.*/\\n/* Produces two pairs of capture groups, but the initial two may be undefined.*/\\n/* On account of the mechanics of regular expressions, scanning from the end*/\\n/* does not allow us to capture every pair, so getSourceURL must capture and*/\\n/* trim until there are no matching comments.*/\\nconst sourceMetaEntriesRegExp=new commons.FERAL_REG_EXP(\\n`(?:\\\\\\\\s*//${sourceMetaEntryRegExp}|/\\\\\\\\*${sourceMetaEntryRegExp}\\\\\\\\s*\\\\\\\\*/)\\\\\\\\s*$`);\\n\\n\\n/**\\n * @param {string} src\\n */\\nconst getSourceURL=(src)=>{\\nlet sourceURL='<unknown>';\\n\\n/* Our regular expression matches the last one or two comments with key value*/\\n/* pairs at the end of the source, avoiding a scan over the entire length of*/\\n/* the string, but at the expense of being able to capture all the (key,*/\\n/* value) pair meta comments at the end of the source, which may include*/\\n/* sourceMapURL in addition to sourceURL.*/\\n/* So, we sublimate the comments out of the source until no source or no*/\\n/* comments remain.*/\\nwhile(src.length>0){\\nconst match=commons.regexpExec(sourceMetaEntriesRegExp,src);\\nif(match===null){\\nbreak;}\\n\\nsrc=commons.stringSlice(src,0,src.length-match[0].length);\\n\\n/* We skip $0 since it contains the entire match.*/\\n/* The match contains four capture groups,*/\\n/* two (key, value) pairs, the first of which*/\\n/* may be undefined.*/\\n/* On the off-chance someone put two sourceURL comments in their code with*/\\n/* different commenting conventions, the latter has precedence.*/\\nif(match[3]==='sourceURL'){\\nsourceURL=match[4];}else\\nif(match[1]==='sourceURL'){\\nsourceURL=match[2];}}\\n\\n\\n\\nreturn sourceURL;};exports.getSourceURL=getSourceURL;\",\n \"node_modules/ses/src/global-object.js\": \"'use strict';Object.defineProperty(exports,'__esModule',{value:true});var commons=require('./commons.js');var makeEvalFunction=require('./make-eval-function.js');var makeFunctionConstructor=require('./make-function-constructor.js');var\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\npermits=require('./permits.js');/**\\n * The host's ordinary global object is not provided by a `with` block, so\\n * assigning to Symbol.unscopables has no effect.\\n * Since this shim uses `with` blocks to create a confined lexical scope for\\n * guest programs, we cannot emulate the proper behavior.\\n * With this shim, assigning Symbol.unscopables causes the given lexical\\n * names to fall through to the terminal scope proxy.\\n * But, we can install this setter to prevent a program from proceding on\\n * this false assumption.\\n *\\n * @param {object} globalObject\\n */\\nconst setGlobalObjectSymbolUnscopables=(globalObject)=>{\\ncommons.defineProperty(\\nglobalObject,\\ncommons.unscopablesSymbol,\\ncommons.freeze(\\ncommons.assign(commons.create(null),{\\nset:commons.freeze(()=>{\\nthrow commons.TypeError(\\n`Cannot set Symbol.unscopables of a Compartment's globalThis`);}),\\n\\n\\nenumerable:false,\\nconfigurable:false})));};\\n\\n\\n\\n\\n\\n/**\\n * setGlobalObjectConstantProperties()\\n * Initializes a new global object using a process similar to ECMA specifications\\n * (SetDefaultGlobalBindings). This process is split between this function and\\n * `setGlobalObjectMutableProperties`.\\n *\\n * @param {object} globalObject\\n */\\nconst setGlobalObjectConstantProperties=(globalObject)=>{\\nfor(const[name,constant]of commons.entries(permits.constantProperties)){\\ncommons.defineProperty(globalObject,name,{\\nvalue:constant,\\nwritable:false,\\nenumerable:false,\\nconfigurable:false});}};\\n\\n\\n\\n\\n/**\\n * setGlobalObjectMutableProperties()\\n * Create new global object using a process similar to ECMA specifications\\n * (portions of SetRealmGlobalObject and SetDefaultGlobalBindings).\\n * `newGlobalPropertyNames` should be either `initialGlobalPropertyNames` or\\n * `sharedGlobalPropertyNames`.\\n *\\n * @param {object} globalObject\\n * @param {object} param1\\n * @param {object} param1.intrinsics\\n * @param {object} param1.newGlobalPropertyNames\\n * @param {Function} param1.makeCompartmentConstructor\\n * @param {(object) => void} param1.markVirtualizedNativeFunction\\n */\\nconst setGlobalObjectMutableProperties=(\\nglobalObject,\\n{\\nintrinsics,\\nnewGlobalPropertyNames,\\nmakeCompartmentConstructor,\\nmarkVirtualizedNativeFunction})=>\\n\\n{\\nfor(const[name,intrinsicName]of commons.entries(permits.universalPropertyNames)){\\nif(commons.objectHasOwnProperty(intrinsics,intrinsicName)){\\ncommons.defineProperty(globalObject,name,{\\nvalue:intrinsics[intrinsicName],\\nwritable:true,\\nenumerable:false,\\nconfigurable:true});}}\\n\\n\\n\\n\\nfor(const[name,intrinsicName]of commons.entries(newGlobalPropertyNames)){\\nif(commons.objectHasOwnProperty(intrinsics,intrinsicName)){\\ncommons.defineProperty(globalObject,name,{\\nvalue:intrinsics[intrinsicName],\\nwritable:true,\\nenumerable:false,\\nconfigurable:true});}}\\n\\n\\n\\n\\nconst perCompartmentGlobals={\\nglobalThis:globalObject};\\n\\n\\nperCompartmentGlobals.Compartment=commons.freeze(\\nmakeCompartmentConstructor(\\nmakeCompartmentConstructor,\\nintrinsics,\\nmarkVirtualizedNativeFunction));\\n\\n\\n\\n/* TODO These should still be tamed according to the whitelist before*/\\n/* being made available.*/\\nfor(const[name,value]of commons.entries(perCompartmentGlobals)){\\ncommons.defineProperty(globalObject,name,{\\nvalue,\\nwritable:true,\\nenumerable:false,\\nconfigurable:true});\\n\\nif(typeof value==='function'){\\nmarkVirtualizedNativeFunction(value);}}};\\n\\n\\n\\n\\n/**\\n * setGlobalObjectEvaluators()\\n * Set the eval and the Function evaluator on the global object with given evalTaming policy.\\n *\\n * @param {object} globalObject\\n * @param {Function} evaluator\\n * @param {(object) => void} markVirtualizedNativeFunction\\n */\\nconst setGlobalObjectEvaluators=(\\nglobalObject,\\nevaluator,\\nmarkVirtualizedNativeFunction)=>\\n{\\n{\\nconst f=commons.freeze(makeEvalFunction.makeEvalFunction(evaluator));\\nmarkVirtualizedNativeFunction(f);\\ncommons.defineProperty(globalObject,'eval',{\\nvalue:f,\\nwritable:true,\\nenumerable:false,\\nconfigurable:true});}\\n\\n\\n{\\nconst f=commons.freeze(makeFunctionConstructor.makeFunctionConstructor(evaluator));\\nmarkVirtualizedNativeFunction(f);\\ncommons.defineProperty(globalObject,'Function',{\\nvalue:f,\\nwritable:true,\\nenumerable:false,\\nconfigurable:true});}};exports.setGlobalObjectConstantProperties=setGlobalObjectConstantProperties;exports.setGlobalObjectEvaluators=setGlobalObjectEvaluators;exports.setGlobalObjectMutableProperties=setGlobalObjectMutableProperties;exports.setGlobalObjectSymbolUnscopables=setGlobalObjectSymbolUnscopables;\",\n \"node_modules/ses/src/intrinsics.js\": \"'use strict';Object.defineProperty(exports,'__esModule',{value:true});var commons=require('./commons.js');var permits=require('./permits.js');\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\nconst isFunction=(obj)=>typeof obj==='function';\\n\\n/* Like defineProperty, but throws if it would modify an existing property.*/\\n/* We use this to ensure that two conflicting attempts to define the same*/\\n/* property throws, causing SES initialization to fail. Otherwise, a*/\\n/* conflict between, for example, two of SES's internal whitelists might*/\\n/* get masked as one overwrites the other. Accordingly, the thrown error*/\\n/* complains of a \\\"Conflicting definition\\\".*/\\nfunction initProperty(obj,name,desc){\\nif(commons.objectHasOwnProperty(obj,name)){\\nconst preDesc=commons.getOwnPropertyDescriptor(obj,name);\\nif(\\n!preDesc||\\n!commons.is(preDesc.value,desc.value)||\\npreDesc.get!==desc.get||\\npreDesc.set!==desc.set||\\npreDesc.writable!==desc.writable||\\npreDesc.enumerable!==desc.enumerable||\\npreDesc.configurable!==desc.configurable)\\n{\\nthrow commons.TypeError(`Conflicting definitions of ${name}`);}}\\n\\n\\ncommons.defineProperty(obj,name,desc);}\\n\\n\\n/* Like defineProperties, but throws if it would modify an existing property.*/\\n/* This ensures that the intrinsics added to the intrinsics collector object*/\\n/* graph do not overlap.*/\\nfunction initProperties(obj,descs){\\nfor(const[name,desc]of commons.entries(descs)){\\ninitProperty(obj,name,desc);}}\\n\\n\\n\\n/* sampleGlobals creates an intrinsics object, suitable for*/\\n/* interinsicsCollector.addIntrinsics, from the named properties of a global*/\\n/* object.*/\\nfunction sampleGlobals(globalObject,newPropertyNames){\\nconst newIntrinsics={__proto__:null};\\nfor(const[globalName,intrinsicName]of commons.entries(newPropertyNames)){\\nif(commons.objectHasOwnProperty(globalObject,globalName)){\\nnewIntrinsics[intrinsicName]=globalObject[globalName];}}\\n\\n\\nreturn newIntrinsics;}\\n\\n\\nconst makeIntrinsicsCollector=()=>{\\n/** @type {Record<any, any>} */\\nconst intrinsics=commons.create(null);\\nlet pseudoNatives;\\n\\nconst addIntrinsics=(newIntrinsics)=>{\\ninitProperties(intrinsics,commons.getOwnPropertyDescriptors(newIntrinsics));};\\n\\ncommons.freeze(addIntrinsics);\\n\\n/* For each intrinsic, if it has a `.prototype` property, use the*/\\n/* whitelist to find out the intrinsic name for that prototype and add it*/\\n/* to the intrinsics.*/\\nconst completePrototypes=()=>{\\nfor(const[name,intrinsic]of commons.entries(intrinsics)){\\nif(!commons.isObject(intrinsic)){\\n/* eslint-disable-next-line no-continue*/\\ncontinue;}\\n\\nif(!commons.objectHasOwnProperty(intrinsic,'prototype')){\\n/* eslint-disable-next-line no-continue*/\\ncontinue;}\\n\\nconst permit=permits.permitted[name];\\nif(typeof permit!=='object'){\\nthrow commons.TypeError(`Expected permit object at whitelist.${name}`);}\\n\\nconst namePrototype=permit.prototype;\\nif(!namePrototype){\\nthrow commons.TypeError(`${name}.prototype property not whitelisted`);}\\n\\nif(\\ntypeof namePrototype!=='string'||\\n!commons.objectHasOwnProperty(permits.permitted,namePrototype))\\n{\\nthrow commons.TypeError(`Unrecognized ${name}.prototype whitelist entry`);}\\n\\nconst intrinsicPrototype=intrinsic.prototype;\\nif(commons.objectHasOwnProperty(intrinsics,namePrototype)){\\nif(intrinsics[namePrototype]!==intrinsicPrototype){\\nthrow commons.TypeError(`Conflicting bindings of ${namePrototype}`);}\\n\\n/* eslint-disable-next-line no-continue*/\\ncontinue;}\\n\\nintrinsics[namePrototype]=intrinsicPrototype;}};\\n\\n\\ncommons.freeze(completePrototypes);\\n\\nconst finalIntrinsics=()=>{\\ncommons.freeze(intrinsics);\\npseudoNatives=new commons.WeakSet(commons.arrayFilter(commons.values(intrinsics),isFunction));\\nreturn intrinsics;};\\n\\ncommons.freeze(finalIntrinsics);\\n\\nconst isPseudoNative=(obj)=>{\\nif(!pseudoNatives){\\nthrow commons.TypeError(\\n'isPseudoNative can only be called after finalIntrinsics');}\\n\\n\\nreturn commons.weaksetHas(pseudoNatives,obj);};\\n\\ncommons.freeze(isPseudoNative);\\n\\nconst intrinsicsCollector={\\naddIntrinsics,\\ncompletePrototypes,\\nfinalIntrinsics,\\nisPseudoNative};\\n\\ncommons.freeze(intrinsicsCollector);\\n\\naddIntrinsics(permits.constantProperties);\\naddIntrinsics(sampleGlobals(commons.globalThis,permits.universalPropertyNames));\\n\\nreturn intrinsicsCollector;};\\n\\n\\n/**\\n * getGlobalIntrinsics()\\n * Doesn't tame, delete, or modify anything. Samples globalObject to create an\\n * intrinsics record containing only the whitelisted global variables, listed\\n * by the intrinsic names appropriate for new globals, i.e., the globals of\\n * newly constructed compartments.\\n *\\n * WARNING:\\n * If run before lockdown, the returned intrinsics record will carry the\\n * *original* unsafe (feral, untamed) bindings of these global variables.\\n *\\n * @param {object} globalObject\\n */\\nconst getGlobalIntrinsics=(globalObject)=>{\\nconst{addIntrinsics,finalIntrinsics}=makeIntrinsicsCollector();\\n\\naddIntrinsics(sampleGlobals(globalObject,permits.sharedGlobalPropertyNames));\\n\\nreturn finalIntrinsics();};exports.getGlobalIntrinsics=getGlobalIntrinsics;exports.makeIntrinsicsCollector=makeIntrinsicsCollector;\",\n \"node_modules/ses/src/lockdown-shim.js\": \"'use strict';require('./assert-sloppy-mode.js');var commons=require('./commons.js');var\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\nlockdown=require('./lockdown.js');/* @ts-check*/ /** @import {LockdownOptions} from '../types.js' */ /**\\n * @param {LockdownOptions} options\\n */\\ncommons.globalThis.lockdown=(options)=>{\\nconst hardenIntrinsics=lockdown.repairIntrinsics(options);\\ncommons.globalThis.harden=hardenIntrinsics();};\\n\\n\\n/**\\n * @param {LockdownOptions} options\\n */\\ncommons.globalThis.repairIntrinsics=(options)=>{\\nconst hardenIntrinsics=lockdown.repairIntrinsics(options);\\n/* Reveal hardenIntrinsics after repairs.*/\\ncommons.globalThis.hardenIntrinsics=()=>{\\n/* Reveal harden after hardenIntrinsics.*/\\n/* Harden is dangerous before hardenIntrinsics because hardening just*/\\n/* about anything will inadvertently render intrinsics irreparable.*/\\n/* Also, for modules that must work both before or after lockdown (code*/\\n/* that is portable between JS and SES), the existence of harden in global*/\\n/* scope signals whether such code should attempt to use harden in the*/\\n/* defense of its own API.*/\\n/* @ts-ignore harden not yet recognized on globalThis.*/\\ncommons.globalThis.harden=hardenIntrinsics();};};\",\n \"node_modules/ses/src/lockdown.js\": \"'use strict';Object.defineProperty(exports,'__esModule',{value:true});require('../../@endo/env-options/index.js');var commons=require('./commons.js');var makeHardener=require('./make-hardener.js');var intrinsics=require('./intrinsics.js');var permitsIntrinsics=require('./permits-intrinsics.js');var tameFunctionConstructors=require('./tame-function-constructors.js');var tameDateConstructor=require('./tame-date-constructor.js');var tameMathObject=require('./tame-math-object.js');var tameRegexpConstructor=require('./tame-regexp-constructor.js');var enablePropertyOverrides=require('./enable-property-overrides.js');var tameLocaleMethods=require('./tame-locale-methods.js');var globalObject=require('./global-object.js');var makeSafeEvaluator=require('./make-safe-evaluator.js');var permits=require('./permits.js');var tameFunctionTostring=require('./tame-function-tostring.js');var tameDomains=require('./tame-domains.js');var tameConsole=require('./error/tame-console.js');var tameErrorConstructor=require('./error/tame-error-constructor.js');var assert=require('./error/assert.js');var getAnonymousIntrinsics=require('./get-anonymous-intrinsics.js');var compartment=require('./compartment.js');var tameHarden=require('./tame-harden.js');var tameSymbolConstructor=require('./tame-symbol-constructor.js');var tameFauxDataProperties=require('./tame-faux-data-properties.js');var\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\nenvOptions=require('../../@endo/env-options/src/env-options.js');/* Copyright (C) 2018 Agoric*/ /** @import {LockdownOptions} from '../types.js' */\\n\\nconst{Fail,details:d,quote:q}=assert.assert;\\n\\n/** @type {Error=} */\\nlet priorRepairIntrinsics;\\n\\n/** @type {Error=} */\\nlet priorHardenIntrinsics;\\n\\n/* Build a harden() with an empty fringe.*/\\n/* Gate it on lockdown.*/\\n/**\\n * @template T\\n * @param {T} ref\\n * @returns {T}\\n */\\nconst safeHarden=makeHardener.makeHardener();\\n\\n/**\\n * @callback Transform\\n * @param {string} source\\n * @returns {string}\\n */\\n\\n/**\\n * @callback CompartmentConstructor\\n * @param {object} endowments\\n * @param {object} moduleMap\\n * @param {object} [options]\\n * @param {Array<Transform>} [options.transforms]\\n * @param {Array<Transform>} [options.__shimTransforms__]\\n */\\n\\n/* TODO https://github.com/endojs/endo/issues/814*/\\n/* Lockdown currently allows multiple calls provided that the specified options*/\\n/* of every call agree. With experience, we have observed that lockdown should*/\\n/* only ever need to be called once and that simplifying lockdown will improve*/\\n/* the quality of audits.*/\\n\\nconst assertDirectEvalAvailable=()=>{\\nlet allowed=false;\\ntry{\\nallowed=commons.FERAL_FUNCTION(\\n'eval',\\n'SES_changed',\\n`\\\\\\n eval(\\\"SES_changed = true\\\");\\n return SES_changed;\\n `)(\\ncommons.FERAL_EVAL,false);\\n/* If we get here and SES_changed stayed false, that means the eval was sloppy*/\\n/* and indirect, which generally creates a new global.*/\\n/* We are going to throw an exception for failing to initialize SES, but*/\\n/* good neighbors clean up.*/\\nif(!allowed){\\ndelete commons.globalThis.SES_changed;}}\\n\\ncatch(_error){\\n/* We reach here if eval is outright forbidden by a Content Security Policy.*/\\n/* We allow this for SES usage that delegates the responsibility to isolate*/\\n/* guest code to production code generation.*/\\nallowed=true;}\\n\\nif(!allowed){\\n/* See https://github.com/endojs/endo/blob/master/packages/ses/error-codes/SES_DIRECT_EVAL.md*/\\nthrow commons.TypeError(\\n`SES cannot initialize unless 'eval' is the original intrinsic 'eval', suitable for direct-eval (dynamically scoped eval) (SES_DIRECT_EVAL)`);}};\\n\\n\\n\\n\\n/**\\n * @param {LockdownOptions} [options]\\n */\\nconst repairIntrinsics=(options={})=>{\\n/* First time, absent options default to 'safe'.*/\\n/* Subsequent times, absent options default to first options.*/\\n/* Thus, all present options must agree with first options.*/\\n/* Reconstructing `option` here also ensures that it is a well*/\\n/* behaved record, with only own data properties.*/\\n/**/\\n/* The `overrideTaming` is not a safety issue. Rather it is a tradeoff*/\\n/* between code compatibility, which is better with the `'moderate'`*/\\n/* setting, and tool compatibility, which is better with the `'min'`*/\\n/* setting. See*/\\n/* https://github.com/Agoric/SES-shim/blob/master/packages/ses/README.md#enabling-override-by-assignment)*/\\n/* for an explanation of when to use which.*/\\n/**/\\n/* The `stackFiltering` is not a safety issue. Rather it is a tradeoff*/\\n/* between relevance and completeness of the stack frames shown on the*/\\n/* console. Setting`stackFiltering` to `'verbose'` applies no filters, providing*/\\n/* the raw stack frames that can be quite versbose. Setting*/\\n/* `stackFrameFiltering` to`'concise'` limits the display to the stack frame*/\\n/* information most likely to be relevant, eliminating distracting frames*/\\n/* such as those from the infrastructure. However, the bug you're trying to*/\\n/* track down might be in the infrastrure, in which case the `'verbose'` setting*/\\n/* is useful. See*/\\n/* [`stackFiltering` options](https://github.com/Agoric/SES-shim/blob/master/packages/ses/docs/lockdown.md#stackfiltering-options)*/\\n/* for an explanation.*/\\n\\nconst{\\nerrorTaming=envOptions.getEnvironmentOption('LOCKDOWN_ERROR_TAMING','safe'),\\nerrorTrapping=/** @type {\\\"platform\\\" | \\\"none\\\" | \\\"report\\\" | \\\"abort\\\" | \\\"exit\\\" | undefined} */\\nenvOptions.getEnvironmentOption('LOCKDOWN_ERROR_TRAPPING','platform'),\\n\\nunhandledRejectionTrapping=/** @type {\\\"none\\\" | \\\"report\\\" | undefined} */\\nenvOptions.getEnvironmentOption('LOCKDOWN_UNHANDLED_REJECTION_TRAPPING','report'),\\n\\nregExpTaming=envOptions.getEnvironmentOption('LOCKDOWN_REGEXP_TAMING','safe'),\\nlocaleTaming=envOptions.getEnvironmentOption('LOCKDOWN_LOCALE_TAMING','safe'),\\n\\nconsoleTaming=/** @type {'unsafe' | 'safe' | undefined} */\\nenvOptions.getEnvironmentOption('LOCKDOWN_CONSOLE_TAMING','safe'),\\n\\noverrideTaming=envOptions.getEnvironmentOption('LOCKDOWN_OVERRIDE_TAMING','moderate'),\\nstackFiltering=envOptions.getEnvironmentOption('LOCKDOWN_STACK_FILTERING','concise'),\\ndomainTaming=envOptions.getEnvironmentOption('LOCKDOWN_DOMAIN_TAMING','safe'),\\nevalTaming=envOptions.getEnvironmentOption('LOCKDOWN_EVAL_TAMING','safeEval'),\\noverrideDebug=commons.arrayFilter(\\ncommons.stringSplit(envOptions.getEnvironmentOption('LOCKDOWN_OVERRIDE_DEBUG',''),','),\\n/** @param {string} debugName */\\n(debugName)=>debugName!==''),\\n\\n__hardenTaming__=envOptions.getEnvironmentOption('LOCKDOWN_HARDEN_TAMING','safe'),\\ndateTaming='safe',/* deprecated*/\\nmathTaming='safe',/* deprecated*/\\n...extraOptions}=\\noptions;\\n\\nevalTaming==='unsafeEval'||\\nevalTaming==='safeEval'||\\nevalTaming==='noEval'||\\nFail`lockdown(): non supported option evalTaming: ${q(evalTaming)}`;\\n\\n/* Assert that only supported options were passed.*/\\n/* Use Reflect.ownKeys to reject symbol-named properties as well.*/\\nconst extraOptionsNames=commons.ownKeys(extraOptions);\\nextraOptionsNames.length===0||\\nFail`lockdown(): non supported option ${q(extraOptionsNames)}`;\\n\\npriorRepairIntrinsics===undefined||\\n/* eslint-disable-next-line @endo/no-polymorphic-call*/\\nassert.assert.fail(\\nd`Already locked down at ${priorRepairIntrinsics} (SES_ALREADY_LOCKED_DOWN)`,\\ncommons.TypeError);\\n\\n/* See https://github.com/endojs/endo/blob/master/packages/ses/error-codes/SES_ALREADY_LOCKED_DOWN.md*/\\npriorRepairIntrinsics=commons.TypeError('Prior lockdown (SES_ALREADY_LOCKED_DOWN)');\\n/* Tease V8 to generate the stack string and release the closures the stack*/\\n/* trace retained:*/\\npriorRepairIntrinsics.stack;\\n\\nassertDirectEvalAvailable();\\n\\n/**\\n * Because of packagers and bundlers, etc, multiple invocations of lockdown\\n * might happen in separate instantiations of the source of this module.\\n * In that case, each one sees its own `firstOptions` variable, so the test\\n * above will not detect that lockdown has already happened. We\\n * unreliably test some telltale signs that lockdown has run, to avoid\\n * trying to lock down a locked down environment. Although the test is\\n * unreliable, this is consistent with the SES threat model. SES provides\\n * security only if it runs first in a given realm, or if everything that\\n * runs before it is SES-aware and cooperative. Neither SES nor anything\\n * can protect itself from corrupting code that runs first. For these\\n * purposes, code that turns a realm into something that passes these\\n * tests without actually locking down counts as corrupting code.\\n *\\n * The specifics of what this tests for may change over time, but it\\n * should be consistent with any setting of the lockdown options.\\n */\\nconst seemsToBeLockedDown=()=>{\\nreturn(\\ncommons.globalThis.Function.prototype.constructor!==commons.globalThis.Function&&\\n/* @ts-ignore harden is absent on globalThis type def.*/\\ntypeof commons.globalThis.harden==='function'&&\\n/* @ts-ignore lockdown is absent on globalThis type def.*/\\ntypeof commons.globalThis.lockdown==='function'&&\\ncommons.globalThis.Date.prototype.constructor!==commons.globalThis.Date&&\\ntypeof commons.globalThis.Date.now==='function'&&\\n/* @ts-ignore does not recognize that Date constructor is a special*/\\n/* Function.*/\\n/* eslint-disable-next-line @endo/no-polymorphic-call*/\\ncommons.is(commons.globalThis.Date.prototype.constructor.now(),NaN));};\\n\\n\\n\\nif(seemsToBeLockedDown()){\\n/* See https://github.com/endojs/endo/blob/master/packages/ses/error-codes/SES_MULTIPLE_INSTANCES.md*/\\nthrow commons.TypeError(\\n`Already locked down but not by this SES instance (SES_MULTIPLE_INSTANCES)`);}\\n\\n\\n\\n/**\\n * 1. TAME powers & gather intrinsics first.\\n */\\n\\ntameDomains.tameDomains(domainTaming);\\n\\n/* Replace Function.prototype.toString with one that recognizes*/\\n/* shimmed functions as honorary native functions.*/\\nconst markVirtualizedNativeFunction=tameFunctionTostring.tameFunctionToString();\\n\\nconst{addIntrinsics,completePrototypes,finalIntrinsics}=\\nintrinsics.makeIntrinsicsCollector();\\n\\nconst tamedHarden=tameHarden.tameHarden(safeHarden,__hardenTaming__);\\naddIntrinsics({harden:tamedHarden});\\n\\naddIntrinsics(tameFunctionConstructors[\\\"default\\\"]());\\n\\naddIntrinsics(tameDateConstructor[\\\"default\\\"](dateTaming));\\naddIntrinsics(tameErrorConstructor[\\\"default\\\"](errorTaming,stackFiltering));\\naddIntrinsics(tameMathObject[\\\"default\\\"](mathTaming));\\naddIntrinsics(tameRegexpConstructor[\\\"default\\\"](regExpTaming));\\naddIntrinsics(tameSymbolConstructor.tameSymbolConstructor());\\n\\naddIntrinsics(getAnonymousIntrinsics.getAnonymousIntrinsics());\\n\\ncompletePrototypes();\\n\\nconst intrinsics$1=finalIntrinsics();\\n\\nconst hostIntrinsics={__proto__:null};\\n\\n/* The Node.js Buffer is a derived class of Uint8Array, and as such is often*/\\n/* passed around where a Uint8Array is expected.*/\\nif(typeof commons.globalThis.Buffer==='function'){\\nhostIntrinsics.Buffer=commons.globalThis.Buffer;}\\n\\n\\n/**\\n * Wrap console unless suppressed.\\n * At the moment, the console is considered a host power in the start\\n * compartment, and not a primordial. Hence it is absent from the whilelist\\n * and bypasses the intrinsicsCollector.\\n *\\n * @type {((error: any) => string | undefined) | undefined}\\n */\\nlet optGetStackString;\\nif(errorTaming!=='unsafe'){\\noptGetStackString=intrinsics$1['%InitialGetStackString%'];}\\n\\nconst consoleRecord=tameConsole.tameConsole(\\nconsoleTaming,\\nerrorTrapping,\\nunhandledRejectionTrapping,\\noptGetStackString);\\n\\ncommons.globalThis.console=/** @type {Console} */consoleRecord.console;\\n\\n/* The untamed Node.js console cannot itself be hardened as it has mutable*/\\n/* internal properties, but some of these properties expose internal versions*/\\n/* of classes from node's \\\"primordials\\\" concept.*/\\n/* eslint-disable-next-line no-underscore-dangle*/\\nif(typeof/** @type {any} */consoleRecord.console._times==='object'){\\n/* SafeMap is a derived Map class used internally by Node*/\\n/* There doesn't seem to be a cleaner way to reach it.*/\\nhostIntrinsics.SafeMap=commons.getPrototypeOf(\\n/* eslint-disable-next-line no-underscore-dangle*/\\n/** @type {any} */consoleRecord.console._times);}\\n\\n\\n\\n/* @ts-ignore assert is absent on globalThis type def.*/\\nif(errorTaming==='unsafe'&&commons.globalThis.assert===assert.assert){\\n/* If errorTaming is 'unsafe' we replace the global assert with*/\\n/* one whose `details` template literal tag does not redact*/\\n/* unmarked substitution values. IOW, it blabs information that*/\\n/* was supposed to be secret from callers, as an aid to debugging*/\\n/* at a further cost in safety.*/\\n/* @ts-ignore assert is absent on globalThis type def.*/\\ncommons.globalThis.assert=assert.makeAssert(undefined,true);}\\n\\n\\n/* Replace *Locale* methods with their non-locale equivalents*/\\ntameLocaleMethods[\\\"default\\\"](intrinsics$1,localeTaming);\\n\\ntameFauxDataProperties.tameFauxDataProperties(intrinsics$1);\\n\\n/**\\n * 2. WHITELIST to standardize the environment.\\n */\\n\\n/* Remove non-standard properties.*/\\n/* All remaining function encountered during whitelisting are*/\\n/* branded as honorary native functions.*/\\npermitsIntrinsics[\\\"default\\\"](intrinsics$1,markVirtualizedNativeFunction);\\n\\n/* Initialize the powerful initial global, i.e., the global of the*/\\n/* start compartment, from the intrinsics.*/\\n\\nglobalObject.setGlobalObjectConstantProperties(commons.globalThis);\\n\\nglobalObject.setGlobalObjectMutableProperties(commons.globalThis,{\\nintrinsics:intrinsics$1,\\nnewGlobalPropertyNames:permits.initialGlobalPropertyNames,\\nmakeCompartmentConstructor:compartment.makeCompartmentConstructor,\\nmarkVirtualizedNativeFunction});\\n\\n\\nif(evalTaming==='noEval'){\\nglobalObject.setGlobalObjectEvaluators(\\ncommons.globalThis,\\ncommons.noEvalEvaluate,\\nmarkVirtualizedNativeFunction);}else\\n\\nif(evalTaming==='safeEval'){\\nconst{safeEvaluate}=makeSafeEvaluator.makeSafeEvaluator({globalObject:commons.globalThis});\\nglobalObject.setGlobalObjectEvaluators(\\ncommons.globalThis,\\nsafeEvaluate,\\nmarkVirtualizedNativeFunction);}else\\n\\nif(evalTaming==='unsafeEval'){\\n/* Leave eval function and Function constructor of the initial compartment in-tact.*/\\n/* Other compartments will not have access to these evaluators unless a guest program*/\\n/* escapes containment.*/}\\n\\n\\n/**\\n * 3. HARDEN to share the intrinsics.\\n *\\n * We define hardenIntrinsics here so that options are in scope, but return\\n * it to the caller because we intend to eventually allow vetted shims to run\\n * between repairs and the hardening of intrinsics and so we can benchmark\\n * repair separately from hardening.\\n */\\n\\nconst hardenIntrinsics=()=>{\\npriorHardenIntrinsics===undefined||\\n/* eslint-disable-next-line @endo/no-polymorphic-call*/\\nassert.assert.fail(\\nd`Already locked down at ${priorHardenIntrinsics} (SES_ALREADY_LOCKED_DOWN)`,\\ncommons.TypeError);\\n\\n/* See https://github.com/endojs/endo/blob/master/packages/ses/error-codes/SES_ALREADY_LOCKED_DOWN.md*/\\npriorHardenIntrinsics=commons.TypeError(\\n'Prior lockdown (SES_ALREADY_LOCKED_DOWN)');\\n\\n/* Tease V8 to generate the stack string and release the closures the stack*/\\n/* trace retained:*/\\npriorHardenIntrinsics.stack;\\n\\n/* Circumvent the override mistake.*/\\n/* TODO consider moving this to the end of the repair phase, and*/\\n/* therefore before vetted shims rather than afterwards. It is not*/\\n/* clear yet which is better.*/\\n/* @ts-ignore enablePropertyOverrides does its own input validation*/\\nenablePropertyOverrides[\\\"default\\\"](intrinsics$1,overrideTaming,overrideDebug);\\n\\n/* Finally register and optionally freeze all the intrinsics. This*/\\n/* must be the operation that modifies the intrinsics.*/\\nconst toHarden={\\nintrinsics:intrinsics$1,\\nhostIntrinsics,\\nglobals:{\\n/* Harden evaluators*/\\nFunction:commons.globalThis.Function,\\neval:commons.globalThis.eval,\\n/* @ts-ignore Compartment does exist on globalThis*/\\nCompartment:commons.globalThis.Compartment,\\n\\n/* Harden Symbol*/\\nSymbol:commons.globalThis.Symbol}};\\n\\n\\n\\n/* Harden Symbol and properties for initialGlobalPropertyNames in the host realm*/\\nfor(const prop of commons.getOwnPropertyNames(permits.initialGlobalPropertyNames)){\\ntoHarden.globals[prop]=commons.globalThis[prop];}\\n\\n\\ntamedHarden(toHarden);\\n\\nreturn tamedHarden;};\\n\\n\\nreturn hardenIntrinsics;};exports.repairIntrinsics=repairIntrinsics;\",\n \"node_modules/ses/src/make-eval-function.js\": \"'use strict';Object.defineProperty(exports,'__esModule',{value:true});/**\\n * makeEvalFunction()\\n * A safe version of the native eval function which relies on\\n * the safety of safeEvaluate for confinement.\\n *\\n * @param {Function} safeEvaluate\\n */\\nconst makeEvalFunction=(safeEvaluate)=>{\\n/* We use the concise method syntax to create an eval without a*/\\n/* [[Construct]] behavior (such that the invocation \\\"new eval()\\\" throws*/\\n/* TypeError: eval is not a constructor\\\"), but which still accepts a*/\\n/* 'this' binding.*/\\nconst newEval={\\neval(source){\\nif(typeof source!=='string'){\\n/* As per the runtime semantic of PerformEval [ECMAScript 18.2.1.1]:*/\\n/* If Type(source) is not String, return source.*/\\n/* TODO Recent proposals from Mike Samuel may change this non-string*/\\n/* rule. Track.*/\\nreturn source;}\\n\\nreturn safeEvaluate(source);}}.\\n\\neval;\\n\\nreturn newEval;};exports.makeEvalFunction=makeEvalFunction;\",\n \"node_modules/ses/src/make-evaluate.js\": \"'use strict';Object.defineProperty(exports,'__esModule',{value:true});var commons=require('./commons.js');var\\n\\n\\n\\n\\nscopeConstants=require('./scope-constants.js');/* @ts-check*/ /**\\n * buildOptimizer()\\n * Given an array of identifiers, the optimizer returns a `const` declaration\\n * destructuring `this.${name}`.\\n *\\n * @param {Array<string>} constants\\n * @param {string} name\\n */\\nfunction buildOptimizer(constants,name){\\n/* No need to build an optimizer when there are no constants.*/\\nif(constants.length===0)return'';\\n/* Use 'this' to avoid going through the scope proxy, which is unnecessary*/\\n/* since the optimizer only needs references to the safe global.*/\\n/* Destructure the constants from the target scope object.*/\\nreturn`const {${commons.arrayJoin(constants,',')}} = this.${name};`;}\\n\\n\\n/**\\n * makeEvaluate()\\n * Create an 'evaluate' function with the correct optimizer inserted.\\n *\\n * @param {object} context\\n * @param {object} context.evalScope\\n * @param {object} context.moduleLexicals\\n * @param {object} context.globalObject\\n * @param {object} context.scopeTerminator\\n */\\nconst makeEvaluate=(context)=>{\\nconst{globalObjectConstants,moduleLexicalConstants}=scopeConstants.getScopeConstants(\\ncontext.globalObject,\\ncontext.moduleLexicals);\\n\\nconst globalObjectOptimizer=buildOptimizer(\\nglobalObjectConstants,\\n'globalObject');\\n\\nconst moduleLexicalOptimizer=buildOptimizer(\\nmoduleLexicalConstants,\\n'moduleLexicals');\\n\\n\\n/* Create a function in sloppy mode, so that we can use 'with'. It returns*/\\n/* a function in strict mode that evaluates the provided code using direct*/\\n/* eval, and thus in strict mode in the same scope. We must be very careful*/\\n/* to not create new names in this scope*/\\n\\n/* 1: we use multiple nested 'with' to catch all free variable names. The*/\\n/* `this` value of the outer sloppy function holds the different scope*/\\n/* layers, from inner to outer:*/\\n/* a) `evalScope` which must release the `FERAL_EVAL` as 'eval' once for*/\\n/* every invocation of the inner `evaluate` function in order to*/\\n/* trigger direct eval. The direct eval semantics is what allows the*/\\n/* evaluated code to lookup free variable names on the other scope*/\\n/* objects and not in global scope.*/\\n/* b) `moduleLexicals` which provide a way to introduce free variables*/\\n/* that are not available on the globalObject.*/\\n/* c) `globalObject` is the global scope object of the evaluator, aka the*/\\n/* Compartment's `globalThis`.*/\\n/* d) `scopeTerminator` is a proxy object which prevents free variable*/\\n/* lookups to escape to the start compartment's global object.*/\\n/* 2: `optimizer`s catch constant variable names for speed.*/\\n/* 3: The inner strict `evaluate` function should be passed two parameters:*/\\n/* a) its arguments[0] is the source to be directly evaluated.*/\\n/* b) its 'this' is the this binding seen by the code being*/\\n/* directly evaluated (the globalObject).*/\\n\\n/* Notes:*/\\n/* - The `optimizer` strings only lookup values on the `globalObject` and*/\\n/* `moduleLexicals` objects by construct. Keywords like 'function' are*/\\n/* reserved and cannot be used as a variable, so they are excluded from the*/\\n/* optimizer. Furthermore to prevent shadowing 'eval', while a valid*/\\n/* identifier, that name is also explicitly excluded.*/\\n/* - when 'eval' is looked up in the `evalScope`, the powerful unsafe eval*/\\n/* intrinsic is returned after automatically removing it from the*/\\n/* `evalScope`. Any further reference to 'eval' in the evaluate string will*/\\n/* get the tamed evaluator from the `globalObject`, if any.*/\\n\\n/* TODO https://github.com/endojs/endo/issues/816*/\\n/* The optimizer currently runs under sloppy mode, and although we doubt that*/\\n/* there is any vulnerability introduced just by running the optimizer*/\\n/* sloppy, we are much more confident in the semantics of strict mode.*/\\n/* The `evaluate` function can be and is reused across multiple evaluations.*/\\n/* Since the optimizer should not be re-evaluated every time, it cannot be*/\\n/* inside the `evaluate` closure. While we could potentially nest an*/\\n/* intermediate layer of `() => {'use strict'; ${optimizers}; ...`, it*/\\n/* doesn't seem worth the overhead and complexity.*/\\nconst evaluateFactory=commons.FERAL_FUNCTION(`\\n with (this.scopeTerminator) {\\n with (this.globalObject) {\\n with (this.moduleLexicals) {\\n with (this.evalScope) {\\n ${globalObjectOptimizer}\\n ${moduleLexicalOptimizer}\\n return function() {\\n 'use strict';\\n return eval(arguments[0]);\\n };\\n }\\n }\\n }\\n }\\n `);\\n\\nreturn commons.apply(evaluateFactory,context,[]);};exports.makeEvaluate=makeEvaluate;\",\n \"node_modules/ses/src/make-function-constructor.js\": \"'use strict';Object.defineProperty(exports,'__esModule',{value:true});var commons=require('./commons.js');var assert=require('./error/assert.js');\\n\\n\\n\\n\\n\\n\\n\\n\\nconst{Fail}=assert.assert;\\n\\n/* * makeFunctionConstructor()\\n * A safe version of the native Function which relies on\\n * the safety of safeEvaluate for confinement.\\n */\\n\\nconst makeFunctionConstructor=(safeEvaluate)=>{\\n/* Define an unused parameter to ensure Function.length === 1*/\\nconst newFunction=function Function(_body){\\n/* Sanitize all parameters at the entry point.*/\\n/* eslint-disable-next-line prefer-rest-params*/\\nconst bodyText=`${commons.arrayPop(arguments)||''}`;\\n/* eslint-disable-next-line prefer-rest-params*/\\nconst parameters=`${commons.arrayJoin(arguments,',')}`;\\n\\n/* Are parameters and bodyText valid code, or is someone*/\\n/* attempting an injection attack? This will throw a SyntaxError if:*/\\n/* - parameters doesn't parse as parameters*/\\n/* - bodyText doesn't parse as a function body*/\\n/* - either contain a call to super() or references a super property.*/\\n/**/\\n/* It seems that XS may still be vulnerable to the attack explained at*/\\n/* https://github.com/tc39/ecma262/pull/2374#issuecomment-813769710*/\\n/* where `new Function('/*', '*X/ ) {')` would incorrectly validate.*/\\n/* Before we worried about this, we check the parameters and bodyText*/\\n/* together in one call*/\\n/* ```js*/\\n/* new FERAL_FUNCTION(parameters, bodyTest);*/\\n/* ```*/\\n/* However, this check is vulnerable to that bug. Aside from that case,*/\\n/* all engines do seem to validate the parameters, taken by themselves,*/\\n/* correctly. And all engines do seem to validate the bodyText, taken*/\\n/* by itself correctly. So with the following two checks, SES builds a*/\\n/* correct safe `Function` constructor by composing two calls to an*/\\n/* original unsafe `Function` constructor that may suffer from this bug*/\\n/* but is otherwise correctly validating.*/\\n/**/\\n/* eslint-disable-next-line no-new*/\\nnew commons.FERAL_FUNCTION(parameters,'');\\n/* eslint-disable-next-line no-new*/\\nnew commons.FERAL_FUNCTION(bodyText);\\n\\n/* Safe to be combined. Defeat potential trailing comments.*/\\n/* TODO: since we create an anonymous function, the 'this' value*/\\n/* isn't bound to the global object as per specs, but set as undefined.*/\\nconst src=`(function anonymous(${parameters}\\\\n) {\\\\n${bodyText}\\\\n})`;\\nreturn safeEvaluate(src);};\\n\\n\\ncommons.defineProperties(newFunction,{\\n/* Ensure that any function created in any evaluator in a realm is an*/\\n/* instance of Function in any evaluator of the same realm.*/\\nprototype:{\\nvalue:commons.FERAL_FUNCTION.prototype,\\nwritable:false,\\nenumerable:false,\\nconfigurable:false}});\\n\\n\\n\\n/* Assert identity of Function.__proto__ accross all compartments*/\\ncommons.getPrototypeOf(commons.FERAL_FUNCTION)===commons.FERAL_FUNCTION.prototype||\\nFail`Function prototype is the same accross compartments`;\\ncommons.getPrototypeOf(newFunction)===commons.FERAL_FUNCTION.prototype||\\nFail`Function constructor prototype is the same accross compartments`;\\n\\nreturn newFunction;};exports.makeFunctionConstructor=makeFunctionConstructor;\",\n \"node_modules/ses/src/make-hardener.js\": \"'use strict';Object.defineProperty(exports,'__esModule',{value:true});var commons=require('./commons.js');var\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\nassert=require('./error/assert.js');/* Adapted from SES/Caja - Copyright (C) 2011 Google Inc.*/ /**\\n * @import {Harden} from '../types.js'\\n */ /* Obtain the string tag accessor of of TypedArray so we can indirectly use the*/ /* TypedArray brand check it employs.*/const typedArrayToStringTag=commons.getOwnPropertyDescriptor(commons.typedArrayPrototype,\\ncommons.toStringTagSymbol);\\n\\nassert.assert(typedArrayToStringTag);\\nconst getTypedArrayToStringTag=typedArrayToStringTag.get;\\nassert.assert(getTypedArrayToStringTag);\\n\\n/* Exported for tests.*/\\n/**\\n * Duplicates packages/marshal/src/helpers/passStyle-helpers.js to avoid a dependency.\\n *\\n * @param {unknown} object\\n */\\nconst isTypedArray=(object)=>{\\n/* The object must pass a brand check or toStringTag will return undefined.*/\\nconst tag=commons.apply(getTypedArrayToStringTag,object,[]);\\nreturn tag!==undefined;};\\n\\n\\n/**\\n * Tests if a property key is an integer-valued canonical numeric index.\\n * https://tc39.es/ecma262/#sec-canonicalnumericindexstring\\n *\\n * @param {string | symbol} propertyKey\\n */\\nconst isCanonicalIntegerIndexString=(propertyKey)=>{\\nconst n=+commons.String(propertyKey);\\nreturn commons.isInteger(n)&&commons.String(n)===propertyKey;};\\n\\n\\n/**\\n * @template T\\n * @param {ArrayLike<T>} array\\n */\\nconst freezeTypedArray=(array)=>{\\ncommons.preventExtensions(array);\\n\\n/* Downgrade writable expandos to readonly, even if non-configurable.*/\\n/* We get each descriptor individually rather than using*/\\n/* getOwnPropertyDescriptors in order to fail safe when encountering*/\\n/* an obscure GraalJS issue where getOwnPropertyDescriptor returns*/\\n/* undefined for a property that does exist.*/\\ncommons.arrayForEach(commons.ownKeys(array),(/** @type {string | symbol} */name)=>{\\nconst desc=commons.getOwnPropertyDescriptor(array,name);\\nassert.assert(desc);\\n/* TypedArrays are integer-indexed exotic objects, which define special*/\\n/* treatment for property names in canonical numeric form:*/\\n/* integers in range are permanently writable and non-configurable.*/\\n/* https://tc39.es/ecma262/#sec-integer-indexed-exotic-objects*/\\n/**/\\n/* This is analogous to the data of a hardened Map or Set,*/\\n/* so we carve out this exceptional behavior but make all other*/\\n/* properties non-configurable.*/\\nif(!isCanonicalIntegerIndexString(name)){\\ncommons.defineProperty(array,name,{\\n...desc,\\nwritable:false,\\nconfigurable:false});}});};\\n\\n\\n\\n\\n\\n/**\\n * Create a `harden` function.\\n *\\n * @returns {Harden}\\n */\\nconst makeHardener=()=>{\\n/* Use a native hardener if possible.*/\\nif(typeof commons.globalThis.harden==='function'){\\nconst safeHarden=commons.globalThis.harden;\\nreturn safeHarden;}\\n\\n\\nconst hardened=new commons.WeakSet();\\n\\nconst{harden}={\\n/**\\n * @template T\\n * @param {T} root\\n * @returns {T}\\n */\\nharden(root){\\nconst toFreeze=new commons.Set();\\n\\n/* If val is something we should be freezing but aren't yet,*/\\n/* add it to toFreeze.*/\\n/**\\n * @param {any} val\\n */\\nfunction enqueue(val){\\nif(!commons.isObject(val)){\\n/* ignore primitives*/\\nreturn;}\\n\\nconst type=typeof val;\\nif(type!=='object'&&type!=='function'){\\n/* future proof: break until someone figures out what it should do*/\\nthrow commons.TypeError(`Unexpected typeof: ${type}`);}\\n\\nif(commons.weaksetHas(hardened,val)||commons.setHas(toFreeze,val)){\\n/* Ignore if this is an exit, or we've already visited it*/\\nreturn;}\\n\\n/* console.warn(`adding ${val} to toFreeze`, val);*/\\ncommons.setAdd(toFreeze,val);}\\n\\n\\n/**\\n * @param {any} obj\\n */\\nconst baseFreezeAndTraverse=(obj)=>{\\n/* Now freeze the object to ensure reactive*/\\n/* objects such as proxies won't add properties*/\\n/* during traversal, before they get frozen.*/\\n\\n/* Object are verified before being enqueued,*/\\n/* therefore this is a valid candidate.*/\\n/* Throws if this fails (strict mode).*/\\n/* Also throws if the object is an ArrayBuffer or any TypedArray.*/\\nif(isTypedArray(obj)){\\nfreezeTypedArray(obj);}else\\n{\\ncommons.freeze(obj);}\\n\\n\\n/* we rely upon certain commitments of Object.freeze and proxies here*/\\n\\n/* get stable/immutable outbound links before a Proxy has a chance to do*/\\n/* something sneaky.*/\\nconst descs=commons.getOwnPropertyDescriptors(obj);\\nconst proto=commons.getPrototypeOf(obj);\\nenqueue(proto);\\n\\ncommons.arrayForEach(commons.ownKeys(descs),(/** @type {string | symbol} */name)=>{\\n/* The 'name' may be a symbol, and TypeScript doesn't like us to*/\\n/* index arbitrary symbols on objects, so we pretend they're just*/\\n/* strings.*/\\nconst desc=descs[/** @type {string} */name];\\n/* getOwnPropertyDescriptors is guaranteed to return well-formed*/\\n/* descriptors, but they still inherit from Object.prototype. If*/\\n/* someone has poisoned Object.prototype to add 'value' or 'get'*/\\n/* properties, then a simple 'if (\\\"value\\\" in desc)' or 'desc.value'*/\\n/* test could be confused. We use hasOwnProperty to be sure about*/\\n/* whether 'value' is present or not, which tells us for sure that*/\\n/* this is a data property.*/\\nif(commons.objectHasOwnProperty(desc,'value')){\\nenqueue(desc.value);}else\\n{\\nenqueue(desc.get);\\nenqueue(desc.set);}});};\\n\\n\\n\\n\\nconst freezeAndTraverse=\\ncommons.FERAL_STACK_GETTER===undefined&&commons.FERAL_STACK_SETTER===undefined?\\n/* On platforms without v8's error own stack accessor problem,*/\\n/* don't pay for any extra overhead.*/\\nbaseFreezeAndTraverse:\\n(obj)=>{\\nif(commons.isError(obj)){\\n/* Only pay the overhead if it first passes this cheap isError*/\\n/* check. Otherwise, it will be unrepaired, but won't be judged*/\\n/* to be a passable error anyway, so will not be unsafe.*/\\nconst stackDesc=commons.getOwnPropertyDescriptor(obj,'stack');\\nif(\\nstackDesc&&\\nstackDesc.get===commons.FERAL_STACK_GETTER&&\\nstackDesc.configurable)\\n{\\n/* Can only repair if it is configurable. Otherwise, leave*/\\n/* unrepaired, in which case it will not be judged passable,*/\\n/* avoiding a safety problem.*/\\ncommons.defineProperty(obj,'stack',{\\n/* NOTE: Calls getter during harden, which seems dangerous.*/\\n/* But we're only calling the problematic getter whose*/\\n/* hazards we think we understand.*/\\n/* @ts-expect-error TS should know FERAL_STACK_GETTER*/\\n/* cannot be `undefined` here.*/\\n/* See https://github.com/endojs/endo/pull/2232#discussion_r1575179471*/\\nvalue:commons.apply(commons.FERAL_STACK_GETTER,obj,[])});}}\\n\\n\\n\\nreturn baseFreezeAndTraverse(obj);};\\n\\n\\nconst dequeue=()=>{\\n/* New values added before forEach() has finished will be visited.*/\\ncommons.setForEach(toFreeze,freezeAndTraverse);};\\n\\n\\n/** @param {any} value */\\nconst markHardened=(value)=>{\\ncommons.weaksetAdd(hardened,value);};\\n\\n\\nconst commit=()=>{\\ncommons.setForEach(toFreeze,markHardened);};\\n\\n\\nenqueue(root);\\ndequeue();\\n/* console.warn(\\\"toFreeze set:\\\", toFreeze);*/\\ncommit();\\n\\nreturn root;}};\\n\\n\\n\\nreturn harden;};exports.isTypedArray=isTypedArray;exports.makeHardener=makeHardener;\",\n \"node_modules/ses/src/make-lru-cachemap.js\": \"'use strict';\\n\\n\\nObject.defineProperty(exports,'__esModule',{value:true});/* @ts-check*/ /* eslint-disable @endo/no-polymorphic-call */ /* eslint-disable-next-line no-restricted-globals*/\\nconst{isSafeInteger}=Number;\\n/* eslint-disable-next-line no-restricted-globals*/\\nconst{freeze}=Object;\\n/* eslint-disable-next-line no-restricted-globals*/\\nconst{toStringTag:toStringTagSymbol}=Symbol;\\n\\n/**\\n * @template Data\\n * @typedef {object} DoublyLinkedCell\\n * A cell of a doubly-linked ring, i.e., a doubly-linked circular list.\\n * DoublyLinkedCells are not frozen, and so should be closely encapsulated by\\n * any abstraction that uses them.\\n * @property {DoublyLinkedCell<Data>} next\\n * @property {DoublyLinkedCell<Data>} prev\\n * @property {Data} data\\n */\\n\\n/**\\n * Makes a new self-linked cell. There are two reasons to do so:\\n * * To make the head sigil of a new initially-empty doubly-linked ring.\\n * * To make a non-sigil cell to be `spliceAfter`ed.\\n *\\n * @template Data\\n * @param {Data} data\\n * @returns {DoublyLinkedCell<Data>}\\n */\\nconst makeSelfCell=(data)=>{\\n/** @type {Partial<DoublyLinkedCell<Data>>} */\\nconst incompleteCell={\\nnext:undefined,\\nprev:undefined,\\ndata};\\n\\nconst selfCell=/** @type {DoublyLinkedCell<Data>} */incompleteCell;\\nselfCell.next=selfCell;\\nselfCell.prev=selfCell;\\n/* Not frozen!*/\\nreturn selfCell;};\\n\\n\\n/**\\n * Splices a self-linked non-sigil cell into a ring after `prev`.\\n * `prev` could be the head sigil, or it could be some other non-sigil\\n * cell within a ring.\\n *\\n * @template Data\\n * @param {DoublyLinkedCell<Data>} prev\\n * @param {DoublyLinkedCell<Data>} selfCell\\n */\\nconst spliceAfter=(prev,selfCell)=>{\\nif(prev===selfCell){\\n/* eslint-disable-next-line no-restricted-globals*/\\nthrow TypeError('Cannot splice a cell into itself');}\\n\\nif(selfCell.next!==selfCell||selfCell.prev!==selfCell){\\n/* eslint-disable-next-line no-restricted-globals*/\\nthrow TypeError('Expected self-linked cell');}\\n\\nconst cell=selfCell;\\n/* rename variable cause it isn't self-linked after this point.*/\\n\\nconst next=prev.next;\\ncell.prev=prev;\\ncell.next=next;\\nprev.next=cell;\\nnext.prev=cell;\\n/* Not frozen!*/\\nreturn cell;};\\n\\n\\n/**\\n * @template Data\\n * @param {DoublyLinkedCell<Data>} cell\\n * No-op if the cell is self-linked.\\n */\\nconst spliceOut=(cell)=>{\\nconst{prev,next}=cell;\\nprev.next=next;\\nnext.prev=prev;\\ncell.prev=cell;\\ncell.next=cell;};\\n\\n\\n/**\\n * The LRUCacheMap is used within the implementation of `assert` and so\\n * at a layer below SES or harden. Thus, we give it a `WeakMap`-like interface\\n * rather than a `WeakMapStore`-like interface. To work before `lockdown`,\\n * the implementation must use `freeze` manually, but still exhaustively.\\n *\\n * It implements the WeakMap interface, and holds its keys weakly. Cached\\n * values are only held while the key is held by the user and the key/value\\n * bookkeeping cell has not been pushed off the end of the cache by `budget`\\n * number of more recently referenced cells. If the key is dropped by the user,\\n * the value will no longer be held by the cache, but the bookkeeping cell\\n * itself will stay in memory.\\n *\\n * @template {{}} K\\n * @template {unknown} V\\n * @param {number} keysBudget\\n * @returns {WeakMap<K,V>}\\n */\\nconst makeLRUCacheMap=(keysBudget)=>{\\nif(!isSafeInteger(keysBudget)||keysBudget<0){\\n/* eslint-disable-next-line no-restricted-globals*/\\nthrow TypeError('keysBudget must be a safe non-negative integer number');}\\n\\n/** @typedef {DoublyLinkedCell<WeakMap<K, V> | undefined>} LRUCacheCell */\\n/** @type {WeakMap<K, LRUCacheCell>} */\\n/* eslint-disable-next-line no-restricted-globals*/\\nconst keyToCell=new WeakMap();\\nlet size=0;/* `size` must remain <= `keysBudget`*/\\n/* As a sigil, `head` uniquely is not in the `keyToCell` map.*/\\n/** @type {LRUCacheCell} */\\nconst head=makeSelfCell(undefined);\\n\\nconst touchCell=(key)=>{\\nconst cell=keyToCell.get(key);\\nif(cell===undefined||cell.data===undefined){\\n/* Either the key was GCed, or the cell was condemned.*/\\nreturn undefined;}\\n\\n/* Becomes most recently used*/\\nspliceOut(cell);\\nspliceAfter(head,cell);\\nreturn cell;};\\n\\n\\n/**\\n * @param {K} key\\n */\\nconst has=(key)=>touchCell(key)!==undefined;\\nfreeze(has);\\n\\n/**\\n * @param {K} key\\n */\\n/* UNTIL https://github.com/endojs/endo/issues/1514*/\\n/* Prefer: const get = key => touchCell(key)?.data?.get(key);*/\\nconst get=(key)=>{\\nconst cell=touchCell(key);\\nreturn cell&&cell.data&&cell.data.get(key);};\\n\\nfreeze(get);\\n\\n/**\\n * @param {K} key\\n * @param {V} value\\n */\\nconst set=(key,value)=>{\\nif(keysBudget<1){\\n/* eslint-disable-next-line no-use-before-define*/\\nreturn lruCacheMap;/* Implements WeakMap.set*/}\\n\\n\\nlet cell=touchCell(key);\\nif(cell===undefined){\\ncell=makeSelfCell(undefined);\\nspliceAfter(head,cell);/* start most recently used*/}\\n\\nif(!cell.data){\\n/* Either a fresh cell or a reused condemned cell.*/\\nsize+=1;\\n/* Add its data.*/\\n/* eslint-disable-next-line no-restricted-globals*/\\ncell.data=new WeakMap();\\n/* Advertise the cell for this key.*/\\nkeyToCell.set(key,cell);\\nwhile(size>keysBudget){\\nconst condemned=head.prev;\\nspliceOut(condemned);/* Drop least recently used*/\\ncondemned.data=undefined;\\nsize-=1;}}\\n\\n\\n\\n/* Update the data.*/\\ncell.data.set(key,value);\\n\\n/* eslint-disable-next-line no-use-before-define*/\\nreturn lruCacheMap;/* Implements WeakMap.set*/};\\n\\nfreeze(set);\\n\\n/* \\\"delete\\\" is a keyword.*/\\n/**\\n * @param {K} key\\n */\\nconst deleteIt=(key)=>{\\nconst cell=keyToCell.get(key);\\nif(cell===undefined){\\nreturn false;}\\n\\nspliceOut(cell);\\nkeyToCell.delete(key);\\nif(cell.data===undefined){\\n/* Already condemned.*/\\nreturn false;}\\n\\n\\ncell.data=undefined;\\nsize-=1;\\nreturn true;};\\n\\nfreeze(deleteIt);\\n\\nconst lruCacheMap=freeze({\\nhas,\\nget,\\nset,\\ndelete:deleteIt,\\n/* eslint-disable-next-line jsdoc/check-types*/\\n[/** @type {typeof Symbol.toStringTag} */toStringTagSymbol]:\\n'LRUCacheMap'});\\n\\nreturn lruCacheMap;};\\n\\nfreeze(makeLRUCacheMap);exports.makeLRUCacheMap=makeLRUCacheMap;\",\n \"node_modules/ses/src/make-safe-evaluator.js\": \"'use strict';Object.defineProperty(exports,'__esModule',{value:true});var commons=require('./commons.js');var strictScopeTerminator=require('./strict-scope-terminator.js');var sloppyGlobalsScopeTerminator=require('./sloppy-globals-scope-terminator.js');var evalScope=require('./eval-scope.js');var transforms=require('./transforms.js');var makeEvaluate=require('./make-evaluate.js');var assert=require('./error/assert.js');/* Portions adapted from V8 - Copyright 2016 the V8 project authors.*/\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\nconst{Fail}=assert.assert;\\n\\n/**\\n * makeSafeEvaluator()\\n * Build the low-level operation used by all evaluators:\\n * eval(), Function(), Compartment.prototype.evaluate().\\n *\\n * @param {object} options\\n * @param {object} options.globalObject\\n * @param {object} [options.moduleLexicals]\\n * @param {Array<IMPORT('./lockdown.js').Transform>} [options.globalTransforms]\\n * @param {boolean} [options.sloppyGlobalsMode]\\n */\\nconst makeSafeEvaluator=({\\nglobalObject,\\nmoduleLexicals={},\\nglobalTransforms=[],\\nsloppyGlobalsMode=false})=>\\n{\\nconst scopeTerminator=sloppyGlobalsMode?\\nsloppyGlobalsScopeTerminator.createSloppyGlobalsScopeTerminator(globalObject):\\nstrictScopeTerminator.strictScopeTerminator;\\nconst evalScopeKit=evalScope.makeEvalScopeKit();\\nconst{evalScope:evalScope$1}=evalScopeKit;\\n\\nconst evaluateContext=commons.freeze({\\nevalScope:evalScope$1,\\nmoduleLexicals,\\nglobalObject,\\nscopeTerminator});\\n\\n\\n/* Defer creating the actual evaluator to first use.*/\\n/* Creating a compartment should be possible in no-eval environments*/\\n/* It also allows more global constants to be captured by the optimizer*/\\nlet evaluate;\\nconst provideEvaluate=()=>{\\nif(!evaluate){\\nevaluate=makeEvaluate.makeEvaluate(evaluateContext);}};\\n\\n\\n\\n/**\\n * @param {string} source\\n * @param {object} [options]\\n * @param {Array<IMPORT('./lockdown.js').Transform>} [options.localTransforms]\\n */\\nconst safeEvaluate=(source,options)=>{\\nconst{localTransforms=[]}=options||{};\\nprovideEvaluate();\\n\\n/* Execute the mandatory transforms last to ensure that any rewritten code*/\\n/* meets those mandatory requirements.*/\\nsource=transforms.applyTransforms(source,[\\n...localTransforms,\\n...globalTransforms,\\ntransforms.mandatoryTransforms]);\\n\\n\\nlet err;\\ntry{\\n/* Allow next reference to eval produce the unsafe FERAL_EVAL.*/\\n/* eslint-disable-next-line @endo/no-polymorphic-call*/\\nevalScopeKit.allowNextEvalToBeUnsafe();\\n\\n/* Ensure that \\\"this\\\" resolves to the safe global.*/\\nreturn commons.apply(evaluate,globalObject,[source]);}\\ncatch(e){\\n/* stash the child-code error in hopes of debugging the internal failure*/\\nerr=e;\\nthrow e;}finally\\n{\\nconst unsafeEvalWasStillExposed=('eval'in evalScope$1);\\ndelete evalScope$1.eval;\\nif(unsafeEvalWasStillExposed){\\n/* Barring a defect in the SES shim, the evalScope should allow the*/\\n/* powerful, unsafe `eval` to be used by `evaluate` exactly once, as the*/\\n/* very first name that it attempts to access from the lexical scope.*/\\n/* A defect in the SES shim could throw an exception after we set*/\\n/* `evalScope.eval` and before `evaluate` calls `eval` internally.*/\\n/* If we get here, SES is very broken.*/\\n/* This condition is one where this vat is now hopelessly confused, and*/\\n/* the vat as a whole should be aborted.*/\\n/* No further code should run.*/\\n/* All immediately reachable state should be abandoned.*/\\n/* However, that is not yet possible, so we at least prevent further*/\\n/* variable resolution via the scopeHandler, and throw an error with*/\\n/* diagnostic info including the thrown error if any from evaluating the*/\\n/* source code.*/\\nevalScopeKit.revoked={err};\\n/* TODO A GOOD PLACE TO PANIC(), i.e., kill the vat incarnation.*/\\n/* See https://github.com/Agoric/SES-shim/issues/490*/\\nFail`handler did not reset allowNextEvalToBeUnsafe ${err}`;}}};\\n\\n\\n\\n\\nreturn{safeEvaluate};};exports.makeSafeEvaluator=makeSafeEvaluator;\",\n \"node_modules/ses/src/module-instance.js\": \"'use strict';Object.defineProperty(exports,'__esModule',{value:true});var assert=require('./error/assert.js');var moduleProxy=require('./module-proxy.js');var commons=require('./commons.js');var compartmentEvaluate=require('./compartment-evaluate.js');\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\nconst{quote:q}=assert.assert;\\n\\nconst makeThirdPartyModuleInstance=(\\ncompartmentPrivateFields,\\nstaticModuleRecord,\\ncompartment,\\nmoduleAliases,\\nmoduleSpecifier,\\nresolvedImports)=>\\n{\\nconst{exportsProxy,exportsTarget,activate}=moduleProxy.getDeferredExports(\\ncompartment,\\ncommons.weakmapGet(compartmentPrivateFields,compartment),\\nmoduleAliases,\\nmoduleSpecifier);\\n\\n\\nconst notifiers=commons.create(null);\\n\\nif(staticModuleRecord.exports){\\nif(\\n!commons.isArray(staticModuleRecord.exports)||\\ncommons.arraySome(staticModuleRecord.exports,(name)=>typeof name!=='string'))\\n{\\nthrow commons.TypeError(\\n`SES third-party static module record \\\"exports\\\" property must be an array of strings for module ${moduleSpecifier}`);}\\n\\n\\ncommons.arrayForEach(staticModuleRecord.exports,(name)=>{\\nlet value=exportsTarget[name];\\nconst updaters=[];\\n\\nconst get=()=>value;\\n\\nconst set=(newValue)=>{\\nvalue=newValue;\\nfor(const updater of updaters){\\nupdater(newValue);}};\\n\\n\\n\\ncommons.defineProperty(exportsTarget,name,{\\nget,\\nset,\\nenumerable:true,\\nconfigurable:false});\\n\\n\\nnotifiers[name]=(update)=>{\\ncommons.arrayPush(updaters,update);\\nupdate(value);};});\\n\\n\\n/* This is enough to support import * from cjs - the '*' field doesn't need to be in exports nor exportsTarget because import will only ever access it via notifiers*/\\nnotifiers['*']=(update)=>{\\nupdate(exportsTarget);};}\\n\\n\\n\\nconst localState={\\nactivated:false};\\n\\nreturn commons.freeze({\\nnotifiers,\\nexportsProxy,\\nexecute(){\\nif(commons.reflectHas(localState,'errorFromExecute')){\\nthrow localState.errorFromExecute;}\\n\\nif(!localState.activated){\\nactivate();\\nlocalState.activated=true;\\ntry{\\n/* eslint-disable-next-line @endo/no-polymorphic-call*/\\nstaticModuleRecord.execute(\\nexportsTarget,\\ncompartment,\\nresolvedImports);}\\n\\ncatch(err){\\nlocalState.errorFromExecute=err;\\nthrow err;}}}});};\\n\\n\\n\\n\\n\\n\\n/* `makeModuleInstance` takes a module's compartment record, the live import*/\\n/* namespace, and a global object; and produces a module instance.*/\\n/* The module instance carries the proxied module exports namespace (the*/\\n/* \\\"exports\\\"), notifiers to update the module's internal import namespace, and*/\\n/* an idempotent execute function.*/\\n/* The module exports namespace is a proxy to the proxied exports namespace*/\\n/* that the execution of the module instance populates.*/\\nconst makeModuleInstance=(\\nprivateFields,\\nmoduleAliases,\\nmoduleRecord,\\nimportedInstances)=>\\n{\\nconst{\\ncompartment,\\nmoduleSpecifier,\\nstaticModuleRecord,\\nimportMeta:moduleRecordMeta}=\\nmoduleRecord;\\nconst{\\nreexports:exportAlls=[],\\n__syncModuleProgram__:functorSource,\\n__fixedExportMap__:fixedExportMap={},\\n__liveExportMap__:liveExportMap={},\\n__reexportMap__:reexportMap={},\\n__needsImportMeta__:needsImportMeta=false,\\n__syncModuleFunctor__}=\\nstaticModuleRecord;\\n\\nconst compartmentFields=commons.weakmapGet(privateFields,compartment);\\n\\nconst{__shimTransforms__,importMetaHook}=compartmentFields;\\n\\nconst{exportsProxy,exportsTarget,activate}=moduleProxy.getDeferredExports(\\ncompartment,\\ncompartmentFields,\\nmoduleAliases,\\nmoduleSpecifier);\\n\\n\\n/* {_exportName_: getter} module exports namespace*/\\n/* object (eventually proxied).*/\\nconst exportsProps=commons.create(null);\\n\\n/* {_localName_: accessor} proxy traps for moduleLexicals and live bindings.*/\\n/* The moduleLexicals object is frozen and the corresponding properties of*/\\n/* moduleLexicals must be immutable, so we copy the descriptors.*/\\nconst moduleLexicals=commons.create(null);\\n\\n/* {_localName_: init(initValue) -> initValue} used by the*/\\n/* rewritten code to initialize exported fixed bindings.*/\\nconst onceVar=commons.create(null);\\n\\n/* {_localName_: update(newValue)} used by the rewritten code to*/\\n/* both initialize and update live bindings.*/\\nconst liveVar=commons.create(null);\\n\\nconst importMeta=commons.create(null);\\nif(moduleRecordMeta){\\ncommons.assign(importMeta,moduleRecordMeta);}\\n\\nif(needsImportMeta&&importMetaHook){\\nimportMetaHook(moduleSpecifier,importMeta);}\\n\\n\\n/* {_localName_: [{get, set, notify}]} used to merge all the export updaters.*/\\nconst localGetNotify=commons.create(null);\\n\\n/* {[importName: string]: notify(update(newValue))} Used by code that imports*/\\n/* one of this module's exports, so that their update function will*/\\n/* be notified when this binding is initialized or updated.*/\\nconst notifiers=commons.create(null);\\n\\ncommons.arrayForEach(commons.entries(fixedExportMap),([fixedExportName,[localName]])=>{\\nlet fixedGetNotify=localGetNotify[localName];\\nif(!fixedGetNotify){\\n/* fixed binding state*/\\nlet value;\\nlet tdz=true;\\n/** @type {null | Array<(value: any) => void>} */\\nlet optUpdaters=[];\\n\\n/* tdz sensitive getter*/\\nconst get=()=>{\\nif(tdz){\\nthrow commons.ReferenceError(`binding ${q(localName)} not yet initialized`);}\\n\\nreturn value;};\\n\\n\\n/* leave tdz once*/\\nconst init=commons.freeze((initValue)=>{\\n/* init with initValue of a declared const binding, and return*/\\n/* it.*/\\nif(!tdz){\\nthrow commons.TypeError(\\n`Internal: binding ${q(localName)} already initialized`);}\\n\\n\\nvalue=initValue;\\nconst updaters=optUpdaters;\\noptUpdaters=null;\\ntdz=false;\\nfor(const updater of updaters||[]){\\nupdater(initValue);}\\n\\nreturn initValue;});\\n\\n\\n/* If still tdz, register update for notification later.*/\\n/* Otherwise, update now.*/\\nconst notify=(updater)=>{\\nif(updater===init){\\n/* Prevent recursion.*/\\nreturn;}\\n\\nif(tdz){\\ncommons.arrayPush(optUpdaters||[],updater);}else\\n{\\nupdater(value);}};\\n\\n\\n\\n/* Need these for additional exports of the local variable.*/\\nfixedGetNotify={\\nget,\\nnotify};\\n\\nlocalGetNotify[localName]=fixedGetNotify;\\nonceVar[localName]=init;}\\n\\n\\nexportsProps[fixedExportName]={\\nget:fixedGetNotify.get,\\nset:undefined,\\nenumerable:true,\\nconfigurable:false};\\n\\n\\nnotifiers[fixedExportName]=fixedGetNotify.notify;});\\n\\n\\ncommons.arrayForEach(\\ncommons.entries(liveExportMap),\\n([liveExportName,[localName,setProxyTrap]])=>{\\nlet liveGetNotify=localGetNotify[localName];\\nif(!liveGetNotify){\\n/* live binding state*/\\nlet value;\\nlet tdz=true;\\nconst updaters=[];\\n\\n/* tdz sensitive getter*/\\nconst get=()=>{\\nif(tdz){\\nthrow commons.ReferenceError(\\n`binding ${q(liveExportName)} not yet initialized`);}\\n\\n\\nreturn value;};\\n\\n\\n/* This must be usable locally for the translation of initializing*/\\n/* a declared local live binding variable.*/\\n/**/\\n/* For reexported variable, this is also an update function to*/\\n/* register for notification with the downstream import, which we*/\\n/* must assume to be live. Thus, it can be called independent of*/\\n/* tdz but always leaves tdz. Such reexporting creates a tree of*/\\n/* bindings. This lets the tree be hooked up even if the imported*/\\n/* module instance isn't initialized yet, as may happen in cycles.*/\\nconst update=commons.freeze((newValue)=>{\\nvalue=newValue;\\ntdz=false;\\nfor(const updater of updaters){\\nupdater(newValue);}});\\n\\n\\n\\n/* tdz sensitive setter*/\\nconst set=(newValue)=>{\\nif(tdz){\\nthrow commons.ReferenceError(`binding ${q(localName)} not yet initialized`);}\\n\\nvalue=newValue;\\nfor(const updater of updaters){\\nupdater(newValue);}};\\n\\n\\n\\n/* Always register the updater function.*/\\n/* If not in tdz, also update now.*/\\nconst notify=(updater)=>{\\nif(updater===update){\\n/* Prevent recursion.*/\\nreturn;}\\n\\ncommons.arrayPush(updaters,updater);\\nif(!tdz){\\nupdater(value);}};\\n\\n\\n\\nliveGetNotify={\\nget,\\nnotify};\\n\\n\\nlocalGetNotify[localName]=liveGetNotify;\\nif(setProxyTrap){\\ncommons.defineProperty(moduleLexicals,localName,{\\nget,\\nset,\\nenumerable:true,\\nconfigurable:false});}\\n\\n\\nliveVar[localName]=update;}\\n\\n\\nexportsProps[liveExportName]={\\nget:liveGetNotify.get,\\nset:undefined,\\nenumerable:true,\\nconfigurable:false};\\n\\n\\nnotifiers[liveExportName]=liveGetNotify.notify;});\\n\\n\\n\\nconst notifyStar=(update)=>{\\nupdate(exportsTarget);};\\n\\nnotifiers['*']=notifyStar;\\n\\n/* Per the calling convention for the moduleFunctor generated from*/\\n/* an ESM, the `imports` function gets called once up front*/\\n/* to populate or arrange the population of imports and reexports.*/\\n/* The generated code produces an `updateRecord`: the means for*/\\n/* the linker to update the imports and exports of the module.*/\\n/* The updateRecord must conform to moduleAnalysis.imports*/\\n/* updateRecord = Map<specifier, importUpdaters>*/\\n/* importUpdaters = Map<importName, [update(newValue)*]>*/\\nfunction imports(updateRecord){\\n/* By the time imports is called, the importedInstances should already be*/\\n/* initialized with module instances that satisfy*/\\n/* imports.*/\\n/* importedInstances = Map[_specifier_, { notifiers, module, execute }]*/\\n/* notifiers = { [importName: string]: notify(update(newValue))}*/\\n\\n/* export * cannot export default.*/\\nconst candidateAll=commons.create(null);\\ncandidateAll.default=false;\\nfor(const[specifier,importUpdaters]of updateRecord){\\nconst instance=commons.mapGet(importedInstances,specifier);\\n/* The module instance object is an internal literal, does not bind this,*/\\n/* and never revealed outside the SES shim.*/\\n/* There are two instantiation sites for instances and they are both in*/\\n/* this module.*/\\n/* eslint-disable-next-line @endo/no-polymorphic-call*/\\ninstance.execute();/* bottom up cycle tolerant*/\\nconst{notifiers:importNotifiers}=instance;\\nfor(const[importName,updaters]of importUpdaters){\\nconst importNotify=importNotifiers[importName];\\nif(!importNotify){\\nthrow commons.SyntaxError(\\n`The requested module '${specifier}' does not provide an export named '${importName}'`);}\\n\\n\\nfor(const updater of updaters){\\nimportNotify(updater);}}\\n\\n\\nif(commons.arrayIncludes(exportAlls,specifier)){\\n/* Make all these imports candidates.*/\\n/* Note names don't change in reexporting all*/\\nfor(const[importAndExportName,importNotify]of commons.entries(\\nimportNotifiers))\\n{\\nif(candidateAll[importAndExportName]===undefined){\\ncandidateAll[importAndExportName]=importNotify;}else\\n{\\n/* Already a candidate: remove ambiguity.*/\\ncandidateAll[importAndExportName]=false;}}}\\n\\n\\n\\nif(reexportMap[specifier]){\\n/* Make named reexports candidates too.*/\\nfor(const[localName,exportedName]of reexportMap[specifier]){\\ncandidateAll[exportedName]=importNotifiers[localName];}}}\\n\\n\\n\\n\\nfor(const[exportName,notify]of commons.entries(candidateAll)){\\nif(!notifiers[exportName]&¬ify!==false){\\nnotifiers[exportName]=notify;\\n\\n/* exported live binding state*/\\nlet value;\\nconst update=(newValue)=>value=newValue;\\nnotify(update);\\nexportsProps[exportName]={\\nget(){\\nreturn value;},\\n\\nset:undefined,\\nenumerable:true,\\nconfigurable:false};}}\\n\\n\\n\\n\\n/* Sort the module exports namespace as per spec.*/\\n/* The module exports namespace will be wrapped in a module namespace*/\\n/* exports proxy which will serve as a \\\"module exports namespace exotic*/\\n/* object\\\".*/\\n/* Sorting properties is not generally reliable because some properties may*/\\n/* be symbols, and symbols do not have an inherent relative order, but*/\\n/* since all properties of the exports namespace must be keyed by a string*/\\n/* and the string must correspond to a valid identifier, sorting these*/\\n/* properties works for this specific case.*/\\ncommons.arrayForEach(commons.arraySort(commons.keys(exportsProps)),(k)=>\\ncommons.defineProperty(exportsTarget,k,exportsProps[k]));\\n\\n\\ncommons.freeze(exportsTarget);\\nactivate();}\\n\\n\\nlet optFunctor;\\nif(__syncModuleFunctor__!==undefined){\\noptFunctor=__syncModuleFunctor__;}else\\n{\\noptFunctor=compartmentEvaluate.compartmentEvaluate(compartmentFields,functorSource,{\\nglobalObject:compartment.globalThis,\\ntransforms:__shimTransforms__,\\n__moduleShimLexicals__:moduleLexicals});}\\n\\n\\nlet didThrow=false;\\nlet thrownError;\\nfunction execute(){\\nif(optFunctor){\\n/* uninitialized*/\\nconst functor=optFunctor;\\noptFunctor=null;\\n/* initializing - call with `this` of `undefined`.*/\\ntry{\\nfunctor(\\ncommons.freeze({\\nimports:commons.freeze(imports),\\nonceVar:commons.freeze(onceVar),\\nliveVar:commons.freeze(liveVar),\\nimportMeta}));}\\n\\n\\ncatch(e){\\ndidThrow=true;\\nthrownError=e;}\\n\\n/* initialized*/}\\n\\nif(didThrow){\\nthrow thrownError;}}\\n\\n\\n\\nreturn commons.freeze({\\nnotifiers,\\nexportsProxy,\\nexecute});};exports.makeModuleInstance=makeModuleInstance;exports.makeThirdPartyModuleInstance=makeThirdPartyModuleInstance;\",\n \"node_modules/ses/src/module-link.js\": \"'use strict';Object.defineProperty(exports,'__esModule',{value:true});var assert=require('./error/assert.js');var moduleInstance=require('./module-instance.js');var commons=require('./commons.js');/* eslint-disable no-underscore-dangle */\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\nconst{Fail,quote:q}=assert.assert;\\n\\n/* `link` creates `ModuleInstances` and `ModuleNamespaces` for a module and its*/\\n/* transitive dependencies and connects their imports and exports.*/\\n/* After linking, the resulting working set is ready to be executed.*/\\n/* The linker only concerns itself with module namespaces that are objects with*/\\n/* property descriptors for their exports, which the Compartment proxies with*/\\n/* the actual `ModuleNamespace`.*/\\nconst link=(\\ncompartmentPrivateFields,\\nmoduleAliases,\\ncompartment,\\nmoduleSpecifier)=>\\n{\\nconst{name:compartmentName,moduleRecords}=commons.weakmapGet(\\ncompartmentPrivateFields,\\ncompartment);\\n\\n\\nconst moduleRecord=commons.mapGet(moduleRecords,moduleSpecifier);\\nif(moduleRecord===undefined){\\nthrow commons.ReferenceError(\\n`Missing link to module ${q(moduleSpecifier)} from compartment ${q(\\ncompartmentName)\\n}`);}\\n\\n\\n\\n/* Mutual recursion so there's no confusion about which*/\\n/* compartment is in context: the module record may be in another*/\\n/* compartment, denoted by moduleRecord.compartment.*/\\n/* eslint-disable-next-line no-use-before-define*/\\nreturn instantiate(compartmentPrivateFields,moduleAliases,moduleRecord);};\\n\\n\\nfunction isPrecompiled(staticModuleRecord){\\nreturn typeof staticModuleRecord.__syncModuleProgram__==='string';}\\n\\n\\nfunction validatePrecompiledStaticModuleRecord(\\nstaticModuleRecord,\\nmoduleSpecifier)\\n{\\nconst{__fixedExportMap__,__liveExportMap__}=staticModuleRecord;\\ncommons.isObject(__fixedExportMap__)||\\nFail`Property '__fixedExportMap__' of a precompiled module record must be an object, got ${q(\\n__fixedExportMap__)\\n}, for module ${q(moduleSpecifier)}`;\\ncommons.isObject(__liveExportMap__)||\\nFail`Property '__liveExportMap__' of a precompiled module record must be an object, got ${q(\\n__liveExportMap__)\\n}, for module ${q(moduleSpecifier)}`;}\\n\\n\\nfunction isThirdParty(staticModuleRecord){\\nreturn typeof staticModuleRecord.execute==='function';}\\n\\n\\nfunction validateThirdPartyStaticModuleRecord(\\nstaticModuleRecord,\\nmoduleSpecifier)\\n{\\nconst{exports}=staticModuleRecord;\\ncommons.isArray(exports)||\\nFail`Property 'exports' of a third-party static module record must be an array, got ${q(\\nexports)\\n}, for module ${q(moduleSpecifier)}`;}\\n\\n\\nfunction validateStaticModuleRecord(staticModuleRecord,moduleSpecifier){\\ncommons.isObject(staticModuleRecord)||\\nFail`Static module records must be of type object, got ${q(\\nstaticModuleRecord)\\n}, for module ${q(moduleSpecifier)}`;\\nconst{imports,exports,reexports=[]}=staticModuleRecord;\\ncommons.isArray(imports)||\\nFail`Property 'imports' of a static module record must be an array, got ${q(\\nimports)\\n}, for module ${q(moduleSpecifier)}`;\\ncommons.isArray(exports)||\\nFail`Property 'exports' of a precompiled module record must be an array, got ${q(\\nexports)\\n}, for module ${q(moduleSpecifier)}`;\\ncommons.isArray(reexports)||\\nFail`Property 'reexports' of a precompiled module record must be an array if present, got ${q(\\nreexports)\\n}, for module ${q(moduleSpecifier)}`;}\\n\\n\\nconst instantiate=(\\ncompartmentPrivateFields,\\nmoduleAliases,\\nmoduleRecord)=>\\n{\\nconst{compartment,moduleSpecifier,resolvedImports,staticModuleRecord}=\\nmoduleRecord;\\nconst{instances}=commons.weakmapGet(compartmentPrivateFields,compartment);\\n\\n/* Memoize.*/\\nif(commons.mapHas(instances,moduleSpecifier)){\\nreturn commons.mapGet(instances,moduleSpecifier);}\\n\\n\\nvalidateStaticModuleRecord(staticModuleRecord,moduleSpecifier);\\n\\nconst importedInstances=new commons.Map();\\nlet moduleInstance$1;\\nif(isPrecompiled(staticModuleRecord)){\\nvalidatePrecompiledStaticModuleRecord(staticModuleRecord,moduleSpecifier);\\nmoduleInstance$1=moduleInstance.makeModuleInstance(\\ncompartmentPrivateFields,\\nmoduleAliases,\\nmoduleRecord,\\nimportedInstances);}else\\n\\nif(isThirdParty(staticModuleRecord)){\\nvalidateThirdPartyStaticModuleRecord(staticModuleRecord,moduleSpecifier);\\nmoduleInstance$1=moduleInstance.makeThirdPartyModuleInstance(\\ncompartmentPrivateFields,\\nstaticModuleRecord,\\ncompartment,\\nmoduleAliases,\\nmoduleSpecifier,\\nresolvedImports);}else\\n\\n{\\nthrow commons.TypeError(\\n`importHook must return a static module record, got ${q(\\nstaticModuleRecord)\\n}`);}\\n\\n\\n\\n/* Memoize.*/\\ncommons.mapSet(instances,moduleSpecifier,moduleInstance$1);\\n\\n/* Link dependency modules.*/\\nfor(const[importSpecifier,resolvedSpecifier]of commons.entries(resolvedImports)){\\nconst importedInstance=link(\\ncompartmentPrivateFields,\\nmoduleAliases,\\ncompartment,\\nresolvedSpecifier);\\n\\ncommons.mapSet(importedInstances,importSpecifier,importedInstance);}\\n\\n\\nreturn moduleInstance$1;};exports.instantiate=instantiate;exports.link=link;\",\n \"node_modules/ses/src/module-load.js\": \"'use strict';Object.defineProperty(exports,'__esModule',{value:true});require('../../@endo/env-options/index.js');var commons=require('./commons.js');var assert=require('./error/assert.js');var envOptions=require('../../@endo/env-options/src/env-options.js');/* For brevity, in this file, as in module-link.js, the term \\\"moduleRecord\\\"*/\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\nconst{Fail,details:d,quote:q}=assert.assert;\\n\\nconst noop=()=>{};\\n\\nasync function asyncTrampoline(generatorFunc,args,errorWrapper){\\nconst iterator=generatorFunc(...args);\\nlet result=commons.generatorNext(iterator);\\nwhile(!result.done){\\ntry{\\n/* eslint-disable-next-line no-await-in-loop*/\\nconst val=await result.value;\\nresult=commons.generatorNext(iterator,val);}\\ncatch(error){\\nresult=commons.generatorThrow(iterator,errorWrapper(error));}}\\n\\n\\nreturn result.value;}\\n\\n\\nfunction syncTrampoline(generatorFunc,args){\\nconst iterator=generatorFunc(...args);\\nlet result=commons.generatorNext(iterator);\\nwhile(!result.done){\\ntry{\\nresult=commons.generatorNext(iterator,result.value);}\\ncatch(error){\\nresult=commons.generatorThrow(iterator,error);}}\\n\\n\\nreturn result.value;}\\n\\n/* `makeAlias` constructs compartment specifier tuples for the `aliases`*/\\n/* private field of compartments.*/\\n/* These aliases allow a compartment to alias an internal module specifier to a*/\\n/* module specifier in an external compartment, and also to create internal*/\\n/* aliases.*/\\n/* Both are facilitated by the moduleMap Compartment constructor option.*/\\nconst makeAlias=(compartment,specifier)=>\\ncommons.freeze({\\ncompartment,\\nspecifier});\\n\\n\\n/* `resolveAll` pre-computes resolutions of all imports within the compartment*/\\n/* in which a module was loaded.*/\\nconst resolveAll=(imports,resolveHook,fullReferrerSpecifier)=>{\\nconst resolvedImports=commons.create(null);\\nfor(const importSpecifier of imports){\\nconst fullSpecifier=resolveHook(importSpecifier,fullReferrerSpecifier);\\nresolvedImports[importSpecifier]=fullSpecifier;}\\n\\nreturn commons.freeze(resolvedImports);};\\n\\n\\nconst loadRecord=(\\ncompartmentPrivateFields,\\nmoduleAliases,\\ncompartment,\\nmoduleSpecifier,\\nstaticModuleRecord,\\nenqueueJob,\\nselectImplementation,\\nmoduleLoads,\\nimportMeta)=>\\n{\\nconst{resolveHook,moduleRecords}=commons.weakmapGet(\\ncompartmentPrivateFields,\\ncompartment);\\n\\n\\n/* resolve all imports relative to this referrer module.*/\\nconst resolvedImports=resolveAll(\\nstaticModuleRecord.imports,\\nresolveHook,\\nmoduleSpecifier);\\n\\nconst moduleRecord=commons.freeze({\\ncompartment,\\nstaticModuleRecord,\\nmoduleSpecifier,\\nresolvedImports,\\nimportMeta});\\n\\n\\n/* Enqueue jobs to load this module's shallow dependencies.*/\\nfor(const fullSpecifier of commons.values(resolvedImports)){\\n/* Behold: recursion.*/\\n/* eslint-disable-next-line no-use-before-define*/\\nenqueueJob(memoizedLoadWithErrorAnnotation,[\\ncompartmentPrivateFields,\\nmoduleAliases,\\ncompartment,\\nfullSpecifier,\\nenqueueJob,\\nselectImplementation,\\nmoduleLoads]);}\\n\\n\\n\\n/* Memoize.*/\\ncommons.mapSet(moduleRecords,moduleSpecifier,moduleRecord);\\nreturn moduleRecord;};\\n\\n\\nfunction*loadWithoutErrorAnnotation(\\ncompartmentPrivateFields,\\nmoduleAliases,\\ncompartment,\\nmoduleSpecifier,\\nenqueueJob,\\nselectImplementation,\\nmoduleLoads)\\n{\\nconst{importHook,importNowHook,moduleMap,moduleMapHook,moduleRecords}=\\ncommons.weakmapGet(compartmentPrivateFields,compartment);\\n\\n/* Follow moduleMap, or moduleMapHook if present.*/\\nlet aliasNamespace=moduleMap[moduleSpecifier];\\nif(aliasNamespace===undefined&&moduleMapHook!==undefined){\\naliasNamespace=moduleMapHook(moduleSpecifier);}\\n\\nif(typeof aliasNamespace==='string'){\\n/* eslint-disable-next-line @endo/no-polymorphic-call*/\\nassert.assert.fail(\\nd`Cannot map module ${q(moduleSpecifier)} to ${q(\\naliasNamespace)\\n} in parent compartment, not yet implemented`,\\ncommons.TypeError);}else\\n\\nif(aliasNamespace!==undefined){\\nconst alias=commons.weakmapGet(moduleAliases,aliasNamespace);\\nif(alias===undefined){\\n/* eslint-disable-next-line @endo/no-polymorphic-call*/\\nassert.assert.fail(\\nd`Cannot map module ${q(\\nmoduleSpecifier)\\n} because the value is not a module exports namespace, or is from another realm`,\\ncommons.ReferenceError);}\\n\\n\\n/* Behold: recursion.*/\\n/* eslint-disable-next-line no-use-before-define*/\\nconst aliasRecord=yield memoizedLoadWithErrorAnnotation(\\ncompartmentPrivateFields,\\nmoduleAliases,\\nalias.compartment,\\nalias.specifier,\\nenqueueJob,\\nselectImplementation,\\nmoduleLoads);\\n\\ncommons.mapSet(moduleRecords,moduleSpecifier,aliasRecord);\\nreturn aliasRecord;}\\n\\n\\nif(commons.mapHas(moduleRecords,moduleSpecifier)){\\nreturn commons.mapGet(moduleRecords,moduleSpecifier);}\\n\\n\\nconst staticModuleRecord=yield selectImplementation(\\nimportHook,\\nimportNowHook)(\\nmoduleSpecifier);\\n\\nif(staticModuleRecord===null||typeof staticModuleRecord!=='object'){\\nFail`importHook must return a promise for an object, for module ${q(\\nmoduleSpecifier)\\n} in compartment ${q(compartment.name)}`;}\\n\\n\\n/* check if record is a RedirectStaticModuleInterface*/\\nif(staticModuleRecord.specifier!==undefined){\\n/* check if this redirect with an explicit record*/\\nif(staticModuleRecord.record!==undefined){\\n/* ensure expected record shape*/\\nif(staticModuleRecord.compartment!==undefined){\\nthrow commons.TypeError(\\n'Cannot redirect to an explicit record with a specified compartment');}\\n\\n\\nconst{\\ncompartment:aliasCompartment=compartment,\\nspecifier:aliasSpecifier=moduleSpecifier,\\nrecord:aliasModuleRecord,\\nimportMeta}=\\nstaticModuleRecord;\\n\\nconst aliasRecord=loadRecord(\\ncompartmentPrivateFields,\\nmoduleAliases,\\naliasCompartment,\\naliasSpecifier,\\naliasModuleRecord,\\nenqueueJob,\\nselectImplementation,\\nmoduleLoads,\\nimportMeta);\\n\\ncommons.mapSet(moduleRecords,moduleSpecifier,aliasRecord);\\nreturn aliasRecord;}\\n\\n\\n/* check if this redirect with an explicit compartment*/\\nif(staticModuleRecord.compartment!==undefined){\\n/* ensure expected record shape*/\\nif(staticModuleRecord.importMeta!==undefined){\\nthrow commons.TypeError(\\n'Cannot redirect to an implicit record with a specified importMeta');}\\n\\n\\n/* Behold: recursion.*/\\n/* eslint-disable-next-line no-use-before-define*/\\nconst aliasRecord=yield memoizedLoadWithErrorAnnotation(\\ncompartmentPrivateFields,\\nmoduleAliases,\\nstaticModuleRecord.compartment,\\nstaticModuleRecord.specifier,\\nenqueueJob,\\nselectImplementation,\\nmoduleLoads);\\n\\ncommons.mapSet(moduleRecords,moduleSpecifier,aliasRecord);\\nreturn aliasRecord;}\\n\\n\\nthrow commons.TypeError('Unnexpected RedirectStaticModuleInterface record shape');}\\n\\n\\nreturn loadRecord(\\ncompartmentPrivateFields,\\nmoduleAliases,\\ncompartment,\\nmoduleSpecifier,\\nstaticModuleRecord,\\nenqueueJob,\\nselectImplementation,\\nmoduleLoads);}\\n\\n\\n\\nconst memoizedLoadWithErrorAnnotation=(\\ncompartmentPrivateFields,\\nmoduleAliases,\\ncompartment,\\nmoduleSpecifier,\\nenqueueJob,\\nselectImplementation,\\nmoduleLoads)=>\\n{\\nconst{name:compartmentName}=commons.weakmapGet(\\ncompartmentPrivateFields,\\ncompartment);\\n\\n\\n/* Prevent data-lock from recursion into branches visited in dependent loads.*/\\nlet compartmentLoading=commons.mapGet(moduleLoads,compartment);\\nif(compartmentLoading===undefined){\\ncompartmentLoading=new commons.Map();\\ncommons.mapSet(moduleLoads,compartment,compartmentLoading);}\\n\\nlet moduleLoading=commons.mapGet(compartmentLoading,moduleSpecifier);\\nif(moduleLoading!==undefined){\\nreturn moduleLoading;}\\n\\n\\nmoduleLoading=selectImplementation(asyncTrampoline,syncTrampoline)(\\nloadWithoutErrorAnnotation,\\n[\\ncompartmentPrivateFields,\\nmoduleAliases,\\ncompartment,\\nmoduleSpecifier,\\nenqueueJob,\\nselectImplementation,\\nmoduleLoads],\\n\\n(error)=>{\\n/* eslint-disable-next-line @endo/no-polymorphic-call*/\\nassert.assert.note(\\nerror,\\nd`${error.message}, loading ${q(moduleSpecifier)} in compartment ${q(\\ncompartmentName)\\n}`);\\n\\nthrow error;});\\n\\n\\n\\ncommons.mapSet(compartmentLoading,moduleSpecifier,moduleLoading);\\n\\nreturn moduleLoading;};\\n\\n\\nfunction asyncJobQueue(){\\n/** @type {Set<Promise<undefined>>} */\\nconst pendingJobs=new commons.Set();\\n/** @type {Array<Error>} */\\nconst errors=[];\\n\\n/**\\n * Enqueues a job that starts immediately but won't be awaited until drainQueue is called.\\n *\\n * @template {any[]} T\\n * @param {(...args: T)=>Promise<*>} func\\n * @param {T} args\\n */\\nconst enqueueJob=(func,args)=>{\\ncommons.setAdd(\\npendingJobs,\\ncommons.promiseThen(func(...args),noop,(error)=>{\\ncommons.arrayPush(errors,error);}));};\\n\\n\\n\\n/**\\n * Sequentially awaits pending jobs and returns an array of errors\\n *\\n * @returns {Promise<Array<Error>>}\\n */\\nconst drainQueue=async()=>{\\nfor(const job of pendingJobs){\\n/* eslint-disable-next-line no-await-in-loop*/\\nawait job;}\\n\\nreturn errors;};\\n\\nreturn{enqueueJob,drainQueue};}\\n\\n\\n/**\\n * @param {object} options\\n * @param {Array<Error>} options.errors\\n * @param {string} options.errorPrefix\\n */\\nfunction throwAggregateError({errors,errorPrefix}){\\n/* Throw an aggregate error if there were any errors.*/\\nif(errors.length>0){\\nconst verbose=\\nenvOptions.getEnvironmentOption('COMPARTMENT_LOAD_ERRORS','',['verbose'])==='verbose';\\nthrow commons.TypeError(\\n`${errorPrefix} (${errors.length} underlying failures: ${commons.arrayJoin(\\ncommons.arrayMap(errors,(error)=>error.message+(verbose?error.stack:'')),\\n', ')\\n}`);}}\\n\\n\\n\\n\\nconst preferSync=(_asyncImpl,syncImpl)=>syncImpl;\\nconst preferAsync=(asyncImpl,_syncImpl)=>asyncImpl;\\n\\n/* * `load` asynchronously gathers the `StaticModuleRecord`s for a module and its\\n * transitive dependencies.\\n * The module records refer to each other by a reference to the dependency's\\n * compartment and the specifier of the module within its own compartment.\\n * This graph is then ready to be synchronously linked and executed.\\n */\\n\\nconst load=async(\\ncompartmentPrivateFields,\\nmoduleAliases,\\ncompartment,\\nmoduleSpecifier)=>\\n{\\nconst{name:compartmentName}=commons.weakmapGet(\\ncompartmentPrivateFields,\\ncompartment);\\n\\n\\n/** @type {Map<object, Map<string, Promise<Record<any, any>>>>} */\\nconst moduleLoads=new commons.Map();\\n\\nconst{enqueueJob,drainQueue}=asyncJobQueue();\\n\\nenqueueJob(memoizedLoadWithErrorAnnotation,[\\ncompartmentPrivateFields,\\nmoduleAliases,\\ncompartment,\\nmoduleSpecifier,\\nenqueueJob,\\npreferAsync,\\nmoduleLoads]);\\n\\n\\n/* Drain pending jobs queue and throw an aggregate error*/\\nconst errors=await drainQueue();\\n\\nthrowAggregateError({\\nerrors,\\nerrorPrefix:`Failed to load module ${q(moduleSpecifier)} in package ${q(\\ncompartmentName)\\n}`});};\\n\\n\\n\\n/* * `loadNow` synchronously gathers the `StaticModuleRecord`s for a module and its\\n * transitive dependencies.\\n * The module records refer to each other by a reference to the dependency's\\n * compartment and the specifier of the module within its own compartment.\\n * This graph is then ready to be synchronously linked and executed.\\n */\\n\\nconst loadNow=(\\ncompartmentPrivateFields,\\nmoduleAliases,\\ncompartment,\\nmoduleSpecifier)=>\\n{\\nconst{name:compartmentName}=commons.weakmapGet(\\ncompartmentPrivateFields,\\ncompartment);\\n\\n\\n/** @type {Map<object, Map<string, Promise<Record<any, any>>>>} */\\nconst moduleLoads=new commons.Map();\\n\\n/** @type {Array<Error>} */\\nconst errors=[];\\n\\nconst enqueueJob=(func,args)=>{\\ntry{\\nfunc(...args);}\\ncatch(error){\\ncommons.arrayPush(errors,error);}};\\n\\n\\n\\nenqueueJob(memoizedLoadWithErrorAnnotation,[\\ncompartmentPrivateFields,\\nmoduleAliases,\\ncompartment,\\nmoduleSpecifier,\\nenqueueJob,\\npreferSync,\\nmoduleLoads]);\\n\\n\\nthrowAggregateError({\\nerrors,\\nerrorPrefix:`Failed to load module ${q(moduleSpecifier)} in package ${q(\\ncompartmentName)\\n}`});};exports.load=load;exports.loadNow=loadNow;exports.makeAlias=makeAlias;\",\n \"node_modules/ses/src/module-proxy.js\": \"'use strict';Object.defineProperty(exports,'__esModule',{value:true});var moduleLoad=require('./module-load.js');var commons=require('./commons.js');var assert=require('./error/assert.js');/* Compartments need a mechanism to link a module from one compartment*/\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\nconst{quote:q}=assert.assert;\\n\\n/* `deferExports` creates a module's exports proxy, proxied exports, and*/\\n/* activator.*/\\n/* A `Compartment` can create a module for any module specifier, regardless of*/\\n/* whether it is loadable or executable, and use that object as a token that*/\\n/* can be fed into another compartment's module map.*/\\n/* Only after the specified module has been analyzed is it possible for the*/\\n/* module namespace proxy to behave properly, so it throws exceptions until*/\\n/* after the compartment has begun executing the module.*/\\n/* The module instance must freeze the proxied exports and activate the exports*/\\n/* proxy before executing the module.*/\\n/**/\\n/* The module exports proxy's behavior differs from the ECMAScript 262*/\\n/* specification for \\\"module namespace exotic objects\\\" only in that according*/\\n/* to the specification value property descriptors have a non-writable \\\"value\\\"*/\\n/* and this implementation models all properties with accessors.*/\\n/**/\\n/* https://tc39.es/ecma262/#sec-module-namespace-exotic-objects*/\\n/**/\\nconst deferExports=()=>{\\nlet active=false;\\nconst exportsTarget=commons.create(null,{\\n/* Make this appear like an ESM module namespace object.*/\\n[commons.toStringTagSymbol]:{\\nvalue:'Module',\\nwritable:false,\\nenumerable:false,\\nconfigurable:false}});\\n\\n\\nreturn commons.freeze({\\nactivate(){\\nactive=true;},\\n\\nexportsTarget,\\nexportsProxy:new commons.Proxy(exportsTarget,{\\nget(_target,name,receiver){\\nif(!active){\\nthrow commons.TypeError(\\n`Cannot get property ${q(\\nname)\\n} of module exports namespace, the module has not yet begun to execute`);}\\n\\n\\nreturn commons.reflectGet(exportsTarget,name,receiver);},\\n\\nset(_target,name,_value){\\nthrow commons.TypeError(\\n`Cannot set property ${q(name)} of module exports namespace`);},\\n\\n\\nhas(_target,name){\\nif(!active){\\nthrow commons.TypeError(\\n`Cannot check property ${q(\\nname)\\n}, the module has not yet begun to execute`);}\\n\\n\\nreturn commons.reflectHas(exportsTarget,name);},\\n\\ndeleteProperty(_target,name){\\nthrow commons.TypeError(\\n`Cannot delete property ${q(name)}s of module exports namespace`);},\\n\\n\\nownKeys(_target){\\nif(!active){\\nthrow commons.TypeError(\\n'Cannot enumerate keys, the module has not yet begun to execute');}\\n\\n\\nreturn commons.ownKeys(exportsTarget);},\\n\\ngetOwnPropertyDescriptor(_target,name){\\nif(!active){\\nthrow commons.TypeError(\\n`Cannot get own property descriptor ${q(\\nname)\\n}, the module has not yet begun to execute`);}\\n\\n\\nreturn commons.reflectGetOwnPropertyDescriptor(exportsTarget,name);},\\n\\npreventExtensions(_target){\\nif(!active){\\nthrow commons.TypeError(\\n'Cannot prevent extensions of module exports namespace, the module has not yet begun to execute');}\\n\\n\\nreturn commons.reflectPreventExtensions(exportsTarget);},\\n\\nisExtensible(){\\nif(!active){\\nthrow commons.TypeError(\\n'Cannot check extensibility of module exports namespace, the module has not yet begun to execute');}\\n\\n\\nreturn commons.reflectIsExtensible(exportsTarget);},\\n\\ngetPrototypeOf(_target){\\nreturn null;},\\n\\nsetPrototypeOf(_target,_proto){\\nthrow commons.TypeError('Cannot set prototype of module exports namespace');},\\n\\ndefineProperty(_target,name,_descriptor){\\nthrow commons.TypeError(\\n`Cannot define property ${q(name)} of module exports namespace`);},\\n\\n\\napply(_target,_thisArg,_args){\\nthrow commons.TypeError(\\n'Cannot call module exports namespace, it is not a function');},\\n\\n\\nconstruct(_target,_args){\\nthrow commons.TypeError(\\n'Cannot construct module exports namespace, it is not a constructor');}})});};\\n\\n\\n\\n\\n\\n\\n/**\\n * @typedef {object} DeferredExports\\n * @property {Record<string, any>} exportsTarget - The object to which a\\n * module's exports will be added.\\n * @property {Record<string, any>} exportsProxy - A proxy over the `exportsTarget`,\\n * used to expose its \\\"exports\\\" to other compartments.\\n * @property {() => void} activate - Activate the `exportsProxy` such that it can\\n * be used as a module namespace object.\\n */\\n\\n/**\\n * Memoizes the creation of a deferred module exports namespace proxy for any\\n * arbitrary full specifier in a compartment. It also records the compartment\\n * and specifier affiliated with that module exports namespace proxy so it\\n * can be used as an alias into another compartment when threaded through\\n * a compartment's `moduleMap` argument.\\n *\\n * @param {*} compartment - The compartment to retrieve deferred exports from.\\n * @param {*} compartmentPrivateFields - The private fields of the compartment.\\n * @param {*} moduleAliases - The module aliases of the compartment.\\n * @param {string} specifier - The module specifier to retrieve deferred exports for.\\n * @returns {DeferredExports} - The deferred exports for the module specifier of\\n * the compartment.\\n */\\nconst getDeferredExports=(\\ncompartment,\\ncompartmentPrivateFields,\\nmoduleAliases,\\nspecifier)=>\\n{\\nconst{deferredExports}=compartmentPrivateFields;\\nif(!commons.mapHas(deferredExports,specifier)){\\nconst deferred=deferExports();\\ncommons.weakmapSet(\\nmoduleAliases,\\ndeferred.exportsProxy,\\nmoduleLoad.makeAlias(compartment,specifier));\\n\\ncommons.mapSet(deferredExports,specifier,deferred);}\\n\\nreturn commons.mapGet(deferredExports,specifier);};exports.deferExports=deferExports;exports.getDeferredExports=getDeferredExports;\",\n \"node_modules/ses/src/permits-intrinsics.js\": \"'use strict';Object.defineProperty(exports,'__esModule',{value:true});var permits=require('./permits.js');var\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\ncommons=require('./commons.js');/* Copyright (C) 2011 Google Inc.*/ /**\\n * whitelistIntrinsics()\\n * Removes all non-allowed properties found by recursively and\\n * reflectively walking own property chains.\\n *\\n * @param {object} intrinsics\\n * @param {(object) => void} markVirtualizedNativeFunction\\n */\\nfunction whitelistIntrinsics(\\nintrinsics,\\nmarkVirtualizedNativeFunction)\\n{\\nlet groupStarted=false;\\nconst inConsoleGroup=(level,...args)=>{\\nif(!groupStarted){\\n/* eslint-disable-next-line @endo/no-polymorphic-call*/\\nconsole.groupCollapsed('Removing unpermitted intrinsics');\\ngroupStarted=true;}\\n\\n/* eslint-disable-next-line @endo/no-polymorphic-call*/\\nreturn console[level](...args);};\\n\\n\\n/* These primitives are allowed for permits.*/\\nconst primitives=['undefined','boolean','number','string','symbol'];\\n\\n/* These symbols are allowed as well-known symbols*/\\nconst wellKnownSymbolNames=new commons.Map(\\ncommons.Symbol?\\ncommons.arrayMap(\\ncommons.arrayFilter(\\ncommons.entries(permits.permitted['%SharedSymbol%']),\\n([name,permit])=>\\npermit==='symbol'&&typeof commons.Symbol[name]==='symbol'),\\n\\n([name])=>[commons.Symbol[name],`@@${name}`]):\\n\\n[]);\\n\\n\\n/**\\n * asStringPropertyName()\\n *\\n * @param {string} path\\n * @param {string | symbol} prop\\n */\\nfunction asStringPropertyName(path,prop){\\nif(typeof prop==='string'){\\nreturn prop;}\\n\\n\\nconst wellKnownSymbol=commons.mapGet(wellKnownSymbolNames,prop);\\n\\nif(typeof prop==='symbol'){\\nif(wellKnownSymbol){\\nreturn wellKnownSymbol;}else\\n{\\nconst registeredKey=commons.symbolKeyFor(prop);\\nif(registeredKey!==undefined){\\nreturn`RegisteredSymbol(${registeredKey})`;}else\\n{\\nreturn`Unique${commons.String(prop)}`;}}}\\n\\n\\n\\n\\nthrow commons.TypeError(`Unexpected property name type ${path} ${prop}`);}\\n\\n\\n/* * visitPrototype()\\n * Validate the object's [[prototype]] against a permit.\\n */\\n\\nfunction visitPrototype(path,obj,protoName){\\nif(!commons.isObject(obj)){\\nthrow commons.TypeError(`Object expected: ${path}, ${obj}, ${protoName}`);}\\n\\nconst proto=commons.getPrototypeOf(obj);\\n\\n/* Null prototype.*/\\nif(proto===null&&protoName===null){\\nreturn;}\\n\\n\\n/* Assert: protoName, if provided, is a string.*/\\nif(protoName!==undefined&&typeof protoName!=='string'){\\nthrow commons.TypeError(`Malformed whitelist permit ${path}.__proto__`);}\\n\\n\\n/* If permit not specified, default to Object.prototype.*/\\nif(proto===intrinsics[protoName||'%ObjectPrototype%']){\\nreturn;}\\n\\n\\n/* We can't clean [[prototype]], therefore abort.*/\\nthrow commons.TypeError(`Unexpected intrinsic ${path}.__proto__ at ${protoName}`);}\\n\\n\\n/* * isAllowedPropertyValue()\\n * Whitelist a single property value against a permit.\\n */\\n\\nfunction isAllowedPropertyValue(path,value,prop,permit){\\nif(typeof permit==='object'){\\n/* eslint-disable-next-line no-use-before-define*/\\nvisitProperties(path,value,permit);\\n/* The property is allowed.*/\\nreturn true;}\\n\\n\\nif(permit===false){\\n/* A boolan 'false' permit specifies the removal of a property.*/\\n/* We require a more specific permit instead of allowing 'true'.*/\\nreturn false;}\\n\\n\\nif(typeof permit==='string'){\\n/* A string permit can have one of two meanings:*/\\n\\nif(prop==='prototype'||prop==='constructor'){\\n/* For prototype and constructor value properties, the permit*/\\n/* is the name of an intrinsic.*/\\n/* Assumption: prototype and constructor cannot be primitives.*/\\n/* Assert: the permit is the name of an intrinsic.*/\\n/* Assert: the property value is equal to that intrinsic.*/\\n\\nif(commons.objectHasOwnProperty(intrinsics,permit)){\\nif(value!==intrinsics[permit]){\\nthrow commons.TypeError(`Does not match whitelist ${path}`);}\\n\\nreturn true;}}else\\n\\n{\\n/* For all other properties, the permit is the name of a primitive.*/\\n/* Assert: the permit is the name of a primitive.*/\\n/* Assert: the property value type is equal to that primitive.*/\\n\\n/* eslint-disable-next-line no-lonely-if*/\\nif(commons.arrayIncludes(primitives,permit)){\\n/* eslint-disable-next-line valid-typeof*/\\nif(typeof value!==permit){\\nthrow commons.TypeError(\\n`At ${path} expected ${permit} not ${typeof value}`);}\\n\\n\\nreturn true;}}}\\n\\n\\n\\n\\nthrow commons.TypeError(`Unexpected whitelist permit ${permit} at ${path}`);}\\n\\n\\n/* * isAllowedProperty()\\n * Check whether a single property is allowed.\\n */\\n\\nfunction isAllowedProperty(path,obj,prop,permit){\\nconst desc=commons.getOwnPropertyDescriptor(obj,prop);\\nif(!desc){\\nthrow commons.TypeError(`Property ${prop} not found at ${path}`);}\\n\\n\\n/* Is this a value property?*/\\nif(commons.objectHasOwnProperty(desc,'value')){\\nif(permits.isAccessorPermit(permit)){\\nthrow commons.TypeError(`Accessor expected at ${path}`);}\\n\\nreturn isAllowedPropertyValue(path,desc.value,prop,permit);}\\n\\nif(!permits.isAccessorPermit(permit)){\\nthrow commons.TypeError(`Accessor not expected at ${path}`);}\\n\\nreturn(\\nisAllowedPropertyValue(`${path}<get>`,desc.get,prop,permit.get)&&\\nisAllowedPropertyValue(`${path}<set>`,desc.set,prop,permit.set));}\\n\\n\\n\\n/* * getSubPermit()\\n */\\n\\nfunction getSubPermit(obj,permit,prop){\\nconst permitProp=prop==='__proto__'?'--proto--':prop;\\nif(commons.objectHasOwnProperty(permit,permitProp)){\\nreturn permit[permitProp];}\\n\\n\\nif(typeof obj==='function'){\\nif(commons.objectHasOwnProperty(permits.FunctionInstance,permitProp)){\\nreturn permits.FunctionInstance[permitProp];}}\\n\\n\\n\\nreturn undefined;}\\n\\n\\n/* * visitProperties()\\n * Visit all properties for a permit.\\n */\\n\\nfunction visitProperties(path,obj,permit){\\nif(obj===undefined||obj===null){\\nreturn;}\\n\\n\\nconst protoName=permit['[[Proto]]'];\\nvisitPrototype(path,obj,protoName);\\n\\nif(typeof obj==='function'){\\nmarkVirtualizedNativeFunction(obj);}\\n\\n\\nfor(const prop of commons.ownKeys(obj)){\\nconst propString=asStringPropertyName(path,prop);\\nconst subPath=`${path}.${propString}`;\\nconst subPermit=getSubPermit(obj,permit,propString);\\n\\nif(!subPermit||!isAllowedProperty(subPath,obj,prop,subPermit)){\\n/* Either the object lacks a permit or the object doesn't match the*/\\n/* permit.*/\\n/* If the permit is specifically false, not merely undefined,*/\\n/* this is a property we expect to see because we know it exists in*/\\n/* some environments and we have expressly decided to exclude it.*/\\n/* Any other disallowed property is one we have not audited and we log*/\\n/* that we are removing it so we know to look into it, as happens when*/\\n/* the language evolves new features to existing intrinsics.*/\\nif(subPermit!==false){\\ninConsoleGroup('warn',`Removing ${subPath}`);}\\n\\ntry{\\ndelete obj[prop];}\\ncatch(err){\\nif(prop in obj){\\nif(typeof obj==='function'&&prop==='prototype'){\\nobj.prototype=undefined;\\nif(obj.prototype===undefined){\\ninConsoleGroup(\\n'warn',\\n`Tolerating undeletable ${subPath} === undefined`);\\n\\n/* eslint-disable-next-line no-continue*/\\ncontinue;}}\\n\\n\\ninConsoleGroup('error',`failed to delete ${subPath}`,err);}else\\n{\\ninConsoleGroup('error',`deleting ${subPath} threw`,err);}\\n\\nthrow err;}}}}\\n\\n\\n\\n\\n\\ntry{\\n/* Start path with 'intrinsics' to clarify that properties are not*/\\n/* removed from the global object by the whitelisting operation.*/\\nvisitProperties('intrinsics',intrinsics,permits.permitted);}finally\\n{\\nif(groupStarted){\\n/* eslint-disable-next-line @endo/no-polymorphic-call*/\\nconsole.groupEnd();}}}exports[\\\"default\\\"]=whitelistIntrinsics;\",\n \"node_modules/ses/src/permits.js\": \"'use strict';Object.defineProperty(exports,'__esModule',{value:true});var\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\ncommons=require('./commons.js');/* eslint-disable no-restricted-globals */ /** @import {GenericErrorConstructor} from '../types.js' */ /**\\n * @file Exports {@code whitelist}, a recursively defined\\n * JSON record enumerating all intrinsics and their properties\\n * according to ECMA specs.\\n *\\n * @author JF Paradis\\n * @author Mark S. Miller\\n */ /**\\n * constantProperties\\n * non-configurable, non-writable data properties of all global objects.\\n * Must be powerless.\\n * Maps from property name to the actual value\\n */const constantProperties={/* *** Value Properties of the Global Object*/Infinity,NaN,undefined};\\n\\n/**\\n * universalPropertyNames\\n * Properties of all global objects.\\n * Must be powerless.\\n * Maps from property name to the intrinsic name in the whitelist.\\n */\\nconst universalPropertyNames={\\n/* *** Function Properties of the Global Object*/\\n\\nisFinite:'isFinite',\\nisNaN:'isNaN',\\nparseFloat:'parseFloat',\\nparseInt:'parseInt',\\n\\ndecodeURI:'decodeURI',\\ndecodeURIComponent:'decodeURIComponent',\\nencodeURI:'encodeURI',\\nencodeURIComponent:'encodeURIComponent',\\n\\n/* *** Constructor Properties of the Global Object*/\\n\\nArray:'Array',\\nArrayBuffer:'ArrayBuffer',\\nBigInt:'BigInt',\\nBigInt64Array:'BigInt64Array',\\nBigUint64Array:'BigUint64Array',\\nBoolean:'Boolean',\\nDataView:'DataView',\\nEvalError:'EvalError',\\n/* https://github.com/tc39/proposal-float16array*/\\nFloat16Array:'Float16Array',\\nFloat32Array:'Float32Array',\\nFloat64Array:'Float64Array',\\nInt8Array:'Int8Array',\\nInt16Array:'Int16Array',\\nInt32Array:'Int32Array',\\nMap:'Map',\\nNumber:'Number',\\nObject:'Object',\\nPromise:'Promise',\\nProxy:'Proxy',\\nRangeError:'RangeError',\\nReferenceError:'ReferenceError',\\nSet:'Set',\\nString:'String',\\nSyntaxError:'SyntaxError',\\nTypeError:'TypeError',\\nUint8Array:'Uint8Array',\\nUint8ClampedArray:'Uint8ClampedArray',\\nUint16Array:'Uint16Array',\\nUint32Array:'Uint32Array',\\nURIError:'URIError',\\nWeakMap:'WeakMap',\\nWeakSet:'WeakSet',\\n/* https://github.com/tc39/proposal-iterator-helpers*/\\nIterator:'Iterator',\\n/* https://github.com/tc39/proposal-async-iterator-helpers*/\\nAsyncIterator:'AsyncIterator',\\n/* https://github.com/endojs/endo/issues/550*/\\nAggregateError:'AggregateError',\\n\\n/* *** Other Properties of the Global Object*/\\n\\nJSON:'JSON',\\nReflect:'Reflect',\\n\\n/* *** Annex B*/\\n\\nescape:'escape',\\nunescape:'unescape',\\n\\n/* ESNext*/\\n\\nlockdown:'lockdown',\\nharden:'harden',\\nHandledPromise:'HandledPromise'/* TODO: Until Promise.delegate (see below).*/};\\n\\n\\n/**\\n * initialGlobalPropertyNames\\n * Those found only on the initial global, i.e., the global of the\\n * start compartment, as well as any compartments created before lockdown.\\n * These may provide much of the power provided by the original.\\n * Maps from property name to the intrinsic name in the whitelist.\\n */\\nconst initialGlobalPropertyNames={\\n/* *** Constructor Properties of the Global Object*/\\n\\nDate:'%InitialDate%',\\nError:'%InitialError%',\\nRegExp:'%InitialRegExp%',\\n\\n/* Omit `Symbol`, because we want the original to appear on the*/\\n/* start compartment without passing through the whitelist mechanism, since*/\\n/* we want to preserve all its properties, even if we never heard of them.*/\\n/* Symbol: '%InitialSymbol%',*/\\n\\n/* *** Other Properties of the Global Object*/\\n\\nMath:'%InitialMath%',\\n\\n/* ESNext*/\\n\\n/* From Error-stack proposal*/\\n/* Only on initial global. No corresponding*/\\n/* powerless form for other globals.*/\\ngetStackString:'%InitialGetStackString%'\\n\\n/* TODO https://github.com/Agoric/SES-shim/issues/551*/\\n/* Need initial WeakRef and FinalizationGroup in*/\\n/* start compartment only.*/};\\n\\n\\n/**\\n * sharedGlobalPropertyNames\\n * Those found only on the globals of new compartments created after lockdown,\\n * which must therefore be powerless.\\n * Maps from property name to the intrinsic name in the whitelist.\\n */\\nconst sharedGlobalPropertyNames={\\n/* *** Constructor Properties of the Global Object*/\\n\\nDate:'%SharedDate%',\\nError:'%SharedError%',\\nRegExp:'%SharedRegExp%',\\nSymbol:'%SharedSymbol%',\\n\\n/* *** Other Properties of the Global Object*/\\n\\nMath:'%SharedMath%'};\\n\\n\\n/**\\n * uniqueGlobalPropertyNames\\n * Those made separately for each global, including the initial global\\n * of the start compartment.\\n * Maps from property name to the intrinsic name in the whitelist\\n * (which is currently always the same).\\n */\\nconst uniqueGlobalPropertyNames={\\n/* *** Value Properties of the Global Object*/\\n\\nglobalThis:'%UniqueGlobalThis%',\\n\\n/* *** Function Properties of the Global Object*/\\n\\neval:'%UniqueEval%',\\n\\n/* *** Constructor Properties of the Global Object*/\\n\\nFunction:'%UniqueFunction%',\\n\\n/* *** Other Properties of the Global Object*/\\n\\n/* ESNext*/\\n\\nCompartment:'%UniqueCompartment%'\\n/* According to current agreements, eventually the Realm constructor too.*/\\n/* 'Realm',*/};\\n\\n\\n/* All the \\\"subclasses\\\" of Error. These are collectively represented in the*/\\n/* ECMAScript spec by the meta variable NativeError.*/\\n/** @type {GenericErrorConstructor[]} */\\nconst NativeErrors=[\\nEvalError,\\nRangeError,\\nReferenceError,\\nSyntaxError,\\nTypeError,\\nURIError\\n/* https://github.com/endojs/endo/issues/550*/\\n/* Commented out to accommodate platforms prior to AggregateError.*/\\n/* Instead, conditional push below.*/\\n/* AggregateError,*/];\\n\\n\\nif(typeof AggregateError!=='undefined'){\\n/* Conditional, to accommodate platforms prior to AggregateError*/\\ncommons.arrayPush(NativeErrors,AggregateError);}\\n\\n\\n\\n\\n/**\\n * <p>Each JSON record enumerates the disposition of the properties on\\n * some corresponding intrinsic object.\\n *\\n * <p>All records are made of key-value pairs where the key\\n * is the property to process, and the value is the associated\\n * dispositions a.k.a. the \\\"permit\\\". Those permits can be:\\n * <ul>\\n * <li>The boolean value \\\"false\\\", in which case this property is\\n * blacklisted and simply removed. Properties not mentioned\\n * are also considered blacklisted and are removed.\\n * <li>A string value equal to a primitive (\\\"number\\\", \\\"string\\\", etc),\\n * in which case the property is whitelisted if its value property\\n * is typeof the given type. For example, {@code \\\"Infinity\\\"} leads to\\n * \\\"number\\\" and property values that fail {@code typeof \\\"number\\\"}.\\n * are removed.\\n * <li>A string value equal to an intinsic name (\\\"ObjectPrototype\\\",\\n * \\\"Array\\\", etc), in which case the property whitelisted if its\\n * value property is equal to the value of the corresponfing\\n * intrinsics. For example, {@code Map.prototype} leads to\\n * \\\"MapPrototype\\\" and the property is removed if its value is\\n * not equal to %MapPrototype%\\n * <li>Another record, in which case this property is simply\\n * whitelisted and that next record represents the disposition of\\n * the object which is its value. For example, {@code \\\"Object\\\"}\\n * leads to another record explaining what properties {@code\\n * \\\"Object\\\"} may have and how each such property should be treated.\\n *\\n * <p>Notes:\\n * <li>\\\"[[Proto]]\\\" is used to refer to the \\\"[[Prototype]]\\\" internal\\n * slot, which says which object this object inherits from.\\n * <li>\\\"--proto--\\\" is used to refer to the \\\"__proto__\\\" property name,\\n * which is the name of an accessor property on Object.prototype.\\n * In practice, it is used to access the [[Proto]] internal slot,\\n * but is distinct from the internal slot itself. We use\\n * \\\"--proto--\\\" rather than \\\"__proto__\\\" below because \\\"__proto__\\\"\\n * in an object literal is special syntax rather than a normal\\n * property definition.\\n * <li>\\\"ObjectPrototype\\\" is the default \\\"[[Proto]]\\\" (when not specified).\\n * <li>Constants \\\"fn\\\" and \\\"getter\\\" are used to keep the structure DRY.\\n * <li>Symbol properties are listed as follow:\\n * <li>Well-known symbols use the \\\"@@name\\\" form.\\n * <li>Registered symbols use the \\\"RegisteredSymbol(key)\\\" form.\\n * <li>Unique symbols use the \\\"UniqueSymbol(description)\\\" form.\\n */\\n\\n/* Function Instances*/\\nconst FunctionInstance={\\n'[[Proto]]':'%FunctionPrototype%',\\nlength:'number',\\nname:'string'\\n/* Do not specify \\\"prototype\\\" here, since only Function instances that can*/\\n/* be used as a constructor have a prototype property. For constructors,*/\\n/* since prototype properties are instance-specific, we define it there.*/};\\n\\n\\n/* AsyncFunction Instances*/\\nconst AsyncFunctionInstance={\\n/* This property is not mentioned in ECMA 262, but is present in V8 and*/\\n/* necessary for lockdown to succeed.*/\\n'[[Proto]]':'%AsyncFunctionPrototype%'};\\n\\n\\n/* Aliases*/\\nconst fn=FunctionInstance;\\nconst asyncFn=AsyncFunctionInstance;\\n\\nconst getter={\\nget:fn,\\nset:'undefined'};\\n\\n\\n/* Possible but not encountered in the specs*/\\n/* export const setter = {*/\\n/* get: 'undefined',*/\\n/* set: fn,*/\\n/* };*/\\n\\nconst accessor={\\nget:fn,\\nset:fn};\\n\\n\\nconst isAccessorPermit=(permit)=>{\\nreturn permit===getter||permit===accessor;};\\n\\n\\n/* NativeError Object Structure*/\\nfunction NativeError(prototype){\\nreturn{\\n/* Properties of the NativeError Constructors*/\\n'[[Proto]]':'%SharedError%',\\n\\n/* NativeError.prototype*/\\nprototype};}\\n\\n\\n\\nfunction NativeErrorPrototype(constructor){\\nreturn{\\n/* Properties of the NativeError Prototype Objects*/\\n'[[Proto]]':'%ErrorPrototype%',\\nconstructor,\\nmessage:'string',\\nname:'string',\\n/* Redundantly present only on v8. Safe to remove.*/\\ntoString:false,\\n/* Superfluously present in some versions of V8.*/\\n/* https://github.com/tc39/notes/blob/master/meetings/2021-10/oct-26.md#:~:text=However%2C%20Chrome%2093,and%20node%2016.11.*/\\ncause:false};}\\n\\n\\n\\n/* The TypedArray Constructors*/\\nfunction TypedArray(prototype){\\nreturn{\\n/* Properties of the TypedArray Constructors*/\\n'[[Proto]]':'%TypedArray%',\\nBYTES_PER_ELEMENT:'number',\\nprototype};}\\n\\n\\n\\nfunction TypedArrayPrototype(constructor){\\nreturn{\\n/* Properties of the TypedArray Prototype Objects*/\\n'[[Proto]]':'%TypedArrayPrototype%',\\nBYTES_PER_ELEMENT:'number',\\nconstructor};}\\n\\n\\n\\n/* Without Math.random*/\\nconst CommonMath={\\nE:'number',\\nLN10:'number',\\nLN2:'number',\\nLOG10E:'number',\\nLOG2E:'number',\\nPI:'number',\\nSQRT1_2:'number',\\nSQRT2:'number',\\n'@@toStringTag':'string',\\nabs:fn,\\nacos:fn,\\nacosh:fn,\\nasin:fn,\\nasinh:fn,\\natan:fn,\\natanh:fn,\\natan2:fn,\\ncbrt:fn,\\nceil:fn,\\nclz32:fn,\\ncos:fn,\\ncosh:fn,\\nexp:fn,\\nexpm1:fn,\\nfloor:fn,\\nfround:fn,\\nhypot:fn,\\nimul:fn,\\nlog:fn,\\nlog1p:fn,\\nlog10:fn,\\nlog2:fn,\\nmax:fn,\\nmin:fn,\\npow:fn,\\nround:fn,\\nsign:fn,\\nsin:fn,\\nsinh:fn,\\nsqrt:fn,\\ntan:fn,\\ntanh:fn,\\ntrunc:fn,\\n/* See https://github.com/Moddable-OpenSource/moddable/issues/523*/\\nidiv:false,\\n/* See https://github.com/Moddable-OpenSource/moddable/issues/523*/\\nidivmod:false,\\n/* See https://github.com/Moddable-OpenSource/moddable/issues/523*/\\nimod:false,\\n/* See https://github.com/Moddable-OpenSource/moddable/issues/523*/\\nimuldiv:false,\\n/* See https://github.com/Moddable-OpenSource/moddable/issues/523*/\\nirem:false,\\n/* See https://github.com/Moddable-OpenSource/moddable/issues/523*/\\nmod:false,\\n/* See https://github.com/Moddable-OpenSource/moddable/issues/523#issuecomment-1942904505*/\\nirandom:false};\\n\\n\\nconst permitted={\\n/* ECMA https://tc39.es/ecma262*/\\n\\n/* The intrinsics object has no prototype to avoid conflicts.*/\\n'[[Proto]]':null,\\n\\n/* %ThrowTypeError%*/\\n'%ThrowTypeError%':fn,\\n\\n/* *** The Global Object*/\\n\\n/* *** Value Properties of the Global Object*/\\nInfinity:'number',\\nNaN:'number',\\nundefined:'undefined',\\n\\n/* *** Function Properties of the Global Object*/\\n\\n/* eval*/\\n'%UniqueEval%':fn,\\nisFinite:fn,\\nisNaN:fn,\\nparseFloat:fn,\\nparseInt:fn,\\ndecodeURI:fn,\\ndecodeURIComponent:fn,\\nencodeURI:fn,\\nencodeURIComponent:fn,\\n\\n/* *** Fundamental Objects*/\\n\\nObject:{\\n/* Properties of the Object Constructor*/\\n'[[Proto]]':'%FunctionPrototype%',\\nassign:fn,\\ncreate:fn,\\ndefineProperties:fn,\\ndefineProperty:fn,\\nentries:fn,\\nfreeze:fn,\\nfromEntries:fn,\\ngetOwnPropertyDescriptor:fn,\\ngetOwnPropertyDescriptors:fn,\\ngetOwnPropertyNames:fn,\\ngetOwnPropertySymbols:fn,\\ngetPrototypeOf:fn,\\nhasOwn:fn,\\nis:fn,\\nisExtensible:fn,\\nisFrozen:fn,\\nisSealed:fn,\\nkeys:fn,\\npreventExtensions:fn,\\nprototype:'%ObjectPrototype%',\\nseal:fn,\\nsetPrototypeOf:fn,\\nvalues:fn,\\n/* https://github.com/tc39/proposal-array-grouping*/\\ngroupBy:fn,\\n/* Seen on QuickJS*/\\n__getClass:false},\\n\\n\\n'%ObjectPrototype%':{\\n/* Properties of the Object Prototype Object*/\\n'[[Proto]]':null,\\nconstructor:'Object',\\nhasOwnProperty:fn,\\nisPrototypeOf:fn,\\npropertyIsEnumerable:fn,\\ntoLocaleString:fn,\\ntoString:fn,\\nvalueOf:fn,\\n\\n/* Annex B: Additional Properties of the Object.prototype Object*/\\n\\n/* See note in header about the difference between [[Proto]] and --proto--*/\\n/* special notations.*/\\n'--proto--':accessor,\\n__defineGetter__:fn,\\n__defineSetter__:fn,\\n__lookupGetter__:fn,\\n__lookupSetter__:fn},\\n\\n\\n'%UniqueFunction%':{\\n/* Properties of the Function Constructor*/\\n'[[Proto]]':'%FunctionPrototype%',\\nprototype:'%FunctionPrototype%'},\\n\\n\\n'%InertFunction%':{\\n'[[Proto]]':'%FunctionPrototype%',\\nprototype:'%FunctionPrototype%'},\\n\\n\\n'%FunctionPrototype%':{\\napply:fn,\\nbind:fn,\\ncall:fn,\\nconstructor:'%InertFunction%',\\ntoString:fn,\\n'@@hasInstance':fn,\\n/* proposed but not yet std. To be removed if there*/\\ncaller:false,\\n/* proposed but not yet std. To be removed if there*/\\narguments:false,\\n/* Seen on QuickJS. TODO grab getter for use by console*/\\nfileName:false,\\n/* Seen on QuickJS. TODO grab getter for use by console*/\\nlineNumber:false},\\n\\n\\nBoolean:{\\n/* Properties of the Boolean Constructor*/\\n'[[Proto]]':'%FunctionPrototype%',\\nprototype:'%BooleanPrototype%'},\\n\\n\\n'%BooleanPrototype%':{\\nconstructor:'Boolean',\\ntoString:fn,\\nvalueOf:fn},\\n\\n\\n'%SharedSymbol%':{\\n/* Properties of the Symbol Constructor*/\\n'[[Proto]]':'%FunctionPrototype%',\\nasyncDispose:'symbol',\\nasyncIterator:'symbol',\\ndispose:'symbol',\\nfor:fn,\\nhasInstance:'symbol',\\nisConcatSpreadable:'symbol',\\niterator:'symbol',\\nkeyFor:fn,\\nmatch:'symbol',\\nmatchAll:'symbol',\\nprototype:'%SymbolPrototype%',\\nreplace:'symbol',\\nsearch:'symbol',\\nspecies:'symbol',\\nsplit:'symbol',\\ntoPrimitive:'symbol',\\ntoStringTag:'symbol',\\nunscopables:'symbol',\\n/* Seen at core-js https://github.com/zloirock/core-js#ecmascript-symbol*/\\nuseSimple:false,\\n/* Seen at core-js https://github.com/zloirock/core-js#ecmascript-symbol*/\\nuseSetter:false,\\n/* Seen on QuickJS*/\\noperatorSet:false},\\n\\n\\n'%SymbolPrototype%':{\\n/* Properties of the Symbol Prototype Object*/\\nconstructor:'%SharedSymbol%',\\ndescription:getter,\\ntoString:fn,\\nvalueOf:fn,\\n'@@toPrimitive':fn,\\n'@@toStringTag':'string'},\\n\\n\\n'%InitialError%':{\\n/* Properties of the Error Constructor*/\\n'[[Proto]]':'%FunctionPrototype%',\\nprototype:'%ErrorPrototype%',\\n/* Non standard, v8 only, used by tap*/\\ncaptureStackTrace:fn,\\n/* Non standard, v8 only, used by tap, tamed to accessor*/\\nstackTraceLimit:accessor,\\n/* Non standard, v8 only, used by several, tamed to accessor*/\\nprepareStackTrace:accessor},\\n\\n\\n'%SharedError%':{\\n/* Properties of the Error Constructor*/\\n'[[Proto]]':'%FunctionPrototype%',\\nprototype:'%ErrorPrototype%',\\n/* Non standard, v8 only, used by tap*/\\ncaptureStackTrace:fn,\\n/* Non standard, v8 only, used by tap, tamed to accessor*/\\nstackTraceLimit:accessor,\\n/* Non standard, v8 only, used by several, tamed to accessor*/\\nprepareStackTrace:accessor},\\n\\n\\n'%ErrorPrototype%':{\\nconstructor:'%SharedError%',\\nmessage:'string',\\nname:'string',\\ntoString:fn,\\n/* proposed de-facto, assumed TODO*/\\n/* Seen on FF Nightly 88.0a1*/\\nat:false,\\n/* Seen on FF and XS*/\\nstack:accessor,\\n/* Superfluously present in some versions of V8.*/\\n/* https://github.com/tc39/notes/blob/master/meetings/2021-10/oct-26.md#:~:text=However%2C%20Chrome%2093,and%20node%2016.11.*/\\ncause:false},\\n\\n\\n/* NativeError*/\\n\\nEvalError:NativeError('%EvalErrorPrototype%'),\\nRangeError:NativeError('%RangeErrorPrototype%'),\\nReferenceError:NativeError('%ReferenceErrorPrototype%'),\\nSyntaxError:NativeError('%SyntaxErrorPrototype%'),\\nTypeError:NativeError('%TypeErrorPrototype%'),\\nURIError:NativeError('%URIErrorPrototype%'),\\n/* https://github.com/endojs/endo/issues/550*/\\nAggregateError:NativeError('%AggregateErrorPrototype%'),\\n\\n'%EvalErrorPrototype%':NativeErrorPrototype('EvalError'),\\n'%RangeErrorPrototype%':NativeErrorPrototype('RangeError'),\\n'%ReferenceErrorPrototype%':NativeErrorPrototype('ReferenceError'),\\n'%SyntaxErrorPrototype%':NativeErrorPrototype('SyntaxError'),\\n'%TypeErrorPrototype%':NativeErrorPrototype('TypeError'),\\n'%URIErrorPrototype%':NativeErrorPrototype('URIError'),\\n/* https://github.com/endojs/endo/issues/550*/\\n'%AggregateErrorPrototype%':NativeErrorPrototype('AggregateError'),\\n\\n/* *** Numbers and Dates*/\\n\\nNumber:{\\n/* Properties of the Number Constructor*/\\n'[[Proto]]':'%FunctionPrototype%',\\nEPSILON:'number',\\nisFinite:fn,\\nisInteger:fn,\\nisNaN:fn,\\nisSafeInteger:fn,\\nMAX_SAFE_INTEGER:'number',\\nMAX_VALUE:'number',\\nMIN_SAFE_INTEGER:'number',\\nMIN_VALUE:'number',\\nNaN:'number',\\nNEGATIVE_INFINITY:'number',\\nparseFloat:fn,\\nparseInt:fn,\\nPOSITIVE_INFINITY:'number',\\nprototype:'%NumberPrototype%'},\\n\\n\\n'%NumberPrototype%':{\\n/* Properties of the Number Prototype Object*/\\nconstructor:'Number',\\ntoExponential:fn,\\ntoFixed:fn,\\ntoLocaleString:fn,\\ntoPrecision:fn,\\ntoString:fn,\\nvalueOf:fn},\\n\\n\\nBigInt:{\\n/* Properties of the BigInt Constructor*/\\n'[[Proto]]':'%FunctionPrototype%',\\nasIntN:fn,\\nasUintN:fn,\\nprototype:'%BigIntPrototype%',\\n/* See https://github.com/Moddable-OpenSource/moddable/issues/523*/\\nbitLength:false,\\n/* See https://github.com/Moddable-OpenSource/moddable/issues/523*/\\nfromArrayBuffer:false,\\n/* Seen on QuickJS*/\\ntdiv:false,\\n/* Seen on QuickJS*/\\nfdiv:false,\\n/* Seen on QuickJS*/\\ncdiv:false,\\n/* Seen on QuickJS*/\\nediv:false,\\n/* Seen on QuickJS*/\\ntdivrem:false,\\n/* Seen on QuickJS*/\\nfdivrem:false,\\n/* Seen on QuickJS*/\\ncdivrem:false,\\n/* Seen on QuickJS*/\\nedivrem:false,\\n/* Seen on QuickJS*/\\nsqrt:false,\\n/* Seen on QuickJS*/\\nsqrtrem:false,\\n/* Seen on QuickJS*/\\nfloorLog2:false,\\n/* Seen on QuickJS*/\\nctz:false},\\n\\n\\n'%BigIntPrototype%':{\\nconstructor:'BigInt',\\ntoLocaleString:fn,\\ntoString:fn,\\nvalueOf:fn,\\n'@@toStringTag':'string'},\\n\\n\\n'%InitialMath%':{\\n...CommonMath,\\n/* `%InitialMath%.random()` has the standard unsafe behavior*/\\nrandom:fn},\\n\\n\\n'%SharedMath%':{\\n...CommonMath,\\n/* `%SharedMath%.random()` is tamed to always throw*/\\nrandom:fn},\\n\\n\\n'%InitialDate%':{\\n/* Properties of the Date Constructor*/\\n'[[Proto]]':'%FunctionPrototype%',\\nnow:fn,\\nparse:fn,\\nprototype:'%DatePrototype%',\\nUTC:fn},\\n\\n\\n'%SharedDate%':{\\n/* Properties of the Date Constructor*/\\n'[[Proto]]':'%FunctionPrototype%',\\n/* `%SharedDate%.now()` is tamed to always throw*/\\nnow:fn,\\nparse:fn,\\nprototype:'%DatePrototype%',\\nUTC:fn},\\n\\n\\n'%DatePrototype%':{\\nconstructor:'%SharedDate%',\\ngetDate:fn,\\ngetDay:fn,\\ngetFullYear:fn,\\ngetHours:fn,\\ngetMilliseconds:fn,\\ngetMinutes:fn,\\ngetMonth:fn,\\ngetSeconds:fn,\\ngetTime:fn,\\ngetTimezoneOffset:fn,\\ngetUTCDate:fn,\\ngetUTCDay:fn,\\ngetUTCFullYear:fn,\\ngetUTCHours:fn,\\ngetUTCMilliseconds:fn,\\ngetUTCMinutes:fn,\\ngetUTCMonth:fn,\\ngetUTCSeconds:fn,\\nsetDate:fn,\\nsetFullYear:fn,\\nsetHours:fn,\\nsetMilliseconds:fn,\\nsetMinutes:fn,\\nsetMonth:fn,\\nsetSeconds:fn,\\nsetTime:fn,\\nsetUTCDate:fn,\\nsetUTCFullYear:fn,\\nsetUTCHours:fn,\\nsetUTCMilliseconds:fn,\\nsetUTCMinutes:fn,\\nsetUTCMonth:fn,\\nsetUTCSeconds:fn,\\ntoDateString:fn,\\ntoISOString:fn,\\ntoJSON:fn,\\ntoLocaleDateString:fn,\\ntoLocaleString:fn,\\ntoLocaleTimeString:fn,\\ntoString:fn,\\ntoTimeString:fn,\\ntoUTCString:fn,\\nvalueOf:fn,\\n'@@toPrimitive':fn,\\n\\n/* Annex B: Additional Properties of the Date.prototype Object*/\\ngetYear:fn,\\nsetYear:fn,\\ntoGMTString:fn},\\n\\n\\n/* Text Processing*/\\n\\nString:{\\n/* Properties of the String Constructor*/\\n'[[Proto]]':'%FunctionPrototype%',\\nfromCharCode:fn,\\nfromCodePoint:fn,\\nprototype:'%StringPrototype%',\\nraw:fn,\\n/* See https://github.com/Moddable-OpenSource/moddable/issues/523*/\\nfromArrayBuffer:false},\\n\\n\\n'%StringPrototype%':{\\n/* Properties of the String Prototype Object*/\\nlength:'number',\\nat:fn,\\ncharAt:fn,\\ncharCodeAt:fn,\\ncodePointAt:fn,\\nconcat:fn,\\nconstructor:'String',\\nendsWith:fn,\\nincludes:fn,\\nindexOf:fn,\\nlastIndexOf:fn,\\nlocaleCompare:fn,\\nmatch:fn,\\nmatchAll:fn,\\nnormalize:fn,\\npadEnd:fn,\\npadStart:fn,\\nrepeat:fn,\\nreplace:fn,\\nreplaceAll:fn,/* ES2021*/\\nsearch:fn,\\nslice:fn,\\nsplit:fn,\\nstartsWith:fn,\\nsubstring:fn,\\ntoLocaleLowerCase:fn,\\ntoLocaleUpperCase:fn,\\ntoLowerCase:fn,\\ntoString:fn,\\ntoUpperCase:fn,\\ntrim:fn,\\ntrimEnd:fn,\\ntrimStart:fn,\\nvalueOf:fn,\\n'@@iterator':fn,\\n\\n/* Annex B: Additional Properties of the String.prototype Object*/\\nsubstr:fn,\\nanchor:fn,\\nbig:fn,\\nblink:fn,\\nbold:fn,\\nfixed:fn,\\nfontcolor:fn,\\nfontsize:fn,\\nitalics:fn,\\nlink:fn,\\nsmall:fn,\\nstrike:fn,\\nsub:fn,\\nsup:fn,\\ntrimLeft:fn,\\ntrimRight:fn,\\n/* See https://github.com/Moddable-OpenSource/moddable/issues/523*/\\ncompare:false,\\n/* https://github.com/tc39/proposal-is-usv-string*/\\nisWellFormed:fn,\\ntoWellFormed:fn,\\nunicodeSets:fn,\\n/* Seen on QuickJS*/\\n__quote:false},\\n\\n\\n'%StringIteratorPrototype%':{\\n'[[Proto]]':'%IteratorPrototype%',\\nnext:fn,\\n'@@toStringTag':'string'},\\n\\n\\n'%InitialRegExp%':{\\n/* Properties of the RegExp Constructor*/\\n'[[Proto]]':'%FunctionPrototype%',\\nprototype:'%RegExpPrototype%',\\n'@@species':getter,\\n\\n/* The https://github.com/tc39/proposal-regexp-legacy-features*/\\n/* are all optional, unsafe, and omitted*/\\ninput:false,\\n$_:false,\\nlastMatch:false,\\n'$&':false,\\nlastParen:false,\\n'$+':false,\\nleftContext:false,\\n'$`':false,\\nrightContext:false,\\n\\\"$'\\\":false,\\n$1:false,\\n$2:false,\\n$3:false,\\n$4:false,\\n$5:false,\\n$6:false,\\n$7:false,\\n$8:false,\\n$9:false},\\n\\n\\n'%SharedRegExp%':{\\n/* Properties of the RegExp Constructor*/\\n'[[Proto]]':'%FunctionPrototype%',\\nprototype:'%RegExpPrototype%',\\n'@@species':getter},\\n\\n\\n'%RegExpPrototype%':{\\n/* Properties of the RegExp Prototype Object*/\\nconstructor:'%SharedRegExp%',\\nexec:fn,\\ndotAll:getter,\\nflags:getter,\\nglobal:getter,\\nhasIndices:getter,\\nignoreCase:getter,\\n'@@match':fn,\\n'@@matchAll':fn,\\nmultiline:getter,\\n'@@replace':fn,\\n'@@search':fn,\\nsource:getter,\\n'@@split':fn,\\nsticky:getter,\\ntest:fn,\\ntoString:fn,\\nunicode:getter,\\nunicodeSets:getter,\\n\\n/* Annex B: Additional Properties of the RegExp.prototype Object*/\\ncompile:false/* UNSAFE and suppressed.*/},\\n\\n\\n'%RegExpStringIteratorPrototype%':{\\n/* The %RegExpStringIteratorPrototype% Object*/\\n'[[Proto]]':'%IteratorPrototype%',\\nnext:fn,\\n'@@toStringTag':'string'},\\n\\n\\n/* Indexed Collections*/\\n\\nArray:{\\n/* Properties of the Array Constructor*/\\n'[[Proto]]':'%FunctionPrototype%',\\nfrom:fn,\\nisArray:fn,\\nof:fn,\\nprototype:'%ArrayPrototype%',\\n'@@species':getter,\\n\\n/* Stage 3:*/\\n/* https://tc39.es/proposal-relative-indexing-method/*/\\nat:fn,\\n/* https://tc39.es/proposal-array-from-async/*/\\nfromAsync:fn},\\n\\n\\n'%ArrayPrototype%':{\\n/* Properties of the Array Prototype Object*/\\nat:fn,\\nlength:'number',\\nconcat:fn,\\nconstructor:'Array',\\ncopyWithin:fn,\\nentries:fn,\\nevery:fn,\\nfill:fn,\\nfilter:fn,\\nfind:fn,\\nfindIndex:fn,\\nflat:fn,\\nflatMap:fn,\\nforEach:fn,\\nincludes:fn,\\nindexOf:fn,\\njoin:fn,\\nkeys:fn,\\nlastIndexOf:fn,\\nmap:fn,\\npop:fn,\\npush:fn,\\nreduce:fn,\\nreduceRight:fn,\\nreverse:fn,\\nshift:fn,\\nslice:fn,\\nsome:fn,\\nsort:fn,\\nsplice:fn,\\ntoLocaleString:fn,\\ntoString:fn,\\nunshift:fn,\\nvalues:fn,\\n'@@iterator':fn,\\n'@@unscopables':{\\n'[[Proto]]':null,\\ncopyWithin:'boolean',\\nentries:'boolean',\\nfill:'boolean',\\nfind:'boolean',\\nfindIndex:'boolean',\\nflat:'boolean',\\nflatMap:'boolean',\\nincludes:'boolean',\\nkeys:'boolean',\\nvalues:'boolean',\\n/* Failed tc39 proposal*/\\n/* Seen on FF Nightly 88.0a1*/\\nat:'boolean',\\n/* See https://github.com/tc39/proposal-array-find-from-last*/\\nfindLast:'boolean',\\nfindLastIndex:'boolean',\\n/* https://github.com/tc39/proposal-change-array-by-copy*/\\ntoReversed:'boolean',\\ntoSorted:'boolean',\\ntoSpliced:'boolean',\\nwith:'boolean',\\n/* https://github.com/tc39/proposal-array-grouping*/\\ngroup:'boolean',\\ngroupToMap:'boolean',\\ngroupBy:'boolean'},\\n\\n/* See https://github.com/tc39/proposal-array-find-from-last*/\\nfindLast:fn,\\nfindLastIndex:fn,\\n/* https://github.com/tc39/proposal-change-array-by-copy*/\\ntoReversed:fn,\\ntoSorted:fn,\\ntoSpliced:fn,\\nwith:fn,\\n/* https://github.com/tc39/proposal-array-grouping*/\\ngroup:fn,/* Not in proposal? Where?*/\\ngroupToMap:fn,/* Not in proposal? Where?*/\\ngroupBy:fn},\\n\\n\\n'%ArrayIteratorPrototype%':{\\n/* The %ArrayIteratorPrototype% Object*/\\n'[[Proto]]':'%IteratorPrototype%',\\nnext:fn,\\n'@@toStringTag':'string'},\\n\\n\\n/* *** TypedArray Objects*/\\n\\n'%TypedArray%':{\\n/* Properties of the %TypedArray% Intrinsic Object*/\\n'[[Proto]]':'%FunctionPrototype%',\\nfrom:fn,\\nof:fn,\\nprototype:'%TypedArrayPrototype%',\\n'@@species':getter},\\n\\n\\n'%TypedArrayPrototype%':{\\nat:fn,\\nbuffer:getter,\\nbyteLength:getter,\\nbyteOffset:getter,\\nconstructor:'%TypedArray%',\\ncopyWithin:fn,\\nentries:fn,\\nevery:fn,\\nfill:fn,\\nfilter:fn,\\nfind:fn,\\nfindIndex:fn,\\nforEach:fn,\\nincludes:fn,\\nindexOf:fn,\\njoin:fn,\\nkeys:fn,\\nlastIndexOf:fn,\\nlength:getter,\\nmap:fn,\\nreduce:fn,\\nreduceRight:fn,\\nreverse:fn,\\nset:fn,\\nslice:fn,\\nsome:fn,\\nsort:fn,\\nsubarray:fn,\\ntoLocaleString:fn,\\ntoString:fn,\\nvalues:fn,\\n'@@iterator':fn,\\n'@@toStringTag':getter,\\n/* See https://github.com/tc39/proposal-array-find-from-last*/\\nfindLast:fn,\\nfindLastIndex:fn,\\n/* https://github.com/tc39/proposal-change-array-by-copy*/\\ntoReversed:fn,\\ntoSorted:fn,\\nwith:fn},\\n\\n\\n/* The TypedArray Constructors*/\\n\\nBigInt64Array:TypedArray('%BigInt64ArrayPrototype%'),\\nBigUint64Array:TypedArray('%BigUint64ArrayPrototype%'),\\n/* https://github.com/tc39/proposal-float16array*/\\nFloat16Array:TypedArray('%Float16ArrayPrototype%'),\\nFloat32Array:TypedArray('%Float32ArrayPrototype%'),\\nFloat64Array:TypedArray('%Float64ArrayPrototype%'),\\nInt16Array:TypedArray('%Int16ArrayPrototype%'),\\nInt32Array:TypedArray('%Int32ArrayPrototype%'),\\nInt8Array:TypedArray('%Int8ArrayPrototype%'),\\nUint16Array:TypedArray('%Uint16ArrayPrototype%'),\\nUint32Array:TypedArray('%Uint32ArrayPrototype%'),\\nUint8Array:TypedArray('%Uint8ArrayPrototype%'),\\nUint8ClampedArray:TypedArray('%Uint8ClampedArrayPrototype%'),\\n\\n'%BigInt64ArrayPrototype%':TypedArrayPrototype('BigInt64Array'),\\n'%BigUint64ArrayPrototype%':TypedArrayPrototype('BigUint64Array'),\\n/* https://github.com/tc39/proposal-float16array*/\\n'%Float16ArrayPrototype%':TypedArrayPrototype('Float16Array'),\\n'%Float32ArrayPrototype%':TypedArrayPrototype('Float32Array'),\\n'%Float64ArrayPrototype%':TypedArrayPrototype('Float64Array'),\\n'%Int16ArrayPrototype%':TypedArrayPrototype('Int16Array'),\\n'%Int32ArrayPrototype%':TypedArrayPrototype('Int32Array'),\\n'%Int8ArrayPrototype%':TypedArrayPrototype('Int8Array'),\\n'%Uint16ArrayPrototype%':TypedArrayPrototype('Uint16Array'),\\n'%Uint32ArrayPrototype%':TypedArrayPrototype('Uint32Array'),\\n'%Uint8ArrayPrototype%':TypedArrayPrototype('Uint8Array'),\\n'%Uint8ClampedArrayPrototype%':TypedArrayPrototype('Uint8ClampedArray'),\\n\\n/* *** Keyed Collections*/\\n\\nMap:{\\n/* Properties of the Map Constructor*/\\n'[[Proto]]':'%FunctionPrototype%',\\n'@@species':getter,\\nprototype:'%MapPrototype%',\\n/* https://github.com/tc39/proposal-array-grouping*/\\ngroupBy:fn},\\n\\n\\n'%MapPrototype%':{\\nclear:fn,\\nconstructor:'Map',\\ndelete:fn,\\nentries:fn,\\nforEach:fn,\\nget:fn,\\nhas:fn,\\nkeys:fn,\\nset:fn,\\nsize:getter,\\nvalues:fn,\\n'@@iterator':fn,\\n'@@toStringTag':'string'},\\n\\n\\n'%MapIteratorPrototype%':{\\n/* The %MapIteratorPrototype% Object*/\\n'[[Proto]]':'%IteratorPrototype%',\\nnext:fn,\\n'@@toStringTag':'string'},\\n\\n\\nSet:{\\n/* Properties of the Set Constructor*/\\n'[[Proto]]':'%FunctionPrototype%',\\nprototype:'%SetPrototype%',\\n'@@species':getter,\\n/* Seen on QuickJS*/\\ngroupBy:false},\\n\\n\\n'%SetPrototype%':{\\nadd:fn,\\nclear:fn,\\nconstructor:'Set',\\ndelete:fn,\\nentries:fn,\\nforEach:fn,\\nhas:fn,\\nkeys:fn,\\nsize:getter,\\nvalues:fn,\\n'@@iterator':fn,\\n'@@toStringTag':'string',\\n/* See https://github.com/tc39/proposal-set-methods*/\\nintersection:fn,\\n/* See https://github.com/tc39/proposal-set-methods*/\\nunion:fn,\\n/* See https://github.com/tc39/proposal-set-methods*/\\ndifference:fn,\\n/* See https://github.com/tc39/proposal-set-methods*/\\nsymmetricDifference:fn,\\n/* See https://github.com/tc39/proposal-set-methods*/\\nisSubsetOf:fn,\\n/* See https://github.com/tc39/proposal-set-methods*/\\nisSupersetOf:fn,\\n/* See https://github.com/tc39/proposal-set-methods*/\\nisDisjointFrom:fn},\\n\\n\\n'%SetIteratorPrototype%':{\\n/* The %SetIteratorPrototype% Object*/\\n'[[Proto]]':'%IteratorPrototype%',\\nnext:fn,\\n'@@toStringTag':'string'},\\n\\n\\nWeakMap:{\\n/* Properties of the WeakMap Constructor*/\\n'[[Proto]]':'%FunctionPrototype%',\\nprototype:'%WeakMapPrototype%'},\\n\\n\\n'%WeakMapPrototype%':{\\nconstructor:'WeakMap',\\ndelete:fn,\\nget:fn,\\nhas:fn,\\nset:fn,\\n'@@toStringTag':'string'},\\n\\n\\nWeakSet:{\\n/* Properties of the WeakSet Constructor*/\\n'[[Proto]]':'%FunctionPrototype%',\\nprototype:'%WeakSetPrototype%'},\\n\\n\\n'%WeakSetPrototype%':{\\nadd:fn,\\nconstructor:'WeakSet',\\ndelete:fn,\\nhas:fn,\\n'@@toStringTag':'string'},\\n\\n\\n/* *** Structured Data*/\\n\\nArrayBuffer:{\\n/* Properties of the ArrayBuffer Constructor*/\\n'[[Proto]]':'%FunctionPrototype%',\\nisView:fn,\\nprototype:'%ArrayBufferPrototype%',\\n'@@species':getter,\\n/* See https://github.com/Moddable-OpenSource/moddable/issues/523*/\\nfromString:false,\\n/* See https://github.com/Moddable-OpenSource/moddable/issues/523*/\\nfromBigInt:false},\\n\\n\\n'%ArrayBufferPrototype%':{\\nbyteLength:getter,\\nconstructor:'ArrayBuffer',\\nslice:fn,\\n'@@toStringTag':'string',\\n/* See https://github.com/Moddable-OpenSource/moddable/issues/523*/\\nconcat:false,\\n/* See https://github.com/tc39/proposal-resizablearraybuffer*/\\ntransfer:fn,\\nresize:fn,\\nresizable:getter,\\nmaxByteLength:getter,\\n/* https://github.com/tc39/proposal-arraybuffer-transfer*/\\ntransferToFixedLength:fn,\\ndetached:getter},\\n\\n\\n/* SharedArrayBuffer Objects*/\\nSharedArrayBuffer:false,/* UNSAFE and purposely suppressed.*/\\n'%SharedArrayBufferPrototype%':false,/* UNSAFE and purposely suppressed.*/\\n\\nDataView:{\\n/* Properties of the DataView Constructor*/\\n'[[Proto]]':'%FunctionPrototype%',\\nBYTES_PER_ELEMENT:'number',/* Non std but undeletable on Safari.*/\\nprototype:'%DataViewPrototype%'},\\n\\n\\n'%DataViewPrototype%':{\\nbuffer:getter,\\nbyteLength:getter,\\nbyteOffset:getter,\\nconstructor:'DataView',\\ngetBigInt64:fn,\\ngetBigUint64:fn,\\n/* https://github.com/tc39/proposal-float16array*/\\ngetFloat16:fn,\\ngetFloat32:fn,\\ngetFloat64:fn,\\ngetInt8:fn,\\ngetInt16:fn,\\ngetInt32:fn,\\ngetUint8:fn,\\ngetUint16:fn,\\ngetUint32:fn,\\nsetBigInt64:fn,\\nsetBigUint64:fn,\\n/* https://github.com/tc39/proposal-float16array*/\\nsetFloat16:fn,\\nsetFloat32:fn,\\nsetFloat64:fn,\\nsetInt8:fn,\\nsetInt16:fn,\\nsetInt32:fn,\\nsetUint8:fn,\\nsetUint16:fn,\\nsetUint32:fn,\\n'@@toStringTag':'string'},\\n\\n\\n/* Atomics*/\\nAtomics:false,/* UNSAFE and suppressed.*/\\n\\nJSON:{\\nparse:fn,\\nstringify:fn,\\n'@@toStringTag':'string',\\n/* https://github.com/tc39/proposal-json-parse-with-source/*/\\nrawJSON:fn,\\nisRawJSON:fn},\\n\\n\\n/* *** Control Abstraction Objects*/\\n\\n/* https://github.com/tc39/proposal-iterator-helpers*/\\nIterator:{\\n/* Properties of the Iterator Constructor*/\\n'[[Proto]]':'%FunctionPrototype%',\\nprototype:'%IteratorPrototype%',\\nfrom:fn},\\n\\n\\n'%IteratorPrototype%':{\\n/* The %IteratorPrototype% Object*/\\n'@@iterator':fn,\\n/* https://github.com/tc39/proposal-iterator-helpers*/\\nconstructor:'Iterator',\\nmap:fn,\\nfilter:fn,\\ntake:fn,\\ndrop:fn,\\nflatMap:fn,\\nreduce:fn,\\ntoArray:fn,\\nforEach:fn,\\nsome:fn,\\nevery:fn,\\nfind:fn,\\n'@@toStringTag':'string',\\n/* https://github.com/tc39/proposal-async-iterator-helpers*/\\ntoAsync:fn,\\n/* See https://github.com/Moddable-OpenSource/moddable/issues/523#issuecomment-1942904505*/\\n'@@dispose':false},\\n\\n\\n/* https://github.com/tc39/proposal-iterator-helpers*/\\n'%WrapForValidIteratorPrototype%':{\\n'[[Proto]]':'%IteratorPrototype%',\\nnext:fn,\\nreturn:fn},\\n\\n\\n/* https://github.com/tc39/proposal-iterator-helpers*/\\n'%IteratorHelperPrototype%':{\\n'[[Proto]]':'%IteratorPrototype%',\\nnext:fn,\\nreturn:fn,\\n'@@toStringTag':'string'},\\n\\n\\n/* https://github.com/tc39/proposal-async-iterator-helpers*/\\nAsyncIterator:{\\n/* Properties of the Iterator Constructor*/\\n'[[Proto]]':'%FunctionPrototype%',\\nprototype:'%AsyncIteratorPrototype%',\\nfrom:fn},\\n\\n\\n'%AsyncIteratorPrototype%':{\\n/* The %AsyncIteratorPrototype% Object*/\\n'@@asyncIterator':fn,\\n/* https://github.com/tc39/proposal-async-iterator-helpers*/\\nconstructor:'AsyncIterator',\\nmap:fn,\\nfilter:fn,\\ntake:fn,\\ndrop:fn,\\nflatMap:fn,\\nreduce:fn,\\ntoArray:fn,\\nforEach:fn,\\nsome:fn,\\nevery:fn,\\nfind:fn,\\n'@@toStringTag':'string',\\n/* See https://github.com/Moddable-OpenSource/moddable/issues/523#issuecomment-1942904505*/\\n'@@asyncDispose':false},\\n\\n\\n/* https://github.com/tc39/proposal-async-iterator-helpers*/\\n'%WrapForValidAsyncIteratorPrototype%':{\\n'[[Proto]]':'%AsyncIteratorPrototype%',\\nnext:fn,\\nreturn:fn},\\n\\n\\n/* https://github.com/tc39/proposal-async-iterator-helpers*/\\n'%AsyncIteratorHelperPrototype%':{\\n'[[Proto]]':'%AsyncIteratorPrototype%',\\nnext:fn,\\nreturn:fn,\\n'@@toStringTag':'string'},\\n\\n\\n'%InertGeneratorFunction%':{\\n/* Properties of the GeneratorFunction Constructor*/\\n'[[Proto]]':'%InertFunction%',\\nprototype:'%Generator%'},\\n\\n\\n'%Generator%':{\\n/* Properties of the GeneratorFunction Prototype Object*/\\n'[[Proto]]':'%FunctionPrototype%',\\nconstructor:'%InertGeneratorFunction%',\\nprototype:'%GeneratorPrototype%',\\n'@@toStringTag':'string'},\\n\\n\\n'%InertAsyncGeneratorFunction%':{\\n/* Properties of the AsyncGeneratorFunction Constructor*/\\n'[[Proto]]':'%InertFunction%',\\nprototype:'%AsyncGenerator%'},\\n\\n\\n'%AsyncGenerator%':{\\n/* Properties of the AsyncGeneratorFunction Prototype Object*/\\n'[[Proto]]':'%FunctionPrototype%',\\nconstructor:'%InertAsyncGeneratorFunction%',\\nprototype:'%AsyncGeneratorPrototype%',\\n/* length prop added here for React Native jsc-android*/\\n/* https://github.com/endojs/endo/issues/660*/\\n/* https://github.com/react-native-community/jsc-android-buildscripts/issues/181*/\\nlength:'number',\\n'@@toStringTag':'string'},\\n\\n\\n'%GeneratorPrototype%':{\\n/* Properties of the Generator Prototype Object*/\\n'[[Proto]]':'%IteratorPrototype%',\\nconstructor:'%Generator%',\\nnext:fn,\\nreturn:fn,\\nthrow:fn,\\n'@@toStringTag':'string'},\\n\\n\\n'%AsyncGeneratorPrototype%':{\\n/* Properties of the AsyncGenerator Prototype Object*/\\n'[[Proto]]':'%AsyncIteratorPrototype%',\\nconstructor:'%AsyncGenerator%',\\nnext:fn,\\nreturn:fn,\\nthrow:fn,\\n'@@toStringTag':'string'},\\n\\n\\n/* TODO: To be replaced with Promise.delegate*/\\n/**/\\n/* The HandledPromise global variable shimmed by `@agoric/eventual-send/shim`*/\\n/* implements an initial version of the eventual send specification at:*/\\n/* https://github.com/tc39/proposal-eventual-send*/\\n/**/\\n/* We will likely change this to add a property to Promise called*/\\n/* Promise.delegate and put static methods on it, which will necessitate*/\\n/* another whitelist change to update to the current proposed standard.*/\\nHandledPromise:{\\n'[[Proto]]':'Promise',\\napplyFunction:fn,\\napplyFunctionSendOnly:fn,\\napplyMethod:fn,\\napplyMethodSendOnly:fn,\\nget:fn,\\ngetSendOnly:fn,\\nprototype:'%PromisePrototype%',\\nresolve:fn},\\n\\n\\nPromise:{\\n/* Properties of the Promise Constructor*/\\n'[[Proto]]':'%FunctionPrototype%',\\nall:fn,\\nallSettled:fn,\\n/* https://github.com/Agoric/SES-shim/issues/550*/\\nany:fn,\\nprototype:'%PromisePrototype%',\\nrace:fn,\\nreject:fn,\\nresolve:fn,\\n/* https://github.com/tc39/proposal-promise-with-resolvers*/\\nwithResolvers:fn,\\n'@@species':getter},\\n\\n\\n'%PromisePrototype%':{\\n/* Properties of the Promise Prototype Object*/\\ncatch:fn,\\nconstructor:'Promise',\\nfinally:fn,\\nthen:fn,\\n'@@toStringTag':'string',\\n/* Non-standard, used in node to prevent async_hooks from breaking*/\\n'UniqueSymbol(async_id_symbol)':accessor,\\n'UniqueSymbol(trigger_async_id_symbol)':accessor,\\n'UniqueSymbol(destroyed)':accessor},\\n\\n\\n'%InertAsyncFunction%':{\\n/* Properties of the AsyncFunction Constructor*/\\n'[[Proto]]':'%InertFunction%',\\nprototype:'%AsyncFunctionPrototype%'},\\n\\n\\n'%AsyncFunctionPrototype%':{\\n/* Properties of the AsyncFunction Prototype Object*/\\n'[[Proto]]':'%FunctionPrototype%',\\nconstructor:'%InertAsyncFunction%',\\n/* length prop added here for React Native jsc-android*/\\n/* https://github.com/endojs/endo/issues/660*/\\n/* https://github.com/react-native-community/jsc-android-buildscripts/issues/181*/\\nlength:'number',\\n'@@toStringTag':'string'},\\n\\n\\n/* Reflection*/\\n\\nReflect:{\\n/* The Reflect Object*/\\n/* Not a function object.*/\\napply:fn,\\nconstruct:fn,\\ndefineProperty:fn,\\ndeleteProperty:fn,\\nget:fn,\\ngetOwnPropertyDescriptor:fn,\\ngetPrototypeOf:fn,\\nhas:fn,\\nisExtensible:fn,\\nownKeys:fn,\\npreventExtensions:fn,\\nset:fn,\\nsetPrototypeOf:fn,\\n'@@toStringTag':'string'},\\n\\n\\nProxy:{\\n/* Properties of the Proxy Constructor*/\\n'[[Proto]]':'%FunctionPrototype%',\\nrevocable:fn},\\n\\n\\n/* Appendix B*/\\n\\n/* Annex B: Additional Properties of the Global Object*/\\n\\nescape:fn,\\nunescape:fn,\\n\\n/* Proposed*/\\n\\n'%UniqueCompartment%':{\\n'[[Proto]]':'%FunctionPrototype%',\\nprototype:'%CompartmentPrototype%',\\ntoString:fn},\\n\\n\\n'%InertCompartment%':{\\n'[[Proto]]':'%FunctionPrototype%',\\nprototype:'%CompartmentPrototype%',\\ntoString:fn},\\n\\n\\n'%CompartmentPrototype%':{\\nconstructor:'%InertCompartment%',\\nevaluate:fn,\\nglobalThis:getter,\\nname:getter,\\nimport:asyncFn,\\nload:asyncFn,\\nimportNow:fn,\\nmodule:fn,\\n'@@toStringTag':'string'},\\n\\n\\nlockdown:fn,\\nharden:{...fn,isFake:'boolean'},\\n\\n'%InitialGetStackString%':fn};exports.AsyncFunctionInstance=AsyncFunctionInstance;exports.FunctionInstance=FunctionInstance;exports.NativeErrors=NativeErrors;exports.constantProperties=constantProperties;exports.initialGlobalPropertyNames=initialGlobalPropertyNames;exports.isAccessorPermit=isAccessorPermit;exports.permitted=permitted;exports.sharedGlobalPropertyNames=sharedGlobalPropertyNames;exports.uniqueGlobalPropertyNames=uniqueGlobalPropertyNames;exports.universalPropertyNames=universalPropertyNames;\",\n \"node_modules/ses/src/scope-constants.js\": \"'use strict';Object.defineProperty(exports,'__esModule',{value:true});var\\n\\n\\n\\n\\n\\n\\n\\n\\ncommons=require('./commons.js');/**\\n * keywords\\n * In JavaScript you cannot use these reserved words as variables.\\n * See 11.6.1 Identifier Names\\n */\\nconst keywords=[\\n/* 11.6.2.1 Keywords*/\\n'await',\\n'break',\\n'case',\\n'catch',\\n'class',\\n'const',\\n'continue',\\n'debugger',\\n'default',\\n'delete',\\n'do',\\n'else',\\n'export',\\n'extends',\\n'finally',\\n'for',\\n'function',\\n'if',\\n'import',\\n'in',\\n'instanceof',\\n'new',\\n'return',\\n'super',\\n'switch',\\n'this',\\n'throw',\\n'try',\\n'typeof',\\n'var',\\n'void',\\n'while',\\n'with',\\n'yield',\\n\\n/* Also reserved when parsing strict mode code*/\\n'let',\\n'static',\\n\\n/* 11.6.2.2 Future Reserved Words*/\\n'enum',\\n\\n/* Also reserved when parsing strict mode code*/\\n'implements',\\n'package',\\n'protected',\\n'interface',\\n'private',\\n'public',\\n\\n/* Reserved but not mentioned in specs*/\\n'await',\\n\\n'null',\\n'true',\\n'false',\\n\\n'this',\\n'arguments'];\\n\\n\\n/**\\n * identifierPattern\\n * Simplified validation of identifier names: may only contain alphanumeric\\n * characters (or \\\"$\\\" or \\\"_\\\"), and may not start with a digit. This is safe\\n * and does not reduces the compatibility of the shim. The motivation for\\n * this limitation was to decrease the complexity of the implementation,\\n * and to maintain a resonable level of performance.\\n * Note: \\\\w is equivalent [a-zA-Z_0-9]\\n * See 11.6.1 Identifier Names\\n */\\nconst identifierPattern=/^[a-zA-Z_$][\\\\w$]*$/;\\n\\n/**\\n * isValidIdentifierName()\\n * What variable names might it bring into scope? These include all\\n * property names which can be variable names, including the names\\n * of inherited properties. It excludes symbols and names which are\\n * keywords. We drop symbols safely. Currently, this shim refuses\\n * service if any of the names are keywords or keyword-like. This is\\n * safe and only prevent performance optimization.\\n *\\n * @param {string} name\\n */\\nconst isValidIdentifierName=(name)=>{\\n/* Ensure we have a valid identifier. We use regexpTest rather than*/\\n/* /../.test() to guard against the case where RegExp has been poisoned.*/\\nreturn(\\nname!=='eval'&&\\n!commons.arrayIncludes(keywords,name)&&\\ncommons.regexpTest(identifierPattern,name));};\\n\\n\\n\\n/* * isImmutableDataProperty\\n */\\n\\n\\nfunction isImmutableDataProperty(obj,name){\\nconst desc=commons.getOwnPropertyDescriptor(obj,name);\\nreturn(\\ndesc&&\\n/**/\\n/* The getters will not have .writable, don't let the falsyness of*/\\n/* 'undefined' trick us: test with === false, not ! . However descriptors*/\\n/* inherit from the (potentially poisoned) global object, so we might see*/\\n/* extra properties which weren't really there. Accessor properties have*/\\n/* 'get/set/enumerable/configurable', while data properties have*/\\n/* 'value/writable/enumerable/configurable'.*/\\ndesc.configurable===false&&\\ndesc.writable===false&&\\n/**/\\n/* Checks for data properties because they're the only ones we can*/\\n/* optimize (accessors are most likely non-constant). Descriptors can't*/\\n/* can't have accessors and value properties at the same time, therefore*/\\n/* this check is sufficient. Using explicit own property deal with the*/\\n/* case where Object.prototype has been poisoned.*/\\ncommons.objectHasOwnProperty(desc,'value'));}\\n\\n\\n\\n/**\\n * getScopeConstants()\\n * What variable names might it bring into scope? These include all\\n * property names which can be variable names, including the names\\n * of inherited properties. It excludes symbols and names which are\\n * keywords. We drop symbols safely. Currently, this shim refuses\\n * service if any of the names are keywords or keyword-like. This is\\n * safe and only prevent performance optimization.\\n *\\n * @param {object} globalObject\\n * @param {object} moduleLexicals\\n */\\nconst getScopeConstants=(globalObject,moduleLexicals={})=>{\\n/* getOwnPropertyNames() does ignore Symbols so we don't need to*/\\n/* filter them out.*/\\nconst globalObjectNames=commons.getOwnPropertyNames(globalObject);\\nconst moduleLexicalNames=commons.getOwnPropertyNames(moduleLexicals);\\n\\n/* Collect all valid & immutable identifiers from the endowments.*/\\nconst moduleLexicalConstants=commons.arrayFilter(\\nmoduleLexicalNames,\\n(name)=>\\nisValidIdentifierName(name)&&\\nisImmutableDataProperty(moduleLexicals,name));\\n\\n\\n/* Collect all valid & immutable identifiers from the global that*/\\n/* are also not present in the endowments (immutable or not).*/\\nconst globalObjectConstants=commons.arrayFilter(\\nglobalObjectNames,\\n(name)=>\\n/* Can't define a constant: it would prevent a*/\\n/* lookup on the endowments.*/\\n!commons.arrayIncludes(moduleLexicalNames,name)&&\\nisValidIdentifierName(name)&&\\nisImmutableDataProperty(globalObject,name));\\n\\n\\nreturn{\\nglobalObjectConstants,\\nmoduleLexicalConstants};};exports.getScopeConstants=getScopeConstants;exports.isValidIdentifierName=isValidIdentifierName;\",\n \"node_modules/ses/src/sloppy-globals-scope-terminator.js\": \"'use strict';Object.defineProperty(exports,'__esModule',{value:true});var commons=require('./commons.js');var\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\nstrictScopeTerminator=require('./strict-scope-terminator.js');/* * createSloppyGlobalsScopeTerminator()\\n * strictScopeTerminatorHandler manages a scopeTerminator Proxy which serves as\\n * the final scope boundary that will always return \\\"undefined\\\" in order\\n * to prevent access to \\\"start compartment globals\\\". When \\\"sloppyGlobalsMode\\\"\\n * is true, the Proxy will perform sets on the \\\"globalObject\\\".\\n */\\n\\nconst createSloppyGlobalsScopeTerminator=(globalObject)=>{\\nconst scopeProxyHandlerProperties={\\n/* inherit scopeTerminator behavior*/\\n...strictScopeTerminator.strictScopeTerminatorHandler,\\n\\n/* Redirect set properties to the globalObject.*/\\nset(_shadow,prop,value){\\nreturn commons.reflectSet(globalObject,prop,value);},\\n\\n\\n/* Always claim to have a potential property in order to be the recipient of a set*/\\nhas(_shadow,_prop){\\nreturn true;}};\\n\\n\\n\\n/* The scope handler's prototype is a proxy that throws if any trap other*/\\n/* than get/set/has are run (like getOwnPropertyDescriptors, apply,*/\\n/* getPrototypeOf).*/\\nconst sloppyGlobalsScopeTerminatorHandler=commons.freeze(\\ncommons.create(\\nstrictScopeTerminator.alwaysThrowHandler,\\ncommons.getOwnPropertyDescriptors(scopeProxyHandlerProperties)));\\n\\n\\n\\nconst sloppyGlobalsScopeTerminator=new commons.Proxy(\\ncommons.immutableObject,\\nsloppyGlobalsScopeTerminatorHandler);\\n\\n\\nreturn sloppyGlobalsScopeTerminator;};\\n\\ncommons.freeze(createSloppyGlobalsScopeTerminator);exports.createSloppyGlobalsScopeTerminator=createSloppyGlobalsScopeTerminator;\",\n \"node_modules/ses/src/strict-scope-terminator.js\": \"'use strict';Object.defineProperty(exports,'__esModule',{value:true});var commons=require('./commons.js');var assert=require('./error/assert.js');\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\nconst{Fail,quote:q}=assert.assert;\\n\\n/**\\n * alwaysThrowHandler\\n * This is an object that throws if any property is called. It's used as\\n * a proxy handler which throws on any trap called.\\n * It's made from a proxy with a get trap that throws. It's safe to\\n * create one and share it between all Proxy handlers.\\n */\\nconst alwaysThrowHandler=new commons.Proxy(\\ncommons.immutableObject,\\ncommons.freeze({\\nget(_shadow,prop){\\nFail`Please report unexpected scope handler trap: ${q(commons.String(prop))}`;}}));\\n\\n\\n\\n\\n/* * scopeProxyHandlerProperties\\n * scopeTerminatorHandler manages a strictScopeTerminator Proxy which serves as\\n * the final scope boundary that will always return \\\"undefined\\\" in order\\n * to prevent access to \\\"start compartment globals\\\".\\n */\\n\\nconst scopeProxyHandlerProperties={\\nget(_shadow,_prop){\\nreturn undefined;},\\n\\n\\nset(_shadow,prop,_value){\\n/* We should only hit this if the has() hook returned true matches the v8*/\\n/* ReferenceError message \\\"Uncaught ReferenceError: xyz is not defined\\\"*/\\nthrow commons.ReferenceError(`${commons.String(prop)} is not defined`);},\\n\\n\\nhas(_shadow,prop){\\n/* we must at least return true for all properties on the realm globalThis*/\\nreturn prop in commons.globalThis;},\\n\\n\\n/* note: this is likely a bug of safari*/\\n/* https://bugs.webkit.org/show_bug.cgi?id=195534*/\\ngetPrototypeOf(_shadow){\\nreturn null;},\\n\\n\\n/* See https://github.com/endojs/endo/issues/1510*/\\n/* TODO: report as bug to v8 or Chrome, and record issue link here.*/\\ngetOwnPropertyDescriptor(_shadow,prop){\\n/* Coerce with `String` in case prop is a symbol.*/\\nconst quotedProp=q(commons.String(prop));\\n/* eslint-disable-next-line @endo/no-polymorphic-call*/\\nconsole.warn(\\n`getOwnPropertyDescriptor trap on scopeTerminatorHandler for ${quotedProp}`,\\ncommons.TypeError().stack);\\n\\nreturn undefined;},\\n\\n\\n/* See https://github.com/endojs/endo/issues/1490*/\\n/* TODO Report bug to JSC or Safari*/\\nownKeys(_shadow){\\nreturn[];}};\\n\\n\\n\\n/* The scope handler's prototype is a proxy that throws if any trap other*/\\n/* than get/set/has are run (like getOwnPropertyDescriptors, apply,*/\\n/* getPrototypeOf).*/\\nconst strictScopeTerminatorHandler=commons.freeze(\\ncommons.create(\\nalwaysThrowHandler,\\ncommons.getOwnPropertyDescriptors(scopeProxyHandlerProperties)));\\n\\n\\n\\nconst strictScopeTerminator=new commons.Proxy(\\ncommons.immutableObject,\\nstrictScopeTerminatorHandler);exports.alwaysThrowHandler=alwaysThrowHandler;exports.strictScopeTerminator=strictScopeTerminator;exports.strictScopeTerminatorHandler=strictScopeTerminatorHandler;\",\n \"node_modules/ses/src/tame-date-constructor.js\": \"'use strict';Object.defineProperty(exports,'__esModule',{value:true});var commons=require('./commons.js');/* @ts-check*/\\n\\n\\n\\n\\n\\n\\n\\n\\n\\nfunction tameDateConstructor(dateTaming='safe'){\\nif(dateTaming!=='safe'&&dateTaming!=='unsafe'){\\nthrow commons.TypeError(`unrecognized dateTaming ${dateTaming}`);}\\n\\nconst OriginalDate=commons.Date;\\nconst DatePrototype=OriginalDate.prototype;\\n\\n/* Use concise methods to obtain named functions without constructors.*/\\nconst tamedMethods={\\n/**\\n * `%SharedDate%.now()` throw a `TypeError` starting with \\\"secure mode\\\".\\n * See https://github.com/endojs/endo/issues/910#issuecomment-1581855420\\n */\\nnow(){\\nthrow commons.TypeError('secure mode Calling %SharedDate%.now() throws');}};\\n\\n\\n\\n/**\\n * Tame the Date constructor.\\n * See https://github.com/endojs/endo/issues/910#issuecomment-1581855420\\n *\\n * Common behavior\\n * * `new Date(x)` coerces x into a number and then returns a Date\\n * for that number of millis since the epoch\\n * * `new Date(NaN)` returns a Date object which stringifies to\\n * 'Invalid Date'\\n * * `new Date(undefined)` returns a Date object which stringifies to\\n * 'Invalid Date'\\n *\\n * OriginalDate (normal standard) behavior preserved by\\n * `%InitialDate%`.\\n * * `Date(anything)` gives a string with the current time\\n * * `new Date()` returns the current time, as a Date object\\n *\\n * `%SharedDate%` behavior\\n * * `Date(anything)` throws a TypeError starting with \\\"secure mode\\\"\\n * * `new Date()` throws a TypeError starting with \\\"secure mode\\\"\\n *\\n * @param {{powers?: string}} [opts]\\n */\\nconst makeDateConstructor=({powers='none'}={})=>{\\nlet ResultDate;\\nif(powers==='original'){\\n/* eslint-disable-next-line no-shadow*/\\nResultDate=function Date(...rest){\\nif(new.target===undefined){\\nreturn commons.apply(OriginalDate,undefined,rest);}\\n\\nreturn commons.construct(OriginalDate,rest,new.target);};}else\\n\\n{\\n/* eslint-disable-next-line no-shadow*/\\nResultDate=function Date(...rest){\\nif(new.target===undefined){\\nthrow commons.TypeError(\\n'secure mode Calling %SharedDate% constructor as a function throws');}\\n\\n\\nif(rest.length===0){\\nthrow commons.TypeError(\\n'secure mode Calling new %SharedDate%() with no arguments throws');}\\n\\n\\nreturn commons.construct(OriginalDate,rest,new.target);};}\\n\\n\\n\\ncommons.defineProperties(ResultDate,{\\nlength:{value:7},\\nprototype:{\\nvalue:DatePrototype,\\nwritable:false,\\nenumerable:false,\\nconfigurable:false},\\n\\nparse:{\\nvalue:OriginalDate.parse,\\nwritable:true,\\nenumerable:false,\\nconfigurable:true},\\n\\nUTC:{\\nvalue:OriginalDate.UTC,\\nwritable:true,\\nenumerable:false,\\nconfigurable:true}});\\n\\n\\nreturn ResultDate;};\\n\\nconst InitialDate=makeDateConstructor({powers:'original'});\\nconst SharedDate=makeDateConstructor({powers:'none'});\\n\\ncommons.defineProperties(InitialDate,{\\nnow:{\\nvalue:OriginalDate.now,\\nwritable:true,\\nenumerable:false,\\nconfigurable:true}});\\n\\n\\ncommons.defineProperties(SharedDate,{\\nnow:{\\nvalue:tamedMethods.now,\\nwritable:true,\\nenumerable:false,\\nconfigurable:true}});\\n\\n\\n\\ncommons.defineProperties(DatePrototype,{\\nconstructor:{value:SharedDate}});\\n\\n\\nreturn{\\n'%InitialDate%':InitialDate,\\n'%SharedDate%':SharedDate};}exports[\\\"default\\\"]=tameDateConstructor;\",\n \"node_modules/ses/src/tame-domains.js\": \"'use strict';Object.defineProperty(exports,'__esModule',{value:true});var commons=require('./commons.js');/* @ts-check*/\\n\\n\\n\\n\\n\\n\\n\\n\\nfunction tameDomains(domainTaming='safe'){\\nif(domainTaming!=='safe'&&domainTaming!=='unsafe'){\\nthrow commons.TypeError(`unrecognized domainTaming ${domainTaming}`);}\\n\\n\\nif(domainTaming==='unsafe'){\\nreturn;}\\n\\n\\n/* Protect against the hazard presented by Node.js domains.*/\\nconst globalProcess=commons.globalThis.process||undefined;\\nif(typeof globalProcess==='object'){\\n/* Check whether domains were initialized.*/\\nconst domainDescriptor=commons.getOwnPropertyDescriptor(globalProcess,'domain');\\nif(domainDescriptor!==undefined&&domainDescriptor.get!==undefined){\\n/* The domain descriptor on Node.js initially has value: null, which*/\\n/* becomes a get, set pair after domains initialize.*/\\n/* See https://github.com/endojs/endo/blob/master/packages/ses/error-codes/SES_NO_DOMAINS.md*/\\nthrow commons.TypeError(\\n`SES failed to lockdown, Node.js domains have been initialized (SES_NO_DOMAINS)`);}\\n\\n\\n/* Prevent domains from initializing.*/\\n/* This is clunky because the exception thrown from the domains package does*/\\n/* not direct the user's gaze toward a knowledge base about the problem.*/\\n/* The domain module merely throws an exception when it attempts to define*/\\n/* the domain property of the process global during its initialization.*/\\n/* We have no better recourse because Node.js uses defineProperty too.*/\\ncommons.defineProperty(globalProcess,'domain',{\\nvalue:null,\\nconfigurable:false,\\nwritable:false,\\nenumerable:false});}}exports.tameDomains=tameDomains;\",\n \"node_modules/ses/src/tame-faux-data-properties.js\": \"'use strict';Object.defineProperty(exports,'__esModule',{value:true});var commons=require('./commons.js');\\n\\n\\n\\n\\n\\n\\nconst throws=(thunk)=>{\\ntry{\\nthunk();\\nreturn false;}\\ncatch(er){\\nreturn true;}};\\n\\n\\n\\n/**\\n * Exported for convenience of unit testing. Harmless, but not expected\\n * to be useful by itself.\\n *\\n * @param {any} obj\\n * @param {string|symbol} prop\\n * @param {any} expectedValue\\n * @returns {boolean}\\n * Returns whether `tameFauxDataProperty` turned the property in question\\n * from an apparent faux data property into the actual data property it\\n * seemed to emulate.\\n * If this function returns `false`, then we hope no effects happened.\\n * However, sniffing out if an accessor property seems to be a faux data\\n * property requires invoking the getter and setter functions that might\\n * possibly have side effects.\\n * `tameFauxDataProperty` is not in a position to tell.\\n */\\nconst tameFauxDataProperty=(obj,prop,expectedValue)=>{\\nif(obj===undefined){\\n/* The object does not exist in this version of the platform*/\\nreturn false;}\\n\\nconst desc=commons.getOwnPropertyDescriptor(obj,prop);\\nif(!desc||'value'in desc){\\n/* The property either doesn't exist, or is already an actual data property.*/\\nreturn false;}\\n\\nconst{get,set}=desc;\\nif(typeof get!=='function'||typeof set!=='function'){\\n/* A faux data property has both a getter and a setter*/\\nreturn false;}\\n\\nif(get()!==expectedValue){\\n/* The getter called by itself should produce the expectedValue*/\\nreturn false;}\\n\\nif(commons.apply(get,obj,[])!==expectedValue){\\n/* The getter called with `this === obj` should also return the*/\\n/* expectedValue.*/\\nreturn false;}\\n\\nconst testValue='Seems to be a setter';\\nconst subject1={__proto__:null};\\ncommons.apply(set,subject1,[testValue]);\\nif(subject1[prop]!==testValue){\\n/* The setter called with an unrelated object as `this` should*/\\n/* set the property on the object.*/\\nreturn false;}\\n\\nconst subject2={__proto__:obj};\\ncommons.apply(set,subject2,[testValue]);\\nif(subject2[prop]!==testValue){\\n/* The setter called on an object that inherits from `obj` should*/\\n/* override the property from `obj` as if by assignment.*/\\nreturn false;}\\n\\nif(!throws(()=>commons.apply(set,obj,[expectedValue]))){\\n/* The setter called with `this === obj` should throw without having*/\\n/* caused any effect.*/\\n/* This is the test that has the greatest danger of leaving behind some*/\\n/* persistent side effect. The most obvious one is to emulate a*/\\n/* successful assignment to the property. That's why this test*/\\n/* uses `expectedValue`, so that case is likely not to actually*/\\n/* change anything.*/\\nreturn false;}\\n\\nif('originalValue'in get){\\n/* The ses-shim uniquely, as far as we know, puts an `originalValue`*/\\n/* property on the getter, so that reflect property tranversal algorithms,*/\\n/* like `harden`, will traverse into the enulated value without*/\\n/* calling the getter. That does not happen until `permits-intrinsics.js`*/\\n/* which is much later. So if we see one this early, we should*/\\n/* not assume we understand what's going on.*/\\nreturn false;}\\n\\n\\n/* We assume that this code runs before any untrusted code runs, so*/\\n/* we do not need to worry about the above conditions passing because of*/\\n/* malicious intent. In fact, it runs even before vetted shims are supposed*/\\n/* to run, between repair and hardening. Given that, after all these tests*/\\n/* pass, we have adequately validated that the property in question is*/\\n/* an accessor function whose purpose is suppressing the override mistake,*/\\n/* i.e., enabling a non-writable property to be overridden by assignment.*/\\n/* In that case, here we *temporarily* turn it into the data property*/\\n/* it seems to emulate, but writable so that it does not trigger the*/\\n/* override mistake while in this temporary state.*/\\n\\n/* For those properties that are also listed in `enablements.js`,*/\\n/* that phase will re-enable override for these properties, but*/\\n/* via accessor functions that SES controls, so we know what they are*/\\n/* doing. In addition, the getter functions installed by*/\\n/* `enable-property-overrides.js` have an `originalValue` field*/\\n/* enabling meta-traversal code like harden to visit the original value*/\\n/* without calling the getter.*/\\n\\nif(desc.configurable===false){\\n/* Even though it seems to be a faux data property, we're unable to fix it.*/\\nreturn false;}\\n\\n\\n/* Many of the `return false;` cases above plausibly should be turned into*/\\n/* errors, or an least generate warnings. However, for those, the checks*/\\n/* following this phase are likely to signal an error anyway.*/\\n\\n/* At this point, we have passed all our sniff checks for validating that*/\\n/* it seems to be a faux data property with the expected value. Turn*/\\n/* it into the actual data property it emulates, but writable so there is*/\\n/* not yet an override mistake problem.*/\\n\\ncommons.defineProperty(obj,prop,{\\nvalue:expectedValue,\\nwritable:true,\\nenumerable:desc.enumerable,\\nconfigurable:true});\\n\\n\\nreturn true;};\\n\\n\\n/**\\n * In JavaScript, the so-called \\\"override mistake\\\" is the inability to\\n * override an inherited non-writable data property by assignment. A common\\n * workaround is to instead define an accessor property that acts like\\n * a non-writable data property, except that it allows an object that\\n * inherits this property to override it by assignment. Let's call\\n * an access property that acts this way a \\\"faux data property\\\". In this\\n * ses-shim, `enable-property-overrides.js` makes the properties listed in\\n * `enablements.js` into faux data properties.\\n *\\n * But the ses-shim is not alone in use of this trick. Starting with the\\n * [Iterator Helpers proposal](https://github.com/tc39/proposal-iterator-helpers),\\n * some properties are defined as (what we call) faux data properties.\\n * Some of these are new properties (`Interator.prototype.constructor`) and\\n * some are old data properties converted to accessor properties\\n * (`Iterator.prototype[String.toStringTag]`). So the ses-shim needs to be\\n * prepared for some enumerated set of properties to already be faux data\\n * properties in the platform prior to our initialization.\\n *\\n * For these possible faux data properties, it is important that\\n * `permits.js` describe each as a data property, so that it can further\\n * constrain the apparent value (that allegedly would be returned by the\\n * getter) according to its own permits.\\n *\\n * However, at the time of this writing, the precise behavior specified\\n * by the iterator-helpers proposal for these faux data properties is\\n * novel. We should not be too confident that all further such platform\\n * additions do what we would now expect. So, for each of these possible\\n * faux data properties, we do some sniffing to see if it behaves as we\\n * currently expect a faux data property to act. If not, then\\n * `tameFauxDataProperties` tries not to modify it, leaving it to later\\n * checks, especially `permits-intrinsics.js`, to error when it sees an\\n * unexpected accessor.\\n *\\n * If one of these enumerated accessor properties does seem to be\\n * a faithful faux data property, then `tameFauxDataProperties` itself\\n * *tempoarily* turns it into the actual data property that it seems to emulate.\\n * This data property starts as writable, so that in this state it will\\n * not trigger the override mistake, i.e., assignment to an object inheriting\\n * this property is allowed to succeed at overriding this property.\\n *\\n * For those properties that should be a faux data property rather than an\\n * actual one, such as those from the iterator-helpers proposal,\\n * they should be listed as such in `enablements.js`, so\\n * `enable-property-overrides.js` will turn it back into a faux data property.\\n * But one controlled by the ses-shim, whose behavior we understand.\\n *\\n * `tameFauxDataProperties`, which turns these into actual data properties,\\n * happens during the `repairIntrinsics` phase\\n * of `lockdown`, before even vetted shim are supposed to run.\\n * `enable-property-overrides.js` runs after vetted shims, turning the\\n * appropriate ones back into faux data properties. Thus vetted shims\\n * can observe the possibly non-conforming state where these are temporarily\\n * actual data properties, rather than faux data properties.\\n *\\n * Coordinate the property enumeration here\\n * with `enablements.js`, so the appropriate properties are\\n * turned back to faux data properties.\\n *\\n * @param {Record<any,any>} intrinsics\\n */\\nconst tameFauxDataProperties=(intrinsics)=>{\\n/* https://github.com/tc39/proposal-iterator-helpers*/\\ntameFauxDataProperty(\\nintrinsics['%IteratorPrototype%'],\\n'constructor',\\nintrinsics.Iterator);\\n\\n/* https://github.com/tc39/proposal-iterator-helpers*/\\ntameFauxDataProperty(\\nintrinsics['%IteratorPrototype%'],\\ncommons.toStringTagSymbol,\\n'Iterator');};exports.tameFauxDataProperties=tameFauxDataProperties;exports.tameFauxDataProperty=tameFauxDataProperty;\",\n \"node_modules/ses/src/tame-function-constructors.js\": \"'use strict';Object.defineProperty(exports,'__esModule',{value:true});var\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\ncommons=require('./commons.js');/* This module replaces the original `Function` constructor, and the original*/ /* `%GeneratorFunction%`, `%AsyncFunction%` and `%AsyncGeneratorFunction%`,*/ /* with safe replacements that throw if invoked.*/ /**/ /* These are all reachable via syntax, so it isn't sufficient to just*/ /* replace global properties with safe versions. Our main goal is to prevent*/ /* access to the `Function` constructor through these starting points.*/ /**/ /* After modules block is done, the originals must no longer be reachable,*/ /* unless a copy has been made, and functions can only be created by syntax*/ /* (using eval) or by invoking a previously saved reference to the originals.*/ /**/ /* Typically, this module will not be used directly, but via the*/ /* [lockdown - shim] which handles all necessary repairs and taming in SES.*/ /**/ /* Relation to ECMA specifications*/ /**/ /* The taming of constructors really wants to be part of the standard, because*/ /* new constructors may be added in the future, reachable from syntax, and this*/ /* list must be updated to match.*/ /**/ /* In addition, the standard needs to define four new intrinsics for the safe*/ /* replacement functions. See [./permits-intrinsics.js].*/ /**/ /* Adapted from SES/Caja*/ /* Copyright (C) 2011 Google Inc.*/ /* https://github.com/google/caja/blob/master/src/com/google/caja/ses/startSES.js*/ /* https://github.com/google/caja/blob/master/src/com/google/caja/ses/repairES5.js*/ /**\\n * tameFunctionConstructors()\\n * This block replaces the original Function constructor, and the original\\n * %GeneratorFunction% %AsyncFunction% and %AsyncGeneratorFunction%, with\\n * safe replacements that throw if invoked.\\n */\\nfunction tameFunctionConstructors(){\\ntry{\\n/* Verify that the method is not callable.*/\\n/* eslint-disable-next-line @endo/no-polymorphic-call*/\\ncommons.FERAL_FUNCTION.prototype.constructor('return 1');}\\ncatch(ignore){\\n/* Throws, no need to patch.*/\\nreturn commons.freeze({});}\\n\\n\\nconst newIntrinsics={};\\n\\n/* * The process to repair constructors:\\n * 1. Create an instance of the function by evaluating syntax\\n * 2. Obtain the prototype from the instance\\n * 3. Create a substitute tamed constructor\\n * 4. Replace the original constructor with the tamed constructor\\n * 5. Replace tamed constructor prototype property with the original one\\n * 6. Replace its [[Prototype]] slot with the tamed constructor of Function\\n */\\n\\nfunction repairFunction(name,intrinsicName,declaration){\\nlet FunctionInstance;\\ntry{\\n/* eslint-disable-next-line no-eval, no-restricted-globals*/\\nFunctionInstance=(0,eval)(declaration);}\\ncatch(e){\\nif(e instanceof commons.SyntaxError){\\n/* Prevent failure on platforms where async and/or generators*/\\n/* are not supported.*/\\nreturn;}\\n\\n/* Re-throw*/\\nthrow e;}\\n\\nconst FunctionPrototype=commons.getPrototypeOf(FunctionInstance);\\n\\n/* Prevents the evaluation of source when calling constructor on the*/\\n/* prototype of functions.*/\\n/* eslint-disable-next-line func-names*/\\nconst InertConstructor=function(){\\nthrow commons.TypeError(\\n'Function.prototype.constructor is not a valid constructor.');};\\n\\n\\ncommons.defineProperties(InertConstructor,{\\nprototype:{value:FunctionPrototype},\\nname:{\\nvalue:name,\\nwritable:false,\\nenumerable:false,\\nconfigurable:true}});\\n\\n\\n\\ncommons.defineProperties(FunctionPrototype,{\\nconstructor:{value:InertConstructor}});\\n\\n\\n/* Reconstructs the inheritance among the new tamed constructors*/\\n/* to mirror the original specified in normal JS.*/\\nif(InertConstructor!==commons.FERAL_FUNCTION.prototype.constructor){\\ncommons.setPrototypeOf(InertConstructor,commons.FERAL_FUNCTION.prototype.constructor);}\\n\\n\\nnewIntrinsics[intrinsicName]=InertConstructor;}\\n\\n\\n/* Here, the order of operation is important: Function needs to be repaired*/\\n/* first since the other repaired constructors need to inherit from the*/\\n/* tamed Function function constructor.*/\\n\\nrepairFunction('Function','%InertFunction%','(function(){})');\\nrepairFunction(\\n'GeneratorFunction',\\n'%InertGeneratorFunction%',\\n'(function*(){})');\\n\\nrepairFunction(\\n'AsyncFunction',\\n'%InertAsyncFunction%',\\n'(async function(){})');\\n\\nrepairFunction(\\n'AsyncGeneratorFunction',\\n'%InertAsyncGeneratorFunction%',\\n'(async function*(){})');\\n\\n\\nreturn newIntrinsics;}exports[\\\"default\\\"]=tameFunctionConstructors;\",\n \"node_modules/ses/src/tame-function-tostring.js\": \"'use strict';Object.defineProperty(exports,'__esModule',{value:true});var commons=require('./commons.js');\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\nconst nativeSuffix=') { [native code] }';\\n\\n/* Note: Top level mutable state. Does not make anything worse, since the*/\\n/* patching of `Function.prototype.toString` is also globally stateful. We*/\\n/* use this top level state so that multiple calls to `tameFunctionToString` are*/\\n/* idempotent, rather than creating redundant indirections.*/\\nlet markVirtualizedNativeFunction;\\n\\n/**\\n * Replace `Function.prototype.toString` with one that recognizes\\n * shimmed functions as honorary native functions.\\n */\\nconst tameFunctionToString=()=>{\\nif(markVirtualizedNativeFunction===undefined){\\nconst virtualizedNativeFunctions=new commons.WeakSet();\\n\\nconst tamingMethods={\\ntoString(){\\nconst str=commons.functionToString(this);\\nif(\\ncommons.stringEndsWith(str,nativeSuffix)||\\n!commons.weaksetHas(virtualizedNativeFunctions,this))\\n{\\nreturn str;}\\n\\nreturn`function ${this.name}() { [native code] }`;}};\\n\\n\\n\\ncommons.defineProperty(commons.functionPrototype,'toString',{\\nvalue:tamingMethods.toString});\\n\\n\\nmarkVirtualizedNativeFunction=commons.freeze((func)=>\\ncommons.weaksetAdd(virtualizedNativeFunctions,func));}\\n\\n\\nreturn markVirtualizedNativeFunction;};exports.tameFunctionToString=tameFunctionToString;\",\n \"node_modules/ses/src/tame-harden.js\": \"'use strict';Object.defineProperty(exports,'__esModule',{value:true});var commons=require('./commons.js');/* eslint-disable no-restricted-globals */\\n\\n\\nconst tameHarden=(safeHarden,hardenTaming)=>{\\nif(hardenTaming!=='safe'&&hardenTaming!=='unsafe'){\\nthrow commons.TypeError(`unrecognized fakeHardenOption ${hardenTaming}`);}\\n\\n\\nif(hardenTaming==='safe'){\\nreturn safeHarden;}\\n\\n\\n/* In on the joke*/\\nObject.isExtensible=()=>false;\\nObject.isFrozen=()=>true;\\nObject.isSealed=()=>true;\\nReflect.isExtensible=()=>false;\\n\\nif(safeHarden.isFake){\\n/* The \\\"safe\\\" hardener is already a fake hardener.*/\\n/* Just use it.*/\\nreturn safeHarden;}\\n\\n\\nconst fakeHarden=(arg)=>arg;\\nfakeHarden.isFake=true;\\nreturn commons.freeze(fakeHarden);};\\n\\ncommons.freeze(tameHarden);exports.tameHarden=tameHarden;\",\n \"node_modules/ses/src/tame-locale-methods.js\": \"'use strict';Object.defineProperty(exports,'__esModule',{value:true});var commons=require('./commons.js');var assert=require('./error/assert.js');\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\nconst{Fail,quote:q}=assert.assert;\\n\\nconst localePattern=/^(\\\\w*[a-z])Locale([A-Z]\\\\w*)$/;\\n\\n/* Use concise methods to obtain named functions without constructor*/\\n/* behavior or `.prototype` property.*/\\nconst tamedMethods={\\n/* See https://tc39.es/ecma262/#sec-string.prototype.localecompare*/\\nlocaleCompare(arg){\\nif(this===null||this===undefined){\\nthrow commons.TypeError(\\n'Cannot localeCompare with null or undefined \\\"this\\\" value');}\\n\\n\\nconst s=`${this}`;\\nconst that=`${arg}`;\\nif(s<that){\\nreturn-1;}\\n\\nif(s>that){\\nreturn 1;}\\n\\ns===that||Fail`expected ${q(s)} and ${q(that)} to compare`;\\nreturn 0;},\\n\\n\\ntoString(){\\nreturn`${this}`;}};\\n\\n\\n\\nconst nonLocaleCompare=tamedMethods.localeCompare;\\nconst numberToString=tamedMethods.toString;\\n\\nfunction tameLocaleMethods(intrinsics,localeTaming='safe'){\\nif(localeTaming!=='safe'&&localeTaming!=='unsafe'){\\nthrow commons.TypeError(`unrecognized localeTaming ${localeTaming}`);}\\n\\nif(localeTaming==='unsafe'){\\nreturn;}\\n\\n\\ncommons.defineProperty(commons.String.prototype,'localeCompare',{\\nvalue:nonLocaleCompare});\\n\\n\\nfor(const intrinsicName of commons.getOwnPropertyNames(intrinsics)){\\nconst intrinsic=intrinsics[intrinsicName];\\nif(commons.isObject(intrinsic)){\\nfor(const methodName of commons.getOwnPropertyNames(intrinsic)){\\nconst match=commons.regexpExec(localePattern,methodName);\\nif(match){\\ntypeof intrinsic[methodName]==='function'||\\nFail`expected ${q(methodName)} to be a function`;\\nconst nonLocaleMethodName=`${match[1]}${match[2]}`;\\nconst method=intrinsic[nonLocaleMethodName];\\ntypeof method==='function'||\\nFail`function ${q(nonLocaleMethodName)} not found`;\\ncommons.defineProperty(intrinsic,methodName,{value:method});}}}}\\n\\n\\n\\n\\n\\n/* Numbers are special because toString accepts a radix instead of ignoring*/\\n/* all of the arguments that we would otherwise forward.*/\\ncommons.defineProperty(commons.Number.prototype,'toLocaleString',{\\nvalue:numberToString});}exports[\\\"default\\\"]=tameLocaleMethods;\",\n \"node_modules/ses/src/tame-math-object.js\": \"'use strict';Object.defineProperty(exports,'__esModule',{value:true});var commons=require('./commons.js');\\n\\n\\n\\n\\n\\n\\n\\nfunction tameMathObject(mathTaming='safe'){\\nif(mathTaming!=='safe'&&mathTaming!=='unsafe'){\\nthrow commons.TypeError(`unrecognized mathTaming ${mathTaming}`);}\\n\\nconst originalMath=commons.Math;\\nconst initialMath=originalMath;/* to follow the naming pattern*/\\n\\nconst{random:_,...otherDescriptors}=\\ncommons.getOwnPropertyDescriptors(originalMath);\\n\\n/* Use concise methods to obtain named functions without constructors.*/\\nconst tamedMethods={\\n/**\\n * `%SharedMath%.random()` throws a TypeError starting with \\\"secure mode\\\".\\n * See https://github.com/endojs/endo/issues/910#issuecomment-1581855420\\n */\\nrandom(){\\nthrow commons.TypeError('secure mode %SharedMath%.random() throws');}};\\n\\n\\n\\nconst sharedMath=commons.create(commons.objectPrototype,{\\n...otherDescriptors,\\nrandom:{\\nvalue:tamedMethods.random,\\nwritable:true,\\nenumerable:false,\\nconfigurable:true}});\\n\\n\\n\\nreturn{\\n'%InitialMath%':initialMath,\\n'%SharedMath%':sharedMath};}exports[\\\"default\\\"]=tameMathObject;\",\n \"node_modules/ses/src/tame-regexp-constructor.js\": \"'use strict';Object.defineProperty(exports,'__esModule',{value:true});var commons=require('./commons.js');\\n\\n\\n\\n\\n\\n\\n\\n\\nfunction tameRegExpConstructor(regExpTaming='safe'){\\nif(regExpTaming!=='safe'&®ExpTaming!=='unsafe'){\\nthrow commons.TypeError(`unrecognized regExpTaming ${regExpTaming}`);}\\n\\nconst RegExpPrototype=commons.FERAL_REG_EXP.prototype;\\n\\nconst makeRegExpConstructor=(_={})=>{\\n/* RegExp has non-writable static properties we need to omit.*/\\n/**\\n * @param {Parameters<typeof FERAL_REG_EXP>} rest\\n */\\nconst ResultRegExp=function RegExp(...rest){\\nif(new.target===undefined){\\nreturn commons.FERAL_REG_EXP(...rest);}\\n\\nreturn commons.construct(commons.FERAL_REG_EXP,rest,new.target);};\\n\\n\\ncommons.defineProperties(ResultRegExp,{\\nlength:{value:2},\\nprototype:{\\nvalue:RegExpPrototype,\\nwritable:false,\\nenumerable:false,\\nconfigurable:false}});\\n\\n\\n/* Hermes does not have `Symbol.species`. We should support such platforms.*/\\nif(commons.speciesSymbol){\\nconst speciesDesc=commons.getOwnPropertyDescriptor(\\ncommons.FERAL_REG_EXP,\\ncommons.speciesSymbol);\\n\\nif(!speciesDesc){\\nthrow commons.TypeError('no RegExp[Symbol.species] descriptor');}\\n\\ncommons.defineProperties(ResultRegExp,{\\n[commons.speciesSymbol]:speciesDesc});}\\n\\n\\nreturn ResultRegExp;};\\n\\n\\nconst InitialRegExp=makeRegExpConstructor();\\nconst SharedRegExp=makeRegExpConstructor();\\n\\nif(regExpTaming!=='unsafe'){\\n/* @ts-expect-error Deleted properties must be optional*/\\ndelete RegExpPrototype.compile;}\\n\\ncommons.defineProperties(RegExpPrototype,{\\nconstructor:{value:SharedRegExp}});\\n\\n\\nreturn{\\n'%InitialRegExp%':InitialRegExp,\\n'%SharedRegExp%':SharedRegExp};}exports[\\\"default\\\"]=tameRegExpConstructor;\",\n \"node_modules/ses/src/tame-symbol-constructor.js\": \"'use strict';Object.defineProperty(exports,'__esModule',{value:true});var\\n\\n\\n\\n\\n\\n\\n\\n\\n\\ncommons=require('./commons.js');/**\\n * This taming provides a tamed alternative to the original `Symbol` constructor\\n * that starts off identical, except that all its properties are \\\"temporarily\\\"\\n * configurable. The original `Symbol` constructor remains unmodified on\\n * the start compartment's global. The tamed alternative is used as the shared\\n * `Symbol` constructor on constructed compartments.\\n *\\n * Starting these properties as configurable assumes two succeeding phases of\\n * processing: A whitelisting phase, that\\n * removes all properties not on the whitelist (which requires them to be\\n * configurable) and a global hardening step that freezes all primordials,\\n * returning these properties to their expected non-configurable status.\\n *\\n * The ses shim is constructed to eventually enable vetted shims to run between\\n * repair and global hardening. However, such vetted shims would normally\\n * run in the start compartment, which continues to use the original unmodified\\n * `Symbol`, so they should not normally be affected by the temporary\\n * configurability of these properties.\\n *\\n * Note that the spec refers to the global `Symbol` function as the\\n * [\\\"Symbol Constructor\\\"](https://tc39.es/ecma262/multipage/fundamental-objects.html#sec-symbol-constructor)\\n * even though it has a call behavior (can be called as a function) and does not\\n * not have a construct behavior (cannot be called with `new`). Accordingly,\\n * to tame it, we must replace it with a function without a construct\\n * behavior.\\n */\\nconst tameSymbolConstructor=()=>{\\nconst OriginalSymbol=commons.Symbol;\\nconst SymbolPrototype=OriginalSymbol.prototype;\\n\\n/* Bypass Hermes bug, fixed in: https://github.com/facebook/hermes/commit/00f18c89c720e1c34592bb85a1a8d311e6e99599*/\\n/* Make a \\\"copy\\\" of the primordial [Symbol \\\"constructor\\\"](https://tc39.es/ecma262/#sec-symbol-description) which maintains all observable behavior. The primordial explicitly throws on `[[Construct]]` and has a `[[Call]]` which ignores the receiver. Binding also maintains the `toString` source as a native function. The `name` is restored below when copying own properties.*/\\nconst SharedSymbol=commons.functionBind(commons.Symbol,undefined);\\n\\ncommons.defineProperties(SymbolPrototype,{\\nconstructor:{\\nvalue:SharedSymbol\\n/* leave other `constructor` attributes as is*/}});\\n\\n\\n\\nconst originalDescsEntries=commons.entries(\\ncommons.getOwnPropertyDescriptors(OriginalSymbol));\\n\\nconst descs=commons.fromEntries(\\ncommons.arrayMap(originalDescsEntries,([name,desc])=>[\\nname,\\n{...desc,configurable:true}]));\\n\\n\\ncommons.defineProperties(SharedSymbol,descs);\\n\\nreturn{'%SharedSymbol%':SharedSymbol};};exports.tameSymbolConstructor=tameSymbolConstructor;\",\n \"node_modules/ses/src/transforms.js\": \"'use strict';Object.defineProperty(exports,'__esModule',{value:true});var commons=require('./commons.js');var\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\ngetSourceUrl=require('./get-source-url.js');/* @ts-check*/ /**\\n * Find the first occurence of the given pattern and return\\n * the location as the approximate line number.\\n *\\n * @param {string} src\\n * @param {RegExp} pattern\\n * @returns {number}\\n */\\nfunction getLineNumber(src,pattern){\\nconst index=commons.stringSearch(src,pattern);\\nif(index<0){\\nreturn-1;}\\n\\n\\n/* The importPattern incidentally captures an initial \\\\n in*/\\n/* an attempt to reject a . prefix, so we need to offset*/\\n/* the line number in that case.*/\\nconst adjustment=src[index]==='\\\\n'?1:0;\\n\\nreturn commons.stringSplit(commons.stringSlice(src,0,index),'\\\\n').length+adjustment;}\\n\\n\\n/* /////////////////////////////////////////////////////////////////////////////*/\\n\\nconst htmlCommentPattern=new commons.FERAL_REG_EXP(`(?:${'<'}!--|--${'>'})`,'g');\\n\\n/**\\n * Conservatively reject the source text if it may contain text that some\\n * JavaScript parsers may treat as an html-like comment. To reject without\\n * parsing, `rejectHtmlComments` will also reject some other text as well.\\n *\\n * https://www.ecma-international.org/ecma-262/9.0/index.html#sec-html-like-comments\\n * explains that JavaScript parsers may or may not recognize html\\n * comment tokens \\\"<\\\" immediately followed by \\\"!--\\\" and \\\"--\\\"\\n * immediately followed by \\\">\\\" in non-module source text, and treat\\n * them as a kind of line comment. Since otherwise both of these can\\n * appear in normal JavaScript source code as a sequence of operators,\\n * we have the terrifying possibility of the same source code parsing\\n * one way on one correct JavaScript implementation, and another way\\n * on another.\\n *\\n * This shim takes the conservative strategy of just rejecting source\\n * text that contains these strings anywhere. Note that this very\\n * source file is written strangely to avoid mentioning these\\n * character strings explicitly.\\n *\\n * We do not write the regexp in a straightforward way, so that an\\n * apparennt html comment does not appear in this file. Thus, we avoid\\n * rejection by the overly eager rejectDangerousSources.\\n *\\n * @param {string} src\\n * @returns {string}\\n */\\nconst rejectHtmlComments=(src)=>{\\nconst lineNumber=getLineNumber(src,htmlCommentPattern);\\nif(lineNumber<0){\\nreturn src;}\\n\\nconst name=getSourceUrl.getSourceURL(src);\\n/* See https://github.com/endojs/endo/blob/master/packages/ses/error-codes/SES_HTML_COMMENT_REJECTED.md*/\\nthrow commons.SyntaxError(\\n`Possible HTML comment rejected at ${name}:${lineNumber}. (SES_HTML_COMMENT_REJECTED)`);};\\n\\n\\n\\n/**\\n * An optional transform to place ahead of `rejectHtmlComments` to evade *that*\\n * rejection. However, it may change the meaning of the program.\\n *\\n * This evasion replaces each alleged html comment with the space-separated\\n * JavaScript operator sequence that it may mean, assuming that it appears\\n * outside of a comment or literal string, in source code where the JS\\n * parser makes no special case for html comments (like module source code).\\n * In that case, this evasion preserves the meaning of the program, though it\\n * does change the souce column numbers on each effected line.\\n *\\n * If the html comment appeared in a literal (a string literal, regexp literal,\\n * or a template literal), then this evasion will change the meaning of the\\n * program by changing the text of that literal.\\n *\\n * If the html comment appeared in a JavaScript comment, then this evasion does\\n * not change the meaning of the program because it only changes the contents of\\n * those comments.\\n *\\n * @param {string} src\\n * @returns {string}\\n */\\nconst evadeHtmlCommentTest=(src)=>{\\nconst replaceFn=(match)=>match[0]==='<'?'< ! --':'-- >';\\nreturn commons.stringReplace(src,htmlCommentPattern,replaceFn);};\\n\\n\\n/* /////////////////////////////////////////////////////////////////////////////*/\\n\\nconst importPattern=new commons.FERAL_REG_EXP(\\n'(^|[^.]|\\\\\\\\.\\\\\\\\.\\\\\\\\.)\\\\\\\\bimport(\\\\\\\\s*(?:\\\\\\\\(|/[/*]))',\\n'g');\\n\\n\\n/**\\n * Conservatively reject the source text if it may contain a dynamic\\n * import expression. To reject without parsing, `rejectImportExpressions` will\\n * also reject some other text as well.\\n *\\n * The proposed dynamic import expression is the only syntax currently\\n * proposed, that can appear in non-module JavaScript code, that\\n * enables direct access to the outside world that cannot be\\n * suppressed or intercepted without parsing and rewriting. Instead,\\n * this shim conservatively rejects any source text that seems to\\n * contain such an expression. To do this safely without parsing, we\\n * must also reject some valid programs, i.e., those containing\\n * apparent import expressions in literal strings or comments.\\n *\\n * The current conservative rule looks for the identifier \\\"import\\\"\\n * followed by either an open paren or something that looks like the\\n * beginning of a comment. We assume that we do not need to worry\\n * about html comment syntax because that was already rejected by\\n * rejectHtmlComments.\\n *\\n * this \\\\s *must* match all kinds of syntax-defined whitespace. If e.g.\\n * U+2028 (LINE SEPARATOR) or U+2029 (PARAGRAPH SEPARATOR) is treated as\\n * whitespace by the parser, but not matched by /\\\\s/, then this would admit\\n * an attack like: import\\\\u2028('power.js') . We're trying to distinguish\\n * something like that from something like importnotreally('power.js') which\\n * is perfectly safe.\\n *\\n * @param {string} src\\n * @returns {string}\\n */\\nconst rejectImportExpressions=(src)=>{\\nconst lineNumber=getLineNumber(src,importPattern);\\nif(lineNumber<0){\\nreturn src;}\\n\\nconst name=getSourceUrl.getSourceURL(src);\\n/* See https://github.com/endojs/endo/blob/master/packages/ses/error-codes/SES_IMPORT_REJECTED.md*/\\nthrow commons.SyntaxError(\\n`Possible import expression rejected at ${name}:${lineNumber}. (SES_IMPORT_REJECTED)`);};\\n\\n\\n\\n/**\\n * An optional transform to place ahead of `rejectImportExpressions` to evade\\n * *that* rejection. However, it may change the meaning of the program.\\n *\\n * This evasion replaces each suspicious `import` identifier with `__import__`.\\n * If the alleged import expression appears in a JavaScript comment, this\\n * evasion will not change the meaning of the program. If it appears in a\\n * literal (string literal, regexp literal, or a template literal), then this\\n * evasion will change the contents of that literal. If it appears as code\\n * where it would be parsed as an expression, then it might or might not change\\n * the meaning of the program, depending on the binding, if any, of the lexical\\n * variable `__import__`.\\n *\\n * @param {string} src\\n * @returns {string}\\n */\\nconst evadeImportExpressionTest=(src)=>{\\nconst replaceFn=(_,p1,p2)=>`${p1}__import__${p2}`;\\nreturn commons.stringReplace(src,importPattern,replaceFn);};\\n\\n\\n/* /////////////////////////////////////////////////////////////////////////////*/\\n\\nconst someDirectEvalPattern=new commons.FERAL_REG_EXP(\\n'(^|[^.])\\\\\\\\beval(\\\\\\\\s*\\\\\\\\()',\\n'g');\\n\\n\\n/**\\n * Heuristically reject some text that seems to contain a direct eval\\n * expression, with both false positives and false negavives. To reject without\\n * parsing, `rejectSomeDirectEvalExpressions` may will also reject some other\\n * text as well. It may also accept source text that contains a direct eval\\n * written oddly, such as `(eval)(src)`. This false negative is not a security\\n * vulnerability. Rather it is a compat hazard because it will execute as\\n * an indirect eval under the SES-shim but as a direct eval on platforms that\\n * support SES directly (like XS).\\n *\\n * The shim cannot correctly emulate a direct eval as explained at\\n * https://github.com/Agoric/realms-shim/issues/12\\n * If we did not reject direct eval syntax, we would\\n * accidentally evaluate these with an emulation of indirect eval. To\\n * prevent future compatibility problems, in shifting from use of the\\n * shim to genuine platform support for the proposal, we should\\n * instead statically reject code that seems to contain a direct eval\\n * expression.\\n *\\n * As with the dynamic import expression, to avoid a full parse, we do\\n * this approximately with a regexp, that will also reject strings\\n * that appear safely in comments or strings. Unlike dynamic import,\\n * if we miss some, this only creates future compat problems, not\\n * security problems. Thus, we are only trying to catch innocent\\n * occurrences, not malicious one. In particular, `(eval)(...)` is\\n * direct eval syntax that would not be caught by the following regexp.\\n *\\n * Exported for unit tests.\\n *\\n * @param {string} src\\n * @returns {string}\\n */\\nconst rejectSomeDirectEvalExpressions=(src)=>{\\nconst lineNumber=getLineNumber(src,someDirectEvalPattern);\\nif(lineNumber<0){\\nreturn src;}\\n\\nconst name=getSourceUrl.getSourceURL(src);\\n/* See https://github.com/endojs/endo/blob/master/packages/ses/error-codes/SES_EVAL_REJECTED.md*/\\nthrow commons.SyntaxError(\\n`Possible direct eval expression rejected at ${name}:${lineNumber}. (SES_EVAL_REJECTED)`);};\\n\\n\\n\\n/* /////////////////////////////////////////////////////////////////////////////*/\\n\\n/**\\n * A transform that bundles together the transforms that must unconditionally\\n * happen last in order to ensure safe evaluation without parsing.\\n *\\n * @param {string} source\\n * @returns {string}\\n */\\nconst mandatoryTransforms=(source)=>{\\nsource=rejectHtmlComments(source);\\nsource=rejectImportExpressions(source);\\nreturn source;};\\n\\n\\n/**\\n * Starting with `source`, apply each transform to the result of the\\n * previous one, returning the result of the last transformation.\\n *\\n * @param {string} source\\n * @param {((str: string) => string)[]} transforms\\n * @returns {string}\\n */\\nconst applyTransforms=(source,transforms)=>{\\nfor(const transform of transforms){\\nsource=transform(source);}\\n\\nreturn source;};\\n\\n\\n/* export all as a frozen object*/\\nconst transforms=commons.freeze({\\nrejectHtmlComments:commons.freeze(rejectHtmlComments),\\nevadeHtmlCommentTest:commons.freeze(evadeHtmlCommentTest),\\nrejectImportExpressions:commons.freeze(rejectImportExpressions),\\nevadeImportExpressionTest:commons.freeze(evadeImportExpressionTest),\\nrejectSomeDirectEvalExpressions:commons.freeze(rejectSomeDirectEvalExpressions),\\nmandatoryTransforms:commons.freeze(mandatoryTransforms),\\napplyTransforms:commons.freeze(applyTransforms)});exports.applyTransforms=applyTransforms;exports.evadeHtmlCommentTest=evadeHtmlCommentTest;exports.evadeImportExpressionTest=evadeImportExpressionTest;exports.mandatoryTransforms=mandatoryTransforms;exports.rejectHtmlComments=rejectHtmlComments;exports.rejectImportExpressions=rejectImportExpressions;exports.rejectSomeDirectEvalExpressions=rejectSomeDirectEvalExpressions;exports.transforms=transforms;\",\n \"packages/xsnap-lockdown/dist/src-object-inspect.js\": \"'use strict';Object.defineProperty(exports,'__esModule',{value:true});var objectInspect=\\\"// @ts-nocheck\\\\n/* eslint-disable no-nested-ternary,no-use-before-define */\\\\n\\\\n/* global globalThis */\\\\n// Adapted from object-inspect@1.12.0 https://github.com/inspect-js/object-inspect\\\\n/*\\\\nMIT License\\\\n\\\\nCopyright (c) 2013 James Halliday\\\\n\\\\nPermission is hereby granted, free of charge, to any person obtaining a copy\\\\nof this software and associated documentation files (the \\\\\\\"Software\\\\\\\"), to deal\\\\nin the Software without restriction, including without limitation the rights\\\\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\\\\ncopies of the Software, and to permit persons to whom the Software is\\\\nfurnished to do so, subject to the following conditions:\\\\n\\\\nThe above copyright notice and this permission notice shall be included in all\\\\ncopies or substantial portions of the Software.\\\\n\\\\nTHE SOFTWARE IS PROVIDED \\\\\\\"AS IS\\\\\\\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\\\\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\\\\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\\\\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\\\\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\\\\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\\\\nSOFTWARE.\\\\n*/\\\\nconst mapSize = Object.getOwnPropertyDescriptor(Map.prototype, 'size').get;\\\\nconst mapForEach = Map.prototype.forEach;\\\\nconst setSize = Object.getOwnPropertyDescriptor(Set.prototype, 'size').get;\\\\nconst setForEach = Set.prototype.forEach;\\\\nconst WeakRefPrototype =\\\\n typeof globalThis.WeakRef === 'function' ? globalThis.WeakRef.prototype : {};\\\\nconst booleanValueOf = Boolean.prototype.valueOf;\\\\nconst objectToString = Object.prototype.toString;\\\\nconst functionToString = Function.prototype.toString;\\\\nconst $match = String.prototype.match;\\\\nconst $slice = String.prototype.slice;\\\\nconst $replace = String.prototype.replace;\\\\nconst $toUpperCase = String.prototype.toUpperCase;\\\\nconst $test = RegExp.prototype.test;\\\\nconst $concat = Array.prototype.concat;\\\\nconst $join = Array.prototype.join;\\\\nconst bigIntValueOf = BigInt.prototype.valueOf;\\\\nconst getOwnPropertyNames = Object.getOwnPropertyNames;\\\\nconst getOwnPropertySymbols = Object.getOwnPropertySymbols;\\\\nconst symToString = Symbol.prototype.toString;\\\\nconst symKeyFor = Symbol.keyFor;\\\\n// ie, `has-tostringtag/shams\\\\nconst toStringTag = Symbol.toStringTag;\\\\nconst isEnumerable = Object.prototype.propertyIsEnumerable;\\\\nconst dateToISOString = Date.prototype.toISOString;\\\\n\\\\nconst gPO = Reflect.getPrototypeOf;\\\\nconst hasOwn = Object.prototype.hasOwnProperty;\\\\n\\\\n// Separate every three rightmost digits.\\\\nconst separateDigits = (\\\\n digits,\\\\n separator = '_',\\\\n separationRegExp = /^-?\\\\\\\\d+(\\\\\\\\d{3})$/,\\\\n) => {\\\\n const separations = [];\\\\n let match;\\\\n // eslint-disable-next-line no-cond-assign\\\\n while ((match = digits.match(separationRegExp))) {\\\\n separations.unshift(match[1]);\\\\n digits = digits.slice(0, -match[1].length);\\\\n }\\\\n separations.unshift(digits);\\\\n return $join.call(separations, separator);\\\\n};\\\\n\\\\nfunction inspect0(obj, opts = {}, depth = 0, circular = new Set()) {\\\\n // Handle enumerable primitives.\\\\n if (obj == null) {\\\\n return obj === null ? 'null' : 'undefined';\\\\n }\\\\n if (obj === true) {\\\\n return 'true';\\\\n }\\\\n if (obj === false) {\\\\n return 'false';\\\\n }\\\\n\\\\n const typeofObj = typeof obj;\\\\n if (typeofObj === 'string') {\\\\n return inspectString(obj, opts);\\\\n }\\\\n if (typeofObj === 'number') {\\\\n if (obj === 0) {\\\\n return Infinity / obj > 0 ? '0' : '-0';\\\\n }\\\\n return String(obj);\\\\n }\\\\n if (typeofObj === 'bigint') {\\\\n // Separate the digits to help visualise, terminate with `n`.\\\\n return `${separateDigits(String(obj))}n`;\\\\n }\\\\n\\\\n const maxDepth = typeof opts.depth === 'undefined' ? 5 : opts.depth;\\\\n if (depth >= maxDepth && maxDepth > 0 && typeofObj === 'object') {\\\\n return isArray(obj) ? '[Array]' : '[Object]';\\\\n }\\\\n\\\\n const indent = getIndent(opts, depth);\\\\n\\\\n if (circular.has(obj)) {\\\\n return '[Circular]';\\\\n }\\\\n\\\\n function inspect(value, from, noIndent) {\\\\n if (from) {\\\\n circular.add(from);\\\\n }\\\\n let ret;\\\\n if (noIndent) {\\\\n const newOpts = {\\\\n depth: opts.depth,\\\\n };\\\\n if (has(opts, 'quoteStyle')) {\\\\n newOpts.quoteStyle = opts.quoteStyle;\\\\n }\\\\n ret = inspect0(value, newOpts, depth + 1, circular);\\\\n } else {\\\\n ret = inspect0(value, opts, depth + 1, circular);\\\\n }\\\\n if (from) {\\\\n circular.delete(from);\\\\n }\\\\n return ret;\\\\n }\\\\n\\\\n if (typeofObj === 'function') {\\\\n const name = nameOf(obj);\\\\n const keys = arrObjKeys(obj, inspect);\\\\n return `[Function${name ? `: ${name}` : ' (anonymous)'}]${\\\\n keys.length > 0 ? ` { ${$join.call(keys, ', ')} }` : ''\\\\n }`;\\\\n }\\\\n if (isSymbol(obj)) {\\\\n const registered = symKeyFor(obj);\\\\n if (registered !== undefined) {\\\\n // Registered symbol.\\\\n return `Symbol.for(${registered})`;\\\\n }\\\\n return symToString.call(obj);\\\\n }\\\\n if (typeof obj !== 'object') {\\\\n // Some new unknown type\\\\n return typeof obj;\\\\n }\\\\n\\\\n if (isArray(obj)) {\\\\n if (obj.length === 0) {\\\\n return '[]';\\\\n }\\\\n const elems = arrObjKeys(obj, inspect);\\\\n if (indent && !singleLineValues(elems)) {\\\\n return `[${indentedJoin(elems, indent)}]`;\\\\n }\\\\n return `[ ${$join.call(elems, ', ')} ]`;\\\\n }\\\\n if (isError(obj)) {\\\\n const parts = arrObjKeys(obj, inspect);\\\\n if ('cause' in obj && !isEnumerable.call(obj, 'cause')) {\\\\n parts.unshift(`[cause]: ${inspect(obj.cause)}`);\\\\n }\\\\n if (parts.length === 0) {\\\\n return `[${String(obj)}]`;\\\\n }\\\\n return `{ [${String(obj)}] ${$join.call(parts, ', ')} }`;\\\\n }\\\\n\\\\n const objProto = gPO(obj);\\\\n switch (objProto) {\\\\n case Map.prototype: {\\\\n const mapParts = [];\\\\n mapForEach.call(obj, (value, key) => {\\\\n mapParts.push(`${inspect(key, obj, true)} => ${inspect(value, obj)}`);\\\\n });\\\\n return collectionOf('Map', mapSize.call(obj), mapParts, indent);\\\\n }\\\\n case Set.prototype: {\\\\n const setParts = [];\\\\n setForEach.call(obj, value => {\\\\n setParts.push(inspect(value, obj));\\\\n });\\\\n return collectionOf('Set', setSize.call(obj), setParts, indent);\\\\n }\\\\n case WeakMap.prototype: {\\\\n return weakContainerOf('WeakMap');\\\\n }\\\\n case WeakSet.prototype: {\\\\n return weakContainerOf('WeakSet');\\\\n }\\\\n case WeakRefPrototype: {\\\\n return weakContainerOf('WeakRef');\\\\n }\\\\n case BigInt.prototype: {\\\\n return markBoxed(inspect(bigIntValueOf.call(obj)));\\\\n }\\\\n default:\\\\n // Fall-through\\\\n }\\\\n\\\\n if (!(toStringTag in obj)) {\\\\n switch (objProto) {\\\\n case Number.prototype: {\\\\n return markBoxed(inspect(Number(obj)));\\\\n }\\\\n case Boolean.prototype: {\\\\n return markBoxed(booleanValueOf.call(obj));\\\\n }\\\\n case String.prototype: {\\\\n return markBoxed(inspect(String(obj)));\\\\n }\\\\n case Date.prototype: {\\\\n return dateToISOString.call(obj);\\\\n }\\\\n case RegExp.prototype: {\\\\n return String(obj);\\\\n }\\\\n default:\\\\n // Fall-through\\\\n }\\\\n }\\\\n\\\\n const elems = arrObjKeys(obj, inspect);\\\\n const isPlainObject = objProto === Object.prototype;\\\\n const protoTag =\\\\n isPlainObject || obj instanceof Object ? '' : 'null prototype';\\\\n const stringTag =\\\\n !isPlainObject && toStringTag && Object(obj) === obj && toStringTag in obj\\\\n ? $slice.call(toStr(obj), 8, -1)\\\\n : protoTag\\\\n ? 'Object'\\\\n : '';\\\\n const protoConstructor = objProto && objProto.constructor;\\\\n const constructorTag =\\\\n isPlainObject || typeof protoConstructor !== 'function'\\\\n ? ''\\\\n : protoConstructor.name\\\\n ? `${protoConstructor.name} `\\\\n : '';\\\\n const tag =\\\\n constructorTag +\\\\n (stringTag || protoTag\\\\n ? `[${$join.call(\\\\n $concat.call([], stringTag || [], protoTag || []),\\\\n ': ',\\\\n )}] `\\\\n : '');\\\\n if (elems.length === 0) {\\\\n return `${tag}{}`;\\\\n }\\\\n if (indent) {\\\\n return `${tag}{${indentedJoin(elems, indent)}}`;\\\\n }\\\\n return `${tag}{ ${$join.call(elems, ', ')} }`;\\\\n}\\\\n\\\\nfunction wrapQuotes(s, defaultStyle, opts) {\\\\n const quoteChar = (opts.quoteStyle || defaultStyle) === 'double' ? '\\\\\\\"' : \\\\\\\"'\\\\\\\";\\\\n return quoteChar + s + quoteChar;\\\\n}\\\\n\\\\nfunction isArray(obj) {\\\\n return (\\\\n Array.isArray(obj) &&\\\\n (!toStringTag || !(typeof obj === 'object' && toStringTag in obj))\\\\n );\\\\n}\\\\nfunction isError(obj) {\\\\n return (\\\\n obj instanceof Error && !(typeof obj === 'object' && toStringTag in obj)\\\\n );\\\\n}\\\\n\\\\n// Symbol and BigInt do have Symbol.toStringTag by spec, so that can't be used to eliminate false positives\\\\nfunction isSymbol(obj) {\\\\n return typeof obj === 'symbol';\\\\n}\\\\n\\\\nfunction has(obj, key) {\\\\n return hasOwn.call(obj, key);\\\\n}\\\\n\\\\nfunction toStr(obj) {\\\\n return objectToString.call(obj);\\\\n}\\\\n\\\\nfunction nameOf(f) {\\\\n if (f.name) {\\\\n return f.name;\\\\n }\\\\n const m = $match.call(functionToString.call(f), /^function\\\\\\\\s*([\\\\\\\\w$]+)/);\\\\n if (m) {\\\\n return m[1];\\\\n }\\\\n return null;\\\\n}\\\\n\\\\nfunction indexOf(xs, x) {\\\\n if (xs.indexOf) {\\\\n return xs.indexOf(x);\\\\n }\\\\n for (let i = 0, l = xs.length; i < l; i += 1) {\\\\n if (xs[i] === x) {\\\\n return i;\\\\n }\\\\n }\\\\n return -1;\\\\n}\\\\n\\\\nfunction inspectString(str, opts) {\\\\n if (str.length > opts.maxStringLength) {\\\\n const remaining = str.length - opts.maxStringLength;\\\\n const trailer = `... ${remaining} more character${\\\\n remaining > 1 ? 's' : ''\\\\n }`;\\\\n return (\\\\n inspectString($slice.call(str, 0, opts.maxStringLength), opts) + trailer\\\\n );\\\\n }\\\\n const s = $replace.call(\\\\n // Replace ' with \\\\\\\\' and \\\\\\\\ with \\\\\\\\\\\\\\\\.\\\\n $replace.call(str, /(['\\\\\\\\\\\\\\\\])/g, '\\\\\\\\\\\\\\\\$1'),\\\\n // eslint-disable-next-line no-control-regex\\\\n /[\\\\\\\\x00-\\\\\\\\x1f]/g,\\\\n lowbyte,\\\\n );\\\\n return wrapQuotes(s, 'single', opts);\\\\n}\\\\n\\\\n// Replace control characters with `\\\\\\\\b`, `\\\\\\\\t`, `\\\\\\\\n`, `\\\\\\\\f`, `\\\\\\\\r`, `\\\\\\\\x0B` or\\\\n// `\\\\\\\\xAB` escaped versions.\\\\nfunction lowbyte(c) {\\\\n const n = c.charCodeAt(0);\\\\n const x = {\\\\n 8: 'b',\\\\n 9: 't',\\\\n 10: 'n',\\\\n 12: 'f',\\\\n 13: 'r',\\\\n }[n];\\\\n if (x) {\\\\n return `\\\\\\\\\\\\\\\\${x}`;\\\\n }\\\\n return `\\\\\\\\\\\\\\\\x${n < 0x10 ? '0' : ''}${$toUpperCase.call(n.toString(16))}`;\\\\n}\\\\n\\\\nfunction markBoxed(str) {\\\\n return `Object(${str})`;\\\\n}\\\\n\\\\nfunction weakContainerOf(type) {\\\\n return `${type} { ? }`;\\\\n}\\\\n\\\\nfunction collectionOf(type, size, entries, indent) {\\\\n const joinedEntries = indent\\\\n ? indentedJoin(entries, indent)\\\\n : $join.call(entries, ', ');\\\\n return `${type} (${size}) {${joinedEntries}}`;\\\\n}\\\\n\\\\nfunction singleLineValues(xs) {\\\\n for (let i = 0; i < xs.length; i += 1) {\\\\n if (indexOf(xs[i], '\\\\\\\\n') >= 0) {\\\\n return false;\\\\n }\\\\n }\\\\n return true;\\\\n}\\\\n\\\\nfunction getIndent(opts, depth) {\\\\n let baseIndent;\\\\n if (opts.indent === '\\\\\\\\t') {\\\\n baseIndent = '\\\\\\\\t';\\\\n } else if (typeof opts.indent === 'number' && opts.indent > 0) {\\\\n baseIndent = $join.call(Array(opts.indent + 1), ' ');\\\\n } else {\\\\n return null;\\\\n }\\\\n return {\\\\n base: baseIndent,\\\\n prev: $join.call(Array(depth + 1), baseIndent),\\\\n };\\\\n}\\\\n\\\\nfunction indentedJoin(xs, indent) {\\\\n if (xs.length === 0) {\\\\n return '';\\\\n }\\\\n const lineJoiner = `\\\\\\\\n${indent.prev}${indent.base}`;\\\\n return `${lineJoiner + $join.call(xs, `,${lineJoiner}`)}\\\\\\\\n${indent.prev}`;\\\\n}\\\\n\\\\nfunction arrObjKeys(obj, inspect) {\\\\n const isArr = isArray(obj);\\\\n const elems = [];\\\\n if (isArr) {\\\\n elems.length = obj.length;\\\\n for (let i = 0; i < obj.length; i += 1) {\\\\n elems[i] = has(obj, i) ? inspect(obj[i], obj) : '';\\\\n }\\\\n }\\\\n const syms = getOwnPropertySymbols(obj);\\\\n for (const key of getOwnPropertyNames(obj)) {\\\\n if (!isEnumerable.call(obj, key)) {\\\\n continue;\\\\n }\\\\n if (isArr && String(Number(key)) === key && key < obj.length) {\\\\n continue;\\\\n }\\\\n if ($test.call(/[^\\\\\\\\w$]/, key)) {\\\\n elems.push(`${inspect(key, obj)}: ${inspect(obj[key], obj)}`);\\\\n } else {\\\\n elems.push(`${key}: ${inspect(obj[key], obj)}`);\\\\n }\\\\n }\\\\n for (let j = 0; j < syms.length; j += 1) {\\\\n if (isEnumerable.call(obj, syms[j])) {\\\\n elems.push(`[${inspect(syms[j])}]: ${inspect(obj[syms[j]], obj)}`);\\\\n }\\\\n }\\\\n return elems;\\\\n}\\\\n\\\\nconst outerInspect = (obj, ...args) => {\\\\n try {\\\\n return inspect0(obj, ...args);\\\\n } catch (err) {\\\\n let errStr;\\\\n try {\\\\n errStr = inspect0(err);\\\\n } catch (_) {\\\\n errStr = 'throw';\\\\n }\\\\n return `[cannot inspect (${typeof obj}) due to ${errStr}]`;\\\\n }\\\\n};\\\\n\\\\n// This must be the only import/export statement, and occur last in the file, so\\\\n// that confined-object-inspect.js can comment out the `export default`\\\\n// and evaluate this entire file's source code to obtain the inspector as the\\\\n// completion value.\\\\nexport default harden(outerInspect);\\\\n\\\";exports[\\\"default\\\"]=objectInspect;\",\n \"packages/xsnap-lockdown/lib/confined-object-inspect.js\": \"'use strict';Object.defineProperty(exports,'__esModule',{value:true});var\\n\\nsrcObjectInspect=require('../dist/src-object-inspect.js');/* Ensure the object inspector is confined.*/\\nconst c=new Compartment();\\nharden(c.globalThis);\\n\\n/* Transform the imported inspector module source string into an evaluable*/\\n/* string. We could have played more games with bundlers to do something less*/\\n/* fragile, but even so, SES should fail-safe if this replacement doesn't match.*/\\n/**/\\n/* The goal (presuming the file ends with a single export default statement):*/\\n/* `...\\\\n export default harden(inspect0);`*/\\n/* becomes:*/\\n/* `...\\\\n /* export default *X/ harden(inspect0);`*/\\n/* and we can evaluate it to obtain the completion value as the object inspector.*/\\nconst src=srcObjectInspect[\\\"default\\\"].replace(\\n/(^|\\\\s)(export\\\\s+default)(\\\\s+)/g,\\n'$1/* $2 */$3');\\n\\nconst objectInspect=c.evaluate(\\n`${src}\\\\n//# sourceURL=xsnap-lockdown/lib/object-inspect.js\\\\n`);exports[\\\"default\\\"]=objectInspect;\",\n \"packages/xsnap-lockdown/lib/console-shim.js\": \"'use strict';\\n\\nObject.defineProperty(exports,'__esModule',{value:true});/* global globalThis, print */ /* Default implementation just stringifies.*/\\nlet inspect=String;\\n\\n/* Allow the importer to override the inspect function.*/\\nconst setObjectInspector=(objectInspector)=>{\\ninspect=objectInspector;};\\n\\n\\nconst printAll=(...args)=>{\\n/* Though xsnap doesn't have a whole console, it does have print().*/\\n/**/\\n/* We use inspect to render non-string arguments to strings.*/\\n/**/\\n/* @ts-expect-error*/\\n/* eslint-disable-next-line no-restricted-globals*/\\nprint(...args.map((v)=>typeof v==='string'?v:inspect(v)));};\\n\\n\\nconst noop=(_)=>{};\\n\\n/**\\n * Since SES expects (requires?) a console,\\n * provide one based on xsnap's print.\\n * Note that this runs in the start compartment,\\n * before lockdown.\\n *\\n * See https://github.com/Agoric/agoric-sdk/issues/2146\\n */\\nconst console={\\ndebug:printAll,\\nlog:printAll,\\ninfo:printAll,\\nwarn:printAll,\\nerror:printAll,\\n\\ntrace:noop,\\ndirxml:noop,\\ngroup:noop,\\ngroupCollapsed:noop,\\ngroupEnd:noop,\\n\\nassert:noop,\\ntimeLog:noop,\\n\\nclear:noop,\\ncount:noop,\\ncountReset:noop,\\ndir:noop,\\n\\ntable:noop,\\ntime:noop,\\ntimeEnd:noop,\\nprofile:noop,\\nprofileEnd:noop,\\ntimeStamp:noop};\\n\\n\\n/* @ts-expect-error doesn't conform to Console*/\\nglobalThis.console=console;exports.setObjectInspector=setObjectInspector;\",\n \"packages/xsnap-lockdown/lib/ses-boot-debug.js\": \"'use strict';var consoleShim=require('./console-shim.js');require('../../../node_modules/@endo/init/debug.js');var confinedObjectInspect=require('./confined-object-inspect.js');/* This file is only used to generate the published bundle, so*/\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\nconsoleShim.setObjectInspector(confinedObjectInspect[\\\"default\\\"]);\\n\\nharden(console);\"\n};\n const nsBundle = {};\n\n function createEvalString(filename) {\n const code = sourceBundle[filename];\n if (!code) {\n return undefined;\n }\n return `\\\n(function getExport(require, exports) { \\\n 'use strict'; \\\n const module = { exports }; \\\n \\\n ${code}\n return module.exports;\n})\n//# sourceURL=${filePrefix}/${filename}\n`;\n }\n\n function computeExports(filename, exportPowers, exports) {\n const { require: systemRequire, systemEval, _log } = exportPowers;\n // This captures the endowed require.\n const match = filename.match(/^(.*)\\/[^/]+$/);\n const thisdir = match ? match[1] : '.';\n const contextRequire = mod => {\n // Do path algebra to find the actual source.\n const els = mod.split('/');\n let prefix;\n if (els[0][0] === '@') {\n // Scoped name.\n prefix = els.splice(0, 2).join('/');\n } else if (els[0][0] === '.') {\n // Relative.\n els.unshift(...thisdir.split('/'));\n } else {\n // Bare or absolute.\n prefix = els.splice(0, 1);\n }\n\n const suffix = [];\n for (const el of els) {\n if (el === '.' || el === '') {\n // Do nothing.\n } else if (el === '..') {\n // Traverse upwards.\n suffix.pop();\n } else {\n suffix.push(el);\n }\n }\n\n // log(mod, prefix, suffix);\n if (prefix !== undefined) {\n suffix.unshift(prefix);\n }\n let modPath = suffix.join('/');\n if (modPath.startsWith('./')) {\n modPath = modPath.slice(2);\n }\n // log('requiring', modPath);\n if (!(modPath in nsBundle)) {\n // log('evaluating', modPath);\n // Break cycles, but be tolerant of modules\n // that completely override their exports object.\n nsBundle[modPath] = {};\n nsBundle[modPath] = computeExports(\n modPath,\n exportPowers,\n nsBundle[modPath],\n );\n }\n\n // log('returning', nsBundle[modPath]);\n return nsBundle[modPath];\n };\n\n const code = createEvalString(filename);\n if (!code) {\n // log('missing code for', filename, sourceBundle);\n if (systemRequire) {\n return systemRequire(filename);\n }\n throw Error(\n `require(${JSON.stringify(\n filename,\n )}) failed; no toplevel require endowment`,\n );\n }\n\n // log('evaluating', code);\n // eslint-disable-next-line no-eval\n return (systemEval || eval)(code)(contextRequire, exports);\n }\n\n // Evaluate the entrypoint recursively, seeding the exports.\n const systemRequire = typeof require === 'undefined' ? undefined : require;\n const systemEval = typeof nestedEvaluate === 'undefined' ? undefined : nestedEvaluate;\n return computeExports(entrypoint, { require: systemRequire, systemEval }, {});\n}\n//# sourceURL=/bundled-source/...-preamble.js\n","sourceMap":"//# sourceURL=/bundled-source/...-preamble.js\n"}
|
|
1
|
+
{"moduleFormat":"nestedEvaluate","source":"function getExportWithNestedEvaluate(filePrefix) {\n 'use strict';\n // Serialised sources.\n if (filePrefix === undefined) {\n filePrefix = \"/bundled-source/...\";\n }\n const moduleFormat = \"nestedEvaluate\";\n const entrypoint = \"packages/xsnap-lockdown/lib/ses-boot-debug.js\";\n const sourceBundle = {\n \"node_modules/@endo/base64/atob.js\": \"'use strict';Object.defineProperty(exports,'__esModule',{value:true});require('./decode.js');var\\n\\ndecode=require('./src/decode.js');/**\\n * @param {string} encodedData a binary string containing base64-encoded data\\n * @returns {string} an ASCII string containing decoded data from `encodedData`\\n */\\nconst atob=(encodedData)=>{\\nconst buf=decode.decodeBase64(encodedData);\\nreturn String.fromCharCode(...buf);};exports.atob=atob;\",\n \"node_modules/@endo/base64/btoa.js\": \"'use strict';Object.defineProperty(exports,'__esModule',{value:true});require('./encode.js');var\\n\\nencode=require('./src/encode.js');/**\\n * @param {string} stringToEncode the binary string to encode\\n * @returns {string} an ASCII string containing the base64 representation of `stringToEncode`\\n */\\nconst btoa=(stringToEncode)=>{\\nconst bytes=stringToEncode.split('').map((char)=>{\\nconst b=char.charCodeAt(0);\\nif(b>0xff){\\nthrow Error(`btoa: character out of range: ${char}`);}\\n\\nreturn b;});\\n\\nconst buf=new Uint8Array(bytes);\\nreturn encode.encodeBase64(buf);};exports.btoa=btoa;\",\n \"node_modules/@endo/base64/decode.js\": \"'use strict';Object.defineProperty(exports,'__esModule',{value:true});var decode=require('./src/decode.js');exports.decodeBase64=decode.decodeBase64;\",\n \"node_modules/@endo/base64/encode.js\": \"'use strict';Object.defineProperty(exports,'__esModule',{value:true});var encode=require('./src/encode.js');exports.encodeBase64=encode.encodeBase64;\",\n \"node_modules/@endo/base64/shim.js\": \"'use strict';var atob=require('./atob.js');var btoa=require('./btoa.js');/* global globalThis */\\n\\n\\n\\n\\nif(globalThis.atob===undefined){\\nglobalThis.atob=atob.atob;}\\n\\n\\nif(globalThis.btoa===undefined){\\nglobalThis.btoa=btoa.btoa;}\",\n \"node_modules/@endo/base64/src/common.js\": \"'use strict';Object.defineProperty(exports,'__esModule',{value:true});/* @ts-check*/\\n\\nconst padding='=';\\n\\nconst alphabet64=\\n'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/';\\n\\n/**\\n * The numeric value corresponding to each letter of the alphabet.\\n * If an alphabet is named for the Greek letters alpha and beta, then clearly a\\n * monodu is named for the corresponding Greek numbers mono and duo.\\n *\\n * @type {Record<string, number>}\\n */\\nconst monodu64={};\\nfor(let i=0;i<alphabet64.length;i+=1){\\nconst c=alphabet64[i];\\nmonodu64[c]=i;}exports.alphabet64=alphabet64;exports.monodu64=monodu64;exports.padding=padding;\",\n \"node_modules/@endo/base64/src/decode.js\": \"'use strict';Object.defineProperty(exports,'__esModule',{value:true});var\\n\\n\\n\\n\\n\\ncommon=require('./common.js');/* @ts-check*/ /**\\n * Decodes a Base64 string into bytes, as specified in\\n * https://tools.ietf.org/html/rfc4648#section-4\\n *\\n * XSnap is a JavaScript engine based on Moddable/XS.\\n * The algorithm below is orders of magnitude too slow on this VM, but it\\n * arranges a native binding on the global object.\\n * We use that if it is available instead.\\n *\\n * This function is exported from this *file* for use in benchmarking,\\n * but is not part of the *module*'s public API.\\n *\\n * @param {string} string Base64-encoded string\\n * @param {string} [name] The name of the string as it will appear in error\\n * messages.\\n * @returns {Uint8Array} decoded bytes\\n */\\nconst jsDecodeBase64=(string,name='<unknown>')=>{\\nconst data=new Uint8Array(Math.ceil(string.length*4/3));\\nlet register=0;\\nlet quantum=0;\\nlet i=0;/* index in string*/\\nlet j=0;/* index in data*/\\n\\nwhile(i<string.length&&string[i]!==common.padding){\\nconst number=common.monodu64[string[i]];\\nif(number===undefined){\\nthrow Error(`Invalid base64 character ${string[i]} in string ${name}`);}\\n\\nregister=register<<6|number;\\nquantum+=6;\\nif(quantum>=8){\\nquantum-=8;\\ndata[j]=register>>>quantum;\\nj+=1;\\nregister&=(1<<quantum)-1;}\\n\\ni+=1;}\\n\\n\\nwhile(quantum>0){\\nif(i===string.length||string[i]!==common.padding){\\nthrow Error(`Missing padding at offset ${i} of string ${name}`);}\\n\\n/* We MAY reject non-zero padding bits, but choose not to.*/\\n/* https://datatracker.ietf.org/doc/html/rfc4648#section-3.5*/\\ni+=1;\\nquantum-=2;}\\n\\n\\nif(i<string.length){\\nthrow Error(\\n`Base64 string has trailing garbage ${string.substr(\\ni)\\n} in string ${name}`);}\\n\\n\\n\\nreturn data.subarray(0,j);};\\n\\n\\n/* The XS Base64.decode function is faster, but might return ArrayBuffer (not*/\\n/* Uint8Array). Adapt it to our needs.*/\\nconst adaptDecoder=\\n(nativeDecodeBase64)=>\\n(...args)=>{\\nconst decoded=nativeDecodeBase64(...args);\\nif(decoded instanceof Uint8Array){\\nreturn decoded;}\\n\\nreturn new Uint8Array(decoded);};\\n\\n\\n/** @type {typeof jsDecodeBase64} */\\nconst decodeBase64=\\nglobalThis.Base64!==undefined?\\nadaptDecoder(globalThis.Base64.decode):\\njsDecodeBase64;exports.decodeBase64=decodeBase64;exports.jsDecodeBase64=jsDecodeBase64;\",\n \"node_modules/@endo/base64/src/encode.js\": \"'use strict';Object.defineProperty(exports,'__esModule',{value:true});var\\n\\n\\n\\n\\n\\ncommon=require('./common.js');/* @ts-check*/ /**\\n * XSnap is a JavaScript engine based on Moddable/XS.\\n * The algorithm below is orders of magnitude too slow on this VM, but it\\n * arranges a native binding on the global object.\\n * We use that if it is available instead.\\n *\\n * This function is exported from this *file* for use in benchmarking,\\n * but is not part of the *module*'s public API.\\n *\\n * @param {Uint8Array} data\\n * @returns {string} base64 encoding\\n */\\nconst jsEncodeBase64=(data)=>{\\n/* A cursory benchmark shows that string concatenation is about 25% faster*/\\n/* than building an array and joining it in v8, in 2020, for strings of about*/\\n/* 100 long.*/\\nlet string='';\\nlet register=0;\\nlet quantum=0;\\n\\nfor(let i=0;i<data.length;i+=1){\\nconst b=data[i];\\nregister=register<<8|b;\\nquantum+=8;\\nif(quantum===24){\\nstring+=\\ncommon.alphabet64[register>>>18&0x3f]+\\ncommon.alphabet64[register>>>12&0x3f]+\\ncommon.alphabet64[register>>>6&0x3f]+\\ncommon.alphabet64[register>>>0&0x3f];\\nregister=0;\\nquantum=0;}}\\n\\n\\n\\nswitch(quantum){\\ncase 0:\\nbreak;\\ncase 8:\\nstring+=\\ncommon.alphabet64[register>>>2&0x3f]+\\ncommon.alphabet64[register<<4&0x3f]+\\ncommon.padding+\\ncommon.padding;\\nbreak;\\ncase 16:\\nstring+=\\ncommon.alphabet64[register>>>10&0x3f]+\\ncommon.alphabet64[register>>>4&0x3f]+\\ncommon.alphabet64[register<<2&0x3f]+\\ncommon.padding;\\nbreak;\\ndefault:\\nthrow Error(`internal: bad quantum ${quantum}`);}\\n\\nreturn string;};\\n\\n\\n/**\\n * Encodes bytes into a Base64 string, as specified in\\n * https://tools.ietf.org/html/rfc4648#section-4\\n *\\n * @type {typeof jsEncodeBase64}\\n */\\nconst encodeBase64=\\nglobalThis.Base64!==undefined?globalThis.Base64.encode:jsEncodeBase64;exports.encodeBase64=encodeBase64;exports.jsEncodeBase64=jsEncodeBase64;\",\n \"node_modules/@endo/env-options/index.js\": \"'use strict';Object.defineProperty(exports,'__esModule',{value:true});var envOptions=require('./src/env-options.js');exports.environmentOptionsListHas=envOptions.environmentOptionsListHas;exports.getEnvironmentOption=envOptions.getEnvironmentOption;exports.getEnvironmentOptionsList=envOptions.getEnvironmentOptionsList;exports.makeEnvironmentCaptor=envOptions.makeEnvironmentCaptor;\",\n \"node_modules/@endo/env-options/src/env-options.js\": \"'use strict';\\n\\n\\n\\n\\n\\n\\n\\nObject.defineProperty(exports,'__esModule',{value:true});/* global globalThis */ /* @ts-check*/ /* `@endo/env-options` needs to be imported quite early, and so should*/ /* avoid importing from ses or anything that depends on ses.*/ /* /////////////////////////////////////////////////////////////////////////////*/ /* Prelude of cheap good - enough imitations of things we'd use or*/ /* do differently if we could depend on ses*/\\n\\nconst{freeze}=Object;\\nconst{apply}=Reflect;\\n\\n/* Should be equivalent to the one in ses' commons.js even though it*/\\n/* uses the other technique.*/\\nconst uncurryThis=\\n(fn)=>\\n(receiver,...args)=>\\napply(fn,receiver,args);\\nconst arrayPush=uncurryThis(Array.prototype.push);\\nconst arrayIncludes=uncurryThis(Array.prototype.includes);\\nconst stringSplit=uncurryThis(String.prototype.split);\\n\\nconst q=JSON.stringify;\\n\\nconst Fail=(literals,...args)=>{\\nlet msg=literals[0];\\nfor(let i=0;i<args.length;i+=1){\\nmsg=`${msg}${args[i]}${literals[i+1]}`;}\\n\\nthrow Error(msg);};\\n\\n\\n/* end prelude*/\\n/* /////////////////////////////////////////////////////////////////////////////*/\\n\\n/**\\n * `makeEnvironmentCaptor` provides a mechanism for getting environment\\n * variables, if they are needed, and a way to catalog the names of all\\n * the environment variables that were captured.\\n *\\n * @param {object} aGlobal\\n * @param {boolean} [dropNames] Defaults to false. If true, don't track\\n * names used.\\n */\\nconst makeEnvironmentCaptor=(aGlobal,dropNames=false)=>{\\nconst capturedEnvironmentOptionNames=[];\\n\\n/**\\n * Gets an environment option by name and returns the option value or the\\n * given default.\\n *\\n * @param {string} optionName\\n * @param {string} defaultSetting\\n * @param {string[]} [optOtherValues]\\n * If provided, the option value must be included or match `defaultSetting`.\\n * @returns {string}\\n */\\nconst getEnvironmentOption=(\\noptionName,\\ndefaultSetting,\\noptOtherValues=undefined)=>\\n{\\ntypeof optionName==='string'||\\nFail`Environment option name ${q(optionName)} must be a string.`;\\ntypeof defaultSetting==='string'||\\nFail`Environment option default setting ${q(\\ndefaultSetting)\\n} must be a string.`;\\n\\n/** @type {string} */\\nlet setting=defaultSetting;\\nconst globalProcess=aGlobal.process||undefined;\\nconst globalEnv=\\ntypeof globalProcess==='object'&&globalProcess.env||undefined;\\nif(typeof globalEnv==='object'){\\nif(optionName in globalEnv){\\nif(!dropNames){\\narrayPush(capturedEnvironmentOptionNames,optionName);}\\n\\nconst optionValue=globalEnv[optionName];\\n/* eslint-disable-next-line @endo/no-polymorphic-call*/\\ntypeof optionValue==='string'||\\nFail`Environment option named ${q(\\noptionName)\\n}, if present, must have a corresponding string value, got ${q(\\noptionValue)\\n}`;\\nsetting=optionValue;}}\\n\\n\\noptOtherValues===undefined||\\nsetting===defaultSetting||\\narrayIncludes(optOtherValues,setting)||\\nFail`Unrecognized ${q(optionName)} value ${q(\\nsetting)\\n}. Expected one of ${q([defaultSetting,...optOtherValues])}`;\\nreturn setting;};\\n\\nfreeze(getEnvironmentOption);\\n\\n/**\\n * @param {string} optionName\\n * @returns {string[]}\\n */\\nconst getEnvironmentOptionsList=(optionName)=>{\\nconst option=getEnvironmentOption(optionName,'');\\nreturn freeze(option===''?[]:stringSplit(option,','));};\\n\\nfreeze(getEnvironmentOptionsList);\\n\\nconst environmentOptionsListHas=(optionName,element)=>\\narrayIncludes(getEnvironmentOptionsList(optionName),element);\\n\\nconst getCapturedEnvironmentOptionNames=()=>{\\nreturn freeze([...capturedEnvironmentOptionNames]);};\\n\\nfreeze(getCapturedEnvironmentOptionNames);\\n\\nreturn freeze({\\ngetEnvironmentOption,\\ngetEnvironmentOptionsList,\\nenvironmentOptionsListHas,\\ngetCapturedEnvironmentOptionNames});};\\n\\n\\nfreeze(makeEnvironmentCaptor);\\n\\n/**\\n * For the simple case, where the global in question is `globalThis` and no\\n * reporting of option names is desired.\\n */\\nconst{\\ngetEnvironmentOption,\\ngetEnvironmentOptionsList,\\nenvironmentOptionsListHas}=\\nmakeEnvironmentCaptor(globalThis,true);exports.environmentOptionsListHas=environmentOptionsListHas;exports.getEnvironmentOption=getEnvironmentOption;exports.getEnvironmentOptionsList=getEnvironmentOptionsList;exports.makeEnvironmentCaptor=makeEnvironmentCaptor;\",\n \"node_modules/@endo/eventual-send/shim.js\": \"'use strict';var handledPromise=require('./src/handled-promise.js');/* global globalThis */\\n\\n\\nif(typeof globalThis.HandledPromise==='undefined'){\\nglobalThis.HandledPromise=handledPromise.makeHandledPromise();}\",\n \"node_modules/@endo/eventual-send/src/handled-promise.js\": \"'use strict';Object.defineProperty(exports,'__esModule',{value:true});var trackTurns=require('./track-turns.js');var local=require('./local.js');var postponed=require('./postponed.js');/*/ <reference types=\\\"ses\\\" />*/\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\nconst{Fail,details:X,quote:q,note:annotateError}=assert;\\n\\nconst{\\ncreate,\\nfreeze,\\ngetOwnPropertyDescriptor,\\ngetOwnPropertyDescriptors,\\ndefineProperties,\\ngetPrototypeOf,\\nsetPrototypeOf,\\nisFrozen,\\nis:objectIs}=\\nObject;\\n\\nconst{apply,construct,ownKeys}=Reflect;\\n\\nconst SEND_ONLY_RE=/^(.*)SendOnly$/;\\n\\n/**\\n * Coerce to an object property (string or symbol).\\n *\\n * @param {any} specimen\\n * @returns {string | symbol}\\n */\\nconst coerceToObjectProperty=(specimen)=>{\\nif(typeof specimen==='symbol'){\\nreturn specimen;}\\n\\nreturn String(specimen);};\\n\\n\\n/* the following method (makeHandledPromise) is part*/\\n/* of the shim, and will not be exported by the module once the feature*/\\n/* becomes a part of standard javascript*/\\n\\n/**\\n * Create a HandledPromise class to have it support eventual send\\n * (wavy-dot) operations.\\n *\\n * Based heavily on nanoq\\n * https://github.com/drses/nanoq/blob/master/src/nanoq.js\\n *\\n * Original spec for the infix-bang (predecessor to wavy-dot) desugaring:\\n * https://web.archive.org/web/20161026162206/http://wiki.ecmascript.org/doku.php?id=strawman:concurrency\\n *\\n */\\nconst makeHandledPromise=()=>{\\nconst presenceToHandler=new WeakMap();\\n/** @type {WeakMap<any, any>} */\\nconst presenceToPromise=new WeakMap();\\nconst promiseToPendingHandler=new WeakMap();\\nconst promiseToPresence=new WeakMap();\\nconst forwardedPromiseToPromise=new WeakMap();/* forwarding, union-find-ish*/\\n\\n/**\\n * You can imagine a forest of trees in which the roots of each tree is an\\n * unresolved HandledPromise or a non-Promise, and each node's parent is the\\n * HandledPromise to which it was forwarded. We maintain that mapping of\\n * forwarded HandledPromise to its resolution in forwardedPromiseToPromise.\\n *\\n * We use something like the description of \\\"Find\\\" with \\\"Path splitting\\\"\\n * to propagate changes down to the children efficiently:\\n * https://en.wikipedia.org/wiki/Disjoint-set_data_structure\\n *\\n * @param {any} target Any value.\\n * @returns {any} If the target was a HandledPromise, the most-resolved parent\\n * of it, otherwise the target.\\n */\\nconst shorten=(target)=>{\\nlet p=target;\\n/* Find the most-resolved value for p.*/\\nwhile(forwardedPromiseToPromise.has(p)){\\np=forwardedPromiseToPromise.get(p);}\\n\\nconst presence=promiseToPresence.get(p);\\nif(presence){\\n/* Presences are final, so it is ok to propagate*/\\n/* this upstream.*/\\nwhile(!objectIs(target,p)){\\nconst parent=forwardedPromiseToPromise.get(target);\\nforwardedPromiseToPromise.delete(target);\\npromiseToPendingHandler.delete(target);\\npromiseToPresence.set(target,presence);\\ntarget=parent;}}else\\n\\n{\\n/* We propagate p and remove all other pending handlers*/\\n/* upstream.*/\\n/* Note that everything except presences is covered here.*/\\nwhile(!objectIs(target,p)){\\nconst parent=forwardedPromiseToPromise.get(target);\\nforwardedPromiseToPromise.set(target,p);\\npromiseToPendingHandler.delete(target);\\ntarget=parent;}}\\n\\n\\nreturn target;};\\n\\n\\n/**\\n * This special handler accepts Promises, and forwards\\n * handled Promises to their corresponding fulfilledHandler.\\n *\\n * @type {Required<Handler<any>>}\\n */\\nlet forwardingHandler;\\n/** @type {(...args: any[]) => Promise<unknown>} */\\nlet handle;\\n\\n/**\\n * @param {string} handlerName\\n * @param {Handler<any>} handler\\n * @param {keyof Handler<any>} operation\\n * @param {any} o\\n * @param {any[]} opArgs\\n * @param {Promise<unknown>} [returnedP]\\n * @returns {any}\\n */\\nconst dispatchToHandler=(\\nhandlerName,\\nhandler,\\noperation,\\no,\\nopArgs,\\nreturnedP)=>\\n{\\nlet actualOp=operation;\\n\\nconst matchSendOnly=SEND_ONLY_RE.exec(actualOp);\\n\\nconst makeResult=(result)=>matchSendOnly?undefined:result;\\n\\nif(matchSendOnly){\\n/* We don't specify the resulting promise if it is sendonly.*/\\nreturnedP=undefined;}\\n\\n\\nif(matchSendOnly&&typeof handler[actualOp]!=='function'){\\n/* Substitute for sendonly with the corresponding non-sendonly operation.*/\\nactualOp=/** @type {'get' | 'applyMethod' | 'applyFunction'} */\\nmatchSendOnly[1];}\\n\\n\\n\\n/* Fast path: just call the actual operation.*/\\nconst hfn=handler[actualOp];\\nif(typeof hfn==='function'){\\nconst result=apply(hfn,handler,[o,...opArgs,returnedP]);\\nreturn makeResult(result);}\\n\\n\\nif(actualOp==='applyMethod'){\\n/* Compose a missing applyMethod by get followed by applyFunction.*/\\nconst[prop,args]=opArgs;\\nconst getResultP=handle(\\no,\\n'get',\\n/* The argument to 'get' is a string or symbol.*/\\n[coerceToObjectProperty(prop)],\\nundefined);\\n\\nreturn makeResult(handle(getResultP,'applyFunction',[args],returnedP));}\\n\\n\\n/* BASE CASE: applyFunction bottoms out into applyMethod, if it exists.*/\\nif(actualOp==='applyFunction'){\\nconst amfn=handler.applyMethod;\\nif(typeof amfn==='function'){\\n/* Downlevel a missing applyFunction to applyMethod with undefined name.*/\\nconst[args]=opArgs;\\nconst result=apply(amfn,handler,[o,undefined,[args],returnedP]);\\nreturn makeResult(result);}}\\n\\n\\n\\nthrow assert.fail(\\nX`${q(handlerName)} is defined but has no methods needed for ${q(\\noperation)\\n} (has ${q(local.getMethodNames(handler))})`,\\nTypeError);};\\n\\n\\n\\n/** @typedef {{new <R>(executor: HandledExecutor<R>, unfulfilledHandler?: Handler<Promise<unknown>>): Promise<R>, prototype: Promise<unknown>} & PromiseConstructor & HandledPromiseStaticMethods} HandledPromiseConstructor */\\n/** @type {HandledPromiseConstructor} */\\nlet HandledPromise;\\n\\n/**\\n * This *needs* to be a `function X` so that we can use it as a constructor.\\n *\\n * @template R\\n * @param {HandledExecutor<R>} executor\\n * @param {Handler<Promise<R>>} [pendingHandler]\\n * @returns {Promise<R>}\\n */\\nfunction baseHandledPromise(executor,pendingHandler=undefined){\\nnew.target||Fail`must be invoked with \\\"new\\\"`;\\nlet handledResolve;\\nlet handledReject;\\nlet resolved=false;\\nlet resolvedTarget=null;\\n/** @type {Promise<R>} */\\nlet handledP;\\nlet continueForwarding=()=>{};\\nconst assertNotYetForwarded=()=>{\\n!forwardedPromiseToPromise.has(handledP)||\\nassert.fail(X`internal: already forwarded`,TypeError);};\\n\\nconst superExecutor=(superResolve,superReject)=>{\\nhandledResolve=(value)=>{\\nif(resolved){\\nreturn;}\\n\\nassertNotYetForwarded();\\nvalue=shorten(value);\\nlet targetP;\\nif(\\npromiseToPendingHandler.has(value)||\\npromiseToPresence.has(value))\\n{\\ntargetP=value;}else\\n{\\n/* We're resolving to a non-promise, so remove our handler.*/\\npromiseToPendingHandler.delete(handledP);\\ntargetP=presenceToPromise.get(value);}\\n\\n/* Ensure our data structure is a proper tree (avoid cycles).*/\\nif(targetP&&!objectIs(targetP,handledP)){\\nforwardedPromiseToPromise.set(handledP,targetP);}else\\n{\\nforwardedPromiseToPromise.delete(handledP);}\\n\\n\\n/* Remove stale pending handlers, set to canonical form.*/\\nshorten(handledP);\\n\\n/* Finish the resolution.*/\\nsuperResolve(value);\\nresolved=true;\\nresolvedTarget=value;\\n\\n/* We're resolved, so forward any postponed operations to us.*/\\ncontinueForwarding();};\\n\\nhandledReject=(reason)=>{\\nif(resolved){\\nreturn;}\\n\\nharden(reason);\\nassertNotYetForwarded();\\npromiseToPendingHandler.delete(handledP);\\nresolved=true;\\nsuperReject(reason);\\ncontinueForwarding();};};\\n\\n\\nhandledP=harden(construct(Promise,[superExecutor],new.target));\\n\\nif(!pendingHandler){\\n/* This is insufficient for actual remote handled Promises*/\\n/* (too many round-trips), but is an easy way to create a*/\\n/* local handled Promise.*/\\n[pendingHandler,continueForwarding]=\\npostponed.makePostponedHandler(HandledPromise);}\\n\\n\\nconst validateHandler=(h)=>{\\nObject(h)===h||\\nassert.fail(X`Handler ${h} cannot be a primitive`,TypeError);};\\n\\nvalidateHandler(pendingHandler);\\n\\n/* Until the handled promise is resolved, we use the pendingHandler.*/\\npromiseToPendingHandler.set(handledP,pendingHandler);\\n\\nconst rejectHandled=(reason)=>{\\nif(resolved){\\nreturn;}\\n\\nassertNotYetForwarded();\\nhandledReject(reason);};\\n\\n\\nconst resolveWithPresence=(\\npresenceHandler=pendingHandler,\\noptions={})=>\\n{\\nif(resolved){\\nreturn resolvedTarget;}\\n\\nassertNotYetForwarded();\\ntry{\\n/* Sanity checks.*/\\nvalidateHandler(presenceHandler);\\n\\nconst{proxy:proxyOpts}=options;\\nlet presence;\\nif(proxyOpts){\\nconst{\\nhandler:proxyHandler,\\ntarget:proxyTarget,\\nrevokerCallback}=\\nproxyOpts;\\nif(revokerCallback){\\n/* Create a proxy and its revoke function.*/\\nconst{proxy,revoke}=Proxy.revocable(\\nproxyTarget,\\nproxyHandler);\\n\\npresence=proxy;\\nrevokerCallback(revoke);}else\\n{\\npresence=new Proxy(proxyTarget,proxyHandler);}}else\\n\\n{\\n/* Default presence.*/\\npresence=create(null);}\\n\\n\\n/* Validate and install our mapped target (i.e. presence).*/\\nresolvedTarget=presence;\\n\\n/* Create table entries for the presence mapped to the*/\\n/* fulfilledHandler.*/\\npresenceToPromise.set(resolvedTarget,handledP);\\npromiseToPresence.set(handledP,resolvedTarget);\\npresenceToHandler.set(resolvedTarget,presenceHandler);\\n\\n/* We committed to this presence, so resolve.*/\\nhandledResolve(resolvedTarget);\\nreturn resolvedTarget;}\\ncatch(e){\\nannotateError(e,X`during resolveWithPresence`);\\nhandledReject(e);\\nthrow e;}};\\n\\n\\n\\nconst resolveHandled=(target)=>{\\nif(resolved){\\nreturn;}\\n\\nassertNotYetForwarded();\\ntry{\\n/* Resolve the target.*/\\nhandledResolve(target);}\\ncatch(e){\\nhandledReject(e);}};\\n\\n\\n\\n/* Invoke the callback to let the user resolve/reject.*/\\nexecutor(resolveHandled,rejectHandled,resolveWithPresence);\\n\\nreturn handledP;}\\n\\n\\n/**\\n * If the promise `p` is safe, then during the evaluation of the\\n * expressopns `p.then` and `await p`, `p` cannot mount a reentrancy attack.\\n * Unfortunately, due to limitations of the current JavaScript standard,\\n * it seems impossible to prevent `p` from mounting a reentrancy attack\\n * during the evaluation of `isSafePromise(p)`, and therefore during\\n * operations like `HandledPromise.resolve(p)` that call\\n * `isSafePromise(p)` synchronously.\\n *\\n * The `@endo/marshal` package defines a related notion of a passable\\n * promise, i.e., one for which which `passStyleOf(p) === 'promise'`. All\\n * passable promises are also safe. But not vice versa because the\\n * requirements for a promise to be passable are slightly greater. A safe\\n * promise must not override `then` or `constructor`. A passable promise\\n * must not have any own properties. The requirements are otherwise\\n * identical.\\n *\\n * @param {Promise<unknown>} p\\n * @returns {boolean}\\n */\\nconst isSafePromise=(p)=>{\\nreturn(\\nisFrozen(p)&&\\ngetPrototypeOf(p)===Promise.prototype&&\\nPromise.resolve(p)===p&&\\ngetOwnPropertyDescriptor(p,'then')===undefined&&\\ngetOwnPropertyDescriptor(p,'constructor')===undefined);};\\n\\n\\n\\n/** @type {HandledPromiseStaticMethods & Pick<PromiseConstructor, 'resolve'>} */\\nconst staticMethods={\\nget(target,prop){\\nprop=coerceToObjectProperty(prop);\\nreturn handle(target,'get',[prop]);},\\n\\ngetSendOnly(target,prop){\\nprop=coerceToObjectProperty(prop);\\nhandle(target,'getSendOnly',[prop]).catch(()=>{});},\\n\\napplyFunction(target,args){\\n/* Ensure args is an array.*/\\nargs=[...args];\\nreturn handle(target,'applyFunction',[args]);},\\n\\napplyFunctionSendOnly(target,args){\\n/* Ensure args is an array.*/\\nargs=[...args];\\nhandle(target,'applyFunctionSendOnly',[args]).catch(()=>{});},\\n\\napplyMethod(target,prop,args){\\nprop=coerceToObjectProperty(prop);\\n/* Ensure args is an array.*/\\nargs=[...args];\\nreturn handle(target,'applyMethod',[prop,args]);},\\n\\napplyMethodSendOnly(target,prop,args){\\nprop=coerceToObjectProperty(prop);\\n/* Ensure args is an array.*/\\nargs=[...args];\\nhandle(target,'applyMethodSendOnly',[prop,args]).catch(()=>{});},\\n\\nresolve(value){\\n/* Resolving a Presence returns the pre-registered handled promise.*/\\nlet resolvedPromise=presenceToPromise.get(/** @type {any} */value);\\nif(!resolvedPromise){\\nresolvedPromise=Promise.resolve(value);}\\n\\n/* Prevent any proxy trickery.*/\\nharden(resolvedPromise);\\nif(isSafePromise(resolvedPromise)){\\n/* We can use the `resolvedPromise` directly, since it is guaranteed to*/\\n/* have a `then` which is actually `Promise.prototype.then`.*/\\nreturn resolvedPromise;}\\n\\n/* Assimilate the `resolvedPromise` as an actual frozen Promise, by*/\\n/* treating `resolvedPromise` as if it is a non-promise thenable.*/\\n/** @type {Promise['then']} */\\nconst executeThen=(resolve,reject)=>\\nresolvedPromise.then(resolve,reject);\\nreturn harden(\\nPromise.resolve().then(()=>new HandledPromise(executeThen)));}};\\n\\n\\n\\n\\nconst makeForwarder=(operation,localImpl)=>{\\nreturn(o,...args)=>{\\n/* We are in another turn already, and have the naked object.*/\\nconst presenceHandler=presenceToHandler.get(o);\\nif(!presenceHandler){\\nreturn localImpl(o,...args);}\\n\\nreturn dispatchToHandler(\\n'presenceHandler',\\npresenceHandler,\\noperation,\\no,\\nargs);};};\\n\\n\\n\\n\\n/* eslint-disable-next-line prefer-const*/\\nforwardingHandler={\\nget:makeForwarder('get',local.localGet),\\ngetSendOnly:makeForwarder('getSendOnly',local.localGet),\\napplyFunction:makeForwarder('applyFunction',local.localApplyFunction),\\napplyFunctionSendOnly:makeForwarder(\\n'applyFunctionSendOnly',\\nlocal.localApplyFunction),\\n\\napplyMethod:makeForwarder('applyMethod',local.localApplyMethod),\\napplyMethodSendOnly:makeForwarder('applyMethodSendOnly',local.localApplyMethod)};\\n\\n\\nhandle=(...handleArgs)=>{\\n/* We're in SES mode, so we should harden.*/\\nharden(handleArgs);\\nconst[_p,operation,opArgs,...dispatchArgs]=handleArgs;\\nlet[p]=handleArgs;\\nconst doDispatch=(handlerName,handler,o)=>\\ndispatchToHandler(\\nhandlerName,\\nhandler,\\noperation,\\no,\\nopArgs,\\n/* eslint-disable-next-line no-use-before-define*/\\n...(dispatchArgs.length===0?[returnedP]:dispatchArgs));\\n\\nconst[trackedDoDispatch]=trackTurns.trackTurns([doDispatch]);\\nconst returnedP=new HandledPromise((resolve,reject)=>{\\n/* We run in a future turn to prevent synchronous attacks,*/\\nlet raceIsOver=false;\\n\\n/** @type {(handlerName: string, handler: any, o: any) => any} */\\nconst win=(handlerName,handler,o)=>{\\nif(raceIsOver){\\nreturn;}\\n\\ntry{\\nresolve(harden(trackedDoDispatch(handlerName,handler,o)));}\\ncatch(reason){\\nreject(harden(reason));}\\n\\nraceIsOver=true;};\\n\\n\\n/** @type {(reason: unknown) => void} */\\nconst lose=(reason)=>{\\nif(raceIsOver){\\nreturn;}\\n\\nreject(harden(reason));\\nraceIsOver=true;};\\n\\n\\n/* This contestant tries to win with the target's resolution.*/\\nstaticMethods.\\nresolve(p).\\nthen((o)=>win('forwardingHandler',forwardingHandler,o)).\\ncatch(lose);\\n\\n/* This contestant sleeps a turn, but then tries to win immediately.*/\\nstaticMethods.\\nresolve().\\nthen(()=>{\\np=shorten(p);\\nconst pendingHandler=promiseToPendingHandler.get(p);\\nif(pendingHandler){\\n/* resolve to the answer from the specific pending handler,*/\\nwin('pendingHandler',pendingHandler,p);}else\\nif(!p||typeof p.then!=='function'){\\n/* Not a Thenable, so use it.*/\\nwin('forwardingHandler',forwardingHandler,p);}else\\nif(promiseToPresence.has(p)){\\n/* We have the object synchronously, so resolve with it.*/\\nconst o=promiseToPresence.get(p);\\nwin('forwardingHandler',forwardingHandler,o);}\\n\\n/* If we made it here without winning, then we will wait*/\\n/* for the other contestant to win instead.*/}).\\n\\ncatch(lose);});\\n\\n\\n/* We return a handled promise with the default pending handler. This*/\\n/* prevents a race between the above Promise.resolves and pipelining.*/\\nreturn harden(returnedP);};\\n\\n\\n/* Add everything needed on the constructor.*/\\nbaseHandledPromise.prototype=Promise.prototype;\\nsetPrototypeOf(baseHandledPromise,Promise);\\ndefineProperties(\\nbaseHandledPromise,\\ngetOwnPropertyDescriptors(staticMethods));\\n\\n\\n/* FIXME: This is really ugly to bypass the type system, but it will be better*/\\n/* once we use Promise.delegated and don't have any [[Constructor]] behaviours.*/\\n/* @ts-expect-error cast*/\\nHandledPromise=baseHandledPromise;\\n\\n/* We're a vetted shim which runs before `lockdown` allows*/\\n/* `harden(HandledPromise)` to function, but single-level `freeze` is a*/\\n/* suitable replacement because all mutable objects reachable afterwards are*/\\n/* intrinsics hardened by lockdown.*/\\nfreeze(HandledPromise);\\nfor(const key of ownKeys(HandledPromise)){\\n/* prototype is the intrinsic Promise.prototype to be hardened by lockdown.*/\\nif(key!=='prototype'){\\nfreeze(HandledPromise[key]);}}\\n\\n\\n\\nreturn HandledPromise;};\\n\\n\\n/**\\n * @template T\\n * @typedef {{\\n * get?(p: T, name: PropertyKey, returnedP?: Promise<unknown>): unknown;\\n * getSendOnly?(p: T, name: PropertyKey): void;\\n * applyFunction?(p: T, args: unknown[], returnedP?: Promise<unknown>): unknown;\\n * applyFunctionSendOnly?(p: T, args: unknown[]): void;\\n * applyMethod?(p: T, name: PropertyKey | undefined, args: unknown[], returnedP?: Promise<unknown>): unknown;\\n * applyMethodSendOnly?(p: T, name: PropertyKey | undefined, args: unknown[]): void;\\n * }} Handler\\n */\\n\\n/**\\n * @template {{}} T\\n * @typedef {{\\n * proxy?: {\\n * handler: ProxyHandler<T>;\\n * target: unknown;\\n * revokerCallback?(revoker: () => void): void;\\n * };\\n * }} ResolveWithPresenceOptionsBag\\n */\\n\\n/**\\n * @template [R = unknown]\\n * @typedef {(\\n * resolveHandled: (value?: R) => void,\\n * rejectHandled: (reason?: unknown) => void,\\n * resolveWithPresence: (presenceHandler: Handler<{}>, options?: ResolveWithPresenceOptionsBag<{}>) => object,\\n * ) => void} HandledExecutor\\n */\\n\\n/**\\n * @template [R = unknown]\\n * @typedef {{\\n * resolve(value?: R): void;\\n * reject(reason: unknown): void;\\n * resolveWithPresence(presenceHandler?: Handler<{}>, options?: ResolveWithPresenceOptionsBag<{}>): object;\\n * }} Settler\\n */\\n\\n/**\\n * @typedef {{\\n * applyFunction(target: unknown, args: unknown[]): Promise<unknown>;\\n * applyFunctionSendOnly(target: unknown, args: unknown[]): void;\\n * applyMethod(target: unknown, prop: PropertyKey | undefined, args: unknown[]): Promise<unknown>;\\n * applyMethodSendOnly(target: unknown, prop: PropertyKey, args: unknown[]): void;\\n * get(target: unknown, prop: PropertyKey): Promise<unknown>;\\n * getSendOnly(target: unknown, prop: PropertyKey): void;\\n * }} HandledPromiseStaticMethods\\n */\\n\\n/** @typedef {ReturnType<typeof makeHandledPromise>} HandledPromiseConstructor */exports.makeHandledPromise=makeHandledPromise;\",\n \"node_modules/@endo/eventual-send/src/local.js\": \"'use strict';Object.defineProperty(exports,'__esModule',{value:true});var messageBreakpoints=require('./message-breakpoints.js');\\n\\nconst{details:X,quote:q,Fail}=assert;\\n\\nconst{getOwnPropertyDescriptors,getPrototypeOf,freeze}=Object;\\nconst{apply,ownKeys}=Reflect;\\n\\nconst ntypeof=(specimen)=>specimen===null?'null':typeof specimen;\\n\\nconst onDelivery=messageBreakpoints.makeMessageBreakpointTester('ENDO_DELIVERY_BREAKPOINTS');\\n\\n/**\\n * TODO Consolidate with `isObject` that's currently in `@endo/marshal`\\n *\\n * @param {any} val\\n * @returns {boolean}\\n */\\nconst isObject=(val)=>Object(val)===val;\\n\\n/**\\n * Prioritize symbols as earlier than strings.\\n *\\n * @param {string|symbol} a\\n * @param {string|symbol} b\\n * @returns {-1 | 0 | 1}\\n */\\nconst compareStringified=(a,b)=>{\\nif(typeof a===typeof b){\\nconst left=String(a);\\nconst right=String(b);\\n/* eslint-disable-next-line no-nested-ternary*/\\nreturn left<right?-1:left>right?1:0;}\\n\\nif(typeof a==='symbol'){\\nassert(typeof b==='string');\\nreturn-1;}\\n\\nassert(typeof a==='string');\\nassert(typeof b==='symbol');\\nreturn 1;};\\n\\n\\n/**\\n * @param {any} val\\n * @returns {(string|symbol)[]}\\n */\\nconst getMethodNames=(val)=>{\\nlet layer=val;\\nconst names=new Set();/* Set to deduplicate*/\\nwhile(layer!==null&&layer!==Object.prototype){\\n/* be tolerant of non-objects*/\\nconst descs=getOwnPropertyDescriptors(layer);\\nfor(const name of ownKeys(descs)){\\n/* In case a method is overridden by a non-method,*/\\n/* test `val[name]` rather than `layer[name]`*/\\nif(typeof val[name]==='function'){\\nnames.add(name);}}\\n\\n\\nif(!isObject(val)){\\nbreak;}\\n\\nlayer=getPrototypeOf(layer);}\\n\\nreturn harden([...names].sort(compareStringified));};\\n\\n/* The top level of the eventual send modules can be evaluated before*/\\n/* ses creates `harden`, and so cannot rely on `harden` at top level.*/\\nfreeze(getMethodNames);\\n\\nconst localApplyFunction=(recipient,args)=>{\\ntypeof recipient==='function'||\\nassert.fail(\\nX`Cannot invoke target as a function; typeof target is ${q(\\nntypeof(recipient))\\n}`,\\nTypeError);\\n\\nif(onDelivery&&onDelivery.shouldBreakpoint(recipient,undefined)){\\n/* eslint-disable-next-line no-debugger*/\\ndebugger;/* STEP INTO APPLY*/\\n/* Stopped at a breakpoint on this delivery of an eventual function call*/\\n/* so that you can step *into* the following `apply` in order to see the*/\\n/* function call as it happens. Or step *over* to see what happens*/\\n/* after the function call returns.*/}\\n\\nconst result=apply(recipient,undefined,args);\\nreturn result;};\\n\\n\\nconst localApplyMethod=(recipient,methodName,args)=>{\\nif(methodName===undefined||methodName===null){\\n/* Base case; bottom out to apply functions.*/\\nreturn localApplyFunction(recipient,args);}\\n\\nif(recipient===undefined||recipient===null){\\nassert.fail(\\nX`Cannot deliver ${q(methodName)} to target; typeof target is ${q(\\nntypeof(recipient))\\n}`,\\nTypeError);}\\n\\n\\nconst fn=recipient[methodName];\\nif(fn===undefined){\\nassert.fail(\\nX`target has no method ${q(methodName)}, has ${q(\\ngetMethodNames(recipient))\\n}`,\\nTypeError);}\\n\\n\\nconst ftype=ntypeof(fn);\\ntypeof fn==='function'||\\nFail`invoked method ${q(methodName)} is not a function; it is a ${q(\\nftype)\\n}`;\\nif(onDelivery&&onDelivery.shouldBreakpoint(recipient,methodName)){\\n/* eslint-disable-next-line no-debugger*/\\ndebugger;/* STEP INTO APPLY*/\\n/* Stopped at a breakpoint on this delivery of an eventual method call*/\\n/* so that you can step *into* the following `apply` in order to see the*/\\n/* method call as it happens. Or step *over* to see what happens*/\\n/* after the method call returns.*/}\\n\\nconst result=apply(fn,recipient,args);\\nreturn result;};\\n\\n\\nconst localGet=(t,key)=>t[key];exports.getMethodNames=getMethodNames;exports.localApplyFunction=localApplyFunction;exports.localApplyMethod=localApplyMethod;exports.localGet=localGet;\",\n \"node_modules/@endo/eventual-send/src/message-breakpoints.js\": \"'use strict';Object.defineProperty(exports,'__esModule',{value:true});require('../../env-options/index.js');var envOptions=require('../../env-options/src/env-options.js');\\n\\nconst{quote:q,Fail}=assert;\\n\\nconst{hasOwn,freeze,entries}=Object;\\n\\n/**\\n * @typedef {string | '*'} MatchStringTag\\n * A star `'*'` matches any recipient. Otherwise, the string is\\n * matched against the value of a recipient's `@@toStringTag`\\n * after stripping out any leading `'Alleged: '` or `'DebugName: '`\\n * prefix. For objects defined with `Far` this is the first argument,\\n * known as the `farName`. For exos, this is the tag.\\n */\\n/**\\n * @typedef {string | '*'} MatchMethodName\\n * A star `'*'` matches any method name. Otherwise, the string is\\n * matched against the method name. Currently, this is only an exact match.\\n * However, beware that we may introduce a string syntax for\\n * symbol method names.\\n */\\n/**\\n * @typedef {number | '*'} MatchCountdown\\n * A star `'*'` will always breakpoint. Otherwise, the string\\n * must be a non-negative integer. Once that is zero, always breakpoint.\\n * Otherwise decrement by one each time it matches until it reaches zero.\\n * In other words, the countdown represents the number of\\n * breakpoint occurrences to skip before actually breakpointing.\\n */\\n\\n/**\\n * This is the external JSON representation, in which\\n * - the outer property name is the class-like tag or '*',\\n * - the inner property name is the method name or '*',\\n * - the value is a non-negative integer countdown or '*'.\\n *\\n * @typedef {Record<MatchStringTag, Record<MatchMethodName, MatchCountdown>>} MessageBreakpoints\\n */\\n\\n/**\\n * This is the internal JSON representation, in which\\n * - the outer property name is the method name or '*',\\n * - the inner property name is the class-like tag or '*',\\n * - the value is a non-negative integer countdown or '*'.\\n *\\n * @typedef {Record<MatchMethodName, Record<MatchStringTag, MatchCountdown>>} BreakpointTable\\n */\\n\\n/**\\n * @typedef {object} MessageBreakpointTester\\n * @property {() => MessageBreakpoints} getBreakpoints\\n * @property {(newBreakpoints?: MessageBreakpoints) => void} setBreakpoints\\n * @property {(\\n * recipient: object,\\n * methodName: string | symbol | undefined\\n * ) => boolean} shouldBreakpoint\\n */\\n\\n/**\\n * @param {any} val\\n * @returns {val is Record<string, any>}\\n */\\nconst isJSONRecord=(val)=>\\ntypeof val==='object'&&val!==null&&!Array.isArray(val);\\n\\n/**\\n * Return `tag` after stripping off any `'Alleged: '` or `'DebugName: '`\\n * prefix if present.\\n * ```js\\n * simplifyTag('Alleged: moola issuer') === 'moola issuer'\\n * ```\\n * If there are multiple such prefixes, only the outer one is removed.\\n *\\n * @param {string} tag\\n * @returns {string}\\n */\\nconst simplifyTag=(tag)=>{\\nfor(const prefix of['Alleged: ','DebugName: ']){\\nif(tag.startsWith(prefix)){\\nreturn tag.slice(prefix.length);}}\\n\\n\\nreturn tag;};\\n\\n\\n/**\\n * @param {string} optionName\\n * @returns {MessageBreakpointTester | undefined}\\n */\\nconst makeMessageBreakpointTester=(optionName)=>{\\nlet breakpoints=JSON.parse(envOptions.getEnvironmentOption(optionName,'null'));\\n\\nif(breakpoints===null){\\nreturn undefined;}\\n\\n\\n/** @type {BreakpointTable} */\\nlet breakpointsTable;\\n\\nconst getBreakpoints=()=>breakpoints;\\nfreeze(getBreakpoints);\\n\\nconst setBreakpoints=(newBreakpoints=breakpoints)=>{\\nisJSONRecord(newBreakpoints)||\\nFail`Expected ${q(optionName)} option to be a JSON breakpoints record`;\\n\\n/** @type {BreakpointTable} */\\n/* @ts-expect-error confused by __proto__*/\\nconst newBreakpointsTable={__proto__:null};\\n\\nfor(const[tag,methodBPs]of entries(newBreakpoints)){\\ntag===simplifyTag(tag)||\\nFail`Just use simple tag ${q(simplifyTag(tag))} rather than ${q(tag)}`;\\nisJSONRecord(methodBPs)||\\nFail`Expected ${q(optionName)} option's ${q(\\ntag)\\n} to be a JSON methods breakpoints record`;\\nfor(const[methodName,count]of entries(methodBPs)){\\ncount==='*'||\\ntypeof count==='number'&&\\nNumber.isSafeInteger(count)&&\\ncount>=0||\\nFail`Expected ${q(optionName)} option's ${q(tag)}.${q(\\nmethodName)\\n} to be \\\"*\\\" or a non-negative integer`;\\n\\nconst classBPs=hasOwn(newBreakpointsTable,methodName)?\\nnewBreakpointsTable[methodName]:\\nnewBreakpointsTable[methodName]={\\n/* @ts-expect-error confused by __proto__*/\\n__proto__:null};\\n\\nclassBPs[tag]=count;}}\\n\\n\\nbreakpoints=newBreakpoints;\\nbreakpointsTable=newBreakpointsTable;};\\n\\nfreeze(setBreakpoints);\\n\\nconst shouldBreakpoint=(recipient,methodName)=>{\\nif(methodName===undefined||methodName===null){\\n/* TODO enable function breakpointing*/\\nreturn false;}\\n\\nconst classBPs=breakpointsTable[methodName]||breakpointsTable['*'];\\nif(classBPs===undefined){\\nreturn false;}\\n\\nlet tag=simplifyTag(recipient[Symbol.toStringTag]);\\nlet count=classBPs[tag];\\nif(count===undefined){\\ntag='*';\\ncount=classBPs[tag];\\nif(count===undefined){\\nreturn false;}}\\n\\n\\nif(count==='*'){\\nreturn true;}\\n\\nif(count===0){\\nreturn true;}\\n\\nassert(typeof count==='number'&&count>=1);\\nclassBPs[tag]=count-1;\\nreturn false;};\\n\\nfreeze(shouldBreakpoint);\\n\\nconst breakpointTester=freeze({\\ngetBreakpoints,\\nsetBreakpoints,\\nshouldBreakpoint});\\n\\nbreakpointTester.setBreakpoints();\\nreturn breakpointTester;};\\n\\nfreeze(makeMessageBreakpointTester);exports.makeMessageBreakpointTester=makeMessageBreakpointTester;\",\n \"node_modules/@endo/eventual-send/src/postponed.js\": \"'use strict';\\n\\nObject.defineProperty(exports,'__esModule',{value:true});/*/ <reference types=\\\"ses\\\" />*/ /**\\n * Create a simple postponedHandler that just postpones until donePostponing is\\n * called.\\n *\\n * @param {IMPORT('./types').HandledPromiseConstructor} HandledPromise\\n * @returns {[Required<IMPORT('./types').Handler<any>>, () => void]} postponedHandler and donePostponing callback.\\n */\\nconst makePostponedHandler=(HandledPromise)=>{\\n/** @type {() => void} */\\nlet donePostponing;\\n\\nconst interlockP=new Promise((resolve)=>{\\ndonePostponing=()=>resolve(undefined);});\\n\\n\\nconst makePostponedOperation=(postponedOperation)=>{\\n/* Just wait until the handler is resolved/rejected.*/\\nreturn function postpone(x,...args){\\n/* console.log(`forwarding ${postponedOperation} ${args[0]}`);*/\\nreturn new HandledPromise((resolve,reject)=>{\\ninterlockP.\\nthen((_)=>{\\nresolve(HandledPromise[postponedOperation](x,...args));}).\\n\\ncatch(reject);});};};\\n\\n\\n\\n\\n/** @type {Required<IMPORT('./types').Handler<any>>} */\\nconst postponedHandler={\\nget:makePostponedOperation('get'),\\ngetSendOnly:makePostponedOperation('getSendOnly'),\\napplyFunction:makePostponedOperation('applyFunction'),\\napplyFunctionSendOnly:makePostponedOperation('applyFunctionSendOnly'),\\napplyMethod:makePostponedOperation('applyMethod'),\\napplyMethodSendOnly:makePostponedOperation('applyMethodSendOnly')};\\n\\n\\n/* @ts-expect-error 2454*/\\nassert(donePostponing);\\n\\nreturn[postponedHandler,donePostponing];};exports.makePostponedHandler=makePostponedHandler;\",\n \"node_modules/@endo/eventual-send/src/track-turns.js\": \"'use strict';Object.defineProperty(exports,'__esModule',{value:true});require('../../env-options/index.js');var\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\nenvOptions=require('../../env-options/src/env-options.js');/* global globalThis */ /* NOTE: We can't import these because they're not in scope before lockdown.*/ /* We also cannot currently import them because it would create a cyclic*/ /* dependency, though this is more easily fixed.*/ /* import { assert, X, Fail } from '@endo/errors';*/ /* See also https://github.com/Agoric/agoric-sdk/issues/9515*/ /* WARNING: Global Mutable State!*/ /* This state is communicated to `assert` that makes it available to the*/ /* causal console, which affects the console log output. Normally we*/ /* regard the ability to see console log output as a meta-level privilege*/ /* analogous to the ability to debug. Aside from that, this module should*/ /* not have any observably mutable state.*/\\n\\nlet hiddenPriorError;\\nlet hiddenCurrentTurn=0;\\nlet hiddenCurrentEvent=0;\\n\\n/* Turn on if you seem to be losing error logging at the top of the event loop*/\\nconst VERBOSE=envOptions.environmentOptionsListHas('DEBUG','track-turns');\\n\\n/* Track-turns is disabled by default and can be enabled by an environment*/\\n/* option.*/\\nconst ENABLED=\\nenvOptions.getEnvironmentOption('TRACK_TURNS','disabled',['enabled'])==='enabled';\\n\\n/* We hoist the following functions out of trackTurns() to discourage the*/\\n/* closures from holding onto 'args' or 'func' longer than necessary,*/\\n/* which we've seen cause HandledPromise arguments to be retained for*/\\n/* a surprisingly long time.*/\\n\\nconst addRejectionNote=(detailsNote)=>(reason)=>{\\nif(reason instanceof Error){\\nglobalThis.assert.note(reason,detailsNote);}\\n\\nif(VERBOSE){\\nconsole.log('REJECTED at top of event loop',reason);}};\\n\\n\\n\\nconst wrapFunction=\\n(func,sendingError,X)=>\\n(...args)=>{\\nhiddenPriorError=sendingError;\\nhiddenCurrentTurn+=1;\\nhiddenCurrentEvent=0;\\ntry{\\nlet result;\\ntry{\\nresult=func(...args);}\\ncatch(err){\\nif(err instanceof Error){\\nglobalThis.assert.note(\\nerr,\\nX`Thrown from: ${hiddenPriorError}:${hiddenCurrentTurn}.${hiddenCurrentEvent}`);}\\n\\n\\nif(VERBOSE){\\nconsole.log('THROWN to top of event loop',err);}\\n\\nthrow err;}\\n\\n/* Must capture this now, not when the catch triggers.*/\\nconst detailsNote=X`Rejection from: ${hiddenPriorError}:${hiddenCurrentTurn}.${hiddenCurrentEvent}`;\\nPromise.resolve(result).catch(addRejectionNote(detailsNote));\\nreturn result;}finally\\n{\\nhiddenPriorError=undefined;}};\\n\\n\\n\\n/**\\n * Given a list of `TurnStarterFn`s, returns a list of `TurnStarterFn`s whose\\n * `this`-free call behaviors are not observably different to those that\\n * cannot see console output. The only purpose is to cause additional\\n * information to appear on the console.\\n *\\n * The call to `trackTurns` is itself a sending event, that occurs in some call\\n * stack in some turn number at some event number within that turn. Each call\\n * to any of the returned `TurnStartFn`s is a receiving event that begins a new\\n * turn. This sending event caused each of those receiving events.\\n *\\n * @template {TurnStarterFn[]} T\\n * @param {T} funcs\\n * @returns {T}\\n */\\nconst trackTurns=(funcs)=>{\\nif(!ENABLED||typeof globalThis==='undefined'||!globalThis.assert){\\nreturn funcs;}\\n\\nconst{details:X,note:annotateError}=globalThis.assert;\\n\\nhiddenCurrentEvent+=1;\\nconst sendingError=Error(\\n`Event: ${hiddenCurrentTurn}.${hiddenCurrentEvent}`);\\n\\nif(hiddenPriorError!==undefined){\\nannotateError(sendingError,X`Caused by: ${hiddenPriorError}`);}\\n\\n\\nreturn(/** @type {T} */\\nfuncs.map((func)=>func&&wrapFunction(func,sendingError,X)));};\\n\\n\\n\\n/**\\n * An optional function that is not this-sensitive, expected to be called at\\n * bottom of stack to start a new turn.\\n *\\n * @typedef {((...args: any[]) => any) | undefined} TurnStarterFn\\n */exports.trackTurns=trackTurns;\",\n \"node_modules/@endo/init/debug.js\": \"'use strict';require('./pre-remoting.js');require('../lockdown/commit-debug.js');/* debug.js - call lockdown with default Agoric shims*/\",\n \"node_modules/@endo/init/pre-remoting.js\": \"'use strict';require('./pre.js');require('../eventual-send/shim.js');/* pre-remoting.js - shims necessary to use @endo/far*/\",\n \"node_modules/@endo/init/pre.js\": \"'use strict';Object.defineProperty(exports,'__esModule',{value:true});var pre=require('../lockdown/pre.js');require('../base64/shim.js');require('../promise-kit/shim.js');/* Generic preamble for all shims.*/exports.lockdown=pre.lockdown;\",\n \"node_modules/@endo/lockdown/commit-debug.js\": \"'use strict';Object.defineProperty(exports,'__esModule',{value:true});var pre=require('./pre.js');/* commit-debug.js - debug version of commit.js*/\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\nlockdown({\\n/* The default `{errorTaming: 'safe'}` setting, if possible, redacts the*/\\n/* stack trace info from the error instances, so that it is not available*/\\n/* merely by saying `errorInstance.stack`. However, some tools, such as*/\\n/* Ava, will look for the stack there and become much less useful if it is*/\\n/* missing.*/\\n/**/\\n/* NOTE TO REVIEWERS: If you see the following line commented out,*/\\n/* this may be a development accident that should be fixed before merging.*/\\n/**/\\nerrorTaming:'unsafe-debug',\\n\\n/* The default `{stackFiltering: 'concise'}` setting usually makes for a*/\\n/* better debugging experience, by severely reducing the noisy distractions*/\\n/* of the normal verbose stack traces. Which is why we comment*/\\n/* out the `'verbose'` setting is commented out below. However, some*/\\n/* tools look for the full filename that it expects in order*/\\n/* to fetch the source text for diagnostics,*/\\n/**/\\n/* Another reason for not commenting it out: The cause*/\\n/* of the bug may be anywhere, so the `'noise'` thrown out by the default*/\\n/* `'concise'` setting may also contain the signal you need. To see it,*/\\n/* uncomment out the following line. But please do not commit it in that*/\\n/* state.*/\\n/**/\\n/* NOTE TO REVIEWERS: If you see the following line *not* commented out,*/\\n/* this may be a development accident that MUST be fixed before merging.*/\\n/**/\\n/* stackFiltering: 'verbose',*/\\n\\n/* The default `{overrideTaming: 'moderate'}` setting does not hurt the*/\\n/* debugging experience much. But it will introduce noise into, for example,*/\\n/* the vscode debugger's object inspector. During debug and test, if you can*/\\n/* avoid legacy code that needs the `'moderate'` setting, then the `'min'`*/\\n/* setting reduces debugging noise yet further, by turning fewer inherited*/\\n/* properties into accessors.*/\\n/**/\\n/* NOTE TO REVIEWERS: If you see the following line commented out,*/\\n/* this may be a development accident that should be fixed before merging.*/\\n/**/\\noverrideTaming:'min',\\n\\n/* The default `{consoleTaming: 'safe'}` setting usually makes for a*/\\n/* better debugging experience, by wrapping the original `console` with*/\\n/* the SES replacement `console` that provides more information about*/\\n/* errors, expecially those thrown by the `assert` system. However,*/\\n/* in case the SES `console` is getting in the way, we provide the*/\\n/* `'unsafe'` option for leaving the original `console` in place.*/\\n/**/\\n/* NOTE TO REVIEWERS: If you see the following line *not* commented out,*/\\n/* this may be a development accident that should be fixed before merging.*/\\n/**/\\n/* consoleTaming: 'unsafe',*/\\n\\n/* Domain taming causes lockdown to throw an error if the Node.js domain*/\\n/* module has already been loaded, and causes loading the domain module*/\\n/* to throw an error if it is pulled into the working set later.*/\\n/* This is because domains may add domain properties to promises and other*/\\n/* callbacks and that these domain objects provide a means to escape*/\\n/* containment.*/\\n/* However, our platform still depends on systems like standardthings/esm*/\\n/* which ultimately pull in domains.*/\\n/* For now, we are resigned to leave this hole open, knowing that all*/\\n/* contract code will be run under XS to avoid this vulnerability.*/\\ndomainTaming:'unsafe'});exports.lockdown=pre.lockdown;\",\n \"node_modules/@endo/lockdown/post.js\": \"'use strict';\\n\\nObject.defineProperty(exports,'__esModule',{value:true});/* global globalThis */ /* The post lockdown thunk.*/\\nvar postLockdown=()=>{\\n/* Even on non-v8, we tame the start compartment's Error constructor so*/\\n/* this assignment is not rejected, even if it does nothing.*/\\nError.stackTraceLimit=Infinity;\\n\\nharden(globalThis.TextEncoder);/* Absent in eshost*/\\nharden(globalThis.TextDecoder);/* Absent in eshost*/\\nharden(globalThis.URL);/* Absent only on XSnap*/\\nharden(globalThis.Base64);/* Present only on XSnap*/};exports[\\\"default\\\"]=postLockdown;\",\n \"node_modules/@endo/lockdown/pre.js\": \"'use strict';Object.defineProperty(exports,'__esModule',{value:true});require('../../ses/index.js');var post=require('./post.js');/* pre.js - set up the default lockdown function*/\\n\\n\\n\\n\\n\\n\\n\\n\\n\\nconst rawLockdown=globalThis.lockdown;\\n\\n/** @type {typeof rawLockdown} */\\nconst lockdown=(defaultOptions)=>{\\n/* For testing under Ava, and also sometimes for testing and debugging in*/\\n/* general, when safety is not needed, you perhaps want to use*/\\n/* packages/SwingSet/tools/install-ses-debug.js instead of this one.*/\\n/* If you're using a prepare-test-env-ava.js, it is probably already doing that*/\\n/* for you.*/\\n\\n/* The `@endo/init` package exists so the \\\"main\\\" of production code*/\\n/* can start with the following import or its equivalent.*/\\n/* ```js*/\\n/* import '@endo/init';*/\\n/* ```*/\\n/* But production code must also be tested. Normal ocap discipline of passing*/\\n/* explicit arguments into the `lockdown`*/\\n/* call would require an awkward structuring of start modules, since*/\\n/* the `init` module calls `lockdown` during its initialization,*/\\n/* before any explicit code in the start module gets to run. Even if other code*/\\n/* does get to run first, the `lockdown` call in this module happens during*/\\n/* module initialization, before it can legitimately receive parameters by*/\\n/* explicit parameter passing.*/\\n/**/\\n/* Instead, for now, `init` violates normal ocap discipline by feature*/\\n/* testing global state for a passed \\\"parameter\\\". This is something that a*/\\n/* module can but normally should not do, during initialization or otherwise.*/\\n/* Initialization is often awkward.*/\\n/**/\\n/* The `init` module tests, first,*/\\n/* for a JavaScript global named `LOCKDOWN_OPTIONS`, and second, for an*/\\n/* environment*/\\n/* variable named `LOCKDOWN_OPTIONS`. If either is present, its value should be*/\\n/* a JSON encoding of the options bag to pass to the `lockdown` call. If so,*/\\n/* then `init` calls `lockdown` with those options. If there is no such*/\\n/* feature, `init` calls `lockdown` with appropriate settings for*/\\n/* production use.*/\\n\\nlet optionsString;\\nif(typeof LOCKDOWN_OPTIONS==='string'){\\noptionsString=LOCKDOWN_OPTIONS;\\nconsole.warn(\\n`'@endo/lockdown' sniffed and found a 'LOCKDOWN_OPTIONS' global variable\\\\n`);}else\\n\\nif(\\ntypeof process==='object'&&\\ntypeof process.env.LOCKDOWN_OPTIONS==='string')\\n{\\noptionsString=process.env.LOCKDOWN_OPTIONS;\\nconsole.warn(\\n`'@endo/lockdown' sniffed and found a 'LOCKDOWN_OPTIONS' environment variable\\\\n`);}\\n\\n\\n\\nif(typeof optionsString==='string'){\\nlet options;\\ntry{\\noptions=JSON.parse(optionsString);}\\ncatch(err){\\nconsole.error('Environment variable LOCKDOWN_OPTIONS must be JSON',err);\\nthrow err;}\\n\\nif(typeof options!=='object'||Array.isArray(options)){\\nconst err=TypeError(\\n'Environment variable LOCKDOWN_OPTIONS must be a JSON object');\\n\\nconsole.error('',err,options);\\nthrow err;}\\n\\nrawLockdown({\\n...options,\\n/* See comment on domainTaming below.*/\\ndomainTaming:'unsafe'});}else\\n\\nif(defaultOptions){\\nrawLockdown({\\n...defaultOptions,\\n/* See comment on domainTaming below.*/\\ndomainTaming:'unsafe'});}else\\n\\n{\\nrawLockdown({\\n/* The default `{errorTaming: 'safe'}` setting, if possible, redacts the*/\\n/* stack trace info from the error instances, so that it is not available*/\\n/* merely by saying `errorInstance.stack`. However, some tools*/\\n/* will look for the stack there and become much less useful if it is*/\\n/* missing. In production, the settings in this file need to preserve*/\\n/* security, so the 'unsafe' setting below MUST always be commented out*/\\n/* except during private development.*/\\n/**/\\n/* NOTE TO REVIEWERS: If you see the following line *not* commented out,*/\\n/* this may be a development accident that MUST be fixed before merging.*/\\n/**/\\n/* errorTaming: 'unsafe',*/\\n/**/\\n/**/\\n/* The default `{stackFiltering: 'concise'}` setting usually makes for a*/\\n/* better debugging experience, by severely reducing the noisy distractions*/\\n/* of the normal verbose stack traces. Which is why we comment*/\\n/* out the `'verbose'` setting is commented out below. However, some*/\\n/* tools look for the full filename that it expects in order*/\\n/* to fetch the source text for diagnostics,*/\\n/**/\\n/* Another reason for not commenting it out: The cause*/\\n/* of the bug may be anywhere, so the `'noise'` thrown out by the default*/\\n/* `'concise'` setting may also contain the signal you need. To see it,*/\\n/* uncomment out the following line. But please do not commit it in that*/\\n/* state.*/\\n/**/\\n/* NOTE TO REVIEWERS: If you see the following line *not* commented out,*/\\n/* this may be a development accident that MUST be fixed before merging.*/\\n/**/\\n/* stackFiltering: 'verbose',*/\\n/**/\\n/**/\\n/* The default `{overrideTaming: 'moderate'}` setting does not hurt the*/\\n/* debugging experience much. But it will introduce noise into, for example,*/\\n/* the vscode debugger's object inspector. During debug and test, if you can*/\\n/* avoid legacy code that needs the `'moderate'` setting, then the `'min'`*/\\n/* setting reduces debugging noise yet further, by turning fewer inherited*/\\n/* properties into accessors.*/\\n/**/\\n/* NOTE TO REVIEWERS: If you see the following line *not* commented out,*/\\n/* this may be a development accident that MUST be fixed before merging.*/\\n/**/\\n/* overrideTaming: 'min',*/\\n/**/\\n/**/\\n/* The default `{consoleTaming: 'safe'}` setting usually makes for a*/\\n/* better debugging experience, by wrapping the original `console` with*/\\n/* the SES replacement `console` that provides more information about*/\\n/* errors, expecially those thrown by the `assert` system. However,*/\\n/* in case the SES `console` is getting in the way, we provide the*/\\n/* `'unsafe'` option for leaving the original `console` in place.*/\\n/**/\\n/* NOTE TO REVIEWERS: If you see the following line *not* commented out,*/\\n/* this may be a development accident that MUST be fixed before merging.*/\\n/**/\\n/* consoleTaming: 'unsafe',*/\\n\\n/* Domain taming causes lockdown to throw an error if the Node.js domain*/\\n/* module has already been loaded, and causes loading the domain module*/\\n/* to throw an error if it is pulled into the working set later.*/\\n/* This is because domains may add domain properties to promises and other*/\\n/* callbacks and that these domain objects provide a means to escape*/\\n/* containment.*/\\n/* However, our platform still depends on systems like standardthings/esm*/\\n/* which ultimately pull in domains.*/\\n/* For now, we are resigned to leave this hole open, knowing that all*/\\n/* contract code will be run under XS to avoid this vulnerability.*/\\ndomainTaming:'unsafe'});}\\n\\n\\n\\n/* We are now in the \\\"Start Compartment\\\". Our global has all the same*/\\n/* powerful things it had before, but the primordials have changed to make*/\\n/* them safe to use in the arguments of API calls we make into more limited*/\\n/* compartments*/\\n\\n/* 'Compartment', 'assert', and 'harden' are now present in our global scope.*/\\npost[\\\"default\\\"]();};\\n\\n\\nglobalThis.lockdown=lockdown;exports.lockdown=lockdown;\",\n \"node_modules/@endo/promise-kit/shim.js\": \"'use strict';var\\n\\nmemoRace=require('./src/memo-race.js');/* Unconditionally replace with a non-leaking version*/\\nPromise.race=memoRace.memoRace;\",\n \"node_modules/@endo/promise-kit/src/memo-race.js\": \"'use strict';Object.defineProperty(exports,'__esModule',{value:true});/* Initial version authored by Brian Kim:\\nhttps://github.com/nodejs/node/issues/17469#issuecomment-685216777\\n This is free and unencumbered software released into the public domain.\\n Anyone is free to copy, modify, publish, use, compile, sell, or\\ndistribute this software, either in source code form or as a compiled\\nbinary, for any purpose, commercial or non-commercial, and by any\\nmeans.\\n In jurisdictions that recognize copyright laws, the author or authors\\nof this software dedicate any and all copyright interest in the\\nsoftware to the public domain. We make this dedication for the benefit\\nof the public at large and to the detriment of our heirs and\\nsuccessors. We intend this dedication to be an overt act of\\nrelinquishment in perpetuity of all present and future rights to this\\nsoftware under copyright law.\\n THE SOFTWARE IS PROVIDED \\\"AS IS\\\", WITHOUT WARRANTY OF ANY KIND,\\nEXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\\nMERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.\\nIN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR\\nOTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,\\nARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR\\nOTHER DEALINGS IN THE SOFTWARE.\\n For more information, please refer to <http://unlicense.org/>\\n*/\\n\\n\\n\\n\\n\\n\\n\\nconst isObject=(value)=>Object(value)===value;\\n\\n/**\\n * @template [T=any]\\n * @typedef {object} Deferred\\n * @property {(value?: IMPORT(\\\"./types.js\\\").ERef<T> ) => void} resolve\\n * @property {(err?: any ) => void} reject\\n */\\n\\n/**\\n * @typedef { never\\n * | {settled: false, deferreds: Set<Deferred>}\\n * | {settled: true, deferreds?: undefined}\\n * } PromiseMemoRecord\\n */\\n\\n/* Keys are the values passed to race, values are a record of data containing a*/\\n/* set of deferreds and whether the value has settled.*/\\n/** @type {WeakMap<object, PromiseMemoRecord>} */\\nconst knownPromises=new WeakMap();\\n\\n/**\\n * @param {PromiseMemoRecord | undefined} record\\n * @returns {Set<Deferred>}\\n */\\nconst markSettled=(record)=>{\\nif(!record||record.settled){\\nreturn new Set();}\\n\\n\\nconst{deferreds}=record;\\nObject.assign(record,{\\ndeferreds:undefined,\\nsettled:true});\\n\\nObject.freeze(record);\\nreturn deferreds;};\\n\\n\\n/**\\n *\\n * @param {any} value\\n * @returns {PromiseMemoRecord}\\n */\\nconst getMemoRecord=(value)=>{\\nif(!isObject(value)){\\n/* If the contender is a primitive, attempting to use it as a key in the*/\\n/* weakmap would throw an error. Luckily, it is safe to call*/\\n/* `Promise.resolve(contender).then` on a primitive value multiple times*/\\n/* because the promise fulfills immediately. So we fake a settled record.*/\\nreturn harden({settled:true});}\\n\\n\\nlet record=knownPromises.get(value);\\n\\nif(!record){\\nrecord={deferreds:new Set(),settled:false};\\nknownPromises.set(value,record);\\n/* This call to `then` happens once for the lifetime of the value.*/\\nPromise.resolve(value).then(\\n(val)=>{\\nfor(const{resolve}of markSettled(record)){\\nresolve(val);}},\\n\\n\\n(err)=>{\\nfor(const{reject}of markSettled(record)){\\nreject(err);}});}\\n\\n\\n\\n\\nreturn record;};\\n\\n\\nconst{race}={\\n/**\\n * Creates a Promise that is resolved or rejected when any of the provided Promises are resolved\\n * or rejected.\\n *\\n * Unlike `Promise.race` it cleans up after itself so a non-resolved value doesn't hold onto\\n * the result promise.\\n *\\n * @template {readonly unknown[] | []} T\\n * @template {PromiseConstructor} [P=PromiseConstructor]\\n * @this {P}\\n * @param {T} values An iterable of Promises.\\n * @returns {Promise<Awaited<T[number]>>} A new Promise.\\n */\\nrace(values){\\nlet deferred;\\n/** @type {[...T]} */\\n/* @ts-expect-error filled by the loop*/\\nconst cachedValues=[];\\nconst C=this;\\nconst result=new C((resolve,reject)=>{\\ndeferred={resolve,reject};\\nfor(const value of values){\\ncachedValues.push(value);\\nconst{settled,deferreds}=getMemoRecord(value);\\nif(settled){\\n/* If the contender is settled (including primitives), it is safe*/\\n/* to call `Promise.resolve(value).then` on it.*/\\nC.resolve(value).then(resolve,reject);}else\\n{\\ndeferreds.add(deferred);}}});\\n\\n\\n\\n\\n/* The finally callback executes when any value settles, preventing any of*/\\n/* the unresolved values from retaining a reference to the resolved value.*/\\nreturn result.finally(()=>{\\nfor(const value of cachedValues){\\nconst{deferreds}=getMemoRecord(value);\\nif(deferreds){\\ndeferreds.delete(deferred);}}});}};exports.memoRace=race;\",\n \"node_modules/ses/index.js\": \"'use strict';require('./src/lockdown-shim.js');require('./src/compartment-shim.js');require('./src/assert-shim.js');require('./src/console-shim.js');/* Copyright (C) 2018 Agoric*/\",\n \"node_modules/ses/src/assert-shim.js\": \"'use strict';var commons=require('./commons.js');var assert=require('./error/assert.js');\\n\\n\\ncommons.globalThis.assert=assert.assert;\",\n \"node_modules/ses/src/assert-sloppy-mode.js\": \"'use strict';var\\n\\ncommons=require('./commons.js');/** getThis returns globalThis in sloppy mode or undefined in strict mode. */\\nfunction getThis(){\\nreturn this;}\\n\\n\\nif(getThis()){\\n/* See https://github.com/endojs/endo/blob/master/packages/ses/error-codes/SES_NO_SLOPPY.md*/\\nthrow commons.TypeError(`SES failed to initialize, sloppy mode (SES_NO_SLOPPY)`);}\",\n \"node_modules/ses/src/commons.js\": \"'use strict';\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\nObject.defineProperty(exports,'__esModule',{value:true});/* global globalThis */ /* eslint-disable no-restricted-globals */ /**\\n * commons.js\\n * Declare shorthand functions. Sharing these declarations across modules\\n * improves on consistency and minification. Unused declarations are\\n * dropped by the tree shaking process.\\n *\\n * We capture these, not just for brevity, but for security. If any code\\n * modifies Object to change what 'assign' points to, the Compartment shim\\n * would be corrupted.\\n */ /* We cannot use globalThis as the local name since it would capture the*/ /* lexical name.*/const universalThis=globalThis;const{Array,Date,FinalizationRegistry,Float32Array,JSON,\\nMap,\\nMath,\\nNumber,\\nObject:Object$1,\\nPromise:Promise$1,\\nProxy,\\nReflect,\\nRegExp:FERAL_REG_EXP,\\nSet,\\nString,\\nSymbol,\\nWeakMap,\\nWeakSet}=\\nglobalThis;\\n\\nconst{\\n/* The feral Error constructor is safe for internal use, but must not be*/\\n/* revealed to post-lockdown code in any compartment including the start*/\\n/* compartment since in V8 at least it bears stack inspection capabilities.*/\\nError:FERAL_ERROR,\\nRangeError,\\nReferenceError,\\nSyntaxError,\\nTypeError,\\nAggregateError}=\\nglobalThis;\\n\\nconst{\\nassign,\\ncreate,\\ndefineProperties,\\nentries,\\nfreeze,\\ngetOwnPropertyDescriptor,\\ngetOwnPropertyDescriptors,\\ngetOwnPropertyNames,\\ngetPrototypeOf,\\nis,\\nisFrozen,\\nisSealed,\\nisExtensible,\\nkeys,\\nprototype:objectPrototype,\\nseal,\\npreventExtensions,\\nsetPrototypeOf,\\nvalues,\\nfromEntries}=\\nObject$1;\\n\\nconst{\\nspecies:speciesSymbol,\\ntoStringTag:toStringTagSymbol,\\niterator:iteratorSymbol,\\nmatchAll:matchAllSymbol,\\nunscopables:unscopablesSymbol,\\nkeyFor:symbolKeyFor,\\nfor:symbolFor}=\\nSymbol;\\n\\nconst{isInteger}=Number;\\n\\nconst{stringify:stringifyJson}=JSON;\\n\\n/* Needed only for the Safari bug workaround below*/\\nconst{defineProperty:originalDefineProperty}=Object$1;\\n\\nconst defineProperty=(object,prop,descriptor)=>{\\n/* We used to do the following, until we had to reopen Safari bug*/\\n/* https://bugs.webkit.org/show_bug.cgi?id=222538#c17*/\\n/* Once this is fixed, we may restore it.*/\\n/* // Object.defineProperty is allowed to fail silently so we use*/\\n/* // Object.defineProperties instead.*/\\n/* return defineProperties(object, { [prop]: descriptor });*/\\n\\n/* Instead, to workaround the Safari bug*/\\nconst result=originalDefineProperty(object,prop,descriptor);\\nif(result!==object){\\n/* See https://github.com/endojs/endo/blob/master/packages/ses/error-codes/SES_DEFINE_PROPERTY_FAILED_SILENTLY.md*/\\nthrow TypeError(\\n`Please report that the original defineProperty silently failed to set ${stringifyJson(\\nString(prop))\\n}. (SES_DEFINE_PROPERTY_FAILED_SILENTLY)`);}\\n\\n\\nreturn result;};\\n\\n\\nconst{\\napply,\\nconstruct,\\nget:reflectGet,\\ngetOwnPropertyDescriptor:reflectGetOwnPropertyDescriptor,\\nhas:reflectHas,\\nisExtensible:reflectIsExtensible,\\nownKeys,\\npreventExtensions:reflectPreventExtensions,\\nset:reflectSet}=\\nReflect;\\n\\nconst{isArray,prototype:arrayPrototype}=Array;\\nconst{prototype:mapPrototype}=Map;\\nconst{revocable:proxyRevocable}=Proxy;\\nconst{prototype:regexpPrototype}=RegExp;\\nconst{prototype:setPrototype}=Set;\\nconst{prototype:stringPrototype}=String;\\nconst{prototype:weakmapPrototype}=WeakMap;\\nconst{prototype:weaksetPrototype}=WeakSet;\\nconst{prototype:functionPrototype}=Function;\\nconst{prototype:promisePrototype}=Promise$1;\\nconst{prototype:generatorPrototype}=getPrototypeOf(\\n/* eslint-disable-next-line no-empty-function, func-names*/\\nfunction*(){});\\n\\nconst iteratorPrototype=getPrototypeOf(\\n/* eslint-disable-next-line @endo/no-polymorphic-call*/\\ngetPrototypeOf(arrayPrototype.values()));\\n\\n\\nconst typedArrayPrototype=getPrototypeOf(Uint8Array.prototype);\\n\\nconst{bind}=functionPrototype;\\n\\n/**\\n * uncurryThis()\\n * Equivalent of: fn => (thisArg, ...args) => apply(fn, thisArg, args)\\n *\\n * See those reference for a complete explanation:\\n * http://wiki.ecmascript.org/doku.php?id=conventions:safe_meta_programming\\n * which only lives at\\n * http://web.archive.org/web/20160805225710/http://wiki.ecmascript.org/doku.php?id=conventions:safe_meta_programming\\n *\\n * @type {<F extends (this: any, ...args: any[]) => any>(fn: F) => ((thisArg: ThisParameterType<F>, ...args: Parameters<F>) => ReturnType<F>)}\\n */\\nconst uncurryThis=bind.bind(bind.call);/* eslint-disable-line @endo/no-polymorphic-call*/\\n\\nconst objectHasOwnProperty=uncurryThis(objectPrototype.hasOwnProperty);\\n/**/\\nconst arrayFilter=uncurryThis(arrayPrototype.filter);\\nconst arrayForEach=uncurryThis(arrayPrototype.forEach);\\nconst arrayIncludes=uncurryThis(arrayPrototype.includes);\\nconst arrayJoin=uncurryThis(arrayPrototype.join);\\n/** @type {<T, U>(thisArg: readonly T[], callbackfn: (value: T, index: number, array: T[]) => U, cbThisArg?: any) => U[]} */\\nconst arrayMap=/** @type {any} */uncurryThis(arrayPrototype.map);\\nconst arrayFlatMap=/** @type {any} */\\nuncurryThis(arrayPrototype.flatMap);\\n\\nconst arrayPop=uncurryThis(arrayPrototype.pop);\\n/** @type {<T>(thisArg: T[], ...items: T[]) => number} */\\nconst arrayPush=uncurryThis(arrayPrototype.push);\\nconst arraySlice=uncurryThis(arrayPrototype.slice);\\nconst arraySome=uncurryThis(arrayPrototype.some);\\nconst arraySort=uncurryThis(arrayPrototype.sort);\\nconst iterateArray=uncurryThis(arrayPrototype[iteratorSymbol]);\\n/**/\\nconst mapSet=uncurryThis(mapPrototype.set);\\nconst mapGet=uncurryThis(mapPrototype.get);\\nconst mapHas=uncurryThis(mapPrototype.has);\\nconst mapDelete=uncurryThis(mapPrototype.delete);\\nconst mapEntries=uncurryThis(mapPrototype.entries);\\nconst iterateMap=uncurryThis(mapPrototype[iteratorSymbol]);\\n/**/\\nconst setAdd=uncurryThis(setPrototype.add);\\nconst setDelete=uncurryThis(setPrototype.delete);\\nconst setForEach=uncurryThis(setPrototype.forEach);\\nconst setHas=uncurryThis(setPrototype.has);\\nconst iterateSet=uncurryThis(setPrototype[iteratorSymbol]);\\n/**/\\nconst regexpTest=uncurryThis(regexpPrototype.test);\\nconst regexpExec=uncurryThis(regexpPrototype.exec);\\nconst matchAllRegExp=uncurryThis(regexpPrototype[matchAllSymbol]);\\n/**/\\nconst stringEndsWith=uncurryThis(stringPrototype.endsWith);\\nconst stringIncludes=uncurryThis(stringPrototype.includes);\\nconst stringIndexOf=uncurryThis(stringPrototype.indexOf);\\nconst stringMatch=uncurryThis(stringPrototype.match);\\nconst generatorNext=uncurryThis(generatorPrototype.next);\\nconst generatorThrow=uncurryThis(generatorPrototype.throw);\\n\\n/**\\n * @type { &\\n * ((thisArg: string, searchValue: { [Symbol.replace](string: string, replaceValue: string): string; }, replaceValue: string) => string) &\\n * ((thisArg: string, searchValue: { [Symbol.replace](string: string, replacer: (substring: string, ...args: any[]) => string): string; }, replacer: (substring: string, ...args: any[]) => string) => string)\\n * }\\n */\\nconst stringReplace=/** @type {any} */\\nuncurryThis(stringPrototype.replace);\\n\\nconst stringSearch=uncurryThis(stringPrototype.search);\\nconst stringSlice=uncurryThis(stringPrototype.slice);\\nconst stringSplit=\\n/** @type {(thisArg: string, splitter: string | RegExp | { [Symbol.split](string: string, limit?: number): string[]; }, limit?: number) => string[]} */\\nuncurryThis(stringPrototype.split);\\n\\nconst stringStartsWith=uncurryThis(stringPrototype.startsWith);\\nconst iterateString=uncurryThis(stringPrototype[iteratorSymbol]);\\n/**/\\nconst weakmapDelete=uncurryThis(weakmapPrototype.delete);\\n/** @type {<K extends {}, V>(thisArg: WeakMap<K, V>, ...args: Parameters<WeakMap<K,V>['get']>) => ReturnType<WeakMap<K,V>['get']>} */\\nconst weakmapGet=uncurryThis(weakmapPrototype.get);\\nconst weakmapHas=uncurryThis(weakmapPrototype.has);\\nconst weakmapSet=uncurryThis(weakmapPrototype.set);\\n/**/\\nconst weaksetAdd=uncurryThis(weaksetPrototype.add);\\nconst weaksetHas=uncurryThis(weaksetPrototype.has);\\n/**/\\nconst functionToString=uncurryThis(functionPrototype.toString);\\nconst functionBind=uncurryThis(bind);\\n/**/\\nconst{all}=Promise$1;\\nconst promiseAll=(promises)=>apply(all,Promise$1,[promises]);\\nconst promiseCatch=uncurryThis(promisePrototype.catch);\\n/** @type {<T, TResult1 = T, TResult2 = never>(thisArg: T, onfulfilled?: ((value: T) => TResult1 | PromiseLike<TResult1>) | undefined | null, onrejected?: ((reason: any) => TResult2 | PromiseLike<TResult2>) | undefined | null) => Promise<TResult1 | TResult2>} */\\nconst promiseThen=/** @type {any} */\\nuncurryThis(promisePrototype.then);\\n\\n/**/\\nconst finalizationRegistryRegister=\\nFinalizationRegistry&&uncurryThis(FinalizationRegistry.prototype.register);\\nconst finalizationRegistryUnregister=\\nFinalizationRegistry&&\\nuncurryThis(FinalizationRegistry.prototype.unregister);\\n\\n/**\\n * getConstructorOf()\\n * Return the constructor from an instance.\\n *\\n * @param {Function} fn\\n */\\nconst getConstructorOf=(fn)=>\\nreflectGet(getPrototypeOf(fn),'constructor');\\n\\n/**\\n * immutableObject\\n * An immutable (frozen) empty object that is safe to share.\\n */\\nconst immutableObject=freeze(create(null));\\n\\n/**\\n * isObject tests whether a value is an object.\\n * Today, this is equivalent to:\\n *\\n * const isObject = value => {\\n * if (value === null) return false;\\n * const type = typeof value;\\n * return type === 'object' || type === 'function';\\n * };\\n *\\n * But this is not safe in the face of possible evolution of the language, for\\n * example new types or semantics of records and tuples.\\n * We use this implementation despite the unnecessary allocation implied by\\n * attempting to box a primitive.\\n *\\n * @param {any} value\\n */\\nconst isObject=(value)=>Object$1(value)===value;\\n\\n/**\\n * isError tests whether an object inherits from the intrinsic\\n * `Error.prototype`.\\n * We capture the original error constructor as FERAL_ERROR to provide a clear\\n * signal for reviewers that we are handling an object with excess authority,\\n * like stack trace inspection, that we are carefully hiding from client code.\\n * Checking instanceof happens to be safe, but to avoid uttering FERAL_ERROR\\n * for such a trivial case outside commons.js, we provide a utility function.\\n *\\n * @param {any} value\\n */\\nconst isError=(value)=>value instanceof FERAL_ERROR;\\n\\n/* The original unsafe untamed eval function, which must not escape.*/\\n/* Sample at module initialization time, which is before lockdown can*/\\n/* repair it. Use it only to build powerless abstractions.*/\\n/* eslint-disable-next-line no-eval*/\\nconst FERAL_EVAL=eval;\\n\\n/* The original unsafe untamed Function constructor, which must not escape.*/\\n/* Sample at module initialization time, which is before lockdown can*/\\n/* repair it. Use it only to build powerless abstractions.*/\\nconst FERAL_FUNCTION=Function;\\n\\nconst noEvalEvaluate=()=>{\\n/* See https://github.com/endojs/endo/blob/master/packages/ses/error-codes/SES_NO_EVAL.md*/\\nthrow TypeError('Cannot eval with evalTaming set to \\\"noEval\\\" (SES_NO_EVAL)');};\\n\\n\\n/* ////////////////// FERAL_STACK_GETTER FERAL_STACK_SETTER ////////////////////*/\\n\\nconst er1StackDesc=getOwnPropertyDescriptor(Error('er1'),'stack');\\nconst er2StackDesc=getOwnPropertyDescriptor(TypeError('er2'),'stack');\\n\\nlet feralStackGetter;\\nlet feralStackSetter;\\nif(er1StackDesc&&er2StackDesc&&er1StackDesc.get){\\n/* We should only encounter this case on v8 because of its problematic*/\\n/* error own stack accessor behavior.*/\\n/* Note that FF/SpiderMonkey, Moddable/XS, and the error stack proposal*/\\n/* all inherit a stack accessor property from Error.prototype, which is*/\\n/* great. That case needs no heroics to secure.*/\\nif(\\n/* In the v8 case as we understand it, all errors have an own stack*/\\n/* accessor property, but within the same realm, all these accessor*/\\n/* properties have the same getter and have the same setter.*/\\n/* This is therefore the case that we repair.*/\\ntypeof er1StackDesc.get==='function'&&\\ner1StackDesc.get===er2StackDesc.get&&\\ntypeof er1StackDesc.set==='function'&&\\ner1StackDesc.set===er2StackDesc.set)\\n{\\n/* Otherwise, we have own stack accessor properties that are outside*/\\n/* our expectations, that therefore need to be understood better*/\\n/* before we know how to repair them.*/\\nferalStackGetter=freeze(er1StackDesc.get);\\nferalStackSetter=freeze(er1StackDesc.set);}else\\n{\\n/* See https://github.com/endojs/endo/blob/master/packages/ses/error-codes/SES_UNEXPECTED_ERROR_OWN_STACK_ACCESSOR.md*/\\nthrow TypeError(\\n'Unexpected Error own stack accessor functions (SES_UNEXPECTED_ERROR_OWN_STACK_ACCESSOR)');}}\\n\\n\\n\\n\\n/**\\n * If on a v8 with the problematic error own stack accessor behavior,\\n * `FERAL_STACK_GETTER` will be the shared getter of all those accessors\\n * and `FERAL_STACK_SETTER` will be the shared setter. On any platform\\n * without this problem, `FERAL_STACK_GETTER` and `FERAL_STACK_SETTER` are\\n * both `undefined`.\\n *\\n * @type {(() => any) | undefined}\\n */\\nconst FERAL_STACK_GETTER=feralStackGetter;\\n\\n/**\\n * If on a v8 with the problematic error own stack accessor behavior,\\n * `FERAL_STACK_GETTER` will be the shared getter of all those accessors\\n * and `FERAL_STACK_SETTER` will be the shared setter. On any platform\\n * without this problem, `FERAL_STACK_GETTER` and `FERAL_STACK_SETTER` are\\n * both `undefined`.\\n *\\n * @type {((newValue: any) => void) | undefined}\\n */\\nconst FERAL_STACK_SETTER=feralStackSetter;exports.AggregateError=AggregateError;exports.Array=Array;exports.Date=Date;exports.FERAL_ERROR=FERAL_ERROR;exports.FERAL_EVAL=FERAL_EVAL;exports.FERAL_FUNCTION=FERAL_FUNCTION;exports.FERAL_REG_EXP=FERAL_REG_EXP;exports.FERAL_STACK_GETTER=FERAL_STACK_GETTER;exports.FERAL_STACK_SETTER=FERAL_STACK_SETTER;exports.FinalizationRegistry=FinalizationRegistry;exports.Float32Array=Float32Array;exports.JSON=JSON;exports.Map=Map;exports.Math=Math;exports.Number=Number;exports.Object=Object$1;exports.Promise=Promise$1;exports.Proxy=Proxy;exports.RangeError=RangeError;exports.ReferenceError=ReferenceError;exports.Reflect=Reflect;exports.Set=Set;exports.String=String;exports.Symbol=Symbol;exports.SyntaxError=SyntaxError;exports.TypeError=TypeError;exports.WeakMap=WeakMap;exports.WeakSet=WeakSet;exports.apply=apply;exports.arrayFilter=arrayFilter;exports.arrayFlatMap=arrayFlatMap;exports.arrayForEach=arrayForEach;exports.arrayIncludes=arrayIncludes;exports.arrayJoin=arrayJoin;exports.arrayMap=arrayMap;exports.arrayPop=arrayPop;exports.arrayPrototype=arrayPrototype;exports.arrayPush=arrayPush;exports.arraySlice=arraySlice;exports.arraySome=arraySome;exports.arraySort=arraySort;exports.assign=assign;exports.construct=construct;exports.create=create;exports.defineProperties=defineProperties;exports.defineProperty=defineProperty;exports.entries=entries;exports.finalizationRegistryRegister=finalizationRegistryRegister;exports.finalizationRegistryUnregister=finalizationRegistryUnregister;exports.freeze=freeze;exports.fromEntries=fromEntries;exports.functionBind=functionBind;exports.functionPrototype=functionPrototype;exports.functionToString=functionToString;exports.generatorNext=generatorNext;exports.generatorPrototype=generatorPrototype;exports.generatorThrow=generatorThrow;exports.getConstructorOf=getConstructorOf;exports.getOwnPropertyDescriptor=getOwnPropertyDescriptor;exports.getOwnPropertyDescriptors=getOwnPropertyDescriptors;exports.getOwnPropertyNames=getOwnPropertyNames;exports.getPrototypeOf=getPrototypeOf;exports.globalThis=universalThis;exports.immutableObject=immutableObject;exports.is=is;exports.isArray=isArray;exports.isError=isError;exports.isExtensible=isExtensible;exports.isFrozen=isFrozen;exports.isInteger=isInteger;exports.isObject=isObject;exports.isSealed=isSealed;exports.iterateArray=iterateArray;exports.iterateMap=iterateMap;exports.iterateSet=iterateSet;exports.iterateString=iterateString;exports.iteratorPrototype=iteratorPrototype;exports.iteratorSymbol=iteratorSymbol;exports.keys=keys;exports.mapDelete=mapDelete;exports.mapEntries=mapEntries;exports.mapGet=mapGet;exports.mapHas=mapHas;exports.mapPrototype=mapPrototype;exports.mapSet=mapSet;exports.matchAllRegExp=matchAllRegExp;exports.matchAllSymbol=matchAllSymbol;exports.noEvalEvaluate=noEvalEvaluate;exports.objectHasOwnProperty=objectHasOwnProperty;exports.objectPrototype=objectPrototype;exports.ownKeys=ownKeys;exports.preventExtensions=preventExtensions;exports.promiseAll=promiseAll;exports.promiseCatch=promiseCatch;exports.promisePrototype=promisePrototype;exports.promiseThen=promiseThen;exports.proxyRevocable=proxyRevocable;exports.reflectGet=reflectGet;exports.reflectGetOwnPropertyDescriptor=reflectGetOwnPropertyDescriptor;exports.reflectHas=reflectHas;exports.reflectIsExtensible=reflectIsExtensible;exports.reflectPreventExtensions=reflectPreventExtensions;exports.reflectSet=reflectSet;exports.regexpExec=regexpExec;exports.regexpPrototype=regexpPrototype;exports.regexpTest=regexpTest;exports.seal=seal;exports.setAdd=setAdd;exports.setDelete=setDelete;exports.setForEach=setForEach;exports.setHas=setHas;exports.setPrototype=setPrototype;exports.setPrototypeOf=setPrototypeOf;exports.speciesSymbol=speciesSymbol;exports.stringEndsWith=stringEndsWith;exports.stringIncludes=stringIncludes;exports.stringIndexOf=stringIndexOf;exports.stringMatch=stringMatch;exports.stringPrototype=stringPrototype;exports.stringReplace=stringReplace;exports.stringSearch=stringSearch;exports.stringSlice=stringSlice;exports.stringSplit=stringSplit;exports.stringStartsWith=stringStartsWith;exports.stringifyJson=stringifyJson;exports.symbolFor=symbolFor;exports.symbolKeyFor=symbolKeyFor;exports.toStringTagSymbol=toStringTagSymbol;exports.typedArrayPrototype=typedArrayPrototype;exports.uncurryThis=uncurryThis;exports.unscopablesSymbol=unscopablesSymbol;exports.values=values;exports.weakmapDelete=weakmapDelete;exports.weakmapGet=weakmapGet;exports.weakmapHas=weakmapHas;exports.weakmapPrototype=weakmapPrototype;exports.weakmapSet=weakmapSet;exports.weaksetAdd=weaksetAdd;exports.weaksetHas=weaksetHas;exports.weaksetPrototype=weaksetPrototype;\",\n \"node_modules/ses/src/compartment-evaluate.js\": \"'use strict';Object.defineProperty(exports,'__esModule',{value:true});var commons=require('./commons.js');var transforms=require('./transforms.js');var makeSafeEvaluator=require('./make-safe-evaluator.js');/*/ <reference types=\\\"ses\\\">*/\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\nconst provideCompartmentEvaluator=(compartmentFields,options)=>{\\nconst{sloppyGlobalsMode=false,__moduleShimLexicals__=undefined}=\\noptions;\\n\\nlet safeEvaluate;\\n\\nif(__moduleShimLexicals__===undefined&&!sloppyGlobalsMode){\\n({safeEvaluate}=compartmentFields);}else\\n{\\n/* The scope proxy or global lexicals are different from the*/\\n/* shared evaluator so we need to build a new one*/\\n\\nlet{globalTransforms}=compartmentFields;\\nconst{globalObject}=compartmentFields;\\n\\nlet moduleLexicals;\\nif(__moduleShimLexicals__!==undefined){\\n/* When using `evaluate` for ESM modules, as should only occur from the*/\\n/* module-shim's module-instance.js, we do not reveal the SES-shim's*/\\n/* module-to-program translation, as this is not standardizable behavior.*/\\n/* However, the `localTransforms` will come from the `__shimTransforms__`*/\\n/* Compartment option in this case, which is a non-standardizable escape*/\\n/* hatch so programs designed specifically for the SES-shim*/\\n/* implementation may opt-in to use the same transforms for `evaluate`*/\\n/* and `import`, at the expense of being tightly coupled to SES-shim.*/\\nglobalTransforms=undefined;\\n\\nmoduleLexicals=commons.create(\\nnull,\\ncommons.getOwnPropertyDescriptors(__moduleShimLexicals__));}\\n\\n\\n\\n({safeEvaluate}=makeSafeEvaluator.makeSafeEvaluator({\\nglobalObject,\\nmoduleLexicals,\\nglobalTransforms,\\nsloppyGlobalsMode}));}\\n\\n\\n\\nreturn{safeEvaluate};};\\n\\n\\nconst compartmentEvaluate=(compartmentFields,source,options)=>{\\n/* Perform this check first to avoid unnecessary sanitizing.*/\\n/* TODO Maybe relax string check and coerce instead:*/\\n/* https://github.com/tc39/proposal-dynamic-code-brand-checks*/\\nif(typeof source!=='string'){\\nthrow commons.TypeError('first argument of evaluate() must be a string');}\\n\\n\\n/* Extract options, and shallow-clone transforms.*/\\nconst{\\ntransforms:transforms$1=[],\\n__evadeHtmlCommentTest__=false,\\n__evadeImportExpressionTest__=false,\\n__rejectSomeDirectEvalExpressions__=true/* Note default on*/}=\\noptions;\\nconst localTransforms=[...transforms$1];\\nif(__evadeHtmlCommentTest__===true){\\ncommons.arrayPush(localTransforms,transforms.evadeHtmlCommentTest);}\\n\\nif(__evadeImportExpressionTest__===true){\\ncommons.arrayPush(localTransforms,transforms.evadeImportExpressionTest);}\\n\\nif(__rejectSomeDirectEvalExpressions__===true){\\ncommons.arrayPush(localTransforms,transforms.rejectSomeDirectEvalExpressions);}\\n\\n\\nconst{safeEvaluate}=provideCompartmentEvaluator(\\ncompartmentFields,\\noptions);\\n\\n\\nreturn safeEvaluate(source,{\\nlocalTransforms});};exports.compartmentEvaluate=compartmentEvaluate;exports.provideCompartmentEvaluator=provideCompartmentEvaluator;\",\n \"node_modules/ses/src/compartment-shim.js\": \"'use strict';var commons=require('./commons.js');var compartment=require('./compartment.js');var tameFunctionTostring=require('./tame-function-tostring.js');var intrinsics=require('./intrinsics.js');/*/ <reference types=\\\"ses\\\"/>*/\\n\\n\\n\\n\\n\\n\\nconst markVirtualizedNativeFunction=tameFunctionTostring.tameFunctionToString();\\n\\n/* @ts-ignore Compartment is definitely on globalThis.*/\\ncommons.globalThis.Compartment=compartment.makeCompartmentConstructor(\\ncompartment.makeCompartmentConstructor,\\nintrinsics.getGlobalIntrinsics(commons.globalThis),\\nmarkVirtualizedNativeFunction);\",\n \"node_modules/ses/src/compartment.js\": \"'use strict';Object.defineProperty(exports,'__esModule',{value:true});var commons=require('./commons.js');var globalObject=require('./global-object.js');var assert$1=require('./error/assert.js');var permits=require('./permits.js');var moduleLoad=require('./module-load.js');var moduleLink=require('./module-link.js');var moduleProxy=require('./module-proxy.js');var compartmentEvaluate=require('./compartment-evaluate.js');var\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\nmakeSafeEvaluator=require('./make-safe-evaluator.js');/* @ts-check*/ /** @import {ModuleDescriptor} from '../types.js' */ /* moduleAliases associates every public module exports namespace with its*/ /* corresponding compartment and specifier so they can be used to link modules*/ /* across compartments.*/ /* The mechanism to thread an alias is to use the compartment.module function*/ /* to obtain the exports namespace of a foreign module and pass it into another*/ /* compartment's moduleMap constructor option.*/\\nconst moduleAliases=new commons.WeakMap();\\n\\n/* privateFields captures the private state for each compartment.*/\\nconst privateFields=new commons.WeakMap();\\n\\nconst InertCompartment=function Compartment(\\n_endowments={},\\n_modules={},\\n_options={})\\n{\\nthrow commons.TypeError(\\n'Compartment.prototype.constructor is not a valid constructor.');};\\n\\n\\n\\n/**\\n * @param {Compartment} compartment\\n * @param {string} specifier\\n */\\nconst compartmentImportNow=(compartment,specifier)=>{\\nconst{execute,exportsProxy}=moduleLink.link(\\nprivateFields,\\nmoduleAliases,\\ncompartment,\\nspecifier);\\n\\nexecute();\\nreturn exportsProxy;};\\n\\n\\nconst CompartmentPrototype={\\nconstructor:InertCompartment,\\n\\nget globalThis(){\\nreturn commons.weakmapGet(privateFields,this).globalObject;},\\n\\n\\nget name(){\\nreturn commons.weakmapGet(privateFields,this).name;},\\n\\n\\n/**\\n * @param {string} source is a JavaScript program grammar construction.\\n * @param {object} [options]\\n * @param {Array<IMPORT('./lockdown-shim').Transform>} [options.transforms]\\n * @param {boolean} [options.sloppyGlobalsMode]\\n * @param {object} [options.__moduleShimLexicals__]\\n * @param {boolean} [options.__evadeHtmlCommentTest__]\\n * @param {boolean} [options.__evadeImportExpressionTest__]\\n * @param {boolean} [options.__rejectSomeDirectEvalExpressions__]\\n */\\nevaluate(source,options={}){\\nconst compartmentFields=commons.weakmapGet(privateFields,this);\\nreturn compartmentEvaluate.compartmentEvaluate(compartmentFields,source,options);},\\n\\n\\nmodule(specifier){\\nif(typeof specifier!=='string'){\\nthrow commons.TypeError('first argument of module() must be a string');}\\n\\n\\nconst{exportsProxy}=moduleProxy.getDeferredExports(\\nthis,\\ncommons.weakmapGet(privateFields,this),\\nmoduleAliases,\\nspecifier);\\n\\n\\nreturn exportsProxy;},\\n\\n\\nasync import(specifier){\\nconst{noNamespaceBox}=commons.weakmapGet(privateFields,this);\\n\\nif(typeof specifier!=='string'){\\nthrow commons.TypeError('first argument of import() must be a string');}\\n\\n\\nreturn commons.promiseThen(\\nmoduleLoad.load(privateFields,moduleAliases,this,specifier),\\n()=>{\\n/* The namespace box is a contentious design and likely to be a breaking*/\\n/* change in an appropriately numbered future version.*/\\nconst namespace=compartmentImportNow(\\n/** @type {Compartment} */this,\\nspecifier);\\n\\nif(noNamespaceBox){\\nreturn namespace;}\\n\\n/* Legacy behavior: box the namespace object so that thenable modules*/\\n/* do not get coerced into a promise accidentally.*/\\nreturn{namespace};});},\\n\\n\\n\\n\\nasync load(specifier){\\nif(typeof specifier!=='string'){\\nthrow commons.TypeError('first argument of load() must be a string');}\\n\\n\\nreturn moduleLoad.load(privateFields,moduleAliases,this,specifier);},\\n\\n\\nimportNow(specifier){\\nif(typeof specifier!=='string'){\\nthrow commons.TypeError('first argument of importNow() must be a string');}\\n\\n\\nmoduleLoad.loadNow(privateFields,moduleAliases,this,specifier);\\nreturn compartmentImportNow(/** @type {Compartment} */this,specifier);}};\\n\\n\\n\\n/* This causes `String(new Compartment())` to evaluate to `[object Compartment]`.*/\\n/* The descriptor follows the conventions of other globals with @@toStringTag*/\\n/* properties, e.g. Math.*/\\ncommons.defineProperties(CompartmentPrototype,{\\n[commons.toStringTagSymbol]:{\\nvalue:'Compartment',\\nwritable:false,\\nenumerable:false,\\nconfigurable:true}});\\n\\n\\n\\ncommons.defineProperties(InertCompartment,{\\nprototype:{value:CompartmentPrototype}});\\n\\n\\n/**\\n * @callback MakeCompartmentConstructor\\n * @param {MakeCompartmentConstructor} targetMakeCompartmentConstructor\\n * @param {Record<string, any>} intrinsics\\n * @param {(object: object) => void} markVirtualizedNativeFunction\\n * @param {Compartment} [parentCompartment]\\n * @returns {Compartment['constructor']}\\n */\\n\\n/* In order to facilitate migration from the deprecated signature*/\\n/* of the compartment constructor,*/\\n/* new Compartent(globals?, modules?, options?)*/\\n/* to the new signature:*/\\n/* new Compartment(options?)*/\\n/* where globals and modules are expressed in the options bag instead of*/\\n/* positional arguments, this function detects the temporary sigil __options__*/\\n/* on the first argument and coerces compartments arguments into a single*/\\n/* compartments object.*/\\nconst compartmentOptions=(...args)=>{\\nif(args.length===0){\\nreturn{};}\\n\\nif(\\nargs.length===1&&\\ntypeof args[0]==='object'&&\\nargs[0]!==null&&\\n'__options__'in args[0])\\n{\\nconst{__options__,...options}=args[0];\\nassert(\\n__options__===true,\\n`Compartment constructor only supports true __options__ sigil, got ${__options__}`);\\n\\nreturn options;}else\\n{\\nconst[\\nglobals=/** @type {Map<string, any>} */{},\\nmodules=/** @type {Map<string, ModuleDescriptor>} */{},\\noptions={}]=\\nargs;\\nassert$1.assertEqual(\\noptions.modules,\\nundefined,\\n`Compartment constructor must receive either a module map argument or modules option, not both`);\\n\\nassert$1.assertEqual(\\noptions.globals,\\nundefined,\\n`Compartment constructor must receive either globals argument or option, not both`);\\n\\nreturn{\\n...options,\\nglobals,\\nmodules};}};\\n\\n\\n\\n\\n/** @type {MakeCompartmentConstructor} */\\nconst makeCompartmentConstructor=(\\ntargetMakeCompartmentConstructor,\\nintrinsics,\\nmarkVirtualizedNativeFunction,\\nparentCompartment=undefined)=>\\n{\\nfunction Compartment(...args){\\nif(new.target===undefined){\\nthrow commons.TypeError(\\n\\\"Class constructor Compartment cannot be invoked without 'new'\\\");}\\n\\n\\n\\n/* Extract options, and shallow-clone transforms.*/\\nconst{\\nname='<unknown>',\\ntransforms=[],\\n__shimTransforms__=[],\\nglobals:endowmentsOption={},\\nmodules:moduleMapOption={},\\nresolveHook,\\nimportHook,\\nimportNowHook,\\nmoduleMapHook,\\nimportMetaHook,\\n__noNamespaceBox__:noNamespaceBox=false}=\\ncompartmentOptions(...args);\\nconst globalTransforms=[...transforms,...__shimTransforms__];\\nconst endowments={__proto__:null,...endowmentsOption};\\nconst moduleMap={__proto__:null,...moduleMapOption};\\n\\n/* Map<FullSpecifier, ModuleCompartmentRecord>*/\\nconst moduleRecords=new commons.Map();\\n/* Map<FullSpecifier, ModuleInstance>*/\\nconst instances=new commons.Map();\\n/* Map<FullSpecifier, {ExportsProxy, ProxiedExports, activate()}>*/\\nconst deferredExports=new commons.Map();\\n\\nconst globalObject$1={};\\n\\nglobalObject.setGlobalObjectSymbolUnscopables(globalObject$1);\\n\\n/* We must initialize all constant properties first because*/\\n/* `makeSafeEvaluator` may use them to create optimized bindings*/\\n/* in the evaluator.*/\\n/* TODO: consider merging into a single initialization if internal*/\\n/* evaluator is no longer eagerly created*/\\nglobalObject.setGlobalObjectConstantProperties(globalObject$1);\\n\\nconst{safeEvaluate}=makeSafeEvaluator.makeSafeEvaluator({\\nglobalObject:globalObject$1,\\nglobalTransforms,\\nsloppyGlobalsMode:false});\\n\\n\\nglobalObject.setGlobalObjectMutableProperties(globalObject$1,{\\nintrinsics,\\nnewGlobalPropertyNames:permits.sharedGlobalPropertyNames,\\nmakeCompartmentConstructor:targetMakeCompartmentConstructor,\\nparentCompartment:this,\\nmarkVirtualizedNativeFunction});\\n\\n\\n/* TODO: maybe add evalTaming to the Compartment constructor 3rd options?*/\\nglobalObject.setGlobalObjectEvaluators(\\nglobalObject$1,\\nsafeEvaluate,\\nmarkVirtualizedNativeFunction);\\n\\n\\ncommons.assign(globalObject$1,endowments);\\n\\ncommons.weakmapSet(privateFields,this,{\\nname:`${name}`,\\nglobalTransforms,\\nglobalObject:globalObject$1,\\nsafeEvaluate,\\nresolveHook,\\nimportHook,\\nimportNowHook,\\nmoduleMap,\\nmoduleMapHook,\\nimportMetaHook,\\nmoduleRecords,\\n__shimTransforms__,\\ndeferredExports,\\ninstances,\\nparentCompartment,\\nnoNamespaceBox});}\\n\\n\\n\\nCompartment.prototype=CompartmentPrototype;\\n\\nreturn Compartment;};exports.CompartmentPrototype=CompartmentPrototype;exports.InertCompartment=InertCompartment;exports.makeCompartmentConstructor=makeCompartmentConstructor;\",\n \"node_modules/ses/src/console-shim.js\": \"'use strict';var commons=require('./commons.js');var console=require('./error/console.js');var\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\nassert=require('./error/assert.js');/* TODO possible additional exports. Some are privileged.*/ /* export { loggedErrorHandler };*/ /* export {*/ /* makeCausalConsole,*/ /* consoleLevelMethods,*/ /* consoleOtherMethods,*/ /* makeLoggingConsoleKit,*/ /* filterConsole,*/ /* pumpLogToConsole,*/ /* } from './src/error/console.js';*/ /* export { assertLogs, throwsAndLogs } from './src/error/throws-and-logs.js';*/ /**\\n * Makes a Console like the\\n * [SES causal `console`](https://github.com/endojs/endo/blob/master/packages/ses/src/error/README.md)\\n * but whose output is redirected to the supplied `logger` function.\\n */\\nconst makeCausalConsoleFromLoggerForSesAva=\\nconsole.defineCausalConsoleFromLogger(assert.loggedErrorHandler);\\n\\n/**\\n *`makeCausalConsoleFromLoggerForSesAva` is privileged because it exposes\\n * unredacted error info onto the `Logger` provided by the caller. It\\n * should not be made available to non-privileged code.\\n *\\n * Further, we consider this particular API choice to be experimental\\n * and may change in the future. It is currently only intended for use by\\n * `@endo/ses-ava`, with which it will be co-maintained.\\n *\\n * Thus, this `console-shim.js` makes `makeCausalConsoleFromLoggerForSesAva`\\n * available on `globalThis` which it *assumes* is the global of the start\\n * compartment and is therefore allowed to hold powers that should not be\\n * available in constructed compartments. It makes it available as the value of\\n * a global property named by a registered symbol named\\n * `MAKE_CAUSAL_CONSOLE_FROM_LOGGER_KEY_FOR_SES_AVA`.\\n *\\n * Anyone accessing this, including `@endo/ses-ava`, should feature test for\\n * this and be tolerant of its absence. It may indeed disappear from later\\n * versions of the ses-shim.\\n */\\nconst MAKE_CAUSAL_CONSOLE_FROM_LOGGER_KEY_FOR_SES_AVA=commons.symbolFor(\\n'MAKE_CAUSAL_CONSOLE_FROM_LOGGER_KEY_FOR_SES_AVA');\\n\\n\\ncommons.globalThis[MAKE_CAUSAL_CONSOLE_FROM_LOGGER_KEY_FOR_SES_AVA]=\\nmakeCausalConsoleFromLoggerForSesAva;\",\n \"node_modules/ses/src/enable-property-overrides.js\": \"'use strict';Object.defineProperty(exports,'__esModule',{value:true});var commons=require('./commons.js');var\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\nenablements=require('./enablements.js');/* Adapted from SES/Caja*/ /**\\n * For a special set of properties defined in the `enablement` whitelist,\\n * `enablePropertyOverrides` ensures that the effect of freezing does not\\n * suppress the ability to override these properties on derived objects by\\n * simple assignment.\\n *\\n * Because of lack of sufficient foresight at the time, ES5 unfortunately\\n * specified that a simple assignment to a non-existent property must fail if\\n * it would override an non-writable data property of the same name in the\\n * shadow of the prototype chain. In retrospect, this was a mistake, the\\n * so-called \\\"override mistake\\\". But it is now too late and we must live with\\n * the consequences.\\n *\\n * As a result, simply freezing an object to make it tamper proof has the\\n * unfortunate side effect of breaking previously correct code that is\\n * considered to have followed JS best practices, if this previous code used\\n * assignment to override.\\n *\\n * For the enabled properties, `enablePropertyOverrides` effectively shims what\\n * the assignment behavior would have been in the absence of the override\\n * mistake. However, the shim produces an imperfect emulation. It shims the\\n * behavior by turning these data properties into accessor properties, where\\n * the accessor's getter and setter provide the desired behavior. For\\n * non-reflective operations, the illusion is perfect. However, reflective\\n * operations like `getOwnPropertyDescriptor` see the descriptor of an accessor\\n * property rather than the descriptor of a data property. At the time of this\\n * writing, this is the best we know how to do.\\n *\\n * To the getter of the accessor we add a property named\\n * `'originalValue'` whose value is, as it says, the value that the\\n * data property had before being converted to an accessor property. We add\\n * this extra property to the getter for two reason:\\n *\\n * The harden algorithm walks the own properties reflectively, i.e., with\\n * `getOwnPropertyDescriptor` semantics, rather than `[[Get]]` semantics. When\\n * it sees an accessor property, it does not invoke the getter. Rather, it\\n * proceeds to walk both the getter and setter as part of its transitive\\n * traversal. Without this extra property, `enablePropertyOverrides` would have\\n * hidden the original data property value from `harden`, which would be bad.\\n * Instead, by exposing that value in an own data property on the getter,\\n * `harden` finds and walks it anyway.\\n *\\n * We enable a form of cooperative emulation, giving reflective code an\\n * opportunity to cooperate in upholding the illusion. When such cooperative\\n * reflective code sees an accessor property, where the accessor's getter\\n * has an `originalValue` property, it knows that the getter is\\n * alleging that it is the result of the `enablePropertyOverrides` conversion\\n * pattern, so it can decide to cooperatively \\\"pretend\\\" that it sees a data\\n * property with that value.\\n *\\n * @param {Record<string, any>} intrinsics\\n * @param {'min' | 'moderate' | 'severe'} overrideTaming\\n * @param {Iterable<string | symbol>} [overrideDebug]\\n */\\nfunction enablePropertyOverrides(\\nintrinsics,\\noverrideTaming,\\noverrideDebug=[])\\n{\\nconst debugProperties=new commons.Set(overrideDebug);\\nfunction enable(path,obj,prop,desc){\\nif('value'in desc&&desc.configurable){\\nconst{value}=desc;\\n\\nconst isDebug=commons.setHas(debugProperties,prop);\\n\\n/* We use concise method syntax to be `this` sensitive, but still*/\\n/* omit a prototype property or [[Construct]] behavior.*/\\n/* @ts-expect-error We know there is an accessor descriptor there*/\\nconst{get:getter,set:setter}=commons.getOwnPropertyDescriptor(\\n{\\nget[prop](){\\nreturn value;},\\n\\nset[prop](newValue){\\nif(obj===this){\\nthrow commons.TypeError(\\n`Cannot assign to read only property '${commons.String(\\nprop)\\n}' of '${path}'`);}\\n\\n\\nif(commons.objectHasOwnProperty(this,prop)){\\nthis[prop]=newValue;}else\\n{\\nif(isDebug){\\n/* eslint-disable-next-line @endo/no-polymorphic-call*/\\nconsole.error(commons.TypeError(`Override property ${prop}`));}\\n\\ncommons.defineProperty(this,prop,{\\nvalue:newValue,\\nwritable:true,\\nenumerable:true,\\nconfigurable:true});}}},\\n\\n\\n\\n\\nprop);\\n\\n\\ncommons.defineProperty(getter,'originalValue',{\\nvalue,\\nwritable:false,\\nenumerable:false,\\nconfigurable:false});\\n\\n\\ncommons.defineProperty(obj,prop,{\\nget:getter,\\nset:setter,\\nenumerable:desc.enumerable,\\nconfigurable:desc.configurable});}}\\n\\n\\n\\n\\nfunction enableProperty(path,obj,prop){\\nconst desc=commons.getOwnPropertyDescriptor(obj,prop);\\nif(!desc){\\nreturn;}\\n\\nenable(path,obj,prop,desc);}\\n\\n\\nfunction enableAllProperties(path,obj){\\nconst descs=commons.getOwnPropertyDescriptors(obj);\\nif(!descs){\\nreturn;}\\n\\n/* TypeScript does not allow symbols to be used as indexes because it*/\\n/* cannot recokon types of symbolized properties.*/\\ncommons.arrayForEach(commons.ownKeys(descs),(prop)=>enable(path,obj,prop,descs[prop]));}\\n\\n\\nfunction enableProperties(path,obj,plan){\\nfor(const prop of commons.ownKeys(plan)){\\nconst desc=commons.getOwnPropertyDescriptor(obj,prop);\\nif(!desc||desc.get||desc.set){\\n/* No not a value property, nothing to do.*/\\n/* eslint-disable-next-line no-continue*/\\ncontinue;}\\n\\n\\n/* In case `prop` is a symbol, we first coerce it with `String`,*/\\n/* purely for diagnostic purposes.*/\\nconst subPath=`${path}.${commons.String(prop)}`;\\nconst subPlan=plan[prop];\\n\\nif(subPlan===true){\\nenableProperty(subPath,obj,prop);}else\\nif(subPlan==='*'){\\nenableAllProperties(subPath,desc.value);}else\\nif(commons.isObject(subPlan)){\\nenableProperties(subPath,desc.value,subPlan);}else\\n{\\nthrow commons.TypeError(`Unexpected override enablement plan ${subPath}`);}}}\\n\\n\\n\\n\\nlet plan;\\nswitch(overrideTaming){\\ncase'min':{\\nplan=enablements.minEnablements;\\nbreak;}\\n\\ncase'moderate':{\\nplan=enablements.moderateEnablements;\\nbreak;}\\n\\ncase'severe':{\\nplan=enablements.severeEnablements;\\nbreak;}\\n\\ndefault:{\\nthrow commons.TypeError(`unrecognized overrideTaming ${overrideTaming}`);}}\\n\\n\\n\\n/* Do the repair.*/\\nenableProperties('root',intrinsics,plan);}exports[\\\"default\\\"]=enablePropertyOverrides;\",\n \"node_modules/ses/src/enablements.js\": \"'use strict';Object.defineProperty(exports,'__esModule',{value:true});var\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\ncommons=require('./commons.js');/**\\n * @file Exports {@code enablements}, a recursively defined\\n * JSON record defining the optimum set of intrinsics properties\\n * that need to be \\\"repaired\\\" before hardening is applied on\\n * enviromments subject to the override mistake.\\n *\\n * @author JF Paradis\\n * @author Mark S. Miller\\n */ /**\\n * <p>Because \\\"repairing\\\" replaces data properties with accessors, every\\n * time a repaired property is accessed, the associated getter is invoked,\\n * which degrades the runtime performance of all code executing in the\\n * repaired enviromment, compared to the non-repaired case. In order\\n * to maintain performance, we only repair the properties of objects\\n * for which hardening causes a breakage of their normal intended usage.\\n *\\n * There are three unwanted cases:\\n * <ul>\\n * <li>Overriding properties on objects typically used as records,\\n * namely {@code \\\"Object\\\"} and {@code \\\"Array\\\"}. In the case of arrays,\\n * the situation is unintentional, a given program might not be aware\\n * that non-numerical properties are stored on the underlying object\\n * instance, not on the array. When an object is typically used as a\\n * map, we repair all of its prototype properties.\\n * <li>Overriding properties on objects that provide defaults on their\\n * prototype and that programs typically set using an assignment, such as\\n * {@code \\\"Error.prototype.message\\\"} and {@code \\\"Function.prototype.name\\\"}\\n * (both default to \\\"\\\").\\n * <li>Setting-up a prototype chain, where a constructor is set to extend\\n * another one. This is typically set by assignment, for example\\n * {@code \\\"Child.prototype.constructor = Child\\\"}, instead of invoking\\n * Object.defineProperty();\\n *\\n * <p>Each JSON record enumerates the disposition of the properties on\\n * some corresponding intrinsic object.\\n *\\n * <p>For each such record, the values associated with its property\\n * names can be:\\n * <ul>\\n * <li>true, in which case this property is simply repaired. The\\n * value associated with that property is not traversed. For\\n * example, {@code \\\"Function.prototype.name\\\"} leads to true,\\n * meaning that the {@code \\\"name\\\"} property of {@code\\n * \\\"Function.prototype\\\"} should be repaired (which is needed\\n * when inheriting from @code{Function} and setting the subclass's\\n * {@code \\\"prototype.name\\\"} property). If the property is\\n * already an accessor property, it is not repaired (because\\n * accessors are not subject to the override mistake).\\n * <li>\\\"*\\\", in which case this property is not repaired but the\\n * value associated with that property are traversed and repaired.\\n * <li>Another record, in which case this property is not repaired\\n * and that next record represents the disposition of the object\\n * which is its value. For example,{@code \\\"FunctionPrototype\\\"}\\n * leads to another record explaining which properties {@code\\n * Function.prototype} need to be repaired.\\n */ /**\\n * Minimal enablements when all the code is modern and known not to\\n * step into the override mistake, except for the following pervasive\\n * cases.\\n */const minEnablements={'%ObjectPrototype%':{toString:true},'%FunctionPrototype%':{toString:true/* set by \\\"rollup\\\"*/},'%ErrorPrototype%':{name:true/* set by \\\"precond\\\", \\\"ava\\\", \\\"node-fetch\\\"*/},'%IteratorPrototype%':{toString:true,/* https://github.com/tc39/proposal-iterator-helpers*/constructor:true,/* https://github.com/tc39/proposal-iterator-helpers*/[commons.toStringTagSymbol]:true}};/**\\n * Moderate enablements are usually good enough for legacy compat.\\n */const moderateEnablements={'%ObjectPrototype%':{toString:true,valueOf:true},'%ArrayPrototype%':{toString:true,push:true,/* set by \\\"Google Analytics\\\"*/concat:true,/* set by mobx generated code (old TS compiler?)*/[commons.iteratorSymbol]:true/* set by mobx generated code (old TS compiler?)*/},/* Function.prototype has no 'prototype' property to enable.*/ /* Function instances have their own 'name' and 'length' properties*/ /* which are configurable and non-writable. Thus, they are already*/ /* non-assignable anyway.*/'%FunctionPrototype%':{constructor:true,/* set by \\\"regenerator-runtime\\\"*/bind:true,/* set by \\\"underscore\\\", \\\"express\\\"*/toString:true/* set by \\\"rollup\\\"*/},'%ErrorPrototype%':{constructor:true,/* set by \\\"fast-json-patch\\\", \\\"node-fetch\\\"*/message:true,name:true,/* set by \\\"precond\\\", \\\"ava\\\", \\\"node-fetch\\\", \\\"node 14\\\"*/toString:true/* set by \\\"bluebird\\\"*/},'%TypeErrorPrototype%':{constructor:true,/* set by \\\"readable-stream\\\"*/message:true,/* set by \\\"tape\\\"*/\\nname:true/* set by \\\"readable-stream\\\", \\\"node 14\\\"*/},\\n\\n\\n'%SyntaxErrorPrototype%':{\\nmessage:true,/* to match TypeErrorPrototype.message*/\\nname:true/* set by \\\"node 14\\\"*/},\\n\\n\\n'%RangeErrorPrototype%':{\\nmessage:true,/* to match TypeErrorPrototype.message*/\\nname:true/* set by \\\"node 14\\\"*/},\\n\\n\\n'%URIErrorPrototype%':{\\nmessage:true,/* to match TypeErrorPrototype.message*/\\nname:true/* set by \\\"node 14\\\"*/},\\n\\n\\n'%EvalErrorPrototype%':{\\nmessage:true,/* to match TypeErrorPrototype.message*/\\nname:true/* set by \\\"node 14\\\"*/},\\n\\n\\n'%ReferenceErrorPrototype%':{\\nmessage:true,/* to match TypeErrorPrototype.message*/\\nname:true/* set by \\\"node 14\\\"*/},\\n\\n\\n/* https://github.com/endojs/endo/issues/550*/\\n'%AggregateErrorPrototype%':{\\nmessage:true,/* to match TypeErrorPrototype.message*/\\nname:true/* set by \\\"node 14\\\"?*/},\\n\\n\\n'%PromisePrototype%':{\\nconstructor:true/* set by \\\"core-js\\\"*/},\\n\\n\\n'%TypedArrayPrototype%':'*',/* set by https://github.com/feross/buffer*/\\n\\n'%Generator%':{\\nconstructor:true,\\nname:true,\\ntoString:true},\\n\\n\\n'%IteratorPrototype%':{\\ntoString:true,\\n/* https://github.com/tc39/proposal-iterator-helpers*/\\nconstructor:true,\\n/* https://github.com/tc39/proposal-iterator-helpers*/\\n[commons.toStringTagSymbol]:true}};\\n\\n\\n\\n/**\\n * The 'severe' enablement are needed because of issues tracked at\\n * https://github.com/endojs/endo/issues/576\\n *\\n * They are like the `moderate` enablements except for the entries below.\\n */\\nconst severeEnablements={\\n...moderateEnablements,\\n\\n/**\\n * Rollup (as used at least by vega) and webpack\\n * (as used at least by regenerator) both turn exports into assignments\\n * to a big `exports` object that inherits directly from\\n * `Object.prototype`. Some of the exported names we've seen include\\n * `hasOwnProperty`, `constructor`, and `toString`. But the strategy used\\n * by rollup and webpack potentionally turns any exported name\\n * into an assignment rejected by the override mistake. That's why\\n * the `severe` enablements takes the extreme step of enabling\\n * everything on `Object.prototype`.\\n *\\n * In addition, code doing inheritance manually will often override\\n * the `constructor` property on the new prototype by assignment. We've\\n * seen this several times.\\n *\\n * The cost of enabling all these is that they create a miserable debugging\\n * experience specifically on Node.\\n * https://github.com/Agoric/agoric-sdk/issues/2324\\n * explains how it confused the Node console.\\n *\\n * (TODO Reexamine the vscode situation. I think it may have improved\\n * since the following paragraph was written.)\\n *\\n * The vscode debugger's object inspector shows the own data properties of\\n * an object, which is typically what you want, but also shows both getter\\n * and setter for every accessor property whether inherited or own.\\n * With the `'*'` setting here, all the properties inherited from\\n * `Object.prototype` are accessors, creating an unusable display as seen\\n * at As explained at\\n * https://github.com/endojs/endo/blob/master/packages/ses/docs/lockdown.md#overridetaming-options\\n * Open the triangles at the bottom of that section.\\n */\\n'%ObjectPrototype%':'*',\\n\\n/**\\n * The widely used Buffer defined at https://github.com/feross/buffer\\n * on initialization, manually creates the equivalent of a subclass of\\n * `TypedArray`, which it then initializes by assignment. These assignments\\n * include enough of the `TypeArray` methods that here, the `severe`\\n * enablements just enable them all.\\n */\\n'%TypedArrayPrototype%':'*',\\n\\n/**\\n * Needed to work with Immer before https://github.com/immerjs/immer/pull/914\\n * is accepted.\\n */\\n'%MapPrototype%':'*',\\n\\n/**\\n * Needed to work with Immer before https://github.com/immerjs/immer/pull/914\\n * is accepted.\\n */\\n'%SetPrototype%':'*'};exports.minEnablements=minEnablements;exports.moderateEnablements=moderateEnablements;exports.severeEnablements=severeEnablements;\",\n \"node_modules/ses/src/error/assert.js\": \"'use strict';Object.defineProperty(exports,'__esModule',{value:true});var commons=require('../commons.js');var stringifyUtils=require('./stringify-utils.js');require('./types.js');require('./internal-types.js');var\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\nnoteLogArgs=require('./note-log-args.js');/* Copyright (C) 2019 Agoric, under Apache License 2.0*/ /**\\n * @import {BaseAssert, Assert, AssertionFunctions, AssertionUtilities, StringablePayload, DetailsToken, MakeAssert} from '../../types.js'\\n */ /* For our internal debugging purposes, uncomment*/ /* const internalDebugConsole = console;*/ /* /////////////////////////////////////////////////////////////////////////////*/ /** @type {WeakMap<StringablePayload, any>} */const declassifiers=new commons.WeakMap();\\n/** @type {AssertionUtilities['quote']} */\\nconst quote=(payload,spaces=undefined)=>{\\nconst result=commons.freeze({\\ntoString:commons.freeze(()=>stringifyUtils.bestEffortStringify(payload,spaces))});\\n\\ncommons.weakmapSet(declassifiers,result,payload);\\nreturn result;};\\n\\ncommons.freeze(quote);\\n\\nconst canBeBare=commons.freeze(/^[\\\\w:-]( ?[\\\\w:-])*$/);\\n\\n/**\\n * @type {AssertionUtilities['bare']}\\n */\\nconst bare=(payload,spaces=undefined)=>{\\nif(typeof payload!=='string'||!commons.regexpTest(canBeBare,payload)){\\nreturn quote(payload,spaces);}\\n\\nconst result=commons.freeze({\\ntoString:commons.freeze(()=>payload)});\\n\\ncommons.weakmapSet(declassifiers,result,payload);\\nreturn result;};\\n\\ncommons.freeze(bare);\\n\\n/* /////////////////////////////////////////////////////////////////////////////*/\\n\\n/**\\n * @typedef {object} HiddenDetails\\n *\\n * Captures the arguments passed to the `details` template string tag.\\n *\\n * @property {TemplateStringsArray | string[]} template\\n * @property {any[]} args\\n */\\n\\n/**\\n * @type {WeakMap<DetailsToken, HiddenDetails>}\\n *\\n * Maps from a details token which a `details` template literal returned\\n * to a record of the contents of that template literal expression.\\n */\\nconst hiddenDetailsMap=new commons.WeakMap();\\n\\n/**\\n * @param {HiddenDetails} hiddenDetails\\n * @returns {string}\\n */\\nconst getMessageString=({template,args})=>{\\nconst parts=[template[0]];\\nfor(let i=0;i<args.length;i+=1){\\nconst arg=args[i];\\nlet argStr;\\nif(commons.weakmapHas(declassifiers,arg)){\\nargStr=`${arg}`;}else\\nif(commons.isError(arg)){\\nargStr=`(${stringifyUtils.an(arg.name)})`;}else\\n{\\nargStr=`(${stringifyUtils.an(typeof arg)})`;}\\n\\ncommons.arrayPush(parts,argStr,template[i+1]);}\\n\\nreturn commons.arrayJoin(parts,'');};\\n\\n\\n/**\\n * Give detailsTokens a toString behavior. To minimize the overhead of\\n * creating new detailsTokens, we do this with an\\n * inherited `this` sensitive `toString` method, even though we normally\\n * avoid `this` sensitivity. To protect the method from inappropriate\\n * `this` application, it does something interesting only for objects\\n * registered in `redactedDetails`, which should be exactly the detailsTokens.\\n *\\n * The printing behavior must not reveal anything redacted, so we just use\\n * the same `getMessageString` we use to construct the redacted message\\n * string for a thrown assertion error.\\n */\\nconst DetailsTokenProto=commons.freeze({\\ntoString(){\\nconst hiddenDetails=commons.weakmapGet(hiddenDetailsMap,this);\\nif(hiddenDetails===undefined){\\nreturn'[Not a DetailsToken]';}\\n\\nreturn getMessageString(hiddenDetails);}});\\n\\n\\ncommons.freeze(DetailsTokenProto.toString);\\n\\n/**\\n * Normally this is the function exported as `assert.details` and often\\n * spelled `X`. However, if the `{errorTaming: 'unsafe'}` or\\n * `{errorTaming: 'unsafe-debug'}` option is\\n * given to `lockdown`, then `unredactedDetails` is used instead.\\n *\\n * There are some unconditional uses of `redactedDetails` in this module. All\\n * of them should be uses where the template literal has no redacted\\n * substitution values. In those cases, the two are equivalent.\\n *\\n * @type {AssertionUtilities['details']}\\n */\\nconst redactedDetails=(template,...args)=>{\\n/* Keep in mind that the vast majority of calls to `details` creates*/\\n/* a details token that is never used, so this path must remain as fast as*/\\n/* possible. Hence we store what we've got with little processing, postponing*/\\n/* all the work to happen only if needed, for example, if an assertion fails.*/\\nconst detailsToken=commons.freeze({__proto__:DetailsTokenProto});\\ncommons.weakmapSet(hiddenDetailsMap,detailsToken,{template,args});\\nreturn(/** @type {DetailsToken} */ /** @type {unknown} */detailsToken);};\\n\\ncommons.freeze(redactedDetails);\\n\\n/**\\n * `unredactedDetails` is like `details` except that it does not redact\\n * anything. It acts like `details` would act if all substitution values\\n * were wrapped with the `quote` function above (the function normally\\n * spelled `q`). If the `{errorTaming: 'unsafe'}`\\n * or `{errorTaming: 'unsafe-debug'}` option is given to\\n * `lockdown`, then the lockdown-shim arranges for the global `assert` to be\\n * one whose `details` property is `unredactedDetails`.\\n * This setting optimizes the debugging and testing experience at the price\\n * of safety. `unredactedDetails` also sacrifices the speed of `details`,\\n * which is usually fine in debugging and testing.\\n *\\n * @type {AssertionUtilities['details']}\\n */\\nconst unredactedDetails=(template,...args)=>{\\nargs=commons.arrayMap(args,(arg)=>\\ncommons.weakmapHas(declassifiers,arg)?arg:quote(arg));\\n\\nreturn redactedDetails(template,...args);};\\n\\ncommons.freeze(unredactedDetails);\\n\\n\\n/**\\n * @param {HiddenDetails} hiddenDetails\\n * @returns {LogArgs}\\n */\\nconst getLogArgs=({template,args})=>{\\nconst logArgs=[template[0]];\\nfor(let i=0;i<args.length;i+=1){\\nlet arg=args[i];\\nif(commons.weakmapHas(declassifiers,arg)){\\narg=commons.weakmapGet(declassifiers,arg);}\\n\\n/* Remove the extra spaces (since console.error puts them*/\\n/* between each cause).*/\\nconst priorWithoutSpace=commons.stringReplace(commons.arrayPop(logArgs)||'',/ $/,'');\\nif(priorWithoutSpace!==''){\\ncommons.arrayPush(logArgs,priorWithoutSpace);}\\n\\nconst nextWithoutSpace=commons.stringReplace(template[i+1],/^ /,'');\\ncommons.arrayPush(logArgs,arg,nextWithoutSpace);}\\n\\nif(logArgs[logArgs.length-1]===''){\\ncommons.arrayPop(logArgs);}\\n\\nreturn logArgs;};\\n\\n\\n/**\\n * @type {WeakMap<Error, LogArgs>}\\n *\\n * Maps from an error object to the log args that are a more informative\\n * alternative message for that error. When logging the error, these\\n * log args should be preferred to `error.message`.\\n */\\nconst hiddenMessageLogArgs=new commons.WeakMap();\\n\\n/* So each error tag will be unique.*/\\nlet errorTagNum=0;\\n\\n/**\\n * @type {WeakMap<Error, string>}\\n */\\nconst errorTags=new commons.WeakMap();\\n\\n/**\\n * @param {Error} err\\n * @param {string=} optErrorName\\n * @returns {string}\\n */\\nconst tagError=(err,optErrorName=err.name)=>{\\nlet errorTag=commons.weakmapGet(errorTags,err);\\nif(errorTag!==undefined){\\nreturn errorTag;}\\n\\nerrorTagNum+=1;\\nerrorTag=`${optErrorName}#${errorTagNum}`;\\ncommons.weakmapSet(errorTags,err,errorTag);\\nreturn errorTag;};\\n\\n\\n/**\\n * Make reasonable best efforts to make a `Passable` error.\\n * - `sanitizeError` will remove any \\\"extraneous\\\" own properties already added\\n * by the host,\\n * such as `fileName`,`lineNumber` on FireFox or `line` on Safari.\\n * - If any such \\\"extraneous\\\" properties were removed, `sanitizeError` will\\n * annotate\\n * the error with them, so they still appear on the causal console\\n * log output for diagnostic purposes, but not be otherwise visible.\\n * - `sanitizeError` will ensure that any expected properties already\\n * added by the host are data\\n * properties, converting accessor properties to data properties as needed,\\n * such as `stack` on v8 (Chrome, Brave, Edge?)\\n * - `sanitizeError` will freeze the error, preventing any correct engine from\\n * adding or\\n * altering any of the error's own properties `sanitizeError` is done.\\n *\\n * However, `sanitizeError` will not, for example, `harden`\\n * (i.e., deeply freeze)\\n * or ensure that the `cause` or `errors` property satisfy the `Passable`\\n * constraints. The purpose of `sanitizeError` is only to protect against\\n * mischief the host may have already added to the error as created,\\n * not to ensure that the error is actually Passable. For that,\\n * see `toPassableError` in `@endo/pass-style`.\\n *\\n * @param {Error} error\\n */\\nconst sanitizeError=(error)=>{\\nconst descs=commons.getOwnPropertyDescriptors(error);\\nconst{\\nname:_nameDesc,\\nmessage:_messageDesc,\\nerrors:_errorsDesc=undefined,\\ncause:_causeDesc=undefined,\\nstack:_stackDesc=undefined,\\n...restDescs}=\\ndescs;\\n\\nconst restNames=commons.ownKeys(restDescs);\\nif(restNames.length>=1){\\nfor(const name of restNames){\\ndelete error[name];}\\n\\nconst droppedNote=commons.create(commons.objectPrototype,restDescs);\\n/* eslint-disable-next-line no-use-before-define*/\\nnote(\\nerror,\\nredactedDetails`originally with properties ${quote(droppedNote)}`);}\\n\\n\\nfor(const name of commons.ownKeys(error)){\\n/* @ts-expect-error TS still confused by symbols as property names*/\\nconst desc=descs[name];\\nif(desc&&commons.objectHasOwnProperty(desc,'get')){\\ncommons.defineProperty(error,name,{\\nvalue:error[name]/* invoke the getter to convert to data property*/});}}\\n\\n\\n\\ncommons.freeze(error);};\\n\\n\\n/**\\n * @type {AssertionUtilities['error']}\\n */\\nconst makeError=(\\noptDetails=redactedDetails`Assert failed`,\\nerrConstructor=commons.globalThis.Error,\\n{\\nerrorName=undefined,\\ncause=undefined,\\nerrors=undefined,\\nsanitize=true}=\\n{})=>\\n{\\nif(typeof optDetails==='string'){\\n/* If it is a string, use it as the literal part of the template so*/\\n/* it doesn't get quoted.*/\\noptDetails=redactedDetails([optDetails]);}\\n\\nconst hiddenDetails=commons.weakmapGet(hiddenDetailsMap,optDetails);\\nif(hiddenDetails===undefined){\\nthrow commons.TypeError(`unrecognized details ${quote(optDetails)}`);}\\n\\nconst messageString=getMessageString(hiddenDetails);\\nconst opts=cause&&{cause};\\nlet error;\\nif(\\ntypeof commons.AggregateError!=='undefined'&&\\nerrConstructor===commons.AggregateError)\\n{\\nerror=commons.AggregateError(errors||[],messageString,opts);}else\\n{\\nerror=/** @type {ErrorConstructor} */errConstructor(\\nmessageString,\\nopts);\\n\\nif(errors!==undefined){\\n/* Since we need to tolerate `errors` on an AggregateError, may as*/\\n/* well tolerate it on all errors.*/\\ncommons.defineProperty(error,'errors',{\\nvalue:errors,\\nwritable:true,\\nenumerable:false,\\nconfigurable:true});}}\\n\\n\\n\\ncommons.weakmapSet(hiddenMessageLogArgs,error,getLogArgs(hiddenDetails));\\nif(errorName!==undefined){\\ntagError(error,errorName);}\\n\\nif(sanitize){\\nsanitizeError(error);}\\n\\n/* The next line is a particularly fruitful place to put a breakpoint.*/\\nreturn error;};\\n\\ncommons.freeze(makeError);\\n\\n/* /////////////////////////////////////////////////////////////////////////////*/\\n\\nconst{addLogArgs,takeLogArgsArray}=noteLogArgs.makeNoteLogArgsArrayKit();\\n\\n/**\\n * @type {WeakMap<Error, NoteCallback[]>}\\n *\\n * An augmented console will normally only take the hidden noteArgs array once,\\n * when it logs the error being annotated. Once that happens, further\\n * annotations of that error should go to the console immediately. We arrange\\n * that by accepting a note-callback function from the console as an optional\\n * part of that taking operation. Normally there will only be at most one\\n * callback per error, but that depends on console behavior which we should not\\n * assume. We make this an array of callbacks so multiple registrations\\n * are independent.\\n */\\nconst hiddenNoteCallbackArrays=new commons.WeakMap();\\n\\n/** @type {AssertionUtilities['note']} */\\nconst note=(error,detailsNote)=>{\\nif(typeof detailsNote==='string'){\\n/* If it is a string, use it as the literal part of the template so*/\\n/* it doesn't get quoted.*/\\ndetailsNote=redactedDetails([detailsNote]);}\\n\\nconst hiddenDetails=commons.weakmapGet(hiddenDetailsMap,detailsNote);\\nif(hiddenDetails===undefined){\\nthrow commons.TypeError(`unrecognized details ${quote(detailsNote)}`);}\\n\\nconst logArgs=getLogArgs(hiddenDetails);\\nconst callbacks=commons.weakmapGet(hiddenNoteCallbackArrays,error);\\nif(callbacks!==undefined){\\nfor(const callback of callbacks){\\ncallback(error,logArgs);}}else\\n\\n{\\naddLogArgs(error,logArgs);}};\\n\\n\\ncommons.freeze(note);\\n\\n/**\\n * The unprivileged form that just uses the de facto `error.stack` property.\\n * The start compartment normally has a privileged `globalThis.getStackString`\\n * which should be preferred if present.\\n *\\n * @param {Error} error\\n * @returns {string}\\n */\\nconst defaultGetStackString=(error)=>{\\nif(!('stack'in error)){\\nreturn'';}\\n\\nconst stackString=`${error.stack}`;\\nconst pos=commons.stringIndexOf(stackString,'\\\\n');\\nif(commons.stringStartsWith(stackString,' ')||pos===-1){\\nreturn stackString;}\\n\\nreturn commons.stringSlice(stackString,pos+1);/* exclude the initial newline*/};\\n\\n\\n/** @type {LoggedErrorHandler} */\\nconst loggedErrorHandler={\\ngetStackString:commons.globalThis.getStackString||defaultGetStackString,\\ntagError:(error)=>tagError(error),\\nresetErrorTagNum:()=>{\\nerrorTagNum=0;},\\n\\ngetMessageLogArgs:(error)=>commons.weakmapGet(hiddenMessageLogArgs,error),\\ntakeMessageLogArgs:(error)=>{\\nconst result=commons.weakmapGet(hiddenMessageLogArgs,error);\\ncommons.weakmapDelete(hiddenMessageLogArgs,error);\\nreturn result;},\\n\\ntakeNoteLogArgsArray:(error,callback)=>{\\nconst result=takeLogArgsArray(error);\\nif(callback!==undefined){\\nconst callbacks=commons.weakmapGet(hiddenNoteCallbackArrays,error);\\nif(callbacks){\\ncommons.arrayPush(callbacks,callback);}else\\n{\\ncommons.weakmapSet(hiddenNoteCallbackArrays,error,[callback]);}}\\n\\n\\nreturn result||[];}};\\n\\n\\ncommons.freeze(loggedErrorHandler);\\n\\n\\n/* /////////////////////////////////////////////////////////////////////////////*/\\n\\n/**\\n * @type {MakeAssert}\\n */\\nconst makeAssert=(optRaise=undefined,unredacted=false)=>{\\nconst details=unredacted?unredactedDetails:redactedDetails;\\nconst assertFailedDetails=details`Check failed`;\\n\\n/** @type {AssertionFunctions['fail']} */\\nconst fail=(\\noptDetails=assertFailedDetails,\\nerrConstructor=undefined,\\noptions=undefined)=>\\n{\\nconst reason=makeError(optDetails,errConstructor,options);\\nif(optRaise!==undefined){\\n/* @ts-ignore returns `never` doesn't mean it isn't callable*/\\noptRaise(reason);}\\n\\nthrow reason;};\\n\\ncommons.freeze(fail);\\n\\n/** @type {AssertionUtilities['Fail']} */\\nconst Fail=(template,...args)=>fail(details(template,...args));\\n\\n/* Don't freeze or export `baseAssert` until we add methods.*/\\n/* TODO If I change this from a `function` function to an arrow*/\\n/* function, I seem to get type errors from TypeScript. Why?*/\\n/** @type {BaseAssert} */\\nfunction baseAssert(\\nflag,\\noptDetails=undefined,\\nerrConstructor=undefined,\\noptions=undefined)\\n{\\nflag||fail(optDetails,errConstructor,options);}\\n\\n\\n/** @type {AssertionFunctions['equal']} */\\nconst equal=(\\nactual,\\nexpected,\\noptDetails=undefined,\\nerrConstructor=undefined,\\noptions=undefined)=>\\n{\\ncommons.is(actual,expected)||\\nfail(\\noptDetails||details`Expected ${actual} is same as ${expected}`,\\nerrConstructor||commons.RangeError,\\noptions);};\\n\\n\\ncommons.freeze(equal);\\n\\n/** @type {AssertionFunctions['typeof']} */\\nconst assertTypeof=(specimen,typename,optDetails)=>{\\n/* This will safely fall through if typename is not a string,*/\\n/* which is what we want.*/\\n/* eslint-disable-next-line valid-typeof*/\\nif(typeof specimen===typename){\\nreturn;}\\n\\ntypeof typename==='string'||Fail`${quote(typename)} must be a string`;\\n\\nif(optDetails===undefined){\\n/* Embed the type phrase without quotes.*/\\nconst typeWithDeterminer=stringifyUtils.an(typename);\\noptDetails=details`${specimen} must be ${bare(typeWithDeterminer)}`;}\\n\\nfail(optDetails,commons.TypeError);};\\n\\ncommons.freeze(assertTypeof);\\n\\n/** @type {AssertionFunctions['string']} */\\nconst assertString=(specimen,optDetails=undefined)=>\\nassertTypeof(specimen,'string',optDetails);\\n\\n/* Note that \\\"assert === baseAssert\\\"*/\\n/** @type {Assert} */\\nconst assert=commons.assign(baseAssert,{\\nerror:makeError,\\nfail,\\nequal,\\ntypeof:assertTypeof,\\nstring:assertString,\\nnote,\\ndetails,\\nFail,\\nquote,\\nbare,\\nmakeAssert});\\n\\nreturn commons.freeze(assert);};\\n\\ncommons.freeze(makeAssert);\\n\\n\\n/** @type {Assert} */\\nconst assert=makeAssert();\\n\\n\\n/* Internal, to obviate polymorphic dispatch, but may become rigorously*/\\n/* consistent with @endo/error:*/\\n\\n/** @type {AssertionFunctions['equal']} */\\nconst assertEqual=assert.equal;exports.X=redactedDetails;exports.annotateError=note;exports.assert=assert;exports.assertEqual=assertEqual;exports.b=bare;exports.loggedErrorHandler=loggedErrorHandler;exports.makeAssert=makeAssert;exports.makeError=makeError;exports.q=quote;exports.sanitizeError=sanitizeError;exports.unredactedDetails=unredactedDetails;\",\n \"node_modules/ses/src/error/console.js\": \"'use strict';Object.defineProperty(exports,'__esModule',{value:true});var commons=require('../commons.js');require('./types.js');\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\nrequire('./internal-types.js');/* @ts-check*/ /* For our internal debugging purposes, uncomment*/ /* const internalDebugConsole = console;*/ /* The whitelists of console methods, from:*/ /* Whatwg \\\"living standard\\\" https://console.spec.whatwg.org/*/ /* Node https://nodejs.org/dist/latest-v14.x/docs/api/console.html*/ /* MDN https://developer.mozilla.org/en-US/docs/Web/API/Console_API*/ /* TypeScript https://openstapps.gitlab.io/projectmanagement/interfaces/_node_modules__types_node_globals_d_.console.html*/ /* Chrome https://developers.google.com/web/tools/chrome-devtools/console/api*/ /* All console level methods have parameters (fmt?, ...args)*/ /* where the argument sequence `fmt?, ...args` formats args according to*/ /* fmt if fmt is a format string. Otherwise, it just renders them all as values*/ /* separated by spaces.*/ /* https://console.spec.whatwg.org/#formatter*/ /* https://nodejs.org/docs/latest/api/util.html#util_util_format_format_args*/ /* For the causal console, all occurrences of `fmt, ...args` or `...args` by*/ /* itself must check for the presence of an error to ask the*/ /* `loggedErrorHandler` to handle.*/ /* In theory we should do a deep inspection to detect for example an array*/ /* containing an error. We currently do not detect these and may never.*/ /** @typedef {keyof VirtualConsole | 'profile' | 'profileEnd'} ConsoleProps */ /**\\n * Those console methods whose actual parameters are `(fmt?, ...args)`\\n * even if their TypeScript types claim otherwise.\\n *\\n * Each is paired with what we consider to be their log severity level.\\n * This is the same as the log severity of these on other\\n * platform console implementations when they all agree.\\n *\\n * @type {readonly [ConsoleProps, LogSeverity | undefined][]}\\n */\\nconst consoleLevelMethods=commons.freeze([\\n['debug','debug'],/* (fmt?, ...args) verbose level on Chrome*/\\n['log','log'],/* (fmt?, ...args) info level on Chrome*/\\n['info','info'],/* (fmt?, ...args)*/\\n['warn','warn'],/* (fmt?, ...args)*/\\n['error','error'],/* (fmt?, ...args)*/\\n\\n['trace','log'],/* (fmt?, ...args)*/\\n['dirxml','log'],/* (fmt?, ...args) but TS typed (...data)*/\\n['group','log'],/* (fmt?, ...args) but TS typed (...label)*/\\n['groupCollapsed','log']/* (fmt?, ...args) but TS typed (...label)*/]);\\n\\n\\n/**\\n * Those console methods other than those already enumerated by\\n * `consoleLevelMethods`.\\n *\\n * Each is paired with what we consider to be their log severity level.\\n * This is the same as the log severity of these on other\\n * platform console implementations when they all agree.\\n *\\n * @type {readonly [ConsoleProps, LogSeverity | undefined][]}\\n */\\nconst consoleOtherMethods=commons.freeze([\\n['assert','error'],/* (value, fmt?, ...args)*/\\n['timeLog','log'],/* (label?, ...args) no fmt string*/\\n\\n/* Insensitive to whether any argument is an error. All arguments can pass*/\\n/* thru to baseConsole as is.*/\\n['clear',undefined],/* ()*/\\n['count','info'],/* (label?)*/\\n['countReset',undefined],/* (label?)*/\\n['dir','log'],/* (item, options?)*/\\n['groupEnd','log'],/* ()*/\\n/* In theory tabular data may be or contain an error. However, we currently*/\\n/* do not detect these and may never.*/\\n['table','log'],/* (tabularData, properties?)*/\\n['time','info'],/* (label?)*/\\n['timeEnd','info'],/* (label?)*/\\n\\n/* Node Inspector only, MDN, and TypeScript, but not whatwg*/\\n['profile',undefined],/* (label?)*/\\n['profileEnd',undefined],/* (label?)*/\\n['timeStamp',undefined]/* (label?)*/]);\\n\\n\\n/** @type {readonly [ConsoleProps, LogSeverity | undefined][]} */\\nconst consoleWhitelist=commons.freeze([\\n...consoleLevelMethods,\\n...consoleOtherMethods]);\\n\\n\\n/**\\n * consoleOmittedProperties is currently unused. I record and maintain it here\\n * with the intention that it be treated like the `false` entries in the main\\n * SES whitelist: that seeing these on the original console is expected, but\\n * seeing anything else that's outside the whitelist is surprising and should\\n * provide a diagnostic.\\n *\\n * const consoleOmittedProperties = freeze([\\n * 'memory', // Chrome\\n * 'exception', // FF, MDN\\n * '_ignoreErrors', // Node\\n * '_stderr', // Node\\n * '_stderrErrorHandler', // Node\\n * '_stdout', // Node\\n * '_stdoutErrorHandler', // Node\\n * '_times', // Node\\n * 'context', // Chrome, Node\\n * 'record', // Safari\\n * 'recordEnd', // Safari\\n *\\n * 'screenshot', // Safari\\n * // Symbols\\n * '@@toStringTag', // Chrome: \\\"Object\\\", Safari: \\\"Console\\\"\\n * // A variety of other symbols also seen on Node\\n * ]);\\n */\\n\\n/* //////////////////////////// Logging Console ////////////////////////////////*/\\n\\n/** @type {MakeLoggingConsoleKit} */\\nconst makeLoggingConsoleKit=(\\nloggedErrorHandler,\\n{shouldResetForDebugging=false}={})=>\\n{\\nif(shouldResetForDebugging){\\n/* eslint-disable-next-line @endo/no-polymorphic-call*/\\nloggedErrorHandler.resetErrorTagNum();}\\n\\n\\n/* Not frozen!*/\\nlet logArray=[];\\n\\nconst loggingConsole=commons.fromEntries(\\ncommons.arrayMap(consoleWhitelist,([name,_])=>{\\n/* Use an arrow function so that it doesn't come with its own name in*/\\n/* its printed form. Instead, we're hoping that tooling uses only*/\\n/* the `.name` property set below.*/\\n/**\\n * @param {...any} args\\n */\\nconst method=(...args)=>{\\ncommons.arrayPush(logArray,[name,...args]);};\\n\\ncommons.defineProperty(method,'name',{value:name});\\nreturn[name,commons.freeze(method)];}));\\n\\n\\ncommons.freeze(loggingConsole);\\n\\nconst takeLog=()=>{\\nconst result=commons.freeze(logArray);\\nlogArray=[];\\nreturn result;};\\n\\ncommons.freeze(takeLog);\\n\\nconst typedLoggingConsole=/** @type {VirtualConsole} */loggingConsole;\\n\\nreturn commons.freeze({loggingConsole:typedLoggingConsole,takeLog});};\\n\\ncommons.freeze(makeLoggingConsoleKit);\\n\\n/**\\n * Makes the same calls on a `baseConsole` that were made on a\\n * `loggingConsole` to produce this `log`. In this way, a logging console\\n * can be used as a buffer to delay the application of these calls to a\\n * `baseConsole`.\\n *\\n * @param {LogRecord[]} log\\n * @param {VirtualConsole} baseConsole\\n */\\nconst pumpLogToConsole=(log,baseConsole)=>{\\nfor(const[name,...args]of log){\\n/* eslint-disable-next-line @endo/no-polymorphic-call*/\\nbaseConsole[name](...args);}};\\n\\n\\n/* //////////////////////////// Causal Console /////////////////////////////////*/\\n\\n/** @type {ErrorInfo} */\\nconst ErrorInfo={\\nNOTE:'ERROR_NOTE:',\\nMESSAGE:'ERROR_MESSAGE:',\\nCAUSE:'cause:',\\nERRORS:'errors:'};\\n\\ncommons.freeze(ErrorInfo);\\n\\n/** @type {MakeCausalConsole} */\\nconst makeCausalConsole=(baseConsole,loggedErrorHandler)=>{\\nif(!baseConsole){\\nreturn undefined;}\\n\\n\\nconst{getStackString,tagError,takeMessageLogArgs,takeNoteLogArgsArray}=\\nloggedErrorHandler;\\n\\n/**\\n * @param {ReadonlyArray<any>} logArgs\\n * @param {Array<any>} subErrorsSink\\n * @returns {any}\\n */\\nconst extractErrorArgs=(logArgs,subErrorsSink)=>{\\nconst argTags=commons.arrayMap(logArgs,(arg)=>{\\nif(commons.isError(arg)){\\ncommons.arrayPush(subErrorsSink,arg);\\nreturn`(${tagError(arg)})`;}\\n\\nreturn arg;});\\n\\nreturn argTags;};\\n\\n\\n/**\\n * @param {LogSeverity} severity\\n * @param {Error} error\\n * @param {ErrorInfoKind} kind\\n * @param {readonly any[]} logArgs\\n * @param {Array<Error>} subErrorsSink\\n */\\nconst logErrorInfo=(severity,error,kind,logArgs,subErrorsSink)=>{\\nconst errorTag=tagError(error);\\nconst errorName=\\nkind===ErrorInfo.MESSAGE?`${errorTag}:`:`${errorTag} ${kind}`;\\nconst argTags=extractErrorArgs(logArgs,subErrorsSink);\\n/* eslint-disable-next-line @endo/no-polymorphic-call*/\\nbaseConsole[severity](errorName,...argTags);};\\n\\n\\n/**\\n * Logs the `subErrors` within a group name mentioning `optTag`.\\n *\\n * @param {LogSeverity} severity\\n * @param {Error[]} subErrors\\n * @param {string | undefined} optTag\\n * @returns {void}\\n */\\nconst logSubErrors=(severity,subErrors,optTag=undefined)=>{\\nif(subErrors.length===0){\\nreturn;}\\n\\nif(subErrors.length===1&&optTag===undefined){\\n/* eslint-disable-next-line no-use-before-define*/\\nlogError(severity,subErrors[0]);\\nreturn;}\\n\\nlet label;\\nif(subErrors.length===1){\\nlabel=`Nested error`;}else\\n{\\nlabel=`Nested ${subErrors.length} errors`;}\\n\\nif(optTag!==undefined){\\nlabel=`${label} under ${optTag}`;}\\n\\n/* eslint-disable-next-line @endo/no-polymorphic-call*/\\nbaseConsole.group(label);\\ntry{\\nfor(const subError of subErrors){\\n/* eslint-disable-next-line no-use-before-define*/\\nlogError(severity,subError);}}finally\\n\\n{\\n/* eslint-disable-next-line @endo/no-polymorphic-call*/\\nbaseConsole.groupEnd();}};\\n\\n\\n\\nconst errorsLogged=new commons.WeakSet();\\n\\n/** @type {(severity: LogSeverity) => NoteCallback} */\\nconst makeNoteCallback=(severity)=>(error,noteLogArgs)=>{\\nconst subErrors=[];\\n/* Annotation arrived after the error has already been logged,*/\\n/* so just log the annotation immediately, rather than remembering it.*/\\nlogErrorInfo(severity,error,ErrorInfo.NOTE,noteLogArgs,subErrors);\\nlogSubErrors(severity,subErrors,tagError(error));};\\n\\n\\n/**\\n * @param {LogSeverity} severity\\n * @param {Error} error\\n */\\nconst logError=(severity,error)=>{\\nif(commons.weaksetHas(errorsLogged,error)){\\nreturn;}\\n\\nconst errorTag=tagError(error);\\ncommons.weaksetAdd(errorsLogged,error);\\nconst subErrors=[];\\nconst messageLogArgs=takeMessageLogArgs(error);\\nconst noteLogArgsArray=takeNoteLogArgsArray(\\nerror,\\nmakeNoteCallback(severity));\\n\\n/* Show the error's most informative error message*/\\nif(messageLogArgs===undefined){\\n/* If there is no message log args, then just show the message that*/\\n/* the error itself carries.*/\\n/* eslint-disable-next-line @endo/no-polymorphic-call*/\\nbaseConsole[severity](`${errorTag}:`,error.message);}else\\n{\\n/* If there is one, we take it to be strictly more informative than the*/\\n/* message string carried by the error, so show it *instead*.*/\\nlogErrorInfo(\\nseverity,\\nerror,\\nErrorInfo.MESSAGE,\\nmessageLogArgs,\\nsubErrors);}\\n\\n\\n/* After the message but before any other annotations, show the stack.*/\\nlet stackString=getStackString(error);\\nif(\\ntypeof stackString==='string'&&\\nstackString.length>=1&&\\n!commons.stringEndsWith(stackString,'\\\\n'))\\n{\\nstackString+='\\\\n';}\\n\\n/* eslint-disable-next-line @endo/no-polymorphic-call*/\\nbaseConsole[severity](stackString);\\n/* Show the other annotations on error*/\\nif(error.cause){\\nlogErrorInfo(severity,error,ErrorInfo.CAUSE,[error.cause],subErrors);}\\n\\n/* @ts-expect-error AggregateError has an `errors` property.*/\\nif(error.errors){\\n/* @ts-expect-error AggregateError has an `errors` property.*/\\nlogErrorInfo(severity,error,ErrorInfo.ERRORS,error.errors,subErrors);}\\n\\nfor(const noteLogArgs of noteLogArgsArray){\\nlogErrorInfo(severity,error,ErrorInfo.NOTE,noteLogArgs,subErrors);}\\n\\n/* explain all the errors seen in the messages already emitted.*/\\nlogSubErrors(severity,subErrors,errorTag);};\\n\\n\\nconst levelMethods=commons.arrayMap(consoleLevelMethods,([level,_])=>{\\n/**\\n * @param {...any} logArgs\\n */\\nconst levelMethod=(...logArgs)=>{\\nconst subErrors=[];\\nconst argTags=extractErrorArgs(logArgs,subErrors);\\n/* eslint-disable-next-line @endo/no-polymorphic-call*/\\nbaseConsole[level](...argTags);\\n/* @ts-expect-error ConsoleProp vs LogSeverity mismatch*/\\nlogSubErrors(level,subErrors);};\\n\\ncommons.defineProperty(levelMethod,'name',{value:level});\\nreturn[level,commons.freeze(levelMethod)];});\\n\\nconst otherMethodNames=commons.arrayFilter(\\nconsoleOtherMethods,\\n([name,_])=>name in baseConsole);\\n\\nconst otherMethods=commons.arrayMap(otherMethodNames,([name,_])=>{\\n/**\\n * @param {...any} args\\n */\\nconst otherMethod=(...args)=>{\\n/* @ts-ignore*/\\n/* eslint-disable-next-line @endo/no-polymorphic-call*/\\nbaseConsole[name](...args);\\nreturn undefined;};\\n\\ncommons.defineProperty(otherMethod,'name',{value:name});\\nreturn[name,commons.freeze(otherMethod)];});\\n\\n\\nconst causalConsole=commons.fromEntries([...levelMethods,...otherMethods]);\\nreturn(/** @type {VirtualConsole} */commons.freeze(causalConsole));};\\n\\ncommons.freeze(makeCausalConsole);\\n\\n/**\\n * @typedef {(...args: unknown[]) => void} Logger\\n */\\n\\n/**\\n * This is a rather horrible kludge to indent the output to a logger in\\n * the case where some arguments are strings containing newlines. Part of\\n * the problem is that console-like loggers, including the one in ava,\\n * join the string arguments of the log message with a space.\\n * Because of this, there's an extra space at the beginning of each of\\n * the split lines. So this kludge compensated by putting an extra empty\\n * string at the beginning, so that the logger will add the same extra\\n * joiner.\\n * TODO: Fix this horrible kludge, and indent in a sane manner.\\n *\\n * @param {string} str\\n * @param {string} sep\\n * @param {string[]} indents\\n * @returns {string[]}\\n */\\nconst indentAfterAllSeps=(str,sep,indents)=>{\\nconst[firstLine,...restLines]=commons.stringSplit(str,sep);\\nconst indentedRest=commons.arrayFlatMap(restLines,(line)=>[sep,...indents,line]);\\nreturn['',firstLine,...indentedRest];};\\n\\n\\n/**\\n * @param {LoggedErrorHandler} loggedErrorHandler\\n */\\nconst defineCausalConsoleFromLogger=(loggedErrorHandler)=>{\\n/**\\n * Implement the `VirtualConsole` API badly by turning all calls into\\n * calls on `tlogger`. We need to do this to have `console` logging\\n * turn into calls to Ava's `t.log`, so these console log messages\\n * are output in the right place.\\n *\\n * @param {Logger} tlogger\\n * @returns {VirtualConsole}\\n */\\nconst makeCausalConsoleFromLogger=(tlogger)=>{\\nconst indents=[];\\nconst logWithIndent=(...args)=>{\\nif(indents.length>0){\\nargs=commons.arrayFlatMap(args,(arg)=>\\ntypeof arg==='string'&&commons.stringIncludes(arg,'\\\\n')?\\nindentAfterAllSeps(arg,'\\\\n',indents):\\n[arg]);\\n\\nargs=[...indents,...args];}\\n\\nreturn tlogger(...args);};\\n\\nconst makeNamed=(name,fn)=>\\n({[name]:(...args)=>fn(...args)})[name];\\n\\nconst baseConsole=commons.fromEntries([\\n...commons.arrayMap(consoleLevelMethods,([name])=>[\\nname,\\nmakeNamed(name,logWithIndent)]),\\n\\n...commons.arrayMap(consoleOtherMethods,([name])=>[\\nname,\\nmakeNamed(name,(...args)=>logWithIndent(name,...args))])]);\\n\\n\\n/* https://console.spec.whatwg.org/#grouping*/\\nfor(const name of['group','groupCollapsed']){\\nif(baseConsole[name]){\\nbaseConsole[name]=makeNamed(name,(...args)=>{\\nif(args.length>=1){\\n/* Prefix the logged data with \\\"group\\\" or \\\"groupCollapsed\\\".*/\\nlogWithIndent(...args);}\\n\\n/* A single space is enough;*/\\n/* the host console will separate them with additional spaces.*/\\ncommons.arrayPush(indents,' ');});}}\\n\\n\\n\\nif(baseConsole.groupEnd){\\nbaseConsole.groupEnd=makeNamed('groupEnd',(...args)=>{\\ncommons.arrayPop(indents);});}\\n\\n\\nharden(baseConsole);\\nconst causalConsole=makeCausalConsole(\\n/** @type {VirtualConsole} */baseConsole,\\nloggedErrorHandler);\\n\\nreturn(/** @type {VirtualConsole} */causalConsole);};\\n\\nreturn commons.freeze(makeCausalConsoleFromLogger);};\\n\\ncommons.freeze(defineCausalConsoleFromLogger);\\n\\n/* ///////////////////////// Filter Console ////////////////////////////////////*/\\n\\n/** @type {FilterConsole} */\\nconst filterConsole=(baseConsole,filter,_topic=undefined)=>{\\n/* TODO do something with optional topic string*/\\nconst whitelist=commons.arrayFilter(\\nconsoleWhitelist,\\n([name,_])=>name in baseConsole);\\n\\nconst methods=commons.arrayMap(whitelist,([name,severity])=>{\\n/**\\n * @param {...any} args\\n */\\nconst method=(...args)=>{\\n/* eslint-disable-next-line @endo/no-polymorphic-call*/\\nif(severity===undefined||filter.canLog(severity)){\\n/* @ts-ignore*/\\n/* eslint-disable-next-line @endo/no-polymorphic-call*/\\nbaseConsole[name](...args);}};\\n\\n\\nreturn[name,commons.freeze(method)];});\\n\\nconst filteringConsole=commons.fromEntries(methods);\\nreturn(/** @type {VirtualConsole} */commons.freeze(filteringConsole));};\\n\\ncommons.freeze(filterConsole);exports.consoleLevelMethods=consoleLevelMethods;exports.consoleOtherMethods=consoleOtherMethods;exports.defineCausalConsoleFromLogger=defineCausalConsoleFromLogger;exports.filterConsole=filterConsole;exports.makeCausalConsole=makeCausalConsole;exports.makeLoggingConsoleKit=makeLoggingConsoleKit;exports.pumpLogToConsole=pumpLogToConsole;\",\n \"node_modules/ses/src/error/internal-types.js\": \"\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n'use strict';/* @ts-check*/ /**\\n * @typedef {readonly any[]} LogArgs\\n *\\n * This is an array suitable to be used as arguments of a console\\n * level message *after* the format string argument. It is the result of\\n * a `details` template string and consists of alternating literal strings\\n * and substitution values, starting with a literal string. At least that\\n * first literal string is always present.\\n */ /**\\n * @callback NoteCallback\\n *\\n * @param {Error} error\\n * @param {LogArgs} noteLogArgs\\n * @returns {void}\\n */ /**\\n * @callback GetStackString\\n * @param {Error} error\\n * @returns {string=}\\n */ /**\\n * @typedef {object} LoggedErrorHandler\\n *\\n * Used to parameterize `makeCausalConsole` to give it access to potentially\\n * hidden information to augment the logging of errors.\\n *\\n * @property {GetStackString} getStackString\\n * @property {(error: Error) => string} tagError\\n * @property {() => void} resetErrorTagNum for debugging purposes only\\n * @property {(error: Error) => (LogArgs | undefined)} getMessageLogArgs\\n * @property {(error: Error) => (LogArgs | undefined)} takeMessageLogArgs\\n * @property {(error: Error, callback?: NoteCallback) => LogArgs[] } takeNoteLogArgsArray\\n */ /* /////////////////////////////////////////////////////////////////////////////*/ /**\\n * @typedef {readonly [string, ...any[]]} LogRecord\\n */ /**\\n * @typedef {object} LoggingConsoleKit\\n * @property {VirtualConsole} loggingConsole\\n * @property {() => readonly LogRecord[]} takeLog\\n */ /**\\n * @typedef {object} MakeLoggingConsoleKitOptions\\n * @property {boolean=} shouldResetForDebugging\\n */ /**\\n * @callback MakeLoggingConsoleKit\\n *\\n * A logging console just accumulates the contents of all whitelisted calls,\\n * making them available to callers of `takeLog()`. Calling `takeLog()`\\n * consumes these, so later calls to `takeLog()` will only provide a log of\\n * calls that have happened since then.\\n *\\n * @param {LoggedErrorHandler} loggedErrorHandler\\n * @param {MakeLoggingConsoleKitOptions=} options\\n * @returns {LoggingConsoleKit}\\n */ /**\\n * @typedef {{\\n * NOTE: 'ERROR_NOTE:',\\n * MESSAGE: 'ERROR_MESSAGE:',\\n * CAUSE: 'cause:',\\n * ERRORS: 'errors:',\\n * }} ErrorInfo\\n */ /**\\n * @typedef {ErrorInfo[keyof ErrorInfo]} ErrorInfoKind\\n */ /**\\n * @callback MakeCausalConsole\\n *\\n * Makes a causal console wrapper of a `baseConsole`, where the causal console\\n * calls methods of the `loggedErrorHandler` to customize how it handles logged\\n * errors.\\n *\\n * @param {VirtualConsole | undefined} baseConsole\\n * @param {LoggedErrorHandler} loggedErrorHandler\\n * @returns {VirtualConsole | undefined}\\n */\",\n \"node_modules/ses/src/error/note-log-args.js\": \"'use strict';Object.defineProperty(exports,'__esModule',{value:true});var makeLruCachemap=require('../make-lru-cachemap.js');require('./internal-types.js');/* @ts-check*/\\n\\n\\n\\n\\n\\n\\nconst{freeze}=Object;\\nconst{isSafeInteger}=Number;\\n\\nconst defaultLoggedErrorsBudget=1000;\\nconst defaultArgsPerErrorBudget=100;\\n\\n/**\\n * @param {number} [errorsBudget]\\n * @param {number} [argsPerErrorBudget]\\n */\\nconst makeNoteLogArgsArrayKit=(\\nerrorsBudget=defaultLoggedErrorsBudget,\\nargsPerErrorBudget=defaultArgsPerErrorBudget)=>\\n{\\nif(!isSafeInteger(argsPerErrorBudget)||argsPerErrorBudget<1){\\nthrow TypeError(\\n'argsPerErrorBudget must be a safe positive integer number');}\\n\\n\\n\\n/**\\n * @type {WeakMap<Error, LogArgs[]>}\\n *\\n * Maps from an error to an array of log args, where each log args is\\n * remembered as an annotation on that error. This can be used, for example,\\n * to keep track of additional causes of the error. The elements of any\\n * log args may include errors which are associated with further annotations.\\n * An augmented console, like the causal console of `console.js`, could\\n * then retrieve the graph of such annotations.\\n */\\nconst noteLogArgsArrayMap=makeLruCachemap.makeLRUCacheMap(errorsBudget);\\n\\n/**\\n * @param {Error} error\\n * @param {LogArgs} logArgs\\n */\\nconst addLogArgs=(error,logArgs)=>{\\nconst logArgsArray=noteLogArgsArrayMap.get(error);\\nif(logArgsArray!==undefined){\\nif(logArgsArray.length>=argsPerErrorBudget){\\nlogArgsArray.shift();}\\n\\nlogArgsArray.push(logArgs);}else\\n{\\nnoteLogArgsArrayMap.set(error,[logArgs]);}};\\n\\n\\nfreeze(addLogArgs);\\n\\n/**\\n * @param {Error} error\\n * @returns {LogArgs[] | undefined}\\n */\\nconst takeLogArgsArray=(error)=>{\\nconst result=noteLogArgsArrayMap.get(error);\\nnoteLogArgsArrayMap.delete(error);\\nreturn result;};\\n\\nfreeze(takeLogArgsArray);\\n\\nreturn freeze({\\naddLogArgs,\\ntakeLogArgsArray});};\\n\\n\\nfreeze(makeNoteLogArgsArrayKit);exports.makeNoteLogArgsArrayKit=makeNoteLogArgsArrayKit;\",\n \"node_modules/ses/src/error/stringify-utils.js\": \"'use strict';Object.defineProperty(exports,'__esModule',{value:true});var\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\ncommons=require('../commons.js');/* @ts-check*/ /** @import {StringablePayload} from '../../types.js' */ /**\\n * Joins English terms with commas and an optional conjunction.\\n *\\n * @param {(string | StringablePayload)[]} terms\\n * @param {\\\"and\\\" | \\\"or\\\"} conjunction\\n */\\nconst enJoin=(terms,conjunction)=>{\\nif(terms.length===0){\\nreturn'(none)';}else\\nif(terms.length===1){\\nreturn terms[0];}else\\nif(terms.length===2){\\nconst[first,second]=terms;\\nreturn`${first} ${conjunction} ${second}`;}else\\n{\\nreturn`${commons.arrayJoin(commons.arraySlice(terms,0,-1),', ')}, ${conjunction} ${\\nterms[terms.length-1]\\n}`;}};\\n\\n\\n\\n/**\\n * Prepend the correct indefinite article onto a noun, typically a typeof\\n * result, e.g., \\\"an object\\\" vs. \\\"a number\\\"\\n *\\n * @param {string} str The noun to prepend\\n * @returns {string} The noun prepended with a/an\\n */\\nconst an=(str)=>{\\nstr=`${str}`;\\nif(str.length>=1&&commons.stringIncludes('aeiouAEIOU',str[0])){\\nreturn`an ${str}`;}\\n\\nreturn`a ${str}`;};\\n\\ncommons.freeze(an);\\n\\n\\n/**\\n * Like `JSON.stringify` but does not blow up if given a cycle or a bigint.\\n * This is not\\n * intended to be a serialization to support any useful unserialization,\\n * or any programmatic use of the resulting string. The string is intended\\n * *only* for showing a human under benign conditions, in order to be\\n * informative enough for some\\n * logging purposes. As such, this `bestEffortStringify` has an\\n * imprecise specification and may change over time.\\n *\\n * The current `bestEffortStringify` possibly emits too many \\\"seen\\\"\\n * markings: Not only for cycles, but also for repeated subtrees by\\n * object identity.\\n *\\n * As a best effort only for diagnostic interpretation by humans,\\n * `bestEffortStringify` also turns various cases that normal\\n * `JSON.stringify` skips or errors on, like `undefined` or bigints,\\n * into strings that convey their meaning. To distinguish this from\\n * strings in the input, these synthesized strings always begin and\\n * end with square brackets. To distinguish those strings from an\\n * input string with square brackets, and input string that starts\\n * with an open square bracket `[` is itself placed in square brackets.\\n *\\n * @param {any} payload\\n * @param {(string|number)=} spaces\\n * @returns {string}\\n */\\nconst bestEffortStringify=(payload,spaces=undefined)=>{\\nconst seenSet=new commons.Set();\\nconst replacer=(_,val)=>{\\nswitch(typeof val){\\ncase'object':{\\nif(val===null){\\nreturn null;}\\n\\nif(commons.setHas(seenSet,val)){\\nreturn'[Seen]';}\\n\\ncommons.setAdd(seenSet,val);\\nif(commons.isError(val)){\\nreturn`[${val.name}: ${val.message}]`;}\\n\\nif(commons.toStringTagSymbol in val){\\n/* For the built-ins that have or inherit a `Symbol.toStringTag`-named*/\\n/* property, most of them inherit the default `toString` method,*/\\n/* which will print in a similar manner: `\\\"[object Foo]\\\"` vs*/\\n/* `\\\"[Foo]\\\"`. The exceptions are*/\\n/* * `Symbol.prototype`, `BigInt.prototype`, `String.prototype`*/\\n/* which don't matter to us since we handle primitives*/\\n/* separately and we don't care about primitive wrapper objects.*/\\n/* * TODO*/\\n/* `Date.prototype`, `TypedArray.prototype`.*/\\n/* Hmmm, we probably should make special cases for these. We're*/\\n/* not using these yet, so it's not urgent. But others will run*/\\n/* into these.*/\\n/**/\\n/* Once #2018 is closed, the only objects in our code that have or*/\\n/* inherit a `Symbol.toStringTag`-named property are remotables*/\\n/* or their remote presences.*/\\n/* This printing will do a good job for these without*/\\n/* violating abstraction layering. This behavior makes sense*/\\n/* purely in terms of JavaScript concepts. That's some of the*/\\n/* motivation for choosing that representation of remotables*/\\n/* and their remote presences in the first place.*/\\nreturn`[${val[commons.toStringTagSymbol]}]`;}\\n\\nif(commons.isArray(val)){\\nreturn val;}\\n\\nconst names=commons.keys(val);\\nif(names.length<2){\\nreturn val;}\\n\\nlet sorted=true;\\nfor(let i=1;i<names.length;i+=1){\\nif(names[i-1]>=names[i]){\\nsorted=false;\\nbreak;}}\\n\\n\\nif(sorted){\\nreturn val;}\\n\\ncommons.arraySort(names);\\nconst entries=commons.arrayMap(names,(name)=>[name,val[name]]);\\nreturn commons.fromEntries(entries);}\\n\\ncase'function':{\\nreturn`[Function ${val.name||'<anon>'}]`;}\\n\\ncase'string':{\\nif(commons.stringStartsWith(val,'[')){\\nreturn`[${val}]`;}\\n\\nreturn val;}\\n\\ncase'undefined':\\ncase'symbol':{\\nreturn`[${commons.String(val)}]`;}\\n\\ncase'bigint':{\\nreturn`[${val}n]`;}\\n\\ncase'number':{\\nif(commons.is(val,NaN)){\\nreturn'[NaN]';}else\\nif(val===Infinity){\\nreturn'[Infinity]';}else\\nif(val===-Infinity){\\nreturn'[-Infinity]';}\\n\\nreturn val;}\\n\\ndefault:{\\nreturn val;}}};\\n\\n\\n\\ntry{\\nreturn commons.stringifyJson(payload,replacer,spaces);}\\ncatch(_err){\\n/* Don't do anything more fancy here if there is any*/\\n/* chance that might throw, unless you surround that*/\\n/* with another try-catch-recovery. For example,*/\\n/* the caught thing might be a proxy or other exotic*/\\n/* object rather than an error. The proxy might throw*/\\n/* whenever it is possible for it to.*/\\nreturn'[Something that failed to stringify]';}};\\n\\n\\ncommons.freeze(bestEffortStringify);exports.an=an;exports.bestEffortStringify=bestEffortStringify;exports.enJoin=enJoin;\",\n \"node_modules/ses/src/error/tame-console.js\": \"'use strict';Object.defineProperty(exports,'__esModule',{value:true});var commons=require('../commons.js');var assert=require('./assert.js');var console=require('./console.js');var unhandledRejection=require('./unhandled-rejection.js');require('./types.js');require('./internal-types.js');/* @ts-check*/\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\nconst failFast=(message)=>{\\nthrow commons.TypeError(message);};\\n\\n\\nconst wrapLogger=(logger,thisArg)=>\\ncommons.freeze((...args)=>commons.apply(logger,thisArg,args));\\n\\n/**\\n * Wrap console unless suppressed.\\n * At the moment, the console is considered a host power in the start\\n * compartment, and not a primordial. Hence it is absent from the whilelist\\n * and bypasses the intrinsicsCollector.\\n *\\n * @param {\\\"safe\\\" | \\\"unsafe\\\"} consoleTaming\\n * @param {\\\"platform\\\" | \\\"exit\\\" | \\\"abort\\\" | \\\"report\\\" | \\\"none\\\"} [errorTrapping]\\n * @param {\\\"report\\\" | \\\"none\\\"} [unhandledRejectionTrapping]\\n * @param {GetStackString=} optGetStackString\\n */\\nconst tameConsole=(\\nconsoleTaming='safe',\\nerrorTrapping='platform',\\nunhandledRejectionTrapping='report',\\noptGetStackString=undefined)=>\\n{\\nconsoleTaming==='safe'||\\nconsoleTaming==='unsafe'||\\nfailFast(`unrecognized consoleTaming ${consoleTaming}`);\\n\\nlet loggedErrorHandler;\\nif(optGetStackString===undefined){\\nloggedErrorHandler=assert.loggedErrorHandler;}else\\n{\\nloggedErrorHandler={\\n...assert.loggedErrorHandler,\\ngetStackString:optGetStackString};}\\n\\n\\n\\n/* eslint-disable-next-line no-restricted-globals*/\\nconst originalConsole=/** @type {VirtualConsole} */\\n/* eslint-disable-next-line no-nested-ternary*/\\ntypeof commons.globalThis.console!=='undefined'?\\ncommons.globalThis.console:\\ntypeof commons.globalThis.print==='function'?\\n/* Make a good-enough console for eshost (including only functions that*/\\n/* log at a specific level with no special argument interpretation).*/\\n/* https://console.spec.whatwg.org/#logging*/\\n((p)=>commons.freeze({debug:p,log:p,info:p,warn:p,error:p}))(\\n/* eslint-disable-next-line no-undef*/\\nwrapLogger(commons.globalThis.print)):\\n\\nundefined;\\n\\n\\n/* Upgrade a log-only console (as in `eshost -h SpiderMonkey`).*/\\nif(originalConsole&&originalConsole.log){\\nfor(const methodName of['warn','error']){\\nif(!originalConsole[methodName]){\\ncommons.defineProperty(originalConsole,methodName,{\\nvalue:wrapLogger(originalConsole.log,originalConsole)});}}}\\n\\n\\n\\n\\n\\nconst ourConsole=/** @type {VirtualConsole} */\\nconsoleTaming==='unsafe'?\\noriginalConsole:\\nconsole.makeCausalConsole(originalConsole,loggedErrorHandler);\\n\\n\\n/* Attach platform-specific error traps such that any error that gets thrown*/\\n/* at top-of-turn (the bottom of stack) will get logged by our causal*/\\n/* console, revealing the diagnostic information associated with the error,*/\\n/* including the stack from when the error was created.*/\\n\\n/* In the following Node.js and web browser cases, `process` and `window` are*/\\n/* spelled as `globalThis` properties to avoid the overweaning gaze of*/\\n/* Parcel, which dutifully installs an unnecessary `process` shim if we ever*/\\n/* utter that. That unnecessary shim forces the whole bundle into sloppy mode,*/\\n/* which in turn breaks SES's strict mode invariant.*/\\n\\n/* Disable the polymorphic check for the rest of this file. It's too noisy*/\\n/* when dealing with platform APIs.*/\\n/* eslint-disable @endo/no-polymorphic-call */\\n\\n/* Node.js*/\\nconst globalProcess=commons.globalThis.process||undefined;\\nif(\\nerrorTrapping!=='none'&&\\ntypeof globalProcess==='object'&&\\ntypeof globalProcess.on==='function')\\n{\\nlet terminate;\\nif(errorTrapping==='platform'||errorTrapping==='exit'){\\nconst{exit}=globalProcess;\\n/* If there is a function-valued process.on but no function-valued process.exit,*/\\n/* fail early without caring whether errorTrapping is \\\"platform\\\" only by default.*/\\ntypeof exit==='function'||failFast('missing process.exit');\\nterminate=()=>exit(globalProcess.exitCode||-1);}else\\nif(errorTrapping==='abort'){\\nterminate=globalProcess.abort;\\ntypeof terminate==='function'||failFast('missing process.abort');}\\n\\n\\nglobalProcess.on('uncaughtException',(error)=>{\\n/* See https://github.com/endojs/endo/blob/master/packages/ses/error-codes/SES_UNCAUGHT_EXCEPTION.md*/\\nourConsole.error('SES_UNCAUGHT_EXCEPTION:',error);\\nif(terminate){\\nterminate();}});}\\n\\n\\n\\nif(\\nunhandledRejectionTrapping!=='none'&&\\ntypeof globalProcess==='object'&&\\ntypeof globalProcess.on==='function')\\n{\\nconst handleRejection=(reason)=>{\\n/* See https://github.com/endojs/endo/blob/master/packages/ses/error-codes/SES_UNHANDLED_REJECTION.md*/\\nourConsole.error('SES_UNHANDLED_REJECTION:',reason);\\n/* 'platform' and 'report' just log the reason.*/};\\n\\n/* Maybe track unhandled promise rejections.*/\\nconst h=unhandledRejection.makeRejectionHandlers(handleRejection);\\nif(h){\\n/* Rejection handlers are supported.*/\\nglobalProcess.on('unhandledRejection',h.unhandledRejectionHandler);\\nglobalProcess.on('rejectionHandled',h.rejectionHandledHandler);\\nglobalProcess.on('exit',h.processTerminationHandler);}}\\n\\n\\n\\n/* Browser*/\\nconst globalWindow=commons.globalThis.window||undefined;\\nif(\\nerrorTrapping!=='none'&&\\ntypeof globalWindow==='object'&&\\ntypeof globalWindow.addEventListener==='function')\\n{\\nglobalWindow.addEventListener('error',(event)=>{\\nevent.preventDefault();\\n/* See https://github.com/endojs/endo/blob/master/packages/ses/error-codes/SES_UNCAUGHT_EXCEPTION.md*/\\nourConsole.error('SES_UNCAUGHT_EXCEPTION:',event.error);\\n/* 'platform' and 'report' just log the reason.*/\\nif(errorTrapping==='exit'||errorTrapping==='abort'){\\nglobalWindow.location.href=`about:blank`;}});}\\n\\n\\n\\nif(\\nunhandledRejectionTrapping!=='none'&&\\ntypeof globalWindow==='object'&&\\ntypeof globalWindow.addEventListener==='function')\\n{\\nconst handleRejection=(reason)=>{\\n/* See https://github.com/endojs/endo/blob/master/packages/ses/error-codes/SES_UNHANDLED_REJECTION.md*/\\nourConsole.error('SES_UNHANDLED_REJECTION:',reason);};\\n\\n\\nconst h=unhandledRejection.makeRejectionHandlers(handleRejection);\\nif(h){\\n/* Rejection handlers are supported.*/\\nglobalWindow.addEventListener('unhandledrejection',(event)=>{\\nevent.preventDefault();\\nh.unhandledRejectionHandler(event.reason,event.promise);});\\n\\n\\nglobalWindow.addEventListener('rejectionhandled',(event)=>{\\nevent.preventDefault();\\nh.rejectionHandledHandler(event.promise);});\\n\\n\\nglobalWindow.addEventListener('beforeunload',(_event)=>{\\nh.processTerminationHandler();});}}\\n\\n\\n\\n/* eslint-enable @endo/no-polymorphic-call */\\n\\nreturn{console:ourConsole};};exports.tameConsole=tameConsole;\",\n \"node_modules/ses/src/error/tame-error-constructor.js\": \"'use strict';Object.defineProperty(exports,'__esModule',{value:true});var commons=require('../commons.js');var permits=require('../permits.js');var\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\ntameV8ErrorConstructor=require('./tame-v8-error-constructor.js');/* Present on at least FF and XS. Proposed by Error-proposal. The original*/ /* is dangerous, so tameErrorConstructor replaces it with a safe one.*/ /* We grab the original here before it gets replaced.*/\\nconst stackDesc=commons.getOwnPropertyDescriptor(commons.FERAL_ERROR.prototype,'stack');\\nconst stackGetter=stackDesc&&stackDesc.get;\\n\\n/* Use concise methods to obtain named functions without constructors.*/\\nconst tamedMethods={\\ngetStackString(error){\\nif(typeof stackGetter==='function'){\\nreturn commons.apply(stackGetter,error,[]);}else\\nif('stack'in error){\\n/* The fallback is to just use the de facto `error.stack` if present*/\\nreturn`${error.stack}`;}\\n\\nreturn'';}};\\n\\n\\nlet initialGetStackString=tamedMethods.getStackString;\\n\\nfunction tameErrorConstructor(\\nerrorTaming='safe',\\nstackFiltering='concise')\\n{\\nif(\\nerrorTaming!=='safe'&&\\nerrorTaming!=='unsafe'&&\\nerrorTaming!=='unsafe-debug')\\n{\\nthrow commons.TypeError(`unrecognized errorTaming ${errorTaming}`);}\\n\\nif(stackFiltering!=='concise'&&stackFiltering!=='verbose'){\\nthrow commons.TypeError(`unrecognized stackFiltering ${stackFiltering}`);}\\n\\nconst ErrorPrototype=commons.FERAL_ERROR.prototype;\\n\\nconst{captureStackTrace:originalCaptureStackTrace}=commons.FERAL_ERROR;\\nconst platform=\\ntypeof originalCaptureStackTrace==='function'?'v8':'unknown';\\n\\nconst makeErrorConstructor=(_={})=>{\\n/* eslint-disable-next-line no-shadow*/\\nconst ResultError=function Error(...rest){\\nlet error;\\nif(new.target===undefined){\\nerror=commons.apply(commons.FERAL_ERROR,this,rest);}else\\n{\\nerror=commons.construct(commons.FERAL_ERROR,rest,new.target);}\\n\\nif(platform==='v8'){\\n/* TODO Likely expensive!*/\\ncommons.apply(originalCaptureStackTrace,commons.FERAL_ERROR,[error,ResultError]);}\\n\\nreturn error;};\\n\\ncommons.defineProperties(ResultError,{\\nlength:{value:1},\\nprototype:{\\nvalue:ErrorPrototype,\\nwritable:false,\\nenumerable:false,\\nconfigurable:false}});\\n\\n\\nreturn ResultError;};\\n\\nconst InitialError=makeErrorConstructor({powers:'original'});\\nconst SharedError=makeErrorConstructor({powers:'none'});\\ncommons.defineProperties(ErrorPrototype,{\\nconstructor:{value:SharedError}});\\n\\n\\nfor(const NativeError of permits.NativeErrors){\\ncommons.setPrototypeOf(NativeError,SharedError);}\\n\\n\\n/* https://v8.dev/docs/stack-trace-api#compatibility advises that*/\\n/* programmers can \\\"always\\\" set `Error.stackTraceLimit`*/\\n/* even on non-v8 platforms. On non-v8*/\\n/* it will have no effect, but this advice only makes sense*/\\n/* if the assignment itself does not fail, which it would*/\\n/* if `Error` were naively frozen. Hence, we add setters that*/\\n/* accept but ignore the assignment on non-v8 platforms.*/\\ncommons.defineProperties(InitialError,{\\nstackTraceLimit:{\\nget(){\\nif(typeof commons.FERAL_ERROR.stackTraceLimit==='number'){\\n/* FERAL_ERROR.stackTraceLimit is only on v8*/\\nreturn commons.FERAL_ERROR.stackTraceLimit;}\\n\\nreturn undefined;},\\n\\nset(newLimit){\\nif(typeof newLimit!=='number'){\\n/* silently do nothing. This behavior doesn't precisely*/\\n/* emulate v8 edge-case behavior. But given the purpose*/\\n/* of this emulation, having edge cases err towards*/\\n/* harmless seems the safer option.*/\\nreturn;}\\n\\nif(typeof commons.FERAL_ERROR.stackTraceLimit==='number'){\\n/* FERAL_ERROR.stackTraceLimit is only on v8*/\\ncommons.FERAL_ERROR.stackTraceLimit=newLimit;\\n/* We place the useless return on the next line to ensure*/\\n/* that anything we place after the if in the future only*/\\n/* happens if the then-case does not.*/\\n/* eslint-disable-next-line no-useless-return*/\\nreturn;}},\\n\\n\\n/* WTF on v8 stackTraceLimit is enumerable*/\\nenumerable:false,\\nconfigurable:true}});\\n\\n\\n\\nif(errorTaming==='unsafe-debug'&&platform==='v8'){\\n/* This case is a kludge to work around*/\\n/* https://github.com/endojs/endo/issues/1798*/\\n/* https://github.com/endojs/endo/issues/2348*/\\n/* https://github.com/Agoric/agoric-sdk/issues/8662*/\\n\\ncommons.defineProperties(InitialError,{\\nprepareStackTrace:{\\nget(){\\nreturn commons.FERAL_ERROR.prepareStackTrace;},\\n\\nset(newPrepareStackTrace){\\ncommons.FERAL_ERROR.prepareStackTrace=newPrepareStackTrace;},\\n\\nenumerable:false,\\nconfigurable:true},\\n\\ncaptureStackTrace:{\\nvalue:commons.FERAL_ERROR.captureStackTrace,\\nwritable:true,\\nenumerable:false,\\nconfigurable:true}});\\n\\n\\n\\nconst descs=commons.getOwnPropertyDescriptors(InitialError);\\ncommons.defineProperties(SharedError,{\\nstackTraceLimit:descs.stackTraceLimit,\\nprepareStackTrace:descs.prepareStackTrace,\\ncaptureStackTrace:descs.captureStackTrace});\\n\\n\\nreturn{\\n'%InitialGetStackString%':initialGetStackString,\\n'%InitialError%':InitialError,\\n'%SharedError%':SharedError};}\\n\\n\\n\\n/* The default SharedError much be completely powerless even on v8,*/\\n/* so the lenient `stackTraceLimit` accessor does nothing on all*/\\n/* platforms.*/\\ncommons.defineProperties(SharedError,{\\nstackTraceLimit:{\\nget(){\\nreturn undefined;},\\n\\nset(_newLimit){\\n/* do nothing*/},\\n\\nenumerable:false,\\nconfigurable:true}});\\n\\n\\n\\nif(platform==='v8'){\\n/* `SharedError.prepareStackTrace`, if it exists, must also be*/\\n/* powerless. However, from what we've heard, depd expects to be able to*/\\n/* assign to it without the assignment throwing. It is normally a function*/\\n/* that returns a stack string to be magically added to error objects.*/\\n/* However, as long as we're adding a lenient standin, we may as well*/\\n/* accommodate any who expect to get a function they can call and get*/\\n/* a string back. This prepareStackTrace is a do-nothing function that*/\\n/* always returns the empty string.*/\\ncommons.defineProperties(SharedError,{\\nprepareStackTrace:{\\nget(){\\nreturn()=>'';},\\n\\nset(_prepareFn){\\n/* do nothing*/},\\n\\nenumerable:false,\\nconfigurable:true},\\n\\ncaptureStackTrace:{\\nvalue:(errorish,_constructorOpt)=>{\\ncommons.defineProperty(errorish,'stack',{\\nvalue:''});},\\n\\n\\nwritable:false,\\nenumerable:false,\\nconfigurable:true}});}\\n\\n\\n\\n\\nif(platform==='v8'){\\ninitialGetStackString=tameV8ErrorConstructor.tameV8ErrorConstructor(\\ncommons.FERAL_ERROR,\\nInitialError,\\nerrorTaming,\\nstackFiltering);}else\\n\\nif(errorTaming==='unsafe'||errorTaming==='unsafe-debug'){\\n/* v8 has too much magic around their 'stack' own property for it to*/\\n/* coexist cleanly with this accessor. So only install it on non-v8*/\\n\\n/* Error.prototype.stack property as proposed at*/\\n/* https://tc39.es/proposal-error-stacks/*/\\n/* with the fix proposed at*/\\n/* https://github.com/tc39/proposal-error-stacks/issues/46*/\\n/* On others, this still protects from the override mistake,*/\\n/* essentially like enable-property-overrides.js would*/\\n/* once this accessor property itself is frozen, as will happen*/\\n/* later during lockdown.*/\\n/**/\\n/* However, there is here a change from the intent in the current*/\\n/* state of the proposal. If experience tells us whether this change*/\\n/* is a good idea, we should modify the proposal accordingly. There is*/\\n/* much code in the world that assumes `error.stack` is a string. So*/\\n/* where the proposal accommodates secure operation by making the*/\\n/* property optional, we instead accommodate secure operation by*/\\n/* having the secure form always return only the stable part, the*/\\n/* stringified error instance, and omitting all the frame information*/\\n/* rather than omitting the property.*/\\ncommons.defineProperties(ErrorPrototype,{\\nstack:{\\nget(){\\nreturn initialGetStackString(this);},\\n\\nset(newValue){\\ncommons.defineProperties(this,{\\nstack:{\\nvalue:newValue,\\nwritable:true,\\nenumerable:true,\\nconfigurable:true}});}}});}else\\n\\n\\n\\n\\n\\n{\\n/* v8 has too much magic around their 'stack' own property for it to*/\\n/* coexist cleanly with this accessor. So only install it on non-v8*/\\ncommons.defineProperties(ErrorPrototype,{\\nstack:{\\nget(){\\n/* https://github.com/tc39/proposal-error-stacks/issues/46*/\\n/* allows this to not add an unpleasant newline. Otherwise*/\\n/* we should fix this.*/\\nreturn`${this}`;},\\n\\nset(newValue){\\ncommons.defineProperties(this,{\\nstack:{\\nvalue:newValue,\\nwritable:true,\\nenumerable:true,\\nconfigurable:true}});}}});}\\n\\n\\n\\n\\n\\n\\n\\nreturn{\\n'%InitialGetStackString%':initialGetStackString,\\n'%InitialError%':InitialError,\\n'%SharedError%':SharedError};}exports[\\\"default\\\"]=tameErrorConstructor;\",\n \"node_modules/ses/src/error/tame-v8-error-constructor.js\": \"'use strict';Object.defineProperty(exports,'__esModule',{value:true});var\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\ncommons=require('../commons.js');/* Whitelist names from https://v8.dev/docs/stack-trace-api*/ /* Whitelisting only the names used by error-stack-shim/src/v8StackFrames*/ /* callSiteToFrame to shim the error stack proposal.*/\\nconst safeV8CallSiteMethodNames=[\\n/* suppress 'getThis' definitely*/\\n'getTypeName',\\n/* suppress 'getFunction' definitely*/\\n'getFunctionName',\\n'getMethodName',\\n'getFileName',\\n'getLineNumber',\\n'getColumnNumber',\\n'getEvalOrigin',\\n'isToplevel',\\n'isEval',\\n'isNative',\\n'isConstructor',\\n'isAsync',\\n/* suppress 'isPromiseAll' for now*/\\n/* suppress 'getPromiseIndex' for now*/\\n\\n/* Additional names found by experiment, absent from*/\\n/* https://v8.dev/docs/stack-trace-api*/\\n'getPosition',\\n'getScriptNameOrSourceURL',\\n\\n'toString'/* TODO replace to use only whitelisted info*/];\\n\\n\\n/* TODO this is a ridiculously expensive way to attenuate callsites.*/\\n/* Before that matters, we should switch to a reasonable representation.*/\\nconst safeV8CallSiteFacet=(callSite)=>{\\nconst methodEntry=(name)=>{\\nconst method=callSite[name];\\nreturn[name,()=>commons.apply(method,callSite,[])];};\\n\\nconst o=commons.fromEntries(commons.arrayMap(safeV8CallSiteMethodNames,methodEntry));\\nreturn commons.create(o,{});};\\n\\n\\nconst safeV8SST=(sst)=>commons.arrayMap(sst,safeV8CallSiteFacet);\\n\\n/* If it has `/node_modules/` anywhere in it, on Node it is likely*/\\n/* to be a dependent package of the current package, and so to*/\\n/* be an infrastructure frame to be dropped from concise stack traces.*/\\nconst FILENAME_NODE_DEPENDENTS_CENSOR=/\\\\/node_modules\\\\//;\\n\\n/* If it begins with `internal/` or `node:internal` then it is likely*/\\n/* part of the node infrustructre itself, to be dropped from concise*/\\n/* stack traces.*/\\nconst FILENAME_NODE_INTERNALS_CENSOR=/^(?:node:)?internal\\\\//;\\n\\n/* Frames within the `assert.js` package should be dropped from*/\\n/* concise stack traces, as these are just steps towards creating the*/\\n/* error object in question.*/\\nconst FILENAME_ASSERT_CENSOR=/\\\\/packages\\\\/ses\\\\/src\\\\/error\\\\/assert.js$/;\\n\\n/* Frames within the `eventual-send` shim should be dropped so that concise*/\\n/* deep stacks omit the internals of the eventual-sending mechanism causing*/\\n/* asynchronous messages to be sent.*/\\n/* Note that the eventual-send package will move from agoric-sdk to*/\\n/* Endo, so this rule will be of general interest.*/\\nconst FILENAME_EVENTUAL_SEND_CENSOR=/\\\\/packages\\\\/eventual-send\\\\/src\\\\//;\\n\\n/* Any stack frame whose `fileName` matches any of these censor patterns*/\\n/* will be omitted from concise stacks.*/\\n/* TODO Enable users to configure FILENAME_CENSORS via `lockdown` options.*/\\nconst FILENAME_CENSORS=[\\nFILENAME_NODE_DEPENDENTS_CENSOR,\\nFILENAME_NODE_INTERNALS_CENSOR,\\nFILENAME_ASSERT_CENSOR,\\nFILENAME_EVENTUAL_SEND_CENSOR];\\n\\n\\n/* Should a stack frame with this as its fileName be included in a concise*/\\n/* stack trace?*/\\n/* Exported only so it can be unit tested.*/\\n/* TODO Move so that it applies not just to v8.*/\\nconst filterFileName=(fileName)=>{\\nif(!fileName){\\n/* Stack frames with no fileName should appear in concise stack traces.*/\\nreturn true;}\\n\\nfor(const filter of FILENAME_CENSORS){\\nif(commons.regexpTest(filter,fileName)){\\nreturn false;}}\\n\\n\\nreturn true;};\\n\\n\\n/* The ad-hoc rule of the current pattern is that any likely-file-path or*/\\n/* likely url-path prefix, ending in a `/.../` should get dropped.*/\\n/* Anything to the left of the likely path text is kept.*/\\n/* Everything to the right of `/.../` is kept. Thus*/\\n/* `'Object.bar (/vat-v1/.../eventual-send/test/test-deep-send.js:13:21)'`*/\\n/* simplifies to*/\\n/* `'Object.bar (eventual-send/test/test-deep-send.js:13:21)'`.*/\\n/**/\\n/* See thread starting at*/\\n/* https://github.com/Agoric/agoric-sdk/issues/2326#issuecomment-773020389*/\\nconst CALLSITE_ELLIPSES_PATTERN=/^((?:.*[( ])?)[:/\\\\w_-]*\\\\/\\\\.\\\\.\\\\.\\\\/(.+)$/;\\n\\n/* The ad-hoc rule of the current pattern is that any likely-file-path or*/\\n/* likely url-path prefix, ending in a `/` and prior to `package/` should get*/\\n/* dropped.*/\\n/* Anything to the left of the likely path prefix text is kept. `package/` and*/\\n/* everything to its right is kept. Thus*/\\n/* `'Object.bar (/Users/markmiller/src/ongithub/agoric/agoric-sdk/packages/eventual-send/test/test-deep-send.js:13:21)'`*/\\n/* simplifies to*/\\n/* `'Object.bar (packages/eventual-send/test/test-deep-send.js:13:21)'`.*/\\n/* Note that `/packages/` is a convention for monorepos encouraged by*/\\n/* lerna.*/\\nconst CALLSITE_PACKAGES_PATTERN=/^((?:.*[( ])?)[:/\\\\w_-]*\\\\/(packages\\\\/.+)$/;\\n\\n/* The use of these callSite patterns below assumes that any match will bind*/\\n/* capture groups containing the parts of the original string we want*/\\n/* to keep. The parts outside those capture groups will be dropped from concise*/\\n/* stacks.*/\\n/* TODO Enable users to configure CALLSITE_PATTERNS via `lockdown` options.*/\\nconst CALLSITE_PATTERNS=[\\nCALLSITE_ELLIPSES_PATTERN,\\nCALLSITE_PACKAGES_PATTERN];\\n\\n\\n/* For a stack frame that should be included in a concise stack trace, if*/\\n/* `callSiteString` is the original stringified stack frame, return the*/\\n/* possibly-shorter stringified stack frame that should be shown instead.*/\\n/* Exported only so it can be unit tested.*/\\n/* TODO Move so that it applies not just to v8.*/\\nconst shortenCallSiteString=(callSiteString)=>{\\nfor(const filter of CALLSITE_PATTERNS){\\nconst match=commons.regexpExec(filter,callSiteString);\\nif(match){\\nreturn commons.arrayJoin(commons.arraySlice(match,1),'');}}\\n\\n\\nreturn callSiteString;};\\n\\n\\nconst tameV8ErrorConstructor=(\\nOriginalError,\\nInitialError,\\nerrorTaming,\\nstackFiltering)=>\\n{\\nif(errorTaming==='unsafe-debug'){\\nthrow commons.TypeError(\\n'internal: v8+unsafe-debug special case should already be done');}\\n\\n\\n/* TODO: Proper CallSite types*/\\n/** @typedef {{}} CallSite */\\n\\nconst originalCaptureStackTrace=OriginalError.captureStackTrace;\\n\\n/* const callSiteFilter = _callSite => true;*/\\nconst callSiteFilter=(callSite)=>{\\nif(stackFiltering==='verbose'){\\nreturn true;}\\n\\n/* eslint-disable-next-line @endo/no-polymorphic-call*/\\nreturn filterFileName(callSite.getFileName());};\\n\\n\\nconst callSiteStringifier=(callSite)=>{\\nlet callSiteString=`${callSite}`;\\nif(stackFiltering==='concise'){\\ncallSiteString=shortenCallSiteString(callSiteString);}\\n\\nreturn`\\\\n at ${callSiteString}`;};\\n\\n\\nconst stackStringFromSST=(_error,sst)=>\\ncommons.arrayJoin(\\ncommons.arrayMap(commons.arrayFilter(sst,callSiteFilter),callSiteStringifier),\\n'');\\n\\n\\n/**\\n * @typedef {object} StructuredStackInfo\\n * @property {CallSite[]} callSites\\n * @property {undefined} [stackString]\\n */\\n\\n/**\\n * @typedef {object} ParsedStackInfo\\n * @property {undefined} [callSites]\\n * @property {string} stackString\\n */\\n\\n/* Mapping from error instance to the stack for that instance.*/\\n/* The stack info is either the structured stack trace*/\\n/* or the generated tamed stack string*/\\n/** @type {WeakMap<Error, ParsedStackInfo | StructuredStackInfo>} */\\nconst stackInfos=new commons.WeakMap();\\n\\n/* Use concise methods to obtain named functions without constructors.*/\\nconst tamedMethods={\\n/* The optional `optFn` argument is for cutting off the bottom of*/\\n/* the stack --- for capturing the stack only above the topmost*/\\n/* call to that function. Since this isn't the \\\"real\\\" captureStackTrace*/\\n/* but instead calls the real one, if no other cutoff is provided,*/\\n/* we cut this one off.*/\\ncaptureStackTrace(error,optFn=tamedMethods.captureStackTrace){\\nif(typeof originalCaptureStackTrace==='function'){\\n/* OriginalError.captureStackTrace is only on v8*/\\ncommons.apply(originalCaptureStackTrace,OriginalError,[error,optFn]);\\nreturn;}\\n\\ncommons.reflectSet(error,'stack','');},\\n\\n/* Shim of proposed special power, to reside by default only*/\\n/* in the start compartment, for getting the stack traceback*/\\n/* string associated with an error.*/\\n/* See https://tc39.es/proposal-error-stacks/*/\\ngetStackString(error){\\nlet stackInfo=commons.weakmapGet(stackInfos,error);\\n\\nif(stackInfo===undefined){\\n/* The following will call `prepareStackTrace()` synchronously*/\\n/* which will populate stackInfos*/\\n/* eslint-disable-next-line no-void*/\\nvoid error.stack;\\nstackInfo=commons.weakmapGet(stackInfos,error);\\nif(!stackInfo){\\nstackInfo={stackString:''};\\ncommons.weakmapSet(stackInfos,error,stackInfo);}}\\n\\n\\n\\n/* prepareStackTrace() may generate the stackString*/\\n/* if errorTaming === 'unsafe'*/\\n\\nif(stackInfo.stackString!==undefined){\\nreturn stackInfo.stackString;}\\n\\n\\nconst stackString=stackStringFromSST(error,stackInfo.callSites);\\ncommons.weakmapSet(stackInfos,error,{stackString});\\n\\nreturn stackString;},\\n\\nprepareStackTrace(error,sst){\\nif(errorTaming==='unsafe'){\\nconst stackString=stackStringFromSST(error,sst);\\ncommons.weakmapSet(stackInfos,error,{stackString});\\nreturn`${error}${stackString}`;}else\\n{\\ncommons.weakmapSet(stackInfos,error,{callSites:sst});\\nreturn'';}}};\\n\\n\\n\\n\\n/* A prepareFn is a prepareStackTrace function.*/\\n/* An sst is a `structuredStackTrace`, which is an array of*/\\n/* callsites.*/\\n/* A user prepareFn is a prepareFn defined by a client of this API,*/\\n/* and provided by assigning to `Error.prepareStackTrace`.*/\\n/* A user prepareFn should only receive an attenuated sst, which*/\\n/* is an array of attenuated callsites.*/\\n/* A system prepareFn is the prepareFn created by this module to*/\\n/* be installed on the real `Error` constructor, to receive*/\\n/* an original sst, i.e., an array of unattenuated callsites.*/\\n/* An input prepareFn is a function the user assigns to*/\\n/* `Error.prepareStackTrace`, which might be a user prepareFn or*/\\n/* a system prepareFn previously obtained by reading*/\\n/* `Error.prepareStackTrace`.*/\\n\\nconst defaultPrepareFn=tamedMethods.prepareStackTrace;\\n\\nOriginalError.prepareStackTrace=defaultPrepareFn;\\n\\n/* A weakset branding some functions as system prepareFns, all of which*/\\n/* must be defined by this module, since they can receive an*/\\n/* unattenuated sst.*/\\nconst systemPrepareFnSet=new commons.WeakSet([defaultPrepareFn]);\\n\\nconst systemPrepareFnFor=(inputPrepareFn)=>{\\nif(commons.weaksetHas(systemPrepareFnSet,inputPrepareFn)){\\nreturn inputPrepareFn;}\\n\\n/* Use concise methods to obtain named functions without constructors.*/\\nconst systemMethods={\\nprepareStackTrace(error,sst){\\ncommons.weakmapSet(stackInfos,error,{callSites:sst});\\nreturn inputPrepareFn(error,safeV8SST(sst));}};\\n\\n\\ncommons.weaksetAdd(systemPrepareFnSet,systemMethods.prepareStackTrace);\\nreturn systemMethods.prepareStackTrace;};\\n\\n\\n/* Note `stackTraceLimit` accessor already defined by*/\\n/* tame-error-constructor.js*/\\ncommons.defineProperties(InitialError,{\\ncaptureStackTrace:{\\nvalue:tamedMethods.captureStackTrace,\\nwritable:true,\\nenumerable:false,\\nconfigurable:true},\\n\\nprepareStackTrace:{\\nget(){\\nreturn OriginalError.prepareStackTrace;},\\n\\nset(inputPrepareStackTraceFn){\\nif(typeof inputPrepareStackTraceFn==='function'){\\nconst systemPrepareFn=systemPrepareFnFor(inputPrepareStackTraceFn);\\nOriginalError.prepareStackTrace=systemPrepareFn;}else\\n{\\nOriginalError.prepareStackTrace=defaultPrepareFn;}},\\n\\n\\nenumerable:false,\\nconfigurable:true}});\\n\\n\\n\\nreturn tamedMethods.getStackString;};exports.filterFileName=filterFileName;exports.shortenCallSiteString=shortenCallSiteString;exports.tameV8ErrorConstructor=tameV8ErrorConstructor;\",\n \"node_modules/ses/src/error/types.js\": \"\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n'use strict';/* @ts-check*/ /** @import {GenericErrorConstructor, AssertMakeErrorOptions, DetailsToken, StringablePayload} from '../../types.js' */ /**\\n * @typedef {object} VirtualConsole\\n * @property {Console['debug']} debug\\n * @property {Console['log']} log\\n * @property {Console['info']} info\\n * @property {Console['warn']} warn\\n * @property {Console['error']} error\\n *\\n * @property {Console['trace']} trace\\n * @property {Console['dirxml']} dirxml\\n * @property {Console['group']} group\\n * @property {Console['groupCollapsed']} groupCollapsed\\n *\\n * @property {Console['assert']} assert\\n * @property {Console['timeLog']} timeLog\\n *\\n * @property {Console['clear']} clear\\n * @property {Console['count']} count\\n * @property {Console['countReset']} countReset\\n * @property {Console['dir']} dir\\n * @property {Console['groupEnd']} groupEnd\\n *\\n * @property {Console['table']} table\\n * @property {Console['time']} time\\n * @property {Console['timeEnd']} timeEnd\\n * @property {Console['timeStamp']} timeStamp\\n */ /* This is deliberately *not* JSDoc, it is a regular comment.\\n *\\n * TODO: We'd like to add the following properties to the above\\n * VirtualConsole, but they currently cause conflicts where\\n * some Typescript implementations don't have these properties\\n * on the Console type.\\n *\\n * @property {Console['profile']} profile\\n * @property {Console['profileEnd']} profileEnd\\n */ /**\\n * @typedef {'debug' | 'log' | 'info' | 'warn' | 'error'} LogSeverity\\n */ /**\\n * @typedef ConsoleFilter\\n * @property {(severity: LogSeverity) => boolean} canLog\\n */ /**\\n * @callback FilterConsole\\n * @param {VirtualConsole} baseConsole\\n * @param {ConsoleFilter} filter\\n * @param {string} [topic]\\n * @returns {VirtualConsole}\\n */\",\n \"node_modules/ses/src/error/unhandled-rejection.js\": \"'use strict';Object.defineProperty(exports,'__esModule',{value:true});var\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\ncommons=require('../commons.js');/* @ts-check*/ /**\\n * Create rejection-tracking machinery compatible with Node.js and browsers.\\n *\\n * Note that modern browsers *prevent* access to the 'unhandledrejection' and\\n * 'rejectionhandled' events needed:\\n * - in cross-origin mode, like when served from file://\\n * - in the browser console (interactively typed-in code)\\n * - in the debugger\\n *\\n * Then, they just look like: `Uncaught (in promise) Error: ...` and don't\\n * implement the machinery.\\n *\\n * The solution is to serve your web page from an http:// or https:// web server\\n * and execute actual code.\\n *\\n * @param {(reason: unknown) => void} reportReason report the reason for an\\n * unhandled rejection.\\n */\\nconst makeRejectionHandlers=(reportReason)=>{\\nif(commons.FinalizationRegistry===undefined){\\nreturn undefined;}\\n\\n\\n/** @typedef {number} ReasonId */\\nlet lastReasonId=0;\\n\\n/** @type {Map<ReasonId, unknown>} */\\nconst idToReason=new commons.Map();\\n\\n/** @type {(() => void) | undefined} */\\nlet cancelChecking;\\n\\nconst removeReasonId=(reasonId)=>{\\ncommons.mapDelete(idToReason,reasonId);\\nif(cancelChecking&&idToReason.size===0){\\n/* No more unhandled rejections to check, just cancel the check.*/\\ncancelChecking();\\ncancelChecking=undefined;}};\\n\\n\\n\\n/** @type {WeakMap<Promise, ReasonId>} */\\nconst promiseToReasonId=new commons.WeakMap();\\n\\n/**\\n * Clean up and report the reason for a GCed unhandled rejection.\\n *\\n * @param {ReasonId} heldReasonId\\n */\\nconst finalizeDroppedPromise=(heldReasonId)=>{\\nif(commons.mapHas(idToReason,heldReasonId)){\\nconst reason=commons.mapGet(idToReason,heldReasonId);\\nremoveReasonId(heldReasonId);\\nreportReason(reason);}};\\n\\n\\n\\n/** @type {FinalizationRegistry<ReasonId>} */\\nconst promiseToReason=new commons.FinalizationRegistry(finalizeDroppedPromise);\\n\\n/**\\n * Track a rejected promise and its corresponding reason if there is no\\n * rejection handler synchronously attached.\\n *\\n * @param {unknown} reason\\n * @param {Promise} pr\\n */\\nconst unhandledRejectionHandler=(reason,pr)=>{\\nlastReasonId+=1;\\nconst reasonId=lastReasonId;\\n\\n/* Update bookkeeping.*/\\ncommons.mapSet(idToReason,reasonId,reason);\\ncommons.weakmapSet(promiseToReasonId,pr,reasonId);\\ncommons.finalizationRegistryRegister(promiseToReason,pr,reasonId,pr);};\\n\\n\\n/**\\n * Deal with the addition of a handler to a previously rejected promise.\\n *\\n * Just remove it from our list. Let the FinalizationRegistry or\\n * processTermination report any GCed unhandled rejected promises.\\n *\\n * @param {Promise} pr\\n */\\nconst rejectionHandledHandler=(pr)=>{\\nconst reasonId=commons.weakmapGet(promiseToReasonId,pr);\\nremoveReasonId(reasonId);};\\n\\n\\n/**\\n * Report all the unhandled rejections, now that we are abruptly terminating\\n * the agent cluster.\\n */\\nconst processTerminationHandler=()=>{\\nfor(const[reasonId,reason]of commons.mapEntries(idToReason)){\\nremoveReasonId(reasonId);\\nreportReason(reason);}};\\n\\n\\n\\nreturn{\\nrejectionHandledHandler,\\nunhandledRejectionHandler,\\nprocessTerminationHandler};};exports.makeRejectionHandlers=makeRejectionHandlers;\",\n \"node_modules/ses/src/eval-scope.js\": \"'use strict';Object.defineProperty(exports,'__esModule',{value:true});var commons=require('./commons.js');var assert=require('./error/assert.js');\\n\\n\\n\\nconst{Fail}=assert.assert;\\n\\n/* We attempt to frustrate stack bumping attacks on the safe evaluator*/\\n/* (`make-safe-evaluator.js`).*/\\n/* A stack bumping attack forces an API call to throw a stack overflow*/\\n/* `RangeError` at an inopportune time.*/\\n/* The attacker arranges for the stack to be sufficiently deep that the API*/\\n/* consumes exactly enough stack frames to throw an exception.*/\\n/**/\\n/* For the safe evaluator, an exception thrown between adding and then deleting*/\\n/* `eval` on `evalScope` could leak the real `eval` to an attacker's lexical*/\\n/* scope.*/\\n/* This would be sufficiently disastrous that we guard against it twice.*/\\n/* First, we delete `eval` from `evalScope` immediately before rendering it to*/\\n/* the guest program's lexical scope.*/\\n/**/\\n/* If the attacker manages to arrange for `eval` to throw an exception after we*/\\n/* call `allowNextEvalToBeUnsafe` but before the guest program accesses `eval`,*/\\n/* it would be able to access `eval` once more in its own code.*/\\n/* Although they could do no harm with a direct `eval`, they would be able to*/\\n/* escape to the true global scope with an indirect `eval`.*/\\n/**/\\n/* prepareStack(depth, () => {*/\\n/* (eval)('');*/\\n/* });*/\\n/* const unsafeEval = (eval);*/\\n/* const safeEval = (eval);*/\\n/* const realGlobal = unsafeEval('globalThis');*/\\n/**/\\n/* To protect against that case, we also delete `eval` from the `evalScope` in*/\\n/* a `finally` block surrounding the call to the safe evaluator.*/\\n/* The only way to reach this case is if `eval` remains on `evalScope` due to*/\\n/* an attack, so we assume that attack would have have invalided our isolation*/\\n/* and revoke all future access to the evaluator.*/\\n/**/\\n/* To defeat a stack bumping attack, we must use fewer stack frames to recover*/\\n/* in that `finally` block than we used in the `try` block.*/\\n/* We have no reliable guarantees about how many stack frames a block of*/\\n/* JavaScript will consume.*/\\n/* Function inlining, tail-call optimization, variations in the size of a stack*/\\n/* frame, and block scopes may affect the depth of the stack.*/\\n/* The only number of acceptable stack frames to use in the finally block is*/\\n/* zero.*/\\n/* We only use property assignment and deletion in the safe evaluator's*/\\n/* `finally` block.*/\\n/* We use `delete evalScope.eval` to withhold the evaluator.*/\\n/* We assign an envelope object over `evalScopeKit.revoked` to revoke the*/\\n/* evaluator.*/\\n/**/\\n/* This is why we supply a meaningfully named function for*/\\n/* `allowNextEvalToBeUnsafe` but do not provide a corresponding*/\\n/* `revokeAccessToUnsafeEval` or even simply `revoke`.*/\\n/* These recovery routines are expressed inline in the safe evaluator.*/\\n\\nconst makeEvalScopeKit=()=>{\\nconst evalScope=commons.create(null);\\nconst oneTimeEvalProperties=commons.freeze({\\neval:{\\nget(){\\ndelete evalScope.eval;\\nreturn commons.FERAL_EVAL;},\\n\\nenumerable:false,\\nconfigurable:true}});\\n\\n\\n\\nconst evalScopeKit={\\nevalScope,\\nallowNextEvalToBeUnsafe(){\\nconst{revoked}=evalScopeKit;\\nif(revoked!==null){\\nFail`a handler did not reset allowNextEvalToBeUnsafe ${revoked.err}`;}\\n\\n/* Allow next reference to eval produce the unsafe FERAL_EVAL.*/\\n/* We avoid defineProperty because it consumes an extra stack frame taming*/\\n/* its return value.*/\\ncommons.defineProperties(evalScope,oneTimeEvalProperties);},\\n\\n/** @type {null | { err: any }} */\\nrevoked:null};\\n\\n\\nreturn evalScopeKit;};exports.makeEvalScopeKit=makeEvalScopeKit;\",\n \"node_modules/ses/src/get-anonymous-intrinsics.js\": \"'use strict';Object.defineProperty(exports,'__esModule',{value:true});var commons=require('./commons.js');var\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\ncompartment=require('./compartment.js');/**\\n * Object.getConstructorOf()\\n * Helper function to improve readability, similar to Object.getPrototypeOf().\\n *\\n * @param {object} obj\\n */\\nfunction getConstructorOf(obj){\\nreturn commons.getPrototypeOf(obj).constructor;}\\n\\n\\n/* getAnonymousIntrinsics uses a utility function to construct an arguments*/\\n/* object, since it cannot have one of its own and also be a const export.*/\\nfunction makeArguments(){\\n/* eslint-disable-next-line prefer-rest-params*/\\nreturn arguments;}\\n\\n\\n/**\\n * getAnonymousIntrinsics()\\n * Get the intrinsics not otherwise reachable by named own property\\n * traversal from the global object.\\n *\\n * @returns {object}\\n */\\nconst getAnonymousIntrinsics=()=>{\\nconst InertFunction=commons.FERAL_FUNCTION.prototype.constructor;\\n\\n/* 9.2.4.1 %ThrowTypeError%*/\\n\\nconst argsCalleeDesc=commons.getOwnPropertyDescriptor(makeArguments(),'callee');\\nconst ThrowTypeError=argsCalleeDesc&&argsCalleeDesc.get;\\n\\n/* 21.1.5.2 The %StringIteratorPrototype% Object*/\\n\\n/* eslint-disable-next-line no-new-wrappers*/\\nconst StringIteratorObject=commons.iterateString(new commons.String());\\nconst StringIteratorPrototype=commons.getPrototypeOf(StringIteratorObject);\\n\\n/* 21.2.7.1 The %RegExpStringIteratorPrototype% Object*/\\nconst RegExpStringIterator=\\ncommons.regexpPrototype[commons.matchAllSymbol]&&commons.matchAllRegExp(/./);\\nconst RegExpStringIteratorPrototype=\\nRegExpStringIterator&&commons.getPrototypeOf(RegExpStringIterator);\\n\\n/* 22.1.5.2 The %ArrayIteratorPrototype% Object*/\\n\\n/* eslint-disable-next-line no-array-constructor*/\\nconst ArrayIteratorObject=commons.iterateArray([]);\\nconst ArrayIteratorPrototype=commons.getPrototypeOf(ArrayIteratorObject);\\n\\n/* 22.2.1 The %TypedArray% Intrinsic Object*/\\n\\nconst TypedArray=commons.getPrototypeOf(commons.Float32Array);\\n\\n/* 23.1.5.2 The %MapIteratorPrototype% Object*/\\n\\nconst MapIteratorObject=commons.iterateMap(new commons.Map());\\nconst MapIteratorPrototype=commons.getPrototypeOf(MapIteratorObject);\\n\\n/* 23.2.5.2 The %SetIteratorPrototype% Object*/\\n\\nconst SetIteratorObject=commons.iterateSet(new commons.Set());\\nconst SetIteratorPrototype=commons.getPrototypeOf(SetIteratorObject);\\n\\n/* 25.1.2 The %IteratorPrototype% Object*/\\n\\nconst IteratorPrototype=commons.getPrototypeOf(ArrayIteratorPrototype);\\n\\n/* 25.2.1 The GeneratorFunction Constructor*/\\n\\n/* eslint-disable-next-line no-empty-function*/\\nfunction*GeneratorFunctionInstance(){}\\nconst GeneratorFunction=getConstructorOf(GeneratorFunctionInstance);\\n\\n/* 25.2.3 Properties of the GeneratorFunction Prototype Object*/\\n\\nconst Generator=GeneratorFunction.prototype;\\n\\n/* 25.3.1 The AsyncGeneratorFunction Constructor*/\\n\\n/* eslint-disable-next-line no-empty-function*/\\nasync function*AsyncGeneratorFunctionInstance(){}\\nconst AsyncGeneratorFunction=getConstructorOf(\\nAsyncGeneratorFunctionInstance);\\n\\n\\n/* 25.3.2.2 AsyncGeneratorFunction.prototype*/\\nconst AsyncGenerator=AsyncGeneratorFunction.prototype;\\n/* 25.5.1 Properties of the AsyncGenerator Prototype Object*/\\nconst AsyncGeneratorPrototype=AsyncGenerator.prototype;\\nconst AsyncIteratorPrototype=commons.getPrototypeOf(AsyncGeneratorPrototype);\\n\\n/* 25.7.1 The AsyncFunction Constructor*/\\n\\n/* eslint-disable-next-line no-empty-function*/\\nasync function AsyncFunctionInstance(){}\\nconst AsyncFunction=getConstructorOf(AsyncFunctionInstance);\\n\\nconst intrinsics={\\n'%InertFunction%':InertFunction,\\n'%ArrayIteratorPrototype%':ArrayIteratorPrototype,\\n'%InertAsyncFunction%':AsyncFunction,\\n'%AsyncGenerator%':AsyncGenerator,\\n'%InertAsyncGeneratorFunction%':AsyncGeneratorFunction,\\n'%AsyncGeneratorPrototype%':AsyncGeneratorPrototype,\\n'%AsyncIteratorPrototype%':AsyncIteratorPrototype,\\n'%Generator%':Generator,\\n'%InertGeneratorFunction%':GeneratorFunction,\\n'%IteratorPrototype%':IteratorPrototype,\\n'%MapIteratorPrototype%':MapIteratorPrototype,\\n'%RegExpStringIteratorPrototype%':RegExpStringIteratorPrototype,\\n'%SetIteratorPrototype%':SetIteratorPrototype,\\n'%StringIteratorPrototype%':StringIteratorPrototype,\\n'%ThrowTypeError%':ThrowTypeError,\\n'%TypedArray%':TypedArray,\\n'%InertCompartment%':compartment.InertCompartment};\\n\\n\\nif(commons.globalThis.Iterator){\\nintrinsics['%IteratorHelperPrototype%']=commons.getPrototypeOf(\\n/* eslint-disable-next-line @endo/no-polymorphic-call*/\\ncommons.globalThis.Iterator.from([]).take(0));\\n\\nintrinsics['%WrapForValidIteratorPrototype%']=commons.getPrototypeOf(\\n/* eslint-disable-next-line @endo/no-polymorphic-call*/\\ncommons.globalThis.Iterator.from({\\nnext(){\\nreturn{value:undefined};}}));}\\n\\n\\n\\n\\n\\nif(commons.globalThis.AsyncIterator){\\nintrinsics['%AsyncIteratorHelperPrototype%']=commons.getPrototypeOf(\\n/* eslint-disable-next-line @endo/no-polymorphic-call*/\\ncommons.globalThis.AsyncIterator.from([]).take(0));\\n\\nintrinsics['%WrapForValidAsyncIteratorPrototype%']=commons.getPrototypeOf(\\n/* eslint-disable-next-line @endo/no-polymorphic-call*/\\ncommons.globalThis.AsyncIterator.from({next(){}}));}\\n\\n\\n\\nreturn intrinsics;};exports.getAnonymousIntrinsics=getAnonymousIntrinsics;\",\n \"node_modules/ses/src/get-source-url.js\": \"'use strict';Object.defineProperty(exports,'__esModule',{value:true});var\\n\\ncommons=require('./commons.js');/* Captures a key and value of the form #key=value or @key=value*/\\nconst sourceMetaEntryRegExp=\\n'\\\\\\\\s*[@#]\\\\\\\\s*([a-zA-Z][a-zA-Z0-9]*)\\\\\\\\s*=\\\\\\\\s*([^\\\\\\\\s\\\\\\\\*]*)';\\n/* Captures either a one-line or multi-line comment containing*/\\n/* one #key=value or @key=value.*/\\n/* Produces two pairs of capture groups, but the initial two may be undefined.*/\\n/* On account of the mechanics of regular expressions, scanning from the end*/\\n/* does not allow us to capture every pair, so getSourceURL must capture and*/\\n/* trim until there are no matching comments.*/\\nconst sourceMetaEntriesRegExp=new commons.FERAL_REG_EXP(\\n`(?:\\\\\\\\s*//${sourceMetaEntryRegExp}|/\\\\\\\\*${sourceMetaEntryRegExp}\\\\\\\\s*\\\\\\\\*/)\\\\\\\\s*$`);\\n\\n\\n/**\\n * @param {string} src\\n */\\nconst getSourceURL=(src)=>{\\nlet sourceURL='<unknown>';\\n\\n/* Our regular expression matches the last one or two comments with key value*/\\n/* pairs at the end of the source, avoiding a scan over the entire length of*/\\n/* the string, but at the expense of being able to capture all the (key,*/\\n/* value) pair meta comments at the end of the source, which may include*/\\n/* sourceMapURL in addition to sourceURL.*/\\n/* So, we sublimate the comments out of the source until no source or no*/\\n/* comments remain.*/\\nwhile(src.length>0){\\nconst match=commons.regexpExec(sourceMetaEntriesRegExp,src);\\nif(match===null){\\nbreak;}\\n\\nsrc=commons.stringSlice(src,0,src.length-match[0].length);\\n\\n/* We skip $0 since it contains the entire match.*/\\n/* The match contains four capture groups,*/\\n/* two (key, value) pairs, the first of which*/\\n/* may be undefined.*/\\n/* On the off-chance someone put two sourceURL comments in their code with*/\\n/* different commenting conventions, the latter has precedence.*/\\nif(match[3]==='sourceURL'){\\nsourceURL=match[4];}else\\nif(match[1]==='sourceURL'){\\nsourceURL=match[2];}}\\n\\n\\n\\nreturn sourceURL;};exports.getSourceURL=getSourceURL;\",\n \"node_modules/ses/src/global-object.js\": \"'use strict';Object.defineProperty(exports,'__esModule',{value:true});var commons=require('./commons.js');var makeEvalFunction=require('./make-eval-function.js');var makeFunctionConstructor=require('./make-function-constructor.js');var\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\npermits=require('./permits.js');/**\\n * The host's ordinary global object is not provided by a `with` block, so\\n * assigning to Symbol.unscopables has no effect.\\n * Since this shim uses `with` blocks to create a confined lexical scope for\\n * guest programs, we cannot emulate the proper behavior.\\n * With this shim, assigning Symbol.unscopables causes the given lexical\\n * names to fall through to the terminal scope proxy.\\n * But, we can install this setter to prevent a program from proceding on\\n * this false assumption.\\n *\\n * @param {object} globalObject\\n */\\nconst setGlobalObjectSymbolUnscopables=(globalObject)=>{\\ncommons.defineProperty(\\nglobalObject,\\ncommons.unscopablesSymbol,\\ncommons.freeze(\\ncommons.assign(commons.create(null),{\\nset:commons.freeze(()=>{\\nthrow commons.TypeError(\\n`Cannot set Symbol.unscopables of a Compartment's globalThis`);}),\\n\\n\\nenumerable:false,\\nconfigurable:false})));};\\n\\n\\n\\n\\n\\n/**\\n * setGlobalObjectConstantProperties()\\n * Initializes a new global object using a process similar to ECMA specifications\\n * (SetDefaultGlobalBindings). This process is split between this function and\\n * `setGlobalObjectMutableProperties`.\\n *\\n * @param {object} globalObject\\n */\\nconst setGlobalObjectConstantProperties=(globalObject)=>{\\nfor(const[name,constant]of commons.entries(permits.constantProperties)){\\ncommons.defineProperty(globalObject,name,{\\nvalue:constant,\\nwritable:false,\\nenumerable:false,\\nconfigurable:false});}};\\n\\n\\n\\n\\n/**\\n * setGlobalObjectMutableProperties()\\n * Create new global object using a process similar to ECMA specifications\\n * (portions of SetRealmGlobalObject and SetDefaultGlobalBindings).\\n * `newGlobalPropertyNames` should be either `initialGlobalPropertyNames` or\\n * `sharedGlobalPropertyNames`.\\n *\\n * @param {object} globalObject\\n * @param {object} args\\n * @param {object} args.intrinsics\\n * @param {object} args.newGlobalPropertyNames\\n * @param {Function} args.makeCompartmentConstructor\\n * @param {(object) => void} args.markVirtualizedNativeFunction\\n * @param {Compartment} [args.parentCompartment]\\n */\\nconst setGlobalObjectMutableProperties=(\\nglobalObject,\\n{\\nintrinsics,\\nnewGlobalPropertyNames,\\nmakeCompartmentConstructor,\\nmarkVirtualizedNativeFunction,\\nparentCompartment})=>\\n\\n{\\nfor(const[name,intrinsicName]of commons.entries(permits.universalPropertyNames)){\\nif(commons.objectHasOwnProperty(intrinsics,intrinsicName)){\\ncommons.defineProperty(globalObject,name,{\\nvalue:intrinsics[intrinsicName],\\nwritable:true,\\nenumerable:false,\\nconfigurable:true});}}\\n\\n\\n\\n\\nfor(const[name,intrinsicName]of commons.entries(newGlobalPropertyNames)){\\nif(commons.objectHasOwnProperty(intrinsics,intrinsicName)){\\ncommons.defineProperty(globalObject,name,{\\nvalue:intrinsics[intrinsicName],\\nwritable:true,\\nenumerable:false,\\nconfigurable:true});}}\\n\\n\\n\\n\\nconst perCompartmentGlobals={\\nglobalThis:globalObject};\\n\\n\\nperCompartmentGlobals.Compartment=commons.freeze(\\nmakeCompartmentConstructor(\\nmakeCompartmentConstructor,\\nintrinsics,\\nmarkVirtualizedNativeFunction,\\nparentCompartment));\\n\\n\\n\\n/* TODO These should still be tamed according to the whitelist before*/\\n/* being made available.*/\\nfor(const[name,value]of commons.entries(perCompartmentGlobals)){\\ncommons.defineProperty(globalObject,name,{\\nvalue,\\nwritable:true,\\nenumerable:false,\\nconfigurable:true});\\n\\nif(typeof value==='function'){\\nmarkVirtualizedNativeFunction(value);}}};\\n\\n\\n\\n\\n/**\\n * setGlobalObjectEvaluators()\\n * Set the eval and the Function evaluator on the global object with given evalTaming policy.\\n *\\n * @param {object} globalObject\\n * @param {Function} evaluator\\n * @param {(object) => void} markVirtualizedNativeFunction\\n */\\nconst setGlobalObjectEvaluators=(\\nglobalObject,\\nevaluator,\\nmarkVirtualizedNativeFunction)=>\\n{\\n{\\nconst f=commons.freeze(makeEvalFunction.makeEvalFunction(evaluator));\\nmarkVirtualizedNativeFunction(f);\\ncommons.defineProperty(globalObject,'eval',{\\nvalue:f,\\nwritable:true,\\nenumerable:false,\\nconfigurable:true});}\\n\\n\\n{\\nconst f=commons.freeze(makeFunctionConstructor.makeFunctionConstructor(evaluator));\\nmarkVirtualizedNativeFunction(f);\\ncommons.defineProperty(globalObject,'Function',{\\nvalue:f,\\nwritable:true,\\nenumerable:false,\\nconfigurable:true});}};exports.setGlobalObjectConstantProperties=setGlobalObjectConstantProperties;exports.setGlobalObjectEvaluators=setGlobalObjectEvaluators;exports.setGlobalObjectMutableProperties=setGlobalObjectMutableProperties;exports.setGlobalObjectSymbolUnscopables=setGlobalObjectSymbolUnscopables;\",\n \"node_modules/ses/src/intrinsics.js\": \"'use strict';Object.defineProperty(exports,'__esModule',{value:true});var commons=require('./commons.js');var permits=require('./permits.js');\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\nconst isFunction=(obj)=>typeof obj==='function';\\n\\n/* Like defineProperty, but throws if it would modify an existing property.*/\\n/* We use this to ensure that two conflicting attempts to define the same*/\\n/* property throws, causing SES initialization to fail. Otherwise, a*/\\n/* conflict between, for example, two of SES's internal whitelists might*/\\n/* get masked as one overwrites the other. Accordingly, the thrown error*/\\n/* complains of a \\\"Conflicting definition\\\".*/\\nfunction initProperty(obj,name,desc){\\nif(commons.objectHasOwnProperty(obj,name)){\\nconst preDesc=commons.getOwnPropertyDescriptor(obj,name);\\nif(\\n!preDesc||\\n!commons.is(preDesc.value,desc.value)||\\npreDesc.get!==desc.get||\\npreDesc.set!==desc.set||\\npreDesc.writable!==desc.writable||\\npreDesc.enumerable!==desc.enumerable||\\npreDesc.configurable!==desc.configurable)\\n{\\nthrow commons.TypeError(`Conflicting definitions of ${name}`);}}\\n\\n\\ncommons.defineProperty(obj,name,desc);}\\n\\n\\n/* Like defineProperties, but throws if it would modify an existing property.*/\\n/* This ensures that the intrinsics added to the intrinsics collector object*/\\n/* graph do not overlap.*/\\nfunction initProperties(obj,descs){\\nfor(const[name,desc]of commons.entries(descs)){\\ninitProperty(obj,name,desc);}}\\n\\n\\n\\n/* sampleGlobals creates an intrinsics object, suitable for*/\\n/* interinsicsCollector.addIntrinsics, from the named properties of a global*/\\n/* object.*/\\nfunction sampleGlobals(globalObject,newPropertyNames){\\nconst newIntrinsics={__proto__:null};\\nfor(const[globalName,intrinsicName]of commons.entries(newPropertyNames)){\\nif(commons.objectHasOwnProperty(globalObject,globalName)){\\nnewIntrinsics[intrinsicName]=globalObject[globalName];}}\\n\\n\\nreturn newIntrinsics;}\\n\\n\\nconst makeIntrinsicsCollector=()=>{\\n/** @type {Record<any, any>} */\\nconst intrinsics=commons.create(null);\\nlet pseudoNatives;\\n\\nconst addIntrinsics=(newIntrinsics)=>{\\ninitProperties(intrinsics,commons.getOwnPropertyDescriptors(newIntrinsics));};\\n\\ncommons.freeze(addIntrinsics);\\n\\n/* For each intrinsic, if it has a `.prototype` property, use the*/\\n/* whitelist to find out the intrinsic name for that prototype and add it*/\\n/* to the intrinsics.*/\\nconst completePrototypes=()=>{\\nfor(const[name,intrinsic]of commons.entries(intrinsics)){\\nif(!commons.isObject(intrinsic)){\\n/* eslint-disable-next-line no-continue*/\\ncontinue;}\\n\\nif(!commons.objectHasOwnProperty(intrinsic,'prototype')){\\n/* eslint-disable-next-line no-continue*/\\ncontinue;}\\n\\nconst permit=permits.permitted[name];\\nif(typeof permit!=='object'){\\nthrow commons.TypeError(`Expected permit object at whitelist.${name}`);}\\n\\nconst namePrototype=permit.prototype;\\nif(!namePrototype){\\nthrow commons.TypeError(`${name}.prototype property not whitelisted`);}\\n\\nif(\\ntypeof namePrototype!=='string'||\\n!commons.objectHasOwnProperty(permits.permitted,namePrototype))\\n{\\nthrow commons.TypeError(`Unrecognized ${name}.prototype whitelist entry`);}\\n\\nconst intrinsicPrototype=intrinsic.prototype;\\nif(commons.objectHasOwnProperty(intrinsics,namePrototype)){\\nif(intrinsics[namePrototype]!==intrinsicPrototype){\\nthrow commons.TypeError(`Conflicting bindings of ${namePrototype}`);}\\n\\n/* eslint-disable-next-line no-continue*/\\ncontinue;}\\n\\nintrinsics[namePrototype]=intrinsicPrototype;}};\\n\\n\\ncommons.freeze(completePrototypes);\\n\\nconst finalIntrinsics=()=>{\\ncommons.freeze(intrinsics);\\npseudoNatives=new commons.WeakSet(commons.arrayFilter(commons.values(intrinsics),isFunction));\\nreturn intrinsics;};\\n\\ncommons.freeze(finalIntrinsics);\\n\\nconst isPseudoNative=(obj)=>{\\nif(!pseudoNatives){\\nthrow commons.TypeError(\\n'isPseudoNative can only be called after finalIntrinsics');}\\n\\n\\nreturn commons.weaksetHas(pseudoNatives,obj);};\\n\\ncommons.freeze(isPseudoNative);\\n\\nconst intrinsicsCollector={\\naddIntrinsics,\\ncompletePrototypes,\\nfinalIntrinsics,\\nisPseudoNative};\\n\\ncommons.freeze(intrinsicsCollector);\\n\\naddIntrinsics(permits.constantProperties);\\naddIntrinsics(sampleGlobals(commons.globalThis,permits.universalPropertyNames));\\n\\nreturn intrinsicsCollector;};\\n\\n\\n/**\\n * getGlobalIntrinsics()\\n * Doesn't tame, delete, or modify anything. Samples globalObject to create an\\n * intrinsics record containing only the whitelisted global variables, listed\\n * by the intrinsic names appropriate for new globals, i.e., the globals of\\n * newly constructed compartments.\\n *\\n * WARNING:\\n * If run before lockdown, the returned intrinsics record will carry the\\n * *original* unsafe (feral, untamed) bindings of these global variables.\\n *\\n * @param {object} globalObject\\n */\\nconst getGlobalIntrinsics=(globalObject)=>{\\nconst{addIntrinsics,finalIntrinsics}=makeIntrinsicsCollector();\\n\\naddIntrinsics(sampleGlobals(globalObject,permits.sharedGlobalPropertyNames));\\n\\nreturn finalIntrinsics();};exports.getGlobalIntrinsics=getGlobalIntrinsics;exports.makeIntrinsicsCollector=makeIntrinsicsCollector;\",\n \"node_modules/ses/src/lockdown-shim.js\": \"'use strict';require('./assert-sloppy-mode.js');var commons=require('./commons.js');var\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\nlockdown=require('./lockdown.js');/* @ts-check*/ /** @import {LockdownOptions} from '../types.js' */ /**\\n * @param {LockdownOptions} [options]\\n */\\ncommons.globalThis.lockdown=(options)=>{\\nconst hardenIntrinsics=lockdown.repairIntrinsics(options);\\ncommons.globalThis.harden=hardenIntrinsics();};\\n\\n\\n/**\\n * @param {LockdownOptions} [options]\\n */\\ncommons.globalThis.repairIntrinsics=(options)=>{\\nconst hardenIntrinsics=lockdown.repairIntrinsics(options);\\n/* Reveal hardenIntrinsics after repairs.*/\\ncommons.globalThis.hardenIntrinsics=()=>{\\n/* Reveal harden after hardenIntrinsics.*/\\n/* Harden is dangerous before hardenIntrinsics because hardening just*/\\n/* about anything will inadvertently render intrinsics irreparable.*/\\n/* Also, for modules that must work both before or after lockdown (code*/\\n/* that is portable between JS and SES), the existence of harden in global*/\\n/* scope signals whether such code should attempt to use harden in the*/\\n/* defense of its own API.*/\\n/* @ts-ignore harden not yet recognized on globalThis.*/\\ncommons.globalThis.harden=hardenIntrinsics();};};\",\n \"node_modules/ses/src/lockdown.js\": \"'use strict';Object.defineProperty(exports,'__esModule',{value:true});require('../../@endo/env-options/index.js');var commons=require('./commons.js');var makeHardener=require('./make-hardener.js');var intrinsics=require('./intrinsics.js');var permitsIntrinsics=require('./permits-intrinsics.js');var tameFunctionConstructors=require('./tame-function-constructors.js');var tameDateConstructor=require('./tame-date-constructor.js');var tameMathObject=require('./tame-math-object.js');var tameRegexpConstructor=require('./tame-regexp-constructor.js');var enablePropertyOverrides=require('./enable-property-overrides.js');var tameLocaleMethods=require('./tame-locale-methods.js');var globalObject=require('./global-object.js');var makeSafeEvaluator=require('./make-safe-evaluator.js');var permits=require('./permits.js');var tameFunctionTostring=require('./tame-function-tostring.js');var tameDomains=require('./tame-domains.js');var tameConsole=require('./error/tame-console.js');var tameErrorConstructor=require('./error/tame-error-constructor.js');var assert=require('./error/assert.js');var getAnonymousIntrinsics=require('./get-anonymous-intrinsics.js');var compartment=require('./compartment.js');var tameHarden=require('./tame-harden.js');var tameSymbolConstructor=require('./tame-symbol-constructor.js');var tameFauxDataProperties=require('./tame-faux-data-properties.js');var tameRegeneratorRuntime=require('./tame-regenerator-runtime.js');var\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\nenvOptions=require('../../@endo/env-options/src/env-options.js');/* Copyright (C) 2018 Agoric*/ /** @import {LockdownOptions} from '../types.js' */\\n\\nconst{Fail,details:X,quote:q}=assert.assert;\\n\\n/** @type {Error=} */\\nlet priorRepairIntrinsics;\\n\\n/** @type {Error=} */\\nlet priorHardenIntrinsics;\\n\\n/* Build a harden() with an empty fringe.*/\\n/* Gate it on lockdown.*/\\n/**\\n * @template T\\n * @param {T} ref\\n * @returns {T}\\n */\\nconst safeHarden=makeHardener.makeHardener();\\n\\n/**\\n * @callback Transform\\n * @param {string} source\\n * @returns {string}\\n */\\n\\n/**\\n * @callback CompartmentConstructor\\n * @param {object} endowments\\n * @param {object} moduleMap\\n * @param {object} [options]\\n * @param {Array<Transform>} [options.transforms]\\n * @param {Array<Transform>} [options.__shimTransforms__]\\n */\\n\\n/* TODO https://github.com/endojs/endo/issues/814*/\\n/* Lockdown currently allows multiple calls provided that the specified options*/\\n/* of every call agree. With experience, we have observed that lockdown should*/\\n/* only ever need to be called once and that simplifying lockdown will improve*/\\n/* the quality of audits.*/\\n\\nconst assertDirectEvalAvailable=()=>{\\nlet allowed=false;\\ntry{\\nallowed=commons.FERAL_FUNCTION(\\n'eval',\\n'SES_changed',\\n`\\\\\\n eval(\\\"SES_changed = true\\\");\\n return SES_changed;\\n `)(\\ncommons.FERAL_EVAL,false);\\n/* If we get here and SES_changed stayed false, that means the eval was sloppy*/\\n/* and indirect, which generally creates a new global.*/\\n/* We are going to throw an exception for failing to initialize SES, but*/\\n/* good neighbors clean up.*/\\nif(!allowed){\\ndelete commons.globalThis.SES_changed;}}\\n\\ncatch(_error){\\n/* We reach here if eval is outright forbidden by a Content Security Policy.*/\\n/* We allow this for SES usage that delegates the responsibility to isolate*/\\n/* guest code to production code generation.*/\\nallowed=true;}\\n\\nif(!allowed){\\n/* See https://github.com/endojs/endo/blob/master/packages/ses/error-codes/SES_DIRECT_EVAL.md*/\\nthrow commons.TypeError(\\n`SES cannot initialize unless 'eval' is the original intrinsic 'eval', suitable for direct-eval (dynamically scoped eval) (SES_DIRECT_EVAL)`);}};\\n\\n\\n\\n\\n/**\\n * @param {LockdownOptions} [options]\\n */\\nconst repairIntrinsics=(options={})=>{\\n/* First time, absent options default to 'safe'.*/\\n/* Subsequent times, absent options default to first options.*/\\n/* Thus, all present options must agree with first options.*/\\n/* Reconstructing `option` here also ensures that it is a well*/\\n/* behaved record, with only own data properties.*/\\n/**/\\n/* The `overrideTaming` is not a safety issue. Rather it is a tradeoff*/\\n/* between code compatibility, which is better with the `'moderate'`*/\\n/* setting, and tool compatibility, which is better with the `'min'`*/\\n/* setting. See*/\\n/* https://github.com/Agoric/SES-shim/blob/master/packages/ses/README.md#enabling-override-by-assignment)*/\\n/* for an explanation of when to use which.*/\\n/**/\\n/* The `stackFiltering` is not a safety issue. Rather it is a tradeoff*/\\n/* between relevance and completeness of the stack frames shown on the*/\\n/* console. Setting`stackFiltering` to `'verbose'` applies no filters, providing*/\\n/* the raw stack frames that can be quite versbose. Setting*/\\n/* `stackFrameFiltering` to`'concise'` limits the display to the stack frame*/\\n/* information most likely to be relevant, eliminating distracting frames*/\\n/* such as those from the infrastructure. However, the bug you're trying to*/\\n/* track down might be in the infrastrure, in which case the `'verbose'` setting*/\\n/* is useful. See*/\\n/* [`stackFiltering` options](https://github.com/Agoric/SES-shim/blob/master/packages/ses/docs/lockdown.md#stackfiltering-options)*/\\n/* for an explanation.*/\\n\\nconst{\\nerrorTaming=envOptions.getEnvironmentOption('LOCKDOWN_ERROR_TAMING','safe'),\\nerrorTrapping=/** @type {\\\"platform\\\" | \\\"none\\\" | \\\"report\\\" | \\\"abort\\\" | \\\"exit\\\" | undefined} */\\nenvOptions.getEnvironmentOption('LOCKDOWN_ERROR_TRAPPING','platform'),\\n\\nunhandledRejectionTrapping=/** @type {\\\"none\\\" | \\\"report\\\" | undefined} */\\nenvOptions.getEnvironmentOption('LOCKDOWN_UNHANDLED_REJECTION_TRAPPING','report'),\\n\\nregExpTaming=envOptions.getEnvironmentOption('LOCKDOWN_REGEXP_TAMING','safe'),\\nlocaleTaming=envOptions.getEnvironmentOption('LOCKDOWN_LOCALE_TAMING','safe'),\\n\\nconsoleTaming=/** @type {'unsafe' | 'safe' | undefined} */\\nenvOptions.getEnvironmentOption('LOCKDOWN_CONSOLE_TAMING','safe'),\\n\\noverrideTaming=envOptions.getEnvironmentOption('LOCKDOWN_OVERRIDE_TAMING','moderate'),\\nstackFiltering=envOptions.getEnvironmentOption('LOCKDOWN_STACK_FILTERING','concise'),\\ndomainTaming=envOptions.getEnvironmentOption('LOCKDOWN_DOMAIN_TAMING','safe'),\\nevalTaming=envOptions.getEnvironmentOption('LOCKDOWN_EVAL_TAMING','safeEval'),\\noverrideDebug=commons.arrayFilter(\\ncommons.stringSplit(envOptions.getEnvironmentOption('LOCKDOWN_OVERRIDE_DEBUG',''),','),\\n/** @param {string} debugName */\\n(debugName)=>debugName!==''),\\n\\nlegacyRegeneratorRuntimeTaming=envOptions.getEnvironmentOption(\\n'LOCKDOWN_LEGACY_REGENERATOR_RUNTIME_TAMING',\\n'safe'),\\n\\n__hardenTaming__=envOptions.getEnvironmentOption('LOCKDOWN_HARDEN_TAMING','safe'),\\ndateTaming='safe',/* deprecated*/\\nmathTaming='safe',/* deprecated*/\\n...extraOptions}=\\noptions;\\n\\nlegacyRegeneratorRuntimeTaming==='safe'||\\nlegacyRegeneratorRuntimeTaming==='unsafe-ignore'||\\nFail`lockdown(): non supported option legacyRegeneratorRuntimeTaming: ${q(legacyRegeneratorRuntimeTaming)}`;\\n\\nevalTaming==='unsafeEval'||\\nevalTaming==='safeEval'||\\nevalTaming==='noEval'||\\nFail`lockdown(): non supported option evalTaming: ${q(evalTaming)}`;\\n\\n/* Assert that only supported options were passed.*/\\n/* Use Reflect.ownKeys to reject symbol-named properties as well.*/\\nconst extraOptionsNames=commons.ownKeys(extraOptions);\\nextraOptionsNames.length===0||\\nFail`lockdown(): non supported option ${q(extraOptionsNames)}`;\\n\\npriorRepairIntrinsics===undefined||\\n/* eslint-disable-next-line @endo/no-polymorphic-call*/\\nassert.assert.fail(\\nX`Already locked down at ${priorRepairIntrinsics} (SES_ALREADY_LOCKED_DOWN)`,\\ncommons.TypeError);\\n\\n/* See https://github.com/endojs/endo/blob/master/packages/ses/error-codes/SES_ALREADY_LOCKED_DOWN.md*/\\npriorRepairIntrinsics=commons.TypeError('Prior lockdown (SES_ALREADY_LOCKED_DOWN)');\\n/* Tease V8 to generate the stack string and release the closures the stack*/\\n/* trace retained:*/\\npriorRepairIntrinsics.stack;\\n\\nassertDirectEvalAvailable();\\n\\n/**\\n * Because of packagers and bundlers, etc, multiple invocations of lockdown\\n * might happen in separate instantiations of the source of this module.\\n * In that case, each one sees its own `firstOptions` variable, so the test\\n * above will not detect that lockdown has already happened. We\\n * unreliably test some telltale signs that lockdown has run, to avoid\\n * trying to lock down a locked down environment. Although the test is\\n * unreliable, this is consistent with the SES threat model. SES provides\\n * security only if it runs first in a given realm, or if everything that\\n * runs before it is SES-aware and cooperative. Neither SES nor anything\\n * can protect itself from corrupting code that runs first. For these\\n * purposes, code that turns a realm into something that passes these\\n * tests without actually locking down counts as corrupting code.\\n *\\n * The specifics of what this tests for may change over time, but it\\n * should be consistent with any setting of the lockdown options.\\n */\\nconst seemsToBeLockedDown=()=>{\\nreturn(\\ncommons.globalThis.Function.prototype.constructor!==commons.globalThis.Function&&\\n/* @ts-ignore harden is absent on globalThis type def.*/\\ntypeof commons.globalThis.harden==='function'&&\\n/* @ts-ignore lockdown is absent on globalThis type def.*/\\ntypeof commons.globalThis.lockdown==='function'&&\\ncommons.globalThis.Date.prototype.constructor!==commons.globalThis.Date&&\\ntypeof commons.globalThis.Date.now==='function'&&\\n/* @ts-ignore does not recognize that Date constructor is a special*/\\n/* Function.*/\\n/* eslint-disable-next-line @endo/no-polymorphic-call*/\\ncommons.is(commons.globalThis.Date.prototype.constructor.now(),NaN));};\\n\\n\\n\\nif(seemsToBeLockedDown()){\\n/* See https://github.com/endojs/endo/blob/master/packages/ses/error-codes/SES_MULTIPLE_INSTANCES.md*/\\nthrow commons.TypeError(\\n`Already locked down but not by this SES instance (SES_MULTIPLE_INSTANCES)`);}\\n\\n\\n\\n/**\\n * 1. TAME powers & gather intrinsics first.\\n */\\n\\ntameDomains.tameDomains(domainTaming);\\n\\n/* Replace Function.prototype.toString with one that recognizes*/\\n/* shimmed functions as honorary native functions.*/\\nconst markVirtualizedNativeFunction=tameFunctionTostring.tameFunctionToString();\\n\\nconst{addIntrinsics,completePrototypes,finalIntrinsics}=\\nintrinsics.makeIntrinsicsCollector();\\n\\n/* @ts-expect-error __hardenTaming__ could be any string*/\\nconst tamedHarden=tameHarden.tameHarden(safeHarden,__hardenTaming__);\\naddIntrinsics({harden:tamedHarden});\\n\\naddIntrinsics(tameFunctionConstructors[\\\"default\\\"]());\\n\\naddIntrinsics(tameDateConstructor[\\\"default\\\"](dateTaming));\\naddIntrinsics(tameErrorConstructor[\\\"default\\\"](errorTaming,stackFiltering));\\naddIntrinsics(tameMathObject[\\\"default\\\"](mathTaming));\\naddIntrinsics(tameRegexpConstructor[\\\"default\\\"](regExpTaming));\\naddIntrinsics(tameSymbolConstructor.tameSymbolConstructor());\\n\\naddIntrinsics(getAnonymousIntrinsics.getAnonymousIntrinsics());\\n\\ncompletePrototypes();\\n\\nconst intrinsics$1=finalIntrinsics();\\n\\nconst hostIntrinsics={__proto__:null};\\n\\n/* The Node.js Buffer is a derived class of Uint8Array, and as such is often*/\\n/* passed around where a Uint8Array is expected.*/\\nif(typeof commons.globalThis.Buffer==='function'){\\nhostIntrinsics.Buffer=commons.globalThis.Buffer;}\\n\\n\\n/**\\n * Wrap console unless suppressed.\\n * At the moment, the console is considered a host power in the start\\n * compartment, and not a primordial. Hence it is absent from the whilelist\\n * and bypasses the intrinsicsCollector.\\n *\\n * @type {((error: any) => string | undefined) | undefined}\\n */\\nlet optGetStackString;\\nif(errorTaming==='safe'){\\noptGetStackString=intrinsics$1['%InitialGetStackString%'];}\\n\\nconst consoleRecord=tameConsole.tameConsole(\\nconsoleTaming,\\nerrorTrapping,\\nunhandledRejectionTrapping,\\noptGetStackString);\\n\\ncommons.globalThis.console=/** @type {Console} */consoleRecord.console;\\n\\n/* The untamed Node.js console cannot itself be hardened as it has mutable*/\\n/* internal properties, but some of these properties expose internal versions*/\\n/* of classes from node's \\\"primordials\\\" concept.*/\\n/* eslint-disable-next-line no-underscore-dangle*/\\nif(typeof/** @type {any} */consoleRecord.console._times==='object'){\\n/* SafeMap is a derived Map class used internally by Node*/\\n/* There doesn't seem to be a cleaner way to reach it.*/\\nhostIntrinsics.SafeMap=commons.getPrototypeOf(\\n/* eslint-disable-next-line no-underscore-dangle*/\\n/** @type {any} */consoleRecord.console._times);}\\n\\n\\n\\n/* @ts-ignore assert is absent on globalThis type def.*/\\nif(\\n(errorTaming==='unsafe'||errorTaming==='unsafe-debug')&&\\ncommons.globalThis.assert===assert.assert)\\n{\\n/* If errorTaming is 'unsafe' or 'unsafe-debug' we replace the*/\\n/* global assert with*/\\n/* one whose `details` template literal tag does not redact*/\\n/* unmarked substitution values. IOW, it blabs information that*/\\n/* was supposed to be secret from callers, as an aid to debugging*/\\n/* at a further cost in safety.*/\\n/* @ts-ignore assert is absent on globalThis type def.*/\\ncommons.globalThis.assert=assert.makeAssert(undefined,true);}\\n\\n\\n/* Replace *Locale* methods with their non-locale equivalents*/\\ntameLocaleMethods[\\\"default\\\"](intrinsics$1,localeTaming);\\n\\ntameFauxDataProperties.tameFauxDataProperties(intrinsics$1);\\n\\n/**\\n * 2. WHITELIST to standardize the environment.\\n */\\n\\n/* Remove non-standard properties.*/\\n/* All remaining function encountered during whitelisting are*/\\n/* branded as honorary native functions.*/\\npermitsIntrinsics[\\\"default\\\"](intrinsics$1,markVirtualizedNativeFunction);\\n\\n/* Initialize the powerful initial global, i.e., the global of the*/\\n/* start compartment, from the intrinsics.*/\\n\\nglobalObject.setGlobalObjectConstantProperties(commons.globalThis);\\n\\nglobalObject.setGlobalObjectMutableProperties(commons.globalThis,{\\nintrinsics:intrinsics$1,\\nnewGlobalPropertyNames:permits.initialGlobalPropertyNames,\\nmakeCompartmentConstructor:compartment.makeCompartmentConstructor,\\nmarkVirtualizedNativeFunction});\\n\\n\\nif(evalTaming==='noEval'){\\nglobalObject.setGlobalObjectEvaluators(\\ncommons.globalThis,\\ncommons.noEvalEvaluate,\\nmarkVirtualizedNativeFunction);}else\\n\\nif(evalTaming==='safeEval'){\\nconst{safeEvaluate}=makeSafeEvaluator.makeSafeEvaluator({globalObject:commons.globalThis});\\nglobalObject.setGlobalObjectEvaluators(\\ncommons.globalThis,\\nsafeEvaluate,\\nmarkVirtualizedNativeFunction);}else\\n\\nif(evalTaming==='unsafeEval'){\\n/* Leave eval function and Function constructor of the initial compartment in-tact.*/\\n/* Other compartments will not have access to these evaluators unless a guest program*/\\n/* escapes containment.*/}\\n\\n\\n/**\\n * 3. HARDEN to share the intrinsics.\\n *\\n * We define hardenIntrinsics here so that options are in scope, but return\\n * it to the caller because we intend to eventually allow vetted shims to run\\n * between repairs and the hardening of intrinsics and so we can benchmark\\n * repair separately from hardening.\\n */\\n\\nconst hardenIntrinsics=()=>{\\npriorHardenIntrinsics===undefined||\\n/* eslint-disable-next-line @endo/no-polymorphic-call*/\\nassert.assert.fail(\\nX`Already locked down at ${priorHardenIntrinsics} (SES_ALREADY_LOCKED_DOWN)`,\\ncommons.TypeError);\\n\\n/* See https://github.com/endojs/endo/blob/master/packages/ses/error-codes/SES_ALREADY_LOCKED_DOWN.md*/\\npriorHardenIntrinsics=commons.TypeError(\\n'Prior lockdown (SES_ALREADY_LOCKED_DOWN)');\\n\\n/* Tease V8 to generate the stack string and release the closures the stack*/\\n/* trace retained:*/\\npriorHardenIntrinsics.stack;\\n\\n/* Circumvent the override mistake.*/\\n/* TODO consider moving this to the end of the repair phase, and*/\\n/* therefore before vetted shims rather than afterwards. It is not*/\\n/* clear yet which is better.*/\\n/* @ts-ignore enablePropertyOverrides does its own input validation*/\\nenablePropertyOverrides[\\\"default\\\"](intrinsics$1,overrideTaming,overrideDebug);\\nif(legacyRegeneratorRuntimeTaming==='unsafe-ignore'){\\ntameRegeneratorRuntime.tameRegeneratorRuntime();}\\n\\n\\n/* Finally register and optionally freeze all the intrinsics. This*/\\n/* must be the operation that modifies the intrinsics.*/\\nconst toHarden={\\nintrinsics:intrinsics$1,\\nhostIntrinsics,\\nglobals:{\\n/* Harden evaluators*/\\nFunction:commons.globalThis.Function,\\neval:commons.globalThis.eval,\\n/* @ts-ignore Compartment does exist on globalThis*/\\nCompartment:commons.globalThis.Compartment,\\n\\n/* Harden Symbol*/\\nSymbol:commons.globalThis.Symbol}};\\n\\n\\n\\n/* Harden Symbol and properties for initialGlobalPropertyNames in the host realm*/\\nfor(const prop of commons.getOwnPropertyNames(permits.initialGlobalPropertyNames)){\\ntoHarden.globals[prop]=commons.globalThis[prop];}\\n\\n\\ntamedHarden(toHarden);\\n\\nreturn tamedHarden;};\\n\\n\\nreturn hardenIntrinsics;};exports.repairIntrinsics=repairIntrinsics;\",\n \"node_modules/ses/src/make-eval-function.js\": \"'use strict';Object.defineProperty(exports,'__esModule',{value:true});/**\\n * makeEvalFunction()\\n * A safe version of the native eval function which relies on\\n * the safety of safeEvaluate for confinement.\\n *\\n * @param {Function} safeEvaluate\\n */\\nconst makeEvalFunction=(safeEvaluate)=>{\\n/* We use the concise method syntax to create an eval without a*/\\n/* [[Construct]] behavior (such that the invocation \\\"new eval()\\\" throws*/\\n/* TypeError: eval is not a constructor\\\"), but which still accepts a*/\\n/* 'this' binding.*/\\nconst newEval={\\neval(source){\\nif(typeof source!=='string'){\\n/* As per the runtime semantic of PerformEval [ECMAScript 18.2.1.1]:*/\\n/* If Type(source) is not String, return source.*/\\n/* TODO Recent proposals from Mike Samuel may change this non-string*/\\n/* rule. Track.*/\\nreturn source;}\\n\\nreturn safeEvaluate(source);}}.\\n\\neval;\\n\\nreturn newEval;};exports.makeEvalFunction=makeEvalFunction;\",\n \"node_modules/ses/src/make-evaluate.js\": \"'use strict';Object.defineProperty(exports,'__esModule',{value:true});var commons=require('./commons.js');var\\n\\n\\n\\n\\nscopeConstants=require('./scope-constants.js');/* @ts-check*/ /**\\n * buildOptimizer()\\n * Given an array of identifiers, the optimizer returns a `const` declaration\\n * destructuring `this.${name}`.\\n *\\n * @param {Array<string>} constants\\n * @param {string} name\\n */\\nfunction buildOptimizer(constants,name){\\n/* No need to build an optimizer when there are no constants.*/\\nif(constants.length===0)return'';\\n/* Use 'this' to avoid going through the scope proxy, which is unnecessary*/\\n/* since the optimizer only needs references to the safe global.*/\\n/* Destructure the constants from the target scope object.*/\\nreturn`const {${commons.arrayJoin(constants,',')}} = this.${name};`;}\\n\\n\\n/**\\n * makeEvaluate()\\n * Create an 'evaluate' function with the correct optimizer inserted.\\n *\\n * @param {object} context\\n * @param {object} context.evalScope\\n * @param {object} context.moduleLexicals\\n * @param {object} context.globalObject\\n * @param {object} context.scopeTerminator\\n */\\nconst makeEvaluate=(context)=>{\\nconst{globalObjectConstants,moduleLexicalConstants}=scopeConstants.getScopeConstants(\\ncontext.globalObject,\\ncontext.moduleLexicals);\\n\\nconst globalObjectOptimizer=buildOptimizer(\\nglobalObjectConstants,\\n'globalObject');\\n\\nconst moduleLexicalOptimizer=buildOptimizer(\\nmoduleLexicalConstants,\\n'moduleLexicals');\\n\\n\\n/* Create a function in sloppy mode, so that we can use 'with'. It returns*/\\n/* a function in strict mode that evaluates the provided code using direct*/\\n/* eval, and thus in strict mode in the same scope. We must be very careful*/\\n/* to not create new names in this scope*/\\n\\n/* 1: we use multiple nested 'with' to catch all free variable names. The*/\\n/* `this` value of the outer sloppy function holds the different scope*/\\n/* layers, from inner to outer:*/\\n/* a) `evalScope` which must release the `FERAL_EVAL` as 'eval' once for*/\\n/* every invocation of the inner `evaluate` function in order to*/\\n/* trigger direct eval. The direct eval semantics is what allows the*/\\n/* evaluated code to lookup free variable names on the other scope*/\\n/* objects and not in global scope.*/\\n/* b) `moduleLexicals` which provide a way to introduce free variables*/\\n/* that are not available on the globalObject.*/\\n/* c) `globalObject` is the global scope object of the evaluator, aka the*/\\n/* Compartment's `globalThis`.*/\\n/* d) `scopeTerminator` is a proxy object which prevents free variable*/\\n/* lookups to escape to the start compartment's global object.*/\\n/* 2: `optimizer`s catch constant variable names for speed.*/\\n/* 3: The inner strict `evaluate` function should be passed two parameters:*/\\n/* a) its arguments[0] is the source to be directly evaluated.*/\\n/* b) its 'this' is the this binding seen by the code being*/\\n/* directly evaluated (the globalObject).*/\\n\\n/* Notes:*/\\n/* - The `optimizer` strings only lookup values on the `globalObject` and*/\\n/* `moduleLexicals` objects by construct. Keywords like 'function' are*/\\n/* reserved and cannot be used as a variable, so they are excluded from the*/\\n/* optimizer. Furthermore to prevent shadowing 'eval', while a valid*/\\n/* identifier, that name is also explicitly excluded.*/\\n/* - when 'eval' is looked up in the `evalScope`, the powerful unsafe eval*/\\n/* intrinsic is returned after automatically removing it from the*/\\n/* `evalScope`. Any further reference to 'eval' in the evaluate string will*/\\n/* get the tamed evaluator from the `globalObject`, if any.*/\\n\\n/* TODO https://github.com/endojs/endo/issues/816*/\\n/* The optimizer currently runs under sloppy mode, and although we doubt that*/\\n/* there is any vulnerability introduced just by running the optimizer*/\\n/* sloppy, we are much more confident in the semantics of strict mode.*/\\n/* The `evaluate` function can be and is reused across multiple evaluations.*/\\n/* Since the optimizer should not be re-evaluated every time, it cannot be*/\\n/* inside the `evaluate` closure. While we could potentially nest an*/\\n/* intermediate layer of `() => {'use strict'; ${optimizers}; ...`, it*/\\n/* doesn't seem worth the overhead and complexity.*/\\nconst evaluateFactory=commons.FERAL_FUNCTION(`\\n with (this.scopeTerminator) {\\n with (this.globalObject) {\\n with (this.moduleLexicals) {\\n with (this.evalScope) {\\n ${globalObjectOptimizer}\\n ${moduleLexicalOptimizer}\\n return function() {\\n 'use strict';\\n return eval(arguments[0]);\\n };\\n }\\n }\\n }\\n }\\n `);\\n\\nreturn commons.apply(evaluateFactory,context,[]);};exports.makeEvaluate=makeEvaluate;\",\n \"node_modules/ses/src/make-function-constructor.js\": \"'use strict';Object.defineProperty(exports,'__esModule',{value:true});var commons=require('./commons.js');var assert=require('./error/assert.js');\\n\\n\\n\\n\\n\\n\\n\\n\\nconst{Fail}=assert.assert;\\n\\n/* * makeFunctionConstructor()\\n * A safe version of the native Function which relies on\\n * the safety of safeEvaluate for confinement.\\n */\\n\\nconst makeFunctionConstructor=(safeEvaluate)=>{\\n/* Define an unused parameter to ensure Function.length === 1*/\\nconst newFunction=function Function(_body){\\n/* Sanitize all parameters at the entry point.*/\\n/* eslint-disable-next-line prefer-rest-params*/\\nconst bodyText=`${commons.arrayPop(arguments)||''}`;\\n/* eslint-disable-next-line prefer-rest-params*/\\nconst parameters=`${commons.arrayJoin(arguments,',')}`;\\n\\n/* Are parameters and bodyText valid code, or is someone*/\\n/* attempting an injection attack? This will throw a SyntaxError if:*/\\n/* - parameters doesn't parse as parameters*/\\n/* - bodyText doesn't parse as a function body*/\\n/* - either contain a call to super() or references a super property.*/\\n/**/\\n/* It seems that XS may still be vulnerable to the attack explained at*/\\n/* https://github.com/tc39/ecma262/pull/2374#issuecomment-813769710*/\\n/* where `new Function('/*', '*X/ ) {')` would incorrectly validate.*/\\n/* Before we worried about this, we check the parameters and bodyText*/\\n/* together in one call*/\\n/* ```js*/\\n/* new FERAL_FUNCTION(parameters, bodyTest);*/\\n/* ```*/\\n/* However, this check is vulnerable to that bug. Aside from that case,*/\\n/* all engines do seem to validate the parameters, taken by themselves,*/\\n/* correctly. And all engines do seem to validate the bodyText, taken*/\\n/* by itself correctly. So with the following two checks, SES builds a*/\\n/* correct safe `Function` constructor by composing two calls to an*/\\n/* original unsafe `Function` constructor that may suffer from this bug*/\\n/* but is otherwise correctly validating.*/\\n/**/\\n/* eslint-disable-next-line no-new*/\\nnew commons.FERAL_FUNCTION(parameters,'');\\n/* eslint-disable-next-line no-new*/\\nnew commons.FERAL_FUNCTION(bodyText);\\n\\n/* Safe to be combined. Defeat potential trailing comments.*/\\n/* TODO: since we create an anonymous function, the 'this' value*/\\n/* isn't bound to the global object as per specs, but set as undefined.*/\\nconst src=`(function anonymous(${parameters}\\\\n) {\\\\n${bodyText}\\\\n})`;\\nreturn safeEvaluate(src);};\\n\\n\\ncommons.defineProperties(newFunction,{\\n/* Ensure that any function created in any evaluator in a realm is an*/\\n/* instance of Function in any evaluator of the same realm.*/\\nprototype:{\\nvalue:commons.FERAL_FUNCTION.prototype,\\nwritable:false,\\nenumerable:false,\\nconfigurable:false}});\\n\\n\\n\\n/* Assert identity of Function.__proto__ accross all compartments*/\\ncommons.getPrototypeOf(commons.FERAL_FUNCTION)===commons.FERAL_FUNCTION.prototype||\\nFail`Function prototype is the same accross compartments`;\\ncommons.getPrototypeOf(newFunction)===commons.FERAL_FUNCTION.prototype||\\nFail`Function constructor prototype is the same accross compartments`;\\n\\nreturn newFunction;};exports.makeFunctionConstructor=makeFunctionConstructor;\",\n \"node_modules/ses/src/make-hardener.js\": \"'use strict';Object.defineProperty(exports,'__esModule',{value:true});var commons=require('./commons.js');var\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\nassert=require('./error/assert.js');/* Adapted from SES/Caja - Copyright (C) 2011 Google Inc.*/ /**\\n * @import {Harden} from '../types.js'\\n */ /* Obtain the string tag accessor of of TypedArray so we can indirectly use the*/ /* TypedArray brand check it employs.*/const typedArrayToStringTag=commons.getOwnPropertyDescriptor(commons.typedArrayPrototype,\\ncommons.toStringTagSymbol);\\n\\nassert.assert(typedArrayToStringTag);\\nconst getTypedArrayToStringTag=typedArrayToStringTag.get;\\nassert.assert(getTypedArrayToStringTag);\\n\\n/* Exported for tests.*/\\n/**\\n * Duplicates packages/marshal/src/helpers/passStyle-helpers.js to avoid a dependency.\\n *\\n * @param {unknown} object\\n */\\nconst isTypedArray=(object)=>{\\n/* The object must pass a brand check or toStringTag will return undefined.*/\\nconst tag=commons.apply(getTypedArrayToStringTag,object,[]);\\nreturn tag!==undefined;};\\n\\n\\n/**\\n * Tests if a property key is an integer-valued canonical numeric index.\\n * https://tc39.es/ecma262/#sec-canonicalnumericindexstring\\n *\\n * @param {string | symbol} propertyKey\\n */\\nconst isCanonicalIntegerIndexString=(propertyKey)=>{\\nconst n=+commons.String(propertyKey);\\nreturn commons.isInteger(n)&&commons.String(n)===propertyKey;};\\n\\n\\n/**\\n * @template T\\n * @param {ArrayLike<T>} array\\n */\\nconst freezeTypedArray=(array)=>{\\ncommons.preventExtensions(array);\\n\\n/* Downgrade writable expandos to readonly, even if non-configurable.*/\\n/* We get each descriptor individually rather than using*/\\n/* getOwnPropertyDescriptors in order to fail safe when encountering*/\\n/* an obscure GraalJS issue where getOwnPropertyDescriptor returns*/\\n/* undefined for a property that does exist.*/\\ncommons.arrayForEach(commons.ownKeys(array),(/** @type {string | symbol} */name)=>{\\nconst desc=commons.getOwnPropertyDescriptor(array,name);\\nassert.assert(desc);\\n/* TypedArrays are integer-indexed exotic objects, which define special*/\\n/* treatment for property names in canonical numeric form:*/\\n/* integers in range are permanently writable and non-configurable.*/\\n/* https://tc39.es/ecma262/#sec-integer-indexed-exotic-objects*/\\n/**/\\n/* This is analogous to the data of a hardened Map or Set,*/\\n/* so we carve out this exceptional behavior but make all other*/\\n/* properties non-configurable.*/\\nif(!isCanonicalIntegerIndexString(name)){\\ncommons.defineProperty(array,name,{\\n...desc,\\nwritable:false,\\nconfigurable:false});}});};\\n\\n\\n\\n\\n\\n/**\\n * Create a `harden` function.\\n *\\n * @returns {Harden}\\n */\\nconst makeHardener=()=>{\\n/* Use a native hardener if possible.*/\\nif(typeof commons.globalThis.harden==='function'){\\nconst safeHarden=commons.globalThis.harden;\\nreturn safeHarden;}\\n\\n\\nconst hardened=new commons.WeakSet();\\n\\nconst{harden}={\\n/**\\n * @template T\\n * @param {T} root\\n * @returns {T}\\n */\\nharden(root){\\nconst toFreeze=new commons.Set();\\n\\n/* If val is something we should be freezing but aren't yet,*/\\n/* add it to toFreeze.*/\\n/**\\n * @param {any} val\\n */\\nfunction enqueue(val){\\nif(!commons.isObject(val)){\\n/* ignore primitives*/\\nreturn;}\\n\\nconst type=typeof val;\\nif(type!=='object'&&type!=='function'){\\n/* future proof: break until someone figures out what it should do*/\\nthrow commons.TypeError(`Unexpected typeof: ${type}`);}\\n\\nif(commons.weaksetHas(hardened,val)||commons.setHas(toFreeze,val)){\\n/* Ignore if this is an exit, or we've already visited it*/\\nreturn;}\\n\\n/* console.warn(`adding ${val} to toFreeze`, val);*/\\ncommons.setAdd(toFreeze,val);}\\n\\n\\n/**\\n * @param {any} obj\\n */\\nconst baseFreezeAndTraverse=(obj)=>{\\n/* Now freeze the object to ensure reactive*/\\n/* objects such as proxies won't add properties*/\\n/* during traversal, before they get frozen.*/\\n\\n/* Object are verified before being enqueued,*/\\n/* therefore this is a valid candidate.*/\\n/* Throws if this fails (strict mode).*/\\n/* Also throws if the object is an ArrayBuffer or any TypedArray.*/\\nif(isTypedArray(obj)){\\nfreezeTypedArray(obj);}else\\n{\\ncommons.freeze(obj);}\\n\\n\\n/* we rely upon certain commitments of Object.freeze and proxies here*/\\n\\n/* get stable/immutable outbound links before a Proxy has a chance to do*/\\n/* something sneaky.*/\\nconst descs=commons.getOwnPropertyDescriptors(obj);\\nconst proto=commons.getPrototypeOf(obj);\\nenqueue(proto);\\n\\ncommons.arrayForEach(commons.ownKeys(descs),(/** @type {string | symbol} */name)=>{\\n/* The 'name' may be a symbol, and TypeScript doesn't like us to*/\\n/* index arbitrary symbols on objects, so we pretend they're just*/\\n/* strings.*/\\nconst desc=descs[/** @type {string} */name];\\n/* getOwnPropertyDescriptors is guaranteed to return well-formed*/\\n/* descriptors, but they still inherit from Object.prototype. If*/\\n/* someone has poisoned Object.prototype to add 'value' or 'get'*/\\n/* properties, then a simple 'if (\\\"value\\\" in desc)' or 'desc.value'*/\\n/* test could be confused. We use hasOwnProperty to be sure about*/\\n/* whether 'value' is present or not, which tells us for sure that*/\\n/* this is a data property.*/\\nif(commons.objectHasOwnProperty(desc,'value')){\\nenqueue(desc.value);}else\\n{\\nenqueue(desc.get);\\nenqueue(desc.set);}});};\\n\\n\\n\\n\\nconst freezeAndTraverse=\\ncommons.FERAL_STACK_GETTER===undefined&&commons.FERAL_STACK_SETTER===undefined?\\n/* On platforms without v8's error own stack accessor problem,*/\\n/* don't pay for any extra overhead.*/\\nbaseFreezeAndTraverse:\\n(obj)=>{\\nif(commons.isError(obj)){\\n/* Only pay the overhead if it first passes this cheap isError*/\\n/* check. Otherwise, it will be unrepaired, but won't be judged*/\\n/* to be a passable error anyway, so will not be unsafe.*/\\nconst stackDesc=commons.getOwnPropertyDescriptor(obj,'stack');\\nif(\\nstackDesc&&\\nstackDesc.get===commons.FERAL_STACK_GETTER&&\\nstackDesc.configurable)\\n{\\n/* Can only repair if it is configurable. Otherwise, leave*/\\n/* unrepaired, in which case it will not be judged passable,*/\\n/* avoiding a safety problem.*/\\ncommons.defineProperty(obj,'stack',{\\n/* NOTE: Calls getter during harden, which seems dangerous.*/\\n/* But we're only calling the problematic getter whose*/\\n/* hazards we think we understand.*/\\n/* @ts-expect-error TS should know FERAL_STACK_GETTER*/\\n/* cannot be `undefined` here.*/\\n/* See https://github.com/endojs/endo/pull/2232#discussion_r1575179471*/\\nvalue:commons.apply(commons.FERAL_STACK_GETTER,obj,[])});}}\\n\\n\\n\\nreturn baseFreezeAndTraverse(obj);};\\n\\n\\nconst dequeue=()=>{\\n/* New values added before forEach() has finished will be visited.*/\\ncommons.setForEach(toFreeze,freezeAndTraverse);};\\n\\n\\n/** @param {any} value */\\nconst markHardened=(value)=>{\\ncommons.weaksetAdd(hardened,value);};\\n\\n\\nconst commit=()=>{\\ncommons.setForEach(toFreeze,markHardened);};\\n\\n\\nenqueue(root);\\ndequeue();\\n/* console.warn(\\\"toFreeze set:\\\", toFreeze);*/\\ncommit();\\n\\nreturn root;}};\\n\\n\\n\\nreturn harden;};exports.isTypedArray=isTypedArray;exports.makeHardener=makeHardener;\",\n \"node_modules/ses/src/make-lru-cachemap.js\": \"'use strict';\\n\\n\\nObject.defineProperty(exports,'__esModule',{value:true});/* @ts-check*/ /* eslint-disable @endo/no-polymorphic-call */ /* eslint-disable-next-line no-restricted-globals*/\\nconst{isSafeInteger}=Number;\\n/* eslint-disable-next-line no-restricted-globals*/\\nconst{freeze}=Object;\\n/* eslint-disable-next-line no-restricted-globals*/\\nconst{toStringTag:toStringTagSymbol}=Symbol;\\n\\n/**\\n * @template Data\\n * @typedef {object} DoublyLinkedCell\\n * A cell of a doubly-linked ring, i.e., a doubly-linked circular list.\\n * DoublyLinkedCells are not frozen, and so should be closely encapsulated by\\n * any abstraction that uses them.\\n * @property {DoublyLinkedCell<Data>} next\\n * @property {DoublyLinkedCell<Data>} prev\\n * @property {Data} data\\n */\\n\\n/**\\n * Makes a new self-linked cell. There are two reasons to do so:\\n * * To make the head sigil of a new initially-empty doubly-linked ring.\\n * * To make a non-sigil cell to be `spliceAfter`ed.\\n *\\n * @template Data\\n * @param {Data} data\\n * @returns {DoublyLinkedCell<Data>}\\n */\\nconst makeSelfCell=(data)=>{\\n/** @type {Partial<DoublyLinkedCell<Data>>} */\\nconst incompleteCell={\\nnext:undefined,\\nprev:undefined,\\ndata};\\n\\nconst selfCell=/** @type {DoublyLinkedCell<Data>} */incompleteCell;\\nselfCell.next=selfCell;\\nselfCell.prev=selfCell;\\n/* Not frozen!*/\\nreturn selfCell;};\\n\\n\\n/**\\n * Splices a self-linked non-sigil cell into a ring after `prev`.\\n * `prev` could be the head sigil, or it could be some other non-sigil\\n * cell within a ring.\\n *\\n * @template Data\\n * @param {DoublyLinkedCell<Data>} prev\\n * @param {DoublyLinkedCell<Data>} selfCell\\n */\\nconst spliceAfter=(prev,selfCell)=>{\\nif(prev===selfCell){\\n/* eslint-disable-next-line no-restricted-globals*/\\nthrow TypeError('Cannot splice a cell into itself');}\\n\\nif(selfCell.next!==selfCell||selfCell.prev!==selfCell){\\n/* eslint-disable-next-line no-restricted-globals*/\\nthrow TypeError('Expected self-linked cell');}\\n\\nconst cell=selfCell;\\n/* rename variable cause it isn't self-linked after this point.*/\\n\\nconst next=prev.next;\\ncell.prev=prev;\\ncell.next=next;\\nprev.next=cell;\\nnext.prev=cell;\\n/* Not frozen!*/\\nreturn cell;};\\n\\n\\n/**\\n * @template Data\\n * @param {DoublyLinkedCell<Data>} cell\\n * No-op if the cell is self-linked.\\n */\\nconst spliceOut=(cell)=>{\\nconst{prev,next}=cell;\\nprev.next=next;\\nnext.prev=prev;\\ncell.prev=cell;\\ncell.next=cell;};\\n\\n\\n/**\\n * The LRUCacheMap is used within the implementation of `assert` and so\\n * at a layer below SES or harden. Thus, we give it a `WeakMap`-like interface\\n * rather than a `WeakMapStore`-like interface. To work before `lockdown`,\\n * the implementation must use `freeze` manually, but still exhaustively.\\n *\\n * It implements the WeakMap interface, and holds its keys weakly. Cached\\n * values are only held while the key is held by the user and the key/value\\n * bookkeeping cell has not been pushed off the end of the cache by `budget`\\n * number of more recently referenced cells. If the key is dropped by the user,\\n * the value will no longer be held by the cache, but the bookkeeping cell\\n * itself will stay in memory.\\n *\\n * @template {{}} K\\n * @template {unknown} V\\n * @param {number} keysBudget\\n * @returns {WeakMap<K,V>}\\n */\\nconst makeLRUCacheMap=(keysBudget)=>{\\nif(!isSafeInteger(keysBudget)||keysBudget<0){\\n/* eslint-disable-next-line no-restricted-globals*/\\nthrow TypeError('keysBudget must be a safe non-negative integer number');}\\n\\n/** @typedef {DoublyLinkedCell<WeakMap<K, V> | undefined>} LRUCacheCell */\\n/** @type {WeakMap<K, LRUCacheCell>} */\\n/* eslint-disable-next-line no-restricted-globals*/\\nconst keyToCell=new WeakMap();\\nlet size=0;/* `size` must remain <= `keysBudget`*/\\n/* As a sigil, `head` uniquely is not in the `keyToCell` map.*/\\n/** @type {LRUCacheCell} */\\nconst head=makeSelfCell(undefined);\\n\\nconst touchCell=(key)=>{\\nconst cell=keyToCell.get(key);\\nif(cell===undefined||cell.data===undefined){\\n/* Either the key was GCed, or the cell was condemned.*/\\nreturn undefined;}\\n\\n/* Becomes most recently used*/\\nspliceOut(cell);\\nspliceAfter(head,cell);\\nreturn cell;};\\n\\n\\n/**\\n * @param {K} key\\n */\\nconst has=(key)=>touchCell(key)!==undefined;\\nfreeze(has);\\n\\n/**\\n * @param {K} key\\n */\\n/* UNTIL https://github.com/endojs/endo/issues/1514*/\\n/* Prefer: const get = key => touchCell(key)?.data?.get(key);*/\\nconst get=(key)=>{\\nconst cell=touchCell(key);\\nreturn cell&&cell.data&&cell.data.get(key);};\\n\\nfreeze(get);\\n\\n/**\\n * @param {K} key\\n * @param {V} value\\n */\\nconst set=(key,value)=>{\\nif(keysBudget<1){\\n/* eslint-disable-next-line no-use-before-define*/\\nreturn lruCacheMap;/* Implements WeakMap.set*/}\\n\\n\\nlet cell=touchCell(key);\\nif(cell===undefined){\\ncell=makeSelfCell(undefined);\\nspliceAfter(head,cell);/* start most recently used*/}\\n\\nif(!cell.data){\\n/* Either a fresh cell or a reused condemned cell.*/\\nsize+=1;\\n/* Add its data.*/\\n/* eslint-disable-next-line no-restricted-globals*/\\ncell.data=new WeakMap();\\n/* Advertise the cell for this key.*/\\nkeyToCell.set(key,cell);\\nwhile(size>keysBudget){\\nconst condemned=head.prev;\\nspliceOut(condemned);/* Drop least recently used*/\\ncondemned.data=undefined;\\nsize-=1;}}\\n\\n\\n\\n/* Update the data.*/\\ncell.data.set(key,value);\\n\\n/* eslint-disable-next-line no-use-before-define*/\\nreturn lruCacheMap;/* Implements WeakMap.set*/};\\n\\nfreeze(set);\\n\\n/* \\\"delete\\\" is a keyword.*/\\n/**\\n * @param {K} key\\n */\\nconst deleteIt=(key)=>{\\nconst cell=keyToCell.get(key);\\nif(cell===undefined){\\nreturn false;}\\n\\nspliceOut(cell);\\nkeyToCell.delete(key);\\nif(cell.data===undefined){\\n/* Already condemned.*/\\nreturn false;}\\n\\n\\ncell.data=undefined;\\nsize-=1;\\nreturn true;};\\n\\nfreeze(deleteIt);\\n\\nconst lruCacheMap=freeze({\\nhas,\\nget,\\nset,\\ndelete:deleteIt,\\n/* eslint-disable-next-line jsdoc/check-types*/\\n[/** @type {typeof Symbol.toStringTag} */toStringTagSymbol]:\\n'LRUCacheMap'});\\n\\nreturn lruCacheMap;};\\n\\nfreeze(makeLRUCacheMap);exports.makeLRUCacheMap=makeLRUCacheMap;\",\n \"node_modules/ses/src/make-safe-evaluator.js\": \"'use strict';Object.defineProperty(exports,'__esModule',{value:true});var commons=require('./commons.js');var strictScopeTerminator=require('./strict-scope-terminator.js');var sloppyGlobalsScopeTerminator=require('./sloppy-globals-scope-terminator.js');var evalScope=require('./eval-scope.js');var transforms=require('./transforms.js');var makeEvaluate=require('./make-evaluate.js');var assert=require('./error/assert.js');/* Portions adapted from V8 - Copyright 2016 the V8 project authors.*/\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\nconst{Fail}=assert.assert;\\n\\n/**\\n * makeSafeEvaluator()\\n * Build the low-level operation used by all evaluators:\\n * eval(), Function(), Compartment.prototype.evaluate().\\n *\\n * @param {object} options\\n * @param {object} options.globalObject\\n * @param {object} [options.moduleLexicals]\\n * @param {Array<IMPORT('./lockdown.js').Transform>} [options.globalTransforms]\\n * @param {boolean} [options.sloppyGlobalsMode]\\n */\\nconst makeSafeEvaluator=({\\nglobalObject,\\nmoduleLexicals={},\\nglobalTransforms=[],\\nsloppyGlobalsMode=false})=>\\n{\\nconst scopeTerminator=sloppyGlobalsMode?\\nsloppyGlobalsScopeTerminator.createSloppyGlobalsScopeTerminator(globalObject):\\nstrictScopeTerminator.strictScopeTerminator;\\nconst evalScopeKit=evalScope.makeEvalScopeKit();\\nconst{evalScope:evalScope$1}=evalScopeKit;\\n\\nconst evaluateContext=commons.freeze({\\nevalScope:evalScope$1,\\nmoduleLexicals,\\nglobalObject,\\nscopeTerminator});\\n\\n\\n/* Defer creating the actual evaluator to first use.*/\\n/* Creating a compartment should be possible in no-eval environments*/\\n/* It also allows more global constants to be captured by the optimizer*/\\nlet evaluate;\\nconst provideEvaluate=()=>{\\nif(!evaluate){\\nevaluate=makeEvaluate.makeEvaluate(evaluateContext);}};\\n\\n\\n\\n/**\\n * @param {string} source\\n * @param {object} [options]\\n * @param {Array<IMPORT('./lockdown.js').Transform>} [options.localTransforms]\\n */\\nconst safeEvaluate=(source,options)=>{\\nconst{localTransforms=[]}=options||{};\\nprovideEvaluate();\\n\\n/* Execute the mandatory transforms last to ensure that any rewritten code*/\\n/* meets those mandatory requirements.*/\\nsource=transforms.applyTransforms(source,[\\n...localTransforms,\\n...globalTransforms,\\ntransforms.mandatoryTransforms]);\\n\\n\\nlet err;\\ntry{\\n/* Allow next reference to eval produce the unsafe FERAL_EVAL.*/\\n/* eslint-disable-next-line @endo/no-polymorphic-call*/\\nevalScopeKit.allowNextEvalToBeUnsafe();\\n\\n/* Ensure that \\\"this\\\" resolves to the safe global.*/\\nreturn commons.apply(evaluate,globalObject,[source]);}\\ncatch(e){\\n/* stash the child-code error in hopes of debugging the internal failure*/\\nerr=e;\\nthrow e;}finally\\n{\\nconst unsafeEvalWasStillExposed=('eval'in evalScope$1);\\ndelete evalScope$1.eval;\\nif(unsafeEvalWasStillExposed){\\n/* Barring a defect in the SES shim, the evalScope should allow the*/\\n/* powerful, unsafe `eval` to be used by `evaluate` exactly once, as the*/\\n/* very first name that it attempts to access from the lexical scope.*/\\n/* A defect in the SES shim could throw an exception after we set*/\\n/* `evalScope.eval` and before `evaluate` calls `eval` internally.*/\\n/* If we get here, SES is very broken.*/\\n/* This condition is one where this vat is now hopelessly confused, and*/\\n/* the vat as a whole should be aborted.*/\\n/* No further code should run.*/\\n/* All immediately reachable state should be abandoned.*/\\n/* However, that is not yet possible, so we at least prevent further*/\\n/* variable resolution via the scopeHandler, and throw an error with*/\\n/* diagnostic info including the thrown error if any from evaluating the*/\\n/* source code.*/\\nevalScopeKit.revoked={err};\\n/* TODO A GOOD PLACE TO PANIC(), i.e., kill the vat incarnation.*/\\n/* See https://github.com/Agoric/SES-shim/issues/490*/\\nFail`handler did not reset allowNextEvalToBeUnsafe ${err}`;}}};\\n\\n\\n\\n\\nreturn{safeEvaluate};};exports.makeSafeEvaluator=makeSafeEvaluator;\",\n \"node_modules/ses/src/module-instance.js\": \"'use strict';Object.defineProperty(exports,'__esModule',{value:true});var assert=require('./error/assert.js');var moduleProxy=require('./module-proxy.js');var commons=require('./commons.js');var compartmentEvaluate=require('./compartment-evaluate.js');\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\nconst{quote:q}=assert.assert;\\n\\nconst makeVirtualModuleInstance=(\\ncompartmentPrivateFields,\\nmoduleSource,\\ncompartment,\\nmoduleAliases,\\nmoduleSpecifier,\\nresolvedImports)=>\\n{\\nconst{exportsProxy,exportsTarget,activate}=moduleProxy.getDeferredExports(\\ncompartment,\\ncommons.weakmapGet(compartmentPrivateFields,compartment),\\nmoduleAliases,\\nmoduleSpecifier);\\n\\n\\nconst notifiers=commons.create(null);\\n\\nif(moduleSource.exports){\\nif(\\n!commons.isArray(moduleSource.exports)||\\ncommons.arraySome(moduleSource.exports,(name)=>typeof name!=='string'))\\n{\\nthrow commons.TypeError(\\n`SES virtual module source \\\"exports\\\" property must be an array of strings for module ${moduleSpecifier}`);}\\n\\n\\ncommons.arrayForEach(moduleSource.exports,(name)=>{\\nlet value=exportsTarget[name];\\nconst updaters=[];\\n\\nconst get=()=>value;\\n\\nconst set=(newValue)=>{\\nvalue=newValue;\\nfor(const updater of updaters){\\nupdater(newValue);}};\\n\\n\\n\\ncommons.defineProperty(exportsTarget,name,{\\nget,\\nset,\\nenumerable:true,\\nconfigurable:false});\\n\\n\\nnotifiers[name]=(update)=>{\\ncommons.arrayPush(updaters,update);\\nupdate(value);};});\\n\\n\\n/* This is enough to support import * from cjs - the '*' field doesn't need to be in exports nor exportsTarget because import will only ever access it via notifiers*/\\nnotifiers['*']=(update)=>{\\nupdate(exportsTarget);};}\\n\\n\\n\\nconst localState={\\nactivated:false};\\n\\nreturn commons.freeze({\\nnotifiers,\\nexportsProxy,\\nexecute(){\\nif(commons.reflectHas(localState,'errorFromExecute')){\\nthrow localState.errorFromExecute;}\\n\\nif(!localState.activated){\\nactivate();\\nlocalState.activated=true;\\ntry{\\n/* eslint-disable-next-line @endo/no-polymorphic-call*/\\nmoduleSource.execute(exportsTarget,compartment,resolvedImports);}\\ncatch(err){\\nlocalState.errorFromExecute=err;\\nthrow err;}}}});};\\n\\n\\n\\n\\n\\n\\n/* `makeModuleInstance` takes a module's compartment record, the live import*/\\n/* namespace, and a global object; and produces a module instance.*/\\n/* The module instance carries the proxied module exports namespace (the*/\\n/* \\\"exports\\\"), notifiers to update the module's internal import namespace, and*/\\n/* an idempotent execute function.*/\\n/* The module exports namespace is a proxy to the proxied exports namespace*/\\n/* that the execution of the module instance populates.*/\\nconst makeModuleInstance=(\\nprivateFields,\\nmoduleAliases,\\nmoduleRecord,\\nimportedInstances)=>\\n{\\nconst{\\ncompartment,\\nmoduleSpecifier,\\nmoduleSource,\\nimportMeta:moduleRecordMeta}=\\nmoduleRecord;\\nconst{\\nreexports:exportAlls=[],\\n__syncModuleProgram__:functorSource,\\n__fixedExportMap__:fixedExportMap={},\\n__liveExportMap__:liveExportMap={},\\n__reexportMap__:reexportMap={},\\n__needsImportMeta__:needsImportMeta=false,\\n__syncModuleFunctor__}=\\nmoduleSource;\\n\\nconst compartmentFields=commons.weakmapGet(privateFields,compartment);\\n\\nconst{__shimTransforms__,importMetaHook}=compartmentFields;\\n\\nconst{exportsProxy,exportsTarget,activate}=moduleProxy.getDeferredExports(\\ncompartment,\\ncompartmentFields,\\nmoduleAliases,\\nmoduleSpecifier);\\n\\n\\n/* {_exportName_: getter} module exports namespace*/\\n/* object (eventually proxied).*/\\nconst exportsProps=commons.create(null);\\n\\n/* {_localName_: accessor} proxy traps for moduleLexicals and live bindings.*/\\n/* The moduleLexicals object is frozen and the corresponding properties of*/\\n/* moduleLexicals must be immutable, so we copy the descriptors.*/\\nconst moduleLexicals=commons.create(null);\\n\\n/* {_localName_: init(initValue) -> initValue} used by the*/\\n/* rewritten code to initialize exported fixed bindings.*/\\nconst onceVar=commons.create(null);\\n\\n/* {_localName_: update(newValue)} used by the rewritten code to*/\\n/* both initialize and update live bindings.*/\\nconst liveVar=commons.create(null);\\n\\nconst importMeta=commons.create(null);\\nif(moduleRecordMeta){\\ncommons.assign(importMeta,moduleRecordMeta);}\\n\\nif(needsImportMeta&&importMetaHook){\\nimportMetaHook(moduleSpecifier,importMeta);}\\n\\n\\n/* {_localName_: [{get, set, notify}]} used to merge all the export updaters.*/\\nconst localGetNotify=commons.create(null);\\n\\n/* {[importName: string]: notify(update(newValue))} Used by code that imports*/\\n/* one of this module's exports, so that their update function will*/\\n/* be notified when this binding is initialized or updated.*/\\nconst notifiers=commons.create(null);\\n\\ncommons.arrayForEach(commons.entries(fixedExportMap),([fixedExportName,[localName]])=>{\\nlet fixedGetNotify=localGetNotify[localName];\\nif(!fixedGetNotify){\\n/* fixed binding state*/\\nlet value;\\nlet tdz=true;\\n/** @type {null | Array<(value: any) => void>} */\\nlet optUpdaters=[];\\n\\n/* tdz sensitive getter*/\\nconst get=()=>{\\nif(tdz){\\nthrow commons.ReferenceError(`binding ${q(localName)} not yet initialized`);}\\n\\nreturn value;};\\n\\n\\n/* leave tdz once*/\\nconst init=commons.freeze((initValue)=>{\\n/* init with initValue of a declared const binding, and return*/\\n/* it.*/\\nif(!tdz){\\nthrow commons.TypeError(\\n`Internal: binding ${q(localName)} already initialized`);}\\n\\n\\nvalue=initValue;\\nconst updaters=optUpdaters;\\noptUpdaters=null;\\ntdz=false;\\nfor(const updater of updaters||[]){\\nupdater(initValue);}\\n\\nreturn initValue;});\\n\\n\\n/* If still tdz, register update for notification later.*/\\n/* Otherwise, update now.*/\\nconst notify=(updater)=>{\\nif(updater===init){\\n/* Prevent recursion.*/\\nreturn;}\\n\\nif(tdz){\\ncommons.arrayPush(optUpdaters||[],updater);}else\\n{\\nupdater(value);}};\\n\\n\\n\\n/* Need these for additional exports of the local variable.*/\\nfixedGetNotify={\\nget,\\nnotify};\\n\\nlocalGetNotify[localName]=fixedGetNotify;\\nonceVar[localName]=init;}\\n\\n\\nexportsProps[fixedExportName]={\\nget:fixedGetNotify.get,\\nset:undefined,\\nenumerable:true,\\nconfigurable:false};\\n\\n\\nnotifiers[fixedExportName]=fixedGetNotify.notify;});\\n\\n\\ncommons.arrayForEach(\\ncommons.entries(liveExportMap),\\n([liveExportName,[localName,setProxyTrap]])=>{\\nlet liveGetNotify=localGetNotify[localName];\\nif(!liveGetNotify){\\n/* live binding state*/\\nlet value;\\nlet tdz=true;\\nconst updaters=[];\\n\\n/* tdz sensitive getter*/\\nconst get=()=>{\\nif(tdz){\\nthrow commons.ReferenceError(\\n`binding ${q(liveExportName)} not yet initialized`);}\\n\\n\\nreturn value;};\\n\\n\\n/* This must be usable locally for the translation of initializing*/\\n/* a declared local live binding variable.*/\\n/**/\\n/* For reexported variable, this is also an update function to*/\\n/* register for notification with the downstream import, which we*/\\n/* must assume to be live. Thus, it can be called independent of*/\\n/* tdz but always leaves tdz. Such reexporting creates a tree of*/\\n/* bindings. This lets the tree be hooked up even if the imported*/\\n/* module instance isn't initialized yet, as may happen in cycles.*/\\nconst update=commons.freeze((newValue)=>{\\nvalue=newValue;\\ntdz=false;\\nfor(const updater of updaters){\\nupdater(newValue);}});\\n\\n\\n\\n/* tdz sensitive setter*/\\nconst set=(newValue)=>{\\nif(tdz){\\nthrow commons.ReferenceError(`binding ${q(localName)} not yet initialized`);}\\n\\nvalue=newValue;\\nfor(const updater of updaters){\\nupdater(newValue);}};\\n\\n\\n\\n/* Always register the updater function.*/\\n/* If not in tdz, also update now.*/\\nconst notify=(updater)=>{\\nif(updater===update){\\n/* Prevent recursion.*/\\nreturn;}\\n\\ncommons.arrayPush(updaters,updater);\\nif(!tdz){\\nupdater(value);}};\\n\\n\\n\\nliveGetNotify={\\nget,\\nnotify};\\n\\n\\nlocalGetNotify[localName]=liveGetNotify;\\nif(setProxyTrap){\\ncommons.defineProperty(moduleLexicals,localName,{\\nget,\\nset,\\nenumerable:true,\\nconfigurable:false});}\\n\\n\\nliveVar[localName]=update;}\\n\\n\\nexportsProps[liveExportName]={\\nget:liveGetNotify.get,\\nset:undefined,\\nenumerable:true,\\nconfigurable:false};\\n\\n\\nnotifiers[liveExportName]=liveGetNotify.notify;});\\n\\n\\n\\nconst notifyStar=(update)=>{\\nupdate(exportsTarget);};\\n\\nnotifiers['*']=notifyStar;\\n\\n/* Per the calling convention for the moduleFunctor generated from*/\\n/* an ESM, the `imports` function gets called once up front*/\\n/* to populate or arrange the population of imports and reexports.*/\\n/* The generated code produces an `updateRecord`: the means for*/\\n/* the linker to update the imports and exports of the module.*/\\n/* The updateRecord must conform to moduleAnalysis.imports*/\\n/* updateRecord = Map<specifier, importUpdaters>*/\\n/* importUpdaters = Map<importName, [update(newValue)*]>*/\\nfunction imports(updateRecord){\\n/* By the time imports is called, the importedInstances should already be*/\\n/* initialized with module instances that satisfy*/\\n/* imports.*/\\n/* importedInstances = Map[_specifier_, { notifiers, module, execute }]*/\\n/* notifiers = { [importName: string]: notify(update(newValue))}*/\\n\\n/* export * cannot export default.*/\\nconst candidateAll=commons.create(null);\\ncandidateAll.default=false;\\nfor(const[specifier,importUpdaters]of updateRecord){\\nconst instance=commons.mapGet(importedInstances,specifier);\\n/* The module instance object is an internal literal, does not bind this,*/\\n/* and never revealed outside the SES shim.*/\\n/* There are two instantiation sites for instances and they are both in*/\\n/* this module.*/\\n/* eslint-disable-next-line @endo/no-polymorphic-call*/\\ninstance.execute();/* bottom up cycle tolerant*/\\nconst{notifiers:importNotifiers}=instance;\\nfor(const[importName,updaters]of importUpdaters){\\nconst importNotify=importNotifiers[importName];\\nif(!importNotify){\\nthrow commons.SyntaxError(\\n`The requested module '${specifier}' does not provide an export named '${importName}'`);}\\n\\n\\nfor(const updater of updaters){\\nimportNotify(updater);}}\\n\\n\\nif(commons.arrayIncludes(exportAlls,specifier)){\\n/* Make all these imports candidates.*/\\n/* Note names don't change in reexporting all*/\\nfor(const[importAndExportName,importNotify]of commons.entries(\\nimportNotifiers))\\n{\\nif(candidateAll[importAndExportName]===undefined){\\ncandidateAll[importAndExportName]=importNotify;}else\\n{\\n/* Already a candidate: remove ambiguity.*/\\ncandidateAll[importAndExportName]=false;}}}\\n\\n\\n\\nif(reexportMap[specifier]){\\n/* Make named reexports candidates too.*/\\nfor(const[localName,exportedName]of reexportMap[specifier]){\\ncandidateAll[exportedName]=importNotifiers[localName];}}}\\n\\n\\n\\n\\nfor(const[exportName,notify]of commons.entries(candidateAll)){\\nif(!notifiers[exportName]&¬ify!==false){\\nnotifiers[exportName]=notify;\\n\\n/* exported live binding state*/\\nlet value;\\nconst update=(newValue)=>value=newValue;\\nnotify(update);\\nexportsProps[exportName]={\\nget(){\\nreturn value;},\\n\\nset:undefined,\\nenumerable:true,\\nconfigurable:false};}}\\n\\n\\n\\n\\n/* Sort the module exports namespace as per spec.*/\\n/* The module exports namespace will be wrapped in a module namespace*/\\n/* exports proxy which will serve as a \\\"module exports namespace exotic*/\\n/* object\\\".*/\\n/* Sorting properties is not generally reliable because some properties may*/\\n/* be symbols, and symbols do not have an inherent relative order, but*/\\n/* since all properties of the exports namespace must be keyed by a string*/\\n/* and the string must correspond to a valid identifier, sorting these*/\\n/* properties works for this specific case.*/\\ncommons.arrayForEach(commons.arraySort(commons.keys(exportsProps)),(k)=>\\ncommons.defineProperty(exportsTarget,k,exportsProps[k]));\\n\\n\\ncommons.freeze(exportsTarget);\\nactivate();}\\n\\n\\nlet optFunctor;\\nif(__syncModuleFunctor__!==undefined){\\noptFunctor=__syncModuleFunctor__;}else\\n{\\noptFunctor=compartmentEvaluate.compartmentEvaluate(compartmentFields,functorSource,{\\nglobalObject:compartment.globalThis,\\ntransforms:__shimTransforms__,\\n__moduleShimLexicals__:moduleLexicals});}\\n\\n\\nlet didThrow=false;\\nlet thrownError;\\nfunction execute(){\\nif(optFunctor){\\n/* uninitialized*/\\nconst functor=optFunctor;\\noptFunctor=null;\\n/* initializing - call with `this` of `undefined`.*/\\ntry{\\nfunctor(\\ncommons.freeze({\\nimports:commons.freeze(imports),\\nonceVar:commons.freeze(onceVar),\\nliveVar:commons.freeze(liveVar),\\nimportMeta}));}\\n\\n\\ncatch(e){\\ndidThrow=true;\\nthrownError=e;}\\n\\n/* initialized*/}\\n\\nif(didThrow){\\nthrow thrownError;}}\\n\\n\\n\\nreturn commons.freeze({\\nnotifiers,\\nexportsProxy,\\nexecute});};exports.makeModuleInstance=makeModuleInstance;exports.makeVirtualModuleInstance=makeVirtualModuleInstance;\",\n \"node_modules/ses/src/module-link.js\": \"'use strict';Object.defineProperty(exports,'__esModule',{value:true});var assert=require('./error/assert.js');var moduleInstance=require('./module-instance.js');var commons=require('./commons.js');/* eslint-disable no-underscore-dangle */\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\nconst{Fail,quote:q}=assert.assert;\\n\\n/* `link` creates `ModuleInstances` and `ModuleNamespaces` for a module and its*/\\n/* transitive dependencies and connects their imports and exports.*/\\n/* After linking, the resulting working set is ready to be executed.*/\\n/* The linker only concerns itself with module namespaces that are objects with*/\\n/* property descriptors for their exports, which the Compartment proxies with*/\\n/* the actual `ModuleNamespace`.*/\\nconst link=(\\ncompartmentPrivateFields,\\nmoduleAliases,\\ncompartment,\\nmoduleSpecifier)=>\\n{\\nconst{name:compartmentName,moduleRecords}=commons.weakmapGet(\\ncompartmentPrivateFields,\\ncompartment);\\n\\n\\nconst moduleRecord=commons.mapGet(moduleRecords,moduleSpecifier);\\nif(moduleRecord===undefined){\\nthrow commons.ReferenceError(\\n`Missing link to module ${q(moduleSpecifier)} from compartment ${q(\\ncompartmentName)\\n}`);}\\n\\n\\n\\n/* Mutual recursion so there's no confusion about which*/\\n/* compartment is in context: the module record may be in another*/\\n/* compartment, denoted by moduleRecord.compartment.*/\\n/* eslint-disable-next-line no-use-before-define*/\\nreturn instantiate(compartmentPrivateFields,moduleAliases,moduleRecord);};\\n\\n\\nfunction mayBePrecompiledModuleSource(moduleSource){\\nreturn typeof moduleSource.__syncModuleProgram__==='string';}\\n\\n\\nfunction validatePrecompiledModuleSource(moduleSource,moduleSpecifier){\\nconst{__fixedExportMap__,__liveExportMap__}=moduleSource;\\ncommons.isObject(__fixedExportMap__)||\\nFail`Property '__fixedExportMap__' of a precompiled module source must be an object, got ${q(\\n__fixedExportMap__)\\n}, for module ${q(moduleSpecifier)}`;\\ncommons.isObject(__liveExportMap__)||\\nFail`Property '__liveExportMap__' of a precompiled module source must be an object, got ${q(\\n__liveExportMap__)\\n}, for module ${q(moduleSpecifier)}`;}\\n\\n\\nfunction mayBeVirtualModuleSource(moduleSource){\\nreturn typeof moduleSource.execute==='function';}\\n\\n\\nfunction validateVirtualModuleSource(moduleSource,moduleSpecifier){\\nconst{exports}=moduleSource;\\ncommons.isArray(exports)||\\nFail`Property 'exports' of a third-party module source must be an array, got ${q(\\nexports)\\n}, for module ${q(moduleSpecifier)}`;}\\n\\n\\nfunction validateModuleSource(moduleSource,moduleSpecifier){\\ncommons.isObject(moduleSource)||\\nFail`Module sources must be of type object, got ${q(\\nmoduleSource)\\n}, for module ${q(moduleSpecifier)}`;\\nconst{imports,exports,reexports=[]}=moduleSource;\\ncommons.isArray(imports)||\\nFail`Property 'imports' of a module source must be an array, got ${q(\\nimports)\\n}, for module ${q(moduleSpecifier)}`;\\ncommons.isArray(exports)||\\nFail`Property 'exports' of a precompiled module source must be an array, got ${q(\\nexports)\\n}, for module ${q(moduleSpecifier)}`;\\ncommons.isArray(reexports)||\\nFail`Property 'reexports' of a precompiled module source must be an array if present, got ${q(\\nreexports)\\n}, for module ${q(moduleSpecifier)}`;}\\n\\n\\nconst instantiate=(\\ncompartmentPrivateFields,\\nmoduleAliases,\\nmoduleRecord)=>\\n{\\nconst{compartment,moduleSpecifier,resolvedImports,moduleSource}=\\nmoduleRecord;\\nconst{instances}=commons.weakmapGet(compartmentPrivateFields,compartment);\\n\\n/* Memoize.*/\\nif(commons.mapHas(instances,moduleSpecifier)){\\nreturn commons.mapGet(instances,moduleSpecifier);}\\n\\n\\nvalidateModuleSource(moduleSource,moduleSpecifier);\\n\\nconst importedInstances=new commons.Map();\\nlet moduleInstance$1;\\nif(mayBePrecompiledModuleSource(moduleSource)){\\nvalidatePrecompiledModuleSource(moduleSource,moduleSpecifier);\\nmoduleInstance$1=moduleInstance.makeModuleInstance(\\ncompartmentPrivateFields,\\nmoduleAliases,\\nmoduleRecord,\\nimportedInstances);}else\\n\\nif(mayBeVirtualModuleSource(moduleSource)){\\nvalidateVirtualModuleSource(moduleSource,moduleSpecifier);\\nmoduleInstance$1=moduleInstance.makeVirtualModuleInstance(\\ncompartmentPrivateFields,\\nmoduleSource,\\ncompartment,\\nmoduleAliases,\\nmoduleSpecifier,\\nresolvedImports);}else\\n\\n{\\nthrow commons.TypeError(\\n`importHook must provide a module source, got ${q(moduleSource)}`);}\\n\\n\\n\\n/* Memoize.*/\\ncommons.mapSet(instances,moduleSpecifier,moduleInstance$1);\\n\\n/* Link dependency modules.*/\\nfor(const[importSpecifier,resolvedSpecifier]of commons.entries(resolvedImports)){\\nconst importedInstance=link(\\ncompartmentPrivateFields,\\nmoduleAliases,\\ncompartment,\\nresolvedSpecifier);\\n\\ncommons.mapSet(importedInstances,importSpecifier,importedInstance);}\\n\\n\\nreturn moduleInstance$1;};exports.instantiate=instantiate;exports.link=link;\",\n \"node_modules/ses/src/module-load.js\": \"'use strict';Object.defineProperty(exports,'__esModule',{value:true});require('../../@endo/env-options/index.js');var commons=require('./commons.js');var assert=require('./error/assert.js');var envOptions=require('../../@endo/env-options/src/env-options.js');\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\nconst noop=()=>{};\\n\\nconst asyncTrampoline=async(generatorFunc,args,errorWrapper)=>{\\nawait null;\\nconst iterator=generatorFunc(...args);\\nlet result=commons.generatorNext(iterator);\\nwhile(!result.done){\\ntry{\\n/* eslint-disable-next-line no-await-in-loop*/\\nconst val=await result.value;\\nresult=commons.generatorNext(iterator,val);}\\ncatch(error){\\nresult=commons.generatorThrow(iterator,errorWrapper(error));}}\\n\\n\\nreturn result.value;};\\n\\n\\nconst syncTrampoline=(generatorFunc,args)=>{\\nconst iterator=generatorFunc(...args);\\nlet result=commons.generatorNext(iterator);\\nwhile(!result.done){\\ntry{\\nresult=commons.generatorNext(iterator,result.value);}\\ncatch(error){\\nresult=commons.generatorThrow(iterator,error);}}\\n\\n\\nreturn result.value;};\\n\\n\\n/* `makeAlias` constructs compartment specifier tuples for the `aliases`*/\\n/* private field of compartments.*/\\n/* These aliases allow a compartment to alias an internal module specifier to a*/\\n/* module specifier in an external compartment, and also to create internal*/\\n/* aliases.*/\\n/* Both are facilitated by the moduleMap Compartment constructor option.*/\\nconst makeAlias=(compartment,specifier)=>\\ncommons.freeze({compartment,specifier});\\n\\n/* `resolveAll` pre-computes resolutions of all imports within the compartment*/\\n/* in which a module was loaded.*/\\nconst resolveAll=(imports,resolveHook,fullReferrerSpecifier)=>{\\nconst resolvedImports=commons.create(null);\\nfor(const importSpecifier of imports){\\nconst fullSpecifier=resolveHook(importSpecifier,fullReferrerSpecifier);\\nresolvedImports[importSpecifier]=fullSpecifier;}\\n\\nreturn commons.freeze(resolvedImports);};\\n\\n\\nconst loadModuleSource=(\\ncompartmentPrivateFields,\\nmoduleAliases,\\ncompartment,\\nmoduleSpecifier,\\nmoduleSource,\\nenqueueJob,\\nselectImplementation,\\nmoduleLoads,\\nimportMeta)=>\\n{\\nconst{resolveHook}=commons.weakmapGet(compartmentPrivateFields,compartment);\\n\\n/* resolve all imports relative to this referrer module.*/\\nconst resolvedImports=resolveAll(\\nmoduleSource.imports,\\nresolveHook,\\nmoduleSpecifier);\\n\\nconst moduleRecord=commons.freeze({\\ncompartment,\\nmoduleSource,\\nmoduleSpecifier,\\nresolvedImports,\\nimportMeta});\\n\\n\\n/* Enqueue jobs to load this module's shallow dependencies.*/\\nfor(const fullSpecifier of commons.values(resolvedImports)){\\n/* Behold: recursion.*/\\n/* eslint-disable-next-line no-use-before-define*/\\nenqueueJob(memoizedLoadWithErrorAnnotation,[\\ncompartmentPrivateFields,\\nmoduleAliases,\\ncompartment,\\nfullSpecifier,\\nenqueueJob,\\nselectImplementation,\\nmoduleLoads]);}\\n\\n\\n\\nreturn moduleRecord;};\\n\\n\\nfunction*loadWithoutErrorAnnotation(\\ncompartmentPrivateFields,\\nmoduleAliases,\\ncompartment,\\nmoduleSpecifier,\\nenqueueJob,\\nselectImplementation,\\nmoduleLoads)\\n{\\nconst{\\nimportHook,\\nimportNowHook,\\nmoduleMap,\\nmoduleMapHook,\\nmoduleRecords,\\nparentCompartment}=\\ncommons.weakmapGet(compartmentPrivateFields,compartment);\\n\\nif(commons.mapHas(moduleRecords,moduleSpecifier)){\\nreturn commons.mapGet(moduleRecords,moduleSpecifier);}\\n\\n\\n/* Follow moduleMap, or moduleMapHook if present.*/\\nlet moduleDescriptor=moduleMap[moduleSpecifier];\\nif(moduleDescriptor===undefined&&moduleMapHook!==undefined){\\nmoduleDescriptor=moduleMapHook(moduleSpecifier);}\\n\\nif(moduleDescriptor===undefined){\\nconst moduleHook=selectImplementation(importHook,importNowHook);\\nif(moduleHook===undefined){\\nconst moduleHookName=selectImplementation(\\n'importHook',\\n'importNowHook');\\n\\nthrow assert.makeError(\\nassert.X`${assert.b(moduleHookName)} needed to load module ${assert.q(\\nmoduleSpecifier)\\n} in compartment ${assert.q(compartment.name)}`);}\\n\\n\\nmoduleDescriptor=moduleHook(moduleSpecifier);\\n/* Uninitialized module namespaces throw if we attempt to coerce them into*/\\n/* promises.*/\\nif(!commons.weakmapHas(moduleAliases,moduleDescriptor)){\\nmoduleDescriptor=yield moduleDescriptor;}}\\n\\n\\n\\nif(typeof moduleDescriptor==='string'){\\n/* eslint-disable-next-line @endo/no-polymorphic-call*/\\nthrow assert.makeError(\\nassert.X`Cannot map module ${assert.q(moduleSpecifier)} to ${assert.q(\\nmoduleDescriptor)\\n} in parent compartment, use {source} module descriptor`,\\ncommons.TypeError);}else\\n\\nif(commons.isObject(moduleDescriptor)){\\n/* In this shim (and not in XS, and not in the standard we imagine), we*/\\n/* allow a module namespace object to stand in for a module descriptor that*/\\n/* describes its original {compartment, specifier} so that it can be used*/\\n/* to create a link.*/\\nlet aliasDescriptor=commons.weakmapGet(moduleAliases,moduleDescriptor);\\nif(aliasDescriptor!==undefined){\\nmoduleDescriptor=aliasDescriptor;}\\n\\n\\nif(moduleDescriptor.namespace!==undefined){\\n/* { namespace: string, compartment?: Compartment }*/\\n/* Namespace module descriptors link to a module instance.*/\\n\\nif(typeof moduleDescriptor.namespace==='string'){\\n/* The default compartment is the *parent*, not this child compartment.*/\\n/* This is a difference from the legacy {specifier, compartment} module*/\\n/* descriptor.*/\\nconst{\\ncompartment:aliasCompartment=parentCompartment,\\nnamespace:aliasSpecifier}=\\nmoduleDescriptor;\\nif(\\n!commons.isObject(aliasCompartment)||\\n!commons.weakmapHas(compartmentPrivateFields,aliasCompartment))\\n{\\nthrow assert.makeError(\\nassert.X`Invalid compartment in module descriptor for specifier ${assert.q(moduleSpecifier)} in compartment ${assert.q(compartment.name)}`);}\\n\\n\\n/* Behold: recursion.*/\\n/* eslint-disable-next-line no-use-before-define*/\\nconst aliasRecord=yield memoizedLoadWithErrorAnnotation(\\ncompartmentPrivateFields,\\nmoduleAliases,\\naliasCompartment,\\naliasSpecifier,\\nenqueueJob,\\nselectImplementation,\\nmoduleLoads);\\n\\ncommons.mapSet(moduleRecords,moduleSpecifier,aliasRecord);\\nreturn aliasRecord;}\\n\\n\\n/* All remaining objects must either be a module namespace, or be*/\\n/* promoted into a module namespace with a virtual module source.*/\\nif(commons.isObject(moduleDescriptor.namespace)){\\nconst{namespace}=moduleDescriptor;\\n/* Brand-check SES shim module exports namespaces:*/\\naliasDescriptor=commons.weakmapGet(moduleAliases,namespace);\\nif(aliasDescriptor!==undefined){\\nmoduleDescriptor=aliasDescriptor;\\n/* Fall through to processing the resulting {compartment, specifier}*/\\n/* alias.*/}else\\n{\\n/* Promote an arbitrary object to a module namespace with a virtual*/\\n/* module source.*/\\n/* { namespace: Object }*/\\nconst exports=commons.getOwnPropertyNames(namespace);\\n/** @type {IMPORT('../types.js').VirtualModuleSource} */\\nconst moduleSource={\\nimports:[],\\nexports,\\nexecute(env){\\nfor(const name of exports){\\nenv[name]=namespace[name];}}};\\n\\n\\n\\nconst importMeta=undefined;\\nconst moduleRecord=loadModuleSource(\\ncompartmentPrivateFields,\\nmoduleAliases,\\ncompartment,\\nmoduleSpecifier,\\nmoduleSource,\\nenqueueJob,\\nselectImplementation,\\nmoduleLoads,\\nimportMeta);\\n\\ncommons.mapSet(moduleRecords,moduleSpecifier,moduleRecord);\\nreturn moduleRecord;}}else\\n\\n{\\nthrow assert.makeError(\\nassert.X`Invalid compartment in module descriptor for specifier ${assert.q(moduleSpecifier)} in compartment ${assert.q(compartment.name)}`);}}\\n\\n\\n\\n\\nif(moduleDescriptor.source!==undefined){\\n/* Module source descriptors create an instance from a module source.*/\\n/* The descriptor may contain the module source, or refer to a source*/\\n/* loaded in a particular compartment.*/\\n\\nif(typeof moduleDescriptor.source==='string'){\\n/* { source: string, importMeta?, specifier?: string, compartment? }*/\\n/* A string source is the specifier for a different module source.*/\\n/* That source may come from this compartment's parent (default), or*/\\n/* from a specified compartment, and the specified compartment may be*/\\n/* this compartment to make a duplicate.*/\\n\\nconst{\\nsource:loaderSpecifier,\\nspecifier:instanceSpecifier=moduleSpecifier,\\ncompartment:loaderCompartment=parentCompartment,\\nimportMeta=undefined}=\\nmoduleDescriptor;\\n\\n/* Induce the compartment, possibly a different compartment*/\\n/* to load a module source.*/\\n\\n/* Behold: recursion.*/\\n/* eslint-disable-next-line no-use-before-define*/\\nconst loaderRecord=yield memoizedLoadWithErrorAnnotation(\\ncompartmentPrivateFields,\\nmoduleAliases,\\nloaderCompartment,\\nloaderSpecifier,\\nenqueueJob,\\nselectImplementation,\\nmoduleLoads);\\n\\n\\n/* Extract the source of the module from the loader compartment's*/\\n/* record.*/\\nconst{moduleSource}=loaderRecord;\\n\\n/* Instantiate that source in our own compartment, possibly with a*/\\n/* different specifier for resolving its own imports.*/\\nconst moduleRecord=loadModuleSource(\\ncompartmentPrivateFields,\\nmoduleAliases,\\ncompartment,\\ninstanceSpecifier,\\nmoduleSource,\\nenqueueJob,\\nselectImplementation,\\nmoduleLoads,\\nimportMeta);\\n\\ncommons.mapSet(moduleRecords,moduleSpecifier,moduleRecord);\\nreturn moduleRecord;}else\\n{\\n/* { source: ModuleSource, importMeta?, specifier?: string }*/\\n/* We assume all non-string module sources are any of the supported*/\\n/* kinds of module source: PrecompiledModuleSource,*/\\n/* VirtualModuleSource, or a native ModuleSource.*/\\n\\nconst{\\nsource:moduleSource,\\nspecifier:aliasSpecifier=moduleSpecifier,\\nimportMeta}=\\nmoduleDescriptor;\\n\\nconst aliasRecord=loadModuleSource(\\ncompartmentPrivateFields,\\nmoduleAliases,\\ncompartment,\\naliasSpecifier,\\nmoduleSource,\\nenqueueJob,\\nselectImplementation,\\nmoduleLoads,\\nimportMeta);\\n\\ncommons.mapSet(moduleRecords,moduleSpecifier,aliasRecord);\\nreturn aliasRecord;}}\\n\\n\\n\\nif(moduleDescriptor.archive!==undefined){\\n/* { archive: Archive, path: string }*/\\n/* We do not support this XS-native module descriptor.*/\\nthrow assert.makeError(\\nassert.X`Unsupported archive module descriptor for specifier ${assert.q(moduleSpecifier)} in compartment ${assert.q(compartment.name)}`);}\\n\\n\\n\\n/* { record, specifier?, compartment?, importMeta? }*/\\n/* A (legacy) module descriptor for when we find the module source (record)*/\\n/* but at a different specifier than requested.*/\\n/* Providing this {specifier, record} descriptor serves as an ergonomic*/\\n/* short-hand for stashing the record, returning a {compartment, specifier}*/\\n/* reference, bouncing the module hook, then producing the source (record)*/\\n/* when module hook receives the response specifier.*/\\nif(moduleDescriptor.record!==undefined){\\nconst{\\ncompartment:aliasCompartment=compartment,\\nspecifier:aliasSpecifier=moduleSpecifier,\\nrecord:moduleSource,\\nimportMeta}=\\nmoduleDescriptor;\\n\\nconst aliasRecord=loadModuleSource(\\ncompartmentPrivateFields,\\nmoduleAliases,\\naliasCompartment,\\naliasSpecifier,\\nmoduleSource,\\nenqueueJob,\\nselectImplementation,\\nmoduleLoads,\\nimportMeta);\\n\\ncommons.mapSet(moduleRecords,moduleSpecifier,aliasRecord);\\ncommons.mapSet(moduleRecords,aliasSpecifier,aliasRecord);\\nreturn aliasRecord;}\\n\\n\\n/* { specifier: string, compartment: Compartment }*/\\n/* A (legacy) module descriptor that describes a link to a module instance*/\\n/* in a specified compartment.*/\\nif(\\nmoduleDescriptor.compartment!==undefined&&\\nmoduleDescriptor.specifier!==undefined)\\n{\\nif(\\n!commons.isObject(moduleDescriptor.compartment)||\\n!commons.weakmapHas(compartmentPrivateFields,moduleDescriptor.compartment)||\\ntypeof moduleDescriptor.specifier!=='string')\\n{\\nthrow assert.makeError(\\nassert.X`Invalid compartment in module descriptor for specifier ${assert.q(moduleSpecifier)} in compartment ${assert.q(compartment.name)}`);}\\n\\n\\n/* Behold: recursion.*/\\n/* eslint-disable-next-line no-use-before-define*/\\nconst aliasRecord=yield memoizedLoadWithErrorAnnotation(\\ncompartmentPrivateFields,\\nmoduleAliases,\\nmoduleDescriptor.compartment,\\nmoduleDescriptor.specifier,\\nenqueueJob,\\nselectImplementation,\\nmoduleLoads);\\n\\ncommons.mapSet(moduleRecords,moduleSpecifier,aliasRecord);\\nreturn aliasRecord;}\\n\\n\\n/* A (legacy) behavior: If we do not recognize the module descriptor as a*/\\n/* module descriptor, we assume that it is a module source (record):*/\\nconst moduleSource=moduleDescriptor;\\nconst moduleRecord=loadModuleSource(\\ncompartmentPrivateFields,\\nmoduleAliases,\\ncompartment,\\nmoduleSpecifier,\\nmoduleSource,\\nenqueueJob,\\nselectImplementation,\\nmoduleLoads);\\n\\n/* Memoize.*/\\ncommons.mapSet(moduleRecords,moduleSpecifier,moduleRecord);\\nreturn moduleRecord;}else\\n{\\nthrow assert.makeError(\\nassert.X`module descriptor must be a string or object for specifier ${assert.q(\\nmoduleSpecifier)\\n} in compartment ${assert.q(compartment.name)}`);}}\\n\\n\\n\\n\\nconst memoizedLoadWithErrorAnnotation=(\\ncompartmentPrivateFields,\\nmoduleAliases,\\ncompartment,\\nmoduleSpecifier,\\nenqueueJob,\\nselectImplementation,\\nmoduleLoads)=>\\n{\\nconst{name:compartmentName}=commons.weakmapGet(\\ncompartmentPrivateFields,\\ncompartment);\\n\\n\\n/* Prevent data-lock from recursion into branches visited in dependent loads.*/\\nlet compartmentLoading=commons.mapGet(moduleLoads,compartment);\\nif(compartmentLoading===undefined){\\ncompartmentLoading=new commons.Map();\\ncommons.mapSet(moduleLoads,compartment,compartmentLoading);}\\n\\nlet moduleLoading=commons.mapGet(compartmentLoading,moduleSpecifier);\\nif(moduleLoading!==undefined){\\nreturn moduleLoading;}\\n\\n\\nmoduleLoading=selectImplementation(asyncTrampoline,syncTrampoline)(\\nloadWithoutErrorAnnotation,\\n[\\ncompartmentPrivateFields,\\nmoduleAliases,\\ncompartment,\\nmoduleSpecifier,\\nenqueueJob,\\nselectImplementation,\\nmoduleLoads],\\n\\n(error)=>{\\n/* eslint-disable-next-line @endo/no-polymorphic-call*/\\nassert.annotateError(\\nerror,\\nassert.X`${error.message}, loading ${assert.q(moduleSpecifier)} in compartment ${assert.q(\\ncompartmentName)\\n}`);\\n\\nthrow error;});\\n\\n\\n\\ncommons.mapSet(compartmentLoading,moduleSpecifier,moduleLoading);\\n\\nreturn moduleLoading;};\\n\\n\\nconst asyncJobQueue=()=>{\\n/** @type {Set<Promise<undefined>>} */\\nconst pendingJobs=new commons.Set();\\n/** @type {Array<Error>} */\\nconst errors=[];\\n\\n/**\\n * Enqueues a job that starts immediately but won't be awaited until drainQueue is called.\\n *\\n * @template {any[]} T\\n * @param {(...args: T)=>Promise<*>} func\\n * @param {T} args\\n */\\nconst enqueueJob=(func,args)=>{\\ncommons.setAdd(\\npendingJobs,\\ncommons.promiseThen(func(...args),noop,(error)=>{\\ncommons.arrayPush(errors,error);}));};\\n\\n\\n\\n/**\\n * Sequentially awaits pending jobs and returns an array of errors\\n *\\n * @returns {Promise<Array<Error>>}\\n */\\nconst drainQueue=async()=>{\\nawait null;\\nfor(const job of pendingJobs){\\n/* eslint-disable-next-line no-await-in-loop*/\\nawait job;}\\n\\nreturn errors;};\\n\\nreturn{enqueueJob,drainQueue};};\\n\\n\\n/**\\n * @param {object} options\\n * @param {Array<Error>} options.errors\\n * @param {string} options.errorPrefix\\n */\\nconst throwAggregateError=({errors,errorPrefix})=>{\\n/* Throw an aggregate error if there were any errors.*/\\nif(errors.length>0){\\nconst verbose=\\nenvOptions.getEnvironmentOption('COMPARTMENT_LOAD_ERRORS','',['verbose'])==='verbose';\\nthrow commons.TypeError(\\n`${errorPrefix} (${errors.length} underlying failures: ${commons.arrayJoin(\\ncommons.arrayMap(errors,(error)=>error.message+(verbose?error.stack:'')),\\n', ')\\n}`);}};\\n\\n\\n\\n\\nconst preferSync=(_asyncImpl,syncImpl)=>syncImpl;\\nconst preferAsync=(asyncImpl,_syncImpl)=>asyncImpl;\\n\\n/* * `load` asynchronously gathers the module records for a module and its\\n * transitive dependencies.\\n * The module records refer to each other by a reference to the dependency's\\n * compartment and the specifier of the module within its own compartment.\\n * This graph is then ready to be synchronously linked and executed.\\n */\\n\\nconst load=async(\\ncompartmentPrivateFields,\\nmoduleAliases,\\ncompartment,\\nmoduleSpecifier)=>\\n{\\nconst{name:compartmentName}=commons.weakmapGet(\\ncompartmentPrivateFields,\\ncompartment);\\n\\n\\n/** @type {Map<object, Map<string, Promise<Record<any, any>>>>} */\\nconst moduleLoads=new commons.Map();\\n\\nconst{enqueueJob,drainQueue}=asyncJobQueue();\\n\\nenqueueJob(memoizedLoadWithErrorAnnotation,[\\ncompartmentPrivateFields,\\nmoduleAliases,\\ncompartment,\\nmoduleSpecifier,\\nenqueueJob,\\npreferAsync,\\nmoduleLoads]);\\n\\n\\n/* Drain pending jobs queue and throw an aggregate error*/\\nconst errors=await drainQueue();\\n\\nthrowAggregateError({\\nerrors,\\nerrorPrefix:`Failed to load module ${assert.q(moduleSpecifier)} in package ${assert.q(\\ncompartmentName)\\n}`});};\\n\\n\\n\\n/* * `loadNow` synchronously gathers the module records for a specified module\\n * and its transitive dependencies.\\n * The module records refer to each other by a reference to the dependency's\\n * compartment and the specifier of the module within its own compartment.\\n * This graph is then ready to be synchronously linked and executed.\\n */\\n\\nconst loadNow=(\\ncompartmentPrivateFields,\\nmoduleAliases,\\ncompartment,\\nmoduleSpecifier)=>\\n{\\nconst{name:compartmentName}=commons.weakmapGet(\\ncompartmentPrivateFields,\\ncompartment);\\n\\n\\n/** @type {Map<object, Map<string, Promise<Record<any, any>>>>} */\\nconst moduleLoads=new commons.Map();\\n\\n/** @type {Array<Error>} */\\nconst errors=[];\\n\\nconst enqueueJob=(func,args)=>{\\ntry{\\nfunc(...args);}\\ncatch(error){\\ncommons.arrayPush(errors,error);}};\\n\\n\\n\\nenqueueJob(memoizedLoadWithErrorAnnotation,[\\ncompartmentPrivateFields,\\nmoduleAliases,\\ncompartment,\\nmoduleSpecifier,\\nenqueueJob,\\npreferSync,\\nmoduleLoads]);\\n\\n\\nthrowAggregateError({\\nerrors,\\nerrorPrefix:`Failed to load module ${assert.q(moduleSpecifier)} in package ${assert.q(\\ncompartmentName)\\n}`});};exports.load=load;exports.loadNow=loadNow;exports.makeAlias=makeAlias;\",\n \"node_modules/ses/src/module-proxy.js\": \"'use strict';Object.defineProperty(exports,'__esModule',{value:true});var moduleLoad=require('./module-load.js');var commons=require('./commons.js');var assert=require('./error/assert.js');/* Compartments need a mechanism to link a module from one compartment*/\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\nconst{quote:q}=assert.assert;\\n\\n/* `deferExports` creates a module's exports proxy, proxied exports, and*/\\n/* activator.*/\\n/* A `Compartment` can create a module for any module specifier, regardless of*/\\n/* whether it is loadable or executable, and use that object as a token that*/\\n/* can be fed into another compartment's module map.*/\\n/* Only after the specified module has been analyzed is it possible for the*/\\n/* module namespace proxy to behave properly, so it throws exceptions until*/\\n/* after the compartment has begun executing the module.*/\\n/* The module instance must freeze the proxied exports and activate the exports*/\\n/* proxy before executing the module.*/\\n/**/\\n/* The module exports proxy's behavior differs from the ECMAScript 262*/\\n/* specification for \\\"module namespace exotic objects\\\" only in that according*/\\n/* to the specification value property descriptors have a non-writable \\\"value\\\"*/\\n/* and this implementation models all properties with accessors.*/\\n/**/\\n/* https://tc39.es/ecma262/#sec-module-namespace-exotic-objects*/\\n/**/\\nconst deferExports=()=>{\\nlet active=false;\\nconst exportsTarget=commons.create(null,{\\n/* Make this appear like an ESM module namespace object.*/\\n[commons.toStringTagSymbol]:{\\nvalue:'Module',\\nwritable:false,\\nenumerable:false,\\nconfigurable:false}});\\n\\n\\nreturn commons.freeze({\\nactivate(){\\nactive=true;},\\n\\nexportsTarget,\\nexportsProxy:new commons.Proxy(exportsTarget,{\\nget(_target,name,receiver){\\nif(!active){\\nthrow commons.TypeError(\\n`Cannot get property ${q(\\nname)\\n} of module exports namespace, the module has not yet begun to execute`);}\\n\\n\\nreturn commons.reflectGet(exportsTarget,name,receiver);},\\n\\nset(_target,name,_value){\\nthrow commons.TypeError(\\n`Cannot set property ${q(name)} of module exports namespace`);},\\n\\n\\nhas(_target,name){\\nif(!active){\\nthrow commons.TypeError(\\n`Cannot check property ${q(\\nname)\\n}, the module has not yet begun to execute`);}\\n\\n\\nreturn commons.reflectHas(exportsTarget,name);},\\n\\ndeleteProperty(_target,name){\\nthrow commons.TypeError(\\n`Cannot delete property ${q(name)}s of module exports namespace`);},\\n\\n\\nownKeys(_target){\\nif(!active){\\nthrow commons.TypeError(\\n'Cannot enumerate keys, the module has not yet begun to execute');}\\n\\n\\nreturn commons.ownKeys(exportsTarget);},\\n\\ngetOwnPropertyDescriptor(_target,name){\\nif(!active){\\nthrow commons.TypeError(\\n`Cannot get own property descriptor ${q(\\nname)\\n}, the module has not yet begun to execute`);}\\n\\n\\nreturn commons.reflectGetOwnPropertyDescriptor(exportsTarget,name);},\\n\\npreventExtensions(_target){\\nif(!active){\\nthrow commons.TypeError(\\n'Cannot prevent extensions of module exports namespace, the module has not yet begun to execute');}\\n\\n\\nreturn commons.reflectPreventExtensions(exportsTarget);},\\n\\nisExtensible(){\\nif(!active){\\nthrow commons.TypeError(\\n'Cannot check extensibility of module exports namespace, the module has not yet begun to execute');}\\n\\n\\nreturn commons.reflectIsExtensible(exportsTarget);},\\n\\ngetPrototypeOf(_target){\\nreturn null;},\\n\\nsetPrototypeOf(_target,_proto){\\nthrow commons.TypeError('Cannot set prototype of module exports namespace');},\\n\\ndefineProperty(_target,name,_descriptor){\\nthrow commons.TypeError(\\n`Cannot define property ${q(name)} of module exports namespace`);},\\n\\n\\napply(_target,_thisArg,_args){\\nthrow commons.TypeError(\\n'Cannot call module exports namespace, it is not a function');},\\n\\n\\nconstruct(_target,_args){\\nthrow commons.TypeError(\\n'Cannot construct module exports namespace, it is not a constructor');}})});};\\n\\n\\n\\n\\n\\n\\n/**\\n * @typedef {object} DeferredExports\\n * @property {Record<string, any>} exportsTarget - The object to which a\\n * module's exports will be added.\\n * @property {Record<string, any>} exportsProxy - A proxy over the `exportsTarget`,\\n * used to expose its \\\"exports\\\" to other compartments.\\n * @property {() => void} activate - Activate the `exportsProxy` such that it can\\n * be used as a module namespace object.\\n */\\n\\n/**\\n * Memoizes the creation of a deferred module exports namespace proxy for any\\n * arbitrary full specifier in a compartment. It also records the compartment\\n * and specifier affiliated with that module exports namespace proxy so it\\n * can be used as an alias into another compartment when threaded through\\n * a compartment's `moduleMap` argument.\\n *\\n * @param {*} compartment - The compartment to retrieve deferred exports from.\\n * @param {*} compartmentPrivateFields - The private fields of the compartment.\\n * @param {*} moduleAliases - The module aliases of the compartment.\\n * @param {string} specifier - The module specifier to retrieve deferred exports for.\\n * @returns {DeferredExports} - The deferred exports for the module specifier of\\n * the compartment.\\n */\\nconst getDeferredExports=(\\ncompartment,\\ncompartmentPrivateFields,\\nmoduleAliases,\\nspecifier)=>\\n{\\nconst{deferredExports}=compartmentPrivateFields;\\nif(!commons.mapHas(deferredExports,specifier)){\\nconst deferred=deferExports();\\ncommons.weakmapSet(\\nmoduleAliases,\\ndeferred.exportsProxy,\\nmoduleLoad.makeAlias(compartment,specifier));\\n\\ncommons.mapSet(deferredExports,specifier,deferred);}\\n\\nreturn commons.mapGet(deferredExports,specifier);};exports.deferExports=deferExports;exports.getDeferredExports=getDeferredExports;\",\n \"node_modules/ses/src/permits-intrinsics.js\": \"'use strict';Object.defineProperty(exports,'__esModule',{value:true});var permits=require('./permits.js');var\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\ncommons=require('./commons.js');/* Copyright (C) 2011 Google Inc.*/ /**\\n * whitelistIntrinsics()\\n * Removes all non-allowed properties found by recursively and\\n * reflectively walking own property chains.\\n *\\n * @param {object} intrinsics\\n * @param {(object) => void} markVirtualizedNativeFunction\\n */\\nfunction whitelistIntrinsics(\\nintrinsics,\\nmarkVirtualizedNativeFunction)\\n{\\nlet groupStarted=false;\\nconst inConsoleGroup=(level,...args)=>{\\nif(!groupStarted){\\n/* eslint-disable-next-line @endo/no-polymorphic-call*/\\nconsole.groupCollapsed('Removing unpermitted intrinsics');\\ngroupStarted=true;}\\n\\n/* eslint-disable-next-line @endo/no-polymorphic-call*/\\nreturn console[level](...args);};\\n\\n\\n/* These primitives are allowed for permits.*/\\nconst primitives=['undefined','boolean','number','string','symbol'];\\n\\n/* These symbols are allowed as well-known symbols*/\\nconst wellKnownSymbolNames=new commons.Map(\\ncommons.Symbol?\\ncommons.arrayMap(\\ncommons.arrayFilter(\\ncommons.entries(permits.permitted['%SharedSymbol%']),\\n([name,permit])=>\\npermit==='symbol'&&typeof commons.Symbol[name]==='symbol'),\\n\\n([name])=>[commons.Symbol[name],`@@${name}`]):\\n\\n[]);\\n\\n\\n/**\\n * asStringPropertyName()\\n *\\n * @param {string} path\\n * @param {string | symbol} prop\\n */\\nfunction asStringPropertyName(path,prop){\\nif(typeof prop==='string'){\\nreturn prop;}\\n\\n\\nconst wellKnownSymbol=commons.mapGet(wellKnownSymbolNames,prop);\\n\\nif(typeof prop==='symbol'){\\nif(wellKnownSymbol){\\nreturn wellKnownSymbol;}else\\n{\\nconst registeredKey=commons.symbolKeyFor(prop);\\nif(registeredKey!==undefined){\\nreturn`RegisteredSymbol(${registeredKey})`;}else\\n{\\nreturn`Unique${commons.String(prop)}`;}}}\\n\\n\\n\\n\\nthrow commons.TypeError(`Unexpected property name type ${path} ${prop}`);}\\n\\n\\n/* * visitPrototype()\\n * Validate the object's [[prototype]] against a permit.\\n */\\n\\nfunction visitPrototype(path,obj,protoName){\\nif(!commons.isObject(obj)){\\nthrow commons.TypeError(`Object expected: ${path}, ${obj}, ${protoName}`);}\\n\\nconst proto=commons.getPrototypeOf(obj);\\n\\n/* Null prototype.*/\\nif(proto===null&&protoName===null){\\nreturn;}\\n\\n\\n/* Assert: protoName, if provided, is a string.*/\\nif(protoName!==undefined&&typeof protoName!=='string'){\\nthrow commons.TypeError(`Malformed whitelist permit ${path}.__proto__`);}\\n\\n\\n/* If permit not specified, default to Object.prototype.*/\\nif(proto===intrinsics[protoName||'%ObjectPrototype%']){\\nreturn;}\\n\\n\\n/* We can't clean [[prototype]], therefore abort.*/\\nthrow commons.TypeError(`Unexpected intrinsic ${path}.__proto__ at ${protoName}`);}\\n\\n\\n/* * isAllowedPropertyValue()\\n * Whitelist a single property value against a permit.\\n */\\n\\nfunction isAllowedPropertyValue(path,value,prop,permit){\\nif(typeof permit==='object'){\\n/* eslint-disable-next-line no-use-before-define*/\\nvisitProperties(path,value,permit);\\n/* The property is allowed.*/\\nreturn true;}\\n\\n\\nif(permit===false){\\n/* A boolan 'false' permit specifies the removal of a property.*/\\n/* We require a more specific permit instead of allowing 'true'.*/\\nreturn false;}\\n\\n\\nif(typeof permit==='string'){\\n/* A string permit can have one of two meanings:*/\\n\\nif(prop==='prototype'||prop==='constructor'){\\n/* For prototype and constructor value properties, the permit*/\\n/* is the name of an intrinsic.*/\\n/* Assumption: prototype and constructor cannot be primitives.*/\\n/* Assert: the permit is the name of an intrinsic.*/\\n/* Assert: the property value is equal to that intrinsic.*/\\n\\nif(commons.objectHasOwnProperty(intrinsics,permit)){\\nif(value!==intrinsics[permit]){\\nthrow commons.TypeError(`Does not match whitelist ${path}`);}\\n\\nreturn true;}}else\\n\\n{\\n/* For all other properties, the permit is the name of a primitive.*/\\n/* Assert: the permit is the name of a primitive.*/\\n/* Assert: the property value type is equal to that primitive.*/\\n\\n/* eslint-disable-next-line no-lonely-if*/\\nif(commons.arrayIncludes(primitives,permit)){\\n/* eslint-disable-next-line valid-typeof*/\\nif(typeof value!==permit){\\nthrow commons.TypeError(\\n`At ${path} expected ${permit} not ${typeof value}`);}\\n\\n\\nreturn true;}}}\\n\\n\\n\\n\\nthrow commons.TypeError(`Unexpected whitelist permit ${permit} at ${path}`);}\\n\\n\\n/* * isAllowedProperty()\\n * Check whether a single property is allowed.\\n */\\n\\nfunction isAllowedProperty(path,obj,prop,permit){\\nconst desc=commons.getOwnPropertyDescriptor(obj,prop);\\nif(!desc){\\nthrow commons.TypeError(`Property ${prop} not found at ${path}`);}\\n\\n\\n/* Is this a value property?*/\\nif(commons.objectHasOwnProperty(desc,'value')){\\nif(permits.isAccessorPermit(permit)){\\nthrow commons.TypeError(`Accessor expected at ${path}`);}\\n\\nreturn isAllowedPropertyValue(path,desc.value,prop,permit);}\\n\\nif(!permits.isAccessorPermit(permit)){\\nthrow commons.TypeError(`Accessor not expected at ${path}`);}\\n\\nreturn(\\nisAllowedPropertyValue(`${path}<get>`,desc.get,prop,permit.get)&&\\nisAllowedPropertyValue(`${path}<set>`,desc.set,prop,permit.set));}\\n\\n\\n\\n/* * getSubPermit()\\n */\\n\\nfunction getSubPermit(obj,permit,prop){\\nconst permitProp=prop==='__proto__'?'--proto--':prop;\\nif(commons.objectHasOwnProperty(permit,permitProp)){\\nreturn permit[permitProp];}\\n\\n\\nif(typeof obj==='function'){\\nif(commons.objectHasOwnProperty(permits.FunctionInstance,permitProp)){\\nreturn permits.FunctionInstance[permitProp];}}\\n\\n\\n\\nreturn undefined;}\\n\\n\\n/* * visitProperties()\\n * Visit all properties for a permit.\\n */\\n\\nfunction visitProperties(path,obj,permit){\\nif(obj===undefined||obj===null){\\nreturn;}\\n\\n\\nconst protoName=permit['[[Proto]]'];\\nvisitPrototype(path,obj,protoName);\\n\\nif(typeof obj==='function'){\\nmarkVirtualizedNativeFunction(obj);}\\n\\n\\nfor(const prop of commons.ownKeys(obj)){\\nconst propString=asStringPropertyName(path,prop);\\nconst subPath=`${path}.${propString}`;\\nconst subPermit=getSubPermit(obj,permit,propString);\\n\\nif(!subPermit||!isAllowedProperty(subPath,obj,prop,subPermit)){\\n/* Either the object lacks a permit or the object doesn't match the*/\\n/* permit.*/\\n/* If the permit is specifically false, not merely undefined,*/\\n/* this is a property we expect to see because we know it exists in*/\\n/* some environments and we have expressly decided to exclude it.*/\\n/* Any other disallowed property is one we have not audited and we log*/\\n/* that we are removing it so we know to look into it, as happens when*/\\n/* the language evolves new features to existing intrinsics.*/\\nif(subPermit!==false){\\ninConsoleGroup('warn',`Removing ${subPath}`);}\\n\\ntry{\\ndelete obj[prop];}\\ncatch(err){\\nif(prop in obj){\\nif(typeof obj==='function'&&prop==='prototype'){\\nobj.prototype=undefined;\\nif(obj.prototype===undefined){\\ninConsoleGroup(\\n'warn',\\n`Tolerating undeletable ${subPath} === undefined`);\\n\\n/* eslint-disable-next-line no-continue*/\\ncontinue;}}\\n\\n\\ninConsoleGroup('error',`failed to delete ${subPath}`,err);}else\\n{\\ninConsoleGroup('error',`deleting ${subPath} threw`,err);}\\n\\nthrow err;}}}}\\n\\n\\n\\n\\n\\ntry{\\n/* Start path with 'intrinsics' to clarify that properties are not*/\\n/* removed from the global object by the whitelisting operation.*/\\nvisitProperties('intrinsics',intrinsics,permits.permitted);}finally\\n{\\nif(groupStarted){\\n/* eslint-disable-next-line @endo/no-polymorphic-call*/\\nconsole.groupEnd();}}}exports[\\\"default\\\"]=whitelistIntrinsics;\",\n \"node_modules/ses/src/permits.js\": \"'use strict';Object.defineProperty(exports,'__esModule',{value:true});var\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\ncommons=require('./commons.js');/* eslint-disable no-restricted-globals */ /** @import {GenericErrorConstructor} from '../types.js' */ /**\\n * @file Exports {@code whitelist}, a recursively defined\\n * JSON record enumerating all intrinsics and their properties\\n * according to ECMA specs.\\n *\\n * @author JF Paradis\\n * @author Mark S. Miller\\n */ /**\\n * constantProperties\\n * non-configurable, non-writable data properties of all global objects.\\n * Must be powerless.\\n * Maps from property name to the actual value\\n */const constantProperties={/* *** Value Properties of the Global Object*/Infinity,NaN,undefined};\\n\\n/**\\n * universalPropertyNames\\n * Properties of all global objects.\\n * Must be powerless.\\n * Maps from property name to the intrinsic name in the whitelist.\\n */\\nconst universalPropertyNames={\\n/* *** Function Properties of the Global Object*/\\n\\nisFinite:'isFinite',\\nisNaN:'isNaN',\\nparseFloat:'parseFloat',\\nparseInt:'parseInt',\\n\\ndecodeURI:'decodeURI',\\ndecodeURIComponent:'decodeURIComponent',\\nencodeURI:'encodeURI',\\nencodeURIComponent:'encodeURIComponent',\\n\\n/* *** Constructor Properties of the Global Object*/\\n\\nArray:'Array',\\nArrayBuffer:'ArrayBuffer',\\nBigInt:'BigInt',\\nBigInt64Array:'BigInt64Array',\\nBigUint64Array:'BigUint64Array',\\nBoolean:'Boolean',\\nDataView:'DataView',\\nEvalError:'EvalError',\\n/* https://github.com/tc39/proposal-float16array*/\\nFloat16Array:'Float16Array',\\nFloat32Array:'Float32Array',\\nFloat64Array:'Float64Array',\\nInt8Array:'Int8Array',\\nInt16Array:'Int16Array',\\nInt32Array:'Int32Array',\\nMap:'Map',\\nNumber:'Number',\\nObject:'Object',\\nPromise:'Promise',\\nProxy:'Proxy',\\nRangeError:'RangeError',\\nReferenceError:'ReferenceError',\\nSet:'Set',\\nString:'String',\\nSyntaxError:'SyntaxError',\\nTypeError:'TypeError',\\nUint8Array:'Uint8Array',\\nUint8ClampedArray:'Uint8ClampedArray',\\nUint16Array:'Uint16Array',\\nUint32Array:'Uint32Array',\\nURIError:'URIError',\\nWeakMap:'WeakMap',\\nWeakSet:'WeakSet',\\n/* https://github.com/tc39/proposal-iterator-helpers*/\\nIterator:'Iterator',\\n/* https://github.com/tc39/proposal-async-iterator-helpers*/\\nAsyncIterator:'AsyncIterator',\\n/* https://github.com/endojs/endo/issues/550*/\\nAggregateError:'AggregateError',\\n\\n/* *** Other Properties of the Global Object*/\\n\\nJSON:'JSON',\\nReflect:'Reflect',\\n\\n/* *** Annex B*/\\n\\nescape:'escape',\\nunescape:'unescape',\\n\\n/* ESNext*/\\n\\nlockdown:'lockdown',\\nharden:'harden',\\nHandledPromise:'HandledPromise'/* TODO: Until Promise.delegate (see below).*/};\\n\\n\\n/**\\n * initialGlobalPropertyNames\\n * Those found only on the initial global, i.e., the global of the\\n * start compartment, as well as any compartments created before lockdown.\\n * These may provide much of the power provided by the original.\\n * Maps from property name to the intrinsic name in the whitelist.\\n */\\nconst initialGlobalPropertyNames={\\n/* *** Constructor Properties of the Global Object*/\\n\\nDate:'%InitialDate%',\\nError:'%InitialError%',\\nRegExp:'%InitialRegExp%',\\n\\n/* Omit `Symbol`, because we want the original to appear on the*/\\n/* start compartment without passing through the whitelist mechanism, since*/\\n/* we want to preserve all its properties, even if we never heard of them.*/\\n/* Symbol: '%InitialSymbol%',*/\\n\\n/* *** Other Properties of the Global Object*/\\n\\nMath:'%InitialMath%',\\n\\n/* ESNext*/\\n\\n/* From Error-stack proposal*/\\n/* Only on initial global. No corresponding*/\\n/* powerless form for other globals.*/\\ngetStackString:'%InitialGetStackString%'\\n\\n/* TODO https://github.com/Agoric/SES-shim/issues/551*/\\n/* Need initial WeakRef and FinalizationGroup in*/\\n/* start compartment only.*/};\\n\\n\\n/**\\n * sharedGlobalPropertyNames\\n * Those found only on the globals of new compartments created after lockdown,\\n * which must therefore be powerless.\\n * Maps from property name to the intrinsic name in the whitelist.\\n */\\nconst sharedGlobalPropertyNames={\\n/* *** Constructor Properties of the Global Object*/\\n\\nDate:'%SharedDate%',\\nError:'%SharedError%',\\nRegExp:'%SharedRegExp%',\\nSymbol:'%SharedSymbol%',\\n\\n/* *** Other Properties of the Global Object*/\\n\\nMath:'%SharedMath%'};\\n\\n\\n/**\\n * uniqueGlobalPropertyNames\\n * Those made separately for each global, including the initial global\\n * of the start compartment.\\n * Maps from property name to the intrinsic name in the whitelist\\n * (which is currently always the same).\\n */\\nconst uniqueGlobalPropertyNames={\\n/* *** Value Properties of the Global Object*/\\n\\nglobalThis:'%UniqueGlobalThis%',\\n\\n/* *** Function Properties of the Global Object*/\\n\\neval:'%UniqueEval%',\\n\\n/* *** Constructor Properties of the Global Object*/\\n\\nFunction:'%UniqueFunction%',\\n\\n/* *** Other Properties of the Global Object*/\\n\\n/* ESNext*/\\n\\nCompartment:'%UniqueCompartment%'\\n/* According to current agreements, eventually the Realm constructor too.*/\\n/* 'Realm',*/};\\n\\n\\n/* All the \\\"subclasses\\\" of Error. These are collectively represented in the*/\\n/* ECMAScript spec by the meta variable NativeError.*/\\n/** @type {GenericErrorConstructor[]} */\\nconst NativeErrors=[\\nEvalError,\\nRangeError,\\nReferenceError,\\nSyntaxError,\\nTypeError,\\nURIError\\n/* https://github.com/endojs/endo/issues/550*/\\n/* Commented out to accommodate platforms prior to AggregateError.*/\\n/* Instead, conditional push below.*/\\n/* AggregateError,*/];\\n\\n\\nif(typeof AggregateError!=='undefined'){\\n/* Conditional, to accommodate platforms prior to AggregateError*/\\ncommons.arrayPush(NativeErrors,AggregateError);}\\n\\n\\n\\n\\n/**\\n * <p>Each JSON record enumerates the disposition of the properties on\\n * some corresponding intrinsic object.\\n *\\n * <p>All records are made of key-value pairs where the key\\n * is the property to process, and the value is the associated\\n * dispositions a.k.a. the \\\"permit\\\". Those permits can be:\\n * <ul>\\n * <li>The boolean value \\\"false\\\", in which case this property is\\n * blacklisted and simply removed. Properties not mentioned\\n * are also considered blacklisted and are removed.\\n * <li>A string value equal to a primitive (\\\"number\\\", \\\"string\\\", etc),\\n * in which case the property is whitelisted if its value property\\n * is typeof the given type. For example, {@code \\\"Infinity\\\"} leads to\\n * \\\"number\\\" and property values that fail {@code typeof \\\"number\\\"}.\\n * are removed.\\n * <li>A string value equal to an intinsic name (\\\"ObjectPrototype\\\",\\n * \\\"Array\\\", etc), in which case the property whitelisted if its\\n * value property is equal to the value of the corresponfing\\n * intrinsics. For example, {@code Map.prototype} leads to\\n * \\\"MapPrototype\\\" and the property is removed if its value is\\n * not equal to %MapPrototype%\\n * <li>Another record, in which case this property is simply\\n * whitelisted and that next record represents the disposition of\\n * the object which is its value. For example, {@code \\\"Object\\\"}\\n * leads to another record explaining what properties {@code\\n * \\\"Object\\\"} may have and how each such property should be treated.\\n *\\n * <p>Notes:\\n * <li>\\\"[[Proto]]\\\" is used to refer to the \\\"[[Prototype]]\\\" internal\\n * slot, which says which object this object inherits from.\\n * <li>\\\"--proto--\\\" is used to refer to the \\\"__proto__\\\" property name,\\n * which is the name of an accessor property on Object.prototype.\\n * In practice, it is used to access the [[Proto]] internal slot,\\n * but is distinct from the internal slot itself. We use\\n * \\\"--proto--\\\" rather than \\\"__proto__\\\" below because \\\"__proto__\\\"\\n * in an object literal is special syntax rather than a normal\\n * property definition.\\n * <li>\\\"ObjectPrototype\\\" is the default \\\"[[Proto]]\\\" (when not specified).\\n * <li>Constants \\\"fn\\\" and \\\"getter\\\" are used to keep the structure DRY.\\n * <li>Symbol properties are listed as follow:\\n * <li>Well-known symbols use the \\\"@@name\\\" form.\\n * <li>Registered symbols use the \\\"RegisteredSymbol(key)\\\" form.\\n * <li>Unique symbols use the \\\"UniqueSymbol(description)\\\" form.\\n */\\n\\n/* Function Instances*/\\nconst FunctionInstance={\\n'[[Proto]]':'%FunctionPrototype%',\\nlength:'number',\\nname:'string'\\n/* Do not specify \\\"prototype\\\" here, since only Function instances that can*/\\n/* be used as a constructor have a prototype property. For constructors,*/\\n/* since prototype properties are instance-specific, we define it there.*/};\\n\\n\\n/* AsyncFunction Instances*/\\nconst AsyncFunctionInstance={\\n/* This property is not mentioned in ECMA 262, but is present in V8 and*/\\n/* necessary for lockdown to succeed.*/\\n'[[Proto]]':'%AsyncFunctionPrototype%'};\\n\\n\\n/* Aliases*/\\nconst fn=FunctionInstance;\\nconst asyncFn=AsyncFunctionInstance;\\n\\nconst getter={\\nget:fn,\\nset:'undefined'};\\n\\n\\n/* Possible but not encountered in the specs*/\\n/* export const setter = {*/\\n/* get: 'undefined',*/\\n/* set: fn,*/\\n/* };*/\\n\\nconst accessor={\\nget:fn,\\nset:fn};\\n\\n\\nconst isAccessorPermit=(permit)=>{\\nreturn permit===getter||permit===accessor;};\\n\\n\\n/* NativeError Object Structure*/\\nfunction NativeError(prototype){\\nreturn{\\n/* Properties of the NativeError Constructors*/\\n'[[Proto]]':'%SharedError%',\\n\\n/* NativeError.prototype*/\\nprototype};}\\n\\n\\n\\nfunction NativeErrorPrototype(constructor){\\nreturn{\\n/* Properties of the NativeError Prototype Objects*/\\n'[[Proto]]':'%ErrorPrototype%',\\nconstructor,\\nmessage:'string',\\nname:'string',\\n/* Redundantly present only on v8. Safe to remove.*/\\ntoString:false,\\n/* Superfluously present in some versions of V8.*/\\n/* https://github.com/tc39/notes/blob/master/meetings/2021-10/oct-26.md#:~:text=However%2C%20Chrome%2093,and%20node%2016.11.*/\\ncause:false};}\\n\\n\\n\\n/* The TypedArray Constructors*/\\nfunction TypedArray(prototype){\\nreturn{\\n/* Properties of the TypedArray Constructors*/\\n'[[Proto]]':'%TypedArray%',\\nBYTES_PER_ELEMENT:'number',\\nprototype};}\\n\\n\\n\\nfunction TypedArrayPrototype(constructor){\\nreturn{\\n/* Properties of the TypedArray Prototype Objects*/\\n'[[Proto]]':'%TypedArrayPrototype%',\\nBYTES_PER_ELEMENT:'number',\\nconstructor};}\\n\\n\\n\\n/* Without Math.random*/\\nconst CommonMath={\\nE:'number',\\nLN10:'number',\\nLN2:'number',\\nLOG10E:'number',\\nLOG2E:'number',\\nPI:'number',\\nSQRT1_2:'number',\\nSQRT2:'number',\\n'@@toStringTag':'string',\\nabs:fn,\\nacos:fn,\\nacosh:fn,\\nasin:fn,\\nasinh:fn,\\natan:fn,\\natanh:fn,\\natan2:fn,\\ncbrt:fn,\\nceil:fn,\\nclz32:fn,\\ncos:fn,\\ncosh:fn,\\nexp:fn,\\nexpm1:fn,\\nfloor:fn,\\nfround:fn,\\nhypot:fn,\\nimul:fn,\\nlog:fn,\\nlog1p:fn,\\nlog10:fn,\\nlog2:fn,\\nmax:fn,\\nmin:fn,\\npow:fn,\\nround:fn,\\nsign:fn,\\nsin:fn,\\nsinh:fn,\\nsqrt:fn,\\ntan:fn,\\ntanh:fn,\\ntrunc:fn,\\n/* See https://github.com/Moddable-OpenSource/moddable/issues/523*/\\nidiv:false,\\n/* See https://github.com/Moddable-OpenSource/moddable/issues/523*/\\nidivmod:false,\\n/* See https://github.com/Moddable-OpenSource/moddable/issues/523*/\\nimod:false,\\n/* See https://github.com/Moddable-OpenSource/moddable/issues/523*/\\nimuldiv:false,\\n/* See https://github.com/Moddable-OpenSource/moddable/issues/523*/\\nirem:false,\\n/* See https://github.com/Moddable-OpenSource/moddable/issues/523*/\\nmod:false,\\n/* See https://github.com/Moddable-OpenSource/moddable/issues/523#issuecomment-1942904505*/\\nirandom:false};\\n\\n\\nconst permitted={\\n/* ECMA https://tc39.es/ecma262*/\\n\\n/* The intrinsics object has no prototype to avoid conflicts.*/\\n'[[Proto]]':null,\\n\\n/* %ThrowTypeError%*/\\n'%ThrowTypeError%':fn,\\n\\n/* *** The Global Object*/\\n\\n/* *** Value Properties of the Global Object*/\\nInfinity:'number',\\nNaN:'number',\\nundefined:'undefined',\\n\\n/* *** Function Properties of the Global Object*/\\n\\n/* eval*/\\n'%UniqueEval%':fn,\\nisFinite:fn,\\nisNaN:fn,\\nparseFloat:fn,\\nparseInt:fn,\\ndecodeURI:fn,\\ndecodeURIComponent:fn,\\nencodeURI:fn,\\nencodeURIComponent:fn,\\n\\n/* *** Fundamental Objects*/\\n\\nObject:{\\n/* Properties of the Object Constructor*/\\n'[[Proto]]':'%FunctionPrototype%',\\nassign:fn,\\ncreate:fn,\\ndefineProperties:fn,\\ndefineProperty:fn,\\nentries:fn,\\nfreeze:fn,\\nfromEntries:fn,\\ngetOwnPropertyDescriptor:fn,\\ngetOwnPropertyDescriptors:fn,\\ngetOwnPropertyNames:fn,\\ngetOwnPropertySymbols:fn,\\ngetPrototypeOf:fn,\\nhasOwn:fn,\\nis:fn,\\nisExtensible:fn,\\nisFrozen:fn,\\nisSealed:fn,\\nkeys:fn,\\npreventExtensions:fn,\\nprototype:'%ObjectPrototype%',\\nseal:fn,\\nsetPrototypeOf:fn,\\nvalues:fn,\\n/* https://github.com/tc39/proposal-array-grouping*/\\ngroupBy:fn,\\n/* Seen on QuickJS*/\\n__getClass:false},\\n\\n\\n'%ObjectPrototype%':{\\n/* Properties of the Object Prototype Object*/\\n'[[Proto]]':null,\\nconstructor:'Object',\\nhasOwnProperty:fn,\\nisPrototypeOf:fn,\\npropertyIsEnumerable:fn,\\ntoLocaleString:fn,\\ntoString:fn,\\nvalueOf:fn,\\n\\n/* Annex B: Additional Properties of the Object.prototype Object*/\\n\\n/* See note in header about the difference between [[Proto]] and --proto--*/\\n/* special notations.*/\\n'--proto--':accessor,\\n__defineGetter__:fn,\\n__defineSetter__:fn,\\n__lookupGetter__:fn,\\n__lookupSetter__:fn},\\n\\n\\n'%UniqueFunction%':{\\n/* Properties of the Function Constructor*/\\n'[[Proto]]':'%FunctionPrototype%',\\nprototype:'%FunctionPrototype%'},\\n\\n\\n'%InertFunction%':{\\n'[[Proto]]':'%FunctionPrototype%',\\nprototype:'%FunctionPrototype%'},\\n\\n\\n'%FunctionPrototype%':{\\napply:fn,\\nbind:fn,\\ncall:fn,\\nconstructor:'%InertFunction%',\\ntoString:fn,\\n'@@hasInstance':fn,\\n/* proposed but not yet std. To be removed if there*/\\ncaller:false,\\n/* proposed but not yet std. To be removed if there*/\\narguments:false,\\n/* Seen on QuickJS. TODO grab getter for use by console*/\\nfileName:false,\\n/* Seen on QuickJS. TODO grab getter for use by console*/\\nlineNumber:false},\\n\\n\\nBoolean:{\\n/* Properties of the Boolean Constructor*/\\n'[[Proto]]':'%FunctionPrototype%',\\nprototype:'%BooleanPrototype%'},\\n\\n\\n'%BooleanPrototype%':{\\nconstructor:'Boolean',\\ntoString:fn,\\nvalueOf:fn},\\n\\n\\n'%SharedSymbol%':{\\n/* Properties of the Symbol Constructor*/\\n'[[Proto]]':'%FunctionPrototype%',\\nasyncDispose:'symbol',\\nasyncIterator:'symbol',\\ndispose:'symbol',\\nfor:fn,\\nhasInstance:'symbol',\\nisConcatSpreadable:'symbol',\\niterator:'symbol',\\nkeyFor:fn,\\nmatch:'symbol',\\nmatchAll:'symbol',\\nprototype:'%SymbolPrototype%',\\nreplace:'symbol',\\nsearch:'symbol',\\nspecies:'symbol',\\nsplit:'symbol',\\ntoPrimitive:'symbol',\\ntoStringTag:'symbol',\\nunscopables:'symbol',\\n/* Seen at core-js https://github.com/zloirock/core-js#ecmascript-symbol*/\\nuseSimple:false,\\n/* Seen at core-js https://github.com/zloirock/core-js#ecmascript-symbol*/\\nuseSetter:false,\\n/* Seen on QuickJS*/\\noperatorSet:false},\\n\\n\\n'%SymbolPrototype%':{\\n/* Properties of the Symbol Prototype Object*/\\nconstructor:'%SharedSymbol%',\\ndescription:getter,\\ntoString:fn,\\nvalueOf:fn,\\n'@@toPrimitive':fn,\\n'@@toStringTag':'string'},\\n\\n\\n'%InitialError%':{\\n/* Properties of the Error Constructor*/\\n'[[Proto]]':'%FunctionPrototype%',\\nprototype:'%ErrorPrototype%',\\n/* Non standard, v8 only, used by tap*/\\ncaptureStackTrace:fn,\\n/* Non standard, v8 only, used by tap, tamed to accessor*/\\nstackTraceLimit:accessor,\\n/* Non standard, v8 only, used by several, tamed to accessor*/\\nprepareStackTrace:accessor},\\n\\n\\n'%SharedError%':{\\n/* Properties of the Error Constructor*/\\n'[[Proto]]':'%FunctionPrototype%',\\nprototype:'%ErrorPrototype%',\\n/* Non standard, v8 only, used by tap*/\\ncaptureStackTrace:fn,\\n/* Non standard, v8 only, used by tap, tamed to accessor*/\\nstackTraceLimit:accessor,\\n/* Non standard, v8 only, used by several, tamed to accessor*/\\nprepareStackTrace:accessor},\\n\\n\\n'%ErrorPrototype%':{\\nconstructor:'%SharedError%',\\nmessage:'string',\\nname:'string',\\ntoString:fn,\\n/* proposed de-facto, assumed TODO*/\\n/* Seen on FF Nightly 88.0a1*/\\nat:false,\\n/* Seen on FF and XS*/\\nstack:accessor,\\n/* Superfluously present in some versions of V8.*/\\n/* https://github.com/tc39/notes/blob/master/meetings/2021-10/oct-26.md#:~:text=However%2C%20Chrome%2093,and%20node%2016.11.*/\\ncause:false},\\n\\n\\n/* NativeError*/\\n\\nEvalError:NativeError('%EvalErrorPrototype%'),\\nRangeError:NativeError('%RangeErrorPrototype%'),\\nReferenceError:NativeError('%ReferenceErrorPrototype%'),\\nSyntaxError:NativeError('%SyntaxErrorPrototype%'),\\nTypeError:NativeError('%TypeErrorPrototype%'),\\nURIError:NativeError('%URIErrorPrototype%'),\\n/* https://github.com/endojs/endo/issues/550*/\\nAggregateError:NativeError('%AggregateErrorPrototype%'),\\n\\n'%EvalErrorPrototype%':NativeErrorPrototype('EvalError'),\\n'%RangeErrorPrototype%':NativeErrorPrototype('RangeError'),\\n'%ReferenceErrorPrototype%':NativeErrorPrototype('ReferenceError'),\\n'%SyntaxErrorPrototype%':NativeErrorPrototype('SyntaxError'),\\n'%TypeErrorPrototype%':NativeErrorPrototype('TypeError'),\\n'%URIErrorPrototype%':NativeErrorPrototype('URIError'),\\n/* https://github.com/endojs/endo/issues/550*/\\n'%AggregateErrorPrototype%':NativeErrorPrototype('AggregateError'),\\n\\n/* *** Numbers and Dates*/\\n\\nNumber:{\\n/* Properties of the Number Constructor*/\\n'[[Proto]]':'%FunctionPrototype%',\\nEPSILON:'number',\\nisFinite:fn,\\nisInteger:fn,\\nisNaN:fn,\\nisSafeInteger:fn,\\nMAX_SAFE_INTEGER:'number',\\nMAX_VALUE:'number',\\nMIN_SAFE_INTEGER:'number',\\nMIN_VALUE:'number',\\nNaN:'number',\\nNEGATIVE_INFINITY:'number',\\nparseFloat:fn,\\nparseInt:fn,\\nPOSITIVE_INFINITY:'number',\\nprototype:'%NumberPrototype%'},\\n\\n\\n'%NumberPrototype%':{\\n/* Properties of the Number Prototype Object*/\\nconstructor:'Number',\\ntoExponential:fn,\\ntoFixed:fn,\\ntoLocaleString:fn,\\ntoPrecision:fn,\\ntoString:fn,\\nvalueOf:fn},\\n\\n\\nBigInt:{\\n/* Properties of the BigInt Constructor*/\\n'[[Proto]]':'%FunctionPrototype%',\\nasIntN:fn,\\nasUintN:fn,\\nprototype:'%BigIntPrototype%',\\n/* See https://github.com/Moddable-OpenSource/moddable/issues/523*/\\nbitLength:false,\\n/* See https://github.com/Moddable-OpenSource/moddable/issues/523*/\\nfromArrayBuffer:false,\\n/* Seen on QuickJS*/\\ntdiv:false,\\n/* Seen on QuickJS*/\\nfdiv:false,\\n/* Seen on QuickJS*/\\ncdiv:false,\\n/* Seen on QuickJS*/\\nediv:false,\\n/* Seen on QuickJS*/\\ntdivrem:false,\\n/* Seen on QuickJS*/\\nfdivrem:false,\\n/* Seen on QuickJS*/\\ncdivrem:false,\\n/* Seen on QuickJS*/\\nedivrem:false,\\n/* Seen on QuickJS*/\\nsqrt:false,\\n/* Seen on QuickJS*/\\nsqrtrem:false,\\n/* Seen on QuickJS*/\\nfloorLog2:false,\\n/* Seen on QuickJS*/\\nctz:false},\\n\\n\\n'%BigIntPrototype%':{\\nconstructor:'BigInt',\\ntoLocaleString:fn,\\ntoString:fn,\\nvalueOf:fn,\\n'@@toStringTag':'string'},\\n\\n\\n'%InitialMath%':{\\n...CommonMath,\\n/* `%InitialMath%.random()` has the standard unsafe behavior*/\\nrandom:fn},\\n\\n\\n'%SharedMath%':{\\n...CommonMath,\\n/* `%SharedMath%.random()` is tamed to always throw*/\\nrandom:fn},\\n\\n\\n'%InitialDate%':{\\n/* Properties of the Date Constructor*/\\n'[[Proto]]':'%FunctionPrototype%',\\nnow:fn,\\nparse:fn,\\nprototype:'%DatePrototype%',\\nUTC:fn},\\n\\n\\n'%SharedDate%':{\\n/* Properties of the Date Constructor*/\\n'[[Proto]]':'%FunctionPrototype%',\\n/* `%SharedDate%.now()` is tamed to always throw*/\\nnow:fn,\\nparse:fn,\\nprototype:'%DatePrototype%',\\nUTC:fn},\\n\\n\\n'%DatePrototype%':{\\nconstructor:'%SharedDate%',\\ngetDate:fn,\\ngetDay:fn,\\ngetFullYear:fn,\\ngetHours:fn,\\ngetMilliseconds:fn,\\ngetMinutes:fn,\\ngetMonth:fn,\\ngetSeconds:fn,\\ngetTime:fn,\\ngetTimezoneOffset:fn,\\ngetUTCDate:fn,\\ngetUTCDay:fn,\\ngetUTCFullYear:fn,\\ngetUTCHours:fn,\\ngetUTCMilliseconds:fn,\\ngetUTCMinutes:fn,\\ngetUTCMonth:fn,\\ngetUTCSeconds:fn,\\nsetDate:fn,\\nsetFullYear:fn,\\nsetHours:fn,\\nsetMilliseconds:fn,\\nsetMinutes:fn,\\nsetMonth:fn,\\nsetSeconds:fn,\\nsetTime:fn,\\nsetUTCDate:fn,\\nsetUTCFullYear:fn,\\nsetUTCHours:fn,\\nsetUTCMilliseconds:fn,\\nsetUTCMinutes:fn,\\nsetUTCMonth:fn,\\nsetUTCSeconds:fn,\\ntoDateString:fn,\\ntoISOString:fn,\\ntoJSON:fn,\\ntoLocaleDateString:fn,\\ntoLocaleString:fn,\\ntoLocaleTimeString:fn,\\ntoString:fn,\\ntoTimeString:fn,\\ntoUTCString:fn,\\nvalueOf:fn,\\n'@@toPrimitive':fn,\\n\\n/* Annex B: Additional Properties of the Date.prototype Object*/\\ngetYear:fn,\\nsetYear:fn,\\ntoGMTString:fn},\\n\\n\\n/* Text Processing*/\\n\\nString:{\\n/* Properties of the String Constructor*/\\n'[[Proto]]':'%FunctionPrototype%',\\nfromCharCode:fn,\\nfromCodePoint:fn,\\nprototype:'%StringPrototype%',\\nraw:fn,\\n/* See https://github.com/Moddable-OpenSource/moddable/issues/523*/\\nfromArrayBuffer:false},\\n\\n\\n'%StringPrototype%':{\\n/* Properties of the String Prototype Object*/\\nlength:'number',\\nat:fn,\\ncharAt:fn,\\ncharCodeAt:fn,\\ncodePointAt:fn,\\nconcat:fn,\\nconstructor:'String',\\nendsWith:fn,\\nincludes:fn,\\nindexOf:fn,\\nlastIndexOf:fn,\\nlocaleCompare:fn,\\nmatch:fn,\\nmatchAll:fn,\\nnormalize:fn,\\npadEnd:fn,\\npadStart:fn,\\nrepeat:fn,\\nreplace:fn,\\nreplaceAll:fn,/* ES2021*/\\nsearch:fn,\\nslice:fn,\\nsplit:fn,\\nstartsWith:fn,\\nsubstring:fn,\\ntoLocaleLowerCase:fn,\\ntoLocaleUpperCase:fn,\\ntoLowerCase:fn,\\ntoString:fn,\\ntoUpperCase:fn,\\ntrim:fn,\\ntrimEnd:fn,\\ntrimStart:fn,\\nvalueOf:fn,\\n'@@iterator':fn,\\n\\n/* Annex B: Additional Properties of the String.prototype Object*/\\nsubstr:fn,\\nanchor:fn,\\nbig:fn,\\nblink:fn,\\nbold:fn,\\nfixed:fn,\\nfontcolor:fn,\\nfontsize:fn,\\nitalics:fn,\\nlink:fn,\\nsmall:fn,\\nstrike:fn,\\nsub:fn,\\nsup:fn,\\ntrimLeft:fn,\\ntrimRight:fn,\\n/* See https://github.com/Moddable-OpenSource/moddable/issues/523*/\\ncompare:false,\\n/* https://github.com/tc39/proposal-is-usv-string*/\\nisWellFormed:fn,\\ntoWellFormed:fn,\\nunicodeSets:fn,\\n/* Seen on QuickJS*/\\n__quote:false},\\n\\n\\n'%StringIteratorPrototype%':{\\n'[[Proto]]':'%IteratorPrototype%',\\nnext:fn,\\n'@@toStringTag':'string'},\\n\\n\\n'%InitialRegExp%':{\\n/* Properties of the RegExp Constructor*/\\n'[[Proto]]':'%FunctionPrototype%',\\nprototype:'%RegExpPrototype%',\\n'@@species':getter,\\n\\n/* The https://github.com/tc39/proposal-regexp-legacy-features*/\\n/* are all optional, unsafe, and omitted*/\\ninput:false,\\n$_:false,\\nlastMatch:false,\\n'$&':false,\\nlastParen:false,\\n'$+':false,\\nleftContext:false,\\n'$`':false,\\nrightContext:false,\\n\\\"$'\\\":false,\\n$1:false,\\n$2:false,\\n$3:false,\\n$4:false,\\n$5:false,\\n$6:false,\\n$7:false,\\n$8:false,\\n$9:false},\\n\\n\\n'%SharedRegExp%':{\\n/* Properties of the RegExp Constructor*/\\n'[[Proto]]':'%FunctionPrototype%',\\nprototype:'%RegExpPrototype%',\\n'@@species':getter},\\n\\n\\n'%RegExpPrototype%':{\\n/* Properties of the RegExp Prototype Object*/\\nconstructor:'%SharedRegExp%',\\nexec:fn,\\ndotAll:getter,\\nflags:getter,\\nglobal:getter,\\nhasIndices:getter,\\nignoreCase:getter,\\n'@@match':fn,\\n'@@matchAll':fn,\\nmultiline:getter,\\n'@@replace':fn,\\n'@@search':fn,\\nsource:getter,\\n'@@split':fn,\\nsticky:getter,\\ntest:fn,\\ntoString:fn,\\nunicode:getter,\\nunicodeSets:getter,\\n\\n/* Annex B: Additional Properties of the RegExp.prototype Object*/\\ncompile:false/* UNSAFE and suppressed.*/},\\n\\n\\n'%RegExpStringIteratorPrototype%':{\\n/* The %RegExpStringIteratorPrototype% Object*/\\n'[[Proto]]':'%IteratorPrototype%',\\nnext:fn,\\n'@@toStringTag':'string'},\\n\\n\\n/* Indexed Collections*/\\n\\nArray:{\\n/* Properties of the Array Constructor*/\\n'[[Proto]]':'%FunctionPrototype%',\\nfrom:fn,\\nisArray:fn,\\nof:fn,\\nprototype:'%ArrayPrototype%',\\n'@@species':getter,\\n\\n/* Stage 3:*/\\n/* https://tc39.es/proposal-relative-indexing-method/*/\\nat:fn,\\n/* https://tc39.es/proposal-array-from-async/*/\\nfromAsync:fn},\\n\\n\\n'%ArrayPrototype%':{\\n/* Properties of the Array Prototype Object*/\\nat:fn,\\nlength:'number',\\nconcat:fn,\\nconstructor:'Array',\\ncopyWithin:fn,\\nentries:fn,\\nevery:fn,\\nfill:fn,\\nfilter:fn,\\nfind:fn,\\nfindIndex:fn,\\nflat:fn,\\nflatMap:fn,\\nforEach:fn,\\nincludes:fn,\\nindexOf:fn,\\njoin:fn,\\nkeys:fn,\\nlastIndexOf:fn,\\nmap:fn,\\npop:fn,\\npush:fn,\\nreduce:fn,\\nreduceRight:fn,\\nreverse:fn,\\nshift:fn,\\nslice:fn,\\nsome:fn,\\nsort:fn,\\nsplice:fn,\\ntoLocaleString:fn,\\ntoString:fn,\\nunshift:fn,\\nvalues:fn,\\n'@@iterator':fn,\\n'@@unscopables':{\\n'[[Proto]]':null,\\ncopyWithin:'boolean',\\nentries:'boolean',\\nfill:'boolean',\\nfind:'boolean',\\nfindIndex:'boolean',\\nflat:'boolean',\\nflatMap:'boolean',\\nincludes:'boolean',\\nkeys:'boolean',\\nvalues:'boolean',\\n/* Failed tc39 proposal*/\\n/* Seen on FF Nightly 88.0a1*/\\nat:'boolean',\\n/* See https://github.com/tc39/proposal-array-find-from-last*/\\nfindLast:'boolean',\\nfindLastIndex:'boolean',\\n/* https://github.com/tc39/proposal-change-array-by-copy*/\\ntoReversed:'boolean',\\ntoSorted:'boolean',\\ntoSpliced:'boolean',\\nwith:'boolean',\\n/* https://github.com/tc39/proposal-array-grouping*/\\ngroup:'boolean',\\ngroupToMap:'boolean',\\ngroupBy:'boolean'},\\n\\n/* See https://github.com/tc39/proposal-array-find-from-last*/\\nfindLast:fn,\\nfindLastIndex:fn,\\n/* https://github.com/tc39/proposal-change-array-by-copy*/\\ntoReversed:fn,\\ntoSorted:fn,\\ntoSpliced:fn,\\nwith:fn,\\n/* https://github.com/tc39/proposal-array-grouping*/\\ngroup:fn,/* Not in proposal? Where?*/\\ngroupToMap:fn,/* Not in proposal? Where?*/\\ngroupBy:fn},\\n\\n\\n'%ArrayIteratorPrototype%':{\\n/* The %ArrayIteratorPrototype% Object*/\\n'[[Proto]]':'%IteratorPrototype%',\\nnext:fn,\\n'@@toStringTag':'string'},\\n\\n\\n/* *** TypedArray Objects*/\\n\\n'%TypedArray%':{\\n/* Properties of the %TypedArray% Intrinsic Object*/\\n'[[Proto]]':'%FunctionPrototype%',\\nfrom:fn,\\nof:fn,\\nprototype:'%TypedArrayPrototype%',\\n'@@species':getter},\\n\\n\\n'%TypedArrayPrototype%':{\\nat:fn,\\nbuffer:getter,\\nbyteLength:getter,\\nbyteOffset:getter,\\nconstructor:'%TypedArray%',\\ncopyWithin:fn,\\nentries:fn,\\nevery:fn,\\nfill:fn,\\nfilter:fn,\\nfind:fn,\\nfindIndex:fn,\\nforEach:fn,\\nincludes:fn,\\nindexOf:fn,\\njoin:fn,\\nkeys:fn,\\nlastIndexOf:fn,\\nlength:getter,\\nmap:fn,\\nreduce:fn,\\nreduceRight:fn,\\nreverse:fn,\\nset:fn,\\nslice:fn,\\nsome:fn,\\nsort:fn,\\nsubarray:fn,\\ntoLocaleString:fn,\\ntoString:fn,\\nvalues:fn,\\n'@@iterator':fn,\\n'@@toStringTag':getter,\\n/* See https://github.com/tc39/proposal-array-find-from-last*/\\nfindLast:fn,\\nfindLastIndex:fn,\\n/* https://github.com/tc39/proposal-change-array-by-copy*/\\ntoReversed:fn,\\ntoSorted:fn,\\nwith:fn},\\n\\n\\n/* The TypedArray Constructors*/\\n\\nBigInt64Array:TypedArray('%BigInt64ArrayPrototype%'),\\nBigUint64Array:TypedArray('%BigUint64ArrayPrototype%'),\\n/* https://github.com/tc39/proposal-float16array*/\\nFloat16Array:TypedArray('%Float16ArrayPrototype%'),\\nFloat32Array:TypedArray('%Float32ArrayPrototype%'),\\nFloat64Array:TypedArray('%Float64ArrayPrototype%'),\\nInt16Array:TypedArray('%Int16ArrayPrototype%'),\\nInt32Array:TypedArray('%Int32ArrayPrototype%'),\\nInt8Array:TypedArray('%Int8ArrayPrototype%'),\\nUint16Array:TypedArray('%Uint16ArrayPrototype%'),\\nUint32Array:TypedArray('%Uint32ArrayPrototype%'),\\nUint8ClampedArray:TypedArray('%Uint8ClampedArrayPrototype%'),\\nUint8Array:{\\n...TypedArray('%Uint8ArrayPrototype%'),\\n/* https://github.com/tc39/proposal-arraybuffer-base64*/\\nfromBase64:fn,\\n/* https://github.com/tc39/proposal-arraybuffer-base64*/\\nfromHex:fn},\\n\\n\\n'%BigInt64ArrayPrototype%':TypedArrayPrototype('BigInt64Array'),\\n'%BigUint64ArrayPrototype%':TypedArrayPrototype('BigUint64Array'),\\n/* https://github.com/tc39/proposal-float16array*/\\n'%Float16ArrayPrototype%':TypedArrayPrototype('Float16Array'),\\n'%Float32ArrayPrototype%':TypedArrayPrototype('Float32Array'),\\n'%Float64ArrayPrototype%':TypedArrayPrototype('Float64Array'),\\n'%Int16ArrayPrototype%':TypedArrayPrototype('Int16Array'),\\n'%Int32ArrayPrototype%':TypedArrayPrototype('Int32Array'),\\n'%Int8ArrayPrototype%':TypedArrayPrototype('Int8Array'),\\n'%Uint16ArrayPrototype%':TypedArrayPrototype('Uint16Array'),\\n'%Uint32ArrayPrototype%':TypedArrayPrototype('Uint32Array'),\\n'%Uint8ClampedArrayPrototype%':TypedArrayPrototype('Uint8ClampedArray'),\\n'%Uint8ArrayPrototype%':{\\n...TypedArrayPrototype('Uint8Array'),\\n/* https://github.com/tc39/proposal-arraybuffer-base64*/\\nsetFromBase64:fn,\\n/* https://github.com/tc39/proposal-arraybuffer-base64*/\\nsetFromHex:fn,\\n/* https://github.com/tc39/proposal-arraybuffer-base64*/\\ntoBase64:fn,\\n/* https://github.com/tc39/proposal-arraybuffer-base64*/\\ntoHex:fn},\\n\\n\\n/* *** Keyed Collections*/\\n\\nMap:{\\n/* Properties of the Map Constructor*/\\n'[[Proto]]':'%FunctionPrototype%',\\n'@@species':getter,\\nprototype:'%MapPrototype%',\\n/* https://github.com/tc39/proposal-array-grouping*/\\ngroupBy:fn},\\n\\n\\n'%MapPrototype%':{\\nclear:fn,\\nconstructor:'Map',\\ndelete:fn,\\nentries:fn,\\nforEach:fn,\\nget:fn,\\nhas:fn,\\nkeys:fn,\\nset:fn,\\nsize:getter,\\nvalues:fn,\\n'@@iterator':fn,\\n'@@toStringTag':'string'},\\n\\n\\n'%MapIteratorPrototype%':{\\n/* The %MapIteratorPrototype% Object*/\\n'[[Proto]]':'%IteratorPrototype%',\\nnext:fn,\\n'@@toStringTag':'string'},\\n\\n\\nSet:{\\n/* Properties of the Set Constructor*/\\n'[[Proto]]':'%FunctionPrototype%',\\nprototype:'%SetPrototype%',\\n'@@species':getter,\\n/* Seen on QuickJS*/\\ngroupBy:false},\\n\\n\\n'%SetPrototype%':{\\nadd:fn,\\nclear:fn,\\nconstructor:'Set',\\ndelete:fn,\\nentries:fn,\\nforEach:fn,\\nhas:fn,\\nkeys:fn,\\nsize:getter,\\nvalues:fn,\\n'@@iterator':fn,\\n'@@toStringTag':'string',\\n/* See https://github.com/tc39/proposal-set-methods*/\\nintersection:fn,\\n/* See https://github.com/tc39/proposal-set-methods*/\\nunion:fn,\\n/* See https://github.com/tc39/proposal-set-methods*/\\ndifference:fn,\\n/* See https://github.com/tc39/proposal-set-methods*/\\nsymmetricDifference:fn,\\n/* See https://github.com/tc39/proposal-set-methods*/\\nisSubsetOf:fn,\\n/* See https://github.com/tc39/proposal-set-methods*/\\nisSupersetOf:fn,\\n/* See https://github.com/tc39/proposal-set-methods*/\\nisDisjointFrom:fn},\\n\\n\\n'%SetIteratorPrototype%':{\\n/* The %SetIteratorPrototype% Object*/\\n'[[Proto]]':'%IteratorPrototype%',\\nnext:fn,\\n'@@toStringTag':'string'},\\n\\n\\nWeakMap:{\\n/* Properties of the WeakMap Constructor*/\\n'[[Proto]]':'%FunctionPrototype%',\\nprototype:'%WeakMapPrototype%'},\\n\\n\\n'%WeakMapPrototype%':{\\nconstructor:'WeakMap',\\ndelete:fn,\\nget:fn,\\nhas:fn,\\nset:fn,\\n'@@toStringTag':'string'},\\n\\n\\nWeakSet:{\\n/* Properties of the WeakSet Constructor*/\\n'[[Proto]]':'%FunctionPrototype%',\\nprototype:'%WeakSetPrototype%'},\\n\\n\\n'%WeakSetPrototype%':{\\nadd:fn,\\nconstructor:'WeakSet',\\ndelete:fn,\\nhas:fn,\\n'@@toStringTag':'string'},\\n\\n\\n/* *** Structured Data*/\\n\\nArrayBuffer:{\\n/* Properties of the ArrayBuffer Constructor*/\\n'[[Proto]]':'%FunctionPrototype%',\\nisView:fn,\\nprototype:'%ArrayBufferPrototype%',\\n'@@species':getter,\\n/* See https://github.com/Moddable-OpenSource/moddable/issues/523*/\\nfromString:false,\\n/* See https://github.com/Moddable-OpenSource/moddable/issues/523*/\\nfromBigInt:false},\\n\\n\\n'%ArrayBufferPrototype%':{\\nbyteLength:getter,\\nconstructor:'ArrayBuffer',\\nslice:fn,\\n'@@toStringTag':'string',\\n/* See https://github.com/Moddable-OpenSource/moddable/issues/523*/\\nconcat:false,\\n/* See https://github.com/tc39/proposal-resizablearraybuffer*/\\ntransfer:fn,\\nresize:fn,\\nresizable:getter,\\nmaxByteLength:getter,\\n/* https://github.com/tc39/proposal-arraybuffer-transfer*/\\ntransferToFixedLength:fn,\\ndetached:getter},\\n\\n\\n/* SharedArrayBuffer Objects*/\\nSharedArrayBuffer:false,/* UNSAFE and purposely suppressed.*/\\n'%SharedArrayBufferPrototype%':false,/* UNSAFE and purposely suppressed.*/\\n\\nDataView:{\\n/* Properties of the DataView Constructor*/\\n'[[Proto]]':'%FunctionPrototype%',\\nBYTES_PER_ELEMENT:'number',/* Non std but undeletable on Safari.*/\\nprototype:'%DataViewPrototype%'},\\n\\n\\n'%DataViewPrototype%':{\\nbuffer:getter,\\nbyteLength:getter,\\nbyteOffset:getter,\\nconstructor:'DataView',\\ngetBigInt64:fn,\\ngetBigUint64:fn,\\n/* https://github.com/tc39/proposal-float16array*/\\ngetFloat16:fn,\\ngetFloat32:fn,\\ngetFloat64:fn,\\ngetInt8:fn,\\ngetInt16:fn,\\ngetInt32:fn,\\ngetUint8:fn,\\ngetUint16:fn,\\ngetUint32:fn,\\nsetBigInt64:fn,\\nsetBigUint64:fn,\\n/* https://github.com/tc39/proposal-float16array*/\\nsetFloat16:fn,\\nsetFloat32:fn,\\nsetFloat64:fn,\\nsetInt8:fn,\\nsetInt16:fn,\\nsetInt32:fn,\\nsetUint8:fn,\\nsetUint16:fn,\\nsetUint32:fn,\\n'@@toStringTag':'string'},\\n\\n\\n/* Atomics*/\\nAtomics:false,/* UNSAFE and suppressed.*/\\n\\nJSON:{\\nparse:fn,\\nstringify:fn,\\n'@@toStringTag':'string',\\n/* https://github.com/tc39/proposal-json-parse-with-source/*/\\nrawJSON:fn,\\nisRawJSON:fn},\\n\\n\\n/* *** Control Abstraction Objects*/\\n\\n/* https://github.com/tc39/proposal-iterator-helpers*/\\nIterator:{\\n/* Properties of the Iterator Constructor*/\\n'[[Proto]]':'%FunctionPrototype%',\\nprototype:'%IteratorPrototype%',\\nfrom:fn},\\n\\n\\n'%IteratorPrototype%':{\\n/* The %IteratorPrototype% Object*/\\n'@@iterator':fn,\\n/* https://github.com/tc39/proposal-iterator-helpers*/\\nconstructor:'Iterator',\\nmap:fn,\\nfilter:fn,\\ntake:fn,\\ndrop:fn,\\nflatMap:fn,\\nreduce:fn,\\ntoArray:fn,\\nforEach:fn,\\nsome:fn,\\nevery:fn,\\nfind:fn,\\n'@@toStringTag':'string',\\n/* https://github.com/tc39/proposal-async-iterator-helpers*/\\ntoAsync:fn,\\n/* See https://github.com/Moddable-OpenSource/moddable/issues/523#issuecomment-1942904505*/\\n'@@dispose':false},\\n\\n\\n/* https://github.com/tc39/proposal-iterator-helpers*/\\n'%WrapForValidIteratorPrototype%':{\\n'[[Proto]]':'%IteratorPrototype%',\\nnext:fn,\\nreturn:fn},\\n\\n\\n/* https://github.com/tc39/proposal-iterator-helpers*/\\n'%IteratorHelperPrototype%':{\\n'[[Proto]]':'%IteratorPrototype%',\\nnext:fn,\\nreturn:fn,\\n'@@toStringTag':'string'},\\n\\n\\n/* https://github.com/tc39/proposal-async-iterator-helpers*/\\nAsyncIterator:{\\n/* Properties of the Iterator Constructor*/\\n'[[Proto]]':'%FunctionPrototype%',\\nprototype:'%AsyncIteratorPrototype%',\\nfrom:fn},\\n\\n\\n'%AsyncIteratorPrototype%':{\\n/* The %AsyncIteratorPrototype% Object*/\\n'@@asyncIterator':fn,\\n/* https://github.com/tc39/proposal-async-iterator-helpers*/\\nconstructor:'AsyncIterator',\\nmap:fn,\\nfilter:fn,\\ntake:fn,\\ndrop:fn,\\nflatMap:fn,\\nreduce:fn,\\ntoArray:fn,\\nforEach:fn,\\nsome:fn,\\nevery:fn,\\nfind:fn,\\n'@@toStringTag':'string',\\n/* See https://github.com/Moddable-OpenSource/moddable/issues/523#issuecomment-1942904505*/\\n'@@asyncDispose':false},\\n\\n\\n/* https://github.com/tc39/proposal-async-iterator-helpers*/\\n'%WrapForValidAsyncIteratorPrototype%':{\\n'[[Proto]]':'%AsyncIteratorPrototype%',\\nnext:fn,\\nreturn:fn},\\n\\n\\n/* https://github.com/tc39/proposal-async-iterator-helpers*/\\n'%AsyncIteratorHelperPrototype%':{\\n'[[Proto]]':'%AsyncIteratorPrototype%',\\nnext:fn,\\nreturn:fn,\\n'@@toStringTag':'string'},\\n\\n\\n'%InertGeneratorFunction%':{\\n/* Properties of the GeneratorFunction Constructor*/\\n'[[Proto]]':'%InertFunction%',\\nprototype:'%Generator%'},\\n\\n\\n'%Generator%':{\\n/* Properties of the GeneratorFunction Prototype Object*/\\n'[[Proto]]':'%FunctionPrototype%',\\nconstructor:'%InertGeneratorFunction%',\\nprototype:'%GeneratorPrototype%',\\n'@@toStringTag':'string'},\\n\\n\\n'%InertAsyncGeneratorFunction%':{\\n/* Properties of the AsyncGeneratorFunction Constructor*/\\n'[[Proto]]':'%InertFunction%',\\nprototype:'%AsyncGenerator%'},\\n\\n\\n'%AsyncGenerator%':{\\n/* Properties of the AsyncGeneratorFunction Prototype Object*/\\n'[[Proto]]':'%FunctionPrototype%',\\nconstructor:'%InertAsyncGeneratorFunction%',\\nprototype:'%AsyncGeneratorPrototype%',\\n/* length prop added here for React Native jsc-android*/\\n/* https://github.com/endojs/endo/issues/660*/\\n/* https://github.com/react-native-community/jsc-android-buildscripts/issues/181*/\\nlength:'number',\\n'@@toStringTag':'string'},\\n\\n\\n'%GeneratorPrototype%':{\\n/* Properties of the Generator Prototype Object*/\\n'[[Proto]]':'%IteratorPrototype%',\\nconstructor:'%Generator%',\\nnext:fn,\\nreturn:fn,\\nthrow:fn,\\n'@@toStringTag':'string'},\\n\\n\\n'%AsyncGeneratorPrototype%':{\\n/* Properties of the AsyncGenerator Prototype Object*/\\n'[[Proto]]':'%AsyncIteratorPrototype%',\\nconstructor:'%AsyncGenerator%',\\nnext:fn,\\nreturn:fn,\\nthrow:fn,\\n'@@toStringTag':'string'},\\n\\n\\n/* TODO: To be replaced with Promise.delegate*/\\n/**/\\n/* The HandledPromise global variable shimmed by `@agoric/eventual-send/shim`*/\\n/* implements an initial version of the eventual send specification at:*/\\n/* https://github.com/tc39/proposal-eventual-send*/\\n/**/\\n/* We will likely change this to add a property to Promise called*/\\n/* Promise.delegate and put static methods on it, which will necessitate*/\\n/* another whitelist change to update to the current proposed standard.*/\\nHandledPromise:{\\n'[[Proto]]':'Promise',\\napplyFunction:fn,\\napplyFunctionSendOnly:fn,\\napplyMethod:fn,\\napplyMethodSendOnly:fn,\\nget:fn,\\ngetSendOnly:fn,\\nprototype:'%PromisePrototype%',\\nresolve:fn},\\n\\n\\nPromise:{\\n/* Properties of the Promise Constructor*/\\n'[[Proto]]':'%FunctionPrototype%',\\nall:fn,\\nallSettled:fn,\\n/* https://github.com/Agoric/SES-shim/issues/550*/\\nany:fn,\\nprototype:'%PromisePrototype%',\\nrace:fn,\\nreject:fn,\\nresolve:fn,\\n/* https://github.com/tc39/proposal-promise-with-resolvers*/\\nwithResolvers:fn,\\n'@@species':getter},\\n\\n\\n'%PromisePrototype%':{\\n/* Properties of the Promise Prototype Object*/\\ncatch:fn,\\nconstructor:'Promise',\\nfinally:fn,\\nthen:fn,\\n'@@toStringTag':'string',\\n/* Non-standard, used in node to prevent async_hooks from breaking*/\\n'UniqueSymbol(async_id_symbol)':accessor,\\n'UniqueSymbol(trigger_async_id_symbol)':accessor,\\n'UniqueSymbol(destroyed)':accessor},\\n\\n\\n'%InertAsyncFunction%':{\\n/* Properties of the AsyncFunction Constructor*/\\n'[[Proto]]':'%InertFunction%',\\nprototype:'%AsyncFunctionPrototype%'},\\n\\n\\n'%AsyncFunctionPrototype%':{\\n/* Properties of the AsyncFunction Prototype Object*/\\n'[[Proto]]':'%FunctionPrototype%',\\nconstructor:'%InertAsyncFunction%',\\n/* length prop added here for React Native jsc-android*/\\n/* https://github.com/endojs/endo/issues/660*/\\n/* https://github.com/react-native-community/jsc-android-buildscripts/issues/181*/\\nlength:'number',\\n'@@toStringTag':'string'},\\n\\n\\n/* Reflection*/\\n\\nReflect:{\\n/* The Reflect Object*/\\n/* Not a function object.*/\\napply:fn,\\nconstruct:fn,\\ndefineProperty:fn,\\ndeleteProperty:fn,\\nget:fn,\\ngetOwnPropertyDescriptor:fn,\\ngetPrototypeOf:fn,\\nhas:fn,\\nisExtensible:fn,\\nownKeys:fn,\\npreventExtensions:fn,\\nset:fn,\\nsetPrototypeOf:fn,\\n'@@toStringTag':'string'},\\n\\n\\nProxy:{\\n/* Properties of the Proxy Constructor*/\\n'[[Proto]]':'%FunctionPrototype%',\\nrevocable:fn},\\n\\n\\n/* Appendix B*/\\n\\n/* Annex B: Additional Properties of the Global Object*/\\n\\nescape:fn,\\nunescape:fn,\\n\\n/* Proposed*/\\n\\n'%UniqueCompartment%':{\\n'[[Proto]]':'%FunctionPrototype%',\\nprototype:'%CompartmentPrototype%',\\ntoString:fn},\\n\\n\\n'%InertCompartment%':{\\n'[[Proto]]':'%FunctionPrototype%',\\nprototype:'%CompartmentPrototype%',\\ntoString:fn},\\n\\n\\n'%CompartmentPrototype%':{\\nconstructor:'%InertCompartment%',\\nevaluate:fn,\\nglobalThis:getter,\\nname:getter,\\nimport:asyncFn,\\nload:asyncFn,\\nimportNow:fn,\\nmodule:fn,\\n'@@toStringTag':'string'},\\n\\n\\nlockdown:fn,\\nharden:{...fn,isFake:'boolean'},\\n\\n'%InitialGetStackString%':fn};exports.AsyncFunctionInstance=AsyncFunctionInstance;exports.FunctionInstance=FunctionInstance;exports.NativeErrors=NativeErrors;exports.constantProperties=constantProperties;exports.initialGlobalPropertyNames=initialGlobalPropertyNames;exports.isAccessorPermit=isAccessorPermit;exports.permitted=permitted;exports.sharedGlobalPropertyNames=sharedGlobalPropertyNames;exports.uniqueGlobalPropertyNames=uniqueGlobalPropertyNames;exports.universalPropertyNames=universalPropertyNames;\",\n \"node_modules/ses/src/scope-constants.js\": \"'use strict';Object.defineProperty(exports,'__esModule',{value:true});var\\n\\n\\n\\n\\n\\n\\n\\n\\ncommons=require('./commons.js');/**\\n * keywords\\n * In JavaScript you cannot use these reserved words as variables.\\n * See 11.6.1 Identifier Names\\n */\\nconst keywords=[\\n/* 11.6.2.1 Keywords*/\\n'await',\\n'break',\\n'case',\\n'catch',\\n'class',\\n'const',\\n'continue',\\n'debugger',\\n'default',\\n'delete',\\n'do',\\n'else',\\n'export',\\n'extends',\\n'finally',\\n'for',\\n'function',\\n'if',\\n'import',\\n'in',\\n'instanceof',\\n'new',\\n'return',\\n'super',\\n'switch',\\n'this',\\n'throw',\\n'try',\\n'typeof',\\n'var',\\n'void',\\n'while',\\n'with',\\n'yield',\\n\\n/* Also reserved when parsing strict mode code*/\\n'let',\\n'static',\\n\\n/* 11.6.2.2 Future Reserved Words*/\\n'enum',\\n\\n/* Also reserved when parsing strict mode code*/\\n'implements',\\n'package',\\n'protected',\\n'interface',\\n'private',\\n'public',\\n\\n/* Reserved but not mentioned in specs*/\\n'await',\\n\\n'null',\\n'true',\\n'false',\\n\\n'this',\\n'arguments'];\\n\\n\\n/**\\n * identifierPattern\\n * Simplified validation of identifier names: may only contain alphanumeric\\n * characters (or \\\"$\\\" or \\\"_\\\"), and may not start with a digit. This is safe\\n * and does not reduces the compatibility of the shim. The motivation for\\n * this limitation was to decrease the complexity of the implementation,\\n * and to maintain a resonable level of performance.\\n * Note: \\\\w is equivalent [a-zA-Z_0-9]\\n * See 11.6.1 Identifier Names\\n */\\nconst identifierPattern=/^[a-zA-Z_$][\\\\w$]*$/;\\n\\n/**\\n * isValidIdentifierName()\\n * What variable names might it bring into scope? These include all\\n * property names which can be variable names, including the names\\n * of inherited properties. It excludes symbols and names which are\\n * keywords. We drop symbols safely. Currently, this shim refuses\\n * service if any of the names are keywords or keyword-like. This is\\n * safe and only prevent performance optimization.\\n *\\n * @param {string} name\\n */\\nconst isValidIdentifierName=(name)=>{\\n/* Ensure we have a valid identifier. We use regexpTest rather than*/\\n/* /../.test() to guard against the case where RegExp has been poisoned.*/\\nreturn(\\nname!=='eval'&&\\n!commons.arrayIncludes(keywords,name)&&\\ncommons.regexpTest(identifierPattern,name));};\\n\\n\\n\\n/* * isImmutableDataProperty\\n */\\n\\n\\nfunction isImmutableDataProperty(obj,name){\\nconst desc=commons.getOwnPropertyDescriptor(obj,name);\\nreturn(\\ndesc&&\\n/**/\\n/* The getters will not have .writable, don't let the falsyness of*/\\n/* 'undefined' trick us: test with === false, not ! . However descriptors*/\\n/* inherit from the (potentially poisoned) global object, so we might see*/\\n/* extra properties which weren't really there. Accessor properties have*/\\n/* 'get/set/enumerable/configurable', while data properties have*/\\n/* 'value/writable/enumerable/configurable'.*/\\ndesc.configurable===false&&\\ndesc.writable===false&&\\n/**/\\n/* Checks for data properties because they're the only ones we can*/\\n/* optimize (accessors are most likely non-constant). Descriptors can't*/\\n/* can't have accessors and value properties at the same time, therefore*/\\n/* this check is sufficient. Using explicit own property deal with the*/\\n/* case where Object.prototype has been poisoned.*/\\ncommons.objectHasOwnProperty(desc,'value'));}\\n\\n\\n\\n/**\\n * getScopeConstants()\\n * What variable names might it bring into scope? These include all\\n * property names which can be variable names, including the names\\n * of inherited properties. It excludes symbols and names which are\\n * keywords. We drop symbols safely. Currently, this shim refuses\\n * service if any of the names are keywords or keyword-like. This is\\n * safe and only prevent performance optimization.\\n *\\n * @param {object} globalObject\\n * @param {object} moduleLexicals\\n */\\nconst getScopeConstants=(globalObject,moduleLexicals={})=>{\\n/* getOwnPropertyNames() does ignore Symbols so we don't need to*/\\n/* filter them out.*/\\nconst globalObjectNames=commons.getOwnPropertyNames(globalObject);\\nconst moduleLexicalNames=commons.getOwnPropertyNames(moduleLexicals);\\n\\n/* Collect all valid & immutable identifiers from the endowments.*/\\nconst moduleLexicalConstants=commons.arrayFilter(\\nmoduleLexicalNames,\\n(name)=>\\nisValidIdentifierName(name)&&\\nisImmutableDataProperty(moduleLexicals,name));\\n\\n\\n/* Collect all valid & immutable identifiers from the global that*/\\n/* are also not present in the endowments (immutable or not).*/\\nconst globalObjectConstants=commons.arrayFilter(\\nglobalObjectNames,\\n(name)=>\\n/* Can't define a constant: it would prevent a*/\\n/* lookup on the endowments.*/\\n!commons.arrayIncludes(moduleLexicalNames,name)&&\\nisValidIdentifierName(name)&&\\nisImmutableDataProperty(globalObject,name));\\n\\n\\nreturn{\\nglobalObjectConstants,\\nmoduleLexicalConstants};};exports.getScopeConstants=getScopeConstants;exports.isValidIdentifierName=isValidIdentifierName;\",\n \"node_modules/ses/src/sloppy-globals-scope-terminator.js\": \"'use strict';Object.defineProperty(exports,'__esModule',{value:true});var commons=require('./commons.js');var\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\nstrictScopeTerminator=require('./strict-scope-terminator.js');/* * createSloppyGlobalsScopeTerminator()\\n * strictScopeTerminatorHandler manages a scopeTerminator Proxy which serves as\\n * the final scope boundary that will always return \\\"undefined\\\" in order\\n * to prevent access to \\\"start compartment globals\\\". When \\\"sloppyGlobalsMode\\\"\\n * is true, the Proxy will perform sets on the \\\"globalObject\\\".\\n */\\n\\nconst createSloppyGlobalsScopeTerminator=(globalObject)=>{\\nconst scopeProxyHandlerProperties={\\n/* inherit scopeTerminator behavior*/\\n...strictScopeTerminator.strictScopeTerminatorHandler,\\n\\n/* Redirect set properties to the globalObject.*/\\nset(_shadow,prop,value){\\nreturn commons.reflectSet(globalObject,prop,value);},\\n\\n\\n/* Always claim to have a potential property in order to be the recipient of a set*/\\nhas(_shadow,_prop){\\nreturn true;}};\\n\\n\\n\\n/* The scope handler's prototype is a proxy that throws if any trap other*/\\n/* than get/set/has are run (like getOwnPropertyDescriptors, apply,*/\\n/* getPrototypeOf).*/\\nconst sloppyGlobalsScopeTerminatorHandler=commons.freeze(\\ncommons.create(\\nstrictScopeTerminator.alwaysThrowHandler,\\ncommons.getOwnPropertyDescriptors(scopeProxyHandlerProperties)));\\n\\n\\n\\nconst sloppyGlobalsScopeTerminator=new commons.Proxy(\\ncommons.immutableObject,\\nsloppyGlobalsScopeTerminatorHandler);\\n\\n\\nreturn sloppyGlobalsScopeTerminator;};\\n\\ncommons.freeze(createSloppyGlobalsScopeTerminator);exports.createSloppyGlobalsScopeTerminator=createSloppyGlobalsScopeTerminator;\",\n \"node_modules/ses/src/strict-scope-terminator.js\": \"'use strict';Object.defineProperty(exports,'__esModule',{value:true});var commons=require('./commons.js');var assert=require('./error/assert.js');\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\nconst{Fail,quote:q}=assert.assert;\\n\\n/**\\n * alwaysThrowHandler\\n * This is an object that throws if any property is called. It's used as\\n * a proxy handler which throws on any trap called.\\n * It's made from a proxy with a get trap that throws. It's safe to\\n * create one and share it between all Proxy handlers.\\n */\\nconst alwaysThrowHandler=new commons.Proxy(\\ncommons.immutableObject,\\ncommons.freeze({\\nget(_shadow,prop){\\nFail`Please report unexpected scope handler trap: ${q(commons.String(prop))}`;}}));\\n\\n\\n\\n\\n/* * scopeProxyHandlerProperties\\n * scopeTerminatorHandler manages a strictScopeTerminator Proxy which serves as\\n * the final scope boundary that will always return \\\"undefined\\\" in order\\n * to prevent access to \\\"start compartment globals\\\".\\n */\\n\\nconst scopeProxyHandlerProperties={\\nget(_shadow,_prop){\\nreturn undefined;},\\n\\n\\nset(_shadow,prop,_value){\\n/* We should only hit this if the has() hook returned true matches the v8*/\\n/* ReferenceError message \\\"Uncaught ReferenceError: xyz is not defined\\\"*/\\nthrow commons.ReferenceError(`${commons.String(prop)} is not defined`);},\\n\\n\\nhas(_shadow,prop){\\n/* we must at least return true for all properties on the realm globalThis*/\\nreturn prop in commons.globalThis;},\\n\\n\\n/* note: this is likely a bug of safari*/\\n/* https://bugs.webkit.org/show_bug.cgi?id=195534*/\\ngetPrototypeOf(_shadow){\\nreturn null;},\\n\\n\\n/* See https://github.com/endojs/endo/issues/1510*/\\n/* TODO: report as bug to v8 or Chrome, and record issue link here.*/\\ngetOwnPropertyDescriptor(_shadow,prop){\\n/* Coerce with `String` in case prop is a symbol.*/\\nconst quotedProp=q(commons.String(prop));\\n/* eslint-disable-next-line @endo/no-polymorphic-call*/\\nconsole.warn(\\n`getOwnPropertyDescriptor trap on scopeTerminatorHandler for ${quotedProp}`,\\ncommons.TypeError().stack);\\n\\nreturn undefined;},\\n\\n\\n/* See https://github.com/endojs/endo/issues/1490*/\\n/* TODO Report bug to JSC or Safari*/\\nownKeys(_shadow){\\nreturn[];}};\\n\\n\\n\\n/* The scope handler's prototype is a proxy that throws if any trap other*/\\n/* than get/set/has are run (like getOwnPropertyDescriptors, apply,*/\\n/* getPrototypeOf).*/\\nconst strictScopeTerminatorHandler=commons.freeze(\\ncommons.create(\\nalwaysThrowHandler,\\ncommons.getOwnPropertyDescriptors(scopeProxyHandlerProperties)));\\n\\n\\n\\nconst strictScopeTerminator=new commons.Proxy(\\ncommons.immutableObject,\\nstrictScopeTerminatorHandler);exports.alwaysThrowHandler=alwaysThrowHandler;exports.strictScopeTerminator=strictScopeTerminator;exports.strictScopeTerminatorHandler=strictScopeTerminatorHandler;\",\n \"node_modules/ses/src/tame-date-constructor.js\": \"'use strict';Object.defineProperty(exports,'__esModule',{value:true});var commons=require('./commons.js');/* @ts-check*/\\n\\n\\n\\n\\n\\n\\n\\n\\n\\nfunction tameDateConstructor(dateTaming='safe'){\\nif(dateTaming!=='safe'&&dateTaming!=='unsafe'){\\nthrow commons.TypeError(`unrecognized dateTaming ${dateTaming}`);}\\n\\nconst OriginalDate=commons.Date;\\nconst DatePrototype=OriginalDate.prototype;\\n\\n/* Use concise methods to obtain named functions without constructors.*/\\nconst tamedMethods={\\n/**\\n * `%SharedDate%.now()` throw a `TypeError` starting with \\\"secure mode\\\".\\n * See https://github.com/endojs/endo/issues/910#issuecomment-1581855420\\n */\\nnow(){\\nthrow commons.TypeError('secure mode Calling %SharedDate%.now() throws');}};\\n\\n\\n\\n/**\\n * Tame the Date constructor.\\n * See https://github.com/endojs/endo/issues/910#issuecomment-1581855420\\n *\\n * Common behavior\\n * * `new Date(x)` coerces x into a number and then returns a Date\\n * for that number of millis since the epoch\\n * * `new Date(NaN)` returns a Date object which stringifies to\\n * 'Invalid Date'\\n * * `new Date(undefined)` returns a Date object which stringifies to\\n * 'Invalid Date'\\n *\\n * OriginalDate (normal standard) behavior preserved by\\n * `%InitialDate%`.\\n * * `Date(anything)` gives a string with the current time\\n * * `new Date()` returns the current time, as a Date object\\n *\\n * `%SharedDate%` behavior\\n * * `Date(anything)` throws a TypeError starting with \\\"secure mode\\\"\\n * * `new Date()` throws a TypeError starting with \\\"secure mode\\\"\\n *\\n * @param {{powers?: string}} [opts]\\n */\\nconst makeDateConstructor=({powers='none'}={})=>{\\nlet ResultDate;\\nif(powers==='original'){\\n/* eslint-disable-next-line no-shadow*/\\nResultDate=function Date(...rest){\\nif(new.target===undefined){\\nreturn commons.apply(OriginalDate,undefined,rest);}\\n\\nreturn commons.construct(OriginalDate,rest,new.target);};}else\\n\\n{\\n/* eslint-disable-next-line no-shadow*/\\nResultDate=function Date(...rest){\\nif(new.target===undefined){\\nthrow commons.TypeError(\\n'secure mode Calling %SharedDate% constructor as a function throws');}\\n\\n\\nif(rest.length===0){\\nthrow commons.TypeError(\\n'secure mode Calling new %SharedDate%() with no arguments throws');}\\n\\n\\nreturn commons.construct(OriginalDate,rest,new.target);};}\\n\\n\\n\\ncommons.defineProperties(ResultDate,{\\nlength:{value:7},\\nprototype:{\\nvalue:DatePrototype,\\nwritable:false,\\nenumerable:false,\\nconfigurable:false},\\n\\nparse:{\\nvalue:OriginalDate.parse,\\nwritable:true,\\nenumerable:false,\\nconfigurable:true},\\n\\nUTC:{\\nvalue:OriginalDate.UTC,\\nwritable:true,\\nenumerable:false,\\nconfigurable:true}});\\n\\n\\nreturn ResultDate;};\\n\\nconst InitialDate=makeDateConstructor({powers:'original'});\\nconst SharedDate=makeDateConstructor({powers:'none'});\\n\\ncommons.defineProperties(InitialDate,{\\nnow:{\\nvalue:OriginalDate.now,\\nwritable:true,\\nenumerable:false,\\nconfigurable:true}});\\n\\n\\ncommons.defineProperties(SharedDate,{\\nnow:{\\nvalue:tamedMethods.now,\\nwritable:true,\\nenumerable:false,\\nconfigurable:true}});\\n\\n\\n\\ncommons.defineProperties(DatePrototype,{\\nconstructor:{value:SharedDate}});\\n\\n\\nreturn{\\n'%InitialDate%':InitialDate,\\n'%SharedDate%':SharedDate};}exports[\\\"default\\\"]=tameDateConstructor;\",\n \"node_modules/ses/src/tame-domains.js\": \"'use strict';Object.defineProperty(exports,'__esModule',{value:true});var commons=require('./commons.js');/* @ts-check*/\\n\\n\\n\\n\\n\\n\\n\\n\\nfunction tameDomains(domainTaming='safe'){\\nif(domainTaming!=='safe'&&domainTaming!=='unsafe'){\\nthrow commons.TypeError(`unrecognized domainTaming ${domainTaming}`);}\\n\\n\\nif(domainTaming==='unsafe'){\\nreturn;}\\n\\n\\n/* Protect against the hazard presented by Node.js domains.*/\\nconst globalProcess=commons.globalThis.process||undefined;\\nif(typeof globalProcess==='object'){\\n/* Check whether domains were initialized.*/\\nconst domainDescriptor=commons.getOwnPropertyDescriptor(globalProcess,'domain');\\nif(domainDescriptor!==undefined&&domainDescriptor.get!==undefined){\\n/* The domain descriptor on Node.js initially has value: null, which*/\\n/* becomes a get, set pair after domains initialize.*/\\n/* See https://github.com/endojs/endo/blob/master/packages/ses/error-codes/SES_NO_DOMAINS.md*/\\nthrow commons.TypeError(\\n`SES failed to lockdown, Node.js domains have been initialized (SES_NO_DOMAINS)`);}\\n\\n\\n/* Prevent domains from initializing.*/\\n/* This is clunky because the exception thrown from the domains package does*/\\n/* not direct the user's gaze toward a knowledge base about the problem.*/\\n/* The domain module merely throws an exception when it attempts to define*/\\n/* the domain property of the process global during its initialization.*/\\n/* We have no better recourse because Node.js uses defineProperty too.*/\\ncommons.defineProperty(globalProcess,'domain',{\\nvalue:null,\\nconfigurable:false,\\nwritable:false,\\nenumerable:false});}}exports.tameDomains=tameDomains;\",\n \"node_modules/ses/src/tame-faux-data-properties.js\": \"'use strict';Object.defineProperty(exports,'__esModule',{value:true});var commons=require('./commons.js');\\n\\n\\n\\n\\n\\n\\nconst throws=(thunk)=>{\\ntry{\\nthunk();\\nreturn false;}\\ncatch(er){\\nreturn true;}};\\n\\n\\n\\n/**\\n * Exported for convenience of unit testing. Harmless, but not expected\\n * to be useful by itself.\\n *\\n * @param {any} obj\\n * @param {string|symbol} prop\\n * @param {any} expectedValue\\n * @returns {boolean}\\n * Returns whether `tameFauxDataProperty` turned the property in question\\n * from an apparent faux data property into the actual data property it\\n * seemed to emulate.\\n * If this function returns `false`, then we hope no effects happened.\\n * However, sniffing out if an accessor property seems to be a faux data\\n * property requires invoking the getter and setter functions that might\\n * possibly have side effects.\\n * `tameFauxDataProperty` is not in a position to tell.\\n */\\nconst tameFauxDataProperty=(obj,prop,expectedValue)=>{\\nif(obj===undefined){\\n/* The object does not exist in this version of the platform*/\\nreturn false;}\\n\\nconst desc=commons.getOwnPropertyDescriptor(obj,prop);\\nif(!desc||'value'in desc){\\n/* The property either doesn't exist, or is already an actual data property.*/\\nreturn false;}\\n\\nconst{get,set}=desc;\\nif(typeof get!=='function'||typeof set!=='function'){\\n/* A faux data property has both a getter and a setter*/\\nreturn false;}\\n\\nif(get()!==expectedValue){\\n/* The getter called by itself should produce the expectedValue*/\\nreturn false;}\\n\\nif(commons.apply(get,obj,[])!==expectedValue){\\n/* The getter called with `this === obj` should also return the*/\\n/* expectedValue.*/\\nreturn false;}\\n\\nconst testValue='Seems to be a setter';\\nconst subject1={__proto__:null};\\ncommons.apply(set,subject1,[testValue]);\\nif(subject1[prop]!==testValue){\\n/* The setter called with an unrelated object as `this` should*/\\n/* set the property on the object.*/\\nreturn false;}\\n\\nconst subject2={__proto__:obj};\\ncommons.apply(set,subject2,[testValue]);\\nif(subject2[prop]!==testValue){\\n/* The setter called on an object that inherits from `obj` should*/\\n/* override the property from `obj` as if by assignment.*/\\nreturn false;}\\n\\nif(!throws(()=>commons.apply(set,obj,[expectedValue]))){\\n/* The setter called with `this === obj` should throw without having*/\\n/* caused any effect.*/\\n/* This is the test that has the greatest danger of leaving behind some*/\\n/* persistent side effect. The most obvious one is to emulate a*/\\n/* successful assignment to the property. That's why this test*/\\n/* uses `expectedValue`, so that case is likely not to actually*/\\n/* change anything.*/\\nreturn false;}\\n\\nif('originalValue'in get){\\n/* The ses-shim uniquely, as far as we know, puts an `originalValue`*/\\n/* property on the getter, so that reflect property tranversal algorithms,*/\\n/* like `harden`, will traverse into the enulated value without*/\\n/* calling the getter. That does not happen until `permits-intrinsics.js`*/\\n/* which is much later. So if we see one this early, we should*/\\n/* not assume we understand what's going on.*/\\nreturn false;}\\n\\n\\n/* We assume that this code runs before any untrusted code runs, so*/\\n/* we do not need to worry about the above conditions passing because of*/\\n/* malicious intent. In fact, it runs even before vetted shims are supposed*/\\n/* to run, between repair and hardening. Given that, after all these tests*/\\n/* pass, we have adequately validated that the property in question is*/\\n/* an accessor function whose purpose is suppressing the override mistake,*/\\n/* i.e., enabling a non-writable property to be overridden by assignment.*/\\n/* In that case, here we *temporarily* turn it into the data property*/\\n/* it seems to emulate, but writable so that it does not trigger the*/\\n/* override mistake while in this temporary state.*/\\n\\n/* For those properties that are also listed in `enablements.js`,*/\\n/* that phase will re-enable override for these properties, but*/\\n/* via accessor functions that SES controls, so we know what they are*/\\n/* doing. In addition, the getter functions installed by*/\\n/* `enable-property-overrides.js` have an `originalValue` field*/\\n/* enabling meta-traversal code like harden to visit the original value*/\\n/* without calling the getter.*/\\n\\nif(desc.configurable===false){\\n/* Even though it seems to be a faux data property, we're unable to fix it.*/\\nreturn false;}\\n\\n\\n/* Many of the `return false;` cases above plausibly should be turned into*/\\n/* errors, or an least generate warnings. However, for those, the checks*/\\n/* following this phase are likely to signal an error anyway.*/\\n\\n/* At this point, we have passed all our sniff checks for validating that*/\\n/* it seems to be a faux data property with the expected value. Turn*/\\n/* it into the actual data property it emulates, but writable so there is*/\\n/* not yet an override mistake problem.*/\\n\\ncommons.defineProperty(obj,prop,{\\nvalue:expectedValue,\\nwritable:true,\\nenumerable:desc.enumerable,\\nconfigurable:true});\\n\\n\\nreturn true;};\\n\\n\\n/**\\n * In JavaScript, the so-called \\\"override mistake\\\" is the inability to\\n * override an inherited non-writable data property by assignment. A common\\n * workaround is to instead define an accessor property that acts like\\n * a non-writable data property, except that it allows an object that\\n * inherits this property to override it by assignment. Let's call\\n * an access property that acts this way a \\\"faux data property\\\". In this\\n * ses-shim, `enable-property-overrides.js` makes the properties listed in\\n * `enablements.js` into faux data properties.\\n *\\n * But the ses-shim is not alone in use of this trick. Starting with the\\n * [Iterator Helpers proposal](https://github.com/tc39/proposal-iterator-helpers),\\n * some properties are defined as (what we call) faux data properties.\\n * Some of these are new properties (`Interator.prototype.constructor`) and\\n * some are old data properties converted to accessor properties\\n * (`Iterator.prototype[String.toStringTag]`). So the ses-shim needs to be\\n * prepared for some enumerated set of properties to already be faux data\\n * properties in the platform prior to our initialization.\\n *\\n * For these possible faux data properties, it is important that\\n * `permits.js` describe each as a data property, so that it can further\\n * constrain the apparent value (that allegedly would be returned by the\\n * getter) according to its own permits.\\n *\\n * However, at the time of this writing, the precise behavior specified\\n * by the iterator-helpers proposal for these faux data properties is\\n * novel. We should not be too confident that all further such platform\\n * additions do what we would now expect. So, for each of these possible\\n * faux data properties, we do some sniffing to see if it behaves as we\\n * currently expect a faux data property to act. If not, then\\n * `tameFauxDataProperties` tries not to modify it, leaving it to later\\n * checks, especially `permits-intrinsics.js`, to error when it sees an\\n * unexpected accessor.\\n *\\n * If one of these enumerated accessor properties does seem to be\\n * a faithful faux data property, then `tameFauxDataProperties` itself\\n * *tempoarily* turns it into the actual data property that it seems to emulate.\\n * This data property starts as writable, so that in this state it will\\n * not trigger the override mistake, i.e., assignment to an object inheriting\\n * this property is allowed to succeed at overriding this property.\\n *\\n * For those properties that should be a faux data property rather than an\\n * actual one, such as those from the iterator-helpers proposal,\\n * they should be listed as such in `enablements.js`, so\\n * `enable-property-overrides.js` will turn it back into a faux data property.\\n * But one controlled by the ses-shim, whose behavior we understand.\\n *\\n * `tameFauxDataProperties`, which turns these into actual data properties,\\n * happens during the `repairIntrinsics` phase\\n * of `lockdown`, before even vetted shim are supposed to run.\\n * `enable-property-overrides.js` runs after vetted shims, turning the\\n * appropriate ones back into faux data properties. Thus vetted shims\\n * can observe the possibly non-conforming state where these are temporarily\\n * actual data properties, rather than faux data properties.\\n *\\n * Coordinate the property enumeration here\\n * with `enablements.js`, so the appropriate properties are\\n * turned back to faux data properties.\\n *\\n * @param {Record<any,any>} intrinsics\\n */\\nconst tameFauxDataProperties=(intrinsics)=>{\\n/* https://github.com/tc39/proposal-iterator-helpers*/\\ntameFauxDataProperty(\\nintrinsics['%IteratorPrototype%'],\\n'constructor',\\nintrinsics.Iterator);\\n\\n/* https://github.com/tc39/proposal-iterator-helpers*/\\ntameFauxDataProperty(\\nintrinsics['%IteratorPrototype%'],\\ncommons.toStringTagSymbol,\\n'Iterator');};exports.tameFauxDataProperties=tameFauxDataProperties;exports.tameFauxDataProperty=tameFauxDataProperty;\",\n \"node_modules/ses/src/tame-function-constructors.js\": \"'use strict';Object.defineProperty(exports,'__esModule',{value:true});var\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\ncommons=require('./commons.js');/* This module replaces the original `Function` constructor, and the original*/ /* `%GeneratorFunction%`, `%AsyncFunction%` and `%AsyncGeneratorFunction%`,*/ /* with safe replacements that throw if invoked.*/ /**/ /* These are all reachable via syntax, so it isn't sufficient to just*/ /* replace global properties with safe versions. Our main goal is to prevent*/ /* access to the `Function` constructor through these starting points.*/ /**/ /* After modules block is done, the originals must no longer be reachable,*/ /* unless a copy has been made, and functions can only be created by syntax*/ /* (using eval) or by invoking a previously saved reference to the originals.*/ /**/ /* Typically, this module will not be used directly, but via the*/ /* [lockdown - shim] which handles all necessary repairs and taming in SES.*/ /**/ /* Relation to ECMA specifications*/ /**/ /* The taming of constructors really wants to be part of the standard, because*/ /* new constructors may be added in the future, reachable from syntax, and this*/ /* list must be updated to match.*/ /**/ /* In addition, the standard needs to define four new intrinsics for the safe*/ /* replacement functions. See [./permits-intrinsics.js].*/ /**/ /* Adapted from SES/Caja*/ /* Copyright (C) 2011 Google Inc.*/ /* https://github.com/google/caja/blob/master/src/com/google/caja/ses/startSES.js*/ /* https://github.com/google/caja/blob/master/src/com/google/caja/ses/repairES5.js*/ /**\\n * tameFunctionConstructors()\\n * This block replaces the original Function constructor, and the original\\n * %GeneratorFunction% %AsyncFunction% and %AsyncGeneratorFunction%, with\\n * safe replacements that throw if invoked.\\n */\\nfunction tameFunctionConstructors(){\\ntry{\\n/* Verify that the method is not callable.*/\\n/* eslint-disable-next-line @endo/no-polymorphic-call*/\\ncommons.FERAL_FUNCTION.prototype.constructor('return 1');}\\ncatch(ignore){\\n/* Throws, no need to patch.*/\\nreturn commons.freeze({});}\\n\\n\\nconst newIntrinsics={};\\n\\n/* * The process to repair constructors:\\n * 1. Create an instance of the function by evaluating syntax\\n * 2. Obtain the prototype from the instance\\n * 3. Create a substitute tamed constructor\\n * 4. Replace the original constructor with the tamed constructor\\n * 5. Replace tamed constructor prototype property with the original one\\n * 6. Replace its [[Prototype]] slot with the tamed constructor of Function\\n */\\n\\nfunction repairFunction(name,intrinsicName,declaration){\\nlet FunctionInstance;\\ntry{\\n/* eslint-disable-next-line no-eval, no-restricted-globals*/\\nFunctionInstance=(0,eval)(declaration);}\\ncatch(e){\\nif(e instanceof commons.SyntaxError){\\n/* Prevent failure on platforms where async and/or generators*/\\n/* are not supported.*/\\nreturn;}\\n\\n/* Re-throw*/\\nthrow e;}\\n\\nconst FunctionPrototype=commons.getPrototypeOf(FunctionInstance);\\n\\n/* Prevents the evaluation of source when calling constructor on the*/\\n/* prototype of functions.*/\\n/* eslint-disable-next-line func-names*/\\nconst InertConstructor=function(){\\nthrow commons.TypeError(\\n'Function.prototype.constructor is not a valid constructor.');};\\n\\n\\ncommons.defineProperties(InertConstructor,{\\nprototype:{value:FunctionPrototype},\\nname:{\\nvalue:name,\\nwritable:false,\\nenumerable:false,\\nconfigurable:true}});\\n\\n\\n\\ncommons.defineProperties(FunctionPrototype,{\\nconstructor:{value:InertConstructor}});\\n\\n\\n/* Reconstructs the inheritance among the new tamed constructors*/\\n/* to mirror the original specified in normal JS.*/\\nif(InertConstructor!==commons.FERAL_FUNCTION.prototype.constructor){\\ncommons.setPrototypeOf(InertConstructor,commons.FERAL_FUNCTION.prototype.constructor);}\\n\\n\\nnewIntrinsics[intrinsicName]=InertConstructor;}\\n\\n\\n/* Here, the order of operation is important: Function needs to be repaired*/\\n/* first since the other repaired constructors need to inherit from the*/\\n/* tamed Function function constructor.*/\\n\\nrepairFunction('Function','%InertFunction%','(function(){})');\\nrepairFunction(\\n'GeneratorFunction',\\n'%InertGeneratorFunction%',\\n'(function*(){})');\\n\\nrepairFunction(\\n'AsyncFunction',\\n'%InertAsyncFunction%',\\n'(async function(){})');\\n\\nrepairFunction(\\n'AsyncGeneratorFunction',\\n'%InertAsyncGeneratorFunction%',\\n'(async function*(){})');\\n\\n\\nreturn newIntrinsics;}exports[\\\"default\\\"]=tameFunctionConstructors;\",\n \"node_modules/ses/src/tame-function-tostring.js\": \"'use strict';Object.defineProperty(exports,'__esModule',{value:true});var commons=require('./commons.js');\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\nconst nativeSuffix=') { [native code] }';\\n\\n/* Note: Top level mutable state. Does not make anything worse, since the*/\\n/* patching of `Function.prototype.toString` is also globally stateful. We*/\\n/* use this top level state so that multiple calls to `tameFunctionToString` are*/\\n/* idempotent, rather than creating redundant indirections.*/\\nlet markVirtualizedNativeFunction;\\n\\n/**\\n * Replace `Function.prototype.toString` with one that recognizes\\n * shimmed functions as honorary native functions.\\n */\\nconst tameFunctionToString=()=>{\\nif(markVirtualizedNativeFunction===undefined){\\nconst virtualizedNativeFunctions=new commons.WeakSet();\\n\\nconst tamingMethods={\\ntoString(){\\nconst str=commons.functionToString(this);\\nif(\\ncommons.stringEndsWith(str,nativeSuffix)||\\n!commons.weaksetHas(virtualizedNativeFunctions,this))\\n{\\nreturn str;}\\n\\nreturn`function ${this.name}() { [native code] }`;}};\\n\\n\\n\\ncommons.defineProperty(commons.functionPrototype,'toString',{\\nvalue:tamingMethods.toString});\\n\\n\\nmarkVirtualizedNativeFunction=commons.freeze((func)=>\\ncommons.weaksetAdd(virtualizedNativeFunctions,func));}\\n\\n\\nreturn markVirtualizedNativeFunction;};exports.tameFunctionToString=tameFunctionToString;\",\n \"node_modules/ses/src/tame-harden.js\": \"'use strict';Object.defineProperty(exports,'__esModule',{value:true});var\\n\\n\\n\\n\\ncommons=require('./commons.js');/* eslint-disable no-restricted-globals */ /** @import {Harden} from '../types.js'; */ /** @type {(safeHarden: Harden, hardenTaming: 'safe' | 'unsafe') => Harden} */\\nconst tameHarden=(safeHarden,hardenTaming)=>{\\nif(hardenTaming!=='safe'&&hardenTaming!=='unsafe'){\\nthrow commons.TypeError(`unrecognized fakeHardenOption ${hardenTaming}`);}\\n\\n\\nif(hardenTaming==='safe'){\\nreturn safeHarden;}\\n\\n\\n/* In on the joke*/\\nObject.isExtensible=()=>false;\\nObject.isFrozen=()=>true;\\nObject.isSealed=()=>true;\\nReflect.isExtensible=()=>false;\\n\\n/* @ts-expect-error secret property*/\\nif(safeHarden.isFake){\\n/* The \\\"safe\\\" hardener is already a fake hardener.*/\\n/* Just use it.*/\\nreturn safeHarden;}\\n\\n\\nconst fakeHarden=(arg)=>arg;\\nfakeHarden.isFake=true;\\nreturn commons.freeze(fakeHarden);};\\n\\ncommons.freeze(tameHarden);exports.tameHarden=tameHarden;\",\n \"node_modules/ses/src/tame-locale-methods.js\": \"'use strict';Object.defineProperty(exports,'__esModule',{value:true});var commons=require('./commons.js');var assert=require('./error/assert.js');\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\nconst{Fail,quote:q}=assert.assert;\\n\\nconst localePattern=/^(\\\\w*[a-z])Locale([A-Z]\\\\w*)$/;\\n\\n/* Use concise methods to obtain named functions without constructor*/\\n/* behavior or `.prototype` property.*/\\nconst tamedMethods={\\n/* See https://tc39.es/ecma262/#sec-string.prototype.localecompare*/\\nlocaleCompare(arg){\\nif(this===null||this===undefined){\\nthrow commons.TypeError(\\n'Cannot localeCompare with null or undefined \\\"this\\\" value');}\\n\\n\\nconst s=`${this}`;\\nconst that=`${arg}`;\\nif(s<that){\\nreturn-1;}\\n\\nif(s>that){\\nreturn 1;}\\n\\ns===that||Fail`expected ${q(s)} and ${q(that)} to compare`;\\nreturn 0;},\\n\\n\\ntoString(){\\nreturn`${this}`;}};\\n\\n\\n\\nconst nonLocaleCompare=tamedMethods.localeCompare;\\nconst numberToString=tamedMethods.toString;\\n\\nfunction tameLocaleMethods(intrinsics,localeTaming='safe'){\\nif(localeTaming!=='safe'&&localeTaming!=='unsafe'){\\nthrow commons.TypeError(`unrecognized localeTaming ${localeTaming}`);}\\n\\nif(localeTaming==='unsafe'){\\nreturn;}\\n\\n\\ncommons.defineProperty(commons.String.prototype,'localeCompare',{\\nvalue:nonLocaleCompare});\\n\\n\\nfor(const intrinsicName of commons.getOwnPropertyNames(intrinsics)){\\nconst intrinsic=intrinsics[intrinsicName];\\nif(commons.isObject(intrinsic)){\\nfor(const methodName of commons.getOwnPropertyNames(intrinsic)){\\nconst match=commons.regexpExec(localePattern,methodName);\\nif(match){\\ntypeof intrinsic[methodName]==='function'||\\nFail`expected ${q(methodName)} to be a function`;\\nconst nonLocaleMethodName=`${match[1]}${match[2]}`;\\nconst method=intrinsic[nonLocaleMethodName];\\ntypeof method==='function'||\\nFail`function ${q(nonLocaleMethodName)} not found`;\\ncommons.defineProperty(intrinsic,methodName,{value:method});}}}}\\n\\n\\n\\n\\n\\n/* Numbers are special because toString accepts a radix instead of ignoring*/\\n/* all of the arguments that we would otherwise forward.*/\\ncommons.defineProperty(commons.Number.prototype,'toLocaleString',{\\nvalue:numberToString});}exports[\\\"default\\\"]=tameLocaleMethods;\",\n \"node_modules/ses/src/tame-math-object.js\": \"'use strict';Object.defineProperty(exports,'__esModule',{value:true});var commons=require('./commons.js');\\n\\n\\n\\n\\n\\n\\n\\nfunction tameMathObject(mathTaming='safe'){\\nif(mathTaming!=='safe'&&mathTaming!=='unsafe'){\\nthrow commons.TypeError(`unrecognized mathTaming ${mathTaming}`);}\\n\\nconst originalMath=commons.Math;\\nconst initialMath=originalMath;/* to follow the naming pattern*/\\n\\nconst{random:_,...otherDescriptors}=\\ncommons.getOwnPropertyDescriptors(originalMath);\\n\\n/* Use concise methods to obtain named functions without constructors.*/\\nconst tamedMethods={\\n/**\\n * `%SharedMath%.random()` throws a TypeError starting with \\\"secure mode\\\".\\n * See https://github.com/endojs/endo/issues/910#issuecomment-1581855420\\n */\\nrandom(){\\nthrow commons.TypeError('secure mode %SharedMath%.random() throws');}};\\n\\n\\n\\nconst sharedMath=commons.create(commons.objectPrototype,{\\n...otherDescriptors,\\nrandom:{\\nvalue:tamedMethods.random,\\nwritable:true,\\nenumerable:false,\\nconfigurable:true}});\\n\\n\\n\\nreturn{\\n'%InitialMath%':initialMath,\\n'%SharedMath%':sharedMath};}exports[\\\"default\\\"]=tameMathObject;\",\n \"node_modules/ses/src/tame-regenerator-runtime.js\": \"'use strict';Object.defineProperty(exports,'__esModule',{value:true});var commons=require('./commons.js');\\n\\n\\n\\n\\n\\n\\nconst tameRegeneratorRuntime=()=>{\\nconst iter=commons.iteratorPrototype[commons.iteratorSymbol];\\ncommons.defineProperty(commons.iteratorPrototype,commons.iteratorSymbol,{\\nconfigurable:true,\\nget(){\\nreturn iter;},\\n\\nset(value){\\n/* ignore the assignment on IteratorPrototype*/\\nif(this===commons.iteratorPrototype)return;\\nif(commons.objectHasOwnProperty(this,commons.iteratorSymbol)){\\nthis[commons.iteratorSymbol]=value;}\\n\\ncommons.defineProperty(this,commons.iteratorSymbol,{\\nvalue,\\nwritable:true,\\nenumerable:true,\\nconfigurable:true});}});};exports.tameRegeneratorRuntime=tameRegeneratorRuntime;\",\n \"node_modules/ses/src/tame-regexp-constructor.js\": \"'use strict';Object.defineProperty(exports,'__esModule',{value:true});var commons=require('./commons.js');\\n\\n\\n\\n\\n\\n\\n\\n\\nfunction tameRegExpConstructor(regExpTaming='safe'){\\nif(regExpTaming!=='safe'&®ExpTaming!=='unsafe'){\\nthrow commons.TypeError(`unrecognized regExpTaming ${regExpTaming}`);}\\n\\nconst RegExpPrototype=commons.FERAL_REG_EXP.prototype;\\n\\nconst makeRegExpConstructor=(_={})=>{\\n/* RegExp has non-writable static properties we need to omit.*/\\n/**\\n * @param {Parameters<typeof FERAL_REG_EXP>} rest\\n */\\nconst ResultRegExp=function RegExp(...rest){\\nif(new.target===undefined){\\nreturn commons.FERAL_REG_EXP(...rest);}\\n\\nreturn commons.construct(commons.FERAL_REG_EXP,rest,new.target);};\\n\\n\\ncommons.defineProperties(ResultRegExp,{\\nlength:{value:2},\\nprototype:{\\nvalue:RegExpPrototype,\\nwritable:false,\\nenumerable:false,\\nconfigurable:false}});\\n\\n\\n/* Hermes does not have `Symbol.species`. We should support such platforms.*/\\nif(commons.speciesSymbol){\\nconst speciesDesc=commons.getOwnPropertyDescriptor(\\ncommons.FERAL_REG_EXP,\\ncommons.speciesSymbol);\\n\\nif(!speciesDesc){\\nthrow commons.TypeError('no RegExp[Symbol.species] descriptor');}\\n\\ncommons.defineProperties(ResultRegExp,{\\n[commons.speciesSymbol]:speciesDesc});}\\n\\n\\nreturn ResultRegExp;};\\n\\n\\nconst InitialRegExp=makeRegExpConstructor();\\nconst SharedRegExp=makeRegExpConstructor();\\n\\nif(regExpTaming!=='unsafe'){\\n/* @ts-expect-error Deleted properties must be optional*/\\ndelete RegExpPrototype.compile;}\\n\\ncommons.defineProperties(RegExpPrototype,{\\nconstructor:{value:SharedRegExp}});\\n\\n\\nreturn{\\n'%InitialRegExp%':InitialRegExp,\\n'%SharedRegExp%':SharedRegExp};}exports[\\\"default\\\"]=tameRegExpConstructor;\",\n \"node_modules/ses/src/tame-symbol-constructor.js\": \"'use strict';Object.defineProperty(exports,'__esModule',{value:true});var\\n\\n\\n\\n\\n\\n\\n\\n\\n\\ncommons=require('./commons.js');/**\\n * This taming provides a tamed alternative to the original `Symbol` constructor\\n * that starts off identical, except that all its properties are \\\"temporarily\\\"\\n * configurable. The original `Symbol` constructor remains unmodified on\\n * the start compartment's global. The tamed alternative is used as the shared\\n * `Symbol` constructor on constructed compartments.\\n *\\n * Starting these properties as configurable assumes two succeeding phases of\\n * processing: A whitelisting phase, that\\n * removes all properties not on the whitelist (which requires them to be\\n * configurable) and a global hardening step that freezes all primordials,\\n * returning these properties to their expected non-configurable status.\\n *\\n * The ses shim is constructed to eventually enable vetted shims to run between\\n * repair and global hardening. However, such vetted shims would normally\\n * run in the start compartment, which continues to use the original unmodified\\n * `Symbol`, so they should not normally be affected by the temporary\\n * configurability of these properties.\\n *\\n * Note that the spec refers to the global `Symbol` function as the\\n * [\\\"Symbol Constructor\\\"](https://tc39.es/ecma262/multipage/fundamental-objects.html#sec-symbol-constructor)\\n * even though it has a call behavior (can be called as a function) and does not\\n * not have a construct behavior (cannot be called with `new`). Accordingly,\\n * to tame it, we must replace it with a function without a construct\\n * behavior.\\n */\\nconst tameSymbolConstructor=()=>{\\nconst OriginalSymbol=commons.Symbol;\\nconst SymbolPrototype=OriginalSymbol.prototype;\\n\\n/* Bypass Hermes bug, fixed in: https://github.com/facebook/hermes/commit/00f18c89c720e1c34592bb85a1a8d311e6e99599*/\\n/* Make a \\\"copy\\\" of the primordial [Symbol \\\"constructor\\\"](https://tc39.es/ecma262/#sec-symbol-description) which maintains all observable behavior. The primordial explicitly throws on `[[Construct]]` and has a `[[Call]]` which ignores the receiver. Binding also maintains the `toString` source as a native function. The `name` is restored below when copying own properties.*/\\nconst SharedSymbol=commons.functionBind(commons.Symbol,undefined);\\n\\ncommons.defineProperties(SymbolPrototype,{\\nconstructor:{\\nvalue:SharedSymbol\\n/* leave other `constructor` attributes as is*/}});\\n\\n\\n\\nconst originalDescsEntries=commons.entries(\\ncommons.getOwnPropertyDescriptors(OriginalSymbol));\\n\\nconst descs=commons.fromEntries(\\ncommons.arrayMap(originalDescsEntries,([name,desc])=>[\\nname,\\n{...desc,configurable:true}]));\\n\\n\\ncommons.defineProperties(SharedSymbol,descs);\\n\\nreturn{'%SharedSymbol%':SharedSymbol};};exports.tameSymbolConstructor=tameSymbolConstructor;\",\n \"node_modules/ses/src/transforms.js\": \"'use strict';Object.defineProperty(exports,'__esModule',{value:true});var commons=require('./commons.js');var\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\ngetSourceUrl=require('./get-source-url.js');/* @ts-check*/ /**\\n * Find the first occurence of the given pattern and return\\n * the location as the approximate line number.\\n *\\n * @param {string} src\\n * @param {RegExp} pattern\\n * @returns {number}\\n */\\nfunction getLineNumber(src,pattern){\\nconst index=commons.stringSearch(src,pattern);\\nif(index<0){\\nreturn-1;}\\n\\n\\n/* The importPattern incidentally captures an initial \\\\n in*/\\n/* an attempt to reject a . prefix, so we need to offset*/\\n/* the line number in that case.*/\\nconst adjustment=src[index]==='\\\\n'?1:0;\\n\\nreturn commons.stringSplit(commons.stringSlice(src,0,index),'\\\\n').length+adjustment;}\\n\\n\\n/* /////////////////////////////////////////////////////////////////////////////*/\\n\\nconst htmlCommentPattern=new commons.FERAL_REG_EXP(`(?:${'<'}!--|--${'>'})`,'g');\\n\\n/**\\n * Conservatively reject the source text if it may contain text that some\\n * JavaScript parsers may treat as an html-like comment. To reject without\\n * parsing, `rejectHtmlComments` will also reject some other text as well.\\n *\\n * https://www.ecma-international.org/ecma-262/9.0/index.html#sec-html-like-comments\\n * explains that JavaScript parsers may or may not recognize html\\n * comment tokens \\\"<\\\" immediately followed by \\\"!--\\\" and \\\"--\\\"\\n * immediately followed by \\\">\\\" in non-module source text, and treat\\n * them as a kind of line comment. Since otherwise both of these can\\n * appear in normal JavaScript source code as a sequence of operators,\\n * we have the terrifying possibility of the same source code parsing\\n * one way on one correct JavaScript implementation, and another way\\n * on another.\\n *\\n * This shim takes the conservative strategy of just rejecting source\\n * text that contains these strings anywhere. Note that this very\\n * source file is written strangely to avoid mentioning these\\n * character strings explicitly.\\n *\\n * We do not write the regexp in a straightforward way, so that an\\n * apparennt html comment does not appear in this file. Thus, we avoid\\n * rejection by the overly eager rejectDangerousSources.\\n *\\n * @param {string} src\\n * @returns {string}\\n */\\nconst rejectHtmlComments=(src)=>{\\nconst lineNumber=getLineNumber(src,htmlCommentPattern);\\nif(lineNumber<0){\\nreturn src;}\\n\\nconst name=getSourceUrl.getSourceURL(src);\\n/* See https://github.com/endojs/endo/blob/master/packages/ses/error-codes/SES_HTML_COMMENT_REJECTED.md*/\\nthrow commons.SyntaxError(\\n`Possible HTML comment rejected at ${name}:${lineNumber}. (SES_HTML_COMMENT_REJECTED)`);};\\n\\n\\n\\n/**\\n * An optional transform to place ahead of `rejectHtmlComments` to evade *that*\\n * rejection. However, it may change the meaning of the program.\\n *\\n * This evasion replaces each alleged html comment with the space-separated\\n * JavaScript operator sequence that it may mean, assuming that it appears\\n * outside of a comment or literal string, in source code where the JS\\n * parser makes no special case for html comments (like module source code).\\n * In that case, this evasion preserves the meaning of the program, though it\\n * does change the souce column numbers on each effected line.\\n *\\n * If the html comment appeared in a literal (a string literal, regexp literal,\\n * or a template literal), then this evasion will change the meaning of the\\n * program by changing the text of that literal.\\n *\\n * If the html comment appeared in a JavaScript comment, then this evasion does\\n * not change the meaning of the program because it only changes the contents of\\n * those comments.\\n *\\n * @param {string} src\\n * @returns {string}\\n */\\nconst evadeHtmlCommentTest=(src)=>{\\nconst replaceFn=(match)=>match[0]==='<'?'< ! --':'-- >';\\nreturn commons.stringReplace(src,htmlCommentPattern,replaceFn);};\\n\\n\\n/* /////////////////////////////////////////////////////////////////////////////*/\\n\\nconst importPattern=new commons.FERAL_REG_EXP(\\n'(^|[^.]|\\\\\\\\.\\\\\\\\.\\\\\\\\.)\\\\\\\\bimport(\\\\\\\\s*(?:\\\\\\\\(|/[/*]))',\\n'g');\\n\\n\\n/**\\n * Conservatively reject the source text if it may contain a dynamic\\n * import expression. To reject without parsing, `rejectImportExpressions` will\\n * also reject some other text as well.\\n *\\n * The proposed dynamic import expression is the only syntax currently\\n * proposed, that can appear in non-module JavaScript code, that\\n * enables direct access to the outside world that cannot be\\n * suppressed or intercepted without parsing and rewriting. Instead,\\n * this shim conservatively rejects any source text that seems to\\n * contain such an expression. To do this safely without parsing, we\\n * must also reject some valid programs, i.e., those containing\\n * apparent import expressions in literal strings or comments.\\n *\\n * The current conservative rule looks for the identifier \\\"import\\\"\\n * followed by either an open paren or something that looks like the\\n * beginning of a comment. We assume that we do not need to worry\\n * about html comment syntax because that was already rejected by\\n * rejectHtmlComments.\\n *\\n * this \\\\s *must* match all kinds of syntax-defined whitespace. If e.g.\\n * U+2028 (LINE SEPARATOR) or U+2029 (PARAGRAPH SEPARATOR) is treated as\\n * whitespace by the parser, but not matched by /\\\\s/, then this would admit\\n * an attack like: import\\\\u2028('power.js') . We're trying to distinguish\\n * something like that from something like importnotreally('power.js') which\\n * is perfectly safe.\\n *\\n * @param {string} src\\n * @returns {string}\\n */\\nconst rejectImportExpressions=(src)=>{\\nconst lineNumber=getLineNumber(src,importPattern);\\nif(lineNumber<0){\\nreturn src;}\\n\\nconst name=getSourceUrl.getSourceURL(src);\\n/* See https://github.com/endojs/endo/blob/master/packages/ses/error-codes/SES_IMPORT_REJECTED.md*/\\nthrow commons.SyntaxError(\\n`Possible import expression rejected at ${name}:${lineNumber}. (SES_IMPORT_REJECTED)`);};\\n\\n\\n\\n/**\\n * An optional transform to place ahead of `rejectImportExpressions` to evade\\n * *that* rejection. However, it may change the meaning of the program.\\n *\\n * This evasion replaces each suspicious `import` identifier with `__import__`.\\n * If the alleged import expression appears in a JavaScript comment, this\\n * evasion will not change the meaning of the program. If it appears in a\\n * literal (string literal, regexp literal, or a template literal), then this\\n * evasion will change the contents of that literal. If it appears as code\\n * where it would be parsed as an expression, then it might or might not change\\n * the meaning of the program, depending on the binding, if any, of the lexical\\n * variable `__import__`.\\n *\\n * @param {string} src\\n * @returns {string}\\n */\\nconst evadeImportExpressionTest=(src)=>{\\nconst replaceFn=(_,p1,p2)=>`${p1}__import__${p2}`;\\nreturn commons.stringReplace(src,importPattern,replaceFn);};\\n\\n\\n/* /////////////////////////////////////////////////////////////////////////////*/\\n\\nconst someDirectEvalPattern=new commons.FERAL_REG_EXP(\\n'(^|[^.])\\\\\\\\beval(\\\\\\\\s*\\\\\\\\()',\\n'g');\\n\\n\\n/**\\n * Heuristically reject some text that seems to contain a direct eval\\n * expression, with both false positives and false negavives. To reject without\\n * parsing, `rejectSomeDirectEvalExpressions` may will also reject some other\\n * text as well. It may also accept source text that contains a direct eval\\n * written oddly, such as `(eval)(src)`. This false negative is not a security\\n * vulnerability. Rather it is a compat hazard because it will execute as\\n * an indirect eval under the SES-shim but as a direct eval on platforms that\\n * support SES directly (like XS).\\n *\\n * The shim cannot correctly emulate a direct eval as explained at\\n * https://github.com/Agoric/realms-shim/issues/12\\n * If we did not reject direct eval syntax, we would\\n * accidentally evaluate these with an emulation of indirect eval. To\\n * prevent future compatibility problems, in shifting from use of the\\n * shim to genuine platform support for the proposal, we should\\n * instead statically reject code that seems to contain a direct eval\\n * expression.\\n *\\n * As with the dynamic import expression, to avoid a full parse, we do\\n * this approximately with a regexp, that will also reject strings\\n * that appear safely in comments or strings. Unlike dynamic import,\\n * if we miss some, this only creates future compat problems, not\\n * security problems. Thus, we are only trying to catch innocent\\n * occurrences, not malicious one. In particular, `(eval)(...)` is\\n * direct eval syntax that would not be caught by the following regexp.\\n *\\n * Exported for unit tests.\\n *\\n * @param {string} src\\n * @returns {string}\\n */\\nconst rejectSomeDirectEvalExpressions=(src)=>{\\nconst lineNumber=getLineNumber(src,someDirectEvalPattern);\\nif(lineNumber<0){\\nreturn src;}\\n\\nconst name=getSourceUrl.getSourceURL(src);\\n/* See https://github.com/endojs/endo/blob/master/packages/ses/error-codes/SES_EVAL_REJECTED.md*/\\nthrow commons.SyntaxError(\\n`Possible direct eval expression rejected at ${name}:${lineNumber}. (SES_EVAL_REJECTED)`);};\\n\\n\\n\\n/* /////////////////////////////////////////////////////////////////////////////*/\\n\\n/**\\n * A transform that bundles together the transforms that must unconditionally\\n * happen last in order to ensure safe evaluation without parsing.\\n *\\n * @param {string} source\\n * @returns {string}\\n */\\nconst mandatoryTransforms=(source)=>{\\nsource=rejectHtmlComments(source);\\nsource=rejectImportExpressions(source);\\nreturn source;};\\n\\n\\n/**\\n * Starting with `source`, apply each transform to the result of the\\n * previous one, returning the result of the last transformation.\\n *\\n * @param {string} source\\n * @param {((str: string) => string)[]} transforms\\n * @returns {string}\\n */\\nconst applyTransforms=(source,transforms)=>{\\nfor(const transform of transforms){\\nsource=transform(source);}\\n\\nreturn source;};\\n\\n\\n/* export all as a frozen object*/\\nconst transforms=commons.freeze({\\nrejectHtmlComments:commons.freeze(rejectHtmlComments),\\nevadeHtmlCommentTest:commons.freeze(evadeHtmlCommentTest),\\nrejectImportExpressions:commons.freeze(rejectImportExpressions),\\nevadeImportExpressionTest:commons.freeze(evadeImportExpressionTest),\\nrejectSomeDirectEvalExpressions:commons.freeze(rejectSomeDirectEvalExpressions),\\nmandatoryTransforms:commons.freeze(mandatoryTransforms),\\napplyTransforms:commons.freeze(applyTransforms)});exports.applyTransforms=applyTransforms;exports.evadeHtmlCommentTest=evadeHtmlCommentTest;exports.evadeImportExpressionTest=evadeImportExpressionTest;exports.mandatoryTransforms=mandatoryTransforms;exports.rejectHtmlComments=rejectHtmlComments;exports.rejectImportExpressions=rejectImportExpressions;exports.rejectSomeDirectEvalExpressions=rejectSomeDirectEvalExpressions;exports.transforms=transforms;\",\n \"packages/xsnap-lockdown/dist/src-object-inspect.js\": \"'use strict';Object.defineProperty(exports,'__esModule',{value:true});var objectInspect=\\\"// @ts-nocheck\\\\n/* eslint-disable no-nested-ternary,no-use-before-define */\\\\n\\\\n/* global globalThis */\\\\n// Adapted from object-inspect@1.12.0 https://github.com/inspect-js/object-inspect\\\\n/*\\\\nMIT License\\\\n\\\\nCopyright (c) 2013 James Halliday\\\\n\\\\nPermission is hereby granted, free of charge, to any person obtaining a copy\\\\nof this software and associated documentation files (the \\\\\\\"Software\\\\\\\"), to deal\\\\nin the Software without restriction, including without limitation the rights\\\\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\\\\ncopies of the Software, and to permit persons to whom the Software is\\\\nfurnished to do so, subject to the following conditions:\\\\n\\\\nThe above copyright notice and this permission notice shall be included in all\\\\ncopies or substantial portions of the Software.\\\\n\\\\nTHE SOFTWARE IS PROVIDED \\\\\\\"AS IS\\\\\\\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\\\\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\\\\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\\\\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\\\\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\\\\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\\\\nSOFTWARE.\\\\n*/\\\\nconst mapSize = Object.getOwnPropertyDescriptor(Map.prototype, 'size').get;\\\\nconst mapForEach = Map.prototype.forEach;\\\\nconst setSize = Object.getOwnPropertyDescriptor(Set.prototype, 'size').get;\\\\nconst setForEach = Set.prototype.forEach;\\\\nconst WeakRefPrototype =\\\\n typeof globalThis.WeakRef === 'function' ? globalThis.WeakRef.prototype : {};\\\\nconst booleanValueOf = Boolean.prototype.valueOf;\\\\nconst objectToString = Object.prototype.toString;\\\\nconst functionToString = Function.prototype.toString;\\\\nconst $match = String.prototype.match;\\\\nconst $slice = String.prototype.slice;\\\\nconst $replace = String.prototype.replace;\\\\nconst $toUpperCase = String.prototype.toUpperCase;\\\\nconst $test = RegExp.prototype.test;\\\\nconst $concat = Array.prototype.concat;\\\\nconst $join = Array.prototype.join;\\\\nconst bigIntValueOf = BigInt.prototype.valueOf;\\\\nconst getOwnPropertyNames = Object.getOwnPropertyNames;\\\\nconst getOwnPropertySymbols = Object.getOwnPropertySymbols;\\\\nconst symToString = Symbol.prototype.toString;\\\\nconst symKeyFor = Symbol.keyFor;\\\\n// ie, `has-tostringtag/shams\\\\nconst toStringTag = Symbol.toStringTag;\\\\nconst isEnumerable = Object.prototype.propertyIsEnumerable;\\\\nconst dateToISOString = Date.prototype.toISOString;\\\\n\\\\nconst gPO = Reflect.getPrototypeOf;\\\\nconst hasOwn = Object.prototype.hasOwnProperty;\\\\n\\\\n// Separate every three rightmost digits.\\\\nconst separateDigits = (\\\\n digits,\\\\n separator = '_',\\\\n separationRegExp = /^-?\\\\\\\\d+(\\\\\\\\d{3})$/,\\\\n) => {\\\\n const separations = [];\\\\n let match;\\\\n // eslint-disable-next-line no-cond-assign\\\\n while ((match = digits.match(separationRegExp))) {\\\\n separations.unshift(match[1]);\\\\n digits = digits.slice(0, -match[1].length);\\\\n }\\\\n separations.unshift(digits);\\\\n return $join.call(separations, separator);\\\\n};\\\\n\\\\nfunction inspect0(obj, opts = {}, depth = 0, circular = new Set()) {\\\\n // Handle enumerable primitives.\\\\n if (obj == null) {\\\\n return obj === null ? 'null' : 'undefined';\\\\n }\\\\n if (obj === true) {\\\\n return 'true';\\\\n }\\\\n if (obj === false) {\\\\n return 'false';\\\\n }\\\\n\\\\n const typeofObj = typeof obj;\\\\n if (typeofObj === 'string') {\\\\n return inspectString(obj, opts);\\\\n }\\\\n if (typeofObj === 'number') {\\\\n if (obj === 0) {\\\\n return Infinity / obj > 0 ? '0' : '-0';\\\\n }\\\\n return String(obj);\\\\n }\\\\n if (typeofObj === 'bigint') {\\\\n // Separate the digits to help visualise, terminate with `n`.\\\\n return `${separateDigits(String(obj))}n`;\\\\n }\\\\n\\\\n const maxDepth = typeof opts.depth === 'undefined' ? 5 : opts.depth;\\\\n if (depth >= maxDepth && maxDepth > 0 && typeofObj === 'object') {\\\\n return isArray(obj) ? '[Array]' : '[Object]';\\\\n }\\\\n\\\\n const indent = getIndent(opts, depth);\\\\n\\\\n if (circular.has(obj)) {\\\\n return '[Circular]';\\\\n }\\\\n\\\\n function inspect(value, from, noIndent) {\\\\n if (from) {\\\\n circular.add(from);\\\\n }\\\\n let ret;\\\\n if (noIndent) {\\\\n const newOpts = {\\\\n depth: opts.depth,\\\\n };\\\\n if (has(opts, 'quoteStyle')) {\\\\n newOpts.quoteStyle = opts.quoteStyle;\\\\n }\\\\n ret = inspect0(value, newOpts, depth + 1, circular);\\\\n } else {\\\\n ret = inspect0(value, opts, depth + 1, circular);\\\\n }\\\\n if (from) {\\\\n circular.delete(from);\\\\n }\\\\n return ret;\\\\n }\\\\n\\\\n if (typeofObj === 'function') {\\\\n const name = nameOf(obj);\\\\n const keys = arrObjKeys(obj, inspect);\\\\n return `[Function${name ? `: ${name}` : ' (anonymous)'}]${\\\\n keys.length > 0 ? ` { ${$join.call(keys, ', ')} }` : ''\\\\n }`;\\\\n }\\\\n if (isSymbol(obj)) {\\\\n const registered = symKeyFor(obj);\\\\n if (registered !== undefined) {\\\\n // Registered symbol.\\\\n return `Symbol.for(${registered})`;\\\\n }\\\\n return symToString.call(obj);\\\\n }\\\\n if (typeof obj !== 'object') {\\\\n // Some new unknown type\\\\n return typeof obj;\\\\n }\\\\n\\\\n if (isArray(obj)) {\\\\n if (obj.length === 0) {\\\\n return '[]';\\\\n }\\\\n const elems = arrObjKeys(obj, inspect);\\\\n if (indent && !singleLineValues(elems)) {\\\\n return `[${indentedJoin(elems, indent)}]`;\\\\n }\\\\n return `[ ${$join.call(elems, ', ')} ]`;\\\\n }\\\\n if (isError(obj)) {\\\\n const parts = arrObjKeys(obj, inspect);\\\\n if ('cause' in obj && !isEnumerable.call(obj, 'cause')) {\\\\n parts.unshift(`[cause]: ${inspect(obj.cause)}`);\\\\n }\\\\n if (parts.length === 0) {\\\\n return `[${String(obj)}]`;\\\\n }\\\\n return `{ [${String(obj)}] ${$join.call(parts, ', ')} }`;\\\\n }\\\\n\\\\n const objProto = gPO(obj);\\\\n switch (objProto) {\\\\n case Map.prototype: {\\\\n const mapParts = [];\\\\n mapForEach.call(obj, (value, key) => {\\\\n mapParts.push(`${inspect(key, obj, true)} => ${inspect(value, obj)}`);\\\\n });\\\\n return collectionOf('Map', mapSize.call(obj), mapParts, indent);\\\\n }\\\\n case Set.prototype: {\\\\n const setParts = [];\\\\n setForEach.call(obj, value => {\\\\n setParts.push(inspect(value, obj));\\\\n });\\\\n return collectionOf('Set', setSize.call(obj), setParts, indent);\\\\n }\\\\n case WeakMap.prototype: {\\\\n return weakContainerOf('WeakMap');\\\\n }\\\\n case WeakSet.prototype: {\\\\n return weakContainerOf('WeakSet');\\\\n }\\\\n case WeakRefPrototype: {\\\\n return weakContainerOf('WeakRef');\\\\n }\\\\n case BigInt.prototype: {\\\\n return markBoxed(inspect(bigIntValueOf.call(obj)));\\\\n }\\\\n default:\\\\n // Fall-through\\\\n }\\\\n\\\\n if (!(toStringTag in obj)) {\\\\n switch (objProto) {\\\\n case Number.prototype: {\\\\n return markBoxed(inspect(Number(obj)));\\\\n }\\\\n case Boolean.prototype: {\\\\n return markBoxed(booleanValueOf.call(obj));\\\\n }\\\\n case String.prototype: {\\\\n return markBoxed(inspect(String(obj)));\\\\n }\\\\n case Date.prototype: {\\\\n return dateToISOString.call(obj);\\\\n }\\\\n case RegExp.prototype: {\\\\n return String(obj);\\\\n }\\\\n default:\\\\n // Fall-through\\\\n }\\\\n }\\\\n\\\\n const elems = arrObjKeys(obj, inspect);\\\\n const isPlainObject = objProto === Object.prototype;\\\\n const protoTag =\\\\n isPlainObject || obj instanceof Object ? '' : 'null prototype';\\\\n const stringTag =\\\\n !isPlainObject && toStringTag && Object(obj) === obj && toStringTag in obj\\\\n ? $slice.call(toStr(obj), 8, -1)\\\\n : protoTag\\\\n ? 'Object'\\\\n : '';\\\\n const protoConstructor = objProto && objProto.constructor;\\\\n const constructorTag =\\\\n isPlainObject || typeof protoConstructor !== 'function'\\\\n ? ''\\\\n : protoConstructor.name\\\\n ? `${protoConstructor.name} `\\\\n : '';\\\\n const tag =\\\\n constructorTag +\\\\n (stringTag || protoTag\\\\n ? `[${$join.call(\\\\n $concat.call([], stringTag || [], protoTag || []),\\\\n ': ',\\\\n )}] `\\\\n : '');\\\\n if (elems.length === 0) {\\\\n return `${tag}{}`;\\\\n }\\\\n if (indent) {\\\\n return `${tag}{${indentedJoin(elems, indent)}}`;\\\\n }\\\\n return `${tag}{ ${$join.call(elems, ', ')} }`;\\\\n}\\\\n\\\\nfunction wrapQuotes(s, defaultStyle, opts) {\\\\n const quoteChar = (opts.quoteStyle || defaultStyle) === 'double' ? '\\\\\\\"' : \\\\\\\"'\\\\\\\";\\\\n return quoteChar + s + quoteChar;\\\\n}\\\\n\\\\nfunction isArray(obj) {\\\\n return (\\\\n Array.isArray(obj) &&\\\\n (!toStringTag || !(typeof obj === 'object' && toStringTag in obj))\\\\n );\\\\n}\\\\nfunction isError(obj) {\\\\n return (\\\\n obj instanceof Error && !(typeof obj === 'object' && toStringTag in obj)\\\\n );\\\\n}\\\\n\\\\n// Symbol and BigInt do have Symbol.toStringTag by spec, so that can't be used to eliminate false positives\\\\nfunction isSymbol(obj) {\\\\n return typeof obj === 'symbol';\\\\n}\\\\n\\\\nfunction has(obj, key) {\\\\n return hasOwn.call(obj, key);\\\\n}\\\\n\\\\nfunction toStr(obj) {\\\\n return objectToString.call(obj);\\\\n}\\\\n\\\\nfunction nameOf(f) {\\\\n if (f.name) {\\\\n return f.name;\\\\n }\\\\n const m = $match.call(functionToString.call(f), /^function\\\\\\\\s*([\\\\\\\\w$]+)/);\\\\n if (m) {\\\\n return m[1];\\\\n }\\\\n return null;\\\\n}\\\\n\\\\nfunction indexOf(xs, x) {\\\\n if (xs.indexOf) {\\\\n return xs.indexOf(x);\\\\n }\\\\n for (let i = 0, l = xs.length; i < l; i += 1) {\\\\n if (xs[i] === x) {\\\\n return i;\\\\n }\\\\n }\\\\n return -1;\\\\n}\\\\n\\\\nfunction inspectString(str, opts) {\\\\n if (str.length > opts.maxStringLength) {\\\\n const remaining = str.length - opts.maxStringLength;\\\\n const trailer = `... ${remaining} more character${\\\\n remaining > 1 ? 's' : ''\\\\n }`;\\\\n return (\\\\n inspectString($slice.call(str, 0, opts.maxStringLength), opts) + trailer\\\\n );\\\\n }\\\\n const s = $replace.call(\\\\n // Replace ' with \\\\\\\\' and \\\\\\\\ with \\\\\\\\\\\\\\\\.\\\\n $replace.call(str, /(['\\\\\\\\\\\\\\\\])/g, '\\\\\\\\\\\\\\\\$1'),\\\\n // eslint-disable-next-line no-control-regex\\\\n /[\\\\\\\\x00-\\\\\\\\x1f]/g,\\\\n lowbyte,\\\\n );\\\\n return wrapQuotes(s, 'single', opts);\\\\n}\\\\n\\\\n// Replace control characters with `\\\\\\\\b`, `\\\\\\\\t`, `\\\\\\\\n`, `\\\\\\\\f`, `\\\\\\\\r`, `\\\\\\\\x0B` or\\\\n// `\\\\\\\\xAB` escaped versions.\\\\nfunction lowbyte(c) {\\\\n const n = c.charCodeAt(0);\\\\n const x = {\\\\n 8: 'b',\\\\n 9: 't',\\\\n 10: 'n',\\\\n 12: 'f',\\\\n 13: 'r',\\\\n }[n];\\\\n if (x) {\\\\n return `\\\\\\\\\\\\\\\\${x}`;\\\\n }\\\\n return `\\\\\\\\\\\\\\\\x${n < 0x10 ? '0' : ''}${$toUpperCase.call(n.toString(16))}`;\\\\n}\\\\n\\\\nfunction markBoxed(str) {\\\\n return `Object(${str})`;\\\\n}\\\\n\\\\nfunction weakContainerOf(type) {\\\\n return `${type} { ? }`;\\\\n}\\\\n\\\\nfunction collectionOf(type, size, entries, indent) {\\\\n const joinedEntries = indent\\\\n ? indentedJoin(entries, indent)\\\\n : $join.call(entries, ', ');\\\\n return `${type} (${size}) {${joinedEntries}}`;\\\\n}\\\\n\\\\nfunction singleLineValues(xs) {\\\\n for (let i = 0; i < xs.length; i += 1) {\\\\n if (indexOf(xs[i], '\\\\\\\\n') >= 0) {\\\\n return false;\\\\n }\\\\n }\\\\n return true;\\\\n}\\\\n\\\\nfunction getIndent(opts, depth) {\\\\n let baseIndent;\\\\n if (opts.indent === '\\\\\\\\t') {\\\\n baseIndent = '\\\\\\\\t';\\\\n } else if (typeof opts.indent === 'number' && opts.indent > 0) {\\\\n baseIndent = $join.call(Array(opts.indent + 1), ' ');\\\\n } else {\\\\n return null;\\\\n }\\\\n return {\\\\n base: baseIndent,\\\\n prev: $join.call(Array(depth + 1), baseIndent),\\\\n };\\\\n}\\\\n\\\\nfunction indentedJoin(xs, indent) {\\\\n if (xs.length === 0) {\\\\n return '';\\\\n }\\\\n const lineJoiner = `\\\\\\\\n${indent.prev}${indent.base}`;\\\\n return `${lineJoiner + $join.call(xs, `,${lineJoiner}`)}\\\\\\\\n${indent.prev}`;\\\\n}\\\\n\\\\nfunction arrObjKeys(obj, inspect) {\\\\n const isArr = isArray(obj);\\\\n const elems = [];\\\\n if (isArr) {\\\\n elems.length = obj.length;\\\\n for (let i = 0; i < obj.length; i += 1) {\\\\n elems[i] = has(obj, i) ? inspect(obj[i], obj) : '';\\\\n }\\\\n }\\\\n const syms = getOwnPropertySymbols(obj);\\\\n for (const key of getOwnPropertyNames(obj)) {\\\\n if (!isEnumerable.call(obj, key)) {\\\\n continue;\\\\n }\\\\n if (isArr && String(Number(key)) === key && key < obj.length) {\\\\n continue;\\\\n }\\\\n if ($test.call(/[^\\\\\\\\w$]/, key)) {\\\\n elems.push(`${inspect(key, obj)}: ${inspect(obj[key], obj)}`);\\\\n } else {\\\\n elems.push(`${key}: ${inspect(obj[key], obj)}`);\\\\n }\\\\n }\\\\n for (let j = 0; j < syms.length; j += 1) {\\\\n if (isEnumerable.call(obj, syms[j])) {\\\\n elems.push(`[${inspect(syms[j])}]: ${inspect(obj[syms[j]], obj)}`);\\\\n }\\\\n }\\\\n return elems;\\\\n}\\\\n\\\\nconst outerInspect = (obj, ...args) => {\\\\n try {\\\\n return inspect0(obj, ...args);\\\\n } catch (err) {\\\\n let errStr;\\\\n try {\\\\n errStr = inspect0(err);\\\\n } catch (_) {\\\\n errStr = 'throw';\\\\n }\\\\n return `[cannot inspect (${typeof obj}) due to ${errStr}]`;\\\\n }\\\\n};\\\\n\\\\n// This must be the only import/export statement, and occur last in the file, so\\\\n// that confined-object-inspect.js can comment out the `export default`\\\\n// and evaluate this entire file's source code to obtain the inspector as the\\\\n// completion value.\\\\nexport default harden(outerInspect);\\\\n\\\";exports[\\\"default\\\"]=objectInspect;\",\n \"packages/xsnap-lockdown/lib/confined-object-inspect.js\": \"'use strict';Object.defineProperty(exports,'__esModule',{value:true});var\\n\\nsrcObjectInspect=require('../dist/src-object-inspect.js');/* Ensure the object inspector is confined.*/\\nconst c=new Compartment();\\nharden(c.globalThis);\\n\\n/* Transform the imported inspector module source string into an evaluable*/\\n/* string. We could have played more games with bundlers to do something less*/\\n/* fragile, but even so, SES should fail-safe if this replacement doesn't match.*/\\n/**/\\n/* The goal (presuming the file ends with a single export default statement):*/\\n/* `...\\\\n export default harden(inspect0);`*/\\n/* becomes:*/\\n/* `...\\\\n /* export default *X/ harden(inspect0);`*/\\n/* and we can evaluate it to obtain the completion value as the object inspector.*/\\nconst src=srcObjectInspect[\\\"default\\\"].replace(\\n/(^|\\\\s)(export\\\\s+default)(\\\\s+)/g,\\n'$1/* $2 */$3');\\n\\nconst objectInspect=c.evaluate(\\n`${src}\\\\n//# sourceURL=xsnap-lockdown/lib/object-inspect.js\\\\n`);exports[\\\"default\\\"]=objectInspect;\",\n \"packages/xsnap-lockdown/lib/console-shim.js\": \"'use strict';\\n\\nObject.defineProperty(exports,'__esModule',{value:true});/* global globalThis, print */ /* Default implementation just stringifies.*/\\nlet inspect=String;\\n\\n/* Allow the importer to override the inspect function.*/\\nconst setObjectInspector=(objectInspector)=>{\\ninspect=objectInspector;};\\n\\n\\nconst printAll=(...args)=>{\\n/* Though xsnap doesn't have a whole console, it does have print().*/\\n/**/\\n/* We use inspect to render non-string arguments to strings.*/\\n/**/\\n/* @ts-expect-error*/\\n/* eslint-disable-next-line no-restricted-globals*/\\nprint(...args.map((v)=>typeof v==='string'?v:inspect(v)));};\\n\\n\\nconst noop=(_)=>{};\\n\\n/**\\n * Since SES expects (requires?) a console,\\n * provide one based on xsnap's print.\\n * Note that this runs in the start compartment,\\n * before lockdown.\\n *\\n * See https://github.com/Agoric/agoric-sdk/issues/2146\\n */\\nconst console={\\ndebug:printAll,\\nlog:printAll,\\ninfo:printAll,\\nwarn:printAll,\\nerror:printAll,\\n\\ntrace:noop,\\ndirxml:noop,\\ngroup:noop,\\ngroupCollapsed:noop,\\ngroupEnd:noop,\\n\\nassert:noop,\\ntimeLog:noop,\\n\\nclear:noop,\\ncount:noop,\\ncountReset:noop,\\ndir:noop,\\n\\ntable:noop,\\ntime:noop,\\ntimeEnd:noop,\\nprofile:noop,\\nprofileEnd:noop,\\ntimeStamp:noop};\\n\\n\\n/* @ts-expect-error doesn't conform to Console*/\\nglobalThis.console=console;exports.setObjectInspector=setObjectInspector;\",\n \"packages/xsnap-lockdown/lib/ses-boot-debug.js\": \"'use strict';var consoleShim=require('./console-shim.js');require('../../../node_modules/@endo/init/debug.js');var confinedObjectInspect=require('./confined-object-inspect.js');/* This file is only used to generate the published bundle, so*/\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\nconsoleShim.setObjectInspector(confinedObjectInspect[\\\"default\\\"]);\\n\\nharden(console);\"\n};\n const nsBundle = {};\n\n function createEvalString(filename) {\n const code = sourceBundle[filename];\n if (!code) {\n return undefined;\n }\n return `\\\n(function getExport(require, exports) { \\\n 'use strict'; \\\n const module = { exports }; \\\n \\\n ${code}\n return module.exports;\n})\n//# sourceURL=${filePrefix}/${filename}\n`;\n }\n\n function computeExports(filename, exportPowers, exports) {\n const { require: systemRequire, systemEval, _log } = exportPowers;\n // This captures the endowed require.\n const match = filename.match(/^(.*)\\/[^/]+$/);\n const thisdir = match ? match[1] : '.';\n const contextRequire = mod => {\n // Do path algebra to find the actual source.\n const els = mod.split('/');\n let prefix;\n if (els[0][0] === '@') {\n // Scoped name.\n prefix = els.splice(0, 2).join('/');\n } else if (els[0][0] === '.') {\n // Relative.\n els.unshift(...thisdir.split('/'));\n } else {\n // Bare or absolute.\n prefix = els.splice(0, 1);\n }\n\n const suffix = [];\n for (const el of els) {\n if (el === '.' || el === '') {\n // Do nothing.\n } else if (el === '..') {\n // Traverse upwards.\n suffix.pop();\n } else {\n suffix.push(el);\n }\n }\n\n // log(mod, prefix, suffix);\n if (prefix !== undefined) {\n suffix.unshift(prefix);\n }\n let modPath = suffix.join('/');\n if (modPath.startsWith('./')) {\n modPath = modPath.slice(2);\n }\n // log('requiring', modPath);\n if (!(modPath in nsBundle)) {\n // log('evaluating', modPath);\n // Break cycles, but be tolerant of modules\n // that completely override their exports object.\n nsBundle[modPath] = {};\n nsBundle[modPath] = computeExports(\n modPath,\n exportPowers,\n nsBundle[modPath],\n );\n }\n\n // log('returning', nsBundle[modPath]);\n return nsBundle[modPath];\n };\n\n const code = createEvalString(filename);\n if (!code) {\n // log('missing code for', filename, sourceBundle);\n if (systemRequire) {\n return systemRequire(filename);\n }\n throw Error(\n `require(${JSON.stringify(\n filename,\n )}) failed; no toplevel require endowment`,\n );\n }\n\n // log('evaluating', code);\n // eslint-disable-next-line no-eval\n return (systemEval || eval)(code)(contextRequire, exports);\n }\n\n // Evaluate the entrypoint recursively, seeding the exports.\n const systemRequire = typeof require === 'undefined' ? undefined : require;\n const systemEval = typeof nestedEvaluate === 'undefined' ? undefined : nestedEvaluate;\n return computeExports(entrypoint, { require: systemRequire, systemEval }, {});\n}\n//# sourceURL=/bundled-source/...-preamble.js\n","sourceMap":"//# sourceURL=/bundled-source/...-preamble.js\n"}
|