@n8n/expression-runtime 0.10.0 → 0.10.1

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.
@@ -31,7 +31,7 @@ dt.diffToNow(['months', 'days'])`,evaluated:"{ months: 12, days: 5.9 }"}],sectio
31
31
  dt.isEmpty()`,evaluated:"false"},{example:`dt = null
32
32
  dt.isEmpty()`,evaluated:"true"}],returnType:"boolean",docURL:"https://docs.n8n.io/code/builtin/data-transformation-functions/arrays/#array-isEmpty"};Ul.doc={name:"isNotEmpty",description:"Returns <code>true</code> for all DateTimes. Returns <code>false</code> for <code>null</code>.",examples:[{example:`dt = '2023-03-30T18:49:07.234'.toDateTime()
33
33
  dt.isNotEmpty()`,evaluated:"true"},{example:`dt = null
34
- dt.isNotEmpty()`,evaluated:"false"}],returnType:"boolean",docURL:"https://docs.n8n.io/code/builtin/data-transformation-functions/arrays/#array-isNotEmpty"};var ri={typeName:"Date",functions:{beginningOf:Fl,endOfMonth:Bl,extract:Ql,isBetween:Gl,isDst:vl,isInLast:Al,isWeekend:Rl,minus:Pl,plus:Wl,format:El,toDateTime:Pa,diffTo:Oa,diffToNow:Ol,toInt:Kl,toFloat:qY,toBoolean:VY,isEmpty:Il,isNotEmpty:Ul}};function zl(n){return n==null||!n}function $Y(n){return!zl(n)}var eS=[Sa,ri,Na,fa,Aa,ka],nS={isEmpty:zl,isNotEmpty:$Y};function iS(n){if(typeof n!="string"||!n.length||!/\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}.\d{3}Z/.test(n))return!1;let e=new Date(n);return e instanceof Date&&!isNaN(e.valueOf())&&e.toISOString()===n}var aS=new Set(["__proto__","prototype","constructor","getPrototypeOf","mainModule","binding","_linkedBinding","_load","prepareStackTrace","__lookupGetter__","__lookupSetter__","__defineGetter__","__defineSetter__","caller","arguments","getBuiltinModule","dlopen","execve","loadEnvFile"]);function _l(n,e){let i=typeof e=="string"?e:String(e);if(aS.has(i))throw new k(`Cannot access "${i}" via expression extension due to security concerns`);let a;if(Array.isArray(n)?a=Sa.functions[e]:iS(n)&&e!=="toDate"&&e!=="toDateTime"?(n=new Date(n),a=ri.functions[e]):typeof n=="string"?a=Aa.functions[e]:typeof n=="number"?a=Na.functions[e]:n&&(j.isDateTime(n)||n instanceof Date)?a=ri.functions[e]:n!==null&&typeof n=="object"?a=fa.functions[e]:typeof n=="boolean"&&(a=ka.functions[e]),!a){let o=n;if(o&&e&&typeof o[e]=="function")return{type:"native",function:o[e]};a=nS[e]}if(a)return{type:"extended",function:a}}function gi(n,e,i){let a=_l(n,e);if(!a){Hl(n,e);let o=eS.filter(u=>e in u.functions);if(!o.length)throw new k(`Unknown expression function: ${e}`);if(o.length>1){let u=`"${o.pop().typeName}"`,s=`${o.map(t=>`"${t.typeName}"`).join(", ")}, and ${u}`;throw new k(`${e}() is only callable on types ${s}`)}else throw new k(`${e}() is only callable on type "${o[0].typeName}"`)}return a.type==="native"?a.function.apply(n,i):a.function(n,i)}function hi(n,e){let i=_l(n,e);if(i)return i.type==="native"?i.function.bind(n):(...a)=>i.function(n,a)}var ql=new Proxy(Object,{get(n,e){if(["defineProperty","defineProperties","setPrototypeOf","getOwnPropertyDescriptor","getOwnPropertyDescriptors","__defineGetter__","__defineSetter__","__lookupGetter__","__lookupSetter__"].includes(e))return;if(e==="getPrototypeOf")throw new Error("Object.getPrototypeOf is not allowed");if(e==="create")return o=>Object.create(o);let a=n[e];return typeof a=="function"?(...o)=>a.apply(n,o):a}}),Vl=new Set(["captureStackTrace","prepareStackTrace","stackTraceLimit","__defineGetter__","__defineSetter__","__lookupGetter__","__lookupSetter__"]),$l=new Proxy(Error,{get(n,e){if(Vl.has(e))return;let i=n[e];return typeof i=="function"?(...a)=>i.apply(n,a):i},set(n,e,i){return e==="prepareStackTrace"?!1:(n[e]=i,!0)},defineProperty(){return!1}});function Se(n){return new Proxy(n,{get(e,i){if(Vl.has(i))return;let a=e[i];return typeof a=="function"?(...o)=>a.apply(e,o):a},set(){return!1},defineProperty(){return!1}})}var Ye=class extends Error{constructor(e){super(e),this.name="ExpressionError"}},oS=new Set(["__proto__","prototype","constructor","__defineGetter__","__defineSetter__","__lookupGetter__","__lookupSetter__","toString","valueOf","toLocaleString","hasOwnProperty","isPrototypeOf","propertyIsEnumerable"]);function ed(n){if(typeof n=="string"&&oS.has(n))throw new Ye(`Cannot access "${n}" due to security concerns`);return n}var uS=new WeakMap;function Ka(n){return typeof n=="object"&&n!==null&&"__isObject"in n&&n.__isObject===!0}function tS(n){return typeof n=="object"&&n!==null&&"__isError"in n&&n.__isError===!0}function ye(n){if(tS(n))throw n}function ae(n=[],e,i){if(!i)throw new Error("createDeepLazyProxy requires callbacks parameter");let{getValueAtPath:a,getArrayElement:o,callFunctionAtPath:u}=i,s;function t(){if(e)return e;if(s)return s;let r=a.applySync(null,[n],{arguments:{copy:!0},result:{copy:!0}});return ye(r),Ka(r)?(s=r.__keys,s):[]}let g=new Proxy({},{ownKeys(){return t()},getOwnPropertyDescriptor(r,l){if(typeof l!="symbol"&&t().includes(l))return{configurable:!0,enumerable:!0,writable:!1}},get(r,l){if(typeof l=="symbol")return;if(l==="toString")return function(){return"[object Object]"};if(l==="valueOf")return function(){return r};if(l in r)return r[l];let h=[...n,l],d=a.applySync(null,[h],{arguments:{copy:!0},result:{copy:!0}});if(d==null)return r[l]=d,d;if(ye(d),d&&typeof d=="object"&&d.__isFunction)return r[l]=function(...y){let m=u.applySync(null,[h,...y],{arguments:{copy:!0},result:{copy:!0}});return ye(m),m},r[l];if(d&&typeof d=="object"&&d.__isArray){let y=new Proxy([],{has(m,w){if(typeof w=="symbol")return w in m;let p=Number(w);return!isNaN(p)&&p>=0&&p<d.__length?!0:w in m},get(m,w){if(typeof w=="symbol")return;if(w==="length")return d.__length;let p=Number(w);if(!isNaN(p)&&p>=0){if(!(w in m)){let S=o.applySync(null,[h,p],{arguments:{copy:!0},result:{copy:!0}});if(ye(S),S&&typeof S=="object"&&S.__isArray){let T=[...h,String(p)];m[w]=ae(T,void 0,i)}else if(Ka(S)){let T=[...h,String(p)];m[w]=ae(T,S.__keys,i)}else m[w]=S}return m[w]}return m[w]}});return r[l]=y,r[l]}return Ka(d)?(r[l]=ae(h,d.__keys,i),r[l]):(r[l]=d,d)},has(r,l){if(typeof l=="symbol")return!1;if(l in r)return!0;let h=[...n,l],d=a.applySync(null,[h],{arguments:{copy:!0},result:{copy:!0}});return ye(d),d!==void 0}});return uS.set(g,n),g}var nd=Math.min,id=Math.max,sS=(n,e)=>{let i=Math.abs(n-e)+1,a=new Array(i),o=n;for(let u=0;u<i;u++)n<e?a[u]=o++:a[u]=o--;return a},rS=(n,e)=>{if(n.length!==e.length)throw new k("keys and values not of equal length");return n.reduce((i,a,o)=>(i[a]=e[o],i),{})},ad=(...n)=>qn(n),od=n=>!n;function ud(n,e){if(arguments.length!==2)throw new k("expected two arguments (value, defaultValue) for this function");return n==null||n===""||typeof n=="object"&&(Array.isArray(n)&&!n.length||!Object.keys(n).length)?e:n}ud.doc={name:"ifEmpty",description:"Returns the default value if the value is empty. Empty values are undefined, null, empty strings, arrays without elements and objects without keys.",returnType:"any",args:[{name:"value",type:"any"},{name:"defaultValue",type:"any"}],docURL:"https://docs.n8n.io/code/builtin/convenience"};var td={min:nd,max:id,not:od,average:ad,numberList:sS,zip:rS,$min:nd,$max:id,$average:ad,$not:od,$ifEmpty:ud};var gS=Se(TypeError),hS=Se(SyntaxError),lS=Se(EvalError),dS=Se(RangeError),yS=Se(ReferenceError),cS=Se(URIError);function sd(n,e,i,a){if(a&&!$.isValidZone(a))throw new Error(`Invalid timezone: "${a}"`);D.defaultZone=a??"system";let o={},u={getValueAtPath:n,getArrayElement:e,callFunctionAtPath:i};Object.defineProperty(o,"__sanitize",{get:()=>ed,set:()=>{throw new Ye('Cannot override "__sanitize" due to security concerns')},enumerable:!1,configurable:!1}),o.$now=j.now(),o.$today=j.now().set({hour:0,minute:0,second:0,millisecond:0}),Object.assign(o,td),o.DateTime=globalThis.DateTime,o.Duration=globalThis.Duration,o.Interval=globalThis.Interval,o.extend=gi,o.extendOptional=hi,bS(o),o.$item=function(g){let r=String(g);return{$json:ae(["$item",r,"$json"],void 0,u),$binary:ae(["$item",r,"$binary"],void 0,u)}},o.$=function(g){return ae(["$",g],void 0,u)};let s=new Set;function t(g){if(s.has(g))return!1;let r;try{r=n.applySync(null,[[g]],{arguments:{copy:!0},result:{copy:!0}})}catch{return!1}return s.add(g),r===void 0?!1:(ye(r),r&&typeof r=="object"&&r.__isFunction?(o[g]=function(...l){let h=i.applySync(null,[[g],...l],{arguments:{copy:!0},result:{copy:!0}});return ye(h),h},!0):r&&typeof r=="object"&&("__isObject"in r||"__isArray"in r)?(o[g]=ae([g],void 0,u),!0):(o[g]=r,!0))}return new Proxy(o,{has(g,r){return typeof r=="symbol"?r in o:r in o?!0:t(r)},get(g,r){if(typeof r!="symbol")return r in o||t(r),o[r]}})}var mS=["document","global","window","Window","globalThis","self","alert","prompt","confirm","eval","uneval","setTimeout","setInterval","setImmediate","clearImmediate","queueMicrotask","Function","require","module","Buffer","__dirname","__filename","fetch","XMLHttpRequest","Promise","Generator","GeneratorFunction","AsyncFunction","AsyncGenerator","AsyncGeneratorFunction","WebAssembly","Reflect","Proxy","escape","unescape"];function bS(n){for(let e of mS)n[e]={};n.__lookupGetter__=void 0,n.__lookupSetter__=void 0,n.__defineGetter__=void 0,n.__defineSetter__=void 0,n.Object=globalThis.SafeObject,n.Error=globalThis.SafeError,n.TypeError=gS,n.SyntaxError=hS,n.EvalError=lS,n.RangeError=dS,n.ReferenceError=yS,n.URIError=cS,n.Array=Array,n.Int8Array=Int8Array,n.Uint8Array=Uint8Array,n.Uint8ClampedArray=Uint8ClampedArray,n.Int16Array=Int16Array,n.Uint16Array=Uint16Array,n.Int32Array=Int32Array,n.Uint32Array=Uint32Array,n.Float32Array=Float32Array,n.Float64Array=Float64Array,n.BigInt64Array=typeof BigInt64Array<"u"?BigInt64Array:{},n.BigUint64Array=typeof BigUint64Array<"u"?BigUint64Array:{},n.Map=Map,n.WeakMap=WeakMap,n.Set=Set,n.WeakSet=WeakSet,n.Intl=typeof Intl<"u"?Intl:{},n.String=String,n.Number=Number,n.BigInt=typeof BigInt<"u"?BigInt:{},n.Infinity=1/0,n.parseFloat=parseFloat,n.parseInt=parseInt,n.JSON=JSON,n.ArrayBuffer=typeof ArrayBuffer<"u"?ArrayBuffer:{},n.SharedArrayBuffer=typeof SharedArrayBuffer<"u"?SharedArrayBuffer:{},n.Atomics=typeof Atomics<"u"?Atomics:{},n.DataView=typeof DataView<"u"?DataView:{},n.encodeURI=encodeURI,n.encodeURIComponent=encodeURIComponent,n.decodeURI=decodeURI,n.decodeURIComponent=decodeURIComponent,n.Boolean=Boolean,n.Symbol=Symbol}function wS(n){let e=Object.getPrototypeOf(n);return e===Object.prototype||e===null}function li(n){if(n==null||typeof n!="object")return n;if(j.isDateTime(n)||X.isDuration(n))return n.toISO()??null;if(V.isInterval(n)){let i=n.toISO();return i==="Invalid Interval"?null:i}if(Array.isArray(n))return n.map(li);if(!wS(n))return n;let e={};for(let i of Object.keys(n))e[i]=li(n[i]);return e}globalThis.extend=gi;globalThis.extendOptional=hi;globalThis.DateTime=j;globalThis.Duration=X;globalThis.Interval=V;globalThis.SafeObject=ql;globalThis.SafeError=$l;globalThis.ExpressionError=Ye;globalThis.createDeepLazyProxy=ae;globalThis.buildContext=sd;globalThis.__prepareForTransfer=li;})();
34
+ dt.isNotEmpty()`,evaluated:"false"}],returnType:"boolean",docURL:"https://docs.n8n.io/code/builtin/data-transformation-functions/arrays/#array-isNotEmpty"};var ri={typeName:"Date",functions:{beginningOf:Fl,endOfMonth:Bl,extract:Ql,isBetween:Gl,isDst:vl,isInLast:Al,isWeekend:Rl,minus:Pl,plus:Wl,format:El,toDateTime:Pa,diffTo:Oa,diffToNow:Ol,toInt:Kl,toFloat:qY,toBoolean:VY,isEmpty:Il,isNotEmpty:Ul}};function zl(n){return n==null||!n}function $Y(n){return!zl(n)}var eS=[Sa,ri,Na,fa,Aa,ka],nS={isEmpty:zl,isNotEmpty:$Y};function iS(n){if(typeof n!="string"||!n.length||!/\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}.\d{3}Z/.test(n))return!1;let e=new Date(n);return e instanceof Date&&!isNaN(e.valueOf())&&e.toISOString()===n}var aS=new Set(["__proto__","prototype","constructor","getPrototypeOf","mainModule","binding","_linkedBinding","_load","prepareStackTrace","__lookupGetter__","__lookupSetter__","__defineGetter__","__defineSetter__","caller","arguments","getBuiltinModule","dlopen","execve","loadEnvFile"]);function _l(n,e){let i=typeof e=="string"?e:String(e);if(aS.has(i))throw new k(`Cannot access "${i}" via expression extension due to security concerns`);let a;if(Array.isArray(n)?a=Sa.functions[e]:iS(n)&&e!=="toDate"&&e!=="toDateTime"?(n=new Date(n),a=ri.functions[e]):typeof n=="string"?a=Aa.functions[e]:typeof n=="number"?a=Na.functions[e]:n&&(j.isDateTime(n)||n instanceof Date)?a=ri.functions[e]:n!==null&&typeof n=="object"?a=fa.functions[e]:typeof n=="boolean"&&(a=ka.functions[e]),!a){let o=n;if(o&&e&&typeof o[e]=="function")return{type:"native",function:o[e]};a=nS[e]}if(a)return{type:"extended",function:a}}function gi(n,e,i){let a=_l(n,e);if(!a){Hl(n,e);let o=eS.filter(u=>e in u.functions);if(!o.length)throw new k(`Unknown expression function: ${e}`);if(o.length>1){let u=`"${o.pop().typeName}"`,s=`${o.map(t=>`"${t.typeName}"`).join(", ")}, and ${u}`;throw new k(`${e}() is only callable on types ${s}`)}else throw new k(`${e}() is only callable on type "${o[0].typeName}"`)}return a.type==="native"?a.function.apply(n,i):a.function(n,i)}function hi(n,e){let i=_l(n,e);if(i)return i.type==="native"?i.function.bind(n):(...a)=>i.function(n,a)}var ql=new Proxy(Object,{get(n,e){if(["defineProperty","defineProperties","setPrototypeOf","getOwnPropertyDescriptor","getOwnPropertyDescriptors","__defineGetter__","__defineSetter__","__lookupGetter__","__lookupSetter__"].includes(e))return;if(e==="getPrototypeOf")throw new Error("Object.getPrototypeOf is not allowed");if(e==="create")return o=>Object.create(o);let a=n[e];return typeof a=="function"?(...o)=>a.apply(n,o):a}}),Vl=new Set(["captureStackTrace","prepareStackTrace","stackTraceLimit","__defineGetter__","__defineSetter__","__lookupGetter__","__lookupSetter__"]),$l=new Proxy(Error,{get(n,e){if(Vl.has(e))return;let i=n[e];return typeof i=="function"?(...a)=>i.apply(n,a):i},set(n,e,i){return e==="prepareStackTrace"?!1:(n[e]=i,!0)},defineProperty(){return!1}});function Se(n){return new Proxy(n,{get(e,i){if(Vl.has(i))return;let a=e[i];return typeof a=="function"?(...o)=>a.apply(e,o):a},set(){return!1},defineProperty(){return!1}})}var Ye=class extends Error{constructor(e){super(e),this.name="ExpressionError"}},oS=new Set(["__proto__","prototype","constructor","__defineGetter__","__defineSetter__","__lookupGetter__","__lookupSetter__","toString","valueOf","toLocaleString","hasOwnProperty","isPrototypeOf","propertyIsEnumerable"]);function ed(n){if(typeof n=="string"&&oS.has(n))throw new Ye(`Cannot access "${n}" due to security concerns`);return n}var uS=new WeakMap;function Ka(n){return typeof n=="object"&&n!==null&&"__isObject"in n&&n.__isObject===!0}function tS(n){return typeof n=="object"&&n!==null&&"__isError"in n&&n.__isError===!0}function ye(n){if(tS(n))throw n}function ae(n=[],e,i){if(!i)throw new Error("createDeepLazyProxy requires callbacks parameter");let{getValueAtPath:a,getArrayElement:o,callFunctionAtPath:u}=i,s;function t(){if(e)return e;if(s)return s;let r=a.applySync(null,[n],{arguments:{copy:!0},result:{copy:!0}});return ye(r),Ka(r)?(s=r.__keys,s):[]}let g=new Proxy({},{ownKeys(){return t()},getOwnPropertyDescriptor(r,l){if(typeof l!="symbol"&&t().includes(l))return{configurable:!0,enumerable:!0,writable:!1}},get(r,l){if(typeof l=="symbol")return;if(l==="toString")return function(){return"[object Object]"};if(l==="valueOf")return function(){return r};if(l in r)return r[l];let h=[...n,l],d=a.applySync(null,[h],{arguments:{copy:!0},result:{copy:!0}});if(d==null)return r[l]=d,d;if(ye(d),d&&typeof d=="object"&&d.__isFunction)return r[l]=function(...y){let m=u.applySync(null,[h,...y],{arguments:{copy:!0},result:{copy:!0}});return ye(m),m},r[l];if(d&&typeof d=="object"&&d.__isArray){let y=new Proxy([],{has(m,w){if(typeof w=="symbol")return w in m;let p=Number(w);return!isNaN(p)&&p>=0&&p<d.__length?!0:w in m},get(m,w){if(typeof w=="symbol")return;if(w==="length")return d.__length;let p=Number(w);if(!isNaN(p)&&p>=0){if(!(w in m)){let S=o.applySync(null,[h,p],{arguments:{copy:!0},result:{copy:!0}});if(ye(S),S&&typeof S=="object"&&S.__isArray){let T=[...h,String(p)];m[w]=ae(T,void 0,i)}else if(Ka(S)){let T=[...h,String(p)];m[w]=ae(T,S.__keys,i)}else m[w]=S}return m[w]}return m[w]}});return r[l]=y,r[l]}return Ka(d)?(r[l]=ae(h,d.__keys,i),r[l]):(r[l]=d,d)},has(r,l){if(typeof l=="symbol")return!1;if(l in r)return!0;let h=[...n,l],d=a.applySync(null,[h],{arguments:{copy:!0},result:{copy:!0}});return ye(d),d!==void 0}});return uS.set(g,n),g}var nd=Math.min,id=Math.max,sS=(n,e)=>{let i=Math.abs(n-e)+1,a=new Array(i),o=n;for(let u=0;u<i;u++)n<e?a[u]=o++:a[u]=o--;return a},rS=(n,e)=>{if(!Array.isArray(n)||!Array.isArray(e))throw new k("keys and values must be arrays");if(n.length!==e.length)throw new k("keys and values not of equal length");let i={};for(let a=0;a<n.length;a++)i[n[a]]=e[a];return i},ad=(...n)=>qn(n),od=n=>!n;function ud(n,e){if(arguments.length!==2)throw new k("expected two arguments (value, defaultValue) for this function");return n==null||n===""||typeof n=="object"&&(Array.isArray(n)&&!n.length||!Object.keys(n).length)?e:n}ud.doc={name:"ifEmpty",description:"Returns the default value if the value is empty. Empty values are undefined, null, empty strings, arrays without elements and objects without keys.",returnType:"any",args:[{name:"value",type:"any"},{name:"defaultValue",type:"any"}],docURL:"https://docs.n8n.io/code/builtin/convenience"};var td={min:nd,max:id,not:od,average:ad,numberList:sS,zip:rS,$min:nd,$max:id,$average:ad,$not:od,$ifEmpty:ud};var gS=Se(TypeError),hS=Se(SyntaxError),lS=Se(EvalError),dS=Se(RangeError),yS=Se(ReferenceError),cS=Se(URIError);function sd(n,e,i,a){if(a&&!$.isValidZone(a))throw new Error(`Invalid timezone: "${a}"`);D.defaultZone=a??"system";let o={},u={getValueAtPath:n,getArrayElement:e,callFunctionAtPath:i};Object.defineProperty(o,"__sanitize",{get:()=>ed,set:()=>{throw new Ye('Cannot override "__sanitize" due to security concerns')},enumerable:!1,configurable:!1}),o.$now=j.now(),o.$today=j.now().set({hour:0,minute:0,second:0,millisecond:0}),Object.assign(o,td),o.DateTime=globalThis.DateTime,o.Duration=globalThis.Duration,o.Interval=globalThis.Interval,o.extend=gi,o.extendOptional=hi,bS(o),o.$item=function(g){let r=String(g);return{$json:ae(["$item",r,"$json"],void 0,u),$binary:ae(["$item",r,"$binary"],void 0,u)}},o.$=function(g){return ae(["$",g],void 0,u)};let s=new Set;function t(g){if(s.has(g))return!1;let r;try{r=n.applySync(null,[[g]],{arguments:{copy:!0},result:{copy:!0}})}catch{return!1}return s.add(g),r===void 0?!1:(ye(r),r&&typeof r=="object"&&r.__isFunction?(o[g]=function(...l){let h=i.applySync(null,[[g],...l],{arguments:{copy:!0},result:{copy:!0}});return ye(h),h},!0):r&&typeof r=="object"&&("__isObject"in r||"__isArray"in r)?(o[g]=ae([g],void 0,u),!0):(o[g]=r,!0))}return new Proxy(o,{has(g,r){return typeof r=="symbol"?r in o:r in o?!0:t(r)},get(g,r){if(typeof r!="symbol")return r in o||t(r),o[r]}})}var mS=["document","global","window","Window","globalThis","self","alert","prompt","confirm","eval","uneval","setTimeout","setInterval","setImmediate","clearImmediate","queueMicrotask","Function","require","module","Buffer","__dirname","__filename","fetch","XMLHttpRequest","Promise","Generator","GeneratorFunction","AsyncFunction","AsyncGenerator","AsyncGeneratorFunction","WebAssembly","Reflect","Proxy","escape","unescape"];function bS(n){for(let e of mS)n[e]={};n.__lookupGetter__=void 0,n.__lookupSetter__=void 0,n.__defineGetter__=void 0,n.__defineSetter__=void 0,n.Object=globalThis.SafeObject,n.Error=globalThis.SafeError,n.TypeError=gS,n.SyntaxError=hS,n.EvalError=lS,n.RangeError=dS,n.ReferenceError=yS,n.URIError=cS,n.Array=Array,n.Int8Array=Int8Array,n.Uint8Array=Uint8Array,n.Uint8ClampedArray=Uint8ClampedArray,n.Int16Array=Int16Array,n.Uint16Array=Uint16Array,n.Int32Array=Int32Array,n.Uint32Array=Uint32Array,n.Float32Array=Float32Array,n.Float64Array=Float64Array,n.BigInt64Array=typeof BigInt64Array<"u"?BigInt64Array:{},n.BigUint64Array=typeof BigUint64Array<"u"?BigUint64Array:{},n.Map=Map,n.WeakMap=WeakMap,n.Set=Set,n.WeakSet=WeakSet,n.Intl=typeof Intl<"u"?Intl:{},n.String=String,n.Number=Number,n.BigInt=typeof BigInt<"u"?BigInt:{},n.Infinity=1/0,n.parseFloat=parseFloat,n.parseInt=parseInt,n.JSON=JSON,n.ArrayBuffer=typeof ArrayBuffer<"u"?ArrayBuffer:{},n.SharedArrayBuffer=typeof SharedArrayBuffer<"u"?SharedArrayBuffer:{},n.Atomics=typeof Atomics<"u"?Atomics:{},n.DataView=typeof DataView<"u"?DataView:{},n.encodeURI=encodeURI,n.encodeURIComponent=encodeURIComponent,n.decodeURI=decodeURI,n.decodeURIComponent=decodeURIComponent,n.Boolean=Boolean,n.Symbol=Symbol}function wS(n){let e=Object.getPrototypeOf(n);return e===Object.prototype||e===null}function li(n){if(n==null||typeof n!="object")return n;if(j.isDateTime(n)||X.isDuration(n))return n.toISO()??null;if(V.isInterval(n)){let i=n.toISO();return i==="Invalid Interval"?null:i}if(Array.isArray(n))return n.map(li);if(!wS(n))return n;let e={};for(let i of Object.keys(n))e[i]=li(n[i]);return e}globalThis.extend=gi;globalThis.extendOptional=hi;globalThis.DateTime=j;globalThis.Duration=X;globalThis.Interval=V;globalThis.SafeObject=ql;globalThis.SafeError=$l;globalThis.ExpressionError=Ye;globalThis.createDeepLazyProxy=ae;globalThis.buildContext=sd;globalThis.__prepareForTransfer=li;})();
35
35
  /*! Bundled license information:
36
36
 
37
37
  is-buffer/index.js: