@n8n/expression-runtime 0.9.0 → 0.9.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.
- package/dist/bundle/runtime.esm.js +1 -1
- package/dist/bundle/runtime.esm.js.map +3 -3
- package/dist/bundle/runtime.iife.js +1 -1
- package/dist/bundle/runtime.iife.js.map +3 -3
- package/dist/cjs/build.tsbuildinfo +1 -1
- package/dist/cjs/extensions/function-extensions.d.ts.map +1 -1
- package/dist/cjs/extensions/function-extensions.js +8 -5
- package/dist/cjs/extensions/function-extensions.js.map +1 -1
- package/dist/esm/build.tsbuildinfo +1 -1
- package/dist/esm/extensions/function-extensions.d.ts.map +1 -1
- package/dist/esm/extensions/function-extensions.js +8 -5
- package/dist/esm/extensions/function-extensions.js.map +1 -1
- package/package.json +1 -1
|
@@ -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:$Y,isEmpty:Il,isNotEmpty:Ul}};function zl(n){return n==null||!n}function VY(n){return!zl(n)}var eS=[Sa,ri,Na,fa,Aa,La],nS={isEmpty:zl,isNotEmpty:VY};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 L(`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=La.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 L(`Unknown expression function: ${e}`);if(o.length>1){let u=`"${o.pop().typeName}"`,s=`${o.map(t=>`"${t.typeName}"`).join(", ")}, and ${u}`;throw new L(`${e}() is only callable on types ${s}`)}else throw new L(`${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}}),$l=new Set(["captureStackTrace","prepareStackTrace","stackTraceLimit","__defineGetter__","__defineSetter__","__lookupGetter__","__lookupSetter__"]),Vl=new Proxy(Error,{get(n,e){if($l.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 Ye(n){return new Proxy(n,{get(e,i){if($l.has(i))return;let a=e[i];return typeof a=="function"?(...o)=>a.apply(e,o):a},set(){return!1},defineProperty(){return!1}})}var je=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 je(`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 Se(n){if(tS(n))throw n}function H(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 g=a.applySync(null,[n],{arguments:{copy:!0},result:{copy:!0}});return Se(g),Ka(g)?(s=g.__keys,s):[]}let r=new Proxy({},{ownKeys(){return t()},getOwnPropertyDescriptor(g,l){if(typeof l!="symbol"&&t().includes(l))return{configurable:!0,enumerable:!0,writable:!1}},get(g,l){if(typeof l=="symbol")return;if(l==="toString")return function(){return"[object Object]"};if(l==="valueOf")return function(){return g};if(l in g)return g[l];let h=[...n,l],d=a.applySync(null,[h],{arguments:{copy:!0},result:{copy:!0}});if(d==null)return g[l]=d,d;if(Se(d),d&&typeof d=="object"&&d.__isFunction)return g[l]=function(...y){let m=u.applySync(null,[h,...y],{arguments:{copy:!0},result:{copy:!0}});return Se(m),m},g[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(Se(S),S&&typeof S=="object"&&S.__isArray){let T=[...h,String(p)];m[w]=H(T,void 0,i)}else if(Ka(S)){let T=[...h,String(p)];m[w]=H(T,S.__keys,i)}else m[w]=S}return m[w]}return m[w]}});return g[l]=y,g[l]}return Ka(d)?(g[l]=H(h,d.__keys,i),g[l]):(g[l]=d,d)},has(g,l){if(typeof l=="symbol")return!1;if(l in g)return!0;let h=[...n,l],d=a.applySync(null,[h],{arguments:{copy:!0},result:{copy:!0}});return Se(d),d!==void 0}});return uS.set(r,n),r}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 L("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 L("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=Ye(TypeError),hS=Ye(SyntaxError),lS=Ye(EvalError),dS=Ye(RangeError),yS=Ye(ReferenceError),cS=Ye(URIError);function sd(n,e,i,a){if(a&&!ee.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 je('Cannot override "__sanitize" due to security concerns')},enumerable:!1,configurable:!1}),o.$json=H(["$json"],void 0,u),o.$binary=H(["$binary"],void 0,u),o.$input=H(["$input"],void 0,u),o.$node=H(["$node"],void 0,u),o.$parameter=H(["$parameter"],void 0,u),o.$workflow=H(["$workflow"],void 0,u),o.$prevNode=H(["$prevNode"],void 0,u),o.$data=H(["$data"],void 0,u),o.$env=H(["$env"],void 0,u),o.process=H(["process"],void 0,u),o.$execution=H(["$execution"],void 0,u),o.$vars=H(["$vars"],void 0,u),o.$secrets=H(["$secrets"],void 0,u),o.$now=j.now(),o.$today=j.now().set({hour:0,minute:0,second:0,millisecond:0});function s(r){try{return n.applySync(null,[[r]],{arguments:{copy:!0},result:{copy:!0}})}catch{return}}o.$runIndex=s("$runIndex"),o.$itemIndex=s("$itemIndex"),o.$executionId=s("$executionId"),o.$resumeWebhookUrl=s("$resumeWebhookUrl"),o.$webhookId=s("$webhookId"),o.$nodeId=s("$nodeId"),o.$nodeVersion=s("$nodeVersion"),Object.assign(o,td);function t(r){if(i)try{let g=n.applySync(null,[[r]],{arguments:{copy:!0},result:{copy:!0}});g&&typeof g=="object"&&g.__isFunction?o[r]=function(...l){let h=i.applySync(null,[[r],...l],{arguments:{copy:!0},result:{copy:!0}});return Se(h),h}:o[r]=g}catch{o[r]=void 0}}return t("$items"),t("$fromAI"),t("$fromai"),t("$fromAi"),o.DateTime=globalThis.DateTime,o.Duration=globalThis.Duration,o.Interval=globalThis.Interval,o.extend=gi,o.extendOptional=hi,bS(o),o.$item=function(r){let g=String(r);return{$json:H(["$item",g,"$json"],void 0,u),$binary:H(["$item",g,"$binary"],void 0,u)}},o.$=function(r){return H(["$",r],void 0,u)},o}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=Vl;globalThis.ExpressionError=je;globalThis.createDeepLazyProxy=H;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:$Y,isEmpty:Il,isNotEmpty:Ul}};function zl(n){return n==null||!n}function VY(n){return!zl(n)}var eS=[Sa,ri,Na,fa,Aa,La],nS={isEmpty:zl,isNotEmpty:VY};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 L(`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=La.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 L(`Unknown expression function: ${e}`);if(o.length>1){let u=`"${o.pop().typeName}"`,s=`${o.map(t=>`"${t.typeName}"`).join(", ")}, and ${u}`;throw new L(`${e}() is only callable on types ${s}`)}else throw new L(`${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}}),$l=new Set(["captureStackTrace","prepareStackTrace","stackTraceLimit","__defineGetter__","__defineSetter__","__lookupGetter__","__lookupSetter__"]),Vl=new Proxy(Error,{get(n,e){if($l.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 Ye(n){return new Proxy(n,{get(e,i){if($l.has(i))return;let a=e[i];return typeof a=="function"?(...o)=>a.apply(e,o):a},set(){return!1},defineProperty(){return!1}})}var je=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 je(`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 Se(n){if(tS(n))throw n}function H(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 g=a.applySync(null,[n],{arguments:{copy:!0},result:{copy:!0}});return Se(g),Ka(g)?(s=g.__keys,s):[]}let r=new Proxy({},{ownKeys(){return t()},getOwnPropertyDescriptor(g,l){if(typeof l!="symbol"&&t().includes(l))return{configurable:!0,enumerable:!0,writable:!1}},get(g,l){if(typeof l=="symbol")return;if(l==="toString")return function(){return"[object Object]"};if(l==="valueOf")return function(){return g};if(l in g)return g[l];let h=[...n,l],d=a.applySync(null,[h],{arguments:{copy:!0},result:{copy:!0}});if(d==null)return g[l]=d,d;if(Se(d),d&&typeof d=="object"&&d.__isFunction)return g[l]=function(...y){let m=u.applySync(null,[h,...y],{arguments:{copy:!0},result:{copy:!0}});return Se(m),m},g[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(Se(S),S&&typeof S=="object"&&S.__isArray){let T=[...h,String(p)];m[w]=H(T,void 0,i)}else if(Ka(S)){let T=[...h,String(p)];m[w]=H(T,S.__keys,i)}else m[w]=S}return m[w]}return m[w]}});return g[l]=y,g[l]}return Ka(d)?(g[l]=H(h,d.__keys,i),g[l]):(g[l]=d,d)},has(g,l){if(typeof l=="symbol")return!1;if(l in g)return!0;let h=[...n,l],d=a.applySync(null,[h],{arguments:{copy:!0},result:{copy:!0}});return Se(d),d!==void 0}});return uS.set(r,n),r}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 L("keys and values must be arrays");if(n.length!==e.length)throw new L("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 L("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=Ye(TypeError),hS=Ye(SyntaxError),lS=Ye(EvalError),dS=Ye(RangeError),yS=Ye(ReferenceError),cS=Ye(URIError);function sd(n,e,i,a){if(a&&!ee.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 je('Cannot override "__sanitize" due to security concerns')},enumerable:!1,configurable:!1}),o.$json=H(["$json"],void 0,u),o.$binary=H(["$binary"],void 0,u),o.$input=H(["$input"],void 0,u),o.$node=H(["$node"],void 0,u),o.$parameter=H(["$parameter"],void 0,u),o.$workflow=H(["$workflow"],void 0,u),o.$prevNode=H(["$prevNode"],void 0,u),o.$data=H(["$data"],void 0,u),o.$env=H(["$env"],void 0,u),o.process=H(["process"],void 0,u),o.$execution=H(["$execution"],void 0,u),o.$vars=H(["$vars"],void 0,u),o.$secrets=H(["$secrets"],void 0,u),o.$now=j.now(),o.$today=j.now().set({hour:0,minute:0,second:0,millisecond:0});function s(r){try{return n.applySync(null,[[r]],{arguments:{copy:!0},result:{copy:!0}})}catch{return}}o.$runIndex=s("$runIndex"),o.$itemIndex=s("$itemIndex"),o.$executionId=s("$executionId"),o.$resumeWebhookUrl=s("$resumeWebhookUrl"),o.$webhookId=s("$webhookId"),o.$nodeId=s("$nodeId"),o.$nodeVersion=s("$nodeVersion"),Object.assign(o,td);function t(r){if(i)try{let g=n.applySync(null,[[r]],{arguments:{copy:!0},result:{copy:!0}});g&&typeof g=="object"&&g.__isFunction?o[r]=function(...l){let h=i.applySync(null,[[r],...l],{arguments:{copy:!0},result:{copy:!0}});return Se(h),h}:o[r]=g}catch{o[r]=void 0}}return t("$items"),t("$fromAI"),t("$fromai"),t("$fromAi"),o.DateTime=globalThis.DateTime,o.Duration=globalThis.Duration,o.Interval=globalThis.Interval,o.extend=gi,o.extendOptional=hi,bS(o),o.$item=function(r){let g=String(r);return{$json:H(["$item",g,"$json"],void 0,u),$binary:H(["$item",g,"$binary"],void 0,u)}},o.$=function(r){return H(["$",r],void 0,u)},o}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=Vl;globalThis.ExpressionError=je;globalThis.createDeepLazyProxy=H;globalThis.buildContext=sd;globalThis.__prepareForTransfer=li;})();
|
|
35
35
|
/*! Bundled license information:
|
|
36
36
|
|
|
37
37
|
is-buffer/index.js:
|