UNPKG

@netgrif/petriflow

Version:

Javascript / Typescript library of Petriflow objects

1 lines 108 kB
"use strict";var t;exports.DataType=void 0,(t=exports.DataType||(exports.DataType={})).NUMBER="number",t.TEXT="text",t.ENUMERATION="enumeration",t.ENUMERATION_MAP="enumeration_map",t.MULTICHOICE="multichoice",t.MULTICHOICE_MAP="multichoice_map",t.BOOLEAN="boolean",t.DATE="date",t.DATETIME="dateTime",t.FILE="file",t.FILE_LIST="fileList",t.USER="user",t.USER_LIST="userList",t.BUTTON="button",t.TASK_REF="taskRef",t.CASE_REF="caseRef",t.FILTER="filter",t.I18N="i18n";var e=function(){function t(t,e){this._value=t,this._name=e}return Object.defineProperty(t.prototype,"name",{get:function(){return this._name},set:function(t){this._name=t},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"value",{get:function(){return this._value},set:function(t){this._value=t},enumerable:!1,configurable:!0}),t.prototype.clone=function(){var e=new t(this.value);return e.name=this.name,e},t.prototype.isEmpty=function(){return!this._name&&!this._value},t}(),i=function(t,e){return i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])},i(t,e)};function o(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function o(){this.constructor=t}i(t,e),t.prototype=null===e?Object.create(e):(o.prototype=e.prototype,new o)}function n(t,e,i){if(i||2===arguments.length)for(var o,n=0,r=e.length;n<r;n++)!o&&n in e||(o||(o=Array.prototype.slice.call(e,0,n)),o[n]=e[n]);return t.concat(o||Array.prototype.slice.call(e))}"function"==typeof SuppressedError&&SuppressedError;var r,s=function(t){function e(e,i,o){void 0===o&&(o=!1);var n=t.call(this,e,i)||this;return n._dynamic=o,n}return o(e,t),Object.defineProperty(e.prototype,"dynamic",{get:function(){return this._dynamic},set:function(t){this._dynamic=t},enumerable:!1,configurable:!0}),e.prototype.clone=function(){return new e(this.value,this.name,this._dynamic)},e}(e),a=function(){function t(t){this._id=t}return Object.defineProperty(t.prototype,"id",{get:function(){return this._id},set:function(t){this._id=t},enumerable:!1,configurable:!0}),t.prototype.compare=function(t){return this.id.localeCompare(t.id)},t}(),c=function(t){function e(e,i,o,n){var r=t.call(this,e)||this;return r._x=i,r._y=o,r._label=n,r}return o(e,t),Object.defineProperty(e.prototype,"x",{get:function(){return this._x},set:function(t){this._x=t},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"y",{get:function(){return this._y},set:function(t){this._y=t},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"label",{get:function(){return this._label},set:function(t){this._label=t},enumerable:!1,configurable:!0}),e}(a),l=function(t){function i(i,o,n,r){var s=t.call(this,r,i,o,new e(""))||this;return s._static=n,s._marking=0,s}return o(i,t),Object.defineProperty(i.prototype,"static",{get:function(){return this._static},set:function(t){this._static=t},enumerable:!1,configurable:!0}),Object.defineProperty(i.prototype,"marking",{get:function(){return this._marking},set:function(t){this._marking=t},enumerable:!1,configurable:!0}),i.prototype.clone=function(){var t,e=new i(this.x,this.y,this.static,this.id);return e.label=null===(t=this.label)||void 0===t?void 0:t.clone(),e._marking=this._marking,e},i}(c),p=function(){function t(){this._events=new Map}return Object.defineProperty(t.prototype,"events",{get:function(){return this._events},enumerable:!1,configurable:!0}),t.prototype.getEvents=function(){return Array.from(this._events.values())},t.prototype.getEvent=function(t){return this._events.get(t)},t.prototype.addEvent=function(t){if(this._events.has(t.type))throw new Error("Duplicate event of type ".concat(t.type));this._events.set(t.type,t)},t.prototype.removeEvent=function(t){this._events.delete(t)},t.prototype.mergeEvent=function(t){var e,i;if(this._events.has(t.type)){var o=this._events.get(t.type);if(!o)return;(e=o.preActions).push.apply(e,t.preActions),(i=o.postActions).push.apply(i,t.postActions)}else this._events.set(t.type,t)},t}(),u=function(t){function i(i){var o=t.call(this)||this;return o._id=i,o._title=new e(""),o._global=!1,o}return o(i,t),Object.defineProperty(i.prototype,"id",{get:function(){return this._id},set:function(t){this._id=t},enumerable:!1,configurable:!0}),Object.defineProperty(i.prototype,"title",{get:function(){return this._title},set:function(t){this._title=t},enumerable:!1,configurable:!0}),Object.defineProperty(i.prototype,"global",{get:function(){return this._global},set:function(t){this._global=t},enumerable:!1,configurable:!0}),i.prototype.clone=function(){var t,e=new i(this._id);return e._title=null===(t=this._title)||void 0===t?void 0:t.clone(),e._global=this._global,this.getEvents().forEach((function(t){return e.addEvent(t.clone())})),e},i.prototype.compare=function(t){return this.id.localeCompare(t.id)},i.ANONYMOUS="anonymous",i.DEFAULT="default",i}(p),f=function(){function t(){this._id="new_model",this._version="",this._lastChanged=Date.now(),this._initials="NEW",this._title=new e("New Model"),this._icon="device_hub",this._defaultRole=!0,this._anonymousRole=!0,this._transitionRole=!1,this._caseName=new s(""),this._transitions=new Map,this._places=new Map,this._arcs=new Map,this._data=new Map,this._transactions=new Map,this._roles=new Map,this._functions=new Array,this._roleRefs=new Map,this._userRefs=new Map,this._i18ns=new Map,this._processEvents=new Map,this._caseEvents=new Map,this._mappings=new Map,this._tags=new Map}return Object.defineProperty(t.prototype,"id",{get:function(){return this._id},set:function(t){this._id=t},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"version",{get:function(){return this._version},set:function(t){this._version=t},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"lastChanged",{get:function(){return this._lastChanged},set:function(t){this._lastChanged=t},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"initials",{get:function(){return this._initials},set:function(t){this._initials=t},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"title",{get:function(){return this._title},set:function(t){this._title=t},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"icon",{get:function(){return this._icon},set:function(t){this._icon=t},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"defaultRole",{get:function(){return this._defaultRole},set:function(t){this._defaultRole=t},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"anonymousRole",{get:function(){return this._anonymousRole},set:function(t){this._anonymousRole=t},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"transitionRole",{get:function(){return this._transitionRole},set:function(t){this._transitionRole=t},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"caseName",{get:function(){return this._caseName},set:function(t){this._caseName=t},enumerable:!1,configurable:!0}),t.prototype.getRoleRefs=function(){return Array.from(this._roleRefs.values())},t.prototype.getRoleRef=function(t){return this._roleRefs.get(t)},t.prototype.addRoleRef=function(t){if(!this._roles.has(t.id)&&t.id!==u.DEFAULT&&t.id!==u.ANONYMOUS)throw new Error("Referenced role with id ".concat(t.id," does not exist"));if(this._roleRefs.has(t.id))throw new Error("Duplicate role ref with id ".concat(t.id));this._roleRefs.set(t.id,t)},t.prototype.removeRoleRef=function(t){this._roleRefs.delete(t)},t.prototype.getUserRefs=function(){return Array.from(this._userRefs.values())},t.prototype.getUserRef=function(t){return this._userRefs.get(t)},t.prototype.addUserRef=function(t){var e;if(!this._data.has(t.id))throw new Error("Referenced user field with id ".concat(t.id," does not exist"));if((null===(e=this._data.get(t.id))||void 0===e?void 0:e.type)!==exports.DataType.USER_LIST)throw new Error("Referenced field with id ".concat(t.id," is not user field"));if(this._userRefs.has(t.id))throw new Error("Duplicate user ref with id ".concat(t.id));this._userRefs.set(t.id,t)},t.prototype.removeUserRef=function(t){this._userRefs.delete(t)},t.prototype.getProcessEvents=function(){return Array.from(this._processEvents.values())},t.prototype.getProcessEvent=function(t){return this._processEvents.get(t)},t.prototype.addProcessEvent=function(t){if(this._processEvents.has(t.type))throw new Error("Duplicate process event of type ".concat(t.type));this._processEvents.set(t.type,t)},t.prototype.removeProcessEvent=function(t){this._processEvents.delete(t)},t.prototype.getCaseEvents=function(){return Array.from(this._caseEvents.values())},t.prototype.getCaseEvent=function(t){return this._caseEvents.get(t)},t.prototype.addCaseEvent=function(t){if(this._caseEvents.has(t.type))throw new Error("Duplicate case event of type ".concat(t.type));this._caseEvents.set(t.type,t)},t.prototype.removeCaseEvent=function(t){this._caseEvents.delete(t)},t.prototype.getTransactions=function(){return Array.from(this._transactions.values())},t.prototype.getTransaction=function(t){return this._transactions.get(t)},t.prototype.addTransaction=function(t){if(this._transactions.has(t.id))throw new Error("Duplicate transaction with id ".concat(t.id));this._transactions.set(t.id,t)},t.prototype.removeTransaction=function(t){this._transactions.delete(t)},t.prototype.getRoles=function(){return Array.from(this._roles.values())},t.prototype.getRole=function(t){return this._roles.get(t)},t.prototype.addRole=function(t){if(this._roles.has(t.id))throw new Error("Duplicate role with id ".concat(t.id));this._roles.set(t.id,t)},t.prototype.removeRole=function(t){this._roles.delete(t)},Object.defineProperty(t.prototype,"functions",{get:function(){return this._functions},set:function(t){this._functions=t},enumerable:!1,configurable:!0}),t.prototype.addFunction=function(t){this._functions.push(t)},t.prototype.getDataSet=function(){return Array.from(this._data.values())},t.prototype.getData=function(t){return this._data.get(t)},t.prototype.addData=function(t){if(this._data.has(t.id))throw new Error("Duplicate data variable with id ".concat(t.id));this._data.set(t.id,t)},t.prototype.removeData=function(t){this._data.delete(t)},t.prototype.getMappings=function(){return Array.from(this._mappings.values())},t.prototype.getMapping=function(t){return this._mappings.get(t)},t.prototype.addMapping=function(t){if(this._mappings.has(t.id))throw new Error("Duplicate mapping with id ".concat(t.id));this._mappings.set(t.id,t)},t.prototype.removeMapping=function(t){this._mappings.delete(t)},t.prototype.getI18ns=function(){return Array.from(this._i18ns.values())},t.prototype.getI18n=function(t){return this._i18ns.get(t)},t.prototype.addI18n=function(t){if(this._i18ns.has(t.locale))throw new Error("Duplicate i18n with locale ".concat(t.locale));this._i18ns.set(t.locale,t)},t.prototype.removeI18n=function(t){this._i18ns.delete(t)},t.prototype.getTransitions=function(){return Array.from(this._transitions.values())},t.prototype.getTransition=function(t){return this._transitions.get(t)},t.prototype.addTransition=function(t){if(this._transitions.has(t.id))throw new Error("Duplicate transition with id ".concat(t.id));this._transitions.set(t.id,t)},t.prototype.removeTransition=function(t){this._transitions.delete(t)},t.prototype.getPlaces=function(){return Array.from(this._places.values())},t.prototype.getPlace=function(t){return this._places.get(t)},t.prototype.addPlace=function(t){if(this._places.has(t.id))throw new Error("Duplicate place with id ".concat(t.id));this._places.set(t.id,t)},t.prototype.removePlace=function(t){this._places.delete(t)},t.prototype.getArcs=function(){return Array.from(this._arcs.values())},t.prototype.getArc=function(t){return this._arcs.get(t)},t.prototype.addArc=function(t){if(this._arcs.has(t.id))throw new Error("Duplicate arc with id ".concat(t.id));this._arcs.set(t.id,t)},t.prototype.removeArc=function(t){this._arcs.delete(t)},Object.defineProperty(t.prototype,"tags",{get:function(){return this._tags},set:function(t){this._tags=t},enumerable:!1,configurable:!0}),t.prototype.clone=function(){var e,i,o=new t;return o._id=this._id,o._version=this._version,o._lastChanged=this._lastChanged,o._initials=this._initials,o._title=null===(e=this._title)||void 0===e?void 0:e.clone(),o._icon=this._icon,o._defaultRole=this._defaultRole,o._anonymousRole=this._anonymousRole,o._transitionRole=this._transitionRole,o._caseName=null===(i=this._caseName)||void 0===i?void 0:i.clone(),this._processEvents.forEach((function(t){return o.addProcessEvent(t.clone())})),this._caseEvents.forEach((function(t){return o.addCaseEvent(t.clone())})),this._transactions.forEach((function(t){return o.addTransaction(t.clone())})),this._roles.forEach((function(t){return o.addRole(t.clone())})),this._functions.forEach((function(t){return o.addFunction(t.clone())})),this._data.forEach((function(t){return o.addData(t.clone())})),this._mappings.forEach((function(t){return o.addMapping(t.clone())})),this._i18ns.forEach((function(t){return o.addI18n(t.clone())})),this._transitions.forEach((function(t){return o.addTransition(t.clone())})),this._places.forEach((function(t){return o.addPlace(t.clone())})),this._arcs.forEach((function(t){var e=t.clone();e.source instanceof l?(e.source=o.getPlace(e.source.id),e.destination=o.getTransition(e.destination.id)):(e.source=o.getTransition(e.source.id),e.destination=o.getPlace(e.destination.id)),o.addArc(e)})),this._roleRefs.forEach((function(t){return o.addRoleRef(t.clone())})),this._userRefs.forEach((function(t){return o.addUserRef(t.clone())})),this._tags.forEach((function(t,e){return o.tags.set(e,t)})),o},t}(),h=function(t){function e(e,i){var o=t.call(this,e)||this;return o._definition=i,o}return o(e,t),Object.defineProperty(e.prototype,"definition",{get:function(){return this._definition},set:function(t){this._definition=t},enumerable:!1,configurable:!0}),e.prototype.clone=function(){return new e(this.id,this._definition)},e}(a);exports.EventPhase=void 0,(r=exports.EventPhase||(exports.EventPhase={})).PRE="pre",r.POST="post";var d,g=function(t){function i(i,o){var n=t.call(this,o)||this;return n._type=i,n._preActions=[],n._postActions=[],n._message=new e(""),n}return o(i,t),Object.defineProperty(i.prototype,"type",{get:function(){return this._type},set:function(t){this._type=t},enumerable:!1,configurable:!0}),Object.defineProperty(i.prototype,"preActions",{get:function(){return this._preActions},enumerable:!1,configurable:!0}),Object.defineProperty(i.prototype,"postActions",{get:function(){return this._postActions},enumerable:!1,configurable:!0}),Object.defineProperty(i.prototype,"message",{get:function(){return this._message},set:function(t){this._message=t},enumerable:!1,configurable:!0}),i.prototype.addAction=function(t,e){if(!t)throw new Error("Action is undefined");if(!e)throw new Error("Event phase is undefined");e===exports.EventPhase.PRE?this._preActions.push(t):this._postActions.push(t)},i.prototype.isEmpty=function(){return 0===this.preActions.length&&0===this.postActions.length&&this.message.isEmpty()},i}(a),m=function(t){function e(e,i){return t.call(this,e,i)||this}return o(e,t),e.prototype.clone=function(){var t=new e(this.type,this.id);return this.preActions.forEach((function(e){return t.preActions.push(e)})),this.postActions.forEach((function(e){return t.postActions.push(e)})),t},e}(g);exports.CaseEventType=void 0,(d=exports.CaseEventType||(exports.CaseEventType={})).CREATE="create",d.DELETE="delete";var y,v=function(){function t(){}return Object.defineProperty(t.prototype,"create",{get:function(){return this._create},set:function(t){this._create=t},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"delete",{get:function(){return this._delete},set:function(t){this._delete=t},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"view",{get:function(){return this._view},set:function(t){this._view=t},enumerable:!1,configurable:!0}),t.prototype.clone=function(){var e=new t;return e.create=this.create,e.delete=this.delete,e.view=this.view,e},t}();exports.FunctionScope=void 0,(y=exports.FunctionScope||(exports.FunctionScope={})).NAMESPACE="namespace",y.PROCESS="process";var _=function(t){function e(e,i){var o=t.call(this,e)||this;return o._transitionRef=i,o._roleRef=[],o._dataRef=[],o._dataGroup=[],o._trigger=[],o}return o(e,t),Object.defineProperty(e.prototype,"transitionRef",{get:function(){return this._transitionRef},set:function(t){this._transitionRef=t},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"roleRef",{get:function(){return this._roleRef},set:function(t){this._roleRef=t},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"dataRef",{get:function(){return this._dataRef},set:function(t){this._dataRef=t},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"dataGroup",{get:function(){return this._dataGroup},set:function(t){this._dataGroup=t},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"trigger",{get:function(){return this._trigger},set:function(t){this._trigger=t},enumerable:!1,configurable:!0}),e.prototype.clone=function(){var t=new e(this.id,this._transitionRef);return t._roleRef=this._roleRef.map((function(t){return t.clone()})),t._dataRef=this._dataRef.map((function(t){return t.clone()})),t._dataGroup=this._dataGroup.map((function(t){return t.clone()})),t._trigger=this._trigger.map((function(t){return t.clone()})),t},e}(a),b=function(){function t(t,e){this._id=t,this._logic=e}return Object.defineProperty(t.prototype,"id",{get:function(){return this._id},set:function(t){this._id=t},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"logic",{get:function(){return this._logic},set:function(t){this._logic=t},enumerable:!1,configurable:!0}),t.prototype.compare=function(t){return this.id.localeCompare(t.id)},t}(),E=function(){function t(t,e,i){void 0===i&&(i=""),this._name=t,this._scope=e,this._definition=i}return Object.defineProperty(t.prototype,"name",{get:function(){return this._name},set:function(t){this._name=t},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"scope",{get:function(){return this._scope},set:function(t){this._scope=t},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"definition",{get:function(){return this._definition},set:function(t){this._definition=t},enumerable:!1,configurable:!0}),t.prototype.clone=function(){return new t(this.name,this.scope,this.definition)},t.prototype.compare=function(t){return this.name.localeCompare(t.name)},t}(),x=function(t){function e(e,i){return t.call(this,e,i)||this}return o(e,t),e.prototype.clone=function(){var t=new e(this.type,this.id);return this.preActions.forEach((function(e){return t.preActions.push(e.clone())})),this.postActions.forEach((function(e){return t.postActions.push(e.clone())})),t},e}(g);exports.ProcessEventType=void 0,(exports.ProcessEventType||(exports.ProcessEventType={})).UPLOAD="upload";var T,A,R=function(t){function e(e){return t.call(this,e,new v)||this}return o(e,t),e.prototype.clone=function(){var t,i=new e(this.id);return i.logic=null===(t=this.logic)||void 0===t?void 0:t.clone(),i},e}(b),w=function(t){function e(e,i){var o=t.call(this,e)||this;return o._title=i,o}return o(e,t),Object.defineProperty(e.prototype,"title",{get:function(){return this._title},set:function(t){this._title=t},enumerable:!1,configurable:!0}),e.prototype.clone=function(){var t;return new e(this.id,null===(t=this._title)||void 0===t?void 0:t.clone())},e}(a);exports.ArcType=void 0,(T=exports.ArcType||(exports.ArcType={})).REGULAR_PT="regular_pt",T.REGULAR_TP="regular_tp",T.READ="read",T.RESET="reset",T.INHIBITOR="inhibitor",exports.XmlArcType=void 0,(A=exports.XmlArcType||(exports.XmlArcType={})).REGULAR="regular",A.READ="read",A.RESET="reset",A.INHIBITOR="inhibitor";var U,P=function(t){function e(e,i,o){var n=t.call(this,o)||this;return n._source=e,n._destination=i,n._multiplicity=1,n._breakpoints=[],n}return o(e,t),Object.defineProperty(e.prototype,"source",{get:function(){return this._source},set:function(t){this._source=t},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"destination",{get:function(){return this._destination},set:function(t){this._destination=t},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"multiplicity",{get:function(){return this._multiplicity},set:function(t){this._multiplicity=t},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"reference",{get:function(){return this._reference},set:function(t){this._reference=t},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"breakpoints",{get:function(){return this._breakpoints},set:function(t){this._breakpoints=t},enumerable:!1,configurable:!0}),e.prototype.cloneAttributes=function(t){var e;t._multiplicity=this._multiplicity,t._reference=this._reference,t._breakpoints=null===(e=this._breakpoints)||void 0===e?void 0:e.map((function(t){return t.clone()}))},e.arcTypeMapping=new Map([[exports.ArcType.REGULAR_TP,exports.XmlArcType.REGULAR],[exports.ArcType.REGULAR_PT,exports.XmlArcType.REGULAR],[exports.ArcType.READ,exports.XmlArcType.READ],[exports.ArcType.RESET,exports.XmlArcType.RESET],[exports.ArcType.INHIBITOR,exports.XmlArcType.INHIBITOR]]),e}(a),N=function(){function t(t,e){this._x=t,this._y=e}return Object.defineProperty(t.prototype,"x",{get:function(){return this._x},set:function(t){this._x=t},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"y",{get:function(){return this._y},set:function(t){this._y=t},enumerable:!1,configurable:!0}),t.prototype.clone=function(){return new t(this.x,this.y)},t}(),I=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return o(e,t),e.prototype.assertCanFire=function(){if(!this.canFire())throw new Error("Firing precondition of arc ".concat(this.id," is not fulfilled"))},e}(P),O=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return o(e,t),e.prototype.consume=function(){return this.assertCanFire(),0},e.prototype.canFire=function(){return this.source.marking<this.multiplicity},Object.defineProperty(e.prototype,"type",{get:function(){return exports.ArcType.INHIBITOR},enumerable:!1,configurable:!0}),e.prototype.clone=function(){var i=new e(this.source,this.destination,this.id);return t.prototype.cloneAttributes.call(this,i),i},e}(I),C=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return o(e,t),e.prototype.consume=function(){return this.assertCanFire(),0},e.prototype.canFire=function(){return this.source.marking>=this.multiplicity},Object.defineProperty(e.prototype,"type",{get:function(){return exports.ArcType.READ},enumerable:!1,configurable:!0}),e.prototype.clone=function(){var i=new e(this.source,this.destination,this.id);return t.prototype.cloneAttributes.call(this,i),i},e}(I),D=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return o(e,t),e.prototype.consume=function(){return this.assertCanFire(),this.source.marking-=this.multiplicity,this.multiplicity},e.prototype.canFire=function(){return this.source.marking>=this.multiplicity},Object.defineProperty(e.prototype,"type",{get:function(){return exports.ArcType.REGULAR_PT},enumerable:!1,configurable:!0}),e.prototype.clone=function(){var i=new e(this.source,this.destination,this.id);return t.prototype.cloneAttributes.call(this,i),i},e}(I),S=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return o(e,t),e}(P),V=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return o(e,t),e.prototype.produce=function(){this.destination.marking+=this.multiplicity},Object.defineProperty(e.prototype,"type",{get:function(){return exports.ArcType.REGULAR_TP},enumerable:!1,configurable:!0}),e.prototype.clone=function(){var i=new e(this.source,this.destination,this.id);return t.prototype.cloneAttributes.call(this,i),i},e}(S),L=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return o(e,t),e.prototype.consume=function(){var t=this.source.marking;return this.source.marking=0,t},e.prototype.canFire=function(){return!0},Object.defineProperty(e.prototype,"type",{get:function(){return exports.ArcType.RESET},enumerable:!1,configurable:!0}),e.prototype.clone=function(){var i=new e(this.source,this.destination,this.id);return t.prototype.cloneAttributes.call(this,i),i},e}(I),j=function(){function t(t){this._name=t,this._properties=new Array,this._icons=new Array}return Object.defineProperty(t.prototype,"name",{get:function(){return this._name},set:function(t){this._name=t},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"properties",{get:function(){return this._properties},set:function(t){this._properties=t},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"icons",{get:function(){return this._icons},set:function(t){this._icons=t},enumerable:!1,configurable:!0}),t.prototype.clone=function(){var e=new t(this._name);return e.properties=this.properties.map((function(t){return t.clone()})),e.icons=this.icons.map((function(t){return t.clone()})),e},t}(),k=function(t){function e(e,i){return t.call(this,e,i)||this}return o(e,t),e.prototype.clone=function(){var t=new e(this.type,this.id);return this.preActions.forEach((function(e){return t.preActions.push(e)})),this.postActions.forEach((function(e){return t.postActions.push(e)})),t},e}(g);exports.DataEventType=void 0,(U=exports.DataEventType||(exports.DataEventType={})).SET="set",U.GET="get";var B,M=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return o(e,t),e.prototype.addAction=function(t,e,i){var o;this.events.has(e)||this.addEvent(new k(e,"")),i||(i=e===exports.DataEventType.GET?exports.EventPhase.PRE:exports.EventPhase.POST),null===(o=this.events.get(e))||void 0===o||o.addAction(t,i)},e}(p),F=function(t){function i(i,o){var n=t.call(this)||this;return n._id=i,n._title=new e(""),n._placeholder=new e(""),n._desc=new e(""),n._type=o,n._options=new Array,n._validations=[],n._inits=[],n._immediate=!1,n._actionRef=[],n._allowedNets=[],n}return o(i,t),Object.defineProperty(i.prototype,"id",{get:function(){return this._id},set:function(t){this._id=t},enumerable:!1,configurable:!0}),Object.defineProperty(i.prototype,"title",{get:function(){return this._title},set:function(t){this._title=t},enumerable:!1,configurable:!0}),Object.defineProperty(i.prototype,"placeholder",{get:function(){return this._placeholder},set:function(t){this._placeholder=t},enumerable:!1,configurable:!0}),Object.defineProperty(i.prototype,"desc",{get:function(){return this._desc},set:function(t){this._desc=t},enumerable:!1,configurable:!0}),Object.defineProperty(i.prototype,"options",{get:function(){return this._options},set:function(t){this._options=t},enumerable:!1,configurable:!0}),Object.defineProperty(i.prototype,"optionsInit",{get:function(){return this._optionsInit},set:function(t){this._optionsInit=t},enumerable:!1,configurable:!0}),Object.defineProperty(i.prototype,"validations",{get:function(){return this._validations},set:function(t){this._validations=t},enumerable:!1,configurable:!0}),Object.defineProperty(i.prototype,"init",{get:function(){return this._init},set:function(t){this._init=t},enumerable:!1,configurable:!0}),Object.defineProperty(i.prototype,"inits",{get:function(){return this._inits},set:function(t){this._inits=t},enumerable:!1,configurable:!0}),Object.defineProperty(i.prototype,"component",{get:function(){return this._component},set:function(t){this._component=t},enumerable:!1,configurable:!0}),Object.defineProperty(i.prototype,"type",{get:function(){return this._type},set:function(t){this._type=t},enumerable:!1,configurable:!0}),Object.defineProperty(i.prototype,"immediate",{get:function(){return this._immediate},set:function(t){this._immediate=t},enumerable:!1,configurable:!0}),Object.defineProperty(i.prototype,"encryption",{get:function(){return this._encryption},set:function(t){this._encryption=t},enumerable:!1,configurable:!0}),Object.defineProperty(i.prototype,"remote",{get:function(){return this._remote},set:function(t){this._remote=t},enumerable:!1,configurable:!0}),Object.defineProperty(i.prototype,"actionRef",{get:function(){return this._actionRef},set:function(t){this._actionRef=t},enumerable:!1,configurable:!0}),Object.defineProperty(i.prototype,"length",{get:function(){return this._length},set:function(t){this._length=t},enumerable:!1,configurable:!0}),Object.defineProperty(i.prototype,"allowedNets",{get:function(){return this._allowedNets},set:function(t){this._allowedNets=t},enumerable:!1,configurable:!0}),i.prototype.clone=function(){var t,e,o,r,s,a,c,l,p,u=new i(this._id,this._type);return u._title=null===(t=this._title)||void 0===t?void 0:t.clone(),u._placeholder=null===(e=this._placeholder)||void 0===e?void 0:e.clone(),u._desc=null===(o=this._desc)||void 0===o?void 0:o.clone(),u._options=null===(r=this._options)||void 0===r?void 0:r.map((function(t){return t.clone()})),u._optionsInit=null===(s=this._optionsInit)||void 0===s?void 0:s.clone(),u._validations=null===(a=this._validations)||void 0===a?void 0:a.map((function(t){return t.clone()})),u._init=null===(c=this._init)||void 0===c?void 0:c.clone(),u._inits=null===(l=this._inits)||void 0===l?void 0:l.map((function(t){return t.clone()})),u._component=null===(p=this._component)||void 0===p?void 0:p.clone(),u._immediate=this._immediate,u._encryption=this._encryption,u._remote=this._remote,u._actionRef=n([],this._actionRef,!0),u._length=this._length,u._allowedNets=n([],this._allowedNets,!0),this.getEvents().forEach((function(t){return u.addEvent(t.clone())})),u},i.prototype.compare=function(t){return this.id.localeCompare(t.id)},i}(M),G=function(){function t(t,e){void 0===e&&(e=!1),this._dynamic=e,this._expression=t}return Object.defineProperty(t.prototype,"dynamic",{get:function(){return this._dynamic},set:function(t){this._dynamic=t},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"expression",{get:function(){return this._expression},set:function(t){this._expression=t},enumerable:!1,configurable:!0}),t.prototype.clone=function(){return new t(this._expression,this._dynamic)},t}();exports.IconType=void 0,(B=exports.IconType||(exports.IconType={})).MATERIAL="material",B.SVG="svg";var X,H,W,Y,q=function(){function t(t,e,i){void 0===i&&(i=exports.IconType.MATERIAL),this._key=t,this._icon=e,this._type=i}return Object.defineProperty(t.prototype,"key",{get:function(){return this._key},set:function(t){this._key=t},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"icon",{get:function(){return this._icon},set:function(t){this._icon=t},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"type",{get:function(){return this._type},set:function(t){this._type=t},enumerable:!1,configurable:!0}),t.prototype.clone=function(){return new t(this._key,this._icon,this._type)},t}(),z=function(){function t(t,i){void 0===t&&(t=""),void 0===i&&(i=new e("")),this._key=t,this._value=i}return Object.defineProperty(t.prototype,"key",{get:function(){return this._key},set:function(t){this._key=t},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"value",{get:function(){return this._value},set:function(t){this._value=t},enumerable:!1,configurable:!0}),t.of=function(e,i){var o=new t;return o._key=e,o._value=i,o},t.prototype.clone=function(){var e,i=new t;return i._key=this._key,i._value=null===(e=this._value)||void 0===e?void 0:e.clone(),i},t}(),Q=function(){function t(t,e){this._key=t,this._value=e}return Object.defineProperty(t.prototype,"key",{get:function(){return this._key},set:function(t){this._key=t},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"value",{get:function(){return this._value},set:function(t){this._value=t},enumerable:!1,configurable:!0}),t.prototype.clone=function(){return new t(this._key,this._value)},t}(),K=function(){function t(){this._message=new e("")}return Object.defineProperty(t.prototype,"expression",{get:function(){return this._expression},set:function(t){this._expression=t},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"message",{get:function(){return this._message},set:function(t){this._message=t},enumerable:!1,configurable:!0}),t.prototype.clone=function(){var e,i,o=new t;return o.expression=null===(e=this._expression)||void 0===e?void 0:e.clone(),o.message=null===(i=this._message)||void 0===i?void 0:i.clone(),o},t}(),$=function(){function t(t){this._locale=t,this._i18ns=new Map}return Object.defineProperty(t.prototype,"locale",{get:function(){return this._locale},set:function(t){this._locale=t},enumerable:!1,configurable:!0}),t.prototype.getI18ns=function(){return Array.from(this._i18ns.values())},t.prototype.getI18n=function(t){return this._i18ns.get(t)},t.prototype.addI18n=function(t){if(t&&t.name){if(this._i18ns.has(t.name))throw new Error("Duplicate translation with name ".concat(t.name));this._i18ns.set(t.name,t)}},t.prototype.removeI18n=function(t){this._i18ns.delete(t)},t.prototype.clone=function(){var e=new t(this._locale);return this._i18ns.forEach((function(t){return e.addI18n(t.clone())})),e},t}(),J=function(t){function i(i,o){var n=t.call(this,i,o)||this;return n._title=new e(""),n}return o(i,t),Object.defineProperty(i.prototype,"title",{get:function(){return this._title},set:function(t){this._title=t},enumerable:!1,configurable:!0}),i.prototype.clone=function(){var t,e,o=new i(this.type,this.id);return o.message=null===(t=this.message)||void 0===t?void 0:t.clone(),o._title=null===(e=this._title)||void 0===e?void 0:e.clone(),this.preActions.forEach((function(t){return o.preActions.push(t.clone())})),this.postActions.forEach((function(t){return o.postActions.push(t.clone())})),o},i.prototype.isEmpty=function(){return t.prototype.isEmpty.call(this)&&this._title.isEmpty()},i}(g);exports.RoleEventType=void 0,(X=exports.RoleEventType||(exports.RoleEventType={})).ASSIGN="assign",X.CANCEL="cancel",exports.Alignment=void 0,(H=exports.Alignment||(exports.Alignment={})).TOP="top",H.CENTER="center",H.BOTTOM="bottom",exports.Appearance=void 0,(W=exports.Appearance||(exports.Appearance={})).LEGACY="legacy",W.STANDARD="standard",W.FILL="fill",W.OUTLINE="outline",exports.AssignPolicy=void 0,(Y=exports.AssignPolicy||(exports.AssignPolicy={})).MANUAL="manual",Y.AUTO="auto";var Z,tt,et=function(){function t(){}return Object.defineProperty(t.prototype,"cancel",{get:function(){return this._cancel},set:function(t){this._cancel=t},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"reassign",{get:function(){return this._reassign},set:function(t){this._reassign=t},enumerable:!1,configurable:!0}),t.prototype.clone=function(){var e=new t;return e.cancel=this.cancel,e.reassign=this.reassign,e},t}();exports.CompactDirection=void 0,(Z=exports.CompactDirection||(exports.CompactDirection={})).UP="up",Z.NONE="none",exports.DataFocusPolicy=void 0,(tt=exports.DataFocusPolicy||(exports.DataFocusPolicy={})).MANUAL="manual",tt.AUTO_EMPTY_REQUIRED="auto_empty_required";var it,ot=function(){function t(){}return Object.defineProperty(t.prototype,"rows",{get:function(){return this._rows},set:function(t){this._rows=t},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"cols",{get:function(){return this._cols},set:function(t){this._cols=t},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"offset",{get:function(){return this._offset},set:function(t){this._offset=t},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"alignment",{get:function(){return this._alignment},set:function(t){this._alignment=t},enumerable:!1,configurable:!0}),t}();exports.Template=void 0,(it=exports.Template||(exports.Template={})).MATERIAL="material",it.NETGRIF="netgrif";var nt,rt=function(t){function e(e,i,o,n){void 0===e&&(e=0),void 0===i&&(i=0),void 0===o&&(o=exports.Template.MATERIAL),void 0===n&&(n=exports.Appearance.OUTLINE);var r=t.call(this)||this;return r._x=e,r._y=i,r._template=o,r._appearance=n,r}return o(e,t),Object.defineProperty(e.prototype,"x",{get:function(){return this._x},set:function(t){this._x=t},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"y",{get:function(){return this._y},set:function(t){this._y=t},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"template",{get:function(){return this._template},set:function(t){this._template=t},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"appearance",{get:function(){return this._appearance},set:function(t){this._appearance=t},enumerable:!1,configurable:!0}),e.prototype.clone=function(){var t=new e;return t._x=this._x,t._y=this._y,t._template=this._template,t._appearance=this._appearance,t.rows=this.rows,t.cols=this.cols,t.offset=this.offset,t.alignment=this.alignment,t},e}(ot);exports.DataRefBehavior=void 0,(nt=exports.DataRefBehavior||(exports.DataRefBehavior={})).REQUIRED="required",nt.IMMEDIATE="immediate",nt.OPTIONAL="optional",nt.VISIBLE="visible",nt.EDITABLE="editable",nt.HIDDEN="hidden",nt.FORBIDDEN="forbidden";var st,at,ct,lt=function(){function t(){this._behavior=exports.DataRefBehavior.EDITABLE,this._required=!1,this._immediate=!1,this._actionRefs=[]}return Object.defineProperty(t.prototype,"behavior",{get:function(){return this._behavior},set:function(t){this._behavior=t},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"required",{get:function(){return this._required},set:function(t){this._required=t},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"immediate",{get:function(){return this._immediate},set:function(t){this._immediate=t},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"actionRefs",{get:function(){return this._actionRefs},set:function(t){this._actionRefs=t},enumerable:!1,configurable:!0}),t.prototype.clone=function(){var e=new t;return e.behavior=this.behavior,e.required=this.required,e.immediate=this.immediate,this.actionRefs.forEach((function(t){return e.actionRefs.push(t)})),e},t}(),pt=function(t){function e(e){var i=t.call(this)||this;return i._id=e,i._logic=new lt,i._layout=new rt,i}return o(e,t),Object.defineProperty(e.prototype,"id",{get:function(){return this._id},set:function(t){this._id=t},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"logic",{get:function(){return this._logic},set:function(t){this._logic=t},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"layout",{get:function(){return this._layout},set:function(t){this._layout=t},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"component",{get:function(){return this._component},set:function(t){this._component=t},enumerable:!1,configurable:!0}),e.prototype.clone=function(){var t,i,o,n=new e(this._id);return n._logic=null===(t=this._logic)||void 0===t?void 0:t.clone(),n._layout=null===(i=this._layout)||void 0===i?void 0:i.clone(),n._component=null===(o=this._component)||void 0===o?void 0:o.clone(),this.getEvents().forEach((function(t){return n.addEvent(t.clone())})),n},e}(M),ut=function(){function t(t){this._id=t,this._stretch=!1,this._dataRefs=new Map}return Object.defineProperty(t.prototype,"id",{get:function(){return this._id},set:function(t){this._id=t},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"cols",{get:function(){return this._cols},set:function(t){this._cols=t},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"rows",{get:function(){return this._rows},set:function(t){this._rows=t},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"title",{get:function(){return this._title},set:function(t){this._title=t},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"layout",{get:function(){return this._layout},set:function(t){this._layout=t},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"alignment",{get:function(){return this._alignment},set:function(t){this._alignment=t},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"stretch",{get:function(){return this._stretch},set:function(t){this._stretch=t},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"hideEmptyRows",{get:function(){return this._hideEmptyRows},set:function(t){this._hideEmptyRows=t},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"compactDirection",{get:function(){return this._compactDirection},set:function(t){this._compactDirection=t},enumerable:!1,configurable:!0}),t.prototype.getDataRefs=function(){return Array.from(this._dataRefs.values())},t.prototype.getDataRef=function(t){return this._dataRefs.get(t)},t.prototype.addDataRef=function(t){if(this._dataRefs.has(t.id))throw new Error("Duplicate data field with id ".concat(t.id));this._dataRefs.set(t.id,t)},t.prototype.removeDataRef=function(t){this._dataRefs.delete(t)},t.prototype.clone=function(){var e,i=new t(this._id);return i._cols=this._cols,i._rows=this._rows,i._title=null===(e=this._title)||void 0===e?void 0:e.clone(),i._layout=this._layout,i._alignment=this._alignment,i._stretch=this._stretch,i._hideEmptyRows=this._hideEmptyRows,i._compactDirection=this._compactDirection,this._dataRefs.forEach((function(t){i.addDataRef(t.clone())})),i},t}();exports.FinishPolicy=void 0,(st=exports.FinishPolicy||(exports.FinishPolicy={})).MANUAL="manual",st.AUTO_NO_DATA="auto_no_data",exports.HideEmptyRows=void 0,(at=exports.HideEmptyRows||(exports.HideEmptyRows={})).ALL="all",at.COMPACTED="compacted",at.NONE="none",exports.LayoutType=void 0,(ct=exports.LayoutType||(exports.LayoutType={})).FLOW="flow",ct.GRID="grid",ct.LEGACY="legacy";var ft,ht=function(){function t(){}return Object.defineProperty(t.prototype,"perform",{get:function(){return this._perform},set:function(t){this._perform=t},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"delegate",{get:function(){return this._delegate},set:function(t){this._delegate=t},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"cancel",{get:function(){return this._cancel},set:function(t){this._cancel=t},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"assign",{get:function(){return this._assign},set:function(t){this._assign=t},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"view",{get:function(){return this._view},set:function(t){this._view=t},enumerable:!1,configurable:!0}),t.prototype.clone=function(){var e=new t;return e.perform=this._perform,e.delegate=this._delegate,e.cancel=this._cancel,e.assign=this._assign,e.view=this._view,e},t}(),dt=function(t){function e(e){return t.call(this,e,new ht)||this}return o(e,t),e.prototype.clone=function(){var t,i=new e(this.id);return i.logic=null===(t=this.logic)||void 0===t?void 0:t.clone(),i},e}(b),gt=function(t){function e(){return t.call(this)||this}return o(e,t),e}(p),mt=function(t){function i(i,o,n){var r=t.call(this,n,i,o,new e(""))||this;return r._assignPolicy=exports.AssignPolicy.MANUAL,r._dataFocusPolicy=exports.DataFocusPolicy.MANUAL,r._finishPolicy=exports.FinishPolicy.MANUAL,r._triggers=[],r._roleRefs=[],r._userRefs=[],r._dataGroups=[],r._eventSource=new gt,r._tags=new Map,r}return o(i,t),Object.defineProperty(i.prototype,"layout",{get:function(){return this._layout},set:function(t){this._layout=t},enumerable:!1,configurable:!0}),Object.defineProperty(i.prototype,"icon",{get:function(){return this._icon},set:function(t){this._icon=t},enumerable:!1,configurable:!0}),Object.defineProperty(i.prototype,"priority",{get:function(){return this._priority},set:function(t){this._priority=t},enumerable:!1,configurable:!0}),Object.defineProperty(i.prototype,"assignPolicy",{get:function(){return this._assignPolicy},set:function(t){this._assignPolicy=t},enumerable:!1,configurable:!0}),Object.defineProperty(i.prototype,"finishPolicy",{get:function(){return this._finishPolicy},set:function(t){this._finishPolicy=t},enumerable:!1,configurable:!0}),Object.defineProperty(i.prototype,"dataFocusPolicy",{get:function(){return this._dataFocusPolicy},set:function(t){this._dataFocusPolicy=t},enumerable:!1,configurable:!0}),Object.defineProperty(i.prototype,"triggers",{get:function(){return this._triggers},set:function(t){this._triggers=t},enumerable:!1,configurable:!0}),Object.defineProperty(i.prototype,"transactionRef",{get:function(){return this._transactionRef},set:function(t){this._transactionRef=t},enumerable:!1,configurable:!0}),Object.defineProperty(i.prototype,"roleRefs",{get:function(){return this._roleRefs},set:function(t){this._roleRefs=t},enumerable:!1,configurable:!0}),Object.defineProperty(i.prototype,"userRefs",{get:function(){return this._userRefs},set:function(t){this._userRefs=t},enumerable:!1,configurable:!0}),Object.defineProperty(i.prototype,"dataGroups",{get:function(){return this._dataGroups},set:function(t){this._dataGroups=t},enumerable:!1,configurable:!0}),Object.defineProperty(i.prototype,"assignedUser",{get:function(){return this._assignedUser},set:function(t){this._assignedUser=t},enumerable:!1,configurable:!0}),Object.defineProperty(i.prototype,"eventSource",{get:function(){return this._eventSource},set:function(t){this._eventSource=t},enumerable:!1,configurable:!0}),Object.defineProperty(i.prototype,"tags",{get:function(){return this._tags},set:function(t){this._tags=t},enumerable:!1,configurable:!0}),i.prototype.clone=function(){var t,e,o,n=new i(this.x,this.y,this.id);return n.label=null===(t=this.label)||void 0===t?void 0:t.clone(),n._layout=null===(e=this._layout)||void 0===e?void 0:e.clone(),n._icon=this._icon,n._priority=this._priority,n._assignPolicy=this._assignPolicy,n._finishPolicy=this._finishPolicy,n._dataFocusPolicy=this._dataFocusPolicy,n._triggers=this._triggers.map((function(t){return t.clone()})),n._transactionRef=this._transactionRef,n._roleRefs=this._roleRefs.map((function(t){return t.clone()})),n._userRefs=this._userRefs.map((function(t){return t.clone()})),n._dataGroups=this._dataGroups.map((function(t){return t.clone()})),n._assignedUser=null===(o=this._assignedUser)||void 0===o?void 0:o.clone(),this.eventSource.getEvents().forEach((function(t){return n.eventSource.addEvent(t.clone())})),this.tags.forEach((function(t,e){return n.tags.set(e,t)})),n},i}(c),yt=function(t){function i(i,o){var n=t.call(this,i,o)||this;return n._title=new e(""),n}return o(i,t),Object.defineProperty(i.prototype,"title",{get:function(){return this._title},set:function(t){this._title=t},enumerable:!1,configurable:!0}),i.prototype.clone=function(){var t,e,o=new i(this.type,this.id);return o.message=null===(t=this.message)||void 0===t?void 0:t.clone(),o._title=null===(e=this._title)||void 0===e?void 0:e.clone(),this.preActions.forEach((function(t){return o.preActions.push(t.clone())})),this.postActions.forEach((function(t){return o.postActions.push(t.clone())})),o},i.prototype.isEmpty=function(){return t.prototype.isEmpty.call(this)&&this._title.isEmpty()},i}(g);exports.TransitionEventType=void 0,(ft=exports.TransitionEventType||(exports.TransitionEventType={})).ASSIGN="assign",ft.FINISH="finish",ft.CANCEL="cancel",ft.DELEGATE="delegate";var vt,_t=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return o(e,t),Object.defineProperty(e.prototype,"type",{get:function(){return this._type},set:function(t){this._type=t},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"hideEmptyRows",{get:function(){return this._hideEmptyRows},set:function(t){this._hideEmptyRows=t},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"compactDirection",{get:function(){return this._compactDirection},set:function(t){this._compactDirection=t},enumerable:!1,configurable:!0}),e.prototype.empty=function(){return void 0===this.cols&&void 0===this.rows&&void 0===this.offset&&void 0===this.alignment&&void 0===this._type},e.prototype.clone=function(){var t=new e;return t.rows=this.rows,t.cols=this.cols,t.offset=this.offset,t.alignment=this.alignment,t.hideEmptyRows=this.hideEmptyRows,t.compactDirection=this.compactDirection,t.type=this._type,t},e}(ot);exports.TriggerType=void 0,(vt=exports.TriggerType||(exports.TriggerType={})).AUTO="auto",vt.USER="user",vt.TIME="time";var bt=function(){function t(t){void 0===t&&(t=exports.TriggerType.AUTO),this._type=t}return Object.defineProperty(t.prototype,"type",{get:function(){return this._type},set:function(t){this._type=t},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"delay",{get:function(){return this._delay},set:function(t){this._delay=t},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"exact",{get:function(){return this._exact},set:function(t){this._exact=t},enumerable:!1,configurable:!0}),t.prototype.clone=function(){var e=new t;return e._type=this._type,e._delay=this._delay,this._exact&&(e._exact=new Date(this._exact.valueOf())),e},t}(),Et=function(){function t(){this.eventIdCounter=0,this.actionIdCounter=0}return t.prototype.tagValue=function(t,e){var i,o,n,r;if(!t||0===t.getElementsByTagName(e).length||0===t.getElementsByTagName(e)[0].childNodes.length)return"";var s="#document"===t.nodeName?"document":t.nodeName,a=Array.from(t.getElementsByTagName(e)).filter((function(t){var e;return(null===(e=null==t?void 0:t.parentNode)||void 0===e?void 0:e.nodeName)===s}));return void 0===a||0===a.length||0===(null===(i=a[0])||void 0===i?void 0:i.childNodes.length)?"":null!==(r=null===(n=null===(o=a[0])||void 0===o?void 0:o.childNodes[0])||void 0===n?void 0:n.nodeValue)&&void 0!==r?r:""},t.prototype.parseI18n=function(t,i){var o=new e(this.tagValue(t,i));if(""!==o.value){var n=t.getElementsByTagName(i)[0].getAttribute("name");o.name=null===n?void 0:n}return o},t.prototype.parseI18nWithDynamic=function(t,e){var i=new s(this.removeExcessiveIndents(this.tagValue(t,e)));if(""!==i.value){var o=t.getElementsByTagName(e)[0].getAttribute("name");i.name=null===o?void 0:o,i.dynamic="true"===t.getElementsByTagName(e