|
|
|
|
/*! bpmn-js - bpmn-modeler v9.4.0 | Copyright (c) 2014-present, camunda Services GmbH | bpmn.io/license */
|
|
|
|
|
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t():"function"==typeof define&&define.amd?define(t):(e="undefined"!=typeof globalThis?globalThis:e||self).BpmnJS=t()}(this,(function(){"use strict";function e(e,t){t&&(e.super_=t,e.prototype=Object.create(t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}))}var t=function(e,t){return e(t={exports:{}},t.exports),t.exports}((function(e){var t=e.exports=function(e,n){if(n||(n=16),void 0===e&&(e=128),e<=0)return"0";for(var i=Math.log(Math.pow(2,e))/Math.log(n),r=2;i===1/0;r*=2)i=Math.log(Math.pow(2,e/r))/Math.log(n)*r;var o=i-Math.floor(i),a="";for(r=0;r<Math.floor(i);r++){a=Math.floor(Math.random()*n).toString(n)+a}if(o){var s=Math.pow(n,o);a=Math.floor(Math.random()*s).toString(n)+a}var c=parseInt(a,n);return c!==1/0&&c>=Math.pow(2,e)?t(e,n):a};t.rack=function(e,n,i){var r=function(r){var a=0;do{if(a++>10){if(!i)throw new Error("too many ID collisions, use more bits");e+=i}var s=t(e,n)}while(Object.hasOwnProperty.call(o,s));return o[s]=r,s},o=r.hats={};return r.get=function(e){return r.hats[e]},r.set=function(e,t){return r.hats[e]=t,r},r.bits=e||128,r.base=n||16,r}}));function n(e){if(!(this instanceof n))return new n(e);e=e||[128,36,1],this._seed=e.length?t.rack(e[0],e[1],e[2]):e}function i(e){return Array.prototype.concat.apply([],e)}n.prototype.next=function(e){return this._seed(e||!0)},n.prototype.nextPrefixed=function(e,t){var n;do{n=e+this.next(!0)}while(this.assigned(n));return this.claim(n,t),n},n.prototype.claim=function(e,t){this._seed.set(e,t||!0)},n.prototype.assigned=function(e){return this._seed.get(e)||!1},n.prototype.unclaim=function(e){delete this._seed.hats[e]},n.prototype.clear=function(){var e,t=this._seed.hats;for(e in t)this.unclaim(e)};var r=Object.prototype.toString,o=Object.prototype.hasOwnProperty;function a(e){return void 0===e}function s(e){return void 0!==e}function c(e){return null==e}function p(e){return"[object Array]"===r.call(e)}function l(e){return"[object Object]"===r.call(e)}function u(e){return"[object Number]"===r.call(e)}function h(e){var t=r.call(e);return"[object Function]"===t||"[object AsyncFunction]"===t||"[object GeneratorFunction]"===t||"[object AsyncGeneratorFunction]"===t||"[object Proxy]"===t}function d(e){return"[object String]"===r.call(e)}function f(e,t){return o.call(e,t)}function m(e,t){var n;return t=B(t),g(e,(function(e,i){if(t(e,i))return n=e,!1})),n}function v(e,t){t=B(t);var n=p(e)?-1:void 0;return g(e,(function(e,i){if(t(e,i))return n=i,!1})),n}function y(e,t){var n=[];return g(e,(function(e,i){t(e,i)&&n.push(e)})),n}function g(e,t){var n;if(!a(e)){var i=p(e)?O:N;for(var r in e)if(f(e,r)&&!1===t(n=e[r],i(r)))return n}}function b(e,t){return a(e)?[]:(function(e){if(!p(e))throw new Error("must supply array")}(e),t=B(t),e.filter((function(e,n){return!t(e,n)})))}function x(e,t,n){return g(e,(function(e,i){n=t(n,e,i)})),n}function _(e,t){return!!x(e,(function(e,n,i){return e&&t(n,i)}),!0)}function E(e,t){return!!m(e,t)}function w(e,t){var n=[];return g(e,(function(e,i){n.push(t(e,i))})),n}function S(e){return e&&Object.keys(e)||[]}function C(e){return S(e).length}function A(e){return w(e,(function(e){return e}))}function R(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return t=M(t),g(e,(function(e){var i=t(e)||"_",r=n[i];r||(r=n[i]=[]),r.push(e)})),n}function T(e){e=M(e);for(var t={},n=arguments.length,i=new Array(n>1?n-1:0),r=1;r<n;r++)i[r-1]=arguments[r];g(i,(function(n){return R(n,e,t)}));var o=w(t,(function(e,t){return e[0]}));return o}var P=T;function D(e,t){t=M(t);var n=[];return g(e,(function(e,i){for(var r=t(e,i),o={d:r,v:e},a=0;a<n.length;a++){if(r<n[a].d)return void n.splice(a,0,o)}n.push(o)})),w(n,(function(e){return e.v}))}function k(e){return function(t){return _(e,(function(e,n){return t[n]===e}))}}function M(e){return h(e)?e:function(t){return t[e]}}function B(e){return h(e)?e:function(t){return t===e}}function N(e){return e}function O(e){return Number(e)}function j(e,t){var n,i,r,o;function a(n){var a=Date.now(),p=n?0:o+
|
|
|
|
|
/**
|
|
|
|
|
* This file contains source code adapted from Snap.svg (licensed Apache-2.0).
|
|
|
|
|
*
|
|
|
|
|
* @see https://github.com/adobe-webplatform/Snap.svg/blob/master/src/path.js
|
|
|
|
|
*/var Mt=/,?([a-z]),?/gi,Bt=parseFloat,Nt=Math,Ot=Nt.PI,jt=Nt.min,Lt=Nt.max,It=Nt.pow,Ft=Nt.abs,zt=/([a-z])[\s,]*((-?\d*\.?\d*(?:e[-+]?\d+)?[\s]*,?[\s]*)+)/gi,$t=/(-?\d*\.?\d*(?:e[-+]?\d+)?)[\s]*,?[\s]*/gi,Ht=Array.isArray||function(e){return e instanceof Array};function Gt(e,t){return Object.prototype.hasOwnProperty.call(e,t)}function Vt(e){if("function"==typeof e||Object(e)!==e)return e;var t=new e.constructor;for(var n in e)Gt(e,n)&&(t[n]=Vt(e[n]));return t}function Wt(e,t){for(var n=0,i=e.length;n<i;n++)if(e[n]===t)return e.push(e.splice(n,1)[0])}function Ut(e){var t=Ut.ps=Ut.ps||{};return t[e]?t[e].sleep=100:t[e]={sleep:100},setTimeout((function(){for(var n in t)Gt(t,n)&&n!=e&&(t[n].sleep--,!t[n].sleep&&delete t[n])})),t[e]}function qt(e,t,n,i){return 1===arguments.length&&(t=e.y,n=e.width,i=e.height,e=e.x),{x:e,y:t,width:n,height:i,x2:e+n,y2:t+i}}function Kt(){return this.join(",").replace(Mt,"$1")}function Yt(e){var t=Vt(e);return t.toString=Kt,t}function Xt(e,t,n,i,r,o,a,s,c){var p=1-c,l=It(p,3),u=It(p,2),h=c*c*c,d=l*t+3*u*c*i+3*p*c*c*o+h*s;return{x:nn(l*e+3*u*c*n+3*p*c*c*r+h*a),y:nn(d)}}function Zt(e){var t=ln.apply(null,e);return qt(t.x0,t.y0,t.x1-t.x0,t.y1-t.y0)}function Qt(e,t,n){return t>=e.x&&t<=e.x+e.width&&n>=e.y&&n<=e.y+e.height}function Jt(e,t,n,i,r){return e*(e*(-3*t+9*n-9*i+3*r)+6*t-12*n+6*i)-3*t+3*n}function en(e,t,n,i,r,o,a,s,c){null==c&&(c=1);for(var p=(c=c>1?1:c<0?0:c)/2,l=[-.1252,.1252,-.3678,.3678,-.5873,.5873,-.7699,.7699,-.9041,.9041,-.9816,.9816],u=[.2491,.2491,.2335,.2335,.2032,.2032,.1601,.1601,.1069,.1069,.0472,.0472],h=0,d=0;d<12;d++){var f=p*l[d]+p,m=Jt(f,e,n,r,a),v=Jt(f,t,i,o,s),y=m*m+v*v;h+=u[d]*Nt.sqrt(y)}return p*h}function tn(e,t,n,i,r,o,a,s){if(!(Lt(e,n)<jt(r,a)||jt(e,n)>Lt(r,a)||Lt(t,i)<jt(o,s)||jt(t,i)>Lt(o,s))){var c=(e*i-t*n)*(o-s)-(t-i)*(r*s-o*a),p=(e-n)*(o-s)-(t-i)*(r-a);if(p){var l=nn(((e*i-t*n)*(r-a)-(e-n)*(r*s-o*a))/p),u=nn(c/p),h=+l.toFixed(2),d=+u.toFixed(2);if(!(h<+jt(e,n).toFixed(2)||h>+Lt(e,n).toFixed(2)||h<+jt(r,a).toFixed(2)||h>+Lt(r,a).toFixed(2)||d<+jt(t,i).toFixed(2)||d>+Lt(t,i).toFixed(2)||d<+jt(o,s).toFixed(2)||d>+Lt(o,s).toFixed(2)))return{x:l,y:u}}}}function nn(e){return Math.round(1e11*e)/1e11}function rn(e,t,n){if(!function(e,t){return e=qt(e),Qt(t=qt(t),e.x,e.y)||Qt(t,e.x2,e.y)||Qt(t,e.x,e.y2)||Qt(t,e.x2,e.y2)||Qt(e,t.x,t.y)||Qt(e,t.x2,t.y)||Qt(e,t.x,t.y2)||Qt(e,t.x2,t.y2)||(e.x<t.x2&&e.x>t.x||t.x<e.x2&&t.x>e.x)&&(e.y<t.y2&&e.y>t.y||t.y<e.y2&&t.y>e.y)}(Zt(e),Zt(t)))return n?0:[];for(var i=en.apply(0,e),r=en.apply(0,t),o=an(e)?1:~~(i/5)||1,a=an(t)?1:~~(r/5)||1,s=[],c=[],p={},l=n?0:[],u=0;u<o+1;u++){var h=Xt.apply(0,e.concat(u/o));s.push({x:h.x,y:h.y,t:u/o})}for(u=0;u<a+1;u++)h=Xt.apply(0,t.concat(u/a)),c.push({x:h.x,y:h.y,t:u/a});for(u=0;u<o;u++)for(var d=0;d<a;d++){var f,m=s[u],v=s[u+1],y=c[d],g=c[d+1],b=Ft(v.x-m.x)<.01?"y":"x",x=Ft(g.x-y.x)<.01?"y":"x",_=tn(m.x,m.y,v.x,v.y,y.x,y.y,g.x,g.y);if(_){if(p[f=_.x.toFixed(9)+"#"+_.y.toFixed(9)])continue;p[f]=!0;var E=m.t+Ft((_[b]-m[b])/(v[b]-m[b]))*(v.t-m.t),w=y.t+Ft((_[x]-y[x])/(g[x]-y[x]))*(g.t-y.t);E>=0&&E<=1&&w>=0&&w<=1&&(n?l++:l.push({x:_.x,y:_.y,t1:E,t2:w}))}}return l}function on(e){var t=Ut(e);if(t.abs)return Yt(t.abs);if(Ht(e)&&Ht(e&&e[0])||(e=function(e){if(!e)return null;var t=Ut(e);if(t.arr)return Vt(t.arr);var n={a:7,c:6,h:1,l:2,m:2,q:4,s:4,t:2,v:1,z:0},i=[];return Ht(e)&&Ht(e[0])&&(i=Vt(e)),i.length||String(e).replace(zt,(function(e,t,r){var o=[],a=t.toLowerCase();for(r.replace($t,(function(e,t){t&&o.push(+t)})),"m"==a&&o.length>2&&(i.push([t].concat(o.splice(0,2))),a="l",t="m"==t?"l":"L");o.length>=n[a]&&(i.push([t].concat(o.splice(0,n[a]))),n[a]););})),i.toString=Ut.toString,t.arr=Vt(i),i}(e)),!e||!e.length)return[["M",0,0]];var n,i=[],r=0,o=0,a=0,s=0,c=0;"M"==e[0][0]&&(a=r=+e[0][1],s=o=+e[0][2],c++,i[0]=["M",r,o]);for(var p,l,u=c,h=e.length;u<h;u++){if(i.push(p=[]),(n=(l=e[u])[0])!=n.toUpperCase())switch(p[0]=n.toUpperCase(),p[0]){case"A":p[1]=l[1],p[2]=l[2],p[3]=l[3],p[4]=l[4],p[5]=l[5],p[6]=+l[6]+r,p[7]=+l[7]+o;break;case"V":p[1]=+l[1]+o;break;case"H":p[1]=+l[1]+r;break;case"M":a=+l[1]+r,s=+
|
|
|
|
|
/**
|
|
|
|
|
* This file must not be changed or exchanged.
|
|
|
|
|
*
|
|
|
|
|
* @see http://bpmn.io/license for more information.
|
|
|
|
|
*/(i));n=Ar(r,"bpmn:Collaboration")?r:m(e.rootElements,(function(e){if(Ar(e,"bpmn:Collaboration"))return m(e.participants,(function(e){return e.processRef===r}))}));var o=[r];n&&(o=w(n.participants,(function(e){return e.processRef}))).push(n);var a=kr(o),s=[t],c=[i];return g(e.diagrams,(function(e){var t=e.plane.bpmnElement;-1!==a.indexOf(t)&&-1===c.indexOf(t)&&(s.push(e),c.push(t))})),s}(e,t);if(!r)throw new Error(o("no diagram to display"));g(r,(function(t){n.handleDefinitions(e,t)}));var c=t.plane.bpmnElement.id;a.setRootElement(a.findRoot(c+"_plane")||a.findRoot(c))}return new Promise((function(p,l){try{return i=e.get("bpmnImporter"),r=e.get("eventBus"),o=e.get("translate"),a=e.get("canvas"),r.fire("import.render.start",{definitions:t}),c(t,n),r.fire("import.render.complete",{error:undefined,warnings:s}),p({warnings:s})}catch(e){return e.warnings=s,l(e)}}))}function kr(e){var t=[];return g(e,(function(e){e&&(t.push(e),t=t.concat(kr(e.flowElements)))})),t}var Mr,Br='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 14.02 5.57" width="53" height="21"><path fill="currentColor" d="M1.88.92v.14c0 .41-.13.68-.4.8.33.14.46.44.46.86v.33c0 .61-.33.95-.95.95H0V0h.95c.65 0 .93.3.93.92zM.63.57v1.06h.24c.24 0 .38-.1.38-.43V.98c0-.28-.1-.4-.32-.4zm0 1.63v1.22h.36c.2 0 .32-.1.32-.39v-.35c0-.37-.12-.48-.4-.48H.63zM4.18.99v.52c0 .64-.31.98-.94.98h-.3V4h-.62V0h.92c.63 0 .94.35.94.99zM2.94.57v1.35h.3c.2 0 .3-.09.3-.37v-.6c0-.29-.1-.38-.3-.38h-.3zm2.89 2.27L6.25 0h.88v4h-.6V1.12L6.1 3.99h-.6l-.46-2.82v2.82h-.55V0h.87zM8.14 1.1V4h-.56V0h.79L9 2.4V0h.56v4h-.64zm2.49 2.29v.6h-.6v-.6zM12.12 1c0-.63.33-1 .95-1 .61 0 .95.37.95 1v2.04c0 .64-.34 1-.95 1-.62 0-.95-.37-.95-1zm.62 2.08c0 .28.13.39.33.39s.32-.1.32-.4V.98c0-.29-.12-.4-.32-.4s-.33.11-.33.4z"/><path fill="currentColor" d="M0 4.53h14.02v1.04H0zM11.08 0h.63v.62h-.63zm.63 4V1h-.63v2.98z"/></svg>',Nr={verticalAlign:"middle"},Or={color:"#404040"},jr={zIndex:"1001",position:"fixed",top:"0",left:"0",right:"0",bottom:"0"},Lr={width:"100%",height:"100%",background:"rgba(40,40,40,0.2)"},Ir={position:"absolute",left:"50%",top:"40%",transform:"translate(-50%)",width:"260px",padding:"10px",background:"white",boxShadow:"0 1px 4px rgba(0,0,0,0.3)",fontFamily:"Helvetica, Arial, sans-serif",fontSize:"14px",display:"flex",lineHeight:"1.3"};function Fr(){Mr||(K(Mr=fe('<div class="bjs-powered-by-lightbox"><div class="backdrop"></div><div class="notice"><a href="https://bpmn.io" target="_blank" rel="noopener" class="link"><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 14.02 5.57" width="53" height="21"><path fill="currentColor" d="M1.88.92v.14c0 .41-.13.68-.4.8.33.14.46.44.46.86v.33c0 .61-.33.95-.95.95H0V0h.95c.65 0 .93.3.93.92zM.63.57v1.06h.24c.24 0 .38-.1.38-.43V.98c0-.28-.1-.4-.32-.4zm0 1.63v1.22h.36c.2 0 .32-.1.32-.39v-.35c0-.37-.12-.48-.4-.48H.63zM4.18.99v.52c0 .64-.31.98-.94.98h-.3V4h-.62V0h.92c.63 0 .94.35.94.99zM2.94.57v1.35h.3c.2 0 .3-.09.3-.37v-.6c0-.29-.1-.38-.3-.38h-.3zm2.89 2.27L6.25 0h.88v4h-.6V1.12L6.1 3.99h-.6l-.46-2.82v2.82h-.55V0h.87zM8.14 1.1V4h-.56V0h.79L9 2.4V0h.56v4h-.64zm2.49 2.29v.6h-.6v-.6zM12.12 1c0-.63.33-1 .95-1 .61 0 .95.37.95 1v2.04c0 .64-.34 1-.95 1-.62 0-.95-.37-.95-1zm.62 2.08c0 .28.13.39.33.39s.32-.1.32-.4V.98c0-.29-.12-.4-.32-.4s-.33.11-.33.4z"/><path fill="currentColor" d="M0 4.53h14.02v1.04H0zM11.08 0h.63v.62h-.63zm.63 4V1h-.63v2.98z"/></svg></a><span>Web-based tooling for BPMN, DMN and CMMN diagrams powered by <a href="https://bpmn.io" target="_blank" rel="noopener">bpmn.io</a>.</span></div></div>'),jr),K(ye("svg",Mr),Nr),K(ye(".backdrop",Mr),Lr),K(ye(".notice",Mr),Ir),K(ye(".link",Mr),Or,{margin:"15px 20px 15px 10px",alignSelf:"center"}),de.bind(Mr,".backdrop","click",(function(e){document.body.removeChild(Mr)}))),document.body.appendChild(Mr)}
|
|
|
|
|
/**
|
|
|
|
|
* The code in the <project-logo></project-logo> area
|
|
|
|
|
* must not be changed.
|
|
|
|
|
*
|
|
|
|
|
* @see http://bpmn.io/license for more information.
|
|
|
|
|
*/function zr(e){
|
|
|
|
|
/**
|
|
|
|
|
* Adds the project logo to the diagram container as
|
|
|
|
|
* required by the bpmn.io license.
|
|
|
|
|
*
|
|
|
|
|
* @see http://bpmn.io/license
|
|
|
|
|
*
|
|
|
|
|
* @param {Element} container
|
|
|
|
|
*/
|
|
|
|
|
var t,n;e=F({},Hr,e),this._moddle=this._createModdle(e),this._container=this._createContainer(e),t=this._container,K(ye("svg",n=fe('<a href="http://bpmn.io" target="_blank" class="bjs-powered-by" title="Powered by bpmn.io" >'+Br+"</a>")),Nr),K(n,Or,{position:"absolute",bottom:"15px",right:"15px",zIndex:"100"}),t.appendChild(n),le.bind(n,"click",(function(e){Fr(),e.preventDefault()})),this._init(this._container,this._moddle,e)}function $r(e,t){return e.warnings=t,e}e(zr,oi),zr.prototype.importXML=Er((function(e,t){var n=this;return new Promise((function(i,r){e=n._emit("import.parse.start",{xml:e})||e,n._moddle.fromXML(e,"bpmn:Definitions").then((function(e){var o,a,s=e.rootElement,c=e.references,p=e.warnings,l=e.elementsById;s=n._emit("import.parse.complete",(o={error:null,definitions:s,elementsById:l,references:c,warnings:p},a=n.get("eventBus").createEvent(o),Object.defineProperty(a,"context",{enumerable:!0,get:function(){return console.warn(new Error("import.parse.complete <context> is deprecated and will be removed in future library versions")),{warnings:o.warnings,references:o.references,elementsById:o.elementsById}}}),a))||s,n.importDefinitions(s,t).then((function(e){var t=[].concat(p,e.warnings||[]);return n._emit("import.done",{error:null,warnings:t}),i({warnings:t})})).catch((function(e){var t=[].concat(p,e.warnings||[]);return n._emit("import.done",{error:e,warnings:t}),r($r(e,t))}))})).catch((function(e){return n._emit("import.parse.complete",{error:e}),e=function(e){var t=/unparsable content <([^>]+)> detected([\s\S]*)$/.exec(e.message);t&&(e.message="unparsable content <"+t[1]+"> detected; this may indicate an invalid BPMN 2.0 diagram file"+t[2]);return e}(e),n._emit("import.done",{error:e,warnings:e.warnings}),r(e)}))}))})),zr.prototype.importDefinitions=Er((function(e,t){var n=this;return new Promise((function(i,r){n._setDefinitions(e),n.open(t).then((function(e){var t=e.warnings;return i({warnings:t})})).catch((function(e){return r(e)}))}))})),zr.prototype.open=Er((function(e){var t=this._definitions,n=e,i=this;return new Promise((function(r,o){if(!t){var a=new Error("no XML imported");return o($r(a,[]))}if("string"==typeof e&&(n=function(e,t){if(!t)return null;return m(e.diagrams,(function(e){return e.id===t}))||null}(t,e),!n)){var s=new Error("BPMNDiagram <"+e+"> not found");return o($r(s,[]))}try{i.clear()}catch(e){return o($r(e,[]))}Dr(i,t,n).then((function(e){var t=e.warnings;return r({warnings:t})})).catch((function(e){return o(e)}))}))})),zr.prototype.saveXML=Er((function(e){e=e||{};var t=this,n=this._definitions;return new Promise((function(i){if(!n)return i({error:new Error("no definitions loaded")});n=t._emit("saveXML.start",{definitions:n})||n,t._moddle.toXML(n,e).then((function(e){var n=e.xml;return n=t._emit("saveXML.serialized",{xml:n})||n,i({xml:n})}))})).catch((function(e){return{error:e}})).then((function(e){t._emit("saveXML.done",e);var n=e.error;return n?Promise.reject(n):e}))})),zr.prototype.saveSVG=Er((function(e){var t=this;return new Promise((function(e,n){var i,r;t._emit("saveSVG.start");try{var o=t.get("canvas"),a=o.getActiveLayer(),s=ye("defs",o._svg),c=Ke(a),p=s?"<defs>"+Ke(s)+"</defs>":"",l=a.getBBox();i='<?xml version="1.0" encoding="utf-8"?>\n\x3c!-- created with bpmn-js / http://bpmn.io --\x3e\n<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">\n<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="'+l.width+'" height="'+l.height+'" viewBox="'+l.x+" "+l.y+" "+l.width+" "+l.height+'" version="1.1">'+p+c+"</svg>"}catch(e){r=e}return t._emit("saveSVG.done",{error:r,svg:i}),r?n(r):e({svg:i})}))})),zr.prototype._setDefinitions=function(e){this._definitions=e},zr.prototype.getModules=function(){return this._modules},zr.prototype.clear=function(){this.getDefinitions()&&oi.prototype.clear.call(this)},zr.prototype.destroy=function(){oi.prototype.destroy.call(this),be(this._container)},zr.prototype.on=function(e,t,n,i){return this.get("eventBus").on(e,t,n,i)},zr.prototype.off=function(e,t){this.get("eve
|
|
|
|
|
/*! https://mths.be/cssescape v1.5.1 by @mathias | MIT license */
|
|
|
|
|
!function(e,t){var n;n=Dt,e.exports=function(e){if(e.CSS&&e.CSS.escape)return e.CSS.escape;var t=function(e){if(0==arguments.length)throw new TypeError("`CSS.escape` requires an argument.");for(var t,n=String(e),i=n.length,r=-1,o="",a=n.charCodeAt(0);++r<i;)0!=(t=n.charCodeAt(r))?o+=t>=1&&t<=31||127==t||0==r&&t>=48&&t<=57||1==r&&t>=48&&t<=57&&45==a?"\\"+t.toString(16)+" ":0==r&&1==i&&45==t||!(t>=128||45==t||95==t||t>=48&&t<=57||t>=65&&t<=90||t>=97&&t<=122)?"\\"+n.charAt(r):n.charAt(r):o+="<EFBFBD>";return o};return e.CSS||(e.CSS={}),e.CSS.escape=t,t}(n)}(sa);var ca=sa.exports,pa={"&":"&","<":"<",">":">",'"':""","'":"'"};function la(e){return(e=""+e)&&e.replace(/[&<>"']/g,(function(e){return pa[e]}))}var ua="_plane";function ha(e){return function(e){return e.replace(new RegExp("_plane$"),"")}(e.id)}function da(e){var t=e.id;return Ar(e,"bpmn:SubProcess")?va(t):t}function fa(e){return va(e)}function ma(e){return Ar(Pr(e),"bpmndi:BPMNPlane")}function va(e){return e+ua}function ya(e,t,n,i){var r=fe('<ul class="bjs-breadcrumbs"></ul>'),o=i.getContainer(),a=ee(o);o.appendChild(r);var s=[];function c(e){e&&(s=function(e){for(var t=Tr(e),n=[],i=t;i;i=i.$parent)(Ar(i,"bpmn:SubProcess")||Ar(i,"bpmn:Process"))&&n.push(i);return n.reverse()}(e));var n=s.map((function(e){var n=la(e.name||e.id),r=fe('<li><span class="bjs-crumb"><a title="'+n+'">'+n+"</a></span></li>"),o=i.findRoot(da(e))||i.findRoot(e.id);if(!o&&Ar(e,"bpmn:Process")){var a=t.find((function(t){var n=Tr(t);return n&&n.processRef&&n.processRef===e}));o=i.findRoot(a.id)}return r.addEventListener("click",(function(){i.setRootElement(o)})),r}));r.innerHTML="";var o=n.length>1;a.toggle("bjs-breadcrumbs-shown",o),n.forEach((function(e){r.appendChild(e)}))}e.on("element.changed",(function(e){var t=Tr(e.element);m(s,(function(e){return e===t}))&&c()})),e.on("root.set",(function(e){c(e.element)}))}function ga(e,t){var n=null,i=new ba;e.on("root.set",(function(e){var r=e.element,o=t.viewbox(),a=i.get(r);if(i.set(n,{x:o.x,y:o.y,zoom:o.scale}),n=r,!Ar(r,"bpmn:Collaboration")||a){a=a||{x:0,y:0,zoom:1};var s=(o.x-a.x)*o.scale,c=(o.y-a.y)*o.scale;0===s&&0===c||t.scroll({dx:s,dy:c}),a.zoom!==o.scale&&t.zoom(a.zoom,{x:0,y:0})}})),e.on("diagram.clear",(function(){i.clear(),n=null}))}function ba(){this._entries=[],this.set=function(e,t){var n=!1;for(var i in this._entries)if(this._entries[i][0]===e){this._entries[i][1]=t,n=!0;break}n||this._entries.push([e,t])},this.get=function(e){for(var t in this._entries)if(this._entries[t][0]===e)return this._entries[t][1];return null},this.clear=function(){this._entries.length=0},this.remove=function(e){var t=-1;for(var n in this._entries)if(this._entries[n][0]===e){t=n;break}-1!==t&&this._entries.splice(t,1)}}ya.$inject=["eventBus","elementRegistry","overlays","canvas"],ga.$inject=["eventBus","canvas"];var xa=180,_a=160;function Ea(e,t){this._eventBus=e,this._moddle=t;var n=this;e.on("import.render.start",1500,(function(e,t){n.handleImport(t.definitions)}))}function wa(e){return Ar(e,"bpmndi:BPMNDiagram")?e:wa(e.$parent)}Ea.prototype.handleImport=function(e){if(e.diagrams){var t=this;this._definitions=e,this._processToDiagramMap={},e.diagrams.forEach((function(e){e.plane&&e.plane.bpmnElement&&(t._processToDiagramMap[e.plane.bpmnElement.id]=e)}));var n=[];e.diagrams.forEach((function(e){var i=t.createNewDiagrams(e.plane);Array.prototype.push.apply(n,i)})),n.forEach((function(e){t.movePlaneElementsToOrigin(e.plane)}))}},Ea.prototype.createNewDiagrams=function(e){var t=this,n=[],i=[];e.get("planeElement").forEach((function(t){var r=t.bpmnElement;if(r){var o=r.$parent;Ar(r,"bpmn:SubProcess")&&!t.isExpanded&&n.push(r),function(e,t){var n=e.$parent;if(!Ar(n,"bpmn:SubProcess")||n===t.bpmnElement)return!1;if(Rr(e,["bpmn:DataInputAssociation","bpmn:DataOutputAssociation"]))return!1;return!0}(r,e)&&i.push({diElement:t,parent:o})}}));var r=[];return n.forEach((function(e){if(!t._processToDiagramMap[e.id]){var n=t.createDiagram(e);t._processToDiagramMap[e.id]=n,r.push(n)}})),i.forEach((function(e){for(var i=e.diElement,r=e.parent;r&&-1===n.index
|
|
|
|
|
/*! Hammer.JS - v2.0.7 - 2016-04-22
|
|
|
|
|
* http://hammerjs.github.io/
|
|
|
|
|
*
|
|
|
|
|
* Copyright (c) 2016 Jorik Tangelder;
|
|
|
|
|
* Licensed under the MIT license */!function(e){!function(t,n,i,r){var o,a=["","webkit","Moz","MS","ms","o"],s=n.createElement("div"),c=Math.round,p=Math.abs,l=Date.now;function u(e,t,n){return setTimeout(g(e,n),t)}function h(e,t,n){return!!Array.isArray(e)&&(d(e,n[t],n),!0)}function d(e,t,n){var i;if(e)if(e.forEach)e.forEach(t,n);else if(e.length!==r)for(i=0;i<e.length;)t.call(n,e[i],i,e),i++;else for(i in e)e.hasOwnProperty(i)&&t.call(n,e[i],i,e)}function f(e,n,i){var r="DEPRECATED METHOD: "+n+"\n"+i+" AT \n";return function(){var n=new Error("get-stack-trace"),i=n&&n.stack?n.stack.replace(/^[^\(]+?[\n$]/gm,"").replace(/^\s+at\s+/gm,"").replace(/^Object.<anonymous>\s*\(/gm,"{anonymous}()@"):"Unknown Stack Trace",o=t.console&&(t.console.warn||t.console.log);return o&&o.call(t.console,r,i),e.apply(this,arguments)}}o="function"!=typeof Object.assign?function(e){if(e===r||null===e)throw new TypeError("Cannot convert undefined or null to object");for(var t=Object(e),n=1;n<arguments.length;n++){var i=arguments[n];if(i!==r&&null!==i)for(var o in i)i.hasOwnProperty(o)&&(t[o]=i[o])}return t}:Object.assign;var m=f((function(e,t,n){for(var i=Object.keys(t),o=0;o<i.length;)(!n||n&&e[i[o]]===r)&&(e[i[o]]=t[i[o]]),o++;return e}),"extend","Use `assign`."),v=f((function(e,t){return m(e,t,!0)}),"merge","Use `assign`.");function y(e,t,n){var i,r=t.prototype;(i=e.prototype=Object.create(r)).constructor=e,i._super=r,n&&o(i,n)}function g(e,t){return function(){return e.apply(t,arguments)}}function b(e,t){return"function"==typeof e?e.apply(t&&t[0]||r,t):e}function x(e,t){return e===r?t:e}function _(e,t,n){d(C(t),(function(t){e.addEventListener(t,n,!1)}))}function E(e,t,n){d(C(t),(function(t){e.removeEventListener(t,n,!1)}))}function w(e,t){for(;e;){if(e==t)return!0;e=e.parentNode}return!1}function S(e,t){return e.indexOf(t)>-1}function C(e){return e.trim().split(/\s+/g)}function A(e,t,n){if(e.indexOf&&!n)return e.indexOf(t);for(var i=0;i<e.length;){if(n&&e[i][n]==t||!n&&e[i]===t)return i;i++}return-1}function R(e){return Array.prototype.slice.call(e,0)}function T(e,t,n){for(var i=[],r=[],o=0;o<e.length;){var a=t?e[o][t]:e[o];A(r,a)<0&&i.push(e[o]),r[o]=a,o++}return n&&(i=t?i.sort((function(e,n){return e[t]>n[t]})):i.sort()),i}function P(e,t){for(var n,i,o=t[0].toUpperCase()+t.slice(1),s=0;s<a.length;){if((i=(n=a[s])?n+o:t)in e)return i;s++}return r}var D=1;function k(e){var n=e.ownerDocument||e;return n.defaultView||n.parentWindow||t}var M="ontouchstart"in t,B=P(t,"PointerEvent")!==r,N=M&&/mobile|tablet|ip(ad|hone|od)|android/i.test(navigator.userAgent),O="touch",j="mouse",L=24,I=["x","y"],F=["clientX","clientY"];function z(e,t){var n=this;this.manager=e,this.callback=t,this.element=e.element,this.target=e.options.inputTarget,this.domHandler=function(t){b(e.options.enable,[e])&&n.handler(t)},this.init()}function $(e,t,n){var i=n.pointers.length,o=n.changedPointers.length,a=1&t&&i-o==0,s=12&t&&i-o==0;n.isFirst=!!a,n.isFinal=!!s,a&&(e.session={}),n.eventType=t,function(e,t){var n=e.session,i=t.pointers,o=i.length;n.firstInput||(n.firstInput=H(t));o>1&&!n.firstMultiple?n.firstMultiple=H(t):1===o&&(n.firstMultiple=!1);var a=n.firstInput,s=n.firstMultiple,c=s?s.center:a.center,u=t.center=G(i);t.timeStamp=l(),t.deltaTime=t.timeStamp-a.timeStamp,t.angle=q(c,u),t.distance=U(c,u),function(e,t){var n=t.center,i=e.offsetDelta||{},r=e.prevDelta||{},o=e.prevInput||{};1!==t.eventType&&4!==o.eventType||(r=e.prevDelta={x:o.deltaX||0,y:o.deltaY||0},i=e.offsetDelta={x:n.x,y:n.y});t.deltaX=r.x+(n.x-i.x),t.deltaY=r.y+(n.y-i.y)}(n,t),t.offsetDirection=W(t.deltaX,t.deltaY);var h=V(t.deltaTime,t.deltaX,t.deltaY);t.overallVelocityX=h.x,t.overallVelocityY=h.y,t.overallVelocity=p(h.x)>p(h.y)?h.x:h.y,t.scale=s?(d=s.pointers,f=i,U(f[0],f[1],F)/U(d[0],d[1],F)):1,t.rotation=s?function(e,t){return q(t[1],t[0],F)+q(e[1],e[0],F)}(s.pointers,i):0,t.maxPointers=n.prevInput?t.pointers.length>n.prevInput.maxPointers?t.pointers.length:n.prevInput.maxPointers:t.pointers.length,function(e,t){var n,i,o,a,s=e.lastInterval||t,c=t.timeStamp-s.timeStamp;if(8!=t.eventType&&(c>25||s
|