titanfiber 1.0.159 → 1.0.161

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/eval.pkg.js CHANGED
@@ -1 +1 @@
1
- var t_f_one=function(t){var e,r=!1;return function(){return r||(r=!0,e=t.apply(this,arguments)),e}},t_node_args=t_f_one(function(){return process.argv.slice(2)}),t_env_args=t_node_args,t_s_isPrimitive=function(t){return"string"==typeof t},t_s_isObject=function(t){return t instanceof String},t_s_isAny=function(t){return t_s_isPrimitive(t)||t_s_isObject(t)},t_s_is=t_s_isAny,t_cli_splitArgs=function(t,e){const r=[];let _="",n="outside",s=!1;for(let i=0;i<t.length;i++){const a=t[i];switch(n){case"outside":'"'===a?s?(_+=a,s=!1):(e&&(_+=a),n="insideQuote"):"\\"===a?s=!0:" "===a?(_.length>0&&(r.push(_),_=""),s=!1):(_+=a,s=!1);break;case"insideQuote":'"'!==a||s?"\\"!==a||s?(_+=a,s=!1):s=!0:(e&&(_+=a),n="outside")}}return _.length>0&&r.push(_),r},t_cli_resolveArgs=function(t,e){var r=t;return null==r?t_env_args():t_s_is(r)?t_cli_splitArgs(r,e):r},t_cli_positionalArgs=function(t,e){return t_cli_resolveArgs(t,e).slice()},t_node_positionalArgs=t_cli_positionalArgs,t_node_getScriptPath=function(){var t=require.main?.filename;return t||(null!=process._eval?null:t_node_positionalArgs(process.argv)[1])},t_node_requireBuiltIn=function(t){return require("node:"+t)},t_node__builtInModule=function(t){return t_f_one(()=>t_node_requireBuiltIn(t))},t_node_fs=t_node__builtInModule("fs"),t_fs_load=function(t){return t_node_fs().readFileSync(String(t),"utf8")},t_fs_loadText=t_fs_load,t_fs_deepStat=function(t,e){return t_node_fs().statSync(String(t),e)},t_fs_shallowStat=function(t,e){return t_node_fs().lstatSync(String(t),e)},t_fs_stat=function(t,e,r){return(e?t_fs_deepStat:t_fs_shallowStat)(t,r)},t_fs_getID=function(t,e){return t_fs_stat(t,e).ino},t_fs_exists=function(t){return!!t_node_fs().lstatSync(String(t),{throwIfNoEntry:!1})},t_err_Enhanced=function(t){return class extends t{constructor(t,e){super(t,e);var r=this.constructor.name;r&&(this.name=r)}}},t_err_Error=t_err_Enhanced(globalThis.Error),t_err_NYIError=class extends t_err_Error{constructor(t,e){super(t??"Not yet implemented",e)}},t_f_is=function(t){return"function"==typeof t},t_o_ensure=function(t,e,r,_){var n=t[e];if(void 0===n){var s=r;!1!==_&&t_f_is(s)&&(s=s(t,e)),t[e]=n=s}return n},t_o_safeEnsure=function(t,e,r,_){return t||(t={}),t_o_ensure(t,e,r,_),t},t_err_defaultFromFn=function(t,e){return t_o_safeEnsure(t,"fromFn",e,!1)},t_err_nyi=function(t,e){return new t_err_NYIError(t,t_err_defaultFromFn(e,t_err_nyi))},t_node_os=t_node__builtInModule("os"),t_node_path=t_node__builtInModule("path"),t_path_sep=t_node_path().sep,t_path__getDefaultTempDir=function(){return t_node_os().tmpdir()+t_path_sep},t_path_getTempDir=function(t){if(t)throw t_err_nyi();return t_path__getDefaultTempDir()},t_titan_getTempDir=function(){return t_path_getTempDir()+"Titan/"},t_s_decapitalize=function(t){return t.charAt(0).toLowerCase()+t.slice(1)},t_path__removeExtsFromFile=function(t){return t.split(".")[0]},t_path_file=function(t){return t_node_path().win32.basename(String(t))},t_path_baseName=function(t){return t_path__removeExtsFromFile(t_path_file(t))},t_titan_getPackageName=function(t,e,r,_){t||(t=t_node_getScriptPath()??"_console.js");var n=t_s_decapitalize(t_path_baseName(t));return e&&(n+="_repl"),n+(r&&_?.dynamic?".dypkg.json":".pkg.js")},t_v_constructorMatches=function(t,e){return null!=t&&t.constructor===e},t_o_constructorMatches=t_v_constructorMatches,t_re_is=function(t){return t_o_constructorMatches(t,RegExp)},t_a_last=function(t){return t[t.length-1]},t_o_is=function(t){return t_v_constructorMatches(t,Object)},t_s_chars=function(t){return new Set(t)},t_re_parseFlagString=function(t){var e={};if(t){var r=t_s_chars(t);r.has("g")&&(e.global=!0),r.has("i")&&(e.caseInsensitive=!0),r.has("y")&&(e.sticky=!0)}return e},t_re_createFlagString=function(t){var e="";return t.global&&(e+="g"),(t.caseInsensitive||0==t.caseSensitive)&&(e+="i"),t.sticky&&(e+="y"),e},t_re_updateFlagString=function(t,e){var r=t_re_parseFlagString(t);return t_re_createFlagString(Object.assign(r,e))},t_re_copy=function(t,e){var r=e,_=void 0;return t_s_is(r)?_=r:t_o_is(r)&&(_=t_re_updateFlagString(t.flags,r)),new RegExp(t,_)},t_a_resolveIndex=function(t,e){return e<0?t.length+e:e},t_s_resolveIndex=t_a_resolveIndex,t_re_setStartIndex=function(t,e,r){return t=t_re_copy(t,{global:!0}),null!=r&&(e=t_s_resolveIndex(r,e)),t.lastIndex=e,t},t_a_is=function(t){return Array.isArray(t)},t_a_ensure=function(t){return t_a_is(t)?t:[t]},t_p_is=function(t){return t instanceof Promise},t_p_asyncJoint=function(t,e){var r=t;return t_p_is(r)?r.then(e):e(r)},t_f_isArrow=function(t){return t_f_is(t)&&null==t.prototype},t_f_isArrowFn=t_f_isArrow,t_f_wrap=function(t){return function(){return t.apply(this,arguments)}},t_f_createConstructor=function(t,e){var r;return r=e?function(){this.super=e;var r=t.apply(this,arguments);return t_p_asyncJoint(r,()=>(delete this.super,r))}:t_f_isArrowFn(t)?t_f_wrap(t):t,r._isConstructor=!0,r},t_f_ensureConstructor=function(t,e){return t._isConstructor?t:t_f_createConstructor(t,e)},t_f_retThis=function(){return this},t_v_isPrimitive=function(t){var e=typeof t;return"object"!==e&&"function"!==e||null===t},t_o_isAny=function(t){return!t_v_isPrimitive(t)},t_o_merge=function(t,e,r){return!1===r?Object.keys(e).forEach(r=>{void 0===t[r]&&(t[r]=e[r])}):Object.assign(t,e),t},t_o_weakAssign=function(t,e){return t_o_merge(t,e,!1)},t_o_defineProperty=function(t,e,r,_){return r||(r={}),_&&t_o_weakAssign(r,_),null==r.enumerable&&(r.enumerable=!0),null==r.configurable&&(r.configurable=!0),Object.defineProperty(t,e,r)},t_o_addNonEnumerable=function(t,e,r,_){return t_o_defineProperty(t,e,{value:r,writable:!0,enumerable:!1},_),r},t_o_setHidden=t_o_addNonEnumerable,t_f_setName=function(t,e){Object.defineProperty(t,"name",{value:e,configurable:!0}),t_o_setHidden(t,"displayName",e)},t_class_setName=t_f_setName,t_class_addStatics=function(t,e){return Object.assign(t,e)},t_macro_config=function(t){},t_node_is=t_f_one(function(){return t_macro_config("node.is")??"undefined"==typeof window}),t_sym_display=t_node_is()?require("util").inspect.custom:Symbol("Display"),t_class_setDisplay=function(t,e){t.prototype[t_sym_display]=e},t_class_create=function(t,e,r,_,n,s){s||(s={}),t_s_is(e)&&(e=null);var i,a,o,u=r;u&&(t_a_is(u)?([a,o]=u,a&&(a=t_f_ensureConstructor(a))):i=t_f_ensureConstructor(u,e));var l=s.bareFn;s.singleton&&(l=function(){return null==p.default&&(p.default=new p(...arguments)),p.default});var c,f=a||i||e||t_f_retThis;function p(){if(!new.target&&l&&!(this instanceof p))return l.apply(this,arguments);var t=this;return t_p_asyncJoint(f.apply(t,arguments),r=>{if(r&&t_o_isAny(r)&&(t=r,a)){if(!new.target)throw t_err_nyi('Prototype repair is NYI for class instantiation without "new".');if(!e)throw t_err_nyi("instanceFn is not yet supported when extendsClass is null.");var _=Object.getPrototypeOf(this);Object.getPrototypeOf(t)!==_&&Object.setPrototypeOf(t,_)}return o?t_p_asyncJoint(o.apply(t,arguments),()=>t):t})}return t&&t_class_setName(p,t),e&&Object.setPrototypeOf(p,e),_?(c=_,e&&Object.setPrototypeOf(_,e.prototype)):c=e?Object.create(e.prototype):{},t_o_setHidden(c,"constructor",p),p.prototype=c,n&&t_class_addStatics(p,n),s.display&&t_class_setDisplay(p,s.display),s.implements&&t_a_ensure(s.implements).forEach(t=>t(p)),p},t_o_makeNonEnumerable=function(t,e){Object.defineProperty(t,e,{enumerable:!1})},t_o_hideKey=t_o_makeNonEnumerable,t_f_createClass=function(t,e,r,_,n){var s=Symbol();return t_class_create(t,Function,[function(){var t=function(){return t[s].apply(this,arguments)};return t},function(){var t=e.apply(this,arguments);if(!t)throw new Error("Constructor must return a function.");this[s]=t,t_o_hideKey(this,s)}],r,_,n)},t_a_resolveIndices=function(t,e,r,_){return e=null==e?0:t_a_resolveIndex(t,e),r=null==r?t.length:t_a_resolveIndex(t,r),_&&(0==_.inclusiveStart&&e++,_.inclusiveEnd&&r++),[e,r]},t_a_fill=function(t,e,r,_){var n=e;if([r,_]=t_a_resolveIndices(t,r,_),t_f_is(n))for(var s=r;s<_;s++)t[s]=n(s,t);else t.fill(n,r,_);return t},t_a_create=function(t,e){var r=new Array(t||0);return arguments.length>1&&t_a_fill(r,e),r},t_a_pick=function(t,e){return t_a_create(e.length,r=>t[e[r]])},t_o_get=function(t,e){return t[e]},t_o_set=function(t,e,r){return t[e]=r},t_v_resolve=function(t,e,r){var _=t;return t_f_is(_)?_.apply(r,e):_},t_o_ensureCustom=function(t,e,r,_,n){_||(_=t_o_get);var s=_(t,e);return void 0===s&&(s=t_v_resolve(r,[t,e]),n||(n=t_o_set),n(t,e,s)),s},t_map_get=function(t,e){return t.get(e)},t_map_set=function(t,e,r){return t.set(e,r)},t_map_ensure=function(t,e,r){return t_o_ensureCustom(t,e,r,t_map_get,t_map_set)},t_map_Cache=class{constructor(){this.store=new Map}get(t,e){return t_map_ensure(this.store,t,e)}remove(t){return this.store.delete(t)}delete(t){return this.remove(t)}},t_a_add=function(t,e){return t.push(e),t},t_a_push=t_a_add,t_args_ensureArray=function(t){var e=t;return Array.isArray(e)?e:Array.from(e)},t_sym_value=Symbol("Value"),t_o_createEmpty=function(){return{}},t_a_splitTail=function(t){return[t.slice(0,-1),t[t.length-1]]},t_a_splitLast=t_a_splitTail,t_tree_dive=function(t,e,r,_,n,s){r||(r=t_o_get),null==_&&(_=t_o_createEmpty),null==n&&(n=t_o_set),null==s&&(s=r);for(var[i,a]=t_a_splitLast(e),o=t,u=i.length,l=0;l<u;l++){var c=i[l],f=r(o,c);if(void 0===f){if(!_)return;f=t_o_ensureCustom(o,c,_,r,n)}o=f}if(s)return s(o,a,n)},t_tree_ensure=function(t,e,r,_,n,s){return t_tree_dive(t,e,_,n,s,(t,e)=>t_o_ensureCustom(t,e,r,_,s))},t_map_createEmpty=function(){return new Map},t_map_diveEnsure=function(t,e,r){return t_tree_ensure(t,e,r,t_map_get,t_map_createEmpty,t_map_set)},t_o_remove=function(t,e){return delete t[e],t},t_tree_remove=function(t,e,r,_){return t_tree_dive(t,e,r,!1,!1,_||t_o_remove)},t_map_remove=function(t,e){return t.delete(e)},t_map_diveDelete=function(t,e){return t_tree_remove(t,e,t_map_get,t_map_remove)},t_map_MultiCache=class{constructor(){this.store=new Map}get(t,e){return t=t_a_push(t_args_ensureArray(t),t_sym_value),t_map_diveEnsure(this.store,t,e)}remove(t){return t=t_a_push(t_args_ensureArray(t),t_sym_value),t_map_diveDelete(this.store,t)}delete(t){return this.remove(t)}},t_f_MemoizedFunction=t_f_createClass("MemoizedFunction",function(t,e){if(this.base=t,null!=e)if(1===(e=t_a_ensure(e)).length){this.cache=new t_map_Cache;var r=e[0];this._cacheKeyFormatter=t=>t[r]}else this.cache=new t_map_MultiCache,this._cacheKeyFormatter=t=>t_a_pick(t,e);else this.cache=new t_map_MultiCache,this._cacheKeyFormatter=t=>t;var _=this;return function(){var e=_._cacheKeyFormatter(arguments);return _.cache.get(e,()=>t.apply(this,arguments))}},{remove(t){return this.cache.remove(this._cacheKeyFormatter(t))}}),t_f_memoize=function(t,e){return new t_f_MemoizedFunction(t,e)},t_re_addFlag=function(t,e){return t_re_copy(t,t.flags+e)},t_re_global=function(t){return t_re_addFlag(t,"g")},t_re_ensureGlobal=t_f_memoize(function(t){return t.global?t:t_re_global(t)},0),t_re_matchAll=function(t,e,r){return t=null!=r?t_re_setStartIndex(t,r,e):t_re_ensureGlobal(t),Array.from(e.matchAll(t))},t_re_matchLast=function(t,e,r){return null!=r&&(e=e.slice(0,r)),t_a_last(t_re_matchAll(t,e))||null},t_re_matchEnd=function(t,e){var r=t_re_matchLast(t,e);return r&&e.length===r.index+r[0].length?r:null},t_err_TypeError=t_err_Enhanced(globalThis.TypeError),t_v_type=function(t){return null==t?t:t.constructor},t_node_util=t_node__builtInModule("util"),t_node_display=function(t,e){return e||(e={}),null==e.colors&&(e.colors=!0),t_node_util().inspect(t,e)},t_a_wrapIndex=t_a_resolveIndex,t_a_wrapIndices=function(t,e,r,_){return void 0!==e&&(null===e||0===e?e=void 0:(e=t_a_wrapIndex(t,e),_&&0==_.inclusiveStart&&e++)),void 0!==r&&(null===r||r===t.length?r=void 0:(r=t_a_wrapIndex(t,r),_&&_.inclusiveEnd&&r++)),[e,r]},t_s_withIndices=function(t,e,r,_,n,s){if(r||null!=_){[r,_]=t_a_wrapIndices(t,r,_,s);var i=t.slice(r,_),a=e(i);return n?n(a,r,_,i,t):a}return e(t)},t_s_apply=function(t,e,r,_,n){return t_s_withIndices(t,e,r,_,(e,r,_)=>(void 0!==r?t.slice(0,r):"")+(e||"")+(void 0!==_?t.slice(_):""),n)},t_re_resolveFlags=function(t){var e=t;return null==e?void 0:t_s_is(e)?e:t_re_createFlagString(e)},t_re_create=function(t,e){return new RegExp(t,t_re_resolveFlags(e))},t_re_escape=function(t){return t.replace(/[-[\]{}()*+!<=:?.\/\\^$|#\s,]/g,"\\$&")},t_re_createEscaped=function(t,e){return t_re_create(t_re_escape(t),e)},t_s_replaceAll=function(t,e,r,_,n,s){return t_s_apply(t,function(t){return t.replaceAll?(t_re_is(e)&&(e=t_re_ensureGlobal(e)),t.replaceAll(e,r)):(e=t_s_is(e)?t_re_createEscaped(e,"g"):t_re_ensureGlobal(e),this.replace(e,r))},_,n,s)},t_s_escape=function(t,e,r){return t_s_replaceAll(t,e,(r??"\\")+e)},t_s_quote=function(t,e,r){return null==e&&(e='"'),!1!==r&&(t=t_s_escape(t,e,r)),e+t+e},t_s_toLiteral=function(t){return t_s_quote(t,'"')},t_o_isPure=t_o_is,t_s_from=function(t){return t_o_isPure(t)?t_o_toLiteral(t):String(t)},t_a_toLiteral=function(t,e){return e||(e=t_v_toLiteral),"["+t.reduce(function(t,r){return t+e(r)+", "},"").slice(0,-2)+"]"},t_v_toLiteral=function(t){return t_s_is(t)?t_s_toLiteral(t):t_a_is(t)?t_a_toLiteral(t):t_s_from(t)},t_o_allKeys=function(t){return Reflect.ownKeys(t)},t_o_keys=function(t,e){return(e?t_o_allKeys:Object.keys)(t)},t_o_each=function(t,e,r){t_o_keys(t,r).forEach((r,_,n)=>e(r,t[r],_,n))},t_o_reduce=function(t,e,r,_){var n=null!=r?r:"";return t_o_each(t,function(){n=e.call(this,n,...arguments)},_),n},t_o_toLiteral=function(t,e){return e||(e=t_v_toLiteral),"{"+t_o_reduce(t,function(t,r,_){return t+r+":"+e(_)+", "},"",!0).slice(0,-2)+"}"},t_o_display=function(t,e){return null==e&&(e=1),e<=0?"[object Object]":t_o_toLiteral(t,t=>t_v_display(t,e-1))},t_a_display=function(t,e){return null==e&&(e=1),e<=0?"[object Array]":t_a_toLiteral(t,t=>t_v_display(t,e-1))},t_v_display=function(t,e){return void 0===t?"undefined":null===t?"null":t_node_is()?t_node_display(t,e):t_o_is(t)?t_o_display(t,maxNumLevels):t_a_is(t)?t_a_display(t,maxNumLevels):t_s_from(t)},t_err_type=function(t,e,r,_){if(0===arguments.length)return new t_err_TypeError("Unexpected type received");_||(_={});var n,{type:s,expected:i}=_;return null==s&&(s=t_v_type(t)),s&&s.name&&(s=s.name),i?(i.name&&(i=i.name),n="Expected "+i+", received "):n="Unexpected type received (",n+=s,null!=t&&(n+=" ("+t_v_display(t)+")"),i||(n+=")"),r&&(n+=' for "'+r+'"'),null!=e&&(n+=" (index "+e+")"),_.fromFn||(_.fromFn=t_err_type),new t_err_TypeError(n,_)},t_s_endsWith=function(t,e){if(t_s_is(e))return t.endsWith(e);if(t_re_is(e))return!!t_re_matchEnd(e,t);throw t_err_type(e,1,"matchThis")},t_re_slash=/\/|\\/,t_path_ensureTrailingSlash=function(t){return t_s_endsWith(t,t_re_slash)?t:t+t_path_sep},t_path_dir=function(t,e){return t=t_node_path().dirname(String(t)),!1===e?t:t_path_ensureTrailingSlash(t)},t_path_abs=function(t,e,r){t=String(t);var _=t_node_path().resolve,n=e?_(e,t):_(t);return r?n+t_path_sep:n},t_titan_getPackagePath=function(t,e,r,_){var n,s=t_titan_getPackageName(t,e,r,_);return n=t?t_path_dir(t):"./",t_path_abs(n+s)},t_err_create=function(t,e,r){var _=new t_err_Error(t,r);return e&&Object.assign(_,e),_},t_titan_locate=t_f_one(function(){var t=process.env.TITAN_PATH;if(!t)throw t_err_create("Environment variable TITAN_PATH is not set.");return t_path_ensureTrailingSlash(t)}),t_titan_getCompiledDir=t_f_one(function(){return t_titan_locate()+"Compiled/Newest/"}),t_d_now=function(){return new Date},t_err_req=function(t,e,r,_){var n="Required argument";return r&&(n+=' "'+r+'"'),null!=e&&(n+=" (index "+e+")"),n+=" missing",arguments.length>0&&(n+=" (received "+t_v_display(t)+")"),t_err_create(n,null,t_err_defaultFromFn(_,t_err_req))},t_d_copy=function(t){return new Date(t.getTime())},t_d_fromYear=function(t){return new Date(t,null)},t_d__resolveNative=function(t){var e=new Date(t);return isNaN(e.getTime())?null:e},t_v_nullIfNaN=function(t){return isNaN(t)?null:t},t_n_ensure=function(t){return null==t?null:t_v_nullIfNaN(Number(t))},t_n_fromString=t_n_ensure,t_n_is=function(t){var e=typeof t;return"number"===e||"bigint"===e},t_d_ensure=function(t,e){if(null==t)throw t_err_req(t,0);if(t.constructor===Date)return e?t_d_copy(t):t;if(t_s_is(t)){var r=t_n_fromString(t);return null!=r?t_d_fromYear(r):t_d__resolveNative(t)||null}return t_n_is(t)?t_d_fromYear(t):void 0},t_d_resolve=function(t,e){return null==t?t_d_now():t_d_ensure(t,e)},t_d_create=function(t){return t_d_resolve(t,!0)},t_d_from=t_d_create,t_titan_getLastCompileTime=function(){var t=t_titan_getCompiledDir()+"LastCompileTime.txt";return t_fs_exists(t)?t_d_from(t_fs_load(t)):null},t_fs_getModifiedDate=function(t){return t_fs_stat(t).mtime},t_d_isBefore=function(t,e,r){return t=t_d_ensure(t),e=t_d_ensure(e),!1===r?t<e:t<=e},t_titan_hasNewCompile=function(t){var e=t_titan_getLastCompileTime();if(e){var r=t_fs_getModifiedDate(t);if(t_d_isBefore(r,e))return!0}return!1},t_node_getScriptDir=function(t){var e=t_node_getScriptPath();return e?t_path_dir(e,t):null},t_fs_loadJSON=function(t){return JSON.parse(t_fs_loadText(t))},t_o_addGetterAndSetter=function(t,e,r,_,n){return t_o_defineProperty(t,e,{get:r,set:_},n)},t_o_setGetterAndSetter=t_o_addGetterAndSetter,t_o_replaceGetterAndSetter=function(t,e,r,_){return t_o_defineProperty(t,e,{value:r,writable:!0},_)},t_o_setLazy=function(t,e,r,_){t_o_setGetterAndSetter(t,e,function(){var _=r(e,t);return this[e]=_,_},function(t){t_o_replaceGetterAndSetter(this,e,t,_)},_)},t_titan__trackGlobals=function(t,e){var r=t.globals,_=t.shortNamesToGlobals;Object.keys(_).forEach(t=>{for(var n=_[t],s=n.length,i=0;i<s;i++){var a=n[i],o=globalThis[a];o||(o=globalThis[a]={});var u=r[a];Object.keys(u).forEach(r=>{var _=e[t][r];o[r]=_})}}),e._meta||(e._meta={}),e._meta.globals=t.globals},t_titan__loadDynamicDeps=function _loadDynamicDeps(dynPackagePath,localT,options){const path=t_node_path();if(dynPackagePath)dynPackagePath=path.resolve(t_node_getScriptDir(),dynPackagePath);else{var scriptPath=t_node_getScriptPath();if(!scriptPath)throw new Error("Cannot find package name because scriptPath does not exist.");var dir=path.dirname(scriptPath),baseName=path.basename(scriptPath).split(".")[0];baseName=baseName[0].toLowerCase()+baseName.slice(1),dynPackagePath=path.join(dir,baseName+".pkg.json")}for(var packageObj=t_fs_loadJSON(dynPackagePath),setLazy=t_o_setLazy,items=packageObj.itemsInOrder,numItems=items.length,i=0;i<numItems;i++){let item=items[i],[shortName,itemName,evalText]=item,tModObj=localT[shortName];tModObj||(tModObj=localT[shortName]={}),Object.hasOwn(tModObj,itemName)||setLazy(tModObj,itemName,function(){let t=localT;return eval("("+evalText+")")})}packageObj.globals&&t_titan__trackGlobals(packageObj,localT)},t_node__basicRequire=function(t){return require(t)},t_npm_isBuiltIn=function(t){return!!t.startsWith("node:")||t_node__basicRequire("node:module").isBuiltin(t)},t_npm_isFile=function(t){return t.startsWith(".")},t_o_ensureMulti=function(t,e,r){return Object.keys(e).forEach(_=>t_o_ensure(t,_,e[_],r)),t},t_o_safeEnsureMulti=function(t,e,r){return t_o_ensureMulti(t||{},e,r)},t_o_safeSetDefaults=function(t,e,r){return e?t_o_safeEnsureMulti(t,e,r):t??{}},t_opt_resolve=function(t,e){return t_o_safeSetDefaults(t,e,!0)},t_err_ValueError=class extends t_err_Error{constructor(t,e){super(t??"Unexpected value",e)}},t_err_value=function(t,e,r,_){if(0===arguments.length)return new t_err_ValueError("Unexpected value received");_||(_={});var n,{expected:s}=_;return n=s?"Received "+t_v_display(t)+", expected one of "+t_v_display(s):"Unexpected value received: "+t_v_display(t),r&&(n+=' for "'+r+'"'),null!=e&&(n+=" (index "+e+")"),_.fromFn||(_.fromFn=t_err_value),new t_err_ValueError(n,_)},t_os__resolveStdio=function(t){var e=t.stdio;if(e){if(!t_a_is(e)){if(!t_s_is(e))throw t_err_type(e,"stdio");if("pipe"===e)e=["pipe","pipe","pipe"];else if("inherit"===e)e=["inherit","inherit","inherit"];else if("ignore"===e)e=["ignore","ignore","ignore"];else{if("overlapped"!==e)throw t_err_value(e,"stdio");e=["overlapped","overlapped","overlapped"]}t.stdio=e}}else e=t.stdio=[null,null,null];return e},t_a_assert=function(t){if(!t_a_is(t))throw t_err_type(t,null,null,{expected:Array});return!0},t_a_replaceContents=function(t,e){var r=e.length;t.length=r;for(var _=0;_<r;_++)t[_]=e[_];return t},t_f_not=function(t){return function(){return!t.apply(this,arguments)}},t_a_removeByFilter=function(t,e){return t_a_replaceContents(t,t.filter(t_f_not(e)))},t_a_removeNullish=function(t){return t_a_removeByFilter(t,t=>null==t)},t_node_child_process=t_node__builtInModule("child_process"),t_win_is=t_f_one(function(){return"win32"===process.platform}),t_shell__handleError=function(t,e,r){if(r||(r={}),e(t))throw t;if(r.nullOnErr)return null;var _=r.onErr;if(void 0!==_)return t_v_resolve(_);throw t},t_os_run=function(t,e,r,_){var n=(r=t_opt_resolve(r,_)).liveOutput,s=r.captureOutput??r.capture,i=r.captureErr??r.capture;s&&null==n&&(n=!1),r.dir&&(r.cwd=r.dir);var a=t_os__resolveStdio(r);if(null==a[0]&&!1!==r.allowInput){if(r.input)throw t_err_create("options.allowInput (user) and options.input (programmatic) cannot be used simultaneously for synchronous child processes.");a[0]="inherit"}if(null==a[1])if(s){if(n)throw t_err_create("options.captureOutput and options.liveOutput cannot be used simultaneously for synchronous child processes.");a[1]="pipe"}else a[1]=n??1?"inherit":"ignore";if(null==a[2]){i=r.captureErr??!1;var o=r.showErr;if(i&&o)throw t_err_create("options.captureErr and options.showErr cannot be used simultaneously for synchronous child processes.");a[2]=i?"pipe":o??1?"inherit":"ignore"}r.encoding||(r.encoding="utf8"),e&&(t_a_assert(e),t_a_removeNullish(e));try{var u=t_node_child_process().execFileSync(t,e,r);null!=u&&r.trim&&(u=u.trim());var l=r.map??r.mapFn;return l&&(u=l(u)),u}catch(t){if(t_win_is())return t_shell__handleError(t,t=>"ENOENT"===t.code,r);throw t}},t_npm__runCommand=function(t,e){return e||(e={}),null==e.captureOutput&&(e.captureOutput=!1),e.shell=!0,e.filterExtensions=!1,t_os_run("npm",t,e)},t_npm_install=function(t,e,r){return t_npm__runCommand(["install",t,e?"-g":null],r)},t_node_requireLocal=function(t){return require(t_path_abs(t))},t_o_Cache=class{constructor(){this.store={}}get(t,e){return t_o_ensure(this.store,t,e)}remove(t){return delete this.store[t]}delete(t){return this.remove(t)}},t_node__requireDirCache=new t_o_Cache,t_path_join=function(t,e,r){if(t_node_is()){var _=t_node_path().join(String(t),String(e));return r?t_path_ensureTrailingSlash(_):_}throw t_err_nyi()},t_path_ensureEndsWith=function(t,e){return t.endsWith(e)?t:t_path_join(t,e)},t_node_module=t_node__builtInModule("module"),t_node__createRequire=function(t){return t=t_path_ensureEndsWith(t,"node_modules"),t_node_module().createRequire(t)},t_node__requireFromDir=function(t,e){return t_node__requireDirCache.get(t,()=>t_node__createRequire(t))(e)},t_o_setDefaults=function(t,e,r){return e?t_o_ensureMulti(t,e,r):t},t_s__removeStringFromEnd=function(t,e){return t.endsWith(e)?t.substring(0,t.length-e.length):t},t_s__removeRegexFromEnd=function(t,e){var r=t_re_matchEnd(e,t);return r?t.slice(0,r.index):t},t_s_removeFromEnd=function(t,e){if(t_s_is(e))return t_s__removeStringFromEnd(t,e);if(t_re_is(e))return t_s__removeRegexFromEnd(t,e);throw t_err_type(e,1)},t_s_removeTrailing=t_s_removeFromEnd,t_s_splitAtIndex=function(t,e){return[t.slice(0,e),t.slice(e)]},t_js_splitLastExpression=function(t){t=t_s_removeTrailing(t.trim(),";");var e=Math.max(t.lastIndexOf(";"),t.lastIndexOf("\n"));return t_s_splitAtIndex(t,e+1)},t_s_ensureStartsWith=function(t,e){return t.startsWith(e)?t:e+t},t_js_ensureReturn=function(t){var[e,r]=t_js_splitLastExpression(t);return e+t_s_ensureStartsWith(r.trim(),"return ")},t_js__nodeEnableAwait=function(t){return t_node_require("node-repl-await").processTopLevelAwait(t)},t_js_enableAwait=function(t){return t_js__nodeEnableAwait(t)??t},t_s_replace=t_s_replaceAll,t_path_fws=function(t,e){return""===t?t:(!1!==e&&(t=t_path_ensureTrailingSlash(t)),t_s_replace(t,"\\","/"))},t_js_useTitan=function(t){return'require("'+t_path_fws(t_titan_getPackagePath(),!1)+'");\n'+t},t_s_removeAll=function(t,e){return t_s_replaceAll(t,e,"")},t_s_removeMulti=function(t,e){return e.forEach(e=>t=t_s_removeAll(t,e)),t},t_s_removeLineBreaks=function(t){return t_s_removeMulti(t,["\r","\n"])},t_js_inline=function(t){return t_s_removeLineBreaks(t_js_removeComments(t))},t_js_enhance=function(t,e,r){return(e||r)&&(e||(e={}),r&&t_o_setDefaults(e,r),e.ensureReturn&&(t=t_js_ensureReturn(t)),e.topLevelAwait&&(t=t_js_enableAwait(t)),e.useTitan&&(t=t_js_useTitan(t)),e.keepAlive&&(t="\nsetInterval(()=>{}, 100000);\n"+t),(e.logErrors||e.keepAlive)&&(t="process.on('uncaughtException', console.error);\nprocess.on('unhandledRejection', console.error);\n"+t),e.inline&&(t=t_js_inline(t))),t},t_s_ensure=function(t){return t_s_is(t)?t:t_s_from(t)},t_f_isArrowString=function(t){var e=t.indexOf("{");return-1===e||t.slice(0,e).includes("=>")},t_s__indexWithIndices=function(t,e,r,_,n){return t_s_withIndices(t,e,r,_,(t,e)=>-1===t?-1:void 0===e?t:e+t,n)},t_s_indexOfFn=function(t,e){return Array.prototype.findIndex.call(t,e)},t_s_index=function(t,e,r,_,n){var s=t_s_is(e);return s&&null==_&&!n?t.indexOf(e,r):t_s__indexWithIndices(t,t=>s?t.indexOf(e):t_re_is(e)?t.search(e):t_s_indexOfFn(t,e),r,_,n)},t_s_after=function(t,e,r,_,n){var s=t_s_index(t,e,r,_,n);return-1===s?null:t.slice(s+1,_)},t_s__removeStringFromStart=function(t,e){return t.startsWith(e)?t.substring(e.length):t},t_s_remove=t_s_removeAll,t_re_removeFlag=function(t,e){return t_re_copy(t,t_s_remove(t.flags,e))},t_re_local=function(t){return t_re_removeFlag(t,"g")},t_re_ensureLocal=t_f_memoize(function(t){return t.global?t_re_local(t):t},0),t_re_match=function(t,e,r){return(t=null!=r?t_re_setStartIndex(t,r,e):t_re_ensureLocal(t)).exec(e)},t_re_matchStart=function(t,e){var r=t_re_match(t,e);return r&&0===r.index?r:null},t_s__removeRegexFromStart=function(t,e){var r=t_re_matchStart(e,t);return r?t.slice(r[0].length):t},t_s_removeFromStart=function(t,e){if(t_s_is(e))return t_s__removeStringFromStart(t,e);if(t_re_is(e))return t_s__removeRegexFromStart(t,e);throw t_err_type(e,1)},t_s_removeLeading=t_s_removeFromStart,t_f__getArrowFnBody=function(t){var e=t_s_after(t,"=>").trim();return t_s_removeLeading(t_s_removeTrailing(e,"}"),"{")},t_f__getNormalFnBody=function(t){return t_s_after(t,"{").slice(0,-1)},t_f_body=function(t){var e=t_s_ensure(t);return t_f_isArrowString(e)?t_f__getArrowFnBody(e):t_f__getNormalFnBody(e)},t_s_resolve=function(t){return null==t?"":t_s_is(t)?t:t_f_is(t)?t_f_body(t):String(t)},t_node_run=function(t,e){var r=e?.basic?null:{topLevelAwait:!0,useTitan:!0},_=t_js_enhance(t_s_resolve(t),e,r);return t_os_run("node",[e?.mode??"-p",_],e)},t_v_req=function(t,e,r){if(null==t)throw t_err_req(t,e,r,{fromFn:t_v_req});return t},t_proc_signal=function(t,e){return process.kill(t,t_v_req(e,0,"signalName"))},t_proc_interrupt=function(t){return t_proc_signal(t,"SIGINT")},t_node_interrupt=function(){return t_proc_interrupt(process.pid)},t_node_sigint=t_node_interrupt,t_bool_fromYN=function(t){if("Y"===(t=t.toUpperCase()))return!0;if("N"===t)return!1;throw t_err_value(t,0,"char")},t_node_promptYNSync=function(t){null==t&&(t="Are you sure? [y/n]: "),process.stdout.write(t);var e=t_node_run(function(){const t=process.stdin,e=process.stdout;t.setRawMode(!0),t.setEncoding("utf8"),t.on("data",t=>{var r=t.toUpperCase();"Y"===r||"N"===r?(e.write(t),process.exit(0)):""===t&&(e.write("^C"),process.exit(0))})},{mode:"-e",basic:!0,stdio:["inherit","pipe"]});if("^C"===e)throw process.stdout.write(e),t_node_sigint(),t_err_create("Prompt was cancelled via interrupt.");return console.log(e),t_bool_fromYN(e)},t_o_resolveKeys=function(t){return t_a_is(t)?t:t_s_is(t)?t.split("."):[t]},t_tree_setCustom=function(t,e,r,_,n,s){var i=r;return t_tree_dive(t,e,_,n,s,(t,e,r)=>r(t,e,t_v_resolve(i)))},t_env_setConfig=function(t,e){var r=e,_=globalThis.config;_||(_=globalThis.config={});var n,s=t_o_resolveKeys(t);return s.length>1?n=t_tree_setCustom(_,s,r):(n=t_v_resolve(r),_[s[0]]=n),n},t_node_addRequireDir=function(t,e){return t_env_setConfig("node.require.customDirs",r=>(r||(r=[]),!1!==e&&(t=t_path_ensureEndsWith(t,"node_modules")),r.includes(t)||r.push(t),r)),t},t_node_ensureRequireDir=t_node_addRequireDir,t_o_diveGet=t_tree_dive,t_env_getConfig=function(t){var e=globalThis.config;if(e){var r=t_o_resolveKeys(t);return r.length>1?t_o_diveGet(e,r):e[r[0]]}},t_env_resolveConfig=function(t,e,r){if(null!=t)return t;var _=t_env_getConfig(e);return null!=_?_:r},t_fs_ensureParent=function(t){var e=t_path_dir(t,!1);return t_fs_exists(e)||(e!==t&&t_fs_ensureParent(e),t_node_fs().mkdirSync(String(e))),t},t_fs_mkdir=function(t){return t_fs_ensureParent(t),t_node_fs().mkdirSync(String(t)),t},t_fs_ensureDir=function(t){return t_fs_exists(t)?t:t_fs_mkdir(t)},t_node_require=function(t,e){if(t_npm_isBuiltIn(t))return require(t);if(t_npm_isFile(t))return t_node_requireLocal(t);try{return require(t)}catch(t){}var r=__dirname,_=process.mainModule?.path;if(_!==r)try{return t_node__requireFromDir(_,t)}catch(t){}var n=process.cwd();if(n!==_&&n!==r)try{return t_node__requireFromDir(n,t)}catch(t){}var s=t_env_getConfig("node.require.customDirs");if(s)for(var i of s)try{return t_node__requireFromDir(i,t)}catch(t){}var a=t_env_resolveConfig(e?.autoInstall,"node.require.autoInstall"),o=t_env_resolveConfig(e?.promptInstall,"node.require.promptInstall",!0);if(a||o){var u=a||o;!0===u&&(u="./node_modules"),u=t_path_abs(u);var l=!1;if(a?(l=!0,console.log('Auto-installing "'+t+'" from npm to "'+u+'"...')):(l=t_node_promptYNSync('Npm package "'+t+'" is required. Install now? (Y/N) '))&&console.log('Installing "'+t+'" from npm to "'+u+'"...'),l){u=t_fs_ensureDir(u),t_npm_install(t,!1,{cwd:u});try{return t_node_ensureRequireDir(u),t_node__requireFromDir(u,t)}catch(t){console.error("Failed to load from auto-install dir: ",u)}}}throw t_err_create('Module not found: "'+t+'"',{checked:{moduleDir:r,scriptDir:_,cwd:n}})},t_js_fromAST=function(t,e){return t_node_require("astring").generate(t,e)},t_err_prepend=function(t,e){return t.stack=e+"\n"+t.stack,t},t_js_parse=function(t,e,r){r||(r={}),r.ecmaVersion||(r.ecmaVersion=2024),!1!==e&&(r.sourceType="module"),null==r.allowAwaitOutsideFunction&&(r.allowAwaitOutsideFunction=!0),null==r.allowReturnOutsideFunction&&(r.allowReturnOutsideFunction=!0);var _=t_node_require("acorn");try{return _.parse(t,r)}catch(e){throw t_err_prepend(e,"Acorn parsing error: "+t)}},t_js_removeComments=function(t,e,r){return t_js_fromAST(t_js_parse(t,e,r))},t_re_quote=/(['"])(.*?)\1/,t_re_quotes=t_re_global(t_re_quote),t_s_removeQuotes=function(t){return t.replace(t_re_quotes,"")},t_js_removeQuotes=t_s_removeQuotes,t_tree_copy=function(t){return globalThis.structuredClone(t)},t_o_deepCopy=t_tree_copy,t_f_cache=t_f_memoize,t_re_newline=/\r?\n/,t_v_isEmpty=function(t){return null==t||void 0!==t.length&&0===t.length},t_a_removeEmpty=function(t,e){return t_a_removeByFilter(t,t_v_isEmpty)},t_a_removeIndex=function(t,e){return t.splice(e,1),t},t_a_apply=function(t,e,r,_){[r,_]=t_a_resolveIndices(t,r,_);for(var n=r;n<_;n++){var s=e(t[n],n,t);void 0!==s&&(t[n]=s)}return t},t_a_mapToObj=function(t,e,r){for(var _={},n=t.length,s=0;s<n;s++){var i=e(t[s],s,t);if(i){var[a,o]=i;r?(_[a]||(_[a]=[]),_[a].push(o)):_[a]=o}}return _},t_a_slice=function(t,e,r,_){return[e,r]=t_a_resolveIndices(t,e,r,_),t.slice(e,r)},t_s_repeat=function(t,e){return t_a_create(e,t).join("")},t_re_text=function(t){return t?t[0]:null},t_s__splitByMatch=function(t,e){var r=null==e?-1:e.index;if(-1===r)return[t];var _=t_s_splitAtIndex(t,r);return _[1]=_[1].slice(e[0].length),_},t_s__matchWithIndices=function(t,e,r,_,n){return t_s_withIndices(t,e,r,_,(e,r)=>null===e?null:(e.input=t,void 0!==r&&(e.index+=r),e),n)},t_a_pushThroughMulti=function(t,e){return t.splice(t.length,0,...e),e},t_a_addMulti=function(t,e){return t_a_pushThroughMulti(t,e),t},t_a_pushMulti=t_a_addMulti,t_re_RegexResult=class extends Array{constructor(t,e,r,_,n){if(-1===e)throw t_err_create("RegexResult index cannot be -1. For empty result, use bare null.");if(null==t)throw t_err_create("RegexResult matchString cannot be null. For empty result, use bare null.");super(),this[0]=t,_&&t_a_pushMulti(this,_),this.index=e,this.input=r,n&&(this.groups=n)}fromParts(t){var e=t;return new t_re_RegexResult(e.match,e.index,e.input,e.captures,e.groups)}},t_re_createResult=function(t,e,r,_,n){return new t_re_RegexResult(t,e,r,_,n)},t_re_safeCreateResult=function(t,e,r,_,n){return-1===e||null==t?null:t_re_createResult(t,e,r,_,n)},t_s_match=function(t,e,r,_,n){return t_s__matchWithIndices(t,t=>{if(t_s_is(e)){var r=t.indexOf(e);return t_re_safeCreateResult(e,r,t)}return t_re_match(e,t)},r,_,n)},t_s_splitFirst=function(t,e,r,_,n){return t_s__splitByMatch(t,t_s_match(t,e,r,_,n))},t_n_tryParse=t_n_ensure,t_n_tryCoerce=function(t){return t_n_tryParse(t)??t},t_o_fromLines=function(t,e){null==e&&(e="=");var r={};return t.forEach(function(t){var[_,n]=t_s_splitFirst(t,e);null!=n&&(n=t_n_tryCoerce(n.trim())),r[_.trim()]=n}),r},t_o_safeDefault=t_o_safeEnsure,t_s_LinesArray=class extends Array{constructor(t){var e,r=t;null!=r&&(t_a_is(r)?e=r:t_s_is(r)&&(e=r.split(t_re_newline))),e?(super(e.length),Object.assign(this,e)):super(...arguments)}condense(t){return this.trim().removeEmpty(),t&&this.removeComments(t),this}trim(){return this.apply(t=>t.trim())}removeEmpty(){return t_a_removeEmpty(this)}removeComments(t){for(var e=0;e<this.length;e++){var r=this[e],_=r.indexOf(t);-1!==_&&(""===(r=r.slice(0,_)).trim()?(t_a_removeIndex(this,e),e--):this[e]=r)}return this}removeFirst(){return this.shift(),this}removeLast(){return this.pop(),this}apply(t){return t_a_apply(this,t)}join(){return super.join("\n")}toObj(t){return t_o_fromLines(this,t)}mapToObj(t,e){return t_a_mapToObj(this,t,e)}between(t,e,r){return r=t_o_safeDefault(r,"inclusiveEnd",!0),t_a_slice(this,t,e,r)}normalize(){if(this.length>0&&(""===this[0].trim()&&this.shift(),this.length>0&&(""===t_a_last(this).trim()&&this.pop(),this.length>0))){var t=this.find(t=>""!==t.trim()),e=t_re_text(t_re_match(/^\s*/,t));if(e){var r=e.length;this.apply(t=>{if(t.startsWith(e))return t.slice(r)})}}return this}deindent(t,e,r){throw t_err_nyi()}indent(t,e){var r=t_s_repeat(e??"\t",t??1);return this.apply(t=>r+t)}static is(t){return t_v_constructorMatches(t,this)}static fromChunks(t){return t.map(t=>t_s_removeTrailing(t,t_re_newline)).flatMap(t=>t_s_splitLines(t,!1))}},t_s_lines=function(t,e){var r=new t_s_LinesArray(t);return e&&r.condense(),r},t_s_splitLines=function(t,e,r){var _=t.split(t_re_newline);return e?t_s_lines(_,r):_},t_fs_loadLines=function(t,e){return t_s_splitLines(t_fs_loadText(t),!0,e)},t_re_test=function(t,e){return t_re_ensureLocal(t).test(e)},t_s_contains=function(t,e){return t_re_is(e)?t_re_test(e,t):t.includes(e)},t_s__createParamsObj=function(t,e,r,_){null==t&&(t=""),null==e&&(e="");var n={},s=(r,_)=>n[t+r+e]=_;return _&&t_o_each(_,s),r&&t_o_each(r,s),n},t_s__replaceByObj=function(t,e){return t_o_each(e,(e,r)=>t=t_s_replaceAll(t,e,r)),t},t_s_replaceParams=function(t,e,r,_){var n,s,i=_?.paramIdentifier??"$";if(i)if(t_s_is(i)){if(!t_s_contains(t,i))return t;n=i}else{if(!t_a_is(i))throw t_err_type(i,1,"paramIdentifier");if([n,s]=i,!t_s_contains(t,n)&&!t_s_contains(t,s))return t}var a=t_s__createParamsObj(n,s,e,r);return t_s__replaceByObj(t,a)},t_path_string=function(t){return t_s_is(t)?t:String(t)},t_path_windir=globalThis.process?.env.windir,t_path_getUserDir=function(t){if(t)throw t_err_nyi();return t_node_os().homedir()+t_path_sep},t_path_getDesktop=function(t){return t_path_getUserDir(t)+"Desktop/"},t_path__defaultParams={PROGRAMFILES:globalThis.process?.env.ProgramFiles,WINDIR:t_path_windir,SYSTEM32:t_path_windir&&t_path_windir+"System32",TEMP:t_path__getDefaultTempDir(),DESKTOP:t_path_getDesktop()},t_path_resolveVars=function(t,e){return t_s_replaceParams(t_path_string(t),e,t_path__defaultParams)},t_titan_locateSourceMap=function(){return t_titan_locate()+"Source/SourceMap.txt"},t_titan__resolveSourceMapPath=function(t){return t?t_path_resolveVars(t,{TITAN:t_titan_locate()}):t_titan_locateSourceMap()},t_s_before=function(t,e,r,_,n){var s=t_s_index(t,e,r,_,n);return-1===s?null:t.slice(r,s)},t_s_isCapitalized=function(t){var e=t[0];return e===e.toUpperCase()},t_a_filterSplit=function(t,e){var r=[],_=[];return t.forEach((n,s)=>(e(n,s,t)?r:_).push(n)),[r,_]},t_titan_loadGlobalsMap=t_f_cache(function(t){var e=t_fs_loadLines(t_titan__resolveSourceMapPath(t),!0),r={};return e.forEach(t=>{var e=t_s_before(t,"=").split(",").map(t=>t.trim()),[_,n]=t_a_filterSplit(e,t=>!t_s_isCapitalized(t)),s=_[0];if(!s)throw t_err_create('No shortName in SourceMap line: "'+t+'"');n.forEach(t=>{r[t]=s})}),r},0),t_titan__getGlobalsRegex=t_f_one(function(t){var e=Object.keys(t);return t_re_create("\\b("+e.join("|")+")\\.(\\w+)","g")}),t_titan_depsRegex=/\bt\.(\w+)\.(\w+)/g,t_titan__getDepsBasic=function(t,e){e||(e={});var r={},_=r.t={};if(e.enableGlobals){var n;n=e.additionalGlobals?t_o_deepCopy(e.additionalGlobals):{},r.globals=n;var s=t_titan_loadGlobalsMap(),i=t_titan__getGlobalsRegex(s),a=t_re_matchAll(i,t).filter(e=>{var r=e[1],_=e[2],n=t[e.index-1];if("."===n||"_"===n)return!1;var s=globalThis[r];return!s||void 0===s[_]});for(var[o,u,l]of a)n[u]||(n[u]={}),n[u][l]=!0;var c=a.map(([t,e,r])=>{var _=s[e];if(!_)throw t_err_create("No short name found for global: "+e);return"t."+_+"."+r+";"}).join(" ");t+="\n"+c}for(var[o,f,l]of a=t.matchAll(t_titan_depsRegex))_[f]||(_[f]={}),_[f][l]=!0;return r},t_titan_getDepsFromJS=function(t,e){return t=t_js_removeComments(t),t=t_js_removeQuotes(t),t_titan__getDepsBasic(t,e)},t_titan_getDepsFromHTML=function(t,e){return t_titan__getDepsBasic(t,e)},t_titan_getShallowDeps=function(t,e,r){if(e){if("js"===(e=e.toLowerCase()))return t_titan_getDepsFromJS(t,r);if("html"===e)return t_titan_getDepsFromHTML(t,r)}return t_titan__getDepsBasic(t,r)},t_o_has=function(t,e){return e in t},t_o_hasKey=t_o_has,t_tree_isSubsetOf=function(t,e){for(var r of(t_v_req(e,1),Object.keys(t))){if(!t_o_hasKey(e,r))return!1;var _=t[r];if(_&&_.constructor===Object&&!t_tree_isSubsetOf(_,e[r]))return!1}return!0},t_titan_jsonHasNewDeps=function(t,e){if(!t_tree_isSubsetOf(e.t,t))return!0;if(e.globals){var r=t._meta?.globals;if(!r)return!0;if(!t_tree_isSubsetOf(e.globals,r))return!0}return!1},t_titan_needsToPack=function(t,e,r,_){var n,s,i,a;_||(_={}),t&&(t=t_path_abs(t)),n=_.packagePath?t_path_abs(_.packagePath):t_titan_getPackagePath(t,!1,!0,_);var o,u=t_fs_exists(n);u?(s=t_titan_hasNewCompile(n))?i="New compile":(null==e&&(e=t_fs_loadText(t)),a=t_titan_getShallowDeps(e,"js",_),(o=t_titan_jsonHasNewDeps(r,a))&&(i="New deps")):i="No package";var l={needsPack:!!i,scriptPath:t,packagePath:n};return i&&(l.reasonText=i),null!=u&&(l.exists=u),null!=s&&(l.newCompile=s),null!=o&&(l.newDeps=o),e&&(l.sourceText=e),a&&(l.shallowDeps=a),l},t_path_isDir=function(t){return t_s_endsWith(t,t_re_slash)},t_re_lastIndex=function(t,e){var r=t_re_matchLast(t,e);return r?r.index:-1},t_path_dirPart=function(t){var e=t_re_lastIndex(t_re_slash,t);return-1===e?null:t.slice(0,e+1)},t_path_ignoreDir=function(t,e,r){if(t_path_isDir(t))return r?[t,null]:t;var _,n,s=t_path_dirPart(t),i=e(t_path_file(t),s,t);return r?[_,n]=i:_=i,null!=_&&(t=s?s+_:_),r?[t,n]:t},t_s_matchLast=function(t,e,r,_,n){return t_s__matchWithIndices(t,t=>{if(t_re_is(e))return t_re_matchLast(e,t);if(t_s_is(e)){var r=t.lastIndexOf(e);return-1!==r?new t_re_RegexResult(e,r):null}throw t_err_type(e,1)},r,_,n)},t_s_splitLast=function(t,e,r,_,n){return t_s__splitByMatch(t,t_s_matchLast(t,e,r,_,n))},t_path_splitExt=function(t){return t_path_ignoreDir(t,t=>t_s_splitLast(t,"."),!0)},t_path_ext=function(t,e){var r=t_path_splitExt(t)[1];return r?!1!==e?r.toLowerCase():r:null},t_titan_sourceMap={},t_titan_loadSourceMap=t_f_cache(function(t){t=t_titan__resolveSourceMapPath(t);var e=t_path_dir(t)+"../Compiled/Newest/",r=t_fs_loadLines(t,"//"),_=t_titan_sourceMap;for(var n of r){var s=n.indexOf("="),i=n.slice(0,s).trim();i=i.split(",").map(t=>t.trim()).filter(t=>!t_s_isCapitalized(t));var a=n.slice(s+1).trim(),o=t_path_join(e,a).replaceAll("\\","/");for(var u of i)_[u]=o}return _},0),t_titan_getDeps=function(t,e){var r=e?.fileType;if(r){if("js"===(r=r.toLowerCase()))return t_titan_getDepsFromJS(t,e);if("html"===r)return t_titan_getDepsFromHTML(t,e)}return t_titan__getDepsBasic(t,e)},t_gen_filter=function*(t,e){var r=0;for(var _ of t)e(_,r++,t)&&(yield _)},t_a_copy=function(t){return t.slice()},t_args_insert=function(t,e,r){for(var _=t.length-1;_>=e;_--)t[_+1]=t[_];return t[e]=r,t.length++,t},t_args_append=function(t,e){return t_args_insert(t,t.length,e)},t_args_push=t_args_append,t_f_recurse=function(t,e){return t.call(this,...e,function e(){return t_a_last(arguments)!==e&&t_args_push(arguments,e),t.apply(this,arguments)})},t_tree_iterator=function(t){t||(t={});var e=t.getKeys;e||(e=function(t){return Object.keys(t)});var r=t.recurseIf;if(!r){var _=this.constructor;r=t=>t_v_constructorMatches(t,_)||t_o_isPure(t)||t_a_is(t)}var n=t.leavesOnly??t.leafsOnly??!1,s=this;return t_f_recurse(function*(t,_,i,a){var o=e(t,_,i);if(o)for(var u=o.length,l=0;l<u;l++){var c=o[l],f=t[c],p=t_a_copy(_);p.push(c);var d=null,m={value:f,key:c,object:t,path:p,level:i,isLeaf:d,root:s},h=r(f,m);m.isLeaf=d=!h,n&&!d||(yield m),h&&(yield*a(f,p,i+1,a))}},[this,[],0])},t_tree_iterate=function(t,e){return t_tree_iterator.call(t,e)},t_o_fromKeys=function(t,e){1===arguments.length&&(e=!0);var r={};for(var _ of t)r[_]=e;return r},t_js_eachNode=function(t,e,r,_){var n=t_js_parse(t,e,_);t_node_require("acorn-walk").full(n,r)},t_js_getNodes=function(t,e,r,_){var n;if(t_s_is(r))n=t=>t.type===r;else if(t_a_is(r)){var s=t_o_fromKeys(r);n=t=>s[t.type]}else n=r;var i=[];return t_js_eachNode(t,e,function(t){n.apply(this,arguments)&&i.push(t)},_),i},t_js_fromASTNode=t_js_fromAST,t_js_parseDeclaration=function(t){var e,r,_,n=t,s=t_s_is(n)?t_js_parse(n).body[0]:n,i=s.type;if("VariableDeclaration"===i){e="variable";var a=s.declarations[0];r=a.id.name,_=a.init?a.init.raw??t_js_fromAST(a.init):"undefined"}else"FunctionDeclaration"===i?e="function":"ClassDeclaration"===i&&(e="class"),r=s.id.name;var o={type:e,name:r};return _&&(o.value=_),o.text=t_js_fromASTNode(s),o.node=s,o},t_js_getExports=function(t){return t_js_getNodes(t,!0,["ExportNamedDeclaration","ExportDefaultDeclaration"]).map(function(t){var e=t.declaration;if(e){var r=t_js_parseDeclaration(e);return r.node=t,r}return{node:t}})},t_titan__getAllDeps=function(t,e){e||(e={});var r=e.enableGlobals,_=t_titan_loadSourceMap(e.sourceMap),n={},s=[];return function t(e,i){var a=t_gen_filter(t_tree_iterate(e),t=>t.isLeaf);for(var o of a){var[u,l]=o.path,c=n[u];if(c||(c=n[u]={}),null==c[l]){var f=_[u];if(f){var p=t_path_fws(f)+l+".js";if(!t_fs_exists(p)){var d='Titan compiled value "t.'+u+"."+l+'" does not exist';throw i&&(d+=' (called by "'+i+'")'),t_err_create(d+=".")}var m=t_fs_load(p),h=t_js_getExports(m)[0];c[l]=h;var v="t."+u+"."+l;t(t_titan_getDeps(m,{fileType:"js",enableGlobals:r}).t,v),s.push([u,l])}else console.log('Skipping unmapped module "'+u+'"'),c[l]=!1}}}(t.t),{t:n,globals:t.globals,order:s}},t_titan_packTextToJSON=function(t,e){e||(e={});var r=e.deps??t_titan_getShallowDeps(t,e.fileType,e),{t:_,globals:n,order:s}=t_titan__getAllDeps(r,e),i={};if(i.t=r.t,n&&e.enableGlobals){i.globals=n;var a=t_titan_loadGlobalsMap(),o=Object.keys(n),u=t_a_mapToObj(o,t=>[a[t],t],!0);i.shortNamesToGlobals=u}return i.itemsInOrder=s.map(([t,e])=>{var r=_[t][e];return[t,e,"variable"===r.type?r.value:"("+r.text+")"]}),i},t_tree_join=function(t,e,r){return null==r&&(r=!0),t_f_recurse(function(t,e,_){t_o_each(t,function(t,n){if(t_o_hasKey(e,t)){var s=e[t];r?t_o_is(s)&&t_o_is(n)?_(n,s):e[t]=n:t_o_is(s)&&_(n,s)}else e[t]=n})},[t,e]),e},t_tree_merge=t_tree_join,t_o_fromArray=function(t){return Object.assign({},t)},t_a_toObj=function(t,e){if(e){var r={};return t.forEach((t,_,n)=>r[e(t,_,n)]=!0),r}return t_o_fromArray(t)},t_titan_addNewItemsToJSON=function(t,e){t_tree_merge(e.t,t.t,!1);var r=e.globals;if(r){var _=t.globals;_?t_tree_merge(r,_,!1):t.globals=r,t.shortNamesToGlobals=e.shortNamesToGlobals}var n=t_a_toObj(t.itemsInOrder,t=>t[0]+"."+t[1]);return e.itemsInOrder.forEach(e=>{n[e[0]+"."+e[1]]||t.itemsInOrder.push(e)}),t},t_bin_isNodeBuffer=function(t){return t instanceof Buffer},t_ab_isTA=function(t){return ArrayBuffer.isView(t)},t_bin_isTA=t_ab_isTA,t_bin_isByteSafe=function(t){return t_bin_isNodeBuffer(t)||t_bin_isTA(t)||t_s_is(t)},t_ab_is=function(t){return t.constructor===ArrayBuffer},t_bin_ensureByteSafe=function(t){return t_bin_isByteSafe(t)?t:t_ab_is(t)?Buffer.from(t):t_s_from(t)},t_fs_formatRaw=function(t){return t_n_is(t)?String(t):t_bin_ensureByteSafe(t)},t_fs_write=function(t,e){return t_fs_ensureParent(t),t_node_fs().writeFileSync(String(t),t_fs_formatRaw(e)),t},t_json_stringify=function(t,e){var r;return e||(e={}),r=e.condensed?0:null!=e.whitespace?e.whitespace:"\t",JSON.stringify(t,e.replacer,r)},t_fs_writeJSON=function(t,e,r){return t_fs_write(t,t_json_stringify(e,r))},t_titan_packTextToJSONFile=function(t,e,r){r||(r={}),r.deps||r.fileType||!e||(r.fileType=t_path_ext(e));var _=t_titan_packTextToJSON(t,r),n=r.packagePath||t_titan_getPackagePath(e,r.repl,!0,r);if(r.dynamic&&(r.packageExists??t_fs_exists(n))&&!(r.newCompile??t_titan_hasNewCompile(n))){var s=t_fs_loadJSON(n);_=t_titan_addNewItemsToJSON(s,_)}return t_fs_writeJSON(n,_),n},t_titan_autoPackAndLoadJSON=function(t,e,r,_){var n=t_titan_needsToPack(t,e,r,_);return n.needsPack&&(_.onPack&&_.onPack(n.reasonText),e=n.sourceText??t_fs_loadText(t),_.packagePath=n.packagePath,_.packageExists=n.exists,_.newCompile=n.newCompile,_.deps=n.shallowDeps,t_titan_packTextToJSONFile(e,t,_),t_titan__loadDynamicDeps(n.packagePath,r,_)),r},newItems={node:{getScriptPath:t_node_getScriptPath,positionalArgs:t_node_positionalArgs,args:t_node_args,fs:t_node_fs,_builtInModule:t_node__builtInModule,requireBuiltIn:t_node_requireBuiltIn,os:t_node_os,path:t_node_path,is:t_node_is,display:t_node_display,util:t_node_util,getScriptDir:t_node_getScriptDir,require:t_node_require,_basicRequire:t_node__basicRequire,child_process:t_node_child_process,requireLocal:t_node_requireLocal,_requireFromDir:t_node__requireFromDir,_requireDirCache:t_node__requireDirCache,_createRequire:t_node__createRequire,module:t_node_module,promptYNSync:t_node_promptYNSync,run:t_node_run,sigint:t_node_sigint,interrupt:t_node_interrupt,ensureRequireDir:t_node_ensureRequireDir,addRequireDir:t_node_addRequireDir},cli:{positionalArgs:t_cli_positionalArgs,resolveArgs:t_cli_resolveArgs,splitArgs:t_cli_splitArgs},env:{args:t_env_args,setConfig:t_env_setConfig,getConfig:t_env_getConfig,resolveConfig:t_env_resolveConfig},f:{one:t_f_one,is:t_f_is,memoize:t_f_memoize,MemoizedFunction:t_f_MemoizedFunction,createClass:t_f_createClass,ensureConstructor:t_f_ensureConstructor,createConstructor:t_f_createConstructor,isArrowFn:t_f_isArrowFn,isArrow:t_f_isArrow,wrap:t_f_wrap,retThis:t_f_retThis,setName:t_f_setName,not:t_f_not,body:t_f_body,isArrowString:t_f_isArrowString,_getArrowFnBody:t_f__getArrowFnBody,_getNormalFnBody:t_f__getNormalFnBody,cache:t_f_cache,recurse:t_f_recurse},s:{is:t_s_is,isAny:t_s_isAny,isPrimitive:t_s_isPrimitive,isObject:t_s_isObject,decapitalize:t_s_decapitalize,endsWith:t_s_endsWith,chars:t_s_chars,resolveIndex:t_s_resolveIndex,toLiteral:t_s_toLiteral,quote:t_s_quote,escape:t_s_escape,replaceAll:t_s_replaceAll,apply:t_s_apply,withIndices:t_s_withIndices,from:t_s_from,removeTrailing:t_s_removeTrailing,removeFromEnd:t_s_removeFromEnd,_removeStringFromEnd:t_s__removeStringFromEnd,_removeRegexFromEnd:t_s__removeRegexFromEnd,splitAtIndex:t_s_splitAtIndex,ensureStartsWith:t_s_ensureStartsWith,replace:t_s_replace,removeLineBreaks:t_s_removeLineBreaks,removeMulti:t_s_removeMulti,removeAll:t_s_removeAll,resolve:t_s_resolve,ensure:t_s_ensure,after:t_s_after,index:t_s_index,_indexWithIndices:t_s__indexWithIndices,indexOfFn:t_s_indexOfFn,removeLeading:t_s_removeLeading,removeFromStart:t_s_removeFromStart,_removeStringFromStart:t_s__removeStringFromStart,_removeRegexFromStart:t_s__removeRegexFromStart,remove:t_s_remove,removeQuotes:t_s_removeQuotes,splitLines:t_s_splitLines,lines:t_s_lines,LinesArray:t_s_LinesArray,repeat:t_s_repeat,splitFirst:t_s_splitFirst,_splitByMatch:t_s__splitByMatch,match:t_s_match,_matchWithIndices:t_s__matchWithIndices,replaceParams:t_s_replaceParams,contains:t_s_contains,_createParamsObj:t_s__createParamsObj,_replaceByObj:t_s__replaceByObj,before:t_s_before,isCapitalized:t_s_isCapitalized,splitLast:t_s_splitLast,matchLast:t_s_matchLast},fs:{loadText:t_fs_loadText,load:t_fs_load,getID:t_fs_getID,stat:t_fs_stat,deepStat:t_fs_deepStat,shallowStat:t_fs_shallowStat,exists:t_fs_exists,getModifiedDate:t_fs_getModifiedDate,loadJSON:t_fs_loadJSON,ensureDir:t_fs_ensureDir,mkdir:t_fs_mkdir,ensureParent:t_fs_ensureParent,loadLines:t_fs_loadLines,writeJSON:t_fs_writeJSON,write:t_fs_write,formatRaw:t_fs_formatRaw},titan:{getTempDir:t_titan_getTempDir,getPackagePath:t_titan_getPackagePath,getPackageName:t_titan_getPackageName,hasNewCompile:t_titan_hasNewCompile,getLastCompileTime:t_titan_getLastCompileTime,getCompiledDir:t_titan_getCompiledDir,locate:t_titan_locate,_loadDynamicDeps:t_titan__loadDynamicDeps,_trackGlobals:t_titan__trackGlobals,autoPackAndLoadJSON:t_titan_autoPackAndLoadJSON,needsToPack:t_titan_needsToPack,getShallowDeps:t_titan_getShallowDeps,getDepsFromJS:t_titan_getDepsFromJS,_getDepsBasic:t_titan__getDepsBasic,loadGlobalsMap:t_titan_loadGlobalsMap,_resolveSourceMapPath:t_titan__resolveSourceMapPath,locateSourceMap:t_titan_locateSourceMap,_getGlobalsRegex:t_titan__getGlobalsRegex,depsRegex:t_titan_depsRegex,getDepsFromHTML:t_titan_getDepsFromHTML,jsonHasNewDeps:t_titan_jsonHasNewDeps,packTextToJSONFile:t_titan_packTextToJSONFile,packTextToJSON:t_titan_packTextToJSON,_getAllDeps:t_titan__getAllDeps,loadSourceMap:t_titan_loadSourceMap,sourceMap:t_titan_sourceMap,getDeps:t_titan_getDeps,addNewItemsToJSON:t_titan_addNewItemsToJSON},path:{getTempDir:t_path_getTempDir,_getDefaultTempDir:t_path__getDefaultTempDir,sep:t_path_sep,baseName:t_path_baseName,_removeExtsFromFile:t_path__removeExtsFromFile,file:t_path_file,dir:t_path_dir,ensureTrailingSlash:t_path_ensureTrailingSlash,abs:t_path_abs,ensureEndsWith:t_path_ensureEndsWith,join:t_path_join,fws:t_path_fws,resolveVars:t_path_resolveVars,string:t_path_string,_defaultParams:t_path__defaultParams,windir:t_path_windir,getDesktop:t_path_getDesktop,getUserDir:t_path_getUserDir,ext:t_path_ext,splitExt:t_path_splitExt,ignoreDir:t_path_ignoreDir,isDir:t_path_isDir,dirPart:t_path_dirPart},err:{nyi:t_err_nyi,NYIError:t_err_NYIError,Error:t_err_Error,Enhanced:t_err_Enhanced,defaultFromFn:t_err_defaultFromFn,type:t_err_type,TypeError:t_err_TypeError,create:t_err_create,req:t_err_req,value:t_err_value,ValueError:t_err_ValueError,prepend:t_err_prepend},o:{safeEnsure:t_o_safeEnsure,ensure:t_o_ensure,constructorMatches:t_o_constructorMatches,is:t_o_is,isAny:t_o_isAny,setHidden:t_o_setHidden,addNonEnumerable:t_o_addNonEnumerable,defineProperty:t_o_defineProperty,weakAssign:t_o_weakAssign,merge:t_o_merge,hideKey:t_o_hideKey,makeNonEnumerable:t_o_makeNonEnumerable,ensureCustom:t_o_ensureCustom,get:t_o_get,set:t_o_set,createEmpty:t_o_createEmpty,remove:t_o_remove,display:t_o_display,toLiteral:t_o_toLiteral,isPure:t_o_isPure,reduce:t_o_reduce,each:t_o_each,keys:t_o_keys,allKeys:t_o_allKeys,setLazy:t_o_setLazy,setGetterAndSetter:t_o_setGetterAndSetter,addGetterAndSetter:t_o_addGetterAndSetter,replaceGetterAndSetter:t_o_replaceGetterAndSetter,safeSetDefaults:t_o_safeSetDefaults,safeEnsureMulti:t_o_safeEnsureMulti,ensureMulti:t_o_ensureMulti,Cache:t_o_Cache,setDefaults:t_o_setDefaults,resolveKeys:t_o_resolveKeys,diveGet:t_o_diveGet,deepCopy:t_o_deepCopy,fromLines:t_o_fromLines,safeDefault:t_o_safeDefault,hasKey:t_o_hasKey,has:t_o_has,fromKeys:t_o_fromKeys,fromArray:t_o_fromArray},re:{is:t_re_is,matchEnd:t_re_matchEnd,matchLast:t_re_matchLast,matchAll:t_re_matchAll,setStartIndex:t_re_setStartIndex,copy:t_re_copy,updateFlagString:t_re_updateFlagString,parseFlagString:t_re_parseFlagString,createFlagString:t_re_createFlagString,ensureGlobal:t_re_ensureGlobal,global:t_re_global,addFlag:t_re_addFlag,createEscaped:t_re_createEscaped,create:t_re_create,resolveFlags:t_re_resolveFlags,escape:t_re_escape,slash:t_re_slash,matchStart:t_re_matchStart,match:t_re_match,ensureLocal:t_re_ensureLocal,local:t_re_local,removeFlag:t_re_removeFlag,quotes:t_re_quotes,quote:t_re_quote,newline:t_re_newline,text:t_re_text,safeCreateResult:t_re_safeCreateResult,createResult:t_re_createResult,RegexResult:t_re_RegexResult,test:t_re_test,lastIndex:t_re_lastIndex},v:{constructorMatches:t_v_constructorMatches,isPrimitive:t_v_isPrimitive,resolve:t_v_resolve,type:t_v_type,display:t_v_display,toLiteral:t_v_toLiteral,nullIfNaN:t_v_nullIfNaN,req:t_v_req,isEmpty:t_v_isEmpty},a:{last:t_a_last,resolveIndex:t_a_resolveIndex,is:t_a_is,ensure:t_a_ensure,pick:t_a_pick,create:t_a_create,fill:t_a_fill,resolveIndices:t_a_resolveIndices,push:t_a_push,add:t_a_add,splitLast:t_a_splitLast,splitTail:t_a_splitTail,wrapIndices:t_a_wrapIndices,wrapIndex:t_a_wrapIndex,toLiteral:t_a_toLiteral,display:t_a_display,assert:t_a_assert,removeNullish:t_a_removeNullish,removeByFilter:t_a_removeByFilter,replaceContents:t_a_replaceContents,removeEmpty:t_a_removeEmpty,removeIndex:t_a_removeIndex,apply:t_a_apply,mapToObj:t_a_mapToObj,slice:t_a_slice,pushMulti:t_a_pushMulti,addMulti:t_a_addMulti,pushThroughMulti:t_a_pushThroughMulti,filterSplit:t_a_filterSplit,copy:t_a_copy,toObj:t_a_toObj},class:{create:t_class_create,setName:t_class_setName,addStatics:t_class_addStatics,setDisplay:t_class_setDisplay},p:{asyncJoint:t_p_asyncJoint,is:t_p_is},sym:{display:t_sym_display,value:t_sym_value},macro:{config:t_macro_config},map:{Cache:t_map_Cache,ensure:t_map_ensure,get:t_map_get,set:t_map_set,MultiCache:t_map_MultiCache,diveEnsure:t_map_diveEnsure,createEmpty:t_map_createEmpty,diveDelete:t_map_diveDelete,remove:t_map_remove},args:{ensureArray:t_args_ensureArray,push:t_args_push,append:t_args_append,insert:t_args_insert},tree:{ensure:t_tree_ensure,dive:t_tree_dive,remove:t_tree_remove,setCustom:t_tree_setCustom,copy:t_tree_copy,isSubsetOf:t_tree_isSubsetOf,iterate:t_tree_iterate,iterator:t_tree_iterator,merge:t_tree_merge,join:t_tree_join},d:{from:t_d_from,create:t_d_create,resolve:t_d_resolve,now:t_d_now,ensure:t_d_ensure,copy:t_d_copy,fromYear:t_d_fromYear,_resolveNative:t_d__resolveNative,isBefore:t_d_isBefore},n:{fromString:t_n_fromString,ensure:t_n_ensure,is:t_n_is,tryCoerce:t_n_tryCoerce,tryParse:t_n_tryParse},js:{removeComments:t_js_removeComments,fromAST:t_js_fromAST,enhance:t_js_enhance,ensureReturn:t_js_ensureReturn,splitLastExpression:t_js_splitLastExpression,enableAwait:t_js_enableAwait,_nodeEnableAwait:t_js__nodeEnableAwait,useTitan:t_js_useTitan,inline:t_js_inline,parse:t_js_parse,removeQuotes:t_js_removeQuotes,getExports:t_js_getExports,getNodes:t_js_getNodes,eachNode:t_js_eachNode,parseDeclaration:t_js_parseDeclaration,fromASTNode:t_js_fromASTNode},npm:{isBuiltIn:t_npm_isBuiltIn,isFile:t_npm_isFile,install:t_npm_install,_runCommand:t_npm__runCommand},os:{run:t_os_run,_resolveStdio:t_os__resolveStdio},opt:{resolve:t_opt_resolve},win:{is:t_win_is},shell:{_handleError:t_shell__handleError},proc:{interrupt:t_proc_interrupt,signal:t_proc_signal},bool:{fromYN:t_bool_fromYN},gen:{filter:t_gen_filter},bin:{ensureByteSafe:t_bin_ensureByteSafe,isByteSafe:t_bin_isByteSafe,isNodeBuffer:t_bin_isNodeBuffer,isTA:t_bin_isTA},ab:{isTA:t_ab_isTA,is:t_ab_is},json:{stringify:t_json_stringify}};globalThis.t?Object.keys(newItems).forEach(function(e){if(t[e]){var r=newItems[e];Object.keys(r).forEach(function(_){t[e][_]=r[_]})}else t[e]=newItems[e]}):globalThis.t=Object.assign({},newItems),globalThis.exports&&(exports.default=globalThis.t);
1
+ var t_f_one=function(t){var e,r=!1;return function(){return r||(r=!0,e=t.apply(this,arguments)),e}},t_node_args=t_f_one(function(){return process.argv.slice(2)}),t_env_args=t_node_args,t_s_isPrimitive=function(t){return"string"==typeof t},t_s_isObject=function(t){return t instanceof String},t_s_isAny=function(t){return t_s_isPrimitive(t)||t_s_isObject(t)},t_s_is=t_s_isAny,t_cli_splitArgs=function(t,e){const r=[];let _="",n="outside",s=!1;for(let i=0;i<t.length;i++){const a=t[i];switch(n){case"outside":'"'===a?s?(_+=a,s=!1):(e&&(_+=a),n="insideQuote"):"\\"===a?s=!0:" "===a?(_.length>0&&(r.push(_),_=""),s=!1):(_+=a,s=!1);break;case"insideQuote":'"'!==a||s?"\\"!==a||s?(_+=a,s=!1):s=!0:(e&&(_+=a),n="outside")}}return _.length>0&&r.push(_),r},t_cli_resolveArgs=function(t,e){var r=t;return null==r?t_env_args():t_s_is(r)?t_cli_splitArgs(r,e):r},t_cli_positionalArgs=function(t,e){return t_cli_resolveArgs(t,e).slice()},t_node_positionalArgs=t_cli_positionalArgs,t_node_getScriptPath=function(){var t=require.main?.filename;return t||(null!=process._eval?null:t_node_positionalArgs(process.argv)[1])},t_node_requireBuiltIn=function(t){return require("node:"+t)},t_node__builtInModule=function(t){return t_f_one(()=>t_node_requireBuiltIn(t))},t_node_fs=t_node__builtInModule("fs"),t_fs_load=function(t){return t_node_fs().readFileSync(String(t),"utf8")},t_fs_loadText=t_fs_load,t_fs_deepStat=function(t,e){return t_node_fs().statSync(String(t),e)},t_fs_shallowStat=function(t,e){return t_node_fs().lstatSync(String(t),e)},t_fs_stat=function(t,e,r){return(e?t_fs_deepStat:t_fs_shallowStat)(t,r)},t_fs_getID=function(t,e){return t_fs_stat(t,e).ino},t_fs_exists=function(t){return!!t_node_fs().lstatSync(String(t),{throwIfNoEntry:!1})},t_err_Enhanced=function(t){return class extends t{constructor(t,e){super(t,e);var r=this.constructor.name;r&&(this.name=r)}}},t_err_Error=t_err_Enhanced(globalThis.Error),t_err_NYIError=class extends t_err_Error{constructor(t,e){super(t??"Not yet implemented",e)}},t_f_is=function(t){return"function"==typeof t},t_o_ensure=function(t,e,r,_){var n=t[e];if(void 0===n){var s=r;!1!==_&&t_f_is(s)&&(s=s(t,e)),t[e]=n=s}return n},t_o_safeEnsure=function(t,e,r,_){return t||(t={}),t_o_ensure(t,e,r,_),t},t_err_defaultFromFn=function(t,e){return t_o_safeEnsure(t,"fromFn",e,!1)},t_err_nyi=function(t,e){return new t_err_NYIError(t,t_err_defaultFromFn(e,t_err_nyi))},t_node_os=t_node__builtInModule("os"),t_node_path=t_node__builtInModule("path"),t_path_sep=t_node_path().sep,t_path__getDefaultTempDir=function(){return t_node_os().tmpdir()+t_path_sep},t_path_getTempDir=function(t){if(t)throw t_err_nyi();return t_path__getDefaultTempDir()},t_titan_getTempDir=function(){return t_path_getTempDir()+"Titan/"},t_s_decapitalize=function(t){return t.charAt(0).toLowerCase()+t.slice(1)},t_path__removeExtsFromFile=function(t){return t.split(".")[0]},t_path_file=function(t){return t_node_path().win32.basename(String(t))},t_path_baseName=function(t){return t_path__removeExtsFromFile(t_path_file(t))},t_titan_getPackageName=function(t,e,r,_){t||(t=t_node_getScriptPath()??"_console.js");var n=t_s_decapitalize(t_path_baseName(t));return e&&(n+="_repl"),n+(r&&_?.dynamic?".dypkg.json":".pkg.js")},t_v_constructorMatches=function(t,e){return null!=t&&t.constructor===e},t_o_constructorMatches=t_v_constructorMatches,t_re_is=function(t){return t_o_constructorMatches(t,RegExp)},t_a_last=function(t){return t[t.length-1]},t_o_is=function(t){return t_v_constructorMatches(t,Object)},t_s_chars=function(t){return new Set(t)},t_re_parseFlagString=function(t){var e={};if(t){var r=t_s_chars(t);r.has("g")&&(e.global=!0),r.has("i")&&(e.caseInsensitive=!0),r.has("y")&&(e.sticky=!0)}return e},t_re_createFlagString=function(t){var e="";return t.global&&(e+="g"),(t.caseInsensitive||0==t.caseSensitive)&&(e+="i"),t.sticky&&(e+="y"),e},t_re_updateFlagString=function(t,e){var r=t_re_parseFlagString(t);return t_re_createFlagString(Object.assign(r,e))},t_re_copy=function(t,e){var r=e,_=void 0;return t_s_is(r)?_=r:t_o_is(r)&&(_=t_re_updateFlagString(t.flags,r)),new RegExp(t,_)},t_a_resolveIndex=function(t,e){return e<0?t.length+e:e},t_s_resolveIndex=t_a_resolveIndex,t_re_setStartIndex=function(t,e,r){return t=t_re_copy(t,{global:!0}),null!=r&&(e=t_s_resolveIndex(r,e)),t.lastIndex=e,t},t_a_is=function(t){return Array.isArray(t)},t_a_ensure=function(t){return t_a_is(t)?t:[t]},t_p_is=function(t){return t instanceof Promise},t_p_asyncJoint=function(t,e){var r=t;return t_p_is(r)?r.then(e):e(r)},t_f_isArrow=function(t){return t_f_is(t)&&null==t.prototype},t_f_isArrowFn=t_f_isArrow,t_f_wrap=function(t){return function(){return t.apply(this,arguments)}},t_f_createConstructor=function(t,e){var r;return r=e?function(){this.super=e;var r=t.apply(this,arguments);return t_p_asyncJoint(r,()=>(delete this.super,r))}:t_f_isArrowFn(t)?t_f_wrap(t):t,r._isConstructor=!0,r},t_f_ensureConstructor=function(t,e){return t._isConstructor?t:t_f_createConstructor(t,e)},t_f_retThis=function(){return this},t_v_isPrimitive=function(t){var e=typeof t;return"object"!==e&&"function"!==e||null===t},t_o_isAny=function(t){return!t_v_isPrimitive(t)},t_o_merge=function(t,e,r){return!1===r?Object.keys(e).forEach(r=>{void 0===t[r]&&(t[r]=e[r])}):Object.assign(t,e),t},t_o_weakAssign=function(t,e){return t_o_merge(t,e,!1)},t_o_defineProperty=function(t,e,r,_){return r||(r={}),_&&t_o_weakAssign(r,_),null==r.enumerable&&(r.enumerable=!0),null==r.configurable&&(r.configurable=!0),Object.defineProperty(t,e,r)},t_o_addNonEnumerable=function(t,e,r,_){return t_o_defineProperty(t,e,{value:r,writable:!0,enumerable:!1},_),r},t_o_setHidden=t_o_addNonEnumerable,t_f_setName=function(t,e){Object.defineProperty(t,"name",{value:e,configurable:!0}),t_o_setHidden(t,"displayName",e)},t_class_setName=t_f_setName,t_class_addStatics=function(t,e){return Object.assign(t,e)},t_macro_config=function(t){},t_node_is=t_f_one(function(){return t_macro_config("node.is")??"undefined"==typeof window}),t_sym_display=t_node_is()?require("util").inspect.custom:Symbol("Display"),t_class_setDisplay=function(t,e){t.prototype[t_sym_display]=e},t_class_create=function(t,e,r,_,n,s){s||(s={}),t_s_is(e)&&(e=null);var i,a,o,u=r;u&&(t_a_is(u)?([a,o]=u,a&&(a=t_f_ensureConstructor(a))):i=t_f_ensureConstructor(u,e));var l=s.bareFn;s.singleton&&(l=function(){return null==p.default&&(p.default=new p(...arguments)),p.default});var c,f=a||i||e||t_f_retThis;function p(){if(!new.target&&l&&!(this instanceof p))return l.apply(this,arguments);var t=this;return t_p_asyncJoint(f.apply(t,arguments),r=>{if(r&&t_o_isAny(r)&&(t=r,a)){if(!new.target)throw t_err_nyi('Prototype repair is NYI for class instantiation without "new".');if(!e)throw t_err_nyi("instanceFn is not yet supported when extendsClass is null.");var _=Object.getPrototypeOf(this);Object.getPrototypeOf(t)!==_&&Object.setPrototypeOf(t,_)}return o?t_p_asyncJoint(o.apply(t,arguments),()=>t):t})}return t&&t_class_setName(p,t),e&&Object.setPrototypeOf(p,e),_?(c=_,e&&Object.setPrototypeOf(_,e.prototype)):c=e?Object.create(e.prototype):{},t_o_setHidden(c,"constructor",p),p.prototype=c,n&&t_class_addStatics(p,n),s.display&&t_class_setDisplay(p,s.display),s.implements&&t_a_ensure(s.implements).forEach(t=>t(p)),p},t_o_makeNonEnumerable=function(t,e){Object.defineProperty(t,e,{enumerable:!1})},t_o_hideKey=t_o_makeNonEnumerable,t_f_createClass=function(t,e,r,_,n){var s=Symbol();return t_class_create(t,Function,[function(){var t=function(){return t[s].apply(this,arguments)};return t},function(){var t=e.apply(this,arguments);if(!t)throw new Error("Constructor must return a function.");this[s]=t,t_o_hideKey(this,s)}],r,_,n)},t_a_resolveIndices=function(t,e,r,_){return e=null==e?0:t_a_resolveIndex(t,e),r=null==r?t.length:t_a_resolveIndex(t,r),_&&(0==_.inclusiveStart&&e++,_.inclusiveEnd&&r++),[e,r]},t_a_fill=function(t,e,r,_){var n=e;if([r,_]=t_a_resolveIndices(t,r,_),t_f_is(n))for(var s=r;s<_;s++)t[s]=n(s,t);else t.fill(n,r,_);return t},t_a_create=function(t,e){var r=new Array(t||0);return arguments.length>1&&t_a_fill(r,e),r},t_a_pick=function(t,e){return t_a_create(e.length,r=>t[e[r]])},t_o_get=function(t,e){return t[e]},t_o_set=function(t,e,r){return t[e]=r},t_v_resolve=function(t,e,r){var _=t;return t_f_is(_)?_.apply(r,e):_},t_o_ensureCustom=function(t,e,r,_,n){_||(_=t_o_get);var s=_(t,e);return void 0===s&&(s=t_v_resolve(r,[t,e]),n||(n=t_o_set),n(t,e,s)),s},t_map_get=function(t,e){return t.get(e)},t_map_set=function(t,e,r){return t.set(e,r)},t_map_ensure=function(t,e,r){return t_o_ensureCustom(t,e,r,t_map_get,t_map_set)},t_map_Cache=class{constructor(){this.store=new Map}get(t,e){return t_map_ensure(this.store,t,e)}remove(t){return this.store.delete(t)}delete(t){return this.remove(t)}},t_a_add=function(t,e){return t.push(e),t},t_a_push=t_a_add,t_args_ensureArray=function(t){var e=t;return Array.isArray(e)?e:Array.from(e)},t_sym_value=Symbol("Value"),t_o_createEmpty=function(){return{}},t_a_splitTail=function(t){return[t.slice(0,-1),t[t.length-1]]},t_a_splitLast=t_a_splitTail,t_tree_dive=function(t,e,r,_,n,s){r||(r=t_o_get),null==_&&(_=t_o_createEmpty),null==n&&(n=t_o_set),null==s&&(s=r);for(var[i,a]=t_a_splitLast(e),o=t,u=i.length,l=0;l<u;l++){var c=i[l],f=r(o,c);if(void 0===f){if(!_)return;f=t_o_ensureCustom(o,c,_,r,n)}o=f}if(s)return s(o,a,n)},t_tree_ensure=function(t,e,r,_,n,s){return t_tree_dive(t,e,_,n,s,(t,e)=>t_o_ensureCustom(t,e,r,_,s))},t_map_createEmpty=function(){return new Map},t_map_diveEnsure=function(t,e,r){return t_tree_ensure(t,e,r,t_map_get,t_map_createEmpty,t_map_set)},t_o_remove=function(t,e){return delete t[e],t},t_tree_remove=function(t,e,r,_){return t_tree_dive(t,e,r,!1,!1,_||t_o_remove)},t_map_remove=function(t,e){return t.delete(e)},t_map_diveDelete=function(t,e){return t_tree_remove(t,e,t_map_get,t_map_remove)},t_map_MultiCache=class{constructor(){this.store=new Map}get(t,e){return t=t_a_push(t_args_ensureArray(t),t_sym_value),t_map_diveEnsure(this.store,t,e)}remove(t){return t=t_a_push(t_args_ensureArray(t),t_sym_value),t_map_diveDelete(this.store,t)}delete(t){return this.remove(t)}},t_f_MemoizedFunction=t_f_createClass("MemoizedFunction",function(t,e){if(this.base=t,null!=e)if(1===(e=t_a_ensure(e)).length){this.cache=new t_map_Cache;var r=e[0];this._cacheKeyFormatter=t=>t[r]}else this.cache=new t_map_MultiCache,this._cacheKeyFormatter=t=>t_a_pick(t,e);else this.cache=new t_map_MultiCache,this._cacheKeyFormatter=t=>t;var _=this;return function(){var e=_._cacheKeyFormatter(arguments);return _.cache.get(e,()=>t.apply(this,arguments))}},{remove(t){return this.cache.remove(this._cacheKeyFormatter(t))}}),t_f_memoize=function(t,e){return new t_f_MemoizedFunction(t,e)},t_re_addFlag=function(t,e){return t_re_copy(t,t.flags+e)},t_re_global=function(t){return t_re_addFlag(t,"g")},t_re_ensureGlobal=t_f_memoize(function(t){return t.global?t:t_re_global(t)},0),t_re_matchAll=function(t,e,r){return t=null!=r?t_re_setStartIndex(t,r,e):t_re_ensureGlobal(t),Array.from(e.matchAll(t))},t_re_matchLast=function(t,e,r){return null!=r&&(e=e.slice(0,r)),t_a_last(t_re_matchAll(t,e))||null},t_re_matchEnd=function(t,e){var r=t_re_matchLast(t,e);return r&&e.length===r.index+r[0].length?r:null},t_err_TypeError=t_err_Enhanced(globalThis.TypeError),t_v_type=function(t){return null==t?t:t.constructor},t_node_util=t_node__builtInModule("util"),t_node_display=function(t,e){return e||(e={}),null==e.colors&&(e.colors=!0),t_node_util().inspect(t,e)},t_a_wrapIndex=t_a_resolveIndex,t_a_wrapIndices=function(t,e,r,_){return void 0!==e&&(null===e||0===e?e=void 0:(e=t_a_wrapIndex(t,e),_&&0==_.inclusiveStart&&e++)),void 0!==r&&(null===r||r===t.length?r=void 0:(r=t_a_wrapIndex(t,r),_&&_.inclusiveEnd&&r++)),[e,r]},t_s_withIndices=function(t,e,r,_,n,s){if(r||null!=_){[r,_]=t_a_wrapIndices(t,r,_,s);var i=t.slice(r,_),a=e(i);return n?n(a,r,_,i,t):a}return e(t)},t_s_apply=function(t,e,r,_,n){return t_s_withIndices(t,e,r,_,(e,r,_)=>(void 0!==r?t.slice(0,r):"")+(e||"")+(void 0!==_?t.slice(_):""),n)},t_re_resolveFlags=function(t){var e=t;return null==e?void 0:t_s_is(e)?e:t_re_createFlagString(e)},t_re_create=function(t,e){return new RegExp(t,t_re_resolveFlags(e))},t_re_escape=function(t){return t.replace(/[-[\]{}()*+!<=:?.\/\\^$|#\s,]/g,"\\$&")},t_re_createEscaped=function(t,e){return t_re_create(t_re_escape(t),e)},t_s_replaceAll=function(t,e,r,_,n,s){return t_s_apply(t,function(t){return t.replaceAll?(t_re_is(e)&&(e=t_re_ensureGlobal(e)),t.replaceAll(e,r)):(e=t_s_is(e)?t_re_createEscaped(e,"g"):t_re_ensureGlobal(e),this.replace(e,r))},_,n,s)},t_s_escape=function(t,e,r){return t_s_replaceAll(t,e,(r??"\\")+e)},t_s_quote=function(t,e,r){return null==e&&(e='"'),!1!==r&&(t=t_s_escape(t,e,r)),e+t+e},t_s_toLiteral=function(t){return t_s_quote(t,'"')},t_o_isPure=t_o_is,t_s_from=function(t){return t_o_isPure(t)?t_o_toLiteral(t):String(t)},t_a_toLiteral=function(t,e){return e||(e=t_v_toLiteral),"["+t.reduce(function(t,r){return t+e(r)+", "},"").slice(0,-2)+"]"},t_v_toLiteral=function(t){return t_s_is(t)?t_s_toLiteral(t):t_a_is(t)?t_a_toLiteral(t):t_s_from(t)},t_o_allKeys=function(t){return Reflect.ownKeys(t)},t_o_keys=function(t,e){return(e?t_o_allKeys:Object.keys)(t)},t_o_each=function(t,e,r){t_o_keys(t,r).forEach((r,_,n)=>e(r,t[r],_,n))},t_o_reduce=function(t,e,r,_){var n=null!=r?r:"";return t_o_each(t,function(){n=e.call(this,n,...arguments)},_),n},t_o_toLiteral=function(t,e){return e||(e=t_v_toLiteral),"{"+t_o_reduce(t,function(t,r,_){return t+r+":"+e(_)+", "},"",!0).slice(0,-2)+"}"},t_o_display=function(t,e){return null==e&&(e=1),e<=0?"[object Object]":t_o_toLiteral(t,t=>t_v_display(t,e-1))},t_a_display=function(t,e){return null==e&&(e=1),e<=0?"[object Array]":t_a_toLiteral(t,t=>t_v_display(t,e-1))},t_v_display=function(t,e){return void 0===t?"undefined":null===t?"null":t_node_is()?t_node_display(t,e):t_o_is(t)?t_o_display(t,maxNumLevels):t_a_is(t)?t_a_display(t,maxNumLevels):t_s_from(t)},t_err_type=function(t,e,r,_){if(0===arguments.length)return new t_err_TypeError("Unexpected type received");_||(_={});var n,{type:s,expected:i}=_;return null==s&&(s=t_v_type(t)),s&&s.name&&(s=s.name),i?(i.name&&(i=i.name),n="Expected "+i+", received "):n="Unexpected type received (",n+=s,null!=t&&(n+=" ("+t_v_display(t)+")"),i||(n+=")"),r&&(n+=' for "'+r+'"'),null!=e&&(n+=" (index "+e+")"),_.fromFn||(_.fromFn=t_err_type),new t_err_TypeError(n,_)},t_s_endsWith=function(t,e){if(t_s_is(e))return t.endsWith(e);if(t_re_is(e))return!!t_re_matchEnd(e,t);throw t_err_type(e,1,"matchThis")},t_re_slash=/\/|\\/,t_path_ensureTrailingSlash=function(t){return t_s_endsWith(t,t_re_slash)?t:t+t_path_sep},t_path_dir=function(t,e){return t=t_node_path().dirname(String(t)),!1===e?t:t_path_ensureTrailingSlash(t)},t_path_abs=function(t,e,r){t=String(t);var _=t_node_path().resolve,n=e?_(e,t):_(t);return r?n+t_path_sep:n},t_titan_getPackagePath=function(t,e,r,_){var n,s=t_titan_getPackageName(t,e,r,_);return n=t?t_path_dir(t):"./",t_path_abs(n+s)},t_err_create=function(t,e,r){var _=new t_err_Error(t,r);return e&&Object.assign(_,e),_},t_titan_locate=t_f_one(function(){var t=process.env.TITAN_PATH;if(!t)throw t_err_create("Environment variable TITAN_PATH is not set.");return t_path_ensureTrailingSlash(t)}),t_titan_getCompiledDir=function(t){return t||(t="Newest"),t_titan_locate()+"Compiled/"+t+"/"},t_d_now=function(){return new Date},t_err_req=function(t,e,r,_){var n="Required argument";return r&&(n+=' "'+r+'"'),null!=e&&(n+=" (index "+e+")"),n+=" missing",arguments.length>0&&(n+=" (received "+t_v_display(t)+")"),t_err_create(n,null,t_err_defaultFromFn(_,t_err_req))},t_d_copy=function(t){return new Date(t.getTime())},t_d_fromYear=function(t){return new Date(t,null)},t_d__resolveNative=function(t){var e=new Date(t);return isNaN(e.getTime())?null:e},t_v_nullIfNaN=function(t){return isNaN(t)?null:t},t_n_ensure=function(t){return null==t?null:t_v_nullIfNaN(Number(t))},t_n_fromString=t_n_ensure,t_n_is=function(t){var e=typeof t;return"number"===e||"bigint"===e},t_d_ensure=function(t,e){if(null==t)throw t_err_req(t,0);if(t.constructor===Date)return e?t_d_copy(t):t;if(t_s_is(t)){var r=t_n_fromString(t);return null!=r?t_d_fromYear(r):t_d__resolveNative(t)||null}return t_n_is(t)?t_d_fromYear(t):void 0},t_d_resolve=function(t,e){return null==t?t_d_now():t_d_ensure(t,e)},t_d_create=function(t){return t_d_resolve(t,!0)},t_d_from=t_d_create,t_titan_getLastCompileTime=function(t){var e=t_titan_getCompiledDir(t)+"LastCompileTime.txt";return t_fs_exists(e)?t_d_from(t_fs_load(e)):null},t_fs_getModifiedDate=function(t){return t_fs_stat(t).mtime},t_d_isBefore=function(t,e,r){return t=t_d_ensure(t),e=t_d_ensure(e),!1===r?t<e:t<=e},t_titan_hasNewCompile=function(t){var e=t_titan_getLastCompileTime();if(e){var r=t_fs_getModifiedDate(t);if(t_d_isBefore(r,e))return!0}return!1},t_node_getScriptDir=function(t){var e=t_node_getScriptPath();return e?t_path_dir(e,t):null},t_fs_loadJSON=function(t){return JSON.parse(t_fs_loadText(t))},t_o_addGetterAndSetter=function(t,e,r,_,n){return t_o_defineProperty(t,e,{get:r,set:_},n)},t_o_setGetterAndSetter=t_o_addGetterAndSetter,t_o_replaceGetterAndSetter=function(t,e,r,_){return t_o_defineProperty(t,e,{value:r,writable:!0},_)},t_o_setLazy=function(t,e,r,_){t_o_setGetterAndSetter(t,e,function(){var _=r(e,t);return this[e]=_,_},function(t){t_o_replaceGetterAndSetter(this,e,t,_)},_)},t_titan__trackGlobals=function(t,e){var r=t.globals,_=t.shortNamesToGlobals;Object.keys(_).forEach(t=>{for(var n=_[t],s=n.length,i=0;i<s;i++){var a=n[i],o=globalThis[a];o||(o=globalThis[a]={});var u=r[a];Object.keys(u).forEach(r=>{var _=e[t][r];o[r]=_})}}),e._meta||(e._meta={}),e._meta.globals=t.globals},t_titan__loadDynamicDeps=function _loadDynamicDeps(dynPackagePath,localT,options){const path=t_node_path();if(dynPackagePath)dynPackagePath=path.resolve(t_node_getScriptDir(),dynPackagePath);else{var scriptPath=t_node_getScriptPath();if(!scriptPath)throw new Error("Cannot find package name because scriptPath does not exist.");var dir=path.dirname(scriptPath),baseName=path.basename(scriptPath).split(".")[0];baseName=baseName[0].toLowerCase()+baseName.slice(1),dynPackagePath=path.join(dir,baseName+".pkg.json")}for(var packageObj=t_fs_loadJSON(dynPackagePath),setLazy=t_o_setLazy,items=packageObj.itemsInOrder,numItems=items.length,i=0;i<numItems;i++){let item=items[i],[shortName,itemName,evalText]=item,tModObj=localT[shortName];tModObj||(tModObj=localT[shortName]={}),Object.hasOwn(tModObj,itemName)||setLazy(tModObj,itemName,function(){let t=localT;return eval("("+evalText+")")})}packageObj.globals&&t_titan__trackGlobals(packageObj,localT)},t_node__basicRequire=function(t){return require(t)},t_npm_isBuiltIn=function(t){return!!t.startsWith("node:")||t_node__basicRequire("node:module").isBuiltin(t)},t_npm_isFile=function(t){return t.startsWith(".")},t_o_ensureMulti=function(t,e,r){return Object.keys(e).forEach(_=>t_o_ensure(t,_,e[_],r)),t},t_o_safeEnsureMulti=function(t,e,r){return t_o_ensureMulti(t||{},e,r)},t_o_safeSetDefaults=function(t,e,r){return e?t_o_safeEnsureMulti(t,e,r):t??{}},t_opt_resolve=function(t,e){return t_o_safeSetDefaults(t,e,!0)},t_err_ValueError=class extends t_err_Error{constructor(t,e){super(t??"Unexpected value",e)}},t_err_value=function(t,e,r,_){if(0===arguments.length)return new t_err_ValueError("Unexpected value received");_||(_={});var n,{expected:s}=_;return n=s?"Received "+t_v_display(t)+", expected one of "+t_v_display(s):"Unexpected value received: "+t_v_display(t),r&&(n+=' for "'+r+'"'),null!=e&&(n+=" (index "+e+")"),_.fromFn||(_.fromFn=t_err_value),new t_err_ValueError(n,_)},t_os__resolveStdio=function(t){var e=t.stdio;if(e){if(!t_a_is(e)){if(!t_s_is(e))throw t_err_type(e,"stdio");if("pipe"===e)e=["pipe","pipe","pipe"];else if("inherit"===e)e=["inherit","inherit","inherit"];else if("ignore"===e)e=["ignore","ignore","ignore"];else{if("overlapped"!==e)throw t_err_value(e,"stdio");e=["overlapped","overlapped","overlapped"]}t.stdio=e}}else e=t.stdio=[null,null,null];return e},t_a_assert=function(t){if(!t_a_is(t))throw t_err_type(t,null,null,{expected:Array});return!0},t_a_replaceContents=function(t,e){var r=e.length;t.length=r;for(var _=0;_<r;_++)t[_]=e[_];return t},t_f_not=function(t){return function(){return!t.apply(this,arguments)}},t_a_removeByFilter=function(t,e){return t_a_replaceContents(t,t.filter(t_f_not(e)))},t_a_removeNullish=function(t){return t_a_removeByFilter(t,t=>null==t)},t_node_child_process=t_node__builtInModule("child_process"),t_win_is=t_f_one(function(){return"win32"===process.platform}),t_shell__handleError=function(t,e,r){if(r||(r={}),e(t))throw t;if(r.nullOnErr)return null;var _=r.onErr;if(void 0!==_)return t_v_resolve(_);throw t},t_os_run=function(t,e,r,_){var n=(r=t_opt_resolve(r,_)).liveOutput,s=r.captureOutput??r.capture,i=r.captureErr??r.capture;s&&null==n&&(n=!1),r.dir&&(r.cwd=r.dir);var a=t_os__resolveStdio(r);if(null==a[0]&&!1!==r.allowInput){if(r.input)throw t_err_create("options.allowInput (user) and options.input (programmatic) cannot be used simultaneously for synchronous child processes.");a[0]="inherit"}if(null==a[1])if(s){if(n)throw t_err_create("options.captureOutput and options.liveOutput cannot be used simultaneously for synchronous child processes.");a[1]="pipe"}else a[1]=n??1?"inherit":"ignore";if(null==a[2]){i=r.captureErr??!1;var o=r.showErr;if(i&&o)throw t_err_create("options.captureErr and options.showErr cannot be used simultaneously for synchronous child processes.");a[2]=i?"pipe":o??1?"inherit":"ignore"}r.encoding||(r.encoding="utf8"),e&&(t_a_assert(e),t_a_removeNullish(e));try{var u=t_node_child_process().execFileSync(t,e,r);null!=u&&r.trim&&(u=u.trim());var l=r.map??r.mapFn;return l&&(u=l(u)),u}catch(t){if(t_win_is())return t_shell__handleError(t,t=>"ENOENT"===t.code,r);throw t}},t_npm__runCommand=function(t,e){return e||(e={}),null==e.captureOutput&&(e.captureOutput=!1),e.shell=!0,e.filterExtensions=!1,t_os_run("npm",t,e)},t_npm_install=function(t,e,r){return t_npm__runCommand(["install",t,e?"-g":null],r)},t_node_requireLocal=function(t){return require(t_path_abs(t))},t_o_Cache=class{constructor(){this.store={}}get(t,e){return t_o_ensure(this.store,t,e)}remove(t){return delete this.store[t]}delete(t){return this.remove(t)}},t_node__requireDirCache=new t_o_Cache,t_path_join=function(t,e,r){if(t_node_is()){var _=t_node_path().join(String(t),String(e));return r?t_path_ensureTrailingSlash(_):_}throw t_err_nyi()},t_path_ensureEndsWith=function(t,e){return t.endsWith(e)?t:t_path_join(t,e)},t_node_module=t_node__builtInModule("module"),t_node__createRequire=function(t){return t=t_path_ensureEndsWith(t,"node_modules"),t_node_module().createRequire(t)},t_node__requireFromDir=function(t,e){return t_node__requireDirCache.get(t,()=>t_node__createRequire(t))(e)},t_o_setDefaults=function(t,e,r){return e?t_o_ensureMulti(t,e,r):t},t_s__removeStringFromEnd=function(t,e){return t.endsWith(e)?t.substring(0,t.length-e.length):t},t_s__removeRegexFromEnd=function(t,e){var r=t_re_matchEnd(e,t);return r?t.slice(0,r.index):t},t_s_removeFromEnd=function(t,e){if(t_s_is(e))return t_s__removeStringFromEnd(t,e);if(t_re_is(e))return t_s__removeRegexFromEnd(t,e);throw t_err_type(e,1)},t_s_removeTrailing=t_s_removeFromEnd,t_s_splitAtIndex=function(t,e){return[t.slice(0,e),t.slice(e)]},t_js_splitLastExpression=function(t){t=t_s_removeTrailing(t.trim(),";");var e=Math.max(t.lastIndexOf(";"),t.lastIndexOf("\n"));return t_s_splitAtIndex(t,e+1)},t_s_ensureStartsWith=function(t,e){return t.startsWith(e)?t:e+t},t_js_ensureReturn=function(t){var[e,r]=t_js_splitLastExpression(t);return e+t_s_ensureStartsWith(r.trim(),"return ")},t_js__nodeEnableAwait=function(t){return t_node_require("node-repl-await").processTopLevelAwait(t)},t_js_enableAwait=function(t){return t_js__nodeEnableAwait(t)??t},t_s_replace=t_s_replaceAll,t_path_fws=function(t,e){return""===t?t:(!1!==e&&(t=t_path_ensureTrailingSlash(t)),t_s_replace(t,"\\","/"))},t_js_useTitan=function(t){return'require("'+t_path_fws(t_titan_getPackagePath(),!1)+'");\n'+t},t_s_removeAll=function(t,e){return t_s_replaceAll(t,e,"")},t_s_removeMulti=function(t,e){return e.forEach(e=>t=t_s_removeAll(t,e)),t},t_s_removeLineBreaks=function(t){return t_s_removeMulti(t,["\r","\n"])},t_js_inline=function(t){return t_s_removeLineBreaks(t_js_removeComments(t))},t_js_enhance=function(t,e,r){return(e||r)&&(e||(e={}),r&&t_o_setDefaults(e,r),e.ensureReturn&&(t=t_js_ensureReturn(t)),e.topLevelAwait&&(t=t_js_enableAwait(t)),e.useTitan&&(t=t_js_useTitan(t)),e.keepAlive&&(t="\nsetInterval(()=>{}, 100000);\n"+t),(e.logErrors||e.keepAlive)&&(t="process.on('uncaughtException', console.error);\nprocess.on('unhandledRejection', console.error);\n"+t),e.inline&&(t=t_js_inline(t))),t},t_s_ensure=function(t){return t_s_is(t)?t:t_s_from(t)},t_f_isArrowString=function(t){var e=t.indexOf("{");return-1===e||t.slice(0,e).includes("=>")},t_s__indexWithIndices=function(t,e,r,_,n){return t_s_withIndices(t,e,r,_,(t,e)=>-1===t?-1:void 0===e?t:e+t,n)},t_s_indexOfFn=function(t,e){return Array.prototype.findIndex.call(t,e)},t_s_index=function(t,e,r,_,n){var s=t_s_is(e);return s&&null==_&&!n?t.indexOf(e,r):t_s__indexWithIndices(t,t=>s?t.indexOf(e):t_re_is(e)?t.search(e):t_s_indexOfFn(t,e),r,_,n)},t_s_after=function(t,e,r,_,n){var s=t_s_index(t,e,r,_,n);return-1===s?null:t.slice(s+1,_)},t_s__removeStringFromStart=function(t,e){return t.startsWith(e)?t.substring(e.length):t},t_s_remove=t_s_removeAll,t_re_removeFlag=function(t,e){return t_re_copy(t,t_s_remove(t.flags,e))},t_re_local=function(t){return t_re_removeFlag(t,"g")},t_re_ensureLocal=t_f_memoize(function(t){return t.global?t_re_local(t):t},0),t_re_match=function(t,e,r){return(t=null!=r?t_re_setStartIndex(t,r,e):t_re_ensureLocal(t)).exec(e)},t_re_matchStart=function(t,e){var r=t_re_match(t,e);return r&&0===r.index?r:null},t_s__removeRegexFromStart=function(t,e){var r=t_re_matchStart(e,t);return r?t.slice(r[0].length):t},t_s_removeFromStart=function(t,e){if(t_s_is(e))return t_s__removeStringFromStart(t,e);if(t_re_is(e))return t_s__removeRegexFromStart(t,e);throw t_err_type(e,1)},t_s_removeLeading=t_s_removeFromStart,t_f__getArrowFnBody=function(t){var e=t_s_after(t,"=>").trim();return t_s_removeLeading(t_s_removeTrailing(e,"}"),"{")},t_f__getNormalFnBody=function(t){return t_s_after(t,"{").slice(0,-1)},t_f_body=function(t){var e=t_s_ensure(t);return t_f_isArrowString(e)?t_f__getArrowFnBody(e):t_f__getNormalFnBody(e)},t_s_resolve=function(t){return null==t?"":t_s_is(t)?t:t_f_is(t)?t_f_body(t):String(t)},t_node_run=function(t,e){var r=e?.basic?null:{topLevelAwait:!0,useTitan:!0},_=t_js_enhance(t_s_resolve(t),e,r);return t_os_run("node",[e?.mode??"-p",_],e)},t_v_req=function(t,e,r){if(null==t)throw t_err_req(t,e,r,{fromFn:t_v_req});return t},t_proc_signal=function(t,e){return process.kill(t,t_v_req(e,0,"signalName"))},t_proc_interrupt=function(t){return t_proc_signal(t,"SIGINT")},t_node_interrupt=function(){return t_proc_interrupt(process.pid)},t_node_sigint=t_node_interrupt,t_bool_fromYN=function(t){if("Y"===(t=t.toUpperCase()))return!0;if("N"===t)return!1;throw t_err_value(t,0,"char")},t_node_promptYNSync=function(t){null==t&&(t="Are you sure? [y/n]: "),process.stdout.write(t);var e=t_node_run(function(){const t=process.stdin,e=process.stdout;t.setRawMode(!0),t.setEncoding("utf8"),t.on("data",t=>{var r=t.toUpperCase();"Y"===r||"N"===r?(e.write(t),process.exit(0)):""===t&&(e.write("^C"),process.exit(0))})},{mode:"-e",basic:!0,stdio:["inherit","pipe"]});if("^C"===e)throw process.stdout.write(e),t_node_sigint(),t_err_create("Prompt was cancelled via interrupt.");return console.log(e),t_bool_fromYN(e)},t_o_resolveKeys=function(t){return t_a_is(t)?t:t_s_is(t)?t.split("."):[t]},t_tree_setCustom=function(t,e,r,_,n,s){var i=r;return t_tree_dive(t,e,_,n,s,(t,e,r)=>r(t,e,t_v_resolve(i)))},t_env_setConfig=function(t,e){var r=e,_=globalThis.config;_||(_=globalThis.config={});var n,s=t_o_resolveKeys(t);return s.length>1?n=t_tree_setCustom(_,s,r):(n=t_v_resolve(r),_[s[0]]=n),n},t_node_addRequireDir=function(t,e){return t_env_setConfig("node.require.customDirs",r=>(r||(r=[]),!1!==e&&(t=t_path_ensureEndsWith(t,"node_modules")),r.includes(t)||r.push(t),r)),t},t_node_ensureRequireDir=t_node_addRequireDir,t_o_diveGet=t_tree_dive,t_env_getConfig=function(t){var e=globalThis.config;if(e){var r=t_o_resolveKeys(t);return r.length>1?t_o_diveGet(e,r):e[r[0]]}},t_env_resolveConfig=function(t,e,r){if(null!=t)return t;var _=t_env_getConfig(e);return null!=_?_:r},t_fs_ensureParent=function(t){var e=t_path_dir(t,!1);return t_fs_exists(e)||(e!==t&&t_fs_ensureParent(e),t_node_fs().mkdirSync(String(e))),t},t_fs_mkdir=function(t){return t_fs_ensureParent(t),t_node_fs().mkdirSync(String(t)),t},t_fs_ensureDir=function(t){return t_fs_exists(t)?t:t_fs_mkdir(t)},t_node_require=function(t,e){if(t_npm_isBuiltIn(t))return require(t);if(t_npm_isFile(t))return t_node_requireLocal(t);try{return require(t)}catch(t){}var r=__dirname,_=process.mainModule?.path;if(_!==r)try{return t_node__requireFromDir(_,t)}catch(t){}var n=process.cwd();if(n!==_&&n!==r)try{return t_node__requireFromDir(n,t)}catch(t){}var s=t_env_getConfig("node.require.customDirs");if(s)for(var i of s)try{return t_node__requireFromDir(i,t)}catch(t){}var a=t_env_resolveConfig(e?.autoInstall,"node.require.autoInstall"),o=t_env_resolveConfig(e?.promptInstall,"node.require.promptInstall",!0);if(a||o){var u=a||o;!0===u&&(u="./node_modules"),u=t_path_abs(u);var l=!1;if(a?(l=!0,console.log('Auto-installing "'+t+'" from npm to "'+u+'"...')):(l=t_node_promptYNSync('Npm package "'+t+'" is required. Install now? (Y/N) '))&&console.log('Installing "'+t+'" from npm to "'+u+'"...'),l){u=t_fs_ensureDir(u),t_npm_install(t,!1,{cwd:u});try{return t_node_ensureRequireDir(u),t_node__requireFromDir(u,t)}catch(t){console.error("Failed to load from auto-install dir: ",u)}}}throw t_err_create('Module not found: "'+t+'"',{checked:{moduleDir:r,scriptDir:_,cwd:n}})},t_js_fromAST=function(t,e){return t_node_require("astring").generate(t,e)},t_err_prepend=function(t,e){return t.stack=e+"\n"+t.stack,t},t_js_parse=function(t,e,r){r||(r={}),r.ecmaVersion||(r.ecmaVersion=2024),!1!==e&&(r.sourceType="module"),null==r.allowAwaitOutsideFunction&&(r.allowAwaitOutsideFunction=!0),null==r.allowReturnOutsideFunction&&(r.allowReturnOutsideFunction=!0);var _=t_node_require("acorn");try{return _.parse(t,r)}catch(e){throw t_err_prepend(e,"Acorn parsing error: "+t)}},t_js_removeComments=function(t,e,r){return t_js_fromAST(t_js_parse(t,e,r))},t_re_quote=/(['"])(.*?)\1/,t_re_quotes=t_re_global(t_re_quote),t_s_removeQuotes=function(t){return t.replace(t_re_quotes,"")},t_js_removeQuotes=t_s_removeQuotes,t_tree_copy=function(t){return globalThis.structuredClone(t)},t_o_deepCopy=t_tree_copy,t_f_cache=t_f_memoize,t_re_newline=/\r?\n/,t_v_isEmpty=function(t){return null==t||void 0!==t.length&&0===t.length},t_a_removeEmpty=function(t,e){return t_a_removeByFilter(t,t_v_isEmpty)},t_a_removeIndex=function(t,e){return t.splice(e,1),t},t_a_apply=function(t,e,r,_){[r,_]=t_a_resolveIndices(t,r,_);for(var n=r;n<_;n++){var s=e(t[n],n,t);void 0!==s&&(t[n]=s)}return t},t_a_mapToObj=function(t,e,r){for(var _={},n=t.length,s=0;s<n;s++){var i=e(t[s],s,t);if(i){var[a,o]=i;r?(_[a]||(_[a]=[]),_[a].push(o)):_[a]=o}}return _},t_a_slice=function(t,e,r,_){return[e,r]=t_a_resolveIndices(t,e,r,_),t.slice(e,r)},t_s_repeat=function(t,e){return t_a_create(e,t).join("")},t_re_text=function(t){return t?t[0]:null},t_s__splitByMatch=function(t,e){var r=null==e?-1:e.index;if(-1===r)return[t];var _=t_s_splitAtIndex(t,r);return _[1]=_[1].slice(e[0].length),_},t_s__matchWithIndices=function(t,e,r,_,n){return t_s_withIndices(t,e,r,_,(e,r)=>null===e?null:(e.input=t,void 0!==r&&(e.index+=r),e),n)},t_a_pushThroughMulti=function(t,e){return t.splice(t.length,0,...e),e},t_a_addMulti=function(t,e){return t_a_pushThroughMulti(t,e),t},t_a_pushMulti=t_a_addMulti,t_re_RegexResult=class extends Array{constructor(t,e,r,_,n){if(-1===e)throw t_err_create("RegexResult index cannot be -1. For empty result, use bare null.");if(null==t)throw t_err_create("RegexResult matchString cannot be null. For empty result, use bare null.");super(),this[0]=t,_&&t_a_pushMulti(this,_),this.index=e,this.input=r,n&&(this.groups=n)}fromParts(t){var e=t;return new t_re_RegexResult(e.match,e.index,e.input,e.captures,e.groups)}},t_re_createResult=function(t,e,r,_,n){return new t_re_RegexResult(t,e,r,_,n)},t_re_safeCreateResult=function(t,e,r,_,n){return-1===e||null==t?null:t_re_createResult(t,e,r,_,n)},t_s_match=function(t,e,r,_,n){return t_s__matchWithIndices(t,t=>{if(t_s_is(e)){var r=t.indexOf(e);return t_re_safeCreateResult(e,r,t)}return t_re_match(e,t)},r,_,n)},t_s_splitFirst=function(t,e,r,_,n){return t_s__splitByMatch(t,t_s_match(t,e,r,_,n))},t_n_tryParse=t_n_ensure,t_n_tryCoerce=function(t){return t_n_tryParse(t)??t},t_o_fromLines=function(t,e){null==e&&(e="=");var r={};return t.forEach(function(t){var[_,n]=t_s_splitFirst(t,e);null!=n&&(n=t_n_tryCoerce(n.trim())),r[_.trim()]=n}),r},t_o_safeDefault=t_o_safeEnsure,t_s_LinesArray=class extends Array{constructor(t){var e,r=t;null!=r&&(t_a_is(r)?e=r:t_s_is(r)&&(e=r.split(t_re_newline))),e?(super(e.length),Object.assign(this,e)):super(...arguments)}condense(t){return this.trim().removeEmpty(),t&&this.removeComments(t),this}trim(){return this.apply(t=>t.trim())}removeEmpty(){return t_a_removeEmpty(this)}removeComments(t){for(var e=0;e<this.length;e++){var r=this[e],_=r.indexOf(t);-1!==_&&(""===(r=r.slice(0,_)).trim()?(t_a_removeIndex(this,e),e--):this[e]=r)}return this}removeFirst(){return this.shift(),this}removeLast(){return this.pop(),this}apply(t){return t_a_apply(this,t)}join(){return super.join("\n")}toObj(t){return t_o_fromLines(this,t)}mapToObj(t,e){return t_a_mapToObj(this,t,e)}between(t,e,r){return r=t_o_safeDefault(r,"inclusiveEnd",!0),t_a_slice(this,t,e,r)}normalize(){if(this.length>0&&(""===this[0].trim()&&this.shift(),this.length>0&&(""===t_a_last(this).trim()&&this.pop(),this.length>0))){var t=this.find(t=>""!==t.trim()),e=t_re_text(t_re_match(/^\s*/,t));if(e){var r=e.length;this.apply(t=>{if(t.startsWith(e))return t.slice(r)})}}return this}deindent(t,e,r){throw t_err_nyi()}indent(t,e){var r=t_s_repeat(e??"\t",t??1);return this.apply(t=>r+t)}static is(t){return t_v_constructorMatches(t,this)}static fromChunks(t){return t.map(t=>t_s_removeTrailing(t,t_re_newline)).flatMap(t=>t_s_splitLines(t,!1))}},t_s_lines=function(t,e){var r=new t_s_LinesArray(t);return e&&r.condense(),r},t_s_splitLines=function(t,e,r){var _=t.split(t_re_newline);return e?t_s_lines(_,r):_},t_fs_loadLines=function(t,e){return t_s_splitLines(t_fs_loadText(t),!0,e)},t_re_test=function(t,e){return t_re_ensureLocal(t).test(e)},t_s_contains=function(t,e){return t_re_is(e)?t_re_test(e,t):t.includes(e)},t_s__createParamsObj=function(t,e,r,_){null==t&&(t=""),null==e&&(e="");var n={},s=(r,_)=>n[t+r+e]=_;return _&&t_o_each(_,s),r&&t_o_each(r,s),n},t_s__replaceByObj=function(t,e){return t_o_each(e,(e,r)=>t=t_s_replaceAll(t,e,r)),t},t_s_replaceParams=function(t,e,r,_){var n,s,i=_?.paramIdentifier??"$";if(i)if(t_s_is(i)){if(!t_s_contains(t,i))return t;n=i}else{if(!t_a_is(i))throw t_err_type(i,1,"paramIdentifier");if([n,s]=i,!t_s_contains(t,n)&&!t_s_contains(t,s))return t}var a=t_s__createParamsObj(n,s,e,r);return t_s__replaceByObj(t,a)},t_path_string=function(t){return t_s_is(t)?t:String(t)},t_path_windir=globalThis.process?.env.windir,t_path_getUserDir=function(t){if(t)throw t_err_nyi();return t_node_os().homedir()+t_path_sep},t_path_getDesktop=function(t){return t_path_getUserDir(t)+"Desktop/"},t_path__defaultParams={PROGRAMFILES:globalThis.process?.env.ProgramFiles,WINDIR:t_path_windir,SYSTEM32:t_path_windir&&t_path_windir+"System32",TEMP:t_path__getDefaultTempDir(),DESKTOP:t_path_getDesktop()},t_path_resolveVars=function(t,e){return t_s_replaceParams(t_path_string(t),e,t_path__defaultParams)},t_titan__resolveSourceMapPath=function(t,e){return t?t_path_resolveVars(t,{TITAN:t_titan_locate()}):t_titan_getCompiledDir(e)+"SourceMap.txt"},t_s_before=function(t,e,r,_,n){var s=t_s_index(t,e,r,_,n);return-1===s?null:t.slice(r,s)},t_s_isCapitalized=function(t){var e=t[0];return e===e.toUpperCase()},t_a_filterSplit=function(t,e){var r=[],_=[];return t.forEach((n,s)=>(e(n,s,t)?r:_).push(n)),[r,_]},t_titan_loadGlobalsMap=t_f_cache(function(t){var e=t_fs_loadLines(t_titan__resolveSourceMapPath(t),!0),r={};return e.forEach(t=>{var e=t_s_before(t,"=").split(",").map(t=>t.trim()),[_,n]=t_a_filterSplit(e,t=>!t_s_isCapitalized(t)),s=_[0];if(!s)throw t_err_create('No shortName in SourceMap line: "'+t+'"');n.forEach(t=>{r[t]=s})}),r},0),t_titan__getGlobalsRegex=t_f_one(function(t){var e=Object.keys(t);return t_re_create("\\b("+e.join("|")+")\\.(\\w+)","g")}),t_titan_depsRegex=/\bt\.(\w+)\.(\w+)/g,t_titan__getDepsBasic=function(t,e){e||(e={});var r={},_=r.t={};if(e.enableGlobals){var n;n=e.additionalGlobals?t_o_deepCopy(e.additionalGlobals):{},r.globals=n;var s=t_titan_loadGlobalsMap(),i=t_titan__getGlobalsRegex(s),a=t_re_matchAll(i,t).filter(e=>{var r=e[1],_=e[2],n=t[e.index-1];if("."===n||"_"===n)return!1;var s=globalThis[r];return!s||void 0===s[_]});for(var[o,u,l]of a)n[u]||(n[u]={}),n[u][l]=!0;var c=a.map(([t,e,r])=>{var _=s[e];if(!_)throw t_err_create("No short name found for global: "+e);return"t."+_+"."+r+";"}).join(" ");t+="\n"+c}for(var[o,f,l]of a=t.matchAll(t_titan_depsRegex))_[f]||(_[f]={}),_[f][l]=!0;return r},t_titan_getDepsFromJS=function(t,e){return t=t_js_removeComments(t),t=t_js_removeQuotes(t),t_titan__getDepsBasic(t,e)},t_titan_getDepsFromHTML=function(t,e){return t_titan__getDepsBasic(t,e)},t_titan_getShallowDeps=function(t,e,r){if(e){if("js"===(e=e.toLowerCase()))return t_titan_getDepsFromJS(t,r);if("html"===e)return t_titan_getDepsFromHTML(t,r)}return t_titan__getDepsBasic(t,r)},t_o_has=function(t,e){return e in t},t_o_hasKey=t_o_has,t_tree_isSubsetOf=function(t,e){for(var r of(t_v_req(e,1),Object.keys(t))){if(!t_o_hasKey(e,r))return!1;var _=t[r];if(_&&_.constructor===Object&&!t_tree_isSubsetOf(_,e[r]))return!1}return!0},t_titan_jsonHasNewDeps=function(t,e){if(!t_tree_isSubsetOf(e.t,t))return!0;if(e.globals){var r=t._meta?.globals;if(!r)return!0;if(!t_tree_isSubsetOf(e.globals,r))return!0}return!1},t_titan_needsToPack=function(t,e,r,_){var n,s,i,a;_||(_={}),t&&(t=t_path_abs(t)),n=_.packagePath?t_path_abs(_.packagePath):t_titan_getPackagePath(t,!1,!0,_);var o,u=t_fs_exists(n);u?(s=t_titan_hasNewCompile(n))?i="New compile":(null==e&&(e=t_fs_loadText(t)),a=t_titan_getShallowDeps(e,"js",_),(o=t_titan_jsonHasNewDeps(r,a))&&(i="New deps")):i="No package";var l={needsPack:!!i,scriptPath:t,packagePath:n};return i&&(l.reasonText=i),null!=u&&(l.exists=u),null!=s&&(l.newCompile=s),null!=o&&(l.newDeps=o),e&&(l.sourceText=e),a&&(l.shallowDeps=a),l},t_path_isDir=function(t){return t_s_endsWith(t,t_re_slash)},t_re_lastIndex=function(t,e){var r=t_re_matchLast(t,e);return r?r.index:-1},t_path_dirPart=function(t){var e=t_re_lastIndex(t_re_slash,t);return-1===e?null:t.slice(0,e+1)},t_path_ignoreDir=function(t,e,r){if(t_path_isDir(t))return r?[t,null]:t;var _,n,s=t_path_dirPart(t),i=e(t_path_file(t),s,t);return r?[_,n]=i:_=i,null!=_&&(t=s?s+_:_),r?[t,n]:t},t_s_matchLast=function(t,e,r,_,n){return t_s__matchWithIndices(t,t=>{if(t_re_is(e))return t_re_matchLast(e,t);if(t_s_is(e)){var r=t.lastIndexOf(e);return-1!==r?new t_re_RegexResult(e,r):null}throw t_err_type(e,1)},r,_,n)},t_s_splitLast=function(t,e,r,_,n){return t_s__splitByMatch(t,t_s_matchLast(t,e,r,_,n))},t_path_splitExt=function(t){return t_path_ignoreDir(t,t=>t_s_splitLast(t,"."),!0)},t_path_ext=function(t,e){var r=t_path_splitExt(t)[1];return r?!1!==e?r.toLowerCase():r:null},t_titan_sourceMap={},t_titan_loadSourceMap=t_f_cache(function(t,e){t=t_titan__resolveSourceMapPath(t,e);var r=t_path_dir(t),_=t_fs_loadLines(t,"//"),n=t_titan_sourceMap;for(var s of _){var i=s.indexOf("="),a=s.slice(0,i).trim();a=a.split(",").map(t=>t.trim()).filter(t=>!t_s_isCapitalized(t));var o=s.slice(i+1).trim(),u=t_path_join(r,o).replaceAll("\\","/");for(var l of a)n[l]=u}return n}),t_titan_getDeps=function(t,e){var r=e?.fileType;if(r){if("js"===(r=r.toLowerCase()))return t_titan_getDepsFromJS(t,e);if("html"===r)return t_titan_getDepsFromHTML(t,e)}return t_titan__getDepsBasic(t,e)},t_gen_filter=function*(t,e){var r=0;for(var _ of t)e(_,r++,t)&&(yield _)},t_a_copy=function(t){return t.slice()},t_args_insert=function(t,e,r){for(var _=t.length-1;_>=e;_--)t[_+1]=t[_];return t[e]=r,t.length++,t},t_args_append=function(t,e){return t_args_insert(t,t.length,e)},t_args_push=t_args_append,t_f_recurse=function(t,e){return t.call(this,...e,function e(){return t_a_last(arguments)!==e&&t_args_push(arguments,e),t.apply(this,arguments)})},t_tree_iterator=function(t){t||(t={});var e=t.getKeys;e||(e=function(t){return Object.keys(t)});var r=t.recurseIf;if(!r){var _=this.constructor;r=t=>t_v_constructorMatches(t,_)||t_o_isPure(t)||t_a_is(t)}var n=t.leavesOnly??t.leafsOnly??!1,s=this;return t_f_recurse(function*(t,_,i,a){var o=e(t,_,i);if(o)for(var u=o.length,l=0;l<u;l++){var c=o[l],f=t[c],p=t_a_copy(_);p.push(c);var d=null,m={value:f,key:c,object:t,path:p,level:i,isLeaf:d,root:s},h=r(f,m);m.isLeaf=d=!h,n&&!d||(yield m),h&&(yield*a(f,p,i+1,a))}},[this,[],0])},t_tree_iterate=function(t,e){return t_tree_iterator.call(t,e)},t_o_fromKeys=function(t,e){1===arguments.length&&(e=!0);var r={};for(var _ of t)r[_]=e;return r},t_js_eachNode=function(t,e,r,_){var n=t_js_parse(t,e,_);t_node_require("acorn-walk").full(n,r)},t_js_getNodes=function(t,e,r,_){var n;if(t_s_is(r))n=t=>t.type===r;else if(t_a_is(r)){var s=t_o_fromKeys(r);n=t=>s[t.type]}else n=r;var i=[];return t_js_eachNode(t,e,function(t){n.apply(this,arguments)&&i.push(t)},_),i},t_js_fromASTNode=t_js_fromAST,t_js_parseDeclaration=function(t){var e,r,_,n=t,s=t_s_is(n)?t_js_parse(n).body[0]:n,i=s.type;if("VariableDeclaration"===i){e="variable";var a=s.declarations[0];r=a.id.name,_=a.init?a.init.raw??t_js_fromAST(a.init):"undefined"}else"FunctionDeclaration"===i?e="function":"ClassDeclaration"===i&&(e="class"),r=s.id.name;var o={type:e,name:r};return _&&(o.value=_),o.text=t_js_fromASTNode(s),o.node=s,o},t_js_getExports=function(t){return t_js_getNodes(t,!0,["ExportNamedDeclaration","ExportDefaultDeclaration"]).map(function(t){var e=t.declaration;if(e){var r=t_js_parseDeclaration(e);return r.node=t,r}return{node:t}})},t_titan__getAllDeps=function(t,e){e||(e={});var r=e.enableGlobals,_=t_titan_loadSourceMap(e.sourceMap,e.stability);console.log("SOURCEMAP",_);var n={},s=[];return function t(e,i){var a=t_gen_filter(t_tree_iterate(e),t=>t.isLeaf);for(var o of a){var[u,l]=o.path,c=n[u];if(c||(c=n[u]={}),null==c[l]){var f=_[u];if(f){var p=t_path_fws(f)+l+".js";if(!t_fs_exists(p)){var d='Titan compiled value "t.'+u+"."+l+'" does not exist';throw i&&(d+=' (called by "'+i+'")'),t_err_create(d+=".")}var m=t_fs_load(p),h=t_js_getExports(m)[0];c[l]=h;var v="t."+u+"."+l;t(t_titan_getDeps(m,{fileType:"js",enableGlobals:r}).t,v),s.push([u,l])}else console.log('Skipping unmapped module "'+u+'"'),c[l]=!1}}}(t.t),{t:n,globals:t.globals,order:s}},t_titan_packTextToJSON=function(t,e){e||(e={});var r=e.deps??t_titan_getShallowDeps(t,e.fileType,e),{t:_,globals:n,order:s}=t_titan__getAllDeps(r,e),i={};if(i.t=r.t,n&&e.enableGlobals){i.globals=n;var a=t_titan_loadGlobalsMap(),o=Object.keys(n),u=t_a_mapToObj(o,t=>[a[t],t],!0);i.shortNamesToGlobals=u}return i.itemsInOrder=s.map(([t,e])=>{var r=_[t][e];return[t,e,"variable"===r.type?r.value:"("+r.text+")"]}),i},t_tree_join=function(t,e,r){return null==r&&(r=!0),t_f_recurse(function(t,e,_){t_o_each(t,function(t,n){if(t_o_hasKey(e,t)){var s=e[t];r?t_o_is(s)&&t_o_is(n)?_(n,s):e[t]=n:t_o_is(s)&&_(n,s)}else e[t]=n})},[t,e]),e},t_tree_merge=t_tree_join,t_o_fromArray=function(t){return Object.assign({},t)},t_a_toObj=function(t,e){if(e){var r={};return t.forEach((t,_,n)=>r[e(t,_,n)]=!0),r}return t_o_fromArray(t)},t_titan_addNewItemsToJSON=function(t,e){t_tree_merge(e.t,t.t,!1);var r=e.globals;if(r){var _=t.globals;_?t_tree_merge(r,_,!1):t.globals=r,t.shortNamesToGlobals=e.shortNamesToGlobals}var n=t_a_toObj(t.itemsInOrder,t=>t[0]+"."+t[1]);return e.itemsInOrder.forEach(e=>{n[e[0]+"."+e[1]]||t.itemsInOrder.push(e)}),t},t_bin_isNodeBuffer=function(t){return t instanceof Buffer},t_ab_isTA=function(t){return ArrayBuffer.isView(t)},t_bin_isTA=t_ab_isTA,t_bin_isByteSafe=function(t){return t_bin_isNodeBuffer(t)||t_bin_isTA(t)||t_s_is(t)},t_ab_is=function(t){return t.constructor===ArrayBuffer},t_bin_ensureByteSafe=function(t){return t_bin_isByteSafe(t)?t:t_ab_is(t)?Buffer.from(t):t_s_from(t)},t_fs_formatRaw=function(t){return t_n_is(t)?String(t):t_bin_ensureByteSafe(t)},t_fs_write=function(t,e){return t_fs_ensureParent(t),t_node_fs().writeFileSync(String(t),t_fs_formatRaw(e)),t},t_json_stringify=function(t,e){var r;return e||(e={}),r=e.condensed?0:null!=e.whitespace?e.whitespace:"\t",JSON.stringify(t,e.replacer,r)},t_fs_writeJSON=function(t,e,r){return t_fs_write(t,t_json_stringify(e,r))},t_titan_packTextToJSONFile=function(t,e,r){r||(r={}),r.deps||r.fileType||!e||(r.fileType=t_path_ext(e));var _=t_titan_packTextToJSON(t,r),n=r.packagePath||t_titan_getPackagePath(e,r.repl,!0,r);if(r.dynamic&&(r.packageExists??t_fs_exists(n))&&!(r.newCompile??t_titan_hasNewCompile(n))){var s=t_fs_loadJSON(n);_=t_titan_addNewItemsToJSON(s,_)}return t_fs_writeJSON(n,_),n},t_titan_autoPackAndLoadJSON=function(t,e,r,_){var n=t_titan_needsToPack(t,e,r,_);return n.needsPack&&(_.onPack&&_.onPack(n.reasonText),e=n.sourceText??t_fs_loadText(t),_.packagePath=n.packagePath,_.packageExists=n.exists,_.newCompile=n.newCompile,_.deps=n.shallowDeps,t_titan_packTextToJSONFile(e,t,_),t_titan__loadDynamicDeps(n.packagePath,r,_)),r},newItems={node:{getScriptPath:t_node_getScriptPath,positionalArgs:t_node_positionalArgs,args:t_node_args,fs:t_node_fs,_builtInModule:t_node__builtInModule,requireBuiltIn:t_node_requireBuiltIn,os:t_node_os,path:t_node_path,is:t_node_is,display:t_node_display,util:t_node_util,getScriptDir:t_node_getScriptDir,require:t_node_require,_basicRequire:t_node__basicRequire,child_process:t_node_child_process,requireLocal:t_node_requireLocal,_requireFromDir:t_node__requireFromDir,_requireDirCache:t_node__requireDirCache,_createRequire:t_node__createRequire,module:t_node_module,promptYNSync:t_node_promptYNSync,run:t_node_run,sigint:t_node_sigint,interrupt:t_node_interrupt,ensureRequireDir:t_node_ensureRequireDir,addRequireDir:t_node_addRequireDir},cli:{positionalArgs:t_cli_positionalArgs,resolveArgs:t_cli_resolveArgs,splitArgs:t_cli_splitArgs},env:{args:t_env_args,setConfig:t_env_setConfig,getConfig:t_env_getConfig,resolveConfig:t_env_resolveConfig},f:{one:t_f_one,is:t_f_is,memoize:t_f_memoize,MemoizedFunction:t_f_MemoizedFunction,createClass:t_f_createClass,ensureConstructor:t_f_ensureConstructor,createConstructor:t_f_createConstructor,isArrowFn:t_f_isArrowFn,isArrow:t_f_isArrow,wrap:t_f_wrap,retThis:t_f_retThis,setName:t_f_setName,not:t_f_not,body:t_f_body,isArrowString:t_f_isArrowString,_getArrowFnBody:t_f__getArrowFnBody,_getNormalFnBody:t_f__getNormalFnBody,cache:t_f_cache,recurse:t_f_recurse},s:{is:t_s_is,isAny:t_s_isAny,isPrimitive:t_s_isPrimitive,isObject:t_s_isObject,decapitalize:t_s_decapitalize,endsWith:t_s_endsWith,chars:t_s_chars,resolveIndex:t_s_resolveIndex,toLiteral:t_s_toLiteral,quote:t_s_quote,escape:t_s_escape,replaceAll:t_s_replaceAll,apply:t_s_apply,withIndices:t_s_withIndices,from:t_s_from,removeTrailing:t_s_removeTrailing,removeFromEnd:t_s_removeFromEnd,_removeStringFromEnd:t_s__removeStringFromEnd,_removeRegexFromEnd:t_s__removeRegexFromEnd,splitAtIndex:t_s_splitAtIndex,ensureStartsWith:t_s_ensureStartsWith,replace:t_s_replace,removeLineBreaks:t_s_removeLineBreaks,removeMulti:t_s_removeMulti,removeAll:t_s_removeAll,resolve:t_s_resolve,ensure:t_s_ensure,after:t_s_after,index:t_s_index,_indexWithIndices:t_s__indexWithIndices,indexOfFn:t_s_indexOfFn,removeLeading:t_s_removeLeading,removeFromStart:t_s_removeFromStart,_removeStringFromStart:t_s__removeStringFromStart,_removeRegexFromStart:t_s__removeRegexFromStart,remove:t_s_remove,removeQuotes:t_s_removeQuotes,splitLines:t_s_splitLines,lines:t_s_lines,LinesArray:t_s_LinesArray,repeat:t_s_repeat,splitFirst:t_s_splitFirst,_splitByMatch:t_s__splitByMatch,match:t_s_match,_matchWithIndices:t_s__matchWithIndices,replaceParams:t_s_replaceParams,contains:t_s_contains,_createParamsObj:t_s__createParamsObj,_replaceByObj:t_s__replaceByObj,before:t_s_before,isCapitalized:t_s_isCapitalized,splitLast:t_s_splitLast,matchLast:t_s_matchLast},fs:{loadText:t_fs_loadText,load:t_fs_load,getID:t_fs_getID,stat:t_fs_stat,deepStat:t_fs_deepStat,shallowStat:t_fs_shallowStat,exists:t_fs_exists,getModifiedDate:t_fs_getModifiedDate,loadJSON:t_fs_loadJSON,ensureDir:t_fs_ensureDir,mkdir:t_fs_mkdir,ensureParent:t_fs_ensureParent,loadLines:t_fs_loadLines,writeJSON:t_fs_writeJSON,write:t_fs_write,formatRaw:t_fs_formatRaw},titan:{getTempDir:t_titan_getTempDir,getPackagePath:t_titan_getPackagePath,getPackageName:t_titan_getPackageName,hasNewCompile:t_titan_hasNewCompile,getLastCompileTime:t_titan_getLastCompileTime,getCompiledDir:t_titan_getCompiledDir,locate:t_titan_locate,_loadDynamicDeps:t_titan__loadDynamicDeps,_trackGlobals:t_titan__trackGlobals,autoPackAndLoadJSON:t_titan_autoPackAndLoadJSON,needsToPack:t_titan_needsToPack,getShallowDeps:t_titan_getShallowDeps,getDepsFromJS:t_titan_getDepsFromJS,_getDepsBasic:t_titan__getDepsBasic,loadGlobalsMap:t_titan_loadGlobalsMap,_resolveSourceMapPath:t_titan__resolveSourceMapPath,_getGlobalsRegex:t_titan__getGlobalsRegex,depsRegex:t_titan_depsRegex,getDepsFromHTML:t_titan_getDepsFromHTML,jsonHasNewDeps:t_titan_jsonHasNewDeps,packTextToJSONFile:t_titan_packTextToJSONFile,packTextToJSON:t_titan_packTextToJSON,_getAllDeps:t_titan__getAllDeps,loadSourceMap:t_titan_loadSourceMap,sourceMap:t_titan_sourceMap,getDeps:t_titan_getDeps,addNewItemsToJSON:t_titan_addNewItemsToJSON},path:{getTempDir:t_path_getTempDir,_getDefaultTempDir:t_path__getDefaultTempDir,sep:t_path_sep,baseName:t_path_baseName,_removeExtsFromFile:t_path__removeExtsFromFile,file:t_path_file,dir:t_path_dir,ensureTrailingSlash:t_path_ensureTrailingSlash,abs:t_path_abs,ensureEndsWith:t_path_ensureEndsWith,join:t_path_join,fws:t_path_fws,resolveVars:t_path_resolveVars,string:t_path_string,_defaultParams:t_path__defaultParams,windir:t_path_windir,getDesktop:t_path_getDesktop,getUserDir:t_path_getUserDir,ext:t_path_ext,splitExt:t_path_splitExt,ignoreDir:t_path_ignoreDir,isDir:t_path_isDir,dirPart:t_path_dirPart},err:{nyi:t_err_nyi,NYIError:t_err_NYIError,Error:t_err_Error,Enhanced:t_err_Enhanced,defaultFromFn:t_err_defaultFromFn,type:t_err_type,TypeError:t_err_TypeError,create:t_err_create,req:t_err_req,value:t_err_value,ValueError:t_err_ValueError,prepend:t_err_prepend},o:{safeEnsure:t_o_safeEnsure,ensure:t_o_ensure,constructorMatches:t_o_constructorMatches,is:t_o_is,isAny:t_o_isAny,setHidden:t_o_setHidden,addNonEnumerable:t_o_addNonEnumerable,defineProperty:t_o_defineProperty,weakAssign:t_o_weakAssign,merge:t_o_merge,hideKey:t_o_hideKey,makeNonEnumerable:t_o_makeNonEnumerable,ensureCustom:t_o_ensureCustom,get:t_o_get,set:t_o_set,createEmpty:t_o_createEmpty,remove:t_o_remove,display:t_o_display,toLiteral:t_o_toLiteral,isPure:t_o_isPure,reduce:t_o_reduce,each:t_o_each,keys:t_o_keys,allKeys:t_o_allKeys,setLazy:t_o_setLazy,setGetterAndSetter:t_o_setGetterAndSetter,addGetterAndSetter:t_o_addGetterAndSetter,replaceGetterAndSetter:t_o_replaceGetterAndSetter,safeSetDefaults:t_o_safeSetDefaults,safeEnsureMulti:t_o_safeEnsureMulti,ensureMulti:t_o_ensureMulti,Cache:t_o_Cache,setDefaults:t_o_setDefaults,resolveKeys:t_o_resolveKeys,diveGet:t_o_diveGet,deepCopy:t_o_deepCopy,fromLines:t_o_fromLines,safeDefault:t_o_safeDefault,hasKey:t_o_hasKey,has:t_o_has,fromKeys:t_o_fromKeys,fromArray:t_o_fromArray},re:{is:t_re_is,matchEnd:t_re_matchEnd,matchLast:t_re_matchLast,matchAll:t_re_matchAll,setStartIndex:t_re_setStartIndex,copy:t_re_copy,updateFlagString:t_re_updateFlagString,parseFlagString:t_re_parseFlagString,createFlagString:t_re_createFlagString,ensureGlobal:t_re_ensureGlobal,global:t_re_global,addFlag:t_re_addFlag,createEscaped:t_re_createEscaped,create:t_re_create,resolveFlags:t_re_resolveFlags,escape:t_re_escape,slash:t_re_slash,matchStart:t_re_matchStart,match:t_re_match,ensureLocal:t_re_ensureLocal,local:t_re_local,removeFlag:t_re_removeFlag,quotes:t_re_quotes,quote:t_re_quote,newline:t_re_newline,text:t_re_text,safeCreateResult:t_re_safeCreateResult,createResult:t_re_createResult,RegexResult:t_re_RegexResult,test:t_re_test,lastIndex:t_re_lastIndex},v:{constructorMatches:t_v_constructorMatches,isPrimitive:t_v_isPrimitive,resolve:t_v_resolve,type:t_v_type,display:t_v_display,toLiteral:t_v_toLiteral,nullIfNaN:t_v_nullIfNaN,req:t_v_req,isEmpty:t_v_isEmpty},a:{last:t_a_last,resolveIndex:t_a_resolveIndex,is:t_a_is,ensure:t_a_ensure,pick:t_a_pick,create:t_a_create,fill:t_a_fill,resolveIndices:t_a_resolveIndices,push:t_a_push,add:t_a_add,splitLast:t_a_splitLast,splitTail:t_a_splitTail,wrapIndices:t_a_wrapIndices,wrapIndex:t_a_wrapIndex,toLiteral:t_a_toLiteral,display:t_a_display,assert:t_a_assert,removeNullish:t_a_removeNullish,removeByFilter:t_a_removeByFilter,replaceContents:t_a_replaceContents,removeEmpty:t_a_removeEmpty,removeIndex:t_a_removeIndex,apply:t_a_apply,mapToObj:t_a_mapToObj,slice:t_a_slice,pushMulti:t_a_pushMulti,addMulti:t_a_addMulti,pushThroughMulti:t_a_pushThroughMulti,filterSplit:t_a_filterSplit,copy:t_a_copy,toObj:t_a_toObj},class:{create:t_class_create,setName:t_class_setName,addStatics:t_class_addStatics,setDisplay:t_class_setDisplay},p:{asyncJoint:t_p_asyncJoint,is:t_p_is},sym:{display:t_sym_display,value:t_sym_value},macro:{config:t_macro_config},map:{Cache:t_map_Cache,ensure:t_map_ensure,get:t_map_get,set:t_map_set,MultiCache:t_map_MultiCache,diveEnsure:t_map_diveEnsure,createEmpty:t_map_createEmpty,diveDelete:t_map_diveDelete,remove:t_map_remove},args:{ensureArray:t_args_ensureArray,push:t_args_push,append:t_args_append,insert:t_args_insert},tree:{ensure:t_tree_ensure,dive:t_tree_dive,remove:t_tree_remove,setCustom:t_tree_setCustom,copy:t_tree_copy,isSubsetOf:t_tree_isSubsetOf,iterate:t_tree_iterate,iterator:t_tree_iterator,merge:t_tree_merge,join:t_tree_join},d:{from:t_d_from,create:t_d_create,resolve:t_d_resolve,now:t_d_now,ensure:t_d_ensure,copy:t_d_copy,fromYear:t_d_fromYear,_resolveNative:t_d__resolveNative,isBefore:t_d_isBefore},n:{fromString:t_n_fromString,ensure:t_n_ensure,is:t_n_is,tryCoerce:t_n_tryCoerce,tryParse:t_n_tryParse},js:{removeComments:t_js_removeComments,fromAST:t_js_fromAST,enhance:t_js_enhance,ensureReturn:t_js_ensureReturn,splitLastExpression:t_js_splitLastExpression,enableAwait:t_js_enableAwait,_nodeEnableAwait:t_js__nodeEnableAwait,useTitan:t_js_useTitan,inline:t_js_inline,parse:t_js_parse,removeQuotes:t_js_removeQuotes,getExports:t_js_getExports,getNodes:t_js_getNodes,eachNode:t_js_eachNode,parseDeclaration:t_js_parseDeclaration,fromASTNode:t_js_fromASTNode},npm:{isBuiltIn:t_npm_isBuiltIn,isFile:t_npm_isFile,install:t_npm_install,_runCommand:t_npm__runCommand},os:{run:t_os_run,_resolveStdio:t_os__resolveStdio},opt:{resolve:t_opt_resolve},win:{is:t_win_is},shell:{_handleError:t_shell__handleError},proc:{interrupt:t_proc_interrupt,signal:t_proc_signal},bool:{fromYN:t_bool_fromYN},gen:{filter:t_gen_filter},bin:{ensureByteSafe:t_bin_ensureByteSafe,isByteSafe:t_bin_isByteSafe,isNodeBuffer:t_bin_isNodeBuffer,isTA:t_bin_isTA},ab:{isTA:t_ab_isTA,is:t_ab_is},json:{stringify:t_json_stringify}};globalThis.t?Object.keys(newItems).forEach(function(e){if(t[e]){var r=newItems[e];Object.keys(r).forEach(function(_){t[e][_]=r[_]})}else t[e]=newItems[e]}):globalThis.t=Object.assign({},newItems),globalThis.exports&&(exports.default=globalThis.t);
package/harness.pkg.js CHANGED
@@ -1 +1 @@
1
- var e=function(e,n){return n(e)},n=function(e){return"string"==typeof e},r=function(e){return e instanceof String},i=function(e){return n(e)||r(e)},u=i,o=function(e){return Array.isArray(e)},a=function(e){return o(e)?e:[e]},l=function(e){return e instanceof Promise},s=function(e,n){var t=e;return l(t)?t.then(n):n(t)},c=function(e){return"function"==typeof e},f=function(e){return c(e)&&null==e.prototype},p=f,v=function(e){return function(){return e.apply(this,arguments)}},h=function(e,n){var t;return t=n?function(){this.super=n;var t=e.apply(this,arguments);return s(t,()=>(delete this.super,t))}:p(e)?v(e):e,t._isConstructor=!0,t},d=function(e,n){return e._isConstructor?e:h(e,n)},m=function(){return this},g=function(e){var n=typeof e;return"object"!==n&&"function"!==n||null===e},y=function(e){return!g(e)},b=function(e,n,t){return!1===t?Object.keys(n).forEach(t=>{void 0===e[t]&&(e[t]=n[t])}):Object.assign(e,n),e},w=function(e,n){return b(e,n,!1)},E=function(e,n,t,r){return t||(t={}),r&&w(t,r),null==t.enumerable&&(t.enumerable=!0),null==t.configurable&&(t.configurable=!0),Object.defineProperty(e,n,t)},x=function(e,n,t,r){return E(e,n,{value:t,writable:!0,enumerable:!1},r),t},T=x,S=function(e){return class extends e{constructor(e,n){super(e,n);var t=this.constructor.name;t&&(this.name=t)}}},O=S(globalThis.Error),_=class extends O{constructor(e,n){super(e??"Not yet implemented",n)}},N=function(e,n,t,r){var i=e[n];if(void 0===i){var u=t;!1!==r&&c(u)&&(u=u(e,n)),e[n]=i=u}return i},A=function(e,n,t,r){return e||(e={}),N(e,n,t,r),e},j=function(e,n){return A(e,"fromFn",n,!1)},I=function(e,n){return new _(e,j(n,I))},F=function(e,n){Object.defineProperty(e,"name",{value:n,configurable:!0}),T(e,"displayName",n)},k=F,C=function(e,n){return Object.assign(e,n)},L=function(e){var n,t=!1;return function(){return t||(t=!0,n=e.apply(this,arguments)),n}},D=L(function(){return"undefined"==typeof window}),M=D()?require("util").inspect.custom:Symbol("Display"),P=function(e,n){e.prototype[M]=n},R=function(e,n,t,r,i,l){l||(l={}),u(n)&&(n=null);var c,f,p,v=t;v&&(o(v)?([f,p]=v,f&&(f=d(f))):c=d(v,n));var h=l.bareFn;l.singleton&&(h=function(){return null==w.default&&(w.default=new w(...arguments)),w.default});var g,b=f||c||n||m;function w(){if(!new.target&&h&&!(this instanceof w))return h.apply(this,arguments);var e=this;return s(b.apply(e,arguments),t=>{if(t&&y(t)&&(e=t,f)){if(!new.target)throw I('Prototype repair is NYI for class instantiation without "new".');if(!n)throw I("instanceFn is not yet supported when extendsClass is null.");var r=Object.getPrototypeOf(this);Object.getPrototypeOf(e)!==r&&Object.setPrototypeOf(e,r)}return p?s(p.apply(e,arguments),()=>e):e})}return e&&k(w,e),n&&Object.setPrototypeOf(w,n),r?(g=r,n&&Object.setPrototypeOf(r,n.prototype)):g=n?Object.create(n.prototype):{},T(g,"constructor",w),w.prototype=g,i&&C(w,i),l.display&&P(w,l.display),l.implements&&a(l.implements).forEach(e=>e(w)),w},q=function(e,n){Object.defineProperty(e,n,{enumerable:!1})},B=q,G=function(e,n,t,r,i){var u=Symbol();return R(e,Function,[function(){var e=function(){return e[u].apply(this,arguments)};return e},function(){var e=n.apply(this,arguments);if(!e)throw new Error("Constructor must return a function.");this[u]=e,B(this,u)}],t,r,i)},K=function(e){return n=>n===e},W=function(e){return Reflect.ownKeys(e)},H=function(e,n){return(n?W:Object.keys)(e)},z=function(e,n,t){var r={};for(var i of n)Object.hasOwn(e,i)&&(r[i]=e[i],!0===t&&delete e[i]);return r},Y=function(e){return e instanceof Set},U=function(e){return Y(e)?e:o(e)?new Set(e):new Set([e])},V=U,Q=function(e,n){var t=[],r=[];return e.forEach((i,u)=>(n(i,u,e)?t:r).push(i)),[t,r]},$=function(e,n,t,r){var i=n;if(c(i))throw I();var u=H(e,r),o=V(i),[a,l]=Q(u,e=>o.has(e));return[z(e,a,t),!0===t?e:z(e,l,!1)]},J=function(e,n,t){var r=H(e,t).filter(t=>n(e[t],t,e));return $(e,r,!1,t)},X=function(e,n){return n<e?n:e},Z=function(e,n){return X(e,n)},ee=function*(e,n){null==e&&(e=0),n=null==n?this.length:Z(n,this.length);for(var t=e;t<n;t++)yield this[t]},ne=function(e,n,t){return null==n&&null==t?e[Symbol.iterator].call(e):ee.call(e,n,t)},te=function(e,n){return n<0?e.length+n:n},re=function(e,n,t,r){return n=null==n?0:te(e,n),t=null==t?e.length:te(e,t),r&&(0==r.inclusiveStart&&n++,r.inclusiveEnd&&t++),[n,t]},ie=function(e,n,t,r){[t,r]=re(e,t,r);for(var i=t;i<r;i++){var u=n(e[i],i,e);void 0!==u&&(e[i]=u)}return e},ue=function(e,n){return n?ie(H(e,n),n=>[n,e[n]]):Object.entries(e)},oe=function(e){return ne(ue(this,e))},ae=function(e,n){var t=e[Symbol.iterator];return t?t.call(e):oe.call(e,n)},le=function(e){return ae(e,!0)},se=function(e,n){return null!=e&&e.constructor===n},ce=function(e){return se(e,Object)},fe=ce,pe=function(e,n,t,r){return E(e,n,{get:t},r)},ve=function(e,n,t,r){return E(e,n,{value:t,writable:!0},r),t},he=function(e,n,t){pe(e,n,function(){if(this===e)return null;var r=t.call(this);return ve(this,n,r),r})},de=class extends O{constructor(e,n){super(e??"Unexpected value",n)}},me=function(e){return require("node:"+e)},ge=function(e){return L(()=>me(e))},ye=ge("util"),be=function(e,n){return n||(n={}),null==n.colors&&(n.colors=!0),ye().inspect(e,n)},we=te,Ee=function(e,n,t,r){return void 0!==n&&(null===n||0===n?n=void 0:(n=we(e,n),r&&0==r.inclusiveStart&&n++)),void 0!==t&&(null===t||t===e.length?t=void 0:(t=we(e,t),r&&r.inclusiveEnd&&t++)),[n,t]},xe=function(e,n,t,r,i,u){if(t||null!=r){[t,r]=Ee(e,t,r,u);var o=e.slice(t,r),a=n(o);return i?i(a,t,r,o,e):a}return n(e)},Te=function(e,n,t,r,i){return xe(e,n,t,r,(n,t,r)=>(void 0!==t?e.slice(0,t):"")+(n||"")+(void 0!==r?e.slice(r):""),i)},Se=se,Oe=function(e){return Se(e,RegExp)},_e=function(e,n,t,r){var i=n;if([t,r]=re(e,t,r),c(i))for(var u=t;u<r;u++)e[u]=i(u,e);else e.fill(i,t,r);return e},Ne=function(e,n){var t=new Array(e||0);return arguments.length>1&&_e(t,n),t},Ae=function(e,n){return Ne(n.length,t=>e[n[t]])},je=function(e,n){return e[n]},Ie=function(e,n,t){return e[n]=t},Fe=function(e,n,t){var r=e;return c(r)?r.apply(t,n):r},ke=function(e,n,t,r,i){r||(r=je);var u=r(e,n);return void 0===u&&(u=Fe(t,[e,n]),i||(i=Ie),i(e,n,u)),u},Ce=function(e,n){return e.get(n)},Le=function(e,n,t){return e.set(n,t)},De=function(e,n,t){return ke(e,n,t,Ce,Le)},Me=class{constructor(){this.store=new Map}get(e,n){return De(this.store,e,n)}remove(e){return this.store.delete(e)}delete(e){return this.remove(e)}},Pe=function(e,n){return e.push(n),e},Re=Pe,qe=function(e){var n=e;return Array.isArray(n)?n:Array.from(n)},Be=Symbol("Value"),Ge=function(){return{}},Ke=function(e){return[e.slice(0,-1),e[e.length-1]]},We=Ke,He=function(e,n,t,r,i,u){t||(t=je),null==r&&(r=Ge),null==i&&(i=Ie),null==u&&(u=t);for(var[o,a]=We(n),l=e,s=o.length,c=0;c<s;c++){var f=o[c],p=t(l,f);if(void 0===p){if(!r)return;p=ke(l,f,r,t,i)}l=p}if(u)return u(l,a,i)},ze=function(e,n,t,r,i,u){return He(e,n,r,i,u,(e,n)=>ke(e,n,t,r,u))},Ye=function(){return new Map},Ue=function(e,n,t){return ze(e,n,t,Ce,Ye,Le)},Ve=function(e,n){return delete e[n],e},Qe=function(e,n,t,r){return He(e,n,t,!1,!1,r||Ve)},$e=function(e,n){return e.delete(n)},Je=function(e,n){return Qe(e,n,Ce,$e)},Xe=class{constructor(){this.store=new Map}get(e,n){return e=Re(qe(e),Be),Ue(this.store,e,n)}remove(e){return e=Re(qe(e),Be),Je(this.store,e)}delete(e){return this.remove(e)}},Ze=G("MemoizedFunction",function(e,n){if(this.base=e,null!=n)if(1===(n=a(n)).length){this.cache=new Me;var t=n[0];this._cacheKeyFormatter=e=>e[t]}else this.cache=new Xe,this._cacheKeyFormatter=e=>Ae(e,n);else this.cache=new Xe,this._cacheKeyFormatter=e=>e;var r=this;return function(){var n=r._cacheKeyFormatter(arguments);return r.cache.get(n,()=>e.apply(this,arguments))}},{remove(e){return this.cache.remove(this._cacheKeyFormatter(e))}}),en=function(e,n){return new Ze(e,n)},nn=function(e){return new Set(e)},tn=function(e){var n={};if(e){var t=nn(e);t.has("g")&&(n.global=!0),t.has("i")&&(n.caseInsensitive=!0),t.has("y")&&(n.sticky=!0)}return n},rn=function(e){var n="";return e.global&&(n+="g"),(e.caseInsensitive||0==e.caseSensitive)&&(n+="i"),e.sticky&&(n+="y"),n},un=function(e,n){var t=tn(e);return rn(Object.assign(t,n))},on=function(e,n){var t=n,r=void 0;return u(t)?r=t:ce(t)&&(r=un(e.flags,t)),new RegExp(e,r)},an=function(e,n){return on(e,e.flags+n)},ln=function(e){return an(e,"g")},sn=en(function(e){return e.global?e:ln(e)},0),cn=function(e){var n=e;return null==n?void 0:u(n)?n:rn(n)},fn=function(e,n){return new RegExp(e,cn(n))},pn=function(e){return e.replace(/[-[\]{}()*+!<=:?.\/\\^$|#\s,]/g,"\\$&")},vn=function(e,n){return fn(pn(e),n)},hn=function(e,n,t,r,i,o){return Te(e,function(e){return e.replaceAll?(Oe(n)&&(n=sn(n)),e.replaceAll(n,t)):(n=u(n)?vn(n,"g"):sn(n),this.replace(n,t))},r,i,o)},dn=function(e,n,t){return hn(e,n,(t??"\\")+n)},mn=function(e,n,t){return null==n&&(n='"'),!1!==t&&(e=dn(e,n,t)),n+e+n},gn=function(e){return mn(e,'"')},yn=function(e){return fe(e)?Tn(e):String(e)},bn=function(e,n){return n||(n=wn),"["+e.reduce(function(e,t){return e+n(t)+", "},"").slice(0,-2)+"]"},wn=function(e){return u(e)?gn(e):o(e)?bn(e):yn(e)},En=function(e,n,t){H(e,t).forEach((t,r,i)=>n(t,e[t],r,i))},xn=function(e,n,t,r){var i=null!=t?t:"";return En(e,function(){i=n.call(this,i,...arguments)},r),i},Tn=function(e,n){return n||(n=wn),"{"+xn(e,function(e,t,r){return e+t+":"+n(r)+", "},"",!0).slice(0,-2)+"}"},Sn=function(e,n){return null==n&&(n=1),n<=0?"[object Object]":Tn(e,e=>_n(e,n-1))},On=function(e,n){return null==n&&(n=1),n<=0?"[object Array]":bn(e,e=>_n(e,n-1))},_n=function(e,n){return void 0===e?"undefined":null===e?"null":D()?be(e,n):ce(e)?Sn(e,maxNumLevels):o(e)?On(e,maxNumLevels):yn(e)},Nn=function(e,n,t,r){if(0===arguments.length)return new de("Unexpected value received");r||(r={});var i,{expected:u}=r;return i=u?"Received "+_n(e)+", expected one of "+_n(u):"Unexpected value received: "+_n(e),t&&(i+=' for "'+t+'"'),null!=n&&(i+=" (index "+n+")"),r.fromFn||(r.fromFn=Nn),new de(i,r)},An=function(e,n,t){var r=new O(e,t);return n&&Object.assign(r,n),r},jn=function*(e,n){yield*e,yield*n},In=function(e){return e?" "+e:""},Fn=function(e){return u(e)?e:e.toString()},kn=G("Interface",function(e,n,t){t||(t={}),F(this,e),n?[this.stubs,this.defaults]=J(n,K(!0),!0):(this.stubs={},this.defaults={});var r=t.implements?a(t.implements):null,i=this;return function(e){var n=e;return r&&r.forEach(e=>e(n)),i.decorate(n),i.assert(n),n}},{decorate(e){var n,t,r=e;for(var[i,u]of(r.prototype?(n=r.prototype,t=!0):(n=r,t=!1),le(this.defaults)))if(void 0===n[i])if(fe(u))if(u.value)n[i]=u.value;else{if(!u.setup)throw Nn(u,null,"defaultVal");if(!t)throw u.setup(),I("setupFn is NYI for instances");he(n,i,u.setup)}else n[i]=u;return r},assert(e){var n=e,t=null!=n.prototype,r=n.prototype||n,i=jn(le(this.stubs),le(this.defaults));for(var[u]of i){var o;if(void 0===r[u])throw o=t?"Class"+In(n.name):"Object "+_n(n),o+=" does not satisfy interface "+this.name+' (missing key "'+Fn(u)+'")',An(o)}return n},validate(e){try{return this.assert(e),!0}catch(e){return!1}}},{is(e){return e instanceof this}}),Cn=function(e,n,t){return new kn(e,n,t)},Ln=Symbol("Cleanup"),Dn=Cn("Handle",{remove:!0,[Ln](){this.remove()}}),Mn=e(class{constructor(e){this.handles=e}remove(){this.handles.forEach(e=>e.remove())}add(e){return this.handles.push(e),this}},Dn),Pn=function(e){return 1===e.length&&o(e[0])?e[0]:array},Rn=function(...e){return new Mn(Pn(e))},qn=Rn,Bn=qn,Gn=function(e){var n,t,r=e;return null!=r&&(n=r.detail??r.data??r,y(r)&&(t=r)),[n,t,r]},Kn=function(e){return kn.is(e)},Wn=Kn,Hn=S(globalThis.TypeError),zn=function(e){return null==e?e:e.constructor},Yn=function(e,n,t,r){if(0===arguments.length)return new Hn("Unexpected type received");r||(r={});var i,{type:u,expected:o}=r;return null==u&&(u=zn(e)),u&&u.name&&(u=u.name),o?(o.name&&(o=o.name),i="Expected "+o+", received "):i="Unexpected type received (",i+=u,null!=e&&(i+=" ("+_n(e)+")"),o||(i+=")"),t&&(i+=' for "'+t+'"'),null!=n&&(i+=" (index "+n+")"),r.fromFn||(r.fromFn=Yn),new Hn(i,r)},Un=function(e,n,t){if(!Wn(n))throw Yn(n,1);return n.decorate(e),t&&t.call(e,e,n),n.assert(e),e},Vn=Cn,Qn=Symbol("EventTarget"),$n=function(e){return require(e)},Jn=function(e){return!!e.startsWith("node:")||$n("node:module").isBuiltin(e)},Xn=function(e){return e.startsWith(".")},Zn=function(e,n,t){return Object.keys(n).forEach(r=>N(e,r,n[r],t)),e},et=function(e,n,t){return Zn(e||{},n,t)},nt=function(e,n,t){return n?et(e,n,t):e??{}},tt=function(e,n){return nt(e,n,!0)},rt=function(e){var n=e.stdio;if(n){if(!o(n)){if(!u(n))throw Yn(n,"stdio");if("pipe"===n)n=["pipe","pipe","pipe"];else if("inherit"===n)n=["inherit","inherit","inherit"];else if("ignore"===n)n=["ignore","ignore","ignore"];else{if("overlapped"!==n)throw Nn(n,"stdio");n=["overlapped","overlapped","overlapped"]}e.stdio=n}}else n=e.stdio=[null,null,null];return n},it=function(e){if(!o(e))throw Yn(e,null,null,{expected:Array});return!0},ut=function(e,n){var t=n.length;e.length=t;for(var r=0;r<t;r++)e[r]=n[r];return e},ot=function(e){return function(){return!e.apply(this,arguments)}},at=function(e,n){return ut(e,e.filter(ot(n)))},lt=function(e){return at(e,e=>null==e)},st=ge("child_process"),ct=L(function(){return"win32"===process.platform}),ft=function(e,n,t){if(t||(t={}),n(e))throw e;if(t.nullOnErr)return null;var r=t.onErr;if(void 0!==r)return Fe(r);throw e},pt=function(e,n,t,r){var i=(t=tt(t,r)).liveOutput,u=t.captureOutput??t.capture,o=t.captureErr??t.capture;u&&null==i&&(i=!1),t.dir&&(t.cwd=t.dir);var a=rt(t);if(null==a[0]&&!1!==t.allowInput){if(t.input)throw An("options.allowInput (user) and options.input (programmatic) cannot be used simultaneously for synchronous child processes.");a[0]="inherit"}if(null==a[1])if(u){if(i)throw An("options.captureOutput and options.liveOutput cannot be used simultaneously for synchronous child processes.");a[1]="pipe"}else a[1]=i??1?"inherit":"ignore";if(null==a[2]){o=t.captureErr??!1;var l=t.showErr;if(o&&l)throw An("options.captureErr and options.showErr cannot be used simultaneously for synchronous child processes.");a[2]=o?"pipe":l??1?"inherit":"ignore"}t.encoding||(t.encoding="utf8"),n&&(it(n),lt(n));try{var s=st().execFileSync(e,n,t);null!=s&&t.trim&&(s=s.trim());var c=t.map??t.mapFn;return c&&(s=c(s)),s}catch(e){if(ct())return ft(e,e=>"ENOENT"===e.code,t);throw e}},vt=function(e,n){return n||(n={}),null==n.captureOutput&&(n.captureOutput=!1),n.shell=!0,n.filterExtensions=!1,pt("npm",e,n)},ht=function(e,n,t){return vt(["install",e,n?"-g":null],t)},dt=ge("path"),mt=dt().sep,gt=function(e,n,t){e=String(e);var r=dt().resolve,i=n?r(n,e):r(e);return t?i+mt:i},yt=function(e){return require(gt(e))},bt=class{constructor(){this.store={}}get(e,n){return N(this.store,e,n)}remove(e){return delete this.store[e]}delete(e){return this.remove(e)}},wt=new bt,Et=function(e){return e[e.length-1]},xt=te,Tt=function(e,n,t){return e=on(e,{global:!0}),null!=t&&(n=xt(t,n)),e.lastIndex=n,e},St=function(e,n,t){return e=null!=t?Tt(e,t,n):sn(e),Array.from(n.matchAll(e))},Ot=function(e,n,t){return null!=t&&(n=n.slice(0,t)),Et(St(e,n))||null},_t=function(e,n){var t=Ot(e,n);return t&&n.length===t.index+t[0].length?t:null},Nt=function(e,n){if(u(n))return e.endsWith(n);if(Oe(n))return!!_t(n,e);throw Yn(n,1,"matchThis")},At=/\/|\\/,jt=function(e){return Nt(e,At)?e:e+mt},It=function(e,n,t){if(D()){var r=dt().join(String(e),String(n));return t?jt(r):r}throw I()},Ft=function(e,n){return e.endsWith(n)?e:It(e,n)},kt=ge("module"),Ct=function(e){return e=Ft(e,"node_modules"),kt().createRequire(e)},Lt=function(e,n){return wt.get(e,()=>Ct(e))(n)},Dt=function(e,n,t){return n?Zn(e,n,t):e},Mt=function(e,n){return e.endsWith(n)?e.substring(0,e.length-n.length):e},Pt=function(e,n){var t=_t(n,e);return t?e.slice(0,t.index):e},Rt=function(e,n){if(u(n))return Mt(e,n);if(Oe(n))return Pt(e,n);throw Yn(n,1)},qt=Rt,Bt=function(e,n){return[e.slice(0,n),e.slice(n)]},Gt=function(e){e=qt(e.trim(),";");var n=Math.max(e.lastIndexOf(";"),e.lastIndexOf("\n"));return Bt(e,n+1)},Kt=function(e,n){return e.startsWith(n)?e:n+e},Wt=function(e){var[n,t]=Gt(e);return n+Kt(t.trim(),"return ")},Ht=function(e){return oi("node-repl-await").processTopLevelAwait(e)},zt=function(e){return Ht(e)??e},Yt=hn,Ut=function(e,n){return""===e?e:(!1!==n&&(e=jt(e)),Yt(e,"\\","/"))},Vt=L(function(){return process.argv.slice(2)}),Qt=Vt,$t=function(e,n){const t=[];let r="",i="outside",u=!1;for(let o=0;o<e.length;o++){const a=e[o];switch(i){case"outside":'"'===a?u?(r+=a,u=!1):(n&&(r+=a),i="insideQuote"):"\\"===a?u=!0:" "===a?(r.length>0&&(t.push(r),r=""),u=!1):(r+=a,u=!1);break;case"insideQuote":'"'!==a||u?"\\"!==a||u?(r+=a,u=!1):u=!0:(n&&(r+=a),i="outside")}}return r.length>0&&t.push(r),t},Jt=function(e,n){var t=e;return null==t?Qt():u(t)?$t(t,n):t},Xt=function(e,n){return Jt(e,n).slice()},Zt=Xt,er=function(){var e=require.main?.filename;return e||(null!=process._eval?null:Zt(process.argv)[1])},nr=function(e){return e.charAt(0).toLowerCase()+e.slice(1)},tr=function(e){return e.split(".")[0]},rr=function(e){return dt().win32.basename(String(e))},ir=function(e){return tr(rr(e))},ur=function(e,n,t,r){e||(e=er()??"_console.js");var i=nr(ir(e));return n&&(i+="_repl"),i+(t&&r?.dynamic?".dypkg.json":".pkg.js")},or=function(e,n){return e=dt().dirname(String(e)),!1===n?e:jt(e)},ar=function(e,n,t,r){var i,u=ur(e,n,t,r);return i=e?or(e):"./",gt(i+u)},lr=function(e){return'require("'+Ut(ar(),!1)+'");\n'+e},sr=function(e,n){return hn(e,n,"")},cr=function(e,n){return n.forEach(n=>e=sr(e,n)),e},fr=function(e){return cr(e,["\r","\n"])},pr=function(e,n){return oi("astring").generate(e,n)},vr=function(e,n){return e.stack=n+"\n"+e.stack,e},hr=function(e,n,t){t||(t={}),t.ecmaVersion||(t.ecmaVersion=2024),!1!==n&&(t.sourceType="module"),null==t.allowAwaitOutsideFunction&&(t.allowAwaitOutsideFunction=!0),null==t.allowReturnOutsideFunction&&(t.allowReturnOutsideFunction=!0);var r=oi("acorn");try{return r.parse(e,t)}catch(n){throw vr(n,"Acorn parsing error: "+e)}},dr=function(e,n,t){return pr(hr(e,n,t))},mr=function(e){return fr(dr(e))},gr=function(e,n,t){return(n||t)&&(n||(n={}),t&&Dt(n,t),n.ensureReturn&&(e=Wt(e)),n.topLevelAwait&&(e=zt(e)),n.useTitan&&(e=lr(e)),n.keepAlive&&(e="\nsetInterval(()=>{}, 100000);\n"+e),(n.logErrors||n.keepAlive)&&(e="process.on('uncaughtException', console.error);\nprocess.on('unhandledRejection', console.error);\n"+e),n.inline&&(e=mr(e))),e},yr=function(e){return u(e)?e:yn(e)},br=function(e){var n=e.indexOf("{");return-1===n||e.slice(0,n).includes("=>")},wr=function(e,n,t,r,i){return xe(e,n,t,r,(e,n)=>-1===e?-1:void 0===n?e:n+e,i)},Er=function(e,n){return Array.prototype.findIndex.call(e,n)},xr=function(e,n,t,r,i){var o=u(n);return o&&null==r&&!i?e.indexOf(n,t):wr(e,e=>o?e.indexOf(n):Oe(n)?e.search(n):Er(e,n),t,r,i)},Tr=function(e,n,t,r,i){var u=xr(e,n,t,r,i);return-1===u?null:e.slice(u+1,r)},Sr=function(e,n){return e.startsWith(n)?e.substring(n.length):e},Or=sr,_r=function(e,n){return on(e,Or(e.flags,n))},Nr=function(e){return _r(e,"g")},Ar=en(function(e){return e.global?Nr(e):e},0),jr=function(e,n,t){return(e=null!=t?Tt(e,t,n):Ar(e)).exec(n)},Ir=function(e,n){var t=jr(e,n);return t&&0===t.index?t:null},Fr=function(e,n){var t=Ir(n,e);return t?e.slice(t[0].length):e},kr=function(e,n){if(u(n))return Sr(e,n);if(Oe(n))return Fr(e,n);throw Yn(n,1)},Cr=kr,Lr=function(e){var n=Tr(e,"=>").trim();return Cr(qt(n,"}"),"{")},Dr=function(e){return Tr(e,"{").slice(0,-1)},Mr=function(e){var n=yr(e);return br(n)?Lr(n):Dr(n)},Pr=function(e){return null==e?"":u(e)?e:c(e)?Mr(e):String(e)},Rr=function(e,n){var t=n?.basic?null:{topLevelAwait:!0,useTitan:!0},r=gr(Pr(e),n,t);return pt("node",[n?.mode??"-p",r],n)},qr=function(e,n,t,r){var i="Required argument";return t&&(i+=' "'+t+'"'),null!=n&&(i+=" (index "+n+")"),i+=" missing",arguments.length>0&&(i+=" (received "+_n(e)+")"),An(i,null,j(r,qr))},Br=function(e,n,t){if(null==e)throw qr(e,n,t,{fromFn:Br});return e},Gr=function(e,n){return process.kill(e,Br(n,0,"signalName"))},Kr=function(e){return Gr(e,"SIGINT")},Wr=function(){return Kr(process.pid)},Hr=Wr,zr=function(e){if("Y"===(e=e.toUpperCase()))return!0;if("N"===e)return!1;throw Nn(e,0,"char")},Yr=function(e){null==e&&(e="Are you sure? [y/n]: "),process.stdout.write(e);var n=Rr(function(){const e=process.stdin,n=process.stdout;e.setRawMode(!0),e.setEncoding("utf8"),e.on("data",e=>{var t=e.toUpperCase();"Y"===t||"N"===t?(n.write(e),process.exit(0)):""===e&&(n.write("^C"),process.exit(0))})},{mode:"-e",basic:!0,stdio:["inherit","pipe"]});if("^C"===n)throw process.stdout.write(n),Hr(),An("Prompt was cancelled via interrupt.");return console.log(n),zr(n)},Ur=function(e){return o(e)?e:u(e)?e.split("."):[e]},Vr=function(e,n,t,r,i,u){var o=t;return He(e,n,r,i,u,(e,n,t)=>t(e,n,Fe(o)))},Qr=function(e,n){var t=n,r=globalThis.config;r||(r=globalThis.config={});var i,u=Ur(e);return u.length>1?i=Vr(r,u,t):(i=Fe(t),r[u[0]]=i),i},$r=function(e,n){return Qr("node.require.customDirs",t=>(t||(t=[]),!1!==n&&(e=Ft(e,"node_modules")),t.includes(e)||t.push(e),t)),e},Jr=$r,Xr=He,Zr=function(e){var n=globalThis.config;if(n){var t=Ur(e);return t.length>1?Xr(n,t):n[t[0]]}},ei=function(e,n,t){if(null!=e)return e;var r=Zr(n);return null!=r?r:t},ni=ge("fs"),ti=function(e){return!!ni().lstatSync(String(e),{throwIfNoEntry:!1})},ri=function(e){var n=or(e,!1);return ti(n)||(n!==e&&ri(n),ni().mkdirSync(String(n))),e},ii=function(e){return ri(e),ni().mkdirSync(String(e)),e},ui=function(e){return ti(e)?e:ii(e)},oi=function(e,n){if(Jn(e))return require(e);if(Xn(e))return yt(e);try{return require(e)}catch(e){}var t=__dirname,r=process.mainModule?.path;if(r!==t)try{return Lt(r,e)}catch(e){}var i=process.cwd();if(i!==r&&i!==t)try{return Lt(i,e)}catch(e){}var u=Zr("node.require.customDirs");if(u)for(var o of u)try{return Lt(o,e)}catch(e){}var a=ei(n?.autoInstall,"node.require.autoInstall"),l=ei(n?.promptInstall,"node.require.promptInstall",!0);if(a||l){var s=a||l;!0===s&&(s="./node_modules"),s=gt(s);var c=!1;if(a?(c=!0,console.log('Auto-installing "'+e+'" from npm to "'+s+'"...')):(c=Yr('Npm package "'+e+'" is required. Install now? (Y/N) '))&&console.log('Installing "'+e+'" from npm to "'+s+'"...'),c){s=ui(s),ht(e,!1,{cwd:s});try{return Jr(s),Lt(s,e)}catch(e){console.error("Failed to load from auto-install dir: ",s)}}}throw An('Module not found: "'+e+'"',{checked:{moduleDir:t,scriptDir:r,cwd:i}})},ai=L(function(){if(!globalThis.CustomEvent||!globalThis.EventTarget||!globalThis.Event){var e=oi("event-target-shim");globalThis.Event||(globalThis.Event=e.Event),globalThis.CustomEvent||(globalThis.CustomEvent=class extends globalThis.Event{constructor(e,n){super(e,n),n?.detail&&(this.detail=n.detail)}}),globalThis.EventTarget||(globalThis.EventTarget=e.EventTarget)}return{Event:Event,CustomEvent:CustomEvent,EventTarget:EventTarget}}),li=ai().EventTarget,si=function(e){var n=Qn,t=e[n];return void 0===t&&(t=new li,T(e,n,t)),t},ci=Vn("EventInterface",{addEventListener(e,n,t){si(this).addEventListener(e,n,t)},on(e,n){this.addEventListener(e,n)},removeEventListener(e,n){si(this).removeEventListener(e,n)},off(e,n){this.removeEventListener(e,n)},dispatchEvent(e){return si(this).dispatchEvent(e)}}),fi=ci,pi=function(e){return Un(e,fi)},vi=function(e){return!(!e.addEventListener&&!e.on)},hi=function(e){return vi(e)||pi(e),e},di=function(e,n,t){return e[n]=t,e},mi=function(e,n,t){return di(e||{},n,t)},gi=function(e,n,t,r){return Ai(e,n,t,mi(r,"once",!0))},yi=function(e,n){return function(){var t=n.apply(this,arguments);return e.apply(this,arguments),t}},bi=yi,wi=function(e,n,t){return e[n]=bi(e[n],t)},Ei=e(class{constructor(e){this._remover=e}remove(){this._remover()}removeOn(e,n,t){t&&hi(e);var r=gi(target,n,()=>this.remove());return wi(this,"remove",()=>r.remove()),this}},Dn),xi=class extends Ei{constructor(e,n){super(e),this.handleEvent=n}},Ti=function(e,n){return new xi(e,n)},Si=function(e,n,t){(e.removeEventListener||e.off).call(e,n,t)},Oi=function(e,n,t){for(var r=e.length-1;r>=n;r--)e[r+1]=e[r];return e[n]=t,e.length++,e},_i=function(e,n){return Oi(e,0,n)},Ni=_i,Ai=function(e,n,t,r){if(r?.valueFirst){var i=t;t=function(e){var[n,t]=Gn(e);return Ni(arguments,n),arguments[1]=t,i.apply(this,arguments)}}var u=e.addEventListener;return u||(e.on?u=r?.once?e.once:e.on:(pi(e),u=e.addEventListener)),u.call(e,n,t,r),Ti(()=>Si(e,n,t),t)},ji=class extends Ei{constructor(e){super(()=>clearInterval(e))}stop(){this.remove()}},Ii=function(e,n){return new ji(setInterval(n,e))},Fi=function(){},ki=function(){return Ii(1e9,Fi)},Ci=function(){return Bn([ki(),Ai(process,"uncaughtException",console.error),Ai(process,"unhandledRejection",console.error)])},Li=function(e){var n=gt(e);return delete require.cache[n],yt(n)},Di=L(function(){var e=process.env.TITAN_PATH;if(!e)throw An("Environment variable TITAN_PATH is not set.");return jt(e)}),Mi=L(function(){return Di()+"Compiled/Newest/"}),Pi=function(e){return ni().readFileSync(String(e),"utf8")},Ri=function(){return new Date},qi=function(e){return new Date(e.getTime())},Bi=function(e){return new Date(e,null)},Gi=function(e){var n=new Date(e);return isNaN(n.getTime())?null:n},Ki=function(e){return isNaN(e)?null:e},Wi=function(e){return null==e?null:Ki(Number(e))},Hi=Wi,zi=function(e){var n=typeof e;return"number"===n||"bigint"===n},Yi=function(e,n){if(null==e)throw qr(e,0);if(e.constructor===Date)return n?qi(e):e;if(u(e)){var t=Hi(e);return null!=t?Bi(t):Gi(e)||null}return zi(e)?Bi(e):void 0},Ui=function(e,n){return null==e?Ri():Yi(e,n)},Vi=function(e){return Ui(e,!0)},Qi=Vi,$i=function(){var e=Mi()+"LastCompileTime.txt";return ti(e)?Qi(Pi(e)):null},Ji=function(e,n){return ni().statSync(String(e),n)},Xi=function(e,n){return ni().lstatSync(String(e),n)},Zi=function(e,n,t){return(n?Ji:Xi)(e,t)},eu=function(e){return Zi(e).mtime},nu=function(e,n,t){return e=Yi(e),n=Yi(n),!1===t?e<n:e<=n},tu=function(e){var n=$i();if(n){var t=eu(e);if(nu(t,n))return!0}return!1},ru=/(['"])(.*?)\1/,iu=ln(ru),uu=function(e){return e.replace(iu,"")},ou=uu,au=function(e){return globalThis.structuredClone(e)},lu=au,su=en,cu=/\r?\n/,fu=function(e){return null==e||void 0!==e.length&&0===e.length},pu=function(e,n){return at(e,fu)},vu=function(e,n){return e.splice(n,1),e},hu=function(e,n,t){for(var r={},i=e.length,u=0;u<i;u++){var o=n(e[u],u,e);if(o){var[a,l]=o;t?(r[a]||(r[a]=[]),r[a].push(l)):r[a]=l}}return r},du=function(e,n,t,r){return[n,t]=re(e,n,t,r),e.slice(n,t)},mu=function(e,n){return Ne(n,e).join("")},gu=function(e){return e?e[0]:null},yu=function(e,n){var t=null==n?-1:n.index;if(-1===t)return[e];var r=Bt(e,t);return r[1]=r[1].slice(n[0].length),r},bu=function(e,n,t,r,i){return xe(e,n,t,r,(n,t)=>null===n?null:(n.input=e,void 0!==t&&(n.index+=t),n),i)},wu=function(e,n){return e.splice(e.length,0,...n),n},Eu=function(e,n){return wu(e,n),e},xu=Eu,Tu=class extends Array{constructor(e,n,t,r,i){if(-1===n)throw An("RegexResult index cannot be -1. For empty result, use bare null.");if(null==e)throw An("RegexResult matchString cannot be null. For empty result, use bare null.");super(),this[0]=e,r&&xu(this,r),this.index=n,this.input=t,i&&(this.groups=i)}fromParts(e){var n=e;return new Tu(n.match,n.index,n.input,n.captures,n.groups)}},Su=function(e,n,t,r,i){return new Tu(e,n,t,r,i)},Ou=function(e,n,t,r,i){return-1===n||null==e?null:Su(e,n,t,r,i)},_u=function(e,n,t,r,i){return bu(e,e=>{if(u(n)){var t=e.indexOf(n);return Ou(n,t,e)}return jr(n,e)},t,r,i)},Nu=function(e,n,t,r,i){return yu(e,_u(e,n,t,r,i))},Au=Wi,ju=function(e){return Au(e)??e},Iu=function(e,n){null==n&&(n="=");var t={};return e.forEach(function(e){var[r,i]=Nu(e,n);null!=i&&(i=ju(i.trim())),t[r.trim()]=i}),t},Fu=A,ku=class extends Array{constructor(e){var n,t=e;null!=t&&(o(t)?n=t:u(t)&&(n=t.split(cu))),n?(super(n.length),Object.assign(this,n)):super(...arguments)}condense(e){return this.trim().removeEmpty(),e&&this.removeComments(e),this}trim(){return this.apply(e=>e.trim())}removeEmpty(){return pu(this)}removeComments(e){for(var n=0;n<this.length;n++){var t=this[n],r=t.indexOf(e);-1!==r&&(""===(t=t.slice(0,r)).trim()?(vu(this,n),n--):this[n]=t)}return this}removeFirst(){return this.shift(),this}removeLast(){return this.pop(),this}apply(e){return ie(this,e)}join(){return super.join("\n")}toObj(e){return Iu(this,e)}mapToObj(e,n){return hu(this,e,n)}between(e,n,t){return t=Fu(t,"inclusiveEnd",!0),du(this,e,n,t)}normalize(){if(this.length>0&&(""===this[0].trim()&&this.shift(),this.length>0&&(""===Et(this).trim()&&this.pop(),this.length>0))){var e=this.find(e=>""!==e.trim()),n=gu(jr(/^\s*/,e));if(n){var t=n.length;this.apply(e=>{if(e.startsWith(n))return e.slice(t)})}}return this}deindent(e,n,t){throw I()}indent(e,n){var t=mu(n??"\t",e??1);return this.apply(e=>t+e)}static is(e){return se(e,this)}static fromChunks(e){return e.map(e=>qt(e,cu)).flatMap(e=>Lu(e,!1))}},Cu=function(e,n){var t=new ku(e);return n&&t.condense(),t},Lu=function(e,n,t){var r=e.split(cu);return n?Cu(r,t):r},Du=Pi,Mu=function(e,n){return Lu(Du(e),!0,n)},Pu=function(e,n){return Ar(e).test(n)},Ru=function(e,n){return Oe(n)?Pu(n,e):e.includes(n)},qu=function(e,n,t,r){null==e&&(e=""),null==n&&(n="");var i={},u=(t,r)=>i[e+t+n]=r;return r&&En(r,u),t&&En(t,u),i},Bu=function(e,n){return En(n,(n,t)=>e=hn(e,n,t)),e},Gu=function(e,n,t,r){var i,a,l=r?.paramIdentifier??"$";if(l)if(u(l)){if(!Ru(e,l))return e;i=l}else{if(!o(l))throw Yn(l,1,"paramIdentifier");if([i,a]=l,!Ru(e,i)&&!Ru(e,a))return e}var s=qu(i,a,n,t);return Bu(e,s)},Ku=function(e){return u(e)?e:String(e)},Wu=globalThis.process?.env.windir,Hu=ge("os"),zu=function(){return Hu().tmpdir()+mt},Yu=function(e){if(e)throw I();return Hu().homedir()+mt},Uu=function(e){return Yu(e)+"Desktop/"},Vu={PROGRAMFILES:globalThis.process?.env.ProgramFiles,WINDIR:Wu,SYSTEM32:Wu&&Wu+"System32",TEMP:zu(),DESKTOP:Uu()},Qu=function(e,n){return Gu(Ku(e),n,Vu)},$u=function(){return Di()+"Source/SourceMap.txt"},Ju=function(e){return e?Qu(e,{TITAN:Di()}):$u()},Xu=function(e,n,t,r,i){var u=xr(e,n,t,r,i);return-1===u?null:e.slice(t,u)},Zu=function(e){var n=e[0];return n===n.toUpperCase()},eo=su(function(e){var n=Mu(Ju(e),!0),t={};return n.forEach(e=>{var n=Xu(e,"=").split(",").map(e=>e.trim()),[r,i]=Q(n,e=>!Zu(e)),u=r[0];if(!u)throw An('No shortName in SourceMap line: "'+e+'"');i.forEach(e=>{t[e]=u})}),t},0),no=L(function(e){var n=Object.keys(e);return fn("\\b("+n.join("|")+")\\.(\\w+)","g")}),to=/\bt\.(\w+)\.(\w+)/g,ro=function(e,n){n||(n={});var t={},r=t.t={};if(n.enableGlobals){var i;i=n.additionalGlobals?lu(n.additionalGlobals):{},t.globals=i;var u=eo(),o=no(u),a=St(o,e).filter(n=>{var t=n[1],r=n[2],i=e[n.index-1];if("."===i||"_"===i)return!1;var u=globalThis[t];return!u||void 0===u[r]});for(var[l,s,c]of a)i[s]||(i[s]={}),i[s][c]=!0;var f=a.map(([e,n,t])=>{var r=u[n];if(!r)throw An("No short name found for global: "+n);return"t."+r+"."+t+";"}).join(" ");e+="\n"+f}for(var[l,p,c]of a=e.matchAll(to))r[p]||(r[p]={}),r[p][c]=!0;return t},io=function(e,n){return e=dr(e),e=ou(e),ro(e,n)},uo=function(e,n){return n in e},oo=uo,ao=function(e,n){for(var t of(Br(n,1),Object.keys(e))){if(!oo(n,t))return!1;var r=e[t];if(r&&r.constructor===Object&&!ao(r,n[t]))return!1}return!0},lo=function(e,n){return!ao(n.t,e)||!(!n.globals||e._globals&&ao(n.globals,e._globals))},so=function(e){return Nt(e,At)},co=function(e,n){var t=Ot(e,n);return t?t.index:-1},fo=function(e){var n=co(At,e);return-1===n?null:e.slice(0,n+1)},po=function(e,n,t){if(so(e))return t?[e,null]:e;var r,i,u=fo(e),o=n(rr(e),u,e);return t?[r,i]=o:r=o,null!=r&&(e=u?u+r:r),t?[e,i]:e},vo=function(e,n,t,r,i){return bu(e,e=>{if(Oe(n))return Ot(n,e);if(u(n)){var t=e.lastIndexOf(n);return-1!==t?new Tu(n,t):null}throw Yn(n,1)},t,r,i)},ho=function(e,n,t,r,i){return yu(e,vo(e,n,t,r,i))},mo=function(e){return po(e,e=>ho(e,"."),!0)},go=function(e,n){var t=mo(e)[1];return t?!1!==n?t.toLowerCase():t:null},yo=function(e,n){return ro(e,n)},bo=function(e,n){var t=n?.fileType;if(t){if("js"===(t=t.toLowerCase()))return io(e,n);if("html"===t)return yo(e,n)}return ro(e,n)},wo={},Eo=su(function(e){e=Ju(e);var n=or(e)+"../Compiled/Newest/",t=Mu(e,"//"),r=wo;for(var i of t){var u=i.indexOf("="),o=i.slice(0,u).trim();o=o.split(",").map(e=>e.trim()).filter(e=>!Zu(e));var a=i.slice(u+1).trim(),l=It(n,a).replaceAll("\\","/");for(var s of o)r[s]=l}return r},0),xo=function*(e,n){var t=0;for(var r of e)n(r,t++,e)&&(yield r)},To=function(e){return e.slice()},So=function(e,n){return Oi(e,e.length,n)},Oo=So,_o=function(e,n){return e.call(this,...n,function n(){return Et(arguments)!==n&&Oo(arguments,n),e.apply(this,arguments)})},No=function(e){e||(e={});var n=e.getKeys;n||(n=function(e){return Object.keys(e)});var t=e.recurseIf;if(!t){var r=this.constructor;t=e=>se(e,r)||fe(e)||o(e)}var i=e.leavesOnly??e.leafsOnly??!1,u=this;return _o(function*(e,r,o,a){var l=n(e,r,o);if(l)for(var s=l.length,c=0;c<s;c++){var f=l[c],p=e[f],v=To(r);v.push(f);var h=null,d={value:p,key:f,object:e,path:v,level:o,isLeaf:h,root:u},m=t(p,d);d.isLeaf=h=!m,i&&!h||(yield d),m&&(yield*a(p,v,o+1,a))}},[this,[],0])},Ao=function(e,n){return No.call(e,n)},jo=function(e,n){1===arguments.length&&(n=!0);var t={};for(var r of e)t[r]=n;return t},Io=function(e,n,t,r){var i=hr(e,n,r);oi("acorn-walk").full(i,t)},Fo=function(e,n,t,r){var i;if(u(t))i=e=>e.type===t;else if(o(t)){var a=jo(t);i=e=>a[e.type]}else i=t;var l=[];return Io(e,n,function(e){i.apply(this,arguments)&&l.push(e)},r),l},ko=pr,Co=function(e){var n,t,r,i=e,o=u(i)?hr(i).body[0]:i,a=o.type;if("VariableDeclaration"===a){n="variable";var l=o.declarations[0];t=l.id.name,r=l.init?l.init.raw??pr(l.init):"undefined"}else"FunctionDeclaration"===a?n="function":"ClassDeclaration"===a&&(n="class"),t=o.id.name;var s={type:n,name:t};return r&&(s.value=r),s.text=ko(o),s.node=o,s},Lo=function(e){return Fo(e,!0,["ExportNamedDeclaration","ExportDefaultDeclaration"]).map(function(e){var n=e.declaration;if(n){var t=Co(n);return t.node=e,t}return{node:e}})},Do=function(e,n){n||(n={});var t=n.enableGlobals,r=Eo(n.sourceMap),i={},u=[];return function e(n,o){var a=xo(Ao(n),e=>e.isLeaf);for(var l of a){var[s,c]=l.path,f=i[s];if(f||(f=i[s]={}),null==f[c]){var p=r[s];if(p){var v=Ut(p)+c+".js";if(!ti(v)){var h='Titan compiled value "t.'+s+"."+c+'" does not exist';throw o&&(h+=' (called by "'+o+'")'),An(h+=".")}var d=Pi(v),m=Lo(d)[0];f[c]=m;var g="t."+s+"."+c;e(bo(d,{fileType:"js",enableGlobals:t}).t,g),u.push([s,c])}else console.log('Skipping unmapped module "'+s+'"'),f[c]=!1}}}(e.t),{t:i,globals:e.globals,order:u}},Mo=function(e){return Cu(e).normalize().join()},Po=Mo,Ro=function(e,n){var t=e,r=c(t)?Mr(t):t;return!1!==n&&(r=Mo(r)),r},qo=function(e,n,t){H(e,t).forEach(n)},Bo=function(e,n,t){if(Object.hasOwn(e,n)){var r=e[n];return delete e[n],t?t(r,e,n):r}},Go=function(e,n){En(n,(n,t)=>Bo(e,n,t))},Ko=Go,Wo=function(e,n,t){return null==(n=tt(n,t)).compress&&(n.compress={}),null==n.mangle&&(n.mangle={}),null==n.format&&(n.format={}),Ko(n,{isModule:e=>n.compress.module=e,originalQuotes:e=>n.format.quote_style=e?3:null,mangleEval:e=>n.mangle.eval=e,mangleExcept:e=>n.mangle.reserved=a(e)}),null==n.toplevel&&(n.toplevel=!0),null==n.compress.passes&&(n.compress.passes=1/0),e=dr(e),oi("terser").minify_sync(e,n).code},Ho=function(e,n){n||(n={});var t=n.minify??!1,r=n.debug??!1,i=n.deps??bo(e,n),{t:u,globals:o,order:a}=Do(i,n),l="//Flat references:\n";for(var[s,c]of a){var f=u[s][c],p="t_"+s+"_"+c,v="variable"===f.type?f.value:"("+f.text+")";v=v.replaceAll(to,(e,n,t)=>"t_"+n+"_"+t),l+="var "+p+" = "+v+"\n"}for(var[s,h]of(r&&(l+="//Debug functions:\n",l+=Po('\n function _isFn(value) {\n return typeof value === "function";\n }\n function _withName(value, name) {\n if(_isFn(value)) { Object.defineProperty(value, "name", {value:name}); }\n return value;\n }\n\n ')),l+="//New tree items:\n",l+="var newItems = {",ae(u))){for(var c of(l+="\n\t"+s+": {",Object.keys(h))){var d="t_"+s+"_"+c;r&&(d="_withName("+d+", 't."+s+"."+c+"')"),l+="\n\t\t"+c+": "+d+","}l+="\n\t},"}if(l+="\n}\n",l+="//Add items to t:\n",l+=Mo("\n if(globalThis.t) {\n //If t already exists, integrate new items.\n Object.keys(newItems).forEach(function(modName) {\n if(t[modName]) {\n var newModule = newItems[modName];\n Object.keys(newModule).forEach(function(item) {\n t[modName][item] = newModule[item];\n });\n } else {\n t[modName] = newItems[modName];\n }\n });\n } else {\n globalThis.t = Object.assign({}, newItems);\n }\n "),n.enableGlobals&&o){l+="\n//Add weak global aliases:\n",l+=Ro("\n if(!t._globals) { t._globals = {}; }\n function _ensureGlobal(name) {\n if(!globalThis[name]) { globalThis[name] = {}; }\n if(!t._globals[name]) { t._globals[name] = {}; }\n }\n function _weakGlobalize(globalName, shortName, itemName) {\n var globalObj = globalThis[globalName];\n if(!globalObj[itemName]) { globalObj[itemName] = t[shortName][itemName]; }\n t._globals[globalName][itemName] = true;\n }\n ");var m=eo();En(o,(e,n)=>{l+='\n_ensureGlobal("'+e+'");',qo(n,n=>{var t=m[e];l+='\n_weakGlobalize("'+e+'", "'+t+'", "'+n+'");'})})}if(l+="\n//Export t:",l+="\nif(globalThis.exports) { exports.default = globalThis.t; }",t){var g=ce(t)?t:null;l=Wo(l,g,{mangleExcept:["t","_t"],mangleEval:!0})}return l},zo=function(e){return e instanceof Buffer},Yo=function(e){return ArrayBuffer.isView(e)},Uo=Yo,Vo=function(e){return zo(e)||Uo(e)||u(e)},Qo=function(e){return e.constructor===ArrayBuffer},$o=function(e){return Vo(e)?e:Qo(e)?Buffer.from(e):yn(e)},Jo=function(e){return zi(e)?String(e):$o(e)},Xo=function(e,n){return ri(e),ni().writeFileSync(String(e),Jo(n)),e},Zo=function(e,n,t){t||(t={}),t.fileType||!n||t.deps||(t.fileType=go(n));var r=Ho(e,t),i=t.packagePath||ar(n,t.repl);return Xo(i,r),i},ea={titan:{harness:function(e,n,r){n||(n=e,e=null);var i=e??{};null==i.minify&&(i.minify=!1),i.keepAlive&&Ci();var u,o,a=i.packagePath||ar();if(a=gt(a),ti(a)){if(tu(a)&&(u="New compile"),!u){o=i.text??Mr(n);var l=io(o,i);require(a),lo(t,l)&&(u="New deps")}}else u="No package";return u&&(i.onPack&&i.onPack(u),null==o&&(o=i.text??Mr(n)),i.packagePath=a,Zo(o,er(),i),Li(a)),n.apply(null,r)},getPackagePath:ar,getPackageName:ur,hasNewCompile:tu,getLastCompileTime:$i,getCompiledDir:Mi,locate:Di,getDepsFromJS:io,_getDepsBasic:ro,loadGlobalsMap:eo,_resolveSourceMapPath:Ju,locateSourceMap:$u,_getGlobalsRegex:no,depsRegex:to,hasNewDeps:lo,packTextToFile:Zo,packText:Ho,getDeps:bo,getDepsFromHTML:yo,_getAllDeps:Do,loadSourceMap:Eo,sourceMap:wo},node:{keepAlive:Ci,is:D,display:be,util:ye,_builtInModule:ge,requireBuiltIn:me,require:oi,_basicRequire:$n,child_process:st,requireLocal:yt,path:dt,_requireFromDir:Lt,_requireDirCache:wt,_createRequire:Ct,module:kt,promptYNSync:Yr,run:Rr,getScriptPath:er,positionalArgs:Zt,args:Vt,sigint:Hr,interrupt:Wr,ensureRequireDir:Jr,addRequireDir:$r,fs:ni,reloadRequireLocal:Li,os:Hu},ev:{multiHandle:Bn,on:Ai,resolveValue:Gn,enable:pi,EventInterface:fi,Interface:ci,_ensureHasTarget:si,targetSym:Qn,EventTarget:li,polyfill:ai,handle:Ti,ListenerHandle:xi,ensureEnabled:hi,can:vi,once:gi,off:Si},o:{multiHandle:qn,isAny:y,setHidden:T,addNonEnumerable:x,defineProperty:E,weakAssign:w,merge:b,safeEnsure:A,ensure:N,hideKey:B,makeNonEnumerable:q,filterSplit:J,keys:H,allKeys:W,split:$,pick:z,iterateAll:le,iterate:ae,iterator:oe,entries:ue,isPure:fe,is:ce,setProtoLazy:he,setGetter:pe,forceSet:ve,display:Sn,toLiteral:Tn,constructorMatches:Se,ensureCustom:ke,get:je,set:Ie,createEmpty:Ge,remove:Ve,reduce:xn,each:En,addInterface:Un,safeSetDefaults:nt,safeEnsureMulti:et,ensureMulti:Zn,Cache:bt,setDefaults:Dt,resolveKeys:Ur,diveGet:Xr,safeSet:mi,touch:di,deepCopy:lu,fromLines:Iu,safeDefault:Fu,hasKey:oo,has:uo,fromKeys:jo,eachKey:qo,consumeOptions:Ko,consumeMulti:Go,consume:Bo},handle:{createMulti:Rn,MultiHandle:Mn,HandleInterface:Dn,Handle:Ei},class:{addInterface:e,create:R,setName:k,addStatics:C,setDisplay:P,isInterface:Wn,interface:Vn},ifc:{create:Cn,Interface:kn,is:Kn},f:{createClass:G,ensureConstructor:d,createConstructor:h,isArrowFn:p,isArrow:f,is:c,wrap:v,retThis:m,setName:F,one:L,eq:K,memoize:en,MemoizedFunction:Ze,not:ot,body:Mr,isArrowString:br,_getArrowFnBody:Lr,_getNormalFnBody:Dr,hookAfterMethod:wi,hookAfter:bi,injectAfter:yi,interval:Ii,TimerHandle:ji,noop:Fi,cache:su,recurse:_o},s:{is:u,isAny:i,isPrimitive:n,isObject:r,toLiteral:gn,quote:mn,escape:dn,replaceAll:hn,apply:Te,withIndices:xe,chars:nn,from:yn,spaceBefore:In,fromKey:Fn,endsWith:Nt,resolveIndex:xt,removeTrailing:qt,removeFromEnd:Rt,_removeStringFromEnd:Mt,_removeRegexFromEnd:Pt,splitAtIndex:Bt,ensureStartsWith:Kt,replace:Yt,decapitalize:nr,removeLineBreaks:fr,removeMulti:cr,removeAll:sr,resolve:Pr,ensure:yr,after:Tr,index:xr,_indexWithIndices:wr,indexOfFn:Er,removeLeading:Cr,removeFromStart:kr,_removeStringFromStart:Sr,_removeRegexFromStart:Fr,remove:Or,removeQuotes:uu,splitLines:Lu,lines:Cu,LinesArray:ku,repeat:mu,splitFirst:Nu,_splitByMatch:yu,match:_u,_matchWithIndices:bu,replaceParams:Gu,contains:Ru,_createParamsObj:qu,_replaceByObj:Bu,before:Xu,isCapitalized:Zu,splitLast:ho,matchLast:vo,normalize:Po,normalizeMLS:Mo,mls:Ro},a:{is:o,ensure:a,filterSplit:Q,iterate:ne,iterator:ee,apply:ie,resolveIndices:re,resolveIndex:te,wrapIndices:Ee,wrapIndex:we,pick:Ae,create:Ne,fill:_e,push:Re,add:Pe,splitLast:We,splitTail:Ke,toLiteral:bn,display:On,unboxArgs:Pn,assert:it,removeNullish:lt,removeByFilter:at,replaceContents:ut,last:Et,removeEmpty:pu,removeIndex:vu,mapToObj:hu,slice:du,pushMulti:xu,addMulti:Eu,pushThroughMulti:wu,copy:To},p:{asyncJoint:s,is:l},v:{isPrimitive:g,constructorMatches:se,display:_n,toLiteral:wn,resolve:Fe,type:zn,req:Br,nullIfNaN:Ki,isEmpty:fu},err:{nyi:I,NYIError:_,Error:O,Enhanced:S,defaultFromFn:j,value:Nn,ValueError:de,create:An,type:Yn,TypeError:Hn,prepend:vr,req:qr},sym:{display:M,value:Be,cleanup:Ln},macro:{config:function(e){}},set:{resolve:V,ensure:U,is:Y},n:{cap:Z,least:X,fromString:Hi,ensure:Wi,is:zi,tryCoerce:ju,tryParse:Au},re:{is:Oe,ensureGlobal:sn,global:ln,addFlag:an,copy:on,updateFlagString:un,parseFlagString:tn,createFlagString:rn,createEscaped:vn,create:fn,resolveFlags:cn,escape:pn,matchEnd:_t,matchLast:Ot,matchAll:St,setStartIndex:Tt,slash:At,matchStart:Ir,match:jr,ensureLocal:Ar,local:Nr,removeFlag:_r,quotes:iu,quote:ru,newline:cu,text:gu,safeCreateResult:Ou,createResult:Su,RegexResult:Tu,test:Pu,lastIndex:co},map:{Cache:Me,ensure:De,get:Ce,set:Le,MultiCache:Xe,diveEnsure:Ue,createEmpty:Ye,diveDelete:Je,remove:$e},args:{ensureArray:qe,unshift:Ni,prepend:_i,insert:Oi,push:Oo,append:So},tree:{ensure:ze,dive:He,remove:Qe,setCustom:Vr,copy:au,isSubsetOf:ao,iterate:Ao,iterator:No},gen:{join:jn,filter:xo},npm:{isBuiltIn:Jn,isFile:Xn,install:ht,_runCommand:vt},os:{run:pt,_resolveStdio:rt},opt:{resolve:tt},win:{is:ct},shell:{_handleError:ft},path:{abs:gt,sep:mt,ensureEndsWith:Ft,join:It,ensureTrailingSlash:jt,fws:Ut,baseName:ir,_removeExtsFromFile:tr,file:rr,dir:or,resolveVars:Qu,string:Ku,_defaultParams:Vu,windir:Wu,_getDefaultTempDir:zu,getDesktop:Uu,getUserDir:Yu,ext:go,splitExt:mo,ignoreDir:po,isDir:so,dirPart:fo},js:{enhance:gr,ensureReturn:Wt,splitLastExpression:Gt,enableAwait:zt,_nodeEnableAwait:Ht,useTitan:lr,inline:mr,removeComments:dr,fromAST:pr,parse:hr,removeQuotes:ou,getExports:Lo,getNodes:Fo,eachNode:Io,parseDeclaration:Co,fromASTNode:ko,minify:Wo},cli:{positionalArgs:Xt,resolveArgs:Jt,splitArgs:$t},env:{args:Qt,setConfig:Qr,getConfig:Zr,resolveConfig:ei,keepAlive:ki},proc:{interrupt:Kr,signal:Gr},bool:{fromYN:zr},fs:{ensureDir:ui,exists:ti,mkdir:ii,ensureParent:ri,load:Pi,getModifiedDate:eu,stat:Zi,deepStat:Ji,shallowStat:Xi,loadLines:Mu,loadText:Du,write:Xo,formatRaw:Jo},d:{from:Qi,create:Vi,resolve:Ui,now:Ri,ensure:Yi,copy:qi,fromYear:Bi,_resolveNative:Gi,isBefore:nu},bin:{ensureByteSafe:$o,isByteSafe:Vo,isNodeBuffer:zo,isTA:Uo},ab:{isTA:Yo,is:Qo}};globalThis.t?Object.keys(ea).forEach(function(e){if(t[e]){var n=ea[e];Object.keys(n).forEach(function(r){t[e][r]=n[r]})}else t[e]=ea[e]}):globalThis.t=Object.assign({},ea),globalThis.exports&&(exports.default=globalThis.t);
1
+ var e=function(e,n){return n(e)},n=function(e){return"string"==typeof e},r=function(e){return e instanceof String},i=function(e){return n(e)||r(e)},u=i,o=function(e){return Array.isArray(e)},a=function(e){return o(e)?e:[e]},l=function(e){return e instanceof Promise},s=function(e,n){var t=e;return l(t)?t.then(n):n(t)},c=function(e){return"function"==typeof e},f=function(e){return c(e)&&null==e.prototype},p=f,v=function(e){return function(){return e.apply(this,arguments)}},h=function(e,n){var t;return t=n?function(){this.super=n;var t=e.apply(this,arguments);return s(t,()=>(delete this.super,t))}:p(e)?v(e):e,t._isConstructor=!0,t},d=function(e,n){return e._isConstructor?e:h(e,n)},m=function(){return this},g=function(e){var n=typeof e;return"object"!==n&&"function"!==n||null===e},y=function(e){return!g(e)},b=function(e,n,t){return!1===t?Object.keys(n).forEach(t=>{void 0===e[t]&&(e[t]=n[t])}):Object.assign(e,n),e},w=function(e,n){return b(e,n,!1)},E=function(e,n,t,r){return t||(t={}),r&&w(t,r),null==t.enumerable&&(t.enumerable=!0),null==t.configurable&&(t.configurable=!0),Object.defineProperty(e,n,t)},x=function(e,n,t,r){return E(e,n,{value:t,writable:!0,enumerable:!1},r),t},T=x,S=function(e){return class extends e{constructor(e,n){super(e,n);var t=this.constructor.name;t&&(this.name=t)}}},O=S(globalThis.Error),_=class extends O{constructor(e,n){super(e??"Not yet implemented",n)}},A=function(e,n,t,r){var i=e[n];if(void 0===i){var u=t;!1!==r&&c(u)&&(u=u(e,n)),e[n]=i=u}return i},N=function(e,n,t,r){return e||(e={}),A(e,n,t,r),e},j=function(e,n){return N(e,"fromFn",n,!1)},I=function(e,n){return new _(e,j(n,I))},F=function(e,n){Object.defineProperty(e,"name",{value:n,configurable:!0}),T(e,"displayName",n)},k=F,C=function(e,n){return Object.assign(e,n)},L=function(e){var n,t=!1;return function(){return t||(t=!0,n=e.apply(this,arguments)),n}},D=L(function(){return"undefined"==typeof window}),M=D()?require("util").inspect.custom:Symbol("Display"),P=function(e,n){e.prototype[M]=n},R=function(e,n,t,r,i,l){l||(l={}),u(n)&&(n=null);var c,f,p,v=t;v&&(o(v)?([f,p]=v,f&&(f=d(f))):c=d(v,n));var h=l.bareFn;l.singleton&&(h=function(){return null==w.default&&(w.default=new w(...arguments)),w.default});var g,b=f||c||n||m;function w(){if(!new.target&&h&&!(this instanceof w))return h.apply(this,arguments);var e=this;return s(b.apply(e,arguments),t=>{if(t&&y(t)&&(e=t,f)){if(!new.target)throw I('Prototype repair is NYI for class instantiation without "new".');if(!n)throw I("instanceFn is not yet supported when extendsClass is null.");var r=Object.getPrototypeOf(this);Object.getPrototypeOf(e)!==r&&Object.setPrototypeOf(e,r)}return p?s(p.apply(e,arguments),()=>e):e})}return e&&k(w,e),n&&Object.setPrototypeOf(w,n),r?(g=r,n&&Object.setPrototypeOf(r,n.prototype)):g=n?Object.create(n.prototype):{},T(g,"constructor",w),w.prototype=g,i&&C(w,i),l.display&&P(w,l.display),l.implements&&a(l.implements).forEach(e=>e(w)),w},q=function(e,n){Object.defineProperty(e,n,{enumerable:!1})},B=q,G=function(e,n,t,r,i){var u=Symbol();return R(e,Function,[function(){var e=function(){return e[u].apply(this,arguments)};return e},function(){var e=n.apply(this,arguments);if(!e)throw new Error("Constructor must return a function.");this[u]=e,B(this,u)}],t,r,i)},K=function(e){return n=>n===e},W=function(e){return Reflect.ownKeys(e)},H=function(e,n){return(n?W:Object.keys)(e)},z=function(e,n,t){var r={};for(var i of n)Object.hasOwn(e,i)&&(r[i]=e[i],!0===t&&delete e[i]);return r},U=function(e){return e instanceof Set},Y=function(e){return U(e)?e:o(e)?new Set(e):new Set([e])},V=Y,Q=function(e,n){var t=[],r=[];return e.forEach((i,u)=>(n(i,u,e)?t:r).push(i)),[t,r]},$=function(e,n,t,r){var i=n;if(c(i))throw I();var u=H(e,r),o=V(i),[a,l]=Q(u,e=>o.has(e));return[z(e,a,t),!0===t?e:z(e,l,!1)]},J=function(e,n,t){var r=H(e,t).filter(t=>n(e[t],t,e));return $(e,r,!1,t)},X=function(e,n){return n<e?n:e},Z=function(e,n){return X(e,n)},ee=function*(e,n){null==e&&(e=0),n=null==n?this.length:Z(n,this.length);for(var t=e;t<n;t++)yield this[t]},ne=function(e,n,t){return null==n&&null==t?e[Symbol.iterator].call(e):ee.call(e,n,t)},te=function(e,n){return n<0?e.length+n:n},re=function(e,n,t,r){return n=null==n?0:te(e,n),t=null==t?e.length:te(e,t),r&&(0==r.inclusiveStart&&n++,r.inclusiveEnd&&t++),[n,t]},ie=function(e,n,t,r){[t,r]=re(e,t,r);for(var i=t;i<r;i++){var u=n(e[i],i,e);void 0!==u&&(e[i]=u)}return e},ue=function(e,n){return n?ie(H(e,n),n=>[n,e[n]]):Object.entries(e)},oe=function(e){return ne(ue(this,e))},ae=function(e,n){var t=e[Symbol.iterator];return t?t.call(e):oe.call(e,n)},le=function(e){return ae(e,!0)},se=function(e,n){return null!=e&&e.constructor===n},ce=function(e){return se(e,Object)},fe=ce,pe=function(e,n,t,r){return E(e,n,{get:t},r)},ve=function(e,n,t,r){return E(e,n,{value:t,writable:!0},r),t},he=function(e,n,t){pe(e,n,function(){if(this===e)return null;var r=t.call(this);return ve(this,n,r),r})},de=class extends O{constructor(e,n){super(e??"Unexpected value",n)}},me=function(e){return require("node:"+e)},ge=function(e){return L(()=>me(e))},ye=ge("util"),be=function(e,n){return n||(n={}),null==n.colors&&(n.colors=!0),ye().inspect(e,n)},we=te,Ee=function(e,n,t,r){return void 0!==n&&(null===n||0===n?n=void 0:(n=we(e,n),r&&0==r.inclusiveStart&&n++)),void 0!==t&&(null===t||t===e.length?t=void 0:(t=we(e,t),r&&r.inclusiveEnd&&t++)),[n,t]},xe=function(e,n,t,r,i,u){if(t||null!=r){[t,r]=Ee(e,t,r,u);var o=e.slice(t,r),a=n(o);return i?i(a,t,r,o,e):a}return n(e)},Te=function(e,n,t,r,i){return xe(e,n,t,r,(n,t,r)=>(void 0!==t?e.slice(0,t):"")+(n||"")+(void 0!==r?e.slice(r):""),i)},Se=se,Oe=function(e){return Se(e,RegExp)},_e=function(e,n,t,r){var i=n;if([t,r]=re(e,t,r),c(i))for(var u=t;u<r;u++)e[u]=i(u,e);else e.fill(i,t,r);return e},Ae=function(e,n){var t=new Array(e||0);return arguments.length>1&&_e(t,n),t},Ne=function(e,n){return Ae(n.length,t=>e[n[t]])},je=function(e,n){return e[n]},Ie=function(e,n,t){return e[n]=t},Fe=function(e,n,t){var r=e;return c(r)?r.apply(t,n):r},ke=function(e,n,t,r,i){r||(r=je);var u=r(e,n);return void 0===u&&(u=Fe(t,[e,n]),i||(i=Ie),i(e,n,u)),u},Ce=function(e,n){return e.get(n)},Le=function(e,n,t){return e.set(n,t)},De=function(e,n,t){return ke(e,n,t,Ce,Le)},Me=class{constructor(){this.store=new Map}get(e,n){return De(this.store,e,n)}remove(e){return this.store.delete(e)}delete(e){return this.remove(e)}},Pe=function(e,n){return e.push(n),e},Re=Pe,qe=function(e){var n=e;return Array.isArray(n)?n:Array.from(n)},Be=Symbol("Value"),Ge=function(){return{}},Ke=function(e){return[e.slice(0,-1),e[e.length-1]]},We=Ke,He=function(e,n,t,r,i,u){t||(t=je),null==r&&(r=Ge),null==i&&(i=Ie),null==u&&(u=t);for(var[o,a]=We(n),l=e,s=o.length,c=0;c<s;c++){var f=o[c],p=t(l,f);if(void 0===p){if(!r)return;p=ke(l,f,r,t,i)}l=p}if(u)return u(l,a,i)},ze=function(e,n,t,r,i,u){return He(e,n,r,i,u,(e,n)=>ke(e,n,t,r,u))},Ue=function(){return new Map},Ye=function(e,n,t){return ze(e,n,t,Ce,Ue,Le)},Ve=function(e,n){return delete e[n],e},Qe=function(e,n,t,r){return He(e,n,t,!1,!1,r||Ve)},$e=function(e,n){return e.delete(n)},Je=function(e,n){return Qe(e,n,Ce,$e)},Xe=class{constructor(){this.store=new Map}get(e,n){return e=Re(qe(e),Be),Ye(this.store,e,n)}remove(e){return e=Re(qe(e),Be),Je(this.store,e)}delete(e){return this.remove(e)}},Ze=G("MemoizedFunction",function(e,n){if(this.base=e,null!=n)if(1===(n=a(n)).length){this.cache=new Me;var t=n[0];this._cacheKeyFormatter=e=>e[t]}else this.cache=new Xe,this._cacheKeyFormatter=e=>Ne(e,n);else this.cache=new Xe,this._cacheKeyFormatter=e=>e;var r=this;return function(){var n=r._cacheKeyFormatter(arguments);return r.cache.get(n,()=>e.apply(this,arguments))}},{remove(e){return this.cache.remove(this._cacheKeyFormatter(e))}}),en=function(e,n){return new Ze(e,n)},nn=function(e){return new Set(e)},tn=function(e){var n={};if(e){var t=nn(e);t.has("g")&&(n.global=!0),t.has("i")&&(n.caseInsensitive=!0),t.has("y")&&(n.sticky=!0)}return n},rn=function(e){var n="";return e.global&&(n+="g"),(e.caseInsensitive||0==e.caseSensitive)&&(n+="i"),e.sticky&&(n+="y"),n},un=function(e,n){var t=tn(e);return rn(Object.assign(t,n))},on=function(e,n){var t=n,r=void 0;return u(t)?r=t:ce(t)&&(r=un(e.flags,t)),new RegExp(e,r)},an=function(e,n){return on(e,e.flags+n)},ln=function(e){return an(e,"g")},sn=en(function(e){return e.global?e:ln(e)},0),cn=function(e){var n=e;return null==n?void 0:u(n)?n:rn(n)},fn=function(e,n){return new RegExp(e,cn(n))},pn=function(e){return e.replace(/[-[\]{}()*+!<=:?.\/\\^$|#\s,]/g,"\\$&")},vn=function(e,n){return fn(pn(e),n)},hn=function(e,n,t,r,i,o){return Te(e,function(e){return e.replaceAll?(Oe(n)&&(n=sn(n)),e.replaceAll(n,t)):(n=u(n)?vn(n,"g"):sn(n),this.replace(n,t))},r,i,o)},dn=function(e,n,t){return hn(e,n,(t??"\\")+n)},mn=function(e,n,t){return null==n&&(n='"'),!1!==t&&(e=dn(e,n,t)),n+e+n},gn=function(e){return mn(e,'"')},yn=function(e){return fe(e)?Tn(e):String(e)},bn=function(e,n){return n||(n=wn),"["+e.reduce(function(e,t){return e+n(t)+", "},"").slice(0,-2)+"]"},wn=function(e){return u(e)?gn(e):o(e)?bn(e):yn(e)},En=function(e,n,t){H(e,t).forEach((t,r,i)=>n(t,e[t],r,i))},xn=function(e,n,t,r){var i=null!=t?t:"";return En(e,function(){i=n.call(this,i,...arguments)},r),i},Tn=function(e,n){return n||(n=wn),"{"+xn(e,function(e,t,r){return e+t+":"+n(r)+", "},"",!0).slice(0,-2)+"}"},Sn=function(e,n){return null==n&&(n=1),n<=0?"[object Object]":Tn(e,e=>_n(e,n-1))},On=function(e,n){return null==n&&(n=1),n<=0?"[object Array]":bn(e,e=>_n(e,n-1))},_n=function(e,n){return void 0===e?"undefined":null===e?"null":D()?be(e,n):ce(e)?Sn(e,maxNumLevels):o(e)?On(e,maxNumLevels):yn(e)},An=function(e,n,t,r){if(0===arguments.length)return new de("Unexpected value received");r||(r={});var i,{expected:u}=r;return i=u?"Received "+_n(e)+", expected one of "+_n(u):"Unexpected value received: "+_n(e),t&&(i+=' for "'+t+'"'),null!=n&&(i+=" (index "+n+")"),r.fromFn||(r.fromFn=An),new de(i,r)},Nn=function(e,n,t){var r=new O(e,t);return n&&Object.assign(r,n),r},jn=function*(e,n){yield*e,yield*n},In=function(e){return e?" "+e:""},Fn=function(e){return u(e)?e:e.toString()},kn=G("Interface",function(e,n,t){t||(t={}),F(this,e),n?[this.stubs,this.defaults]=J(n,K(!0),!0):(this.stubs={},this.defaults={});var r=t.implements?a(t.implements):null,i=this;return function(e){var n=e;return r&&r.forEach(e=>e(n)),i.decorate(n),i.assert(n),n}},{decorate(e){var n,t,r=e;for(var[i,u]of(r.prototype?(n=r.prototype,t=!0):(n=r,t=!1),le(this.defaults)))if(void 0===n[i])if(fe(u))if(u.value)n[i]=u.value;else{if(!u.setup)throw An(u,null,"defaultVal");if(!t)throw u.setup(),I("setupFn is NYI for instances");he(n,i,u.setup)}else n[i]=u;return r},assert(e){var n=e,t=null!=n.prototype,r=n.prototype||n,i=jn(le(this.stubs),le(this.defaults));for(var[u]of i){var o;if(void 0===r[u])throw o=t?"Class"+In(n.name):"Object "+_n(n),o+=" does not satisfy interface "+this.name+' (missing key "'+Fn(u)+'")',Nn(o)}return n},validate(e){try{return this.assert(e),!0}catch(e){return!1}}},{is(e){return e instanceof this}}),Cn=function(e,n,t){return new kn(e,n,t)},Ln=Symbol("Cleanup"),Dn=Cn("Handle",{remove:!0,[Ln](){this.remove()}}),Mn=e(class{constructor(e){this.handles=e}remove(){this.handles.forEach(e=>e.remove())}add(e){return this.handles.push(e),this}},Dn),Pn=function(e){return 1===e.length&&o(e[0])?e[0]:array},Rn=function(...e){return new Mn(Pn(e))},qn=Rn,Bn=qn,Gn=function(e){var n,t,r=e;return null!=r&&(n=r.detail??r.data??r,y(r)&&(t=r)),[n,t,r]},Kn=function(e){return kn.is(e)},Wn=Kn,Hn=S(globalThis.TypeError),zn=function(e){return null==e?e:e.constructor},Un=function(e,n,t,r){if(0===arguments.length)return new Hn("Unexpected type received");r||(r={});var i,{type:u,expected:o}=r;return null==u&&(u=zn(e)),u&&u.name&&(u=u.name),o?(o.name&&(o=o.name),i="Expected "+o+", received "):i="Unexpected type received (",i+=u,null!=e&&(i+=" ("+_n(e)+")"),o||(i+=")"),t&&(i+=' for "'+t+'"'),null!=n&&(i+=" (index "+n+")"),r.fromFn||(r.fromFn=Un),new Hn(i,r)},Yn=function(e,n,t){if(!Wn(n))throw Un(n,1);return n.decorate(e),t&&t.call(e,e,n),n.assert(e),e},Vn=Cn,Qn=Symbol("EventTarget"),$n=function(e){return require(e)},Jn=function(e){return!!e.startsWith("node:")||$n("node:module").isBuiltin(e)},Xn=function(e){return e.startsWith(".")},Zn=function(e,n,t){return Object.keys(n).forEach(r=>A(e,r,n[r],t)),e},et=function(e,n,t){return Zn(e||{},n,t)},nt=function(e,n,t){return n?et(e,n,t):e??{}},tt=function(e,n){return nt(e,n,!0)},rt=function(e){var n=e.stdio;if(n){if(!o(n)){if(!u(n))throw Un(n,"stdio");if("pipe"===n)n=["pipe","pipe","pipe"];else if("inherit"===n)n=["inherit","inherit","inherit"];else if("ignore"===n)n=["ignore","ignore","ignore"];else{if("overlapped"!==n)throw An(n,"stdio");n=["overlapped","overlapped","overlapped"]}e.stdio=n}}else n=e.stdio=[null,null,null];return n},it=function(e){if(!o(e))throw Un(e,null,null,{expected:Array});return!0},ut=function(e,n){var t=n.length;e.length=t;for(var r=0;r<t;r++)e[r]=n[r];return e},ot=function(e){return function(){return!e.apply(this,arguments)}},at=function(e,n){return ut(e,e.filter(ot(n)))},lt=function(e){return at(e,e=>null==e)},st=ge("child_process"),ct=L(function(){return"win32"===process.platform}),ft=function(e,n,t){if(t||(t={}),n(e))throw e;if(t.nullOnErr)return null;var r=t.onErr;if(void 0!==r)return Fe(r);throw e},pt=function(e,n,t,r){var i=(t=tt(t,r)).liveOutput,u=t.captureOutput??t.capture,o=t.captureErr??t.capture;u&&null==i&&(i=!1),t.dir&&(t.cwd=t.dir);var a=rt(t);if(null==a[0]&&!1!==t.allowInput){if(t.input)throw Nn("options.allowInput (user) and options.input (programmatic) cannot be used simultaneously for synchronous child processes.");a[0]="inherit"}if(null==a[1])if(u){if(i)throw Nn("options.captureOutput and options.liveOutput cannot be used simultaneously for synchronous child processes.");a[1]="pipe"}else a[1]=i??1?"inherit":"ignore";if(null==a[2]){o=t.captureErr??!1;var l=t.showErr;if(o&&l)throw Nn("options.captureErr and options.showErr cannot be used simultaneously for synchronous child processes.");a[2]=o?"pipe":l??1?"inherit":"ignore"}t.encoding||(t.encoding="utf8"),n&&(it(n),lt(n));try{var s=st().execFileSync(e,n,t);null!=s&&t.trim&&(s=s.trim());var c=t.map??t.mapFn;return c&&(s=c(s)),s}catch(e){if(ct())return ft(e,e=>"ENOENT"===e.code,t);throw e}},vt=function(e,n){return n||(n={}),null==n.captureOutput&&(n.captureOutput=!1),n.shell=!0,n.filterExtensions=!1,pt("npm",e,n)},ht=function(e,n,t){return vt(["install",e,n?"-g":null],t)},dt=ge("path"),mt=dt().sep,gt=function(e,n,t){e=String(e);var r=dt().resolve,i=n?r(n,e):r(e);return t?i+mt:i},yt=function(e){return require(gt(e))},bt=class{constructor(){this.store={}}get(e,n){return A(this.store,e,n)}remove(e){return delete this.store[e]}delete(e){return this.remove(e)}},wt=new bt,Et=function(e){return e[e.length-1]},xt=te,Tt=function(e,n,t){return e=on(e,{global:!0}),null!=t&&(n=xt(t,n)),e.lastIndex=n,e},St=function(e,n,t){return e=null!=t?Tt(e,t,n):sn(e),Array.from(n.matchAll(e))},Ot=function(e,n,t){return null!=t&&(n=n.slice(0,t)),Et(St(e,n))||null},_t=function(e,n){var t=Ot(e,n);return t&&n.length===t.index+t[0].length?t:null},At=function(e,n){if(u(n))return e.endsWith(n);if(Oe(n))return!!_t(n,e);throw Un(n,1,"matchThis")},Nt=/\/|\\/,jt=function(e){return At(e,Nt)?e:e+mt},It=function(e,n,t){if(D()){var r=dt().join(String(e),String(n));return t?jt(r):r}throw I()},Ft=function(e,n){return e.endsWith(n)?e:It(e,n)},kt=ge("module"),Ct=function(e){return e=Ft(e,"node_modules"),kt().createRequire(e)},Lt=function(e,n){return wt.get(e,()=>Ct(e))(n)},Dt=function(e,n,t){return n?Zn(e,n,t):e},Mt=function(e,n){return e.endsWith(n)?e.substring(0,e.length-n.length):e},Pt=function(e,n){var t=_t(n,e);return t?e.slice(0,t.index):e},Rt=function(e,n){if(u(n))return Mt(e,n);if(Oe(n))return Pt(e,n);throw Un(n,1)},qt=Rt,Bt=function(e,n){return[e.slice(0,n),e.slice(n)]},Gt=function(e){e=qt(e.trim(),";");var n=Math.max(e.lastIndexOf(";"),e.lastIndexOf("\n"));return Bt(e,n+1)},Kt=function(e,n){return e.startsWith(n)?e:n+e},Wt=function(e){var[n,t]=Gt(e);return n+Kt(t.trim(),"return ")},Ht=function(e){return oi("node-repl-await").processTopLevelAwait(e)},zt=function(e){return Ht(e)??e},Ut=hn,Yt=function(e,n){return""===e?e:(!1!==n&&(e=jt(e)),Ut(e,"\\","/"))},Vt=L(function(){return process.argv.slice(2)}),Qt=Vt,$t=function(e,n){const t=[];let r="",i="outside",u=!1;for(let o=0;o<e.length;o++){const a=e[o];switch(i){case"outside":'"'===a?u?(r+=a,u=!1):(n&&(r+=a),i="insideQuote"):"\\"===a?u=!0:" "===a?(r.length>0&&(t.push(r),r=""),u=!1):(r+=a,u=!1);break;case"insideQuote":'"'!==a||u?"\\"!==a||u?(r+=a,u=!1):u=!0:(n&&(r+=a),i="outside")}}return r.length>0&&t.push(r),t},Jt=function(e,n){var t=e;return null==t?Qt():u(t)?$t(t,n):t},Xt=function(e,n){return Jt(e,n).slice()},Zt=Xt,er=function(){var e=require.main?.filename;return e||(null!=process._eval?null:Zt(process.argv)[1])},nr=function(e){return e.charAt(0).toLowerCase()+e.slice(1)},tr=function(e){return e.split(".")[0]},rr=function(e){return dt().win32.basename(String(e))},ir=function(e){return tr(rr(e))},ur=function(e,n,t,r){e||(e=er()??"_console.js");var i=nr(ir(e));return n&&(i+="_repl"),i+(t&&r?.dynamic?".dypkg.json":".pkg.js")},or=function(e,n){return e=dt().dirname(String(e)),!1===n?e:jt(e)},ar=function(e,n,t,r){var i,u=ur(e,n,t,r);return i=e?or(e):"./",gt(i+u)},lr=function(e){return'require("'+Yt(ar(),!1)+'");\n'+e},sr=function(e,n){return hn(e,n,"")},cr=function(e,n){return n.forEach(n=>e=sr(e,n)),e},fr=function(e){return cr(e,["\r","\n"])},pr=function(e,n){return oi("astring").generate(e,n)},vr=function(e,n){return e.stack=n+"\n"+e.stack,e},hr=function(e,n,t){t||(t={}),t.ecmaVersion||(t.ecmaVersion=2024),!1!==n&&(t.sourceType="module"),null==t.allowAwaitOutsideFunction&&(t.allowAwaitOutsideFunction=!0),null==t.allowReturnOutsideFunction&&(t.allowReturnOutsideFunction=!0);var r=oi("acorn");try{return r.parse(e,t)}catch(n){throw vr(n,"Acorn parsing error: "+e)}},dr=function(e,n,t){return pr(hr(e,n,t))},mr=function(e){return fr(dr(e))},gr=function(e,n,t){return(n||t)&&(n||(n={}),t&&Dt(n,t),n.ensureReturn&&(e=Wt(e)),n.topLevelAwait&&(e=zt(e)),n.useTitan&&(e=lr(e)),n.keepAlive&&(e="\nsetInterval(()=>{}, 100000);\n"+e),(n.logErrors||n.keepAlive)&&(e="process.on('uncaughtException', console.error);\nprocess.on('unhandledRejection', console.error);\n"+e),n.inline&&(e=mr(e))),e},yr=function(e){return u(e)?e:yn(e)},br=function(e){var n=e.indexOf("{");return-1===n||e.slice(0,n).includes("=>")},wr=function(e,n,t,r,i){return xe(e,n,t,r,(e,n)=>-1===e?-1:void 0===n?e:n+e,i)},Er=function(e,n){return Array.prototype.findIndex.call(e,n)},xr=function(e,n,t,r,i){var o=u(n);return o&&null==r&&!i?e.indexOf(n,t):wr(e,e=>o?e.indexOf(n):Oe(n)?e.search(n):Er(e,n),t,r,i)},Tr=function(e,n,t,r,i){var u=xr(e,n,t,r,i);return-1===u?null:e.slice(u+1,r)},Sr=function(e,n){return e.startsWith(n)?e.substring(n.length):e},Or=sr,_r=function(e,n){return on(e,Or(e.flags,n))},Ar=function(e){return _r(e,"g")},Nr=en(function(e){return e.global?Ar(e):e},0),jr=function(e,n,t){return(e=null!=t?Tt(e,t,n):Nr(e)).exec(n)},Ir=function(e,n){var t=jr(e,n);return t&&0===t.index?t:null},Fr=function(e,n){var t=Ir(n,e);return t?e.slice(t[0].length):e},kr=function(e,n){if(u(n))return Sr(e,n);if(Oe(n))return Fr(e,n);throw Un(n,1)},Cr=kr,Lr=function(e){var n=Tr(e,"=>").trim();return Cr(qt(n,"}"),"{")},Dr=function(e){return Tr(e,"{").slice(0,-1)},Mr=function(e){var n=yr(e);return br(n)?Lr(n):Dr(n)},Pr=function(e){return null==e?"":u(e)?e:c(e)?Mr(e):String(e)},Rr=function(e,n){var t=n?.basic?null:{topLevelAwait:!0,useTitan:!0},r=gr(Pr(e),n,t);return pt("node",[n?.mode??"-p",r],n)},qr=function(e,n,t,r){var i="Required argument";return t&&(i+=' "'+t+'"'),null!=n&&(i+=" (index "+n+")"),i+=" missing",arguments.length>0&&(i+=" (received "+_n(e)+")"),Nn(i,null,j(r,qr))},Br=function(e,n,t){if(null==e)throw qr(e,n,t,{fromFn:Br});return e},Gr=function(e,n){return process.kill(e,Br(n,0,"signalName"))},Kr=function(e){return Gr(e,"SIGINT")},Wr=function(){return Kr(process.pid)},Hr=Wr,zr=function(e){if("Y"===(e=e.toUpperCase()))return!0;if("N"===e)return!1;throw An(e,0,"char")},Ur=function(e){null==e&&(e="Are you sure? [y/n]: "),process.stdout.write(e);var n=Rr(function(){const e=process.stdin,n=process.stdout;e.setRawMode(!0),e.setEncoding("utf8"),e.on("data",e=>{var t=e.toUpperCase();"Y"===t||"N"===t?(n.write(e),process.exit(0)):""===e&&(n.write("^C"),process.exit(0))})},{mode:"-e",basic:!0,stdio:["inherit","pipe"]});if("^C"===n)throw process.stdout.write(n),Hr(),Nn("Prompt was cancelled via interrupt.");return console.log(n),zr(n)},Yr=function(e){return o(e)?e:u(e)?e.split("."):[e]},Vr=function(e,n,t,r,i,u){var o=t;return He(e,n,r,i,u,(e,n,t)=>t(e,n,Fe(o)))},Qr=function(e,n){var t=n,r=globalThis.config;r||(r=globalThis.config={});var i,u=Yr(e);return u.length>1?i=Vr(r,u,t):(i=Fe(t),r[u[0]]=i),i},$r=function(e,n){return Qr("node.require.customDirs",t=>(t||(t=[]),!1!==n&&(e=Ft(e,"node_modules")),t.includes(e)||t.push(e),t)),e},Jr=$r,Xr=He,Zr=function(e){var n=globalThis.config;if(n){var t=Yr(e);return t.length>1?Xr(n,t):n[t[0]]}},ei=function(e,n,t){if(null!=e)return e;var r=Zr(n);return null!=r?r:t},ni=ge("fs"),ti=function(e){return!!ni().lstatSync(String(e),{throwIfNoEntry:!1})},ri=function(e){var n=or(e,!1);return ti(n)||(n!==e&&ri(n),ni().mkdirSync(String(n))),e},ii=function(e){return ri(e),ni().mkdirSync(String(e)),e},ui=function(e){return ti(e)?e:ii(e)},oi=function(e,n){if(Jn(e))return require(e);if(Xn(e))return yt(e);try{return require(e)}catch(e){}var t=__dirname,r=process.mainModule?.path;if(r!==t)try{return Lt(r,e)}catch(e){}var i=process.cwd();if(i!==r&&i!==t)try{return Lt(i,e)}catch(e){}var u=Zr("node.require.customDirs");if(u)for(var o of u)try{return Lt(o,e)}catch(e){}var a=ei(n?.autoInstall,"node.require.autoInstall"),l=ei(n?.promptInstall,"node.require.promptInstall",!0);if(a||l){var s=a||l;!0===s&&(s="./node_modules"),s=gt(s);var c=!1;if(a?(c=!0,console.log('Auto-installing "'+e+'" from npm to "'+s+'"...')):(c=Ur('Npm package "'+e+'" is required. Install now? (Y/N) '))&&console.log('Installing "'+e+'" from npm to "'+s+'"...'),c){s=ui(s),ht(e,!1,{cwd:s});try{return Jr(s),Lt(s,e)}catch(e){console.error("Failed to load from auto-install dir: ",s)}}}throw Nn('Module not found: "'+e+'"',{checked:{moduleDir:t,scriptDir:r,cwd:i}})},ai=L(function(){if(!globalThis.CustomEvent||!globalThis.EventTarget||!globalThis.Event){var e=oi("event-target-shim");globalThis.Event||(globalThis.Event=e.Event),globalThis.CustomEvent||(globalThis.CustomEvent=class extends globalThis.Event{constructor(e,n){super(e,n),n?.detail&&(this.detail=n.detail)}}),globalThis.EventTarget||(globalThis.EventTarget=e.EventTarget)}return{Event:Event,CustomEvent:CustomEvent,EventTarget:EventTarget}}),li=ai().EventTarget,si=function(e){var n=Qn,t=e[n];return void 0===t&&(t=new li,T(e,n,t)),t},ci=Vn("EventInterface",{addEventListener(e,n,t){si(this).addEventListener(e,n,t)},on(e,n){this.addEventListener(e,n)},removeEventListener(e,n){si(this).removeEventListener(e,n)},off(e,n){this.removeEventListener(e,n)},dispatchEvent(e){return si(this).dispatchEvent(e)}}),fi=ci,pi=function(e){return Yn(e,fi)},vi=function(e){return!(!e.addEventListener&&!e.on)},hi=function(e){return vi(e)||pi(e),e},di=function(e,n,t){return e[n]=t,e},mi=function(e,n,t){return di(e||{},n,t)},gi=function(e,n,t,r){return Ni(e,n,t,mi(r,"once",!0))},yi=function(e,n){return function(){var t=n.apply(this,arguments);return e.apply(this,arguments),t}},bi=yi,wi=function(e,n,t){return e[n]=bi(e[n],t)},Ei=e(class{constructor(e){this._remover=e}remove(){this._remover()}removeOn(e,n,t){t&&hi(e);var r=gi(target,n,()=>this.remove());return wi(this,"remove",()=>r.remove()),this}},Dn),xi=class extends Ei{constructor(e,n){super(e),this.handleEvent=n}},Ti=function(e,n){return new xi(e,n)},Si=function(e,n,t){(e.removeEventListener||e.off).call(e,n,t)},Oi=function(e,n,t){for(var r=e.length-1;r>=n;r--)e[r+1]=e[r];return e[n]=t,e.length++,e},_i=function(e,n){return Oi(e,0,n)},Ai=_i,Ni=function(e,n,t,r){if(r?.valueFirst){var i=t;t=function(e){var[n,t]=Gn(e);return Ai(arguments,n),arguments[1]=t,i.apply(this,arguments)}}var u=e.addEventListener;return u||(e.on?u=r?.once?e.once:e.on:(pi(e),u=e.addEventListener)),u.call(e,n,t,r),Ti(()=>Si(e,n,t),t)},ji=class extends Ei{constructor(e){super(()=>clearInterval(e))}stop(){this.remove()}},Ii=function(e,n){return new ji(setInterval(n,e))},Fi=function(){},ki=function(){return Ii(1e9,Fi)},Ci=function(){return Bn([ki(),Ni(process,"uncaughtException",console.error),Ni(process,"unhandledRejection",console.error)])},Li=function(e){var n=gt(e);return delete require.cache[n],yt(n)},Di=L(function(){var e=process.env.TITAN_PATH;if(!e)throw Nn("Environment variable TITAN_PATH is not set.");return jt(e)}),Mi=function(e){return e||(e="Newest"),Di()+"Compiled/"+e+"/"},Pi=function(e){return ni().readFileSync(String(e),"utf8")},Ri=function(){return new Date},qi=function(e){return new Date(e.getTime())},Bi=function(e){return new Date(e,null)},Gi=function(e){var n=new Date(e);return isNaN(n.getTime())?null:n},Ki=function(e){return isNaN(e)?null:e},Wi=function(e){return null==e?null:Ki(Number(e))},Hi=Wi,zi=function(e){var n=typeof e;return"number"===n||"bigint"===n},Ui=function(e,n){if(null==e)throw qr(e,0);if(e.constructor===Date)return n?qi(e):e;if(u(e)){var t=Hi(e);return null!=t?Bi(t):Gi(e)||null}return zi(e)?Bi(e):void 0},Yi=function(e,n){return null==e?Ri():Ui(e,n)},Vi=function(e){return Yi(e,!0)},Qi=Vi,$i=function(e){var n=Mi(e)+"LastCompileTime.txt";return ti(n)?Qi(Pi(n)):null},Ji=function(e,n){return ni().statSync(String(e),n)},Xi=function(e,n){return ni().lstatSync(String(e),n)},Zi=function(e,n,t){return(n?Ji:Xi)(e,t)},eu=function(e){return Zi(e).mtime},nu=function(e,n,t){return e=Ui(e),n=Ui(n),!1===t?e<n:e<=n},tu=function(e){var n=$i();if(n){var t=eu(e);if(nu(t,n))return!0}return!1},ru=/(['"])(.*?)\1/,iu=ln(ru),uu=function(e){return e.replace(iu,"")},ou=uu,au=function(e){return globalThis.structuredClone(e)},lu=au,su=en,cu=/\r?\n/,fu=function(e){return null==e||void 0!==e.length&&0===e.length},pu=function(e,n){return at(e,fu)},vu=function(e,n){return e.splice(n,1),e},hu=function(e,n,t){for(var r={},i=e.length,u=0;u<i;u++){var o=n(e[u],u,e);if(o){var[a,l]=o;t?(r[a]||(r[a]=[]),r[a].push(l)):r[a]=l}}return r},du=function(e,n,t,r){return[n,t]=re(e,n,t,r),e.slice(n,t)},mu=function(e,n){return Ae(n,e).join("")},gu=function(e){return e?e[0]:null},yu=function(e,n){var t=null==n?-1:n.index;if(-1===t)return[e];var r=Bt(e,t);return r[1]=r[1].slice(n[0].length),r},bu=function(e,n,t,r,i){return xe(e,n,t,r,(n,t)=>null===n?null:(n.input=e,void 0!==t&&(n.index+=t),n),i)},wu=function(e,n){return e.splice(e.length,0,...n),n},Eu=function(e,n){return wu(e,n),e},xu=Eu,Tu=class extends Array{constructor(e,n,t,r,i){if(-1===n)throw Nn("RegexResult index cannot be -1. For empty result, use bare null.");if(null==e)throw Nn("RegexResult matchString cannot be null. For empty result, use bare null.");super(),this[0]=e,r&&xu(this,r),this.index=n,this.input=t,i&&(this.groups=i)}fromParts(e){var n=e;return new Tu(n.match,n.index,n.input,n.captures,n.groups)}},Su=function(e,n,t,r,i){return new Tu(e,n,t,r,i)},Ou=function(e,n,t,r,i){return-1===n||null==e?null:Su(e,n,t,r,i)},_u=function(e,n,t,r,i){return bu(e,e=>{if(u(n)){var t=e.indexOf(n);return Ou(n,t,e)}return jr(n,e)},t,r,i)},Au=function(e,n,t,r,i){return yu(e,_u(e,n,t,r,i))},Nu=Wi,ju=function(e){return Nu(e)??e},Iu=function(e,n){null==n&&(n="=");var t={};return e.forEach(function(e){var[r,i]=Au(e,n);null!=i&&(i=ju(i.trim())),t[r.trim()]=i}),t},Fu=N,ku=class extends Array{constructor(e){var n,t=e;null!=t&&(o(t)?n=t:u(t)&&(n=t.split(cu))),n?(super(n.length),Object.assign(this,n)):super(...arguments)}condense(e){return this.trim().removeEmpty(),e&&this.removeComments(e),this}trim(){return this.apply(e=>e.trim())}removeEmpty(){return pu(this)}removeComments(e){for(var n=0;n<this.length;n++){var t=this[n],r=t.indexOf(e);-1!==r&&(""===(t=t.slice(0,r)).trim()?(vu(this,n),n--):this[n]=t)}return this}removeFirst(){return this.shift(),this}removeLast(){return this.pop(),this}apply(e){return ie(this,e)}join(){return super.join("\n")}toObj(e){return Iu(this,e)}mapToObj(e,n){return hu(this,e,n)}between(e,n,t){return t=Fu(t,"inclusiveEnd",!0),du(this,e,n,t)}normalize(){if(this.length>0&&(""===this[0].trim()&&this.shift(),this.length>0&&(""===Et(this).trim()&&this.pop(),this.length>0))){var e=this.find(e=>""!==e.trim()),n=gu(jr(/^\s*/,e));if(n){var t=n.length;this.apply(e=>{if(e.startsWith(n))return e.slice(t)})}}return this}deindent(e,n,t){throw I()}indent(e,n){var t=mu(n??"\t",e??1);return this.apply(e=>t+e)}static is(e){return se(e,this)}static fromChunks(e){return e.map(e=>qt(e,cu)).flatMap(e=>Lu(e,!1))}},Cu=function(e,n){var t=new ku(e);return n&&t.condense(),t},Lu=function(e,n,t){var r=e.split(cu);return n?Cu(r,t):r},Du=Pi,Mu=function(e,n){return Lu(Du(e),!0,n)},Pu=function(e,n){return Nr(e).test(n)},Ru=function(e,n){return Oe(n)?Pu(n,e):e.includes(n)},qu=function(e,n,t,r){null==e&&(e=""),null==n&&(n="");var i={},u=(t,r)=>i[e+t+n]=r;return r&&En(r,u),t&&En(t,u),i},Bu=function(e,n){return En(n,(n,t)=>e=hn(e,n,t)),e},Gu=function(e,n,t,r){var i,a,l=r?.paramIdentifier??"$";if(l)if(u(l)){if(!Ru(e,l))return e;i=l}else{if(!o(l))throw Un(l,1,"paramIdentifier");if([i,a]=l,!Ru(e,i)&&!Ru(e,a))return e}var s=qu(i,a,n,t);return Bu(e,s)},Ku=function(e){return u(e)?e:String(e)},Wu=globalThis.process?.env.windir,Hu=ge("os"),zu=function(){return Hu().tmpdir()+mt},Uu=function(e){if(e)throw I();return Hu().homedir()+mt},Yu=function(e){return Uu(e)+"Desktop/"},Vu={PROGRAMFILES:globalThis.process?.env.ProgramFiles,WINDIR:Wu,SYSTEM32:Wu&&Wu+"System32",TEMP:zu(),DESKTOP:Yu()},Qu=function(e,n){return Gu(Ku(e),n,Vu)},$u=function(e,n){return e?Qu(e,{TITAN:Di()}):Mi(n)+"SourceMap.txt"},Ju=function(e,n,t,r,i){var u=xr(e,n,t,r,i);return-1===u?null:e.slice(t,u)},Xu=function(e){var n=e[0];return n===n.toUpperCase()},Zu=su(function(e){var n=Mu($u(e),!0),t={};return n.forEach(e=>{var n=Ju(e,"=").split(",").map(e=>e.trim()),[r,i]=Q(n,e=>!Xu(e)),u=r[0];if(!u)throw Nn('No shortName in SourceMap line: "'+e+'"');i.forEach(e=>{t[e]=u})}),t},0),eo=L(function(e){var n=Object.keys(e);return fn("\\b("+n.join("|")+")\\.(\\w+)","g")}),no=/\bt\.(\w+)\.(\w+)/g,to=function(e,n){n||(n={});var t={},r=t.t={};if(n.enableGlobals){var i;i=n.additionalGlobals?lu(n.additionalGlobals):{},t.globals=i;var u=Zu(),o=eo(u),a=St(o,e).filter(n=>{var t=n[1],r=n[2],i=e[n.index-1];if("."===i||"_"===i)return!1;var u=globalThis[t];return!u||void 0===u[r]});for(var[l,s,c]of a)i[s]||(i[s]={}),i[s][c]=!0;var f=a.map(([e,n,t])=>{var r=u[n];if(!r)throw Nn("No short name found for global: "+n);return"t."+r+"."+t+";"}).join(" ");e+="\n"+f}for(var[l,p,c]of a=e.matchAll(no))r[p]||(r[p]={}),r[p][c]=!0;return t},ro=function(e,n){return e=dr(e),e=ou(e),to(e,n)},io=function(e,n){return n in e},uo=io,oo=function(e,n){for(var t of(Br(n,1),Object.keys(e))){if(!uo(n,t))return!1;var r=e[t];if(r&&r.constructor===Object&&!oo(r,n[t]))return!1}return!0},ao=function(e,n){return!oo(n.t,e)||!(!n.globals||e._globals&&oo(n.globals,e._globals))},lo=function(e){return At(e,Nt)},so=function(e,n){var t=Ot(e,n);return t?t.index:-1},co=function(e){var n=so(Nt,e);return-1===n?null:e.slice(0,n+1)},fo=function(e,n,t){if(lo(e))return t?[e,null]:e;var r,i,u=co(e),o=n(rr(e),u,e);return t?[r,i]=o:r=o,null!=r&&(e=u?u+r:r),t?[e,i]:e},po=function(e,n,t,r,i){return bu(e,e=>{if(Oe(n))return Ot(n,e);if(u(n)){var t=e.lastIndexOf(n);return-1!==t?new Tu(n,t):null}throw Un(n,1)},t,r,i)},vo=function(e,n,t,r,i){return yu(e,po(e,n,t,r,i))},ho=function(e){return fo(e,e=>vo(e,"."),!0)},mo=function(e,n){var t=ho(e)[1];return t?!1!==n?t.toLowerCase():t:null},go=function(e,n){return to(e,n)},yo=function(e,n){var t=n?.fileType;if(t){if("js"===(t=t.toLowerCase()))return ro(e,n);if("html"===t)return go(e,n)}return to(e,n)},bo={},wo=su(function(e,n){e=$u(e,n);var t=or(e),r=Mu(e,"//"),i=bo;for(var u of r){var o=u.indexOf("="),a=u.slice(0,o).trim();a=a.split(",").map(e=>e.trim()).filter(e=>!Xu(e));var l=u.slice(o+1).trim(),s=It(t,l).replaceAll("\\","/");for(var c of a)i[c]=s}return i}),Eo=function*(e,n){var t=0;for(var r of e)n(r,t++,e)&&(yield r)},xo=function(e){return e.slice()},To=function(e,n){return Oi(e,e.length,n)},So=To,Oo=function(e,n){return e.call(this,...n,function n(){return Et(arguments)!==n&&So(arguments,n),e.apply(this,arguments)})},_o=function(e){e||(e={});var n=e.getKeys;n||(n=function(e){return Object.keys(e)});var t=e.recurseIf;if(!t){var r=this.constructor;t=e=>se(e,r)||fe(e)||o(e)}var i=e.leavesOnly??e.leafsOnly??!1,u=this;return Oo(function*(e,r,o,a){var l=n(e,r,o);if(l)for(var s=l.length,c=0;c<s;c++){var f=l[c],p=e[f],v=xo(r);v.push(f);var h=null,d={value:p,key:f,object:e,path:v,level:o,isLeaf:h,root:u},m=t(p,d);d.isLeaf=h=!m,i&&!h||(yield d),m&&(yield*a(p,v,o+1,a))}},[this,[],0])},Ao=function(e,n){return _o.call(e,n)},No=function(e,n){1===arguments.length&&(n=!0);var t={};for(var r of e)t[r]=n;return t},jo=function(e,n,t,r){var i=hr(e,n,r);oi("acorn-walk").full(i,t)},Io=function(e,n,t,r){var i;if(u(t))i=e=>e.type===t;else if(o(t)){var a=No(t);i=e=>a[e.type]}else i=t;var l=[];return jo(e,n,function(e){i.apply(this,arguments)&&l.push(e)},r),l},Fo=pr,ko=function(e){var n,t,r,i=e,o=u(i)?hr(i).body[0]:i,a=o.type;if("VariableDeclaration"===a){n="variable";var l=o.declarations[0];t=l.id.name,r=l.init?l.init.raw??pr(l.init):"undefined"}else"FunctionDeclaration"===a?n="function":"ClassDeclaration"===a&&(n="class"),t=o.id.name;var s={type:n,name:t};return r&&(s.value=r),s.text=Fo(o),s.node=o,s},Co=function(e){return Io(e,!0,["ExportNamedDeclaration","ExportDefaultDeclaration"]).map(function(e){var n=e.declaration;if(n){var t=ko(n);return t.node=e,t}return{node:e}})},Lo=function(e,n){n||(n={});var t=n.enableGlobals,r=wo(n.sourceMap,n.stability);console.log("SOURCEMAP",r);var i={},u=[];return function e(n,o){var a=Eo(Ao(n),e=>e.isLeaf);for(var l of a){var[s,c]=l.path,f=i[s];if(f||(f=i[s]={}),null==f[c]){var p=r[s];if(p){var v=Yt(p)+c+".js";if(!ti(v)){var h='Titan compiled value "t.'+s+"."+c+'" does not exist';throw o&&(h+=' (called by "'+o+'")'),Nn(h+=".")}var d=Pi(v),m=Co(d)[0];f[c]=m;var g="t."+s+"."+c;e(yo(d,{fileType:"js",enableGlobals:t}).t,g),u.push([s,c])}else console.log('Skipping unmapped module "'+s+'"'),f[c]=!1}}}(e.t),{t:i,globals:e.globals,order:u}},Do=function(e){return Cu(e).normalize().join()},Mo=Do,Po=function(e,n){var t=e,r=c(t)?Mr(t):t;return!1!==n&&(r=Do(r)),r},Ro=function(e,n,t){H(e,t).forEach(n)},qo=function(e,n,t){if(Object.hasOwn(e,n)){var r=e[n];return delete e[n],t?t(r,e,n):r}},Bo=function(e,n){En(n,(n,t)=>qo(e,n,t))},Go=Bo,Ko=function(e,n,t){return null==(n=tt(n,t)).compress&&(n.compress={}),null==n.mangle&&(n.mangle={}),null==n.format&&(n.format={}),Go(n,{isModule:e=>n.compress.module=e,originalQuotes:e=>n.format.quote_style=e?3:null,mangleEval:e=>n.mangle.eval=e,mangleExcept:e=>n.mangle.reserved=a(e)}),null==n.toplevel&&(n.toplevel=!0),null==n.compress.passes&&(n.compress.passes=1/0),e=dr(e),oi("terser").minify_sync(e,n).code},Wo=function(e,n){n||(n={});var t=n.minify??!1,r=n.debug??!1,i=n.deps??yo(e,n),{t:u,globals:o,order:a}=Lo(i,n),l="//Flat references:\n";for(var[s,c]of a){var f=u[s][c],p="t_"+s+"_"+c,v="variable"===f.type?f.value:"("+f.text+")";v=v.replaceAll(no,(e,n,t)=>"t_"+n+"_"+t),l+="var "+p+" = "+v+"\n"}for(var[s,h]of(r&&(l+="//Debug functions:\n",l+=Mo('\n function _isFn(value) {\n return typeof value === "function";\n }\n function _withName(value, name) {\n if(_isFn(value)) { Object.defineProperty(value, "name", {value:name}); }\n return value;\n }\n\n ')),l+="//New tree items:\n",l+="var newItems = {",ae(u))){for(var c of(l+="\n\t"+s+": {",Object.keys(h))){var d="t_"+s+"_"+c;r&&(d="_withName("+d+", 't."+s+"."+c+"')"),l+="\n\t\t"+c+": "+d+","}l+="\n\t},"}if(l+="\n}\n",l+="//Add items to t:\n",l+=Do("\n if(globalThis.t) {\n //If t already exists, integrate new items.\n Object.keys(newItems).forEach(function(modName) {\n if(t[modName]) {\n var newModule = newItems[modName];\n Object.keys(newModule).forEach(function(item) {\n t[modName][item] = newModule[item];\n });\n } else {\n t[modName] = newItems[modName];\n }\n });\n } else {\n globalThis.t = Object.assign({}, newItems);\n }\n "),n.enableGlobals&&o){l+="\n//Add weak global aliases:\n",l+=Po("\n if(!t._globals) { t._globals = {}; }\n function _ensureGlobal(name) {\n if(!globalThis[name]) { globalThis[name] = {}; }\n if(!t._globals[name]) { t._globals[name] = {}; }\n }\n function _weakGlobalize(globalName, shortName, itemName) {\n var globalObj = globalThis[globalName];\n if(!globalObj[itemName]) { globalObj[itemName] = t[shortName][itemName]; }\n t._globals[globalName][itemName] = true;\n }\n ");var m=Zu();En(o,(e,n)=>{l+='\n_ensureGlobal("'+e+'");',Ro(n,n=>{var t=m[e];l+='\n_weakGlobalize("'+e+'", "'+t+'", "'+n+'");'})})}if(l+="\n//Export t:",l+="\nif(globalThis.exports) { exports.default = globalThis.t; }",t){var g=ce(t)?t:null;l=Ko(l,g,{mangleExcept:["t","_t"],mangleEval:!0})}return l},Ho=function(e){return e instanceof Buffer},zo=function(e){return ArrayBuffer.isView(e)},Uo=zo,Yo=function(e){return Ho(e)||Uo(e)||u(e)},Vo=function(e){return e.constructor===ArrayBuffer},Qo=function(e){return Yo(e)?e:Vo(e)?Buffer.from(e):yn(e)},$o=function(e){return zi(e)?String(e):Qo(e)},Jo=function(e,n){return ri(e),ni().writeFileSync(String(e),$o(n)),e},Xo=function(e,n,t){t||(t={}),t.fileType||!n||t.deps||(t.fileType=mo(n));var r=Wo(e,t),i=t.packagePath||ar(n,t.repl);return Jo(i,r),i},Zo={titan:{harness:function(e,n,r){n||(n=e,e=null);var i=e??{};null==i.minify&&(i.minify=!1),i.keepAlive&&Ci();var u,o,a=i.packagePath||ar();if(a=gt(a),ti(a)){if(tu(a)&&(u="New compile"),!u){o=i.text??Mr(n);var l=ro(o,i);require(a),ao(t,l)&&(u="New deps")}}else u="No package";return u&&(i.onPack&&i.onPack(u),null==o&&(o=i.text??Mr(n)),i.packagePath=a,Xo(o,er(),i),Li(a)),n.apply(null,r)},getPackagePath:ar,getPackageName:ur,hasNewCompile:tu,getLastCompileTime:$i,getCompiledDir:Mi,locate:Di,getDepsFromJS:ro,_getDepsBasic:to,loadGlobalsMap:Zu,_resolveSourceMapPath:$u,_getGlobalsRegex:eo,depsRegex:no,hasNewDeps:ao,packTextToFile:Xo,packText:Wo,getDeps:yo,getDepsFromHTML:go,_getAllDeps:Lo,loadSourceMap:wo,sourceMap:bo},node:{keepAlive:Ci,is:D,display:be,util:ye,_builtInModule:ge,requireBuiltIn:me,require:oi,_basicRequire:$n,child_process:st,requireLocal:yt,path:dt,_requireFromDir:Lt,_requireDirCache:wt,_createRequire:Ct,module:kt,promptYNSync:Ur,run:Rr,getScriptPath:er,positionalArgs:Zt,args:Vt,sigint:Hr,interrupt:Wr,ensureRequireDir:Jr,addRequireDir:$r,fs:ni,reloadRequireLocal:Li,os:Hu},ev:{multiHandle:Bn,on:Ni,resolveValue:Gn,enable:pi,EventInterface:fi,Interface:ci,_ensureHasTarget:si,targetSym:Qn,EventTarget:li,polyfill:ai,handle:Ti,ListenerHandle:xi,ensureEnabled:hi,can:vi,once:gi,off:Si},o:{multiHandle:qn,isAny:y,setHidden:T,addNonEnumerable:x,defineProperty:E,weakAssign:w,merge:b,safeEnsure:N,ensure:A,hideKey:B,makeNonEnumerable:q,filterSplit:J,keys:H,allKeys:W,split:$,pick:z,iterateAll:le,iterate:ae,iterator:oe,entries:ue,isPure:fe,is:ce,setProtoLazy:he,setGetter:pe,forceSet:ve,display:Sn,toLiteral:Tn,constructorMatches:Se,ensureCustom:ke,get:je,set:Ie,createEmpty:Ge,remove:Ve,reduce:xn,each:En,addInterface:Yn,safeSetDefaults:nt,safeEnsureMulti:et,ensureMulti:Zn,Cache:bt,setDefaults:Dt,resolveKeys:Yr,diveGet:Xr,safeSet:mi,touch:di,deepCopy:lu,fromLines:Iu,safeDefault:Fu,hasKey:uo,has:io,fromKeys:No,eachKey:Ro,consumeOptions:Go,consumeMulti:Bo,consume:qo},handle:{createMulti:Rn,MultiHandle:Mn,HandleInterface:Dn,Handle:Ei},class:{addInterface:e,create:R,setName:k,addStatics:C,setDisplay:P,isInterface:Wn,interface:Vn},ifc:{create:Cn,Interface:kn,is:Kn},f:{createClass:G,ensureConstructor:d,createConstructor:h,isArrowFn:p,isArrow:f,is:c,wrap:v,retThis:m,setName:F,one:L,eq:K,memoize:en,MemoizedFunction:Ze,not:ot,body:Mr,isArrowString:br,_getArrowFnBody:Lr,_getNormalFnBody:Dr,hookAfterMethod:wi,hookAfter:bi,injectAfter:yi,interval:Ii,TimerHandle:ji,noop:Fi,cache:su,recurse:Oo},s:{is:u,isAny:i,isPrimitive:n,isObject:r,toLiteral:gn,quote:mn,escape:dn,replaceAll:hn,apply:Te,withIndices:xe,chars:nn,from:yn,spaceBefore:In,fromKey:Fn,endsWith:At,resolveIndex:xt,removeTrailing:qt,removeFromEnd:Rt,_removeStringFromEnd:Mt,_removeRegexFromEnd:Pt,splitAtIndex:Bt,ensureStartsWith:Kt,replace:Ut,decapitalize:nr,removeLineBreaks:fr,removeMulti:cr,removeAll:sr,resolve:Pr,ensure:yr,after:Tr,index:xr,_indexWithIndices:wr,indexOfFn:Er,removeLeading:Cr,removeFromStart:kr,_removeStringFromStart:Sr,_removeRegexFromStart:Fr,remove:Or,removeQuotes:uu,splitLines:Lu,lines:Cu,LinesArray:ku,repeat:mu,splitFirst:Au,_splitByMatch:yu,match:_u,_matchWithIndices:bu,replaceParams:Gu,contains:Ru,_createParamsObj:qu,_replaceByObj:Bu,before:Ju,isCapitalized:Xu,splitLast:vo,matchLast:po,normalize:Mo,normalizeMLS:Do,mls:Po},a:{is:o,ensure:a,filterSplit:Q,iterate:ne,iterator:ee,apply:ie,resolveIndices:re,resolveIndex:te,wrapIndices:Ee,wrapIndex:we,pick:Ne,create:Ae,fill:_e,push:Re,add:Pe,splitLast:We,splitTail:Ke,toLiteral:bn,display:On,unboxArgs:Pn,assert:it,removeNullish:lt,removeByFilter:at,replaceContents:ut,last:Et,removeEmpty:pu,removeIndex:vu,mapToObj:hu,slice:du,pushMulti:xu,addMulti:Eu,pushThroughMulti:wu,copy:xo},p:{asyncJoint:s,is:l},v:{isPrimitive:g,constructorMatches:se,display:_n,toLiteral:wn,resolve:Fe,type:zn,req:Br,nullIfNaN:Ki,isEmpty:fu},err:{nyi:I,NYIError:_,Error:O,Enhanced:S,defaultFromFn:j,value:An,ValueError:de,create:Nn,type:Un,TypeError:Hn,prepend:vr,req:qr},sym:{display:M,value:Be,cleanup:Ln},macro:{config:function(e){}},set:{resolve:V,ensure:Y,is:U},n:{cap:Z,least:X,fromString:Hi,ensure:Wi,is:zi,tryCoerce:ju,tryParse:Nu},re:{is:Oe,ensureGlobal:sn,global:ln,addFlag:an,copy:on,updateFlagString:un,parseFlagString:tn,createFlagString:rn,createEscaped:vn,create:fn,resolveFlags:cn,escape:pn,matchEnd:_t,matchLast:Ot,matchAll:St,setStartIndex:Tt,slash:Nt,matchStart:Ir,match:jr,ensureLocal:Nr,local:Ar,removeFlag:_r,quotes:iu,quote:ru,newline:cu,text:gu,safeCreateResult:Ou,createResult:Su,RegexResult:Tu,test:Pu,lastIndex:so},map:{Cache:Me,ensure:De,get:Ce,set:Le,MultiCache:Xe,diveEnsure:Ye,createEmpty:Ue,diveDelete:Je,remove:$e},args:{ensureArray:qe,unshift:Ai,prepend:_i,insert:Oi,push:So,append:To},tree:{ensure:ze,dive:He,remove:Qe,setCustom:Vr,copy:au,isSubsetOf:oo,iterate:Ao,iterator:_o},gen:{join:jn,filter:Eo},npm:{isBuiltIn:Jn,isFile:Xn,install:ht,_runCommand:vt},os:{run:pt,_resolveStdio:rt},opt:{resolve:tt},win:{is:ct},shell:{_handleError:ft},path:{abs:gt,sep:mt,ensureEndsWith:Ft,join:It,ensureTrailingSlash:jt,fws:Yt,baseName:ir,_removeExtsFromFile:tr,file:rr,dir:or,resolveVars:Qu,string:Ku,_defaultParams:Vu,windir:Wu,_getDefaultTempDir:zu,getDesktop:Yu,getUserDir:Uu,ext:mo,splitExt:ho,ignoreDir:fo,isDir:lo,dirPart:co},js:{enhance:gr,ensureReturn:Wt,splitLastExpression:Gt,enableAwait:zt,_nodeEnableAwait:Ht,useTitan:lr,inline:mr,removeComments:dr,fromAST:pr,parse:hr,removeQuotes:ou,getExports:Co,getNodes:Io,eachNode:jo,parseDeclaration:ko,fromASTNode:Fo,minify:Ko},cli:{positionalArgs:Xt,resolveArgs:Jt,splitArgs:$t},env:{args:Qt,setConfig:Qr,getConfig:Zr,resolveConfig:ei,keepAlive:ki},proc:{interrupt:Kr,signal:Gr},bool:{fromYN:zr},fs:{ensureDir:ui,exists:ti,mkdir:ii,ensureParent:ri,load:Pi,getModifiedDate:eu,stat:Zi,deepStat:Ji,shallowStat:Xi,loadLines:Mu,loadText:Du,write:Jo,formatRaw:$o},d:{from:Qi,create:Vi,resolve:Yi,now:Ri,ensure:Ui,copy:qi,fromYear:Bi,_resolveNative:Gi,isBefore:nu},bin:{ensureByteSafe:Qo,isByteSafe:Yo,isNodeBuffer:Ho,isTA:Uo},ab:{isTA:zo,is:Vo}};globalThis.t?Object.keys(Zo).forEach(function(e){if(t[e]){var n=Zo[e];Object.keys(n).forEach(function(r){t[e][r]=n[r]})}else t[e]=Zo[e]}):globalThis.t=Object.assign({},Zo),globalThis.exports&&(exports.default=globalThis.t);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "titanfiber",
3
- "version": "1.0.159",
3
+ "version": "1.0.161",
4
4
  "description": "",
5
5
  "exports": {
6
6
  ".": "./router.js",
package/script.pkg.js CHANGED
@@ -1 +1 @@
1
- var t_f_one=function(t){var e,r=!1;return function(){return r||(r=!0,e=t.apply(this,arguments)),e}},t_node_args=t_f_one(function(){return process.argv.slice(2)}),t_env_args=t_node_args,t_s_isPrimitive=function(t){return"string"==typeof t},t_s_isObject=function(t){return t instanceof String},t_s_isAny=function(t){return t_s_isPrimitive(t)||t_s_isObject(t)},t_s_is=t_s_isAny,t_cli_splitArgs=function(t,e){const r=[];let _="",n="outside",s=!1;for(let i=0;i<t.length;i++){const a=t[i];switch(n){case"outside":'"'===a?s?(_+=a,s=!1):(e&&(_+=a),n="insideQuote"):"\\"===a?s=!0:" "===a?(_.length>0&&(r.push(_),_=""),s=!1):(_+=a,s=!1);break;case"insideQuote":'"'!==a||s?"\\"!==a||s?(_+=a,s=!1):s=!0:(e&&(_+=a),n="outside")}}return _.length>0&&r.push(_),r},t_cli_resolveArgs=function(t,e){var r=t;return null==r?t_env_args():t_s_is(r)?t_cli_splitArgs(r,e):r},t_cli_positionalArgs=function(t,e){return t_cli_resolveArgs(t,e).slice()},t_node_positionalArgs=t_cli_positionalArgs,t_node_getScriptPath=function(){var t=require.main?.filename;return t||(null!=process._eval?null:t_node_positionalArgs(process.argv)[1])},t_node_requireBuiltIn=function(t){return require("node:"+t)},t_node__builtInModule=function(t){return t_f_one(()=>t_node_requireBuiltIn(t))},t_node_fs=t_node__builtInModule("fs"),t_fs_load=function(t){return t_node_fs().readFileSync(String(t),"utf8")},t_fs_loadText=t_fs_load,t_fs_deepStat=function(t,e){return t_node_fs().statSync(String(t),e)},t_fs_shallowStat=function(t,e){return t_node_fs().lstatSync(String(t),e)},t_fs_stat=function(t,e,r){return(e?t_fs_deepStat:t_fs_shallowStat)(t,r)},t_fs_getID=function(t,e){return t_fs_stat(t,e).ino},t_fs_exists=function(t){return!!t_node_fs().lstatSync(String(t),{throwIfNoEntry:!1})},t_err_Enhanced=function(t){return class extends t{constructor(t,e){super(t,e);var r=this.constructor.name;r&&(this.name=r)}}},t_err_Error=t_err_Enhanced(globalThis.Error),t_err_NYIError=class extends t_err_Error{constructor(t,e){super(t??"Not yet implemented",e)}},t_f_is=function(t){return"function"==typeof t},t_o_ensure=function(t,e,r,_){var n=t[e];if(void 0===n){var s=r;!1!==_&&t_f_is(s)&&(s=s(t,e)),t[e]=n=s}return n},t_o_safeEnsure=function(t,e,r,_){return t||(t={}),t_o_ensure(t,e,r,_),t},t_err_defaultFromFn=function(t,e){return t_o_safeEnsure(t,"fromFn",e,!1)},t_err_nyi=function(t,e){return new t_err_NYIError(t,t_err_defaultFromFn(e,t_err_nyi))},t_node_os=t_node__builtInModule("os"),t_node_path=t_node__builtInModule("path"),t_path_sep=t_node_path().sep,t_path__getDefaultTempDir=function(){return t_node_os().tmpdir()+t_path_sep},t_path_getTempDir=function(t){if(t)throw t_err_nyi();return t_path__getDefaultTempDir()},t_titan_getTempDir=function(){return t_path_getTempDir()+"Titan/"},t_s_decapitalize=function(t){return t.charAt(0).toLowerCase()+t.slice(1)},t_path__removeExtsFromFile=function(t){return t.split(".")[0]},t_path_file=function(t){return t_node_path().win32.basename(String(t))},t_path_baseName=function(t){return t_path__removeExtsFromFile(t_path_file(t))},t_titan_getPackageName=function(t,e,r,_){t||(t=t_node_getScriptPath()??"_console.js");var n=t_s_decapitalize(t_path_baseName(t));return e&&(n+="_repl"),n+(r&&_?.dynamic?".dypkg.json":".pkg.js")},t_v_constructorMatches=function(t,e){return null!=t&&t.constructor===e},t_o_constructorMatches=t_v_constructorMatches,t_re_is=function(t){return t_o_constructorMatches(t,RegExp)},t_a_last=function(t){return t[t.length-1]},t_o_is=function(t){return t_v_constructorMatches(t,Object)},t_s_chars=function(t){return new Set(t)},t_re_parseFlagString=function(t){var e={};if(t){var r=t_s_chars(t);r.has("g")&&(e.global=!0),r.has("i")&&(e.caseInsensitive=!0),r.has("y")&&(e.sticky=!0)}return e},t_re_createFlagString=function(t){var e="";return t.global&&(e+="g"),(t.caseInsensitive||0==t.caseSensitive)&&(e+="i"),t.sticky&&(e+="y"),e},t_re_updateFlagString=function(t,e){var r=t_re_parseFlagString(t);return t_re_createFlagString(Object.assign(r,e))},t_re_copy=function(t,e){var r=e,_=void 0;return t_s_is(r)?_=r:t_o_is(r)&&(_=t_re_updateFlagString(t.flags,r)),new RegExp(t,_)},t_a_resolveIndex=function(t,e){return e<0?t.length+e:e},t_s_resolveIndex=t_a_resolveIndex,t_re_setStartIndex=function(t,e,r){return t=t_re_copy(t,{global:!0}),null!=r&&(e=t_s_resolveIndex(r,e)),t.lastIndex=e,t},t_a_is=function(t){return Array.isArray(t)},t_a_ensure=function(t){return t_a_is(t)?t:[t]},t_p_is=function(t){return t instanceof Promise},t_p_asyncJoint=function(t,e){var r=t;return t_p_is(r)?r.then(e):e(r)},t_f_isArrow=function(t){return t_f_is(t)&&null==t.prototype},t_f_isArrowFn=t_f_isArrow,t_f_wrap=function(t){return function(){return t.apply(this,arguments)}},t_f_createConstructor=function(t,e){var r;return r=e?function(){this.super=e;var r=t.apply(this,arguments);return t_p_asyncJoint(r,()=>(delete this.super,r))}:t_f_isArrowFn(t)?t_f_wrap(t):t,r._isConstructor=!0,r},t_f_ensureConstructor=function(t,e){return t._isConstructor?t:t_f_createConstructor(t,e)},t_f_retThis=function(){return this},t_v_isPrimitive=function(t){var e=typeof t;return"object"!==e&&"function"!==e||null===t},t_o_isAny=function(t){return!t_v_isPrimitive(t)},t_o_merge=function(t,e,r){return!1===r?Object.keys(e).forEach(r=>{void 0===t[r]&&(t[r]=e[r])}):Object.assign(t,e),t},t_o_weakAssign=function(t,e){return t_o_merge(t,e,!1)},t_o_defineProperty=function(t,e,r,_){return r||(r={}),_&&t_o_weakAssign(r,_),null==r.enumerable&&(r.enumerable=!0),null==r.configurable&&(r.configurable=!0),Object.defineProperty(t,e,r)},t_o_addNonEnumerable=function(t,e,r,_){return t_o_defineProperty(t,e,{value:r,writable:!0,enumerable:!1},_),r},t_o_setHidden=t_o_addNonEnumerable,t_f_setName=function(t,e){Object.defineProperty(t,"name",{value:e,configurable:!0}),t_o_setHidden(t,"displayName",e)},t_class_setName=t_f_setName,t_class_addStatics=function(t,e){return Object.assign(t,e)},t_macro_config=function(t){},t_node_is=t_f_one(function(){return t_macro_config("node.is")??"undefined"==typeof window}),t_sym_display=t_node_is()?require("util").inspect.custom:Symbol("Display"),t_class_setDisplay=function(t,e){t.prototype[t_sym_display]=e},t_class_create=function(t,e,r,_,n,s){s||(s={}),t_s_is(e)&&(e=null);var i,a,o,u=r;u&&(t_a_is(u)?([a,o]=u,a&&(a=t_f_ensureConstructor(a))):i=t_f_ensureConstructor(u,e));var l=s.bareFn;s.singleton&&(l=function(){return null==p.default&&(p.default=new p(...arguments)),p.default});var c,f=a||i||e||t_f_retThis;function p(){if(!new.target&&l&&!(this instanceof p))return l.apply(this,arguments);var t=this;return t_p_asyncJoint(f.apply(t,arguments),r=>{if(r&&t_o_isAny(r)&&(t=r,a)){if(!new.target)throw t_err_nyi('Prototype repair is NYI for class instantiation without "new".');if(!e)throw t_err_nyi("instanceFn is not yet supported when extendsClass is null.");var _=Object.getPrototypeOf(this);Object.getPrototypeOf(t)!==_&&Object.setPrototypeOf(t,_)}return o?t_p_asyncJoint(o.apply(t,arguments),()=>t):t})}return t&&t_class_setName(p,t),e&&Object.setPrototypeOf(p,e),_?(c=_,e&&Object.setPrototypeOf(_,e.prototype)):c=e?Object.create(e.prototype):{},t_o_setHidden(c,"constructor",p),p.prototype=c,n&&t_class_addStatics(p,n),s.display&&t_class_setDisplay(p,s.display),s.implements&&t_a_ensure(s.implements).forEach(t=>t(p)),p},t_o_makeNonEnumerable=function(t,e){Object.defineProperty(t,e,{enumerable:!1})},t_o_hideKey=t_o_makeNonEnumerable,t_f_createClass=function(t,e,r,_,n){var s=Symbol();return t_class_create(t,Function,[function(){var t=function(){return t[s].apply(this,arguments)};return t},function(){var t=e.apply(this,arguments);if(!t)throw new Error("Constructor must return a function.");this[s]=t,t_o_hideKey(this,s)}],r,_,n)},t_a_resolveIndices=function(t,e,r,_){return e=null==e?0:t_a_resolveIndex(t,e),r=null==r?t.length:t_a_resolveIndex(t,r),_&&(0==_.inclusiveStart&&e++,_.inclusiveEnd&&r++),[e,r]},t_a_fill=function(t,e,r,_){var n=e;if([r,_]=t_a_resolveIndices(t,r,_),t_f_is(n))for(var s=r;s<_;s++)t[s]=n(s,t);else t.fill(n,r,_);return t},t_a_create=function(t,e){var r=new Array(t||0);return arguments.length>1&&t_a_fill(r,e),r},t_a_pick=function(t,e){return t_a_create(e.length,r=>t[e[r]])},t_o_get=function(t,e){return t[e]},t_o_set=function(t,e,r){return t[e]=r},t_v_resolve=function(t,e,r){var _=t;return t_f_is(_)?_.apply(r,e):_},t_o_ensureCustom=function(t,e,r,_,n){_||(_=t_o_get);var s=_(t,e);return void 0===s&&(s=t_v_resolve(r,[t,e]),n||(n=t_o_set),n(t,e,s)),s},t_map_get=function(t,e){return t.get(e)},t_map_set=function(t,e,r){return t.set(e,r)},t_map_ensure=function(t,e,r){return t_o_ensureCustom(t,e,r,t_map_get,t_map_set)},t_map_Cache=class{constructor(){this.store=new Map}get(t,e){return t_map_ensure(this.store,t,e)}remove(t){return this.store.delete(t)}delete(t){return this.remove(t)}},t_a_add=function(t,e){return t.push(e),t},t_a_push=t_a_add,t_args_ensureArray=function(t){var e=t;return Array.isArray(e)?e:Array.from(e)},t_sym_value=Symbol("Value"),t_o_createEmpty=function(){return{}},t_a_splitTail=function(t){return[t.slice(0,-1),t[t.length-1]]},t_a_splitLast=t_a_splitTail,t_tree_dive=function(t,e,r,_,n,s){r||(r=t_o_get),null==_&&(_=t_o_createEmpty),null==n&&(n=t_o_set),null==s&&(s=r);for(var[i,a]=t_a_splitLast(e),o=t,u=i.length,l=0;l<u;l++){var c=i[l],f=r(o,c);if(void 0===f){if(!_)return;f=t_o_ensureCustom(o,c,_,r,n)}o=f}if(s)return s(o,a,n)},t_tree_ensure=function(t,e,r,_,n,s){return t_tree_dive(t,e,_,n,s,(t,e)=>t_o_ensureCustom(t,e,r,_,s))},t_map_createEmpty=function(){return new Map},t_map_diveEnsure=function(t,e,r){return t_tree_ensure(t,e,r,t_map_get,t_map_createEmpty,t_map_set)},t_o_remove=function(t,e){return delete t[e],t},t_tree_remove=function(t,e,r,_){return t_tree_dive(t,e,r,!1,!1,_||t_o_remove)},t_map_remove=function(t,e){return t.delete(e)},t_map_diveDelete=function(t,e){return t_tree_remove(t,e,t_map_get,t_map_remove)},t_map_MultiCache=class{constructor(){this.store=new Map}get(t,e){return t=t_a_push(t_args_ensureArray(t),t_sym_value),t_map_diveEnsure(this.store,t,e)}remove(t){return t=t_a_push(t_args_ensureArray(t),t_sym_value),t_map_diveDelete(this.store,t)}delete(t){return this.remove(t)}},t_f_MemoizedFunction=t_f_createClass("MemoizedFunction",function(t,e){if(this.base=t,null!=e)if(1===(e=t_a_ensure(e)).length){this.cache=new t_map_Cache;var r=e[0];this._cacheKeyFormatter=t=>t[r]}else this.cache=new t_map_MultiCache,this._cacheKeyFormatter=t=>t_a_pick(t,e);else this.cache=new t_map_MultiCache,this._cacheKeyFormatter=t=>t;var _=this;return function(){var e=_._cacheKeyFormatter(arguments);return _.cache.get(e,()=>t.apply(this,arguments))}},{remove(t){return this.cache.remove(this._cacheKeyFormatter(t))}}),t_f_memoize=function(t,e){return new t_f_MemoizedFunction(t,e)},t_re_addFlag=function(t,e){return t_re_copy(t,t.flags+e)},t_re_global=function(t){return t_re_addFlag(t,"g")},t_re_ensureGlobal=t_f_memoize(function(t){return t.global?t:t_re_global(t)},0),t_re_matchAll=function(t,e,r){return t=null!=r?t_re_setStartIndex(t,r,e):t_re_ensureGlobal(t),Array.from(e.matchAll(t))},t_re_matchLast=function(t,e,r){return null!=r&&(e=e.slice(0,r)),t_a_last(t_re_matchAll(t,e))||null},t_re_matchEnd=function(t,e){var r=t_re_matchLast(t,e);return r&&e.length===r.index+r[0].length?r:null},t_err_TypeError=t_err_Enhanced(globalThis.TypeError),t_v_type=function(t){return null==t?t:t.constructor},t_node_util=t_node__builtInModule("util"),t_node_display=function(t,e){return e||(e={}),null==e.colors&&(e.colors=!0),t_node_util().inspect(t,e)},t_a_wrapIndex=t_a_resolveIndex,t_a_wrapIndices=function(t,e,r,_){return void 0!==e&&(null===e||0===e?e=void 0:(e=t_a_wrapIndex(t,e),_&&0==_.inclusiveStart&&e++)),void 0!==r&&(null===r||r===t.length?r=void 0:(r=t_a_wrapIndex(t,r),_&&_.inclusiveEnd&&r++)),[e,r]},t_s_withIndices=function(t,e,r,_,n,s){if(r||null!=_){[r,_]=t_a_wrapIndices(t,r,_,s);var i=t.slice(r,_),a=e(i);return n?n(a,r,_,i,t):a}return e(t)},t_s_apply=function(t,e,r,_,n){return t_s_withIndices(t,e,r,_,(e,r,_)=>(void 0!==r?t.slice(0,r):"")+(e||"")+(void 0!==_?t.slice(_):""),n)},t_re_resolveFlags=function(t){var e=t;return null==e?void 0:t_s_is(e)?e:t_re_createFlagString(e)},t_re_create=function(t,e){return new RegExp(t,t_re_resolveFlags(e))},t_re_escape=function(t){return t.replace(/[-[\]{}()*+!<=:?.\/\\^$|#\s,]/g,"\\$&")},t_re_createEscaped=function(t,e){return t_re_create(t_re_escape(t),e)},t_s_replaceAll=function(t,e,r,_,n,s){return t_s_apply(t,function(t){return t.replaceAll?(t_re_is(e)&&(e=t_re_ensureGlobal(e)),t.replaceAll(e,r)):(e=t_s_is(e)?t_re_createEscaped(e,"g"):t_re_ensureGlobal(e),this.replace(e,r))},_,n,s)},t_s_escape=function(t,e,r){return t_s_replaceAll(t,e,(r??"\\")+e)},t_s_quote=function(t,e,r){return null==e&&(e='"'),!1!==r&&(t=t_s_escape(t,e,r)),e+t+e},t_s_toLiteral=function(t){return t_s_quote(t,'"')},t_o_isPure=t_o_is,t_s_from=function(t){return t_o_isPure(t)?t_o_toLiteral(t):String(t)},t_a_toLiteral=function(t,e){return e||(e=t_v_toLiteral),"["+t.reduce(function(t,r){return t+e(r)+", "},"").slice(0,-2)+"]"},t_v_toLiteral=function(t){return t_s_is(t)?t_s_toLiteral(t):t_a_is(t)?t_a_toLiteral(t):t_s_from(t)},t_o_allKeys=function(t){return Reflect.ownKeys(t)},t_o_keys=function(t,e){return(e?t_o_allKeys:Object.keys)(t)},t_o_each=function(t,e,r){t_o_keys(t,r).forEach((r,_,n)=>e(r,t[r],_,n))},t_o_reduce=function(t,e,r,_){var n=null!=r?r:"";return t_o_each(t,function(){n=e.call(this,n,...arguments)},_),n},t_o_toLiteral=function(t,e){return e||(e=t_v_toLiteral),"{"+t_o_reduce(t,function(t,r,_){return t+r+":"+e(_)+", "},"",!0).slice(0,-2)+"}"},t_o_display=function(t,e){return null==e&&(e=1),e<=0?"[object Object]":t_o_toLiteral(t,t=>t_v_display(t,e-1))},t_a_display=function(t,e){return null==e&&(e=1),e<=0?"[object Array]":t_a_toLiteral(t,t=>t_v_display(t,e-1))},t_v_display=function(t,e){return void 0===t?"undefined":null===t?"null":t_node_is()?t_node_display(t,e):t_o_is(t)?t_o_display(t,maxNumLevels):t_a_is(t)?t_a_display(t,maxNumLevels):t_s_from(t)},t_err_type=function(t,e,r,_){if(0===arguments.length)return new t_err_TypeError("Unexpected type received");_||(_={});var n,{type:s,expected:i}=_;return null==s&&(s=t_v_type(t)),s&&s.name&&(s=s.name),i?(i.name&&(i=i.name),n="Expected "+i+", received "):n="Unexpected type received (",n+=s,null!=t&&(n+=" ("+t_v_display(t)+")"),i||(n+=")"),r&&(n+=' for "'+r+'"'),null!=e&&(n+=" (index "+e+")"),_.fromFn||(_.fromFn=t_err_type),new t_err_TypeError(n,_)},t_s_endsWith=function(t,e){if(t_s_is(e))return t.endsWith(e);if(t_re_is(e))return!!t_re_matchEnd(e,t);throw t_err_type(e,1,"matchThis")},t_re_slash=/\/|\\/,t_path_ensureTrailingSlash=function(t){return t_s_endsWith(t,t_re_slash)?t:t+t_path_sep},t_path_dir=function(t,e){return t=t_node_path().dirname(String(t)),!1===e?t:t_path_ensureTrailingSlash(t)},t_path_abs=function(t,e,r){t=String(t);var _=t_node_path().resolve,n=e?_(e,t):_(t);return r?n+t_path_sep:n},t_titan_getPackagePath=function(t,e,r,_){var n,s=t_titan_getPackageName(t,e,r,_);return n=t?t_path_dir(t):"./",t_path_abs(n+s)},t_err_create=function(t,e,r){var _=new t_err_Error(t,r);return e&&Object.assign(_,e),_},t_titan_locate=t_f_one(function(){var t=process.env.TITAN_PATH;if(!t)throw t_err_create("Environment variable TITAN_PATH is not set.");return t_path_ensureTrailingSlash(t)}),t_titan_getCompiledDir=t_f_one(function(){return t_titan_locate()+"Compiled/Newest/"}),t_d_now=function(){return new Date},t_err_req=function(t,e,r,_){var n="Required argument";return r&&(n+=' "'+r+'"'),null!=e&&(n+=" (index "+e+")"),n+=" missing",arguments.length>0&&(n+=" (received "+t_v_display(t)+")"),t_err_create(n,null,t_err_defaultFromFn(_,t_err_req))},t_d_copy=function(t){return new Date(t.getTime())},t_d_fromYear=function(t){return new Date(t,null)},t_d__resolveNative=function(t){var e=new Date(t);return isNaN(e.getTime())?null:e},t_v_nullIfNaN=function(t){return isNaN(t)?null:t},t_n_ensure=function(t){return null==t?null:t_v_nullIfNaN(Number(t))},t_n_fromString=t_n_ensure,t_n_is=function(t){var e=typeof t;return"number"===e||"bigint"===e},t_d_ensure=function(t,e){if(null==t)throw t_err_req(t,0);if(t.constructor===Date)return e?t_d_copy(t):t;if(t_s_is(t)){var r=t_n_fromString(t);return null!=r?t_d_fromYear(r):t_d__resolveNative(t)||null}return t_n_is(t)?t_d_fromYear(t):void 0},t_d_resolve=function(t,e){return null==t?t_d_now():t_d_ensure(t,e)},t_d_create=function(t){return t_d_resolve(t,!0)},t_d_from=t_d_create,t_titan_getLastCompileTime=function(){var t=t_titan_getCompiledDir()+"LastCompileTime.txt";return t_fs_exists(t)?t_d_from(t_fs_load(t)):null},t_fs_getModifiedDate=function(t){return t_fs_stat(t).mtime},t_d_isBefore=function(t,e,r){return t=t_d_ensure(t),e=t_d_ensure(e),!1===r?t<e:t<=e},t_titan_hasNewCompile=function(t){var e=t_titan_getLastCompileTime();if(e){var r=t_fs_getModifiedDate(t);if(t_d_isBefore(r,e))return!0}return!1},t_node_getScriptDir=function(t){var e=t_node_getScriptPath();return e?t_path_dir(e,t):null},t_fs_loadJSON=function(t){return JSON.parse(t_fs_loadText(t))},t_o_addGetterAndSetter=function(t,e,r,_,n){return t_o_defineProperty(t,e,{get:r,set:_},n)},t_o_setGetterAndSetter=t_o_addGetterAndSetter,t_o_replaceGetterAndSetter=function(t,e,r,_){return t_o_defineProperty(t,e,{value:r,writable:!0},_)},t_o_setLazy=function(t,e,r,_){t_o_setGetterAndSetter(t,e,function(){var _=r(e,t);return this[e]=_,_},function(t){t_o_replaceGetterAndSetter(this,e,t,_)},_)},t_titan__trackGlobals=function(t,e){var r=t.globals,_=t.shortNamesToGlobals;Object.keys(_).forEach(t=>{for(var n=_[t],s=n.length,i=0;i<s;i++){var a=n[i],o=globalThis[a];o||(o=globalThis[a]={});var u=r[a];Object.keys(u).forEach(r=>{var _=e[t][r];o[r]=_})}}),e._meta||(e._meta={}),e._meta.globals=t.globals},t_titan__loadDynamicDeps=function _loadDynamicDeps(dynPackagePath,localT,options){const path=t_node_path();if(dynPackagePath)dynPackagePath=path.resolve(t_node_getScriptDir(),dynPackagePath);else{var scriptPath=t_node_getScriptPath();if(!scriptPath)throw new Error("Cannot find package name because scriptPath does not exist.");var dir=path.dirname(scriptPath),baseName=path.basename(scriptPath).split(".")[0];baseName=baseName[0].toLowerCase()+baseName.slice(1),dynPackagePath=path.join(dir,baseName+".pkg.json")}for(var packageObj=t_fs_loadJSON(dynPackagePath),setLazy=t_o_setLazy,items=packageObj.itemsInOrder,numItems=items.length,i=0;i<numItems;i++){let item=items[i],[shortName,itemName,evalText]=item,tModObj=localT[shortName];tModObj||(tModObj=localT[shortName]={}),Object.hasOwn(tModObj,itemName)||setLazy(tModObj,itemName,function(){let t=localT;return eval("("+evalText+")")})}packageObj.globals&&t_titan__trackGlobals(packageObj,localT)},t_node__basicRequire=function(t){return require(t)},t_npm_isBuiltIn=function(t){return!!t.startsWith("node:")||t_node__basicRequire("node:module").isBuiltin(t)},t_npm_isFile=function(t){return t.startsWith(".")},t_o_ensureMulti=function(t,e,r){return Object.keys(e).forEach(_=>t_o_ensure(t,_,e[_],r)),t},t_o_safeEnsureMulti=function(t,e,r){return t_o_ensureMulti(t||{},e,r)},t_o_safeSetDefaults=function(t,e,r){return e?t_o_safeEnsureMulti(t,e,r):t??{}},t_opt_resolve=function(t,e){return t_o_safeSetDefaults(t,e,!0)},t_err_ValueError=class extends t_err_Error{constructor(t,e){super(t??"Unexpected value",e)}},t_err_value=function(t,e,r,_){if(0===arguments.length)return new t_err_ValueError("Unexpected value received");_||(_={});var n,{expected:s}=_;return n=s?"Received "+t_v_display(t)+", expected one of "+t_v_display(s):"Unexpected value received: "+t_v_display(t),r&&(n+=' for "'+r+'"'),null!=e&&(n+=" (index "+e+")"),_.fromFn||(_.fromFn=t_err_value),new t_err_ValueError(n,_)},t_os__resolveStdio=function(t){var e=t.stdio;if(e){if(!t_a_is(e)){if(!t_s_is(e))throw t_err_type(e,"stdio");if("pipe"===e)e=["pipe","pipe","pipe"];else if("inherit"===e)e=["inherit","inherit","inherit"];else if("ignore"===e)e=["ignore","ignore","ignore"];else{if("overlapped"!==e)throw t_err_value(e,"stdio");e=["overlapped","overlapped","overlapped"]}t.stdio=e}}else e=t.stdio=[null,null,null];return e},t_a_assert=function(t){if(!t_a_is(t))throw t_err_type(t,null,null,{expected:Array});return!0},t_a_replaceContents=function(t,e){var r=e.length;t.length=r;for(var _=0;_<r;_++)t[_]=e[_];return t},t_f_not=function(t){return function(){return!t.apply(this,arguments)}},t_a_removeByFilter=function(t,e){return t_a_replaceContents(t,t.filter(t_f_not(e)))},t_a_removeNullish=function(t){return t_a_removeByFilter(t,t=>null==t)},t_node_child_process=t_node__builtInModule("child_process"),t_win_is=t_f_one(function(){return"win32"===process.platform}),t_shell__handleError=function(t,e,r){if(r||(r={}),e(t))throw t;if(r.nullOnErr)return null;var _=r.onErr;if(void 0!==_)return t_v_resolve(_);throw t},t_os_run=function(t,e,r,_){var n=(r=t_opt_resolve(r,_)).liveOutput,s=r.captureOutput??r.capture,i=r.captureErr??r.capture;s&&null==n&&(n=!1),r.dir&&(r.cwd=r.dir);var a=t_os__resolveStdio(r);if(null==a[0]&&!1!==r.allowInput){if(r.input)throw t_err_create("options.allowInput (user) and options.input (programmatic) cannot be used simultaneously for synchronous child processes.");a[0]="inherit"}if(null==a[1])if(s){if(n)throw t_err_create("options.captureOutput and options.liveOutput cannot be used simultaneously for synchronous child processes.");a[1]="pipe"}else a[1]=n??1?"inherit":"ignore";if(null==a[2]){i=r.captureErr??!1;var o=r.showErr;if(i&&o)throw t_err_create("options.captureErr and options.showErr cannot be used simultaneously for synchronous child processes.");a[2]=i?"pipe":o??1?"inherit":"ignore"}r.encoding||(r.encoding="utf8"),e&&(t_a_assert(e),t_a_removeNullish(e));try{var u=t_node_child_process().execFileSync(t,e,r);null!=u&&r.trim&&(u=u.trim());var l=r.map??r.mapFn;return l&&(u=l(u)),u}catch(t){if(t_win_is())return t_shell__handleError(t,t=>"ENOENT"===t.code,r);throw t}},t_npm__runCommand=function(t,e){return e||(e={}),null==e.captureOutput&&(e.captureOutput=!1),e.shell=!0,e.filterExtensions=!1,t_os_run("npm",t,e)},t_npm_install=function(t,e,r){return t_npm__runCommand(["install",t,e?"-g":null],r)},t_node_requireLocal=function(t){return require(t_path_abs(t))},t_o_Cache=class{constructor(){this.store={}}get(t,e){return t_o_ensure(this.store,t,e)}remove(t){return delete this.store[t]}delete(t){return this.remove(t)}},t_node__requireDirCache=new t_o_Cache,t_path_join=function(t,e,r){if(t_node_is()){var _=t_node_path().join(String(t),String(e));return r?t_path_ensureTrailingSlash(_):_}throw t_err_nyi()},t_path_ensureEndsWith=function(t,e){return t.endsWith(e)?t:t_path_join(t,e)},t_node_module=t_node__builtInModule("module"),t_node__createRequire=function(t){return t=t_path_ensureEndsWith(t,"node_modules"),t_node_module().createRequire(t)},t_node__requireFromDir=function(t,e){return t_node__requireDirCache.get(t,()=>t_node__createRequire(t))(e)},t_o_setDefaults=function(t,e,r){return e?t_o_ensureMulti(t,e,r):t},t_s__removeStringFromEnd=function(t,e){return t.endsWith(e)?t.substring(0,t.length-e.length):t},t_s__removeRegexFromEnd=function(t,e){var r=t_re_matchEnd(e,t);return r?t.slice(0,r.index):t},t_s_removeFromEnd=function(t,e){if(t_s_is(e))return t_s__removeStringFromEnd(t,e);if(t_re_is(e))return t_s__removeRegexFromEnd(t,e);throw t_err_type(e,1)},t_s_removeTrailing=t_s_removeFromEnd,t_s_splitAtIndex=function(t,e){return[t.slice(0,e),t.slice(e)]},t_js_splitLastExpression=function(t){t=t_s_removeTrailing(t.trim(),";");var e=Math.max(t.lastIndexOf(";"),t.lastIndexOf("\n"));return t_s_splitAtIndex(t,e+1)},t_s_ensureStartsWith=function(t,e){return t.startsWith(e)?t:e+t},t_js_ensureReturn=function(t){var[e,r]=t_js_splitLastExpression(t);return e+t_s_ensureStartsWith(r.trim(),"return ")},t_js__nodeEnableAwait=function(t){return t_node_require("node-repl-await").processTopLevelAwait(t)},t_js_enableAwait=function(t){return t_js__nodeEnableAwait(t)??t},t_s_replace=t_s_replaceAll,t_path_fws=function(t,e){return""===t?t:(!1!==e&&(t=t_path_ensureTrailingSlash(t)),t_s_replace(t,"\\","/"))},t_js_useTitan=function(t){return'require("'+t_path_fws(t_titan_getPackagePath(),!1)+'");\n'+t},t_s_removeAll=function(t,e){return t_s_replaceAll(t,e,"")},t_s_removeMulti=function(t,e){return e.forEach(e=>t=t_s_removeAll(t,e)),t},t_s_removeLineBreaks=function(t){return t_s_removeMulti(t,["\r","\n"])},t_js_inline=function(t){return t_s_removeLineBreaks(t_js_removeComments(t))},t_js_enhance=function(t,e,r){return(e||r)&&(e||(e={}),r&&t_o_setDefaults(e,r),e.ensureReturn&&(t=t_js_ensureReturn(t)),e.topLevelAwait&&(t=t_js_enableAwait(t)),e.useTitan&&(t=t_js_useTitan(t)),e.keepAlive&&(t="\nsetInterval(()=>{}, 100000);\n"+t),(e.logErrors||e.keepAlive)&&(t="process.on('uncaughtException', console.error);\nprocess.on('unhandledRejection', console.error);\n"+t),e.inline&&(t=t_js_inline(t))),t},t_s_ensure=function(t){return t_s_is(t)?t:t_s_from(t)},t_f_isArrowString=function(t){var e=t.indexOf("{");return-1===e||t.slice(0,e).includes("=>")},t_s__indexWithIndices=function(t,e,r,_,n){return t_s_withIndices(t,e,r,_,(t,e)=>-1===t?-1:void 0===e?t:e+t,n)},t_s_indexOfFn=function(t,e){return Array.prototype.findIndex.call(t,e)},t_s_index=function(t,e,r,_,n){var s=t_s_is(e);return s&&null==_&&!n?t.indexOf(e,r):t_s__indexWithIndices(t,t=>s?t.indexOf(e):t_re_is(e)?t.search(e):t_s_indexOfFn(t,e),r,_,n)},t_s_after=function(t,e,r,_,n){var s=t_s_index(t,e,r,_,n);return-1===s?null:t.slice(s+1,_)},t_s__removeStringFromStart=function(t,e){return t.startsWith(e)?t.substring(e.length):t},t_s_remove=t_s_removeAll,t_re_removeFlag=function(t,e){return t_re_copy(t,t_s_remove(t.flags,e))},t_re_local=function(t){return t_re_removeFlag(t,"g")},t_re_ensureLocal=t_f_memoize(function(t){return t.global?t_re_local(t):t},0),t_re_match=function(t,e,r){return(t=null!=r?t_re_setStartIndex(t,r,e):t_re_ensureLocal(t)).exec(e)},t_re_matchStart=function(t,e){var r=t_re_match(t,e);return r&&0===r.index?r:null},t_s__removeRegexFromStart=function(t,e){var r=t_re_matchStart(e,t);return r?t.slice(r[0].length):t},t_s_removeFromStart=function(t,e){if(t_s_is(e))return t_s__removeStringFromStart(t,e);if(t_re_is(e))return t_s__removeRegexFromStart(t,e);throw t_err_type(e,1)},t_s_removeLeading=t_s_removeFromStart,t_f__getArrowFnBody=function(t){var e=t_s_after(t,"=>").trim();return t_s_removeLeading(t_s_removeTrailing(e,"}"),"{")},t_f__getNormalFnBody=function(t){return t_s_after(t,"{").slice(0,-1)},t_f_body=function(t){var e=t_s_ensure(t);return t_f_isArrowString(e)?t_f__getArrowFnBody(e):t_f__getNormalFnBody(e)},t_s_resolve=function(t){return null==t?"":t_s_is(t)?t:t_f_is(t)?t_f_body(t):String(t)},t_node_run=function(t,e){var r=e?.basic?null:{topLevelAwait:!0,useTitan:!0},_=t_js_enhance(t_s_resolve(t),e,r);return t_os_run("node",[e?.mode??"-p",_],e)},t_v_req=function(t,e,r){if(null==t)throw t_err_req(t,e,r,{fromFn:t_v_req});return t},t_proc_signal=function(t,e){return process.kill(t,t_v_req(e,0,"signalName"))},t_proc_interrupt=function(t){return t_proc_signal(t,"SIGINT")},t_node_interrupt=function(){return t_proc_interrupt(process.pid)},t_node_sigint=t_node_interrupt,t_bool_fromYN=function(t){if("Y"===(t=t.toUpperCase()))return!0;if("N"===t)return!1;throw t_err_value(t,0,"char")},t_node_promptYNSync=function(t){null==t&&(t="Are you sure? [y/n]: "),process.stdout.write(t);var e=t_node_run(function(){const t=process.stdin,e=process.stdout;t.setRawMode(!0),t.setEncoding("utf8"),t.on("data",t=>{var r=t.toUpperCase();"Y"===r||"N"===r?(e.write(t),process.exit(0)):""===t&&(e.write("^C"),process.exit(0))})},{mode:"-e",basic:!0,stdio:["inherit","pipe"]});if("^C"===e)throw process.stdout.write(e),t_node_sigint(),t_err_create("Prompt was cancelled via interrupt.");return console.log(e),t_bool_fromYN(e)},t_o_resolveKeys=function(t){return t_a_is(t)?t:t_s_is(t)?t.split("."):[t]},t_tree_setCustom=function(t,e,r,_,n,s){var i=r;return t_tree_dive(t,e,_,n,s,(t,e,r)=>r(t,e,t_v_resolve(i)))},t_env_setConfig=function(t,e){var r=e,_=globalThis.config;_||(_=globalThis.config={});var n,s=t_o_resolveKeys(t);return s.length>1?n=t_tree_setCustom(_,s,r):(n=t_v_resolve(r),_[s[0]]=n),n},t_node_addRequireDir=function(t,e){return t_env_setConfig("node.require.customDirs",r=>(r||(r=[]),!1!==e&&(t=t_path_ensureEndsWith(t,"node_modules")),r.includes(t)||r.push(t),r)),t},t_node_ensureRequireDir=t_node_addRequireDir,t_o_diveGet=t_tree_dive,t_env_getConfig=function(t){var e=globalThis.config;if(e){var r=t_o_resolveKeys(t);return r.length>1?t_o_diveGet(e,r):e[r[0]]}},t_env_resolveConfig=function(t,e,r){if(null!=t)return t;var _=t_env_getConfig(e);return null!=_?_:r},t_fs_ensureParent=function(t){var e=t_path_dir(t,!1);return t_fs_exists(e)||(e!==t&&t_fs_ensureParent(e),t_node_fs().mkdirSync(String(e))),t},t_fs_mkdir=function(t){return t_fs_ensureParent(t),t_node_fs().mkdirSync(String(t)),t},t_fs_ensureDir=function(t){return t_fs_exists(t)?t:t_fs_mkdir(t)},t_node_require=function(t,e){if(t_npm_isBuiltIn(t))return require(t);if(t_npm_isFile(t))return t_node_requireLocal(t);try{return require(t)}catch(t){}var r=__dirname,_=process.mainModule?.path;if(_!==r)try{return t_node__requireFromDir(_,t)}catch(t){}var n=process.cwd();if(n!==_&&n!==r)try{return t_node__requireFromDir(n,t)}catch(t){}var s=t_env_getConfig("node.require.customDirs");if(s)for(var i of s)try{return t_node__requireFromDir(i,t)}catch(t){}var a=t_env_resolveConfig(e?.autoInstall,"node.require.autoInstall"),o=t_env_resolveConfig(e?.promptInstall,"node.require.promptInstall",!0);if(a||o){var u=a||o;!0===u&&(u="./node_modules"),u=t_path_abs(u);var l=!1;if(a?(l=!0,console.log('Auto-installing "'+t+'" from npm to "'+u+'"...')):(l=t_node_promptYNSync('Npm package "'+t+'" is required. Install now? (Y/N) '))&&console.log('Installing "'+t+'" from npm to "'+u+'"...'),l){u=t_fs_ensureDir(u),t_npm_install(t,!1,{cwd:u});try{return t_node_ensureRequireDir(u),t_node__requireFromDir(u,t)}catch(t){console.error("Failed to load from auto-install dir: ",u)}}}throw t_err_create('Module not found: "'+t+'"',{checked:{moduleDir:r,scriptDir:_,cwd:n}})},t_js_fromAST=function(t,e){return t_node_require("astring").generate(t,e)},t_err_prepend=function(t,e){return t.stack=e+"\n"+t.stack,t},t_js_parse=function(t,e,r){r||(r={}),r.ecmaVersion||(r.ecmaVersion=2024),!1!==e&&(r.sourceType="module"),null==r.allowAwaitOutsideFunction&&(r.allowAwaitOutsideFunction=!0),null==r.allowReturnOutsideFunction&&(r.allowReturnOutsideFunction=!0);var _=t_node_require("acorn");try{return _.parse(t,r)}catch(e){throw t_err_prepend(e,"Acorn parsing error: "+t)}},t_js_removeComments=function(t,e,r){return t_js_fromAST(t_js_parse(t,e,r))},t_re_quote=/(['"])(.*?)\1/,t_re_quotes=t_re_global(t_re_quote),t_s_removeQuotes=function(t){return t.replace(t_re_quotes,"")},t_js_removeQuotes=t_s_removeQuotes,t_tree_copy=function(t){return globalThis.structuredClone(t)},t_o_deepCopy=t_tree_copy,t_f_cache=t_f_memoize,t_re_newline=/\r?\n/,t_v_isEmpty=function(t){return null==t||void 0!==t.length&&0===t.length},t_a_removeEmpty=function(t,e){return t_a_removeByFilter(t,t_v_isEmpty)},t_a_removeIndex=function(t,e){return t.splice(e,1),t},t_a_apply=function(t,e,r,_){[r,_]=t_a_resolveIndices(t,r,_);for(var n=r;n<_;n++){var s=e(t[n],n,t);void 0!==s&&(t[n]=s)}return t},t_a_mapToObj=function(t,e,r){for(var _={},n=t.length,s=0;s<n;s++){var i=e(t[s],s,t);if(i){var[a,o]=i;r?(_[a]||(_[a]=[]),_[a].push(o)):_[a]=o}}return _},t_a_slice=function(t,e,r,_){return[e,r]=t_a_resolveIndices(t,e,r,_),t.slice(e,r)},t_s_repeat=function(t,e){return t_a_create(e,t).join("")},t_re_text=function(t){return t?t[0]:null},t_s__splitByMatch=function(t,e){var r=null==e?-1:e.index;if(-1===r)return[t];var _=t_s_splitAtIndex(t,r);return _[1]=_[1].slice(e[0].length),_},t_s__matchWithIndices=function(t,e,r,_,n){return t_s_withIndices(t,e,r,_,(e,r)=>null===e?null:(e.input=t,void 0!==r&&(e.index+=r),e),n)},t_a_pushThroughMulti=function(t,e){return t.splice(t.length,0,...e),e},t_a_addMulti=function(t,e){return t_a_pushThroughMulti(t,e),t},t_a_pushMulti=t_a_addMulti,t_re_RegexResult=class extends Array{constructor(t,e,r,_,n){if(-1===e)throw t_err_create("RegexResult index cannot be -1. For empty result, use bare null.");if(null==t)throw t_err_create("RegexResult matchString cannot be null. For empty result, use bare null.");super(),this[0]=t,_&&t_a_pushMulti(this,_),this.index=e,this.input=r,n&&(this.groups=n)}fromParts(t){var e=t;return new t_re_RegexResult(e.match,e.index,e.input,e.captures,e.groups)}},t_re_createResult=function(t,e,r,_,n){return new t_re_RegexResult(t,e,r,_,n)},t_re_safeCreateResult=function(t,e,r,_,n){return-1===e||null==t?null:t_re_createResult(t,e,r,_,n)},t_s_match=function(t,e,r,_,n){return t_s__matchWithIndices(t,t=>{if(t_s_is(e)){var r=t.indexOf(e);return t_re_safeCreateResult(e,r,t)}return t_re_match(e,t)},r,_,n)},t_s_splitFirst=function(t,e,r,_,n){return t_s__splitByMatch(t,t_s_match(t,e,r,_,n))},t_n_tryParse=t_n_ensure,t_n_tryCoerce=function(t){return t_n_tryParse(t)??t},t_o_fromLines=function(t,e){null==e&&(e="=");var r={};return t.forEach(function(t){var[_,n]=t_s_splitFirst(t,e);null!=n&&(n=t_n_tryCoerce(n.trim())),r[_.trim()]=n}),r},t_o_safeDefault=t_o_safeEnsure,t_s_LinesArray=class extends Array{constructor(t){var e,r=t;null!=r&&(t_a_is(r)?e=r:t_s_is(r)&&(e=r.split(t_re_newline))),e?(super(e.length),Object.assign(this,e)):super(...arguments)}condense(t){return this.trim().removeEmpty(),t&&this.removeComments(t),this}trim(){return this.apply(t=>t.trim())}removeEmpty(){return t_a_removeEmpty(this)}removeComments(t){for(var e=0;e<this.length;e++){var r=this[e],_=r.indexOf(t);-1!==_&&(""===(r=r.slice(0,_)).trim()?(t_a_removeIndex(this,e),e--):this[e]=r)}return this}removeFirst(){return this.shift(),this}removeLast(){return this.pop(),this}apply(t){return t_a_apply(this,t)}join(){return super.join("\n")}toObj(t){return t_o_fromLines(this,t)}mapToObj(t,e){return t_a_mapToObj(this,t,e)}between(t,e,r){return r=t_o_safeDefault(r,"inclusiveEnd",!0),t_a_slice(this,t,e,r)}normalize(){if(this.length>0&&(""===this[0].trim()&&this.shift(),this.length>0&&(""===t_a_last(this).trim()&&this.pop(),this.length>0))){var t=this.find(t=>""!==t.trim()),e=t_re_text(t_re_match(/^\s*/,t));if(e){var r=e.length;this.apply(t=>{if(t.startsWith(e))return t.slice(r)})}}return this}deindent(t,e,r){throw t_err_nyi()}indent(t,e){var r=t_s_repeat(e??"\t",t??1);return this.apply(t=>r+t)}static is(t){return t_v_constructorMatches(t,this)}static fromChunks(t){return t.map(t=>t_s_removeTrailing(t,t_re_newline)).flatMap(t=>t_s_splitLines(t,!1))}},t_s_lines=function(t,e){var r=new t_s_LinesArray(t);return e&&r.condense(),r},t_s_splitLines=function(t,e,r){var _=t.split(t_re_newline);return e?t_s_lines(_,r):_},t_fs_loadLines=function(t,e){return t_s_splitLines(t_fs_loadText(t),!0,e)},t_re_test=function(t,e){return t_re_ensureLocal(t).test(e)},t_s_contains=function(t,e){return t_re_is(e)?t_re_test(e,t):t.includes(e)},t_s__createParamsObj=function(t,e,r,_){null==t&&(t=""),null==e&&(e="");var n={},s=(r,_)=>n[t+r+e]=_;return _&&t_o_each(_,s),r&&t_o_each(r,s),n},t_s__replaceByObj=function(t,e){return t_o_each(e,(e,r)=>t=t_s_replaceAll(t,e,r)),t},t_s_replaceParams=function(t,e,r,_){var n,s,i=_?.paramIdentifier??"$";if(i)if(t_s_is(i)){if(!t_s_contains(t,i))return t;n=i}else{if(!t_a_is(i))throw t_err_type(i,1,"paramIdentifier");if([n,s]=i,!t_s_contains(t,n)&&!t_s_contains(t,s))return t}var a=t_s__createParamsObj(n,s,e,r);return t_s__replaceByObj(t,a)},t_path_string=function(t){return t_s_is(t)?t:String(t)},t_path_windir=globalThis.process?.env.windir,t_path_getUserDir=function(t){if(t)throw t_err_nyi();return t_node_os().homedir()+t_path_sep},t_path_getDesktop=function(t){return t_path_getUserDir(t)+"Desktop/"},t_path__defaultParams={PROGRAMFILES:globalThis.process?.env.ProgramFiles,WINDIR:t_path_windir,SYSTEM32:t_path_windir&&t_path_windir+"System32",TEMP:t_path__getDefaultTempDir(),DESKTOP:t_path_getDesktop()},t_path_resolveVars=function(t,e){return t_s_replaceParams(t_path_string(t),e,t_path__defaultParams)},t_titan_locateSourceMap=function(){return t_titan_locate()+"Source/SourceMap.txt"},t_titan__resolveSourceMapPath=function(t){return t?t_path_resolveVars(t,{TITAN:t_titan_locate()}):t_titan_locateSourceMap()},t_s_before=function(t,e,r,_,n){var s=t_s_index(t,e,r,_,n);return-1===s?null:t.slice(r,s)},t_s_isCapitalized=function(t){var e=t[0];return e===e.toUpperCase()},t_a_filterSplit=function(t,e){var r=[],_=[];return t.forEach((n,s)=>(e(n,s,t)?r:_).push(n)),[r,_]},t_titan_loadGlobalsMap=t_f_cache(function(t){var e=t_fs_loadLines(t_titan__resolveSourceMapPath(t),!0),r={};return e.forEach(t=>{var e=t_s_before(t,"=").split(",").map(t=>t.trim()),[_,n]=t_a_filterSplit(e,t=>!t_s_isCapitalized(t)),s=_[0];if(!s)throw t_err_create('No shortName in SourceMap line: "'+t+'"');n.forEach(t=>{r[t]=s})}),r},0),t_titan__getGlobalsRegex=t_f_one(function(t){var e=Object.keys(t);return t_re_create("\\b("+e.join("|")+")\\.(\\w+)","g")}),t_titan_depsRegex=/\bt\.(\w+)\.(\w+)/g,t_titan__getDepsBasic=function(t,e){e||(e={});var r={},_=r.t={};if(e.enableGlobals){var n;n=e.additionalGlobals?t_o_deepCopy(e.additionalGlobals):{},r.globals=n;var s=t_titan_loadGlobalsMap(),i=t_titan__getGlobalsRegex(s),a=t_re_matchAll(i,t).filter(e=>{var r=e[1],_=e[2],n=t[e.index-1];if("."===n||"_"===n)return!1;var s=globalThis[r];return!s||void 0===s[_]});for(var[o,u,l]of a)n[u]||(n[u]={}),n[u][l]=!0;var c=a.map(([t,e,r])=>{var _=s[e];if(!_)throw t_err_create("No short name found for global: "+e);return"t."+_+"."+r+";"}).join(" ");t+="\n"+c}for(var[o,f,l]of a=t.matchAll(t_titan_depsRegex))_[f]||(_[f]={}),_[f][l]=!0;return r},t_titan_getDepsFromJS=function(t,e){return t=t_js_removeComments(t),t=t_js_removeQuotes(t),t_titan__getDepsBasic(t,e)},t_titan_getDepsFromHTML=function(t,e){return t_titan__getDepsBasic(t,e)},t_titan_getShallowDeps=function(t,e,r){if(e){if("js"===(e=e.toLowerCase()))return t_titan_getDepsFromJS(t,r);if("html"===e)return t_titan_getDepsFromHTML(t,r)}return t_titan__getDepsBasic(t,r)},t_o_has=function(t,e){return e in t},t_o_hasKey=t_o_has,t_tree_isSubsetOf=function(t,e){for(var r of(t_v_req(e,1),Object.keys(t))){if(!t_o_hasKey(e,r))return!1;var _=t[r];if(_&&_.constructor===Object&&!t_tree_isSubsetOf(_,e[r]))return!1}return!0},t_titan_jsonHasNewDeps=function(t,e){if(!t_tree_isSubsetOf(e.t,t))return!0;if(e.globals){var r=t._meta?.globals;if(!r)return!0;if(!t_tree_isSubsetOf(e.globals,r))return!0}return!1},t_titan_needsToPack=function(t,e,r,_){var n,s,i,a;_||(_={}),t&&(t=t_path_abs(t)),n=_.packagePath?t_path_abs(_.packagePath):t_titan_getPackagePath(t,!1,!0,_);var o,u=t_fs_exists(n);u?(s=t_titan_hasNewCompile(n))?i="New compile":(null==e&&(e=t_fs_loadText(t)),a=t_titan_getShallowDeps(e,"js",_),(o=t_titan_jsonHasNewDeps(r,a))&&(i="New deps")):i="No package";var l={needsPack:!!i,scriptPath:t,packagePath:n};return i&&(l.reasonText=i),null!=u&&(l.exists=u),null!=s&&(l.newCompile=s),null!=o&&(l.newDeps=o),e&&(l.sourceText=e),a&&(l.shallowDeps=a),l},t_path_isDir=function(t){return t_s_endsWith(t,t_re_slash)},t_re_lastIndex=function(t,e){var r=t_re_matchLast(t,e);return r?r.index:-1},t_path_dirPart=function(t){var e=t_re_lastIndex(t_re_slash,t);return-1===e?null:t.slice(0,e+1)},t_path_ignoreDir=function(t,e,r){if(t_path_isDir(t))return r?[t,null]:t;var _,n,s=t_path_dirPart(t),i=e(t_path_file(t),s,t);return r?[_,n]=i:_=i,null!=_&&(t=s?s+_:_),r?[t,n]:t},t_s_matchLast=function(t,e,r,_,n){return t_s__matchWithIndices(t,t=>{if(t_re_is(e))return t_re_matchLast(e,t);if(t_s_is(e)){var r=t.lastIndexOf(e);return-1!==r?new t_re_RegexResult(e,r):null}throw t_err_type(e,1)},r,_,n)},t_s_splitLast=function(t,e,r,_,n){return t_s__splitByMatch(t,t_s_matchLast(t,e,r,_,n))},t_path_splitExt=function(t){return t_path_ignoreDir(t,t=>t_s_splitLast(t,"."),!0)},t_path_ext=function(t,e){var r=t_path_splitExt(t)[1];return r?!1!==e?r.toLowerCase():r:null},t_titan_sourceMap={},t_titan_loadSourceMap=t_f_cache(function(t){t=t_titan__resolveSourceMapPath(t);var e=t_path_dir(t)+"../Compiled/Newest/",r=t_fs_loadLines(t,"//"),_=t_titan_sourceMap;for(var n of r){var s=n.indexOf("="),i=n.slice(0,s).trim();i=i.split(",").map(t=>t.trim()).filter(t=>!t_s_isCapitalized(t));var a=n.slice(s+1).trim(),o=t_path_join(e,a).replaceAll("\\","/");for(var u of i)_[u]=o}return _},0),t_titan_getDeps=function(t,e){var r=e?.fileType;if(r){if("js"===(r=r.toLowerCase()))return t_titan_getDepsFromJS(t,e);if("html"===r)return t_titan_getDepsFromHTML(t,e)}return t_titan__getDepsBasic(t,e)},t_gen_filter=function*(t,e){var r=0;for(var _ of t)e(_,r++,t)&&(yield _)},t_a_copy=function(t){return t.slice()},t_args_insert=function(t,e,r){for(var _=t.length-1;_>=e;_--)t[_+1]=t[_];return t[e]=r,t.length++,t},t_args_append=function(t,e){return t_args_insert(t,t.length,e)},t_args_push=t_args_append,t_f_recurse=function(t,e){return t.call(this,...e,function e(){return t_a_last(arguments)!==e&&t_args_push(arguments,e),t.apply(this,arguments)})},t_tree_iterator=function(t){t||(t={});var e=t.getKeys;e||(e=function(t){return Object.keys(t)});var r=t.recurseIf;if(!r){var _=this.constructor;r=t=>t_v_constructorMatches(t,_)||t_o_isPure(t)||t_a_is(t)}var n=t.leavesOnly??t.leafsOnly??!1,s=this;return t_f_recurse(function*(t,_,i,a){var o=e(t,_,i);if(o)for(var u=o.length,l=0;l<u;l++){var c=o[l],f=t[c],p=t_a_copy(_);p.push(c);var d=null,m={value:f,key:c,object:t,path:p,level:i,isLeaf:d,root:s},h=r(f,m);m.isLeaf=d=!h,n&&!d||(yield m),h&&(yield*a(f,p,i+1,a))}},[this,[],0])},t_tree_iterate=function(t,e){return t_tree_iterator.call(t,e)},t_o_fromKeys=function(t,e){1===arguments.length&&(e=!0);var r={};for(var _ of t)r[_]=e;return r},t_js_eachNode=function(t,e,r,_){var n=t_js_parse(t,e,_);t_node_require("acorn-walk").full(n,r)},t_js_getNodes=function(t,e,r,_){var n;if(t_s_is(r))n=t=>t.type===r;else if(t_a_is(r)){var s=t_o_fromKeys(r);n=t=>s[t.type]}else n=r;var i=[];return t_js_eachNode(t,e,function(t){n.apply(this,arguments)&&i.push(t)},_),i},t_js_fromASTNode=t_js_fromAST,t_js_parseDeclaration=function(t){var e,r,_,n=t,s=t_s_is(n)?t_js_parse(n).body[0]:n,i=s.type;if("VariableDeclaration"===i){e="variable";var a=s.declarations[0];r=a.id.name,_=a.init?a.init.raw??t_js_fromAST(a.init):"undefined"}else"FunctionDeclaration"===i?e="function":"ClassDeclaration"===i&&(e="class"),r=s.id.name;var o={type:e,name:r};return _&&(o.value=_),o.text=t_js_fromASTNode(s),o.node=s,o},t_js_getExports=function(t){return t_js_getNodes(t,!0,["ExportNamedDeclaration","ExportDefaultDeclaration"]).map(function(t){var e=t.declaration;if(e){var r=t_js_parseDeclaration(e);return r.node=t,r}return{node:t}})},t_titan__getAllDeps=function(t,e){e||(e={});var r=e.enableGlobals,_=t_titan_loadSourceMap(e.sourceMap),n={},s=[];return function t(e,i){var a=t_gen_filter(t_tree_iterate(e),t=>t.isLeaf);for(var o of a){var[u,l]=o.path,c=n[u];if(c||(c=n[u]={}),null==c[l]){var f=_[u];if(f){var p=t_path_fws(f)+l+".js";if(!t_fs_exists(p)){var d='Titan compiled value "t.'+u+"."+l+'" does not exist';throw i&&(d+=' (called by "'+i+'")'),t_err_create(d+=".")}var m=t_fs_load(p),h=t_js_getExports(m)[0];c[l]=h;var v="t."+u+"."+l;t(t_titan_getDeps(m,{fileType:"js",enableGlobals:r}).t,v),s.push([u,l])}else console.log('Skipping unmapped module "'+u+'"'),c[l]=!1}}}(t.t),{t:n,globals:t.globals,order:s}},t_titan_packTextToJSON=function(t,e){e||(e={});var r=e.deps??t_titan_getShallowDeps(t,e.fileType,e),{t:_,globals:n,order:s}=t_titan__getAllDeps(r,e),i={};if(i.t=r.t,n&&e.enableGlobals){i.globals=n;var a=t_titan_loadGlobalsMap(),o=Object.keys(n),u=t_a_mapToObj(o,t=>[a[t],t],!0);i.shortNamesToGlobals=u}return i.itemsInOrder=s.map(([t,e])=>{var r=_[t][e];return[t,e,"variable"===r.type?r.value:"("+r.text+")"]}),i},t_tree_join=function(t,e,r){return null==r&&(r=!0),t_f_recurse(function(t,e,_){t_o_each(t,function(t,n){if(t_o_hasKey(e,t)){var s=e[t];r?t_o_is(s)&&t_o_is(n)?_(n,s):e[t]=n:t_o_is(s)&&_(n,s)}else e[t]=n})},[t,e]),e},t_tree_merge=t_tree_join,t_o_fromArray=function(t){return Object.assign({},t)},t_a_toObj=function(t,e){if(e){var r={};return t.forEach((t,_,n)=>r[e(t,_,n)]=!0),r}return t_o_fromArray(t)},t_titan_addNewItemsToJSON=function(t,e){t_tree_merge(e.t,t.t,!1);var r=e.globals;if(r){var _=t.globals;_?t_tree_merge(r,_,!1):t.globals=r,t.shortNamesToGlobals=e.shortNamesToGlobals}var n=t_a_toObj(t.itemsInOrder,t=>t[0]+"."+t[1]);return e.itemsInOrder.forEach(e=>{n[e[0]+"."+e[1]]||t.itemsInOrder.push(e)}),t},t_bin_isNodeBuffer=function(t){return t instanceof Buffer},t_ab_isTA=function(t){return ArrayBuffer.isView(t)},t_bin_isTA=t_ab_isTA,t_bin_isByteSafe=function(t){return t_bin_isNodeBuffer(t)||t_bin_isTA(t)||t_s_is(t)},t_ab_is=function(t){return t.constructor===ArrayBuffer},t_bin_ensureByteSafe=function(t){return t_bin_isByteSafe(t)?t:t_ab_is(t)?Buffer.from(t):t_s_from(t)},t_fs_formatRaw=function(t){return t_n_is(t)?String(t):t_bin_ensureByteSafe(t)},t_fs_write=function(t,e){return t_fs_ensureParent(t),t_node_fs().writeFileSync(String(t),t_fs_formatRaw(e)),t},t_json_stringify=function(t,e){var r;return e||(e={}),r=e.condensed?0:null!=e.whitespace?e.whitespace:"\t",JSON.stringify(t,e.replacer,r)},t_fs_writeJSON=function(t,e,r){return t_fs_write(t,t_json_stringify(e,r))},t_titan_packTextToJSONFile=function(t,e,r){r||(r={}),r.deps||r.fileType||!e||(r.fileType=t_path_ext(e));var _=t_titan_packTextToJSON(t,r),n=r.packagePath||t_titan_getPackagePath(e,r.repl,!0,r);if(r.dynamic&&(r.packageExists??t_fs_exists(n))&&!(r.newCompile??t_titan_hasNewCompile(n))){var s=t_fs_loadJSON(n);_=t_titan_addNewItemsToJSON(s,_)}return t_fs_writeJSON(n,_),n},t_titan_autoPackAndLoadJSON=function(t,e,r,_){var n=t_titan_needsToPack(t,e,r,_);return n.needsPack&&(_.onPack&&_.onPack(n.reasonText),e=n.sourceText??t_fs_loadText(t),_.packagePath=n.packagePath,_.packageExists=n.exists,_.newCompile=n.newCompile,_.deps=n.shallowDeps,t_titan_packTextToJSONFile(e,t,_),t_titan__loadDynamicDeps(n.packagePath,r,_)),r},newItems={node:{getScriptPath:t_node_getScriptPath,positionalArgs:t_node_positionalArgs,args:t_node_args,fs:t_node_fs,_builtInModule:t_node__builtInModule,requireBuiltIn:t_node_requireBuiltIn,os:t_node_os,path:t_node_path,is:t_node_is,display:t_node_display,util:t_node_util,getScriptDir:t_node_getScriptDir,require:t_node_require,_basicRequire:t_node__basicRequire,child_process:t_node_child_process,requireLocal:t_node_requireLocal,_requireFromDir:t_node__requireFromDir,_requireDirCache:t_node__requireDirCache,_createRequire:t_node__createRequire,module:t_node_module,promptYNSync:t_node_promptYNSync,run:t_node_run,sigint:t_node_sigint,interrupt:t_node_interrupt,ensureRequireDir:t_node_ensureRequireDir,addRequireDir:t_node_addRequireDir},cli:{positionalArgs:t_cli_positionalArgs,resolveArgs:t_cli_resolveArgs,splitArgs:t_cli_splitArgs},env:{args:t_env_args,setConfig:t_env_setConfig,getConfig:t_env_getConfig,resolveConfig:t_env_resolveConfig},f:{one:t_f_one,is:t_f_is,memoize:t_f_memoize,MemoizedFunction:t_f_MemoizedFunction,createClass:t_f_createClass,ensureConstructor:t_f_ensureConstructor,createConstructor:t_f_createConstructor,isArrowFn:t_f_isArrowFn,isArrow:t_f_isArrow,wrap:t_f_wrap,retThis:t_f_retThis,setName:t_f_setName,not:t_f_not,body:t_f_body,isArrowString:t_f_isArrowString,_getArrowFnBody:t_f__getArrowFnBody,_getNormalFnBody:t_f__getNormalFnBody,cache:t_f_cache,recurse:t_f_recurse},s:{is:t_s_is,isAny:t_s_isAny,isPrimitive:t_s_isPrimitive,isObject:t_s_isObject,decapitalize:t_s_decapitalize,endsWith:t_s_endsWith,chars:t_s_chars,resolveIndex:t_s_resolveIndex,toLiteral:t_s_toLiteral,quote:t_s_quote,escape:t_s_escape,replaceAll:t_s_replaceAll,apply:t_s_apply,withIndices:t_s_withIndices,from:t_s_from,removeTrailing:t_s_removeTrailing,removeFromEnd:t_s_removeFromEnd,_removeStringFromEnd:t_s__removeStringFromEnd,_removeRegexFromEnd:t_s__removeRegexFromEnd,splitAtIndex:t_s_splitAtIndex,ensureStartsWith:t_s_ensureStartsWith,replace:t_s_replace,removeLineBreaks:t_s_removeLineBreaks,removeMulti:t_s_removeMulti,removeAll:t_s_removeAll,resolve:t_s_resolve,ensure:t_s_ensure,after:t_s_after,index:t_s_index,_indexWithIndices:t_s__indexWithIndices,indexOfFn:t_s_indexOfFn,removeLeading:t_s_removeLeading,removeFromStart:t_s_removeFromStart,_removeStringFromStart:t_s__removeStringFromStart,_removeRegexFromStart:t_s__removeRegexFromStart,remove:t_s_remove,removeQuotes:t_s_removeQuotes,splitLines:t_s_splitLines,lines:t_s_lines,LinesArray:t_s_LinesArray,repeat:t_s_repeat,splitFirst:t_s_splitFirst,_splitByMatch:t_s__splitByMatch,match:t_s_match,_matchWithIndices:t_s__matchWithIndices,replaceParams:t_s_replaceParams,contains:t_s_contains,_createParamsObj:t_s__createParamsObj,_replaceByObj:t_s__replaceByObj,before:t_s_before,isCapitalized:t_s_isCapitalized,splitLast:t_s_splitLast,matchLast:t_s_matchLast},fs:{loadText:t_fs_loadText,load:t_fs_load,getID:t_fs_getID,stat:t_fs_stat,deepStat:t_fs_deepStat,shallowStat:t_fs_shallowStat,exists:t_fs_exists,getModifiedDate:t_fs_getModifiedDate,loadJSON:t_fs_loadJSON,ensureDir:t_fs_ensureDir,mkdir:t_fs_mkdir,ensureParent:t_fs_ensureParent,loadLines:t_fs_loadLines,writeJSON:t_fs_writeJSON,write:t_fs_write,formatRaw:t_fs_formatRaw},titan:{getTempDir:t_titan_getTempDir,getPackagePath:t_titan_getPackagePath,getPackageName:t_titan_getPackageName,hasNewCompile:t_titan_hasNewCompile,getLastCompileTime:t_titan_getLastCompileTime,getCompiledDir:t_titan_getCompiledDir,locate:t_titan_locate,_loadDynamicDeps:t_titan__loadDynamicDeps,_trackGlobals:t_titan__trackGlobals,autoPackAndLoadJSON:t_titan_autoPackAndLoadJSON,needsToPack:t_titan_needsToPack,getShallowDeps:t_titan_getShallowDeps,getDepsFromJS:t_titan_getDepsFromJS,_getDepsBasic:t_titan__getDepsBasic,loadGlobalsMap:t_titan_loadGlobalsMap,_resolveSourceMapPath:t_titan__resolveSourceMapPath,locateSourceMap:t_titan_locateSourceMap,_getGlobalsRegex:t_titan__getGlobalsRegex,depsRegex:t_titan_depsRegex,getDepsFromHTML:t_titan_getDepsFromHTML,jsonHasNewDeps:t_titan_jsonHasNewDeps,packTextToJSONFile:t_titan_packTextToJSONFile,packTextToJSON:t_titan_packTextToJSON,_getAllDeps:t_titan__getAllDeps,loadSourceMap:t_titan_loadSourceMap,sourceMap:t_titan_sourceMap,getDeps:t_titan_getDeps,addNewItemsToJSON:t_titan_addNewItemsToJSON},path:{getTempDir:t_path_getTempDir,_getDefaultTempDir:t_path__getDefaultTempDir,sep:t_path_sep,baseName:t_path_baseName,_removeExtsFromFile:t_path__removeExtsFromFile,file:t_path_file,dir:t_path_dir,ensureTrailingSlash:t_path_ensureTrailingSlash,abs:t_path_abs,ensureEndsWith:t_path_ensureEndsWith,join:t_path_join,fws:t_path_fws,resolveVars:t_path_resolveVars,string:t_path_string,_defaultParams:t_path__defaultParams,windir:t_path_windir,getDesktop:t_path_getDesktop,getUserDir:t_path_getUserDir,ext:t_path_ext,splitExt:t_path_splitExt,ignoreDir:t_path_ignoreDir,isDir:t_path_isDir,dirPart:t_path_dirPart},err:{nyi:t_err_nyi,NYIError:t_err_NYIError,Error:t_err_Error,Enhanced:t_err_Enhanced,defaultFromFn:t_err_defaultFromFn,type:t_err_type,TypeError:t_err_TypeError,create:t_err_create,req:t_err_req,value:t_err_value,ValueError:t_err_ValueError,prepend:t_err_prepend},o:{safeEnsure:t_o_safeEnsure,ensure:t_o_ensure,constructorMatches:t_o_constructorMatches,is:t_o_is,isAny:t_o_isAny,setHidden:t_o_setHidden,addNonEnumerable:t_o_addNonEnumerable,defineProperty:t_o_defineProperty,weakAssign:t_o_weakAssign,merge:t_o_merge,hideKey:t_o_hideKey,makeNonEnumerable:t_o_makeNonEnumerable,ensureCustom:t_o_ensureCustom,get:t_o_get,set:t_o_set,createEmpty:t_o_createEmpty,remove:t_o_remove,display:t_o_display,toLiteral:t_o_toLiteral,isPure:t_o_isPure,reduce:t_o_reduce,each:t_o_each,keys:t_o_keys,allKeys:t_o_allKeys,setLazy:t_o_setLazy,setGetterAndSetter:t_o_setGetterAndSetter,addGetterAndSetter:t_o_addGetterAndSetter,replaceGetterAndSetter:t_o_replaceGetterAndSetter,safeSetDefaults:t_o_safeSetDefaults,safeEnsureMulti:t_o_safeEnsureMulti,ensureMulti:t_o_ensureMulti,Cache:t_o_Cache,setDefaults:t_o_setDefaults,resolveKeys:t_o_resolveKeys,diveGet:t_o_diveGet,deepCopy:t_o_deepCopy,fromLines:t_o_fromLines,safeDefault:t_o_safeDefault,hasKey:t_o_hasKey,has:t_o_has,fromKeys:t_o_fromKeys,fromArray:t_o_fromArray},re:{is:t_re_is,matchEnd:t_re_matchEnd,matchLast:t_re_matchLast,matchAll:t_re_matchAll,setStartIndex:t_re_setStartIndex,copy:t_re_copy,updateFlagString:t_re_updateFlagString,parseFlagString:t_re_parseFlagString,createFlagString:t_re_createFlagString,ensureGlobal:t_re_ensureGlobal,global:t_re_global,addFlag:t_re_addFlag,createEscaped:t_re_createEscaped,create:t_re_create,resolveFlags:t_re_resolveFlags,escape:t_re_escape,slash:t_re_slash,matchStart:t_re_matchStart,match:t_re_match,ensureLocal:t_re_ensureLocal,local:t_re_local,removeFlag:t_re_removeFlag,quotes:t_re_quotes,quote:t_re_quote,newline:t_re_newline,text:t_re_text,safeCreateResult:t_re_safeCreateResult,createResult:t_re_createResult,RegexResult:t_re_RegexResult,test:t_re_test,lastIndex:t_re_lastIndex},v:{constructorMatches:t_v_constructorMatches,isPrimitive:t_v_isPrimitive,resolve:t_v_resolve,type:t_v_type,display:t_v_display,toLiteral:t_v_toLiteral,nullIfNaN:t_v_nullIfNaN,req:t_v_req,isEmpty:t_v_isEmpty},a:{last:t_a_last,resolveIndex:t_a_resolveIndex,is:t_a_is,ensure:t_a_ensure,pick:t_a_pick,create:t_a_create,fill:t_a_fill,resolveIndices:t_a_resolveIndices,push:t_a_push,add:t_a_add,splitLast:t_a_splitLast,splitTail:t_a_splitTail,wrapIndices:t_a_wrapIndices,wrapIndex:t_a_wrapIndex,toLiteral:t_a_toLiteral,display:t_a_display,assert:t_a_assert,removeNullish:t_a_removeNullish,removeByFilter:t_a_removeByFilter,replaceContents:t_a_replaceContents,removeEmpty:t_a_removeEmpty,removeIndex:t_a_removeIndex,apply:t_a_apply,mapToObj:t_a_mapToObj,slice:t_a_slice,pushMulti:t_a_pushMulti,addMulti:t_a_addMulti,pushThroughMulti:t_a_pushThroughMulti,filterSplit:t_a_filterSplit,copy:t_a_copy,toObj:t_a_toObj},class:{create:t_class_create,setName:t_class_setName,addStatics:t_class_addStatics,setDisplay:t_class_setDisplay},p:{asyncJoint:t_p_asyncJoint,is:t_p_is},sym:{display:t_sym_display,value:t_sym_value},macro:{config:t_macro_config},map:{Cache:t_map_Cache,ensure:t_map_ensure,get:t_map_get,set:t_map_set,MultiCache:t_map_MultiCache,diveEnsure:t_map_diveEnsure,createEmpty:t_map_createEmpty,diveDelete:t_map_diveDelete,remove:t_map_remove},args:{ensureArray:t_args_ensureArray,push:t_args_push,append:t_args_append,insert:t_args_insert},tree:{ensure:t_tree_ensure,dive:t_tree_dive,remove:t_tree_remove,setCustom:t_tree_setCustom,copy:t_tree_copy,isSubsetOf:t_tree_isSubsetOf,iterate:t_tree_iterate,iterator:t_tree_iterator,merge:t_tree_merge,join:t_tree_join},d:{from:t_d_from,create:t_d_create,resolve:t_d_resolve,now:t_d_now,ensure:t_d_ensure,copy:t_d_copy,fromYear:t_d_fromYear,_resolveNative:t_d__resolveNative,isBefore:t_d_isBefore},n:{fromString:t_n_fromString,ensure:t_n_ensure,is:t_n_is,tryCoerce:t_n_tryCoerce,tryParse:t_n_tryParse},js:{removeComments:t_js_removeComments,fromAST:t_js_fromAST,enhance:t_js_enhance,ensureReturn:t_js_ensureReturn,splitLastExpression:t_js_splitLastExpression,enableAwait:t_js_enableAwait,_nodeEnableAwait:t_js__nodeEnableAwait,useTitan:t_js_useTitan,inline:t_js_inline,parse:t_js_parse,removeQuotes:t_js_removeQuotes,getExports:t_js_getExports,getNodes:t_js_getNodes,eachNode:t_js_eachNode,parseDeclaration:t_js_parseDeclaration,fromASTNode:t_js_fromASTNode},npm:{isBuiltIn:t_npm_isBuiltIn,isFile:t_npm_isFile,install:t_npm_install,_runCommand:t_npm__runCommand},os:{run:t_os_run,_resolveStdio:t_os__resolveStdio},opt:{resolve:t_opt_resolve},win:{is:t_win_is},shell:{_handleError:t_shell__handleError},proc:{interrupt:t_proc_interrupt,signal:t_proc_signal},bool:{fromYN:t_bool_fromYN},gen:{filter:t_gen_filter},bin:{ensureByteSafe:t_bin_ensureByteSafe,isByteSafe:t_bin_isByteSafe,isNodeBuffer:t_bin_isNodeBuffer,isTA:t_bin_isTA},ab:{isTA:t_ab_isTA,is:t_ab_is},json:{stringify:t_json_stringify}};globalThis.t?Object.keys(newItems).forEach(function(e){if(t[e]){var r=newItems[e];Object.keys(r).forEach(function(_){t[e][_]=r[_]})}else t[e]=newItems[e]}):globalThis.t=Object.assign({},newItems),globalThis.exports&&(exports.default=globalThis.t);
1
+ var t_f_one=function(t){var e,r=!1;return function(){return r||(r=!0,e=t.apply(this,arguments)),e}},t_node_args=t_f_one(function(){return process.argv.slice(2)}),t_env_args=t_node_args,t_s_isPrimitive=function(t){return"string"==typeof t},t_s_isObject=function(t){return t instanceof String},t_s_isAny=function(t){return t_s_isPrimitive(t)||t_s_isObject(t)},t_s_is=t_s_isAny,t_cli_splitArgs=function(t,e){const r=[];let _="",n="outside",s=!1;for(let i=0;i<t.length;i++){const a=t[i];switch(n){case"outside":'"'===a?s?(_+=a,s=!1):(e&&(_+=a),n="insideQuote"):"\\"===a?s=!0:" "===a?(_.length>0&&(r.push(_),_=""),s=!1):(_+=a,s=!1);break;case"insideQuote":'"'!==a||s?"\\"!==a||s?(_+=a,s=!1):s=!0:(e&&(_+=a),n="outside")}}return _.length>0&&r.push(_),r},t_cli_resolveArgs=function(t,e){var r=t;return null==r?t_env_args():t_s_is(r)?t_cli_splitArgs(r,e):r},t_cli_positionalArgs=function(t,e){return t_cli_resolveArgs(t,e).slice()},t_node_positionalArgs=t_cli_positionalArgs,t_node_getScriptPath=function(){var t=require.main?.filename;return t||(null!=process._eval?null:t_node_positionalArgs(process.argv)[1])},t_node_requireBuiltIn=function(t){return require("node:"+t)},t_node__builtInModule=function(t){return t_f_one(()=>t_node_requireBuiltIn(t))},t_node_fs=t_node__builtInModule("fs"),t_fs_load=function(t){return t_node_fs().readFileSync(String(t),"utf8")},t_fs_loadText=t_fs_load,t_fs_deepStat=function(t,e){return t_node_fs().statSync(String(t),e)},t_fs_shallowStat=function(t,e){return t_node_fs().lstatSync(String(t),e)},t_fs_stat=function(t,e,r){return(e?t_fs_deepStat:t_fs_shallowStat)(t,r)},t_fs_getID=function(t,e){return t_fs_stat(t,e).ino},t_fs_exists=function(t){return!!t_node_fs().lstatSync(String(t),{throwIfNoEntry:!1})},t_err_Enhanced=function(t){return class extends t{constructor(t,e){super(t,e);var r=this.constructor.name;r&&(this.name=r)}}},t_err_Error=t_err_Enhanced(globalThis.Error),t_err_NYIError=class extends t_err_Error{constructor(t,e){super(t??"Not yet implemented",e)}},t_f_is=function(t){return"function"==typeof t},t_o_ensure=function(t,e,r,_){var n=t[e];if(void 0===n){var s=r;!1!==_&&t_f_is(s)&&(s=s(t,e)),t[e]=n=s}return n},t_o_safeEnsure=function(t,e,r,_){return t||(t={}),t_o_ensure(t,e,r,_),t},t_err_defaultFromFn=function(t,e){return t_o_safeEnsure(t,"fromFn",e,!1)},t_err_nyi=function(t,e){return new t_err_NYIError(t,t_err_defaultFromFn(e,t_err_nyi))},t_node_os=t_node__builtInModule("os"),t_node_path=t_node__builtInModule("path"),t_path_sep=t_node_path().sep,t_path__getDefaultTempDir=function(){return t_node_os().tmpdir()+t_path_sep},t_path_getTempDir=function(t){if(t)throw t_err_nyi();return t_path__getDefaultTempDir()},t_titan_getTempDir=function(){return t_path_getTempDir()+"Titan/"},t_s_decapitalize=function(t){return t.charAt(0).toLowerCase()+t.slice(1)},t_path__removeExtsFromFile=function(t){return t.split(".")[0]},t_path_file=function(t){return t_node_path().win32.basename(String(t))},t_path_baseName=function(t){return t_path__removeExtsFromFile(t_path_file(t))},t_titan_getPackageName=function(t,e,r,_){t||(t=t_node_getScriptPath()??"_console.js");var n=t_s_decapitalize(t_path_baseName(t));return e&&(n+="_repl"),n+(r&&_?.dynamic?".dypkg.json":".pkg.js")},t_v_constructorMatches=function(t,e){return null!=t&&t.constructor===e},t_o_constructorMatches=t_v_constructorMatches,t_re_is=function(t){return t_o_constructorMatches(t,RegExp)},t_a_last=function(t){return t[t.length-1]},t_o_is=function(t){return t_v_constructorMatches(t,Object)},t_s_chars=function(t){return new Set(t)},t_re_parseFlagString=function(t){var e={};if(t){var r=t_s_chars(t);r.has("g")&&(e.global=!0),r.has("i")&&(e.caseInsensitive=!0),r.has("y")&&(e.sticky=!0)}return e},t_re_createFlagString=function(t){var e="";return t.global&&(e+="g"),(t.caseInsensitive||0==t.caseSensitive)&&(e+="i"),t.sticky&&(e+="y"),e},t_re_updateFlagString=function(t,e){var r=t_re_parseFlagString(t);return t_re_createFlagString(Object.assign(r,e))},t_re_copy=function(t,e){var r=e,_=void 0;return t_s_is(r)?_=r:t_o_is(r)&&(_=t_re_updateFlagString(t.flags,r)),new RegExp(t,_)},t_a_resolveIndex=function(t,e){return e<0?t.length+e:e},t_s_resolveIndex=t_a_resolveIndex,t_re_setStartIndex=function(t,e,r){return t=t_re_copy(t,{global:!0}),null!=r&&(e=t_s_resolveIndex(r,e)),t.lastIndex=e,t},t_a_is=function(t){return Array.isArray(t)},t_a_ensure=function(t){return t_a_is(t)?t:[t]},t_p_is=function(t){return t instanceof Promise},t_p_asyncJoint=function(t,e){var r=t;return t_p_is(r)?r.then(e):e(r)},t_f_isArrow=function(t){return t_f_is(t)&&null==t.prototype},t_f_isArrowFn=t_f_isArrow,t_f_wrap=function(t){return function(){return t.apply(this,arguments)}},t_f_createConstructor=function(t,e){var r;return r=e?function(){this.super=e;var r=t.apply(this,arguments);return t_p_asyncJoint(r,()=>(delete this.super,r))}:t_f_isArrowFn(t)?t_f_wrap(t):t,r._isConstructor=!0,r},t_f_ensureConstructor=function(t,e){return t._isConstructor?t:t_f_createConstructor(t,e)},t_f_retThis=function(){return this},t_v_isPrimitive=function(t){var e=typeof t;return"object"!==e&&"function"!==e||null===t},t_o_isAny=function(t){return!t_v_isPrimitive(t)},t_o_merge=function(t,e,r){return!1===r?Object.keys(e).forEach(r=>{void 0===t[r]&&(t[r]=e[r])}):Object.assign(t,e),t},t_o_weakAssign=function(t,e){return t_o_merge(t,e,!1)},t_o_defineProperty=function(t,e,r,_){return r||(r={}),_&&t_o_weakAssign(r,_),null==r.enumerable&&(r.enumerable=!0),null==r.configurable&&(r.configurable=!0),Object.defineProperty(t,e,r)},t_o_addNonEnumerable=function(t,e,r,_){return t_o_defineProperty(t,e,{value:r,writable:!0,enumerable:!1},_),r},t_o_setHidden=t_o_addNonEnumerable,t_f_setName=function(t,e){Object.defineProperty(t,"name",{value:e,configurable:!0}),t_o_setHidden(t,"displayName",e)},t_class_setName=t_f_setName,t_class_addStatics=function(t,e){return Object.assign(t,e)},t_macro_config=function(t){},t_node_is=t_f_one(function(){return t_macro_config("node.is")??"undefined"==typeof window}),t_sym_display=t_node_is()?require("util").inspect.custom:Symbol("Display"),t_class_setDisplay=function(t,e){t.prototype[t_sym_display]=e},t_class_create=function(t,e,r,_,n,s){s||(s={}),t_s_is(e)&&(e=null);var i,a,o,u=r;u&&(t_a_is(u)?([a,o]=u,a&&(a=t_f_ensureConstructor(a))):i=t_f_ensureConstructor(u,e));var l=s.bareFn;s.singleton&&(l=function(){return null==p.default&&(p.default=new p(...arguments)),p.default});var c,f=a||i||e||t_f_retThis;function p(){if(!new.target&&l&&!(this instanceof p))return l.apply(this,arguments);var t=this;return t_p_asyncJoint(f.apply(t,arguments),r=>{if(r&&t_o_isAny(r)&&(t=r,a)){if(!new.target)throw t_err_nyi('Prototype repair is NYI for class instantiation without "new".');if(!e)throw t_err_nyi("instanceFn is not yet supported when extendsClass is null.");var _=Object.getPrototypeOf(this);Object.getPrototypeOf(t)!==_&&Object.setPrototypeOf(t,_)}return o?t_p_asyncJoint(o.apply(t,arguments),()=>t):t})}return t&&t_class_setName(p,t),e&&Object.setPrototypeOf(p,e),_?(c=_,e&&Object.setPrototypeOf(_,e.prototype)):c=e?Object.create(e.prototype):{},t_o_setHidden(c,"constructor",p),p.prototype=c,n&&t_class_addStatics(p,n),s.display&&t_class_setDisplay(p,s.display),s.implements&&t_a_ensure(s.implements).forEach(t=>t(p)),p},t_o_makeNonEnumerable=function(t,e){Object.defineProperty(t,e,{enumerable:!1})},t_o_hideKey=t_o_makeNonEnumerable,t_f_createClass=function(t,e,r,_,n){var s=Symbol();return t_class_create(t,Function,[function(){var t=function(){return t[s].apply(this,arguments)};return t},function(){var t=e.apply(this,arguments);if(!t)throw new Error("Constructor must return a function.");this[s]=t,t_o_hideKey(this,s)}],r,_,n)},t_a_resolveIndices=function(t,e,r,_){return e=null==e?0:t_a_resolveIndex(t,e),r=null==r?t.length:t_a_resolveIndex(t,r),_&&(0==_.inclusiveStart&&e++,_.inclusiveEnd&&r++),[e,r]},t_a_fill=function(t,e,r,_){var n=e;if([r,_]=t_a_resolveIndices(t,r,_),t_f_is(n))for(var s=r;s<_;s++)t[s]=n(s,t);else t.fill(n,r,_);return t},t_a_create=function(t,e){var r=new Array(t||0);return arguments.length>1&&t_a_fill(r,e),r},t_a_pick=function(t,e){return t_a_create(e.length,r=>t[e[r]])},t_o_get=function(t,e){return t[e]},t_o_set=function(t,e,r){return t[e]=r},t_v_resolve=function(t,e,r){var _=t;return t_f_is(_)?_.apply(r,e):_},t_o_ensureCustom=function(t,e,r,_,n){_||(_=t_o_get);var s=_(t,e);return void 0===s&&(s=t_v_resolve(r,[t,e]),n||(n=t_o_set),n(t,e,s)),s},t_map_get=function(t,e){return t.get(e)},t_map_set=function(t,e,r){return t.set(e,r)},t_map_ensure=function(t,e,r){return t_o_ensureCustom(t,e,r,t_map_get,t_map_set)},t_map_Cache=class{constructor(){this.store=new Map}get(t,e){return t_map_ensure(this.store,t,e)}remove(t){return this.store.delete(t)}delete(t){return this.remove(t)}},t_a_add=function(t,e){return t.push(e),t},t_a_push=t_a_add,t_args_ensureArray=function(t){var e=t;return Array.isArray(e)?e:Array.from(e)},t_sym_value=Symbol("Value"),t_o_createEmpty=function(){return{}},t_a_splitTail=function(t){return[t.slice(0,-1),t[t.length-1]]},t_a_splitLast=t_a_splitTail,t_tree_dive=function(t,e,r,_,n,s){r||(r=t_o_get),null==_&&(_=t_o_createEmpty),null==n&&(n=t_o_set),null==s&&(s=r);for(var[i,a]=t_a_splitLast(e),o=t,u=i.length,l=0;l<u;l++){var c=i[l],f=r(o,c);if(void 0===f){if(!_)return;f=t_o_ensureCustom(o,c,_,r,n)}o=f}if(s)return s(o,a,n)},t_tree_ensure=function(t,e,r,_,n,s){return t_tree_dive(t,e,_,n,s,(t,e)=>t_o_ensureCustom(t,e,r,_,s))},t_map_createEmpty=function(){return new Map},t_map_diveEnsure=function(t,e,r){return t_tree_ensure(t,e,r,t_map_get,t_map_createEmpty,t_map_set)},t_o_remove=function(t,e){return delete t[e],t},t_tree_remove=function(t,e,r,_){return t_tree_dive(t,e,r,!1,!1,_||t_o_remove)},t_map_remove=function(t,e){return t.delete(e)},t_map_diveDelete=function(t,e){return t_tree_remove(t,e,t_map_get,t_map_remove)},t_map_MultiCache=class{constructor(){this.store=new Map}get(t,e){return t=t_a_push(t_args_ensureArray(t),t_sym_value),t_map_diveEnsure(this.store,t,e)}remove(t){return t=t_a_push(t_args_ensureArray(t),t_sym_value),t_map_diveDelete(this.store,t)}delete(t){return this.remove(t)}},t_f_MemoizedFunction=t_f_createClass("MemoizedFunction",function(t,e){if(this.base=t,null!=e)if(1===(e=t_a_ensure(e)).length){this.cache=new t_map_Cache;var r=e[0];this._cacheKeyFormatter=t=>t[r]}else this.cache=new t_map_MultiCache,this._cacheKeyFormatter=t=>t_a_pick(t,e);else this.cache=new t_map_MultiCache,this._cacheKeyFormatter=t=>t;var _=this;return function(){var e=_._cacheKeyFormatter(arguments);return _.cache.get(e,()=>t.apply(this,arguments))}},{remove(t){return this.cache.remove(this._cacheKeyFormatter(t))}}),t_f_memoize=function(t,e){return new t_f_MemoizedFunction(t,e)},t_re_addFlag=function(t,e){return t_re_copy(t,t.flags+e)},t_re_global=function(t){return t_re_addFlag(t,"g")},t_re_ensureGlobal=t_f_memoize(function(t){return t.global?t:t_re_global(t)},0),t_re_matchAll=function(t,e,r){return t=null!=r?t_re_setStartIndex(t,r,e):t_re_ensureGlobal(t),Array.from(e.matchAll(t))},t_re_matchLast=function(t,e,r){return null!=r&&(e=e.slice(0,r)),t_a_last(t_re_matchAll(t,e))||null},t_re_matchEnd=function(t,e){var r=t_re_matchLast(t,e);return r&&e.length===r.index+r[0].length?r:null},t_err_TypeError=t_err_Enhanced(globalThis.TypeError),t_v_type=function(t){return null==t?t:t.constructor},t_node_util=t_node__builtInModule("util"),t_node_display=function(t,e){return e||(e={}),null==e.colors&&(e.colors=!0),t_node_util().inspect(t,e)},t_a_wrapIndex=t_a_resolveIndex,t_a_wrapIndices=function(t,e,r,_){return void 0!==e&&(null===e||0===e?e=void 0:(e=t_a_wrapIndex(t,e),_&&0==_.inclusiveStart&&e++)),void 0!==r&&(null===r||r===t.length?r=void 0:(r=t_a_wrapIndex(t,r),_&&_.inclusiveEnd&&r++)),[e,r]},t_s_withIndices=function(t,e,r,_,n,s){if(r||null!=_){[r,_]=t_a_wrapIndices(t,r,_,s);var i=t.slice(r,_),a=e(i);return n?n(a,r,_,i,t):a}return e(t)},t_s_apply=function(t,e,r,_,n){return t_s_withIndices(t,e,r,_,(e,r,_)=>(void 0!==r?t.slice(0,r):"")+(e||"")+(void 0!==_?t.slice(_):""),n)},t_re_resolveFlags=function(t){var e=t;return null==e?void 0:t_s_is(e)?e:t_re_createFlagString(e)},t_re_create=function(t,e){return new RegExp(t,t_re_resolveFlags(e))},t_re_escape=function(t){return t.replace(/[-[\]{}()*+!<=:?.\/\\^$|#\s,]/g,"\\$&")},t_re_createEscaped=function(t,e){return t_re_create(t_re_escape(t),e)},t_s_replaceAll=function(t,e,r,_,n,s){return t_s_apply(t,function(t){return t.replaceAll?(t_re_is(e)&&(e=t_re_ensureGlobal(e)),t.replaceAll(e,r)):(e=t_s_is(e)?t_re_createEscaped(e,"g"):t_re_ensureGlobal(e),this.replace(e,r))},_,n,s)},t_s_escape=function(t,e,r){return t_s_replaceAll(t,e,(r??"\\")+e)},t_s_quote=function(t,e,r){return null==e&&(e='"'),!1!==r&&(t=t_s_escape(t,e,r)),e+t+e},t_s_toLiteral=function(t){return t_s_quote(t,'"')},t_o_isPure=t_o_is,t_s_from=function(t){return t_o_isPure(t)?t_o_toLiteral(t):String(t)},t_a_toLiteral=function(t,e){return e||(e=t_v_toLiteral),"["+t.reduce(function(t,r){return t+e(r)+", "},"").slice(0,-2)+"]"},t_v_toLiteral=function(t){return t_s_is(t)?t_s_toLiteral(t):t_a_is(t)?t_a_toLiteral(t):t_s_from(t)},t_o_allKeys=function(t){return Reflect.ownKeys(t)},t_o_keys=function(t,e){return(e?t_o_allKeys:Object.keys)(t)},t_o_each=function(t,e,r){t_o_keys(t,r).forEach((r,_,n)=>e(r,t[r],_,n))},t_o_reduce=function(t,e,r,_){var n=null!=r?r:"";return t_o_each(t,function(){n=e.call(this,n,...arguments)},_),n},t_o_toLiteral=function(t,e){return e||(e=t_v_toLiteral),"{"+t_o_reduce(t,function(t,r,_){return t+r+":"+e(_)+", "},"",!0).slice(0,-2)+"}"},t_o_display=function(t,e){return null==e&&(e=1),e<=0?"[object Object]":t_o_toLiteral(t,t=>t_v_display(t,e-1))},t_a_display=function(t,e){return null==e&&(e=1),e<=0?"[object Array]":t_a_toLiteral(t,t=>t_v_display(t,e-1))},t_v_display=function(t,e){return void 0===t?"undefined":null===t?"null":t_node_is()?t_node_display(t,e):t_o_is(t)?t_o_display(t,maxNumLevels):t_a_is(t)?t_a_display(t,maxNumLevels):t_s_from(t)},t_err_type=function(t,e,r,_){if(0===arguments.length)return new t_err_TypeError("Unexpected type received");_||(_={});var n,{type:s,expected:i}=_;return null==s&&(s=t_v_type(t)),s&&s.name&&(s=s.name),i?(i.name&&(i=i.name),n="Expected "+i+", received "):n="Unexpected type received (",n+=s,null!=t&&(n+=" ("+t_v_display(t)+")"),i||(n+=")"),r&&(n+=' for "'+r+'"'),null!=e&&(n+=" (index "+e+")"),_.fromFn||(_.fromFn=t_err_type),new t_err_TypeError(n,_)},t_s_endsWith=function(t,e){if(t_s_is(e))return t.endsWith(e);if(t_re_is(e))return!!t_re_matchEnd(e,t);throw t_err_type(e,1,"matchThis")},t_re_slash=/\/|\\/,t_path_ensureTrailingSlash=function(t){return t_s_endsWith(t,t_re_slash)?t:t+t_path_sep},t_path_dir=function(t,e){return t=t_node_path().dirname(String(t)),!1===e?t:t_path_ensureTrailingSlash(t)},t_path_abs=function(t,e,r){t=String(t);var _=t_node_path().resolve,n=e?_(e,t):_(t);return r?n+t_path_sep:n},t_titan_getPackagePath=function(t,e,r,_){var n,s=t_titan_getPackageName(t,e,r,_);return n=t?t_path_dir(t):"./",t_path_abs(n+s)},t_err_create=function(t,e,r){var _=new t_err_Error(t,r);return e&&Object.assign(_,e),_},t_titan_locate=t_f_one(function(){var t=process.env.TITAN_PATH;if(!t)throw t_err_create("Environment variable TITAN_PATH is not set.");return t_path_ensureTrailingSlash(t)}),t_titan_getCompiledDir=function(t){return t||(t="Newest"),t_titan_locate()+"Compiled/"+t+"/"},t_d_now=function(){return new Date},t_err_req=function(t,e,r,_){var n="Required argument";return r&&(n+=' "'+r+'"'),null!=e&&(n+=" (index "+e+")"),n+=" missing",arguments.length>0&&(n+=" (received "+t_v_display(t)+")"),t_err_create(n,null,t_err_defaultFromFn(_,t_err_req))},t_d_copy=function(t){return new Date(t.getTime())},t_d_fromYear=function(t){return new Date(t,null)},t_d__resolveNative=function(t){var e=new Date(t);return isNaN(e.getTime())?null:e},t_v_nullIfNaN=function(t){return isNaN(t)?null:t},t_n_ensure=function(t){return null==t?null:t_v_nullIfNaN(Number(t))},t_n_fromString=t_n_ensure,t_n_is=function(t){var e=typeof t;return"number"===e||"bigint"===e},t_d_ensure=function(t,e){if(null==t)throw t_err_req(t,0);if(t.constructor===Date)return e?t_d_copy(t):t;if(t_s_is(t)){var r=t_n_fromString(t);return null!=r?t_d_fromYear(r):t_d__resolveNative(t)||null}return t_n_is(t)?t_d_fromYear(t):void 0},t_d_resolve=function(t,e){return null==t?t_d_now():t_d_ensure(t,e)},t_d_create=function(t){return t_d_resolve(t,!0)},t_d_from=t_d_create,t_titan_getLastCompileTime=function(t){var e=t_titan_getCompiledDir(t)+"LastCompileTime.txt";return t_fs_exists(e)?t_d_from(t_fs_load(e)):null},t_fs_getModifiedDate=function(t){return t_fs_stat(t).mtime},t_d_isBefore=function(t,e,r){return t=t_d_ensure(t),e=t_d_ensure(e),!1===r?t<e:t<=e},t_titan_hasNewCompile=function(t){var e=t_titan_getLastCompileTime();if(e){var r=t_fs_getModifiedDate(t);if(t_d_isBefore(r,e))return!0}return!1},t_node_getScriptDir=function(t){var e=t_node_getScriptPath();return e?t_path_dir(e,t):null},t_fs_loadJSON=function(t){return JSON.parse(t_fs_loadText(t))},t_o_addGetterAndSetter=function(t,e,r,_,n){return t_o_defineProperty(t,e,{get:r,set:_},n)},t_o_setGetterAndSetter=t_o_addGetterAndSetter,t_o_replaceGetterAndSetter=function(t,e,r,_){return t_o_defineProperty(t,e,{value:r,writable:!0},_)},t_o_setLazy=function(t,e,r,_){t_o_setGetterAndSetter(t,e,function(){var _=r(e,t);return this[e]=_,_},function(t){t_o_replaceGetterAndSetter(this,e,t,_)},_)},t_titan__trackGlobals=function(t,e){var r=t.globals,_=t.shortNamesToGlobals;Object.keys(_).forEach(t=>{for(var n=_[t],s=n.length,i=0;i<s;i++){var a=n[i],o=globalThis[a];o||(o=globalThis[a]={});var u=r[a];Object.keys(u).forEach(r=>{var _=e[t][r];o[r]=_})}}),e._meta||(e._meta={}),e._meta.globals=t.globals},t_titan__loadDynamicDeps=function _loadDynamicDeps(dynPackagePath,localT,options){const path=t_node_path();if(dynPackagePath)dynPackagePath=path.resolve(t_node_getScriptDir(),dynPackagePath);else{var scriptPath=t_node_getScriptPath();if(!scriptPath)throw new Error("Cannot find package name because scriptPath does not exist.");var dir=path.dirname(scriptPath),baseName=path.basename(scriptPath).split(".")[0];baseName=baseName[0].toLowerCase()+baseName.slice(1),dynPackagePath=path.join(dir,baseName+".pkg.json")}for(var packageObj=t_fs_loadJSON(dynPackagePath),setLazy=t_o_setLazy,items=packageObj.itemsInOrder,numItems=items.length,i=0;i<numItems;i++){let item=items[i],[shortName,itemName,evalText]=item,tModObj=localT[shortName];tModObj||(tModObj=localT[shortName]={}),Object.hasOwn(tModObj,itemName)||setLazy(tModObj,itemName,function(){let t=localT;return eval("("+evalText+")")})}packageObj.globals&&t_titan__trackGlobals(packageObj,localT)},t_node__basicRequire=function(t){return require(t)},t_npm_isBuiltIn=function(t){return!!t.startsWith("node:")||t_node__basicRequire("node:module").isBuiltin(t)},t_npm_isFile=function(t){return t.startsWith(".")},t_o_ensureMulti=function(t,e,r){return Object.keys(e).forEach(_=>t_o_ensure(t,_,e[_],r)),t},t_o_safeEnsureMulti=function(t,e,r){return t_o_ensureMulti(t||{},e,r)},t_o_safeSetDefaults=function(t,e,r){return e?t_o_safeEnsureMulti(t,e,r):t??{}},t_opt_resolve=function(t,e){return t_o_safeSetDefaults(t,e,!0)},t_err_ValueError=class extends t_err_Error{constructor(t,e){super(t??"Unexpected value",e)}},t_err_value=function(t,e,r,_){if(0===arguments.length)return new t_err_ValueError("Unexpected value received");_||(_={});var n,{expected:s}=_;return n=s?"Received "+t_v_display(t)+", expected one of "+t_v_display(s):"Unexpected value received: "+t_v_display(t),r&&(n+=' for "'+r+'"'),null!=e&&(n+=" (index "+e+")"),_.fromFn||(_.fromFn=t_err_value),new t_err_ValueError(n,_)},t_os__resolveStdio=function(t){var e=t.stdio;if(e){if(!t_a_is(e)){if(!t_s_is(e))throw t_err_type(e,"stdio");if("pipe"===e)e=["pipe","pipe","pipe"];else if("inherit"===e)e=["inherit","inherit","inherit"];else if("ignore"===e)e=["ignore","ignore","ignore"];else{if("overlapped"!==e)throw t_err_value(e,"stdio");e=["overlapped","overlapped","overlapped"]}t.stdio=e}}else e=t.stdio=[null,null,null];return e},t_a_assert=function(t){if(!t_a_is(t))throw t_err_type(t,null,null,{expected:Array});return!0},t_a_replaceContents=function(t,e){var r=e.length;t.length=r;for(var _=0;_<r;_++)t[_]=e[_];return t},t_f_not=function(t){return function(){return!t.apply(this,arguments)}},t_a_removeByFilter=function(t,e){return t_a_replaceContents(t,t.filter(t_f_not(e)))},t_a_removeNullish=function(t){return t_a_removeByFilter(t,t=>null==t)},t_node_child_process=t_node__builtInModule("child_process"),t_win_is=t_f_one(function(){return"win32"===process.platform}),t_shell__handleError=function(t,e,r){if(r||(r={}),e(t))throw t;if(r.nullOnErr)return null;var _=r.onErr;if(void 0!==_)return t_v_resolve(_);throw t},t_os_run=function(t,e,r,_){var n=(r=t_opt_resolve(r,_)).liveOutput,s=r.captureOutput??r.capture,i=r.captureErr??r.capture;s&&null==n&&(n=!1),r.dir&&(r.cwd=r.dir);var a=t_os__resolveStdio(r);if(null==a[0]&&!1!==r.allowInput){if(r.input)throw t_err_create("options.allowInput (user) and options.input (programmatic) cannot be used simultaneously for synchronous child processes.");a[0]="inherit"}if(null==a[1])if(s){if(n)throw t_err_create("options.captureOutput and options.liveOutput cannot be used simultaneously for synchronous child processes.");a[1]="pipe"}else a[1]=n??1?"inherit":"ignore";if(null==a[2]){i=r.captureErr??!1;var o=r.showErr;if(i&&o)throw t_err_create("options.captureErr and options.showErr cannot be used simultaneously for synchronous child processes.");a[2]=i?"pipe":o??1?"inherit":"ignore"}r.encoding||(r.encoding="utf8"),e&&(t_a_assert(e),t_a_removeNullish(e));try{var u=t_node_child_process().execFileSync(t,e,r);null!=u&&r.trim&&(u=u.trim());var l=r.map??r.mapFn;return l&&(u=l(u)),u}catch(t){if(t_win_is())return t_shell__handleError(t,t=>"ENOENT"===t.code,r);throw t}},t_npm__runCommand=function(t,e){return e||(e={}),null==e.captureOutput&&(e.captureOutput=!1),e.shell=!0,e.filterExtensions=!1,t_os_run("npm",t,e)},t_npm_install=function(t,e,r){return t_npm__runCommand(["install",t,e?"-g":null],r)},t_node_requireLocal=function(t){return require(t_path_abs(t))},t_o_Cache=class{constructor(){this.store={}}get(t,e){return t_o_ensure(this.store,t,e)}remove(t){return delete this.store[t]}delete(t){return this.remove(t)}},t_node__requireDirCache=new t_o_Cache,t_path_join=function(t,e,r){if(t_node_is()){var _=t_node_path().join(String(t),String(e));return r?t_path_ensureTrailingSlash(_):_}throw t_err_nyi()},t_path_ensureEndsWith=function(t,e){return t.endsWith(e)?t:t_path_join(t,e)},t_node_module=t_node__builtInModule("module"),t_node__createRequire=function(t){return t=t_path_ensureEndsWith(t,"node_modules"),t_node_module().createRequire(t)},t_node__requireFromDir=function(t,e){return t_node__requireDirCache.get(t,()=>t_node__createRequire(t))(e)},t_o_setDefaults=function(t,e,r){return e?t_o_ensureMulti(t,e,r):t},t_s__removeStringFromEnd=function(t,e){return t.endsWith(e)?t.substring(0,t.length-e.length):t},t_s__removeRegexFromEnd=function(t,e){var r=t_re_matchEnd(e,t);return r?t.slice(0,r.index):t},t_s_removeFromEnd=function(t,e){if(t_s_is(e))return t_s__removeStringFromEnd(t,e);if(t_re_is(e))return t_s__removeRegexFromEnd(t,e);throw t_err_type(e,1)},t_s_removeTrailing=t_s_removeFromEnd,t_s_splitAtIndex=function(t,e){return[t.slice(0,e),t.slice(e)]},t_js_splitLastExpression=function(t){t=t_s_removeTrailing(t.trim(),";");var e=Math.max(t.lastIndexOf(";"),t.lastIndexOf("\n"));return t_s_splitAtIndex(t,e+1)},t_s_ensureStartsWith=function(t,e){return t.startsWith(e)?t:e+t},t_js_ensureReturn=function(t){var[e,r]=t_js_splitLastExpression(t);return e+t_s_ensureStartsWith(r.trim(),"return ")},t_js__nodeEnableAwait=function(t){return t_node_require("node-repl-await").processTopLevelAwait(t)},t_js_enableAwait=function(t){return t_js__nodeEnableAwait(t)??t},t_s_replace=t_s_replaceAll,t_path_fws=function(t,e){return""===t?t:(!1!==e&&(t=t_path_ensureTrailingSlash(t)),t_s_replace(t,"\\","/"))},t_js_useTitan=function(t){return'require("'+t_path_fws(t_titan_getPackagePath(),!1)+'");\n'+t},t_s_removeAll=function(t,e){return t_s_replaceAll(t,e,"")},t_s_removeMulti=function(t,e){return e.forEach(e=>t=t_s_removeAll(t,e)),t},t_s_removeLineBreaks=function(t){return t_s_removeMulti(t,["\r","\n"])},t_js_inline=function(t){return t_s_removeLineBreaks(t_js_removeComments(t))},t_js_enhance=function(t,e,r){return(e||r)&&(e||(e={}),r&&t_o_setDefaults(e,r),e.ensureReturn&&(t=t_js_ensureReturn(t)),e.topLevelAwait&&(t=t_js_enableAwait(t)),e.useTitan&&(t=t_js_useTitan(t)),e.keepAlive&&(t="\nsetInterval(()=>{}, 100000);\n"+t),(e.logErrors||e.keepAlive)&&(t="process.on('uncaughtException', console.error);\nprocess.on('unhandledRejection', console.error);\n"+t),e.inline&&(t=t_js_inline(t))),t},t_s_ensure=function(t){return t_s_is(t)?t:t_s_from(t)},t_f_isArrowString=function(t){var e=t.indexOf("{");return-1===e||t.slice(0,e).includes("=>")},t_s__indexWithIndices=function(t,e,r,_,n){return t_s_withIndices(t,e,r,_,(t,e)=>-1===t?-1:void 0===e?t:e+t,n)},t_s_indexOfFn=function(t,e){return Array.prototype.findIndex.call(t,e)},t_s_index=function(t,e,r,_,n){var s=t_s_is(e);return s&&null==_&&!n?t.indexOf(e,r):t_s__indexWithIndices(t,t=>s?t.indexOf(e):t_re_is(e)?t.search(e):t_s_indexOfFn(t,e),r,_,n)},t_s_after=function(t,e,r,_,n){var s=t_s_index(t,e,r,_,n);return-1===s?null:t.slice(s+1,_)},t_s__removeStringFromStart=function(t,e){return t.startsWith(e)?t.substring(e.length):t},t_s_remove=t_s_removeAll,t_re_removeFlag=function(t,e){return t_re_copy(t,t_s_remove(t.flags,e))},t_re_local=function(t){return t_re_removeFlag(t,"g")},t_re_ensureLocal=t_f_memoize(function(t){return t.global?t_re_local(t):t},0),t_re_match=function(t,e,r){return(t=null!=r?t_re_setStartIndex(t,r,e):t_re_ensureLocal(t)).exec(e)},t_re_matchStart=function(t,e){var r=t_re_match(t,e);return r&&0===r.index?r:null},t_s__removeRegexFromStart=function(t,e){var r=t_re_matchStart(e,t);return r?t.slice(r[0].length):t},t_s_removeFromStart=function(t,e){if(t_s_is(e))return t_s__removeStringFromStart(t,e);if(t_re_is(e))return t_s__removeRegexFromStart(t,e);throw t_err_type(e,1)},t_s_removeLeading=t_s_removeFromStart,t_f__getArrowFnBody=function(t){var e=t_s_after(t,"=>").trim();return t_s_removeLeading(t_s_removeTrailing(e,"}"),"{")},t_f__getNormalFnBody=function(t){return t_s_after(t,"{").slice(0,-1)},t_f_body=function(t){var e=t_s_ensure(t);return t_f_isArrowString(e)?t_f__getArrowFnBody(e):t_f__getNormalFnBody(e)},t_s_resolve=function(t){return null==t?"":t_s_is(t)?t:t_f_is(t)?t_f_body(t):String(t)},t_node_run=function(t,e){var r=e?.basic?null:{topLevelAwait:!0,useTitan:!0},_=t_js_enhance(t_s_resolve(t),e,r);return t_os_run("node",[e?.mode??"-p",_],e)},t_v_req=function(t,e,r){if(null==t)throw t_err_req(t,e,r,{fromFn:t_v_req});return t},t_proc_signal=function(t,e){return process.kill(t,t_v_req(e,0,"signalName"))},t_proc_interrupt=function(t){return t_proc_signal(t,"SIGINT")},t_node_interrupt=function(){return t_proc_interrupt(process.pid)},t_node_sigint=t_node_interrupt,t_bool_fromYN=function(t){if("Y"===(t=t.toUpperCase()))return!0;if("N"===t)return!1;throw t_err_value(t,0,"char")},t_node_promptYNSync=function(t){null==t&&(t="Are you sure? [y/n]: "),process.stdout.write(t);var e=t_node_run(function(){const t=process.stdin,e=process.stdout;t.setRawMode(!0),t.setEncoding("utf8"),t.on("data",t=>{var r=t.toUpperCase();"Y"===r||"N"===r?(e.write(t),process.exit(0)):""===t&&(e.write("^C"),process.exit(0))})},{mode:"-e",basic:!0,stdio:["inherit","pipe"]});if("^C"===e)throw process.stdout.write(e),t_node_sigint(),t_err_create("Prompt was cancelled via interrupt.");return console.log(e),t_bool_fromYN(e)},t_o_resolveKeys=function(t){return t_a_is(t)?t:t_s_is(t)?t.split("."):[t]},t_tree_setCustom=function(t,e,r,_,n,s){var i=r;return t_tree_dive(t,e,_,n,s,(t,e,r)=>r(t,e,t_v_resolve(i)))},t_env_setConfig=function(t,e){var r=e,_=globalThis.config;_||(_=globalThis.config={});var n,s=t_o_resolveKeys(t);return s.length>1?n=t_tree_setCustom(_,s,r):(n=t_v_resolve(r),_[s[0]]=n),n},t_node_addRequireDir=function(t,e){return t_env_setConfig("node.require.customDirs",r=>(r||(r=[]),!1!==e&&(t=t_path_ensureEndsWith(t,"node_modules")),r.includes(t)||r.push(t),r)),t},t_node_ensureRequireDir=t_node_addRequireDir,t_o_diveGet=t_tree_dive,t_env_getConfig=function(t){var e=globalThis.config;if(e){var r=t_o_resolveKeys(t);return r.length>1?t_o_diveGet(e,r):e[r[0]]}},t_env_resolveConfig=function(t,e,r){if(null!=t)return t;var _=t_env_getConfig(e);return null!=_?_:r},t_fs_ensureParent=function(t){var e=t_path_dir(t,!1);return t_fs_exists(e)||(e!==t&&t_fs_ensureParent(e),t_node_fs().mkdirSync(String(e))),t},t_fs_mkdir=function(t){return t_fs_ensureParent(t),t_node_fs().mkdirSync(String(t)),t},t_fs_ensureDir=function(t){return t_fs_exists(t)?t:t_fs_mkdir(t)},t_node_require=function(t,e){if(t_npm_isBuiltIn(t))return require(t);if(t_npm_isFile(t))return t_node_requireLocal(t);try{return require(t)}catch(t){}var r=__dirname,_=process.mainModule?.path;if(_!==r)try{return t_node__requireFromDir(_,t)}catch(t){}var n=process.cwd();if(n!==_&&n!==r)try{return t_node__requireFromDir(n,t)}catch(t){}var s=t_env_getConfig("node.require.customDirs");if(s)for(var i of s)try{return t_node__requireFromDir(i,t)}catch(t){}var a=t_env_resolveConfig(e?.autoInstall,"node.require.autoInstall"),o=t_env_resolveConfig(e?.promptInstall,"node.require.promptInstall",!0);if(a||o){var u=a||o;!0===u&&(u="./node_modules"),u=t_path_abs(u);var l=!1;if(a?(l=!0,console.log('Auto-installing "'+t+'" from npm to "'+u+'"...')):(l=t_node_promptYNSync('Npm package "'+t+'" is required. Install now? (Y/N) '))&&console.log('Installing "'+t+'" from npm to "'+u+'"...'),l){u=t_fs_ensureDir(u),t_npm_install(t,!1,{cwd:u});try{return t_node_ensureRequireDir(u),t_node__requireFromDir(u,t)}catch(t){console.error("Failed to load from auto-install dir: ",u)}}}throw t_err_create('Module not found: "'+t+'"',{checked:{moduleDir:r,scriptDir:_,cwd:n}})},t_js_fromAST=function(t,e){return t_node_require("astring").generate(t,e)},t_err_prepend=function(t,e){return t.stack=e+"\n"+t.stack,t},t_js_parse=function(t,e,r){r||(r={}),r.ecmaVersion||(r.ecmaVersion=2024),!1!==e&&(r.sourceType="module"),null==r.allowAwaitOutsideFunction&&(r.allowAwaitOutsideFunction=!0),null==r.allowReturnOutsideFunction&&(r.allowReturnOutsideFunction=!0);var _=t_node_require("acorn");try{return _.parse(t,r)}catch(e){throw t_err_prepend(e,"Acorn parsing error: "+t)}},t_js_removeComments=function(t,e,r){return t_js_fromAST(t_js_parse(t,e,r))},t_re_quote=/(['"])(.*?)\1/,t_re_quotes=t_re_global(t_re_quote),t_s_removeQuotes=function(t){return t.replace(t_re_quotes,"")},t_js_removeQuotes=t_s_removeQuotes,t_tree_copy=function(t){return globalThis.structuredClone(t)},t_o_deepCopy=t_tree_copy,t_f_cache=t_f_memoize,t_re_newline=/\r?\n/,t_v_isEmpty=function(t){return null==t||void 0!==t.length&&0===t.length},t_a_removeEmpty=function(t,e){return t_a_removeByFilter(t,t_v_isEmpty)},t_a_removeIndex=function(t,e){return t.splice(e,1),t},t_a_apply=function(t,e,r,_){[r,_]=t_a_resolveIndices(t,r,_);for(var n=r;n<_;n++){var s=e(t[n],n,t);void 0!==s&&(t[n]=s)}return t},t_a_mapToObj=function(t,e,r){for(var _={},n=t.length,s=0;s<n;s++){var i=e(t[s],s,t);if(i){var[a,o]=i;r?(_[a]||(_[a]=[]),_[a].push(o)):_[a]=o}}return _},t_a_slice=function(t,e,r,_){return[e,r]=t_a_resolveIndices(t,e,r,_),t.slice(e,r)},t_s_repeat=function(t,e){return t_a_create(e,t).join("")},t_re_text=function(t){return t?t[0]:null},t_s__splitByMatch=function(t,e){var r=null==e?-1:e.index;if(-1===r)return[t];var _=t_s_splitAtIndex(t,r);return _[1]=_[1].slice(e[0].length),_},t_s__matchWithIndices=function(t,e,r,_,n){return t_s_withIndices(t,e,r,_,(e,r)=>null===e?null:(e.input=t,void 0!==r&&(e.index+=r),e),n)},t_a_pushThroughMulti=function(t,e){return t.splice(t.length,0,...e),e},t_a_addMulti=function(t,e){return t_a_pushThroughMulti(t,e),t},t_a_pushMulti=t_a_addMulti,t_re_RegexResult=class extends Array{constructor(t,e,r,_,n){if(-1===e)throw t_err_create("RegexResult index cannot be -1. For empty result, use bare null.");if(null==t)throw t_err_create("RegexResult matchString cannot be null. For empty result, use bare null.");super(),this[0]=t,_&&t_a_pushMulti(this,_),this.index=e,this.input=r,n&&(this.groups=n)}fromParts(t){var e=t;return new t_re_RegexResult(e.match,e.index,e.input,e.captures,e.groups)}},t_re_createResult=function(t,e,r,_,n){return new t_re_RegexResult(t,e,r,_,n)},t_re_safeCreateResult=function(t,e,r,_,n){return-1===e||null==t?null:t_re_createResult(t,e,r,_,n)},t_s_match=function(t,e,r,_,n){return t_s__matchWithIndices(t,t=>{if(t_s_is(e)){var r=t.indexOf(e);return t_re_safeCreateResult(e,r,t)}return t_re_match(e,t)},r,_,n)},t_s_splitFirst=function(t,e,r,_,n){return t_s__splitByMatch(t,t_s_match(t,e,r,_,n))},t_n_tryParse=t_n_ensure,t_n_tryCoerce=function(t){return t_n_tryParse(t)??t},t_o_fromLines=function(t,e){null==e&&(e="=");var r={};return t.forEach(function(t){var[_,n]=t_s_splitFirst(t,e);null!=n&&(n=t_n_tryCoerce(n.trim())),r[_.trim()]=n}),r},t_o_safeDefault=t_o_safeEnsure,t_s_LinesArray=class extends Array{constructor(t){var e,r=t;null!=r&&(t_a_is(r)?e=r:t_s_is(r)&&(e=r.split(t_re_newline))),e?(super(e.length),Object.assign(this,e)):super(...arguments)}condense(t){return this.trim().removeEmpty(),t&&this.removeComments(t),this}trim(){return this.apply(t=>t.trim())}removeEmpty(){return t_a_removeEmpty(this)}removeComments(t){for(var e=0;e<this.length;e++){var r=this[e],_=r.indexOf(t);-1!==_&&(""===(r=r.slice(0,_)).trim()?(t_a_removeIndex(this,e),e--):this[e]=r)}return this}removeFirst(){return this.shift(),this}removeLast(){return this.pop(),this}apply(t){return t_a_apply(this,t)}join(){return super.join("\n")}toObj(t){return t_o_fromLines(this,t)}mapToObj(t,e){return t_a_mapToObj(this,t,e)}between(t,e,r){return r=t_o_safeDefault(r,"inclusiveEnd",!0),t_a_slice(this,t,e,r)}normalize(){if(this.length>0&&(""===this[0].trim()&&this.shift(),this.length>0&&(""===t_a_last(this).trim()&&this.pop(),this.length>0))){var t=this.find(t=>""!==t.trim()),e=t_re_text(t_re_match(/^\s*/,t));if(e){var r=e.length;this.apply(t=>{if(t.startsWith(e))return t.slice(r)})}}return this}deindent(t,e,r){throw t_err_nyi()}indent(t,e){var r=t_s_repeat(e??"\t",t??1);return this.apply(t=>r+t)}static is(t){return t_v_constructorMatches(t,this)}static fromChunks(t){return t.map(t=>t_s_removeTrailing(t,t_re_newline)).flatMap(t=>t_s_splitLines(t,!1))}},t_s_lines=function(t,e){var r=new t_s_LinesArray(t);return e&&r.condense(),r},t_s_splitLines=function(t,e,r){var _=t.split(t_re_newline);return e?t_s_lines(_,r):_},t_fs_loadLines=function(t,e){return t_s_splitLines(t_fs_loadText(t),!0,e)},t_re_test=function(t,e){return t_re_ensureLocal(t).test(e)},t_s_contains=function(t,e){return t_re_is(e)?t_re_test(e,t):t.includes(e)},t_s__createParamsObj=function(t,e,r,_){null==t&&(t=""),null==e&&(e="");var n={},s=(r,_)=>n[t+r+e]=_;return _&&t_o_each(_,s),r&&t_o_each(r,s),n},t_s__replaceByObj=function(t,e){return t_o_each(e,(e,r)=>t=t_s_replaceAll(t,e,r)),t},t_s_replaceParams=function(t,e,r,_){var n,s,i=_?.paramIdentifier??"$";if(i)if(t_s_is(i)){if(!t_s_contains(t,i))return t;n=i}else{if(!t_a_is(i))throw t_err_type(i,1,"paramIdentifier");if([n,s]=i,!t_s_contains(t,n)&&!t_s_contains(t,s))return t}var a=t_s__createParamsObj(n,s,e,r);return t_s__replaceByObj(t,a)},t_path_string=function(t){return t_s_is(t)?t:String(t)},t_path_windir=globalThis.process?.env.windir,t_path_getUserDir=function(t){if(t)throw t_err_nyi();return t_node_os().homedir()+t_path_sep},t_path_getDesktop=function(t){return t_path_getUserDir(t)+"Desktop/"},t_path__defaultParams={PROGRAMFILES:globalThis.process?.env.ProgramFiles,WINDIR:t_path_windir,SYSTEM32:t_path_windir&&t_path_windir+"System32",TEMP:t_path__getDefaultTempDir(),DESKTOP:t_path_getDesktop()},t_path_resolveVars=function(t,e){return t_s_replaceParams(t_path_string(t),e,t_path__defaultParams)},t_titan__resolveSourceMapPath=function(t,e){return t?t_path_resolveVars(t,{TITAN:t_titan_locate()}):t_titan_getCompiledDir(e)+"SourceMap.txt"},t_s_before=function(t,e,r,_,n){var s=t_s_index(t,e,r,_,n);return-1===s?null:t.slice(r,s)},t_s_isCapitalized=function(t){var e=t[0];return e===e.toUpperCase()},t_a_filterSplit=function(t,e){var r=[],_=[];return t.forEach((n,s)=>(e(n,s,t)?r:_).push(n)),[r,_]},t_titan_loadGlobalsMap=t_f_cache(function(t){var e=t_fs_loadLines(t_titan__resolveSourceMapPath(t),!0),r={};return e.forEach(t=>{var e=t_s_before(t,"=").split(",").map(t=>t.trim()),[_,n]=t_a_filterSplit(e,t=>!t_s_isCapitalized(t)),s=_[0];if(!s)throw t_err_create('No shortName in SourceMap line: "'+t+'"');n.forEach(t=>{r[t]=s})}),r},0),t_titan__getGlobalsRegex=t_f_one(function(t){var e=Object.keys(t);return t_re_create("\\b("+e.join("|")+")\\.(\\w+)","g")}),t_titan_depsRegex=/\bt\.(\w+)\.(\w+)/g,t_titan__getDepsBasic=function(t,e){e||(e={});var r={},_=r.t={};if(e.enableGlobals){var n;n=e.additionalGlobals?t_o_deepCopy(e.additionalGlobals):{},r.globals=n;var s=t_titan_loadGlobalsMap(),i=t_titan__getGlobalsRegex(s),a=t_re_matchAll(i,t).filter(e=>{var r=e[1],_=e[2],n=t[e.index-1];if("."===n||"_"===n)return!1;var s=globalThis[r];return!s||void 0===s[_]});for(var[o,u,l]of a)n[u]||(n[u]={}),n[u][l]=!0;var c=a.map(([t,e,r])=>{var _=s[e];if(!_)throw t_err_create("No short name found for global: "+e);return"t."+_+"."+r+";"}).join(" ");t+="\n"+c}for(var[o,f,l]of a=t.matchAll(t_titan_depsRegex))_[f]||(_[f]={}),_[f][l]=!0;return r},t_titan_getDepsFromJS=function(t,e){return t=t_js_removeComments(t),t=t_js_removeQuotes(t),t_titan__getDepsBasic(t,e)},t_titan_getDepsFromHTML=function(t,e){return t_titan__getDepsBasic(t,e)},t_titan_getShallowDeps=function(t,e,r){if(e){if("js"===(e=e.toLowerCase()))return t_titan_getDepsFromJS(t,r);if("html"===e)return t_titan_getDepsFromHTML(t,r)}return t_titan__getDepsBasic(t,r)},t_o_has=function(t,e){return e in t},t_o_hasKey=t_o_has,t_tree_isSubsetOf=function(t,e){for(var r of(t_v_req(e,1),Object.keys(t))){if(!t_o_hasKey(e,r))return!1;var _=t[r];if(_&&_.constructor===Object&&!t_tree_isSubsetOf(_,e[r]))return!1}return!0},t_titan_jsonHasNewDeps=function(t,e){if(!t_tree_isSubsetOf(e.t,t))return!0;if(e.globals){var r=t._meta?.globals;if(!r)return!0;if(!t_tree_isSubsetOf(e.globals,r))return!0}return!1},t_titan_needsToPack=function(t,e,r,_){var n,s,i,a;_||(_={}),t&&(t=t_path_abs(t)),n=_.packagePath?t_path_abs(_.packagePath):t_titan_getPackagePath(t,!1,!0,_);var o,u=t_fs_exists(n);u?(s=t_titan_hasNewCompile(n))?i="New compile":(null==e&&(e=t_fs_loadText(t)),a=t_titan_getShallowDeps(e,"js",_),(o=t_titan_jsonHasNewDeps(r,a))&&(i="New deps")):i="No package";var l={needsPack:!!i,scriptPath:t,packagePath:n};return i&&(l.reasonText=i),null!=u&&(l.exists=u),null!=s&&(l.newCompile=s),null!=o&&(l.newDeps=o),e&&(l.sourceText=e),a&&(l.shallowDeps=a),l},t_path_isDir=function(t){return t_s_endsWith(t,t_re_slash)},t_re_lastIndex=function(t,e){var r=t_re_matchLast(t,e);return r?r.index:-1},t_path_dirPart=function(t){var e=t_re_lastIndex(t_re_slash,t);return-1===e?null:t.slice(0,e+1)},t_path_ignoreDir=function(t,e,r){if(t_path_isDir(t))return r?[t,null]:t;var _,n,s=t_path_dirPart(t),i=e(t_path_file(t),s,t);return r?[_,n]=i:_=i,null!=_&&(t=s?s+_:_),r?[t,n]:t},t_s_matchLast=function(t,e,r,_,n){return t_s__matchWithIndices(t,t=>{if(t_re_is(e))return t_re_matchLast(e,t);if(t_s_is(e)){var r=t.lastIndexOf(e);return-1!==r?new t_re_RegexResult(e,r):null}throw t_err_type(e,1)},r,_,n)},t_s_splitLast=function(t,e,r,_,n){return t_s__splitByMatch(t,t_s_matchLast(t,e,r,_,n))},t_path_splitExt=function(t){return t_path_ignoreDir(t,t=>t_s_splitLast(t,"."),!0)},t_path_ext=function(t,e){var r=t_path_splitExt(t)[1];return r?!1!==e?r.toLowerCase():r:null},t_titan_sourceMap={},t_titan_loadSourceMap=t_f_cache(function(t,e){t=t_titan__resolveSourceMapPath(t,e);var r=t_path_dir(t),_=t_fs_loadLines(t,"//"),n=t_titan_sourceMap;for(var s of _){var i=s.indexOf("="),a=s.slice(0,i).trim();a=a.split(",").map(t=>t.trim()).filter(t=>!t_s_isCapitalized(t));var o=s.slice(i+1).trim(),u=t_path_join(r,o).replaceAll("\\","/");for(var l of a)n[l]=u}return n}),t_titan_getDeps=function(t,e){var r=e?.fileType;if(r){if("js"===(r=r.toLowerCase()))return t_titan_getDepsFromJS(t,e);if("html"===r)return t_titan_getDepsFromHTML(t,e)}return t_titan__getDepsBasic(t,e)},t_gen_filter=function*(t,e){var r=0;for(var _ of t)e(_,r++,t)&&(yield _)},t_a_copy=function(t){return t.slice()},t_args_insert=function(t,e,r){for(var _=t.length-1;_>=e;_--)t[_+1]=t[_];return t[e]=r,t.length++,t},t_args_append=function(t,e){return t_args_insert(t,t.length,e)},t_args_push=t_args_append,t_f_recurse=function(t,e){return t.call(this,...e,function e(){return t_a_last(arguments)!==e&&t_args_push(arguments,e),t.apply(this,arguments)})},t_tree_iterator=function(t){t||(t={});var e=t.getKeys;e||(e=function(t){return Object.keys(t)});var r=t.recurseIf;if(!r){var _=this.constructor;r=t=>t_v_constructorMatches(t,_)||t_o_isPure(t)||t_a_is(t)}var n=t.leavesOnly??t.leafsOnly??!1,s=this;return t_f_recurse(function*(t,_,i,a){var o=e(t,_,i);if(o)for(var u=o.length,l=0;l<u;l++){var c=o[l],f=t[c],p=t_a_copy(_);p.push(c);var d=null,m={value:f,key:c,object:t,path:p,level:i,isLeaf:d,root:s},h=r(f,m);m.isLeaf=d=!h,n&&!d||(yield m),h&&(yield*a(f,p,i+1,a))}},[this,[],0])},t_tree_iterate=function(t,e){return t_tree_iterator.call(t,e)},t_o_fromKeys=function(t,e){1===arguments.length&&(e=!0);var r={};for(var _ of t)r[_]=e;return r},t_js_eachNode=function(t,e,r,_){var n=t_js_parse(t,e,_);t_node_require("acorn-walk").full(n,r)},t_js_getNodes=function(t,e,r,_){var n;if(t_s_is(r))n=t=>t.type===r;else if(t_a_is(r)){var s=t_o_fromKeys(r);n=t=>s[t.type]}else n=r;var i=[];return t_js_eachNode(t,e,function(t){n.apply(this,arguments)&&i.push(t)},_),i},t_js_fromASTNode=t_js_fromAST,t_js_parseDeclaration=function(t){var e,r,_,n=t,s=t_s_is(n)?t_js_parse(n).body[0]:n,i=s.type;if("VariableDeclaration"===i){e="variable";var a=s.declarations[0];r=a.id.name,_=a.init?a.init.raw??t_js_fromAST(a.init):"undefined"}else"FunctionDeclaration"===i?e="function":"ClassDeclaration"===i&&(e="class"),r=s.id.name;var o={type:e,name:r};return _&&(o.value=_),o.text=t_js_fromASTNode(s),o.node=s,o},t_js_getExports=function(t){return t_js_getNodes(t,!0,["ExportNamedDeclaration","ExportDefaultDeclaration"]).map(function(t){var e=t.declaration;if(e){var r=t_js_parseDeclaration(e);return r.node=t,r}return{node:t}})},t_titan__getAllDeps=function(t,e){e||(e={});var r=e.enableGlobals,_=t_titan_loadSourceMap(e.sourceMap,e.stability);console.log("SOURCEMAP",_);var n={},s=[];return function t(e,i){var a=t_gen_filter(t_tree_iterate(e),t=>t.isLeaf);for(var o of a){var[u,l]=o.path,c=n[u];if(c||(c=n[u]={}),null==c[l]){var f=_[u];if(f){var p=t_path_fws(f)+l+".js";if(!t_fs_exists(p)){var d='Titan compiled value "t.'+u+"."+l+'" does not exist';throw i&&(d+=' (called by "'+i+'")'),t_err_create(d+=".")}var m=t_fs_load(p),h=t_js_getExports(m)[0];c[l]=h;var v="t."+u+"."+l;t(t_titan_getDeps(m,{fileType:"js",enableGlobals:r}).t,v),s.push([u,l])}else console.log('Skipping unmapped module "'+u+'"'),c[l]=!1}}}(t.t),{t:n,globals:t.globals,order:s}},t_titan_packTextToJSON=function(t,e){e||(e={});var r=e.deps??t_titan_getShallowDeps(t,e.fileType,e),{t:_,globals:n,order:s}=t_titan__getAllDeps(r,e),i={};if(i.t=r.t,n&&e.enableGlobals){i.globals=n;var a=t_titan_loadGlobalsMap(),o=Object.keys(n),u=t_a_mapToObj(o,t=>[a[t],t],!0);i.shortNamesToGlobals=u}return i.itemsInOrder=s.map(([t,e])=>{var r=_[t][e];return[t,e,"variable"===r.type?r.value:"("+r.text+")"]}),i},t_tree_join=function(t,e,r){return null==r&&(r=!0),t_f_recurse(function(t,e,_){t_o_each(t,function(t,n){if(t_o_hasKey(e,t)){var s=e[t];r?t_o_is(s)&&t_o_is(n)?_(n,s):e[t]=n:t_o_is(s)&&_(n,s)}else e[t]=n})},[t,e]),e},t_tree_merge=t_tree_join,t_o_fromArray=function(t){return Object.assign({},t)},t_a_toObj=function(t,e){if(e){var r={};return t.forEach((t,_,n)=>r[e(t,_,n)]=!0),r}return t_o_fromArray(t)},t_titan_addNewItemsToJSON=function(t,e){t_tree_merge(e.t,t.t,!1);var r=e.globals;if(r){var _=t.globals;_?t_tree_merge(r,_,!1):t.globals=r,t.shortNamesToGlobals=e.shortNamesToGlobals}var n=t_a_toObj(t.itemsInOrder,t=>t[0]+"."+t[1]);return e.itemsInOrder.forEach(e=>{n[e[0]+"."+e[1]]||t.itemsInOrder.push(e)}),t},t_bin_isNodeBuffer=function(t){return t instanceof Buffer},t_ab_isTA=function(t){return ArrayBuffer.isView(t)},t_bin_isTA=t_ab_isTA,t_bin_isByteSafe=function(t){return t_bin_isNodeBuffer(t)||t_bin_isTA(t)||t_s_is(t)},t_ab_is=function(t){return t.constructor===ArrayBuffer},t_bin_ensureByteSafe=function(t){return t_bin_isByteSafe(t)?t:t_ab_is(t)?Buffer.from(t):t_s_from(t)},t_fs_formatRaw=function(t){return t_n_is(t)?String(t):t_bin_ensureByteSafe(t)},t_fs_write=function(t,e){return t_fs_ensureParent(t),t_node_fs().writeFileSync(String(t),t_fs_formatRaw(e)),t},t_json_stringify=function(t,e){var r;return e||(e={}),r=e.condensed?0:null!=e.whitespace?e.whitespace:"\t",JSON.stringify(t,e.replacer,r)},t_fs_writeJSON=function(t,e,r){return t_fs_write(t,t_json_stringify(e,r))},t_titan_packTextToJSONFile=function(t,e,r){r||(r={}),r.deps||r.fileType||!e||(r.fileType=t_path_ext(e));var _=t_titan_packTextToJSON(t,r),n=r.packagePath||t_titan_getPackagePath(e,r.repl,!0,r);if(r.dynamic&&(r.packageExists??t_fs_exists(n))&&!(r.newCompile??t_titan_hasNewCompile(n))){var s=t_fs_loadJSON(n);_=t_titan_addNewItemsToJSON(s,_)}return t_fs_writeJSON(n,_),n},t_titan_autoPackAndLoadJSON=function(t,e,r,_){var n=t_titan_needsToPack(t,e,r,_);return n.needsPack&&(_.onPack&&_.onPack(n.reasonText),e=n.sourceText??t_fs_loadText(t),_.packagePath=n.packagePath,_.packageExists=n.exists,_.newCompile=n.newCompile,_.deps=n.shallowDeps,t_titan_packTextToJSONFile(e,t,_),t_titan__loadDynamicDeps(n.packagePath,r,_)),r},newItems={node:{getScriptPath:t_node_getScriptPath,positionalArgs:t_node_positionalArgs,args:t_node_args,fs:t_node_fs,_builtInModule:t_node__builtInModule,requireBuiltIn:t_node_requireBuiltIn,os:t_node_os,path:t_node_path,is:t_node_is,display:t_node_display,util:t_node_util,getScriptDir:t_node_getScriptDir,require:t_node_require,_basicRequire:t_node__basicRequire,child_process:t_node_child_process,requireLocal:t_node_requireLocal,_requireFromDir:t_node__requireFromDir,_requireDirCache:t_node__requireDirCache,_createRequire:t_node__createRequire,module:t_node_module,promptYNSync:t_node_promptYNSync,run:t_node_run,sigint:t_node_sigint,interrupt:t_node_interrupt,ensureRequireDir:t_node_ensureRequireDir,addRequireDir:t_node_addRequireDir},cli:{positionalArgs:t_cli_positionalArgs,resolveArgs:t_cli_resolveArgs,splitArgs:t_cli_splitArgs},env:{args:t_env_args,setConfig:t_env_setConfig,getConfig:t_env_getConfig,resolveConfig:t_env_resolveConfig},f:{one:t_f_one,is:t_f_is,memoize:t_f_memoize,MemoizedFunction:t_f_MemoizedFunction,createClass:t_f_createClass,ensureConstructor:t_f_ensureConstructor,createConstructor:t_f_createConstructor,isArrowFn:t_f_isArrowFn,isArrow:t_f_isArrow,wrap:t_f_wrap,retThis:t_f_retThis,setName:t_f_setName,not:t_f_not,body:t_f_body,isArrowString:t_f_isArrowString,_getArrowFnBody:t_f__getArrowFnBody,_getNormalFnBody:t_f__getNormalFnBody,cache:t_f_cache,recurse:t_f_recurse},s:{is:t_s_is,isAny:t_s_isAny,isPrimitive:t_s_isPrimitive,isObject:t_s_isObject,decapitalize:t_s_decapitalize,endsWith:t_s_endsWith,chars:t_s_chars,resolveIndex:t_s_resolveIndex,toLiteral:t_s_toLiteral,quote:t_s_quote,escape:t_s_escape,replaceAll:t_s_replaceAll,apply:t_s_apply,withIndices:t_s_withIndices,from:t_s_from,removeTrailing:t_s_removeTrailing,removeFromEnd:t_s_removeFromEnd,_removeStringFromEnd:t_s__removeStringFromEnd,_removeRegexFromEnd:t_s__removeRegexFromEnd,splitAtIndex:t_s_splitAtIndex,ensureStartsWith:t_s_ensureStartsWith,replace:t_s_replace,removeLineBreaks:t_s_removeLineBreaks,removeMulti:t_s_removeMulti,removeAll:t_s_removeAll,resolve:t_s_resolve,ensure:t_s_ensure,after:t_s_after,index:t_s_index,_indexWithIndices:t_s__indexWithIndices,indexOfFn:t_s_indexOfFn,removeLeading:t_s_removeLeading,removeFromStart:t_s_removeFromStart,_removeStringFromStart:t_s__removeStringFromStart,_removeRegexFromStart:t_s__removeRegexFromStart,remove:t_s_remove,removeQuotes:t_s_removeQuotes,splitLines:t_s_splitLines,lines:t_s_lines,LinesArray:t_s_LinesArray,repeat:t_s_repeat,splitFirst:t_s_splitFirst,_splitByMatch:t_s__splitByMatch,match:t_s_match,_matchWithIndices:t_s__matchWithIndices,replaceParams:t_s_replaceParams,contains:t_s_contains,_createParamsObj:t_s__createParamsObj,_replaceByObj:t_s__replaceByObj,before:t_s_before,isCapitalized:t_s_isCapitalized,splitLast:t_s_splitLast,matchLast:t_s_matchLast},fs:{loadText:t_fs_loadText,load:t_fs_load,getID:t_fs_getID,stat:t_fs_stat,deepStat:t_fs_deepStat,shallowStat:t_fs_shallowStat,exists:t_fs_exists,getModifiedDate:t_fs_getModifiedDate,loadJSON:t_fs_loadJSON,ensureDir:t_fs_ensureDir,mkdir:t_fs_mkdir,ensureParent:t_fs_ensureParent,loadLines:t_fs_loadLines,writeJSON:t_fs_writeJSON,write:t_fs_write,formatRaw:t_fs_formatRaw},titan:{getTempDir:t_titan_getTempDir,getPackagePath:t_titan_getPackagePath,getPackageName:t_titan_getPackageName,hasNewCompile:t_titan_hasNewCompile,getLastCompileTime:t_titan_getLastCompileTime,getCompiledDir:t_titan_getCompiledDir,locate:t_titan_locate,_loadDynamicDeps:t_titan__loadDynamicDeps,_trackGlobals:t_titan__trackGlobals,autoPackAndLoadJSON:t_titan_autoPackAndLoadJSON,needsToPack:t_titan_needsToPack,getShallowDeps:t_titan_getShallowDeps,getDepsFromJS:t_titan_getDepsFromJS,_getDepsBasic:t_titan__getDepsBasic,loadGlobalsMap:t_titan_loadGlobalsMap,_resolveSourceMapPath:t_titan__resolveSourceMapPath,_getGlobalsRegex:t_titan__getGlobalsRegex,depsRegex:t_titan_depsRegex,getDepsFromHTML:t_titan_getDepsFromHTML,jsonHasNewDeps:t_titan_jsonHasNewDeps,packTextToJSONFile:t_titan_packTextToJSONFile,packTextToJSON:t_titan_packTextToJSON,_getAllDeps:t_titan__getAllDeps,loadSourceMap:t_titan_loadSourceMap,sourceMap:t_titan_sourceMap,getDeps:t_titan_getDeps,addNewItemsToJSON:t_titan_addNewItemsToJSON},path:{getTempDir:t_path_getTempDir,_getDefaultTempDir:t_path__getDefaultTempDir,sep:t_path_sep,baseName:t_path_baseName,_removeExtsFromFile:t_path__removeExtsFromFile,file:t_path_file,dir:t_path_dir,ensureTrailingSlash:t_path_ensureTrailingSlash,abs:t_path_abs,ensureEndsWith:t_path_ensureEndsWith,join:t_path_join,fws:t_path_fws,resolveVars:t_path_resolveVars,string:t_path_string,_defaultParams:t_path__defaultParams,windir:t_path_windir,getDesktop:t_path_getDesktop,getUserDir:t_path_getUserDir,ext:t_path_ext,splitExt:t_path_splitExt,ignoreDir:t_path_ignoreDir,isDir:t_path_isDir,dirPart:t_path_dirPart},err:{nyi:t_err_nyi,NYIError:t_err_NYIError,Error:t_err_Error,Enhanced:t_err_Enhanced,defaultFromFn:t_err_defaultFromFn,type:t_err_type,TypeError:t_err_TypeError,create:t_err_create,req:t_err_req,value:t_err_value,ValueError:t_err_ValueError,prepend:t_err_prepend},o:{safeEnsure:t_o_safeEnsure,ensure:t_o_ensure,constructorMatches:t_o_constructorMatches,is:t_o_is,isAny:t_o_isAny,setHidden:t_o_setHidden,addNonEnumerable:t_o_addNonEnumerable,defineProperty:t_o_defineProperty,weakAssign:t_o_weakAssign,merge:t_o_merge,hideKey:t_o_hideKey,makeNonEnumerable:t_o_makeNonEnumerable,ensureCustom:t_o_ensureCustom,get:t_o_get,set:t_o_set,createEmpty:t_o_createEmpty,remove:t_o_remove,display:t_o_display,toLiteral:t_o_toLiteral,isPure:t_o_isPure,reduce:t_o_reduce,each:t_o_each,keys:t_o_keys,allKeys:t_o_allKeys,setLazy:t_o_setLazy,setGetterAndSetter:t_o_setGetterAndSetter,addGetterAndSetter:t_o_addGetterAndSetter,replaceGetterAndSetter:t_o_replaceGetterAndSetter,safeSetDefaults:t_o_safeSetDefaults,safeEnsureMulti:t_o_safeEnsureMulti,ensureMulti:t_o_ensureMulti,Cache:t_o_Cache,setDefaults:t_o_setDefaults,resolveKeys:t_o_resolveKeys,diveGet:t_o_diveGet,deepCopy:t_o_deepCopy,fromLines:t_o_fromLines,safeDefault:t_o_safeDefault,hasKey:t_o_hasKey,has:t_o_has,fromKeys:t_o_fromKeys,fromArray:t_o_fromArray},re:{is:t_re_is,matchEnd:t_re_matchEnd,matchLast:t_re_matchLast,matchAll:t_re_matchAll,setStartIndex:t_re_setStartIndex,copy:t_re_copy,updateFlagString:t_re_updateFlagString,parseFlagString:t_re_parseFlagString,createFlagString:t_re_createFlagString,ensureGlobal:t_re_ensureGlobal,global:t_re_global,addFlag:t_re_addFlag,createEscaped:t_re_createEscaped,create:t_re_create,resolveFlags:t_re_resolveFlags,escape:t_re_escape,slash:t_re_slash,matchStart:t_re_matchStart,match:t_re_match,ensureLocal:t_re_ensureLocal,local:t_re_local,removeFlag:t_re_removeFlag,quotes:t_re_quotes,quote:t_re_quote,newline:t_re_newline,text:t_re_text,safeCreateResult:t_re_safeCreateResult,createResult:t_re_createResult,RegexResult:t_re_RegexResult,test:t_re_test,lastIndex:t_re_lastIndex},v:{constructorMatches:t_v_constructorMatches,isPrimitive:t_v_isPrimitive,resolve:t_v_resolve,type:t_v_type,display:t_v_display,toLiteral:t_v_toLiteral,nullIfNaN:t_v_nullIfNaN,req:t_v_req,isEmpty:t_v_isEmpty},a:{last:t_a_last,resolveIndex:t_a_resolveIndex,is:t_a_is,ensure:t_a_ensure,pick:t_a_pick,create:t_a_create,fill:t_a_fill,resolveIndices:t_a_resolveIndices,push:t_a_push,add:t_a_add,splitLast:t_a_splitLast,splitTail:t_a_splitTail,wrapIndices:t_a_wrapIndices,wrapIndex:t_a_wrapIndex,toLiteral:t_a_toLiteral,display:t_a_display,assert:t_a_assert,removeNullish:t_a_removeNullish,removeByFilter:t_a_removeByFilter,replaceContents:t_a_replaceContents,removeEmpty:t_a_removeEmpty,removeIndex:t_a_removeIndex,apply:t_a_apply,mapToObj:t_a_mapToObj,slice:t_a_slice,pushMulti:t_a_pushMulti,addMulti:t_a_addMulti,pushThroughMulti:t_a_pushThroughMulti,filterSplit:t_a_filterSplit,copy:t_a_copy,toObj:t_a_toObj},class:{create:t_class_create,setName:t_class_setName,addStatics:t_class_addStatics,setDisplay:t_class_setDisplay},p:{asyncJoint:t_p_asyncJoint,is:t_p_is},sym:{display:t_sym_display,value:t_sym_value},macro:{config:t_macro_config},map:{Cache:t_map_Cache,ensure:t_map_ensure,get:t_map_get,set:t_map_set,MultiCache:t_map_MultiCache,diveEnsure:t_map_diveEnsure,createEmpty:t_map_createEmpty,diveDelete:t_map_diveDelete,remove:t_map_remove},args:{ensureArray:t_args_ensureArray,push:t_args_push,append:t_args_append,insert:t_args_insert},tree:{ensure:t_tree_ensure,dive:t_tree_dive,remove:t_tree_remove,setCustom:t_tree_setCustom,copy:t_tree_copy,isSubsetOf:t_tree_isSubsetOf,iterate:t_tree_iterate,iterator:t_tree_iterator,merge:t_tree_merge,join:t_tree_join},d:{from:t_d_from,create:t_d_create,resolve:t_d_resolve,now:t_d_now,ensure:t_d_ensure,copy:t_d_copy,fromYear:t_d_fromYear,_resolveNative:t_d__resolveNative,isBefore:t_d_isBefore},n:{fromString:t_n_fromString,ensure:t_n_ensure,is:t_n_is,tryCoerce:t_n_tryCoerce,tryParse:t_n_tryParse},js:{removeComments:t_js_removeComments,fromAST:t_js_fromAST,enhance:t_js_enhance,ensureReturn:t_js_ensureReturn,splitLastExpression:t_js_splitLastExpression,enableAwait:t_js_enableAwait,_nodeEnableAwait:t_js__nodeEnableAwait,useTitan:t_js_useTitan,inline:t_js_inline,parse:t_js_parse,removeQuotes:t_js_removeQuotes,getExports:t_js_getExports,getNodes:t_js_getNodes,eachNode:t_js_eachNode,parseDeclaration:t_js_parseDeclaration,fromASTNode:t_js_fromASTNode},npm:{isBuiltIn:t_npm_isBuiltIn,isFile:t_npm_isFile,install:t_npm_install,_runCommand:t_npm__runCommand},os:{run:t_os_run,_resolveStdio:t_os__resolveStdio},opt:{resolve:t_opt_resolve},win:{is:t_win_is},shell:{_handleError:t_shell__handleError},proc:{interrupt:t_proc_interrupt,signal:t_proc_signal},bool:{fromYN:t_bool_fromYN},gen:{filter:t_gen_filter},bin:{ensureByteSafe:t_bin_ensureByteSafe,isByteSafe:t_bin_isByteSafe,isNodeBuffer:t_bin_isNodeBuffer,isTA:t_bin_isTA},ab:{isTA:t_ab_isTA,is:t_ab_is},json:{stringify:t_json_stringify}};globalThis.t?Object.keys(newItems).forEach(function(e){if(t[e]){var r=newItems[e];Object.keys(r).forEach(function(_){t[e][_]=r[_]})}else t[e]=newItems[e]}):globalThis.t=Object.assign({},newItems),globalThis.exports&&(exports.default=globalThis.t);