@processmaker/modeler 1.38.2 → 1.38.3
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/modeler.common.js +115 -69
- package/dist/modeler.common.js.map +1 -1
- package/dist/modeler.umd.js +115 -69
- package/dist/modeler.umd.js.map +1 -1
- package/dist/modeler.umd.min.js +1 -1
- package/dist/modeler.umd.min.js.map +1 -1
- package/package.json +1 -1
- package/src/mixins/linkConfig.js +22 -3
package/dist/modeler.umd.min.js
CHANGED
|
@@ -31,5 +31,5 @@ v=function(){return e};var e={},t=Object.prototype,n=t.hasOwnProperty,o=Object.d
|
|
|
31
31
|
* (c) 2021 Evan You
|
|
32
32
|
* @license MIT
|
|
33
33
|
*/
|
|
34
|
-
function bt(e){var t=Number(e.version.split(".")[0]);if(t>=2)e.mixin({beforeCreate:o});else{var n=e.prototype._init;e.prototype._init=function(e){void 0===e&&(e={}),e.init=e.init?[o].concat(e.init):o,n.call(this,e)}}function o(){var e=this.$options;e.store?this.$store="function"===typeof e.store?e.store():e.store:e.parent&&e.parent.$store&&(this.$store=e.parent.$store)}}var yt="undefined"!==typeof window?window:"undefined"!==typeof h.g?h.g:{},wt=yt.__VUE_DEVTOOLS_GLOBAL_HOOK__;function xt(e){wt&&(e._devtoolHook=wt,wt.emit("vuex:init",e),wt.on("vuex:travel-to-state",(function(t){e.replaceState(t)})),e.subscribe((function(e,t){wt.emit("vuex:mutation",e,t)}),{prepend:!0}),e.subscribeAction((function(e,t){wt.emit("vuex:action",e,t)}),{prepend:!0}))}function kt(e,t){return e.filter(t)[0]}function Ct(e,t){if(void 0===t&&(t=[]),null===e||"object"!==typeof e)return e;var n=kt(t,(function(t){return t.original===e}));if(n)return n.copy;var o=Array.isArray(e)?[]:{};return t.push({original:e,copy:o}),Object.keys(e).forEach((function(n){o[n]=Ct(e[n],t)})),o}function St(e,t){Object.keys(e).forEach((function(n){return t(e[n],n)}))}function Et(e){return null!==e&&"object"===typeof e}function At(e){return e&&"function"===typeof e.then}function Mt(e,t){return function(){return e(t)}}var Tt=function(e,t){this.runtime=t,this._children=Object.create(null),this._rawModule=e;var n=e.state;this.state=("function"===typeof n?n():n)||{}},_t={namespaced:{configurable:!0}};_t.namespaced.get=function(){return!!this._rawModule.namespaced},Tt.prototype.addChild=function(e,t){this._children[e]=t},Tt.prototype.removeChild=function(e){delete this._children[e]},Tt.prototype.getChild=function(e){return this._children[e]},Tt.prototype.hasChild=function(e){return e in this._children},Tt.prototype.update=function(e){this._rawModule.namespaced=e.namespaced,e.actions&&(this._rawModule.actions=e.actions),e.mutations&&(this._rawModule.mutations=e.mutations),e.getters&&(this._rawModule.getters=e.getters)},Tt.prototype.forEachChild=function(e){St(this._children,e)},Tt.prototype.forEachGetter=function(e){this._rawModule.getters&&St(this._rawModule.getters,e)},Tt.prototype.forEachAction=function(e){this._rawModule.actions&&St(this._rawModule.actions,e)},Tt.prototype.forEachMutation=function(e){this._rawModule.mutations&&St(this._rawModule.mutations,e)},Object.defineProperties(Tt.prototype,_t);var Pt=function(e){this.register([],e,!1)};function Ot(e,t,n){if(t.update(n),n.modules)for(var o in n.modules){if(!t.getChild(o))return void 0;Ot(e.concat(o),t.getChild(o),n.modules[o])}}Pt.prototype.get=function(e){return e.reduce((function(e,t){return e.getChild(t)}),this.root)},Pt.prototype.getNamespace=function(e){var t=this.root;return e.reduce((function(e,n){return t=t.getChild(n),e+(t.namespaced?n+"/":"")}),"")},Pt.prototype.update=function(e){Ot([],this.root,e)},Pt.prototype.register=function(e,t,n){var o=this;void 0===n&&(n=!0);var i=new Tt(t,n);if(0===e.length)this.root=i;else{var r=this.get(e.slice(0,-1));r.addChild(e[e.length-1],i)}t.modules&&St(t.modules,(function(t,i){o.register(e.concat(i),t,n)}))},Pt.prototype.unregister=function(e){var t=this.get(e.slice(0,-1)),n=e[e.length-1],o=t.getChild(n);o&&o.runtime&&t.removeChild(n)},Pt.prototype.isRegistered=function(e){var t=this.get(e.slice(0,-1)),n=e[e.length-1];return!!t&&t.hasChild(n)};var Dt;var It=function(e){var t=this;void 0===e&&(e={}),!Dt&&"undefined"!==typeof window&&window.Vue&&$t(window.Vue);var n=e.plugins;void 0===n&&(n=[]);var o=e.strict;void 0===o&&(o=!1),this._committing=!1,this._actions=Object.create(null),this._actionSubscribers=[],this._mutations=Object.create(null),this._wrappedGetters=Object.create(null),this._modules=new Pt(e),this._modulesNamespaceMap=Object.create(null),this._subscribers=[],this._watcherVM=new Dt,this._makeLocalGettersCache=Object.create(null);var i=this,r=this,s=r.dispatch,a=r.commit;this.dispatch=function(e,t){return s.call(i,e,t)},this.commit=function(e,t,n){return a.call(i,e,t,n)},this.strict=o;var l=this._modules.root.state;jt(this,l,[],this._modules.root),Lt(this,l),n.forEach((function(e){return e(t)}));var c=void 0!==e.devtools?e.devtools:Dt.config.devtools;c&&xt(this)},Nt={state:{configurable:!0}};function Rt(e,t,n){return t.indexOf(e)<0&&(n&&n.prepend?t.unshift(e):t.push(e)),function(){var n=t.indexOf(e);n>-1&&t.splice(n,1)}}function Bt(e,t){e._actions=Object.create(null),e._mutations=Object.create(null),e._wrappedGetters=Object.create(null),e._modulesNamespaceMap=Object.create(null);var n=e.state;jt(e,n,[],e._modules.root,!0),Lt(e,n,t)}function Lt(e,t,n){var o=e._vm;e.getters={},e._makeLocalGettersCache=Object.create(null);var i=e._wrappedGetters,r={};St(i,(function(t,n){r[n]=Mt(t,e),Object.defineProperty(e.getters,n,{get:function(){return e._vm[n]},enumerable:!0})}));var s=Dt.config.silent;Dt.config.silent=!0,e._vm=new Dt({data:{$$state:t},computed:r}),Dt.config.silent=s,e.strict&&Ut(e),o&&(n&&e._withCommit((function(){o._data.$$state=null})),Dt.nextTick((function(){return o.$destroy()})))}function jt(e,t,n,o,i){var r=!n.length,s=e._modules.getNamespace(n);if(o.namespaced&&(e._modulesNamespaceMap[s],e._modulesNamespaceMap[s]=o),!r&&!i){var a=Gt(t,n.slice(0,-1)),l=n[n.length-1];e._withCommit((function(){Dt.set(a,l,o.state)}))}var c=o.context=Ft(e,s,n);o.forEachMutation((function(t,n){var o=s+n;qt(e,o,t,c)})),o.forEachAction((function(t,n){var o=t.root?n:s+n,i=t.handler||t;Ht(e,o,i,c)})),o.forEachGetter((function(t,n){var o=s+n;Vt(e,o,t,c)})),o.forEachChild((function(o,r){jt(e,t,n.concat(r),o,i)}))}function Ft(e,t,n){var o=""===t,i={dispatch:o?e.dispatch:function(n,o,i){var r=Wt(n,o,i),s=r.payload,a=r.options,l=r.type;return a&&a.root||(l=t+l),e.dispatch(l,s)},commit:o?e.commit:function(n,o,i){var r=Wt(n,o,i),s=r.payload,a=r.options,l=r.type;a&&a.root||(l=t+l),e.commit(l,s,a)}};return Object.defineProperties(i,{getters:{get:o?function(){return e.getters}:function(){return zt(e,t)}},state:{get:function(){return Gt(e.state,n)}}}),i}function zt(e,t){if(!e._makeLocalGettersCache[t]){var n={},o=t.length;Object.keys(e.getters).forEach((function(i){if(i.slice(0,o)===t){var r=i.slice(o);Object.defineProperty(n,r,{get:function(){return e.getters[i]},enumerable:!0})}})),e._makeLocalGettersCache[t]=n}return e._makeLocalGettersCache[t]}function qt(e,t,n,o){var i=e._mutations[t]||(e._mutations[t]=[]);i.push((function(t){n.call(e,o.state,t)}))}function Ht(e,t,n,o){var i=e._actions[t]||(e._actions[t]=[]);i.push((function(t){var i=n.call(e,{dispatch:o.dispatch,commit:o.commit,getters:o.getters,state:o.state,rootGetters:e.getters,rootState:e.state},t);return At(i)||(i=Promise.resolve(i)),e._devtoolHook?i.catch((function(t){throw e._devtoolHook.emit("vuex:error",t),t})):i}))}function Vt(e,t,n,o){e._wrappedGetters[t]||(e._wrappedGetters[t]=function(e){return n(o.state,o.getters,e.state,e.getters)})}function Ut(e){e._vm.$watch((function(){return this._data.$$state}),(function(){0}),{deep:!0,sync:!0})}function Gt(e,t){return t.reduce((function(e,t){return e[t]}),e)}function Wt(e,t,n){return Et(e)&&e.type&&(n=t,t=e,e=e.type),{type:e,payload:t,options:n}}function $t(e){Dt&&e===Dt||(Dt=e,bt(Dt))}Nt.state.get=function(){return this._vm._data.$$state},Nt.state.set=function(e){0},It.prototype.commit=function(e,t,n){var o=this,i=Wt(e,t,n),r=i.type,s=i.payload,a=(i.options,{type:r,payload:s}),l=this._mutations[r];l&&(this._withCommit((function(){l.forEach((function(e){e(s)}))})),this._subscribers.slice().forEach((function(e){return e(a,o.state)})))},It.prototype.dispatch=function(e,t){var n=this,o=Wt(e,t),i=o.type,r=o.payload,s={type:i,payload:r},a=this._actions[i];if(a){try{this._actionSubscribers.slice().filter((function(e){return e.before})).forEach((function(e){return e.before(s,n.state)}))}catch(c){0}var l=a.length>1?Promise.all(a.map((function(e){return e(r)}))):a[0](r);return new Promise((function(e,t){l.then((function(t){try{n._actionSubscribers.filter((function(e){return e.after})).forEach((function(e){return e.after(s,n.state)}))}catch(c){0}e(t)}),(function(e){try{n._actionSubscribers.filter((function(e){return e.error})).forEach((function(t){return t.error(s,n.state,e)}))}catch(c){0}t(e)}))}))}},It.prototype.subscribe=function(e,t){return Rt(e,this._subscribers,t)},It.prototype.subscribeAction=function(e,t){var n="function"===typeof e?{before:e}:e;return Rt(n,this._actionSubscribers,t)},It.prototype.watch=function(e,t,n){var o=this;return this._watcherVM.$watch((function(){return e(o.state,o.getters)}),t,n)},It.prototype.replaceState=function(e){var t=this;this._withCommit((function(){t._vm._data.$$state=e}))},It.prototype.registerModule=function(e,t,n){void 0===n&&(n={}),"string"===typeof e&&(e=[e]),this._modules.register(e,t),jt(this,this.state,e,this._modules.get(e),n.preserveState),Lt(this,this.state)},It.prototype.unregisterModule=function(e){var t=this;"string"===typeof e&&(e=[e]),this._modules.unregister(e),this._withCommit((function(){var n=Gt(t.state,e.slice(0,-1));Dt.delete(n,e[e.length-1])})),Bt(this)},It.prototype.hasModule=function(e){return"string"===typeof e&&(e=[e]),this._modules.isRegistered(e)},It.prototype.hotUpdate=function(e){this._modules.update(e),Bt(this,!0)},It.prototype._withCommit=function(e){var t=this._committing;this._committing=!0,e(),this._committing=t},Object.defineProperties(It.prototype,Nt);var Xt=tn((function(e,t){var n={};return Qt(t).forEach((function(t){var o=t.key,i=t.val;n[o]=function(){var t=this.$store.state,n=this.$store.getters;if(e){var o=nn(this.$store,"mapState",e);if(!o)return;t=o.context.state,n=o.context.getters}return"function"===typeof i?i.call(this,t,n):t[i]},n[o].vuex=!0})),n})),Yt=tn((function(e,t){var n={};return Qt(t).forEach((function(t){var o=t.key,i=t.val;n[o]=function(){var t=[],n=arguments.length;while(n--)t[n]=arguments[n];var o=this.$store.commit;if(e){var r=nn(this.$store,"mapMutations",e);if(!r)return;o=r.context.commit}return"function"===typeof i?i.apply(this,[o].concat(t)):o.apply(this.$store,[i].concat(t))}})),n})),Zt=tn((function(e,t){var n={};return Qt(t).forEach((function(t){var o=t.key,i=t.val;i=e+i,n[o]=function(){if(!e||nn(this.$store,"mapGetters",e))return this.$store.getters[i]},n[o].vuex=!0})),n})),Kt=tn((function(e,t){var n={};return Qt(t).forEach((function(t){var o=t.key,i=t.val;n[o]=function(){var t=[],n=arguments.length;while(n--)t[n]=arguments[n];var o=this.$store.dispatch;if(e){var r=nn(this.$store,"mapActions",e);if(!r)return;o=r.context.dispatch}return"function"===typeof i?i.apply(this,[o].concat(t)):o.apply(this.$store,[i].concat(t))}})),n})),Jt=function(e){return{mapState:Xt.bind(null,e),mapGetters:Zt.bind(null,e),mapMutations:Yt.bind(null,e),mapActions:Kt.bind(null,e)}};function Qt(e){return en(e)?Array.isArray(e)?e.map((function(e){return{key:e,val:e}})):Object.keys(e).map((function(t){return{key:t,val:e[t]}})):[]}function en(e){return Array.isArray(e)||Et(e)}function tn(e){return function(t,n){return"string"!==typeof t?(n=t,t=""):"/"!==t.charAt(t.length-1)&&(t+="/"),e(t,n)}}function nn(e,t,n){var o=e._modulesNamespaceMap[n];return o}function on(e){void 0===e&&(e={});var t=e.collapsed;void 0===t&&(t=!0);var n=e.filter;void 0===n&&(n=function(e,t,n){return!0});var o=e.transformer;void 0===o&&(o=function(e){return e});var i=e.mutationTransformer;void 0===i&&(i=function(e){return e});var r=e.actionFilter;void 0===r&&(r=function(e,t){return!0});var s=e.actionTransformer;void 0===s&&(s=function(e){return e});var a=e.logMutations;void 0===a&&(a=!0);var l=e.logActions;void 0===l&&(l=!0);var c=e.logger;return void 0===c&&(c=console),function(e){var d=Ct(e.state);"undefined"!==typeof c&&(a&&e.subscribe((function(e,r){var s=Ct(r);if(n(e,d,s)){var a=an(),l=i(e),u="mutation "+e.type+a;rn(c,u,t),c.log("%c prev state","color: #9E9E9E; font-weight: bold",o(d)),c.log("%c mutation","color: #03A9F4; font-weight: bold",l),c.log("%c next state","color: #4CAF50; font-weight: bold",o(s)),sn(c)}d=s})),l&&e.subscribeAction((function(e,n){if(r(e,n)){var o=an(),i=s(e),a="action "+e.type+o;rn(c,a,t),c.log("%c action","color: #03A9F4; font-weight: bold",i),sn(c)}})))}}function rn(e,t,n){var o=n?e.groupCollapsed:e.group;try{o.call(e,t)}catch(i){e.log(t)}}function sn(e){try{e.groupEnd()}catch(t){e.log("—— log end ——")}}function an(){var e=new Date;return" @ "+cn(e.getHours(),2)+":"+cn(e.getMinutes(),2)+":"+cn(e.getSeconds(),2)+"."+cn(e.getMilliseconds(),3)}function ln(e,t){return new Array(t+1).join(e)}function cn(e,t){return ln("0",t-e.toString().length)+e}var dn={Store:It,install:$t,version:"3.6.2",mapState:Xt,mapMutations:Yt,mapGetters:Zt,mapActions:Kt,createNamespacedHelpers:Jt,createLogger:on},un=dn,pn=h(85564),hn=h.n(pn),fn=h(44908),mn=h.n(fn);function gn(e,t,n){Object.hasOwn(e,t)?e.set(t,n):(delete Object.getPrototypeOf(e)[t],vt().set(e,t,n))}function vn(e,t,n){e.nodes.filter((function(e){var t=e.definition;return("bpmn:IntermediateCatchEvent"===t.$type||"bpmn:StartEvent"===t.$type)&&t.eventDefinitions&&t.eventDefinitions.some(n)})).forEach((function(e){var n=e.definition;n.eventDefinitions[0][t]=null}))}vt().use(un);var bn=new un.Store({state:{graph:null,paper:null,highlightedNodes:[],nodes:[],rootElements:[],autoValidate:!1,globalProcesses:[],allowSavingElementPosition:!0,copiedElements:[],clientLeftPaper:!1,readOnly:!1},getters:{nodes:function(e){return e.nodes},paper:function(e){return e.paper},highlightedNodes:function(e){return e.highlightedNodes},nodeShape:function(e){return function(t){return e.graph.getCells().find((function(e){return e.component&&e.component.node===t}))}},highlightedShapes:function(e,t){return t.highlightedNodes.filter((function(e){return"processmaker-modeler-process"!==e.type})).map(t.nodeShape)},rootElements:function(e){return e.rootElements},autoValidate:function(e){return e.autoValidate},globalProcesses:function(e){return e.globalProcesses},globalProcessEvents:function(e,t){return hn()(t.globalProcesses.map((function(e){return e.events})))},allowSavingElementPosition:function(e){return e.allowSavingElementPosition},copiedElements:function(e){return e.copiedElements},clientLeftPaper:function(e){return e.clientLeftPaper},isReadOnly:function(e){return e.readOnly},showComponent:function(e){return!e.readOnly}},mutations:{setReadOnly:function(e,t){e.readOnly=t},preventSavingElementPosition:function(e){e.allowSavingElementPosition=!1},allowSavingElementPosition:function(e){e.allowSavingElementPosition=!0},setAutoValidate:function(e,t){e.autoValidate=t},setRootElements:function(e,t){e.rootElements=t},updateNodeBounds:function(e,t){var n=t.node,o=t.bounds;o&&Object.entries(o).forEach((function(e){var t=mt(e,2),o=t[0],i=t[1];"$type"!==o&&n.diagram.bounds.set(o,i)}))},updateNodeProp:function(e,t){var n=t.node,o=t.key,i=t.value;"id"==o&&n.definition.id!==i&&e.nodes.some((function(e){return e.definition.id===i}))||(gn(n.definition,o,i),null==i&&vt()["delete"](n.definition,o))},clearNodes:function(e){e.nodes=[]},highlightNode:function(e,t){e.highlightedNodes=t?[t]:[]},addToHighlightedNodes:function(e,t){var n=mn()([].concat(m(e.highlightedNodes),m(t))),o=n.filter((function(e){return"processmaker-modeler-pool"===e.type})).map((function(e){return e.id}));e.highlightedNodes=n.filter((function(e){return!e.pool||!e.pool.component.node.id||!o.includes(e.pool.component.node.id)}))},addNode:function(e,t){t._modelerId="_modelerId_"+t.definition.get("id"),e.nodes.push(t)},removeNode:function(e,t){var n=e.nodes.indexOf(t);-1!==n&&e.nodes.splice(n,1)},removeMessageRef:function(e,t){vn(e,"messageRef",(function(e){var n=e.messageRef;return n===t}))},removeSignalRef:function(e,t){vn(e,"signalRef",(function(e){var n=e.signalRef;return n===t}))},setGraph:function(e,t){e.graph=t},setPaper:function(e,t){e.paper=t},setGlobalProcesses:function(e,t){e.globalProcesses=t},setCopiedElements:function(e,t){e.copiedElements=t},setClientLeftPaper:function(e,t){e.clientLeftPaper=t}},actions:{fetchGlobalProcesses:function(e){return y(v().mark((function t(){var n,o,i;return v().wrap((function(t){while(1)switch(t.prev=t.next){case 0:return n=e.commit,t.prev=1,t.next=4,window.ProcessMaker.apiClient.get("processes",{params:{order_direction:"asc",per_page:1e3,status:"all",include:"events,category"}});case 4:o=t.sent,i=o.data,n("setGlobalProcesses",i.data),window.ProcessMaker.globalProcesses=i.data,t.next=12;break;case 10:t.prev=10,t.t0=t["catch"](1);case 12:case"end":return t.stop()}}),t,null,[[1,10]])})))()}}}),yn="#5096db",wn="#FF0000",xn="#3FA6FF",kn="#DCF2FF",Cn="#CCCCCC",Sn="#F5F5F5",En="#00BA7C",An="#D6FFE6",Mn={source:"source",target:"target"};function Tn(e){return e.x&&e.y}var _n={props:["highlighted","paper","paperManager","isCompleted","isIdle"],data:function(){return{sourceShape:null,target:null,listeningToMouseup:!1,vertices:null,anchorPointFunction:st}},watch:{target:function(e,t){t&&t!==e&&ut(t)},isValidConnection:function(e){e?this.shape.stopListening(this.paper,"blank:pointerdown link:pointerdown element:pointerdown",this.removeLink):this.shape.listenToOnce(this.paper,"blank:pointerdown link:pointerdown element:pointerdown",this.removeLink)},highlighted:function(e){bn.getters.isReadOnly||(e?(this.shape.attr({line:{stroke:"#5096db"},".joint-highlight-stroke":{display:"none"}}),this.shapeView.showTools()):(ut(this.shape),this.shapeView.hideTools()))}},computed:{shapeView:function(){return this.shape.findView(this.paper)},sourceNode:function(){return x()(this.sourceShape,"component.node")},targetNode:function(){return x()(this.target,"component.node")},sourceConfig:function(){return this.sourceNode&&this.nodeRegistry[this.sourceNode.type]},targetConfig:function(){return this.targetNode&&this.nodeRegistry[this.targetNode.type]},elementPadding:function(){return this.shape&&this.shape.source().id===this.shape.target().id?20:1}},methods:{setShapeHighlight:function(){this.isCompleted?this.shape.attr({line:{stroke:En}}):this.isIdle&&this.shape.attr({line:{stroke:Cn}})},findSourceShape:function(){var e=this;return this.graph.getElements().find((function(t){return t.component&&t.component.node.definition===e.node.definition.get("sourceRef")}))},setEndpoint:function(e,t,n){var o=this;if(e&&Tn(e))return this.shape[t](e,{anchor:{name:"modelCenter",args:{padding:25}},connectionPoint:{name:"boundary"}});var i=function(){var t=e.position(),o=t.x,i=t.y,r=e.size(),s=r.width,a=r.height;return n?{x:o+n.x,y:i+n.y}:{x:o+s/2,y:i+a/2}};this.shape[t](e,{anchor:function(){return o.getAnchorPointFunction(t)(i(),e.findView(o.paper))},connectionPoint:{name:"boundary"}})},setSource:function(e,t){this.setEndpoint(e,Mn.source,t)},setTarget:function(e,t){this.setEndpoint(e,Mn.target,t)},completeLink:function(){this.shape.stopListening(this.paper,"cell:mouseleave"),this.$emit("set-cursor",null),this.resetPaper();var e=this.shape.getTargetElement();ut(e),this.shape.on("change:vertices",this.onChangeVertices),this.shape.on("change:source",this.onChangeVertices),this.shape.on("change:target",this.onChangeVertices),this.shape.listenTo(this.sourceShape,"change:position",this.updateWaypoints),this.shape.listenTo(e,"change:position",this.updateWaypoints);var t=this.shape.getSourceElement();t.embed(this.shape),this.$emit("set-shape-stacking",t)},waitForUpdateWaypoints:function(){var e=this;return new Promise((function(t){e.updateWaypoints(),e.updateWaypoints.flush(),t()}))},onChangeVertices:function(e,t,n){var o=this;return y(v().mark((function e(){return v().wrap((function(e){while(1)switch(e.prev=e.next){case 0:if(!n||!n.ui){e.next=8;break}return e.next=3,o.$nextTick();case 3:return e.next=5,o.waitForUpdateWaypoints();case 5:return e.next=7,o.$nextTick();case 7:o.$emit("save-state");case 8:case"end":return e.stop()}}),e)})))()},updateWaypoints:function(){var e=this,t=this.shape.findView(this.paper),n=t.sourceAnchor,o=t.targetAnchor;this.node.diagram.waypoint=[n].concat(m(this.shape.vertices()),[o]).map((function(t){return e.moddle.create("dc:Point",t)})),this.listeningToMouseup||(this.listeningToMouseup=!0,document.addEventListener("mouseup",this.emitSave))},updateLinkTarget:function(e){var t=this,n=e.clientX,o=e.clientY,i=this.paper.clientToLocalPoint({x:n,y:o});if(this.target=this.graph.findModelsFromPoint(i).sort((function(e,t){return t.get("z")-e.get("z")}))[0],!this.isValidConnection)return this.$emit("set-cursor","not-allowed"),this.shape.target({x:i.x,y:i.y}),void(this.target&&Ee(this.target,fe));this.setTarget(this.target),this.updateRouter(),this.$emit("set-cursor","default"),Ee(this.target,he),this.paper.el.removeEventListener("mousemove",this.updateLinkTarget),this.shape.listenToOnce(this.paper,"cell:pointerclick",(function(){t.completeLink(),t.updateWaypoints(),t.updateWaypoints.flush(),t.updateDefinitionLinks&&t.updateDefinitionLinks(),t.$emit("save-state")})),this.shape.listenToOnce(this.paper,"cell:mouseleave",(function(){t.paper.el.addEventListener("mousemove",t.updateLinkTarget),t.shape.stopListening(t.paper,"cell:pointerclick"),ut(t.target),t.$emit("set-cursor","not-allowed")}))},removeLink:function(){this.$emit("remove-node",this.node),this.resetPaper()},resetPaper:function(){this.$emit("set-cursor",null),this.paper.el.removeEventListener("mousemove",this.updateLinkTarget),this.paper.setInteractivity(this.graph.get("interactiveFunc")),this.target&&ut(this.target)},getAnchorPointFunction:function(e){return"source"===e?this.sourceShape.component.anchorPointFunction||this.anchorPointFunction:"target"===e?this.target.component.anchorPointFunction||this.anchorPointFunction:void 0},setupLinkTools:function(){var e=new a.linkTools.Vertices,t=new a.linkTools.SourceAnchor({snap:this.getAnchorPointFunction("source")}),n=new a.linkTools.TargetAnchor({snap:this.getAnchorPointFunction("target")}),o=new a.dia.ToolsView({tools:[e,t,n]});this.shapeView.addTools(o),this.shapeView.hideTools()},emitSave:function(){this.highlighted&&(this.updateWaypoints.flush(),document.removeEventListener("mouseup",this.emitSave),this.listeningToMouseup=!1)}},created:function(){this.updateWaypoints=C()(this.updateWaypoints,100),this.emitSave.bind(this)},mounted:function(){var e=this;return y(v().mark((function t(){var n,o,i,r,s,a,l,c,d,u,p,h,f,m;return v().wrap((function(t){while(1)switch(t.prev=t.next){case 0:return t.next=2,e.$nextTick();case 2:if(e.sourceShape=e.findSourceShape(),e.setSource(e.sourceShape),e.$once("click",(function(){e.$nextTick((function(){bn.getters.isReadOnly||e.setupLinkTools()}))})),n=e.getTargetRef?e.getTargetRef():e.node.definition.get("targetRef"),n){t.next=8;break}return t.abrupt("return");case 8:n.id?(o=e.graph.getElements().find((function(e){return e.component&&e.component.node.definition===n})),e.target=o,i=e.node.diagram.waypoint,r=e.node.diagram.waypoint[0],s=i[i.length-1],a=o.position(),l=a.x,c=a.y,d={x:s.x-l,y:s.y-c},u=e.sourceShape.position(),p=u.x,h=u.y,f={x:r.x-p,y:r.y-h},i&&(m=i.slice(1,i.length-1).map((function(e){var t=e.x,n=e.y;return{x:t,y:n}})),e.shape.vertices(m)),e.setSource(e.sourceShape,f),e.setTarget(o,d),e.completeLink()):(e.setTarget(n),e.paper.setInteractivity(!1),e.paper.el.addEventListener("mousemove",e.updateLinkTarget),e.$emit("set-cursor","not-allowed"),e.isValidConnection?e.shape.stopListening(e.paper,"blank:pointerdown link:pointerdown element:pointerdown",e.removeLink):e.shape.listenToOnce(e.paper,"blank:pointerdown link:pointerdown element:pointerdown",e.removeLink)),e.updateRouter(),e.shape.on("change:vertices",(function(){this.component.$emit("shape-resize")})),bn.getters.isReadOnly&&e.$nextTick((function(){e.paperManager.awaitScheduledUpdates().then((function(){e.setShapeHighlight()}))}));case 12:case"end":return t.stop()}}),t)})))()},beforeDestroy:function(){document.removeEventListener("mouseup",this.emitSave)},destroyed:function(){this.updateWaypoints.cancel()}},Pn=h.p+"img/association-head.0b14da7b.svg",On={none:"None",one:"One",both:"Both"},Dn=function(){var e=this,t=e._self._c;return e.showCrownConfig?t("div",{staticClass:"crown-config",style:e.style,attrs:{role:"menu"}},[e._t("default"),t("association-flow-button",e._g({attrs:{node:e.node,moddle:e.moddle,shape:e.shape},on:{"toggle-crown-state":function(t){e.showCrown=t}}},e.$listeners)),t("generic-flow-button",e._g({attrs:{node:e.node,"node-registry":e.nodeRegistry,moddle:e.moddle},on:{"toggle-crown-state":function(t){e.showCrown=t}}},e.$listeners)),t("data-association-flow-button",e._g({attrs:{node:e.node,moddle:e.moddle,shape:e.shape},on:{"toggle-crown-state":function(t){e.showCrown=t}}},e.$listeners)),t("default-flow",e._g({attrs:{node:e.node}},e.$listeners)),t("crown-dropdowns",e._g({attrs:{"dropdown-data":e.dropdownData,"boundary-event-dropdown-data":e.boundaryEventDropdownData,node:e.node,"node-registry":e.nodeRegistry,moddle:e.moddle,shape:e.shape,"task-dropdown-initially-open":e.taskDropdownInitiallyOpen,showCustomIconPicker:e.showCustomIconPicker,iconName:e.iconName},on:{"replace-node-type":e.replaceNodeTypePrompt}},e.$listeners)),t("copy-button",e._g({attrs:{node:e.node}},e.$listeners)),t("clone-button",e._g({attrs:{node:e.node}},e.$listeners)),t("delete-button",e._g({attrs:{graph:e.graph,shape:e.shape,node:e.node}},e.$listeners)),t("b-modal",{ref:"modal",attrs:{"no-fade":e.runningInCypressTest,id:"modal-prevent-closing",title:e.$t("Change Type"),"ok-title":e.$t("Confirm"),"cancel-title":e.$t("Cancel")},on:{hidden:function(t){e.showReplaceModal=!1},ok:e.confirmedReplaceNodeType},model:{value:e.showReplaceModal,callback:function(t){e.showReplaceModal=t},expression:"showReplaceModal"}},[t("p",[e._v(e._s(e.$t("Changing this type will replace your current configuration")))])])],2):e._e()},In=[],Nn=(h(47941),function(){var e=this,t=e._self._c;return t("crown-button",{directives:[{name:"b-tooltip",rawName:"v-b-tooltip.hover.viewport.d50",value:{customClass:"no-pointer-events"},expression:"{ customClass: 'no-pointer-events' }",modifiers:{hover:!0,viewport:!0,d50:!0}}],attrs:{title:e.$t("Delete"),role:"menuitem",id:"delete-button","aria-label":"Delete this node"},on:{click:function(t){e.isPoolLane?e.removePoolLaneShape():e.removeShape()}}},[t("i",{staticClass:"fas fa-trash-alt cog-container--button"})])}),Rn=[],Bn=h.p+"img/trash-alt-solid.9d41abd9.svg",Ln=function(){var e=this,t=e._self._c;return t("button",e._g({staticClass:"crown-button",attrs:{id:e.id,"aria-label":e.ariaLabel}},e.$listeners),[e._t("default",(function(){return[t("img",{staticClass:"crown-icon",attrs:{src:e.src,width:"width",height:"height"}})]}))],2)},jn=[],Fn={props:{id:String,ariaLabel:String,src:String,width:{type:Number,default:19},height:{type:Number,default:20}}},zn=Fn;h(21353);function qn(e,t,n,o,i,r,s,a){var l,c="function"===typeof e?e.options:e;if(t&&(c.render=t,c.staticRenderFns=n,c._compiled=!0),o&&(c.functional=!0),r&&(c._scopeId="data-v-"+r),s?(l=function(e){e=e||this.$vnode&&this.$vnode.ssrContext||this.parent&&this.parent.$vnode&&this.parent.$vnode.ssrContext,e||"undefined"===typeof __VUE_SSR_CONTEXT__||(e=__VUE_SSR_CONTEXT__),i&&i.call(this,e),e&&e._registeredComponents&&e._registeredComponents.add(s)},c._ssrRegister=l):i&&(l=a?function(){i.call(this,(c.functional?this.parent:this).$root.$options.shadowRoot)}:i),l)if(c.functional){c._injectStyles=l;var d=c.render;c.render=function(e,t){return l.call(t),d(e,t)}}else{var u=c.beforeCreate;c.beforeCreate=u?[].concat(u,l):[l]}return{exports:e,options:c}}var Hn=qn(zn,Ln,jn,!1,null,"09d8a8ac",null),Vn=Hn.exports,Un=h(50467),Gn=h.n(Un),Wn="processmaker-modeler-data-output-association",$n="bpmn:DataOutputAssociation";function Xn(e){return e.create("bpmn:DataOutputAssociation",{targetRef:{x:void 0,y:void 0}})}function Yn(e){return e.create("bpmndi:BPMNEdge")}var Zn="processmaker-modeler-data-input-association",Kn="bpmn:DataInputAssociation";function Jn(e){return e.create("bpmn:DataInputAssociation",{targetRef:{x:void 0,y:void 0}})}function Qn(e){return e.create("bpmndi:BPMNEdge")}function eo(e,t){var n=this,o=e.getConnectedLinks(t);o.forEach((function(e){return n.$emit("remove-node",e.component.node)}))}function to(e,t){e.definition.incoming&&e.definition.incoming.forEach((function(e){var n=t.nodes.find((function(t){return t.definition===e}));t.removeNode(n)})),e.definition.outgoing&&e.definition.outgoing.forEach((function(e){var n=t.nodes.find((function(t){return t.definition===e}));t.removeNode(n)}))}function no(e,t){var n=t.nodes.filter((function(t){return!(!t.definition.sourceRef||t.definition.sourceRef!==e.definition)||(!(!t.definition.targetRef||t.definition.targetRef!==e.definition)||void 0)}));n.forEach((function(e){t.removeNode(e)}))}function oo(e,t){var n=t.nodes.filter((function(t){return!(!t.definition.sourceRef||t.definition.sourceRef!==e.definition)||(!(!t.definition.targetRef||t.definition.targetRef!==e.definition)||void 0)}));n.forEach((function(e){t.removeNode(e)}))}function io(e,t,n){var o=e.getCells().find((function(e){return e.component&&e.component.node===t}));o.getEmbeddedCells({deep:!0}).filter((function(e){return e.component&&e.component.node.isBpmnType("bpmn:BoundaryEvent")})).forEach((function(t){e.getConnectedLinks(t).forEach((function(e){return n(e.component.node)})),n(t.component.node)}))}function ro(e){if(!e.isBpmnType($n,Kn)){var t=e.definition,n=t.sourceRef,o=t.targetRef;n&&(0,Un.pull)(n.get("outgoing"),e.definition),o&&o.id&&(0,Un.pull)(o.get("incoming"),e.definition)}}function so(e){var t=(0,Un.get)(e,"definition.sourceRef.default.id",null);t&&t===e.id&&e.definition.sourceRef.set("default",null)}function ao(e,t,n){if("bpmn:DataObjectReference"!==n.$type&&"bpmn:DataStoreReference"!==n.$type)throw"Source node must be a DataObjectReference or bpmn:DataStoreReference, got "+n.$type;var o=n.id,i="data_input_".concat(o);t.definition.ioSpecification||(t.definition.ioSpecification=e.create("bpmn:InputOutputSpecification",{dataInputs:[],dataOutputs:[],inputSets:[],outputSets:[]}),t.definition.ioSpecification.$parent=t.definition),t.definition.ioSpecification.dataInputs||t.definition.ioSpecification.set("dataInputs",[]);var r=t.definition.ioSpecification.dataInputs.find((function(e){return e.id===i}));r||(t.definition.ioSpecification.dataInputs.push(e.create("bpmn:DataInput",{id:i,isCollection:"false",name:n.name})),t.definition.ioSpecification.dataInputs[t.definition.ioSpecification.dataInputs.length-1].$parent=t.definition.ioSpecification,t.definition.ioSpecification.set("dataInputs",t.definition.ioSpecification.dataInputs)),r=t.definition.ioSpecification.dataInputs.find((function(e){return e.id===i})),t.definition.ioSpecification.outputSets||t.definition.ioSpecification.set("outputSets",[e.create("bpmn:OutputSet",{dataOutputRefs:[]})]);var s=t.definition.ioSpecification.outputSets[0];s||t.definition.ioSpecification.set("outputSets",[e.create("bpmn:OutputSet",{dataOutputRefs:[]})]),s=t.definition.ioSpecification.outputSets[0],t.definition.ioSpecification.inputSets||t.definition.ioSpecification.set("inputSets",[e.create("bpmn:InputSet",{dataInputRefs:[]})]);var a=t.definition.ioSpecification.inputSets[0];a||t.definition.ioSpecification.set("inputSets",[e.create("bpmn:InputSet",{dataInputRefs:[]})]),a=t.definition.ioSpecification.inputSets[0];var l=a.get("dataInputRefs").find((function(e){return e.id===i}));return l||a.dataInputRefs.push(r),r}function lo(e,t){var n,o=e.$parent;return o||(null===(n=t.nodes.find((function(t){var n;return t.definition.ioSpecification===e||(null===(n=t.definition.ioSpecification)||void 0===n?void 0:n.id)===e.id})))||void 0===n?void 0:n.definition)}function co(e,t){if("bpmn:DataObjectReference"!==t.$type&&"bpmn:DataStoreReference"!==t.$type)throw"Source node must be a DataObjectReference or bpmn:DataStoreReference, got "+t.$type;var n=t.id,o="data_input_".concat(n);if(e.definition.ioSpecification&&e.definition.ioSpecification.dataInputs){var i=e.definition.ioSpecification.dataInputs.find((function(e){return e.id===o}));if(i&&((0,Un.pull)(e.definition.ioSpecification.dataInputs,i),e.definition.ioSpecification.inputSets)){var r=e.definition.ioSpecification.inputSets[0];if(r){var s=r.dataInputRefs.find((function(e){return e.id===o}));if(s&&(0,Un.pull)(r.dataInputRefs,s),0===r.dataInputRefs.length&&delete e.definition.ioSpecification.inputSets,e.definition.ioSpecification.outputSets){var a=e.definition.ioSpecification.outputSets[0];!a||a.dataOutputRefs&&0!==a.dataOutputRefs.length||delete e.definition.ioSpecification.outputSets}e.definition.ioSpecification.inputSets||e.definition.ioSpecification.outputSets||delete e.definition.ioSpecification}}}}var uo={components:{CrownButton:Vn},props:{graph:Object,shape:Object,node:Object},data:function(){return{trashIcon:Bn}},computed:{isPoolLane:function(){return"processmaker-modeler-lane"===this.node.type}},methods:{removeFlows:eo,removeShape:function(){this.removeFlows(this.graph,this.shape),this.$emit("remove-node",this.node)},removePoolLaneShape:function(){var e=this;this.$emit("remove-node",this.node);var t=this.node.pool.component,n=t.sortedLanes();2!==n.length?this.shape!==n[n.length-1]?t.fillLanes(this.shape,"bottom-right",!0):t.fillLanes(this.shape,"top-right",!0):this.$emit("remove-node",n.filter((function(t){return t!==e.shape}))[0].component.node)}}},po=uo,ho=qn(po,Nn,Rn,!1,null,null,null),fo=ho.exports,mo=function(){var e=this,t=e._self._c;return e.allowOutgoingSequenceFlow?t("crown-button",{directives:[{name:"b-tooltip",rawName:"v-b-tooltip.hover.viewport.d50",value:{customClass:"no-pointer-events"},expression:"{ customClass: 'no-pointer-events' }",modifiers:{hover:!0,viewport:!0,d50:!0}}],attrs:{title:e.$t("Flow"),id:"generic-flow-button","aria-label":"Create a flow",role:"menuitem"},on:{click:e.addSequence}},[t("font-awesome-icon",{attrs:{icon:["fpm","fa-connect-elements"]}})],1):e._e()},go=[],vo=h.p+"img/connect-elements.ab6af00f.svg";h(38880),h(49337);function bo(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,o)}return n}function yo(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?bo(Object(n),!0).forEach((function(t){_e(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):bo(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function wo(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function xo(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,Te(o.key),o)}}function ko(e,t,n){return t&&xo(e.prototype,t),n&&xo(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}h(15306);var Co={"processmaker-modeler-start-event":"Start Event","processmaker-modeler-start-timer-event":"Start Timer Event","processmaker-modeler-signal-start-event":"Signal Start Event","processmaker-modeler-message-start-event":"Message Start Event","processmaker-modeler-conditional-start-event":"Conditional Start Event"},So=Co,Eo={"processmaker-modeler-end-event":"End Event","processmaker-modeler-error-end-event":"Error End Event","processmaker-modeler-message-end-event":"Message End Event","processmaker-modeler-signal-end-event":"Signal End Event","processmaker-modeler-terminate-end-event":"Terminate End Event"},Ao=Eo,Mo={"processmaker-modeler-task":"Form Task","processmaker-modeler-manual-task":"Manual Task","processmaker-modeler-script-task":"Script Task","processmaker-modeler-call-activity":"Sub Process","processmaker-modeler-data-object":"Data Object","processmaker-modeler-data-store":"Data Store"},To=Mo,_o={"processmaker-modeler-exclusive-gateway":"Exclusive Gateway","processmaker-modeler-inclusive-gateway":"Inclusive Gateway","processmaker-modeler-parallel-gateway":"Parallel Gateway","processmaker-modeler-event-based-gateway":"Event Based Gateway"},Po=_o,Oo={"processmaker-modeler-intermediate-catch-timer-event":"Intermediate Timer Event","processmaker-modeler-intermediate-signal-catch-event":"Intermediate Signal Catch Event","processmaker-modeler-intermediate-signal-throw-event":"Intermediate Signal Throw Event","processmaker-modeler-intermediate-message-catch-event":"Intermediate Message Catch Event","processmaker-modeler-intermediate-message-throw-event":"Intermediate Message Throw Event","processmaker-modeler-intermediate-conditional-catch-event":"Intermediate Conditional Catch Event"},Do=Oo,Io=h(50361),No=h.n(Io),Ro=function(){function e(t,n,o){wo(this,e),_e(this,"type",void 0),_e(this,"definition",void 0),_e(this,"diagram",void 0),_e(this,"pool",void 0),this.type=t,this.definition=n,this.diagram=o}return ko(e,[{key:"isBpmnType",value:function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return t.includes(this.definition.$type)}},{key:"canBeDefaultFlow",value:function(){var e=["bpmn:ExclusiveGateway","bpmn:InclusiveGateway"];return"bpmn:SequenceFlow"===this.definition.$type&&e.includes(this.definition.sourceRef.$type)}},{key:"isType",value:function(e){return this.type===e}},{key:"isStartEvent",value:function(){return Object.keys(So).includes(this.type)}},{key:"isEndEvent",value:function(){return Object.keys(Ao).includes(this.type)}},{key:"isTask",value:function(){return Object.keys(To).includes(this.type)}},{key:"isGateway",value:function(){return Object.keys(Po).includes(this.type)}},{key:"isIntermediateEvent",value:function(){return Object.keys(Do).includes(this.type)}},{key:"id",get:function(){return this.definition.id},set:function(e){this.definition.id=e}},{key:"setIds",value:function(e){var t,n,o=this,i=e.generate(),r=mt(i,2),s=r[0],a=r[1];if(this.id||(this.id=s),this.diagram&&(this.diagram.id=a,this.diagram.bpmnElement=this.definition),this.definition.loopCharacteristics&&"bpmn:StandardLoopCharacteristics"===this.definition.loopCharacteristics.$type&&(this.definition.loopCharacteristics.set("id",e.generate()[0]),this.definition.loopCharacteristics.loopCondition&&this.definition.loopCharacteristics.get("loopCondition").set("id",e.generate()[0])),this.definition.ioSpecification){this.definition.ioSpecification.set("id",e.generate()[0]);var l=this.definition.id;this.definition.ioSpecification.get("dataInputs")&&this.definition.ioSpecification.get("dataInputs").forEach((function(n){var i=n.get("id");i.substring(0,o.cloneOf.length)===o.cloneOf?(n.set("id",i.replace(o.cloneOf+"_",l+"_")),t=n):n.set("id",e.generate()[0])})),this.definition.ioSpecification.get("dataOutputs")&&this.definition.ioSpecification.get("dataOutputs").forEach((function(t){var i=t.get("id");i.substring(0,o.cloneOf.length)===o.cloneOf?(t.set("id",i.replace(o.cloneOf+"_",l+"_")),n=t):t.set("id",e.generate()[0])})),this.definition.ioSpecification.get("inputSets")&&this.definition.ioSpecification.get("inputSets").forEach((function(t){t.set("id",e.generate()[0])})),this.definition.ioSpecification.get("outputSets")&&this.definition.ioSpecification.get("outputSets").forEach((function(t){t.set("id",e.generate()[0])}))}this.definition.loopCharacteristics&&"bpmn:MultiInstanceLoopCharacteristics"===this.definition.loopCharacteristics.$type&&(this.definition.loopCharacteristics.set("id",e.generate()[0]),this.definition.loopCharacteristics.loopCardinality&&this.definition.loopCharacteristics.get("loopCardinality").set("id",e.generate()[0]),this.definition.loopCharacteristics.loopDataInputRef&&t&&this.definition.loopCharacteristics.set("loopDataInputRef",t),this.definition.loopCharacteristics.loopDataOutputRef&&n&&this.definition.loopCharacteristics.set("loopDataOutputRef",n),this.definition.loopCharacteristics.inputDataItem&&this.definition.loopCharacteristics.get("inputDataItem").set("id",e.generate()[0]),this.definition.loopCharacteristics.outputDataItem&&this.definition.loopCharacteristics.get("outputDataItem").set("id",e.generate()[0]),this.definition.loopCharacteristics.completionCondition&&this.definition.loopCharacteristics.get("completionCondition").set("id",e.generate()[0]))}},{key:"clone",value:function(t,n,o){var i=this,r=t[this.type].definition(n,o),s=t[this.type].diagram(n),a=new this.constructor(this.type,r,s);return a.id=null,a.pool=this.pool,a.cloneOf=this.id,e.diagramPropertiesToCopy.forEach((function(e){return a.diagram.bounds[e]=i.diagram.bounds[e]})),Object.keys(this.definition).filter((function(t){return!e.definitionPropertiesToNotCopy.includes(t)})).forEach((function(e){var t=i.definition.get(e),n="object"===g(t)?No()(t):t;if("eventDefinitions"===e)for(var o in n)t[o].signalRef&&!n[o].signalRef&&n[o].set("signalRef",yo({},t[o].signalRef));a.definition.set(e,n)})),e.eventDefinitionPropertiesToNotCopy.forEach((function(e){return a.definition.eventDefinitions&&a.definition.eventDefinitions[0]&&Object.hasOwn(a.definition.eventDefinitions[0],e)&&a.definition.eventDefinitions[0].set(e,null)})),a}},{key:"cloneFlow",value:function(t,n,o){var i=this,r=t[this.type].definition(n,o),s=t[this.type].diagram(n),a=new this.constructor(this.type,r,s);return a.id=null,a.pool=this.pool,a.cloneOf=this.id,a.diagram=n.create("bpmndi:BPMNEdge",{waypoint:[]}),this.diagram.waypoint.forEach((function(e){var t=n.create("dc:Point",{x:e.x,y:e.y});a.diagram.waypoint.push(t)})),Object.keys(this.definition).filter((function(t){return!e.flowDefinitionPropertiesToNotCopy.includes(t)})).forEach((function(e){var t=i.definition.get(e),n="object"===g(t)?No()(t):t;if("eventDefinitions"===e)for(var o in n)t[o].signalRef&&!n[o].signalRef&&n[o].set("signalRef",yo({},t[o].signalRef));a.definition.set(e,n),a.definition.set("sourceRef",null),a.definition.set("targetRef",null)})),e.eventDefinitionPropertiesToNotCopy.forEach((function(e){return a.definition.eventDefinitions&&a.definition.eventDefinitions[0]&&Object.hasOwn(a.definition.eventDefinitions[0],e)&&a.definition.eventDefinitions[0].set(e,null)})),a}},{key:"getTargetProcess",value:function(e,t){var n=this;return this.pool?e.find((function(e){var t=e.id;return t===n.pool.component.node.definition.get("processRef").id})):t.definition}}],[{key:"isTimerType",value:function(e){return["processmaker-modeler-start-timer-event","processmaker-modeler-intermediate-catch-timer-event"].includes(e)}}]),e}();_e(Ro,"diagramPropertiesToCopy",["x","y","width","height"]),_e(Ro,"definitionPropertiesToNotCopy",["$type","id","dataOutputAssociations"]),_e(Ro,"flowDefinitionPropertiesToNotCopy",["$type","id","sourceRef","targetRef"]),_e(Ro,"eventDefinitionPropertiesToNotCopy",["errorRef","messageRef"]);var Bo="processmaker-modeler-generic-flow",Lo=h(65554),jo={prefix:"fpm",iconName:"fa-boundary-event",icon:[112,112,[],"e001","M51.739 2.056c-13.026.848-25.131 6.341-34.43 15.625C10.84 24.139 6.603 30.987 3.72 39.642.81 48.38.051 56.948 1.392 65.92c.932 6.232 3.501 13.807 6.441 18.991 8.903 15.7 23.772 25.701 41.487 27.903 2.517.312 9.393.312 11.911 0 17.703-2.201 32.617-12.231 41.488-27.903 2.943-5.2 5.508-12.763 6.439-18.991 1.698-11.359-.064-22.783-5.13-33.257-4.913-10.156-13.314-18.932-23.21-24.247-7.159-3.845-14.191-5.854-22.286-6.365-3.224-.204-3.584-.204-6.793.005m8.216 4.091c8.319.827 15.946 3.548 22.891 8.165 3.153 2.096 5.414 3.998 8.35 7.021 7.582 7.807 12.34 17.536 14.049 28.731.423 2.764.572 9.015.29 12.1-.962 10.515-4.848 20.143-11.415 28.286-1.857 2.303-5.901 6.293-8.136 8.029a50.9 50.9 0 0 1-23.544 10.144c-3.182.489-11.148.489-14.33 0-5.812-.893-11.669-2.875-16.75-5.668-11.303-6.213-20.134-17.022-24.092-29.49-3.259-10.266-3.259-21.647 0-31.913a51.37 51.37 0 0 1 11.995-20.128c2.834-2.93 5.301-5.008 8.426-7.097a49.964 49.964 0 0 1 22.654-8.169c2.192-.225 7.401-.231 9.612-.011m-9.053 12.099c-20.419 2.322-35.641 19.091-35.641 39.263 0 14.657 8.112 27.984 21.217 34.859 14.221 7.46 31.65 5.768 44.132-4.283 14.219-11.449 18.699-30.977 10.879-47.42-5.522-11.611-16.451-19.808-29.421-22.068-2.55-.444-8.659-.636-11.166-.351m6.979 3.906c1.382.105 3.214.321 4.071.481 12.854 2.394 23.482 11.579 27.55 23.808 4.141 12.449 1.019 26.046-8.153 35.508-5.615 5.792-12.307 9.26-20.584 10.667-2.565.436-8.414.436-10.98 0-11.016-1.872-19.998-7.889-25.586-17.14-5.178-8.573-6.354-19.406-3.15-29.035 4.492-13.506 16.952-23.186 31.248-24.278 2.856-.218 2.85-.218 5.584-.011"]},Fo={prefix:"fpm",iconName:"fa-connect-elements",icon:[20,20,[],"e002","M0 2.502v2.501h5.003V3.008h5.004v15.01h5.478V19c0 .54.011.981.024.981.053-.001 2.989-2.477 2.964-2.499a203.517 203.517 0 0 0-2.942-2.429c-.04-.016-.046.116-.046.967v.985h-4.497V1.995H5.003V0H0v2.502m3.99.016v1.504H1.013V1.013H3.99v1.505"]},zo={prefix:"fpm",iconName:"fa-lane-above",icon:[26,18,[],"e003","M0 .997v.996h.997V.997h1.04V0H0v.997M2.99.498v.499h2.037V0H2.99v.498m2.99 0v.499h2.037V0H5.98v.498m3.033 0v.499h1.994V0H9.013v.498m2.99 0v.499h1.994V0h-1.994v.498m2.99 0v.499h1.994V0h-1.994v.498m2.99 0v.499h2.037V0h-2.037v.498m2.99 0v.499h2.037V0h-2.037v.498m2.99 0v.499h1.04v.996H26V0h-2.037v.498M0 3.987v.996h.997V2.99H0v.997m25.003 0v.996H26V2.99h-.997v.997M0 11.982v6.001h26V5.98H0v6.002"]},qo={prefix:"fpm",iconName:"fa-lane-below",icon:[26,18,[],"e004","M0 6.002v6.001h26V0H0v6.002m0 7.995v.996h.997V13H0v.997m25.003 0v.996H26V13h-.997v.997M0 16.987v.996h2.037v-.996H.997v-.997H0v.997m25.003-.499v.499h-1.04v.996H26V15.99h-.997v.498m-22.013.997v.498h2.037v-.996H2.99v.498m2.99 0v.498h2.037v-.996H5.98v.498m3.033 0v.498h1.994v-.996H9.013v.498m2.99 0v.498h1.994v-.996h-1.994v.498m2.99 0v.498h1.994v-.996h-1.994v.498m2.99 0v.498h2.037v-.996h-2.037v.498m2.99 0v.498h2.037v-.996h-2.037v.498"]},Ho={prefix:"fpm",iconName:"fa-center-horizontally",icon:[24,24,[],"e001","M11.04 4.88v1.88H7.28v3.92h3.76v3.28H5v3.92h6.04v3.76h1v-3.76h6.04v-3.92h-6.04v-3.28h3.76V6.76h-3.76V3h-1v1.88"]},Vo={prefix:"fpm",iconName:"fa-center-vertically",icon:[24,24,[],"e001","M6.76 8.04v3.04H3v.96h3.76v6.04h3.92v-6.04h3.28v3.76h3.92v-3.76h3.76v-.959l-1.87-.011-1.87-.01-.01-1.89-.011-1.89H13.96v3.801l-1.63-.011-1.63-.01-.01-3.03L10.679 5H6.76v3.04"]},Uo={prefix:"fpm",iconName:"fa-align-left",icon:[24,24,[],"e001","M4 12.32v9.32h1V3H4v9.32m2.28-3.6v1.96h8.52V6.76H6.28v1.96m0 7.2v1.96h13.08v-3.92H6.28v1.96"]},Go={prefix:"fpm",iconName:"fa-align-right",icon:[24,24,[],"e001","M18.4 12.32v9.32h1V3h-1v9.32m-9.8-3.6v1.96h8.48V6.76H8.6v1.96M4 15.92v1.96h13.08v-3.92H4v1.96"]},Wo={prefix:"fpm",iconName:"fa-align-bottom",icon:[24,24,[],"e001","M6.76 10.54v6.54h3.92V4H6.76v6.54m7.2 2.3v4.24h3.92V8.6h-3.92v4.24M3 18.9v.5h18.64v-1H3v.5"]},$o={prefix:"fpm",iconName:"fa-align-top",icon:[24,24,[],"e001","M3 4.5V5h18.64V4H3v.5m3.76 8.32v6.54h3.92V6.28H6.76v6.54m7.2-2.28v4.26h3.92V6.28h-3.92v4.26"]},Xo={prefix:"fpm",iconName:"fa-distribute-horizontally",icon:[24,24,[],"e001","M3 12.32v9.32h.96V3H3v9.32m17 0v9.32h1V3h-1v9.32m-10.44.02v6.54h4.88V5.8H9.56v6.54"]},Yo={prefix:"fpm",iconName:"fa-distribute-vertically",icon:[24,24,[],"e001","M3 3.5V4h18.64V3H3v.5M5.8 12v2.44h13.08V9.56H5.8V12M3 20.52V21h18.64v-.96H3v.48"]},Zo=h(39865),Ko=["processmaker-modeler-data-object","processmaker-modeler-data-store","processmaker-modeler-lane","processmaker-modeler-end-event","processmaker-modeler-error-end-event","processmaker-modeler-signal-end-event","processmaker-modeler-terminate-end-event","processmaker-modeler-text-annotation","processmaker-modeler-sequence-flow","processmaker-modeler-message-flow"],Jo={components:{CrownButton:Vn,FontAwesomeIcon:Zo.FontAwesomeIcon},props:["node","moddle","nodeRegistry"],data:function(){return{sequenceFlow:vo}},computed:{paper:function(){return bn.getters.paper},sequenceFlowConfig:function(){return this.nodeRegistry[Bo]},nodeConfig:function(){return this.nodeRegistry[this.node.type]},allowOutgoingSequenceFlow:function(){var e=this;return!Ko.some((function(t){return e.node.isType(t)}))}},methods:{addSequence:function(e,t,n,o){this.$emit("toggle-crown-state",!1);var i=e.clientX,r=e.clientY,s=null;e&&(s=(0,a.V)(this.paper.viewport).toLocalPoint(i,r));var l=this.moddle.create("bpmn:SequenceFlow",{name:"",sourceRef:this.node.definition,targetRef:{x:n||s.x,y:o||s.y}});this.$emit("add-node",new Ro(Bo,l,this.moddle.create("bpmndi:BPMNEdge")))}},created:function(){this.$t=this.$t.bind(this),Lo.library.add(Fo)}},Qo=Jo,ei=qn(Qo,mo,go,!1,null,null,null),ti=ei.exports,ni=function(){var e=this,t=e._self._c;return e.node.isType("processmaker-modeler-text-annotation")?t("crown-button",{directives:[{name:"b-tooltip",rawName:"v-b-tooltip.hover.viewport.d50",value:{customClass:"no-pointer-events"},expression:"{ customClass: 'no-pointer-events' }",modifiers:{hover:!0,viewport:!0,d50:!0}}],attrs:{title:e.$t("Association Flow"),id:"association-flow-button","aria-label":"Add association flow",role:"menuitem"},on:{click:e.addAssociation}},[t("img",{attrs:{src:e.connectIcon,"aria-hidden":"true"}})]):e._e()},oi=[],ii=h.p+"img/connect-artifacts.e3e5e73f.svg",ri={components:{CrownButton:Vn},props:["node","moddle","shape"],data:function(){return{connectIcon:ii}},methods:{addAssociation:function(e,t,n,o){this.$emit("toggle-crown-state",!1);var i=this.moddle.create("bpmn:Association",{sourceRef:this.shape.component.node.definition,targetRef:{x:n,y:o},associationDirection:On.none});this.$emit("add-node",new Ro("processmaker-modeler-association",i,this.moddle.create("bpmndi:BPMNEdge")))}}},si=ri,ai=qn(si,ni,oi,!1,null,null,null),li=ai.exports,ci=function(){var e=this,t=e._self._c;return e.allowOutgoingDataAssociationFlow?t("crown-button",{directives:[{name:"b-tooltip",rawName:"v-b-tooltip.hover.viewport.d50",value:{customClass:"no-pointer-events"},expression:"{ customClass: 'no-pointer-events' }",modifiers:{hover:!0,viewport:!0,d50:!0}}],attrs:{title:e.$t("Data Association Flow"),id:"association-flow-button","aria-label":"Add association flow",role:"menuitem"},on:{click:e.addDataAssociation}},[t("img",{attrs:{src:e.connectIcon,"aria-hidden":"true"}})]):e._e()},di=[];function ui(e,t){return ui=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},ui(e,t)}function pi(e,t){if("function"!==typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&ui(e,t)}h(12419),h(81299);function hi(e){return hi=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},hi(e)}function fi(){if("undefined"===typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"===typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}function mi(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function gi(e,t){if(t&&("object"===g(t)||"function"===typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return mi(e)}function vi(e){var t=fi();return function(){var n,o=hi(e);if(t){var i=hi(this).constructor;n=Reflect.construct(o,arguments,i)}else n=o.apply(this,arguments);return gi(this,n)}}var bi="processmaker-modeler-pool",yi=function(){function e(t,n,o){wo(this,e),_e(this,"nodeRegistry",void 0),_e(this,"moddle",void 0),_e(this,"paper",void 0),this.nodeRegistry=t,this.moddle=n,this.paper=o}return ko(e,[{key:"makeFlowNode",value:function(e,t,n){throw new Error("Best practice is to implement 'makeFlowDefinition' in each class")}}],[{key:"isValid",value:function(e,t,n){throw new Error("Best practice is to implement 'isValid' in each class")}},{key:"hasTargetType",value:function(e){return null!=x()(e,"component.node.type")}},{key:"targetIsValidStartEventType",value:function(e){return!e.isBpmnType("bpmn:StartEvent")||e.isType("processmaker-modeler-message-start-event")}},{key:"targetIsValidIntermediateEventType",value:function(e){return!e.isBpmnType("bpmn:IntermediateCatchEvent")||e.isType("processmaker-modeler-intermediate-message-catch-event")}},{key:"targetIsValidBoundaryEventType",value:function(e){return!e.isBpmnType("bpmn:BoundaryEvent")||e.isType("processmaker-modeler-boundary-message-event")}},{key:"targetIsNotContainingPool",value:function(e,t){return e!==t.pool}},{key:"targetIsInDifferentPool",value:function(t,n){var o=e.shapeIsPool(t)?t:t.component.node.pool,i=e.shapeIsPool(n)?n:n.component.node.pool;return null!=i&&i!==o}},{key:"targetIsNotSource",value:function(e,t){return e.id!==t.id}},{key:"allowOutgoingFlow",value:function(e,t){return!("allowOutgoingFlow"in e)||e.allowOutgoingFlow(t)}},{key:"shapeIsPool",value:function(e){var t=x()(e,"component.node.type");return t===bi}}]),e}(),wi=function(e){pi(n,e);var t=vi(n);function n(){return wo(this,n),t.apply(this,arguments)}return ko(n,null,[{key:"isADataNode",value:function(e){return e.isBpmnType.apply(e,m(n.dataNodeTypes))}},{key:"isNodeDisallowedFromDataAssociation",value:function(e){return e.isBpmnType.apply(e,m(n.disallowedNodes))}}]),n}(yi);_e(wi,"dataNodeTypes",["bpmn:DataStoreReference","bpmn:DataObjectReference"]),_e(wi,"disallowedNodes",["bpmn:EndEvent","bpmn:MessageFlow","bpmn:SequenceFlow","bpmn:Participant","bpmn:Lane","bpmn:TextAnnotation","bpmn:Association"]);var xi={components:{CrownButton:Vn},props:["node","moddle","shape"],data:function(){return{connectIcon:ii}},computed:{paper:function(){return bn.getters.paper},allowOutgoingDataAssociationFlow:function(){return wi.isADataNode(this.node)}},methods:{addDataAssociation:function(n,o,i){this.$emit("toggle-crown-state",!1);var r=n.clientX,s=n.clientY,l=null;n&&(l=(0,a.V)(this.paper.viewport).toLocalPoint(r,s));var c=this.node.isBpmnType("bpmn:DataStoreReference","bpmn:DataObjectReference"),d=c?t:e,u=d.definition(this.moddle),p=new Ro(d.id,u,d.diagram(this.moddle));p.dataAssociationProps={sourceShape:this.shape,targetCoords:{x:o||l.x,y:i||l.y}},this.$emit("add-node",p)}}},ki=xi,Ci=qn(ki,ci,di,!1,null,null,null),Si=Ci.exports,Ei=function(){var e,t=this,n=t._self._c;return(e=t.node).isBpmnType.apply(e,m(t.validCopyElements))?n("crown-button",{directives:[{name:"b-tooltip",rawName:"v-b-tooltip.hover.viewport.d50",value:{customClass:"no-pointer-events"},expression:"{ customClass: 'no-pointer-events' }",modifiers:{hover:!0,viewport:!0,d50:!0}}],attrs:{title:t.$t("Copy Element"),"aria-label":"Copy Element","data-test":"copy-button",role:"menuitem"},on:{click:t.copyElement}},[n("i",{staticClass:"fas fa-clipboard"})]):t._e()},Ai=[],Mi=h.p+"img/clipboard.06edfa02.svg",Ti=["bpmn:StartEvent","bpmn:IntermediateEvent","bpmn:IntermediateCatchEvent","bpmn:IntermediateThrowEvent","bpmn:EndEvent","bpmn:Task","bpmn:UserTask","bpmn:GlobalTask","bpmn:SubProcess","bpmn:CallActivity","bpmn:ManualTask","bpmn:ScriptTask","bpmn:ServiceTask","bpmn:ExclusiveGateway","bpmn:ParallelGateway","bpmn:InclusiveGateway","bpmn:Gateway","bpmn:EventBasedGateway","bpmn:TextAnnotation"],_i=Ti,Pi={components:{CrownButton:Vn},props:["node"],data:function(){return{copyCount:0,copyIcon:Mi,validCopyElements:_i}},methods:{copyElement:function(){this.$emit("copy-element")}}},Oi=Pi,Di=qn(Oi,Ei,Ai,!1,null,null,null),Ii=Di.exports,Ni=function(){var e,t=this,n=t._self._c;return(e=t.node).isBpmnType.apply(e,m(t.validCopyElements))?n("crown-button",{directives:[{name:"b-tooltip",rawName:"v-b-tooltip.hover.viewport.d50",value:{customClass:"no-pointer-events"},expression:"{ customClass: 'no-pointer-events' }",modifiers:{hover:!0,viewport:!0,d50:!0}}],attrs:{title:t.$t("Clone Element"),"aria-label":"Clone Element","data-test":"clone-button"},on:{click:t.cloneElement}},[n("i",{staticClass:"fas fa-paste"})]):t._e()},Ri=[],Bi=h.p+"img/copy-regular.67a8edbd.svg",Li={components:{CrownButton:Vn},props:["node"],data:function(){return{copyCount:0,cloneIcon:Bi,validCopyElements:_i}},methods:{cloneElement:function(){this.$emit("clone-element",this.node,++this.copyCount)}}},ji=Li,Fi=qn(ji,Ni,Ri,!1,null,null,null),zi=Fi.exports,qi=function(){var e=this,t=e._self._c;return t("div",{attrs:{id:"dropdown"}},[t("crown-task-dropdown",e._g({attrs:{"dropdown-data":e.dropdownData,"dropdown-open":e.taskDropdownOpen,node:e.node},on:{"toggle-dropdown-state":e.taskDropdownToggle}},e.$listeners)),t("crown-boundary-event-dropdown",e._g({attrs:{"dropdown-data":e.boundaryEventDropdownData,"dropdown-open":e.boundaryEventDropdownOpen,nodeRegistry:e.nodeRegistry,moddle:e.moddle,node:e.node,shape:e.shape},on:{"toggle-dropdown-state":e.boundaryEventDropdownToggle}},e.$listeners)),t("crown-color-dropdown",e._g({attrs:{"dropdown-open":e.colorDropdownOpen,node:e.node,showCustomIconPicker:e.showCustomIconPicker,iconName:e.iconName},on:{"toggle-dropdown-state":e.colorDropdownToggle}},e.$listeners))],1)},Hi=[],Vi=function(){var e=this,t=e._self._c;return e.dropdownData.length>0?t("div",{staticClass:"cog-container",attrs:{role:"menuitem"}},[t("crown-button",e._g({attrs:{"data-test":"select-type-dropdown",id:"dropdown-button","aria-label":"Select a type"},on:{click:function(t){return e.$emit("toggle-dropdown-state",!e.dropdownOpen)}}},e.$listeners),[t("i",{staticClass:"fas fa-cog"})]),e.dropdownOpen?t("ul",{staticClass:"element-list",attrs:{role:"list"}},e._l(e.dropdownData,(function(n){var o=n.label,i=n.nodeType,r=n.dataTest,s=n.disabled;return t("li",{key:i,staticClass:"element-list--item",attrs:{role:"listitem",id:i}},[t("button",{staticClass:"element-list--item__button",attrs:{"data-test":r,type:"button",disabled:e.isDisabled(s,e.node,i)},on:{click:function(t){return e.replaceNode({node:e.node,typeToReplaceWith:i})}}},[e._v(e._s(e.$t(o))+" ")]),e.isDisabled(s,e.node,i)?t("b-tooltip",{attrs:{target:i,variant:"warning",placement:"right"}},[e._v(" "+e._s(e.$t(e.tooltip(s,e.node,i)))+" ")]):e._e()],1)})),0):e._e()],1):e._e()},Ui=[],Gi={name:"CrownTaskDropdown",components:{CrownButton:Vn},props:{dropdownData:Array,node:Object,dropdownOpen:{type:Boolean,required:!0}},methods:{isDisabled:function(e,t,n){return e&&(e instanceof Function?e.apply(this,[t,n]):e)},tooltip:function(e,t,n){return this.isDisabled(e,t,n)||""},replaceNode:function(e){e.node.type!==e.typeToReplaceWith?this.$emit("replace-node-type",e):this.$emit("toggle-dropdown-state",!1)}}},Wi=Gi,$i=(h(5648),qn(Wi,Vi,Ui,!1,null,"31668547",null)),Xi=$i.exports,Yi=function(){var e=this,t=e._self._c;return e.dropdownData.length>0?t("div",{staticClass:"cog-container",attrs:{role:"menuitem"}},[t("crown-button",e._g({directives:[{name:"b-tooltip",rawName:"v-b-tooltip.hover.viewport.d50",value:{customClass:"no-pointer-events"},expression:"{ customClass: 'no-pointer-events' }",modifiers:{hover:!0,viewport:!0,d50:!0}}],attrs:{id:"dropdown-button","aria-label":"Select a boundary event","data-test":"boundary-event-dropdown",title:e.$t("Boundary Events"),role:"menuitem"},on:{click:function(t){return e.$emit("toggle-dropdown-state",!e.dropdownOpen)}}},e.$listeners),[t("font-awesome-icon",{attrs:{icon:["fpm","fa-boundary-event"]}})],1),e.dropdownOpen?t("ul",{staticClass:"element-list",attrs:{role:"list"}},e._l(e.dropdownData,(function(n){var o=n.label,i=n.nodeType,r=n.dataTest,s=n.disabledLabel;return t("li",{key:i,staticClass:"element-list--item",attrs:{role:"listitem",id:i}},[t("button",{staticClass:"element-list--item__button",attrs:{"data-test":r,type:"button",disabled:!e.canAddBoundaryEventToTarget(i,e.shape)},on:{click:function(t){return e.addBoundaryEvent(i)}}},[e._v(e._s(e.$t(o))+" ")]),e.canAddBoundaryEventToTarget(i,e.shape)?e._e():t("b-tooltip",{attrs:{target:i,variant:"warning",placement:"right"}},[e._v(" "+e._s(e.getErrorTooltipText(s))+" ")])],1)})),0):e._e()],1):e._e()},Zi=[],Ki=h.p+"img/boundary-event.40a868e9.svg",Ji=["bpmn:Task","bpmn:ScriptTask","bpmn:ServiceTask","bpmn:SendTask","bpmn:ReceiveTask","bpmn:UserTask","bpmn:GlobalTask","bpmn:ManualTask","bpmn:CallActivity"];function Qi(e){return e&&Ji.some((function(t){return e.node.isBpmnType(t)}))}function er(e,t){return!(!t||!Qi(t.component))&&nr(t)}function tr(e){return e&&e.node.isBpmnType("bpmn:CallActivity")}function nr(e){return 0!==dt(e).length}var or={name:"CrownBoundaryEventDropdown",components:{CrownButton:Vn,FontAwesomeIcon:Zo.FontAwesomeIcon},props:{dropdownOpen:{type:Boolean,required:!0},dropdownData:Array,nodeRegistry:Object,moddle:Object,node:Object,shape:Object},data:function(){return{boundaryEventIcon:Ki}},methods:{getErrorTooltipText:function(e){return 0===this.getEmptyBoundaryEventPositionsForShape(this.shape).length?"No available space":e},canAddBoundaryEventToTarget:er,getEmptyBoundaryEventPositionsForShape:dt,addBoundaryEvent:function(e){if(this.$emit("toggle-dropdown-state",!1),this.canAddBoundaryEventToTarget(e,this.shape)){var t=this.nodeRegistry[e].definition(this.moddle,this.$t),n=this.nodeRegistry[e].diagram(this.moddle),o=dt(this.shape)[0];n.bounds.x=o.x-n.bounds.width/2,n.bounds.y=o.y-n.bounds.height/2;var i=new Ro(e,t,n);i.pool=this.node.pool,bn.commit("highlightNode",i),this.$emit("add-node",i)}}},created:function(){this.$t=this.$t.bind(this),Lo.library.add(jo)}},ir=or,rr=(h(56073),qn(ir,Yi,Zi,!1,null,null,null)),sr=rr.exports,ar=function(){var e=this,t=e._self._c;return t("div",{staticClass:"cog-container",attrs:{role:"menuitem"}},[t("crown-button",{directives:[{name:"b-tooltip",rawName:"v-b-tooltip.hover.viewport.d50",value:{customClass:"no-pointer-events"},expression:"{ customClass: 'no-pointer-events' }",modifiers:{hover:!0,viewport:!0,d50:!0}}],attrs:{title:e.$t("Open Color Palette"),"aria-label":e.$t("Open Color Palette"),role:"menuitem","data-test":"picker-dropdown-button"},on:{click:function(t){return e.$emit("toggle-dropdown-state",!e.dropdownOpen)}}},[t("i",{staticClass:"fas fa-palette"})]),e.dropdownOpen?t("div",{staticClass:"element-list color-list"},[e._l(e.colors.slice(0,4),(function(n){return t("button",{key:n,staticClass:"color-button",style:{backgroundColor:n},attrs:{type:"button","data-test":n},on:{click:function(t){e.selectedColor=n}}})})),e.showCustomIconPicker?t("button",{staticClass:"color-button p-0 fa fa-drafting-compass",attrs:{type:"button","data-test":"set-custom-icon"},on:{click:e.openIconSelector}}):t("div"),e._l(e.colors.slice(4,8),(function(n){return t("button",{key:n,staticClass:"color-button",style:{backgroundColor:n},attrs:{type:"button","data-test":n},on:{click:function(t){e.selectedColor=n}}})})),t("button",{staticClass:"color-button toggle-picker",attrs:{type:"button"},on:{click:function(t){e.colorPickerOpen=!e.colorPickerOpen}}}),t("button",{staticClass:"color-button p-0 fa fa-undo-alt",attrs:{type:"button","data-test":"clear-color"},on:{click:e.resetNodeStyling}}),e.colorPickerOpen?t("sketch-picker",{staticClass:"color-picker",attrs:{value:e.selectedColor||"#fff",presetColors:null},on:{input:e.setColorFromPicker}}):e._e()],2):e._e(),t("b-modal",{ref:"icon-selector-modal",attrs:{title:"Select a custom icon","cancel-title":"Reset to Default"},on:{cancel:e.resetCustomIcon}},[t("div",[t("icon-selector",{attrs:{value:e.iconName,"allow-custom":!1},on:{input:e.setCustomIcon}})],1)])],1)},lr=[],cr=(h(27479),h(87714),h(82801),h(1174),h(94023)),dr=function(){var e=this,t=e._self._c;return t("div",{staticClass:"multiselect-icons"},[t("b-input-group",[t("multiselect",{ref:"multiselect",attrs:{"track-by":"value",label:"label","show-labels":!1,placeholder:e.placeholder,options:e.list,multiple:!1,searchable:!0,"internal-search":!1,"allow-empty":!1},on:{"search-change":e.onSearch,open:e.onOpen,close:e.onClose},scopedSlots:e._u([{key:"singleLabel",fn:function(n){return[n.option?t("span",[t("i",{staticClass:"fas fa-fw",class:"fa-"+n.option.value}),e._v(" "+e._s(n.option.label)+" ")]):e._e()]}},{key:"option",fn:function(n){return[t("div",{staticClass:"icon-square",on:{mouseover:function(t){return e.onHover(n.option)}}},[t("i",{staticClass:"fas fa-fw",class:"fa-"+n.option.value})])]}}]),model:{value:e.icon,callback:function(t){e.icon=t},expression:"icon"}},[t("template",{slot:"noResult"},[e.allowCustom?t("div",{staticClass:"multiselect-no-result text-muted my-2 text-center w-100"},[t("strong",[e._v(e._s(e.$t("No icons found.")))]),t("br"),e._v(" "+e._s(e.$t("Try a different search or"))+" "),t("br"),t("a",{staticClass:"text-primary link-upload",on:{click:e.triggerUpload}},[e._v(e._s(e.$t("upload a custom icon")))]),e._v(". ")]):t("div",{staticClass:"multiselect-no-result text-muted my-2 text-center w-100"},[t("strong",[e._v(e._s(e.$t("No icons found.")))]),t("br"),e._v(" "+e._s(e.$t("Try a different search."))+" ")])]),t("template",{slot:"placeholder"},[this.file?t("span",[e._v(" "+e._s(e.$t("Custom Icon File"))+" "),this.fileName?t("span",{staticClass:"text-muted"},[e._v("("+e._s(this.fileName)+")")]):e._e()]):e._e()])],2),e.allowCustom?t("b-input-group-append",{staticClass:"multiselect-icons-upload"},[t("file-upload-button",{directives:[{name:"b-tooltip",rawName:"v-b-tooltip",value:{title:e.$t("Upload Custom Icon")},expression:"{ title: $t('Upload Custom Icon') }"}],ref:"fileUploadButton",attrs:{accept:"image/png, image/svg+xml, image/gif",variant:"secondary"},model:{value:e.uploadedFile,callback:function(t){e.uploadedFile=t},expression:"uploadedFile"}},[t("i",{staticClass:"fas fa-fw fa-upload"})])],1):e._e()],1)],1)},ur=[],pr=(h(64765),h(69600),h(42238)),hr=h.n(pr),fr=["search","search-plus","search-dollar","check-square","list","id-badge","clipboard-list","clipboard-check","clipboard","fire","fire-alt","star","dollar-sign","users","user-circle","trophy"],mr=["align-center","align-justify","align-left","align-right","arrows-alt","arrows-alt-h","arrows-alt-v","bars","beer","bong","border-all","border-none","border-style","cannabis","circle-notch","cog","cogs","compress","compress-alt","compress-arrows-alt","custom","democrat","disease","download","ellipsis-h","ellipsis-v","expand","expand-alt","expand-arrows-alt","faucet","file-download","file-export","file-import","file-upload","flag-usa","font-awesome-logo-full","grip-horizontal","grip-lines","grip-lines-vertical","grip-vertical","hand-holding-water","hand-middle-finger","hospital-user","joint","lungs","republican","upload"],gr=function(){function e(){wo(this,e)}return ko(e,null,[{key:"list",value:function(){var e=this,t=[];fr.forEach((function(n){hr()[n]&&t.push(e.parseIcon(n,hr()[n]))}));for(var n=0,o=Object.entries(hr());n<o.length;n++){var i=mt(o[n],2),r=i[0],s=i[1];this.shouldIncludeIcon(r,s)&&t.push(this.parseIcon(r,s))}return t}},{key:"grouped",value:function(){for(var e=[{group:"Common",icons:[]},{group:"All Icons",icons:[]}],t=0,n=Object.entries(hr());t<n.length;t++){var o=mt(n[t],2),i=o[0],r=o[1];mr.includes(i)||(fr.includes(i)&&e[0].icons.push(this.parseIcon(i,r)),this.shouldIncludeIcon(i,r)&&e[1].icons.push(this.parseIcon(i,r)))}return e}},{key:"shouldIncludeIcon",value:function(e,t){var n=!1,o=["-left","-right","-up","-down"];return mr.includes(e)||fr.includes(e)||t.styles.includes("solid")&&!t.changes.includes("5.13.0")&&(n=!0),o.forEach((function(t){e.includes(t)&&(n=!1)})),n}},{key:"parseIcon",value:function(e,t){var n={value:e,label:t.label,search:t.search.terms.join()+","+e+","+t.label.toLowerCase()};return n.label.startsLowerCase()&&(n.label=n.label.unSlug().titleCase()),n}}]),e}();String.prototype.startsLowerCase=function(){var e=this.substring(0,1);return e==e.toLowerCase()},String.prototype.unSlug=function(){return this.split("-").join(" ")},String.prototype.titleCase=function(){var e=this.split(" ");return e=e.map((function(e){return e.substring(0,1).toUpperCase()+e.substring(1)})),e.join(" ")};var vr=function(){var e=this,t=e._self._c;return t("b-button",{staticClass:"file-upload-button",attrs:{block:e.block,disabled:e.disabled,size:e.size,variant:e.variant,type:e.type,tag:e.tag,pill:e.pill,squared:e.squared,pressed:e.pressed},on:{click:e.onClick}},[t("b-form-file",e._b({ref:"fileUpload",staticClass:"file-upload-control",attrs:{plain:"",accept:e.accept,capture:e.capture,multiple:e.multiple,directory:e.directory,"no-traverse":e.noTraverse,"no-drop":e.noDrop,"file-name-formatter":e.fileNameFormatter},on:{change:e.onChange,input:e.onInput},model:{value:e.file,callback:function(t){e.file=t},expression:"file"}},"b-form-file",e.$attrs,!1)),e._t("default")],2)},br=[],yr={inheritAttrs:!1,props:{value:{default:null},block:{type:Boolean,default:!1},disabled:{type:Boolean,default:!1},size:{type:String,default:"md"},variant:{type:String,default:"secondary"},type:{type:String,default:"button"},tag:{type:String,default:"button"},pill:{type:Boolean,default:!1},squared:{type:Boolean,default:!1},pressed:{type:Boolean,default:null},accept:{type:String,default:""},capture:{type:Boolean,default:!1},multiple:{type:Boolean,default:!1},directory:{type:Boolean,default:!1},noTraverse:{type:Boolean,default:!1},noDrop:{type:Boolean,default:!1},fileNameFormatter:{type:Function,default:null}},data:function(){return{file:null}},watch:{file:{handler:function(e){this.$emit("input",e)}},value:{handler:function(e){this.file=e},deep:!0}},methods:{onClick:function(){this.$refs.fileUpload.$el.click()},onChange:function(e){this.$emit("change",e)},onInput:function(e){this.$emit("input",e)},reset:function(){this.$refs.fileUpload.reset()},trigger:function(){this.$refs.fileUpload.$el.click()}}},wr=yr,xr=(h(94960),qn(wr,vr,br,!1,null,null,null)),kr=xr.exports,Cr={components:{FileUploadButton:kr},props:{value:{required:!1},allowCustom:{type:Boolean,default:!0},default:{type:String,default:"search"}},data:function(){return{all:gr.list(),file:null,fileName:null,icon:null,list:{},loading:!0,placeholder:this.$t("Icon"),query:"",uploadedFile:null}},computed:{isOpen:function(){return this.$refs.multiselect.isOpen},iconAndFile:function(){return this.allowCustom?{icon:this.icon?this.icon.value:null,file:this.file}:this.icon?this.icon.value:null}},watch:{value:function(){this.allowCustom?(this.icon=this.find(this.value.icon),this.file=this.value.file):this.icon=this.find(this.value)},icon:function(e){e&&(this.file=null,this.fileName=null,this.allowCustom&&this.$refs.fileUploadButton.reset(),this.$emit("input",this.iconAndFile))},file:function(e){e&&(this.icon=null,this.$refs.multiselect.deactivate(),this.$emit("input",this.iconAndFile))},uploadedFile:function(e){var t=this;if(e)if(e.size>2e3)this.$emit("error",this.$t("The custom icon file is too large. File size must be less than 2KB."));else{this.file=e,this.fileName=e.name,this.uploadedFile=null;var n=new FileReader;n.readAsDataURL(this.file),n.onload=function(){t.file=n.result}}}},beforeMount:function(){this.list=this.all},mounted:function(){this.allowCustom?(this.icon=this.find(this.value.icon),this.file=this.value.file):this.value?this.icon=this.find(this.value):this.icon=this.find(this.default)},methods:{onSearch:function(e){var t=this;e.length?this.query=e.toLowerCase():this.isOpen&&(this.query=""),this.query.length?this.list=this.all.filter((function(e){return e.search.includes(t.query)})):this.list=this.all},onOpen:function(){this.$refs.multiselect.search=this.query},onClose:function(){this.placeholder=this.$t("Icon")},find:function(e){return this.all.find((function(t){return t.value==e}))},onHover:function(e){this.placeholder=e.label},triggerUpload:function(){this.$refs.fileUploadButton.trigger()}}},Sr=Cr,Er=(h(18785),qn(Sr,dr,ur,!1,null,null,null)),Ar=Er.exports,Mr=h(9943),Tr={props:{dropdownOpen:{type:Boolean,required:!0},node:Object,showCustomIconPicker:{type:Boolean,default:!1},iconName:{type:String,default:""}},components:{CrownButton:Vn,"sketch-picker":cr.Sketch,IconSelector:Ar},data:function(){return{colors:pe,selectedColor:this.node.definition.get("color"),colorPickerOpen:!1}},watch:{selectedColor:function(e){e?this.setNodeColor(e):this.resetNodeColor()}},methods:{setColorFromPicker:function(e){var t=e.hex8;this.selectedColor=t},resetNodeStyling:function(){this.resetNodeColor(),this.resetCustomIcon()},setNodeColor:function(e){bn.commit("updateNodeProp",{node:this.node,key:"color",value:e}),vt().set(this.node.definition,"color",e),this.$emit("save-state")},resetNodeColor:function(){bn.commit("updateNodeProp",{node:this.node,key:"color",value:void 0}),vt().set(this.node.definition,"color",void 0),this.$emit("save-state")},setCustomIcon:function(e){if(e){var t=(0,Lo.icon)({prefix:"fas",iconName:e}),n=t.html,o=btoa(n);bn.commit("updateNodeProp",{node:this.node,key:"customIcon",value:o}),vt().set(this.node.definition,"customIcon",o),this.$emit("set-custom-icon-name",e),this.$emit("save-state")}},resetCustomIcon:function(){bn.commit("updateNodeProp",{node:this.node,key:"customIcon",value:void 0}),vt().set(this.node.definition,"customIcon",void 0),this.$emit("reset-custom-icon-name"),this.$emit("save-state")},openIconSelector:function(){this.$refs["icon-selector-modal"].show()}},created:function(){this.$t=this.$t.bind(this),Lo.library.add(Mr.fas)}},_r=Tr,Pr=(h(82969),qn(_r,ar,lr,!1,null,"0c72746a",null)),Or=Pr.exports,Dr={name:"CrownDropdowns",components:{CrownTaskDropdown:Xi,CrownBoundaryEventDropdown:sr,CrownColorDropdown:Or},props:{dropdownData:Array,boundaryEventDropdownData:Array,node:Object,nodeRegistry:Object,moddle:Object,shape:Object,taskDropdownInitiallyOpen:{type:Boolean,required:!0},showCustomIconPicker:Boolean,iconName:{type:String,default:""}},data:function(){return{taskDropdownOpen:this.taskDropdownInitiallyOpen,boundaryEventDropdownOpen:!1,colorDropdownOpen:!1}},methods:{taskDropdownToggle:function(e){this.taskDropdownOpen=e,this.boundaryEventDropdownOpen=!1,this.colorDropdownOpen=!1},boundaryEventDropdownToggle:function(e){this.taskDropdownOpen=!1,this.boundaryEventDropdownOpen=e,this.colorDropdownOpen=!1},colorDropdownToggle:function(e){this.taskDropdownOpen=!1,this.boundaryEventDropdownOpen=!1,this.colorDropdownOpen=e}}},Ir=Dr,Nr=(h(64883),qn(Ir,qi,Hi,!1,null,"0a847d3c",null)),Rr=Nr.exports,Br=function(){var e=this,t=e._self._c;return e.node.canBeDefaultFlow()?t("crown-button",{directives:[{name:"b-tooltip",rawName:"v-b-tooltip.hover.viewport.d50",value:{customClass:"no-pointer-events"},expression:"{ customClass: 'no-pointer-events' }",modifiers:{hover:!0,viewport:!0,d50:!0}}],attrs:{title:e.$t("Set as Default Flow"),"aria-label":"Default Flow","data-test":"default-flow",role:"menuitem"},on:{click:e.click}},[t("img",{attrs:{src:e.icon,"aria-hidden":"true"}})]):e._e()},Lr=[],jr=h.p+"img/default-flow.3f3d5309.svg",Fr={components:{CrownButton:Vn},props:["node"],data:function(){return{icon:jr}},methods:{click:function(){this.$emit("default-flow",this.node)}}},zr=Fr,qr=qn(zr,Br,Lr,!1,null,null,null),Hr=qr.exports,Vr={computed:{isLane:function(){return"processmaker-modeler-lane"===this.node.type}},methods:{configurePoolLane:function(){var e=this;if(!["processmaker-modeler-pool","processmaker-modeler-sequence-flow","processmaker-modeler-association","processmaker-modeler-message-flow"].includes(this.node.type)){if(this.node.pool)return this.graph.getCell(this.node.pool)||(this.node.pool=this.graph.getElements().find((function(t){return t.component&&t.component.node===e.node.pool.component.node}))),this.node.pool.component.addToPool(this.shape),void(this.isLane&&this.configureLaneInParentPool());var t=this.graph.findModelsInArea(this.shape.getBBox()).filter((function(e){return e.component&&"processmaker-modeler-pool"===e.component.node.type}))[0];t&&(this.node.pool=t,this.node.pool.component.addToPool(this.shape),this.isLane&&this.configureLaneInParentPool())}},configureLaneInParentPool:function(){var e=this.node.pool.component;e.laneSet||e.createLaneSet();var t=e.laneSet.get("lanes");t.includes(this.node.definition)||t.push(this.node.definition)}},mounted:function(){var e=this;this.$nextTick((function(){e.configurePoolLane()}))}},Ur=h(97019),Gr=h.n(Ur);function Wr(){return!!window.Cypress}var $r={components:{CrownDropdowns:Rr,DeleteButton:fo,GenericFlowButton:ti,AssociationFlowButton:li,CopyButton:Ii,CloneButton:zi,DefaultFlow:Hr,DataAssociationFlowButton:Si},props:{highlighted:Boolean,paper:Object,graph:Object,shape:Object,node:Object,nodeRegistry:Object,moddle:Object,planeElements:Array,processNode:Object,collaboration:Object,isRendering:Boolean,dropdownData:{type:Array,default:function(){return[]}},boundaryEventDropdownData:{type:Array,default:function(){return[]}},showCustomIconPicker:{type:Boolean,default:!1},iconName:{type:String,default:""}},mixins:[Vr],watch:{"node.definition.color":{handler:function(){this.setNodeColor()}},highlightedShapes:function(e,t){nt()(e,t)||(this.showCrown=this.highlightedShapes[0]===this.shape)},highlighted:function(e){e||(this.taskDropdownInitiallyOpen=!1)},shape:function(){this.highlighted&&(this.showCrown=!0)}},data:function(){return{runningInCypressTest:Wr(),showCrown:!1,savePositionOnPointerupEventSet:!1,style:null,taskDropdownInitiallyOpen:this.paperNotRendered(),showReplaceModal:!1,nodeToReplace:null}},created:function(){this.$t=this.$t.bind(this)},computed:{showCrownConfig:function(){return this.showCrown&&!this.isMultiselect&&!1===bn.getters.isReadOnly},isMultiselect:function(){var e=bn.getters.highlightedShapes.length;return e>1},isFlow:function(){return["processmaker-modeler-sequence-flow","processmaker-modeler-message-flow"].includes(this.node.type)},isTextAnnotation:function(){return"processmaker-modeler-text-annotation"===this.node.type},process:function(){return this.node.pool?this.node.pool.component.containingProcess:this.processNode.definition},highlightedShapes:function(){return bn.getters.highlightedShapes}},methods:{setNodeColor:function(){var e=this.node.definition.get("color"),t=Se(this.node,e),n=t.fill,o=t.stroke;Ee(this.shape,n,o)},paperNotRendered:function(){return!this.isRendering},replaceNodeTypePrompt:function(e){this.taskDropdownInitiallyOpen?this.$emit("replace-node",e):(this.showReplaceModal=!0,this.nodeToReplace=e)},confirmedReplaceNodeType:function(){this.$emit("replace-node",this.nodeToReplace)},setNodePosition:function(){this.shape.stopListening(this.paper,"element:pointerup",this.setNodePosition),this.savePositionOnPointerupEventSet=!1,bn.getters.allowSavingElementPosition},repositionCrown:function(){var e=this.shape.findView(this.paper);if(e){var t=e.getBBox({useModelGeometry:!this.isTextAnnotation&&!this.isFlow}),n=t.x,o=t.y,i=t.width;this.style={top:"".concat(o-52,"px"),left:"".concat(n+i-20,"px"),cursor:"pointer"}}},paperDoneRendering:function(){var e=this;this.isRendering&&new Promise((function(t){return e.paper.once("render:done",t)}))},setUpCrownConfig:function(){this.paper.on("render:done scale:changed translate:changed",this.repositionCrown),this.shape.on("change:position change:size change:attrs",this.repositionCrown),this.planeElements.includes(this.node.diagram)||this.planeElements.push(this.node.diagram);var e=Object.keys(this.node.definition.$descriptor.allTypesByName);e.includes("bpmn:FlowElement")&&!this.process.get("flowElements").includes(this.node.definition)&&this.process.get("flowElements").push(this.node.definition),e.includes("bpmn:Artifact")&&!this.process.get("artifacts").includes(this.node.definition)&&this.process.get("artifacts").push(this.node.definition),this.collaboration&&e.includes("bpmn:MessageFlow")&&!this.collaboration.get("messageFlows").includes(this.node.definition)&&this.collaboration.get("messageFlows").push(this.node.definition)},setUpPositionHandling:function(){var e=this;this.shape.on("change:position",(function(t,n){e.node.diagram.bounds.x=n.x,e.node.diagram.bounds.y=n.y,e.savePositionOnPointerupEventSet||(e.shape.listenToOnce(e.paper,"element:pointerup",e.setNodePosition),e.savePositionOnPointerupEventSet=!0)}))}},mounted:function(){var e=this;return y(v().mark((function t(){return v().wrap((function(t){while(1)switch(t.prev=t.next){case 0:return t.next=2,e.$nextTick();case 2:return t.next=4,e.paperDoneRendering();case 4:e.setUpCrownConfig(),e.setUpPositionHandling(),e.setNodeColor();case 7:case"end":return t.stop()}}),t)})))()},destroyed:function(){this.shape.stopListening(),this.shape.remove(),Gr()(this.process.get("flowElements"),this.node.definition),Gr()(this.planeElements,this.node.diagram),Gr()(this.process.get("artifacts"),this.node.definition),this.collaboration&&Gr()(this.collaboration.get("messageFlows"),this.node.definition)}},Xr=$r,Yr=(h(78135),qn(Xr,Dn,In,!1,null,null,null)),Zr=Yr.exports,Kr={components:{CrownConfig:Zr},props:["graph","node","id","highlighted","nodeRegistry","moddle","paper","collaboration","processNode","planeElements","isRendering"],mixins:[_n],data:function(){return{shape:null,initialAssociationDirection:this.node.definition.associationDirection,associationDirection:On}},computed:{isValidConnection:function(){var e=x()(this.target,"component.node.type");if(!e)return!1;var t=this.target.component.node.pool,n=this.sourceShape.component.node.pool;if(n&&n!==t)return!1;var o=this.targetConfig.validateAssociationIncoming&&!this.targetConfig.validateAssociationIncoming(this.sourceNode),i=this.sourceConfig.validateAssociationOutgoing&&!this.sourceConfig.validateAssociationOutgoing(this.targetNode);return!o&&!i}},watch:{"node.definition.associationDirection":function(e){this.updateAssociationMarker(e)}},methods:{updateRouter:function(){this.shape.router("normal",{elementPadding:this.elementPadding})},updateDefinitionLinks:function(){var e=this.shape.getTargetElement();this.node.definition.targetRef=e.component.node.definition},updateAssociationMarker:function(e){e===this.associationDirection.none&&(this.shape.attr("line/targetMarker/display","none"),this.shape.attr("line/sourceMarker/display","none")),e===this.associationDirection.one&&(this.shape.attr("line/targetMarker/display","block"),this.shape.attr("line/sourceMarker/display","none")),e===this.associationDirection.both&&(this.shape.attr("line/targetMarker/display","block"),this.shape.attr("line/sourceMarker/display","block"))}},mounted:function(){this.shape=new a.shapes.standard.Link({router:{name:"normal"}}),this.shape.attr({line:{stroke:"black",strokeWidth:"4",strokeLinecap:"round",strokeDasharray:"1, 8",strokeDashoffset:"5",targetMarker:{type:"image","xlink:href":Pn,width:20,height:20,y:-10},sourceMarker:{type:"image","xlink:href":Pn,width:20,height:20,y:-10}}}),this.shape.addTo(this.graph),this.shape.component=this,this.updateAssociationMarker(this.initialAssociationDirection)}},Jr=Kr,Qr=qn(Jr,r,s,!1,null,null,null),es=Qr.exports,ts={label:"Node Identifier",helper:"Enter the id that is unique from all other elements in the diagram",name:"id",validation:"required|regex:/^[_A-Za-z][-._A-Za-z0-9]*$/"},ns=ts,os="processmaker-modeler-association",is={id:os,component:es,bpmnType:"bpmn:Association",control:!1,definition:function(e){return e.create("bpmn:Association",{associationDirection:"".concat(On.none)})},diagram:function(e){return e.create("bpmndi:BPMNEdge")},inspectorConfig:[{name:"Data Association",items:[{component:"FormAccordion",container:!0,config:{initiallyOpen:!0,label:"Properties",icon:"cog",name:"inspector-accordion-association"},items:[{component:"FormInput",config:ns},{component:"FormSelect",config:{label:"Direction",helper:"Select Direction",name:"associationDirection",options:[{value:"".concat(On.none),content:"None"},{value:"".concat(On.one),content:"One"},{value:"".concat(On.both),content:"Both"}]}}]}]}]},rs=function(){var e=this,t=e._self._c;return t("crown-config",e._g({attrs:{highlighted:e.highlighted,paper:e.paper,graph:e.graph,shape:e.shape,node:e.node,nodeRegistry:e.nodeRegistry,moddle:e.moddle,collaboration:e.collaboration,"process-node":e.processNode,"plane-elements":e.planeElements,"is-rendering":e.isRendering,"dropdown-data":e.dropdownData}},e.$listeners))},ss=[],as={props:{isActive:Boolean},methods:{hideLabel:function(e,t,n){this.isActive&&!n.movedWithArrowKeys&&(this.shape.attr("label/display","none"),this.shape.getEmbeddedCells().filter((function(e){return e.attr("label/text")})).forEach((function(e){e.attr("label/display","none")})))},showLabel:function(){var e=this;return y(v().mark((function t(){return v().wrap((function(t){while(1)switch(t.prev=t.next){case 0:return e.shape.attr("label/display","initial"),t.next=3,e.$nextTick();case 3:e.shape.once("change:position",e.hideLabel);case 4:case"end":return t.stop()}}),t)})))()}},mounted:function(){var e=this;return y(v().mark((function t(){return v().wrap((function(t){while(1)switch(t.prev=t.next){case 0:return t.next=2,e.$nextTick();case 2:e.$once("click",(function(){e.shape.once("change:position",e.hideLabel)})),e.shape.listenTo(e.paper,"cell:pointerup blank:pointerup",e.showLabel),e.shape.once("change:parent",e.showLabel);case 5:case"end":return t.stop()}}),t)})))()}},ls=3,cs=16,ds=4;function us(e,t){var n=t.size(),o=n.width,i=n.height;for(var r in e)hs(t,r,o),fs(t,r,i),ms(t,r,e,o)}function ps(e,t){var n=e.attr(t);return void 0===n?ds:n}function hs(e,t,n){var o=ps(e,t+"/ref-padding-x");-1!==t.indexOf("Right")?e.attr(t+"/ref-x",n-cs-o):-1!==t.indexOf("Left")&&e.attr(t+"/ref-x",o+(vs(e)?16:0))}function fs(e,t,n){var o=ps(e,t+"/ref-padding-y");-1!==t.indexOf("bottom")&&e.attr(t+"/ref-y",n-cs-o)}function ms(e,t,n,o){for(var i=0,r=0;r<ls;r++)e.attr(t+"."+r+"/xlink:href",null);var s=gs(n,t);for(var a in s)if(e.attr(t+"."+i+"/xlink:href",n[t][a]),i++,i>=ls)break;e.attr(t+"/ref-width",cs*i),-1!==t.indexOf("Center")&&e.attr(t+"/ref-x",(o-i*cs)/2)}function gs(e,t){if("bottomCenter"===t){var n={};return Object.keys(e[t]).sort().forEach((function(o){n[o]=e[t][o]})),n}return e[t]}function vs(e){return!!e.attr("image/xlink:href")}var bs=3,ys=16;function ws(e){for(var t=[],n=0;n<bs;n++)t.push({tagName:"image",selector:e+"."+n});return{tagName:"g",selector:e,children:t}}function xs(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1,o={};o[e]=t;for(var i=0;i<bs;i++)o[e+"."+i]={"ref-x":i*ys*n,"ref-y":0,width:ys,height:ys};return o}var ks,Cs,Ss,Es,As,Ms,Ts,_s,Ps,Os,Ds,Is,Ns,Rs,Bs={data:function(){return{markers:{topLeft:{},topCenter:{},topRight:{},bottomLeft:{},bottomCenter:{},bottomRight:{}}}},watch:{markers:{deep:!0,handler:function(){this.recalcMarkersAlignment()}}},methods:{recalcMarkersAlignment:function(){us(this.markers,this.shape)}}},Ls=a.shapes.standard.Circle.extend({markup:[{tagName:"circle",selector:"body"},{tagName:"text",selector:"label"},{tagName:"image",selector:"image"},ws("topLeft"),ws("topCenter"),ws("topRight"),ws("bottomLeft"),ws("bottomCenter"),ws("bottomRight")],defaults:a.util.deepSupplement({size:{width:36,height:36},attrs:yo(yo(yo(yo(yo(yo({image:{"ref-x":5,"ref-y":5,ref:"circle",width:26,height:26}},xs("topLeft",{ref:"circle","ref-y":-20,"ref-padding-x":0})),xs("topCenter",{ref:"circle","ref-y":-20})),xs("topRight",{ref:"circle","ref-x":26,"ref-y":-20,"ref-padding-x":0},-1)),xs("bottomLeft",{ref:"circle","ref-padding-x":0,"ref-padding-y":-40})),xs("bottomCenter",{ref:"circle","ref-padding-y":-40})),xs("bottomRight",{ref:"circle","ref-x":26,"ref-padding-x":0,"ref-padding-y":-40},-1))},a.shapes.standard.Circle.prototype.defaults)}),js={highlighter:{name:"stroke",options:{padding:10,attrs:{stroke:wn,"stroke-width":10,opacity:.3}}}},Fs={highlighter:{name:"stroke",options:{attrs:{stroke:yn,"stroke-width":3,"data-cy":"selected"}}}},zs={highlighter:{name:"stroke",options:{attrs:{stroke:En,"stroke-width":5}}}},qs={highlighter:{name:"stroke",options:{attrs:{stroke:xn,"stroke-width":5}}}},Hs={highlighter:{name:"stroke",options:{attrs:{stroke:Cn,"stroke-width":5}}}},Vs={props:["highlighted","paperManager","hasError","autoValidate","borderOutline","isCompleted","isInProgress","isIdle"],data:function(){return{shape:null,currentBorderOutline:null}},watch:{highlighted:function(){this.setShapeHighlight()},hasError:function(){this.paperManager.awaitScheduledUpdates().then(this.setShapeHighlight)},autoValidate:function(){this.setShapeHighlight()},borderOutline:{deep:!0,handler:function(e){this.setBorderOutline(e)}}},computed:{shapeView:function(){return this.shape.findView(this.paperManager.paper)},shapeBody:function(){return this.shapeView.$el.find("[joint-selector=body]")}},methods:{setShapeHighlight:function(){if(bn.getters.isReadOnly)return this.shapeView.unhighlight(this.shapeBody,zs),this.isCompleted&&(this.shape.attr("body/fill",An),this.shapeView.highlight(this.shapeBody,zs)),this.shapeView.unhighlight(this.shapeBody,qs),this.isInProgress&&(this.shape.attr("body/fill",kn),this.shapeView.highlight(this.shapeBody,qs)),void(this.isIdle&&(this.shape.attr("body/fill",Sn),this.shapeView.highlight(this.shapeBody,Hs)));this.shapeView&&(this.shapeView.unhighlight(this.shapeBody,js),this.hasError&&this.autoValidate&&this.shapeView.highlight(this.shapeBody,js),this.shapeView.unhighlight(this.shapeBody,Fs),this.highlighted&&this.shapeView.highlight(this.shapeBody,Fs))},setBorderOutline:function(e){this.currentBorderOutline&&this.shapeView.unhighlight(this.shapeBody,this.currentBorderOutline),this.currentBorderOutline=e?No()(e):null,this.currentBorderOutline&&this.shapeView.highlight(this.shapeBody,this.currentBorderOutline)}},mounted:function(){var e=this;this.$nextTick((function(){e.paperManager.awaitScheduledUpdates().then((function(){e.setShapeHighlight(),e.shape.on("change:size",(function(){e.paperManager.awaitScheduledUpdates().then(e.setShapeHighlight),e.$emit("shape-resize",e.shape)}))}))}))}},Us={components:{CrownConfig:Zr},props:["graph","node","id","highlighted","nodeRegistry","moddle","paper","collaboration","processNode","planeElements","isRendering"],mixins:[Vs,Je,as],data:function(){return{shape:null,definition:null,dropdownData:[{label:Ao["processmaker-modeler-end-event"],nodeType:"processmaker-modeler-end-event"},{label:Ao["processmaker-modeler-message-end-event"],nodeType:"processmaker-modeler-message-end-event",dataTest:"switch-to-message-end-event"},{label:Ao["processmaker-modeler-error-end-event"],nodeType:"processmaker-modeler-error-end-event",dataTest:"switch-to-error-end-event"},{label:Ao["processmaker-modeler-signal-end-event"],nodeType:"processmaker-modeler-signal-end-event",dataTest:"switch-to-signal-end-event"},{label:Ao["processmaker-modeler-terminate-end-event"],nodeType:"processmaker-modeler-terminate-end-event",dataTest:"switch-to-terminate-end-event"}]}},watch:{"node.definition.name":function(e){this.shape.attr("label/text",e)}},mounted:function(){this.shape=new Ls,this.shape.set("type","processmaker.components.nodes.endEvent.Shape");var e=this.node.diagram.bounds;this.shape.position(e.get("x"),e.get("y")),this.shape.resize(e.get("width"),e.get("height")),this.shape.attr({body:{fill:xe,stroke:ke},label:{text:this.node.definition.get("name"),refY:"130%"}}),this.shape.addTo(this.graph),this.shape.component=this}},Gs=Us,Ws=qn(Gs,rs,ss,!1,null,null,null),$s=Ws.exports,Xs={label:"Name",name:"name",helper:"Enter the name of this element",validation:"required"},Ys=Xs,Zs=function(){var e=this,t=e._self._c;return t("div",[t("FormInput",{attrs:{name:"id",label:e.label,helper:e.helper,error:e.error,validation:e.validation},on:{input:e.onInput},model:{value:e.localValue,callback:function(t){e.localValue=t},expression:"localValue"}})],1)},Ks=[],Js={props:{label:{type:String},helper:{type:String},value:{default:null},validation:{type:String}},data:function(){return{localValue:this.value,error:""}},methods:{onInput:function(e){this.value!==e&&(this.isUnique(e)?(this.error="",this.$emit("input",e)):this.error=this.$t("Must be unique"))},isUnique:function(e){return!!bn.state.nodes.every((function(t){return t.definition.id!==e}))}}},Qs=Js,ea=qn(Qs,Zs,Ks,!1,null,null,null),ta=ea.exports,na={component:"FormAccordion",container:!0,config:{initiallyOpen:!1,label:"Advanced",icon:"cogs",name:"advanced-accordion"},items:[{component:ta,config:ns}]},oa=function(){var e=this,t=e._self._c;return t("div",[t("div",{staticClass:"d-flex justify-content-between align-items-end mb-2"},[t("label",{staticClass:"m-0"},[e._v(e._s(e.$t(e.label)))]),t("button",{directives:[{name:"b-modal",rawName:"v-b-modal.documentation-modal",modifiers:{"documentation-modal":!0}}],staticClass:"btn-sm float-right",attrs:{type:"button","aria-label":e.$t("Expand"),"data-test":"documentation-modal-button"}},[t("i",{staticClass:"fas fa-expand"})])]),t("form-text-area",{staticClass:"documentation-input d-flex",attrs:{value:e.textValue,richtext:!0,"data-test":"documentation-text-area",id:"documentation-editor"},on:{input:function(t){return e.$emit("input",t)},blur:e.onBlur}}),t("b-modal",{attrs:{id:"documentation-modal",size:"lg",centered:"",title:e.$t("Description"),"header-close-content":"×","ok-only":"","ok-variant":"secondary","ok-title":"Close","no-enforce-focus":""}},[t("form-text-area",{staticClass:"documentation-input",attrs:{rows:"5",value:e.textValue,richtext:!0,"data-test":"documentation-modal-text-area",id:"documentation-editor-modal"},on:{input:function(t){return e.$emit("input",t)},blur:e.onBlur}})],1)],1)},ia=[],ra=h(47037),sa=h.n(ra),aa={props:{value:{type:[String,Array],default:""},label:{type:String,default:"Description"}},inheritAttrs:!1,computed:{textValue:function(){return sa()(this.value)?this.value:x()(this.value[0],"text","")}},methods:{onBlur:function(){var e=this.$root.$children.find((function(e){return e.$refs.modeler}));e.$refs.modeler.pushToUndoStack()}}},la=aa,ca=(h(14855),qn(la,oa,ia,!1,null,null,null)),da=ca.exports,ua={component:"FormAccordion",container:!0,config:{initiallyOpen:!1,label:"Documentation",icon:"book",name:"documentation-accordion"},items:[{component:da,config:{label:"Description",name:"documentation",helper:""}}]},pa="processmaker-modeler-end-event",ha={id:pa,component:$s,bpmnType:"bpmn:EndEvent",control:!0,category:"BPMN",icon:h(48807),label:Ao[pa],rank:30,items:[{icon:h(48807),label:Ao[pa],control:!0,rank:31,id:"processmaker-modeler-end-event"},{icon:h(52080),label:Ao["processmaker-modeler-message-end-event"],control:!0,rank:32,id:"processmaker-modeler-message-end-event"},{icon:h(95093),label:Ao["processmaker-modeler-error-end-event"],control:!0,rank:33,id:"processmaker-modeler-error-end-event"},{icon:h(96425),label:Ao["processmaker-modeler-signal-end-event"],control:!0,rank:34,id:"processmaker-modeler-signal-end-event"},{icon:h(47616),label:Ao["processmaker-modeler-terminate-end-event"],control:!0,rank:35,id:"processmaker-modeler-terminate-end-event"}],definition:function(e,t){return e.create("bpmn:EndEvent",{name:t(Ao[pa])})},diagram:function(e){return e.create("bpmndi:BPMNShape",{bounds:e.create("dc:Bounds",{height:36,width:36,x:null,y:null})})},inspectorConfig:[{name:Ao[pa],items:[{component:"FormAccordion",container:!0,config:{initiallyOpen:!0,label:"Properties",icon:"cog",name:"inspector-accordion-end-event"},items:[{component:"FormInput",config:Ys}]},ua,na]}]},fa=(h(85827),h(84384)),ma=h.n(fa),ga=(h(75505),function(e){var t=btoa(e);return"data:image/svg+xml;base64,".concat(t)}),va=function(e,t){var n=(new DOMParser).parseFromString(e,"text/xml"),o=t.definition.get("color")||Ae(t);return n.querySelectorAll('*[fill]:not([fill="none"])').forEach((function(e){e.setAttribute("fill",o)})),n.querySelectorAll('*[stroke]:not([stroke="none"])').forEach((function(e){e.setAttribute("stroke",o)})),ga(n.documentElement.outerHTML)},ba=va,ya={data:function(){return{nodeIcon:null}},computed:{icon:function(){return this.node.definition.customIcon?atob(this.node.definition.customIcon):this.nodeIcon}},watch:{"node.definition.color":{handler:function(){this.updateIconColor()}},"node.definition.customIcon":{handler:function(){this.updateIconColor()}}},methods:{updateIconColor:function(){this.nodeIcon&&!this.node.isBpmnType("bpmn:ServiceTask")&&this.shape&&this.shape.attr("image/xlink:href",ba(this.icon,this.node))}},mounted:function(){this.updateIconColor()}},wa={extends:$s,mixins:[ya],props:["moddle","rootElements","id"],data:function(){return{error:this.moddle.create("bpmn:Error",{id:"".concat(this.id,"_error"),name:"".concat(this.id,"_error")}),nodeIcon:ma()}},methods:{addErrorRef:function(){this.node.definition.get("eventDefinitions")[0].errorRef?this.error=this.node.definition.get("eventDefinitions")[0].errorRef:(this.error=this.moddle.create("bpmn:Error",{id:"".concat(this.id,"_error"),name:"".concat(this.id,"_error")}),this.rootElements.push(this.error),this.node.definition.get("eventDefinitions")[0].errorRef=this.error)}},mounted:function(){this.addErrorRef()},destroyed:function(){Gr()(this.rootElements,this.error)}},xa=wa,ka=qn(xa,ks,Cs,!1,null,null,null),Ca=ka.exports,Sa=h(82492),Ea=h.n(Sa),Aa=h(57557),Ma=h.n(Aa),Ta="processmaker-modeler-error-end-event",_a=Ea()(No()(ha),{id:Ta,component:Ca,control:!1,label:Ao[Ta],definition:function(e,t){return e.create("bpmn:EndEvent",{name:t(Ao[Ta]),eventDefinitions:[e.create("bpmn:ErrorEventDefinition")]})},inspectorData:function(e){return Object.entries(e.definition).reduce((function(e,t){var n=mt(t,2),o=n[0],i=n[1];return"eventDefinitions"===o?e.errorName=i[0].get("errorRef").name:e[o]=i,e}),{})},inspectorHandler:function(e,t,n){for(var o in Ma()(e,["$type","eventDefinitions","errorName"]))t.definition[o]!==e[o]&&n(t,o,e[o]);var i=t.definition.get("eventDefinitions")[0].errorRef;i.name!==e.errorName&&(i.name=e.errorName)},inspectorConfig:[{items:[{items:[{},{component:"FormInput",config:{label:"Error Name",name:"errorName",helper:"Enter the error name that is unique from all other elements in the diagram"}}]}]}]}),Pa=h(43258),Oa=h.n(Pa),Da={extends:$s,mixins:[ya],props:["moddle","rootElements","id"],data:function(){return{nodeIcon:Oa()}}},Ia=Da,Na=qn(Ia,Ss,Es,!1,null,null,null),Ra=Na.exports,Ba="processmaker-modeler-terminate-end-event",La=Ea()(No()(ha),{id:Ba,component:Ra,control:!1,label:Ao[Ba],definition:function(e,t){return e.create("bpmn:EndEvent",{name:t(Ao[Ba]),eventDefinitions:[e.create("bpmn:TerminateEventDefinition")]})}}),ja=function(){var e=this,t=e._self._c;return t("crown-config",e._g({attrs:{highlighted:e.highlighted,paper:e.paper,graph:e.graph,shape:e.shape,node:e.node,nodeRegistry:e.nodeRegistry,moddle:e.moddle,collaboration:e.collaboration,"process-node":e.processNode,"plane-elements":e.planeElements,"is-rendering":e.isRendering,"dropdown-data":e.dropdownData}},e.$listeners))},Fa=[],za=18,qa=a.dia.Element.define("processmaker.components.nodes.gateway.Shape",{markup:[].concat(m(a.shapes.standard.Polygon.prototype.markup),[{tagName:"image",selector:"image"}]),attrs:{body:{strokeWidth:2,stroke:"#000000",refPointsKeepOffset:"40,0, 80,40, 40,80, 0,40",fill:"#FFFFFF"},label:{textVerticalAnchor:"top",textAnchor:"middle",refX:"50%",refY:"50",fontSize:14,fill:"#333333"},image:{width:za,height:za,fill:"transparent",xlinkHref:"",refX:"50%",refX2:-za/2,refY:"50%",refY2:-za/2}}}),Ha=["bpmn:ExclusiveGateway","bpmn:InclusiveGateway"],Va={components:{CrownConfig:Zr},props:["graph","node","id","highlighted","nodeRegistry","moddle","paper","collaboration","processNode","planeElements","isRendering"],mixins:[Vs,Je,as],created:function(){var e=this.node.definition.default||null;delete this.node.definition.default,Ha.indexOf(this.node.definition.$type)>-1&&this.$set(this.node.definition,"default",e)},data:function(){return{shape:null,definition:null,labelWidth:175,dropdownData:[{label:Po["processmaker-modeler-exclusive-gateway"],nodeType:"processmaker-modeler-exclusive-gateway"},{label:Po["processmaker-modeler-inclusive-gateway"],nodeType:"processmaker-modeler-inclusive-gateway",dataTest:"switch-to-inclusive-gateway"},{label:Po["processmaker-modeler-parallel-gateway"],nodeType:"processmaker-modeler-parallel-gateway",dataTest:"switch-to-parallel-gateway"},{label:Po["processmaker-modeler-event-based-gateway"],nodeType:"processmaker-modeler-event-based-gateway",dataTest:"switch-to-event-based-gateway",disabled:function(e){if(e&&e.definition&&e.definition.outgoing){var t=["bpmn:IntermediateCatchEvent"],n=e.definition.outgoing.find((function(e){return!t.includes(e.targetRef.$type)}));return!!n&&"It must be connected only to catch events"}return!1}}]}},watch:{"node.definition.name":function(e){this.shape.attr("label/text",e)}},mounted:function(){this.shape=new qa;var e=this.node.diagram.bounds;this.shape.position(e.x,e.y),this.shape.resize(e.width,e.height),this.shape.attr({label:{text:this.node.definition.get("name"),fill:"black"}}),this.shape.addTo(this.graph),this.shape.component=this}},Ua=Va,Ga=qn(Ua,ja,Fa,!1,null,null,null),Wa=Ga.exports,$a=h(4074),Xa=h.n($a),Ya={extends:Wa,mixins:[ya],data:function(){return{nodeIcon:Xa()}}},Za=Ya,Ka=qn(Za,As,Ms,!1,null,null,null),Ja=Ka.exports,Qa="processmaker-modeler-exclusive-gateway",el={id:Qa,component:Ja,bpmnType:"bpmn:ExclusiveGateway",control:!0,category:"BPMN",icon:h(21678),label:"Gateway",rank:50,items:[{icon:h(52794),label:"Exclusive Gateway",control:!0,rank:51,id:"processmaker-modeler-exclusive-gateway"},{icon:h(59749),label:"Inclusive Gateway",control:!0,rank:52,id:"processmaker-modeler-inclusive-gateway"},{icon:h(23726),label:"Parallel Gateway",control:!0,rank:53,id:"processmaker-modeler-parallel-gateway"},{icon:h(93763),label:"Event Based Gateway",control:!0,rank:54,id:"processmaker-modeler-event-based-gateway"}],definition:function(e,t){return e.create("bpmn:ExclusiveGateway",{name:t(Po[Qa])})},diagram:function(e){return e.create("bpmndi:BPMNShape",{bounds:e.create("dc:Bounds",{height:36,width:36})})},inspectorConfig:[{name:Po[Qa],items:[{component:"FormAccordion",container:!0,config:{initiallyOpen:!0,label:"Properties",icon:"cog",name:"inspector-accordion-exlcusive-gateway"},items:[{component:"FormInput",config:Ys}]},ua,na]}]},tl=h(62635),nl=h.n(tl),ol={diverging:"Diverging",converging:"Converging"},il={extends:Wa,mixins:[ya],data:function(){return{incoming:this.node.definition.get("incoming"),nodeIcon:nl()}},watch:{incoming:function(e){var t=e.length<=1?ol.diverging:ol.converging;this.node.definition.set("gatewayDirection",t)}}},rl=il,sl=qn(rl,Ts,_s,!1,null,null,null),al=sl.exports,ll="processmaker-modeler-inclusive-gateway",cl={id:ll,component:al,bpmnType:"bpmn:InclusiveGateway",control:!1,category:"BPMN",label:Po[ll],definition:function(e,t){return e.create("bpmn:InclusiveGateway",{name:t(Po[ll]),gatewayDirection:ol.diverging})},diagram:function(e){return e.create("bpmndi:BPMNShape",{bounds:e.create("dc:Bounds",{height:36,width:36})})},inspectorConfig:[{name:Po[ll],items:[{component:"FormAccordion",container:!0,config:{initiallyOpen:!0,label:"Properties",icon:"cog",name:"inspector-accordion-inclusive-gateway-config"},items:[{component:"FormInput",config:Ys}]},ua,{component:"FormAccordion",container:!0,config:{initiallyOpen:!1,label:"Advanced",icon:"cogs",name:"inspector-accordion-inclusive-gateway-advanced"},items:[{component:"FormInput",config:ns},{component:"FormSelect",config:{label:"Direction",helper:"Select the direction of workflow for this element",name:"gatewayDirection",options:[{value:ol.diverging,content:"Diverging"},{value:ol.converging,content:"Converging"}]}}]}]}]},dl=h(70718),ul=h.n(dl),pl={extends:Wa,mixins:[ya],data:function(){return{nodeIcon:ul()}},watch:{"node.definition":{deep:!0,immediate:!0,handler:function(){delete this.node.definition.default}}}},hl=pl,fl=qn(hl,Ps,Os,!1,null,null,null),ml=fl.exports,gl={id:"processmaker-modeler-parallel-gateway",component:ml,bpmnType:"bpmn:ParallelGateway",control:!1,category:"BPMN",label:"Parallel Gateway",definition:function(e,t){return e.create("bpmn:ParallelGateway",{name:t("Parallel Gateway"),gatewayDirection:ol.diverging})},diagram:function(e){return e.create("bpmndi:BPMNShape",{bounds:e.create("dc:Bounds",{height:36,width:36})})},inspectorConfig:[{name:"Parallel Gateway",items:[{component:"FormAccordion",container:!0,config:{initiallyOpen:!0,label:"Properties",icon:"cog",name:"inspector-accordion-parallel-gateway-config"},items:[{component:"FormInput",config:Ys}]},ua,{component:"FormAccordion",container:!0,config:{initiallyOpen:!1,label:"Advanced",icon:"cogs",name:"inspector-accordion-parallel-gateway-direction"},items:[{component:"FormInput",config:ns},{component:"FormSelect",config:{label:"Direction",helper:"Select the direction of workflow for this element",name:"gatewayDirection",options:[{value:ol.diverging,content:"Diverging"},{value:ol.converging,content:"Converging"}]}}]}]}]},vl=h(30666),bl=h.n(vl),yl={extends:Wa,mixins:[ya],data:function(){return{nodeIcon:bl()}}},wl=yl,xl=qn(wl,Ds,Is,!1,null,null,null),kl=xl.exports,Cl="processmaker-modeler-event-based-gateway",Sl={id:Cl,component:kl,bpmnType:"bpmn:EventBasedGateway",control:!1,category:"BPMN",label:Po[Cl],definition:function(e,t){return e.create("bpmn:EventBasedGateway",{name:t(Po[Cl])})},diagram:function(e){return e.create("bpmndi:BPMNShape",{bounds:e.create("dc:Bounds",{height:36,width:36})})},inspectorConfig:[{name:Po[Cl],items:[{component:"FormAccordion",container:!0,config:{initiallyOpen:!0,label:"Properties",icon:"cog",name:"inspector-accordion-event-based-gateway"},items:[{component:"FormInput",config:{label:"Name",helper:"The Name of the Gateway",name:"name"}}]},ua,na]}]},El=function(){var e=this,t=e._self._c;return t("crown-config",e._g({attrs:{highlighted:e.highlighted,paper:e.paper,graph:e.graph,shape:e.shape,node:e.node,nodeRegistry:e.nodeRegistry,moddle:e.moddle,collaboration:e.collaboration,"process-node":e.processNode,"plane-elements":e.planeElements,"is-rendering":e.isRendering}},e.$listeners))},Al=[],Ml={offset:{y:-20}},Tl="processmaker-modeler-lane",_l=function(e){pi(n,e);var t=vi(n);function n(){return wo(this,n),t.apply(this,arguments)}return ko(n,[{key:"makeFlowNode",value:function(e,t,n){var o=this,i=this.nodeRegistry["processmaker-modeler-sequence-flow"].diagram(this.moddle),r=this.nodeRegistry["processmaker-modeler-sequence-flow"].definition(this.moddle,this.$t);r.set("sourceRef",e.component.node.definition),r.set("targetRef",t.component.node.definition);var s=n.sourceAnchor,a=n.targetAnchor;return i.waypoint=[s,a].map((function(e){return o.moddle.create("dc:Point",e)})),"bpmn:ExclusiveGateway"!==r.sourceRef.$type&&"bpmn:InclusiveGateway"!==r.sourceRef.$type||(r.conditionExpression=this.moddle.create("bpmn:FormalExpression",{body:""})),e.component.node.definition.get("outgoing").push(r),t.component.node.definition.get("incoming").push(r),new Ro("processmaker-modeler-sequence-flow",r,i)}}],[{key:"isValid",value:function(e){var t=e.sourceShape,o=e.targetShape,i=e.targetConfig,r=x()(o,"component.node"),s=x()(t,"component.node");return yi.hasTargetType(o)&&yi.targetIsNotSource(s,r)&&n.targetIsNotALane(r)&&n.targetIsInSamePool(t,o)&&n.eventBasedGatewayTarget(s,r)&&n.isValidSource(t,i)&&n.sourceIsNotPool(s)&&!wi.isADataNode(s)&&!wi.isADataNode(r)}},{key:"isValidSource",value:function(e,t){return null==t.validateIncoming||t.validateIncoming(e.node)}},{key:"targetIsNotALane",value:function(e){return!e.isType(Tl)}},{key:"targetIsInSamePool",value:function(e,t){var n=t.component.node.pool,o=e.component.node.pool;return!o||o===n}},{key:"targetIsNotSource",value:function(e,t){return t.id!==e.id}},{key:"eventBasedGatewayTarget",value:function(e,t){var n=e.isBpmnType("bpmn:EventBasedGateway"),o=t.isBpmnType("bpmn:IntermediateCatchEvent");return!n||o}},{key:"sourceIsNotPool",value:function(e){return!e.isType("processmaker-modeler-pool")}}]),n}(yi),Pl={components:{CrownConfig:Zr},props:["graph","node","id","highlighted","nodeRegistry","moddle","paper","collaboration","processNode","planeElements","isRendering"],mixins:[_n],data:function(){return{shape:null}},computed:{isValidConnection:function(){return _l.isValid({sourceShape:this.sourceShape,targetShape:this.target,targetConfig:this.targetConfig})},targetType:function(){return x()(this.target,"component.node.type")},shapeName:function(){return this.node.definition.get("name")},nameLabel:{get:function(){return this.shape.label(0).attrs.text.text},set:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";this.shape.label(0,{attrs:{text:{text:e}}})}}},watch:{"node.definition":{handler:function(){var e=this.shapeName;e!==this.nameLabel&&(this.nameLabel=e),this.setDefaultMarker(this.isDefaultFlow())},deep:!0},"node.definition.sourceRef":{handler:function(){this.setDefaultMarker(this.isDefaultFlow())},deep:!0}},methods:{setDefaultMarker:function(e){this.shape.attr("line",{sourceMarker:{"stroke-width":e?2:0}})},isDefaultFlow:function(){return this.node.definition.sourceRef&&this.node.definition.sourceRef.default&&this.node.definition.sourceRef.default.id===this.node.definition.id},updateRouter:function(){this.shape.router("orthogonal",{padding:1})},updateDefinitionLinks:function(){var e=this.shape.getTargetElement();this.node.definition.targetRef=e.component.node.definition,this.sourceShape.component.node.definition.get("outgoing").push(this.node.definition),e.component.node.definition.get("incoming").push(this.node.definition)},createLabel:function(){this.shape.labels([{attrs:{text:{text:this.shapeName}},position:Ml}])},createDefaultFlowMarker:function(){this.shape.attr("line",{sourceMarker:{type:"polyline","stroke-width":this.isDefaultFlow()?2:0,points:"2,6 6,-6"}})}},mounted:function(){this.shape=new a.shapes.standard.Link,this.shape.connector("rounded",{radius:5}),this.createLabel(),this.createDefaultFlowMarker(),this.shape.addTo(this.graph),this.shape.component=this}},Ol=Pl,Dl=qn(Ol,El,Al,!1,null,null,null),Il=Dl.exports,Nl="processmaker-modeler-sequence-flow",Rl={id:Nl,component:Il,bpmnType:"bpmn:SequenceFlow",control:!1,definition:function(e){return e.create("bpmn:SequenceFlow",{name:null})},diagram:function(e){return e.create("bpmndi:BPMNEdge")},inspectorData:function(e){var t=["bpmn:ExclusiveGateway","bpmn:InclusiveGateway"].includes(e.definition.sourceRef.$type);return t||delete e.definition.conditionExpression,Object.entries(e.definition).reduce((function(e,t){var n=mt(t,2),o=n[0],i=n[1];return e[o]="conditionExpression"===o?i.body:i,e}),{})},inspectorHandler:function(e,t,n,o){var i=t.definition,r=["bpmn:ExclusiveGateway","bpmn:InclusiveGateway"].includes(i.sourceRef.$type);for(var s in e)if(i[s]!==e[s])if("conditionExpression"===s&&r){if(i[s].body!==e[s]){var a=o.create("bpmn:FormalExpression",{body:e[s]});n(t,s,a)}}else n(t,s,e[s])},inspectorConfig:[{name:"Sequence Flow",items:[{component:"FormAccordion",container:!0,config:{initiallyOpen:!0,label:"Properties",icon:"cog",name:"inspector-accordion-sequence-flow"},items:[{component:"FormInput",config:yo(yo({},Ys),{},{validation:null})}]},ua,na]}]},Bl=function(){var e=this,t=e._self._c;return t("crown-config",{attrs:{highlighted:e.highlighted,paper:e.paper,graph:e.graph,shape:e.shape,node:e.node,nodeRegistry:e.nodeRegistry,moddle:e.moddle,collaboration:e.collaboration,"process-node":e.processNode,"plane-elements":e.planeElements,"is-rendering":e.isRendering},on:{"remove-node":function(t){return e.$emit("remove-node",t)},"add-node":function(t){return e.$emit("add-node",t)},"save-state":function(t){return e.$emit("save-state",t)}}})},Ll=[],jl=function(e){pi(n,e);var t=vi(n);function n(){return wo(this,n),t.apply(this,arguments)}return ko(n,[{key:"makeFlowNode",value:function(e,t,n){var o=this,i=this.nodeRegistry["processmaker-modeler-message-flow"].diagram(this.moddle),r=this.nodeRegistry["processmaker-modeler-message-flow"].definition(this.moddle);r.set("sourceRef",e.component.node.definition),r.set("targetRef",t.component.node.definition);var s=n.sourceAnchor,a=n.targetAnchor;return i.waypoint=[s,a].map((function(e){return o.moddle.create("dc:Point",e)})),new Ro("processmaker-modeler-message-flow",r,i)}}],[{key:"isValid",value:function(e){var t=e.sourceShape,o=e.targetShape,i=e.sourceConfig,r=x()(o,"component.node"),s=x()(t,"component.node");return yi.hasTargetType(o)&&n.isValidTargetType(r)&&yi.targetIsValidStartEventType(r)&&yi.targetIsValidIntermediateEventType(r)&&yi.targetIsValidBoundaryEventType(r)&&yi.targetIsNotContainingPool(o,s)&&yi.targetIsInDifferentPool(o,t)&&yi.targetIsNotSource(r,s)&&yi.allowOutgoingFlow(i,s)}},{key:"isValidTargetType",value:function(e){return["bpmn:Task","bpmn:ScriptTask","bpmn:ManualTask","bpmn:CallActivity","bpmn:ServiceTask","bpmn:IntermediateCatchEvent","bpmn:Participant","bpmn:StartEvent","bpmn:BoundaryEvent"].some((function(t){return e.isBpmnType(t)}))}}]),n}(yi),Fl={components:{CrownConfig:Zr},props:["graph","node","id","highlighted","nodeRegistry","moddle","paper","collaboration","processNode","planeElements","isRendering"],mixins:[_n],data:function(){return{shape:null}},computed:{isValidConnection:function(){return jl.isValid({sourceShape:this.sourceShape,targetShape:this.target,sourceConfig:this.sourceConfig})},targetType:function(){return x()(this.target,"component.node.type")},sourceType:function(){return x()(this.sourceNode,"type")}},methods:{updateRouter:function(){this.shape.router("orthogonal",{padding:1})},updateDefinitionLinks:function(){var e=this.shape.getTargetElement();this.node.definition.targetRef=e.component.node.definition}},mounted:function(){this.shape=new a.shapes.standard.Link({router:{name:"orthogonal"}}),this.shape.attr("line",{strokeDasharray:"10 10",sourceMarker:{type:"circle",r:5,"stroke-width":2,fill:"#fff"},targetMarker:{type:"path",fill:"#fff","stroke-width":2,d:"M 10 -5 0 0 10 5 Z"}}),this.shape.addTo(this.graph),this.shape.component=this}},zl=Fl,ql=qn(zl,Bl,Ll,!1,null,null,null),Hl=ql.exports,Vl="processmaker-modeler-message-flow",Ul={id:Vl,component:Hl,bpmnType:"bpmn:MessageFlow",control:!1,definition:function(e){return e.create("bpmn:MessageFlow",{name:""})},diagram:function(e){return e.create("bpmndi:BPMNEdge")},inspectorConfig:[{name:"Message Flow",items:[{component:"FormAccordion",container:!0,config:{initiallyOpen:!0,label:"Properties",icon:"cog",name:"inspector-accordion-message-flow"},items:[{component:"FormInput",config:Ys}]},ua,na]}]},Gl=h(18256),Wl=h.n(Gl),$l={extends:$s,mixins:[ya],props:["node","rootElements","id"],data:function(){return{message:this.moddle.create("bpmn:Message",{id:"".concat(this.id,"_message"),name:"".concat(this.id,"_message")}),nodeIcon:Wl()}},methods:{addMessageRef:function(){this.node.definition.get("eventDefinitions")[0].messageRef?this.message=this.node.definition.get("eventDefinitions")[0].messageRef:(this.message=this.moddle.create("bpmn:Message",{id:"".concat(this.id,"_message"),name:"".concat(this.id,"_message")}),this.rootElements.push(this.message),this.node.definition.get("eventDefinitions")[0].messageRef=this.message)}},mounted:function(){this.addMessageRef()},destroyed:function(){Gr()(this.rootElements,this.message),bn.commit("removeMessageRef",this.message)}},Xl=$l,Yl=qn(Xl,Ns,Rs,!1,null,null,null),Zl=Yl.exports,Kl=function(){var e=this,t=e._self._c;return t("div",[t("label",{staticClass:"typo__label"},[e._v(e._s(e.label))]),t("div",{staticClass:"d-flex",class:{invalid:e.invalid}},[t("multiselect",{attrs:{value:e.selectedOption,placeholder:e.$t(e.placeholder),options:e.options,multiple:e.multiple,"track-by":e.trackBy,"show-labels":!1,searchable:!0,"internal-search":!1,label:"name","data-test":"".concat(e.name,":select")},on:{input:e.change,"search-change":e.loadOptionsDebounced,open:e.loadOptions}},[t("template",{slot:"noResult"},[e._t("noResult",(function(){return[e._v(e._s(e.$t("Not found")))]}))],2),t("template",{slot:"noOptions"},[e._t("noOptions",(function(){return[e._v(e._s(e.$t("No Data Available")))]}))],2)],2),t("div",{staticClass:"btn-group ml-1",attrs:{role:"group"}},[t("button",{staticClass:"btn btn-secondary btn-sm",attrs:{type:"button","data-cy":"events-list",title:e.$t("Configure")},on:{click:e.toggleConfigMessage}},[t("i",{staticClass:"fa fa-ellipsis-h"})])])],1),e.invalid?t("div",{staticClass:"invalid-feedback d-block"},[t("div",[e._v(" "+e._s(e.$t("Message reference is required"))+" ")])]):e._e(),e.helper?t("small",{staticClass:"form-text text-muted"},[e._v(e._s(e.$t(e.helper)))]):e._e(),e.showNewMessage?t("div",{staticClass:"card"},[t("div",{staticClass:"card-body p-2"},[t("form-input",{attrs:{label:e.$t("ID"),error:e.getValidationErrorForNewId(e.messageId),"data-cy":"events-add-id"},model:{value:e.messageId,callback:function(t){e.messageId=t},expression:"messageId"}}),t("form-input",{attrs:{label:e.$t("Name"),error:e.getValidationErrorForNewName(e.messageName),"data-cy":"events-add-name"},model:{value:e.messageName,callback:function(t){e.messageName=t},expression:"messageName"}})],1),t("div",{staticClass:"card-footer text-right p-2"},[t("button",{staticClass:"btn-special-assignment-action btn-special-assignment-close btn btn-outline-secondary btn-sm",attrs:{type:"button","data-cy":"events-cancel"},on:{click:e.cancelAddMessage}},[e._v(" "+e._s(e.$t("Cancel"))+" ")]),t("button",{staticClass:"btn-special-assignment-action btn btn-secondary btn-sm",attrs:{disabled:!e.validNew,type:"button","data-cy":"events-save"},on:{click:e.addMessage}},[e._v(" "+e._s(e.$t("Save"))+" ")])])]):e._e(),e.showEditMessage?t("div",{staticClass:"card"},[t("div",{staticClass:"card-body p-2"},[t("form-input",{attrs:{label:e.$t("Name"),error:e.getValidationErrorForNameUpdate(e.messageName),"data-cy":"events-edit-name"},model:{value:e.messageName,callback:function(t){e.messageName=t},expression:"messageName"}})],1),t("div",{staticClass:"card-footer text-right p-2"},[t("button",{staticClass:"btn-special-assignment-action btn-special-assignment-close btn btn-outline-secondary btn-sm",attrs:{type:"button","data-cy":"events-cancel"},on:{click:e.cancelAddMessage}},[e._v(" "+e._s(e.$t("Cancel"))+" ")]),t("button",{staticClass:"btn-special-assignment-action btn btn-secondary btn-sm",attrs:{disabled:!e.validUpdate,type:"button","data-cy":"events-save"},on:{click:e.updateMessage}},[e._v(" "+e._s(e.$t("Save"))+" ")])])]):e.showConfirmDelete?t("div",{staticClass:"card mb-3 bg-danger text-white"},[e.deleteMessageUsage(e.deleteMessage.id)?t("div",{staticClass:"card-body p-2"},[e._v(" "+e._s(e.deleteMessageUsage(e.deleteMessage.id))+" ")]):t("div",{staticClass:"card-body p-2"},[e._v(" "+e._s(e.$t("Are you sure you want to delete this item?"))+" ("+e._s(e.deleteMessage.id)+") "+e._s(e.deleteMessage.name)+" ")]),t("div",{staticClass:"card-footer text-right p-2"},[t("button",{staticClass:"btn btn-sm btn-light mr-2 p-1 font-xs",attrs:{type:"button","data-cy":"events-cancel"},on:{click:function(t){e.showConfirmDelete=!1}}},[e._v(" "+e._s(e.$t("Cancel"))+" ")]),e.deleteMessageUsage(e.deleteMessage.id)?e._e():t("button",{staticClass:"btn btn-sm btn-danger p-1 font-xs",attrs:{type:"button","data-cy":"events-delete"},on:{click:e.confirmDeleteMessage}},[e._v(" "+e._s(e.$t("Delete"))+" ")])])]):!e.showListMessages||e.showNewMessage||e.showEditMessage?e._e():[t("table",{staticClass:"table table-sm table-striped",attrs:{width:"100%"}},[t("thead",[t("tr",[t("td",{attrs:{colspan:"2",align:"right"}},[t("button",{staticClass:"btn btn-secondary btn-sm p-1 font-xs",attrs:{type:"button","data-cy":"events-add"},on:{click:e.showAddMessage}},[t("i",{staticClass:"fa fa-plus"}),e._v(" "+e._s(e.$t("Message"))+" ")])])])]),t("tbody",e._l(e.localMessages,(function(n){return t("tr",{key:"message-".concat(n.id)},[t("td",[t("b-badge",{attrs:{variant:"secondary"}},[e._v(e._s(n.id))]),e._v(" "+e._s(n.name)+" ")],1),t("td",{attrs:{align:"right"}},[t("button",{staticClass:"btn-link ml-2",attrs:{"aria-label":e.$t("Edit")},on:{click:function(t){return e.editMessage(n)}}},[t("i",{staticClass:"fa fa-pen",attrs:{"data-cy":"events-edit"}})]),t("button",{staticClass:"btn-link ml-2",attrs:{"aria-label":e.$t("Remove")},on:{click:function(t){return e.removeMessage(n)}}},[t("i",{staticClass:"fa fa-trash",attrs:{"data-cy":"events-remove"}})])])])})),0)])]],2)},Jl=[],Ql=(h(4723),h(34553),{props:{value:null,name:String,placeholder:{type:String,default:"Select option"},helper:String,trackBy:{type:String,default:"id"},label:{type:String,default:"name"},api:{type:String,default:"messages"},multiple:{type:Boolean,default:!1}},computed:{invalid:function(){return!this.value},localMessages:function(){return bn.getters.rootElements.filter((function(e){return"bpmn:Message"===e.$type}))},validNew:function(){return""===this.getValidationErrorForNewId(this.messageId)&&""===this.getValidationErrorForNewName(this.messageName)},validUpdate:function(){return""===this.getValidationErrorForNameUpdate(this.messageName)}},data:function(){return{options:[],selectedOption:null,pmql:"id!="+window.ProcessMaker.modeler.process.id,showListMessages:!1,showNewMessage:!1,showEditMessage:!1,showConfirmDelete:!1,deleteMessage:null,messageId:"",messageName:""}},methods:{deleteMessageUsage:function(e){var t=this.messageUsage(e),n=[];return t.forEach((function(e){return n.push(e.name||e.id)})),n.length?this.$t("This message cannot be removed, it is used by")+": "+n.join(", "):""},messageUsage:function(e){var t=[];return bn.getters.rootElements.forEach((function(n){"bpmn:Process"===n.$type&&n.flowElements.forEach((function(n){n.eventDefinitions&&n.eventDefinitions.forEach((function(o){"bpmn:MessageEventDefinition"===o.$type&&o.messageRef&&o.messageRef.id===e&&t.push(n)}))}))})),t},getValidationErrorForNewId:function(e){if(!e)return this.$t("Message ID is required");var t=bn.getters.rootElements.find((function(t){return t.id===e}));if(t)return this.$t("Message ID is duplicated");var n=e.match(/^[_A-Za-z][-._A-Za-z0-9]*$/);return n?"":this.$t("Message ID is not a valid xsd:ID")},getValidationErrorForNewName:function(e){if(!e)return this.$t("Message Name is required");var t=bn.getters.rootElements.find((function(t){return"bpmn:Message"===t.$type&&t.name===e}));return t?this.$t("Message Name is duplicated"):""},getValidationErrorForNameUpdate:function(e){var t=this;if(!e)return this.$t("Message Name is required");var n=bn.getters.rootElements.find((function(n){return"bpmn:Message"===n.$type&&n.name===e&&n.id!==t.messageId}));return n?this.$t("Message Name is duplicated"):""},confirmDeleteMessage:function(){var e=this;this.showConfirmDelete=!1;var t=bn.getters.rootElements.findIndex((function(t){return t.id===e.deleteMessage.id}));t>-1&&bn.getters.rootElements.splice(t,1)},removeMessage:function(e){this.showConfirmDelete=!0,this.deleteMessage=e},toggleConfigMessage:function(){this.showListMessages=!this.showListMessages},editMessage:function(e){this.messageId=e.id,this.messageName=e.name,this.showEditMessage=!0},getMessageById:function(e){return bn.getters.rootElements.find((function(t){return t.id===e}))},change:function(e){if(!e)return this.$emit("input",""),void this.refreshVueMultiselectValue();var t=this.getMessageById(e.id);t||(t=window.ProcessMaker.$modeler.moddle.create("bpmn:Message",{id:e.id,name:e.name}),bn.getters.rootElements.push(t)),this.$emit("input",(0,Un.get)(e,this.trackBy)),this.refreshVueMultiselectValue()},refreshVueMultiselectValue:function(){var e=this;this.$nextTick((function(){var t=e;while(t&&"vue-form-renderer"!==t.$options._componentTag)t=t.$parent;t&&t.$emit("update",t.transientData)}))},showAddMessage:function(){this.showNewMessage=!0,this.messageId="",this.messageName=""},cancelAddMessage:function(){this.showNewMessage=!1,this.showEditMessage=!1},updateMessage:function(){this.getMessageById(this.messageId).name=this.messageName,this.showEditMessage=!1},addMessage:function(){var e=window.ProcessMaker.$modeler.moddle.create("bpmn:Message",{id:this.messageId,name:this.messageName});bn.getters.rootElements.push(e),this.showNewMessage=!1},updateOptions:function(e){this.options=(0,Un.uniqBy)([].concat(m(this.localMessages),m(e)),"id")},loadOptions:function(){this.updateOptions([])},loadSelected:function(e){var t=bn.getters.rootElements.find((function(t){return t.id===e}));t?this.selectedOption={id:t.id,name:t.name}:(this.$emit("input",""),this.refreshVueMultiselectValue())},loadOptionsDebounced:function(){}},watch:{value:{immediate:!0,handler:function(e){var t=this;this.selectedOption=this.options.find((function(n){return(0,Un.get)(n,t.trackBy)==e})),e&&!this.selectedOption&&this.loadSelected(e)}}}}),ec=Ql,tc=(h(1277),h(25930),qn(ec,Kl,Jl,!1,null,"395d11da",null)),nc=tc.exports;function oc(e){return{component:nc,config:{label:"Message",name:"messageRef",helper:e}}}var ic,rc,sc={inspectorData:function(e){return Object.entries(e.definition).reduce((function(e,t){var n=mt(t,2),o=n[0],i=n[1];if("eventDefinitions"===o){var r=i[0].get("messageRef");e.messageRef=r?r.id:""}else e[o]=i;return e}),{})},inspectorHandler:function(e,t,n,o,i){for(var r in Ma()(e,["$type","eventDefinitions","messageRef"]))t.definition[r]!==e[r]&&n(t,r,e[r]);var s=i.rootElements.find((function(t){return t.id===e.messageRef}));!s&&e.messageRef&&(s=o.create("bpmn:Message",{id:e.messageRef,name:e.messageRef}),i.rootElements.push(s)),t.definition.get("eventDefinitions")[0].messageRef=s}},ac="processmaker-modeler-message-end-event",lc=Ea()(No()(ha),yo(yo({},sc),{},{id:ac,component:Zl,control:!1,label:Ao[ac],definition:function(e,t){return e.create("bpmn:EndEvent",{name:t(Ao[ac]),eventDefinitions:[e.create("bpmn:MessageEventDefinition")]})},inspectorConfig:[{items:[{items:[{},oc("Select the message reference that this element throws")]}]}]})),cc=h(77389),dc=h.n(cc),uc={extends:$s,mixins:[ya],data:function(){return{nodeIcon:dc()}},mounted:function(){this.shape.attr({image:{"ref-y":3}})}},pc=uc,hc=qn(pc,ic,rc,!1,null,null,null),fc=hc.exports,mc=function(){var e=this,t=e._self._c;return t("div",[t("label",{staticClass:"typo__label"},[e._v(e._s(e.label))]),t("div",{staticClass:"d-flex",class:{invalid:e.invalid}},[t("multiselect",{attrs:{value:e.selectedOption,placeholder:e.$t(e.placeholder),options:e.options,multiple:e.multiple,"track-by":e.trackBy,"show-labels":!1,searchable:!0,"internal-search":!1,label:"name","data-test":"".concat(e.name,":select"),disabled:!e.can("view-signals")},on:{input:e.change,"search-change":e.loadOptions,open:function(t){return e.loadOptions()}}},[t("template",{slot:"noResult"},[e._t("noResult",(function(){return[e._v(e._s(e.$t("Not found")))]}))],2),t("template",{slot:"noOptions"},[e._t("noOptions",(function(){return[e._v(e._s(e.$t("No Data Available")))]}))],2)],2),e.canEdit?t("div",{staticClass:"btn-group ml-1",attrs:{role:"group"}},[t("button",{staticClass:"btn btn-secondary btn-sm",attrs:{type:"button","data-cy":"events-list",title:e.$t("Configure")},on:{click:e.toggleConfigSignal}},[t("i",{staticClass:"fa fa-ellipsis-h"})])]):e._e()],1),e.can("view-signals")?e._e():t("div",{staticClass:"invalid-feedback d-block"},[t("div",[e._v(" "+e._s(e.$t("You do not have permission to view signals"))+" ")])]),e.invalid?t("div",{staticClass:"invalid-feedback d-block"},[t("div",[e._v(" "+e._s(e.$t("Signal reference is required"))+" ")])]):e._e(),e.helper?t("small",{staticClass:"form-text text-muted"},[e._v(e._s(e.$t(e.helper)))]):e._e(),e.showNewSignal?t("div",{staticClass:"card"},[t("div",{staticClass:"card-body p-2"},[t("form-input",{attrs:{label:e.$t("ID"),error:e.getValidationErrorForNewId(e.signalId),"data-cy":"events-add-id"},model:{value:e.signalId,callback:function(t){e.signalId=t},expression:"signalId"}}),t("form-input",{attrs:{label:e.$t("Name"),error:e.getValidationErrorForNewName(e.signalName),"data-cy":"events-add-name"},model:{value:e.signalName,callback:function(t){e.signalName=t},expression:"signalName"}})],1),t("div",{staticClass:"card-footer text-right p-2"},[t("button",{staticClass:"btn-special-assignment-action btn-special-assignment-close btn btn-outline-secondary btn-sm",attrs:{type:"button","data-cy":"events-cancel"},on:{click:e.cancelAddSignal}},[e._v(" "+e._s(e.$t("Cancel"))+" ")]),t("button",{staticClass:"btn-special-assignment-action btn btn-secondary btn-sm",attrs:{disabled:!e.validNew,type:"button","data-cy":"events-save"},on:{click:e.addSignal}},[e._v(" "+e._s(e.$t("Save"))+" ")])])]):e._e(),e.showEditSignal?t("div",{staticClass:"card"},[t("div",{staticClass:"card-body p-2"},[t("form-input",{attrs:{label:e.$t("Name"),error:e.getValidationErrorForNameUpdate(e.signalName),"data-cy":"events-edit-name"},model:{value:e.signalName,callback:function(t){e.signalName=t},expression:"signalName"}})],1),t("div",{staticClass:"card-footer text-right p-2"},[t("button",{staticClass:"btn-special-assignment-action btn-special-assignment-close btn btn-outline-secondary btn-sm",attrs:{type:"button","data-cy":"events-cancel"},on:{click:e.cancelAddSignal}},[e._v(" "+e._s(e.$t("Cancel"))+" ")]),t("button",{staticClass:"btn-special-assignment-action btn btn-secondary btn-sm",attrs:{disabled:!e.validUpdate,type:"button","data-cy":"events-save"},on:{click:e.updateSignal}},[e._v(" "+e._s(e.$t("Save"))+" ")])])]):e.showConfirmDelete?t("div",{staticClass:"card mb-3 bg-danger text-white"},[e.deleteSignalUsage(e.deleteSignal.id)?t("div",{staticClass:"card-body p-2"},[e._v(" "+e._s(e.deleteSignalUsage(e.deleteSignal.id))+" ")]):t("div",{staticClass:"card-body p-2"},[e._v(" "+e._s(e.$t("Are you sure you want to delete this item?"))+" ("+e._s(e.deleteSignal.id)+") "+e._s(e.deleteSignal.name)+" ")]),t("div",{staticClass:"card-footer text-right p-2"},[t("button",{staticClass:"btn btn-sm btn-light mr-2 p-1 font-xs",attrs:{type:"button","data-cy":"events-cancel"},on:{click:function(t){e.showConfirmDelete=!1}}},[e._v(" "+e._s(e.$t("Cancel"))+" ")]),e.deleteSignalUsage(e.deleteSignal.id)?e._e():t("button",{staticClass:"btn btn-sm btn-danger p-1 font-xs",attrs:{type:"button","data-cy":"events-delete"},on:{click:e.confirmDeleteSignal}},[e._v(" "+e._s(e.$t("Save"))+" ")])])]):!e.showListSignals||e.showNewSignal||e.showEditSignal?e._e():[t("table",{staticClass:"table table-sm table-striped",attrs:{width:"100%"}},[t("thead",[t("tr",[t("td",{attrs:{colspan:"2",align:"right"}},[t("button",{staticClass:"btn btn-secondary btn-sm p-1 font-xs",attrs:{type:"button","data-cy":"events-add"},on:{click:e.showAddSignal}},[t("i",{staticClass:"fa fa-plus"}),e._v(" "+e._s(e.$t("Signal"))+" ")])])])]),t("tbody",e._l(e.localSignals,(function(n){return t("tr",{key:"signal-".concat(n.id)},[t("td",[t("b-badge",{attrs:{variant:"secondary"}},[e._v(e._s(n.id))]),e._v(" "+e._s(n.name)+" ")],1),t("td",{attrs:{align:"right"}},[e.can("edit-signals")?t("button",{staticClass:"btn-link ml-2",attrs:{"aria-label":e.$t("Edit")},on:{click:function(t){return e.editSignal(n)}}},[t("i",{staticClass:"fa fa-pen",attrs:{"data-cy":"events-edit"}})]):e._e(),e.can("delete-signals")?t("button",{staticClass:"btn-link ml-2",attrs:{"aria-label":e.$t("Remove")},on:{click:function(t){return e.removeSignal(n)}}},[t("i",{staticClass:"fa fa-trash",attrs:{"data-cy":"events-remove"}})]):e._e()])])})),0)])]],2)},gc=[],vc={props:{value:null,name:String,placeholder:{type:String,default:"Select option"},helper:String,canEdit:{type:Boolean,default:!0},trackBy:{type:String,default:"id"},label:{type:String,default:"name"},api:{type:String,default:"signals"},multiple:{type:Boolean,default:!1}},computed:{invalid:function(){return!this.value},localSignals:function(){return bn.getters.rootElements.filter((function(e){return"bpmn:Signal"===e.$type}))},validNew:function(){return""===this.getValidationErrorForNewId(this.signalId)&&""===this.getValidationErrorForNewName(this.signalName)},validUpdate:function(){return""===this.getValidationErrorForNameUpdate(this.signalName)}},data:function(){return{options:[],selectedOption:null,pmql:"id!="+window.ProcessMaker.modeler.process.id,showListSignals:!1,showNewSignal:!1,showEditSignal:!1,showConfirmDelete:!1,deleteSignal:null,signalId:"",signalName:""}},methods:{deleteSignalUsage:function(e){var t=this.signalUsage(e),n=[];return t.forEach((function(e){return n.push(e.name||e.id)})),n.length?this.$t("This signal cannot be removed, it is used by")+": "+n.join(", "):""},signalUsage:function(e){var t=[];return bn.getters.rootElements.forEach((function(n){"bpmn:Process"===n.$type&&n.flowElements.forEach((function(n){n.eventDefinitions&&n.eventDefinitions.forEach((function(o){"bpmn:SignalEventDefinition"===o.$type&&o.signalRef&&o.signalRef.id===e&&t.push(n)}))}))})),t},getValidationErrorForNewId:function(e){if(!e)return this.$t("Signal ID is required");var t=bn.getters.rootElements.find((function(t){return t.id===e}));if(t)return this.$t("Signal ID is duplicated");var n=e.match(/^[_A-Za-z][-._A-Za-z0-9]*$/);return n?"":this.$t("Signal ID is not a valid xsd:ID")},getValidationErrorForNewName:function(e){if(!e)return this.$t("Signal Name is required");var t=bn.getters.rootElements.find((function(t){return"bpmn:Signal"===t.$type&&t.name===e}));return t?this.$t("Signal Name is duplicated"):""},getValidationErrorForNameUpdate:function(e){var t=this;if(!e)return this.$t("Signal Name is required");var n=bn.getters.rootElements.find((function(n){return"bpmn:Signal"===n.$type&&n.name===e&&n.id!==t.signalId}));return n?this.$t("Signal Name is duplicated"):""},confirmDeleteSignal:function(){var e=this;this.showConfirmDelete=!1;var t=bn.getters.rootElements.findIndex((function(t){return t.id===e.deleteSignal.id}));t>-1&&bn.getters.rootElements.splice(t,1)},removeSignal:function(e){this.showConfirmDelete=!0,this.deleteSignal=e},toggleConfigSignal:function(){this.can("view-signals")?this.showListSignals=!this.showListSignals:window.ProcessMaker.alert(this.$t("You do not have permission to view signals"),"danger")},editSignal:function(e){this.signalId=e.id,this.signalName=e.name,this.showEditSignal=!0},getSignalById:function(e){return bn.getters.rootElements.find((function(t){return t.id===e}))},change:function(e){if(!e)return this.$emit("input",""),void this.refreshVueMultiselectValue();var t=this.getSignalById(e.id);t||(t=window.ProcessMaker.$modeler.moddle.create("bpmn:Signal",{id:e.id,name:e.name}),bn.getters.rootElements.push(t)),this.$emit("input",(0,Un.get)(e,this.trackBy)),this.refreshVueMultiselectValue()},refreshVueMultiselectValue:function(){var e=this;this.$nextTick((function(){var t=e;while(t&&"vue-form-renderer"!==t.$options._componentTag)t=t.$parent;t&&t.$emit("update",t.transientData)}))},showAddSignal:function(){this.can("create-signals")?(this.showNewSignal=!0,this.signalId="",this.signalName=""):window.ProcessMaker.alert(this.$t("You do not have permission to add new signals"),"danger")},cancelAddSignal:function(){this.showNewSignal=!1,this.showEditSignal=!1},updateSignal:function(){this.getSignalById(this.signalId).name=this.signalName,this.showEditSignal=!1},addSignal:function(){var e=window.ProcessMaker.$modeler.moddle.create("bpmn:Signal",{id:this.signalId,name:this.signalName});bn.getters.rootElements.push(e),this.showNewSignal=!1},updateOptions:function(e){this.options=(0,Un.uniqBy)([].concat(m(e),m(this.localSignals)),"id")},loadOptions:function(e){var t=this;if(this.can("view-signals")){var n=this.pmql;window.window.ProcessMaker.apiClient.get(this.api,{params:{filter:e,pmql:n}}).then((function(e){t.updateOptions(e.data.data||[])}))}},loadSelected:function(e){var t=bn.getters.rootElements.find((function(t){return t.id===e}));t?this.selectedOption={id:t.id,name:t.name}:(this.$emit("input",""),this.refreshVueMultiselectValue())},loadOptionsDebounced:function(){},can:function(e){return(0,Un.get)(window,"ProcessMaker.modeler.signalPermissions.".concat(e),!1)}},watch:{value:{immediate:!0,handler:function(e){var t=this;this.selectedOption=this.options.find((function(n){return(0,Un.get)(n,t.trackBy)==e})),e&&!this.selectedOption&&this.loadSelected(e)}}}},bc=vc,yc=(h(59244),h(34924),qn(bc,mc,gc,!1,null,"607e6d70",null)),wc=yc.exports;function xc(e){var t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];return{component:wc,config:{label:"Signal",name:"signalRef",helper:e,canEdit:t}}}var kc={inspectorData:function(e){return Object.entries(e.definition).reduce((function(e,t){var n=mt(t,2),o=n[0],i=n[1];if("eventDefinitions"===o){var r=i[0].get("signalRef");e.signalRef=r?r.id:""}else e[o]=i;return e}),{})},inspectorHandler:function(e,t,n,o,i){for(var r in Ma()(e,["$type","eventDefinitions","signalRef"]))t.definition[r]!==e[r]&&n(t,r,e[r]);var s=i.rootElements.find((function(t){return t.id===e.signalRef}));!s&&e.signalRef&&(s=o.create("bpmn:Signal",{id:e.signalRef,name:e.signalRef}),i.rootElements.push(s)),t.definition.get("eventDefinitions")[0].signalRef=s}},Cc="processmaker-modeler-signal-end-event",Sc=Ea()(No()(ha),yo(yo({},kc),{},{id:Cc,component:fc,control:!1,label:Ao[Cc],definition:function(e,t){return e.create("bpmn:EndEvent",{name:t(Ao[Cc]),eventDefinitions:[e.create("bpmn:SignalEventDefinition")]})},inspectorConfig:[{items:[{items:[{},xc("Select the signal reference that this element throws")]}]}]})),Ec=function(){var e=this,t=e._self._c;return t("crown-config",e._g({attrs:{highlighted:e.highlighted,paper:e.paper,graph:e.graph,shape:e.shape,node:e.node,nodeRegistry:e.nodeRegistry,moddle:e.moddle,collaboration:e.collaboration,"process-node":e.processNode,"plane-elements":e.planeElements,"is-rendering":e.isRendering,"dropdown-data":e.dropdownData}},e.$listeners))},Ac=[],Mc={components:{CrownConfig:Zr},props:["graph","node","id","highlighted","nodeRegistry","moddle","paper","collaboration","processNode","planeElements","isRendering"],mixins:[Vs,Je,Bs,as,ya],data:function(){return{shape:new Ls,definition:null,dropdownData:[{label:So["processmaker-modeler-start-event"],nodeType:"processmaker-modeler-start-event",dataTest:"switch-to-start-event"},{label:So["processmaker-modeler-start-timer-event"],nodeType:"processmaker-modeler-start-timer-event",dataTest:"switch-to-start-timer-event"},{label:So["processmaker-modeler-signal-start-event"],nodeType:"processmaker-modeler-signal-start-event",dataTest:"switch-to-signal-start-event"},{label:So["processmaker-modeler-message-start-event"],nodeType:"processmaker-modeler-message-start-event",dataTest:"switch-to-message-start-event"},{label:So["processmaker-modeler-conditional-start-event"],nodeType:"processmaker-modeler-conditional-start-event",dataTest:"switch-to-conditional-start-event"}]}},watch:{"node.definition.name":function(e){this.shape.attr("label/text",e)}},mounted:function(){this.shape.set("type","processmaker.components.nodes.startEvent.Shape");var e=this.node.diagram.bounds;this.shape.position(e.get("x"),e.get("y")),this.shape.resize(e.get("width"),e.get("height")),this.shape.attr({body:{stroke:be,fill:ve},label:{text:this.node.definition.get("name"),refY:"130%"},image:{"ref-x":5,"ref-y":5,width:e.get("width")-10,height:e.get("height")-10}}),this.shape.addTo(this.graph),this.shape.component=this}},Tc=Mc,_c=qn(Tc,Ec,Ac,!1,null,null,null),Pc=_c.exports,Oc=h(27879),Dc=h.n(Oc);function Ic(e){if(!e)return!1;var t=JSON.parse(e);return t&&t.web_entry&&"DISABLED"!==t.web_entry.mode}var Nc,Rc,Bc,Lc,jc,Fc,zc,qc,Hc={extends:Pc,watch:{"node.definition.config":{immediate:!0,handler:function(e){if(Ic(e))return this.nodeIcon=Dc(),void this.shape.attr("image/xlink:href",ba(Dc(),this.node));this.nodeIcon=null,this.shape.attr("image/xlink:href",null)}}}},Vc=Hc,Uc=qn(Vc,Nc,Rc,!1,null,null,null),Gc=Uc.exports,Wc=36,$c={bpmnType:"bpmn:StartEvent",control:!1,category:"BPMN",diagram:function(e){return e.create("bpmndi:BPMNShape",{bounds:e.create("dc:Bounds",{height:Wc,width:Wc,x:null,y:null})})},validateIncoming:function(){return!1},inspectorConfig:[{items:[{component:"FormAccordion",container:!0,config:{initiallyOpen:!0,label:"Properties",icon:"cog",name:"inspector-accordion-start-event"},items:[{component:"FormInput",config:Ys}]},ua,na]}]},Xc="processmaker-modeler-start-event",Yc=Ea()(No()($c),{id:Xc,component:Gc,control:!0,icon:h(34954),label:So[Xc],rank:10,items:[{icon:h(34954),label:So[Xc],control:!0,bpmnType:"bpmn:StartEvent",rank:10,id:"processmaker-modeler-start-event"},{icon:h(42123),label:So["processmaker-modeler-message-start-event"],control:!0,bpmnType:"bpmn:StartEvent",rank:11,id:"processmaker-modeler-message-start-event"},{icon:h(47658),label:So["processmaker-modeler-conditional-start-event"],control:!0,bpmnType:"bpmn:StartEvent",rank:12,id:"processmaker-modeler-conditional-start-event"},{icon:h(43762),label:So["processmaker-modeler-signal-start-event"],control:!0,bpmnType:"bpmn:StartEvent",rank:13,id:"processmaker-modeler-signal-start-event"},{icon:h(8519),label:So["processmaker-modeler-start-timer-event"],control:!0,bpmnType:"bpmn:StartEvent",rank:14,id:"processmaker-modeler-start-timer-event"}],definition:function(e,t){return e.create("bpmn:StartEvent",{name:t(So[Xc])})}}),Zc=h(69766),Kc=h.n(Zc),Jc={extends:Pc,data:function(){return{nodeIcon:Kc()}},mounted:function(){this.shape.attr({image:{"ref-x":5,"ref-y":3}})}},Qc=Jc,ed=qn(Qc,Bc,Lc,!1,null,null,null),td=ed.exports,nd={label:"Request Variable",name:"config",helper:"Enter the request variable that will store the signal payload","data-cy":"signal-request-variable"},od=nd,id="processmaker-modeler-signal-start-event",rd=Ea()(No()($c),yo(yo({},kc),{},{id:id,component:td,label:So[id],definition:function(e,t){return e.create("bpmn:StartEvent",{name:t(So[id]),eventDefinitions:[e.create("bpmn:SignalEventDefinition")]})},inspectorConfig:[{items:[{items:[{},xc("Signal that will trigger this start event",!1),{component:"FormInput",config:od}]}]}]})),sd=h(47179),ad=h.n(sd),ld={extends:Pc,data:function(){return{nodeIcon:ad()}}},cd=ld,dd=qn(cd,jc,Fc,!1,null,null,null),ud=dd.exports,pd="processmaker-modeler-message-start-event",hd=Ea()(No()($c),yo(yo({},sc),{},{id:pd,component:ud,label:So[pd],definition:function(e,t){return e.create("bpmn:StartEvent",{name:t(So[pd]),eventDefinitions:[e.create("bpmn:MessageEventDefinition")]})},inspectorConfig:[{items:[{items:[{},oc("Message that will trigger this start event")]}]}]})),fd=h(93698),md=h.n(fd),gd={extends:Pc,data:function(){return{nodeIcon:md()}}},vd=gd,bd=qn(vd,zc,qc,!1,null,null,null),yd=bd.exports,wd=(h(82481),function(){var e=this,t=e._self._c;return t("div",{staticClass:"form-group"},[t("form-date-picker",{staticClass:"p-0",attrs:{"emit-iso":!0,"data-test":"start-date-picker","data-format":"datetime",label:e.$t("Start date"),placeholder:e.$t("Start date"),"control-class":"form-control",value:e.startDate,helper:e.$t(e.startDateHelper)},on:{input:e.setStartDate}}),e.hasRepeat?[t("label",{},[e._v(e._s(e.$t(e.repeatLabel)))]),t("b-form-group",{staticClass:"m-0 mb-3 p-0"},[t("b-form-input",{staticClass:"d-inline-block w-50",attrs:{type:"number",min:"1",max:"99","data-test":"repeat-input"},model:{value:e.repeat,callback:function(t){e.repeat=t},expression:"repeat"}}),t("b-form-select",{staticClass:"d-inline-block w-50 periodicity",attrs:{"data-test":"repeat-on-select"},model:{value:e.periodicity,callback:function(t){e.periodicity=t},expression:"periodicity"}},[t("option",{attrs:{value:"day"}},[e._v(e._s(e.$t("day")))]),t("option",{attrs:{value:"week"}},[e._v(e._s(e.$t("week")))]),t("option",{attrs:{value:"month"}},[e._v(e._s(e.$t("month")))]),t("option",{attrs:{value:"year"}},[e._v(e._s(e.$t("year")))])]),t("small",{staticClass:"form-text text-muted"},[e._v(e._s(e.$t(e.repeatHelper)))])],1)]:e._e(),e.isWeeklyPeriodSelected?t("weekday-select",{attrs:{selectWeekdays:e.selectedWeekdays,periodicityValue:e.periodicityValue,repeat:e.repeat,"start-date":e.startDate,"end-date":e.endDate,ends:e.ends,times:e.times},model:{value:e.expression,callback:function(t){e.expression=t},expression:"expression"}}):e._e(),e.hasEnds?[t("label",{staticClass:"mt-1"},[e._v(e._s(e.$t("Ends")))]),t("div",[t("b-form-group",{staticClass:"m-0 mb-2"},[t("b-form-radio",{attrs:{"data-test":"ends-never",name:"optradio",value:"never"},model:{value:e.ends,callback:function(t){e.ends=t},expression:"ends"}},[e._v(e._s(e.$t("Never")))])],1),t("b-form-group",{staticClass:"p-0 mb-1",attrs:{description:"".concat(e.$t("Click On to select a date"),".")}},[t("b-form-radio",{staticClass:"pl-3 ml-2 mb-1",attrs:{name:"optradio",value:"ondate","data-test":"ends-on"},model:{value:e.ends,callback:function(t){e.ends=t},expression:"ends"}},[e._v(e._s(e.$t("On")))]),t("form-date-picker",{staticClass:"form-date-picker p-0 m-0",class:{"date-disabled":"ondate"!==e.ends},attrs:{"emit-iso":!0,"data-test":"end-date-picker",disabled:"ondate"!==e.ends,placeholder:e.$t("End date"),"data-format":"datetime","control-class":"form-control",value:e.endDate,name:"end date"},on:{input:e.setEndDate}})],1),t("b-form-group",{staticClass:"mt-0 p-0",attrs:{description:"".concat(e.$t("Click After to enter how many occurrences to end the timer control"),".")}},[t("b-form-radio",{staticClass:"pl-3 ml-2 mb-1",attrs:{"data-test":"ends-after",name:"optradio",value:"after"},model:{value:e.ends,callback:function(t){e.ends=t},expression:"ends"}},[e._v(e._s(e.$t("After")))]),t("b-form-input",{staticClass:"w-25 pl-2 pr-1 d-inline-block",attrs:{"data-test":"ends-after-input",type:"number",min:"0",max:"99",disabled:"after"!==e.ends},model:{value:e.times,callback:function(t){e.times=t},expression:"times"}}),t("b-form-input",{staticClass:"w-75 d-inline-block occurrences-text",attrs:{readonly:"after"!==e.ends,value:e.$t("occurrences")}})],1)],1)]:e._e()],2)}),xd=[],kd=h(26985),Cd=function(){var e=this,t=e._self._c;return e.cycleManager.isWeeklyPeriodSelected()?t("div",{staticClass:"mb-2"},[t("label",{},[e._v(e._s(e.$t(e.weekLabel)))]),t("div",e._l(e.weekdays,(function(n){return t("span",{key:n.day,staticClass:"badge badge-pill weekday mb-1",class:e.cycleManager.weekdayStyle(n),attrs:{"data-test":"day-".concat(n.day)},on:{click:function(t){return e.clickWeekDay(n)}}},[e._v(" "+e._s(e.$t(n.initial))+" ")])})),0),e.repeatOnValidationError?t("small",{staticClass:"text-danger"},[e._v(e._s(e.repeatOnValidationError))]):e._e(),t("small",{staticClass:"form-text text-muted"},[e._v(e._s(e.$t(e.periodicityHelper)))])]):e._e()},Sd=[];function Ed(e){return null===e?"":"string"===typeof e?e:e.isLuxonDateTime?e.toISO():e.toISOString()}function Ad(e,t,n,o,i){var r=Ed(e),s=Ed(t),a="after"===o?i:"",l="ondate"===o?s:"";return"R".concat(a,"/").concat(r,"/").concat(n)+(l?"/"+l:"")}function Md(e,t){return"P".concat(e).concat(t)}var Td,_d,Pd=function(){function e(t,n,o){var i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:[],r=arguments.length>4&&void 0!==arguments[4]?arguments[4]:null,s=arguments.length>5&&void 0!==arguments[5]?arguments[5]:"never",a=arguments.length>6&&void 0!==arguments[6]?arguments[6]:"1";wo(this,e),_e(this,"_startDate",void 0),_e(this,"_repeat",void 0),_e(this,"_periodicityValue",void 0),_e(this,"_selectedWeekdays",void 0),_e(this,"_endDate",void 0),_e(this,"_ends",void 0),_e(this,"_times",void 0),this._startDate=this.sanitizeDate(t),this._repeat=n,this._periodicityValue=o,this._selectedWeekdays=i,this._endDate=this.sanitizeDate(r),this._ends=s,this._times=a}return ko(e,[{key:"startDate",set:function(e){this._startDate=this.sanitizeDate(e)}},{key:"endDate",set:function(e){this._endDate=this.sanitizeDate(e)}},{key:"ends",set:function(e){this._ends=e}},{key:"times",set:function(e){this._times=e}},{key:"repeat",set:function(e){this._repeat=e}},{key:"periodicityValue",set:function(e){this._periodicityValue=e}},{key:"selectedWeekdays",set:function(e){this._selectedWeekdays=e}},{key:"sanitizeDate",value:function(e){return null===e?e:"string"===typeof e?kd.DateTime.fromISO(e).toUTC():e.isLuxonDateTime?e.toUTC():kd.DateTime.fromJSDate(e).toUTC()}},{key:"getFormattedDateWithWeekdayIntervals",value:function(){var e=this,t=Md(this._repeat,this._periodicityValue),n=[this._startDate.toISO()];return this._selectedWeekdays.forEach((function(o){var i=e.getWeekDayDate(o),r=Ad(i,e._endDate,t,e._ends,e._times);n.push(r)})),n.join("|")}},{key:"getWeekDayDate",value:function(e){var t=kd.DateTime.fromISO(this._startDate,{zone:"utc"}),n=t.set({weekday:e});return n.toMillis()<t.toMillis()&&(n=n.plus({days:7})),n.toUTC()}},{key:"dateIntervalString",value:function(){if(this.isWeeklyPeriodSelected()&&this.hasSelectedWeekdays())return this.getFormattedDateWithWeekdayIntervals();var e=Md(this._repeat,this._periodicityValue);return Ad(this._startDate,this._endDate,e,this._ends,this._times)}},{key:"isWeeklyPeriodSelected",value:function(){return"W"===this._periodicityValue}},{key:"hasSelectedWeekdays",value:function(){return this._selectedWeekdays.length>0}},{key:"weekdayStyle",value:function(e){var t=this._startDate.toLocal().weekday;return[e.selected?"badge-primary":"badge-light",{"border border-primary":t===e.day}]}}]),e}(),Od={props:{selectWeekdays:{type:Array,default:function(){return[]}},startDate:{type:String,default:kd.DateTime.local().toUTC().toISO()},endDate:{type:String,default:null},ends:{type:String,default:"never"},times:{type:[Number,String],default:1},periodicityValue:{type:String,required:!0},repeat:{type:[String,Number],default:1},hasEnds:{type:Boolean,default:!0},weekLabel:{type:String,default:"Repeat on"},periodicityHelper:{type:String,default:"Select the day(s) of the week in which to trigger this element"}},data:function(){return{DateTime:kd.DateTime,weekdays:[{day:7,initial:"S",selected:!1},{day:1,initial:"M",selected:!1},{day:2,initial:"T",selected:!1},{day:3,initial:"W",selected:!1},{day:4,initial:"T",selected:!1},{day:5,initial:"F",selected:!1},{day:6,initial:"S",selected:!1}],cycleManager:new Pd(this.startDate,this.repeat,this.periodicityValue,this.selectedWeekdays,this.endDate,this.ends,this.times)}},watch:{startDate:function(e){this.cycleManager.startDate=e},endDate:function(e){this.cycleManager.endDate=e},ends:function(e){this.cycleManager.ends=e},times:function(e){this.cycleManager.times=e},repeat:function(e){this.cycleManager.repeat=e},periodicityValue:function(e){this.cycleManager.periodicityValue=e},selectedWeekdays:function(e){this.cycleManager.selectedWeekdays=e},dateIntervalString:function(){this.update()}},mounted:function(){var e=this;this.selectWeekdays.forEach((function(t){var n=e.weekdays.find((function(e){return e.day===t}));n&&(n.selected=!0)}))},computed:{repeatOnValidationError:function(){var e=this.weekdays.filter((function(e){var t=e.selected;return t})).length;return!this.cycleManager.isWeeklyPeriodSelected()||e>0?null:"You must select at least one day."},dateIntervalString:function(){return this.cycleManager.dateIntervalString()},selectedWeekdays:function(){return this.weekdays.filter((function(e){var t=e.selected;return t})).map((function(e){var t=e.day;return t}))}},methods:{clickWeekDay:function(e){e.selected=!e.selected},update:function(){this.$emit("input",this.dateIntervalString)}},destroyed:function(){this.$emit("input",null)}},Dd=Od,Id=(h(41168),qn(Dd,Cd,Sd,!1,null,"4ae18478",null)),Nd=Id.exports,Rd={day:"D",week:"W",month:"M",year:"Y"},Bd={components:{WeekdaySelect:Nd},props:{value:[Array,String],hasEnds:{type:Boolean,default:!0},hasRepeat:{type:Boolean,default:!0},repeatLabel:{type:String,default:"Repeat every"},weekLabel:{type:String,default:"Repeat on"},startDateHelper:{type:String,default:"Select the date to initially trigger this element"},repeatHelper:{type:String,default:"Set the periodic interval to trigger this element again"},periodicityHelper:{type:String,default:"Select the day(s) of the week in which to trigger this element"}},data:function(){return{DateTime:kd.DateTime,expression:null,startDate:kd.DateTime.local().toUTC().toISO(),repeat:"1",periodicity:"week",ends:"never",endDate:kd.DateTime.local().toUTC().toISO(),times:"1",selectedWeekdays:[]}},created:function(){this.parseTimerConfig(this.value)},watch:{timerExpression:{handler:function(e){this.$emit("input",e)},immediate:!0}},computed:{periodicityValue:function(){return Rd[this.periodicity]},timerExpression:function(){if(this.isWeeklyPeriodSelected()&&this.expression)return this.expression;var e=Md(this.repeat,this.periodicityValue);return Ad(this.startDate,this.endDate,e,this.ends,this.times)}},methods:{isWeeklyPeriodSelected:function(){return"week"===this.periodicity},setStartDate:function(e){this.startDate=kd.DateTime.fromISO(e,{zone:"utc"}).set({seconds:0,milliseconds:0}).toUTC().toISO()},setEndDate:function(e){var t=kd.DateTime.fromISO(this.startDate,{zone:"utc"});this.endDate=kd.DateTime.fromISO(e,{zone:"utc"}).set({hours:t.hour,minutes:t.minute,seconds:0,milliseconds:0}).toUTC().toISO()},parseTimerConfig:function(e){var t,n,o=this;if(null!==(t=e[0])&&void 0!==t&&null!==(n=t.timeCycle)&&void 0!==n&&n.body)try{var i=!1,r=e[0].timeCycle.body.split("|");r.forEach((function(e){if("R"!==e.substr(0,1))o.startDate=e,i=!0;else{var t=e.match(/R(\d*)\/([^/]+)\/P(\d+)(\w)(?:\/([^/]+))?/);if(t){if(o.times=t[1]||"1",o.repeat=t[3],o.periodicity=Object.keys(Rd).find((function(e){return Rd[e]===t[4]})),i||(o.startDate=t[2],i=!0),o.isWeeklyPeriodSelected()){var n=kd.DateTime.fromISO(t[2],{zone:"utc"}).toLocal().weekday;o.selectedWeekdays.push(n)}o.endDate=t[5]||kd.DateTime.local().toUTC().toISO(),o.ends=t[5]?"ondate":t[1]?"after":"never"}}i=!0}))}catch(fa){this.resetTimerExpression()}},resetTimerExpression:function(){this.startDate=kd.DateTime.local().toUTC().toISO(),this.times="1",this.repeat="1",this.periodicity="week",this.endDate=kd.DateTime.local().toUTC().toISO(),this.ends="never",this.expression=null,this.selectedWeekdays=[]}}},Ld=Bd,jd=(h(33383),h(66667),qn(Ld,wd,xd,!1,null,"72709fd0",null)),Fd=jd.exports,zd="processmaker-modeler-start-timer-event",qd=Ea()(No()($c),{id:zd,component:yd,label:So[zd],definition:function(e,t){var n=e.create("bpmn:StartEvent",{name:t(So[zd])});return n.eventDefinitions=[e.create("bpmn:TimerEventDefinition",{timeCycle:e.create("bpmn:Expression",{body:""})})],n},inspectorHandler:function(e,t,n,o){var i=t.definition;for(var r in e)if(i[r]!==e[r])if("eventDefinitions"===r){var s=e[r];if("object"===g(s))continue;var a=i.get(r)[0].timeCycle;if(a&&a.body===s)continue;var l={timeCycle:o.create("bpmn:Expression",{body:s})},c=[o.create("bpmn:TimerEventDefinition",l)];n(t,"eventDefinitions",c)}else n(t,r,e[r])},inspectorConfig:[{items:[{},{component:"FormAccordion",container:!0,config:{label:"Timing Control",icon:"clock",name:"inspector-accordion-start-timer-timing-control"},items:[{component:Fd,config:{label:"Name",helper:"Time expression",name:"eventDefinitions"}}]},ua,na]}]}),Hd=function(){var e=this,t=e._self._c;return t("crown-config",e._g({attrs:{highlighted:e.highlighted,paper:e.paper,graph:e.graph,shape:e.shape,node:e.node,nodeRegistry:e.nodeRegistry,moddle:e.moddle,collaboration:e.collaboration,"process-node":e.processNode,"plane-elements":e.planeElements,"is-rendering":e.isRendering,dropdownData:e.dropdownData}},e.$listeners))},Vd=[],Ud=a.shapes.standard.Circle.extend({markup:[{tagName:"circle",selector:"body"},{tagName:"circle",selector:"body2"},{tagName:"text",selector:"label"},{tagName:"image",selector:"image"},ws("topLeft"),ws("topCenter"),ws("topRight"),ws("bottomLeft"),ws("bottomCenter"),ws("bottomRight")],defaults:a.util.deepSupplement({type:"processmaker.components.nodes.intermediateEvent.Shape",size:{width:36,height:36},attrs:yo(yo(yo(yo(yo(yo({body:{fill:ye,stroke:we},body2:{cx:18,cy:18,r:15,"stroke-width":2,fill:ye,stroke:we},image:{"ref-x":5,"ref-y":5,ref:"circle",width:26,height:26}},xs("topLeft",{ref:"circle","ref-y":-20,"ref-padding-x":0})),xs("topCenter",{ref:"circle","ref-y":-20})),xs("topRight",{ref:"circle","ref-x":26,"ref-y":-20,"ref-padding-x":0},-1)),xs("bottomLeft",{ref:"circle","ref-padding-x":0,"ref-padding-y":-40})),xs("bottomCenter",{ref:"circle","ref-padding-y":-40})),xs("bottomRight",{ref:"circle","ref-x":26,"ref-padding-x":0,"ref-padding-y":-40},-1))},a.shapes.standard.Circle.prototype.defaults)}),Gd={components:{CrownConfig:Zr},props:["graph","node","id","highlighted","nodeRegistry","moddle","paper","collaboration","processNode","planeElements","isRendering"],mixins:[Vs,Je,Bs,as],data:function(){return{shape:null,definition:null,dropdownData:[{label:Do["processmaker-modeler-intermediate-catch-timer-event"],nodeType:"processmaker-modeler-intermediate-catch-timer-event",dataTest:"switch-to-intermediate-timer-catch-event"},{label:Do["processmaker-modeler-intermediate-signal-catch-event"],nodeType:"processmaker-modeler-intermediate-signal-catch-event",dataTest:"switch-to-intermediate-signal-catch-event"},{label:Do["processmaker-modeler-intermediate-signal-throw-event"],nodeType:"processmaker-modeler-intermediate-signal-throw-event",dataTest:"switch-to-intermediate-signal-throw-event"},{label:Do["processmaker-modeler-intermediate-message-catch-event"],nodeType:"processmaker-modeler-intermediate-message-catch-event",dataTest:"switch-to-intermediate-message-catch-event"},{label:Do["processmaker-modeler-intermediate-message-throw-event"],nodeType:"processmaker-modeler-intermediate-message-throw-event",dataTest:"switch-to-intermediate-message-throw-event"},{label:Do["processmaker-modeler-intermediate-conditional-catch-event"],nodeType:"processmaker-modeler-intermediate-conditional-catch-event",dataTest:"switch-to-intermediate-conditional-catch-event"}]}},watch:{"node.definition.name":function(e){this.shape.attr("label/text",e)}},mounted:function(){this.shape=new Ud;var e=this.node.diagram.bounds;this.shape.position(e.get("x"),e.get("y")),this.shape.resize(e.get("width"),e.get("height")),this.shape.attr({label:{text:this.node.definition.get("name"),refY:"130%"}}),this.shape.addTo(this.graph),this.shape.component=this}},Wd=Gd,$d=qn(Wd,Hd,Vd,!1,null,null,null),Xd=$d.exports,Yd=h(39653),Zd=h.n(Yd),Kd={extends:Xd,mixins:[ya],data:function(){return{nodeIcon:Zd()}}},Jd=Kd,Qd=qn(Jd,Td,_d,!1,null,null,null),eu=Qd.exports,tu=function(){var e=this,t=e._self._c;return t("div",[t("label",[e._v(e._s(e.$t("Type")))]),t("b-input-group",[t("b-form-select",{attrs:{value:e.timerPropertyName,"data-test":"intermediateTypeSelect"},on:{change:e.changeType}},[t("option",{attrs:{value:"timeDuration"}},[e._v(e._s(e.$t("Duration")))]),t("option",{attrs:{value:"timeDate"}},[e._v(e._s(e.$t("Date/Time")))]),t("option",{attrs:{value:"timeCycle"}},[e._v(e._s(e.$t("Cycle")))])])],1),t("small",{staticClass:"form-text text-muted"},[e._v(e._s(e.$t(e.typeHelper)))]),t(e.component,{tag:"component",attrs:{"has-ends":!1,"repeat-label":"Wait for","week-label":"Every"},model:{value:e.timerProperty,callback:function(t){e.timerProperty=t},expression:"timerProperty"}})],1)},nu=[],ou=function(){var e=this,t=e._self._c;return t("div",{staticClass:"mt-3"},[t("label",[e._v(e._s(e.$t("Duration")))]),t("b-input-group",[t("b-form-input",{staticClass:"form-control control repeat",attrs:{type:"number",min:"1","data-test":e.repeatInput},model:{value:e.repeat,callback:function(t){e.repeat=t},expression:"repeat"}}),t("b-input-group-append",[t("b-form-select",{model:{value:e.periodicity,callback:function(t){e.periodicity=t},expression:"periodicity"}},e._l(e.periods,(function(n){return t("option",{key:n.name,domProps:{value:n}},[e._v(e._s(e.$t(n.name)))])})),0)],1),t("small",{staticClass:"form-text text-muted"},[e._v(e._s(e.$t("Select the duration of the timer")))])],1)],1)},iu=[],ru=h(10928),su=h.n(ru),au={minute:"minute",hour:"hour",day:"day",week:"week",month:"month"},lu={props:["value","repeatInput"],data:function(){var e=[{name:au.minute,value:"M",isTime:!0},{name:au.hour,value:"H",isTime:!0},{name:au.day,value:"D"},{name:au.week,value:"W"},{name:au.month,value:"M"}];return{repeat:null,periodicity:null,periods:e}},watch:{value:{handler:function(e){this.periodicity=this.getPeriodFromDelayString(e),this.repeat=this.getRepeatNumberFromDelayString(e)},immediate:!0},durationExpression:{handler:function(e){this.$emit("input",e)},immediate:!0}},computed:{durationExpression:function(){return this.periodicity.isTime?"PT".concat(this.repeat).concat(this.periodicity.value):"P".concat(this.repeat).concat(this.periodicity.value)}},methods:{getPeriodFromDelayString:function(e){var t=this.isTimePeriod(e),n=su()(e);if("M"===n){var o=t?au.minute:au.month;return this.periods.find((function(e){var t=e.name;return t===o}))}return this.periods.find((function(e){var t=e.value;return t===n}))},isTimePeriod:function(e){return"T"===e[1]},getRepeatNumberFromDelayString:function(e){var t=e.match(/\d+/);return t&&t[0]}}},cu=lu,du=qn(cu,ou,iu,!1,null,null,null),uu=du.exports,pu=function(){var e=this,t=e._self._c;return t("div",{staticClass:"mt-3"},[t("form-date-picker",{staticClass:"p-0",attrs:{"emit-iso":!0,"data-format":"datetime",label:e.$t("Wait until specific date/time"),"control-class":"form-control",value:e.convertFromUTC(e.value),"data-test":"date-picker",helper:"Select the date to trigger this element"},on:{input:e.emitValue}})],1)},hu=[],fu={data:function(){return{DateTime:kd.DateTime}},props:{value:String},methods:{getTimezone:function(){return"undefined"!==typeof window.ProcessMaker&&window.ProcessMaker.user&&window.ProcessMaker.user.timezone||"local"},convertFromUTC:function(e){return kd.DateTime.fromISO(e,{zone:"utc"}).setZone(this.getTimezone()).toISO()},emitValue:function(e){var t=kd.DateTime.fromISO(e).toUTC().toISO();this.$emit("input",t)}}},mu=fu,gu=qn(mu,pu,hu,!1,null,null,null),vu=gu.exports,bu=function(){var e=this,t=e._self._c;return t("div",{staticClass:"mt-3"},[t("label",[e._v(e._s(e.$t("Recurring loop repeats at time interval set below")))]),t("b-input-group",[t("b-form-input",{staticClass:"form-control control repeat",attrs:{type:"number",min:"1","data-test":e.repeatInput},model:{value:e.repeat,callback:function(t){e.repeat=t},expression:"repeat"}}),t("b-input-group-append",[t("b-form-select",{attrs:{"data-test":"periods"},model:{value:e.periodicity,callback:function(t){e.periodicity=t},expression:"periodicity"}},e._l(e.periods,(function(n){return t("option",{key:n.name,domProps:{value:n}},[e._v(e._s(e.$t(n.name)))])})),0)],1)],1),e.periodicity&&e.periodicity.isWeek?t("weekday-select",{staticClass:"pt-3",attrs:{selectWeekdays:e.selectedWeekdays,periodicityValue:e.periodicity.value,repeat:e.repeat},model:{value:e.expression,callback:function(t){e.expression=t},expression:"expression"}}):e._e()],1)},yu=[],wu={minute:"minute",hour:"hour",day:"day",week:"week",month:"month"},xu={components:{WeekdaySelect:Nd},props:["value","repeatInput"],data:function(){var e=[{name:wu.minute,value:"M",isTime:!0},{name:wu.hour,value:"H",isTime:!0},{name:wu.day,value:"D"},{name:wu.week,value:"W",isWeek:!0},{name:wu.month,value:"M"}];return{DateTime:kd.DateTime,repeat:null,periodicity:null,expression:null,periods:e,selectedWeekdays:null}},watch:{value:{handler:function(e){this.periodicity=this.getPeriodFromDelayString(e),this.repeat=this.getRepeatNumberFromDelayString(e),this.selectedWeekdays=this.getSelectedWeekdaysFromDelayString(e)},immediate:!0},cycleExpression:{handler:function(e){this.$emit("input",e)},immediate:!0}},computed:{cycleExpression:function(){return this.periodicity.isTime?"R/PT".concat(this.repeat).concat(this.periodicity.value):this.periodicity.isWeek&&this.expression?this.expression:"R/P".concat(this.repeat).concat(this.periodicity.value)}},methods:{getSelectedWeekdaysFromDelayString:function(e){var t=e.split("|"),n=[];return t.forEach((function(e){var t=e.match(/R(\d*)\/([^/]+)\/PT?(\d+)(\w)(?:\/([^/]+))?/);if(t){var o=kd.DateTime.fromISO(t[2],{zone:"utc"}).toLocal().weekday;n.push(o)}})),n},getPeriodFromDelayString:function(e){var t=this.isTimePeriod(e),n=su()(e);if("M"===n){var o=t?wu.minute:wu.month;return this.periods.find((function(e){var t=e.name;return t===o}))}return this.periods.find((function(e){var t=e.value;return t===n}))},isTimePeriod:function(e){return"T"===e[3]},getRepeatNumberFromDelayString:function(e){var t=e.match(/PT?(\d+)/);return t?t[1]:1}}},ku=xu,Cu=qn(ku,bu,yu,!1,null,null,null),Su=Cu.exports,Eu="PT1H",Au={timeDuration:"DurationExpression",timeDate:"DateTimeExpression",timeCycle:"CycleExpression"},Mu={props:{value:{type:Object},typeHelper:{type:String,default:"Select the type of delay"}},components:{DurationExpression:uu,DateTimeExpression:vu,CycleExpression:Su},computed:{component:function(){return Au[this.timerPropertyName]},timerProperty:{get:function(){return this.value.body},set:function(e){this.emitChange(this.value.type,e)}},timerPropertyName:function(){return this.value.type}},methods:{changeType:function(e){var t=this.isDelayType(e)||this.isCycleType(e)?Eu:kd.DateTime.local().toUTC().toISO();this.emitChange(e,t)},isDelayType:function(e){return Au[e]===Au.timeDuration},isCycleType:function(e){return Au[e]===Au.timeCycle},emitChange:function(e,t){this.$emit("input",{type:e,body:t})}}},Tu=Mu,_u=qn(Tu,tu,nu,!1,null,null,null),Pu=_u.exports,Ou="processmaker-modeler-intermediate-catch-timer-event",Du={id:Ou,component:eu,bpmnType:"bpmn:IntermediateCatchEvent",control:!0,category:"BPMN",icon:h(58455),label:"Intermediate Event",rank:20,items:[{icon:h(24462),label:"Intermediate Timer Event",control:!0,rank:21,id:"processmaker-modeler-intermediate-catch-timer-event"},{icon:h(48351),label:"Intermediate Signal Catch Event",control:!0,rank:22,id:"processmaker-modeler-intermediate-signal-catch-event"},{icon:h(20894),label:"Intermediate Signal Throw Event",control:!0,rank:23,id:"processmaker-modeler-intermediate-signal-throw-event"},{icon:h(5294),label:"Intermediate Message Catch Event",control:!0,rank:24,id:"processmaker-modeler-intermediate-message-catch-event"},{icon:h(16383),label:"Intermediate Message Throw Event",control:!0,rank:25,id:"processmaker-modeler-intermediate-message-throw-event"},{icon:h(74726),label:"Intermediate Conditional Catch Event",control:!0,rank:26,id:"processmaker-modeler-intermediate-conditional-catch-event"}],definition:function(e,t){return e.create("bpmn:IntermediateCatchEvent",{name:t(Do[Ou]),eventDefinitions:[e.create("bpmn:TimerEventDefinition",{timeDuration:e.create("bpmn:Expression",{body:Eu})})]})},diagram:function(e){return e.create("bpmndi:BPMNShape",{bounds:e.create("dc:Bounds",{height:36,width:36,x:null,y:null})})},inspectorData:function(e){return Object.entries(e.definition).reduce((function(e,t){var n=mt(t,2),o=n[0],i=n[1];if("eventDefinitions"===o){var r=Object.keys(i[0])[1],s=i[0][r].body;e[o]={type:r,body:s}}else e[o]=i;return e}),{})},inspectorHandler:function(e,t,n,o){var i=t.definition;for(var r in e)if(i[r]!==e[r])if("eventDefinitions"===r){var s=e[r],a=s.type,l=s.body,c=i.get(r)[0][a];if(c&&c.body===l)continue;var d=_e({},a,o.create("bpmn:Expression",{body:l})),u=[o.create("bpmn:TimerEventDefinition",d)];n(t,"eventDefinitions",u)}else n(t,r,e[r])},inspectorConfig:[{name:Do[Ou],items:[{component:"FormAccordion",container:!0,config:{initiallyOpen:!0,label:"Properties",icon:"cog",name:"inspector-accordion-intermediate-timer-config"},items:[{component:"FormInput",config:Ys}]},{component:"FormAccordion",container:!0,config:{label:"Timing Control",icon:"clock",name:"inspector-accordion-intermediate-timer-event-timing-control"},items:[{component:Pu,config:{label:"Name",helper:"Time expression",name:"eventDefinitions"}}]},ua,na]}]};function Iu(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"#000",t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"#fff";return{image:{width:20,height:20,y:3,x:3},body:{stroke:e,strokeWidth:t,fill:n},body2:{stroke:e,strokeWidth:t,fill:n}}}var Nu,Ru,Bu,Lu,ju,Fu,zu,qu,Hu,Vu,Uu=h(89454),Gu=h.n(Uu),Wu={extends:Xd,mixins:[ya],data:function(){return{nodeIcon:Gu()}},mounted:function(){var e=Iu(we,2,ye);this.shape.attr(e)}},$u=Wu,Xu=qn($u,Nu,Ru,!1,null,null,null),Yu=Xu.exports,Zu={id:"processmaker-modeler-intermediate-message",component:Xd,bpmnType:"bpmn:IntermediateEvent",control:!0,category:"BPMN",label:"Intermediate Message Event",definition:function(e,t){return e.create("bpmn:IntermediateEvent",{name:t("Intermediate Message Event"),eventDefinitions:[e.create("bpmn:MessageEventDefinition",{})]})},diagram:function(e){return e.create("bpmndi:BPMNShape",{bounds:e.create("dc:Bounds",{height:36,width:36,x:null,y:null})})},inspectorConfig:[{name:"Intermediate Message Event",items:[{component:"FormAccordion",container:!0,config:{initiallyOpen:!0,label:"Properties",icon:"cog",name:"inspector-accordion-intermediate-message-event"},items:[{component:"FormInput",config:Ys}]},ua,na]}]},Ku="processmaker-modeler-intermediate-message-catch-event",Ju=Ea()(No()(Zu),yo(yo({},sc),{},{id:Ku,component:Yu,control:!1,bpmnType:"bpmn:IntermediateCatchEvent",label:Do[Ku],definition:function(e,t){return e.create("bpmn:IntermediateCatchEvent",{name:t(Do[Ku]),eventDefinitions:[e.create("bpmn:MessageEventDefinition")]})},inspectorConfig:[{items:[{items:[{},oc("Message that will catch this intermediate event")]}]}]})),Qu=h(74225),ep=h.n(Qu),tp={extends:Xd,mixins:[ya],data:function(){return{nodeIcon:ep()}},mounted:function(){this.shape.attr({image:{"ref-x":7,"ref-y":5,width:22,height:22}})}},np=tp,op=qn(np,Bu,Lu,!1,null,null,null),ip=op.exports,rp={id:"processmaker-modeler-intermediate-event",component:Xd,bpmnType:"bpmn:IntermediateEvent",control:!0,category:"BPMN",label:"Intermediate Event",definition:function(e,t){return e.create("bpmn:IntermediateEvent",{name:t("Intermediate Event")})},diagram:function(e){return e.create("bpmndi:BPMNShape",{bounds:e.create("dc:Bounds",{height:36,width:36,x:null,y:null})})},inspectorConfig:[{name:"Intermediate Event",items:[{component:"FormAccordion",container:!0,config:{initiallyOpen:!0,label:"Properties",icon:"cog",name:"inspector-accordion-intermediate-gateway-config"},items:[{component:"FormInput",config:Ys}]},ua,na]}]},sp="processmaker-modeler-intermediate-signal-catch-event",ap=Ea()(No()(rp),yo(yo({},kc),{},{id:sp,component:ip,control:!1,bpmnType:"bpmn:IntermediateCatchEvent",label:Do[sp],definition:function(e,t){return e.create("bpmn:IntermediateCatchEvent",{name:t(Do[sp]),eventDefinitions:[e.create("bpmn:SignalEventDefinition")]})},inspectorConfig:[{items:[{items:[{},xc("Signal that will catch this intermediate event",!1),{component:"FormInput",config:od}]}]}]})),lp=h(98358),cp=h.n(lp),dp={extends:Xd,mixins:[ya],props:["moddle","rootElements","id"],data:function(){return{message:this.moddle.create("bpmn:Message",{id:"".concat(this.id,"_message"),name:"".concat(this.id,"_message")}),nodeIcon:cp()}},methods:{addMessageRef:function(){this.node.definition.get("eventDefinitions")[0].messageRef?this.message=this.node.definition.get("eventDefinitions")[0].messageRef:(this.message=this.moddle.create("bpmn:Message",{id:"".concat(this.id,"_message"),name:"".concat(this.id,"_message")}),this.rootElements.push(this.message),this.node.definition.get("eventDefinitions")[0].messageRef=this.message)}},mounted:function(){this.shape.attr({image:{width:22,height:20,y:3,x:2}}),this.addMessageRef()},destroyed:function(){Gr()(this.rootElements,this.message),bn.commit("removeMessageRef",this.message)}},up=dp,pp=qn(up,ju,Fu,!1,null,null,null),hp=pp.exports,fp="processmaker-modeler-intermediate-message-throw-event",mp=Ea()(No()(Zu),yo(yo({},sc),{},{id:fp,component:hp,control:!1,bpmnType:"bpmn:IntermediateThrowEvent",label:Do[fp],icon:h(16383),definition:function(e,t){return e.create("bpmn:IntermediateThrowEvent",{name:t(Do[fp]),eventDefinitions:[e.create("bpmn:MessageEventDefinition")]})},inspectorConfig:[{items:[{items:[{},oc("Select the message reference that this element throws")]}]}]})),gp=h(67471),vp=h.n(gp),bp={extends:Xd,mixins:[ya],props:["moddle","rootElements","id"],data:function(){return{nodeIcon:vp()}},mounted:function(){this.shape.attr({image:{"ref-x":7,"ref-y":5,width:22,height:22}})}},yp=bp,wp=qn(yp,zu,qu,!1,null,null,null),xp=wp.exports,kp="processmaker-modeler-intermediate-signal-throw-event",Cp=Ea()(No()(rp),yo(yo({},kc),{},{id:kp,component:xp,control:!1,bpmnType:"bpmn:IntermediateThrowEvent",label:Do[kp],definition:function(e,t){return e.create("bpmn:IntermediateThrowEvent",{name:t(Do[kp]),eventDefinitions:[e.create("bpmn:SignalEventDefinition")]})},inspectorConfig:[{items:[{items:[{},xc("Select the signal reference that this element throws")]}]}]})),Sp=h(94081),Ep=h.n(Sp),Ap={extends:Xd,mixins:[ya],data:function(){return{nodeIcon:Ep()}},mounted:function(){var e=this.node.diagram.bounds;this.shape.attr({image:{"ref-x":9,"ref-y":9,width:e.get("width")-18,height:e.get("height")-18}})}},Mp=Ap,Tp=qn(Mp,Hu,Vu,!1,null,null,null),_p=Tp.exports;function Pp(){return[{component:"FormInput",config:{label:"Condition",name:"condition",helper:"Expression to evaluate condition"}}]}var Op={inspectorData:function(e){return Object.entries(e.definition).reduce((function(e,t){var n=mt(t,2),o=n[0],i=n[1];return"eventDefinitions"===o?e.condition=i[0].get("condition").body:e[o]=i,e}),{})},inspectorHandler:function(e,t,n){for(var o in Ma()(e,["$type","eventDefinitions"]))t.definition[o]!==e[o]&&("condition"===o?t.definition.get("eventDefinitions")[0].get("condition").body=e[o]:n(t,o,e[o]))}},Dp="processmaker-modeler-intermediate-conditional-catch-event",Ip=Ea()(No()(rp),yo(yo({},Op),{},{id:Dp,component:_p,control:!1,bpmnType:"bpmn:IntermediateCatchEvent",label:Do[Dp],definition:function(e,t){return e.create("bpmn:IntermediateCatchEvent",{name:t(Do[Dp]),eventDefinitions:[e.create("bpmn:ConditionalEventDefinition",{condition:e.create("bpmn:FormalExpression",{body:""})})]})},inspectorConfig:[{items:[{items:[{}].concat(m(Pp()))}]}]})),Np=function(){var e=this,t=e._self._c;return t("crown-config",e._g({attrs:{highlighted:e.highlighted,paper:e.paper,graph:e.graph,shape:e.shape,node:e.node,nodeRegistry:e.nodeRegistry,moddle:e.moddle,collaboration:e.collaboration,"process-node":e.processNode,"plane-elements":e.planeElements,"is-rendering":e.isRendering,"boundary-event-dropdown-data":e.boundaryEventDropdownData,"dropdown-data":e.dropdownData,showCustomIconPicker:!0,iconName:this.iconName},on:{"set-custom-icon-name":e.setCustomIconName,"reset-custom-icon-name":e.resetCustomIconName}},e.$listeners))},Rp=[],Bp=a.shapes.standard.Rectangle.extend({markup:[{tagName:"rect",selector:"body"},{tagName:"text",selector:"label"},{tagName:"image",selector:"image"},ws("topLeft"),ws("topCenter"),ws("topRight"),ws("bottomLeft"),ws("bottomCenter"),ws("bottomRight")],defaults:a.util.deepSupplement({type:"processmaker.components.nodes.task.Shape",size:{width:100,height:60},attrs:yo(yo(yo(yo(yo(yo({image:{"ref-x":4,"ref-y":4,ref:"rect",width:16,height:16,"data-test":"nodeIcon"}},xs("topLeft",{"ref-y":4,ref:"rect"})),xs("topCenter",{"ref-y":4,ref:"rect"})),xs("topRight",{"ref-y":4,"ref-x":96,ref:"rect"},-1)),xs("bottomLeft",{ref:"rect"})),xs("bottomCenter",{ref:"rect"})),xs("bottomRight",{"ref-x":96,ref:"rect"},-1))},a.shapes.standard.Rectangle.prototype.defaults)}),Lp=76,jp=116,Fp={data:function(){return{iconName:""}},methods:{setCustomIconName:function(e){this.iconName=e},resetCustomIconName:function(){this.setCustomIconName("")},setCustomIcon:function(e){this.shape&&this.shape.attr("image/xlink:href",ba(atob(e),this.node))}},mounted:function(){this.node.definition.get("customIcon")&&this.setCustomIcon(this.node.definition.get("customIcon"))}},zp=10,qp=[{label:"Boundary Timer Event",nodeType:"processmaker-modeler-boundary-timer-event",dataTest:"add-boundary-timer-event"},{label:"Boundary Error Event",nodeType:"processmaker-modeler-boundary-error-event",dataTest:"add-boundary-error-event"},{label:"Boundary Signal Event",nodeType:"processmaker-modeler-boundary-signal-event",dataTest:"add-boundary-signal-event"},{label:"Boundary Conditional Event",nodeType:"processmaker-modeler-boundary-conditional-event",dataTest:"add-boundary-conditional-event"},{label:"Boundary Message Event",nodeType:"processmaker-modeler-boundary-message-event",dataTest:"add-boundary-message-event"}],Hp=qp,Vp=h.p+"img/sequential.f86ad08b.svg",Up=h.p+"img/parallel.cf1d1995.svg",Gp=h.p+"img/loop.00441d9f.svg",Wp="bpmn:StandardLoopCharacteristics",$p="bpmn:MultiInstanceLoopCharacteristics";function Xp(e,t,n,o){var i=e.get("loopCharacteristics"),r=[Wp,$p];if(i&&r.includes(i.$type))if(i.$type!==Wp){var s=i.isSequential?Vp:Up;n(t.bottomCenter,"loopCharacteristics",s)}else n(t.bottomCenter,"loopCharacteristics",Gp);else o(t.bottomCenter,"loopCharacteristics")}var Yp=h.p+"img/compensation.495ae0a2.svg";function Zp(e,t,n,o){e.isForCompensation?n(t.bottomCenter,"compensation",Yp):o(t.bottomCenter,"compensation")}var Kp,Jp,Qp=15,eh=2*ys,th={components:{CrownConfig:Zr},props:["graph","node","id","highlighted","nodeRegistry","moddle","paper","collaboration","processNode","planeElements","isRendering"],mixins:[Vs,Je,Bs,as,Fp],data:function(){return{shape:null,definition:null,dropdownData:[{label:To["processmaker-modeler-task"],nodeType:"processmaker-modeler-task",dataTest:"switch-to-user-task"},{label:To["processmaker-modeler-manual-task"],nodeType:"processmaker-modeler-manual-task",dataTest:"switch-to-manual-task"},{label:To["processmaker-modeler-script-task"],nodeType:"processmaker-modeler-script-task",dataTest:"switch-to-script-task"},{label:To["processmaker-modeler-call-activity"],nodeType:"processmaker-modeler-call-activity",dataTest:"switch-to-sub-process"}],boundaryEventDropdownData:Hp,anchorPointFunction:at}},computed:{hasTaskMarker:function(){return!!this.shape.attr("image/xlink:href")}},watch:{"node.definition.name":function(e){var t=this.node.diagram.bounds.width;this.shape.attr("label/text",a.util.breakText(e,{width:t}));var n=this.shape.size(),o=n.height,i=this.calculateSizeOnGrid(),r=this.useTaskHeight(i)?Lp:i;o!==r&&(this.node.diagram.bounds.height=r,this.shape.resize(t,r),this.recalcMarkersAlignment())},"node.definition.isForCompensation":function(){Zp(this.node.definition,this.markers,this.$set,this.$delete)},"node.definition":{deep:!0,handler:function(){Xp(this.node.definition,this.markers,this.$set,this.$delete)}}},methods:{getElementsUnderArea:function(e){var t=e.getBBox(),n=t.x,o=t.y,i=t.width,r=t.height,s={x:n,y:o,width:i,height:r};return this.graph.findModelsInArea(s)},calculateSizeOnGrid:function(){var e=zp-Lp%zp,t=Math.floor(this.shapeView.selectors.label.getBBox().height),n=t+Qp+eh,o=this.paperManager.ceilToNearestGridMultiple(n)-e;return this.middleIsOddNumber(o)&&(o+=zp),o},useTaskHeight:function(e){return e<Lp||!this.node.definition.name},middleIsOddNumber:function(e){return 1===Math.abs(e/2%2)}},mounted:function(){this.shape=new Bp;var e=this.node.diagram.bounds;this.shape.position(e.x,e.y),this.shape.resize(e.width,e.height),Zp(this.node.definition,this.markers,this.$set,this.$delete),Xp(this.node.definition,this.markers,this.$set,this.$delete),this.shape.attr({body:{rx:8,ry:8},label:{text:a.util.breakText(this.node.definition.get("name"),{width:e.width}),fill:"black"}}),this.shape.addTo(this.graph),this.shape.component=this}},nh=th,oh=qn(nh,Np,Rp,!1,null,null,null),ih=oh.exports,rh=h(95514),sh=h.n(rh),ah={extends:ih,mixins:[ya],data:function(){return{nodeIcon:sh()}}},lh=ah,ch=qn(lh,Kp,Jp,!1,null,null,null),dh=ch.exports,uh=function(){var e=this,t=e._self._c;return t("div",[t("b-form-group",[t("b-form-checkbox",{attrs:{"data-test":"for-compensation",name:"for-compensation"},model:{value:e.isForCompensation,callback:function(t){e.isForCompensation=t},expression:"isForCompensation"}},[e._v(e._s(e.$t("For Compensation")))])],1)],1)},ph=[],hh={props:{value:{type:Object,default:function(){return{isForCompensation:!1}}}},name:"MarkerFlags",data:function(){return{isForCompensation:this.value.isForCompensation}},watch:{isForCompensation:function(e){this.$emit("input",{isForCompensation:e})}}},fh=hh,mh=qn(fh,uh,ph,!1,null,"66aabb37",null),gh=mh.exports,vh={component:"FormAccordion",container:!0,config:{initiallyOpen:!1,label:"Advanced",icon:"cogs",name:"advanced-accordion"},items:[{component:ta,config:ns},{component:gh,name:"taskMarkers",config:{label:"Marker Flags",name:"markerFlags",style:"display:none"}}]},bh=function(){var e=this,t=e._self._c;return t("div",[t("b-form-group",{attrs:{label:e.$t("Loop Mode")}},[t("b-form-select",{attrs:{id:""},on:{change:e.changeLoopType},model:{value:e.loopType,callback:function(t){e.loopType=t},expression:"loopType"}},e._l(e.loopOptions,(function(n){return t("option",{key:n.text,domProps:{value:n.value}},[e._v(e._s(e.$t(n.text)))])})),0)],1),"loop"===e.loopType?[t("b-form-group",{attrs:{label:e.$t("Maximum Iterations")}},[t("b-form-input",{attrs:{type:"number",min:"0",step:"1","data-cy":"loopMaximum"},on:{input:e.changeLoopMaximum},model:{value:e.loopMaximum,callback:function(t){e.loopMaximum=t},expression:"loopMaximum"}}),t("small",{staticClass:"form-text text-muted"},[e._v(e._s(e.$t("Leave empty to continue until exit condition is satisfied")))])],1),t("b-form-group",{attrs:{label:e.$t("Exit Condition")}},[t("textarea",{directives:[{name:"model",rawName:"v-model",value:e.loopCondition,expression:"loopCondition"}],ref:"specialAssignmentsInput",staticClass:"form-control special-assignment-input",attrs:{"aria-label":e.$t("FEEL Syntax"),placeholder:"FEEL Syntax","data-cy":"loopCondition"},domProps:{value:e.loopCondition},on:{input:[function(t){t.target.composing||(e.loopCondition=t.target.value)},e.changeLoopCondition]}}),e._v(" "),t("small",{staticClass:"form-text text-muted"},[e._v(e._s(e.$t("When FEEL expression evaluates to true then exit loop")))])])]:e._e(),"parallel_mi"===e.loopType||"sequential_mi"===e.loopType?["inputData"===e.multiType?t("b-form-group",{attrs:{id:"group-inputData",label:e.$t("Request Variable Array"),"label-for":"inputData",description:e.$t("Non-array data will result in an error.")}},[t("b-form-input",{attrs:{id:"inputData",type:"text",placeholder:e.$t("Request Variable Name")},on:{input:e.changeInputData},model:{value:e.inputData,callback:function(t){e.inputData=t},expression:"inputData"}})],1):e._e(),"sequential_mi"===e.loopType?t("b-form-group",{attrs:{id:"group-exit-condition",label:e.$t("Exit Condition"),"label-for":"exit-condition",description:e.$t("When the FEEL Expression evaluates to true then exit the loop")}},[t("b-form-textarea",{attrs:{id:"exit-condition",placeholder:e.$t("FEEL Syntax")},on:{input:e.changeCompletionCondition},model:{value:e.completionCondition,callback:function(t){e.completionCondition=t},expression:"completionCondition"}})],1):e._e(),t("b-form-group",{attrs:{id:"group-outputData",label:e.$t("Output Data Variable"),"label-for":"outputData",description:e.$t("Specifies the output request data variable array, which will be produced as a result of the multi-instance.")}},[t("b-form-input",{attrs:{id:"outputData",type:"text",placeholder:e.$t("Request Variable Name")},on:{input:e.changeOutputData},model:{value:e.outputData,callback:function(t){e.outputData=t},expression:"outputData"}})],1)]:e._e()],2)},yh=[],wh={props:{value:{type:Object,default:function(){return{loopCharacteristics:null,ioSpecification:null}}}},name:"LoopCharacteristics",data:function(){return{loopOptions:[{text:this.$t("No Loop Mode"),value:"no_loop"},{text:this.$t("Loop"),value:"loop"},{text:this.$t("Multi-Instance (Parallel)"),value:"parallel_mi"},{text:this.$t("Multi-Instance (Sequential)"),value:"sequential_mi"}],showAdvanced:!1,previous:{loopCardinality:"3",completionCondition:null,inputData:null,outputData:null,inputDataItem:null},local:{loopCharacteristics:{$type:null,isSequential:!1},loopMaximum:0,loopCondition:null,ioSpecification:{dataInputs:[]}},loopType:null,multiType:null,loopCardinality:null,completionCondition:null,inputData:null,inputDataItem:null,outputData:null,outputDataItem:null,loopMaximum:0,loopCondition:null}},mounted:function(){this.loadData()},watch:{value:{deep:!0,handler:function(e){(0,Un.isEqual)(this.local,e)||this.loadData()}}},methods:{changeLoopMaximum:function(e){this.setLoopMaximum(e),this.saveData()},changeLoopCondition:function(){this.setLoopCondition(this.loopCondition),this.saveData()},changeLoopType:function(e){this.setLoopCharacteristics(e),this.saveData()},changeMultiType:function(e){this.setMultiType(e),this.saveData()},changeLoopCardinality:function(e){this.setLoopCardinality(e),this.saveData()},changeCompletionCondition:function(e){this.setCompletionCondition(e),this.saveData()},changeInputData:function(e){this.setLoopDataInputRef(e),this.saveData()},changeInputDataItem:function(e){this.setInputDataItem(e),this.saveData()},changeOutputData:function(e){this.setLoopDataOutputRef(e),this.saveData()},changeOutputDataItem:function(e){this.setOutputDataItem(e),this.saveData()},loadData:function(){this.$set(this,"local",(0,Un.cloneDeep)(this.value)),this.loopType=this.getLoopCharacteristics(),this.multiType=this.getMultiType(),this.loopCardinality=this.getLoopCardinality(),this.completionCondition=this.getCompletionCondition(),this.inputData=this.getLoopDataInputRef(),this.inputDataItem=this.getInputDataItem(),this.outputData=this.getLoopDataOutputRef(),this.outputDataItem=this.getOutputDataItem(),this.previous.inputData=this.inputData,this.previous.outputData=this.outputData,this.previous.loopCardinality=this.loopCardinality,this.loopMaximum=this.getLoopMaximum(),this.loopCondition=this.getLoopCondition()},saveData:function(){(0,Un.isEqual)(this.local,this.value)||this.$emit("input",(0,Un.cloneDeep)(this.local))},getOutputDataItem:function(){return this.local.loopCharacteristics&&this.local.loopCharacteristics.outputDataItem?this.local.loopCharacteristics.outputDataItem.name:null},setOutputDataItem:function(e){this.local.loopCharacteristics.outputDataItem={$type:"bpmn:DataInput",isCollection:!0,name:e}},getLoopDataOutputRef:function(){var e;return this.local.loopCharacteristics&&this.local.loopCharacteristics.loopDataOutputRef?null===(e=this.local.ioSpecification)||void 0===e?void 0:e.dataOutputs[0].name:null},setLoopDataOutputRef:function(e){this.local.ioSpecification||this.initIoSpecification();var t=this.local.ioSpecification.dataOutputs[0]||{$type:"bpmn:DataOutput",id:"".concat(this.local.id,"_output_1"),isCollection:!0,name:e};t.name=e,this.local.ioSpecification.dataOutputs=[t],this.local.ioSpecification.outputSets[0].dataOutputRefs=[t.id],this.local.loopCharacteristics.loopDataOutputRef=t.id},getInputDataItem:function(){return this.local.loopCharacteristics&&this.local.loopCharacteristics.inputDataItem?this.local.loopCharacteristics.inputDataItem.name:null},setInputDataItem:function(e){this.local.loopCharacteristics.inputDataItem={$type:"bpmn:DataInput",isCollection:!0,name:e}},getLoopDataInputRef:function(){var e;return this.local.loopCharacteristics&&this.local.loopCharacteristics.loopDataInputRef?null===(e=this.local.ioSpecification)||void 0===e?void 0:e.dataInputs[0].name:null},setLoopDataInputRef:function(e){var t={$type:"bpmn:DataInput",id:"".concat(this.local.id,"_input_1"),isCollection:!0,name:e};this.local.ioSpecification||this.initIoSpecification(),this.local.ioSpecification.dataInputs=[t],this.local.ioSpecification.inputSets[0].dataInputRefs=[t.id],this.local.loopCharacteristics.loopDataInputRef=t.id},initIoSpecification:function(){this.local.ioSpecification={$type:"bpmn:InputOutputSpecification",dataInputs:[],dataOutputs:[],inputSets:[{$type:"bpmn:InputSet",dataInputRefs:[]}],outputSets:[{$type:"bpmn:OutputSet",dataOutputRefs:[]}]}},getLoopCardinality:function(){return this.local.loopCharacteristics&&this.local.loopCharacteristics.loopCardinality?this.local.loopCharacteristics.loopCardinality.body:null},getCompletionCondition:function(){return this.local.loopCharacteristics&&this.local.loopCharacteristics.completionCondition?this.local.loopCharacteristics.completionCondition.body:null},setLoopCardinality:function(e){this.local.loopCharacteristics.loopCardinality={$type:"bpmn:Expression",body:e}},setCompletionCondition:function(e){this.local.loopCharacteristics.completionCondition={$type:"bpmn:Expression",body:e}},getMultiType:function(){return this.local.loopCharacteristics?void 0!==this.local.loopCharacteristics.loopCardinality?"loopCardinality":"inputData":null},setMultiType:function(e){"loopCardinality"===e?(this.local.loopCharacteristics.loopCardinality={$type:"bpmn:Expression",body:this.previous.loopCardinality||"3"},this.local.loopCharacteristics.completionCondition={$type:"bpmn:Expression",body:this.previous.completionCondition||""},this.previous.inputData=this.inputData,this.previous.outputData=this.outputData,this.previous.inputDataItem=this.inputDataItem,delete this.local.loopCharacteristics.loopDataInputRef,delete this.local.loopCharacteristics.inputDataItem,this.setLoopDataOutputRef(this.previous.outputData||"output_array_".concat(this.local.id))):(this.previous.loopCardinality=this.loopCardinality,this.previous.completionCondition=this.completionCondition,this.previous.outputData=this.outputData,delete this.local.loopCharacteristics.loopCardinality,delete this.local.loopCharacteristics.completionCondition,this.local.loopCharacteristics.loopDataInputRef="",this.setLoopDataInputRef(this.previous.inputData||"source_array"),this.setLoopDataOutputRef(this.previous.outputData||"output_array_".concat(this.local.id)),this.setInputDataItem(this.previous.inputDataItem||"")),this.loopCardinality=this.getLoopCardinality(),this.completionCondition=this.getCompletionCondition(),this.inputData=this.getLoopDataInputRef(),this.outputData=this.getLoopDataOutputRef()},getLoopCharacteristics:function(){return this.local.loopCharacteristics?"bpmn:StandardLoopCharacteristics"===this.local.loopCharacteristics.$type?"loop":"bpmn:MultiInstanceLoopCharacteristics"===this.local.loopCharacteristics.$type?this.local.loopCharacteristics.isSequential?"sequential_mi":"parallel_mi":"no_loop":"no_loop"},setLoopCharacteristics:function(e){switch(this.local.loopCharacteristics||(this.local.loopCharacteristics={}),e){case"no_loop":this.local.loopCharacteristics=void 0;break;case"loop":this.local.loopCharacteristics.$type="bpmn:StandardLoopCharacteristics";break;case"parallel_mi":this.local.loopCharacteristics.$type="bpmn:MultiInstanceLoopCharacteristics",this.local.loopCharacteristics.isSequential=!1,this.multiType||(this.multiType="inputData");break;case"sequential_mi":this.local.loopCharacteristics.$type="bpmn:MultiInstanceLoopCharacteristics",this.local.loopCharacteristics.isSequential=!0,this.multiType||(this.multiType="inputData");break}},setLoopMaximum:function(e){e||(e=null),this.local.loopCharacteristics.loopMaximum=e},getLoopMaximum:function(){return this.local.loopCharacteristics?this.local.loopCharacteristics.loopMaximum:null},setLoopCondition:function(e){this.local.loopCharacteristics.loopCondition={$type:"bpmn:Expression",body:e}},getLoopCondition:function(){return this.local.loopCharacteristics&&this.local.loopCharacteristics.loopCondition?this.local.loopCharacteristics.loopCondition.body:null}}},xh=wh,kh=qn(xh,bh,yh,!1,null,null,null),Ch=kh.exports;h(19601),h(36210);function Sh(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}function Eh(e,t,n){Sh(e,t),t.set(e,n)}function Ah(e,t){return t.get?t.get.call(e):t.value}function Mh(e,t,n){if(!t.has(e))throw new TypeError("attempted to "+n+" private field on non-instance");return t.get(e)}function Th(e,t){var n=Mh(e,t,"get");return Ah(e,n)}function _h(e,t){if(e!==t)throw new TypeError("Private static access of wrong provenance")}function Ph(e,t){if(void 0===e)throw new TypeError("attempted to "+t+" private static field before its declaration")}function Oh(e,t,n){return _h(e,t),Ph(n,"get"),Ah(e,n)}function Dh(e,t,n){if(t.set)t.set.call(e,n);else{if(!t.writable)throw new TypeError("attempted to set read only private field");t.value=n}}function Ih(e,t,n,o){return _h(e,t),Ph(n,"set"),Dh(e,n,o),o}h(24603),h(28450),h(88386),h(39714),h(4129);var Nh=new WeakMap,Rh=new WeakMap,Bh=new WeakMap,Lh=function(){function e(t){wo(this,e),Eh(this,Nh,{writable:!0,value:function(){var t,n=e.prefix+Oh(e,e,jh);return Ih(e,e,jh,(t=Oh(e,e,jh),t++,t)),n}}),Eh(this,Rh,{writable:!0,value:function(){var t,n=e.prefix+Oh(e,e,Fh)+"_di";return Ih(e,e,Fh,(t=Oh(e,e,Fh),t++,t)),n}}),Eh(this,Bh,{writable:!0,value:function(){var t,n=e.processPrefix+Oh(e,e,zh);return Ih(e,e,zh,(t=Oh(e,e,zh),t++,t)),n}}),this.definitions=t,this.refreshLastIdCounter(),this.refreshLastDiagramIdCounter(),this.refreshLastProcessIdCounter()}return ko(e,[{key:"findById",value:function(e){var t=this,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.definitions.rootElements,o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:[];if(!(o.indexOf(n)>-1)){var i;if(n instanceof Array)o.push(n),n.find((function(n){return i=t.findById(e,n,o)}));else if(n instanceof Object&&n.$type){if(o.push(n),n.id===e)return n;Object.getOwnPropertyNames(n).find((function(r){return i=!(n[r]instanceof Function)&&"$"!==r.substring(0,1)&&t.findById(e,n[r],o)}))}return i}}},{key:"matchIds",value:function(e,t){var n=this,o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:[],i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:0;if(o.indexOf(t)>-1)return i;if(t instanceof Array)o.push(t),t.forEach((function(t){return i=n.matchIds(e,t,o,i)}));else if(t instanceof Object){if(o.push(t),t.id){var r=String(t.id).match(e),s=r?parseInt(r[1]):0;s>i&&(i=s)}Object.getOwnPropertyNames(t).forEach((function(r){t[r]instanceof Function||"$"===r.substring(0,1)||(i=n.matchIds(e,t[r],o,i))}))}return i}},{key:"refreshLastIdCounter",value:function(){var t=this.matchIds(new RegExp("^".concat(e.prefix,"(\\d+)$")),this.definitions.rootElements);Ih(e,e,jh,t+1)}},{key:"getCounter",value:function(){return this.refreshLastIdCounter(),Oh(e,e,jh)}},{key:"refreshLastDiagramIdCounter",value:function(){var t=this.matchIds(new RegExp("^".concat(e.prefix,"(\\d+)_di$")),this.definitions.diagrams);Ih(e,e,Fh,t+1)}},{key:"refreshLastProcessIdCounter",value:function(){var t=this.matchIds(new RegExp("^".concat(e.processPrefix,"(\\d+)$")),this.definitions.rootElements);Ih(e,e,zh,t+1)}},{key:"generate",value:function(){var e=Th(this,Nh).call(this),t=Th(this,Rh).call(this);return[e,t]}},{key:"generateProcessId",value:function(){return Th(this,Bh).call(this)}}]),e}();_e(Lh,"prefix","node_"),_e(Lh,"processPrefix","Process_");var jh={writable:!0,value:1},Fh={writable:!0,value:1},zh={writable:!0,value:1},qh=null;function Hh(e){return qh||(qh=new Lh(e)),qh}var Vh=function(){function e(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};wo(this,e),this.index=window.NODE_INSPECTOR_FIRST_INDEX||(new Date).getTime(),this.definitions=t,this.nodeIdGenerator=Hh(this.definitions),this.options=Object.assign({prefix:this.nodeIdGenerator.generate()[0]},n),this.createdModdleNodes={}}return ko(e,[{key:"getDefinitionProps",value:function(e){var t=this;return e instanceof Array?e.map((function(e){return t.getDefinitionProps(e)})):e instanceof Object?Object.getOwnPropertyNames(e).reduce((function(n,o){if(e[o]instanceof Function)return n;var i="Ref"===o.substr(o.length-3)||"Refs"===o.substr(o.length-4);return e[o]instanceof Object&&e[o].id&&i?n[o]=Object&&e[o].id:e[o]instanceof Array&&i?n[o]=e[o].filter((function(e){return e})).map((function(e){return e.id})):("$type"===o||"$"!==o.substr(0,1)&&"__"!==o.substr(0,2))&&(n[o]=t.getDefinitionProps(e[o])),n}),{}):e}},{key:"setDefinitionProps",value:function(e,t,n,o,i){var r=this;if(void 0!==e){if(e instanceof Array)e=e.map((function(e){return r.setDefinitionProps(e,t,n)}));else if(e instanceof Object)try{e=Object.keys(Ma()(e,"$type","$config","markerFlags")).reduce((function(o,i){var s=r.setDefinitionProps(e[i],t,n,void 0,i);return null!==s&&void 0!==s?o[i]=s:void 0===s&&delete o[i],o}),o||this.createModdleNode(n,e))}catch(s){throw'Unable to create moddle node of type "'.concat(e.$type,'" \n ').concat(s)}return o&&void 0!==i&&void 0!==e&&null!==e&&(o[i]=e),e}}},{key:"createModdleNode",value:function(e,t){var n=e.create(t.$type,{id:this.generateId()});return t.id&&(this.createdModdleNodes[t.id]=n),n}},{key:"setReferences",value:function(e){var t=this,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;if(void 0!==e)return this.isReference(n)?e=e instanceof Array?e.map((function(e){return t.findReference(e)})):this.findReference(e):e instanceof Array?e=e.map((function(e){return t.setReferences(e,null)})):e instanceof Object&&Object.keys(Ma()(e,"$type","$config","markerFlags")).forEach((function(n){e[n]=t.setReferences(e[n],n)})),e}},{key:"isReference",value:function(e){return!!e&&("Ref"===e.substr(e.length-3)||"Refs"===e.substr(e.length-4))}},{key:"findReference",value:function(e){return this.createdModdleNodes[e]||this.findById(e)}},{key:"generateId",value:function(){return this.index++,"".concat(this.options.prefix,"_").concat(this.index)}},{key:"findById",value:function(e){var t=this,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.definitions.rootElements,o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:[];if(!(o.indexOf(n)>-1)){var i;if(n instanceof Array)o.push(n),n.find((function(n){return i=t.findById(e,n,o)}));else if(n instanceof Object&&n.$type){if(o.push(n),n.id===e)return n;Object.getOwnPropertyNames(n).find((function(r){return i=!(n[r]instanceof Function)&&t.findById(e,n[r],o)}))}return i}}}]),e}(),Uh=function(e,t,n,o,i){var r=new Vh(i,{prefix:"".concat(t.definition.id,"_inner")}),s=r.setDefinitionProps(e.$loopCharactetistics,n,o,{});return s=r.setReferences(s),s.loopCharacteristics?(delete t.definition.loopCharacteristics,n(t,"loopCharacteristics",s.loopCharacteristics)):(t.definition.loopCharacteristics=null,delete t.definition.loopCharacteristics),s.ioSpecification?(delete t.definition.ioSpecification,n(t,"ioSpecification",s.ioSpecification)):delete t.definition.ioSpecification,Ma()(e,["$loopCharactetistics"])},Gh=function(e,t,n,o){var i=o.definitions,r=new Vh(i);e.$loopCharactetistics=r.getDefinitionProps({id:t.definition.id,loopCharacteristics:t.definition.loopCharacteristics,ioSpecification:t.definition.ioSpecification}),delete e.loopCharacteristics,delete e.ioSpecification},Wh={component:"FormAccordion",container:!0,config:{initiallyOpen:!1,label:"Loop Activity",icon:"redo",name:"loop-characteristics-accordion"},items:[{component:Ch,name:"LoopCharactetistics",config:{name:"$loopCharactetistics"}}]},$h="processmaker-modeler-task",Xh={id:"processmaker-modeler-task",component:ih,bpmnType:["bpmn:Task","bpmn:UserTask","bpmn:GlobalTask","bpmn:SubProcess"],control:!0,category:"BPMN",rank:40,icon:h(45849),label:"Task",items:[{icon:h(45849),label:"Form Task",control:!0,rank:41,id:"processmaker-modeler-task"},{icon:h(24678),label:"Manual Task",control:!0,rank:42,id:"processmaker-modeler-manual-task"},{icon:h(37901),label:"Script Task",control:!0,rank:43,id:"processmaker-modeler-script-task"},{icon:h(47356),label:"Sub Process",control:!0,rank:44,id:"processmaker-modeler-call-activity"}],definition:function(e,t){return e.create("bpmn:Task",{name:t(To[$h]),assignment:"requester"})},diagram:function(e){return e.create("bpmndi:BPMNShape",{bounds:e.create("dc:Bounds",{height:Lp,width:jp})})},inspectorHandler:function(e,t,n,o,i,r){Yh(e.markerFlags,t,n,o),Uh(e,t,n,o,i),r(Ma()(e,"markerFlags","$loopCharactetistics"))},inspectorData:function(e,t,n){var o=t(e);return Gh(o,e,t,n),o.markerFlags={isForCompensation:o.isForCompensation},delete o.isForCompensation,o},inspectorConfig:[{name:To[$h],items:[{component:"FormAccordion",container:!0,config:{initiallyOpen:!0,label:"Properties",icon:"cog",name:"inspector-accordion-task"},items:[{component:"FormInput",config:Ys}]},Wh,ua,vh]}],loopCharacteristicsHandler:Uh,loopCharacteristicsData:Gh};function Yh(e,t,n){if(e){var o=t.definition.get("isForCompensation"),i=e.isForCompensation;null!=i&&i!==o&&n(t,"isForCompensation",i)}}var Zh,Kh,Jh=yo(yo({},Xh),{},{component:dh}),Qh=(h(38862),function(){var e=this,t=e._self._c;return t("div",[t("crown-config",e._g({attrs:{highlighted:e.highlighted,paper:e.paper,graph:e.graph,shape:e.shape,node:e.node,nodeRegistry:e.nodeRegistry,moddle:e.moddle,collaboration:e.collaboration,"process-node":e.processNode,"plane-elements":e.planeElements,"is-rendering":e.isRendering,"boundary-event-dropdown-data":e.boundaryEventDropdownData,"dropdown-data":e.dropdownData,showCustomIconPicker:!0,iconName:this.iconName},on:{"set-custom-icon-name":e.setCustomIconName,"reset-custom-icon-name":e.resetCustomIconName}},e.$listeners)),t("b-modal",{ref:"subprocess-modal",attrs:{title:"Previewing '".concat(e.subprocessName,"'")},scopedSlots:e._u([{key:"modal-footer",fn:function(){return[t("a",{attrs:{href:e.subprocessLink,target:"_blank","data-test":"modal-process-link"}},[e._v(" Open subprocess in new window "),t("i",{staticClass:"ml-1 fas fa-external-link-alt"})])]},proxy:!0}])},[e.subProcessSvg?t("div",{staticClass:"text-center",domProps:{innerHTML:e._s(e.subProcessSvg)}}):e.failedToLoadPreview?t("div",[e._v("Could not load preview")]):t("div",[t("i",{staticClass:"fas fa-spinner fa-spin"}),e._v(" Loading process preview...")])]),t("b-modal",{ref:"no-subprocess-modal",attrs:{title:"No subprocess selected","hide-footer":!0}},[e._v(" Please select a subprocess to view it. ")])],1)}),ef=[],tf=h.p+"img/subprocess.19c191a3.svg",nf=15,of=2*ys,rf='<svg version="1.1"\n baseProfile="full"\n width="16" height="16"\n xmlns="http://www.w3.org/2000/svg"></svg>',sf={components:{CrownConfig:Zr},props:["graph","node","id","highlighted","nodeRegistry","moddle","paper","collaboration","processNode","planeElements","isRendering","paperManager"],mixins:[Vs,Je,Bs,as,ya,Fp],data:function(){return{subProcessSvg:null,failedToLoadPreview:!1,boundaryEventDropdownData:Hp,dropdownData:[{label:To["processmaker-modeler-task"],nodeType:"processmaker-modeler-task",dataTest:"switch-to-user-task"},{label:To["processmaker-modeler-manual-task"],nodeType:"processmaker-modeler-manual-task",dataTest:"switch-to-manual-task"},{label:To["processmaker-modeler-script-task"],nodeType:"processmaker-modeler-script-task",dataTest:"switch-to-script-task"},{label:To["processmaker-modeler-call-activity"],nodeType:"processmaker-modeler-call-activity",dataTest:"switch-to-sub-process"}],nodeIcon:rf,iconName:"",anchorPointFunction:at}},computed:{subprocessId:function(){return JSON.parse(this.node.definition.get("config")).processId},subprocessLink:function(){return"/modeler/".concat(this.subprocessId)},subprocessName:function(){return this.node.definition.get("name")}},watch:{"node.definition.name":function(e){var t=this.node.diagram.bounds.width;this.shape.attr("label/text",a.util.breakText(e,{width:t}));var n=this.shapeView.selectors.label.getBBox().height,o=this.shape.size(),i=o.height;if(n+nf+of!==i){var r=Math.max(n+nf+of,Lp);this.node.diagram.bounds.height=r,this.shape.resize(t,r),this.recalcMarkersAlignment()}},"node.definition.config":function(e){bn.commit("updateNodeProp",{node:this.node,key:"config",value:e}),this.$emit("save-state")},"node.definition.callActivityType":function(e){this.shape.attr("image/display","globalTask"===e?"none":"initial")},"node.definition.loopCharacteristics":function(){Xp(this.node.definition,this.markers,this.$set,this.$delete)}},methods:{clickSubprocess:function(e,t){var n=this,o="bottomCenter.0"===t.target.getAttribute("joint-selector"),i=e.model===this.shape;o&&i&&(this.subprocessId?(this.$refs["subprocess-modal"].show(),this.subProcessSvg=null,this.failedToLoadPreview=!1,window.ProcessMaker.apiClient.get("/processes/".concat(this.subprocessId),{params:{include:"svg"}}).then((function(e){var t=e.data;if(t.svg){var o=function(e){return e.replace('<svg width="100%"',"<svg ")},i=function(e){return e.replace("<svg ",'<svg class="border border-dark"')};n.subProcessSvg=i(o(t.svg))}else n.failedToLoadPreview=!0})).catch((function(){n.failedToLoadPreview=!0}))):this.$refs["no-subprocess-modal"].show())}},mounted:function(){this.shape=new Bp,this.$set(this.markers.bottomCenter,"subprocess",tf);var e=this.node.diagram.bounds;this.shape.position(e.x,e.y),this.shape.resize(e.width,e.height),Xp(this.node.definition,this.markers,this.$set,this.$delete),this.shape.attr({body:{rx:8,ry:8,strokeWidth:4},label:{text:a.util.breakText(this.node.definition.get("name"),{width:e.width}),fill:"black"}}),this.shape.addTo(this.graph),this.shape.component=this,this.paperManager.addEventHandler("element:pointerclick",this.clickSubprocess),this.node.definition.get("customIcon")&&this.setCustomIcon(this.node.definition.get("customIcon"))}},af=sf,lf=qn(af,Qh,ef,!1,null,null,null),cf=lf.exports,df=function(){var e=this,t=e._self._c;return t("div",[t("form-multi-select",{staticClass:"p-0 mb-2",attrs:{label:e.$t("Process"),name:"Process",helper:e.$t("Select which Process this element calls"),showLabels:!1,"allow-empty":!1,options:e.processList,loading:e.loading,optionContent:"name",validation:e.validation,searchable:!0,"internal-search":!1,"preserve-search":!1,"clear-on-select":!1},on:{"search-change":e.searchChange},model:{value:e.selectedProcess,callback:function(t){e.selectedProcess=t},expression:"selectedProcess"}}),e.selectedProcess?t("form-multi-select",{staticClass:"p-0 mb-2",attrs:{label:e.$t("Start Event"),name:"StartEvent",disabled:0===e.startEventList.length,"allow-empty":!1,showLabels:!1,options:e.startEventList,optionContent:"name",validation:"required"},model:{value:e.selectedStartEvent,callback:function(t){e.selectedStartEvent=t},expression:"selectedStartEvent"}}):e._e(),e.selectedProcess?t("a",{attrs:{href:"/modeler/".concat(e.selectedProcess.id),target:"_blank"}},[e._v(" "+e._s(e.$t("Open Process"))+" "),t("i",{staticClass:"ml-1 fas fa-external-link-alt"})]):e._e()],1)},uf=[],pf=h(45578),hf=h.n(pf),ff={data:function(){return{selectedProcess:null,selectedStartEvent:null,config:{},name:"",loading:!1,processes:[],selectedProcessInfo:null,validation:""}},inheritAttrs:!1,props:["value"],computed:{processList:function(){var e=this,t=this.filterValidProcesses(this.processes)||[];return this.selectedProcessInfo&&!t.find((function(t){return t.id===e.selectedProcessInfo.id}))&&t.push(this.selectedProcessInfo),t},startEventList:function(){return this.selectedProcess?this.filterValidStartEvents(this.selectedProcess.events):[]},currentProcessId:function(){var e=window.location.href.match(/modeler\/(\d+)/);return e&&e[1]?parseInt(e[1]):null}},watch:{selectedProcess:function(){this.loading||(this.startEventList.length>0?this.selectedStartEvent=this.startEventList[0]:this.selectedStartEvent=null)},selectedStartEvent:function(){this.loading||this.setBpmnValues()},processList:function(){this.loadBpmnValues()},value:{handler:function(){this.config=JSON.parse(this.value),this.loadSelectedProcessInfo()},immediate:!0}},methods:{searchChange:function(e){this.loadProcessesDebounced(e)},filterValidProcesses:function(e){var t=this;return e.filter((function(e){return t.filterValidStartEvents(e.events).length>0})).filter((function(e){return e.id!==t.currentProcessId}))},filterValidStartEvents:function(e){return e.filter((function(e){if(e.eventDefinitions&&e.eventDefinitions.length>0)return!1;if(e.config)try{var t=JSON.parse(e.config);if(t.web_entry)return!1}catch(n){return!1}return!0}))},loadBpmnValues:function(){var e=this;this.config.processId&&this.config.startEvent&&(this.loading=!0,this.name=this.config.name,this.selectedProcess=this.processList.find((function(t){return t.id===e.config.processId})),this.selectedStartEvent=this.startEventList.find((function(t){return t.id===e.config.startEvent})),this.$nextTick((function(){e.selectedProcess||(e.validation="required"),e.loading=!1})))},setBpmnValues:function(){if(this.selectedProcess&&this.selectedStartEvent){var e=this.selectedProcess.name;this.startEventList.length>1&&(e+=" (".concat(this.selectedStartEvent.name,")"));var t={calledElement:"".concat(this.selectedStartEvent.ownerProcessId,"-").concat(this.selectedProcess.id),processId:this.selectedProcess.id,startEvent:this.selectedStartEvent.id,name:e},n=JSON.stringify(t);this.$emit("input",n)}},containsMultipleProcesses:function(e){return hf()(e.events,"ownerProcessId").length>1},loadProcesses:function(e){var t=this;this.loading=!0;var n={order_direction:"asc",per_page:20,include:"events,category",filter_without_assignments:!0};e&&(n.filter=e),window.ProcessMaker.apiClient.get("processes",{params:n}).then((function(e){t.loading=!1,t.processes=e.data.data})).catch((function(){t.loading=!1}))},loadSelectedProcessInfo:function(){var e=this;this.config.processId&&window.ProcessMaker.apiClient.get("processes/"+this.config.processId,{params:{include:"events,category",filter_without_assignments:!0}}).then((function(t){e.selectedProcessInfo=t.data}))}},created:function(){var e=this;this.validation=this.config.processId?"":"required",this.loadProcessesDebounced=C()((function(t){e.loadProcesses(t)}),500),0===this.processList.length?this.loadProcesses():this.loadBpmnValues()}},mf=ff,gf=qn(mf,df,uf,!1,null,null,null),vf=gf.exports,bf="processmaker-modeler-call-activity",yf={id:bf,component:cf,bpmnType:"bpmn:CallActivity",control:!1,category:"BPMN",icon:h(12893),label:To[bf],definition:function(e,t){return e.create("bpmn:CallActivity",{name:t(To[bf]),calledElement:"",config:"{}",loopCharacteristics:null,ioSpecification:null})},diagram:function(e){return e.create("bpmndi:BPMNShape",{bounds:e.create("dc:Bounds",{height:Lp,width:jp})})},inspectorHandler:function(e,t,n){n(t,"id",e.id),n(t,"name",e.name);var o=JSON.parse(e.config);e["calledElement"]=o.calledElement,n(t,"calledElement",o.calledElement),o.name!==e.name&&(o.name=e.name),n(t,"config",JSON.stringify(o))},inspectorConfig:[{name:To[bf],items:[{component:"FormAccordion",container:!0,config:{initiallyOpen:!0,label:"Properties",icon:"cog",name:"inspector-accordion-subprocess"},items:[{component:"FormInput",config:Ys},{component:vf,config:{name:"config"}}]},ua,na]}]},wf=h(87465),xf=h.n(wf),kf={extends:ih,mixins:[ya],data:function(){return{nodeIcon:xf(),iconName:""}}},Cf=kf,Sf=qn(Cf,Zh,Kh,!1,null,null,null),Ef=Sf.exports,Af="processmaker-modeler-script-task",Mf={id:Af,component:Ef,bpmnType:"bpmn:ScriptTask",control:!1,category:"BPMN",icon:h(75763),label:To[Af],definition:function(e,t){return e.create("bpmn:ScriptTask",{name:t(To[Af]),scriptRef:null,loopCharacteristics:null,ioSpecification:null})},diagram:function(e){return e.create("bpmndi:BPMNShape",{bounds:e.create("dc:Bounds",{height:Lp,width:jp})})},inspectorConfig:[{name:To[Af],items:[{component:"FormAccordion",container:!0,config:{initiallyOpen:!0,label:"Properties",icon:"cog",name:"inspector-accordion-script-task"},items:[{component:"FormInput",config:Ys}]},ua,na]}]},Tf=yo(yo({},Xh),{},{id:"processmaker-modeler-service-task",bpmnType:["bpmn:ServiceTask","bpmn:SendTask","bpmn:ReceiveTask"],control:!1,label:"Service Task",definition:function(e,t){return e.create("bpmn:ServiceTask",{name:t("Service Task")})},inspectorConfig:[{name:"Service Task",items:[{component:"FormAccordion",container:!0,config:{initiallyOpen:!0,label:"Properties",icon:"cog",name:"inspector-accordion-service-task"},items:[{component:"FormInput",config:Ys}]},ua,na]}]}),_f=function(){var e=this,t=e._self._c;return t("crown-config",e._g({attrs:{highlighted:e.highlighted,paper:e.paper,graph:e.graph,shape:e.shape,node:e.node,nodeRegistry:e.nodeRegistry,moddle:e.moddle,collaboration:e.collaboration,"process-node":e.processNode,"plane-elements":e.planeElements,"is-rendering":e.isRendering}},e.$listeners))},Pf=[],Of=160,Df={components:{CrownConfig:Zr},props:["graph","node","id","highlighted","nodeRegistry","moddle","paper","paperManager","collaboration","processNode","planeElements","isRendering"],mixins:[Vs,Je],data:function(){return{shape:null,definition:null,nodeWidth:10}},watch:{"node.definition.text":function(e){this.updateNodeText(e)}},methods:{getLabelHeight:function(e){return this.shape.findView(this.paperManager.paper).selectors.label.getBBox().height+e},calculateNewHeight:function(e,t,n){var o=3,i=15,r=this.getLabelHeight(i);return r!==e?r-o:0===t.length?n-o:e-o},updateNodeText:function(e){var t=this,n=this.shape.findView(this.paperManager.paper).getBBox(),o=n.height,i="25 ".concat(o," 3 ").concat(o," 3 3 25 3"),r=this.node.diagram.bounds;this.shape.position(r.x,r.y),this.shape.attr({body:{refPoints:i},label:{text:a.util.breakText(e,{width:Of}),textAnchor:"left"}}),this.paperManager.awaitScheduledUpdates().then((function(){t.shape.resize(t.nodeWidth,t.calculateNewHeight(o,e,r.height)),t.setShapeHighlight()}))}},mounted:function(){var e=this.node.diagram.bounds;this.shape=new a.shapes.standard.Polyline,this.shape.set("type","textAnnotation"),this.shape.position(e.x,e.y),this.shape.resize(this.nodeWidth,e.height),this.shape.attr({body:{refPoints:"25 10 3 10 3 3 25 3",fill:"none"},label:{fill:"black",yAlignment:"left",xAlignment:"left",refX:"5",refY:"5"}}),this.shape.addTo(this.graph),this.shape.component=this,this.updateNodeText(this.node.definition.get("text"))}},If=Df,Nf=qn(If,_f,Pf,!1,null,null,null),Rf=Nf.exports,Bf="processmaker-modeler-text-annotation",Lf={id:Bf,component:Rf,bpmnType:"bpmn:TextAnnotation",control:!0,category:"BPMN",icon:h(15153),label:"Text Annotation",rank:70,definition:function(e,t){return e.create("bpmn:TextAnnotation",{text:t("Text Annotation")})},diagram:function(e){return e.create("bpmndi:BPMNShape",{bounds:e.create("dc:Bounds",{height:30,width:150})})},validateIncoming:function(){return!1},validateAssociationIncoming:function(){return!1},inspectorConfig:[{name:"Text Annotation",items:[{component:"FormAccordion",container:!0,config:{initiallyOpen:!0,label:"Properties",icon:"cog",name:"inspector-accordion-text-annotation"},items:[{component:"FormInput",config:{label:"Text to Show",helper:"Body of the text annotation",name:"text",placeholder:"Text Annotation"}}]},ua,na]}]},jf=function(){var e=this,t=e._self._c;return t("crown-config",e._g({attrs:{highlighted:e.highlighted,paper:e.paper,graph:e.graph,shape:e.shape,node:e.node,nodeRegistry:e.nodeRegistry,moddle:e.moddle,collaboration:e.collaboration,"process-node":e.processNode,"plane-elements":e.planeElements,"is-rendering":e.isRendering}},e.$listeners),[t("add-lane-above-button",{directives:[{name:"b-tooltip",rawName:"v-b-tooltip.hover.viewport.d50",modifiers:{hover:!0,viewport:!0,d50:!0}}],staticClass:"crown-config__icon",attrs:{title:e.$t("Lane Above")},on:{click:e.addLaneAbove}}),t("add-lane-below-button",{directives:[{name:"b-tooltip",rawName:"v-b-tooltip.hover.viewport.d50",modifiers:{hover:!0,viewport:!0,d50:!0}}],staticClass:"crown-config__icon",attrs:{title:e.$t("Lane Below")},on:{click:e.addLaneBelow}})],1)},Ff=[],zf=h.p+"img/highlight-shape.5f7b1ba9.svg",qf=30,Hf=200,Vf=300,Uf=20,Gf=300,Wf=100,$f={props:["highlighted","paper","processNode","planeElements","moddle"],data:function(){return{anchorPoints:[],isResizing:!0,pointWidth:15,pointHeight:15,elementBounds:[],elementTopY:null,elementRightX:null,elementBottomY:null,elementLeftX:null}},watch:{highlighted:function(e){0!==this.anchorPoints.length&&(e?(!1===bn.getters.isReadOnly&&this.addResizeAnchors(),this.calculateElementLimits(),this.updateAnchorPointPosition()):this.removeResizeAnchors())}},computed:{poolComponent:function(){return x()(this,"node.pool.component",this)},isLane:function(){return"processmaker-modeler-lane"===this.node.type}},methods:{calculateElementLimits:function(){this.elementBounds=this.poolComponent.shape.getEmbeddedCells().filter((function(e){return e.component&&e.component.node.type!==Tl&&"processmaker-modeler-message-flow"!==e.component.node.type})).map((function(e){return e.getBBox()})),this.elementTopY=Math.min.apply(Math,m(this.elementBounds.map((function(e){var t=e.y;return t-Uf})))),this.elementBottomY=Math.max.apply(Math,m(this.elementBounds.map((function(e){var t=e.y,n=e.height;return t+n+Uf})))),this.elementRightX=Math.max.apply(Math,m(this.elementBounds.map((function(e){var t=e.x,n=e.width;return t+n+Uf})))),this.elementLeftX=Math.min.apply(Math,m(this.elementBounds.map((function(e){var t=e.x;return t-Uf}))))},configureResize:function(){var e=this;this.shape.listenTo(this.paper,"element:pointerup",(function(t){t.model.component&&t.model.component===e&&e.calculateElementLimits()}));var t=new a.shapes.standard.EmbeddedImage,n=new a.shapes.standard.EmbeddedImage,o=new a.shapes.standard.EmbeddedImage,i=new a.shapes.standard.EmbeddedImage;this.anchorPoints=[t,n,o,i];var r=this.shape.getBBox(),s=r.x,l=r.y,c=r.width,d=r.height;this.anchorPoints.forEach((function(e){e.set("isDrag",!0),e.set("previousPosition",e.position())})),this.highlighted&&this.addResizeAnchors(),this.setPointAttributes(t,"nwse-resize","bottom-right-resize-button"),this.setPointAttributes(n,"nesw-resize","bottom-left-resize-button"),this.setPointAttributes(o,"nesw-resize","top-right-resize-button"),this.setPointAttributes(i,"nwse-resize","top-left-resize-button"),t.position(s+c,l+d),n.position(s-this.pointWidth,l+d),o.position(s+c,l-this.pointHeight),i.position(s-this.pointWidth,l-this.pointHeight),t.listenTo(this.paper,"element:pointerdown",(function(n){n.model===t&&(t.on("change:position",e.resizeBottomRight),e.shape.listenToOnce(e.paper,"element:pointerup",(function(){t.off("change:position",e.resizeBottomRight),e.resizeUpdate()})))})),n.listenTo(this.paper,"element:pointerdown",(function(t){t.model===n&&(n.on("change:position",e.resizeBottomLeft),e.shape.listenToOnce(e.paper,"element:pointerup",(function(){n.off("change:position",e.resizeBottomLeft),e.resizeUpdate()})))})),o.listenTo(this.paper,"element:pointerdown",(function(t){t.model===o&&(o.on("change:position",e.resizeTopRight),e.shape.listenToOnce(e.paper,"element:pointerup",(function(){o.off("change:position",e.resizeTopRight),e.resizeUpdate()})))})),i.listenTo(this.paper,"element:pointerdown",(function(t){t.model===i&&(i.on("change:position",e.resizeTopLeft),e.shape.listenToOnce(e.paper,"element:pointerup",(function(){i.off("change:position",e.resizeTopLeft),e.resizeUpdate()})))}))},fixResizeRounding:function(){var e=this.poolComponent.shape.getBBox(),t=e.x,n=e.y,o=e.width,i=e.height;this.poolComponent.shape.resize(Math.round(o),Math.round(i)),this.poolComponent.shape.position(Math.round(t),Math.round(n))},resizeUpdate:function(){this.fixResizeRounding();var e=this.shape.getBBox(),t=e.width,n=e.height,o=this.node.diagram.bounds;t===o.width&&n===o.height||(this.poolComponent.laneSet&&(this.poolComponent.updateLaneChildren(),this.poolComponent.sortedLanes().forEach((function(e){bn.commit("updateNodeBounds",{node:e.component.node,bounds:e.getBBox()})}))),bn.commit("updateNodeBounds",{node:this.poolComponent.node,bounds:this.poolComponent.shape.getBBox()}),this.$emit("save-state"))},resizeTopLeft:function(e,t,n){if(n.ui){var o="top-left",i=t.x,r=t.y;if(e.get("previousPosition").x!==i||e.get("previousPosition").y!==r){var s=this.poolComponent.shape.getBBox(),a=s.x,l=s.y,c=s.width,d=s.height,u=this.shape.getBBox(),p=u.x,h=u.y,f=u.width,m=u.height,g=this.poolComponent.sortedLanes(),v=g.slice(1).reduce((function(e,t){return e+t.getBBox().height}),Wf),b=Math.max(a+c-(i+this.pointWidth),a+c-this.elementLeftX+qf,Vf),y=Math.max(l+d-(r+this.pointWidth),l+d-this.elementTopY,this.poolComponent.laneSet?v:Hf),w=Math.max(p+f-(i+this.pointWidth),p+f-this.elementLeftX+Uf+qf,Gf),x=Math.max(h+m-(r+this.pointHeight),Wf);if(this.isLane)if(this.shape===g[0]){var k=Math.max(a+c-(i+this.pointWidth)+qf,a+c-this.elementLeftX+qf,Vf);this.poolComponent.shape.resize(k,y,{direction:o}),e.set("previousPosition",{x:i,y:r}),this.poolComponent.resizeLanes()}else{var C=g[g.indexOf(this.shape)-1];this.shape.resize(w,Math.min(h+m-(C.getBBox().y+Wf),x),{direction:o}),e.set("previousPosition",{x:i,y:r}),this.poolComponent.fillLanes(this.shape,o)}else e.set("previousPosition",{x:i,y:r}),this.shape.resize(b,y,{direction:o}),this.laneSet&&this.poolComponent.resizeLanes();this.updateAnchorPointPosition()}}},resizeTopRight:function(e,t,n){if(n.ui){var o="top-right",i=t.x,r=t.y;if(e.get("previousPosition").x!==i||e.get("previousPosition").y!==r){var s=this.poolComponent.shape.getBBox(),a=s.x,l=s.y,c=s.height,d=this.shape.getBBox(),u=d.x,p=d.y,h=d.height,f=this.poolComponent.sortedLanes(),m=f.slice(1).reduce((function(e,t){return e+t.getBBox().height}),Wf),g=Math.max(i-a,this.elementRightX-a,Vf),v=Math.max(l+c-(r+this.pointWidth),l+c-this.elementTopY,this.poolComponent.laneSet?m:Hf),b=Math.max(i-u,this.elementRightX-u,Gf),y=Math.max(p+h-(r+this.pointHeight),Wf);if(this.isLane)if(this.shape===f[0])this.poolComponent.shape.resize(g,v,{direction:o}),e.set("previousPosition",{x:i,y:r}),this.poolComponent.resizeLanes();else{var w=f[f.indexOf(this.shape)-1];this.shape.resize(b,Math.min(p+h-(w.getBBox().y+Wf),y),{direction:o}),e.set("previousPosition",{x:i,y:r}),this.poolComponent.fillLanes(this.shape,o)}else this.shape.resize(g,v,{direction:o}),e.set("previousPosition",{x:i,y:r}),this.laneSet&&this.poolComponent.resizeLanes();this.updateAnchorPointPosition()}}},resizeBottomLeft:function(e,t,n){if(n.ui){var o="bottom-left",i=t.x,r=t.y;if(e.get("previousPosition").x!==i||e.get("previousPosition").y!==r){var s=this.poolComponent.shape.getBBox(),a=s.x,l=s.y,c=s.width,d=this.shape.getBBox(),u=d.x,p=d.y,h=d.width,f=this.poolComponent.sortedLanes(),m=f.slice(0,f.length-1).reduce((function(e,t){return e+t.getBBox().height}),Wf),g=Math.max(a+c-(i+this.pointWidth),a+c-this.elementLeftX+qf,Vf),v=Math.max(r-l,this.elementBottomY-l,this.poolComponent.laneSet?m:Hf),b=Math.max(u+h-(i+this.pointWidth),u+h-this.elementLeftX+Uf+qf,Gf),y=Math.max(r-p,Wf);if(this.isLane)if(this.shape===f[f.length-1]){var w=Math.max(a+c-(i+this.pointWidth)+qf,a+c-this.elementLeftX+qf,Vf);this.poolComponent.shape.resize(w,v,{direction:o}),e.set("previousPosition",{x:i,y:r}),this.poolComponent.resizeLanes()}else{var x=f[f.indexOf(this.shape)+1];this.shape.resize(b,Math.min(x.getBBox().y+x.getBBox().height-Wf-p,y),{direction:o}),e.set("previousPosition",{x:i,y:r}),this.poolComponent.fillLanes(this.shape,o)}else this.shape.resize(g,v,{direction:o}),e.set("previousPosition",{x:i,y:r}),this.laneSet&&this.poolComponent.resizeLanes();this.updateAnchorPointPosition()}}},resizeBottomRight:function(e,t,n){if(n.ui){var o="bottom-right",i=t.x,r=t.y;if(e.get("previousPosition").x!==i||e.get("previousPosition").y!==r){var s=this.poolComponent.shape.getBBox(),a=s.x,l=s.y,c=this.shape.getBBox(),d=c.x,u=c.y,p=this.poolComponent.sortedLanes(),h=p.slice(0,p.length-1).reduce((function(e,t){return e+t.getBBox().height}),Wf),f=Math.max(i-a,this.elementRightX-a,Vf),m=Math.max(r-l,this.elementBottomY-l,this.poolComponent.laneSet?h:Hf),g=Math.max(i-d,this.elementRightX-d,Gf),v=Math.max(r-u,Wf);if(this.isLane)if(this.shape===p[p.length-1])this.poolComponent.shape.resize(f,m,{direction:o}),e.set("previousPosition",{x:i,y:r}),this.poolComponent.resizeLanes();else{var b=p[p.indexOf(this.shape)+1];this.shape.resize(g,Math.min(b.getBBox().y+b.getBBox().height-Wf-u,v),{direction:o}),e.set("previousPosition",{x:i,y:r}),this.poolComponent.fillLanes(this.shape,o)}else this.shape.resize(f,m,{direction:o}),e.set("previousPosition",{x:i,y:r}),this.laneSet&&this.poolComponent.resizeLanes();this.updateAnchorPointPosition()}}},addResizeAnchors:function(){var e=this;this.anchorPoints.forEach((function(t){try{e.shape.embed(t)}catch(fa){}t.addTo(e.graph),t.toFront()}))},removeResizeAnchors:function(){this.anchorPoints.forEach((function(e){e.remove()}))},updateAnchorPointPosition:function(e){if(0!==this.anchorPoints.length){var t=this.shape.getBBox(),n=t.x,o=t.y,i=t.width,r=t.height;0!==e&&this.anchorPoints[0].position(n+i,o+r),1!==e&&this.anchorPoints[1].position(n-this.pointWidth,o+r),2!==e&&this.anchorPoints[2].position(n+i,o-this.pointHeight),3!==e&&this.anchorPoints[3].position(n-this.pointWidth,o-this.pointWidth)}},setPointAttributes:function(e,t,n){e.attr({body:{fill:"#fff",stroke:" #fff",opacity:.8},image:{xlinkHref:zf,cursor:t,buttonId:n,refWidth:20,refHeight:20,resetOffset:!0}})}},mounted:function(){var e=this;this.$nextTick((function(){e.configureResize()}))}},Xf=function(){var e=this,t=e._self._c;return t("crown-config",e._g({attrs:{highlighted:e.highlighted,paper:e.paper,graph:e.graph,shape:e.shape,node:e.node,nodeRegistry:e.nodeRegistry,moddle:e.moddle,collaboration:e.collaboration,"process-node":e.processNode,"plane-elements":e.planeElements,"is-rendering":e.isRendering}},e.$listeners))},Yf=[],Zf={components:{CrownConfig:Zr},props:["graph","node","nodes","id","highlighted","nodeRegistry","moddle","paper","collaboration","processNode","planeElements","isRendering"],mixins:[Vs,$f],data:function(){return{shape:null,definition:null}},watch:{"node.definition.name":function(e){this.shape.attr("label/text",e)}},mounted:function(){this.shape=new a.shapes.standard.Rectangle,this.shape.set("type","PoolLane");var e=this.node.diagram.bounds;this.shape.position(e.x,e.y),this.shape.resize(e.width,e.height),this.shape.set("elementMove",!1),this.shape.attr("body/cursor","default"),this.shape.attr("body",{fill:Ce}),this.shape.attr("label",{text:a.util.breakText(this.node.definition.get("name"),{width:e.height}),fill:"black",transform:"rotate(-90)",refX:qf/2}),this.shape.component=this,this.shape.addTo(this.graph),this.planeElements.includes(this.node.diagram)||this.planeElements.push(this.node.diagram)},beforeDestroy:function(){var e=this.node.pool.component,t=e.laneSet.get("lanes");if(Gr()(t,this.node.definition),0===t.length)return e.containingProcess.set("laneSets",[]),void(e.laneSet=null)}},Kf=Zf,Jf=qn(Kf,Xf,Yf,!1,null,null,null),Qf=Jf.exports,em={id:Tl,component:Qf,bpmnType:"bpmn:Lane",control:!1,category:"BPMN",label:"Lane",definition:function(e){return e.create("bpmn:Lane",{name:""})},diagram:function(e){return e.create("bpmndi:BPMNShape",{bounds:e.create("dc:Bounds",{height:150,width:600,x:null,y:null})})},inspectorConfig:[{name:"Lane",items:[{component:"FormAccordion",container:!0,config:{initiallyOpen:!0,label:"Properties",icon:"cog",name:"inspector-accordion-pool-lane"},items:[{component:"FormInput",config:Ys}]},ua,na]}]},tm=function(){var e=this,t=e._self._c;return t("crown-button",e._g({attrs:{id:"lane-above-button","aria-label":"Add lane above icon",width:25}},e.$listeners),[t("font-awesome-icon",{attrs:{icon:["fpm","fa-lane-above"]}})],1)},nm=[],om=h.p+"img/lane-above.37ee2b80.svg",im={components:{CrownButton:Vn,FontAwesomeIcon:Zo.FontAwesomeIcon},data:function(){return{laneAboveIcon:om}},created:function(){Lo.library.add(zo)}},rm=im,sm=qn(rm,tm,nm,!1,null,null,null),am=sm.exports,lm=function(){var e=this,t=e._self._c;return t("crown-button",e._g({attrs:{id:"lane-below-button","aria-label":"Add lane below icon",width:25}},e.$listeners),[t("font-awesome-icon",{attrs:{icon:["fpm","fa-lane-below"]}})],1)},cm=[],dm=h.p+"img/lane-below.22169670.svg",um={components:{CrownButton:Vn,FontAwesomeIcon:Zo.FontAwesomeIcon},data:function(){return{laneBelowIcon:dm}},created:function(){Lo.library.add(qo)}},pm=um,hm=qn(pm,lm,cm,!1,null,null,null),fm=hm.exports,mm=a.shapes.standard.Rectangle.define("processmaker.modeler.bpmn.pool",{markup:[].concat(m(a.shapes.standard.Rectangle.prototype.markup),[{tagName:"polyline",selector:"polyline"}]),attrs:{label:{fill:"black",transform:"rotate(-90)",refX:qf/2},polyline:{refPointsKeepOffset:"".concat(qf,",0 ").concat(qf,",200"),stroke:"#000",fill:"#fff",strokeWidth:2}}}),gm=mm,vm=function(){var e=this,t=e._self._c;return t("crown-config",e._g({attrs:{highlighted:e.highlighted,paper:e.paper,graph:e.graph,shape:e.shape,node:e.node,nodeRegistry:e.nodeRegistry,moddle:e.moddle,collaboration:e.collaboration,"process-node":e.processNode,"plane-elements":e.planeElements,"is-rendering":e.isRendering,"dropdown-data":e.dropdownData}},e.$listeners))},bm=[],ym={inheritAttrs:!1,components:{CrownConfig:Zr},props:["graph","node","id","highlighted","nodeRegistry","moddle","paper","collaboration","processNode","planeElements","isRendering"],mixins:[Vs,as,Je],data:function(){return{shape:null,definition:null,dropdownData:[]}},watch:{"node.definition.name":function(e){this.shape.attr("label/text",e)}},mounted:function(){this.shape=new a.shapes.standard.Path,this.shape.attr("root/title","joint.shapes.standard.Path"),this.shape.attr("label",{refY:65,text:this.node.definition.get("name"),fill:"black"}),this.shape.attr("body",{refD:"M1,1 L25,1 L35,10 L35,49 L1,49 L1,1 M24,1 L24,10 L35,10"});var e=this.node.diagram.bounds;this.shape.position(e.x,e.y),this.shape.resize(e.width,e.height),this.shape.addTo(this.graph),this.shape.component=this}},wm=ym,xm=qn(wm,vm,bm,!1,null,null,null),km=xm.exports,Cm="processmaker-modeler-data-object",Sm={id:Cm,component:km,bpmnType:"bpmn:DataObjectReference",control:!0,category:"BPMN",icon:h(91012),label:To[Cm],rank:80,validateIncoming:function(){return!1},definition:function(e,t){return e.create("bpmn:DataObjectReference",{name:t(To[Cm])})},diagram:function(e){return e.create("bpmndi:BPMNShape",{bounds:e.create("dc:Bounds",{height:50,width:36})})},inspectorConfig:[{name:To[Cm],items:[{component:"FormAccordion",container:!0,config:{initiallyOpen:!0,label:"Properties",icon:"cog",name:"inspector-accordion-data-object"},items:[{component:"FormInput",config:Ys}]},ua,na]}]},Em=function(){var e=this,t=e._self._c;return t("crown-config",e._g({attrs:{highlighted:e.highlighted,paper:e.paper,graph:e.graph,shape:e.shape,node:e.node,nodeRegistry:e.nodeRegistry,moddle:e.moddle,collaboration:e.collaboration,"process-node":e.processNode,"plane-elements":e.planeElements,"is-rendering":e.isRendering,"dropdown-data":e.dropdownData}},e.$listeners))},Am=[],Mm=a.shapes.standard.Cylinder.extend({markup:[].concat(m(a.shapes.standard.Cylinder.prototype.markup),[{tagName:"ellipse",selector:"thirdLine"},{tagName:"ellipse",selector:"secondLine"},{tagName:"ellipse",selector:"firstLine"}]),defaults:a.util.deepSupplement({attrs:{thirdLine:{refCx:"50%",refRx:"50%",cy:20,refRy:"20%","stroke-width":2,fill:"#fff",stroke:"#000"},secondLine:{refCx:"50%",refRx:"50%",cy:15,refRy:"20%","stroke-width":2,fill:"#fff",stroke:"#000"},firstLine:{refCx:"50%",refRx:"50%",cy:10,refRy:"20%","stroke-width":2,fill:"#fff",stroke:"#000"},label:{refY:50,fill:"#000"}}},a.shapes.standard.Cylinder.prototype.defaults)}),Tm={components:{CrownConfig:Zr},props:["graph","node","id","highlighted","nodeRegistry","moddle","paper","collaboration","processNode","planeElements","isRendering"],mixins:[Vs,as,Je],data:function(){return{shape:null,definition:null,dropdownData:[]}},watch:{"node.definition.name":function(e){this.shape.attr("label/text",e)}},mounted:function(){this.shape=new Mm,this.shape.attr("label/text",this.node.definition.get("name"));var e=this.node.diagram.bounds;this.shape.position(e.x,e.y),this.shape.resize(e.width,e.height),this.shape.addTo(this.graph),this.shape.component=this}},_m=Tm,Pm=qn(_m,Em,Am,!1,null,null,null),Om=Pm.exports,Dm="processmaker-modeler-data-store",Im={id:Dm,component:Om,bpmnType:"bpmn:DataStoreReference",control:!0,category:"BPMN",icon:h(63427),label:To[Dm],rank:90,validateIncoming:function(){return!1},definition:function(e,t){return e.create("bpmn:DataStoreReference",{name:t(To[Dm])})},diagram:function(e){return e.create("bpmndi:BPMNShape",{bounds:e.create("dc:Bounds",{height:50,width:50})})},inspectorConfig:[{name:To[Dm],items:[{component:"FormAccordion",container:!0,config:{initiallyOpen:!0,label:"Properties",icon:"cog",name:"inspector-accordion-data-store"},items:[{component:"FormInput",config:Ys}]},ua,na]}]};function Nm(e,t){var n=new gm,o=e.diagram.bounds;return n.position(o.x,o.y),n.resize(o.width,o.height),n.attr("label/text",a.util.breakText(e.definition.get("name"),{width:o.width})),n.attr("body",{fill:Ce}),n.addTo(t),n}function Rm(e,t){e.getElements().filter((function(e){return e!==t})).filter((function(e){var t=e.component;return!t.node.isBpmnType("bpmn:BoundaryEvent")})).forEach((function(e){var n=e.component;t.embed(n.shape),n.node.pool=t}))}function Bm(e,t){e.fitEmbeds({padding:Uf+qf}),e.resize(e.getBBox().width-qf,e.getBBox().height-qf),e.resize(e.getBBox().width,e.getBBox().height-qf,{direction:"top"});var n=e.get("size"),o=n.width,i=n.height,r=t.diagram.bounds;e.resize(Math.max(o,r.width),Math.max(i,r.height))}function Lm(e,t,n){var o=Nm(t,n);return e||(Rm(n,o),Bm(o,t)),o}function jm(e){return e.component&&e.component.node.type!==Tl&&e.component.node.type!==Bf&&e.component.node.type!==Cm&&e.component.node.type!==Dm}var Fm={components:{CrownConfig:Zr,AddLaneAboveButton:am,AddLaneBelowButton:fm},props:["graph","node","nodes","id","collaboration","processes","moddle","processNode","rootElements","highlighted","nodeRegistry","paper","planeElements","isRendering","paperManager","nodeIdGenerator"],mixins:[Vs,$f,Je],data:function(){return{shape:null,definition:null,laneSet:null,isAddingLaneAbove:!1,anchorPointFunction:lt(20)}},computed:{containingProcess:function(){var e=this;return this.node.definition.get("processRef")?this.processes.find((function(t){return t.id===e.node.definition.get("processRef").id})):null}},watch:{"node.definition.name":function(e){this.shape.attr("label/text",e)}},methods:{addLaneAbove:function(){this.isAddingLaneAbove=!0,this.addLane()},addLaneBelow:function(){this.isAddingLaneAbove=!1,this.addLane()},sortedLanes:function(){return this.shape.getEmbeddedCells().filter((function(e){var t=e.component;return t&&t.node.type===Tl})).sort((function(e,t){return e.position().y-t.position().y}))},getElementsUnderArea:function(e,t){var n=e.getBBox(),o=n.x,i=n.y,r=n.width,s=n.height,a={x:o,y:i,width:r,height:s};return t.findModelsInArea(a)},moveEmbeddedElements:function(e,t){var n=this;this.getElementsUnderArea(e,this.graph).filter((function(t){return t.isEmbeddedIn(e)})).forEach((function(e){e.component.node.pool=t,Gr()(n.containingProcess.get("flowElements"),e.component.node.definition),t.component.containingProcess.get("flowElements").push(e.component.node.definition)}))},moveFlow:function(e,t){var n=e.component.node.definition;Gr()(this.containingProcess.get("flowElements"),n),t.component.containingProcess.get("flowElements").push(n)},moveElement:function(e,t){var n=e.component.node.definition;if(this.laneSet){var o=this.laneSet.get("lanes").find((function(e){return e.get("flowNodeRef").includes(n)}));Gr()(o.get("flowNodeRef"),n)}Gr()(this.containingProcess.get("flowElements"),n),t.component.containingProcess.get("flowElements").push(n),this.moveEmbeddedElements(e,t),e.component.node.pool=t,this.shape.unembed(e),t.component.addToPool(e)},addLane:function(){var e=this;return y(v().mark((function t(){var n,o;return v().wrap((function(t){while(1)switch(t.prev=t.next){case 0:return n=[],e.laneSet||(e.createLaneSet(),o=em.definition(e.moddle,e.$t),e.shape.getEmbeddedCells().filter((function(e){return jm(e)})).forEach((function(e){o.get("flowNodeRef").push(e.component.node.definition)})),n.push(e.pushNewLane(o))),n.push(e.pushNewLane()),t.next=5,Promise.all(n);case 5:e.$emit("set-shape-stacking",e.shape),e.graph.getLinks().forEach((function(t){e.$emit("set-shape-stacking",t)})),e.$emit("save-state");case 8:case"end":return t.stop()}}),t)})))()},createLaneSet:function(){var e=this.moddle.create("bpmn:LaneSet");this.laneSet=e;var t=this.nodeIdGenerator,n=t.generate(),o=mt(n,1),i=o[0];this.laneSet.set("id",i),this.containingProcess.get("laneSets").push(e)},pushNewLane:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:em.definition(this.moddle,this.$t);e.set("color",this.node.definition.get("color")),this.$emit("set-pool-target",this.shape);var t=em.diagram(this.moddle);return t.bounds.width=this.shape.getBBox().width,this.$emit("add-node",new Ro(em.id,e,t)),this.$nextTick()},addToPool:function(e){e.component.node.isBpmnType("bpmn:BoundaryEvent")||(this.shape.unembed(e),this.shape.embed(e),this.expandToFitElement(e,this.shape),e.component.node.type!==Tl&&this.laneSet&&this.updateLaneChildren())},positionAndSizeLane:function(e,t){var n=t.getBBox(),o=n.width,i=n.height,r=e.component.node.diagram.bounds;if(!r.x||!r.y){var s=1===t.getEmbeddedCells().filter((function(e){return e.component&&e.component.node.type===Tl})).length,a=s?i:r.height;e.resize(o-qf,a),e.position(qf,s?0:this.isAddingLaneAbove?-a:i,{parentRelative:!0}),t.resize(o,s?i:i+a,{direction:this.isAddingLaneAbove?"top-right":"bottom-right"}),this.fixResizeRounding(),this.updateAnchorPointPosition();var l=e.position(),c=l.x,d=l.y;r.set("x",c),r.set("y",d),r.set("width",e.get("size").width),r.set("height",e.get("size").height),bn.commit("updateNodeBounds",{node:this.node,bounds:t.getBBox()})}},expandToFitElement:function(e,t){if(e.component.node.type!==Vl){var n=t.getBBox(),o=n.x,i=n.y,r=n.width,s=n.height;if(e.component.node.type!==Tl){var a=e.get("size"),l=a.width,c=a.height,d=e.position(),u=d.x,p=d.y,h=u-o,f=p-i,m=h+l,g=h,v=f,b=f+c,y=0,w=0,x="bottom",k="right";m>r-Uf&&(y=m+Uf),g<qf+Uf&&(y=r+(qf+Uf-g),k="left"),v<Uf&&(w=Uf-v+s,x="top"),b>s-Uf&&(w=b+Uf),(y||w)&&(t.resize(Math.max(y,r),Math.max(w,s),{direction:"".concat(x,"-").concat(k)}),this.fixResizeRounding(),this.updateAnchorPointPosition(),this.laneSet&&(this.resizeLanes(),this.sortedLanes().forEach((function(e){bn.commit("updateNodeBounds",{node:e.component.node,bounds:e.getBBox()})}))),bn.commit("updateNodeBounds",{node:this.node,bounds:t.getBBox()}),this.$emit("save-state"))}else this.positionAndSizeLane(e,t)}},fillLanes:function(e,t,n){var o,i=this.shape.get("size").height,r=this.sortedLanes().reduce((function(e,t){return e+t.getBBox().height}),0),s=n?e.get("size").height:i-r;switch(t){case"top-right":o="bottom-right";break;case"top-left":o="bottom-left";break;case"bottom-right":o="top-right";break;case"bottom-left":o="top-left";break}var a=this.sortedLanes().indexOf(e),l=e.getBBox(),c=l.width,d=this.sortedLanes()[a+(t.includes("top")?-1:1)];d.resize(c,d.getBBox().height+s,{direction:o}),this.shape.resize(c+qf,i,{direction:o}),this.sortedLanes().forEach((function(e){return e.resize(c,e.getBBox().height,{direction:o})}))},resizeLanes:function(){var e=this;this.sortedLanes().forEach((function(t,n,o){var i=e.shape.get("size"),r=i.width,s=i.height,a=t.get("size"),l=a.height,c=t.position({parentRelative:!0}),d=c.y,u=l,p=d;if(0===n&&(u=l+t.position({parentRelative:!0}).y,p=0),n===o.length-1){var h=s-(t.position({parentRelative:!0}).y+l);u=l+h}t.resize(r-qf,u),t.position(qf,p,{parentRelative:!0})}))},captureChildren:function(){var e=this;this.graph.getElements().filter((function(t){var n=t.component;return n&&n!==e})).forEach((function(t){var n=t.component;n.node.isBpmnType("bpmn:BoundaryEvent")||(e.shape.embed(n.shape),n.node.pool=e.shape)})),this.$emit("set-shape-stacking",this.shape),this.resizePool(this.shape)},fitEmbeds:function(){this.shape.fitEmbeds({padding:Uf+qf}),this.shape.resize(this.shape.getBBox().width-qf,this.shape.getBBox().height-qf),this.shape.resize(this.shape.getBBox().width,this.shape.getBBox().height-qf,{direction:"top"})},resizePool:function(e){var t=this;this.fitEmbeds();var n=this.shape.get("size"),o=n.width,i=n.height,r=this.node.diagram.bounds;this.shape.resize(Math.max(o,r.width),Math.max(i,r.height)),this.shape.getEmbeddedCells().forEach((function(n){t.expandToFitElement(n,e)}));var s=this.shape.position(),a=s.x,l=s.y,c=this.shape.get("size"),d=c.width,u=c.height;this.node.diagram.bounds.x=a,this.node.diagram.bounds.y=l,this.node.diagram.bounds.width=d,this.node.diagram.bounds.height=u},updateLaneChildren:function(){var e=this,t={};this.shape.getEmbeddedCells().filter((function(t){return jm(t)&&t.component.node.pool===e.shape})).forEach((function(n){var o=e.graph.findModelsUnderElement(n,{searchBy:"center"}).find((function(e){return e.component&&e.component.node.type===Tl}));t[o.id]?t[o.id].push(n.component.node.definition):t[o.id]=[n.component.node.definition]})),this.sortedLanes().forEach((function(e){var n=t[e.id],o=e.component.node.definition.get("flowNodeRef"),i=n?n.length!==o.length:o.length>0;i&&bn.commit("updateNodeProp",{node:e.component.node,key:"flowNodeRef",value:n||[]})}))},hasPools:function(){return this.collaboration.get("participants").length>0},setPoolSize:function(e){var t=this;e.getEmbeddedCells().forEach((function(n){t.expandToFitElement(n,e)}));var n=e.position(),o=n.x,i=n.y,r=e.get("size"),s=r.width,a=r.height;this.node.diagram.bounds.x=o,this.node.diagram.bounds.y=i,this.node.diagram.bounds.width=s,this.node.diagram.bounds.height=a}},mounted:function(){this.$emit("set-pools",this.node.definition),this.laneSet=this.containingProcess.get("laneSets")[0],this.shape=Lm(this.collaboration,this.node,this.graph),this.shape.component=this,this.collaboration||this.captureChildren(),this.setPoolSize(this.shape),this.$emit("set-shape-stacking",this.shape)},beforeDestroy:function(){var e=this.collaboration.get("participants");Gr()(e,this.node.definition),this.hasPools()?Gr()(this.rootElements,this.containingProcess):this.$emit("unset-pools")},created:function(){this.$t=this.$t.bind(this)}},zm=Fm,qm=qn(zm,jf,Ff,!1,null,null,null),Hm=qm.exports,Vm={id:bi,component:Hm,bpmnType:"bpmn:Participant",control:!0,category:"BPMN",icon:h(77217),label:"Pool",rank:60,definition:function(e,t){return e.create("bpmn:Participant",{name:t("Pool")})},diagram:function(e){return e.create("bpmndi:BPMNShape",{bounds:e.create("dc:Bounds",{height:300,width:600})})},inspectorConfig:[{name:"Pool",items:[{component:"FormAccordion",container:!0,config:{initiallyOpen:!0,label:"Properties",icon:"cog",name:"inspector-accordion-pool"},items:[{component:"FormInput",config:Ys}]},ua,na]}]},Um=function(){var e=this,t=e._self._c;return t("b-card-footer",{staticClass:"p-0 border-0 statusbar d-flex align-items-center justify-content-end pr-3 pl-3 border-top"},[e._t("default"),t("b-btn",{staticClass:"mr-auto",attrs:{disabled:!e.xmlManager,variant:"secondary",size:"sm","data-test":"downloadXMLBtn"},on:{click:function(t){e.xmlManager&&e.xmlManager.download()}}},[t("i",{staticClass:"fas fa-download mr-1"}),e._v(" "+e._s(e.$t("Download BPMN"))+" ")]),t("div",{staticClass:"status-bar-container d-flex align-items-center justify-content-end"},[e.autoValidate?[0===e.numberOfProblemsToDisplay?t("button",{staticClass:"btn btn-light",attrs:{type:"button","data-test":"validation-list-valid",disabled:!0}},[e._v(" "+e._s(e.$t("BPMN Valid"))+" "),t("span",{staticClass:"badge badge-success badge-pill"},[t("font-awesome-icon",{attrs:{icon:e.faCheck}})],1)]):t("button",{staticClass:"btn btn-light",attrs:{type:"button","data-test":"validation-list-toggle"},on:{click:function(t){e.shouldDisplayProblemsPanel=!e.shouldDisplayProblemsPanel}}},[e._v(" "+e._s(e.$t("BPMN Issues"))+" "),t("span",{staticClass:"badge badge-primary badge-pill"},[e._v(" "+e._s(e.numberOfProblemsToDisplay)+" ")]),t("font-awesome-icon",{staticClass:"ml-3",attrs:{icon:e.chevronIcon}})],1)]:e._e(),t("span",{staticClass:"divider"}),t("b-form-checkbox",{staticClass:"h-100 d-flex align-items-center",attrs:{"data-test":"validation-toggle",switch:""},model:{value:e.autoValidate,callback:function(t){e.autoValidate=t},expression:"autoValidate"}},[e._v(" "+e._s(e.$t("Auto validate"))+" ")]),t("transition",{attrs:{name:"slide"}},[e.isProblemsPanelDisplayed?t("div",{staticClass:"validation-container position-absolute text-left"},[t("dl",{staticClass:"validation-container__list align-items-baseline",attrs:{"data-test":"validation-list"}},[e._l(e.errorList,(function(n,o){return[t("dt",{key:"".concat(n.errorId,"_").concat(o),staticClass:"text-capitalize"},[t("font-awesome-icon",{staticClass:"status-bar-container__status-icon ml-1 mr-1 mt-1",style:{color:e.isErrorCategory(n)?e.errorColor:e.warningColor},attrs:{icon:e.isErrorCategory(n)?e.faTimesCircle:e.faExclamationTriangle}}),e._v(" "+e._s(n.errorKey)+" ")],1),t("dd",{key:"".concat(n.errorId,"_").concat(o,"_dd")},[t("p",{staticClass:"pl-4 mb-0 font-italic"},[e._v(e._s(n.message)+".")]),n.id?t("p",{staticClass:"pl-4 mb-0"},[t("span",{staticClass:"font-weight-bold"},[e._v(e._s(e.$t("Node ID"))+":")]),e._v(" "+e._s(n.id))]):e._e()])]})),e._l(e.warnings,(function(n,o){return[t("dt",{key:n.title+o,staticClass:"text-capitalize"},[t("font-awesome-icon",{staticClass:"status-bar-container__status-icon ml-1 mr-1 mt-1",style:{color:e.warningColor},attrs:{icon:e.faExclamationTriangle}}),e._v(" "+e._s(n.title)+" ")],1),t("dd",{key:n.title+o+"__dd",staticClass:"font-italic pl-4"},[e._v(e._s(n.text))])]}))],2)]):e._e()])],2)],2)},Gm=[];h(86535),h(99244);function Wm(e){return Object.entries(e).flatMap((function(e){var t=mt(e,2),n=t[0],o=t[1];return o.flatMap((function(e){return yo(yo({},e),{},{errorKey:n},{errorId:"".concat(e.id,"_").concat(e.message.split(" ").join("_"))})}))}))}var $m={components:{FontAwesomeIcon:Zo.FontAwesomeIcon},props:["validationErrors","warnings","xmlManager"],data:function(){return{shouldDisplayProblemsPanel:!1,errorColor:"#D9534F",warningColor:"#F0AD4E",faExclamationTriangle:Mr.faExclamationTriangle,faTimesCircle:Mr.faTimesCircle,faChevronUp:Mr.faChevronUp,faChevronDown:Mr.faChevronDown,faCheck:Mr.faCheck}},computed:{autoValidate:{get:function(){return bn.getters.autoValidate},set:function(e){bn.commit("setAutoValidate",e)}},errorList:function(){return Wm(this.validationErrors)},numberOfProblemsToDisplay:function(){return this.errorList.length+this.warnings.length},isProblemsPanelDisplayed:function(){return this.shouldDisplayProblemsPanel&&this.numberOfProblemsToDisplay>0&&this.autoValidate},chevronIcon:function(){return this.shouldDisplayProblemsPanel?Mr.faChevronUp:Mr.faChevronDown}},methods:{isErrorCategory:function(e){return"error"===e.category}}},Xm=$m,Ym=(h(99088),qn(Xm,Um,Gm,!1,null,"1ad192c7",null)),Zm=Ym.exports,Km=function(){var e=this,t=e._self._c;return t("span",{attrs:{"data-test":"body-container"}},[e.showComponent?t("tool-bar",{attrs:{"canvas-drag-position":e.canvasDragPosition,cursor:e.cursor,"is-rendering":e.isRendering,"paper-manager":e.paperManager,"breadcrumb-data":e.breadcrumbData,panelsCompressed:e.panelsCompressed,"validation-errors":e.validationErrors,warnings:e.allWarnings,"xml-manager":e.xmlManager,validationBar:e.validationBar},on:{"load-xml":e.loadXML,"toggle-panels-compressed":function(t){e.panelsCompressed=!e.panelsCompressed},"toggle-mini-map-open":function(t){e.miniMapOpen=t},saveBpmn:e.saveBpmn,publishTemplate:e.publishTemplate,publishPmBlock:e.publishPmBlock,close:e.close,"save-state":e.pushToUndoStack,clearSelection:e.clearSelection}}):e._e(),t("b-row",{staticClass:"modeler h-100"},[e.tooltipTarget?t("b-tooltip",{key:e.tooltipTarget.id,attrs:{target:e.getTooltipTarget,title:e.tooltipTitle}}):e._e(),e.showComponent?t("explorer-rail",{attrs:{"node-types":e.nodeTypes,"pm-block-nodes":e.pmBlockNodes},on:{"set-cursor":function(t){e.cursor=t},onCreateElement:e.onCreateElementHandler}}):e._e(),t("b-col",{ref:"paper-container",staticClass:"paper-container h-100 pr-4",class:[e.cursor,{"grabbing-cursor":e.isGrabbing}],style:{width:e.parentWidth,height:e.parentHeight}},[t("div",{ref:"paper",staticClass:"main-paper",attrs:{"data-test":"paper"}})]),e.showComponent?t("InspectorButton",{attrs:{showInspector:e.isOpenInspector},on:{toggleInspector:e.handleToggleInspector}}):e._e(),e.showComponent?t("InspectorPanel",{directives:[{name:"show",rawName:"v-show",value:e.isOpenInspector&&!(e.highlightedNodes.length>1),expression:"isOpenInspector && !(highlightedNodes.length > 1)"}],ref:"inspector-panel",staticClass:"inspector h-100",style:{height:e.parentHeight},attrs:{nodeRegistry:e.nodeRegistry,moddle:e.moddle,definitions:e.definitions,processNode:e.processNode,"parent-height":e.parentHeight,"canvas-drag-position":e.canvasDragPosition},on:{"save-state":e.pushToUndoStack,"shape-resize":function(t){return e.shapeResize(!1)},toggleInspector:e.handleToggleInspector}}):e._e(),e._l(e.nodes,(function(n){return t(n.type,{key:n._modelerId,ref:"nodeComponent",refInFor:!0,tag:"component",attrs:{graph:e.graph,paper:e.paper,node:n,id:n.id,highlighted:e.highlightedNodes.includes(n),"has-error":e.invalidNodes.includes(n),"border-outline":e.borderOutline(n.id),collaboration:e.collaboration,"process-node":e.processNode,processes:e.processes,"plane-elements":e.planeElements,moddle:e.moddle,nodeRegistry:e.nodeRegistry,"root-elements":e.definitions.get("rootElements"),isRendering:e.isRendering,paperManager:e.paperManager,"auto-validate":e.autoValidate,"node-id-generator":e.nodeIdGenerator,"is-active":n===e.activeNode,"is-completed":e.requestCompletedNodes.includes(n.definition.id),"is-in-progress":e.requestInProgressNodes.includes(n.definition.id),"is-idle":e.requestIdleNodes.includes(n.definition.id)},on:{"add-node":e.addNode,"remove-node":e.removeNode,"set-cursor":function(t){e.cursor=t},"set-pool-target":function(t){e.poolTarget=t},"unset-pools":e.unsetPools,clearSelection:e.clearSelection,"set-pools":e.setPools,"save-state":e.pushToUndoStack,"set-shape-stacking":e.setShapeStacking,setTooltip:function(t){e.tooltipTarget=t},"replace-node":e.replaceNode,"replace-generic-flow":e.replaceGenericFlow,"copy-element":e.copyElement,"copy-selection":e.copyElement,"paste-element":e.pasteElements,"clone-element":e.cloneElement,"clone-selection":e.cloneSelection,"default-flow":e.toggleDefaultFlow,"shape-resize":e.shapeResize}})})),t("RailBottom",{attrs:{nodeTypes:e.nodeTypes,"paper-manager":e.paperManager,graph:e.graph,"is-rendering":e.isRendering},on:{"load-xml":e.loadXML,clearSelection:e.clearSelection,"set-cursor":function(t){e.cursor=t},onCreateElement:e.onCreateElementHandler}}),e.paper?t("selection",{ref:"selector",attrs:{graph:e.graph,paperManager:e.paperManager,useModelGeometry:!1,processNode:e.processNode},on:{"clone-selection":e.cloneSelection,"remove-nodes":e.removeNodes,"save-state":e.pushToUndoStack}}):e._e()],2)],1)},Jm=[],Qm=function(){var e=this,t=e._self._c;return t("crown-config",e._g({attrs:{highlighted:e.highlighted,paper:e.paper,graph:e.graph,shape:e.shape,node:e.node,nodeRegistry:e.nodeRegistry,moddle:e.moddle,collaboration:e.collaboration,"process-node":e.processNode,"plane-elements":e.planeElements,"is-rendering":e.isRendering}},e.$listeners))},eg=[],tg=a.shapes.standard.Circle.extend({markup:[{tagName:"circle",selector:"body"},{tagName:"circle",selector:"body2"},{tagName:"text",selector:"label"},{tagName:"image",selector:"image"}],defaults:a.util.deepSupplement({type:"processmaker.components.nodes.boundaryEvent.Shape",size:{width:36,height:36},attrs:{label:{refY:"130%"},body:{stroke:"#212529",strokeWidth:.85,fill:"#FFF"},body2:{cx:18,cy:18,r:15,strokeWidth:.85,stroke:"#212529",fill:"#FFF"},image:{refX:5,refY:5,ref:"circle",width:26,height:26}}},a.shapes.standard.Circle.prototype.defaults)}),ng={components:{CrownConfig:Zr},props:["graph","node","id","highlighted","nodeRegistry","moddle","paper","collaboration","processNode","planeElements","isRendering","isActive"],mixins:[Vs,Je,as],data:function(){return{shape:null,previousPosition:null,validPosition:null,invalidTargetElement:null}},watch:{"node.definition.name":function(e){this.shape.attr("label/text",e)},"node.definition.cancelActivity":function(e){this.toggleInterruptingStyle(e)}},methods:{getTaskUnderShape:function(){return this.graph.findModelsUnderElement(this.shape).find((function(e){return Qi(e.component)}))},setShapeBorderDashSpacing:function(e){this.shape.attr({body:{strokeDasharray:e},body2:{strokeDasharray:e}})},setSolidShapeBorder:function(){var e=0;this.setShapeBorderDashSpacing(e)},setDashedShapeBorder:function(){var e=5;this.setShapeBorderDashSpacing(e)},toggleInterruptingStyle:function(){this.node.definition.cancelActivity?this.setSolidShapeBorder():this.setDashedShapeBorder()},setShapeProperties:function(){var e=this.node.diagram.bounds,t=e.x,n=e.y,o=e.width,i=e.height;this.shape.position(t,n),this.shape.resize(o,i),this.shape.attr("label/text",this.node.definition.get("name")),this.shape.component=this},hasPositionChanged:function(){if(!this.previousPosition)return!0;var e=this.shape.position(),t=e.x,n=e.y,o=this.previousPosition,i=o.x,r=o.y;return t!==i||n!==r},getCenterPosition:function(){var e=this.shape.position(),t=e.x,n=e.y,o=this.shape.size(),i=o.width,r=o.height;return{x:t+i/2,y:n+r/2}},updateShapePosition:function(e){if(this.hasPositionChanged()){var t=rt(this.getCenterPosition(),e),n=t.x,o=t.y,i=this.shape.size(),r=i.width,s=i.height;this.shape.position(n-r/2,o-s/2),this.previousPosition=this.shape.position()}},attachBoundaryEventToTask:function(e){if(e){var t=this.shape.getParentCell();t&&t.unembed(this.shape),e.embed(this.shape),this.node.definition.set("attachedToRef",e.component.node.definition)}},resetToInitialPosition:function(){this.shape.position(this.validPosition.x,this.validPosition.y),bn.commit("allowSavingElementPosition"),this.$emit("shape-resize")},moveBoundaryEventIfOverTask:function(){var e=this.getTaskUnderShape();er(this.node.type,e)?(this.attachBoundaryEventToTask(e),this.updateShapePosition(e),this.$emit("shape-resize")):this.resetToInitialPosition()},resetInvalidTarget:function(){this.invalidTargetElement&&(ut(this.invalidTargetElement),this.invalidTargetElement=null,this.$emit("shape-resize"))},attachToValidTarget:function(e){var t=this;e.model===this.shape&&(bn.commit("preventSavingElementPosition"),this.validPosition=this.shape.position(),this.shape.listenToOnce(this.paper,"cell:pointerup blank:pointerup",(function(){t.moveBoundaryEventIfOverTask(),t.resetInvalidTarget(),bn.commit("allowSavingElementPosition")})))},turnInvalidTargetRed:function(){if(this.isActive){var e=this.graph.findModelsUnderElement(this.shape).filter((function(e){return e.component}))[0],t=this.invalidTargetElement===e;if(!t){var n=this.shape.getParentCell();e&&e!==n&&!er(this.node.type,e)&&e.attr("body/fill",fe),this.invalidTargetElement&&ut(this.invalidTargetElement),this.invalidTargetElement=e}}}},mounted:function(){var e=this;return y(v().mark((function t(){var n;return v().wrap((function(t){while(1)switch(t.prev=t.next){case 0:return e.shape=new tg,e.setShapeProperties(),e.shape.addTo(e.graph),t.next=5,e.$nextTick();case 5:e.toggleInterruptingStyle(),n=e.getTaskUnderShape(),e.attachBoundaryEventToTask(n),e.updateShapePosition(n);case 9:case"end":return t.stop()}}),t)})))()}},og=ng,ig=qn(og,Qm,eg,!1,null,null,null),rg=ig.exports,sg={id:"processmaker-modeler-boundary-event",component:rg,bpmnType:"bpmn:BoundaryEvent",control:!0,category:"BPMN",label:"Boundary Event",definition:function(e,t){return e.create("bpmn:BoundaryEvent",{name:t("Boundary Event"),cancelActivity:!0})},diagram:function(e){return e.create("bpmndi:BPMNShape",{bounds:e.create("dc:Bounds",{height:36,width:36})})},validateIncoming:function(){return!1},inspectorConfig:[{name:"Boundary Event",items:[{component:"FormAccordion",container:!0,config:{initiallyOpen:!0,label:"Properties",icon:"cog",name:"inspector-accordion-boundary-event"},items:[{component:"FormInput",config:Ys}]}]}]},ag=h(67629),lg=h.n(ag),cg=function(){var e=this,t=e._self._c;return t("div",{directives:[{name:"show",rawName:"v-show",value:e.explorerOpen,expression:"explorerOpen"}],attrs:{id:"explorer-rail","data-test":"explorer-rail"}},[t("div",{staticClass:"rail-menu"},[t("b-tabs",{staticClass:"tabs--container",attrs:{"no-nav-style":!0}},[e._l(e.tabs,(function(n){return[t("b-tab",{key:n.idx,attrs:{title:e.$t(n.label),active:n.idx===e.tabIndex},on:{click:function(t){return e.setTabIndex(n.idx)}}})]}))],2),t("div",{staticClass:"close--container",on:{click:function(t){return e.closeRail()}}},[t("font-awesome-icon",{attrs:{icon:e.faTimes()}})],1)],1),t("div",{directives:[{name:"show",rawName:"v-show",value:0===e.tabIndex,expression:"tabIndex === 0"}],staticClass:"node-types__container"},[t("filter-node-types",{attrs:{type:"object"}}),t("node-types-loop",e._g({},e.$listeners))],1),t("div",{directives:[{name:"show",rawName:"v-show",value:1===e.tabIndex,expression:"tabIndex === 1"}],staticClass:"pm-blocks__container"},[t("filter-node-types",{attrs:{type:"pmBlock"}}),t("pm-blocks-loop",e._g({},e.$listeners))],1)])},dg=[],ug=5e3;vt().use(un);var pg=new un.Store({state:{nodeTypes:[],pinnedNodeTypes:[],filteredNodeTypes:[],pmBlockNodeTypes:[],filteredPmBlockNodeTypes:[],explorerOpen:!1,searchTerm:"",selectedNode:null,ghostNode:null},getters:{getNodeTypes:function(e){return e.nodeTypes},getPinnedNodeTypes:function(e){return e.pinnedNodeTypes},getFilteredNodeTypes:function(e){return e.filteredNodeTypes},getExplorerOpen:function(e){return e.explorerOpen},getSearchTerm:function(e){return e.searchTerm},getPmBlockNodeTypes:function(e){return e.pmBlockNodeTypes},getFilteredPmBlockNodeTypes:function(e){return e.filteredPmBlockNodeTypes},getSelectedNode:function(e){return e.selectedNode},getGhostNode:function(e){return e.ghostNode}},mutations:{setNodeTypes:function(e,t){e.nodeTypes=t.filter((function(e){return e.control})).map((function(e){var t;return{id:(0,Un.uniqueId)("nodeType_"),type:e.id,icon:e.icon,label:e.label,bpmnType:e.bpmnType,rank:e.rank||ug,items:null===(t=e.items)||void 0===t?void 0:t.map((function(e){return yo(yo({},e),{},{type:e.id})}))}})).sort((function(e,t){return e.rank-t.rank}))},setPinnedNodes:function(e,t){e.pinnedNodeTypes.push(t),e.pinnedNodeTypes=(0,Un.uniqBy)(e.pinnedNodeTypes,"type"),e.pinnedNodeTypes.sort((function(e,t){return e.rank-t.rank}))},setUnpinNode:function(e,t){e.pinnedNodeTypes=e.pinnedNodeTypes.filter((function(e){return e!==t}))},setFilteredNodeTypes:function(e,t){var n=e.pinnedNodeTypes,o=e.nodeTypes;e.searchTerm=t;var i=(0,Un.uniqBy)([].concat(m(n),m(o)),"id");e.filteredNodeTypes=i.filter((function(e){return e.label.toLowerCase().includes(t.toLowerCase())}))},setPmBlockNodeTypes:function(e,t){e.pmBlockNodeTypes=t.filter((function(e){return e.control})).map((function(e){var t;return{id:(0,Un.uniqueId)("pmBlockNode_"),type:e.id,icon:e.icon,customIcon:e.customIcon,svgIcon:e.svgIcon,label:e.label,description:e.description,bpmnType:e.bpmnType,rank:e.rank||ug,items:null===(t=e.items)||void 0===t?void 0:t.map((function(e){return yo(yo({},e),{},{type:e.id})}))}})).sort((function(e,t){return e.rank-t.rank}))},setFilteredPmBlockNodeTypes:function(e,t){var n=e.pmBlockNodeTypes;e.searchTerm=t;var o=(0,Un.uniqBy)(m(n),"id");e.filteredPmBlockNodeTypes=o.filter((function(e){return e.label.toLowerCase().includes(t.toLowerCase())}))},clearFilteredNodes:function(e){e.filteredNodeTypes=[],e.searchTerm=""},clearFilteredPmBlockNodes:function(e){e.filteredNodeTypes=[],e.filteredPmBlockNodeTypes=[],e.searchTerm=""},closeExplorer:function(e){e.explorerOpen=!1},toggleExplorer:function(e){e.explorerOpen=!e.explorerOpen},setSelectedNode:function(e,t){e.selectedNode=t},clearSelectedNode:function(e){e.selectedNode=null},setGhostNode:function(e,t){e.ghostNode=t}},actions:{getUserPinnedObjects:function(e){var t=e.commit;if(window.ProcessMaker.user){var n=window.ProcessMaker.user?window.ProcessMaker.user.id:"";window.ProcessMaker.apiClient.get("/users/".concat(n,"/get_pinnned_controls")).then((function(e){var n=e.data;n.forEach((function(e){t("setPinnedNodes",e)}))})).catch((function(e){console.error(e)}))}else{var o=localStorage.pinnedNodes?JSON.parse(localStorage.pinnedNodes):[];o.forEach((function(e){t("setPinnedNodes",e)}))}},addUserPinnedObject:function(e,t){var n=e.commit,o=e.state;n("setPinnedNodes",t);var i=o.pinnedNodeTypes;if(window.ProcessMaker.user){var r=window.ProcessMaker.user?window.ProcessMaker.user.id:"";window.ProcessMaker.apiClient.put("/users/".concat(r,"/update_pinned_controls"),{pinnedNodes:i}).catch((function(e){console.error(e)}))}else localStorage.pinnedNodes=JSON.stringify(i)},removeUserPinnedObject:function(e,t){var n=e.commit,o=e.state;n("setUnpinNode",t);var i=o.pinnedNodeTypes;if(window.ProcessMaker.user){var r=window.ProcessMaker.user?window.ProcessMaker.user.id:"";window.ProcessMaker.apiClient.put("/users/".concat(r,"/update_pinned_controls"),{pinnedNodes:i}).catch((function(e){console.error(e)}))}else localStorage.pinnedNodes=JSON.stringify(i)}}}),hg=function(){var e=this,t=e._self._c;return t("div",{attrs:{id:"searchNodeTypes"}},[t("label",{staticClass:"position-relative d-block"},[t("i",{staticClass:"fas fa-search position-absolute h-100 text-muted ml-2"}),t("b-input",{attrs:{placeholder:e.placeholder},model:{value:e.searchTerm,callback:function(t){e.searchTerm=t},expression:"searchTerm"}})],1)])},fg=[],mg={name:"FilterNodeTypes",props:["type"],data:function(){return{searchTerm:""}},watch:{searchTerm:function(e){"pmBlock"===this.type?(0===e.length&&pg.commit("clearFilteredPmBlockNodes"),e.length>0&&pg.commit("setFilteredPmBlockNodeTypes",e)):(0===e.length&&pg.commit("clearFilteredNodes"),e.length>0&&pg.commit("setFilteredNodeTypes",e))},type:function(e,t){this.searchTerm=t===e?this.searchTerm:""}},computed:{nodeTypes:function(){var e=pg.getters.getPinnedNodeTypes,t=pg.getters.getNodeTypes;return[].concat(m(e),m(t))},pmBlockNodes:function(){var e=pg.getters.getPmBlockNodeTypes;return m(e)},placeholder:function(){return"pmBlock"===this.type?this.$t("Search PM Blocks"):this.$t("Search Objects")}}},gg=mg,vg=(h(29062),qn(gg,hg,fg,!1,null,"c468f432",null)),bg=vg.exports,yg=function(){var e=this,t=e._self._c;return t("div",{attrs:{id:"nodeTypesList"}},[e.filteredNodes.length>0?t("div",{attrs:{id:"filteredNodes-container"}},[e._l(e.filteredNodes,(function(n){return[t("div",{key:n.id,staticClass:"node-types__item",attrs:{"data-test":n.type},on:{mouseover:function(t){e.showPin=!0},mouseleave:function(t){e.showPin=!1},click:function(t){return t.target!==t.currentTarget?null:e.onClickHandler(t,n)}}},[t("img",{staticClass:"node-types__item__icon",attrs:{src:n.icon,alt:e.$t(n.label)}}),t("span",[e._v(e._s(e.$t(n.label)))]),e.nodeTypeAlreadyPinned(n,n.type)?t("img",{staticClass:"pinIcon",attrs:{src:e.pinFillIcon,alt:"Unpin Element"},on:{click:function(t){return e.unPin(n)}}}):t("img",{staticClass:"pinIcon",attrs:{src:e.pinIcon,alt:"Pin Element"},on:{click:function(t){return e.addPin(n)}}})])]}))],2):e._e(),0!==e.filteredNodes.length||e.searchTerm?e._e():[e.pinnedObjects.length>0?t("div",{staticClass:"pinnedObjects"},[t("p",[e._v(e._s(e.$t("Pinned Objects")))]),e._l(e.pinnedObjects,(function(n){return[t("div",{key:n.id,staticClass:"node-types__item",attrs:{"data-test":n.type},on:{mouseover:function(t){e.showPin=!0},mouseleave:function(t){e.showPin=!1},click:function(t){return t.stopPropagation(),e.onClickHandler(t,n)}}},[t("img",{staticClass:"node-types__item__icon",attrs:{src:n.icon,alt:e.$t(n.label)}}),t("span",[e._v(e._s(e.$t(n.label)))]),t("img",{staticClass:"pinIcon",attrs:{src:e.pinFillIcon,alt:"Pin/Unpin Element"},on:{click:function(t){return e.unPin(n)}}})])]}))],2):e._e(),t("div",{staticClass:"objectCategory"},[t("p",[e._v(e._s(e.$t("Object Category")))]),e._l(e.unpinnedObjects,(function(n){return[t("div",{key:n.id,staticClass:"node-types__item",attrs:{"data-test":n.type},on:{mouseover:function(t){e.showPin=!0},mouseleave:function(t){e.showPin=!1},click:function(t){return t.stopPropagation(),e.onClickHandler(t,n)}}},[t("img",{staticClass:"node-types__item__icon",attrs:{src:n.icon,alt:e.$t(n.label)}}),t("span",[e._v(e._s(e.$t(n.label)))]),t("img",{staticClass:"pinIcon",attrs:{src:e.pinIcon,alt:"Pin/Unpin Element"},on:{click:function(t){return e.addPin(n)}}})])]}))],2)]],2)},wg=[],xg=h.p+"img/pin-angle.95ef112b.svg",kg=h.p+"img/pin-angle-fill.45c5a07f.svg",Cg={data:function(){return{wasClicked:!1,selectedSubmenuItem:null,xOffset:0,yOffset:0,helperStyles:{backgroundColor:"#ffffff",position:"absolute",height:"40px",width:"40px",zIndex:"10",opacity:"0.5",pointerEvents:"none"},popperType:null}},methods:{onClickHandler:function(e,t){var n=this;this.createDraggingHelper(e,t),document.addEventListener("mousemove",this.setDraggingPosition),this.setDraggingPosition(e),this.selectedItem&&this.selectedItem.type===t.type?this.deselect():(this.wasClicked=!0,pg.commit("setSelectedNode",t),this.$emit("onSetCursor","crosshair"),this.parent||(this.popperType=t.type),window.ProcessMaker.EventBus.$on("custom-pointerclick",(function(e){window.ProcessMaker.EventBus.$off("custom-pointerclick"),document.removeEventListener("mousemove",n.setDraggingPosition),n.movedElement&&document.body.removeChild(n.movedElement),n.popperType=null,n.selectedSubmenuItem=null,n.onCreateElement(e),pg.commit("clearSelectedNode"),pg.commit("setGhostNode",null),n.$emit("onSetCursor","none")})))},onCreateElement:function(e){this.wasClicked&&this.selectedItem&&(this.parent&&(this.parent=null),this.$emit("onCreateElement",{event:e,control:this.selectedItem}),this.wasClicked=!1,e.preventDefault())},setDraggingPosition:function(e){var t=e.pageX,n=e.pageY,o=this.movedElement;o&&(o.style.left="".concat(t,"px"),o.style.top="".concat(n,"px")),pg.commit("setGhostNode",o)},createDraggingHelper:function(e,t){var n=this;this.movedElement&&(document.removeEventListener("mousemove",this.setDraggingPosition),document.body.removeChild(this.movedElement),pg.commit("setGhostNode",null));var o=e.target;pg.commit("setGhostNode",document.createElement("img"));var i=this.movedElement;Object.keys(this.helperStyles).forEach((function(e){i.style[e]=n.helperStyles[e]})),i.src=t.icon,pg.commit("setGhostNode",i),document.body.appendChild(this.movedElement),this.xOffset=e.clientX-o.getBoundingClientRect().left,this.yOffset=e.clientY-o.getBoundingClientRect().top},deselect:function(){window.ProcessMaker.EventBus.$off("custom-pointerclick"),document.removeEventListener("mousemove",this.setDraggingPosition),this.movedElement&&document.body.removeChild(this.movedElement),this.$emit("onSetCursor","none"),this.wasClicked=!1,pg.commit("clearSelectedNode"),pg.commit("setGhostNode",null)}},computed:{selectedItem:function(){return pg.getters.getSelectedNode},movedElement:function(){return pg.getters.getGhostNode}}},Sg={name:"NodeTypesLoop",mixins:[Cg],data:function(){return{pinIcon:xg,pinFillIcon:kg,showPin:!1}},created:function(){pg.dispatch("getUserPinnedObjects")},methods:{nodeTypeAlreadyPinned:function(e,t){return!!this.pinnedObjects.find((function(e){return e.type===t}))},unPin:function(e){return this.deselect(),pg.dispatch("removeUserPinnedObject",e)},addPin:function(e){return this.deselect(),pg.dispatch("addUserPinnedObject",e)}},computed:{pinnedObjects:function(){return pg.getters.getPinnedNodeTypes},objects:function(){return pg.getters.getNodeTypes},unpinnedObjects:function(){var e=this,t=this.objects;return t.filter((function(t){return!e.pinnedObjects.some((function(e){return e.type===t.type}))}))},filteredNodes:function(){return pg.getters.getFilteredNodeTypes},searchTerm:function(){return pg.getters.getSearchTerm}}},Eg=Sg,Ag=(h(3410),qn(Eg,yg,wg,!1,null,null,null)),Mg=Ag.exports,Tg=function(){var e=this,t=e._self._c;return t("div",{attrs:{id:"pmBlockNodeTypesList"}},[e.filteredPmBlockNodes.length>0?t("div",{attrs:{id:"filteredPmBlockNodes-container"}},[e._l(e.filteredPmBlockNodes,(function(n){return[t("div",{key:n.id,staticClass:"node-types__item",on:{click:function(t){return t.stopPropagation(),e.onClickHandler(t,n)}}},[t("div",{staticClass:"d-flex"},[n.svgIcon?t("img",{staticClass:"node-types__item__icon",attrs:{src:n.svgIcon,alt:e.$t(n.label)}}):t("i",{staticClass:"node-types__item__icon",class:n.customIcon}),t("label",[e._v(e._s(e.$t(n.label)))])])])]}))],2):e._e(),0!==e.filteredPmBlockNodes.length||e.searchTerm?e._e():[t("div",{staticClass:"pmBlocksContainer p-2"},[e._l(e.pmBlockNodeTypes,(function(n){return[t("div",{key:n.id,staticClass:"pm-block-node-types__item p-2 d-block",on:{click:function(t){return t.stopPropagation(),e.onClickHandler(t,n)}}},[t("div",{staticClass:"d-flex"},[n.svgIcon?t("img",{staticClass:"node-types__item__icon",attrs:{src:n.svgIcon,alt:e.$t(n.label)}}):t("i",{staticClass:"node-types__item__icon",class:n.customIcon}),t("label",[e._v(e._s(e.$t(n.label)))])])])]}))],2)]],2)},_g=[],Pg={name:"PmBlocksLoop",mixins:[Cg],computed:{pmBlockNodeTypes:function(){return pg.getters.getPmBlockNodeTypes},filteredPmBlockNodes:function(){return pg.getters.getFilteredPmBlockNodeTypes},searchTerm:function(){return pg.getters.getSearchTerm}}},Og=Pg,Dg=(h(48649),qn(Og,Tg,_g,!1,null,null,null)),Ig=Dg.exports,Ng={name:"ExplorerRail",props:{explorerExpanded:{type:Boolean},nodeTypes:{type:Array},pmBlockNodes:{type:Array}},components:{FontAwesomeIcon:Zo.FontAwesomeIcon,FilterNodeTypes:bg,NodeTypesLoop:Mg,PmBlocksLoop:Ig},data:function(){return{tabs:[{idx:0,label:"Add Object"},{idx:1,label:"PM Blocks"}],tabIndex:0}},computed:{explorerOpen:function(){return pg.getters.getExplorerOpen}},created:function(){pg.commit("setNodeTypes",this.nodeTypes)},methods:{faTimes:function(){return Mr.faTimes},setTabIndex:function(e){this.tabIndex!==e&&(this.tabIndex=e,this.clearFilteredObjects())},closeRail:function(){pg.commit("closeExplorer"),this.clearFilteredObjects()},clearFilteredObjects:function(){pg.commit("clearFilteredNodes"),pg.commit("clearFilteredPmBlockNodes")}}},Rg=Ng,Bg=(h(14906),qn(Rg,cg,dg,!1,null,null,null)),Lg=Bg.exports,jg=h(82729),Fg=h.n(jg),zg=function(){var e=this,t=e._self._c;return t("button",{staticClass:"inspector-button",attrs:{type:"button","data-cy":"inspector-button"},on:{click:e.toggleInspector}},[t("inline-svg",{attrs:{src:e.inspectorIcon}})],1)},qg=[];const Hg={};function Vg(e){return Object.keys(e).reduce(((t,n)=>(!1!==e[n]&&null!==e[n]&&void 0!==e[n]&&(t[n]=e[n]),t)),{})}const Ug={name:"InlineSvg",inheritAttrs:!1,render(e){return this.svgElSource?e("svg",{on:this.$listeners,attrs:Object.assign(this.getSvgAttrs(this.svgElSource),Vg(this.$attrs)),domProps:{innerHTML:this.getSvgContent(this.svgElSource)}}):null},props:{src:{type:String,required:!0},title:{type:String},transformSource:{type:Function,default:e=>e},keepDuringLoading:{type:Boolean,default:!0}},data(){return{svgElSource:null}},watch:{src(e){this.getSource(e)}},mounted(){this.getSource(this.src)},methods:{getSvgAttrs(e){let t={};const n=e.attributes;if(!n)return t;for(let o=n.length-1;o>=0;o--)t[n[o].name]=n[o].value;return t},getSvgContent(e){return e=e.cloneNode(!0),e=this.transformSource(e),this.title&&Gg(e,this.title),e.innerHTML},getSource(e){Hg[e]||(Hg[e]=this.download(e)),this.svgElSource&&Hg[e].getIsPending()&&!this.keepDuringLoading&&(this.svgElSource=null,this.$emit("unloaded")),Hg[e].then((e=>{this.svgElSource=e,this.$nextTick((()=>{this.$emit("loaded",this.$el)}))})).catch((t=>{this.svgElSource&&(this.svgElSource=null,this.$emit("unloaded")),delete Hg[e],this.$emit("error",t)}))},download(e){return Wg(new Promise(((t,n)=>{const o=new XMLHttpRequest;o.open("GET",e,!0),o.onload=()=>{if(o.status>=200&&o.status<400)try{const e=new DOMParser,i=e.parseFromString(o.responseText,"text/xml");let r=i.getElementsByTagName("svg")[0];r?t(r):n(new Error('Loaded file is not valid SVG"'))}catch(e){n(e)}else n(new Error("Error loading SVG"))},o.onerror=n,o.send()})))}}};function Gg(e,t){const n=e.getElementsByTagName("title");if(n.length)n[0].textContent=t;else{const n=document.createElementNS("http://www.w3.org/2000/svg","title");n.textContent=t,e.insertBefore(n,e.firstChild)}}function Wg(e){if(e.getIsPending)return e;let t=!0,n=e.then((e=>(t=!1,e)),(e=>{throw t=!1,e}));return n.getIsPending=function(){return t},n}var $g={components:{InlineSvg:Ug},props:{showInspector:{type:Boolean,default:!0}},data:function(){return{inspectorIcon:h(28400)}},methods:{toggleInspector:function(){this.$emit("toggleInspector",!this.showInspector)}}},Xg=$g,Yg=(h(5728),qn(Xg,zg,qg,!1,null,"cebfb20a",null)),Zg=Yg.exports,Kg=function(){var e=this,t=e._self._c;return t("transition",{attrs:{name:"inspector"}},[t("b-col",{staticClass:"pl-0 h-100 overflow-hidden inspector-column",class:[{"ignore-pointer":e.canvasDragPosition}],attrs:{id:"inspector","data-test":"inspector-column"}},[t("b-card",{staticClass:"inspector-container border-top-0 border-bottom-0 border-right-0 rounded-0",style:{height:e.parentHeight},attrs:{"no-body":"","data-test":"inspector-container","data-cy":"inspector-panel"},scopedSlots:e._u([{key:"header",fn:function(){return[t("div",{staticClass:"inspector-header"},[t("div",{staticClass:"inspector-header-title"},[e._v(" "+e._s(e.$t("Configuration"))+" ")]),t("button",{staticClass:"close",attrs:{type:"button","aria-label":"Close","data-cy":"inspector-close-button"},on:{click:e.onClose}},[e._v(" × ")])])]},proxy:!0}])},[e.highlightedNode?t("vue-form-renderer",{key:e.highlightedNode._modelerId,ref:"formRenderer",staticClass:"overflow-auto h-100 inspector-font-size",attrs:{data:e.data,config:e.config},on:{update:e.updateDefinition},nativeOn:{focusout:function(t){return e.updateState.apply(null,arguments)}}}):e._e()],1)],1)],1)},Jg=[],Qg=h(43637),ev=h(21223),tv=(h(85780),h(50308)),nv=h.n(tv),ov={id:"processmaker-modeler-process",bpmnType:"bpmn:Process",control:!1,label:"Process",inspectorConfig:[{name:"Process Information",items:[{component:"FormAccordion",container:!0,config:{initiallyOpen:!0,label:"Properties",icon:"cog",name:"inspector-accordion-process"},items:[{component:"FormInput",config:ns},{component:"FormInput",config:{label:"Name",helper:"The Name of the Process",name:"name",placeholder:""}}]}]}]},iv=ov.id,rv=ov;vt().component("FormText",Qg.renderer.FormText),vt().component("FormInput",ev.FormInput),vt().component("FormSelect",ev.FormSelect),vt().component("FormTextArea",ev.FormTextArea),vt().component("FormCheckbox",ev.FormCheckbox),vt().component("FormRadioButtonGroup",ev.FormRadioButtonGroup),vt().component("FormAccordion",ev.FormAccordion),vt().component("FormDatePicker",ev.FormDatePicker),vt().component("FormMultiSelect",ev.FormMultiSelect);var sv={props:["nodeRegistry","moddle","processNode","parentHeight","canvasDragPosition","definitions"],data:function(){return{data:{},config:[],inspectorHandler:null,translated:[],isVisible:!0}},watch:{highlightedNode:function(){document.activeElement.blur(),this.prepareData(),this.prepareConfig()},"highlightedNode.definition.assignment":function(e,t){this.handleAssignmentChanges(e,t)},"highlightedNode.definition.assignmentLock":function(e,t){this.handleAssignmentChanges(e,t)},"highlightedNode.definition.allowReassignment":function(e,t){this.handleAssignmentChanges(e,t)},"highlightedNode.definition.assignedUsers":function(e,t){this.handleAssignmentChanges(e,t)},"highlightedNode.definition.assignedGroups":function(e,t){this.handleAssignmentChanges(e,t)},"highlightedNode.definition.assignmentRules":function(e,t){this.handleAssignmentChanges(e,t)}},computed:{highlightedNode:function(){return bn.getters.highlightedNodes[0]},isAnyNodeActive:function(){return this.highlightedNode},updateDefinition:function(){var e=this;if(!this.isAnyNodeActive)return nv();var t=this.defaultInspectorHandler;return this.isProcessNodeActive&&(t=this.processNodeInspectorHandler),this.hasCustomInspectorHandler&&(t=this.customInspectorHandler),function(n){if(n){if(sa()(n.documentation)&&x()(e.highlightedNode.definition.get("documentation")[0],"text")!==n.documentation){var o=n.documentation?[e.moddle.create("bpmn:Documentation",{text:n.documentation})]:void 0;e.setNodeProp(e.highlightedNode,"documentation",o)}t(Ma()(n,["documentation"]))}}},hasCustomInspectorHandler:function(){return this.nodeRegistry[this.highlightedNode.type].inspectorHandler},isProcessNodeActive:function(){return this.highlightedNode===this.processNode}},methods:{onClose:function(){this.$emit("toggleInspector",!1)},handleAssignmentChanges:function(e,t){e!==t&&this.prepareData()},prepareConfig:function(){if(!this.highlightedNode)return this.config={name:"Empty",items:[]};var e=this.highlightedNode,t=e.type,n=e.definition;if(this.highlightedNode===this.processNode)return this.config=rv.inspectorConfig;var o=No()(this.nodeRegistry[t].inspectorConfig),i=x()(o,"[0].items[0].items");if(this.isSequenceFlow(t)&&this.isConnectedToGateway(n)){var r=this.$t("Enter the expression that describes the workflow condition");r+=' <a href="https://docs.processmaker.com/designing-processes/expression-syntax-components" target="_blank"><i class="far fa-question-circle mr-1"></a>';var s={component:"FormInput",config:{label:this.$t("Expression"),helper:r,name:"conditionExpression"}},a=i.find((function(e){return e.config&&"Name"===e.config.label})),l=i.indexOf(a);a&&l>=0?i.splice(l+1,0,s):i.push(s)}return this.config=o},prepareData:function(){if(!this.highlightedNode)return{};var e=this.highlightedNode&&this.highlightedNode.type,t=function(e){return Object.entries(e.definition).reduce((function(e,t){var n=mt(t,2),o=n[0],i=n[1];return e[o]=i,e}),{})};this.data=e&&this.nodeRegistry[e].inspectorData?this.nodeRegistry[e].inspectorData(this.highlightedNode,t,this):t(this.highlightedNode)},isSequenceFlow:function(e){return e===Nl},isConnectedToGateway:function(e){return["bpmn:ExclusiveGateway","bpmn:InclusiveGateway"].includes(e.sourceRef.$type)},isConnectedToSubProcess:function(e){return"bpmn:CallActivity"===e.targetRef.$type},customInspectorHandler:function(e){return this.nodeRegistry[this.highlightedNode.type].inspectorHandler(e,this.highlightedNode,this.setNodeProp,this.moddle,this.definitions,this.defaultInspectorHandler)},processNodeInspectorHandler:function(e){return this.defaultInspectorHandler(Ma()(e,["artifacts","flowElements","laneSets"]))},setNodeProp:function(e,t,n){this.$emit("shape-resize"),bn.commit("updateNodeProp",{node:e,key:t,value:n})},defaultInspectorHandler:function(e){for(var t in Ma()(e,["$type","eventDefinitions"]))this.highlightedNode.definition.get(t)!==e[t]&&this.setNodeProp(this.highlightedNode,t,e[t])},updateState:function(){this.$emit("save-state")}}},av=sv,lv=(h(97896),qn(av,Kg,Jg,!1,null,"738023ac",null)),cv=lv.exports;vt().use(un);var dv=new un.Store({state:{stack:[],position:null,disabled:!1,isVersionsInstalled:!1,isDraft:!1,isLoading:!1},getters:{canUndo:function(e){return e.position>0},canRedo:function(e){return e.position<e.stack.length-1},currentState:function(e){return e.stack[e.position]},isVersionsInstalled:function(e){return e.isVersionsInstalled},isDraft:function(e){return e.isDraft},isLoading:function(e){return e.isLoading}},mutations:{setPosition:function(e,t){e.position=t},setState:function(e,t){e.stack=e.stack.slice(0,e.position+1),e.stack.push(t)},clearStack:function(e){e.stack=[e.stack[e.stack.length-1]]},disableSavingState:function(e){e.disabled=!0},enableSavingState:function(e){e.disabled=!1},isVersionsInstalled:function(e,t){e.isVersionsInstalled=t},isDraft:function(e,t){e.isDraft=t},isLoading:function(e,t){e.isLoading=t}},actions:{pushState:function(e,t){var n=e.state,o=e.getters,i=e.commit;t===o.currentState||n.disabled||(i("setState",t),i("setPosition",n.stack.length-1))},undo:function(e){var t=e.state,n=e.getters,o=e.commit;n.canUndo&&o("setPosition",t.position-1)},redo:function(e){var t=e.state,n=e.getters,o=e.commit;n.canRedo&&o("setPosition",t.position+1)},enableVersions:function(e){var t=e.commit;t("isVersionsInstalled",!0)},setVersionIndicator:function(e,t){var n=e.commit;n("isDraft",t)},setLoadingState:function(e,t){var n=e.commit;n("isLoading",t)}}}),uv=h(51540),pv=h(51248),hv=h.n(pv),fv=h(48909),mv=h.n(fv),gv=h(82317),vv=h.n(gv),bv=h(83184),yv=h.n(bv),wv=h(36111),xv=h.n(wv),kv=h(25795),Cv=h.n(kv),Sv=h(37554),Ev=h.n(Sv),Av=h(19869),Mv=h.n(Av),Tv=h(88687),_v=h.n(Tv),Pv=h(37028),Ov=h.n(Pv),Dv=h(89185),Iv=h.n(Dv),Nv=h(34652),Rv=h.n(Nv),Bv=h(49252),Lv=h.n(Bv),jv=h(93414),Fv=h.n(jv),zv=h(68522),qv=h.n(zv),Hv=h(7174),Vv=h.n(Hv),Uv=h(74815),Gv=h.n(Uv),Wv=h(24874),$v=h.n(Wv),Xv={};function Yv(){}Yv.prototype.resolveRule=function(e,t){const n=Xv[e+"/"+t];if(!n)throw new Error("cannot resolve rule <"+e+"/"+t+">");return n},Yv.prototype.resolveConfig=function(e,t){throw new Error("cannot resolve config <"+t+"> in <"+e+">")};var Zv=new Yv,Kv={"conditional-flows":"error","end-event-required":"error","event-sub-process-typed-start-event":"error","label-required":"error","no-complex-gateway":"error","no-disconnected":"error","no-gateway-join-fork":"error","no-implicit-split":"error","single-event-definition":"error","start-event-required":"error","sub-process-blank-start-event":"error","superfluous-gateway":"warning","processmaker/custom-validation":"error","processmaker/gateway-direction":"error","processmaker/event-based-gateway":"error","processmaker/call-activity-child-process":"error","processmaker/id-required":"error","processmaker/signal-ref-required":"error"},Jv={rules:Kv},Qv={resolver:Zv,config:Jv},eb=Qv;function tb(e,t,n,o,i,r,s){var a={allowDrop:!1,poolTarget:null};if(!sb(e,t,s))return a.allowDrop=!1,a;if(ib(n.type))return a.allowDrop=!0,a;if(ab(n.bpmnType)){var l=i.findModelsFromPoint(lb(e,t,o)).sort((function(e,t){return t.get("z")-e.get("z")}))[0];return a.allowDrop=er(n.type,l),a}if(rb(r))return a.allowDrop=!0,a;if(nb(n.bpmnType))return a.allowDrop=!0,a;var c=ob(e,t,o,i);return c&&(a.allowDrop=!0,a.poolTarget=c),a}function nb(e){return"bpmn:TextAnnotation"===e}function ob(e,t,n,o){return o.findModelsFromPoint(lb(e,t,n)).find((function(e){var t=e.component;return t&&t.node.type===bi}))}function ib(e){return e===bi}function rb(e){return!e||0===e.get("participants").length}function sb(e,t,n){var o=n.getBoundingClientRect(),i=o.left,r=o.top,s=o.width,l=o.height,c=new a.g.rect(i,r,s,l),d=new a.g.Point(e,t);return c.containsPoint(d)}function ab(e){return"bpmn:BoundaryEvent"===e}function lb(e,t,n){return n.clientToLocalPoint({x:e,y:t})}Xv["bpmnlint/conditional-flows"]=hv(),Xv["bpmnlint/end-event-required"]=mv(),Xv["bpmnlint/event-sub-process-typed-start-event"]=vv(),Xv["bpmnlint/label-required"]=yv(),Xv["bpmnlint/no-complex-gateway"]=xv(),Xv["bpmnlint/no-disconnected"]=Cv(),Xv["bpmnlint/no-gateway-join-fork"]=Ev(),Xv["bpmnlint/no-implicit-split"]=Mv(),Xv["bpmnlint/single-event-definition"]=_v(),Xv["bpmnlint/start-event-required"]=Ov(),Xv["bpmnlint/sub-process-blank-start-event"]=Iv(),Xv["bpmnlint/superfluous-gateway"]=Rv(),Xv["bpmnlint-plugin-processmaker/custom-validation"]=Lv(),Xv["bpmnlint-plugin-processmaker/gateway-direction"]=Fv(),Xv["bpmnlint-plugin-processmaker/event-based-gateway"]=qv(),Xv["bpmnlint-plugin-processmaker/call-activity-child-process"]=Vv(),Xv["bpmnlint-plugin-processmaker/id-required"]=Gv(),Xv["bpmnlint-plugin-processmaker/signal-ref-required"]=$v();var cb,db,ub,pb,hb,fb,mb,gb,vb,bb,yb,wb,xb=h(7407),kb=h.n(xb),Cb={extends:rg,mixins:[ya],data:function(){return{nodeIcon:kb()}}},Sb=Cb,Eb=qn(Sb,cb,db,!1,null,null,null),Ab=Eb.exports,Mb="processmaker-modeler-boundary-error-event",Tb=Ea()(No()(sg),{id:Mb,component:Ab,control:!1,label:"Boundary Error Event",icon:h(43634),definition:function(e,t){return e.create("bpmn:BoundaryEvent",{name:t("Boundary Error Event"),eventDefinitions:[e.create("bpmn:ErrorEventDefinition")]})},inspectorConfig:[{items:[{items:[{}]},ua,na]}]}),_b={extends:rg,mixins:[ya],data:function(){return{nodeIcon:Ep()}},mounted:function(){this.shape.attr({image:{"ref-x":4,"ref-y":4,width:18,height:18}})}},Pb=_b,Ob=qn(Pb,ub,pb,!1,null,null,null),Db=Ob.exports,Ib={component:"FormCheckbox",config:{label:"Interrupting",name:"cancelActivity",helper:"Select to interrupt the current Request workflow and route to the alternate workflow, thereby preventing parallel workflow"}},Nb=Ib,Rb="processmaker-modeler-boundary-conditional-event",Bb=Ea()(No()(sg),yo(yo({},Op),{},{id:Rb,component:Db,control:!1,label:"Boundary Conditional Event",definition:function(e,t){return e.create("bpmn:BoundaryEvent",{name:t("Boundary Conditional Event"),cancelActivity:!0,eventDefinitions:[e.create("bpmn:ConditionalEventDefinition",{condition:e.create("bpmn:FormalExpression",{body:""})})]})},inspectorConfig:[{items:[{items:[{}].concat(m(Pp()),[Nb])},na,ua]}]})),Lb=h.p+"img/boundary-escalation-icon.c999a95e.svg",jb={extends:rg,mounted:function(){this.shape.attr("image/xlink:href",Lb)},methods:{isValidBoundaryEventTarget:function(e){return tr(e.component)}}},Fb=jb,zb=qn(Fb,hb,fb,!1,null,null,null),qb=zb.exports,Hb="processmaker-modeler-boundary-escalation-event",Vb=Ea()(No()(sg),{id:Hb,component:qb,control:!1,label:"Boundary Escalation Event",icon:h(62442),definition:function(e,t){return e.create("bpmn:BoundaryEvent",{name:t("Boundary Escalation Event"),cancelActivity:!0,eventDefinitions:[e.create("bpmn:EscalationEventDefinition")]})},inspectorConfig:[{items:[{items:[{},Nb]},ua,na]}]}),Ub=h(81146),Gb=h.n(Ub),Wb={extends:rg,mixins:[ya],data:function(){return{nodeIcon:Gb()}},methods:{isValidBoundaryEventTarget:function(e){var t=e.component;return t&&t.node.isBpmnType("bpmn:CallActivity")}},mounted:function(){var e=Iu();this.shape.attr(e)}},$b=Wb,Xb=qn($b,mb,gb,!1,null,null,null),Yb=Xb.exports,Zb="processmaker-modeler-boundary-message-event",Kb=Ea()(No()(sg),yo(yo({},sc),{},{id:Zb,component:Yb,control:!1,label:"Boundary Message Event",icon:h(52018),definition:function(e,t){return e.create("bpmn:BoundaryEvent",{name:t("Boundary Message Event"),cancelActivity:!0,eventDefinitions:[e.create("bpmn:MessageEventDefinition")]})},inspectorConfig:[{items:[{items:[{},Nb,oc("Message that will trigger this boundary event")]},ua,na]}]})),Jb=h(16221),Qb=h.n(Jb),ey={extends:rg,mixins:[ya],data:function(){return{nodeIcon:Qb()}},mounted:function(){var e=this.node.diagram.bounds;this.shape.resize(e.get("width"),e.get("height")),this.shape.attr({image:{"ref-x":3,"ref-y":1,width:e.get("width")-15,height:e.get("height")-15}})}},ty=ey,ny=qn(ty,vb,bb,!1,null,null,null),oy=ny.exports,iy="processmaker-modeler-boundary-signal-event",ry=Ea()(No()(sg),yo(yo({},kc),{},{id:iy,component:oy,control:!1,label:"Boundary Signal Event",icon:h(34070),definition:function(e,t){return e.create("bpmn:BoundaryEvent",{name:t("Boundary Signal Event"),cancelActivity:!0,eventDefinitions:[e.create("bpmn:SignalEventDefinition")]})},inspectorConfig:[{items:[{items:[{},Nb,xc("Signal that will trigger this boundary event")]},ua,na]}]})),sy=h(50889),ay=h.n(sy),ly={extends:rg,mixins:[ya],data:function(){return{nodeIcon:ay()}},methods:{addTimerEventDefinitionId:function(){var e="".concat(this.id,"_timer_event_definition");this.node.definition.get("eventDefinitions")[0].id=e}},mounted:function(){this.addTimerEventDefinitionId()}},cy=ly,dy=qn(cy,yb,wb,!1,null,null,null),uy=dy.exports,py="processmaker-modeler-boundary-timer-event",hy=Ea()(No()(sg),{id:py,component:uy,control:!1,label:"Boundary Timer Event",icon:h(99400),definition:function(e,t){return e.create("bpmn:BoundaryEvent",{name:t("Boundary Timer Event"),cancelActivity:!0,eventDefinitions:[e.create("bpmn:TimerEventDefinition",{timeDuration:e.create("bpmn:Expression",{body:Eu})})]})},inspectorData:function(e){return Object.entries(e.definition).reduce((function(e,t){var n=mt(t,2),o=n[0],i=n[1];if("eventDefinitions"===o){var r=Object.keys(i[0])[1],s=i[0][r].body;e[o]={type:r,body:s}}else e[o]=i;return e}),{})},inspectorHandler:function(e,t,n,o){var i=t.definition;for(var r in e)if(i[r]!==e[r])if("eventDefinitions"===r){var s=e[r],a=s.type,l=s.body,c=i.get(r)[0][a];if(c&&c.body===l)continue;var d=_e({},a,o.create("bpmn:Expression",{body:l})),u=[o.create("bpmn:TimerEventDefinition",d)];u[0].id=t.definition.get("eventDefinitions")[0].id,n(t,"eventDefinitions",u)}else n(t,r,e[r])},inspectorConfig:[{items:[{items:[{},Nb]},{component:"FormAccordion",container:!0,config:{label:"Timing Control",icon:"clock",name:"inspector-accordion-boundary-timer-event"},items:[{component:Pu,config:{label:"Name",helper:"Time expression",name:"eventDefinitions"}}]},na,ua]}]});function fy(e,t,n){var o=Mh(e,t,"set");return Dh(e,o,n),n}var my=new WeakMap,gy=function(){function e(t){wo(this,e),Eh(this,my,{writable:!0,value:void 0}),_e(this,"preventTranslate",!1),fy(this,my,t)}return ko(e,[{key:"paper",get:function(){return Th(this,my)}},{key:"scale",get:function(){return Th(this,my).scale()},set:function(e){Th(this,my).scale(e),Th(this,my).trigger("scale:changed")}},{key:"roundToNearestGridMultiple",value:function(t){return Math.round(t/e.gridSize)*e.gridSize}},{key:"ceilToNearestGridMultiple",value:function(t){return Math.ceil(t/e.gridSize)*e.gridSize}},{key:"translate",value:function(e,t){this.preventTranslate||(Th(this,my).translate(e,t),Th(this,my).trigger("translate:changed"))}},{key:"addEventHandler",value:function(e,t,n){Th(this,my).on(e,t,n)}},{key:"addOnceHandler",value:function(e,t){Th(this,my).once(e,t)}},{key:"removeEventHandler",value:function(e,t,n){Th(this,my).off(e,t,n)}},{key:"setPaperDimensions",value:function(e,t){Th(this,my).setDimensions(e,t)}},{key:"performAtomicAction",value:function(){var e=y(v().mark((function e(t){return v().wrap((function(e){while(1)switch(e.prev=e.next){case 0:return Th(this,my).freeze(),e.next=3,t(Th(this,my));case 3:Th(this,my).unfreeze();case 4:case"end":return e.stop()}}),e,this)})));function t(t){return e.apply(this,arguments)}return t}()},{key:"clientToGridPoint",value:function(e,t){var n=Th(this,my).localToPagePoint(0,0),o=this.scale;return{x:this.roundToNearestGridMultiple((e-n.x)/o.sx),y:this.roundToNearestGridMultiple((t-n.y)/o.sy)}}},{key:"setStateInvalid",value:function(){this.paper.drawBackground({color:fe})}},{key:"setStateValid",value:function(){this.paper.drawBackground({color:me})}},{key:"awaitScheduledUpdates",value:function(){var e=this;return Th(this,my)._updates.priorities.some((function(e){return!a.util.isEmpty(e)}))?new Promise((function(t){e.addOnceHandler("render:done",t)})):Promise.resolve()}}],[{key:"factory",value:function(t,n,o){var i=3,r=new a.dia.Paper({async:!0,el:t,model:o,sorting:"sorting-approximate",gridSize:e.gridSize,drawGrid:!0,snapLinks:!1,snapElements:!1,clickThreshold:10,perpendicularLinks:!0,interactive:n,highlighting:{default:{options:{padding:i}}}});return r.translate(168,20),new this(r)}}]),e}();function vy(e,t,n){var o=wy(e,t,n);yy(o,t),e.inspectorConfig[0].items.sort(by)}function by(e,t){return xy(e)?1:xy(t)?-1:0}function yy(e,t){var n=e.findIndex((function(e){var n=!t.container&&t.config&&e.config&&t.config.name&&t.config.name===e.config.name;return t.id&&t.id===e.id||n}));-1!==n?e[n]=t:e.push(t)}function wy(e,t,n){return"undefined"!==typeof t.container?e.inspectorConfig[0].items:n?(e=e.inspectorConfig[0],n.split(".").forEach((function(t){e=e&&e.items.find((function(e){return e.config&&e.config.name===t}))})),e?e.items:null):e.inspectorConfig[0].items[0].items}function xy(e){return e.config&&"Advanced"===e.config.label}function ky(e,t){Ty(e)&&Sy(e);var n=My(e);n&&Sy(n),Cy(e)&&!Ty(e)&&Ey(e),Ay(t)}function Cy(e){return e.component.node.type!==Tl}function Sy(e){Ey(e);var t=e.component.node.definition.processRef&&e.component.node.definition.processRef.laneSets[0];if(t){var n=e.getEmbeddedCells().filter((function(e){return e.component&&e.component.node.type===Tl})),o=e.getEmbeddedCells().filter((function(e){return e.component&&e.component.node.type!==Tl}));n.forEach(Ey),o.forEach(Ey)}}function Ey(e){e.toFront({deep:!0})}function Ay(e){e.getLinks().forEach(Ey)}function My(e){return e.component.node.pool}function Ty(e){return e.component.node.type===bi}_e(gy,"gridSize",zp);var _y=function(){var e=this,t=e._self._c;return t("b-row",{staticClass:"w-100 m-0"},[t("div",{staticClass:"toolbar d-flex justify-content-between align-items-center border-top border-bottom",class:{"ignore-pointer":e.canvasDragPosition},attrs:{role:"toolbar","aria-label":"Toolbar"}},[t("breadcrumb",{attrs:{"breadcrumb-data":e.breadcrumbData}}),t("div",{staticClass:"d-flex mr-3"},[t("TopRail",{attrs:{"validation-errors":e.validationErrors,warnings:e.warnings}},e._l(e.validationBar,(function(e,n){return t(e.button,{key:"validation-status-".concat(n),tag:"component"})})),1),t("div",{staticClass:"d-flex align-items-center btn-group btn-group-sm",attrs:{role:"group","aria-label":"Publish controls","data-cy":"publish-control"}},[t("div",{staticClass:"divider"}),e.isVersionsInstalled?[t("div",{staticClass:"toolbar-item toolbar-version-status",attrs:{"data-cy":"publish-version-status"}},[e._v(" "+e._s(e.versionStatus)+" ")]),t("div",{staticClass:"toolbar-item toolbar-loading-status",attrs:{"data-cy":"publish-loading-status"}},[t("span",[e._v(" "+e._s(e.loadingStatus)+" ")]),t("font-awesome-icon",{staticClass:"text-success",attrs:{icon:e.loadingIcon,spin:e.isLoading}})],1),t("a",{staticClass:"toolbar-item toolbar-publish",attrs:{title:e.$t("Publish"),"data-cy":"publish-btn"},on:{click:function(t){return e.$emit("saveBpmn")}}},[e._v(" "+e._s(e.$t("Publish"))+" ")]),t("a",{staticClass:"toolbar-item toolbar-close",attrs:{title:e.$t("Close"),"data-cy":"close-btn"},on:{click:function(t){return e.$emit("close")}}},[e._v(" "+e._s(e.$t("Close"))+" ")]),t("EllipsisMenu",{attrs:{actions:e.ellipsisMenuActions,divider:!1,"data-cy":"ellipsis-menu"},on:{navigate:e.onNavigate,show:e.onShow,hide:e.onHide}})]:[t("button",{directives:[{name:"b-tooltip",rawName:"v-b-tooltip.hover",modifiers:{hover:!0}}],staticClass:"save-button",attrs:{"data-test":"mini-map-btn",title:e.$t("Save")},on:{click:function(t){return e.$emit("saveBpmn")}}},[t("font-awesome-icon",{attrs:{icon:e.saveIcon}}),t("span",{staticClass:"save-button-label"},[e._v(e._s(e.$t("Save")))])],1),t("b-btn",{staticClass:"ml-1 rounded",attrs:{disabled:!e.xmlManager,variant:"secondary",size:"sm","data-test":"downloadXMLBtn"},on:{click:function(t){e.xmlManager&&e.xmlManager.download()}}},[t("i",{staticClass:"fas fa-download mr-1"}),e._v(" "+e._s(e.$t("Download BPMN"))+" ")]),t("b-btn",{directives:[{name:"b-modal",rawName:"v-b-modal",value:"uploadmodal",expression:"'uploadmodal'"}],staticClass:"ml-1 rounded",attrs:{variant:"secondary",size:"sm"}},[t("i",{staticClass:"fas fa-upload mr-1"}),e._v(" "+e._s(e.$t("Upload XML"))+" ")])]],2)],1)],1)])},Py=[],Oy=function(){var e=this,t=e._self._c;return t("nav",{attrs:{id:"breadcrumbs"}},[e.breadcrumbData.length>0?t("ol",{staticClass:"breadcrumb"},[e._m(0),e._l(e.breadcrumbData[0],(function(n,o){return t("li",{key:o,staticClass:"breadcrumb-item"},[n.url?t("a",{attrs:{href:n.url}},[e._v(e._s(n.text))]):e._e(),n.url?e._e():t("span",[e._v(e._s(n.text))])])}))],2):e._e()])},Dy=[function(){var e=this,t=e._self._c;return t("li",{staticClass:"breadcrumb-item"},[t("a",{attrs:{href:"/"}},[t("i",{staticClass:"fas fa-home"})])])}],Iy={name:"breadcrumb",props:{breadcrumbData:{type:Array,default:function(){return[]}}}},Ny=Iy,Ry=(h(61573),qn(Ny,Oy,Dy,!1,null,"d1e148b4",null)),By=Ry.exports,Ly=function(){var e=this,t=e._self._c;return t("div",{staticClass:"top-rail-container"},[t("ValidateIssue",{directives:[{name:"show",rawName:"v-show",value:e.isOpenIssue,expression:"isOpenIssue"}],attrs:{"number-of-errors":e.numberOfErrors},on:{openPanel:e.handleOpenPanel}}),t("ValidateButton",{on:{openIssue:e.handleOpenIssue}}),t("ValidatePanel",{directives:[{name:"show",rawName:"v-show",value:e.isOpenIssue&&e.isOpenPanel,expression:"isOpenIssue && isOpenPanel"}],attrs:{"error-list":e.errorList,warnings:e.warnings}}),e._t("default")],2)},jy=[],Fy=function(){var e=this,t=e._self._c;return t("button",{directives:[{name:"b-tooltip",rawName:"v-b-tooltip.hover.viewport.d50",value:{customClass:"no-pointer-events"},expression:"{ customClass: 'no-pointer-events' }",modifiers:{hover:!0,viewport:!0,d50:!0}}],class:["validate-button",{"validate-button-active":e.isOpen}],attrs:{type:"button",title:e.$t("Auto validate"),"data-cy":"validate-button"},on:{click:function(t){return t.preventDefault(),e.handleOpen.apply(null,arguments)}}},[t("inline-svg",{attrs:{src:e.isOpen?e.validateOpenIcon:e.validateCloseIcon}})],1)},zy=[],qy={components:{InlineSvg:Ug},data:function(){return{isOpen:!1,validateCloseIcon:h(13828),validateOpenIcon:h(78540)}},methods:{handleOpen:function(){this.isOpen=!this.isOpen,this.$emit("openIssue",this.isOpen)}},mounted:function(){var e=this;window.ProcessMaker.EventBus.$on("save-changes-activate-autovalidate",(function(){e.handleOpen()}))}},Hy=qy,Vy=(h(70947),qn(Hy,Fy,zy,!1,null,"5880bbc6",null)),Uy=Vy.exports,Gy=function(){var e=this,t=e._self._c;return t("button",{staticClass:"issue-box",attrs:{type:"button",disabled:0===e.numberOfErrors,"data-cy":"validate-issue-button"},on:{click:function(t){return t.preventDefault(),e.handleOpen.apply(null,arguments)}}},[t("span",{staticClass:"issue-title"},[e._v("Issues")]),t("span",{staticClass:"issue-badge"},[e._v(e._s(e.numberOfErrors))]),t("span",{staticClass:"issue-icon"},[t("inline-svg",{attrs:{src:e.isOpen?e.issueOpenIcon:e.issueCloseIcon}})],1)])},Wy=[],$y={components:{InlineSvg:Ug},props:{numberOfErrors:{type:Number,required:!0}},data:function(){return{isOpen:!1,issueCloseIcon:h(61339),issueOpenIcon:h(68058)}},watch:{numberOfErrors:function(e){0===e&&(this.isOpen=!1)}},methods:{handleOpen:function(){this.isOpen=!this.isOpen,this.$emit("openPanel",this.isOpen)}}},Xy=$y,Yy=(h(59724),qn(Xy,Gy,Wy,!1,null,"337583fe",null)),Zy=Yy.exports,Ky=function(){var e=this,t=e._self._c;return t("div",{staticClass:"validate-container",attrs:{"data-cy":"validate-panel"}},[e._l(e.errorList,(function(n,o){return t("div",{key:"".concat(n.errorId,"_").concat(o),staticClass:"validate-item-box"},[t("vue-inline-svg",{attrs:{src:e.issueIcon}}),t("div",{staticClass:"validate-item-info"},[t("div",{staticClass:"validate-item-title"},[e._v(e._s(n.errorKey))]),t("div",{staticClass:"validate-item-description"},[e._v(e._s(n.message)+".")]),n.id?t("div",{staticClass:"validate-item-node"},[t("span",{staticClass:"validate-item-node-title"},[e._v(e._s(e.$t("Node ID"))+":")]),e._v(" "+e._s(n.id)+" ")]):e._e()])],1)})),e._l(e.warnings,(function(n,o){return t("div",{key:n.title+o,staticClass:"validate-item-box"},[t("vue-inline-svg",{attrs:{src:e.issueIcon}}),t("div",{staticClass:"validate-item-info"},[t("div",{staticClass:"validate-item-title"},[e._v(e._s(n.title))]),t("div",{staticClass:"validate-item-description"},[e._v(e._s(n.text)+".")])])],1)}))],2)},Jy=[],Qy={components:{VueInlineSvg:Ug},props:{errorList:{type:Array,required:!0},warnings:{type:Array,required:!0}},data:function(){return{issueIcon:h(4298)}}},ew=Qy,tw=(h(95254),qn(ew,Ky,Jy,!1,null,"0722e36d",null)),nw=tw.exports,ow={components:{ValidateButton:Uy,ValidateIssue:Zy,ValidatePanel:nw},props:{validationErrors:{type:Object,required:!0},warnings:{type:Array,required:!0}},data:function(){return{isOpenIssue:!1,isOpenPanel:!1}},computed:{errorList:function(){return Object.entries(this.validationErrors).flatMap((function(e){var t=mt(e,2),n=t[0],o=t[1];return o.flatMap((function(e){return yo(yo({},e),{},{errorKey:n},{errorId:"".concat(e.id,"_").concat(e.message.split(" ").join("_"))})}))}))},numberOfErrors:function(){return this.errorList.length+this.warnings.length}},watch:{numberOfErrors:function(e){0===e&&(this.isOpenPanel=!1)}},methods:{handleOpenIssue:function(e){this.isOpenIssue=e,bn.commit("setAutoValidate",this.isOpenIssue)},handleOpenPanel:function(e){this.isOpenPanel=e}}},iw=ow,rw=(h(16254),qn(iw,Ly,jy,!1,null,"78331cf6",null)),sw=rw.exports,aw={name:"tool-bar",components:{Breadcrumb:By,TopRail:sw,FontAwesomeIcon:Zo.FontAwesomeIcon},props:["canvasDragPosition","cursor","paperManager","isRendering","breadcrumbData","panelsCompressed","validationErrors","warnings","xmlManager","validationBar"],watch:{miniMapOpen:function(e){this.$emit("toggle-mini-map-open",e)},canUndo:function(e){e||this.$root.$emit("bv::hide::tooltip")},canRedo:function(e){e||this.$root.$emit("bv::hide::tooltip")}},computed:{canUndo:function(){return dv.getters.canUndo},canRedo:function(){return dv.getters.canRedo},versionStatus:function(){var e=dv.getters.isDraft?"Draft":"Published";return this.$t(e)},isVersionsInstalled:function(){return dv.getters.isVersionsInstalled},isLoading:function(){return dv.getters.isLoading},loadingStatus:function(){var e=this.isLoading?"Saving":"Saved";return this.$t(e)},loadingIcon:function(){return this.isLoading?this.spinner:this.savedIcon}},data:function(){return{plusIcon:Mr.faPlus,minusIcon:Mr.faMinus,scale:1,initialScale:1,minimumScale:.2,scaleStep:.1,mapIcon:Mr.faMapMarked,miniMapOpen:!1,compressIcon:Mr.faCompress,expandIcon:Mr.faExpand,undoIcon:Mr.faUndo,redoIcon:Mr.faRedo,saveIcon:Mr.faSave,savedIcon:Mr.faCheckCircle,spinner:Mr.faSpinner,ellipsisMenuActions:[{value:"save-template",content:this.$t("Save as Template"),icon:""},{value:"save-pm-block",content:this.$t("Save as PM Block"),icon:""},{value:"discard-draft",content:this.$t("Discard Draft"),icon:""}]}},methods:{undo:function(){var e=this;this.$emit("clearSelection"),this.isRendering||dv.dispatch("undo").then((function(){return e.$emit("load-xml")}))},redo:function(){var e=this;this.$emit("clearSelection"),this.isRendering||dv.dispatch("redo").then((function(){return e.$emit("load-xml")}))},onNavigate:function(e){switch(e.value){case"discard-draft":window.ProcessMaker.EventBus.$emit("open-versions-discard-modal");break;case"save-template":this.$emit("publishTemplate");break;case"save-pm-block":this.$emit("publishPmBlock");break;default:break}},onShow:function(){var e=document.getElementById("inspector");e&&(e.style.zIndex="1")},onHide:function(){var e=document.getElementById("inspector");e&&(e.style.zIndex="2")}},mounted:function(){var e,t=null===(e=this.$root.$children[0])||void 0===e?void 0:e.process,n=this.ellipsisMenuActions.findIndex((function(e){return"save-template"===e.value}));null!==t&&void 0!==t&&t.is_template&&this.ellipsisMenuActions.splice(n,1),"PM_BLOCK"===(null===t||void 0===t?void 0:t.asset_type)&&this.ellipsisMenuActions.splice(n,2)}},lw=aw,cw=(h(91503),qn(lw,_y,Py,!1,null,null,null)),dw=cw.exports;function uw(e,t){var n=function(e){return e.isBpmnType("bpmn:MessageFlow",$n,Kn)||e.isType("processmaker-modeler-pool")};if(!n(e))if(e.isType("processmaker-modeler-lane"))t.get("laneSets")[0].get("lanes").push(e.definition);else{var o="flowElements";(e.isBpmnType("bpmn:TextAnnotation")||e.isBpmnType("bpmn:Association"))&&(o="artifacts"),t.get(o).push(e.definition)}}var pw={methods:{zoomInOutHandler:function(e,t){var n="+"===e.key||"NumpadAdd"===e.key||107===e.keyCode||187===e.keyCode,o="-"===e.key||"NumpadSubtract"===e.key||109===e.keyCode||189===e.keyCode;n&&t.mod&&this.zoomIn(e),o&&t.mod&&this.zoomOut(e)},zoomIn:function(e){e.preventDefault(),this.canvasScale=this.paperManager.scale.sx+this.scaleStep},zoomOut:function(e){e.preventDefault(),this.canvasScale=Math.max(this.minimumScale,this.paperManager.scale.sx-=this.scaleStep)}}},hw={methods:{copyPasteHandler:function(e,t){var n=e.target.nodeName.toLowerCase(),o="body"===n,i=e.key.toLowerCase(),r="c"===i,s="v"===i;o&&r&&t.mod&&this.copy(e),o&&s&&t.mod&&this.paste(e)},copy:function(e){e.preventDefault(),window.ProcessMaker.$modeler.copyElement()},paste:function(e){e.preventDefault(),window.ProcessMaker.$modeler.pasteElements()}}},fw=(h(51532),gy.gridSize/2),mw=new Map;mw.set("Up",[0,-fw]),mw.set("Down",[0,fw]),mw.set("Left",[-fw,0]),mw.set("Right",[fw,0]);var gw=["PoolLane","processmaker.components.nodes.boundaryEvent.Shape"];function vw(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:function(){};if(bw(e)){var o=t.filter(yw);if(0!==o.length){var i=ww(e),r=mt(i,2),s=r[0],a=r[1];o.forEach((function(e){e.translate(s,a,{movedWithArrowKeys:!0}),kw(e)})),n()}}}function bw(e){var t=["up","down","left","right"];return t.some((function(t){return e.toLowerCase().includes(t)}))}function yw(e){return e&&!gw.includes(e.get("type"))}function ww(e){var t=e.match(/^(?:Arrow)?(Up|Down|Left|Right)$/);return null!==t?mw.get(t[1]):[0,0]}function xw(e){return!e||"processmaker.modeler.bpmn.pool"!==e.get("type")}function kw(e){var t=e.getParentCell();xw(t)||(t.component.expandToFitElement(e,t),t.component.laneSet&&t.component.updateLaneChildren())}var Cw={methods:{escapeKeyHandler:function(e){this.selectedNode&&(e.preventDefault(),window.ProcessMaker.EventBus.$emit("custom-pointerclick",e))}},computed:{selectedNode:function(){return pg.getters.getSelectedNode},movedElement:function(){return pg.getters.getGhostNode}}},Sw={mixins:[pw,hw,Cw],computed:{clientLeftPaper:function(){return bn.getters.clientLeftPaper}},mounted:function(){document.addEventListener("keydown",this.keydownListener),document.addEventListener("keyup",this.keyupListener)},methods:{handleHotkeys:function(e,t){this.zoomInOutHandler(e,t),this.copyPasteHandler(e,t),this.escapeKeyHandler(e)},keyupListener:function(e){"Space"===e.code&&(this.isGrabbing=!1,this.paperManager.removeEventHandler("blank:pointermove"))},keydownListener:function(e){var t=this,n=this.isAppleOS(),o=n?e.metaKey:e.ctrlKey,i={mod:o,isAppleOS:n,modeler:this};try{this.handleHotkeys(e,i)}catch(fa){console.error(fa)}var r=!e.target.toString().toLowerCase().includes("body");r||("Space"===e.code&&(this.isGrabbing=!0,this.paperManager.addEventHandler("blank:pointermove",(function(e,n,o){if(!t.canvasDragPosition){var i=t.paperManager.scale;t.canvasDragPosition={x:n*i.sx,y:o*i.sy}}t.canvasDragPosition&&!t.clientLeftPaper&&t.paperManager.translate(e.offsetX-t.canvasDragPosition.x,e.offsetY-t.canvasDragPosition.y)}))),vw(e.key,bn.getters.highlightedShapes,this.pushToUndoStack))}}};h(74819);function Ew(e,t){while(!Object.prototype.hasOwnProperty.call(e,t))if(e=hi(e),null===e)break;return e}function Aw(){return Aw="undefined"!==typeof Reflect&&Reflect.get?Reflect.get.bind():function(e,t,n){var o=Ew(e,t);if(o){var i=Object.getOwnPropertyDescriptor(o,t);return i.get?i.get.call(arguments.length<3?e:n):i.value}},Aw.apply(this,arguments)}var Mw,Tw=function(e){pi(n,e);var t=vi(n);function n(){return wo(this,n),t.apply(this,arguments)}return ko(n,[{key:"clone",value:function(e,t,o){return this.withTimerKeys(Aw(hi(n.prototype),"clone",this).call(this,e,t,o))}},{key:"withTimerKeys",value:function(e){var t=this,o=n.timerPropertyKeys.find((function(e){return t.definition.eventDefinitions[0][e]}));return e.definition.eventDefinitions[0][o]||(e.definition.eventDefinitions[0][o]={}),e.definition.eventDefinitions[0][o].body=this.definition.eventDefinitions[0][o].body,e}}]),n}(Ro);function _w(e){return Pw.apply(this,arguments)}function Pw(){return Pw=y(v().mark((function e(t){var n,o,i;return v().wrap((function(e){while(1)switch(e.prev=e.next){case 0:if(n=Ow(t),o=document.querySelector('[name="name"]')||document.querySelector('[name="text"]'),n&&o&&document.activeElement!==o){e.next=4;break}return e.abrupt("return");case 4:if(i=document.getElementById("accordion-button-Configuration"),!i||"false"!==i.getAttribute("aria-expanded")){e.next=10;break}return clearTimeout(Mw),i.click(),e.next=10,Dw();case 10:n.style.outline="1px dashed blue",o.addEventListener("blur",(function(){n.style.outline=""})),o.focus(),o.select();case 14:case"end":return e.stop()}}),e)}))),Pw.apply(this,arguments)}function Ow(e){if(e.selectors)return e.selectors.label||Array.from(e.selectors.root.children).find((function(e){return e.classList.contains("labels")}))}function Dw(){return new Promise((function(e){Mw=setTimeout(e)}))}_e(Tw,"timerPropertyKeys",["timeDuration","timeDate","timeCycle"]);var Iw=h(93162),Nw=h.n(Iw),Rw=new WeakMap,Bw=new WeakMap,Lw=function(){function e(t){wo(this,e),Eh(this,Rw,{writable:!0,value:void 0}),Eh(this,Bw,{writable:!0,value:void 0}),fy(this,Rw,t)}return ko(e,[{key:"definitions",set:function(e){fy(this,Bw,e)}},{key:"getDefinitionsFromXml",value:function(e){var t=this;return new Promise((function(n,o){Th(t,Rw).fromXML(e,(function(e,i){e&&o(e),i.exporter="ProcessMaker Modeler",i.exporterVersion="1.0",t.cleanBrokenReferences(i),n(i)}))}))}},{key:"cleanBrokenReferences",value:function(e){var t=e.rootElements,n=e.diagrams,o=[];t.forEach((function(t){"bpmn:Process"===t.$type&&t.flowElements&&(t.flowElements=t.flowElements.filter((function(e){return"bpmn:SequenceFlow"!==e.$type||(e.sourceRef&&e.targetRef||o.push(e),e.sourceRef&&e.targetRef)}))),"bpmn:Process"===t.$type&&t.laneSets&&t.laneSets.forEach((function(t){t.lanes=t.lanes.filter((function(t){if(!e.diagrams)return!1;var n=e.diagrams.find((function(e){return e.plane.planeElement.find((function(e){return e&&e.bpmnElement.id===t.id}))}));return n}))}))})),n.forEach((function(e){"bpmndi:BPMNDiagram"===e.$type&&e.plane&&e.plane.planeElement&&(e.plane.planeElement=e.plane.planeElement.filter((function(e){return"bpmndi:BPMNEdge"!==e.$type||e.bpmnElement&&!o.includes(e.bpmnElement)})))}))}},{key:"download",value:function(){Th(this,Bw)&&Th(this,Rw).toXML(Th(this,Bw),{format:!0},(function(e,t){if(e)alert(e);else{if(Wr())return void(window.xml=t);var n=new File([t],"bpmnProcess.xml",{type:"text/xml"});Nw().saveAs(n)}}))}}]),e}();function jw(e){return e.isStartEvent()?So:e.isTask()?To:e.isGateway()?Po:e.isIntermediateEvent()?Do:e.isEndEvent()?Ao:null}function Fw(e){if(!e)return!1;var t=jw(e);return!t||!Object.values(t).includes(e.definition.name)}function zw(e,t){return t.reduce((function(e,t){return e.concat(t.get("artifacts"))}),[]).filter((function(e){return"bpmn:Association"===e.$type})).filter((function(t){return t.targetRef===e.definition}))}function qw(e,t){var n=Object.values(e).flatMap((function(e){return e.map((function(e){return t.find((function(t){return t.id===e.id}))}))})),o=t.filter((function(e){return!e.id}));return[].concat(m(n),m(o))}var Hw=function(){function e(t,n,o,i,r,s){wo(this,e),this._nodeThatWillBeReplaced=t,this._definition=n,this._graph=o,this._newNode=i,this._processes=r,this._collaboration=s}return ko(e,[{key:"migrate",value:function(){var e,t,n=this;Fw(this._nodeThatWillBeReplaced)&&(this._definition.name=this._nodeThatWillBeReplaced.definition.name);var o=function(e){var t=n._graph.getLinks().find((function(t){return t.component&&t.component.node.definition===e}));t.component.node._modelerId+="_replaced"},i=this._nodeThatWillBeReplaced.definition.get("incoming"),r=this._nodeThatWillBeReplaced.definition.get("outgoing");(e=this._definition.get("incoming")).push.apply(e,m(i)),(t=this._definition.get("outgoing")).push.apply(t,m(r)),r.forEach((function(e){e.set("sourceRef",n._newNode.definition),n._handleSequenceFlowForGateway(e),o(e)})),i.forEach((function(e){e.set("targetRef",n._newNode.definition),n._handleSequenceFlowForGateway(e),o(e)}));var s=zw(this._nodeThatWillBeReplaced,this._processes);if(s.forEach((function(e){e.set("targetRef",n._newNode.definition),o(e)})),this._collaboration){var a=this._collaboration.get("messageFlows");a.filter((function(e){return e.sourceRef===n._nodeThatWillBeReplaced.definition})).forEach((function(e){e.set("sourceRef",n._newNode.definition),o(e)})),a.filter((function(e){return e.targetRef===n._nodeThatWillBeReplaced.definition})).forEach((function(e){e.set("targetRef",n._newNode.definition),o(e)}))}}},{key:"_handleSequenceFlowForGateway",value:function(e){var t=["bpmn:ExclusiveGateway","bpmn:InclusiveGateway"].includes(e.sourceRef.$type);t||delete e.conditionExpression}}]),e}(),Vw=["bpmn:ServiceTask","bpmn:ManualTask","bpmn:CallActivity","bpmn:ScriptTask"],Uw=function(e){if(-1!==Vw.indexOf(e.bpmnType)){e.inspectorConfig[0].items.splice(e.loopInspectorIndex||1,0,Wh);var t=e.inspectorHandler||function(){},n=e.inspectorData||null;e.inspectorHandler=function(e,n,o,i,r,s){t(e,n,o,i,r,s),e=Uh(e,n,o,i,r),s(e)},e.inspectorData=function(e,t,o){var i=n?n(e,t,o):t(e);return Gh(i,e,t,o),i}}},Gw={methods:{cloneNodesSelection:function(){var e=this,t=[],n=[],o=[],i=[],r=[],s=this.highlightedNodes,a=this.$refs.selector.$el,l=[Nl,Tl,os,Vl,Bo],c=[Zn],d=[Wn];return"function"===typeof a.getBoundingClientRect&&s.forEach((function(s){if(l.includes(s.type)){var a=e.cloneFlowAndSetNewId(s);n.push(a),t.push(a)}else if(c.includes(s.type)){var u=e.cloneFlowAndSetNewId(s);i.push(u),t.push(u)}else if(d.includes(s.type)){var p=e.cloneFlowAndSetNewId(s);r.push(p),t.push(p)}else{var h=e.cloneElementAndCalculateOffset(s);s.definition&&"bpmn:BoundaryEvent"!==s.definition.$type?t.push(h):o.push(h)}})),t=[].concat(m(t),o),this.connectClonedFlows(n,t),this.connectClonedDataInputAssociations(i,t),this.connectClonedDataOutputAssociations(r,t),t},getDataInputOutputAssociationTargetRef:function(e){if("bpmn:DataInput"===e.targetRef.$type){var t=e.targetRef.$parent;return lo(t,this)}if("bpmn:DataInputAssociation"===e.targetRef.$type){var n=e.targetRef.$parent;return lo(n,this)}return e.targetRef},cloneFlowAndSetNewId:function(e){var t=e.cloneFlow(this.nodeRegistry,this.moddle,this.$t);return t.setIds(this.nodeIdGenerator),t},cloneElementAndCalculateOffset:function(e){var t=e.clone(this.nodeRegistry,this.moddle,this.$t),n=this.$refs.selector.$el.getBoundingClientRect(),o=n.height,i=this.paper.scale(),r=i.sy,s=o/r;return t.diagram.bounds.y+=s,t.setIds(this.nodeIdGenerator),t},connectClonedFlows:function(e,t){var n=this;e.forEach((function(e){var o=n.nodes.find((function(t){return t.definition.id===e.cloneOf})),i=o.definition.sourceRef,r=o.definition.targetRef,s=t.find((function(e){return e.cloneOf===i.id})),a=t.find((function(e){return e.cloneOf===r.id}));if(s&&a){e.definition.set("sourceRef",s.definition),e.definition.set("targetRef",a.definition),s.definition.outgoing?s.definition.outgoing.push(e.definition):s.definition.set("outgoing",[e.definition]),a.definition.incoming?a.definition.incoming.push(e.definition):a.definition.set("incoming",[e.definition]);var l=n.$refs.selector.$el.getBoundingClientRect(),c=l.height,d=n.paper.scale(),u=d.sy,p=c/u;e.diagram.waypoint.forEach((function(e){e.y+=p}))}else t.splice(t.indexOf(e),1)}))},connectClonedDataInputAssociations:function(e,t){var n=this;e.forEach((function(e){var o=n.nodes.find((function(t){return t.definition.id===e.cloneOf})),i=o.definition.sourceRef[0],r=t.find((function(e){return e.cloneOf===i.id})),s=n.getDataInputOutputAssociationTargetRef(o.definition),a=t.find((function(e){return e.cloneOf===s.id})),l=ao(n.moddle,a,r.definition);e.definition.set("sourceRef",[r.definition]),e.definition.set("targetRef",l),a.definition.set("dataInputAssociations",[e.definition])}))},connectClonedDataOutputAssociations:function(e,t){var n=this;e.forEach((function(e){var o=n.nodes.find((function(t){return t.definition.id===e.cloneOf})),i=o.definition.sourceRef||o.definition.$parent,r=o.definition.targetRef,s=t.find((function(e){return e.cloneOf===i.id})),a=t.find((function(e){return e.cloneOf===r.id}));e.definition.set("targetRef",a.definition),e.definition.set("sourceRef",s.definition);var l=s.definition.get("dataOutputAssociations")||[];s.definition.set("dataOutputAssociations",[].concat(m(l),[e.definition]))}))}}},Ww=function(){var e=this,t=e._self._c;return t("div",{staticClass:"rail-container",attrs:{"data-cy":"rail-bottom"}},[t("div",{ref:"railLeftBox",staticClass:"rail-left",style:[e.overlap?{position:"relative"}:{position:"absolute"}]},[t("MiniPaperControl",{class:{"hidden-opacity":!1===e.showComponent},attrs:{"paper-manager":e.paperManager,graph:e.graph}}),t("ZoomControl",{ref:"zoomBox",attrs:{"paper-manager":e.paperManager}})],1),t("div",{staticClass:"rail-center",style:[e.overlap?{width:"auto"}:{width:"100%"}]},[t("UndoRedoControl",{directives:[{name:"show",rawName:"v-show",value:e.showComponent,expression:"showComponent"}],ref:"undoRedoBox",attrs:{"is-rendering":e.isRendering},on:{"load-xml":function(t){return e.$emit("load-xml")},clearSelection:function(t){return e.$emit("clearSelection")}}}),t("Controls",{directives:[{name:"show",rawName:"v-show",value:e.showComponent,expression:"showComponent"}],ref:"controlBox",attrs:{nodeTypes:e.nodeTypes},on:{onCreateElement:e.onCreateElementHandler,onSetCursor:e.onSetCursorHandler}})],1)])},$w=[],Xw=function(){var e=this,t=e._self._c;return t("div",{staticClass:"mini-paper-box"},[t("button",{directives:[{name:"b-tooltip",rawName:"v-b-tooltip.hover",modifiers:{hover:!0}}],staticClass:"mini-paper-button",class:e.miniMapOpen?"mini-paper-button-active":"",attrs:{type:"button","data-cy":"mini-paper-button",title:e.miniMapOpen?e.$t("Hide Mini-Map"):e.$t("Show Mini-Map")},on:{click:function(t){e.miniMapOpen=!e.miniMapOpen}}},[t("inline-svg",{attrs:{src:e.miniMapIcon}})],1),t("mini-paper",{attrs:{isOpen:e.miniMapOpen,paperManager:e.paperManager,graph:e.graph}})],1)},Yw=[],Zw=function(){var e=this,t=e._self._c;return t("div",{staticClass:"mini-paper-container",class:e.isOpen?"opened":"closed",attrs:{"data-cy":"mini-map-box"},on:{click:e.movePaper}},[t("div",{ref:"miniPaper",staticClass:"mini-paper"})])},Kw=[],Jw=new WeakMap,Qw=function(){function e(t){wo(this,e),Eh(this,Jw,{writable:!0,value:void 0}),fy(this,Jw,t)}return ko(e,[{key:"miniMap",get:function(){return Th(this,Jw)}},{key:"scaleMiniMap",value:function(){this.miniMap.scaleContentToFit({padding:10,maxScaleX:.5,maxScaleY:.5})}},{key:"calculateNewPaperPosition",value:function(e,t,n,o,i,r){var s=this.miniMap.paperToLocalPoint(e,t),a=s.x,l=s.y;return{newX:i/2-a*n,newY:r/2-l*o}}}],[{key:"factory",value:function(e,t){var n=new a.dia.Paper({el:t,model:e,width:230,height:200,interactive:!1});return new this(n)}}]),e}(),ex={data:function(){return{miniMapManager:null,newX:0,newY:0}},props:{isOpen:{type:Boolean},paperManager:{type:Object},graph:{type:Object}},watch:{isOpen:function(e){e&&this.miniMapManager.scaleMiniMap()}},computed:{miniMap:function(){return this.miniMapManager.miniMap}},methods:{movePaper:function(e){var t=e.offsetX,n=e.offsetY,o=this.paperManager.scale,i=o.sx,r=o.sy,s=this.paperManager.paper.el,a=s.clientWidth,l=s.clientHeight,c=this.miniMapManager.calculateNewPaperPosition(t,n,i,r,a,l),d=c.newX,u=c.newY;this.newX=d,this.newY=u,this.paperManager.translate(this.newX,this.newY)}},mounted:function(){var e=this;return y(v().mark((function t(){return v().wrap((function(t){while(1)switch(t.prev=t.next){case 0:return window.Cypress&&(window.MiniPaper=e),t.next=3,e.$nextTick();case 3:e.miniMapManager=Qw.factory(e.graph,e.$refs.miniPaper),e.paperManager.addEventHandler("render:done",e.miniMapManager.scaleMiniMap,e),window.ProcessMaker.EventBus.$on("modeler-change",(function(){return e.miniMapManager.scaleMiniMap()}));case 6:case"end":return t.stop()}}),t)})))()},beforeDestroy:function(){this.paperManager.removeEventHandler("render:done",this.miniMapManager.scaleMiniMap,this)}},tx=ex,nx=(h(63564),qn(tx,Zw,Kw,!1,null,"76e95759",null)),ox=nx.exports,ix={components:{InlineSvg:Ug,MiniPaper:ox},props:{paperManager:Object,graph:Object},data:function(){return{miniMapOpen:!1,miniMapIcon:h(65759)}}},rx=ix,sx=(h(71776),qn(rx,Xw,Yw,!1,null,"7f06057f",null)),ax=sx.exports,lx=function(){var e=this,t=e._self._c;return t("div",{staticClass:"zoom-box"},[t("button",{directives:[{name:"b-tooltip",rawName:"v-b-tooltip.hover",modifiers:{hover:!0}}],staticClass:"zoom-button",attrs:{type:"button","data-cy":"zoom-out-control",title:e.$t("Zoom Out")},on:{click:e.onClickZoomOut}},[t("inline-svg",{attrs:{src:e.minusIcon}})],1),e.paperManager?t("button",{directives:[{name:"b-tooltip",rawName:"v-b-tooltip.hover",modifiers:{hover:!0}}],staticClass:"zoom-button zoom-reset",attrs:{"data-cy":"zoom-reset-control",title:e.$t("Reset to initial scale")},on:{click:e.onClickReset}},[e._v(e._s(e.percentageText))]):e._e(),t("button",{directives:[{name:"b-tooltip",rawName:"v-b-tooltip.hover",modifiers:{hover:!0}}],staticClass:"zoom-button",attrs:{type:"button","data-cy":"zoom-in-control",title:e.$t("Zoom In")},on:{click:e.onClickZoomIn}},[t("inline-svg",{attrs:{src:e.plusIcon}})],1)])},cx=[],dx={components:{InlineSvg:Ug},props:{paperManager:Object},data:function(){return{initialScale:1,minimumScale:.2,scaleStep:.1,minusIcon:h(22044),plusIcon:h(29943)}},computed:{percentageText:function(){return"".concat(Math.round(100*this.$props.paperManager.scale.sx),"%")}},methods:{onClickZoomOut:function(){this.paperManager.scale=Math.max(this.minimumScale,this.paperManager.scale.sx-=this.scaleStep)},onClickZoomIn:function(){this.paperManager.scale=this.paperManager.scale.sx+this.scaleStep},onClickReset:function(){this.paperManager.scale=this.initialScale}}},ux=dx,px=(h(5365),qn(ux,lx,cx,!1,null,"576edbd4",null)),hx=px.exports,fx=function(){var e=this,t=e._self._c;return t("div",{staticClass:"ur-box"},[t("button",{directives:[{name:"b-tooltip",rawName:"v-b-tooltip.hover.viewport.d50",value:{customClass:"no-pointer-events"},expression:"{ customClass: 'no-pointer-events' }",modifiers:{hover:!0,viewport:!0,d50:!0}}],staticClass:"ur-button",attrs:{type:"button","data-cy":"undo-control",disabled:!e.canUndo,title:e.$t("Undo")},on:{click:e.undo}},[t("inline-svg",{attrs:{src:e.undoIcon}})],1),t("button",{directives:[{name:"b-tooltip",rawName:"v-b-tooltip.hover.viewport.d50",value:{customClass:"no-pointer-events"},expression:"{ customClass: 'no-pointer-events' }",modifiers:{hover:!0,viewport:!0,d50:!0}}],staticClass:"ur-button",attrs:{type:"button","data-cy":"redo-control",disabled:!e.canRedo,title:e.$t("Redo")},on:{click:e.redo}},[t("inline-svg",{attrs:{src:e.redoIcon}})],1)])},mx=[],gx={components:{InlineSvg:Ug},props:{isRendering:{type:Boolean}},data:function(){return{undoIcon:h(28994),redoIcon:h(45617)}},watch:{canUndo:function(e){e||this.$root.$emit("bv::hide::tooltip")},canRedo:function(e){e||this.$root.$emit("bv::hide::tooltip")}},computed:{canUndo:function(){return dv.getters.canUndo},canRedo:function(){return dv.getters.canRedo}},methods:{undo:function(){var e=this;this.$emit("clearSelection"),this.isRendering||dv.dispatch("undo").then((function(){return e.$emit("load-xml")}))},redo:function(){var e=this;this.$emit("clearSelection"),this.isRendering||dv.dispatch("redo").then((function(){return e.$emit("load-xml")}))}}},vx=gx,bx=(h(81935),qn(vx,fx,mx,!1,null,"379ae012",null)),yx=bx.exports,wx=function(){var e=this,t=e._self._c;return e.controls?t("ul",{staticClass:"control-list"},[e._l(e.controls,(function(n){return t("li",{key:n.id,class:["control-item",{active:e.selectedItem&&e.selectedItem.type===n.type}],attrs:{id:n.id,"data-test":"".concat(n.type,"-main")},on:{click:function(t){return t.stopPropagation(),e.onClickControlHandler(t,n)}}},[t("SubmenuPopper",{attrs:{data:n,selectedItem:e.selectedSubmenuItem,popperType:e.popperType},on:{clickToSubmenu:e.clickToSubmenuHandler}})],1)})),t("li",{staticClass:"control-item"},[t("div",{directives:[{name:"b-tooltip",rawName:"v-b-tooltip.hover.viewport.d50",value:{customClass:"no-pointer-events"},expression:"{ customClass: 'no-pointer-events' }",modifiers:{hover:!0,viewport:!0,d50:!0}}],class:{"control-add":!0,"control-active":e.explorerOpen},attrs:{title:e.$t("Add")},on:{click:e.toggleExplorer}},[t("inline-svg",{attrs:{src:e.plusIcon}})],1)])],2):e._e()},xx=[],kx=function(){var e=this,t=e._self._c;return e.data.items?t("popper",{attrs:{trigger:"clickToOpen",options:{placement:"top",modifiers:{offset:{offset:"0,5px"},preventOverflow:{escapeWithReference:!0}}},"append-to-body":!0,"visible-arrow":!1,"force-show":e.popperType===e.data.type}},[t("div",[t("ul",{staticClass:"control-submenu"},e._l(e.data.items,(function(n,o){return t("li",{key:o,class:["control-submenu-list",{active:e.selectedItem===n.type}],attrs:{"data-test":n.type},on:{click:function(t){return e.onClickHandler(t,n)}}},[t("inline-svg",{attrs:{src:n.icon,alt:n.label}}),t("div",{staticClass:"control-submenu-list-label"},[e._v(" "+e._s(n.label)+" ")])],1)})),0)]),t("a",{directives:[{name:"b-tooltip",rawName:"v-b-tooltip.hover.viewport.d50",value:{customClass:"no-pointer-events"},expression:"{ customClass: 'no-pointer-events' }",modifiers:{hover:!0,viewport:!0,d50:!0}}],staticClass:"control-submenu-item",attrs:{slot:"reference",alt:e.data.label,title:e.$t(e.data.label)},slot:"reference"},[t("div",{staticClass:"control-submenu-options"},[t("span")]),t("inline-svg",{attrs:{src:e.data.icon}})],1)]):t("a",{directives:[{name:"b-tooltip",rawName:"v-b-tooltip.hover.viewport.d50",value:{customClass:"no-pointer-events"},expression:"{ customClass: 'no-pointer-events' }",modifiers:{hover:!0,viewport:!0,d50:!0}}],staticClass:"control-submenu-item",attrs:{alt:e.data.label,title:e.$t(e.data.label)}},[t("inline-svg",{attrs:{src:e.data.icon}})],1)},Cx=[],Sx=h(95951),Ex=h.n(Sx),Ax=(h(44301),{props:{data:{type:Object},selectedItem:{type:String},popperType:{type:String}},components:{Popper:Ex(),InlineSvg:Ug},data:function(){return{wasClickedSubmenu:!1,element:null,wasClicked:!1}},methods:{onClickHandler:function(e,t){e.stopPropagation(),this.$emit("clickToSubmenu",{event:e,control:t})}}}),Mx=Ax,Tx=(h(19366),qn(Mx,kx,Cx,!1,null,"acf58eca",null)),_x=Tx.exports,Px={components:{SubmenuPopper:_x,InlineSvg:Ug},props:{nodeTypes:Array},mixins:[Cg],data:function(){return{plusIcon:h(29943),currentType:null}},created:function(){pg.dispatch("getUserPinnedObjects")},computed:{controls:function(){return pg.getters.getPinnedNodeTypes},explorerOpen:function(){return pg.getters.getExplorerOpen}},methods:{clickToSubmenuHandler:function(e){window.ProcessMaker.EventBus.$off("custom-pointerclick"),this.wasClicked=!1,this.parent=this.selectedItem,this.selectedSubmenuItem=e.control.type,this.onClickHandler(e.event,e.control)},onClickControlHandler:function(e,t){this.selectedSubmenuItem=null,this.popperType=this.currentType===t.type?null:t.type,this.onClickHandler(e,t),this.currentType=this.popperType},toggleExplorer:function(){this.deselect(),this.popperType=null,this.selectedSubmenuItem=null,pg.commit("toggleExplorer"),pg.commit("clearFilteredNodes"),pg.commit("clearFilteredPmBlockNodes")}}},Ox=Px,Dx=(h(33422),qn(Ox,wx,xx,!1,null,"0e6b16b8",null)),Ix=Dx.exports,Nx={components:{MiniPaperControl:ax,ZoomControl:hx,UndoRedoControl:yx,Controls:Ix},props:{paperManager:Object,graph:Object,isRendering:Boolean,nodeTypes:Array},data:function(){return{overlap:!1,widthOverlapControl:0,leftOverlapUndoRedo:0,controlObserver:null}},created:function(){this.controlObserver=new ResizeObserver(this.onControlObserver)},methods:{onCreateElementHandler:function(e){this.$emit("onCreateElement",e)},onSetCursorHandler:function(e){this.$emit("set-cursor",e)},onControlObserver:function(e){var t=e[0].target.getBoundingClientRect(),n=this.$refs.zoomBox.$el.getBoundingClientRect(),o=this.$refs.undoRedoBox.$el.getBoundingClientRect();if(this.overlap){if(t.width<this.widthOverlapControl){var i=window.getComputedStyle(this.$refs.zoomBox.$el),r=parseInt(i.paddingLeft,10)+parseInt(i.paddingRight,10),s=window.getComputedStyle(this.$refs.railLeftBox),a=parseInt(s.paddingLeft,10)+parseInt(s.paddingRight,10),l=this.leftOverlapUndoRedo+(this.widthOverlapControl-t.width)-r-a;l>n.right&&(this.overlap=!1)}}else o.left<n.right&&(this.overlap=!0,this.widthOverlapControl=t.width,this.leftOverlapUndoRedo=o.left)}},computed:{showComponent:function(){return bn.getters.showComponent}},mounted:function(){var e=this;return y(v().mark((function t(){return v().wrap((function(t){while(1)switch(t.prev=t.next){case 0:return t.next=2,(0,gt.nextTick)();case 2:e.controlObserver.observe(e.$refs.controlBox.$el);case 3:case"end":return t.stop()}}),t)})))()}},Rx=Nx,Bx=(h(44697),qn(Rx,Ww,$w,!1,null,"5393ebfe",null)),Lx=Bx.exports,jx=function(){var e=this,t=e._self._c;return t("crown-config",e._g({attrs:{highlighted:e.highlighted,paper:e.paper,graph:e.graph,shape:e.shape,node:e.node,nodeRegistry:e.nodeRegistry,moddle:e.moddle,collaboration:e.collaboration,"process-node":e.processNode,"plane-elements":e.planeElements,"is-rendering":e.isRendering}},e.$listeners))},Fx=[],zx=function(e){pi(n,e);var t=vi(n);function n(){return wo(this,n),t.apply(this,arguments)}return ko(n,[{key:"makeFlowNode",value:function(e,t,n){var o=this,i=Yn(this.moddle),r=Xn(this.moddle);r.set("sourceRef",e.component.node.definition),r.set("targetRef",t.component.node.definition);var s=n.sourceAnchor,a=n.targetAnchor;i.waypoint=[s,a].map((function(e){return o.moddle.create("dc:Point",e)}));var l=new Ro(Wn,r,i);l.dataAssociationProps={sourceShape:e,targetCoords:{x:void 0,y:void 0}};var c=x()(e,"component.node"),d=c.definition.get("dataOutputAssociations")||[];return c.definition.set("dataOutputAssociations",[].concat(m(d),[l.definition])),l}}],[{key:"isValid",value:function(e){var t=e.sourceShape,n=e.targetShape,o=x()(t,"component.node"),i=x()(n,"component.node");if(!i)return!1;var r=["bpmn:Task","bpmn:SubProcess","bpmn:CallActivity","bpmn:ManualTask","bpmn:ScriptTask","bpmn:ServiceTask"],s=["bpmn:Task","bpmn:SubProcess","bpmn:CallActivity","bpmn:ManualTask","bpmn:ScriptTask","bpmn:ServiceTask"],a=["bpmn:Task","bpmn:SubProcess","bpmn:CallActivity","bpmn:ManualTask","bpmn:ScriptTask","bpmn:ServiceTask","bpmn:IntermediateCatchEvent","bpmn:StartEvent"],l=["bpmn:Task","bpmn:SubProcess","bpmn:CallActivity","bpmn:ManualTask","bpmn:ScriptTask","bpmn:ServiceTask","bpmn:IntermediateThrowEvent","bpmn:EndEvent"],c=o.definition.$type,d=i.definition.$type,u="bpmn:DataStoreReference"===o.definition.$type,p="bpmn:DataObjectReference"===o.definition.$type,h="bpmn:DataStoreReference"===i.definition.$type,f="bpmn:DataObjectReference"===i.definition.$type;return!(!u||!s.includes(d))||(!(!p||!l.includes(d))||(!(!h||!r.includes(c))||f&&a.includes(c)))}},{key:"isValidSourceNode",value:function(e){return!wi.isNodeDisallowedFromDataAssociation(e)}}]),n}(wi),qx=[zx,_l,jl],Hx={name:Bo,components:{CrownConfig:Zr},props:["graph","node","id","highlighted","nodeRegistry","moddle","paper","collaboration","processNode","planeElements","isRendering"],mixins:[_n],data:function(){return{shape:null}},computed:{isValidConnection:function(){var e=this;return qx.some((function(t){return t.isValid({sourceShape:e.sourceShape,targetShape:e.target,sourceConfig:e.sourceConfig,targetConfig:e.targetConfig})}))},targetType:function(){return x()(this.target,"component.node.type")},shapeName:function(){return this.node.definition.get("name")},nameLabel:{get:function(){return this.shape.label(0).attrs.text.text},set:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";this.shape.label(0,{attrs:{text:{text:e}}})}}},watch:{},methods:{completeLink:function(){var e=this,t=qx.find((function(t){return t.isValid({sourceShape:e.sourceShape,targetShape:e.target,sourceConfig:e.sourceConfig,targetConfig:e.targetConfig})})),n=new t(this.nodeRegistry,this.moddle,this.paper),o=this.shape.findView(this.paper);this.$emit("replace-generic-flow",{actualFlow:n.makeFlowNode(this.sourceShape,this.target,o),genericFlow:this.node,targetNode:x()(this.target,"component.node")})},updateRouter:function(){this.shape.router("normal")},createDefaultFlowMarker:function(){this.shape.attr("line",{strokeWidth:1,strokeDasharray:"2 2"})}},mounted:function(){this.shape=new a.shapes.standard.Link,this.shape.connector("rounded",{radius:5}),this.createDefaultFlowMarker(),this.shape.addTo(this.graph),this.shape.component=this}},Vx=Hx,Ux=qn(Vx,jx,Fx,!1,null,null,null),Gx=Ux.exports,Wx=function(){var e=this,t=e._self._c;return e.showLasso&&e.style?t("div",{ref:"drag",staticClass:"box",style:e.style,attrs:{"data-cy":"selection-box","data-length":e.selected.length}},[t("crown-multiselect",e._g({attrs:{paper:e.paperManager.paper,graph:e.$parent.graph,moddle:e.$parent.moddle,collaboration:e.$parent.collaboration,"process-node":e.$parent.processNode,"plane-elements":e.$parent.planeElements,"is-rendering":e.$parent.isRendering,"dropdown-data":[],"has-pools":e.hasPoolsOrLanesSelected},on:{"save-state":function(t){return e.$emit("save-state")}}},e.$listeners))],1):e._e()},$x=[],Xx=function(){var e=this,t=e._self._c;return e.isMultiSelect?t("div",{staticClass:"crown-config crown-multiselect",style:e.style,attrs:{role:"menu"}},[e._t("default"),e._l(e.availableButtons,(function(e){return t("button",{key:e.label,staticClass:"crown-button",attrs:{"aria-label":e.label,title:e.label,"data-test":e.testId,role:e.role},on:{click:e.action}},["fpm"===e.iconPrefix?t("font-awesome-icon",{attrs:{icon:[e.iconPrefix,"fa-".concat(e.icon)]}}):t("i",{class:"".concat(e.iconPrefix," fa-").concat(e.icon," text-dark")})],1)})),t("crown-align",{directives:[{name:"show",rawName:"v-show",value:e.showAlignmentButtons,expression:"showAlignmentButtons"}],attrs:{paper:e.paper},on:{"save-state":function(t){return e.$emit("save-state")}}})],2):e._e()},Yx=[],Zx=function(){var e=this,t=e._self._c;return e.isMultiSelect?t("div",{staticClass:"crown-config crown-align",style:e.style,attrs:{role:"menu"}},[e._t("default"),e._l(e.availableButtons,(function(e){return t("button",{key:e.label,staticClass:"crown-button",attrs:{"aria-label":e.label,title:e.label,"data-test":e.testId,role:e.role,disabled:e.disabled},on:{mousedown:function(e){e.stopPropagation(),e.preventDefault()},click:function(t){return t.stopPropagation(),t.preventDefault(),e.action.apply(null,arguments)}}},[t("font-awesome-icon",{attrs:{icon:["fpm","fa-".concat(e.icon)]}})],1)}))],2):e._e()},Kx=[],Jx=function(e){return e.position().y+e.size().height},Qx=function(e){return e.position().x},ek=function(e){return e.position().x+e.size().width/2},tk=function(e){return e.position().y+e.size().height/2},nk=function(e){return e.position().x+e.size().width},ok=function(e){return e.position().y},ik=function(e){return Boolean(e&&e.position&&e.size)},rk={poolLane:"PoolLane",boundaryEvent:"processmaker.components.nodes.boundaryEvent.Shape"},sk=[rk.boundaryEvent,rk.poolLane],ak=function(e){return!sk.includes(e.get("type"))};function lk(e){return ik(e)&&ak(e)}function ck(e,t){var n=t-Jx(e);e.translate(0,n)}function dk(e,t){var n=t-Qx(e);e.translate(n,0)}function uk(e,t){var n=t-nk(e);e.translate(n,0)}function pk(e,t){var n=t-ek(e);e.translate(n,0)}function hk(e,t){var n=t-tk(e);e.translate(0,n)}function fk(e,t){var n=t-ok(e);e.translate(0,n)}function mk(e){var t=Ck(e);e.forEach((function(e){dk(e,t.left)}))}function gk(e){var t=Ck(e);e.forEach((function(e){uk(e,t.right)}))}function vk(e){var t=Ck(e);e.forEach((function(e){fk(e,t.top)}))}function bk(e){var t=Ck(e);e.forEach((function(e){ck(e,t.bottom)}))}function yk(e){var t=Ck(e);e.forEach((function(e){pk(e,t.hMiddle)}))}function wk(e){var t=Ck(e);e.forEach((function(e){hk(e,t.vMiddle)}))}function xk(e){var t=Ck(e),n=e.length,o=3;if(!(n<o)){var i=e.reduce((function(e,t){return t.size().height+e}),0),r=e.sort((function(e,t){return tk(e)-tk(t)})),s=t.top+e[0].size().height,a=(t.height-i)/(r.length-1);r.forEach((function(e,t){0!==t&&(fk(e,s+a),s+=a+e.size().height)}))}}function kk(e){var t=Ck(e),n=e.length,o=3;if(!(n<o)){var i=e.reduce((function(e,t){return t.size().width+e}),0),r=e.sort((function(e,t){return ek(e)-ek(t)})),s=t.left+e[0].size().width,a=(t.width-i)/(r.length-1);r.forEach((function(e,t){0!==t&&(dk(e,s+a),s+=a+e.size().width)}))}}function Ck(e){if(!e||!e.length||0===e.length)return{left:0,right:0,top:0,bottom:0,width:0,height:0,vMiddle:0,hMiddle:0};var t=function(e){return ik(e)?e.position().x:0},n=function(e){return ik(e)?e.position().x+e.size().width:0},o=function(e){return ik(e)?e.position().y:0},i=function(e){return ik(e)?e.position().y+e.size().height:0},r=Math.min.apply(Math,m(e.map(t))),s=Math.max.apply(Math,m(e.map(n))),a=Math.min.apply(Math,m(e.map(o))),l=Math.max.apply(Math,m(e.map(i))),c=s-r,d=l-a;return{left:r,right:s,top:a,bottom:l,width:c,height:d,vMiddle:a+d/2,hMiddle:r+c/2}}function Sk(e){var t=e.filter((function(e){return lk(e)})),n=Ck(e),o=t.length>1;return{can:{align:{left:o&&t.some((function(e){return Qx(e)!==n.left})),horizontalCenter:o&&t.some((function(e){return ek(e)!==n.hMiddle})),right:o&&t.some((function(e){return nk(e)!==n.right})),bottom:o&&t.some((function(e){return Jx(e)!==n.bottom})),verticalCenter:o&&t.some((function(e){return tk(e)!==n.vMiddle})),top:o&&t.some((function(e){return ok(e)!==n.top}))},distribute:{horizontally:o&&t.length>2,vertically:o&&t.length>2}},align:{left:function(){return mk(t)},horizontalCenter:function(){return yk(t)},right:function(){return gk(t)},bottom:function(){return bk(t)},verticalCenter:function(){return wk(t)},top:function(){return vk(t)}},distribute:{horizontally:function(){return kk(t)},vertically:function(){return xk(t)}}}}var Ek,Ak,Mk,Tk,_k={components:{FontAwesomeIcon:Zo.FontAwesomeIcon},props:{paper:Object,hasPools:Boolean},data:function(){return{runningInCypressTest:Wr(),showCrown:!1,savePositionOnPointerupEventSet:!1,style:null,taskDropdownInitiallyOpen:this.paperNotRendered(),showReplaceModal:!1,nodeToReplace:null,buttons:[{label:this.$t("Align Left"),icon:"align-left",testId:"align-left",role:"menuitem",action:this.alignLeft,condition:"align.left",disabled:!1},{label:this.$t("Center Horizontally"),icon:"center-horizontally",testId:"align-horizontally",role:"menuitem",action:this.centerHorizontally,condition:"align.horizontalCenter",disabled:!1},{label:this.$t("Align Right"),icon:"align-right",testId:"align-right",role:"menuitem",action:this.alignRight,condition:"align.right",disabled:!1},{label:this.$t("Align Bottom"),icon:"align-bottom",testId:"align-bottom",role:"menuitem",action:this.alignBottom,condition:"align.bottom",disabled:!1},{label:this.$t("Center Vertically"),icon:"center-vertically",testId:"center-vertically",role:"menuitem",action:this.centerVertically,condition:"align.verticalCenter",disabled:!1},{label:this.$t("Align Top"),icon:"align-top",testId:"align-top",role:"menuitem",action:this.alignTop,condition:"align.top",disabled:!1},{label:this.$t("Distribute Horizontally"),icon:"distribute-horizontally",testId:"distribute-horizontally",role:"menuitem",action:this.distributeHorizontally,condition:"distribute.horizontally",disabled:!1},{label:this.$t("Distribute Vertically"),icon:"distribute-vertically",testId:"distribute-vertically",role:"menuitem",action:this.distributeVertically,condition:"distribute.vertically",disabled:!1}]}},created:function(){this.$t=this.$t.bind(this),Lo.library.add(Go),Lo.library.add(Uo),Lo.library.add(Wo),Lo.library.add($o),Lo.library.add(Vo),Lo.library.add(Ho),Lo.library.add(Yo),Lo.library.add(Xo)},watch:{selectedShapes:function(){this.$root.$emit("bv::hide::tooltip")}},computed:{selectedShapes:function(){return this.disableButtons(),Sk(bn.getters.highlightedShapes)},isMultiSelect:function(){var e=bn.getters.highlightedShapes.length;return e>1},highlightedShapes:function(){return bn.getters.highlightedShapes},availableButtons:function(){var e=this.hasPools;return this.buttons.filter((function(t){return"copy-button"===t.testId?!e:"clone-button"!==t.testId||!e}))}},methods:{disableButtons:function(){var e=Sk(bn.getters.highlightedShapes);this.buttons.forEach((function(t){t.disabled=!(0,Un.get)(e.can,t.condition,!0)}))},alignLeft:function(){this.undoableAction(this.selectedShapes.align.left)},centerHorizontally:function(){this.undoableAction(this.selectedShapes.align.horizontalCenter)},alignRight:function(){this.undoableAction(this.selectedShapes.align.right)},alignBottom:function(){this.undoableAction(this.selectedShapes.align.bottom)},centerVertically:function(){this.undoableAction(this.selectedShapes.align.verticalCenter)},alignTop:function(){this.undoableAction(this.selectedShapes.align.top)},distributeHorizontally:function(){this.undoableAction(this.selectedShapes.distribute.horizontally)},distributeVertically:function(){this.undoableAction(this.selectedShapes.distribute.vertically)},undoableAction:function(e){e(),this.$emit("save-state"),this.disableButtons()},paperNotRendered:function(){return!this.isRendering},setNodePosition:function(){this.shape.stopListening(this.paper,"element:pointerup",this.setNodePosition),this.savePositionOnPointerupEventSet=!1,bn.getters.allowSavingElementPosition&&this.$emit("save-state")},paperDoneRendering:function(){var e=this;if(this.isRendering)return new Promise((function(t){return e.paper.once("render:done",t)}))},setUpCrownConfig:function(){this.paper.on("render:done scale:changed translate:changed",this.repositionCrown)},setUpPositionHandling:function(){}},mounted:function(){var e=this;return y(v().mark((function t(){return v().wrap((function(t){while(1)switch(t.prev=t.next){case 0:return t.next=2,e.$nextTick();case 2:return t.next=4,e.paperDoneRendering();case 4:e.setUpCrownConfig();case 5:case"end":return t.stop()}}),t)})))()}},Pk=_k,Ok=(h(81856),h(69100),qn(Pk,Zx,Kx,!1,null,"46e3ac40",null)),Dk=Ok.exports,Ik={props:{paper:Object,hasPools:Boolean},components:{crownAlign:Dk,FontAwesomeIcon:Zo.FontAwesomeIcon},data:function(){return{showAlignmentButtons:!1,runningInCypressTest:Wr(),showCrown:!1,savePositionOnPointerupEventSet:!1,style:null,taskDropdownInitiallyOpen:this.paperNotRendered(),showReplaceModal:!1,nodeToReplace:null,buttons:[{label:"Copy Selection",iconPrefix:"fa",icon:"clipboard",testId:"copy-button",role:"menuitem",action:this.copySelection},{label:"Clone Selection",iconPrefix:"fa",icon:"copy",testId:"clone-button",role:"menuitem",action:this.cloneSelection},{label:"Align",iconPrefix:"fpm",icon:"align-left",testId:"align",role:"menuitem",action:this.showAlign},{label:"Delete Element",iconPrefix:"fa",icon:"trash-alt",testId:"delete-button",role:"menuitem",action:this.deleteElement}]}},created:function(){this.$t=this.$t.bind(this),Lo.library.add(Uo)},computed:{isMultiSelect:function(){var e=bn.getters.highlightedShapes.length;return e>1},highlightedShapes:function(){return bn.getters.highlightedShapes},availableButtons:function(){var e=this.hasPools;return this.buttons.filter((function(t){return"copy-button"===t.testId?!e:"clone-button"!==t.testId||!e}))}},methods:{showAlign:function(){this.showAlignmentButtons=!this.showAlignmentButtons},copySelection:function(){this.$emit("copy-selection")},cloneSelection:function(){this.$emit("clone-selection")},deleteElement:function(){this.$emit("remove-nodes")},paperNotRendered:function(){return!this.isRendering},setNodePosition:function(){this.shape.stopListening(this.paper,"element:pointerup",this.setNodePosition),this.savePositionOnPointerupEventSet=!1,bn.getters.allowSavingElementPosition&&this.$emit("save-state")},paperDoneRendering:function(){var e=this;if(this.isRendering)return new Promise((function(t){return e.paper.once("render:done",t)}))},setUpCrownConfig:function(){this.paper.on("render:done scale:changed translate:changed",this.repositionCrown)},setUpPositionHandling:function(){}},mounted:function(){var e=this;return y(v().mark((function t(){return v().wrap((function(t){while(1)switch(t.prev=t.next){case 0:return t.next=2,e.$nextTick();case 2:return t.next=4,e.paperDoneRendering();case 4:e.setUpCrownConfig();case 5:case"end":return t.stop()}}),t)})))()}},Nk=Ik,Rk=(h(6718),qn(Nk,Xx,Yx,!1,null,"bcd827ec",null)),Bk=Rk.exports,Lk={name:"Selection",components:{CrownMultiselect:Bk},props:{graph:Object,paperManager:Object,useModelGeometry:Boolean,processNode:Object},data:function(){return{start:null,isSelecting:!1,isSelected:!1,selected:[],conectedLinks:[],dragging:!1,style:{left:"0px",top:"0px",width:"0px",height:"0px"},mouseX:0,mouseY:0,top:0,left:0,initialPosition:null,hasMouseDown:!1,hasMouseMoved:!1,showLasso:!1,isOutOfThePool:!1,stopForceMove:!1,draggableBlackList:[Tl],selectionBlackList:[Bo],selectableBlackList:[Bo],newPool:null,oldPool:null,isValidSelectionLinks:!0,invalidPool:null}},mounted:function(){this.paperManager.paper.on("scale:changed ",this.updateSelectionBox),this.paperManager.paper.on("translate:changed ",this.translateChanged)},computed:{hasPoolsOrLanesSelected:function(){return this.selected.some((function(e){return e.model.component.node.type===bi||e.model.component.node.type===Tl}))}},watch:{selected:function(e){this.prepareConectedLinks(e),this.addToHighlightedNodes(e)}},methods:{selectElements:function(e){var t=this;return y(v().mark((function n(){return v().wrap((function(n){while(1)switch(n.prev=n.next){case 0:return n.next=2,t.$nextTick();case 2:return t.clearSelection(),t.selected=e,t.showLasso=!0,t.isSelected=!0,t.isSelecting=!0,t.start=null,n.next=10,t.$nextTick();case 10:t.updateSelectionBox();case 11:case"end":return n.stop()}}),n)})))()},selectElement:function(e){var t=arguments,n=this;return y(v().mark((function o(){var i;return v().wrap((function(o){while(1)switch(o.prev=o.next){case 0:if(i=t.length>1&&void 0!==t[1]&&t[1],!e.model.component||!n.selectableBlackList.includes(e.model.component.node.type)){o.next=3;break}return o.abrupt("return");case 3:return n.showLasso=!0,n.isSelected=!0,n.isSelecting=!0,n.start=null,i?n.shiftKeySelectionHandler(e):n.selected=[e],n.filterSelected(),o.next=11,n.$nextTick();case 11:!1===bn.getters.isReadOnly&&n.updateSelectionBox();case 12:case"end":return o.stop()}}),o)})))()},shiftKeySelectionHandler:function(e){var t=this;if(!(e&&e.model&&e.model.component&&this.draggableBlackList.includes(e.model.component.node.type))){var n=this.selected.find((function(e){return t.draggableBlackList.includes(e.model.component.node.type)}));if(n)this.selected=[e];else{var o=this.selected.find((function(e){return e.model.component.node.type===bi}));o&&e.model.component.node.type!==bi?this.selected=[e]:e.model.component&&e.model.component.node.type===bi?this.hasOnlyPools(this.selected)?this.selectOrUnselectShape(e):this.selected=[e]:e.model.component&&e.model.component.node.pool&&(o=this.getPool(this.selected),o&&e.model.component.node.pool.id!==o.model.get("id"))?this.selected=[e]:this.selectOrUnselectShape(e)}}},selectOrUnselectShape:function(e){var t=this.selected.find((function(t){return t.id===e.id}));t?this.selected=this.selected.filter((function(t){return t.id!==e.id})):this.selected.push(e)},clearSelection:function(){this.initSelection()},initSelection:function(){this.isSelecting=!1,this.start=null,this.selected=[],this.showLasso=!1,this.isSelected=!1,this.style={left:"0px",top:"0px",width:"0px",height:"0px"}},startSelection:function(e){var t=this.paperManager.paper,n=a.util.normalizeEvent(e),o=n.clientX,i=n.clientY,r=n.offsetX,s=n.offsetY,l=t.$el.offset();this.clearSelection(),this.isSelecting=!0,this.showLasso=!0,this.start={x:o-l.left+window.pageXOffset+t.$el.scrollLeft(),y:i-l.top+window.pageYOffset+t.$el.scrollTop()},this._offset={x:r,y:s}},updateSelection:function(e){var t=this.paperManager.paper;if(this.isSelecting&&!this.isSelected&&this.start){var n=a.util.normalizeEvent(e),o=t.$el.offset(),i={x:n.clientX-o.left+window.pageXOffset+t.$el.scrollLeft(),y:n.clientY-o.top+window.pageYOffset+t.$el.scrollTop()},r={height:i.y-this.start.y,width:i.x-this.start.x};this.style.left="".concat(r.width<0?this._offset.x+r.width:this.start.x,"px"),this.style.top="".concat(r.height<0?this._offset.y+r.height:this.start.y,"px"),this.style.width="".concat(Math.abs(r.width),"px"),this.style.height="".concat(Math.abs(r.height),"px")}},endSelection:function(){var e=this.paperManager.paper;if(this.isSelecting&&!this.isSelected){var t=e.$el.offset(),n={left:this.$el.offsetLeft+t.left,top:this.$el.offsetTop+t.top},o=this.$el.clientWidth,i=this.$el.clientHeight,r=(0,a.V)(e.viewport).toLocalPoint(n.left,n.top);r.x-=window.pageXOffset,r.y-=window.pageYOffset;var s=e.scale();o/=s.sx,i/=s.sy;var l=a.g.rect(r.x,r.y,o,i);this.selected=this.getElementsInSelectedArea(l,{strict:!1}),this.filterSelected(),this.selected&&this.selected.length>0?(this.updateSelectionBox(),this.isSelected=!0):(this.clearSelection(),this.isSelected=!1,this.start=null),this.start=null}},getElementsInSelectedArea:function(e,t){var n=!(arguments.length>2&&void 0!==arguments[2])||arguments[2],o=this.paperManager.paper,i=o.findViewsInArea(e,t);return n?(this.graph.getLinks().forEach((function(t){e.intersect(t.getBBox())&&i.push(o.findViewByModel(t))})),i):i},isPositionWithinArea:function(e,t){var n=t.x,o=t.y,i=t.width,r=t.height;return e.x>=n&&e.x<=n+i&&e.y>=o&&e.y<=o+r},prepareConectedLinks:function(e){var t=this,n=this.paperManager.paper;this.conectedLinks=[],this.isValidSelectionLinks=!0,e.forEach((function(e){var o=t.graph.getConnectedLinks(e.model);if(e.model.component&&e.model.component.node.type===bi){var i=e.model.getBBox(),r=n.model.getLinks().filter((function(e){var n=e.getSourcePoint(),o=e.getTargetPoint();return t.isPositionWithinArea(n,i)||t.isPositionWithinArea(o,i)}));r&&(o=[].concat(m(o),m(r)))}o.forEach((function(e){var o=n.findViewByModel(e);t.conectedLinks.some((function(e){return e.id===o.id}))||(t.conectedLinks.push(o),t.validateSelectionLinks(o))}))}))},validateSelectionLinks:function(e){if(this.isValidSelectionLinks){var t=this.selected.find((function(t){return t.model.get("id")===e.model.getSourceElement().get("id")})),n=this.selected.find((function(t){return t.model.get("id")===e.model.getTargetElement().get("id")}));this.isValidSelectionLinks=!(!t||!n)}},getSelectionVertex:function(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n=arguments.length>2&&void 0!==arguments[2]&&arguments[2],o={x:1/0,y:1/0},i={width:0,height:0},r=this.useModelGeometry,s=["PoolLane","standard.Link"];return e.filter((function(e){return n||!s.includes(e.model.get("type"))})).map((function(e){var n=t?e.model.getBBox({useModelGeometry:r}):e.getBBox({useModelGeometry:r}).inflate(7);o.x=Math.min(o.x,n.x),o.y=Math.min(o.y,n.y),i.width=Math.max(i.width,n.x+n.width),i.height=Math.max(i.height,n.y+n.height)})),{minX:o.x,minY:o.y,maxX:i.width,maxY:i.height}},updateSelectionBox:function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0],t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];if(e||this.isSelecting&&this.style)if(this.selected.length>0){var n=this.getSelectionVertex(this.selected,!1,!0);this.style.left="".concat(n.minX,"px"),this.style.top="".concat(n.minY,"px"),this.left=parseInt(this.style.left),this.top=parseInt(this.style.top),this.style.width="".concat(n.maxX-n.minX,"px"),this.style.height="".concat(n.maxY-n.minY,"px")}else t&&this.clearSelection()},filterSelected:function(){var e=[Nl,Wn,Zn,os,Vl],t=this.selected.filter((function(e){return e.model.component})).filter((function(e){return"processmaker-modeler-pool"===e.model.component.node.type})).map((function(e){return e.model.component.node.id}));this.selected=this.selected.filter((function(n){if(n.model.component&&n.model.component.node.pool)return n.model.component.node.pool&&!t.includes(n.model.component.node.pool.component.node.id);if(n.model.component&&e.includes(n.model.component.node.type)){var o=n.model.getParentCell();if(o.component&&o.component.node.pool)return!t.includes(o.component.node.pool.component.node.id)}return!0}))},translateChanged:function(){this.isSelecting&&this.updateSelectionBox()},hasLanes:function(e){var t=["processmaker-modeler-lane"],n=e.find((function(e){return t.includes(e.model.component.node.type)}));return!!n},hasOnlyLinks:function(e){var t=this.selected.filter((function(e){return"standard.Link"===e.model.get("type")}));return t&&e.length===t.length},hasOnlyPools:function(e){var t=this.selected.filter((function(e){return e.model.component&&e.model.component.node.type===bi}));return t&&e.length===t.length},startDrag:function(e){if(this.$refs.drag){this.stopForceMove=!1,this.dragging=!0,this.hasMouseMoved=!1;var t=a.util.normalizeEvent(e);this.mouseX=t.clientX,this.mouseY=t.clientY,this.top=this.$refs.drag.offsetTop,this.left=this.$refs.drag.offsetLeft,this.initialPosition={top:this.top,left:this.left},this.hasLanes(this.selected)||this.hasOnlyLinks(this.selected)?this.stopForceMove=!0:this.selected&&1===this.selected.length&&"processmaker.components.nodes.boundaryEvent.Shape"===this.selected[0].model.get("type")&&this.selected[0].model.component.attachToValidTarget(this.selected[0])}},drag:function(e){if(!this.stopForceMove&&this.dragging){this.hasMouseMoved=!0;var t=a.util.normalizeEvent(e),n=t.clientX-this.mouseX,o=t.clientY-this.mouseY;this.top+=o,this.left+=n,this.mouseX=t.clientX,this.mouseY=t.clientY;var i=this.paperManager.paper.scale();this.style.left="".concat(this.left,"px"),this.style.top="".concat(this.top,"px"),this.translateSelectedShapes(n/i.sx,o/i.sy),this.overPoolDrag(e)}},stopDrag:function(){var e=this;return y(v().mark((function t(){return v().wrap((function(t){while(1)switch(t.prev=t.next){case 0:return e.dragging=!1,e.stopForceMove=!1,t.next=4,e.$nextTick();case 4:return t.next=6,e.paperManager.awaitScheduledUpdates();case 6:e.overPoolStopDrag(),e.updateSelectionBox();case 8:case"end":return t.stop()}}),t)})))()},updateFlowsWaypoint:function(){this.conectedLinks.forEach((function(e){if(e.model.component&&"standard.Link"===e.model.get("type")){var t=e.sourceAnchor,n=e.targetAnchor;e.model.component.node.diagram.waypoint=[t].concat(m(e.model.component.shape.vertices()),[n]).map((function(t){return e.model.component.moddle.create("dc:Point",t)}))}}))},translateSelectedShapes:function(e,t,n){var o=["PoolLane","standard.Link","processmaker.components.nodes.boundaryEvent.Shape"],i=this.selected.filter((function(e){return!o.includes(e.model.get("type"))}));if(n&&i.filter((function(e){return n.model.get("id")!==e.model.get("id")})),this.selected&&1===this.selected.length&&"processmaker.components.nodes.boundaryEvent.Shape"===this.selected[0].model.get("type"))return this.selected[0].model.translate(e,t),void this.selected[0].model.component.turnInvalidTargetRed();i.forEach((function(n){return n.model.translate(e,t)}))},getShapesFromPoint:function(e){var t=a.util.normalizeEvent(e),n=t.clientX,o=t.clientY,i=(0,a.V)(this.paperManager.paper.viewport).toLocalPoint(n,o);return this.paperManager.paper.findViewsFromPoint(i)},addToHighlightedNodes:function(e){if(bn.commit("highlightNode"),e.length>0){var t=e.filter((function(e){return e.model.component})).map((function(e){return e.model.component.node}));bn.commit("addToHighlightedNodes",t)}else bn.commit("highlightNode",this.processNode)},getChildShape:function(e){var t=null,n=this.getShapesFromPoint(e);return 1===n.length?n[0]:(n.forEach((function(e){e.model.get("parent")&&e.model.component.node.type!==Tl&&(t=e)})),t)},markSelectedByPoint:function(e){var t=this.getChildShape(e);t&&(this.selected=[t]),this.selected.length>0&&(this.isSelected=!0,this.isSelecting=!0,this.showLasso=!0,this.updateSelectionBox())},getElementsInsideSelector:function(){var e=this.paperManager.paper,t=e.$el.offset(),n={left:this.$el.offsetLeft+t.left,top:this.$el.offsetTop+t.top},o=this.$el.clientWidth,i=this.$el.clientHeight,r=(0,a.V)(e.viewport).toLocalPoint(n.left,n.top);r.x-=window.pageXOffset,r.y-=window.pageYOffset;var s=e.scale();o/=s.sx,i/=s.sy;var l=a.g.rect(r.x,r.y,o,i);return this.getElementsInSelectedArea(l,{strict:!1})},getPool:function(e){var t=this.paperManager.paper,n=null;return e&&e.length>0&&e.forEach((function(e){var t=e.model;n||t.getParentCell()&&t.getParentCell().component.node.type===bi&&(n=t.getParentCell())})),t.findViewByModel(n)},isNotPoolChilds:function(e){if(e.length>0){var t=e.find((function(e){var t=e.model;return t.component&&t.component.node.type===bi})),n=e.find((function(e){var t=e.model;return t.getParentCell()&&t.getParentCell().component.node.type===bi}));return!!t||!n}return!1},overPoolDrag:function(e){if(!this.isNotPoolChilds(this.selected)){var t=this.getPool(this.selected),n=this.getShapesFromPoint(e),o=n.find((function(e){return e.model.component&&e.model.component.node.type===bi}));this.newPool=null,this.oldPool=null,o?(this.paperManager.setStateValid(),this.invalidPool&&(this.invalidPool.model.component.shape.attr("body/fill",Ce),this.invalidPool=null),t&&t.model.get("id")!==o.model.get("id")&&(this.newPool=o,this.oldPool=t,this.isOutOfThePool=!1,this.isValidSelectionLinks||(this.isOutOfThePool=!0,this.invalidPool=o,o.model.component.shape.attr("body/fill",fe),bn.commit("preventSavingElementPosition")))):(this.isOutOfThePool=!0,bn.commit("preventSavingElementPosition"),this.paperManager.setStateInvalid())}},overPoolStopDrag:function(){var e=this;return y(v().mark((function t(){return v().wrap((function(t){while(1)switch(t.prev=t.next){case 0:if(!e.isNotPoolChilds(e.selected)){t.next=4;break}return e.updateFlowsWaypoint(),e.$emit("save-state"),t.abrupt("return");case 4:e.isOutOfThePool?(e.rollbackSelection(),e.invalidPool&&(e.invalidPool.model.component.shape.attr("body/fill",Ce),e.invalidPool=null)):(e.updateFlowsWaypoint(),e.newPool?(e.moveElements(e.selected,e.oldPool,e.newPool),e.moveConectedLinks(e.conectedLinks,e.oldPool,e.newPool),e.newPool=null,e.oldPool=null,e.updateLaneChildren(e.selected),e.$emit("save-state")):(e.expandToFitElement(e.selected),e.updateLaneChildren(e.selected),e.$emit("save-state")));case 5:case"end":return t.stop()}}),t)})))()},rollbackSelection:function(){var e=this;return y(v().mark((function t(){var n,o,i,r;return v().wrap((function(t){while(1)switch(t.prev=t.next){case 0:return n=e.initialPosition.left-e.left,o=e.initialPosition.top-e.top,e.style.left="".concat(e.initialPosition.left,"px"),e.style.top="".concat(e.initialPosition.top,"px"),i=e.paperManager.paper.scale(),r=["PoolLane","standard.Link","processmaker.components.nodes.boundaryEvent.Shape"],e.selected.filter((function(e){return!r.includes(e.model.get("type"))})).forEach((function(e){e.model.translate(n/i.sx,o/i.sy)})),e.isOutOfThePool=!1,t.next=10,bn.commit("allowSavingElementPosition");case 10:return e.paperManager.setStateValid(),t.next=13,e.$nextTick();case 13:return t.next=15,e.paperManager.awaitScheduledUpdates();case 15:e.updateSelectionBox(!0);case 16:case"end":return t.stop()}}),t)})))()},expandToFitElement:function(e){if(e.length>0){var t=e.find((function(e){var t=e.model;return!!t.getParentCell()&&t.getParentCell().component.node.type===bi})).model.getParentCell(),n=this.getSelectionVertex(this.selected,!0),o=t.getBBox(),i=o.x,r=o.y,s=o.width,a=o.height,l=n.maxX-n.minX,c=n.maxY-n.minY,d=n.minX-i,u=n.minY-r,p=d+l,h=d,f=u,m=u+c,g=0,v=0,b="bottom",y="right";p>s-Uf&&(g=p+Uf),h<qf+Uf&&(g=s+(qf+Uf-h),y="left"),f<Uf&&(v=Uf-f+a,b="top"),m>a&&(v=m+Uf),(g||v)&&(t.resize(Math.max(g,s),Math.max(v,a),{direction:"".concat(b,"-").concat(y)}),t.component.fixResizeRounding(),t.component.laneSet&&(t.component.resizeLanes(),t.component.sortedLanes().forEach((function(e){bn.commit("updateNodeBounds",{node:e.component.node,bounds:e.getBBox()})}))),t.component.updateAnchorPointPosition(),bn.commit("updateNodeBounds",{node:t.component.node,bounds:t.getBBox()}))}},updateLaneChildren:function(e){if(e){var t=e.find((function(e){var t=e.model;return!!t.getParentCell()&&t.getParentCell().component.node.type===bi}));t&&(t.model.getParentCell(),t.model.component.laneSet&&t.component.updateLaneChildren())}},moveElements:function(e,t,n){var o=["PoolLane","standard.Link","processmaker.components.nodes.boundaryEvent.Shape"];e.filter((function(e){return!o.includes(e.model.get("type"))})).forEach((function(e){t.model.component.moveElement(e.model,n.model)}))},moveConectedLinks:function(e,t,n){e.forEach((function(e){t.model.component.moveFlow(e.model,n.model)}))}}},jk=Lk,Fk=(h(40213),qn(jk,Wx,$x,!1,null,"82f4c144",null)),zk=Fk.exports,qk={components:{ToolBar:dw,ExplorerRail:Lg,InspectorButton:Zg,InspectorPanel:cv,ProcessmakerModelerGenericFlow:Gx,Selection:zk,RailBottom:Lx},props:{owner:Object,decorations:{type:Object,default:function(){return{}}},readOnly:{type:Boolean,default:function(){return!1}},validationBar:Array,requestIdleNodes:{type:Array,default:function(){return[]}},requestCompletedNodes:{type:Array,default:function(){return[]}},requestInProgressNodes:{type:Array,default:function(){return[]}}},mixins:[Sw,Gw],data:function(){return{pasteInProgress:!1,cloneInProgress:!1,internalClipboard:[],tooltipTarget:null,parsers:{},extensions:[],nodeRegistry:{},graph:null,paper:null,paperManager:null,definitions:null,nodeIdGenerator:null,planeElements:null,canvasDragPosition:null,processNode:null,collaboration:null,moddle:null,allowDrop:!0,poolTarget:null,processes:[],cursor:null,parentHeight:null,parentWidth:null,linter:null,validationErrors:{},miniMapOpen:!1,panelsCompressed:!1,isOpenInspector:!1,isGrabbing:!1,isRendering:!1,allWarnings:[],nodeTypes:[],pmBlockNodes:[],breadcrumbData:[],activeNode:null,xmlManager:null,previouslyStackedShape:null,keyMod:this.isAppleOS()?"Command":"Control",canvasScale:1,initialScale:1,minimumScale:.2,scaleStep:.1,isDragging:!1,isSelecting:!1,isIntoTheSelection:!1,dragStart:null}},watch:{isRendering:function(){var e="Loading process, please be patient.";if(this.isRendering)return window.ProcessMaker.alert(e,"warning"),document.body.style.cursor="wait !important",void(this.cursor="wait");window.ProcessMaker.navbar.alerts=window.ProcessMaker.navbar.alerts.filter((function(t){return t.alertText!==e})),document.body.style.cursor="auto",this.cursor=null},currentXML:function(){this.validateIfAutoValidateIsOn()},definitions:function(){this.validateIfAutoValidateIsOn()},autoValidate:function(){this.validateIfAutoValidateIsOn()},canvasScale:function(e){this.paperManager.scale=e}},computed:{noElementsSelected:function(){return 0===this.highlightedNodes.filter((function(e){return!e.isType("processmaker-modeler-process")})).length},tooltipTitle:function(){if(this.tooltipTarget)return this.tooltipTarget.$el.data("title")},autoValidate:function(){return bn.getters.autoValidate},nodes:function(){return bn.getters.nodes},currentXML:function(){return dv.getters.currentState},copiedElements:function(){return bn.getters.copiedElements},highlightedNode:function(){return bn.getters.highlightedNodes[0]},highlightedNodes:function(){return bn.getters.highlightedNodes},invalidNodes:function(){return qw(this.validationErrors,this.nodes)},showComponent:function(){return bn.getters.showComponent}},methods:{handleToggleInspector:function(e){this.isOpenInspector=e},isAppleOS:function(){return"undefined"!==typeof navigator&&/Mac|iPad|iPhone/.test(navigator.platform)},shapeResize:function(){var e=arguments,t=this;return y(v().mark((function n(){var o;return v().wrap((function(n){while(1)switch(n.prev=n.next){case 0:return o=!(e.length>0&&void 0!==e[0])||e[0],n.next=3,t.$nextTick();case 3:return n.next=5,t.paperManager.awaitScheduledUpdates();case 5:t.$refs.selector.updateSelectionBox(!0,o);case 6:case"end":return n.stop()}}),n)})))()},toggleDefaultFlow:function(e){var t=e.definition.sourceRef;t.default&&t.default.id===e.id&&(e=null),t.set("default",e)},cloneElement:function(e,t){var n=e.clone(this.nodeRegistry,this.moddle,this.$t),o=(e.diagram.bounds.height+30)*t;n.diagram.bounds.y+=o,this.addNode(n)},copyElement:function(){var e=[Nl,Wn,Zn,Bo,iv],t=[Mb,Rb,Hb,Zb,iy,py];1===this.highlightedNodes.length&&(e.includes(this.highlightedNodes[0].type)||t.includes(this.highlightedNodes[0].type))||(bn.commit("setCopiedElements",this.cloneNodesSelection()),this.$bvToast.toast(this.$t("Object(s) have been copied"),{noCloseButton:!0,variant:"success",solid:!0,toaster:"b-toaster-top-center"}))},publishTemplate:function(){this.$emit("publishTemplate")},publishPmBlock:function(){this.$emit("publishPmBlock")},pasteElements:function(){var e=this;return y(v().mark((function t(){return v().wrap((function(t){while(1)switch(t.prev=t.next){case 0:if(!(e.copiedElements.length>0)||e.pasteInProgress){t.next=21;break}return e.pasteInProgress=!0,t.prev=2,t.next=5,e.addClonedNodes(e.copiedElements);case 5:return t.next=7,e.$nextTick();case 7:return t.next=9,e.paperManager.awaitScheduledUpdates();case 9:return t.next=11,e.$refs.selector.selectElements(e.findViewElementsFromNodes(e.copiedElements),!0);case 11:return t.next=13,e.$nextTick();case 13:return t.next=15,bn.commit("setCopiedElements",e.cloneNodesSelection());case 15:e.scrollToSelection();case 16:return t.prev=16,e.pasteInProgress=!1,t.next=20,e.pushToUndoStack();case 20:return t.finish(16);case 21:case"end":return t.stop()}}),t,null,[[2,,16,21]])})))()},cloneSelection:function(){var e=this;return y(v().mark((function t(){var n;return v().wrap((function(t){while(1)switch(t.prev=t.next){case 0:if(n=e.cloneNodesSelection(),!n||0!==n.length){t.next=3;break}return t.abrupt("return");case 3:return t.prev=3,e.cloneInProgress=!0,e.$refs.selector.clearSelection(),t.next=8,e.addClonedNodes(n);case 8:return t.next=10,e.$nextTick();case 10:return t.next=12,e.paperManager.awaitScheduledUpdates();case 12:return t.next=14,e.$refs.selector.selectElements(e.findViewElementsFromNodes(n));case 14:e.scrollToSelection();case 15:return t.prev=15,e.cloneInProgress=!1,t.next=19,e.pushToUndoStack();case 19:return t.finish(15);case 20:case"end":return t.stop()}}),t,null,[[3,,15,20]])})))()},scrollToSelection:function(){var e=this.$refs["paper-container"].getBoundingClientRect(),t=this.$refs.selector,n=t.$el.getBoundingClientRect();if(n.right>e.right||n.bottom>e.bottom||n.left<e.left||n.top<e.top){var o=this.paper.translate(),i=o.ty-(n.top-e.top-n.height);this.paper.translate(o.tx,i),t.updateSelectionBox(!0)}},findViewElementsFromNodes:function(e){var t=this;return e.map((function(e){var n=t.$refs.nodeComponent.find((function(t){return t.node===e})),o=n.shape;return t.paper.findViewByModel(o)}))},close:function(){var e=this;return y(v().mark((function t(){return v().wrap((function(t){while(1)switch(t.prev=t.next){case 0:e.$emit("close");case 1:case"end":return t.stop()}}),t)})))()},saveBpmn:function(){var e=this;return y(v().mark((function t(){var n,o,i,r,s;return v().wrap((function(t){while(1)switch(t.prev=t.next){case 0:return n=document.querySelector(".mini-paper svg"),o="text { font-family: sans-serif; }",i=document.createElement("style"),i.appendChild(document.createTextNode(o)),n.appendChild(i),t.next=7,e.getXmlFromDiagram();case 7:r=t.sent,s=(new XMLSerializer).serializeToString(n),e.$emit("saveBpmn",{xml:r,svg:s});case 10:case"end":return t.stop()}}),t)})))()},borderOutline:function(e){return this.decorations.borderOutline&&this.decorations.borderOutline[e]},addWarning:function(e){this.allWarnings.push(e),this.$emit("warnings",this.allWarnings)},validatePlaneElements:function(){var e=this;this.planeElements.filter((function(e){return!e.bpmnElement})).map((function(t){return{title:e.$t("Non-existent Element"),text:e.$t("bpmdi:BPMNShape ")+t.id+e.$t(" references a non-existent element and was not parsed")}})).forEach((function(t){return e.addWarning(t)}))},cleanPlaneElements:function(){Fg()(this.planeElements,(function(e){return!e.bpmnElement}))},getTooltipTarget:function(){return this.tooltipTarget.$el[0]},validateIfAutoValidateIsOn:function(){this.autoValidate&&this.validateBpmnDiagram()},translateConfig:function(e){if(e.config){var t=e.config;t.label=this.$t(t.label),t.helper=this.$t(t.helper)}e.items&&e.items.forEach(this.translateConfig)},pushToUndoStack:function(){var e=this;return y(v().mark((function t(){var n;return v().wrap((function(t){while(1)switch(t.prev=t.next){case 0:if(!e.pasteInProgress&&!e.cloneInProgress){t.next=2;break}return t.abrupt("return");case 2:return t.prev=2,t.next=5,e.getXmlFromDiagram();case 5:return n=t.sent,t.next=8,dv.dispatch("pushState",n);case 8:window.ProcessMaker.EventBus.$emit("modeler-change"),t.next=14;break;case 11:t.prev=11,t.t0=t["catch"](2),console.warn(t.t0.message);case 14:case"end":return t.stop()}}),t,null,[[2,11]])})))()},getXmlFromDiagram:function(){var e=this;return new Promise((function(t,n){e.toXML((function(e,o){e?n(e):t(o)}))}))},validateBpmnDiagram:function(){var e=this;return y(v().mark((function t(){return v().wrap((function(t){while(1)switch(t.prev=t.next){case 0:if(bn.getters.globalProcesses&&0!==bn.getters.globalProcesses.length){t.next=3;break}return t.next=3,bn.dispatch("fetchGlobalProcesses");case 3:return t.next=5,e.linter.lint(e.definitions);case 5:e.validationErrors=t.sent,e.$emit("validate",e.validationErrors);case 7:case"end":return t.stop()}}),t)})))()},setPools:function(e){var t;(this.collaboration||(this.collaboration=this.moddle.create("bpmn:Collaboration"),this.definitions.get("rootElements").push(this.collaboration),this.collaboration.set("id","collaboration_0"),this.plane.set("bpmnElement",this.collaboration)),e.get("processRef"))?this.collaboration.get("participants").includes(e)||this.collaboration.get("participants").push(e):(0===this.collaboration.get("participants").length?t=this.processNode.definition:(t=this.moddle.create("bpmn:Process"),this.processes.push(t),t.set("id",this.nodeIdGenerator.generateProcessId()),this.definitions.get("rootElements").push(t)),e.set("processRef",t),this.collaboration.get("participants").push(e))},unsetPools:function(){Gr()(this.definitions.get("rootElements"),this.collaboration),this.plane.set("bpmnElement",this.processNode.definition),this.collaboration=null},highlightNode:function(e,t){if(e&&this.highlightedNode)if(t&&t.shiftKey)bn.commit("addToHighlightedNodes",[e]);else{var n=Gn().isEqual(e.id,this.highlightedNode.id);n||bn.commit("highlightNode",e)}},blurFocusedScreenBuilderElement:function(){var e=["INPUT","SELECT"];e.includes(document.activeElement&&document.activeElement.tagName)&&document.activeElement.blur()},registerStatusBar:function(e){this.owner.validationBar.push(e)},registerComponentMixin:function(e,t){e.mixins||(e.mixins=[]),e.mixins.push(t)},registerBpmnExtension:function(e,t){this.extensions[e]=t},registerNode:function(e,t){var n=this,o=function(){return e.id},i=function(t){if(t.get("implementation")===e.implementation)return e.id};this.translateConfig(e.inspectorConfig[0]),Uw(e),this.nodeRegistry[e.id]=e,vt().component(e.id,e.component),this.nodeTypes.push(e);var r=Array.isArray(e.bpmnType)?e.bpmnType:[e.bpmnType];r.forEach((function(r){n.parsers[r]||(n.parsers[r]={custom:[],implementation:[],default:[]}),t?n.parsers[r].custom.push(t):e.implementation?n.parsers[r].implementation.push(i):n.parsers[r].default.push(o)}))},registerPmBlock:function(e,t){var n=this,o=function(){return e.id};this.translateConfig(e.inspectorConfig[0]),Uw(e),this.nodeRegistry[e.id]=e,vt().component(e.id,e.component),this.pmBlockNodes.push(e);var i=Array.isArray(e.bpmnType)?e.bpmnType:[e.bpmnType];i.forEach((function(e){n.parsers[e]||(n.parsers[e]={custom:[],implementation:[],default:[]}),t?n.parsers[e].custom.push(t):n.parsers[e].default.push(o)})),pg.commit("setPmBlockNodeTypes",this.pmBlockNodes)},addMessageFlows:function(){this.collaboration&&this.collaboration.get("messageFlows").filter(this.hasSourceAndTarget).forEach(this.setNode)},loadAssociations:function(e,t){var n=this;t.filter((function(e){return"bpmn:Association"===e.$type&&n.hasSourceAndTarget(e)})).forEach((function(o){return n.setNode(o,e,t)}))},loadDataAssociations:function(e){var t=this,n=e.filter((function(e){return e.get("dataOutputAssociations")&&e.get("dataOutputAssociations").length>0}));n.forEach((function(n){n.get("dataOutputAssociations").forEach((function(n){t.setNode(n,e)}))}));var o=e.filter((function(e){return e.get("dataInputAssociations")&&e.get("dataInputAssociations").length>0}));o.forEach((function(n){n.get("dataInputAssociations").forEach((function(n){t.setNode(n,e)}))}))},loadArtifacts:function(e,t){var n=this;t.filter((function(e){return"bpmn:Association"!==e.$type})).forEach((function(o){return n.setNode(o,e,t)}))},loadSequenceFlows:function(e,t){var n=this;e.filter((function(e){return"bpmn:SequenceFlow"===e.$type&&n.hasSourceAndTarget(e)})).forEach((function(o){return n.setNode(o,e,t)}))},loadFlowElements:function(e,t){var n=this;e.filter((function(e){return"bpmn:SequenceFlow"!==e.$type})).forEach((function(o){return n.setNode(o,e,t)}))},addLanes:function(e){e.get("laneSets")[0]&&e.laneSets[0].lanes.forEach(this.setNode)},addPools:function(){this.collaboration&&this.collaboration.get("participants").forEach(this.setNode)},setUpDiagram:function(){var e=this;this.processes.forEach((function(t){e.ensureCancelActivityIsAddedToBoundaryEvents(t),e.addLanes(t);var n=t.get("flowElements"),o=t.get("artifacts");e.loadFlowElements(n,o),e.loadSequenceFlows(n,o),e.loadArtifacts(n,o),e.loadAssociations(n,o),e.loadDataAssociations(n)})),bn.commit("setRootElements",this.definitions.rootElements),this.addMessageFlows(),bn.commit("highlightNode",this.processNode)},getCollaboration:function(){return this.definitions.rootElements.find((function(e){var t=e.$type;return"bpmn:Collaboration"===t}))},getProcesses:function(){return this.definitions.rootElements.filter((function(e){var t=e.$type;return"bpmn:Process"===t}))},getPlane:function(){return this.definitions.diagrams[0].plane},getPlaneElements:function(){return this.plane.get("planeElement")},parse:function(){var e=this;this.collaboration=this.getCollaboration(),this.processes=this.getProcesses(),this.plane=this.getPlane(),this.planeElements=this.getPlaneElements(),this.validatePlaneElements(),this.cleanPlaneElements(),this.processNode=new Ro("processmaker-modeler-process",this.processes[0],this.planeElements.find((function(t){return t.bpmnElement.id===e.processes[0].id})))},removeUnsupportedElementAttributes:function(e){var t=["extensionElements"];t.filter((function(t){return e.get(t)})).forEach((function(t){return e.set(t,void 0)}))},getCustomParser:function(e){var t=this,n=this.parsers[e.$type];if(n){var o=n.custom.find((function(n){return n(e,t.moddle)})),i=n.implementation.find((function(n){return n(e,t.moddle)})),r=n.default.find((function(n){return n(e,t.moddle)}));return o||i||r}},handleUnsupportedElement:function(e,t,n,o,i){this.addWarning({title:this.$t("Unsupported Element"),text:e+this.$t(" is an unsupported element type in parse")}),Gr()(t,n),Gr()(o,n),Gr()(this.planeElements,i),this.collaboration&&Gr()(this.collaboration.get("messageFlows"),n);var r=n.get("incoming");r&&Gr()(t,r);var s=n.get("outgoing");s&&Gr()(t,s)},setNode:function(e,t,n){var o=this.planeElements.find((function(t){return t.bpmnElement.id===e.id})),i=e.$type,r=this.getCustomParser(e);if(r){this.removeUnsupportedElementAttributes(e);var s=e.config?JSON.parse(e.config):{},a=(null===s||void 0===s?void 0:s.processKey)||r(e,this.moddle),l=["bpmn:TextAnnotation","bpmn:Association","bpmn:DataOutputAssociation","bpmn:DataInputAssociation"],c=-1===l.indexOf(i);c&&!e.get("name")&&e.set("name",""),this.createNodeAsync(a,e,o)}else this.handleUnsupportedElement(i,t,e,n,o)},createNodeAsync:function(e,t,n){var o=this;return y(v().mark((function i(){var r;return v().wrap((function(i){while(1)switch(i.prev=i.next){case 0:r=o.createNode(e,t,n),bn.commit("addNode",r);case 2:case"end":return i.stop()}}),i)})))()},createNode:function(e,t,n){return Ro.isTimerType(e)?new Tw(e,t,n):(Object.keys(t).forEach((function(e){void 0!==t[e]&&null!==t[e]||delete t[e]})),new Ro(e,t,n))},hasSourceAndTarget:function(e){var t=e.sourceRef&&this.parsers[e.sourceRef.$type],n=e.targetRef&&this.parsers[e.targetRef.$type];return t&&n},waitForCursorToChange:function(){var e=this;return y(v().mark((function t(){var n;return v().wrap((function(t){while(1)switch(t.prev=t.next){case 0:return n=300,t.next=3,e.$nextTick();case 3:return t.abrupt("return",new Promise((function(e){return setTimeout(e,n)})));case 4:case"end":return t.stop()}}),t)})))()},renderPaper:function(){var e=this;return y(v().mark((function t(){return v().wrap((function(t){while(1)switch(t.prev=t.next){case 0:return e.isRendering=!0,t.next=3,e.paperManager.performAtomicAction(y(v().mark((function t(){return v().wrap((function(t){while(1)switch(t.prev=t.next){case 0:return t.next=2,e.waitForCursorToChange();case 2:e.parse(),e.addPools(),e.setUpDiagram();case 5:case"end":return t.stop()}}),t)}))));case 3:return t.next=5,e.paperManager.awaitScheduledUpdates();case 5:e.isRendering=!1,e.$emit("parsed");case 7:case"end":return t.stop()}}),t)})))()},loadXML:function(){var e=arguments,t=this;return y(v().mark((function n(){var o,i;return v().wrap((function(n){while(1)switch(n.prev=n.next){case 0:return o=e.length>0&&void 0!==e[0]?e[0]:null,i=!1,null===o&&(o=t.currentXML,i=!0),n.next=5,t.xmlManager.getDefinitionsFromXml(o);case 5:return t.definitions=n.sent,t.xmlManager.definitions=t.definitions,t.nodeIdGenerator=Hh(t.definitions),bn.commit("clearNodes"),n.next=11,t.renderPaper();case 11:i&&window.ProcessMaker.EventBus.$emit("modeler-change");case 12:case"end":return n.stop()}}),n)})))()},getBoundaryEvents:function(e){return e.get("flowElements").filter((function(e){var t=e.$type;return"bpmn:BoundaryEvent"===t}))},createBoundaryEvent:function(e){var t=sg.definition(this.moddle,this.$t);return t.set("id",e.get("id")),t.set("name",e.get("name")),t.set("eventDefinitions",e.get("eventDefinitions")),t.set("cancelActivity",e.get("cancelActivity")),t.set("attachedToRef",e.get("attachedToRef")),t.set("color",e.get("color")),t.$parent=e.$parent,e.get("outgoing").length>0&&t.set("outgoing",e.get("outgoing")),t},ensureCancelActivityIsAddedToBoundaryEvents:function(e){var t=this;this.getBoundaryEvents(e).forEach((function(n){var o=t.createBoundaryEvent(n);n.get("outgoing").forEach((function(e){return e.set("sourceRef",o)})),t.replaceDefinition(n,o,e)}))},replaceDefinition:function(e,t,n){var o=n.get("flowElements").indexOf(e);n.flowElements[o]=t;var i=this.planeElements.find((function(t){return t.bpmnElement===e}));i.bpmnElement=t},toXML:function(e){this.moddle.toXML(this.definitions,{format:!0},e)},onCreateElementHandler:function(e){var t=e.event,n=e.control;this.handleDrop({clientX:t.clientX,clientY:t.clientY,control:n})},handleDrop:function(e){var t=this;return y(v().mark((function n(){var o,i,r,s,a,l,c,d,u,p,h;return v().wrap((function(n){while(1)switch(n.prev=n.next){case 0:if(o=e.clientX,i=e.clientY,r=e.control,s=e.nodeThatWillBeReplaced,t.validateDropTarget({clientX:o,clientY:i,control:r}),t.allowDrop){n.next=4;break}return n.abrupt("return");case 4:return a=t.nodeRegistry[r.type].definition(t.moddle,t.$t),l=t.nodeRegistry[r.type].diagram(t.moddle),c=t.paperManager.clientToGridPoint(o,i),d=c.x,u=c.y,l.bounds.x=d,l.bounds.y=u,p=t.createNode(r.type,a,l),p.isBpmnType("bpmn:BoundaryEvent")&&t.setShapeCenterUnderCursor(l),t.highlightNode(p),n.next=14,t.addNode(p);case 14:if(s){n.next=16;break}return n.abrupt("return");case 16:return h=new Hw(s,a,t.graph,p,t.processes,t.collaboration),h.migrate(),n.abrupt("return",p);case 19:case"end":return n.stop()}}),n)})))()},setShapeCenterUnderCursor:function(e){e.bounds.x-=e.bounds.width/2,e.bounds.y-=e.bounds.height/2},selectNewNode:function(e){var t=this;return y(v().mark((function n(){var o,i;return v().wrap((function(n){while(1)switch(n.prev=n.next){case 0:return n.next=2,t.$nextTick();case 2:return n.next=4,t.paperManager.awaitScheduledUpdates();case 4:return o=t.$refs.nodeComponent.find((function(t){return t.node===e})),i=o.shapeView,n.next=8,t.$refs.selector.selectElement(i);case 8:case"end":return n.stop()}}),n)})))()},addNode:function(e){var t=this;return y(v().mark((function n(){var o;return v().wrap((function(n){while(1)switch(n.prev=n.next){case 0:if(e.pool||(e.pool=t.poolTarget),o=e.getTargetProcess(t.processes,t.processNode),uw(e,o),e.setIds(t.nodeIdGenerator),t.planeElements.push(e.diagram),bn.commit("addNode",e),t.poolTarget=null,![Nl,Tl,os,Vl,Wn,Zn,Bo].includes(e.type)){n.next=9;break}return n.abrupt("return");case 9:return t.selectNewNode(e),n.abrupt("return",new Promise((function(e){setTimeout((function(){t.pushToUndoStack(),e()}))})));case 11:case"end":return n.stop()}}),n)})))()},addClonedNodes:function(e){var t=this;return y(v().mark((function n(){return v().wrap((function(n){while(1)switch(n.prev=n.next){case 0:e.forEach((function(e){e.pool||(e.pool=t.poolTarget);var n=e.getTargetProcess(t.processes,t.processNode);uw(e,n),t.planeElements.push(e.diagram),bn.commit("addNode",e),t.poolTarget=null}));case 1:case"end":return n.stop()}}),n)})))()},removeNode:function(e){var t=arguments,n=this;return y(v().mark((function o(){var i,r,s;return v().wrap((function(o){while(1)switch(o.prev=o.next){case 0:if(i=t.length>1&&void 0!==t[1]?t[1]:{},r=i.removeRelationships,s=void 0===r||r,e){o.next=3;break}return o.abrupt("return");case 3:return s&&(to(e,n),no(e,n),oo(e,n)),ro(e),io(n.graph,e,n.removeNode),so(e),n.removeNodesFromLane(e),n.removeNodesFromPool(e),bn.commit("removeNode",e),bn.commit("highlightNode",n.processNode),n.$refs.selector.clearSelection(),o.next=14,n.$nextTick();case 14:return o.next=16,n.pushToUndoStack();case 16:n.processes=n.getProcesses(),n.processes&&n.processes.length>0&&(n.processNode=new Ro("processmaker-modeler-process",n.processes[0],n.planeElements.find((function(e){return e.bpmnElement.id===n.processes[0].id}))));case 18:case"end":return o.stop()}}),o)})))()},removeNodes:function(){var e=this;return y(v().mark((function t(){return v().wrap((function(t){while(1)switch(t.prev=t.next){case 0:return t.next=2,e.performSingleUndoRedoTransaction(y(v().mark((function t(){return v().wrap((function(t){while(1)switch(t.prev=t.next){case 0:return t.next=2,e.paperManager.performAtomicAction(y(v().mark((function t(){var n;return v().wrap((function(t){while(1)switch(t.prev=t.next){case 0:return n=[],e.highlightedNodes.forEach((function(t){return n.push(e.removeNode(t,{removeRelationships:!0}))})),t.next=4,Promise.all(n);case 4:bn.commit("highlightNode");case 5:case"end":return t.stop()}}),t)}))));case 2:case"end":return t.stop()}}),t)}))));case 2:case"end":return t.stop()}}),t)})))()},replaceNode:function(e){var t=this,n=e.node,o=e.typeToReplaceWith;this.performSingleUndoRedoTransaction(y(v().mark((function e(){return v().wrap((function(e){while(1)switch(e.prev=e.next){case 0:return e.next=2,t.paperManager.performAtomicAction(y(v().mark((function e(){var i,r,s,a;return v().wrap((function(e){while(1)switch(e.prev=e.next){case 0:return i=t.paper.localToClientPoint(n.diagram.bounds),r=i.x,s=i.y,e.next=3,t.handleDrop({clientX:r,clientY:s,control:{type:o},nodeThatWillBeReplaced:n});case 3:return a=e.sent,e.next=6,t.removeNode(n,{removeRelationships:!1});case 6:t.highlightNode(a),t.selectNewNode(a);case 8:case"end":return e.stop()}}),e)}))));case 2:case"end":return e.stop()}}),e)}))))},replaceGenericFlow:function(e){var t=this,n=e.actualFlow,o=e.genericFlow,i=e.targetNode;this.performSingleUndoRedoTransaction(y(v().mark((function e(){return v().wrap((function(e){while(1)switch(e.prev=e.next){case 0:return e.next=2,t.paperManager.performAtomicAction(y(v().mark((function e(){return v().wrap((function(e){while(1)switch(e.prev=e.next){case 0:return e.next=2,t.highlightNode(null);case 2:return e.next=4,t.$nextTick();case 4:return e.next=6,t.addNode(n);case 6:return e.next=8,bn.commit("removeNode",o);case 8:return e.next=10,t.$nextTick();case 10:return e.next=12,t.highlightNode(i);case 12:case"end":return e.stop()}}),e)}))));case 2:case"end":return e.stop()}}),e)}))))},performSingleUndoRedoTransaction:function(e){var t=this;return y(v().mark((function n(){return v().wrap((function(n){while(1)switch(n.prev=n.next){case 0:return dv.commit("disableSavingState"),n.next=3,e();case 3:return dv.commit("enableSavingState"),n.next=6,t.pushToUndoStack();case 6:case"end":return n.stop()}}),n)})))()},removeNodesFromLane:function(e){var t=e.pool&&e.pool.component.laneSet&&e.pool.component.laneSet.get("lanes").find((function(t){return t.get("flowNodeRef").includes(e.definition)}));t&&Gr()(t.get("flowNodeRef"),e.definition)},removeNodesFromPool:function(e){var t=this;if("processmaker-modeler-pool"===e.type&&e.definition.processRef){e.definition.processRef.artifacts&&e.definition.processRef.artifacts.forEach((function(e){var n=t.nodes.find((function(t){return t.definition===e}));n&&t.removeNode(n)})),e.definition.processRef.flowElements&&e.definition.processRef.flowElements.forEach((function(e){var n=t.nodes.find((function(t){return t.definition===e}));n&&t.removeNode(n)}));var n=e.definition.processRef.laneSets;n&&n.length>0&&n[0].lanes.forEach((function(e){var n=t.nodes.find((function(t){return t.definition===e}));n&&t.removeNode(n)}))}},handleResize:function(){var e=this.$el.parentElement,t=e.clientWidth,n=e.clientHeight;this.parentWidth=t+"px",this.parentHeight=n+"px",this.paperManager.setPaperDimensions(t,n)},validateDropTarget:function(e){var t=e.clientX,n=e.clientY,o=e.control,i=tb(t,n,o,this.paperManager.paper,this.graph,this.collaboration,this.$refs["paper-container"]),r=i.allowDrop,s=i.poolTarget;this.allowDrop=r,this.poolTarget=s},isBpmnNode:function(e){return null!=e.component},setShapeStacking:function(e){var t=this;this.isRendering||!e.component.node.isType("processmaker-modeler-pool")&&e===this.previouslyStackedShape||(this.previouslyStackedShape=e,this.paperManager.performAtomicAction((function(){return ky(e,t.graph)})))},showSavedNotification:function(){dv.dispatch("saved")},enableVersions:function(){dv.dispatch("enableVersions")},setVersionIndicator:function(e){dv.dispatch("setVersionIndicator",e)},setLoadingState:function(e){dv.dispatch("setLoadingState",e)},clearSelection:function(){this.$refs.selector.clearSelection()},isPointInSelection:function(e){var t=this.$refs.selector.$el;if("function"===typeof t.getBoundingClientRect){var n=t.getBoundingClientRect(),o=n.x,i=n.y,r=n.width,s=n.height;if(e.clientX>=o&&e.clientX<=o+r&&e.clientY>=i&&e.clientY<=i+s)return!0}return!1},pointerDowInShape:function(e,t){var n=this;return y(v().mark((function o(){var i,r,s;return v().wrap((function(o){while(1)switch(o.prev=o.next){case 0:if(i=e.clientX,r=e.clientY,s=n.paper.findViewByModel(t),n.isDragging=!1,n.isSelecting=!1,n.isIntoTheSelection=!1,n.dragStart={x:i,y:r},!n.isPointInSelection(e)){o.next=10;break}n.isIntoTheSelection=!0,o.next=15;break;case 10:if(e.shiftKey){o.next=15;break}return o.next=13,n.$refs.selector.selectElement(s);case 13:return o.next=15,n.$nextTick();case 15:n.$refs.selector.startDrag({clientX:e.clientX,clientY:e.clientY});case 16:case"end":return o.stop()}}),o)})))()},pointerDownHandler:function(e){var t=e.clientX,n=e.clientY;this.isDragging=!1,this.isSelecting=!1,this.isIntoTheSelection=!1,this.dragStart={x:t,y:n},this.isPointInSelection(e)?(this.isIntoTheSelection=!0,this.$refs.selector.startDrag({clientX:e.clientX,clientY:e.clientY})):(this.isSelecting=!0,this.$refs.selector.startSelection(e))},pointerMoveHandler:function(e){var t=e.clientX,n=e.clientY;bn.getters.isReadOnly?this.canvasDragPosition&&!this.clientLeftPaper&&this.paperManager.translate(e.offsetX-this.canvasDragPosition.x,e.offsetY-this.canvasDragPosition.y):this.isGrabbing||(this.dragStart&&(Math.abs(t-this.dragStart.x)>5||Math.abs(n-this.dragStart.y)>5)?(this.isDragging=!0,this.dragStart=null):this.isSelecting?this.$refs.selector.updateSelection(e):this.isDragging&&this.$refs.selector.drag(e))},pointerUpHandler:function(e,t){!this.isDragging&&this.dragStart?t?this.$refs.selector.selectElement(t,e.shiftKey):this.clearSelection():this.isSelecting?this.$refs.selector.endSelection(this.paperManager.paper):this.$refs.selector.stopDrag(e),window.ProcessMaker.EventBus.$emit("custom-pointerclick",e),this.isDragging=!1,this.dragStart=null,this.isSelecting=!1}},created:function(){Wr()&&(window.store=bn,window.undoRedoStore=dv),this.$t=this.$t.bind(this),window.ProcessMaker.EventBus.$emit("modeler-before-init",{registerComponentMixin:this.registerComponentMixin}),this.registerNode(rv),window.ProcessMaker.EventBus.$emit("modeler-init",{registerInspectorExtension:vy,registerBpmnExtension:this.registerBpmnExtension,registerNode:this.registerNode,registerStatusBar:this.registerStatusBar,registerPmBlock:this.registerPmBlock}),this.moddle=new(lg())(this.extensions),this.linter=new uv.Linter(eb),this.xmlManager=new Lw(this.moddle),this.$emit("set-xml-manager",this.xmlManager)},mounted:function(){var e=this;bn.commit("setReadOnly",this.readOnly),this.graph=new a.dia.Graph,bn.commit("setGraph",this.graph),this.graph.set("interactiveFunc",(function(e){var t="standard.EmbeddedImage"===e.model.get("type");return{elementMove:t,labelMove:!1}})),this.paperManager=gy.factory(this.$refs.paper,this.graph.get("interactiveFunc"),this.graph),this.paper=this.paperManager.paper,this.paperManager.addEventHandler("cell:pointerdblclick",_w),this.handleResize(),window.addEventListener("resize",this.handleResize),bn.commit("setPaper",this.paperManager.paper),this.paperManager.addEventHandler("element:pointerclick",this.blurFocusedScreenBuilderElement,this),this.paperManager.addEventHandler("blank:pointerdown",(function(t,n,o){if(!e.isGrabbing){bn.getters.isReadOnly&&(e.isGrabbing=!0);var i=e.paperManager.scale;e.canvasDragPosition={x:n*i.sx,y:o*i.sy},e.isOverShape=!1,e.pointerDownHandler(t)}}),this),this.paperManager.addEventHandler("cell:mouseover element:mouseover",(function(t){var n=t.model;e.isBpmnNode(n)&&"default"!==n.attr("body/cursor")&&!e.isGrabbing&&n.attr("body/cursor","move"),e.isGrabbing&&e.isBpmnNode(n)&&n.attr("body/cursor","grabbing")})),this.paperManager.addEventHandler("blank:pointerup",(function(t){e.isGrabbing=!1,e.canvasDragPosition=null,e.activeNode=null,e.pointerUpHandler(t)}),this),this.paperManager.addEventHandler("cell:pointerup",(function(t,n){e.canvasDragPosition=null,e.activeNode=null,e.pointerUpHandler(n,t)}),this),this.$refs["paper-container"].addEventListener("mouseenter",(function(){bn.commit("setClientLeftPaper",!1)})),this.$el.addEventListener("mousemove",(function(t){e.pointerMoveHandler(t)})),this.$refs["paper-container"].addEventListener("mouseleave",(function(){e.paperManager.removeEventHandler("blank:pointermove"),bn.commit("setClientLeftPaper",!0)})),this.paperManager.addEventHandler("cell:pointerclick",(function(e,t,n,o){var i=e.model.get("onClick");i&&i(e,t,n,o)})),this.paperManager.addEventHandler("cell:pointerclick",(function(t,n){var o=t.model;e.isBpmnNode(o)&&(e.isGrabbing||(o.component.$emit("click",n),e.$emit("click",{event:n,node:e.highlightedNode.definition})))})),this.paperManager.addEventHandler("cell:pointerdown",(function(t,n){var o=t.model;e.isBpmnNode(o)&&(e.isGrabbing||(e.setShapeStacking(o),e.activeNode=o.component.node,e.isOverShape=!0,e.pointerDowInShape(n,o)))})),this.paperManager.addEventHandler("cell:pointermove",(function(t,n,o,i){if(e.isGrabbing){if(!e.canvasDragPosition){var r=e.paperManager.scale;e.canvasDragPosition={x:o*r.sx,y:i*r.sy}}e.canvasDragPosition&&!e.clientLeftPaper&&e.paperManager.translate(n.offsetX-e.canvasDragPosition.x,n.offsetY-e.canvasDragPosition.y)}})),window.ProcessMaker.EventBus.$emit("modeler-start",{loadXML:function(){var t=y(v().mark((function t(n){return v().wrap((function(t){while(1)switch(t.prev=t.next){case 0:return t.next=2,e.loadXML(n);case 2:return t.next=4,dv.dispatch("pushState",n);case 4:case"end":return t.stop()}}),t)})));function n(e){return t.apply(this,arguments)}return n}(),addWarnings:function(t){return e.$emit("warnings",t)},addBreadcrumbs:function(t){return e.breadcrumbData.push(t)}})}},Hk=qk,Vk=(h(75317),qn(Hk,Km,Jm,!1,null,null,null)),Uk=Vk.exports,Gk=h(87299),Wk=h.n(Gk),$k={extends:ih,mixins:[ya],data:function(){return{nodeIcon:Wk(),iconName:""}}},Xk=$k,Yk=qn(Xk,Ek,Ak,!1,null,null,null),Zk=Yk.exports,Kk=76,Jk="processmaker-modeler-manual-task",Qk={id:Jk,component:Zk,bpmnType:"bpmn:ManualTask",control:!1,category:"BPMN",icon:h(8565),label:To[Jk],loopInspectorIndex:1,definition:function(e,t){return e.create("bpmn:ManualTask",{name:t(To[Jk]),assignment:"requester",loopCharacteristics:null,ioSpecification:null})},diagram:function(e){return e.create("bpmndi:BPMNShape",{bounds:e.create("dc:Bounds",{height:Kk,width:116})})},inspectorConfig:[{name:To[Jk],items:[{component:"FormAccordion",container:!0,config:{initiallyOpen:!0,label:"Properties",icon:"cog",name:"inspector-accordion-manual-task"},items:[{component:"FormInput",config:Ys}]},ua,na]}]},eC={extends:Pc,data:function(){return{nodeIcon:Ep()}},mounted:function(){var e=this.node.diagram.bounds;this.shape.attr({image:{"ref-x":7,"ref-y":7,width:e.get("width")-14,height:e.get("height")-14}})}},tC=eC,nC=qn(tC,Mk,Tk,!1,null,null,null),oC=nC.exports,iC="processmaker-modeler-conditional-start-event",rC=Ea()(No()($c),yo(yo({},Op),{},{id:iC,component:oC,label:So[iC],definition:function(e,t){return e.create("bpmn:StartEvent",{name:t(So[iC]),eventDefinitions:[e.create("bpmn:ConditionalEventDefinition",{condition:e.create("bpmn:FormalExpression",{body:""})})]})},inspectorConfig:[{items:[{items:[{}].concat(m(Pp()))}]}]})),sC=function(){var e=this,t=e._self._c;return t("crown-config",e._g({attrs:{highlighted:e.highlighted,paper:e.paper,graph:e.graph,shape:e.shape,node:e.node,nodeRegistry:e.nodeRegistry,moddle:e.moddle,collaboration:e.collaboration,"process-node":e.processNode,"plane-elements":e.planeElements,"is-rendering":e.isRendering}},e.$listeners))},aC=[],lC={components:{CrownConfig:Zr},props:["graph","node","id","highlighted","nodeRegistry","moddle","paper","collaboration","processNode","planeElements","isRendering"],mixins:[_n],data:function(){return{shape:null,initialDataAssociationDirection:this.node.definition.dataAssociationDirection}},computed:{isValidConnection:function(){var e=x()(this.target,"component.node.definition.$type");if(!e)return!1;var t=["bpmn:Task","bpmn:SubProcess","bpmn:CallActivity","bpmn:ManualTask","bpmn:ScriptTask","bpmn:ServiceTask"],n=["bpmn:Task","bpmn:SubProcess","bpmn:CallActivity","bpmn:ManualTask","bpmn:ScriptTask","bpmn:ServiceTask","bpmn:IntermediateThrowEvent","bpmn:EndEvent"],o="bpmn:DataStoreReference"===this.sourceNode.definition.$type,i="bpmn:DataObjectReference"===this.sourceNode.definition.$type;return!(!o||!t.includes(e))||i&&n.includes(e)}},methods:{findSourceShape:function(){if(this.node.dataAssociationProps)return this.node.dataAssociationProps.sourceShape;var e=this.node.definition.sourceRef[0],t=this.graph.getElements().find((function(t){return t.component.node.definition===e}));return t},getTargetRef:function(){return this.node.dataAssociationProps?this.node.dataAssociationProps.targetCoords:lo(this.node.definition.targetRef.$parent,this.$parent)},updateRouter:function(){this.shape.router("normal",{elementPadding:this.elementPadding})},updateDefinitionLinks:function(){var e=this.shape.getTargetElement(),t=ao(this.moddle,e.component.node,this.sourceNode.definition);this.node.definition.set("targetRef",t),this.node.definition.set("sourceRef",[this.sourceNode.definition]),e.component.node.definition.set("dataInputAssociations",[this.node.definition])}},mounted:function(){this.shape=new a.shapes.standard.Link({router:{name:"normal"}}),this.shape.attr({line:{stroke:"black",strokeWidth:"4",strokeLinecap:"round",strokeDasharray:"1, 8",strokeDashoffset:"5",targetMarker:{type:"image","xlink:href":Pn,width:20,height:20,y:-10}}}),this.shape.addTo(this.graph),this.shape.component=this},destroyed:function(){this.targetNode&&(co(this.targetNode,this.sourceNode.definition),(0,Un.pull)(this.targetNode.definition.get("dataInputAssociations"),this.node.definition))}},cC=lC,dC=qn(cC,sC,aC,!1,null,null,null),uC=dC.exports,pC=yo(yo({},t),{},{component:uC,control:!1,inspectorConfig:[{name:"Data Input Association",items:[{component:"FormAccordion",container:!0,config:{initiallyOpen:!0,label:"Properties",icon:"cog",name:"inspector-accordion-data-input-association"},items:[{component:"FormInput",config:ns}]}]}]}),hC=function(){var e=this,t=e._self._c;return t("crown-config",e._g({attrs:{highlighted:e.highlighted,paper:e.paper,graph:e.graph,shape:e.shape,node:e.node,nodeRegistry:e.nodeRegistry,moddle:e.moddle,collaboration:e.collaboration,"process-node":e.processNode,"plane-elements":e.planeElements,"is-rendering":e.isRendering}},e.$listeners))},fC=[],mC={components:{CrownConfig:Zr},props:["graph","node","id","highlighted","nodeRegistry","moddle","paper","collaboration","processNode","planeElements","isRendering"],mixins:[_n],data:function(){return{shape:null,initialDataAssociationDirection:this.node.definition.dataAssociationDirection}},computed:{isValidConnection:function(){var e=x()(this.target,"component.node.type");if(!e)return!1;var t="bpmn:DataObjectReference"!==this.targetConfig.bpmnType&&"bpmn:DataStoreReference"!==this.targetConfig.bpmnType;return!t}},methods:{findSourceShape:function(){var e=this;return this.node.dataAssociationProps?this.node.dataAssociationProps.sourceShape:this.graph.getElements().find((function(t){return t.component&&t.component.node.definition.get("dataOutputAssociations")&&t.component.node.definition.get("dataOutputAssociations").includes(e.node.definition)}))},updateRouter:function(){this.shape.router("normal",{elementPadding:this.elementPadding})},updateDefinitionLinks:function(){this.node.definition.set("targetRef",this.targetNode.definition);var e=this.sourceNode.definition.get("dataOutputAssociations")||[];this.sourceNode.definition.set("dataOutputAssociations",[].concat(m(e),[this.node.definition]))}},mounted:function(){this.shape=new a.shapes.standard.Link({router:{name:"normal"}}),this.shape.attr({line:{stroke:"black",strokeWidth:"4",strokeLinecap:"round",strokeDasharray:"1, 8",strokeDashoffset:"5",targetMarker:{type:"image","xlink:href":Pn,width:20,height:20,y:-10}}}),this.shape.addTo(this.graph),this.shape.component=this},destroyed:function(){(0,Un.pull)(this.sourceNode.definition.get("dataOutputAssociations"),this.node.definition)}},gC=mC,vC=qn(gC,hC,fC,!1,null,null,null),bC=vC.exports,yC=yo(yo({},e),{},{component:bC,control:!1,inspectorConfig:[{name:"Data Output Association",items:[{component:"FormAccordion",container:!0,config:{initiallyOpen:!0,label:"Properties",icon:"cog",name:"inspector-accordion-data-output-association"},items:[{component:"FormInput",config:ns}]}]}]}),wC=JSON.parse('{"name":"ProcessMaker","uri":"http://processmaker.com/BPMN/2.0/Schema.xsd","prefix":"pm","xml":{"tagAlias":"lowerCase"},"associations":[],"types":[{"name":"BaseElement","extends":["bpmn:BaseElement"],"isAbstract":true,"properties":[{"name":"color","isAttr":true,"type":"String"}]},{"name":"Task","extends":["bpmn:Task"],"properties":[{"name":"screenRef","isAttr":true,"type":"String"},{"name":"allowInterstitial","isAttr":true,"type":"Boolean"},{"name":"interstitialScreenRef","isAttr":true,"type":"String"},{"name":"screenVersion","isAttr":true,"type":"String"},{"name":"dueIn","isAttr":true,"type":"Integer"},{"name":"notifyAfterRouting","isAttr":true,"type":"Boolean"},{"name":"notifyRequestCreator","isAttr":true,"type":"Boolean"},{"name":"assignment","isAttr":true,"type":"String"},{"name":"assignedUsers","isAttr":true,"type":"String"},{"name":"assignedGroups","isAttr":true,"type":"String"},{"name":"assignmentLock","isAttr":true,"type":"Boolean"},{"name":"allowReassignment","isAttr":true,"type":"Boolean"},{"name":"assignmentRules","isAttr":true,"type":"String"},{"name":"config","isAttr":true,"type":"String"},{"name":"customIcon","isAttr":true,"type":"String"},{"name":"validations","isAttr":true,"type":"String"}]},{"name":"ScriptTask","extends":["bpmn:ScriptTask"],"properties":[{"name":"scriptRef","isAttr":true,"type":"String"},{"name":"scriptVersion","isAttr":true,"type":"String"},{"name":"errorHandling","isAttr":true,"type":"String"}]},{"name":"ServiceTask","extends":["bpmn:ServiceTask"],"properties":[{"name":"implementationVersion","isAttr":true,"type":"String"},{"name":"errorHandling","isAttr":true,"type":"String"}]},{"name":"Message","extends":["bpmn:Message"],"properties":[{"name":"payload","isAttr":true,"type":"String"}]},{"name":"EndEvent","extends":["bpmn:EndEvent"],"properties":[{"name":"screenRef","isAttr":true,"type":"String"},{"name":"screenVersion","isAttr":true,"type":"String"}]},{"name":"StartEvent","extends":["bpmn:StartEvent"],"properties":[{"name":"allowInterstitial","isAttr":true,"type":"Boolean"},{"name":"interstitialScreenRef","isAttr":true,"type":"String"},{"name":"assignment","isAttr":true,"type":"String"},{"name":"assignedUsers","isAttr":true,"type":"String"},{"name":"assignedGroups","isAttr":true,"type":"String"},{"name":"config","isAttr":true,"type":"String"},{"name":"validations","isAttr":true,"type":"String"}]},{"name":"IntermediateCatchEvent","extends":["bpmn:IntermediateCatchEvent"],"properties":[{"name":"allowedUsers","isAttr":true,"type":"String"},{"name":"allowedGroups","isAttr":true,"type":"String"},{"name":"config","isAttr":true,"type":"String"},{"name":"whitelist","isAttr":true,"type":"String"},{"name":"validations","isAttr":true,"type":"String"}]},{"name":"MessageEventDefinition","extends":["bpmn:MessageEventDefinition"],"properties":[{"name":"variableName","isAttr":true,"type":"String"}]},{"name":"MessageEventDefinition","extends":["bpmn:MessageEventDefinition"],"properties":[{"name":"variableName","isAttr":true,"type":"String"}]},{"name":"SignalEventDefinition","extends":["bpmn:SignalEventDefinition"],"properties":[{"name":"config","isAttr":true,"type":"String"}]},{"name":"SequenceFlow","extends":["bpmn:SequenceFlow"],"properties":[{"name":"config","isAttr":true,"type":"String"}]},{"name":"CallActivity","extends":["bpmn:CallActivity"],"properties":[{"name":"allowInterstitial","isAttr":true,"type":"Boolean"},{"name":"interstitialScreenRef","isAttr":true,"type":"String"},{"name":"config","isAttr":true,"type":"String"},{"name":"validations","isAttr":true,"type":"String"},{"name":"assignment","isAttr":true,"type":"String"},{"name":"assignedUsers","isAttr":true,"type":"String"},{"name":"assignedGroups","isAttr":true,"type":"String"},{"name":"customIcon","isAttr":true,"type":"String"},{"name":"errorHandling","isAttr":true,"type":"String"}]},{"name":"Signal","extends":["bpmn:Signal"],"properties":[{"name":"config","isAttr":true,"type":"String"},{"name":"detail","isAttr":true,"type":"String"}]}],"emumerations":[]}'),xC=[Yc,Sm,Im,ha,Jh,Mf,Qk,yf,Tf,el,cl,Sl,gl,Rl,Ul,is,pC,yC,Vm,em,Lf],kC=[[rd,"bpmn:StartEvent","bpmn:SignalEventDefinition"],[qd,"bpmn:StartEvent","bpmn:TimerEventDefinition"],[hd,"bpmn:StartEvent","bpmn:MessageEventDefinition"],[rC,"bpmn:StartEvent","bpmn:ConditionalEventDefinition"],[Du,"bpmn:IntermediateCatchEvent","bpmn:TimerEventDefinition"],[Ju,"bpmn:IntermediateCatchEvent","bpmn:MessageEventDefinition"],[ap,"bpmn:IntermediateCatchEvent","bpmn:SignalEventDefinition"],[mp,"bpmn:IntermediateThrowEvent","bpmn:MessageEventDefinition"],[Cp,"bpmn:IntermediateThrowEvent","bpmn:SignalEventDefinition"],[Ip,"bpmn:IntermediateCatchEvent","bpmn:ConditionalEventDefinition"],[hy,"bpmn:BoundaryEvent","bpmn:TimerEventDefinition"],[Tb,"bpmn:BoundaryEvent","bpmn:ErrorEventDefinition"],[Vb,"bpmn:BoundaryEvent","bpmn:EscalationEventDefinition"],[Kb,"bpmn:BoundaryEvent","bpmn:MessageEventDefinition"],[ry,"bpmn:BoundaryEvent","bpmn:SignalEventDefinition"],[Bb,"bpmn:BoundaryEvent","bpmn:ConditionalEventDefinition"],[lc,"bpmn:EndEvent","bpmn:MessageEventDefinition"],[_a,"bpmn:EndEvent","bpmn:ErrorEventDefinition"],[Sc,"bpmn:EndEvent","bpmn:SignalEventDefinition"],[La,"bpmn:EndEvent","bpmn:TerminateEventDefinition"]],CC=function(e,t,n){return function(o){var i=o.get("eventDefinitions"),r=o.$type===t&&i&&i.length&&i[0].$type===n;if(r)return e.id}};function SC(e){var t=e.registerNode,n=e.registerBpmnExtension;kC.forEach((function(e){var n=mt(e,3),o=n[0],i=n[1],r=n[2];t(o,CC(o,i,r))})),xC.forEach((function(e){return t(e)})),n("pm",wC)}}(),f}()}));
|
|
34
|
+
function bt(e){var t=Number(e.version.split(".")[0]);if(t>=2)e.mixin({beforeCreate:o});else{var n=e.prototype._init;e.prototype._init=function(e){void 0===e&&(e={}),e.init=e.init?[o].concat(e.init):o,n.call(this,e)}}function o(){var e=this.$options;e.store?this.$store="function"===typeof e.store?e.store():e.store:e.parent&&e.parent.$store&&(this.$store=e.parent.$store)}}var yt="undefined"!==typeof window?window:"undefined"!==typeof h.g?h.g:{},wt=yt.__VUE_DEVTOOLS_GLOBAL_HOOK__;function xt(e){wt&&(e._devtoolHook=wt,wt.emit("vuex:init",e),wt.on("vuex:travel-to-state",(function(t){e.replaceState(t)})),e.subscribe((function(e,t){wt.emit("vuex:mutation",e,t)}),{prepend:!0}),e.subscribeAction((function(e,t){wt.emit("vuex:action",e,t)}),{prepend:!0}))}function kt(e,t){return e.filter(t)[0]}function Ct(e,t){if(void 0===t&&(t=[]),null===e||"object"!==typeof e)return e;var n=kt(t,(function(t){return t.original===e}));if(n)return n.copy;var o=Array.isArray(e)?[]:{};return t.push({original:e,copy:o}),Object.keys(e).forEach((function(n){o[n]=Ct(e[n],t)})),o}function St(e,t){Object.keys(e).forEach((function(n){return t(e[n],n)}))}function Et(e){return null!==e&&"object"===typeof e}function At(e){return e&&"function"===typeof e.then}function Mt(e,t){return function(){return e(t)}}var Tt=function(e,t){this.runtime=t,this._children=Object.create(null),this._rawModule=e;var n=e.state;this.state=("function"===typeof n?n():n)||{}},_t={namespaced:{configurable:!0}};_t.namespaced.get=function(){return!!this._rawModule.namespaced},Tt.prototype.addChild=function(e,t){this._children[e]=t},Tt.prototype.removeChild=function(e){delete this._children[e]},Tt.prototype.getChild=function(e){return this._children[e]},Tt.prototype.hasChild=function(e){return e in this._children},Tt.prototype.update=function(e){this._rawModule.namespaced=e.namespaced,e.actions&&(this._rawModule.actions=e.actions),e.mutations&&(this._rawModule.mutations=e.mutations),e.getters&&(this._rawModule.getters=e.getters)},Tt.prototype.forEachChild=function(e){St(this._children,e)},Tt.prototype.forEachGetter=function(e){this._rawModule.getters&&St(this._rawModule.getters,e)},Tt.prototype.forEachAction=function(e){this._rawModule.actions&&St(this._rawModule.actions,e)},Tt.prototype.forEachMutation=function(e){this._rawModule.mutations&&St(this._rawModule.mutations,e)},Object.defineProperties(Tt.prototype,_t);var Pt=function(e){this.register([],e,!1)};function Ot(e,t,n){if(t.update(n),n.modules)for(var o in n.modules){if(!t.getChild(o))return void 0;Ot(e.concat(o),t.getChild(o),n.modules[o])}}Pt.prototype.get=function(e){return e.reduce((function(e,t){return e.getChild(t)}),this.root)},Pt.prototype.getNamespace=function(e){var t=this.root;return e.reduce((function(e,n){return t=t.getChild(n),e+(t.namespaced?n+"/":"")}),"")},Pt.prototype.update=function(e){Ot([],this.root,e)},Pt.prototype.register=function(e,t,n){var o=this;void 0===n&&(n=!0);var i=new Tt(t,n);if(0===e.length)this.root=i;else{var r=this.get(e.slice(0,-1));r.addChild(e[e.length-1],i)}t.modules&&St(t.modules,(function(t,i){o.register(e.concat(i),t,n)}))},Pt.prototype.unregister=function(e){var t=this.get(e.slice(0,-1)),n=e[e.length-1],o=t.getChild(n);o&&o.runtime&&t.removeChild(n)},Pt.prototype.isRegistered=function(e){var t=this.get(e.slice(0,-1)),n=e[e.length-1];return!!t&&t.hasChild(n)};var Dt;var It=function(e){var t=this;void 0===e&&(e={}),!Dt&&"undefined"!==typeof window&&window.Vue&&$t(window.Vue);var n=e.plugins;void 0===n&&(n=[]);var o=e.strict;void 0===o&&(o=!1),this._committing=!1,this._actions=Object.create(null),this._actionSubscribers=[],this._mutations=Object.create(null),this._wrappedGetters=Object.create(null),this._modules=new Pt(e),this._modulesNamespaceMap=Object.create(null),this._subscribers=[],this._watcherVM=new Dt,this._makeLocalGettersCache=Object.create(null);var i=this,r=this,s=r.dispatch,a=r.commit;this.dispatch=function(e,t){return s.call(i,e,t)},this.commit=function(e,t,n){return a.call(i,e,t,n)},this.strict=o;var l=this._modules.root.state;jt(this,l,[],this._modules.root),Lt(this,l),n.forEach((function(e){return e(t)}));var c=void 0!==e.devtools?e.devtools:Dt.config.devtools;c&&xt(this)},Nt={state:{configurable:!0}};function Rt(e,t,n){return t.indexOf(e)<0&&(n&&n.prepend?t.unshift(e):t.push(e)),function(){var n=t.indexOf(e);n>-1&&t.splice(n,1)}}function Bt(e,t){e._actions=Object.create(null),e._mutations=Object.create(null),e._wrappedGetters=Object.create(null),e._modulesNamespaceMap=Object.create(null);var n=e.state;jt(e,n,[],e._modules.root,!0),Lt(e,n,t)}function Lt(e,t,n){var o=e._vm;e.getters={},e._makeLocalGettersCache=Object.create(null);var i=e._wrappedGetters,r={};St(i,(function(t,n){r[n]=Mt(t,e),Object.defineProperty(e.getters,n,{get:function(){return e._vm[n]},enumerable:!0})}));var s=Dt.config.silent;Dt.config.silent=!0,e._vm=new Dt({data:{$$state:t},computed:r}),Dt.config.silent=s,e.strict&&Ut(e),o&&(n&&e._withCommit((function(){o._data.$$state=null})),Dt.nextTick((function(){return o.$destroy()})))}function jt(e,t,n,o,i){var r=!n.length,s=e._modules.getNamespace(n);if(o.namespaced&&(e._modulesNamespaceMap[s],e._modulesNamespaceMap[s]=o),!r&&!i){var a=Gt(t,n.slice(0,-1)),l=n[n.length-1];e._withCommit((function(){Dt.set(a,l,o.state)}))}var c=o.context=Ft(e,s,n);o.forEachMutation((function(t,n){var o=s+n;qt(e,o,t,c)})),o.forEachAction((function(t,n){var o=t.root?n:s+n,i=t.handler||t;Ht(e,o,i,c)})),o.forEachGetter((function(t,n){var o=s+n;Vt(e,o,t,c)})),o.forEachChild((function(o,r){jt(e,t,n.concat(r),o,i)}))}function Ft(e,t,n){var o=""===t,i={dispatch:o?e.dispatch:function(n,o,i){var r=Wt(n,o,i),s=r.payload,a=r.options,l=r.type;return a&&a.root||(l=t+l),e.dispatch(l,s)},commit:o?e.commit:function(n,o,i){var r=Wt(n,o,i),s=r.payload,a=r.options,l=r.type;a&&a.root||(l=t+l),e.commit(l,s,a)}};return Object.defineProperties(i,{getters:{get:o?function(){return e.getters}:function(){return zt(e,t)}},state:{get:function(){return Gt(e.state,n)}}}),i}function zt(e,t){if(!e._makeLocalGettersCache[t]){var n={},o=t.length;Object.keys(e.getters).forEach((function(i){if(i.slice(0,o)===t){var r=i.slice(o);Object.defineProperty(n,r,{get:function(){return e.getters[i]},enumerable:!0})}})),e._makeLocalGettersCache[t]=n}return e._makeLocalGettersCache[t]}function qt(e,t,n,o){var i=e._mutations[t]||(e._mutations[t]=[]);i.push((function(t){n.call(e,o.state,t)}))}function Ht(e,t,n,o){var i=e._actions[t]||(e._actions[t]=[]);i.push((function(t){var i=n.call(e,{dispatch:o.dispatch,commit:o.commit,getters:o.getters,state:o.state,rootGetters:e.getters,rootState:e.state},t);return At(i)||(i=Promise.resolve(i)),e._devtoolHook?i.catch((function(t){throw e._devtoolHook.emit("vuex:error",t),t})):i}))}function Vt(e,t,n,o){e._wrappedGetters[t]||(e._wrappedGetters[t]=function(e){return n(o.state,o.getters,e.state,e.getters)})}function Ut(e){e._vm.$watch((function(){return this._data.$$state}),(function(){0}),{deep:!0,sync:!0})}function Gt(e,t){return t.reduce((function(e,t){return e[t]}),e)}function Wt(e,t,n){return Et(e)&&e.type&&(n=t,t=e,e=e.type),{type:e,payload:t,options:n}}function $t(e){Dt&&e===Dt||(Dt=e,bt(Dt))}Nt.state.get=function(){return this._vm._data.$$state},Nt.state.set=function(e){0},It.prototype.commit=function(e,t,n){var o=this,i=Wt(e,t,n),r=i.type,s=i.payload,a=(i.options,{type:r,payload:s}),l=this._mutations[r];l&&(this._withCommit((function(){l.forEach((function(e){e(s)}))})),this._subscribers.slice().forEach((function(e){return e(a,o.state)})))},It.prototype.dispatch=function(e,t){var n=this,o=Wt(e,t),i=o.type,r=o.payload,s={type:i,payload:r},a=this._actions[i];if(a){try{this._actionSubscribers.slice().filter((function(e){return e.before})).forEach((function(e){return e.before(s,n.state)}))}catch(c){0}var l=a.length>1?Promise.all(a.map((function(e){return e(r)}))):a[0](r);return new Promise((function(e,t){l.then((function(t){try{n._actionSubscribers.filter((function(e){return e.after})).forEach((function(e){return e.after(s,n.state)}))}catch(c){0}e(t)}),(function(e){try{n._actionSubscribers.filter((function(e){return e.error})).forEach((function(t){return t.error(s,n.state,e)}))}catch(c){0}t(e)}))}))}},It.prototype.subscribe=function(e,t){return Rt(e,this._subscribers,t)},It.prototype.subscribeAction=function(e,t){var n="function"===typeof e?{before:e}:e;return Rt(n,this._actionSubscribers,t)},It.prototype.watch=function(e,t,n){var o=this;return this._watcherVM.$watch((function(){return e(o.state,o.getters)}),t,n)},It.prototype.replaceState=function(e){var t=this;this._withCommit((function(){t._vm._data.$$state=e}))},It.prototype.registerModule=function(e,t,n){void 0===n&&(n={}),"string"===typeof e&&(e=[e]),this._modules.register(e,t),jt(this,this.state,e,this._modules.get(e),n.preserveState),Lt(this,this.state)},It.prototype.unregisterModule=function(e){var t=this;"string"===typeof e&&(e=[e]),this._modules.unregister(e),this._withCommit((function(){var n=Gt(t.state,e.slice(0,-1));Dt.delete(n,e[e.length-1])})),Bt(this)},It.prototype.hasModule=function(e){return"string"===typeof e&&(e=[e]),this._modules.isRegistered(e)},It.prototype.hotUpdate=function(e){this._modules.update(e),Bt(this,!0)},It.prototype._withCommit=function(e){var t=this._committing;this._committing=!0,e(),this._committing=t},Object.defineProperties(It.prototype,Nt);var Xt=tn((function(e,t){var n={};return Qt(t).forEach((function(t){var o=t.key,i=t.val;n[o]=function(){var t=this.$store.state,n=this.$store.getters;if(e){var o=nn(this.$store,"mapState",e);if(!o)return;t=o.context.state,n=o.context.getters}return"function"===typeof i?i.call(this,t,n):t[i]},n[o].vuex=!0})),n})),Yt=tn((function(e,t){var n={};return Qt(t).forEach((function(t){var o=t.key,i=t.val;n[o]=function(){var t=[],n=arguments.length;while(n--)t[n]=arguments[n];var o=this.$store.commit;if(e){var r=nn(this.$store,"mapMutations",e);if(!r)return;o=r.context.commit}return"function"===typeof i?i.apply(this,[o].concat(t)):o.apply(this.$store,[i].concat(t))}})),n})),Zt=tn((function(e,t){var n={};return Qt(t).forEach((function(t){var o=t.key,i=t.val;i=e+i,n[o]=function(){if(!e||nn(this.$store,"mapGetters",e))return this.$store.getters[i]},n[o].vuex=!0})),n})),Kt=tn((function(e,t){var n={};return Qt(t).forEach((function(t){var o=t.key,i=t.val;n[o]=function(){var t=[],n=arguments.length;while(n--)t[n]=arguments[n];var o=this.$store.dispatch;if(e){var r=nn(this.$store,"mapActions",e);if(!r)return;o=r.context.dispatch}return"function"===typeof i?i.apply(this,[o].concat(t)):o.apply(this.$store,[i].concat(t))}})),n})),Jt=function(e){return{mapState:Xt.bind(null,e),mapGetters:Zt.bind(null,e),mapMutations:Yt.bind(null,e),mapActions:Kt.bind(null,e)}};function Qt(e){return en(e)?Array.isArray(e)?e.map((function(e){return{key:e,val:e}})):Object.keys(e).map((function(t){return{key:t,val:e[t]}})):[]}function en(e){return Array.isArray(e)||Et(e)}function tn(e){return function(t,n){return"string"!==typeof t?(n=t,t=""):"/"!==t.charAt(t.length-1)&&(t+="/"),e(t,n)}}function nn(e,t,n){var o=e._modulesNamespaceMap[n];return o}function on(e){void 0===e&&(e={});var t=e.collapsed;void 0===t&&(t=!0);var n=e.filter;void 0===n&&(n=function(e,t,n){return!0});var o=e.transformer;void 0===o&&(o=function(e){return e});var i=e.mutationTransformer;void 0===i&&(i=function(e){return e});var r=e.actionFilter;void 0===r&&(r=function(e,t){return!0});var s=e.actionTransformer;void 0===s&&(s=function(e){return e});var a=e.logMutations;void 0===a&&(a=!0);var l=e.logActions;void 0===l&&(l=!0);var c=e.logger;return void 0===c&&(c=console),function(e){var d=Ct(e.state);"undefined"!==typeof c&&(a&&e.subscribe((function(e,r){var s=Ct(r);if(n(e,d,s)){var a=an(),l=i(e),u="mutation "+e.type+a;rn(c,u,t),c.log("%c prev state","color: #9E9E9E; font-weight: bold",o(d)),c.log("%c mutation","color: #03A9F4; font-weight: bold",l),c.log("%c next state","color: #4CAF50; font-weight: bold",o(s)),sn(c)}d=s})),l&&e.subscribeAction((function(e,n){if(r(e,n)){var o=an(),i=s(e),a="action "+e.type+o;rn(c,a,t),c.log("%c action","color: #03A9F4; font-weight: bold",i),sn(c)}})))}}function rn(e,t,n){var o=n?e.groupCollapsed:e.group;try{o.call(e,t)}catch(i){e.log(t)}}function sn(e){try{e.groupEnd()}catch(t){e.log("—— log end ——")}}function an(){var e=new Date;return" @ "+cn(e.getHours(),2)+":"+cn(e.getMinutes(),2)+":"+cn(e.getSeconds(),2)+"."+cn(e.getMilliseconds(),3)}function ln(e,t){return new Array(t+1).join(e)}function cn(e,t){return ln("0",t-e.toString().length)+e}var dn={Store:It,install:$t,version:"3.6.2",mapState:Xt,mapMutations:Yt,mapGetters:Zt,mapActions:Kt,createNamespacedHelpers:Jt,createLogger:on},un=dn,pn=h(85564),hn=h.n(pn),fn=h(44908),mn=h.n(fn);function gn(e,t,n){Object.hasOwn(e,t)?e.set(t,n):(delete Object.getPrototypeOf(e)[t],vt().set(e,t,n))}function vn(e,t,n){e.nodes.filter((function(e){var t=e.definition;return("bpmn:IntermediateCatchEvent"===t.$type||"bpmn:StartEvent"===t.$type)&&t.eventDefinitions&&t.eventDefinitions.some(n)})).forEach((function(e){var n=e.definition;n.eventDefinitions[0][t]=null}))}vt().use(un);var bn=new un.Store({state:{graph:null,paper:null,highlightedNodes:[],nodes:[],rootElements:[],autoValidate:!1,globalProcesses:[],allowSavingElementPosition:!0,copiedElements:[],clientLeftPaper:!1,readOnly:!1},getters:{nodes:function(e){return e.nodes},paper:function(e){return e.paper},highlightedNodes:function(e){return e.highlightedNodes},nodeShape:function(e){return function(t){return e.graph.getCells().find((function(e){return e.component&&e.component.node===t}))}},highlightedShapes:function(e,t){return t.highlightedNodes.filter((function(e){return"processmaker-modeler-process"!==e.type})).map(t.nodeShape)},rootElements:function(e){return e.rootElements},autoValidate:function(e){return e.autoValidate},globalProcesses:function(e){return e.globalProcesses},globalProcessEvents:function(e,t){return hn()(t.globalProcesses.map((function(e){return e.events})))},allowSavingElementPosition:function(e){return e.allowSavingElementPosition},copiedElements:function(e){return e.copiedElements},clientLeftPaper:function(e){return e.clientLeftPaper},isReadOnly:function(e){return e.readOnly},showComponent:function(e){return!e.readOnly}},mutations:{setReadOnly:function(e,t){e.readOnly=t},preventSavingElementPosition:function(e){e.allowSavingElementPosition=!1},allowSavingElementPosition:function(e){e.allowSavingElementPosition=!0},setAutoValidate:function(e,t){e.autoValidate=t},setRootElements:function(e,t){e.rootElements=t},updateNodeBounds:function(e,t){var n=t.node,o=t.bounds;o&&Object.entries(o).forEach((function(e){var t=mt(e,2),o=t[0],i=t[1];"$type"!==o&&n.diagram.bounds.set(o,i)}))},updateNodeProp:function(e,t){var n=t.node,o=t.key,i=t.value;"id"==o&&n.definition.id!==i&&e.nodes.some((function(e){return e.definition.id===i}))||(gn(n.definition,o,i),null==i&&vt()["delete"](n.definition,o))},clearNodes:function(e){e.nodes=[]},highlightNode:function(e,t){e.highlightedNodes=t?[t]:[]},addToHighlightedNodes:function(e,t){var n=mn()([].concat(m(e.highlightedNodes),m(t))),o=n.filter((function(e){return"processmaker-modeler-pool"===e.type})).map((function(e){return e.id}));e.highlightedNodes=n.filter((function(e){return!e.pool||!e.pool.component.node.id||!o.includes(e.pool.component.node.id)}))},addNode:function(e,t){t._modelerId="_modelerId_"+t.definition.get("id"),e.nodes.push(t)},removeNode:function(e,t){var n=e.nodes.indexOf(t);-1!==n&&e.nodes.splice(n,1)},removeMessageRef:function(e,t){vn(e,"messageRef",(function(e){var n=e.messageRef;return n===t}))},removeSignalRef:function(e,t){vn(e,"signalRef",(function(e){var n=e.signalRef;return n===t}))},setGraph:function(e,t){e.graph=t},setPaper:function(e,t){e.paper=t},setGlobalProcesses:function(e,t){e.globalProcesses=t},setCopiedElements:function(e,t){e.copiedElements=t},setClientLeftPaper:function(e,t){e.clientLeftPaper=t}},actions:{fetchGlobalProcesses:function(e){return y(v().mark((function t(){var n,o,i;return v().wrap((function(t){while(1)switch(t.prev=t.next){case 0:return n=e.commit,t.prev=1,t.next=4,window.ProcessMaker.apiClient.get("processes",{params:{order_direction:"asc",per_page:1e3,status:"all",include:"events,category"}});case 4:o=t.sent,i=o.data,n("setGlobalProcesses",i.data),window.ProcessMaker.globalProcesses=i.data,t.next=12;break;case 10:t.prev=10,t.t0=t["catch"](1);case 12:case"end":return t.stop()}}),t,null,[[1,10]])})))()}}}),yn="#5096db",wn="#FF0000",xn="#3FA6FF",kn="#DCF2FF",Cn="#CCCCCC",Sn="#F5F5F5",En="#00BA7C",An="#D6FFE6",Mn={source:"source",target:"target"};function Tn(e){return e.x&&e.y}var _n={props:["highlighted","paper","paperManager","isCompleted","isIdle"],data:function(){return{sourceShape:null,target:null,listeningToMouseup:!1,listeningToMouseleave:!1,vertices:null,anchorPointFunction:st}},watch:{target:function(e,t){t&&t!==e&&ut(t)},isValidConnection:function(e){e?this.shape.stopListening(this.paper,"blank:pointerdown link:pointerdown element:pointerdown",this.removeLink):this.shape.listenToOnce(this.paper,"blank:pointerdown link:pointerdown element:pointerdown",this.removeLink)},highlighted:function(e){bn.getters.isReadOnly||(e?(this.shape.attr({line:{stroke:"#5096db"},".joint-highlight-stroke":{display:"none"}}),this.shapeView.showTools()):(ut(this.shape),this.shapeView.hideTools()))}},computed:{shapeView:function(){return this.shape.findView(this.paper)},sourceNode:function(){return x()(this.sourceShape,"component.node")},targetNode:function(){return x()(this.target,"component.node")},sourceConfig:function(){return this.sourceNode&&this.nodeRegistry[this.sourceNode.type]},targetConfig:function(){return this.targetNode&&this.nodeRegistry[this.targetNode.type]},elementPadding:function(){return this.shape&&this.shape.source().id===this.shape.target().id?20:1}},methods:{setShapeHighlight:function(){this.isCompleted?this.shape.attr({line:{stroke:En}}):this.isIdle&&this.shape.attr({line:{stroke:Cn}})},findSourceShape:function(){var e=this;return this.graph.getElements().find((function(t){return t.component&&t.component.node.definition===e.node.definition.get("sourceRef")}))},setEndpoint:function(e,t,n){var o=this;if(e&&Tn(e))return this.shape[t](e,{anchor:{name:"modelCenter",args:{padding:25}},connectionPoint:{name:"boundary"}});var i=function(){var t=e.position(),o=t.x,i=t.y,r=e.size(),s=r.width,a=r.height;return n?{x:o+n.x,y:i+n.y}:{x:o+s/2,y:i+a/2}};this.shape[t](e,{anchor:function(){return o.getAnchorPointFunction(t)(i(),e.findView(o.paper))},connectionPoint:{name:"boundary"}})},setSource:function(e,t){this.setEndpoint(e,Mn.source,t)},setTarget:function(e,t){this.setEndpoint(e,Mn.target,t)},completeLink:function(){this.shape.stopListening(this.paper,"cell:mouseleave"),this.$emit("set-cursor",null),this.resetPaper();var e=this.shape.getTargetElement();ut(e),this.shape.on("change:vertices",this.onChangeVertices),this.shape.on("change:source",this.onChangeTargets),this.shape.on("change:target",this.onChangeTargets),this.shape.listenTo(this.sourceShape,"change:position",this.updateWaypoints),this.shape.listenTo(e,"change:position",this.updateWaypoints),this.shape.listenTo(this.paper,"link:mouseleave",this.storeWaypoints);var t=this.shape.getSourceElement();t.embed(this.shape),this.$emit("set-shape-stacking",t)},waitForUpdateWaypoints:function(){var e=this;return new Promise((function(t){e.updateWaypoints(),e.updateWaypoints.flush(),t()}))},storeWaypoints:function(){var e=this;return y(v().mark((function t(){return v().wrap((function(t){while(1)switch(t.prev=t.next){case 0:if(!e.highlighted||e.listeningToMouseleave){t.next=6;break}return e.updateWaypoints(),t.next=4,e.$nextTick();case 4:e.listeningToMouseleave=!0,e.$emit("save-state");case 6:case"end":return t.stop()}}),t)})))()},onChangeTargets:function(e,t,n){var o=this;return y(v().mark((function e(){return v().wrap((function(e){while(1)switch(e.prev=e.next){case 0:if(!n||!n.ui){e.next=7;break}return e.next=3,o.$nextTick();case 3:return e.next=5,o.waitForUpdateWaypoints();case 5:return e.next=7,o.storeWaypoints();case 7:case"end":return e.stop()}}),e)})))()},onChangeVertices:function(e,t,n){var o=this;return y(v().mark((function e(){return v().wrap((function(e){while(1)switch(e.prev=e.next){case 0:if(!n||!n.ui){e.next=6;break}return o.updateWaypoints(),e.next=4,o.$nextTick();case 4:o.listeningToMouseleave=!1,o.$emit("save-state");case 6:case"end":return e.stop()}}),e)})))()},updateWaypoints:function(){var e=this,t=this.shape.findView(this.paper),n=t.sourceAnchor,o=t.targetAnchor;this.node.diagram.waypoint=[n].concat(m(this.shape.vertices()),[o]).map((function(t){return e.moddle.create("dc:Point",t)})),this.listeningToMouseup||(this.listeningToMouseup=!0,document.addEventListener("mouseup",this.emitSave))},updateLinkTarget:function(e){var t=this,n=e.clientX,o=e.clientY,i=this.paper.clientToLocalPoint({x:n,y:o});if(this.target=this.graph.findModelsFromPoint(i).sort((function(e,t){return t.get("z")-e.get("z")}))[0],!this.isValidConnection)return this.$emit("set-cursor","not-allowed"),this.shape.target({x:i.x,y:i.y}),void(this.target&&Ee(this.target,fe));this.setTarget(this.target),this.updateRouter(),this.$emit("set-cursor","default"),Ee(this.target,he),this.paper.el.removeEventListener("mousemove",this.updateLinkTarget),this.shape.listenToOnce(this.paper,"cell:pointerclick",(function(){t.completeLink(),t.updateWaypoints(),t.updateWaypoints.flush(),t.updateDefinitionLinks&&t.updateDefinitionLinks(),t.$emit("save-state")})),this.shape.listenToOnce(this.paper,"cell:mouseleave",(function(){t.paper.el.addEventListener("mousemove",t.updateLinkTarget),t.shape.stopListening(t.paper,"cell:pointerclick"),ut(t.target),t.$emit("set-cursor","not-allowed")}))},removeLink:function(){this.$emit("remove-node",this.node),this.resetPaper()},resetPaper:function(){this.$emit("set-cursor",null),this.paper.el.removeEventListener("mousemove",this.updateLinkTarget),this.paper.setInteractivity(this.graph.get("interactiveFunc")),this.target&&ut(this.target)},getAnchorPointFunction:function(e){return"source"===e?this.sourceShape.component.anchorPointFunction||this.anchorPointFunction:"target"===e?this.target.component.anchorPointFunction||this.anchorPointFunction:void 0},setupLinkTools:function(){var e=new a.linkTools.Vertices,t=new a.linkTools.SourceAnchor({snap:this.getAnchorPointFunction("source")}),n=new a.linkTools.TargetAnchor({snap:this.getAnchorPointFunction("target")}),o=new a.dia.ToolsView({tools:[e,t,n]});this.shapeView.addTools(o),this.shapeView.hideTools()},emitSave:function(){this.highlighted&&(this.updateWaypoints.flush(),document.removeEventListener("mouseup",this.emitSave),this.listeningToMouseup=!1)}},created:function(){this.updateWaypoints=C()(this.updateWaypoints,100),this.emitSave.bind(this)},mounted:function(){var e=this;return y(v().mark((function t(){var n,o,i,r,s,a,l,c,d,u,p,h,f,m;return v().wrap((function(t){while(1)switch(t.prev=t.next){case 0:return t.next=2,e.$nextTick();case 2:if(e.sourceShape=e.findSourceShape(),e.setSource(e.sourceShape),e.$once("click",(function(){e.$nextTick((function(){bn.getters.isReadOnly||e.setupLinkTools()}))})),n=e.getTargetRef?e.getTargetRef():e.node.definition.get("targetRef"),n){t.next=8;break}return t.abrupt("return");case 8:n.id?(o=e.graph.getElements().find((function(e){return e.component&&e.component.node.definition===n})),e.target=o,i=e.node.diagram.waypoint,r=e.node.diagram.waypoint[0],s=i[i.length-1],a=o.position(),l=a.x,c=a.y,d={x:s.x-l,y:s.y-c},u=e.sourceShape.position(),p=u.x,h=u.y,f={x:r.x-p,y:r.y-h},i&&(m=i.slice(1,i.length-1).map((function(e){var t=e.x,n=e.y;return{x:t,y:n}})),e.shape.vertices(m)),e.setSource(e.sourceShape,f),e.setTarget(o,d),e.completeLink()):(e.setTarget(n),e.paper.setInteractivity(!1),e.paper.el.addEventListener("mousemove",e.updateLinkTarget),e.$emit("set-cursor","not-allowed"),e.isValidConnection?e.shape.stopListening(e.paper,"blank:pointerdown link:pointerdown element:pointerdown",e.removeLink):e.shape.listenToOnce(e.paper,"blank:pointerdown link:pointerdown element:pointerdown",e.removeLink)),e.updateRouter(),e.shape.on("change:vertices",(function(){this.component.$emit("shape-resize")})),bn.getters.isReadOnly&&e.$nextTick((function(){e.paperManager.awaitScheduledUpdates().then((function(){e.setShapeHighlight()}))}));case 12:case"end":return t.stop()}}),t)})))()},beforeDestroy:function(){document.removeEventListener("mouseup",this.emitSave)},destroyed:function(){this.updateWaypoints.cancel()}},Pn=h.p+"img/association-head.0b14da7b.svg",On={none:"None",one:"One",both:"Both"},Dn=function(){var e=this,t=e._self._c;return e.showCrownConfig?t("div",{staticClass:"crown-config",style:e.style,attrs:{role:"menu"}},[e._t("default"),t("association-flow-button",e._g({attrs:{node:e.node,moddle:e.moddle,shape:e.shape},on:{"toggle-crown-state":function(t){e.showCrown=t}}},e.$listeners)),t("generic-flow-button",e._g({attrs:{node:e.node,"node-registry":e.nodeRegistry,moddle:e.moddle},on:{"toggle-crown-state":function(t){e.showCrown=t}}},e.$listeners)),t("data-association-flow-button",e._g({attrs:{node:e.node,moddle:e.moddle,shape:e.shape},on:{"toggle-crown-state":function(t){e.showCrown=t}}},e.$listeners)),t("default-flow",e._g({attrs:{node:e.node}},e.$listeners)),t("crown-dropdowns",e._g({attrs:{"dropdown-data":e.dropdownData,"boundary-event-dropdown-data":e.boundaryEventDropdownData,node:e.node,"node-registry":e.nodeRegistry,moddle:e.moddle,shape:e.shape,"task-dropdown-initially-open":e.taskDropdownInitiallyOpen,showCustomIconPicker:e.showCustomIconPicker,iconName:e.iconName},on:{"replace-node-type":e.replaceNodeTypePrompt}},e.$listeners)),t("copy-button",e._g({attrs:{node:e.node}},e.$listeners)),t("clone-button",e._g({attrs:{node:e.node}},e.$listeners)),t("delete-button",e._g({attrs:{graph:e.graph,shape:e.shape,node:e.node}},e.$listeners)),t("b-modal",{ref:"modal",attrs:{"no-fade":e.runningInCypressTest,id:"modal-prevent-closing",title:e.$t("Change Type"),"ok-title":e.$t("Confirm"),"cancel-title":e.$t("Cancel")},on:{hidden:function(t){e.showReplaceModal=!1},ok:e.confirmedReplaceNodeType},model:{value:e.showReplaceModal,callback:function(t){e.showReplaceModal=t},expression:"showReplaceModal"}},[t("p",[e._v(e._s(e.$t("Changing this type will replace your current configuration")))])])],2):e._e()},In=[],Nn=(h(47941),function(){var e=this,t=e._self._c;return t("crown-button",{directives:[{name:"b-tooltip",rawName:"v-b-tooltip.hover.viewport.d50",value:{customClass:"no-pointer-events"},expression:"{ customClass: 'no-pointer-events' }",modifiers:{hover:!0,viewport:!0,d50:!0}}],attrs:{title:e.$t("Delete"),role:"menuitem",id:"delete-button","aria-label":"Delete this node"},on:{click:function(t){e.isPoolLane?e.removePoolLaneShape():e.removeShape()}}},[t("i",{staticClass:"fas fa-trash-alt cog-container--button"})])}),Rn=[],Bn=h.p+"img/trash-alt-solid.9d41abd9.svg",Ln=function(){var e=this,t=e._self._c;return t("button",e._g({staticClass:"crown-button",attrs:{id:e.id,"aria-label":e.ariaLabel}},e.$listeners),[e._t("default",(function(){return[t("img",{staticClass:"crown-icon",attrs:{src:e.src,width:"width",height:"height"}})]}))],2)},jn=[],Fn={props:{id:String,ariaLabel:String,src:String,width:{type:Number,default:19},height:{type:Number,default:20}}},zn=Fn;h(21353);function qn(e,t,n,o,i,r,s,a){var l,c="function"===typeof e?e.options:e;if(t&&(c.render=t,c.staticRenderFns=n,c._compiled=!0),o&&(c.functional=!0),r&&(c._scopeId="data-v-"+r),s?(l=function(e){e=e||this.$vnode&&this.$vnode.ssrContext||this.parent&&this.parent.$vnode&&this.parent.$vnode.ssrContext,e||"undefined"===typeof __VUE_SSR_CONTEXT__||(e=__VUE_SSR_CONTEXT__),i&&i.call(this,e),e&&e._registeredComponents&&e._registeredComponents.add(s)},c._ssrRegister=l):i&&(l=a?function(){i.call(this,(c.functional?this.parent:this).$root.$options.shadowRoot)}:i),l)if(c.functional){c._injectStyles=l;var d=c.render;c.render=function(e,t){return l.call(t),d(e,t)}}else{var u=c.beforeCreate;c.beforeCreate=u?[].concat(u,l):[l]}return{exports:e,options:c}}var Hn=qn(zn,Ln,jn,!1,null,"09d8a8ac",null),Vn=Hn.exports,Un=h(50467),Gn=h.n(Un),Wn="processmaker-modeler-data-output-association",$n="bpmn:DataOutputAssociation";function Xn(e){return e.create("bpmn:DataOutputAssociation",{targetRef:{x:void 0,y:void 0}})}function Yn(e){return e.create("bpmndi:BPMNEdge")}var Zn="processmaker-modeler-data-input-association",Kn="bpmn:DataInputAssociation";function Jn(e){return e.create("bpmn:DataInputAssociation",{targetRef:{x:void 0,y:void 0}})}function Qn(e){return e.create("bpmndi:BPMNEdge")}function eo(e,t){var n=this,o=e.getConnectedLinks(t);o.forEach((function(e){return n.$emit("remove-node",e.component.node)}))}function to(e,t){e.definition.incoming&&e.definition.incoming.forEach((function(e){var n=t.nodes.find((function(t){return t.definition===e}));t.removeNode(n)})),e.definition.outgoing&&e.definition.outgoing.forEach((function(e){var n=t.nodes.find((function(t){return t.definition===e}));t.removeNode(n)}))}function no(e,t){var n=t.nodes.filter((function(t){return!(!t.definition.sourceRef||t.definition.sourceRef!==e.definition)||(!(!t.definition.targetRef||t.definition.targetRef!==e.definition)||void 0)}));n.forEach((function(e){t.removeNode(e)}))}function oo(e,t){var n=t.nodes.filter((function(t){return!(!t.definition.sourceRef||t.definition.sourceRef!==e.definition)||(!(!t.definition.targetRef||t.definition.targetRef!==e.definition)||void 0)}));n.forEach((function(e){t.removeNode(e)}))}function io(e,t,n){var o=e.getCells().find((function(e){return e.component&&e.component.node===t}));o.getEmbeddedCells({deep:!0}).filter((function(e){return e.component&&e.component.node.isBpmnType("bpmn:BoundaryEvent")})).forEach((function(t){e.getConnectedLinks(t).forEach((function(e){return n(e.component.node)})),n(t.component.node)}))}function ro(e){if(!e.isBpmnType($n,Kn)){var t=e.definition,n=t.sourceRef,o=t.targetRef;n&&(0,Un.pull)(n.get("outgoing"),e.definition),o&&o.id&&(0,Un.pull)(o.get("incoming"),e.definition)}}function so(e){var t=(0,Un.get)(e,"definition.sourceRef.default.id",null);t&&t===e.id&&e.definition.sourceRef.set("default",null)}function ao(e,t,n){if("bpmn:DataObjectReference"!==n.$type&&"bpmn:DataStoreReference"!==n.$type)throw"Source node must be a DataObjectReference or bpmn:DataStoreReference, got "+n.$type;var o=n.id,i="data_input_".concat(o);t.definition.ioSpecification||(t.definition.ioSpecification=e.create("bpmn:InputOutputSpecification",{dataInputs:[],dataOutputs:[],inputSets:[],outputSets:[]}),t.definition.ioSpecification.$parent=t.definition),t.definition.ioSpecification.dataInputs||t.definition.ioSpecification.set("dataInputs",[]);var r=t.definition.ioSpecification.dataInputs.find((function(e){return e.id===i}));r||(t.definition.ioSpecification.dataInputs.push(e.create("bpmn:DataInput",{id:i,isCollection:"false",name:n.name})),t.definition.ioSpecification.dataInputs[t.definition.ioSpecification.dataInputs.length-1].$parent=t.definition.ioSpecification,t.definition.ioSpecification.set("dataInputs",t.definition.ioSpecification.dataInputs)),r=t.definition.ioSpecification.dataInputs.find((function(e){return e.id===i})),t.definition.ioSpecification.outputSets||t.definition.ioSpecification.set("outputSets",[e.create("bpmn:OutputSet",{dataOutputRefs:[]})]);var s=t.definition.ioSpecification.outputSets[0];s||t.definition.ioSpecification.set("outputSets",[e.create("bpmn:OutputSet",{dataOutputRefs:[]})]),s=t.definition.ioSpecification.outputSets[0],t.definition.ioSpecification.inputSets||t.definition.ioSpecification.set("inputSets",[e.create("bpmn:InputSet",{dataInputRefs:[]})]);var a=t.definition.ioSpecification.inputSets[0];a||t.definition.ioSpecification.set("inputSets",[e.create("bpmn:InputSet",{dataInputRefs:[]})]),a=t.definition.ioSpecification.inputSets[0];var l=a.get("dataInputRefs").find((function(e){return e.id===i}));return l||a.dataInputRefs.push(r),r}function lo(e,t){var n,o=e.$parent;return o||(null===(n=t.nodes.find((function(t){var n;return t.definition.ioSpecification===e||(null===(n=t.definition.ioSpecification)||void 0===n?void 0:n.id)===e.id})))||void 0===n?void 0:n.definition)}function co(e,t){if("bpmn:DataObjectReference"!==t.$type&&"bpmn:DataStoreReference"!==t.$type)throw"Source node must be a DataObjectReference or bpmn:DataStoreReference, got "+t.$type;var n=t.id,o="data_input_".concat(n);if(e.definition.ioSpecification&&e.definition.ioSpecification.dataInputs){var i=e.definition.ioSpecification.dataInputs.find((function(e){return e.id===o}));if(i&&((0,Un.pull)(e.definition.ioSpecification.dataInputs,i),e.definition.ioSpecification.inputSets)){var r=e.definition.ioSpecification.inputSets[0];if(r){var s=r.dataInputRefs.find((function(e){return e.id===o}));if(s&&(0,Un.pull)(r.dataInputRefs,s),0===r.dataInputRefs.length&&delete e.definition.ioSpecification.inputSets,e.definition.ioSpecification.outputSets){var a=e.definition.ioSpecification.outputSets[0];!a||a.dataOutputRefs&&0!==a.dataOutputRefs.length||delete e.definition.ioSpecification.outputSets}e.definition.ioSpecification.inputSets||e.definition.ioSpecification.outputSets||delete e.definition.ioSpecification}}}}var uo={components:{CrownButton:Vn},props:{graph:Object,shape:Object,node:Object},data:function(){return{trashIcon:Bn}},computed:{isPoolLane:function(){return"processmaker-modeler-lane"===this.node.type}},methods:{removeFlows:eo,removeShape:function(){this.removeFlows(this.graph,this.shape),this.$emit("remove-node",this.node)},removePoolLaneShape:function(){var e=this;this.$emit("remove-node",this.node);var t=this.node.pool.component,n=t.sortedLanes();2!==n.length?this.shape!==n[n.length-1]?t.fillLanes(this.shape,"bottom-right",!0):t.fillLanes(this.shape,"top-right",!0):this.$emit("remove-node",n.filter((function(t){return t!==e.shape}))[0].component.node)}}},po=uo,ho=qn(po,Nn,Rn,!1,null,null,null),fo=ho.exports,mo=function(){var e=this,t=e._self._c;return e.allowOutgoingSequenceFlow?t("crown-button",{directives:[{name:"b-tooltip",rawName:"v-b-tooltip.hover.viewport.d50",value:{customClass:"no-pointer-events"},expression:"{ customClass: 'no-pointer-events' }",modifiers:{hover:!0,viewport:!0,d50:!0}}],attrs:{title:e.$t("Flow"),id:"generic-flow-button","aria-label":"Create a flow",role:"menuitem"},on:{click:e.addSequence}},[t("font-awesome-icon",{attrs:{icon:["fpm","fa-connect-elements"]}})],1):e._e()},go=[],vo=h.p+"img/connect-elements.ab6af00f.svg";h(38880),h(49337);function bo(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,o)}return n}function yo(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?bo(Object(n),!0).forEach((function(t){_e(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):bo(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function wo(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function xo(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,Te(o.key),o)}}function ko(e,t,n){return t&&xo(e.prototype,t),n&&xo(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}h(15306);var Co={"processmaker-modeler-start-event":"Start Event","processmaker-modeler-start-timer-event":"Start Timer Event","processmaker-modeler-signal-start-event":"Signal Start Event","processmaker-modeler-message-start-event":"Message Start Event","processmaker-modeler-conditional-start-event":"Conditional Start Event"},So=Co,Eo={"processmaker-modeler-end-event":"End Event","processmaker-modeler-error-end-event":"Error End Event","processmaker-modeler-message-end-event":"Message End Event","processmaker-modeler-signal-end-event":"Signal End Event","processmaker-modeler-terminate-end-event":"Terminate End Event"},Ao=Eo,Mo={"processmaker-modeler-task":"Form Task","processmaker-modeler-manual-task":"Manual Task","processmaker-modeler-script-task":"Script Task","processmaker-modeler-call-activity":"Sub Process","processmaker-modeler-data-object":"Data Object","processmaker-modeler-data-store":"Data Store"},To=Mo,_o={"processmaker-modeler-exclusive-gateway":"Exclusive Gateway","processmaker-modeler-inclusive-gateway":"Inclusive Gateway","processmaker-modeler-parallel-gateway":"Parallel Gateway","processmaker-modeler-event-based-gateway":"Event Based Gateway"},Po=_o,Oo={"processmaker-modeler-intermediate-catch-timer-event":"Intermediate Timer Event","processmaker-modeler-intermediate-signal-catch-event":"Intermediate Signal Catch Event","processmaker-modeler-intermediate-signal-throw-event":"Intermediate Signal Throw Event","processmaker-modeler-intermediate-message-catch-event":"Intermediate Message Catch Event","processmaker-modeler-intermediate-message-throw-event":"Intermediate Message Throw Event","processmaker-modeler-intermediate-conditional-catch-event":"Intermediate Conditional Catch Event"},Do=Oo,Io=h(50361),No=h.n(Io),Ro=function(){function e(t,n,o){wo(this,e),_e(this,"type",void 0),_e(this,"definition",void 0),_e(this,"diagram",void 0),_e(this,"pool",void 0),this.type=t,this.definition=n,this.diagram=o}return ko(e,[{key:"isBpmnType",value:function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return t.includes(this.definition.$type)}},{key:"canBeDefaultFlow",value:function(){var e=["bpmn:ExclusiveGateway","bpmn:InclusiveGateway"];return"bpmn:SequenceFlow"===this.definition.$type&&e.includes(this.definition.sourceRef.$type)}},{key:"isType",value:function(e){return this.type===e}},{key:"isStartEvent",value:function(){return Object.keys(So).includes(this.type)}},{key:"isEndEvent",value:function(){return Object.keys(Ao).includes(this.type)}},{key:"isTask",value:function(){return Object.keys(To).includes(this.type)}},{key:"isGateway",value:function(){return Object.keys(Po).includes(this.type)}},{key:"isIntermediateEvent",value:function(){return Object.keys(Do).includes(this.type)}},{key:"id",get:function(){return this.definition.id},set:function(e){this.definition.id=e}},{key:"setIds",value:function(e){var t,n,o=this,i=e.generate(),r=mt(i,2),s=r[0],a=r[1];if(this.id||(this.id=s),this.diagram&&(this.diagram.id=a,this.diagram.bpmnElement=this.definition),this.definition.loopCharacteristics&&"bpmn:StandardLoopCharacteristics"===this.definition.loopCharacteristics.$type&&(this.definition.loopCharacteristics.set("id",e.generate()[0]),this.definition.loopCharacteristics.loopCondition&&this.definition.loopCharacteristics.get("loopCondition").set("id",e.generate()[0])),this.definition.ioSpecification){this.definition.ioSpecification.set("id",e.generate()[0]);var l=this.definition.id;this.definition.ioSpecification.get("dataInputs")&&this.definition.ioSpecification.get("dataInputs").forEach((function(n){var i=n.get("id");i.substring(0,o.cloneOf.length)===o.cloneOf?(n.set("id",i.replace(o.cloneOf+"_",l+"_")),t=n):n.set("id",e.generate()[0])})),this.definition.ioSpecification.get("dataOutputs")&&this.definition.ioSpecification.get("dataOutputs").forEach((function(t){var i=t.get("id");i.substring(0,o.cloneOf.length)===o.cloneOf?(t.set("id",i.replace(o.cloneOf+"_",l+"_")),n=t):t.set("id",e.generate()[0])})),this.definition.ioSpecification.get("inputSets")&&this.definition.ioSpecification.get("inputSets").forEach((function(t){t.set("id",e.generate()[0])})),this.definition.ioSpecification.get("outputSets")&&this.definition.ioSpecification.get("outputSets").forEach((function(t){t.set("id",e.generate()[0])}))}this.definition.loopCharacteristics&&"bpmn:MultiInstanceLoopCharacteristics"===this.definition.loopCharacteristics.$type&&(this.definition.loopCharacteristics.set("id",e.generate()[0]),this.definition.loopCharacteristics.loopCardinality&&this.definition.loopCharacteristics.get("loopCardinality").set("id",e.generate()[0]),this.definition.loopCharacteristics.loopDataInputRef&&t&&this.definition.loopCharacteristics.set("loopDataInputRef",t),this.definition.loopCharacteristics.loopDataOutputRef&&n&&this.definition.loopCharacteristics.set("loopDataOutputRef",n),this.definition.loopCharacteristics.inputDataItem&&this.definition.loopCharacteristics.get("inputDataItem").set("id",e.generate()[0]),this.definition.loopCharacteristics.outputDataItem&&this.definition.loopCharacteristics.get("outputDataItem").set("id",e.generate()[0]),this.definition.loopCharacteristics.completionCondition&&this.definition.loopCharacteristics.get("completionCondition").set("id",e.generate()[0]))}},{key:"clone",value:function(t,n,o){var i=this,r=t[this.type].definition(n,o),s=t[this.type].diagram(n),a=new this.constructor(this.type,r,s);return a.id=null,a.pool=this.pool,a.cloneOf=this.id,e.diagramPropertiesToCopy.forEach((function(e){return a.diagram.bounds[e]=i.diagram.bounds[e]})),Object.keys(this.definition).filter((function(t){return!e.definitionPropertiesToNotCopy.includes(t)})).forEach((function(e){var t=i.definition.get(e),n="object"===g(t)?No()(t):t;if("eventDefinitions"===e)for(var o in n)t[o].signalRef&&!n[o].signalRef&&n[o].set("signalRef",yo({},t[o].signalRef));a.definition.set(e,n)})),e.eventDefinitionPropertiesToNotCopy.forEach((function(e){return a.definition.eventDefinitions&&a.definition.eventDefinitions[0]&&Object.hasOwn(a.definition.eventDefinitions[0],e)&&a.definition.eventDefinitions[0].set(e,null)})),a}},{key:"cloneFlow",value:function(t,n,o){var i=this,r=t[this.type].definition(n,o),s=t[this.type].diagram(n),a=new this.constructor(this.type,r,s);return a.id=null,a.pool=this.pool,a.cloneOf=this.id,a.diagram=n.create("bpmndi:BPMNEdge",{waypoint:[]}),this.diagram.waypoint.forEach((function(e){var t=n.create("dc:Point",{x:e.x,y:e.y});a.diagram.waypoint.push(t)})),Object.keys(this.definition).filter((function(t){return!e.flowDefinitionPropertiesToNotCopy.includes(t)})).forEach((function(e){var t=i.definition.get(e),n="object"===g(t)?No()(t):t;if("eventDefinitions"===e)for(var o in n)t[o].signalRef&&!n[o].signalRef&&n[o].set("signalRef",yo({},t[o].signalRef));a.definition.set(e,n),a.definition.set("sourceRef",null),a.definition.set("targetRef",null)})),e.eventDefinitionPropertiesToNotCopy.forEach((function(e){return a.definition.eventDefinitions&&a.definition.eventDefinitions[0]&&Object.hasOwn(a.definition.eventDefinitions[0],e)&&a.definition.eventDefinitions[0].set(e,null)})),a}},{key:"getTargetProcess",value:function(e,t){var n=this;return this.pool?e.find((function(e){var t=e.id;return t===n.pool.component.node.definition.get("processRef").id})):t.definition}}],[{key:"isTimerType",value:function(e){return["processmaker-modeler-start-timer-event","processmaker-modeler-intermediate-catch-timer-event"].includes(e)}}]),e}();_e(Ro,"diagramPropertiesToCopy",["x","y","width","height"]),_e(Ro,"definitionPropertiesToNotCopy",["$type","id","dataOutputAssociations"]),_e(Ro,"flowDefinitionPropertiesToNotCopy",["$type","id","sourceRef","targetRef"]),_e(Ro,"eventDefinitionPropertiesToNotCopy",["errorRef","messageRef"]);var Bo="processmaker-modeler-generic-flow",Lo=h(65554),jo={prefix:"fpm",iconName:"fa-boundary-event",icon:[112,112,[],"e001","M51.739 2.056c-13.026.848-25.131 6.341-34.43 15.625C10.84 24.139 6.603 30.987 3.72 39.642.81 48.38.051 56.948 1.392 65.92c.932 6.232 3.501 13.807 6.441 18.991 8.903 15.7 23.772 25.701 41.487 27.903 2.517.312 9.393.312 11.911 0 17.703-2.201 32.617-12.231 41.488-27.903 2.943-5.2 5.508-12.763 6.439-18.991 1.698-11.359-.064-22.783-5.13-33.257-4.913-10.156-13.314-18.932-23.21-24.247-7.159-3.845-14.191-5.854-22.286-6.365-3.224-.204-3.584-.204-6.793.005m8.216 4.091c8.319.827 15.946 3.548 22.891 8.165 3.153 2.096 5.414 3.998 8.35 7.021 7.582 7.807 12.34 17.536 14.049 28.731.423 2.764.572 9.015.29 12.1-.962 10.515-4.848 20.143-11.415 28.286-1.857 2.303-5.901 6.293-8.136 8.029a50.9 50.9 0 0 1-23.544 10.144c-3.182.489-11.148.489-14.33 0-5.812-.893-11.669-2.875-16.75-5.668-11.303-6.213-20.134-17.022-24.092-29.49-3.259-10.266-3.259-21.647 0-31.913a51.37 51.37 0 0 1 11.995-20.128c2.834-2.93 5.301-5.008 8.426-7.097a49.964 49.964 0 0 1 22.654-8.169c2.192-.225 7.401-.231 9.612-.011m-9.053 12.099c-20.419 2.322-35.641 19.091-35.641 39.263 0 14.657 8.112 27.984 21.217 34.859 14.221 7.46 31.65 5.768 44.132-4.283 14.219-11.449 18.699-30.977 10.879-47.42-5.522-11.611-16.451-19.808-29.421-22.068-2.55-.444-8.659-.636-11.166-.351m6.979 3.906c1.382.105 3.214.321 4.071.481 12.854 2.394 23.482 11.579 27.55 23.808 4.141 12.449 1.019 26.046-8.153 35.508-5.615 5.792-12.307 9.26-20.584 10.667-2.565.436-8.414.436-10.98 0-11.016-1.872-19.998-7.889-25.586-17.14-5.178-8.573-6.354-19.406-3.15-29.035 4.492-13.506 16.952-23.186 31.248-24.278 2.856-.218 2.85-.218 5.584-.011"]},Fo={prefix:"fpm",iconName:"fa-connect-elements",icon:[20,20,[],"e002","M0 2.502v2.501h5.003V3.008h5.004v15.01h5.478V19c0 .54.011.981.024.981.053-.001 2.989-2.477 2.964-2.499a203.517 203.517 0 0 0-2.942-2.429c-.04-.016-.046.116-.046.967v.985h-4.497V1.995H5.003V0H0v2.502m3.99.016v1.504H1.013V1.013H3.99v1.505"]},zo={prefix:"fpm",iconName:"fa-lane-above",icon:[26,18,[],"e003","M0 .997v.996h.997V.997h1.04V0H0v.997M2.99.498v.499h2.037V0H2.99v.498m2.99 0v.499h2.037V0H5.98v.498m3.033 0v.499h1.994V0H9.013v.498m2.99 0v.499h1.994V0h-1.994v.498m2.99 0v.499h1.994V0h-1.994v.498m2.99 0v.499h2.037V0h-2.037v.498m2.99 0v.499h2.037V0h-2.037v.498m2.99 0v.499h1.04v.996H26V0h-2.037v.498M0 3.987v.996h.997V2.99H0v.997m25.003 0v.996H26V2.99h-.997v.997M0 11.982v6.001h26V5.98H0v6.002"]},qo={prefix:"fpm",iconName:"fa-lane-below",icon:[26,18,[],"e004","M0 6.002v6.001h26V0H0v6.002m0 7.995v.996h.997V13H0v.997m25.003 0v.996H26V13h-.997v.997M0 16.987v.996h2.037v-.996H.997v-.997H0v.997m25.003-.499v.499h-1.04v.996H26V15.99h-.997v.498m-22.013.997v.498h2.037v-.996H2.99v.498m2.99 0v.498h2.037v-.996H5.98v.498m3.033 0v.498h1.994v-.996H9.013v.498m2.99 0v.498h1.994v-.996h-1.994v.498m2.99 0v.498h1.994v-.996h-1.994v.498m2.99 0v.498h2.037v-.996h-2.037v.498m2.99 0v.498h2.037v-.996h-2.037v.498"]},Ho={prefix:"fpm",iconName:"fa-center-horizontally",icon:[24,24,[],"e001","M11.04 4.88v1.88H7.28v3.92h3.76v3.28H5v3.92h6.04v3.76h1v-3.76h6.04v-3.92h-6.04v-3.28h3.76V6.76h-3.76V3h-1v1.88"]},Vo={prefix:"fpm",iconName:"fa-center-vertically",icon:[24,24,[],"e001","M6.76 8.04v3.04H3v.96h3.76v6.04h3.92v-6.04h3.28v3.76h3.92v-3.76h3.76v-.959l-1.87-.011-1.87-.01-.01-1.89-.011-1.89H13.96v3.801l-1.63-.011-1.63-.01-.01-3.03L10.679 5H6.76v3.04"]},Uo={prefix:"fpm",iconName:"fa-align-left",icon:[24,24,[],"e001","M4 12.32v9.32h1V3H4v9.32m2.28-3.6v1.96h8.52V6.76H6.28v1.96m0 7.2v1.96h13.08v-3.92H6.28v1.96"]},Go={prefix:"fpm",iconName:"fa-align-right",icon:[24,24,[],"e001","M18.4 12.32v9.32h1V3h-1v9.32m-9.8-3.6v1.96h8.48V6.76H8.6v1.96M4 15.92v1.96h13.08v-3.92H4v1.96"]},Wo={prefix:"fpm",iconName:"fa-align-bottom",icon:[24,24,[],"e001","M6.76 10.54v6.54h3.92V4H6.76v6.54m7.2 2.3v4.24h3.92V8.6h-3.92v4.24M3 18.9v.5h18.64v-1H3v.5"]},$o={prefix:"fpm",iconName:"fa-align-top",icon:[24,24,[],"e001","M3 4.5V5h18.64V4H3v.5m3.76 8.32v6.54h3.92V6.28H6.76v6.54m7.2-2.28v4.26h3.92V6.28h-3.92v4.26"]},Xo={prefix:"fpm",iconName:"fa-distribute-horizontally",icon:[24,24,[],"e001","M3 12.32v9.32h.96V3H3v9.32m17 0v9.32h1V3h-1v9.32m-10.44.02v6.54h4.88V5.8H9.56v6.54"]},Yo={prefix:"fpm",iconName:"fa-distribute-vertically",icon:[24,24,[],"e001","M3 3.5V4h18.64V3H3v.5M5.8 12v2.44h13.08V9.56H5.8V12M3 20.52V21h18.64v-.96H3v.48"]},Zo=h(39865),Ko=["processmaker-modeler-data-object","processmaker-modeler-data-store","processmaker-modeler-lane","processmaker-modeler-end-event","processmaker-modeler-error-end-event","processmaker-modeler-signal-end-event","processmaker-modeler-terminate-end-event","processmaker-modeler-text-annotation","processmaker-modeler-sequence-flow","processmaker-modeler-message-flow"],Jo={components:{CrownButton:Vn,FontAwesomeIcon:Zo.FontAwesomeIcon},props:["node","moddle","nodeRegistry"],data:function(){return{sequenceFlow:vo}},computed:{paper:function(){return bn.getters.paper},sequenceFlowConfig:function(){return this.nodeRegistry[Bo]},nodeConfig:function(){return this.nodeRegistry[this.node.type]},allowOutgoingSequenceFlow:function(){var e=this;return!Ko.some((function(t){return e.node.isType(t)}))}},methods:{addSequence:function(e,t,n,o){this.$emit("toggle-crown-state",!1);var i=e.clientX,r=e.clientY,s=null;e&&(s=(0,a.V)(this.paper.viewport).toLocalPoint(i,r));var l=this.moddle.create("bpmn:SequenceFlow",{name:"",sourceRef:this.node.definition,targetRef:{x:n||s.x,y:o||s.y}});this.$emit("add-node",new Ro(Bo,l,this.moddle.create("bpmndi:BPMNEdge")))}},created:function(){this.$t=this.$t.bind(this),Lo.library.add(Fo)}},Qo=Jo,ei=qn(Qo,mo,go,!1,null,null,null),ti=ei.exports,ni=function(){var e=this,t=e._self._c;return e.node.isType("processmaker-modeler-text-annotation")?t("crown-button",{directives:[{name:"b-tooltip",rawName:"v-b-tooltip.hover.viewport.d50",value:{customClass:"no-pointer-events"},expression:"{ customClass: 'no-pointer-events' }",modifiers:{hover:!0,viewport:!0,d50:!0}}],attrs:{title:e.$t("Association Flow"),id:"association-flow-button","aria-label":"Add association flow",role:"menuitem"},on:{click:e.addAssociation}},[t("img",{attrs:{src:e.connectIcon,"aria-hidden":"true"}})]):e._e()},oi=[],ii=h.p+"img/connect-artifacts.e3e5e73f.svg",ri={components:{CrownButton:Vn},props:["node","moddle","shape"],data:function(){return{connectIcon:ii}},methods:{addAssociation:function(e,t,n,o){this.$emit("toggle-crown-state",!1);var i=this.moddle.create("bpmn:Association",{sourceRef:this.shape.component.node.definition,targetRef:{x:n,y:o},associationDirection:On.none});this.$emit("add-node",new Ro("processmaker-modeler-association",i,this.moddle.create("bpmndi:BPMNEdge")))}}},si=ri,ai=qn(si,ni,oi,!1,null,null,null),li=ai.exports,ci=function(){var e=this,t=e._self._c;return e.allowOutgoingDataAssociationFlow?t("crown-button",{directives:[{name:"b-tooltip",rawName:"v-b-tooltip.hover.viewport.d50",value:{customClass:"no-pointer-events"},expression:"{ customClass: 'no-pointer-events' }",modifiers:{hover:!0,viewport:!0,d50:!0}}],attrs:{title:e.$t("Data Association Flow"),id:"association-flow-button","aria-label":"Add association flow",role:"menuitem"},on:{click:e.addDataAssociation}},[t("img",{attrs:{src:e.connectIcon,"aria-hidden":"true"}})]):e._e()},di=[];function ui(e,t){return ui=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},ui(e,t)}function pi(e,t){if("function"!==typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&ui(e,t)}h(12419),h(81299);function hi(e){return hi=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},hi(e)}function fi(){if("undefined"===typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"===typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}function mi(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function gi(e,t){if(t&&("object"===g(t)||"function"===typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return mi(e)}function vi(e){var t=fi();return function(){var n,o=hi(e);if(t){var i=hi(this).constructor;n=Reflect.construct(o,arguments,i)}else n=o.apply(this,arguments);return gi(this,n)}}var bi="processmaker-modeler-pool",yi=function(){function e(t,n,o){wo(this,e),_e(this,"nodeRegistry",void 0),_e(this,"moddle",void 0),_e(this,"paper",void 0),this.nodeRegistry=t,this.moddle=n,this.paper=o}return ko(e,[{key:"makeFlowNode",value:function(e,t,n){throw new Error("Best practice is to implement 'makeFlowDefinition' in each class")}}],[{key:"isValid",value:function(e,t,n){throw new Error("Best practice is to implement 'isValid' in each class")}},{key:"hasTargetType",value:function(e){return null!=x()(e,"component.node.type")}},{key:"targetIsValidStartEventType",value:function(e){return!e.isBpmnType("bpmn:StartEvent")||e.isType("processmaker-modeler-message-start-event")}},{key:"targetIsValidIntermediateEventType",value:function(e){return!e.isBpmnType("bpmn:IntermediateCatchEvent")||e.isType("processmaker-modeler-intermediate-message-catch-event")}},{key:"targetIsValidBoundaryEventType",value:function(e){return!e.isBpmnType("bpmn:BoundaryEvent")||e.isType("processmaker-modeler-boundary-message-event")}},{key:"targetIsNotContainingPool",value:function(e,t){return e!==t.pool}},{key:"targetIsInDifferentPool",value:function(t,n){var o=e.shapeIsPool(t)?t:t.component.node.pool,i=e.shapeIsPool(n)?n:n.component.node.pool;return null!=i&&i!==o}},{key:"targetIsNotSource",value:function(e,t){return e.id!==t.id}},{key:"allowOutgoingFlow",value:function(e,t){return!("allowOutgoingFlow"in e)||e.allowOutgoingFlow(t)}},{key:"shapeIsPool",value:function(e){var t=x()(e,"component.node.type");return t===bi}}]),e}(),wi=function(e){pi(n,e);var t=vi(n);function n(){return wo(this,n),t.apply(this,arguments)}return ko(n,null,[{key:"isADataNode",value:function(e){return e.isBpmnType.apply(e,m(n.dataNodeTypes))}},{key:"isNodeDisallowedFromDataAssociation",value:function(e){return e.isBpmnType.apply(e,m(n.disallowedNodes))}}]),n}(yi);_e(wi,"dataNodeTypes",["bpmn:DataStoreReference","bpmn:DataObjectReference"]),_e(wi,"disallowedNodes",["bpmn:EndEvent","bpmn:MessageFlow","bpmn:SequenceFlow","bpmn:Participant","bpmn:Lane","bpmn:TextAnnotation","bpmn:Association"]);var xi={components:{CrownButton:Vn},props:["node","moddle","shape"],data:function(){return{connectIcon:ii}},computed:{paper:function(){return bn.getters.paper},allowOutgoingDataAssociationFlow:function(){return wi.isADataNode(this.node)}},methods:{addDataAssociation:function(n,o,i){this.$emit("toggle-crown-state",!1);var r=n.clientX,s=n.clientY,l=null;n&&(l=(0,a.V)(this.paper.viewport).toLocalPoint(r,s));var c=this.node.isBpmnType("bpmn:DataStoreReference","bpmn:DataObjectReference"),d=c?t:e,u=d.definition(this.moddle),p=new Ro(d.id,u,d.diagram(this.moddle));p.dataAssociationProps={sourceShape:this.shape,targetCoords:{x:o||l.x,y:i||l.y}},this.$emit("add-node",p)}}},ki=xi,Ci=qn(ki,ci,di,!1,null,null,null),Si=Ci.exports,Ei=function(){var e,t=this,n=t._self._c;return(e=t.node).isBpmnType.apply(e,m(t.validCopyElements))?n("crown-button",{directives:[{name:"b-tooltip",rawName:"v-b-tooltip.hover.viewport.d50",value:{customClass:"no-pointer-events"},expression:"{ customClass: 'no-pointer-events' }",modifiers:{hover:!0,viewport:!0,d50:!0}}],attrs:{title:t.$t("Copy Element"),"aria-label":"Copy Element","data-test":"copy-button",role:"menuitem"},on:{click:t.copyElement}},[n("i",{staticClass:"fas fa-clipboard"})]):t._e()},Ai=[],Mi=h.p+"img/clipboard.06edfa02.svg",Ti=["bpmn:StartEvent","bpmn:IntermediateEvent","bpmn:IntermediateCatchEvent","bpmn:IntermediateThrowEvent","bpmn:EndEvent","bpmn:Task","bpmn:UserTask","bpmn:GlobalTask","bpmn:SubProcess","bpmn:CallActivity","bpmn:ManualTask","bpmn:ScriptTask","bpmn:ServiceTask","bpmn:ExclusiveGateway","bpmn:ParallelGateway","bpmn:InclusiveGateway","bpmn:Gateway","bpmn:EventBasedGateway","bpmn:TextAnnotation"],_i=Ti,Pi={components:{CrownButton:Vn},props:["node"],data:function(){return{copyCount:0,copyIcon:Mi,validCopyElements:_i}},methods:{copyElement:function(){this.$emit("copy-element")}}},Oi=Pi,Di=qn(Oi,Ei,Ai,!1,null,null,null),Ii=Di.exports,Ni=function(){var e,t=this,n=t._self._c;return(e=t.node).isBpmnType.apply(e,m(t.validCopyElements))?n("crown-button",{directives:[{name:"b-tooltip",rawName:"v-b-tooltip.hover.viewport.d50",value:{customClass:"no-pointer-events"},expression:"{ customClass: 'no-pointer-events' }",modifiers:{hover:!0,viewport:!0,d50:!0}}],attrs:{title:t.$t("Clone Element"),"aria-label":"Clone Element","data-test":"clone-button"},on:{click:t.cloneElement}},[n("i",{staticClass:"fas fa-paste"})]):t._e()},Ri=[],Bi=h.p+"img/copy-regular.67a8edbd.svg",Li={components:{CrownButton:Vn},props:["node"],data:function(){return{copyCount:0,cloneIcon:Bi,validCopyElements:_i}},methods:{cloneElement:function(){this.$emit("clone-element",this.node,++this.copyCount)}}},ji=Li,Fi=qn(ji,Ni,Ri,!1,null,null,null),zi=Fi.exports,qi=function(){var e=this,t=e._self._c;return t("div",{attrs:{id:"dropdown"}},[t("crown-task-dropdown",e._g({attrs:{"dropdown-data":e.dropdownData,"dropdown-open":e.taskDropdownOpen,node:e.node},on:{"toggle-dropdown-state":e.taskDropdownToggle}},e.$listeners)),t("crown-boundary-event-dropdown",e._g({attrs:{"dropdown-data":e.boundaryEventDropdownData,"dropdown-open":e.boundaryEventDropdownOpen,nodeRegistry:e.nodeRegistry,moddle:e.moddle,node:e.node,shape:e.shape},on:{"toggle-dropdown-state":e.boundaryEventDropdownToggle}},e.$listeners)),t("crown-color-dropdown",e._g({attrs:{"dropdown-open":e.colorDropdownOpen,node:e.node,showCustomIconPicker:e.showCustomIconPicker,iconName:e.iconName},on:{"toggle-dropdown-state":e.colorDropdownToggle}},e.$listeners))],1)},Hi=[],Vi=function(){var e=this,t=e._self._c;return e.dropdownData.length>0?t("div",{staticClass:"cog-container",attrs:{role:"menuitem"}},[t("crown-button",e._g({attrs:{"data-test":"select-type-dropdown",id:"dropdown-button","aria-label":"Select a type"},on:{click:function(t){return e.$emit("toggle-dropdown-state",!e.dropdownOpen)}}},e.$listeners),[t("i",{staticClass:"fas fa-cog"})]),e.dropdownOpen?t("ul",{staticClass:"element-list",attrs:{role:"list"}},e._l(e.dropdownData,(function(n){var o=n.label,i=n.nodeType,r=n.dataTest,s=n.disabled;return t("li",{key:i,staticClass:"element-list--item",attrs:{role:"listitem",id:i}},[t("button",{staticClass:"element-list--item__button",attrs:{"data-test":r,type:"button",disabled:e.isDisabled(s,e.node,i)},on:{click:function(t){return e.replaceNode({node:e.node,typeToReplaceWith:i})}}},[e._v(e._s(e.$t(o))+" ")]),e.isDisabled(s,e.node,i)?t("b-tooltip",{attrs:{target:i,variant:"warning",placement:"right"}},[e._v(" "+e._s(e.$t(e.tooltip(s,e.node,i)))+" ")]):e._e()],1)})),0):e._e()],1):e._e()},Ui=[],Gi={name:"CrownTaskDropdown",components:{CrownButton:Vn},props:{dropdownData:Array,node:Object,dropdownOpen:{type:Boolean,required:!0}},methods:{isDisabled:function(e,t,n){return e&&(e instanceof Function?e.apply(this,[t,n]):e)},tooltip:function(e,t,n){return this.isDisabled(e,t,n)||""},replaceNode:function(e){e.node.type!==e.typeToReplaceWith?this.$emit("replace-node-type",e):this.$emit("toggle-dropdown-state",!1)}}},Wi=Gi,$i=(h(5648),qn(Wi,Vi,Ui,!1,null,"31668547",null)),Xi=$i.exports,Yi=function(){var e=this,t=e._self._c;return e.dropdownData.length>0?t("div",{staticClass:"cog-container",attrs:{role:"menuitem"}},[t("crown-button",e._g({directives:[{name:"b-tooltip",rawName:"v-b-tooltip.hover.viewport.d50",value:{customClass:"no-pointer-events"},expression:"{ customClass: 'no-pointer-events' }",modifiers:{hover:!0,viewport:!0,d50:!0}}],attrs:{id:"dropdown-button","aria-label":"Select a boundary event","data-test":"boundary-event-dropdown",title:e.$t("Boundary Events"),role:"menuitem"},on:{click:function(t){return e.$emit("toggle-dropdown-state",!e.dropdownOpen)}}},e.$listeners),[t("font-awesome-icon",{attrs:{icon:["fpm","fa-boundary-event"]}})],1),e.dropdownOpen?t("ul",{staticClass:"element-list",attrs:{role:"list"}},e._l(e.dropdownData,(function(n){var o=n.label,i=n.nodeType,r=n.dataTest,s=n.disabledLabel;return t("li",{key:i,staticClass:"element-list--item",attrs:{role:"listitem",id:i}},[t("button",{staticClass:"element-list--item__button",attrs:{"data-test":r,type:"button",disabled:!e.canAddBoundaryEventToTarget(i,e.shape)},on:{click:function(t){return e.addBoundaryEvent(i)}}},[e._v(e._s(e.$t(o))+" ")]),e.canAddBoundaryEventToTarget(i,e.shape)?e._e():t("b-tooltip",{attrs:{target:i,variant:"warning",placement:"right"}},[e._v(" "+e._s(e.getErrorTooltipText(s))+" ")])],1)})),0):e._e()],1):e._e()},Zi=[],Ki=h.p+"img/boundary-event.40a868e9.svg",Ji=["bpmn:Task","bpmn:ScriptTask","bpmn:ServiceTask","bpmn:SendTask","bpmn:ReceiveTask","bpmn:UserTask","bpmn:GlobalTask","bpmn:ManualTask","bpmn:CallActivity"];function Qi(e){return e&&Ji.some((function(t){return e.node.isBpmnType(t)}))}function er(e,t){return!(!t||!Qi(t.component))&&nr(t)}function tr(e){return e&&e.node.isBpmnType("bpmn:CallActivity")}function nr(e){return 0!==dt(e).length}var or={name:"CrownBoundaryEventDropdown",components:{CrownButton:Vn,FontAwesomeIcon:Zo.FontAwesomeIcon},props:{dropdownOpen:{type:Boolean,required:!0},dropdownData:Array,nodeRegistry:Object,moddle:Object,node:Object,shape:Object},data:function(){return{boundaryEventIcon:Ki}},methods:{getErrorTooltipText:function(e){return 0===this.getEmptyBoundaryEventPositionsForShape(this.shape).length?"No available space":e},canAddBoundaryEventToTarget:er,getEmptyBoundaryEventPositionsForShape:dt,addBoundaryEvent:function(e){if(this.$emit("toggle-dropdown-state",!1),this.canAddBoundaryEventToTarget(e,this.shape)){var t=this.nodeRegistry[e].definition(this.moddle,this.$t),n=this.nodeRegistry[e].diagram(this.moddle),o=dt(this.shape)[0];n.bounds.x=o.x-n.bounds.width/2,n.bounds.y=o.y-n.bounds.height/2;var i=new Ro(e,t,n);i.pool=this.node.pool,bn.commit("highlightNode",i),this.$emit("add-node",i)}}},created:function(){this.$t=this.$t.bind(this),Lo.library.add(jo)}},ir=or,rr=(h(56073),qn(ir,Yi,Zi,!1,null,null,null)),sr=rr.exports,ar=function(){var e=this,t=e._self._c;return t("div",{staticClass:"cog-container",attrs:{role:"menuitem"}},[t("crown-button",{directives:[{name:"b-tooltip",rawName:"v-b-tooltip.hover.viewport.d50",value:{customClass:"no-pointer-events"},expression:"{ customClass: 'no-pointer-events' }",modifiers:{hover:!0,viewport:!0,d50:!0}}],attrs:{title:e.$t("Open Color Palette"),"aria-label":e.$t("Open Color Palette"),role:"menuitem","data-test":"picker-dropdown-button"},on:{click:function(t){return e.$emit("toggle-dropdown-state",!e.dropdownOpen)}}},[t("i",{staticClass:"fas fa-palette"})]),e.dropdownOpen?t("div",{staticClass:"element-list color-list"},[e._l(e.colors.slice(0,4),(function(n){return t("button",{key:n,staticClass:"color-button",style:{backgroundColor:n},attrs:{type:"button","data-test":n},on:{click:function(t){e.selectedColor=n}}})})),e.showCustomIconPicker?t("button",{staticClass:"color-button p-0 fa fa-drafting-compass",attrs:{type:"button","data-test":"set-custom-icon"},on:{click:e.openIconSelector}}):t("div"),e._l(e.colors.slice(4,8),(function(n){return t("button",{key:n,staticClass:"color-button",style:{backgroundColor:n},attrs:{type:"button","data-test":n},on:{click:function(t){e.selectedColor=n}}})})),t("button",{staticClass:"color-button toggle-picker",attrs:{type:"button"},on:{click:function(t){e.colorPickerOpen=!e.colorPickerOpen}}}),t("button",{staticClass:"color-button p-0 fa fa-undo-alt",attrs:{type:"button","data-test":"clear-color"},on:{click:e.resetNodeStyling}}),e.colorPickerOpen?t("sketch-picker",{staticClass:"color-picker",attrs:{value:e.selectedColor||"#fff",presetColors:null},on:{input:e.setColorFromPicker}}):e._e()],2):e._e(),t("b-modal",{ref:"icon-selector-modal",attrs:{title:"Select a custom icon","cancel-title":"Reset to Default"},on:{cancel:e.resetCustomIcon}},[t("div",[t("icon-selector",{attrs:{value:e.iconName,"allow-custom":!1},on:{input:e.setCustomIcon}})],1)])],1)},lr=[],cr=(h(27479),h(87714),h(82801),h(1174),h(94023)),dr=function(){var e=this,t=e._self._c;return t("div",{staticClass:"multiselect-icons"},[t("b-input-group",[t("multiselect",{ref:"multiselect",attrs:{"track-by":"value",label:"label","show-labels":!1,placeholder:e.placeholder,options:e.list,multiple:!1,searchable:!0,"internal-search":!1,"allow-empty":!1},on:{"search-change":e.onSearch,open:e.onOpen,close:e.onClose},scopedSlots:e._u([{key:"singleLabel",fn:function(n){return[n.option?t("span",[t("i",{staticClass:"fas fa-fw",class:"fa-"+n.option.value}),e._v(" "+e._s(n.option.label)+" ")]):e._e()]}},{key:"option",fn:function(n){return[t("div",{staticClass:"icon-square",on:{mouseover:function(t){return e.onHover(n.option)}}},[t("i",{staticClass:"fas fa-fw",class:"fa-"+n.option.value})])]}}]),model:{value:e.icon,callback:function(t){e.icon=t},expression:"icon"}},[t("template",{slot:"noResult"},[e.allowCustom?t("div",{staticClass:"multiselect-no-result text-muted my-2 text-center w-100"},[t("strong",[e._v(e._s(e.$t("No icons found.")))]),t("br"),e._v(" "+e._s(e.$t("Try a different search or"))+" "),t("br"),t("a",{staticClass:"text-primary link-upload",on:{click:e.triggerUpload}},[e._v(e._s(e.$t("upload a custom icon")))]),e._v(". ")]):t("div",{staticClass:"multiselect-no-result text-muted my-2 text-center w-100"},[t("strong",[e._v(e._s(e.$t("No icons found.")))]),t("br"),e._v(" "+e._s(e.$t("Try a different search."))+" ")])]),t("template",{slot:"placeholder"},[this.file?t("span",[e._v(" "+e._s(e.$t("Custom Icon File"))+" "),this.fileName?t("span",{staticClass:"text-muted"},[e._v("("+e._s(this.fileName)+")")]):e._e()]):e._e()])],2),e.allowCustom?t("b-input-group-append",{staticClass:"multiselect-icons-upload"},[t("file-upload-button",{directives:[{name:"b-tooltip",rawName:"v-b-tooltip",value:{title:e.$t("Upload Custom Icon")},expression:"{ title: $t('Upload Custom Icon') }"}],ref:"fileUploadButton",attrs:{accept:"image/png, image/svg+xml, image/gif",variant:"secondary"},model:{value:e.uploadedFile,callback:function(t){e.uploadedFile=t},expression:"uploadedFile"}},[t("i",{staticClass:"fas fa-fw fa-upload"})])],1):e._e()],1)],1)},ur=[],pr=(h(64765),h(69600),h(42238)),hr=h.n(pr),fr=["search","search-plus","search-dollar","check-square","list","id-badge","clipboard-list","clipboard-check","clipboard","fire","fire-alt","star","dollar-sign","users","user-circle","trophy"],mr=["align-center","align-justify","align-left","align-right","arrows-alt","arrows-alt-h","arrows-alt-v","bars","beer","bong","border-all","border-none","border-style","cannabis","circle-notch","cog","cogs","compress","compress-alt","compress-arrows-alt","custom","democrat","disease","download","ellipsis-h","ellipsis-v","expand","expand-alt","expand-arrows-alt","faucet","file-download","file-export","file-import","file-upload","flag-usa","font-awesome-logo-full","grip-horizontal","grip-lines","grip-lines-vertical","grip-vertical","hand-holding-water","hand-middle-finger","hospital-user","joint","lungs","republican","upload"],gr=function(){function e(){wo(this,e)}return ko(e,null,[{key:"list",value:function(){var e=this,t=[];fr.forEach((function(n){hr()[n]&&t.push(e.parseIcon(n,hr()[n]))}));for(var n=0,o=Object.entries(hr());n<o.length;n++){var i=mt(o[n],2),r=i[0],s=i[1];this.shouldIncludeIcon(r,s)&&t.push(this.parseIcon(r,s))}return t}},{key:"grouped",value:function(){for(var e=[{group:"Common",icons:[]},{group:"All Icons",icons:[]}],t=0,n=Object.entries(hr());t<n.length;t++){var o=mt(n[t],2),i=o[0],r=o[1];mr.includes(i)||(fr.includes(i)&&e[0].icons.push(this.parseIcon(i,r)),this.shouldIncludeIcon(i,r)&&e[1].icons.push(this.parseIcon(i,r)))}return e}},{key:"shouldIncludeIcon",value:function(e,t){var n=!1,o=["-left","-right","-up","-down"];return mr.includes(e)||fr.includes(e)||t.styles.includes("solid")&&!t.changes.includes("5.13.0")&&(n=!0),o.forEach((function(t){e.includes(t)&&(n=!1)})),n}},{key:"parseIcon",value:function(e,t){var n={value:e,label:t.label,search:t.search.terms.join()+","+e+","+t.label.toLowerCase()};return n.label.startsLowerCase()&&(n.label=n.label.unSlug().titleCase()),n}}]),e}();String.prototype.startsLowerCase=function(){var e=this.substring(0,1);return e==e.toLowerCase()},String.prototype.unSlug=function(){return this.split("-").join(" ")},String.prototype.titleCase=function(){var e=this.split(" ");return e=e.map((function(e){return e.substring(0,1).toUpperCase()+e.substring(1)})),e.join(" ")};var vr=function(){var e=this,t=e._self._c;return t("b-button",{staticClass:"file-upload-button",attrs:{block:e.block,disabled:e.disabled,size:e.size,variant:e.variant,type:e.type,tag:e.tag,pill:e.pill,squared:e.squared,pressed:e.pressed},on:{click:e.onClick}},[t("b-form-file",e._b({ref:"fileUpload",staticClass:"file-upload-control",attrs:{plain:"",accept:e.accept,capture:e.capture,multiple:e.multiple,directory:e.directory,"no-traverse":e.noTraverse,"no-drop":e.noDrop,"file-name-formatter":e.fileNameFormatter},on:{change:e.onChange,input:e.onInput},model:{value:e.file,callback:function(t){e.file=t},expression:"file"}},"b-form-file",e.$attrs,!1)),e._t("default")],2)},br=[],yr={inheritAttrs:!1,props:{value:{default:null},block:{type:Boolean,default:!1},disabled:{type:Boolean,default:!1},size:{type:String,default:"md"},variant:{type:String,default:"secondary"},type:{type:String,default:"button"},tag:{type:String,default:"button"},pill:{type:Boolean,default:!1},squared:{type:Boolean,default:!1},pressed:{type:Boolean,default:null},accept:{type:String,default:""},capture:{type:Boolean,default:!1},multiple:{type:Boolean,default:!1},directory:{type:Boolean,default:!1},noTraverse:{type:Boolean,default:!1},noDrop:{type:Boolean,default:!1},fileNameFormatter:{type:Function,default:null}},data:function(){return{file:null}},watch:{file:{handler:function(e){this.$emit("input",e)}},value:{handler:function(e){this.file=e},deep:!0}},methods:{onClick:function(){this.$refs.fileUpload.$el.click()},onChange:function(e){this.$emit("change",e)},onInput:function(e){this.$emit("input",e)},reset:function(){this.$refs.fileUpload.reset()},trigger:function(){this.$refs.fileUpload.$el.click()}}},wr=yr,xr=(h(94960),qn(wr,vr,br,!1,null,null,null)),kr=xr.exports,Cr={components:{FileUploadButton:kr},props:{value:{required:!1},allowCustom:{type:Boolean,default:!0},default:{type:String,default:"search"}},data:function(){return{all:gr.list(),file:null,fileName:null,icon:null,list:{},loading:!0,placeholder:this.$t("Icon"),query:"",uploadedFile:null}},computed:{isOpen:function(){return this.$refs.multiselect.isOpen},iconAndFile:function(){return this.allowCustom?{icon:this.icon?this.icon.value:null,file:this.file}:this.icon?this.icon.value:null}},watch:{value:function(){this.allowCustom?(this.icon=this.find(this.value.icon),this.file=this.value.file):this.icon=this.find(this.value)},icon:function(e){e&&(this.file=null,this.fileName=null,this.allowCustom&&this.$refs.fileUploadButton.reset(),this.$emit("input",this.iconAndFile))},file:function(e){e&&(this.icon=null,this.$refs.multiselect.deactivate(),this.$emit("input",this.iconAndFile))},uploadedFile:function(e){var t=this;if(e)if(e.size>2e3)this.$emit("error",this.$t("The custom icon file is too large. File size must be less than 2KB."));else{this.file=e,this.fileName=e.name,this.uploadedFile=null;var n=new FileReader;n.readAsDataURL(this.file),n.onload=function(){t.file=n.result}}}},beforeMount:function(){this.list=this.all},mounted:function(){this.allowCustom?(this.icon=this.find(this.value.icon),this.file=this.value.file):this.value?this.icon=this.find(this.value):this.icon=this.find(this.default)},methods:{onSearch:function(e){var t=this;e.length?this.query=e.toLowerCase():this.isOpen&&(this.query=""),this.query.length?this.list=this.all.filter((function(e){return e.search.includes(t.query)})):this.list=this.all},onOpen:function(){this.$refs.multiselect.search=this.query},onClose:function(){this.placeholder=this.$t("Icon")},find:function(e){return this.all.find((function(t){return t.value==e}))},onHover:function(e){this.placeholder=e.label},triggerUpload:function(){this.$refs.fileUploadButton.trigger()}}},Sr=Cr,Er=(h(18785),qn(Sr,dr,ur,!1,null,null,null)),Ar=Er.exports,Mr=h(9943),Tr={props:{dropdownOpen:{type:Boolean,required:!0},node:Object,showCustomIconPicker:{type:Boolean,default:!1},iconName:{type:String,default:""}},components:{CrownButton:Vn,"sketch-picker":cr.Sketch,IconSelector:Ar},data:function(){return{colors:pe,selectedColor:this.node.definition.get("color"),colorPickerOpen:!1}},watch:{selectedColor:function(e){e?this.setNodeColor(e):this.resetNodeColor()}},methods:{setColorFromPicker:function(e){var t=e.hex8;this.selectedColor=t},resetNodeStyling:function(){this.resetNodeColor(),this.resetCustomIcon()},setNodeColor:function(e){bn.commit("updateNodeProp",{node:this.node,key:"color",value:e}),vt().set(this.node.definition,"color",e),this.$emit("save-state")},resetNodeColor:function(){bn.commit("updateNodeProp",{node:this.node,key:"color",value:void 0}),vt().set(this.node.definition,"color",void 0),this.$emit("save-state")},setCustomIcon:function(e){if(e){var t=(0,Lo.icon)({prefix:"fas",iconName:e}),n=t.html,o=btoa(n);bn.commit("updateNodeProp",{node:this.node,key:"customIcon",value:o}),vt().set(this.node.definition,"customIcon",o),this.$emit("set-custom-icon-name",e),this.$emit("save-state")}},resetCustomIcon:function(){bn.commit("updateNodeProp",{node:this.node,key:"customIcon",value:void 0}),vt().set(this.node.definition,"customIcon",void 0),this.$emit("reset-custom-icon-name"),this.$emit("save-state")},openIconSelector:function(){this.$refs["icon-selector-modal"].show()}},created:function(){this.$t=this.$t.bind(this),Lo.library.add(Mr.fas)}},_r=Tr,Pr=(h(82969),qn(_r,ar,lr,!1,null,"0c72746a",null)),Or=Pr.exports,Dr={name:"CrownDropdowns",components:{CrownTaskDropdown:Xi,CrownBoundaryEventDropdown:sr,CrownColorDropdown:Or},props:{dropdownData:Array,boundaryEventDropdownData:Array,node:Object,nodeRegistry:Object,moddle:Object,shape:Object,taskDropdownInitiallyOpen:{type:Boolean,required:!0},showCustomIconPicker:Boolean,iconName:{type:String,default:""}},data:function(){return{taskDropdownOpen:this.taskDropdownInitiallyOpen,boundaryEventDropdownOpen:!1,colorDropdownOpen:!1}},methods:{taskDropdownToggle:function(e){this.taskDropdownOpen=e,this.boundaryEventDropdownOpen=!1,this.colorDropdownOpen=!1},boundaryEventDropdownToggle:function(e){this.taskDropdownOpen=!1,this.boundaryEventDropdownOpen=e,this.colorDropdownOpen=!1},colorDropdownToggle:function(e){this.taskDropdownOpen=!1,this.boundaryEventDropdownOpen=!1,this.colorDropdownOpen=e}}},Ir=Dr,Nr=(h(64883),qn(Ir,qi,Hi,!1,null,"0a847d3c",null)),Rr=Nr.exports,Br=function(){var e=this,t=e._self._c;return e.node.canBeDefaultFlow()?t("crown-button",{directives:[{name:"b-tooltip",rawName:"v-b-tooltip.hover.viewport.d50",value:{customClass:"no-pointer-events"},expression:"{ customClass: 'no-pointer-events' }",modifiers:{hover:!0,viewport:!0,d50:!0}}],attrs:{title:e.$t("Set as Default Flow"),"aria-label":"Default Flow","data-test":"default-flow",role:"menuitem"},on:{click:e.click}},[t("img",{attrs:{src:e.icon,"aria-hidden":"true"}})]):e._e()},Lr=[],jr=h.p+"img/default-flow.3f3d5309.svg",Fr={components:{CrownButton:Vn},props:["node"],data:function(){return{icon:jr}},methods:{click:function(){this.$emit("default-flow",this.node)}}},zr=Fr,qr=qn(zr,Br,Lr,!1,null,null,null),Hr=qr.exports,Vr={computed:{isLane:function(){return"processmaker-modeler-lane"===this.node.type}},methods:{configurePoolLane:function(){var e=this;if(!["processmaker-modeler-pool","processmaker-modeler-sequence-flow","processmaker-modeler-association","processmaker-modeler-message-flow"].includes(this.node.type)){if(this.node.pool)return this.graph.getCell(this.node.pool)||(this.node.pool=this.graph.getElements().find((function(t){return t.component&&t.component.node===e.node.pool.component.node}))),this.node.pool.component.addToPool(this.shape),void(this.isLane&&this.configureLaneInParentPool());var t=this.graph.findModelsInArea(this.shape.getBBox()).filter((function(e){return e.component&&"processmaker-modeler-pool"===e.component.node.type}))[0];t&&(this.node.pool=t,this.node.pool.component.addToPool(this.shape),this.isLane&&this.configureLaneInParentPool())}},configureLaneInParentPool:function(){var e=this.node.pool.component;e.laneSet||e.createLaneSet();var t=e.laneSet.get("lanes");t.includes(this.node.definition)||t.push(this.node.definition)}},mounted:function(){var e=this;this.$nextTick((function(){e.configurePoolLane()}))}},Ur=h(97019),Gr=h.n(Ur);function Wr(){return!!window.Cypress}var $r={components:{CrownDropdowns:Rr,DeleteButton:fo,GenericFlowButton:ti,AssociationFlowButton:li,CopyButton:Ii,CloneButton:zi,DefaultFlow:Hr,DataAssociationFlowButton:Si},props:{highlighted:Boolean,paper:Object,graph:Object,shape:Object,node:Object,nodeRegistry:Object,moddle:Object,planeElements:Array,processNode:Object,collaboration:Object,isRendering:Boolean,dropdownData:{type:Array,default:function(){return[]}},boundaryEventDropdownData:{type:Array,default:function(){return[]}},showCustomIconPicker:{type:Boolean,default:!1},iconName:{type:String,default:""}},mixins:[Vr],watch:{"node.definition.color":{handler:function(){this.setNodeColor()}},highlightedShapes:function(e,t){nt()(e,t)||(this.showCrown=this.highlightedShapes[0]===this.shape)},highlighted:function(e){e||(this.taskDropdownInitiallyOpen=!1)},shape:function(){this.highlighted&&(this.showCrown=!0)}},data:function(){return{runningInCypressTest:Wr(),showCrown:!1,savePositionOnPointerupEventSet:!1,style:null,taskDropdownInitiallyOpen:this.paperNotRendered(),showReplaceModal:!1,nodeToReplace:null}},created:function(){this.$t=this.$t.bind(this)},computed:{showCrownConfig:function(){return this.showCrown&&!this.isMultiselect&&!1===bn.getters.isReadOnly},isMultiselect:function(){var e=bn.getters.highlightedShapes.length;return e>1},isFlow:function(){return["processmaker-modeler-sequence-flow","processmaker-modeler-message-flow"].includes(this.node.type)},isTextAnnotation:function(){return"processmaker-modeler-text-annotation"===this.node.type},process:function(){return this.node.pool?this.node.pool.component.containingProcess:this.processNode.definition},highlightedShapes:function(){return bn.getters.highlightedShapes}},methods:{setNodeColor:function(){var e=this.node.definition.get("color"),t=Se(this.node,e),n=t.fill,o=t.stroke;Ee(this.shape,n,o)},paperNotRendered:function(){return!this.isRendering},replaceNodeTypePrompt:function(e){this.taskDropdownInitiallyOpen?this.$emit("replace-node",e):(this.showReplaceModal=!0,this.nodeToReplace=e)},confirmedReplaceNodeType:function(){this.$emit("replace-node",this.nodeToReplace)},setNodePosition:function(){this.shape.stopListening(this.paper,"element:pointerup",this.setNodePosition),this.savePositionOnPointerupEventSet=!1,bn.getters.allowSavingElementPosition},repositionCrown:function(){var e=this.shape.findView(this.paper);if(e){var t=e.getBBox({useModelGeometry:!this.isTextAnnotation&&!this.isFlow}),n=t.x,o=t.y,i=t.width;this.style={top:"".concat(o-52,"px"),left:"".concat(n+i-20,"px"),cursor:"pointer"}}},paperDoneRendering:function(){var e=this;this.isRendering&&new Promise((function(t){return e.paper.once("render:done",t)}))},setUpCrownConfig:function(){this.paper.on("render:done scale:changed translate:changed",this.repositionCrown),this.shape.on("change:position change:size change:attrs",this.repositionCrown),this.planeElements.includes(this.node.diagram)||this.planeElements.push(this.node.diagram);var e=Object.keys(this.node.definition.$descriptor.allTypesByName);e.includes("bpmn:FlowElement")&&!this.process.get("flowElements").includes(this.node.definition)&&this.process.get("flowElements").push(this.node.definition),e.includes("bpmn:Artifact")&&!this.process.get("artifacts").includes(this.node.definition)&&this.process.get("artifacts").push(this.node.definition),this.collaboration&&e.includes("bpmn:MessageFlow")&&!this.collaboration.get("messageFlows").includes(this.node.definition)&&this.collaboration.get("messageFlows").push(this.node.definition)},setUpPositionHandling:function(){var e=this;this.shape.on("change:position",(function(t,n){e.node.diagram.bounds.x=n.x,e.node.diagram.bounds.y=n.y,e.savePositionOnPointerupEventSet||(e.shape.listenToOnce(e.paper,"element:pointerup",e.setNodePosition),e.savePositionOnPointerupEventSet=!0)}))}},mounted:function(){var e=this;return y(v().mark((function t(){return v().wrap((function(t){while(1)switch(t.prev=t.next){case 0:return t.next=2,e.$nextTick();case 2:return t.next=4,e.paperDoneRendering();case 4:e.setUpCrownConfig(),e.setUpPositionHandling(),e.setNodeColor();case 7:case"end":return t.stop()}}),t)})))()},destroyed:function(){this.shape.stopListening(),this.shape.remove(),Gr()(this.process.get("flowElements"),this.node.definition),Gr()(this.planeElements,this.node.diagram),Gr()(this.process.get("artifacts"),this.node.definition),this.collaboration&&Gr()(this.collaboration.get("messageFlows"),this.node.definition)}},Xr=$r,Yr=(h(78135),qn(Xr,Dn,In,!1,null,null,null)),Zr=Yr.exports,Kr={components:{CrownConfig:Zr},props:["graph","node","id","highlighted","nodeRegistry","moddle","paper","collaboration","processNode","planeElements","isRendering"],mixins:[_n],data:function(){return{shape:null,initialAssociationDirection:this.node.definition.associationDirection,associationDirection:On}},computed:{isValidConnection:function(){var e=x()(this.target,"component.node.type");if(!e)return!1;var t=this.target.component.node.pool,n=this.sourceShape.component.node.pool;if(n&&n!==t)return!1;var o=this.targetConfig.validateAssociationIncoming&&!this.targetConfig.validateAssociationIncoming(this.sourceNode),i=this.sourceConfig.validateAssociationOutgoing&&!this.sourceConfig.validateAssociationOutgoing(this.targetNode);return!o&&!i}},watch:{"node.definition.associationDirection":function(e){this.updateAssociationMarker(e)}},methods:{updateRouter:function(){this.shape.router("normal",{elementPadding:this.elementPadding})},updateDefinitionLinks:function(){var e=this.shape.getTargetElement();this.node.definition.targetRef=e.component.node.definition},updateAssociationMarker:function(e){e===this.associationDirection.none&&(this.shape.attr("line/targetMarker/display","none"),this.shape.attr("line/sourceMarker/display","none")),e===this.associationDirection.one&&(this.shape.attr("line/targetMarker/display","block"),this.shape.attr("line/sourceMarker/display","none")),e===this.associationDirection.both&&(this.shape.attr("line/targetMarker/display","block"),this.shape.attr("line/sourceMarker/display","block"))}},mounted:function(){this.shape=new a.shapes.standard.Link({router:{name:"normal"}}),this.shape.attr({line:{stroke:"black",strokeWidth:"4",strokeLinecap:"round",strokeDasharray:"1, 8",strokeDashoffset:"5",targetMarker:{type:"image","xlink:href":Pn,width:20,height:20,y:-10},sourceMarker:{type:"image","xlink:href":Pn,width:20,height:20,y:-10}}}),this.shape.addTo(this.graph),this.shape.component=this,this.updateAssociationMarker(this.initialAssociationDirection)}},Jr=Kr,Qr=qn(Jr,r,s,!1,null,null,null),es=Qr.exports,ts={label:"Node Identifier",helper:"Enter the id that is unique from all other elements in the diagram",name:"id",validation:"required|regex:/^[_A-Za-z][-._A-Za-z0-9]*$/"},ns=ts,os="processmaker-modeler-association",is={id:os,component:es,bpmnType:"bpmn:Association",control:!1,definition:function(e){return e.create("bpmn:Association",{associationDirection:"".concat(On.none)})},diagram:function(e){return e.create("bpmndi:BPMNEdge")},inspectorConfig:[{name:"Data Association",items:[{component:"FormAccordion",container:!0,config:{initiallyOpen:!0,label:"Properties",icon:"cog",name:"inspector-accordion-association"},items:[{component:"FormInput",config:ns},{component:"FormSelect",config:{label:"Direction",helper:"Select Direction",name:"associationDirection",options:[{value:"".concat(On.none),content:"None"},{value:"".concat(On.one),content:"One"},{value:"".concat(On.both),content:"Both"}]}}]}]}]},rs=function(){var e=this,t=e._self._c;return t("crown-config",e._g({attrs:{highlighted:e.highlighted,paper:e.paper,graph:e.graph,shape:e.shape,node:e.node,nodeRegistry:e.nodeRegistry,moddle:e.moddle,collaboration:e.collaboration,"process-node":e.processNode,"plane-elements":e.planeElements,"is-rendering":e.isRendering,"dropdown-data":e.dropdownData}},e.$listeners))},ss=[],as={props:{isActive:Boolean},methods:{hideLabel:function(e,t,n){this.isActive&&!n.movedWithArrowKeys&&(this.shape.attr("label/display","none"),this.shape.getEmbeddedCells().filter((function(e){return e.attr("label/text")})).forEach((function(e){e.attr("label/display","none")})))},showLabel:function(){var e=this;return y(v().mark((function t(){return v().wrap((function(t){while(1)switch(t.prev=t.next){case 0:return e.shape.attr("label/display","initial"),t.next=3,e.$nextTick();case 3:e.shape.once("change:position",e.hideLabel);case 4:case"end":return t.stop()}}),t)})))()}},mounted:function(){var e=this;return y(v().mark((function t(){return v().wrap((function(t){while(1)switch(t.prev=t.next){case 0:return t.next=2,e.$nextTick();case 2:e.$once("click",(function(){e.shape.once("change:position",e.hideLabel)})),e.shape.listenTo(e.paper,"cell:pointerup blank:pointerup",e.showLabel),e.shape.once("change:parent",e.showLabel);case 5:case"end":return t.stop()}}),t)})))()}},ls=3,cs=16,ds=4;function us(e,t){var n=t.size(),o=n.width,i=n.height;for(var r in e)hs(t,r,o),fs(t,r,i),ms(t,r,e,o)}function ps(e,t){var n=e.attr(t);return void 0===n?ds:n}function hs(e,t,n){var o=ps(e,t+"/ref-padding-x");-1!==t.indexOf("Right")?e.attr(t+"/ref-x",n-cs-o):-1!==t.indexOf("Left")&&e.attr(t+"/ref-x",o+(vs(e)?16:0))}function fs(e,t,n){var o=ps(e,t+"/ref-padding-y");-1!==t.indexOf("bottom")&&e.attr(t+"/ref-y",n-cs-o)}function ms(e,t,n,o){for(var i=0,r=0;r<ls;r++)e.attr(t+"."+r+"/xlink:href",null);var s=gs(n,t);for(var a in s)if(e.attr(t+"."+i+"/xlink:href",n[t][a]),i++,i>=ls)break;e.attr(t+"/ref-width",cs*i),-1!==t.indexOf("Center")&&e.attr(t+"/ref-x",(o-i*cs)/2)}function gs(e,t){if("bottomCenter"===t){var n={};return Object.keys(e[t]).sort().forEach((function(o){n[o]=e[t][o]})),n}return e[t]}function vs(e){return!!e.attr("image/xlink:href")}var bs=3,ys=16;function ws(e){for(var t=[],n=0;n<bs;n++)t.push({tagName:"image",selector:e+"."+n});return{tagName:"g",selector:e,children:t}}function xs(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1,o={};o[e]=t;for(var i=0;i<bs;i++)o[e+"."+i]={"ref-x":i*ys*n,"ref-y":0,width:ys,height:ys};return o}var ks,Cs,Ss,Es,As,Ms,Ts,_s,Ps,Os,Ds,Is,Ns,Rs,Bs={data:function(){return{markers:{topLeft:{},topCenter:{},topRight:{},bottomLeft:{},bottomCenter:{},bottomRight:{}}}},watch:{markers:{deep:!0,handler:function(){this.recalcMarkersAlignment()}}},methods:{recalcMarkersAlignment:function(){us(this.markers,this.shape)}}},Ls=a.shapes.standard.Circle.extend({markup:[{tagName:"circle",selector:"body"},{tagName:"text",selector:"label"},{tagName:"image",selector:"image"},ws("topLeft"),ws("topCenter"),ws("topRight"),ws("bottomLeft"),ws("bottomCenter"),ws("bottomRight")],defaults:a.util.deepSupplement({size:{width:36,height:36},attrs:yo(yo(yo(yo(yo(yo({image:{"ref-x":5,"ref-y":5,ref:"circle",width:26,height:26}},xs("topLeft",{ref:"circle","ref-y":-20,"ref-padding-x":0})),xs("topCenter",{ref:"circle","ref-y":-20})),xs("topRight",{ref:"circle","ref-x":26,"ref-y":-20,"ref-padding-x":0},-1)),xs("bottomLeft",{ref:"circle","ref-padding-x":0,"ref-padding-y":-40})),xs("bottomCenter",{ref:"circle","ref-padding-y":-40})),xs("bottomRight",{ref:"circle","ref-x":26,"ref-padding-x":0,"ref-padding-y":-40},-1))},a.shapes.standard.Circle.prototype.defaults)}),js={highlighter:{name:"stroke",options:{padding:10,attrs:{stroke:wn,"stroke-width":10,opacity:.3}}}},Fs={highlighter:{name:"stroke",options:{attrs:{stroke:yn,"stroke-width":3,"data-cy":"selected"}}}},zs={highlighter:{name:"stroke",options:{attrs:{stroke:En,"stroke-width":5}}}},qs={highlighter:{name:"stroke",options:{attrs:{stroke:xn,"stroke-width":5}}}},Hs={highlighter:{name:"stroke",options:{attrs:{stroke:Cn,"stroke-width":5}}}},Vs={props:["highlighted","paperManager","hasError","autoValidate","borderOutline","isCompleted","isInProgress","isIdle"],data:function(){return{shape:null,currentBorderOutline:null}},watch:{highlighted:function(){this.setShapeHighlight()},hasError:function(){this.paperManager.awaitScheduledUpdates().then(this.setShapeHighlight)},autoValidate:function(){this.setShapeHighlight()},borderOutline:{deep:!0,handler:function(e){this.setBorderOutline(e)}}},computed:{shapeView:function(){return this.shape.findView(this.paperManager.paper)},shapeBody:function(){return this.shapeView.$el.find("[joint-selector=body]")}},methods:{setShapeHighlight:function(){if(bn.getters.isReadOnly)return this.shapeView.unhighlight(this.shapeBody,zs),this.isCompleted&&(this.shape.attr("body/fill",An),this.shapeView.highlight(this.shapeBody,zs)),this.shapeView.unhighlight(this.shapeBody,qs),this.isInProgress&&(this.shape.attr("body/fill",kn),this.shapeView.highlight(this.shapeBody,qs)),void(this.isIdle&&(this.shape.attr("body/fill",Sn),this.shapeView.highlight(this.shapeBody,Hs)));this.shapeView&&(this.shapeView.unhighlight(this.shapeBody,js),this.hasError&&this.autoValidate&&this.shapeView.highlight(this.shapeBody,js),this.shapeView.unhighlight(this.shapeBody,Fs),this.highlighted&&this.shapeView.highlight(this.shapeBody,Fs))},setBorderOutline:function(e){this.currentBorderOutline&&this.shapeView.unhighlight(this.shapeBody,this.currentBorderOutline),this.currentBorderOutline=e?No()(e):null,this.currentBorderOutline&&this.shapeView.highlight(this.shapeBody,this.currentBorderOutline)}},mounted:function(){var e=this;this.$nextTick((function(){e.paperManager.awaitScheduledUpdates().then((function(){e.setShapeHighlight(),e.shape.on("change:size",(function(){e.paperManager.awaitScheduledUpdates().then(e.setShapeHighlight),e.$emit("shape-resize",e.shape)}))}))}))}},Us={components:{CrownConfig:Zr},props:["graph","node","id","highlighted","nodeRegistry","moddle","paper","collaboration","processNode","planeElements","isRendering"],mixins:[Vs,Je,as],data:function(){return{shape:null,definition:null,dropdownData:[{label:Ao["processmaker-modeler-end-event"],nodeType:"processmaker-modeler-end-event"},{label:Ao["processmaker-modeler-message-end-event"],nodeType:"processmaker-modeler-message-end-event",dataTest:"switch-to-message-end-event"},{label:Ao["processmaker-modeler-error-end-event"],nodeType:"processmaker-modeler-error-end-event",dataTest:"switch-to-error-end-event"},{label:Ao["processmaker-modeler-signal-end-event"],nodeType:"processmaker-modeler-signal-end-event",dataTest:"switch-to-signal-end-event"},{label:Ao["processmaker-modeler-terminate-end-event"],nodeType:"processmaker-modeler-terminate-end-event",dataTest:"switch-to-terminate-end-event"}]}},watch:{"node.definition.name":function(e){this.shape.attr("label/text",e)}},mounted:function(){this.shape=new Ls,this.shape.set("type","processmaker.components.nodes.endEvent.Shape");var e=this.node.diagram.bounds;this.shape.position(e.get("x"),e.get("y")),this.shape.resize(e.get("width"),e.get("height")),this.shape.attr({body:{fill:xe,stroke:ke},label:{text:this.node.definition.get("name"),refY:"130%"}}),this.shape.addTo(this.graph),this.shape.component=this}},Gs=Us,Ws=qn(Gs,rs,ss,!1,null,null,null),$s=Ws.exports,Xs={label:"Name",name:"name",helper:"Enter the name of this element",validation:"required"},Ys=Xs,Zs=function(){var e=this,t=e._self._c;return t("div",[t("FormInput",{attrs:{name:"id",label:e.label,helper:e.helper,error:e.error,validation:e.validation},on:{input:e.onInput},model:{value:e.localValue,callback:function(t){e.localValue=t},expression:"localValue"}})],1)},Ks=[],Js={props:{label:{type:String},helper:{type:String},value:{default:null},validation:{type:String}},data:function(){return{localValue:this.value,error:""}},methods:{onInput:function(e){this.value!==e&&(this.isUnique(e)?(this.error="",this.$emit("input",e)):this.error=this.$t("Must be unique"))},isUnique:function(e){return!!bn.state.nodes.every((function(t){return t.definition.id!==e}))}}},Qs=Js,ea=qn(Qs,Zs,Ks,!1,null,null,null),ta=ea.exports,na={component:"FormAccordion",container:!0,config:{initiallyOpen:!1,label:"Advanced",icon:"cogs",name:"advanced-accordion"},items:[{component:ta,config:ns}]},oa=function(){var e=this,t=e._self._c;return t("div",[t("div",{staticClass:"d-flex justify-content-between align-items-end mb-2"},[t("label",{staticClass:"m-0"},[e._v(e._s(e.$t(e.label)))]),t("button",{directives:[{name:"b-modal",rawName:"v-b-modal.documentation-modal",modifiers:{"documentation-modal":!0}}],staticClass:"btn-sm float-right",attrs:{type:"button","aria-label":e.$t("Expand"),"data-test":"documentation-modal-button"}},[t("i",{staticClass:"fas fa-expand"})])]),t("form-text-area",{staticClass:"documentation-input d-flex",attrs:{value:e.textValue,richtext:!0,"data-test":"documentation-text-area",id:"documentation-editor"},on:{input:function(t){return e.$emit("input",t)},blur:e.onBlur}}),t("b-modal",{attrs:{id:"documentation-modal",size:"lg",centered:"",title:e.$t("Description"),"header-close-content":"×","ok-only":"","ok-variant":"secondary","ok-title":"Close","no-enforce-focus":""}},[t("form-text-area",{staticClass:"documentation-input",attrs:{rows:"5",value:e.textValue,richtext:!0,"data-test":"documentation-modal-text-area",id:"documentation-editor-modal"},on:{input:function(t){return e.$emit("input",t)},blur:e.onBlur}})],1)],1)},ia=[],ra=h(47037),sa=h.n(ra),aa={props:{value:{type:[String,Array],default:""},label:{type:String,default:"Description"}},inheritAttrs:!1,computed:{textValue:function(){return sa()(this.value)?this.value:x()(this.value[0],"text","")}},methods:{onBlur:function(){var e=this.$root.$children.find((function(e){return e.$refs.modeler}));e.$refs.modeler.pushToUndoStack()}}},la=aa,ca=(h(14855),qn(la,oa,ia,!1,null,null,null)),da=ca.exports,ua={component:"FormAccordion",container:!0,config:{initiallyOpen:!1,label:"Documentation",icon:"book",name:"documentation-accordion"},items:[{component:da,config:{label:"Description",name:"documentation",helper:""}}]},pa="processmaker-modeler-end-event",ha={id:pa,component:$s,bpmnType:"bpmn:EndEvent",control:!0,category:"BPMN",icon:h(48807),label:Ao[pa],rank:30,items:[{icon:h(48807),label:Ao[pa],control:!0,rank:31,id:"processmaker-modeler-end-event"},{icon:h(52080),label:Ao["processmaker-modeler-message-end-event"],control:!0,rank:32,id:"processmaker-modeler-message-end-event"},{icon:h(95093),label:Ao["processmaker-modeler-error-end-event"],control:!0,rank:33,id:"processmaker-modeler-error-end-event"},{icon:h(96425),label:Ao["processmaker-modeler-signal-end-event"],control:!0,rank:34,id:"processmaker-modeler-signal-end-event"},{icon:h(47616),label:Ao["processmaker-modeler-terminate-end-event"],control:!0,rank:35,id:"processmaker-modeler-terminate-end-event"}],definition:function(e,t){return e.create("bpmn:EndEvent",{name:t(Ao[pa])})},diagram:function(e){return e.create("bpmndi:BPMNShape",{bounds:e.create("dc:Bounds",{height:36,width:36,x:null,y:null})})},inspectorConfig:[{name:Ao[pa],items:[{component:"FormAccordion",container:!0,config:{initiallyOpen:!0,label:"Properties",icon:"cog",name:"inspector-accordion-end-event"},items:[{component:"FormInput",config:Ys}]},ua,na]}]},fa=(h(85827),h(84384)),ma=h.n(fa),ga=(h(75505),function(e){var t=btoa(e);return"data:image/svg+xml;base64,".concat(t)}),va=function(e,t){var n=(new DOMParser).parseFromString(e,"text/xml"),o=t.definition.get("color")||Ae(t);return n.querySelectorAll('*[fill]:not([fill="none"])').forEach((function(e){e.setAttribute("fill",o)})),n.querySelectorAll('*[stroke]:not([stroke="none"])').forEach((function(e){e.setAttribute("stroke",o)})),ga(n.documentElement.outerHTML)},ba=va,ya={data:function(){return{nodeIcon:null}},computed:{icon:function(){return this.node.definition.customIcon?atob(this.node.definition.customIcon):this.nodeIcon}},watch:{"node.definition.color":{handler:function(){this.updateIconColor()}},"node.definition.customIcon":{handler:function(){this.updateIconColor()}}},methods:{updateIconColor:function(){this.nodeIcon&&!this.node.isBpmnType("bpmn:ServiceTask")&&this.shape&&this.shape.attr("image/xlink:href",ba(this.icon,this.node))}},mounted:function(){this.updateIconColor()}},wa={extends:$s,mixins:[ya],props:["moddle","rootElements","id"],data:function(){return{error:this.moddle.create("bpmn:Error",{id:"".concat(this.id,"_error"),name:"".concat(this.id,"_error")}),nodeIcon:ma()}},methods:{addErrorRef:function(){this.node.definition.get("eventDefinitions")[0].errorRef?this.error=this.node.definition.get("eventDefinitions")[0].errorRef:(this.error=this.moddle.create("bpmn:Error",{id:"".concat(this.id,"_error"),name:"".concat(this.id,"_error")}),this.rootElements.push(this.error),this.node.definition.get("eventDefinitions")[0].errorRef=this.error)}},mounted:function(){this.addErrorRef()},destroyed:function(){Gr()(this.rootElements,this.error)}},xa=wa,ka=qn(xa,ks,Cs,!1,null,null,null),Ca=ka.exports,Sa=h(82492),Ea=h.n(Sa),Aa=h(57557),Ma=h.n(Aa),Ta="processmaker-modeler-error-end-event",_a=Ea()(No()(ha),{id:Ta,component:Ca,control:!1,label:Ao[Ta],definition:function(e,t){return e.create("bpmn:EndEvent",{name:t(Ao[Ta]),eventDefinitions:[e.create("bpmn:ErrorEventDefinition")]})},inspectorData:function(e){return Object.entries(e.definition).reduce((function(e,t){var n=mt(t,2),o=n[0],i=n[1];return"eventDefinitions"===o?e.errorName=i[0].get("errorRef").name:e[o]=i,e}),{})},inspectorHandler:function(e,t,n){for(var o in Ma()(e,["$type","eventDefinitions","errorName"]))t.definition[o]!==e[o]&&n(t,o,e[o]);var i=t.definition.get("eventDefinitions")[0].errorRef;i.name!==e.errorName&&(i.name=e.errorName)},inspectorConfig:[{items:[{items:[{},{component:"FormInput",config:{label:"Error Name",name:"errorName",helper:"Enter the error name that is unique from all other elements in the diagram"}}]}]}]}),Pa=h(43258),Oa=h.n(Pa),Da={extends:$s,mixins:[ya],props:["moddle","rootElements","id"],data:function(){return{nodeIcon:Oa()}}},Ia=Da,Na=qn(Ia,Ss,Es,!1,null,null,null),Ra=Na.exports,Ba="processmaker-modeler-terminate-end-event",La=Ea()(No()(ha),{id:Ba,component:Ra,control:!1,label:Ao[Ba],definition:function(e,t){return e.create("bpmn:EndEvent",{name:t(Ao[Ba]),eventDefinitions:[e.create("bpmn:TerminateEventDefinition")]})}}),ja=function(){var e=this,t=e._self._c;return t("crown-config",e._g({attrs:{highlighted:e.highlighted,paper:e.paper,graph:e.graph,shape:e.shape,node:e.node,nodeRegistry:e.nodeRegistry,moddle:e.moddle,collaboration:e.collaboration,"process-node":e.processNode,"plane-elements":e.planeElements,"is-rendering":e.isRendering,"dropdown-data":e.dropdownData}},e.$listeners))},Fa=[],za=18,qa=a.dia.Element.define("processmaker.components.nodes.gateway.Shape",{markup:[].concat(m(a.shapes.standard.Polygon.prototype.markup),[{tagName:"image",selector:"image"}]),attrs:{body:{strokeWidth:2,stroke:"#000000",refPointsKeepOffset:"40,0, 80,40, 40,80, 0,40",fill:"#FFFFFF"},label:{textVerticalAnchor:"top",textAnchor:"middle",refX:"50%",refY:"50",fontSize:14,fill:"#333333"},image:{width:za,height:za,fill:"transparent",xlinkHref:"",refX:"50%",refX2:-za/2,refY:"50%",refY2:-za/2}}}),Ha=["bpmn:ExclusiveGateway","bpmn:InclusiveGateway"],Va={components:{CrownConfig:Zr},props:["graph","node","id","highlighted","nodeRegistry","moddle","paper","collaboration","processNode","planeElements","isRendering"],mixins:[Vs,Je,as],created:function(){var e=this.node.definition.default||null;delete this.node.definition.default,Ha.indexOf(this.node.definition.$type)>-1&&this.$set(this.node.definition,"default",e)},data:function(){return{shape:null,definition:null,labelWidth:175,dropdownData:[{label:Po["processmaker-modeler-exclusive-gateway"],nodeType:"processmaker-modeler-exclusive-gateway"},{label:Po["processmaker-modeler-inclusive-gateway"],nodeType:"processmaker-modeler-inclusive-gateway",dataTest:"switch-to-inclusive-gateway"},{label:Po["processmaker-modeler-parallel-gateway"],nodeType:"processmaker-modeler-parallel-gateway",dataTest:"switch-to-parallel-gateway"},{label:Po["processmaker-modeler-event-based-gateway"],nodeType:"processmaker-modeler-event-based-gateway",dataTest:"switch-to-event-based-gateway",disabled:function(e){if(e&&e.definition&&e.definition.outgoing){var t=["bpmn:IntermediateCatchEvent"],n=e.definition.outgoing.find((function(e){return!t.includes(e.targetRef.$type)}));return!!n&&"It must be connected only to catch events"}return!1}}]}},watch:{"node.definition.name":function(e){this.shape.attr("label/text",e)}},mounted:function(){this.shape=new qa;var e=this.node.diagram.bounds;this.shape.position(e.x,e.y),this.shape.resize(e.width,e.height),this.shape.attr({label:{text:this.node.definition.get("name"),fill:"black"}}),this.shape.addTo(this.graph),this.shape.component=this}},Ua=Va,Ga=qn(Ua,ja,Fa,!1,null,null,null),Wa=Ga.exports,$a=h(4074),Xa=h.n($a),Ya={extends:Wa,mixins:[ya],data:function(){return{nodeIcon:Xa()}}},Za=Ya,Ka=qn(Za,As,Ms,!1,null,null,null),Ja=Ka.exports,Qa="processmaker-modeler-exclusive-gateway",el={id:Qa,component:Ja,bpmnType:"bpmn:ExclusiveGateway",control:!0,category:"BPMN",icon:h(21678),label:"Gateway",rank:50,items:[{icon:h(52794),label:"Exclusive Gateway",control:!0,rank:51,id:"processmaker-modeler-exclusive-gateway"},{icon:h(59749),label:"Inclusive Gateway",control:!0,rank:52,id:"processmaker-modeler-inclusive-gateway"},{icon:h(23726),label:"Parallel Gateway",control:!0,rank:53,id:"processmaker-modeler-parallel-gateway"},{icon:h(93763),label:"Event Based Gateway",control:!0,rank:54,id:"processmaker-modeler-event-based-gateway"}],definition:function(e,t){return e.create("bpmn:ExclusiveGateway",{name:t(Po[Qa])})},diagram:function(e){return e.create("bpmndi:BPMNShape",{bounds:e.create("dc:Bounds",{height:36,width:36})})},inspectorConfig:[{name:Po[Qa],items:[{component:"FormAccordion",container:!0,config:{initiallyOpen:!0,label:"Properties",icon:"cog",name:"inspector-accordion-exlcusive-gateway"},items:[{component:"FormInput",config:Ys}]},ua,na]}]},tl=h(62635),nl=h.n(tl),ol={diverging:"Diverging",converging:"Converging"},il={extends:Wa,mixins:[ya],data:function(){return{incoming:this.node.definition.get("incoming"),nodeIcon:nl()}},watch:{incoming:function(e){var t=e.length<=1?ol.diverging:ol.converging;this.node.definition.set("gatewayDirection",t)}}},rl=il,sl=qn(rl,Ts,_s,!1,null,null,null),al=sl.exports,ll="processmaker-modeler-inclusive-gateway",cl={id:ll,component:al,bpmnType:"bpmn:InclusiveGateway",control:!1,category:"BPMN",label:Po[ll],definition:function(e,t){return e.create("bpmn:InclusiveGateway",{name:t(Po[ll]),gatewayDirection:ol.diverging})},diagram:function(e){return e.create("bpmndi:BPMNShape",{bounds:e.create("dc:Bounds",{height:36,width:36})})},inspectorConfig:[{name:Po[ll],items:[{component:"FormAccordion",container:!0,config:{initiallyOpen:!0,label:"Properties",icon:"cog",name:"inspector-accordion-inclusive-gateway-config"},items:[{component:"FormInput",config:Ys}]},ua,{component:"FormAccordion",container:!0,config:{initiallyOpen:!1,label:"Advanced",icon:"cogs",name:"inspector-accordion-inclusive-gateway-advanced"},items:[{component:"FormInput",config:ns},{component:"FormSelect",config:{label:"Direction",helper:"Select the direction of workflow for this element",name:"gatewayDirection",options:[{value:ol.diverging,content:"Diverging"},{value:ol.converging,content:"Converging"}]}}]}]}]},dl=h(70718),ul=h.n(dl),pl={extends:Wa,mixins:[ya],data:function(){return{nodeIcon:ul()}},watch:{"node.definition":{deep:!0,immediate:!0,handler:function(){delete this.node.definition.default}}}},hl=pl,fl=qn(hl,Ps,Os,!1,null,null,null),ml=fl.exports,gl={id:"processmaker-modeler-parallel-gateway",component:ml,bpmnType:"bpmn:ParallelGateway",control:!1,category:"BPMN",label:"Parallel Gateway",definition:function(e,t){return e.create("bpmn:ParallelGateway",{name:t("Parallel Gateway"),gatewayDirection:ol.diverging})},diagram:function(e){return e.create("bpmndi:BPMNShape",{bounds:e.create("dc:Bounds",{height:36,width:36})})},inspectorConfig:[{name:"Parallel Gateway",items:[{component:"FormAccordion",container:!0,config:{initiallyOpen:!0,label:"Properties",icon:"cog",name:"inspector-accordion-parallel-gateway-config"},items:[{component:"FormInput",config:Ys}]},ua,{component:"FormAccordion",container:!0,config:{initiallyOpen:!1,label:"Advanced",icon:"cogs",name:"inspector-accordion-parallel-gateway-direction"},items:[{component:"FormInput",config:ns},{component:"FormSelect",config:{label:"Direction",helper:"Select the direction of workflow for this element",name:"gatewayDirection",options:[{value:ol.diverging,content:"Diverging"},{value:ol.converging,content:"Converging"}]}}]}]}]},vl=h(30666),bl=h.n(vl),yl={extends:Wa,mixins:[ya],data:function(){return{nodeIcon:bl()}}},wl=yl,xl=qn(wl,Ds,Is,!1,null,null,null),kl=xl.exports,Cl="processmaker-modeler-event-based-gateway",Sl={id:Cl,component:kl,bpmnType:"bpmn:EventBasedGateway",control:!1,category:"BPMN",label:Po[Cl],definition:function(e,t){return e.create("bpmn:EventBasedGateway",{name:t(Po[Cl])})},diagram:function(e){return e.create("bpmndi:BPMNShape",{bounds:e.create("dc:Bounds",{height:36,width:36})})},inspectorConfig:[{name:Po[Cl],items:[{component:"FormAccordion",container:!0,config:{initiallyOpen:!0,label:"Properties",icon:"cog",name:"inspector-accordion-event-based-gateway"},items:[{component:"FormInput",config:{label:"Name",helper:"The Name of the Gateway",name:"name"}}]},ua,na]}]},El=function(){var e=this,t=e._self._c;return t("crown-config",e._g({attrs:{highlighted:e.highlighted,paper:e.paper,graph:e.graph,shape:e.shape,node:e.node,nodeRegistry:e.nodeRegistry,moddle:e.moddle,collaboration:e.collaboration,"process-node":e.processNode,"plane-elements":e.planeElements,"is-rendering":e.isRendering}},e.$listeners))},Al=[],Ml={offset:{y:-20}},Tl="processmaker-modeler-lane",_l=function(e){pi(n,e);var t=vi(n);function n(){return wo(this,n),t.apply(this,arguments)}return ko(n,[{key:"makeFlowNode",value:function(e,t,n){var o=this,i=this.nodeRegistry["processmaker-modeler-sequence-flow"].diagram(this.moddle),r=this.nodeRegistry["processmaker-modeler-sequence-flow"].definition(this.moddle,this.$t);r.set("sourceRef",e.component.node.definition),r.set("targetRef",t.component.node.definition);var s=n.sourceAnchor,a=n.targetAnchor;return i.waypoint=[s,a].map((function(e){return o.moddle.create("dc:Point",e)})),"bpmn:ExclusiveGateway"!==r.sourceRef.$type&&"bpmn:InclusiveGateway"!==r.sourceRef.$type||(r.conditionExpression=this.moddle.create("bpmn:FormalExpression",{body:""})),e.component.node.definition.get("outgoing").push(r),t.component.node.definition.get("incoming").push(r),new Ro("processmaker-modeler-sequence-flow",r,i)}}],[{key:"isValid",value:function(e){var t=e.sourceShape,o=e.targetShape,i=e.targetConfig,r=x()(o,"component.node"),s=x()(t,"component.node");return yi.hasTargetType(o)&&yi.targetIsNotSource(s,r)&&n.targetIsNotALane(r)&&n.targetIsInSamePool(t,o)&&n.eventBasedGatewayTarget(s,r)&&n.isValidSource(t,i)&&n.sourceIsNotPool(s)&&!wi.isADataNode(s)&&!wi.isADataNode(r)}},{key:"isValidSource",value:function(e,t){return null==t.validateIncoming||t.validateIncoming(e.node)}},{key:"targetIsNotALane",value:function(e){return!e.isType(Tl)}},{key:"targetIsInSamePool",value:function(e,t){var n=t.component.node.pool,o=e.component.node.pool;return!o||o===n}},{key:"targetIsNotSource",value:function(e,t){return t.id!==e.id}},{key:"eventBasedGatewayTarget",value:function(e,t){var n=e.isBpmnType("bpmn:EventBasedGateway"),o=t.isBpmnType("bpmn:IntermediateCatchEvent");return!n||o}},{key:"sourceIsNotPool",value:function(e){return!e.isType("processmaker-modeler-pool")}}]),n}(yi),Pl={components:{CrownConfig:Zr},props:["graph","node","id","highlighted","nodeRegistry","moddle","paper","collaboration","processNode","planeElements","isRendering"],mixins:[_n],data:function(){return{shape:null}},computed:{isValidConnection:function(){return _l.isValid({sourceShape:this.sourceShape,targetShape:this.target,targetConfig:this.targetConfig})},targetType:function(){return x()(this.target,"component.node.type")},shapeName:function(){return this.node.definition.get("name")},nameLabel:{get:function(){return this.shape.label(0).attrs.text.text},set:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";this.shape.label(0,{attrs:{text:{text:e}}})}}},watch:{"node.definition":{handler:function(){var e=this.shapeName;e!==this.nameLabel&&(this.nameLabel=e),this.setDefaultMarker(this.isDefaultFlow())},deep:!0},"node.definition.sourceRef":{handler:function(){this.setDefaultMarker(this.isDefaultFlow())},deep:!0}},methods:{setDefaultMarker:function(e){this.shape.attr("line",{sourceMarker:{"stroke-width":e?2:0}})},isDefaultFlow:function(){return this.node.definition.sourceRef&&this.node.definition.sourceRef.default&&this.node.definition.sourceRef.default.id===this.node.definition.id},updateRouter:function(){this.shape.router("orthogonal",{padding:1})},updateDefinitionLinks:function(){var e=this.shape.getTargetElement();this.node.definition.targetRef=e.component.node.definition,this.sourceShape.component.node.definition.get("outgoing").push(this.node.definition),e.component.node.definition.get("incoming").push(this.node.definition)},createLabel:function(){this.shape.labels([{attrs:{text:{text:this.shapeName}},position:Ml}])},createDefaultFlowMarker:function(){this.shape.attr("line",{sourceMarker:{type:"polyline","stroke-width":this.isDefaultFlow()?2:0,points:"2,6 6,-6"}})}},mounted:function(){this.shape=new a.shapes.standard.Link,this.shape.connector("rounded",{radius:5}),this.createLabel(),this.createDefaultFlowMarker(),this.shape.addTo(this.graph),this.shape.component=this}},Ol=Pl,Dl=qn(Ol,El,Al,!1,null,null,null),Il=Dl.exports,Nl="processmaker-modeler-sequence-flow",Rl={id:Nl,component:Il,bpmnType:"bpmn:SequenceFlow",control:!1,definition:function(e){return e.create("bpmn:SequenceFlow",{name:null})},diagram:function(e){return e.create("bpmndi:BPMNEdge")},inspectorData:function(e){var t=["bpmn:ExclusiveGateway","bpmn:InclusiveGateway"].includes(e.definition.sourceRef.$type);return t||delete e.definition.conditionExpression,Object.entries(e.definition).reduce((function(e,t){var n=mt(t,2),o=n[0],i=n[1];return e[o]="conditionExpression"===o?i.body:i,e}),{})},inspectorHandler:function(e,t,n,o){var i=t.definition,r=["bpmn:ExclusiveGateway","bpmn:InclusiveGateway"].includes(i.sourceRef.$type);for(var s in e)if(i[s]!==e[s])if("conditionExpression"===s&&r){if(i[s].body!==e[s]){var a=o.create("bpmn:FormalExpression",{body:e[s]});n(t,s,a)}}else n(t,s,e[s])},inspectorConfig:[{name:"Sequence Flow",items:[{component:"FormAccordion",container:!0,config:{initiallyOpen:!0,label:"Properties",icon:"cog",name:"inspector-accordion-sequence-flow"},items:[{component:"FormInput",config:yo(yo({},Ys),{},{validation:null})}]},ua,na]}]},Bl=function(){var e=this,t=e._self._c;return t("crown-config",{attrs:{highlighted:e.highlighted,paper:e.paper,graph:e.graph,shape:e.shape,node:e.node,nodeRegistry:e.nodeRegistry,moddle:e.moddle,collaboration:e.collaboration,"process-node":e.processNode,"plane-elements":e.planeElements,"is-rendering":e.isRendering},on:{"remove-node":function(t){return e.$emit("remove-node",t)},"add-node":function(t){return e.$emit("add-node",t)},"save-state":function(t){return e.$emit("save-state",t)}}})},Ll=[],jl=function(e){pi(n,e);var t=vi(n);function n(){return wo(this,n),t.apply(this,arguments)}return ko(n,[{key:"makeFlowNode",value:function(e,t,n){var o=this,i=this.nodeRegistry["processmaker-modeler-message-flow"].diagram(this.moddle),r=this.nodeRegistry["processmaker-modeler-message-flow"].definition(this.moddle);r.set("sourceRef",e.component.node.definition),r.set("targetRef",t.component.node.definition);var s=n.sourceAnchor,a=n.targetAnchor;return i.waypoint=[s,a].map((function(e){return o.moddle.create("dc:Point",e)})),new Ro("processmaker-modeler-message-flow",r,i)}}],[{key:"isValid",value:function(e){var t=e.sourceShape,o=e.targetShape,i=e.sourceConfig,r=x()(o,"component.node"),s=x()(t,"component.node");return yi.hasTargetType(o)&&n.isValidTargetType(r)&&yi.targetIsValidStartEventType(r)&&yi.targetIsValidIntermediateEventType(r)&&yi.targetIsValidBoundaryEventType(r)&&yi.targetIsNotContainingPool(o,s)&&yi.targetIsInDifferentPool(o,t)&&yi.targetIsNotSource(r,s)&&yi.allowOutgoingFlow(i,s)}},{key:"isValidTargetType",value:function(e){return["bpmn:Task","bpmn:ScriptTask","bpmn:ManualTask","bpmn:CallActivity","bpmn:ServiceTask","bpmn:IntermediateCatchEvent","bpmn:Participant","bpmn:StartEvent","bpmn:BoundaryEvent"].some((function(t){return e.isBpmnType(t)}))}}]),n}(yi),Fl={components:{CrownConfig:Zr},props:["graph","node","id","highlighted","nodeRegistry","moddle","paper","collaboration","processNode","planeElements","isRendering"],mixins:[_n],data:function(){return{shape:null}},computed:{isValidConnection:function(){return jl.isValid({sourceShape:this.sourceShape,targetShape:this.target,sourceConfig:this.sourceConfig})},targetType:function(){return x()(this.target,"component.node.type")},sourceType:function(){return x()(this.sourceNode,"type")}},methods:{updateRouter:function(){this.shape.router("orthogonal",{padding:1})},updateDefinitionLinks:function(){var e=this.shape.getTargetElement();this.node.definition.targetRef=e.component.node.definition}},mounted:function(){this.shape=new a.shapes.standard.Link({router:{name:"orthogonal"}}),this.shape.attr("line",{strokeDasharray:"10 10",sourceMarker:{type:"circle",r:5,"stroke-width":2,fill:"#fff"},targetMarker:{type:"path",fill:"#fff","stroke-width":2,d:"M 10 -5 0 0 10 5 Z"}}),this.shape.addTo(this.graph),this.shape.component=this}},zl=Fl,ql=qn(zl,Bl,Ll,!1,null,null,null),Hl=ql.exports,Vl="processmaker-modeler-message-flow",Ul={id:Vl,component:Hl,bpmnType:"bpmn:MessageFlow",control:!1,definition:function(e){return e.create("bpmn:MessageFlow",{name:""})},diagram:function(e){return e.create("bpmndi:BPMNEdge")},inspectorConfig:[{name:"Message Flow",items:[{component:"FormAccordion",container:!0,config:{initiallyOpen:!0,label:"Properties",icon:"cog",name:"inspector-accordion-message-flow"},items:[{component:"FormInput",config:Ys}]},ua,na]}]},Gl=h(18256),Wl=h.n(Gl),$l={extends:$s,mixins:[ya],props:["node","rootElements","id"],data:function(){return{message:this.moddle.create("bpmn:Message",{id:"".concat(this.id,"_message"),name:"".concat(this.id,"_message")}),nodeIcon:Wl()}},methods:{addMessageRef:function(){this.node.definition.get("eventDefinitions")[0].messageRef?this.message=this.node.definition.get("eventDefinitions")[0].messageRef:(this.message=this.moddle.create("bpmn:Message",{id:"".concat(this.id,"_message"),name:"".concat(this.id,"_message")}),this.rootElements.push(this.message),this.node.definition.get("eventDefinitions")[0].messageRef=this.message)}},mounted:function(){this.addMessageRef()},destroyed:function(){Gr()(this.rootElements,this.message),bn.commit("removeMessageRef",this.message)}},Xl=$l,Yl=qn(Xl,Ns,Rs,!1,null,null,null),Zl=Yl.exports,Kl=function(){var e=this,t=e._self._c;return t("div",[t("label",{staticClass:"typo__label"},[e._v(e._s(e.label))]),t("div",{staticClass:"d-flex",class:{invalid:e.invalid}},[t("multiselect",{attrs:{value:e.selectedOption,placeholder:e.$t(e.placeholder),options:e.options,multiple:e.multiple,"track-by":e.trackBy,"show-labels":!1,searchable:!0,"internal-search":!1,label:"name","data-test":"".concat(e.name,":select")},on:{input:e.change,"search-change":e.loadOptionsDebounced,open:e.loadOptions}},[t("template",{slot:"noResult"},[e._t("noResult",(function(){return[e._v(e._s(e.$t("Not found")))]}))],2),t("template",{slot:"noOptions"},[e._t("noOptions",(function(){return[e._v(e._s(e.$t("No Data Available")))]}))],2)],2),t("div",{staticClass:"btn-group ml-1",attrs:{role:"group"}},[t("button",{staticClass:"btn btn-secondary btn-sm",attrs:{type:"button","data-cy":"events-list",title:e.$t("Configure")},on:{click:e.toggleConfigMessage}},[t("i",{staticClass:"fa fa-ellipsis-h"})])])],1),e.invalid?t("div",{staticClass:"invalid-feedback d-block"},[t("div",[e._v(" "+e._s(e.$t("Message reference is required"))+" ")])]):e._e(),e.helper?t("small",{staticClass:"form-text text-muted"},[e._v(e._s(e.$t(e.helper)))]):e._e(),e.showNewMessage?t("div",{staticClass:"card"},[t("div",{staticClass:"card-body p-2"},[t("form-input",{attrs:{label:e.$t("ID"),error:e.getValidationErrorForNewId(e.messageId),"data-cy":"events-add-id"},model:{value:e.messageId,callback:function(t){e.messageId=t},expression:"messageId"}}),t("form-input",{attrs:{label:e.$t("Name"),error:e.getValidationErrorForNewName(e.messageName),"data-cy":"events-add-name"},model:{value:e.messageName,callback:function(t){e.messageName=t},expression:"messageName"}})],1),t("div",{staticClass:"card-footer text-right p-2"},[t("button",{staticClass:"btn-special-assignment-action btn-special-assignment-close btn btn-outline-secondary btn-sm",attrs:{type:"button","data-cy":"events-cancel"},on:{click:e.cancelAddMessage}},[e._v(" "+e._s(e.$t("Cancel"))+" ")]),t("button",{staticClass:"btn-special-assignment-action btn btn-secondary btn-sm",attrs:{disabled:!e.validNew,type:"button","data-cy":"events-save"},on:{click:e.addMessage}},[e._v(" "+e._s(e.$t("Save"))+" ")])])]):e._e(),e.showEditMessage?t("div",{staticClass:"card"},[t("div",{staticClass:"card-body p-2"},[t("form-input",{attrs:{label:e.$t("Name"),error:e.getValidationErrorForNameUpdate(e.messageName),"data-cy":"events-edit-name"},model:{value:e.messageName,callback:function(t){e.messageName=t},expression:"messageName"}})],1),t("div",{staticClass:"card-footer text-right p-2"},[t("button",{staticClass:"btn-special-assignment-action btn-special-assignment-close btn btn-outline-secondary btn-sm",attrs:{type:"button","data-cy":"events-cancel"},on:{click:e.cancelAddMessage}},[e._v(" "+e._s(e.$t("Cancel"))+" ")]),t("button",{staticClass:"btn-special-assignment-action btn btn-secondary btn-sm",attrs:{disabled:!e.validUpdate,type:"button","data-cy":"events-save"},on:{click:e.updateMessage}},[e._v(" "+e._s(e.$t("Save"))+" ")])])]):e.showConfirmDelete?t("div",{staticClass:"card mb-3 bg-danger text-white"},[e.deleteMessageUsage(e.deleteMessage.id)?t("div",{staticClass:"card-body p-2"},[e._v(" "+e._s(e.deleteMessageUsage(e.deleteMessage.id))+" ")]):t("div",{staticClass:"card-body p-2"},[e._v(" "+e._s(e.$t("Are you sure you want to delete this item?"))+" ("+e._s(e.deleteMessage.id)+") "+e._s(e.deleteMessage.name)+" ")]),t("div",{staticClass:"card-footer text-right p-2"},[t("button",{staticClass:"btn btn-sm btn-light mr-2 p-1 font-xs",attrs:{type:"button","data-cy":"events-cancel"},on:{click:function(t){e.showConfirmDelete=!1}}},[e._v(" "+e._s(e.$t("Cancel"))+" ")]),e.deleteMessageUsage(e.deleteMessage.id)?e._e():t("button",{staticClass:"btn btn-sm btn-danger p-1 font-xs",attrs:{type:"button","data-cy":"events-delete"},on:{click:e.confirmDeleteMessage}},[e._v(" "+e._s(e.$t("Delete"))+" ")])])]):!e.showListMessages||e.showNewMessage||e.showEditMessage?e._e():[t("table",{staticClass:"table table-sm table-striped",attrs:{width:"100%"}},[t("thead",[t("tr",[t("td",{attrs:{colspan:"2",align:"right"}},[t("button",{staticClass:"btn btn-secondary btn-sm p-1 font-xs",attrs:{type:"button","data-cy":"events-add"},on:{click:e.showAddMessage}},[t("i",{staticClass:"fa fa-plus"}),e._v(" "+e._s(e.$t("Message"))+" ")])])])]),t("tbody",e._l(e.localMessages,(function(n){return t("tr",{key:"message-".concat(n.id)},[t("td",[t("b-badge",{attrs:{variant:"secondary"}},[e._v(e._s(n.id))]),e._v(" "+e._s(n.name)+" ")],1),t("td",{attrs:{align:"right"}},[t("button",{staticClass:"btn-link ml-2",attrs:{"aria-label":e.$t("Edit")},on:{click:function(t){return e.editMessage(n)}}},[t("i",{staticClass:"fa fa-pen",attrs:{"data-cy":"events-edit"}})]),t("button",{staticClass:"btn-link ml-2",attrs:{"aria-label":e.$t("Remove")},on:{click:function(t){return e.removeMessage(n)}}},[t("i",{staticClass:"fa fa-trash",attrs:{"data-cy":"events-remove"}})])])])})),0)])]],2)},Jl=[],Ql=(h(4723),h(34553),{props:{value:null,name:String,placeholder:{type:String,default:"Select option"},helper:String,trackBy:{type:String,default:"id"},label:{type:String,default:"name"},api:{type:String,default:"messages"},multiple:{type:Boolean,default:!1}},computed:{invalid:function(){return!this.value},localMessages:function(){return bn.getters.rootElements.filter((function(e){return"bpmn:Message"===e.$type}))},validNew:function(){return""===this.getValidationErrorForNewId(this.messageId)&&""===this.getValidationErrorForNewName(this.messageName)},validUpdate:function(){return""===this.getValidationErrorForNameUpdate(this.messageName)}},data:function(){return{options:[],selectedOption:null,pmql:"id!="+window.ProcessMaker.modeler.process.id,showListMessages:!1,showNewMessage:!1,showEditMessage:!1,showConfirmDelete:!1,deleteMessage:null,messageId:"",messageName:""}},methods:{deleteMessageUsage:function(e){var t=this.messageUsage(e),n=[];return t.forEach((function(e){return n.push(e.name||e.id)})),n.length?this.$t("This message cannot be removed, it is used by")+": "+n.join(", "):""},messageUsage:function(e){var t=[];return bn.getters.rootElements.forEach((function(n){"bpmn:Process"===n.$type&&n.flowElements.forEach((function(n){n.eventDefinitions&&n.eventDefinitions.forEach((function(o){"bpmn:MessageEventDefinition"===o.$type&&o.messageRef&&o.messageRef.id===e&&t.push(n)}))}))})),t},getValidationErrorForNewId:function(e){if(!e)return this.$t("Message ID is required");var t=bn.getters.rootElements.find((function(t){return t.id===e}));if(t)return this.$t("Message ID is duplicated");var n=e.match(/^[_A-Za-z][-._A-Za-z0-9]*$/);return n?"":this.$t("Message ID is not a valid xsd:ID")},getValidationErrorForNewName:function(e){if(!e)return this.$t("Message Name is required");var t=bn.getters.rootElements.find((function(t){return"bpmn:Message"===t.$type&&t.name===e}));return t?this.$t("Message Name is duplicated"):""},getValidationErrorForNameUpdate:function(e){var t=this;if(!e)return this.$t("Message Name is required");var n=bn.getters.rootElements.find((function(n){return"bpmn:Message"===n.$type&&n.name===e&&n.id!==t.messageId}));return n?this.$t("Message Name is duplicated"):""},confirmDeleteMessage:function(){var e=this;this.showConfirmDelete=!1;var t=bn.getters.rootElements.findIndex((function(t){return t.id===e.deleteMessage.id}));t>-1&&bn.getters.rootElements.splice(t,1)},removeMessage:function(e){this.showConfirmDelete=!0,this.deleteMessage=e},toggleConfigMessage:function(){this.showListMessages=!this.showListMessages},editMessage:function(e){this.messageId=e.id,this.messageName=e.name,this.showEditMessage=!0},getMessageById:function(e){return bn.getters.rootElements.find((function(t){return t.id===e}))},change:function(e){if(!e)return this.$emit("input",""),void this.refreshVueMultiselectValue();var t=this.getMessageById(e.id);t||(t=window.ProcessMaker.$modeler.moddle.create("bpmn:Message",{id:e.id,name:e.name}),bn.getters.rootElements.push(t)),this.$emit("input",(0,Un.get)(e,this.trackBy)),this.refreshVueMultiselectValue()},refreshVueMultiselectValue:function(){var e=this;this.$nextTick((function(){var t=e;while(t&&"vue-form-renderer"!==t.$options._componentTag)t=t.$parent;t&&t.$emit("update",t.transientData)}))},showAddMessage:function(){this.showNewMessage=!0,this.messageId="",this.messageName=""},cancelAddMessage:function(){this.showNewMessage=!1,this.showEditMessage=!1},updateMessage:function(){this.getMessageById(this.messageId).name=this.messageName,this.showEditMessage=!1},addMessage:function(){var e=window.ProcessMaker.$modeler.moddle.create("bpmn:Message",{id:this.messageId,name:this.messageName});bn.getters.rootElements.push(e),this.showNewMessage=!1},updateOptions:function(e){this.options=(0,Un.uniqBy)([].concat(m(this.localMessages),m(e)),"id")},loadOptions:function(){this.updateOptions([])},loadSelected:function(e){var t=bn.getters.rootElements.find((function(t){return t.id===e}));t?this.selectedOption={id:t.id,name:t.name}:(this.$emit("input",""),this.refreshVueMultiselectValue())},loadOptionsDebounced:function(){}},watch:{value:{immediate:!0,handler:function(e){var t=this;this.selectedOption=this.options.find((function(n){return(0,Un.get)(n,t.trackBy)==e})),e&&!this.selectedOption&&this.loadSelected(e)}}}}),ec=Ql,tc=(h(1277),h(25930),qn(ec,Kl,Jl,!1,null,"395d11da",null)),nc=tc.exports;function oc(e){return{component:nc,config:{label:"Message",name:"messageRef",helper:e}}}var ic,rc,sc={inspectorData:function(e){return Object.entries(e.definition).reduce((function(e,t){var n=mt(t,2),o=n[0],i=n[1];if("eventDefinitions"===o){var r=i[0].get("messageRef");e.messageRef=r?r.id:""}else e[o]=i;return e}),{})},inspectorHandler:function(e,t,n,o,i){for(var r in Ma()(e,["$type","eventDefinitions","messageRef"]))t.definition[r]!==e[r]&&n(t,r,e[r]);var s=i.rootElements.find((function(t){return t.id===e.messageRef}));!s&&e.messageRef&&(s=o.create("bpmn:Message",{id:e.messageRef,name:e.messageRef}),i.rootElements.push(s)),t.definition.get("eventDefinitions")[0].messageRef=s}},ac="processmaker-modeler-message-end-event",lc=Ea()(No()(ha),yo(yo({},sc),{},{id:ac,component:Zl,control:!1,label:Ao[ac],definition:function(e,t){return e.create("bpmn:EndEvent",{name:t(Ao[ac]),eventDefinitions:[e.create("bpmn:MessageEventDefinition")]})},inspectorConfig:[{items:[{items:[{},oc("Select the message reference that this element throws")]}]}]})),cc=h(77389),dc=h.n(cc),uc={extends:$s,mixins:[ya],data:function(){return{nodeIcon:dc()}},mounted:function(){this.shape.attr({image:{"ref-y":3}})}},pc=uc,hc=qn(pc,ic,rc,!1,null,null,null),fc=hc.exports,mc=function(){var e=this,t=e._self._c;return t("div",[t("label",{staticClass:"typo__label"},[e._v(e._s(e.label))]),t("div",{staticClass:"d-flex",class:{invalid:e.invalid}},[t("multiselect",{attrs:{value:e.selectedOption,placeholder:e.$t(e.placeholder),options:e.options,multiple:e.multiple,"track-by":e.trackBy,"show-labels":!1,searchable:!0,"internal-search":!1,label:"name","data-test":"".concat(e.name,":select"),disabled:!e.can("view-signals")},on:{input:e.change,"search-change":e.loadOptions,open:function(t){return e.loadOptions()}}},[t("template",{slot:"noResult"},[e._t("noResult",(function(){return[e._v(e._s(e.$t("Not found")))]}))],2),t("template",{slot:"noOptions"},[e._t("noOptions",(function(){return[e._v(e._s(e.$t("No Data Available")))]}))],2)],2),e.canEdit?t("div",{staticClass:"btn-group ml-1",attrs:{role:"group"}},[t("button",{staticClass:"btn btn-secondary btn-sm",attrs:{type:"button","data-cy":"events-list",title:e.$t("Configure")},on:{click:e.toggleConfigSignal}},[t("i",{staticClass:"fa fa-ellipsis-h"})])]):e._e()],1),e.can("view-signals")?e._e():t("div",{staticClass:"invalid-feedback d-block"},[t("div",[e._v(" "+e._s(e.$t("You do not have permission to view signals"))+" ")])]),e.invalid?t("div",{staticClass:"invalid-feedback d-block"},[t("div",[e._v(" "+e._s(e.$t("Signal reference is required"))+" ")])]):e._e(),e.helper?t("small",{staticClass:"form-text text-muted"},[e._v(e._s(e.$t(e.helper)))]):e._e(),e.showNewSignal?t("div",{staticClass:"card"},[t("div",{staticClass:"card-body p-2"},[t("form-input",{attrs:{label:e.$t("ID"),error:e.getValidationErrorForNewId(e.signalId),"data-cy":"events-add-id"},model:{value:e.signalId,callback:function(t){e.signalId=t},expression:"signalId"}}),t("form-input",{attrs:{label:e.$t("Name"),error:e.getValidationErrorForNewName(e.signalName),"data-cy":"events-add-name"},model:{value:e.signalName,callback:function(t){e.signalName=t},expression:"signalName"}})],1),t("div",{staticClass:"card-footer text-right p-2"},[t("button",{staticClass:"btn-special-assignment-action btn-special-assignment-close btn btn-outline-secondary btn-sm",attrs:{type:"button","data-cy":"events-cancel"},on:{click:e.cancelAddSignal}},[e._v(" "+e._s(e.$t("Cancel"))+" ")]),t("button",{staticClass:"btn-special-assignment-action btn btn-secondary btn-sm",attrs:{disabled:!e.validNew,type:"button","data-cy":"events-save"},on:{click:e.addSignal}},[e._v(" "+e._s(e.$t("Save"))+" ")])])]):e._e(),e.showEditSignal?t("div",{staticClass:"card"},[t("div",{staticClass:"card-body p-2"},[t("form-input",{attrs:{label:e.$t("Name"),error:e.getValidationErrorForNameUpdate(e.signalName),"data-cy":"events-edit-name"},model:{value:e.signalName,callback:function(t){e.signalName=t},expression:"signalName"}})],1),t("div",{staticClass:"card-footer text-right p-2"},[t("button",{staticClass:"btn-special-assignment-action btn-special-assignment-close btn btn-outline-secondary btn-sm",attrs:{type:"button","data-cy":"events-cancel"},on:{click:e.cancelAddSignal}},[e._v(" "+e._s(e.$t("Cancel"))+" ")]),t("button",{staticClass:"btn-special-assignment-action btn btn-secondary btn-sm",attrs:{disabled:!e.validUpdate,type:"button","data-cy":"events-save"},on:{click:e.updateSignal}},[e._v(" "+e._s(e.$t("Save"))+" ")])])]):e.showConfirmDelete?t("div",{staticClass:"card mb-3 bg-danger text-white"},[e.deleteSignalUsage(e.deleteSignal.id)?t("div",{staticClass:"card-body p-2"},[e._v(" "+e._s(e.deleteSignalUsage(e.deleteSignal.id))+" ")]):t("div",{staticClass:"card-body p-2"},[e._v(" "+e._s(e.$t("Are you sure you want to delete this item?"))+" ("+e._s(e.deleteSignal.id)+") "+e._s(e.deleteSignal.name)+" ")]),t("div",{staticClass:"card-footer text-right p-2"},[t("button",{staticClass:"btn btn-sm btn-light mr-2 p-1 font-xs",attrs:{type:"button","data-cy":"events-cancel"},on:{click:function(t){e.showConfirmDelete=!1}}},[e._v(" "+e._s(e.$t("Cancel"))+" ")]),e.deleteSignalUsage(e.deleteSignal.id)?e._e():t("button",{staticClass:"btn btn-sm btn-danger p-1 font-xs",attrs:{type:"button","data-cy":"events-delete"},on:{click:e.confirmDeleteSignal}},[e._v(" "+e._s(e.$t("Save"))+" ")])])]):!e.showListSignals||e.showNewSignal||e.showEditSignal?e._e():[t("table",{staticClass:"table table-sm table-striped",attrs:{width:"100%"}},[t("thead",[t("tr",[t("td",{attrs:{colspan:"2",align:"right"}},[t("button",{staticClass:"btn btn-secondary btn-sm p-1 font-xs",attrs:{type:"button","data-cy":"events-add"},on:{click:e.showAddSignal}},[t("i",{staticClass:"fa fa-plus"}),e._v(" "+e._s(e.$t("Signal"))+" ")])])])]),t("tbody",e._l(e.localSignals,(function(n){return t("tr",{key:"signal-".concat(n.id)},[t("td",[t("b-badge",{attrs:{variant:"secondary"}},[e._v(e._s(n.id))]),e._v(" "+e._s(n.name)+" ")],1),t("td",{attrs:{align:"right"}},[e.can("edit-signals")?t("button",{staticClass:"btn-link ml-2",attrs:{"aria-label":e.$t("Edit")},on:{click:function(t){return e.editSignal(n)}}},[t("i",{staticClass:"fa fa-pen",attrs:{"data-cy":"events-edit"}})]):e._e(),e.can("delete-signals")?t("button",{staticClass:"btn-link ml-2",attrs:{"aria-label":e.$t("Remove")},on:{click:function(t){return e.removeSignal(n)}}},[t("i",{staticClass:"fa fa-trash",attrs:{"data-cy":"events-remove"}})]):e._e()])])})),0)])]],2)},gc=[],vc={props:{value:null,name:String,placeholder:{type:String,default:"Select option"},helper:String,canEdit:{type:Boolean,default:!0},trackBy:{type:String,default:"id"},label:{type:String,default:"name"},api:{type:String,default:"signals"},multiple:{type:Boolean,default:!1}},computed:{invalid:function(){return!this.value},localSignals:function(){return bn.getters.rootElements.filter((function(e){return"bpmn:Signal"===e.$type}))},validNew:function(){return""===this.getValidationErrorForNewId(this.signalId)&&""===this.getValidationErrorForNewName(this.signalName)},validUpdate:function(){return""===this.getValidationErrorForNameUpdate(this.signalName)}},data:function(){return{options:[],selectedOption:null,pmql:"id!="+window.ProcessMaker.modeler.process.id,showListSignals:!1,showNewSignal:!1,showEditSignal:!1,showConfirmDelete:!1,deleteSignal:null,signalId:"",signalName:""}},methods:{deleteSignalUsage:function(e){var t=this.signalUsage(e),n=[];return t.forEach((function(e){return n.push(e.name||e.id)})),n.length?this.$t("This signal cannot be removed, it is used by")+": "+n.join(", "):""},signalUsage:function(e){var t=[];return bn.getters.rootElements.forEach((function(n){"bpmn:Process"===n.$type&&n.flowElements.forEach((function(n){n.eventDefinitions&&n.eventDefinitions.forEach((function(o){"bpmn:SignalEventDefinition"===o.$type&&o.signalRef&&o.signalRef.id===e&&t.push(n)}))}))})),t},getValidationErrorForNewId:function(e){if(!e)return this.$t("Signal ID is required");var t=bn.getters.rootElements.find((function(t){return t.id===e}));if(t)return this.$t("Signal ID is duplicated");var n=e.match(/^[_A-Za-z][-._A-Za-z0-9]*$/);return n?"":this.$t("Signal ID is not a valid xsd:ID")},getValidationErrorForNewName:function(e){if(!e)return this.$t("Signal Name is required");var t=bn.getters.rootElements.find((function(t){return"bpmn:Signal"===t.$type&&t.name===e}));return t?this.$t("Signal Name is duplicated"):""},getValidationErrorForNameUpdate:function(e){var t=this;if(!e)return this.$t("Signal Name is required");var n=bn.getters.rootElements.find((function(n){return"bpmn:Signal"===n.$type&&n.name===e&&n.id!==t.signalId}));return n?this.$t("Signal Name is duplicated"):""},confirmDeleteSignal:function(){var e=this;this.showConfirmDelete=!1;var t=bn.getters.rootElements.findIndex((function(t){return t.id===e.deleteSignal.id}));t>-1&&bn.getters.rootElements.splice(t,1)},removeSignal:function(e){this.showConfirmDelete=!0,this.deleteSignal=e},toggleConfigSignal:function(){this.can("view-signals")?this.showListSignals=!this.showListSignals:window.ProcessMaker.alert(this.$t("You do not have permission to view signals"),"danger")},editSignal:function(e){this.signalId=e.id,this.signalName=e.name,this.showEditSignal=!0},getSignalById:function(e){return bn.getters.rootElements.find((function(t){return t.id===e}))},change:function(e){if(!e)return this.$emit("input",""),void this.refreshVueMultiselectValue();var t=this.getSignalById(e.id);t||(t=window.ProcessMaker.$modeler.moddle.create("bpmn:Signal",{id:e.id,name:e.name}),bn.getters.rootElements.push(t)),this.$emit("input",(0,Un.get)(e,this.trackBy)),this.refreshVueMultiselectValue()},refreshVueMultiselectValue:function(){var e=this;this.$nextTick((function(){var t=e;while(t&&"vue-form-renderer"!==t.$options._componentTag)t=t.$parent;t&&t.$emit("update",t.transientData)}))},showAddSignal:function(){this.can("create-signals")?(this.showNewSignal=!0,this.signalId="",this.signalName=""):window.ProcessMaker.alert(this.$t("You do not have permission to add new signals"),"danger")},cancelAddSignal:function(){this.showNewSignal=!1,this.showEditSignal=!1},updateSignal:function(){this.getSignalById(this.signalId).name=this.signalName,this.showEditSignal=!1},addSignal:function(){var e=window.ProcessMaker.$modeler.moddle.create("bpmn:Signal",{id:this.signalId,name:this.signalName});bn.getters.rootElements.push(e),this.showNewSignal=!1},updateOptions:function(e){this.options=(0,Un.uniqBy)([].concat(m(e),m(this.localSignals)),"id")},loadOptions:function(e){var t=this;if(this.can("view-signals")){var n=this.pmql;window.window.ProcessMaker.apiClient.get(this.api,{params:{filter:e,pmql:n}}).then((function(e){t.updateOptions(e.data.data||[])}))}},loadSelected:function(e){var t=bn.getters.rootElements.find((function(t){return t.id===e}));t?this.selectedOption={id:t.id,name:t.name}:(this.$emit("input",""),this.refreshVueMultiselectValue())},loadOptionsDebounced:function(){},can:function(e){return(0,Un.get)(window,"ProcessMaker.modeler.signalPermissions.".concat(e),!1)}},watch:{value:{immediate:!0,handler:function(e){var t=this;this.selectedOption=this.options.find((function(n){return(0,Un.get)(n,t.trackBy)==e})),e&&!this.selectedOption&&this.loadSelected(e)}}}},bc=vc,yc=(h(59244),h(34924),qn(bc,mc,gc,!1,null,"607e6d70",null)),wc=yc.exports;function xc(e){var t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];return{component:wc,config:{label:"Signal",name:"signalRef",helper:e,canEdit:t}}}var kc={inspectorData:function(e){return Object.entries(e.definition).reduce((function(e,t){var n=mt(t,2),o=n[0],i=n[1];if("eventDefinitions"===o){var r=i[0].get("signalRef");e.signalRef=r?r.id:""}else e[o]=i;return e}),{})},inspectorHandler:function(e,t,n,o,i){for(var r in Ma()(e,["$type","eventDefinitions","signalRef"]))t.definition[r]!==e[r]&&n(t,r,e[r]);var s=i.rootElements.find((function(t){return t.id===e.signalRef}));!s&&e.signalRef&&(s=o.create("bpmn:Signal",{id:e.signalRef,name:e.signalRef}),i.rootElements.push(s)),t.definition.get("eventDefinitions")[0].signalRef=s}},Cc="processmaker-modeler-signal-end-event",Sc=Ea()(No()(ha),yo(yo({},kc),{},{id:Cc,component:fc,control:!1,label:Ao[Cc],definition:function(e,t){return e.create("bpmn:EndEvent",{name:t(Ao[Cc]),eventDefinitions:[e.create("bpmn:SignalEventDefinition")]})},inspectorConfig:[{items:[{items:[{},xc("Select the signal reference that this element throws")]}]}]})),Ec=function(){var e=this,t=e._self._c;return t("crown-config",e._g({attrs:{highlighted:e.highlighted,paper:e.paper,graph:e.graph,shape:e.shape,node:e.node,nodeRegistry:e.nodeRegistry,moddle:e.moddle,collaboration:e.collaboration,"process-node":e.processNode,"plane-elements":e.planeElements,"is-rendering":e.isRendering,"dropdown-data":e.dropdownData}},e.$listeners))},Ac=[],Mc={components:{CrownConfig:Zr},props:["graph","node","id","highlighted","nodeRegistry","moddle","paper","collaboration","processNode","planeElements","isRendering"],mixins:[Vs,Je,Bs,as,ya],data:function(){return{shape:new Ls,definition:null,dropdownData:[{label:So["processmaker-modeler-start-event"],nodeType:"processmaker-modeler-start-event",dataTest:"switch-to-start-event"},{label:So["processmaker-modeler-start-timer-event"],nodeType:"processmaker-modeler-start-timer-event",dataTest:"switch-to-start-timer-event"},{label:So["processmaker-modeler-signal-start-event"],nodeType:"processmaker-modeler-signal-start-event",dataTest:"switch-to-signal-start-event"},{label:So["processmaker-modeler-message-start-event"],nodeType:"processmaker-modeler-message-start-event",dataTest:"switch-to-message-start-event"},{label:So["processmaker-modeler-conditional-start-event"],nodeType:"processmaker-modeler-conditional-start-event",dataTest:"switch-to-conditional-start-event"}]}},watch:{"node.definition.name":function(e){this.shape.attr("label/text",e)}},mounted:function(){this.shape.set("type","processmaker.components.nodes.startEvent.Shape");var e=this.node.diagram.bounds;this.shape.position(e.get("x"),e.get("y")),this.shape.resize(e.get("width"),e.get("height")),this.shape.attr({body:{stroke:be,fill:ve},label:{text:this.node.definition.get("name"),refY:"130%"},image:{"ref-x":5,"ref-y":5,width:e.get("width")-10,height:e.get("height")-10}}),this.shape.addTo(this.graph),this.shape.component=this}},Tc=Mc,_c=qn(Tc,Ec,Ac,!1,null,null,null),Pc=_c.exports,Oc=h(27879),Dc=h.n(Oc);function Ic(e){if(!e)return!1;var t=JSON.parse(e);return t&&t.web_entry&&"DISABLED"!==t.web_entry.mode}var Nc,Rc,Bc,Lc,jc,Fc,zc,qc,Hc={extends:Pc,watch:{"node.definition.config":{immediate:!0,handler:function(e){if(Ic(e))return this.nodeIcon=Dc(),void this.shape.attr("image/xlink:href",ba(Dc(),this.node));this.nodeIcon=null,this.shape.attr("image/xlink:href",null)}}}},Vc=Hc,Uc=qn(Vc,Nc,Rc,!1,null,null,null),Gc=Uc.exports,Wc=36,$c={bpmnType:"bpmn:StartEvent",control:!1,category:"BPMN",diagram:function(e){return e.create("bpmndi:BPMNShape",{bounds:e.create("dc:Bounds",{height:Wc,width:Wc,x:null,y:null})})},validateIncoming:function(){return!1},inspectorConfig:[{items:[{component:"FormAccordion",container:!0,config:{initiallyOpen:!0,label:"Properties",icon:"cog",name:"inspector-accordion-start-event"},items:[{component:"FormInput",config:Ys}]},ua,na]}]},Xc="processmaker-modeler-start-event",Yc=Ea()(No()($c),{id:Xc,component:Gc,control:!0,icon:h(34954),label:So[Xc],rank:10,items:[{icon:h(34954),label:So[Xc],control:!0,bpmnType:"bpmn:StartEvent",rank:10,id:"processmaker-modeler-start-event"},{icon:h(42123),label:So["processmaker-modeler-message-start-event"],control:!0,bpmnType:"bpmn:StartEvent",rank:11,id:"processmaker-modeler-message-start-event"},{icon:h(47658),label:So["processmaker-modeler-conditional-start-event"],control:!0,bpmnType:"bpmn:StartEvent",rank:12,id:"processmaker-modeler-conditional-start-event"},{icon:h(43762),label:So["processmaker-modeler-signal-start-event"],control:!0,bpmnType:"bpmn:StartEvent",rank:13,id:"processmaker-modeler-signal-start-event"},{icon:h(8519),label:So["processmaker-modeler-start-timer-event"],control:!0,bpmnType:"bpmn:StartEvent",rank:14,id:"processmaker-modeler-start-timer-event"}],definition:function(e,t){return e.create("bpmn:StartEvent",{name:t(So[Xc])})}}),Zc=h(69766),Kc=h.n(Zc),Jc={extends:Pc,data:function(){return{nodeIcon:Kc()}},mounted:function(){this.shape.attr({image:{"ref-x":5,"ref-y":3}})}},Qc=Jc,ed=qn(Qc,Bc,Lc,!1,null,null,null),td=ed.exports,nd={label:"Request Variable",name:"config",helper:"Enter the request variable that will store the signal payload","data-cy":"signal-request-variable"},od=nd,id="processmaker-modeler-signal-start-event",rd=Ea()(No()($c),yo(yo({},kc),{},{id:id,component:td,label:So[id],definition:function(e,t){return e.create("bpmn:StartEvent",{name:t(So[id]),eventDefinitions:[e.create("bpmn:SignalEventDefinition")]})},inspectorConfig:[{items:[{items:[{},xc("Signal that will trigger this start event",!1),{component:"FormInput",config:od}]}]}]})),sd=h(47179),ad=h.n(sd),ld={extends:Pc,data:function(){return{nodeIcon:ad()}}},cd=ld,dd=qn(cd,jc,Fc,!1,null,null,null),ud=dd.exports,pd="processmaker-modeler-message-start-event",hd=Ea()(No()($c),yo(yo({},sc),{},{id:pd,component:ud,label:So[pd],definition:function(e,t){return e.create("bpmn:StartEvent",{name:t(So[pd]),eventDefinitions:[e.create("bpmn:MessageEventDefinition")]})},inspectorConfig:[{items:[{items:[{},oc("Message that will trigger this start event")]}]}]})),fd=h(93698),md=h.n(fd),gd={extends:Pc,data:function(){return{nodeIcon:md()}}},vd=gd,bd=qn(vd,zc,qc,!1,null,null,null),yd=bd.exports,wd=(h(82481),function(){var e=this,t=e._self._c;return t("div",{staticClass:"form-group"},[t("form-date-picker",{staticClass:"p-0",attrs:{"emit-iso":!0,"data-test":"start-date-picker","data-format":"datetime",label:e.$t("Start date"),placeholder:e.$t("Start date"),"control-class":"form-control",value:e.startDate,helper:e.$t(e.startDateHelper)},on:{input:e.setStartDate}}),e.hasRepeat?[t("label",{},[e._v(e._s(e.$t(e.repeatLabel)))]),t("b-form-group",{staticClass:"m-0 mb-3 p-0"},[t("b-form-input",{staticClass:"d-inline-block w-50",attrs:{type:"number",min:"1",max:"99","data-test":"repeat-input"},model:{value:e.repeat,callback:function(t){e.repeat=t},expression:"repeat"}}),t("b-form-select",{staticClass:"d-inline-block w-50 periodicity",attrs:{"data-test":"repeat-on-select"},model:{value:e.periodicity,callback:function(t){e.periodicity=t},expression:"periodicity"}},[t("option",{attrs:{value:"day"}},[e._v(e._s(e.$t("day")))]),t("option",{attrs:{value:"week"}},[e._v(e._s(e.$t("week")))]),t("option",{attrs:{value:"month"}},[e._v(e._s(e.$t("month")))]),t("option",{attrs:{value:"year"}},[e._v(e._s(e.$t("year")))])]),t("small",{staticClass:"form-text text-muted"},[e._v(e._s(e.$t(e.repeatHelper)))])],1)]:e._e(),e.isWeeklyPeriodSelected?t("weekday-select",{attrs:{selectWeekdays:e.selectedWeekdays,periodicityValue:e.periodicityValue,repeat:e.repeat,"start-date":e.startDate,"end-date":e.endDate,ends:e.ends,times:e.times},model:{value:e.expression,callback:function(t){e.expression=t},expression:"expression"}}):e._e(),e.hasEnds?[t("label",{staticClass:"mt-1"},[e._v(e._s(e.$t("Ends")))]),t("div",[t("b-form-group",{staticClass:"m-0 mb-2"},[t("b-form-radio",{attrs:{"data-test":"ends-never",name:"optradio",value:"never"},model:{value:e.ends,callback:function(t){e.ends=t},expression:"ends"}},[e._v(e._s(e.$t("Never")))])],1),t("b-form-group",{staticClass:"p-0 mb-1",attrs:{description:"".concat(e.$t("Click On to select a date"),".")}},[t("b-form-radio",{staticClass:"pl-3 ml-2 mb-1",attrs:{name:"optradio",value:"ondate","data-test":"ends-on"},model:{value:e.ends,callback:function(t){e.ends=t},expression:"ends"}},[e._v(e._s(e.$t("On")))]),t("form-date-picker",{staticClass:"form-date-picker p-0 m-0",class:{"date-disabled":"ondate"!==e.ends},attrs:{"emit-iso":!0,"data-test":"end-date-picker",disabled:"ondate"!==e.ends,placeholder:e.$t("End date"),"data-format":"datetime","control-class":"form-control",value:e.endDate,name:"end date"},on:{input:e.setEndDate}})],1),t("b-form-group",{staticClass:"mt-0 p-0",attrs:{description:"".concat(e.$t("Click After to enter how many occurrences to end the timer control"),".")}},[t("b-form-radio",{staticClass:"pl-3 ml-2 mb-1",attrs:{"data-test":"ends-after",name:"optradio",value:"after"},model:{value:e.ends,callback:function(t){e.ends=t},expression:"ends"}},[e._v(e._s(e.$t("After")))]),t("b-form-input",{staticClass:"w-25 pl-2 pr-1 d-inline-block",attrs:{"data-test":"ends-after-input",type:"number",min:"0",max:"99",disabled:"after"!==e.ends},model:{value:e.times,callback:function(t){e.times=t},expression:"times"}}),t("b-form-input",{staticClass:"w-75 d-inline-block occurrences-text",attrs:{readonly:"after"!==e.ends,value:e.$t("occurrences")}})],1)],1)]:e._e()],2)}),xd=[],kd=h(26985),Cd=function(){var e=this,t=e._self._c;return e.cycleManager.isWeeklyPeriodSelected()?t("div",{staticClass:"mb-2"},[t("label",{},[e._v(e._s(e.$t(e.weekLabel)))]),t("div",e._l(e.weekdays,(function(n){return t("span",{key:n.day,staticClass:"badge badge-pill weekday mb-1",class:e.cycleManager.weekdayStyle(n),attrs:{"data-test":"day-".concat(n.day)},on:{click:function(t){return e.clickWeekDay(n)}}},[e._v(" "+e._s(e.$t(n.initial))+" ")])})),0),e.repeatOnValidationError?t("small",{staticClass:"text-danger"},[e._v(e._s(e.repeatOnValidationError))]):e._e(),t("small",{staticClass:"form-text text-muted"},[e._v(e._s(e.$t(e.periodicityHelper)))])]):e._e()},Sd=[];function Ed(e){return null===e?"":"string"===typeof e?e:e.isLuxonDateTime?e.toISO():e.toISOString()}function Ad(e,t,n,o,i){var r=Ed(e),s=Ed(t),a="after"===o?i:"",l="ondate"===o?s:"";return"R".concat(a,"/").concat(r,"/").concat(n)+(l?"/"+l:"")}function Md(e,t){return"P".concat(e).concat(t)}var Td,_d,Pd=function(){function e(t,n,o){var i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:[],r=arguments.length>4&&void 0!==arguments[4]?arguments[4]:null,s=arguments.length>5&&void 0!==arguments[5]?arguments[5]:"never",a=arguments.length>6&&void 0!==arguments[6]?arguments[6]:"1";wo(this,e),_e(this,"_startDate",void 0),_e(this,"_repeat",void 0),_e(this,"_periodicityValue",void 0),_e(this,"_selectedWeekdays",void 0),_e(this,"_endDate",void 0),_e(this,"_ends",void 0),_e(this,"_times",void 0),this._startDate=this.sanitizeDate(t),this._repeat=n,this._periodicityValue=o,this._selectedWeekdays=i,this._endDate=this.sanitizeDate(r),this._ends=s,this._times=a}return ko(e,[{key:"startDate",set:function(e){this._startDate=this.sanitizeDate(e)}},{key:"endDate",set:function(e){this._endDate=this.sanitizeDate(e)}},{key:"ends",set:function(e){this._ends=e}},{key:"times",set:function(e){this._times=e}},{key:"repeat",set:function(e){this._repeat=e}},{key:"periodicityValue",set:function(e){this._periodicityValue=e}},{key:"selectedWeekdays",set:function(e){this._selectedWeekdays=e}},{key:"sanitizeDate",value:function(e){return null===e?e:"string"===typeof e?kd.DateTime.fromISO(e).toUTC():e.isLuxonDateTime?e.toUTC():kd.DateTime.fromJSDate(e).toUTC()}},{key:"getFormattedDateWithWeekdayIntervals",value:function(){var e=this,t=Md(this._repeat,this._periodicityValue),n=[this._startDate.toISO()];return this._selectedWeekdays.forEach((function(o){var i=e.getWeekDayDate(o),r=Ad(i,e._endDate,t,e._ends,e._times);n.push(r)})),n.join("|")}},{key:"getWeekDayDate",value:function(e){var t=kd.DateTime.fromISO(this._startDate,{zone:"utc"}),n=t.set({weekday:e});return n.toMillis()<t.toMillis()&&(n=n.plus({days:7})),n.toUTC()}},{key:"dateIntervalString",value:function(){if(this.isWeeklyPeriodSelected()&&this.hasSelectedWeekdays())return this.getFormattedDateWithWeekdayIntervals();var e=Md(this._repeat,this._periodicityValue);return Ad(this._startDate,this._endDate,e,this._ends,this._times)}},{key:"isWeeklyPeriodSelected",value:function(){return"W"===this._periodicityValue}},{key:"hasSelectedWeekdays",value:function(){return this._selectedWeekdays.length>0}},{key:"weekdayStyle",value:function(e){var t=this._startDate.toLocal().weekday;return[e.selected?"badge-primary":"badge-light",{"border border-primary":t===e.day}]}}]),e}(),Od={props:{selectWeekdays:{type:Array,default:function(){return[]}},startDate:{type:String,default:kd.DateTime.local().toUTC().toISO()},endDate:{type:String,default:null},ends:{type:String,default:"never"},times:{type:[Number,String],default:1},periodicityValue:{type:String,required:!0},repeat:{type:[String,Number],default:1},hasEnds:{type:Boolean,default:!0},weekLabel:{type:String,default:"Repeat on"},periodicityHelper:{type:String,default:"Select the day(s) of the week in which to trigger this element"}},data:function(){return{DateTime:kd.DateTime,weekdays:[{day:7,initial:"S",selected:!1},{day:1,initial:"M",selected:!1},{day:2,initial:"T",selected:!1},{day:3,initial:"W",selected:!1},{day:4,initial:"T",selected:!1},{day:5,initial:"F",selected:!1},{day:6,initial:"S",selected:!1}],cycleManager:new Pd(this.startDate,this.repeat,this.periodicityValue,this.selectedWeekdays,this.endDate,this.ends,this.times)}},watch:{startDate:function(e){this.cycleManager.startDate=e},endDate:function(e){this.cycleManager.endDate=e},ends:function(e){this.cycleManager.ends=e},times:function(e){this.cycleManager.times=e},repeat:function(e){this.cycleManager.repeat=e},periodicityValue:function(e){this.cycleManager.periodicityValue=e},selectedWeekdays:function(e){this.cycleManager.selectedWeekdays=e},dateIntervalString:function(){this.update()}},mounted:function(){var e=this;this.selectWeekdays.forEach((function(t){var n=e.weekdays.find((function(e){return e.day===t}));n&&(n.selected=!0)}))},computed:{repeatOnValidationError:function(){var e=this.weekdays.filter((function(e){var t=e.selected;return t})).length;return!this.cycleManager.isWeeklyPeriodSelected()||e>0?null:"You must select at least one day."},dateIntervalString:function(){return this.cycleManager.dateIntervalString()},selectedWeekdays:function(){return this.weekdays.filter((function(e){var t=e.selected;return t})).map((function(e){var t=e.day;return t}))}},methods:{clickWeekDay:function(e){e.selected=!e.selected},update:function(){this.$emit("input",this.dateIntervalString)}},destroyed:function(){this.$emit("input",null)}},Dd=Od,Id=(h(41168),qn(Dd,Cd,Sd,!1,null,"4ae18478",null)),Nd=Id.exports,Rd={day:"D",week:"W",month:"M",year:"Y"},Bd={components:{WeekdaySelect:Nd},props:{value:[Array,String],hasEnds:{type:Boolean,default:!0},hasRepeat:{type:Boolean,default:!0},repeatLabel:{type:String,default:"Repeat every"},weekLabel:{type:String,default:"Repeat on"},startDateHelper:{type:String,default:"Select the date to initially trigger this element"},repeatHelper:{type:String,default:"Set the periodic interval to trigger this element again"},periodicityHelper:{type:String,default:"Select the day(s) of the week in which to trigger this element"}},data:function(){return{DateTime:kd.DateTime,expression:null,startDate:kd.DateTime.local().toUTC().toISO(),repeat:"1",periodicity:"week",ends:"never",endDate:kd.DateTime.local().toUTC().toISO(),times:"1",selectedWeekdays:[]}},created:function(){this.parseTimerConfig(this.value)},watch:{timerExpression:{handler:function(e){this.$emit("input",e)},immediate:!0}},computed:{periodicityValue:function(){return Rd[this.periodicity]},timerExpression:function(){if(this.isWeeklyPeriodSelected()&&this.expression)return this.expression;var e=Md(this.repeat,this.periodicityValue);return Ad(this.startDate,this.endDate,e,this.ends,this.times)}},methods:{isWeeklyPeriodSelected:function(){return"week"===this.periodicity},setStartDate:function(e){this.startDate=kd.DateTime.fromISO(e,{zone:"utc"}).set({seconds:0,milliseconds:0}).toUTC().toISO()},setEndDate:function(e){var t=kd.DateTime.fromISO(this.startDate,{zone:"utc"});this.endDate=kd.DateTime.fromISO(e,{zone:"utc"}).set({hours:t.hour,minutes:t.minute,seconds:0,milliseconds:0}).toUTC().toISO()},parseTimerConfig:function(e){var t,n,o=this;if(null!==(t=e[0])&&void 0!==t&&null!==(n=t.timeCycle)&&void 0!==n&&n.body)try{var i=!1,r=e[0].timeCycle.body.split("|");r.forEach((function(e){if("R"!==e.substr(0,1))o.startDate=e,i=!0;else{var t=e.match(/R(\d*)\/([^/]+)\/P(\d+)(\w)(?:\/([^/]+))?/);if(t){if(o.times=t[1]||"1",o.repeat=t[3],o.periodicity=Object.keys(Rd).find((function(e){return Rd[e]===t[4]})),i||(o.startDate=t[2],i=!0),o.isWeeklyPeriodSelected()){var n=kd.DateTime.fromISO(t[2],{zone:"utc"}).toLocal().weekday;o.selectedWeekdays.push(n)}o.endDate=t[5]||kd.DateTime.local().toUTC().toISO(),o.ends=t[5]?"ondate":t[1]?"after":"never"}}i=!0}))}catch(fa){this.resetTimerExpression()}},resetTimerExpression:function(){this.startDate=kd.DateTime.local().toUTC().toISO(),this.times="1",this.repeat="1",this.periodicity="week",this.endDate=kd.DateTime.local().toUTC().toISO(),this.ends="never",this.expression=null,this.selectedWeekdays=[]}}},Ld=Bd,jd=(h(33383),h(66667),qn(Ld,wd,xd,!1,null,"72709fd0",null)),Fd=jd.exports,zd="processmaker-modeler-start-timer-event",qd=Ea()(No()($c),{id:zd,component:yd,label:So[zd],definition:function(e,t){var n=e.create("bpmn:StartEvent",{name:t(So[zd])});return n.eventDefinitions=[e.create("bpmn:TimerEventDefinition",{timeCycle:e.create("bpmn:Expression",{body:""})})],n},inspectorHandler:function(e,t,n,o){var i=t.definition;for(var r in e)if(i[r]!==e[r])if("eventDefinitions"===r){var s=e[r];if("object"===g(s))continue;var a=i.get(r)[0].timeCycle;if(a&&a.body===s)continue;var l={timeCycle:o.create("bpmn:Expression",{body:s})},c=[o.create("bpmn:TimerEventDefinition",l)];n(t,"eventDefinitions",c)}else n(t,r,e[r])},inspectorConfig:[{items:[{},{component:"FormAccordion",container:!0,config:{label:"Timing Control",icon:"clock",name:"inspector-accordion-start-timer-timing-control"},items:[{component:Fd,config:{label:"Name",helper:"Time expression",name:"eventDefinitions"}}]},ua,na]}]}),Hd=function(){var e=this,t=e._self._c;return t("crown-config",e._g({attrs:{highlighted:e.highlighted,paper:e.paper,graph:e.graph,shape:e.shape,node:e.node,nodeRegistry:e.nodeRegistry,moddle:e.moddle,collaboration:e.collaboration,"process-node":e.processNode,"plane-elements":e.planeElements,"is-rendering":e.isRendering,dropdownData:e.dropdownData}},e.$listeners))},Vd=[],Ud=a.shapes.standard.Circle.extend({markup:[{tagName:"circle",selector:"body"},{tagName:"circle",selector:"body2"},{tagName:"text",selector:"label"},{tagName:"image",selector:"image"},ws("topLeft"),ws("topCenter"),ws("topRight"),ws("bottomLeft"),ws("bottomCenter"),ws("bottomRight")],defaults:a.util.deepSupplement({type:"processmaker.components.nodes.intermediateEvent.Shape",size:{width:36,height:36},attrs:yo(yo(yo(yo(yo(yo({body:{fill:ye,stroke:we},body2:{cx:18,cy:18,r:15,"stroke-width":2,fill:ye,stroke:we},image:{"ref-x":5,"ref-y":5,ref:"circle",width:26,height:26}},xs("topLeft",{ref:"circle","ref-y":-20,"ref-padding-x":0})),xs("topCenter",{ref:"circle","ref-y":-20})),xs("topRight",{ref:"circle","ref-x":26,"ref-y":-20,"ref-padding-x":0},-1)),xs("bottomLeft",{ref:"circle","ref-padding-x":0,"ref-padding-y":-40})),xs("bottomCenter",{ref:"circle","ref-padding-y":-40})),xs("bottomRight",{ref:"circle","ref-x":26,"ref-padding-x":0,"ref-padding-y":-40},-1))},a.shapes.standard.Circle.prototype.defaults)}),Gd={components:{CrownConfig:Zr},props:["graph","node","id","highlighted","nodeRegistry","moddle","paper","collaboration","processNode","planeElements","isRendering"],mixins:[Vs,Je,Bs,as],data:function(){return{shape:null,definition:null,dropdownData:[{label:Do["processmaker-modeler-intermediate-catch-timer-event"],nodeType:"processmaker-modeler-intermediate-catch-timer-event",dataTest:"switch-to-intermediate-timer-catch-event"},{label:Do["processmaker-modeler-intermediate-signal-catch-event"],nodeType:"processmaker-modeler-intermediate-signal-catch-event",dataTest:"switch-to-intermediate-signal-catch-event"},{label:Do["processmaker-modeler-intermediate-signal-throw-event"],nodeType:"processmaker-modeler-intermediate-signal-throw-event",dataTest:"switch-to-intermediate-signal-throw-event"},{label:Do["processmaker-modeler-intermediate-message-catch-event"],nodeType:"processmaker-modeler-intermediate-message-catch-event",dataTest:"switch-to-intermediate-message-catch-event"},{label:Do["processmaker-modeler-intermediate-message-throw-event"],nodeType:"processmaker-modeler-intermediate-message-throw-event",dataTest:"switch-to-intermediate-message-throw-event"},{label:Do["processmaker-modeler-intermediate-conditional-catch-event"],nodeType:"processmaker-modeler-intermediate-conditional-catch-event",dataTest:"switch-to-intermediate-conditional-catch-event"}]}},watch:{"node.definition.name":function(e){this.shape.attr("label/text",e)}},mounted:function(){this.shape=new Ud;var e=this.node.diagram.bounds;this.shape.position(e.get("x"),e.get("y")),this.shape.resize(e.get("width"),e.get("height")),this.shape.attr({label:{text:this.node.definition.get("name"),refY:"130%"}}),this.shape.addTo(this.graph),this.shape.component=this}},Wd=Gd,$d=qn(Wd,Hd,Vd,!1,null,null,null),Xd=$d.exports,Yd=h(39653),Zd=h.n(Yd),Kd={extends:Xd,mixins:[ya],data:function(){return{nodeIcon:Zd()}}},Jd=Kd,Qd=qn(Jd,Td,_d,!1,null,null,null),eu=Qd.exports,tu=function(){var e=this,t=e._self._c;return t("div",[t("label",[e._v(e._s(e.$t("Type")))]),t("b-input-group",[t("b-form-select",{attrs:{value:e.timerPropertyName,"data-test":"intermediateTypeSelect"},on:{change:e.changeType}},[t("option",{attrs:{value:"timeDuration"}},[e._v(e._s(e.$t("Duration")))]),t("option",{attrs:{value:"timeDate"}},[e._v(e._s(e.$t("Date/Time")))]),t("option",{attrs:{value:"timeCycle"}},[e._v(e._s(e.$t("Cycle")))])])],1),t("small",{staticClass:"form-text text-muted"},[e._v(e._s(e.$t(e.typeHelper)))]),t(e.component,{tag:"component",attrs:{"has-ends":!1,"repeat-label":"Wait for","week-label":"Every"},model:{value:e.timerProperty,callback:function(t){e.timerProperty=t},expression:"timerProperty"}})],1)},nu=[],ou=function(){var e=this,t=e._self._c;return t("div",{staticClass:"mt-3"},[t("label",[e._v(e._s(e.$t("Duration")))]),t("b-input-group",[t("b-form-input",{staticClass:"form-control control repeat",attrs:{type:"number",min:"1","data-test":e.repeatInput},model:{value:e.repeat,callback:function(t){e.repeat=t},expression:"repeat"}}),t("b-input-group-append",[t("b-form-select",{model:{value:e.periodicity,callback:function(t){e.periodicity=t},expression:"periodicity"}},e._l(e.periods,(function(n){return t("option",{key:n.name,domProps:{value:n}},[e._v(e._s(e.$t(n.name)))])})),0)],1),t("small",{staticClass:"form-text text-muted"},[e._v(e._s(e.$t("Select the duration of the timer")))])],1)],1)},iu=[],ru=h(10928),su=h.n(ru),au={minute:"minute",hour:"hour",day:"day",week:"week",month:"month"},lu={props:["value","repeatInput"],data:function(){var e=[{name:au.minute,value:"M",isTime:!0},{name:au.hour,value:"H",isTime:!0},{name:au.day,value:"D"},{name:au.week,value:"W"},{name:au.month,value:"M"}];return{repeat:null,periodicity:null,periods:e}},watch:{value:{handler:function(e){this.periodicity=this.getPeriodFromDelayString(e),this.repeat=this.getRepeatNumberFromDelayString(e)},immediate:!0},durationExpression:{handler:function(e){this.$emit("input",e)},immediate:!0}},computed:{durationExpression:function(){return this.periodicity.isTime?"PT".concat(this.repeat).concat(this.periodicity.value):"P".concat(this.repeat).concat(this.periodicity.value)}},methods:{getPeriodFromDelayString:function(e){var t=this.isTimePeriod(e),n=su()(e);if("M"===n){var o=t?au.minute:au.month;return this.periods.find((function(e){var t=e.name;return t===o}))}return this.periods.find((function(e){var t=e.value;return t===n}))},isTimePeriod:function(e){return"T"===e[1]},getRepeatNumberFromDelayString:function(e){var t=e.match(/\d+/);return t&&t[0]}}},cu=lu,du=qn(cu,ou,iu,!1,null,null,null),uu=du.exports,pu=function(){var e=this,t=e._self._c;return t("div",{staticClass:"mt-3"},[t("form-date-picker",{staticClass:"p-0",attrs:{"emit-iso":!0,"data-format":"datetime",label:e.$t("Wait until specific date/time"),"control-class":"form-control",value:e.convertFromUTC(e.value),"data-test":"date-picker",helper:"Select the date to trigger this element"},on:{input:e.emitValue}})],1)},hu=[],fu={data:function(){return{DateTime:kd.DateTime}},props:{value:String},methods:{getTimezone:function(){return"undefined"!==typeof window.ProcessMaker&&window.ProcessMaker.user&&window.ProcessMaker.user.timezone||"local"},convertFromUTC:function(e){return kd.DateTime.fromISO(e,{zone:"utc"}).setZone(this.getTimezone()).toISO()},emitValue:function(e){var t=kd.DateTime.fromISO(e).toUTC().toISO();this.$emit("input",t)}}},mu=fu,gu=qn(mu,pu,hu,!1,null,null,null),vu=gu.exports,bu=function(){var e=this,t=e._self._c;return t("div",{staticClass:"mt-3"},[t("label",[e._v(e._s(e.$t("Recurring loop repeats at time interval set below")))]),t("b-input-group",[t("b-form-input",{staticClass:"form-control control repeat",attrs:{type:"number",min:"1","data-test":e.repeatInput},model:{value:e.repeat,callback:function(t){e.repeat=t},expression:"repeat"}}),t("b-input-group-append",[t("b-form-select",{attrs:{"data-test":"periods"},model:{value:e.periodicity,callback:function(t){e.periodicity=t},expression:"periodicity"}},e._l(e.periods,(function(n){return t("option",{key:n.name,domProps:{value:n}},[e._v(e._s(e.$t(n.name)))])})),0)],1)],1),e.periodicity&&e.periodicity.isWeek?t("weekday-select",{staticClass:"pt-3",attrs:{selectWeekdays:e.selectedWeekdays,periodicityValue:e.periodicity.value,repeat:e.repeat},model:{value:e.expression,callback:function(t){e.expression=t},expression:"expression"}}):e._e()],1)},yu=[],wu={minute:"minute",hour:"hour",day:"day",week:"week",month:"month"},xu={components:{WeekdaySelect:Nd},props:["value","repeatInput"],data:function(){var e=[{name:wu.minute,value:"M",isTime:!0},{name:wu.hour,value:"H",isTime:!0},{name:wu.day,value:"D"},{name:wu.week,value:"W",isWeek:!0},{name:wu.month,value:"M"}];return{DateTime:kd.DateTime,repeat:null,periodicity:null,expression:null,periods:e,selectedWeekdays:null}},watch:{value:{handler:function(e){this.periodicity=this.getPeriodFromDelayString(e),this.repeat=this.getRepeatNumberFromDelayString(e),this.selectedWeekdays=this.getSelectedWeekdaysFromDelayString(e)},immediate:!0},cycleExpression:{handler:function(e){this.$emit("input",e)},immediate:!0}},computed:{cycleExpression:function(){return this.periodicity.isTime?"R/PT".concat(this.repeat).concat(this.periodicity.value):this.periodicity.isWeek&&this.expression?this.expression:"R/P".concat(this.repeat).concat(this.periodicity.value)}},methods:{getSelectedWeekdaysFromDelayString:function(e){var t=e.split("|"),n=[];return t.forEach((function(e){var t=e.match(/R(\d*)\/([^/]+)\/PT?(\d+)(\w)(?:\/([^/]+))?/);if(t){var o=kd.DateTime.fromISO(t[2],{zone:"utc"}).toLocal().weekday;n.push(o)}})),n},getPeriodFromDelayString:function(e){var t=this.isTimePeriod(e),n=su()(e);if("M"===n){var o=t?wu.minute:wu.month;return this.periods.find((function(e){var t=e.name;return t===o}))}return this.periods.find((function(e){var t=e.value;return t===n}))},isTimePeriod:function(e){return"T"===e[3]},getRepeatNumberFromDelayString:function(e){var t=e.match(/PT?(\d+)/);return t?t[1]:1}}},ku=xu,Cu=qn(ku,bu,yu,!1,null,null,null),Su=Cu.exports,Eu="PT1H",Au={timeDuration:"DurationExpression",timeDate:"DateTimeExpression",timeCycle:"CycleExpression"},Mu={props:{value:{type:Object},typeHelper:{type:String,default:"Select the type of delay"}},components:{DurationExpression:uu,DateTimeExpression:vu,CycleExpression:Su},computed:{component:function(){return Au[this.timerPropertyName]},timerProperty:{get:function(){return this.value.body},set:function(e){this.emitChange(this.value.type,e)}},timerPropertyName:function(){return this.value.type}},methods:{changeType:function(e){var t=this.isDelayType(e)||this.isCycleType(e)?Eu:kd.DateTime.local().toUTC().toISO();this.emitChange(e,t)},isDelayType:function(e){return Au[e]===Au.timeDuration},isCycleType:function(e){return Au[e]===Au.timeCycle},emitChange:function(e,t){this.$emit("input",{type:e,body:t})}}},Tu=Mu,_u=qn(Tu,tu,nu,!1,null,null,null),Pu=_u.exports,Ou="processmaker-modeler-intermediate-catch-timer-event",Du={id:Ou,component:eu,bpmnType:"bpmn:IntermediateCatchEvent",control:!0,category:"BPMN",icon:h(58455),label:"Intermediate Event",rank:20,items:[{icon:h(24462),label:"Intermediate Timer Event",control:!0,rank:21,id:"processmaker-modeler-intermediate-catch-timer-event"},{icon:h(48351),label:"Intermediate Signal Catch Event",control:!0,rank:22,id:"processmaker-modeler-intermediate-signal-catch-event"},{icon:h(20894),label:"Intermediate Signal Throw Event",control:!0,rank:23,id:"processmaker-modeler-intermediate-signal-throw-event"},{icon:h(5294),label:"Intermediate Message Catch Event",control:!0,rank:24,id:"processmaker-modeler-intermediate-message-catch-event"},{icon:h(16383),label:"Intermediate Message Throw Event",control:!0,rank:25,id:"processmaker-modeler-intermediate-message-throw-event"},{icon:h(74726),label:"Intermediate Conditional Catch Event",control:!0,rank:26,id:"processmaker-modeler-intermediate-conditional-catch-event"}],definition:function(e,t){return e.create("bpmn:IntermediateCatchEvent",{name:t(Do[Ou]),eventDefinitions:[e.create("bpmn:TimerEventDefinition",{timeDuration:e.create("bpmn:Expression",{body:Eu})})]})},diagram:function(e){return e.create("bpmndi:BPMNShape",{bounds:e.create("dc:Bounds",{height:36,width:36,x:null,y:null})})},inspectorData:function(e){return Object.entries(e.definition).reduce((function(e,t){var n=mt(t,2),o=n[0],i=n[1];if("eventDefinitions"===o){var r=Object.keys(i[0])[1],s=i[0][r].body;e[o]={type:r,body:s}}else e[o]=i;return e}),{})},inspectorHandler:function(e,t,n,o){var i=t.definition;for(var r in e)if(i[r]!==e[r])if("eventDefinitions"===r){var s=e[r],a=s.type,l=s.body,c=i.get(r)[0][a];if(c&&c.body===l)continue;var d=_e({},a,o.create("bpmn:Expression",{body:l})),u=[o.create("bpmn:TimerEventDefinition",d)];n(t,"eventDefinitions",u)}else n(t,r,e[r])},inspectorConfig:[{name:Do[Ou],items:[{component:"FormAccordion",container:!0,config:{initiallyOpen:!0,label:"Properties",icon:"cog",name:"inspector-accordion-intermediate-timer-config"},items:[{component:"FormInput",config:Ys}]},{component:"FormAccordion",container:!0,config:{label:"Timing Control",icon:"clock",name:"inspector-accordion-intermediate-timer-event-timing-control"},items:[{component:Pu,config:{label:"Name",helper:"Time expression",name:"eventDefinitions"}}]},ua,na]}]};function Iu(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"#000",t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"#fff";return{image:{width:20,height:20,y:3,x:3},body:{stroke:e,strokeWidth:t,fill:n},body2:{stroke:e,strokeWidth:t,fill:n}}}var Nu,Ru,Bu,Lu,ju,Fu,zu,qu,Hu,Vu,Uu=h(89454),Gu=h.n(Uu),Wu={extends:Xd,mixins:[ya],data:function(){return{nodeIcon:Gu()}},mounted:function(){var e=Iu(we,2,ye);this.shape.attr(e)}},$u=Wu,Xu=qn($u,Nu,Ru,!1,null,null,null),Yu=Xu.exports,Zu={id:"processmaker-modeler-intermediate-message",component:Xd,bpmnType:"bpmn:IntermediateEvent",control:!0,category:"BPMN",label:"Intermediate Message Event",definition:function(e,t){return e.create("bpmn:IntermediateEvent",{name:t("Intermediate Message Event"),eventDefinitions:[e.create("bpmn:MessageEventDefinition",{})]})},diagram:function(e){return e.create("bpmndi:BPMNShape",{bounds:e.create("dc:Bounds",{height:36,width:36,x:null,y:null})})},inspectorConfig:[{name:"Intermediate Message Event",items:[{component:"FormAccordion",container:!0,config:{initiallyOpen:!0,label:"Properties",icon:"cog",name:"inspector-accordion-intermediate-message-event"},items:[{component:"FormInput",config:Ys}]},ua,na]}]},Ku="processmaker-modeler-intermediate-message-catch-event",Ju=Ea()(No()(Zu),yo(yo({},sc),{},{id:Ku,component:Yu,control:!1,bpmnType:"bpmn:IntermediateCatchEvent",label:Do[Ku],definition:function(e,t){return e.create("bpmn:IntermediateCatchEvent",{name:t(Do[Ku]),eventDefinitions:[e.create("bpmn:MessageEventDefinition")]})},inspectorConfig:[{items:[{items:[{},oc("Message that will catch this intermediate event")]}]}]})),Qu=h(74225),ep=h.n(Qu),tp={extends:Xd,mixins:[ya],data:function(){return{nodeIcon:ep()}},mounted:function(){this.shape.attr({image:{"ref-x":7,"ref-y":5,width:22,height:22}})}},np=tp,op=qn(np,Bu,Lu,!1,null,null,null),ip=op.exports,rp={id:"processmaker-modeler-intermediate-event",component:Xd,bpmnType:"bpmn:IntermediateEvent",control:!0,category:"BPMN",label:"Intermediate Event",definition:function(e,t){return e.create("bpmn:IntermediateEvent",{name:t("Intermediate Event")})},diagram:function(e){return e.create("bpmndi:BPMNShape",{bounds:e.create("dc:Bounds",{height:36,width:36,x:null,y:null})})},inspectorConfig:[{name:"Intermediate Event",items:[{component:"FormAccordion",container:!0,config:{initiallyOpen:!0,label:"Properties",icon:"cog",name:"inspector-accordion-intermediate-gateway-config"},items:[{component:"FormInput",config:Ys}]},ua,na]}]},sp="processmaker-modeler-intermediate-signal-catch-event",ap=Ea()(No()(rp),yo(yo({},kc),{},{id:sp,component:ip,control:!1,bpmnType:"bpmn:IntermediateCatchEvent",label:Do[sp],definition:function(e,t){return e.create("bpmn:IntermediateCatchEvent",{name:t(Do[sp]),eventDefinitions:[e.create("bpmn:SignalEventDefinition")]})},inspectorConfig:[{items:[{items:[{},xc("Signal that will catch this intermediate event",!1),{component:"FormInput",config:od}]}]}]})),lp=h(98358),cp=h.n(lp),dp={extends:Xd,mixins:[ya],props:["moddle","rootElements","id"],data:function(){return{message:this.moddle.create("bpmn:Message",{id:"".concat(this.id,"_message"),name:"".concat(this.id,"_message")}),nodeIcon:cp()}},methods:{addMessageRef:function(){this.node.definition.get("eventDefinitions")[0].messageRef?this.message=this.node.definition.get("eventDefinitions")[0].messageRef:(this.message=this.moddle.create("bpmn:Message",{id:"".concat(this.id,"_message"),name:"".concat(this.id,"_message")}),this.rootElements.push(this.message),this.node.definition.get("eventDefinitions")[0].messageRef=this.message)}},mounted:function(){this.shape.attr({image:{width:22,height:20,y:3,x:2}}),this.addMessageRef()},destroyed:function(){Gr()(this.rootElements,this.message),bn.commit("removeMessageRef",this.message)}},up=dp,pp=qn(up,ju,Fu,!1,null,null,null),hp=pp.exports,fp="processmaker-modeler-intermediate-message-throw-event",mp=Ea()(No()(Zu),yo(yo({},sc),{},{id:fp,component:hp,control:!1,bpmnType:"bpmn:IntermediateThrowEvent",label:Do[fp],icon:h(16383),definition:function(e,t){return e.create("bpmn:IntermediateThrowEvent",{name:t(Do[fp]),eventDefinitions:[e.create("bpmn:MessageEventDefinition")]})},inspectorConfig:[{items:[{items:[{},oc("Select the message reference that this element throws")]}]}]})),gp=h(67471),vp=h.n(gp),bp={extends:Xd,mixins:[ya],props:["moddle","rootElements","id"],data:function(){return{nodeIcon:vp()}},mounted:function(){this.shape.attr({image:{"ref-x":7,"ref-y":5,width:22,height:22}})}},yp=bp,wp=qn(yp,zu,qu,!1,null,null,null),xp=wp.exports,kp="processmaker-modeler-intermediate-signal-throw-event",Cp=Ea()(No()(rp),yo(yo({},kc),{},{id:kp,component:xp,control:!1,bpmnType:"bpmn:IntermediateThrowEvent",label:Do[kp],definition:function(e,t){return e.create("bpmn:IntermediateThrowEvent",{name:t(Do[kp]),eventDefinitions:[e.create("bpmn:SignalEventDefinition")]})},inspectorConfig:[{items:[{items:[{},xc("Select the signal reference that this element throws")]}]}]})),Sp=h(94081),Ep=h.n(Sp),Ap={extends:Xd,mixins:[ya],data:function(){return{nodeIcon:Ep()}},mounted:function(){var e=this.node.diagram.bounds;this.shape.attr({image:{"ref-x":9,"ref-y":9,width:e.get("width")-18,height:e.get("height")-18}})}},Mp=Ap,Tp=qn(Mp,Hu,Vu,!1,null,null,null),_p=Tp.exports;function Pp(){return[{component:"FormInput",config:{label:"Condition",name:"condition",helper:"Expression to evaluate condition"}}]}var Op={inspectorData:function(e){return Object.entries(e.definition).reduce((function(e,t){var n=mt(t,2),o=n[0],i=n[1];return"eventDefinitions"===o?e.condition=i[0].get("condition").body:e[o]=i,e}),{})},inspectorHandler:function(e,t,n){for(var o in Ma()(e,["$type","eventDefinitions"]))t.definition[o]!==e[o]&&("condition"===o?t.definition.get("eventDefinitions")[0].get("condition").body=e[o]:n(t,o,e[o]))}},Dp="processmaker-modeler-intermediate-conditional-catch-event",Ip=Ea()(No()(rp),yo(yo({},Op),{},{id:Dp,component:_p,control:!1,bpmnType:"bpmn:IntermediateCatchEvent",label:Do[Dp],definition:function(e,t){return e.create("bpmn:IntermediateCatchEvent",{name:t(Do[Dp]),eventDefinitions:[e.create("bpmn:ConditionalEventDefinition",{condition:e.create("bpmn:FormalExpression",{body:""})})]})},inspectorConfig:[{items:[{items:[{}].concat(m(Pp()))}]}]})),Np=function(){var e=this,t=e._self._c;return t("crown-config",e._g({attrs:{highlighted:e.highlighted,paper:e.paper,graph:e.graph,shape:e.shape,node:e.node,nodeRegistry:e.nodeRegistry,moddle:e.moddle,collaboration:e.collaboration,"process-node":e.processNode,"plane-elements":e.planeElements,"is-rendering":e.isRendering,"boundary-event-dropdown-data":e.boundaryEventDropdownData,"dropdown-data":e.dropdownData,showCustomIconPicker:!0,iconName:this.iconName},on:{"set-custom-icon-name":e.setCustomIconName,"reset-custom-icon-name":e.resetCustomIconName}},e.$listeners))},Rp=[],Bp=a.shapes.standard.Rectangle.extend({markup:[{tagName:"rect",selector:"body"},{tagName:"text",selector:"label"},{tagName:"image",selector:"image"},ws("topLeft"),ws("topCenter"),ws("topRight"),ws("bottomLeft"),ws("bottomCenter"),ws("bottomRight")],defaults:a.util.deepSupplement({type:"processmaker.components.nodes.task.Shape",size:{width:100,height:60},attrs:yo(yo(yo(yo(yo(yo({image:{"ref-x":4,"ref-y":4,ref:"rect",width:16,height:16,"data-test":"nodeIcon"}},xs("topLeft",{"ref-y":4,ref:"rect"})),xs("topCenter",{"ref-y":4,ref:"rect"})),xs("topRight",{"ref-y":4,"ref-x":96,ref:"rect"},-1)),xs("bottomLeft",{ref:"rect"})),xs("bottomCenter",{ref:"rect"})),xs("bottomRight",{"ref-x":96,ref:"rect"},-1))},a.shapes.standard.Rectangle.prototype.defaults)}),Lp=76,jp=116,Fp={data:function(){return{iconName:""}},methods:{setCustomIconName:function(e){this.iconName=e},resetCustomIconName:function(){this.setCustomIconName("")},setCustomIcon:function(e){this.shape&&this.shape.attr("image/xlink:href",ba(atob(e),this.node))}},mounted:function(){this.node.definition.get("customIcon")&&this.setCustomIcon(this.node.definition.get("customIcon"))}},zp=10,qp=[{label:"Boundary Timer Event",nodeType:"processmaker-modeler-boundary-timer-event",dataTest:"add-boundary-timer-event"},{label:"Boundary Error Event",nodeType:"processmaker-modeler-boundary-error-event",dataTest:"add-boundary-error-event"},{label:"Boundary Signal Event",nodeType:"processmaker-modeler-boundary-signal-event",dataTest:"add-boundary-signal-event"},{label:"Boundary Conditional Event",nodeType:"processmaker-modeler-boundary-conditional-event",dataTest:"add-boundary-conditional-event"},{label:"Boundary Message Event",nodeType:"processmaker-modeler-boundary-message-event",dataTest:"add-boundary-message-event"}],Hp=qp,Vp=h.p+"img/sequential.f86ad08b.svg",Up=h.p+"img/parallel.cf1d1995.svg",Gp=h.p+"img/loop.00441d9f.svg",Wp="bpmn:StandardLoopCharacteristics",$p="bpmn:MultiInstanceLoopCharacteristics";function Xp(e,t,n,o){var i=e.get("loopCharacteristics"),r=[Wp,$p];if(i&&r.includes(i.$type))if(i.$type!==Wp){var s=i.isSequential?Vp:Up;n(t.bottomCenter,"loopCharacteristics",s)}else n(t.bottomCenter,"loopCharacteristics",Gp);else o(t.bottomCenter,"loopCharacteristics")}var Yp=h.p+"img/compensation.495ae0a2.svg";function Zp(e,t,n,o){e.isForCompensation?n(t.bottomCenter,"compensation",Yp):o(t.bottomCenter,"compensation")}var Kp,Jp,Qp=15,eh=2*ys,th={components:{CrownConfig:Zr},props:["graph","node","id","highlighted","nodeRegistry","moddle","paper","collaboration","processNode","planeElements","isRendering"],mixins:[Vs,Je,Bs,as,Fp],data:function(){return{shape:null,definition:null,dropdownData:[{label:To["processmaker-modeler-task"],nodeType:"processmaker-modeler-task",dataTest:"switch-to-user-task"},{label:To["processmaker-modeler-manual-task"],nodeType:"processmaker-modeler-manual-task",dataTest:"switch-to-manual-task"},{label:To["processmaker-modeler-script-task"],nodeType:"processmaker-modeler-script-task",dataTest:"switch-to-script-task"},{label:To["processmaker-modeler-call-activity"],nodeType:"processmaker-modeler-call-activity",dataTest:"switch-to-sub-process"}],boundaryEventDropdownData:Hp,anchorPointFunction:at}},computed:{hasTaskMarker:function(){return!!this.shape.attr("image/xlink:href")}},watch:{"node.definition.name":function(e){var t=this.node.diagram.bounds.width;this.shape.attr("label/text",a.util.breakText(e,{width:t}));var n=this.shape.size(),o=n.height,i=this.calculateSizeOnGrid(),r=this.useTaskHeight(i)?Lp:i;o!==r&&(this.node.diagram.bounds.height=r,this.shape.resize(t,r),this.recalcMarkersAlignment())},"node.definition.isForCompensation":function(){Zp(this.node.definition,this.markers,this.$set,this.$delete)},"node.definition":{deep:!0,handler:function(){Xp(this.node.definition,this.markers,this.$set,this.$delete)}}},methods:{getElementsUnderArea:function(e){var t=e.getBBox(),n=t.x,o=t.y,i=t.width,r=t.height,s={x:n,y:o,width:i,height:r};return this.graph.findModelsInArea(s)},calculateSizeOnGrid:function(){var e=zp-Lp%zp,t=Math.floor(this.shapeView.selectors.label.getBBox().height),n=t+Qp+eh,o=this.paperManager.ceilToNearestGridMultiple(n)-e;return this.middleIsOddNumber(o)&&(o+=zp),o},useTaskHeight:function(e){return e<Lp||!this.node.definition.name},middleIsOddNumber:function(e){return 1===Math.abs(e/2%2)}},mounted:function(){this.shape=new Bp;var e=this.node.diagram.bounds;this.shape.position(e.x,e.y),this.shape.resize(e.width,e.height),Zp(this.node.definition,this.markers,this.$set,this.$delete),Xp(this.node.definition,this.markers,this.$set,this.$delete),this.shape.attr({body:{rx:8,ry:8},label:{text:a.util.breakText(this.node.definition.get("name"),{width:e.width}),fill:"black"}}),this.shape.addTo(this.graph),this.shape.component=this}},nh=th,oh=qn(nh,Np,Rp,!1,null,null,null),ih=oh.exports,rh=h(95514),sh=h.n(rh),ah={extends:ih,mixins:[ya],data:function(){return{nodeIcon:sh()}}},lh=ah,ch=qn(lh,Kp,Jp,!1,null,null,null),dh=ch.exports,uh=function(){var e=this,t=e._self._c;return t("div",[t("b-form-group",[t("b-form-checkbox",{attrs:{"data-test":"for-compensation",name:"for-compensation"},model:{value:e.isForCompensation,callback:function(t){e.isForCompensation=t},expression:"isForCompensation"}},[e._v(e._s(e.$t("For Compensation")))])],1)],1)},ph=[],hh={props:{value:{type:Object,default:function(){return{isForCompensation:!1}}}},name:"MarkerFlags",data:function(){return{isForCompensation:this.value.isForCompensation}},watch:{isForCompensation:function(e){this.$emit("input",{isForCompensation:e})}}},fh=hh,mh=qn(fh,uh,ph,!1,null,"66aabb37",null),gh=mh.exports,vh={component:"FormAccordion",container:!0,config:{initiallyOpen:!1,label:"Advanced",icon:"cogs",name:"advanced-accordion"},items:[{component:ta,config:ns},{component:gh,name:"taskMarkers",config:{label:"Marker Flags",name:"markerFlags",style:"display:none"}}]},bh=function(){var e=this,t=e._self._c;return t("div",[t("b-form-group",{attrs:{label:e.$t("Loop Mode")}},[t("b-form-select",{attrs:{id:""},on:{change:e.changeLoopType},model:{value:e.loopType,callback:function(t){e.loopType=t},expression:"loopType"}},e._l(e.loopOptions,(function(n){return t("option",{key:n.text,domProps:{value:n.value}},[e._v(e._s(e.$t(n.text)))])})),0)],1),"loop"===e.loopType?[t("b-form-group",{attrs:{label:e.$t("Maximum Iterations")}},[t("b-form-input",{attrs:{type:"number",min:"0",step:"1","data-cy":"loopMaximum"},on:{input:e.changeLoopMaximum},model:{value:e.loopMaximum,callback:function(t){e.loopMaximum=t},expression:"loopMaximum"}}),t("small",{staticClass:"form-text text-muted"},[e._v(e._s(e.$t("Leave empty to continue until exit condition is satisfied")))])],1),t("b-form-group",{attrs:{label:e.$t("Exit Condition")}},[t("textarea",{directives:[{name:"model",rawName:"v-model",value:e.loopCondition,expression:"loopCondition"}],ref:"specialAssignmentsInput",staticClass:"form-control special-assignment-input",attrs:{"aria-label":e.$t("FEEL Syntax"),placeholder:"FEEL Syntax","data-cy":"loopCondition"},domProps:{value:e.loopCondition},on:{input:[function(t){t.target.composing||(e.loopCondition=t.target.value)},e.changeLoopCondition]}}),e._v(" "),t("small",{staticClass:"form-text text-muted"},[e._v(e._s(e.$t("When FEEL expression evaluates to true then exit loop")))])])]:e._e(),"parallel_mi"===e.loopType||"sequential_mi"===e.loopType?["inputData"===e.multiType?t("b-form-group",{attrs:{id:"group-inputData",label:e.$t("Request Variable Array"),"label-for":"inputData",description:e.$t("Non-array data will result in an error.")}},[t("b-form-input",{attrs:{id:"inputData",type:"text",placeholder:e.$t("Request Variable Name")},on:{input:e.changeInputData},model:{value:e.inputData,callback:function(t){e.inputData=t},expression:"inputData"}})],1):e._e(),"sequential_mi"===e.loopType?t("b-form-group",{attrs:{id:"group-exit-condition",label:e.$t("Exit Condition"),"label-for":"exit-condition",description:e.$t("When the FEEL Expression evaluates to true then exit the loop")}},[t("b-form-textarea",{attrs:{id:"exit-condition",placeholder:e.$t("FEEL Syntax")},on:{input:e.changeCompletionCondition},model:{value:e.completionCondition,callback:function(t){e.completionCondition=t},expression:"completionCondition"}})],1):e._e(),t("b-form-group",{attrs:{id:"group-outputData",label:e.$t("Output Data Variable"),"label-for":"outputData",description:e.$t("Specifies the output request data variable array, which will be produced as a result of the multi-instance.")}},[t("b-form-input",{attrs:{id:"outputData",type:"text",placeholder:e.$t("Request Variable Name")},on:{input:e.changeOutputData},model:{value:e.outputData,callback:function(t){e.outputData=t},expression:"outputData"}})],1)]:e._e()],2)},yh=[],wh={props:{value:{type:Object,default:function(){return{loopCharacteristics:null,ioSpecification:null}}}},name:"LoopCharacteristics",data:function(){return{loopOptions:[{text:this.$t("No Loop Mode"),value:"no_loop"},{text:this.$t("Loop"),value:"loop"},{text:this.$t("Multi-Instance (Parallel)"),value:"parallel_mi"},{text:this.$t("Multi-Instance (Sequential)"),value:"sequential_mi"}],showAdvanced:!1,previous:{loopCardinality:"3",completionCondition:null,inputData:null,outputData:null,inputDataItem:null},local:{loopCharacteristics:{$type:null,isSequential:!1},loopMaximum:0,loopCondition:null,ioSpecification:{dataInputs:[]}},loopType:null,multiType:null,loopCardinality:null,completionCondition:null,inputData:null,inputDataItem:null,outputData:null,outputDataItem:null,loopMaximum:0,loopCondition:null}},mounted:function(){this.loadData()},watch:{value:{deep:!0,handler:function(e){(0,Un.isEqual)(this.local,e)||this.loadData()}}},methods:{changeLoopMaximum:function(e){this.setLoopMaximum(e),this.saveData()},changeLoopCondition:function(){this.setLoopCondition(this.loopCondition),this.saveData()},changeLoopType:function(e){this.setLoopCharacteristics(e),this.saveData()},changeMultiType:function(e){this.setMultiType(e),this.saveData()},changeLoopCardinality:function(e){this.setLoopCardinality(e),this.saveData()},changeCompletionCondition:function(e){this.setCompletionCondition(e),this.saveData()},changeInputData:function(e){this.setLoopDataInputRef(e),this.saveData()},changeInputDataItem:function(e){this.setInputDataItem(e),this.saveData()},changeOutputData:function(e){this.setLoopDataOutputRef(e),this.saveData()},changeOutputDataItem:function(e){this.setOutputDataItem(e),this.saveData()},loadData:function(){this.$set(this,"local",(0,Un.cloneDeep)(this.value)),this.loopType=this.getLoopCharacteristics(),this.multiType=this.getMultiType(),this.loopCardinality=this.getLoopCardinality(),this.completionCondition=this.getCompletionCondition(),this.inputData=this.getLoopDataInputRef(),this.inputDataItem=this.getInputDataItem(),this.outputData=this.getLoopDataOutputRef(),this.outputDataItem=this.getOutputDataItem(),this.previous.inputData=this.inputData,this.previous.outputData=this.outputData,this.previous.loopCardinality=this.loopCardinality,this.loopMaximum=this.getLoopMaximum(),this.loopCondition=this.getLoopCondition()},saveData:function(){(0,Un.isEqual)(this.local,this.value)||this.$emit("input",(0,Un.cloneDeep)(this.local))},getOutputDataItem:function(){return this.local.loopCharacteristics&&this.local.loopCharacteristics.outputDataItem?this.local.loopCharacteristics.outputDataItem.name:null},setOutputDataItem:function(e){this.local.loopCharacteristics.outputDataItem={$type:"bpmn:DataInput",isCollection:!0,name:e}},getLoopDataOutputRef:function(){var e;return this.local.loopCharacteristics&&this.local.loopCharacteristics.loopDataOutputRef?null===(e=this.local.ioSpecification)||void 0===e?void 0:e.dataOutputs[0].name:null},setLoopDataOutputRef:function(e){this.local.ioSpecification||this.initIoSpecification();var t=this.local.ioSpecification.dataOutputs[0]||{$type:"bpmn:DataOutput",id:"".concat(this.local.id,"_output_1"),isCollection:!0,name:e};t.name=e,this.local.ioSpecification.dataOutputs=[t],this.local.ioSpecification.outputSets[0].dataOutputRefs=[t.id],this.local.loopCharacteristics.loopDataOutputRef=t.id},getInputDataItem:function(){return this.local.loopCharacteristics&&this.local.loopCharacteristics.inputDataItem?this.local.loopCharacteristics.inputDataItem.name:null},setInputDataItem:function(e){this.local.loopCharacteristics.inputDataItem={$type:"bpmn:DataInput",isCollection:!0,name:e}},getLoopDataInputRef:function(){var e;return this.local.loopCharacteristics&&this.local.loopCharacteristics.loopDataInputRef?null===(e=this.local.ioSpecification)||void 0===e?void 0:e.dataInputs[0].name:null},setLoopDataInputRef:function(e){var t={$type:"bpmn:DataInput",id:"".concat(this.local.id,"_input_1"),isCollection:!0,name:e};this.local.ioSpecification||this.initIoSpecification(),this.local.ioSpecification.dataInputs=[t],this.local.ioSpecification.inputSets[0].dataInputRefs=[t.id],this.local.loopCharacteristics.loopDataInputRef=t.id},initIoSpecification:function(){this.local.ioSpecification={$type:"bpmn:InputOutputSpecification",dataInputs:[],dataOutputs:[],inputSets:[{$type:"bpmn:InputSet",dataInputRefs:[]}],outputSets:[{$type:"bpmn:OutputSet",dataOutputRefs:[]}]}},getLoopCardinality:function(){return this.local.loopCharacteristics&&this.local.loopCharacteristics.loopCardinality?this.local.loopCharacteristics.loopCardinality.body:null},getCompletionCondition:function(){return this.local.loopCharacteristics&&this.local.loopCharacteristics.completionCondition?this.local.loopCharacteristics.completionCondition.body:null},setLoopCardinality:function(e){this.local.loopCharacteristics.loopCardinality={$type:"bpmn:Expression",body:e}},setCompletionCondition:function(e){this.local.loopCharacteristics.completionCondition={$type:"bpmn:Expression",body:e}},getMultiType:function(){return this.local.loopCharacteristics?void 0!==this.local.loopCharacteristics.loopCardinality?"loopCardinality":"inputData":null},setMultiType:function(e){"loopCardinality"===e?(this.local.loopCharacteristics.loopCardinality={$type:"bpmn:Expression",body:this.previous.loopCardinality||"3"},this.local.loopCharacteristics.completionCondition={$type:"bpmn:Expression",body:this.previous.completionCondition||""},this.previous.inputData=this.inputData,this.previous.outputData=this.outputData,this.previous.inputDataItem=this.inputDataItem,delete this.local.loopCharacteristics.loopDataInputRef,delete this.local.loopCharacteristics.inputDataItem,this.setLoopDataOutputRef(this.previous.outputData||"output_array_".concat(this.local.id))):(this.previous.loopCardinality=this.loopCardinality,this.previous.completionCondition=this.completionCondition,this.previous.outputData=this.outputData,delete this.local.loopCharacteristics.loopCardinality,delete this.local.loopCharacteristics.completionCondition,this.local.loopCharacteristics.loopDataInputRef="",this.setLoopDataInputRef(this.previous.inputData||"source_array"),this.setLoopDataOutputRef(this.previous.outputData||"output_array_".concat(this.local.id)),this.setInputDataItem(this.previous.inputDataItem||"")),this.loopCardinality=this.getLoopCardinality(),this.completionCondition=this.getCompletionCondition(),this.inputData=this.getLoopDataInputRef(),this.outputData=this.getLoopDataOutputRef()},getLoopCharacteristics:function(){return this.local.loopCharacteristics?"bpmn:StandardLoopCharacteristics"===this.local.loopCharacteristics.$type?"loop":"bpmn:MultiInstanceLoopCharacteristics"===this.local.loopCharacteristics.$type?this.local.loopCharacteristics.isSequential?"sequential_mi":"parallel_mi":"no_loop":"no_loop"},setLoopCharacteristics:function(e){switch(this.local.loopCharacteristics||(this.local.loopCharacteristics={}),e){case"no_loop":this.local.loopCharacteristics=void 0;break;case"loop":this.local.loopCharacteristics.$type="bpmn:StandardLoopCharacteristics";break;case"parallel_mi":this.local.loopCharacteristics.$type="bpmn:MultiInstanceLoopCharacteristics",this.local.loopCharacteristics.isSequential=!1,this.multiType||(this.multiType="inputData");break;case"sequential_mi":this.local.loopCharacteristics.$type="bpmn:MultiInstanceLoopCharacteristics",this.local.loopCharacteristics.isSequential=!0,this.multiType||(this.multiType="inputData");break}},setLoopMaximum:function(e){e||(e=null),this.local.loopCharacteristics.loopMaximum=e},getLoopMaximum:function(){return this.local.loopCharacteristics?this.local.loopCharacteristics.loopMaximum:null},setLoopCondition:function(e){this.local.loopCharacteristics.loopCondition={$type:"bpmn:Expression",body:e}},getLoopCondition:function(){return this.local.loopCharacteristics&&this.local.loopCharacteristics.loopCondition?this.local.loopCharacteristics.loopCondition.body:null}}},xh=wh,kh=qn(xh,bh,yh,!1,null,null,null),Ch=kh.exports;h(19601),h(36210);function Sh(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}function Eh(e,t,n){Sh(e,t),t.set(e,n)}function Ah(e,t){return t.get?t.get.call(e):t.value}function Mh(e,t,n){if(!t.has(e))throw new TypeError("attempted to "+n+" private field on non-instance");return t.get(e)}function Th(e,t){var n=Mh(e,t,"get");return Ah(e,n)}function _h(e,t){if(e!==t)throw new TypeError("Private static access of wrong provenance")}function Ph(e,t){if(void 0===e)throw new TypeError("attempted to "+t+" private static field before its declaration")}function Oh(e,t,n){return _h(e,t),Ph(n,"get"),Ah(e,n)}function Dh(e,t,n){if(t.set)t.set.call(e,n);else{if(!t.writable)throw new TypeError("attempted to set read only private field");t.value=n}}function Ih(e,t,n,o){return _h(e,t),Ph(n,"set"),Dh(e,n,o),o}h(24603),h(28450),h(88386),h(39714),h(4129);var Nh=new WeakMap,Rh=new WeakMap,Bh=new WeakMap,Lh=function(){function e(t){wo(this,e),Eh(this,Nh,{writable:!0,value:function(){var t,n=e.prefix+Oh(e,e,jh);return Ih(e,e,jh,(t=Oh(e,e,jh),t++,t)),n}}),Eh(this,Rh,{writable:!0,value:function(){var t,n=e.prefix+Oh(e,e,Fh)+"_di";return Ih(e,e,Fh,(t=Oh(e,e,Fh),t++,t)),n}}),Eh(this,Bh,{writable:!0,value:function(){var t,n=e.processPrefix+Oh(e,e,zh);return Ih(e,e,zh,(t=Oh(e,e,zh),t++,t)),n}}),this.definitions=t,this.refreshLastIdCounter(),this.refreshLastDiagramIdCounter(),this.refreshLastProcessIdCounter()}return ko(e,[{key:"findById",value:function(e){var t=this,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.definitions.rootElements,o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:[];if(!(o.indexOf(n)>-1)){var i;if(n instanceof Array)o.push(n),n.find((function(n){return i=t.findById(e,n,o)}));else if(n instanceof Object&&n.$type){if(o.push(n),n.id===e)return n;Object.getOwnPropertyNames(n).find((function(r){return i=!(n[r]instanceof Function)&&"$"!==r.substring(0,1)&&t.findById(e,n[r],o)}))}return i}}},{key:"matchIds",value:function(e,t){var n=this,o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:[],i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:0;if(o.indexOf(t)>-1)return i;if(t instanceof Array)o.push(t),t.forEach((function(t){return i=n.matchIds(e,t,o,i)}));else if(t instanceof Object){if(o.push(t),t.id){var r=String(t.id).match(e),s=r?parseInt(r[1]):0;s>i&&(i=s)}Object.getOwnPropertyNames(t).forEach((function(r){t[r]instanceof Function||"$"===r.substring(0,1)||(i=n.matchIds(e,t[r],o,i))}))}return i}},{key:"refreshLastIdCounter",value:function(){var t=this.matchIds(new RegExp("^".concat(e.prefix,"(\\d+)$")),this.definitions.rootElements);Ih(e,e,jh,t+1)}},{key:"getCounter",value:function(){return this.refreshLastIdCounter(),Oh(e,e,jh)}},{key:"refreshLastDiagramIdCounter",value:function(){var t=this.matchIds(new RegExp("^".concat(e.prefix,"(\\d+)_di$")),this.definitions.diagrams);Ih(e,e,Fh,t+1)}},{key:"refreshLastProcessIdCounter",value:function(){var t=this.matchIds(new RegExp("^".concat(e.processPrefix,"(\\d+)$")),this.definitions.rootElements);Ih(e,e,zh,t+1)}},{key:"generate",value:function(){var e=Th(this,Nh).call(this),t=Th(this,Rh).call(this);return[e,t]}},{key:"generateProcessId",value:function(){return Th(this,Bh).call(this)}}]),e}();_e(Lh,"prefix","node_"),_e(Lh,"processPrefix","Process_");var jh={writable:!0,value:1},Fh={writable:!0,value:1},zh={writable:!0,value:1},qh=null;function Hh(e){return qh||(qh=new Lh(e)),qh}var Vh=function(){function e(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};wo(this,e),this.index=window.NODE_INSPECTOR_FIRST_INDEX||(new Date).getTime(),this.definitions=t,this.nodeIdGenerator=Hh(this.definitions),this.options=Object.assign({prefix:this.nodeIdGenerator.generate()[0]},n),this.createdModdleNodes={}}return ko(e,[{key:"getDefinitionProps",value:function(e){var t=this;return e instanceof Array?e.map((function(e){return t.getDefinitionProps(e)})):e instanceof Object?Object.getOwnPropertyNames(e).reduce((function(n,o){if(e[o]instanceof Function)return n;var i="Ref"===o.substr(o.length-3)||"Refs"===o.substr(o.length-4);return e[o]instanceof Object&&e[o].id&&i?n[o]=Object&&e[o].id:e[o]instanceof Array&&i?n[o]=e[o].filter((function(e){return e})).map((function(e){return e.id})):("$type"===o||"$"!==o.substr(0,1)&&"__"!==o.substr(0,2))&&(n[o]=t.getDefinitionProps(e[o])),n}),{}):e}},{key:"setDefinitionProps",value:function(e,t,n,o,i){var r=this;if(void 0!==e){if(e instanceof Array)e=e.map((function(e){return r.setDefinitionProps(e,t,n)}));else if(e instanceof Object)try{e=Object.keys(Ma()(e,"$type","$config","markerFlags")).reduce((function(o,i){var s=r.setDefinitionProps(e[i],t,n,void 0,i);return null!==s&&void 0!==s?o[i]=s:void 0===s&&delete o[i],o}),o||this.createModdleNode(n,e))}catch(s){throw'Unable to create moddle node of type "'.concat(e.$type,'" \n ').concat(s)}return o&&void 0!==i&&void 0!==e&&null!==e&&(o[i]=e),e}}},{key:"createModdleNode",value:function(e,t){var n=e.create(t.$type,{id:this.generateId()});return t.id&&(this.createdModdleNodes[t.id]=n),n}},{key:"setReferences",value:function(e){var t=this,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;if(void 0!==e)return this.isReference(n)?e=e instanceof Array?e.map((function(e){return t.findReference(e)})):this.findReference(e):e instanceof Array?e=e.map((function(e){return t.setReferences(e,null)})):e instanceof Object&&Object.keys(Ma()(e,"$type","$config","markerFlags")).forEach((function(n){e[n]=t.setReferences(e[n],n)})),e}},{key:"isReference",value:function(e){return!!e&&("Ref"===e.substr(e.length-3)||"Refs"===e.substr(e.length-4))}},{key:"findReference",value:function(e){return this.createdModdleNodes[e]||this.findById(e)}},{key:"generateId",value:function(){return this.index++,"".concat(this.options.prefix,"_").concat(this.index)}},{key:"findById",value:function(e){var t=this,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.definitions.rootElements,o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:[];if(!(o.indexOf(n)>-1)){var i;if(n instanceof Array)o.push(n),n.find((function(n){return i=t.findById(e,n,o)}));else if(n instanceof Object&&n.$type){if(o.push(n),n.id===e)return n;Object.getOwnPropertyNames(n).find((function(r){return i=!(n[r]instanceof Function)&&t.findById(e,n[r],o)}))}return i}}}]),e}(),Uh=function(e,t,n,o,i){var r=new Vh(i,{prefix:"".concat(t.definition.id,"_inner")}),s=r.setDefinitionProps(e.$loopCharactetistics,n,o,{});return s=r.setReferences(s),s.loopCharacteristics?(delete t.definition.loopCharacteristics,n(t,"loopCharacteristics",s.loopCharacteristics)):(t.definition.loopCharacteristics=null,delete t.definition.loopCharacteristics),s.ioSpecification?(delete t.definition.ioSpecification,n(t,"ioSpecification",s.ioSpecification)):delete t.definition.ioSpecification,Ma()(e,["$loopCharactetistics"])},Gh=function(e,t,n,o){var i=o.definitions,r=new Vh(i);e.$loopCharactetistics=r.getDefinitionProps({id:t.definition.id,loopCharacteristics:t.definition.loopCharacteristics,ioSpecification:t.definition.ioSpecification}),delete e.loopCharacteristics,delete e.ioSpecification},Wh={component:"FormAccordion",container:!0,config:{initiallyOpen:!1,label:"Loop Activity",icon:"redo",name:"loop-characteristics-accordion"},items:[{component:Ch,name:"LoopCharactetistics",config:{name:"$loopCharactetistics"}}]},$h="processmaker-modeler-task",Xh={id:"processmaker-modeler-task",component:ih,bpmnType:["bpmn:Task","bpmn:UserTask","bpmn:GlobalTask","bpmn:SubProcess"],control:!0,category:"BPMN",rank:40,icon:h(45849),label:"Task",items:[{icon:h(45849),label:"Form Task",control:!0,rank:41,id:"processmaker-modeler-task"},{icon:h(24678),label:"Manual Task",control:!0,rank:42,id:"processmaker-modeler-manual-task"},{icon:h(37901),label:"Script Task",control:!0,rank:43,id:"processmaker-modeler-script-task"},{icon:h(47356),label:"Sub Process",control:!0,rank:44,id:"processmaker-modeler-call-activity"}],definition:function(e,t){return e.create("bpmn:Task",{name:t(To[$h]),assignment:"requester"})},diagram:function(e){return e.create("bpmndi:BPMNShape",{bounds:e.create("dc:Bounds",{height:Lp,width:jp})})},inspectorHandler:function(e,t,n,o,i,r){Yh(e.markerFlags,t,n,o),Uh(e,t,n,o,i),r(Ma()(e,"markerFlags","$loopCharactetistics"))},inspectorData:function(e,t,n){var o=t(e);return Gh(o,e,t,n),o.markerFlags={isForCompensation:o.isForCompensation},delete o.isForCompensation,o},inspectorConfig:[{name:To[$h],items:[{component:"FormAccordion",container:!0,config:{initiallyOpen:!0,label:"Properties",icon:"cog",name:"inspector-accordion-task"},items:[{component:"FormInput",config:Ys}]},Wh,ua,vh]}],loopCharacteristicsHandler:Uh,loopCharacteristicsData:Gh};function Yh(e,t,n){if(e){var o=t.definition.get("isForCompensation"),i=e.isForCompensation;null!=i&&i!==o&&n(t,"isForCompensation",i)}}var Zh,Kh,Jh=yo(yo({},Xh),{},{component:dh}),Qh=(h(38862),function(){var e=this,t=e._self._c;return t("div",[t("crown-config",e._g({attrs:{highlighted:e.highlighted,paper:e.paper,graph:e.graph,shape:e.shape,node:e.node,nodeRegistry:e.nodeRegistry,moddle:e.moddle,collaboration:e.collaboration,"process-node":e.processNode,"plane-elements":e.planeElements,"is-rendering":e.isRendering,"boundary-event-dropdown-data":e.boundaryEventDropdownData,"dropdown-data":e.dropdownData,showCustomIconPicker:!0,iconName:this.iconName},on:{"set-custom-icon-name":e.setCustomIconName,"reset-custom-icon-name":e.resetCustomIconName}},e.$listeners)),t("b-modal",{ref:"subprocess-modal",attrs:{title:"Previewing '".concat(e.subprocessName,"'")},scopedSlots:e._u([{key:"modal-footer",fn:function(){return[t("a",{attrs:{href:e.subprocessLink,target:"_blank","data-test":"modal-process-link"}},[e._v(" Open subprocess in new window "),t("i",{staticClass:"ml-1 fas fa-external-link-alt"})])]},proxy:!0}])},[e.subProcessSvg?t("div",{staticClass:"text-center",domProps:{innerHTML:e._s(e.subProcessSvg)}}):e.failedToLoadPreview?t("div",[e._v("Could not load preview")]):t("div",[t("i",{staticClass:"fas fa-spinner fa-spin"}),e._v(" Loading process preview...")])]),t("b-modal",{ref:"no-subprocess-modal",attrs:{title:"No subprocess selected","hide-footer":!0}},[e._v(" Please select a subprocess to view it. ")])],1)}),ef=[],tf=h.p+"img/subprocess.19c191a3.svg",nf=15,of=2*ys,rf='<svg version="1.1"\n baseProfile="full"\n width="16" height="16"\n xmlns="http://www.w3.org/2000/svg"></svg>',sf={components:{CrownConfig:Zr},props:["graph","node","id","highlighted","nodeRegistry","moddle","paper","collaboration","processNode","planeElements","isRendering","paperManager"],mixins:[Vs,Je,Bs,as,ya,Fp],data:function(){return{subProcessSvg:null,failedToLoadPreview:!1,boundaryEventDropdownData:Hp,dropdownData:[{label:To["processmaker-modeler-task"],nodeType:"processmaker-modeler-task",dataTest:"switch-to-user-task"},{label:To["processmaker-modeler-manual-task"],nodeType:"processmaker-modeler-manual-task",dataTest:"switch-to-manual-task"},{label:To["processmaker-modeler-script-task"],nodeType:"processmaker-modeler-script-task",dataTest:"switch-to-script-task"},{label:To["processmaker-modeler-call-activity"],nodeType:"processmaker-modeler-call-activity",dataTest:"switch-to-sub-process"}],nodeIcon:rf,iconName:"",anchorPointFunction:at}},computed:{subprocessId:function(){return JSON.parse(this.node.definition.get("config")).processId},subprocessLink:function(){return"/modeler/".concat(this.subprocessId)},subprocessName:function(){return this.node.definition.get("name")}},watch:{"node.definition.name":function(e){var t=this.node.diagram.bounds.width;this.shape.attr("label/text",a.util.breakText(e,{width:t}));var n=this.shapeView.selectors.label.getBBox().height,o=this.shape.size(),i=o.height;if(n+nf+of!==i){var r=Math.max(n+nf+of,Lp);this.node.diagram.bounds.height=r,this.shape.resize(t,r),this.recalcMarkersAlignment()}},"node.definition.config":function(e){bn.commit("updateNodeProp",{node:this.node,key:"config",value:e}),this.$emit("save-state")},"node.definition.callActivityType":function(e){this.shape.attr("image/display","globalTask"===e?"none":"initial")},"node.definition.loopCharacteristics":function(){Xp(this.node.definition,this.markers,this.$set,this.$delete)}},methods:{clickSubprocess:function(e,t){var n=this,o="bottomCenter.0"===t.target.getAttribute("joint-selector"),i=e.model===this.shape;o&&i&&(this.subprocessId?(this.$refs["subprocess-modal"].show(),this.subProcessSvg=null,this.failedToLoadPreview=!1,window.ProcessMaker.apiClient.get("/processes/".concat(this.subprocessId),{params:{include:"svg"}}).then((function(e){var t=e.data;if(t.svg){var o=function(e){return e.replace('<svg width="100%"',"<svg ")},i=function(e){return e.replace("<svg ",'<svg class="border border-dark"')};n.subProcessSvg=i(o(t.svg))}else n.failedToLoadPreview=!0})).catch((function(){n.failedToLoadPreview=!0}))):this.$refs["no-subprocess-modal"].show())}},mounted:function(){this.shape=new Bp,this.$set(this.markers.bottomCenter,"subprocess",tf);var e=this.node.diagram.bounds;this.shape.position(e.x,e.y),this.shape.resize(e.width,e.height),Xp(this.node.definition,this.markers,this.$set,this.$delete),this.shape.attr({body:{rx:8,ry:8,strokeWidth:4},label:{text:a.util.breakText(this.node.definition.get("name"),{width:e.width}),fill:"black"}}),this.shape.addTo(this.graph),this.shape.component=this,this.paperManager.addEventHandler("element:pointerclick",this.clickSubprocess),this.node.definition.get("customIcon")&&this.setCustomIcon(this.node.definition.get("customIcon"))}},af=sf,lf=qn(af,Qh,ef,!1,null,null,null),cf=lf.exports,df=function(){var e=this,t=e._self._c;return t("div",[t("form-multi-select",{staticClass:"p-0 mb-2",attrs:{label:e.$t("Process"),name:"Process",helper:e.$t("Select which Process this element calls"),showLabels:!1,"allow-empty":!1,options:e.processList,loading:e.loading,optionContent:"name",validation:e.validation,searchable:!0,"internal-search":!1,"preserve-search":!1,"clear-on-select":!1},on:{"search-change":e.searchChange},model:{value:e.selectedProcess,callback:function(t){e.selectedProcess=t},expression:"selectedProcess"}}),e.selectedProcess?t("form-multi-select",{staticClass:"p-0 mb-2",attrs:{label:e.$t("Start Event"),name:"StartEvent",disabled:0===e.startEventList.length,"allow-empty":!1,showLabels:!1,options:e.startEventList,optionContent:"name",validation:"required"},model:{value:e.selectedStartEvent,callback:function(t){e.selectedStartEvent=t},expression:"selectedStartEvent"}}):e._e(),e.selectedProcess?t("a",{attrs:{href:"/modeler/".concat(e.selectedProcess.id),target:"_blank"}},[e._v(" "+e._s(e.$t("Open Process"))+" "),t("i",{staticClass:"ml-1 fas fa-external-link-alt"})]):e._e()],1)},uf=[],pf=h(45578),hf=h.n(pf),ff={data:function(){return{selectedProcess:null,selectedStartEvent:null,config:{},name:"",loading:!1,processes:[],selectedProcessInfo:null,validation:""}},inheritAttrs:!1,props:["value"],computed:{processList:function(){var e=this,t=this.filterValidProcesses(this.processes)||[];return this.selectedProcessInfo&&!t.find((function(t){return t.id===e.selectedProcessInfo.id}))&&t.push(this.selectedProcessInfo),t},startEventList:function(){return this.selectedProcess?this.filterValidStartEvents(this.selectedProcess.events):[]},currentProcessId:function(){var e=window.location.href.match(/modeler\/(\d+)/);return e&&e[1]?parseInt(e[1]):null}},watch:{selectedProcess:function(){this.loading||(this.startEventList.length>0?this.selectedStartEvent=this.startEventList[0]:this.selectedStartEvent=null)},selectedStartEvent:function(){this.loading||this.setBpmnValues()},processList:function(){this.loadBpmnValues()},value:{handler:function(){this.config=JSON.parse(this.value),this.loadSelectedProcessInfo()},immediate:!0}},methods:{searchChange:function(e){this.loadProcessesDebounced(e)},filterValidProcesses:function(e){var t=this;return e.filter((function(e){return t.filterValidStartEvents(e.events).length>0})).filter((function(e){return e.id!==t.currentProcessId}))},filterValidStartEvents:function(e){return e.filter((function(e){if(e.eventDefinitions&&e.eventDefinitions.length>0)return!1;if(e.config)try{var t=JSON.parse(e.config);if(t.web_entry)return!1}catch(n){return!1}return!0}))},loadBpmnValues:function(){var e=this;this.config.processId&&this.config.startEvent&&(this.loading=!0,this.name=this.config.name,this.selectedProcess=this.processList.find((function(t){return t.id===e.config.processId})),this.selectedStartEvent=this.startEventList.find((function(t){return t.id===e.config.startEvent})),this.$nextTick((function(){e.selectedProcess||(e.validation="required"),e.loading=!1})))},setBpmnValues:function(){if(this.selectedProcess&&this.selectedStartEvent){var e=this.selectedProcess.name;this.startEventList.length>1&&(e+=" (".concat(this.selectedStartEvent.name,")"));var t={calledElement:"".concat(this.selectedStartEvent.ownerProcessId,"-").concat(this.selectedProcess.id),processId:this.selectedProcess.id,startEvent:this.selectedStartEvent.id,name:e},n=JSON.stringify(t);this.$emit("input",n)}},containsMultipleProcesses:function(e){return hf()(e.events,"ownerProcessId").length>1},loadProcesses:function(e){var t=this;this.loading=!0;var n={order_direction:"asc",per_page:20,include:"events,category",filter_without_assignments:!0};e&&(n.filter=e),window.ProcessMaker.apiClient.get("processes",{params:n}).then((function(e){t.loading=!1,t.processes=e.data.data})).catch((function(){t.loading=!1}))},loadSelectedProcessInfo:function(){var e=this;this.config.processId&&window.ProcessMaker.apiClient.get("processes/"+this.config.processId,{params:{include:"events,category",filter_without_assignments:!0}}).then((function(t){e.selectedProcessInfo=t.data}))}},created:function(){var e=this;this.validation=this.config.processId?"":"required",this.loadProcessesDebounced=C()((function(t){e.loadProcesses(t)}),500),0===this.processList.length?this.loadProcesses():this.loadBpmnValues()}},mf=ff,gf=qn(mf,df,uf,!1,null,null,null),vf=gf.exports,bf="processmaker-modeler-call-activity",yf={id:bf,component:cf,bpmnType:"bpmn:CallActivity",control:!1,category:"BPMN",icon:h(12893),label:To[bf],definition:function(e,t){return e.create("bpmn:CallActivity",{name:t(To[bf]),calledElement:"",config:"{}",loopCharacteristics:null,ioSpecification:null})},diagram:function(e){return e.create("bpmndi:BPMNShape",{bounds:e.create("dc:Bounds",{height:Lp,width:jp})})},inspectorHandler:function(e,t,n){n(t,"id",e.id),n(t,"name",e.name);var o=JSON.parse(e.config);e["calledElement"]=o.calledElement,n(t,"calledElement",o.calledElement),o.name!==e.name&&(o.name=e.name),n(t,"config",JSON.stringify(o))},inspectorConfig:[{name:To[bf],items:[{component:"FormAccordion",container:!0,config:{initiallyOpen:!0,label:"Properties",icon:"cog",name:"inspector-accordion-subprocess"},items:[{component:"FormInput",config:Ys},{component:vf,config:{name:"config"}}]},ua,na]}]},wf=h(87465),xf=h.n(wf),kf={extends:ih,mixins:[ya],data:function(){return{nodeIcon:xf(),iconName:""}}},Cf=kf,Sf=qn(Cf,Zh,Kh,!1,null,null,null),Ef=Sf.exports,Af="processmaker-modeler-script-task",Mf={id:Af,component:Ef,bpmnType:"bpmn:ScriptTask",control:!1,category:"BPMN",icon:h(75763),label:To[Af],definition:function(e,t){return e.create("bpmn:ScriptTask",{name:t(To[Af]),scriptRef:null,loopCharacteristics:null,ioSpecification:null})},diagram:function(e){return e.create("bpmndi:BPMNShape",{bounds:e.create("dc:Bounds",{height:Lp,width:jp})})},inspectorConfig:[{name:To[Af],items:[{component:"FormAccordion",container:!0,config:{initiallyOpen:!0,label:"Properties",icon:"cog",name:"inspector-accordion-script-task"},items:[{component:"FormInput",config:Ys}]},ua,na]}]},Tf=yo(yo({},Xh),{},{id:"processmaker-modeler-service-task",bpmnType:["bpmn:ServiceTask","bpmn:SendTask","bpmn:ReceiveTask"],control:!1,label:"Service Task",definition:function(e,t){return e.create("bpmn:ServiceTask",{name:t("Service Task")})},inspectorConfig:[{name:"Service Task",items:[{component:"FormAccordion",container:!0,config:{initiallyOpen:!0,label:"Properties",icon:"cog",name:"inspector-accordion-service-task"},items:[{component:"FormInput",config:Ys}]},ua,na]}]}),_f=function(){var e=this,t=e._self._c;return t("crown-config",e._g({attrs:{highlighted:e.highlighted,paper:e.paper,graph:e.graph,shape:e.shape,node:e.node,nodeRegistry:e.nodeRegistry,moddle:e.moddle,collaboration:e.collaboration,"process-node":e.processNode,"plane-elements":e.planeElements,"is-rendering":e.isRendering}},e.$listeners))},Pf=[],Of=160,Df={components:{CrownConfig:Zr},props:["graph","node","id","highlighted","nodeRegistry","moddle","paper","paperManager","collaboration","processNode","planeElements","isRendering"],mixins:[Vs,Je],data:function(){return{shape:null,definition:null,nodeWidth:10}},watch:{"node.definition.text":function(e){this.updateNodeText(e)}},methods:{getLabelHeight:function(e){return this.shape.findView(this.paperManager.paper).selectors.label.getBBox().height+e},calculateNewHeight:function(e,t,n){var o=3,i=15,r=this.getLabelHeight(i);return r!==e?r-o:0===t.length?n-o:e-o},updateNodeText:function(e){var t=this,n=this.shape.findView(this.paperManager.paper).getBBox(),o=n.height,i="25 ".concat(o," 3 ").concat(o," 3 3 25 3"),r=this.node.diagram.bounds;this.shape.position(r.x,r.y),this.shape.attr({body:{refPoints:i},label:{text:a.util.breakText(e,{width:Of}),textAnchor:"left"}}),this.paperManager.awaitScheduledUpdates().then((function(){t.shape.resize(t.nodeWidth,t.calculateNewHeight(o,e,r.height)),t.setShapeHighlight()}))}},mounted:function(){var e=this.node.diagram.bounds;this.shape=new a.shapes.standard.Polyline,this.shape.set("type","textAnnotation"),this.shape.position(e.x,e.y),this.shape.resize(this.nodeWidth,e.height),this.shape.attr({body:{refPoints:"25 10 3 10 3 3 25 3",fill:"none"},label:{fill:"black",yAlignment:"left",xAlignment:"left",refX:"5",refY:"5"}}),this.shape.addTo(this.graph),this.shape.component=this,this.updateNodeText(this.node.definition.get("text"))}},If=Df,Nf=qn(If,_f,Pf,!1,null,null,null),Rf=Nf.exports,Bf="processmaker-modeler-text-annotation",Lf={id:Bf,component:Rf,bpmnType:"bpmn:TextAnnotation",control:!0,category:"BPMN",icon:h(15153),label:"Text Annotation",rank:70,definition:function(e,t){return e.create("bpmn:TextAnnotation",{text:t("Text Annotation")})},diagram:function(e){return e.create("bpmndi:BPMNShape",{bounds:e.create("dc:Bounds",{height:30,width:150})})},validateIncoming:function(){return!1},validateAssociationIncoming:function(){return!1},inspectorConfig:[{name:"Text Annotation",items:[{component:"FormAccordion",container:!0,config:{initiallyOpen:!0,label:"Properties",icon:"cog",name:"inspector-accordion-text-annotation"},items:[{component:"FormInput",config:{label:"Text to Show",helper:"Body of the text annotation",name:"text",placeholder:"Text Annotation"}}]},ua,na]}]},jf=function(){var e=this,t=e._self._c;return t("crown-config",e._g({attrs:{highlighted:e.highlighted,paper:e.paper,graph:e.graph,shape:e.shape,node:e.node,nodeRegistry:e.nodeRegistry,moddle:e.moddle,collaboration:e.collaboration,"process-node":e.processNode,"plane-elements":e.planeElements,"is-rendering":e.isRendering}},e.$listeners),[t("add-lane-above-button",{directives:[{name:"b-tooltip",rawName:"v-b-tooltip.hover.viewport.d50",modifiers:{hover:!0,viewport:!0,d50:!0}}],staticClass:"crown-config__icon",attrs:{title:e.$t("Lane Above")},on:{click:e.addLaneAbove}}),t("add-lane-below-button",{directives:[{name:"b-tooltip",rawName:"v-b-tooltip.hover.viewport.d50",modifiers:{hover:!0,viewport:!0,d50:!0}}],staticClass:"crown-config__icon",attrs:{title:e.$t("Lane Below")},on:{click:e.addLaneBelow}})],1)},Ff=[],zf=h.p+"img/highlight-shape.5f7b1ba9.svg",qf=30,Hf=200,Vf=300,Uf=20,Gf=300,Wf=100,$f={props:["highlighted","paper","processNode","planeElements","moddle"],data:function(){return{anchorPoints:[],isResizing:!0,pointWidth:15,pointHeight:15,elementBounds:[],elementTopY:null,elementRightX:null,elementBottomY:null,elementLeftX:null}},watch:{highlighted:function(e){0!==this.anchorPoints.length&&(e?(!1===bn.getters.isReadOnly&&this.addResizeAnchors(),this.calculateElementLimits(),this.updateAnchorPointPosition()):this.removeResizeAnchors())}},computed:{poolComponent:function(){return x()(this,"node.pool.component",this)},isLane:function(){return"processmaker-modeler-lane"===this.node.type}},methods:{calculateElementLimits:function(){this.elementBounds=this.poolComponent.shape.getEmbeddedCells().filter((function(e){return e.component&&e.component.node.type!==Tl&&"processmaker-modeler-message-flow"!==e.component.node.type})).map((function(e){return e.getBBox()})),this.elementTopY=Math.min.apply(Math,m(this.elementBounds.map((function(e){var t=e.y;return t-Uf})))),this.elementBottomY=Math.max.apply(Math,m(this.elementBounds.map((function(e){var t=e.y,n=e.height;return t+n+Uf})))),this.elementRightX=Math.max.apply(Math,m(this.elementBounds.map((function(e){var t=e.x,n=e.width;return t+n+Uf})))),this.elementLeftX=Math.min.apply(Math,m(this.elementBounds.map((function(e){var t=e.x;return t-Uf}))))},configureResize:function(){var e=this;this.shape.listenTo(this.paper,"element:pointerup",(function(t){t.model.component&&t.model.component===e&&e.calculateElementLimits()}));var t=new a.shapes.standard.EmbeddedImage,n=new a.shapes.standard.EmbeddedImage,o=new a.shapes.standard.EmbeddedImage,i=new a.shapes.standard.EmbeddedImage;this.anchorPoints=[t,n,o,i];var r=this.shape.getBBox(),s=r.x,l=r.y,c=r.width,d=r.height;this.anchorPoints.forEach((function(e){e.set("isDrag",!0),e.set("previousPosition",e.position())})),this.highlighted&&this.addResizeAnchors(),this.setPointAttributes(t,"nwse-resize","bottom-right-resize-button"),this.setPointAttributes(n,"nesw-resize","bottom-left-resize-button"),this.setPointAttributes(o,"nesw-resize","top-right-resize-button"),this.setPointAttributes(i,"nwse-resize","top-left-resize-button"),t.position(s+c,l+d),n.position(s-this.pointWidth,l+d),o.position(s+c,l-this.pointHeight),i.position(s-this.pointWidth,l-this.pointHeight),t.listenTo(this.paper,"element:pointerdown",(function(n){n.model===t&&(t.on("change:position",e.resizeBottomRight),e.shape.listenToOnce(e.paper,"element:pointerup",(function(){t.off("change:position",e.resizeBottomRight),e.resizeUpdate()})))})),n.listenTo(this.paper,"element:pointerdown",(function(t){t.model===n&&(n.on("change:position",e.resizeBottomLeft),e.shape.listenToOnce(e.paper,"element:pointerup",(function(){n.off("change:position",e.resizeBottomLeft),e.resizeUpdate()})))})),o.listenTo(this.paper,"element:pointerdown",(function(t){t.model===o&&(o.on("change:position",e.resizeTopRight),e.shape.listenToOnce(e.paper,"element:pointerup",(function(){o.off("change:position",e.resizeTopRight),e.resizeUpdate()})))})),i.listenTo(this.paper,"element:pointerdown",(function(t){t.model===i&&(i.on("change:position",e.resizeTopLeft),e.shape.listenToOnce(e.paper,"element:pointerup",(function(){i.off("change:position",e.resizeTopLeft),e.resizeUpdate()})))}))},fixResizeRounding:function(){var e=this.poolComponent.shape.getBBox(),t=e.x,n=e.y,o=e.width,i=e.height;this.poolComponent.shape.resize(Math.round(o),Math.round(i)),this.poolComponent.shape.position(Math.round(t),Math.round(n))},resizeUpdate:function(){this.fixResizeRounding();var e=this.shape.getBBox(),t=e.width,n=e.height,o=this.node.diagram.bounds;t===o.width&&n===o.height||(this.poolComponent.laneSet&&(this.poolComponent.updateLaneChildren(),this.poolComponent.sortedLanes().forEach((function(e){bn.commit("updateNodeBounds",{node:e.component.node,bounds:e.getBBox()})}))),bn.commit("updateNodeBounds",{node:this.poolComponent.node,bounds:this.poolComponent.shape.getBBox()}),this.$emit("save-state"))},resizeTopLeft:function(e,t,n){if(n.ui){var o="top-left",i=t.x,r=t.y;if(e.get("previousPosition").x!==i||e.get("previousPosition").y!==r){var s=this.poolComponent.shape.getBBox(),a=s.x,l=s.y,c=s.width,d=s.height,u=this.shape.getBBox(),p=u.x,h=u.y,f=u.width,m=u.height,g=this.poolComponent.sortedLanes(),v=g.slice(1).reduce((function(e,t){return e+t.getBBox().height}),Wf),b=Math.max(a+c-(i+this.pointWidth),a+c-this.elementLeftX+qf,Vf),y=Math.max(l+d-(r+this.pointWidth),l+d-this.elementTopY,this.poolComponent.laneSet?v:Hf),w=Math.max(p+f-(i+this.pointWidth),p+f-this.elementLeftX+Uf+qf,Gf),x=Math.max(h+m-(r+this.pointHeight),Wf);if(this.isLane)if(this.shape===g[0]){var k=Math.max(a+c-(i+this.pointWidth)+qf,a+c-this.elementLeftX+qf,Vf);this.poolComponent.shape.resize(k,y,{direction:o}),e.set("previousPosition",{x:i,y:r}),this.poolComponent.resizeLanes()}else{var C=g[g.indexOf(this.shape)-1];this.shape.resize(w,Math.min(h+m-(C.getBBox().y+Wf),x),{direction:o}),e.set("previousPosition",{x:i,y:r}),this.poolComponent.fillLanes(this.shape,o)}else e.set("previousPosition",{x:i,y:r}),this.shape.resize(b,y,{direction:o}),this.laneSet&&this.poolComponent.resizeLanes();this.updateAnchorPointPosition()}}},resizeTopRight:function(e,t,n){if(n.ui){var o="top-right",i=t.x,r=t.y;if(e.get("previousPosition").x!==i||e.get("previousPosition").y!==r){var s=this.poolComponent.shape.getBBox(),a=s.x,l=s.y,c=s.height,d=this.shape.getBBox(),u=d.x,p=d.y,h=d.height,f=this.poolComponent.sortedLanes(),m=f.slice(1).reduce((function(e,t){return e+t.getBBox().height}),Wf),g=Math.max(i-a,this.elementRightX-a,Vf),v=Math.max(l+c-(r+this.pointWidth),l+c-this.elementTopY,this.poolComponent.laneSet?m:Hf),b=Math.max(i-u,this.elementRightX-u,Gf),y=Math.max(p+h-(r+this.pointHeight),Wf);if(this.isLane)if(this.shape===f[0])this.poolComponent.shape.resize(g,v,{direction:o}),e.set("previousPosition",{x:i,y:r}),this.poolComponent.resizeLanes();else{var w=f[f.indexOf(this.shape)-1];this.shape.resize(b,Math.min(p+h-(w.getBBox().y+Wf),y),{direction:o}),e.set("previousPosition",{x:i,y:r}),this.poolComponent.fillLanes(this.shape,o)}else this.shape.resize(g,v,{direction:o}),e.set("previousPosition",{x:i,y:r}),this.laneSet&&this.poolComponent.resizeLanes();this.updateAnchorPointPosition()}}},resizeBottomLeft:function(e,t,n){if(n.ui){var o="bottom-left",i=t.x,r=t.y;if(e.get("previousPosition").x!==i||e.get("previousPosition").y!==r){var s=this.poolComponent.shape.getBBox(),a=s.x,l=s.y,c=s.width,d=this.shape.getBBox(),u=d.x,p=d.y,h=d.width,f=this.poolComponent.sortedLanes(),m=f.slice(0,f.length-1).reduce((function(e,t){return e+t.getBBox().height}),Wf),g=Math.max(a+c-(i+this.pointWidth),a+c-this.elementLeftX+qf,Vf),v=Math.max(r-l,this.elementBottomY-l,this.poolComponent.laneSet?m:Hf),b=Math.max(u+h-(i+this.pointWidth),u+h-this.elementLeftX+Uf+qf,Gf),y=Math.max(r-p,Wf);if(this.isLane)if(this.shape===f[f.length-1]){var w=Math.max(a+c-(i+this.pointWidth)+qf,a+c-this.elementLeftX+qf,Vf);this.poolComponent.shape.resize(w,v,{direction:o}),e.set("previousPosition",{x:i,y:r}),this.poolComponent.resizeLanes()}else{var x=f[f.indexOf(this.shape)+1];this.shape.resize(b,Math.min(x.getBBox().y+x.getBBox().height-Wf-p,y),{direction:o}),e.set("previousPosition",{x:i,y:r}),this.poolComponent.fillLanes(this.shape,o)}else this.shape.resize(g,v,{direction:o}),e.set("previousPosition",{x:i,y:r}),this.laneSet&&this.poolComponent.resizeLanes();this.updateAnchorPointPosition()}}},resizeBottomRight:function(e,t,n){if(n.ui){var o="bottom-right",i=t.x,r=t.y;if(e.get("previousPosition").x!==i||e.get("previousPosition").y!==r){var s=this.poolComponent.shape.getBBox(),a=s.x,l=s.y,c=this.shape.getBBox(),d=c.x,u=c.y,p=this.poolComponent.sortedLanes(),h=p.slice(0,p.length-1).reduce((function(e,t){return e+t.getBBox().height}),Wf),f=Math.max(i-a,this.elementRightX-a,Vf),m=Math.max(r-l,this.elementBottomY-l,this.poolComponent.laneSet?h:Hf),g=Math.max(i-d,this.elementRightX-d,Gf),v=Math.max(r-u,Wf);if(this.isLane)if(this.shape===p[p.length-1])this.poolComponent.shape.resize(f,m,{direction:o}),e.set("previousPosition",{x:i,y:r}),this.poolComponent.resizeLanes();else{var b=p[p.indexOf(this.shape)+1];this.shape.resize(g,Math.min(b.getBBox().y+b.getBBox().height-Wf-u,v),{direction:o}),e.set("previousPosition",{x:i,y:r}),this.poolComponent.fillLanes(this.shape,o)}else this.shape.resize(f,m,{direction:o}),e.set("previousPosition",{x:i,y:r}),this.laneSet&&this.poolComponent.resizeLanes();this.updateAnchorPointPosition()}}},addResizeAnchors:function(){var e=this;this.anchorPoints.forEach((function(t){try{e.shape.embed(t)}catch(fa){}t.addTo(e.graph),t.toFront()}))},removeResizeAnchors:function(){this.anchorPoints.forEach((function(e){e.remove()}))},updateAnchorPointPosition:function(e){if(0!==this.anchorPoints.length){var t=this.shape.getBBox(),n=t.x,o=t.y,i=t.width,r=t.height;0!==e&&this.anchorPoints[0].position(n+i,o+r),1!==e&&this.anchorPoints[1].position(n-this.pointWidth,o+r),2!==e&&this.anchorPoints[2].position(n+i,o-this.pointHeight),3!==e&&this.anchorPoints[3].position(n-this.pointWidth,o-this.pointWidth)}},setPointAttributes:function(e,t,n){e.attr({body:{fill:"#fff",stroke:" #fff",opacity:.8},image:{xlinkHref:zf,cursor:t,buttonId:n,refWidth:20,refHeight:20,resetOffset:!0}})}},mounted:function(){var e=this;this.$nextTick((function(){e.configureResize()}))}},Xf=function(){var e=this,t=e._self._c;return t("crown-config",e._g({attrs:{highlighted:e.highlighted,paper:e.paper,graph:e.graph,shape:e.shape,node:e.node,nodeRegistry:e.nodeRegistry,moddle:e.moddle,collaboration:e.collaboration,"process-node":e.processNode,"plane-elements":e.planeElements,"is-rendering":e.isRendering}},e.$listeners))},Yf=[],Zf={components:{CrownConfig:Zr},props:["graph","node","nodes","id","highlighted","nodeRegistry","moddle","paper","collaboration","processNode","planeElements","isRendering"],mixins:[Vs,$f],data:function(){return{shape:null,definition:null}},watch:{"node.definition.name":function(e){this.shape.attr("label/text",e)}},mounted:function(){this.shape=new a.shapes.standard.Rectangle,this.shape.set("type","PoolLane");var e=this.node.diagram.bounds;this.shape.position(e.x,e.y),this.shape.resize(e.width,e.height),this.shape.set("elementMove",!1),this.shape.attr("body/cursor","default"),this.shape.attr("body",{fill:Ce}),this.shape.attr("label",{text:a.util.breakText(this.node.definition.get("name"),{width:e.height}),fill:"black",transform:"rotate(-90)",refX:qf/2}),this.shape.component=this,this.shape.addTo(this.graph),this.planeElements.includes(this.node.diagram)||this.planeElements.push(this.node.diagram)},beforeDestroy:function(){var e=this.node.pool.component,t=e.laneSet.get("lanes");if(Gr()(t,this.node.definition),0===t.length)return e.containingProcess.set("laneSets",[]),void(e.laneSet=null)}},Kf=Zf,Jf=qn(Kf,Xf,Yf,!1,null,null,null),Qf=Jf.exports,em={id:Tl,component:Qf,bpmnType:"bpmn:Lane",control:!1,category:"BPMN",label:"Lane",definition:function(e){return e.create("bpmn:Lane",{name:""})},diagram:function(e){return e.create("bpmndi:BPMNShape",{bounds:e.create("dc:Bounds",{height:150,width:600,x:null,y:null})})},inspectorConfig:[{name:"Lane",items:[{component:"FormAccordion",container:!0,config:{initiallyOpen:!0,label:"Properties",icon:"cog",name:"inspector-accordion-pool-lane"},items:[{component:"FormInput",config:Ys}]},ua,na]}]},tm=function(){var e=this,t=e._self._c;return t("crown-button",e._g({attrs:{id:"lane-above-button","aria-label":"Add lane above icon",width:25}},e.$listeners),[t("font-awesome-icon",{attrs:{icon:["fpm","fa-lane-above"]}})],1)},nm=[],om=h.p+"img/lane-above.37ee2b80.svg",im={components:{CrownButton:Vn,FontAwesomeIcon:Zo.FontAwesomeIcon},data:function(){return{laneAboveIcon:om}},created:function(){Lo.library.add(zo)}},rm=im,sm=qn(rm,tm,nm,!1,null,null,null),am=sm.exports,lm=function(){var e=this,t=e._self._c;return t("crown-button",e._g({attrs:{id:"lane-below-button","aria-label":"Add lane below icon",width:25}},e.$listeners),[t("font-awesome-icon",{attrs:{icon:["fpm","fa-lane-below"]}})],1)},cm=[],dm=h.p+"img/lane-below.22169670.svg",um={components:{CrownButton:Vn,FontAwesomeIcon:Zo.FontAwesomeIcon},data:function(){return{laneBelowIcon:dm}},created:function(){Lo.library.add(qo)}},pm=um,hm=qn(pm,lm,cm,!1,null,null,null),fm=hm.exports,mm=a.shapes.standard.Rectangle.define("processmaker.modeler.bpmn.pool",{markup:[].concat(m(a.shapes.standard.Rectangle.prototype.markup),[{tagName:"polyline",selector:"polyline"}]),attrs:{label:{fill:"black",transform:"rotate(-90)",refX:qf/2},polyline:{refPointsKeepOffset:"".concat(qf,",0 ").concat(qf,",200"),stroke:"#000",fill:"#fff",strokeWidth:2}}}),gm=mm,vm=function(){var e=this,t=e._self._c;return t("crown-config",e._g({attrs:{highlighted:e.highlighted,paper:e.paper,graph:e.graph,shape:e.shape,node:e.node,nodeRegistry:e.nodeRegistry,moddle:e.moddle,collaboration:e.collaboration,"process-node":e.processNode,"plane-elements":e.planeElements,"is-rendering":e.isRendering,"dropdown-data":e.dropdownData}},e.$listeners))},bm=[],ym={inheritAttrs:!1,components:{CrownConfig:Zr},props:["graph","node","id","highlighted","nodeRegistry","moddle","paper","collaboration","processNode","planeElements","isRendering"],mixins:[Vs,as,Je],data:function(){return{shape:null,definition:null,dropdownData:[]}},watch:{"node.definition.name":function(e){this.shape.attr("label/text",e)}},mounted:function(){this.shape=new a.shapes.standard.Path,this.shape.attr("root/title","joint.shapes.standard.Path"),this.shape.attr("label",{refY:65,text:this.node.definition.get("name"),fill:"black"}),this.shape.attr("body",{refD:"M1,1 L25,1 L35,10 L35,49 L1,49 L1,1 M24,1 L24,10 L35,10"});var e=this.node.diagram.bounds;this.shape.position(e.x,e.y),this.shape.resize(e.width,e.height),this.shape.addTo(this.graph),this.shape.component=this}},wm=ym,xm=qn(wm,vm,bm,!1,null,null,null),km=xm.exports,Cm="processmaker-modeler-data-object",Sm={id:Cm,component:km,bpmnType:"bpmn:DataObjectReference",control:!0,category:"BPMN",icon:h(91012),label:To[Cm],rank:80,validateIncoming:function(){return!1},definition:function(e,t){return e.create("bpmn:DataObjectReference",{name:t(To[Cm])})},diagram:function(e){return e.create("bpmndi:BPMNShape",{bounds:e.create("dc:Bounds",{height:50,width:36})})},inspectorConfig:[{name:To[Cm],items:[{component:"FormAccordion",container:!0,config:{initiallyOpen:!0,label:"Properties",icon:"cog",name:"inspector-accordion-data-object"},items:[{component:"FormInput",config:Ys}]},ua,na]}]},Em=function(){var e=this,t=e._self._c;return t("crown-config",e._g({attrs:{highlighted:e.highlighted,paper:e.paper,graph:e.graph,shape:e.shape,node:e.node,nodeRegistry:e.nodeRegistry,moddle:e.moddle,collaboration:e.collaboration,"process-node":e.processNode,"plane-elements":e.planeElements,"is-rendering":e.isRendering,"dropdown-data":e.dropdownData}},e.$listeners))},Am=[],Mm=a.shapes.standard.Cylinder.extend({markup:[].concat(m(a.shapes.standard.Cylinder.prototype.markup),[{tagName:"ellipse",selector:"thirdLine"},{tagName:"ellipse",selector:"secondLine"},{tagName:"ellipse",selector:"firstLine"}]),defaults:a.util.deepSupplement({attrs:{thirdLine:{refCx:"50%",refRx:"50%",cy:20,refRy:"20%","stroke-width":2,fill:"#fff",stroke:"#000"},secondLine:{refCx:"50%",refRx:"50%",cy:15,refRy:"20%","stroke-width":2,fill:"#fff",stroke:"#000"},firstLine:{refCx:"50%",refRx:"50%",cy:10,refRy:"20%","stroke-width":2,fill:"#fff",stroke:"#000"},label:{refY:50,fill:"#000"}}},a.shapes.standard.Cylinder.prototype.defaults)}),Tm={components:{CrownConfig:Zr},props:["graph","node","id","highlighted","nodeRegistry","moddle","paper","collaboration","processNode","planeElements","isRendering"],mixins:[Vs,as,Je],data:function(){return{shape:null,definition:null,dropdownData:[]}},watch:{"node.definition.name":function(e){this.shape.attr("label/text",e)}},mounted:function(){this.shape=new Mm,this.shape.attr("label/text",this.node.definition.get("name"));var e=this.node.diagram.bounds;this.shape.position(e.x,e.y),this.shape.resize(e.width,e.height),this.shape.addTo(this.graph),this.shape.component=this}},_m=Tm,Pm=qn(_m,Em,Am,!1,null,null,null),Om=Pm.exports,Dm="processmaker-modeler-data-store",Im={id:Dm,component:Om,bpmnType:"bpmn:DataStoreReference",control:!0,category:"BPMN",icon:h(63427),label:To[Dm],rank:90,validateIncoming:function(){return!1},definition:function(e,t){return e.create("bpmn:DataStoreReference",{name:t(To[Dm])})},diagram:function(e){return e.create("bpmndi:BPMNShape",{bounds:e.create("dc:Bounds",{height:50,width:50})})},inspectorConfig:[{name:To[Dm],items:[{component:"FormAccordion",container:!0,config:{initiallyOpen:!0,label:"Properties",icon:"cog",name:"inspector-accordion-data-store"},items:[{component:"FormInput",config:Ys}]},ua,na]}]};function Nm(e,t){var n=new gm,o=e.diagram.bounds;return n.position(o.x,o.y),n.resize(o.width,o.height),n.attr("label/text",a.util.breakText(e.definition.get("name"),{width:o.width})),n.attr("body",{fill:Ce}),n.addTo(t),n}function Rm(e,t){e.getElements().filter((function(e){return e!==t})).filter((function(e){var t=e.component;return!t.node.isBpmnType("bpmn:BoundaryEvent")})).forEach((function(e){var n=e.component;t.embed(n.shape),n.node.pool=t}))}function Bm(e,t){e.fitEmbeds({padding:Uf+qf}),e.resize(e.getBBox().width-qf,e.getBBox().height-qf),e.resize(e.getBBox().width,e.getBBox().height-qf,{direction:"top"});var n=e.get("size"),o=n.width,i=n.height,r=t.diagram.bounds;e.resize(Math.max(o,r.width),Math.max(i,r.height))}function Lm(e,t,n){var o=Nm(t,n);return e||(Rm(n,o),Bm(o,t)),o}function jm(e){return e.component&&e.component.node.type!==Tl&&e.component.node.type!==Bf&&e.component.node.type!==Cm&&e.component.node.type!==Dm}var Fm={components:{CrownConfig:Zr,AddLaneAboveButton:am,AddLaneBelowButton:fm},props:["graph","node","nodes","id","collaboration","processes","moddle","processNode","rootElements","highlighted","nodeRegistry","paper","planeElements","isRendering","paperManager","nodeIdGenerator"],mixins:[Vs,$f,Je],data:function(){return{shape:null,definition:null,laneSet:null,isAddingLaneAbove:!1,anchorPointFunction:lt(20)}},computed:{containingProcess:function(){var e=this;return this.node.definition.get("processRef")?this.processes.find((function(t){return t.id===e.node.definition.get("processRef").id})):null}},watch:{"node.definition.name":function(e){this.shape.attr("label/text",e)}},methods:{addLaneAbove:function(){this.isAddingLaneAbove=!0,this.addLane()},addLaneBelow:function(){this.isAddingLaneAbove=!1,this.addLane()},sortedLanes:function(){return this.shape.getEmbeddedCells().filter((function(e){var t=e.component;return t&&t.node.type===Tl})).sort((function(e,t){return e.position().y-t.position().y}))},getElementsUnderArea:function(e,t){var n=e.getBBox(),o=n.x,i=n.y,r=n.width,s=n.height,a={x:o,y:i,width:r,height:s};return t.findModelsInArea(a)},moveEmbeddedElements:function(e,t){var n=this;this.getElementsUnderArea(e,this.graph).filter((function(t){return t.isEmbeddedIn(e)})).forEach((function(e){e.component.node.pool=t,Gr()(n.containingProcess.get("flowElements"),e.component.node.definition),t.component.containingProcess.get("flowElements").push(e.component.node.definition)}))},moveFlow:function(e,t){var n=e.component.node.definition;Gr()(this.containingProcess.get("flowElements"),n),t.component.containingProcess.get("flowElements").push(n)},moveElement:function(e,t){var n=e.component.node.definition;if(this.laneSet){var o=this.laneSet.get("lanes").find((function(e){return e.get("flowNodeRef").includes(n)}));Gr()(o.get("flowNodeRef"),n)}Gr()(this.containingProcess.get("flowElements"),n),t.component.containingProcess.get("flowElements").push(n),this.moveEmbeddedElements(e,t),e.component.node.pool=t,this.shape.unembed(e),t.component.addToPool(e)},addLane:function(){var e=this;return y(v().mark((function t(){var n,o;return v().wrap((function(t){while(1)switch(t.prev=t.next){case 0:return n=[],e.laneSet||(e.createLaneSet(),o=em.definition(e.moddle,e.$t),e.shape.getEmbeddedCells().filter((function(e){return jm(e)})).forEach((function(e){o.get("flowNodeRef").push(e.component.node.definition)})),n.push(e.pushNewLane(o))),n.push(e.pushNewLane()),t.next=5,Promise.all(n);case 5:e.$emit("set-shape-stacking",e.shape),e.graph.getLinks().forEach((function(t){e.$emit("set-shape-stacking",t)})),e.$emit("save-state");case 8:case"end":return t.stop()}}),t)})))()},createLaneSet:function(){var e=this.moddle.create("bpmn:LaneSet");this.laneSet=e;var t=this.nodeIdGenerator,n=t.generate(),o=mt(n,1),i=o[0];this.laneSet.set("id",i),this.containingProcess.get("laneSets").push(e)},pushNewLane:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:em.definition(this.moddle,this.$t);e.set("color",this.node.definition.get("color")),this.$emit("set-pool-target",this.shape);var t=em.diagram(this.moddle);return t.bounds.width=this.shape.getBBox().width,this.$emit("add-node",new Ro(em.id,e,t)),this.$nextTick()},addToPool:function(e){e.component.node.isBpmnType("bpmn:BoundaryEvent")||(this.shape.unembed(e),this.shape.embed(e),this.expandToFitElement(e,this.shape),e.component.node.type!==Tl&&this.laneSet&&this.updateLaneChildren())},positionAndSizeLane:function(e,t){var n=t.getBBox(),o=n.width,i=n.height,r=e.component.node.diagram.bounds;if(!r.x||!r.y){var s=1===t.getEmbeddedCells().filter((function(e){return e.component&&e.component.node.type===Tl})).length,a=s?i:r.height;e.resize(o-qf,a),e.position(qf,s?0:this.isAddingLaneAbove?-a:i,{parentRelative:!0}),t.resize(o,s?i:i+a,{direction:this.isAddingLaneAbove?"top-right":"bottom-right"}),this.fixResizeRounding(),this.updateAnchorPointPosition();var l=e.position(),c=l.x,d=l.y;r.set("x",c),r.set("y",d),r.set("width",e.get("size").width),r.set("height",e.get("size").height),bn.commit("updateNodeBounds",{node:this.node,bounds:t.getBBox()})}},expandToFitElement:function(e,t){if(e.component.node.type!==Vl){var n=t.getBBox(),o=n.x,i=n.y,r=n.width,s=n.height;if(e.component.node.type!==Tl){var a=e.get("size"),l=a.width,c=a.height,d=e.position(),u=d.x,p=d.y,h=u-o,f=p-i,m=h+l,g=h,v=f,b=f+c,y=0,w=0,x="bottom",k="right";m>r-Uf&&(y=m+Uf),g<qf+Uf&&(y=r+(qf+Uf-g),k="left"),v<Uf&&(w=Uf-v+s,x="top"),b>s-Uf&&(w=b+Uf),(y||w)&&(t.resize(Math.max(y,r),Math.max(w,s),{direction:"".concat(x,"-").concat(k)}),this.fixResizeRounding(),this.updateAnchorPointPosition(),this.laneSet&&(this.resizeLanes(),this.sortedLanes().forEach((function(e){bn.commit("updateNodeBounds",{node:e.component.node,bounds:e.getBBox()})}))),bn.commit("updateNodeBounds",{node:this.node,bounds:t.getBBox()}),this.$emit("save-state"))}else this.positionAndSizeLane(e,t)}},fillLanes:function(e,t,n){var o,i=this.shape.get("size").height,r=this.sortedLanes().reduce((function(e,t){return e+t.getBBox().height}),0),s=n?e.get("size").height:i-r;switch(t){case"top-right":o="bottom-right";break;case"top-left":o="bottom-left";break;case"bottom-right":o="top-right";break;case"bottom-left":o="top-left";break}var a=this.sortedLanes().indexOf(e),l=e.getBBox(),c=l.width,d=this.sortedLanes()[a+(t.includes("top")?-1:1)];d.resize(c,d.getBBox().height+s,{direction:o}),this.shape.resize(c+qf,i,{direction:o}),this.sortedLanes().forEach((function(e){return e.resize(c,e.getBBox().height,{direction:o})}))},resizeLanes:function(){var e=this;this.sortedLanes().forEach((function(t,n,o){var i=e.shape.get("size"),r=i.width,s=i.height,a=t.get("size"),l=a.height,c=t.position({parentRelative:!0}),d=c.y,u=l,p=d;if(0===n&&(u=l+t.position({parentRelative:!0}).y,p=0),n===o.length-1){var h=s-(t.position({parentRelative:!0}).y+l);u=l+h}t.resize(r-qf,u),t.position(qf,p,{parentRelative:!0})}))},captureChildren:function(){var e=this;this.graph.getElements().filter((function(t){var n=t.component;return n&&n!==e})).forEach((function(t){var n=t.component;n.node.isBpmnType("bpmn:BoundaryEvent")||(e.shape.embed(n.shape),n.node.pool=e.shape)})),this.$emit("set-shape-stacking",this.shape),this.resizePool(this.shape)},fitEmbeds:function(){this.shape.fitEmbeds({padding:Uf+qf}),this.shape.resize(this.shape.getBBox().width-qf,this.shape.getBBox().height-qf),this.shape.resize(this.shape.getBBox().width,this.shape.getBBox().height-qf,{direction:"top"})},resizePool:function(e){var t=this;this.fitEmbeds();var n=this.shape.get("size"),o=n.width,i=n.height,r=this.node.diagram.bounds;this.shape.resize(Math.max(o,r.width),Math.max(i,r.height)),this.shape.getEmbeddedCells().forEach((function(n){t.expandToFitElement(n,e)}));var s=this.shape.position(),a=s.x,l=s.y,c=this.shape.get("size"),d=c.width,u=c.height;this.node.diagram.bounds.x=a,this.node.diagram.bounds.y=l,this.node.diagram.bounds.width=d,this.node.diagram.bounds.height=u},updateLaneChildren:function(){var e=this,t={};this.shape.getEmbeddedCells().filter((function(t){return jm(t)&&t.component.node.pool===e.shape})).forEach((function(n){var o=e.graph.findModelsUnderElement(n,{searchBy:"center"}).find((function(e){return e.component&&e.component.node.type===Tl}));t[o.id]?t[o.id].push(n.component.node.definition):t[o.id]=[n.component.node.definition]})),this.sortedLanes().forEach((function(e){var n=t[e.id],o=e.component.node.definition.get("flowNodeRef"),i=n?n.length!==o.length:o.length>0;i&&bn.commit("updateNodeProp",{node:e.component.node,key:"flowNodeRef",value:n||[]})}))},hasPools:function(){return this.collaboration.get("participants").length>0},setPoolSize:function(e){var t=this;e.getEmbeddedCells().forEach((function(n){t.expandToFitElement(n,e)}));var n=e.position(),o=n.x,i=n.y,r=e.get("size"),s=r.width,a=r.height;this.node.diagram.bounds.x=o,this.node.diagram.bounds.y=i,this.node.diagram.bounds.width=s,this.node.diagram.bounds.height=a}},mounted:function(){this.$emit("set-pools",this.node.definition),this.laneSet=this.containingProcess.get("laneSets")[0],this.shape=Lm(this.collaboration,this.node,this.graph),this.shape.component=this,this.collaboration||this.captureChildren(),this.setPoolSize(this.shape),this.$emit("set-shape-stacking",this.shape)},beforeDestroy:function(){var e=this.collaboration.get("participants");Gr()(e,this.node.definition),this.hasPools()?Gr()(this.rootElements,this.containingProcess):this.$emit("unset-pools")},created:function(){this.$t=this.$t.bind(this)}},zm=Fm,qm=qn(zm,jf,Ff,!1,null,null,null),Hm=qm.exports,Vm={id:bi,component:Hm,bpmnType:"bpmn:Participant",control:!0,category:"BPMN",icon:h(77217),label:"Pool",rank:60,definition:function(e,t){return e.create("bpmn:Participant",{name:t("Pool")})},diagram:function(e){return e.create("bpmndi:BPMNShape",{bounds:e.create("dc:Bounds",{height:300,width:600})})},inspectorConfig:[{name:"Pool",items:[{component:"FormAccordion",container:!0,config:{initiallyOpen:!0,label:"Properties",icon:"cog",name:"inspector-accordion-pool"},items:[{component:"FormInput",config:Ys}]},ua,na]}]},Um=function(){var e=this,t=e._self._c;return t("b-card-footer",{staticClass:"p-0 border-0 statusbar d-flex align-items-center justify-content-end pr-3 pl-3 border-top"},[e._t("default"),t("b-btn",{staticClass:"mr-auto",attrs:{disabled:!e.xmlManager,variant:"secondary",size:"sm","data-test":"downloadXMLBtn"},on:{click:function(t){e.xmlManager&&e.xmlManager.download()}}},[t("i",{staticClass:"fas fa-download mr-1"}),e._v(" "+e._s(e.$t("Download BPMN"))+" ")]),t("div",{staticClass:"status-bar-container d-flex align-items-center justify-content-end"},[e.autoValidate?[0===e.numberOfProblemsToDisplay?t("button",{staticClass:"btn btn-light",attrs:{type:"button","data-test":"validation-list-valid",disabled:!0}},[e._v(" "+e._s(e.$t("BPMN Valid"))+" "),t("span",{staticClass:"badge badge-success badge-pill"},[t("font-awesome-icon",{attrs:{icon:e.faCheck}})],1)]):t("button",{staticClass:"btn btn-light",attrs:{type:"button","data-test":"validation-list-toggle"},on:{click:function(t){e.shouldDisplayProblemsPanel=!e.shouldDisplayProblemsPanel}}},[e._v(" "+e._s(e.$t("BPMN Issues"))+" "),t("span",{staticClass:"badge badge-primary badge-pill"},[e._v(" "+e._s(e.numberOfProblemsToDisplay)+" ")]),t("font-awesome-icon",{staticClass:"ml-3",attrs:{icon:e.chevronIcon}})],1)]:e._e(),t("span",{staticClass:"divider"}),t("b-form-checkbox",{staticClass:"h-100 d-flex align-items-center",attrs:{"data-test":"validation-toggle",switch:""},model:{value:e.autoValidate,callback:function(t){e.autoValidate=t},expression:"autoValidate"}},[e._v(" "+e._s(e.$t("Auto validate"))+" ")]),t("transition",{attrs:{name:"slide"}},[e.isProblemsPanelDisplayed?t("div",{staticClass:"validation-container position-absolute text-left"},[t("dl",{staticClass:"validation-container__list align-items-baseline",attrs:{"data-test":"validation-list"}},[e._l(e.errorList,(function(n,o){return[t("dt",{key:"".concat(n.errorId,"_").concat(o),staticClass:"text-capitalize"},[t("font-awesome-icon",{staticClass:"status-bar-container__status-icon ml-1 mr-1 mt-1",style:{color:e.isErrorCategory(n)?e.errorColor:e.warningColor},attrs:{icon:e.isErrorCategory(n)?e.faTimesCircle:e.faExclamationTriangle}}),e._v(" "+e._s(n.errorKey)+" ")],1),t("dd",{key:"".concat(n.errorId,"_").concat(o,"_dd")},[t("p",{staticClass:"pl-4 mb-0 font-italic"},[e._v(e._s(n.message)+".")]),n.id?t("p",{staticClass:"pl-4 mb-0"},[t("span",{staticClass:"font-weight-bold"},[e._v(e._s(e.$t("Node ID"))+":")]),e._v(" "+e._s(n.id))]):e._e()])]})),e._l(e.warnings,(function(n,o){return[t("dt",{key:n.title+o,staticClass:"text-capitalize"},[t("font-awesome-icon",{staticClass:"status-bar-container__status-icon ml-1 mr-1 mt-1",style:{color:e.warningColor},attrs:{icon:e.faExclamationTriangle}}),e._v(" "+e._s(n.title)+" ")],1),t("dd",{key:n.title+o+"__dd",staticClass:"font-italic pl-4"},[e._v(e._s(n.text))])]}))],2)]):e._e()])],2)],2)},Gm=[];h(86535),h(99244);function Wm(e){return Object.entries(e).flatMap((function(e){var t=mt(e,2),n=t[0],o=t[1];return o.flatMap((function(e){return yo(yo({},e),{},{errorKey:n},{errorId:"".concat(e.id,"_").concat(e.message.split(" ").join("_"))})}))}))}var $m={components:{FontAwesomeIcon:Zo.FontAwesomeIcon},props:["validationErrors","warnings","xmlManager"],data:function(){return{shouldDisplayProblemsPanel:!1,errorColor:"#D9534F",warningColor:"#F0AD4E",faExclamationTriangle:Mr.faExclamationTriangle,faTimesCircle:Mr.faTimesCircle,faChevronUp:Mr.faChevronUp,faChevronDown:Mr.faChevronDown,faCheck:Mr.faCheck}},computed:{autoValidate:{get:function(){return bn.getters.autoValidate},set:function(e){bn.commit("setAutoValidate",e)}},errorList:function(){return Wm(this.validationErrors)},numberOfProblemsToDisplay:function(){return this.errorList.length+this.warnings.length},isProblemsPanelDisplayed:function(){return this.shouldDisplayProblemsPanel&&this.numberOfProblemsToDisplay>0&&this.autoValidate},chevronIcon:function(){return this.shouldDisplayProblemsPanel?Mr.faChevronUp:Mr.faChevronDown}},methods:{isErrorCategory:function(e){return"error"===e.category}}},Xm=$m,Ym=(h(99088),qn(Xm,Um,Gm,!1,null,"1ad192c7",null)),Zm=Ym.exports,Km=function(){var e=this,t=e._self._c;return t("span",{attrs:{"data-test":"body-container"}},[e.showComponent?t("tool-bar",{attrs:{"canvas-drag-position":e.canvasDragPosition,cursor:e.cursor,"is-rendering":e.isRendering,"paper-manager":e.paperManager,"breadcrumb-data":e.breadcrumbData,panelsCompressed:e.panelsCompressed,"validation-errors":e.validationErrors,warnings:e.allWarnings,"xml-manager":e.xmlManager,validationBar:e.validationBar},on:{"load-xml":e.loadXML,"toggle-panels-compressed":function(t){e.panelsCompressed=!e.panelsCompressed},"toggle-mini-map-open":function(t){e.miniMapOpen=t},saveBpmn:e.saveBpmn,publishTemplate:e.publishTemplate,publishPmBlock:e.publishPmBlock,close:e.close,"save-state":e.pushToUndoStack,clearSelection:e.clearSelection}}):e._e(),t("b-row",{staticClass:"modeler h-100"},[e.tooltipTarget?t("b-tooltip",{key:e.tooltipTarget.id,attrs:{target:e.getTooltipTarget,title:e.tooltipTitle}}):e._e(),e.showComponent?t("explorer-rail",{attrs:{"node-types":e.nodeTypes,"pm-block-nodes":e.pmBlockNodes},on:{"set-cursor":function(t){e.cursor=t},onCreateElement:e.onCreateElementHandler}}):e._e(),t("b-col",{ref:"paper-container",staticClass:"paper-container h-100 pr-4",class:[e.cursor,{"grabbing-cursor":e.isGrabbing}],style:{width:e.parentWidth,height:e.parentHeight}},[t("div",{ref:"paper",staticClass:"main-paper",attrs:{"data-test":"paper"}})]),e.showComponent?t("InspectorButton",{attrs:{showInspector:e.isOpenInspector},on:{toggleInspector:e.handleToggleInspector}}):e._e(),e.showComponent?t("InspectorPanel",{directives:[{name:"show",rawName:"v-show",value:e.isOpenInspector&&!(e.highlightedNodes.length>1),expression:"isOpenInspector && !(highlightedNodes.length > 1)"}],ref:"inspector-panel",staticClass:"inspector h-100",style:{height:e.parentHeight},attrs:{nodeRegistry:e.nodeRegistry,moddle:e.moddle,definitions:e.definitions,processNode:e.processNode,"parent-height":e.parentHeight,"canvas-drag-position":e.canvasDragPosition},on:{"save-state":e.pushToUndoStack,"shape-resize":function(t){return e.shapeResize(!1)},toggleInspector:e.handleToggleInspector}}):e._e(),e._l(e.nodes,(function(n){return t(n.type,{key:n._modelerId,ref:"nodeComponent",refInFor:!0,tag:"component",attrs:{graph:e.graph,paper:e.paper,node:n,id:n.id,highlighted:e.highlightedNodes.includes(n),"has-error":e.invalidNodes.includes(n),"border-outline":e.borderOutline(n.id),collaboration:e.collaboration,"process-node":e.processNode,processes:e.processes,"plane-elements":e.planeElements,moddle:e.moddle,nodeRegistry:e.nodeRegistry,"root-elements":e.definitions.get("rootElements"),isRendering:e.isRendering,paperManager:e.paperManager,"auto-validate":e.autoValidate,"node-id-generator":e.nodeIdGenerator,"is-active":n===e.activeNode,"is-completed":e.requestCompletedNodes.includes(n.definition.id),"is-in-progress":e.requestInProgressNodes.includes(n.definition.id),"is-idle":e.requestIdleNodes.includes(n.definition.id)},on:{"add-node":e.addNode,"remove-node":e.removeNode,"set-cursor":function(t){e.cursor=t},"set-pool-target":function(t){e.poolTarget=t},"unset-pools":e.unsetPools,clearSelection:e.clearSelection,"set-pools":e.setPools,"save-state":e.pushToUndoStack,"set-shape-stacking":e.setShapeStacking,setTooltip:function(t){e.tooltipTarget=t},"replace-node":e.replaceNode,"replace-generic-flow":e.replaceGenericFlow,"copy-element":e.copyElement,"copy-selection":e.copyElement,"paste-element":e.pasteElements,"clone-element":e.cloneElement,"clone-selection":e.cloneSelection,"default-flow":e.toggleDefaultFlow,"shape-resize":e.shapeResize}})})),t("RailBottom",{attrs:{nodeTypes:e.nodeTypes,"paper-manager":e.paperManager,graph:e.graph,"is-rendering":e.isRendering},on:{"load-xml":e.loadXML,clearSelection:e.clearSelection,"set-cursor":function(t){e.cursor=t},onCreateElement:e.onCreateElementHandler}}),e.paper?t("selection",{ref:"selector",attrs:{graph:e.graph,paperManager:e.paperManager,useModelGeometry:!1,processNode:e.processNode},on:{"clone-selection":e.cloneSelection,"remove-nodes":e.removeNodes,"save-state":e.pushToUndoStack}}):e._e()],2)],1)},Jm=[],Qm=function(){var e=this,t=e._self._c;return t("crown-config",e._g({attrs:{highlighted:e.highlighted,paper:e.paper,graph:e.graph,shape:e.shape,node:e.node,nodeRegistry:e.nodeRegistry,moddle:e.moddle,collaboration:e.collaboration,"process-node":e.processNode,"plane-elements":e.planeElements,"is-rendering":e.isRendering}},e.$listeners))},eg=[],tg=a.shapes.standard.Circle.extend({markup:[{tagName:"circle",selector:"body"},{tagName:"circle",selector:"body2"},{tagName:"text",selector:"label"},{tagName:"image",selector:"image"}],defaults:a.util.deepSupplement({type:"processmaker.components.nodes.boundaryEvent.Shape",size:{width:36,height:36},attrs:{label:{refY:"130%"},body:{stroke:"#212529",strokeWidth:.85,fill:"#FFF"},body2:{cx:18,cy:18,r:15,strokeWidth:.85,stroke:"#212529",fill:"#FFF"},image:{refX:5,refY:5,ref:"circle",width:26,height:26}}},a.shapes.standard.Circle.prototype.defaults)}),ng={components:{CrownConfig:Zr},props:["graph","node","id","highlighted","nodeRegistry","moddle","paper","collaboration","processNode","planeElements","isRendering","isActive"],mixins:[Vs,Je,as],data:function(){return{shape:null,previousPosition:null,validPosition:null,invalidTargetElement:null}},watch:{"node.definition.name":function(e){this.shape.attr("label/text",e)},"node.definition.cancelActivity":function(e){this.toggleInterruptingStyle(e)}},methods:{getTaskUnderShape:function(){return this.graph.findModelsUnderElement(this.shape).find((function(e){return Qi(e.component)}))},setShapeBorderDashSpacing:function(e){this.shape.attr({body:{strokeDasharray:e},body2:{strokeDasharray:e}})},setSolidShapeBorder:function(){var e=0;this.setShapeBorderDashSpacing(e)},setDashedShapeBorder:function(){var e=5;this.setShapeBorderDashSpacing(e)},toggleInterruptingStyle:function(){this.node.definition.cancelActivity?this.setSolidShapeBorder():this.setDashedShapeBorder()},setShapeProperties:function(){var e=this.node.diagram.bounds,t=e.x,n=e.y,o=e.width,i=e.height;this.shape.position(t,n),this.shape.resize(o,i),this.shape.attr("label/text",this.node.definition.get("name")),this.shape.component=this},hasPositionChanged:function(){if(!this.previousPosition)return!0;var e=this.shape.position(),t=e.x,n=e.y,o=this.previousPosition,i=o.x,r=o.y;return t!==i||n!==r},getCenterPosition:function(){var e=this.shape.position(),t=e.x,n=e.y,o=this.shape.size(),i=o.width,r=o.height;return{x:t+i/2,y:n+r/2}},updateShapePosition:function(e){if(this.hasPositionChanged()){var t=rt(this.getCenterPosition(),e),n=t.x,o=t.y,i=this.shape.size(),r=i.width,s=i.height;this.shape.position(n-r/2,o-s/2),this.previousPosition=this.shape.position()}},attachBoundaryEventToTask:function(e){if(e){var t=this.shape.getParentCell();t&&t.unembed(this.shape),e.embed(this.shape),this.node.definition.set("attachedToRef",e.component.node.definition)}},resetToInitialPosition:function(){this.shape.position(this.validPosition.x,this.validPosition.y),bn.commit("allowSavingElementPosition"),this.$emit("shape-resize")},moveBoundaryEventIfOverTask:function(){var e=this.getTaskUnderShape();er(this.node.type,e)?(this.attachBoundaryEventToTask(e),this.updateShapePosition(e),this.$emit("shape-resize")):this.resetToInitialPosition()},resetInvalidTarget:function(){this.invalidTargetElement&&(ut(this.invalidTargetElement),this.invalidTargetElement=null,this.$emit("shape-resize"))},attachToValidTarget:function(e){var t=this;e.model===this.shape&&(bn.commit("preventSavingElementPosition"),this.validPosition=this.shape.position(),this.shape.listenToOnce(this.paper,"cell:pointerup blank:pointerup",(function(){t.moveBoundaryEventIfOverTask(),t.resetInvalidTarget(),bn.commit("allowSavingElementPosition")})))},turnInvalidTargetRed:function(){if(this.isActive){var e=this.graph.findModelsUnderElement(this.shape).filter((function(e){return e.component}))[0],t=this.invalidTargetElement===e;if(!t){var n=this.shape.getParentCell();e&&e!==n&&!er(this.node.type,e)&&e.attr("body/fill",fe),this.invalidTargetElement&&ut(this.invalidTargetElement),this.invalidTargetElement=e}}}},mounted:function(){var e=this;return y(v().mark((function t(){var n;return v().wrap((function(t){while(1)switch(t.prev=t.next){case 0:return e.shape=new tg,e.setShapeProperties(),e.shape.addTo(e.graph),t.next=5,e.$nextTick();case 5:e.toggleInterruptingStyle(),n=e.getTaskUnderShape(),e.attachBoundaryEventToTask(n),e.updateShapePosition(n);case 9:case"end":return t.stop()}}),t)})))()}},og=ng,ig=qn(og,Qm,eg,!1,null,null,null),rg=ig.exports,sg={id:"processmaker-modeler-boundary-event",component:rg,bpmnType:"bpmn:BoundaryEvent",control:!0,category:"BPMN",label:"Boundary Event",definition:function(e,t){return e.create("bpmn:BoundaryEvent",{name:t("Boundary Event"),cancelActivity:!0})},diagram:function(e){return e.create("bpmndi:BPMNShape",{bounds:e.create("dc:Bounds",{height:36,width:36})})},validateIncoming:function(){return!1},inspectorConfig:[{name:"Boundary Event",items:[{component:"FormAccordion",container:!0,config:{initiallyOpen:!0,label:"Properties",icon:"cog",name:"inspector-accordion-boundary-event"},items:[{component:"FormInput",config:Ys}]}]}]},ag=h(67629),lg=h.n(ag),cg=function(){var e=this,t=e._self._c;return t("div",{directives:[{name:"show",rawName:"v-show",value:e.explorerOpen,expression:"explorerOpen"}],attrs:{id:"explorer-rail","data-test":"explorer-rail"}},[t("div",{staticClass:"rail-menu"},[t("b-tabs",{staticClass:"tabs--container",attrs:{"no-nav-style":!0}},[e._l(e.tabs,(function(n){return[t("b-tab",{key:n.idx,attrs:{title:e.$t(n.label),active:n.idx===e.tabIndex},on:{click:function(t){return e.setTabIndex(n.idx)}}})]}))],2),t("div",{staticClass:"close--container",on:{click:function(t){return e.closeRail()}}},[t("font-awesome-icon",{attrs:{icon:e.faTimes()}})],1)],1),t("div",{directives:[{name:"show",rawName:"v-show",value:0===e.tabIndex,expression:"tabIndex === 0"}],staticClass:"node-types__container"},[t("filter-node-types",{attrs:{type:"object"}}),t("node-types-loop",e._g({},e.$listeners))],1),t("div",{directives:[{name:"show",rawName:"v-show",value:1===e.tabIndex,expression:"tabIndex === 1"}],staticClass:"pm-blocks__container"},[t("filter-node-types",{attrs:{type:"pmBlock"}}),t("pm-blocks-loop",e._g({},e.$listeners))],1)])},dg=[],ug=5e3;vt().use(un);var pg=new un.Store({state:{nodeTypes:[],pinnedNodeTypes:[],filteredNodeTypes:[],pmBlockNodeTypes:[],filteredPmBlockNodeTypes:[],explorerOpen:!1,searchTerm:"",selectedNode:null,ghostNode:null},getters:{getNodeTypes:function(e){return e.nodeTypes},getPinnedNodeTypes:function(e){return e.pinnedNodeTypes},getFilteredNodeTypes:function(e){return e.filteredNodeTypes},getExplorerOpen:function(e){return e.explorerOpen},getSearchTerm:function(e){return e.searchTerm},getPmBlockNodeTypes:function(e){return e.pmBlockNodeTypes},getFilteredPmBlockNodeTypes:function(e){return e.filteredPmBlockNodeTypes},getSelectedNode:function(e){return e.selectedNode},getGhostNode:function(e){return e.ghostNode}},mutations:{setNodeTypes:function(e,t){e.nodeTypes=t.filter((function(e){return e.control})).map((function(e){var t;return{id:(0,Un.uniqueId)("nodeType_"),type:e.id,icon:e.icon,label:e.label,bpmnType:e.bpmnType,rank:e.rank||ug,items:null===(t=e.items)||void 0===t?void 0:t.map((function(e){return yo(yo({},e),{},{type:e.id})}))}})).sort((function(e,t){return e.rank-t.rank}))},setPinnedNodes:function(e,t){e.pinnedNodeTypes.push(t),e.pinnedNodeTypes=(0,Un.uniqBy)(e.pinnedNodeTypes,"type"),e.pinnedNodeTypes.sort((function(e,t){return e.rank-t.rank}))},setUnpinNode:function(e,t){e.pinnedNodeTypes=e.pinnedNodeTypes.filter((function(e){return e!==t}))},setFilteredNodeTypes:function(e,t){var n=e.pinnedNodeTypes,o=e.nodeTypes;e.searchTerm=t;var i=(0,Un.uniqBy)([].concat(m(n),m(o)),"id");e.filteredNodeTypes=i.filter((function(e){return e.label.toLowerCase().includes(t.toLowerCase())}))},setPmBlockNodeTypes:function(e,t){e.pmBlockNodeTypes=t.filter((function(e){return e.control})).map((function(e){var t;return{id:(0,Un.uniqueId)("pmBlockNode_"),type:e.id,icon:e.icon,customIcon:e.customIcon,svgIcon:e.svgIcon,label:e.label,description:e.description,bpmnType:e.bpmnType,rank:e.rank||ug,items:null===(t=e.items)||void 0===t?void 0:t.map((function(e){return yo(yo({},e),{},{type:e.id})}))}})).sort((function(e,t){return e.rank-t.rank}))},setFilteredPmBlockNodeTypes:function(e,t){var n=e.pmBlockNodeTypes;e.searchTerm=t;var o=(0,Un.uniqBy)(m(n),"id");e.filteredPmBlockNodeTypes=o.filter((function(e){return e.label.toLowerCase().includes(t.toLowerCase())}))},clearFilteredNodes:function(e){e.filteredNodeTypes=[],e.searchTerm=""},clearFilteredPmBlockNodes:function(e){e.filteredNodeTypes=[],e.filteredPmBlockNodeTypes=[],e.searchTerm=""},closeExplorer:function(e){e.explorerOpen=!1},toggleExplorer:function(e){e.explorerOpen=!e.explorerOpen},setSelectedNode:function(e,t){e.selectedNode=t},clearSelectedNode:function(e){e.selectedNode=null},setGhostNode:function(e,t){e.ghostNode=t}},actions:{getUserPinnedObjects:function(e){var t=e.commit;if(window.ProcessMaker.user){var n=window.ProcessMaker.user?window.ProcessMaker.user.id:"";window.ProcessMaker.apiClient.get("/users/".concat(n,"/get_pinnned_controls")).then((function(e){var n=e.data;n.forEach((function(e){t("setPinnedNodes",e)}))})).catch((function(e){console.error(e)}))}else{var o=localStorage.pinnedNodes?JSON.parse(localStorage.pinnedNodes):[];o.forEach((function(e){t("setPinnedNodes",e)}))}},addUserPinnedObject:function(e,t){var n=e.commit,o=e.state;n("setPinnedNodes",t);var i=o.pinnedNodeTypes;if(window.ProcessMaker.user){var r=window.ProcessMaker.user?window.ProcessMaker.user.id:"";window.ProcessMaker.apiClient.put("/users/".concat(r,"/update_pinned_controls"),{pinnedNodes:i}).catch((function(e){console.error(e)}))}else localStorage.pinnedNodes=JSON.stringify(i)},removeUserPinnedObject:function(e,t){var n=e.commit,o=e.state;n("setUnpinNode",t);var i=o.pinnedNodeTypes;if(window.ProcessMaker.user){var r=window.ProcessMaker.user?window.ProcessMaker.user.id:"";window.ProcessMaker.apiClient.put("/users/".concat(r,"/update_pinned_controls"),{pinnedNodes:i}).catch((function(e){console.error(e)}))}else localStorage.pinnedNodes=JSON.stringify(i)}}}),hg=function(){var e=this,t=e._self._c;return t("div",{attrs:{id:"searchNodeTypes"}},[t("label",{staticClass:"position-relative d-block"},[t("i",{staticClass:"fas fa-search position-absolute h-100 text-muted ml-2"}),t("b-input",{attrs:{placeholder:e.placeholder},model:{value:e.searchTerm,callback:function(t){e.searchTerm=t},expression:"searchTerm"}})],1)])},fg=[],mg={name:"FilterNodeTypes",props:["type"],data:function(){return{searchTerm:""}},watch:{searchTerm:function(e){"pmBlock"===this.type?(0===e.length&&pg.commit("clearFilteredPmBlockNodes"),e.length>0&&pg.commit("setFilteredPmBlockNodeTypes",e)):(0===e.length&&pg.commit("clearFilteredNodes"),e.length>0&&pg.commit("setFilteredNodeTypes",e))},type:function(e,t){this.searchTerm=t===e?this.searchTerm:""}},computed:{nodeTypes:function(){var e=pg.getters.getPinnedNodeTypes,t=pg.getters.getNodeTypes;return[].concat(m(e),m(t))},pmBlockNodes:function(){var e=pg.getters.getPmBlockNodeTypes;return m(e)},placeholder:function(){return"pmBlock"===this.type?this.$t("Search PM Blocks"):this.$t("Search Objects")}}},gg=mg,vg=(h(29062),qn(gg,hg,fg,!1,null,"c468f432",null)),bg=vg.exports,yg=function(){var e=this,t=e._self._c;return t("div",{attrs:{id:"nodeTypesList"}},[e.filteredNodes.length>0?t("div",{attrs:{id:"filteredNodes-container"}},[e._l(e.filteredNodes,(function(n){return[t("div",{key:n.id,staticClass:"node-types__item",attrs:{"data-test":n.type},on:{mouseover:function(t){e.showPin=!0},mouseleave:function(t){e.showPin=!1},click:function(t){return t.target!==t.currentTarget?null:e.onClickHandler(t,n)}}},[t("img",{staticClass:"node-types__item__icon",attrs:{src:n.icon,alt:e.$t(n.label)}}),t("span",[e._v(e._s(e.$t(n.label)))]),e.nodeTypeAlreadyPinned(n,n.type)?t("img",{staticClass:"pinIcon",attrs:{src:e.pinFillIcon,alt:"Unpin Element"},on:{click:function(t){return e.unPin(n)}}}):t("img",{staticClass:"pinIcon",attrs:{src:e.pinIcon,alt:"Pin Element"},on:{click:function(t){return e.addPin(n)}}})])]}))],2):e._e(),0!==e.filteredNodes.length||e.searchTerm?e._e():[e.pinnedObjects.length>0?t("div",{staticClass:"pinnedObjects"},[t("p",[e._v(e._s(e.$t("Pinned Objects")))]),e._l(e.pinnedObjects,(function(n){return[t("div",{key:n.id,staticClass:"node-types__item",attrs:{"data-test":n.type},on:{mouseover:function(t){e.showPin=!0},mouseleave:function(t){e.showPin=!1},click:function(t){return t.stopPropagation(),e.onClickHandler(t,n)}}},[t("img",{staticClass:"node-types__item__icon",attrs:{src:n.icon,alt:e.$t(n.label)}}),t("span",[e._v(e._s(e.$t(n.label)))]),t("img",{staticClass:"pinIcon",attrs:{src:e.pinFillIcon,alt:"Pin/Unpin Element"},on:{click:function(t){return e.unPin(n)}}})])]}))],2):e._e(),t("div",{staticClass:"objectCategory"},[t("p",[e._v(e._s(e.$t("Object Category")))]),e._l(e.unpinnedObjects,(function(n){return[t("div",{key:n.id,staticClass:"node-types__item",attrs:{"data-test":n.type},on:{mouseover:function(t){e.showPin=!0},mouseleave:function(t){e.showPin=!1},click:function(t){return t.stopPropagation(),e.onClickHandler(t,n)}}},[t("img",{staticClass:"node-types__item__icon",attrs:{src:n.icon,alt:e.$t(n.label)}}),t("span",[e._v(e._s(e.$t(n.label)))]),t("img",{staticClass:"pinIcon",attrs:{src:e.pinIcon,alt:"Pin/Unpin Element"},on:{click:function(t){return e.addPin(n)}}})])]}))],2)]],2)},wg=[],xg=h.p+"img/pin-angle.95ef112b.svg",kg=h.p+"img/pin-angle-fill.45c5a07f.svg",Cg={data:function(){return{wasClicked:!1,selectedSubmenuItem:null,xOffset:0,yOffset:0,helperStyles:{backgroundColor:"#ffffff",position:"absolute",height:"40px",width:"40px",zIndex:"10",opacity:"0.5",pointerEvents:"none"},popperType:null}},methods:{onClickHandler:function(e,t){var n=this;this.createDraggingHelper(e,t),document.addEventListener("mousemove",this.setDraggingPosition),this.setDraggingPosition(e),this.selectedItem&&this.selectedItem.type===t.type?this.deselect():(this.wasClicked=!0,pg.commit("setSelectedNode",t),this.$emit("onSetCursor","crosshair"),this.parent||(this.popperType=t.type),window.ProcessMaker.EventBus.$on("custom-pointerclick",(function(e){window.ProcessMaker.EventBus.$off("custom-pointerclick"),document.removeEventListener("mousemove",n.setDraggingPosition),n.movedElement&&document.body.removeChild(n.movedElement),n.popperType=null,n.selectedSubmenuItem=null,n.onCreateElement(e),pg.commit("clearSelectedNode"),pg.commit("setGhostNode",null),n.$emit("onSetCursor","none")})))},onCreateElement:function(e){this.wasClicked&&this.selectedItem&&(this.parent&&(this.parent=null),this.$emit("onCreateElement",{event:e,control:this.selectedItem}),this.wasClicked=!1,e.preventDefault())},setDraggingPosition:function(e){var t=e.pageX,n=e.pageY,o=this.movedElement;o&&(o.style.left="".concat(t,"px"),o.style.top="".concat(n,"px")),pg.commit("setGhostNode",o)},createDraggingHelper:function(e,t){var n=this;this.movedElement&&(document.removeEventListener("mousemove",this.setDraggingPosition),document.body.removeChild(this.movedElement),pg.commit("setGhostNode",null));var o=e.target;pg.commit("setGhostNode",document.createElement("img"));var i=this.movedElement;Object.keys(this.helperStyles).forEach((function(e){i.style[e]=n.helperStyles[e]})),i.src=t.icon,pg.commit("setGhostNode",i),document.body.appendChild(this.movedElement),this.xOffset=e.clientX-o.getBoundingClientRect().left,this.yOffset=e.clientY-o.getBoundingClientRect().top},deselect:function(){window.ProcessMaker.EventBus.$off("custom-pointerclick"),document.removeEventListener("mousemove",this.setDraggingPosition),this.movedElement&&document.body.removeChild(this.movedElement),this.$emit("onSetCursor","none"),this.wasClicked=!1,pg.commit("clearSelectedNode"),pg.commit("setGhostNode",null)}},computed:{selectedItem:function(){return pg.getters.getSelectedNode},movedElement:function(){return pg.getters.getGhostNode}}},Sg={name:"NodeTypesLoop",mixins:[Cg],data:function(){return{pinIcon:xg,pinFillIcon:kg,showPin:!1}},created:function(){pg.dispatch("getUserPinnedObjects")},methods:{nodeTypeAlreadyPinned:function(e,t){return!!this.pinnedObjects.find((function(e){return e.type===t}))},unPin:function(e){return this.deselect(),pg.dispatch("removeUserPinnedObject",e)},addPin:function(e){return this.deselect(),pg.dispatch("addUserPinnedObject",e)}},computed:{pinnedObjects:function(){return pg.getters.getPinnedNodeTypes},objects:function(){return pg.getters.getNodeTypes},unpinnedObjects:function(){var e=this,t=this.objects;return t.filter((function(t){return!e.pinnedObjects.some((function(e){return e.type===t.type}))}))},filteredNodes:function(){return pg.getters.getFilteredNodeTypes},searchTerm:function(){return pg.getters.getSearchTerm}}},Eg=Sg,Ag=(h(3410),qn(Eg,yg,wg,!1,null,null,null)),Mg=Ag.exports,Tg=function(){var e=this,t=e._self._c;return t("div",{attrs:{id:"pmBlockNodeTypesList"}},[e.filteredPmBlockNodes.length>0?t("div",{attrs:{id:"filteredPmBlockNodes-container"}},[e._l(e.filteredPmBlockNodes,(function(n){return[t("div",{key:n.id,staticClass:"node-types__item",on:{click:function(t){return t.stopPropagation(),e.onClickHandler(t,n)}}},[t("div",{staticClass:"d-flex"},[n.svgIcon?t("img",{staticClass:"node-types__item__icon",attrs:{src:n.svgIcon,alt:e.$t(n.label)}}):t("i",{staticClass:"node-types__item__icon",class:n.customIcon}),t("label",[e._v(e._s(e.$t(n.label)))])])])]}))],2):e._e(),0!==e.filteredPmBlockNodes.length||e.searchTerm?e._e():[t("div",{staticClass:"pmBlocksContainer p-2"},[e._l(e.pmBlockNodeTypes,(function(n){return[t("div",{key:n.id,staticClass:"pm-block-node-types__item p-2 d-block",on:{click:function(t){return t.stopPropagation(),e.onClickHandler(t,n)}}},[t("div",{staticClass:"d-flex"},[n.svgIcon?t("img",{staticClass:"node-types__item__icon",attrs:{src:n.svgIcon,alt:e.$t(n.label)}}):t("i",{staticClass:"node-types__item__icon",class:n.customIcon}),t("label",[e._v(e._s(e.$t(n.label)))])])])]}))],2)]],2)},_g=[],Pg={name:"PmBlocksLoop",mixins:[Cg],computed:{pmBlockNodeTypes:function(){return pg.getters.getPmBlockNodeTypes},filteredPmBlockNodes:function(){return pg.getters.getFilteredPmBlockNodeTypes},searchTerm:function(){return pg.getters.getSearchTerm}}},Og=Pg,Dg=(h(48649),qn(Og,Tg,_g,!1,null,null,null)),Ig=Dg.exports,Ng={name:"ExplorerRail",props:{explorerExpanded:{type:Boolean},nodeTypes:{type:Array},pmBlockNodes:{type:Array}},components:{FontAwesomeIcon:Zo.FontAwesomeIcon,FilterNodeTypes:bg,NodeTypesLoop:Mg,PmBlocksLoop:Ig},data:function(){return{tabs:[{idx:0,label:"Add Object"},{idx:1,label:"PM Blocks"}],tabIndex:0}},computed:{explorerOpen:function(){return pg.getters.getExplorerOpen}},created:function(){pg.commit("setNodeTypes",this.nodeTypes)},methods:{faTimes:function(){return Mr.faTimes},setTabIndex:function(e){this.tabIndex!==e&&(this.tabIndex=e,this.clearFilteredObjects())},closeRail:function(){pg.commit("closeExplorer"),this.clearFilteredObjects()},clearFilteredObjects:function(){pg.commit("clearFilteredNodes"),pg.commit("clearFilteredPmBlockNodes")}}},Rg=Ng,Bg=(h(14906),qn(Rg,cg,dg,!1,null,null,null)),Lg=Bg.exports,jg=h(82729),Fg=h.n(jg),zg=function(){var e=this,t=e._self._c;return t("button",{staticClass:"inspector-button",attrs:{type:"button","data-cy":"inspector-button"},on:{click:e.toggleInspector}},[t("inline-svg",{attrs:{src:e.inspectorIcon}})],1)},qg=[];const Hg={};function Vg(e){return Object.keys(e).reduce(((t,n)=>(!1!==e[n]&&null!==e[n]&&void 0!==e[n]&&(t[n]=e[n]),t)),{})}const Ug={name:"InlineSvg",inheritAttrs:!1,render(e){return this.svgElSource?e("svg",{on:this.$listeners,attrs:Object.assign(this.getSvgAttrs(this.svgElSource),Vg(this.$attrs)),domProps:{innerHTML:this.getSvgContent(this.svgElSource)}}):null},props:{src:{type:String,required:!0},title:{type:String},transformSource:{type:Function,default:e=>e},keepDuringLoading:{type:Boolean,default:!0}},data(){return{svgElSource:null}},watch:{src(e){this.getSource(e)}},mounted(){this.getSource(this.src)},methods:{getSvgAttrs(e){let t={};const n=e.attributes;if(!n)return t;for(let o=n.length-1;o>=0;o--)t[n[o].name]=n[o].value;return t},getSvgContent(e){return e=e.cloneNode(!0),e=this.transformSource(e),this.title&&Gg(e,this.title),e.innerHTML},getSource(e){Hg[e]||(Hg[e]=this.download(e)),this.svgElSource&&Hg[e].getIsPending()&&!this.keepDuringLoading&&(this.svgElSource=null,this.$emit("unloaded")),Hg[e].then((e=>{this.svgElSource=e,this.$nextTick((()=>{this.$emit("loaded",this.$el)}))})).catch((t=>{this.svgElSource&&(this.svgElSource=null,this.$emit("unloaded")),delete Hg[e],this.$emit("error",t)}))},download(e){return Wg(new Promise(((t,n)=>{const o=new XMLHttpRequest;o.open("GET",e,!0),o.onload=()=>{if(o.status>=200&&o.status<400)try{const e=new DOMParser,i=e.parseFromString(o.responseText,"text/xml");let r=i.getElementsByTagName("svg")[0];r?t(r):n(new Error('Loaded file is not valid SVG"'))}catch(e){n(e)}else n(new Error("Error loading SVG"))},o.onerror=n,o.send()})))}}};function Gg(e,t){const n=e.getElementsByTagName("title");if(n.length)n[0].textContent=t;else{const n=document.createElementNS("http://www.w3.org/2000/svg","title");n.textContent=t,e.insertBefore(n,e.firstChild)}}function Wg(e){if(e.getIsPending)return e;let t=!0,n=e.then((e=>(t=!1,e)),(e=>{throw t=!1,e}));return n.getIsPending=function(){return t},n}var $g={components:{InlineSvg:Ug},props:{showInspector:{type:Boolean,default:!0}},data:function(){return{inspectorIcon:h(28400)}},methods:{toggleInspector:function(){this.$emit("toggleInspector",!this.showInspector)}}},Xg=$g,Yg=(h(5728),qn(Xg,zg,qg,!1,null,"cebfb20a",null)),Zg=Yg.exports,Kg=function(){var e=this,t=e._self._c;return t("transition",{attrs:{name:"inspector"}},[t("b-col",{staticClass:"pl-0 h-100 overflow-hidden inspector-column",class:[{"ignore-pointer":e.canvasDragPosition}],attrs:{id:"inspector","data-test":"inspector-column"}},[t("b-card",{staticClass:"inspector-container border-top-0 border-bottom-0 border-right-0 rounded-0",style:{height:e.parentHeight},attrs:{"no-body":"","data-test":"inspector-container","data-cy":"inspector-panel"},scopedSlots:e._u([{key:"header",fn:function(){return[t("div",{staticClass:"inspector-header"},[t("div",{staticClass:"inspector-header-title"},[e._v(" "+e._s(e.$t("Configuration"))+" ")]),t("button",{staticClass:"close",attrs:{type:"button","aria-label":"Close","data-cy":"inspector-close-button"},on:{click:e.onClose}},[e._v(" × ")])])]},proxy:!0}])},[e.highlightedNode?t("vue-form-renderer",{key:e.highlightedNode._modelerId,ref:"formRenderer",staticClass:"overflow-auto h-100 inspector-font-size",attrs:{data:e.data,config:e.config},on:{update:e.updateDefinition},nativeOn:{focusout:function(t){return e.updateState.apply(null,arguments)}}}):e._e()],1)],1)],1)},Jg=[],Qg=h(43637),ev=h(21223),tv=(h(85780),h(50308)),nv=h.n(tv),ov={id:"processmaker-modeler-process",bpmnType:"bpmn:Process",control:!1,label:"Process",inspectorConfig:[{name:"Process Information",items:[{component:"FormAccordion",container:!0,config:{initiallyOpen:!0,label:"Properties",icon:"cog",name:"inspector-accordion-process"},items:[{component:"FormInput",config:ns},{component:"FormInput",config:{label:"Name",helper:"The Name of the Process",name:"name",placeholder:""}}]}]}]},iv=ov.id,rv=ov;vt().component("FormText",Qg.renderer.FormText),vt().component("FormInput",ev.FormInput),vt().component("FormSelect",ev.FormSelect),vt().component("FormTextArea",ev.FormTextArea),vt().component("FormCheckbox",ev.FormCheckbox),vt().component("FormRadioButtonGroup",ev.FormRadioButtonGroup),vt().component("FormAccordion",ev.FormAccordion),vt().component("FormDatePicker",ev.FormDatePicker),vt().component("FormMultiSelect",ev.FormMultiSelect);var sv={props:["nodeRegistry","moddle","processNode","parentHeight","canvasDragPosition","definitions"],data:function(){return{data:{},config:[],inspectorHandler:null,translated:[],isVisible:!0}},watch:{highlightedNode:function(){document.activeElement.blur(),this.prepareData(),this.prepareConfig()},"highlightedNode.definition.assignment":function(e,t){this.handleAssignmentChanges(e,t)},"highlightedNode.definition.assignmentLock":function(e,t){this.handleAssignmentChanges(e,t)},"highlightedNode.definition.allowReassignment":function(e,t){this.handleAssignmentChanges(e,t)},"highlightedNode.definition.assignedUsers":function(e,t){this.handleAssignmentChanges(e,t)},"highlightedNode.definition.assignedGroups":function(e,t){this.handleAssignmentChanges(e,t)},"highlightedNode.definition.assignmentRules":function(e,t){this.handleAssignmentChanges(e,t)}},computed:{highlightedNode:function(){return bn.getters.highlightedNodes[0]},isAnyNodeActive:function(){return this.highlightedNode},updateDefinition:function(){var e=this;if(!this.isAnyNodeActive)return nv();var t=this.defaultInspectorHandler;return this.isProcessNodeActive&&(t=this.processNodeInspectorHandler),this.hasCustomInspectorHandler&&(t=this.customInspectorHandler),function(n){if(n){if(sa()(n.documentation)&&x()(e.highlightedNode.definition.get("documentation")[0],"text")!==n.documentation){var o=n.documentation?[e.moddle.create("bpmn:Documentation",{text:n.documentation})]:void 0;e.setNodeProp(e.highlightedNode,"documentation",o)}t(Ma()(n,["documentation"]))}}},hasCustomInspectorHandler:function(){return this.nodeRegistry[this.highlightedNode.type].inspectorHandler},isProcessNodeActive:function(){return this.highlightedNode===this.processNode}},methods:{onClose:function(){this.$emit("toggleInspector",!1)},handleAssignmentChanges:function(e,t){e!==t&&this.prepareData()},prepareConfig:function(){if(!this.highlightedNode)return this.config={name:"Empty",items:[]};var e=this.highlightedNode,t=e.type,n=e.definition;if(this.highlightedNode===this.processNode)return this.config=rv.inspectorConfig;var o=No()(this.nodeRegistry[t].inspectorConfig),i=x()(o,"[0].items[0].items");if(this.isSequenceFlow(t)&&this.isConnectedToGateway(n)){var r=this.$t("Enter the expression that describes the workflow condition");r+=' <a href="https://docs.processmaker.com/designing-processes/expression-syntax-components" target="_blank"><i class="far fa-question-circle mr-1"></a>';var s={component:"FormInput",config:{label:this.$t("Expression"),helper:r,name:"conditionExpression"}},a=i.find((function(e){return e.config&&"Name"===e.config.label})),l=i.indexOf(a);a&&l>=0?i.splice(l+1,0,s):i.push(s)}return this.config=o},prepareData:function(){if(!this.highlightedNode)return{};var e=this.highlightedNode&&this.highlightedNode.type,t=function(e){return Object.entries(e.definition).reduce((function(e,t){var n=mt(t,2),o=n[0],i=n[1];return e[o]=i,e}),{})};this.data=e&&this.nodeRegistry[e].inspectorData?this.nodeRegistry[e].inspectorData(this.highlightedNode,t,this):t(this.highlightedNode)},isSequenceFlow:function(e){return e===Nl},isConnectedToGateway:function(e){return["bpmn:ExclusiveGateway","bpmn:InclusiveGateway"].includes(e.sourceRef.$type)},isConnectedToSubProcess:function(e){return"bpmn:CallActivity"===e.targetRef.$type},customInspectorHandler:function(e){return this.nodeRegistry[this.highlightedNode.type].inspectorHandler(e,this.highlightedNode,this.setNodeProp,this.moddle,this.definitions,this.defaultInspectorHandler)},processNodeInspectorHandler:function(e){return this.defaultInspectorHandler(Ma()(e,["artifacts","flowElements","laneSets"]))},setNodeProp:function(e,t,n){this.$emit("shape-resize"),bn.commit("updateNodeProp",{node:e,key:t,value:n})},defaultInspectorHandler:function(e){for(var t in Ma()(e,["$type","eventDefinitions"]))this.highlightedNode.definition.get(t)!==e[t]&&this.setNodeProp(this.highlightedNode,t,e[t])},updateState:function(){this.$emit("save-state")}}},av=sv,lv=(h(97896),qn(av,Kg,Jg,!1,null,"738023ac",null)),cv=lv.exports;vt().use(un);var dv=new un.Store({state:{stack:[],position:null,disabled:!1,isVersionsInstalled:!1,isDraft:!1,isLoading:!1},getters:{canUndo:function(e){return e.position>0},canRedo:function(e){return e.position<e.stack.length-1},currentState:function(e){return e.stack[e.position]},isVersionsInstalled:function(e){return e.isVersionsInstalled},isDraft:function(e){return e.isDraft},isLoading:function(e){return e.isLoading}},mutations:{setPosition:function(e,t){e.position=t},setState:function(e,t){e.stack=e.stack.slice(0,e.position+1),e.stack.push(t)},clearStack:function(e){e.stack=[e.stack[e.stack.length-1]]},disableSavingState:function(e){e.disabled=!0},enableSavingState:function(e){e.disabled=!1},isVersionsInstalled:function(e,t){e.isVersionsInstalled=t},isDraft:function(e,t){e.isDraft=t},isLoading:function(e,t){e.isLoading=t}},actions:{pushState:function(e,t){var n=e.state,o=e.getters,i=e.commit;t===o.currentState||n.disabled||(i("setState",t),i("setPosition",n.stack.length-1))},undo:function(e){var t=e.state,n=e.getters,o=e.commit;n.canUndo&&o("setPosition",t.position-1)},redo:function(e){var t=e.state,n=e.getters,o=e.commit;n.canRedo&&o("setPosition",t.position+1)},enableVersions:function(e){var t=e.commit;t("isVersionsInstalled",!0)},setVersionIndicator:function(e,t){var n=e.commit;n("isDraft",t)},setLoadingState:function(e,t){var n=e.commit;n("isLoading",t)}}}),uv=h(51540),pv=h(51248),hv=h.n(pv),fv=h(48909),mv=h.n(fv),gv=h(82317),vv=h.n(gv),bv=h(83184),yv=h.n(bv),wv=h(36111),xv=h.n(wv),kv=h(25795),Cv=h.n(kv),Sv=h(37554),Ev=h.n(Sv),Av=h(19869),Mv=h.n(Av),Tv=h(88687),_v=h.n(Tv),Pv=h(37028),Ov=h.n(Pv),Dv=h(89185),Iv=h.n(Dv),Nv=h(34652),Rv=h.n(Nv),Bv=h(49252),Lv=h.n(Bv),jv=h(93414),Fv=h.n(jv),zv=h(68522),qv=h.n(zv),Hv=h(7174),Vv=h.n(Hv),Uv=h(74815),Gv=h.n(Uv),Wv=h(24874),$v=h.n(Wv),Xv={};function Yv(){}Yv.prototype.resolveRule=function(e,t){const n=Xv[e+"/"+t];if(!n)throw new Error("cannot resolve rule <"+e+"/"+t+">");return n},Yv.prototype.resolveConfig=function(e,t){throw new Error("cannot resolve config <"+t+"> in <"+e+">")};var Zv=new Yv,Kv={"conditional-flows":"error","end-event-required":"error","event-sub-process-typed-start-event":"error","label-required":"error","no-complex-gateway":"error","no-disconnected":"error","no-gateway-join-fork":"error","no-implicit-split":"error","single-event-definition":"error","start-event-required":"error","sub-process-blank-start-event":"error","superfluous-gateway":"warning","processmaker/custom-validation":"error","processmaker/gateway-direction":"error","processmaker/event-based-gateway":"error","processmaker/call-activity-child-process":"error","processmaker/id-required":"error","processmaker/signal-ref-required":"error"},Jv={rules:Kv},Qv={resolver:Zv,config:Jv},eb=Qv;function tb(e,t,n,o,i,r,s){var a={allowDrop:!1,poolTarget:null};if(!sb(e,t,s))return a.allowDrop=!1,a;if(ib(n.type))return a.allowDrop=!0,a;if(ab(n.bpmnType)){var l=i.findModelsFromPoint(lb(e,t,o)).sort((function(e,t){return t.get("z")-e.get("z")}))[0];return a.allowDrop=er(n.type,l),a}if(rb(r))return a.allowDrop=!0,a;if(nb(n.bpmnType))return a.allowDrop=!0,a;var c=ob(e,t,o,i);return c&&(a.allowDrop=!0,a.poolTarget=c),a}function nb(e){return"bpmn:TextAnnotation"===e}function ob(e,t,n,o){return o.findModelsFromPoint(lb(e,t,n)).find((function(e){var t=e.component;return t&&t.node.type===bi}))}function ib(e){return e===bi}function rb(e){return!e||0===e.get("participants").length}function sb(e,t,n){var o=n.getBoundingClientRect(),i=o.left,r=o.top,s=o.width,l=o.height,c=new a.g.rect(i,r,s,l),d=new a.g.Point(e,t);return c.containsPoint(d)}function ab(e){return"bpmn:BoundaryEvent"===e}function lb(e,t,n){return n.clientToLocalPoint({x:e,y:t})}Xv["bpmnlint/conditional-flows"]=hv(),Xv["bpmnlint/end-event-required"]=mv(),Xv["bpmnlint/event-sub-process-typed-start-event"]=vv(),Xv["bpmnlint/label-required"]=yv(),Xv["bpmnlint/no-complex-gateway"]=xv(),Xv["bpmnlint/no-disconnected"]=Cv(),Xv["bpmnlint/no-gateway-join-fork"]=Ev(),Xv["bpmnlint/no-implicit-split"]=Mv(),Xv["bpmnlint/single-event-definition"]=_v(),Xv["bpmnlint/start-event-required"]=Ov(),Xv["bpmnlint/sub-process-blank-start-event"]=Iv(),Xv["bpmnlint/superfluous-gateway"]=Rv(),Xv["bpmnlint-plugin-processmaker/custom-validation"]=Lv(),Xv["bpmnlint-plugin-processmaker/gateway-direction"]=Fv(),Xv["bpmnlint-plugin-processmaker/event-based-gateway"]=qv(),Xv["bpmnlint-plugin-processmaker/call-activity-child-process"]=Vv(),Xv["bpmnlint-plugin-processmaker/id-required"]=Gv(),Xv["bpmnlint-plugin-processmaker/signal-ref-required"]=$v();var cb,db,ub,pb,hb,fb,mb,gb,vb,bb,yb,wb,xb=h(7407),kb=h.n(xb),Cb={extends:rg,mixins:[ya],data:function(){return{nodeIcon:kb()}}},Sb=Cb,Eb=qn(Sb,cb,db,!1,null,null,null),Ab=Eb.exports,Mb="processmaker-modeler-boundary-error-event",Tb=Ea()(No()(sg),{id:Mb,component:Ab,control:!1,label:"Boundary Error Event",icon:h(43634),definition:function(e,t){return e.create("bpmn:BoundaryEvent",{name:t("Boundary Error Event"),eventDefinitions:[e.create("bpmn:ErrorEventDefinition")]})},inspectorConfig:[{items:[{items:[{}]},ua,na]}]}),_b={extends:rg,mixins:[ya],data:function(){return{nodeIcon:Ep()}},mounted:function(){this.shape.attr({image:{"ref-x":4,"ref-y":4,width:18,height:18}})}},Pb=_b,Ob=qn(Pb,ub,pb,!1,null,null,null),Db=Ob.exports,Ib={component:"FormCheckbox",config:{label:"Interrupting",name:"cancelActivity",helper:"Select to interrupt the current Request workflow and route to the alternate workflow, thereby preventing parallel workflow"}},Nb=Ib,Rb="processmaker-modeler-boundary-conditional-event",Bb=Ea()(No()(sg),yo(yo({},Op),{},{id:Rb,component:Db,control:!1,label:"Boundary Conditional Event",definition:function(e,t){return e.create("bpmn:BoundaryEvent",{name:t("Boundary Conditional Event"),cancelActivity:!0,eventDefinitions:[e.create("bpmn:ConditionalEventDefinition",{condition:e.create("bpmn:FormalExpression",{body:""})})]})},inspectorConfig:[{items:[{items:[{}].concat(m(Pp()),[Nb])},na,ua]}]})),Lb=h.p+"img/boundary-escalation-icon.c999a95e.svg",jb={extends:rg,mounted:function(){this.shape.attr("image/xlink:href",Lb)},methods:{isValidBoundaryEventTarget:function(e){return tr(e.component)}}},Fb=jb,zb=qn(Fb,hb,fb,!1,null,null,null),qb=zb.exports,Hb="processmaker-modeler-boundary-escalation-event",Vb=Ea()(No()(sg),{id:Hb,component:qb,control:!1,label:"Boundary Escalation Event",icon:h(62442),definition:function(e,t){return e.create("bpmn:BoundaryEvent",{name:t("Boundary Escalation Event"),cancelActivity:!0,eventDefinitions:[e.create("bpmn:EscalationEventDefinition")]})},inspectorConfig:[{items:[{items:[{},Nb]},ua,na]}]}),Ub=h(81146),Gb=h.n(Ub),Wb={extends:rg,mixins:[ya],data:function(){return{nodeIcon:Gb()}},methods:{isValidBoundaryEventTarget:function(e){var t=e.component;return t&&t.node.isBpmnType("bpmn:CallActivity")}},mounted:function(){var e=Iu();this.shape.attr(e)}},$b=Wb,Xb=qn($b,mb,gb,!1,null,null,null),Yb=Xb.exports,Zb="processmaker-modeler-boundary-message-event",Kb=Ea()(No()(sg),yo(yo({},sc),{},{id:Zb,component:Yb,control:!1,label:"Boundary Message Event",icon:h(52018),definition:function(e,t){return e.create("bpmn:BoundaryEvent",{name:t("Boundary Message Event"),cancelActivity:!0,eventDefinitions:[e.create("bpmn:MessageEventDefinition")]})},inspectorConfig:[{items:[{items:[{},Nb,oc("Message that will trigger this boundary event")]},ua,na]}]})),Jb=h(16221),Qb=h.n(Jb),ey={extends:rg,mixins:[ya],data:function(){return{nodeIcon:Qb()}},mounted:function(){var e=this.node.diagram.bounds;this.shape.resize(e.get("width"),e.get("height")),this.shape.attr({image:{"ref-x":3,"ref-y":1,width:e.get("width")-15,height:e.get("height")-15}})}},ty=ey,ny=qn(ty,vb,bb,!1,null,null,null),oy=ny.exports,iy="processmaker-modeler-boundary-signal-event",ry=Ea()(No()(sg),yo(yo({},kc),{},{id:iy,component:oy,control:!1,label:"Boundary Signal Event",icon:h(34070),definition:function(e,t){return e.create("bpmn:BoundaryEvent",{name:t("Boundary Signal Event"),cancelActivity:!0,eventDefinitions:[e.create("bpmn:SignalEventDefinition")]})},inspectorConfig:[{items:[{items:[{},Nb,xc("Signal that will trigger this boundary event")]},ua,na]}]})),sy=h(50889),ay=h.n(sy),ly={extends:rg,mixins:[ya],data:function(){return{nodeIcon:ay()}},methods:{addTimerEventDefinitionId:function(){var e="".concat(this.id,"_timer_event_definition");this.node.definition.get("eventDefinitions")[0].id=e}},mounted:function(){this.addTimerEventDefinitionId()}},cy=ly,dy=qn(cy,yb,wb,!1,null,null,null),uy=dy.exports,py="processmaker-modeler-boundary-timer-event",hy=Ea()(No()(sg),{id:py,component:uy,control:!1,label:"Boundary Timer Event",icon:h(99400),definition:function(e,t){return e.create("bpmn:BoundaryEvent",{name:t("Boundary Timer Event"),cancelActivity:!0,eventDefinitions:[e.create("bpmn:TimerEventDefinition",{timeDuration:e.create("bpmn:Expression",{body:Eu})})]})},inspectorData:function(e){return Object.entries(e.definition).reduce((function(e,t){var n=mt(t,2),o=n[0],i=n[1];if("eventDefinitions"===o){var r=Object.keys(i[0])[1],s=i[0][r].body;e[o]={type:r,body:s}}else e[o]=i;return e}),{})},inspectorHandler:function(e,t,n,o){var i=t.definition;for(var r in e)if(i[r]!==e[r])if("eventDefinitions"===r){var s=e[r],a=s.type,l=s.body,c=i.get(r)[0][a];if(c&&c.body===l)continue;var d=_e({},a,o.create("bpmn:Expression",{body:l})),u=[o.create("bpmn:TimerEventDefinition",d)];u[0].id=t.definition.get("eventDefinitions")[0].id,n(t,"eventDefinitions",u)}else n(t,r,e[r])},inspectorConfig:[{items:[{items:[{},Nb]},{component:"FormAccordion",container:!0,config:{label:"Timing Control",icon:"clock",name:"inspector-accordion-boundary-timer-event"},items:[{component:Pu,config:{label:"Name",helper:"Time expression",name:"eventDefinitions"}}]},na,ua]}]});function fy(e,t,n){var o=Mh(e,t,"set");return Dh(e,o,n),n}var my=new WeakMap,gy=function(){function e(t){wo(this,e),Eh(this,my,{writable:!0,value:void 0}),_e(this,"preventTranslate",!1),fy(this,my,t)}return ko(e,[{key:"paper",get:function(){return Th(this,my)}},{key:"scale",get:function(){return Th(this,my).scale()},set:function(e){Th(this,my).scale(e),Th(this,my).trigger("scale:changed")}},{key:"roundToNearestGridMultiple",value:function(t){return Math.round(t/e.gridSize)*e.gridSize}},{key:"ceilToNearestGridMultiple",value:function(t){return Math.ceil(t/e.gridSize)*e.gridSize}},{key:"translate",value:function(e,t){this.preventTranslate||(Th(this,my).translate(e,t),Th(this,my).trigger("translate:changed"))}},{key:"addEventHandler",value:function(e,t,n){Th(this,my).on(e,t,n)}},{key:"addOnceHandler",value:function(e,t){Th(this,my).once(e,t)}},{key:"removeEventHandler",value:function(e,t,n){Th(this,my).off(e,t,n)}},{key:"setPaperDimensions",value:function(e,t){Th(this,my).setDimensions(e,t)}},{key:"performAtomicAction",value:function(){var e=y(v().mark((function e(t){return v().wrap((function(e){while(1)switch(e.prev=e.next){case 0:return Th(this,my).freeze(),e.next=3,t(Th(this,my));case 3:Th(this,my).unfreeze();case 4:case"end":return e.stop()}}),e,this)})));function t(t){return e.apply(this,arguments)}return t}()},{key:"clientToGridPoint",value:function(e,t){var n=Th(this,my).localToPagePoint(0,0),o=this.scale;return{x:this.roundToNearestGridMultiple((e-n.x)/o.sx),y:this.roundToNearestGridMultiple((t-n.y)/o.sy)}}},{key:"setStateInvalid",value:function(){this.paper.drawBackground({color:fe})}},{key:"setStateValid",value:function(){this.paper.drawBackground({color:me})}},{key:"awaitScheduledUpdates",value:function(){var e=this;return Th(this,my)._updates.priorities.some((function(e){return!a.util.isEmpty(e)}))?new Promise((function(t){e.addOnceHandler("render:done",t)})):Promise.resolve()}}],[{key:"factory",value:function(t,n,o){var i=3,r=new a.dia.Paper({async:!0,el:t,model:o,sorting:"sorting-approximate",gridSize:e.gridSize,drawGrid:!0,snapLinks:!1,snapElements:!1,clickThreshold:10,perpendicularLinks:!0,interactive:n,highlighting:{default:{options:{padding:i}}}});return r.translate(168,20),new this(r)}}]),e}();function vy(e,t,n){var o=wy(e,t,n);yy(o,t),e.inspectorConfig[0].items.sort(by)}function by(e,t){return xy(e)?1:xy(t)?-1:0}function yy(e,t){var n=e.findIndex((function(e){var n=!t.container&&t.config&&e.config&&t.config.name&&t.config.name===e.config.name;return t.id&&t.id===e.id||n}));-1!==n?e[n]=t:e.push(t)}function wy(e,t,n){return"undefined"!==typeof t.container?e.inspectorConfig[0].items:n?(e=e.inspectorConfig[0],n.split(".").forEach((function(t){e=e&&e.items.find((function(e){return e.config&&e.config.name===t}))})),e?e.items:null):e.inspectorConfig[0].items[0].items}function xy(e){return e.config&&"Advanced"===e.config.label}function ky(e,t){Ty(e)&&Sy(e);var n=My(e);n&&Sy(n),Cy(e)&&!Ty(e)&&Ey(e),Ay(t)}function Cy(e){return e.component.node.type!==Tl}function Sy(e){Ey(e);var t=e.component.node.definition.processRef&&e.component.node.definition.processRef.laneSets[0];if(t){var n=e.getEmbeddedCells().filter((function(e){return e.component&&e.component.node.type===Tl})),o=e.getEmbeddedCells().filter((function(e){return e.component&&e.component.node.type!==Tl}));n.forEach(Ey),o.forEach(Ey)}}function Ey(e){e.toFront({deep:!0})}function Ay(e){e.getLinks().forEach(Ey)}function My(e){return e.component.node.pool}function Ty(e){return e.component.node.type===bi}_e(gy,"gridSize",zp);var _y=function(){var e=this,t=e._self._c;return t("b-row",{staticClass:"w-100 m-0"},[t("div",{staticClass:"toolbar d-flex justify-content-between align-items-center border-top border-bottom",class:{"ignore-pointer":e.canvasDragPosition},attrs:{role:"toolbar","aria-label":"Toolbar"}},[t("breadcrumb",{attrs:{"breadcrumb-data":e.breadcrumbData}}),t("div",{staticClass:"d-flex mr-3"},[t("TopRail",{attrs:{"validation-errors":e.validationErrors,warnings:e.warnings}},e._l(e.validationBar,(function(e,n){return t(e.button,{key:"validation-status-".concat(n),tag:"component"})})),1),t("div",{staticClass:"d-flex align-items-center btn-group btn-group-sm",attrs:{role:"group","aria-label":"Publish controls","data-cy":"publish-control"}},[t("div",{staticClass:"divider"}),e.isVersionsInstalled?[t("div",{staticClass:"toolbar-item toolbar-version-status",attrs:{"data-cy":"publish-version-status"}},[e._v(" "+e._s(e.versionStatus)+" ")]),t("div",{staticClass:"toolbar-item toolbar-loading-status",attrs:{"data-cy":"publish-loading-status"}},[t("span",[e._v(" "+e._s(e.loadingStatus)+" ")]),t("font-awesome-icon",{staticClass:"text-success",attrs:{icon:e.loadingIcon,spin:e.isLoading}})],1),t("a",{staticClass:"toolbar-item toolbar-publish",attrs:{title:e.$t("Publish"),"data-cy":"publish-btn"},on:{click:function(t){return e.$emit("saveBpmn")}}},[e._v(" "+e._s(e.$t("Publish"))+" ")]),t("a",{staticClass:"toolbar-item toolbar-close",attrs:{title:e.$t("Close"),"data-cy":"close-btn"},on:{click:function(t){return e.$emit("close")}}},[e._v(" "+e._s(e.$t("Close"))+" ")]),t("EllipsisMenu",{attrs:{actions:e.ellipsisMenuActions,divider:!1,"data-cy":"ellipsis-menu"},on:{navigate:e.onNavigate,show:e.onShow,hide:e.onHide}})]:[t("button",{directives:[{name:"b-tooltip",rawName:"v-b-tooltip.hover",modifiers:{hover:!0}}],staticClass:"save-button",attrs:{"data-test":"mini-map-btn",title:e.$t("Save")},on:{click:function(t){return e.$emit("saveBpmn")}}},[t("font-awesome-icon",{attrs:{icon:e.saveIcon}}),t("span",{staticClass:"save-button-label"},[e._v(e._s(e.$t("Save")))])],1),t("b-btn",{staticClass:"ml-1 rounded",attrs:{disabled:!e.xmlManager,variant:"secondary",size:"sm","data-test":"downloadXMLBtn"},on:{click:function(t){e.xmlManager&&e.xmlManager.download()}}},[t("i",{staticClass:"fas fa-download mr-1"}),e._v(" "+e._s(e.$t("Download BPMN"))+" ")]),t("b-btn",{directives:[{name:"b-modal",rawName:"v-b-modal",value:"uploadmodal",expression:"'uploadmodal'"}],staticClass:"ml-1 rounded",attrs:{variant:"secondary",size:"sm"}},[t("i",{staticClass:"fas fa-upload mr-1"}),e._v(" "+e._s(e.$t("Upload XML"))+" ")])]],2)],1)],1)])},Py=[],Oy=function(){var e=this,t=e._self._c;return t("nav",{attrs:{id:"breadcrumbs"}},[e.breadcrumbData.length>0?t("ol",{staticClass:"breadcrumb"},[e._m(0),e._l(e.breadcrumbData[0],(function(n,o){return t("li",{key:o,staticClass:"breadcrumb-item"},[n.url?t("a",{attrs:{href:n.url}},[e._v(e._s(n.text))]):e._e(),n.url?e._e():t("span",[e._v(e._s(n.text))])])}))],2):e._e()])},Dy=[function(){var e=this,t=e._self._c;return t("li",{staticClass:"breadcrumb-item"},[t("a",{attrs:{href:"/"}},[t("i",{staticClass:"fas fa-home"})])])}],Iy={name:"breadcrumb",props:{breadcrumbData:{type:Array,default:function(){return[]}}}},Ny=Iy,Ry=(h(61573),qn(Ny,Oy,Dy,!1,null,"d1e148b4",null)),By=Ry.exports,Ly=function(){var e=this,t=e._self._c;return t("div",{staticClass:"top-rail-container"},[t("ValidateIssue",{directives:[{name:"show",rawName:"v-show",value:e.isOpenIssue,expression:"isOpenIssue"}],attrs:{"number-of-errors":e.numberOfErrors},on:{openPanel:e.handleOpenPanel}}),t("ValidateButton",{on:{openIssue:e.handleOpenIssue}}),t("ValidatePanel",{directives:[{name:"show",rawName:"v-show",value:e.isOpenIssue&&e.isOpenPanel,expression:"isOpenIssue && isOpenPanel"}],attrs:{"error-list":e.errorList,warnings:e.warnings}}),e._t("default")],2)},jy=[],Fy=function(){var e=this,t=e._self._c;return t("button",{directives:[{name:"b-tooltip",rawName:"v-b-tooltip.hover.viewport.d50",value:{customClass:"no-pointer-events"},expression:"{ customClass: 'no-pointer-events' }",modifiers:{hover:!0,viewport:!0,d50:!0}}],class:["validate-button",{"validate-button-active":e.isOpen}],attrs:{type:"button",title:e.$t("Auto validate"),"data-cy":"validate-button"},on:{click:function(t){return t.preventDefault(),e.handleOpen.apply(null,arguments)}}},[t("inline-svg",{attrs:{src:e.isOpen?e.validateOpenIcon:e.validateCloseIcon}})],1)},zy=[],qy={components:{InlineSvg:Ug},data:function(){return{isOpen:!1,validateCloseIcon:h(13828),validateOpenIcon:h(78540)}},methods:{handleOpen:function(){this.isOpen=!this.isOpen,this.$emit("openIssue",this.isOpen)}},mounted:function(){var e=this;window.ProcessMaker.EventBus.$on("save-changes-activate-autovalidate",(function(){e.handleOpen()}))}},Hy=qy,Vy=(h(70947),qn(Hy,Fy,zy,!1,null,"5880bbc6",null)),Uy=Vy.exports,Gy=function(){var e=this,t=e._self._c;return t("button",{staticClass:"issue-box",attrs:{type:"button",disabled:0===e.numberOfErrors,"data-cy":"validate-issue-button"},on:{click:function(t){return t.preventDefault(),e.handleOpen.apply(null,arguments)}}},[t("span",{staticClass:"issue-title"},[e._v("Issues")]),t("span",{staticClass:"issue-badge"},[e._v(e._s(e.numberOfErrors))]),t("span",{staticClass:"issue-icon"},[t("inline-svg",{attrs:{src:e.isOpen?e.issueOpenIcon:e.issueCloseIcon}})],1)])},Wy=[],$y={components:{InlineSvg:Ug},props:{numberOfErrors:{type:Number,required:!0}},data:function(){return{isOpen:!1,issueCloseIcon:h(61339),issueOpenIcon:h(68058)}},watch:{numberOfErrors:function(e){0===e&&(this.isOpen=!1)}},methods:{handleOpen:function(){this.isOpen=!this.isOpen,this.$emit("openPanel",this.isOpen)}}},Xy=$y,Yy=(h(59724),qn(Xy,Gy,Wy,!1,null,"337583fe",null)),Zy=Yy.exports,Ky=function(){var e=this,t=e._self._c;return t("div",{staticClass:"validate-container",attrs:{"data-cy":"validate-panel"}},[e._l(e.errorList,(function(n,o){return t("div",{key:"".concat(n.errorId,"_").concat(o),staticClass:"validate-item-box"},[t("vue-inline-svg",{attrs:{src:e.issueIcon}}),t("div",{staticClass:"validate-item-info"},[t("div",{staticClass:"validate-item-title"},[e._v(e._s(n.errorKey))]),t("div",{staticClass:"validate-item-description"},[e._v(e._s(n.message)+".")]),n.id?t("div",{staticClass:"validate-item-node"},[t("span",{staticClass:"validate-item-node-title"},[e._v(e._s(e.$t("Node ID"))+":")]),e._v(" "+e._s(n.id)+" ")]):e._e()])],1)})),e._l(e.warnings,(function(n,o){return t("div",{key:n.title+o,staticClass:"validate-item-box"},[t("vue-inline-svg",{attrs:{src:e.issueIcon}}),t("div",{staticClass:"validate-item-info"},[t("div",{staticClass:"validate-item-title"},[e._v(e._s(n.title))]),t("div",{staticClass:"validate-item-description"},[e._v(e._s(n.text)+".")])])],1)}))],2)},Jy=[],Qy={components:{VueInlineSvg:Ug},props:{errorList:{type:Array,required:!0},warnings:{type:Array,required:!0}},data:function(){return{issueIcon:h(4298)}}},ew=Qy,tw=(h(95254),qn(ew,Ky,Jy,!1,null,"0722e36d",null)),nw=tw.exports,ow={components:{ValidateButton:Uy,ValidateIssue:Zy,ValidatePanel:nw},props:{validationErrors:{type:Object,required:!0},warnings:{type:Array,required:!0}},data:function(){return{isOpenIssue:!1,isOpenPanel:!1}},computed:{errorList:function(){return Object.entries(this.validationErrors).flatMap((function(e){var t=mt(e,2),n=t[0],o=t[1];return o.flatMap((function(e){return yo(yo({},e),{},{errorKey:n},{errorId:"".concat(e.id,"_").concat(e.message.split(" ").join("_"))})}))}))},numberOfErrors:function(){return this.errorList.length+this.warnings.length}},watch:{numberOfErrors:function(e){0===e&&(this.isOpenPanel=!1)}},methods:{handleOpenIssue:function(e){this.isOpenIssue=e,bn.commit("setAutoValidate",this.isOpenIssue)},handleOpenPanel:function(e){this.isOpenPanel=e}}},iw=ow,rw=(h(16254),qn(iw,Ly,jy,!1,null,"78331cf6",null)),sw=rw.exports,aw={name:"tool-bar",components:{Breadcrumb:By,TopRail:sw,FontAwesomeIcon:Zo.FontAwesomeIcon},props:["canvasDragPosition","cursor","paperManager","isRendering","breadcrumbData","panelsCompressed","validationErrors","warnings","xmlManager","validationBar"],watch:{miniMapOpen:function(e){this.$emit("toggle-mini-map-open",e)},canUndo:function(e){e||this.$root.$emit("bv::hide::tooltip")},canRedo:function(e){e||this.$root.$emit("bv::hide::tooltip")}},computed:{canUndo:function(){return dv.getters.canUndo},canRedo:function(){return dv.getters.canRedo},versionStatus:function(){var e=dv.getters.isDraft?"Draft":"Published";return this.$t(e)},isVersionsInstalled:function(){return dv.getters.isVersionsInstalled},isLoading:function(){return dv.getters.isLoading},loadingStatus:function(){var e=this.isLoading?"Saving":"Saved";return this.$t(e)},loadingIcon:function(){return this.isLoading?this.spinner:this.savedIcon}},data:function(){return{plusIcon:Mr.faPlus,minusIcon:Mr.faMinus,scale:1,initialScale:1,minimumScale:.2,scaleStep:.1,mapIcon:Mr.faMapMarked,miniMapOpen:!1,compressIcon:Mr.faCompress,expandIcon:Mr.faExpand,undoIcon:Mr.faUndo,redoIcon:Mr.faRedo,saveIcon:Mr.faSave,savedIcon:Mr.faCheckCircle,spinner:Mr.faSpinner,ellipsisMenuActions:[{value:"save-template",content:this.$t("Save as Template"),icon:""},{value:"save-pm-block",content:this.$t("Save as PM Block"),icon:""},{value:"discard-draft",content:this.$t("Discard Draft"),icon:""}]}},methods:{undo:function(){var e=this;this.$emit("clearSelection"),this.isRendering||dv.dispatch("undo").then((function(){return e.$emit("load-xml")}))},redo:function(){var e=this;this.$emit("clearSelection"),this.isRendering||dv.dispatch("redo").then((function(){return e.$emit("load-xml")}))},onNavigate:function(e){switch(e.value){case"discard-draft":window.ProcessMaker.EventBus.$emit("open-versions-discard-modal");break;case"save-template":this.$emit("publishTemplate");break;case"save-pm-block":this.$emit("publishPmBlock");break;default:break}},onShow:function(){var e=document.getElementById("inspector");e&&(e.style.zIndex="1")},onHide:function(){var e=document.getElementById("inspector");e&&(e.style.zIndex="2")}},mounted:function(){var e,t=null===(e=this.$root.$children[0])||void 0===e?void 0:e.process,n=this.ellipsisMenuActions.findIndex((function(e){return"save-template"===e.value}));null!==t&&void 0!==t&&t.is_template&&this.ellipsisMenuActions.splice(n,1),"PM_BLOCK"===(null===t||void 0===t?void 0:t.asset_type)&&this.ellipsisMenuActions.splice(n,2)}},lw=aw,cw=(h(91503),qn(lw,_y,Py,!1,null,null,null)),dw=cw.exports;function uw(e,t){var n=function(e){return e.isBpmnType("bpmn:MessageFlow",$n,Kn)||e.isType("processmaker-modeler-pool")};if(!n(e))if(e.isType("processmaker-modeler-lane"))t.get("laneSets")[0].get("lanes").push(e.definition);else{var o="flowElements";(e.isBpmnType("bpmn:TextAnnotation")||e.isBpmnType("bpmn:Association"))&&(o="artifacts"),t.get(o).push(e.definition)}}var pw={methods:{zoomInOutHandler:function(e,t){var n="+"===e.key||"NumpadAdd"===e.key||107===e.keyCode||187===e.keyCode,o="-"===e.key||"NumpadSubtract"===e.key||109===e.keyCode||189===e.keyCode;n&&t.mod&&this.zoomIn(e),o&&t.mod&&this.zoomOut(e)},zoomIn:function(e){e.preventDefault(),this.canvasScale=this.paperManager.scale.sx+this.scaleStep},zoomOut:function(e){e.preventDefault(),this.canvasScale=Math.max(this.minimumScale,this.paperManager.scale.sx-=this.scaleStep)}}},hw={methods:{copyPasteHandler:function(e,t){var n=e.target.nodeName.toLowerCase(),o="body"===n,i=e.key.toLowerCase(),r="c"===i,s="v"===i;o&&r&&t.mod&&this.copy(e),o&&s&&t.mod&&this.paste(e)},copy:function(e){e.preventDefault(),window.ProcessMaker.$modeler.copyElement()},paste:function(e){e.preventDefault(),window.ProcessMaker.$modeler.pasteElements()}}},fw=(h(51532),gy.gridSize/2),mw=new Map;mw.set("Up",[0,-fw]),mw.set("Down",[0,fw]),mw.set("Left",[-fw,0]),mw.set("Right",[fw,0]);var gw=["PoolLane","processmaker.components.nodes.boundaryEvent.Shape"];function vw(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:function(){};if(bw(e)){var o=t.filter(yw);if(0!==o.length){var i=ww(e),r=mt(i,2),s=r[0],a=r[1];o.forEach((function(e){e.translate(s,a,{movedWithArrowKeys:!0}),kw(e)})),n()}}}function bw(e){var t=["up","down","left","right"];return t.some((function(t){return e.toLowerCase().includes(t)}))}function yw(e){return e&&!gw.includes(e.get("type"))}function ww(e){var t=e.match(/^(?:Arrow)?(Up|Down|Left|Right)$/);return null!==t?mw.get(t[1]):[0,0]}function xw(e){return!e||"processmaker.modeler.bpmn.pool"!==e.get("type")}function kw(e){var t=e.getParentCell();xw(t)||(t.component.expandToFitElement(e,t),t.component.laneSet&&t.component.updateLaneChildren())}var Cw={methods:{escapeKeyHandler:function(e){this.selectedNode&&(e.preventDefault(),window.ProcessMaker.EventBus.$emit("custom-pointerclick",e))}},computed:{selectedNode:function(){return pg.getters.getSelectedNode},movedElement:function(){return pg.getters.getGhostNode}}},Sw={mixins:[pw,hw,Cw],computed:{clientLeftPaper:function(){return bn.getters.clientLeftPaper}},mounted:function(){document.addEventListener("keydown",this.keydownListener),document.addEventListener("keyup",this.keyupListener)},methods:{handleHotkeys:function(e,t){this.zoomInOutHandler(e,t),this.copyPasteHandler(e,t),this.escapeKeyHandler(e)},keyupListener:function(e){"Space"===e.code&&(this.isGrabbing=!1,this.paperManager.removeEventHandler("blank:pointermove"))},keydownListener:function(e){var t=this,n=this.isAppleOS(),o=n?e.metaKey:e.ctrlKey,i={mod:o,isAppleOS:n,modeler:this};try{this.handleHotkeys(e,i)}catch(fa){console.error(fa)}var r=!e.target.toString().toLowerCase().includes("body");r||("Space"===e.code&&(this.isGrabbing=!0,this.paperManager.addEventHandler("blank:pointermove",(function(e,n,o){if(!t.canvasDragPosition){var i=t.paperManager.scale;t.canvasDragPosition={x:n*i.sx,y:o*i.sy}}t.canvasDragPosition&&!t.clientLeftPaper&&t.paperManager.translate(e.offsetX-t.canvasDragPosition.x,e.offsetY-t.canvasDragPosition.y)}))),vw(e.key,bn.getters.highlightedShapes,this.pushToUndoStack))}}};h(74819);function Ew(e,t){while(!Object.prototype.hasOwnProperty.call(e,t))if(e=hi(e),null===e)break;return e}function Aw(){return Aw="undefined"!==typeof Reflect&&Reflect.get?Reflect.get.bind():function(e,t,n){var o=Ew(e,t);if(o){var i=Object.getOwnPropertyDescriptor(o,t);return i.get?i.get.call(arguments.length<3?e:n):i.value}},Aw.apply(this,arguments)}var Mw,Tw=function(e){pi(n,e);var t=vi(n);function n(){return wo(this,n),t.apply(this,arguments)}return ko(n,[{key:"clone",value:function(e,t,o){return this.withTimerKeys(Aw(hi(n.prototype),"clone",this).call(this,e,t,o))}},{key:"withTimerKeys",value:function(e){var t=this,o=n.timerPropertyKeys.find((function(e){return t.definition.eventDefinitions[0][e]}));return e.definition.eventDefinitions[0][o]||(e.definition.eventDefinitions[0][o]={}),e.definition.eventDefinitions[0][o].body=this.definition.eventDefinitions[0][o].body,e}}]),n}(Ro);function _w(e){return Pw.apply(this,arguments)}function Pw(){return Pw=y(v().mark((function e(t){var n,o,i;return v().wrap((function(e){while(1)switch(e.prev=e.next){case 0:if(n=Ow(t),o=document.querySelector('[name="name"]')||document.querySelector('[name="text"]'),n&&o&&document.activeElement!==o){e.next=4;break}return e.abrupt("return");case 4:if(i=document.getElementById("accordion-button-Configuration"),!i||"false"!==i.getAttribute("aria-expanded")){e.next=10;break}return clearTimeout(Mw),i.click(),e.next=10,Dw();case 10:n.style.outline="1px dashed blue",o.addEventListener("blur",(function(){n.style.outline=""})),o.focus(),o.select();case 14:case"end":return e.stop()}}),e)}))),Pw.apply(this,arguments)}function Ow(e){if(e.selectors)return e.selectors.label||Array.from(e.selectors.root.children).find((function(e){return e.classList.contains("labels")}))}function Dw(){return new Promise((function(e){Mw=setTimeout(e)}))}_e(Tw,"timerPropertyKeys",["timeDuration","timeDate","timeCycle"]);var Iw=h(93162),Nw=h.n(Iw),Rw=new WeakMap,Bw=new WeakMap,Lw=function(){function e(t){wo(this,e),Eh(this,Rw,{writable:!0,value:void 0}),Eh(this,Bw,{writable:!0,value:void 0}),fy(this,Rw,t)}return ko(e,[{key:"definitions",set:function(e){fy(this,Bw,e)}},{key:"getDefinitionsFromXml",value:function(e){var t=this;return new Promise((function(n,o){Th(t,Rw).fromXML(e,(function(e,i){e&&o(e),i.exporter="ProcessMaker Modeler",i.exporterVersion="1.0",t.cleanBrokenReferences(i),n(i)}))}))}},{key:"cleanBrokenReferences",value:function(e){var t=e.rootElements,n=e.diagrams,o=[];t.forEach((function(t){"bpmn:Process"===t.$type&&t.flowElements&&(t.flowElements=t.flowElements.filter((function(e){return"bpmn:SequenceFlow"!==e.$type||(e.sourceRef&&e.targetRef||o.push(e),e.sourceRef&&e.targetRef)}))),"bpmn:Process"===t.$type&&t.laneSets&&t.laneSets.forEach((function(t){t.lanes=t.lanes.filter((function(t){if(!e.diagrams)return!1;var n=e.diagrams.find((function(e){return e.plane.planeElement.find((function(e){return e&&e.bpmnElement.id===t.id}))}));return n}))}))})),n.forEach((function(e){"bpmndi:BPMNDiagram"===e.$type&&e.plane&&e.plane.planeElement&&(e.plane.planeElement=e.plane.planeElement.filter((function(e){return"bpmndi:BPMNEdge"!==e.$type||e.bpmnElement&&!o.includes(e.bpmnElement)})))}))}},{key:"download",value:function(){Th(this,Bw)&&Th(this,Rw).toXML(Th(this,Bw),{format:!0},(function(e,t){if(e)alert(e);else{if(Wr())return void(window.xml=t);var n=new File([t],"bpmnProcess.xml",{type:"text/xml"});Nw().saveAs(n)}}))}}]),e}();function jw(e){return e.isStartEvent()?So:e.isTask()?To:e.isGateway()?Po:e.isIntermediateEvent()?Do:e.isEndEvent()?Ao:null}function Fw(e){if(!e)return!1;var t=jw(e);return!t||!Object.values(t).includes(e.definition.name)}function zw(e,t){return t.reduce((function(e,t){return e.concat(t.get("artifacts"))}),[]).filter((function(e){return"bpmn:Association"===e.$type})).filter((function(t){return t.targetRef===e.definition}))}function qw(e,t){var n=Object.values(e).flatMap((function(e){return e.map((function(e){return t.find((function(t){return t.id===e.id}))}))})),o=t.filter((function(e){return!e.id}));return[].concat(m(n),m(o))}var Hw=function(){function e(t,n,o,i,r,s){wo(this,e),this._nodeThatWillBeReplaced=t,this._definition=n,this._graph=o,this._newNode=i,this._processes=r,this._collaboration=s}return ko(e,[{key:"migrate",value:function(){var e,t,n=this;Fw(this._nodeThatWillBeReplaced)&&(this._definition.name=this._nodeThatWillBeReplaced.definition.name);var o=function(e){var t=n._graph.getLinks().find((function(t){return t.component&&t.component.node.definition===e}));t.component.node._modelerId+="_replaced"},i=this._nodeThatWillBeReplaced.definition.get("incoming"),r=this._nodeThatWillBeReplaced.definition.get("outgoing");(e=this._definition.get("incoming")).push.apply(e,m(i)),(t=this._definition.get("outgoing")).push.apply(t,m(r)),r.forEach((function(e){e.set("sourceRef",n._newNode.definition),n._handleSequenceFlowForGateway(e),o(e)})),i.forEach((function(e){e.set("targetRef",n._newNode.definition),n._handleSequenceFlowForGateway(e),o(e)}));var s=zw(this._nodeThatWillBeReplaced,this._processes);if(s.forEach((function(e){e.set("targetRef",n._newNode.definition),o(e)})),this._collaboration){var a=this._collaboration.get("messageFlows");a.filter((function(e){return e.sourceRef===n._nodeThatWillBeReplaced.definition})).forEach((function(e){e.set("sourceRef",n._newNode.definition),o(e)})),a.filter((function(e){return e.targetRef===n._nodeThatWillBeReplaced.definition})).forEach((function(e){e.set("targetRef",n._newNode.definition),o(e)}))}}},{key:"_handleSequenceFlowForGateway",value:function(e){var t=["bpmn:ExclusiveGateway","bpmn:InclusiveGateway"].includes(e.sourceRef.$type);t||delete e.conditionExpression}}]),e}(),Vw=["bpmn:ServiceTask","bpmn:ManualTask","bpmn:CallActivity","bpmn:ScriptTask"],Uw=function(e){if(-1!==Vw.indexOf(e.bpmnType)){e.inspectorConfig[0].items.splice(e.loopInspectorIndex||1,0,Wh);var t=e.inspectorHandler||function(){},n=e.inspectorData||null;e.inspectorHandler=function(e,n,o,i,r,s){t(e,n,o,i,r,s),e=Uh(e,n,o,i,r),s(e)},e.inspectorData=function(e,t,o){var i=n?n(e,t,o):t(e);return Gh(i,e,t,o),i}}},Gw={methods:{cloneNodesSelection:function(){var e=this,t=[],n=[],o=[],i=[],r=[],s=this.highlightedNodes,a=this.$refs.selector.$el,l=[Nl,Tl,os,Vl,Bo],c=[Zn],d=[Wn];return"function"===typeof a.getBoundingClientRect&&s.forEach((function(s){if(l.includes(s.type)){var a=e.cloneFlowAndSetNewId(s);n.push(a),t.push(a)}else if(c.includes(s.type)){var u=e.cloneFlowAndSetNewId(s);i.push(u),t.push(u)}else if(d.includes(s.type)){var p=e.cloneFlowAndSetNewId(s);r.push(p),t.push(p)}else{var h=e.cloneElementAndCalculateOffset(s);s.definition&&"bpmn:BoundaryEvent"!==s.definition.$type?t.push(h):o.push(h)}})),t=[].concat(m(t),o),this.connectClonedFlows(n,t),this.connectClonedDataInputAssociations(i,t),this.connectClonedDataOutputAssociations(r,t),t},getDataInputOutputAssociationTargetRef:function(e){if("bpmn:DataInput"===e.targetRef.$type){var t=e.targetRef.$parent;return lo(t,this)}if("bpmn:DataInputAssociation"===e.targetRef.$type){var n=e.targetRef.$parent;return lo(n,this)}return e.targetRef},cloneFlowAndSetNewId:function(e){var t=e.cloneFlow(this.nodeRegistry,this.moddle,this.$t);return t.setIds(this.nodeIdGenerator),t},cloneElementAndCalculateOffset:function(e){var t=e.clone(this.nodeRegistry,this.moddle,this.$t),n=this.$refs.selector.$el.getBoundingClientRect(),o=n.height,i=this.paper.scale(),r=i.sy,s=o/r;return t.diagram.bounds.y+=s,t.setIds(this.nodeIdGenerator),t},connectClonedFlows:function(e,t){var n=this;e.forEach((function(e){var o=n.nodes.find((function(t){return t.definition.id===e.cloneOf})),i=o.definition.sourceRef,r=o.definition.targetRef,s=t.find((function(e){return e.cloneOf===i.id})),a=t.find((function(e){return e.cloneOf===r.id}));if(s&&a){e.definition.set("sourceRef",s.definition),e.definition.set("targetRef",a.definition),s.definition.outgoing?s.definition.outgoing.push(e.definition):s.definition.set("outgoing",[e.definition]),a.definition.incoming?a.definition.incoming.push(e.definition):a.definition.set("incoming",[e.definition]);var l=n.$refs.selector.$el.getBoundingClientRect(),c=l.height,d=n.paper.scale(),u=d.sy,p=c/u;e.diagram.waypoint.forEach((function(e){e.y+=p}))}else t.splice(t.indexOf(e),1)}))},connectClonedDataInputAssociations:function(e,t){var n=this;e.forEach((function(e){var o=n.nodes.find((function(t){return t.definition.id===e.cloneOf})),i=o.definition.sourceRef[0],r=t.find((function(e){return e.cloneOf===i.id})),s=n.getDataInputOutputAssociationTargetRef(o.definition),a=t.find((function(e){return e.cloneOf===s.id})),l=ao(n.moddle,a,r.definition);e.definition.set("sourceRef",[r.definition]),e.definition.set("targetRef",l),a.definition.set("dataInputAssociations",[e.definition])}))},connectClonedDataOutputAssociations:function(e,t){var n=this;e.forEach((function(e){var o=n.nodes.find((function(t){return t.definition.id===e.cloneOf})),i=o.definition.sourceRef||o.definition.$parent,r=o.definition.targetRef,s=t.find((function(e){return e.cloneOf===i.id})),a=t.find((function(e){return e.cloneOf===r.id}));e.definition.set("targetRef",a.definition),e.definition.set("sourceRef",s.definition);var l=s.definition.get("dataOutputAssociations")||[];s.definition.set("dataOutputAssociations",[].concat(m(l),[e.definition]))}))}}},Ww=function(){var e=this,t=e._self._c;return t("div",{staticClass:"rail-container",attrs:{"data-cy":"rail-bottom"}},[t("div",{ref:"railLeftBox",staticClass:"rail-left",style:[e.overlap?{position:"relative"}:{position:"absolute"}]},[t("MiniPaperControl",{class:{"hidden-opacity":!1===e.showComponent},attrs:{"paper-manager":e.paperManager,graph:e.graph}}),t("ZoomControl",{ref:"zoomBox",attrs:{"paper-manager":e.paperManager}})],1),t("div",{staticClass:"rail-center",style:[e.overlap?{width:"auto"}:{width:"100%"}]},[t("UndoRedoControl",{directives:[{name:"show",rawName:"v-show",value:e.showComponent,expression:"showComponent"}],ref:"undoRedoBox",attrs:{"is-rendering":e.isRendering},on:{"load-xml":function(t){return e.$emit("load-xml")},clearSelection:function(t){return e.$emit("clearSelection")}}}),t("Controls",{directives:[{name:"show",rawName:"v-show",value:e.showComponent,expression:"showComponent"}],ref:"controlBox",attrs:{nodeTypes:e.nodeTypes},on:{onCreateElement:e.onCreateElementHandler,onSetCursor:e.onSetCursorHandler}})],1)])},$w=[],Xw=function(){var e=this,t=e._self._c;return t("div",{staticClass:"mini-paper-box"},[t("button",{directives:[{name:"b-tooltip",rawName:"v-b-tooltip.hover",modifiers:{hover:!0}}],staticClass:"mini-paper-button",class:e.miniMapOpen?"mini-paper-button-active":"",attrs:{type:"button","data-cy":"mini-paper-button",title:e.miniMapOpen?e.$t("Hide Mini-Map"):e.$t("Show Mini-Map")},on:{click:function(t){e.miniMapOpen=!e.miniMapOpen}}},[t("inline-svg",{attrs:{src:e.miniMapIcon}})],1),t("mini-paper",{attrs:{isOpen:e.miniMapOpen,paperManager:e.paperManager,graph:e.graph}})],1)},Yw=[],Zw=function(){var e=this,t=e._self._c;return t("div",{staticClass:"mini-paper-container",class:e.isOpen?"opened":"closed",attrs:{"data-cy":"mini-map-box"},on:{click:e.movePaper}},[t("div",{ref:"miniPaper",staticClass:"mini-paper"})])},Kw=[],Jw=new WeakMap,Qw=function(){function e(t){wo(this,e),Eh(this,Jw,{writable:!0,value:void 0}),fy(this,Jw,t)}return ko(e,[{key:"miniMap",get:function(){return Th(this,Jw)}},{key:"scaleMiniMap",value:function(){this.miniMap.scaleContentToFit({padding:10,maxScaleX:.5,maxScaleY:.5})}},{key:"calculateNewPaperPosition",value:function(e,t,n,o,i,r){var s=this.miniMap.paperToLocalPoint(e,t),a=s.x,l=s.y;return{newX:i/2-a*n,newY:r/2-l*o}}}],[{key:"factory",value:function(e,t){var n=new a.dia.Paper({el:t,model:e,width:230,height:200,interactive:!1});return new this(n)}}]),e}(),ex={data:function(){return{miniMapManager:null,newX:0,newY:0}},props:{isOpen:{type:Boolean},paperManager:{type:Object},graph:{type:Object}},watch:{isOpen:function(e){e&&this.miniMapManager.scaleMiniMap()}},computed:{miniMap:function(){return this.miniMapManager.miniMap}},methods:{movePaper:function(e){var t=e.offsetX,n=e.offsetY,o=this.paperManager.scale,i=o.sx,r=o.sy,s=this.paperManager.paper.el,a=s.clientWidth,l=s.clientHeight,c=this.miniMapManager.calculateNewPaperPosition(t,n,i,r,a,l),d=c.newX,u=c.newY;this.newX=d,this.newY=u,this.paperManager.translate(this.newX,this.newY)}},mounted:function(){var e=this;return y(v().mark((function t(){return v().wrap((function(t){while(1)switch(t.prev=t.next){case 0:return window.Cypress&&(window.MiniPaper=e),t.next=3,e.$nextTick();case 3:e.miniMapManager=Qw.factory(e.graph,e.$refs.miniPaper),e.paperManager.addEventHandler("render:done",e.miniMapManager.scaleMiniMap,e),window.ProcessMaker.EventBus.$on("modeler-change",(function(){return e.miniMapManager.scaleMiniMap()}));case 6:case"end":return t.stop()}}),t)})))()},beforeDestroy:function(){this.paperManager.removeEventHandler("render:done",this.miniMapManager.scaleMiniMap,this)}},tx=ex,nx=(h(63564),qn(tx,Zw,Kw,!1,null,"76e95759",null)),ox=nx.exports,ix={components:{InlineSvg:Ug,MiniPaper:ox},props:{paperManager:Object,graph:Object},data:function(){return{miniMapOpen:!1,miniMapIcon:h(65759)}}},rx=ix,sx=(h(71776),qn(rx,Xw,Yw,!1,null,"7f06057f",null)),ax=sx.exports,lx=function(){var e=this,t=e._self._c;return t("div",{staticClass:"zoom-box"},[t("button",{directives:[{name:"b-tooltip",rawName:"v-b-tooltip.hover",modifiers:{hover:!0}}],staticClass:"zoom-button",attrs:{type:"button","data-cy":"zoom-out-control",title:e.$t("Zoom Out")},on:{click:e.onClickZoomOut}},[t("inline-svg",{attrs:{src:e.minusIcon}})],1),e.paperManager?t("button",{directives:[{name:"b-tooltip",rawName:"v-b-tooltip.hover",modifiers:{hover:!0}}],staticClass:"zoom-button zoom-reset",attrs:{"data-cy":"zoom-reset-control",title:e.$t("Reset to initial scale")},on:{click:e.onClickReset}},[e._v(e._s(e.percentageText))]):e._e(),t("button",{directives:[{name:"b-tooltip",rawName:"v-b-tooltip.hover",modifiers:{hover:!0}}],staticClass:"zoom-button",attrs:{type:"button","data-cy":"zoom-in-control",title:e.$t("Zoom In")},on:{click:e.onClickZoomIn}},[t("inline-svg",{attrs:{src:e.plusIcon}})],1)])},cx=[],dx={components:{InlineSvg:Ug},props:{paperManager:Object},data:function(){return{initialScale:1,minimumScale:.2,scaleStep:.1,minusIcon:h(22044),plusIcon:h(29943)}},computed:{percentageText:function(){return"".concat(Math.round(100*this.$props.paperManager.scale.sx),"%")}},methods:{onClickZoomOut:function(){this.paperManager.scale=Math.max(this.minimumScale,this.paperManager.scale.sx-=this.scaleStep)},onClickZoomIn:function(){this.paperManager.scale=this.paperManager.scale.sx+this.scaleStep},onClickReset:function(){this.paperManager.scale=this.initialScale}}},ux=dx,px=(h(5365),qn(ux,lx,cx,!1,null,"576edbd4",null)),hx=px.exports,fx=function(){var e=this,t=e._self._c;return t("div",{staticClass:"ur-box"},[t("button",{directives:[{name:"b-tooltip",rawName:"v-b-tooltip.hover.viewport.d50",value:{customClass:"no-pointer-events"},expression:"{ customClass: 'no-pointer-events' }",modifiers:{hover:!0,viewport:!0,d50:!0}}],staticClass:"ur-button",attrs:{type:"button","data-cy":"undo-control",disabled:!e.canUndo,title:e.$t("Undo")},on:{click:e.undo}},[t("inline-svg",{attrs:{src:e.undoIcon}})],1),t("button",{directives:[{name:"b-tooltip",rawName:"v-b-tooltip.hover.viewport.d50",value:{customClass:"no-pointer-events"},expression:"{ customClass: 'no-pointer-events' }",modifiers:{hover:!0,viewport:!0,d50:!0}}],staticClass:"ur-button",attrs:{type:"button","data-cy":"redo-control",disabled:!e.canRedo,title:e.$t("Redo")},on:{click:e.redo}},[t("inline-svg",{attrs:{src:e.redoIcon}})],1)])},mx=[],gx={components:{InlineSvg:Ug},props:{isRendering:{type:Boolean}},data:function(){return{undoIcon:h(28994),redoIcon:h(45617)}},watch:{canUndo:function(e){e||this.$root.$emit("bv::hide::tooltip")},canRedo:function(e){e||this.$root.$emit("bv::hide::tooltip")}},computed:{canUndo:function(){return dv.getters.canUndo},canRedo:function(){return dv.getters.canRedo}},methods:{undo:function(){var e=this;this.$emit("clearSelection"),this.isRendering||dv.dispatch("undo").then((function(){return e.$emit("load-xml")}))},redo:function(){var e=this;this.$emit("clearSelection"),this.isRendering||dv.dispatch("redo").then((function(){return e.$emit("load-xml")}))}}},vx=gx,bx=(h(81935),qn(vx,fx,mx,!1,null,"379ae012",null)),yx=bx.exports,wx=function(){var e=this,t=e._self._c;return e.controls?t("ul",{staticClass:"control-list"},[e._l(e.controls,(function(n){return t("li",{key:n.id,class:["control-item",{active:e.selectedItem&&e.selectedItem.type===n.type}],attrs:{id:n.id,"data-test":"".concat(n.type,"-main")},on:{click:function(t){return t.stopPropagation(),e.onClickControlHandler(t,n)}}},[t("SubmenuPopper",{attrs:{data:n,selectedItem:e.selectedSubmenuItem,popperType:e.popperType},on:{clickToSubmenu:e.clickToSubmenuHandler}})],1)})),t("li",{staticClass:"control-item"},[t("div",{directives:[{name:"b-tooltip",rawName:"v-b-tooltip.hover.viewport.d50",value:{customClass:"no-pointer-events"},expression:"{ customClass: 'no-pointer-events' }",modifiers:{hover:!0,viewport:!0,d50:!0}}],class:{"control-add":!0,"control-active":e.explorerOpen},attrs:{title:e.$t("Add")},on:{click:e.toggleExplorer}},[t("inline-svg",{attrs:{src:e.plusIcon}})],1)])],2):e._e()},xx=[],kx=function(){var e=this,t=e._self._c;return e.data.items?t("popper",{attrs:{trigger:"clickToOpen",options:{placement:"top",modifiers:{offset:{offset:"0,5px"},preventOverflow:{escapeWithReference:!0}}},"append-to-body":!0,"visible-arrow":!1,"force-show":e.popperType===e.data.type}},[t("div",[t("ul",{staticClass:"control-submenu"},e._l(e.data.items,(function(n,o){return t("li",{key:o,class:["control-submenu-list",{active:e.selectedItem===n.type}],attrs:{"data-test":n.type},on:{click:function(t){return e.onClickHandler(t,n)}}},[t("inline-svg",{attrs:{src:n.icon,alt:n.label}}),t("div",{staticClass:"control-submenu-list-label"},[e._v(" "+e._s(n.label)+" ")])],1)})),0)]),t("a",{directives:[{name:"b-tooltip",rawName:"v-b-tooltip.hover.viewport.d50",value:{customClass:"no-pointer-events"},expression:"{ customClass: 'no-pointer-events' }",modifiers:{hover:!0,viewport:!0,d50:!0}}],staticClass:"control-submenu-item",attrs:{slot:"reference",alt:e.data.label,title:e.$t(e.data.label)},slot:"reference"},[t("div",{staticClass:"control-submenu-options"},[t("span")]),t("inline-svg",{attrs:{src:e.data.icon}})],1)]):t("a",{directives:[{name:"b-tooltip",rawName:"v-b-tooltip.hover.viewport.d50",value:{customClass:"no-pointer-events"},expression:"{ customClass: 'no-pointer-events' }",modifiers:{hover:!0,viewport:!0,d50:!0}}],staticClass:"control-submenu-item",attrs:{alt:e.data.label,title:e.$t(e.data.label)}},[t("inline-svg",{attrs:{src:e.data.icon}})],1)},Cx=[],Sx=h(95951),Ex=h.n(Sx),Ax=(h(44301),{props:{data:{type:Object},selectedItem:{type:String},popperType:{type:String}},components:{Popper:Ex(),InlineSvg:Ug},data:function(){return{wasClickedSubmenu:!1,element:null,wasClicked:!1}},methods:{onClickHandler:function(e,t){e.stopPropagation(),this.$emit("clickToSubmenu",{event:e,control:t})}}}),Mx=Ax,Tx=(h(19366),qn(Mx,kx,Cx,!1,null,"acf58eca",null)),_x=Tx.exports,Px={components:{SubmenuPopper:_x,InlineSvg:Ug},props:{nodeTypes:Array},mixins:[Cg],data:function(){return{plusIcon:h(29943),currentType:null}},created:function(){pg.dispatch("getUserPinnedObjects")},computed:{controls:function(){return pg.getters.getPinnedNodeTypes},explorerOpen:function(){return pg.getters.getExplorerOpen}},methods:{clickToSubmenuHandler:function(e){window.ProcessMaker.EventBus.$off("custom-pointerclick"),this.wasClicked=!1,this.parent=this.selectedItem,this.selectedSubmenuItem=e.control.type,this.onClickHandler(e.event,e.control)},onClickControlHandler:function(e,t){this.selectedSubmenuItem=null,this.popperType=this.currentType===t.type?null:t.type,this.onClickHandler(e,t),this.currentType=this.popperType},toggleExplorer:function(){this.deselect(),this.popperType=null,this.selectedSubmenuItem=null,pg.commit("toggleExplorer"),pg.commit("clearFilteredNodes"),pg.commit("clearFilteredPmBlockNodes")}}},Ox=Px,Dx=(h(33422),qn(Ox,wx,xx,!1,null,"0e6b16b8",null)),Ix=Dx.exports,Nx={components:{MiniPaperControl:ax,ZoomControl:hx,UndoRedoControl:yx,Controls:Ix},props:{paperManager:Object,graph:Object,isRendering:Boolean,nodeTypes:Array},data:function(){return{overlap:!1,widthOverlapControl:0,leftOverlapUndoRedo:0,controlObserver:null}},created:function(){this.controlObserver=new ResizeObserver(this.onControlObserver)},methods:{onCreateElementHandler:function(e){this.$emit("onCreateElement",e)},onSetCursorHandler:function(e){this.$emit("set-cursor",e)},onControlObserver:function(e){var t=e[0].target.getBoundingClientRect(),n=this.$refs.zoomBox.$el.getBoundingClientRect(),o=this.$refs.undoRedoBox.$el.getBoundingClientRect();if(this.overlap){if(t.width<this.widthOverlapControl){var i=window.getComputedStyle(this.$refs.zoomBox.$el),r=parseInt(i.paddingLeft,10)+parseInt(i.paddingRight,10),s=window.getComputedStyle(this.$refs.railLeftBox),a=parseInt(s.paddingLeft,10)+parseInt(s.paddingRight,10),l=this.leftOverlapUndoRedo+(this.widthOverlapControl-t.width)-r-a;l>n.right&&(this.overlap=!1)}}else o.left<n.right&&(this.overlap=!0,this.widthOverlapControl=t.width,this.leftOverlapUndoRedo=o.left)}},computed:{showComponent:function(){return bn.getters.showComponent}},mounted:function(){var e=this;return y(v().mark((function t(){return v().wrap((function(t){while(1)switch(t.prev=t.next){case 0:return t.next=2,(0,gt.nextTick)();case 2:e.controlObserver.observe(e.$refs.controlBox.$el);case 3:case"end":return t.stop()}}),t)})))()}},Rx=Nx,Bx=(h(44697),qn(Rx,Ww,$w,!1,null,"5393ebfe",null)),Lx=Bx.exports,jx=function(){var e=this,t=e._self._c;return t("crown-config",e._g({attrs:{highlighted:e.highlighted,paper:e.paper,graph:e.graph,shape:e.shape,node:e.node,nodeRegistry:e.nodeRegistry,moddle:e.moddle,collaboration:e.collaboration,"process-node":e.processNode,"plane-elements":e.planeElements,"is-rendering":e.isRendering}},e.$listeners))},Fx=[],zx=function(e){pi(n,e);var t=vi(n);function n(){return wo(this,n),t.apply(this,arguments)}return ko(n,[{key:"makeFlowNode",value:function(e,t,n){var o=this,i=Yn(this.moddle),r=Xn(this.moddle);r.set("sourceRef",e.component.node.definition),r.set("targetRef",t.component.node.definition);var s=n.sourceAnchor,a=n.targetAnchor;i.waypoint=[s,a].map((function(e){return o.moddle.create("dc:Point",e)}));var l=new Ro(Wn,r,i);l.dataAssociationProps={sourceShape:e,targetCoords:{x:void 0,y:void 0}};var c=x()(e,"component.node"),d=c.definition.get("dataOutputAssociations")||[];return c.definition.set("dataOutputAssociations",[].concat(m(d),[l.definition])),l}}],[{key:"isValid",value:function(e){var t=e.sourceShape,n=e.targetShape,o=x()(t,"component.node"),i=x()(n,"component.node");if(!i)return!1;var r=["bpmn:Task","bpmn:SubProcess","bpmn:CallActivity","bpmn:ManualTask","bpmn:ScriptTask","bpmn:ServiceTask"],s=["bpmn:Task","bpmn:SubProcess","bpmn:CallActivity","bpmn:ManualTask","bpmn:ScriptTask","bpmn:ServiceTask"],a=["bpmn:Task","bpmn:SubProcess","bpmn:CallActivity","bpmn:ManualTask","bpmn:ScriptTask","bpmn:ServiceTask","bpmn:IntermediateCatchEvent","bpmn:StartEvent"],l=["bpmn:Task","bpmn:SubProcess","bpmn:CallActivity","bpmn:ManualTask","bpmn:ScriptTask","bpmn:ServiceTask","bpmn:IntermediateThrowEvent","bpmn:EndEvent"],c=o.definition.$type,d=i.definition.$type,u="bpmn:DataStoreReference"===o.definition.$type,p="bpmn:DataObjectReference"===o.definition.$type,h="bpmn:DataStoreReference"===i.definition.$type,f="bpmn:DataObjectReference"===i.definition.$type;return!(!u||!s.includes(d))||(!(!p||!l.includes(d))||(!(!h||!r.includes(c))||f&&a.includes(c)))}},{key:"isValidSourceNode",value:function(e){return!wi.isNodeDisallowedFromDataAssociation(e)}}]),n}(wi),qx=[zx,_l,jl],Hx={name:Bo,components:{CrownConfig:Zr},props:["graph","node","id","highlighted","nodeRegistry","moddle","paper","collaboration","processNode","planeElements","isRendering"],mixins:[_n],data:function(){return{shape:null}},computed:{isValidConnection:function(){var e=this;return qx.some((function(t){return t.isValid({sourceShape:e.sourceShape,targetShape:e.target,sourceConfig:e.sourceConfig,targetConfig:e.targetConfig})}))},targetType:function(){return x()(this.target,"component.node.type")},shapeName:function(){return this.node.definition.get("name")},nameLabel:{get:function(){return this.shape.label(0).attrs.text.text},set:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";this.shape.label(0,{attrs:{text:{text:e}}})}}},watch:{},methods:{completeLink:function(){var e=this,t=qx.find((function(t){return t.isValid({sourceShape:e.sourceShape,targetShape:e.target,sourceConfig:e.sourceConfig,targetConfig:e.targetConfig})})),n=new t(this.nodeRegistry,this.moddle,this.paper),o=this.shape.findView(this.paper);this.$emit("replace-generic-flow",{actualFlow:n.makeFlowNode(this.sourceShape,this.target,o),genericFlow:this.node,targetNode:x()(this.target,"component.node")})},updateRouter:function(){this.shape.router("normal")},createDefaultFlowMarker:function(){this.shape.attr("line",{strokeWidth:1,strokeDasharray:"2 2"})}},mounted:function(){this.shape=new a.shapes.standard.Link,this.shape.connector("rounded",{radius:5}),this.createDefaultFlowMarker(),this.shape.addTo(this.graph),this.shape.component=this}},Vx=Hx,Ux=qn(Vx,jx,Fx,!1,null,null,null),Gx=Ux.exports,Wx=function(){var e=this,t=e._self._c;return e.showLasso&&e.style?t("div",{ref:"drag",staticClass:"box",style:e.style,attrs:{"data-cy":"selection-box","data-length":e.selected.length}},[t("crown-multiselect",e._g({attrs:{paper:e.paperManager.paper,graph:e.$parent.graph,moddle:e.$parent.moddle,collaboration:e.$parent.collaboration,"process-node":e.$parent.processNode,"plane-elements":e.$parent.planeElements,"is-rendering":e.$parent.isRendering,"dropdown-data":[],"has-pools":e.hasPoolsOrLanesSelected},on:{"save-state":function(t){return e.$emit("save-state")}}},e.$listeners))],1):e._e()},$x=[],Xx=function(){var e=this,t=e._self._c;return e.isMultiSelect?t("div",{staticClass:"crown-config crown-multiselect",style:e.style,attrs:{role:"menu"}},[e._t("default"),e._l(e.availableButtons,(function(e){return t("button",{key:e.label,staticClass:"crown-button",attrs:{"aria-label":e.label,title:e.label,"data-test":e.testId,role:e.role},on:{click:e.action}},["fpm"===e.iconPrefix?t("font-awesome-icon",{attrs:{icon:[e.iconPrefix,"fa-".concat(e.icon)]}}):t("i",{class:"".concat(e.iconPrefix," fa-").concat(e.icon," text-dark")})],1)})),t("crown-align",{directives:[{name:"show",rawName:"v-show",value:e.showAlignmentButtons,expression:"showAlignmentButtons"}],attrs:{paper:e.paper},on:{"save-state":function(t){return e.$emit("save-state")}}})],2):e._e()},Yx=[],Zx=function(){var e=this,t=e._self._c;return e.isMultiSelect?t("div",{staticClass:"crown-config crown-align",style:e.style,attrs:{role:"menu"}},[e._t("default"),e._l(e.availableButtons,(function(e){return t("button",{key:e.label,staticClass:"crown-button",attrs:{"aria-label":e.label,title:e.label,"data-test":e.testId,role:e.role,disabled:e.disabled},on:{mousedown:function(e){e.stopPropagation(),e.preventDefault()},click:function(t){return t.stopPropagation(),t.preventDefault(),e.action.apply(null,arguments)}}},[t("font-awesome-icon",{attrs:{icon:["fpm","fa-".concat(e.icon)]}})],1)}))],2):e._e()},Kx=[],Jx=function(e){return e.position().y+e.size().height},Qx=function(e){return e.position().x},ek=function(e){return e.position().x+e.size().width/2},tk=function(e){return e.position().y+e.size().height/2},nk=function(e){return e.position().x+e.size().width},ok=function(e){return e.position().y},ik=function(e){return Boolean(e&&e.position&&e.size)},rk={poolLane:"PoolLane",boundaryEvent:"processmaker.components.nodes.boundaryEvent.Shape"},sk=[rk.boundaryEvent,rk.poolLane],ak=function(e){return!sk.includes(e.get("type"))};function lk(e){return ik(e)&&ak(e)}function ck(e,t){var n=t-Jx(e);e.translate(0,n)}function dk(e,t){var n=t-Qx(e);e.translate(n,0)}function uk(e,t){var n=t-nk(e);e.translate(n,0)}function pk(e,t){var n=t-ek(e);e.translate(n,0)}function hk(e,t){var n=t-tk(e);e.translate(0,n)}function fk(e,t){var n=t-ok(e);e.translate(0,n)}function mk(e){var t=Ck(e);e.forEach((function(e){dk(e,t.left)}))}function gk(e){var t=Ck(e);e.forEach((function(e){uk(e,t.right)}))}function vk(e){var t=Ck(e);e.forEach((function(e){fk(e,t.top)}))}function bk(e){var t=Ck(e);e.forEach((function(e){ck(e,t.bottom)}))}function yk(e){var t=Ck(e);e.forEach((function(e){pk(e,t.hMiddle)}))}function wk(e){var t=Ck(e);e.forEach((function(e){hk(e,t.vMiddle)}))}function xk(e){var t=Ck(e),n=e.length,o=3;if(!(n<o)){var i=e.reduce((function(e,t){return t.size().height+e}),0),r=e.sort((function(e,t){return tk(e)-tk(t)})),s=t.top+e[0].size().height,a=(t.height-i)/(r.length-1);r.forEach((function(e,t){0!==t&&(fk(e,s+a),s+=a+e.size().height)}))}}function kk(e){var t=Ck(e),n=e.length,o=3;if(!(n<o)){var i=e.reduce((function(e,t){return t.size().width+e}),0),r=e.sort((function(e,t){return ek(e)-ek(t)})),s=t.left+e[0].size().width,a=(t.width-i)/(r.length-1);r.forEach((function(e,t){0!==t&&(dk(e,s+a),s+=a+e.size().width)}))}}function Ck(e){if(!e||!e.length||0===e.length)return{left:0,right:0,top:0,bottom:0,width:0,height:0,vMiddle:0,hMiddle:0};var t=function(e){return ik(e)?e.position().x:0},n=function(e){return ik(e)?e.position().x+e.size().width:0},o=function(e){return ik(e)?e.position().y:0},i=function(e){return ik(e)?e.position().y+e.size().height:0},r=Math.min.apply(Math,m(e.map(t))),s=Math.max.apply(Math,m(e.map(n))),a=Math.min.apply(Math,m(e.map(o))),l=Math.max.apply(Math,m(e.map(i))),c=s-r,d=l-a;return{left:r,right:s,top:a,bottom:l,width:c,height:d,vMiddle:a+d/2,hMiddle:r+c/2}}function Sk(e){var t=e.filter((function(e){return lk(e)})),n=Ck(e),o=t.length>1;return{can:{align:{left:o&&t.some((function(e){return Qx(e)!==n.left})),horizontalCenter:o&&t.some((function(e){return ek(e)!==n.hMiddle})),right:o&&t.some((function(e){return nk(e)!==n.right})),bottom:o&&t.some((function(e){return Jx(e)!==n.bottom})),verticalCenter:o&&t.some((function(e){return tk(e)!==n.vMiddle})),top:o&&t.some((function(e){return ok(e)!==n.top}))},distribute:{horizontally:o&&t.length>2,vertically:o&&t.length>2}},align:{left:function(){return mk(t)},horizontalCenter:function(){return yk(t)},right:function(){return gk(t)},bottom:function(){return bk(t)},verticalCenter:function(){return wk(t)},top:function(){return vk(t)}},distribute:{horizontally:function(){return kk(t)},vertically:function(){return xk(t)}}}}var Ek,Ak,Mk,Tk,_k={components:{FontAwesomeIcon:Zo.FontAwesomeIcon},props:{paper:Object,hasPools:Boolean},data:function(){return{runningInCypressTest:Wr(),showCrown:!1,savePositionOnPointerupEventSet:!1,style:null,taskDropdownInitiallyOpen:this.paperNotRendered(),showReplaceModal:!1,nodeToReplace:null,buttons:[{label:this.$t("Align Left"),icon:"align-left",testId:"align-left",role:"menuitem",action:this.alignLeft,condition:"align.left",disabled:!1},{label:this.$t("Center Horizontally"),icon:"center-horizontally",testId:"align-horizontally",role:"menuitem",action:this.centerHorizontally,condition:"align.horizontalCenter",disabled:!1},{label:this.$t("Align Right"),icon:"align-right",testId:"align-right",role:"menuitem",action:this.alignRight,condition:"align.right",disabled:!1},{label:this.$t("Align Bottom"),icon:"align-bottom",testId:"align-bottom",role:"menuitem",action:this.alignBottom,condition:"align.bottom",disabled:!1},{label:this.$t("Center Vertically"),icon:"center-vertically",testId:"center-vertically",role:"menuitem",action:this.centerVertically,condition:"align.verticalCenter",disabled:!1},{label:this.$t("Align Top"),icon:"align-top",testId:"align-top",role:"menuitem",action:this.alignTop,condition:"align.top",disabled:!1},{label:this.$t("Distribute Horizontally"),icon:"distribute-horizontally",testId:"distribute-horizontally",role:"menuitem",action:this.distributeHorizontally,condition:"distribute.horizontally",disabled:!1},{label:this.$t("Distribute Vertically"),icon:"distribute-vertically",testId:"distribute-vertically",role:"menuitem",action:this.distributeVertically,condition:"distribute.vertically",disabled:!1}]}},created:function(){this.$t=this.$t.bind(this),Lo.library.add(Go),Lo.library.add(Uo),Lo.library.add(Wo),Lo.library.add($o),Lo.library.add(Vo),Lo.library.add(Ho),Lo.library.add(Yo),Lo.library.add(Xo)},watch:{selectedShapes:function(){this.$root.$emit("bv::hide::tooltip")}},computed:{selectedShapes:function(){return this.disableButtons(),Sk(bn.getters.highlightedShapes)},isMultiSelect:function(){var e=bn.getters.highlightedShapes.length;return e>1},highlightedShapes:function(){return bn.getters.highlightedShapes},availableButtons:function(){var e=this.hasPools;return this.buttons.filter((function(t){return"copy-button"===t.testId?!e:"clone-button"!==t.testId||!e}))}},methods:{disableButtons:function(){var e=Sk(bn.getters.highlightedShapes);this.buttons.forEach((function(t){t.disabled=!(0,Un.get)(e.can,t.condition,!0)}))},alignLeft:function(){this.undoableAction(this.selectedShapes.align.left)},centerHorizontally:function(){this.undoableAction(this.selectedShapes.align.horizontalCenter)},alignRight:function(){this.undoableAction(this.selectedShapes.align.right)},alignBottom:function(){this.undoableAction(this.selectedShapes.align.bottom)},centerVertically:function(){this.undoableAction(this.selectedShapes.align.verticalCenter)},alignTop:function(){this.undoableAction(this.selectedShapes.align.top)},distributeHorizontally:function(){this.undoableAction(this.selectedShapes.distribute.horizontally)},distributeVertically:function(){this.undoableAction(this.selectedShapes.distribute.vertically)},undoableAction:function(e){e(),this.$emit("save-state"),this.disableButtons()},paperNotRendered:function(){return!this.isRendering},setNodePosition:function(){this.shape.stopListening(this.paper,"element:pointerup",this.setNodePosition),this.savePositionOnPointerupEventSet=!1,bn.getters.allowSavingElementPosition&&this.$emit("save-state")},paperDoneRendering:function(){var e=this;if(this.isRendering)return new Promise((function(t){return e.paper.once("render:done",t)}))},setUpCrownConfig:function(){this.paper.on("render:done scale:changed translate:changed",this.repositionCrown)},setUpPositionHandling:function(){}},mounted:function(){var e=this;return y(v().mark((function t(){return v().wrap((function(t){while(1)switch(t.prev=t.next){case 0:return t.next=2,e.$nextTick();case 2:return t.next=4,e.paperDoneRendering();case 4:e.setUpCrownConfig();case 5:case"end":return t.stop()}}),t)})))()}},Pk=_k,Ok=(h(81856),h(69100),qn(Pk,Zx,Kx,!1,null,"46e3ac40",null)),Dk=Ok.exports,Ik={props:{paper:Object,hasPools:Boolean},components:{crownAlign:Dk,FontAwesomeIcon:Zo.FontAwesomeIcon},data:function(){return{showAlignmentButtons:!1,runningInCypressTest:Wr(),showCrown:!1,savePositionOnPointerupEventSet:!1,style:null,taskDropdownInitiallyOpen:this.paperNotRendered(),showReplaceModal:!1,nodeToReplace:null,buttons:[{label:"Copy Selection",iconPrefix:"fa",icon:"clipboard",testId:"copy-button",role:"menuitem",action:this.copySelection},{label:"Clone Selection",iconPrefix:"fa",icon:"copy",testId:"clone-button",role:"menuitem",action:this.cloneSelection},{label:"Align",iconPrefix:"fpm",icon:"align-left",testId:"align",role:"menuitem",action:this.showAlign},{label:"Delete Element",iconPrefix:"fa",icon:"trash-alt",testId:"delete-button",role:"menuitem",action:this.deleteElement}]}},created:function(){this.$t=this.$t.bind(this),Lo.library.add(Uo)},computed:{isMultiSelect:function(){var e=bn.getters.highlightedShapes.length;return e>1},highlightedShapes:function(){return bn.getters.highlightedShapes},availableButtons:function(){var e=this.hasPools;return this.buttons.filter((function(t){return"copy-button"===t.testId?!e:"clone-button"!==t.testId||!e}))}},methods:{showAlign:function(){this.showAlignmentButtons=!this.showAlignmentButtons},copySelection:function(){this.$emit("copy-selection")},cloneSelection:function(){this.$emit("clone-selection")},deleteElement:function(){this.$emit("remove-nodes")},paperNotRendered:function(){return!this.isRendering},setNodePosition:function(){this.shape.stopListening(this.paper,"element:pointerup",this.setNodePosition),this.savePositionOnPointerupEventSet=!1,bn.getters.allowSavingElementPosition&&this.$emit("save-state")},paperDoneRendering:function(){var e=this;if(this.isRendering)return new Promise((function(t){return e.paper.once("render:done",t)}))},setUpCrownConfig:function(){this.paper.on("render:done scale:changed translate:changed",this.repositionCrown)},setUpPositionHandling:function(){}},mounted:function(){var e=this;return y(v().mark((function t(){return v().wrap((function(t){while(1)switch(t.prev=t.next){case 0:return t.next=2,e.$nextTick();case 2:return t.next=4,e.paperDoneRendering();case 4:e.setUpCrownConfig();case 5:case"end":return t.stop()}}),t)})))()}},Nk=Ik,Rk=(h(6718),qn(Nk,Xx,Yx,!1,null,"bcd827ec",null)),Bk=Rk.exports,Lk={name:"Selection",components:{CrownMultiselect:Bk},props:{graph:Object,paperManager:Object,useModelGeometry:Boolean,processNode:Object},data:function(){return{start:null,isSelecting:!1,isSelected:!1,selected:[],conectedLinks:[],dragging:!1,style:{left:"0px",top:"0px",width:"0px",height:"0px"},mouseX:0,mouseY:0,top:0,left:0,initialPosition:null,hasMouseDown:!1,hasMouseMoved:!1,showLasso:!1,isOutOfThePool:!1,stopForceMove:!1,draggableBlackList:[Tl],selectionBlackList:[Bo],selectableBlackList:[Bo],newPool:null,oldPool:null,isValidSelectionLinks:!0,invalidPool:null}},mounted:function(){this.paperManager.paper.on("scale:changed ",this.updateSelectionBox),this.paperManager.paper.on("translate:changed ",this.translateChanged)},computed:{hasPoolsOrLanesSelected:function(){return this.selected.some((function(e){return e.model.component.node.type===bi||e.model.component.node.type===Tl}))}},watch:{selected:function(e){this.prepareConectedLinks(e),this.addToHighlightedNodes(e)}},methods:{selectElements:function(e){var t=this;return y(v().mark((function n(){return v().wrap((function(n){while(1)switch(n.prev=n.next){case 0:return n.next=2,t.$nextTick();case 2:return t.clearSelection(),t.selected=e,t.showLasso=!0,t.isSelected=!0,t.isSelecting=!0,t.start=null,n.next=10,t.$nextTick();case 10:t.updateSelectionBox();case 11:case"end":return n.stop()}}),n)})))()},selectElement:function(e){var t=arguments,n=this;return y(v().mark((function o(){var i;return v().wrap((function(o){while(1)switch(o.prev=o.next){case 0:if(i=t.length>1&&void 0!==t[1]&&t[1],!e.model.component||!n.selectableBlackList.includes(e.model.component.node.type)){o.next=3;break}return o.abrupt("return");case 3:return n.showLasso=!0,n.isSelected=!0,n.isSelecting=!0,n.start=null,i?n.shiftKeySelectionHandler(e):n.selected=[e],n.filterSelected(),o.next=11,n.$nextTick();case 11:!1===bn.getters.isReadOnly&&n.updateSelectionBox();case 12:case"end":return o.stop()}}),o)})))()},shiftKeySelectionHandler:function(e){var t=this;if(!(e&&e.model&&e.model.component&&this.draggableBlackList.includes(e.model.component.node.type))){var n=this.selected.find((function(e){return t.draggableBlackList.includes(e.model.component.node.type)}));if(n)this.selected=[e];else{var o=this.selected.find((function(e){return e.model.component.node.type===bi}));o&&e.model.component.node.type!==bi?this.selected=[e]:e.model.component&&e.model.component.node.type===bi?this.hasOnlyPools(this.selected)?this.selectOrUnselectShape(e):this.selected=[e]:e.model.component&&e.model.component.node.pool&&(o=this.getPool(this.selected),o&&e.model.component.node.pool.id!==o.model.get("id"))?this.selected=[e]:this.selectOrUnselectShape(e)}}},selectOrUnselectShape:function(e){var t=this.selected.find((function(t){return t.id===e.id}));t?this.selected=this.selected.filter((function(t){return t.id!==e.id})):this.selected.push(e)},clearSelection:function(){this.initSelection()},initSelection:function(){this.isSelecting=!1,this.start=null,this.selected=[],this.showLasso=!1,this.isSelected=!1,this.style={left:"0px",top:"0px",width:"0px",height:"0px"}},startSelection:function(e){var t=this.paperManager.paper,n=a.util.normalizeEvent(e),o=n.clientX,i=n.clientY,r=n.offsetX,s=n.offsetY,l=t.$el.offset();this.clearSelection(),this.isSelecting=!0,this.showLasso=!0,this.start={x:o-l.left+window.pageXOffset+t.$el.scrollLeft(),y:i-l.top+window.pageYOffset+t.$el.scrollTop()},this._offset={x:r,y:s}},updateSelection:function(e){var t=this.paperManager.paper;if(this.isSelecting&&!this.isSelected&&this.start){var n=a.util.normalizeEvent(e),o=t.$el.offset(),i={x:n.clientX-o.left+window.pageXOffset+t.$el.scrollLeft(),y:n.clientY-o.top+window.pageYOffset+t.$el.scrollTop()},r={height:i.y-this.start.y,width:i.x-this.start.x};this.style.left="".concat(r.width<0?this._offset.x+r.width:this.start.x,"px"),this.style.top="".concat(r.height<0?this._offset.y+r.height:this.start.y,"px"),this.style.width="".concat(Math.abs(r.width),"px"),this.style.height="".concat(Math.abs(r.height),"px")}},endSelection:function(){var e=this.paperManager.paper;if(this.isSelecting&&!this.isSelected){var t=e.$el.offset(),n={left:this.$el.offsetLeft+t.left,top:this.$el.offsetTop+t.top},o=this.$el.clientWidth,i=this.$el.clientHeight,r=(0,a.V)(e.viewport).toLocalPoint(n.left,n.top);r.x-=window.pageXOffset,r.y-=window.pageYOffset;var s=e.scale();o/=s.sx,i/=s.sy;var l=a.g.rect(r.x,r.y,o,i);this.selected=this.getElementsInSelectedArea(l,{strict:!1}),this.filterSelected(),this.selected&&this.selected.length>0?(this.updateSelectionBox(),this.isSelected=!0):(this.clearSelection(),this.isSelected=!1,this.start=null),this.start=null}},getElementsInSelectedArea:function(e,t){var n=!(arguments.length>2&&void 0!==arguments[2])||arguments[2],o=this.paperManager.paper,i=o.findViewsInArea(e,t);return n?(this.graph.getLinks().forEach((function(t){e.intersect(t.getBBox())&&i.push(o.findViewByModel(t))})),i):i},isPositionWithinArea:function(e,t){var n=t.x,o=t.y,i=t.width,r=t.height;return e.x>=n&&e.x<=n+i&&e.y>=o&&e.y<=o+r},prepareConectedLinks:function(e){var t=this,n=this.paperManager.paper;this.conectedLinks=[],this.isValidSelectionLinks=!0,e.forEach((function(e){var o=t.graph.getConnectedLinks(e.model);if(e.model.component&&e.model.component.node.type===bi){var i=e.model.getBBox(),r=n.model.getLinks().filter((function(e){var n=e.getSourcePoint(),o=e.getTargetPoint();return t.isPositionWithinArea(n,i)||t.isPositionWithinArea(o,i)}));r&&(o=[].concat(m(o),m(r)))}o.forEach((function(e){var o=n.findViewByModel(e);t.conectedLinks.some((function(e){return e.id===o.id}))||(t.conectedLinks.push(o),t.validateSelectionLinks(o))}))}))},validateSelectionLinks:function(e){if(this.isValidSelectionLinks){var t=this.selected.find((function(t){return t.model.get("id")===e.model.getSourceElement().get("id")})),n=this.selected.find((function(t){return t.model.get("id")===e.model.getTargetElement().get("id")}));this.isValidSelectionLinks=!(!t||!n)}},getSelectionVertex:function(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n=arguments.length>2&&void 0!==arguments[2]&&arguments[2],o={x:1/0,y:1/0},i={width:0,height:0},r=this.useModelGeometry,s=["PoolLane","standard.Link"];return e.filter((function(e){return n||!s.includes(e.model.get("type"))})).map((function(e){var n=t?e.model.getBBox({useModelGeometry:r}):e.getBBox({useModelGeometry:r}).inflate(7);o.x=Math.min(o.x,n.x),o.y=Math.min(o.y,n.y),i.width=Math.max(i.width,n.x+n.width),i.height=Math.max(i.height,n.y+n.height)})),{minX:o.x,minY:o.y,maxX:i.width,maxY:i.height}},updateSelectionBox:function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0],t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];if(e||this.isSelecting&&this.style)if(this.selected.length>0){var n=this.getSelectionVertex(this.selected,!1,!0);this.style.left="".concat(n.minX,"px"),this.style.top="".concat(n.minY,"px"),this.left=parseInt(this.style.left),this.top=parseInt(this.style.top),this.style.width="".concat(n.maxX-n.minX,"px"),this.style.height="".concat(n.maxY-n.minY,"px")}else t&&this.clearSelection()},filterSelected:function(){var e=[Nl,Wn,Zn,os,Vl],t=this.selected.filter((function(e){return e.model.component})).filter((function(e){return"processmaker-modeler-pool"===e.model.component.node.type})).map((function(e){return e.model.component.node.id}));this.selected=this.selected.filter((function(n){if(n.model.component&&n.model.component.node.pool)return n.model.component.node.pool&&!t.includes(n.model.component.node.pool.component.node.id);if(n.model.component&&e.includes(n.model.component.node.type)){var o=n.model.getParentCell();if(o.component&&o.component.node.pool)return!t.includes(o.component.node.pool.component.node.id)}return!0}))},translateChanged:function(){this.isSelecting&&this.updateSelectionBox()},hasLanes:function(e){var t=["processmaker-modeler-lane"],n=e.find((function(e){return t.includes(e.model.component.node.type)}));return!!n},hasOnlyLinks:function(e){var t=this.selected.filter((function(e){return"standard.Link"===e.model.get("type")}));return t&&e.length===t.length},hasOnlyPools:function(e){var t=this.selected.filter((function(e){return e.model.component&&e.model.component.node.type===bi}));return t&&e.length===t.length},startDrag:function(e){if(this.$refs.drag){this.stopForceMove=!1,this.dragging=!0,this.hasMouseMoved=!1;var t=a.util.normalizeEvent(e);this.mouseX=t.clientX,this.mouseY=t.clientY,this.top=this.$refs.drag.offsetTop,this.left=this.$refs.drag.offsetLeft,this.initialPosition={top:this.top,left:this.left},this.hasLanes(this.selected)||this.hasOnlyLinks(this.selected)?this.stopForceMove=!0:this.selected&&1===this.selected.length&&"processmaker.components.nodes.boundaryEvent.Shape"===this.selected[0].model.get("type")&&this.selected[0].model.component.attachToValidTarget(this.selected[0])}},drag:function(e){if(!this.stopForceMove&&this.dragging){this.hasMouseMoved=!0;var t=a.util.normalizeEvent(e),n=t.clientX-this.mouseX,o=t.clientY-this.mouseY;this.top+=o,this.left+=n,this.mouseX=t.clientX,this.mouseY=t.clientY;var i=this.paperManager.paper.scale();this.style.left="".concat(this.left,"px"),this.style.top="".concat(this.top,"px"),this.translateSelectedShapes(n/i.sx,o/i.sy),this.overPoolDrag(e)}},stopDrag:function(){var e=this;return y(v().mark((function t(){return v().wrap((function(t){while(1)switch(t.prev=t.next){case 0:return e.dragging=!1,e.stopForceMove=!1,t.next=4,e.$nextTick();case 4:return t.next=6,e.paperManager.awaitScheduledUpdates();case 6:e.overPoolStopDrag(),e.updateSelectionBox();case 8:case"end":return t.stop()}}),t)})))()},updateFlowsWaypoint:function(){this.conectedLinks.forEach((function(e){if(e.model.component&&"standard.Link"===e.model.get("type")){var t=e.sourceAnchor,n=e.targetAnchor;e.model.component.node.diagram.waypoint=[t].concat(m(e.model.component.shape.vertices()),[n]).map((function(t){return e.model.component.moddle.create("dc:Point",t)}))}}))},translateSelectedShapes:function(e,t,n){var o=["PoolLane","standard.Link","processmaker.components.nodes.boundaryEvent.Shape"],i=this.selected.filter((function(e){return!o.includes(e.model.get("type"))}));if(n&&i.filter((function(e){return n.model.get("id")!==e.model.get("id")})),this.selected&&1===this.selected.length&&"processmaker.components.nodes.boundaryEvent.Shape"===this.selected[0].model.get("type"))return this.selected[0].model.translate(e,t),void this.selected[0].model.component.turnInvalidTargetRed();i.forEach((function(n){return n.model.translate(e,t)}))},getShapesFromPoint:function(e){var t=a.util.normalizeEvent(e),n=t.clientX,o=t.clientY,i=(0,a.V)(this.paperManager.paper.viewport).toLocalPoint(n,o);return this.paperManager.paper.findViewsFromPoint(i)},addToHighlightedNodes:function(e){if(bn.commit("highlightNode"),e.length>0){var t=e.filter((function(e){return e.model.component})).map((function(e){return e.model.component.node}));bn.commit("addToHighlightedNodes",t)}else bn.commit("highlightNode",this.processNode)},getChildShape:function(e){var t=null,n=this.getShapesFromPoint(e);return 1===n.length?n[0]:(n.forEach((function(e){e.model.get("parent")&&e.model.component.node.type!==Tl&&(t=e)})),t)},markSelectedByPoint:function(e){var t=this.getChildShape(e);t&&(this.selected=[t]),this.selected.length>0&&(this.isSelected=!0,this.isSelecting=!0,this.showLasso=!0,this.updateSelectionBox())},getElementsInsideSelector:function(){var e=this.paperManager.paper,t=e.$el.offset(),n={left:this.$el.offsetLeft+t.left,top:this.$el.offsetTop+t.top},o=this.$el.clientWidth,i=this.$el.clientHeight,r=(0,a.V)(e.viewport).toLocalPoint(n.left,n.top);r.x-=window.pageXOffset,r.y-=window.pageYOffset;var s=e.scale();o/=s.sx,i/=s.sy;var l=a.g.rect(r.x,r.y,o,i);return this.getElementsInSelectedArea(l,{strict:!1})},getPool:function(e){var t=this.paperManager.paper,n=null;return e&&e.length>0&&e.forEach((function(e){var t=e.model;n||t.getParentCell()&&t.getParentCell().component.node.type===bi&&(n=t.getParentCell())})),t.findViewByModel(n)},isNotPoolChilds:function(e){if(e.length>0){var t=e.find((function(e){var t=e.model;return t.component&&t.component.node.type===bi})),n=e.find((function(e){var t=e.model;return t.getParentCell()&&t.getParentCell().component.node.type===bi}));return!!t||!n}return!1},overPoolDrag:function(e){if(!this.isNotPoolChilds(this.selected)){var t=this.getPool(this.selected),n=this.getShapesFromPoint(e),o=n.find((function(e){return e.model.component&&e.model.component.node.type===bi}));this.newPool=null,this.oldPool=null,o?(this.paperManager.setStateValid(),this.invalidPool&&(this.invalidPool.model.component.shape.attr("body/fill",Ce),this.invalidPool=null),t&&t.model.get("id")!==o.model.get("id")&&(this.newPool=o,this.oldPool=t,this.isOutOfThePool=!1,this.isValidSelectionLinks||(this.isOutOfThePool=!0,this.invalidPool=o,o.model.component.shape.attr("body/fill",fe),bn.commit("preventSavingElementPosition")))):(this.isOutOfThePool=!0,bn.commit("preventSavingElementPosition"),this.paperManager.setStateInvalid())}},overPoolStopDrag:function(){var e=this;return y(v().mark((function t(){return v().wrap((function(t){while(1)switch(t.prev=t.next){case 0:if(!e.isNotPoolChilds(e.selected)){t.next=4;break}return e.updateFlowsWaypoint(),e.$emit("save-state"),t.abrupt("return");case 4:e.isOutOfThePool?(e.rollbackSelection(),e.invalidPool&&(e.invalidPool.model.component.shape.attr("body/fill",Ce),e.invalidPool=null)):(e.updateFlowsWaypoint(),e.newPool?(e.moveElements(e.selected,e.oldPool,e.newPool),e.moveConectedLinks(e.conectedLinks,e.oldPool,e.newPool),e.newPool=null,e.oldPool=null,e.updateLaneChildren(e.selected),e.$emit("save-state")):(e.expandToFitElement(e.selected),e.updateLaneChildren(e.selected),e.$emit("save-state")));case 5:case"end":return t.stop()}}),t)})))()},rollbackSelection:function(){var e=this;return y(v().mark((function t(){var n,o,i,r;return v().wrap((function(t){while(1)switch(t.prev=t.next){case 0:return n=e.initialPosition.left-e.left,o=e.initialPosition.top-e.top,e.style.left="".concat(e.initialPosition.left,"px"),e.style.top="".concat(e.initialPosition.top,"px"),i=e.paperManager.paper.scale(),r=["PoolLane","standard.Link","processmaker.components.nodes.boundaryEvent.Shape"],e.selected.filter((function(e){return!r.includes(e.model.get("type"))})).forEach((function(e){e.model.translate(n/i.sx,o/i.sy)})),e.isOutOfThePool=!1,t.next=10,bn.commit("allowSavingElementPosition");case 10:return e.paperManager.setStateValid(),t.next=13,e.$nextTick();case 13:return t.next=15,e.paperManager.awaitScheduledUpdates();case 15:e.updateSelectionBox(!0);case 16:case"end":return t.stop()}}),t)})))()},expandToFitElement:function(e){if(e.length>0){var t=e.find((function(e){var t=e.model;return!!t.getParentCell()&&t.getParentCell().component.node.type===bi})).model.getParentCell(),n=this.getSelectionVertex(this.selected,!0),o=t.getBBox(),i=o.x,r=o.y,s=o.width,a=o.height,l=n.maxX-n.minX,c=n.maxY-n.minY,d=n.minX-i,u=n.minY-r,p=d+l,h=d,f=u,m=u+c,g=0,v=0,b="bottom",y="right";p>s-Uf&&(g=p+Uf),h<qf+Uf&&(g=s+(qf+Uf-h),y="left"),f<Uf&&(v=Uf-f+a,b="top"),m>a&&(v=m+Uf),(g||v)&&(t.resize(Math.max(g,s),Math.max(v,a),{direction:"".concat(b,"-").concat(y)}),t.component.fixResizeRounding(),t.component.laneSet&&(t.component.resizeLanes(),t.component.sortedLanes().forEach((function(e){bn.commit("updateNodeBounds",{node:e.component.node,bounds:e.getBBox()})}))),t.component.updateAnchorPointPosition(),bn.commit("updateNodeBounds",{node:t.component.node,bounds:t.getBBox()}))}},updateLaneChildren:function(e){if(e){var t=e.find((function(e){var t=e.model;return!!t.getParentCell()&&t.getParentCell().component.node.type===bi}));t&&(t.model.getParentCell(),t.model.component.laneSet&&t.component.updateLaneChildren())}},moveElements:function(e,t,n){var o=["PoolLane","standard.Link","processmaker.components.nodes.boundaryEvent.Shape"];e.filter((function(e){return!o.includes(e.model.get("type"))})).forEach((function(e){t.model.component.moveElement(e.model,n.model)}))},moveConectedLinks:function(e,t,n){e.forEach((function(e){t.model.component.moveFlow(e.model,n.model)}))}}},jk=Lk,Fk=(h(40213),qn(jk,Wx,$x,!1,null,"82f4c144",null)),zk=Fk.exports,qk={components:{ToolBar:dw,ExplorerRail:Lg,InspectorButton:Zg,InspectorPanel:cv,ProcessmakerModelerGenericFlow:Gx,Selection:zk,RailBottom:Lx},props:{owner:Object,decorations:{type:Object,default:function(){return{}}},readOnly:{type:Boolean,default:function(){return!1}},validationBar:Array,requestIdleNodes:{type:Array,default:function(){return[]}},requestCompletedNodes:{type:Array,default:function(){return[]}},requestInProgressNodes:{type:Array,default:function(){return[]}}},mixins:[Sw,Gw],data:function(){return{pasteInProgress:!1,cloneInProgress:!1,internalClipboard:[],tooltipTarget:null,parsers:{},extensions:[],nodeRegistry:{},graph:null,paper:null,paperManager:null,definitions:null,nodeIdGenerator:null,planeElements:null,canvasDragPosition:null,processNode:null,collaboration:null,moddle:null,allowDrop:!0,poolTarget:null,processes:[],cursor:null,parentHeight:null,parentWidth:null,linter:null,validationErrors:{},miniMapOpen:!1,panelsCompressed:!1,isOpenInspector:!1,isGrabbing:!1,isRendering:!1,allWarnings:[],nodeTypes:[],pmBlockNodes:[],breadcrumbData:[],activeNode:null,xmlManager:null,previouslyStackedShape:null,keyMod:this.isAppleOS()?"Command":"Control",canvasScale:1,initialScale:1,minimumScale:.2,scaleStep:.1,isDragging:!1,isSelecting:!1,isIntoTheSelection:!1,dragStart:null}},watch:{isRendering:function(){var e="Loading process, please be patient.";if(this.isRendering)return window.ProcessMaker.alert(e,"warning"),document.body.style.cursor="wait !important",void(this.cursor="wait");window.ProcessMaker.navbar.alerts=window.ProcessMaker.navbar.alerts.filter((function(t){return t.alertText!==e})),document.body.style.cursor="auto",this.cursor=null},currentXML:function(){this.validateIfAutoValidateIsOn()},definitions:function(){this.validateIfAutoValidateIsOn()},autoValidate:function(){this.validateIfAutoValidateIsOn()},canvasScale:function(e){this.paperManager.scale=e}},computed:{noElementsSelected:function(){return 0===this.highlightedNodes.filter((function(e){return!e.isType("processmaker-modeler-process")})).length},tooltipTitle:function(){if(this.tooltipTarget)return this.tooltipTarget.$el.data("title")},autoValidate:function(){return bn.getters.autoValidate},nodes:function(){return bn.getters.nodes},currentXML:function(){return dv.getters.currentState},copiedElements:function(){return bn.getters.copiedElements},highlightedNode:function(){return bn.getters.highlightedNodes[0]},highlightedNodes:function(){return bn.getters.highlightedNodes},invalidNodes:function(){return qw(this.validationErrors,this.nodes)},showComponent:function(){return bn.getters.showComponent}},methods:{handleToggleInspector:function(e){this.isOpenInspector=e},isAppleOS:function(){return"undefined"!==typeof navigator&&/Mac|iPad|iPhone/.test(navigator.platform)},shapeResize:function(){var e=arguments,t=this;return y(v().mark((function n(){var o;return v().wrap((function(n){while(1)switch(n.prev=n.next){case 0:return o=!(e.length>0&&void 0!==e[0])||e[0],n.next=3,t.$nextTick();case 3:return n.next=5,t.paperManager.awaitScheduledUpdates();case 5:t.$refs.selector.updateSelectionBox(!0,o);case 6:case"end":return n.stop()}}),n)})))()},toggleDefaultFlow:function(e){var t=e.definition.sourceRef;t.default&&t.default.id===e.id&&(e=null),t.set("default",e)},cloneElement:function(e,t){var n=e.clone(this.nodeRegistry,this.moddle,this.$t),o=(e.diagram.bounds.height+30)*t;n.diagram.bounds.y+=o,this.addNode(n)},copyElement:function(){var e=[Nl,Wn,Zn,Bo,iv],t=[Mb,Rb,Hb,Zb,iy,py];1===this.highlightedNodes.length&&(e.includes(this.highlightedNodes[0].type)||t.includes(this.highlightedNodes[0].type))||(bn.commit("setCopiedElements",this.cloneNodesSelection()),this.$bvToast.toast(this.$t("Object(s) have been copied"),{noCloseButton:!0,variant:"success",solid:!0,toaster:"b-toaster-top-center"}))},publishTemplate:function(){this.$emit("publishTemplate")},publishPmBlock:function(){this.$emit("publishPmBlock")},pasteElements:function(){var e=this;return y(v().mark((function t(){return v().wrap((function(t){while(1)switch(t.prev=t.next){case 0:if(!(e.copiedElements.length>0)||e.pasteInProgress){t.next=21;break}return e.pasteInProgress=!0,t.prev=2,t.next=5,e.addClonedNodes(e.copiedElements);case 5:return t.next=7,e.$nextTick();case 7:return t.next=9,e.paperManager.awaitScheduledUpdates();case 9:return t.next=11,e.$refs.selector.selectElements(e.findViewElementsFromNodes(e.copiedElements),!0);case 11:return t.next=13,e.$nextTick();case 13:return t.next=15,bn.commit("setCopiedElements",e.cloneNodesSelection());case 15:e.scrollToSelection();case 16:return t.prev=16,e.pasteInProgress=!1,t.next=20,e.pushToUndoStack();case 20:return t.finish(16);case 21:case"end":return t.stop()}}),t,null,[[2,,16,21]])})))()},cloneSelection:function(){var e=this;return y(v().mark((function t(){var n;return v().wrap((function(t){while(1)switch(t.prev=t.next){case 0:if(n=e.cloneNodesSelection(),!n||0!==n.length){t.next=3;break}return t.abrupt("return");case 3:return t.prev=3,e.cloneInProgress=!0,e.$refs.selector.clearSelection(),t.next=8,e.addClonedNodes(n);case 8:return t.next=10,e.$nextTick();case 10:return t.next=12,e.paperManager.awaitScheduledUpdates();case 12:return t.next=14,e.$refs.selector.selectElements(e.findViewElementsFromNodes(n));case 14:e.scrollToSelection();case 15:return t.prev=15,e.cloneInProgress=!1,t.next=19,e.pushToUndoStack();case 19:return t.finish(15);case 20:case"end":return t.stop()}}),t,null,[[3,,15,20]])})))()},scrollToSelection:function(){var e=this.$refs["paper-container"].getBoundingClientRect(),t=this.$refs.selector,n=t.$el.getBoundingClientRect();if(n.right>e.right||n.bottom>e.bottom||n.left<e.left||n.top<e.top){var o=this.paper.translate(),i=o.ty-(n.top-e.top-n.height);this.paper.translate(o.tx,i),t.updateSelectionBox(!0)}},findViewElementsFromNodes:function(e){var t=this;return e.map((function(e){var n=t.$refs.nodeComponent.find((function(t){return t.node===e})),o=n.shape;return t.paper.findViewByModel(o)}))},close:function(){var e=this;return y(v().mark((function t(){return v().wrap((function(t){while(1)switch(t.prev=t.next){case 0:e.$emit("close");case 1:case"end":return t.stop()}}),t)})))()},saveBpmn:function(){var e=this;return y(v().mark((function t(){var n,o,i,r,s;return v().wrap((function(t){while(1)switch(t.prev=t.next){case 0:return n=document.querySelector(".mini-paper svg"),o="text { font-family: sans-serif; }",i=document.createElement("style"),i.appendChild(document.createTextNode(o)),n.appendChild(i),t.next=7,e.getXmlFromDiagram();case 7:r=t.sent,s=(new XMLSerializer).serializeToString(n),e.$emit("saveBpmn",{xml:r,svg:s});case 10:case"end":return t.stop()}}),t)})))()},borderOutline:function(e){return this.decorations.borderOutline&&this.decorations.borderOutline[e]},addWarning:function(e){this.allWarnings.push(e),this.$emit("warnings",this.allWarnings)},validatePlaneElements:function(){var e=this;this.planeElements.filter((function(e){return!e.bpmnElement})).map((function(t){return{title:e.$t("Non-existent Element"),text:e.$t("bpmdi:BPMNShape ")+t.id+e.$t(" references a non-existent element and was not parsed")}})).forEach((function(t){return e.addWarning(t)}))},cleanPlaneElements:function(){Fg()(this.planeElements,(function(e){return!e.bpmnElement}))},getTooltipTarget:function(){return this.tooltipTarget.$el[0]},validateIfAutoValidateIsOn:function(){this.autoValidate&&this.validateBpmnDiagram()},translateConfig:function(e){if(e.config){var t=e.config;t.label=this.$t(t.label),t.helper=this.$t(t.helper)}e.items&&e.items.forEach(this.translateConfig)},pushToUndoStack:function(){var e=this;return y(v().mark((function t(){var n;return v().wrap((function(t){while(1)switch(t.prev=t.next){case 0:if(!e.pasteInProgress&&!e.cloneInProgress){t.next=2;break}return t.abrupt("return");case 2:return t.prev=2,t.next=5,e.getXmlFromDiagram();case 5:return n=t.sent,t.next=8,dv.dispatch("pushState",n);case 8:window.ProcessMaker.EventBus.$emit("modeler-change"),t.next=14;break;case 11:t.prev=11,t.t0=t["catch"](2),console.warn(t.t0.message);case 14:case"end":return t.stop()}}),t,null,[[2,11]])})))()},getXmlFromDiagram:function(){var e=this;return new Promise((function(t,n){e.toXML((function(e,o){e?n(e):t(o)}))}))},validateBpmnDiagram:function(){var e=this;return y(v().mark((function t(){return v().wrap((function(t){while(1)switch(t.prev=t.next){case 0:if(bn.getters.globalProcesses&&0!==bn.getters.globalProcesses.length){t.next=3;break}return t.next=3,bn.dispatch("fetchGlobalProcesses");case 3:return t.next=5,e.linter.lint(e.definitions);case 5:e.validationErrors=t.sent,e.$emit("validate",e.validationErrors);case 7:case"end":return t.stop()}}),t)})))()},setPools:function(e){var t;(this.collaboration||(this.collaboration=this.moddle.create("bpmn:Collaboration"),this.definitions.get("rootElements").push(this.collaboration),this.collaboration.set("id","collaboration_0"),this.plane.set("bpmnElement",this.collaboration)),e.get("processRef"))?this.collaboration.get("participants").includes(e)||this.collaboration.get("participants").push(e):(0===this.collaboration.get("participants").length?t=this.processNode.definition:(t=this.moddle.create("bpmn:Process"),this.processes.push(t),t.set("id",this.nodeIdGenerator.generateProcessId()),this.definitions.get("rootElements").push(t)),e.set("processRef",t),this.collaboration.get("participants").push(e))},unsetPools:function(){Gr()(this.definitions.get("rootElements"),this.collaboration),this.plane.set("bpmnElement",this.processNode.definition),this.collaboration=null},highlightNode:function(e,t){if(e&&this.highlightedNode)if(t&&t.shiftKey)bn.commit("addToHighlightedNodes",[e]);else{var n=Gn().isEqual(e.id,this.highlightedNode.id);n||bn.commit("highlightNode",e)}},blurFocusedScreenBuilderElement:function(){var e=["INPUT","SELECT"];e.includes(document.activeElement&&document.activeElement.tagName)&&document.activeElement.blur()},registerStatusBar:function(e){this.owner.validationBar.push(e)},registerComponentMixin:function(e,t){e.mixins||(e.mixins=[]),e.mixins.push(t)},registerBpmnExtension:function(e,t){this.extensions[e]=t},registerNode:function(e,t){var n=this,o=function(){return e.id},i=function(t){if(t.get("implementation")===e.implementation)return e.id};this.translateConfig(e.inspectorConfig[0]),Uw(e),this.nodeRegistry[e.id]=e,vt().component(e.id,e.component),this.nodeTypes.push(e);var r=Array.isArray(e.bpmnType)?e.bpmnType:[e.bpmnType];r.forEach((function(r){n.parsers[r]||(n.parsers[r]={custom:[],implementation:[],default:[]}),t?n.parsers[r].custom.push(t):e.implementation?n.parsers[r].implementation.push(i):n.parsers[r].default.push(o)}))},registerPmBlock:function(e,t){var n=this,o=function(){return e.id};this.translateConfig(e.inspectorConfig[0]),Uw(e),this.nodeRegistry[e.id]=e,vt().component(e.id,e.component),this.pmBlockNodes.push(e);var i=Array.isArray(e.bpmnType)?e.bpmnType:[e.bpmnType];i.forEach((function(e){n.parsers[e]||(n.parsers[e]={custom:[],implementation:[],default:[]}),t?n.parsers[e].custom.push(t):n.parsers[e].default.push(o)})),pg.commit("setPmBlockNodeTypes",this.pmBlockNodes)},addMessageFlows:function(){this.collaboration&&this.collaboration.get("messageFlows").filter(this.hasSourceAndTarget).forEach(this.setNode)},loadAssociations:function(e,t){var n=this;t.filter((function(e){return"bpmn:Association"===e.$type&&n.hasSourceAndTarget(e)})).forEach((function(o){return n.setNode(o,e,t)}))},loadDataAssociations:function(e){var t=this,n=e.filter((function(e){return e.get("dataOutputAssociations")&&e.get("dataOutputAssociations").length>0}));n.forEach((function(n){n.get("dataOutputAssociations").forEach((function(n){t.setNode(n,e)}))}));var o=e.filter((function(e){return e.get("dataInputAssociations")&&e.get("dataInputAssociations").length>0}));o.forEach((function(n){n.get("dataInputAssociations").forEach((function(n){t.setNode(n,e)}))}))},loadArtifacts:function(e,t){var n=this;t.filter((function(e){return"bpmn:Association"!==e.$type})).forEach((function(o){return n.setNode(o,e,t)}))},loadSequenceFlows:function(e,t){var n=this;e.filter((function(e){return"bpmn:SequenceFlow"===e.$type&&n.hasSourceAndTarget(e)})).forEach((function(o){return n.setNode(o,e,t)}))},loadFlowElements:function(e,t){var n=this;e.filter((function(e){return"bpmn:SequenceFlow"!==e.$type})).forEach((function(o){return n.setNode(o,e,t)}))},addLanes:function(e){e.get("laneSets")[0]&&e.laneSets[0].lanes.forEach(this.setNode)},addPools:function(){this.collaboration&&this.collaboration.get("participants").forEach(this.setNode)},setUpDiagram:function(){var e=this;this.processes.forEach((function(t){e.ensureCancelActivityIsAddedToBoundaryEvents(t),e.addLanes(t);var n=t.get("flowElements"),o=t.get("artifacts");e.loadFlowElements(n,o),e.loadSequenceFlows(n,o),e.loadArtifacts(n,o),e.loadAssociations(n,o),e.loadDataAssociations(n)})),bn.commit("setRootElements",this.definitions.rootElements),this.addMessageFlows(),bn.commit("highlightNode",this.processNode)},getCollaboration:function(){return this.definitions.rootElements.find((function(e){var t=e.$type;return"bpmn:Collaboration"===t}))},getProcesses:function(){return this.definitions.rootElements.filter((function(e){var t=e.$type;return"bpmn:Process"===t}))},getPlane:function(){return this.definitions.diagrams[0].plane},getPlaneElements:function(){return this.plane.get("planeElement")},parse:function(){var e=this;this.collaboration=this.getCollaboration(),this.processes=this.getProcesses(),this.plane=this.getPlane(),this.planeElements=this.getPlaneElements(),this.validatePlaneElements(),this.cleanPlaneElements(),this.processNode=new Ro("processmaker-modeler-process",this.processes[0],this.planeElements.find((function(t){return t.bpmnElement.id===e.processes[0].id})))},removeUnsupportedElementAttributes:function(e){var t=["extensionElements"];t.filter((function(t){return e.get(t)})).forEach((function(t){return e.set(t,void 0)}))},getCustomParser:function(e){var t=this,n=this.parsers[e.$type];if(n){var o=n.custom.find((function(n){return n(e,t.moddle)})),i=n.implementation.find((function(n){return n(e,t.moddle)})),r=n.default.find((function(n){return n(e,t.moddle)}));return o||i||r}},handleUnsupportedElement:function(e,t,n,o,i){this.addWarning({title:this.$t("Unsupported Element"),text:e+this.$t(" is an unsupported element type in parse")}),Gr()(t,n),Gr()(o,n),Gr()(this.planeElements,i),this.collaboration&&Gr()(this.collaboration.get("messageFlows"),n);var r=n.get("incoming");r&&Gr()(t,r);var s=n.get("outgoing");s&&Gr()(t,s)},setNode:function(e,t,n){var o=this.planeElements.find((function(t){return t.bpmnElement.id===e.id})),i=e.$type,r=this.getCustomParser(e);if(r){this.removeUnsupportedElementAttributes(e);var s=e.config?JSON.parse(e.config):{},a=(null===s||void 0===s?void 0:s.processKey)||r(e,this.moddle),l=["bpmn:TextAnnotation","bpmn:Association","bpmn:DataOutputAssociation","bpmn:DataInputAssociation"],c=-1===l.indexOf(i);c&&!e.get("name")&&e.set("name",""),this.createNodeAsync(a,e,o)}else this.handleUnsupportedElement(i,t,e,n,o)},createNodeAsync:function(e,t,n){var o=this;return y(v().mark((function i(){var r;return v().wrap((function(i){while(1)switch(i.prev=i.next){case 0:r=o.createNode(e,t,n),bn.commit("addNode",r);case 2:case"end":return i.stop()}}),i)})))()},createNode:function(e,t,n){return Ro.isTimerType(e)?new Tw(e,t,n):(Object.keys(t).forEach((function(e){void 0!==t[e]&&null!==t[e]||delete t[e]})),new Ro(e,t,n))},hasSourceAndTarget:function(e){var t=e.sourceRef&&this.parsers[e.sourceRef.$type],n=e.targetRef&&this.parsers[e.targetRef.$type];return t&&n},waitForCursorToChange:function(){var e=this;return y(v().mark((function t(){var n;return v().wrap((function(t){while(1)switch(t.prev=t.next){case 0:return n=300,t.next=3,e.$nextTick();case 3:return t.abrupt("return",new Promise((function(e){return setTimeout(e,n)})));case 4:case"end":return t.stop()}}),t)})))()},renderPaper:function(){var e=this;return y(v().mark((function t(){return v().wrap((function(t){while(1)switch(t.prev=t.next){case 0:return e.isRendering=!0,t.next=3,e.paperManager.performAtomicAction(y(v().mark((function t(){return v().wrap((function(t){while(1)switch(t.prev=t.next){case 0:return t.next=2,e.waitForCursorToChange();case 2:e.parse(),e.addPools(),e.setUpDiagram();case 5:case"end":return t.stop()}}),t)}))));case 3:return t.next=5,e.paperManager.awaitScheduledUpdates();case 5:e.isRendering=!1,e.$emit("parsed");case 7:case"end":return t.stop()}}),t)})))()},loadXML:function(){var e=arguments,t=this;return y(v().mark((function n(){var o,i;return v().wrap((function(n){while(1)switch(n.prev=n.next){case 0:return o=e.length>0&&void 0!==e[0]?e[0]:null,i=!1,null===o&&(o=t.currentXML,i=!0),n.next=5,t.xmlManager.getDefinitionsFromXml(o);case 5:return t.definitions=n.sent,t.xmlManager.definitions=t.definitions,t.nodeIdGenerator=Hh(t.definitions),bn.commit("clearNodes"),n.next=11,t.renderPaper();case 11:i&&window.ProcessMaker.EventBus.$emit("modeler-change");case 12:case"end":return n.stop()}}),n)})))()},getBoundaryEvents:function(e){return e.get("flowElements").filter((function(e){var t=e.$type;return"bpmn:BoundaryEvent"===t}))},createBoundaryEvent:function(e){var t=sg.definition(this.moddle,this.$t);return t.set("id",e.get("id")),t.set("name",e.get("name")),t.set("eventDefinitions",e.get("eventDefinitions")),t.set("cancelActivity",e.get("cancelActivity")),t.set("attachedToRef",e.get("attachedToRef")),t.set("color",e.get("color")),t.$parent=e.$parent,e.get("outgoing").length>0&&t.set("outgoing",e.get("outgoing")),t},ensureCancelActivityIsAddedToBoundaryEvents:function(e){var t=this;this.getBoundaryEvents(e).forEach((function(n){var o=t.createBoundaryEvent(n);n.get("outgoing").forEach((function(e){return e.set("sourceRef",o)})),t.replaceDefinition(n,o,e)}))},replaceDefinition:function(e,t,n){var o=n.get("flowElements").indexOf(e);n.flowElements[o]=t;var i=this.planeElements.find((function(t){return t.bpmnElement===e}));i.bpmnElement=t},toXML:function(e){this.moddle.toXML(this.definitions,{format:!0},e)},onCreateElementHandler:function(e){var t=e.event,n=e.control;this.handleDrop({clientX:t.clientX,clientY:t.clientY,control:n})},handleDrop:function(e){var t=this;return y(v().mark((function n(){var o,i,r,s,a,l,c,d,u,p,h;return v().wrap((function(n){while(1)switch(n.prev=n.next){case 0:if(o=e.clientX,i=e.clientY,r=e.control,s=e.nodeThatWillBeReplaced,t.validateDropTarget({clientX:o,clientY:i,control:r}),t.allowDrop){n.next=4;break}return n.abrupt("return");case 4:return a=t.nodeRegistry[r.type].definition(t.moddle,t.$t),l=t.nodeRegistry[r.type].diagram(t.moddle),c=t.paperManager.clientToGridPoint(o,i),d=c.x,u=c.y,l.bounds.x=d,l.bounds.y=u,p=t.createNode(r.type,a,l),p.isBpmnType("bpmn:BoundaryEvent")&&t.setShapeCenterUnderCursor(l),t.highlightNode(p),n.next=14,t.addNode(p);case 14:if(s){n.next=16;break}return n.abrupt("return");case 16:return h=new Hw(s,a,t.graph,p,t.processes,t.collaboration),h.migrate(),n.abrupt("return",p);case 19:case"end":return n.stop()}}),n)})))()},setShapeCenterUnderCursor:function(e){e.bounds.x-=e.bounds.width/2,e.bounds.y-=e.bounds.height/2},selectNewNode:function(e){var t=this;return y(v().mark((function n(){var o,i;return v().wrap((function(n){while(1)switch(n.prev=n.next){case 0:return n.next=2,t.$nextTick();case 2:return n.next=4,t.paperManager.awaitScheduledUpdates();case 4:return o=t.$refs.nodeComponent.find((function(t){return t.node===e})),i=o.shapeView,n.next=8,t.$refs.selector.selectElement(i);case 8:case"end":return n.stop()}}),n)})))()},addNode:function(e){var t=this;return y(v().mark((function n(){var o;return v().wrap((function(n){while(1)switch(n.prev=n.next){case 0:if(e.pool||(e.pool=t.poolTarget),o=e.getTargetProcess(t.processes,t.processNode),uw(e,o),e.setIds(t.nodeIdGenerator),t.planeElements.push(e.diagram),bn.commit("addNode",e),t.poolTarget=null,![Nl,Tl,os,Vl,Wn,Zn,Bo].includes(e.type)){n.next=9;break}return n.abrupt("return");case 9:return t.selectNewNode(e),n.abrupt("return",new Promise((function(e){setTimeout((function(){t.pushToUndoStack(),e()}))})));case 11:case"end":return n.stop()}}),n)})))()},addClonedNodes:function(e){var t=this;return y(v().mark((function n(){return v().wrap((function(n){while(1)switch(n.prev=n.next){case 0:e.forEach((function(e){e.pool||(e.pool=t.poolTarget);var n=e.getTargetProcess(t.processes,t.processNode);uw(e,n),t.planeElements.push(e.diagram),bn.commit("addNode",e),t.poolTarget=null}));case 1:case"end":return n.stop()}}),n)})))()},removeNode:function(e){var t=arguments,n=this;return y(v().mark((function o(){var i,r,s;return v().wrap((function(o){while(1)switch(o.prev=o.next){case 0:if(i=t.length>1&&void 0!==t[1]?t[1]:{},r=i.removeRelationships,s=void 0===r||r,e){o.next=3;break}return o.abrupt("return");case 3:return s&&(to(e,n),no(e,n),oo(e,n)),ro(e),io(n.graph,e,n.removeNode),so(e),n.removeNodesFromLane(e),n.removeNodesFromPool(e),bn.commit("removeNode",e),bn.commit("highlightNode",n.processNode),n.$refs.selector.clearSelection(),o.next=14,n.$nextTick();case 14:return o.next=16,n.pushToUndoStack();case 16:n.processes=n.getProcesses(),n.processes&&n.processes.length>0&&(n.processNode=new Ro("processmaker-modeler-process",n.processes[0],n.planeElements.find((function(e){return e.bpmnElement.id===n.processes[0].id}))));case 18:case"end":return o.stop()}}),o)})))()},removeNodes:function(){var e=this;return y(v().mark((function t(){return v().wrap((function(t){while(1)switch(t.prev=t.next){case 0:return t.next=2,e.performSingleUndoRedoTransaction(y(v().mark((function t(){return v().wrap((function(t){while(1)switch(t.prev=t.next){case 0:return t.next=2,e.paperManager.performAtomicAction(y(v().mark((function t(){var n;return v().wrap((function(t){while(1)switch(t.prev=t.next){case 0:return n=[],e.highlightedNodes.forEach((function(t){return n.push(e.removeNode(t,{removeRelationships:!0}))})),t.next=4,Promise.all(n);case 4:bn.commit("highlightNode");case 5:case"end":return t.stop()}}),t)}))));case 2:case"end":return t.stop()}}),t)}))));case 2:case"end":return t.stop()}}),t)})))()},replaceNode:function(e){var t=this,n=e.node,o=e.typeToReplaceWith;this.performSingleUndoRedoTransaction(y(v().mark((function e(){return v().wrap((function(e){while(1)switch(e.prev=e.next){case 0:return e.next=2,t.paperManager.performAtomicAction(y(v().mark((function e(){var i,r,s,a;return v().wrap((function(e){while(1)switch(e.prev=e.next){case 0:return i=t.paper.localToClientPoint(n.diagram.bounds),r=i.x,s=i.y,e.next=3,t.handleDrop({clientX:r,clientY:s,control:{type:o},nodeThatWillBeReplaced:n});case 3:return a=e.sent,e.next=6,t.removeNode(n,{removeRelationships:!1});case 6:t.highlightNode(a),t.selectNewNode(a);case 8:case"end":return e.stop()}}),e)}))));case 2:case"end":return e.stop()}}),e)}))))},replaceGenericFlow:function(e){var t=this,n=e.actualFlow,o=e.genericFlow,i=e.targetNode;this.performSingleUndoRedoTransaction(y(v().mark((function e(){return v().wrap((function(e){while(1)switch(e.prev=e.next){case 0:return e.next=2,t.paperManager.performAtomicAction(y(v().mark((function e(){return v().wrap((function(e){while(1)switch(e.prev=e.next){case 0:return e.next=2,t.highlightNode(null);case 2:return e.next=4,t.$nextTick();case 4:return e.next=6,t.addNode(n);case 6:return e.next=8,bn.commit("removeNode",o);case 8:return e.next=10,t.$nextTick();case 10:return e.next=12,t.highlightNode(i);case 12:case"end":return e.stop()}}),e)}))));case 2:case"end":return e.stop()}}),e)}))))},performSingleUndoRedoTransaction:function(e){var t=this;return y(v().mark((function n(){return v().wrap((function(n){while(1)switch(n.prev=n.next){case 0:return dv.commit("disableSavingState"),n.next=3,e();case 3:return dv.commit("enableSavingState"),n.next=6,t.pushToUndoStack();case 6:case"end":return n.stop()}}),n)})))()},removeNodesFromLane:function(e){var t=e.pool&&e.pool.component.laneSet&&e.pool.component.laneSet.get("lanes").find((function(t){return t.get("flowNodeRef").includes(e.definition)}));t&&Gr()(t.get("flowNodeRef"),e.definition)},removeNodesFromPool:function(e){var t=this;if("processmaker-modeler-pool"===e.type&&e.definition.processRef){e.definition.processRef.artifacts&&e.definition.processRef.artifacts.forEach((function(e){var n=t.nodes.find((function(t){return t.definition===e}));n&&t.removeNode(n)})),e.definition.processRef.flowElements&&e.definition.processRef.flowElements.forEach((function(e){var n=t.nodes.find((function(t){return t.definition===e}));n&&t.removeNode(n)}));var n=e.definition.processRef.laneSets;n&&n.length>0&&n[0].lanes.forEach((function(e){var n=t.nodes.find((function(t){return t.definition===e}));n&&t.removeNode(n)}))}},handleResize:function(){var e=this.$el.parentElement,t=e.clientWidth,n=e.clientHeight;this.parentWidth=t+"px",this.parentHeight=n+"px",this.paperManager.setPaperDimensions(t,n)},validateDropTarget:function(e){var t=e.clientX,n=e.clientY,o=e.control,i=tb(t,n,o,this.paperManager.paper,this.graph,this.collaboration,this.$refs["paper-container"]),r=i.allowDrop,s=i.poolTarget;this.allowDrop=r,this.poolTarget=s},isBpmnNode:function(e){return null!=e.component},setShapeStacking:function(e){var t=this;this.isRendering||!e.component.node.isType("processmaker-modeler-pool")&&e===this.previouslyStackedShape||(this.previouslyStackedShape=e,this.paperManager.performAtomicAction((function(){return ky(e,t.graph)})))},showSavedNotification:function(){dv.dispatch("saved")},enableVersions:function(){dv.dispatch("enableVersions")},setVersionIndicator:function(e){dv.dispatch("setVersionIndicator",e)},setLoadingState:function(e){dv.dispatch("setLoadingState",e)},clearSelection:function(){this.$refs.selector.clearSelection()},isPointInSelection:function(e){var t=this.$refs.selector.$el;if("function"===typeof t.getBoundingClientRect){var n=t.getBoundingClientRect(),o=n.x,i=n.y,r=n.width,s=n.height;if(e.clientX>=o&&e.clientX<=o+r&&e.clientY>=i&&e.clientY<=i+s)return!0}return!1},pointerDowInShape:function(e,t){var n=this;return y(v().mark((function o(){var i,r,s;return v().wrap((function(o){while(1)switch(o.prev=o.next){case 0:if(i=e.clientX,r=e.clientY,s=n.paper.findViewByModel(t),n.isDragging=!1,n.isSelecting=!1,n.isIntoTheSelection=!1,n.dragStart={x:i,y:r},!n.isPointInSelection(e)){o.next=10;break}n.isIntoTheSelection=!0,o.next=15;break;case 10:if(e.shiftKey){o.next=15;break}return o.next=13,n.$refs.selector.selectElement(s);case 13:return o.next=15,n.$nextTick();case 15:n.$refs.selector.startDrag({clientX:e.clientX,clientY:e.clientY});case 16:case"end":return o.stop()}}),o)})))()},pointerDownHandler:function(e){var t=e.clientX,n=e.clientY;this.isDragging=!1,this.isSelecting=!1,this.isIntoTheSelection=!1,this.dragStart={x:t,y:n},this.isPointInSelection(e)?(this.isIntoTheSelection=!0,this.$refs.selector.startDrag({clientX:e.clientX,clientY:e.clientY})):(this.isSelecting=!0,this.$refs.selector.startSelection(e))},pointerMoveHandler:function(e){var t=e.clientX,n=e.clientY;bn.getters.isReadOnly?this.canvasDragPosition&&!this.clientLeftPaper&&this.paperManager.translate(e.offsetX-this.canvasDragPosition.x,e.offsetY-this.canvasDragPosition.y):this.isGrabbing||(this.dragStart&&(Math.abs(t-this.dragStart.x)>5||Math.abs(n-this.dragStart.y)>5)?(this.isDragging=!0,this.dragStart=null):this.isSelecting?this.$refs.selector.updateSelection(e):this.isDragging&&this.$refs.selector.drag(e))},pointerUpHandler:function(e,t){!this.isDragging&&this.dragStart?t?this.$refs.selector.selectElement(t,e.shiftKey):this.clearSelection():this.isSelecting?this.$refs.selector.endSelection(this.paperManager.paper):this.$refs.selector.stopDrag(e),window.ProcessMaker.EventBus.$emit("custom-pointerclick",e),this.isDragging=!1,this.dragStart=null,this.isSelecting=!1}},created:function(){Wr()&&(window.store=bn,window.undoRedoStore=dv),this.$t=this.$t.bind(this),window.ProcessMaker.EventBus.$emit("modeler-before-init",{registerComponentMixin:this.registerComponentMixin}),this.registerNode(rv),window.ProcessMaker.EventBus.$emit("modeler-init",{registerInspectorExtension:vy,registerBpmnExtension:this.registerBpmnExtension,registerNode:this.registerNode,registerStatusBar:this.registerStatusBar,registerPmBlock:this.registerPmBlock}),this.moddle=new(lg())(this.extensions),this.linter=new uv.Linter(eb),this.xmlManager=new Lw(this.moddle),this.$emit("set-xml-manager",this.xmlManager)},mounted:function(){var e=this;bn.commit("setReadOnly",this.readOnly),this.graph=new a.dia.Graph,bn.commit("setGraph",this.graph),this.graph.set("interactiveFunc",(function(e){var t="standard.EmbeddedImage"===e.model.get("type");return{elementMove:t,labelMove:!1}})),this.paperManager=gy.factory(this.$refs.paper,this.graph.get("interactiveFunc"),this.graph),this.paper=this.paperManager.paper,this.paperManager.addEventHandler("cell:pointerdblclick",_w),this.handleResize(),window.addEventListener("resize",this.handleResize),bn.commit("setPaper",this.paperManager.paper),this.paperManager.addEventHandler("element:pointerclick",this.blurFocusedScreenBuilderElement,this),this.paperManager.addEventHandler("blank:pointerdown",(function(t,n,o){if(!e.isGrabbing){bn.getters.isReadOnly&&(e.isGrabbing=!0);var i=e.paperManager.scale;e.canvasDragPosition={x:n*i.sx,y:o*i.sy},e.isOverShape=!1,e.pointerDownHandler(t)}}),this),this.paperManager.addEventHandler("cell:mouseover element:mouseover",(function(t){var n=t.model;e.isBpmnNode(n)&&"default"!==n.attr("body/cursor")&&!e.isGrabbing&&n.attr("body/cursor","move"),e.isGrabbing&&e.isBpmnNode(n)&&n.attr("body/cursor","grabbing")})),this.paperManager.addEventHandler("blank:pointerup",(function(t){e.isGrabbing=!1,e.canvasDragPosition=null,e.activeNode=null,e.pointerUpHandler(t)}),this),this.paperManager.addEventHandler("cell:pointerup",(function(t,n){e.canvasDragPosition=null,e.activeNode=null,e.pointerUpHandler(n,t)}),this),this.$refs["paper-container"].addEventListener("mouseenter",(function(){bn.commit("setClientLeftPaper",!1)})),this.$el.addEventListener("mousemove",(function(t){e.pointerMoveHandler(t)})),this.$refs["paper-container"].addEventListener("mouseleave",(function(){e.paperManager.removeEventHandler("blank:pointermove"),bn.commit("setClientLeftPaper",!0)})),this.paperManager.addEventHandler("cell:pointerclick",(function(e,t,n,o){var i=e.model.get("onClick");i&&i(e,t,n,o)})),this.paperManager.addEventHandler("cell:pointerclick",(function(t,n){var o=t.model;e.isBpmnNode(o)&&(e.isGrabbing||(o.component.$emit("click",n),e.$emit("click",{event:n,node:e.highlightedNode.definition})))})),this.paperManager.addEventHandler("cell:pointerdown",(function(t,n){var o=t.model;e.isBpmnNode(o)&&(e.isGrabbing||(e.setShapeStacking(o),e.activeNode=o.component.node,e.isOverShape=!0,e.pointerDowInShape(n,o)))})),this.paperManager.addEventHandler("cell:pointermove",(function(t,n,o,i){if(e.isGrabbing){if(!e.canvasDragPosition){var r=e.paperManager.scale;e.canvasDragPosition={x:o*r.sx,y:i*r.sy}}e.canvasDragPosition&&!e.clientLeftPaper&&e.paperManager.translate(n.offsetX-e.canvasDragPosition.x,n.offsetY-e.canvasDragPosition.y)}})),window.ProcessMaker.EventBus.$emit("modeler-start",{loadXML:function(){var t=y(v().mark((function t(n){return v().wrap((function(t){while(1)switch(t.prev=t.next){case 0:return t.next=2,e.loadXML(n);case 2:return t.next=4,dv.dispatch("pushState",n);case 4:case"end":return t.stop()}}),t)})));function n(e){return t.apply(this,arguments)}return n}(),addWarnings:function(t){return e.$emit("warnings",t)},addBreadcrumbs:function(t){return e.breadcrumbData.push(t)}})}},Hk=qk,Vk=(h(75317),qn(Hk,Km,Jm,!1,null,null,null)),Uk=Vk.exports,Gk=h(87299),Wk=h.n(Gk),$k={extends:ih,mixins:[ya],data:function(){return{nodeIcon:Wk(),iconName:""}}},Xk=$k,Yk=qn(Xk,Ek,Ak,!1,null,null,null),Zk=Yk.exports,Kk=76,Jk="processmaker-modeler-manual-task",Qk={id:Jk,component:Zk,bpmnType:"bpmn:ManualTask",control:!1,category:"BPMN",icon:h(8565),label:To[Jk],loopInspectorIndex:1,definition:function(e,t){return e.create("bpmn:ManualTask",{name:t(To[Jk]),assignment:"requester",loopCharacteristics:null,ioSpecification:null})},diagram:function(e){return e.create("bpmndi:BPMNShape",{bounds:e.create("dc:Bounds",{height:Kk,width:116})})},inspectorConfig:[{name:To[Jk],items:[{component:"FormAccordion",container:!0,config:{initiallyOpen:!0,label:"Properties",icon:"cog",name:"inspector-accordion-manual-task"},items:[{component:"FormInput",config:Ys}]},ua,na]}]},eC={extends:Pc,data:function(){return{nodeIcon:Ep()}},mounted:function(){var e=this.node.diagram.bounds;this.shape.attr({image:{"ref-x":7,"ref-y":7,width:e.get("width")-14,height:e.get("height")-14}})}},tC=eC,nC=qn(tC,Mk,Tk,!1,null,null,null),oC=nC.exports,iC="processmaker-modeler-conditional-start-event",rC=Ea()(No()($c),yo(yo({},Op),{},{id:iC,component:oC,label:So[iC],definition:function(e,t){return e.create("bpmn:StartEvent",{name:t(So[iC]),eventDefinitions:[e.create("bpmn:ConditionalEventDefinition",{condition:e.create("bpmn:FormalExpression",{body:""})})]})},inspectorConfig:[{items:[{items:[{}].concat(m(Pp()))}]}]})),sC=function(){var e=this,t=e._self._c;return t("crown-config",e._g({attrs:{highlighted:e.highlighted,paper:e.paper,graph:e.graph,shape:e.shape,node:e.node,nodeRegistry:e.nodeRegistry,moddle:e.moddle,collaboration:e.collaboration,"process-node":e.processNode,"plane-elements":e.planeElements,"is-rendering":e.isRendering}},e.$listeners))},aC=[],lC={components:{CrownConfig:Zr},props:["graph","node","id","highlighted","nodeRegistry","moddle","paper","collaboration","processNode","planeElements","isRendering"],mixins:[_n],data:function(){return{shape:null,initialDataAssociationDirection:this.node.definition.dataAssociationDirection}},computed:{isValidConnection:function(){var e=x()(this.target,"component.node.definition.$type");if(!e)return!1;var t=["bpmn:Task","bpmn:SubProcess","bpmn:CallActivity","bpmn:ManualTask","bpmn:ScriptTask","bpmn:ServiceTask"],n=["bpmn:Task","bpmn:SubProcess","bpmn:CallActivity","bpmn:ManualTask","bpmn:ScriptTask","bpmn:ServiceTask","bpmn:IntermediateThrowEvent","bpmn:EndEvent"],o="bpmn:DataStoreReference"===this.sourceNode.definition.$type,i="bpmn:DataObjectReference"===this.sourceNode.definition.$type;return!(!o||!t.includes(e))||i&&n.includes(e)}},methods:{findSourceShape:function(){if(this.node.dataAssociationProps)return this.node.dataAssociationProps.sourceShape;var e=this.node.definition.sourceRef[0],t=this.graph.getElements().find((function(t){return t.component.node.definition===e}));return t},getTargetRef:function(){return this.node.dataAssociationProps?this.node.dataAssociationProps.targetCoords:lo(this.node.definition.targetRef.$parent,this.$parent)},updateRouter:function(){this.shape.router("normal",{elementPadding:this.elementPadding})},updateDefinitionLinks:function(){var e=this.shape.getTargetElement(),t=ao(this.moddle,e.component.node,this.sourceNode.definition);this.node.definition.set("targetRef",t),this.node.definition.set("sourceRef",[this.sourceNode.definition]),e.component.node.definition.set("dataInputAssociations",[this.node.definition])}},mounted:function(){this.shape=new a.shapes.standard.Link({router:{name:"normal"}}),this.shape.attr({line:{stroke:"black",strokeWidth:"4",strokeLinecap:"round",strokeDasharray:"1, 8",strokeDashoffset:"5",targetMarker:{type:"image","xlink:href":Pn,width:20,height:20,y:-10}}}),this.shape.addTo(this.graph),this.shape.component=this},destroyed:function(){this.targetNode&&(co(this.targetNode,this.sourceNode.definition),(0,Un.pull)(this.targetNode.definition.get("dataInputAssociations"),this.node.definition))}},cC=lC,dC=qn(cC,sC,aC,!1,null,null,null),uC=dC.exports,pC=yo(yo({},t),{},{component:uC,control:!1,inspectorConfig:[{name:"Data Input Association",items:[{component:"FormAccordion",container:!0,config:{initiallyOpen:!0,label:"Properties",icon:"cog",name:"inspector-accordion-data-input-association"},items:[{component:"FormInput",config:ns}]}]}]}),hC=function(){var e=this,t=e._self._c;return t("crown-config",e._g({attrs:{highlighted:e.highlighted,paper:e.paper,graph:e.graph,shape:e.shape,node:e.node,nodeRegistry:e.nodeRegistry,moddle:e.moddle,collaboration:e.collaboration,"process-node":e.processNode,"plane-elements":e.planeElements,"is-rendering":e.isRendering}},e.$listeners))},fC=[],mC={components:{CrownConfig:Zr},props:["graph","node","id","highlighted","nodeRegistry","moddle","paper","collaboration","processNode","planeElements","isRendering"],mixins:[_n],data:function(){return{shape:null,initialDataAssociationDirection:this.node.definition.dataAssociationDirection}},computed:{isValidConnection:function(){var e=x()(this.target,"component.node.type");if(!e)return!1;var t="bpmn:DataObjectReference"!==this.targetConfig.bpmnType&&"bpmn:DataStoreReference"!==this.targetConfig.bpmnType;return!t}},methods:{findSourceShape:function(){var e=this;return this.node.dataAssociationProps?this.node.dataAssociationProps.sourceShape:this.graph.getElements().find((function(t){return t.component&&t.component.node.definition.get("dataOutputAssociations")&&t.component.node.definition.get("dataOutputAssociations").includes(e.node.definition)}))},updateRouter:function(){this.shape.router("normal",{elementPadding:this.elementPadding})},updateDefinitionLinks:function(){this.node.definition.set("targetRef",this.targetNode.definition);var e=this.sourceNode.definition.get("dataOutputAssociations")||[];this.sourceNode.definition.set("dataOutputAssociations",[].concat(m(e),[this.node.definition]))}},mounted:function(){this.shape=new a.shapes.standard.Link({router:{name:"normal"}}),this.shape.attr({line:{stroke:"black",strokeWidth:"4",strokeLinecap:"round",strokeDasharray:"1, 8",strokeDashoffset:"5",targetMarker:{type:"image","xlink:href":Pn,width:20,height:20,y:-10}}}),this.shape.addTo(this.graph),this.shape.component=this},destroyed:function(){(0,Un.pull)(this.sourceNode.definition.get("dataOutputAssociations"),this.node.definition)}},gC=mC,vC=qn(gC,hC,fC,!1,null,null,null),bC=vC.exports,yC=yo(yo({},e),{},{component:bC,control:!1,inspectorConfig:[{name:"Data Output Association",items:[{component:"FormAccordion",container:!0,config:{initiallyOpen:!0,label:"Properties",icon:"cog",name:"inspector-accordion-data-output-association"},items:[{component:"FormInput",config:ns}]}]}]}),wC=JSON.parse('{"name":"ProcessMaker","uri":"http://processmaker.com/BPMN/2.0/Schema.xsd","prefix":"pm","xml":{"tagAlias":"lowerCase"},"associations":[],"types":[{"name":"BaseElement","extends":["bpmn:BaseElement"],"isAbstract":true,"properties":[{"name":"color","isAttr":true,"type":"String"}]},{"name":"Task","extends":["bpmn:Task"],"properties":[{"name":"screenRef","isAttr":true,"type":"String"},{"name":"allowInterstitial","isAttr":true,"type":"Boolean"},{"name":"interstitialScreenRef","isAttr":true,"type":"String"},{"name":"screenVersion","isAttr":true,"type":"String"},{"name":"dueIn","isAttr":true,"type":"Integer"},{"name":"notifyAfterRouting","isAttr":true,"type":"Boolean"},{"name":"notifyRequestCreator","isAttr":true,"type":"Boolean"},{"name":"assignment","isAttr":true,"type":"String"},{"name":"assignedUsers","isAttr":true,"type":"String"},{"name":"assignedGroups","isAttr":true,"type":"String"},{"name":"assignmentLock","isAttr":true,"type":"Boolean"},{"name":"allowReassignment","isAttr":true,"type":"Boolean"},{"name":"assignmentRules","isAttr":true,"type":"String"},{"name":"config","isAttr":true,"type":"String"},{"name":"customIcon","isAttr":true,"type":"String"},{"name":"validations","isAttr":true,"type":"String"}]},{"name":"ScriptTask","extends":["bpmn:ScriptTask"],"properties":[{"name":"scriptRef","isAttr":true,"type":"String"},{"name":"scriptVersion","isAttr":true,"type":"String"},{"name":"errorHandling","isAttr":true,"type":"String"}]},{"name":"ServiceTask","extends":["bpmn:ServiceTask"],"properties":[{"name":"implementationVersion","isAttr":true,"type":"String"},{"name":"errorHandling","isAttr":true,"type":"String"}]},{"name":"Message","extends":["bpmn:Message"],"properties":[{"name":"payload","isAttr":true,"type":"String"}]},{"name":"EndEvent","extends":["bpmn:EndEvent"],"properties":[{"name":"screenRef","isAttr":true,"type":"String"},{"name":"screenVersion","isAttr":true,"type":"String"}]},{"name":"StartEvent","extends":["bpmn:StartEvent"],"properties":[{"name":"allowInterstitial","isAttr":true,"type":"Boolean"},{"name":"interstitialScreenRef","isAttr":true,"type":"String"},{"name":"assignment","isAttr":true,"type":"String"},{"name":"assignedUsers","isAttr":true,"type":"String"},{"name":"assignedGroups","isAttr":true,"type":"String"},{"name":"config","isAttr":true,"type":"String"},{"name":"validations","isAttr":true,"type":"String"}]},{"name":"IntermediateCatchEvent","extends":["bpmn:IntermediateCatchEvent"],"properties":[{"name":"allowedUsers","isAttr":true,"type":"String"},{"name":"allowedGroups","isAttr":true,"type":"String"},{"name":"config","isAttr":true,"type":"String"},{"name":"whitelist","isAttr":true,"type":"String"},{"name":"validations","isAttr":true,"type":"String"}]},{"name":"MessageEventDefinition","extends":["bpmn:MessageEventDefinition"],"properties":[{"name":"variableName","isAttr":true,"type":"String"}]},{"name":"MessageEventDefinition","extends":["bpmn:MessageEventDefinition"],"properties":[{"name":"variableName","isAttr":true,"type":"String"}]},{"name":"SignalEventDefinition","extends":["bpmn:SignalEventDefinition"],"properties":[{"name":"config","isAttr":true,"type":"String"}]},{"name":"SequenceFlow","extends":["bpmn:SequenceFlow"],"properties":[{"name":"config","isAttr":true,"type":"String"}]},{"name":"CallActivity","extends":["bpmn:CallActivity"],"properties":[{"name":"allowInterstitial","isAttr":true,"type":"Boolean"},{"name":"interstitialScreenRef","isAttr":true,"type":"String"},{"name":"config","isAttr":true,"type":"String"},{"name":"validations","isAttr":true,"type":"String"},{"name":"assignment","isAttr":true,"type":"String"},{"name":"assignedUsers","isAttr":true,"type":"String"},{"name":"assignedGroups","isAttr":true,"type":"String"},{"name":"customIcon","isAttr":true,"type":"String"},{"name":"errorHandling","isAttr":true,"type":"String"}]},{"name":"Signal","extends":["bpmn:Signal"],"properties":[{"name":"config","isAttr":true,"type":"String"},{"name":"detail","isAttr":true,"type":"String"}]}],"emumerations":[]}'),xC=[Yc,Sm,Im,ha,Jh,Mf,Qk,yf,Tf,el,cl,Sl,gl,Rl,Ul,is,pC,yC,Vm,em,Lf],kC=[[rd,"bpmn:StartEvent","bpmn:SignalEventDefinition"],[qd,"bpmn:StartEvent","bpmn:TimerEventDefinition"],[hd,"bpmn:StartEvent","bpmn:MessageEventDefinition"],[rC,"bpmn:StartEvent","bpmn:ConditionalEventDefinition"],[Du,"bpmn:IntermediateCatchEvent","bpmn:TimerEventDefinition"],[Ju,"bpmn:IntermediateCatchEvent","bpmn:MessageEventDefinition"],[ap,"bpmn:IntermediateCatchEvent","bpmn:SignalEventDefinition"],[mp,"bpmn:IntermediateThrowEvent","bpmn:MessageEventDefinition"],[Cp,"bpmn:IntermediateThrowEvent","bpmn:SignalEventDefinition"],[Ip,"bpmn:IntermediateCatchEvent","bpmn:ConditionalEventDefinition"],[hy,"bpmn:BoundaryEvent","bpmn:TimerEventDefinition"],[Tb,"bpmn:BoundaryEvent","bpmn:ErrorEventDefinition"],[Vb,"bpmn:BoundaryEvent","bpmn:EscalationEventDefinition"],[Kb,"bpmn:BoundaryEvent","bpmn:MessageEventDefinition"],[ry,"bpmn:BoundaryEvent","bpmn:SignalEventDefinition"],[Bb,"bpmn:BoundaryEvent","bpmn:ConditionalEventDefinition"],[lc,"bpmn:EndEvent","bpmn:MessageEventDefinition"],[_a,"bpmn:EndEvent","bpmn:ErrorEventDefinition"],[Sc,"bpmn:EndEvent","bpmn:SignalEventDefinition"],[La,"bpmn:EndEvent","bpmn:TerminateEventDefinition"]],CC=function(e,t,n){return function(o){var i=o.get("eventDefinitions"),r=o.$type===t&&i&&i.length&&i[0].$type===n;if(r)return e.id}};function SC(e){var t=e.registerNode,n=e.registerBpmnExtension;kC.forEach((function(e){var n=mt(e,3),o=n[0],i=n[1],r=n[2];t(o,CC(o,i,r))})),xC.forEach((function(e){return t(e)})),n("pm",wC)}}(),f}()}));
|
|
35
35
|
//# sourceMappingURL=modeler.umd.min.js.map
|