@elyx-code/project-logic-tree 0.0.6243 → 0.0.6244

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 CHANGED
@@ -29147,7 +29147,7 @@ function Nl(r) {
29147
29147
  if (!r)
29148
29148
  return "Any data type";
29149
29149
  let a = "";
29150
- if (r.interactiveEntities === !1 ? a += ` but only definition nodes ${r.asType ? "as template " : ""}that don't include non-interactive built-in functionality` : r.interactiveEntities === !0 && (a += ` but only definition nodes ${r.asType ? "as template " : ""}that extend or implement non-interactive built-in functionality`), r.staticEntities === !1 ? a ? a += " and that aren't a single global copy instance" : a += ` but only definition nodes ${r.asType ? "as template " : ""}that aren't a single global copy instance` : r.staticEntities === !0 && (a ? a += " and that are a single global copy instance" : a += ` but only definition nodes ${r.asType ? "as template " : ""}that are a single global copy instance`), r.actionEntities === !1 ? a ? a += " including executable or action nodes" : a += ` but only executable or action nodes ${r.asType ? "as template " : ""}` : r.actionEntities === !0 && (a ? a += " and not executable or action nodes" : a += " but not executable or action nodes"), r.entity && (a = ""), r.asType && !a && !((e = r.andChildrenGroup) != null && e.length) && !((t = r.orChildrenGroup) != null && t.length) && (a = " as template"), !r.entity) {
29150
+ if (r.interactiveEntities === !1 ? a += ` but only definition nodes ${r.asType ? "as template " : ""}that don't include non-interactive built-in functionality` : r.interactiveEntities === !0 && (a += ` but only definition nodes ${r.asType ? "as template " : ""}that extend or implement interactive built-in functionality`), r.staticEntities === !1 ? a ? a += " and that aren't a single global copy instance" : a += ` but only definition nodes ${r.asType ? "as template " : ""}that aren't a single global copy instance` : r.staticEntities === !0 && (a ? a += " and that are a single global copy instance" : a += ` but only definition nodes ${r.asType ? "as template " : ""}that are a single global copy instance`), r.actionEntities === !1 ? a ? a += " excluding executable/action nodes" : a += ` excluding executable/action nodes ${r.asType ? "templates " : ""}` : r.actionEntities === !0 && (a ? a += " and not executable/action nodes" : a += " but not executable/action nodes"), r.entity && (a = ""), r.asType && !a && !((e = r.andChildrenGroup) != null && e.length) && !((t = r.orChildrenGroup) != null && t.length) && (a = " as template"), !r.entity) {
29151
29151
  const l = r.isList;
29152
29152
  if (!((i = r.andChildrenGroup) != null && i.length) && !((s = r.orChildrenGroup) != null && s.length))
29153
29153
  return l ? `List of an any data type${a}` : `Any data type${a}`;
@@ -33,7 +33,7 @@ __p+='`),u}),s+=`';
33
33
  `,l="obj";s=`var __t,__p='',__j=Array.prototype.join,print=function(){__p+=__j.call(arguments,'');};
34
34
  `+s+`return __p;
35
35
  `;var o;try{o=new Function(l,"_",s)}catch(u){throw u.source=s,u}var d=function(u){return o.call(this,u,Xe)};return d.source="function("+l+`){
36
- `+s+"}",d}function Nq(r,a,e){a=Pa(a);var t=a.length;if(!t)return Qt(e)?e.call(r):e;for(var i=0;i<t;i++){var s=r==null?void 0:r[a[i]];s===void 0&&(s=e,i=t),r=Qt(s)?s.call(r):s}return r}var Lq=0;function jq(r){var a=++Lq+"";return r?r+a:a}function Uq(r){var a=Xe(r);return a._chain=!0,a}function IO(r,a,e,t,i){if(!(t instanceof a))return r.apply(e,i);var s=fO(r.prototype),l=r.apply(s,i);return $r(l)?l:s}var Os=oi(function(r,a){var e=Os.placeholder,t=function(){for(var i=0,s=a.length,l=Array(s),o=0;o<s;o++)l[o]=a[o]===e?arguments[i++]:a[o];for(;i<arguments.length;)l.push(arguments[i++]);return IO(r,t,this,this,l)};return t});Os.placeholder=Xe;const AO=oi(function(r,a,e){if(!Qt(r))throw new TypeError("Bind must be called on a function");var t=oi(function(i){return IO(r,t,a,this,e.concat(i))});return t}),Ei=QD(li);function Ln(r,a,e,t){if(t=t||[],!a&&a!==0)a=1/0;else if(a<=0)return t.concat(r);for(var i=t.length,s=0,l=li(r);s<l;s++){var o=r[s];if(Ei(o)&&(Nn(o)||Yp(o)))if(a>1)Ln(o,a-1,e,t),i=t.length;else for(var d=0,u=o.length;d<u;)t[i++]=o[d++];else e||(t[i++]=o)}return t}const $q=oi(function(r,a){a=Ln(a,!1,!1);var e=a.length;if(e<1)throw new Error("bindAll must be passed function names");for(;e--;){var t=a[e];r[t]=AO(r[t],r)}return r});function gq(r,a){var e=function(t){var i=e.cache,s=""+(a?a.apply(this,arguments):t);return gr(i,s)||(i[s]=r.apply(this,arguments)),i[s]};return e.cache={},e}const bO=oi(function(r,a,e){return setTimeout(function(){return r.apply(null,e)},a)}),Gq=Os(bO,Xe,1);function Fq(r,a,e){var t,i,s,l,o=0;e||(e={});var d=function(){o=e.leading===!1?0:Va(),t=null,l=r.apply(i,s),t||(i=s=null)},u=function(){var y=Va();!o&&e.leading===!1&&(o=y);var c=a-(y-o);return i=this,s=arguments,c<=0||c>a?(t&&(clearTimeout(t),t=null),o=y,l=r.apply(i,s),t||(i=s=null)):!t&&e.trailing!==!1&&(t=setTimeout(d,c)),l};return u.cancel=function(){clearTimeout(t),o=0,t=i=s=null},u}function xq(r,a,e){var t,i,s,l,o,d=function(){var y=Va()-i;a>y?t=setTimeout(d,a-y):(t=null,e||(l=r.apply(o,s)),t||(s=o=null))},u=oi(function(y){return o=this,s=y,i=Va(),t||(t=setTimeout(d,a),e&&(l=r.apply(o,s))),l});return u.cancel=function(){clearTimeout(t),t=s=o=null},u}function kq(r,a){return Os(a,r)}function lc(r){return function(){return!r.apply(this,arguments)}}function Zq(){var r=arguments,a=r.length-1;return function(){for(var e=a,t=r[a].apply(this,arguments);e--;)t=r[e].call(this,t);return t}}function qq(r,a){return function(){if(--r<1)return a.apply(this,arguments)}}function RO(r,a){var e;return function(){return--r>0&&(e=a.apply(this,arguments)),r<=1&&(a=null),e}}const Jq=Os(RO,2);function DO(r,a,e){a=di(a,e);for(var t=Mt(r),i,s=0,l=t.length;s<l;s++)if(i=t[s],a(r[i],i,r))return i}function OO(r){return function(a,e,t){e=di(e,t);for(var i=li(a),s=r>0?0:i-1;s>=0&&s<i;s+=r)if(e(a[s],s,a))return s;return-1}}const dc=OO(1),PO=OO(-1);function wO(r,a,e,t){e=di(e,t,1);for(var i=e(a),s=0,l=li(r);s<l;){var o=Math.floor((s+l)/2);e(r[o])<i?s=o+1:l=o}return s}function CO(r,a,e){return function(t,i,s){var l=0,o=li(t);if(typeof s=="number")r>0?l=s>=0?s:Math.max(s+o,l):o=s>=0?Math.min(s+1,o):s+o+1;else if(e&&s&&o)return s=e(t,i),t[s]===i?s:-1;if(i!==i)return s=a(ba.call(t,l,o),KD),s>=0?s+l:-1;for(s=r>0?l:o-1;s>=0&&s<o;s+=r)if(t[s]===i)return s;return-1}}const VO=CO(1,dc,wO),Sq=CO(-1,PO);function uc(r,a,e){var t=Ei(r)?dc:DO,i=t(r,a,e);if(i!==void 0&&i!==-1)return r[i]}function Wq(r,a){return uc(r,wa(a))}function vr(r,a,e){a=Ca(a,e);var t,i;if(Ei(r))for(t=0,i=r.length;t<i;t++)a(r[t],t,r);else{var s=Mt(r);for(t=0,i=s.length;t<i;t++)a(r[s[t]],s[t],r)}return r}function jn(r,a,e){a=di(a,e);for(var t=!Ei(r)&&Mt(r),i=(t||r).length,s=Array(i),l=0;l<i;l++){var o=t?t[l]:l;s[l]=a(r[o],o,r)}return s}function BO(r){var a=function(e,t,i,s){var l=!Ei(e)&&Mt(e),o=(l||e).length,d=r>0?0:o-1;for(s||(i=e[l?l[d]:d],d+=r);d>=0&&d<o;d+=r){var u=l?l[d]:d;i=t(i,e[u],u,e)}return i};return function(e,t,i,s){var l=arguments.length>=3;return a(e,Ca(t,s,4),i,l)}}const pc=BO(1),_O=BO(-1);function Ps(r,a,e){var t=[];return a=di(a,e),vr(r,function(i,s,l){a(i,s,l)&&t.push(i)}),t}function zq(r,a,e){return Ps(r,lc(di(a)),e)}function MO(r,a,e){a=di(a,e);for(var t=!Ei(r)&&Mt(r),i=(t||r).length,s=0;s<i;s++){var l=t?t[s]:s;if(!a(r[l],l,r))return!1}return!0}function NO(r,a,e){a=di(a,e);for(var t=!Ei(r)&&Mt(r),i=(t||r).length,s=0;s<i;s++){var l=t?t[s]:s;if(a(r[l],l,r))return!0}return!1}function Tr(r,a,e,t){return Ei(r)||(r=Ds(r)),(typeof e!="number"||t)&&(e=0),VO(r,a,e)>=0}const Yq=oi(function(r,a,e){var t,i;return Qt(a)?i=a:(a=Pa(a),t=a.slice(0,-1),a=a[a.length-1]),jn(r,function(s){var l=i;if(!l){if(t&&t.length&&(s=ic(s,t)),s==null)return;l=s[a]}return l==null?l:l.apply(s,e)})});function cc(r,a){return jn(r,nc(a))}function Hq(r,a){return Ps(r,wa(a))}function LO(r,a,e){var t=-1/0,i=-1/0,s,l;if(a==null||typeof a=="number"&&typeof r[0]!="object"&&r!=null){r=Ei(r)?r:Ds(r);for(var o=0,d=r.length;o<d;o++)s=r[o],s!=null&&s>t&&(t=s)}else a=di(a,e),vr(r,function(u,y,c){l=a(u,y,c),(l>i||l===-1/0&&t===-1/0)&&(t=u,i=l)});return t}function Kq(r,a,e){var t=1/0,i=1/0,s,l;if(a==null||typeof a=="number"&&typeof r[0]!="object"&&r!=null){r=Ei(r)?r:Ds(r);for(var o=0,d=r.length;o<d;o++)s=r[o],s!=null&&s<t&&(t=s)}else a=di(a,e),vr(r,function(u,y,c){l=a(u,y,c),(l<i||l===1/0&&t===1/0)&&(t=u,i=l)});return t}var Xq=/[^\ud800-\udfff]|[\ud800-\udbff][\udc00-\udfff]|[\ud800-\udfff]/g;function jO(r){return r?Nn(r)?ba.call(r):Sp(r)?r.match(Xq):Ei(r)?jn(r,rc):Ds(r):[]}function UO(r,a,e){if(a==null||e)return Ei(r)||(r=Ds(r)),r[ac(r.length-1)];var t=jO(r),i=li(t);a=Math.max(Math.min(a,i),0);for(var s=i-1,l=0;l<a;l++){var o=ac(l,s),d=t[l];t[l]=t[o],t[o]=d}return t.slice(0,a)}function Qq(r){return UO(r,1/0)}function eJ(r,a,e){var t=0;return a=di(a,e),cc(jn(r,function(i,s,l){return{value:i,index:t++,criteria:a(i,s,l)}}).sort(function(i,s){var l=i.criteria,o=s.criteria;if(l!==o){if(l>o||l===void 0)return 1;if(l<o||o===void 0)return-1}return i.index-s.index}),"value")}function Ml(r,a){return function(e,t,i){var s=a?[[],[]]:{};return t=di(t,i),vr(e,function(l,o){var d=t(l,o,e);r(s,l,d)}),s}}const tJ=Ml(function(r,a,e){gr(r,e)?r[e].push(a):r[e]=[a]}),iJ=Ml(function(r,a,e){r[e]=a}),rJ=Ml(function(r,a,e){gr(r,e)?r[e]++:r[e]=1}),nJ=Ml(function(r,a,e){r[e?0:1].push(a)},!0);function sJ(r){return r==null?0:Ei(r)?r.length:Mt(r).length}function aJ(r,a,e){return a in e}const $O=oi(function(r,a){var e={},t=a[0];if(r==null)return e;Qt(t)?(a.length>1&&(t=Ca(t,a[1])),a=Oa(r)):(t=aJ,a=Ln(a,!1,!1),r=Object(r));for(var i=0,s=a.length;i<s;i++){var l=a[i],o=r[l];t(o,l,r)&&(e[l]=o)}return e}),oJ=oi(function(r,a){var e=a[0],t;return Qt(e)?(e=lc(e),a.length>1&&(t=a[1])):(a=jn(Ln(a,!1,!1),String),e=function(i,s){return!Tr(a,s)}),$O(r,e,t)});function gO(r,a,e){return ba.call(r,0,Math.max(0,r.length-(a==null||e?1:a)))}function fc(r,a,e){return r==null||r.length<1?a==null||e?void 0:[]:a==null||e?r[0]:gO(r,r.length-a)}function Nl(r,a,e){return ba.call(r,a==null||e?1:a)}function lJ(r,a,e){return r==null||r.length<1?a==null||e?void 0:[]:a==null||e?r[r.length-1]:Nl(r,Math.max(0,r.length-a))}function dJ(r){return Ps(r,Boolean)}function uJ(r,a){return Ln(r,a,!1)}const GO=oi(function(r,a){return a=Ln(a,!0,!0),Ps(r,function(e){return!Tr(a,e)})}),pJ=oi(function(r,a){return GO(r,a)});function yc(r,a,e,t){qD(a)||(t=e,e=a,a=!1),e!=null&&(e=di(e,t));for(var i=[],s=[],l=0,o=li(r);l<o;l++){var d=r[l],u=e?e(d,l,r):d;a&&!e?((!l||s!==u)&&i.push(d),s=u):e?Tr(s,u)||(s.push(u),i.push(d)):Tr(i,d)||i.push(d)}return i}const cJ=oi(function(r){return yc(Ln(r,!0,!0))});function fJ(r){for(var a=[],e=arguments.length,t=0,i=li(r);t<i;t++){var s=r[t];if(!Tr(a,s)){var l;for(l=1;l<e&&Tr(arguments[l],s);l++);l===e&&a.push(s)}}return a}function hc(r){for(var a=r&&LO(r,li).length||0,e=Array(a),t=0;t<a;t++)e[t]=cc(r,t);return e}const yJ=oi(hc);function hJ(r,a){for(var e={},t=0,i=li(r);t<i;t++)a?e[r[t]]=a[t]:e[r[t][0]]=r[t][1];return e}function mJ(r,a,e){a==null&&(a=r||0,r=0),e||(e=a<r?-1:1);for(var t=Math.max(Math.ceil((a-r)/e),0),i=Array(t),s=0;s<t;s++,r+=e)i[s]=r;return i}function vJ(r,a){if(a==null||a<1)return[];for(var e=[],t=0,i=r.length;t<i;)e.push(ba.call(r,t,t+=a));return e}function mc(r,a){return r._chain?Xe(a).chain():a}function FO(r){return vr(ec(r),function(a){var e=Xe[a]=r[a];Xe.prototype[a]=function(){var t=[this._wrapped];return k7.apply(t,arguments),mc(this,e.apply(Xe,t))}}),Xe}vr(["pop","push","reverse","shift","sort","splice","unshift"],function(r){var a=Cl[r];Xe.prototype[r]=function(){var e=this._wrapped;return e!=null&&(a.apply(e,arguments),(r==="shift"||r==="splice")&&e.length===0&&delete e[0]),mc(this,e)}}),vr(["concat","join","slice"],function(r){var a=Cl[r];Xe.prototype[r]=function(){var e=this._wrapped;return e!=null&&(e=a.apply(e,arguments)),mc(this,e)}});var xO=FO(Object.freeze(Object.defineProperty({__proto__:null,VERSION:LD,after:qq,all:MO,allKeys:Oa,any:NO,assign:_l,before:RO,bind:AO,bindAll:$q,chain:Uq,chunk:vJ,clone:Tq,collect:jn,compact:dJ,compose:Zq,constant:XD,contains:Tr,countBy:rJ,create:vq,debounce:xq,default:Xe,defaults:cO,defer:Gq,delay:bO,detect:uc,difference:GO,drop:Nl,each:vr,escape:Dq,every:MO,extend:pO,extendOwn:_l,filter:Ps,find:uc,findIndex:dc,findKey:DO,findLastIndex:PO,findWhere:Wq,first:fc,flatten:uJ,foldl:pc,foldr:_O,forEach:vr,functions:ec,get:hO,groupBy:tJ,has:Iq,head:fc,identity:rc,include:Tr,includes:Tr,indexBy:iJ,indexOf:VO,initial:gO,inject:pc,intersection:fJ,invert:uO,invoke:Yq,isArguments:Yp,isArray:Nn,isArrayBuffer:WD,isBoolean:qD,isDataView:Vl,isDate:K7,isElement:H7,isEmpty:Da,isEqual:lq,isError:Q7,isFinite:rq,isFunction:Qt,isMap:pq,isMatch:rO,isNaN:KD,isNull:Y7,isNumber:JD,isObject:$r,isRegExp:X7,isSet:fq,isString:Sp,isSymbol:SD,isTypedArray:tO,isUndefined:ZD,isWeakMap:cq,isWeakSet:yq,iteratee:sc,keys:Mt,last:lJ,lastIndexOf:Sq,map:jn,mapObject:Aq,matcher:wa,matches:wa,max:LO,memoize:gq,methods:ec,min:Kq,mixin:FO,negate:lc,noop:vO,now:Va,object:hJ,omit:oJ,once:Jq,pairs:hq,partial:Os,partition:nJ,pick:$O,pluck:cc,property:nc,propertyOf:bq,random:ac,range:mJ,reduce:pc,reduceRight:_O,reject:zq,rest:Nl,restArguments:oi,result:Nq,sample:UO,select:Ps,shuffle:Qq,size:sJ,some:NO,sortBy:eJ,sortedIndex:wO,tail:Nl,take:fc,tap:Eq,template:Mq,templateSettings:wq,throttle:Fq,times:Rq,toArray:jO,toPath:yO,transpose:hc,unescape:Pq,union:cJ,uniq:yc,unique:yc,uniqueId:jq,unzip:hc,values:Ds,where:Hq,without:pJ,wrap:kq,zip:yJ},Symbol.toStringTag,{value:"Module"})));xO._=xO;function Zt(r){return r.charAt(0).toUpperCase()+r.slice(1)}function Ll(r){return r.charAt(0).toLowerCase()+r.slice(1)}function kO(r,a){if(r.type!==n.Property||a.type!==n.Property)throw new Error(`Expected property entities for comparison. But got ${r.type} and ${a.type}.`);return r===a||r.id===a.id?!0:r.name!==a.name||r.static!==a.static||r.abstract!==a.abstract?!1:wi(r.dataType,a.dataType).compatible}function ZO(r,a){if(r.type!==n.DefinitionEntity||a.type!==n.DefinitionEntity)throw new Error(`Expected definition entities for comparison. But got ${r.type} and ${a.type}.`);if(r===a||r.id===a.id)return!0;if(r.properties.length!==a.properties.length)return!1;let e=[...a.properties];const t=[];for(let i=0;i<r.properties.length;i++){const s=r.properties[i];e.find(o=>{const d=kO(s,o);return d&&(e=e.filter(u=>u.id!==o.id)),d})||t.push(s)}return!(t.length>0)}var Pi=(r=>(r.BothUnconstrained="both-unconstrained",r.AConstraintBUnconstrained="a-constraint-b-unconstrained",r.BConstraintAUnconstrained="b-constraint-a-unconstrained",r.Same="same",r.AIsListBIsNot="a-is-list-b-is-not",r.BIsListAIsNot="b-is-list-a-is-not",r.AIsNullableBIsNot="a-is-nullable-b-is-not",r.BIsNullableAIsNot="b-is-nullable-a-is-not",r.AIsTemplateBIsNot="a-is-template-b-is-not",r.BIsTemplateAIsNot="b-is-template-a-is-not",r.BothUntyped="both-untyped",r.AIsUntypedBIsNot="a-is-untyped-b-is-not",r.BIsUntypedAIsNot="b-is-untyped-a-is-not",r.TypeEntityMismatch="type-entity-mismatch",r.SameDefinitionEntities="same-definition-entities",r.CompatibleDefinitionEntities="compatible-definition-entities",r.IncompatibleDefinitionEntities="incompatible-definition-entities",r.SamePrimitiveEntities="same-primitive-entities",r.IncompatiblePrimitiveEntities="incompatible-primitive-entities",r.SameBuiltInBaseEntities="same-built-in-base-entities",r.IncompatibleBuiltInBaseEntities="incompatible-built-in-base-entities",r.CheckUnknown="check-unknown",r))(Pi||{});function wi(r,a){var e,t,i,s,l,o,d,u,y,c,E;if(r&&r.type!==n.DataType||a&&a.type!==n.DataType)throw new Error(`Expected data-type entities for comparison. But got ${r==null?void 0:r.type} and ${a==null?void 0:a.type}.`);if(r===null&&a===null)return{compatible:!0,type:"both-unconstrained"};if(r===null)return{compatible:!0,type:"a-constraint-b-unconstrained"};if(a===null)return{compatible:!0,type:"b-constraint-a-unconstrained"};if(r===a)return{compatible:!0,type:"same"};if(r.id===a.id)return{compatible:!0,type:"same"};if(r.isList!==a.isList)return{compatible:!1,type:r.isList?"a-is-list-b-is-not":"b-is-list-a-is-not"};if(r.asType!==a.asType)return{compatible:!1,type:r.asType?"a-is-template-b-is-not":"b-is-template-a-is-not"};if(!r.entity&&a.entity)return{compatible:!0,type:"a-is-untyped-b-is-not"};if(r.entity&&!a.entity)return{compatible:!0,type:"b-is-untyped-a-is-not"};if(!r.entity&&!a.entity)return{compatible:!0,type:"both-untyped"};if(((e=r.entity)==null?void 0:e.type)!==((t=a.entity)==null?void 0:t.type))return{compatible:!1,type:"type-entity-mismatch"};if(((i=r.entity)==null?void 0:i.type)===n.DefinitionEntity){if(((s=r.entity)==null?void 0:s.id)===((l=a.entity)==null?void 0:l.id))return{compatible:!0,type:"same-definition-entities"};const I=ZO(r.entity,a.entity);return{compatible:I,type:I?"compatible-definition-entities":"incompatible-definition-entities"}}return((o=r.entity)==null?void 0:o.type)===n.PrimitiveEntity?((d=r.entity)==null?void 0:d.id)===((u=a.entity)==null?void 0:u.id)?{compatible:!0,type:"same-primitive-entities"}:{compatible:!1,type:"incompatible-primitive-entities"}:((y=r.entity)==null?void 0:y.type)===n.BuiltInBaseEntity?((c=r.entity)==null?void 0:c.id)===((E=a.entity)==null?void 0:E.id)?{compatible:!0,type:"same-built-in-base-entities"}:{compatible:!1,type:"incompatible-built-in-base-entities"}:{compatible:!1,type:"check-unknown"}}function TJ(r,a){const e=r.project.builtInBaseEntities.find(s=>s.id===S.EXECUTION),t={id:m.UUID.uuid(),version:m.UUID.uuid(),createdAt:(a==null?void 0:a.timestamp)||new Date().toISOString(),author:m.sessionAuthor,previousVersion:null,deleted:!1,type:n.DataType,isList:!1,isNullable:!1,andChildrenGroup:null,orChildrenGroup:null,asType:!1,entity:null,constant:!1,defaultValue:null,parent:null},i=C(t,r.project);return i.inferred=!0,a==null||a.add(i,b.Added),i.metaSync(t,a),i.setParent(r,a),i.entity=e,i}function qO(r,a=null){return r.dataType?r.dataType:null}function vc(r,a=null){var t;const e=(t=r.declaration)==null?void 0:t.getDataType(a);return e&&e.isResolved?e:r.readsValue?ji(r.readsValue,a):null}function Tc(r,a=null){return r.dataType&&!r.dataType.inferred&&r.dataType.isResolved?r.dataType:r.readsValue?ji(r.readsValue,a):null}function JO(r,a=null){return ji(r.declaration,a)}function SO(r,a=null){return r.dataType&&!r.dataType.inferred?r.dataType:r.dataType&&r.dataType.inferred||!r.dataType?(r.inferDataTypeAndSyncInstancesInputsAndOutputs(a),r.dataType):null}function Ec(r,a=null){var e;return((e=r.declaration)==null?void 0:e.dataType)||null}function WO(r,a=null){return(r==null?void 0:r.dataType)||null}function zO(r,a=null){return(r==null?void 0:r.dataType)||null}function ji(r,a=null){switch(r.type){case n.VariableDeclaration:return SO(r,a);case n.ArgumentDeclaration:return qO(r,a);case n.ReturnDeclaration:return Tc(r,a);case n.VariableInstance:return JO(r,a);case n.InputMap:return vc(r,a);case n.OutputMap:return Ec(r,a);case n.Property:return WO(r,a);case n.ValueDescriptor:return zO(r,a);default:throw new Error(`Cannot infer data type from entity of type ${r.type}.`)}}function jl(r,a=null){switch(r.type){case n.ArgumentDeclaration:return r.getDataType(a);case n.InputMap:return r.getDataType(a);case n.VariableDeclaration:return r.getDataType(a);case n.VariableInstance:return r.getDataType(a);case n.OutputMap:return r.getDataType(a);case n.ReturnDeclaration:return r.getDataType(a);case n.Property:return r.getDataType(a);case n.ValueDescriptor:return r.getDataType(a);default:return null}}function _(r){if(r){let a=null;return typeof r=="string"?a=r:r.entityId?a=r.entityId:r.type!==n.GenericReference&&(a=r.id),a}return null}function Un(r){return r.declaration||r}function EJ(r){return r.type===n.VariableDeclaration?r.parent===r.project?"global-declaration":"local-declaration":r.declaration.parent===r.project?"global-instance":"local-instance"}function Ic(r,a){const e=[];if(r.type===n.Project)e.push(...r.variableDeclarations);else{const i=ti(Je(r)).filter(s=>s.type===n.VariableDeclaration);e.push(...i),r.parent&&(ut.includes(r.parent.type)||r.parent.type===n.Project)&&e.push(...Ic(r.parent))}return e}function IJ(r){return r.split(/[\s-]+/).filter(t=>t.length>0).map((t,i)=>i===0?t.toLowerCase():t[0].toUpperCase()+t.slice(1).toLowerCase()).join("")}function AJ(r){return r.split(/[\s-]+/).filter(t=>t.length>0).map(t=>t[0].toUpperCase()+t.slice(1).toLowerCase()).join("")}function YO(r){var a;return(a=r.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:a.map(e=>e.toLowerCase()).join("-")}function Ul(r){return YO(r).toLowerCase()}function $l(r){var e,t,i,s;if(!r)return"Any data type";let a="";if(r.interactiveEntities===!1?a+=` but only definition nodes ${r.asType?"as template ":""}that don't include non-interactive built-in functionality`:r.interactiveEntities===!0&&(a+=` but only definition nodes ${r.asType?"as template ":""}that extend or implement non-interactive built-in functionality`),r.staticEntities===!1?a?a+=" and that aren't a single global copy instance":a+=` but only definition nodes ${r.asType?"as template ":""}that aren't a single global copy instance`:r.staticEntities===!0&&(a?a+=" and that are a single global copy instance":a+=` but only definition nodes ${r.asType?"as template ":""}that are a single global copy instance`),r.actionEntities===!1?a?a+=" including executable or action nodes":a+=` but only executable or action nodes ${r.asType?"as template ":""}`:r.actionEntities===!0&&(a?a+=" and not executable or action nodes":a+=" but not executable or action nodes"),r.entity&&(a=""),r.asType&&!a&&!((e=r.andChildrenGroup)!=null&&e.length)&&!((t=r.orChildrenGroup)!=null&&t.length)&&(a=" as template"),!r.entity){const l=r.isList;if(!((i=r.andChildrenGroup)!=null&&i.length)&&!((s=r.orChildrenGroup)!=null&&s.length))return l?`List of an any data type${a}`:`Any data type${a}`;let o="",d=!1,u=!1;return(r.andChildrenGroup||[]).forEach(y=>{const c=$l(y),E=Ll(c);d&&(o+=" and "),y.isGroup?o+="("+E+")":d?o+=E:o+=c,d=!0,u=!0}),(r.orChildrenGroup||[]).forEach(y=>{const c=$l(y),E=Ll(c);d&&(u&&(o+=","),o+=" or "),y.isGroup?o+="("+E+")":d?o+=E:o+=c,d=!0}),o}if(r.entity.type===n.PrimitiveEntity){let l=r.entity.name;switch(r.entity.name){case L.String:l="Text";break;case L.KeyValue:l="Data structure";break}return r.isList?`List of ${l}s${a}`:`${l.slice(0,1).toUpperCase()}${l.slice(1)}${a}`}else if(r.entity.type===n.DefinitionEntity){const l=x(r.entity,r.project);return r.isList?`List of ${l} entities${a}`:l.slice(0,1).toUpperCase()+l.slice(1)+a}else if(r.entity.type===n.BuiltInBaseEntity){const l=KO(r.entity);return r.isList?`List of ${l} entities${a}`:l.slice(0,1).toUpperCase()+l.slice(1)+a}else return r.isList?`List of ${r.entity.name} entities${a}`:`${r.entity.name.slice(0,1).toUpperCase()+r.entity.name.slice(1)} entity${a}`}function bJ(r){if(!r)return"Any data type";const a=r.getDataType(null);return $l(a)}function gl(r){switch(r.declaration.id){case yt.Equal:return"is equal to";case yt.NotEqual:return"is not equal to";case yt.MoreThan:return"is greater than";case yt.MoreThanOrEqual:return"is greater than or equal to";case yt.LessThan:return"is less than";case yt.LessThanOrEqual:return"is less than or equal to";case yt.And:return"and";case yt.Or:return"or";case bi.Empty:return"is empty";case bi.NotEmpty:return"is not empty"}}function HO(r){return r.includes(S.HTTP_ENDPOINT)?"HTTP endpoint":r.includes(S.PERSISTED_ENTITY)?"Persisted entity":r.includes(S.CRON_JOB)?"Scheduled execution":r.includes(S.RELATIONAL_DATABASE)?"Relational database":"Entity"}function KO(r){switch(r.name){case S.HTTP_ENDPOINT:return"HTTP endpoint";case S.PERSISTED_ENTITY:return"Persisted entity";case S.CRON_JOB:return"Scheduled execution";case S.RELATIONAL_DATABASE:return"Relational database"}return"Entity"}function RJ(r){const a=tw(r);if(!a){const e=ef(r);return e.includes(S.HTTP_ENDPOINT)?"HTTP endpoint":e.includes(S.PERSISTED_ENTITY)?"Persisted entity":e.includes(S.CRON_JOB)?"Scheduled execution":e.includes(S.RELATIONAL_DATABASE)?"Relational database":x(r,r.project)+" entity"}return x(a,r.project)+" entity"}function XO(r){let a="Find ";return r.outputsDeclarations.forEach((e,t)=>{const i=jl(e,null),s=Ll(i&&i.entity?x(i.entity,r.project):"unstructured data");t===0?a+=`${s} `:t===r.outputsDeclarations.length-1?a+=`and ${s} `:a+=`, ${s} `}),a}function QO(r){switch(r.name){case L.String:return"Text";case L.Number:return"Number";case L.Boolean:return"Boolean";case L.KeyValue:return"Data structure";case L.UUID:return"Unique identifier";case L.Date:return"Date";case L.EntityTemplate:return"Entity as template";case L.Enum:return"Enumeration";case L.File:return"File";case L.Null:return"Empty";case L.ActionDescriptor:return"Action descriptor";case L.Untyped:return"Untyped";default:return r.name}}function e1(r){switch(r.id){case ee.List:return"Loop over list items";case ee.ManualFlow:return"Manual flow control loop";case ee.ObjectKeys:return"Loop over object keys";case ee.ObjectValues:return"Loop over object values";case ee.Counted:return"Loop given number of times";case ee.String:return"Loop over text characters";case et.Addition:return"Sum numbers";case et.Subtraction:return"Subtract numbers";case et.Multiplication:return"Multiply numbers";case et.Division:return"Divide numbers";case et.Remainder:return"Get remainder of numbers";case et.Exponentiation:return"Get exponent of numbers";case Ie.AddIndex:return"Add at index position";case Ie.DeleteFirst:return"Delete first character";case Ie.DeleteLast:return"Delete last character";case Ie.DeleteIndex:return"Delete at index position";case Ie.Join:return"Join texts";case Ie.ReplaceAllMatches:return"Replace all matches";case Ie.ReplaceFirst:return"Replace first match";case Ie.ReplaceLast:return"Replace last match";case Ie.Split:return"Split text";case Ie.ReplaceIndex:return"Replace at index position";case Ie.ReplaceSingleMatch:return"Replace single match";case Ie.GetFirst:return"Get first character";case Ie.GetLast:return"Get last character";case Ie.GetIndex:return"Get at index position";case Ie.Append:return"Add at the end";case Ie.Prepend:return"Add at the start";case Qe.Wait:return"Wait";case Qe.Parallel:return"Run in parallel";case Qe.Sequential:return"Run in sequence";case Lt.HttpRequest:return"HTTP request";case tt.CreateNewInstance:return"Create new copy of entity";case he.AddIndex:return"Add item at index position";case he.DeleteFirst:return"Delete first item";case he.DeleteLast:return"Delete last item";case he.DeleteIndex:return"Delete item at index position";case he.Join:return"Join lists";case he.ReplaceAllMatches:return"Replace all matches";case he.ReplaceFirst:return"Replace first match";case he.ReplaceLast:return"Replace last match";case he.Split:return"Split list";case he.ReplaceIndex:return"Replace at index position";case he.ReplaceSingleMatch:return"Replace single match";case he.GetFirst:return"Get first item";case he.GetLast:return"Get last item";case he.GetIndex:return"Get item at index position";case he.Append:return"Add item at the end";case he.Prepend:return"Add item at the start";case ir.PROJECT_PUBLICATION_COMPLETED:return"Project publication completed";default:return(r.name.slice(0,1).toUpperCase()+r.name.slice(1)).replaceAll("-"," ")}}function x(r,a){var e;if(n.FunctionDeclaration===r.type){const t=r.name;if(Object.values(ci).includes(t))switch(t){case ci.AbortExecution:return"Abort execution";case ci.DeletePersistedEntity:return"Delete persisted entity";case ci.SoftDeletePersistedEntity:return"Soft delete persisted entity";default:return Zt(r.type).replaceAll("-"," ")}return t}if(n.BuiltInBaseEntity===r.type)return HO([r.name]);if(uf.includes(r.type)&&r.type!==n.ActionDescriptor)return r.name;switch(r.type){case n.Search:return XO(r);case n.GlobalEvent:return r.implements?x(r.implements,a):Zt(r.type).replaceAll("-"," ");case n.Operation:case n.InternalCall:case n.Loop:const t=Ai(r.declaration,a);return x(t,a);case n.ActionDescriptor:return e1(r);case n.BreakStatement:const i=Ai(r.parent,a);return`Stop loop ${x(i,a)}`;case n.ContinueStatement:const s=Ai(r.parent,a);return`Execute next iteration of ${x(s,a)}`;case n.FunctionCall:return Ai(r.declaration,a).name;case n.Condition:{const o=r;if((e=r.inputs)!=null&&e.length){const d=x(o.inputs[0],o.project);if(o.inputs[1]){const u=o.inputs[1].declaration.name;return`If ${d} ${gl(o)} ${u}`}return`If ${d} ${gl(o)}`}else return`If ${gl(o)}`}case n.ReturnStatement:{const o=Ai(r.parent,a);return`Output of ${x(o,a)}`}case n.InputMap:if(r.declaration){const o=Ai(r.declaration,a);return x(o,a)||""}else return r.name||"";case n.VariableInstance:{const o=Ai(r.declaration,a);return x(o,a)||""}case n.OutputMap:if(r.declaration){const o=Ai(r.declaration,a);return(o==null?void 0:o.name)||""}else return"";case n.PrimitiveEntity:case n.LiteralValue:return QO(r);default:return Zt(r.type).replaceAll("-"," ")}}function Ac(r,a){const e=[];r.name||e.push(new w({id:`${r.id}--${$.EmptyName}`,message:`Entity with id "${r.id}" and type "${r.type}" has an empty name. Please provide a 'name' string.`,severity:D.Error,code:$.EmptyName,issue:null}));const t=a.entities.filter(i=>i.name===r.name);return t.length&&e.push(new w({id:`${r.id}--${$.NameNotUniqueInScope}`,message:`Entity with id "${r.id}" and type "${r.type}" has a name "${r.name}" that is not unique in the project. Entity with id "${t[0].id}" has the same name.
36
+ `+s+"}",d}function Nq(r,a,e){a=Pa(a);var t=a.length;if(!t)return Qt(e)?e.call(r):e;for(var i=0;i<t;i++){var s=r==null?void 0:r[a[i]];s===void 0&&(s=e,i=t),r=Qt(s)?s.call(r):s}return r}var Lq=0;function jq(r){var a=++Lq+"";return r?r+a:a}function Uq(r){var a=Xe(r);return a._chain=!0,a}function IO(r,a,e,t,i){if(!(t instanceof a))return r.apply(e,i);var s=fO(r.prototype),l=r.apply(s,i);return $r(l)?l:s}var Os=oi(function(r,a){var e=Os.placeholder,t=function(){for(var i=0,s=a.length,l=Array(s),o=0;o<s;o++)l[o]=a[o]===e?arguments[i++]:a[o];for(;i<arguments.length;)l.push(arguments[i++]);return IO(r,t,this,this,l)};return t});Os.placeholder=Xe;const AO=oi(function(r,a,e){if(!Qt(r))throw new TypeError("Bind must be called on a function");var t=oi(function(i){return IO(r,t,a,this,e.concat(i))});return t}),Ei=QD(li);function Ln(r,a,e,t){if(t=t||[],!a&&a!==0)a=1/0;else if(a<=0)return t.concat(r);for(var i=t.length,s=0,l=li(r);s<l;s++){var o=r[s];if(Ei(o)&&(Nn(o)||Yp(o)))if(a>1)Ln(o,a-1,e,t),i=t.length;else for(var d=0,u=o.length;d<u;)t[i++]=o[d++];else e||(t[i++]=o)}return t}const $q=oi(function(r,a){a=Ln(a,!1,!1);var e=a.length;if(e<1)throw new Error("bindAll must be passed function names");for(;e--;){var t=a[e];r[t]=AO(r[t],r)}return r});function gq(r,a){var e=function(t){var i=e.cache,s=""+(a?a.apply(this,arguments):t);return gr(i,s)||(i[s]=r.apply(this,arguments)),i[s]};return e.cache={},e}const bO=oi(function(r,a,e){return setTimeout(function(){return r.apply(null,e)},a)}),Gq=Os(bO,Xe,1);function Fq(r,a,e){var t,i,s,l,o=0;e||(e={});var d=function(){o=e.leading===!1?0:Va(),t=null,l=r.apply(i,s),t||(i=s=null)},u=function(){var y=Va();!o&&e.leading===!1&&(o=y);var c=a-(y-o);return i=this,s=arguments,c<=0||c>a?(t&&(clearTimeout(t),t=null),o=y,l=r.apply(i,s),t||(i=s=null)):!t&&e.trailing!==!1&&(t=setTimeout(d,c)),l};return u.cancel=function(){clearTimeout(t),o=0,t=i=s=null},u}function xq(r,a,e){var t,i,s,l,o,d=function(){var y=Va()-i;a>y?t=setTimeout(d,a-y):(t=null,e||(l=r.apply(o,s)),t||(s=o=null))},u=oi(function(y){return o=this,s=y,i=Va(),t||(t=setTimeout(d,a),e&&(l=r.apply(o,s))),l});return u.cancel=function(){clearTimeout(t),t=s=o=null},u}function kq(r,a){return Os(a,r)}function lc(r){return function(){return!r.apply(this,arguments)}}function Zq(){var r=arguments,a=r.length-1;return function(){for(var e=a,t=r[a].apply(this,arguments);e--;)t=r[e].call(this,t);return t}}function qq(r,a){return function(){if(--r<1)return a.apply(this,arguments)}}function RO(r,a){var e;return function(){return--r>0&&(e=a.apply(this,arguments)),r<=1&&(a=null),e}}const Jq=Os(RO,2);function DO(r,a,e){a=di(a,e);for(var t=Mt(r),i,s=0,l=t.length;s<l;s++)if(i=t[s],a(r[i],i,r))return i}function OO(r){return function(a,e,t){e=di(e,t);for(var i=li(a),s=r>0?0:i-1;s>=0&&s<i;s+=r)if(e(a[s],s,a))return s;return-1}}const dc=OO(1),PO=OO(-1);function wO(r,a,e,t){e=di(e,t,1);for(var i=e(a),s=0,l=li(r);s<l;){var o=Math.floor((s+l)/2);e(r[o])<i?s=o+1:l=o}return s}function CO(r,a,e){return function(t,i,s){var l=0,o=li(t);if(typeof s=="number")r>0?l=s>=0?s:Math.max(s+o,l):o=s>=0?Math.min(s+1,o):s+o+1;else if(e&&s&&o)return s=e(t,i),t[s]===i?s:-1;if(i!==i)return s=a(ba.call(t,l,o),KD),s>=0?s+l:-1;for(s=r>0?l:o-1;s>=0&&s<o;s+=r)if(t[s]===i)return s;return-1}}const VO=CO(1,dc,wO),Sq=CO(-1,PO);function uc(r,a,e){var t=Ei(r)?dc:DO,i=t(r,a,e);if(i!==void 0&&i!==-1)return r[i]}function Wq(r,a){return uc(r,wa(a))}function vr(r,a,e){a=Ca(a,e);var t,i;if(Ei(r))for(t=0,i=r.length;t<i;t++)a(r[t],t,r);else{var s=Mt(r);for(t=0,i=s.length;t<i;t++)a(r[s[t]],s[t],r)}return r}function jn(r,a,e){a=di(a,e);for(var t=!Ei(r)&&Mt(r),i=(t||r).length,s=Array(i),l=0;l<i;l++){var o=t?t[l]:l;s[l]=a(r[o],o,r)}return s}function BO(r){var a=function(e,t,i,s){var l=!Ei(e)&&Mt(e),o=(l||e).length,d=r>0?0:o-1;for(s||(i=e[l?l[d]:d],d+=r);d>=0&&d<o;d+=r){var u=l?l[d]:d;i=t(i,e[u],u,e)}return i};return function(e,t,i,s){var l=arguments.length>=3;return a(e,Ca(t,s,4),i,l)}}const pc=BO(1),_O=BO(-1);function Ps(r,a,e){var t=[];return a=di(a,e),vr(r,function(i,s,l){a(i,s,l)&&t.push(i)}),t}function zq(r,a,e){return Ps(r,lc(di(a)),e)}function MO(r,a,e){a=di(a,e);for(var t=!Ei(r)&&Mt(r),i=(t||r).length,s=0;s<i;s++){var l=t?t[s]:s;if(!a(r[l],l,r))return!1}return!0}function NO(r,a,e){a=di(a,e);for(var t=!Ei(r)&&Mt(r),i=(t||r).length,s=0;s<i;s++){var l=t?t[s]:s;if(a(r[l],l,r))return!0}return!1}function Tr(r,a,e,t){return Ei(r)||(r=Ds(r)),(typeof e!="number"||t)&&(e=0),VO(r,a,e)>=0}const Yq=oi(function(r,a,e){var t,i;return Qt(a)?i=a:(a=Pa(a),t=a.slice(0,-1),a=a[a.length-1]),jn(r,function(s){var l=i;if(!l){if(t&&t.length&&(s=ic(s,t)),s==null)return;l=s[a]}return l==null?l:l.apply(s,e)})});function cc(r,a){return jn(r,nc(a))}function Hq(r,a){return Ps(r,wa(a))}function LO(r,a,e){var t=-1/0,i=-1/0,s,l;if(a==null||typeof a=="number"&&typeof r[0]!="object"&&r!=null){r=Ei(r)?r:Ds(r);for(var o=0,d=r.length;o<d;o++)s=r[o],s!=null&&s>t&&(t=s)}else a=di(a,e),vr(r,function(u,y,c){l=a(u,y,c),(l>i||l===-1/0&&t===-1/0)&&(t=u,i=l)});return t}function Kq(r,a,e){var t=1/0,i=1/0,s,l;if(a==null||typeof a=="number"&&typeof r[0]!="object"&&r!=null){r=Ei(r)?r:Ds(r);for(var o=0,d=r.length;o<d;o++)s=r[o],s!=null&&s<t&&(t=s)}else a=di(a,e),vr(r,function(u,y,c){l=a(u,y,c),(l<i||l===1/0&&t===1/0)&&(t=u,i=l)});return t}var Xq=/[^\ud800-\udfff]|[\ud800-\udbff][\udc00-\udfff]|[\ud800-\udfff]/g;function jO(r){return r?Nn(r)?ba.call(r):Sp(r)?r.match(Xq):Ei(r)?jn(r,rc):Ds(r):[]}function UO(r,a,e){if(a==null||e)return Ei(r)||(r=Ds(r)),r[ac(r.length-1)];var t=jO(r),i=li(t);a=Math.max(Math.min(a,i),0);for(var s=i-1,l=0;l<a;l++){var o=ac(l,s),d=t[l];t[l]=t[o],t[o]=d}return t.slice(0,a)}function Qq(r){return UO(r,1/0)}function eJ(r,a,e){var t=0;return a=di(a,e),cc(jn(r,function(i,s,l){return{value:i,index:t++,criteria:a(i,s,l)}}).sort(function(i,s){var l=i.criteria,o=s.criteria;if(l!==o){if(l>o||l===void 0)return 1;if(l<o||o===void 0)return-1}return i.index-s.index}),"value")}function Ml(r,a){return function(e,t,i){var s=a?[[],[]]:{};return t=di(t,i),vr(e,function(l,o){var d=t(l,o,e);r(s,l,d)}),s}}const tJ=Ml(function(r,a,e){gr(r,e)?r[e].push(a):r[e]=[a]}),iJ=Ml(function(r,a,e){r[e]=a}),rJ=Ml(function(r,a,e){gr(r,e)?r[e]++:r[e]=1}),nJ=Ml(function(r,a,e){r[e?0:1].push(a)},!0);function sJ(r){return r==null?0:Ei(r)?r.length:Mt(r).length}function aJ(r,a,e){return a in e}const $O=oi(function(r,a){var e={},t=a[0];if(r==null)return e;Qt(t)?(a.length>1&&(t=Ca(t,a[1])),a=Oa(r)):(t=aJ,a=Ln(a,!1,!1),r=Object(r));for(var i=0,s=a.length;i<s;i++){var l=a[i],o=r[l];t(o,l,r)&&(e[l]=o)}return e}),oJ=oi(function(r,a){var e=a[0],t;return Qt(e)?(e=lc(e),a.length>1&&(t=a[1])):(a=jn(Ln(a,!1,!1),String),e=function(i,s){return!Tr(a,s)}),$O(r,e,t)});function gO(r,a,e){return ba.call(r,0,Math.max(0,r.length-(a==null||e?1:a)))}function fc(r,a,e){return r==null||r.length<1?a==null||e?void 0:[]:a==null||e?r[0]:gO(r,r.length-a)}function Nl(r,a,e){return ba.call(r,a==null||e?1:a)}function lJ(r,a,e){return r==null||r.length<1?a==null||e?void 0:[]:a==null||e?r[r.length-1]:Nl(r,Math.max(0,r.length-a))}function dJ(r){return Ps(r,Boolean)}function uJ(r,a){return Ln(r,a,!1)}const GO=oi(function(r,a){return a=Ln(a,!0,!0),Ps(r,function(e){return!Tr(a,e)})}),pJ=oi(function(r,a){return GO(r,a)});function yc(r,a,e,t){qD(a)||(t=e,e=a,a=!1),e!=null&&(e=di(e,t));for(var i=[],s=[],l=0,o=li(r);l<o;l++){var d=r[l],u=e?e(d,l,r):d;a&&!e?((!l||s!==u)&&i.push(d),s=u):e?Tr(s,u)||(s.push(u),i.push(d)):Tr(i,d)||i.push(d)}return i}const cJ=oi(function(r){return yc(Ln(r,!0,!0))});function fJ(r){for(var a=[],e=arguments.length,t=0,i=li(r);t<i;t++){var s=r[t];if(!Tr(a,s)){var l;for(l=1;l<e&&Tr(arguments[l],s);l++);l===e&&a.push(s)}}return a}function hc(r){for(var a=r&&LO(r,li).length||0,e=Array(a),t=0;t<a;t++)e[t]=cc(r,t);return e}const yJ=oi(hc);function hJ(r,a){for(var e={},t=0,i=li(r);t<i;t++)a?e[r[t]]=a[t]:e[r[t][0]]=r[t][1];return e}function mJ(r,a,e){a==null&&(a=r||0,r=0),e||(e=a<r?-1:1);for(var t=Math.max(Math.ceil((a-r)/e),0),i=Array(t),s=0;s<t;s++,r+=e)i[s]=r;return i}function vJ(r,a){if(a==null||a<1)return[];for(var e=[],t=0,i=r.length;t<i;)e.push(ba.call(r,t,t+=a));return e}function mc(r,a){return r._chain?Xe(a).chain():a}function FO(r){return vr(ec(r),function(a){var e=Xe[a]=r[a];Xe.prototype[a]=function(){var t=[this._wrapped];return k7.apply(t,arguments),mc(this,e.apply(Xe,t))}}),Xe}vr(["pop","push","reverse","shift","sort","splice","unshift"],function(r){var a=Cl[r];Xe.prototype[r]=function(){var e=this._wrapped;return e!=null&&(a.apply(e,arguments),(r==="shift"||r==="splice")&&e.length===0&&delete e[0]),mc(this,e)}}),vr(["concat","join","slice"],function(r){var a=Cl[r];Xe.prototype[r]=function(){var e=this._wrapped;return e!=null&&(e=a.apply(e,arguments)),mc(this,e)}});var xO=FO(Object.freeze(Object.defineProperty({__proto__:null,VERSION:LD,after:qq,all:MO,allKeys:Oa,any:NO,assign:_l,before:RO,bind:AO,bindAll:$q,chain:Uq,chunk:vJ,clone:Tq,collect:jn,compact:dJ,compose:Zq,constant:XD,contains:Tr,countBy:rJ,create:vq,debounce:xq,default:Xe,defaults:cO,defer:Gq,delay:bO,detect:uc,difference:GO,drop:Nl,each:vr,escape:Dq,every:MO,extend:pO,extendOwn:_l,filter:Ps,find:uc,findIndex:dc,findKey:DO,findLastIndex:PO,findWhere:Wq,first:fc,flatten:uJ,foldl:pc,foldr:_O,forEach:vr,functions:ec,get:hO,groupBy:tJ,has:Iq,head:fc,identity:rc,include:Tr,includes:Tr,indexBy:iJ,indexOf:VO,initial:gO,inject:pc,intersection:fJ,invert:uO,invoke:Yq,isArguments:Yp,isArray:Nn,isArrayBuffer:WD,isBoolean:qD,isDataView:Vl,isDate:K7,isElement:H7,isEmpty:Da,isEqual:lq,isError:Q7,isFinite:rq,isFunction:Qt,isMap:pq,isMatch:rO,isNaN:KD,isNull:Y7,isNumber:JD,isObject:$r,isRegExp:X7,isSet:fq,isString:Sp,isSymbol:SD,isTypedArray:tO,isUndefined:ZD,isWeakMap:cq,isWeakSet:yq,iteratee:sc,keys:Mt,last:lJ,lastIndexOf:Sq,map:jn,mapObject:Aq,matcher:wa,matches:wa,max:LO,memoize:gq,methods:ec,min:Kq,mixin:FO,negate:lc,noop:vO,now:Va,object:hJ,omit:oJ,once:Jq,pairs:hq,partial:Os,partition:nJ,pick:$O,pluck:cc,property:nc,propertyOf:bq,random:ac,range:mJ,reduce:pc,reduceRight:_O,reject:zq,rest:Nl,restArguments:oi,result:Nq,sample:UO,select:Ps,shuffle:Qq,size:sJ,some:NO,sortBy:eJ,sortedIndex:wO,tail:Nl,take:fc,tap:Eq,template:Mq,templateSettings:wq,throttle:Fq,times:Rq,toArray:jO,toPath:yO,transpose:hc,unescape:Pq,union:cJ,uniq:yc,unique:yc,uniqueId:jq,unzip:hc,values:Ds,where:Hq,without:pJ,wrap:kq,zip:yJ},Symbol.toStringTag,{value:"Module"})));xO._=xO;function Zt(r){return r.charAt(0).toUpperCase()+r.slice(1)}function Ll(r){return r.charAt(0).toLowerCase()+r.slice(1)}function kO(r,a){if(r.type!==n.Property||a.type!==n.Property)throw new Error(`Expected property entities for comparison. But got ${r.type} and ${a.type}.`);return r===a||r.id===a.id?!0:r.name!==a.name||r.static!==a.static||r.abstract!==a.abstract?!1:wi(r.dataType,a.dataType).compatible}function ZO(r,a){if(r.type!==n.DefinitionEntity||a.type!==n.DefinitionEntity)throw new Error(`Expected definition entities for comparison. But got ${r.type} and ${a.type}.`);if(r===a||r.id===a.id)return!0;if(r.properties.length!==a.properties.length)return!1;let e=[...a.properties];const t=[];for(let i=0;i<r.properties.length;i++){const s=r.properties[i];e.find(o=>{const d=kO(s,o);return d&&(e=e.filter(u=>u.id!==o.id)),d})||t.push(s)}return!(t.length>0)}var Pi=(r=>(r.BothUnconstrained="both-unconstrained",r.AConstraintBUnconstrained="a-constraint-b-unconstrained",r.BConstraintAUnconstrained="b-constraint-a-unconstrained",r.Same="same",r.AIsListBIsNot="a-is-list-b-is-not",r.BIsListAIsNot="b-is-list-a-is-not",r.AIsNullableBIsNot="a-is-nullable-b-is-not",r.BIsNullableAIsNot="b-is-nullable-a-is-not",r.AIsTemplateBIsNot="a-is-template-b-is-not",r.BIsTemplateAIsNot="b-is-template-a-is-not",r.BothUntyped="both-untyped",r.AIsUntypedBIsNot="a-is-untyped-b-is-not",r.BIsUntypedAIsNot="b-is-untyped-a-is-not",r.TypeEntityMismatch="type-entity-mismatch",r.SameDefinitionEntities="same-definition-entities",r.CompatibleDefinitionEntities="compatible-definition-entities",r.IncompatibleDefinitionEntities="incompatible-definition-entities",r.SamePrimitiveEntities="same-primitive-entities",r.IncompatiblePrimitiveEntities="incompatible-primitive-entities",r.SameBuiltInBaseEntities="same-built-in-base-entities",r.IncompatibleBuiltInBaseEntities="incompatible-built-in-base-entities",r.CheckUnknown="check-unknown",r))(Pi||{});function wi(r,a){var e,t,i,s,l,o,d,u,y,c,E;if(r&&r.type!==n.DataType||a&&a.type!==n.DataType)throw new Error(`Expected data-type entities for comparison. But got ${r==null?void 0:r.type} and ${a==null?void 0:a.type}.`);if(r===null&&a===null)return{compatible:!0,type:"both-unconstrained"};if(r===null)return{compatible:!0,type:"a-constraint-b-unconstrained"};if(a===null)return{compatible:!0,type:"b-constraint-a-unconstrained"};if(r===a)return{compatible:!0,type:"same"};if(r.id===a.id)return{compatible:!0,type:"same"};if(r.isList!==a.isList)return{compatible:!1,type:r.isList?"a-is-list-b-is-not":"b-is-list-a-is-not"};if(r.asType!==a.asType)return{compatible:!1,type:r.asType?"a-is-template-b-is-not":"b-is-template-a-is-not"};if(!r.entity&&a.entity)return{compatible:!0,type:"a-is-untyped-b-is-not"};if(r.entity&&!a.entity)return{compatible:!0,type:"b-is-untyped-a-is-not"};if(!r.entity&&!a.entity)return{compatible:!0,type:"both-untyped"};if(((e=r.entity)==null?void 0:e.type)!==((t=a.entity)==null?void 0:t.type))return{compatible:!1,type:"type-entity-mismatch"};if(((i=r.entity)==null?void 0:i.type)===n.DefinitionEntity){if(((s=r.entity)==null?void 0:s.id)===((l=a.entity)==null?void 0:l.id))return{compatible:!0,type:"same-definition-entities"};const I=ZO(r.entity,a.entity);return{compatible:I,type:I?"compatible-definition-entities":"incompatible-definition-entities"}}return((o=r.entity)==null?void 0:o.type)===n.PrimitiveEntity?((d=r.entity)==null?void 0:d.id)===((u=a.entity)==null?void 0:u.id)?{compatible:!0,type:"same-primitive-entities"}:{compatible:!1,type:"incompatible-primitive-entities"}:((y=r.entity)==null?void 0:y.type)===n.BuiltInBaseEntity?((c=r.entity)==null?void 0:c.id)===((E=a.entity)==null?void 0:E.id)?{compatible:!0,type:"same-built-in-base-entities"}:{compatible:!1,type:"incompatible-built-in-base-entities"}:{compatible:!1,type:"check-unknown"}}function TJ(r,a){const e=r.project.builtInBaseEntities.find(s=>s.id===S.EXECUTION),t={id:m.UUID.uuid(),version:m.UUID.uuid(),createdAt:(a==null?void 0:a.timestamp)||new Date().toISOString(),author:m.sessionAuthor,previousVersion:null,deleted:!1,type:n.DataType,isList:!1,isNullable:!1,andChildrenGroup:null,orChildrenGroup:null,asType:!1,entity:null,constant:!1,defaultValue:null,parent:null},i=C(t,r.project);return i.inferred=!0,a==null||a.add(i,b.Added),i.metaSync(t,a),i.setParent(r,a),i.entity=e,i}function qO(r,a=null){return r.dataType?r.dataType:null}function vc(r,a=null){var t;const e=(t=r.declaration)==null?void 0:t.getDataType(a);return e&&e.isResolved?e:r.readsValue?ji(r.readsValue,a):null}function Tc(r,a=null){return r.dataType&&!r.dataType.inferred&&r.dataType.isResolved?r.dataType:r.readsValue?ji(r.readsValue,a):null}function JO(r,a=null){return ji(r.declaration,a)}function SO(r,a=null){return r.dataType&&!r.dataType.inferred?r.dataType:r.dataType&&r.dataType.inferred||!r.dataType?(r.inferDataTypeAndSyncInstancesInputsAndOutputs(a),r.dataType):null}function Ec(r,a=null){var e;return((e=r.declaration)==null?void 0:e.dataType)||null}function WO(r,a=null){return(r==null?void 0:r.dataType)||null}function zO(r,a=null){return(r==null?void 0:r.dataType)||null}function ji(r,a=null){switch(r.type){case n.VariableDeclaration:return SO(r,a);case n.ArgumentDeclaration:return qO(r,a);case n.ReturnDeclaration:return Tc(r,a);case n.VariableInstance:return JO(r,a);case n.InputMap:return vc(r,a);case n.OutputMap:return Ec(r,a);case n.Property:return WO(r,a);case n.ValueDescriptor:return zO(r,a);default:throw new Error(`Cannot infer data type from entity of type ${r.type}.`)}}function jl(r,a=null){switch(r.type){case n.ArgumentDeclaration:return r.getDataType(a);case n.InputMap:return r.getDataType(a);case n.VariableDeclaration:return r.getDataType(a);case n.VariableInstance:return r.getDataType(a);case n.OutputMap:return r.getDataType(a);case n.ReturnDeclaration:return r.getDataType(a);case n.Property:return r.getDataType(a);case n.ValueDescriptor:return r.getDataType(a);default:return null}}function _(r){if(r){let a=null;return typeof r=="string"?a=r:r.entityId?a=r.entityId:r.type!==n.GenericReference&&(a=r.id),a}return null}function Un(r){return r.declaration||r}function EJ(r){return r.type===n.VariableDeclaration?r.parent===r.project?"global-declaration":"local-declaration":r.declaration.parent===r.project?"global-instance":"local-instance"}function Ic(r,a){const e=[];if(r.type===n.Project)e.push(...r.variableDeclarations);else{const i=ti(Je(r)).filter(s=>s.type===n.VariableDeclaration);e.push(...i),r.parent&&(ut.includes(r.parent.type)||r.parent.type===n.Project)&&e.push(...Ic(r.parent))}return e}function IJ(r){return r.split(/[\s-]+/).filter(t=>t.length>0).map((t,i)=>i===0?t.toLowerCase():t[0].toUpperCase()+t.slice(1).toLowerCase()).join("")}function AJ(r){return r.split(/[\s-]+/).filter(t=>t.length>0).map(t=>t[0].toUpperCase()+t.slice(1).toLowerCase()).join("")}function YO(r){var a;return(a=r.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:a.map(e=>e.toLowerCase()).join("-")}function Ul(r){return YO(r).toLowerCase()}function $l(r){var e,t,i,s;if(!r)return"Any data type";let a="";if(r.interactiveEntities===!1?a+=` but only definition nodes ${r.asType?"as template ":""}that don't include non-interactive built-in functionality`:r.interactiveEntities===!0&&(a+=` but only definition nodes ${r.asType?"as template ":""}that extend or implement interactive built-in functionality`),r.staticEntities===!1?a?a+=" and that aren't a single global copy instance":a+=` but only definition nodes ${r.asType?"as template ":""}that aren't a single global copy instance`:r.staticEntities===!0&&(a?a+=" and that are a single global copy instance":a+=` but only definition nodes ${r.asType?"as template ":""}that are a single global copy instance`),r.actionEntities===!1?a?a+=" excluding executable/action nodes":a+=` excluding executable/action nodes ${r.asType?"templates ":""}`:r.actionEntities===!0&&(a?a+=" and not executable/action nodes":a+=" but not executable/action nodes"),r.entity&&(a=""),r.asType&&!a&&!((e=r.andChildrenGroup)!=null&&e.length)&&!((t=r.orChildrenGroup)!=null&&t.length)&&(a=" as template"),!r.entity){const l=r.isList;if(!((i=r.andChildrenGroup)!=null&&i.length)&&!((s=r.orChildrenGroup)!=null&&s.length))return l?`List of an any data type${a}`:`Any data type${a}`;let o="",d=!1,u=!1;return(r.andChildrenGroup||[]).forEach(y=>{const c=$l(y),E=Ll(c);d&&(o+=" and "),y.isGroup?o+="("+E+")":d?o+=E:o+=c,d=!0,u=!0}),(r.orChildrenGroup||[]).forEach(y=>{const c=$l(y),E=Ll(c);d&&(u&&(o+=","),o+=" or "),y.isGroup?o+="("+E+")":d?o+=E:o+=c,d=!0}),o}if(r.entity.type===n.PrimitiveEntity){let l=r.entity.name;switch(r.entity.name){case L.String:l="Text";break;case L.KeyValue:l="Data structure";break}return r.isList?`List of ${l}s${a}`:`${l.slice(0,1).toUpperCase()}${l.slice(1)}${a}`}else if(r.entity.type===n.DefinitionEntity){const l=x(r.entity,r.project);return r.isList?`List of ${l} entities${a}`:l.slice(0,1).toUpperCase()+l.slice(1)+a}else if(r.entity.type===n.BuiltInBaseEntity){const l=KO(r.entity);return r.isList?`List of ${l} entities${a}`:l.slice(0,1).toUpperCase()+l.slice(1)+a}else return r.isList?`List of ${r.entity.name} entities${a}`:`${r.entity.name.slice(0,1).toUpperCase()+r.entity.name.slice(1)} entity${a}`}function bJ(r){if(!r)return"Any data type";const a=r.getDataType(null);return $l(a)}function gl(r){switch(r.declaration.id){case yt.Equal:return"is equal to";case yt.NotEqual:return"is not equal to";case yt.MoreThan:return"is greater than";case yt.MoreThanOrEqual:return"is greater than or equal to";case yt.LessThan:return"is less than";case yt.LessThanOrEqual:return"is less than or equal to";case yt.And:return"and";case yt.Or:return"or";case bi.Empty:return"is empty";case bi.NotEmpty:return"is not empty"}}function HO(r){return r.includes(S.HTTP_ENDPOINT)?"HTTP endpoint":r.includes(S.PERSISTED_ENTITY)?"Persisted entity":r.includes(S.CRON_JOB)?"Scheduled execution":r.includes(S.RELATIONAL_DATABASE)?"Relational database":"Entity"}function KO(r){switch(r.name){case S.HTTP_ENDPOINT:return"HTTP endpoint";case S.PERSISTED_ENTITY:return"Persisted entity";case S.CRON_JOB:return"Scheduled execution";case S.RELATIONAL_DATABASE:return"Relational database"}return"Entity"}function RJ(r){const a=tw(r);if(!a){const e=ef(r);return e.includes(S.HTTP_ENDPOINT)?"HTTP endpoint":e.includes(S.PERSISTED_ENTITY)?"Persisted entity":e.includes(S.CRON_JOB)?"Scheduled execution":e.includes(S.RELATIONAL_DATABASE)?"Relational database":x(r,r.project)+" entity"}return x(a,r.project)+" entity"}function XO(r){let a="Find ";return r.outputsDeclarations.forEach((e,t)=>{const i=jl(e,null),s=Ll(i&&i.entity?x(i.entity,r.project):"unstructured data");t===0?a+=`${s} `:t===r.outputsDeclarations.length-1?a+=`and ${s} `:a+=`, ${s} `}),a}function QO(r){switch(r.name){case L.String:return"Text";case L.Number:return"Number";case L.Boolean:return"Boolean";case L.KeyValue:return"Data structure";case L.UUID:return"Unique identifier";case L.Date:return"Date";case L.EntityTemplate:return"Entity as template";case L.Enum:return"Enumeration";case L.File:return"File";case L.Null:return"Empty";case L.ActionDescriptor:return"Action descriptor";case L.Untyped:return"Untyped";default:return r.name}}function e1(r){switch(r.id){case ee.List:return"Loop over list items";case ee.ManualFlow:return"Manual flow control loop";case ee.ObjectKeys:return"Loop over object keys";case ee.ObjectValues:return"Loop over object values";case ee.Counted:return"Loop given number of times";case ee.String:return"Loop over text characters";case et.Addition:return"Sum numbers";case et.Subtraction:return"Subtract numbers";case et.Multiplication:return"Multiply numbers";case et.Division:return"Divide numbers";case et.Remainder:return"Get remainder of numbers";case et.Exponentiation:return"Get exponent of numbers";case Ie.AddIndex:return"Add at index position";case Ie.DeleteFirst:return"Delete first character";case Ie.DeleteLast:return"Delete last character";case Ie.DeleteIndex:return"Delete at index position";case Ie.Join:return"Join texts";case Ie.ReplaceAllMatches:return"Replace all matches";case Ie.ReplaceFirst:return"Replace first match";case Ie.ReplaceLast:return"Replace last match";case Ie.Split:return"Split text";case Ie.ReplaceIndex:return"Replace at index position";case Ie.ReplaceSingleMatch:return"Replace single match";case Ie.GetFirst:return"Get first character";case Ie.GetLast:return"Get last character";case Ie.GetIndex:return"Get at index position";case Ie.Append:return"Add at the end";case Ie.Prepend:return"Add at the start";case Qe.Wait:return"Wait";case Qe.Parallel:return"Run in parallel";case Qe.Sequential:return"Run in sequence";case Lt.HttpRequest:return"HTTP request";case tt.CreateNewInstance:return"Create new copy of entity";case he.AddIndex:return"Add item at index position";case he.DeleteFirst:return"Delete first item";case he.DeleteLast:return"Delete last item";case he.DeleteIndex:return"Delete item at index position";case he.Join:return"Join lists";case he.ReplaceAllMatches:return"Replace all matches";case he.ReplaceFirst:return"Replace first match";case he.ReplaceLast:return"Replace last match";case he.Split:return"Split list";case he.ReplaceIndex:return"Replace at index position";case he.ReplaceSingleMatch:return"Replace single match";case he.GetFirst:return"Get first item";case he.GetLast:return"Get last item";case he.GetIndex:return"Get item at index position";case he.Append:return"Add item at the end";case he.Prepend:return"Add item at the start";case ir.PROJECT_PUBLICATION_COMPLETED:return"Project publication completed";default:return(r.name.slice(0,1).toUpperCase()+r.name.slice(1)).replaceAll("-"," ")}}function x(r,a){var e;if(n.FunctionDeclaration===r.type){const t=r.name;if(Object.values(ci).includes(t))switch(t){case ci.AbortExecution:return"Abort execution";case ci.DeletePersistedEntity:return"Delete persisted entity";case ci.SoftDeletePersistedEntity:return"Soft delete persisted entity";default:return Zt(r.type).replaceAll("-"," ")}return t}if(n.BuiltInBaseEntity===r.type)return HO([r.name]);if(uf.includes(r.type)&&r.type!==n.ActionDescriptor)return r.name;switch(r.type){case n.Search:return XO(r);case n.GlobalEvent:return r.implements?x(r.implements,a):Zt(r.type).replaceAll("-"," ");case n.Operation:case n.InternalCall:case n.Loop:const t=Ai(r.declaration,a);return x(t,a);case n.ActionDescriptor:return e1(r);case n.BreakStatement:const i=Ai(r.parent,a);return`Stop loop ${x(i,a)}`;case n.ContinueStatement:const s=Ai(r.parent,a);return`Execute next iteration of ${x(s,a)}`;case n.FunctionCall:return Ai(r.declaration,a).name;case n.Condition:{const o=r;if((e=r.inputs)!=null&&e.length){const d=x(o.inputs[0],o.project);if(o.inputs[1]){const u=o.inputs[1].declaration.name;return`If ${d} ${gl(o)} ${u}`}return`If ${d} ${gl(o)}`}else return`If ${gl(o)}`}case n.ReturnStatement:{const o=Ai(r.parent,a);return`Output of ${x(o,a)}`}case n.InputMap:if(r.declaration){const o=Ai(r.declaration,a);return x(o,a)||""}else return r.name||"";case n.VariableInstance:{const o=Ai(r.declaration,a);return x(o,a)||""}case n.OutputMap:if(r.declaration){const o=Ai(r.declaration,a);return(o==null?void 0:o.name)||""}else return"";case n.PrimitiveEntity:case n.LiteralValue:return QO(r);default:return Zt(r.type).replaceAll("-"," ")}}function Ac(r,a){const e=[];r.name||e.push(new w({id:`${r.id}--${$.EmptyName}`,message:`Entity with id "${r.id}" and type "${r.type}" has an empty name. Please provide a 'name' string.`,severity:D.Error,code:$.EmptyName,issue:null}));const t=a.entities.filter(i=>i.name===r.name);return t.length&&e.push(new w({id:`${r.id}--${$.NameNotUniqueInScope}`,message:`Entity with id "${r.id}" and type "${r.type}" has a name "${r.name}" that is not unique in the project. Entity with id "${t[0].id}" has the same name.
37
37
  Please provide a unique 'name' string.`,severity:D.Error,code:$.NameNotUniqueInScope,issue:null})),e}function bc(r,a){const e=[];r.name||e.push(new w({id:`${r.id}--${$.EmptyName}`,message:`Entity with id "${r.id}" and type "${r.type}" has an empty name. Please provide a 'name' string.`,severity:D.Error,code:$.EmptyName,issue:null}));const t=r.parent?_(r.parent):null;let i=a;t&&(i=a.get(t));const s=[];i.type===n.DefinitionEntity?s.push(...i.methods.map(o=>o)):i.type===n.Project?s.push(...i.functions.map(o=>o)):i.type===n.Loop?i.body&&s.push(i.body):i.type===n.InstalledProject&&s.push(...i.functions.map(o=>o));const l=s.filter(o=>o.name===r.name);return l.length&&e.push(new w({id:`${r.id}--${$.NameNotUniqueInScope}`,message:`Entity with id "${r.id}" and type "${r.type}" has a name "${r.name}" that is not unique in ${i.type===n.Project?"the globally declared project scope":"its parent entity"}. Entity with id "${l[0].id}" has the same name.
38
38
  Please provide a unique 'name' string.`,severity:D.Error,code:$.NameNotUniqueInScope,issue:null})),e}function Rc(r,a){const e=[];r.name||e.push(new w({id:`${r.id}--${$.EmptyName}`,message:`Entity with id "${r.id}" and type "${r.type}" has an empty name. Please provide a 'name' string.`,severity:D.Error,code:$.EmptyName,issue:null}));const t=r.parent&&Ai(r.parent,a)||a;if(!t)e.push(new w({id:`${r.id}--parent-reference--${R.ReferencedEntityNotFound}`,message:`The entity with id '${r.parent}' that isn't yet found in the project. Perhaps it should be created first. Or perhaps the ID is incorrect.`,severity:D.Error,code:R.ReferencedEntityNotFound,issue:null}));else{const s=Ic(t).filter(l=>l.name===r.name);s.length&&e.push(new w({id:`${r.id}--${$.NameNotUniqueInScope}`,message:`Entity with id "${r.id}" and type "${r.type}" has a name "${r.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:D.Error,code:$.NameNotUniqueInScope,issue:null}))}return e}function Dc(r,a){const e=[];r.name||e.push(new w({id:`${r.id}--${$.EmptyName}`,message:`Entity with id "${r.id}" and type "${r.type}" has an empty name. Please provide a 'name' string.`,severity:D.Error,code:$.EmptyName,issue:null}));const t=_(r.parent);if(!t)e.push(new w({id:`${r.id}--parent-reference--${R.InvalidReferenceObjectStructure}`,message:`Reference object at 'parent' property for entity with id "${r.id}" and type "${r.type}" is not a valid reference. A reference needs to be a 'id' string of an existing entity in the project.`,severity:D.Error,code:R.InvalidReferenceObjectStructure,issue:null}));else{const i=a.get(t);if(!i)e.push(new w({id:`${r.id}--parent-reference--${R.ReferencedEntityNotFound}`,message:`The entity with id '${t}' that isn't yet found in the project. Perhaps it should be created first. Or perhaps the ID is incorrect.`,severity:D.Error,code:R.ReferencedEntityNotFound,issue:null}));else{const l=i.properties.filter(o=>o.name===r.name);l.length&&e.push(new w({id:`${r.id}--${$.NameNotUniqueInScope}`,message:`Entity with id "${r.id}" and type "${r.type}" has a name "${r.name}" that is not unique among all properties in the parent entity. Entity with id "${l[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.6243",
3
+ "version": "0.0.6244",
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",