@elyx-code/project-logic-tree 0.0.6111 → 0.0.6112
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/index.js +4 -4
- package/dist/index.umd.cjs +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -23834,12 +23834,12 @@ function Nm(i, e) {
|
|
|
23834
23834
|
return t;
|
|
23835
23835
|
}
|
|
23836
23836
|
function S7(i) {
|
|
23837
|
-
return i.
|
|
23838
|
-
|
|
23839
|
-
|
|
23837
|
+
return i.split(/[\s-]+/).filter((r) => r.length > 0).map(
|
|
23838
|
+
(r, a) => a === 0 ? r.toLowerCase() : r[0].toUpperCase() + r.slice(1).toLowerCase()
|
|
23839
|
+
).join("");
|
|
23840
23840
|
}
|
|
23841
23841
|
function C7(i) {
|
|
23842
|
-
return i.split(
|
|
23842
|
+
return i.split(/[\s-]+/).filter((r) => r.length > 0).map(
|
|
23843
23843
|
(r) => r[0].toUpperCase() + r.slice(1).toLowerCase()
|
|
23844
23844
|
).join("");
|
|
23845
23845
|
}
|
package/dist/index.umd.cjs
CHANGED
|
@@ -33,7 +33,7 @@ __p+='`),y}),s+=`';
|
|
|
33
33
|
`,o="obj";s=`var __t,__p='',__j=Array.prototype.join,print=function(){__p+=__j.call(arguments,'');};
|
|
34
34
|
`+s+`return __p;
|
|
35
35
|
`;var l;try{l=new Function(o,"_",s)}catch(y){throw y.source=s,y}var p=function(y){return l.call(this,y,se)};return p.source="function("+o+`){
|
|
36
|
-
`+s+"}",p}function N5(i,e,t){e=Fa(e);var r=e.length;if(!r)return bt(t)?t.call(i):t;for(var a=0;a<r;a++){var s=i==null?void 0:i[e[a]];s===void 0&&(s=t,a=r),i=bt(s)?s.call(i):s}return i}var M5=0;function V5(i){var e=++M5+"";return i?i+e:e}function L5(i){var e=se(i);return e._chain=!0,e}function eP(i,e,t,r,a){if(!(r instanceof e))return i.apply(t,a);var s=HD(i.prototype),o=i.apply(s,a);return Zn(o)?o:s}var Bi=At(function(i,e){var t=Bi.placeholder,r=function(){for(var a=0,s=e.length,o=Array(s),l=0;l<s;l++)o[l]=e[l]===t?arguments[a++]:e[l];for(;a<arguments.length;)o.push(arguments[a++]);return eP(i,r,this,this,o)};return r});Bi.placeholder=se;const tP=At(function(i,e,t){if(!bt(i))throw new TypeError("Bind must be called on a function");var r=At(function(a){return eP(i,r,e,this,t.concat(a))});return r}),Mt=ND(Ot);function Cr(i,e,t,r){if(r=r||[],!e&&e!==0)e=1/0;else if(e<=0)return r.concat(i);for(var a=r.length,s=0,o=Ot(i);s<o;s++){var l=i[s];if(Mt(l)&&(Sr(l)||Hd(l)))if(e>1)Cr(l,e-1,t,r),a=r.length;else for(var p=0,y=l.length;p<y;)r[a++]=l[p++];else t||(r[a++]=l)}return r}const G5=At(function(i,e){e=Cr(e,!1,!1);var t=e.length;if(t<1)throw new Error("bindAll must be passed function names");for(;t--;){var r=e[t];i[r]=tP(i[r],i)}return i});function $5(i,e){var t=function(r){var a=t.cache,s=""+(e?e.apply(this,arguments):r);return Kn(a,s)||(a[s]=i.apply(this,arguments)),a[s]};return t.cache={},t}const nP=At(function(i,e,t){return setTimeout(function(){return i.apply(null,t)},e)}),F5=Bi(nP,se,1);function U5(i,e,t){var r,a,s,o,l=0;t||(t={});var p=function(){l=t.leading===!1?0:ja(),r=null,o=i.apply(a,s),r||(a=s=null)},y=function(){var h=ja();!l&&t.leading===!1&&(l=h);var m=e-(h-l);return a=this,s=arguments,m<=0||m>e?(r&&(clearTimeout(r),r=null),l=h,o=i.apply(a,s),r||(a=s=null)):!r&&t.trailing!==!1&&(r=setTimeout(p,m)),o};return y.cancel=function(){clearTimeout(r),l=0,r=a=s=null},y}function x5(i,e,t){var r,a,s,o,l,p=function(){var h=ja()-a;e>h?r=setTimeout(p,e-h):(r=null,t||(o=i.apply(l,s)),r||(s=l=null))},y=At(function(h){return l=this,s=h,a=ja(),r||(r=setTimeout(p,e),t&&(o=i.apply(l,s))),o});return y.cancel=function(){clearTimeout(r),r=s=l=null},y}function j5(i,e){return Bi(e,i)}function su(i){return function(){return!i.apply(this,arguments)}}function k5(){var i=arguments,e=i.length-1;return function(){for(var t=e,r=i[e].apply(this,arguments);t--;)r=i[t].call(this,r);return r}}function q5(i,e){return function(){if(--i<1)return e.apply(this,arguments)}}function rP(i,e){var t;return function(){return--i>0&&(t=e.apply(this,arguments)),i<=1&&(e=null),t}}const J5=Bi(rP,2);function iP(i,e,t){e=St(e,t);for(var r=Qe(i),a,s=0,o=r.length;s<o;s++)if(a=r[s],e(i[a],a,i))return a}function aP(i){return function(e,t,r){t=St(t,r);for(var a=Ot(e),s=i>0?0:a-1;s>=0&&s<a;s+=i)if(t(e[s],s,e))return s;return-1}}const ou=aP(1),sP=aP(-1);function oP(i,e,t,r){t=St(t,r,1);for(var a=t(e),s=0,o=Ot(i);s<o;){var l=Math.floor((s+o)/2);t(i[l])<a?s=l+1:o=l}return s}function lP(i,e,t){return function(r,a,s){var o=0,l=Ot(r);if(typeof s=="number")i>0?o=s>=0?s:Math.max(s+l,o):l=s>=0?Math.min(s+1,l):s+l+1;else if(t&&s&&l)return s=t(r,a),r[s]===a?s:-1;if(a!==a)return s=e(Va.call(r,o,l),wD),s>=0?s+o:-1;for(s=i>0?o:l-1;s>=0&&s<l;s+=i)if(r[s]===a)return s;return-1}}const cP=lP(1,ou,oP),W5=lP(-1,sP);function lu(i,e,t){var r=Mt(i)?ou:iP,a=r(i,e,t);if(a!==void 0&&a!==-1)return i[a]}function H5(i,e){return lu(i,Ua(e))}function Sn(i,e,t){e=xa(e,t);var r,a;if(Mt(i))for(r=0,a=i.length;r<a;r++)e(i[r],r,i);else{var s=Qe(i);for(r=0,a=s.length;r<a;r++)e(i[s[r]],s[r],i)}return i}function Br(i,e,t){e=St(e,t);for(var r=!Mt(i)&&Qe(i),a=(r||i).length,s=Array(a),o=0;o<a;o++){var l=r?r[o]:o;s[o]=e(i[l],l,i)}return s}function dP(i){var e=function(t,r,a,s){var o=!Mt(t)&&Qe(t),l=(o||t).length,p=i>0?0:l-1;for(s||(a=t[o?o[p]:p],p+=i);p>=0&&p<l;p+=i){var y=o?o[p]:p;a=r(a,t[y],y,t)}return a};return function(t,r,a,s){var o=arguments.length>=3;return e(t,xa(r,s,4),a,o)}}const cu=dP(1),uP=dP(-1);function wi(i,e,t){var r=[];return e=St(e,t),Sn(i,function(a,s,o){e(a,s,o)&&r.push(a)}),r}function Y5(i,e,t){return wi(i,su(St(e)),t)}function pP(i,e,t){e=St(e,t);for(var r=!Mt(i)&&Qe(i),a=(r||i).length,s=0;s<a;s++){var o=r?r[s]:s;if(!e(i[o],o,i))return!1}return!0}function yP(i,e,t){e=St(e,t);for(var r=!Mt(i)&&Qe(i),a=(r||i).length,s=0;s<a;s++){var o=r?r[s]:s;if(e(i[o],o,i))return!0}return!1}function Cn(i,e,t,r){return Mt(i)||(i=Ci(i)),(typeof t!="number"||r)&&(t=0),cP(i,e,t)>=0}const z5=At(function(i,e,t){var r,a;return bt(e)?a=e:(e=Fa(e),r=e.slice(0,-1),e=e[e.length-1]),Br(i,function(s){var o=a;if(!o){if(r&&r.length&&(s=eu(s,r)),s==null)return;o=s[e]}return o==null?o:o.apply(s,t)})});function du(i,e){return Br(i,nu(e))}function Z5(i,e){return wi(i,Ua(e))}function fP(i,e,t){var r=-1/0,a=-1/0,s,o;if(e==null||typeof e=="number"&&typeof i[0]!="object"&&i!=null){i=Mt(i)?i:Ci(i);for(var l=0,p=i.length;l<p;l++)s=i[l],s!=null&&s>r&&(r=s)}else e=St(e,t),Sn(i,function(y,h,m){o=e(y,h,m),(o>a||o===-1/0&&r===-1/0)&&(r=y,a=o)});return r}function K5(i,e,t){var r=1/0,a=1/0,s,o;if(e==null||typeof e=="number"&&typeof i[0]!="object"&&i!=null){i=Mt(i)?i:Ci(i);for(var l=0,p=i.length;l<p;l++)s=i[l],s!=null&&s<r&&(r=s)}else e=St(e,t),Sn(i,function(y,h,m){o=e(y,h,m),(o<a||o===1/0&&r===1/0)&&(r=y,a=o)});return r}var X5=/[^\ud800-\udfff]|[\ud800-\udbff][\udc00-\udfff]|[\ud800-\udfff]/g;function hP(i){return i?Sr(i)?Va.call(i):qd(i)?i.match(X5):Mt(i)?Br(i,tu):Ci(i):[]}function mP(i,e,t){if(e==null||t)return Mt(i)||(i=Ci(i)),i[iu(i.length-1)];var r=hP(i),a=Ot(r);e=Math.max(Math.min(e,a),0);for(var s=a-1,o=0;o<e;o++){var l=iu(o,s),p=r[o];r[o]=r[l],r[l]=p}return r.slice(0,e)}function Q5(i){return mP(i,1/0)}function e2(i,e,t){var r=0;return e=St(e,t),du(Br(i,function(a,s,o){return{value:a,index:r++,criteria:e(a,s,o)}}).sort(function(a,s){var o=a.criteria,l=s.criteria;if(o!==l){if(o>l||o===void 0)return 1;if(o<l||l===void 0)return-1}return a.index-s.index}),"value")}function Co(i,e){return function(t,r,a){var s=e?[[],[]]:{};return r=St(r,a),Sn(t,function(o,l){var p=r(o,l,t);i(s,o,p)}),s}}const t2=Co(function(i,e,t){Kn(i,t)?i[t].push(e):i[t]=[e]}),n2=Co(function(i,e,t){i[t]=e}),r2=Co(function(i,e,t){Kn(i,t)?i[t]++:i[t]=1}),i2=Co(function(i,e,t){i[t?0:1].push(e)},!0);function a2(i){return i==null?0:Mt(i)?i.length:Qe(i).length}function s2(i,e,t){return e in t}const TP=At(function(i,e){var t={},r=e[0];if(i==null)return t;bt(r)?(e.length>1&&(r=xa(r,e[1])),e=$a(i)):(r=s2,e=Cr(e,!1,!1),i=Object(i));for(var a=0,s=e.length;a<s;a++){var o=e[a],l=i[o];r(l,o,i)&&(t[o]=l)}return t}),o2=At(function(i,e){var t=e[0],r;return bt(t)?(t=su(t),e.length>1&&(r=e[1])):(e=Br(Cr(e,!1,!1),String),t=function(a,s){return!Cn(e,s)}),TP(i,t,r)});function EP(i,e,t){return Va.call(i,0,Math.max(0,i.length-(e==null||t?1:e)))}function uu(i,e,t){return i==null||i.length<1?e==null||t?void 0:[]:e==null||t?i[0]:EP(i,i.length-e)}function Bo(i,e,t){return Va.call(i,e==null||t?1:e)}function l2(i,e,t){return i==null||i.length<1?e==null||t?void 0:[]:e==null||t?i[i.length-1]:Bo(i,Math.max(0,i.length-e))}function c2(i){return wi(i,Boolean)}function d2(i,e){return Cr(i,e,!1)}const bP=At(function(i,e){return e=Cr(e,!0,!0),wi(i,function(t){return!Cn(e,t)})}),u2=At(function(i,e){return bP(i,e)});function pu(i,e,t,r){DD(e)||(r=t,t=e,e=!1),t!=null&&(t=St(t,r));for(var a=[],s=[],o=0,l=Ot(i);o<l;o++){var p=i[o],y=t?t(p,o,i):p;e&&!t?((!o||s!==y)&&a.push(p),s=y):t?Cn(s,y)||(s.push(y),a.push(p)):Cn(a,p)||a.push(p)}return a}const p2=At(function(i){return pu(Cr(i,!0,!0))});function y2(i){for(var e=[],t=arguments.length,r=0,a=Ot(i);r<a;r++){var s=i[r];if(!Cn(e,s)){var o;for(o=1;o<t&&Cn(arguments[o],s);o++);o===t&&e.push(s)}}return e}function yu(i){for(var e=i&&fP(i,Ot).length||0,t=Array(e),r=0;r<e;r++)t[r]=du(i,r);return t}const f2=At(yu);function h2(i,e){for(var t={},r=0,a=Ot(i);r<a;r++)e?t[i[r]]=e[r]:t[i[r][0]]=i[r][1];return t}function m2(i,e,t){e==null&&(e=i||0,i=0),t||(t=e<i?-1:1);for(var r=Math.max(Math.ceil((e-i)/t),0),a=Array(r),s=0;s<r;s++,i+=t)a[s]=i;return a}function T2(i,e){if(e==null||e<1)return[];for(var t=[],r=0,a=i.length;r<a;)t.push(Va.call(i,r,r+=e));return t}function fu(i,e){return i._chain?se(e).chain():e}function RP(i){return Sn(Xd(i),function(e){var t=se[e]=i[e];se.prototype[e]=function(){var r=[this._wrapped];return j3.apply(r,arguments),fu(this,t.apply(se,r))}}),se}Sn(["pop","push","reverse","shift","sort","splice","unshift"],function(i){var e=Po[i];se.prototype[i]=function(){var t=this._wrapped;return t!=null&&(e.apply(t,arguments),(i==="shift"||i==="splice")&&t.length===0&&delete t[0]),fu(this,t)}}),Sn(["concat","join","slice"],function(i){var e=Po[i];se.prototype[i]=function(){var t=this._wrapped;return t!=null&&(t=e.apply(t,arguments)),fu(this,t)}});var gP=RP(Object.freeze(Object.defineProperty({__proto__:null,VERSION:fD,after:q5,all:pP,allKeys:$a,any:yP,assign:So,before:rP,bind:tP,bindAll:G5,chain:L5,chunk:T2,clone:E5,collect:Br,compact:c2,compose:k5,constant:_D,contains:Cn,countBy:r2,create:T5,debounce:x5,default:se,defaults:WD,defer:F5,delay:nP,detect:lu,difference:bP,drop:Bo,each:Sn,escape:D5,every:pP,extend:JD,extendOwn:So,filter:wi,find:lu,findIndex:ou,findKey:iP,findLastIndex:sP,findWhere:H5,first:uu,flatten:d2,foldl:cu,foldr:uP,forEach:Sn,functions:Xd,get:zD,groupBy:t2,has:R5,head:uu,identity:tu,include:Cn,includes:Cn,indexBy:n2,indexOf:cP,initial:EP,inject:cu,intersection:y2,invert:qD,invoke:z5,isArguments:Hd,isArray:Sr,isArrayBuffer:OD,isBoolean:DD,isDataView:Ao,isDate:K3,isElement:Z3,isEmpty:Ga,isEqual:l5,isError:Q3,isFinite:r5,isFunction:bt,isMap:u5,isMatch:GD,isNaN:wD,isNull:z3,isNumber:PD,isObject:Zn,isRegExp:X3,isSet:y5,isString:qd,isSymbol:AD,isTypedArray:VD,isUndefined:ID,isWeakMap:p5,isWeakSet:f5,iteratee:ru,keys:Qe,last:l2,lastIndexOf:W5,map:Br,mapObject:g5,matcher:Ua,matches:Ua,max:fP,memoize:$5,methods:Xd,min:K5,mixin:RP,negate:su,noop:KD,now:ja,object:h2,omit:o2,once:J5,pairs:h5,partial:Bi,partition:i2,pick:TP,pluck:du,property:nu,propertyOf:v5,random:iu,range:m2,reduce:cu,reduceRight:uP,reject:Y5,rest:Bo,restArguments:At,result:N5,sample:mP,select:wi,shuffle:Q5,size:a2,some:yP,sortBy:e2,sortedIndex:oP,tail:Bo,take:uu,tap:b5,template:_5,templateSettings:O5,throttle:U5,times:I5,toArray:hP,toPath:YD,transpose:yu,unescape:A5,union:p2,uniq:pu,unique:pu,uniqueId:V5,unzip:yu,values:Ci,where:Z5,without:u2,wrap:j5,zip:f2},Symbol.toStringTag,{value:"Module"})));gP._=gP;function wo(i){return i.charAt(0).toUpperCase()+i.slice(1)}function _o(i){return i.charAt(0).toLowerCase()+i.slice(1)}function vP(i,e){if(i.type!==n.Property||e.type!==n.Property)throw new Error(`Expected property entities for comparison. But got ${i.type} and ${e.type}.`);return i===e||i.id===e.id?!0:i.name!==e.name||i.static!==e.static||i.abstract!==e.abstract?!1:kt(i.dataType,e.dataType).compatible}function IP(i,e){if(i.type!==n.CustomEntity||e.type!==n.CustomEntity)throw new Error(`Expected custom entities for comparison. But got ${i.type} and ${e.type}.`);if(i===e||i.id===e.id)return!0;if(i.properties.length!==e.properties.length)return!1;let t=[...e.properties];const r=[];for(let a=0;a<i.properties.length;a++){const s=i.properties[a];t.find(l=>{const p=vP(s,l);return p&&(t=t.filter(y=>y.id!==l.id)),p})||r.push(s)}return!(r.length>0)}var jt=(i=>(i.BothUnconstrained="both-unconstrained",i.AConstraintBUnconstrained="a-constraint-b-unconstrained",i.BConstraintAUnconstrained="b-constraint-a-unconstrained",i.Same="same",i.AIsListBIsNot="a-is-list-b-is-not",i.BIsListAIsNot="b-is-list-a-is-not",i.AIsNullableBIsNot="a-is-nullable-b-is-not",i.BIsNullableAIsNot="b-is-nullable-a-is-not",i.AIsTemplateBIsNot="a-is-template-b-is-not",i.BIsTemplateAIsNot="b-is-template-a-is-not",i.BothUntyped="both-untyped",i.AIsUntypedBIsNot="a-is-untyped-b-is-not",i.BIsUntypedAIsNot="b-is-untyped-a-is-not",i.TypeEntityMismatch="type-entity-mismatch",i.SameCustomEntities="same-custom-entities",i.CompatibleCustomEntities="compatible-custom-entities",i.IncompatibleCustomEntities="incompatible-custom-entities",i.SamePrimitiveEntities="same-primitive-entities",i.IncompatiblePrimitiveEntities="incompatible-primitive-entities",i.SameBuiltInBaseEntities="same-built-in-base-entities",i.IncompatibleBuiltInBaseEntities="incompatible-built-in-base-entities",i.CheckUnknown="check-unknown",i))(jt||{});function kt(i,e){var t,r,a,s,o,l,p,y,h,m,R;if(i&&i.type!==n.DataType||e&&e.type!==n.DataType)throw new Error(`Expected data-type entities for comparison. But got ${i==null?void 0:i.type} and ${e==null?void 0:e.type}.`);if(i===null&&e===null)return{compatible:!0,type:"both-unconstrained"};if(i===null)return{compatible:!0,type:"a-constraint-b-unconstrained"};if(e===null)return{compatible:!0,type:"b-constraint-a-unconstrained"};if(i===e)return{compatible:!0,type:"same"};if(i.id===e.id)return{compatible:!0,type:"same"};if(i.isList!==e.isList)return{compatible:!1,type:i.isList?"a-is-list-b-is-not":"b-is-list-a-is-not"};if(i.isNullable!==e.isNullable)return{compatible:!1,type:i.isNullable?"a-is-nullable-b-is-not":"b-is-nullable-a-is-not"};if(i.asType!==e.asType)return{compatible:!1,type:i.asType?"a-is-template-b-is-not":"b-is-template-a-is-not"};if(!i.entity&&e.entity)return{compatible:!0,type:"a-is-untyped-b-is-not"};if(i.entity&&!e.entity)return{compatible:!0,type:"b-is-untyped-a-is-not"};if(!i.entity&&!e.entity)return{compatible:!0,type:"both-untyped"};if(((t=i.entity)==null?void 0:t.type)!==((r=e.entity)==null?void 0:r.type))return{compatible:!1,type:"type-entity-mismatch"};if(((a=i.entity)==null?void 0:a.type)===n.CustomEntity){if(((s=i.entity)==null?void 0:s.id)===((o=e.entity)==null?void 0:o.id))return{compatible:!0,type:"same-custom-entities"};const v=IP(i.entity,e.entity);return{compatible:v,type:v?"compatible-custom-entities":"incompatible-custom-entities"}}return((l=i.entity)==null?void 0:l.type)===n.PrimitiveEntity?((p=i.entity)==null?void 0:p.id)===((y=e.entity)==null?void 0:y.id)?{compatible:!0,type:"same-primitive-entities"}:{compatible:!1,type:"incompatible-primitive-entities"}:((h=i.entity)==null?void 0:h.type)===n.BuiltInBaseEntity?((m=i.entity)==null?void 0:m.id)===((R=e.entity)==null?void 0:R.id)?{compatible:!0,type:"same-built-in-base-entities"}:{compatible:!1,type:"incompatible-built-in-base-entities"}:{compatible:!1,type:"check-unknown"}}function E2(i){const e=i.project.builtInBaseEntities.find(a=>a.id===V.EXECUTION),t={id:i.id+"--infered-data-type",version:1,type:n.DataType,isList:!1,isNullable:!1,andChildrenGroup:null,orChildrenGroup:null,asType:!1,entity:null,constant:!1,defaultValue:null,parent:null},r=g(t,i.project);return r.inferred=!0,r.sync(t),r.setParent(i),r.entity=e,r}function DP(i){return i.dataType?i.dataType:null}function hu(i){var t;const e=(t=i.declaration)==null?void 0:t.getDataType();return e&&e.isResolved?e:i.readsValue?un(i.readsValue):null}function mu(i){return i.dataType&&!i.dataType.inferred&&i.dataType.isResolved?i.dataType:i.readsValue?un(i.readsValue):null}function PP(i){return un(i.declaration)}function AP(i){return i.dataType&&!i.dataType.inferred?i.dataType:(i.dataType&&i.dataType.inferred,i.inferDataTypeAndSyncInstancesInputsAndOutputs(),i.dataType)}function Tu(i){var e;return((e=i.declaration)==null?void 0:e.dataType)||null}function OP(i){return(i==null?void 0:i.dataType)||null}function SP(i){return(i==null?void 0:i.dataType)||null}function un(i){switch(i.type){case n.VariableDeclaration:return AP(i);case n.ArgumentDeclaration:return DP(i);case n.ReturnDeclaration:return mu(i);case n.VariableInstance:return PP(i);case n.InputMap:return hu(i);case n.OutputMap:return Tu(i);case n.Property:return OP(i);case n.ValueDescriptor:return SP(i);default:throw new Error(`Cannot infer data type from entity of type ${i.type}.`)}}function No(i){switch(i.type){case n.ArgumentDeclaration:return i.getDataType();case n.InputMap:return i.getDataType();case n.VariableDeclaration:return i.getDataType();case n.VariableInstance:return i.getDataType();case n.OutputMap:return i.getDataType();case n.ReturnDeclaration:return i.getDataType();case n.Property:return i.getDataType();case n.ValueDescriptor:return i.getDataType();default:return null}}function N(i){if(i){let e=null;return typeof i=="string"?e=i:i.entityId?e=i.entityId:i.type!==n.GenericReference&&(e=i.id),e}return null}function wr(i){return i.declaration||i}function b2(i){return i.type===n.VariableDeclaration?i.parent===i.project?"global-declaration":"local-declaration":i.declaration.parent===i.project?"global-instance":"local-instance"}function Eu(i,e){const t=[];if(i.type===n.Project)t.push(...i.variableDeclarations);else{const a=gt(Me(i)).filter(s=>s.type===n.VariableDeclaration);t.push(...a),i.parent&&(pt.includes(i.parent.type)||i.parent.type===n.Project)&&t.push(...Eu(i.parent))}return t}function R2(i){return i.replace(/(?:^\w|[A-Z]|\b\w)/g,function(e,t){return t===0?e.toLowerCase():e.toUpperCase()}).replace(/\s+/g,"")}function g2(i){return i.split(/\s+/).map(r=>r[0].toUpperCase()+r.slice(1).toLowerCase()).join("")}function CP(i){var e;return(e=i.match(/[A-Z]{2,}(?=[A-Z][a-z]+[0-9]*|\b)|[A-Z]?[a-z]+[0-9]*|[A-Z]|[0-9]+/g))==null?void 0:e.map(t=>t.toLowerCase()).join("-")}function Mo(i){return CP(i).toLowerCase()}function ka(i){var e,t;if(!i)return"Any data type";if(!i.entity){const r=i.isList;if(!((e=i.andChildrenGroup)!=null&&e.length)&&!((t=i.orChildrenGroup)!=null&&t.length))return r?"List of an any data type":"Any data type";let a="",s=!1,o=!1;return(i.andChildrenGroup||[]).forEach(l=>{const p=ka(l),y=_o(p);s&&(a+=" and "),l.isGroup?a+="("+y+")":s?a+=y:a+=p,s=!0,o=!0}),(i.orChildrenGroup||[]).forEach(l=>{const p=ka(l),y=_o(p);s&&(o&&(a+=","),a+=" or "),l.isGroup?a+="("+y+")":s?a+=y:a+=p,s=!0}),a}if(i.entity.type===n.PrimitiveEntity){let r=i.entity.name;switch(i.entity.name){case I.String:r="Text";break;case I.KeyValue:r="Data structure";break}return i.isList?`List of ${r}s`:`${r.slice(0,1).toUpperCase()}${r.slice(1)}`}else if(i.entity.type===n.CustomEntity){const r=C(i.entity,i.project);return i.isList?`List of ${r} entities`:r.slice(0,1).toUpperCase()+r.slice(1)}else if(i.entity.type===n.BuiltInBaseEntity){const r=wP(i.entity);return i.isList?`List of ${r} entities`:r.slice(0,1).toUpperCase()+r.slice(1)}else return i.isList?`List of ${i.entity.name} entities`:`${i.entity.name.slice(0,1).toUpperCase()+i.entity.name.slice(1)} entity`}function v2(i){if(!i)return"Any data type";const e=i.getDataType();return ka(e)}function Vo(i){switch(i.declaration.id){case $e.Equal:return"is equal to";case $e.NotEqual:return"is not equal to";case $e.MoreThan:return"is greater than";case $e.MoreThanOrEqual:return"is greater than or equal to";case $e.LessThan:return"is less than";case $e.LessThanOrEqual:return"is less than or equal to";case $e.And:return"and";case $e.Or:return"or";case Gt.Empty:return"is empty";case Gt.NotEmpty:return"is not empty"}}function BP(i){return i.includes(V.HTTP_ENDPOINT)?"HTTP endpoint":i.includes(V.PERSISTED_ENTITY)?"Persisted entity":i.includes(V.CRON_JOB)?"Scheduled execution":i.includes(V.RELATIONAL_DATABASE)?"Relational database":"Entity"}function wP(i){switch(i.name){case V.HTTP_ENDPOINT:return"HTTP endpoint";case V.PERSISTED_ENTITY:return"Persisted entity";case V.CRON_JOB:return"Scheduled execution";case V.RELATIONAL_DATABASE:return"Relational database"}return"Entity"}function I2(i){const e=Wu(i);if(!e){const t=Ju(i);return t.includes(V.HTTP_ENDPOINT)?"HTTP endpoint":t.includes(V.PERSISTED_ENTITY)?"Persisted entity":t.includes(V.CRON_JOB)?"Scheduled execution":t.includes(V.RELATIONAL_DATABASE)?"Relational database":C(i,i.project)+" entity"}return C(e,i.project)+" entity"}function _P(i){let e="Find ";return i.outputsDeclarations.forEach((t,r)=>{const a=No(t),s=_o(a&&a.entity?C(a.entity,i.project):"unstructured data");r===0?e+=`${s} `:r===i.outputsDeclarations.length-1?e+=`and ${s} `:e+=`, ${s} `}),e}function NP(i){switch(i.name){case I.String:return"Text";case I.Number:return"Number";case I.Boolean:return"Boolean";case I.KeyValue:return"Data structure";case I.UUID:return"Unique identifier";case I.Date:return"Date";case I.EntityTemplate:return"Entity as template";case I.Enum:return"Enumeration";case I.File:return"File";case I.Null:return"Empty";case I.ActionDescriptor:return"Action descriptor";case I.Untyped:return"Untyped";default:return i.name}}function MP(i){switch(i.id){case $.List:return"Loop over list items";case $.ManualFlow:return"Manual flow control loop";case $.ObjectKeys:return"Loop over object keys";case $.ObjectValues:return"Loop over object values";case $.Counted:return"Loop given number of times";case $.String:return"Loop over text characters";case Te.Addition:return"Sum numbers";case Te.Subtraction:return"Subtract numbers";case Te.Multiplication:return"Multiply numbers";case Te.Division:return"Divide numbers";case Te.Remainder:return"Get remainder of numbers";case Te.Exponentiation:return"Get exponent of numbers";case X.AddIndex:return"Add at index position";case X.DeleteFirst:return"Delete first character";case X.DeleteLast:return"Delete last character";case X.DeleteIndex:return"Delete at index position";case X.Join:return"Join texts";case X.ReplaceAllMatches:return"Replace all matches";case X.ReplaceFirst:return"Replace first match";case X.ReplaceLast:return"Replace last match";case X.Split:return"Split text";case X.ReplaceIndex:return"Replace at index position";case X.ReplaceSingleMatch:return"Replace single match";case X.GetFirst:return"Get first character";case X.GetLast:return"Get last character";case X.GetIndex:return"Get at index position";case X.Append:return"Add at the end";case X.Prepend:return"Add at the start";case le.Wait:return"Wait";case le.Parallel:return"Run in parallel";case le.Sequential:return"Run in sequence";case tt.HttpRequest:return"HTTP request";case ce.CreateNewInstance:return"Create new copy of entity";case H.AddIndex:return"Add item at index position";case H.DeleteFirst:return"Delete first item";case H.DeleteLast:return"Delete last item";case H.DeleteIndex:return"Delete item at index position";case H.Join:return"Join lists";case H.ReplaceAllMatches:return"Replace all matches";case H.ReplaceFirst:return"Replace first match";case H.ReplaceLast:return"Replace last match";case H.Split:return"Split list";case H.ReplaceIndex:return"Replace at index position";case H.ReplaceSingleMatch:return"Replace single match";case H.GetFirst:return"Get first item";case H.GetLast:return"Get last item";case H.GetIndex:return"Get item at index position";case H.Append:return"Add item at the end";case H.Prepend:return"Add item at the start";case fn.PROJECT_PUBLICATION_COMPLETED:return"Project publication completed";default:return(i.name.slice(0,1).toUpperCase()+i.name.slice(1)).replaceAll("-"," ")}}function C(i,e){var t;if(n.FunctionDeclaration===i.type){const r=i.name;if(Object.values(Bt).includes(r))switch(r){case Bt.AbortExecution:return"Abort execution";case Bt.DeletePersistedEntity:return"Delete persisted entity";case Bt.SoftDeletePersistedEntity:return"Soft delete persisted entity";default:return wo(i.type).replaceAll("-"," ")}return r}if(n.BuiltInBaseEntity===i.type)return BP([i.name]);if(Qu.includes(i.type)&&i.type!==n.ActionDescriptor)return i.name;switch(i.type){case n.Search:return _P(i);case n.Operation:case n.InternalCall:case n.Loop:const r=Lt(i.declaration,e);return C(r,e);case n.ActionDescriptor:return MP(i);case n.BreakStatement:const a=Lt(i.parent,e);return`Stop loop ${C(a,e)}`;case n.ContinueStatement:const s=Lt(i.parent,e);return`Execute next iteration of ${C(s,e)}`;case n.FunctionCall:return Lt(i.declaration,e).name;case n.Condition:{const l=i;if((t=i.inputs)!=null&&t.length){const p=C(l.inputs[0],l.project);if(l.inputs[1]){const y=l.inputs[1].declaration.name;return`If ${p} ${Vo(l)} ${y}`}return`If ${p} ${Vo(l)}`}else return`If ${Vo(l)}`}case n.ReturnStatement:{const l=Lt(i.parent,e);return`Output of ${C(l,e)}`}case n.InputMap:if(i.declaration){const l=Lt(i.declaration,e);return C(l,e)||""}else return i.name||"";case n.VariableInstance:{const l=Lt(i.declaration,e);return C(l,e)||""}case n.OutputMap:if(i.declaration){const l=Lt(i.declaration,e);return(l==null?void 0:l.name)||""}else return"";case n.PrimitiveEntity:case n.LiteralValue:return NP(i);default:return wo(i.type).replaceAll("-"," ")}}function Lo(i,e){const t=[];i.name||t.push(new b({id:`${i.id}--${S.EmptyName}`,message:`Entity with id "${i.id}" and type "${i.type}" has an empty name. Please provide a 'name' string.`,severity:T.Error,code:S.EmptyName,issue:null}));const r=e.entities.filter(a=>a.name===i.name);return r.length&&t.push(new b({id:`${i.id}--${S.NameNotUniqueInScope}`,message:`Entity with id "${i.id}" and type "${i.type}" has a name "${i.name}" that is not unique in the project. Entity with id "${r[0].id}" has the same name.
|
|
36
|
+
`+s+"}",p}function N5(i,e,t){e=Fa(e);var r=e.length;if(!r)return bt(t)?t.call(i):t;for(var a=0;a<r;a++){var s=i==null?void 0:i[e[a]];s===void 0&&(s=t,a=r),i=bt(s)?s.call(i):s}return i}var M5=0;function V5(i){var e=++M5+"";return i?i+e:e}function L5(i){var e=se(i);return e._chain=!0,e}function eP(i,e,t,r,a){if(!(r instanceof e))return i.apply(t,a);var s=HD(i.prototype),o=i.apply(s,a);return Zn(o)?o:s}var Bi=At(function(i,e){var t=Bi.placeholder,r=function(){for(var a=0,s=e.length,o=Array(s),l=0;l<s;l++)o[l]=e[l]===t?arguments[a++]:e[l];for(;a<arguments.length;)o.push(arguments[a++]);return eP(i,r,this,this,o)};return r});Bi.placeholder=se;const tP=At(function(i,e,t){if(!bt(i))throw new TypeError("Bind must be called on a function");var r=At(function(a){return eP(i,r,e,this,t.concat(a))});return r}),Mt=ND(Ot);function Cr(i,e,t,r){if(r=r||[],!e&&e!==0)e=1/0;else if(e<=0)return r.concat(i);for(var a=r.length,s=0,o=Ot(i);s<o;s++){var l=i[s];if(Mt(l)&&(Sr(l)||Hd(l)))if(e>1)Cr(l,e-1,t,r),a=r.length;else for(var p=0,y=l.length;p<y;)r[a++]=l[p++];else t||(r[a++]=l)}return r}const G5=At(function(i,e){e=Cr(e,!1,!1);var t=e.length;if(t<1)throw new Error("bindAll must be passed function names");for(;t--;){var r=e[t];i[r]=tP(i[r],i)}return i});function $5(i,e){var t=function(r){var a=t.cache,s=""+(e?e.apply(this,arguments):r);return Kn(a,s)||(a[s]=i.apply(this,arguments)),a[s]};return t.cache={},t}const nP=At(function(i,e,t){return setTimeout(function(){return i.apply(null,t)},e)}),F5=Bi(nP,se,1);function U5(i,e,t){var r,a,s,o,l=0;t||(t={});var p=function(){l=t.leading===!1?0:ja(),r=null,o=i.apply(a,s),r||(a=s=null)},y=function(){var h=ja();!l&&t.leading===!1&&(l=h);var m=e-(h-l);return a=this,s=arguments,m<=0||m>e?(r&&(clearTimeout(r),r=null),l=h,o=i.apply(a,s),r||(a=s=null)):!r&&t.trailing!==!1&&(r=setTimeout(p,m)),o};return y.cancel=function(){clearTimeout(r),l=0,r=a=s=null},y}function x5(i,e,t){var r,a,s,o,l,p=function(){var h=ja()-a;e>h?r=setTimeout(p,e-h):(r=null,t||(o=i.apply(l,s)),r||(s=l=null))},y=At(function(h){return l=this,s=h,a=ja(),r||(r=setTimeout(p,e),t&&(o=i.apply(l,s))),o});return y.cancel=function(){clearTimeout(r),r=s=l=null},y}function j5(i,e){return Bi(e,i)}function su(i){return function(){return!i.apply(this,arguments)}}function k5(){var i=arguments,e=i.length-1;return function(){for(var t=e,r=i[e].apply(this,arguments);t--;)r=i[t].call(this,r);return r}}function q5(i,e){return function(){if(--i<1)return e.apply(this,arguments)}}function rP(i,e){var t;return function(){return--i>0&&(t=e.apply(this,arguments)),i<=1&&(e=null),t}}const J5=Bi(rP,2);function iP(i,e,t){e=St(e,t);for(var r=Qe(i),a,s=0,o=r.length;s<o;s++)if(a=r[s],e(i[a],a,i))return a}function aP(i){return function(e,t,r){t=St(t,r);for(var a=Ot(e),s=i>0?0:a-1;s>=0&&s<a;s+=i)if(t(e[s],s,e))return s;return-1}}const ou=aP(1),sP=aP(-1);function oP(i,e,t,r){t=St(t,r,1);for(var a=t(e),s=0,o=Ot(i);s<o;){var l=Math.floor((s+o)/2);t(i[l])<a?s=l+1:o=l}return s}function lP(i,e,t){return function(r,a,s){var o=0,l=Ot(r);if(typeof s=="number")i>0?o=s>=0?s:Math.max(s+l,o):l=s>=0?Math.min(s+1,l):s+l+1;else if(t&&s&&l)return s=t(r,a),r[s]===a?s:-1;if(a!==a)return s=e(Va.call(r,o,l),wD),s>=0?s+o:-1;for(s=i>0?o:l-1;s>=0&&s<l;s+=i)if(r[s]===a)return s;return-1}}const cP=lP(1,ou,oP),W5=lP(-1,sP);function lu(i,e,t){var r=Mt(i)?ou:iP,a=r(i,e,t);if(a!==void 0&&a!==-1)return i[a]}function H5(i,e){return lu(i,Ua(e))}function Sn(i,e,t){e=xa(e,t);var r,a;if(Mt(i))for(r=0,a=i.length;r<a;r++)e(i[r],r,i);else{var s=Qe(i);for(r=0,a=s.length;r<a;r++)e(i[s[r]],s[r],i)}return i}function Br(i,e,t){e=St(e,t);for(var r=!Mt(i)&&Qe(i),a=(r||i).length,s=Array(a),o=0;o<a;o++){var l=r?r[o]:o;s[o]=e(i[l],l,i)}return s}function dP(i){var e=function(t,r,a,s){var o=!Mt(t)&&Qe(t),l=(o||t).length,p=i>0?0:l-1;for(s||(a=t[o?o[p]:p],p+=i);p>=0&&p<l;p+=i){var y=o?o[p]:p;a=r(a,t[y],y,t)}return a};return function(t,r,a,s){var o=arguments.length>=3;return e(t,xa(r,s,4),a,o)}}const cu=dP(1),uP=dP(-1);function wi(i,e,t){var r=[];return e=St(e,t),Sn(i,function(a,s,o){e(a,s,o)&&r.push(a)}),r}function Y5(i,e,t){return wi(i,su(St(e)),t)}function pP(i,e,t){e=St(e,t);for(var r=!Mt(i)&&Qe(i),a=(r||i).length,s=0;s<a;s++){var o=r?r[s]:s;if(!e(i[o],o,i))return!1}return!0}function yP(i,e,t){e=St(e,t);for(var r=!Mt(i)&&Qe(i),a=(r||i).length,s=0;s<a;s++){var o=r?r[s]:s;if(e(i[o],o,i))return!0}return!1}function Cn(i,e,t,r){return Mt(i)||(i=Ci(i)),(typeof t!="number"||r)&&(t=0),cP(i,e,t)>=0}const z5=At(function(i,e,t){var r,a;return bt(e)?a=e:(e=Fa(e),r=e.slice(0,-1),e=e[e.length-1]),Br(i,function(s){var o=a;if(!o){if(r&&r.length&&(s=eu(s,r)),s==null)return;o=s[e]}return o==null?o:o.apply(s,t)})});function du(i,e){return Br(i,nu(e))}function Z5(i,e){return wi(i,Ua(e))}function fP(i,e,t){var r=-1/0,a=-1/0,s,o;if(e==null||typeof e=="number"&&typeof i[0]!="object"&&i!=null){i=Mt(i)?i:Ci(i);for(var l=0,p=i.length;l<p;l++)s=i[l],s!=null&&s>r&&(r=s)}else e=St(e,t),Sn(i,function(y,h,m){o=e(y,h,m),(o>a||o===-1/0&&r===-1/0)&&(r=y,a=o)});return r}function K5(i,e,t){var r=1/0,a=1/0,s,o;if(e==null||typeof e=="number"&&typeof i[0]!="object"&&i!=null){i=Mt(i)?i:Ci(i);for(var l=0,p=i.length;l<p;l++)s=i[l],s!=null&&s<r&&(r=s)}else e=St(e,t),Sn(i,function(y,h,m){o=e(y,h,m),(o<a||o===1/0&&r===1/0)&&(r=y,a=o)});return r}var X5=/[^\ud800-\udfff]|[\ud800-\udbff][\udc00-\udfff]|[\ud800-\udfff]/g;function hP(i){return i?Sr(i)?Va.call(i):qd(i)?i.match(X5):Mt(i)?Br(i,tu):Ci(i):[]}function mP(i,e,t){if(e==null||t)return Mt(i)||(i=Ci(i)),i[iu(i.length-1)];var r=hP(i),a=Ot(r);e=Math.max(Math.min(e,a),0);for(var s=a-1,o=0;o<e;o++){var l=iu(o,s),p=r[o];r[o]=r[l],r[l]=p}return r.slice(0,e)}function Q5(i){return mP(i,1/0)}function e2(i,e,t){var r=0;return e=St(e,t),du(Br(i,function(a,s,o){return{value:a,index:r++,criteria:e(a,s,o)}}).sort(function(a,s){var o=a.criteria,l=s.criteria;if(o!==l){if(o>l||o===void 0)return 1;if(o<l||l===void 0)return-1}return a.index-s.index}),"value")}function Co(i,e){return function(t,r,a){var s=e?[[],[]]:{};return r=St(r,a),Sn(t,function(o,l){var p=r(o,l,t);i(s,o,p)}),s}}const t2=Co(function(i,e,t){Kn(i,t)?i[t].push(e):i[t]=[e]}),n2=Co(function(i,e,t){i[t]=e}),r2=Co(function(i,e,t){Kn(i,t)?i[t]++:i[t]=1}),i2=Co(function(i,e,t){i[t?0:1].push(e)},!0);function a2(i){return i==null?0:Mt(i)?i.length:Qe(i).length}function s2(i,e,t){return e in t}const TP=At(function(i,e){var t={},r=e[0];if(i==null)return t;bt(r)?(e.length>1&&(r=xa(r,e[1])),e=$a(i)):(r=s2,e=Cr(e,!1,!1),i=Object(i));for(var a=0,s=e.length;a<s;a++){var o=e[a],l=i[o];r(l,o,i)&&(t[o]=l)}return t}),o2=At(function(i,e){var t=e[0],r;return bt(t)?(t=su(t),e.length>1&&(r=e[1])):(e=Br(Cr(e,!1,!1),String),t=function(a,s){return!Cn(e,s)}),TP(i,t,r)});function EP(i,e,t){return Va.call(i,0,Math.max(0,i.length-(e==null||t?1:e)))}function uu(i,e,t){return i==null||i.length<1?e==null||t?void 0:[]:e==null||t?i[0]:EP(i,i.length-e)}function Bo(i,e,t){return Va.call(i,e==null||t?1:e)}function l2(i,e,t){return i==null||i.length<1?e==null||t?void 0:[]:e==null||t?i[i.length-1]:Bo(i,Math.max(0,i.length-e))}function c2(i){return wi(i,Boolean)}function d2(i,e){return Cr(i,e,!1)}const bP=At(function(i,e){return e=Cr(e,!0,!0),wi(i,function(t){return!Cn(e,t)})}),u2=At(function(i,e){return bP(i,e)});function pu(i,e,t,r){DD(e)||(r=t,t=e,e=!1),t!=null&&(t=St(t,r));for(var a=[],s=[],o=0,l=Ot(i);o<l;o++){var p=i[o],y=t?t(p,o,i):p;e&&!t?((!o||s!==y)&&a.push(p),s=y):t?Cn(s,y)||(s.push(y),a.push(p)):Cn(a,p)||a.push(p)}return a}const p2=At(function(i){return pu(Cr(i,!0,!0))});function y2(i){for(var e=[],t=arguments.length,r=0,a=Ot(i);r<a;r++){var s=i[r];if(!Cn(e,s)){var o;for(o=1;o<t&&Cn(arguments[o],s);o++);o===t&&e.push(s)}}return e}function yu(i){for(var e=i&&fP(i,Ot).length||0,t=Array(e),r=0;r<e;r++)t[r]=du(i,r);return t}const f2=At(yu);function h2(i,e){for(var t={},r=0,a=Ot(i);r<a;r++)e?t[i[r]]=e[r]:t[i[r][0]]=i[r][1];return t}function m2(i,e,t){e==null&&(e=i||0,i=0),t||(t=e<i?-1:1);for(var r=Math.max(Math.ceil((e-i)/t),0),a=Array(r),s=0;s<r;s++,i+=t)a[s]=i;return a}function T2(i,e){if(e==null||e<1)return[];for(var t=[],r=0,a=i.length;r<a;)t.push(Va.call(i,r,r+=e));return t}function fu(i,e){return i._chain?se(e).chain():e}function RP(i){return Sn(Xd(i),function(e){var t=se[e]=i[e];se.prototype[e]=function(){var r=[this._wrapped];return j3.apply(r,arguments),fu(this,t.apply(se,r))}}),se}Sn(["pop","push","reverse","shift","sort","splice","unshift"],function(i){var e=Po[i];se.prototype[i]=function(){var t=this._wrapped;return t!=null&&(e.apply(t,arguments),(i==="shift"||i==="splice")&&t.length===0&&delete t[0]),fu(this,t)}}),Sn(["concat","join","slice"],function(i){var e=Po[i];se.prototype[i]=function(){var t=this._wrapped;return t!=null&&(t=e.apply(t,arguments)),fu(this,t)}});var gP=RP(Object.freeze(Object.defineProperty({__proto__:null,VERSION:fD,after:q5,all:pP,allKeys:$a,any:yP,assign:So,before:rP,bind:tP,bindAll:G5,chain:L5,chunk:T2,clone:E5,collect:Br,compact:c2,compose:k5,constant:_D,contains:Cn,countBy:r2,create:T5,debounce:x5,default:se,defaults:WD,defer:F5,delay:nP,detect:lu,difference:bP,drop:Bo,each:Sn,escape:D5,every:pP,extend:JD,extendOwn:So,filter:wi,find:lu,findIndex:ou,findKey:iP,findLastIndex:sP,findWhere:H5,first:uu,flatten:d2,foldl:cu,foldr:uP,forEach:Sn,functions:Xd,get:zD,groupBy:t2,has:R5,head:uu,identity:tu,include:Cn,includes:Cn,indexBy:n2,indexOf:cP,initial:EP,inject:cu,intersection:y2,invert:qD,invoke:z5,isArguments:Hd,isArray:Sr,isArrayBuffer:OD,isBoolean:DD,isDataView:Ao,isDate:K3,isElement:Z3,isEmpty:Ga,isEqual:l5,isError:Q3,isFinite:r5,isFunction:bt,isMap:u5,isMatch:GD,isNaN:wD,isNull:z3,isNumber:PD,isObject:Zn,isRegExp:X3,isSet:y5,isString:qd,isSymbol:AD,isTypedArray:VD,isUndefined:ID,isWeakMap:p5,isWeakSet:f5,iteratee:ru,keys:Qe,last:l2,lastIndexOf:W5,map:Br,mapObject:g5,matcher:Ua,matches:Ua,max:fP,memoize:$5,methods:Xd,min:K5,mixin:RP,negate:su,noop:KD,now:ja,object:h2,omit:o2,once:J5,pairs:h5,partial:Bi,partition:i2,pick:TP,pluck:du,property:nu,propertyOf:v5,random:iu,range:m2,reduce:cu,reduceRight:uP,reject:Y5,rest:Bo,restArguments:At,result:N5,sample:mP,select:wi,shuffle:Q5,size:a2,some:yP,sortBy:e2,sortedIndex:oP,tail:Bo,take:uu,tap:b5,template:_5,templateSettings:O5,throttle:U5,times:I5,toArray:hP,toPath:YD,transpose:yu,unescape:A5,union:p2,uniq:pu,unique:pu,uniqueId:V5,unzip:yu,values:Ci,where:Z5,without:u2,wrap:j5,zip:f2},Symbol.toStringTag,{value:"Module"})));gP._=gP;function wo(i){return i.charAt(0).toUpperCase()+i.slice(1)}function _o(i){return i.charAt(0).toLowerCase()+i.slice(1)}function vP(i,e){if(i.type!==n.Property||e.type!==n.Property)throw new Error(`Expected property entities for comparison. But got ${i.type} and ${e.type}.`);return i===e||i.id===e.id?!0:i.name!==e.name||i.static!==e.static||i.abstract!==e.abstract?!1:kt(i.dataType,e.dataType).compatible}function IP(i,e){if(i.type!==n.CustomEntity||e.type!==n.CustomEntity)throw new Error(`Expected custom entities for comparison. But got ${i.type} and ${e.type}.`);if(i===e||i.id===e.id)return!0;if(i.properties.length!==e.properties.length)return!1;let t=[...e.properties];const r=[];for(let a=0;a<i.properties.length;a++){const s=i.properties[a];t.find(l=>{const p=vP(s,l);return p&&(t=t.filter(y=>y.id!==l.id)),p})||r.push(s)}return!(r.length>0)}var jt=(i=>(i.BothUnconstrained="both-unconstrained",i.AConstraintBUnconstrained="a-constraint-b-unconstrained",i.BConstraintAUnconstrained="b-constraint-a-unconstrained",i.Same="same",i.AIsListBIsNot="a-is-list-b-is-not",i.BIsListAIsNot="b-is-list-a-is-not",i.AIsNullableBIsNot="a-is-nullable-b-is-not",i.BIsNullableAIsNot="b-is-nullable-a-is-not",i.AIsTemplateBIsNot="a-is-template-b-is-not",i.BIsTemplateAIsNot="b-is-template-a-is-not",i.BothUntyped="both-untyped",i.AIsUntypedBIsNot="a-is-untyped-b-is-not",i.BIsUntypedAIsNot="b-is-untyped-a-is-not",i.TypeEntityMismatch="type-entity-mismatch",i.SameCustomEntities="same-custom-entities",i.CompatibleCustomEntities="compatible-custom-entities",i.IncompatibleCustomEntities="incompatible-custom-entities",i.SamePrimitiveEntities="same-primitive-entities",i.IncompatiblePrimitiveEntities="incompatible-primitive-entities",i.SameBuiltInBaseEntities="same-built-in-base-entities",i.IncompatibleBuiltInBaseEntities="incompatible-built-in-base-entities",i.CheckUnknown="check-unknown",i))(jt||{});function kt(i,e){var t,r,a,s,o,l,p,y,h,m,R;if(i&&i.type!==n.DataType||e&&e.type!==n.DataType)throw new Error(`Expected data-type entities for comparison. But got ${i==null?void 0:i.type} and ${e==null?void 0:e.type}.`);if(i===null&&e===null)return{compatible:!0,type:"both-unconstrained"};if(i===null)return{compatible:!0,type:"a-constraint-b-unconstrained"};if(e===null)return{compatible:!0,type:"b-constraint-a-unconstrained"};if(i===e)return{compatible:!0,type:"same"};if(i.id===e.id)return{compatible:!0,type:"same"};if(i.isList!==e.isList)return{compatible:!1,type:i.isList?"a-is-list-b-is-not":"b-is-list-a-is-not"};if(i.isNullable!==e.isNullable)return{compatible:!1,type:i.isNullable?"a-is-nullable-b-is-not":"b-is-nullable-a-is-not"};if(i.asType!==e.asType)return{compatible:!1,type:i.asType?"a-is-template-b-is-not":"b-is-template-a-is-not"};if(!i.entity&&e.entity)return{compatible:!0,type:"a-is-untyped-b-is-not"};if(i.entity&&!e.entity)return{compatible:!0,type:"b-is-untyped-a-is-not"};if(!i.entity&&!e.entity)return{compatible:!0,type:"both-untyped"};if(((t=i.entity)==null?void 0:t.type)!==((r=e.entity)==null?void 0:r.type))return{compatible:!1,type:"type-entity-mismatch"};if(((a=i.entity)==null?void 0:a.type)===n.CustomEntity){if(((s=i.entity)==null?void 0:s.id)===((o=e.entity)==null?void 0:o.id))return{compatible:!0,type:"same-custom-entities"};const v=IP(i.entity,e.entity);return{compatible:v,type:v?"compatible-custom-entities":"incompatible-custom-entities"}}return((l=i.entity)==null?void 0:l.type)===n.PrimitiveEntity?((p=i.entity)==null?void 0:p.id)===((y=e.entity)==null?void 0:y.id)?{compatible:!0,type:"same-primitive-entities"}:{compatible:!1,type:"incompatible-primitive-entities"}:((h=i.entity)==null?void 0:h.type)===n.BuiltInBaseEntity?((m=i.entity)==null?void 0:m.id)===((R=e.entity)==null?void 0:R.id)?{compatible:!0,type:"same-built-in-base-entities"}:{compatible:!1,type:"incompatible-built-in-base-entities"}:{compatible:!1,type:"check-unknown"}}function E2(i){const e=i.project.builtInBaseEntities.find(a=>a.id===V.EXECUTION),t={id:i.id+"--infered-data-type",version:1,type:n.DataType,isList:!1,isNullable:!1,andChildrenGroup:null,orChildrenGroup:null,asType:!1,entity:null,constant:!1,defaultValue:null,parent:null},r=g(t,i.project);return r.inferred=!0,r.sync(t),r.setParent(i),r.entity=e,r}function DP(i){return i.dataType?i.dataType:null}function hu(i){var t;const e=(t=i.declaration)==null?void 0:t.getDataType();return e&&e.isResolved?e:i.readsValue?un(i.readsValue):null}function mu(i){return i.dataType&&!i.dataType.inferred&&i.dataType.isResolved?i.dataType:i.readsValue?un(i.readsValue):null}function PP(i){return un(i.declaration)}function AP(i){return i.dataType&&!i.dataType.inferred?i.dataType:(i.dataType&&i.dataType.inferred,i.inferDataTypeAndSyncInstancesInputsAndOutputs(),i.dataType)}function Tu(i){var e;return((e=i.declaration)==null?void 0:e.dataType)||null}function OP(i){return(i==null?void 0:i.dataType)||null}function SP(i){return(i==null?void 0:i.dataType)||null}function un(i){switch(i.type){case n.VariableDeclaration:return AP(i);case n.ArgumentDeclaration:return DP(i);case n.ReturnDeclaration:return mu(i);case n.VariableInstance:return PP(i);case n.InputMap:return hu(i);case n.OutputMap:return Tu(i);case n.Property:return OP(i);case n.ValueDescriptor:return SP(i);default:throw new Error(`Cannot infer data type from entity of type ${i.type}.`)}}function No(i){switch(i.type){case n.ArgumentDeclaration:return i.getDataType();case n.InputMap:return i.getDataType();case n.VariableDeclaration:return i.getDataType();case n.VariableInstance:return i.getDataType();case n.OutputMap:return i.getDataType();case n.ReturnDeclaration:return i.getDataType();case n.Property:return i.getDataType();case n.ValueDescriptor:return i.getDataType();default:return null}}function N(i){if(i){let e=null;return typeof i=="string"?e=i:i.entityId?e=i.entityId:i.type!==n.GenericReference&&(e=i.id),e}return null}function wr(i){return i.declaration||i}function b2(i){return i.type===n.VariableDeclaration?i.parent===i.project?"global-declaration":"local-declaration":i.declaration.parent===i.project?"global-instance":"local-instance"}function Eu(i,e){const t=[];if(i.type===n.Project)t.push(...i.variableDeclarations);else{const a=gt(Me(i)).filter(s=>s.type===n.VariableDeclaration);t.push(...a),i.parent&&(pt.includes(i.parent.type)||i.parent.type===n.Project)&&t.push(...Eu(i.parent))}return t}function R2(i){return i.split(/[\s-]+/).filter(r=>r.length>0).map((r,a)=>a===0?r.toLowerCase():r[0].toUpperCase()+r.slice(1).toLowerCase()).join("")}function g2(i){return i.split(/[\s-]+/).filter(r=>r.length>0).map(r=>r[0].toUpperCase()+r.slice(1).toLowerCase()).join("")}function CP(i){var e;return(e=i.match(/[A-Z]{2,}(?=[A-Z][a-z]+[0-9]*|\b)|[A-Z]?[a-z]+[0-9]*|[A-Z]|[0-9]+/g))==null?void 0:e.map(t=>t.toLowerCase()).join("-")}function Mo(i){return CP(i).toLowerCase()}function ka(i){var e,t;if(!i)return"Any data type";if(!i.entity){const r=i.isList;if(!((e=i.andChildrenGroup)!=null&&e.length)&&!((t=i.orChildrenGroup)!=null&&t.length))return r?"List of an any data type":"Any data type";let a="",s=!1,o=!1;return(i.andChildrenGroup||[]).forEach(l=>{const p=ka(l),y=_o(p);s&&(a+=" and "),l.isGroup?a+="("+y+")":s?a+=y:a+=p,s=!0,o=!0}),(i.orChildrenGroup||[]).forEach(l=>{const p=ka(l),y=_o(p);s&&(o&&(a+=","),a+=" or "),l.isGroup?a+="("+y+")":s?a+=y:a+=p,s=!0}),a}if(i.entity.type===n.PrimitiveEntity){let r=i.entity.name;switch(i.entity.name){case I.String:r="Text";break;case I.KeyValue:r="Data structure";break}return i.isList?`List of ${r}s`:`${r.slice(0,1).toUpperCase()}${r.slice(1)}`}else if(i.entity.type===n.CustomEntity){const r=C(i.entity,i.project);return i.isList?`List of ${r} entities`:r.slice(0,1).toUpperCase()+r.slice(1)}else if(i.entity.type===n.BuiltInBaseEntity){const r=wP(i.entity);return i.isList?`List of ${r} entities`:r.slice(0,1).toUpperCase()+r.slice(1)}else return i.isList?`List of ${i.entity.name} entities`:`${i.entity.name.slice(0,1).toUpperCase()+i.entity.name.slice(1)} entity`}function v2(i){if(!i)return"Any data type";const e=i.getDataType();return ka(e)}function Vo(i){switch(i.declaration.id){case $e.Equal:return"is equal to";case $e.NotEqual:return"is not equal to";case $e.MoreThan:return"is greater than";case $e.MoreThanOrEqual:return"is greater than or equal to";case $e.LessThan:return"is less than";case $e.LessThanOrEqual:return"is less than or equal to";case $e.And:return"and";case $e.Or:return"or";case Gt.Empty:return"is empty";case Gt.NotEmpty:return"is not empty"}}function BP(i){return i.includes(V.HTTP_ENDPOINT)?"HTTP endpoint":i.includes(V.PERSISTED_ENTITY)?"Persisted entity":i.includes(V.CRON_JOB)?"Scheduled execution":i.includes(V.RELATIONAL_DATABASE)?"Relational database":"Entity"}function wP(i){switch(i.name){case V.HTTP_ENDPOINT:return"HTTP endpoint";case V.PERSISTED_ENTITY:return"Persisted entity";case V.CRON_JOB:return"Scheduled execution";case V.RELATIONAL_DATABASE:return"Relational database"}return"Entity"}function I2(i){const e=Wu(i);if(!e){const t=Ju(i);return t.includes(V.HTTP_ENDPOINT)?"HTTP endpoint":t.includes(V.PERSISTED_ENTITY)?"Persisted entity":t.includes(V.CRON_JOB)?"Scheduled execution":t.includes(V.RELATIONAL_DATABASE)?"Relational database":C(i,i.project)+" entity"}return C(e,i.project)+" entity"}function _P(i){let e="Find ";return i.outputsDeclarations.forEach((t,r)=>{const a=No(t),s=_o(a&&a.entity?C(a.entity,i.project):"unstructured data");r===0?e+=`${s} `:r===i.outputsDeclarations.length-1?e+=`and ${s} `:e+=`, ${s} `}),e}function NP(i){switch(i.name){case I.String:return"Text";case I.Number:return"Number";case I.Boolean:return"Boolean";case I.KeyValue:return"Data structure";case I.UUID:return"Unique identifier";case I.Date:return"Date";case I.EntityTemplate:return"Entity as template";case I.Enum:return"Enumeration";case I.File:return"File";case I.Null:return"Empty";case I.ActionDescriptor:return"Action descriptor";case I.Untyped:return"Untyped";default:return i.name}}function MP(i){switch(i.id){case $.List:return"Loop over list items";case $.ManualFlow:return"Manual flow control loop";case $.ObjectKeys:return"Loop over object keys";case $.ObjectValues:return"Loop over object values";case $.Counted:return"Loop given number of times";case $.String:return"Loop over text characters";case Te.Addition:return"Sum numbers";case Te.Subtraction:return"Subtract numbers";case Te.Multiplication:return"Multiply numbers";case Te.Division:return"Divide numbers";case Te.Remainder:return"Get remainder of numbers";case Te.Exponentiation:return"Get exponent of numbers";case X.AddIndex:return"Add at index position";case X.DeleteFirst:return"Delete first character";case X.DeleteLast:return"Delete last character";case X.DeleteIndex:return"Delete at index position";case X.Join:return"Join texts";case X.ReplaceAllMatches:return"Replace all matches";case X.ReplaceFirst:return"Replace first match";case X.ReplaceLast:return"Replace last match";case X.Split:return"Split text";case X.ReplaceIndex:return"Replace at index position";case X.ReplaceSingleMatch:return"Replace single match";case X.GetFirst:return"Get first character";case X.GetLast:return"Get last character";case X.GetIndex:return"Get at index position";case X.Append:return"Add at the end";case X.Prepend:return"Add at the start";case le.Wait:return"Wait";case le.Parallel:return"Run in parallel";case le.Sequential:return"Run in sequence";case tt.HttpRequest:return"HTTP request";case ce.CreateNewInstance:return"Create new copy of entity";case H.AddIndex:return"Add item at index position";case H.DeleteFirst:return"Delete first item";case H.DeleteLast:return"Delete last item";case H.DeleteIndex:return"Delete item at index position";case H.Join:return"Join lists";case H.ReplaceAllMatches:return"Replace all matches";case H.ReplaceFirst:return"Replace first match";case H.ReplaceLast:return"Replace last match";case H.Split:return"Split list";case H.ReplaceIndex:return"Replace at index position";case H.ReplaceSingleMatch:return"Replace single match";case H.GetFirst:return"Get first item";case H.GetLast:return"Get last item";case H.GetIndex:return"Get item at index position";case H.Append:return"Add item at the end";case H.Prepend:return"Add item at the start";case fn.PROJECT_PUBLICATION_COMPLETED:return"Project publication completed";default:return(i.name.slice(0,1).toUpperCase()+i.name.slice(1)).replaceAll("-"," ")}}function C(i,e){var t;if(n.FunctionDeclaration===i.type){const r=i.name;if(Object.values(Bt).includes(r))switch(r){case Bt.AbortExecution:return"Abort execution";case Bt.DeletePersistedEntity:return"Delete persisted entity";case Bt.SoftDeletePersistedEntity:return"Soft delete persisted entity";default:return wo(i.type).replaceAll("-"," ")}return r}if(n.BuiltInBaseEntity===i.type)return BP([i.name]);if(Qu.includes(i.type)&&i.type!==n.ActionDescriptor)return i.name;switch(i.type){case n.Search:return _P(i);case n.Operation:case n.InternalCall:case n.Loop:const r=Lt(i.declaration,e);return C(r,e);case n.ActionDescriptor:return MP(i);case n.BreakStatement:const a=Lt(i.parent,e);return`Stop loop ${C(a,e)}`;case n.ContinueStatement:const s=Lt(i.parent,e);return`Execute next iteration of ${C(s,e)}`;case n.FunctionCall:return Lt(i.declaration,e).name;case n.Condition:{const l=i;if((t=i.inputs)!=null&&t.length){const p=C(l.inputs[0],l.project);if(l.inputs[1]){const y=l.inputs[1].declaration.name;return`If ${p} ${Vo(l)} ${y}`}return`If ${p} ${Vo(l)}`}else return`If ${Vo(l)}`}case n.ReturnStatement:{const l=Lt(i.parent,e);return`Output of ${C(l,e)}`}case n.InputMap:if(i.declaration){const l=Lt(i.declaration,e);return C(l,e)||""}else return i.name||"";case n.VariableInstance:{const l=Lt(i.declaration,e);return C(l,e)||""}case n.OutputMap:if(i.declaration){const l=Lt(i.declaration,e);return(l==null?void 0:l.name)||""}else return"";case n.PrimitiveEntity:case n.LiteralValue:return NP(i);default:return wo(i.type).replaceAll("-"," ")}}function Lo(i,e){const t=[];i.name||t.push(new b({id:`${i.id}--${S.EmptyName}`,message:`Entity with id "${i.id}" and type "${i.type}" has an empty name. Please provide a 'name' string.`,severity:T.Error,code:S.EmptyName,issue:null}));const r=e.entities.filter(a=>a.name===i.name);return r.length&&t.push(new b({id:`${i.id}--${S.NameNotUniqueInScope}`,message:`Entity with id "${i.id}" and type "${i.type}" has a name "${i.name}" that is not unique in the project. Entity with id "${r[0].id}" has the same name.
|
|
37
37
|
Please provide a unique 'name' string.`,severity:T.Error,code:S.NameNotUniqueInScope,issue:null})),t}function bu(i,e){const t=[];i.name||t.push(new b({id:`${i.id}--${S.EmptyName}`,message:`Entity with id "${i.id}" and type "${i.type}" has an empty name. Please provide a 'name' string.`,severity:T.Error,code:S.EmptyName,issue:null}));const r=i.parent?N(i.parent):null;let a=e;r&&(a=e.get(r));const s=[];a.type===n.CustomEntity?s.push(...a.methods.map(l=>l)):a.type===n.Project?s.push(...a.functions.map(l=>l)):a.type===n.Loop?a.body&&s.push(a.body):a.type===n.InstalledProject&&s.push(...a.functions.map(l=>l));const o=s.filter(l=>l.name===i.name);return o.length&&t.push(new b({id:`${i.id}--${S.NameNotUniqueInScope}`,message:`Entity with id "${i.id}" and type "${i.type}" has a name "${i.name}" that is not unique in ${a.type===n.Project?"the globally declared project scope":"its parent entity"}. Entity with id "${o[0].id}" has the same name.
|
|
38
38
|
Please provide a unique 'name' string.`,severity:T.Error,code:S.NameNotUniqueInScope,issue:null})),t}function Ru(i,e){const t=[];i.name||t.push(new b({id:`${i.id}--${S.EmptyName}`,message:`Entity with id "${i.id}" and type "${i.type}" has an empty name. Please provide a 'name' string.`,severity:T.Error,code:S.EmptyName,issue:null}));const r=i.parent&&Lt(i.parent,e)||e;if(!r)t.push(new b({id:`${i.id}--parent-reference--${f.ReferencedEntityNotFound}`,message:`The entity with id '${i.parent}' that isn't yet found in the project. Perhaps it should be created first. Or perhaps the ID is incorrect.`,severity:T.Error,code:f.ReferencedEntityNotFound,issue:null}));else{const s=Eu(r).filter(o=>o.name===i.name);s.length&&t.push(new b({id:`${i.id}--${S.NameNotUniqueInScope}`,message:`Entity with id "${i.id}" and type "${i.type}" has a name "${i.name}" that is not unique in its scope or higher scopes. Entity with id "${s[0].id}" has the same name.
|
|
39
39
|
Please provide a unique 'name' string.`,severity:T.Error,code:S.NameNotUniqueInScope,issue:null}))}return t}function gu(i,e){const t=[];i.name||t.push(new b({id:`${i.id}--${S.EmptyName}`,message:`Entity with id "${i.id}" and type "${i.type}" has an empty name. Please provide a 'name' string.`,severity:T.Error,code:S.EmptyName,issue:null}));const r=N(i.parent);if(!r)t.push(new b({id:`${i.id}--parent-reference--${f.InvalidReferenceObjectStructure}`,message:`Reference object at 'parent' property for entity with id "${i.id}" and type "${i.type}" is not a valid reference. A reference needs to be a 'id' string of an existing entity in the project.`,severity:T.Error,code:f.InvalidReferenceObjectStructure,issue:null}));else{const a=e.get(r);if(!a)t.push(new b({id:`${i.id}--parent-reference--${f.ReferencedEntityNotFound}`,message:`The entity with id '${r}' that isn't yet found in the project. Perhaps it should be created first. Or perhaps the ID is incorrect.`,severity:T.Error,code:f.ReferencedEntityNotFound,issue:null}));else{const o=a.properties.filter(l=>l.name===i.name);o.length&&t.push(new b({id:`${i.id}--${S.NameNotUniqueInScope}`,message:`Entity with id "${i.id}" and type "${i.type}" has a name "${i.name}" that is not unique among all properties in the parent entity. Entity with id "${o[0].id}" has the same name.
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@elyx-code/project-logic-tree",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.6112",
|
|
4
4
|
"author": "Sergio Herrero",
|
|
5
5
|
"license": "UNLICENSED",
|
|
6
6
|
"description": "An installable module which contains the type definitions and ephemeral state management for a projects' logic tree data structure",
|