epx-frame 3.11.1 → 3.11.2
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/lib/0.js +1 -1
- package/lib/10.js +1 -1
- package/lib/2.js +1 -1
- package/lib/3.js +1 -1
- package/lib/add-form-item.js +2 -2
- package/lib/add-form.js +1 -1
- package/lib/alter.js +2 -2
- package/lib/app-index.js +2 -2
- package/lib/app-nav.js +2 -2
- package/lib/app-tabs.js +2 -2
- package/lib/apply-form.js +2 -2
- package/lib/approval-index-page.js +2 -2
- package/lib/approval-index.js +2 -2
- package/lib/button.js +2 -2
- package/lib/card-form-item.js +2 -2
- package/lib/card.js +2 -2
- package/lib/category-list.js +2 -2
- package/lib/chart.js +2 -2
- package/lib/check-history.js +2 -2
- package/lib/component.js +1 -1
- package/lib/contacts.js +2 -2
- package/lib/dashboard.js +2 -2
- package/lib/edit-entity-list.js +2 -2
- package/lib/entity-add-page.js +2 -2
- package/lib/entity-apply-page.js +2 -2
- package/lib/entity-card-list.js +2 -2
- package/lib/entity-list-find-page.js +2 -2
- package/lib/entity-list-find.js +1 -1
- package/lib/entity-list-page.js +2 -2
- package/lib/entity-list.js +1 -1
- package/lib/entity-no-submit-sub-list.js +1 -1
- package/lib/entity-sub-grid.js +2 -2
- package/lib/entity-sub-list.js +2 -2
- package/lib/entity-tree-find-page.js +2 -2
- package/lib/entity-tree-find.js +2 -2
- package/lib/epx-frame.common.js +2 -2
- package/lib/export-file.js +2 -2
- package/lib/export.js +2 -2
- package/lib/footer.js +1 -1
- package/lib/form-item.js +2 -2
- package/lib/form.js +2 -2
- package/lib/gauge.js +2 -2
- package/lib/grid.js +2 -2
- package/lib/header.js +2 -2
- package/lib/icon.js +1 -1
- package/lib/iframe.js +2 -2
- package/lib/image.js +2 -2
- package/lib/import-file.js +2 -2
- package/lib/import.js +2 -2
- package/lib/layout.js +2 -2
- package/lib/list.js +2 -2
- package/lib/load-page.js +2 -2
- package/lib/m-entity-add-page.js +2 -2
- package/lib/m-entity-dept-find.js +2 -2
- package/lib/m-entity-list-find.js +2 -2
- package/lib/m-entity-no-submit-sub-list.js +2 -2
- package/lib/m-entity-tree-find.js +2 -2
- package/lib/m-entity-user-find.js +2 -2
- package/lib/menu-index.js +1 -1
- package/lib/menu.js +1 -1
- package/lib/mine.js +2 -2
- package/lib/module-index-page.js +2 -2
- package/lib/module-list-page.js +2 -2
- package/lib/module-list.js +2 -2
- package/lib/nav-add-form.js +1 -1
- package/lib/num.js +2 -2
- package/lib/org-chart.js +2 -2
- package/lib/page-help.js +2 -2
- package/lib/page-tabs.js +2 -2
- package/lib/page.js +2 -2
- package/lib/progress-chart.js +2 -2
- package/lib/progress.js +2 -2
- package/lib/report-form-list.js +1 -1
- package/lib/report-preview.js +2 -2
- package/lib/router-view.js +1 -1
- package/lib/scope.js +2 -2
- package/lib/search.js +2 -2
- package/lib/step-item.js +2 -2
- package/lib/step.js +2 -2
- package/lib/tab-bar.js +1 -1
- package/lib/task-list-page.js +2 -2
- package/lib/task-list.js +2 -2
- package/lib/text-editor.js +2 -2
- package/lib/text.js +2 -2
- package/lib/title.js +2 -2
- package/lib/visual-config-page.js +2 -2
- package/package.json +1 -1
- package/lib/1.js +0 -1
- package/lib/15.js +0 -1
- package/lib/17.js +0 -1
- package/lib/45.css +0 -550
- package/lib/45.js +0 -1
- package/lib/5.js +0 -1
- package/lib/6.js +0 -1
- package/lib/73.js +0 -1
- package/lib/76.js +0 -1
- package/lib/77.js +0 -1
- package/lib/88.js +0 -7
- package/lib/89.js +0 -25
- package/lib/90.js +0 -10
- package/lib/91.js +0 -10
- package/lib/92.js +0 -1
- package/lib/93.js +0 -21
- package/lib/94.js +0 -10
- package/lib/95.js +0 -1
- package/lib/96.js +0 -1
- package/lib/97.js +0 -1
- package/lib/98.js +0 -1
- package/lib/99.js +0 -1
- package/lib/add-form-item.css +0 -4
- package/lib/add-form.css +0 -6
- package/lib/alter.css +0 -2
- package/lib/app-index.css +0 -2
- package/lib/app-nav.css +0 -6
- package/lib/app-tabs.css +0 -2
- package/lib/apply-form.css +0 -6
- package/lib/apply_bg.png +0 -0
- package/lib/approval-index-page.css +0 -2
- package/lib/approval-index.css +0 -2
- package/lib/base-page.css +0 -2
- package/lib/button.css +0 -2
- package/lib/card-form-item.css +0 -2
- package/lib/card.css +0 -2
- package/lib/category-list.css +0 -14
- package/lib/chart.css +0 -8
- package/lib/check-history.css +0 -2
- package/lib/contact_bg.png +0 -0
- package/lib/contacts.css +0 -2
- package/lib/dashboard.css +0 -2
- package/lib/edit-entity-list.css +0 -14
- package/lib/element-icons.ttf +0 -0
- package/lib/element-icons.woff +0 -0
- package/lib/entity-add-page.css +0 -2
- package/lib/entity-apply-page.css +0 -2
- package/lib/entity-card-list.css +0 -14
- package/lib/entity-list-find-page.css +0 -2
- package/lib/entity-list-find.css +0 -12
- package/lib/entity-list-page.css +0 -2
- package/lib/entity-list.css +0 -12
- package/lib/entity-no-submit-sub-list.css +0 -12
- package/lib/entity-sub-grid.css +0 -4
- package/lib/entity-sub-list.css +0 -12
- package/lib/entity-tree-find-page.css +0 -2
- package/lib/entity-tree-find.css +0 -2
- package/lib/export-file.css +0 -2
- package/lib/export.css +0 -2
- package/lib/footer.css +0 -2
- package/lib/form-item.css +0 -40
- package/lib/form.css +0 -2
- package/lib/grid.css +0 -4
- package/lib/hall_banner.png +0 -0
- package/lib/header.css +0 -4
- package/lib/hr.png +0 -0
- package/lib/icon.css +0 -2
- package/lib/iframe.css +0 -2
- package/lib/import-file.css +0 -4
- package/lib/import.css +0 -2
- package/lib/index.css +0 -454
- package/lib/index.js +0 -359
- package/lib/layout.css +0 -2
- package/lib/list.css +0 -2
- package/lib/m-entity-add-page.css +0 -2
- package/lib/m-entity-dept-find.css +0 -2
- package/lib/m-entity-list-find.css +0 -4
- package/lib/m-entity-list.css +0 -2
- package/lib/m-entity-no-submit-sub-list.css +0 -2
- package/lib/m-entity-tree-find.css +0 -2
- package/lib/m-entity-user-find.css +0 -2
- package/lib/m_hall_banner.png +0 -0
- package/lib/menu-index.css +0 -2
- package/lib/menu.css +0 -6
- package/lib/mine.css +0 -20
- package/lib/module-index-page.css +0 -4
- package/lib/module-list-page.css +0 -2
- package/lib/module-list.css +0 -6
- package/lib/module.png +0 -0
- package/lib/nav-add-form.css +0 -8
- package/lib/num.css +0 -6
- package/lib/org-chart.css +0 -4
- package/lib/page-help.css +0 -2
- package/lib/page-tabs.css +0 -2
- package/lib/page.css +0 -2
- package/lib/progress-chart.css +0 -2
- package/lib/progress.css +0 -2
- package/lib/report-preview.css +0 -2
- package/lib/router-view.css +0 -2
- package/lib/scope.css +0 -6
- package/lib/search.css +0 -10
- package/lib/staff.png +0 -0
- package/lib/static/switch_app.png +0 -0
- package/lib/step-item.css +0 -2
- package/lib/step.css +0 -2
- package/lib/switch_app.png +0 -0
- package/lib/tab-bar.css +0 -2
- package/lib/task-list-page.css +0 -2
- package/lib/task-list.css +0 -14
- package/lib/text-editor.css +0 -2
- package/lib/text.css +0 -2
- package/lib/title.css +0 -2
- package/lib/user_bg.png +0 -0
- package/lib/visual-config-page.css +0 -19
package/lib/88.js
DELETED
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
(window.webpackJsonp=window.webpackJsonp||[]).push([[88],Array(189).concat([function(e,t,n){"use strict";n(189);var i=n(2),r=n(46),o=n(26),a=n(25),s=n(24),c=n(3),u=n(204),p=n(115),l=n(205),d=n(206),f=n(68),h=n(203),m=[],v=m.sort,b=c((function(){m.sort(void 0)})),g=c((function(){m.sort(null)})),y=p("sort"),x=!c((function(){if(f)return f<70;if(!(l&&l>3)){if(d)return!0;if(h)return h<603;var e,t,n,i,r="";for(e=65;e<76;e++){switch(t=String.fromCharCode(e),e){case 66:case 69:case 70:case 72:n=3;break;case 68:case 71:n=4;break;default:n=2}for(i=0;i<47;i++)m.push({k:t+i,v:n})}for(m.sort((function(e,t){return t.v-e.v})),i=0;i<m.length;i++)t=m[i].k.charAt(0),r.charAt(r.length-1)!==t&&(r+=t);return"DGBEFHACIJK"!==r}}));i({target:"Array",proto:!0,forced:b||!g||!y||!x},{sort:function(e){void 0!==e&&r(e);var t=o(this);if(x)return void 0===e?v.call(t):v.call(t,e);var n,i,c=[],p=a(t.length);for(i=0;i<p;i++)i in t&&c.push(t[i]);for(n=(c=u(c,function(e){return function(t,n){return void 0===n?-1:void 0===t?1:void 0!==e?+e(t,n)||0:s(t)>s(n)?1:-1}}(e))).length,i=0;i<n;)t[i]=c[i++];for(;i<p;)delete t[i++];return t}})},function(e,t,n){n(190);var i=n(2),r=n(198);i({target:"Object",stat:!0,forced:Object.assign!==r},{assign:r})},,,,,,function(e,t,n){"use strict";n(36),n(1),n(15),n(45);var i=n(92),r=n(12),o=n(34),a=n(199),s=n(24),c=n(93);i("search",(function(e,t,n){return[function(t){var n=o(this),i=null==t?void 0:t[e];return void 0!==i?i.call(t,n):new RegExp(t)[e](s(n))},function(e){var i=r(this),o=s(e),u=n(t,i,o);if(u.done)return u.value;var p=i.lastIndex;a(p,0)||(i.lastIndex=0);var l=c(i,o);return a(i.lastIndex,p)||(i.lastIndex=p),null===l?-1:l.index}]}))},,function(e,t,n){"use strict";n(190),n(6),n(10),n(0),n(20),n(1),n(30),n(35),n(21);var i=n(16),r=n(3),o=n(69),a=n(116),s=n(95),c=n(26),u=n(91),p=Object.assign,l=Object.defineProperty;e.exports=!p||r((function(){if(i&&1!==p({b:1},p(l({},"a",{enumerable:!0,get:function(){l(this,"b",{value:3,enumerable:!1})}}),{b:2})).b)return!0;var e={},t={},n=Symbol();return e[n]=7,"abcdefghijklmnopqrst".split("").forEach((function(e){t[e]=e})),7!=p({},e)[n]||"abcdefghijklmnopqrst"!=o(p({},t)).join("")}))?function(e,t){for(var n=c(e),r=arguments.length,p=1,l=a.f,d=s.f;r>p;)for(var f,h=u(arguments[p++]),m=l?o(h).concat(l(h)):o(h),v=m.length,b=0;v>b;)f=m[b++],i&&!d.call(h,f)||(n[f]=h[f]);return n}:p},function(e,t,n){n(229),e.exports=Object.is||function(e,t){return e===t?0!==e||1/e==1/t:e!=e&&t!=t}},,,,function(e,t,n){n(1),n(85);var i=n(63).match(/AppleWebKit\/(\d+)\./);e.exports=!!i&&+i[1]},function(e,t,n){n(14);var i=Math.floor,r=function(e,t){for(var n,i,r=e.length,o=1;o<r;){for(i=o,n=e[o];i&&t(e[i-1],n)>0;)e[i]=e[--i];i!==o++&&(e[i]=n)}return e},o=function(e,t,n){for(var i=e.length,r=t.length,o=0,a=0,s=[];o<i||a<r;)o<i&&a<r?s.push(n(e[o],t[a])<=0?e[o++]:t[a++]):s.push(o<i?e[o++]:t[a++]);return s};e.exports=function e(t,n){var a=t.length,s=i(a/2);return a<8?r(t,n):o(e(t.slice(0,s),n),e(t.slice(s),n),n)}},function(e,t,n){n(1),n(85);var i=n(63).match(/firefox\/(\d+)/i);e.exports=!!i&&+i[1]},function(e,t,n){var i=n(63);e.exports=/MSIE|Trident/.test(i)},,function(e,t,n){"use strict";var i=n(2),r=n(269);i({target:"String",proto:!0,forced:n(270)("link")},{link:function(e){return r(this,"a","href",e)}})},,,,,,,,,,,,,,,,,,,,,function(e,t,n){n(2)({target:"Object",stat:!0},{is:n(199)})},,,,,,,,,,,,function(e,t,n){"use strict";n(241),n(14);var i=n(2),r=n(51),o=n(307),a=n(298),s=n(3),c=1..toFixed,u=Math.floor,p=function e(t,n,i){return 0===n?i:n%2==1?e(t,n-1,i*t):e(t*t,n/2,i)},l=function(e,t,n){for(var i=-1,r=n;++i<6;)r+=t*e[i],e[i]=r%1e7,r=u(r/1e7)},d=function(e,t){for(var n=6,i=0;--n>=0;)i+=e[n],e[n]=u(i/t),i=i%t*1e7},f=function(e){for(var t=6,n="";--t>=0;)if(""!==n||0===t||0!==e[t]){var i=String(e[t]);n=""===n?i:n+a.call("0",7-i.length)+i}return n};i({target:"Number",proto:!0,forced:c&&("0.000"!==8e-5.toFixed(3)||"1"!==.9.toFixed(0)||"1.25"!==1.255.toFixed(2)||"1000000000000000128"!==(0xde0b6b3a7640080).toFixed(0))||!s((function(){c.call({})}))},{toFixed:function(e){var t,n,i,s,c=o(this),u=r(e),h=[0,0,0,0,0,0],m="",v="0";if(u<0||u>20)throw RangeError("Incorrect fraction digits");if(c!=c)return"NaN";if(c<=-1e21||c>=1e21)return String(c);if(c<0&&(m="-",c=-c),c>1e-21)if(n=(t=function(e){for(var t=0,n=e;n>=4096;)t+=12,n/=4096;for(;n>=2;)t+=1,n/=2;return t}(c*p(2,69,1))-69)<0?c*p(2,-t,1):c/p(2,t,1),n*=4503599627370496,(t=52-t)>0){for(l(h,0,n),i=u;i>=7;)l(h,1e7,0),i-=7;for(l(h,p(10,i,1),0),i=t-1;i>=23;)d(h,1<<23),i-=23;d(h,1<<i),l(h,1,1),d(h,2),v=f(h)}else l(h,0,n),l(h,1<<-t,0),v=f(h)+a.call("0",u);return v=u>0?m+((s=v.length)<=u?"0."+a.call("0",u-s)+v:v.slice(0,s-u)+"."+v.slice(s-u)):m+v}})},,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,function(e,t,n){var i=n(2),r=n(31),o=n(46),a=n(12),s=n(17),c=n(52),u=n(352),p=n(3),l=r("Reflect","construct"),d=p((function(){function e(){}return!(l((function(){}),[],e)instanceof e)})),f=!p((function(){l((function(){}))})),h=d||f;i({target:"Reflect",stat:!0,forced:h,sham:h},{construct:function(e,t){o(e),a(t);var n=arguments.length<3?e:o(arguments[2]);if(f&&!d)return l(e,t,n);if(e==n){switch(t.length){case 0:return new e;case 1:return new e(t[0]);case 2:return new e(t[0],t[1]);case 3:return new e(t[0],t[1],t[2]);case 4:return new e(t[0],t[1],t[2],t[3])}var i=[null];return i.push.apply(i,t),new(u.apply(e,i))}var r=n.prototype,p=c(s(r)?r:Object.prototype),h=Function.apply.call(e,p,t);return s(h)?h:p}})},,,,,,function(e,t,n){"use strict";function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}n.d(t,"a",(function(){return i}))},function(e,t,n){"use strict";function i(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}function r(e,t,n){return t&&i(e.prototype,t),n&&i(e,n),e}n.d(t,"a",(function(){return r}))},,,,function(e,t){var n=1..valueOf;e.exports=function(e){return n.call(e)}},,,,,,,,,,,,,,,,,,,,,,,function(e,t,n){n(14),n(0),n(23),n(47),n(7),n(14),n(0),n(23),n(47),n(7);var i=n(351);e.exports=function(e,t){if(e){if("string"==typeof e)return i(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?i(e,t):void 0}},e.exports.default=e.exports,e.exports.__esModule=!0},,,,,,,,,,,,,,,,,,,,,function(e,t){e.exports=function(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,i=new Array(t);n<t;n++)i[n]=e[n];return i},e.exports.default=e.exports,e.exports.__esModule=!0},function(e,t,n){"use strict";n(14),n(35),n(21);var i=n(46),r=n(17),o=[].slice,a={},s=function(e,t,n){if(!(t in a)){for(var i=[],r=0;r<t;r++)i[r]="a["+r+"]";a[t]=Function("C,a","return new C("+i.join(",")+")")}return a[t](e,n)};e.exports=Function.bind||function(e){var t=i(this),n=o.call(arguments,1),a=function(){var i=n.concat(o.call(arguments));return this instanceof a?s(t,i.length,i):t.apply(e,i)};return r(t.prototype)&&(a.prototype=t.prototype),a}},,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,function(e,t,n){var i=n(397),r=n(398),o=n(330),a=n(399);e.exports=function(e){return i(e)||r(e)||o(e)||a()},e.exports.default=e.exports,e.exports.__esModule=!0},function(e,t,n){var i=n(351);e.exports=function(e){if(Array.isArray(e))return i(e)},e.exports.default=e.exports,e.exports.__esModule=!0},function(e,t,n){n(6),n(10),n(0),n(13),n(11),n(7),n(8),n(47),n(6),n(10),n(0),n(13),n(7),n(8),n(47),e.exports=function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)},e.exports.default=e.exports,e.exports.__esModule=!0},function(e,t){e.exports=function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")},e.exports.default=e.exports,e.exports.__esModule=!0},,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,function(e,t,n){"use strict";function i(e,t){var n=r(e);return n&&"function"==typeof n.$instanceOf&&n.$instanceOf(t)}function r(e){return e&&e.businessObject||e}n.r(t),n.d(t,"is",(function(){return i})),n.d(t,"getBusinessObject",(function(){return r}))},function(e,t,n){"use strict";n.r(t),n.d(t,"assign",(function(){return V})),n.d(t,"bind",(function(){return F})),n.d(t,"debounce",(function(){return L})),n.d(t,"ensureArray",(function(){return h})),n.d(t,"every",(function(){return j})),n.d(t,"filter",(function(){return g})),n.d(t,"find",(function(){return v})),n.d(t,"findIndex",(function(){return b})),n.d(t,"flatten",(function(){return i})),n.d(t,"forEach",(function(){return y})),n.d(t,"get",(function(){return H})),n.d(t,"groupBy",(function(){return P})),n.d(t,"has",(function(){return m})),n.d(t,"isArray",(function(){return u})),n.d(t,"isDefined",(function(){return s})),n.d(t,"isFunction",(function(){return d})),n.d(t,"isNil",(function(){return c})),n.d(t,"isNumber",(function(){return l})),n.d(t,"isObject",(function(){return p})),n.d(t,"isString",(function(){return f})),n.d(t,"isUndefined",(function(){return a})),n.d(t,"keys",(function(){return w})),n.d(t,"map",(function(){return _})),n.d(t,"matchPattern",(function(){return k})),n.d(t,"merge",(function(){return q})),n.d(t,"omit",(function(){return W})),n.d(t,"pick",(function(){return G})),n.d(t,"reduce",(function(){return O})),n.d(t,"set",(function(){return $})),n.d(t,"size",(function(){return S})),n.d(t,"some",(function(){return E})),n.d(t,"sortBy",(function(){return R})),n.d(t,"throttle",(function(){return I})),n.d(t,"unionBy",(function(){return A})),n.d(t,"uniqueBy",(function(){return C})),n.d(t,"values",(function(){return T})),n.d(t,"without",(function(){return x}));n(21),n(0),n(43),n(38),n(86),n(60),n(190);function i(e){return Array.prototype.concat.apply([],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 u(e){return"[object Array]"===r.call(e)}function p(e){return"[object Object]"===r.call(e)}function l(e){return"[object Number]"===r.call(e)}function d(e){var t=r.call(e);return"[object Function]"===t||"[object AsyncFunction]"===t||"[object GeneratorFunction]"===t||"[object AsyncGeneratorFunction]"===t||"[object Proxy]"===t}function f(e){return"[object String]"===r.call(e)}function h(e){if(!u(e))throw new Error("must supply array")}function m(e,t){return o.call(e,t)}function v(e,t){var n;return t=M(t),y(e,(function(e,i){if(t(e,i))return n=e,!1})),n}function b(e,t){t=M(t);var n=u(e)?-1:void 0;return y(e,(function(e,i){if(t(e,i))return n=i,!1})),n}function g(e,t){var n=[];return y(e,(function(e,i){t(e,i)&&n.push(e)})),n}function y(e,t){var n;if(!a(e)){var i=u(e)?N:D;for(var r in e)if(m(e,r)&&!1===t(n=e[r],i(r)))return n}}function x(e,t){return a(e)?[]:(h(e),t=M(t),e.filter((function(e,n){return!t(e,n)})))}function O(e,t,n){return y(e,(function(e,i){n=t(n,e,i)})),n}function j(e,t){return!!O(e,(function(e,n,i){return e&&t(n,i)}),!0)}function E(e,t){return!!v(e,t)}function _(e,t){var n=[];return y(e,(function(e,i){n.push(t(e,i))})),n}function w(e){return e&&Object.keys(e)||[]}function S(e){return w(e).length}function T(e){return _(e,(function(e){return e}))}function P(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return t=B(t),y(e,(function(e){var i=t(e)||"_",r=n[i];r||(r=n[i]=[]),r.push(e)})),n}function C(e){e=B(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];y(i,(function(n){return P(n,e,t)}));var o=_(t,(function(e,t){return e[0]}));return o}var A=C;function R(e,t){t=B(t);var n=[];return y(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)})),_(n,(function(e){return e.v}))}function k(e){return function(t){return j(e,(function(e,n){return t[n]===e}))}}function B(e){return d(e)?e:function(t){return t[e]}}function M(e){return d(e)?e:function(t){return t===e}}function D(e){return e}function N(e){return Number(e)}function L(e,t){var n,i,r,o;function a(n){var a=Date.now(),u=n?0:o+t-a;if(u>0)return s(u);e.apply(r,i),c()}function s(e){n=setTimeout(a,e)}function c(){n&&clearTimeout(n),n=o=i=r=void 0}function u(){o=Date.now();for(var e=arguments.length,a=new Array(e),c=0;c<e;c++)a[c]=arguments[c];i=a,r=this,n||s(t)}return u.flush=function(){n&&a(!0),c()},u.cancel=c,u}function I(e,t){var n=!1;return function(){n||(e.apply(void 0,arguments),n=!0,setTimeout((function(){n=!1}),t))}}function F(e,t){return e.bind(t)}function z(){return(z=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(e[i]=n[i])}return e}).apply(this,arguments)}function V(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),i=1;i<t;i++)n[i-1]=arguments[i];return z.apply(void 0,[e].concat(n))}function $(e,t,n){var i=e;return y(t,(function(e,r){if("__proto__"===e)throw new Error("illegal key: __proto__");var o=t[r+1],u=i[e];s(o)&&c(u)&&(u=i[e]=isNaN(+o)?{}:[]),a(o)?a(n)?delete i[e]:i[e]=n:i=u})),e}function H(e,t,n){var i=e;return y(t,(function(e){if(c(i))return i=void 0,!1;i=i[e]})),a(i)?n:i}function G(e,t){var n={},i=Object(e);return y(t,(function(t){t in i&&(n[t]=e[t])})),n}function W(e,t){var n={};return y(Object(e),(function(e,i){-1===t.indexOf(i)&&(n[i]=e)})),n}function q(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),i=1;i<t;i++)n[i-1]=arguments[i];return n.length?(y(n,(function(t){t&&p(t)&&y(t,(function(t,n){if("__proto__"!==n){var i=e[n];p(t)?(p(i)||(i={}),e[n]=q(i,t)):e[n]=t}}))})),e):e}},function(e,t){"function"==typeof Object.create?e.exports=function(e,t){t&&(e.super_=t,e.prototype=Object.create(t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}))}:e.exports=function(e,t){if(t){e.super_=t;var n=function(){};n.prototype=t.prototype,e.prototype=new n,e.prototype.constructor=e}}},function(e,t,n){"use strict";n.r(t),n.d(t,"attr",(function(){return i})),n.d(t,"classes",(function(){return c})),n.d(t,"clear",(function(){return p})),n.d(t,"closest",(function(){return h})),n.d(t,"delegate",(function(){return O})),n.d(t,"domify",(function(){return j})),n.d(t,"event",(function(){return g})),n.d(t,"matches",(function(){return f})),n.d(t,"query",(function(){return w})),n.d(t,"queryAll",(function(){return S})),n.d(t,"remove",(function(){return T}));n(0),n(35),n(86),n(1),n(22),n(30);function i(e,t,n){return 2==arguments.length?e.getAttribute(t):null===n?e.removeAttribute(t):(e.setAttribute(t,n),e)}var r=[].indexOf,o=function(e,t){if(r)return e.indexOf(t);for(var n=0;n<e.length;++n)if(e[n]===t)return n;return-1},a=/\s+/,s=Object.prototype.toString;function c(e){return new u(e)}function u(e){if(!e||!e.nodeType)throw new Error("A DOM element reference is required");this.el=e,this.list=e.classList}function p(e){for(var t;e.childNodes.length;)t=e.childNodes[0],e.removeChild(t);return e}u.prototype.add=function(e){if(this.list)return this.list.add(e),this;var t=this.array();return~o(t,e)||t.push(e),this.el.className=t.join(" "),this},u.prototype.remove=function(e){if("[object RegExp]"==s.call(e))return this.removeMatching(e);if(this.list)return this.list.remove(e),this;var t=this.array(),n=o(t,e);return~n&&t.splice(n,1),this.el.className=t.join(" "),this},u.prototype.removeMatching=function(e){for(var t=this.array(),n=0;n<t.length;n++)e.test(t[n])&&this.remove(t[n]);return this},u.prototype.toggle=function(e,t){return this.list?(void 0!==t?t!==this.list.toggle(e,t)&&this.list.toggle(e):this.list.toggle(e),this):(void 0!==t?t?this.add(e):this.remove(e):this.has(e)?this.remove(e):this.add(e),this)},u.prototype.array=function(){var e=(this.el.getAttribute("class")||"").replace(/^\s+|\s+$/g,"").split(a);return""===e[0]&&e.shift(),e},u.prototype.has=u.prototype.contains=function(e){return this.list?this.list.contains(e):!!~o(this.array(),e)};var l="undefined"!=typeof Element?Element.prototype:{},d=l.matches||l.matchesSelector||l.webkitMatchesSelector||l.mozMatchesSelector||l.msMatchesSelector||l.oMatchesSelector,f=function(e,t){if(!e||1!==e.nodeType)return!1;if(d)return d.call(e,t);for(var n=e.parentNode.querySelectorAll(t),i=0;i<n.length;i++)if(n[i]==e)return!0;return!1};function h(e,t,n){for(var i=n?e:e.parentNode;i&&i.nodeType!==document.DOCUMENT_NODE&&i.nodeType!==document.DOCUMENT_FRAGMENT_NODE;){if(f(i,t))return i;i=i.parentNode}return f(i,t)?i:null}var m=window.addEventListener?"addEventListener":"attachEvent",v=window.removeEventListener?"removeEventListener":"detachEvent",b="addEventListener"!==m?"on":"",g={bind:function(e,t,n,i){return e[m](b+t,n,i||!1),n},unbind:function(e,t,n,i){return e[v](b+t,n,i||!1),n}},y=["focus","blur"];var x,O={bind:function(e,t,n,i,r){return-1!==y.indexOf(n)&&(r=!0),g.bind(e,n,(function(n){var r=n.target||n.srcElement;n.delegateTarget=h(r,t,!0),n.delegateTarget&&i.call(e,n)}),r)},unbind:function(e,t,n,i){return-1!==y.indexOf(t)&&(i=!0),g.unbind(e,t,n,i)}},j=function(e,t){if("string"!=typeof e)throw new TypeError("String expected");t||(t=document);var n=/<([\w:]+)/.exec(e);if(!n)return t.createTextNode(e);e=e.replace(/^\s+|\s+$/g,"");var i=n[1];if("body"==i){return(r=t.createElement("html")).innerHTML=e,r.removeChild(r.lastChild)}var r,o=_[i]||_._default,a=o[0],s=o[1],c=o[2];(r=t.createElement("div")).innerHTML=s+e+c;for(;a--;)r=r.lastChild;if(r.firstChild==r.lastChild)return r.removeChild(r.firstChild);var u=t.createDocumentFragment();for(;r.firstChild;)u.appendChild(r.removeChild(r.firstChild));return u},E=!1;"undefined"!=typeof document&&((x=document.createElement("div")).innerHTML=' <link/><table></table><a href="/a">a</a><input type="checkbox"/>',E=!x.getElementsByTagName("link").length,x=void 0);var _={legend:[1,"<fieldset>","</fieldset>"],tr:[2,"<table><tbody>","</tbody></table>"],col:[2,"<table><tbody></tbody><colgroup>","</colgroup></table>"],_default:E?[1,"X<div>","</div>"]:[0,"",""]};function w(e,t){return(t=t||document).querySelector(e)}function S(e,t){return(t=t||document).querySelectorAll(e)}function T(e){e.parentNode&&e.parentNode.removeChild(e)}_.td=_.th=[3,"<table><tbody><tr>","</tr></tbody></table>"],_.option=_.optgroup=[1,'<select multiple="multiple">',"</select>"],_.thead=_.tbody=_.colgroup=_.caption=_.tfoot=[1,"<table>","</table>"],_.polyline=_.ellipse=_.polygon=_.circle=_.text=_.line=_.path=_.rect=_.g=[1,'<svg xmlns="http://www.w3.org/2000/svg" version="1.1">',"</svg>"]},function(e,t,n){"use strict";var i={};e.exports=i,i.updateProperties=function(e,t){return{cmd:"element.updateProperties",context:{element:e,properties:t}}},i.updateBusinessObject=function(e,t,n){return{cmd:"properties-panel.update-businessobject",context:{element:e,businessObject:t,properties:n}}},i.addElementsTolist=function(e,t,n,i){return{cmd:"properties-panel.update-businessobject-list",context:{element:e,currentObject:t,propertyName:n,objectsToAdd:i}}},i.removeElementsFromList=function(e,t,n,i,r){return{cmd:"properties-panel.update-businessobject-list",context:{element:e,currentObject:t,propertyName:n,referencePropertyName:i,objectsToRemove:r}}},i.addAndRemoveElementsFromList=function(e,t,n,i,r,o){return{cmd:"properties-panel.update-businessobject-list",context:{element:e,currentObject:t,propertyName:n,referencePropertyName:i,objectsToAdd:r,objectsToRemove:o}}},i.setList=function(e,t,n,i){return{cmd:"properties-panel.update-businessobject-list",context:{element:e,currentObject:t,propertyName:n,updatedObjectList:i}}}},function(e,t,n){"use strict";n(6),n(10),n(208),n(6),n(10),n(208);var i=n(720).getBusinessObject,r=n(875),o=n(1050),a=n(876),s=n(1051),c=n(1052),u=n(1053),p=n(1054),l=n(1055),d=n(1056),f=n(724);function h(e){if(!e)throw new Error(e+" must be set.");return e}var m=function(e){return{id:e.id,description:e.description||"",get:e.get||function(t){var n=i(t),r={},o=h(e.modelProperty);return r[o]=n.get(o),r},set:e.set||function(t,n){var i={},r=h(e.modelProperty);return""!==n[r]?i[r]=n[r]:i[r]=void 0,f.updateProperties(t,i)},validate:e.validate||function(){return{}},html:""}};function v(){}v.textField=function(e){return r(e,m(e))},v.validationAwareTextField=function(e){return u(e,m(e))},v.checkbox=function(e){return o(e,m(e))},v.textBox=function(e){return c(e,m(e))},v.selectBox=function(e){return a(e,m(e))},v.comboBox=function(e){return s(e)},v.table=function(e){return p(e)},v.label=function(e){return l(e)},v.link=function(e){return d(e)},e.exports=v},function(e,t,n){"use strict";n.d(t,"g",(function(){return s})),n.d(t,"h",(function(){return c})),n.d(t,"b",(function(){return u})),n.d(t,"a",(function(){return p})),n.d(t,"e",(function(){return l})),n.d(t,"f",(function(){return d})),n.d(t,"d",(function(){return f})),n.d(t,"c",(function(){return h}));n(14),n(86);var i=n(721),r=n(751),o=n(842),a=n.n(o);function s(e){return{x:Math.round(e.x),y:Math.round(e.y),width:Math.round(e.width),height:Math.round(e.height)}}function c(e){return{x:Math.round(e.x),y:Math.round(e.y)}}function u(e){return{top:e.y,right:e.x+(e.width||0),bottom:e.y+(e.height||0),left:e.x}}function p(e){return{x:e.left,y:e.top,width:e.right-e.left,height:e.bottom-e.top}}function l(e){return c({x:e.x+(e.width||0)/2,y:e.y+(e.height||0)/2})}function d(e,t,n){n=n||0,Object(i.isObject)(n)||(n={x:n,y:n});var r=u(e),o=u(t),a=r.bottom+n.y<=o.top,s=r.left-n.x>=o.right,c=r.top-n.y>=o.bottom,p=a?"top":c?"bottom":null,l=r.right+n.x<=o.left?"left":s?"right":null;return l&&p?p+"-"+l:l||p||"intersect"}function f(e,t,n){var o,s,u=(o=e,s=t,a()(o,s));return 1===u.length||2===u.length&&Object(r.b)(u[0],u[1])<1?c(u[0]):u.length>1?c((u=Object(i.sortBy)(u,(function(e){var t=Math.floor(100*e.t2)||1;return t=((t=100-t)<10?"0":"")+t,e.segment2+"#"+t})))[n?0:u.length-1]):null}function h(e){e=e.slice();for(var t,n,i,o=0;e[o];)t=e[o],n=e[o-1],i=e[o+1],0===Object(r.b)(t,i)||Object(r.e)(n,i,t)?e.splice(o,1):o++;return e}},function(e,t,n){"use strict";n.d(t,"a",(function(){return o})),n.d(t,"b",(function(){return c})),n.d(t,"c",(function(){return f})),n.d(t,"d",(function(){return v})),n.d(t,"e",(function(){return b})),n.d(t,"f",(function(){return O})),n.d(t,"i",(function(){return k})),n.d(t,"j",(function(){return m})),n.d(t,"k",(function(){return M})),n.d(t,"g",(function(){return _})),n.d(t,"h",(function(){return w}));n(1),n(22),n(38),n(0),n(35),n(86),n(30),n(23),n(14),n(33);function i(e,t){if(e.ownerDocument!==t.ownerDocument)try{return t.ownerDocument.importNode(e,!0)}catch(e){}return e}function r(e,t){return t.appendChild(i(e,t))}function o(e,t){return r(t,e),e}var a={"alignment-baseline":1,"baseline-shift":1,clip:1,"clip-path":1,"clip-rule":1,color:1,"color-interpolation":1,"color-interpolation-filters":1,"color-profile":1,"color-rendering":1,cursor:1,direction:1,display:1,"dominant-baseline":1,"enable-background":1,fill:1,"fill-opacity":1,"fill-rule":1,filter:1,"flood-color":1,"flood-opacity":1,font:1,"font-family":1,"font-size":2,"font-size-adjust":1,"font-stretch":1,"font-style":1,"font-variant":1,"font-weight":1,"glyph-orientation-horizontal":1,"glyph-orientation-vertical":1,"image-rendering":1,kerning:1,"letter-spacing":1,"lighting-color":1,marker:1,"marker-end":1,"marker-mid":1,"marker-start":1,mask:1,opacity:1,overflow:1,"pointer-events":1,"shape-rendering":1,"stop-color":1,"stop-opacity":1,stroke:1,"stroke-dasharray":1,"stroke-dashoffset":1,"stroke-linecap":1,"stroke-linejoin":1,"stroke-miterlimit":1,"stroke-opacity":1,"stroke-width":2,"text-anchor":1,"text-decoration":1,"text-rendering":1,"unicode-bidi":1,visibility:1,"word-spacing":1,"writing-mode":1};function s(e,t,n){var i=t.replace(/([a-z])([A-Z])/g,"$1-$2").toLowerCase(),r=a[i];r?(2===r&&"number"==typeof n&&(n=String(n)+"px"),e.style[i]=n):e.setAttributeNS(null,t,n)}function c(e,t,n){if("string"==typeof t){if(void 0===n)return function(e,t){return a[t]?e.style[t]:e.getAttributeNS(null,t)}(e,t);s(e,t,n)}else!function(e,t){var n,i,r=Object.keys(t);for(n=0;i=r[n];n++)s(e,i,t[i])}(e,t);return e}function u(e,t){if(e.indexOf)return e.indexOf(t);for(var n=0;n<e.length;++n)if(e[n]===t)return n;return-1}var p=/\s+/,l=Object.prototype.toString;function d(e){return void 0!==e}function f(e){return new h(e)}function h(e){if(!e||!e.nodeType)throw new Error("A DOM element reference is required");this.el=e,this.list=e.classList}function m(e){var t=e.parentNode;return t&&t.removeChild(e),e}function v(e){for(var t;t=e.firstChild;)m(t);return e}function b(e){return e.cloneNode(!0)}h.prototype.add=function(e){if(this.list)return this.list.add(e),this;var t=this.array();return~u(t,e)||t.push(e),d(this.el.className.baseVal)?this.el.className.baseVal=t.join(" "):this.el.className=t.join(" "),this},h.prototype.remove=function(e){if("[object RegExp]"===l.call(e))return this.removeMatching(e);if(this.list)return this.list.remove(e),this;var t=this.array(),n=u(t,e);return~n&&t.splice(n,1),this.el.className.baseVal=t.join(" "),this},h.prototype.removeMatching=function(e){for(var t=this.array(),n=0;n<t.length;n++)e.test(t[n])&&this.remove(t[n]);return this},h.prototype.toggle=function(e,t){return this.list?(d(t)?t!==this.list.toggle(e,t)&&this.list.toggle(e):this.list.toggle(e),this):(d(t)?t?this.add(e):this.remove(e):this.has(e)?this.remove(e):this.add(e),this)},h.prototype.array=function(){var e=(this.el.getAttribute("class")||"").replace(/^\s+|\s+$/g,"").split(p);return""===e[0]&&e.shift(),e},h.prototype.has=h.prototype.contains=function(e){return this.list?this.list.contains(e):!!~u(this.array(),e)};var g="http://www.w3.org/2000/svg",y='<svg xmlns="'+g+'"';function x(e){var t=!1;"<svg"===e.substring(0,4)?-1===e.indexOf(g)&&(e=y+e.substring(4)):(e=y+">"+e+"</svg>",t=!0);var n=function(e){var t;return(t=new DOMParser).async=!1,t.parseFromString(e,"text/xml")}(e);if(!t)return n;for(var i=document.createDocumentFragment(),r=n.firstChild;r.firstChild;)i.appendChild(r.firstChild);return i}function O(e,t){var n;return"<"===e.charAt(0)?(n=x(e).firstChild,n=document.importNode(n,!0)):n=document.createElementNS(g,e),t&&c(n,t),n}var j=O("svg");function E(e,t){var n,i,r=Object.keys(t);for(n=0;i=r[n];n++)e[i]=t[i];return e}function _(e,t,n,i,r,o){var a=j.createSVGMatrix();switch(arguments.length){case 0:return a;case 1:return E(a,e);case 6:return E(a,{a:e,b:t,c:n,d:i,e:r,f:o})}}function w(e){return e?j.createSVGTransformFromMatrix(e):j.createSVGTransform()}var S=/([&<>]{1})/g,T=/([\n\r"]{1})/g,P={"&":"&","<":"<",">":">",'"':"'"};function C(e,t){return e.replace(t,(function(e,t){return P[t]||t}))}function A(e,t){var n,i,r,o,a;switch(e.nodeType){case 3:t.push(C(e.textContent,S));break;case 1:if(t.push("<",e.tagName),e.hasAttributes())for(n=0,i=(r=e.attributes).length;n<i;++n)o=r.item(n),t.push(" ",o.name,'="',C(o.value,T),'"');if(e.hasChildNodes()){for(t.push(">"),n=0,i=(a=e.childNodes).length;n<i;++n)A(a.item(n),t);t.push("</",e.tagName,">")}else t.push("/>");break;case 8:t.push("\x3c!--",C(e.nodeValue,S),"--\x3e");break;case 4:t.push("<![CDATA[",e.nodeValue,"]]>");break;default:throw new Error("unable to handle node "+e.nodeType)}return t}function R(e,t){var n=x(t);if(v(e),t){(function(e){return"#document-fragment"===e.nodeName})(n)||(n=n.documentElement);for(var i,o=(i=n.childNodes,Array.prototype.slice.call(i)),a=0;a<o.length;a++)r(o[a],e)}}function k(e,t){if(void 0!==t){try{R(e,t)}catch(e){throw new Error("error parsing SVG: "+e.message)}return e}return function(e){for(var t=e.firstChild,n=[];t;)A(t,n),t=t.nextSibling;return n.join("")}(e)}function B(e,t){return t instanceof SVGMatrix?e.createSVGTransformFromMatrix(t):t}function M(e,t){var n=e.transform.baseVal;return t&&(Array.isArray(t)||(t=[t]),function(e,t){var n,i;for(e.clear(),n=0;i=t[n];n++)e.appendItem(B(e,i))}(n,t)),n.consolidate()}},function(e,t,n){"use strict";n.d(t,"e",(function(){return r})),n.d(t,"a",(function(){return a})),n.d(t,"h",(function(){return c})),n.d(t,"c",(function(){return u})),n.d(t,"b",(function(){return p})),n.d(t,"d",(function(){return l})),n.d(t,"f",(function(){return d})),n.d(t,"g",(function(){return f}));var i=n(721);function r(e){return Object(i.filter)(e,(function(t){return!Object(i.find)(e,(function(e){return e!==t&&function e(t,n){if(!n)return;if(t===n)return n;if(!t.parent)return;return e(t.parent,n)}(t,e)}))}))}function o(e,t,n){var i=!n||-1===e.indexOf(t);return i&&e.push(t),i}function a(e,t,n){n=n||0,Object(i.isArray)(e)||(e=[e]),Object(i.forEach)(e,(function(e,r){var o=t(e,r,n);Object(i.isArray)(o)&&o.length&&a(o,t,n+1)}))}function s(e,t,n){var i=[],r=[];return a(e,(function(e,a,s){o(i,e,t);var c=e.children;if((-1===n||s<n)&&c&&o(r,c,t))return c})),i}function c(e,t){return s(e,!t,-1)}function u(e,t,n){Object(i.isUndefined)(t)&&(t=!0),Object(i.isObject)(t)&&(n=t,t=!0);var r=h((n=n||{}).allShapes),o=h(n.allConnections),s=h(n.enclosedElements),c=h(n.enclosedConnections),u=h(n.topLevel,t&&Object(i.groupBy)(e,(function(e){return e.id})));function p(e){u[e.source.id]&&u[e.target.id]&&(u[e.id]=[e]),r[e.source.id]&&r[e.target.id]&&(c[e.id]=s[e.id]=e),o[e.id]=e}return a(e,(function(e){if(s[e.id]=e,!e.waypoints)return r[e.id]=e,Object(i.forEach)(e.incoming,p),Object(i.forEach)(e.outgoing,p),e.children;c[e.id]=o[e.id]=e})),{allShapes:r,allConnections:o,topLevel:u,enclosedConnections:c,enclosedElements:s}}function p(e,t){var n,r,o,a;return t=!!t,Object(i.isArray)(e)||(e=[e]),Object(i.forEach)(e,(function(e){var i=e;e.waypoints&&!t&&(i=p(e.waypoints,!0));var s=i.x,c=i.y,u=i.height||0,l=i.width||0;(s<n||void 0===n)&&(n=s),(c<r||void 0===r)&&(r=c),(s+l>o||void 0===o)&&(o=s+l),(c+u>a||void 0===a)&&(a=c+u)})),{x:n,y:r,height:a-r,width:o-n}}function l(e,t){var n={};return Object(i.forEach)(e,(function(e){var r=e;r.waypoints&&(r=p(r)),!Object(i.isNumber)(t.y)&&r.x>t.x&&(n[e.id]=e),!Object(i.isNumber)(t.x)&&r.y>t.y&&(n[e.id]=e),r.x>t.x&&r.y>t.y&&(Object(i.isNumber)(t.width)&&Object(i.isNumber)(t.height)&&r.width+r.x<t.width+t.x&&r.height+r.y<t.height+t.y?n[e.id]=e:Object(i.isNumber)(t.width)&&Object(i.isNumber)(t.height)||(n[e.id]=e))})),n}function d(e){return"waypoints"in e?"connection":"x"in e?"shape":"root"}function f(e){return!(!e||!e.isFrame)}function h(e,t){return Object(i.assign)({},e||{},t||{})}},function(e,t,n){"use strict";n(23),n(1),n(22),n(23),n(1),n(22);var i=n(723).query,r=n(723).clear,o=n(720).is,a=n(731),s=n(723).domify,c=n(802).default,u=/\s/,p=/^([a-z][\w-.]*:)?[a-z_][\w-.]*$/i,l=/^[a-z_][\w-.]*$/i,d={"&":"&","<":"<",">":">",'"':""","'":"'"};function f(e){if(e.selectedIndex>=0)return e.options[e.selectedIndex].value}function h(e){for(var t=e;t.$parent;)t=t.$parent;return t}function m(e,t){var n=[];return a(e||[],(function(e){o(e,t)&&n.push(e)})),n}function v(e,t){return m(h(e).rootElements,t)}function b(e){return e.push({label:"",value:"",name:""})}function g(e,t){var n=[],i=v(e,t);return a(i,(function(e){n.push({label:(e.name||"")+" (id="+e.id+")",value:e.id,name:e.name})})),n}function y(e,t){return x(e)?t("Id must not contain spaces."):l.test(e)?void 0:p.test(e)?t("Id must not contain prefix."):t("Id must be a valid QName.")}function x(e){return u.test(e)}function O(e){return(e=""+e)&&e.replace(/[&<>"']/g,(function(e){return d[e]}))}e.exports.selectedOption=f,e.exports.selectedType=function(e,t){return f(i(e,t))},e.exports.getRoot=h,e.exports.filterElementsByType=m,e.exports.findRootElementsByType=v,e.exports.removeAllChildren=function(e){for(;e.firstChild;)e.removeChild(e.firstChild)},e.exports.addEmptyParameter=b,e.exports.refreshOptionsModel=g,e.exports.updateOptionsDropDown=function(e,t,n,o){var c=g(t,n);b(c);var u=i(e,o);return r(u),a(c,(function(e){var t=s('<option value="'+O(e.value)+'">'+O(e.label)+"</option>");u.appendChild(t)})),c},e.exports.isIdValid=function(e,t,n){var i=e.$model.ids.assigned(t);return!t||i&&i!==e?n("Element must have an unique id."):y(t,n)},e.exports.validateId=y,e.exports.containsSpace=x,e.exports.nextId=function(e){return new c([32,32,1]).nextPrefixed(e)},e.exports.triggerClickEvent=function(e){var t;if(document.createEvent){try{t=new MouseEvent("click",{view:window,bubbles:!0,cancelable:!0})}catch(e){(t=document.createEvent("MouseEvent")).initEvent("click",!0,!0)}return e.dispatchEvent(t)}return t=document.createEventObject(),e.fireEvent("onclick",t)},e.exports.escapeHTML=O},function(e,t,n){"use strict";n.r(t),n.d(t,"isAny",(function(){return o})),n.d(t,"getParent",(function(){return a}));var i=n(721),r=n(720);function o(e,t){return Object(i.some)(t,(function(t){return Object(r.is)(e,t)}))}function a(e,t){for("string"==typeof t&&(t=[t]);e=e.parent;)if(o(e,t))return e;return null}},function(e,t,n){var i=n(804),r=n(777),o=n(945),a=n(734);e.exports=function(e,t){return(a(e)?i:r)(e,o(t))}},function(e,t,n){"use strict";var i={};e.exports=i,i.createElement=function(e,t,n,i){var r=i.create(e,t);return r.$parent=n,r}},function(e,t,n){"use strict";n.r(t),n.d(t,"isExpanded",(function(){return o})),n.d(t,"isInterrupting",(function(){return a})),n.d(t,"isEventSubProcess",(function(){return s})),n.d(t,"hasEventDefinition",(function(){return c})),n.d(t,"hasErrorEventDefinition",(function(){return u})),n.d(t,"hasEscalationEventDefinition",(function(){return p})),n.d(t,"hasCompensateEventDefinition",(function(){return l}));var i=n(720),r=n(721);function o(e){return!Object(i.is)(e,"bpmn:CallActivity")&&(Object(i.is)(e,"bpmn:SubProcess")?!!Object(i.getBusinessObject)(e).di.isExpanded:!Object(i.is)(e,"bpmn:Participant")||!!Object(i.getBusinessObject)(e).processRef)}function a(e){return e&&!1!==Object(i.getBusinessObject)(e).isInterrupting}function s(e){return e&&!!Object(i.getBusinessObject)(e).triggeredByEvent}function c(e,t){var n=Object(i.getBusinessObject)(e),o=!1;return n.eventDefinitions&&Object(r.forEach)(n.eventDefinitions,(function(e){Object(i.is)(e,t)&&(o=!0)})),o}function u(e){return c(e,"bpmn:ErrorEventDefinition")}function p(e){return c(e,"bpmn:EscalationEventDefinition")}function l(e){return c(e,"bpmn:CompensateEventDefinition")}},function(e,t){var n=Array.isArray;e.exports=n},function(e,t,n){"use strict";n.r(t),n.d(t,"remove",(function(){return i})),n.d(t,"add",(function(){return r})),n.d(t,"indexOf",(function(){return o}));n(86);function i(e,t){if(!e||!t)return-1;var n=e.indexOf(t);return-1!==n&&e.splice(n,1),n}function r(e,t,n){if(e&&t){"number"!=typeof n&&(n=-1);var i=e.indexOf(t);if(-1!==i){if(i===n)return;if(-1===n)return;e.splice(i,1)}-1!==n?e.splice(n,0,t):e.push(t)}}function o(e,t){return e&&t?e.indexOf(t):-1}},function(e,t,n){"use strict";n(43),n(23),n(43),n(23);var i=n(720).getBusinessObject,r=n(720).is,o=n(730).isAny,a=n(754);function s(e){var t=i(e);if(t)return t.get("camunda:modelerTemplate")}function c(e){var t=i(e);return r(t,"bpmn:ExtensionElements")?t:t.extensionElements}function u(e,t){if("camunda:in"===t.type&&t.target)return e.target===t.target;if("camunda:out"===t.type){if(t.source)return e.source===t.source;if(t.sourceExpression)return e.sourceExpression===t.sourceExpression}return t.variables?"all"===e.variables&&("local"!==t.variables||e.local):void 0}e.exports.TEMPLATE_ATTR="camunda:modelerTemplate",e.exports.getTemplateId=s,e.exports.getTemplate=function(e,t){var n=s(e);return n&&t.get(n)},e.exports.getDefaultTemplate=function(e,t){return t.getAll().filter((function(t){return o(e,t.appliesTo)&&t.isDefault}))[0]},e.exports.findExtension=function(e,t){var n,o=i(e);return(n=r(o,"bpmn:ExtensionElements")?o:o.extensionElements)?a(n.get("values"),(function(e){return r(e,t)})):null},e.exports.findExtensions=function(e,t){var n=c(e);return n?n.get("values").filter((function(e){return o(e,t)})):[]},e.exports.findCamundaInOut=function(e,t){var n,i=c(e);if(i)return"camunda:in"===t.type?n=function(e){return r(e,"camunda:In")&&u(e,t)}:"camunda:out"===t.type?n=function(e){return r(e,"camunda:Out")&&u(e,t)}:"camunda:in:businessKey"===t.type&&(n=function(e){return r(e,"camunda:In")&&"businessKey"in e}),a(i.get("values"),n)},e.exports.findCamundaProperty=function(e,t){return a(e.get("values"),(function(e){return e.name===t.name}))},e.exports.findInputParameter=function(e,t){var n=e.get("inputParameters");return a(n,(function(e){return e.name===t.name}))},e.exports.findOutputParameter=function(e,t){var n=e.get("outputParameters");return a(n,(function(e){var n=e.value;if(!t.scriptFormat)return n===t.source;var i=e.definition;return!(!i||t.scriptFormat!==i.scriptFormat)&&i.value===t.source}))}},function(e,t,n){"use strict";n(23),n(23);var i=n(740);function r(e,t){var n={};return e.target?(n.target=e.target,e.expression?n.sourceExpression=t:n.source=t):e.variables?(n.variables="all","local"===e.variables&&(n.local=!0)):(n.target=t,["source","sourceExpression"].forEach((function(t){e[t]&&(n[t]=e[t])}))),n}e.exports.createInputParameter=function(e,t,n){var i,r,o=e.scriptFormat;return o?r=n.create("camunda:Script",{scriptFormat:o,value:t}):i=t,n.create("camunda:InputParameter",{name:e.name,value:i,definition:r})},e.exports.createOutputParameter=function(e,t,n){var i,r,o=e.scriptFormat;return o?r=n.create("camunda:Script",{scriptFormat:o,value:e.source}):i=e.source,n.create("camunda:OutputParameter",{name:t,value:i,definition:r})},e.exports.createCamundaProperty=function(e,t,n){return n.create("camunda:Property",{name:e.name,value:t||""})},e.exports.createCamundaIn=function(e,t,n){var i=r(e,t);return n.create("camunda:In",i)},e.exports.createCamundaInWithBusinessKey=function(e,t,n){return n.create("camunda:In",{businessKey:t})},e.exports.createCamundaOut=function(e,t,n){var i=r(e,t);return n.create("camunda:Out",i)},e.exports.createCamundaExecutionListenerScript=function(e,t,n){var i,r,o=e.scriptFormat;return o?r=n.create("camunda:Script",{scriptFormat:o,value:t}):i=t,n.create("camunda:ExecutionListener",{event:e.event,value:i,script:r})},e.exports.createCamundaFieldInjection=function(e,t,n){var r=i({},{string:void 0,expression:void 0,name:void 0});return e.expression?r.expression=t:r.string=t,r.name=e.name,n.create("camunda:Field",r)}},function(e,t,n){var i=n(123).default,r=n(845),o="object"==("undefined"==typeof self?"undefined":i(self))&&self&&self.Object===Object&&self,a=r||o||Function("return this")();e.exports=a},function(e,t,n){"use strict";n(43),n(43);var i=n(724),r=n(732),o=n(720).is,a={};a.getExtensionElements=function(e,t){var n=function(e){return e.get("extensionElements")}(e);if(void 0!==n){var i=n.get("values");if(void 0!==i){var r=i.filter((function(e){return o(e,t)}));if(r.length)return r}}},a.addEntry=function(e,t,n,o){var a=e.get("extensionElements");return a?i.addElementsTolist(t,a,"values",[n]):{extensionElements:a=r.createElement("bpmn:ExtensionElements",{values:[n]},e,o)}},a.removeEntry=function(e,t,n){var r=e.get("extensionElements");return r?i.removeElementsFromList(t,r,"values","extensionElements",[n]):{}},e.exports=a},function(e,t,n){var i=n(873),r=n(1039),o=n(1040),a=n(749),s=n(806),c=n(745),u=Object.prototype.hasOwnProperty,p=o((function(e,t){if(s(t)||a(t))r(t,c(t),e);else for(var n in t)u.call(t,n)&&i(e,n,t[n])}));e.exports=p},function(e,t,n){"use strict";n.d(t,"b",(function(){return r})),n.d(t,"c",(function(){return o})),n.d(t,"a",(function(){return a}));var i=n(727);function r(e,t,n,r,o){var a=Object(i.h)();a.setTranslate(t,n);var s=Object(i.h)();s.setRotate(r||0,0,0);var c=Object(i.h)();c.setScale(o||1,o||1),Object(i.k)(e,[a,s,c])}function o(e,t,n){var r=Object(i.h)();r.setTranslate(t,n),Object(i.k)(e,r)}function a(e,t){var n=Object(i.h)();n.setRotate(t,0,0),Object(i.k)(e,n)}},function(e,t,n){"use strict";n.d(t,"a",(function(){return o})),n.d(t,"f",(function(){return a})),n.d(t,"d",(function(){return s})),n.d(t,"c",(function(){return u})),n.d(t,"b",(function(){return p})),n.d(t,"e",(function(){return l}));var i=n(721),r=n(720),o={width:90,height:20};function a(e){return Object(r.is)(e,"bpmn:Event")||Object(r.is)(e,"bpmn:Gateway")||Object(r.is)(e,"bpmn:DataStoreReference")||Object(r.is)(e,"bpmn:DataObjectReference")||Object(r.is)(e,"bpmn:DataInput")||Object(r.is)(e,"bpmn:DataOutput")||Object(r.is)(e,"bpmn:SequenceFlow")||Object(r.is)(e,"bpmn:MessageFlow")||Object(r.is)(e,"bpmn:Group")}function s(e){return l(e.label)}function c(e){var t=e.length/2-1,n=e[Math.floor(t)],i=e[Math.ceil(t+.01)],r=function(e){var t=e.length/2-1,n=e[Math.floor(t)],i=e[Math.ceil(t+.01)];return{x:n.x+(i.x-n.x)/2,y:n.y+(i.y-n.y)/2}}(e),o=Math.atan((i.y-n.y)/(i.x-n.x)),a=r.x,s=r.y;return Math.abs(o)<Math.PI/2?s-=15:a+=15,{x:a,y:s}}function u(e){return e.waypoints?c(e.waypoints):Object(r.is)(e,"bpmn:Group")?{x:e.x+e.width/2,y:e.y+o.height/2}:{x:e.x+e.width/2,y:e.y+e.height+o.height/2}}function p(e,t){var n,r,a,s=e.di.label;return s&&s.bounds?(a=s.bounds,r={width:Math.max(o.width,a.width),height:a.height},n={x:a.x+a.width/2,y:a.y+a.height/2}):(n=u(t),r=o),Object(i.assign)({x:n.x-r.width/2,y:n.y-r.height/2},r)}function l(e){return e&&!!e.labelTarget}},function(e,t,n){var i=n(123).default;e.exports=function(e){var t=i(e);return null!=e&&("object"==t||"function"==t)}},function(e,t,n){"use strict";var i=n(766),r=n(913),o=(n(14),n(86),n(721));function a(e){this._eventBus=e,this._selectedElements=[];var t=this;e.on(["shape.remove","connection.remove"],(function(e){var n=e.element;t.deselect(n)})),e.on(["diagram.clear"],(function(e){t.select(null)}))}a.$inject=["eventBus"],a.prototype.deselect=function(e){var t=this._selectedElements,n=t.indexOf(e);if(-1!==n){var i=t.slice();t.splice(n,1),this._eventBus.fire("selection.changed",{oldSelection:i,newSelection:t})}},a.prototype.get=function(){return this._selectedElements},a.prototype.isSelected=function(e){return-1!==this._selectedElements.indexOf(e)},a.prototype.select=function(e,t){var n=this._selectedElements,i=n.slice();Object(o.isArray)(e)||(e=e?[e]:[]),t?Object(o.forEach)(e,(function(e){-1===n.indexOf(e)&&n.push(e)})):this._selectedElements=n=e.slice(),this._eventBus.fire("selection.changed",{oldSelection:i,newSelection:n})};function s(e,t,n,i){function r(e,n){t.addMarker(e,n)}function a(e,n){t.removeMarker(e,n)}this._multiSelectionBox=null,e.on("element.hover",(function(e){r(e.element,"hover")})),e.on("element.out",(function(e){a(e.element,"hover")})),e.on("selection.changed",(function(e){var t=e.oldSelection,n=e.newSelection;Object(o.forEach)(t,(function(e){-1===n.indexOf(e)&&a(e,"selected")})),Object(o.forEach)(n,(function(e){-1===t.indexOf(e)&&r(e,"selected")}))}))}s.$inject=["eventBus","canvas","selection","styles"];n(43);var c=n(750);function u(e,t,n,i){e.on("create.end",500,(function(e){var n=e.context,i=n.canExecute,r=n.elements,a=(n.hints||{}).autoSelect;if(i){if(!1===a)return;Object(o.isArray)(a)?t.select(a):t.select(r.filter(p))}})),e.on("connect.end",500,(function(e){var n=e.context,i=n.canExecute,r=n.hover;i&&r&&t.select(r)})),e.on("shape.move.end",500,(function(e){var n=e.previousSelection||[],r=i.get(e.context.shape.id);Object(o.find)(n,(function(e){return r.id===e.id}))||t.select(r)})),e.on("element.click",(function(e){var i=e.element;i===n.getRootElement()&&(i=null);var r=t.isSelected(i),o=t.get().length>1,a=Object(c.a)(e)||Object(c.b)(e);if(r&&o)return a?t.deselect(i):t.select(i);r?t.deselect(i):t.select(i,a)}))}function p(e){return!e.hidden}u.$inject=["eventBus","selection","canvas","elementRegistry"];t.a={__init__:["selectionVisuals","selectionBehavior"],__depends__:[i.a,r.a],selection:["type",a],selectionVisuals:["type",s],selectionBehavior:["type",u]}},function(e,t,n){var i=n(935),r=n(847),o=n(749);e.exports=function(e){return o(e)?i(e):r(e)}},function(e,t,n){"use strict";var i=n(720),r=i.is,o=i.getBusinessObject,a=n(747),s=n(739),c={};e.exports=c,c.isServiceTaskLike=function(e){return r(e,"camunda:ServiceTaskLike")},c.isDmnCapable=function(e){return r(e,"camunda:DmnCapable")},c.isExternalCapable=function(e){return r(e,"camunda:ExternalCapable")},c.isTaskListener=function(e){return r(e,"camunda:TaskListener")},c.isExecutionListener=function(e){return r(e,"camunda:ExecutionListener")},c.isListener=function(e){return this.isTaskListener(e)||this.isExecutionListener(e)},c.isSequenceFlow=function(e){return r(e,"bpmn:SequenceFlow")},c.getServiceTaskLikeBusinessObject=function(e){if(r(e,"bpmn:IntermediateThrowEvent")||r(e,"bpmn:EndEvent")){var t=a.getMessageEventDefinition(e);t&&(e=t)}return this.isServiceTaskLike(e)&&o(e)},c.getImplementationType=function(e){var t=this.getServiceTaskLikeBusinessObject(e);if(!t){if(!this.isListener(e))return;t=e}if(this.isDmnCapable(t)&&void 0!==t.get("camunda:decisionRef"))return"dmn";if(this.isServiceTaskLike(t)&&void 0!==s.getExtensionElements(t,"camunda:Connector"))return"connector";if(this.isExternalCapable(t)&&"external"===t.get("camunda:type"))return"external";if(void 0!==t.get("camunda:class"))return"class";if(void 0!==t.get("camunda:expression"))return"expression";if(void 0!==t.get("camunda:delegateExpression"))return"delegateExpression";if(this.isListener(t)&&void 0!==t.get("script"))return"script"}},function(e,t,n){"use strict";var i=n(720).getBusinessObject,r=n(720).is,o=n(731),a={};e.exports=a,a.getEventDefinition=function(e,t){var n=i(e),a=null;return n.eventDefinitions&&o(n.eventDefinitions,(function(e){r(e,t)&&(a=e)})),a},a.getTimerEventDefinition=function(e){return this.getEventDefinition(e,"bpmn:TimerEventDefinition")},a.getMessageEventDefinition=function(e){return this.getEventDefinition(e,"bpmn:MessageEventDefinition")},a.getSignalEventDefinition=function(e){return this.getEventDefinition(e,"bpmn:SignalEventDefinition")},a.getErrorEventDefinition=function(e){return this.getEventDefinition(e,"bpmn:ErrorEventDefinition")},a.getEscalationEventDefinition=function(e){return this.getEventDefinition(e,"bpmn:EscalationEventDefinition")},a.getCompensateEventDefinition=function(e){return this.getEventDefinition(e,"bpmn:CompensateEventDefinition")},a.getLinkEventDefinition=function(e){return this.getEventDefinition(e,"bpmn:LinkEventDefinition")},a.getConditionalEventDefinition=function(e){return this.getEventDefinition(e,"bpmn:ConditionalEventDefinition")}},function(e,t,n){"use strict";function i(e){e&&"function"==typeof e.stopPropagation&&e.stopPropagation()}function r(e){return e.originalEvent||e.srcEvent}function o(e,t){i(e),i(r(e))}function a(e){return e.pointers&&e.pointers.length&&(e=e.pointers[0]),e.touches&&e.touches.length&&(e=e.touches[0]),e?{x:e.clientX,y:e.clientY}:null}n.d(t,"a",(function(){return r})),n.d(t,"b",(function(){return o})),n.d(t,"c",(function(){return a}))},function(e,t,n){var i=n(807),r=n(805);e.exports=function(e){return null!=e&&r(e.length)&&!i(e)}},function(e,t,n){"use strict";n.d(t,"c",(function(){return r})),n.d(t,"a",(function(){return o})),n.d(t,"b",(function(){return a}));var i=n(748);function r(e){return!(Object(i.a)(e)||e).button}function o(e){var t=Object(i.a)(e)||e;return!!r(e)&&(/mac/i.test(navigator.platform)?t.metaKey:t.ctrlKey)}function a(e){var t=Object(i.a)(e)||e;return r(e)&&t.shiftKey}},function(e,t,n){"use strict";n.d(t,"b",(function(){return r})),n.d(t,"e",(function(){return o})),n.d(t,"d",(function(){return a})),n.d(t,"c",(function(){return s})),n.d(t,"a",(function(){return c}));n(14);var i=n(721);function r(e,t){return e&&t?Math.sqrt(Math.pow(e.x-t.x,2)+Math.pow(e.y-t.y,2)):-1}function o(e,t,n,i){if(void 0===i&&(i=5),!e||!t||!n)return!1;var o=(t.x-e.x)*(n.y-e.y)-(t.y-e.y)*(n.x-e.x),a=r(e,t);return Math.abs(o/a)<=i}function a(e,t){var n;return function(e,t){var n;n=Object(i.isArray)(e)?e:[e,t];var r=n.slice().shift();return Object(i.every)(n,(function(e){return Math.abs(r.y-e.y)<=2}))}(n=Object(i.isArray)(e)?e:[e,t])?"h":!!function(e,t){var n;n=Object(i.isArray)(e)?e:[e,t];var r=n.slice().shift();return Object(i.every)(n,(function(e){return Math.abs(r.x-e.x)<=2}))}(n)&&"v"}function s(e,t,n){return n=n||0,e.x>t.x-n&&e.y>t.y-n&&e.x<t.x+t.width+n&&e.y<t.y+t.height+n}function c(e,t){return{x:Math.round(e.x+(t.x-e.x)/2),y:Math.round(e.y+(t.y-e.y)/2)}}},function(e,t,n){var i=n(123).default;e.exports=function(e){return null!=e&&"object"==i(e)}},function(e,t,n){var i=n(960),r=n(963);e.exports=function(e,t){var n=r(e,t);return i(n)?n:void 0}},function(e,t,n){var i=n(1036)(n(1037));e.exports=i},function(e,t,n){"use strict";n(1),n(35),n(1),n(35);var i=n(729).escapeHTML;function r(e){for(var t,n=0,r=[],o=/<br\s*\/?>/gi;t=o.exec(e);)t.index>n&&r.push(i(e.substring(n,t.index))),r.push("<br />"),n=t.index+t[0].length;return n<e.length&&r.push(i(e.substring(n))),r.join("")}e.exports=function(e){for(var t,n,i,o=[],a=/(?:\[([^\]]+)\]\((https?:\/\/[^)]+)\))|(?:<a href="(https?:\/\/[^"]+)">(.+?(?=<\/))<\/a>)/gi,s=0;t=a.exec(e);)t.index>s&&o.push(r(e.substring(s,t.index))),n=t[2]&&encodeURI(t[2])||t[3],i=t[1]||t[4],o.push('<a href="'+n+'" target="_blank">'+r(i)+"</a>"),s=t.index+t[0].length;return s<e.length&&o.push(r(e.substring(s))),'<div class="bpp-field-description">'+o.join("")+"</div>"}},,function(e,t,n){"use strict";n.r(t);n(1),n(22);t.default={translate:["value",function(e,t){return t=t||{},e.replace(/{([^}]+)}/g,(function(e,n){return t[n]||"{"+n+"}"}))}]}},function(e,t,n){"use strict";n.d(t,"a",(function(){return o})),n.d(t,"b",(function(){return a}));var i=n(720);function r(e){return Object(i.is)(e,"bpmn:FlowElement")||Object(i.is)(e,"bpmn:Participant")||Object(i.is)(e,"bpmn:Lane")||Object(i.is)(e,"bpmn:SequenceFlow")||Object(i.is)(e,"bpmn:MessageFlow")||Object(i.is)(e,"bpmn:DataInput")||Object(i.is)(e,"bpmn:DataOutput")?"name":Object(i.is)(e,"bpmn:TextAnnotation")?"text":Object(i.is)(e,"bpmn:Group")?"categoryValueRef":void 0}function o(e){var t=e.businessObject,n=r(t);if(n)return"categoryValueRef"===n?function(e){var t=e.categoryValueRef;return t&&t.value||""}(t):t[n]||""}function a(e,t,n){var i=e.businessObject,o=r(i);return o&&("categoryValueRef"===o?i.categoryValueRef.value=t:i[o]=t),e}},function(e,t,n){var i=n(123).default,r=n(948),o=n(991),a=n(763),s=n(734),c=n(1e3);e.exports=function(e){return"function"==typeof e?e:null==e?a:"object"==i(e)?s(e)?o(e[0],e[1]):r(e):c(e)}},function(e,t,n){n(2)({target:"Math",stat:!0},{sign:n(929)})},function(e,t,n){var i=n(762),r=n(938),o=n(939),a=i?i.toStringTag:void 0;e.exports=function(e){return null==e?void 0===e?"[object Undefined]":"[object Null]":a&&a in Object(e)?r(e):o(e)}},function(e,t,n){var i=n(738).Symbol;e.exports=i},function(e,t){e.exports=function(e){return e}},function(e,t,n){"use strict";var i=n(725),r=n(724);e.exports=function(e,t,n,o){var a=o.id||"element-property",s=o.label,c=o.referenceProperty,u=o.modelProperty||"name",p=o.shouldValidate||!1,l=i.textField({id:a,label:s,modelProperty:u,get:function(e,n){var i=t.get(c),r={};return r[u]=i&&i.get(u),r},set:function(e,n,i){var o=t.get(c),a={};return a[u]=n[u]||void 0,r.updateBusinessObject(e,o,a)},hidden:function(e,n){return!t.get(c)}});return p&&(l.validate=function(e,n,i){if(t.get(c)&&!n[u]){var r={};return r[u]="Must provide a value",r}}),[l]}},function(e,t,n){"use strict";var i=n(720).getBusinessObject,r=n(723).query,o=n(723).closest,a=n(723).domify,s=n(731),c=n(732),u=n(724),p=n(729),l=p.escapeHTML;function d(e,t){var n=o(e,"div.bpp-properties-tab");return r("select[name=selectedExtensionElement]"+(t?"[id=cam-extensionElements-"+t+"]":""),n)}function f(e,t){var n=d(e,t);return{value:(n||{}).value,idx:(n||{}).selectedIndex}}e.exports=function(e,t,n,r){var o=n.id,h=n.prefix||"elem",m=n.label||o,v=!1!==n.idGeneration||n.idGeneration,b=n.businessObject||i(e),g=n.modelProperty||"id",y=n.getExtensionElements,x=n.createExtensionElement,O="function"==typeof x,j=n.removeExtensionElement,E="function"==typeof j,_=n.onSelectionChange,w=n.hideExtensionElements,S="function"==typeof w,T=n.setOptionLabelValue,P=n.size||5,C=n.resizable,A=n.reference||void 0,R=function(e,t,n,i){if("function"==typeof _)return _(e,t,n,i)},k=function(e){return'<option value="'+l(e)+'" data-value data-name="extensionElementValue">'+l(e)+"</option>"},B=function(e,t){C&&(e.size=t>P?t:P)};return{id:o,html:'<div class="bpp-row bpp-element-list" '+(S?'data-show="hideElements"':"")+'><label for="cam-extensionElements-'+l(o)+'">'+l(m)+'</label><div class="bpp-field-wrapper"><select id="cam-extensionElements-'+l(o)+'"name="selectedExtensionElement" size="'+l(P)+'" data-list-entry-container data-on-change="selectElement"></select>'+(O?'<button class="add" id="cam-extensionElements-create-'+l(o)+'" data-action="createElement"><span>+</span></button>':"")+(E?'<button class="clear" id="cam-extensionElements-remove-'+l(o)+'" data-action="removeElement" data-disable="disableRemove"><span>-</span></button>':"")+"</div></div>",get:function(e,t){var n=y(e,t),i=[];s(n,(function(e){i.push({extensionElementValue:e.get(g)})}));var r=d(t.parentNode,o);return B(r,i.length),i},set:function(e,n,r){var o=this.__action;delete this.__action,b=b||i(e);var a=A&&b.get(A)?b.get(A):b,s=a.get("extensionElements");if("create-extension-element"===o.id){var p=[];return s||(s=c.createElement("bpmn:ExtensionElements",{values:[]},a,t),p.push(u.updateBusinessObject(e,a,{extensionElements:s}))),p.push(x(e,s,o.value,r)),p}if("remove-extension-element"===o.id)return j(e,s,o.value,o.idx,r)},createListEntryTemplate:function(e,t,n){return B(n,n.options.length+1),k(e.extensionElementValue)},deselect:function(e,t){d(t,o).selectedIndex=-1},getSelected:function(e,t){return f(t,o)},setControlValue:function(e,t,n,i,r,o){t.value=r,T?T(e,t,n,i,r,o):t.text=r},createElement:function(e,t){var n;v&&(n=function(e){return e+="_",p.nextId(e)}(h));var i=d(t,o),r=a(k(n));return i.appendChild(r),i.lastChild.selected="selected",R(e,t),B(i,i.options.length),this.__action={id:"create-extension-element",value:n},!0},removeElement:function(e,t){var n=f(t,o),i=d(t,o);return i.removeChild(i.options[n.idx]),B(i,i.options.length),this.__action={id:"remove-extension-element",value:n.value,idx:n.idx},!0},hideElements:function(e,t,n,i){return!w(e,t,n,i)},disableRemove:function(e,t,n,i){return(f(t,o)||{}).idx<0},selectElement:R}}},function(e,t,n){"use strict";var i=n(721),r=n(723),o=n(750),a=n(727),s=n(776);function c(e){return!0}function u(e,t,n){var u=this;function p(n,i,r){var a,s;(function(e,t){return!(h[e]||o.c)(t)})(n,i)||(r?s=t.getGraphics(r):(a=i.delegateTarget||i.target)&&(s=a,r=t.get(s)),s&&r&&!1===e.fire(n,{element:r,gfx:s,originalEvent:i})&&(i.stopPropagation(),i.preventDefault()))}var l={};function d(e){return l[e]}var f={click:"element.click",contextmenu:"element.contextmenu",dblclick:"element.dblclick",mousedown:"element.mousedown",mousemove:"element.mousemove",mouseover:"element.hover",mouseout:"element.out",mouseup:"element.mouseup"},h={"element.contextmenu":c};function m(e,t,n,i){var o=l[n]=function(e){p(n,e)};i&&(h[n]=i),o.$delegate=r.delegate.bind(e,"svg, .djs-element",t,o)}function v(e,t,n){var i=d(n);i&&r.delegate.unbind(e,t,i.$delegate)}e.on("canvas.destroy",(function(e){var t;t=e.svg,Object(i.forEach)(f,(function(e,n){v(t,n,e)}))})),e.on("canvas.init",(function(e){var t;t=e.svg,Object(i.forEach)(f,(function(e,n){m(t,n,e)}))})),e.on(["shape.added","connection.added"],(function(t){var n=t.element,i=t.gfx;e.fire("interactionEvents.createHit",{element:n,gfx:i})})),e.on(["shape.changed","connection.changed"],500,(function(t){var n=t.element,i=t.gfx;e.fire("interactionEvents.updateHit",{element:n,gfx:i})})),e.on("interactionEvents.createHit",500,(function(e){var t=e.element,n=e.gfx;u.createDefaultHit(t,n)})),e.on("interactionEvents.updateHit",(function(e){var t=e.element,n=e.gfx;u.updateDefaultHit(t,n)}));var b=x("djs-hit djs-hit-stroke"),g=x("djs-hit djs-hit-click-stroke"),y={all:x("djs-hit djs-hit-all"),"click-stroke":g,stroke:b};function x(e,t){return t=Object(i.assign)({stroke:"white",strokeWidth:15},t||{}),n.cls(e,["no-fill","no-border"],t)}function O(e,t){var n=y[t];if(!n)throw new Error("invalid hit type <"+t+">");return Object(a.b)(e,n),e}function j(e,t){Object(a.a)(e,t)}this.removeHits=function(e){var t=Object(r.queryAll)(".djs-hit",e);Object(i.forEach)(t,a.j)},this.createDefaultHit=function(e,t){var n,i=e.waypoints,r=e.isFrame;return i?this.createWaypointsHit(t,i):(n=r?"stroke":"all",this.createBoxHit(t,n,{width:e.width,height:e.height}))},this.createWaypointsHit=function(e,t){var n=Object(s.b)(t);return O(n,"stroke"),j(e,n),n},this.createBoxHit=function(e,t,n){n=Object(i.assign)({x:0,y:0},n);var r=Object(a.f)("rect");return O(r,t),Object(a.b)(r,n),j(e,r),r},this.updateDefaultHit=function(e,t){var n=Object(r.query)(".djs-hit",t);if(n)return e.waypoints?Object(s.c)(n,e.waypoints):Object(a.b)(n,{width:e.width,height:e.height}),n},this.fire=p,this.triggerMouseEvent=function(e,t,n){var i=f[e];if(!i)throw new Error("unmapped DOM event name <"+e+">");return p(i,t,n)},this.mouseHandler=d,this.registerEvent=m,this.unregisterEvent=v}u.$inject=["eventBus","elementRegistry","styles"];t.a={__init__:["interactionEvents"],interactionEvents:["type",u]}},,,,,,,,,,function(e,t,n){"use strict";n.d(t,"a",(function(){return r})),n.d(t,"b",(function(){return a})),n.d(t,"c",(function(){return s}));n(1),n(22),n(35);var i=n(727);function r(e){return e.join(",").replace(/,?([A-z]),?/g,"$1")}function o(e){for(var t,n="",i=0;t=e[i];i++)n+=t.x+","+t.y+" ";return n}function a(e,t){var n=Object(i.f)("polyline");return Object(i.b)(n,{points:o(e)}),t&&Object(i.b)(n,t),n}function s(e,t){return Object(i.b)(e,{points:o(t)}),e}},function(e,t,n){var i=n(844),r=n(944)(i);e.exports=r},function(e,t,n){var i=n(937),r=n(752),o=Object.prototype,a=o.hasOwnProperty,s=o.propertyIsEnumerable,c=i(function(){return arguments}())?i:function(e){return r(e)&&a.call(e,"callee")&&!s.call(e,"callee")};e.exports=c},function(e,t,n){(function(e){var i=n(123).default,r=n(738),o=n(940),a="object"==i(t)&&t&&!t.nodeType&&t,s=a&&"object"==i(e)&&e&&!e.nodeType&&e,c=s&&s.exports===a?r.Buffer:void 0,u=(c?c.isBuffer:void 0)||o;e.exports=u}).call(this,n(177)(e))},function(e,t,n){var i=n(123).default,r=/^(?:0|[1-9]\d*)$/;e.exports=function(e,t){var n=i(e);return!!(t=null==t?9007199254740991:t)&&("number"==n||"symbol"!=n&&r.test(e))&&e>-1&&e%1==0&&e<t}},function(e,t,n){var i=n(941),r=n(846),o=n(942),a=o&&o.isTypedArray,s=a?r(a):i;e.exports=s},function(e,t,n){var i=n(743),r=Object.create,o=function(){function e(){}return function(t){if(!i(t))return{};if(r)return r(t);e.prototype=t;var n=new e;return e.prototype=void 0,n}}();e.exports=o},function(e,t,n){var i=n(950),r=n(951),o=n(952),a=n(953),s=n(954);function c(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var i=e[t];this.set(i[0],i[1])}}c.prototype.clear=i,c.prototype.delete=r,c.prototype.get=o,c.prototype.has=a,c.prototype.set=s,e.exports=c},function(e,t,n){var i=n(785);e.exports=function(e,t){for(var n=e.length;n--;)if(i(e[n][0],t))return n;return-1}},function(e,t){e.exports=function(e,t){return e===t||e!=e&&t!=t}},function(e,t,n){var i=n(753)(Object,"create");e.exports=i},function(e,t,n){n(33),n(33);var i=n(972);e.exports=function(e,t){var n=e.__data__;return i(t)?n["string"==typeof t?"string":"hash"]:n.map}},function(e,t,n){var i=n(123).default,r=n(761),o=n(752);e.exports=function(e){return"symbol"==i(e)||o(e)&&"[object Symbol]"==r(e)}},function(e,t){e.exports=function(e,t){for(var n=-1,i=null==e?0:e.length,r=Array(i);++n<i;)r[n]=t(e[n],n,e);return r}},function(e,t,n){var i=n(788);e.exports=function(e){if("string"==typeof e||i(e))return e;var t=e+"";return"0"==t&&1/e==-1/0?"-0":t}},function(e,t,n){var i=n(813),r=n(1009),o=n(759),a=n(734);e.exports=function(e,t){return(a(e)?i:r)(e,o(t,3))}},function(e,t,n){var i=n(782),r=n(743);e.exports=function(e){return function(){var t=arguments;switch(t.length){case 0:return new e;case 1:return new e(t[0]);case 2:return new e(t[0],t[1]);case 3:return new e(t[0],t[1],t[2]);case 4:return new e(t[0],t[1],t[2],t[3]);case 5:return new e(t[0],t[1],t[2],t[3],t[4]);case 6:return new e(t[0],t[1],t[2],t[3],t[4],t[5]);case 7:return new e(t[0],t[1],t[2],t[3],t[4],t[5],t[6])}var n=i(e.prototype),o=e.apply(n,t);return r(o)?o:n}}},function(e,t){e.exports=function(e,t){for(var n=-1,i=e.length,r=0,o=[];++n<i;){var a=e[n];a!==t&&"__lodash_placeholder__"!==a||(e[n]="__lodash_placeholder__",o[r++]=n)}return o}},function(e,t,n){"use strict";n(6),n(10),n(6),n(10);var i=n(724),r=n(723).query,o=n(723).domify,a=n(723).attr,s=n(731),c=n(754),u=n(732),p=n(729),l=p.escapeHTML,d="select[name=selectedElement]";e.exports=function(e,t,n,f){var h=f.elementName||"",m=f.elementType,v=f.referenceProperty,b=f.newElementIdPrefix||"elem_",g=f.label||"",y=f.description||"",x=[];return x.push({id:"event-definitions-"+h,description:y,html:'<div class="bpp-row bpp-select"><label for="camunda-'+l(h)+'">'+l(g)+'</label><div class="bpp-field-wrapper"><select id="camunda-'+l(h)+'" name="selectedElement" data-value></select><button class="add" id="addElement" data-action="addElement"><span>+</span></button></div></div>',get:function(e,n){p.updateOptionsDropDown(d,t,m,n);var i=t.get(v);return{selectedElement:i&&i.id||""}},set:function(e,r){var o=r.selectedElement,a={};if(!o||void 0===o)return a[v]=void 0,i.updateBusinessObject(e,t,a);var s,l,d,f,h=[],b=(s=t,l=m,d=o,f=p.findRootElementsByType(s,l),c(f,(function(e){return e.id===d})));if(!b){var g=p.getRoot(t);b=u.createElement(m,{name:o},g,n),h.push(i.addAndRemoveElementsFromList(e,g,"rootElements",null,[b]))}return a[v]=b,h.push(i.updateBusinessObject(e,t,a)),h},addElement:function(e,t){var n=p.nextId(b),i=o('<option value="'+l(n)+'"> (id='+l(n)+")</option>"),c=r(d,t.parentElement);return c.insertBefore(i,c.firstChild),s(c,(function(e){e.value===n?a(e,"selected","selected"):a(e,"selected",null)})),!0}}),x}},function(e,t,n){"use strict";var i=n(720),r=i.is,o=i.getBusinessObject,a=n(739),s=n(746),c={};function u(e,t,n){var i=a.getExtensionElements(e,t)||[];return n?(i[0]||{})[n]||[]:i}function p(e,t,n){var i=c.getInputOutput(e,n);return i&&i.get(t)||[]}e.exports=c,c.getInputOutput=function(e,t){if(!t)return(u(o(e),"camunda:InputOutput")||[])[0];var n=this.getConnector(e);return n&&n.get("inputOutput")},c.getConnector=function(e){var t=s.getServiceTaskLikeBusinessObject(e);return t&&(u(t,"camunda:Connector")||[])[0]},c.getInputParameters=function(e,t){return p.apply(this,[e,"inputParameters",t])},c.getOutputParameters=function(e,t){return p.apply(this,[e,"outputParameters",t])},c.getInputParameter=function(e,t,n){return this.getInputParameters(e,t)[n]},c.getOutputParameter=function(e,t,n){return this.getOutputParameters(e,t)[n]},c.isInputOutputSupported=function(e,t){if(t)return!0;var n=o(e);return r(n,"bpmn:FlowNode")&&!(r(n,"bpmn:StartEvent")||r(n,"bpmn:Gateway")||r(n,"bpmn:BoundaryEvent")||r(n,"bpmn:SubProcess")&&n.get("triggeredByEvent"))},c.areOutputParametersSupported=function(e,t){var n=o(e);return t||!r(n,"bpmn:EndEvent")&&!n.loopCharacteristics}},function(e,t,n){"use strict";var i=n(723).query,r=n(729).escapeHTML,o=n(729);function a(e){return o.selectedType("select[name=scriptType]",e.parentElement)}e.exports=function(e,t,n,o){return{template:'<div class="bpp-row bpp-textfield"><label for="cam-script-format">'+r(o("Script Format"))+'</label><div class="bpp-field-wrapper"><input id="cam-script-format" type="text" name="scriptFormat" /><button class="clear" data-action="script.clearScriptFormat" data-show="script.canClearScriptFormat"><span>X</span></button></div></div><div class="bpp-row"><label for="cam-script-type">'+r(o("Script Type"))+'</label><div class="bpp-field-wrapper"><select id="cam-script-type" name="scriptType" data-value><option value="script" selected>'+r(o("Inline Script"))+'</option><option value="scriptResource">'+r(o("External Resource"))+'</option></select></div></div><div class="bpp-row bpp-textfield"><label for="cam-script-resource-val" data-show="script.isScriptResource">'+r(o("Resource"))+'</label><div class="bpp-field-wrapper" data-show="script.isScriptResource"><input id="cam-script-resource-val" type="text" name="scriptResourceValue" /><button class="clear" data-action="script.clearScriptResource" data-show="script.canClearScriptResource"><span>X</span></button></div></div><div class="bpp-row"><label for="cam-script-val" data-show="script.isScript">'+r(o("Script"))+'</label><div class="bpp-field-wrapper" data-show="script.isScript"><textarea id="cam-script-val" type="text" name="scriptValue"></textarea></div></div>',get:function(n,i){var r={},o=i.get("camunda:resource"),a=i.get(t),s=i.get(e);return void 0!==o?(r.scriptResourceValue=o,r.scriptType="scriptResource"):(r.scriptValue=a,r.scriptType="script"),r.scriptFormat=s,r},set:function(i,r,o){var a=r.scriptFormat,s=r.scriptType,c=r.scriptResourceValue,u=r.scriptValue,p={"camunda:resource":void 0};return p[t]=void 0,p[e]=void 0,n?p[e]=a||"":""!==a&&(p[e]=a),"scriptResource"===s?p["camunda:resource"]=c||"":p[t]=u||"",p},validate:function(e,t){var i={};return"script"!==t.scriptType||t.scriptValue||(i.scriptValue=o("Must provide a value")),"scriptResource"!==t.scriptType||t.scriptResourceValue||(i.scriptResourceValue=o("Must provide a value")),!n||t.scriptFormat&&0!==t.scriptFormat.length||(i.scriptFormat=o("Must provide a value")),i},clearScriptFormat:function(e,t,n,r){return i("input[name=scriptFormat]",r).value="",!0},canClearScriptFormat:function(e,t,n,r){return""!==i("input[name=scriptFormat]",r).value},clearScriptResource:function(e,t,n,r){return i("input[name=scriptResourceValue]",r).value="",!0},canClearScriptResource:function(e,t,n,r){return""!==i("input[name=scriptResourceValue]",r).value},clearScript:function(e,t,n,r){return i("textarea[name=scriptValue]",r).value="",!0},canClearScript:function(e,t,n,r){return""!==i("textarea[name=scriptValue]",r).value},isScriptResource:function(e,t,n,i){return"scriptResource"===a(i)},isScript:function(e,t,n,i){return"script"===a(i)}}}},,function(e,t,n){"use strict";n.d(t,"a",(function(){return F}));var i=n(722),r=n.n(i),o=(n(1),n(22),n(543),n(35),n(33),n(23),n(721)),a=n(799),s=n(733),c=n(758),u=n(720),p=n(776),l=n(841),d=n(723),f=n(727),h=n(741),m=new(n(802).default);function v(e,t,n,i,r,u,v){a.a.call(this,t,v);var b=e&&e.defaultFillColor,g=e&&e.defaultStrokeColor,y=m.next(),x={},O=n.computeStyle;function j(e,t){var n=Object(o.assign)({fill:"black",strokeWidth:1,strokeLinecap:"round",strokeDasharray:"none"},t.attrs),i=t.ref||{x:0,y:0},a=t.scale||1;"none"===n.strokeDasharray&&(n.strokeDasharray=[1e4,1]);var s=Object(f.f)("marker");Object(f.b)(t.element,n),Object(f.a)(s,t.element),Object(f.b)(s,{id:e,viewBox:"0 0 20 20",refX:i.x,refY:i.y,markerWidth:20*a,markerHeight:20*a,orient:"auto"});var c=Object(d.query)("defs",r._svg);c||(c=Object(f.f)("defs"),Object(f.a)(r._svg,c)),Object(f.a)(c,s),x[e]=s}function E(e){return e.replace(/[^0-9a-zA-z]+/g,"_")}function _(e,t,n){var i=e+"-"+E(t)+"-"+E(n)+"-"+y;return x[i]||function(e,t,n,i){if("sequenceflow-end"===t){var r=Object(f.f)("path");Object(f.b)(r,{d:"M 1 5 L 11 10 L 1 15 Z"}),j(e,{element:r,ref:{x:11,y:10},scale:.5,attrs:{fill:i,stroke:i}})}if("messageflow-start"===t){var o=Object(f.f)("circle");Object(f.b)(o,{cx:6,cy:6,r:3.5}),j(e,{element:o,attrs:{fill:n,stroke:i},ref:{x:6,y:6}})}if("messageflow-end"===t){var a=Object(f.f)("path");Object(f.b)(a,{d:"m 1 5 l 0 -3 l 7 3 l -7 3 z"}),j(e,{element:a,attrs:{fill:n,stroke:i,strokeLinecap:"butt"},ref:{x:8.5,y:5}})}if("association-start"===t){var s=Object(f.f)("path");Object(f.b)(s,{d:"M 11 5 L 1 10 L 11 15"}),j(e,{element:s,attrs:{fill:"none",stroke:i,strokeWidth:1.5},ref:{x:1,y:10},scale:.5})}if("association-end"===t){var c=Object(f.f)("path");Object(f.b)(c,{d:"M 1 5 L 11 10 L 1 15"}),j(e,{element:c,attrs:{fill:"none",stroke:i,strokeWidth:1.5},ref:{x:12,y:10},scale:.5})}if("conditional-flow-marker"===t){var u=Object(f.f)("path");Object(f.b)(u,{d:"M 0 10 L 8 6 L 16 10 L 8 14 Z"}),j(e,{element:u,attrs:{fill:n,stroke:i},ref:{x:-1,y:10},scale:.5})}if("conditional-default-flow-marker"===t){var p=Object(f.f)("path");Object(f.b)(p,{d:"M 6 4 L 10 16"}),j(e,{element:p,attrs:{stroke:i},ref:{x:0,y:10},scale:.5})}}(i,e,t,n),"url(#"+i+")"}function w(e,t,n,i,r){Object(o.isObject)(i)&&(r=i,i=0),i=i||0,"none"===(r=O(r,{stroke:"black",strokeWidth:2,fill:"white"})).fill&&delete r.fillOpacity;var a=t/2,s=n/2,c=Object(f.f)("circle");return Object(f.b)(c,{cx:a,cy:s,r:Math.round((t+n)/4-i)}),Object(f.b)(c,r),Object(f.a)(e,c),c}function S(e,t,n,i,r,a){Object(o.isObject)(r)&&(a=r,r=0),r=r||0,a=O(a,{stroke:"black",strokeWidth:2,fill:"white"});var s=Object(f.f)("rect");return Object(f.b)(s,{x:r,y:r,width:t-2*r,height:n-2*r,rx:i,ry:i}),Object(f.b)(s,a),Object(f.a)(e,s),s}function T(e,t,n){n=O(n,["no-fill"],{stroke:"black",strokeWidth:2,fill:"none"});var i=Object(p.b)(t,n);return Object(f.a)(e,i),i}function P(e,t,n){n=O(n,["no-fill"],{strokeWidth:2,stroke:"black"});var i=Object(f.f)("path");return Object(f.b)(i,{d:t}),Object(f.b)(i,n),Object(f.a)(e,i),i}function C(e,t,n,i){return P(t,n,Object(o.assign)({"data-marker":e},i))}function A(e){return function(t,n){return L[e](t,n)}}function R(e){return L[e]}function k(e,t){var n=Object(l.g)(e),i=Object(l.j)(n);return n.eventDefinitions&&n.eventDefinitions.length>1?n.parallelMultiple?R("bpmn:ParallelMultipleEventDefinition")(t,e,i):R("bpmn:MultipleEventDefinition")(t,e,i):Object(l.k)(n,"bpmn:MessageEventDefinition")?R("bpmn:MessageEventDefinition")(t,e,i):Object(l.k)(n,"bpmn:TimerEventDefinition")?R("bpmn:TimerEventDefinition")(t,e,i):Object(l.k)(n,"bpmn:ConditionalEventDefinition")?R("bpmn:ConditionalEventDefinition")(t,e):Object(l.k)(n,"bpmn:SignalEventDefinition")?R("bpmn:SignalEventDefinition")(t,e,i):Object(l.k)(n,"bpmn:EscalationEventDefinition")?R("bpmn:EscalationEventDefinition")(t,e,i):Object(l.k)(n,"bpmn:LinkEventDefinition")?R("bpmn:LinkEventDefinition")(t,e,i):Object(l.k)(n,"bpmn:ErrorEventDefinition")?R("bpmn:ErrorEventDefinition")(t,e,i):Object(l.k)(n,"bpmn:CancelEventDefinition")?R("bpmn:CancelEventDefinition")(t,e,i):Object(l.k)(n,"bpmn:CompensateEventDefinition")?R("bpmn:CompensateEventDefinition")(t,e,i):Object(l.k)(n,"bpmn:TerminateEventDefinition")?R("bpmn:TerminateEventDefinition")(t,e,i):null}function B(e,t,n){n=Object(o.assign)({size:{width:100}},n);var i=u.createText(t||"",n);return Object(f.c)(i).add("djs-label"),Object(f.a)(e,i),i}function M(e,t,n){return B(e,Object(l.g)(t).name,{box:t,align:n,padding:5,style:{fill:Object(l.h)(t,g)}})}function D(e,t,n){var i=B(e,t,{box:{height:30,width:n.height},align:"center-middle",style:{fill:Object(l.h)(n,g)}}),r=-1*n.height;Object(h.b)(i,0,-r,270)}function N(e){for(var t=e.waypoints,n="m "+t[0].x+","+t[0].y,i=1;i<t.length;i++)n+="L"+t[i].x+","+t[i].y+" ";return n}var L=this.handlers={"bpmn:Event":function(e,t,n){return"fillOpacity"in n||(n.fillOpacity=.95),w(e,t.width,t.height,n)},"bpmn:StartEvent":function(e,t){var n={fill:Object(l.d)(t,b),stroke:Object(l.h)(t,g)};Object(l.g)(t).isInterrupting||(n={strokeDasharray:"6",strokeLinecap:"round",fill:Object(l.d)(t,b),stroke:Object(l.h)(t,g)});var i=R("bpmn:Event")(e,t,n);return k(t,e),i},"bpmn:MessageEventDefinition":function(e,t,n){return P(e,i.getScaledPath("EVENT_MESSAGE",{xScaleFactor:.9,yScaleFactor:.9,containerWidth:t.width,containerHeight:t.height,position:{mx:.235,my:.315}}),{strokeWidth:1,fill:n?Object(l.h)(t,g):Object(l.d)(t,b),stroke:n?Object(l.d)(t,b):Object(l.h)(t,g)})},"bpmn:TimerEventDefinition":function(e,t){var n=w(e,t.width,t.height,.2*t.height,{strokeWidth:2,fill:Object(l.d)(t,b),stroke:Object(l.h)(t,g)});P(e,i.getScaledPath("EVENT_TIMER_WH",{xScaleFactor:.75,yScaleFactor:.75,containerWidth:t.width,containerHeight:t.height,position:{mx:.5,my:.5}}),{strokeWidth:2,strokeLinecap:"square",stroke:Object(l.h)(t,g)});for(var r=0;r<12;r++){var o=i.getScaledPath("EVENT_TIMER_LINE",{xScaleFactor:.75,yScaleFactor:.75,containerWidth:t.width,containerHeight:t.height,position:{mx:.5,my:.5}}),a=t.width/2;P(e,o,{strokeWidth:1,strokeLinecap:"square",transform:"rotate("+30*r+","+t.height/2+","+a+")",stroke:Object(l.h)(t,g)})}return n},"bpmn:EscalationEventDefinition":function(e,t,n){return P(e,i.getScaledPath("EVENT_ESCALATION",{xScaleFactor:1,yScaleFactor:1,containerWidth:t.width,containerHeight:t.height,position:{mx:.5,my:.2}}),{strokeWidth:1,fill:n?Object(l.h)(t,g):"none",stroke:Object(l.h)(t,g)})},"bpmn:ConditionalEventDefinition":function(e,t){return P(e,i.getScaledPath("EVENT_CONDITIONAL",{xScaleFactor:1,yScaleFactor:1,containerWidth:t.width,containerHeight:t.height,position:{mx:.5,my:.222}}),{strokeWidth:1,stroke:Object(l.h)(t,g)})},"bpmn:LinkEventDefinition":function(e,t,n){return P(e,i.getScaledPath("EVENT_LINK",{xScaleFactor:1,yScaleFactor:1,containerWidth:t.width,containerHeight:t.height,position:{mx:.57,my:.263}}),{strokeWidth:1,fill:n?Object(l.h)(t,g):"none",stroke:Object(l.h)(t,g)})},"bpmn:ErrorEventDefinition":function(e,t,n){return P(e,i.getScaledPath("EVENT_ERROR",{xScaleFactor:1.1,yScaleFactor:1.1,containerWidth:t.width,containerHeight:t.height,position:{mx:.2,my:.722}}),{strokeWidth:1,fill:n?Object(l.h)(t,g):"none",stroke:Object(l.h)(t,g)})},"bpmn:CancelEventDefinition":function(e,t,n){var r=P(e,i.getScaledPath("EVENT_CANCEL_45",{xScaleFactor:1,yScaleFactor:1,containerWidth:t.width,containerHeight:t.height,position:{mx:.638,my:-.055}}),{strokeWidth:1,fill:n?Object(l.h)(t,g):"none",stroke:Object(l.h)(t,g)});return Object(h.a)(r,45),r},"bpmn:CompensateEventDefinition":function(e,t,n){return P(e,i.getScaledPath("EVENT_COMPENSATION",{xScaleFactor:1,yScaleFactor:1,containerWidth:t.width,containerHeight:t.height,position:{mx:.22,my:.5}}),{strokeWidth:1,fill:n?Object(l.h)(t,g):"none",stroke:Object(l.h)(t,g)})},"bpmn:SignalEventDefinition":function(e,t,n){return P(e,i.getScaledPath("EVENT_SIGNAL",{xScaleFactor:.9,yScaleFactor:.9,containerWidth:t.width,containerHeight:t.height,position:{mx:.5,my:.2}}),{strokeWidth:1,fill:n?Object(l.h)(t,g):"none",stroke:Object(l.h)(t,g)})},"bpmn:MultipleEventDefinition":function(e,t,n){return P(e,i.getScaledPath("EVENT_MULTIPLE",{xScaleFactor:1.1,yScaleFactor:1.1,containerWidth:t.width,containerHeight:t.height,position:{mx:.222,my:.36}}),{strokeWidth:1,fill:n?Object(l.h)(t,g):"none"})},"bpmn:ParallelMultipleEventDefinition":function(e,t){return P(e,i.getScaledPath("EVENT_PARALLEL_MULTIPLE",{xScaleFactor:1.2,yScaleFactor:1.2,containerWidth:t.width,containerHeight:t.height,position:{mx:.458,my:.194}}),{strokeWidth:1,fill:Object(l.h)(t,g),stroke:Object(l.h)(t,g)})},"bpmn:EndEvent":function(e,t){var n=R("bpmn:Event")(e,t,{strokeWidth:4,fill:Object(l.d)(t,b),stroke:Object(l.h)(t,g)});return k(t,e),n},"bpmn:TerminateEventDefinition":function(e,t){return w(e,t.width,t.height,8,{strokeWidth:4,fill:Object(l.h)(t,g),stroke:Object(l.h)(t,g)})},"bpmn:IntermediateEvent":function(e,t){var n=R("bpmn:Event")(e,t,{strokeWidth:1,fill:Object(l.d)(t,b),stroke:Object(l.h)(t,g)});return w(e,t.width,t.height,3,{strokeWidth:1,fill:Object(l.d)(t,"none"),stroke:Object(l.h)(t,g)}),k(t,e),n},"bpmn:IntermediateCatchEvent":A("bpmn:IntermediateEvent"),"bpmn:IntermediateThrowEvent":A("bpmn:IntermediateEvent"),"bpmn:Activity":function(e,t,n){return"fillOpacity"in(n=n||{})||(n.fillOpacity=.95),S(e,t.width,t.height,10,n)},"bpmn:Task":function(e,t){var n={fill:Object(l.d)(t,b),stroke:Object(l.h)(t,g)},i=R("bpmn:Activity")(e,t,n);return M(e,t,"center-middle"),I(e,t),i},"bpmn:ServiceTask":function(e,t){var n=R("bpmn:Task")(e,t);return P(e,i.getScaledPath("TASK_TYPE_SERVICE",{abspos:{x:12,y:18}}),{strokeWidth:1,fill:Object(l.d)(t,b),stroke:Object(l.h)(t,g)}),P(e,i.getScaledPath("TASK_TYPE_SERVICE_FILL",{abspos:{x:17.2,y:18}}),{strokeWidth:0,fill:Object(l.d)(t,b)}),P(e,i.getScaledPath("TASK_TYPE_SERVICE",{abspos:{x:17,y:22}}),{strokeWidth:1,fill:Object(l.d)(t,b),stroke:Object(l.h)(t,g)}),n},"bpmn:UserTask":function(e,t){var n=R("bpmn:Task")(e,t);return P(e,i.getScaledPath("TASK_TYPE_USER_1",{abspos:{x:15,y:12}}),{strokeWidth:.5,fill:Object(l.d)(t,b),stroke:Object(l.h)(t,g)}),P(e,i.getScaledPath("TASK_TYPE_USER_2",{abspos:{x:15,y:12}}),{strokeWidth:.5,fill:Object(l.d)(t,b),stroke:Object(l.h)(t,g)}),P(e,i.getScaledPath("TASK_TYPE_USER_3",{abspos:{x:15,y:12}}),{strokeWidth:.5,fill:Object(l.h)(t,g),stroke:Object(l.h)(t,g)}),n},"bpmn:ManualTask":function(e,t){var n=R("bpmn:Task")(e,t);return P(e,i.getScaledPath("TASK_TYPE_MANUAL",{abspos:{x:17,y:15}}),{strokeWidth:.5,fill:Object(l.d)(t,b),stroke:Object(l.h)(t,g)}),n},"bpmn:SendTask":function(e,t){var n=R("bpmn:Task")(e,t);return P(e,i.getScaledPath("TASK_TYPE_SEND",{xScaleFactor:1,yScaleFactor:1,containerWidth:21,containerHeight:14,position:{mx:.285,my:.357}}),{strokeWidth:1,fill:Object(l.h)(t,g),stroke:Object(l.d)(t,b)}),n},"bpmn:ReceiveTask":function(e,t){var n,r=Object(l.g)(t),o=R("bpmn:Task")(e,t);return r.instantiate?(w(e,28,28,4.4,{strokeWidth:1}),n=i.getScaledPath("TASK_TYPE_INSTANTIATING_SEND",{abspos:{x:7.77,y:9.52}})):n=i.getScaledPath("TASK_TYPE_SEND",{xScaleFactor:.9,yScaleFactor:.9,containerWidth:21,containerHeight:14,position:{mx:.3,my:.4}}),P(e,n,{strokeWidth:1,fill:Object(l.d)(t,b),stroke:Object(l.h)(t,g)}),o},"bpmn:ScriptTask":function(e,t){var n=R("bpmn:Task")(e,t);return P(e,i.getScaledPath("TASK_TYPE_SCRIPT",{abspos:{x:15,y:20}}),{strokeWidth:1,stroke:Object(l.h)(t,g)}),n},"bpmn:BusinessRuleTask":function(e,t){var n=R("bpmn:Task")(e,t),r=P(e,i.getScaledPath("TASK_TYPE_BUSINESS_RULE_HEADER",{abspos:{x:8,y:8}}));Object(f.b)(r,{strokeWidth:1,fill:Object(l.d)(t,"#aaaaaa"),stroke:Object(l.h)(t,g)});var o=P(e,i.getScaledPath("TASK_TYPE_BUSINESS_RULE_MAIN",{abspos:{x:8,y:8}}));return Object(f.b)(o,{strokeWidth:1,stroke:Object(l.h)(t,g)}),n},"bpmn:SubProcess":function(e,t,n){n=Object(o.assign)({fill:Object(l.d)(t,b),stroke:Object(l.h)(t,g)},n);var i=R("bpmn:Activity")(e,t,n),r=Object(s.isExpanded)(t);return Object(s.isEventSubProcess)(t)&&Object(f.b)(i,{strokeDasharray:"1,2"}),M(e,t,r?"center-top":"center-middle"),r?I(e,t):I(e,t,["SubProcessMarker"]),i},"bpmn:AdHocSubProcess":function(e,t){return R("bpmn:SubProcess")(e,t)},"bpmn:Transaction":function(e,t){var i=R("bpmn:SubProcess")(e,t),r=n.style(["no-fill","no-events"],{stroke:Object(l.h)(t,g)});return S(e,t.width,t.height,8,3,r),i},"bpmn:CallActivity":function(e,t){return R("bpmn:SubProcess")(e,t,{strokeWidth:5})},"bpmn:Participant":function(e,t){var n={fillOpacity:.95,fill:Object(l.d)(t,b),stroke:Object(l.h)(t,g)},i=R("bpmn:Lane")(e,t,n);Object(s.isExpanded)(t)?(T(e,[{x:30,y:0},{x:30,y:t.height}],{stroke:Object(l.h)(t,g)}),D(e,Object(l.g)(t).name,t)):B(e,Object(l.g)(t).name,{box:t,align:"center-middle",style:{fill:Object(l.h)(t,g)}});return!!Object(l.g)(t).participantMultiplicity&&R("ParticipantMultiplicityMarker")(e,t),i},"bpmn:Lane":function(e,t,n){var i=S(e,t.width,t.height,0,Object(o.assign)({fill:Object(l.d)(t,b),fillOpacity:.35,stroke:Object(l.h)(t,g)},n)),r=Object(l.g)(t);"bpmn:Lane"===r.$type&&D(e,r.name,t);return i},"bpmn:InclusiveGateway":function(e,t){var n=R("bpmn:Gateway")(e,t);return w(e,t.width,t.height,.24*t.height,{strokeWidth:2.5,fill:Object(l.d)(t,b),stroke:Object(l.h)(t,g)}),n},"bpmn:ExclusiveGateway":function(e,t){var n=R("bpmn:Gateway")(e,t),r=i.getScaledPath("GATEWAY_EXCLUSIVE",{xScaleFactor:.4,yScaleFactor:.4,containerWidth:t.width,containerHeight:t.height,position:{mx:.32,my:.3}});return Object(l.b)(t).isMarkerVisible&&P(e,r,{strokeWidth:1,fill:Object(l.h)(t,g),stroke:Object(l.h)(t,g)}),n},"bpmn:ComplexGateway":function(e,t){var n=R("bpmn:Gateway")(e,t);return P(e,i.getScaledPath("GATEWAY_COMPLEX",{xScaleFactor:.5,yScaleFactor:.5,containerWidth:t.width,containerHeight:t.height,position:{mx:.46,my:.26}}),{strokeWidth:1,fill:Object(l.h)(t,g),stroke:Object(l.h)(t,g)}),n},"bpmn:ParallelGateway":function(e,t){var n=R("bpmn:Gateway")(e,t);return P(e,i.getScaledPath("GATEWAY_PARALLEL",{xScaleFactor:.6,yScaleFactor:.6,containerWidth:t.width,containerHeight:t.height,position:{mx:.46,my:.2}}),{strokeWidth:1,fill:Object(l.h)(t,g),stroke:Object(l.h)(t,g)}),n},"bpmn:EventBasedGateway":function(e,t){var n=Object(l.g)(t),r=R("bpmn:Gateway")(e,t);w(e,t.width,t.height,.2*t.height,{strokeWidth:1,fill:"none",stroke:Object(l.h)(t,g)});var o=n.eventGatewayType,a=!!n.instantiate;if("Parallel"===o){var s=i.getScaledPath("GATEWAY_PARALLEL",{xScaleFactor:.4,yScaleFactor:.4,containerWidth:t.width,containerHeight:t.height,position:{mx:.474,my:.296}}),c=P(e,s);Object(f.b)(c,{strokeWidth:1,fill:"none"})}else if("Exclusive"===o){if(!a){var u=w(e,t.width,t.height,.26*t.height);Object(f.b)(u,{strokeWidth:1,fill:"none",stroke:Object(l.h)(t,g)})}!function(){var n=i.getScaledPath("GATEWAY_EVENT_BASED",{xScaleFactor:.18,yScaleFactor:.18,containerWidth:t.width,containerHeight:t.height,position:{mx:.36,my:.44}}),r={strokeWidth:2,fill:Object(l.d)(t,"none"),stroke:Object(l.h)(t,g)};P(e,n,r)}()}return r},"bpmn:Gateway":function(e,t){var n={fill:Object(l.d)(t,b),fillOpacity:.95,stroke:Object(l.h)(t,g)};return function(e,t,n,i){var r=t/2,o=n/2,a=[{x:r,y:0},{x:t,y:o},{x:r,y:n},{x:0,y:o}].map((function(e){return e.x+","+e.y})).join(" ");i=O(i,{stroke:"black",strokeWidth:2,fill:"white"});var s=Object(f.f)("polygon");return Object(f.b)(s,{points:a}),Object(f.b)(s,i),Object(f.a)(e,s),s}(e,t.width,t.height,n)},"bpmn:SequenceFlow":function(e,t){var n,i=N(t),r=Object(l.d)(t,b),o=Object(l.h)(t,g),a=P(e,i,{strokeLinejoin:"round",markerEnd:_("sequenceflow-end",r,o),stroke:Object(l.h)(t,g)}),s=Object(l.g)(t);return t.source&&(n=t.source.businessObject,s.conditionExpression&&n.$instanceOf("bpmn:Activity")&&Object(f.b)(a,{markerStart:_("conditional-flow-marker",r,o)}),n.default&&(n.$instanceOf("bpmn:Gateway")||n.$instanceOf("bpmn:Activity"))&&n.default===s&&Object(f.b)(a,{markerStart:_("conditional-default-flow-marker",r,o)})),a},"bpmn:Association":function(e,t,n){var i=Object(l.g)(t),r=Object(l.d)(t,b),a=Object(l.h)(t,g);return n=Object(o.assign)({strokeDasharray:"0.5, 5",strokeLinecap:"round",strokeLinejoin:"round",stroke:Object(l.h)(t,g)},n||{}),"One"!==i.associationDirection&&"Both"!==i.associationDirection||(n.markerEnd=_("association-end",r,a)),"Both"===i.associationDirection&&(n.markerStart=_("association-start",r,a)),T(e,t.waypoints,n)},"bpmn:DataInputAssociation":function(e,t){var n=Object(l.d)(t,b),i=Object(l.h)(t,g);return R("bpmn:Association")(e,t,{markerEnd:_("association-end",n,i)})},"bpmn:DataOutputAssociation":function(e,t){var n=Object(l.d)(t,b),i=Object(l.h)(t,g);return R("bpmn:Association")(e,t,{markerEnd:_("association-end",n,i)})},"bpmn:MessageFlow":function(e,t){var n=Object(l.g)(t),r=Object(l.b)(t),o=Object(l.d)(t,b),a=Object(l.h)(t,g),s=P(e,N(t),{markerEnd:_("messageflow-end",o,a),markerStart:_("messageflow-start",o,a),strokeDasharray:"10, 12",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.5px",stroke:Object(l.h)(t,g)});if(n.messageRef){var c=s.getPointAtLength(s.getTotalLength()/2),u=i.getScaledPath("MESSAGE_FLOW_MARKER",{abspos:{x:c.x,y:c.y}}),p={strokeWidth:1};"initiating"===r.messageVisibleKind?(p.fill="white",p.stroke="black"):(p.fill="#888",p.stroke="white"),P(e,u,p)}return s},"bpmn:DataObject":function(e,t){var n=P(e,i.getScaledPath("DATA_OBJECT_PATH",{xScaleFactor:1,yScaleFactor:1,containerWidth:t.width,containerHeight:t.height,position:{mx:.474,my:.296}}),{fill:Object(l.d)(t,b),fillOpacity:.95,stroke:Object(l.h)(t,g)}),r=Object(l.g)(t);return Object(l.i)(r)&&function(e,t){var n=(t.height-16)/t.height,r=i.getScaledPath("DATA_OBJECT_COLLECTION_PATH",{xScaleFactor:1,yScaleFactor:1,containerWidth:t.width,containerHeight:t.height,position:{mx:.451,my:n}});P(e,r,{strokeWidth:2})}(e,t),n},"bpmn:DataObjectReference":A("bpmn:DataObject"),"bpmn:DataInput":function(e,t){var n=i.getRawPath("DATA_ARROW"),r=R("bpmn:DataObject")(e,t);return P(e,n,{strokeWidth:1}),r},"bpmn:DataOutput":function(e,t){var n=i.getRawPath("DATA_ARROW"),r=R("bpmn:DataObject")(e,t);return P(e,n,{strokeWidth:1,fill:"black"}),r},"bpmn:DataStoreReference":function(e,t){return P(e,i.getScaledPath("DATA_STORE",{xScaleFactor:1,yScaleFactor:1,containerWidth:t.width,containerHeight:t.height,position:{mx:0,my:.133}}),{strokeWidth:2,fill:Object(l.d)(t,b),fillOpacity:.95,stroke:Object(l.h)(t,g)})},"bpmn:BoundaryEvent":function(e,t){var n=Object(l.g)(t).cancelActivity,i={strokeWidth:1,fill:Object(l.d)(t,b),stroke:Object(l.h)(t,g)};n||(i.strokeDasharray="6",i.strokeLinecap="round");var r=Object(o.assign)({},i,{fillOpacity:1}),a=Object(o.assign)({},i,{fill:"none"}),s=R("bpmn:Event")(e,t,r);return w(e,t.width,t.height,3,a),k(t,e),s},"bpmn:Group":function(e,t){return S(e,t.width,t.height,10,{stroke:Object(l.h)(t,g),strokeWidth:1,strokeDasharray:"8,3,1,3",fill:"none",pointerEvents:"none"})},label:function(e,t){return function(e,t){var n={width:90,height:30,x:t.width/2+t.x,y:t.height/2+t.y};return B(e,Object(c.a)(t),{box:n,fitBox:!0,style:Object(o.assign)({},u.getExternalStyle(),{fill:Object(l.h)(t,g)})})}(e,t)},"bpmn:TextAnnotation":function(e,t){var n=S(e,t.width,t.height,0,0,{fill:"none",stroke:"none"});return P(e,i.getScaledPath("TEXT_ANNOTATION",{xScaleFactor:1,yScaleFactor:1,containerWidth:t.width,containerHeight:t.height,position:{mx:0,my:0}}),{stroke:Object(l.h)(t,g)}),B(e,Object(l.g)(t).text||"",{box:t,align:"left-top",padding:5,style:{fill:Object(l.h)(t,g)}}),n},ParticipantMultiplicityMarker:function(e,t){C("participant-multiplicity",e,i.getScaledPath("MARKER_PARALLEL",{xScaleFactor:1,yScaleFactor:1,containerWidth:t.width,containerHeight:t.height,position:{mx:t.width/2/t.width,my:(t.height-15)/t.height}}),{strokeWidth:1,fill:Object(l.d)(t,b),stroke:Object(l.h)(t,g)})},SubProcessMarker:function(e,t){var n=S(e,14,14,0,{strokeWidth:1,fill:Object(l.d)(t,b),stroke:Object(l.h)(t,g)});Object(h.c)(n,t.width/2-7.5,t.height-20),C("sub-process",e,i.getScaledPath("MARKER_SUB_PROCESS",{xScaleFactor:1.5,yScaleFactor:1.5,containerWidth:t.width,containerHeight:t.height,position:{mx:(t.width/2-7.5)/t.width,my:(t.height-20)/t.height}}),{fill:Object(l.d)(t,b),stroke:Object(l.h)(t,g)})},ParallelMarker:function(e,t,n){C("parallel",e,i.getScaledPath("MARKER_PARALLEL",{xScaleFactor:1,yScaleFactor:1,containerWidth:t.width,containerHeight:t.height,position:{mx:(t.width/2+n.parallel)/t.width,my:(t.height-20)/t.height}}),{fill:Object(l.d)(t,b),stroke:Object(l.h)(t,g)})},SequentialMarker:function(e,t,n){C("sequential",e,i.getScaledPath("MARKER_SEQUENTIAL",{xScaleFactor:1,yScaleFactor:1,containerWidth:t.width,containerHeight:t.height,position:{mx:(t.width/2+n.seq)/t.width,my:(t.height-19)/t.height}}),{fill:Object(l.d)(t,b),stroke:Object(l.h)(t,g)})},CompensationMarker:function(e,t,n){C("compensation",e,i.getScaledPath("MARKER_COMPENSATION",{xScaleFactor:1,yScaleFactor:1,containerWidth:t.width,containerHeight:t.height,position:{mx:(t.width/2+n.compensation)/t.width,my:(t.height-13)/t.height}}),{strokeWidth:1,fill:Object(l.d)(t,b),stroke:Object(l.h)(t,g)})},LoopMarker:function(e,t,n){C("loop",e,i.getScaledPath("MARKER_LOOP",{xScaleFactor:1,yScaleFactor:1,containerWidth:t.width,containerHeight:t.height,position:{mx:(t.width/2+n.loop)/t.width,my:(t.height-7)/t.height}}),{strokeWidth:1,fill:Object(l.d)(t,b),stroke:Object(l.h)(t,g),strokeLinecap:"round",strokeMiterlimit:.5})},AdhocMarker:function(e,t,n){C("adhoc",e,i.getScaledPath("MARKER_ADHOC",{xScaleFactor:1,yScaleFactor:1,containerWidth:t.width,containerHeight:t.height,position:{mx:(t.width/2+n.adhoc)/t.width,my:(t.height-15)/t.height}}),{strokeWidth:1,fill:Object(l.h)(t,g),stroke:Object(l.h)(t,g)})}};function I(e,t,n){var i,r=Object(l.g)(t),a=n&&-1!==n.indexOf("SubProcessMarker");i=a?{seq:-21,parallel:-22,compensation:-42,loop:-18,adhoc:10}:{seq:-3,parallel:-6,compensation:-27,loop:0,adhoc:10},Object(o.forEach)(n,(function(n){R(n)(e,t,i)})),r.isForCompensation&&R("CompensationMarker")(e,t,i),"bpmn:AdHocSubProcess"===r.$type&&R("AdhocMarker")(e,t,i);var s=r.loopCharacteristics,c=s&&s.isSequential;s&&(void 0===c&&R("LoopMarker")(e,t,i),!1===c&&R("ParallelMarker")(e,t,i),!0===c&&R("SequentialMarker")(e,t,i))}this._drawPath=P}r()(v,a.a),v.$inject=["config.bpmnRenderer","eventBus","styles","pathMap","canvas","textRenderer"],v.prototype.canRender=function(e){return Object(u.is)(e,"bpmn:BaseElement")},v.prototype.drawShape=function(e,t){var n=t.type;return(0,this.handlers[n])(e,t)},v.prototype.drawConnection=function(e,t){var n=t.type;return(0,this.handlers[n])(e,t)},v.prototype.getShapePath=function(e){return Object(u.is)(e,"bpmn:Event")?Object(l.a)(e):Object(u.is)(e,"bpmn:Activity")?Object(l.f)(e,10):Object(u.is)(e,"bpmn:Gateway")?Object(l.c)(e):Object(l.e)(e)};n(30),n(117),n(14);var b={width:150,height:50};function g(e,t){var n;t.textContent=e;try{var i,r=""===e;return t.textContent=r?"dummy":e,i={width:(n=t.getBBox()).width+2*n.x,height:n.height},r&&(i.width=0),i}catch(e){return{width:0,height:0}}}function y(e,t,n){for(var i,r=e.shift(),o=r;;){if((i=g(o,n)).width=o?i.width:0," "===o||""===o||i.width<Math.round(t)||o.length<2)return x(e,o,r,i);o=O(o,i.width,t)}}function x(e,t,n,i){if(t.length<n.length){var r=n.slice(t.length).trim();e.unshift(r)}return{width:i.width,height:i.height,text:t}}function O(e,t,n){var i=Math.max(e.length*(n/t),1),r=function(e,t){var n,i=e.split(/(\s|-)/g),r=[],o=0;if(i.length>1)for(;n=i.shift();){if(!(n.length+o<t)){"-"===n&&r.pop();break}r.push(n),o+=n.length}return r.join("")}(e,i);return r||(r=e.slice(0,Math.max(Math.round(i-1),1))),r}function j(e){this._config=Object(o.assign)({},{size:b,padding:0,style:{},align:"center-top"},e||{})}j.prototype.createText=function(e,t){return this.layoutText(e,t).element},j.prototype.getDimensions=function(e,t){return this.layoutText(e,t).dimensions},j.prototype.layoutText=function(e,t){var n=Object(o.assign)({},this._config.size,t.box),i=Object(o.assign)({},this._config.style,t.style),r=function(e){var t=e.split("-");return{horizontal:t[0]||"center",vertical:t[1]||"top"}}(t.align||this._config.align),a=function(e){return Object(o.isObject)(e)?Object(o.assign)({top:0,left:0,right:0,bottom:0},e):{top:e,left:e,right:e,bottom:e}}(void 0!==t.padding?t.padding:this._config.padding),s=t.fitBox||!1,c=function(e){if("fontSize"in e&&"lineHeight"in e)return e.lineHeight*parseInt(e.fontSize,10)}(i),u=e.split(/\r?\n/g),p=[],l=n.width-a.left-a.right,d=Object(f.f)("text");Object(f.b)(d,{x:0,y:0}),Object(f.b)(d,i);var h=function(){var e=document.getElementById("helper-svg");return e||(e=Object(f.f)("svg"),Object(f.b)(e,{id:"helper-svg",width:0,height:0,style:"visibility: hidden; position: fixed"}),document.body.appendChild(e)),e}();for(Object(f.a)(h,d);u.length;)p.push(y(u,l,d));"middle"===r.vertical&&(a.top=a.bottom=0);var m=Object(o.reduce)(p,(function(e,t,n){return e+(c||t.height)}),0)+a.top+a.bottom,v=Object(o.reduce)(p,(function(e,t,n){return t.width>e?t.width:e}),0),b=a.top;"middle"===r.vertical&&(b+=(n.height-m)/2),b-=(c||p[0].height)/4;var g=Object(f.f)("text");return Object(f.b)(g,i),Object(o.forEach)(p,(function(e){var t;switch(b+=c||e.height,r.horizontal){case"left":t=a.left;break;case"right":t=(s?v:l)-a.right-e.width;break;default:t=Math.max(((s?v:l)-e.width)/2+a.left,0)}var n=Object(f.f)("tspan");Object(f.b)(n,{x:t,y:b}),n.textContent=e.text,Object(f.a)(g,n)})),Object(f.j)(d),{dimensions:{width:v,height:m},element:g}};function E(e){var t=Object(o.assign)({fontFamily:"Arial, sans-serif",fontSize:12,fontWeight:"normal",lineHeight:1.2},e&&e.defaultStyle||{}),n=parseInt(t.fontSize,10)-1,i=Object(o.assign)({},t,{fontSize:n},e&&e.externalStyle||{}),r=new j({style:t});this.getExternalLabelBounds=function(e,t){var n=r.getDimensions(t,{box:{width:90,height:30,x:e.width/2+e.x,y:e.height/2+e.y},style:i});return{x:Math.round(e.x+e.width/2-n.width/2),y:Math.round(e.y),width:Math.ceil(n.width),height:Math.ceil(n.height)}},this.getTextAnnotationBounds=function(e,n){var i=r.getDimensions(n,{box:e,style:t,align:"left-top",padding:5});return{x:e.x,y:e.y,width:e.width,height:Math.max(30,Math.round(i.height))}},this.createText=function(e,t){return r.createText(e,t||{})},this.getDefaultStyle=function(){return t},this.getExternalStyle=function(){return i}}E.$inject=["config.textRenderer"];var _=/\{([^}]+)\}/g,w=/(?:(?:^|\.)(.+?)(?=\[|\.|$|\()|\[('|")(.+?)\2\])(\(\))?/g;var S={__init__:["bpmnRenderer"],bpmnRenderer:["type",v],textRenderer:["type",E],pathMap:["type",function(){this.pathMap={EVENT_MESSAGE:{d:"m {mx},{my} l 0,{e.y1} l {e.x1},0 l 0,-{e.y1} z l {e.x0},{e.y0} l {e.x0},-{e.y0}",height:36,width:36,heightElements:[6,14],widthElements:[10.5,21]},EVENT_SIGNAL:{d:"M {mx},{my} l {e.x0},{e.y0} l -{e.x1},0 Z",height:36,width:36,heightElements:[18],widthElements:[10,20]},EVENT_ESCALATION:{d:"M {mx},{my} l {e.x0},{e.y0} l -{e.x0},-{e.y1} l -{e.x0},{e.y1} Z",height:36,width:36,heightElements:[20,7],widthElements:[8]},EVENT_CONDITIONAL:{d:"M {e.x0},{e.y0} l {e.x1},0 l 0,{e.y2} l -{e.x1},0 Z M {e.x2},{e.y3} l {e.x0},0 M {e.x2},{e.y4} l {e.x0},0 M {e.x2},{e.y5} l {e.x0},0 M {e.x2},{e.y6} l {e.x0},0 M {e.x2},{e.y7} l {e.x0},0 M {e.x2},{e.y8} l {e.x0},0 ",height:36,width:36,heightElements:[8.5,14.5,18,11.5,14.5,17.5,20.5,23.5,26.5],widthElements:[10.5,14.5,12.5]},EVENT_LINK:{d:"m {mx},{my} 0,{e.y0} -{e.x1},0 0,{e.y1} {e.x1},0 0,{e.y0} {e.x0},-{e.y2} -{e.x0},-{e.y2} z",height:36,width:36,heightElements:[4.4375,6.75,7.8125],widthElements:[9.84375,13.5]},EVENT_ERROR:{d:"m {mx},{my} {e.x0},-{e.y0} {e.x1},-{e.y1} {e.x2},{e.y2} {e.x3},-{e.y3} -{e.x4},{e.y4} -{e.x5},-{e.y5} z",height:36,width:36,heightElements:[.023,8.737,8.151,16.564,10.591,8.714],widthElements:[.085,6.672,6.97,4.273,5.337,6.636]},EVENT_CANCEL_45:{d:"m {mx},{my} -{e.x1},0 0,{e.x0} {e.x1},0 0,{e.y1} {e.x0},0 0,-{e.y1} {e.x1},0 0,-{e.y0} -{e.x1},0 0,-{e.y1} -{e.x0},0 z",height:36,width:36,heightElements:[4.75,8.5],widthElements:[4.75,8.5]},EVENT_COMPENSATION:{d:"m {mx},{my} {e.x0},-{e.y0} 0,{e.y1} z m {e.x1},-{e.y2} {e.x2},-{e.y3} 0,{e.y1} -{e.x2},-{e.y3} z",height:36,width:36,heightElements:[6.5,13,.4,6.1],widthElements:[9,9.3,8.7]},EVENT_TIMER_WH:{d:"M {mx},{my} l {e.x0},-{e.y0} m -{e.x0},{e.y0} l {e.x1},{e.y1} ",height:36,width:36,heightElements:[10,2],widthElements:[3,7]},EVENT_TIMER_LINE:{d:"M {mx},{my} m {e.x0},{e.y0} l -{e.x1},{e.y1} ",height:36,width:36,heightElements:[10,3],widthElements:[0,0]},EVENT_MULTIPLE:{d:"m {mx},{my} {e.x1},-{e.y0} {e.x1},{e.y0} -{e.x0},{e.y1} -{e.x2},0 z",height:36,width:36,heightElements:[6.28099,12.56199],widthElements:[3.1405,9.42149,12.56198]},EVENT_PARALLEL_MULTIPLE:{d:"m {mx},{my} {e.x0},0 0,{e.y1} {e.x1},0 0,{e.y0} -{e.x1},0 0,{e.y1} -{e.x0},0 0,-{e.y1} -{e.x1},0 0,-{e.y0} {e.x1},0 z",height:36,width:36,heightElements:[2.56228,7.68683],widthElements:[2.56228,7.68683]},GATEWAY_EXCLUSIVE:{d:"m {mx},{my} {e.x0},{e.y0} {e.x1},{e.y0} {e.x2},0 {e.x4},{e.y2} {e.x4},{e.y1} {e.x2},0 {e.x1},{e.y3} {e.x0},{e.y3} {e.x3},0 {e.x5},{e.y1} {e.x5},{e.y2} {e.x3},0 z",height:17.5,width:17.5,heightElements:[8.5,6.5312,-6.5312,-8.5],widthElements:[6.5,-6.5,3,-3,5,-5]},GATEWAY_PARALLEL:{d:"m {mx},{my} 0,{e.y1} -{e.x1},0 0,{e.y0} {e.x1},0 0,{e.y1} {e.x0},0 0,-{e.y1} {e.x1},0 0,-{e.y0} -{e.x1},0 0,-{e.y1} -{e.x0},0 z",height:30,width:30,heightElements:[5,12.5],widthElements:[5,12.5]},GATEWAY_EVENT_BASED:{d:"m {mx},{my} {e.x0},{e.y0} {e.x0},{e.y1} {e.x1},{e.y2} {e.x2},0 z",height:11,width:11,heightElements:[-6,6,12,-12],widthElements:[9,-3,-12]},GATEWAY_COMPLEX:{d:"m {mx},{my} 0,{e.y0} -{e.x0},-{e.y1} -{e.x1},{e.y2} {e.x0},{e.y1} -{e.x2},0 0,{e.y3} {e.x2},0 -{e.x0},{e.y1} l {e.x1},{e.y2} {e.x0},-{e.y1} 0,{e.y0} {e.x3},0 0,-{e.y0} {e.x0},{e.y1} {e.x1},-{e.y2} -{e.x0},-{e.y1} {e.x2},0 0,-{e.y3} -{e.x2},0 {e.x0},-{e.y1} -{e.x1},-{e.y2} -{e.x0},{e.y1} 0,-{e.y0} -{e.x3},0 z",height:17.125,width:17.125,heightElements:[4.875,3.4375,2.125,3],widthElements:[3.4375,2.125,4.875,3]},DATA_OBJECT_PATH:{d:"m 0,0 {e.x1},0 {e.x0},{e.y0} 0,{e.y1} -{e.x2},0 0,-{e.y2} {e.x1},0 0,{e.y0} {e.x0},0",height:61,width:51,heightElements:[10,50,60],widthElements:[10,40,50,60]},DATA_OBJECT_COLLECTION_PATH:{d:"m {mx}, {my} m 0 15 l 0 -15 m 4 15 l 0 -15 m 4 15 l 0 -15 ",height:61,width:51,heightElements:[12],widthElements:[1,6,12,15]},DATA_ARROW:{d:"m 5,9 9,0 0,-3 5,5 -5,5 0,-3 -9,0 z",height:61,width:51,heightElements:[],widthElements:[]},DATA_STORE:{d:"m {mx},{my} l 0,{e.y2} c {e.x0},{e.y1} {e.x1},{e.y1} {e.x2},0 l 0,-{e.y2} c -{e.x0},-{e.y1} -{e.x1},-{e.y1} -{e.x2},0c {e.x0},{e.y1} {e.x1},{e.y1} {e.x2},0 m -{e.x2},{e.y0}c {e.x0},{e.y1} {e.x1},{e.y1} {e.x2},0m -{e.x2},{e.y0}c {e.x0},{e.y1} {e.x1},{e.y1} {e.x2},0",height:61,width:61,heightElements:[7,10,45],widthElements:[2,58,60]},TEXT_ANNOTATION:{d:"m {mx}, {my} m 10,0 l -10,0 l 0,{e.y0} l 10,0",height:30,width:10,heightElements:[30],widthElements:[10]},MARKER_SUB_PROCESS:{d:"m{mx},{my} m 7,2 l 0,10 m -5,-5 l 10,0",height:10,width:10,heightElements:[],widthElements:[]},MARKER_PARALLEL:{d:"m{mx},{my} m 3,2 l 0,10 m 3,-10 l 0,10 m 3,-10 l 0,10",height:10,width:10,heightElements:[],widthElements:[]},MARKER_SEQUENTIAL:{d:"m{mx},{my} m 0,3 l 10,0 m -10,3 l 10,0 m -10,3 l 10,0",height:10,width:10,heightElements:[],widthElements:[]},MARKER_COMPENSATION:{d:"m {mx},{my} 7,-5 0,10 z m 7.1,-0.3 6.9,-4.7 0,10 -6.9,-4.7 z",height:10,width:21,heightElements:[],widthElements:[]},MARKER_LOOP:{d:"m {mx},{my} c 3.526979,0 6.386161,-2.829858 6.386161,-6.320661 0,-3.490806 -2.859182,-6.320661 -6.386161,-6.320661 -3.526978,0 -6.38616,2.829855 -6.38616,6.320661 0,1.745402 0.714797,3.325567 1.870463,4.469381 0.577834,0.571908 1.265885,1.034728 2.029916,1.35457 l -0.718163,-3.909793 m 0.718163,3.909793 -3.885211,0.802902",height:13.9,width:13.7,heightElements:[],widthElements:[]},MARKER_ADHOC:{d:"m {mx},{my} m 0.84461,2.64411 c 1.05533,-1.23780996 2.64337,-2.07882 4.29653,-1.97997996 2.05163,0.0805 3.85579,1.15803 5.76082,1.79107 1.06385,0.34139996 2.24454,0.1438 3.18759,-0.43767 0.61743,-0.33642 1.2775,-0.64078 1.7542,-1.17511 0,0.56023 0,1.12046 0,1.6807 -0.98706,0.96237996 -2.29792,1.62393996 -3.6918,1.66181996 -1.24459,0.0927 -2.46671,-0.2491 -3.59505,-0.74812 -1.35789,-0.55965 -2.75133,-1.33436996 -4.27027,-1.18121996 -1.37741,0.14601 -2.41842,1.13685996 -3.44288,1.96782996 z",height:4,width:15,heightElements:[],widthElements:[]},TASK_TYPE_SEND:{d:"m {mx},{my} l 0,{e.y1} l {e.x1},0 l 0,-{e.y1} z l {e.x0},{e.y0} l {e.x0},-{e.y0}",height:14,width:21,heightElements:[6,14],widthElements:[10.5,21]},TASK_TYPE_SCRIPT:{d:"m {mx},{my} c 9.966553,-6.27276 -8.000926,-7.91932 2.968968,-14.938 l -8.802728,0 c -10.969894,7.01868 6.997585,8.66524 -2.968967,14.938 z m -7,-12 l 5,0 m -4.5,3 l 4.5,0 m -3,3 l 5,0m -4,3 l 5,0",height:15,width:12.6,heightElements:[6,14],widthElements:[10.5,21]},TASK_TYPE_USER_1:{d:"m {mx},{my} c 0.909,-0.845 1.594,-2.049 1.594,-3.385 0,-2.554 -1.805,-4.62199999 -4.357,-4.62199999 -2.55199998,0 -4.28799998,2.06799999 -4.28799998,4.62199999 0,1.348 0.974,2.562 1.89599998,3.405 -0.52899998,0.187 -5.669,2.097 -5.794,4.7560005 v 6.718 h 17 v -6.718 c 0,-2.2980005 -5.5279996,-4.5950005 -6.0509996,-4.7760005 zm -8,6 l 0,5.5 m 11,0 l 0,-5"},TASK_TYPE_USER_2:{d:"m {mx},{my} m 2.162,1.009 c 0,2.4470005 -2.158,4.4310005 -4.821,4.4310005 -2.66499998,0 -4.822,-1.981 -4.822,-4.4310005 "},TASK_TYPE_USER_3:{d:"m {mx},{my} m -6.9,-3.80 c 0,0 2.25099998,-2.358 4.27399998,-1.177 2.024,1.181 4.221,1.537 4.124,0.965 -0.098,-0.57 -0.117,-3.79099999 -4.191,-4.13599999 -3.57499998,0.001 -4.20799998,3.36699999 -4.20699998,4.34799999 z"},TASK_TYPE_MANUAL:{d:"m {mx},{my} c 0.234,-0.01 5.604,0.008 8.029,0.004 0.808,0 1.271,-0.172 1.417,-0.752 0.227,-0.898 -0.334,-1.314 -1.338,-1.316 -2.467,-0.01 -7.886,-0.004 -8.108,-0.004 -0.014,-0.079 0.016,-0.533 0,-0.61 0.195,-0.042 8.507,0.006 9.616,0.002 0.877,-0.007 1.35,-0.438 1.353,-1.208 0.003,-0.768 -0.479,-1.09 -1.35,-1.091 -2.968,-0.002 -9.619,-0.013 -9.619,-0.013 v -0.591 c 0,0 5.052,-0.016 7.225,-0.016 0.888,-0.002 1.354,-0.416 1.351,-1.193 -0.006,-0.761 -0.492,-1.196 -1.361,-1.196 -3.473,-0.005 -10.86,-0.003 -11.0829995,-0.003 -0.022,-0.047 -0.045,-0.094 -0.069,-0.139 0.3939995,-0.319 2.0409995,-1.626 2.4149995,-2.017 0.469,-0.4870005 0.519,-1.1650005 0.162,-1.6040005 -0.414,-0.511 -0.973,-0.5 -1.48,-0.236 -1.4609995,0.764 -6.5999995,3.6430005 -7.7329995,4.2710005 -0.9,0.499 -1.516,1.253 -1.882,2.19 -0.37000002,0.95 -0.17,2.01 -0.166,2.979 0.004,0.718 -0.27300002,1.345 -0.055,2.063 0.629,2.087 2.425,3.312 4.859,3.318 4.6179995,0.014 9.2379995,-0.139 13.8569995,-0.158 0.755,-0.004 1.171,-0.301 1.182,-1.033 0.012,-0.754 -0.423,-0.969 -1.183,-0.973 -1.778,-0.01 -5.824,-0.004 -6.04,-0.004 10e-4,-0.084 0.003,-0.586 10e-4,-0.67 z"},TASK_TYPE_INSTANTIATING_SEND:{d:"m {mx},{my} l 0,8.4 l 12.6,0 l 0,-8.4 z l 6.3,3.6 l 6.3,-3.6"},TASK_TYPE_SERVICE:{d:"m {mx},{my} v -1.71335 c 0.352326,-0.0705 0.703932,-0.17838 1.047628,-0.32133 0.344416,-0.14465 0.665822,-0.32133 0.966377,-0.52145 l 1.19431,1.18005 1.567487,-1.57688 -1.195028,-1.18014 c 0.403376,-0.61394 0.683079,-1.29908 0.825447,-2.01824 l 1.622133,-0.01 v -2.2196 l -1.636514,0.01 c -0.07333,-0.35153 -0.178319,-0.70024 -0.323564,-1.04372 -0.145244,-0.34406 -0.321407,-0.6644 -0.522735,-0.96217 l 1.131035,-1.13631 -1.583305,-1.56293 -1.129598,1.13589 c -0.614052,-0.40108 -1.302883,-0.68093 -2.022633,-0.82247 l 0.0093,-1.61852 h -2.241173 l 0.0042,1.63124 c -0.353763,0.0736 -0.705369,0.17977 -1.049785,0.32371 -0.344415,0.14437 -0.665102,0.32092 -0.9635006,0.52046 l -1.1698628,-1.15823 -1.5667691,1.5792 1.1684265,1.15669 c -0.4026573,0.61283 -0.68308,1.29797 -0.8247287,2.01713 l -1.6588041,0.003 v 2.22174 l 1.6724648,-0.006 c 0.073327,0.35077 0.1797598,0.70243 0.3242851,1.04472 0.1452428,0.34448 0.3214064,0.6644 0.5227339,0.96066 l -1.1993431,1.19723 1.5840256,1.56011 1.1964668,-1.19348 c 0.6140517,0.40346 1.3028827,0.68232 2.0233517,0.82331 l 7.19e-4,1.69892 h 2.226848 z m 0.221462,-3.9957 c -1.788948,0.7502 -3.8576,-0.0928 -4.6097055,-1.87438 -0.7521065,-1.78321 0.090598,-3.84627 1.8802645,-4.59604 1.78823,-0.74936 3.856881,0.0929 4.608987,1.87437 0.752106,1.78165 -0.0906,3.84612 -1.879546,4.59605 z"},TASK_TYPE_SERVICE_FILL:{d:"m {mx},{my} c -1.788948,0.7502 -3.8576,-0.0928 -4.6097055,-1.87438 -0.7521065,-1.78321 0.090598,-3.84627 1.8802645,-4.59604 1.78823,-0.74936 3.856881,0.0929 4.608987,1.87437 0.752106,1.78165 -0.0906,3.84612 -1.879546,4.59605 z"},TASK_TYPE_BUSINESS_RULE_HEADER:{d:"m {mx},{my} 0,4 20,0 0,-4 z"},TASK_TYPE_BUSINESS_RULE_MAIN:{d:"m {mx},{my} 0,12 20,0 0,-12 zm 0,8 l 20,0 m -13,-4 l 0,8"},MESSAGE_FLOW_MARKER:{d:"m {mx},{my} m -10.5 ,-7 l 0,14 l 21,0 l 0,-14 z l 10.5,6 l 10.5,-6"}},this.getRawPath=function(e){return this.pathMap[e].d},this.getScaledPath=function(e,t){var n,i,r=this.pathMap[e];t.abspos?(n=t.abspos.x,i=t.abspos.y):(n=t.containerWidth*t.position.mx,i=t.containerHeight*t.position.my);var o,a,s={};if(t.position){for(var c=t.containerHeight/r.height*t.yScaleFactor,u=t.containerWidth/r.width*t.xScaleFactor,p=0;p<r.heightElements.length;p++)s["y"+p]=r.heightElements[p]*c;for(var l=0;l<r.widthElements.length;l++)s["x"+l]=r.widthElements[l]*u}return o=r.d,a={mx:n,my:i,e:s},String(o).replace(_,(function(e,t){return function(e,t,n){var i=n;return t.replace(w,(function(e,t,n,r,o){t=t||r,i&&(t in i&&(i=i[t]),"function"==typeof i&&o&&(i=i()))})),i=(null==i||i==n?e:i)+""}(e,t,a)}))}}]},T=n(757),P=n(742),C=n(726),A=n(840);function R(e,t){return Object(o.assign)({id:e.id,type:e.$type,businessObject:e},t)}function k(e,t,n){var i=e.di.waypoint;return!i||i.length<2?[Object(C.e)(t),Object(C.e)(n)]:i.map((function(e){return{x:e.x,y:e.y}}))}function B(e,t,n,i){return new Error(e("element {element} referenced by {referenced}#{property} not yet drawn",{element:Object(A.a)(n),referenced:Object(A.a)(t),property:i}))}function M(e,t,n,i,r,o){this._eventBus=e,this._canvas=t,this._elementFactory=n,this._elementRegistry=i,this._translate=r,this._textRenderer=o}M.$inject=["eventBus","canvas","elementFactory","elementRegistry","translate","textRenderer"],M.prototype.add=function(e,t){var n,i,r,o,a,p,l,d=e.di,f=this._translate;if(Object(u.is)(d,"bpmndi:BPMNPlane"))n=this._elementFactory.createRoot(R(e)),this._canvas.setRootElement(n);else if(Object(u.is)(d,"bpmndi:BPMNShape")){var h=!Object(s.isExpanded)(e),m=function(e){return Object(u.is)(e,"bpmn:Group")}(e);i=t&&(t.hidden||t.collapsed);var v=e.di.bounds;n=this._elementFactory.createShape(R(e,{collapsed:h,hidden:i,x:Math.round(v.x),y:Math.round(v.y),width:Math.round(v.width),height:Math.round(v.height),isFrame:m})),Object(u.is)(e,"bpmn:BoundaryEvent")&&this._attachBoundary(e,n),Object(u.is)(e,"bpmn:Lane")&&(r=0),Object(u.is)(e,"bpmn:DataStoreReference")&&(o=t,a=Object(C.e)(v),p=a.x,l=a.y,p>=o.x&&p<=o.x+o.width&&l>=o.y&&l<=o.y+o.height||(t=this._canvas.getRootElement())),this._canvas.addShape(n,t,r)}else{if(!Object(u.is)(d,"bpmndi:BPMNEdge"))throw new Error(f("unknown di {di} for element {semantic}",{di:Object(A.a)(d),semantic:Object(A.a)(e)}));var b=this._getSource(e),g=this._getTarget(e);i=t&&(t.hidden||t.collapsed),n=this._elementFactory.createConnection(R(e,{hidden:i,source:b,target:g,waypoints:k(e,b,g)})),Object(u.is)(e,"bpmn:DataAssociation")&&(t=null),Object(u.is)(e,"bpmn:SequenceFlow")&&(r=0),this._canvas.addConnection(n,t,r)}return Object(P.f)(e)&&Object(c.a)(n)&&this.addLabel(e,n),this._eventBus.fire("bpmnElement.added",{element:n}),n},M.prototype._attachBoundary=function(e,t){var n=this._translate,i=e.attachedToRef;if(!i)throw new Error(n("missing {semantic}#attachedToRef",{semantic:Object(A.a)(e)}));var r=this._elementRegistry.get(i.id),o=r&&r.attachers;if(!r)throw B(n,e,i,"attachedToRef");t.host=r,o||(r.attachers=o=[]),-1===o.indexOf(t)&&o.push(t)},M.prototype.addLabel=function(e,t){var n,i,r;return n=Object(P.b)(e,t),(i=Object(c.a)(t))&&(n=this._textRenderer.getExternalLabelBounds(n,i)),r=this._elementFactory.createLabel(R(e,{id:e.id+"_label",labelTarget:t,type:"label",hidden:t.hidden||!Object(c.a)(t),x:Math.round(n.x),y:Math.round(n.y),width:Math.round(n.width),height:Math.round(n.height)})),this._canvas.addShape(r,t.parent)},M.prototype._getEnd=function(e,t){var n,i,r=e.$type,o=this._translate;if(i=e[t+"Ref"],"source"===t&&"bpmn:DataInputAssociation"===r&&(i=i&&i[0]),("source"===t&&"bpmn:DataOutputAssociation"===r||"target"===t&&"bpmn:DataInputAssociation"===r)&&(i=e.$parent),n=i&&this._getElement(i))return n;throw i?B(o,e,i,t+"Ref"):new Error(o("{semantic}#{side} Ref not specified",{semantic:Object(A.a)(e),side:t}))},M.prototype._getSource=function(e){return this._getEnd(e,"source")},M.prototype._getTarget=function(e){return this._getEnd(e,"target")},M.prototype._getElement=function(e){return this._elementRegistry.get(e.id)};var D={__depends__:[S,{__depends__:[T.default],bpmnImporter:["type",M]}]},N=n(744),L=n(828),I=n(912);function F(e){I.a.call(this,e)}r()(F,I.a),F.prototype._modules=[D,T.default,N.a,L.a],F.prototype._moddleExtensions={}},function(e,t,n){"use strict";n.d(t,"a",(function(){return i}));function i(e,t){var n=this;t=t||1e3,e.on(["render.shape","render.connection"],t,(function(e,t){var i=e.type,r=t.element,o=t.gfx;if(n.canRender(r))return"render.shape"===i?n.drawShape(o,r):n.drawConnection(o,r)})),e.on(["render.getShapePath","render.getConnectionPath"],t,(function(e,t){if(n.canRender(t))return"render.getShapePath"===e.type?n.getShapePath(t):n.getConnectionPath(t)}))}i.prototype.canRender=function(){},i.prototype.drawShape=function(){},i.prototype.drawConnection=function(){},i.prototype.getShapePath=function(){},i.prototype.getConnectionPath=function(){}},function(e,t,n){"use strict";n.d(t,"a",(function(){return f})),n.d(t,"b",(function(){return v})),n.d(t,"c",(function(){return y}));var i=n(721),r=n(722),o=n.n(r),a=n(838),s=n.n(a),c=new s.a({name:"children",enumerable:!0,collection:!0},{name:"parent"}),u=new s.a({name:"labels",enumerable:!0,collection:!0},{name:"labelTarget"}),p=new s.a({name:"attachers",collection:!0},{name:"host"}),l=new s.a({name:"outgoing",collection:!0},{name:"source"}),d=new s.a({name:"incoming",collection:!0},{name:"target"});function f(){Object.defineProperty(this,"businessObject",{writable:!0}),Object.defineProperty(this,"label",{get:function(){return this.labels[0]},set:function(e){var t=this.label,n=this.labels;!e&&t?n.remove(t):n.add(e,0)}}),c.bind(this,"parent"),u.bind(this,"labels"),l.bind(this,"outgoing"),d.bind(this,"incoming")}function h(){f.call(this),c.bind(this,"children"),p.bind(this,"host"),p.bind(this,"attachers")}function m(){h.call(this)}function v(){h.call(this),u.bind(this,"labelTarget")}function b(){f.call(this),l.bind(this,"source"),d.bind(this,"target")}o()(h,f),o()(m,h),o()(v,h),o()(b,f);var g={connection:b,shape:h,label:v,root:m};function y(e,t){var n=g[e];if(!n)throw new Error("unknown type: <"+e+">");return Object(i.assign)(new n,t)}},function(e,t,n){"use strict";function i(e){return e.childNodes[0]}function r(e){return e.parentNode.childNodes[1]}n.d(t,"b",(function(){return i})),n.d(t,"a",(function(){return r}))},function(e,t,n){"use strict";n.r(t);n(0),n(15);var i=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 r(e){if(!(this instanceof r))return new r(e);e=e||[128,36,1],this._seed=e.length?i.rack(e[0],e[1],e[2]):e}r.prototype.next=function(e){return this._seed(e||!0)},r.prototype.nextPrefixed=function(e,t){var n;do{n=e+this.next(!0)}while(this.assigned(n));return this.claim(n,t),n},r.prototype.claim=function(e,t){this._seed.set(e,t||!0)},r.prototype.assigned=function(e){return this._seed.get(e)||!1},r.prototype.unclaim=function(e){delete this._seed.hats[e]},r.prototype.clear=function(){var e,t=this._seed.hats;for(e in t)this.unclaim(e)},t.default=r},function(e,t,n){(function(i){var r,o,a,s=n(123).default;n(0),n(15),n(0),n(15),function(n,i){"object"==s(t)?e.exports=i(n):(o=[],r=i.bind(n,n),void 0===(a="function"==typeof r?r.apply(t,o):r)||(e.exports=a))}(void 0!==i?i:this,(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+="�";return o};return e.CSS||(e.CSS={}),e.CSS.escape=t,t}))}).call(this,n(126))},function(e,t){e.exports=function(e,t){for(var n=-1,i=null==e?0:e.length;++n<i&&!1!==t(e[n],n,e););return e}},function(e,t){e.exports=function(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=9007199254740991}},function(e,t){var n=Object.prototype;e.exports=function(e){var t=e&&e.constructor;return e===("function"==typeof t&&t.prototype||n)}},function(e,t,n){var i=n(761),r=n(743);e.exports=function(e){if(!r(e))return!1;var t=i(e);return"[object Function]"==t||"[object GeneratorFunction]"==t||"[object AsyncFunction]"==t||"[object Proxy]"==t}},function(e,t,n){var i=n(753)(n(738),"Map");e.exports=i},function(e,t,n){var i=n(964),r=n(971),o=n(973),a=n(974),s=n(975);function c(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var i=e[t];this.set(i[0],i[1])}}c.prototype.clear=i,c.prototype.delete=r,c.prototype.get=o,c.prototype.has=a,c.prototype.set=s,e.exports=c},function(e,t,n){var i=n(809),r=n(977),o=n(978);function a(e){var t=-1,n=null==e?0:e.length;for(this.__data__=new i;++t<n;)this.add(e[t])}a.prototype.add=a.prototype.push=r,a.prototype.has=o,e.exports=a},function(e,t){e.exports=function(e,t){return e.has(t)}},function(e,t,n){n(20),n(20),e.exports=function(e){var t=-1,n=Array(e.size);return e.forEach((function(e){n[++t]=e})),n}},function(e,t){e.exports=function(e,t){for(var n=-1,i=null==e?0:e.length,r=0,o=[];++n<i;){var a=e[n];t(a,n,e)&&(o[r++]=a)}return o}},function(e,t,n){var i=n(123).default,r=n(734),o=n(788),a=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,s=/^\w*$/;e.exports=function(e,t){if(r(e))return!1;var n=i(e);return!("number"!=n&&"symbol"!=n&&"boolean"!=n&&null!=e&&!o(e))||(s.test(e)||!a.test(e)||null!=t&&e in Object(t))}},function(e,t,n){var i=n(763),r=n(1012),o=n(862);e.exports=function(e,t){return o(r(e,t,i),e+"")}},function(e,t){e.exports=function(e,t,n){switch(n.length){case 0:return e.call(t);case 1:return e.call(t,n[0]);case 2:return e.call(t,n[0],n[1]);case 3:return e.call(t,n[0],n[1],n[2])}return e.apply(t,n)}},function(e,t,n){var i=n(1017);e.exports=function(e,t){return!!(null==e?0:e.length)&&i(e,t,0)>-1}},function(e,t,n){var i=n(863);e.exports=function(e,t,n){"__proto__"==t&&i?i(e,t,{configurable:!0,enumerable:!0,value:n,writable:!0}):e[t]=n}},function(e,t,n){var i=n(789),r=n(759),o=n(1032),a=n(734);e.exports=function(e,t){return(a(e)?i:o)(e,r(t,3))}},function(e,t,n){"use strict";var i=n(819),r=n(739);e.exports.isAsyncBefore=function(e){return!(!e.get("camunda:asyncBefore")&&!e.get("camunda:async"))},e.exports.isAsyncAfter=function(e){return!!e.get("camunda:asyncAfter")},e.exports.isExclusive=function(e){return!!e.get("camunda:exclusive")},e.exports.getFailedJobRetryTimeCycle=function(e){return(r.getExtensionElements(e,"camunda:FailedJobRetryTimeCycle")||[])[0]},e.exports.removeFailedJobRetryTimeCycle=function(e,t){var n=r.getExtensionElements(e,"camunda:FailedJobRetryTimeCycle");return i(n,(function(n){return r.removeEntry(e,t,n)}))}},function(e,t,n){var i=n(782),r=n(822);function o(e){this.__wrapped__=e,this.__actions__=[],this.__dir__=1,this.__filtered__=!1,this.__iteratees__=[],this.__takeCount__=4294967295,this.__views__=[]}o.prototype=i(r.prototype),o.prototype.constructor=o,e.exports=o},function(e,t){e.exports=function(){}},function(e,t){e.exports=function(e){return e.placeholder}},,,,,function(e,t,n){"use strict";n(14),n(86),n(35);var i=n(721),r=n(723),o=n(728),a=new(n(843).a)("ov");function s(e,t,n,o){var s,c;this._eventBus=t,this._canvas=n,this._elementRegistry=o,this._ids=a,this._overlayDefaults=Object(i.assign)({show:null,scale:!0},e&&e.defaults),this._overlays={},this._overlayContainers=[],this._overlayRoot=(s=n.getContainer(),c=Object(r.domify)('<div class="djs-overlay-container" style="position: absolute; width: 0; height: 0;" />'),s.insertBefore(c,s.firstChild),c),this._init()}function c(e,t,n){Object(i.assign)(e.style,{left:t+"px",top:n+"px"})}function u(e,t){e.style.display=!1===t?"none":""}function p(e,t){e.style["transform-origin"]="top left",["","-ms-","-webkit-"].forEach((function(n){e.style[n+"transform"]=t}))}s.$inject=["config.overlays","eventBus","canvas","elementRegistry"],s.prototype.get=function(e){if(Object(i.isString)(e)&&(e={id:e}),Object(i.isString)(e.element)&&(e.element=this._elementRegistry.get(e.element)),e.element){var t=this._getOverlayContainer(e.element,!0);return t?e.type?Object(i.filter)(t.overlays,Object(i.matchPattern)({type:e.type})):t.overlays.slice():[]}return e.type?Object(i.filter)(this._overlays,Object(i.matchPattern)({type:e.type})):e.id?this._overlays[e.id]:null},s.prototype.add=function(e,t,n){if(Object(i.isObject)(t)&&(n=t,t=null),e.id||(e=this._elementRegistry.get(e)),!n.position)throw new Error("must specifiy overlay position");if(!n.html)throw new Error("must specifiy overlay html");if(!e)throw new Error("invalid element specified");var r=this._ids.next();return n=Object(i.assign)({},this._overlayDefaults,n,{id:r,type:t,element:e,html:n.html}),this._addOverlay(n),r},s.prototype.remove=function(e){var t=this.get(e)||[];Object(i.isArray)(t)||(t=[t]);var n=this;Object(i.forEach)(t,(function(e){var t=n._getOverlayContainer(e.element,!0);if(e&&(Object(r.remove)(e.html),Object(r.remove)(e.htmlContainer),delete e.htmlContainer,delete e.element,delete n._overlays[e.id]),t){var i=t.overlays.indexOf(e);-1!==i&&t.overlays.splice(i,1)}}))},s.prototype.show=function(){u(this._overlayRoot)},s.prototype.hide=function(){u(this._overlayRoot,!1)},s.prototype.clear=function(){this._overlays={},this._overlayContainers=[],Object(r.clear)(this._overlayRoot)},s.prototype._updateOverlayContainer=function(e){var t=e.element,n=e.html,i=t.x,a=t.y;if(t.waypoints){var s=Object(o.b)(t);i=s.x,a=s.y}c(n,i,a),Object(r.attr)(e.html,"data-container-id",t.id)},s.prototype._updateOverlay=function(e){var t,n,i=e.position,r=e.htmlContainer,a=e.element,s=i.left,u=i.top;void 0!==i.right&&(t=a.waypoints?Object(o.b)(a).width:a.width,s=-1*i.right+t);void 0!==i.bottom&&(n=a.waypoints?Object(o.b)(a).height:a.height,u=-1*i.bottom+n);c(r,s||0,u||0)},s.prototype._createOverlayContainer=function(e){var t=Object(r.domify)('<div class="djs-overlays" style="position: absolute" />');this._overlayRoot.appendChild(t);var n={html:t,element:e,overlays:[]};return this._updateOverlayContainer(n),this._overlayContainers.push(n),n},s.prototype._updateRoot=function(e){var t=e.scale||1,n="matrix("+[t,0,0,t,-1*e.x*t,-1*e.y*t].join(",")+")";p(this._overlayRoot,n)},s.prototype._getOverlayContainer=function(e,t){var n=Object(i.find)(this._overlayContainers,(function(t){return t.element===e}));return n||t?n:this._createOverlayContainer(e)},s.prototype._addOverlay=function(e){var t,n,o=e.id,a=e.element,s=e.html;s.get&&s.constructor.prototype.jquery&&(s=s.get(0)),Object(i.isString)(s)&&(s=Object(r.domify)(s)),n=this._getOverlayContainer(a),(t=Object(r.domify)('<div class="djs-overlay" data-overlay-id="'+o+'" style="position: absolute">')).appendChild(s),e.type&&Object(r.classes)(t).add("djs-overlay-"+e.type),e.htmlContainer=t,n.overlays.push(e),n.html.appendChild(t),this._overlays[o]=e,this._updateOverlay(e),this._updateOverlayVisibilty(e,this._canvas.viewbox())},s.prototype._updateOverlayVisibilty=function(e,t){var n=e.show,r=n&&n.minZoom,o=n&&n.maxZoom,a=e.htmlContainer,s=!0;n&&((Object(i.isDefined)(r)&&r>t.scale||Object(i.isDefined)(o)&&o<t.scale)&&(s=!1),u(a,s)),this._updateOverlayScale(e,t)},s.prototype._updateOverlayScale=function(e,t){var n,r,o,a=e.scale,s=e.htmlContainer,c="";!0!==a&&(!1===a?(n=1,r=1):(n=a.min,r=a.max),Object(i.isDefined)(n)&&t.scale<n&&(o=(1/t.scale||1)*n),Object(i.isDefined)(r)&&t.scale>r&&(o=(1/t.scale||1)*r)),Object(i.isDefined)(o)&&(c="scale("+o+","+o+")"),p(s,c)},s.prototype._updateOverlaysVisibilty=function(e){var t=this;Object(i.forEach)(this._overlays,(function(n){t._updateOverlayVisibilty(n,e)}))},s.prototype._init=function(){var e=this._eventBus,t=this;e.on("canvas.viewbox.changing",(function(e){t.hide()})),e.on("canvas.viewbox.changed",(function(e){var n;n=e.viewbox,t._updateRoot(n),t._updateOverlaysVisibilty(n),t.show()})),e.on(["shape.remove","connection.remove"],(function(e){var n=e.element,o=t.get({element:n});Object(i.forEach)(o,(function(e){t.remove(e.id)}));var a=t._getOverlayContainer(n);if(a){Object(r.remove)(a.html);var s=t._overlayContainers.indexOf(a);-1!==s&&t._overlayContainers.splice(s,1)}})),e.on("element.changed",500,(function(e){var n=e.element,r=t._getOverlayContainer(n,!0);r&&(Object(i.forEach)(r.overlays,(function(e){t._updateOverlay(e)})),t._updateOverlayContainer(r))})),e.on("element.marker.update",(function(e){var n=t._getOverlayContainer(e.element,!0);n&&Object(r.classes)(n.html)[e.add?"add":"remove"](e.marker)})),e.on("diagram.clear",this.clear,this)};t.a={__init__:["overlays"],overlays:["type",s]}},,,,,,,,,function(e,t,n){"use strict";n.d(t,"a",(function(){return o}));var i=n(800),r=n(721);function o(){this._uid=12}o.prototype.createRoot=function(e){return this.create("root",e)},o.prototype.createLabel=function(e){return this.create("label",e)},o.prototype.createShape=function(e){return this.create("shape",e)},o.prototype.createConnection=function(e){return this.create("connection",e)},o.prototype.create=function(e,t){return(t=Object(r.assign)({},t||{})).id||(t.id=e+"_"+this._uid++),Object(i.c)(e,t)}},function(e,t,n){e.exports=n(928),e.exports.Collection=n(839)},function(e,t,n){"use strict";n(86),n(86),e.exports.extend=function(e,t,n,i){var r=n.inverse;return Object.defineProperty(e,"remove",{value:function(e){var n=this.indexOf(e);return-1!==n&&(this.splice(n,1),t.unset(e,r,i)),e}}),Object.defineProperty(e,"contains",{value:function(e){return-1!==this.indexOf(e)}}),Object.defineProperty(e,"add",{value:function(e,n){var o=this.indexOf(e);if(void 0===n){if(-1!==o)return;n=this.length}-1!==o&&this.splice(o,1),this.splice(n,0,e),-1===o&&t.set(e,r,i)}}),Object.defineProperty(e,"__refs_collection",{value:!0}),e},e.exports.isExtended=function(e){return!0===e.__refs_collection}},function(e,t,n){"use strict";function i(e){return e?"<"+e.$type+(e.id?' id="'+e.id:"")+'" />':"<null>"}n.d(t,"a",(function(){return i}))},function(e,t,n){"use strict";n.d(t,"k",(function(){return o})),n.d(t,"j",(function(){return a})),n.d(t,"i",(function(){return s})),n.d(t,"b",(function(){return c})),n.d(t,"g",(function(){return u})),n.d(t,"d",(function(){return p})),n.d(t,"h",(function(){return l})),n.d(t,"a",(function(){return d})),n.d(t,"f",(function(){return f})),n.d(t,"c",(function(){return h})),n.d(t,"e",(function(){return m}));var i=n(721),r=n(776);function o(e,t,n){return Object(i.some)(e.eventDefinitions,(function(r){return r.$type===t&&function(e,t){return Object(i.every)(t,(function(t,n){return e[n]==t}))}(e,n)}))}function a(e){return"bpmn:IntermediateThrowEvent"===e.$type||"bpmn:EndEvent"===e.$type}function s(e){var t=e.dataObjectRef;return e.isCollection||t&&t.isCollection}function c(e){return e.businessObject.di}function u(e){return e.businessObject}function p(e,t){return c(e).get("bioc:fill")||t||"white"}function l(e,t){return c(e).get("bioc:stroke")||t||"black"}function d(e){var t=e.x+e.width/2,n=e.y+e.height/2,i=e.width/2,o=[["M",t,n],["m",0,-i],["a",i,i,0,1,1,0,2*i],["a",i,i,0,1,1,0,-2*i],["z"]];return Object(r.a)(o)}function f(e,t){var n=e.x,i=e.y,o=e.width,a=e.height,s=[["M",n+t,i],["l",o-2*t,0],["a",t,t,0,0,1,t,t],["l",0,a-2*t],["a",t,t,0,0,1,-t,t],["l",2*t-o,0],["a",t,t,0,0,1,-t,-t],["l",0,2*t-a],["a",t,t,0,0,1,t,-t],["z"]];return Object(r.a)(s)}function h(e){var t=e.width/2,n=e.height/2,i=[["M",e.x+t,e.y],["l",t,n],["l",-t,n],["l",-t,-n],["z"]];return Object(r.a)(i)}function m(e){var t=e.x,n=e.y,i=e.width,o=[["M",t,n],["l",i,0],["l",0,e.height],["l",-i,0],["z"]];return Object(r.a)(o)}},function(e,t,n){"use strict";n(86),n(14),n(35),n(1),n(22),n(21),n(0),n(15),n(241),n(30),n(86),n(14),n(35),n(1),n(22),n(21),n(0),n(15),n(241),n(30);var i=/,?([a-z]),?/gi,r=parseFloat,o=Math,a=o.PI,s=o.min,c=o.max,u=o.pow,p=o.abs,l=/([a-z])[\s,]*((-?\d*\.?\d*(?:e[-+]?\d+)?[\s]*,?[\s]*)+)/gi,d=/(-?\d*\.?\d*(?:e[-+]?\d+)?)[\s]*,?[\s]*/gi,f=Array.isArray||function(e){return e instanceof Array};function h(e,t){return Object.prototype.hasOwnProperty.call(e,t)}function m(e){if("function"==typeof e||Object(e)!==e)return e;var t=new e.constructor;for(var n in e)h(e,n)&&(t[n]=m(e[n]));return t}function v(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 b(e){var t=b.ps=b.ps||{};return t[e]?t[e].sleep=100:t[e]={sleep:100},setTimeout((function(){for(var n in t)h(t,n)&&n!=e&&(t[n].sleep--,!t[n].sleep&&delete t[n])})),t[e]}function g(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 y(){return this.join(",").replace(i,"$1")}function x(e){var t=m(e);return t.toString=y,t}function O(e,t,n,i,r,o,a,s,c){var p=1-c,l=u(p,3),d=u(p,2),f=c*c*c,h=l*t+3*d*c*i+3*p*c*c*o+f*s;return{x:T(l*e+3*d*c*n+3*p*c*c*r+f*a),y:T(h)}}function j(e){var t=M.apply(null,e);return g(t.x0,t.y0,t.x1-t.x0,t.y1-t.y0)}function E(e,t,n){return t>=e.x&&t<=e.x+e.width&&n>=e.y&&n<=e.y+e.height}function _(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 w(e,t,n,i,r,a,s,c,u){null==u&&(u=1);for(var p=(u=u>1?1:u<0?0:u)/2,l=[-.1252,.1252,-.3678,.3678,-.5873,.5873,-.7699,.7699,-.9041,.9041,-.9816,.9816],d=[.2491,.2491,.2335,.2335,.2032,.2032,.1601,.1601,.1069,.1069,.0472,.0472],f=0,h=0;h<12;h++){var m=p*l[h]+p,v=_(m,e,n,r,s),b=_(m,t,i,a,c),g=v*v+b*b;f+=d[h]*o.sqrt(g)}return p*f}function S(e,t,n,i,r,o,a,u){if(!(c(e,n)<s(r,a)||s(e,n)>c(r,a)||c(t,i)<s(o,u)||s(t,i)>c(o,u))){var p=(e*i-t*n)*(o-u)-(t-i)*(r*u-o*a),l=(e-n)*(o-u)-(t-i)*(r-a);if(l){var d=T(((e*i-t*n)*(r-a)-(e-n)*(r*u-o*a))/l),f=T(p/l),h=+d.toFixed(2),m=+f.toFixed(2);if(!(h<+s(e,n).toFixed(2)||h>+c(e,n).toFixed(2)||h<+s(r,a).toFixed(2)||h>+c(r,a).toFixed(2)||m<+s(t,i).toFixed(2)||m>+c(t,i).toFixed(2)||m<+s(o,u).toFixed(2)||m>+c(o,u).toFixed(2)))return{x:d,y:f}}}}function T(e){return Math.round(1e11*e)/1e11}function P(e,t,n){if(!function(e,t){return e=g(e),E(t=g(t),e.x,e.y)||E(t,e.x2,e.y)||E(t,e.x,e.y2)||E(t,e.x2,e.y2)||E(e,t.x,t.y)||E(e,t.x2,t.y)||E(e,t.x,t.y2)||E(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)}(j(e),j(t)))return n?0:[];for(var i=w.apply(0,e),r=w.apply(0,t),o=A(e)?1:~~(i/5)||1,a=A(t)?1:~~(r/5)||1,s=[],c=[],u={},l=n?0:[],d=0;d<o+1;d++){var f=O.apply(0,e.concat(d/o));s.push({x:f.x,y:f.y,t:d/o})}for(d=0;d<a+1;d++)f=O.apply(0,t.concat(d/a)),c.push({x:f.x,y:f.y,t:d/a});for(d=0;d<o;d++)for(var h=0;h<a;h++){var m,v=s[d],b=s[d+1],y=c[h],x=c[h+1],_=p(b.x-v.x)<.01?"y":"x",T=p(x.x-y.x)<.01?"y":"x",P=S(v.x,v.y,b.x,b.y,y.x,y.y,x.x,x.y);if(P){if(u[m=P.x.toFixed(9)+"#"+P.y.toFixed(9)])continue;u[m]=!0;var C=v.t+p((P[_]-v[_])/(b[_]-v[_]))*(b.t-v.t),R=y.t+p((P[T]-y[T])/(x[T]-y[T]))*(x.t-y.t);C>=0&&C<=1&&R>=0&&R<=1&&(n?l++:l.push({x:P.x,y:P.y,t1:C,t2:R}))}}return l}function C(e){var t=b(e);if(t.abs)return x(t.abs);if(f(e)&&f(e&&e[0])||(e=function(e){if(!e)return null;var t=b(e);if(t.arr)return m(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 f(e)&&f(e[0])&&(i=m(e)),i.length||String(e).replace(l,(function(e,t,r){var o=[],a=t.toLowerCase();for(r.replace(d,(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=b.toString,t.arr=m(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 u,p,h=c,v=e.length;h<v;h++){if(i.push(u=[]),(n=(p=e[h])[0])!=n.toUpperCase())switch(u[0]=n.toUpperCase(),u[0]){case"A":u[1]=p[1],u[2]=p[2],u[3]=p[3],u[4]=p[4],u[5]=p[5],u[6]=+p[6]+r,u[7]=+p[7]+o;break;case"V":u[1]=+p[1]+o;break;case"H":u[1]=+p[1]+r;break;case"M":a=+p[1]+r,s=+p[2]+o;default:for(var g=1,O=p.length;g<O;g++)u[g]=+p[g]+(g%2?r:o)}else for(var j=0,E=p.length;j<E;j++)u[j]=p[j];switch(n=n.toUpperCase(),u[0]){case"Z":r=+a,o=+s;break;case"H":r=u[1];break;case"V":o=u[1];break;case"M":a=u[u.length-2],s=u[u.length-1];default:r=u[u.length-2],o=u[u.length-1]}}return i.toString=y,t.abs=x(i),i}function A(e){return e[0]===e[2]&&e[1]===e[3]&&e[4]===e[6]&&e[5]===e[7]}function R(e,t,n,i){return[e,t,n,i,n,i]}function k(e,t,n,i,r,o){return[1/3*e+2/3*n,1/3*t+2/3*i,1/3*r+2/3*n,1/3*o+2/3*i,r,o]}function B(e,t,n,i,r,s,c,u,l,d){var f,m,b=120*a/180,g=a/180*(+r||0),y=[],x=(m=function(e,t,n){return{x:e*o.cos(n)-t*o.sin(n),y:e*o.sin(n)+t*o.cos(n)}},function e(){var t=Array.prototype.slice.call(arguments,0),n=t.join("␀"),i=e.cache=e.cache||{},r=e.count=e.count||[];return h(i,n)?(v(r,n),i[n]):(r.length>=1e3&&delete i[r.shift()],r.push(n),i[n]=m.apply(0,t),i[n])});if(d)C=d[0],A=d[1],T=d[2],P=d[3];else{e=(f=x(e,t,-g)).x,t=f.y;var O=(e-(u=(f=x(u,l,-g)).x))/2,j=(t-(l=f.y))/2,E=O*O/(n*n)+j*j/(i*i);E>1&&(n*=E=o.sqrt(E),i*=E);var _=n*n,w=i*i,S=(s==c?-1:1)*o.sqrt(p((_*w-_*j*j-w*O*O)/(_*j*j+w*O*O))),T=S*n*j/i+(e+u)/2,P=S*-i*O/n+(t+l)/2,C=o.asin(((t-P)/i).toFixed(9)),A=o.asin(((l-P)/i).toFixed(9));(C=e<T?a-C:C)<0&&(C=2*a+C),(A=u<T?a-A:A)<0&&(A=2*a+A),c&&C>A&&(C-=2*a),!c&&A>C&&(A-=2*a)}var R=A-C;if(p(R)>b){var k=A,M=u,D=l;A=C+b*(c&&A>C?1:-1),y=B(u=T+n*o.cos(A),l=P+i*o.sin(A),n,i,r,0,c,M,D,[A,k,T,P])}R=A-C;var N=o.cos(C),L=o.sin(C),I=o.cos(A),F=o.sin(A),z=o.tan(R/4),V=4/3*n*z,$=4/3*i*z,H=[e,t],G=[e+V*L,t-$*N],W=[u+V*F,l-$*I],q=[u,l];if(G[0]=2*H[0]-G[0],G[1]=2*H[1]-G[1],d)return[G,W,q].concat(y);for(var U=[],K=0,Y=(y=[G,W,q].concat(y).join().split(",")).length;K<Y;K++)U[K]=K%2?x(y[K-1],y[K],g).y:x(y[K],y[K+1],g).x;return U}function M(e,t,n,i,r,a,u,l){for(var d,f,h,m,v,b,g,y,x=[],O=[[],[]],j=0;j<2;++j)if(0==j?(f=6*e-12*n+6*r,d=-3*e+9*n-9*r+3*u,h=3*n-3*e):(f=6*t-12*i+6*a,d=-3*t+9*i-9*a+3*l,h=3*i-3*t),p(d)<1e-12){if(p(f)<1e-12)continue;0<(m=-h/f)&&m<1&&x.push(m)}else g=f*f-4*h*d,y=o.sqrt(g),g<0||(0<(v=(-f+y)/(2*d))&&v<1&&x.push(v),0<(b=(-f-y)/(2*d))&&b<1&&x.push(b));for(var E,_=x.length,w=_;_--;)E=1-(m=x[_]),O[0][_]=E*E*E*e+3*E*E*m*n+3*E*m*m*r+m*m*m*u,O[1][_]=E*E*E*t+3*E*E*m*i+3*E*m*m*a+m*m*m*l;return O[0][w]=e,O[1][w]=t,O[0][w+1]=u,O[1][w+1]=l,O[0].length=O[1].length=w+2,{x0:s.apply(0,O[0]),y0:s.apply(0,O[1]),x1:c.apply(0,O[0]),y1:c.apply(0,O[1])}}function D(e){var t=b(e);if(t.curve)return x(t.curve);for(var n=C(e),i={x:0,y:0,bx:0,by:0,X:0,Y:0,qx:null,qy:null},o=function(e,t,n){var i,r;if(!e)return["C",t.x,t.y,t.x,t.y,t.x,t.y];switch(!(e[0]in{T:1,Q:1})&&(t.qx=t.qy=null),e[0]){case"M":t.X=e[1],t.Y=e[2];break;case"A":e=["C"].concat(B.apply(0,[t.x,t.y].concat(e.slice(1))));break;case"S":"C"==n||"S"==n?(i=2*t.x-t.bx,r=2*t.y-t.by):(i=t.x,r=t.y),e=["C",i,r].concat(e.slice(1));break;case"T":"Q"==n||"T"==n?(t.qx=2*t.x-t.qx,t.qy=2*t.y-t.qy):(t.qx=t.x,t.qy=t.y),e=["C"].concat(k(t.x,t.y,t.qx,t.qy,e[1],e[2]));break;case"Q":t.qx=e[1],t.qy=e[2],e=["C"].concat(k(t.x,t.y,e[1],e[2],e[3],e[4]));break;case"L":e=["C"].concat(R(t.x,t.y,e[1],e[2]));break;case"H":e=["C"].concat(R(t.x,t.y,e[1],t.y));break;case"V":e=["C"].concat(R(t.x,t.y,t.x,e[1]));break;case"Z":e=["C"].concat(R(t.x,t.y,t.X,t.Y))}return e},a=function(e,t){if(e[t].length>7){e[t].shift();for(var i=e[t];i.length;)s[t]="A",e.splice(t++,0,["C"].concat(i.splice(0,6)));e.splice(t,1),l=n.length}},s=[],c="",u="",p=0,l=n.length;p<l;p++){n[p]&&(c=n[p][0]),"C"!=c&&(s[p]=c,p&&(u=s[p-1])),n[p]=o(n[p],i,u),"A"!=s[p]&&"C"==c&&(s[p]="C"),a(n,p);var d=n[p],f=d.length;i.x=d[f-2],i.y=d[f-1],i.bx=r(d[f-4])||i.x,i.by=r(d[f-3])||i.y}return t.curve=x(n),n}e.exports=function(e,t,n){e=D(e),t=D(t);for(var i,r,o,a,s,c,u,p,l,d,f=n?0:[],h=0,m=e.length;h<m;h++){var v=e[h];if("M"==v[0])i=s=v[1],r=c=v[2];else{"C"==v[0]?(l=[i,r].concat(v.slice(1)),i=l[6],r=l[7]):(l=[i,r,i,r,s,c,s,c],i=s,r=c);for(var b=0,g=t.length;b<g;b++){var y=t[b];if("M"==y[0])o=u=y[1],a=p=y[2];else{"C"==y[0]?(d=[o,a].concat(y.slice(1)),o=d[6],a=d[7]):(d=[o,a,o,a,u,p,u,p],o=u,a=p);var x=P(l,d,n);if(n)f+=x;else{for(var O=0,j=x.length;O<j;O++)x[O].segment1=h,x[O].segment2=b,x[O].bez1=l,x[O].bez2=d;f=f.concat(x)}}}}}return f}},function(e,t,n){"use strict";function i(e){this._counter=0,this._prefix=(e?e+"-":"")+Math.floor(1e9*Math.random())+"-"}n.d(t,"a",(function(){return i})),i.prototype.next=function(){return this._prefix+ ++this._counter}},function(e,t,n){var i=n(933),r=n(745);e.exports=function(e,t){return e&&i(e,t,r)}},function(e,t,n){(function(t){var i=n(123).default,r="object"==(void 0===t?"undefined":i(t))&&t&&t.Object===Object&&t;e.exports=r}).call(this,n(126))},function(e,t){e.exports=function(e){return function(t){return e(t)}}},function(e,t,n){var i=n(806),r=n(943),o=Object.prototype.hasOwnProperty;e.exports=function(e){if(!i(e))return r(e);var t=[];for(var n in Object(e))o.call(e,n)&&"constructor"!=n&&t.push(n);return t}},function(e,t){e.exports=function(e,t){return function(n){return e(t(n))}}},function(e,t,n){var i=n(783),r=n(955),o=n(956),a=n(957),s=n(958),c=n(959);function u(e){var t=this.__data__=new i(e);this.size=t.size}u.prototype.clear=r,u.prototype.delete=o,u.prototype.get=a,u.prototype.has=s,u.prototype.set=c,e.exports=u},function(e,t,n){n(0),n(15),n(0),n(15);var i=Function.prototype.toString;e.exports=function(e){if(null!=e){try{return i.call(e)}catch(e){}try{return e+""}catch(e){}}return""}},function(e,t,n){var i=n(976),r=n(752);e.exports=function e(t,n,o,a,s){return t===n||(null==t||null==n||!r(t)&&!r(n)?t!=t&&n!=n:i(t,n,o,a,e,s))}},function(e,t,n){var i=n(810),r=n(979),o=n(811);e.exports=function(e,t,n,a,s,c){var u=1&n,p=e.length,l=t.length;if(p!=l&&!(u&&l>p))return!1;var d=c.get(e),f=c.get(t);if(d&&f)return d==t&&f==e;var h=-1,m=!0,v=2&n?new i:void 0;for(c.set(e,t),c.set(t,e);++h<p;){var b=e[h],g=t[h];if(a)var y=u?a(g,b,h,t,e,c):a(b,g,h,e,t,c);if(void 0!==y){if(y)continue;m=!1;break}if(v){if(!r(t,(function(e,t){if(!o(v,t)&&(b===e||s(b,e,n,a,c)))return v.push(t)}))){m=!1;break}}else if(b!==g&&!s(b,g,n,a,c)){m=!1;break}}return c.delete(e),c.delete(t),m}},function(e,t){e.exports=function(e,t){for(var n=-1,i=t.length,r=e.length;++n<i;)e[r+n]=t[n];return e}},function(e,t,n){n(305),n(0),n(305),n(306),n(0);var i=n(988),r=n(808),o=n(989),a=n(855),s=n(856),c=n(761),u=n(850),p=u(i),l=u(r),d=u(o),f=u(a),h=u(s),m=c;(i&&"[object DataView]"!=m(new i(new ArrayBuffer(1)))||r&&"[object Map]"!=m(new r)||o&&"[object Promise]"!=m(o.resolve())||a&&"[object Set]"!=m(new a)||s&&"[object WeakMap]"!=m(new s))&&(m=function(e){var t=c(e),n="[object Object]"==t?e.constructor:void 0,i=n?u(n):"";if(i)switch(i){case p:return"[object DataView]";case l:return"[object Map]";case d:return"[object Promise]";case f:return"[object Set]";case h:return"[object WeakMap]"}return t}),e.exports=m},function(e,t,n){var i=n(753)(n(738),"Set");e.exports=i},function(e,t,n){var i=n(753)(n(738),"WeakMap");e.exports=i},function(e,t,n){var i=n(743);e.exports=function(e){return e==e&&!i(e)}},function(e,t){e.exports=function(e,t){return function(n){return null!=n&&(n[e]===t&&(void 0!==t||e in Object(n)))}}},function(e,t,n){var i=n(860);e.exports=function(e,t,n){var r=null==e?void 0:i(e,t);return void 0===r?n:r}},function(e,t,n){var i=n(861),r=n(790);e.exports=function(e,t){for(var n=0,o=(t=i(t,e)).length;null!=e&&n<o;)e=e[r(t[n++])];return n&&n==o?e:void 0}},function(e,t,n){var i=n(734),r=n(814),o=n(992),a=n(995);e.exports=function(e,t){return i(e)?e:r(e,t)?[e]:o(a(e))}},function(e,t,n){var i=n(1013),r=n(864)(i);e.exports=r},function(e,t,n){var i=n(753),r=function(){try{var e=i(Object,"defineProperty");return e({},"",{}),e}catch(e){}}();e.exports=r},function(e,t){var n=Date.now;e.exports=function(e){var t=0,i=0;return function(){var r=n(),o=16-(r-i);if(i=r,o>0){if(++t>=800)return arguments[0]}else t=0;return e.apply(void 0,arguments)}}},function(e,t){e.exports=function(e,t,n,i){for(var r=e.length,o=n+(i?1:-1);i?o--:++o<r;)if(t(e[o],o,e))return o;return-1}},function(e,t){e.exports=function(e,t,n){for(var i=-1,r=null==e?0:e.length;++i<r;)if(n(t,e[i]))return!0;return!1}},function(e,t,n){var i=n(853),r=n(1020);e.exports=function e(t,n,o,a,s){var c=-1,u=t.length;for(o||(o=r),s||(s=[]);++c<u;){var p=t[c];n>0&&o(p)?n>1?e(p,n-1,o,a,s):i(s,p):a||(s[s.length]=p)}return s}},function(e,t){e.exports=function(){}},function(e,t,n){n(14),n(14);var i=n(1026),r=n(743),o=n(788),a=/^[-+]0x[0-9a-f]+$/i,s=/^0b[01]+$/i,c=/^0o[0-7]+$/i,u=parseInt;e.exports=function(e){if("number"==typeof e)return e;if(o(e))return NaN;if(r(e)){var t="function"==typeof e.valueOf?e.valueOf():e;e=r(t)?t+"":t}if("string"!=typeof e)return 0===e?e:+e;e=i(e);var n=s.test(e);return n||c.test(e)?u(e.slice(2),n?2:8):a.test(e)?NaN:+e}},function(e,t,n){"use strict";function i(e,t){return{start:e,end:void 0===t?e:t}}e.exports=function(e,t,n){var r=e.start,o=r,a=n.length-t.length,s=(n.length,t.length,t.substring(r));return n.lastIndexOf(s)===n.length-s.length&&(t=t.substring(0,t.length-s.length),n=n.substring(0,n.length-s.length)),(a=function(e,t){var n,i,r,o,a,s=0,c=0;t.length>e.length?(i=t,o=e):(i=e,o=t);for(;s<i.length;)r=i.charAt(s),a=o.charAt(c),r!==a?(n||(n={l_start:s,s_start:c}),s++):(n&&!n.complete&&(n.l_end=s,n.s_end=c,n.complete=!0),c++,s++);n&&!n.complete&&(n.complete=!0,n.s_end=o.length,n.l_end=i.length);if(!n)return;return t.length>e.length?{newStart:n.l_start,newEnd:n.l_end,type:"add"}:{newStart:n.s_start,newEnd:n.s_end,type:t.length<e.length?"remove":"replace"}}(t,n))&&(o="remove"===a.type?a.newStart:a.newEnd),i(o)},e.exports.range=i},function(e,t,n){var i=n(867);e.exports=function(e){return(null==e?0:e.length)?i(e,1/0):[]}},function(e,t,n){var i=n(1038);e.exports=function(e){var t=i(e),n=t%1;return t==t?n?t-n:t:0}},function(e,t,n){var i=n(818),r=n(785),o=Object.prototype.hasOwnProperty;e.exports=function(e,t,n){var a=e[t];o.call(e,t)&&r(a,n)&&(void 0!==n||t in e)||i(e,t,n)}},function(e,t,n){"use strict";function i(e,t){var n=this;t=t||1e3,e.on("propertiesPanel.isEntryVisible",t,(function(e){return n.isEntryVisible(e.entry,e.element)})),e.on("propertiesPanel.isPropertyEditable",t,(function(e){return n.isPropertyEditable(e.entry,e.propertyName,e.element)}))}i.$inject=["eventBus"],e.exports=i,i.prototype.isEntryVisible=function(e,t){return!0},i.prototype.isPropertyEditable=function(e,t,n){return!0}},function(e,t,n){"use strict";n(23),n(6),n(10),n(23),n(6),n(10);var i=n(729).escapeHTML,r=n(723).query,o=n(755);e.exports=function(e,t){var n=t,a=e.label||n.id,s=e.dataValueLabel,c=e.buttonLabel||"X",u=void 0!==e.buttonAction?e.buttonAction.name:"clear",p=void 0!==e.buttonAction?e.buttonAction.method:function(t,n){return r('input[name="'+e.modelProperty+'"]',n).value="",!0},l=void 0!==e.buttonShow?e.buttonShow.name:"canClear",d=void 0!==e.buttonShow?e.buttonShow.method:function(t,n){return""!==r('input[name="'+e.modelProperty+'"]',n).value},f=!!e.disabled&&"function"==typeof e.disabled,h=!!e.hidden&&"function"==typeof e.hidden,m=e.description;return n.html='<label for="camunda-'+i(n.id)+'" '+(f?'data-disable="isDisabled" ':"")+(h?'data-show="isHidden" ':"")+(s?'data-value="'+i(s)+'"':"")+">"+i(a)+'</label><div class="bpp-field-wrapper" '+(f?'data-disable="isDisabled"':"")+(h?'data-show="isHidden"':"")+'><input id="camunda-'+i(n.id)+'" type="text" name="'+i(e.modelProperty)+'" '+(f?'data-disable="isDisabled"':"")+(h?'data-show="isHidden"':"")+' /><button class="'+i(u)+'" data-action="'+i(u)+'" data-show="'+i(l)+'" '+(f?'data-disable="isDisabled"':"")+(h?' data-show="isHidden"':"")+"><span>"+i(c)+"</span></button></div>","assignee"!=n.id&&"candidateUsers"!=n.id&&"candidateGroups"!=n.id&&"assigneePage"!=n.id&&"taskRight"!==n.id||(n.html='<label for="camunda-'+i(n.id)+'" '+(f?'data-disable="isDisabled" ':"")+(h?'data-show="isHidden" ':"")+(s?'data-value="'+i(s)+'"':"")+">"+i(a)+'</label><div class="bpp-field-wrapper" '+(f?'data-disable="isDisabled"':"")+(h?'data-show="isHidden"':"")+'><input id="camunda-'+i(n.id)+'" type="text" placeholder="请选择" readonly="readonly" name="'+i(e.modelProperty)+'" '+(f?'data-disable="isDisabled"':"")+(h?'data-show="isHidden"':"")+' /><input class="camunda-object-name" id="camunda-'+i(n.id)+'-name"data-key="camunda-'+i(n.id)+'" type="text" placeholder="请选择" readonly="readonly" name="'+(-1!==i(e.modelProperty).indexOf("camunda:")?i(e.modelProperty):"camunda:"+i(e.modelProperty))+'-name" '+(f?'data-disable="isDisabled"':"")+(h?'data-show="isHidden"':"")+' /><button class="'+i(u)+'" data-action="'+i(u)+'" data-show="'+i(l)+'" '+(f?'data-disable="isDisabled"':"")+(h?' data-show="isHidden"':"")+"><span>"+i(c)+"</span></button></div>"),m&&(n.html+=o(m)),n[u]=p,n[l]=d,f&&(n.isDisabled=function(){return e.disabled.apply(n,arguments)}),h&&(n.isHidden=function(){return!e.hidden.apply(n,arguments)}),n.cssClasses=["bpp-textfield"],n}},function(e,t,n){"use strict";n(0),n(21),n(23),n(6),n(10),n(0),n(21),n(23),n(6),n(10);var i=n(729).escapeHTML,r=n(723).domify,o=n(731),a=n(755);e.exports=function(e,t){var n=t,s=e.label||n.id,c=e.selectOptions||[{name:"",value:""}],u=e.modelProperty,p=e.emptyParameter,l=!!e.disabled&&"function"==typeof e.disabled,d=!!e.hidden&&"function"==typeof e.hidden,f=e.description;return p&&(c=c.concat([{name:"",value:""}])),n.html='<label for="camunda-'+i(n.id)+'"'+(l?'data-disable="isDisabled" ':"")+(d?'data-show="isHidden" ':"")+">"+i(s)+'</label><select id="camunda-'+i(n.id)+'-select" name="'+i(u)+'"'+(l?'data-disable="isDisabled" ':"")+(d?'data-show="isHidden" ':"")+" data-value>",function(e){return!(!e||"[object Array]"!==Object.prototype.toString.call(e))}(c)&&o(c,(function(e){n.html+='<option value="'+i(e.value)+'">'+(e.name?i(e.name):"")+"</option>"})),n.html+="</select>",f&&"function"!=typeof e.showCustomInput&&(n.html+=a(f)),n.setControlValue=function(e,t,n,i,a){if("function"==typeof c){var s=c(e,n);if(s){for(;n.firstChild;)n.removeChild(n.firstChild);o(s,(function(e){var t=r(function(e){return'<option value="'+e.value+'">'+e.name+"</option>"}(e));n.appendChild(t)}))}}void 0!==a&&(n.value=a)},l&&(n.isDisabled=function(){return e.disabled.apply(n,arguments)}),d&&(n.isHidden=function(){return!e.hidden.apply(n,arguments)}),n.cssClasses=["bpp-dropdown"],n}},function(e,t,n){var i=n(763),r=n(878),o=r?function(e,t){return r.set(e,t),e}:i;e.exports=o},function(e,t,n){var i=n(856),r=i&&new i;e.exports=r},function(e,t,n){var i=n(880),r=n(881),o=n(1061),a=n(792),s=n(882),c=n(823),u=n(1070),p=n(793),l=n(738);e.exports=function e(t,n,d,f,h,m,v,b,g,y){var x=128&n,O=1&n,j=2&n,E=24&n,_=512&n,w=j?void 0:a(t);return function S(){for(var T=arguments.length,P=Array(T),C=T;C--;)P[C]=arguments[C];if(E)var A=c(S),R=o(P,A);if(f&&(P=i(P,f,h,E)),m&&(P=r(P,m,v,E)),T-=R,E&&T<y){var k=p(P,A);return s(t,n,e,S.placeholder,d,P,k,b,g,y-T)}var B=O?d:this,M=j?B[t]:t;return T=P.length,b?P=u(P,b):_&&T>1&&P.reverse(),x&&g<T&&(P.length=g),this&&this!==l&&this instanceof S&&(M=w||a(M)),M.apply(B,P)}}},function(e,t){var n=Math.max;e.exports=function(e,t,i,r){for(var o=-1,a=e.length,s=i.length,c=-1,u=t.length,p=n(a-s,0),l=Array(u+p),d=!r;++c<u;)l[c]=t[c];for(;++o<s;)(d||o<a)&&(l[i[o]]=e[o]);for(;p--;)l[c++]=e[o++];return l}},function(e,t){var n=Math.max;e.exports=function(e,t,i,r){for(var o=-1,a=e.length,s=-1,c=i.length,u=-1,p=t.length,l=n(a-c,0),d=Array(l+p),f=!r;++o<l;)d[o]=e[o];for(var h=o;++u<p;)d[h+u]=t[u];for(;++s<c;)(f||o<a)&&(d[h+i[s]]=e[o++]);return d}},function(e,t,n){var i=n(1062),r=n(886),o=n(887);e.exports=function(e,t,n,a,s,c,u,p,l,d){var f=8&t;t|=f?32:64,4&(t&=~(f?64:32))||(t&=-4);var h=[e,t,s,f?c:void 0,f?u:void 0,f?void 0:c,f?void 0:u,p,l,d],m=n.apply(void 0,h);return i(e)&&r(m,h),m.placeholder=a,o(m,e,t)}},function(e,t,n){var i=n(878),r=n(868),o=i?function(e){return i.get(e)}:r;e.exports=o},function(e,t,n){var i=n(782),r=n(822);function o(e,t){this.__wrapped__=e,this.__actions__=[],this.__chain__=!!t,this.__index__=0,this.__values__=void 0}o.prototype=i(r.prototype),o.prototype.constructor=o,e.exports=o},function(e,t){e.exports=function(e,t){var n=-1,i=e.length;for(t||(t=Array(i));++n<i;)t[n]=e[n];return t}},function(e,t,n){var i=n(877),r=n(864)(i);e.exports=r},function(e,t,n){var i=n(1067),r=n(1068),o=n(862),a=n(1069);e.exports=function(e,t,n){var s=t+"";return o(e,r(s,a(i(s),n)))}},function(e,t,n){"use strict";var i=n(720).is,r=n(720).getBusinessObject,o=n(724),a={};e.exports=a,a.modifyProcessBusinessObject=function(e,t,n){if(!i(e,"bpmn:Participant"))return{};var a=r(e).get("processRef"),s={};return s[t]=n[t],o.updateBusinessObject(e,a,s)},a.getProcessBusinessObject=function(e,t){if(!i(e,"bpmn:Participant"))return{};var n=r(e).get("processRef"),o={};return o[t]=n.get(t),o}},function(e,t,n){"use strict";var i=n(725);e.exports=function(e,t,n){var r=(t=t||{}).id||"name",o=t.label||n("Name"),a=t.modelProperty||"name";return[i.textBox({id:r,label:o,modelProperty:a,get:t.get,set:t.set})]}},function(e,t,n){"use strict";n(11),n(0),n(8),n(0),n(8);var i=n(732),r=n(724),o=n(725);function a(e){if(e)return void 0!==e.get("timeDate")?"timeDate":void 0!==e.get("timeCycle")?"timeCycle":void 0!==e.get("timeDuration")?"timeDuration":void 0}function s(e,t,n){return"function"==typeof e?e(t,n):e}e.exports=function(e,t,n,c,u,p){var l=[{value:"timeDate",name:u("Date")},{value:"timeDuration",name:u("Duration")},{value:"timeCycle",name:u("Cycle")}],d=p&&p.idPrefix,f=p&&p.createTimerEventDefinition;e.entries.push(o.selectBox({id:d+"timer-event-definition-type",label:u("Timer Definition Type"),selectOptions:l,emptyParameter:!0,modelProperty:"timerDefinitionType",get:function(e,t){return{timerDefinitionType:a(s(c,e,t))||""}},set:function(e,t,o){var u={timeDuration:void 0,timeDate:void 0,timeCycle:void 0},p=s(c,e,o),l=t.timerDefinitionType;if(p||"function"!=typeof f||(p=f(e,o)),t.timerDefinitionType){var d,h=a(p);if(h)d=p.get(h).get("body");u[l]=function(e,t,n){return t=t||void 0,i.createElement("bpmn:FormalExpression",{body:t},e,n)}(p,d,n)}return r.updateBusinessObject(e,p,u)},hidden:function(e,t){return void 0===s(c,e,t)}})),e.entries.push(o.textField({id:d+"timer-event-definition",label:u("Timer Definition"),modelProperty:"timerDefinition",get:function(e,t){var n=s(c,e,t),i=a(n),r=i&&n.get(i);return{timerDefinition:r&&r.get("body")}},set:function(e,t,n){var i=s(c,e,n),o=a(i),u=o&&i.get(o);if(u)return r.updateBusinessObject(e,u,{body:t.timerDefinition||void 0})},validate:function(e,t){var n=s(c,e,t),i=a(n),r=i&&n.get(i);if(r&&!r.get("body"))return{timerDefinition:u("Must provide a value")}},hidden:function(e,t){return!a(s(c,e,t))}}))}},function(e,t,n){"use strict";n(43),n(21),n(43),n(21);var i=n(724),r=n(725),o=n(732),a=n(739),s=n(892),c=n(720).getBusinessObject,u=n(720).is,p=n(731),l={bpmn:{element:"calledElement",binding:"camunda:calledElementBinding",version:"camunda:calledElementVersion",versionTag:"camunda:calledElementVersionTag",tenantId:"camunda:calledElementTenantId"},cmmn:{element:"camunda:caseRef",binding:"camunda:caseBinding",version:"camunda:caseVersion",tenantId:"camunda:caseTenantId"},dmn:{element:"camunda:decisionRef",binding:"camunda:decisionRefBinding",version:"camunda:decisionRefVersion",versionTag:"camunda:decisionRefVersionTag",tenantId:"camunda:decisionRefTenantId"}},d=[{name:"singleEntry (TypedValue)",value:"singleEntry"},{name:"singleResult (Map<String, Object>)",value:"singleResult"},{name:"collectEntries (List<Object>)",value:"collectEntries"},{name:"resultList (List<Map<String, Object>>)",value:"resultList"}],f=[{name:"variableMappingClass",value:"variableMappingClass"},{name:"variableMappingDelegateExpression",value:"variableMappingDelegateExpression"}];function h(e){var t=[],n=c(e),i=a.getExtensionElements(n,"camunda:In");return i&&p(i,(function(e){void 0!==e.businessKey&&t.push(e)})),t}function m(e,t,n){var r=[],a=h(e);if(a.length)r.push(i.updateBusinessObject(e,a[0],{businessKey:t}));else{var s=c(e),u=s.extensionElements;u||(u=o.createElement("bpmn:ExtensionElements",{values:[]},s,n),r.push(i.updateProperties(e,{extensionElements:u})));var p=o.createElement("camunda:In",{businessKey:t},u,n);r.push(i.addAndRemoveElementsFromList(e,u,"values","extensionElements",[p],[]))}return r}function v(e){return-1!==["bpmn","cmmn","dmn"].indexOf(e)}e.exports=function(e,t,n,o){var b=[{name:o("latest"),value:"latest"},{name:o("deployment"),value:"deployment"},{name:o("version"),value:"version"},{name:o("versionTag"),value:"versionTag"}],g=n.getCallableType,y=[];function x(e,t){var n=g(e);return(l[n]||{})[t]}function O(e){var t=g(e),n=c(e),i=(l[t]||{}).binding;return n.get(i)}function j(e){var t=c(e),n=t.get("camunda:variableMappingClass"),i=t.get("camunda:variableMappingDelegateExpression"),r="";return void 0!==n?r="variableMappingClass":void 0!==i&&(r="variableMappingDelegateExpression"),r}return y.push(r.textField({id:"callable-element-ref",dataValueLabel:"callableElementLabel",modelProperty:"callableElementRef",get:function(e,t){var n,i=x(e,"element");i&&(n=c(e).get(i));var r="",a=g(e);return"bpmn"===a?r=o("Called Element"):"cmmn"===a?r=o("Case Ref"):"dmn"===a&&(r=o("Decision Ref")),{callableElementRef:n,callableElementLabel:r}},set:function(e,t,n){var r=t.callableElementRef,o={};return o[x(e,"element")]=r||"",i.updateProperties(e,o)},validate:function(e,t,n){var i=t.callableElementRef;return v(g(e))&&!i?{callableElementRef:o("Must provide a value")}:{}},hidden:function(e,t){return!v(g(e))}})),y.push(r.selectBox({id:"callable-binding",label:o("Binding"),selectOptions:function(e){return"cmmn"===g(e)?b.filter((function(e){return"versionTag"!==e.value})):b},modelProperty:"callableBinding",get:function(e,t){var n,i=x(e,"binding");i&&(n=c(e).get(i)||"latest");return{callableBinding:n}},set:function(e,t,n){var r=t.callableBinding,o=x(e,"binding"),a=x(e,"version"),s=x(e,"versionTag"),c={};return c[o]=r,c[a]=void 0,c[s]=void 0,i.updateProperties(e,c)},hidden:function(e,t){return!v(g(e))}})),y.push(r.textField({id:"callable-version",label:o("Version"),modelProperty:"callableVersion",get:function(e,t){var n,i=x(e,"version");i&&(n=c(e).get(i));return{callableVersion:n}},set:function(e,t,n){var r=t.callableVersion,o={};return o[x(e,"version")]=r||void 0,i.updateProperties(e,o)},validate:function(e,t,n){var i=t.callableVersion;return v(g(e))&&"version"===O(e)&&(i?{}:{callableVersion:o("Must provide a value")})},hidden:function(e,t){return!v(g(e))||"version"!==O(e)}})),y.push(r.textField({id:"callable-version-tag",label:o("Version Tag"),modelProperty:"versionTag",get:function(e,t){var n,i=x(e,"versionTag");i&&(n=c(e).get(i));return{versionTag:n}},set:function(e,t,n){var r=t.versionTag,o={};return o[x(e,"versionTag")]=r||void 0,i.updateProperties(e,o)},validate:function(e,t,n){var i=t.versionTag;return v(g(e))&&"versionTag"===O(e)&&(i?{}:{versionTag:o("Must provide a value")})},hidden:function(e,t){return!v(g(e))||"versionTag"!==O(e)}})),y.push(r.textField({id:"tenant-id",label:o("Tenant Id"),modelProperty:"tenantId",get:function(e,t){var n,i=x(e,"tenantId");i&&(n=c(e).get(i));return{tenantId:n}},set:function(e,t,n){var r=t.tenantId,o={};return o[x(e,"tenantId")]=r||void 0,i.updateProperties(e,o)},hidden:function(e,t){return!v(g(e))}})),u(c(e),"bpmn:CallActivity")&&y.push(r.checkbox({id:"callable-business-key",label:o("Business Key"),modelProperty:"callableBusinessKey",get:function(e,t){var n=h(e);return{callableBusinessKey:!!(n&&n.length>0)}},set:function(e,n,i){return n.callableBusinessKey?m(e,"#{execution.processBusinessKey}",t):function(e){var t=h(e),n=[];return p(t,(function(t){n.push(a.removeEntry(c(e),e,t))})),n}(e)}})),y.push(r.textField({id:"business-key-expression",label:o("Business Key Expression"),modelProperty:"businessKey",get:function(e,t){var n=h(e);return{businessKey:n.length?n[0].get("camunda:businessKey"):void 0}},set:function(e,n,i){return m(e,n.businessKey,t)},validate:function(e,t,n){return""===t.businessKey?{businessKey:o("Must provide a value")}:{}},hidden:function(e,t){return!h(e).length}})),(y=y.concat(s(e,t,{id:"dmn-resultVariable",getBusinessObject:c,getImplementationType:g,hideResultVariable:function(e,t){return"dmn"!==g(e)}},o))).push(r.selectBox({id:"dmn-map-decision-result",label:o("Map Decision Result"),selectOptions:d,modelProperty:"mapDecisionResult",get:function(e,t){return{mapDecisionResult:c(e).get("camunda:mapDecisionResult")||"resultList"}},set:function(e,t,n){return i.updateProperties(e,{"camunda:mapDecisionResult":t.mapDecisionResult||"resultList"})},hidden:function(e,t){var n=c(e).get("camunda:resultVariable");return!("dmn"===g(e)&&void 0!==n)}})),y.push(r.selectBox({id:"delegateVariableMappingType",label:o("Delegate Variable Mapping"),selectOptions:f,emptyParameter:!0,modelProperty:"delegateVariableMappingType",get:function(e,t){return{delegateVariableMappingType:j(e)}},set:function(e,t,n){var r=t.delegateVariableMappingType,o={"camunda:variableMappingClass":void 0,"camunda:variableMappingDelegateExpression":void 0};return"variableMappingClass"===r?o["camunda:variableMappingClass"]="":"variableMappingDelegateExpression"===r&&(o["camunda:variableMappingDelegateExpression"]=""),i.updateProperties(e,o)},hidden:function(e,t){return"bpmn"!==g(e)}})),y.push(r.textField({id:"delegateVariableMapping",dataValueLabel:"delegateVariableMappingLabel",modelProperty:"delegateVariableMapping",get:function(e,t){var n=c(e),i="",r=void 0,a=j(e);return"variableMappingClass"===a?(i=o("Class"),r=n.get("camunda:variableMappingClass")):"variableMappingDelegateExpression"===a&&(i=o("Delegate Expression"),r=n.get("camunda:variableMappingDelegateExpression")),{delegateVariableMapping:r,delegateVariableMappingLabel:i}},set:function(e,t,n){var r=t.delegateVariableMapping,o={};return o["camunda:"+j(e)]=r||void 0,i.updateProperties(e,o)},validate:function(e,t,n){var i=t.delegateVariableMapping;return"bpmn"===g(e)&&(i?{}:{delegateVariableMapping:o("Must provide a value")})},hidden:function(e,t){return!("bpmn"===g(e)&&""!==j(e))}})),y}},function(e,t,n){"use strict";var i=n(720).is,r=n(740),o=n(725),a=n(724);e.exports=function(e,t,n,s){var c=n.getBusinessObject,u=n.hideResultVariable,p=n.id||"resultVariable",l=o.textField({id:p,label:s("Result Variable"),modelProperty:"resultVariable",get:function(e,t){return{resultVariable:c(e).get("camunda:resultVariable")}},set:function(e,t,n){var o=c(e),s=t.resultVariable||void 0,u={"camunda:resultVariable":s};return i(o,"camunda:DmnCapable")&&!s&&(u=r({"camunda:mapDecisionResult":"resultList"},u)),a.updateBusinessObject(e,o,u)},hidden:function(e,t){if("function"==typeof u)return u.apply(l,arguments)}});return[l]}},function(e,t,n){"use strict";var i=n(740),r=n(725),o=n(820),a=n(747),s=n(724);function c(e){return o.isAsyncBefore(e)}function u(e){return o.isAsyncAfter(e)}function p(e){return o.isExclusive(e)}function l(e,t){return o.removeFailedJobRetryTimeCycle(e,t)}function d(e){return!a.getTimerEventDefinition(e)}e.exports=function(e,t,n,o){var a=n.getBusinessObject,f=n.idPrefix||"",h=n.labelPrefix||"";return[r.checkbox({id:f+"asyncBefore",label:h+o("Asynchronous Before"),modelProperty:"asyncBefore",get:function(e,t){return{asyncBefore:c(a(e))}},set:function(e,t){var n=a(e),r=!!t.asyncBefore,o={"camunda:asyncBefore":r,"camunda:async":!1},c=[];return u(n)||r||(o=i({"camunda:exclusive":!0},o),d(e)&&c.push(l(n,e))),c.push(s.updateBusinessObject(e,n,o)),c}}),r.checkbox({id:f+"asyncAfter",label:h+o("Asynchronous After"),modelProperty:"asyncAfter",get:function(e,t){return{asyncAfter:u(a(e))}},set:function(e,t){var n=a(e),r=!!t.asyncAfter,o={"camunda:asyncAfter":r},u=[];return c(n)||r||(o=i({"camunda:exclusive":!0},o),d(e)&&u.push(l(n,e))),u.push(s.updateBusinessObject(e,n,o)),u}}),r.checkbox({id:f+"exclusive",label:h+o("Exclusive"),modelProperty:"exclusive",get:function(e,t){return{exclusive:p(a(e))}},set:function(e,t){var n=a(e);return s.updateBusinessObject(e,n,{"camunda:exclusive":!!t.exclusive})},hidden:function(e){var t=a(e);return t&&!u(t)&&!c(t)}})]}},function(e,t,n){"use strict";var i=n(720).is,r=n(725),o=n(820),a=n(732),s=n(747),c=n(724);function u(e){return o.getFailedJobRetryTimeCycle(e)}e.exports=function(e,t,n,p){var l=n.getBusinessObject,d=n.idPrefix||"",f=n.labelPrefix||"";return[r.textField({id:d+"retryTimeCycle",label:f+p("Retry Time Cycle"),modelProperty:"cycle",get:function(e,t){var n=u(l(e));return{cycle:n&&n.get("body")}},set:function(e,n,i){var r=n.cycle,s=l(e);if(""===r||void 0===r)return function(e,t){return o.removeFailedJobRetryTimeCycle(e,t)}(s,e);var p=u(s);if(!p){var d=[],f=s.get("extensionElements");return f||(f=function(e,t){return a.createElement("bpmn:ExtensionElements",{values:[]},e,t)}(s,t),d.push(c.updateBusinessObject(e,s,{extensionElements:f}))),p=function(e,t,n){return a.createElement("camunda:FailedJobRetryTimeCycle",{body:n},e,t)}(f,t,r),d.push(c.addAndRemoveElementsFromList(e,f,"values","extensionElements",[p],[])),d}return c.updateBusinessObject(e,p,{body:r})},hidden:function(e){var t=l(e);return(!t||!function(e){return o.isAsyncBefore(e)}(t)&&!function(e){return o.isAsyncAfter(e)}(t))&&(!i(e,"bpmn:Event")||!s.getTimerEventDefinition(e))}})]}},function(e,t,n){"use strict";n(11),n(0),n(8),n(0),n(8);var i=n(720).getBusinessObject,r=n(720).is,o=n(725),a=n(732),s=n(739),c=n(724),u=n(729),p=n(740),l=n(731),d=n(754);function f(e){var t=e&&h(e);return t&&t.values?t.values:[]}function h(e){return m(e)?d(e.values,(function(e){return r(e,"camunda:Properties")})):e.properties}function m(e){return r(e,"bpmn:ExtensionElements")}e.exports=function(e,t,n,d){var v=n.getParent,b=n.modelProperties,g=n.createParent,y=i(e);if(r(e,"bpmn:Participant")&&(y=y.get("processRef")),y)return p(n,{addLabel:d("Add Property"),getElements:function(e,t){return f(v(e,t,y))},addElement:function(e,n){var i=[],r=v(e,n,y);if(!r&&"function"==typeof g){var o=g(e,y);r=o.parent,i.push(o.cmd)}var s=h(r);s||(s=a.createElement("camunda:Properties",{},r,t),m(r)?i.push(c.addAndRemoveElementsFromList(e,r,"values","extensionElements",[s],[])):i.push(c.updateBusinessObject(e,r,{properties:s})));var p={};l(b,(function(e){p[e]=void 0})),b.indexOf("id")>=0&&(p.id=u.nextId("Property_"));var d=a.createElement("camunda:Property",p,s,t);return i.push(c.addElementsTolist(e,s,"values",[d])),i},updateElement:function(e,t,n,i){var r=f(v(e,n,y))[i];return l(b,(function(e){t[e]=t[e]||void 0})),c.updateBusinessObject(e,r,t)},validate:function(e,t,n,i){if(b.indexOf("id")>=0){var r=f(v(e,n,y))[i];if(r){var o=u.isIdValid(r,t.id,d);if(o)return{id:o}}}},removeElement:function(e,t,n){var i=[],o=v(e,t,y),a=h(o),u=f(o),p=u[n];return i.push(c.removeElementsFromList(e,a,"values",null,[p])),1===u.length&&(m(o)?l(o.values,(function(t){r(t,"camunda:Properties")&&i.push(s.removeEntry(y,e,t))})):i.push(c.updateBusinessObject(e,o,{properties:void 0}))),i}}),o.table(n)}},function(e,t,n){"use strict";n(23),n(23);var i=n(739),r=n(732),o=n(724),a=n(729),s=n(725),c=n(765),u=n(720).getBusinessObject,p=n(740),l={stringValue:void 0,string:void 0,expression:void 0};e.exports=function(e,t,n,d){var f=!!(d=d||{}).insideListener,h=d.idPrefix||"",m=d.getSelectedListener,v=d.businessObject||u(e),b=[],g=function(e,t){return y(e,t)};function y(e,t){var n=j.getSelected(e,t.parentNode);if(-1!==n.idx)return x(e,t)[n.idx]}function x(e,t){return f?function(e,t){var n=m(e,t);return n&&n.fields||[]}(e,t):v&&i.getExtensionElements(v,"camunda:Field")||[]}function O(e){var t="string",n=e&&e.expression;return void 0!==(e&&(e.string||e.stringValue))?t="string":void 0!==n&&(t="expression"),t}var j=c(e,t,{id:h+"fields",label:n("Fields"),modelProperty:"fieldName",idGeneration:"false",businessObject:v,createExtensionElement:function(e,n,i,a){var s,c={name:"",string:""};if(f){var u=m(e,a);return s=r.createElement("camunda:Field",c,u,t),o.addElementsTolist(e,u,"fields",[s])}return s=r.createElement("camunda:Field",c,n,t),o.addElementsTolist(e,n,"values",[s])},removeExtensionElement:function(e,t,n,r,a){var s=x(e,a)[r];if(s){if(!f)return i.removeEntry(v,e,s);var c=m(e,a);return o.removeElementsFromList(e,c,"fields",null,[s])}},getExtensionElements:function(e,t){return x(e,t)},setOptionLabelValue:function(e,t,n,i,r,o){var a=x(e,t)[o],s=o+" : "+(a.name?a.name:"<empty>");n.text=s}});b.push(j),b.push(s.validationAwareTextField({id:h+"field-name",label:n("Name"),modelProperty:"fieldName",getProperty:function(e,t){return(y(e,t)||{}).name},setProperty:function(e,t,n){var i=y(e,n);return o.updateBusinessObject(e,i,{name:t.fieldName})},validate:function(e,t,i){var r={};if(y(e,i)){var o=t.fieldName;o?a.containsSpace(o)&&(r.fieldName=n("Name must not contain spaces")):r.fieldName=n("Parameter must have a name")}return r},hidden:function(e,t){return!g(e,t)}}));var E=[{name:n("String"),value:"string"},{name:n("Expression"),value:"expression"}];return b.push(s.selectBox({id:h+"field-type",label:n("Type"),selectOptions:E,modelProperty:"fieldType",get:function(e,t){return{fieldType:O(y(e,t))}},set:function(e,t,n){var i=p({},l),r=t.fieldType;return"string"===r?i.string="":"expression"===r&&(i.expression=""),o.updateBusinessObject(e,y(e,n),i)},hidden:function(e,t){return!g(e,t)}})),b.push(s.textBox({id:h+"field-value",label:n("Value"),modelProperty:"fieldValue",get:function(e,t){var n,i=y(e,t),r=O(i);return"string"===r?n=i&&(i.string||i.stringValue):"expression"===r&&(n=i&&i.expression),{fieldValue:n}},set:function(e,t,n){var i=y(e,n),r=O(i),a=p({},l),s=t.fieldValue||void 0;return"string"===r?a.string=s:"expression"===r&&(a.expression=s),o.updateBusinessObject(e,i,a)},validate:function(e,t,i){var r={};return y(e,i)&&(t.fieldValue||(r.fieldValue=n("Must provide a value"))),r},show:function(e,t){return g(e,t)}})),b}},function(e,t,n){"use strict";n(11),n(0),n(8),n(0),n(8);var i=n(720).getBusinessObject,r=n(732),o=n(739),a=n(795),s=n(724),c=n(765);function u(e,t){return a.getInputOutput(e,t)}function p(e){return a.getConnector(e)}function l(e,t,n){return a.getInputParameter(e,t,n)}function d(e,t,n){return a.getOutputParameter(e,t,n)}function f(e,t,n,i){return r.createElement(e,i,t,n)}e.exports=function(e,t,n,r){var h={"camunda:Map":r("Map"),"camunda:List":r("List"),"camunda:Script":r("Script")},m=!!(n=n||{}).insideConnector,v=n.idPrefix||"",b={getSelectedParameter:function(e,t){var n=j&&j.getSelected(e,t)||{idx:-1},i=l(e,m,n.idx);return!i&&E&&(n=E.getSelected(e,t),i=d(e,m,n.idx)),i}},g=b.entries=[];if(!function(e,t){return a.isInputOutputSupported(e,t)}(e))return b;var y=function(e,n,i){return function(i,r,o){var a=[],c=u(i,m);if(!c){var l=m?p(i):r;c=function(e,t,n){return f("camunda:InputOutput",e,t,n)}(l,t,{inputParameters:[],outputParameters:[]}),m?a.push(s.updateBusinessObject(i,l,{inputOutput:c})):a.push(s.addAndRemoveElementsFromList(i,r,"values","extensionElements",[c],[]))}var d=function(e,t,n,i){return f(e,t,n,i)}(e,c,t,{name:o});return a.push(s.addElementsTolist(i,c,n,[d])),a}},x=function(e,t,n){return function(r,a,c,l){var d=u(r,m),f=e(r,m,l),h=[];h.push(s.removeElementsFromList(r,d,t,null,[f]));var v=d.get(t).length-1,b=(d.get(n)||[]).length;if(!v&&!b)if(m){var g=p(r);h.push(s.updateBusinessObject(r,g,{inputOutput:void 0}))}else h.push(o.removeEntry(i(r),r,d));return h}},O=function(e){return function(t,n,i,r,o,a){var s="Text",c=e(t,m,a).get("definition");if(void 0!==c){var u=c.$type;s=h[u]}i.text=(o||"")+" : "+s}},j=c(e,t,{id:v+"inputs",label:r("Input Parameters"),modelProperty:"name",prefix:"Input",resizable:!0,createExtensionElement:y("camunda:InputParameter","inputParameters"),removeExtensionElement:x(l,"inputParameters","outputParameters"),getExtensionElements:function(e){return function(e,t){return a.getInputParameters(e,t)}(e,m)},onSelectionChange:function(e,t,n,i){E&&E.deselect(e,t)},setOptionLabelValue:O(l)});if(g.push(j),function(e,t){return a.areOutputParametersSupported(e,t)}(e,m)){var E=c(e,t,{id:v+"outputs",label:r("Output Parameters"),modelProperty:"name",prefix:"Output",resizable:!0,createExtensionElement:y("camunda:OutputParameter","outputParameters"),removeExtensionElement:x(d,"outputParameters","inputParameters"),getExtensionElements:function(e){return function(e,t){return a.getOutputParameters(e,t)}(e,m)},onSelectionChange:function(e,t,n,i){j.deselect(e,t)},setOptionLabelValue:O(d)});g.push(E)}return b}},function(e,t,n){"use strict";n(23),n(11),n(0),n(8),n(23),n(0),n(8);var i=n(720).is,r=n(732),o=n(795),a=n(724),s=n(729),c=n(725),u=n(796);function p(e,t,n,i){return r.createElement(e,i,t,n)}function l(e){return i(e,"camunda:Script")}function d(e){return i(e,"camunda:List")}function f(e){return i(e,"camunda:Map")}e.exports=function(e,t,n,i){var r={"camunda:Map":{value:"map",label:i("Map")},"camunda:List":{value:"list",label:i("List")},"camunda:Script":{value:"script",label:i("Script")}},h=!!(n=n||{}).insideConnector,m=n.idPrefix||"",v=n.getSelectedParameter;if(!function(e,t){return o.isInputOutputSupported(e,t)}(e,h))return[];var b=[],g=function(e,t){return v(e,t)};b.push(c.validationAwareTextField({id:m+"parameterName",label:i("Name"),modelProperty:"name",getProperty:function(e,t){return(v(e,t)||{}).name},setProperty:function(e,t,n){var i=v(e,n);return a.updateBusinessObject(e,i,t)},validate:function(e,t,n){var r={};if(v(e,n)){var o=t.name;o?s.containsSpace(o)&&(r.name=i("Name must not contain spaces")):r.name=i("Parameter must have a name")}return r},hidden:function(e,t){return!g(e,t)}}));var y=[{value:"text",name:i("Text")},{value:"script",name:i("Script")},{value:"list",name:i("List")},{value:"map",name:i("Map")}];b.push(c.selectBox({id:m+"parameterType",label:i("Type"),selectOptions:y,modelProperty:"parameterType",get:function(e,t){var n=v(e,t),i="text";if(void 0!==n){var o=n.get("definition");if(void 0!==o){var a=o.$type;i=r[a].value}}return{parameterType:i}},set:function(e,n,i){var r=v(e,i),o={value:void 0,definition:void 0},s=function(e){return p(e,r,t)},c=n.parameterType;return"script"===c?o.definition=s("camunda:Script"):"list"===c?o.definition=s("camunda:List"):"map"===c&&(o.definition=s("camunda:Map")),a.updateBusinessObject(e,r,o)},show:function(e,t){return g(e,t)}})),b.push(c.textBox({id:m+"parameterType-text",label:i("Value"),modelProperty:"value",get:function(e,t){return{value:(v(e,t)||{}).value}},set:function(e,t,n){var i=v(e,n);return t.value=t.value||void 0,a.updateBusinessObject(e,i,t)},show:function(e,t){var n=v(e,t);return n&&!n.definition}}));var x=u("scriptFormat","value",!0,i);return b.push({id:m+"parameterType-script",html:'<div data-show="isScript">'+x.template+"</div>",get:function(e,t){var n=v(e,t);return n&&l(n.definition)?x.get(e,n.definition):{}},set:function(e,t,n){var i=v(e,n),r=x.set(e,t);return a.updateBusinessObject(e,i.definition,r)},validate:function(e,t,n){var i=v(e,n);return i&&l(i.definition)?x.validate(e,i.definition):{}},isScript:function(e,t){var n=v(e,t);return n&&l(n.definition)},script:x}),b.push(c.table({id:m+"parameterType-list",modelProperties:["value"],labels:[i("Value")],addLabel:i("Add Value"),getElements:function(e,t){var n=v(e,t);return n&&d(n.definition)?n.definition.items:[]},updateElement:function(e,t,n,i){var r=v(e,n).definition.items[i];return a.updateBusinessObject(e,r,t)},addElement:function(e,n){var i=v(e,n),r=p("camunda:Value",i.definition,t,{value:void 0});return a.addElementsTolist(e,i.definition,"items",[r])},removeElement:function(e,t,n){var i=v(e,t);return a.removeElementsFromList(e,i.definition,"items",null,[i.definition.items[n]])},editable:function(e,t,n,i){var r=v(e,t).definition.items[i];return!f(r)&&!d(r)&&!l(r)},setControlValue:function(e,t,n,i,o,a){var s=v(e,t).definition.items[a];f(s)||d(s)||l(s)?n.value=r[s.$type].label:n.value=o},show:function(e,t){var n=v(e,t);return n&&n.definition&&d(n.definition)}})),b.push(c.table({id:m+"parameterType-map",modelProperties:["key","value"],labels:[i("Key"),i("Value")],addLabel:i("Add Entry"),getElements:function(e,t){var n=v(e,t);return n&&f(n.definition)?n.definition.entries:[]},updateElement:function(e,t,n,i){var r=v(e,n).definition.entries[i];return(f(r.definition)||d(r.definition)||l(r.definition))&&(t={key:t.key}),a.updateBusinessObject(e,r,t)},addElement:function(e,n){var i=v(e,n),r=p("camunda:Entry",i.definition,t,{key:void 0,value:void 0});return a.addElementsTolist(e,i.definition,"entries",[r])},removeElement:function(e,t,n){var i=v(e,t);return a.removeElementsFromList(e,i.definition,"entries",null,[i.definition.entries[n]])},editable:function(e,t,n,i){var r=v(e,t).definition.entries[i];return"key"===n||!f(r.definition)&&!d(r.definition)&&!l(r.definition)},setControlValue:function(e,t,n,i,o,a){var s=v(e,t).definition.entries[a];"key"!==i&&(f(s.definition)||d(s.definition)||l(s.definition))?n.value=r[s.definition.$type].label:n.value=o},show:function(e,t){var n=v(e,t);return n&&n.definition&&f(n.definition)}})),b}},,,,,,,,,,,,,,function(e,t,n){"use strict";n.d(t,"a",(function(){return ft}));n(21),n(20),n(1);var i=n(721),r=n(723),o=n(727),a=n(40),s=(n(0),n(15),n(14),n(85),n(33),n(30),n(117),n(6),n(10),n(13),n(11),n(7),n(8),n(47),n(35),n(38),/^class /);function c(e){return"[object Array]"===Object.prototype.toString.call(e)}function u(){var e=Array.prototype.slice.call(arguments);1===e.length&&c(e[0])&&(e=e[0]);var t=e.pop();return t.$inject=e,t}var p=/constructor\s*[^(]*\(\s*([^)]*)\)/m,l=/^function\s*[^(]*\(\s*([^)]*)\)/m,d=/\/\*([^*]*)\*\//m;function f(e){if("function"!=typeof e)throw new Error('Cannot annotate "'+e+'". Expected a function!');var t=e.toString().match(function(e){return s.test(e.toString())}(e)?p:l);return t&&t[1]&&t[1].split(",").map((function(e){return(t=e.match(d))?t[1].trim():e.trim()}))||[]}function h(){var e=[];this.factory=function(t,n){return e.push([t,"factory",n]),this},this.value=function(t,n){return e.push([t,"value",n]),this},this.type=function(t,n){return e.push([t,"type",n]),this},this.forEach=function(t){e.forEach(t)}}var m="function"==typeof Symbol&&"symbol"===Object(a.a)(Symbol.iterator)?function(e){return Object(a.a)(e)}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":Object(a.a)(e)};function v(e){if(Array.isArray(e)){for(var t=0,n=Array(e.length);t<e.length;t++)n[t]=e[t];return n}return Array.from(e)}function b(e,t){t=t||{get:function(e,t){if(n.push(e),!1===t)return null;throw a('No provider for "'+e+'"!')}};var n=[],i=this._providers=Object.create(t._providers||null),r=this._instances=Object.create(null),o=r.injector=this,a=function(e){var t=n.join(" -> ");return n.length=0,new Error(t?e+" (Resolving: "+t+")":e)},s=function e(o,s){if(!i[o]&&-1!==o.indexOf(".")){for(var c=o.split("."),u=e(c.shift());c.length;)u=u[c.shift()];return u}if(g(r,o))return r[o];if(g(i,o)){if(-1!==n.indexOf(o))throw n.push(o),a("Cannot resolve circular dependency!");return n.push(o),r[o]=i[o][0](i[o][1]),n.pop(),r[o]}return t.get(o,s)},p=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if("function"!=typeof e){if(!c(e))throw new Error('Cannot invoke "'+e+'". Expected a function!');e=u(e.slice())}var n=e.$inject||f(e),i=n.map((function(e){return g(t,e)?t[e]:s(e)}));return{fn:e,dependencies:i}},l=function(e){var t=p(e),n=t.dependencies,i=t.fn;return new(Function.prototype.bind.apply(i,[null].concat(v(n))))},d=function(e,t,n){var i=p(e,n),r=i.dependencies,o=i.fn;return o.call.apply(o,[t].concat(v(r)))},y=function(e){return u((function(t){return e.get(t)}))},x={factory:d,type:l,value:function(e){return e}};e.forEach((function(e){function t(e,t){return"value"!==e&&c(t)&&(t=u(t.slice())),t}if(e instanceof h)e.forEach((function(e){var n=e[0],r=e[1],o=e[2];i[n]=[x[r],t(r,o),r]}));else if("object"===(void 0===e?"undefined":m(e)))if(e.__exports__){var n=Object.keys(e).reduce((function(t,n){return"__"!==n.substring(0,2)&&(t[n]=e[n]),t}),Object.create(null)),r=new b((e.__modules__||[]).concat([n]),o),a=u((function(e){return r.get(e)}));e.__exports__.forEach((function(e){i[e]=[a,e,"private",r]}))}else Object.keys(e).forEach((function(n){if("private"!==e[n][2]){var r=e[n][0],o=e[n][1];i[n]=[x[r],t(r,o),r]}else i[n]=e[n]}))})),this.get=s,this.invoke=d,this.instantiate=l,this.createChild=function(e,t){if(t&&t.length){var n,r,a,s,c=Object.create(null),u=Object.create(null),p=[],l=[],d=[];for(var f in i)n=i[f],-1!==t.indexOf(f)&&("private"===n[2]?-1===(r=p.indexOf(n[3]))?(a=n[3].createChild([],t),s=y(a),p.push(n[3]),l.push(a),d.push(s),c[f]=[s,f,"private",a]):c[f]=[d[r],f,"private",l[r]]:c[f]=[n[2],n[1]],u[f]=!0),"factory"!==n[2]&&"type"!==n[2]||!n[1].$scope||t.forEach((function(e){-1!==n[1].$scope.indexOf(e)&&(c[f]=[n[2],n[1]],u[e]=!0)}));t.forEach((function(e){if(!u[e])throw new Error('No provider for "'+e+'". Cannot use provider from the parent!')})),e.unshift(c)}return new b(e,o)}}function g(e,t){return Object.hasOwnProperty.call(e,t)}var y=n(722),x=n.n(y),O=n(799),j=n(776),E=n(728);function _(e,t){O.a.call(this,e,1),this.CONNECTION_STYLE=t.style(["no-fill"],{strokeWidth:5,stroke:"fuchsia"}),this.SHAPE_STYLE=t.style({fill:"white",stroke:"fuchsia",strokeWidth:2}),this.FRAME_STYLE=t.style(["no-fill"],{stroke:"fuchsia",strokeDasharray:4,strokeWidth:2})}x()(_,O.a),_.prototype.canRender=function(){return!0},_.prototype.drawShape=function(e,t){var n=Object(o.f)("rect");return Object(o.b)(n,{x:0,y:0,width:t.width||0,height:t.height||0}),Object(E.g)(t)?Object(o.b)(n,this.FRAME_STYLE):Object(o.b)(n,this.SHAPE_STYLE),Object(o.a)(e,n),n},_.prototype.drawConnection=function(e,t){var n=Object(j.b)(t.waypoints,this.CONNECTION_STYLE);return Object(o.a)(e,n),n},_.prototype.getShapePath=function(e){var t=e.x,n=e.y,i=e.width,r=[["M",t,n],["l",i,0],["l",0,e.height],["l",-i,0],["z"]];return Object(j.a)(r)},_.prototype.getConnectionPath=function(e){var t,n,i=e.waypoints,r=[];for(t=0;n=i[t];t++)n=n.original||n,r.push([0===t?"M":"L",n.x,n.y]);return Object(j.a)(r)},_.$inject=["eventBus","styles"];var w={__init__:["defaultRenderer"],defaultRenderer:["type",_],styles:["type",function(){var e={"no-fill":{fill:"none"},"no-border":{strokeOpacity:0},"no-events":{pointerEvents:"none"}},t=this;this.cls=function(e,t,n){var r=this.style(t,n);return Object(i.assign)(r,{class:e})},this.style=function(t,n){Object(i.isArray)(t)||n||(n=t,t=[]);var r=Object(i.reduce)(t,(function(t,n){return Object(i.assign)(t,e[n]||{})}),{});return n?Object(i.assign)(r,n):r},this.computeStyle=function(e,n,r){return Object(i.isArray)(n)||(r=n,n=[]),t.style(n||[],Object(i.assign)({},r,e||{}))}}]},S=n(735);function T(e,t){return Math.round(e*t)/t}function P(e){return Object(i.isNumber)(e)?e+"px":e}function C(e,t,n){var i=Object(o.f)("g");Object(o.c)(i).add(t);var r=void 0!==n?n:e.childNodes.length-1;return e.insertBefore(i,e.childNodes[r]||null),i}var A={shape:["x","y","width","height"],connection:["waypoints"]};function R(e,t,n,i){this._eventBus=t,this._elementRegistry=i,this._graphicsFactory=n,this._init(e||{})}function k(e,t){var n="matrix("+t.a+","+t.b+","+t.c+","+t.d+","+t.e+","+t.f+")";e.setAttribute("transform",n)}R.$inject=["config.canvas","eventBus","graphicsFactory","elementRegistry"],R.prototype._init=function(e){var t=this._eventBus,n=this._container=function(e){var t=(e=Object(i.assign)({},{width:"100%",height:"100%"},e)).container||document.body,n=document.createElement("div");return n.setAttribute("class","djs-container"),Object(i.assign)(n.style,{position:"relative",overflow:"hidden",width:P(e.width),height:P(e.height)}),t.appendChild(n),n}(e),r=this._svg=Object(o.f)("svg");Object(o.b)(r,{width:"100%",height:"100%"}),Object(o.a)(n,r);var a=this._viewport=C(r,"viewport");this._layers={},!1!==e.deferUpdate&&(this._viewboxChanged=Object(i.debounce)(Object(i.bind)(this._viewboxChanged,this),300)),t.on("diagram.init",(function(){t.fire("canvas.init",{svg:r,viewport:a})}),this),t.on(["shape.added","connection.added","shape.removed","connection.removed","elements.changed"],(function(){delete this._cachedViewbox}),this),t.on("diagram.destroy",500,this._destroy,this),t.on("diagram.clear",500,this._clear,this)},R.prototype._destroy=function(e){this._eventBus.fire("canvas.destroy",{svg:this._svg,viewport:this._viewport});var t=this._container.parentNode;t&&t.removeChild(this._container),delete this._svg,delete this._container,delete this._layers,delete this._rootElement,delete this._viewport},R.prototype._clear=function(){var e=this;this._elementRegistry.getAll().forEach((function(t){var n=Object(E.f)(t);"root"===n?e.setRootElement(null,!0):e._removeElement(t,n)})),delete this._cachedViewbox},R.prototype.getDefaultLayer=function(){return this.getLayer("base",0)},R.prototype.getLayer=function(e,t){if(!e)throw new Error("must specify a name");var n=this._layers[e];if(n||(n=this._layers[e]=this._createLayer(e,t)),void 0!==t&&n.index!==t)throw new Error("layer <"+e+"> already created at index <"+t+">");return n.group},R.prototype._createLayer=function(e,t){t||(t=0);var n=Object(i.reduce)(this._layers,(function(e,n){return t>=n.index&&e++,e}),0);return{group:C(this._viewport,"layer-"+e,n),index:t}},R.prototype.getContainer=function(){return this._container},R.prototype._updateMarker=function(e,t,n){var r;e.id||(e=this._elementRegistry.get(e)),(r=this._elementRegistry._elements[e.id])&&(Object(i.forEach)([r.gfx,r.secondaryGfx],(function(e){e&&(n?Object(o.c)(e).add(t):Object(o.c)(e).remove(t))})),this._eventBus.fire("element.marker.update",{element:e,gfx:r.gfx,marker:t,add:!!n}))},R.prototype.addMarker=function(e,t){this._updateMarker(e,t,!0)},R.prototype.removeMarker=function(e,t){this._updateMarker(e,t,!1)},R.prototype.hasMarker=function(e,t){e.id||(e=this._elementRegistry.get(e));var n=this.getGraphics(e);return Object(o.c)(n).has(t)},R.prototype.toggleMarker=function(e,t){this.hasMarker(e,t)?this.removeMarker(e,t):this.addMarker(e,t)},R.prototype.getRootElement=function(){return this._rootElement||this.setRootElement({id:"__implicitroot",children:[]}),this._rootElement},R.prototype.setRootElement=function(e,t){e&&this._ensureValid("root",e);var n=this._rootElement,i=this._elementRegistry,r=this._eventBus;if(n){if(!t)throw new Error("rootElement already set, need to specify override");r.fire("root.remove",{element:n}),r.fire("root.removed",{element:n}),i.remove(n)}if(e){var o=this.getDefaultLayer();r.fire("root.add",{element:e}),i.add(e,o,this._svg),r.fire("root.added",{element:e,gfx:o})}return this._rootElement=e,e},R.prototype._ensureValid=function(e,t){if(!t.id)throw new Error("element must have an id");if(this._elementRegistry.get(t.id))throw new Error("element with id "+t.id+" already exists");var n=A[e];if(!Object(i.every)(n,(function(e){return void 0!==t[e]})))throw new Error("must supply { "+n.join(", ")+" } with "+e)},R.prototype._setParent=function(e,t,n){Object(S.add)(t.children,e,n),e.parent=t},R.prototype._addElement=function(e,t,n,i){n=n||this.getRootElement();var r=this._eventBus,o=this._graphicsFactory;this._ensureValid(e,t),r.fire(e+".add",{element:t,parent:n}),this._setParent(t,n,i);var a=o.create(e,t,i);return this._elementRegistry.add(t,a),o.update(e,t,a),r.fire(e+".added",{element:t,gfx:a}),t},R.prototype.addShape=function(e,t,n){return this._addElement("shape",e,t,n)},R.prototype.addConnection=function(e,t,n){return this._addElement("connection",e,t,n)},R.prototype._removeElement=function(e,t){var n=this._elementRegistry,i=this._graphicsFactory,r=this._eventBus;if(e=n.get(e.id||e))return r.fire(t+".remove",{element:e}),i.remove(e),Object(S.remove)(e.parent&&e.parent.children,e),e.parent=null,r.fire(t+".removed",{element:e}),n.remove(e),e},R.prototype.removeShape=function(e){return this._removeElement(e,"shape")},R.prototype.removeConnection=function(e){return this._removeElement(e,"connection")},R.prototype.getGraphics=function(e,t){return this._elementRegistry.getGraphics(e,t)},R.prototype._changeViewbox=function(e){this._eventBus.fire("canvas.viewbox.changing"),e.apply(this),this._cachedViewbox=null,this._viewboxChanged()},R.prototype._viewboxChanged=function(){this._eventBus.fire("canvas.viewbox.changed",{viewbox:this.viewbox()})},R.prototype.viewbox=function(e){if(void 0===e&&this._cachedViewbox)return this._cachedViewbox;var t,n,i,r,a,s,c=this._viewport,u=this.getSize();return e?(this._changeViewbox((function(){r=Math.min(u.width/e.width,u.height/e.height);var t=this._svg.createSVGMatrix().scale(r).translate(-e.x,-e.y);Object(o.k)(c,t)})),e):(t=this.getDefaultLayer().getBBox(),n=(i=Object(o.k)(c))?i.matrix:Object(o.g)(),r=T(n.a,1e3),a=T(-n.e||0,1e3),s=T(-n.f||0,1e3),e=this._cachedViewbox={x:a?a/r:0,y:s?s/r:0,width:u.width/r,height:u.height/r,scale:r,inner:{width:t.width,height:t.height,x:t.x,y:t.y},outer:u})},R.prototype.scroll=function(e){var t=this._viewport,n=t.getCTM();return e&&this._changeViewbox((function(){e=Object(i.assign)({dx:0,dy:0},e||{}),n=this._svg.createSVGMatrix().translate(e.dx,e.dy).multiply(n),k(t,n)})),{x:n.e,y:n.f}},R.prototype.zoom=function(e,t){return e?"fit-viewport"===e?this._fitViewport(t):(this._changeViewbox((function(){"object"!==Object(a.a)(t)&&(n=this.viewbox().outer,t={x:n.width/2,y:n.height/2}),i=this._setZoom(e,t)})),T(i.a,1e3)):this.viewbox(e).scale;var n,i},R.prototype._fitViewport=function(e){var t,n,i=this.viewbox(),r=i.outer,o=i.inner;return o.x>=0&&o.y>=0&&o.x+o.width<=r.width&&o.y+o.height<=r.height&&!e?n={x:0,y:0,width:Math.max(o.width+o.x,r.width),height:Math.max(o.height+o.y,r.height)}:(t=Math.min(1,r.width/o.width,r.height/o.height),n={x:o.x+(e?o.width/2-r.width/t/2:0),y:o.y+(e?o.height/2-r.height/t/2:0),width:r.width/t,height:r.height/t}),this.viewbox(n),this.viewbox(!1).scale},R.prototype._setZoom=function(e,t){var n,r,o,a,s=this._svg,c=this._viewport,u=s.createSVGMatrix(),p=s.createSVGPoint(),l=(r=c.getCTM()).a;return t?(n=Object(i.assign)(p,t).matrixTransform(r.inverse()),o=u.translate(n.x,n.y).scale(1/l*e).translate(-n.x,-n.y),a=r.multiply(o)):a=u.scale(e),k(this._viewport,a),a},R.prototype.getSize=function(){return{width:this._container.clientWidth,height:this._container.clientHeight}},R.prototype.getAbsoluteBBox=function(e){var t,n=this.viewbox();e.waypoints?t=this.getGraphics(e).getBBox():t=e;return{x:t.x*n.scale-n.x*n.scale,y:t.y*n.scale-n.y*n.scale,width:t.width*n.scale,height:t.height*n.scale}},R.prototype.resized=function(){delete this._cachedViewbox,this._eventBus.fire("canvas.resized")};n(43),n(65);var B="data-element-id";function M(e){this._elements={},this._eventBus=e}M.$inject=["eventBus"],M.prototype.add=function(e,t,n){var i=e.id;this._validateId(i),Object(o.b)(t,B,i),n&&Object(o.b)(n,B,i),this._elements[i]={element:e,gfx:t,secondaryGfx:n}},M.prototype.remove=function(e){var t=this._elements,n=e.id||e,i=n&&t[n];i&&(Object(o.b)(i.gfx,B,""),i.secondaryGfx&&Object(o.b)(i.secondaryGfx,B,""),delete t[n])},M.prototype.updateId=function(e,t){this._validateId(t),"string"==typeof e&&(e=this.get(e)),this._eventBus.fire("element.updateId",{element:e,newId:t});var n=this.getGraphics(e),i=this.getGraphics(e,!0);this.remove(e),e.id=t,this.add(e,n,i)},M.prototype.get=function(e){var t;t="string"==typeof e?e:e&&Object(o.b)(e,B);var n=this._elements[t];return n&&n.element},M.prototype.filter=function(e){var t=[];return this.forEach((function(n,i){e(n,i)&&t.push(n)})),t},M.prototype.find=function(e){for(var t=this._elements,n=Object.keys(t),i=0;i<n.length;i++){var r=t[n[i]],o=r.element;if(e(o,r.gfx))return o}},M.prototype.getAll=function(){return this.filter((function(e){return e}))},M.prototype.forEach=function(e){var t=this._elements;Object.keys(t).forEach((function(n){var i=t[n],r=i.element,o=i.gfx;return e(r,o)}))},M.prototype.getGraphics=function(e,t){var n=e.id||e,i=this._elements[n];return i&&(t?i.secondaryGfx:i.gfx)},M.prototype._validateId=function(e){if(!e)throw new Error("element must have an id");if(this._elements[e])throw new Error("element with id "+e+" already added")};var D=n(837),N=Array.prototype.slice;function L(){this._listeners={},this.on("diagram.destroy",1,this._destroy,this)}function I(){}L.prototype.on=function(e,t,n,r){if(e=Object(i.isArray)(e)?e:[e],Object(i.isFunction)(t)&&(r=n,n=t,t=1e3),!Object(i.isNumber)(t))throw new Error("priority must be a number");var o=n;r&&((o=Object(i.bind)(n,r)).__fn=n.__fn||n);var a=this;e.forEach((function(e){a._addListener(e,{priority:t,callback:o,next:null})}))},L.prototype.once=function(e,t,n,r){var o=this;if(Object(i.isFunction)(t)&&(r=n,n=t,t=1e3),!Object(i.isNumber)(t))throw new Error("priority must be a number");function a(){var t=n.apply(r,arguments);return o.off(e,a),t}a.__fn=n,this.on(e,t,a)},L.prototype.off=function(e,t){e=Object(i.isArray)(e)?e:[e];var n=this;e.forEach((function(e){n._removeListener(e,t)}))},L.prototype.createEvent=function(e){var t=new I;return t.init(e),t},L.prototype.fire=function(e,t){var n,i,r,o;if(o=N.call(arguments),"object"===Object(a.a)(e)&&(e=(t=e).type),!e)throw new Error("no event type specified");if(i=this._listeners[e]){n=t instanceof I?t:this.createEvent(t),o[0]=n;var s=n.type;e!==s&&(n.type=e);try{r=this._invokeListeners(n,o,i)}finally{e!==s&&(n.type=s)}return void 0===r&&n.defaultPrevented&&(r=!1),r}},L.prototype.handleError=function(e){return!1===this.fire("error",{error:e})},L.prototype._destroy=function(){this._listeners={}},L.prototype._invokeListeners=function(e,t,n){for(var i;n&&!e.cancelBubble;)i=this._invokeListener(e,t,n),n=n.next;return i},L.prototype._invokeListener=function(e,t,n){var i;try{void 0!==(i=function(e,t){return e.apply(null,t)}(n.callback,t))&&(e.returnValue=i,e.stopPropagation()),!1===i&&e.preventDefault()}catch(e){if(!this.handleError(e))throw console.error("unhandled error in event listener"),console.error(e.stack),e}return i},L.prototype._addListener=function(e,t){var n,i=this._getListeners(e);if(i){for(;i;){if(i.priority<t.priority)return t.next=i,void(n?n.next=t:this._setListeners(e,t));n=i,i=i.next}n.next=t}else this._setListeners(e,t)},L.prototype._getListeners=function(e){return this._listeners[e]},L.prototype._setListeners=function(e,t){this._listeners[e]=t},L.prototype._removeListener=function(e,t){var n,i,r,o=this._getListeners(e);if(t)for(;o;)n=o.next,(r=o.callback)!==t&&r.__fn!==t||(i?i.next=n:this._setListeners(e,n)),i=o,o=n;else this._setListeners(e,null)},I.prototype.stopPropagation=function(){this.cancelBubble=!0},I.prototype.preventDefault=function(){this.defaultPrevented=!0},I.prototype.init=function(e){Object(i.assign)(this,e||{})};var F=n(801),z=n(741);function V(e,t){this._eventBus=e,this._elementRegistry=t}function $(e,t,n){var i=n||t.firstChild;e!==i&&t.insertBefore(e,i)}V.$inject=["eventBus","elementRegistry"],V.prototype._getChildrenContainer=function(e){var t,n=this._elementRegistry.getGraphics(e);return e.parent?(t=Object(F.a)(n))||(t=Object(o.f)("g"),Object(o.c)(t).add("djs-children"),Object(o.a)(n.parentNode,t)):t=n,t},V.prototype._clear=function(e){var t=Object(F.b)(e);return Object(r.clear)(t),t},V.prototype._createContainer=function(e,t,n,i){var r=Object(o.f)("g");Object(o.c)(r).add("djs-group"),void 0!==n?$(r,t,t.childNodes[n]):Object(o.a)(t,r);var a=Object(o.f)("g");Object(o.c)(a).add("djs-element"),Object(o.c)(a).add("djs-"+e),i&&Object(o.c)(a).add("djs-frame"),Object(o.a)(r,a);var s=Object(o.f)("g");return Object(o.c)(s).add("djs-visual"),Object(o.a)(a,s),a},V.prototype.create=function(e,t,n){var i=this._getChildrenContainer(t.parent);return this._createContainer(e,i,n,Object(E.g)(t))},V.prototype.updateContainments=function(e){var t,n=this,r=this._elementRegistry;t=Object(i.reduce)(e,(function(e,t){return t.parent&&(e[t.parent.id]=t.parent),e}),{}),Object(i.forEach)(t,(function(e){var t=e.children;if(t){var o=n._getChildrenContainer(e);Object(i.forEach)(t.slice().reverse(),(function(e){$(r.getGraphics(e).parentNode,o)}))}}))},V.prototype.drawShape=function(e,t){return this._eventBus.fire("render.shape",{gfx:e,element:t})},V.prototype.getShapePath=function(e){return this._eventBus.fire("render.getShapePath",e)},V.prototype.drawConnection=function(e,t){return this._eventBus.fire("render.connection",{gfx:e,element:t})},V.prototype.getConnectionPath=function(e){return this._eventBus.fire("render.getConnectionPath",e)},V.prototype.update=function(e,t,n){if(t.parent){var i=this._clear(n);if("shape"===e)this.drawShape(i,t),Object(z.c)(n,t.x,t.y);else{if("connection"!==e)throw new Error("unknown type: "+e);this.drawConnection(i,t)}t.hidden?Object(o.b)(n,"display","none"):Object(o.b)(n,"display","block")}},V.prototype.remove=function(e){var t=this._elementRegistry.getGraphics(e);Object(o.j)(t.parentNode)};var H={__depends__:[w],__init__:["canvas"],canvas:["type",R],elementRegistry:["type",M],elementFactory:["type",D.a],eventBus:["type",L],graphicsFactory:["type",V]};function G(e){var t=[],n=[];function i(e){return t.indexOf(e)>=0}e.forEach((function e(r){i(r)||((r.__depends__||[]).forEach(e),i(r)||(!function(e){t.push(e)}(r),(r.__init__||[]).forEach((function(e){n.push(e)}))))}));var r=new b(t);return n.forEach((function(e){try{r["string"==typeof e?"get":"invoke"](e)}catch(e){throw console.error("Failed to instantiate component"),console.error(e.stack),e}})),r}function W(e,t){this.injector=t=t||function(e){return G([{config:["value",e=e||{}]},H].concat(e.modules||[]))}(e),this.get=t.get,this.invoke=t.invoke,this.get("eventBus").fire("diagram.init")}W.prototype.destroy=function(){this.get("eventBus").fire("diagram.destroy")},W.prototype.clear=function(){this.get("eventBus").fire("diagram.clear")};n(23),n(86);function q(){}function U(e,t){this.model=e,this.properties=t}q.prototype.get=function(e){return this.$model.properties.get(this,e)},q.prototype.set=function(e,t){this.$model.properties.set(this,e,t)},U.prototype.createType=function(e){var t=this.model,n=this.properties,r=Object.create(q.prototype);Object(i.forEach)(e.properties,(function(e){e.isMany||void 0===e.default||(r[e.name]=e.default)})),n.defineModel(r,t),n.defineDescriptor(r,e);var o=e.ns.name;function a(e){n.define(this,"$type",{value:o,enumerable:!0}),n.define(this,"$attrs",{value:{}}),n.define(this,"$parent",{writable:!0}),Object(i.forEach)(e,Object(i.bind)((function(e,t){this.set(t,e)}),this))}return a.prototype=r,a.hasType=r.$instanceOf=this.model.hasType,n.defineModel(a,t),n.defineDescriptor(a,e),a};var K={String:!0,Boolean:!0,Integer:!0,Real:!0,Element:!0},Y={String:function(e){return e},Boolean:function(e){return"true"===e},Integer:function(e){return parseInt(e,10)},Real:function(e){return parseFloat(e)}};function X(e,t){var n=Y[e];return n?n(t):t}function J(e){return!!K[e]}function Z(e){return!!Y[e]}function Q(e,t){var n,i,r=e.split(/:/);if(1===r.length)n=e,i=t;else{if(2!==r.length)throw new Error("expected <prefix:localName> or <localName>, got "+e);n=r[1],i=r[0]}return{name:e=(i?i+":":"")+n,prefix:i,localName:n}}function ee(e){this.ns=e,this.name=e.name,this.allTypes=[],this.allTypesByName={},this.properties=[],this.propertiesByName={}}function te(e,t){this.packageMap={},this.typeMap={},this.packages=[],this.properties=t,Object(i.forEach)(e,Object(i.bind)(this.registerPackage,this))}function ne(e,t,n){var i=t[n];if(i in e)throw new Error("package with "+n+" <"+i+"> already defined")}function ie(e){this.model=e}function re(e,t,n){Object.defineProperty(e,t.name,{enumerable:!t.isReference,writable:!0,value:n,configurable:!0})}function oe(e){this.properties=new ie(this),this.factory=new U(this,this.properties),this.registry=new te(e,this.properties),this.typeCache={}}ee.prototype.build=function(){return Object(i.pick)(this,["ns","name","allTypes","allTypesByName","properties","propertiesByName","bodyProperty","idProperty"])},ee.prototype.addProperty=function(e,t,n){"boolean"==typeof t&&(n=t,t=void 0),this.addNamedProperty(e,!1!==n);var i=this.properties;void 0!==t?i.splice(t,0,e):i.push(e)},ee.prototype.replaceProperty=function(e,t,n){var i=e.ns,r=this.properties,o=this.propertiesByName,a=e.name!==t.name;if(e.isId){if(!t.isId)throw new Error("property <"+t.ns.name+"> must be id property to refine <"+e.ns.name+">");this.setIdProperty(t,!1)}if(e.isBody){if(!t.isBody)throw new Error("property <"+t.ns.name+"> must be body property to refine <"+e.ns.name+">");this.setBodyProperty(t,!1)}var s=r.indexOf(e);if(-1===s)throw new Error("property <"+i.name+"> not found in property list");r.splice(s,1),this.addProperty(t,n?void 0:s,a),o[i.name]=o[i.localName]=t},ee.prototype.redefineProperty=function(e,t,n){var i=e.ns.prefix,r=t.split("#"),o=Q(r[0],i),a=Q(r[1],o.prefix).name,s=this.propertiesByName[a];if(!s)throw new Error("refined property <"+a+"> not found");this.replaceProperty(s,e,n),delete e.redefines},ee.prototype.addNamedProperty=function(e,t){var n=e.ns,i=this.propertiesByName;t&&(this.assertNotDefined(e,n.name),this.assertNotDefined(e,n.localName)),i[n.name]=i[n.localName]=e},ee.prototype.removeNamedProperty=function(e){var t=e.ns,n=this.propertiesByName;delete n[t.name],delete n[t.localName]},ee.prototype.setBodyProperty=function(e,t){if(t&&this.bodyProperty)throw new Error("body property defined multiple times (<"+this.bodyProperty.ns.name+">, <"+e.ns.name+">)");this.bodyProperty=e},ee.prototype.setIdProperty=function(e,t){if(t&&this.idProperty)throw new Error("id property defined multiple times (<"+this.idProperty.ns.name+">, <"+e.ns.name+">)");this.idProperty=e},ee.prototype.assertNotDefined=function(e,t){var n=e.name,i=this.propertiesByName[n];if(i)throw new Error("property <"+n+"> already defined; override of <"+i.definedBy.ns.name+"#"+i.ns.name+"> by <"+e.definedBy.ns.name+"#"+e.ns.name+"> not allowed without redefines")},ee.prototype.hasProperty=function(e){return this.propertiesByName[e]},ee.prototype.addTrait=function(e,t){var n=this.allTypesByName,r=this.allTypes,o=e.name;o in n||(Object(i.forEach)(e.properties,Object(i.bind)((function(n){n=Object(i.assign)({},n,{name:n.ns.localName,inherited:t}),Object.defineProperty(n,"definedBy",{value:e});var r=n.replaces,o=n.redefines;r||o?this.redefineProperty(n,r||o,r):(n.isBody&&this.setBodyProperty(n),n.isId&&this.setIdProperty(n),this.addProperty(n))}),this)),r.push(e),n[o]=e)},te.prototype.getPackage=function(e){return this.packageMap[e]},te.prototype.getPackages=function(){return this.packages},te.prototype.registerPackage=function(e){e=Object(i.assign)({},e);var t=this.packageMap;ne(t,e,"prefix"),ne(t,e,"uri"),Object(i.forEach)(e.types,Object(i.bind)((function(t){this.registerType(t,e)}),this)),t[e.uri]=t[e.prefix]=e,this.packages.push(e)},te.prototype.registerType=function(e,t){var n=Q((e=Object(i.assign)({},e,{superClass:(e.superClass||[]).slice(),extends:(e.extends||[]).slice(),properties:(e.properties||[]).slice(),meta:Object(i.assign)(e.meta||{})})).name,t.prefix),r=n.name,o={};Object(i.forEach)(e.properties,Object(i.bind)((function(e){var t=Q(e.name,n.prefix),r=t.name;J(e.type)||(e.type=Q(e.type,t.prefix).name),Object(i.assign)(e,{ns:t,name:r}),o[r]=e}),this)),Object(i.assign)(e,{ns:n,name:r,propertiesByName:o}),Object(i.forEach)(e.extends,Object(i.bind)((function(e){var t=this.typeMap[e];t.traits=t.traits||[],t.traits.push(r)}),this)),this.definePackage(e,t),this.typeMap[r]=e},te.prototype.mapTypes=function(e,t,n){var r=J(e.name)?{name:e.name}:this.typeMap[e.name],o=this;function a(e){return s(e,!0)}function s(n,i){var r=Q(n,J(n)?"":e.prefix);o.mapTypes(r,t,i)}if(!r)throw new Error("unknown type <"+e.name+">");Object(i.forEach)(r.superClass,n?a:s),t(r,!n),Object(i.forEach)(r.traits,a)},te.prototype.getEffectiveDescriptor=function(e){var t=Q(e),n=new ee(t);this.mapTypes(t,(function(e,t){n.addTrait(e,t)}));var i=n.build();return this.definePackage(i,i.allTypes[i.allTypes.length-1].$pkg),i},te.prototype.definePackage=function(e,t){this.properties.define(e,"$pkg",{value:t})},ie.prototype.set=function(e,t,n){var i=this.model.getPropertyDescriptor(e,t),r=i&&i.name;void 0===n?i?delete e[r]:delete e.$attrs[t]:i?r in e?e[r]=n:re(e,i,n):e.$attrs[t]=n},ie.prototype.get=function(e,t){var n=this.model.getPropertyDescriptor(e,t);if(!n)return e.$attrs[t];var i=n.name;return!e[i]&&n.isMany&&re(e,n,[]),e[i]},ie.prototype.define=function(e,t,n){Object.defineProperty(e,t,n)},ie.prototype.defineDescriptor=function(e,t){this.define(e,"$descriptor",{value:t})},ie.prototype.defineModel=function(e,t){this.define(e,"$model",{value:t})},oe.prototype.create=function(e,t){var n=this.getType(e);if(!n)throw new Error("unknown type <"+e+">");return new n(t)},oe.prototype.getType=function(e){var t=this.typeCache,n=Object(i.isString)(e)?e:e.ns.name,r=t[n];return r||(e=this.registry.getEffectiveDescriptor(n),r=t[n]=this.factory.createType(e)),r},oe.prototype.createAny=function(e,t,n){var r=Q(e),o={$type:e,$instanceOf:function(e){return e===this.$type}},a={name:e,isGeneric:!0,ns:{prefix:r.prefix,localName:r.localName,uri:t}};return this.properties.defineDescriptor(o,a),this.properties.defineModel(o,this),this.properties.define(o,"$parent",{enumerable:!1,writable:!0}),this.properties.define(o,"$instanceOf",{enumerable:!1,writable:!0}),Object(i.forEach)(n,(function(e,t){Object(i.isObject)(e)&&void 0!==e.value?o[e.name]=e.value:o[t]=e})),o},oe.prototype.getPackage=function(e){return this.registry.getPackage(e)},oe.prototype.getPackages=function(){return this.registry.getPackages()},oe.prototype.getElementDescriptor=function(e){return e.$descriptor},oe.prototype.hasType=function(e,t){return void 0===t&&(t=e,e=this),t in e.$model.getElementDescriptor(e).allTypesByName},oe.prototype.getPropertyDescriptor=function(e,t){return this.getElementDescriptor(e).propertiesByName[t]},oe.prototype.getTypeDescriptor=function(e){return this.registry.typeMap[e]};n(22),n(196);var ae=String.fromCharCode,se=Object.prototype.hasOwnProperty,ce=/&#(\d+);|&#x([0-9a-f]+);|&(\w+);/gi,ue={amp:"&",apos:"'",gt:">",lt:"<",quot:'"'};function pe(e,t,n,i){return i?se.call(ue,i)?ue[i]:"&"+i+";":ae(t||parseInt(n,16))}function le(e){return e.length>3&&-1!==e.indexOf("&")?e.replace(ce,pe):e}Object.keys(ue).forEach((function(e){ue[e.toUpperCase()]=ue[e]}));function de(e){return new Error(e)}function fe(e){return"missing namespace for prefix <"+e+">"}function he(e){return{get:e,enumerable:!0}}function me(e){var t,n={};for(t in e)n[t]=e[t];return n}function ve(e){return e+"$uri"}function be(){return{line:0,column:0}}function ge(e){throw e}function ye(e){if(!this)return new ye(e);var t,n,i,r,o,s,c,u,p,l=e&&e.proxy,d=ge,f=be,h=!1,m=!1,v=null,b=!1;function g(e){e instanceof Error||(e=de(e)),v=e,d(e,f)}function y(e){o&&(e instanceof Error||(e=de(e)),o(e,f))}this.on=function(e,a){if("function"!=typeof a)throw de("required args <name, cb>");switch(e){case"openTag":n=a;break;case"text":t=a;break;case"closeTag":i=a;break;case"error":d=a;break;case"warn":o=a;break;case"cdata":r=a;break;case"attention":u=a;break;case"question":c=a;break;case"comment":s=a;break;default:throw de("unsupported event: "+e)}return this},this.ns=function(e){if(void 0===e&&(e={}),"object"!==Object(a.a)(e))throw de("required args <nsMap={}>");var t,n={};for(t in e)n[t]=e[t];return n["http://www.w3.org/2001/XMLSchema-instance"]="xsi",m=!0,p=n,this},this.parse=function(e){if("string"!=typeof e)throw de("required args <xml=string>");return v=null,function(e){var o,a,d,v,x,O,j,E,_,w,S,T=m?[]:null,P=m?function(e){var t,n,i={};for(t in e)i[n=e[t]]=n,i[ve(n)]=t;return i}(p):null,C=[],A=0,R=!1,k=!1,B=0,M=0,D="",N=0;function L(){if(null!==S)return S;var e,t,n,i,r,o,a,s,c,u,l,d=m&&P.xmlns,f=m&&h?[]:null,v=N,b=D,g=b.length,x={},O={};e:for(;v<g;v++)if(c=!1,!(32===(u=b.charCodeAt(v))||u<14&&u>8)){for((u<65||u>122||u>90&&u<97)&&95!==u&&58!==u&&(y("illegal first char attribute name"),c=!0),l=v+1;l<g;l++)if(!((u=b.charCodeAt(l))>96&&u<123||u>64&&u<91||u>47&&u<59||46===u||45===u||95===u)){if(32===u||u<14&&u>8){y("missing attribute value"),v=l;continue e}if(61===u)break;y("illegal attribute name char"),c=!0}if("xmlns:xmlns"===(s=b.substring(v,l))&&(y("illegal declaration of xmlns"),c=!0),34===(u=b.charCodeAt(l+1)))-1===(l=b.indexOf('"',v=l+2))&&-1!==(l=b.indexOf("'",v))&&(y("attribute value quote missmatch"),c=!0);else if(39===u)-1===(l=b.indexOf("'",v=l+2))&&-1!==(l=b.indexOf('"',v))&&(y("attribute value quote missmatch"),c=!0);else for(y("missing attribute value quotes"),c=!0,l+=1;l<g&&!(32===(u=b.charCodeAt(l+1))||u<14&&u>8);l++);for(-1===l&&(y("missing closing quotes"),l=g,c=!0),c||(o=b.substring(v,l)),v=l;l+1<g&&!(32===(u=b.charCodeAt(l+1))||u<14&&u>8);l++)v===l&&(y("illegal character after attribute end"),c=!0);if(v=l+1,!c)if(s in O)y("attribute <"+s+"> already defined");else if(O[s]=!0,m)if(h){if(null!==(r="xmlns"===s?"xmlns":120===s.charCodeAt(0)&&"xmlns:"===s.substr(0,6)?s.substr(6):null)){if(e=le(o),t=ve(r),!(a=p[e])){if("xmlns"===r||t in P&&P[t]!==e)do{a="ns"+A++}while(void 0!==P[a]);else a=r;p[e]=a}P[r]!==a&&(i||(P=me(P),i=!0),P[r]=a,"xmlns"===r&&(P[ve(a)]=e,d=a),P[t]=e),x[s]=o;continue}f.push(s,o)}else-1!==(u=s.indexOf(":"))?(n=P[s.substring(0,u)])?("xsi:type"===(s=d===n?s.substr(u+1):n+s.substr(u))&&(-1!==(u=o.indexOf(":"))?(n=o.substring(0,u),o=(n=P[n]||n)+o.substring(u)):o=d+":"+o),x[s]=o):y(fe(s.substring(0,u))):x[s]=o;else x[s]=o}if(h)for(v=0,g=f.length;v<g;v++){if(s=f[v++],o=f[v],-1!==(u=s.indexOf(":"))){if(!(n=P[s.substring(0,u)])){y(fe(s.substring(0,u)));continue}"xsi:type"===(s=d===n?s.substr(u+1):n+s.substr(u))&&(-1!==(u=o.indexOf(":"))?(n=o.substring(0,u),o=(n=P[n]||n)+o.substring(u)):o=d+":"+o)}x[s]=o}return S=x}function I(){for(var t,n,i=/(\r\n|\r|\n)/g,r=0,o=0,a=0,s=M;B>=a&&(t=i.exec(e))&&!((s=t[0].length+t.index)>B);)r+=1,a=s;return-1==B?(o=s,n=e.substring(M)):0===M?n=e.substring(M,B):(o=B-a,n=-1==M?e.substring(B):e.substring(B,M+1)),{data:n,line:r,column:o}}f=I,l&&(w=Object.create({},{name:he((function(){return E})),originalName:he((function(){return _})),attrs:he(L),ns:he((function(){return P}))}));for(;-1!==M;){if(-1===(B=60===e.charCodeAt(M)?M:e.indexOf("<",M)))return C.length?g("unexpected end of file"):0===M?g("missing start tag"):void(M<e.length&&e.substring(M).trim()&&y("non-whitespace outside of root node"));if(M!==B)if(C.length){if(t&&(t(e.substring(M,B),le,f),b))return}else if(e.substring(M,B).trim()&&(y("non-whitespace outside of root node"),b))return;if(33===(x=e.charCodeAt(B+1))){if(91===(v=e.charCodeAt(B+2))&&"CDATA["===e.substr(B+3,6)){if(-1===(M=e.indexOf("]]>",B)))return g("unclosed cdata");if(r&&(r(e.substring(B+9,M),f),b))return;M+=3;continue}if(45===v&&45===e.charCodeAt(B+3)){if(-1===(M=e.indexOf("--\x3e",B)))return g("unclosed comment");if(s&&(s(e.substring(B+4,M),le,f),b))return;M+=3;continue}}if(63!==x){for(a=B+1;;a++){if(O=e.charCodeAt(a),isNaN(O))return M=-1,g("unclosed tag");if(34===O)v=e.indexOf('"',a+1),a=-1!==v?v:a;else if(39===O)v=e.indexOf("'",a+1),a=-1!==v?v:a;else if(62===O){M=a;break}}if(33!==x){if(S={},47===x){if(R=!1,k=!0,!C.length)return g("missing open tag");if(a=E=C.pop(),v=B+2+a.length,e.substring(B+2,v)!==a)return g("closing tag mismatch");for(;v<M;v++)if(!(32===(x=e.charCodeAt(v))||x>8&&x<14))return g("close tag")}else{if(47===e.charCodeAt(M-1)?(a=E=e.substring(B+1,M-1),R=!0,k=!0):(a=E=e.substring(B+1,M),R=!0,k=!1),!(x>96&&x<123||x>64&&x<91||95===x||58===x))return g("illegal first char nodeName");for(v=1,d=a.length;v<d;v++)if(!((x=a.charCodeAt(v))>96&&x<123||x>64&&x<91||x>47&&x<59||45===x||95===x||46==x)){if(32===x||x<14&&x>8){E=a.substring(0,v),S=null;break}return g("invalid nodeName")}k||C.push(E)}if(m){if(o=P,R&&(k||T.push(o),null===S&&(h=-1!==a.indexOf("xmlns",v))&&(N=v,D=a,L(),h=!1)),_=E,-1!==(x=E.indexOf(":"))){if(!(j=P[E.substring(0,x)]))return g("missing namespace on <"+_+">");E=E.substr(x+1)}else j=P.xmlns;j&&(E=j+":"+E)}if(R&&(N=v,D=a,n&&(l?n(w,le,k,f):n(E,L,le,k,f),b)))return;if(k){if(i&&(i(l?w:E,le,R,f),b))return;m&&(P=R?o:T.pop())}M+=1}else{if(u&&(u(e.substring(B,M+1),le,f),b))return;M+=1}}else{if(-1===(M=e.indexOf("?>",B)))return g("unclosed question");if(c&&(c(e.substring(B,M+2),f),b))return;M+=2}}}(e),f=be,b=!1,v},this.stop=function(){b=!0}}function xe(e){return e.xml&&"lowerCase"===e.xml.tagAlias}var Oe={xsi:"http://www.w3.org/2001/XMLSchema-instance",xml:"http://www.w3.org/XML/1998/namespace"};function je(e){return e.xml&&e.xml.serialize}function Ee(e){return"xsi:type"===je(e)}function _e(e,t){return xe(t)?e.prefix+":"+((n=e.localName).charAt(0).toUpperCase()+n.slice(1)):e.name;var n}function we(e){return new Error(e)}function Se(e){return e.$descriptor}function Te(e){Object(i.assign)(this,e),this.elementsById={},this.references=[],this.warnings=[],this.addReference=function(e){this.references.push(e)},this.addElement=function(e){if(!e)throw we("expected element");var t,n=this.elementsById,i=Se(e).idProperty;if(i&&(t=e.get(i.name))){if(!/^([a-z][\w-.]*:)?[a-z_][\w-.]*$/i.test(t))throw new Error("illegal ID <"+t+">");if(n[t])throw we("duplicate ID <"+t+">");n[t]=e}},this.addWarning=function(e){this.warnings.push(e)}}function Pe(){}function Ce(){}function Ae(){}function Re(e,t){this.property=e,this.context=t}function ke(e,t){this.element=t,this.propertyDesc=e}function Be(){}function Me(e,t,n){this.model=e,this.type=e.getType(t),this.context=n}function De(e,t,n){Me.call(this,e,t,n)}function Ne(e,t,n){this.model=e,this.context=n}function Le(e){e instanceof oe&&(e={model:e}),Object(i.assign)(this,{lax:!1},e)}Pe.prototype.handleEnd=function(){},Pe.prototype.handleText=function(){},Pe.prototype.handleNode=function(){},Ce.prototype=Object.create(Pe.prototype),Ce.prototype.handleNode=function(){return this},Ae.prototype=Object.create(Pe.prototype),Ae.prototype.handleText=function(e){this.body=(this.body||"")+e},Re.prototype=Object.create(Ae.prototype),Re.prototype.handleNode=function(e){if(this.element)throw we("expected no sub nodes");return this.element=this.createReference(e),this},Re.prototype.handleEnd=function(){this.element.id=this.body},Re.prototype.createReference=function(e){return{property:this.property.ns.name,id:""}},ke.prototype=Object.create(Ae.prototype),ke.prototype.handleEnd=function(){var e=this.body||"",t=this.element,n=this.propertyDesc;e=X(n.type,e),n.isMany?t.get(n.name).push(e):t.set(n.name,e)},Be.prototype=Object.create(Ae.prototype),Be.prototype.handleNode=function(e){var t=this,n=this.element;return n?t=this.handleChild(e):(n=this.element=this.createElement(e),this.context.addElement(n)),t},Me.prototype=Object.create(Be.prototype),Me.prototype.addReference=function(e){this.context.addReference(e)},Me.prototype.handleText=function(e){if(!Se(this.element).bodyProperty)throw we("unexpected body text <"+e+">");Ae.prototype.handleText.call(this,e)},Me.prototype.handleEnd=function(){var e=this.body,t=this.element,n=Se(t).bodyProperty;n&&void 0!==e&&(e=X(n.type,e),t.set(n.name,e))},Me.prototype.createElement=function(e){var t,n=e.attributes,r=this.type,o=Se(r),a=this.context,s=new r({}),c=this.model;return Object(i.forEach)(n,(function(e,n){var r,u=o.propertiesByName[n];u&&u.isReference?u.isMany?(r=e.split(" "),Object(i.forEach)(r,(function(e){a.addReference({element:s,property:u.ns.name,id:e})}))):a.addReference({element:s,property:u.ns.name,id:e}):(u?e=X(u.type,e):"xmlns"!==n&&(t=Q(n,o.ns.prefix),c.getPackage(t.prefix)&&a.addWarning({message:"unknown attribute <"+n+">",element:s,property:n,value:e})),s.set(n,e))})),s},Me.prototype.getPropertyForNode=function(e){var t,n,r=Q(e.name),o=this.type,a=this.model,s=Se(o),c=r.name,u=s.propertiesByName[c];if(u&&!u.isAttr)return Ee(u)&&(t=e.attributes["xsi:type"])?(t=function(e,t){var n=Q(e);return function(e,t){var n=e.name,i=e.localName,r=t.xml&&t.xml.typePrefix;return r&&0===i.indexOf(r)?e.prefix+":"+i.slice(r.length):n}(n,t.getPackage(n.prefix))}(t,a),n=a.getType(t),Object(i.assign)({},u,{effectiveType:Se(n).name})):u;var p=a.getPackage(r.prefix);if(p){if(t=_e(r,p),n=a.getType(t),u=Object(i.find)(s.properties,(function(e){return!e.isVirtual&&!e.isReference&&!e.isAttribute&&n.hasType(e.type)})))return Object(i.assign)({},u,{effectiveType:Se(n).name})}else if(u=Object(i.find)(s.properties,(function(e){return!e.isReference&&!e.isAttribute&&"Element"===e.type})))return u;throw we("unrecognized element <"+r.name+">")},Me.prototype.toString=function(){return"ElementDescriptor["+Se(this.type).name+"]"},Me.prototype.valueHandler=function(e,t){return new ke(e,t)},Me.prototype.referenceHandler=function(e){return new Re(e,this.context)},Me.prototype.handler=function(e){return"Element"===e?new Ne(this.model,e,this.context):new Me(this.model,e,this.context)},Me.prototype.handleChild=function(e){var t,n,r,o;if(t=this.getPropertyForNode(e),r=this.element,Z(n=t.effectiveType||t.type))return this.valueHandler(t,r);var a=(o=t.isReference?this.referenceHandler(t).handleNode(e):this.handler(n).handleNode(e)).element;return void 0!==a&&(t.isMany?r.get(t.name).push(a):r.set(t.name,a),t.isReference?(Object(i.assign)(a,{element:r}),this.context.addReference(a)):a.$parent=r),o},De.prototype=Object.create(Me.prototype),De.prototype.createElement=function(e){var t=e.name,n=Q(t),i=this.model,r=this.type,o=i.getPackage(n.prefix),a=o&&_e(n,o)||t;if(!r.hasType(a))throw we("unexpected element <"+e.originalName+">");return Me.prototype.createElement.call(this,e)},Ne.prototype=Object.create(Be.prototype),Ne.prototype.createElement=function(e){var t=e.name,n=Q(t).prefix,i=e.ns[n+"$uri"],r=e.attributes;return this.model.createAny(t,i,r)},Ne.prototype.handleChild=function(e){var t=new Ne(this.model,"Element",this.context).handleNode(e),n=this.element,i=t.element;return void 0!==i&&((n.$children=n.$children||[]).push(i),i.$parent=n),t},Ne.prototype.handleEnd=function(){this.body&&(this.element.$body=this.body)},Le.prototype.fromXML=function(e,t,n){var r=t.rootHandler;t instanceof Me?(r=t,t={}):"string"==typeof t?(r=this.handler(t),t={}):"string"==typeof r&&(r=this.handler(r));var o=this.model,a=this.lax,s=new Te(Object(i.assign)({},t,{rootHandler:r})),c=new ye({proxy:!0}),u=function(){var e=[];return Object.defineProperty(e,"peek",{value:function(){return this[this.length-1]}}),e}();function p(e,t,n){var i=t(),r=i.line,o=i.column,a=i.data;"<"===a.charAt(0)&&-1!==a.indexOf(" ")&&(a=a.slice(0,a.indexOf(" "))+">");var c="unparsable content "+(a?a+" ":"")+"detected\n\tline: "+r+"\n\tcolumn: "+o+"\n\tnested error: "+e.message;if(n)return s.addWarning({message:c,error:e}),!0;throw we(c)}function l(e,t){return p(e,t,!0)}r.context=s,u.push(r);var d=/^<\?xml /i,f=/ encoding="([^"]+)"/i,h=/^utf-8$/i;function m(e,t){try{u.peek().handleText(e)}catch(e){l(e,t)}}var v=o.getPackages().reduce((function(e,t){return e[t.uri]=t.prefix,e}),{"http://www.w3.org/XML/1998/namespace":"xml"});c.ns(v).on("openTag",(function(e,t,n,i){var r=e.attrs||{},o=Object.keys(r).reduce((function(e,n){var i=t(r[n]);return e[n]=i,e}),{});!function(e,t){var n=u.peek();try{u.push(n.handleNode(e))}catch(e){p(e,t,a)&&u.push(new Ce)}}({name:e.name,originalName:e.originalName,attributes:o,ns:e.ns},i)})).on("question",(function(e){if(d.test(e)){var t=f.exec(e),n=t&&t[1];n&&!h.test(n)&&s.addWarning({message:"unsupported document encoding <"+n+">, falling back to UTF-8"})}})).on("closeTag",(function(){u.pop().handleEnd()})).on("cdata",m).on("text",(function(e,t,n){!function(e,t){(e=e.trim())&&m(e,t)}(t(e),n)})).on("error",p).on("warn",l),setTimeout((function(){var t;try{c.parse(e),function(){var e,t,n=s.elementsById,i=s.references;for(e=0;t=i[e];e++){var r=t.element,o=n[t.id],a=Se(r).propertiesByName[t.property];if(o||s.addWarning({message:"unresolved reference <"+t.id+">",element:t.element,property:t.property,value:t.id}),a.isMany){var c=r.get(a.name),u=c.indexOf(t);-1===u&&(u=c.length),o?c[u]=o:c.splice(u,1)}else r.set(a.name,o)}}()}catch(e){t=e}var i=r.element;t||i||(t=we("failed to parse document as <"+r.type.$descriptor.name+">")),n(t,t?void 0:i,s)}),0)},Le.prototype.handler=function(e){return new De(this.model,e)};var Ie=/<|>|'|"|&|\n\r|\n/g,Fe=/<|>|&/g;function ze(e){var t={},n={},i={},r=[],o=[];this.byUri=function(t){return n[t]||e&&e.byUri(t)},this.add=function(e,t){n[e.uri]=e,t?r.push(e):o.push(e),this.mapPrefix(e.prefix,e.uri)},this.uriByPrefix=function(e){return t[e||"xmlns"]},this.mapPrefix=function(e,n){t[e||"xmlns"]=n},this.getNSKey=function(e){return void 0!==e.prefix?e.uri+"|"+e.prefix:e.uri},this.logUsed=function(t){var n=t.uri,r=this.getNSKey(t);i[r]=this.byUri(n),e&&e.logUsed(t)},this.getUsed=function(e){var t=this;return[].concat(r,o).filter((function(e){var n=t.getNSKey(e);return i[n]}))}}function Ve(e,t){e.super_=t,e.prototype=Object.create(t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}})}function $e(e){return Object(i.isString)(e)?e:(e.prefix?e.prefix+":":"")+e.localName}var He={"\n":"#10","\n\r":"#10",'"':"#34","'":"#39","<":"#60",">":"#62","&":"#38"},Ge={"<":"lt",">":"gt","&":"amp"};function We(e,t,n){return(e=Object(i.isString)(e)?e:""+e).replace(t,(function(e){return"&"+n[e]+";"}))}function qe(e){this.tagName=e}function Ue(){}function Ke(e){this.tagName=e}function Ye(e,t){this.body=[],this.attrs=[],this.parent=e,this.propertyDescriptor=t}function Xe(e,t){Ye.call(this,e,t)}function Je(){this.value="",this.write=function(e){this.value+=e}}function Ze(e,t){var n=[""];this.append=function(t){return e.write(t),this},this.appendNewLine=function(){return t&&e.write("\n"),this},this.appendIndent=function(){return t&&e.write(n.join(" ")),this},this.indent=function(){return n.push(""),this},this.unindent=function(){return n.pop(),this}}function Qe(e){return e=Object(i.assign)({format:!1,preamble:!0},e||{}),{toXML:function(t,n){var i=n||new Je,r=new Ze(i,e.format);if(e.preamble&&r.append('<?xml version="1.0" encoding="UTF-8"?>\n'),(new Ye).build(t).serializeTo(r),!n)return i.value}}}function et(e,t){oe.call(this,e,t)}qe.prototype.build=function(e){return this.element=e,this},qe.prototype.serializeTo=function(e){e.appendIndent().append("<"+this.tagName+">"+this.element.id+"</"+this.tagName+">").appendNewLine()},Ue.prototype.serializeValue=Ue.prototype.serializeTo=function(e){e.append(this.escape?We(this.value,Fe,Ge):this.value)},Ue.prototype.build=function(e,t){return this.value=t,"String"===e.type&&-1!==t.search(Fe)&&(this.escape=!0),this},Ve(Ke,Ue),Ke.prototype.serializeTo=function(e){e.appendIndent().append("<"+this.tagName+">"),this.serializeValue(e),e.append("</"+this.tagName+">").appendNewLine()},Ye.prototype.build=function(e){this.element=e;var t,n,r,o=e.$descriptor,a=this.propertyDescriptor,s=o.isGeneric;return t=s?this.parseGeneric(e):this.parseNsAttributes(e),this.ns=a?this.nsPropertyTagName(a):this.nsTagName(o),this.tagName=this.addTagName(this.ns),s||(n=function(e){var t=e.$descriptor;return Object(i.filter)(t.properties,(function(t){var n=t.name;if(t.isVirtual)return!1;if(!e.hasOwnProperty(n))return!1;var i=e[n];return i!==t.default&&(null!==i&&(!t.isMany||i.length))}))}(e),this.parseAttributes((r=n,Object(i.filter)(r,(function(e){return e.isAttr})))),this.parseContainments(function(e){return Object(i.filter)(e,(function(e){return!e.isAttr}))}(n))),this.parseGenericAttributes(e,t),this},Ye.prototype.nsTagName=function(e){return function(e,t){return t.isGeneric?Object(i.assign)({localName:t.ns.localName},e):Object(i.assign)({localName:(n=t.ns.localName,r=t.$pkg,xe(r)?(o=n).charAt(0).toLowerCase()+o.slice(1):n)},e);var n,r,o}(this.logNamespaceUsed(e.ns),e)},Ye.prototype.nsPropertyTagName=function(e){return function(e,t){return Object(i.assign)({localName:t.ns.localName},e)}(this.logNamespaceUsed(e.ns),e)},Ye.prototype.isLocalNs=function(e){return e.uri===this.ns.uri},Ye.prototype.nsAttributeName=function(e){var t;if(t=Object(i.isString)(e)?Q(e):e.ns,e.inherited)return{localName:t.localName};var n=this.logNamespaceUsed(t);return this.getNamespaces().logUsed(n),this.isLocalNs(n)?{localName:t.localName}:Object(i.assign)({localName:t.localName},n)},Ye.prototype.parseGeneric=function(e){var t=this,n=this.body,r=[];return Object(i.forEach)(e,(function(o,a){"$body"===a?n.push((new Ue).build({type:"String"},o)):"$children"===a?Object(i.forEach)(o,(function(e){n.push(new Ye(t).build(e))})):0!==a.indexOf("$")&&t.parseNsAttribute(e,a,o)&&r.push({name:a,value:o})})),r},Ye.prototype.parseNsAttribute=function(e,t,n){var i,r=e.$model,o=Q(t);if("xmlns"===o.prefix&&(i={prefix:o.localName,uri:n}),o.prefix||"xmlns"!==o.localName||(i={uri:n}),!i)return{name:t,value:n};if(r&&r.getPackage(n))this.logNamespace(i,!0,!0);else{var a=this.logNamespaceUsed(i,!0);this.getNamespaces().logUsed(a)}},Ye.prototype.parseNsAttributes=function(e,t){var n=this,r=e.$attrs,o=[];return Object(i.forEach)(r,(function(t,i){var r=n.parseNsAttribute(e,i,t);r&&o.push(r)})),o},Ye.prototype.parseGenericAttributes=function(e,t){var n=this;Object(i.forEach)(t,(function(t){if("xsi:type"!==t.name)try{n.addAttribute(n.nsAttributeName(t.name),t.value)}catch(n){console.warn("missing namespace information for ",t.name,"=",t.value,"on",e,n)}}))},Ye.prototype.parseContainments=function(e){var t=this,n=this.body,r=this.element;Object(i.forEach)(e,(function(e){var o=r.get(e.name),a=e.isReference;if(e.isMany||(o=[o]),e.isBody)n.push((new Ue).build(e,o[0]));else if(Z(e.type))Object(i.forEach)(o,(function(i){n.push(new Ke(t.addTagName(t.nsPropertyTagName(e))).build(e,i))}));else if(a)Object(i.forEach)(o,(function(i){n.push(new qe(t.addTagName(t.nsPropertyTagName(e))).build(i))}));else{var s=Ee(e),c=function(e){return"property"===je(e)}(e);Object(i.forEach)(o,(function(i){var r;r=s?new Xe(t,e):c?new Ye(t,e):new Ye(t),n.push(r.build(i))}))}}))},Ye.prototype.getNamespaces=function(e){var t,n=this.namespaces,i=this.parent;return n||(t=i&&i.getNamespaces(),e||!t?this.namespaces=n=new ze(t):n=t),n},Ye.prototype.logNamespace=function(e,t,n){var i=this.getNamespaces(n),r=e.uri,o=e.prefix,a=i.byUri(r);return"xml"===o||a&&!n||i.add(e,t),i.mapPrefix(o,r),e},Ye.prototype.logNamespaceUsed=function(e,t){var n,i,r,o=this.element.$model,a=this.getNamespaces(t),s=e.prefix,c=e.uri;if(!s&&!c)return{localName:e.localName};if(r=Oe[s]||o&&(o.getPackage(s)||{}).uri,!(c=c||r||a.uriByPrefix(s)))throw new Error("no namespace uri given for prefix <"+s+">");if(!(e=a.byUri(c))){for(n=s,i=1;a.uriByPrefix(n);)n=s+"_"+i++;e=this.logNamespace({prefix:n,uri:c},r===c)}return s&&a.mapPrefix(s,c),e},Ye.prototype.parseAttributes=function(e){var t=this,n=this.element;Object(i.forEach)(e,(function(e){var r=n.get(e.name);if(e.isReference)if(e.isMany){var o=[];Object(i.forEach)(r,(function(e){o.push(e.id)})),r=o.join(" ")}else r=r.id;t.addAttribute(t.nsAttributeName(e),r)}))},Ye.prototype.addTagName=function(e){var t=this.logNamespaceUsed(e);return this.getNamespaces().logUsed(t),$e(e)},Ye.prototype.addAttribute=function(e,t){var n=this.attrs;Object(i.isString)(t)&&(t=We(t,Ie,He)),n.push({name:e,value:t})},Ye.prototype.serializeAttributes=function(e){var t=this.attrs,n=this.namespaces;n&&(t=function(e){return Object(i.map)(e.getUsed(),(function(e){return{name:"xmlns"+(e.prefix?":"+e.prefix:""),value:e.uri}}))}(n).concat(t)),Object(i.forEach)(t,(function(t){e.append(" ").append($e(t.name)).append('="').append(t.value).append('"')}))},Ye.prototype.serializeTo=function(e){var t=this.body[0],n=t&&t.constructor!==Ue;e.appendIndent().append("<"+this.tagName),this.serializeAttributes(e),e.append(t?">":" />"),t&&(n&&e.appendNewLine().indent(),Object(i.forEach)(this.body,(function(t){t.serializeTo(e)})),n&&e.unindent().appendIndent(),e.append("</"+this.tagName+">")),e.appendNewLine()},Ve(Xe,Ye),Xe.prototype.parseNsAttributes=function(e){var t=Ye.prototype.parseNsAttributes.call(this,e),n=e.$descriptor;if(n.name===this.propertyDescriptor.type)return t;var i=this.typeNs=this.nsTagName(n);this.getNamespaces().logUsed(this.typeNs);var r=e.$model.getPackage(i.uri),o=r.xml&&r.xml.typePrefix||"";return this.addAttribute(this.nsAttributeName("xsi:type"),(i.prefix?i.prefix+":":"")+o+n.ns.localName),t},Xe.prototype.isLocalNs=function(e){return e.uri===(this.typeNs||this.ns).uri},et.prototype=Object.create(oe.prototype),et.prototype.fromXML=function(e,t,n,r){Object(i.isString)(t)||(r=n,n=t,t="bpmn:Definitions"),Object(i.isFunction)(n)&&(r=n,n={});var o=new Le(Object(i.assign)({model:this,lax:!0},n)),a=o.handler(t);o.fromXML(e,a,r)},et.prototype.toXML=function(e,t,n){Object(i.isFunction)(t)&&(n=t,t={});var r,o,a=new Qe(t);try{r=a.toXML(e)}catch(e){o=e}return n(o,r)};var tt={bpmn:{name:"BPMN20",uri:"http://www.omg.org/spec/BPMN/20100524/MODEL",prefix:"bpmn",associations:[],types:[{name:"Interface",superClass:["RootElement"],properties:[{name:"name",isAttr:!0,type:"String"},{name:"operations",type:"Operation",isMany:!0},{name:"implementationRef",isAttr:!0,type:"String"}]},{name:"Operation",superClass:["BaseElement"],properties:[{name:"name",isAttr:!0,type:"String"},{name:"inMessageRef",type:"Message",isReference:!0},{name:"outMessageRef",type:"Message",isReference:!0},{name:"errorRef",type:"Error",isMany:!0,isReference:!0},{name:"implementationRef",isAttr:!0,type:"String"}]},{name:"EndPoint",superClass:["RootElement"]},{name:"Auditing",superClass:["BaseElement"]},{name:"GlobalTask",superClass:["CallableElement"],properties:[{name:"resources",type:"ResourceRole",isMany:!0}]},{name:"Monitoring",superClass:["BaseElement"]},{name:"Performer",superClass:["ResourceRole"]},{name:"Process",superClass:["FlowElementsContainer","CallableElement"],properties:[{name:"processType",type:"ProcessType",isAttr:!0},{name:"isClosed",isAttr:!0,type:"Boolean"},{name:"auditing",type:"Auditing"},{name:"monitoring",type:"Monitoring"},{name:"properties",type:"Property",isMany:!0},{name:"laneSets",isMany:!0,replaces:"FlowElementsContainer#laneSets",type:"LaneSet"},{name:"flowElements",isMany:!0,replaces:"FlowElementsContainer#flowElements",type:"FlowElement"},{name:"artifacts",type:"Artifact",isMany:!0},{name:"resources",type:"ResourceRole",isMany:!0},{name:"correlationSubscriptions",type:"CorrelationSubscription",isMany:!0},{name:"supports",type:"Process",isMany:!0,isReference:!0},{name:"definitionalCollaborationRef",type:"Collaboration",isAttr:!0,isReference:!0},{name:"isExecutable",isAttr:!0,type:"Boolean"}]},{name:"LaneSet",superClass:["BaseElement"],properties:[{name:"lanes",type:"Lane",isMany:!0},{name:"name",isAttr:!0,type:"String"}]},{name:"Lane",superClass:["BaseElement"],properties:[{name:"name",isAttr:!0,type:"String"},{name:"partitionElementRef",type:"BaseElement",isAttr:!0,isReference:!0},{name:"partitionElement",type:"BaseElement"},{name:"flowNodeRef",type:"FlowNode",isMany:!0,isReference:!0},{name:"childLaneSet",type:"LaneSet",xml:{serialize:"xsi:type"}}]},{name:"GlobalManualTask",superClass:["GlobalTask"]},{name:"ManualTask",superClass:["Task"]},{name:"UserTask",superClass:["Task"],properties:[{name:"renderings",type:"Rendering",isMany:!0},{name:"implementation",isAttr:!0,type:"String"}]},{name:"Rendering",superClass:["BaseElement"]},{name:"HumanPerformer",superClass:["Performer"]},{name:"PotentialOwner",superClass:["HumanPerformer"]},{name:"GlobalUserTask",superClass:["GlobalTask"],properties:[{name:"implementation",isAttr:!0,type:"String"},{name:"renderings",type:"Rendering",isMany:!0}]},{name:"Gateway",isAbstract:!0,superClass:["FlowNode"],properties:[{name:"gatewayDirection",type:"GatewayDirection",default:"Unspecified",isAttr:!0}]},{name:"EventBasedGateway",superClass:["Gateway"],properties:[{name:"instantiate",default:!1,isAttr:!0,type:"Boolean"},{name:"eventGatewayType",type:"EventBasedGatewayType",isAttr:!0,default:"Exclusive"}]},{name:"ComplexGateway",superClass:["Gateway"],properties:[{name:"activationCondition",type:"Expression",xml:{serialize:"xsi:type"}},{name:"default",type:"SequenceFlow",isAttr:!0,isReference:!0}]},{name:"ExclusiveGateway",superClass:["Gateway"],properties:[{name:"default",type:"SequenceFlow",isAttr:!0,isReference:!0}]},{name:"InclusiveGateway",superClass:["Gateway"],properties:[{name:"default",type:"SequenceFlow",isAttr:!0,isReference:!0}]},{name:"ParallelGateway",superClass:["Gateway"]},{name:"RootElement",isAbstract:!0,superClass:["BaseElement"]},{name:"Relationship",superClass:["BaseElement"],properties:[{name:"type",isAttr:!0,type:"String"},{name:"direction",type:"RelationshipDirection",isAttr:!0},{name:"source",isMany:!0,isReference:!0,type:"Element"},{name:"target",isMany:!0,isReference:!0,type:"Element"}]},{name:"BaseElement",isAbstract:!0,properties:[{name:"id",isAttr:!0,type:"String",isId:!0},{name:"documentation",type:"Documentation",isMany:!0},{name:"extensionDefinitions",type:"ExtensionDefinition",isMany:!0,isReference:!0},{name:"extensionElements",type:"ExtensionElements"}]},{name:"Extension",properties:[{name:"mustUnderstand",default:!1,isAttr:!0,type:"Boolean"},{name:"definition",type:"ExtensionDefinition",isAttr:!0,isReference:!0}]},{name:"ExtensionDefinition",properties:[{name:"name",isAttr:!0,type:"String"},{name:"extensionAttributeDefinitions",type:"ExtensionAttributeDefinition",isMany:!0}]},{name:"ExtensionAttributeDefinition",properties:[{name:"name",isAttr:!0,type:"String"},{name:"type",isAttr:!0,type:"String"},{name:"isReference",default:!1,isAttr:!0,type:"Boolean"},{name:"extensionDefinition",type:"ExtensionDefinition",isAttr:!0,isReference:!0}]},{name:"ExtensionElements",properties:[{name:"valueRef",isAttr:!0,isReference:!0,type:"Element"},{name:"values",type:"Element",isMany:!0},{name:"extensionAttributeDefinition",type:"ExtensionAttributeDefinition",isAttr:!0,isReference:!0}]},{name:"Documentation",superClass:["BaseElement"],properties:[{name:"text",type:"String",isBody:!0},{name:"textFormat",default:"text/plain",isAttr:!0,type:"String"}]},{name:"Event",isAbstract:!0,superClass:["FlowNode","InteractionNode"],properties:[{name:"properties",type:"Property",isMany:!0}]},{name:"IntermediateCatchEvent",superClass:["CatchEvent"]},{name:"IntermediateThrowEvent",superClass:["ThrowEvent"]},{name:"EndEvent",superClass:["ThrowEvent"]},{name:"StartEvent",superClass:["CatchEvent"],properties:[{name:"isInterrupting",default:!0,isAttr:!0,type:"Boolean"}]},{name:"ThrowEvent",isAbstract:!0,superClass:["Event"],properties:[{name:"dataInputs",type:"DataInput",isMany:!0},{name:"dataInputAssociations",type:"DataInputAssociation",isMany:!0},{name:"inputSet",type:"InputSet"},{name:"eventDefinitions",type:"EventDefinition",isMany:!0},{name:"eventDefinitionRef",type:"EventDefinition",isMany:!0,isReference:!0}]},{name:"CatchEvent",isAbstract:!0,superClass:["Event"],properties:[{name:"parallelMultiple",isAttr:!0,type:"Boolean",default:!1},{name:"dataOutputs",type:"DataOutput",isMany:!0},{name:"dataOutputAssociations",type:"DataOutputAssociation",isMany:!0},{name:"outputSet",type:"OutputSet"},{name:"eventDefinitions",type:"EventDefinition",isMany:!0},{name:"eventDefinitionRef",type:"EventDefinition",isMany:!0,isReference:!0}]},{name:"BoundaryEvent",superClass:["CatchEvent"],properties:[{name:"cancelActivity",default:!0,isAttr:!0,type:"Boolean"},{name:"attachedToRef",type:"Activity",isAttr:!0,isReference:!0}]},{name:"EventDefinition",isAbstract:!0,superClass:["RootElement"]},{name:"CancelEventDefinition",superClass:["EventDefinition"]},{name:"ErrorEventDefinition",superClass:["EventDefinition"],properties:[{name:"errorRef",type:"Error",isAttr:!0,isReference:!0}]},{name:"TerminateEventDefinition",superClass:["EventDefinition"]},{name:"EscalationEventDefinition",superClass:["EventDefinition"],properties:[{name:"escalationRef",type:"Escalation",isAttr:!0,isReference:!0}]},{name:"Escalation",properties:[{name:"structureRef",type:"ItemDefinition",isAttr:!0,isReference:!0},{name:"name",isAttr:!0,type:"String"},{name:"escalationCode",isAttr:!0,type:"String"}],superClass:["RootElement"]},{name:"CompensateEventDefinition",superClass:["EventDefinition"],properties:[{name:"waitForCompletion",isAttr:!0,type:"Boolean",default:!0},{name:"activityRef",type:"Activity",isAttr:!0,isReference:!0}]},{name:"TimerEventDefinition",superClass:["EventDefinition"],properties:[{name:"timeDate",type:"Expression",xml:{serialize:"xsi:type"}},{name:"timeCycle",type:"Expression",xml:{serialize:"xsi:type"}},{name:"timeDuration",type:"Expression",xml:{serialize:"xsi:type"}}]},{name:"LinkEventDefinition",superClass:["EventDefinition"],properties:[{name:"name",isAttr:!0,type:"String"},{name:"target",type:"LinkEventDefinition",isAttr:!0,isReference:!0},{name:"source",type:"LinkEventDefinition",isMany:!0,isReference:!0}]},{name:"MessageEventDefinition",superClass:["EventDefinition"],properties:[{name:"messageRef",type:"Message",isAttr:!0,isReference:!0},{name:"operationRef",type:"Operation",isAttr:!0,isReference:!0}]},{name:"ConditionalEventDefinition",superClass:["EventDefinition"],properties:[{name:"condition",type:"Expression",xml:{serialize:"xsi:type"}}]},{name:"SignalEventDefinition",superClass:["EventDefinition"],properties:[{name:"signalRef",type:"Signal",isAttr:!0,isReference:!0}]},{name:"Signal",superClass:["RootElement"],properties:[{name:"structureRef",type:"ItemDefinition",isAttr:!0,isReference:!0},{name:"name",isAttr:!0,type:"String"}]},{name:"ImplicitThrowEvent",superClass:["ThrowEvent"]},{name:"DataState",superClass:["BaseElement"],properties:[{name:"name",isAttr:!0,type:"String"}]},{name:"ItemAwareElement",superClass:["BaseElement"],properties:[{name:"itemSubjectRef",type:"ItemDefinition",isAttr:!0,isReference:!0},{name:"dataState",type:"DataState"}]},{name:"DataAssociation",superClass:["BaseElement"],properties:[{name:"sourceRef",type:"ItemAwareElement",isMany:!0,isReference:!0},{name:"targetRef",type:"ItemAwareElement",isReference:!0},{name:"transformation",type:"FormalExpression",xml:{serialize:"property"}},{name:"assignment",type:"Assignment",isMany:!0}]},{name:"DataInput",superClass:["ItemAwareElement"],properties:[{name:"name",isAttr:!0,type:"String"},{name:"isCollection",default:!1,isAttr:!0,type:"Boolean"},{name:"inputSetRef",type:"InputSet",isMany:!0,isVirtual:!0,isReference:!0},{name:"inputSetWithOptional",type:"InputSet",isMany:!0,isVirtual:!0,isReference:!0},{name:"inputSetWithWhileExecuting",type:"InputSet",isMany:!0,isVirtual:!0,isReference:!0}]},{name:"DataOutput",superClass:["ItemAwareElement"],properties:[{name:"name",isAttr:!0,type:"String"},{name:"isCollection",default:!1,isAttr:!0,type:"Boolean"},{name:"outputSetRef",type:"OutputSet",isMany:!0,isVirtual:!0,isReference:!0},{name:"outputSetWithOptional",type:"OutputSet",isMany:!0,isVirtual:!0,isReference:!0},{name:"outputSetWithWhileExecuting",type:"OutputSet",isMany:!0,isVirtual:!0,isReference:!0}]},{name:"InputSet",superClass:["BaseElement"],properties:[{name:"name",isAttr:!0,type:"String"},{name:"dataInputRefs",type:"DataInput",isMany:!0,isReference:!0},{name:"optionalInputRefs",type:"DataInput",isMany:!0,isReference:!0},{name:"whileExecutingInputRefs",type:"DataInput",isMany:!0,isReference:!0},{name:"outputSetRefs",type:"OutputSet",isMany:!0,isReference:!0}]},{name:"OutputSet",superClass:["BaseElement"],properties:[{name:"dataOutputRefs",type:"DataOutput",isMany:!0,isReference:!0},{name:"name",isAttr:!0,type:"String"},{name:"inputSetRefs",type:"InputSet",isMany:!0,isReference:!0},{name:"optionalOutputRefs",type:"DataOutput",isMany:!0,isReference:!0},{name:"whileExecutingOutputRefs",type:"DataOutput",isMany:!0,isReference:!0}]},{name:"Property",superClass:["ItemAwareElement"],properties:[{name:"name",isAttr:!0,type:"String"}]},{name:"DataInputAssociation",superClass:["DataAssociation"]},{name:"DataOutputAssociation",superClass:["DataAssociation"]},{name:"InputOutputSpecification",superClass:["BaseElement"],properties:[{name:"dataInputs",type:"DataInput",isMany:!0},{name:"dataOutputs",type:"DataOutput",isMany:!0},{name:"inputSets",type:"InputSet",isMany:!0},{name:"outputSets",type:"OutputSet",isMany:!0}]},{name:"DataObject",superClass:["FlowElement","ItemAwareElement"],properties:[{name:"isCollection",default:!1,isAttr:!0,type:"Boolean"}]},{name:"InputOutputBinding",properties:[{name:"inputDataRef",type:"InputSet",isAttr:!0,isReference:!0},{name:"outputDataRef",type:"OutputSet",isAttr:!0,isReference:!0},{name:"operationRef",type:"Operation",isAttr:!0,isReference:!0}]},{name:"Assignment",superClass:["BaseElement"],properties:[{name:"from",type:"Expression",xml:{serialize:"xsi:type"}},{name:"to",type:"Expression",xml:{serialize:"xsi:type"}}]},{name:"DataStore",superClass:["RootElement","ItemAwareElement"],properties:[{name:"name",isAttr:!0,type:"String"},{name:"capacity",isAttr:!0,type:"Integer"},{name:"isUnlimited",default:!0,isAttr:!0,type:"Boolean"}]},{name:"DataStoreReference",superClass:["ItemAwareElement","FlowElement"],properties:[{name:"dataStoreRef",type:"DataStore",isAttr:!0,isReference:!0}]},{name:"DataObjectReference",superClass:["ItemAwareElement","FlowElement"],properties:[{name:"dataObjectRef",type:"DataObject",isAttr:!0,isReference:!0}]},{name:"ConversationLink",superClass:["BaseElement"],properties:[{name:"sourceRef",type:"InteractionNode",isAttr:!0,isReference:!0},{name:"targetRef",type:"InteractionNode",isAttr:!0,isReference:!0},{name:"name",isAttr:!0,type:"String"}]},{name:"ConversationAssociation",superClass:["BaseElement"],properties:[{name:"innerConversationNodeRef",type:"ConversationNode",isAttr:!0,isReference:!0},{name:"outerConversationNodeRef",type:"ConversationNode",isAttr:!0,isReference:!0}]},{name:"CallConversation",superClass:["ConversationNode"],properties:[{name:"calledCollaborationRef",type:"Collaboration",isAttr:!0,isReference:!0},{name:"participantAssociations",type:"ParticipantAssociation",isMany:!0}]},{name:"Conversation",superClass:["ConversationNode"]},{name:"SubConversation",superClass:["ConversationNode"],properties:[{name:"conversationNodes",type:"ConversationNode",isMany:!0}]},{name:"ConversationNode",isAbstract:!0,superClass:["InteractionNode","BaseElement"],properties:[{name:"name",isAttr:!0,type:"String"},{name:"participantRef",type:"Participant",isMany:!0,isReference:!0},{name:"messageFlowRefs",type:"MessageFlow",isMany:!0,isReference:!0},{name:"correlationKeys",type:"CorrelationKey",isMany:!0}]},{name:"GlobalConversation",superClass:["Collaboration"]},{name:"PartnerEntity",superClass:["RootElement"],properties:[{name:"name",isAttr:!0,type:"String"},{name:"participantRef",type:"Participant",isMany:!0,isReference:!0}]},{name:"PartnerRole",superClass:["RootElement"],properties:[{name:"name",isAttr:!0,type:"String"},{name:"participantRef",type:"Participant",isMany:!0,isReference:!0}]},{name:"CorrelationProperty",superClass:["RootElement"],properties:[{name:"correlationPropertyRetrievalExpression",type:"CorrelationPropertyRetrievalExpression",isMany:!0},{name:"name",isAttr:!0,type:"String"},{name:"type",type:"ItemDefinition",isAttr:!0,isReference:!0}]},{name:"Error",superClass:["RootElement"],properties:[{name:"structureRef",type:"ItemDefinition",isAttr:!0,isReference:!0},{name:"name",isAttr:!0,type:"String"},{name:"errorCode",isAttr:!0,type:"String"}]},{name:"CorrelationKey",superClass:["BaseElement"],properties:[{name:"correlationPropertyRef",type:"CorrelationProperty",isMany:!0,isReference:!0},{name:"name",isAttr:!0,type:"String"}]},{name:"Expression",superClass:["BaseElement"],isAbstract:!1,properties:[{name:"body",isBody:!0,type:"String"}]},{name:"FormalExpression",superClass:["Expression"],properties:[{name:"language",isAttr:!0,type:"String"},{name:"evaluatesToTypeRef",type:"ItemDefinition",isAttr:!0,isReference:!0}]},{name:"Message",superClass:["RootElement"],properties:[{name:"name",isAttr:!0,type:"String"},{name:"itemRef",type:"ItemDefinition",isAttr:!0,isReference:!0}]},{name:"ItemDefinition",superClass:["RootElement"],properties:[{name:"itemKind",type:"ItemKind",isAttr:!0},{name:"structureRef",isAttr:!0,type:"String"},{name:"isCollection",default:!1,isAttr:!0,type:"Boolean"},{name:"import",type:"Import",isAttr:!0,isReference:!0}]},{name:"FlowElement",isAbstract:!0,superClass:["BaseElement"],properties:[{name:"name",isAttr:!0,type:"String"},{name:"auditing",type:"Auditing"},{name:"monitoring",type:"Monitoring"},{name:"categoryValueRef",type:"CategoryValue",isMany:!0,isReference:!0}]},{name:"SequenceFlow",superClass:["FlowElement"],properties:[{name:"isImmediate",isAttr:!0,type:"Boolean"},{name:"conditionExpression",type:"Expression",xml:{serialize:"xsi:type"}},{name:"sourceRef",type:"FlowNode",isAttr:!0,isReference:!0},{name:"targetRef",type:"FlowNode",isAttr:!0,isReference:!0}]},{name:"FlowElementsContainer",isAbstract:!0,superClass:["BaseElement"],properties:[{name:"laneSets",type:"LaneSet",isMany:!0},{name:"flowElements",type:"FlowElement",isMany:!0}]},{name:"CallableElement",isAbstract:!0,superClass:["RootElement"],properties:[{name:"name",isAttr:!0,type:"String"},{name:"ioSpecification",type:"InputOutputSpecification",xml:{serialize:"property"}},{name:"supportedInterfaceRef",type:"Interface",isMany:!0,isReference:!0},{name:"ioBinding",type:"InputOutputBinding",isMany:!0,xml:{serialize:"property"}}]},{name:"FlowNode",isAbstract:!0,superClass:["FlowElement"],properties:[{name:"incoming",type:"SequenceFlow",isMany:!0,isReference:!0},{name:"outgoing",type:"SequenceFlow",isMany:!0,isReference:!0},{name:"lanes",type:"Lane",isMany:!0,isVirtual:!0,isReference:!0}]},{name:"CorrelationPropertyRetrievalExpression",superClass:["BaseElement"],properties:[{name:"messagePath",type:"FormalExpression"},{name:"messageRef",type:"Message",isAttr:!0,isReference:!0}]},{name:"CorrelationPropertyBinding",superClass:["BaseElement"],properties:[{name:"dataPath",type:"FormalExpression"},{name:"correlationPropertyRef",type:"CorrelationProperty",isAttr:!0,isReference:!0}]},{name:"Resource",superClass:["RootElement"],properties:[{name:"name",isAttr:!0,type:"String"},{name:"resourceParameters",type:"ResourceParameter",isMany:!0}]},{name:"ResourceParameter",superClass:["BaseElement"],properties:[{name:"name",isAttr:!0,type:"String"},{name:"isRequired",isAttr:!0,type:"Boolean"},{name:"type",type:"ItemDefinition",isAttr:!0,isReference:!0}]},{name:"CorrelationSubscription",superClass:["BaseElement"],properties:[{name:"correlationKeyRef",type:"CorrelationKey",isAttr:!0,isReference:!0},{name:"correlationPropertyBinding",type:"CorrelationPropertyBinding",isMany:!0}]},{name:"MessageFlow",superClass:["BaseElement"],properties:[{name:"name",isAttr:!0,type:"String"},{name:"sourceRef",type:"InteractionNode",isAttr:!0,isReference:!0},{name:"targetRef",type:"InteractionNode",isAttr:!0,isReference:!0},{name:"messageRef",type:"Message",isAttr:!0,isReference:!0}]},{name:"MessageFlowAssociation",superClass:["BaseElement"],properties:[{name:"innerMessageFlowRef",type:"MessageFlow",isAttr:!0,isReference:!0},{name:"outerMessageFlowRef",type:"MessageFlow",isAttr:!0,isReference:!0}]},{name:"InteractionNode",isAbstract:!0,properties:[{name:"incomingConversationLinks",type:"ConversationLink",isMany:!0,isVirtual:!0,isReference:!0},{name:"outgoingConversationLinks",type:"ConversationLink",isMany:!0,isVirtual:!0,isReference:!0}]},{name:"Participant",superClass:["InteractionNode","BaseElement"],properties:[{name:"name",isAttr:!0,type:"String"},{name:"interfaceRef",type:"Interface",isMany:!0,isReference:!0},{name:"participantMultiplicity",type:"ParticipantMultiplicity"},{name:"endPointRefs",type:"EndPoint",isMany:!0,isReference:!0},{name:"processRef",type:"Process",isAttr:!0,isReference:!0}]},{name:"ParticipantAssociation",superClass:["BaseElement"],properties:[{name:"innerParticipantRef",type:"Participant",isAttr:!0,isReference:!0},{name:"outerParticipantRef",type:"Participant",isAttr:!0,isReference:!0}]},{name:"ParticipantMultiplicity",properties:[{name:"minimum",default:0,isAttr:!0,type:"Integer"},{name:"maximum",default:1,isAttr:!0,type:"Integer"}],superClass:["BaseElement"]},{name:"Collaboration",superClass:["RootElement"],properties:[{name:"name",isAttr:!0,type:"String"},{name:"isClosed",isAttr:!0,type:"Boolean"},{name:"participants",type:"Participant",isMany:!0},{name:"messageFlows",type:"MessageFlow",isMany:!0},{name:"artifacts",type:"Artifact",isMany:!0},{name:"conversations",type:"ConversationNode",isMany:!0},{name:"conversationAssociations",type:"ConversationAssociation"},{name:"participantAssociations",type:"ParticipantAssociation",isMany:!0},{name:"messageFlowAssociations",type:"MessageFlowAssociation",isMany:!0},{name:"correlationKeys",type:"CorrelationKey",isMany:!0},{name:"choreographyRef",type:"Choreography",isMany:!0,isReference:!0},{name:"conversationLinks",type:"ConversationLink",isMany:!0}]},{name:"ChoreographyActivity",isAbstract:!0,superClass:["FlowNode"],properties:[{name:"participantRef",type:"Participant",isMany:!0,isReference:!0},{name:"initiatingParticipantRef",type:"Participant",isAttr:!0,isReference:!0},{name:"correlationKeys",type:"CorrelationKey",isMany:!0},{name:"loopType",type:"ChoreographyLoopType",default:"None",isAttr:!0}]},{name:"CallChoreography",superClass:["ChoreographyActivity"],properties:[{name:"calledChoreographyRef",type:"Choreography",isAttr:!0,isReference:!0},{name:"participantAssociations",type:"ParticipantAssociation",isMany:!0}]},{name:"SubChoreography",superClass:["ChoreographyActivity","FlowElementsContainer"],properties:[{name:"artifacts",type:"Artifact",isMany:!0}]},{name:"ChoreographyTask",superClass:["ChoreographyActivity"],properties:[{name:"messageFlowRef",type:"MessageFlow",isMany:!0,isReference:!0}]},{name:"Choreography",superClass:["Collaboration","FlowElementsContainer"]},{name:"GlobalChoreographyTask",superClass:["Choreography"],properties:[{name:"initiatingParticipantRef",type:"Participant",isAttr:!0,isReference:!0}]},{name:"TextAnnotation",superClass:["Artifact"],properties:[{name:"text",type:"String"},{name:"textFormat",default:"text/plain",isAttr:!0,type:"String"}]},{name:"Group",superClass:["Artifact"],properties:[{name:"categoryValueRef",type:"CategoryValue",isAttr:!0,isReference:!0}]},{name:"Association",superClass:["Artifact"],properties:[{name:"associationDirection",type:"AssociationDirection",isAttr:!0},{name:"sourceRef",type:"BaseElement",isAttr:!0,isReference:!0},{name:"targetRef",type:"BaseElement",isAttr:!0,isReference:!0}]},{name:"Category",superClass:["RootElement"],properties:[{name:"categoryValue",type:"CategoryValue",isMany:!0},{name:"name",isAttr:!0,type:"String"}]},{name:"Artifact",isAbstract:!0,superClass:["BaseElement"]},{name:"CategoryValue",superClass:["BaseElement"],properties:[{name:"categorizedFlowElements",type:"FlowElement",isMany:!0,isVirtual:!0,isReference:!0},{name:"value",isAttr:!0,type:"String"}]},{name:"Activity",isAbstract:!0,superClass:["FlowNode"],properties:[{name:"isForCompensation",default:!1,isAttr:!0,type:"Boolean"},{name:"default",type:"SequenceFlow",isAttr:!0,isReference:!0},{name:"ioSpecification",type:"InputOutputSpecification",xml:{serialize:"property"}},{name:"boundaryEventRefs",type:"BoundaryEvent",isMany:!0,isReference:!0},{name:"properties",type:"Property",isMany:!0},{name:"dataInputAssociations",type:"DataInputAssociation",isMany:!0},{name:"dataOutputAssociations",type:"DataOutputAssociation",isMany:!0},{name:"startQuantity",default:1,isAttr:!0,type:"Integer"},{name:"resources",type:"ResourceRole",isMany:!0},{name:"completionQuantity",default:1,isAttr:!0,type:"Integer"},{name:"loopCharacteristics",type:"LoopCharacteristics"}]},{name:"ServiceTask",superClass:["Task"],properties:[{name:"implementation",isAttr:!0,type:"String"},{name:"operationRef",type:"Operation",isAttr:!0,isReference:!0}]},{name:"SubProcess",superClass:["Activity","FlowElementsContainer","InteractionNode"],properties:[{name:"triggeredByEvent",default:!1,isAttr:!0,type:"Boolean"},{name:"artifacts",type:"Artifact",isMany:!0}]},{name:"LoopCharacteristics",isAbstract:!0,superClass:["BaseElement"]},{name:"MultiInstanceLoopCharacteristics",superClass:["LoopCharacteristics"],properties:[{name:"isSequential",default:!1,isAttr:!0,type:"Boolean"},{name:"behavior",type:"MultiInstanceBehavior",default:"All",isAttr:!0},{name:"loopCardinality",type:"Expression",xml:{serialize:"xsi:type"}},{name:"loopDataInputRef",type:"ItemAwareElement",isReference:!0},{name:"loopDataOutputRef",type:"ItemAwareElement",isReference:!0},{name:"inputDataItem",type:"DataInput",xml:{serialize:"property"}},{name:"outputDataItem",type:"DataOutput",xml:{serialize:"property"}},{name:"complexBehaviorDefinition",type:"ComplexBehaviorDefinition",isMany:!0},{name:"completionCondition",type:"Expression",xml:{serialize:"xsi:type"}},{name:"oneBehaviorEventRef",type:"EventDefinition",isAttr:!0,isReference:!0},{name:"noneBehaviorEventRef",type:"EventDefinition",isAttr:!0,isReference:!0}]},{name:"StandardLoopCharacteristics",superClass:["LoopCharacteristics"],properties:[{name:"testBefore",default:!1,isAttr:!0,type:"Boolean"},{name:"loopCondition",type:"Expression",xml:{serialize:"xsi:type"}},{name:"loopMaximum",type:"Integer",isAttr:!0}]},{name:"CallActivity",superClass:["Activity"],properties:[{name:"calledElement",type:"String",isAttr:!0}]},{name:"Task",superClass:["Activity","InteractionNode"]},{name:"SendTask",superClass:["Task"],properties:[{name:"implementation",isAttr:!0,type:"String"},{name:"operationRef",type:"Operation",isAttr:!0,isReference:!0},{name:"messageRef",type:"Message",isAttr:!0,isReference:!0}]},{name:"ReceiveTask",superClass:["Task"],properties:[{name:"implementation",isAttr:!0,type:"String"},{name:"instantiate",default:!1,isAttr:!0,type:"Boolean"},{name:"operationRef",type:"Operation",isAttr:!0,isReference:!0},{name:"messageRef",type:"Message",isAttr:!0,isReference:!0}]},{name:"ScriptTask",superClass:["Task"],properties:[{name:"scriptFormat",isAttr:!0,type:"String"},{name:"script",type:"String"}]},{name:"BusinessRuleTask",superClass:["Task"],properties:[{name:"implementation",isAttr:!0,type:"String"}]},{name:"AdHocSubProcess",superClass:["SubProcess"],properties:[{name:"completionCondition",type:"Expression",xml:{serialize:"xsi:type"}},{name:"ordering",type:"AdHocOrdering",isAttr:!0},{name:"cancelRemainingInstances",default:!0,isAttr:!0,type:"Boolean"}]},{name:"Transaction",superClass:["SubProcess"],properties:[{name:"protocol",isAttr:!0,type:"String"},{name:"method",isAttr:!0,type:"String"}]},{name:"GlobalScriptTask",superClass:["GlobalTask"],properties:[{name:"scriptLanguage",isAttr:!0,type:"String"},{name:"script",isAttr:!0,type:"String"}]},{name:"GlobalBusinessRuleTask",superClass:["GlobalTask"],properties:[{name:"implementation",isAttr:!0,type:"String"}]},{name:"ComplexBehaviorDefinition",superClass:["BaseElement"],properties:[{name:"condition",type:"FormalExpression"},{name:"event",type:"ImplicitThrowEvent"}]},{name:"ResourceRole",superClass:["BaseElement"],properties:[{name:"resourceRef",type:"Resource",isReference:!0},{name:"resourceParameterBindings",type:"ResourceParameterBinding",isMany:!0},{name:"resourceAssignmentExpression",type:"ResourceAssignmentExpression"},{name:"name",isAttr:!0,type:"String"}]},{name:"ResourceParameterBinding",properties:[{name:"expression",type:"Expression",xml:{serialize:"xsi:type"}},{name:"parameterRef",type:"ResourceParameter",isAttr:!0,isReference:!0}],superClass:["BaseElement"]},{name:"ResourceAssignmentExpression",properties:[{name:"expression",type:"Expression",xml:{serialize:"xsi:type"}}],superClass:["BaseElement"]},{name:"Import",properties:[{name:"importType",isAttr:!0,type:"String"},{name:"location",isAttr:!0,type:"String"},{name:"namespace",isAttr:!0,type:"String"}]},{name:"Definitions",superClass:["BaseElement"],properties:[{name:"name",isAttr:!0,type:"String"},{name:"targetNamespace",isAttr:!0,type:"String"},{name:"expressionLanguage",default:"http://www.w3.org/1999/XPath",isAttr:!0,type:"String"},{name:"typeLanguage",default:"http://www.w3.org/2001/XMLSchema",isAttr:!0,type:"String"},{name:"imports",type:"Import",isMany:!0},{name:"extensions",type:"Extension",isMany:!0},{name:"rootElements",type:"RootElement",isMany:!0},{name:"diagrams",isMany:!0,type:"bpmndi:BPMNDiagram"},{name:"exporter",isAttr:!0,type:"String"},{name:"relationships",type:"Relationship",isMany:!0},{name:"exporterVersion",isAttr:!0,type:"String"}]}],enumerations:[{name:"ProcessType",literalValues:[{name:"None"},{name:"Public"},{name:"Private"}]},{name:"GatewayDirection",literalValues:[{name:"Unspecified"},{name:"Converging"},{name:"Diverging"},{name:"Mixed"}]},{name:"EventBasedGatewayType",literalValues:[{name:"Parallel"},{name:"Exclusive"}]},{name:"RelationshipDirection",literalValues:[{name:"None"},{name:"Forward"},{name:"Backward"},{name:"Both"}]},{name:"ItemKind",literalValues:[{name:"Physical"},{name:"Information"}]},{name:"ChoreographyLoopType",literalValues:[{name:"None"},{name:"Standard"},{name:"MultiInstanceSequential"},{name:"MultiInstanceParallel"}]},{name:"AssociationDirection",literalValues:[{name:"None"},{name:"One"},{name:"Both"}]},{name:"MultiInstanceBehavior",literalValues:[{name:"None"},{name:"One"},{name:"All"},{name:"Complex"}]},{name:"AdHocOrdering",literalValues:[{name:"Parallel"},{name:"Sequential"}]}],xml:{tagAlias:"lowerCase",typePrefix:"t"}},bpmndi:{name:"BPMNDI",uri:"http://www.omg.org/spec/BPMN/20100524/DI",prefix:"bpmndi",types:[{name:"BPMNDiagram",properties:[{name:"plane",type:"BPMNPlane",redefines:"di:Diagram#rootElement"},{name:"labelStyle",type:"BPMNLabelStyle",isMany:!0}],superClass:["di:Diagram"]},{name:"BPMNPlane",properties:[{name:"bpmnElement",isAttr:!0,isReference:!0,type:"bpmn:BaseElement",redefines:"di:DiagramElement#modelElement"}],superClass:["di:Plane"]},{name:"BPMNShape",properties:[{name:"bpmnElement",isAttr:!0,isReference:!0,type:"bpmn:BaseElement",redefines:"di:DiagramElement#modelElement"},{name:"isHorizontal",isAttr:!0,type:"Boolean"},{name:"isExpanded",isAttr:!0,type:"Boolean"},{name:"isMarkerVisible",isAttr:!0,type:"Boolean"},{name:"label",type:"BPMNLabel"},{name:"isMessageVisible",isAttr:!0,type:"Boolean"},{name:"participantBandKind",type:"ParticipantBandKind",isAttr:!0},{name:"choreographyActivityShape",type:"BPMNShape",isAttr:!0,isReference:!0}],superClass:["di:LabeledShape"]},{name:"BPMNEdge",properties:[{name:"label",type:"BPMNLabel"},{name:"bpmnElement",isAttr:!0,isReference:!0,type:"bpmn:BaseElement",redefines:"di:DiagramElement#modelElement"},{name:"sourceElement",isAttr:!0,isReference:!0,type:"di:DiagramElement",redefines:"di:Edge#source"},{name:"targetElement",isAttr:!0,isReference:!0,type:"di:DiagramElement",redefines:"di:Edge#target"},{name:"messageVisibleKind",type:"MessageVisibleKind",isAttr:!0,default:"initiating"}],superClass:["di:LabeledEdge"]},{name:"BPMNLabel",properties:[{name:"labelStyle",type:"BPMNLabelStyle",isAttr:!0,isReference:!0,redefines:"di:DiagramElement#style"}],superClass:["di:Label"]},{name:"BPMNLabelStyle",properties:[{name:"font",type:"dc:Font"}],superClass:["di:Style"]}],enumerations:[{name:"ParticipantBandKind",literalValues:[{name:"top_initiating"},{name:"middle_initiating"},{name:"bottom_initiating"},{name:"top_non_initiating"},{name:"middle_non_initiating"},{name:"bottom_non_initiating"}]},{name:"MessageVisibleKind",literalValues:[{name:"initiating"},{name:"non_initiating"}]}],associations:[]},dc:{name:"DC",uri:"http://www.omg.org/spec/DD/20100524/DC",prefix:"dc",types:[{name:"Boolean"},{name:"Integer"},{name:"Real"},{name:"String"},{name:"Font",properties:[{name:"name",type:"String",isAttr:!0},{name:"size",type:"Real",isAttr:!0},{name:"isBold",type:"Boolean",isAttr:!0},{name:"isItalic",type:"Boolean",isAttr:!0},{name:"isUnderline",type:"Boolean",isAttr:!0},{name:"isStrikeThrough",type:"Boolean",isAttr:!0}]},{name:"Point",properties:[{name:"x",type:"Real",default:"0",isAttr:!0},{name:"y",type:"Real",default:"0",isAttr:!0}]},{name:"Bounds",properties:[{name:"x",type:"Real",default:"0",isAttr:!0},{name:"y",type:"Real",default:"0",isAttr:!0},{name:"width",type:"Real",isAttr:!0},{name:"height",type:"Real",isAttr:!0}]}],associations:[]},di:{name:"DI",uri:"http://www.omg.org/spec/DD/20100524/DI",prefix:"di",types:[{name:"DiagramElement",isAbstract:!0,properties:[{name:"id",isAttr:!0,isId:!0,type:"String"},{name:"extension",type:"Extension"},{name:"owningDiagram",type:"Diagram",isReadOnly:!0,isVirtual:!0,isReference:!0},{name:"owningElement",type:"DiagramElement",isReadOnly:!0,isVirtual:!0,isReference:!0},{name:"modelElement",isReadOnly:!0,isVirtual:!0,isReference:!0,type:"Element"},{name:"style",type:"Style",isReadOnly:!0,isVirtual:!0,isReference:!0},{name:"ownedElement",type:"DiagramElement",isReadOnly:!0,isMany:!0,isVirtual:!0}]},{name:"Node",isAbstract:!0,superClass:["DiagramElement"]},{name:"Edge",isAbstract:!0,superClass:["DiagramElement"],properties:[{name:"source",type:"DiagramElement",isReadOnly:!0,isVirtual:!0,isReference:!0},{name:"target",type:"DiagramElement",isReadOnly:!0,isVirtual:!0,isReference:!0},{name:"waypoint",isUnique:!1,isMany:!0,type:"dc:Point",xml:{serialize:"xsi:type"}}]},{name:"Diagram",isAbstract:!0,properties:[{name:"id",isAttr:!0,isId:!0,type:"String"},{name:"rootElement",type:"DiagramElement",isReadOnly:!0,isVirtual:!0},{name:"name",isAttr:!0,type:"String"},{name:"documentation",isAttr:!0,type:"String"},{name:"resolution",isAttr:!0,type:"Real"},{name:"ownedStyle",type:"Style",isReadOnly:!0,isMany:!0,isVirtual:!0}]},{name:"Shape",isAbstract:!0,superClass:["Node"],properties:[{name:"bounds",type:"dc:Bounds"}]},{name:"Plane",isAbstract:!0,superClass:["Node"],properties:[{name:"planeElement",type:"DiagramElement",subsettedProperty:"DiagramElement-ownedElement",isMany:!0}]},{name:"LabeledEdge",isAbstract:!0,superClass:["Edge"],properties:[{name:"ownedLabel",type:"Label",isReadOnly:!0,subsettedProperty:"DiagramElement-ownedElement",isMany:!0,isVirtual:!0}]},{name:"LabeledShape",isAbstract:!0,superClass:["Shape"],properties:[{name:"ownedLabel",type:"Label",isReadOnly:!0,subsettedProperty:"DiagramElement-ownedElement",isMany:!0,isVirtual:!0}]},{name:"Label",isAbstract:!0,superClass:["Node"],properties:[{name:"bounds",type:"dc:Bounds"}]},{name:"Style",isAbstract:!0,properties:[{name:"id",isAttr:!0,isId:!0,type:"String"}]},{name:"Extension",properties:[{name:"values",isMany:!0,type:"Element"}]}],associations:[],xml:{tagAlias:"lowerCase"}},bioc:{name:"bpmn.io colors for BPMN",uri:"http://bpmn.io/schema/bpmn/biocolor/1.0",prefix:"bioc",types:[{name:"ColoredShape",extends:["bpmndi:BPMNShape"],properties:[{name:"stroke",isAttr:!0,type:"String"},{name:"fill",isAttr:!0,type:"String"}]},{name:"ColoredEdge",extends:["bpmndi:BPMNEdge"],properties:[{name:"stroke",isAttr:!0,type:"String"},{name:"fill",isAttr:!0,type:"String"}]}],enumerations:[],associations:[]}};var nt=function(e,t){return new et(Object(i.assign)({},tt,e),t)},it=n(838),rt=n.n(it),ot=n(840),at=new rt.a({name:"bpmnElement",enumerable:!0},{name:"di",configurable:!0});function st(e,t){return e.$instanceOf(t)}function ct(e,t){var n={},r=[];function o(e,t){return function(n){e(n,t)}}function a(e){n[e.id]=e}function s(n,i){try{var r=n.di&&function(n,i){if(n.gfx)throw new Error(t("already rendered {element}",{element:Object(ot.a)(n)}));return e.element(n,i)}(n,i);return a(n),r}catch(e){c(e.message,{element:n,error:e}),console.error(t("failed to import {element}",{element:Object(ot.a)(n)})),console.error(e)}}function c(t,n){e.error(t,n)}function u(e){var n=e.bpmnElement;n?n.di?c(t("multiple DI elements defined for {element}",{element:Object(ot.a)(n)}),{element:n}):(at.bind(n,"di"),n.di=e):c(t("no bpmnElement referenced in {element}",{element:Object(ot.a)(e)}),{element:e})}function p(e){var t;u(t=e.plane),Object(i.forEach)(t.planeElement,l)}function l(e){u(e)}function d(){for(;r.length;)r.shift()()}function f(e,t){S(e,t),x(e.ioSpecification,t),y(e.artifacts,t),a(e)}function h(e,t){s(e,t)}function m(e,t){s(e,t)}function v(e,t){s(e,t)}function b(e,t){s(e,t)}function g(e,t){s(e,t)}function y(e,t){Object(i.forEach)(e,(function(e){st(e,"bpmn:Association")?r.push((function(){g(e,t)})):g(e,t)}))}function x(e,t){e&&(Object(i.forEach)(e.dataInputs,o(v,t)),Object(i.forEach)(e.dataOutputs,o(b,t)))}function O(e,t){S(e,t),y(e.artifacts,t)}function j(e,t){var n=s(e,t);st(e,"bpmn:SubProcess")&&O(e,n||t),st(e,"bpmn:Activity")&&x(e.ioSpecification,t),r.push((function(){Object(i.forEach)(e.dataInputAssociations,o(m,t)),Object(i.forEach)(e.dataOutputAssociations,o(m,t))}))}function E(e,t){s(e,t)}function _(e,t){r.push((function(){var n=s(e,t);e.childLaneSet&&w(e.childLaneSet,n||t),function(e){Object(i.forEach)(e.flowNodeRef,(function(t){var n=t.get("lanes");n&&n.push(e)}))}(e)}))}function w(e,t){Object(i.forEach)(e.lanes,o(_,t))}function S(e,n){!function(e,n){Object(i.forEach)(e,(function(e){st(e,"bpmn:SequenceFlow")?r.push((function(){!function(e,t){s(e,t)}(e,n)})):st(e,"bpmn:BoundaryEvent")?r.unshift((function(){j(e,n)})):st(e,"bpmn:FlowNode")?j(e,n):st(e,"bpmn:DataObject")||(st(e,"bpmn:DataStoreReference")||st(e,"bpmn:DataObjectReference")?E(e,n):c(t("unrecognized flowElement {element} in context {context}",{element:Object(ot.a)(e),context:n?Object(ot.a)(n.businessObject):"null"}),{element:e,context:n}))}))}(e.flowElements,n),e.laneSets&&function(e,t){Object(i.forEach)(e,o(w,t))}(e.laneSets,n)}function T(e,t){var n=s(e,t),i=e.processRef;i&&f(i,n||t)}return{handleDeferred:d,handleDefinitions:function(a,s){var l=a.diagrams;if(s&&-1===l.indexOf(s))throw new Error(t("diagram not part of bpmn:Definitions"));if(!s&&l&&l.length&&(s=l[0]),!s)throw new Error(t("no diagram to display"));p(s);var m=s.plane;if(!m)throw new Error(t("no plane for {element}",{element:Object(ot.a)(s)}));var v=m.bpmnElement;if(!v){if(!(v=function(e){return Object(i.find)(e.rootElements,(function(e){return st(e,"bpmn:Process")||st(e,"bpmn:Collaboration")}))}(a)))throw new Error(t("no process or collaboration to display"));c(t("correcting missing bpmnElement on {plane} to {rootElement}",{plane:Object(ot.a)(m),rootElement:Object(ot.a)(v)})),m.bpmnElement=v,u(m)}var b,g=function(t,n){return e.root(t,n)}(v,m);if(st(v,"bpmn:Process"))f(v,g);else{if(!st(v,"bpmn:Collaboration"))throw new Error(t("unsupported bpmnElement for {plane}: {rootElement}",{plane:Object(ot.a)(m),rootElement:Object(ot.a)(v)}));b=v,Object(i.forEach)(b.participants,o(T)),y(b.artifacts),r.push((function(){var e,t;e=b.messageFlows,Object(i.forEach)(e,o(h,t))})),function(e,t){Object(i.filter)(e,(function(e){return!n[e.id]&&st(e,"bpmn:Process")&&e.laneSets})).forEach(o(f,t))}(a.rootElements,g)}d()},handleSubProcess:O,registerDi:u}}var ut='<img width="52" height="52" src="'+("data:image/svg+xml,"+encodeURIComponent('<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 960 960"><path fill="#fff" d="M960 60v839c0 33-27 61-60 61H60c-33 0-60-27-60-60V60C0 27 27 0 60 0h839c34 0 61 27 61 60z"/><path fill="#52b415" d="M217 548a205 205 0 0 0-144 58 202 202 0 0 0-4 286 202 202 0 0 0 285 3 200 200 0 0 0 48-219 203 203 0 0 0-185-128zM752 6a206 206 0 0 0-192 285 206 206 0 0 0 269 111 207 207 0 0 0 111-260A204 204 0 0 0 752 6zM62 0A62 62 0 0 0 0 62v398l60 46a259 259 0 0 1 89-36c5-28 10-57 14-85l99 2 12 85a246 246 0 0 1 88 38l70-52 69 71-52 68c17 30 29 58 35 90l86 14-2 100-86 12a240 240 0 0 1-38 89l43 58h413c37 0 60-27 60-61V407a220 220 0 0 1-44 40l21 85-93 39-45-76a258 258 0 0 1-98 1l-45 76-94-39 22-85a298 298 0 0 1-70-69l-86 22-38-94 76-45a258 258 0 0 1-1-98l-76-45 40-94 85 22a271 271 0 0 1 41-47z"/></svg>'))+'" />';function pt(e){return e.join(";")}var lt,dt='<div class="bjs-powered-by-lightbox" style="'+pt(["z-index: 1001","position: fixed","top: 0","left: 0","right: 0","bottom: 0"])+'"><div class="backdrop" style="'+pt(["width: 100%","height: 100%","background: rgba(0,0,0,0.2)"])+'"></div><div class="notice" style="'+pt(["position: absolute","left: 50%","top: 40%","margin: 0 -130px","width: 260px","padding: 10px","background: white","border: solid 1px #AAA","border-radius: 3px","font-family: Helvetica, Arial, sans-serif","font-size: 14px","line-height: 1.2em"])+'"><a href="http://bpmn.io" target="_blank" style="float: left; margin-right: 10px">'+ut+'</a>Web-based tooling for BPMN, DMN and CMMN diagrams powered by <a href="http://bpmn.io" target="_blank">bpmn.io</a>.</div></div>';function ft(e){var t,n,o;e=Object(i.assign)({},ht,e),this._moddle=this._createModdle(e),this._container=this._createContainer(e),t=this._container,n='<a href="http://bpmn.io" target="_blank" class="bjs-powered-by" title="Powered by bpmn.io" style="position: absolute; bottom: 15px; right: 15px; z-index: 100">'+ut+"</a>",o=Object(r.domify)(n),t.appendChild(o),r.event.bind(o,"click",(function(e){lt||(lt=Object(r.domify)(dt),r.delegate.bind(lt,".backdrop","click",(function(e){document.body.removeChild(lt)}))),document.body.appendChild(lt),e.preventDefault()})),this._init(this._container,this._moddle,e)}x()(ft,W),ft.prototype.importXML=function(e,t,n){Object(i.isFunction)(t)&&(n=t,t=null),n=n||function(){};var r=this;e=this._emit("import.parse.start",{xml:e})||e,this._moddle.fromXML(e,"bpmn:Definitions",(function(e,i,o){i=r._emit("import.parse.complete",{error:e,definitions:i,context:o})||i;var a=o.warnings;if(e)return 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),r._emit("import.done",{error:e,warnings:a}),n(e,a);r.importDefinitions(i,t,(function(e,t){var i=[].concat(a,t||[]);r._emit("import.done",{error:e,warnings:i}),n(e,i)}))}))},ft.prototype.importDefinitions=function(e,t,n){return Object(i.isFunction)(t)&&(n=t,t=null),n=n||function(){},this._setDefinitions(e),this.open(t,n)},ft.prototype.open=function(e,t){Object(i.isFunction)(e)&&(t=e,e=null);var n=this._definitions,r=e;if(t=t||function(){},!n)return t(new Error("no XML imported"));if("string"==typeof e&&!(r=function(e,t){if(!t)return null;return Object(i.find)(e.diagrams,(function(e){return e.id===t}))||null}(n,e)))return t(new Error("BPMNDiagram <"+e+"> not found"));try{this.clear()}catch(e){return t(e)}return function(e,t,n,r){var o,a,s;Object(i.isFunction)(n)&&(r=n,n=null);var c,u=[];try{o=e.get("bpmnImporter"),a=e.get("eventBus"),s=e.get("translate"),a.fire("import.render.start",{definitions:t}),function(e,t){new ct({root:function(e){return o.add(e)},element:function(e,t){return o.add(e,t)},error:function(e,t){u.push({message:e,context:t})}},s).handleDefinitions(e,t)}(t,n),a.fire("import.render.complete",{error:c,warnings:u})}catch(e){c=e}r(c,u)}(this,n,r,t)},ft.prototype.saveXML=function(e,t){t||(t=e,e={});var n=this,i=this._definitions;if(!i)return t(new Error("no definitions loaded"));i=this._emit("saveXML.start",{definitions:i})||i,this._moddle.toXML(i,e,(function(e,i){try{i=n._emit("saveXML.serialized",{error:e,xml:i})||i,n._emit("saveXML.done",{error:e,xml:i})}catch(e){console.error("error in saveXML life-cycle listener",e)}t(e,i)}))},ft.prototype.saveSVG=function(e,t){var n,i;t||(t=e,e={}),this._emit("saveSVG.start");try{var a=this.get("canvas"),s=a.getDefaultLayer(),c=Object(r.query)("defs",a._svg),u=Object(o.i)(s),p=c?"<defs>"+Object(o.i)(c)+"</defs>":"",l=s.getBBox();n='<?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+u+"</svg>"}catch(e){i=e}this._emit("saveSVG.done",{error:i,svg:n}),t(i,n)},ft.prototype._setDefinitions=function(e){this._definitions=e},ft.prototype.getModules=function(){return this._modules},ft.prototype.clear=function(){this.getDefinitions()&&(this.get("elementRegistry").forEach((function(e){var t=e.businessObject;t&&t.di&&delete t.di})),W.prototype.clear.call(this))},ft.prototype.destroy=function(){W.prototype.destroy.call(this),Object(r.remove)(this._container)},ft.prototype.on=function(e,t,n,i){return this.get("eventBus").on(e,t,n,i)},ft.prototype.off=function(e,t){this.get("eventBus").off(e,t)},ft.prototype.attachTo=function(e){if(!e)throw new Error("parentNode required");this.detach(),e.get&&e.constructor.prototype.jquery&&(e=e.get(0)),"string"==typeof e&&(e=Object(r.query)(e)),e.appendChild(this._container),this._emit("attach",{}),this.get("canvas").resized()},ft.prototype.getDefinitions=function(){return this._definitions},ft.prototype.detach=function(){var e=this._container,t=e.parentNode;t&&(this._emit("detach",{}),t.removeChild(e))},ft.prototype._init=function(e,t,n){var r=n.modules||this.getModules(),o=n.additionalModules||[],a=[].concat([{bpmnjs:["value",this],moddle:["value",t]}],r,o),s=Object(i.assign)(Object(i.omit)(n,["additionalModules"]),{canvas:Object(i.assign)({},n.canvas,{container:e}),modules:a});W.call(this,s),n&&n.container&&this.attachTo(n.container)},ft.prototype._emit=function(e,t){return this.get("eventBus").fire(e,t)},ft.prototype._createContainer=function(e){var t=Object(r.domify)('<div class="bjs-container"></div>');return Object(i.assign)(t.style,{width:mt(e.width),height:mt(e.height),position:e.position}),t},ft.prototype._createModdle=function(e){var t=Object(i.assign)({},this._moddleExtensions,e.moddleExtensions);return new nt(t)},ft.prototype._modules=[];var ht={width:"100%",height:"100%",position:"relative"};function mt(e){return e+(Object(i.isNumber)(e)?"px":"")}},function(e,t,n){"use strict";var i=n(728),r=n(727),o=n(723),a=n(721);function s(e,t,n){this.offset=6;var i=t.cls("djs-outline",["no-fill"]),s=this;function c(e,t){var n=Object(r.f)("rect");return Object(r.b)(n,Object(a.assign)({x:10,y:10,width:100,height:100},i)),Object(r.a)(e,n),n}e.on(["shape.added","shape.changed"],500,(function(e){var t=e.element,n=e.gfx,i=Object(o.query)(".djs-outline",n);i||(i=c(n)),s.updateShapeOutline(i,t)})),e.on(["connection.added","connection.changed"],(function(e){var t=e.element,n=e.gfx,i=Object(o.query)(".djs-outline",n);i||(i=c(n)),s.updateConnectionOutline(i,t)}))}s.prototype.updateShapeOutline=function(e,t){Object(r.b)(e,{x:-this.offset,y:-this.offset,width:t.width+2*this.offset,height:t.height+2*this.offset})},s.prototype.updateConnectionOutline=function(e,t){var n=Object(i.b)(t);Object(r.b)(e,{x:n.x-this.offset,y:n.y-this.offset,width:n.width+2*this.offset,height:n.height+2*this.offset})},s.$inject=["eventBus","styles","elementRegistry"];t.a={__init__:["outline"],outline:["type",s]}},,,,,,,,,,,,,,,function(e,t,n){"use strict";n(23),n(20),n(23),n(20);var i=n(839);function r(e,t,n){var r=i.extend(n[t.name]||[],e,t,n);Object.defineProperty(n,t.name,{enumerable:t.enumerable,value:r}),r.length&&r.forEach((function(i){e.set(i,t.inverse,n)}))}function o(e,t){if(!(this instanceof o))return new o(e,t);e.inverse=t,t.inverse=e,this.props={},this.props[e.name]=e,this.props[t.name]=t}o.prototype.bind=function(e,t){if("string"==typeof t){if(!this.props[t])throw new Error("no property <"+t+"> in ref");t=this.props[t]}t.collection?r(this,t,e):function(e,t,n){var i=t.inverse,r=n[t.name];Object.defineProperty(n,t.name,{configurable:t.configurable,enumerable:t.enumerable,get:function(){return r},set:function(t){if(t!==r){var o=r;r=null,o&&e.unset(o,i,n),r=t,e.set(r,i,n)}}})}(this,t,e)},o.prototype.ensureRefsCollection=function(e,t){var n=e[t.name];return i.isExtended(n)||r(this,t,e),n},o.prototype.ensureBound=function(e,t){(function(e,t){return Object.prototype.hasOwnProperty.call(e,t.name||t)})(e,t)||this.bind(e,t)},o.prototype.unset=function(e,t,n){e&&(this.ensureBound(e,t),t.collection?this.ensureRefsCollection(e,t).remove(n):e[t.name]=void 0)},o.prototype.set=function(e,t,n){e&&(this.ensureBound(e,t),t.collection?this.ensureRefsCollection(e,t).add(n):e[t.name]=n)},e.exports=o},function(e,t,n){n(760),e.exports=Math.sign||function(e){return 0==(e=+e)||e!=e?e:e<0?-1:1}},function(e,t,n){var i,r=n(123).default;n(20),n(1),n(22),n(190),n(38),n(30),n(117),n(14),n(189),n(86),n(21),n(43),n(35),n(20),n(1),n(22),n(38),n(30),n(117),n(14),n(189),n(86),n(21),n(43),n(35),
|
|
2
|
-
/*! Hammer.JS - v2.0.7 - 2016-04-22
|
|
3
|
-
* http://hammerjs.github.io/
|
|
4
|
-
*
|
|
5
|
-
* Copyright (c) 2016 Jorik Tangelder;
|
|
6
|
-
* Licensed under the MIT license */
|
|
7
|
-
function(o,a,s,c){"use strict";var u,p=["","webkit","Moz","MS","ms","o"],l=a.createElement("div"),d=Math.round,f=Math.abs,h=Date.now;function m(e,t,n){return setTimeout(j(e,n),t)}function v(e,t,n){return!!Array.isArray(e)&&(b(e,n[t],n),!0)}function b(e,t,n){var i;if(e)if(e.forEach)e.forEach(t,n);else if(void 0!==e.length)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 g(e,t,n){var i="DEPRECATED METHOD: "+t+"\n"+n+" AT \n";return function(){var t=new Error("get-stack-trace"),n=t&&t.stack?t.stack.replace(/^[^\(]+?[\n$]/gm,"").replace(/^\s+at\s+/gm,"").replace(/^Object.<anonymous>\s*\(/gm,"{anonymous}()@"):"Unknown Stack Trace",r=o.console&&(o.console.warn||o.console.log);return r&&r.call(o.console,i,n),e.apply(this,arguments)}}u="function"!=typeof Object.assign?function(e){if(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(null!=i)for(var r in i)i.hasOwnProperty(r)&&(t[r]=i[r])}return t}:Object.assign;var y=g((function(e,t,n){for(var i=Object.keys(t),r=0;r<i.length;)(!n||n&&void 0===e[i[r]])&&(e[i[r]]=t[i[r]]),r++;return e}),"extend","Use `assign`."),x=g((function(e,t){return y(e,t,!0)}),"merge","Use `assign`.");function O(e,t,n){var i,r=t.prototype;(i=e.prototype=Object.create(r)).constructor=e,i._super=r,n&&u(i,n)}function j(e,t){return function(){return e.apply(t,arguments)}}function E(e,t){return"function"==r(e)?e.apply(t&&t[0]||void 0,t):e}function _(e,t){return void 0===e?t:e}function w(e,t,n){b(C(t),(function(t){e.addEventListener(t,n,!1)}))}function S(e,t,n){b(C(t),(function(t){e.removeEventListener(t,n,!1)}))}function T(e,t){for(;e;){if(e==t)return!0;e=e.parentNode}return!1}function P(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 k(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 B(e,t){for(var n,i,r=t[0].toUpperCase()+t.slice(1),o=0;o<p.length;){if((i=(n=p[o])?n+r:t)in e)return i;o++}}var M=1;function D(e){var t=e.ownerDocument||e;return t.defaultView||t.parentWindow||o}var N="ontouchstart"in o,L=void 0!==B(o,"PointerEvent"),I=N&&/mobile|tablet|ip(ad|hone|od)|android/i.test(navigator.userAgent),F=["x","y"],z=["clientX","clientY"];function V(e,t){var n=this;this.manager=e,this.callback=t,this.element=e.element,this.target=e.options.inputTarget,this.domHandler=function(t){E(e.options.enable,[e])&&n.handler(t)},this.init()}function $(e,t,n){var i=n.pointers.length,r=n.changedPointers.length,o=1&t&&i-r==0,a=12&t&&i-r==0;n.isFirst=!!o,n.isFinal=!!a,o&&(e.session={}),n.eventType=t,function(e,t){var n=e.session,i=t.pointers,r=i.length;n.firstInput||(n.firstInput=H(t));r>1&&!n.firstMultiple?n.firstMultiple=H(t):1===r&&(n.firstMultiple=!1);var o=n.firstInput,a=n.firstMultiple,s=a?a.center:o.center,c=t.center=G(i);t.timeStamp=h(),t.deltaTime=t.timeStamp-o.timeStamp,t.angle=K(s,c),t.distance=U(s,c),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=q(t.deltaX,t.deltaY);var u=W(t.deltaTime,t.deltaX,t.deltaY);t.overallVelocityX=u.x,t.overallVelocityY=u.y,t.overallVelocity=f(u.x)>f(u.y)?u.x:u.y,t.scale=a?(p=a.pointers,l=i,U(l[0],l[1],z)/U(p[0],p[1],z)):1,t.rotation=a?function(e,t){return K(t[1],t[0],z)+K(e[1],e[0],z)}(a.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,r,o,a=e.lastInterval||t,s=t.timeStamp-a.timeStamp;if(8!=t.eventType&&(s>25||void 0===a.velocity)){var c=t.deltaX-a.deltaX,u=t.deltaY-a.deltaY,p=W(s,c,u);i=p.x,r=p.y,n=f(p.x)>f(p.y)?p.x:p.y,o=q(c,u),e.lastInterval=t}else n=a.velocity,i=a.velocityX,r=a.velocityY,o=a.direction;t.velocity=n,t.velocityX=i,t.velocityY=r,t.direction=o}(n,t);var p,l;var d=e.element;T(t.srcEvent.target,d)&&(d=t.srcEvent.target);t.target=d}(e,n),e.emit("hammer.input",n),e.recognize(n),e.session.prevInput=n}function H(e){for(var t=[],n=0;n<e.pointers.length;)t[n]={clientX:d(e.pointers[n].clientX),clientY:d(e.pointers[n].clientY)},n++;return{timeStamp:h(),pointers:t,center:G(t),deltaX:e.deltaX,deltaY:e.deltaY}}function G(e){var t=e.length;if(1===t)return{x:d(e[0].clientX),y:d(e[0].clientY)};for(var n=0,i=0,r=0;r<t;)n+=e[r].clientX,i+=e[r].clientY,r++;return{x:d(n/t),y:d(i/t)}}function W(e,t,n){return{x:t/e||0,y:n/e||0}}function q(e,t){return e===t?1:f(e)>=f(t)?e<0?2:4:t<0?8:16}function U(e,t,n){n||(n=F);var i=t[n[0]]-e[n[0]],r=t[n[1]]-e[n[1]];return Math.sqrt(i*i+r*r)}function K(e,t,n){n||(n=F);var i=t[n[0]]-e[n[0]],r=t[n[1]]-e[n[1]];return 180*Math.atan2(r,i)/Math.PI}V.prototype={handler:function(){},init:function(){this.evEl&&w(this.element,this.evEl,this.domHandler),this.evTarget&&w(this.target,this.evTarget,this.domHandler),this.evWin&&w(D(this.element),this.evWin,this.domHandler)},destroy:function(){this.evEl&&S(this.element,this.evEl,this.domHandler),this.evTarget&&S(this.target,this.evTarget,this.domHandler),this.evWin&&S(D(this.element),this.evWin,this.domHandler)}};var Y={mousedown:1,mousemove:2,mouseup:4};function X(){this.evEl="mousedown",this.evWin="mousemove mouseup",this.pressed=!1,V.apply(this,arguments)}O(X,V,{handler:function(e){var t=Y[e.type];1&t&&0===e.button&&(this.pressed=!0),2&t&&1!==e.which&&(t=4),this.pressed&&(4&t&&(this.pressed=!1),this.callback(this.manager,t,{pointers:[e],changedPointers:[e],pointerType:"mouse",srcEvent:e}))}});var J={pointerdown:1,pointermove:2,pointerup:4,pointercancel:8,pointerout:8},Z={2:"touch",3:"pen",4:"mouse",5:"kinect"},Q="pointerdown",ee="pointermove pointerup pointercancel";function te(){this.evEl=Q,this.evWin=ee,V.apply(this,arguments),this.store=this.manager.session.pointerEvents=[]}o.MSPointerEvent&&!o.PointerEvent&&(Q="MSPointerDown",ee="MSPointerMove MSPointerUp MSPointerCancel"),O(te,V,{handler:function(e){var t=this.store,n=!1,i=e.type.toLowerCase().replace("ms",""),r=J[i],o=Z[e.pointerType]||e.pointerType,a="touch"==o,s=A(t,e.pointerId,"pointerId");1&r&&(0===e.button||a)?s<0&&(t.push(e),s=t.length-1):12&r&&(n=!0),s<0||(t[s]=e,this.callback(this.manager,r,{pointers:t,changedPointers:[e],pointerType:o,srcEvent:e}),n&&t.splice(s,1))}});var ne={touchstart:1,touchmove:2,touchend:4,touchcancel:8};function ie(){this.evTarget="touchstart",this.evWin="touchstart touchmove touchend touchcancel",this.started=!1,V.apply(this,arguments)}function re(e,t){var n=R(e.touches),i=R(e.changedTouches);return 12&t&&(n=k(n.concat(i),"identifier",!0)),[n,i]}O(ie,V,{handler:function(e){var t=ne[e.type];if(1===t&&(this.started=!0),this.started){var n=re.call(this,e,t);12&t&&n[0].length-n[1].length==0&&(this.started=!1),this.callback(this.manager,t,{pointers:n[0],changedPointers:n[1],pointerType:"touch",srcEvent:e})}}});var oe={touchstart:1,touchmove:2,touchend:4,touchcancel:8};function ae(){this.evTarget="touchstart touchmove touchend touchcancel",this.targetIds={},V.apply(this,arguments)}function se(e,t){var n=R(e.touches),i=this.targetIds;if(3&t&&1===n.length)return i[n[0].identifier]=!0,[n,n];var r,o,a=R(e.changedTouches),s=[],c=this.target;if(o=n.filter((function(e){return T(e.target,c)})),1===t)for(r=0;r<o.length;)i[o[r].identifier]=!0,r++;for(r=0;r<a.length;)i[a[r].identifier]&&s.push(a[r]),12&t&&delete i[a[r].identifier],r++;return s.length?[k(o.concat(s),"identifier",!0),s]:void 0}O(ae,V,{handler:function(e){var t=oe[e.type],n=se.call(this,e,t);n&&this.callback(this.manager,t,{pointers:n[0],changedPointers:n[1],pointerType:"touch",srcEvent:e})}});function ce(){V.apply(this,arguments);var e=j(this.handler,this);this.touch=new ae(this.manager,e),this.mouse=new X(this.manager,e),this.primaryTouch=null,this.lastTouches=[]}function ue(e,t){1&e?(this.primaryTouch=t.changedPointers[0].identifier,pe.call(this,t)):12&e&&pe.call(this,t)}function pe(e){var t=e.changedPointers[0];if(t.identifier===this.primaryTouch){var n={x:t.clientX,y:t.clientY};this.lastTouches.push(n);var i=this.lastTouches;setTimeout((function(){var e=i.indexOf(n);e>-1&&i.splice(e,1)}),2500)}}function le(e){for(var t=e.srcEvent.clientX,n=e.srcEvent.clientY,i=0;i<this.lastTouches.length;i++){var r=this.lastTouches[i],o=Math.abs(t-r.x),a=Math.abs(n-r.y);if(o<=25&&a<=25)return!0}return!1}O(ce,V,{handler:function(e,t,n){var i="touch"==n.pointerType,r="mouse"==n.pointerType;if(!(r&&n.sourceCapabilities&&n.sourceCapabilities.firesTouchEvents)){if(i)ue.call(this,t,n);else if(r&&le.call(this,n))return;this.callback(e,t,n)}},destroy:function(){this.touch.destroy(),this.mouse.destroy()}});var de=B(l.style,"touchAction"),fe=void 0!==de,he=function(){if(!fe)return!1;var e={},t=o.CSS&&o.CSS.supports;return["auto","manipulation","pan-y","pan-x","pan-x pan-y","none"].forEach((function(n){e[n]=!t||o.CSS.supports("touch-action",n)})),e}();function me(e,t){this.manager=e,this.set(t)}me.prototype={set:function(e){"compute"==e&&(e=this.compute()),fe&&this.manager.element.style&&he[e]&&(this.manager.element.style[de]=e),this.actions=e.toLowerCase().trim()},update:function(){this.set(this.manager.options.touchAction)},compute:function(){var e=[];return b(this.manager.recognizers,(function(t){E(t.options.enable,[t])&&(e=e.concat(t.getTouchAction()))})),function(e){if(P(e,"none"))return"none";var t=P(e,"pan-x"),n=P(e,"pan-y");if(t&&n)return"none";if(t||n)return t?"pan-x":"pan-y";if(P(e,"manipulation"))return"manipulation";return"auto"}(e.join(" "))},preventDefaults:function(e){var t=e.srcEvent,n=e.offsetDirection;if(this.manager.session.prevented)t.preventDefault();else{var i=this.actions,r=P(i,"none")&&!he.none,o=P(i,"pan-y")&&!he["pan-y"],a=P(i,"pan-x")&&!he["pan-x"];if(r){var s=1===e.pointers.length,c=e.distance<2,u=e.deltaTime<250;if(s&&c&&u)return}if(!a||!o)return r||o&&6&n||a&&24&n?this.preventSrc(t):void 0}},preventSrc:function(e){this.manager.session.prevented=!0,e.preventDefault()}};function ve(e){this.options=u({},this.defaults,e||{}),this.id=M++,this.manager=null,this.options.enable=_(this.options.enable,!0),this.state=1,this.simultaneous={},this.requireFail=[]}function be(e){return 16&e?"cancel":8&e?"end":4&e?"move":2&e?"start":""}function ge(e){return 16==e?"down":8==e?"up":2==e?"left":4==e?"right":""}function ye(e,t){var n=t.manager;return n?n.get(e):e}function xe(){ve.apply(this,arguments)}function Oe(){xe.apply(this,arguments),this.pX=null,this.pY=null}function je(){xe.apply(this,arguments)}function Ee(){ve.apply(this,arguments),this._timer=null,this._input=null}function _e(){xe.apply(this,arguments)}function we(){xe.apply(this,arguments)}function Se(){ve.apply(this,arguments),this.pTime=!1,this.pCenter=!1,this._timer=null,this._input=null,this.count=0}function Te(e,t){return(t=t||{}).recognizers=_(t.recognizers,Te.defaults.preset),new Pe(e,t)}ve.prototype={defaults:{},set:function(e){return u(this.options,e),this.manager&&this.manager.touchAction.update(),this},recognizeWith:function(e){if(v(e,"recognizeWith",this))return this;var t=this.simultaneous;return t[(e=ye(e,this)).id]||(t[e.id]=e,e.recognizeWith(this)),this},dropRecognizeWith:function(e){return v(e,"dropRecognizeWith",this)||(e=ye(e,this),delete this.simultaneous[e.id]),this},requireFailure:function(e){if(v(e,"requireFailure",this))return this;var t=this.requireFail;return-1===A(t,e=ye(e,this))&&(t.push(e),e.requireFailure(this)),this},dropRequireFailure:function(e){if(v(e,"dropRequireFailure",this))return this;e=ye(e,this);var t=A(this.requireFail,e);return t>-1&&this.requireFail.splice(t,1),this},hasRequireFailures:function(){return this.requireFail.length>0},canRecognizeWith:function(e){return!!this.simultaneous[e.id]},emit:function(e){var t=this,n=this.state;function i(n){t.manager.emit(n,e)}n<8&&i(t.options.event+be(n)),i(t.options.event),e.additionalEvent&&i(e.additionalEvent),n>=8&&i(t.options.event+be(n))},tryEmit:function(e){if(this.canEmit())return this.emit(e);this.state=32},canEmit:function(){for(var e=0;e<this.requireFail.length;){if(!(33&this.requireFail[e].state))return!1;e++}return!0},recognize:function(e){var t=u({},e);if(!E(this.options.enable,[this,t]))return this.reset(),void(this.state=32);56&this.state&&(this.state=1),this.state=this.process(t),30&this.state&&this.tryEmit(t)},process:function(e){},getTouchAction:function(){},reset:function(){}},O(xe,ve,{defaults:{pointers:1},attrTest:function(e){var t=this.options.pointers;return 0===t||e.pointers.length===t},process:function(e){var t=this.state,n=e.eventType,i=6&t,r=this.attrTest(e);return i&&(8&n||!r)?16|t:i||r?4&n?8|t:2&t?4|t:2:32}}),O(Oe,xe,{defaults:{event:"pan",threshold:10,pointers:1,direction:30},getTouchAction:function(){var e=this.options.direction,t=[];return 6&e&&t.push("pan-y"),24&e&&t.push("pan-x"),t},directionTest:function(e){var t=this.options,n=!0,i=e.distance,r=e.direction,o=e.deltaX,a=e.deltaY;return r&t.direction||(6&t.direction?(r=0===o?1:o<0?2:4,n=o!=this.pX,i=Math.abs(e.deltaX)):(r=0===a?1:a<0?8:16,n=a!=this.pY,i=Math.abs(e.deltaY))),e.direction=r,n&&i>t.threshold&&r&t.direction},attrTest:function(e){return xe.prototype.attrTest.call(this,e)&&(2&this.state||!(2&this.state)&&this.directionTest(e))},emit:function(e){this.pX=e.deltaX,this.pY=e.deltaY;var t=ge(e.direction);t&&(e.additionalEvent=this.options.event+t),this._super.emit.call(this,e)}}),O(je,xe,{defaults:{event:"pinch",threshold:0,pointers:2},getTouchAction:function(){return["none"]},attrTest:function(e){return this._super.attrTest.call(this,e)&&(Math.abs(e.scale-1)>this.options.threshold||2&this.state)},emit:function(e){if(1!==e.scale){var t=e.scale<1?"in":"out";e.additionalEvent=this.options.event+t}this._super.emit.call(this,e)}}),O(Ee,ve,{defaults:{event:"press",pointers:1,time:251,threshold:9},getTouchAction:function(){return["auto"]},process:function(e){var t=this.options,n=e.pointers.length===t.pointers,i=e.distance<t.threshold,r=e.deltaTime>t.time;if(this._input=e,!i||!n||12&e.eventType&&!r)this.reset();else if(1&e.eventType)this.reset(),this._timer=m((function(){this.state=8,this.tryEmit()}),t.time,this);else if(4&e.eventType)return 8;return 32},reset:function(){clearTimeout(this._timer)},emit:function(e){8===this.state&&(e&&4&e.eventType?this.manager.emit(this.options.event+"up",e):(this._input.timeStamp=h(),this.manager.emit(this.options.event,this._input)))}}),O(_e,xe,{defaults:{event:"rotate",threshold:0,pointers:2},getTouchAction:function(){return["none"]},attrTest:function(e){return this._super.attrTest.call(this,e)&&(Math.abs(e.rotation)>this.options.threshold||2&this.state)}}),O(we,xe,{defaults:{event:"swipe",threshold:10,velocity:.3,direction:30,pointers:1},getTouchAction:function(){return Oe.prototype.getTouchAction.call(this)},attrTest:function(e){var t,n=this.options.direction;return 30&n?t=e.overallVelocity:6&n?t=e.overallVelocityX:24&n&&(t=e.overallVelocityY),this._super.attrTest.call(this,e)&&n&e.offsetDirection&&e.distance>this.options.threshold&&e.maxPointers==this.options.pointers&&f(t)>this.options.velocity&&4&e.eventType},emit:function(e){var t=ge(e.offsetDirection);t&&this.manager.emit(this.options.event+t,e),this.manager.emit(this.options.event,e)}}),O(Se,ve,{defaults:{event:"tap",pointers:1,taps:1,interval:300,time:250,threshold:9,posThreshold:10},getTouchAction:function(){return["manipulation"]},process:function(e){var t=this.options,n=e.pointers.length===t.pointers,i=e.distance<t.threshold,r=e.deltaTime<t.time;if(this.reset(),1&e.eventType&&0===this.count)return this.failTimeout();if(i&&r&&n){if(4!=e.eventType)return this.failTimeout();var o=!this.pTime||e.timeStamp-this.pTime<t.interval,a=!this.pCenter||U(this.pCenter,e.center)<t.posThreshold;if(this.pTime=e.timeStamp,this.pCenter=e.center,a&&o?this.count+=1:this.count=1,this._input=e,0===this.count%t.taps)return this.hasRequireFailures()?(this._timer=m((function(){this.state=8,this.tryEmit()}),t.interval,this),2):8}return 32},failTimeout:function(){return this._timer=m((function(){this.state=32}),this.options.interval,this),32},reset:function(){clearTimeout(this._timer)},emit:function(){8==this.state&&(this._input.tapCount=this.count,this.manager.emit(this.options.event,this._input))}}),Te.VERSION="2.0.7",Te.defaults={domEvents:!1,touchAction:"compute",enable:!0,inputTarget:null,inputClass:null,preset:[[_e,{enable:!1}],[je,{enable:!1},["rotate"]],[we,{direction:6}],[Oe,{direction:6},["swipe"]],[Se],[Se,{event:"doubletap",taps:2},["tap"]],[Ee]],cssProps:{userSelect:"none",touchSelect:"none",touchCallout:"none",contentZooming:"none",userDrag:"none",tapHighlightColor:"rgba(0,0,0,0)"}};function Pe(e,t){var n;this.options=u({},Te.defaults,t||{}),this.options.inputTarget=this.options.inputTarget||e,this.handlers={},this.session={},this.recognizers=[],this.oldCssProps={},this.element=e,this.input=new((n=this).options.inputClass||(L?te:I?ae:N?ce:X))(n,$),this.touchAction=new me(this,this.options.touchAction),Ce(this,!0),b(this.options.recognizers,(function(e){var t=this.add(new e[0](e[1]));e[2]&&t.recognizeWith(e[2]),e[3]&&t.requireFailure(e[3])}),this)}function Ce(e,t){var n,i=e.element;i.style&&(b(e.options.cssProps,(function(r,o){n=B(i.style,o),t?(e.oldCssProps[n]=i.style[n],i.style[n]=r):i.style[n]=e.oldCssProps[n]||""})),t||(e.oldCssProps={}))}Pe.prototype={set:function(e){return u(this.options,e),e.touchAction&&this.touchAction.update(),e.inputTarget&&(this.input.destroy(),this.input.target=e.inputTarget,this.input.init()),this},stop:function(e){this.session.stopped=e?2:1},recognize:function(e){var t=this.session;if(!t.stopped){var n;this.touchAction.preventDefaults(e);var i=this.recognizers,r=t.curRecognizer;(!r||r&&8&r.state)&&(r=t.curRecognizer=null);for(var o=0;o<i.length;)n=i[o],2===t.stopped||r&&n!=r&&!n.canRecognizeWith(r)?n.reset():n.recognize(e),!r&&14&n.state&&(r=t.curRecognizer=n),o++}},get:function(e){if(e instanceof ve)return e;for(var t=this.recognizers,n=0;n<t.length;n++)if(t[n].options.event==e)return t[n];return null},add:function(e){if(v(e,"add",this))return this;var t=this.get(e.options.event);return t&&this.remove(t),this.recognizers.push(e),e.manager=this,this.touchAction.update(),e},remove:function(e){if(v(e,"remove",this))return this;if(e=this.get(e)){var t=this.recognizers,n=A(t,e);-1!==n&&(t.splice(n,1),this.touchAction.update())}return this},on:function(e,t){if(void 0!==e&&void 0!==t){var n=this.handlers;return b(C(e),(function(e){n[e]=n[e]||[],n[e].push(t)})),this}},off:function(e,t){if(void 0!==e){var n=this.handlers;return b(C(e),(function(e){t?n[e]&&n[e].splice(A(n[e],t),1):delete n[e]})),this}},emit:function(e,t){this.options.domEvents&&function(e,t){var n=a.createEvent("Event");n.initEvent(e,!0,!0),n.gesture=t,t.target.dispatchEvent(n)}(e,t);var n=this.handlers[e]&&this.handlers[e].slice();if(n&&n.length){t.type=e,t.preventDefault=function(){t.srcEvent.preventDefault()};for(var i=0;i<n.length;)n[i](t),i++}},destroy:function(){this.element&&Ce(this,!1),this.handlers={},this.session={},this.input.destroy(),this.element=null}},u(Te,{INPUT_START:1,INPUT_MOVE:2,INPUT_END:4,INPUT_CANCEL:8,STATE_POSSIBLE:1,STATE_BEGAN:2,STATE_CHANGED:4,STATE_ENDED:8,STATE_RECOGNIZED:8,STATE_CANCELLED:16,STATE_FAILED:32,DIRECTION_NONE:1,DIRECTION_LEFT:2,DIRECTION_RIGHT:4,DIRECTION_UP:8,DIRECTION_DOWN:16,DIRECTION_HORIZONTAL:6,DIRECTION_VERTICAL:24,DIRECTION_ALL:30,Manager:Pe,Input:V,TouchAction:me,TouchInput:ae,MouseInput:X,PointerEventInput:te,TouchMouseInput:ce,SingleTouchInput:ie,Recognizer:ve,AttrRecognizer:xe,Tap:Se,Pan:Oe,Swipe:we,Pinch:je,Rotate:_e,Press:Ee,on:w,off:S,each:b,merge:x,extend:y,assign:u,inherit:O,bindFn:j,prefixed:B}),(void 0!==o?o:"undefined"!=typeof self?self:{}).Hammer=Te,void 0===(i=function(){return Te}.call(t,n,t,e))||(e.exports=i)}(window,document)},function(e,t,n){e.exports={__depends__:[n(932),n(757).default],__init__:["propertiesPanel"],propertiesPanel:["type",n(1008)]}},function(e,t,n){"use strict";var i=n(731),r={"properties-panel.update-businessobject":n(946),"properties-panel.create-and-reference":n(1004),"properties-panel.create-businessobject-list":n(1005),"properties-panel.update-businessobject-list":n(1006),"properties-panel.multi-command-executor":n(1007)};function o(e,t){e.on("diagram.init",(function(){i(r,(function(e,n){t.registerHandler(n,e)}))}))}o.$inject=["eventBus","commandStack"],e.exports={__init__:[o]}},function(e,t,n){var i=n(934)();e.exports=i},function(e,t){e.exports=function(e){return function(t,n,i){for(var r=-1,o=Object(t),a=i(t),s=a.length;s--;){var c=a[e?s:++r];if(!1===n(o[c],c,o))break}return t}}},function(e,t,n){var i=n(936),r=n(778),o=n(734),a=n(779),s=n(780),c=n(781),u=Object.prototype.hasOwnProperty;e.exports=function(e,t){var n=o(e),p=!n&&r(e),l=!n&&!p&&a(e),d=!n&&!p&&!l&&c(e),f=n||p||l||d,h=f?i(e.length,String):[],m=h.length;for(var v in e)!t&&!u.call(e,v)||f&&("length"==v||l&&("offset"==v||"parent"==v)||d&&("buffer"==v||"byteLength"==v||"byteOffset"==v)||s(v,m))||h.push(v);return h}},function(e,t){e.exports=function(e,t){for(var n=-1,i=Array(e);++n<e;)i[n]=t(n);return i}},function(e,t,n){var i=n(761),r=n(752);e.exports=function(e){return r(e)&&"[object Arguments]"==i(e)}},function(e,t,n){n(0),n(15),n(0),n(15);var i=n(762),r=Object.prototype,o=r.hasOwnProperty,a=r.toString,s=i?i.toStringTag:void 0;e.exports=function(e){var t=o.call(e,s),n=e[s];try{e[s]=void 0;var i=!0}catch(e){}var r=a.call(e);return i&&(t?e[s]=n:delete e[s]),r}},function(e,t,n){n(0),n(15),n(0),n(15);var i=Object.prototype.toString;e.exports=function(e){return i.call(e)}},function(e,t){e.exports=function(){return!1}},function(e,t,n){var i=n(761),r=n(805),o=n(752),a={};a["[object Float32Array]"]=a["[object Float64Array]"]=a["[object Int8Array]"]=a["[object Int16Array]"]=a["[object Int32Array]"]=a["[object Uint8Array]"]=a["[object Uint8ClampedArray]"]=a["[object Uint16Array]"]=a["[object Uint32Array]"]=!0,a["[object Arguments]"]=a["[object Array]"]=a["[object ArrayBuffer]"]=a["[object Boolean]"]=a["[object DataView]"]=a["[object Date]"]=a["[object Error]"]=a["[object Function]"]=a["[object Map]"]=a["[object Number]"]=a["[object Object]"]=a["[object RegExp]"]=a["[object Set]"]=a["[object String]"]=a["[object WeakMap]"]=!1,e.exports=function(e){return o(e)&&r(e.length)&&!!a[i(e)]}},function(e,t,n){(function(e){var i=n(123).default,r=n(845),o="object"==i(t)&&t&&!t.nodeType&&t,a=o&&"object"==i(e)&&e&&!e.nodeType&&e,s=a&&a.exports===o&&r.process,c=function(){try{var e=a&&a.require&&a.require("util").types;return e||s&&s.binding&&s.binding("util")}catch(e){}}();e.exports=c}).call(this,n(177)(e))},function(e,t,n){n(38),n(38);var i=n(848)(Object.keys,Object);e.exports=i},function(e,t,n){var i=n(749);e.exports=function(e,t){return function(n,r){if(null==n)return n;if(!i(n))return e(n,r);for(var o=n.length,a=t?o:-1,s=Object(n);(t?a--:++a<o)&&!1!==r(s[a],a,s););return n}}},function(e,t,n){var i=n(763);e.exports=function(e){return"function"==typeof e?e:i}},function(e,t,n){"use strict";var i=n(947),r=n(720).is,o=n(745),a=n(731);function s(e){this._elementRegistry=e}function c(e,t){a(t,(function(t,n){e.set(n,t)}))}s.$inject=["elementRegistry"],e.exports=s,s.prototype.execute=function(e){var t=e.element,n=e.businessObject,s=function(e){for(var t=e;t.$parent;)t=t.$parent;return t}(n).rootElements,u=e.referenceType,p=e.referenceProperty,l=[t];if(!t)throw new Error("element required");if(!n)throw new Error("businessObject required");var d=e.properties,f=e.oldProperties||function(e,t){return i(t,(function(t,n){return t[n]=e.get(n),t}),{})}(n,o(d));return void 0!==u&&void 0!==p&&a(s,(function(e){r(e,u)&&e.id===d[p]&&(d[p]=e)})),c(n,d),e.oldProperties=f,e.changed=l,l},s.prototype.revert=function(e){var t=e.oldProperties;return c(e.businessObject,t),e.changed}},function(e,t,n){var i=n(804),r=n(782),o=n(844),a=n(759),s=n(1003),c=n(734),u=n(779),p=n(807),l=n(743),d=n(781);e.exports=function(e,t,n){var f=c(e),h=f||u(e)||d(e);if(t=a(t,4),null==n){var m=e&&e.constructor;n=h?f?new m:[]:l(e)&&p(m)?r(s(e)):{}}return(h?i:o)(e,(function(e,i,r){return t(n,e,i,r)})),n}},function(e,t,n){var i=n(949),r=n(990),o=n(858);e.exports=function(e){var t=r(e);return 1==t.length&&t[0][2]?o(t[0][0],t[0][1]):function(n){return n===e||i(n,e,t)}}},function(e,t,n){var i=n(849),r=n(851);e.exports=function(e,t,n,o){var a=n.length,s=a,c=!o;if(null==e)return!s;for(e=Object(e);a--;){var u=n[a];if(c&&u[2]?u[1]!==e[u[0]]:!(u[0]in e))return!1}for(;++a<s;){var p=(u=n[a])[0],l=e[p],d=u[1];if(c&&u[2]){if(void 0===l&&!(p in e))return!1}else{var f=new i;if(o)var h=o(l,d,p,e,t,f);if(!(void 0===h?r(d,l,3,o,f):h))return!1}}return!0}},function(e,t){e.exports=function(){this.__data__=[],this.size=0}},function(e,t,n){n(86),n(86);var i=n(784),r=Array.prototype.splice;e.exports=function(e){var t=this.__data__,n=i(t,e);return!(n<0)&&(n==t.length-1?t.pop():r.call(t,n,1),--this.size,!0)}},function(e,t,n){var i=n(784);e.exports=function(e){var t=this.__data__,n=i(t,e);return n<0?void 0:t[n][1]}},function(e,t,n){var i=n(784);e.exports=function(e){return i(this.__data__,e)>-1}},function(e,t,n){var i=n(784);e.exports=function(e,t){var n=this.__data__,r=i(n,e);return r<0?(++this.size,n.push([e,t])):n[r][1]=t,this}},function(e,t,n){var i=n(783);e.exports=function(){this.__data__=new i,this.size=0}},function(e,t){e.exports=function(e){var t=this.__data__,n=t.delete(e);return this.size=t.size,n}},function(e,t){e.exports=function(e){return this.__data__.get(e)}},function(e,t){e.exports=function(e){return this.__data__.has(e)}},function(e,t,n){var i=n(783),r=n(808),o=n(809);e.exports=function(e,t){var n=this.__data__;if(n instanceof i){var a=n.__data__;if(!r||a.length<199)return a.push([e,t]),this.size=++n.size,this;n=this.__data__=new o(a)}return n.set(e,t),this.size=n.size,this}},function(e,t,n){n(0),n(15),n(36),n(1),n(22),n(0),n(15),n(36),n(1),n(22);var i=n(807),r=n(961),o=n(743),a=n(850),s=/^\[object .+?Constructor\]$/,c=Function.prototype,u=Object.prototype,p=c.toString,l=u.hasOwnProperty,d=RegExp("^"+p.call(l).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");e.exports=function(e){return!(!o(e)||r(e))&&(i(e)?d:s).test(a(e))}},function(e,t,n){n(1),n(11),n(0),n(8),n(1),n(0),n(8);var i,r=n(962),o=(i=/[^.]+$/.exec(r&&r.keys&&r.keys.IE_PROTO||""))?"Symbol(src)_1."+i:"";e.exports=function(e){return!!o&&o in e}},function(e,t,n){var i=n(738)["__core-js_shared__"];e.exports=i},function(e,t){e.exports=function(e,t){return null==e?void 0:e[t]}},function(e,t,n){var i=n(965),r=n(783),o=n(808);e.exports=function(){this.size=0,this.__data__={hash:new i,map:new(o||r),string:new i}}},function(e,t,n){var i=n(966),r=n(967),o=n(968),a=n(969),s=n(970);function c(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var i=e[t];this.set(i[0],i[1])}}c.prototype.clear=i,c.prototype.delete=r,c.prototype.get=o,c.prototype.has=a,c.prototype.set=s,e.exports=c},function(e,t,n){var i=n(786);e.exports=function(){this.__data__=i?i(null):{},this.size=0}},function(e,t){e.exports=function(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t}},function(e,t,n){var i=n(786),r=Object.prototype.hasOwnProperty;e.exports=function(e){var t=this.__data__;if(i){var n=t[e];return"__lodash_hash_undefined__"===n?void 0:n}return r.call(t,e)?t[e]:void 0}},function(e,t,n){var i=n(786),r=Object.prototype.hasOwnProperty;e.exports=function(e){var t=this.__data__;return i?void 0!==t[e]:r.call(t,e)}},function(e,t,n){var i=n(786);e.exports=function(e,t){var n=this.__data__;return this.size+=this.has(e)?0:1,n[e]=i&&void 0===t?"__lodash_hash_undefined__":t,this}},function(e,t,n){var i=n(787);e.exports=function(e){var t=i(this,e).delete(e);return this.size-=t?1:0,t}},function(e,t,n){var i=n(123).default;e.exports=function(e){var t=i(e);return"string"==t||"number"==t||"symbol"==t||"boolean"==t?"__proto__"!==e:null===e}},function(e,t,n){var i=n(787);e.exports=function(e){return i(this,e).get(e)}},function(e,t,n){var i=n(787);e.exports=function(e){return i(this,e).has(e)}},function(e,t,n){var i=n(787);e.exports=function(e,t){var n=i(this,e),r=n.size;return n.set(e,t),this.size+=n.size==r?0:1,this}},function(e,t,n){var i=n(849),r=n(852),o=n(980),a=n(983),s=n(854),c=n(734),u=n(779),p=n(781),l="[object Object]",d=Object.prototype.hasOwnProperty;e.exports=function(e,t,n,f,h,m){var v=c(e),b=c(t),g=v?"[object Array]":s(e),y=b?"[object Array]":s(t),x=(g="[object Arguments]"==g?l:g)==l,O=(y="[object Arguments]"==y?l:y)==l,j=g==y;if(j&&u(e)){if(!u(t))return!1;v=!0,x=!1}if(j&&!x)return m||(m=new i),v||p(e)?r(e,t,n,f,h,m):o(e,t,g,n,f,h,m);if(!(1&n)){var E=x&&d.call(e,"__wrapped__"),_=O&&d.call(t,"__wrapped__");if(E||_){var w=E?e.value():e,S=_?t.value():t;return m||(m=new i),h(w,S,n,f,m)}}return!!j&&(m||(m=new i),a(e,t,n,f,h,m))}},function(e,t){e.exports=function(e){return this.__data__.set(e,"__lodash_hash_undefined__"),this}},function(e,t){e.exports=function(e){return this.__data__.has(e)}},function(e,t){e.exports=function(e,t){for(var n=-1,i=null==e?0:e.length;++n<i;)if(t(e[n],n,e))return!0;return!1}},function(e,t,n){n(23),n(23);var i=n(762),r=n(981),o=n(785),a=n(852),s=n(982),c=n(812),u=i?i.prototype:void 0,p=u?u.valueOf:void 0;e.exports=function(e,t,n,i,u,l,d){switch(n){case"[object DataView]":if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)return!1;e=e.buffer,t=t.buffer;case"[object ArrayBuffer]":return!(e.byteLength!=t.byteLength||!l(new r(e),new r(t)));case"[object Boolean]":case"[object Date]":case"[object Number]":return o(+e,+t);case"[object Error]":return e.name==t.name&&e.message==t.message;case"[object RegExp]":case"[object String]":return e==t+"";case"[object Map]":var f=s;case"[object Set]":var h=1&i;if(f||(f=c),e.size!=t.size&&!h)return!1;var m=d.get(e);if(m)return m==t;i|=2,d.set(e,t);var v=a(f(e),f(t),i,u,l,d);return d.delete(e),v;case"[object Symbol]":if(p)return p.call(e)==p.call(t)}return!1}},function(e,t,n){var i=n(738).Uint8Array;e.exports=i},function(e,t,n){n(20),n(20),e.exports=function(e){var t=-1,n=Array(e.size);return e.forEach((function(e,i){n[++t]=[i,e]})),n}},function(e,t,n){var i=n(984),r=Object.prototype.hasOwnProperty;e.exports=function(e,t,n,o,a,s){var c=1&n,u=i(e),p=u.length;if(p!=i(t).length&&!c)return!1;for(var l=p;l--;){var d=u[l];if(!(c?d in t:r.call(t,d)))return!1}var f=s.get(e),h=s.get(t);if(f&&h)return f==t&&h==e;var m=!0;s.set(e,t),s.set(t,e);for(var v=c;++l<p;){var b=e[d=u[l]],g=t[d];if(o)var y=c?o(g,b,d,t,e,s):o(b,g,d,e,t,s);if(!(void 0===y?b===g||a(b,g,n,o,s):y)){m=!1;break}v||(v="constructor"==d)}if(m&&!v){var x=e.constructor,O=t.constructor;x==O||!("constructor"in e)||!("constructor"in t)||"function"==typeof x&&x instanceof x&&"function"==typeof O&&O instanceof O||(m=!1)}return s.delete(e),s.delete(t),m}},function(e,t,n){var i=n(985),r=n(986),o=n(745);e.exports=function(e){return i(e,o,r)}},function(e,t,n){var i=n(853),r=n(734);e.exports=function(e,t,n){var o=t(e);return r(e)?o:i(o,n(e))}},function(e,t,n){n(6),n(6);var i=n(813),r=n(987),o=Object.prototype.propertyIsEnumerable,a=Object.getOwnPropertySymbols,s=a?function(e){return null==e?[]:(e=Object(e),i(a(e),(function(t){return o.call(e,t)})))}:r;e.exports=s},function(e,t){e.exports=function(){return[]}},function(e,t,n){var i=n(753)(n(738),"DataView");e.exports=i},function(e,t,n){var i=n(753)(n(738),"Promise");e.exports=i},function(e,t,n){var i=n(857),r=n(745);e.exports=function(e){for(var t=r(e),n=t.length;n--;){var o=t[n],a=e[o];t[n]=[o,a,i(a)]}return t}},function(e,t,n){var i=n(851),r=n(859),o=n(997),a=n(814),s=n(857),c=n(858),u=n(790);e.exports=function(e,t){return a(e)&&s(t)?c(u(e),t):function(n){var a=r(n,e);return void 0===a&&a===t?o(n,e):i(t,a,3)}}},function(e,t,n){n(1),n(22),n(1),n(22);var i=n(993),r=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,o=/\\(\\)?/g,a=i((function(e){var t=[];return 46===e.charCodeAt(0)&&t.push(""),e.replace(r,(function(e,n,i,r){t.push(i?r.replace(o,"$1"):n||e)})),t}));e.exports=a},function(e,t,n){var i=n(994);e.exports=function(e){var t=i(e,(function(e){return 500===n.size&&n.clear(),e})),n=t.cache;return t}},function(e,t,n){var i=n(809);function r(e,t){if("function"!=typeof e||null!=t&&"function"!=typeof t)throw new TypeError("Expected a function");var n=function n(){var i=arguments,r=t?t.apply(this,i):i[0],o=n.cache;if(o.has(r))return o.get(r);var a=e.apply(this,i);return n.cache=o.set(r,a)||o,a};return n.cache=new(r.Cache||i),n}r.Cache=i,e.exports=r},function(e,t,n){var i=n(996);e.exports=function(e){return null==e?"":i(e)}},function(e,t,n){n(0),n(15),n(0),n(15);var i=n(762),r=n(789),o=n(734),a=n(788),s=i?i.prototype:void 0,c=s?s.toString:void 0;e.exports=function e(t){if("string"==typeof t)return t;if(o(t))return r(t,e)+"";if(a(t))return c?c.call(t):"";var n=t+"";return"0"==n&&1/t==-1/0?"-0":n}},function(e,t,n){var i=n(998),r=n(999);e.exports=function(e,t){return null!=e&&r(e,t,i)}},function(e,t){e.exports=function(e,t){return null!=e&&t in Object(e)}},function(e,t,n){var i=n(861),r=n(778),o=n(734),a=n(780),s=n(805),c=n(790);e.exports=function(e,t,n){for(var u=-1,p=(t=i(t,e)).length,l=!1;++u<p;){var d=c(t[u]);if(!(l=null!=e&&n(e,d)))break;e=e[d]}return l||++u!=p?l:!!(p=null==e?0:e.length)&&s(p)&&a(d,p)&&(o(e)||r(e))}},function(e,t,n){var i=n(1001),r=n(1002),o=n(814),a=n(790);e.exports=function(e){return o(e)?i(a(e)):r(e)}},function(e,t){e.exports=function(e){return function(t){return null==t?void 0:t[e]}}},function(e,t,n){var i=n(860);e.exports=function(e){return function(t){return i(t,e)}}},function(e,t,n){n(66),n(66);var i=n(848)(Object.getPrototypeOf,Object);e.exports=i},function(e,t,n){"use strict";n(86),n(86);var i=n(732);function r(e,t){this._elementRegistry=e,this._bpmnFactory=t}function o(e,t){if(!e)throw new Error(t+" required");return e}r.$inject=["elementRegistry","bpmnFactory"],e.exports=r,r.prototype.execute=function(e){var t=o(e.referencingObject,"referencingObject"),n=o(e.referenceProperty,"referenceProperty"),r=o(e.newObject,"newObject"),a=o(e.newObjectContainer,"newObjectContainer"),s=o(e.newObjectParent,"newObjectParent"),c=[e.element],u=i.createElement(r.type,r.properties,s,this._bpmnFactory);return e.referencedObject=u,a.push(u),e.previousReference=t[n],t[n]=u,e.changed=c,c},r.prototype.revert=function(e){var t=e.referencingObject,n=e.referenceProperty,i=e.previousReference,r=e.referencedObject,o=e.newObjectContainer;return t.set(n,i),o.splice(o.indexOf(r),1),e.changed}},function(e,t,n){"use strict";n(0),n(0);var i=n(731),r=n(732);function o(e,t){this._elementRegistry=e,this._bpmnFactory=t}function a(e,t){if(!e)throw new Error(t+" required");return e}o.$inject=["elementRegistry","bpmnFactory"],e.exports=o,o.prototype.execute=function(e){var t=a(e.currentObject,"currentObject"),n=a(e.propertyName,"propertyName"),o=function(e,t){if(!e||"[object Array]"!==Object.prototype.toString.call(e))throw new Error(t+" needs to be a list");return e}(e.newObjects,"newObjects"),s=[e.element],c=[],u=this;return i(o,(function(e){var n=r.createElement(e.type,e.properties,t,u._bpmnFactory);c.push(n)})),e.childObject=c,e.previousChilds=t[n],t[n]=c,e.changed=s,s},o.prototype.revert=function(e){var t=e.currentObject,n=e.propertyName,i=e.previousChilds;return t.set(n,i),e.changed}},function(e,t,n){"use strict";n(21),n(21);var i=n(731);function r(e,t){this._elementRegistry=e,this._bpmnFactory=t}function o(e,t){if(!e)throw new Error(t+"required");return e}r.$inject=["elementRegistry","bpmnFactory"],e.exports=r,r.prototype.execute=function(e){var t,n=o(e.currentObject,"currentObject"),r=o(e.propertyName,"propertyName"),a=e.updatedObjectList,s=e.objectsToRemove||[],c=e.objectsToAdd||[],u=[e.element];e.referencePropertyName&&(t=e.referencePropertyName);var p=n[r];if(e.previousList=n[r],a)n[r]=a;else{var l=[];if(i(p,(function(e){-1==s.indexOf(e)&&l.push(e)})),(l=l.concat(c)).length>0||!t)n[r]=l;else if(t){n.$parent.set(t,void 0)}}return e.changed=u,u},r.prototype.revert=function(e){var t=e.currentObject,n=e.propertyName,i=e.previousList,r=t.$parent;return e.referencePropertyName&&r.set(e.referencePropertyName,t),t.set(n,i),e.changed}},function(e,t,n){"use strict";var i=n(731);function r(e){this._commandStack=e}r.$inject=["commandStack"],e.exports=r,r.prototype.preExecute=function(e){var t=this._commandStack;i(e,(function(e){t.execute(e.cmd,e.context)}))}},function(e,t,n){"use strict";n(21),n(11),n(0),n(8),n(21),n(0),n(8);var i=n(729).escapeHTML,r=n(723).domify,o=n(723).query,a=n(723).queryAll,s=n(723).remove,c=n(723).classes,u=n(723).closest,p=n(723).attr,l=n(723).delegate,d=n(723).matches,f=n(731),h=n(791),m=n(859),v=n(745),b=n(1010),g=n(734),y=n(1011),x=n(1024),O=n(870),j=n(1134).default,E=n(720).getBusinessObject;function _(e){return"checkbox"===e.type||"radio"===e.type}function w(e){return p(e,"contenteditable")}function S(e,t){var n=a("input[name], textarea[name], select[name], [contenteditable]",e);return n&&n.length||(n=d(e,"option")?[e]:n),t||(n=h(n,(function(e){return!u(e,".bpp-hidden")}))),n}function T(e){var t={},n=S(e);return f(n,(function(e){var n=e.value,i=p(e,"name")||p(e,"data-name");_(e)?n=e.checked?!p(e,"value")||e.value:null:w(e)&&(n=e.innerText),null!==n&&(t[i]=n)})),t}function P(e){var t,n=o("[data-list-entry-container]",e);if(n){t=[];var i=n.children||[];f(i,(function(e){t.push(T(e))}))}else t=T(e);return t}function C(e,t){return!(e&&!t)&&v(e).concat(v(t)).every((function(n){return e[n]===t[n]}))}function A(e){return B(k(M(k(M(e,"groups")),"entries")),"id")}function R(e,t,n,i,r,o){this._eventBus=t,this._modeling=n,this._commandStack=r,this._canvas=o,this._propertiesProvider=i,this._init(e)}R.$inject=["config.propertiesPanel","eventBus","modeling","propertiesProvider","commandStack","canvas"],e.exports=R,R.prototype._init=function(e){var t=this._canvas,n=this._eventBus,i=this;n.on("root.added",(function(e){var t=e.element;D(t)||i.update(t)})),n.on("selection.changed",(function(e){var n=e.newSelection[0];D(t.getRootElement())||i.update(n)})),n.on(["propertiesPanel.changed","propertiesPanel.resized"],(function(e){var t=o(".bpp-properties-tab-bar",i._container);if(t){var n=j.get(t);n||(n=j(t,{selectors:{tabsContainer:".bpp-properties-tabs-links",tab:".bpp-properties-tabs-links li",ignore:".bpp-hidden",active:".bpp-active"}})).on("scroll",(function(e,t,n){var r=o("[data-tab-target]",e),a=p(r,"data-tab-target");i.activateTab(a)})),n.update()}})),n.on("elements.changed",(function(e){var t=i._current,n=t&&t.element;n&&-1!==e.elements.indexOf(n)&&i.update(n)})),n.on("elementTemplates.changed",(function(){var e=i._current,t=e&&e.element;t&&i.update(t)})),n.on("diagram.destroy",(function(){i.detach()})),this._container=r('<div class="bpp-properties-panel"></div>'),this._bindListeners(this._container),e&&e.parent&&this.attachTo(e.parent)},R.prototype.attachTo=function(e){if(!e)throw new Error("parentNode required");this.detach(),e.get&&e.constructor.prototype.jquery&&(e=e.get(0)),"string"==typeof e&&(e=o(e));var t=this._container;e.appendChild(t),this._emit("attach")},R.prototype.detach=function(){var e=this._container,t=e.parentNode;t&&(this._emit("detach"),t.removeChild(e))},R.prototype.activateTab=function(e){var t="string"==typeof e?e:e.id,n=this._current.panel,i=a(".bpp-properties-tab",n),r=a(".bpp-properties-tab-link",n);f(i,(function(e){var n=p(e,"data-tab");c(e).toggle("bpp-active",t===n)})),f(r,(function(e){var n=o("[data-tab-target]",e),i=p(n,"data-tab-target");c(e).toggle("bpp-active",t===i)}))},R.prototype.update=function(e){var t=this._current,n=!0;void 0===e&&(e=this._canvas.getRootElement());var i=this._propertiesProvider.getTabs(e);if(t&&t.element===e&&(n=this._entriesChanged(t,i)),n){if(t){var r,a=o(".bpp-properties-tab.bpp-active",t.panel);a&&(r=p(a,"data-tab")),s(t.panel)}this._current=this._create(e,i),r?this.activateTab(r):this.activateTab(this._current.tabs[0])}this._current&&this._updateActivation(this._current),this._emit("changed")},R.prototype._entriesChanged=function(e,t){var n=v(e.entries),i=v(A(t));return!b(y(n,i))},R.prototype._emit=function(e){this._eventBus.fire("propertiesPanel."+e,{panel:this,current:this._current})},R.prototype._bindListeners=function(e){var t=this,n=function(e){var n,i,r=e.delegateTarget,o=u(r,"[data-entry]");if(o){n=p(o,"data-entry"),i=t.getEntry(n);var a=P(o);if("change"===e.type){var s=p(r,"data-on-change");if(s)if(!t.executeAction(i,o,s,e))return t.update(t._current.element)}t.applyChanges(i,a,o),t.updateState(i,o)}};l.bind(e,"input, textarea, [contenteditable]","input",x(n,300)),l.bind(e,"input, textarea, select, [contenteditable]","change",n),l.bind(e,"[contenteditable]","paste",(function(e){var t=(e.clipboardData||window.clipboardData).getData("text");document.execCommand("insertText",!1,t),e.preventDefault()})),l.bind(e,"select","keydown",(function(e){46===e.keyCode&&(e.stopPropagation(),e.preventDefault())})),l.bind(e,"[data-action]","click",(function(e){var n=e.delegateTarget,i=u(n,"[data-entry]"),r=p(n,"data-action"),o=p(i,"data-entry"),a=t.getEntry(o);if(t.executeAction(a,i,r,e)){var s=P(i);t.applyChanges(a,s,i)}t.updateState(a,i)})),l.bind(e,"[data-blur]","blur",(function(e,n){var i=e.delegateTarget,r=u(i,"[data-entry]");if(r){var o=p(i,"data-blur"),a=p(r,"data-entry"),s=t.getEntry(a);if(t.executeAction(s,r,o,e)){var c=P(r);t.applyChanges(s,c,r)}t.updateState(s,r)}}),!0),l.bind(e,".bpp-properties-tabs-links [data-tab-target]","click",(function(e){e.preventDefault();var n=e.delegateTarget,i=p(n,"data-tab-target");t.activateTab(i)}))},R.prototype.updateState=function(e,t){this.updateShow(e,t),this.updateDisable(e,t)},R.prototype.updateShow=function(e,t){var n=this._current;if(n){var i=a("[data-show]",t)||[];f(i,(function(i){var r=p(i,"data-show"),o=m(e,r);if(o){var a=u(i,"[data-scope]")||t;o(n.element,t,i,a)||!1?c(i).remove("bpp-hidden"):c(i).add("bpp-hidden")}}))}},R.prototype.updateDisable=function(e,t){var n=this._current;if(n){var i=a("[data-disable]",t)||[];f(i,(function(i){var r=p(i,"data-disable"),o=m(e,r);if(o){var a=u(i,"[data-scope]")||t,s=o(n.element,t,i,a)||!1;p(i,"disabled",s?"":null)}}))}},R.prototype.executeAction=function(e,t,n,i){var r=this._current;if(r){var o=m(e,n);if(o){var a=u(i.target,"[data-scope]")||t;return o.apply(e,[r.element,t,i,a])}}},R.prototype.applyChanges=function(e,t,n){var i=this._current.element;if(!function(e,t){return g(e)?e.length===t.length&&e.every((function(e,n){return C(e,t[n])})):C(e,t)}(t,e.oldValues)){var r,o=e.set(i,t,n);g(o)?o.length&&(r={cmd:"properties-panel.multi-command-executor",context:k(o)}):r=o,r?this._commandStack.execute(r.cmd,r.context||{element:i}):this.update(i)}},R.prototype.applyValidationErrors=function(e,t){var n=!0,i=S(t,!0);return f(i,(function(t){var i=p(t,"name")||p(t,"data-name"),a=e&&e[i],s=o(".bpp-error-message",t.parentNode);a?(n=!1,s||(s=r("<div></div>"),c(s).add("bpp-error-message"),t.parentNode.insertBefore(s,t.nextSibling)),s.textContent=a,c(t).add("invalid")):(c(t).remove("invalid"),s&&t.parentNode.removeChild(s))})),n},R.prototype.validate=function(e,t,n){var i=this._current,r=!0;if(n=n||o('[data-entry="'+e.id+'"]',i.panel),t instanceof Array)for(var a=o("[data-list-entry-container]",n).children||[],s=0;s<t.length;s++){var c=t[s];if(e.validateListItem){var u=e.validateListItem(i.element,c,n,s),p=a[s];r=this.applyValidationErrors(u,p)&&r}}else e.validate&&(this.validationErrors=e.validate(i.element,t,n),r=this.applyValidationErrors(this.validationErrors,n)&&r);return r},R.prototype.getEntry=function(e){return this._current&&this._current.entries[e]};var k=n(871),B=n(1028),M=n(819);function D(e){return"__implicitroot"===e.id}R.prototype._create=function(e,t){if(!e)return null;var n=this._container,i=this._createPanel(e,t);n.appendChild(i);var r=A(t);return{tabs:t,groups:function(e){return B(k(M(e,"groups")),"id")}(t),entries:r,element:e,panel:i}},R.prototype._bindTemplate=function(e,t,n,i,r){var o=this._eventBus;var s,c,u,l=((u=a(c="input[name], textarea[name], [data-value], [contenteditable]",s=i))&&u.length||!d(s,c)||(u=[s]),u);f(l,(function(a){var s,c,u;"value"in a||"true"===w(a)?(s=p(a,"name")||p(a,"data-name"),c=n[s],(u=function(t,n){return o.fire("propertiesPanel.isPropertyEditable",{entry:t,propertyName:n,element:e})}(t,s))&&t.editable&&(u=t.editable(e,i,a,s,c,r)),p(a,"readonly",u?null:""),p(a,"disabled",u?null:""),t.setControlValue?t.setControlValue(e,i,a,s,c,r):_(a)?function(e,t){var n=e.value;e.checked=t===n||!p(e,"value")&&t}(a,c):function(e){return"select-one"===e.type}(a)?function(e,t){void 0!==t&&(e.value=t)}(a,c):function(e,t){var n,i=w(e),r=i?e.innerText:e.value;void 0===t&&(t="");if(r===t)return;document.activeElement===e&&(n=O(function(e){return w(e)?function(e){var t=window.getSelection(),n=t.focusNode,i=t.focusOffset,r=t.anchorOffset;if(!n)throw new Error("not selected");if(!e.contains(n))throw new Error("not selected");return{start:Math.min(i,r),end:Math.max(i,r)}}(e):{start:e.selectionStart,end:e.selectionEnd}}(e),r,t));i?e.innerText=t:e.value=t;n&&function(e,t){w(e)?function(e,t){var n,i,r;n=e.firstChild||e,(i=document.createRange()).setStart(n,t.start),i.setEnd(n,t.end),(r=window.getSelection()).removeAllRanges(),r.addRange(i)}(e,t):(e.selectionStart=t.start,e.selectionEnd=t.end)}(e,n)}(a,c)):(s=p(a,"data-value"),c=n[s],t.setControlValue?t.setControlValue(e,i,a,s,c,r):function(e,t){e.textContent=t}(a,c))}))},R.prototype._updateActivation=function(e){var t=this,n=this._eventBus,i=e.element;function a(e,t){c(e).toggle("bpp-hidden",!t)}function s(e,t,n){var i=o(t,e);i&&(i.textContent=n)}var u=e.panel;f(e.tabs,(function(l){var d,h,m=o("[data-tab="+l.id+"]",u),v=o("[data-tab-target="+l.id+"]",u).parentNode,b=!1;f(l.groups,(function(e){var c=!1,u=o("[data-group="+e.id+"]",m);f(e.entries,(function(e){var s=o('[data-entry="'+e.id+'"]',u),l=function(e){return n.fire("propertiesPanel.isEntryVisible",{entry:e,element:i})}(e);c=c||l,a(s,l);var d="get"in e?e.get(i,s):{};if(d instanceof Array){for(var f=o("[data-list-entry-container]",s),h=f.children||[],m=0;m<d.length;m++){var v=d[m],b=h[m];b||(b=r(e.createListEntryTemplate(v,m,f)),f.appendChild(b)),p(b,"data-index",m),t._bindTemplate(i,e,v,b,m)}for(var g=h.length-d.length,y=0;y<g;y++)f.removeChild(f.lastChild)}else t._bindTemplate(i,e,d,s);t.updateState(e,s),t.validate(e,d,s),e.oldValues=P(s)})),"function"==typeof e.label&&s(u,".group-label",e.label(i,u)),c=c&&function(e,t,n){return"function"!=typeof e.enabled||e.enabled(t,n)}(e,i,u),b=b||c,a(u,c)})),b=b&&function(e,t){return"function"!=typeof e.enabled||e.enabled(t)}(l,i),a(m,b),a(v,b),d=b,h=c(m).has("bpp-active"),!d&&h&&t.activateTab(e.tabs[0])})),s(u,"[data-label-id]",E(i).id||"")},R.prototype._createPanel=function(e,t){var n=this,o=r('<div class="bpp-properties"></div>'),a=r('<div class="bpp-properties-header"><div class="label" data-label-id></div><div class="search"><input type="search" placeholder="Search for property" /><button><span>Search</span></button></div></div>'),s=r('<div class="bpp-properties-tab-bar"></div>'),u=r('<ul class="bpp-properties-tabs-links"></ul>'),p=r('<div class="bpp-properties-tabs-container"></div>');return o.appendChild(a),f(t,(function(e,t){if(!e.id)throw new Error("tab must have an id");var o=r('<div class="bpp-properties-tab" data-tab="'+i(e.id)+'"></div>'),a=r('<li class="bpp-properties-tab-link"><a href data-tab-target="'+i(e.id)+'">'+i(e.label)+"</a></li>"),s=e.groups;f(s,(function(e){if(!e.id)throw new Error("group must have an id");var t=r('<div class="bpp-properties-group" data-group="'+i(e.id)+'"><span class="group-toggle"></span><span class="group-label">'+i(e.label)+"</span></div>");t.querySelector(".group-toggle").addEventListener("click",(function(e){c(t).toggle("group-closed"),e.preventDefault(),e.stopPropagation()})),t.addEventListener("click",(function(e){!e.defaultPrevented&&c(t).has("group-closed")&&c(t).remove("group-closed")})),f(e.entries,(function(e){if(!e.id)throw new Error("entry must have an id");var o=e.html;"string"==typeof o&&(o=r(o)),o.get&&o.constructor.prototype.jquery&&(o=o.get(0));var a=r('<div class="bpp-properties-entry" data-entry="'+i(e.id)+'"></div>');f(e.cssClasses||[],(function(e){c(a).add(e)})),a.appendChild(o),t.appendChild(a),n.updateState(e,a)})),o.appendChild(t)})),u.appendChild(a),p.appendChild(o)})),s.appendChild(u),o.appendChild(s),o.appendChild(p),o}},function(e,t,n){var i=n(777);e.exports=function(e,t){var n=[];return i(e,(function(e,i,r){t(e,i,r)&&n.push(e)})),n}},function(e,t,n){n(86),n(86);var i=n(847),r=n(854),o=n(778),a=n(734),s=n(749),c=n(779),u=n(806),p=n(781),l=Object.prototype.hasOwnProperty;e.exports=function(e){if(null==e)return!0;if(s(e)&&(a(e)||"string"==typeof e||"function"==typeof e.splice||c(e)||p(e)||o(e)))return!e.length;var t=r(e);if("[object Map]"==t||"[object Set]"==t)return!e.size;if(u(e))return!i(e).length;for(var n in e)if(l.call(e,n))return!1;return!0}},function(e,t,n){var i=n(813),r=n(815),o=n(1015),a=n(1023),s=r((function(e){return o(i(e,a))}));e.exports=s},function(e,t,n){var i=n(816),r=Math.max;e.exports=function(e,t,n){return t=r(void 0===t?e.length-1:t,0),function(){for(var o=arguments,a=-1,s=r(o.length-t,0),c=Array(s);++a<s;)c[a]=o[t+a];a=-1;for(var u=Array(t+1);++a<t;)u[a]=o[a];return u[t]=n(c),i(e,this,u)}}},function(e,t,n){var i=n(1014),r=n(863),o=n(763),a=r?function(e,t){return r(e,"toString",{configurable:!0,enumerable:!1,value:i(t),writable:!0})}:o;e.exports=a},function(e,t){e.exports=function(e){return function(){return e}}},function(e,t,n){var i=n(1016),r=n(867),o=n(1021);e.exports=function(e,t,n){var a=e.length;if(a<2)return a?o(e[0]):[];for(var s=-1,c=Array(a);++s<a;)for(var u=e[s],p=-1;++p<a;)p!=s&&(c[s]=i(c[s]||u,e[p],t,n));return o(r(c,1),t,n)}},function(e,t,n){var i=n(810),r=n(817),o=n(866),a=n(789),s=n(846),c=n(811);e.exports=function(e,t,n,u){var p=-1,l=r,d=!0,f=e.length,h=[],m=t.length;if(!f)return h;n&&(t=a(t,s(n))),u?(l=o,d=!1):t.length>=200&&(l=c,d=!1,t=new i(t));e:for(;++p<f;){var v=e[p],b=null==n?v:n(v);if(v=u||0!==v?v:0,d&&b==b){for(var g=m;g--;)if(t[g]===b)continue e;h.push(v)}else l(t,b,u)||h.push(v)}return h}},function(e,t,n){var i=n(865),r=n(1018),o=n(1019);e.exports=function(e,t,n){return t==t?o(e,t,n):i(e,r,n)}},function(e,t){e.exports=function(e){return e!=e}},function(e,t){e.exports=function(e,t,n){for(var i=n-1,r=e.length;++i<r;)if(e[i]===t)return i;return-1}},function(e,t,n){var i=n(762),r=n(778),o=n(734),a=i?i.isConcatSpreadable:void 0;e.exports=function(e){return o(e)||r(e)||!!(a&&e&&e[a])}},function(e,t,n){var i=n(810),r=n(817),o=n(866),a=n(811),s=n(1022),c=n(812);e.exports=function(e,t,n){var u=-1,p=r,l=e.length,d=!0,f=[],h=f;if(n)d=!1,p=o;else if(l>=200){var m=t?null:s(e);if(m)return c(m);d=!1,p=a,h=new i}else h=t?[]:f;e:for(;++u<l;){var v=e[u],b=t?t(v):v;if(v=n||0!==v?v:0,d&&b==b){for(var g=h.length;g--;)if(h[g]===b)continue e;t&&h.push(b),f.push(v)}else p(h,b,n)||(h!==f&&h.push(b),f.push(v))}return f}},function(e,t,n){var i=n(855),r=n(868),o=n(812),a=i&&1/o(new i([,-0]))[1]==1/0?function(e){return new i(e)}:r;e.exports=a},function(e,t,n){var i=n(749),r=n(752);e.exports=function(e){return r(e)&&i(e)}},function(e,t,n){var i=n(743),r=n(1025),o=n(869),a=Math.max,s=Math.min;e.exports=function(e,t,n){var c,u,p,l,d,f,h=0,m=!1,v=!1,b=!0;if("function"!=typeof e)throw new TypeError("Expected a function");function g(t){var n=c,i=u;return c=u=void 0,h=t,l=e.apply(i,n)}function y(e){return h=e,d=setTimeout(O,t),m?g(e):l}function x(e){var n=e-f;return void 0===f||n>=t||n<0||v&&e-h>=p}function O(){var e=r();if(x(e))return j(e);d=setTimeout(O,function(e){var n=t-(e-f);return v?s(n,p-(e-h)):n}(e))}function j(e){return d=void 0,b&&c?g(e):(c=u=void 0,l)}function E(){var e=r(),n=x(e);if(c=arguments,u=this,f=e,n){if(void 0===d)return y(f);if(v)return clearTimeout(d),d=setTimeout(O,t),g(f)}return void 0===d&&(d=setTimeout(O,t)),l}return t=o(t)||0,i(n)&&(m=!!n.leading,p=(v="maxWait"in n)?a(o(n.maxWait)||0,t):p,b="trailing"in n?!!n.trailing:b),E.cancel=function(){void 0!==d&&clearTimeout(d),h=0,c=f=u=d=void 0},E.flush=function(){return void 0===d?l:j(r())},E}},function(e,t,n){var i=n(738);e.exports=function(){return i.Date.now()}},function(e,t,n){n(1),n(22),n(14),n(1),n(22),n(14);var i=n(1027),r=/^\s+/;e.exports=function(e){return e?e.slice(0,i(e)+1).replace(r,""):e}},function(e,t){var n=/\s/;e.exports=function(e){for(var t=e.length;t--&&n.test(e.charAt(t)););return t}},function(e,t,n){var i=n(818),r=n(1029)((function(e,t,n){i(e,n,t)}));e.exports=r},function(e,t,n){var i=n(1030),r=n(1031),o=n(759),a=n(734);e.exports=function(e,t){return function(n,s){var c=a(n)?i:r,u=t?t():{};return c(n,e,o(s,2),u)}}},function(e,t){e.exports=function(e,t,n,i){for(var r=-1,o=null==e?0:e.length;++r<o;){var a=e[r];t(i,a,n(a),e)}return i}},function(e,t,n){var i=n(777);e.exports=function(e,t,n,r){return i(e,(function(e,i,o){t(r,e,n(e),o)})),r}},function(e,t,n){var i=n(777),r=n(749);e.exports=function(e,t){var n=-1,o=r(e)?Array(e.length):[];return i(e,(function(e,i,r){o[++n]=t(e,i,r)})),o}},function(e,t,n){e.exports={__depends__:[n(1034),n(757).default],__init__:["customElementsPropertiesActivator","elementTemplatesLoader"],customElementsPropertiesActivator:["type",n(1042)],elementTemplates:["type",n(1043)],elementTemplatesLoader:["type",n(1046)]}},function(e,t,n){"use strict";var i=n(1035),r=n(736).getTemplate,o=n(736).getDefaultTemplate;function a(e,t,n,r){e.registerHandler("propertiesPanel.camunda.changeTemplate",i),n.on(["commandStack.shape.create.postExecuted"],(function(n){s(n.context.shape,t,e)})),n.on(["commandStack.connection.create.postExecuted"],(function(n){s(n.context.connection,t,e)}))}function s(e,t,n){if(!r(e,t)&&o(e,t)){var i={element:e,newTemplate:o(e,t)};n.execute("propertiesPanel.camunda.changeTemplate",i)}}a.$inject=["commandStack","elementTemplates","eventBus","elementRegistry"],e.exports={__init__:[a]}},function(e,t,n){"use strict";n(38),n(20),n(23),n(38),n(20),n(23);var i=n(736).findExtension,r=n(736).findExtensions,o=n(737).createCamundaProperty,a=n(737).createInputParameter,s=n(737).createOutputParameter,c=n(737).createCamundaIn,u=n(737).createCamundaOut,p=n(737).createCamundaInWithBusinessKey,l=n(737).createCamundaExecutionListenerScript,d=n(737).createCamundaFieldInjection,f=n(731),h=["camunda:class","camunda:delegateExpression","camunda:expression"];function m(e,t,n){function m(t){var i=t.businessObject.extensionElements;return i||(i=n.create("bpmn:ExtensionElements",{values:[]}),e.updateProperties(t,{extensionElements:i})),i}function v(e,r,o){var c,u=function(e,t){var n=[],i=[];if(e.properties.forEach((function(e){var r=e.binding,o=r.type;"camunda:inputParameter"===o&&n.push(a(r,e.value,t)),"camunda:outputParameter"===o&&i.push(s(r,e.value,t))})),i.length||n.length)return t.create("camunda:InputOutput",{inputParameters:n,outputParameters:i})}(r,n);u&&(o?t.execute("properties-panel.update-businessobject",{element:e,businessObject:o,properties:{inputOutput:u}}):(o=m(e),c=i(e,"camunda:InputOutput"),t.execute("properties-panel.update-businessobject-list",{element:e,currentObject:o,propertyName:"values",objectsToAdd:[u],objectsToRemove:c?[c]:[]})))}function b(e,i,o){var a,s=function(e,t){var n=[];if(e.properties.forEach((function(e){var i=e.binding;"camunda:field"===i.type&&n.push(d(i,e.value,t))})),n.length)return n}(i,n);s&&(o?t.execute("properties-panel.update-businessobject",{element:e,businessObject:o,properties:{field:s}}):(o=m(e),a=r(e,["camunda:Field"]),t.execute("properties-panel.update-businessobject-list",{element:e,currentObject:o,propertyName:"values",objectsToAdd:s,objectsToRemove:a||[]})))}function g(e,r,a){var s,c=function(e,t){var n=[];if(e.properties.forEach((function(e){var i=e.binding;"camunda:property"===i.type&&n.push(o(i,e.value,t))})),n.length)return t.create("camunda:Properties",{values:n})}(r,n);c&&(a?t.execute("properties-panel.update-businessobject",{element:e,businessObject:a,properties:{properties:c}}):(a=m(e),s=i(e,"camunda:Properties"),t.execute("properties-panel.update-businessobject-list",{element:e,currentObject:a,propertyName:"values",objectsToAdd:[c],objectsToRemove:s?[s]:[]})))}function y(i,r,o){var a=function(e,t){var n={};return e.properties.forEach((function(e){var i,r=e.binding,o=r.name;"property"===r.type&&(i="conditionExpression"===o?t.create("bpmn:FormalExpression",{body:e.value,language:r.scriptFormat}):e.value,n[o]=i,-1!==h.indexOf(o)&&h.forEach((function(e){e!==o&&(n[e]=void 0)})))})),n}(r,n);Object.keys(a).length&&(o?t.execute("properties-panel.update-businessobject",{element:i,businessObject:o,properties:a}):e.updateProperties(i,a))}function x(e,i,o){var a,s=function(e,t){var n=[];return e.properties.forEach((function(e){var i=e.binding,r=i.type;"camunda:in"===r?n.push(c(i,e.value,t)):"camunda:out"===r?n.push(u(i,e.value,t)):"camunda:in:businessKey"===r&&n.push(p(i,e.value,t))})),n}(i,n);s&&(o?t.execute("properties-panel.update-businessobject",{element:e,businessObject:o,properties:{inout:s}}):(o=m(e),a=r(o,["camunda:In","camunda:Out"]),t.execute("properties-panel.update-businessobject-list",{element:e,currentObject:o,propertyName:"values",objectsToAdd:s,objectsToRemove:a})))}function O(e,i,o){var a,s=function(e,t){var n=[];return e.properties.forEach((function(e){var i=e.binding;"camunda:executionListener"===i.type&&n.push(l(i,e.value,t))})),n}(i,n);s.length&&(o?t.execute("properties-panel.update-businessobject",{element:e,businessObject:o,properties:{executionListener:s}}):(o=m(e),a=r(o,["camunda:ExecutionListener"]),t.execute("properties-panel.update-businessobject-list",{element:e,currentObject:o,propertyName:"values",objectsToAdd:s,objectsToRemove:a})))}this.preExecute=function(r){var o=r.element,a=r.newTemplate;!function(t,n){e.updateProperties(t,{"camunda:modelerTemplate":n&&n.id})}(o,a),a&&(v(o,a),b(o,a),g(o,a),y(o,a),x(o,a),O(o,a),f(a.scopes,(function(e,r){!function(e,r,o){var a=n.create(r);v(e,o,a),b(e,o,a),g(e,o,a),y(e,o,a),x(e,o,a),O(e,o,a);var s=m(e),c=i(s,r);t.execute("properties-panel.update-businessobject-list",{element:e,currentObject:s,propertyName:"values",objectsToAdd:[a],objectsToRemove:c?[c]:[]})}(o,r,e)})))}}m.$inject=["modeling","commandStack","bpmnFactory"],e.exports=m},function(e,t,n){var i=n(759),r=n(749),o=n(745);e.exports=function(e){return function(t,n,a){var s=Object(t);if(!r(t)){var c=i(n,3);t=o(t),n=function(e){return c(s[e],e,s)}}var u=e(t,n,a);return u>-1?s[c?t[u]:u]:void 0}}},function(e,t,n){var i=n(865),r=n(759),o=n(872),a=Math.max;e.exports=function(e,t,n){var s=null==e?0:e.length;if(!s)return-1;var c=null==n?0:o(n);return c<0&&(c=a(s+c,0)),i(e,r(t,3),c)}},function(e,t,n){var i=n(869);e.exports=function(e){return e?(e=i(e))===1/0||e===-1/0?17976931348623157e292*(e<0?-1:1):e==e?e:0:0===e?e:0}},function(e,t,n){var i=n(873),r=n(818);e.exports=function(e,t,n,o){var a=!n;n||(n={});for(var s=-1,c=t.length;++s<c;){var u=t[s],p=o?o(n[u],e[u],u,n,e):void 0;void 0===p&&(p=e[u]),a?r(n,u,p):i(n,u,p)}return n}},function(e,t,n){var i=n(815),r=n(1041);e.exports=function(e){return i((function(t,n){var i=-1,o=n.length,a=o>1?n[o-1]:void 0,s=o>2?n[2]:void 0;for(a=e.length>3&&"function"==typeof a?(o--,a):void 0,s&&r(n[0],n[1],s)&&(a=o<3?void 0:a,o=1),t=Object(t);++i<o;){var c=n[i];c&&e(t,c,i,a)}return t}))}},function(e,t,n){var i=n(123).default,r=n(785),o=n(749),a=n(780),s=n(743);e.exports=function(e,t,n){if(!s(n))return!1;var c=i(t);return!!("number"==c?o(n)&&a(t,n.length):"string"==c&&t in n)&&r(n[t],e)}},function(e,t,n){"use strict";n(1),n(22),n(30),n(1),n(22),n(30);var i=n(722),r=n(736).getTemplate,o=n(874);function a(e,t){o.call(this,e,1100),this.isEntryVisible=function(e,n){var i=r(n,t);if(i&&!function(e,t){var n=e.id;if("elementTemplate-chooser"===n||u(e))return!0;var i=t.entriesVisible||c;if("boolean"==typeof i)return i;var r=i._all||!1,o=i[n];return!0===r&&!1!==o||!1===r&&!0===o}(e,i))return!1},this.isPropertyEditable=function(e,n,i){var o=r(i,t);if(o&&!function(e,t){var n;if(u(e))return(n=function(e,t){var n,i=t.id.replace("custom-"+e.id+"-","");if(-1!==i.indexOf("-")){var r=i.split("-");if(2==r.length){var o=r[0].replace(/_/g,":");if(n=parseInt(r[1],10),o&&!isNaN(n))return e.scopes[o].properties[n]}}else if(n=parseInt(i,10),!isNaN(n))return e.properties[n];throw new Error("cannot extract property index for entry <"+t.id+">")}(t,e))&&!1!==n.editable;return!0}(e,o))return!1}}a.$inject=["eventBus","elementTemplates"],i(a,o),e.exports=a;var s=/^custom-/,c={_all:!1,id:!0,name:!0};function u(e){return s.test(e.id)}},function(e,t,n){"use strict";n(20),n(20);var i=n(1044);e.exports=function(){this._templates={},this.set=function(e){var t=this._templates={};return e.forEach((function(e){t[e.id]=e})),this},this.get=function(e){return this._templates[e]},this.getAll=function(){return i(this._templates)}}},function(e,t,n){var i=n(1045),r=n(745);e.exports=function(e){return null==e?[]:i(e,r(e))}},function(e,t,n){var i=n(789);e.exports=function(e,t){return i(t,(function(t){return e[t]}))}},function(e,t,n){"use strict";var i=n(1047);function r(e,t,n){this._loadTemplates=e,this._eventBus=t,this._elementTemplates=n;var i=this;t.on("diagram.init",(function(){i.reload()}))}e.exports=r,r.$inject=["config.elementTemplates","eventBus","elementTemplates"],r.prototype.reload=function(){var e=this,t=this._loadTemplates;if(void 0!==t)return"function"==typeof t?t((function(t,n){if(t)return e.templateErrors([t]);e.setTemplates(n)})):t.length?this.setTemplates(t):void 0},r.prototype.setTemplates=function(e){var t=this._elementTemplates,n=(new i).addAll(e),r=n.getErrors(),o=n.getValidTemplates();t.set(o),r.length&&this.templateErrors(r),this.templatesChanged()},r.prototype.templatesChanged=function(){this._eventBus.fire("elementTemplates.changed")},r.prototype.templateErrors=function(e){this._eventBus.fire("elementTemplates.errors",{errors:e})}},function(e,t,n){"use strict";n(20),n(43),n(35),n(23),n(20),n(43),n(35),n(23);var i=n(734),r=n(743),o=["String","Text","Boolean","Hidden","Dropdown"],a=["property","camunda:property","camunda:inputParameter","camunda:outputParameter","camunda:in","camunda:out","camunda:in:businessKey","camunda:executionListener","camunda:field"];function s(e){return"name"in e&&"value"in e}e.exports=function(){this._templatesById={},this._validTemplates=[],this._errors=[],this.addAll=function(e){return i(e)?e.forEach(this.add,this):this._logError("templates must be []"),this},this.add=function(e){return this._validateTemplate(e)||(this._templatesById[e.id]=e,this._validTemplates.push(e)),this},this._validateTemplate=function(e){var t,n=e.id,r=e.appliesTo,o=e.properties,a=e.scopes;return n?n in this._templatesById?this._logError("template id <"+n+"> already used"):(i(r)||(t=this._logError("missing appliesTo=[]",e)),i(o)?this._validateProperties(o)||(t=new Error("invalid properties")):t=this._logError("missing properties=[]",e),a&&(t=this._validateScopes(e,a)),t):this._logError("missing template id")},this._validateScopes=function(e,t){var n,o,a;if(!r(t)||i(t))return this._logError("invalid scopes, should be scopes={}",e);for(a in t)o=t[a],r(o)&&!i(o)||(n=this._logError("invalid scope, should be scope={}",e)),i(o.properties)?this._validateProperties(o.properties)||(n=new Error("invalid properties in scope <"+a+">")):n=this._logError("missing properties=[] in scope <"+a+">",e);return n},this._validateProperties=function(e){var t=e.filter(this._validateProperty,this);return e.length===t.length},this._validateProperty=function(e){var t,n=e.type,r=e.binding,c=r.type;return-1===o.indexOf(n)&&(t=this._logError("invalid property type <"+n+">; must be any of { "+o.join(", ")+" }")),"Dropdown"===n&&"camunda:executionListener"!==c&&(i(e.choices)?e.choices.every(s)||(t=this._logError("{ name, value } must be specified for Dropdown choices")):t=this._logError("must provide choices=[] with Dropdown type")),r?(-1===a.indexOf(c)&&(t=this._logError("invalid property.binding type <"+c+">; must be any of { "+a.join(", ")+" }")),"property"!==c&&"camunda:property"!==c&&"camunda:inputParameter"!==c&&"camunda:field"!==c||r.name||(t=this._logError("property.binding <"+c+"> requires name")),"camunda:outputParameter"===c&&(r.source||(t=this._logError("property.binding <"+c+"> requires source"))),"camunda:in"===c&&(r.variables||r.target||(t=this._logError("property.binding <"+c+"> requires variables or target"))),"camunda:out"===c&&(r.variables||r.source||r.sourceExpression||(t=this._logError("property.binding <"+c+"> requires variables, sourceExpression or source"))),"camunda:executionListener"===c&&"Hidden"!==n&&(t=this._logError("invalid property type <"+n+"> for camunda:executionListener; must be <Hidden>")),!t):this._logError("property missing binding")},this._logError=function(e,t){return"string"==typeof e&&(t&&(e="template(id: "+t.id+") "+e),e=new Error(e)),this._errors.push(e),e},this.getErrors=function(){return this._errors},this.getValidTemplates=function(){return this._validTemplates}}},function(e,t,n){"use strict";n(20),n(20);var i=n(722),r=n(874),o=n(820),a=n(746),s=n(720).is,c=n(1049),u=n(1073),p=n(1080),l=n(1081),d=n(1082),f=n(1083),h=n(1085),m=n(1086),v=n(1090),b=n(1091),g=n(1092),y=n(1093),x=n(1095),O=n(1096),j=n(1097),E=n(1099),_=n(1101),w=n(1102),S=n(1103),T=n(1104),P=n(1106),C=n(1107),A=n(1108),R=n(1109),k=n(1110),B=n(1111),M=n(1112),D=n(1113),N=n(1114),L=n(1115),I=n(1116),F=n(1118),z=n(1120),V=n(1122),$=n(1124),H=n(1126),G=n(720).getBusinessObject,W=n(747),q=n(746),U=function(e){var t=G(e);if(s(e,"bpmn:Process")||s(e,"bpmn:Participant")&&t.get("processRef"))return!0;var n=a.getServiceTaskLikeBusinessObject(e),i="external"===a.getImplementationType(n);return!!a.isExternalCapable(n)&&i},K=function(e){var t=G(e);if(s(e,"bpmn:Process")||s(e,"bpmn:Participant")&&t.get("processRef"))return!0;var n=G(e);return!(!o.isAsyncBefore(n)&&!o.isAsyncAfter(n))||!!s(e,"bpmn:Event")&&!!W.getTimerEventDefinition(e)},Y=function(e,t){return s(e,"camunda:InputParameter")?t("Input Parameter"):s(e,"camunda:OutputParameter")?t("Output Parameter"):""};function X(e,t,n,i,r,o){e=e.labelTarget||e;var a,E,w={id:"general",label:o("General"),entries:[]};s(e,"bpmn:Process")&&(a={description:"This maps to the process definition key."}),s(e,"bpmn:UserTask")&&(a={description:"This maps to the task definition key."}),s(e,"bpmn:Participant")&&(E={processIdDescription:"This maps to the process definition key."}),console.log("---"),d(w,e,o,a),f(w,e,n,t,o),c(w,e,o,E),S(w,e,o),h(w,e,o),A(w,e,r,o);var T=R(e,r,n,o),P={id:"details",label:o("Details"),entries:[]};m(P,e,n,o),v(P,e,o),O(P,e,n,o),p(P,e,o),g(P,e,n,o),u(P,e,n,i,o),j(P,e,n,o),x(P,e,n,o),_(P,e,o);var C={id:"multiInstance",label:o("Multi Instance"),entries:[]};y(C,e,n,o);var k={id:"async",label:o("Asynchronous Continuations"),entries:[]};b(k,e,n,o);var B={id:"jobConfiguration",label:o("Job Configuration"),entries:[],enabled:K};I(B,e,n,o);var M={id:"externalTaskConfiguration",label:o("External Task Configuration"),entries:[],enabled:U};$(M,e,n,o);var D={id:"candidateStarterConfiguration",label:o("Candidate Starter Configuration"),entries:[]};z(D,e,n,o);var N={id:"historyConfiguration",label:o("History Configuration"),entries:[]};F(N,e,n,o);var L={id:"tasklist",label:o("Tasklist Configuration"),entries:[]};V(L,e,n,o);var H={id:"documentation",label:o("Documentation"),entries:[]};l(H,e,n,o);var G=[];return G.push(w),T.forEach((function(e){G.push(e)})),G.push(P),G.push(M),G.push(C),G.push(k),G.push(B),G.push(D),G.push(N),G.push(L),G.push(H),G}function J(e,t,n,i){var r={id:"variables",label:i("Variables"),entries:[]};return w(r,e,t,i),[r]}function Z(e,t,n,i){var r={id:"forms",label:i("Forms"),entries:[]};return E(r,e,t,i),[r]}function Q(e,t,n,i){var r={id:"listeners",label:i("Listeners"),entries:[]},o=T(r,e,t,i),a={id:"listener-details",entries:[],enabled:function(e,t){return o.getSelectedListener(e,t)},label:function(e,t){return function(e,t){return s(e,"camunda:ExecutionListener")?t("Execution Listener"):s(e,"camunda:TaskListener")?t("Task Listener"):""}(o.getSelectedListener(e,t),i)}};P(a,e,t,o,i);var c={id:"listener-fields",label:i("Field Injection"),entries:[],enabled:function(e,t){return o.getSelectedListener(e,t)}};return C(c,e,t,o,i),[r,a,c]}function ee(e,t,n,i){var r={id:"input-output",label:i("Parameters"),entries:[]},o=k(r,e,t,i),a={id:"input-output-parameter",entries:[],enabled:function(e,t){return o.getSelectedParameter(e,t)},label:function(e,t){var n=o.getSelectedParameter(e,t);return Y(n,i)}};return B(a,e,t,o,i),[r,a]}function te(e,t,n,i){var r={id:"connector-details",label:i("Details"),entries:[]};M(r,e,t,i);var o={id:"connector-input-output",label:i("Input/Output"),entries:[]},a=D(o,e,t,i),s={id:"connector-input-output-parameter",entries:[],enabled:function(e,t){return a.getSelectedParameter(e,t)},label:function(e,t){var n=a.getSelectedParameter(e,t);return Y(n,i)}};return N(s,e,t,a,i),[r,o,s]}function ne(e,t,n,i){var r={id:"field-injections-properties",label:i("Field Injections"),entries:[]};return H(r,e,t,i),[r]}function ie(e,t,n,i){var r={id:"extensionElements-properties",label:i("Properties"),entries:[]};return L(r,e,t,i),[r]}function re(e,t,n,i,o,a){r.call(this,e),this.getTabs=function(e){console.log(e);var r={id:"general",label:a("General"),groups:X(e,t,n,i,o,a)},c={id:"variables",label:a("Variables"),groups:J(e,n,0,a)},u={id:"forms",label:a("Forms"),groups:Z(e,n,0,a)},p={id:"listeners",label:a("Listeners"),groups:Q(e,n,0,a),enabled:function(e){return!W.getLinkEventDefinition(e)||!s(e,"bpmn:IntermediateThrowEvent")&&W.getLinkEventDefinition(e)}},l={id:"input-output",label:a("Input/Output"),groups:ee(e,n,0,a)};return[r,c,{id:"connector",label:a("Connector"),groups:te(e,n,0,a),enabled:function(e){var t=q.getServiceTaskLikeBusinessObject(e);return t&&"connector"===q.getImplementationType(t)}},u,p,l,{id:"field-injections",label:a("Field Injections"),groups:ne(e,n,0,a)},{id:"extensionElements",label:a("Extensions"),groups:ie(e,n,0,a)}]}}re.$inject=["eventBus","canvas","bpmnFactory","elementRegistry","elementTemplates","translate"],i(re,r),e.exports=re},function(e,t,n){"use strict";var i=n(396).default;n(11),n(0),n(8),n(0),n(8);var r=n(720).is,o=n(725),a=n(888),s=n(720).getBusinessObject,c=n(889),u=n(729);e.exports=function(e,t,n,p){var l=s(t);console.log(i(e.entries));var d=p&&p.processIdDescription;if(r(t,"bpmn:Process")||r(t,"bpmn:Participant")&&l.get("processRef")){if(r(t,"bpmn:Participant")){var f=o.validationAwareTextField({id:"process-id",label:n("Process Id"),description:d&&n(d),modelProperty:"processId"});f.get=function(e){return{processId:a.getProcessBusinessObject(e,"id").id}},f.set=function(e,t){return a.modifyProcessBusinessObject(e,"id",{id:t.processId})},f.validate=function(e,t){var i=t.processId,r=s(e),o=u.isIdValid(r.processRef,i,n);return o?{processId:o}:{}},e.entries.push(f);var h=c(t,{id:"process-name",label:n("Process Name")})[0];h.get=function(e){return a.getProcessBusinessObject(e,"name")},h.set=function(e,t){return a.modifyProcessBusinessObject(e,"name",t)},e.entries.push(h)}var m=o.validationAwareTextField({id:"process-field",label:n("Process Field"),description:d&&n(d),modelProperty:"processField"});m.get=function(e){var t=a.getProcessBusinessObject(e,"field");return console.log("|||"),{processField:t.field}},m.set=function(e,t){return console.log(e,t),a.modifyProcessBusinessObject(e,"field",{field:t.processField})},m.validate=function(e,t){return{}},console.log(i(e.entries))}}},function(e,t,n){"use strict";n(6),n(10),n(6),n(10);var i=n(720).getBusinessObject,r=n(724),o=n(729).escapeHTML,a=n(755);e.exports=function(e,t){var n=t,s=n.id,c=e.label||s,u=!!e.disabled&&"function"==typeof e.disabled,p=!!e.hidden&&"function"==typeof e.hidden,l=e.description;return n.html='<input id="camunda-'+o(s)+'" type="checkbox" name="'+o(e.modelProperty)+'" '+(u?'data-disable="isDisabled"':"")+(p?'data-show="isHidden"':"")+' /><label for="camunda-'+o(s)+'" '+(u?'data-disable="isDisabled"':"")+(p?'data-show="isHidden"':"")+">"+o(c)+"</label>",l&&(n.html+=a(l)),n.get=function(t){var n=i(t),r={};return r[e.modelProperty]=n.get(e.modelProperty),r},n.set=function(t,n){var i={};return i[e.modelProperty]=!!n[e.modelProperty],r.updateProperties(t,i)},"function"==typeof e.set&&(n.set=e.set),"function"==typeof e.get&&(n.get=e.get),u&&(n.isDisabled=function(){return e.disabled.apply(n,arguments)}),p&&(n.isHidden=function(){return!e.hidden.apply(n,arguments)}),n.cssClasses=["bpp-checkbox"],n}},function(e,t,n){"use strict";n(6),n(10),n(6),n(10);var i=n(740),r=n(754),o=n(723).query,a=n(729).escapeHTML,s=n(876),c=n(755);e.exports=function(e){var t=e.selectOptions,n=e.modelProperty,u=e.customValue||"custom",p=e.customName||"custom "+n,l=e.description,d=i({},e);d.showCustomInput=function(t,n){var i=o('[data-entry="'+e.id+'"] select',n.parentNode);return!!i&&i.value===u},d.get=function(i,o){var a=e.get(i,o),s={};return function(e){return void 0!==e[n]&&!r(t,(function(t){return e[n]===t.value}))}(a)?(s[n]=u,s["custom-"+n]=a[n],s):(s[n]=a[n]||"",s)},d.set=function(t,i,r){var o={};return i[n]===u?o[n]=i["custom-"+n]||"":e.emptyParameter&&""===i[n]?o[n]=void 0:o[n]=i[n],e.set(t,o,r)},d.selectOptions.push({name:p,value:u});var f=i({},s(d,d));return f.html+='<div class="bpp-field-wrapper bpp-combo-input" data-show="showCustomInput"><input id="camunda-'+a(e.id)+'-input" type="text" name="custom-'+a(n)+'" /></div>',l&&(f.html+=c(l)),f}},function(e,t,n){"use strict";n(6),n(10),n(6),n(10);var i=n(729).escapeHTML,r=n(755);e.exports=function(e,t){var n=t,o=e.label||n.id,a=!!e.show&&"function"==typeof e.show,s=e.description;return n.html='<label for="camunda-'+i(n.id)+'" '+(a?'data-show="isShown"':"")+">"+o+'</label><div class="bpp-field-wrapper" '+(a?'data-show="isShown"':"")+'><div contenteditable="true" id="camunda-'+i(n.id)+'" name="'+i(e.modelProperty)+'" /></div>',s&&(n.html+=r(s)),a&&(n.isShown=function(){return e.show.apply(n,arguments)}),n.cssClasses=["bpp-textbox"],n}},function(e,t,n){"use strict";var i=n(875);e.exports=function(e,t){var n=e.modelProperty;t.get=function(t,i){var r=this.__lastInvalidValue;delete this.__lastInvalidValue;var o={};return o[n]=void 0!==r?r:e.getProperty(t,i),o},t.set=function(t,i,o){var a=r.apply(this,[t,i,o]),s=i[n];if(a&&a[n])return this.__lastInvalidValue=s,e.setProperty(t,{},o);var c={};return c[n]=s,e.setProperty(t,c,o)};var r=t.validate=function(t,i,r){var o=i[n]||this.__lastInvalidValue,a={};return a[n]=o,e.validate(t,a,r)};return i(e,t)}},function(e,t,n){"use strict";n(33),n(21),n(6),n(10),n(33),n(21),n(6),n(10);var i=n(729).escapeHTML,r=n(724),o=n(723).query,a=n(723).attr,s=n(723).closest,c=n(791),u=n(731),p=n(745),l=n(723).domify,d=n(755),f=n(870);function h(e,t){var n='<div class="bpp-field-wrapper bpp-table-row">';return n+=function(e,t){var n=e.length,r="";return u(e,(function(e){r+='<input class="bpp-table-row-columns-'+n+" "+(t?"bpp-table-row-removable":"")+'" id="camunda-table-row-cell-input-value" type="text" name="'+i(e)+'" />'})),r}(e,t),n+=t?'<button class="clear" data-action="deleteElement"><span>X</span></button>':"",n+="</div>"}function m(e){var t='<div class="bpp-field-wrapper bpp-table-row">';return t+=function(e){var t=e.length,n="";return u(e,(function(e){n+='<label class="bpp-table-row-columns-'+t+'">'+i(e)+"</label>"})),n}(e),t+="</div>"}function v(e,t,n,i,r){return c(n,(function(n,o){return!function(e,t,n,i,r,o){if(n&&!i)return!1;return p(n).concat(p(i)).every((function(a){var s=n[a]||void 0,c=i[a]||void 0;return!r(e,t,a,o)||s===c}))}(e,t,n,i[o],r,o)}))}function b(e){return s(e,"[data-entry]",!0)}function g(e){return o("div[data-list-entry-container]",e)}e.exports=function(e){var t=e.id,n=e.modelProperties,o=e.labels,c=e.description,p=m(o),y=e.getElements,x=e.removeElement,O="function"==typeof x,j=e.addElement,E="function"==typeof j,_=e.addLabel||"Add Value",w=e.updateElement,S="function"==typeof w,T=e.editable||function(){return!0},P=e.setControlValue,C=e.show,A="function"==typeof C,R=function(e,t){return function(e,t){return(e||[]).map((function(e){var n={};return u(t,(function(t){n[t]=e[t]||""})),n}))}(y(e,t),n)},k={id:t,html:(E?'<div class="bpp-table-add-row" '+(A?'data-show="show"':"")+"><label>"+i(_)+'</label><button class="add" data-action="addElement"><span>+</span></button></div>':"")+'<div class="bpp-table" data-show="showTable"><div class="bpp-field-wrapper bpp-table-row">'+p+"</div><div data-list-entry-container></div></div>"+(c?d(c):""),get:function(e,t){var i=R(e,t,this.__invalidValues),r=this.__invalidValues;return delete this.__invalidValues,u(r,(function(e,t){var r=i[t];u(n,(function(t){r[t]=e[t]}))})),i},set:function(t,n,i){var o=this.__action||{};if(delete this.__action,"delete-element"===o.id)return x(t,i,o.idx);if("add-element"===o.id)return j(t,i);if(S){var a=[],s=n;"function"!=typeof e.validate&&(s=v(t,i,n,R(t,i),T));var c=this;return u(s,(function(o){var s,u=n.indexOf(o);if("function"==typeof e.validate&&(s=e.validate(t,o,i,u)),s)c.__invalidValues=c.__invalidValues||{},c.__invalidValues[u]=o,a.push(r.updateProperties(t,{}));else{var p=w(t,o,i,u);p&&a.push(p)}})),a}},createListEntryTemplate:function(e,t,i){return h(n,O)},addElement:function(e,t,i,r){var o=l(h(n,O));return g(t).appendChild(o),this.__action={id:"add-element"},!0},deleteElement:function(e,t,n,i){var r=g(t),o=n.delegateTarget.parentNode,s=parseInt(a(o,"data-index"),10);return r.removeChild(o),this.__action={id:"delete-element",idx:s},!0},editable:function(e,t,n,i,r,o){var a=s(t,"[data-entry]");return T(e,a,i,o)},show:function(e,t,n,i){return t=b(t),C(e,t,n,i)},showTable:function(e,t,n,i){t=b(t);var r=R(e,t);return r&&r.length&&(!A||C(e,t,n,i))},validateListItem:function(t,n,i,r){if("function"==typeof e.validate)return e.validate(t,n,i,r)}};return P&&(k.setControlValue=function(e,t,n,i,r,o){var s,c,u=b(t),p=a(n,"readonly"),l=n.value;(void 0===r&&(r=""),p&&l===r)||(document.activeElement===n&&(s=f({start:(c=n).selectionStart,end:c.selectionEnd},l,r)),P(e,u,n,i,r,o),s&&function(e,t){e.selectionStart=t.start,e.selectionEnd=t.end}(n,s))}),k}},function(e,t,n){"use strict";e.exports=function(e){return{id:e.id,html:'<label data-value="label" data-show="showLabel" class="entry-label'+(e.divider?" divider":"")+'"></label>',get:function(t,n){return"function"==typeof e.get?e.get(t,n):{label:e.labelText}},showLabel:function(t,n){return"function"!=typeof e.showLabel||e.showLabel(t,n)}}}},function(e,t,n){"use strict";n(6),n(10),n(6),n(10);var i=n(729).escapeHTML,r=n(755),o=n(1057);e.exports=function(e){var t=e.id,n=e.label||t,a=e.showLink,s=e.handleClick,c=e.description;if(a&&"function"!=typeof a)throw new Error("options.showLink must be a function");if("function"!=typeof s)throw new Error("options.handleClick must be a function");var u={id:t};return u.html='<a data-action="handleClick" '+(a?'data-show="showLink" ':"")+'class="bpp-entry-link'+(e.cssClasses?" "+i(e.cssClasses):"")+'">'+i(n)+"</a>",c&&(u.html+=r(c)),u.handleClick=o(s,u),"function"==typeof a&&(u.showLink=function(){return a.apply(u,arguments)}),u}},function(e,t,n){var i=n(815),r=n(1058),o=n(823),a=n(793),s=i((function(e,t,n){var i=1;if(n.length){var c=a(n,o(s));i|=32}return r(e,i,t,n,c)}));s.placeholder={},e.exports=s},function(e,t,n){var i=n(877),r=n(1059),o=n(1060),a=n(879),s=n(1071),c=n(883),u=n(1072),p=n(886),l=n(887),d=n(872),f=Math.max;e.exports=function(e,t,n,h,m,v,b,g){var y=2&t;if(!y&&"function"!=typeof e)throw new TypeError("Expected a function");var x=h?h.length:0;if(x||(t&=-97,h=m=void 0),b=void 0===b?b:f(d(b),0),g=void 0===g?g:d(g),x-=m?m.length:0,64&t){var O=h,j=m;h=m=void 0}var E=y?void 0:c(e),_=[e,t,n,h,m,O,j,v,b,g];if(E&&u(_,E),e=_[0],t=_[1],n=_[2],h=_[3],m=_[4],!(g=_[9]=void 0===_[9]?y?0:e.length:f(_[9]-x,0))&&24&t&&(t&=-25),t&&1!=t)w=8==t||16==t?o(e,t,g):32!=t&&33!=t||m.length?a.apply(void 0,_):s(e,t,n,h);else var w=r(e,t,n);return l((E?i:p)(w,_),e,t)}},function(e,t,n){var i=n(792),r=n(738);e.exports=function(e,t,n){var o=1&t,a=i(e);return function t(){var i=this&&this!==r&&this instanceof t?a:e;return i.apply(o?n:this,arguments)}}},function(e,t,n){var i=n(816),r=n(792),o=n(879),a=n(882),s=n(823),c=n(793),u=n(738);e.exports=function(e,t,n){var p=r(e);return function r(){for(var l=arguments.length,d=Array(l),f=l,h=s(r);f--;)d[f]=arguments[f];var m=l<3&&d[0]!==h&&d[l-1]!==h?[]:c(d,h);if((l-=m.length)<n)return a(e,t,o,r.placeholder,void 0,d,m,void 0,void 0,n-l);var v=this&&this!==u&&this instanceof r?p:e;return i(v,this,d)}}},function(e,t){e.exports=function(e,t){for(var n=e.length,i=0;n--;)e[n]===t&&++i;return i}},function(e,t,n){var i=n(821),r=n(883),o=n(1063),a=n(1065);e.exports=function(e){var t=o(e),n=a[t];if("function"!=typeof n||!(t in i.prototype))return!1;if(e===n)return!0;var s=r(n);return!!s&&e===s[0]}},function(e,t,n){n(23),n(23);var i=n(1064),r=Object.prototype.hasOwnProperty;e.exports=function(e){for(var t=e.name+"",n=i[t],o=r.call(i,t)?n.length:0;o--;){var a=n[o],s=a.func;if(null==s||s==e)return a.name}return t}},function(e,t){e.exports={}},function(e,t,n){var i=n(821),r=n(884),o=n(822),a=n(734),s=n(752),c=n(1066),u=Object.prototype.hasOwnProperty;function p(e){if(s(e)&&!a(e)&&!(e instanceof i)){if(e instanceof r)return e;if(u.call(e,"__wrapped__"))return c(e)}return new r(e)}p.prototype=o.prototype,p.prototype.constructor=p,e.exports=p},function(e,t,n){var i=n(821),r=n(884),o=n(885);e.exports=function(e){if(e instanceof i)return e.clone();var t=new r(e.__wrapped__,e.__chain__);return t.__actions__=o(e.__actions__),t.__index__=e.__index__,t.__values__=e.__values__,t}},function(e,t,n){n(1),n(85),n(30),n(1),n(85),n(30);var i=/\{\n\/\* \[wrapped with (.+)\] \*/,r=/,? & /;e.exports=function(e){var t=e.match(i);return t?t[1].split(r):[]}},function(e,t,n){n(35),n(1),n(22),n(35),n(1),n(22);var i=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/;e.exports=function(e,t){var n=t.length;if(!n)return e;var r=n-1;return t[r]=(n>1?"& ":"")+t[r],t=t.join(n>2?", ":" "),e.replace(i,"{\n/* [wrapped with "+t+"] */\n")}},function(e,t,n){n(189),n(189);var i=n(804),r=n(817),o=[["ary",128],["bind",1],["bindKey",2],["curry",8],["curryRight",16],["flip",512],["partial",32],["partialRight",64],["rearg",256]];e.exports=function(e,t){return i(o,(function(n){var i="_."+n[0];t&n[1]&&!r(e,i)&&e.push(i)})),e.sort()}},function(e,t,n){var i=n(885),r=n(780),o=Math.min;e.exports=function(e,t){for(var n=e.length,a=o(t.length,n),s=i(e);a--;){var c=t[a];e[a]=r(c,n)?s[c]:void 0}return e}},function(e,t,n){var i=n(816),r=n(792),o=n(738);e.exports=function(e,t,n,a){var s=1&t,c=r(e);return function t(){for(var r=-1,u=arguments.length,p=-1,l=a.length,d=Array(l+u),f=this&&this!==o&&this instanceof t?c:e;++p<l;)d[p]=a[p];for(;u--;)d[p++]=arguments[++r];return i(f,s?n:this,d)}}},function(e,t,n){var i=n(880),r=n(881),o=n(793),a=Math.min;e.exports=function(e,t){var n=e[1],s=t[1],c=n|s,u=c<131,p=128==s&&8==n||128==s&&256==n&&e[7].length<=t[8]||384==s&&t[7].length<=t[8]&&8==n;if(!u&&!p)return e;1&s&&(e[2]=t[2],c|=1&n?0:4);var l=t[3];if(l){var d=e[3];e[3]=d?i(d,l,t[4]):l,e[4]=d?o(e[3],"__lodash_placeholder__"):t[4]}return(l=t[5])&&(d=e[5],e[5]=d?r(d,l,t[6]):l,e[6]=d?o(e[5],"__lodash_placeholder__"):t[6]),(l=t[7])&&(e[7]=l),128&s&&(e[8]=null==e[8]?t[8]:a(e[8],t[8])),null==e[9]&&(e[9]=t[9]),e[0]=t[0],e[1]=c,e}},function(e,t,n){"use strict";var i=n(720).is,r=n(730).isAny,o=n(720).getBusinessObject,a=n(747),s=n(731),c=n(1074),u=n(1075),p=n(1076),l=n(1077),d=n(890),f=n(1078),h=n(1079);e.exports=function(e,t,n,m,v){s(["bpmn:StartEvent","bpmn:EndEvent","bpmn:IntermediateThrowEvent","bpmn:BoundaryEvent","bpmn:IntermediateCatchEvent"],(function(r){if(i(t,r)){var o=a.getMessageEventDefinition(t),s=a.getSignalEventDefinition(t);o&&c(e,t,n,o,v),s&&u(e,t,n,s,v)}})),i(t,"bpmn:ReceiveTask")&&c(e,t,n,o(t),v);s(["bpmn:StartEvent","bpmn:BoundaryEvent","bpmn:EndEvent"],(function(r){if(i(t,r)){var o=a.getErrorEventDefinition(t);o&&p(e,t,n,o,v)}}));s(["bpmn:StartEvent","bpmn:BoundaryEvent","bpmn:IntermediateThrowEvent","bpmn:EndEvent"],(function(r){if(i(t,r)){var o=i(t,"bpmn:StartEvent")||i(t,"bpmn:BoundaryEvent"),s=a.getEscalationEventDefinition(t);s&&l(e,t,n,s,o,v)}}));s(["bpmn:StartEvent","bpmn:BoundaryEvent","bpmn:IntermediateCatchEvent"],(function(r){if(i(t,r)){var o=a.getTimerEventDefinition(t);o&&d(e,t,n,o,v)}}));s(["bpmn:EndEvent","bpmn:IntermediateThrowEvent"],(function(r){if(i(t,r)){var o=a.getCompensateEventDefinition(t);o&&f(e,t,n,o,m,v)}}));if(r(t,["bpmn:StartEvent","bpmn:BoundaryEvent","bpmn:IntermediateThrowEvent","bpmn:IntermediateCatchEvent"])){var b=a.getConditionalEventDefinition(t);b&&h(e,t,n,b,m,v)}}},function(e,t,n){"use strict";n(11),n(0),n(8),n(21),n(0),n(8),n(21);var i=n(794),r=n(764);e.exports=function(e,t,n,o,a){e.entries=e.entries.concat(i(t,o,n,{label:a("Message"),elementName:"message",elementType:"bpmn:Message",referenceProperty:"messageRef",newElementIdPrefix:"Message_"})),e.entries=e.entries.concat(r(t,o,n,{id:"message-element-name",label:a("Message Name"),referenceProperty:"messageRef",modelProperty:"name",shouldValidate:!0}))}},function(e,t,n){"use strict";n(11),n(0),n(8),n(21),n(0),n(8),n(21);var i=n(794),r=n(764);e.exports=function(e,t,n,o,a){e.entries=e.entries.concat(i(t,o,n,{label:a("Signal"),elementName:"signal",elementType:"bpmn:Signal",referenceProperty:"signalRef",newElementIdPrefix:"Signal_"})),e.entries=e.entries.concat(r(t,o,n,{id:"signal-element-name",label:a("Signal Name"),referenceProperty:"signalRef",modelProperty:"name",shouldValidate:!0}))}},function(e,t,n){"use strict";n(11),n(0),n(8),n(21),n(0),n(8),n(21);var i=n(794),r=n(764);e.exports=function(e,t,n,o,a){e.entries=e.entries.concat(i(t,o,n,{label:a("Error"),elementName:"error",elementType:"bpmn:Error",referenceProperty:"errorRef",newElementIdPrefix:"Error_"})),e.entries=e.entries.concat(r(t,o,n,{id:"error-element-name",label:a("Error Name"),referenceProperty:"errorRef",modelProperty:"name",shouldValidate:!0})),e.entries=e.entries.concat(r(t,o,n,{id:"error-element-code",label:a("Error Code"),referenceProperty:"errorRef",modelProperty:"errorCode"}))}},function(e,t,n){"use strict";n(11),n(0),n(8),n(21),n(0),n(8),n(21);var i=n(725),r=n(724),o=n(794),a=n(764);e.exports=function(e,t,n,s,c,u){e.entries=e.entries.concat(o(t,s,n,{label:u("Escalation"),elementName:"escalation",elementType:"bpmn:Escalation",referenceProperty:"escalationRef",newElementIdPrefix:"Escalation_"})),e.entries=e.entries.concat(a(t,s,n,{id:"escalation-element-name",label:u("Escalation Name"),referenceProperty:"escalationRef",modelProperty:"name",shouldValidate:!0})),e.entries=e.entries.concat(a(t,s,n,{id:"escalation-element-code",label:u("Escalation Code"),referenceProperty:"escalationRef",modelProperty:"escalationCode"})),c&&e.entries.push(i.textField({id:"escalationCodeVariable",label:u("Escalation Code Variable"),modelProperty:"escalationCodeVariable",get:function(e){return{escalationCodeVariable:s.get("camunda:escalationCodeVariable")}},set:function(e,t){return r.updateBusinessObject(e,s,{"camunda:escalationCodeVariable":t.escalationCodeVariable||void 0})}}))}},function(e,t,n){"use strict";n(21),n(23),n(11),n(0),n(8),n(21),n(23),n(0),n(8);var i=n(725),r=n(724),o=n(747),a=n(729),s=n(720).getBusinessObject,c=n(720).is,u=n(731),p=n(754),l=n(791);function d(e,t){return a.filterElementsByType(e.flowElements,t)}function f(e,t){return c(e,"bpmn:SubProcess")&&!e.triggeredByEvent||c(e,"bpmn:CallActivity")||function(e,t){var n=e.id;return!!p(t,(function(e){var t=o.getCompensateEventDefinition(e),i=e.attachedToRef;return t&&i&&i.id===n}))}(e,t)}function h(e){var t=function(e){return d(e,"bpmn:BoundaryEvent")}(e);return l(function(e){return d(e,"bpmn:Activity")}(e),(function(e){return f(e,t)}))}function m(e){var t=[{value:""}],n=function(e){var t=s(e).$parent,n=h(t);return c(t,"bpmn:SubProcess")&&t.triggeredByEvent&&(t=t.$parent)&&(n=n.concat(h(t))),n}(e);return u(n,(function(e){var n=e.id,i=(e.name?e.name+" ":"")+"(id="+n+")";t.push({value:n,name:i})})),t}e.exports=function(e,t,n,o,a,c){e.entries.push(i.checkbox({id:"wait-for-completion",label:c("Wait for Completion"),modelProperty:"waitForCompletion",get:function(e,t){return{waitForCompletion:o.waitForCompletion}},set:function(e,t){return t.waitForCompletion=t.waitForCompletion||!1,r.updateBusinessObject(e,o,t)}})),e.entries.push(i.selectBox({id:"activity-ref",label:c("Activity Ref"),selectOptions:m(t),modelProperty:"activityRef",get:function(e,t){var n=o.activityRef;return{activityRef:(n=n&&n.id)||""}},set:function(e,t){var n=t.activityRef||void 0;return n=n&&s(a.get(n)),r.updateBusinessObject(e,o,{activityRef:n})}}))}},function(e,t,n){"use strict";n(11),n(0),n(8),n(0),n(8);var i=n(725),r=n(724),o=n(720).is,a=n(733).isEventSubProcess;e.exports=function(e,t,n,s,c,u){var p=function(e){return function(t){var n=s.get("camunda:"+e),i={};return i[e]=n,i}},l=function(e){return function(t,n){var i={};return i["camunda:"+e]=n[e]||void 0,r.updateBusinessObject(t,s,i)}};e.entries.push(i.textField({id:"variableName",label:u("Variable Name"),modelProperty:"variableName",get:p("variableName"),set:l("variableName")})),o(t,"bpmn:StartEvent")&&!a(t.parent)||e.entries.push(i.textField({id:"variableEvent",label:u("Variable Event"),description:u("Specify more than one variable change event as a comma separated list."),modelProperty:"variableEvent",get:p("variableEvent"),set:l("variableEvent")}))}},function(e,t,n){"use strict";n(11),n(0),n(8),n(0),n(8);var i=n(720).is,r=n(720).getBusinessObject,o=n(725),a=n(724),s=n(731);e.exports=function(e,t,n){s(["bpmn:IntermediateThrowEvent","bpmn:IntermediateCatchEvent"],(function(c){if(i(t,c)){var u=function(e){var t=r(e),n=null;return t.eventDefinitions&&s(t.eventDefinitions,(function(e){i(e,"bpmn:LinkEventDefinition")&&(n=e)})),n}(t);if(u){var p=o.textField({id:"link-event",label:n("Link Name"),modelProperty:"link-name"});p.get=function(){return{"link-name":u.get("name")}},p.set=function(e,t){var n={name:t["link-name"]};return a.updateBusinessObject(e,u,n)},e.entries.push(p)}}}))}},function(e,t,n){"use strict";n(11),n(0),n(8),n(0),n(8);var i=n(725),r=n(724),o=n(720),a=o.is,s=o.getBusinessObject;e.exports=function(e,t,n,o){var c,u=function(e){return function(t){var n=e&&e.get("documentation");return{documentation:n&&n.length>0?n[0].text:""}}},p=function(e){return function(t,i){var o=[];return void 0!==i.documentation&&""!==i.documentation&&o.push(n.create("bpmn:Documentation",{text:i.documentation})),r.setList(t,e,"documentation",o)}},l=i.textBox({id:"documentation",label:o("Element Documentation"),modelProperty:"documentation"});if(l.set=p(s(t)),l.get=u(s(t)),e.entries.push(l),a(t,"bpmn:Participant")&&(c=s(t).processRef)){var d=i.textBox({id:"process-documentation",label:o("Process Documentation"),modelProperty:"documentation"});d.set=p(c),d.get=u(c),e.entries.push(d)}}},function(e,t,n){"use strict";n(6),n(10),n(11),n(0),n(8),n(6),n(10),n(0),n(8);var i=n(725),r=n(720).getBusinessObject,o=n(729),a=n(724);e.exports=function(e,t,n,s){var c=s&&s.description;e.entries.push(i.validationAwareTextField({id:"id",label:n("Id"),description:c&&n(c),modelProperty:"id",getProperty:function(e){return r(e).id},setProperty:function(e,t){return e=e.labelTarget||e,a.updateProperties(e,t)},validate:function(e,t){var i=t.id,a=r(e),s=o.isIdValid(a,i,n);return s?{id:s}:{}}}))}},function(e,t,n){"use strict";var i=n(396).default;n(11),n(0),n(8),n(21),n(0),n(8),n(21);var r=n(889),o=n(1084).createCategoryValue,a=n(720).is,s=n(720).getBusinessObject;e.exports=function(e,t,n,c,u){var p;(console.log(i(e.entries)),a(t,"bpmn:Collaboration"))||(a(t,"bpmn:TextAnnotation")?p={modelProperty:"text",label:u("Text")}:a(t,"bpmn:Group")&&(p={modelProperty:"categoryValue",label:u("Category Value"),get:function(e){return{categoryValue:(s(e).categoryValueRef||{}).value}},set:function(e,t){var i,r,a,u,p=s(e);return p.categoryValueRef||(i=p,r=c.getRootElement(),a=s(r).$parent,u=o(a,n),i.categoryValueRef=u),{cmd:"element.updateLabel",context:{element:e,newLabel:t.categoryValue}}}}),e.entries=e.entries.concat(r(t,p,u)))}},function(e,t,n){"use strict";var i=n(735).add,r=n(720).getBusinessObject,o={};e.exports=o,o.createCategoryValue=function(e,t){var n=t.create("bpmn:CategoryValue"),o=t.create("bpmn:Category",{categoryValue:[n]});return i(e.get("rootElements"),o),r(o).$parent=e,r(n).$parent=o,n}},function(e,t,n){"use strict";n(11),n(0),n(8),n(0),n(8);var i=n(720).is,r=n(720).getBusinessObject,o=n(725),a=n(888);e.exports=function(e,t,n){var s=r(t);if(s&&(i(t,"bpmn:Process")||i(t,"bpmn:Participant")&&s.get("processRef"))){var c=o.checkbox({id:"process-is-executable",label:n("Executable"),modelProperty:"isExecutable"});i(t,"bpmn:Participant")&&(c.get=function(e){return a.getProcessBusinessObject(e,"isExecutable")},c.set=function(e,t){return a.modifyProcessBusinessObject(e,"isExecutable",t)}),e.entries.push(c)}}},function(e,t,n){"use strict";n(11),n(0),n(8),n(21),n(208),n(0),n(8),n(21),n(208);var i=n(746),r=n(795),o=n(729),a=o.escapeHTML,s=o.triggerClickEvent,c=n(1087),u=n(1088),p=n(1089),l=n(891),d=n(892),f=n(725),h=n(723).query,m=n(723).closest,v=n(723).classes;function b(e){return i.getImplementationType(e)}function g(e){return i.getServiceTaskLikeBusinessObject(e)}e.exports=function(e,t,n,o){if(function(e){return i.isServiceTaskLike(e)}(g(t))){var y=function(e){return i.isDmnCapable(e)}(t),x=function(e){return i.isExternalCapable(e)}(g(t));e.entries=e.entries.concat(c(t,n,{getBusinessObject:g,getImplementationType:b,hasDmnSupport:y,hasExternalSupport:x,hasServiceTaskLikeSupport:!0},o)),e.entries=e.entries.concat(u(t,n,{getBusinessObject:g,getImplementationType:b},o)),e.entries=e.entries.concat(d(t,n,{getBusinessObject:g,getImplementationType:b,hideResultVariable:function(e,t){return"expression"!==b(e)}},o)),x&&(e.entries=e.entries.concat(p(t,n,{getBusinessObject:g,getImplementationType:b},o))),y&&(e.entries=e.entries.concat(l(t,n,{getCallableType:b},o)));e.entries.push(f.link({id:"configureConnectorLink",label:o("Configure Connector"),handleClick:function(e,t,n){var i,r,o=(i="connector",r=m(t,".bpp-properties-panel"),h('a[data-tab-target="'+i+'"]',r));return o&&s(o),!1},showLink:function(e,t){var n=h("a",t);return n.textContent="",v(n).remove("bpp-error-message"),!!function(e){return"connector"===b(e)}(e)&&(r.getConnector(e).get("connectorId")?n.textContent=o("Configure Connector"):(n.innerHTML='<span class="bpp-icon-warning"></span> '+a(o("Must configure Connector")),v(n).add("bpp-error-message")),!0)}}))}}},function(e,t,n){"use strict";n(21),n(21);var i=n(725),r=n(724),o=n(739),a=n(732),s=n(740),c=n(819),u=["class","expression","delegateExpression"],p={"camunda:class":void 0,"camunda:expression":void 0,"camunda:delegateExpression":void 0,"camunda:resultVariable":void 0},l={"camunda:decisionRef":void 0,"camunda:decisionRefBinding":"latest","camunda:decisionRefVersion":void 0,"camunda:mapDecisionResult":"resultList","camunda:decisionRefTenantId":void 0},d={"camunda:type":void 0,"camunda:topic":void 0};e.exports=function(e,t,n,f){var h=[{value:"class",name:f("Java Class")},{value:"expression",name:f("Expression")},{value:"delegateExpression",name:f("Delegate Expression")}],m=[{value:"dmn",name:f("DMN")}],v=[{value:"external",name:f("External")}],b=[{value:"connector",name:f("Connector")}],g=[{value:"script",name:f("Script")}],y=n.getImplementationType,x=n.getBusinessObject,O=n.hasDmnSupport,j=n.hasExternalSupport,E=n.hasServiceTaskLikeSupport,_=n.hasScriptSupport,w=[],S=h.concat([]);return O&&(S=S.concat(m)),j&&(S=S.concat(v)),E&&(S=S.concat(b)),_&&(S=S.concat(g)),S.push({value:""}),w.push(i.selectBox({id:"implementation",label:f("Implementation"),selectOptions:S,modelProperty:"implType",get:function(e,t){return{implType:y(e)||""}},set:function(e,n,i){var f=x(e),h=y(e),m=n.implType,v=s({},p);if(-1!==u.indexOf(m)){var b="";-1!==u.indexOf(h)&&(b=f.get("camunda:"+h)),v["camunda:"+m]=b}O&&(v=s(v,l),"dmn"===m&&(v["camunda:decisionRef"]="")),j&&(v=s(v,d),"external"===m&&(v["camunda:type"]="external",v["camunda:topic"]="")),_&&(v["camunda:script"]=void 0,"script"===m&&(v["camunda:script"]=a.createElement("camunda:Script",{},f,t)));var g=[];if(g.push(r.updateBusinessObject(e,f,v)),E){var w=o.getExtensionElements(f,"camunda:Connector");if(g.push(c(w,(function(t){return o.removeEntry(f,e,t)}))),"connector"===m){var S=f.get("extensionElements");S||(S=a.createElement("bpmn:ExtensionElements",{values:[]},f,t),g.push(r.updateBusinessObject(e,f,{extensionElements:S})));var T=a.createElement("camunda:Connector",{},S,t);g.push(r.addAndRemoveElementsFromList(e,S,"values","extensionElements",[T],[]))}}return g}})),w}},function(e,t,n){"use strict";var i=n(725),r=n(724),o=["class","expression","delegateExpression"],a={class:"camunda:class",expression:"camunda:expression",delegateExpression:"camunda:delegateExpression"};function s(e){return-1!==o.indexOf(e)}function c(e){return a[e]}e.exports=function(e,t,n,o){var a=n.getImplementationType,u=n.getBusinessObject;return[i.textField({id:"delegate",label:o("Value"),dataValueLabel:"delegationLabel",modelProperty:"delegate",get:function(e,t){var n=u(e),i=a(e),r=c(i),s=function(e){switch(e){case"class":return o("Java Class");case"expression":return o("Expression");case"delegateExpression":return o("Delegate Expression");default:return""}}(i);return{delegate:n.get(r),delegationLabel:s}},set:function(e,t,n){var i=u(e),o={};return o[c(a(e))]=t.delegate||"",r.updateBusinessObject(e,i,o)},validate:function(e,t,n){return s(a(e))&&!t.delegate?{delegate:o("Must provide a value")}:{}},hidden:function(e,t){return!s(a(e))}})]}},function(e,t,n){"use strict";var i=n(725),r=n(724);e.exports=function(e,t,n,o){var a=n.getImplementationType,s=n.getBusinessObject;function c(e){return"external"===a(e)}return[i.textField({id:"externalTopic",label:o("Topic"),modelProperty:"externalTopic",get:function(e,t){return{externalTopic:s(e).get("camunda:topic")}},set:function(e,t,n){var i=s(e);return r.updateBusinessObject(e,i,{"camunda:topic":t.externalTopic})},validate:function(e,t,n){return c(e)&&!t.externalTopic?{externalTopic:o("Must provide a value")}:{}},hidden:function(e,t){return!c(e)}})]}},function(e,t,n){"use strict";n(11),n(0),n(8),n(0),n(8);var i=n(720).is,r=n(725);e.exports=function(e,t,n){i(t,"camunda:Assignable")&&(e.entries.push(r.textField({id:"assignee",label:n("Assignee"),modelProperty:"assignee"})),e.entries.push(r.textField({id:"candidateUsers",label:n("Candidate Users"),modelProperty:"candidateUsers"})),e.entries.push(r.textField({id:"candidateGroups",label:n("Candidate Groups"),modelProperty:"candidateGroups"})),e.entries.push(r.textField({id:"assigneePage",label:n("Assignee Page"),modelProperty:"camunda:assigneePage"})),e.entries.push(r.textField({id:"taskRight",label:n("taskRight"),modelProperty:"camunda:taskRight"})),e.entries.push(r.textField({id:"arrivalEvent",label:n("arrivalEvent"),modelProperty:"camunda:arrivalEvent"})),e.entries.push(r.textField({id:"finishEvent",label:n("finishEvent"),modelProperty:"camunda:finishEvent"})),e.entries.push(r.textField({id:"dueDate",description:n("The due date as an EL expression (e.g. ${someDate} or an ISO date (e.g. 2015-06-26T09:54:00)"),label:n("Due Date"),modelProperty:"dueDate"})),e.entries.push(r.textField({id:"followUpDate",description:n("The follow up date as an EL expression (e.g. ${someDate} or an ISO date (e.g. 2015-06-26T09:54:00)"),label:n("Follow Up Date"),modelProperty:"followUpDate"})),e.entries.push(r.textField({id:"priority",label:n("Priority"),modelProperty:"priority"})))}},function(e,t,n){"use strict";n(11),n(0),n(8),n(21),n(0),n(8),n(21);var i=n(720).getBusinessObject,r=n(720).is,o=n(893);e.exports=function(e,t,n,a){r(t,"camunda:AsyncCapable")&&(e.entries=e.entries.concat(o(t,n,{getBusinessObject:i},a)))}},function(e,t,n){"use strict";n(11),n(0),n(8),n(0),n(8);var i=n(720).getBusinessObject,r=n(720).is,o=n(725),a=n(891),s=n(724),c=n(871),u=n(740);function p(e){var t=i(e),n=t.get("calledElement"),r=t.get("camunda:caseRef"),o="";return void 0!==n?o="bpmn":void 0!==r&&(o="cmmn"),o}var l={calledElement:void 0,"camunda:calledElementBinding":"latest","camunda:calledElementVersion":void 0,"camunda:calledElementTenantId":void 0,"camunda:variableMappingClass":void 0,"camunda:variableMappingDelegateExpression":void 0,"camunda:caseRef":void 0,"camunda:caseBinding":"latest","camunda:caseVersion":void 0,"camunda:caseTenantId":void 0};e.exports=function(e,t,n,i){r(t,"camunda:CallActivity")&&(e.entries.push(o.selectBox({id:"callActivity",label:i("CallActivity Type"),selectOptions:[{name:"BPMN",value:"bpmn"},{name:"CMMN",value:"cmmn"}],emptyParameter:!0,modelProperty:"callActivityType",get:function(e,t){return{callActivityType:p(e)}},set:function(e,t,n){var i=t.callActivityType,r=u({},l);return"bpmn"===i?r.calledElement="":"cmmn"===i&&(r["camunda:caseRef"]=""),s.updateProperties(e,r)}})),e.entries.push(a(t,n,{getCallableType:p},i)),e.entries=c(e.entries))}},function(e,t,n){"use strict";n(11),n(0),n(8),n(21),n(0),n(8),n(21);var i=n(720).getBusinessObject,r=n(720).is,o=n(1094),a=n(894),s=n(893);function c(e){return i(e).loopCharacteristics}e.exports=function(e,t,n,i){(function(e){var t=c(e);return!!t&&r(t,"camunda:Collectable")})(t)&&(e.entries=e.entries.concat(o(t,n,i)),e.entries=e.entries.concat(s(t,n,{getBusinessObject:c,idPrefix:"multiInstance-",labelPrefix:i("Multi Instance ")},i)),e.entries=e.entries.concat(a(t,n,{getBusinessObject:c,idPrefix:"multiInstance-",labelPrefix:i("Multi Instance ")},i)))}},function(e,t,n){"use strict";var i=n(720).getBusinessObject,r=n(729).escapeHTML,o=n(725),a=n(732),s=n(724),c=n(723).classes;function u(e,t){var n=l(e);return n&&n.get(t)}function p(e){return e&&e.get("body")}function l(e){return i(e).loopCharacteristics}function d(e){return p(function(e){return u(e,"loopCardinality")}(e))}function f(e){return p(function(e){return u(e,"completionCondition")}(e))}function h(e){return u(e,"camunda:collection")}function m(e){return u(e,"camunda:elementVariable")}function v(e,t,n,i){var r=l(e),o={};if(!n)return o[t]=void 0,s.updateBusinessObject(e,r,o);var c=r.get(t);return c?s.updateBusinessObject(e,c,{body:n}):(o[t]=function(e,t,n){return a.createElement("bpmn:FormalExpression",{body:t},e,n)}(r,n,i),s.updateBusinessObject(e,r,o))}e.exports=function(e,t,n){var i=[];return i.push({id:"multiInstance-errorMessage",html:'<div data-show="isValid"><span class="bpp-icon-warning"></span> '+r(n("Must provide either loop cardinality or collection"))+"</div>",isValid:function(e,t,n,i){var r=!0;if(l(e)){var o=d(e),a=h(e);r=!o&&!a}return c(t).toggle("bpp-hidden",!r),c(n).toggle("bpp-error-message",r),r}}),i.push(o.textField({id:"multiInstance-loopCardinality",label:n("Loop Cardinality"),modelProperty:"loopCardinality",get:function(e,t){return{loopCardinality:d(e)}},set:function(e,n){return v(e,"loopCardinality",n.loopCardinality,t)}})),i.push(o.textField({id:"multiInstance-collection",label:n("Collection"),modelProperty:"collection",get:function(e,t){return{collection:h(e)}},set:function(e,t){var n=l(e);return s.updateBusinessObject(e,n,{"camunda:collection":t.collection||void 0})},validate:function(e,t,n){var i=h(e),r=m(e);if(!i&&r)return{collection:"Must provide a value"}}})),i.push(o.textField({id:"multiInstance-elementVariable",label:n("Element Variable"),modelProperty:"elementVariable",get:function(e,t){return{elementVariable:m(e)}},set:function(e,t){var n=l(e);return s.updateBusinessObject(e,n,{"camunda:elementVariable":t.elementVariable||void 0})}})),i.push(o.textField({id:"multiInstance-completionCondition",label:n("Completion Condition"),modelProperty:"completionCondition",get:function(e){return{completionCondition:f(e)}},set:function(e,n){return v(e,"completionCondition",n.completionCondition,t)}})),i}},function(e,t,n){"use strict";n(11),n(0),n(8),n(0),n(8);var i=n(720).is,r=n(730).isAny,o=n(720).getBusinessObject,a=n(729).escapeHTML,s=n(723).query,c=n(724),u=n(732),p=n(747),l=n(796);e.exports=function(e,t,n,f){var h=o(t);if(h){var m=p.getConditionalEventDefinition(t);if(i(t,"bpmn:SequenceFlow")&&function(e){return r(e,d)}(t.source)||m){var v=l("language","body",!0,f);e.entries.push({id:"condition",label:f("Condition"),html:'<div class="bpp-row"><label for="cam-condition-type">'+a(f("Condition Type"))+'</label><div class="bpp-field-wrapper"><select id="cam-condition-type" name="conditionType" data-value><option value="expression">'+a(f("Expression"))+'</option><option value="script">'+a(f("Script"))+'</option><option value="" selected></option></select></div></div><div class="bpp-row"><label for="cam-condition" data-show="isExpression">'+a(f("Expression"))+'</label><div class="bpp-field-wrapper" data-show="isExpression"><input id="cam-condition" type="text" name="condition" /><button class="clear" data-action="clear" data-show="canClear"><span>X</span></button></div><div data-show="isScript">'+v.template+"</div></div>",get:function(e,t){var n=p.getConditionalEventDefinition(e),i=n?n.condition:h.conditionExpression,r={},o="";i&&(void 0!==i.language?(o="script",r=v.get(e,i)):(o="expression",r.condition=i.get("body")));return r.conditionType=o,r},set:function(e,t,i){var r,o=t.conditionType,a=[],s={body:void 0};if("script"===o)s=v.set(e,t,i);else{var p=t.condition;s.body=p}if(o){r=u.createElement("bpmn:FormalExpression",s,m||h,n);var l=e.source;l&&l.businessObject.default===h&&a.push(c.updateProperties(l,{default:void 0}))}var d=m?{condition:r}:{conditionExpression:r};return a.push(c.updateBusinessObject(e,m||h,d)),a},validate:function(e,t){var n={};return t.condition||"expression"!==t.conditionType?"script"===t.conditionType&&(n=v.validate(e,t)):n.condition=f("Must provide a value"),n},isExpression:function(e,t){var n=s("select[name=conditionType]",t);if(n.selectedIndex>=0)return"expression"===n.options[n.selectedIndex].value},isScript:function(e,t){var n=s("select[name=conditionType]",t);if(n.selectedIndex>=0)return"script"===n.options[n.selectedIndex].value},clear:function(e,t){return s("input[name=condition]",t).value="",!0},canClear:function(e,t){return""!==s("input[name=condition]",t).value},script:v,cssClasses:["bpp-textfield"]})}}};var d=["bpmn:Activity","bpmn:ExclusiveGateway","bpmn:InclusiveGateway","bpmn:ComplexGateway"]},function(e,t,n){"use strict";n(11),n(0),n(8),n(0),n(8);var i=n(720).getBusinessObject,r=n(720).is,o=n(725),a=n(724),s=n(796);e.exports=function(e,t,n,c){var u;if(r(t,"bpmn:ScriptTask")&&(u=i(t)),u){var p=s("scriptFormat","script",!1,c);e.entries.push({id:"script-implementation",label:c("Script"),html:p.template,get:function(e){return p.get(e,u)},set:function(e,t,n){var i=p.set(e,t,n);return a.updateProperties(e,i)},validate:function(e,t){return p.validate(e,t)},script:p,cssClasses:["bpp-textfield"]}),e.entries.push(o.textField({id:"scriptResultVariable",label:c("Result Variable"),modelProperty:"scriptResultVariable",get:function(e,t){return{scriptResultVariable:u.get("camunda:resultVariable")}},set:function(e,t,n){return a.updateProperties(e,{"camunda:resultVariable":t.scriptResultVariable.length?t.scriptResultVariable:void 0})}}))}}},function(e,t,n){"use strict";var i=n(720).is,r=n(747),o=n(1098),a=n(731);e.exports=function(e,t,n,s){a(["bpmn:StartEvent","bpmn:BoundaryEvent","bpmn:EndEvent"],(function(a){if(i(t,a)){var c=r.getErrorEventDefinition(t);if(c){var u=i(t,"bpmn:StartEvent")||i(t,"bpmn:BoundaryEvent");o(e,t,n,c,u,u,s)}}}))}},function(e,t,n){"use strict";n(11),n(0),n(8),n(21),n(0),n(8),n(21);var i=n(725),r=n(724),o=n(764);e.exports=function(e,t,n,a,s,c,u){var p=function(e){return function(t){var n=a.get("camunda:"+e),i={};return i[e]=n,i}},l=function(e){return function(t,n){var i={};return i["camunda:"+e]=n[e]||void 0,r.updateBusinessObject(t,a,i)}};e.entries=e.entries.concat(o(t,a,n,{id:"error-element-message",label:u("Error Message"),referenceProperty:"errorRef",modelProperty:"errorMessage"})),s&&e.entries.push(i.textField({id:"errorCodeVariable",label:u("Error Code Variable"),modelProperty:"errorCodeVariable",get:p("errorCodeVariable"),set:l("errorCodeVariable")})),c&&e.entries.push(i.textField({id:"errorMessageVariable",label:u("Error Message Variable"),modelProperty:"errorMessageVariable",get:p("errorMessageVariable"),set:l("errorMessageVariable")}))}},function(e,t,n){"use strict";n(11),n(0),n(8),n(117),n(23),n(0),n(8),n(117),n(23);var i=n(720).getBusinessObject,r=n(739).getExtensionElements,o=n(739).removeEntry,a=n(765),s=n(895),c=n(725),u=n(732),p=n(724),l=n(1100),d=n(729),f=n(720).is,h=n(754),m=n(731);function v(e,t){var n=e.id,i=e.label,r=e.modelProperty,o=e.validate;return c.textField({id:n,label:i,modelProperty:r,get:function(e,n){var i=t(e,n)||{},o={};return o[r]=i[r],o},set:function(n,i,o){var a=[];if("function"==typeof e.set){var s=e.set(n,i,o);s&&a.push(s)}var c=t(n,o),u={};return u[r]=i[r]||void 0,a.push(p.updateBusinessObject(n,c,u)),a},hidden:function(e,n){return!t(e,n)},validate:o})}e.exports=function(e,t,n,b){if(function(e){return f(e,"bpmn:StartEvent")&&!f(e.parent,"bpmn:SubProcess")||f(e,"bpmn:UserTask")}(t)){e.entries.push(c.textField({id:"form-key",label:b("Form Key"),modelProperty:"formKey",get:function(e,t){return{formKey:i(e).get("camunda:formKey")}},set:function(e,t,n){var r=i(e),o=t.formKey||void 0;return p.updateBusinessObject(e,r,{"camunda:formKey":o})}}));var g=a(t,n,{id:"form-fields",label:b("Form Fields"),modelProperty:"id",prefix:"FormField",createExtensionElement:function(e,t,r){var o=i(e),a=[];t||(t=u.createElement("bpmn:ExtensionElements",{values:[]},o,n),a.push(p.updateProperties(e,{extensionElements:t})));var s=l.getFormData(e);s||(s=u.createElement("camunda:FormData",{fields:[]},t,n),a.push(p.addAndRemoveElementsFromList(e,t,"values","extensionElements",[s],[])));var c=u.createElement("camunda:FormField",{id:r},s,n);return void 0!==s.fields?a.push(p.addElementsTolist(e,s,"fields",[c])):a.push(p.updateBusinessObject(e,s,{fields:[c]})),a},removeExtensionElement:function(e,t,n,a){var s=r(i(e),"camunda:FormData")[0],c=s.fields[a],u=[];return s.fields.length<2?u.push(o(i(e),e,s)):(u.push(p.removeElementsFromList(e,s,"fields",null,[c])),c.id===s.get("businessKey")&&u.push(p.updateBusinessObject(e,s,{businessKey:void 0}))),u},getExtensionElements:function(e){return l.getFormFields(e)},hideExtensionElements:function(e,t){return!1}});e.entries.push(g);var y=c.selectBox({id:"form-business-key",label:b("Business Key"),modelProperty:"businessKey",selectOptions:function(e,t){var n=[{name:"",value:""}],i=l.getFormFields(e);return m(i,(function(e){"boolean"!==e.type&&n.push({name:e.id,value:e.id})})),n},get:function(e,t){var n={businessKey:""},o=i(e),a=r(o,"camunda:FormData");a&&(n={businessKey:a[0].get("businessKey")});return n},set:function(e,t,n){var o=r(i(e),"camunda:FormData")[0];return p.updateBusinessObject(e,o,{businessKey:t.businessKey||void 0})},hidden:function(e,t){return!(f(e,"bpmn:StartEvent")&&l.getFormFields(e).length>0)}});e.entries.push(y),e.entries.push(c.label({id:"form-field-header",labelText:b("Form Field"),showLabel:function(e,t){return!!x(e,t)}})),e.entries.push(c.validationAwareTextField({id:"form-field-id",label:b("ID"),modelProperty:"id",getProperty:function(e,t){return(x(e,t)||{}).id},setProperty:function(e,t,n){var i=x(e,n);return p.updateBusinessObject(e,i,t)},hidden:function(e,t){return!x(e,t)},validate:function(e,t,n){var i=x(e,n);if(i){var r=t.id;if(!r||""===r.trim())return{id:"Form field id must not be empty"};var o=l.getFormFields(e);if(h(o,(function(e){return e!==i&&e.id===r})))return{id:"Form field id already used in form data."}}}})),e.entries.push(c.comboBox({id:"form-field-type",label:b("Type"),selectOptions:[{name:"string",value:"string"},{name:"long",value:"long"},{name:"boolean",value:"boolean"},{name:"date",value:"date"},{name:"enum",value:"enum"}],modelProperty:"type",emptyParameter:!0,get:function(e,t){var n=x(e,t);return n?{type:n.type}:{}},set:function(e,t,n){var o=x(e,n),a=r(i(e),"camunda:FormData")[0],s=[];return"enum"===o.type&&"enum"!==t.type&&s.push(p.updateBusinessObject(e,o,{values:void 0})),"boolean"===t.type&&o.get("id")===a.get("businessKey")&&s.push(p.updateBusinessObject(e,a,{businessKey:void 0})),s.push(p.updateBusinessObject(e,o,t)),s},hidden:function(e,t){return!x(e,t)}})),e.entries.push(v({id:"form-field-label",label:b("Label"),modelProperty:"label"},x)),e.entries.push(v({id:"form-field-defaultValue",label:b("Default Value"),modelProperty:"defaultValue"},x)),e.entries.push(c.label({id:"form-field-enum-values-header",labelText:b("Values"),divider:!0,showLabel:function(e,t){var n=x(e,t);return n&&"enum"===n.type}})),e.entries.push(c.table({id:"form-field-enum-values",labels:[b("Id"),b("Name")],modelProperties:["id","name"],show:function(e,t){var n=x(e,t);return n&&"enum"===n.type},getElements:function(e,t){var n=x(e,t);return l.getEnumValues(n)},addElement:function(e,t){var r=x(e,t),o=d.nextId("Value_"),a=u.createElement("camunda:Value",{id:o,name:void 0},i(e),n);return p.addElementsTolist(e,r,"values",[a])},removeElement:function(e,t,n){var i=x(e,t),r=i.values[n];return p.removeElementsFromList(e,i,"values",null,[r])},updateElement:function(e,t,n,i){var r=x(e,n).values[i];return t.name=t.name||void 0,p.updateBusinessObject(e,r,t)},validate:function(e,t,n,i){var r=x(e,n).values[i];if(r){var o=d.isIdValid(r,t.id,b);if(o)return{id:o}}}})),e.entries.push(c.label({id:"form-field-validation-header",labelText:b("Validation"),divider:!0,showLabel:function(e,t){return!!x(e,t)}})),e.entries.push(c.table({id:"constraints-list",modelProperties:["name","config"],labels:[b("Name"),b("Config")],addLabel:b("Add Constraint"),getElements:function(e,t){var n=x(e,t);return l.getConstraints(n)},addElement:function(e,t){var r=[],o=x(e,t),a=o.validation;a||(a=u.createElement("camunda:Validation",{},i(e),n),r.push(p.updateBusinessObject(e,o,{validation:a})));var s=u.createElement("camunda:Constraint",{name:void 0,config:void 0},a,n);return r.push(p.addElementsTolist(e,a,"constraints",[s])),r},updateElement:function(e,t,n,i){var r=x(e,n),o=l.getConstraints(r)[i];return t.name=t.name||void 0,t.config=t.config||void 0,p.updateBusinessObject(e,o,t)},removeElement:function(e,t,n){var i=[],r=x(e,t),o=l.getConstraints(r),a=o[n];return i.push(p.removeElementsFromList(e,r.validation,"constraints",null,[a])),1===o.length&&i.push(p.updateBusinessObject(e,r,{validation:void 0})),i},show:function(e,t){return!!x(e,t)}})),e.entries.push(c.label({id:"form-field-properties-header",labelText:b("Properties"),divider:!0,showLabel:function(e,t){return!!x(e,t)}})),e.entries.push(s(t,n,{id:"form-field-properties",modelProperties:["id","value"],labels:[b("Id"),b("Value")],getParent:function(e,t){return x(e,t)},show:function(e,t){return!!x(e,t)}},b))}function x(e,t){var n=g.getSelected(e,t.parentNode);if(-1!==n.idx)return l.getFormField(e,n.idx)}}},function(e,t,n){"use strict";n(11),n(0),n(8),n(0),n(8);var i=n(720).getBusinessObject,r=n(739).getExtensionElements,o={};e.exports=o,o.getFormData=function(e){var t=i(e),n=r(t,"camunda:FormData");if(void 0!==n)return n[0]},o.getFormFields=function(e){var t=this.getFormData(e);return void 0===t?[]:t.fields||[]},o.getFormField=function(e,t){return this.getFormFields(e)[t]},o.getConstraints=function(e){return e&&e.validation&&e.validation.constraints?e.validation.constraints:[]},o.getEnumValues=function(e){return e&&e.values?e.values:[]}},function(e,t,n){"use strict";n(11),n(0),n(8),n(0),n(8);var i=n(725),r=n(720).is,o=n(720).getBusinessObject;e.exports=function(e,t,n){o(t)&&r(t,"camunda:Initiator")&&!r(t.parent,"bpmn:SubProcess")&&e.entries.push(i.textField({id:"initiator",label:n("Initiator"),modelProperty:"initiator"}))}},function(e,t,n){"use strict";n(11),n(0),n(8),n(0),n(8);var i=n(720).is,r=n(730).isAny,o=n(720).getBusinessObject,a=n(791),s=n(739),c=n(724),u=n(732),p=n(747),l=n(765),d=n(725);function f(e,t){var n=function(e,t){var n=o(e),i=p.getSignalEventDefinition(n);return s.getExtensionElements(i||n,t)||[]}(e,t);return a(n,(function(e){return!e.businessKey}))}function h(e){var t="source";return"all"===e.variables?t="variables":void 0!==e.source?t="source":void 0!==e.sourceExpression&&(t="sourceExpression"),t}var m=/\s/;e.exports=function(e,t,n,a){var v=[{name:a("Source"),value:"source"},{name:a("Source Expression"),value:"sourceExpression"},{name:a("All"),value:"variables"}],b=p.getSignalEventDefinition(t);if((i(t,"camunda:CallActivity")||b)&&(!b||r(t,["bpmn:IntermediateThrowEvent","bpmn:EndEvent"]))){var g=function(e,t){return!!y(e,t)},y=function(e,t){var n=t.parentNode,i=E.getSelected(e,n),r=f(e,"camunda:In")[i.idx];return!r&&_&&(i=_.getSelected(e,n),r=f(e,"camunda:Out")[i.idx]),r},x=function(e){return function(t,n,i,r,o,a){var s=f(t,e)[a],c=(s.target||"<undefined>")+" := ",u=h(s);"variables"===u?c="all":c+="source"===u?s.source||"<empty>":"sourceExpression"===u&&s.sourceExpression||"<empty>",i.text=c}},O=function(e){return function(t,i,r){var o=u.createElement(e,{source:""},i,n);return c.addElementsTolist(t,i,"values",[o])}},j=function(e){return function(t,n,i,r){var a=f(t,e)[r];if(a)return s.removeEntry(b||o(t),t,a)}},E=l(t,n,{id:"variableMapping-in",label:a("In Mapping"),modelProperty:"source",prefix:"In",idGeneration:!1,resizable:!0,businessObject:b||o(t),createExtensionElement:O("camunda:In"),removeExtensionElement:j("camunda:In"),getExtensionElements:function(e){return f(e,"camunda:In")},onSelectionChange:function(e,t,n,i){_&&_.deselect(e,t.parentNode)},setOptionLabelValue:x("camunda:In")});if(e.entries.push(E),!b){var _=l(t,n,{id:"variableMapping-out",label:a("Out Mapping"),modelProperty:"source",prefix:"Out",idGeneration:!1,resizable:!0,createExtensionElement:O("camunda:Out"),removeExtensionElement:j("camunda:Out"),getExtensionElements:function(e){return f(e,"camunda:Out")},onSelectionChange:function(e,t,n,i){E.deselect(e,t.parentNode)},setOptionLabelValue:x("camunda:Out")});e.entries.push(_)}e.entries.push(d.label({id:"variableMapping-typeLabel",get:function(e,t){var n=y(e,t),r="";return i(n,"camunda:In")?r=a("In Mapping"):i(n,"camunda:Out")&&(r=a("Out Mapping")),{label:r}},showLabel:function(e,t){return g(e,t)}})),e.entries.push(d.selectBox({id:"variableMapping-inOutType",label:a("Type"),selectOptions:v,modelProperty:"inOutType",get:function(e,t){return{inOutType:h(y(e,t)||{})}},set:function(e,t,n){var i=t.inOutType,r={source:void 0,sourceExpression:void 0,variables:void 0};"source"===i?r.source="":"sourceExpression"===i?r.sourceExpression="":"variables"===i&&(r.variables="all",r.target=void 0);var o=y(e,n);return c.updateBusinessObject(e,o,r)},hidden:function(e,t){return!g(e,t)}})),e.entries.push(d.textField({id:"variableMapping-source",dataValueLabel:"sourceLabel",modelProperty:"source",get:function(e,t){var n=y(e,t)||{},i="",r=h(n);return"source"===r?i=a("Source"):"sourceExpression"===r&&(i=a("Source Expression")),{source:n[r],sourceLabel:i}},set:function(e,t,n){t.source=t.source||void 0;var i=y(e,n),r={};return r[h(i)]=t.source||"",c.updateBusinessObject(e,i,r)},validate:function(e,t,n){var i=y(e,n),r={};if(i){t.source||(r.source=r.source=t.sourceLabel?a("Mapping must have a {value}",{value:t.sourceLabel.toLowerCase()}):a("Mapping must have a value"));var o=h(i);m.test(t.source)&&"sourceExpression"!==o&&(r.source=a("{label} must not contain whitespace",{label:t.sourceLabel}))}return r},hidden:function(e,t){var n=y(e,t);return!n||n&&n.variables}})),e.entries.push(d.textField({id:"variableMapping-target",label:a("Target"),modelProperty:"target",get:function(e,t){return{target:(y(e,t)||{}).target}},set:function(e,t,n){t.target=t.target||void 0;var i=y(e,n);return c.updateBusinessObject(e,i,t)},validate:function(e,t,n){var i=y(e,n),r={};if(i){var o=h(i);t.target||"variables"===o||(r.target=a("Mapping must have a target")),t.target&&m.test(t.target)&&"variables"!==o&&(r.target=a("Target must not contain whitespace"))}return r},hidden:function(e,t){var n=y(e,t);return!n||n&&n.variables}})),e.entries.push(d.checkbox({id:"variableMapping-local",label:a("Local"),modelProperty:"local",get:function(e,t){return{local:(y(e,t)||{}).local}},set:function(e,t,n){t.local=t.local||!1;var i=y(e,n);return c.updateBusinessObject(e,i,t)},hidden:function(e,t){return!g(e,t)}}))}}},function(e,t,n){"use strict";n(11),n(0),n(8),n(0),n(8);var i=n(725),r=n(724),o=n(720).is,a=n(720).getBusinessObject;e.exports=function(e,t,n){var s=a(t);if(s&&(o(t,"bpmn:Process")||o(t,"bpmn:Participant")&&s.get("processRef"))){var c=i.textField({id:"versionTag",label:n("Version Tag"),modelProperty:"versionTag"}),u=i.textField({id:"processField",label:n("Process Field"),modelProperty:"camunda:processField"});o(t,"bpmn:Participant")&&(c.get=function(e){return{versionTag:s.get("processRef").get("camunda:versionTag")}},c.set=function(e,t){var n=s.get("processRef");return r.updateBusinessObject(e,n,{"camunda:versionTag":t.versionTag||void 0})}),e.entries.push(c),e.entries.push(u)}}},function(e,t,n){"use strict";n(11),n(0),n(8),n(21),n(0),n(8),n(21);var i=n(1105);e.exports=function(e,t,n,r){var o=i(t,n,{},r);return e.entries=e.entries.concat(o.entries),{getSelectedListener:o.getSelectedListener}}},function(e,t,n){"use strict";n(11),n(0),n(8),n(0),n(8);var i=n(720).is,r=n(720).getBusinessObject,o=n(765),a=n(739),s=n(724),c=n(732),u=n(746);function p(e,t){return e&&a.getExtensionElements(e,t)||[]}e.exports=function(e,t,n,l){var d,f={class:l("Java Class"),expression:l("Expression"),delegateExpression:l("Delegate Expression"),script:l("Script")},h={getSelectedListener:function(e,t){var n=x&&x.getSelected(e,t)||{idx:-1},i=p(d,"camunda:ExecutionListener")[n.idx];!i&&O&&(n=O.getSelected(e,t),i=p(d,"camunda:TaskListener")[n.idx]);return i}},m=h.entries=[],v=u.isSequenceFlow(e);var b=function(e){return function(t,n,i,r,o,a){var s=p(d,e)[a],c=u.getImplementationType(s),l=((s.get("event")?s.get("event"):"<empty>")||"*")+" : "+(f[c]||"");i.text=l}},g=function(e,n,i){return function(e,r,o){var a={event:i,class:""},u=c.createElement(n,a,r,t);return s.addElementsTolist(e,r,"values",[u])}},y=function(e,t){return function(e,n,i,r){var o=p(d,t)[r];if(o)return a.removeEntry(d,e,o)}};if((i(e,"bpmn:FlowElement")||i(e,"bpmn:Process")||i(e,"bpmn:Participant"))&&(d=r(e),i(e,"bpmn:Participant")&&(e=e.processRef,d=d.get("processRef")),d)){var x=o(e,t,{id:"executionListeners",label:l("Execution Listener"),modelProperty:"name",idGeneration:"false",reference:"processRef",createExtensionElement:g(0,"camunda:ExecutionListener",v?"take":"start"),removeExtensionElement:y(0,"camunda:ExecutionListener"),getExtensionElements:function(e){return p(d,"camunda:ExecutionListener")},onSelectionChange:function(e,t,n,i){O&&O.deselect(e,t)},setOptionLabelValue:b("camunda:ExecutionListener")});m.push(x)}if(i(e,"bpmn:UserTask")){d=r(e);var O=o(e,t,{id:"taskListeners",label:l("Task Listener"),modelProperty:"name",idGeneration:"false",createExtensionElement:g(0,"camunda:TaskListener","create"),removeExtensionElement:y(0,"camunda:TaskListener"),getExtensionElements:function(e){return p(d,"camunda:TaskListener")},onSelectionChange:function(e,t,n,i){x.deselect(e,t)},setOptionLabelValue:b("camunda:TaskListener")});m.push(O)}return h}},function(e,t,n){"use strict";n(65),n(11),n(0),n(8),n(65),n(0),n(8);var i=n(720).is,r=n(721).find,o=n(725),a=n(724),s=n(746),c=n(796),u=n(890);function p(e){return"timeout"===(e&&e.event)}e.exports=function(e,t,n,l,d){var f={class:d("Java Class"),expression:d("Expression"),delegateExpression:d("Delegate Expression"),script:d("Script")},h=(l=l||{}).getSelectedListener,m=s.isSequenceFlow(t)?[{name:d("take"),value:"take"}]:[{name:d("start"),value:"start"},{name:d("end"),value:"end"}],v=[{name:d("create"),value:"create"},{name:d("assignment"),value:"assignment"},{name:d("complete"),value:"complete"},{name:d("delete"),value:"delete"},{name:d("update"),value:"update"},{name:d("timeout"),value:"timeout"}],b=function(e,t){return h(e,t)};e.entries.push(o.selectBox({id:"listener-event-type",label:d("Event Type"),modelProperty:"eventType",emptyParameter:!1,get:function(e,t){var n=h(e,t);return{eventType:n&&n.get("event")}},set:function(e,t,n){var i=t.eventType,r=h(e,n),o=r&&r.eventDefinitions;return o&&"timeout"!==i&&(o=[]),a.updateBusinessObject(e,r,{event:i,eventDefinitions:o})},selectOptions:function(e,t){var n,i=h(e,t);return s.isTaskListener(i)?n=v:s.isExecutionListener(i)&&(n=m),n},hidden:function(e,t){return!b(e,t)}})),e.entries.push(o.textField({id:"listener-id",label:d("Listener Id"),modelProperty:"listenerId",get:function(e,t){var n={},i=h(e,t);return n.listenerId=i&&i.get("id")||void 0,n},set:function(e,t,n){var i={},r=h(e,n);return i.id=t.listenerId||"",a.updateBusinessObject(e,r,i)},hidden:function(e,t){var n=h(e,t);return!s.isTaskListener(n)},validate:function(e,t,n){var i=t.listenerId,r=h(e,n),o={};return!i&&p(r)&&(o.listenerId=d("Must provide a value for timeout task listener")),o}})),e.entries.push(o.selectBox({id:"listener-type",label:d("Listener Type"),selectOptions:[{value:"class",name:d("Java Class")},{value:"expression",name:d("Expression")},{value:"delegateExpression",name:d("Delegate Expression")},{value:"script",name:d("Script")}],modelProperty:"listenerType",emptyParameter:!1,get:function(e,t){var n=h(e,t);return{listenerType:s.getImplementationType(n)}},set:function(e,t,i){var r=h(e,i),o=t.listenerType||void 0,s={};return s.class="class"===o?"":void 0,s.expression="expression"===o?"":void 0,s.delegateExpression="delegateExpression"===o?"":void 0,s.script="script"===o?n.create("camunda:Script"):void 0,a.updateBusinessObject(e,r,s)},hidden:function(e,t){return!b(e,t)}})),e.entries.push(o.textField({id:"listener-value",dataValueLabel:"listenerValueLabel",modelProperty:"listenerValue",get:function(e,t){var n={},i=h(e,t),r=s.getImplementationType(i);return n.listenerValueLabel=f[r]||"",n.listenerValue=i&&i.get(r)||void 0,n},set:function(e,t,n){var i={},r=h(e,n);return i[s.getImplementationType(r)]=t.listenerValue||"",a.updateBusinessObject(e,r,i)},hidden:function(e,t){var n=h(e,t);return!n||n.script},validate:function(e,t){var n={};return t.listenerValue||(n.listenerValue=d("Must provide a value")),n}}));var g=c("scriptFormat","value",!0,d);e.entries.push({id:"listener-script-value",html:'<div data-show="isScript">'+g.template+"</div>",get:function(e,t){var n=h(e,t);return n&&n.script?g.get(e,n.script):{}},set:function(e,t,n){var i=h(e,n),r=g.set(e,t,i);return a.updateBusinessObject(e,i.script,r)},validate:function(e,t,n){var i=h(e,n);return i&&i.script?g.validate(e,t):{}},isScript:function(e,t){var n=h(e,t);return n&&n.script},script:g});var y={idPrefix:"listener-",createTimerEventDefinition:function(e,t){var i=h(e,t);if(i&&p(i)){var r=i.get("eventDefinitions")||[],o=n.create("bpmn:TimerEventDefinition");return r.push(o),i.eventDefinitions=r,o}}};u(e,t,n,(function(e,t){var n=h(e,t);if(n&&p(n)){var o,a=(o=n.eventDefinitions||[],r(o,(function(e){return i(e,"bpmn:TimerEventDefinition")})));return a||!1}}),d,y)}},function(e,t,n){"use strict";n(11),n(0),n(8),n(21),n(0),n(8),n(21);var i=n(740),r=n(896);e.exports=function(e,t,n,o,a){o=i({idPrefix:"listener-",insideListener:!0},o);var s=r(t,n,a,o);s&&s.length>0&&(e.entries=e.entries.concat(s))}},function(e,t,n){"use strict";n(11),n(0),n(8),n(21),n(23),n(0),n(8),n(21),n(23);var i=n(725),r=n(720).is,o=n(736).getTemplate,a=n(736).getTemplateId,s=n(754),c=n(736).TEMPLATE_ATTR;function u(e){return e.isDefault}e.exports=function(e,t,n,p){var l=function(e,t,n){var i=a(e),o=t.getAll().reduce((function(t,i){return function(e,t){return t.reduce((function(t,n){return t||r(e,n)}),!1)}(e,i.appliesTo)?t.concat({name:n(i.name),value:i.id,isDefault:i.isDefault}):t}),[{name:"",value:""}]),c=s(o,(function(e){return u(e)})),p=s(o,(function(e){return e.value===i}));i&&!p&&(p=function(e,t){return{name:t("[unknown template: {templateId}]",{templateId:e}),value:e}}(i,n),o.push(p));if(!c)return o;var l=[];i||l.push({name:"",value:""});p&&p!==c&&l.push(p);return l.push(c),l}(t,n,p);(1!==l.length||l[0].isDefault)&&e.entries.push(i.selectBox({id:"elementTemplate-chooser",label:p("Element Template"),modelProperty:"camunda:modelerTemplate",selectOptions:l,set:function(e,t){return function(e,t,n){var i=o(e,n),r=n.get(t);if(i===r)return;return{cmd:"propertiesPanel.camunda.changeTemplate",context:{element:e,oldTemplate:i,newTemplate:r}}}(e,t[c],n)},disabled:function(){var e=o(t,n);return e&&u(e)}}))}},function(e,t,n){"use strict";n(6),n(10),n(20),n(11),n(0),n(8),n(1),n(22),n(23),n(36),n(15),n(6),n(10),n(20),n(0),n(8),n(1),n(22),n(23),n(36),n(15);var i=n(740),r=n(725),o=n(720).getBusinessObject,a=n(736).getTemplate,s=n(724),c=n(732),u=n(736).findExtension,p=n(736).findExtensions,l=n(736).findInputParameter,d=n(736).findOutputParameter,f=n(736).findCamundaProperty,h=n(736).findCamundaInOut,m=n(737).createCamundaProperty,v=n(737).createInputParameter,b=n(737).createOutputParameter,g=n(737).createCamundaIn,y=n(737).createCamundaOut,x=n(737).createCamundaInWithBusinessKey,O=n(737).createCamundaFieldInjection,j=["Boolean","Integer","String"],E=["camunda:property","camunda:inputParameter","camunda:outputParameter","camunda:in","camunda:out","camunda:in:businessKey","camunda:field"],_=["camunda:inputParameter","camunda:outputParameter"],w=["camunda:in","camunda:out","camunda:in:businessKey"];function S(e,t,n){return function(i,r){var o=r[e];return C(i,t,o,n)}}function T(e,t,n){return function(i,r){var o=function(e,t,n){var i=t.constraints||{};if(i.notEmpty&&(r=e,!r||/^\s*$/.test(r)))return n("Must not be empty");var r;if(i.maxLength&&e.length>i.maxLength)return n("Must have max length {length}",{length:i.maxLength});if(i.minLength&&e.length<i.minLength)return n("Must have min length {length}",{length:i.minLength});var o,a=i.pattern;if(a&&("string"!=typeof a&&(o=a.message,a=a.value),!function(e,t){return new RegExp(t).test(e)}(e,a)))return o||n("Must match pattern {pattern}",{pattern:a})}(r[e],t,n);if(o)return R(e,o)}}function P(e,t){var n,i,r,a,s,c,m=o(e),v=t.binding,b=t.scope,g=v.type,y=v.name,x=t.value||"";if(b&&!(m=u(m,b.name)))return x;if("property"===g){var O=m.get(y);return"conditionExpression"===y?O?O.body:x:void 0!==O?O:x}if("camunda:property"===g)return(n=b?m.get("properties"):u(m,"camunda:Properties"))&&(i=f(n,v))?i.value:x;if(-1!==_.indexOf(g)&&!(r=b?m.get("inputOutput"):u(m,"camunda:InputOutput")))return x;if("camunda:inputParameter"===g){if(a=l(r,v)){if(!v.scriptFormat)return a.value||"";if(a.definition)return a.definition.value}return x}if("camunda:outputParameter"===v.type)return(a=d(r,v))?a.name:x;if(-1!=w.indexOf(g)){if(s=h(m,v)){if("camunda:in:businessKey"===g)return s.businessKey;if("camunda:out"===g)return s.target;if("camunda:in"===g)return s[v.expression?"sourceExpression":"source"]}return x}if("camunda:executionListener"===g)return(b?m.get("executionListener"):u(m,"camunda:ExecutionListener")).script.value;if("camunda:field"===g)return p(m,["camunda:Field"]).forEach((function(e){e.name===v.name&&(c=e)})),c?c.string||c.expression:"";throw function(e){var t=e.binding;return new Error("unknown binding: <"+t.type+">")}(t)}function C(e,t,n,i){var r,a,S,T,P,C,A,k,B,M,D=o(e),N=t.binding,L=t.scope,I=N.type,F=N.name,z=[];if(-1!==E.indexOf(I)&&((a=D.get("extensionElements"))||(a=c.createElement("bpmn:ExtensionElements",null,e,i),z.push(s.updateBusinessObject(e,D,R("extensionElements",a))))),L&&((D=u(D,L.name))||(D=c.createElement(L.name,null,e,i),z.push(s.addElementsTolist(D,a,"values",[D])))),"property"===I){if("conditionExpression"===F)r=c.createElement("bpmn:FormalExpression",{body:n,language:N.scriptFormat},D,i);else{var V=D.$descriptor.propertiesByName[F].type;if(-1===j.indexOf(V))throw new Error("cannot set moddle type <"+V+">");"Boolean"===V?r=!!n:"Integer"===V?(r=parseInt(n,10),isNaN(r)&&(r=void 0)):r=n}void 0!==r&&z.push(s.updateBusinessObject(e,D,R(F,r)))}if("camunda:property"===I&&((S=L?D.get("properties"):u(a,"camunda:Properties"))||(S=c.createElement("camunda:Properties",null,D,i),L?z.push(s.updateBusinessObject(e,D,{properties:S})):z.push(s.addElementsTolist(e,a,"values",[S]))),T=f(S,N),P=m(N,n,i),z.push(s.addAndRemoveElementsFromList(e,S,"values",null,[P],T?[T]:[]))),-1!==_.indexOf(I)&&((C=L?D.get("inputOutput"):u(a,"camunda:InputOutput"))||(C=c.createElement("camunda:InputOutput",null,D,i),L?z.push(s.updateBusinessObject(e,D,{inputOutput:C})):z.push(s.addElementsTolist(e,a,"values",C)))),"camunda:inputParameter"===I&&(A=l(C,N),k=v(N,n,i),z.push(s.addAndRemoveElementsFromList(e,C,"inputParameters",null,[k],A?[A]:[]))),"camunda:outputParameter"===I&&(A=d(C,N),k=b(N,n,i),z.push(s.addAndRemoveElementsFromList(e,C,"outputParameters",null,[k],A?[A]:[]))),-1!==w.indexOf(I)&&(B=h(D,N),M="camunda:in"===I?g(N,n,i):"camunda:out"===I?y(N,n,i):x(N,n,i),z.push(s.addAndRemoveElementsFromList(e,a,"values",null,[M],B?[B]:[]))),"camunda:field"===I){var $=p(D,["camunda:Field"]),H=[];$.length>0?$.forEach((function(e){e.name===N.name?H.push(O(N,n,i)):H.push(e)})):H.push(O(N,n,i)),z.push(s.addAndRemoveElementsFromList(e,a,"values",null,H,$||[]))}if(z.length)return z;console.warn("no update",e,t,n)}function A(e,t){return t?i({},e,{scope:{name:t}}):e}function R(e,t){var n={};return n[e]=t,n}e.exports=function(e,t,n,i){var o=a(e,t);if(!o)return[];var s,c,u=function(e,t,o){var a,s,c,u=t.type,p={id:e,description:t.description,label:t.label?i(t.label):t.label,modelProperty:e,get:(a=e,s=t,function(e){var t=P(e,s);return R(a,t)}),set:S(e,t,n),validate:T(e,t,i)};return"Boolean"===u&&(c=r.checkbox(p)),"String"===u&&(c=r.textField(p)),"Text"===u&&(c=r.textBox(p)),"Dropdown"===u&&(p.selectOptions=t.choices,c=r.selectBox(p)),c},p=[],l={id:"customField",label:i("Custom Fields"),entries:[]};if(o.properties.forEach((function(e,t){s="custom-"+o.id+"-"+t,(c=u(s,e))&&l.entries.push(c)})),l.entries.length>0&&p.push(l),o.scopes)for(var d in o.scopes){var f=o.scopes[d],h=d.replace(/:/g,"_"),m={id:"customField-"+h,label:i("Custom Fields for scope: ")+d,entries:[]};f.properties.forEach((function(e,t){var n="custom-"+o.id+"-"+h+"-"+t,i=A(e,d);(c=u(n,i))&&m.entries.push(c)})),m.entries.length>0&&p.push(m)}return p},e.exports.getPropertyValue=P,e.exports.setPropertyValue=C},function(e,t,n){"use strict";n(11),n(0),n(8),n(21),n(0),n(8),n(21);var i=n(897);e.exports=function(e,t,n,r){var o=i(t,n,{},r);return e.entries=e.entries.concat(o.entries),{getSelectedParameter:o.getSelectedParameter}}},function(e,t,n){"use strict";n(11),n(0),n(8),n(21),n(0),n(8),n(21);var i=n(898),r=n(740);e.exports=function(e,t,n,o,a){e.entries=e.entries.concat(i(t,n,r({},o),a))}},function(e,t,n){"use strict";n(11),n(0),n(8),n(0),n(8);var i=n(746),r=n(795),o=n(725),a=n(724);function s(e){return i.getServiceTaskLikeBusinessObject(e)}function c(e){return r.getConnector(e)}function u(e){return"connector"===function(e){return i.getImplementationType(e)}(e)}e.exports=function(e,t,n,i){e.entries.push(o.textField({id:"connectorId",label:i("Connector Id"),modelProperty:"connectorId",get:function(e,t){var n=s(e),i=n&&c(n);return{connectorId:i&&i.get("connectorId")}},set:function(e,t,n){var i=c(s(e));return a.updateBusinessObject(e,i,{connectorId:t.connectorId||void 0})},validate:function(e,t,n){return u(e)&&!t.connectorId?{connectorId:i("Must provide a value")}:{}},hidden:function(e,t){return!u(e)}}))}},function(e,t,n){"use strict";n(11),n(0),n(8),n(21),n(0),n(8),n(21);var i=n(897);e.exports=function(e,t,n,r){var o=i(t,n,{idPrefix:"connector-",insideConnector:!0},r);return e.entries=e.entries.concat(o.entries),{getSelectedParameter:o.getSelectedParameter}}},function(e,t,n){"use strict";n(11),n(0),n(8),n(21),n(0),n(8),n(21);var i=n(740),r=n(898);e.exports=function(e,t,n,o,a){o=i({idPrefix:"connector-",insideConnector:!0},o),e.entries=e.entries.concat(r(t,n,o,a))}},function(e,t,n){"use strict";n(11),n(0),n(8),n(0),n(8);var i=n(895),r=n(732),o=n(724);e.exports=function(e,t,n,a){var s=i(t,n,{id:"properties",modelProperties:["name","value"],labels:[a("Name"),a("Value")],getParent:function(e,t,n){return n.extensionElements},createParent:function(e,t){var i=r.createElement("bpmn:ExtensionElements",{values:[]},t,n);return{cmd:o.updateBusinessObject(e,t,{extensionElements:i}),parent:i}}},a);s&&e.entries.push(s)}},function(e,t,n){"use strict";n(11),n(0),n(8),n(21),n(0),n(8),n(21);var i=n(720).is,r=n(720).getBusinessObject,o=n(1117),a=n(894);e.exports=function(e,t,n,s){var c=r(t);(i(t,"camunda:JobPriorized")||i(t,"bpmn:Participant")&&c.get("processRef"))&&(e.entries=e.entries.concat(o(t,n,{getBusinessObject:function(e){var t=r(e);return i(t,"bpmn:Participant")?t.get("processRef"):t}},s))),i(t,"camunda:AsyncCapable")&&(e.entries=e.entries.concat(a(t,n,{getBusinessObject:r},s)))}},function(e,t,n){"use strict";var i=n(725),r=n(724);e.exports=function(e,t,n,o){var a=n.getBusinessObject;return[i.textField({id:"jobPriority",label:o("Job Priority"),modelProperty:"jobPriority",get:function(e,t){return{jobPriority:a(e).get("camunda:jobPriority")}},set:function(e,t){var n=a(e);return r.updateBusinessObject(e,n,{"camunda:jobPriority":t.jobPriority||void 0})}})]}},function(e,t,n){"use strict";n(11),n(0),n(8),n(21),n(0),n(8),n(21);var i=n(720).is,r=n(720).getBusinessObject,o=n(1119);e.exports=function(e,t,n,a){var s=r(t);(i(t,"camunda:Process")||i(t,"bpmn:Participant")&&s.get("processRef"))&&(e.entries=e.entries.concat(o(t,n,{getBusinessObject:function(e){var t=r(e);return i(t,"bpmn:Participant")?t.get("processRef"):t}},a)))}},function(e,t,n){"use strict";var i=n(725),r=n(724);e.exports=function(e,t,n,o){var a=n.getBusinessObject;return[i.textField({id:"historyTimeToLive",label:o("History Time To Live"),modelProperty:"historyTimeToLive",get:function(e,t){var n=a(e).get("camunda:historyTimeToLive");return{historyTimeToLive:n||""}},set:function(e,t){var n=a(e);return r.updateBusinessObject(e,n,{"camunda:historyTimeToLive":t.historyTimeToLive||void 0})}})]}},function(e,t,n){"use strict";n(11),n(0),n(8),n(21),n(0),n(8),n(21);var i=n(720).is,r=n(720).getBusinessObject,o=n(1121);e.exports=function(e,t,n,a){var s=r(t);(i(t,"camunda:Process")||i(t,"bpmn:Participant")&&s.get("processRef"))&&(e.entries=e.entries.concat(o(t,n,{getBusinessObject:function(e){var t=r(e);return i(t,"bpmn:Participant")?t.get("processRef"):t}},a)))}},function(e,t,n){"use strict";var i=n(725),r=n(724);e.exports=function(e,t,n,o){var a=n.getBusinessObject;return[i.textField({id:"candidateStarterGroups",label:o("Candidate Starter Groups"),modelProperty:"candidateStarterGroups",description:o("Specify more than one group as a comma separated list."),get:function(e,t){var n=a(e).get("camunda:candidateStarterGroups");return{candidateStarterGroups:n||""}},set:function(e,t){var n=a(e);return r.updateBusinessObject(e,n,{"camunda:candidateStarterGroups":t.candidateStarterGroups||void 0})}}),i.textField({id:"candidateStarterUsers",label:o("Candidate Starter Users"),modelProperty:"candidateStarterUsers",description:o("Specify more than one user as a comma separated list."),get:function(e,t){var n=a(e).get("camunda:candidateStarterUsers");return{candidateStarterUsers:n||""}},set:function(e,t){var n=a(e);return r.updateBusinessObject(e,n,{"camunda:candidateStarterUsers":t.candidateStarterUsers||void 0})}})]}},function(e,t,n){"use strict";n(11),n(0),n(8),n(21),n(0),n(8),n(21);var i=n(720).is,r=n(720).getBusinessObject,o=n(1123);e.exports=function(e,t,n,a){var s=r(t);(i(t,"camunda:Process")||i(t,"bpmn:Participant")&&s.get("processRef"))&&(e.entries=e.entries.concat(o(t,n,{getBusinessObject:function(e){var t=r(e);return i(t,"bpmn:Participant")?t.get("processRef"):t}},a)))}},function(e,t,n){"use strict";var i=n(725),r=n(724);e.exports=function(e,t,n,o){var a=n.getBusinessObject;return[i.checkbox({id:"isStartableInTasklist",label:o("Startable"),modelProperty:"isStartableInTasklist",get:function(e,t){var n=a(e).get("camunda:isStartableInTasklist");return{isStartableInTasklist:n||""}},set:function(e,t){var n=a(e);return r.updateBusinessObject(e,n,{"camunda:isStartableInTasklist":!!t.isStartableInTasklist})}})]}},function(e,t,n){"use strict";n(11),n(0),n(8),n(21),n(0),n(8),n(21);var i=n(720).is,r=n(720).getBusinessObject,o=n(746),a=n(1125);e.exports=function(e,t,n,s){var c=function(e){var t=o.getServiceTaskLikeBusinessObject(e);return t||(t=r(e)),t}(t);c&&(i(c,"camunda:TaskPriorized")||i(c,"bpmn:Participant")&&c.get("processRef"))&&(e.entries=e.entries.concat(a(t,n,{getBusinessObject:function(e){return i(c,"bpmn:Participant")?c.get("processRef"):c}},s)))}},function(e,t,n){"use strict";var i=n(725),r=n(724);e.exports=function(e,t,n,o){var a=n.getBusinessObject;return[i.textField({id:"externalTaskPriority",label:o("Task Priority"),modelProperty:"taskPriority",get:function(e,t){return{taskPriority:a(e).get("camunda:taskPriority")}},set:function(e,t){var n=a(e);return r.updateBusinessObject(e,n,{"camunda:taskPriority":t.taskPriority||void 0})}})]}},function(e,t,n){"use strict";n(11),n(0),n(8),n(21),n(0),n(8),n(21);var i=n(746),r=n(896);e.exports=function(e,t,n,o){var a=i.getServiceTaskLikeBusinessObject(t);if(a){var s=r(t,n,o,{businessObject:a});s&&s.length>0&&(e.entries=e.entries.concat(s))}}},,,,,,function(e,t,n){"use strict";n.d(t,"a",(function(){return s}));n(296),n(66),n(179);function i(e){return(i=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var r=n(123),o=n.n(r);function a(e,t){if(t&&("object"===o()(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}function s(e){var t=function(){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}}();return function(){var n,r=i(e);if(t){var o=i(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return a(this,n)}}},function(e,t,n){"use strict";n.d(t,"a",(function(){return r}));n(179);function i(e,t){return(i=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function r(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}}),t&&i(e,t)}},function(e,t,n){"use strict";n.r(t),n.d(t,"default",(function(){return c}));n(760);var i=n(723),r=n(721);n(86),n(33),n(14);var o=function(e){return e=e||Object.create(null),{on:function(t,n){(e[t]||(e[t]=[])).push(n)},off:function(t,n){e[t]&&e[t].splice(e[t].indexOf(n)>>>0,1)},emit:function(t,n){(e[t]||[]).slice().map((function(e){e(n)})),(e["*"]||[]).slice().map((function(e){e(t,n)}))}}},a={scrollSymbolLeft:"‹",scrollSymbolRight:"›"};function s(e,t){Object(r.assign)(this,o()),this.options=t=Object(r.assign)({},a,t),this.container=e,this._createScrollButtons(e,t),this._bindEvents(e)}function c(e,t){var n=u(e);return n||(n=new s(e,t),e.__scrollTabs=n),n}function u(e){return e.__scrollTabs}s.prototype._createButton=function(e,t){var n=t.className,r=t.direction,o=Object(i.query)("."+n,e);return o||(o=Object(i.domify)('<span class="scroll-tabs-button '+n+'">'+t.label+"</span>"),e.insertBefore(o,e.childNodes[0])),Object(i.attr)(o,"data-direction",r),o},s.prototype._createScrollButtons=function(e,t){this._createButton(e,{className:"scroll-tabs-left",label:t.scrollSymbolLeft,direction:-1}),this._createButton(e,{className:"scroll-tabs-right",label:t.scrollSymbolRight,direction:1})},s.prototype.getActiveTabNode=function(){return Object(i.query)(this.options.selectors.active,this.container)},s.prototype.getTabsContainerNode=function(){return Object(i.query)(this.options.selectors.tabsContainer,this.container)},s.prototype.getAllTabNodes=function(){return Object(i.queryAll)(this.options.selectors.tab,this.container)},s.prototype.getVisibleTabs=function(){var e=this.getAllTabNodes(),t=this.options.selectors.ignore;return Object(r.filter)(e,(function(e){return!Object(i.matches)(e,t)}))},s.prototype.getAdjacentTab=function(e,t){var n=this.getVisibleTabs(),i=n.indexOf(e);return n[i+t]},s.prototype._bindEvents=function(e){this._bindWheelEvent(e),this._bindTabClickEvents(e),this._bindScrollButtonEvents(e)},s.prototype._bindTabClickEvents=function(e){var t=this.options.selectors.tab,n=this;i.delegate.bind(e,t,"click",(function(e){n.scrollToTabNode(e.delegateTarget)}))},s.prototype._bindWheelEvent=function(e){var t=this;i.event.bind(e,"wheel",(function(e){var n=Math.sign(e.deltaY),i=t.getActiveTabNode(),r=t.getAdjacentTab(i,n);r&&(t.scrollToTabNode(r),t.emit("scroll",r,i,n)),e.preventDefault()}))},s.prototype._bindScrollButtonEvents=function(e){var t=this;i.delegate.bind(e,".scroll-tabs-button","click",(function(e){var n=e.delegateTarget,r=parseInt(Object(i.attr)(n,"data-direction"),10),o=t.getActiveTabNode(),a=t.getAdjacentTab(o,r);a&&(t.scrollToTabNode(a),t.emit("scroll",a,o,r)),e.preventDefault()}))},s.prototype.scrollToTabNode=function(e){if(e){var t=e.parentNode,n=e.offsetWidth,i=e.offsetLeft,r=i+n,o=t.offsetWidth;t.scrollLeft>i?t.scrollLeft=0:r>o&&(t.scrollLeft=r-o)}},s.prototype.update=function(){var e=this.getTabsContainerNode(),t=e.scrollWidth>e.offsetWidth;Object(i.classes)(this.container).toggle("scroll-tabs-overflow",t),t&&this.scrollToTabNode(this.getActiveTabNode())},c.get=u},,,,,function(e,t,n){"use strict";n.r(t);var i=n(798);n.d(t,"default",(function(){return i.a}))},function(e){e.exports=JSON.parse('{"name":"Camunda","uri":"http://camunda.org/schema/1.0/bpmn","prefix":"camunda","xml":{"tagAlias":"lowerCase"},"associations":[],"types":[{"name":"Definitions","isAbstract":true,"extends":["bpmn:Definitions"],"properties":[{"name":"diagramRelationId","isAttr":true,"type":"String"}]},{"name":"InOutBinding","superClass":["Element"],"isAbstract":true,"properties":[{"name":"source","isAttr":true,"type":"String"},{"name":"sourceExpression","isAttr":true,"type":"String"},{"name":"target","isAttr":true,"type":"String"},{"name":"businessKey","isAttr":true,"type":"String"},{"name":"local","isAttr":true,"type":"Boolean","default":false},{"name":"variables","isAttr":true,"type":"String"}]},{"name":"In","superClass":["InOutBinding"],"meta":{"allowedIn":["bpmn:CallActivity","bpmn:SignalEventDefinition"]}},{"name":"Out","superClass":["InOutBinding"],"meta":{"allowedIn":["bpmn:CallActivity"]}},{"name":"AsyncCapable","isAbstract":true,"extends":["bpmn:Activity","bpmn:Gateway","bpmn:Event"],"properties":[{"name":"async","isAttr":true,"type":"Boolean","default":false},{"name":"asyncBefore","isAttr":true,"type":"Boolean","default":false},{"name":"asyncAfter","isAttr":true,"type":"Boolean","default":false},{"name":"exclusive","isAttr":true,"type":"Boolean","default":true}]},{"name":"JobPriorized","isAbstract":true,"extends":["bpmn:Process","camunda:AsyncCapable"],"properties":[{"name":"jobPriority","isAttr":true,"type":"String"}]},{"name":"SignalEventDefinition","isAbstract":true,"extends":["bpmn:SignalEventDefinition"],"properties":[{"name":"async","isAttr":true,"type":"Boolean","default":false}]},{"name":"ErrorEventDefinition","isAbstract":true,"extends":["bpmn:ErrorEventDefinition"],"properties":[{"name":"errorCodeVariable","isAttr":true,"type":"String"},{"name":"errorMessageVariable","isAttr":true,"type":"String"}]},{"name":"Error","isAbstract":true,"extends":["bpmn:Error"],"properties":[{"name":"camunda:errorMessage","isAttr":true,"type":"String"}]},{"name":"PotentialStarter","superClass":["Element"],"properties":[{"name":"resourceAssignmentExpression","type":"bpmn:ResourceAssignmentExpression"}]},{"name":"FormSupported","isAbstract":true,"extends":["bpmn:StartEvent","bpmn:UserTask"],"properties":[{"name":"formHandlerClass","isAttr":true,"type":"String"},{"name":"formKey","isAttr":true,"type":"String"}]},{"name":"TemplateSupported","isAbstract":true,"extends":["bpmn:Process","bpmn:FlowElement"],"properties":[{"name":"modelerTemplate","isAttr":true,"type":"String"},{"name":"modelerTemplateVersion","isAttr":true,"type":"Integer"}]},{"name":"Initiator","isAbstract":true,"extends":["bpmn:StartEvent"],"properties":[{"name":"initiator","isAttr":true,"type":"String"}]},{"name":"ScriptTask","isAbstract":true,"extends":["bpmn:ScriptTask"],"properties":[{"name":"resultVariable","isAttr":true,"type":"String"},{"name":"resource","isAttr":true,"type":"String"}]},{"name":"Process","isAbstract":true,"extends":["bpmn:Process"],"properties":[{"name":"candidateStarterGroups","isAttr":true,"type":"String"},{"name":"candidateStarterUsers","isAttr":true,"type":"String"},{"name":"versionTag","isAttr":true,"type":"String"},{"name":"historyTimeToLive","isAttr":true,"type":"String"},{"name":"isStartableInTasklist","isAttr":true,"type":"Boolean","default":true}]},{"name":"EscalationEventDefinition","isAbstract":true,"extends":["bpmn:EscalationEventDefinition"],"properties":[{"name":"escalationCodeVariable","isAttr":true,"type":"String"}]},{"name":"FormalExpression","isAbstract":true,"extends":["bpmn:FormalExpression"],"properties":[{"name":"resource","isAttr":true,"type":"String"}]},{"name":"Assignable","extends":["bpmn:UserTask"],"properties":[{"name":"assignee","isAttr":true,"type":"String"},{"name":"candidateUsers","isAttr":true,"type":"String"},{"name":"candidateGroups","isAttr":true,"type":"String"},{"name":"dueDate","isAttr":true,"type":"String"},{"name":"followUpDate","isAttr":true,"type":"String"},{"name":"priority","isAttr":true,"type":"String"}]},{"name":"CallActivity","extends":["bpmn:CallActivity"],"properties":[{"name":"calledElementBinding","isAttr":true,"type":"String","default":"latest"},{"name":"calledElementVersion","isAttr":true,"type":"String"},{"name":"calledElementVersionTag","isAttr":true,"type":"String"},{"name":"calledElementTenantId","isAttr":true,"type":"String"},{"name":"caseRef","isAttr":true,"type":"String"},{"name":"caseBinding","isAttr":true,"type":"String","default":"latest"},{"name":"caseVersion","isAttr":true,"type":"String"},{"name":"caseTenantId","isAttr":true,"type":"String"},{"name":"variableMappingClass","isAttr":true,"type":"String"},{"name":"variableMappingDelegateExpression","isAttr":true,"type":"String"}]},{"name":"ServiceTaskLike","extends":["bpmn:ServiceTask","bpmn:BusinessRuleTask","bpmn:SendTask","bpmn:MessageEventDefinition"],"properties":[{"name":"expression","isAttr":true,"type":"String"},{"name":"class","isAttr":true,"type":"String"},{"name":"delegateExpression","isAttr":true,"type":"String"},{"name":"resultVariable","isAttr":true,"type":"String"}]},{"name":"DmnCapable","extends":["bpmn:BusinessRuleTask"],"properties":[{"name":"decisionRef","isAttr":true,"type":"String"},{"name":"decisionRefBinding","isAttr":true,"type":"String","default":"latest"},{"name":"decisionRefVersion","isAttr":true,"type":"String"},{"name":"mapDecisionResult","isAttr":true,"type":"String","default":"resultList"},{"name":"decisionRefTenantId","isAttr":true,"type":"String"}]},{"name":"ExternalCapable","extends":["camunda:ServiceTaskLike"],"properties":[{"name":"type","isAttr":true,"type":"String"},{"name":"topic","isAttr":true,"type":"String"}]},{"name":"TaskPriorized","extends":["bpmn:Process","camunda:ExternalCapable"],"properties":[{"name":"taskPriority","isAttr":true,"type":"String"}]},{"name":"Properties","superClass":["Element"],"meta":{"allowedIn":["*"]},"properties":[{"name":"values","type":"Property","isMany":true}]},{"name":"Property","superClass":["Element"],"properties":[{"name":"id","type":"String","isAttr":true},{"name":"name","type":"String","isAttr":true},{"name":"value","type":"String","isAttr":true}]},{"name":"Connector","superClass":["Element"],"meta":{"allowedIn":["camunda:ServiceTaskLike"]},"properties":[{"name":"inputOutput","type":"InputOutput"},{"name":"connectorId","type":"String"}]},{"name":"InputOutput","superClass":["Element"],"meta":{"allowedIn":["bpmn:FlowNode","camunda:Connector"]},"properties":[{"name":"inputOutput","type":"InputOutput"},{"name":"connectorId","type":"String"},{"name":"inputParameters","isMany":true,"type":"InputParameter"},{"name":"outputParameters","isMany":true,"type":"OutputParameter"}]},{"name":"InputOutputParameter","properties":[{"name":"name","isAttr":true,"type":"String"},{"name":"value","isBody":true,"type":"String"},{"name":"definition","type":"InputOutputParameterDefinition"}]},{"name":"InputOutputParameterDefinition","isAbstract":true},{"name":"List","superClass":["InputOutputParameterDefinition"],"properties":[{"name":"items","isMany":true,"type":"InputOutputParameterDefinition"}]},{"name":"Map","superClass":["InputOutputParameterDefinition"],"properties":[{"name":"entries","isMany":true,"type":"Entry"}]},{"name":"Entry","properties":[{"name":"key","isAttr":true,"type":"String"},{"name":"value","isBody":true,"type":"String"},{"name":"definition","type":"InputOutputParameterDefinition"}]},{"name":"Value","superClass":["InputOutputParameterDefinition"],"properties":[{"name":"id","isAttr":true,"type":"String"},{"name":"name","isAttr":true,"type":"String"},{"name":"value","isBody":true,"type":"String"}]},{"name":"Script","superClass":["InputOutputParameterDefinition"],"properties":[{"name":"scriptFormat","isAttr":true,"type":"String"},{"name":"resource","isAttr":true,"type":"String"},{"name":"value","isBody":true,"type":"String"}]},{"name":"Field","superClass":["Element"],"meta":{"allowedIn":["camunda:ServiceTaskLike","camunda:ExecutionListener","camunda:TaskListener"]},"properties":[{"name":"name","isAttr":true,"type":"String"},{"name":"expression","type":"String"},{"name":"stringValue","isAttr":true,"type":"String"},{"name":"string","type":"String"}]},{"name":"InputParameter","superClass":["InputOutputParameter"]},{"name":"OutputParameter","superClass":["InputOutputParameter"]},{"name":"Collectable","isAbstract":true,"extends":["bpmn:MultiInstanceLoopCharacteristics"],"superClass":["camunda:AsyncCapable"],"properties":[{"name":"collection","isAttr":true,"type":"String"},{"name":"elementVariable","isAttr":true,"type":"String"}]},{"name":"FailedJobRetryTimeCycle","superClass":["Element"],"meta":{"allowedIn":["camunda:AsyncCapable","bpmn:MultiInstanceLoopCharacteristics"]},"properties":[{"name":"body","isBody":true,"type":"String"}]},{"name":"ExecutionListener","superClass":["Element"],"meta":{"allowedIn":["bpmn:Task","bpmn:ServiceTask","bpmn:UserTask","bpmn:BusinessRuleTask","bpmn:ScriptTask","bpmn:ReceiveTask","bpmn:ManualTask","bpmn:ExclusiveGateway","bpmn:SequenceFlow","bpmn:ParallelGateway","bpmn:InclusiveGateway","bpmn:EventBasedGateway","bpmn:StartEvent","bpmn:IntermediateCatchEvent","bpmn:IntermediateThrowEvent","bpmn:EndEvent","bpmn:BoundaryEvent","bpmn:CallActivity","bpmn:SubProcess","bpmn:Process"]},"properties":[{"name":"expression","isAttr":true,"type":"String"},{"name":"class","isAttr":true,"type":"String"},{"name":"delegateExpression","isAttr":true,"type":"String"},{"name":"event","isAttr":true,"type":"String"},{"name":"script","type":"Script"},{"name":"fields","type":"Field","isMany":true}]},{"name":"TaskListener","superClass":["Element"],"meta":{"allowedIn":["bpmn:UserTask"]},"properties":[{"name":"expression","isAttr":true,"type":"String"},{"name":"class","isAttr":true,"type":"String"},{"name":"delegateExpression","isAttr":true,"type":"String"},{"name":"event","isAttr":true,"type":"String"},{"name":"script","type":"Script"},{"name":"fields","type":"Field","isMany":true},{"name":"id","type":"String","isAttr":true},{"name":"eventDefinitions","type":"bpmn:TimerEventDefinition","isMany":true}]},{"name":"FormProperty","superClass":["Element"],"meta":{"allowedIn":["bpmn:StartEvent","bpmn:UserTask"]},"properties":[{"name":"id","type":"String","isAttr":true},{"name":"name","type":"String","isAttr":true},{"name":"type","type":"String","isAttr":true},{"name":"required","type":"String","isAttr":true},{"name":"readable","type":"String","isAttr":true},{"name":"writable","type":"String","isAttr":true},{"name":"variable","type":"String","isAttr":true},{"name":"expression","type":"String","isAttr":true},{"name":"datePattern","type":"String","isAttr":true},{"name":"default","type":"String","isAttr":true},{"name":"values","type":"Value","isMany":true}]},{"name":"FormData","superClass":["Element"],"meta":{"allowedIn":["bpmn:StartEvent","bpmn:UserTask"]},"properties":[{"name":"fields","type":"FormField","isMany":true},{"name":"businessKey","type":"String","isAttr":true}]},{"name":"FormField","superClass":["Element"],"properties":[{"name":"id","type":"String","isAttr":true},{"name":"label","type":"String","isAttr":true},{"name":"type","type":"String","isAttr":true},{"name":"datePattern","type":"String","isAttr":true},{"name":"defaultValue","type":"String","isAttr":true},{"name":"properties","type":"Properties"},{"name":"validation","type":"Validation"},{"name":"values","type":"Value","isMany":true}]},{"name":"Validation","superClass":["Element"],"properties":[{"name":"constraints","type":"Constraint","isMany":true}]},{"name":"Constraint","superClass":["Element"],"properties":[{"name":"name","type":"String","isAttr":true},{"name":"config","type":"String","isAttr":true}]},{"name":"ConditionalEventDefinition","isAbstract":true,"extends":["bpmn:ConditionalEventDefinition"],"properties":[{"name":"variableName","isAttr":true,"type":"String"},{"name":"variableEvents","isAttr":true,"type":"String"}]}],"emumerations":[]}')},function(e,t,n){e.exports=n(931)},function(e,t,n){e.exports={__depends__:[n(1033),n(757).default],__init__:["propertiesProvider"],propertiesProvider:["type",n(1048)]}},,,,,,,function(e,t,n){"use strict";n.r(t),n.d(t,"default",(function(){return zu}));n(21);var i=n(722),r=n.n(i),o=n(802),a=n(912);function s(e){a.a.call(this,e),this.on("import.parse.complete",(function(e){e.error||this._collectIds(e.definitions,e.context)}),this),this.on("diagram.destroy",(function(){this.get("moddle").ids.clear()}),this)}r()(s,a.a),s.prototype._createModdle=function(e){var t=a.a.prototype._createModdle.call(this,e);return t.ids=new o.default([32,36,1]),t},s.prototype._collectIds=function(e,t){var n,i=e.$model.ids;for(n in i.clear(),t.elementsById)i.claim(n,t.elementsById[n])};var c=n(798),u=n(721),p=n(723);function l(e){return!e.altKey&&(e.ctrlKey||e.metaKey)}function d(e,t){return-1!==(e=Object(u.isArray)(e)?e:[e]).indexOf(t.key)||-1!==e.indexOf(t.keyCode)}function f(e){return e.shiftKey}function h(e,t){var n=this;this._config=e||{},this._eventBus=t,this._keydownHandler=this._keydownHandler.bind(this),this._keyupHandler=this._keyupHandler.bind(this),t.on("diagram.destroy",(function(){n._fire("destroy"),n.unbind()})),t.on("diagram.init",(function(){n._fire("init")})),t.on("attach",(function(){e&&e.bindTo&&n.bind(e.bindTo)})),t.on("detach",(function(){n.unbind()}))}h.$inject=["config.keyboard","eventBus"],h.prototype._keydownHandler=function(e){this._keyHandler(e,"keyboard.keydown")},h.prototype._keyupHandler=function(e){this._keyHandler(e,"keyboard.keyup")},h.prototype._keyHandler=function(e,t){if(!function(e){return e&&(Object(p.matches)(e,"input, textarea")||"true"===e.contentEditable)}(e.target)){var n={keyEvent:e};this._eventBus.fire(t||"keyboard.keydown",n)&&e.preventDefault()}},h.prototype.bind=function(e){this.unbind(),this._node=e,p.event.bind(e,"keydown",this._keydownHandler,!0),p.event.bind(e,"keyup",this._keyupHandler,!0),this._fire("bind")},h.prototype.getBinding=function(){return this._node},h.prototype.unbind=function(){var e=this._node;e&&(this._fire("unbind"),p.event.unbind(e,"keydown",this._keydownHandler,!0),p.event.unbind(e,"keyup",this._keyupHandler,!0)),this._node=null},h.prototype._fire=function(e){this._eventBus.fire("keyboard."+e,{node:this._node})},h.prototype.addListener=function(e,t,n){Object(u.isFunction)(e)&&(n=t,t=e,e=1e3),this._eventBus.on(n||"keyboard.keydown",e,t)},h.prototype.removeListener=function(e,t){this._eventBus.off(t||"keyboard.keydown",e)},h.prototype.hasModifier=function(e){return e.ctrlKey||e.metaKey||e.shiftKey||e.altKey},h.prototype.isCmd=l,h.prototype.isShift=f,h.prototype.isKey=d;var m=["c","C",67],v=["v","V",86],b=["y","Y",89],g=["z","Z",90];function y(e,t){var n=this;e.on("editorActions.init",500,(function(e){var i=e.editorActions;n.registerBindings(t,i)}))}y.$inject=["eventBus","keyboard"],y.prototype.registerBindings=function(e,t){function n(n,i){t.isRegistered(n)&&e.addListener(i)}n("undo",(function(e){var n=e.keyEvent;if(l(n)&&!f(n)&&d(g,n))return t.trigger("undo"),!0})),n("redo",(function(e){var n=e.keyEvent;if(l(n)&&(d(b,n)||d(g,n)&&f(n)))return t.trigger("redo"),!0})),n("copy",(function(e){var n=e.keyEvent;if(l(n)&&d(m,n))return t.trigger("copy"),!0})),n("paste",(function(e){var n=e.keyEvent;if(l(n)&&d(v,n))return t.trigger("paste"),!0})),n("stepZoom",(function(e){var n=e.keyEvent;if(d(["+","Add","="],n)&&l(n))return t.trigger("stepZoom",{value:1}),!0})),n("stepZoom",(function(e){var n=e.keyEvent;if(d(["-","Subtract"],n)&&l(n))return t.trigger("stepZoom",{value:-1}),!0})),n("zoom",(function(e){var n=e.keyEvent;if(d("0",n)&&l(n))return t.trigger("zoom",{value:1}),!0})),n("removeSelection",(function(e){if(d(["Backspace","Delete","Del"],e.keyEvent))return t.trigger("removeSelection"),!0}))};var x={__init__:["keyboard","keyboardBindings"],keyboard:["type",h],keyboardBindings:["type",y]},O={moveSpeed:50,moveSpeedAccelerated:200};function j(e,t,n){var i=this;this._config=Object(u.assign)({},O,e||{}),t.addListener((function(e){var n=e.keyEvent,r=i._config;if(!t.isCmd(n))return;if(t.isKey(["ArrowLeft","Left","ArrowUp","Up","ArrowDown","Down","ArrowRight","Right"],n)){var o,a=t.isShift(n)?r.moveSpeedAccelerated:r.moveSpeed;switch(n.key){case"ArrowLeft":case"Left":o="left";break;case"ArrowUp":case"Up":o="up";break;case"ArrowRight":case"Right":o="right";break;case"ArrowDown":case"Down":o="down"}return i.moveCanvas({speed:a,direction:o}),!0}})),this.moveCanvas=function(e){var t=0,i=0,r=e.speed/Math.min(Math.sqrt(n.viewbox().scale),1);switch(e.direction){case"left":t=r;break;case"up":i=r;break;case"right":t=-r;break;case"down":i=-r}n.scroll({dx:t,dy:i})}}j.$inject=["config.keyboardMove","keyboard","canvas"];var E={__depends__:[x],__init__:["keyboardMove"],keyboardMove:["type",j]},_=/^djs-cursor-.*$/;function w(e){var t=Object(p.classes)(document.body);t.removeMatching(_),e&&t.add("djs-cursor-"+e)}function S(){w(null)}function T(e,t){function n(){return!1}return t=t||"element.click",e.once(t,5e3,n),function(){e.off(t,n)}}function P(e){return{x:e.x+e.width/2,y:e.y+e.height/2}}function C(e,t){return{x:e.x-t.x,y:e.y-t.y}}var A=n(748);function R(e,t){var n;function i(i){var r,o=n.start,a=Object(A.c)(i),s=C(a,o);(!n.dragging&&(r=s,Math.sqrt(Math.pow(r.x,2)+Math.pow(r.y,2))>15)&&(n.dragging=!0,T(e),w("grab")),n.dragging)&&(s=C(a,n.last||n.start),t.scroll({dx:s.x,dy:s.y}),n.last=a);i.preventDefault()}function r(e){p.event.unbind(document,"mousemove",i),p.event.unbind(document,"mouseup",r),n=null,S()}e.on("element.mousedown",500,(function(e){return function(e){if(Object(p.closest)(e.target,".djs-draggable"))return;if(e.button||e.ctrlKey||e.shiftKey||e.altKey)return;return n={start:Object(A.c)(e)},p.event.bind(document,"mousemove",i),p.event.bind(document,"mouseup",r),!0}(e.originalEvent)}))}R.$inject=["eventBus","canvas"];var k={__init__:["moveCanvas"],moveCanvas:["type",R]};n(760);function B(e){return Math.log(e)/Math.log(10)}function M(e,t){var n=B(e.min),i=B(e.max);return(Math.abs(n)+Math.abs(i))/t}var D=Math.sign||function(e){return e>=0?1:-1},N={min:.2,max:4};function L(e,t,n){e=e||{},this._enabled=!1,this._canvas=n,this._container=n._container,this._handleWheel=Object(u.bind)(this._handleWheel,this),this._totalDelta=0,this._scale=e.scale||.75;var i=this;t.on("canvas.init",(function(t){i._init(!1!==e.enabled)}))}L.$inject=["config.zoomScroll","eventBus","canvas"],L.prototype.scroll=function(e){this._canvas.scroll(e)},L.prototype.reset=function(){this._canvas.zoom("fit-viewport")},L.prototype.zoom=function(e,t){var n=M(N,20);this._totalDelta+=e,Math.abs(this._totalDelta)>.1&&(this._zoom(e,t,n),this._totalDelta=0)},L.prototype._handleWheel=function(e){if(!Object(p.closest)(e.target,".djs-scrollable",!0)){var t=this._container;e.preventDefault();var n,i=e.ctrlKey,r=e.shiftKey,o=-1*this._scale;if(o*=i?0===e.deltaMode?.02:.32:0===e.deltaMode?1:16,i){var a=t.getBoundingClientRect(),s={x:e.clientX-a.left,y:e.clientY-a.top};n=Math.sqrt(Math.pow(e.deltaY,2)+Math.pow(e.deltaX,2))*D(e.deltaY)*o,this.zoom(n,s)}else n=r?{dx:o*e.deltaY,dy:0}:{dx:o*e.deltaX,dy:o*e.deltaY},this.scroll(n)}},L.prototype.stepZoom=function(e,t){var n=M(N,10);this._zoom(e,t,n)},L.prototype._zoom=function(e,t,n){var i=this._canvas,r=e>0?1:-1,o=B(i.zoom()),a=Math.round(o/n)*n;a+=n*r;var s,c,u=Math.pow(10,a);i.zoom((s=N,c=u,Math.max(s.min,Math.min(s.max,c))),t)},L.prototype.toggle=function(e){var t=this._container,n=this._handleWheel,i=this._enabled;return void 0===e&&(e=!i),i!==e&&p.event[e?"bind":"unbind"](t,"wheel",n,!1),this._enabled=e,e},L.prototype._init=function(e){this.toggle(e)};var I={__init__:["zoomScroll"],zoomScroll:["type",L]};function F(e){c.a.call(this,e)}r()(F,c.a),F.prototype._navigationModules=[E,k,I],F.prototype._modules=[].concat(c.a.prototype._modules,F.prototype._navigationModules);var z=n(766),V=n(930),$=n.n(V),H=["mousedown","mouseup","mouseover","mouseout","click","dblclick"];function G(e,t){return t.get(e,!1)}function W(e){e.preventDefault(),"function"==typeof e.stopPropagation?e.stopPropagation():e.srcEvent&&"function"==typeof e.srcEvent.stopPropagation&&e.srcEvent.stopPropagation(),"function"==typeof e.stopImmediatePropagation&&e.stopImmediatePropagation()}function q(e){function t(t){setTimeout((function(){Object(u.forEach)(H,(function(t){p.event.unbind(e,t,W,!0)}))}),500)}p.event.bind(e,"touchstart",(function(t){Object(u.forEach)(H,(function(t){p.event.bind(e,t,W,!0)}))}),!0),p.event.bind(e,"touchend",t,!0),p.event.bind(e,"touchcancel",t,!0);var n=new $.a.Manager(e,{inputClass:$.a.TouchInput,recognizers:[],domEvents:!0}),i=new $.a.Tap,r=new $.a.Pan({threshold:10}),o=new $.a.Press,a=new $.a.Pinch,s=new $.a.Tap({event:"doubletap",taps:2});return a.requireFailure(r),a.requireFailure(o),n.add([r,o,a,s,i]),n.reset=function(e){var t=this.recognizers,i=this.session;i.stopped||(n.stop(e),setTimeout((function(){var e,n;for(e=0;n=t[e];e++)n.reset(),n.state=8;i.curRecognizer=null}),0))},n.on("hammer.input",(function(e){e.srcEvent.defaultPrevented&&n.reset(!0)})),n}function U(e,t,n,i,r){var o,a=G("dragging",e),s=G("move",e),c=G("contextPad",e),u=G("palette",e);function l(e){return function(t){r.fire(e,t)}}function d(e){return Object(p.closest)(e,"svg, .djs-element",!0)}function f(e){function n(e){var n=d(e.target),r=n&&i.get(n);if(s&&t.getRootElement()!==r)return s.start(e,r,!0);!function(e){var n=0,i=0;function r(e){var r=e.deltaX-n,o=e.deltaY-i;t.scroll({dx:r,dy:o}),n=e.deltaX,i=e.deltaY}function a(e){o.off("panmove",r),o.off("panend",a),o.off("pancancel",a)}o.on("panmove",r),o.on("panend",a),o.on("pancancel",a)}()}(o=q(e)).on("doubletap",l("element.dblclick")),o.on("tap",l("element.click")),o.on("panstart",n),o.on("press",n),o.on("pinchstart",(function(e){var n=t.zoom(),i=e.center;function r(e){var r=1-(1-e.scale)/1.5,o=Math.max(.2,Math.min(4,r*n));t.zoom(o,i),W(e)}function a(e){o.off("pinchmove",r),o.off("pinchend",a),o.off("pinchcancel",a),o.reset(!0)}o.on("pinchmove",r),o.on("pinchend",a),o.on("pinchcancel",a)}))}a&&n.on("drag.move",(function(e){var t=e.originalEvent;if(t&&!(t instanceof MouseEvent)){var n=Object(A.c)(t),r=d(document.elementFromPoint(n.x,n.y)),o=r&&i.get(r);o!==e.hover&&(e.hover&&a.out(e),o&&(a.hover({element:o,gfx:r}),e.hover=o,e.hoverGfx=r))}})),c&&n.on("contextPad.create",(function(e){var t=q(e.pad.html);t.on("panstart",(function(e){c.trigger("dragstart",e,!0)})),t.on("press",(function(e){c.trigger("dragstart",e,!0)})),t.on("tap",(function(e){c.trigger("click",e)}))})),u&&n.on("palette.create",(function(e){var t=q(e.container);t.on("panstart",(function(e){u.trigger("dragstart",e,!0)})),t.on("press",(function(e){u.trigger("dragstart",e,!0)})),t.on("tap",(function(e){u.trigger("click",e)}))})),n.on("canvas.init",(function(e){f(e.svg)}))}U.$inject=["injector","canvas","eventBus","elementRegistry","interactionEvents","touchFix"];var K=n(727);function Y(e,t){var n=this;t.on("canvas.init",(function(e){n.addBBoxMarker(e.svg)}))}Y.$inject=["canvas","eventBus"],Y.prototype.addBBoxMarker=function(e){var t={fill:"none",class:"outer-bound-marker"},n=Object(K.f)("rect");Object(K.b)(n,{x:-1e4,y:1e4,width:10,height:10}),Object(K.b)(n,t),Object(K.a)(e,n);var i=Object(K.f)("rect");Object(K.b)(i,{x:1e4,y:1e4,width:10,height:10}),Object(K.b)(i,t),Object(K.a)(e,i)};var X={__depends__:[{__depends__:[z.a],__init__:["touchInteractionEvents"],touchInteractionEvents:["type",U],touchFix:["type",Y]}]};function J(e){return e&&e[e.length-1]}function Z(e){return e.y}function Q(e){return e.x}var ee={left:Q,center:Q,right:function(e){return e.x+e.width},top:Z,middle:Z,bottom:function(e){return e.y+e.height}};function te(e){this._modeling=e}te.$inject=["modeling"],te.prototype._getOrientationDetails=function(e){var t="x",n="width";return-1!==["top","bottom","middle"].indexOf(e)&&(t="y",n="height"),{axis:t,dimension:n}},te.prototype._isType=function(e,t){return-1!==t.indexOf(e)},te.prototype._alignmentPosition=function(e,t){var n,i,r,o=this._getOrientationDetails(e),a=o.axis,s=o.dimension,c={},p={},l=!1;if(this._isType(e,["left","top"]))c[e]=t[0][a];else if(this._isType(e,["right","bottom"]))r=J(t),c[e]=r[a]+r[s];else if(this._isType(e,["center","middle"])){if(Object(u.forEach)(t,(function(e){var t=e[a]+Math.round(e[s]/2);p[t]?p[t].elements.push(e):p[t]={elements:[e],center:t}})),n=Object(u.sortBy)(p,(function(e){return e.elements.length>1&&(l=!0),e.elements.length})),l)return c[e]=J(n).center,c;i=t[0],r=J(t=Object(u.sortBy)(t,(function(e){return e[a]+e[s]}))),c[e]=function(e,t){return Math.round((e[a]+t[a]+t[s])/2)}(i,r)}return c},te.prototype.trigger=function(e,t){var n=this._modeling,i=Object(u.filter)(e,(function(e){return!(e.waypoints||e.host||e.labelTarget)})),r=ee[t],o=Object(u.sortBy)(i,r),a=this._alignmentPosition(t,o);n.alignElements(o,a)};var ne={__init__:["alignElements"],alignElements:["type",te]},ie=n(726);n(43),n(33);function re(e,t,n,i){for(var r;r=ae(e,n,t);)n=i(t,n,r);return n}function oe(e){return function(t,n,i){var r={x:n.x,y:n.y};return["x","y"].forEach((function(o){var a=e[o];if(a){var s="x"===o?"width":"height",c=a.margin,u=a.minDistance;r[o]=c<0?Math.min(i[o]+c-t[s]/2,n[o]-u+c):Math.max(i[o]+i[s]+c+t[s]/2,n[o]+u+c)}})),r}}function ae(e,t,n){var i={x:t.x-n.width/2,y:t.y-n.height/2,width:n.width,height:n.height},r=function(e){var t=se(e);e.host&&(t=t.concat(se(e.host)));e.attachers&&(t=t.concat(e.attachers.reduce((function(e,t){return e.concat(se(t))}),[])));return t}(e);return Object(u.find)(r,(function(e){return e!==n&&"intersect"===Object(ie.f)(e,i,10)}))}function se(e){return(t=e,t.outgoing.map((function(e){return e.target}))).concat(function(e){return e.incoming.map((function(e){return e.source}))}(e));var t}function ce(){return!0}function ue(e,t){e.on("autoPlace",100,(function(e){var t=e.shape;return function(e,t,n){n||(n={});var i=n.defaultDistance||50,r=Object(ie.e)(e);return{x:Object(ie.b)(e).right+i+t.width/2,y:r.y}}(e.source,t)})),this.append=function(n,i,r){e.fire("autoPlace.start",{source:n,shape:i});var o=e.fire("autoPlace",{source:n,shape:i}),a=t.appendShape(n,i,o,n.parent,r);return e.fire("autoPlace.end",{source:n,shape:a}),a}}function pe(e,t){e.on("autoPlace.end",500,(function(e){t.select(e.shape)}))}ue.$inject=["eventBus","modeling"],pe.$inject=["eventBus","selection"];var le={__init__:["autoPlaceSelectionBehavior"],autoPlace:["type",ue],autoPlaceSelectionBehavior:["type",pe]},de=n(720),fe=n(730);function he(e,t){return Object(de.is)(t,"bpmn:TextAnnotation")?function(e,t){var n=Object(ie.b)(e),i={x:n.right+t.width/2,y:n.top-50-t.height/2};return re(e,t,i,oe({y:{margin:-30,minDistance:20}}))}(e,t):Object(fe.isAny)(t,["bpmn:DataObjectReference","bpmn:DataStoreReference"])?function(e,t){var n=Object(ie.b)(e),i={x:n.right-10+t.width/2,y:n.bottom+40+t.width/2};return re(e,t,i,oe({x:{margin:30,minDistance:30}}))}(e,t):Object(de.is)(t,"bpmn:FlowNode")?function(e,t){var n=Object(ie.b)(e),i=Object(ie.e)(e),r=function(e,t){t||(t={});var n=t.defaultDistance||50,i=t.direction||"e",r=t.filter,o=t.getWeight||function(t){return t.source===e?1:-1},a=t.maxDistance||250,s=t.reference||"start";function c(e,t){return"n"===i?"start"===s?Object(ie.b)(e).top-Object(ie.b)(t).bottom:"center"===s?Object(ie.b)(e).top-Object(ie.e)(t).y:Object(ie.b)(e).top-Object(ie.b)(t).top:"w"===i?"start"===s?Object(ie.b)(e).left-Object(ie.b)(t).right:"center"===s?Object(ie.b)(e).left-Object(ie.e)(t).x:Object(ie.b)(e).left-Object(ie.b)(t).left:"s"===i?"start"===s?Object(ie.b)(t).top-Object(ie.b)(e).bottom:"center"===s?Object(ie.e)(t).y-Object(ie.b)(e).bottom:Object(ie.b)(t).bottom-Object(ie.b)(e).bottom:"start"===s?Object(ie.b)(t).left-Object(ie.b)(e).right:"center"===s?Object(ie.e)(t).x-Object(ie.b)(e).right:Object(ie.b)(t).right-Object(ie.b)(e).right}r||(r=ce);var p=e.incoming.filter(r).map((function(t){var n=o(t),i=n<0?c(t.source,e):c(e,t.source);return{id:t.source.id,distance:i,weight:n}})),l=e.outgoing.filter(r).map((function(t){var n=o(t),i=n>0?c(e,t.target):c(t.target,e);return{id:t.target.id,distance:i,weight:n}})),d=p.concat(l).reduce((function(e,t){return e[t.id+"__weight_"+t.weight]=t,e}),{});return Object(u.reduce)(d,(function(e,t){var n=t.distance,i=t.weight;return n<0||n>a||(e[String(n)]||(e[String(n)]=0),e[String(n)]+=1*i,(!e.distance||e[e.distance]<e[String(n)])&&(e.distance=n)),e}),{}).distance||n}(e,{filter:function(e){return Object(de.is)(e,"bpmn:SequenceFlow")}}),o=30,a="left";Object(de.is)(e,"bpmn:BoundaryEvent")&&-1!==(a=Object(ie.f)(e,e.host,-25)).indexOf("top")&&(o*=-1);var s={x:n.right+r+t.width/2,y:i.y+me(a,80)};return re(e,t,s,oe({y:{margin:o,minDistance:80}}))}(e,t):void 0}function me(e,t){return-1!=e.indexOf("top")?-1*t:-1!=e.indexOf("bottom")?t:0}function ve(e){e.on("autoPlace",(function(e){var t=e.shape;return he(e.source,t)}))}ve.$inject=["eventBus"];var be={__depends__:[le],__init__:["bpmnAutoPlace"],bpmnAutoPlace:["type",ve]},ge=n(728);n(35);function ye(e){this._eventBus=e}ye.$inject=["eventBus"],ye.prototype.on=function(e,t,n,i,r,o){if((Object(u.isFunction)(t)||Object(u.isNumber)(t))&&(o=r,r=i,i=n,n=t,t=null),Object(u.isFunction)(n)&&(o=r,r=i,i=n,n=1e3),Object(u.isObject)(r)&&(o=r,r=!1),!Object(u.isFunction)(i))throw new Error("handlerFn must be a function");Object(u.isArray)(e)||(e=[e]);var a=this._eventBus;Object(u.forEach)(e,(function(e){var s=["commandStack",e,t].filter((function(e){return e})).join(".");a.on(s,n,r?function(e,t){return function(n){return e.call(t||null,n.context,n.command,n)}}(i,o):i,o)}))};function xe(e,t,n,i){ye.call(this,e),this._elementRegistry=t,this._modeling=n,this._rules=i;var r=this;this.postExecuted(["shape.create"],(function(e){var t=e.context,n=t.hints||{},i=t.shape,o=t.parent||t.newParent;!1!==n.autoResize&&r._expand([i],o)})),this.postExecuted(["elements.move"],(function(e){var t=e.context,n=Object(u.flatten)(Object(u.values)(t.closure.topLevel)),i=t.hints,o=!i||i.autoResize;if(!1!==o){var a=Object(u.groupBy)(n,(function(e){return e.parent.id}));Object(u.forEach)(a,(function(e,t){Object(u.isArray)(o)&&(e=e.filter((function(e){return Object(u.find)(o,Object(u.matchPattern)({id:e.id}))}))),r._expand(e,t)}))}})),this.postExecuted(["shape.toggleCollapse"],(function(e){var t=e.context,n=t.hints,i=t.shape;n&&!1===n.autoResize||i.collapsed||r._expand(i.children||[],i)})),this.postExecuted(["shape.resize"],(function(e){var t=e.context,n=t.hints,i=t.shape,o=i.parent;n&&!1===n.autoResize||o&&r._expand([i],o)}))}function Oe(e){e.invoke(xe,this)}Object(u.forEach)(["canExecute","preExecute","preExecuted","execute","executed","postExecute","postExecuted","revert","reverted"],(function(e){ye.prototype[e]=function(t,n,i,r,o){(Object(u.isFunction)(t)||Object(u.isNumber)(t))&&(o=r,r=i,i=n,n=t,t=null),this.on(t,e,n,i,r,o)}})),xe.$inject=["eventBus","elementRegistry","modeling","rules"],r()(xe,ye),xe.prototype._getOptimalBounds=function(e,t){var n=this.getOffset(t),i=this.getPadding(t),r=Object(ie.b)(Object(ge.b)(e)),o=Object(ie.b)(t),a={};return r.top-o.top<i.top&&(a.top=r.top-n.top),r.left-o.left<i.left&&(a.left=r.left-n.left),o.right-r.right<i.right&&(a.right=r.right+n.right),o.bottom-r.bottom<i.bottom&&(a.bottom=r.bottom+n.bottom),Object(ie.a)(Object(u.assign)({},o,a))},xe.prototype._expand=function(e,t){if("string"==typeof t&&(t=this._elementRegistry.get(t)),this._rules.allowed("element.autoResize",{elements:e,target:t})){var n=this._getOptimalBounds(e,t);if(function(e,t){return e.x!==t.x||e.y!==t.y||e.width!==t.width||e.height!==t.height}(n,t)){var i=function(e,t){var n="";e=Object(ie.b)(e),t=Object(ie.b)(t),e.top>t.top&&(n=n.concat("n"));e.right<t.right&&(n=n.concat("w"));e.bottom<t.bottom&&(n=n.concat("s"));e.left>t.left&&(n=n.concat("e"));return n}(Object(u.pick)(t,["x","y","width","height"]),n);this.resize(t,n,{autoResize:i});var r=t.parent;r&&this._expand([t],r)}}},xe.prototype.getOffset=function(e){return{top:60,bottom:60,left:100,right:100}},xe.prototype.getPadding=function(e){return{top:2,bottom:2,left:15,right:15}},xe.prototype.resize=function(e,t,n){this._modeling.resizeShape(e,t,null,n)},Oe.$inject=["injector"],r()(Oe,xe),Oe.prototype.resize=function(e,t,n){Object(de.is)(e,"bpmn:Participant")?this._modeling.resizeLane(e,t,null,n):this._modeling.resizeShape(e,t,null,n)};n(20);function je(e){ye.call(this,e),this.init()}function Ee(e){je.call(this,e);var t=this;this.addRule("element.autoResize",(function(e){return t.canResize(e.elements,e.target)}))}function _e(e,t){Ee.call(this,e),this._modeling=t}je.$inject=["eventBus"],r()(je,ye),je.prototype.addRule=function(e,t,n){var i=this;"string"==typeof e&&(e=[e]),e.forEach((function(e){i.canExecute(e,t,(function(e,t,i){return n(e)}),!0)}))},je.prototype.init=function(){},Ee.$inject=["eventBus"],r()(Ee,je),Ee.prototype.canResize=function(e,t){return!1},r()(_e,Ee),_e.$inject=["eventBus","modeling"],_e.prototype.canResize=function(e,t){if(!Object(de.is)(t,"bpmn:Participant")&&!Object(de.is)(t,"bpmn:Lane")&&!Object(de.is)(t,"bpmn:SubProcess"))return!1;var n=!0;return Object(u.forEach)(e,(function(e){(Object(de.is)(e,"bpmn:Lane")||e.labelTarget)&&(n=!1)})),n};var we={__init__:["bpmnAutoResize","bpmnAutoResizeProvider"],bpmnAutoResize:["type",Oe],bpmnAutoResizeProvider:["type",_e]};function Se(e,t,n){var i,r,o=this,a=n.get("dragging",!1);a&&t.on("drag.start",(function(n){t.once("drag.move",1500,(function(t){!function(t){if(!t.hover){var n=t.originalEvent,i=o._findTargetGfx(n),r=i&&e.get(i);i&&r&&(t.stopPropagation(),a.hover({element:r,gfx:i}),a.move(n))}}(t)}))})),t.on("element.hover",(function(e){i=e.gfx,r=e.element})),t.on("element.hover",1500,(function(e){r&&t.fire("element.out",{element:r,gfx:i})})),t.on("element.out",(function(){i=null,r=null})),this._findTargetGfx=function(e){var t;if(e instanceof MouseEvent)return t=Object(A.c)(e),function(e){return Object(p.closest)(e,"svg, .djs-element",!0)}(document.elementFromPoint(t.x,t.y))}}Se.$inject=["elementRegistry","eventBus","injector"];var Te={__init__:["hoverFix"],hoverFix:["type",Se]},Pe=n(744),Ce=Math.round;function Ae(e){e.preventDefault()}function Re(e,t,n,i){var r,o={threshold:5,trapClick:!0};function a(e){var n=t.viewbox(),i=t._container.getBoundingClientRect();return{x:n.x+(e.x-i.left)/n.scale,y:n.y+(e.y-i.top)/n.scale}}function s(t,n){n=n||r;var i=e.createEvent(Object(u.assign)({},n.payload,n.data,{isTouch:n.isTouch}));return!1!==e.fire("drag."+t,i)&&e.fire(n.prefix+"."+t,i)}function c(e,i){var o,c=r.payload,p=r.displacement,l=r.globalStart,d=Object(A.c)(e),f=C(d,l),h=r.localStart,m=a(d),v=C(m,h);if(!r.active&&(i||(o=f,Math.sqrt(Math.pow(o.x,2)+Math.pow(o.y,2))>r.threshold))){if(Object(u.assign)(c,{x:Ce(h.x+p.x),y:Ce(h.y+p.y),dx:0,dy:0},{originalEvent:e}),!1===s("start"))return b();r.active=!0,r.keepSelection||(c.previousSelection=n.get(),n.select(null)),r.cursor&&w(r.cursor),t.addMarker(t.getRootElement(),"djs-drag-active")}Object(A.b)(e),r.active&&(Object(u.assign)(c,{x:Ce(m.x+p.x),y:Ce(m.y+p.y),dx:Ce(v.x),dy:Ce(v.y)},{originalEvent:e}),s("move"))}function l(e){var t=!0;r.active&&(e&&(r.payload.originalEvent=e,Object(A.b)(e)),t=s("end")),!1===t&&s("rejected"),s("ended",g(!0!==t))}function d(e){27===e.which&&(Ae(e),b())}function f(t){var n;r.active&&(n=T(e),setTimeout(n,400),Ae(t)),l(t)}function h(e){c(e)}function m(e){var t=r.payload;t.hoverGfx=e.gfx,t.hover=e.element,s("hover")}function v(e){s("out");var t=r.payload;t.hoverGfx=null,t.hover=null}function b(e){var t;if(r){var n=r.active;n&&s("cancel"),t=g(e),n&&s("canceled",t)}}function g(o){var a,u;s("cleanup"),S(),u=r.trapClick?f:l,p.event.unbind(document,"mousemove",c),p.event.unbind(document,"dragstart",Ae),p.event.unbind(document,"selectstart",Ae),p.event.unbind(document,"mousedown",u,!0),p.event.unbind(document,"mouseup",u,!0),p.event.unbind(document,"keyup",d),p.event.unbind(document,"touchstart",h,!0),p.event.unbind(document,"touchcancel",b,!0),p.event.unbind(document,"touchmove",c,!0),p.event.unbind(document,"touchend",l,!0),e.off("element.hover",m),e.off("element.out",v),t.removeMarker(t.getRootElement(),"djs-drag-active");var g=r.payload.previousSelection;return!1!==o&&g&&!n.get().length&&function(e){var t=e.filter((function(e){return i.get(e.id)}));t.length&&n.select(t)}(g),a=r,r=null,a}e.on("diagram.destroy",b),this.init=function(t,n,i,g){r&&b(!1),"string"==typeof n&&(g=i,i=n,n=null);var y,x,O,j,E,_=(g=Object(u.assign)({},o,g||{})).data||{};j=g.trapClick?f:l,t?(y=Object(A.a)(t)||t,x=Object(A.c)(t),Object(A.b)(t),"dragstart"===y.type&&Ae(y)):(y=null,x={x:0,y:0}),O=a(x),n||(n=O),E=function(e){return"undefined"!=typeof TouchEvent&&e instanceof TouchEvent}(y),r=Object(u.assign)({prefix:i,data:_,payload:{},globalStart:x,displacement:C(n,O),localStart:O,isTouch:E},g),g.manual||(E?(p.event.bind(document,"touchstart",h,!0),p.event.bind(document,"touchcancel",b,!0),p.event.bind(document,"touchmove",c,!0),p.event.bind(document,"touchend",l,!0)):(p.event.bind(document,"mousemove",c),p.event.bind(document,"dragstart",Ae),p.event.bind(document,"selectstart",Ae),p.event.bind(document,"mousedown",j,!0),p.event.bind(document,"mouseup",j,!0)),p.event.bind(document,"keyup",d),e.on("element.hover",m),e.on("element.out",v)),s("init"),g.autoActivate&&c(t,!0)},this.move=c,this.hover=m,this.out=v,this.end=l,this.cancel=b,this.context=function(){return r},this.setOptions=function(e){Object(u.assign)(o,e)}}Re.$inject=["eventBus","canvas","selection","elementRegistry"];var ke={__depends__:[Te,Pe.a],dragging:["type",Re]};function Be(e,t,n){this._canvas=n,this._opts=Object(u.assign)({scrollThresholdIn:[20,20,20,20],scrollThresholdOut:[0,0,0,0],scrollRepeatTimeout:15,scrollStep:10},e);var i=this;t.on("drag.move",(function(e){var t=i._toBorderPoint(e);i.startScroll(t)})),t.on(["drag.cleanup"],(function(){i.stopScroll()}))}function Me(e,t,n){return t<e&&e<n}Be.$inject=["config.autoScroll","eventBus","canvas"],Be.prototype.startScroll=function(e){var t=this._canvas,n=this._opts,i=this,r=t.getContainer().getBoundingClientRect(),o=[e.x,e.y,r.width-e.x,r.height-e.y];this.stopScroll();for(var a=0,s=0,c=0;c<4;c++)Me(o[c],n.scrollThresholdOut[c],n.scrollThresholdIn[c])&&(0===c?a=n.scrollStep:1==c?s=n.scrollStep:2==c?a=-n.scrollStep:3==c&&(s=-n.scrollStep));0===a&&0===s||(t.scroll({dx:a,dy:s}),this._scrolling=setTimeout((function(){i.startScroll(e)}),n.scrollRepeatTimeout))},Be.prototype.stopScroll=function(){clearTimeout(this._scrolling)},Be.prototype.setOptions=function(e){this._opts=Object(u.assign)({},this._opts,e)},Be.prototype._toBorderPoint=function(e){var t=this._canvas._container.getBoundingClientRect(),n=Object(A.c)(e.originalEvent);return{x:n.x-t.left,y:n.y-t.top}};var De={__depends__:[ke],__init__:["autoScroll"],autoScroll:["type",Be]};function Ne(e){this._commandStack=e.get("commandStack",!1)}Ne.$inject=["injector"],Ne.prototype.allowed=function(e,t){var n=!0,i=this._commandStack;return i&&(n=i.canExecute(e,t)),void 0===n||n};var Le={__init__:["rules"],rules:["type",Ne]},Ie=n(751),Fe=n(741),ze=n(842),Ve=n.n(ze),$e=Math.round,He=Math.max;function Ge(e,t){return function(e,t){var n,i;for(n=0;i=e[n];n++)if(Object(Ie.b)(i,t)<=10)return{point:e[n],bendpoint:!0,index:n};return null}(e,t)||function(e,t){var n,i,r,o,a=Ve()((r=10,[["M",(i=t).x,i.y],["m",0,-r],["a",r,r,0,1,1,0,2*r],["a",r,r,0,1,1,0,-2*r],["z"]]),(n=[],e.forEach((function(e,t){n.push([0===t?"M":"L",e.x,e.y])})),n)),s=a[0],c=a[a.length-1];return s?s!==c?s.segment2!==c.segment2?{point:e[o=He(s.segment2,c.segment2)-1],bendpoint:!0,index:o}:{point:{x:$e(s.x+c.x)/2,y:$e(s.y+c.y)/2},index:s.segment2}:{point:{x:$e(s.x),y:$e(s.y)},index:s.segment2}:null}(e,t)}function We(e,t,n){return Ge(t,function(e,t){var n,i=Object(A.c)(t),r=e._container.getBoundingClientRect();n={x:r.left,y:r.top};var o=e.viewbox();return{x:o.x+(i.x-n.x)/o.scale,y:o.y+(i.y-n.y)/o.scale}}(e,n))}function qe(e,t){var n=Object(K.f)("g");Object(K.c)(n).add("djs-bendpoint"),Object(K.a)(e,n);var i=Object(K.f)("circle");Object(K.b)(i,{cx:0,cy:0,r:4}),Object(K.c)(i).add("djs-visual"),Object(K.a)(n,i);var r=Object(K.f)("circle");return Object(K.b)(r,{cx:0,cy:0,r:10}),Object(K.c)(r).add("djs-hit"),Object(K.a)(n,r),t&&Object(K.c)(n).add(t),n}function Ue(e,t,n,i){var r=Object(K.f)("g");Object(K.a)(e,r);var o=function(e,t,n){var i=t.x-e.x,r=t.y-e.y;return Ye("h"===n?i:r)}(t,n,i),a=Object(K.f)("rect");Object(K.b)(a,{x:-7,y:-1.5,width:14,height:3}),Object(K.c)(a).add("djs-visual"),Object(K.a)(r,a);var s=Object(K.f)("rect");return Object(K.b)(s,{x:-o/2,y:-7,width:o,height:14}),Object(K.c)(s).add("djs-hit"),Object(K.a)(r,s),Object(Fe.a)(r,"v"===i?90:0,0,0),r}function Ke(e,t,n){var i=Object(K.f)("g"),r=Object(Ie.a)(t,n),o=Object(Ie.d)(t,n);return Object(K.a)(e,i),Ue(i,t,n,o),Object(K.c)(i).add("djs-segment-dragger"),Object(K.c)(i).add("h"===o?"horizontal":"vertical"),Object(Fe.c)(i,r.x,r.y),i}function Ye(e){return Math.abs(Math.round(2*e/3))}var Xe=n(803),Je=n.n(Xe);function Ze(e,t,n,i,r){function o(e,n){var o=n.waypoints,a=We(t,o,e);if(a)return!function(e,t,n){var i,r,o,a,s,c,u=e.index,p=e.point;return!(u<=0||e.bendpoint)&&(i=t[u-1],r=t[u],o=Object(Ie.a)(i,r),a=Object(Ie.d)(i,r),s=Math.abs(p.x-o.x),c=Math.abs(p.y-o.y),a&&s<=n&&c<=n)}(a,o,function(e,t){var n,i,r=e.waypoints;return t.index<=0||t.bendpoint?null:(n={start:r[t.index-1],end:r[t.index]},(i=Object(Ie.d)(n.start,n.end))?Ye("h"===i?n.end.x-n.start.x:n.end.y-n.start.y)/2:null)}(n,a))?i.start(e,n,a.index,!a.bendpoint):r.start(e,n,a.index),!0}function a(e,t,i){p.event.bind(e,t,(function(e){n.triggerMouseEvent(t,e,i),e.stopPropagation()}))}function s(e,n){var i=t.getLayer("overlays"),r=Object(p.query)('.djs-bendpoints[data-element-id="'+Je()(e.id)+'"]',i);return!r&&n&&(r=Object(K.f)("g"),Object(K.b)(r,{"data-element-id":e.id}),Object(K.c)(r).add("djs-bendpoints"),Object(K.a)(i,r),a(r,"mousedown",e),a(r,"click",e),a(r,"dblclick",e)),r}function c(e,t){return Object(p.query)('.djs-segment-dragger[data-segment-idx="'+e+'"]',t)}function l(e,t){t.waypoints.forEach((function(t,n){var i=qe(e);Object(K.a)(e,i),Object(Fe.c)(i,t.x,t.y)})),qe(e,"floating")}function d(e,t){for(var n,i,r,o=t.waypoints,s=1;s<o.length;s++)n=o[s-1],i=o[s],Object(Ie.d)(n,i)&&(r=Ke(e,n,i),Object(K.b)(r,{"data-segment-idx":s}),a(r,"mousemove",t))}function f(e){var t=s(e);return t||(l(t=s(e,!0),e),d(t,e)),t}function h(e){var t=s(e);t&&(!function(e){Object(u.forEach)(Object(p.queryAll)(".djs-segment-dragger",e),(function(e){Object(K.j)(e)}))}(t),function(e){Object(u.forEach)(Object(p.queryAll)(".djs-bendpoint",e),(function(e){Object(K.j)(e)}))}(t),d(t,e),l(t,e))}function m(e,t,n){var i,r,o=c(t.index,e),a=n[t.index-1],s=n[t.index],u=t.point,l=Object(Ie.a)(a,s),d=Object(Ie.d)(a,s);o&&(i=function(e){return Object(p.query)(".djs-visual",e)}(o),r={x:u.x-l.x,y:u.y-l.y},"v"===d&&(r={x:r.y,y:r.x}),Object(Fe.c)(i,r.x,r.y))}e.on("connection.changed",(function(e){h(e.element)})),e.on("connection.remove",(function(e){var t=s(e.element);t&&Object(K.j)(t)})),e.on("element.marker.update",(function(e){var t,n=e.element;n.waypoints&&(t=f(n),e.add?Object(K.c)(t).add(e.marker):Object(K.c)(t).remove(e.marker))})),e.on("element.mousemove",(function(e){var n,i,r=e.element,o=r.waypoints;if(o){if(n=s(r,!0),!(i=We(t,o,e.originalEvent)))return;!function(e,t){var n=Object(p.query)(".floating",e),i=t.point;n&&Object(Fe.c)(n,i.x,i.y)}(n,i),i.bendpoint||m(n,i,o)}})),e.on("element.mousedown",(function(e){var t=e.originalEvent,n=e.element;if(n.waypoints)return o(t,n)})),e.on("selection.changed",(function(e){var t=e.newSelection[0];t&&t.waypoints&&f(t)})),e.on("element.hover",(function(e){var t=e.element;t.waypoints&&(f(t),n.registerEvent(e.gfx,"mousemove","element.mousemove"))})),e.on("element.out",(function(e){n.unregisterEvent(e.gfx,"mousemove","element.mousemove")})),e.on("element.updateId",(function(e){var t=e.element,n=e.newId;if(t.waypoints){var i=s(t);i&&Object(K.b)(i,{"data-element-id":n})}})),this.addHandles=f,this.updateHandles=h,this.getBendpointsContainer=s,this.getSegmentDragger=c}Ze.$inject=["eventBus","canvas","interactionEvents","bendpointMove","connectionSegmentMove"];n(14),n(86);var Qe=Math.round;function et(e,t,n,i,r,o){this._injector=e,this.start=function(e,t,o,a){var s,c=n.getGraphics(t),u=t.source,p=t.target,l=t.waypoints,d="updateWaypoints"===(s=a||0!==o?a||o!==l.length-1?"updateWaypoints":"reconnectEnd":"reconnectStart")?"connection.updateWaypoints":"connection.reconnect",f=r.allowed(d,{connection:t,source:u,target:p});!1===f&&(f=r.allowed(d,{connection:t,source:p,target:u})),!1!==f&&i.init(e,"bendpoint.move",{data:{connection:t,connectionGfx:c,context:{allowed:f,bendpointIndex:o,connection:t,source:u,target:p,insert:a,type:s}}})},t.on("bendpoint.move.hover",(function(e){var t,n=e.context,i=n.connection,o=i.source,a=i.target,s=e.hover,c=n.type;if(n.hover=s,s){var u="updateWaypoints"===c?"connection.updateWaypoints":"connection.reconnect";if(t=n.allowed=r.allowed(u,{connection:i,source:"reconnectStart"===c?s:o,target:"reconnectEnd"===c?s:a}))return n.source="reconnectStart"===c?s:o,void(n.target="reconnectEnd"===c?s:a);!1===t&&(t=n.allowed=r.allowed(u,{connection:i,source:"reconnectEnd"===c?s:a,target:"reconnectStart"===c?s:o})),t&&(n.source="reconnectEnd"===c?s:a,n.target="reconnectStart"===c?s:o)}})),t.on(["bendpoint.move.out","bendpoint.move.cleanup"],(function(e){var t=e.context;t.hover=null,t.source=null,t.target=null,t.allowed=!1})),t.on("bendpoint.move.end",(function(e){var t=e.context,n=t.allowed,i=t.bendpointIndex,r=t.connection,a=t.insert,s=r.waypoints.slice(),c=t.source,u=t.target,p=t.type,l=t.hints||{},d={x:Qe(e.x),y:Qe(e.y)};if(!n)return!1;"updateWaypoints"===p?(a?s.splice(i,0,d):s[i]=d,l.bendpointMove={insert:a,bendpointIndex:i},s=this.cropWaypoints(r,s),o.updateWaypoints(r,Object(ie.c)(s),l)):("reconnectStart"===p?(l.docking="source",tt(t)&&(l.docking="target",l.newWaypoints=s.reverse())):"reconnectEnd"===p&&(l.docking="target",tt(t)&&(l.docking="source",l.newWaypoints=s.reverse())),o.reconnect(r,c,u,d,l))}),this)}function tt(e){var t=e.hover,n=e.source,i=e.target,r=e.type;return"reconnectStart"===r?t&&i&&t===i&&n!==i:"reconnectEnd"===r?t&&n&&t===n&&n!==i:void 0}et.$inject=["injector","eventBus","canvas","dragging","rules","modeling"],et.prototype.cropWaypoints=function(e,t){var n=this._injector.get("connectionDocking",!1);if(!n)return t;var i=e.waypoints;return e.waypoints=t,e.waypoints=n.getCroppedWaypoints(e),t=e.waypoints,e.waypoints=i,t};function nt(e,t,n,i){this._injector=t;var r=t.get("connectionPreview",!1);n.on("bendpoint.move.start",(function(e){var t=e.context,n=t.bendpointIndex,r=t.connection,o=t.insert,a=r.waypoints,s=a.slice();t.waypoints=a,o&&s.splice(n,0,{x:e.x,y:e.y}),r.waypoints=s;var c=t.draggerGfx=qe(i.getLayer("overlays"));Object(K.c)(c).add("djs-dragging"),i.addMarker(r,"djs-element-hidden"),i.addMarker(r,"djs-updating")})),n.on("bendpoint.move.hover",(function(e){var t=e.context,n=t.allowed,r=t.hover,o=t.type;if(r){if(i.addMarker(r,"connect-hover"),"updateWaypoints"===o)return;n?(i.removeMarker(r,"connect-not-ok"),i.addMarker(r,"connect-ok")):!1===n&&(i.removeMarker(r,"connect-ok"),i.addMarker(r,"connect-not-ok"))}})),n.on(["bendpoint.move.out","bendpoint.move.cleanup"],1100,(function(e){var t=e.context,n=t.hover,r=t.target;n&&(i.removeMarker(n,"connect-hover"),i.removeMarker(n,r?"connect-ok":"connect-not-ok"))})),n.on("bendpoint.move.move",(function(t){var n=t.context,i=n.allowed,o=n.bendpointIndex,a=n.draggerGfx,s=n.hover,c=n.type,u=n.connection,p=u.source,l=u.target,d=u.waypoints.slice(),f={x:t.x,y:t.y},h=n.hints||{},m={};r&&(h.connectionStart&&(m.connectionStart=h.connectionStart),h.connectionEnd&&(m.connectionEnd=h.connectionEnd),"reconnectStart"===c?tt(n)?(m.connectionEnd=m.connectionEnd||f,m.source=l,m.target=s||p,d=d.reverse()):(m.connectionStart=m.connectionStart||f,m.source=s||p,m.target=l):"reconnectEnd"===c?tt(n)?(m.connectionStart=m.connectionStart||f,m.source=s||l,m.target=p,d=d.reverse()):(m.connectionEnd=m.connectionEnd||f,m.source=p,m.target=s||l):(m.noCropping=!0,m.noLayout=!0,d[o]=f),"updateWaypoints"===c&&(d=e.cropWaypoints(u,d)),m.waypoints=d,r.drawPreview(n,i,m)),Object(Fe.c)(a,t.x,t.y)}),this),n.on(["bendpoint.move.end","bendpoint.move.cancel"],1100,(function(e){var t=e.context,n=t.connection,o=t.draggerGfx,a=t.hover,s=t.target,c=t.waypoints;n.waypoints=c,Object(K.j)(o),i.removeMarker(n,"djs-updating"),i.removeMarker(n,"djs-element-hidden"),a&&(i.removeMarker(a,"connect-ok"),i.removeMarker(a,s?"connect-ok":"connect-not-ok")),r&&r.cleanUp(t)}))}nt.$inject=["bendpointMove","injector","eventBus","canvas"];function it(e,t,n){return rt(e,t,e[t]+n)}function rt(e,t,n){return{x:"x"===t?n:e.x,y:"y"===t?n:e.y}}function ot(e){return"x"===e?"y":"x"}function at(e,t,n){var i,r;return e.original?e.original:(i=Object(ie.e)(t),rt(e,r=ot(n),i[r]))}function st(e,t,n,i,r,o){var a=e.get("connectionDocking",!1);function s(e,t){if(!a)return t;var n,i=e.waypoints;return e.waypoints=t,n=a.getCroppedWaypoints(e),e.waypoints=i,n}function c(e){r.update("connection",e.connection,e.connectionGfx)}function u(e,t,n){var i=e.newWaypoints,r=function(e,t,n,i){var r=Math.max(t[i],n[i]),o=Math.min(t[i],n[i]);return rt(t,i,Math.min(Math.max(o+20,e[i]),r-20))}(n,i[e.segmentStartIndex+t],i[e.segmentEndIndex+t],ot(e.axis));Object(Fe.c)(e.draggerGfx,r.x,r.y)}this.start=function(e,t,r){var o,a,s,c,u=n.getGraphics(t),p=r-1,l=r,d=t.waypoints,f=d[p],h=d[l],m=We(n,d,e);(a=Object(Ie.d)(f,h))&&(s="v"===a?"x":"y",0===p&&(f=at(f,t.source,s)),l===d.length-1&&(h=at(h,t.target,s)),o={connection:t,segmentStartIndex:p,segmentEndIndex:l,segmentStart:f,segmentEnd:h,axis:s,dragPosition:c=m?m.point:{x:(f.x+h.x)/2,y:(f.y+h.y)/2}},i.init(e,c,"connectionSegment.move",{cursor:"x"===s?"resize-ew":"resize-ns",data:{connection:t,connectionGfx:u,context:o}}))},t.on("connectionSegment.move.start",(function(e){var t=e.context,i=e.connection,r=n.getLayer("overlays");t.originalWaypoints=i.waypoints.slice(),t.draggerGfx=Ke(r,t.segmentStart,t.segmentEnd),Object(K.c)(t.draggerGfx).add("djs-dragging"),n.addMarker(i,"djs-updating")})),t.on("connectionSegment.move.move",(function(e){var t,n,i=e.context,r=i.connection,o=i.segmentStartIndex,a=i.segmentEndIndex,p=i.segmentStart,l=i.segmentEnd,d=i.axis,f=i.originalWaypoints.slice(),h=it(p,d,e["d"+d]),m=it(l,d,e["d"+d]),v=f.length,b=0;f[o]=h,f[a]=m,o<2&&(t=Object(ie.f)(r.source,h),1===o?"intersect"===t&&(f.shift(),f[0]=h,b--):"intersect"!==t&&(f.unshift(p),b++)),a>v-3&&(n=Object(ie.f)(r.target,m),a===v-2?"intersect"===n&&(f.pop(),f[f.length-1]=m):"intersect"!==n&&f.push(l)),i.newWaypoints=r.waypoints=s(r,f),u(i,b,e),i.newSegmentStartIndex=o+b,c(e)})),t.on("connectionSegment.move.hover",(function(e){e.context.hover=e.hover,n.addMarker(e.hover,"connect-hover")})),t.on(["connectionSegment.move.out","connectionSegment.move.cleanup"],(function(e){var t=e.context.hover;t&&n.removeMarker(t,"connect-hover")})),t.on("connectionSegment.move.cleanup",(function(e){var t=e.context,i=t.connection;t.draggerGfx&&Object(K.j)(t.draggerGfx),n.removeMarker(i,"djs-updating")})),t.on(["connectionSegment.move.cancel","connectionSegment.move.end"],(function(e){var t=e.context;t.connection.waypoints=t.originalWaypoints,c(e)})),t.on("connectionSegment.move.end",(function(e){var t=e.context,n=t.connection,i=t.newWaypoints,r=t.newSegmentStartIndex,a=function(e,t){var n=0;return{waypoints:e.filter((function(i,r){return!Object(Ie.e)(e[r-1],e[r+1],i)||(n=r<=t?n-1:n,!1)})),segmentOffset:n}}(i=i.map((function(e){return{original:e.original,x:Math.round(e.x),y:Math.round(e.y)}})),r),c=s(n,a.waypoints),u=a.segmentOffset,p={segmentMove:{segmentStartIndex:t.segmentStartIndex,newSegmentStartIndex:r+u}};o.updateWaypoints(n,c,p)}))}st.$inject=["injector","eventBus","canvas","dragging","graphicsFactory","modeling"];var ct=Math.abs,ut=Math.round;function pt(e){return{x:e.x,y:e.y}}function lt(e){return{x:e.x+e.width,y:e.y+e.height}}function dt(e,t){return!e||isNaN(e.x)||isNaN(e.y)?t:{x:ut(e.x+e.width/2),y:ut(e.y+e.height/2)}}function ft(e,t){var n=e.snapped;return!!n&&("string"==typeof t?n[t]:n.x&&n.y)}function ht(e,t,n){if("string"!=typeof t)throw new Error("axis must be in [x, y]");if("number"!=typeof n&&!1!==n)throw new Error("value must be Number or false");var i,r=e[t],o=e.snapped=e.snapped||{};return!1===n?o[t]=!1:(o[t]=!0,i=n-r,e[t]+=i,e["d"+t]+=i),r}function mt(e){return e.children||[]}var vt=Math.abs,bt=Math.round;function gt(e){function t(e,t){if(Object(u.isArray)(e)){for(var n=e.length;n--;)if(vt(e[n]-t)<=10)return e[n]}else{var i=t%(e=+e);if(i<10)return t-i;if(i>e-10)return t-i+e}return t}function n(e){if(e.width)return{x:bt(e.width/2+e.x),y:bt(e.height/2+e.y)}}e.on("connectionSegment.move.move",1500,(function(e){var i,r,o=function(e){var t=e.snapPoints,i=e.connection,r=i.waypoints,o=e.segmentStart,a=e.segmentStartIndex,s=e.segmentEnd,c=e.segmentEndIndex,p=e.axis;if(t)return t;var l=[r[a-1],o,s,r[c+1]];return a<2&&l.unshift(n(i.source)),c>r.length-3&&l.unshift(n(i.target)),e.snapPoints=t={horizontal:[],vertical:[]},Object(u.forEach)(l,(function(e){e&&(e=e.original||e,"y"===p&&t.horizontal.push(e.y),"x"===p&&t.vertical.push(e.x))})),t}(e.context),a=e.x,s=e.y;if(o){var c=a-(i=t(o.vertical,a)),p=s-(r=t(o.horizontal,s));Object(u.assign)(e,{dx:e.dx-c,dy:e.dy-p,x:i,y:r}),(c||-1!==o.vertical.indexOf(a))&&ht(e,"x",i),(p||-1!==o.horizontal.indexOf(s))&&ht(e,"y",r)}})),e.on(["bendpoint.move.move","bendpoint.move.end"],1500,(function(e){var i,r,o=e.context,a=function(e){var t=e.snapPoints,n=e.connection.waypoints,i=e.bendpointIndex;if(t)return t;var r=[n[i-1],n[i+1]];return e.snapPoints=t={horizontal:[],vertical:[]},Object(u.forEach)(r,(function(e){e&&(e=e.original||e,t.horizontal.push(e.y),t.vertical.push(e.x))})),t}(o),s=o.hover,c=s&&n(s),p=e.x,l=e.y;if(a){var d=p-(i=t(c?a.vertical.concat([c.x]):a.vertical,p)),f=l-(r=t(c?a.horizontal.concat([c.y]):a.horizontal,l));Object(u.assign)(e,{dx:e.dx-d,dy:e.dy-f,x:e.x-d,y:e.y-f}),(d||-1!==a.vertical.indexOf(p))&&ht(e,"x",i),(f||-1!==a.horizontal.indexOf(l))&&ht(e,"y",r)}}))}gt.$inject=["eventBus"];var yt={__depends__:[ke,Le],__init__:["bendpoints","bendpointSnapping","bendpointMovePreview"],bendpoints:["type",Ze],bendpointMove:["type",et],bendpointMovePreview:["type",nt],connectionSegmentMove:["type",st],bendpointSnapping:["type",gt]};function xt(e,t,n,i){function r(e,t){return i.allowed("connection.create",{source:e,target:t})}e.on("connect.hover",(function(e){var t,n=e.context,i=n.start,o=e.hover;if(n.hover=o,t=n.canExecute=r(i,o),!Object(u.isNil)(t)){if(!1!==t)return n.source=i,void(n.target=o);t=n.canExecute=r(o,i),Object(u.isNil)(t)||!1!==t&&(n.source=o,n.target=i)}})),e.on(["connect.out","connect.cleanup"],(function(e){var t=e.context;t.hover=null,t.source=null,t.target=null,t.canExecute=!1})),e.on("connect.end",(function(e){var t=e.context,i=t.canExecute,r=t.connectionStart,o={x:e.x,y:e.y},a=t.source,s=t.target;if(!i)return!1;var c=null,p={connectionStart:Ot(t)?o:r,connectionEnd:Ot(t)?r:o};Object(u.isObject)(i)&&(c=i),n.connect(a,s,c,p)})),this.start=function(e,n,i,r){Object(u.isObject)(i)||(r=i,i=Object(ie.e)(n)),t.init(e,"connect",{autoActivate:r,data:{shape:n,context:{start:n,connectionStart:i}}})}}function Ot(e){var t=e.hover,n=e.source,i=e.target;return t&&n&&t===n&&n!==i}xt.$inject=["eventBus","dragging","modeling","rules"];function jt(e,t,n){var i=e.get("connectionPreview",!1);i&&t.on("connect.move",(function(e){var t=e.context,n=t.canExecute,r=t.hover,o=t.source,a=t.start,s=t.startPosition,c=t.connectionStart,u=t.connectionEnd,p=t.target;c||(c=Ot(t)?{x:e.x,y:e.y}:s),u||(u=Ot(t)?s:{x:e.x,y:e.y}),i.drawPreview(t,n,{source:o||a,target:p||r,connectionStart:c,connectionEnd:u})})),t.on("connect.hover",900,(function(e){var t=e.context,i=e.hover,r=t.canExecute;null!==r&&n.addMarker(i,r?"connect-ok":"connect-not-ok")})),t.on(["connect.out","connect.cleanup"],1100,(function(e){var t=e.hover;t&&(n.removeMarker(t,"connect-ok"),n.removeMarker(t,"connect-not-ok"))})),i&&t.on("connect.cleanup",(function(e){i.cleanUp(e.context)}))}jt.$inject=["injector","eventBus","canvas"];var Et={__depends__:[Pe.a,Le,ke],__init__:["connectPreview"],connect:["type",xt],connectPreview:["type",jt]};function _t(e,t,n,i){this._canvas=t,this._graphicsFactory=n,this._elementFactory=i,this._connectionDocking=e.get("connectionDocking",!1),this._layouter=e.get("layouter",!1)}_t.$inject=["injector","canvas","graphicsFactory","elementFactory"],_t.prototype.drawPreview=function(e,t,n){n=n||{};var i,r,o,a=e.connectionPreviewGfx,s=e.getConnection,c=n.source,u=n.target,p=n.waypoints,l=n.connectionStart,d=n.connectionEnd,f=n.noLayout,h=n.noCropping,m=n.noNoop,v=this;a||(a=e.connectionPreviewGfx=this.createConnectionPreviewGfx()),Object(K.d)(a),s||(s=e.getConnection=(r=function(e,t,n){return v.getConnection(e,t,n)},o={},function(e){var t=JSON.stringify(e),n=o[t];return n||(n=o[t]=r.apply(null,arguments)),n})),t&&(i=s(t,c,u)),i?(i.waypoints=p||[],this._layouter&&!f&&(i.waypoints=this._layouter.layoutConnection(i,{source:c,target:u,connectionStart:l,connectionEnd:d,waypoints:n.waypoints||i.waypoints})),i.waypoints&&i.waypoints.length||(i.waypoints=[c?Object(ie.e)(c):l,u?Object(ie.e)(u):d]),this._connectionDocking&&(c||u)&&!h&&(i.waypoints=this._connectionDocking.getCroppedWaypoints(i,c,u)),this._graphicsFactory.drawConnection(a,i)):!m&&this.drawNoopPreview(a,n)},_t.prototype.drawNoopPreview=function(e,t){var n=t.source,i=t.target,r=t.connectionStart||Object(ie.e)(n),o=t.connectionEnd||Object(ie.e)(i),a=this.cropWaypoints(r,o,n,i),s=this.createNoopConnection(a[0],a[1]);Object(K.a)(e,s)},_t.prototype.cropWaypoints=function(e,t,n,i){var r=this._graphicsFactory,o=n&&r.getShapePath(n),a=i&&r.getShapePath(i),s=r.getConnectionPath({waypoints:[e,t]});return[e=n&&Object(ie.d)(o,s,!0)||e,t=i&&Object(ie.d)(a,s,!1)||t]},_t.prototype.cleanUp=function(e){e&&e.connectionPreviewGfx&&Object(K.j)(e.connectionPreviewGfx)},_t.prototype.getConnection=function(e){var t=function(e){return Object(u.isObject)(e)?e:{}}(e);return this._elementFactory.createConnection(t)},_t.prototype.createConnectionPreviewGfx=function(){var e=Object(K.f)("g");return Object(K.b)(e,{pointerEvents:"none"}),Object(K.c)(e).add("djs-connection-preview"),Object(K.a)(this._canvas.getDefaultLayer(),e),e},_t.prototype.createNoopConnection=function(e,t){var n=Object(K.f)("polyline");return Object(K.b)(n,{stroke:"#333",strokeDasharray:[1],strokeWidth:2,"pointer-events":"none"}),Object(K.b)(n,{points:[e.x,e.y,t.x,t.y]}),n};var wt={__init__:["connectionPreview"],connectionPreview:["type",_t]},St=(n(117),n(1),n(22),Math.min),Tt=Math.max;function Pt(e){e.preventDefault()}function Ct(e){e.stopPropagation()}function At(e){this.container=e.container,this.parent=Object(p.domify)('<div class="djs-direct-editing-parent"><div class="djs-direct-editing-content" contenteditable="true"></div></div>'),this.content=Object(p.query)("[contenteditable]",this.parent),this.keyHandler=e.keyHandler||function(){},this.resizeHandler=e.resizeHandler||function(){},this.autoResize=Object(u.bind)(this.autoResize,this),this.handlePaste=Object(u.bind)(this.handlePaste,this)}function Rt(e,t){this._eventBus=e,this._providers=[],this._textbox=new At({container:t.getContainer(),keyHandler:Object(u.bind)(this._handleKey,this),resizeHandler:Object(u.bind)(this._handleResize,this)})}At.prototype.create=function(e,t,n,i){var r=this.parent,o=this.content,a=this.container;i=this.options=i||{},t=this.style=t||{};var s=Object(u.pick)(t,["width","height","maxWidth","maxHeight","minWidth","minHeight","left","top","backgroundColor","position","overflow","border","wordWrap","textAlign","outline","transform"]);Object(u.assign)(r.style,{width:e.width+"px",height:e.height+"px",maxWidth:e.maxWidth+"px",maxHeight:e.maxHeight+"px",minWidth:e.minWidth+"px",minHeight:e.minHeight+"px",left:e.x+"px",top:e.y+"px",backgroundColor:"#ffffff",position:"absolute",overflow:"visible",border:"1px solid #ccc",boxSizing:"border-box",wordWrap:"normal",textAlign:"center",outline:"none"},s);var c=Object(u.pick)(t,["fontFamily","fontSize","fontWeight","lineHeight","padding","paddingTop","paddingRight","paddingBottom","paddingLeft"]);return Object(u.assign)(o.style,{boxSizing:"border-box",width:"100%",outline:"none",wordWrap:"break-word"},c),i.centerVertically&&Object(u.assign)(o.style,{position:"absolute",top:"50%",transform:"translate(0, -50%)"},c),o.innerText=n,p.event.bind(o,"keydown",this.keyHandler),p.event.bind(o,"mousedown",Ct),p.event.bind(o,"paste",this.handlePaste),i.autoResize&&p.event.bind(o,"input",this.autoResize),i.resizable&&this.resizable(t),a.appendChild(r),this.setSelection(o.lastChild,o.lastChild&&o.lastChild.length),r},At.prototype.handlePaste=function(e){var t,n=this.options,i=this.style;if(e.preventDefault(),t=e.clipboardData?e.clipboardData.getData("text/plain"):window.clipboardData.getData("Text"),this.insertText(t),n.autoResize){var r=this.autoResize(i);r&&this.resizeHandler(r)}},At.prototype.insertText=function(e){e=e.replace(/\r\n|\r|\n/g,"\n"),document.execCommand("insertText",!1,e)||this._insertTextIE(e)},At.prototype._insertTextIE=function(e){var t,n,i,r=this.getSelection(),o=r.startContainer,a=r.endContainer,s=r.startOffset,c=r.endOffset,u=r.commonAncestorContainer,l=(t=u.childNodes,[].slice.call(t));if(u.nodeType===Node.TEXT_NODE){var d=o.textContent;o.textContent=d.substring(0,s)+e+d.substring(c),n=o,i=s+e.length}else if(o===this.content&&a===this.content){var f=document.createTextNode(e);this.content.insertBefore(f,l[s]),n=f,i=f.textContent.length}else{var h=l.indexOf(o),m=l.indexOf(a);l.forEach((function(t,n){n===h?t.textContent=o.textContent.substring(0,s)+e+a.textContent.substring(c):n>h&&n<=m&&Object(p.remove)(t)})),n=o,i=s+e.length}n&&void 0!==i&&setTimeout((function(){self.setSelection(n,i)}))},At.prototype.autoResize=function(){var e=this.parent,t=this.content,n=parseInt(this.style.fontSize)||12;if(t.scrollHeight>e.offsetHeight||t.scrollHeight<e.offsetHeight-n){var i=e.getBoundingClientRect(),r=t.scrollHeight;e.style.height=r+"px",this.resizeHandler({width:i.width,height:i.height,dx:0,dy:r-i.height})}},At.prototype.resizable=function(){var e=this,t=this.parent,n=this.resizeHandle,i=parseInt(this.style.minWidth)||0,r=parseInt(this.style.minHeight)||0,o=parseInt(this.style.maxWidth)||1/0,a=parseInt(this.style.maxHeight)||1/0;if(!n){var s,c,l,d;n=this.resizeHandle=Object(p.domify)('<div class="djs-direct-editing-resize-handle"></div>');var f=function(n){Pt(n),Ct(n);var u=St(Tt(l+n.clientX-s,i),o),p=St(Tt(d+n.clientY-c,r),a);t.style.width=u+"px",t.style.height=p+"px",e.resizeHandler({width:l,height:d,dx:n.clientX-s,dy:n.clientY-c})},h=function e(t){Pt(t),Ct(t),p.event.unbind(document,"mousemove",f,!1),p.event.unbind(document,"mouseup",e,!1)};p.event.bind(n,"mousedown",(function(e){Pt(e),Ct(e),s=e.clientX,c=e.clientY;var n=t.getBoundingClientRect();l=n.width,d=n.height,p.event.bind(document,"mousemove",f),p.event.bind(document,"mouseup",h)}))}Object(u.assign)(n.style,{position:"absolute",bottom:"0px",right:"0px",cursor:"nwse-resize",width:"0",height:"0",borderTop:(parseInt(this.style.fontSize)/4||3)+"px solid transparent",borderRight:(parseInt(this.style.fontSize)/4||3)+"px solid #ccc",borderBottom:(parseInt(this.style.fontSize)/4||3)+"px solid #ccc",borderLeft:(parseInt(this.style.fontSize)/4||3)+"px solid transparent"}),t.appendChild(n)},At.prototype.destroy=function(){var e=this.parent,t=this.content,n=this.resizeHandle;t.innerText="",e.removeAttribute("style"),t.removeAttribute("style"),p.event.unbind(t,"keydown",this.keyHandler),p.event.unbind(t,"mousedown",Ct),p.event.unbind(t,"input",this.autoResize),p.event.unbind(t,"paste",this.handlePaste),n&&(n.removeAttribute("style"),Object(p.remove)(n)),Object(p.remove)(e)},At.prototype.getValue=function(){return this.content.innerText.trim()},At.prototype.getSelection=function(){return window.getSelection().getRangeAt(0)},At.prototype.setSelection=function(e,t){var n=document.createRange();null===e?n.selectNodeContents(this.content):(n.setStart(e,t),n.setEnd(e,t));var i=window.getSelection();i.removeAllRanges(),i.addRange(n)},Rt.$inject=["eventBus","canvas"],Rt.prototype.registerProvider=function(e){this._providers.push(e)},Rt.prototype.isActive=function(){return!!this._active},Rt.prototype.cancel=function(){this._active&&(this._fire("cancel"),this.close())},Rt.prototype._fire=function(e,t){this._eventBus.fire("directEditing."+e,t||{active:this._active})},Rt.prototype.close=function(){this._textbox.destroy(),this._fire("deactivate"),this._active=null,this.resizable=void 0},Rt.prototype.complete=function(){var e=this._active;if(e){var t,n=e.context.bounds,i=this.$textbox.getBoundingClientRect(),r=this.getValue();r===e.context.text&&i.height===n.height&&i.width===n.width||(t=this._textbox.container.getBoundingClientRect(),e.provider.update(e.element,r,e.context.text,{x:i.left-t.left,y:i.top-t.top,width:i.width,height:i.height})),this._fire("complete"),this.close()}},Rt.prototype.getValue=function(){return this._textbox.getValue()},Rt.prototype._handleKey=function(e){e.stopPropagation();var t=e.keyCode||e.charCode;return 27===t?(e.preventDefault(),this.cancel()):13!==t||e.shiftKey?void 0:(e.preventDefault(),this.complete())},Rt.prototype._handleResize=function(e){this._fire("resize",e)},Rt.prototype.activate=function(e){var t;this.isActive()&&this.cancel();var n=Object(u.find)(this._providers,(function(n){return(t=n.activate(e))?n:null}));return t&&(this.$textbox=this._textbox.create(t.bounds,t.style,t.text,t.options),this._active={element:e,context:t,provider:n},t.options&&t.options.resizable&&(this.resizable=!0),this._fire("activate")),!!t};var kt={__depends__:[z.a],__init__:["directEditing"],directEditing:["type",Rt]},Bt=n(828);n(11),n(0),n(8),n(30);function Mt(e,t,n){this._eventBus=t,this._overlays=n;var i=Object(u.isDefined)(e&&e.scale)?e.scale:{min:1,max:1.5};this._overlaysConfig={position:{right:-9,top:-6},scale:i},this._current=null,this._init()}Mt.$inject=["config.contextPad","eventBus","overlays"],Mt.prototype._init=function(){var e=this._eventBus,t=this;e.on("selection.changed",(function(e){var n=e.newSelection;1===n.length?t.open(n[0]):t.close()})),e.on("elements.delete",(function(e){var n=e.elements;Object(u.forEach)(n,(function(e){t.isOpen(e)&&t.close()}))})),e.on("element.changed",(function(e){var n=e.element,i=t._current;i&&i.element===n&&t.open(n,!0)}))},Mt.prototype.registerProvider=function(e,t){t||(t=e,e=1e3),this._eventBus.on("contextPad.getProviders",e,(function(e){e.providers.push(t)}))},Mt.prototype.getEntries=function(e){var t=this._getProviders(),n={};return Object(u.forEach)(t,(function(t){var i=t.getContextPadEntries(e);Object(u.isFunction)(i)?n=i(n):Object(u.forEach)(i,(function(e,t){n[t]=e}))})),n},Mt.prototype.trigger=function(e,t,n){var i,r,o=this._current.element,a=this._current.entries,s=t.delegateTarget||t.target;if(!s)return t.preventDefault();if(i=a[Object(p.attr)(s,"data-action")].action,r=t.originalEvent||t,Object(u.isFunction)(i)){if("click"===e)return i(r,o,n)}else if(i[e])return i[e](r,o,n);t.preventDefault()},Mt.prototype.open=function(e,t){!t&&this.isOpen(e)||(this.close(),this._updateAndOpen(e))},Mt.prototype._getProviders=function(e){var t=this._eventBus.createEvent({type:"contextPad.getProviders",providers:[]});return this._eventBus.fire(t),t.providers},Mt.prototype._updateAndOpen=function(e){var t=this.getEntries(e),n=this.getPad(e),i=n.html;Object(u.forEach)(t,(function(e,t){var n,r=e.group||"default",o=Object(p.domify)(e.html||'<div class="entry" draggable="true"></div>');Object(p.attr)(o,"data-action",t),(n=Object(p.query)("[data-group="+r+"]",i))||(n=Object(p.domify)('<div class="group" data-group="'+r+'"></div>'),i.appendChild(n)),n.appendChild(o),e.className&&function(e,t){var n=Object(p.classes)(e);(Object(u.isArray)(t)?t:t.split(/\s+/g)).forEach((function(e){n.add(e)}))}(o,e.className),e.title&&Object(p.attr)(o,"title",e.title),e.imageUrl&&o.appendChild(Object(p.domify)('<img src="'+e.imageUrl+'">'))})),Object(p.classes)(i).add("open"),this._current={element:e,pad:n,entries:t},this._eventBus.fire("contextPad.open",{current:this._current})},Mt.prototype.getPad=function(e){if(this.isOpen())return this._current.pad;var t=this,n=this._overlays,i=Object(p.domify)('<div class="djs-context-pad"></div>'),r=Object(u.assign)({html:i},this._overlaysConfig);p.delegate.bind(i,".entry","click",(function(e){t.trigger("click",e)})),p.delegate.bind(i,".entry","dragstart",(function(e){t.trigger("dragstart",e)})),p.event.bind(i,"mousedown",(function(e){e.stopPropagation()})),this._overlayId=n.add(e,"context-pad",r);var o=n.get(this._overlayId);return this._eventBus.fire("contextPad.create",{element:e,pad:o}),o},Mt.prototype.close=function(){this.isOpen()&&(this._overlays.remove(this._overlayId),this._overlayId=null,this._eventBus.fire("contextPad.close",{current:this._current}),this._current=null)},Mt.prototype.isOpen=function(e){return!(!this._current||e&&this._current.element!==e)};var Dt={__depends__:[z.a,Bt.a],contextPad:["type",Mt]},Nt=(n(85),n(801)),Lt=["marker-start","marker-mid","marker-end"],It=["circle","ellipse","line","path","polygon","polyline","rect"];function Ft(e,t,n,i){this._elementRegistry=e,this._canvas=n,this._styles=i,this._clonedMarkers={};var r=this;t.on("drag.cleanup",(function(){Object(u.forEach)(r._clonedMarkers,(function(e){Object(K.j)(e)})),r._clonedMarkers={}}))}Ft.$inject=["elementRegistry","eventBus","canvas","styles"],Ft.prototype.getGfx=function(e){return this._elementRegistry.getGraphics(e)},Ft.prototype.addDragger=function(e,t,n){n=n||this.getGfx(e);var i=Object(K.e)(n),r=n.getBoundingClientRect();return this._cloneMarkers(Object(Nt.b)(i)),Object(K.b)(i,this._styles.cls("djs-dragger",[],{x:r.top,y:r.left})),Object(K.a)(t,i),i},Ft.prototype.addFrame=function(e,t){var n=Object(K.f)("rect",{class:"djs-resize-overlay",width:e.width,height:e.height,x:e.x,y:e.y});return Object(K.a)(t,n),n},Ft.prototype._cloneMarkers=function(e){var t,n=this;if(e.childNodes)for(var i=0;i<e.childNodes.length;i++)n._cloneMarkers(e.childNodes[i]);(t=e,-1!==It.indexOf(t.nodeName))&&Lt.forEach((function(t){if(Object(K.b)(e,t)){var i=function(e,t,n){var i=(r=Object(K.b)(e,t),r.match(/url\(['"]?#([^'"]*)['"]?\)/)[1]);var r;return Object(p.query)("marker#"+i,n||document)}(e,t,n._canvas.getContainer());n._cloneMarker(e,i,t)}}))},Ft.prototype._cloneMarker=function(e,t,n){var i=t.id,r=this._clonedMarkers[i];if(!r){var o=i+"-clone";(r=Object(K.e)(t)).id=o,Object(K.c)(r).add("djs-dragger").add("djs-dragger-marker"),this._clonedMarkers[i]=r;var a=Object(p.query)("defs",this._canvas._svg);a||(a=Object(K.f)("defs"),Object(K.a)(this._canvas._svg,a)),Object(K.a)(a,r)}var s="url(#"+this._clonedMarkers[i].id+")";Object(K.b)(e,n,s)};var zt={__init__:["previewSupport"],previewSupport:["type",Ft]},Vt="drop-ok",$t="drop-not-ok",Ht="attach-ok",Gt="new-parent";function Wt(e,t,n,i,r){function o(t,n){[Ht,Vt,$t,Gt].forEach((function(i){i===n?e.addMarker(t,i):e.removeMarker(t,i)}))}function a(){var e=t.context();e&&"create"===e.prefix&&t.cancel()}n.on(["create.move","create.hover"],(function(e){var t=e.context,n=t.elements,i=e.hover,a=t.source,s=t.hints||{};if(!i)return t.canExecute=!1,void(t.target=null);qt(e);var c={x:e.x,y:e.y},p=t.canExecute=i&&function(e,t,n,i,o){if(!t)return!1;e=Object(u.filter)(e,(function(t){var n=t.labelTarget;return!(t.parent||function(e){return!!e.labelTarget}(t)&&-1!==e.indexOf(n))}));var a=Object(u.find)(e,(function(e){return!Ut(e)})),s=!1,c=!1,p=!1;Kt(e)&&(s=r.allowed("shape.attach",{position:n,shape:a,target:t})),s||(p=Kt(e)?r.allowed("shape.create",{position:n,shape:a,source:i,target:t}):r.allowed("elements.create",{elements:e,position:n,target:t}));var l=o.connectionTarget;return p||s?(a&&i&&(c=r.allowed("connection.create",{source:l===i?a:i,target:l===i?i:a,hints:{targetParent:t,targetAttach:s}})),{attach:s,connect:c}):(null===p||null===s)&&null}(n,i,c,a,s);i&&null!==p&&(t.target=i,p&&p.attach?o(i,Ht):o(i,p?Gt:$t))})),n.on(["create.end","create.out","create.cleanup"],(function(e){var t=e.hover;t&&o(t,null)})),n.on("create.end",(function(e){var t=e.context,n=t.source,r=t.shape,o=t.elements,a=t.target,s=t.canExecute,c=s&&s.attach,p=s&&s.connect,l=t.hints||{};if(!1===s||!a)return!1;qt(e);var d={x:e.x,y:e.y};p?r=i.appendShape(n,r,d,a,{attach:c,connection:!0===p?{}:p,connectionTarget:l.connectionTarget}):(o=i.createElements(o,d,a,Object(u.assign)({},l,{attach:c})),r=Object(u.find)(o,(function(e){return!Ut(e)}))),Object(u.assign)(t,{elements:o,shape:r}),Object(u.assign)(e,{elements:o,shape:r})})),n.on("create.init",(function(){n.on("elements.changed",a),n.once(["create.cancel","create.end"],2e3,(function(){n.off("elements.changed",a)}))})),this.start=function(e,n,i){Object(u.isArray)(n)||(n=[n]);var r=Object(u.find)(n,(function(e){return!Ut(e)}));if(r){i=Object(u.assign)({elements:n,hints:{},shape:r},i||{}),Object(u.forEach)(n,(function(e){Object(u.isNumber)(e.x)||(e.x=0),Object(u.isNumber)(e.y)||(e.y=0)}));var o=Object(ge.b)(n);Object(u.forEach)(n,(function(e){Ut(e)&&(e.waypoints=Object(u.map)(e.waypoints,(function(e){return{x:e.x-o.x-o.width/2,y:e.y-o.y-o.height/2}}))),Object(u.assign)(e,{x:e.x-o.x-o.width/2,y:e.y-o.y-o.height/2})})),t.init(e,"create",{cursor:"grabbing",autoActivate:!0,data:{shape:r,elements:n,context:i}})}}}function qt(e){var t=e.context.createConstraints;t&&(t.left&&(e.x=Math.max(e.x,t.left)),t.right&&(e.x=Math.min(e.x,t.right)),t.top&&(e.y=Math.max(e.y,t.top)),t.bottom&&(e.y=Math.min(e.y,t.bottom)))}function Ut(e){return!!e.waypoints}function Kt(e){return e&&1===e.length&&!Ut(e[0])}Wt.$inject=["canvas","dragging","eventBus","modeling","rules"];function Yt(e,t,n,i,r){t.on("create.move",750,(function(t){var o,a=t.hover,s=t.context,c=s.elements,u=s.dragGroup;u||(u=s.dragGroup=function(e){var t=Object(K.f)("g");Object(K.b)(t,r.cls("djs-drag-group",["no-events"]));var o=Object(K.f)("g");return e.forEach((function(e){var r;e.hidden||(e.waypoints?(r=n._createContainer("connection",o),n.drawConnection(Object(Nt.b)(r),e)):(r=n._createContainer("shape",o),n.drawShape(Object(Nt.b)(r),e),Object(Fe.c)(r,e.x,e.y)),i.addDragger(e,t,r))})),t}(c)),a?(u.parentNode||(o=e.getDefaultLayer(),Object(K.a)(o,u)),Object(Fe.c)(u,t.x,t.y)):Object(K.j)(u)})),t.on("create.cleanup",(function(e){var t=e.context.dragGroup;t&&Object(K.j)(t)}))}Yt.$inject=["canvas","eventBus","graphicsFactory","previewSupport","styles"];var Xt={__depends__:[ke,zt,Le,Pe.a],__init__:["create","createPreview"],create:["type",Wt],createPreview:["type",Yt]},Jt=["contextPad.close","canvas.viewbox.changing","commandStack.changed"];function Zt(e,t,n){var i=Object(u.isDefined)(e&&e.scale)?e.scale:{min:1,max:1.5};this._config={scale:i},this._eventBus=t,this._canvas=n,this._providers={},this._current={}}Zt.$inject=["config.popupMenu","eventBus","canvas"],Zt.prototype.registerProvider=function(e,t,n){n||(n=t,t=1e3),this._eventBus.on("popupMenu.getProviders."+e,t,(function(e){e.providers.push(n)}))},Zt.prototype.isEmpty=function(e,t){if(!e)throw new Error("element parameter is missing");if(!t)throw new Error("providerId parameter is missing");var n=this._getProviders(t);if(!n)return!0;var i=this._getEntries(e,n),r=this._getHeaderEntries(e,n),o=Object(u.size)(i)>0,a=r&&Object(u.size)(r)>0;return!o&&!a},Zt.prototype.open=function(e,t,n){var i=this._getProviders(t);if(!e)throw new Error("Element is missing");if(!i||!i.length)throw new Error("No registered providers for: "+t);if(!n)throw new Error("the position argument is missing");this.isOpen()&&this.close(),this._emit("open");var r=this._current={className:t,element:e,position:n},o=this._getEntries(e,i),a=this._getHeaderEntries(e,i);r.entries=Object(u.assign)({},o,a),r.container=this._createContainer(),Object(u.size)(a)&&r.container.appendChild(this._createEntries(a,"djs-popup-header")),Object(u.size)(o)&&r.container.appendChild(this._createEntries(o,"djs-popup-body"));var s=this._canvas.getContainer();this._attachContainer(r.container,s,n.cursor),this._bindAutoClose()},Zt.prototype.close=function(){this.isOpen()&&(this._emit("close"),this._unbindAutoClose(),Object(p.remove)(this._current.container),this._current.container=null)},Zt.prototype.isOpen=function(){return!!this._current.container},Zt.prototype.trigger=function(e){e.preventDefault();var t=e.delegateTarget||e.target,n=Object(p.attr)(t,"data-id"),i=this._getEntry(n);if(i.action)return i.action.call(null,e,i)},Zt.prototype._getProviders=function(e){var t=this._eventBus.createEvent({type:"popupMenu.getProviders."+e,providers:[]});return this._eventBus.fire(t),t.providers},Zt.prototype._getEntries=function(e,t){var n={};return Object(u.forEach)(t,(function(t){if(t.getPopupMenuEntries){var i=t.getPopupMenuEntries(e);Object(u.isFunction)(i)?n=i(n):Object(u.forEach)(i,(function(e,t){n[t]=e}))}else Object(u.forEach)(t.getEntries(e),(function(e){var t=e.id;if(!t)throw new Error("every entry must have the id property set");n[t]=Object(u.omit)(e,["id"])}))})),n},Zt.prototype._getHeaderEntries=function(e,t){var n={};return Object(u.forEach)(t,(function(t){if(t.getPopupMenuHeaderEntries){var i=t.getPopupMenuHeaderEntries(e);Object(u.isFunction)(i)?n=i(n):Object(u.forEach)(i,(function(e,t){n[t]=e}))}else{if(!t.getHeaderEntries)return;Object(u.forEach)(t.getHeaderEntries(e),(function(e){var t=e.id;if(!t)throw new Error("every entry must have the id property set");n[t]=Object(u.omit)(e,["id"])}))}})),n},Zt.prototype._getEntry=function(e){var t=this._current.entries[e];if(!t)throw new Error("entry not found");return t},Zt.prototype._emit=function(e){this._eventBus.fire("popupMenu."+e)},Zt.prototype._createContainer=function(){var e=Object(p.domify)('<div class="djs-popup">'),t=this._current.position,n=this._current.className;return Object(u.assign)(e.style,{position:"absolute",left:t.x+"px",top:t.y+"px",visibility:"hidden"}),Object(p.classes)(e).add(n),e},Zt.prototype._attachContainer=function(e,t,n){var i=this;p.delegate.bind(e,".entry","click",(function(e){i.trigger(e)})),this._updateScale(e),t.appendChild(e),n&&this._assureIsInbounds(e,n)},Zt.prototype._updateScale=function(e){var t,n,i,r,o=this._canvas.zoom(),a=this._config.scale,s=o;!0!==a&&(!1===a?(t=1,n=1):(t=a.min,n=a.max),Object(u.isDefined)(t)&&o<t&&(s=t),Object(u.isDefined)(n)&&o>n&&(s=n)),r="scale("+s+")",(i=e).style["transform-origin"]="top left",["","-ms-","-webkit-"].forEach((function(e){i.style[e+"transform"]=r}))},Zt.prototype._assureIsInbounds=function(e,t){var n,i,r=this._canvas._container.getBoundingClientRect(),o=e.offsetLeft,a=e.offsetTop,s=e.scrollWidth,c=e.scrollHeight,p={},l=t.x-r.left,d=t.y-r.top;o+s>r.width&&(p.x=!0),a+c>r.height&&(p.y=!0),p.x&&p.y?(n=l-s+"px",i=d-c+"px"):p.x?(n=l-s+"px",i=d+"px"):p.y&&d<c?(n=l+"px",i="10px"):p.y&&(n=l+"px",i=d-c+"px"),Object(u.assign)(e.style,{left:n,top:i},{visibility:"visible","z-index":1e3})},Zt.prototype._createEntries=function(e,t){var n=Object(p.domify)("<div>"),i=this;return Object(p.classes)(n).add(t),Object(u.forEach)(e,(function(e,t){var r=i._createEntry(e,t);n.appendChild(r)})),n},Zt.prototype._createEntry=function(e,t){var n=Object(p.domify)("<div>"),i=Object(p.classes)(n);if(i.add("entry"),e.className&&e.className.split(" ").forEach((function(e){i.add(e)})),Object(p.attr)(n,"data-id",t),e.label){var r=Object(p.domify)("<span>");r.textContent=e.label,n.appendChild(r)}return e.imageUrl&&n.appendChild(Object(p.domify)('<img src="'+e.imageUrl+'" />')),!0===e.active&&i.add("active"),!0===e.disabled&&i.add("disabled"),e.title&&(n.title=e.title),n},Zt.prototype._bindAutoClose=function(){this._eventBus.once(Jt,this.close,this)},Zt.prototype._unbindAutoClose=function(){this._eventBus.off(Jt,this.close,this)};var Qt={__init__:["popupMenu"],popupMenu:["type",Zt]};function en(){}en.prototype.get=function(){return this._data},en.prototype.set=function(e){this._data=e},en.prototype.clear=function(){var e=this._data;return delete this._data,e},en.prototype.isEmpty=function(){return!this._data};var tn={clipboard:["type",en]};function nn(e){var t=this;function n(e){t._lastMoveEvent=e}this._lastMoveEvent=null,e.on("canvas.init",(function(e){(t._svg=e.svg).addEventListener("mousemove",n)})),e.on("canvas.destroy",(function(){t._lastMouseEvent=null,t._svg.removeEventListener("mousemove",n)}))}nn.$inject=["eventBus"],nn.prototype.getLastMoveEvent=function(){return this._lastMoveEvent||function(e,t){var n=document.createEvent("MouseEvent"),i=e,r=t,o=e,a=t;n.initMouseEvent&&n.initMouseEvent("mousemove",!0,!0,window,0,i,r,o,a,!1,!1,!1,!1,0,null);return n}(0,0)};var rn={__init__:["mouse"],mouse:["type",nn]};function on(e,t,n,i,r,o,a,s){this._canvas=e,this._create=t,this._clipboard=n,this._elementFactory=i,this._eventBus=r,this._modeling=o,this._mouse=a,this._rules=s,r.on("copyPaste.copyElement",(function(e){var t=e.descriptor,n=e.element,i=e.elements;t.priority=1,t.id=n.id,Object(u.find)(i,(function(e){return e===n.parent}))&&(t.parent=n.parent.id),function(e){return!!e.host}(n)&&(t.priority=2,t.host=n.host.id),an(n)&&(t.priority=3,t.source=n.source.id,t.target=n.target.id,t.waypoints=function(e){return Object(u.map)(e.waypoints,(function(e){return(e=cn(e)).original&&(e.original=cn(e.original)),e}))}(n)),sn(n)&&(t.priority=4,t.labelTarget=n.labelTarget.id),Object(u.forEach)(["x","y","width","height"],(function(e){Object(u.isNumber)(n[e])&&(t[e]=n[e])})),t.hidden=n.hidden,t.collapsed=n.collapsed})),r.on("copyPaste.pasteElements",(function(e){var t=e.hints;Object(u.assign)(t,{createElementsBehavior:!1})}))}function an(e){return!!e.waypoints}function sn(e){return!!e.labelTarget}function cn(e){return Object(u.assign)({},e)}function un(e,t){var n=t.indexOf(e);return-1===n?t:t.splice(n,1)}on.$inject=["canvas","create","clipboard","elementFactory","eventBus","modeling","mouse","rules"],on.prototype.copy=function(e){var t,n;return Object(u.isArray)(e)||(e=e?[e]:[]),n=!1===(t=this._eventBus.fire("copyPaste.canCopyElements",{elements:e}))?{}:this.createTree(Object(u.isArray)(t)?t:e),this._clipboard.set(n),this._eventBus.fire("copyPaste.elementsCopied",{elements:e,tree:n}),n},on.prototype.paste=function(e){var t=this._clipboard.get();if(!this._clipboard.isEmpty()){var n=e&&e.hints||{};this._eventBus.fire("copyPaste.pasteElements",{hints:n});var i=this._createElements(t);if(e&&e.element&&e.point)return this._paste(i,e.element,e.point,n);this._create.start(this._mouse.getLastMoveEvent(),i,{hints:n||{}})}},on.prototype._paste=function(e,t,n,i){Object(u.forEach)(e,(function(e){Object(u.isNumber)(e.x)||(e.x=0),Object(u.isNumber)(e.y)||(e.y=0)}));var r=Object(ge.b)(e);return Object(u.forEach)(e,(function(e){an(e)&&(e.waypoints=Object(u.map)(e.waypoints,(function(e){return{x:e.x-r.x-r.width/2,y:e.y-r.y-r.height/2}}))),Object(u.assign)(e,{x:e.x-r.x-r.width/2,y:e.y-r.y-r.height/2})})),this._modeling.createElements(e,n,t,Object(u.assign)({},i))},on.prototype._createElements=function(e){var t=this,n=this._eventBus,i={},r=[];return Object(u.forEach)(e,(function(e,o){o=parseInt(o,10),e=Object(u.sortBy)(e,"priority"),Object(u.forEach)(e,(function(e){var o,a=Object(u.assign)({},Object(u.omit)(e,["priority"]));return i[e.parent]?a.parent=i[e.parent]:delete a.parent,n.fire("copyPaste.pasteElement",{cache:i,descriptor:a}),an(a)?(a.source=i[e.source],a.target=i[e.target],o=i[e.id]=t.createConnection(a),void r.push(o)):sn(a)?(a.labelTarget=i[a.labelTarget],o=i[e.id]=t.createLabel(a),void r.push(o)):(a.host&&(a.host=i[a.host]),o=i[e.id]=t.createShape(a),void r.push(o))}))})),r},on.prototype.createConnection=function(e){return this._elementFactory.createConnection(Object(u.omit)(e,["id"]))},on.prototype.createLabel=function(e){return this._elementFactory.createLabel(Object(u.omit)(e,["id"]))},on.prototype.createShape=function(e){return this._elementFactory.createShape(Object(u.omit)(e,["id"]))},on.prototype.hasRelations=function(e,t){var n,i;return!(an(e)&&(n=Object(u.find)(t,Object(u.matchPattern)({id:e.source.id})),i=Object(u.find)(t,Object(u.matchPattern)({id:e.target.id})),!n||!i))&&!(sn(e)&&!Object(u.find)(t,Object(u.matchPattern)({id:e.labelTarget.id})))},on.prototype.createTree=function(e){var t=this._rules,n=this,i={},r=[],o=Object(ge.e)(e);function a(e,t){var n=Object(u.find)(r,(function(t){return e===t.element}));n?n.depth<t&&(r=function(e,t){var n=t.indexOf(e);-1!==n&&t.splice(n,1);return t}(n,r)).push({element:n.element,depth:t}):r.push({element:e,depth:t})}return Object(ge.a)(o,(function(e,t,n){if(!sn(e))return Object(u.forEach)(e.labels,(function(e){a(e,n)})),Object(u.forEach)([e.attachers,e.incoming,e.outgoing],(function(e){e&&e.length&&Object(u.forEach)(e,(function(e){Object(u.forEach)(e.labels,(function(e){a(e,n)})),a(e,n)}))})),a(e,n),e.children})),e=Object(u.map)(r,(function(e){return e.element})),r=Object(u.map)(r,(function(t){return t.descriptor={},n._eventBus.fire("copyPaste.copyElement",{descriptor:t.descriptor,element:t.element,elements:e}),t})),r=Object(u.sortBy)(r,(function(e){return e.descriptor.priority})),e=Object(u.map)(r,(function(e){return e.element})),Object(u.forEach)(r,(function(r){var o=r.depth;n.hasRelations(r.element,e)?!function(e,n){return t.allowed("element.copy",{element:e,elements:n})}(r.element,e)?un(r.element,e):(i[o]||(i[o]=[]),i[o].push(r.descriptor)):un(r.element,e)})),i};var pn={__depends__:[tn,Xt,rn,Le],__init__:["copyPaste"],copyPaste:["type",on]};function ln(e,t,n){Object(u.isArray)(n)||(n=[n]),Object(u.forEach)(n,(function(n){Object(u.isUndefined)(e[n])||(t[n]=e[n])}))}function dn(e,t,n){var i;t.on("copyPaste.copyElement",750,(function(e){var t=e.descriptor,n=e.element,i=t.oldBusinessObject=Object(de.getBusinessObject)(n);if(t.type=n.type,ln(i,t,"name"),t.di={},ln(i.di,t.di,["fill","stroke"]),ln(i.di,t,"isExpanded"),fn(t))return t;i.default&&(t.default=i.default.id)})),t.on("moddleCopy.canCopyProperty",(function(t){var i,r=t.parent,o=t.property;if("processRef"===t.propertyName&&Object(de.is)(r,"bpmn:Participant")&&Object(de.is)(o,"bpmn:Process"))return i=e.create("bpmn:Process"),n.copyElement(o,i)})),t.on("copyPaste.pasteElements",(function(){i={}})),t.on("copyPaste.pasteElement",(function(t){var r,o,a,s=t.cache,c=t.descriptor,p=c.oldBusinessObject;fn(c)?c.businessObject=Object(de.getBusinessObject)(s[c.labelTarget]):(r=e.create(p.$type),c.businessObject=n.copyElement(p,r),function(e,t){var n=Object(de.getBusinessObject)(e);e.default&&(i[e.default]={element:n,property:"default"}),e.host&&(Object(de.getBusinessObject)(e).attachedToRef=Object(de.getBusinessObject)(t[e.host])),i=Object(u.omit)(i,Object(u.reduce)(i,(function(t,i,r){var o=i.element,a=i.property;return r===e.id&&(o[a]=n,t.push(e.id)),t}),[]))}(c,s),ln(c,r,["isExpanded","name"]),o=c,a="oldBusinessObject",Object(u.isArray)(a)||(a=[a]),Object(u.forEach)(a,(function(e){o[e]&&delete o[e]})))}))}function fn(e){return!!e.labelTarget}dn.$inject=["bpmnFactory","eventBus","moddleCopy"];n(23);var hn=["artifacts","dataInputAssociations","dataOutputAssociations","default","flowElements","lanes","incoming","outgoing"];function mn(e,t,n){this._bpmnFactory=t,this._eventBus=e,this._moddle=n,e.on("moddleCopy.canCopyProperties",(function(e){var t=e.propertyNames;if(t&&t.length)return Object(u.sortBy)(t,(function(e){return"extensionElements"===e}))})),e.on("moddleCopy.canCopyProperty",(function(e){var t=e.parent,n=Object(u.isObject)(t)&&t.$descriptor,i=e.propertyName;return(!i||-1===hn.indexOf(i))&&(!(i&&n&&!Object(u.find)(n.properties,Object(u.matchPattern)({name:i})))&&void 0)})),e.on("moddleCopy.canSetCopiedProperty",(function(e){var t,n,i=e.property;if(n="bpmn:ExtensionElements",(t=i)&&"function"==typeof t.$instanceOf&&t.$instanceOf(n)&&(!i.values||!i.values.length))return!1}))}function vn(e,t){return Object(u.reduce)(e.properties,(function(e,n){return t&&n.default?e:e.concat(n.name)}),[])}mn.$inject=["eventBus","bpmnFactory","moddle"],mn.prototype.copyElement=function(e,t,n){var i=this;n&&!Object(u.isArray)(n)&&(n=[n]),n=n||vn(e.$descriptor);var r=this._eventBus.fire("moddleCopy.canCopyProperties",{propertyNames:n,sourceElement:e,targetElement:t});return!1===r||(Object(u.isArray)(r)&&(n=r),Object(u.forEach)(n,(function(n){var r;Object(u.has)(e,n)&&(r=e.get(n));var o=i.copyProperty(r,t,n);!1!==i._eventBus.fire("moddleCopy.canSetCopiedProperty",{parent:t,property:o,propertyName:n})&&Object(u.isDefined)(o)&&t.set(n,o)}))),t},mn.prototype.copyProperty=function(e,t,n){var i=this,r=this._eventBus.fire("moddleCopy.canCopyProperty",{parent:t,property:e,propertyName:n});if(!1!==r){if(r)return Object(u.isObject)(r)&&r.$type&&!r.$parent&&(r.$parent=t),r;var o=this._moddle.getPropertyDescriptor(t,n);if(!o.isId&&!o.isReference){if(Object(u.isArray)(e))return Object(u.reduce)(e,(function(e,o){return(r=i.copyProperty(o,t,n))?(r.$parent=t,e.concat(r)):e}),[]);if(Object(u.isObject)(e)&&e.$type){if(this._moddle.getElementDescriptor(e).isGeneric)return;return(r=i._bpmnFactory.create(e.$type)).$parent=t,r=i.copyElement(e,r)}return e}}};var bn={__depends__:[pn],__init__:["bpmnCopyPaste","moddleCopy"],bpmnCopyPaste:["type",dn],moddleCopy:["type",mn]},gn=Math.round;function yn(e){this._modeling=e}yn.$inject=["modeling"],yn.prototype.replaceElement=function(e,t,n){if(e.waypoints)return null;var i=this._modeling,r=t.width||e.width,o=t.height||e.height,a=t.x||e.x,s=t.y||e.y,c=gn(a+r/2),p=gn(s+o/2);return i.replaceShape(e,Object(u.assign)({},t,{x:c,y:p,width:r,height:o}),n)};var xn={__init__:["replace"],replace:["type",yn]},On=n(733);var jn=["cancelActivity","instantiate","eventGatewayType","triggeredByEvent","isInterrupting"];function En(e,t,n,i,r,o){this.replaceElement=function(a,s,c){c=c||{};var p=s.type,l=a.businessObject;if(_n(l)&&"bpmn:SubProcess"===p&&function(e,t){var n=e&&Object(u.has)(e,"collapsed")?e.collapsed:!Object(On.isExpanded)(e);return n!==(t&&(Object(u.has)(t,"collapsed")||Object(u.has)(t,"isExpanded"))?Object(u.has)(t,"collapsed")?t.collapsed:!t.isExpanded:n)&&(e.collapsed=n,!0)}(a,s))return i.toggleCollapse(a),a;var d,f=e.create(p),h={type:p,businessObject:f},m=vn(l.$descriptor),v=vn(f.$descriptor,!0),b=(d=v,m.filter((function(e){return-1!==d.indexOf(e)})));Object(u.assign)(f,Object(u.pick)(s,jn));var g=Object(u.filter)(b,(function(e){return"eventDefinitions"===e?wn(a,s.eventDefinitionType):"loopCharacteristics"===e?!Object(On.isEventSubProcess)(f):!f.hasOwnProperty(e)&&(("processRef"!==e||!1!==s.isExpanded)&&"triggeredByEvent"!==e)}));return f=n.copyElement(l,f,g),s.eventDefinitionType&&(wn(f,s.eventDefinitionType)||(h.eventDefinitionType=s.eventDefinitionType,h.eventDefinitionAttrs=s.eventDefinitionAttrs)),Object(de.is)(l,"bpmn:Activity")&&(_n(l)?h.isExpanded=Object(On.isExpanded)(l):s&&Object(u.has)(s,"isExpanded")&&(h.isExpanded=s.isExpanded),Object(On.isExpanded)(l)&&!Object(de.is)(l,"bpmn:Task")&&h.isExpanded&&(h.width=a.width,h.height=a.height)),_n(l)&&!_n(f)&&(c.moveChildren=!1),Object(de.is)(l,"bpmn:Participant")&&(!0===s.isExpanded?f.processRef=e.create("bpmn:Process"):c.moveChildren=!1,h.width=a.width,h.height=t._getDefaultSize(f).height),f.name=l.name,Object(fe.isAny)(l,["bpmn:ExclusiveGateway","bpmn:InclusiveGateway","bpmn:Activity"])&&Object(fe.isAny)(f,["bpmn:ExclusiveGateway","bpmn:InclusiveGateway","bpmn:Activity"])&&(f.default=l.default),s.host&&!Object(de.is)(l,"bpmn:BoundaryEvent")&&Object(de.is)(f,"bpmn:BoundaryEvent")&&(h.host=s.host),h.di={},function(e,t,n){Object(u.isArray)(n)||(n=[n]),Object(u.forEach)(n,(function(n){Object(u.isUndefined)(e[n])||(t[n]=e[n])}))}(l.di,h.di,["fill","stroke"]),h=r.replaceElement(a,h,c),!1!==c.select&&o.select(h),h}}function _n(e){return Object(de.is)(e,"bpmn:SubProcess")}function wn(e,t){var n=Object(de.getBusinessObject)(e);return t&&n.get("eventDefinitions").some((function(e){return Object(de.is)(e,t)}))}En.$inject=["bpmnFactory","elementFactory","moddleCopy","modeling","replace","selection"];var Sn={__depends__:[bn,xn,Pe.a],bpmnReplace:["type",En]};function Tn(e){return function(t){var n=t.target,i=Object(de.getBusinessObject)(e),r=i.eventDefinitions&&i.eventDefinitions[0],o=i.$type===n.type,a=(r&&r.$type)===n.eventDefinitionType,s=i.triggeredByEvent===n.triggeredByEvent,c=void 0===n.isExpanded||n.isExpanded===Object(On.isExpanded)(i);return!(o&&a&&s&&c)}}var Pn=[{label:"Start Event",actionName:"replace-with-none-start",className:"bpmn-icon-start-event-none",target:{type:"bpmn:StartEvent"}},{label:"Intermediate Throw Event",actionName:"replace-with-none-intermediate-throwing",className:"bpmn-icon-intermediate-event-none",target:{type:"bpmn:IntermediateThrowEvent"}},{label:"End Event",actionName:"replace-with-none-end",className:"bpmn-icon-end-event-none",target:{type:"bpmn:EndEvent"}},{label:"Message Start Event",actionName:"replace-with-message-start",className:"bpmn-icon-start-event-message",target:{type:"bpmn:StartEvent",eventDefinitionType:"bpmn:MessageEventDefinition"}},{label:"Timer Start Event",actionName:"replace-with-timer-start",className:"bpmn-icon-start-event-timer",target:{type:"bpmn:StartEvent",eventDefinitionType:"bpmn:TimerEventDefinition"}},{label:"Conditional Start Event",actionName:"replace-with-conditional-start",className:"bpmn-icon-start-event-condition",target:{type:"bpmn:StartEvent",eventDefinitionType:"bpmn:ConditionalEventDefinition"}},{label:"Signal Start Event",actionName:"replace-with-signal-start",className:"bpmn-icon-start-event-signal",target:{type:"bpmn:StartEvent",eventDefinitionType:"bpmn:SignalEventDefinition"}}],Cn=[{label:"Start Event",actionName:"replace-with-none-start",className:"bpmn-icon-start-event-none",target:{type:"bpmn:StartEvent"}},{label:"Intermediate Throw Event",actionName:"replace-with-none-intermediate-throw",className:"bpmn-icon-intermediate-event-none",target:{type:"bpmn:IntermediateThrowEvent"}},{label:"End Event",actionName:"replace-with-none-end",className:"bpmn-icon-end-event-none",target:{type:"bpmn:EndEvent"}},{label:"Message Intermediate Catch Event",actionName:"replace-with-message-intermediate-catch",className:"bpmn-icon-intermediate-event-catch-message",target:{type:"bpmn:IntermediateCatchEvent",eventDefinitionType:"bpmn:MessageEventDefinition"}},{label:"Message Intermediate Throw Event",actionName:"replace-with-message-intermediate-throw",className:"bpmn-icon-intermediate-event-throw-message",target:{type:"bpmn:IntermediateThrowEvent",eventDefinitionType:"bpmn:MessageEventDefinition"}},{label:"Timer Intermediate Catch Event",actionName:"replace-with-timer-intermediate-catch",className:"bpmn-icon-intermediate-event-catch-timer",target:{type:"bpmn:IntermediateCatchEvent",eventDefinitionType:"bpmn:TimerEventDefinition"}},{label:"Escalation Intermediate Throw Event",actionName:"replace-with-escalation-intermediate-throw",className:"bpmn-icon-intermediate-event-throw-escalation",target:{type:"bpmn:IntermediateThrowEvent",eventDefinitionType:"bpmn:EscalationEventDefinition"}},{label:"Conditional Intermediate Catch Event",actionName:"replace-with-conditional-intermediate-catch",className:"bpmn-icon-intermediate-event-catch-condition",target:{type:"bpmn:IntermediateCatchEvent",eventDefinitionType:"bpmn:ConditionalEventDefinition"}},{label:"Link Intermediate Catch Event",actionName:"replace-with-link-intermediate-catch",className:"bpmn-icon-intermediate-event-catch-link",target:{type:"bpmn:IntermediateCatchEvent",eventDefinitionType:"bpmn:LinkEventDefinition",eventDefinitionAttrs:{name:""}}},{label:"Link Intermediate Throw Event",actionName:"replace-with-link-intermediate-throw",className:"bpmn-icon-intermediate-event-throw-link",target:{type:"bpmn:IntermediateThrowEvent",eventDefinitionType:"bpmn:LinkEventDefinition",eventDefinitionAttrs:{name:""}}},{label:"Compensation Intermediate Throw Event",actionName:"replace-with-compensation-intermediate-throw",className:"bpmn-icon-intermediate-event-throw-compensation",target:{type:"bpmn:IntermediateThrowEvent",eventDefinitionType:"bpmn:CompensateEventDefinition"}},{label:"Signal Intermediate Catch Event",actionName:"replace-with-signal-intermediate-catch",className:"bpmn-icon-intermediate-event-catch-signal",target:{type:"bpmn:IntermediateCatchEvent",eventDefinitionType:"bpmn:SignalEventDefinition"}},{label:"Signal Intermediate Throw Event",actionName:"replace-with-signal-intermediate-throw",className:"bpmn-icon-intermediate-event-throw-signal",target:{type:"bpmn:IntermediateThrowEvent",eventDefinitionType:"bpmn:SignalEventDefinition"}}],An=[{label:"Start Event",actionName:"replace-with-none-start",className:"bpmn-icon-start-event-none",target:{type:"bpmn:StartEvent"}},{label:"Intermediate Throw Event",actionName:"replace-with-none-intermediate-throw",className:"bpmn-icon-intermediate-event-none",target:{type:"bpmn:IntermediateThrowEvent"}},{label:"End Event",actionName:"replace-with-none-end",className:"bpmn-icon-end-event-none",target:{type:"bpmn:EndEvent"}},{label:"Message End Event",actionName:"replace-with-message-end",className:"bpmn-icon-end-event-message",target:{type:"bpmn:EndEvent",eventDefinitionType:"bpmn:MessageEventDefinition"}},{label:"Escalation End Event",actionName:"replace-with-escalation-end",className:"bpmn-icon-end-event-escalation",target:{type:"bpmn:EndEvent",eventDefinitionType:"bpmn:EscalationEventDefinition"}},{label:"Error End Event",actionName:"replace-with-error-end",className:"bpmn-icon-end-event-error",target:{type:"bpmn:EndEvent",eventDefinitionType:"bpmn:ErrorEventDefinition"}},{label:"Cancel End Event",actionName:"replace-with-cancel-end",className:"bpmn-icon-end-event-cancel",target:{type:"bpmn:EndEvent",eventDefinitionType:"bpmn:CancelEventDefinition"}},{label:"Compensation End Event",actionName:"replace-with-compensation-end",className:"bpmn-icon-end-event-compensation",target:{type:"bpmn:EndEvent",eventDefinitionType:"bpmn:CompensateEventDefinition"}},{label:"Signal End Event",actionName:"replace-with-signal-end",className:"bpmn-icon-end-event-signal",target:{type:"bpmn:EndEvent",eventDefinitionType:"bpmn:SignalEventDefinition"}},{label:"Terminate End Event",actionName:"replace-with-terminate-end",className:"bpmn-icon-end-event-terminate",target:{type:"bpmn:EndEvent",eventDefinitionType:"bpmn:TerminateEventDefinition"}}],Rn=[{label:"Exclusive Gateway",actionName:"replace-with-exclusive-gateway",className:"bpmn-icon-gateway-xor",target:{type:"bpmn:ExclusiveGateway"}},{label:"Parallel Gateway",actionName:"replace-with-parallel-gateway",className:"bpmn-icon-gateway-parallel",target:{type:"bpmn:ParallelGateway"}},{label:"Inclusive Gateway",actionName:"replace-with-inclusive-gateway",className:"bpmn-icon-gateway-or",target:{type:"bpmn:InclusiveGateway"}},{label:"Complex Gateway",actionName:"replace-with-complex-gateway",className:"bpmn-icon-gateway-complex",target:{type:"bpmn:ComplexGateway"}},{label:"Event based Gateway",actionName:"replace-with-event-based-gateway",className:"bpmn-icon-gateway-eventbased",target:{type:"bpmn:EventBasedGateway",instantiate:!1,eventGatewayType:"Exclusive"}}],kn=[{label:"Transaction",actionName:"replace-with-transaction",className:"bpmn-icon-transaction",target:{type:"bpmn:Transaction",isExpanded:!0}},{label:"Event Sub Process",actionName:"replace-with-event-subprocess",className:"bpmn-icon-event-subprocess-expanded",target:{type:"bpmn:SubProcess",triggeredByEvent:!0,isExpanded:!0}},{label:"Sub Process (collapsed)",actionName:"replace-with-collapsed-subprocess",className:"bpmn-icon-subprocess-collapsed",target:{type:"bpmn:SubProcess",isExpanded:!1}}],Bn=[{label:"Sub Process",actionName:"replace-with-subprocess",className:"bpmn-icon-subprocess-expanded",target:{type:"bpmn:SubProcess",isExpanded:!0}},{label:"Event Sub Process",actionName:"replace-with-event-subprocess",className:"bpmn-icon-event-subprocess-expanded",target:{type:"bpmn:SubProcess",triggeredByEvent:!0,isExpanded:!0}}],Mn=[{label:"Sub Process",actionName:"replace-with-subprocess",className:"bpmn-icon-subprocess-expanded",target:{type:"bpmn:SubProcess",isExpanded:!0}},{label:"Transaction",actionName:"replace-with-transaction",className:"bpmn-icon-transaction",target:{type:"bpmn:Transaction",isExpanded:!0}}],Dn=[{label:"Task",actionName:"replace-with-task",className:"bpmn-icon-task",target:{type:"bpmn:Task"}},{label:"Send Task",actionName:"replace-with-send-task",className:"bpmn-icon-send",target:{type:"bpmn:SendTask"}},{label:"Receive Task",actionName:"replace-with-receive-task",className:"bpmn-icon-receive",target:{type:"bpmn:ReceiveTask"}},{label:"User Task",actionName:"replace-with-user-task",className:"bpmn-icon-user",target:{type:"bpmn:UserTask"}},{label:"Manual Task",actionName:"replace-with-manual-task",className:"bpmn-icon-manual",target:{type:"bpmn:ManualTask"}},{label:"Business Rule Task",actionName:"replace-with-rule-task",className:"bpmn-icon-business-rule",target:{type:"bpmn:BusinessRuleTask"}},{label:"Service Task",actionName:"replace-with-service-task",className:"bpmn-icon-service",target:{type:"bpmn:ServiceTask"}},{label:"Script Task",actionName:"replace-with-script-task",className:"bpmn-icon-script",target:{type:"bpmn:ScriptTask"}},{label:"Call Activity",actionName:"replace-with-call-activity",className:"bpmn-icon-call-activity",target:{type:"bpmn:CallActivity"}},{label:"Sub Process (collapsed)",actionName:"replace-with-collapsed-subprocess",className:"bpmn-icon-subprocess-collapsed",target:{type:"bpmn:SubProcess",isExpanded:!1}},{label:"Sub Process (expanded)",actionName:"replace-with-expanded-subprocess",className:"bpmn-icon-subprocess-expanded",target:{type:"bpmn:SubProcess",isExpanded:!0}}],Nn=[{label:"Message Boundary Event",actionName:"replace-with-message-boundary",className:"bpmn-icon-intermediate-event-catch-message",target:{type:"bpmn:BoundaryEvent",eventDefinitionType:"bpmn:MessageEventDefinition"}},{label:"Timer Boundary Event",actionName:"replace-with-timer-boundary",className:"bpmn-icon-intermediate-event-catch-timer",target:{type:"bpmn:BoundaryEvent",eventDefinitionType:"bpmn:TimerEventDefinition"}},{label:"Escalation Boundary Event",actionName:"replace-with-escalation-boundary",className:"bpmn-icon-intermediate-event-catch-escalation",target:{type:"bpmn:BoundaryEvent",eventDefinitionType:"bpmn:EscalationEventDefinition"}},{label:"Conditional Boundary Event",actionName:"replace-with-conditional-boundary",className:"bpmn-icon-intermediate-event-catch-condition",target:{type:"bpmn:BoundaryEvent",eventDefinitionType:"bpmn:ConditionalEventDefinition"}},{label:"Error Boundary Event",actionName:"replace-with-error-boundary",className:"bpmn-icon-intermediate-event-catch-error",target:{type:"bpmn:BoundaryEvent",eventDefinitionType:"bpmn:ErrorEventDefinition"}},{label:"Cancel Boundary Event",actionName:"replace-with-cancel-boundary",className:"bpmn-icon-intermediate-event-catch-cancel",target:{type:"bpmn:BoundaryEvent",eventDefinitionType:"bpmn:CancelEventDefinition"}},{label:"Signal Boundary Event",actionName:"replace-with-signal-boundary",className:"bpmn-icon-intermediate-event-catch-signal",target:{type:"bpmn:BoundaryEvent",eventDefinitionType:"bpmn:SignalEventDefinition"}},{label:"Compensation Boundary Event",actionName:"replace-with-compensation-boundary",className:"bpmn-icon-intermediate-event-catch-compensation",target:{type:"bpmn:BoundaryEvent",eventDefinitionType:"bpmn:CompensateEventDefinition"}},{label:"Message Boundary Event (non-interrupting)",actionName:"replace-with-non-interrupting-message-boundary",className:"bpmn-icon-intermediate-event-catch-non-interrupting-message",target:{type:"bpmn:BoundaryEvent",eventDefinitionType:"bpmn:MessageEventDefinition",cancelActivity:!1}},{label:"Timer Boundary Event (non-interrupting)",actionName:"replace-with-non-interrupting-timer-boundary",className:"bpmn-icon-intermediate-event-catch-non-interrupting-timer",target:{type:"bpmn:BoundaryEvent",eventDefinitionType:"bpmn:TimerEventDefinition",cancelActivity:!1}},{label:"Escalation Boundary Event (non-interrupting)",actionName:"replace-with-non-interrupting-escalation-boundary",className:"bpmn-icon-intermediate-event-catch-non-interrupting-escalation",target:{type:"bpmn:BoundaryEvent",eventDefinitionType:"bpmn:EscalationEventDefinition",cancelActivity:!1}},{label:"Conditional Boundary Event (non-interrupting)",actionName:"replace-with-non-interrupting-conditional-boundary",className:"bpmn-icon-intermediate-event-catch-non-interrupting-condition",target:{type:"bpmn:BoundaryEvent",eventDefinitionType:"bpmn:ConditionalEventDefinition",cancelActivity:!1}},{label:"Signal Boundary Event (non-interrupting)",actionName:"replace-with-non-interrupting-signal-boundary",className:"bpmn-icon-intermediate-event-catch-non-interrupting-signal",target:{type:"bpmn:BoundaryEvent",eventDefinitionType:"bpmn:SignalEventDefinition",cancelActivity:!1}}],Ln=[{label:"Message Start Event",actionName:"replace-with-message-start",className:"bpmn-icon-start-event-message",target:{type:"bpmn:StartEvent",eventDefinitionType:"bpmn:MessageEventDefinition"}},{label:"Timer Start Event",actionName:"replace-with-timer-start",className:"bpmn-icon-start-event-timer",target:{type:"bpmn:StartEvent",eventDefinitionType:"bpmn:TimerEventDefinition"}},{label:"Conditional Start Event",actionName:"replace-with-conditional-start",className:"bpmn-icon-start-event-condition",target:{type:"bpmn:StartEvent",eventDefinitionType:"bpmn:ConditionalEventDefinition"}},{label:"Signal Start Event",actionName:"replace-with-signal-start",className:"bpmn-icon-start-event-signal",target:{type:"bpmn:StartEvent",eventDefinitionType:"bpmn:SignalEventDefinition"}},{label:"Error Start Event",actionName:"replace-with-error-start",className:"bpmn-icon-start-event-error",target:{type:"bpmn:StartEvent",eventDefinitionType:"bpmn:ErrorEventDefinition"}},{label:"Escalation Start Event",actionName:"replace-with-escalation-start",className:"bpmn-icon-start-event-escalation",target:{type:"bpmn:StartEvent",eventDefinitionType:"bpmn:EscalationEventDefinition"}},{label:"Compensation Start Event",actionName:"replace-with-compensation-start",className:"bpmn-icon-start-event-compensation",target:{type:"bpmn:StartEvent",eventDefinitionType:"bpmn:CompensateEventDefinition"}},{label:"Message Start Event (non-interrupting)",actionName:"replace-with-non-interrupting-message-start",className:"bpmn-icon-start-event-non-interrupting-message",target:{type:"bpmn:StartEvent",eventDefinitionType:"bpmn:MessageEventDefinition",isInterrupting:!1}},{label:"Timer Start Event (non-interrupting)",actionName:"replace-with-non-interrupting-timer-start",className:"bpmn-icon-start-event-non-interrupting-timer",target:{type:"bpmn:StartEvent",eventDefinitionType:"bpmn:TimerEventDefinition",isInterrupting:!1}},{label:"Conditional Start Event (non-interrupting)",actionName:"replace-with-non-interrupting-conditional-start",className:"bpmn-icon-start-event-non-interrupting-condition",target:{type:"bpmn:StartEvent",eventDefinitionType:"bpmn:ConditionalEventDefinition",isInterrupting:!1}},{label:"Signal Start Event (non-interrupting)",actionName:"replace-with-non-interrupting-signal-start",className:"bpmn-icon-start-event-non-interrupting-signal",target:{type:"bpmn:StartEvent",eventDefinitionType:"bpmn:SignalEventDefinition",isInterrupting:!1}},{label:"Escalation Start Event (non-interrupting)",actionName:"replace-with-non-interrupting-escalation-start",className:"bpmn-icon-start-event-non-interrupting-escalation",target:{type:"bpmn:StartEvent",eventDefinitionType:"bpmn:EscalationEventDefinition",isInterrupting:!1}}],In=[{label:"Sequence Flow",actionName:"replace-with-sequence-flow",className:"bpmn-icon-connection"},{label:"Default Flow",actionName:"replace-with-default-flow",className:"bpmn-icon-default-flow"},{label:"Conditional Flow",actionName:"replace-with-conditional-flow",className:"bpmn-icon-conditional-flow"}],Fn=[{label:"Expanded Pool",actionName:"replace-with-expanded-pool",className:"bpmn-icon-participant",target:{type:"bpmn:Participant",isExpanded:!0}},{label:"Collapsed Pool",actionName:"replace-with-collapsed-pool",className:"bpmn-icon-lane",target:{type:"bpmn:Participant",isExpanded:!1}}];function zn(e,t,n,i,r,o){this._popupMenu=e,this._modeling=t,this._moddle=n,this._bpmnReplace=i,this._rules=r,this._translate=o,this.register()}zn.$inject=["popupMenu","modeling","moddle","bpmnReplace","rules","translate"],zn.prototype.register=function(){this._popupMenu.registerProvider("bpmn-replace",this)},zn.prototype.getEntries=function(e){var t,n=e.businessObject;if(!this._rules.allowed("shape.replace",{element:e}))return[];var i=Tn(e);return Object(de.is)(n,"bpmn:StartEvent")&&!Object(On.isEventSubProcess)(n.$parent)?(t=Object(u.filter)(Pn,i),this._createEntries(e,t)):Object(de.is)(n,"bpmn:Participant")?(t=Object(u.filter)(Fn,(function(e){return Object(On.isExpanded)(n)!==e.target.isExpanded})),this._createEntries(e,t)):Object(de.is)(n,"bpmn:StartEvent")&&Object(On.isEventSubProcess)(n.$parent)?(t=Object(u.filter)(Ln,(function(t){var n=!1!==t.target.isInterrupting,r=Object(de.getBusinessObject)(e).isInterrupting===n;return i(t)||!i(t)&&!r})),this._createEntries(e,t)):Object(de.is)(n,"bpmn:EndEvent")?(t=Object(u.filter)(An,(function(e){return!("bpmn:CancelEventDefinition"==e.target.eventDefinitionType&&!Object(de.is)(n.$parent,"bpmn:Transaction"))&&i(e)})),this._createEntries(e,t)):Object(de.is)(n,"bpmn:BoundaryEvent")?(t=Object(u.filter)(Nn,(function(e){var t=e.target;if("bpmn:CancelEventDefinition"==t.eventDefinition&&!Object(de.is)(n.attachedToRef,"bpmn:Transaction"))return!1;var r=!1!==t.cancelActivity,o=n.cancelActivity==r;return i(e)||!i(e)&&!o})),this._createEntries(e,t)):Object(de.is)(n,"bpmn:IntermediateCatchEvent")||Object(de.is)(n,"bpmn:IntermediateThrowEvent")?(t=Object(u.filter)(Cn,i),this._createEntries(e,t)):Object(de.is)(n,"bpmn:Gateway")?(t=Object(u.filter)(Rn,i),this._createEntries(e,t)):Object(de.is)(n,"bpmn:Transaction")?(t=Object(u.filter)(Bn,i),this._createEntries(e,t)):Object(On.isEventSubProcess)(n)&&Object(On.isExpanded)(n)?(t=Object(u.filter)(Mn,i),this._createEntries(e,t)):Object(de.is)(n,"bpmn:SubProcess")&&Object(On.isExpanded)(n)?(t=Object(u.filter)(kn,i),this._createEntries(e,t)):Object(de.is)(n,"bpmn:AdHocSubProcess")&&!Object(On.isExpanded)(n)?(t=Object(u.filter)(Dn,(function(t){var n=t.target,i="bpmn:SubProcess"===n.type,r=!0===n.isExpanded;return Tn(e)&&(!i||r)})),this._createEntries(e,t)):Object(de.is)(n,"bpmn:SequenceFlow")?this._createSequenceFlowEntries(e,In):Object(de.is)(n,"bpmn:FlowNode")?(t=Object(u.filter)(Dn,i),Object(de.is)(n,"bpmn:SubProcess")&&!Object(On.isExpanded)(n)&&(t=Object(u.filter)(t,(function(e){return"Sub Process (collapsed)"!==e.label}))),this._createEntries(e,t)):[]},zn.prototype.getHeaderEntries=function(e){var t=[];return Object(de.is)(e,"bpmn:Activity")&&!Object(On.isEventSubProcess)(e)&&(t=t.concat(this._getLoopEntries(e))),!Object(de.is)(e,"bpmn:SubProcess")||Object(de.is)(e,"bpmn:Transaction")||Object(On.isEventSubProcess)(e)||t.push(this._getAdHocEntry(e)),t},zn.prototype._createEntries=function(e,t){var n=[],i=this;return Object(u.forEach)(t,(function(t){var r=i._createMenuEntry(t,e);n.push(r)})),n},zn.prototype._createSequenceFlowEntries=function(e,t){var n=Object(de.getBusinessObject)(e),i=[],r=this._modeling,o=this._moddle,a=this;return Object(u.forEach)(t,(function(t){switch(t.actionName){case"replace-with-default-flow":n.sourceRef.default!==n&&(Object(de.is)(n.sourceRef,"bpmn:ExclusiveGateway")||Object(de.is)(n.sourceRef,"bpmn:InclusiveGateway")||Object(de.is)(n.sourceRef,"bpmn:ComplexGateway")||Object(de.is)(n.sourceRef,"bpmn:Activity"))&&i.push(a._createMenuEntry(t,e,(function(){r.updateProperties(e.source,{default:n})})));break;case"replace-with-conditional-flow":!n.conditionExpression&&Object(de.is)(n.sourceRef,"bpmn:Activity")&&i.push(a._createMenuEntry(t,e,(function(){var t=o.create("bpmn:FormalExpression",{body:""});r.updateProperties(e,{conditionExpression:t})})));break;default:if(Object(de.is)(n.sourceRef,"bpmn:Activity")&&n.conditionExpression)return i.push(a._createMenuEntry(t,e,(function(){r.updateProperties(e,{conditionExpression:void 0})})));if((Object(de.is)(n.sourceRef,"bpmn:ExclusiveGateway")||Object(de.is)(n.sourceRef,"bpmn:InclusiveGateway")||Object(de.is)(n.sourceRef,"bpmn:ComplexGateway")||Object(de.is)(n.sourceRef,"bpmn:Activity"))&&n.sourceRef.default===n)return i.push(a._createMenuEntry(t,e,(function(){r.updateProperties(e.source,{default:void 0})})))}})),i},zn.prototype._createMenuEntry=function(e,t,n){var i=this._translate,r=this._bpmnReplace.replaceElement;return n=n||function(){return r(t,e.target)},{label:i(e.label),className:e.className,id:e.actionName,action:n}},zn.prototype._getLoopEntries=function(e){var t=this,n=this._translate;function i(n,i){var r;i.active?r=void 0:(r=t._moddle.create(i.options.loopCharacteristics),i.options.isSequential&&(r.isSequential=i.options.isSequential)),t._modeling.updateProperties(e,{loopCharacteristics:r})}var r,o,a,s=Object(de.getBusinessObject)(e).loopCharacteristics;return s&&(r=s.isSequential,o=void 0===s.isSequential,a=void 0!==s.isSequential&&!s.isSequential),[{id:"toggle-parallel-mi",className:"bpmn-icon-parallel-mi-marker",title:n("Parallel Multi Instance"),active:a,action:i,options:{loopCharacteristics:"bpmn:MultiInstanceLoopCharacteristics",isSequential:!1}},{id:"toggle-sequential-mi",className:"bpmn-icon-sequential-mi-marker",title:n("Sequential Multi Instance"),active:r,action:i,options:{loopCharacteristics:"bpmn:MultiInstanceLoopCharacteristics",isSequential:!0}},{id:"toggle-loop",className:"bpmn-icon-loop-marker",title:n("Loop"),active:o,action:i,options:{loopCharacteristics:"bpmn:StandardLoopCharacteristics"}}]},zn.prototype._getAdHocEntry=function(e){var t=this._translate,n=Object(de.getBusinessObject)(e),i=Object(de.is)(n,"bpmn:AdHocSubProcess"),r=this._bpmnReplace.replaceElement;return{id:"toggle-adhoc",className:"bpmn-icon-ad-hoc-marker",title:t("Ad-hoc"),active:i,action:function(t,n){return r(e,i?{type:"bpmn:SubProcess"}:{type:"bpmn:AdHocSubProcess"},{autoResize:!1,layoutConnection:!1})}}};var Vn={__depends__:[Qt,Sn],__init__:["replaceMenuProvider"],replaceMenuProvider:["type",zn]},$n=n(40),Hn=Math.max,Gn=Math.min;function Wn(e,t){return{top:e.top-t.top,right:e.right-t.right,bottom:e.bottom-t.bottom,left:e.left-t.left}}function qn(e,t,n){var i=t[e],r=n.min&&n.min[e],o=n.max&&n.max[e];return Object(u.isNumber)(r)&&(i=(/top|left/.test(e)?Gn:Hn)(i,r)),Object(u.isNumber)(o)&&(i=(/top|left/.test(e)?Hn:Gn)(i,o)),i}function Un(e,t){return void 0!==e?e:20}function Kn(e){return!e.waypoints&&"label"!==e.type}function Yn(e,t){var n;if((n=void 0===e.length?Object(u.filter)(e.children,Kn):e).length)return function(e,t){var n,i,r,o;return"object"===Object($n.a)(t)?(n=Un(t.left),i=Un(t.right),r=Un(t.top),o=Un(t.bottom)):n=i=r=o=Un(t),{x:e.x-n,y:e.y-r,width:e.width+n+i,height:e.height+r+o}}(Object(ge.b)(n),t)}var Xn=Math.abs;var Jn=["bpmn:Participant","bpmn:Process","bpmn:SubProcess"];function Zn(e,t){return t=t||[],e.children.filter((function(e){Object(de.is)(e,"bpmn:Lane")&&(Zn(e,t),t.push(e))})),t}function Qn(e){return e.children.filter((function(e){return Object(de.is)(e,"bpmn:Lane")}))}function ei(e){return Object(fe.getParent)(e,Jn)||e}function ti(e,t){var n=ei(e),i=Zn(n,Object(de.is)(n,"bpmn:Process")?[]:[n]),r=Object(ie.b)(e),o=Object(ie.b)(t),a=function(e,t){return Wn(Object(ie.b)(t),Object(ie.b)(e))}(e,t),s=[];return i.forEach((function(t){if(t!==e){var n,i,c=0,u=a.right,p=0,l=a.left,d=Object(ie.b)(t);a.top&&(Xn(d.bottom-r.top)<10&&(p=o.top-d.bottom),Xn(d.top-r.top)<5&&(c=o.top-d.top)),a.bottom&&(Xn(d.top-r.bottom)<10&&(c=o.bottom-d.top),Xn(d.bottom-r.bottom)<5&&(p=o.bottom-d.bottom)),(c||u||p||l)&&s.push({shape:t,newBounds:(n=t,i={top:c,right:u,bottom:p,left:l},{x:n.x+(i.left||0),y:n.y+(i.top||0),width:n.width-(i.left||0)+(i.right||0),height:n.height-(i.top||0)+(i.bottom||0)})})}})),s}var ni=n(750);function ii(e,t,n,i,r,o,a,s,c,u,p,l){e=e||{},i.registerProvider(this),this._contextPad=i,this._modeling=r,this._elementFactory=o,this._connect=a,this._create=s,this._popupMenu=c,this._canvas=u,this._rules=p,this._translate=l,!1!==e.autoPlace&&(this._autoPlace=t.get("autoPlace",!1)),n.on("create.end",250,(function(e){var t=e.context.shape;if(Object(ni.a)(e)&&i.isOpen(t)){var n=i.getEntries(t);n.replace&&n.replace.action.click(e,t)}}))}function ri(e,t,n){var i=e.$instanceOf(t),r=!1,o=e.eventDefinitions||[];return Object(u.forEach)(o,(function(e){e.$type===n&&(r=!0)})),i&&r}ii.$inject=["config.contextPad","injector","eventBus","contextPad","modeling","elementFactory","connect","create","popupMenu","canvas","rules","translate"],ii.prototype.getContextPadEntries=function(e){var t=this._contextPad,n=this._modeling,i=this._elementFactory,r=this._connect,o=this._create,a=this._popupMenu,s=this._canvas,c=this._rules,p=this._autoPlace,l=this._translate,d={};if("label"===e.type)return d;var f=e.businessObject;function h(e,t){r.start(e,t)}function m(e,t,n,r){function a(t,n){var a=i.createShape(Object(u.assign)({type:e},r));o.start(t,a,{source:n})}return"string"!=typeof n&&(r=n,n=l("Append {type}",{type:e.replace(/^bpmn:/,"")})),{group:"model",className:t,title:n,action:{dragstart:a,click:p?function(t,n){var o=i.createShape(Object(u.assign)({type:e},r));p.append(n,o)}:a}}}function v(e){return function(i,r){n.splitLane(r,e),t.open(r,!0)}}if(Object(fe.isAny)(f,["bpmn:Lane","bpmn:Participant"])&&Object(On.isExpanded)(f)){var b=Qn(e);Object(u.assign)(d,{"lane-insert-above":{group:"lane-insert-above",className:"bpmn-icon-lane-insert-above",title:l("Add Lane above"),action:{click:function(e,t){n.addLane(t,"top")}}}}),b.length<2&&(e.height>=120&&Object(u.assign)(d,{"lane-divide-two":{group:"lane-divide",className:"bpmn-icon-lane-divide-two",title:l("Divide into two Lanes"),action:{click:v(2)}}}),e.height>=180&&Object(u.assign)(d,{"lane-divide-three":{group:"lane-divide",className:"bpmn-icon-lane-divide-three",title:l("Divide into three Lanes"),action:{click:v(3)}}})),Object(u.assign)(d,{"lane-insert-below":{group:"lane-insert-below",className:"bpmn-icon-lane-insert-below",title:l("Add Lane below"),action:{click:function(e,t){n.addLane(t,"bottom")}}}})}Object(de.is)(f,"bpmn:FlowNode")&&(Object(de.is)(f,"bpmn:EventBasedGateway")?Object(u.assign)(d,{"append.receive-task":m("bpmn:ReceiveTask","bpmn-icon-receive-task",l("Append ReceiveTask")),"append.message-intermediate-event":m("bpmn:IntermediateCatchEvent","bpmn-icon-intermediate-event-catch-message",l("Append MessageIntermediateCatchEvent"),{eventDefinitionType:"bpmn:MessageEventDefinition"}),"append.timer-intermediate-event":m("bpmn:IntermediateCatchEvent","bpmn-icon-intermediate-event-catch-timer",l("Append TimerIntermediateCatchEvent"),{eventDefinitionType:"bpmn:TimerEventDefinition"}),"append.condition-intermediate-event":m("bpmn:IntermediateCatchEvent","bpmn-icon-intermediate-event-catch-condition",l("Append ConditionIntermediateCatchEvent"),{eventDefinitionType:"bpmn:ConditionalEventDefinition"}),"append.signal-intermediate-event":m("bpmn:IntermediateCatchEvent","bpmn-icon-intermediate-event-catch-signal",l("Append SignalIntermediateCatchEvent"),{eventDefinitionType:"bpmn:SignalEventDefinition"})}):ri(f,"bpmn:BoundaryEvent","bpmn:CompensateEventDefinition")?Object(u.assign)(d,{"append.compensation-activity":m("bpmn:Task","bpmn-icon-task",l("Append compensation activity"),{isForCompensation:!0})}):Object(de.is)(f,"bpmn:EndEvent")||f.isForCompensation||ri(f,"bpmn:IntermediateThrowEvent","bpmn:LinkEventDefinition")||Object(On.isEventSubProcess)(f)||Object(u.assign)(d,{"append.end-event":m("bpmn:EndEvent","bpmn-icon-end-event-none",l("Append EndEvent")),"append.gateway":m("bpmn:ExclusiveGateway","bpmn-icon-gateway-none",l("Append Gateway")),"append.append-task":m("bpmn:Task","bpmn-icon-task",l("Append Task")),"append.intermediate-event":m("bpmn:IntermediateThrowEvent","bpmn-icon-intermediate-event-none",l("Append Intermediate/Boundary Event"))})),a.isEmpty(e,"bpmn-replace")||Object(u.assign)(d,{replace:{group:"edit",className:"bpmn-icon-screw-wrench",title:l("Change type"),action:{click:function(e,n){var i=Object(u.assign)(function(e){var n=s.getContainer(),i=t.getPad(e).html,r=n.getBoundingClientRect(),o=i.getBoundingClientRect(),a=o.top-r.top;return{x:o.left-r.left,y:a+o.height+5}}(n),{cursor:{x:e.x,y:e.y}});a.open(n,"bpmn-replace",i)}}}}),Object(fe.isAny)(f,["bpmn:FlowNode","bpmn:InteractionNode","bpmn:DataObjectReference","bpmn:DataStoreReference"])&&Object(u.assign)(d,{"append.text-annotation":m("bpmn:TextAnnotation","bpmn-icon-text-annotation"),connect:{group:"connect",className:"bpmn-icon-connection-multi",title:l("Connect using "+(f.isForCompensation?"":"Sequence/MessageFlow or ")+"Association"),action:{click:h,dragstart:h}}}),Object(fe.isAny)(f,["bpmn:DataObjectReference","bpmn:DataStoreReference"])&&Object(u.assign)(d,{connect:{group:"connect",className:"bpmn-icon-connection-multi",title:l("Connect using DataInputAssociation"),action:{click:h,dragstart:h}}});var g=c.allowed("elements.delete",{elements:[e]});return Object(u.isArray)(g)&&(g=g[0]===e),g&&Object(u.assign)(d,{delete:{group:"edit",className:"bpmn-icon-trash",title:l("Remove"),action:{click:function(t){n.removeElements([e])}}}}),d};var oi={__depends__:[kt,Dt,Pe.a,Et,Xt,Vn],__init__:["contextPadProvider"],contextPadProvider:["type",ii]},ai={horizontal:["x","width"],vertical:["y","height"]};function si(e){this._modeling=e,this._filters=[],this.registerFilter((function(e,t,n){var i,r=0,o=0;return Object(u.forEach)(e,(function(e){e.waypoints||e.labelTarget||(r+=e[n],o+=1)})),i=Math.round(r/o),Object(u.filter)(e,(function(e){return e[n]<i+50}))}))}si.$inject=["modeling"],si.prototype.registerFilter=function(e){if("function"!=typeof e)throw new Error("the filter has to be a function");this._filters.push(e)},si.prototype.trigger=function(e,t){var n,i,r=this._modeling;if(!(e.length<3||(this._setOrientation(t),i=this._filterElements(e),(n=this._createGroups(i)).length<=2)))return r.distributeElements(n,this._axis,this._dimension),n},si.prototype._filterElements=function(e){var t=this._filters,n=this._axis,i=this._dimension,r=[].concat(e);return t.length?(Object(u.forEach)(t,(function(e){r=e(r,n,i)})),r):e},si.prototype._createGroups=function(e){var t=[],n=this,i=this._axis,r=this._dimension;if(!i)throw new Error('must have a defined "axis" and "dimension"');var o=Object(u.sortBy)(e,i);return Object(u.forEach)(o,(function(e,o){var a,s=n._findRange(e,i,r),c=t[t.length-1];c&&n._hasIntersection(c.range,s)?t[t.length-1].elements.push(e):(a={range:s,elements:[e]},t.push(a))})),t},si.prototype._setOrientation=function(e){var t=ai[e];this._axis=t[0],this._dimension=t[1]},si.prototype._hasIntersection=function(e,t){return Math.max(e.min,e.max)>=Math.min(t.min,t.max)&&Math.min(e.min,e.max)<=Math.max(t.min,t.max)},si.prototype._findRange=function(e){var t=e[this._axis];return{min:t+5,max:t+e[this._dimension]-5}};var ci={__init__:["distributeElements"],distributeElements:["type",si]};function ui(e){e.registerFilter((function(e){return Object(u.filter)(e,(function(e){var t=Object(fe.isAny)(e,["bpmn:Association","bpmn:BoundaryEvent","bpmn:DataInputAssociation","bpmn:DataOutputAssociation","bpmn:Lane","bpmn:MessageFlow","bpmn:Participant","bpmn:SequenceFlow","bpmn:TextAnnotation"]);return!(e.labelTarget||t)}))}))}ui.$inject=["distributeElements"];var pi={__depends__:[ci],__init__:["bpmnDistributeElements"],bpmnDistributeElements:["type",ui]};n(38);function li(e,t){this._actions={};var n=this;e.on("diagram.init",(function(){n._registerDefaultActions(t),e.fire("editorActions.init",{editorActions:n})}))}function di(e,t){return new Error(e+" "+t)}li.$inject=["eventBus","injector"],li.prototype._registerDefaultActions=function(e){var t=e.get("commandStack",!1),n=e.get("modeling",!1),i=e.get("selection",!1),r=e.get("zoomScroll",!1),o=e.get("copyPaste",!1),a=e.get("canvas",!1),s=e.get("rules",!1),c=e.get("keyboardMove",!1),p=e.get("keyboardMoveSelection",!1);t&&(this.register("undo",(function(){t.undo()})),this.register("redo",(function(){t.redo()}))),o&&i&&this.register("copy",(function(){var e=i.get();o.copy(e)})),o&&this.register("paste",(function(){o.paste()})),r&&this.register("stepZoom",(function(e){r.stepZoom(e.value)})),a&&this.register("zoom",(function(e){a.zoom(e.value)})),n&&i&&s&&this.register("removeSelection",(function(){var e=i.get();if(e.length){var t,r=s.allowed("elements.delete",{elements:e});!1!==r&&(t=Object(u.isArray)(r)?r:e).length&&n.removeElements(t.slice())}})),c&&this.register("moveCanvas",(function(e){c.moveCanvas(e)})),p&&this.register("moveSelection",(function(e){p.moveSelection(e.direction,e.accelerated)}))},li.prototype.trigger=function(e,t){if(!this._actions[e])throw di(e,"is not a registered action");return this._actions[e](t)},li.prototype.register=function(e,t){var n=this;if("string"==typeof e)return this._registerAction(e,t);Object(u.forEach)(e,(function(e,t){n._registerAction(t,e)}))},li.prototype._registerAction=function(e,t){if(this.isRegistered(e))throw di(e,"is already registered");this._actions[e]=t},li.prototype.unregister=function(e){if(!this.isRegistered(e))throw di(e,"is not a registered action");this._actions[e]=void 0},li.prototype.getActions=function(){return Object.keys(this._actions)},li.prototype.isRegistered=function(e){return!!this._actions[e]};var fi={__init__:["editorActions"],editorActions:["type",li]};function hi(e){e.invoke(li,this)}r()(hi,li),hi.$inject=["injector"],hi.prototype._registerDefaultActions=function(e){li.prototype._registerDefaultActions.call(this,e);var t=e.get("canvas",!1),n=e.get("elementRegistry",!1),i=e.get("selection",!1),r=e.get("spaceTool",!1),o=e.get("lassoTool",!1),a=e.get("handTool",!1),s=e.get("globalConnect",!1),c=e.get("distributeElements",!1),p=e.get("alignElements",!1),l=e.get("directEditing",!1),d=e.get("searchPad",!1),f=e.get("modeling",!1);t&&n&&i&&this._registerAction("selectElements",(function(){var e=t.getRootElement(),r=n.filter((function(t){return t!==e}));return i.select(r),r})),r&&this._registerAction("spaceTool",(function(){r.toggle()})),o&&this._registerAction("lassoTool",(function(){o.toggle()})),a&&this._registerAction("handTool",(function(){a.toggle()})),s&&this._registerAction("globalConnectTool",(function(){s.toggle()})),i&&c&&this._registerAction("distributeElements",(function(e){var t=i.get(),n=e.type;t.length&&c.trigger(t,n)})),i&&p&&this._registerAction("alignElements",(function(e){var t=i.get(),n=[],r=e.type;t.length&&(n=Object(u.filter)(t,(function(e){return!Object(de.is)(e,"bpmn:Lane")})),p.trigger(n,r))})),i&&f&&this._registerAction("setColor",(function(e){var t=i.get();t.length&&f.setColor(t,e)})),i&&l&&this._registerAction("directEditing",(function(){var e=i.get();e.length&&l.activate(e[0])})),d&&this._registerAction("find",(function(){d.toggle()})),t&&f&&this._registerAction("moveToOrigin",(function(){var e,i,r=t.getRootElement();i=Object(de.is)(r,"bpmn:Collaboration")?n.filter((function(e){return Object(de.is)(e.parent,"bpmn:Collaboration")})):n.filter((function(e){return e!==r&&!Object(de.is)(e.parent,"bpmn:SubProcess")})),e=Object(ge.b)(i),f.moveElements(i,{x:-e.x,y:-e.y},r)}))};var mi={__depends__:[fi],editorActions:["type",hi]};function vi(e){e.on(["create.init","shape.move.init"],(function(e){var t=e.context,n=e.shape;Object(fe.isAny)(n,["bpmn:Participant","bpmn:SubProcess","bpmn:TextAnnotation"])&&(t.gridSnappingContext||(t.gridSnappingContext={}),t.gridSnappingContext.snapLocation="top-left")}))}vi.$inject=["eventBus"];function bi(e,t,n){return n||(n="round"),Math[n](e/t)*t}function gi(e,t,n){var i=!n||!1!==n.active;this._eventBus=t;var r=this;t.on("diagram.init",800,(function(){r.setActive(i)})),t.on(["create.move","create.end","bendpoint.move.move","bendpoint.move.end","connect.move","connect.end","connectionSegment.move.move","connectionSegment.move.end","resize.move","resize.end","shape.move.move","shape.move.end"],1200,(function(t){var n=t.originalEvent;if(!(!r.active||n&&l(n))){var i=t.context,o=i.gridSnappingContext;o||(o=i.gridSnappingContext={}),["x","y"].forEach((function(n){var i={},o=function(e,t,n){var i=e.context,r=e.shape,o=i.gridSnappingContext,a=o.snapLocation,s=o.snapOffset;if(s&&Object(u.isNumber)(s[t]))return s[t];s||(s=o.snapOffset={});Object(u.isNumber)(s[t])||(s[t]=0);if(!r)return s[t];n.get(r.id)||(yi(t)?s[t]+=r[t]+r.width/2:s[t]+=r[t]+r.height/2);if(!a)return s[t];"x"===t?/left/.test(a)?s[t]-=r.width/2:/right/.test(a)&&(s[t]+=r.width/2):/top/.test(a)?s[t]-=r.height/2:/bottom/.test(a)&&(s[t]+=r.height/2);return s[t]}(t,n,e);o&&(i.offset=o);var a=function(e,t){var n=e.context,i=n.createConstraints,r=n.resizeConstraints||{},o=n.gridSnappingContext,a=o.snapConstraints;if(a&&a[t])return a[t];a||(a=o.snapConstraints={});a[t]||(a[t]={});var s=n.direction;i&&(yi(t)?(a.x.min=i.left,a.x.max=i.right):(a.y.min=i.top,a.y.max=i.bottom));var c=r.min,u=r.max;c&&(yi(t)?Oi(s)?a.x.max=c.left:a.x.min=c.right:xi(s)?a.y.max=c.top:a.y.min=c.bottom);u&&(yi(t)?Oi(s)?a.x.min=u.left:a.x.max=u.right:xi(s)?a.y.min=u.top:a.y.max=u.bottom);return a[t]}(t,n);a&&Object(u.assign)(i,a),ft(t,n)||r.snapEvent(t,n,i)}))}}))}function yi(e){return"x"===e}function xi(e){return-1!==e.indexOf("n")}function Oi(e){return-1!==e.indexOf("w")}function ji(e,t){ye.call(this,e),this._gridSnapping=t;var n=this;this.preExecute("shape.resize",(function(e){var t=e.context,i=(t.hints||{}).autoResize;if(i){var r=t.shape,o=t.newBounds;Object(u.isString)(i)?t.newBounds=n.snapComplex(o,i):t.newBounds=n.snapSimple(r,o)}}))}gi.prototype.snapEvent=function(e,t,n){ht(e,t,this.snapValue(e[t],n))},gi.prototype.getGridSpacing=function(){return 10},gi.prototype.snapValue=function(e,t){var n,i,r=0;return t&&t.offset&&(r=t.offset),e=bi(e+=r,10),t&&t.min&&(n=t.min,Object(u.isNumber)(n)&&(n=bi(n+r,10,"ceil"),e=Math.max(e,n))),t&&t.max&&(i=t.max,Object(u.isNumber)(i)&&(i=bi(i+r,10,"floor"),e=Math.min(e,i))),e-=r},gi.prototype.isActive=function(){return this.active},gi.prototype.setActive=function(e){this.active=e,this._eventBus.fire("gridSnapping.toggle",{active:e})},gi.prototype.toggleActive=function(){this.setActive(!this.active)},gi.$inject=["elementRegistry","eventBus","config.gridSnapping"],ji.$inject=["eventBus","gridSnapping","modeling"],r()(ji,ye),ji.prototype.snapSimple=function(e,t){var n=this._gridSnapping;return t.width=n.snapValue(t.width,{min:t.width}),t.height=n.snapValue(t.height,{min:t.height}),t.x=e.x+e.width/2-t.width/2,t.y=e.y+e.height/2-t.height/2,t},ji.prototype.snapComplex=function(e,t){return/w|e/.test(t)&&(e=this.snapHorizontally(e,t)),/n|s/.test(t)&&(e=this.snapVertically(e,t)),e},ji.prototype.snapHorizontally=function(e,t){var n=this._gridSnapping,i=/w/.test(t),r=/e/.test(t),o={};return o.width=n.snapValue(e.width,{min:e.width}),r&&(i?(o.x=n.snapValue(e.x,{max:e.x}),o.width+=n.snapValue(e.x-o.x,{min:e.x-o.x})):e.x=e.x+e.width-o.width),Object(u.assign)(e,o),e},ji.prototype.snapVertically=function(e,t){var n=this._gridSnapping,i=/n/.test(t),r=/s/.test(t),o={};return o.height=n.snapValue(e.height,{min:e.height}),i&&(r?(o.y=n.snapValue(e.y,{max:e.y}),o.height+=n.snapValue(e.y-o.y,{min:e.y-o.y})):e.y=e.y+e.height-o.height),Object(u.assign)(e,o),e};function Ei(e,t){e.on(["spaceTool.move","spaceTool.end"],2e3,(function(e){var n,i=e.context;i.initialized&&("x"===i.axis?(n=t.snapValue(e.dx),e.x=e.x+n-e.dx,e.dx=n):(n=t.snapValue(e.dy),e.y=e.y+n-e.dy,e.dy=n))}))}Ei.$inject=["eventBus","gridSnapping"];var _i={__depends__:[{__init__:["gridSnappingResizeBehavior","gridSnappingSpaceToolBehavior"],gridSnappingResizeBehavior:["type",ji],gridSnappingSpaceToolBehavior:["type",Ei]}],__init__:["gridSnapping"],gridSnapping:["type",gi]};function wi(e,t){e.on("autoPlace",2e3,(function(e){var n=e.source,i=Object(ie.e)(n),r=e.shape,o=he(n,r);return["x","y"].forEach((function(e){var n={};o[e]!==i[e]&&(o[e]>i[e]?n.min=o[e]:n.max=o[e],Object(de.is)(r,"bpmn:TextAnnotation")&&(!function(e){return"x"===e}(e)?n.offset=-r.height/2:n.offset=-r.width/2),o[e]=t.snapValue(o[e],n))})),o}))}wi.$inject=["eventBus","gridSnapping"];function Si(e,t,n){t.on(["create.start","shape.move.start"],1750,(function(t){var i=t.context,r=i.shape,o=e.getRootElement();Object(de.is)(r,"bpmn:Participant")&&Object(de.is)(o,"bpmn:Process")&&o.children.length&&(i.createConstraints&&(r.width=n.snapValue(r.width,{min:r.width}),r.height=n.snapValue(r.height,{min:r.height})))}))}Si.$inject=["canvas","eventBus","gridSnapping"];function Ti(e,t,n){ye.call(this,e),this._gridSnapping=t;var i=this;this.postExecuted(["connection.create","connection.layout"],3e3,(function(e){var t=e.context,r=t.connection,o=t.hints||{},a=r.waypoints;o.connectionStart||o.connectionEnd||!1===o.createElementsBehavior||function(e){return e.length>3}(a)&&n.updateWaypoints(r,i.snapMiddleSegments(a))}))}function Pi(e,t,n){var i=Object(Ie.d)(t,n),r={};return function(e){return"h"===e}(i)&&(r.y=e.snapValue(t.y)),function(e){return"v"===e}(i)&&(r.x=e.snapValue(t.x)),("x"in r||"y"in r)&&(t=Object(u.assign)({},t,r),n=Object(u.assign)({},n,r)),[t,n]}Ti.$inject=["eventBus","gridSnapping","modeling"],r()(Ti,ye),Ti.prototype.snapMiddleSegments=function(e){var t,n=this._gridSnapping;e=e.slice();for(var i=1;i<e.length-2;i++)t=Pi(n,e[i],e[i+1]),e[i]=t[0],e[i+1]=t[1];return e};var Ci={__depends__:[_i,{__init__:["gridSnappingAutoPlaceBehavior","gridSnappingCreateParticipantBehavior","gridSnappingLayoutConnectionBehavior"],gridSnappingAutoPlaceBehavior:["type",wi],gridSnappingCreateParticipantBehavior:["type",Si],gridSnappingLayoutConnectionBehavior:["type",Ti]}],__init__:["bpmnGridSnapping"],bpmnGridSnapping:["type",vi]};function Ai(e,t){this._interactionEvents=t;var n=this;e.on(["interactionEvents.createHit","interactionEvents.updateHit"],(function(e){var t=e.element,i=e.gfx;return Object(de.is)(t,"bpmn:Lane")?n.createParticipantHit(t,i):Object(de.is)(t,"bpmn:Participant")?Object(On.isExpanded)(t)?n.createParticipantHit(t,i):n.createDefaultHit(t,i):Object(de.is)(t,"bpmn:SubProcess")?Object(On.isExpanded)(t)?n.createSubProcessHit(t,i):n.createDefaultHit(t,i):void 0}))}Ai.$inject=["eventBus","interactionEvents"],Ai.prototype.createDefaultHit=function(e,t){return this._interactionEvents.removeHits(t),this._interactionEvents.createDefaultHit(e,t),!0},Ai.prototype.createParticipantHit=function(e,t){return this._interactionEvents.removeHits(t),this._interactionEvents.createBoxHit(t,"click-stroke",{width:e.width,height:e.height}),this._interactionEvents.createBoxHit(t,"all",{width:30,height:e.height}),!0},Ai.prototype.createSubProcessHit=function(e,t){return this._interactionEvents.removeHits(t),this._interactionEvents.createBoxHit(t,"click-stroke",{width:e.width,height:e.height}),this._interactionEvents.createBoxHit(t,"all",{width:e.width,height:30}),!0};var Ri={__init__:["bpmnInteractionEvents"],bpmnInteractionEvents:["type",Ai]};function ki(e){e.invoke(y,this)}r()(ki,y),ki.$inject=["injector"],ki.prototype.registerBindings=function(e,t){function n(n,i){t.isRegistered(n)&&e.addListener(i)}y.prototype.registerBindings.call(this,e,t),n("selectElements",(function(n){var i=n.keyEvent;if(e.isKey(["a","A"],i)&&e.isCmd(i))return t.trigger("selectElements"),!0})),n("find",(function(n){var i=n.keyEvent;if(e.isKey(["f","F"],i)&&e.isCmd(i))return t.trigger("find"),!0})),n("spaceTool",(function(n){var i=n.keyEvent;if(!e.hasModifier(i))return e.isKey(["s","S"],i)?(t.trigger("spaceTool"),!0):void 0})),n("lassoTool",(function(n){var i=n.keyEvent;if(!e.hasModifier(i))return e.isKey(["l","L"],i)?(t.trigger("lassoTool"),!0):void 0})),n("handTool",(function(n){var i=n.keyEvent;if(!e.hasModifier(i))return e.isKey(["h","H"],i)?(t.trigger("handTool"),!0):void 0})),n("globalConnectTool",(function(n){var i=n.keyEvent;if(!e.hasModifier(i))return e.isKey(["c","C"],i)?(t.trigger("globalConnectTool"),!0):void 0})),n("directEditing",(function(n){var i=n.keyEvent;if(!e.hasModifier(i))return e.isKey(["e","E"],i)?(t.trigger("directEditing"),!0):void 0}))};var Bi={__depends__:[x],__init__:["keyboardBindings"],keyboardBindings:["type",ki]},Mi={moveSpeed:1,moveSpeedAccelerated:10},Di={ArrowLeft:"left",Left:"left",ArrowUp:"up",Up:"up",ArrowRight:"right",Right:"right",ArrowDown:"down",Down:"down"},Ni={left:function(e){return{x:-e,y:0}},up:function(e){return{x:0,y:-e}},right:function(e){return{x:e,y:0}},down:function(e){return{x:0,y:e}}};function Li(e,t,n,i,r){var o=this;this._config=Object(u.assign)({},Mi,e||{}),t.addListener(1500,(function(e){var n=e.keyEvent,i=Di[n.key];if(i&&!t.isCmd(n)){var r=t.isShift(n);return o.moveSelection(i,r),!0}})),this.moveSelection=function(e,t){var o=r.get();if(o.length){var a=this._config[t?"moveSpeedAccelerated":"moveSpeed"],s=Ni[e](a);i.allowed("elements.move",{shapes:o})&&n.moveElements(o,s)}}}Li.$inject=["config.keyboardMoveSelection","keyboard","modeling","rules","selection"];var Ii={__depends__:[x,Pe.a],__init__:["keyboardMoveSelection"],keyboardMoveSelection:["type",Li]};function Fi(e,t,n,i){e.on("element.changed",(function(i){var r=i.element;(r.parent||r===t.getRootElement())&&(i.gfx=n.getGraphics(r)),i.gfx&&e.fire(Object(ge.f)(r)+".changed",i)})),e.on("elements.changed",(function(t){var n=t.elements;n.forEach((function(t){e.fire("element.changed",{element:t})})),i.updateContainments(n)})),e.on("shape.changed",(function(e){i.update("shape",e.element,e.gfx)})),e.on("connection.changed",(function(e){i.update("connection",e.element,e.gfx)}))}Fi.$inject=["eventBus","canvas","elementRegistry","graphicsFactory"];var zi={__init__:["changeSupport"],changeSupport:["type",Fi]};function Vi(e,t,n,i){this._dragging=i,this._rules=t;var r=this;function o(e,t){var n,i=e.shape,o=e.direction,a=e.resizeConstraints;e.delta=t,n=function(e,t,n){var i=n.x,r=n.y,o={x:e.x,y:e.y,width:e.width,height:e.height};return-1!==t.indexOf("n")?(o.y=e.y+r,o.height=e.height-r):-1!==t.indexOf("s")&&(o.height=e.height+r),-1!==t.indexOf("e")?o.width=e.width+i:-1!==t.indexOf("w")&&(o.x=e.x+i,o.width=e.width-i),o}(i,o,t),e.newBounds=function(e,t){if(!t)return e;var n=Object(ie.b)(e);return Object(ie.a)({top:qn("top",n,t),right:qn("right",n,t),bottom:qn("bottom",n,t),left:qn("left",n,t)})}(n,a),e.canExecute=r.canResize(e)}e.on("resize.start",(function(e){var t,n,i;t=e.context,n=t.resizeConstraints,i=t.minBounds,void 0===n&&(void 0===i&&(i=r.computeMinResizeBox(t)),t.resizeConstraints={min:Object(ie.b)(i)})})),e.on("resize.move",(function(e){var t={x:e.dx,y:e.dy};o(e.context,t)})),e.on("resize.end",(function(e){!function(e){var t=e.shape,i=e.canExecute,r=e.newBounds;if(i){if(!function(e,t){return e.x!==t.x||e.y!==t.y||e.width!==t.width||e.height!==t.height}(t,r=Object(ie.g)(r)))return;n.resizeShape(t,r)}}(e.context)}))}function $i(e,t){var n=Object(ie.e)(e),i=Object(ie.b)(e),r={x:n.x,y:n.y};return-1!==t.indexOf("n")?r.y=i.top:-1!==t.indexOf("s")&&(r.y=i.bottom),-1!==t.indexOf("e")?r.x=i.right:-1!==t.indexOf("w")&&(r.x=i.left),r}function Hi(e){return"n"===e||"s"===e?"resize-ns":"e"===e||"w"===e?"resize-ew":"nw"===e||"se"===e?"resize-nwse":"resize-nesw"}Vi.prototype.canResize=function(e){var t=this._rules,n=Object(u.pick)(e,["newBounds","shape","delta","direction"]);return t.allowed("shape.resize",n)},Vi.prototype.activate=function(e,t,n){var i,r,o=this._dragging;if("string"==typeof n&&(n={direction:n}),!(r=(i=Object(u.assign)({shape:t},n)).direction))throw new Error("must provide a direction (n|w|s|e|nw|se|ne|sw)");o.init(e,$i(t,r),"resize",{autoActivate:!0,cursor:Hi(r),data:{shape:t,context:i}})},Vi.prototype.computeMinResizeBox=function(e){var t=e.shape;return function(e,t,n,i){var r=Object(ie.b)(t),o={top:/n/.test(e)?r.bottom-n.height:r.top,left:/w/.test(e)?r.right-n.width:r.left,bottom:/s/.test(e)?r.top+n.height:r.bottom,right:/e/.test(e)?r.left+n.width:r.right},a=i?Object(ie.b)(i):o,s={top:Gn(o.top,a.top),left:Gn(o.left,a.left),bottom:Hn(o.bottom,a.bottom),right:Hn(o.right,a.right)};return Object(ie.a)(s)}(e.direction,t,e.minDimensions||{width:10,height:10},Yn(t,e.childrenBoxPadding))},Vi.$inject=["eventBus","rules","modeling","dragging"];function Gi(e,t,n){e.on("resize.move",500,(function(e){var i,r,o,a;i=e.context,r=i.shape,o=i.newBounds,(a=i.frame)||(a=i.frame=n.addFrame(r,t.getDefaultLayer()),t.addMarker(r,"djs-resizing")),o.width>5&&Object(K.b)(a,{x:o.x,width:o.width}),o.height>5&&Object(K.b)(a,{y:o.y,height:o.height}),i.canExecute?Object(K.c)(a).remove("resize-not-ok"):Object(K.c)(a).add("resize-not-ok")})),e.on("resize.cleanup",(function(e){var n,i;n=e.context,i=n.shape,n.frame&&Object(K.j)(n.frame),t.removeMarker(i,"djs-resizing")}))}Gi.$inject=["eventBus","canvas","previewSupport"];var Wi=["n","w","s","e","nw","ne","se","sw"];function qi(e,t,n,i){this._resize=i,this._canvas=t;var r=this;e.on("selection.changed",(function(e){var t=e.newSelection;r.removeResizers(),1===t.length&&Object(u.forEach)(t,Object(u.bind)(r.addResizer,r))})),e.on("shape.changed",(function(e){var t=e.element;n.isSelected(t)&&(r.removeResizers(),r.addResizer(t))}))}qi.prototype.makeDraggable=function(e,t,n){var i=this._resize;function r(t){Object(ni.c)(t)&&i.activate(t,e,n)}p.event.bind(t,"mousedown",r),p.event.bind(t,"touchstart",r)},qi.prototype._createResizer=function(e,t,n,i){var r=this._getResizersParent(),o=function(e){var t={x:0,y:0};-1!==e.indexOf("e")?t.x=6:-1!==e.indexOf("w")&&(t.x=-6);-1!==e.indexOf("s")?t.y=6:-1!==e.indexOf("n")&&(t.y=-6);return t}(i),a=Object(K.f)("g");Object(K.c)(a).add("djs-resizer"),Object(K.c)(a).add("djs-resizer-"+e.id),Object(K.c)(a).add("djs-resizer-"+i),Object(K.a)(r,a);var s=Object(K.f)("rect");Object(K.b)(s,{x:-2+o.x,y:-2+o.y,width:4,height:4}),Object(K.c)(s).add("djs-resizer-visual"),Object(K.a)(a,s);var c=Object(K.f)("rect");return Object(K.b)(c,{x:-10+o.x,y:-10+o.y,width:20,height:20}),Object(K.c)(c).add("djs-resizer-hit"),Object(K.a)(a,c),Object(Fe.b)(a,t,n),a},qi.prototype.createResizer=function(e,t){var n=$i(e,t),i=this._createResizer(e,n.x,n.y,t);this.makeDraggable(e,i,t)},qi.prototype.addResizer=function(e){var t=this;this._resize.canResize({shape:e})&&Object(u.forEach)(Wi,(function(n){t.createResizer(e,n)}))},qi.prototype.removeResizers=function(){var e=this._getResizersParent();Object(K.d)(e)},qi.prototype._getResizersParent=function(){return this._canvas.getLayer("resizers")},qi.$inject=["eventBus","canvas","selection","resize"];var Ui={__depends__:[Le,ke,zt],__init__:["resize","resizePreview","resizeHandles"],resize:["type",Vi],resizePreview:["type",Gi],resizeHandles:["type",qi]},Ki=n(758),Yi=n(735);function Xi(e,t){var n=t.create("bpmn:CategoryValue"),i=t.create("bpmn:Category",{categoryValue:[n]});return Object(Yi.add)(e.get("rootElements"),i),Object(de.getBusinessObject)(i).$parent=e,Object(de.getBusinessObject)(n).$parent=i,n}var Ji=n(742);function Zi(e,t,n,i,r,o,a){function s(e,t){(t||Object(fe.isAny)(e,["bpmn:Task","bpmn:TextAnnotation","bpmn:Group"])||Qi(e))&&i.activate(e)}this._bpmnFactory=t,this._canvas=n,this._modeling=r,this._textRenderer=a,i.registerProvider(this),e.on("element.dblclick",(function(e){s(e.element,!0)})),e.on(["autoPlace.start","canvas.viewbox.changing","drag.init","element.mousedown","popupMenu.open"],(function(e){i.isActive()&&i.complete()})),e.on(["commandStack.changed"],(function(e){i.isActive()&&i.cancel()})),e.on("directEditing.activate",(function(e){o.removeResizers()})),e.on("create.end",500,(function(e){var t=e.context,n=t.shape,i=e.context.canExecute;e.isTouch||i&&(t.hints&&!1===t.hints.createElementsBehavior||s(n))})),e.on("autoPlace.end",500,(function(e){s(e.shape)}))}function Qi(e){return Object(de.is)(e,"bpmn:SubProcess")&&!Object(On.isExpanded)(e)}Zi.$inject=["eventBus","bpmnFactory","canvas","directEditing","modeling","resizeHandles","textRenderer"],Zi.prototype.activate=function(e){var t=Object(Ki.a)(e);if(void 0!==t){var n={text:t},i=this.getEditingBBox(e);Object(u.assign)(n,i);var r={};return(Object(fe.isAny)(e,["bpmn:Task","bpmn:Participant","bpmn:Lane","bpmn:CallActivity"])||Qi(e))&&Object(u.assign)(r,{centerVertically:!0}),Object(Ji.f)(e)&&Object(u.assign)(r,{autoResize:!0}),Object(de.is)(e,"bpmn:TextAnnotation")&&Object(u.assign)(r,{resizable:!0,autoResize:!0}),Object(u.assign)(n,{options:r}),n}},Zi.prototype.getEditingBBox=function(e){var t=this._canvas,n=e.label||e,i=t.getAbsoluteBBox(n),r=i.x+i.width/2,o=i.y+i.height/2,a={x:i.x,y:i.y},s=t.zoom(),c=this._textRenderer.getDefaultStyle(),p=this._textRenderer.getExternalStyle(),l=p.fontSize*s,d=p.lineHeight,f=c.fontSize*s,h=c.lineHeight,m={fontFamily:this._textRenderer.getDefaultStyle().fontFamily,fontWeight:this._textRenderer.getDefaultStyle().fontWeight};(Object(de.is)(e,"bpmn:Lane")||function(e){return Object(de.is)(e,"bpmn:Participant")&&Object(On.isExpanded)(e)}(e))&&(Object(u.assign)(a,{width:i.height,height:30*s,x:i.x-i.height/2+15*s,y:o-30*s/2}),Object(u.assign)(m,{fontSize:f+"px",lineHeight:h,paddingTop:7*s+"px",paddingBottom:7*s+"px",paddingLeft:5*s+"px",paddingRight:5*s+"px",transform:"rotate(-90deg)"})),(Object(fe.isAny)(e,["bpmn:Task","bpmn:CallActivity"])||function(e){return Object(de.is)(e,"bpmn:Participant")&&!Object(On.isExpanded)(e)}(e)||Qi(e))&&(Object(u.assign)(a,{width:i.width,height:i.height}),Object(u.assign)(m,{fontSize:f+"px",lineHeight:h,paddingTop:7*s+"px",paddingBottom:7*s+"px",paddingLeft:5*s+"px",paddingRight:5*s+"px"})),function(e){return Object(de.is)(e,"bpmn:SubProcess")&&Object(On.isExpanded)(e)}(e)&&(Object(u.assign)(a,{width:i.width,x:i.x}),Object(u.assign)(m,{fontSize:f+"px",lineHeight:h,paddingTop:7*s+"px",paddingBottom:7*s+"px",paddingLeft:5*s+"px",paddingRight:5*s+"px"}));var v=90*s,b=7*s,g=4*s;if(n.labelTarget&&(Object(u.assign)(a,{width:v,height:i.height+b+g,x:r-v/2,y:i.y-b}),Object(u.assign)(m,{fontSize:l+"px",lineHeight:d,paddingTop:b+"px",paddingBottom:g+"px"})),Object(Ji.f)(n)&&!Object(Ji.d)(n)&&!Object(Ji.e)(n)){var y=Object(Ji.c)(e),x=t.getAbsoluteBBox({x:y.x,y:y.y,width:0,height:0}),O=l+b+g;Object(u.assign)(a,{width:v,height:O,x:x.x-v/2,y:x.y-O/2}),Object(u.assign)(m,{fontSize:l+"px",lineHeight:d,paddingTop:b+"px",paddingBottom:g+"px"})}return Object(de.is)(e,"bpmn:TextAnnotation")&&(Object(u.assign)(a,{width:i.width,height:i.height,minWidth:30*s,minHeight:10*s}),Object(u.assign)(m,{textAlign:"left",paddingTop:5*s+"px",paddingBottom:7*s+"px",paddingLeft:7*s+"px",paddingRight:5*s+"px",fontSize:f+"px",lineHeight:h})),{bounds:a,style:m}},Zi.prototype.update=function(e,t,n,i){var r,o,a;if((Object(de.is)(e,"bpmn:TextAnnotation")&&(o=this._canvas.getAbsoluteBBox(e),r={x:e.x,y:e.y,width:e.width/o.width*i.width,height:e.height/o.height*i.height}),Object(de.is)(e,"bpmn:Group"))&&!Object(de.getBusinessObject)(e).categoryValueRef){var s=this._canvas.getRootElement(),c=Xi(Object(de.getBusinessObject)(s).$parent,this._bpmnFactory);Object(de.getBusinessObject)(e).categoryValueRef=c}(a=t)&&a.trim()||(t=null),this._modeling.updateLabel(e,t,r)};function er(e,t,n,i){var r,o,a,s=this,c=t.getDefaultLayer();e.on("directEditing.activate",(function(e){var n=e.active;if(r=n.element.label||n.element,Object(de.is)(r,"bpmn:TextAnnotation")){o=t.getAbsoluteBBox(r),a=Object(K.f)("g");var u=i.getScaledPath("TEXT_ANNOTATION",{xScaleFactor:1,yScaleFactor:1,containerWidth:r.width,containerHeight:r.height,position:{mx:0,my:0}}),p=s.path=Object(K.f)("path");Object(K.b)(p,{d:u,strokeWidth:2,stroke:tr(r)}),Object(K.a)(a,p),Object(K.a)(c,a),Object(Fe.c)(a,r.x,r.y)}Object(de.is)(r,"bpmn:TextAnnotation")||r.labelTarget?t.addMarker(r,"djs-element-hidden"):(Object(de.is)(r,"bpmn:Task")||Object(de.is)(r,"bpmn:CallActivity")||Object(de.is)(r,"bpmn:SubProcess")||Object(de.is)(r,"bpmn:Participant"))&&t.addMarker(r,"djs-label-hidden")})),e.on("directEditing.resize",(function(e){if(Object(de.is)(r,"bpmn:TextAnnotation")){var t=e.height,n=e.dy,a=Math.max(r.height/o.height*(t+n),0),c=i.getScaledPath("TEXT_ANNOTATION",{xScaleFactor:1,yScaleFactor:1,containerWidth:r.width,containerHeight:a,position:{mx:0,my:0}});Object(K.b)(s.path,{d:c})}})),e.on(["directEditing.complete","directEditing.cancel"],(function(e){var n=e.active;n&&(t.removeMarker(n.element.label||n.element,"djs-element-hidden"),t.removeMarker(r,"djs-label-hidden")),r=void 0,o=void 0,a&&(Object(K.j)(a),a=void 0)}))}function tr(e,t){return Object(de.getBusinessObject)(e).di.get("stroke")||t||"black"}er.$inject=["eventBus","canvas","elementRegistry","pathMap"];var nr={__depends__:[zi,Ui,kt],__init__:["labelEditingProvider","labelEditingPreview"],labelEditingProvider:["type",Zi],labelEditingPreview:["type",er]},ir=["top","bottom","left","right"];function rr(e,t){function n(e){if(Object(Ji.d)(e)){var n=function(e){var t=Object(ie.e)(e.label),n=or(Object(ie.e)(e),t);if(i=n,-1===ir.indexOf(i))return;var i;var r=function(e){var t=Object(ie.e)(e);return[].concat(e.incoming.map((function(e){return e.waypoints[e.waypoints.length-2]})),e.outgoing.map((function(e){return e.waypoints[1]}))).map((function(e){return or(t,e)}))}(e);if(e.host){var o=function(e){var t,n=e.host,i=Object(ie.e)(e),r=Object(ie.f)(i,n);t=r.indexOf("-")>=0?r.split("-"):[r];return ir.filter((function(e){return-1===t.indexOf(e)}))}(e);r=r.concat(o)}var a=ir.filter((function(e){return-1===r.indexOf(e)}));if(-1!==a.indexOf(n))return;return a[0]}(e);n&&function(e,n){var i=Object(ie.e)(e),r=e.label,o=Object(ie.e)(r);if(!r.parent)return;var a,s=Object(ie.b)(e);switch(n){case"top":a={x:i.x,y:s.top-10-r.height/2};break;case"left":a={x:s.left-10-r.width/2,y:i.y};break;case"bottom":a={x:i.x,y:s.bottom+10+r.height/2};break;case"right":a={x:s.right+10+r.width/2,y:i.y}}var c=C(a,o);t.moveShape(r,c)}(e,n)}}ye.call(this,e),this.postExecuted(["connection.create","connection.layout","connection.updateWaypoints"],(function(e){var t=e.context,i=t.connection,r=i.source,o=i.target;!1!==(t.hints||{}).createElementsBehavior&&(n(r),n(o))})),this.postExecuted(["label.create"],(function(e){var t=e.context,i=t.shape;!1!==(t.hints||{}).createElementsBehavior&&n(i.labelTarget)})),this.postExecuted(["elements.create"],(function(e){var t=e.context,i=t.elements;!1!==(t.hints||{}).createElementsBehavior&&i.forEach((function(e){n(e)}))}))}function or(e,t){return Object(ie.f)(t,e,5)}function ar(e,t,n){ye.call(this,e),this.preExecute("shape.append",(function(e){var t=e.source,n=e.shape;e.position||(Object(de.is)(n,"bpmn:TextAnnotation")?e.position={x:t.x+t.width/2+75,y:t.y-50-n.height/2}:e.position={x:t.x+t.width+80+n.width/2,y:t.y+t.height/2})}),!0)}function sr(e,t){e.invoke(ye,this),this.postExecute("shape.move",(function(e){var n=e.newParent,i=e.shape,r=Object(u.filter)(i.incoming.concat(i.outgoing),(function(e){return Object(de.is)(e,"bpmn:Association")}));Object(u.forEach)(r,(function(e){t.moveConnection(e,{x:0,y:0},n)}))}),!0)}r()(rr,ye),rr.$inject=["eventBus","modeling"],r()(ar,ye),ar.$inject=["eventBus","elementFactory","bpmnRules"],r()(sr,ye),sr.$inject=["injector","modeling"];function cr(e,t){t.invoke(ye,this),this._bpmnReplace=e;var n=this;this.postExecuted("elements.create",500,(function(e){var t=e.elements;1===(t=t.filter((function(e){return ur(e,e.host)}))).length&&t.map((function(e){return t.indexOf(e)})).forEach((function(i){var r=t[i];e.elements[i]=n.replaceShape(t[i],r)}))}),!0),this.preExecute("elements.move",500,(function(e){var t=e.shapes,i=e.newHost;if(1===t.length){var r=t[0];ur(r,i)&&(e.shapes=[n.replaceShape(r,i)])}}),!0)}function ur(e,t){return!Object(Ji.e)(e)&&Object(fe.isAny)(e,["bpmn:IntermediateThrowEvent","bpmn:IntermediateCatchEvent"])&&!!t}function pr(e,t){function n(e){return Object(u.filter)(e.attachers,(function(e){return Object(de.is)(e,"bpmn:BoundaryEvent")}))}ye.call(this,e),this.postExecute("connection.create",(function(e){var i=e.context.source,r=e.context.target,o=n(r);Object(de.is)(i,"bpmn:EventBasedGateway")&&Object(de.is)(r,"bpmn:ReceiveTask")&&o.length>0&&t.removeElements(o)})),this.postExecute("connection.reconnect",(function(e){var i=e.context.oldSource,r=e.context.newSource;Object(de.is)(i,"bpmn:Gateway")&&Object(de.is)(r,"bpmn:EventBasedGateway")&&Object(u.forEach)(r.outgoing,(function(e){var i=e.target,r=n(i);Object(de.is)(i,"bpmn:ReceiveTask")&&r.length>0&&t.removeElements(r)}))}))}cr.$inject=["bpmnReplace","injector"],r()(cr,ye),cr.prototype.replaceShape=function(e,t){var n,i,r=(n=e,(i=Object(de.getBusinessObject)(n).eventDefinitions)&&i[0]),o={type:"bpmn:BoundaryEvent",host:t};return r&&(o.eventDefinitionType=r.$type),this._bpmnReplace.replaceElement(e,o,{layoutConnection:!1})},pr.$inject=["eventBus","modeling"],r()(pr,ye);function lr(e,t,n,i,r){function o(e){return Object(fe.isAny)(e,["bpmn:ReceiveTask","bpmn:SendTask"])||function(e,t){Object(u.isArray)(t)||(t=[t]);return Object(u.some)(t,(function(t){return Object(On.hasEventDefinition)(e,t)}))}(e,["bpmn:ErrorEventDefinition","bpmn:EscalationEventDefinition","bpmn:MessageEventDefinition","bpmn:SignalEventDefinition"])}function a(t){var n=e.getDefinitions().get("rootElements");return!!Object(u.find)(n,Object(u.matchPattern)({id:t.id}))}function s(e){return Object(de.is)(e,"bpmn:ErrorEventDefinition")?"errorRef":Object(de.is)(e,"bpmn:EscalationEventDefinition")?"escalationRef":Object(de.is)(e,"bpmn:MessageEventDefinition")?"messageRef":Object(de.is)(e,"bpmn:SignalEventDefinition")?"signalRef":void 0}function c(e){if(Object(fe.isAny)(e,["bpmn:ReceiveTask","bpmn:SendTask"]))return e.get("messageRef");var t=e.get("eventDefinitions")[0];return t.get(s(t))}n.invoke(ye,this),this.executed("shape.create",(function(t){var n=t.shape;if(o(n)){var i,r=c(Object(de.getBusinessObject)(n));r&&!a(r)&&(i=e.getDefinitions().get("rootElements"),Object(Yi.add)(i,r),t.addedRootElement=r)}}),!0),this.reverted("shape.create",(function(t){var n=t.addedRootElement;if(n){var i=e.getDefinitions().get("rootElements");Object(Yi.remove)(i,n)}}),!0),t.on("copyPaste.copyElement",(function(e){var t=e.descriptor,n=e.element;if(o(n)){var i=c(Object(de.getBusinessObject)(n));i&&(t.referencedRootElement=i)}})),t.on("copyPaste.pasteElement",500,(function(e){var t=e.descriptor,n=t.businessObject;if(o(n)){var c=t.referencedRootElement;c&&(a(c)||(c=i.copyElement(c,r.create(c.$type))),function(e,t){if(Object(fe.isAny)(e,["bpmn:ReceiveTask","bpmn:SendTask"]))return e.set("messageRef",t);var n=e.get("eventDefinitions")[0];n.set(s(n),t)}(n,c))}}))}function dr(e){e.invoke(ye,this),this.preExecute("shape.create",1500,(function(e){var t=e.context,n=t.parent,i=t.shape;Object(de.is)(n,"bpmn:Lane")&&!Object(de.is)(i,"bpmn:Lane")&&(t.parent=Object(fe.getParent)(n,"bpmn:Participant"))}))}lr.$inject=["bpmnjs","eventBus","injector","moddleCopy","bpmnFactory"],r()(lr,ye),dr.$inject=["injector"],r()(dr,ye);function fr(e,t,n){t.on(["create.hover","create.move","create.end","shape.move.hover","shape.move.move","shape.move.end"],1500,(function(t){var i=t.context.shape||t.shape,r=t.hover;Object(de.is)(r,"bpmn:Lane")&&!Object(fe.isAny)(i,["bpmn:Lane","bpmn:Participant"])&&(t.hover=ei(r),t.hoverGfx=e.getGraphics(t.hover));var o=n.getRootElement();r!==o&&(i.labelTarget||Object(de.is)(i,"bpmn:Group"))&&(t.hover=o,t.hoverGfx=e.getGraphics(t.hover))})),t.on(["connect.hover","connect.out","connect.end","connect.cleanup","global-connect.hover","global-connect.out","global-connect.end","global-connect.cleanup"],1500,(function(t){var n=t.hover;Object(de.is)(n,"bpmn:Lane")&&(t.hover=ei(n)||n,t.hoverGfx=e.getGraphics(t.hover))})),t.on(["bendpoint.move.hover"],1500,(function(t){var n=t.context,i=t.hover,r=n.type;Object(de.is)(i,"bpmn:Lane")&&/reconnect/.test(r)&&(t.hover=ei(i)||i,t.hoverGfx=e.getGraphics(t.hover))})),t.on(["connect.start"],1500,(function(e){var t=e.context,n=t.start;Object(de.is)(n,"bpmn:Lane")&&(t.start=ei(n)||n)})),t.on("shape.move.start",2e3,(function(e){var t=e.shape;Object(de.is)(t,"bpmn:Lane")&&(e.shape=ei(t)||t)}))}function hr(e,t,n){ye.call(this,e),this.preExecute("shape.create",(function(e){var n=e.context.shape;if(Object(de.is)(n,"bpmn:DataObjectReference")&&"label"!==n.type){var i=t.create("bpmn:DataObject");n.businessObject.dataObjectRef=i}}))}fr.$inject=["elementRegistry","eventBus","canvas"],hr.$inject=["eventBus","bpmnFactory","moddle"],r()(hr,ye);function mr(e,t,n){function i(t){var i,r=t.parent,o=e.getRootElement();Object(de.is)(o,"bpmn:Collaboration")?i=o:(i=n.makeCollaboration(),t.process=r),t.parent=i}ye.call(this,t),t.on(["create.start","shape.move.start"],2e3,(function(t){var n=t.context,i=n.shape,r=e.getRootElement();if(Object(de.is)(i,"bpmn:Participant")&&Object(de.is)(r,"bpmn:Process")&&r.children.length){var o=r.children.filter((function(e){return!Object(de.is)(e,"bpmn:Group")&&!Object(Ji.e)(e)&&!function(e){return!!e.waypoints}(e)}));if(o.length){var a=Object(ge.b)(o),s=function(e,t){t={width:t.width+40+30,height:t.height+40};var n=Math.max(e.width,t.width),i=Math.max(e.height,t.height);return{x:-n/2,y:-i/2,width:n,height:i}}(i,a);Object(u.assign)(i,s),n.createConstraints=function(e,t){return{bottom:(t=Object(ie.b)(t)).top+e.height/2-20,left:t.right-e.width/2+20,top:t.bottom-e.height/2+20,right:t.left+e.width/2-20-30}}(i,a)}}})),t.on("create.start",2e3,(function(n){var i=n.context.shape,r=e.getRootElement(),o=e.getGraphics(r);function a(e){e.element=r,e.gfx=o}Object(de.is)(i,"bpmn:Participant")&&Object(de.is)(r,"bpmn:Process")&&(t.on("element.hover",2e3,a),t.once("create.cleanup",(function(){t.off("element.hover",a)})))})),this.preExecute("shape.create",(function(e){var t=e.parent,n=e.shape;Object(de.is)(n,"bpmn:Participant")&&Object(de.is)(t,"bpmn:Process")&&i(e)}),!0),this.execute("shape.create",(function(e){var t=e.process,n=e.shape;t&&(e.oldProcessRef=n.businessObject.processRef,n.businessObject.processRef=t.businessObject)}),!0),this.revert("shape.create",(function(e){var t=e.process,n=e.shape;t&&(n.businessObject.processRef=e.oldProcessRef)}),!0),this.postExecute("shape.create",(function(e){var t=e.process,i=e.shape;if(t){var r=t.children.slice();n.moveElements(r,{x:0,y:0},i)}}),!0),this.preExecute("elements.create",2e3,(function(e){var t,n=e.elements,r=e.parent;vr(n)&&Object(de.is)(r,"bpmn:Process")&&(i(e),t=vr(n),e.oldProcessRef=t.businessObject.processRef,t.businessObject.processRef=r.businessObject)}),!0),this.revert("elements.create",(function(e){var t=e.elements;e.process&&(vr(t).businessObject.processRef=e.oldProcessRef)}),!0),this.postExecute("elements.create",(function(e){var t,i=e.elements,r=e.process;if(r){t=vr(i);var o=r.children.slice();n.moveElements(o,{x:0,y:0},t)}}),!0)}function vr(e){return Object(u.find)(e,(function(e){return Object(de.is)(e,"bpmn:Participant")}))}mr.$inject=["canvas","eventBus","modeling"],r()(mr,ye);function br(e,t){function n(e,n){var i=e.get("properties"),r=Object(u.find)(i,(function(e){return"__targetRef_placeholder"===e.name}));return!r&&n&&(r=t.create("bpmn:Property",{name:"__targetRef_placeholder"}),Object(Yi.add)(i,r)),r}function i(e,t){var i=n(e);i&&(function(e,t,n){var i=e.get("dataInputAssociations");return Object(u.find)(i,(function(e){return e!==n&&e.targetRef===t}))}(e,i,t)||Object(Yi.remove)(e.get("properties"),i))}function r(e){var t,r=e.context,o=r.connection,a=o.businessObject,s=o.target,c=s&&s.businessObject,u=r.newTarget,p=u&&u.businessObject,l=r.oldTarget||r.target,d=l&&l.businessObject,f=o.businessObject;d&&d!==c&&i(d,a),p&&p!==c&&i(p,a),c?(t=n(c,!0),f.targetRef=t):f.targetRef=null}ye.call(this,e),this.executed(["connection.create","connection.delete","connection.move","connection.reconnect"],gr(r)),this.reverted(["connection.create","connection.delete","connection.move","connection.reconnect"],gr(r))}function gr(e){return function(t){var n=t.context.connection;if(Object(de.is)(n,"bpmn:DataInputAssociation"))return e(t)}}function yr(e){this._bpmnUpdater=e}function xr(e,t,n,i){function r(e){return e.children.filter((function(e){return Object(de.is)(e,"bpmn:DataStoreReference")&&!e.labelTarget}))}function o(e,i){var r=e.businessObject||e;if(i=i||n.filter((function(e){return Object(de.is)(e,"bpmn:Participant")}))[0]){var o=i.businessObject||i;t.execute("dataStore.updateContainment",{dataStoreBo:r,newSemanticParent:o.processRef||o,newDiParent:o.di})}}ye.call(this,i),t.registerHandler("dataStore.updateContainment",yr),this.preExecute("shape.create",(function(e){var t=e.context,n=t.shape;Object(de.is)(n,"bpmn:DataStoreReference")&&"label"!==n.type&&(t.hints||(t.hints={}),t.hints.autoResize=!1)})),this.preExecute("elements.move",(function(e){var t=e.context,n=t.shapes;n.filter((function(e){return Object(de.is)(e,"bpmn:DataStoreReference")})).length&&(t.hints||(t.hints={}),t.hints.autoResize=n.filter((function(e){return!Object(de.is)(e,"bpmn:DataStoreReference")})))})),this.postExecute("shape.create",(function(e){var t=e.context.shape,n=t.parent;Object(de.is)(t,"bpmn:DataStoreReference")&&"label"!==t.type&&Object(de.is)(n,"bpmn:Collaboration")&&o(t)})),this.postExecute("shape.move",(function(e){var t=e.context,n=t.shape,i=t.oldParent,r=n.parent;Object(de.is)(i,"bpmn:Collaboration")||Object(de.is)(n,"bpmn:DataStoreReference")&&"label"!==n.type&&Object(de.is)(r,"bpmn:Collaboration")&&o(n,Object(de.is)(i,"bpmn:Participant")?i:function(e,t){for(;e.parent;){if(Object(de.is)(e.parent,t))return e.parent;e=e.parent}}(i,"bpmn:Participant"))})),this.postExecute("shape.delete",(function(t){var n=t.context.shape,i=e.getRootElement();Object(fe.isAny)(n,["bpmn:Participant","bpmn:SubProcess"])&&Object(de.is)(i,"bpmn:Collaboration")&&r(i).filter((function(e){return function(e,t){var n=e.businessObject||e,i=t.businessObject||t;for(;n.$parent;){if(n.$parent===i.processRef||i)return!0;n=n.$parent}return!1}(e,n)})).forEach((function(e){o(e)}))})),this.postExecute("canvas.updateRoot",(function(e){var t=e.context,n=t.oldRoot,i=t.newRoot;r(n).forEach((function(e){Object(de.is)(i,"bpmn:Process")&&o(e,i)}))}))}br.$inject=["eventBus","bpmnFactory"],r()(br,ye),yr.$inject=["bpmnUpdater"],yr.prototype.execute=function(e){var t=e.dataStoreBo,n=e.newSemanticParent,i=e.newDiParent;e.oldSemanticParent=t.$parent,e.oldDiParent=t.di.$parent,this._bpmnUpdater.updateSemanticParent(t,n),this._bpmnUpdater.updateDiParent(t.di,i)},yr.prototype.revert=function(e){var t=e.dataStoreBo,n=e.oldSemanticParent,i=e.oldDiParent;this._bpmnUpdater.updateSemanticParent(t,n),this._bpmnUpdater.updateDiParent(t.di,i)},xr.$inject=["canvas","commandStack","elementRegistry","eventBus"],r()(xr,ye);function Or(e,t,n){ye.call(this,e),this.postExecuted("shape.delete",500,(function(e){var t=e.context,i=t.hints,r=t.shape,o=t.oldParent;Object(de.is)(r,"bpmn:Lane")&&(i&&i.nested||function(e,t){var i,r,o,a=Qn(t),s=[],c=[];Object(ge.a)(a,(function(t){return t.y>e.y?c.push(t):s.push(t),t.children})),a.length&&(i=c.length&&s.length?e.height/2:e.height,s.length&&(r=n.calculateAdjustments(s,"y",i,e.y-10),n.makeSpace(r.movingShapes,r.resizingShapes,{x:0,y:i},"s")),c.length&&(o=n.calculateAdjustments(c,"y",-i,e.y+e.height+10),n.makeSpace(o.movingShapes,o.resizingShapes,{x:0,y:-i},"n")))}(r,o))}))}Or.$inject=["eventBus","modeling","spaceTool"],r()(Or,ye);function jr(e,t){t.invoke(ye,this),this._bpmnReplace=e;var n=this;this.postExecuted("elements.create",500,(function(e){var t=e.elements;t.filter((function(e){return Er(e,e.host)})).map((function(e){return t.indexOf(e)})).forEach((function(i){e.elements[i]=n.replaceShape(t[i])}))}),!0),this.preExecute("elements.move",500,(function(e){var t=e.shapes,i=e.newHost;t.forEach((function(e,r){var o,a=e.host;Er(e,(o=a,-1!==t.indexOf(o)?a:i))&&(t[r]=n.replaceShape(e))}))}),!0)}function Er(e,t){return!Object(Ji.e)(e)&&Object(de.is)(e,"bpmn:BoundaryEvent")&&!t}function _r(e,t,n){function i(e,i,r){var o,a,s,c,p,l,d,f,h=i.waypoints,m=e.outgoing.slice(),v=e.incoming.slice(),b=Ge(h,f=Object(u.isNumber)(r.width)?Object(ie.e)(r):r);if(b){if(o=h.slice(0,b.index),a=h.slice(b.index+(b.bendpoint?1:0)),!o.length||!a.length)return;s=b.bendpoint?h[b.index]:f,wr(e,o[o.length-1])||o.push(Sr(s)),wr(e,a[0])||a.unshift(Sr(s))}c=i.source,p=i.target,t.canConnect(c,e,i)&&(n.reconnectEnd(i,e,o||f),l=i),t.canConnect(e,p,i)&&(l?d=n.connect(e,p,{type:i.type,waypoints:a}):(n.reconnectStart(i,e,a||f),d=i));var g=[].concat(l&&Object(u.filter)(v,(function(e){return e.source===l.source}))||[],d&&Object(u.filter)(m,(function(e){return e.target===d.target}))||[]);g.length&&n.removeElements(g)}ye.call(this,e),this.preExecute("elements.move",(function(e){var n=e.newParent,i=e.shapes,r=e.delta,o=i[0];if(o&&n){n&&n.waypoints&&(e.newParent=n=n.parent);var a=Object(ie.e)(o),s={x:a.x+r.x,y:a.y+r.y},c=Object(u.find)(n.children,(function(e){return t.canInsert(i,e)&&Ge(e.waypoints,s)}));c&&(e.targetFlow=c,e.position=s)}}),!0),this.postExecuted("elements.move",(function(e){var t=e.shapes,n=e.targetFlow,r=e.position;n&&i(t[0],n,r)}),!0),this.preExecute("shape.create",(function(e){var n=e.parent,i=e.shape;t.canInsert(i,n)&&(e.targetFlow=n,e.parent=n.parent)}),!0),this.postExecuted("shape.create",(function(e){var t=e.shape,n=e.targetFlow,r=e.position;n&&i(t,n,r)}),!0)}function wr(e,t){var n=t.x,i=t.y;return n>=e.x&&n<=e.x+e.width&&i>=e.y&&i<=e.y+e.height}function Sr(e){return Object(u.assign)({},e)}function Tr(e,t){ye.call(this,e),this.preExecuted("connection.create",(function(e){var n=e.context,i=n.source,r=n.target,o=r.incoming.slice();n.hints&&!1===n.hints.createElementsBehavior||Object(de.is)(i,"bpmn:EventBasedGateway")&&r.incoming.length&&o.filter(Pr).forEach((function(e){t.removeConnection(e)}))})),this.preExecuted("shape.replace",(function(e){var n=e.context.newShape;Object(de.is)(n,"bpmn:EventBasedGateway")&&n.outgoing.filter(Pr).map((function(e){return e.target})).reduce((function(e,t){var n=t.incoming.filter(Pr);return e.concat(n)}),[]).forEach((function(e){e.source!==n&&t.removeConnection(e)}))}))}function Pr(e){return Object(de.is)(e,"bpmn:SequenceFlow")}jr.$inject=["bpmnReplace","injector"],r()(jr,ye),jr.prototype.replaceShape=function(e){var t,n,i,r=(n=e,(i=Object(de.getBusinessObject)(n).eventDefinitions)&&i[0]);return t=r?{type:"bpmn:IntermediateCatchEvent",eventDefinitionType:r.$type}:{type:"bpmn:IntermediateThrowEvent"},this._bpmnReplace.replaceElement(e,t,{layoutConnection:!1})},r()(_r,ye),_r.$inject=["eventBus","bpmnRules","modeling"],Tr.$inject=["eventBus","modeling"],r()(Tr,ye);function Cr(e,t,n,i,r,o){function a(){var e=t.getRootElement();return Object(de.getBusinessObject)(e).$parent}function s(e){var t=Object(de.getBusinessObject)(e).categoryValueRef;if(t){var n=t.$parent;t&&(Object(Yi.remove)(n.categoryValue,t),n&&!n.categoryValue.length&&function(e){var t=a();Object(Yi.remove)(t.get("rootElements"),e)}(n))}}r.invoke(ye,this),this.executed("shape.delete",(function(e){var t,i=e.context.shape;if(Object(de.is)(i,"bpmn:Group")){var r=Object(de.getBusinessObject)(i).categoryValueRef,o=n.filter((function(e){return Object(de.is)(e,"bpmn:Group")}));t=r,o.some((function(e){var n=Object(de.getBusinessObject)(e);return n.categoryValueRef&&n.categoryValueRef===t}))||s(i)}})),this.reverted("shape.delete",(function(e){var t=e.context.shape;if(Object(de.is)(t,"bpmn:Group")){var n=Object(de.getBusinessObject)(t).categoryValueRef,i=a(),r=n?n.$parent:null;Object(Yi.add)(r.get("categoryValue"),n),Object(Yi.add)(i.get("rootElements"),r)}})),this.execute("shape.create",(function(t){var n=t.context.shape,i=Object(de.getBusinessObject)(n);if(Object(de.is)(i,"bpmn:Group")&&!i.categoryValueRef){var r=Xi(a(),e);i.categoryValueRef=r}})),this.revert("shape.create",(function(e){var t=e.context.shape;Object(de.is)(t,"bpmn:Group")&&(s(t),delete Object(de.getBusinessObject)(t).categoryValueRef)})),i.on("moddleCopy.canCopyProperty",2e3,(function(t){var n,i=t.property;if(Object(de.is)(i,"bpmn:CategoryValue"))return n=Xi(a(),e),o.copyElement(i,n)}))}function Ar(e,t,n,i){var r,o,a,s;return 0==(r=(i.y-n.y)*(t.x-e.x)-(i.x-n.x)*(t.y-e.y))?null:(o=e.y-n.y,a=e.x-n.x,s=((i.x-n.x)*o-(i.y-n.y)*a)/r,{x:Math.round(e.x+s*(t.x-e.x)),y:Math.round(e.y+s*(t.y-e.y))})}function Rr(e){function t(e,t,n){var i,r={x:n.x,y:n.y-50},o={x:n.x-50,y:n.y},a=Ar(e,t,n,r),s=Ar(e,t,n,o);i=a&&s?kr(a,n)>kr(s,n)?s:a:a||s,e.original=i}e.on("bpmnElement.added",(function(e){var n,i,r=e.element;r.waypoints&&(t((i=(n=r).waypoints)[0],i[1],Object(ie.e)(n.source)),t(i[i.length-1],i[i.length-2],Object(ie.e)(n.target)))}))}function kr(e,t){return Math.sqrt(Math.pow(e.x-t.x,2)+Math.pow(e.y-t.y,2))}function Br(e){ye.call(this,e);var t=["bpmn:Participant","bpmn:Lane"];this.executed(["shape.move","shape.create","shape.resize"],(function(e){var n=Object(de.getBusinessObject)(e.context.shape);Object(fe.isAny)(n,t)&&!n.di.get("isHorizontal")&&n.di.set("isHorizontal",!0)}))}function Mr(e){return Math.sqrt(Math.pow(e.x,2)+Math.pow(e.y,2))}function Dr(e){return Math.atan((e[1].y-e[0].y)/(e[1].x-e[0].x))}function Nr(e,t){var n=t[0],i=t[1],r={x:i.x-n.x,y:i.y-n.y},o=function(e,t,n){var i=[{n:e[0]-n[0],lambda:t[0]},{n:e[1]-n[1],lambda:t[1]}];return-(i[0].n*t[0]+i[1].n*t[1])/(i[0].lambda*t[0]+i[1].lambda*t[1])}([n.x,n.y],[r.x,r.y],[e.x,e.y]);return{x:n.x+o*r.x,y:n.y+o*r.y}}function Lr(e,t){var n=Nr(e,t);return Mr({x:n.x-e.x,y:n.y-e.y})}function Ir(e,t){return Mr({x:e.x-t.x,y:e.y-t.y})}Cr.$inject=["bpmnFactory","canvas","elementRegistry","eventBus","injector","moddleCopy"],r()(Cr,ye),Rr.$inject=["eventBus"],Br.$inject=["eventBus"],r()(Br,ye);var Fr=Math.sqrt,zr=Math.min,Vr=Math.max,$r=Math.abs;function Hr(e){return Math.pow(e,2)}function Gr(e,t){return Fr(Hr(e.x-t.x)+Hr(e.y-t.y))}function Wr(e,t,n,i){var r=t.x-e.x,o=t.y-e.y,a=n.x-e.x,s=n.y-e.y,c=r*r+o*o,u=(r*a+o*s)/c,p=u*u-(a*a+s*s-i*i)/c;if(p<0&&p>-1e-6&&(p=0),p<0)return[];var l=Fr(p),d=-u+l,f=-u-l,h={x:e.x-r*d,y:e.y-o*d};return 0===p?[h]:[h,{x:e.x-r*f,y:e.y-o*f}].filter((function(n){return function(e,t,n){return qr(e.x,t.x,n.x)&&qr(e.y,t.y,n.y)}(n,e,t)}))}function qr(e,t,n){return e>=zr(t,n)-Ur&&e<=Vr(t,n)+Ur}var Ur=.1;function Kr(e,t){return $r(e.x-t.x)<=Ur&&$r(e.y-t.y)<=Ur}function Yr(e,t,n,i){var r=0,o=0,a=function(e){return{x:e.x+e.width/2,y:e.y+e.height/2}}(e),s=function(e,t){var n,i,r,o,a,s,c,u,p,l,d,f,h=0;for(h=0;h<t.length-1;h++){if(Kr(n=t[h],i=t[h+1])?s=[n]:(r=Gr(e,n),o=Gr(e,i),s=Wr(n,i,e,zr(r,o))),s.length<1)throw new Error("expected between [1, 2] circle -> line intersections");1===s.length&&(c={type:"bendpoint",position:s[0],segmentIndex:h,bendpointIndex:Kr(n,s[0])?h:h+1}),2===s.length&&(d=s[0],f=s[1],c={type:"segment",position:a={x:(d.x+f.x)/2,y:(d.y+f.y)/2},segmentIndex:h,relativeLocation:Gr(n,a)/Gr(n,i)}),u=Gr(c.position,e),(!l||p>u)&&(l=c,p=u)}return l}(a,n),c=s.segmentIndex,u=function(e,t,n,i){var r=n.segmentIndex,o=t.length-e.length;if(i.segmentMove){var a=i.segmentMove.segmentStartIndex,s=i.segmentMove.newSegmentStartIndex;return r===a?s:r>=s?r+o<s?s:r+o:r}if(i.bendpointMove){var c,u=i.bendpointMove.insert,p=i.bendpointMove.bendpointIndex;if(0===o)return r;if(r>=p&&(c=u?r+1:r-1),r<p)if(c=r,u&&"bendpoint"!==n.type&&p-1===r)Xr(t,p)<n.relativeLocation&&c++;return c}return 0===o?r:i.connectionStart?0===r?0:null:i.connectionEnd&&r===e.length-2?t.length-2:null}(n,t,s,i);if(null===u)return{x:r,y:o};if(u<0||u>t.length-2)return{x:r,y:o};var p,l,d,f,h,m,v=Jr(n,c),b=Jr(t,u),g=s.position,y=(f=g,h=Ir((d=v)[0],d[1]),m=Ir(d[0],f),0===h?0:m/h),x=(p=b,l=Dr(v),Dr(p)-l);if("bendpoint"===s.type){var O=t.length-n.length,j=s.bendpointIndex,E=n[j];if(-1!==t.indexOf(E))return{x:r,y:o};if(0===O){var _=t[j];return{x:_.x-s.position.x,y:_.y-s.position.y}}O<0&&0!==j&&j<n.length-1&&(y=Xr(n,j))}var w,S,T=(b[1].x-b[0].x)*y+b[0].x,P=(b[1].y-b[0].y)*y+b[0].y,C=(w={x:a.x-g.x,y:a.y-g.y},(S=x)?{x:Math.cos(S)*w.x-Math.sin(S)*w.y,y:Math.sin(S)*w.x+Math.cos(S)*w.y}:w);return r=T+C.x-a.x,o=P+C.y-a.y,Object(ie.h)({x:r,y:o})}function Xr(e,t){var n=Ir(e[t-1],e[t]);return n/(n+Ir(e[t],e[t+1]))}function Jr(e,t){return[e[t],e[t+1]]}function Zr(e,t,n){var i=P(t),r=P(n),o=C(e,i),a=o.x*(n.width/t.width),s=o.y*(n.height/t.height);return Object(ie.h)({x:r.x+a,y:r.y+s})}function Qr(e,t,n){var i=P(e),r=P(t),o=P(n),a=C(e,i),s=C(i,r),c=function(e,t,n){var i=Object(ie.b)(t),r=Object(ie.b)(n);if(function(e,t){return function(e,t){return e.right!==t.right&&e.left!==t.left}(e,t)||function(e,t){return e.top!==t.top&&e.bottom!==t.bottom}(e,t)}(i,r))return null;var o,a,s=Object(ie.f)(t,e);if("top"===s)o={x:0,y:r.bottom-i.bottom};else if("bottom"===s)o={x:0,y:r.top-i.top};else if("right"===s)o={x:r.left-i.left,y:0};else{if("left"!==s)return null;o={x:r.right-i.right,y:0}}if(a={x:e.x+o.x,y:e.y+o.y},Object(ie.f)(n,a)!==s)return null;return o}(i,t,n);if(c)return c;var u=s.x*(n.width/t.width),p=s.y*(n.height/t.height),l=o.x+u,d=o.y+p;return Object(ie.h)({x:l+a.x-e.x,y:d+a.y-e.y})}var eo={width:90,height:20};function to(e,t,n,i){ye.call(this,e),this.postExecute("element.updateProperties",(function(e){var n=e.context,r=n.element,o=n.properties;if("name"in o&&t.updateLabel(r,o.name),"text"in o&&Object(de.is)(r,"bpmn:TextAnnotation")){var a=i.getTextAnnotationBounds({x:r.x,y:r.y,width:r.width,height:r.height},o.text||"");t.updateLabel(r,o.text,a)}})),this.postExecute(["shape.create","connection.create"],(function(e){var n=e.context;if(!1!==(n.hints||{}).createElementsBehavior){var r=n.shape||n.connection,o=r.businessObject;if(!Object(Ji.e)(r)&&Object(Ji.f)(r)&&Object(Ki.a)(r)){var a=Object(Ji.c)(r),s=i.getExternalLabelBounds(eo,Object(Ki.a)(r));t.createLabel(r,a,{id:o.id+"_label",businessObject:o,width:s.width,height:s.height})}}})),this.postExecute("shape.delete",(function(e){var n=e.context,i=n.labelTarget,r=n.hints||{};i&&!1!==r.unsetLabel&&t.updateLabel(i,null,null,{removeShape:!1})})),this.postExecute(["label.create"],(function(e){var t,i=e.context.shape;i.labelTarget&&Object(de.is)(i.labelTarget||i,"bpmn:BaseElement")&&((t=i.businessObject.di).label||(t.label=n.create("bpmndi:BPMNLabel",{bounds:n.create("dc:Bounds")})),Object(u.assign)(t.label.bounds,{x:i.x,y:i.y,width:i.width,height:i.height}))})),this.postExecute(["connection.layout","connection.updateWaypoints"],(function(e){var n=e.context;if(!1!==(n.hints||{}).labelBehavior){var i,r=n.connection.label;r&&r.parent&&(i=function(e){var t=e.context,n=t.connection,i=n.label,r=Object(u.assign)({},t.hints),o=t.newWaypoints||n.waypoints,a=t.oldWaypoints;return void 0===r.startChanged&&(r.startChanged=!!r.connectionStart),void 0===r.endChanged&&(r.endChanged=!!r.connectionEnd),Yr(i,o,a,r)}(e),t.moveShape(r,i))}})),this.postExecute(["shape.replace"],(function(e){var t=e.context,n=t.newShape,i=t.oldShape,r=Object(de.getBusinessObject)(n);r&&Object(Ji.f)(r)&&i.label&&n.label&&(n.label.x=i.label.x,n.label.y=i.label.y)})),this.postExecute("shape.resize",(function(e){var n,i=e.context,r=i.shape,o=i.newBounds,a=i.oldBounds;if(Object(Ji.d)(r)){var s=r.label,c=function(e,t,n){var i=Zr(e,t,n);return Object(ie.h)(C(i,e))}(function(e,t){if(!t.length)return;var n=function(e,t){var n=t.map((function(t){return{line:t,distance:Lr(e,t)}}));return Object(u.sortBy)(n,"distance")[0].line}(e,t);return Nr(e,n)}(Object(ie.e)(s),[[{x:(n=a).x,y:n.y},{x:n.x+(n.width||0),y:n.y}],[{x:n.x+(n.width||0),y:n.y},{x:n.x+(n.width||0),y:n.y+(n.height||0)}],[{x:n.x,y:n.y+(n.height||0)},{x:n.x+(n.width||0),y:n.y+(n.height||0)}],[{x:n.x,y:n.y},{x:n.x,y:n.y+(n.height||0)}]]),a,o);t.moveShape(s,c)}}))}r()(to,ye),to.$inject=["eventBus","modeling","bpmnFactory","textRenderer"];var no="flow elements must be children of pools/participants";function io(e,t,n){function i(e,n,i){t.add({position:{x:e.x+5,y:e.y+5},type:"error",timeout:i||2e3,html:"<div>"+n+"</div>"})}e.on(["shape.move.rejected","create.rejected"],(function(e){var t=e.context,r=t.shape,o=t.target;Object(de.is)(o,"bpmn:Collaboration")&&Object(de.is)(r,"bpmn:FlowNode")&&i(e,n(no))})),e.on(["elements.paste.rejected"],(function(e){var t=e.context,r=t.position,o=t.target;Object(de.is)(o,"bpmn:Collaboration")&&i(r,n(no)),Object(de.is)(o,"bpmn:Process")&&i(r,n("participants cannot be pasted onto a non-empty process diagram"),3e3)}))}function ro(e,t,n,i){ye.call(this,e);var r=i.get("dragging",!1);function o(e){var i,r,o=e.source,a=e.target;e.parent&&(Object(de.is)(e,"bpmn:SequenceFlow")&&(n.canConnectSequenceFlow(o,a)||(r=!0),n.canConnectMessageFlow(o,a)&&(i="bpmn:MessageFlow")),Object(de.is)(e,"bpmn:MessageFlow")&&(n.canConnectMessageFlow(o,a)||(r=!0),n.canConnectSequenceFlow(o,a)&&(i="bpmn:SequenceFlow")),Object(de.is)(e,"bpmn:Association")&&!n.canConnectAssociation(o,a)&&(r=!0),r&&t.removeConnection(e),i&&t.connect(o,a,{type:i,waypoints:e.waypoints.slice()}))}this.postExecuted("elements.move",(function(e){var t=e.closure.allConnections;Object(u.forEach)(t,o)}),!0),this.preExecute("connection.reconnect",(function(e){var i,o,a=e.context,s=a.connection,c=a.newSource||s.source,u=a.newTarget||s.target;(i=n.canConnect(c,u))&&i.type!==s.type&&(o=t.connect(c,u,{type:i.type,waypoints:s.waypoints.slice()}),t.removeConnection(s),a.connection=o,r&&function(e,t){var n,i=r.context(),o=i&&i.payload.previousSelection;if(!o||!o.length)return;if(-1===(n=o.indexOf(e)))return;o.splice(n,1,t)}(s,o))})),this.postExecuted("element.updateProperties",(function(e){var n,i=e.context,r=i.properties,o=i.element,a=o.businessObject;r.default&&(n=Object(u.find)(o.outgoing,Object(u.matchPattern)({id:o.businessObject.default.id})))&&t.updateProperties(n,{conditionExpression:void 0}),r.conditionExpression&&a.sourceRef.default===a&&t.updateProperties(o.source,{default:void 0})}))}function oo(e,t){ye.call(this,e),this.preExecute("shape.delete",(function(e){var t=e.shape,n=t.parent;Object(de.is)(t,"bpmn:Participant")&&(e.collaborationRoot=n)}),!0),this.postExecute("shape.delete",(function(e){var n=e.collaborationRoot;n&&!n.businessObject.participants.length&&t.makeProcess()}),!0)}function ao(e,t,n,i,r,o){i.invoke(ye,this),this._bpmnReplace=e,this._elementRegistry=n,this._selection=o,this.postExecuted(["elements.move"],500,(function(e){var n=e.context,i=n.newParent,r=n.newHost,o=[];Object(u.forEach)(n.closure.topLevel,(function(e){o=Object(On.isEventSubProcess)(e)?o.concat(e.children):o.concat(e)})),1===o.length&&r&&(i=r);var a=t.canReplace(o,i);a&&this.replaceElements(o,a.replacements,r)}),this),this.postExecute(["shape.replace"],1500,(function(e){var n,i=e.context,r=i.oldShape,o=i.newShape,a=r.attachers;a&&a.length&&(n=t.canReplace(a,o),this.replaceElements(a,n.replacements))}),this),this.postExecuted(["shape.replace"],1500,(function(e){var t=e.context,n=t.oldShape,i=t.newShape;r.unclaimId(n.businessObject.id,n.businessObject),r.updateProperties(i,{id:n.id})}))}io.$inject=["eventBus","tooltips","translate"],r()(ro,ye),ro.$inject=["eventBus","modeling","bpmnRules","injector"],oo.$inject=["eventBus","modeling"],r()(oo,ye),r()(ao,ye),ao.prototype.replaceElements=function(e,t){var n=this._elementRegistry,i=this._bpmnReplace,r=this._selection;Object(u.forEach)(t,(function(t){var r={type:t.newElementType},o=n.get(t.oldElementId),a=e.indexOf(o);e[a]=i.replaceElement(o,r,{select:!1})})),t&&r.select(e)},ao.$inject=["bpmnReplace","bpmnRules","elementRegistry","injector","modeling","selection"];var so=Math.abs,co=Math.min,uo=Math.max;function po(e,t,n,i){var r=e[t];e[t]=void 0===r?n:i(n,r)}function lo(e,t,n){return po(e,t,n,co)}function fo(e,t,n){return po(e,t,n,uo)}var ho={width:300,height:60},mo={width:300,height:150},vo={width:140,height:120},bo={width:50,height:30};function go(e){e.on("resize.start",1500,(function(e){var t=e.context,n=t.shape,i=t.direction,r=t.balanced;(Object(de.is)(n,"bpmn:Lane")||Object(de.is)(n,"bpmn:Participant"))&&(t.resizeConstraints=function(e,t,n){var i=ei(e),r=!0,o=!0,a=Zn(i,[i]),s=Object(ie.b)(e),c={},u={};return/e/.test(t)?u.right=s.left+ho.width:/w/.test(t)&&(u.left=s.right-ho.width),a.forEach((function(e){var i=Object(ie.b)(e);/n/.test(t)&&(i.top<s.top-10&&(r=!1),n&&so(s.top-i.bottom)<10&&fo(c,"top",i.top+ho.height),so(s.top-i.top)<5&&lo(u,"top",i.bottom-ho.height)),/s/.test(t)&&(i.bottom>s.bottom+10&&(o=!1),n&&so(s.bottom-i.top)<10&&lo(c,"bottom",i.bottom-ho.height),so(s.bottom-i.bottom)<5&&fo(u,"bottom",i.top+ho.height))})),i.children.filter((function(e){return!e.hidden&&!e.waypoints&&(Object(de.is)(e,"bpmn:FlowElement")||Object(de.is)(e,"bpmn:Artifact"))})).forEach((function(e){var n=Object(ie.b)(e);r&&/n/.test(t)&&lo(u,"top",n.top-20),/e/.test(t)&&fo(u,"right",n.right+20),o&&/s/.test(t)&&fo(u,"bottom",n.bottom+20),/w/.test(t)&&lo(u,"left",n.left-50)})),{min:u,max:c}}(n,i,r)),Object(de.is)(n,"bpmn:Participant")&&(t.minDimensions=mo),Object(de.is)(n,"bpmn:SubProcess")&&Object(On.isExpanded)(n)&&(t.minDimensions=vo),Object(de.is)(n,"bpmn:TextAnnotation")&&(t.minDimensions=bo)}))}go.$inject=["eventBus"];function yo(e,t){e.on("resize.start",1501,(function(e){var t=e.context,n=t.shape;(Object(de.is)(n,"bpmn:Lane")||Object(de.is)(n,"bpmn:Participant"))&&(t.balanced=!Object(ni.a)(e))})),e.on("resize.end",1001,(function(e){var n=e.context,i=n.shape,r=n.canExecute,o=n.newBounds;if(Object(de.is)(i,"bpmn:Lane")||Object(de.is)(i,"bpmn:Participant"))return r&&(o=Object(ie.g)(o),t.resizeLane(i,o,n.balanced)),!1}))}function xo(e,t,n){ye.call(this,e),this.preExecute("shape.delete",(function(e){var i=e.context.shape;if(1===i.incoming.length&&1===i.outgoing.length){var r,o,a,s=i.incoming[0],c=i.outgoing[0];if(Object(de.is)(s,"bpmn:SequenceFlow")&&Object(de.is)(c,"bpmn:SequenceFlow"))if(t.canConnect(s.source,c.target,s)){var u=(r=s.waypoints,o=c.waypoints,(a=Ar(Oo(r[r.length-2]),Oo(r[r.length-1]),Oo(o[1]),Oo(o[0])))?[].concat(r.slice(0,r.length-1),[a],o.slice(1)):[Oo(r[0]),Oo(o[o.length-1])]);n.reconnectEnd(s,c.target,u)}}}))}function Oo(e){return e.original||e}yo.$inject=["eventBus","modeling"],r()(xo,ye),xo.$inject=["eventBus","bpmnRules","modeling"];var jo=Math.max;function Eo(e){e.on("spaceTool.getMinDimensions",(function(e){var t=e.shapes,n=e.axis,i=e.start,r={};return Object(u.forEach)(t,(function(e){var t=e.id;Object(de.is)(e,"bpmn:Participant")&&(!function(e){return"x"===e}(n)?r[t]={width:mo.width,height:_o(e,i)}:r[t]=mo),Object(de.is)(e,"bpmn:SubProcess")&&Object(On.isExpanded)(e)&&(r[t]=vo),Object(de.is)(e,"bpmn:TextAnnotation")&&(r[t]=bo)})),r}))}function _o(e,t){var n;return Qn(e).length?(n=function(e,t){var n,i=Qn(e);return n=function e(t,n){var i,r,o;for(i=0;i<t.length;i++)if(r=t[i],n>=r.y&&n<=r.y+r.height)return(o=Qn(r)).length?e(o,n):r}(i,t),e.height-n.height+ho.height}(e,t),jo(mo.height,n)):mo.height}function wo(e,t){e.invoke(ye,this),this.postExecuted("shape.replace",(function(e){var n=e.context.oldShape,i=e.context.newShape;if(Object(de.is)(i,"bpmn:SubProcess")&&Object(de.is)(n,"bpmn:Task")&&Object(On.isExpanded)(i)){var r,o={x:(r=i).x+r.width/6,y:r.y+r.height/2};t.createShape({type:"bpmn:StartEvent"},o,i)}}))}Eo.$inject=["eventBus"],wo.$inject=["injector","modeling"],r()(wo,ye);function So(e,t,n,i){ye.call(this,e),this.executed(["shape.toggleCollapse"],500,(function(e){var t,n=e.context.shape;Object(de.is)(n,"bpmn:SubProcess")&&(n.collapsed?Object(de.getBusinessObject)(n).di.isExpanded=!1:((t=n.children).length&&t.forEach((function(e){"label"!==e.type||e.businessObject.name||(e.hidden=!0)})),Object(de.getBusinessObject)(n).di.isExpanded=!0))})),this.reverted(["shape.toggleCollapse"],500,(function(e){var t=e.context.shape;t.collapsed?Object(de.getBusinessObject)(t).di.isExpanded=!1:Object(de.getBusinessObject)(t).di.isExpanded=!0})),this.postExecuted(["shape.toggleCollapse"],500,(function(e){var i,r=e.context.shape,o=t._getDefaultSize(r);i=r.collapsed?function(e,t){return{x:e.x+(e.width-t.width)/2,y:e.y+(e.height-t.height)/2,width:t.width,height:t.height}}(r,o):function(e,t){var n,i,r=e.children,o=t;return(n=Yn((i=r,i.filter((function(e){return!e.hidden}))).concat([e])))?(o.width=Math.max(n.width,o.width),o.height=Math.max(n.height,o.height),o.x=n.x+(n.width-o.width)/2,o.y=n.y+(n.height-o.height)/2):(o.x=e.x+(e.width-o.width)/2,o.y=e.y+(e.height-o.height)/2),o}(r,o),n.resizeShape(r,i,null,{autoResize:!r.collapsed&&"nwse"})}))}function To(e,t,n,i){t.invoke(ye,this),this.preExecute("shape.delete",(function(e){var t=e.context.shape,r=t.businessObject;Object(Ji.e)(t)||(Object(de.is)(t,"bpmn:Participant")&&Object(On.isExpanded)(t)&&n.ids.unclaim(r.processRef.id),i.unclaimId(r.id,r))})),this.preExecute("connection.delete",(function(e){var t=e.context.connection.businessObject;i.unclaimId(t.id,t)})),this.preExecute("canvas.updateRoot",(function(){var t=e.getRootElement().businessObject;n.ids.unclaim(t.id)}))}r()(So,ye),So.$inject=["eventBus","elementFactory","modeling"],r()(To,ye),To.$inject=["canvas","injector","moddle","modeling"];function Po(e,t,n){var i;function r(){if(!i)throw new Error(n("out of bounds release"));return i}ye.call(this,e);var o=["spaceTool","lane.add","lane.resize","lane.split","elements.create","elements.delete","elements.move","shape.create","shape.delete","shape.move","shape.resize"];this.preExecute(o,5e3,(function(e){(i=i||new Co).enter()})),this.postExecuted(o,500,(function(e){!function(){if(!i)throw new Error(n("out of bounds release"));var e=i.leave();e&&(t.updateLaneRefs(i.flowNodes,i.lanes),i=null)}()})),this.preExecute(["shape.create","shape.move","shape.delete","shape.resize"],(function(e){var t=e.context.shape,n=r();t.labelTarget||(Object(de.is)(t,"bpmn:Lane")&&n.addLane(t),Object(de.is)(t,"bpmn:FlowNode")&&n.addFlowNode(t))}))}function Co(){this.flowNodes=[],this.lanes=[],this.counter=0,this.addLane=function(e){this.lanes.push(e)},this.addFlowNode=function(e){this.flowNodes.push(e)},this.enter=function(){this.counter++},this.leave=function(){return this.counter--,!this.counter}}function Ao(e,t){ye.call(this,e),this.preExecute("connection.delete",(function(e){var n=e.context.connection,i=n.source;(function(e,t){if(!Object(de.is)(e,"bpmn:SequenceFlow"))return!1;var n=Object(de.getBusinessObject)(t),i=Object(de.getBusinessObject)(e);return n.get("default")===i})(n,i)&&t.updateProperties(i,{default:null})}))}Po.$inject=["eventBus","modeling","translate"],r()(Po,ye),r()(Ao,ye),Ao.$inject=["eventBus","modeling"];var Ro={__init__:["adaptiveLabelPositioningBehavior","appendBehavior","associationBehavior","attachEventBehavior","boundaryEventBehavior","rootElementReferenceBehavior","createBehavior","fixHoverBehavior","createDataObjectBehavior","createParticipantBehavior","dataStoreBehavior","dataInputAssociationBehavior","deleteLaneBehavior","detachEventBehavior","dropOnFlowBehavior","eventBasedGatewayBehavior","groupBehavior","importDockingFix","isHorizontalFix","labelBehavior","modelingFeedback","removeElementBehavior","removeParticipantBehavior","replaceConnectionBehavior","replaceElementBehaviour","resizeBehavior","resizeLaneBehavior","toggleElementCollapseBehaviour","spaceToolBehavior","subProcessStartEventBehavior","unclaimIdBehavior","unsetDefaultFlowBehavior","updateFlowNodeRefsBehavior"],adaptiveLabelPositioningBehavior:["type",rr],appendBehavior:["type",ar],associationBehavior:["type",sr],attachEventBehavior:["type",cr],boundaryEventBehavior:["type",pr],rootElementReferenceBehavior:["type",lr],createBehavior:["type",dr],fixHoverBehavior:["type",fr],createDataObjectBehavior:["type",hr],createParticipantBehavior:["type",mr],dataInputAssociationBehavior:["type",br],dataStoreBehavior:["type",xr],deleteLaneBehavior:["type",Or],detachEventBehavior:["type",jr],dropOnFlowBehavior:["type",_r],eventBasedGatewayBehavior:["type",Tr],groupBehavior:["type",Cr],importDockingFix:["type",Rr],isHorizontalFix:["type",Br],labelBehavior:["type",to],modelingFeedback:["type",io],replaceConnectionBehavior:["type",ro],removeParticipantBehavior:["type",oo],replaceElementBehaviour:["type",ao],resizeBehavior:["type",go],resizeLaneBehavior:["type",yo],removeElementBehavior:["type",xo],toggleElementCollapseBehaviour:["type",So],spaceToolBehavior:["type",Eo],subProcessStartEventBehavior:["type",wo],unclaimIdBehavior:["type",To],updateFlowNodeRefsBehavior:["type",Po],unsetDefaultFlowBehavior:["type",Ao]};function ko(e,t){var n=Object(ie.f)(e,t,-15);return"intersect"!==n?n:null}function Bo(e){je.call(this,e)}function Mo(e){return!e||Object(Ji.e)(e)}function Do(e){do{if(Object(de.is)(e,"bpmn:Process"))return Object(de.getBusinessObject)(e);if(Object(de.is)(e,"bpmn:Participant"))return Object(de.getBusinessObject)(e).processRef||Object(de.getBusinessObject)(e)}while(e=e.parent)}function No(e){return Object(de.is)(e,"bpmn:TextAnnotation")}function Lo(e){return Object(de.is)(e,"bpmn:Group")&&!e.labelTarget}function Io(e){return Object(de.is)(e,"bpmn:BoundaryEvent")&&Vo(e,"bpmn:CompensateEventDefinition")}function Fo(e){return Object(de.getBusinessObject)(e).isForCompensation}function zo(e){for(var t=e;t=t.parent;){if(Object(de.is)(t,"bpmn:FlowElementsContainer"))return Object(de.getBusinessObject)(t);if(Object(de.is)(t,"bpmn:Participant"))return Object(de.getBusinessObject)(t).processRef}return null}function Vo(e,t){var n=Object(de.getBusinessObject)(e);return!!Object(u.find)(n.eventDefinitions||[],(function(e){return Object(de.is)(e,t)}))}function $o(e,t){return(Object(de.getBusinessObject)(e).eventDefinitions||[]).every((function(e){return Object(de.is)(e,t)}))}function Ho(e){return Object(de.is)(e,"bpmn:ReceiveTask")||Object(de.is)(e,"bpmn:IntermediateCatchEvent")&&(Vo(e,"bpmn:MessageEventDefinition")||Vo(e,"bpmn:TimerEventDefinition")||Vo(e,"bpmn:ConditionalEventDefinition")||Vo(e,"bpmn:SignalEventDefinition"))}function Go(e){return e.waypoints}function Wo(e,t){return-1!==function(e){for(var t=[];e;)(e=e.parent)&&t.push(e);return t}(t).indexOf(e)}function qo(e,t,n){if(Mo(e)||Mo(t))return null;if(!Object(de.is)(n,"bpmn:DataAssociation")){if(ra(e,t))return{type:"bpmn:MessageFlow"};if(oa(e,t))return{type:"bpmn:SequenceFlow"}}var i=aa(e,t);return i||(Io(e)&&Fo(t)?{type:"bpmn:Association",associationDirection:"One"}:!!ia(e,t)&&{type:"bpmn:Association"})}function Uo(e,t,n){return!(!Object(Ji.e)(e)&&!Lo(e))||!(Object(de.is)(t,"bpmn:Participant")&&!Object(On.isExpanded)(t))&&(Object(de.is)(e,"bpmn:Participant")?Object(de.is)(t,"bpmn:Process")||Object(de.is)(t,"bpmn:Collaboration"):Object(fe.isAny)(e,["bpmn:DataInput","bpmn:DataOutput"])&&e.parent?t===e.parent:Object(de.is)(e,"bpmn:Lane")?Object(de.is)(t,"bpmn:Participant")||Object(de.is)(t,"bpmn:Lane"):!(Object(de.is)(e,"bpmn:BoundaryEvent")&&(i=e,!Object(de.getBusinessObject)(i).cancelActivity||!Xo(i)&&!Jo(i)))&&(Object(de.is)(e,"bpmn:FlowElement")&&!Object(de.is)(e,"bpmn:DataStoreReference")?Object(de.is)(t,"bpmn:FlowElementsContainer")?Object(On.isExpanded)(t):Object(fe.isAny)(t,["bpmn:Participant","bpmn:Lane"]):Object(fe.isAny)(e,["bpmn:Artifact","bpmn:DataAssociation","bpmn:DataStoreReference"])?Object(fe.isAny)(t,["bpmn:Collaboration","bpmn:Lane","bpmn:Participant","bpmn:Process","bpmn:SubProcess"]):!!Object(de.is)(e,"bpmn:MessageFlow")&&(Object(de.is)(t,"bpmn:Collaboration")||e.source.parent==t||e.target.parent==t)));var i}function Ko(e){return Object(de.is)(e,"bpmn:Lane")}function Yo(e){return!!function(e){return!Object(Ji.e)(e)&&Object(de.is)(e,"bpmn:BoundaryEvent")}(e)||(!(!Object(de.is)(e,"bpmn:IntermediateThrowEvent")||!Xo(e))||Object(de.is)(e,"bpmn:IntermediateCatchEvent")&&Jo(e))}function Xo(e){var t=Object(de.getBusinessObject)(e);return t&&!(t.eventDefinitions&&t.eventDefinitions.length)}function Jo(e){return function(e,t){return t.some((function(t){return Vo(e,t)}))}(e,["bpmn:MessageEventDefinition","bpmn:TimerEventDefinition","bpmn:SignalEventDefinition","bpmn:ConditionalEventDefinition"])}function Zo(e,t,n,i){if(Array.isArray(e)||(e=[e]),1!==e.length)return!1;var r=e[0];return!Object(Ji.e)(r)&&(!!Yo(r)&&(!Object(On.isEventSubProcess)(t)&&(!(!Object(de.is)(t,"bpmn:Activity")||Fo(t))&&(!(i&&!ko(i,t))&&(!function(e){return Object(de.is)(e,"bpmn:ReceiveTask")&&Object(u.find)(e.incoming,(function(e){return Object(de.is)(e.source,"bpmn:EventBasedGateway")}))}(t)&&"attach")))))}function Qo(e,t,n){if(!t)return!1;var i={replacements:[]};return Object(u.forEach)(e,(function(e){Object(On.isEventSubProcess)(t)||Object(de.is)(e,"bpmn:StartEvent")&&"label"!==e.type&&Uo(e,t)&&(Object(On.isInterrupting)(e)||i.replacements.push({oldElementId:e.id,newElementType:"bpmn:StartEvent"}),(Object(On.hasErrorEventDefinition)(e)||Object(On.hasEscalationEventDefinition)(e)||Object(On.hasCompensateEventDefinition)(e))&&i.replacements.push({oldElementId:e.id,newElementType:"bpmn:StartEvent"})),Object(de.is)(t,"bpmn:Transaction")||Vo(e,"bpmn:CancelEventDefinition")&&"label"!==e.type&&(Object(de.is)(e,"bpmn:EndEvent")&&Uo(e,t)&&i.replacements.push({oldElementId:e.id,newElementType:"bpmn:EndEvent"}),Object(de.is)(e,"bpmn:BoundaryEvent")&&Zo(e,t,0,n)&&i.replacements.push({oldElementId:e.id,newElementType:"bpmn:BoundaryEvent"}))})),!!i.replacements.length&&i}function ea(e,t){return!Object(u.some)(e,Ko)&&(!t||e.every((function(e){return Uo(e,t)})))}function ta(e,t,n,i){return!!t&&(!(!Object(Ji.e)(e)&&!Lo(e))||n!==t&&((!n||!Wo(n,t))&&(Uo(e,t)||sa(e,t,i))))}function na(e,t){return Object(de.is)(e,"bpmn:SubProcess")?Object(On.isExpanded)(e)&&(!t||t.width>=100&&t.height>=80):Object(de.is)(e,"bpmn:Lane")?!t||t.width>=130&&t.height>=60:Object(de.is)(e,"bpmn:Participant")?!t||t.width>=250&&t.height>=50:!!No(e)||!!Lo(e)}function ia(e,t){return!Go(e)&&!Go(t)&&(!(!Io(e)||!Fo(t))||!Wo(t,e)&&!Wo(e,t)&&(!!function(e,t){var n=No(e),i=No(t);return(n||i)&&n!==i}(e,t)||!!aa(e,t)))}function ra(e,t){return!(pa(e)&&!pa(t))&&(i=e,Object(de.is)(i,"bpmn:InteractionNode")&&(!Object(de.is)(i,"bpmn:Event")||Object(de.is)(i,"bpmn:ThrowEvent")&&$o(i,"bpmn:MessageEventDefinition"))&&function(e){return Object(de.is)(e,"bpmn:InteractionNode")&&!Fo(e)&&(!Object(de.is)(e,"bpmn:Event")||Object(de.is)(e,"bpmn:CatchEvent")&&$o(e,"bpmn:MessageEventDefinition"))}(t)&&(n=t,!(Do(e)===Do(n))));var n,i}function oa(e,t){return!(Ho(t)&&t.incoming.length>0&&(n=t.incoming,(n=n||[]).some(ua))&&!Object(de.is)(e,"bpmn:EventBasedGateway"))&&(r=e,Object(de.is)(r,"bpmn:FlowNode")&&!Object(de.is)(r,"bpmn:EndEvent")&&!Object(On.isEventSubProcess)(r)&&!(Object(de.is)(r,"bpmn:IntermediateThrowEvent")&&Vo(r,"bpmn:LinkEventDefinition"))&&!Io(r)&&!Fo(r)&&function(e){return Object(de.is)(e,"bpmn:FlowNode")&&!Object(de.is)(e,"bpmn:StartEvent")&&!Object(de.is)(e,"bpmn:BoundaryEvent")&&!Object(On.isEventSubProcess)(e)&&!(Object(de.is)(e,"bpmn:IntermediateCatchEvent")&&Vo(e,"bpmn:LinkEventDefinition"))&&!Fo(e)}(t)&&(i=t,zo(e)===zo(i))&&!(Object(de.is)(e,"bpmn:EventBasedGateway")&&!Ho(t)));var n,i,r}function aa(e,t){return Object(fe.isAny)(e,["bpmn:DataObjectReference","bpmn:DataStoreReference"])&&Object(fe.isAny)(t,["bpmn:Activity","bpmn:ThrowEvent"])?{type:"bpmn:DataInputAssociation"}:!(!Object(fe.isAny)(t,["bpmn:DataObjectReference","bpmn:DataStoreReference"])||!Object(fe.isAny)(e,["bpmn:Activity","bpmn:CatchEvent"]))&&{type:"bpmn:DataOutputAssociation"}}function sa(e,t,n){if(!t)return!1;if(Array.isArray(e)){if(1!==e.length)return!1;e=e[0]}return t.source!==e&&t.target!==e&&(Object(fe.isAny)(t,["bpmn:SequenceFlow","bpmn:MessageFlow"])&&!Object(Ji.e)(t)&&Object(de.is)(e,"bpmn:FlowNode")&&!Object(de.is)(e,"bpmn:BoundaryEvent")&&Uo(e,t.parent))}function ca(e,t){return!!Object(Ji.e)(t)||!(Object(de.is)(t,"bpmn:Lane")&&!function(e,t){return e&&t&&-1!==e.indexOf(t)}(e,t.parent))}function ua(e){if(e&&e.source)return Object(de.is)(e.source,"bpmn:EventBasedGateway")}function pa(e){return Object(fe.getParent)(e,"bpmn:Process")||Object(fe.getParent)(e,"bpmn:Collaboration")}r()(Bo,je),Bo.$inject=["eventBus"],Bo.prototype.init=function(){this.addRule("connection.start",(function(e){return function(e){if(Mo(e))return null;return Object(fe.isAny)(e,["bpmn:FlowNode","bpmn:InteractionNode","bpmn:DataObjectReference","bpmn:DataStoreReference"])}(e.source)})),this.addRule("connection.create",(function(e){var t=e.source,n=e.target,i=e.hints||{},r=i.targetParent;if(i.targetAttach)return!1;r&&(n.parent=r);try{return qo(t,n)}finally{r&&(n.parent=null)}})),this.addRule("connection.reconnect",(function(e){var t=e.connection;return qo(e.source,e.target,t)})),this.addRule("connection.updateWaypoints",(function(e){return{type:e.connection.type}})),this.addRule("shape.resize",(function(e){return na(e.shape,e.newBounds)})),this.addRule("elements.create",(function(e){var t=e.elements,n=e.position,i=e.target;return Object(u.every)(t,(function(e){return Go(e)?qo(e.source,e.target,e):e.host?Zo(e,e.host,null,n):ta(e,i,null,n)}))})),this.addRule("elements.move",(function(e){var t=e.target,n=e.shapes,i=e.position;return Zo(n,t,null,i)||Qo(n,t,i)||ea(n,t)||sa(n,t,i)})),this.addRule("shape.create",(function(e){return ta(e.shape,e.target,e.source,e.position)})),this.addRule("shape.attach",(function(e){return Zo(e.shape,e.target,null,e.position)})),this.addRule("element.copy",(function(e){var t=e.element;return ca(e.elements,t)}))},Bo.prototype.canConnectMessageFlow=ra,Bo.prototype.canConnectSequenceFlow=oa,Bo.prototype.canConnectDataAssociation=aa,Bo.prototype.canConnectAssociation=ia,Bo.prototype.canMove=ea,Bo.prototype.canAttach=Zo,Bo.prototype.canReplace=Qo,Bo.prototype.canDrop=Uo,Bo.prototype.canInsert=sa,Bo.prototype.canCreate=ta,Bo.prototype.canConnect=qo,Bo.prototype.canResize=na,Bo.prototype.canCopy=ca;var la={__depends__:[Le],__init__:["bpmnRules"],bpmnRules:["type",Bo]},da=n(841);function fa(e,t){e.on("saveXML.start",2e3,(function(){var e,n,i=t.getRootElement(),r=Object(de.getBusinessObject)(i).di;e=Object(ge.h)([i],!1),e=Object(u.filter)(e,(function(e){return e!==i&&!e.labelTarget})),n=Object(u.map)(e,da.b),r.set("planeElement",n)}))}fa.$inject=["eventBus","canvas"];var ha={__init__:["bpmnDiOrdering"],bpmnDiOrdering:["type",fa]},ma=n(757);function va(e){ye.call(this,e);var t=this;this.preExecute(["shape.create","connection.create"],(function(e){var n=e.context,i=n.shape||n.connection,r=n.parent,o=t.getOrdering(i,r);o&&(void 0!==o.parent&&(n.parent=o.parent),n.parentIndex=o.index)})),this.preExecute(["shape.move","connection.move"],(function(e){var n=e.context,i=n.shape||n.connection,r=n.newParent||i.parent,o=t.getOrdering(i,r);o&&(void 0!==o.parent&&(n.newParent=o.parent),n.newParentIndex=o.index)}))}function ba(e,t,n){va.call(this,e);var i=[{type:"bpmn:SubProcess",order:{level:6}},{type:"bpmn:SequenceFlow",order:{level:3,containers:["bpmn:Participant","bpmn:FlowElementsContainer"]}},{type:"bpmn:DataAssociation",order:{level:9,containers:["bpmn:Collaboration","bpmn:Process"]}},{type:"bpmn:MessageFlow",order:{level:9,containers:["bpmn:Collaboration"]}},{type:"bpmn:Association",order:{level:6,containers:["bpmn:Participant","bpmn:FlowElementsContainer","bpmn:Collaboration"]}},{type:"bpmn:BoundaryEvent",order:{level:8}},{type:"bpmn:Group",order:{level:10,containers:["bpmn:Collaboration","bpmn:Process"]}},{type:"bpmn:FlowElement",order:{level:5}},{type:"bpmn:Participant",order:{level:-2}},{type:"bpmn:Lane",order:{level:-1}}];function r(e){var t=e.order;return t||(e.order=t=function(e){if(e.labelTarget)return{level:10};var t=Object(u.find)(i,(function(t){return Object(fe.isAny)(e,[t.type])}));return t&&t.order||{level:1}}(e)),t}this.getOrdering=function(e,i){if(e.labelTarget)return{parent:t.getRootElement(),index:-1};var o=r(e);o.containers&&(i=function(e,t,i){for(var r=t;r&&!Object(fe.isAny)(r,i);)r=r.parent;if(!r)throw new Error(n("no parent for {element} in {parent}",{element:e.id,parent:t.id}));return r}(e,i,o.containers));var a=i.children.indexOf(e),s=Object(u.findIndex)(i.children,(function(t){return!(!e.labelTarget&&t.labelTarget)&&o.level<r(t).level}));return-1!==s&&-1!==a&&a<s&&(s-=1),{index:s,parent:i}}}va.prototype.getOrdering=function(e,t){return null},r()(va,ye),ba.$inject=["eventBus","canvas","translate"],r()(ba,va);var ga={__depends__:[ma.default],__init__:["bpmnOrderingProvider"],bpmnOrderingProvider:["type",ba]};function ya(e,t){this._handlerMap={},this._stack=[],this._stackIdx=-1,this._currentExecution={actions:[],dirty:[]},this._injector=t,this._eventBus=e,this._uid=1,e.on(["diagram.destroy","diagram.clear"],(function(){this.clear(!1)}),this)}ya.$inject=["eventBus","injector"],ya.prototype.execute=function(e,t){if(!e)throw new Error("command required");var n={command:e,context:t};this._pushAction(n),this._internalExecute(n),this._popAction(n)},ya.prototype.canExecute=function(e,t){var n={command:e,context:t},i=this._getHandler(e),r=this._fire(e,"canExecute",n);if(void 0===r){if(!i)return!1;i.canExecute&&(r=i.canExecute(t))}return r},ya.prototype.clear=function(e){this._stack.length=0,this._stackIdx=-1,!1!==e&&this._fire("changed")},ya.prototype.undo=function(){var e,t=this._getUndoAction();if(t){for(this._pushAction(t);t&&(this._internalUndo(t),(e=this._getUndoAction())&&e.id===t.id);)t=e;this._popAction()}},ya.prototype.redo=function(){var e,t=this._getRedoAction();if(t){for(this._pushAction(t);t&&(this._internalExecute(t,!0),(e=this._getRedoAction())&&e.id===t.id);)t=e;this._popAction()}},ya.prototype.register=function(e,t){this._setHandler(e,t)},ya.prototype.registerHandler=function(e,t){if(!e||!t)throw new Error("command and handlerCls must be defined");var n=this._injector.instantiate(t);this.register(e,n)},ya.prototype.canUndo=function(){return!!this._getUndoAction()},ya.prototype.canRedo=function(){return!!this._getRedoAction()},ya.prototype._getRedoAction=function(){return this._stack[this._stackIdx+1]},ya.prototype._getUndoAction=function(){return this._stack[this._stackIdx]},ya.prototype._internalUndo=function(e){var t=this,n=e.command,i=e.context,r=this._getHandler(n);this._atomicDo((function(){t._fire(n,"revert",e),r.revert&&t._markDirty(r.revert(i)),t._revertedAction(e),t._fire(n,"reverted",e)}))},ya.prototype._fire=function(e,t,n){arguments.length<3&&(n=t,t=null);var i,r,o,a=t?[e+"."+t,t]:[e];for(n=this._eventBus.createEvent(n),i=0;(r=a[i])&&(o=this._eventBus.fire("commandStack."+r,n),!n.cancelBubble);i++);return o},ya.prototype._createId=function(){return this._uid++},ya.prototype._atomicDo=function(e){var t=this._currentExecution;t.atomic=!0;try{e()}finally{t.atomic=!1}},ya.prototype._internalExecute=function(e,t){var n=this,i=e.command,r=e.context,o=this._getHandler(i);if(!o)throw new Error("no command handler registered for <"+i+">");this._pushAction(e),t||(this._fire(i,"preExecute",e),o.preExecute&&o.preExecute(r),this._fire(i,"preExecuted",e)),this._atomicDo((function(){n._fire(i,"execute",e),o.execute&&n._markDirty(o.execute(r)),n._executedAction(e,t),n._fire(i,"executed",e)})),t||(this._fire(i,"postExecute",e),o.postExecute&&o.postExecute(r),this._fire(i,"postExecuted",e)),this._popAction(e)},ya.prototype._pushAction=function(e){var t=this._currentExecution,n=t.actions,i=n[0];if(t.atomic)throw new Error("illegal invocation in <execute> or <revert> phase (action: "+e.command+")");e.id||(e.id=i&&i.id||this._createId()),n.push(e)},ya.prototype._popAction=function(){var e=this._currentExecution,t=e.actions,n=e.dirty;t.pop(),t.length||(this._eventBus.fire("elements.changed",{elements:Object(u.uniqueBy)("id",n.reverse())}),n.length=0,this._fire("changed"))},ya.prototype._markDirty=function(e){var t=this._currentExecution;e&&(e=Object(u.isArray)(e)?e:[e],t.dirty=t.dirty.concat(e))},ya.prototype._executedAction=function(e,t){var n=++this._stackIdx;t||this._stack.splice(n,this._stack.length,e)},ya.prototype._revertedAction=function(e){this._stackIdx--},ya.prototype._getHandler=function(e){return this._handlerMap[e]},ya.prototype._setHandler=function(e,t){if(!e||!t)throw new Error("command and handler required");if(this._handlerMap[e])throw new Error("overriding handler for command <"+e+">");this._handlerMap[e]=t};var xa={commandStack:["type",ya]},Oa=new(n(843).a)("tt");function ja(e,t){e.style.display=!1===t?"none":""}function Ea(e,t){var n,i;this._eventBus=e,this._canvas=t,this._ids=Oa,this._tooltipDefaults={show:{minZoom:.7,maxZoom:5}},this._tooltips={},this._tooltipRoot=(n=t.getContainer(),i=Object(p.domify)('<div class="djs-tooltip-container" style="position: absolute; width: 0; height: 0;" />'),n.insertBefore(i,n.firstChild),i);var r=this;p.delegate.bind(this._tooltipRoot,".djs-tooltip","mousedown",(function(e){e.stopPropagation()})),p.delegate.bind(this._tooltipRoot,".djs-tooltip","mouseover",(function(e){r.trigger("mouseover",e)})),p.delegate.bind(this._tooltipRoot,".djs-tooltip","mouseout",(function(e){r.trigger("mouseout",e)})),this._init()}Ea.$inject=["eventBus","canvas"],Ea.prototype.add=function(e){if(!e.position)throw new Error("must specifiy tooltip position");if(!e.html)throw new Error("must specifiy tooltip html");var t=this._ids.next();return e=Object(u.assign)({},this._tooltipDefaults,e,{id:t}),this._addTooltip(e),e.timeout&&this.setTimeout(e),t},Ea.prototype.trigger=function(e,t){var n=t.delegateTarget||t.target,i=this.get(Object(p.attr)(n,"data-tooltip-id"));i&&("mouseover"===e&&i.timeout&&this.clearTimeout(i),"mouseout"===e&&i.timeout&&(i.timeout=1e3,this.setTimeout(i)))},Ea.prototype.get=function(e){return"string"!=typeof e&&(e=e.id),this._tooltips[e]},Ea.prototype.clearTimeout=function(e){if(e=this.get(e)){var t=e.removeTimer;t&&(clearTimeout(t),e.removeTimer=null)}},Ea.prototype.setTimeout=function(e){if(e=this.get(e)){this.clearTimeout(e);var t=this;e.removeTimer=setTimeout((function(){t.remove(e)}),e.timeout)}},Ea.prototype.remove=function(e){var t=this.get(e);t&&(Object(p.remove)(t.html),Object(p.remove)(t.htmlContainer),delete t.htmlContainer,delete this._tooltips[t.id])},Ea.prototype.show=function(){ja(this._tooltipRoot)},Ea.prototype.hide=function(){ja(this._tooltipRoot,!1)},Ea.prototype._updateRoot=function(e){var t=e.scale||1,n=e.scale||1,i="matrix("+t+",0,0,"+n+","+-1*e.x*t+","+-1*e.y*n+")";this._tooltipRoot.style.transform=i,this._tooltipRoot.style["-ms-transform"]=i},Ea.prototype._addTooltip=function(e){var t,n=e.id,i=e.html,r=this._tooltipRoot;i.get&&i.constructor.prototype.jquery&&(i=i.get(0)),Object(u.isString)(i)&&(i=Object(p.domify)(i)),(t=Object(p.domify)('<div data-tooltip-id="'+n+'" class="djs-tooltip" style="position: absolute">')).appendChild(i),e.type&&Object(p.classes)(t).add("djs-tooltip-"+e.type),e.className&&Object(p.classes)(t).add(e.className),e.htmlContainer=t,r.appendChild(t),this._tooltips[n]=e,this._updateTooltip(e)},Ea.prototype._updateTooltip=function(e){var t,n,i,r=e.position,o=e.htmlContainer;t=o,n=r.x,i=r.y,Object(u.assign)(t.style,{left:n+"px",top:i+"px"})},Ea.prototype._updateTooltipVisibilty=function(e){Object(u.forEach)(this._tooltips,(function(t){var n=t.show,i=t.htmlContainer,r=!0;n&&((n.minZoom>e.scale||n.maxZoom<e.scale)&&(r=!1),ja(i,r))}))},Ea.prototype._init=function(){var e=this;this._eventBus.on("canvas.viewbox.changing",(function(t){e.hide()})),this._eventBus.on("canvas.viewbox.changed",(function(t){var n;n=t.viewbox,e._updateRoot(n),e._updateTooltipVisibilty(n),e.show()}))};var _a={__init__:["tooltips"],tooltips:["type",Ea]};function wa(e,t){if("function"!=typeof t)throw new Error("removeFn iterator must be a function");if(e){for(var n;n=e[0];)t(n);return e}}function Sa(e,t,n){ye.call(this,t);var i=e.get("movePreview",!1);t.on("shape.move.start",1400,(function(e){var t=e.context,n=t.shapes,i=t.validatedShapes;t.shapes=Ta(n),t.validatedShapes=Ta(i)})),i&&t.on("shape.move.start",250,(function(e){var t=e.context,n=t.shapes,r=[];Object(u.forEach)(n,(function(e){Object(u.forEach)(e.labels,(function(n){n.hidden||-1!==t.shapes.indexOf(n)||r.push(n),e.labelTarget&&r.push(e)}))})),Object(u.forEach)(r,(function(e){i.makeDraggable(t,e,!0)}))})),this.preExecuted("elements.move",1400,(function(e){var t=e.context.closure,n=t.enclosedElements,i=[];Object(u.forEach)(n,(function(e){Object(u.forEach)(e.labels,(function(e){n[e.id]||i.push(e)}))})),t.addAll(i)})),this.preExecute(["connection.delete","shape.delete"],(function(e){var t=e.context;wa((t.connection||t.shape).labels,(function(e){n.removeShape(e,{nested:!0})}))})),this.execute("shape.delete",(function(e){var t=e.context,n=t.shape,i=n.labelTarget;i&&(t.labelTargetIndex=Object(Yi.indexOf)(i.labels,n),t.labelTarget=i,n.labelTarget=null)})),this.revert("shape.delete",(function(e){var t=e.context,n=t.shape,i=t.labelTarget,r=t.labelTargetIndex;i&&(Object(Yi.add)(i.labels,n,r),n.labelTarget=i)}))}function Ta(e){return Object(u.filter)(e,(function(t){return-1===e.indexOf(t.labelTarget)}))}r()(Sa,ye),Sa.$inject=["injector","eventBus","modeling"];var Pa={__init__:["labelSupport"],labelSupport:["type",Sa]};function Ca(e,t,n,i,r){ye.call(this,t);var o=e.get("movePreview",!1);t.on("shape.move.start",1401,(function(e){var t,n,i=e.context,r=i.shapes,o=i.validatedShapes;i.shapes=(n=Aa(t=r),Object(u.unionBy)("id",t,n)),i.validatedShapes=function(e){var t=Object(u.groupBy)(e,"id");return Object(u.filter)(e,(function(e){for(;e;){if(e.host&&t[e.host.id])return!1;e=e.parent}return!0}))}(o)})),o&&t.on("shape.move.start",251,(function(e){var t=e.context,n=Aa(t.shapes);Object(u.forEach)(n,(function(e){o.makeDraggable(t,e,!0),Object(u.forEach)(e.labels,(function(e){o.makeDraggable(t,e,!0)}))}))})),o&&t.on("shape.move.start",(function(e){var i=e.context.shapes;if(1===i.length){var r=i[0].host;r&&(n.addMarker(r,"attach-ok"),t.once(["shape.move.out","shape.move.cleanup"],(function(){n.removeMarker(r,"attach-ok")})))}})),this.preExecuted("elements.move",1401,(function(e){var t=e.context,n=t.closure,i=Aa(t.shapes);Object(u.forEach)(i,(function(e){n.add(e,n.topLevel[e.host.id])}))})),this.postExecuted("elements.move",(function(e){var t,n=e.context,i=n.shapes,o=n.newHost;o&&1!==i.length||(t=o?i:Object(u.filter)(i,(function(e){var t,n=e.host;return function(e){return!!e.host}(e)&&(t=n,!(-1!==i.indexOf(t)))})),Object(u.forEach)(t,(function(e){r.updateAttachment(e,o)})))})),this.postExecuted("elements.move",(function(e){var t=e.context.shapes;Object(u.forEach)(t,(function(e){Object(u.forEach)(e.attachers,(function(e){Object(u.forEach)(e.outgoing.slice(),(function(e){i.allowed("connection.reconnect",{connection:e,source:e.source,target:e.target})||r.removeConnection(e)})),Object(u.forEach)(e.incoming.slice(),(function(e){i.allowed("connection.reconnect",{connection:e,source:e.source,target:e.target})||r.removeConnection(e)}))}))}))})),this.postExecute("shape.create",(function(e){var t=e.context,n=t.shape,i=t.host;i&&r.updateAttachment(n,i)})),this.postExecute("shape.replace",(function(e){var t=e.context,n=t.oldShape,o=t.newShape;wa(n.attachers,(function(e){"attach"===i.allowed("elements.move",{target:o,shapes:[e]})?r.updateAttachment(e,o):r.removeShape(e)})),o.attachers.length&&Object(u.forEach)(o.attachers,(function(e){var t=Qr(e,n,o);r.moveShape(e,t,e.parent)}))})),this.postExecute("shape.resize",(function(e){var t=e.context,n=t.shape,i=t.oldBounds,o=t.newBounds,a=n.attachers;!1!==(t.hints||{}).attachSupport&&Object(u.forEach)(a,(function(e){var t=Qr(e,i,o);r.moveShape(e,t,e.parent),Object(u.forEach)(e.labels,(function(e){r.moveShape(e,t,e.parent)}))}))})),this.preExecute("shape.delete",(function(e){var t=e.context.shape;wa(t.attachers,(function(e){r.removeShape(e)})),t.host&&r.updateAttachment(t,null)}))}function Aa(e){return Object(u.flatten)(Object(u.map)(e,(function(e){return e.attachers||[]})))}r()(Ca,ye),Ca.$inject=["injector","eventBus","canvas","rules","modeling"];var Ra={__depends__:[Le],__init__:["attachSupport"],attachSupport:["type",Ca]};function ka(e,t){this._eventBus=e,this._dragging=t,this._tools=[],this._active=null}ka.$inject=["eventBus","dragging"],ka.prototype.registerTool=function(e,t){var n=this._tools;if(!t)throw new Error('A tool has to be registered with it\'s "events"');n.push(e),this.bindEvents(e,t)},ka.prototype.isActive=function(e){return e&&this._active===e},ka.prototype.length=function(e){return this._tools.length},ka.prototype.setActive=function(e){var t=this._eventBus;this._active!==e&&(this._active=e,t.fire("tool-manager.update",{tool:e}))},ka.prototype.bindEvents=function(e,t){var n=this._eventBus,i=this._dragging,r=[];n.on(t.tool+".init",(function(t){if(!t.context.reactivate&&this.isActive(e))return this.setActive(null),void i.cancel();this.setActive(e)}),this),Object(u.forEach)(t,(function(e){r.push(e+".ended"),r.push(e+".canceled")})),n.on(r,250,(function(e){var t=e.originalEvent;this._active&&(t&&Object(p.closest)(t.target,'.group[data-group="tools"]')||this.setActive(null))}),this)};var Ba={__depends__:[ke],__init__:["toolManager"],toolManager:["type",ka]};function Ma(e,t){return-1!==e.indexOf(t)}var Da=Math.abs,Na=Math.round,La={x:"width",y:"height"},Ia={n:"top",w:"left",s:"bottom",e:"right"},Fa={n:"s",w:"e",s:"n",e:"w"};function za(e,t,n,i,r,o){this._canvas=e,this._dragging=t,this._eventBus=n,this._modeling=i,this._rules=r,this._toolManager=o;var a=this;o.registerTool("space",{tool:"spaceTool.selection",dragging:"spaceTool"}),n.on("spaceTool.selection.end",(function(e){n.once("spaceTool.selection.ended",(function(){a.activateMakeSpace(e.originalEvent)}))})),n.on("spaceTool.move",1500,(function(e){var t=e.context,n=t.initialized;n||(n=t.initialized=a.init(e,t)),n&&$a(e)})),n.on("spaceTool.end",(function(e){var t=e.context,i=t.axis,r=t.direction,o=t.movingShapes,s=t.resizingShapes,c=t.start;if(t.initialized){$a(e);var u={x:0,y:0};u[i]=Na(e["d"+i]),a.makeSpace(o,s,u,r,c),n.once("spaceTool.ended",(function(e){a.activateSelection(e.originalEvent,!0,!0)}))}}))}function Va(e){return{top:e.top-20,right:e.right+20,bottom:e.bottom+20,left:e.left-20}}function $a(e){var t,n,i=e.context.spaceToolConstraints;i&&(Object(u.isNumber)(i.left)&&(t=Math.max(e.x,i.left),e.dx=e.dx+t-e.x,e.x=t),Object(u.isNumber)(i.right)&&(t=Math.min(e.x,i.right),e.dx=e.dx+t-e.x,e.x=t),Object(u.isNumber)(i.top)&&(n=Math.max(e.y,i.top),e.dy=e.dy+n-e.y,e.y=n),Object(u.isNumber)(i.bottom)&&(n=Math.min(e.y,i.bottom),e.dy=e.dy+n-e.y,e.y=n))}function Ha(e,t){return-1!==e.indexOf(t)}function Ga(e){return!!e.waypoints}function Wa(e){return!!e.labelTarget}za.$inject=["canvas","dragging","eventBus","modeling","rules","toolManager"],za.prototype.activateSelection=function(e,t,n){this._dragging.init(e,"spaceTool.selection",{autoActivate:t,cursor:"crosshair",data:{context:{reactivate:n}},trapClick:!1})},za.prototype.activateMakeSpace=function(e){this._dragging.init(e,"spaceTool",{autoActivate:!0,cursor:"crosshair",data:{context:{}}})},za.prototype.makeSpace=function(e,t,n,i,r){return this._modeling.createSpace(e,t,n,i,r)},za.prototype.init=function(e,t){var n=Da(e.dx)>Da(e.dy)?"x":"y",i=e["d"+n],r=e[n]-i;if(Da(i)<5)return!1;i<0&&(i*=-1),Object(ni.a)(e)&&(i*=-1);var o=function(e,t){if("x"===e){if(t>0)return"e";if(t<0)return"w"}if("y"===e){if(t>0)return"s";if(t<0)return"n"}return null}(n,i),a=this._canvas.getRootElement(),s=Object(ge.h)(a,!0),c=this.calculateAdjustments(s,n,i,r),p=function(e,t,n,i,r){var o=e.movingShapes,a=e.resizingShapes;if(!a.length)return;var s,c,p={};return Object(u.forEach)(a,(function(e){var l,d,f,h=Object(ie.b)(e),m=Object(u.filter)(e.children,(function(e){return!(Ga(e)||Wa(e)||Ha(o,e)||Ha(a,e))})),v=Object(u.filter)(e.children,(function(e){return!Ga(e)&&!Wa(e)&&Ha(o,e)}));m.length&&(d=Va(Object(ie.b)(Object(ge.b)(m))),l=i-h[Ia[n]]+d[Ia[n]],"n"===n?p.bottom=c=Object(u.isNumber)(c)?Math.min(c,l):l:"w"===n?p.right=c=Object(u.isNumber)(c)?Math.min(c,l):l:"s"===n?p.top=s=Object(u.isNumber)(s)?Math.max(s,l):l:"e"===n&&(p.left=s=Object(u.isNumber)(s)?Math.max(s,l):l)),v.length&&(f=Va(Object(ie.b)(Object(ge.b)(v))),l=i-f[Ia[Fa[n]]]+h[Ia[Fa[n]]],"n"===n?p.bottom=c=Object(u.isNumber)(c)?Math.min(c,l):l:"w"===n?p.right=c=Object(u.isNumber)(c)?Math.min(c,l):l:"s"===n?p.top=s=Object(u.isNumber)(s)?Math.max(s,l):l:"e"===n&&(p.left=s=Object(u.isNumber)(s)?Math.max(s,l):l));var b=r&&r[e.id];b&&("n"===n?(l=i+e[La[t]]-b[La[t]],p.bottom=c=Object(u.isNumber)(c)?Math.min(c,l):l):"w"===n?(l=i+e[La[t]]-b[La[t]],p.right=c=Object(u.isNumber)(c)?Math.min(c,l):l):"s"===n?(l=i-e[La[t]]+b[La[t]],p.top=s=Object(u.isNumber)(s)?Math.max(s,l):l):"e"===n&&(l=i-e[La[t]]+b[La[t]],p.left=s=Object(u.isNumber)(s)?Math.max(s,l):l))})),p}(c,n,o,r,this._eventBus.fire("spaceTool.getMinDimensions",{axis:n,direction:o,shapes:c.resizingShapes,start:r}));return Object(u.assign)(t,c,{axis:n,direction:o,spaceToolConstraints:p,start:r}),w("resize-"+("x"===n?"ew":"ns")),!0},za.prototype.calculateAdjustments=function(e,t,n,i){var r=this._rules,o=[],a=[];return Object(u.forEach)(e,(function(e){if(e.parent&&!Ga(e)){var s=e[t],c=s+e[La[t]];return n>0&&s>i||n<0&&c<i?o.push(e):s<i&&c>i&&r.allowed("shape.resize",{shape:e})?a.push(e):void 0}})),{movingShapes:o,resizingShapes:a}},za.prototype.toggle=function(){this.isActive()?this._dragging.cancel():this.activateSelection()},za.prototype.isActive=function(){var e=this._dragging.context();return e&&/^spaceTool/.test(e.prefix)};var qa=Math.max;function Ua(e,t,n,i,r){function o(e,t){Object(u.forEach)(e,(function(e){r.addDragger(e,t),n.addMarker(e,"djs-dragging")}))}e.on("spaceTool.selection.start",(function(e){var t=n.getLayer("space"),r=e.context,o="M 0,-10000 L 0,10000",a="M -10000,0 L 10000,0",s=Object(K.f)("g");Object(K.b)(s,i.cls("djs-crosshair-group",["no-events"])),Object(K.a)(t,s);var c=Object(K.f)("path");Object(K.b)(c,"d",o),Object(K.c)(c).add("djs-crosshair"),Object(K.a)(s,c);var u=Object(K.f)("path");Object(K.b)(u,"d",a),Object(K.c)(u).add("djs-crosshair"),Object(K.a)(s,u),r.crosshairGroup=s})),e.on("spaceTool.selection.move",(function(e){var t=e.context.crosshairGroup;Object(Fe.c)(t,e.x,e.y)})),e.on("spaceTool.selection.cleanup",(function(e){var t=e.context.crosshairGroup;t&&Object(K.j)(t)})),e.on("spaceTool.move",250,(function(e){var a=e.context,s=a.line,c=a.axis,p=a.movingShapes,l=a.resizingShapes;if(a.initialized){if(!a.dragGroup){var d=n.getLayer("space");s=Object(K.f)("path"),Object(K.b)(s,"d","M0,0 L0,0"),Object(K.c)(s).add("djs-crosshair"),Object(K.a)(d,s),a.line=s;var f=Object(K.f)("g");Object(K.b)(f,i.cls("djs-drag-group",["no-events"])),Object(K.a)(n.getDefaultLayer(),f),o(p,f),o(a.movingConnections=t.filter((function(e){var t=!1;Object(u.forEach)(p,(function(n){Object(u.forEach)(n.outgoing,(function(n){e===n&&(t=!0)}))}));var n=!1;Object(u.forEach)(p,(function(t){Object(u.forEach)(t.incoming,(function(t){e===t&&(n=!0)}))}));var i=!1;Object(u.forEach)(l,(function(t){Object(u.forEach)(t.outgoing,(function(t){e===t&&(i=!0)}))}));var r=!1;return Object(u.forEach)(l,(function(t){Object(u.forEach)(t.incoming,(function(t){e===t&&(r=!0)}))})),function(e){return e.waypoints}(e)&&(t||i)&&(n||r)})),f),a.dragGroup=f}if(!a.frameGroup){var h=Object(K.f)("g");Object(K.b)(h,i.cls("djs-frame-group",["no-events"])),Object(K.a)(n.getDefaultLayer(),h);var m=[];Object(u.forEach)(l,(function(e){var t=r.addFrame(e,h),i=t.getBBox();m.push({element:t,initialBounds:i}),n.addMarker(e,"djs-resizing")})),a.frameGroup=h,a.frames=m}var v={x:"M"+e.x+", -10000 L"+e.x+", 10000",y:"M -10000, "+e.y+" L 10000, "+e.y};Object(K.b)(s,{d:v[c]});var b={x:e.dx,y:e.dy};b[{x:"y",y:"x"}[a.axis]]=0,Object(Fe.c)(a.dragGroup,b.x,b.y),Object(u.forEach)(a.frames,(function(e){var t,n,i=e.element,r=e.initialBounds;"e"===a.direction?Object(K.b)(i,{width:qa(r.width+b.x,5)}):(t=qa(r.width-b.x,5),Object(K.b)(i,{width:t,x:r.x+r.width-t})),"s"===a.direction?Object(K.b)(i,{height:qa(r.height+b.y,5)}):(n=qa(r.height-b.y,5),Object(K.b)(i,{height:n,y:r.y+r.height-n}))}))}})),e.on("spaceTool.cleanup",(function(e){var t=e.context,i=t.movingShapes,r=t.movingConnections,o=t.resizingShapes,a=t.line,s=t.dragGroup,c=t.frameGroup;Object(u.forEach)(i,(function(e){n.removeMarker(e,"djs-dragging")})),Object(u.forEach)(r,(function(e){n.removeMarker(e,"djs-dragging")})),s&&(Object(K.j)(a),Object(K.j)(s)),Object(u.forEach)(o,(function(e){n.removeMarker(e,"djs-resizing")})),c&&Object(K.j)(c)}))}Ua.$inject=["eventBus","elementRegistry","canvas","styles","previewSupport"];var Ka={__init__:["spaceToolPreview"],__depends__:[ke,Le,Ba,zt],spaceTool:["type",za],spaceToolPreview:["type",Ua]};function Ya(e){this._model=e}Ya.$inject=["moddle"],Ya.prototype._needsId=function(e){return Object(fe.isAny)(e,["bpmn:RootElement","bpmn:FlowElement","bpmn:MessageFlow","bpmn:DataAssociation","bpmn:Artifact","bpmn:Participant","bpmn:Lane","bpmn:LaneSet","bpmn:Process","bpmn:Collaboration","bpmndi:BPMNShape","bpmndi:BPMNEdge","bpmndi:BPMNDiagram","bpmndi:BPMNPlane","bpmn:Property","bpmn:CategoryValue"])},Ya.prototype._ensureId=function(e){var t;t=Object(de.is)(e,"bpmn:Activity")?"Activity":Object(de.is)(e,"bpmn:Event")?"Event":Object(de.is)(e,"bpmn:Gateway")?"Gateway":Object(fe.isAny)(e,["bpmn:SequenceFlow","bpmn:MessageFlow"])?"Flow":(e.$type||"").replace(/^[^:]*:/g,""),t+="_",!e.id&&this._needsId(e)&&(e.id=this._model.ids.nextPrefixed(t,e))},Ya.prototype.create=function(e,t){var n=this._model.create(e,t||{});return this._ensureId(n),n},Ya.prototype.createDiLabel=function(){return this.create("bpmndi:BPMNLabel",{bounds:this.createDiBounds()})},Ya.prototype.createDiShape=function(e,t,n){return this.create("bpmndi:BPMNShape",Object(u.assign)({bpmnElement:e,bounds:this.createDiBounds(t)},n))},Ya.prototype.createDiBounds=function(e){return this.create("dc:Bounds",e)},Ya.prototype.createDiWaypoints=function(e){var t=this;return Object(u.map)(e,(function(e){return t.createDiWaypoint(e)}))},Ya.prototype.createDiWaypoint=function(e){return this.create("dc:Point",Object(u.pick)(e,["x","y"]))},Ya.prototype.createDiEdge=function(e,t,n){return this.create("bpmndi:BPMNEdge",Object(u.assign)({bpmnElement:e},n))},Ya.prototype.createDiPlane=function(e){return this.create("bpmndi:BPMNPlane",{bpmnElement:e})};var Xa=n(800);function Ja(e,t,n,i){ye.call(this,e),this._bpmnFactory=t,this._translate=i;var r=this;function o(e){var t=e.context.oldRoot.children;Object(u.forEach)(t,(function(e){Object(de.is)(e,"bpmn:BaseElement")&&r.updateParent(e)}))}function a(e){var t=e.context.shape;Object(de.is)(t,"bpmn:BaseElement")&&r.updateBounds(t)}function s(e){r.updateConnection(e.context)}function c(e){r.updateConnectionWaypoints(e.context.connection)}function p(e){r.updateAttachment(e.context)}this.executed(["connection.layout","connection.create"],(function(e){var t,i=e.context,r=i.hints||{};i.cropped||!1===r.createElementsBehavior||((t=i.connection).waypoints=n.getCroppedWaypoints(t),i.cropped=!0)})),this.reverted(["connection.layout"],(function(e){delete e.context.cropped})),this.executed(["shape.move","shape.create","shape.delete","connection.create","connection.move","connection.delete"],Za((function(e){var t=e.context;r.updateParent(t.shape||t.connection,t.oldParent)}))),this.reverted(["shape.move","shape.create","shape.delete","connection.create","connection.move","connection.delete"],Za((function(e){var t=e.context,n=t.shape||t.connection,i=t.parent||t.newParent;r.updateParent(n,i)}))),this.executed(["canvas.updateRoot"],o),this.reverted(["canvas.updateRoot"],o),this.executed(["shape.move","shape.create","shape.resize"],Za((function(e){"label"!==e.context.shape.type&&a(e)}))),this.reverted(["shape.move","shape.create","shape.resize"],Za((function(e){"label"!==e.context.shape.type&&a(e)}))),e.on("shape.changed",(function(e){"label"===e.element.type&&a({context:{shape:e.element}})})),this.executed(["connection.create","connection.move","connection.delete","connection.reconnect"],Za(s)),this.reverted(["connection.create","connection.move","connection.delete","connection.reconnect"],Za(s)),this.executed(["connection.layout","connection.move","connection.updateWaypoints"],Za(c)),this.reverted(["connection.layout","connection.move","connection.updateWaypoints"],Za(c)),this.executed("connection.reconnect",Za((function(e){var t=e.context,n=t.connection,i=t.oldSource,r=t.newSource,o=Object(de.getBusinessObject)(n),a=Object(de.getBusinessObject)(i),s=Object(de.getBusinessObject)(r);o.conditionExpression&&!Object(fe.isAny)(s,["bpmn:Activity","bpmn:ExclusiveGateway","bpmn:InclusiveGateway"])&&(t.oldConditionExpression=o.conditionExpression,delete o.conditionExpression),i!==r&&a.default===o&&(t.oldDefault=a.default,delete a.default)}))),this.reverted("connection.reconnect",Za((function(e){var t=e.context,n=t.connection,i=t.oldSource,r=t.newSource,o=Object(de.getBusinessObject)(n),a=Object(de.getBusinessObject)(i),s=Object(de.getBusinessObject)(r);t.oldConditionExpression&&(o.conditionExpression=t.oldConditionExpression),t.oldDefault&&(a.default=t.oldDefault,delete s.default)}))),this.executed(["element.updateAttachment"],Za(p)),this.reverted(["element.updateAttachment"],Za(p))}function Za(e){return function(t){var n=t.context,i=n.shape||n.connection;Object(de.is)(i,"bpmn:BaseElement")&&e(t)}}r()(Ja,ye),Ja.$inject=["eventBus","bpmnFactory","connectionDocking","translate"],Ja.prototype.updateAttachment=function(e){var t=e.shape,n=t.businessObject,i=t.host;n.attachedToRef=i&&i.businessObject},Ja.prototype.updateParent=function(e,t){if(!(e instanceof Xa.b||Object(de.is)(e,"bpmn:DataStoreReference")&&e.parent&&Object(de.is)(e.parent,"bpmn:Collaboration"))){var n=e.parent,i=e.businessObject,r=n&&n.businessObject,o=r&&r.di;Object(de.is)(e,"bpmn:FlowNode")&&this.updateFlowNodeRefs(i,r,t&&t.businessObject),Object(de.is)(e,"bpmn:DataOutputAssociation")&&(r=e.source?e.source.businessObject:null),Object(de.is)(e,"bpmn:DataInputAssociation")&&(r=e.target?e.target.businessObject:null),this.updateSemanticParent(i,r),Object(de.is)(e,"bpmn:DataObjectReference")&&i.dataObjectRef&&this.updateSemanticParent(i.dataObjectRef,r),this.updateDiParent(i.di,o)}},Ja.prototype.updateBounds=function(e){var t=e.businessObject.di,n=e instanceof Xa.b?this._getLabel(t):t,i=n.bounds;i||(i=this._bpmnFactory.createDiBounds(),n.set("bounds",i)),Object(u.assign)(i,{x:e.x,y:e.y,width:e.width,height:e.height})},Ja.prototype.updateFlowNodeRefs=function(e,t,n){var i,r;n!==t&&(Object(de.is)(n,"bpmn:Lane")&&(i=n.get("flowNodeRef"),Object(Yi.remove)(i,e)),Object(de.is)(t,"bpmn:Lane")&&(r=t.get("flowNodeRef"),Object(Yi.add)(r,e)))},Ja.prototype.updateDiConnection=function(e,t,n){e.sourceElement&&e.sourceElement.bpmnElement!==t&&(e.sourceElement=t&&t.di),e.targetElement&&e.targetElement.bpmnElement!==n&&(e.targetElement=n&&n.di)},Ja.prototype.updateDiParent=function(e,t){if(t&&!Object(de.is)(t,"bpmndi:BPMNPlane")&&(t=t.$parent),e.$parent!==t){var n=(t||e.$parent).get("planeElement");t?(n.push(e),e.$parent=t):(Object(Yi.remove)(n,e),e.$parent=null)}},Ja.prototype.getLaneSet=function(e){var t,n;return Object(de.is)(e,"bpmn:Lane")?((t=e.childLaneSet)||(t=this._bpmnFactory.create("bpmn:LaneSet"),e.childLaneSet=t,t.$parent=e),t):(Object(de.is)(e,"bpmn:Participant")&&(e=e.processRef),(t=(n=e.get("laneSets"))[0])||((t=this._bpmnFactory.create("bpmn:LaneSet")).$parent=e,n.push(t)),t)},Ja.prototype.updateSemanticParent=function(e,t,n){var i,r=this._translate;if(e.$parent!==t&&(!Object(de.is)(e,"bpmn:DataInput")&&!Object(de.is)(e,"bpmn:DataOutput")||(Object(de.is)(t,"bpmn:Participant")&&"processRef"in t&&(t=t.processRef),!("ioSpecification"in t)||t.ioSpecification!==e.$parent))){if(Object(de.is)(e,"bpmn:Lane"))t&&(t=this.getLaneSet(t)),i="lanes";else if(Object(de.is)(e,"bpmn:FlowElement")){if(t)if(Object(de.is)(t,"bpmn:Participant"))t=t.processRef;else if(Object(de.is)(t,"bpmn:Lane"))do{t=t.$parent.$parent}while(Object(de.is)(t,"bpmn:Lane"));i="flowElements"}else if(Object(de.is)(e,"bpmn:Artifact")){for(;t&&!Object(de.is)(t,"bpmn:Process")&&!Object(de.is)(t,"bpmn:SubProcess")&&!Object(de.is)(t,"bpmn:Collaboration");){if(Object(de.is)(t,"bpmn:Participant")){t=t.processRef;break}t=t.$parent}i="artifacts"}else if(Object(de.is)(e,"bpmn:MessageFlow"))i="messageFlows";else if(Object(de.is)(e,"bpmn:Participant")){i="participants";var o,a=e.processRef;a&&(o=function(e){for(;e&&!Object(de.is)(e,"bpmn:Definitions");)e=e.$parent;return e}(e.$parent||t),e.$parent&&(Object(Yi.remove)(o.get("rootElements"),a),a.$parent=null),t&&(Object(Yi.add)(o.get("rootElements"),a),a.$parent=o))}else Object(de.is)(e,"bpmn:DataOutputAssociation")?i="dataOutputAssociations":Object(de.is)(e,"bpmn:DataInputAssociation")&&(i="dataInputAssociations");if(!i)throw new Error(r("no parent for {element} in {parent}",{element:e.id,parent:t.id}));var s;if(e.$parent&&(s=e.$parent.get(i),Object(Yi.remove)(s,e)),t?((s=t.get(i)).push(e),e.$parent=t):e.$parent=null,n){var c=n.get(i);Object(Yi.remove)(s,e),t&&(c||(c=[],t.set(i,c)),c.push(e))}}},Ja.prototype.updateConnectionWaypoints=function(e){e.businessObject.di.set("waypoint",this._bpmnFactory.createDiWaypoints(e.waypoints))},Ja.prototype.updateConnection=function(e){var t,n=e.connection,i=Object(de.getBusinessObject)(n),r=Object(de.getBusinessObject)(n.source),o=Object(de.getBusinessObject)(n.target);if(Object(de.is)(i,"bpmn:DataAssociation"))Object(de.is)(i,"bpmn:DataInputAssociation")?(i.get("sourceRef")[0]=r,t=e.parent||e.newParent||o,this.updateSemanticParent(i,o,t)):Object(de.is)(i,"bpmn:DataOutputAssociation")&&(t=e.parent||e.newParent||r,this.updateSemanticParent(i,r,t),i.targetRef=o);else{var a=Object(de.is)(i,"bpmn:SequenceFlow");i.sourceRef!==r&&(a&&(Object(Yi.remove)(i.sourceRef&&i.sourceRef.get("outgoing"),i),r&&r.get("outgoing")&&r.get("outgoing").push(i)),i.sourceRef=r),i.targetRef!==o&&(a&&(Object(Yi.remove)(i.targetRef&&i.targetRef.get("incoming"),i),o&&o.get("incoming")&&o.get("incoming").push(i)),i.targetRef=o)}this.updateConnectionWaypoints(n),this.updateDiConnection(i.di,r,o)},Ja.prototype._getLabel=function(e){return e.label||(e.label=this._bpmnFactory.createDiLabel()),e.label};var Qa=n(837);function es(e,t,n){Qa.a.call(this),this._bpmnFactory=e,this._moddle=t,this._translate=n}function ts(e,t,n){e[n]=t[n],delete t[n]}function ns(e,t){this._modeling=e,this._canvas=t}function is(e){this._modeling=e}function rs(e,t){this._canvas=e,this._layouter=t}r()(es,Qa.a),es.$inject=["bpmnFactory","moddle","translate"],es.prototype.baseCreate=Qa.a.prototype.create,es.prototype.create=function(e,t){return"label"===e?this.baseCreate(e,Object(u.assign)({type:"label"},Ji.a,t)):this.createBpmnElement(e,t)},es.prototype.createBpmnElement=function(e,t){var n,i,r,o=this._translate,a=(t=t||{}).businessObject;if(!a){if(!t.type)throw new Error(o("no shape type specified"));a=this._bpmnFactory.create(t.type)}return a.di||(a.di="root"===e?this._bpmnFactory.createDiPlane(a,[],{id:a.id+"_di"}):"connection"===e?this._bpmnFactory.createDiEdge(a,[],{id:a.id+"_di"}):this._bpmnFactory.createDiShape(a,{},{id:a.id+"_di"})),Object(de.is)(a,"bpmn:Group")&&(t=Object(u.assign)({isFrame:!0},t)),t.di&&(Object(u.assign)(a.di,t.di),delete t.di),function(e,t,n){Object(u.forEach)(n,(function(n){void 0!==t[n]&&ts(e,t,n)}))}(a,t,["processRef","isInterrupting","associationDirection","isForCompensation"]),t.isExpanded&&ts(a.di,t,"isExpanded"),Object(de.is)(a,"bpmn:ExclusiveGateway")&&(a.di.isMarkerVisible=!0),t.eventDefinitionType&&(i=a.get("eventDefinitions")||[],r=this._bpmnFactory.create(t.eventDefinitionType,t.eventDefinitionAttrs),"bpmn:ConditionalEventDefinition"===t.eventDefinitionType&&(r.condition=this._bpmnFactory.create("bpmn:FormalExpression")),i.push(r),r.$parent=a,a.eventDefinitions=i,delete t.eventDefinitionType),n=this._getDefaultSize(a),t=Object(u.assign)({businessObject:a,id:a.id},n,t),this.baseCreate(e,t)},es.prototype._getDefaultSize=function(e){return Object(de.is)(e,"bpmn:SubProcess")?Object(On.isExpanded)(e)?{width:350,height:200}:{width:100,height:80}:Object(de.is)(e,"bpmn:Task")?{width:100,height:80}:Object(de.is)(e,"bpmn:Gateway")?{width:50,height:50}:Object(de.is)(e,"bpmn:Event")?{width:36,height:36}:Object(de.is)(e,"bpmn:Participant")?Object(On.isExpanded)(e)?{width:600,height:250}:{width:400,height:60}:Object(de.is)(e,"bpmn:Lane")?{width:400,height:100}:Object(de.is)(e,"bpmn:DataObjectReference")?{width:36,height:50}:Object(de.is)(e,"bpmn:DataStoreReference")?{width:50,height:50}:Object(de.is)(e,"bpmn:TextAnnotation")?{width:100,height:30}:Object(de.is)(e,"bpmn:Group")?{width:300,height:300}:{width:100,height:80}},es.prototype.createParticipantShape=function(e){return Object(u.isObject)(e)||(e={isExpanded:e}),!1!==(e=Object(u.assign)({type:"bpmn:Participant"},e||{})).isExpanded&&(e.processRef=this._bpmnFactory.create("bpmn:Process")),this.createShape(e)},ns.$inject=["modeling","canvas"],ns.prototype.preExecute=function(e){var t=this._modeling,n=e.elements,i=e.alignment;Object(u.forEach)(n,(function(e){var n={x:0,y:0};i.left?n.x=i.left-e.x:i.right?n.x=i.right-e.width-e.x:i.center?n.x=i.center-Math.round(e.width/2)-e.x:i.top?n.y=i.top-e.y:i.bottom?n.y=i.bottom-e.height-e.y:i.middle&&(n.y=i.middle-Math.round(e.height/2)-e.y),t.moveElements([e],n,e.parent)}))},ns.prototype.postExecute=function(e){},is.$inject=["modeling"],is.prototype.preExecute=function(e){var t=e.source;if(!t)throw new Error("source required");var n=e.target||t.parent,i=e.shape,r=e.hints||{};i=e.shape=this._modeling.createShape(i,e.position,n,{attach:r.attach}),e.shape=i},is.prototype.postExecute=function(e){var t,n,i=e.hints||{};t=e.source,n=e.shape,Object(u.some)(t.outgoing,(function(e){return e.target===n}))||(i.connectionTarget===e.source?this._modeling.connect(e.shape,e.source,e.connection):this._modeling.connect(e.source,e.shape,e.connection))},rs.$inject=["canvas","layouter"],rs.prototype.execute=function(e){var t=e.connection,n=e.source,i=e.target,r=e.parent,o=e.parentIndex,a=e.hints;if(!n||!i)throw new Error("source and target required");if(!r)throw new Error("parent required");return t.source=n,t.target=i,t.waypoints||(t.waypoints=this._layouter.layoutConnection(t,a)),this._canvas.addConnection(t,r,o),t},rs.prototype.revert=function(e){var t=e.connection;return this._canvas.removeConnection(t),t.source=null,t.target=null,t};var os=Math.round;function as(e){this._modeling=e}function ss(e){return!!e.waypoints}as.$inject=["modeling"],as.prototype.preExecute=function(e){var t=e.elements,n=e.parent,i=e.parentIndex,r=e.position,o=e.hints,a=this._modeling;Object(u.forEach)(t,(function(e){Object(u.isNumber)(e.x)||(e.x=0),Object(u.isNumber)(e.y)||(e.y=0)}));var s=Object(ge.b)(t);Object(u.forEach)(t,(function(e){ss(e)&&(e.waypoints=Object(u.map)(e.waypoints,(function(e){return{x:os(e.x-s.x-s.width/2+r.x),y:os(e.y-s.y-s.height/2+r.y)}}))),Object(u.assign)(e,{x:os(e.x-s.x-s.width/2+r.x),y:os(e.y-s.y-s.height/2+r.y)})}));var c=Object(ge.e)(t),p={};Object(u.forEach)(t,(function(e){if(ss(e))p[e.id]=Object(u.isNumber)(i)?a.createConnection(p[e.source.id],p[e.target.id],i,e,e.parent||n,o):a.createConnection(p[e.source.id],p[e.target.id],e,e.parent||n,o);else{var t=Object(u.assign)({},o);-1===c.indexOf(e)&&(t.autoResize=!1),p[e.id]=Object(u.isNumber)(i)?a.createShape(e,Object(u.pick)(e,["x","y","width","height"]),e.parent||n,i,t):a.createShape(e,Object(u.pick)(e,["x","y","width","height"]),e.parent||n,t)}})),e.elements=Object(u.values)(p)};var cs=Math.round;function us(e){this._canvas=e}function ps(e){us.call(this,e)}us.$inject=["canvas"],us.prototype.execute=function(e){var t=e.shape,n=e.position,i=e.parent,r=e.parentIndex;if(!i)throw new Error("parent required");if(!n)throw new Error("position required");return void 0!==n.width?Object(u.assign)(t,n):Object(u.assign)(t,{x:n.x-cs(t.width/2),y:n.y-cs(t.height/2)}),this._canvas.addShape(t,i,r),t},us.prototype.revert=function(e){var t=e.shape;return this._canvas.removeShape(t),t},r()(ps,us),ps.$inject=["canvas"];var ls=us.prototype.execute;ps.prototype.execute=function(e){var t=e.shape;return function(e){["width","height"].forEach((function(t){void 0===e[t]&&(e[t]=0)}))}(t),t.labelTarget=e.labelTarget,ls.call(this,e)};var ds=us.prototype.revert;function fs(e,t){this._canvas=e,this._modeling=t}function hs(e,t){this._modeling=e,this._elementRegistry=t}function ms(e,t){this._canvas=e,this._modeling=t}function vs(e){this._modeling=e}ps.prototype.revert=function(e){return e.shape.labelTarget=null,ds.call(this,e)},fs.$inject=["canvas","modeling"],fs.prototype.execute=function(e){var t=e.connection,n=t.parent;return e.parent=n,e.parentIndex=Object(Yi.indexOf)(n.children,t),e.source=t.source,e.target=t.target,this._canvas.removeConnection(t),t.source=null,t.target=null,t},fs.prototype.revert=function(e){var t=e.connection,n=e.parent,i=e.parentIndex;return t.source=e.source,t.target=e.target,Object(Yi.add)(n.children,t,i),this._canvas.addConnection(t,n),t},hs.$inject=["modeling","elementRegistry"],hs.prototype.postExecute=function(e){var t=this._modeling,n=this._elementRegistry,i=e.elements;Object(u.forEach)(i,(function(e){n.get(e.id)&&(e.waypoints?t.removeConnection(e):t.removeShape(e))}))},ms.$inject=["canvas","modeling"],ms.prototype.preExecute=function(e){var t=this._modeling,n=e.shape;wa(n.incoming,(function(e){t.removeConnection(e,{nested:!0})})),wa(n.outgoing,(function(e){t.removeConnection(e,{nested:!0})})),wa(n.children,(function(e){e.waypoints?t.removeConnection(e,{nested:!0}):t.removeShape(e,{nested:!0})}))},ms.prototype.execute=function(e){var t=this._canvas,n=e.shape,i=n.parent;return e.oldParent=i,e.oldParentIndex=Object(Yi.indexOf)(i.children,n),t.removeShape(n),n},ms.prototype.revert=function(e){var t=this._canvas,n=e.shape,i=e.oldParent,r=e.oldParentIndex;return Object(Yi.add)(i.children,n,r),t.addShape(n,i),n},vs.$inject=["modeling"];var bs={x:"y",y:"x"};function gs(e,t){this._layouter=e,this._canvas=t}function ys(){}function xs(e,t,n){var i=ws(e),r=Ss(i,t),o=i[0];return r.length?r[r.length-1]:Zr(o.original||o,n,t)}function Os(e,t,n){var i=ws(e),r=Ss(i,t),o=i[i.length-1];return r.length?r[0]:Zr(o.original||o,n,t)}function js(e,t,n){var i=ws(e),r=_s(t,n),o=i[0];return Zr(o.original||o,r,t)}function Es(e,t,n){var i=ws(e),r=_s(t,n),o=i[i.length-1];return Zr(o.original||o,r,t)}function _s(e,t){return{x:e.x-t.x,y:e.y-t.y,width:e.width,height:e.height}}function ws(e){var t=e.waypoints;if(!t.length)throw new Error("connection#"+e.id+": no waypoints");return t}function Ss(e,t){var n=Object(u.map)(e,Ts);return Object(u.filter)(n,(function(e){return function(e,t){return"intersect"===Object(ie.f)(t,e,1)}(e,t)}))}function Ts(e){return e.original||e}function Ps(){this.allShapes={},this.allConnections={},this.enclosedElements={},this.enclosedConnections={},this.topLevel={}}function Cs(e){this._modeling=e}function As(e){this._helper=new Cs(e)}function Rs(e){this._modeling=e,this._helper=new Cs(e)}function ks(e){this._modeling=e}function Bs(e){return e.original||e}function Ms(e,t){this._modeling=e,this._rules=t}function Ds(e){this._modeling=e}function Ns(e){this._modeling=e}function Ls(e){return Object(u.assign)({},e)}function Is(e){switch(e){case"n":return"y";case"w":return"x";case"s":return"y";case"e":return"x"}}function Fs(e,t,n){var i=Is(n);return/e|s/.test(n)?e[i]>t:/n|w/.test(n)?e[i]<t:void 0}function zs(e,t){return-1!==e.indexOf(t)}function Vs(e){this._modeling=e}function $s(e){this._modeling=e}function Hs(e,t){return Object(Yi.remove)(e&&e.attachers,t)}function Gs(e,t,n){if(e){var i=e.attachers;i||(e.attachers=i=[]),Object(Yi.add)(i,t,n)}}function Ws(){}function qs(e,t,n){this._eventBus=e,this._elementFactory=t,this._commandStack=n;var i=this;e.on("diagram.init",(function(){i.registerHandlers(n)}))}vs.prototype.preExecute=function(e){var t=this._modeling,n=e.groups,i=e.axis,r=e.dimension;function o(e,t){e.range.min=Math.min(t[i],e.range.min),e.range.max=Math.max(t[i]+t[r],e.range.max)}function a(e){return e[i]+e[r]/2}function s(e){return e.length-1}function c(e){return e.max-e.min}var p,l,d=n[0],f=s(n),h=n[f],m=0;Object(u.forEach)(n,(function(e,p){var l,d,h;e.elements.length<2?p&&p!==n.length-1&&(o(e,e.elements[0]),m+=c(e.range)):(d=(l=Object(u.sortBy)(e.elements,i))[0],p===f&&(d=l[s(l)]),h=a(d),e.range=null,Object(u.forEach)(l,(function(n){!function(e,n){var r={y:0};r[i]=e-a(n),r[i]&&(r[bs[i]]=0,t.moveElements([n],r,n.parent))}(h,n),null!==e.range?o(e,n):e.range={min:n[i],max:n[i]+n[r]}})),p&&p!==n.length-1&&(m+=c(e.range)))})),l=Math.abs(h.range.min-d.range.max),(p=Math.round((l-m)/(n.length-1)))<n.length-1||Object(u.forEach)(n,(function(e,o){var a,s={};e!==d&&e!==h&&(a=n[o-1],e.range.max=0,Object(u.forEach)(e.elements,(function(n,o){s[bs[i]]=0,s[i]=a.range.max-n[i]+p,e.range.min!==n[i]&&(s[i]+=n[i]-e.range.min),s[i]&&t.moveElements([n],s,n.parent),e.range.max=Math.max(n[i]+n[r],o?e.range.max:0)})))}))},vs.prototype.postExecute=function(e){},gs.$inject=["layouter","canvas"],gs.prototype.execute=function(e){var t=e.connection,n=t.waypoints;return Object(u.assign)(e,{oldWaypoints:n}),t.waypoints=this._layouter.layoutConnection(t,e.hints),t},gs.prototype.revert=function(e){var t=e.connection;return t.waypoints=e.oldWaypoints,t},ys.prototype.execute=function(e){var t=e.connection,n=e.delta,i=e.newParent||t.parent,r=e.newParentIndex,o=t.parent;return e.oldParent=o,e.oldParentIndex=Object(Yi.remove)(o.children,t),Object(Yi.add)(i.children,t,r),t.parent=i,Object(u.forEach)(t.waypoints,(function(e){e.x+=n.x,e.y+=n.y,e.original&&(e.original.x+=n.x,e.original.y+=n.y)})),t},ys.prototype.revert=function(e){var t=e.connection,n=t.parent,i=e.oldParent,r=e.oldParentIndex,o=e.delta;return Object(Yi.remove)(n.children,t),Object(Yi.add)(i.children,t,r),t.parent=i,Object(u.forEach)(t.waypoints,(function(e){e.x-=o.x,e.y-=o.y,e.original&&(e.original.x-=o.x,e.original.y-=o.y)})),t},Ps.prototype.add=function(e,t){return this.addAll([e],t)},Ps.prototype.addAll=function(e,t){var n=Object(ge.c)(e,!!t,this);return Object(u.assign)(this,n),this},Cs.prototype.moveRecursive=function(e,t,n){return e?this.moveClosure(this.getClosure(e),t,n):[]},Cs.prototype.moveClosure=function(e,t,n,i,r){var o=this._modeling,a=e.allShapes,s=e.allConnections,c=e.enclosedConnections,p=e.topLevel,l=!1;r&&r.parent===n&&(l=!0),Object(u.forEach)(a,(function(e){o.moveShape(e,t,p[e.id]&&!l&&n,{recurse:!1,layout:!1})})),Object(u.forEach)(s,(function(e){var i=!!a[e.source.id],r=!!a[e.target.id];c[e.id]&&i&&r?o.moveConnection(e,t,p[e.id]&&!l&&n):o.layoutConnection(e,{connectionStart:i&&js(e,e.source,t),connectionEnd:r&&Es(e,e.target,t)})}))},Cs.prototype.getClosure=function(e){return(new Ps).addAll(e,!0)},As.$inject=["modeling"],As.prototype.preExecute=function(e){e.closure=this._helper.getClosure(e.shapes)},As.prototype.postExecute=function(e){var t,n=e.hints;n&&n.primaryShape&&(t=n.primaryShape,n.oldParent=t.parent),this._helper.moveClosure(e.closure,e.delta,e.newParent,e.newHost,t)},Rs.$inject=["modeling"],Rs.prototype.execute=function(e){var t=e.shape,n=e.delta,i=e.newParent||t.parent,r=e.newParentIndex,o=t.parent;return e.oldBounds=Object(u.pick)(t,["x","y","width","height"]),e.oldParent=o,e.oldParentIndex=Object(Yi.remove)(o.children,t),Object(Yi.add)(i.children,t,r),Object(u.assign)(t,{parent:i,x:t.x+n.x,y:t.y+n.y}),t},Rs.prototype.postExecute=function(e){var t=e.shape,n=e.delta,i=e.hints,r=this._modeling;!1!==i.layout&&(Object(u.forEach)(t.incoming,(function(e){r.layoutConnection(e,{connectionEnd:Es(e,t,n)})})),Object(u.forEach)(t.outgoing,(function(e){r.layoutConnection(e,{connectionStart:js(e,t,n)})}))),!1!==i.recurse&&this.moveChildren(e)},Rs.prototype.revert=function(e){var t=e.shape,n=e.oldParent,i=e.oldParentIndex,r=e.delta;return Object(Yi.add)(n.children,t,i),Object(u.assign)(t,{parent:n,x:t.x-r.x,y:t.y-r.y}),t},Rs.prototype.moveChildren=function(e){var t=e.delta,n=e.shape;this._helper.moveRecursive(n.children,t,null)},Rs.prototype.getNewParent=function(e){return e.newParent||e.shape.parent},ks.$inject=["modeling"],ks.prototype.execute=function(e){var t=e.newSource,n=e.newTarget,i=e.connection,r=e.dockingOrPoints;if(!t&&!n)throw new Error("newSource or newTarget required");return Object(u.isArray)(r)&&(e.oldWaypoints=i.waypoints,i.waypoints=r),t&&(e.oldSource=i.source,i.source=t),n&&(e.oldTarget=i.target,i.target=n),i},ks.prototype.postExecute=function(e){var t=e.connection,n=e.newSource,i=e.newTarget,r=e.dockingOrPoints,o=e.hints||{},a={};o.connectionStart&&(a.connectionStart=o.connectionStart),o.connectionEnd&&(a.connectionEnd=o.connectionEnd),!1!==o.layoutConnection&&(!n||i&&"source"!==o.docking||(a.connectionStart=a.connectionStart||Bs(Object(u.isArray)(r)?r[0]:r)),!i||n&&"target"!==o.docking||(a.connectionEnd=a.connectionEnd||Bs(Object(u.isArray)(r)?r[r.length-1]:r)),o.newWaypoints&&(a.waypoints=o.newWaypoints),this._modeling.layoutConnection(t,a))},ks.prototype.revert=function(e){var t=e.oldSource,n=e.oldTarget,i=e.oldWaypoints,r=e.connection;return t&&(r.source=t),n&&(r.target=n),i&&(r.waypoints=i),r},Ms.$inject=["modeling","rules"],Ms.prototype.preExecute=function(e){var t,n=this,i=this._modeling,r=this._rules,o=e.oldShape,a=e.newData,s=e.hints||{};function c(e,t,n){return r.allowed("connection.reconnect",{connection:n,source:e,target:t})}var p,l={x:a.x,y:a.y},d={x:o.x,y:o.y,width:o.width,height:o.height};t=e.newShape=e.newShape||n.createShape(a,l,o.parent,s),o.host&&i.updateAttachment(t,o.host),!1!==s.moveChildren&&(p=o.children.slice(),i.moveElements(p,{x:0,y:0},t,s));var f=o.incoming.slice(),h=o.outgoing.slice();Object(u.forEach)(f,(function(e){c(e.source,t,e)&&n.reconnectEnd(e,t,Os(e,t,d),s)})),Object(u.forEach)(h,(function(e){var i=e.target;c(t,i,e)&&n.reconnectStart(e,t,xs(e,t,d),s)}))},Ms.prototype.postExecute=function(e){var t=e.oldShape;this._modeling.removeShape(t)},Ms.prototype.execute=function(e){},Ms.prototype.revert=function(e){},Ms.prototype.createShape=function(e,t,n,i){return this._modeling.createShape(e,t,n,i)},Ms.prototype.reconnectStart=function(e,t,n,i){this._modeling.reconnectStart(e,t,n,i)},Ms.prototype.reconnectEnd=function(e,t,n,i){this._modeling.reconnectEnd(e,t,n,i)},Ds.$inject=["modeling"],Ds.prototype.execute=function(e){var t=e.shape,n=e.newBounds,i=e.minBounds;if(void 0===n.x||void 0===n.y||void 0===n.width||void 0===n.height)throw new Error("newBounds must have {x, y, width, height} properties");if(i&&(n.width<i.width||n.height<i.height))throw new Error("width and height cannot be less than minimum height and width");if(!i&&n.width<10||n.height<10)throw new Error("width and height cannot be less than 10px");return e.oldBounds={width:t.width,height:t.height,x:t.x,y:t.y},Object(u.assign)(t,{width:n.width,height:n.height,x:n.x,y:n.y}),t},Ds.prototype.postExecute=function(e){var t=this._modeling,n=e.shape,i=e.oldBounds;!1!==(e.hints||{}).layout&&(Object(u.forEach)(n.incoming,(function(e){t.layoutConnection(e,{connectionEnd:Os(e,n,i)})})),Object(u.forEach)(n.outgoing,(function(e){t.layoutConnection(e,{connectionStart:xs(e,n,i)})})))},Ds.prototype.revert=function(e){var t=e.shape,n=e.oldBounds;return Object(u.assign)(t,{width:n.width,height:n.height,x:n.x,y:n.y}),t},Ns.$inject=["modeling"],Ns.prototype.preExecute=function(e){var t=e.delta,n=e.direction,i=e.movingShapes,r=e.resizingShapes,o=e.start,a={};this.moveShapes(i,t),Object(u.forEach)(r,(function(e){a[e.id]=function(e){return{x:e.x,y:e.y,height:e.height,width:e.width}}(e)})),this.resizeShapes(r,t,n),this.updateConnectionWaypoints(function(e,t){var n=[];return Object(u.forEach)(e.concat(t),(function(i){var r=i.incoming,o=i.outgoing;Object(u.forEach)(r.concat(o),(function(i){var r=i.source,o=i.target;(Ma(e,r)||Ma(e,o)||Ma(t,r)||Ma(t,o))&&(Ma(n,i)||n.push(i))}))})),n}(i,r),t,n,o,i,r,a)},Ns.prototype.execute=function(){},Ns.prototype.revert=function(){},Ns.prototype.moveShapes=function(e,t){var n=this;Object(u.forEach)(e,(function(e){n._modeling.moveShape(e,t,null,{autoResize:!1,layout:!1,recurse:!1})}))},Ns.prototype.resizeShapes=function(e,t,n){var i=this;Object(u.forEach)(e,(function(e){var r=function(e,t,n){var i=e.x,r=e.y,o=e.width,a=e.height,s=n.x,c=n.y;switch(t){case"n":return{x:i,y:r+c,width:o,height:a-c};case"s":return{x:i,y:r,width:o,height:a+c};case"w":return{x:i+s,y:r,width:o-s,height:a};case"e":return{x:i,y:r,width:o+s,height:a};default:throw new Error("unknown direction: "+t)}}(e,n,t);i._modeling.resizeShape(e,r,null,{attachSupport:!1,autoResize:!1,layout:!1})}))},Ns.prototype.updateConnectionWaypoints=function(e,t,n,i,r,o,a){var s=this,c=r.concat(o);Object(u.forEach)(e,(function(e){var p=e.source,l=e.target,d=function(e){return Object(u.map)(e.waypoints,(function(e){return(e=Ls(e)).original&&(e.original=Ls(e.original)),e}))}(e),f=Is(n),h={labelBehavior:!1};zs(c,p)&&zs(c,l)?(d=Object(u.map)(d,(function(e){return Fs(e,i,n)&&(e[f]=e[f]+t[f]),e.original&&Fs(e.original,i,n)&&(e.original[f]=e.original[f]+t[f]),e})),s._modeling.updateWaypoints(e,d,{labelBehavior:!1})):(zs(c,p)||zs(c,l))&&(zs(r,p)?h.connectionStart=js(e,p,t):zs(r,l)?h.connectionEnd=Es(e,l,t):zs(o,p)?h.connectionStart=xs(e,p,a[p.id]):zs(o,l)&&(h.connectionEnd=Os(e,l,a[l.id])),s._modeling.layoutConnection(e,h))}))},Vs.$inject=["modeling"],Vs.prototype.execute=function(e){var t=e.shape,n=t.children;e.oldChildrenVisibility=function e(t){var n={};return Object(u.forEach)(t,(function(t){n[t.id]=t.hidden,t.children&&(n=Object(u.assign)({},n,e(t.children)))})),n}(n),t.collapsed=!t.collapsed;var i=function e(t,n){var i=[];return Object(u.forEach)(t,(function(t){t.hidden=n,i=i.concat(t),t.children&&(i=i.concat(e(t.children,t.collapsed||n)))})),i}(n,t.collapsed);return[t].concat(i)},Vs.prototype.revert=function(e){var t=e.shape,n=e.oldChildrenVisibility,i=function e(t,n){var i=[];return Object(u.forEach)(t,(function(t){t.hidden=n[t.id],i=i.concat(t),t.children&&(i=i.concat(e(t.children,n)))})),i}(t.children,n);return t.collapsed=!t.collapsed,[t].concat(i)},$s.$inject=["modeling"],$s.prototype.execute=function(e){var t=e.shape,n=e.newHost,i=t.host;return e.oldHost=i,e.attacherIdx=Hs(i,t),Gs(n,t),t.host=n,t},$s.prototype.revert=function(e){var t=e.shape,n=e.newHost,i=e.oldHost,r=e.attacherIdx;return t.host=i,Hs(n,t),Gs(i,t,r),t},Ws.prototype.execute=function(e){var t=e.connection,n=e.newWaypoints;return e.oldWaypoints=t.waypoints,t.waypoints=n,t},Ws.prototype.revert=function(e){var t=e.connection,n=e.oldWaypoints;return t.waypoints=n,t},qs.$inject=["eventBus","elementFactory","commandStack"],qs.prototype.getHandlers=function(){return{"shape.append":is,"shape.create":us,"shape.delete":ms,"shape.move":Rs,"shape.resize":Ds,"shape.replace":Ms,"shape.toggleCollapse":Vs,spaceTool:Ns,"label.create":ps,"connection.create":rs,"connection.delete":fs,"connection.move":ys,"connection.layout":gs,"connection.updateWaypoints":Ws,"connection.reconnect":ks,"elements.create":as,"elements.move":As,"elements.delete":hs,"elements.distribute":vs,"elements.align":ns,"element.updateAttachment":$s}},qs.prototype.registerHandlers=function(e){Object(u.forEach)(this.getHandlers(),(function(t,n){e.registerHandler(n,t)}))},qs.prototype.moveShape=function(e,t,n,i,r){"object"===Object($n.a)(i)&&(r=i,i=null);var o={shape:e,delta:t,newParent:n,newParentIndex:i,hints:r||{}};this._commandStack.execute("shape.move",o)},qs.prototype.updateAttachment=function(e,t){var n={shape:e,newHost:t};this._commandStack.execute("element.updateAttachment",n)},qs.prototype.moveElements=function(e,t,n,i){var r,o=(i=i||{}).attach,a=n;!0===o?(r=n,a=n.parent):!1===o&&(r=null);var s={shapes:e,delta:t,newParent:a,newHost:r,hints:i};this._commandStack.execute("elements.move",s)},qs.prototype.moveConnection=function(e,t,n,i,r){"object"===Object($n.a)(i)&&(r=i,i=void 0);var o={connection:e,delta:t,newParent:n,newParentIndex:i,hints:r||{}};this._commandStack.execute("connection.move",o)},qs.prototype.layoutConnection=function(e,t){var n={connection:e,hints:t||{}};this._commandStack.execute("connection.layout",n)},qs.prototype.createConnection=function(e,t,n,i,r,o){"object"===Object($n.a)(n)&&(o=r,r=i,i=n,n=void 0);var a={source:e,target:t,parent:r,parentIndex:n,connection:i=this._create("connection",i),hints:o};return this._commandStack.execute("connection.create",a),a.connection},qs.prototype.createShape=function(e,t,n,i,r){"number"!=typeof i&&(r=i,i=void 0);var o,a,s=(r=r||{}).attach;e=this._create("shape",e),s?(o=n.parent,a=n):o=n;var c={position:t,shape:e,parent:o,parentIndex:i,host:a,hints:r};return this._commandStack.execute("shape.create",c),c.shape},qs.prototype.createElements=function(e,t,n,i,r){Object(u.isArray)(e)||(e=[e]),"number"!=typeof i&&(r=i,i=void 0);var o={position:t,elements:e,parent:n,parentIndex:i,hints:r=r||{}};return this._commandStack.execute("elements.create",o),o.elements},qs.prototype.createLabel=function(e,t,n,i){n=this._create("label",n);var r={labelTarget:e,position:t,parent:i||e.parent,shape:n};return this._commandStack.execute("label.create",r),r.shape},qs.prototype.appendShape=function(e,t,n,i,r){r=r||{};var o={source:e,position:n,target:i,shape:t=this._create("shape",t),connection:r.connection,connectionParent:r.connectionParent,hints:r};return this._commandStack.execute("shape.append",o),o.shape},qs.prototype.removeElements=function(e){var t={elements:e};this._commandStack.execute("elements.delete",t)},qs.prototype.distributeElements=function(e,t,n){var i={groups:e,axis:t,dimension:n};this._commandStack.execute("elements.distribute",i)},qs.prototype.removeShape=function(e,t){var n={shape:e,hints:t||{}};this._commandStack.execute("shape.delete",n)},qs.prototype.removeConnection=function(e,t){var n={connection:e,hints:t||{}};this._commandStack.execute("connection.delete",n)},qs.prototype.replaceShape=function(e,t,n){var i={oldShape:e,newData:t,hints:n||{}};return this._commandStack.execute("shape.replace",i),i.newShape},qs.prototype.alignElements=function(e,t){var n={elements:e,alignment:t};this._commandStack.execute("elements.align",n)},qs.prototype.resizeShape=function(e,t,n,i){var r={shape:e,newBounds:t,minBounds:n,hints:i};this._commandStack.execute("shape.resize",r)},qs.prototype.createSpace=function(e,t,n,i,r){var o={delta:n,direction:i,movingShapes:e,resizingShapes:t,start:r};this._commandStack.execute("spaceTool",o)},qs.prototype.updateWaypoints=function(e,t,n){var i={connection:e,newWaypoints:t,hints:n||{}};this._commandStack.execute("connection.updateWaypoints",i)},qs.prototype.reconnect=function(e,t,n,i,r){var o={connection:e,newSource:t,newTarget:n,dockingOrPoints:i,hints:r||{}};this._commandStack.execute("connection.reconnect",o)},qs.prototype.reconnectStart=function(e,t,n,i){i||(i={}),this.reconnect(e,t,e.target,n,Object(u.assign)(i,{docking:"source"}))},qs.prototype.reconnectEnd=function(e,t,n,i){i||(i={}),this.reconnect(e,e.source,t,n,Object(u.assign)(i,{docking:"target"}))},qs.prototype.connect=function(e,t,n,i){return this.createConnection(e,t,n||{},e.parent,i)},qs.prototype._create=function(e,t){return t instanceof Xa.a?t:this._elementFactory.create(e,t)},qs.prototype.toggleCollapse=function(e,t){var n={shape:e,hints:t||{}};this._commandStack.execute("shape.toggleCollapse",n)};var Us="id",Ks={width:0,height:0};function Ys(e,t,n,i,r){this._elementRegistry=e,this._moddle=t,this._translate=n,this._modeling=i,this._textRenderer=r}function Xs(e,t){return Us in e&&e.id!==t.id}function Js(e,t){Object(u.forEach)(t,(function(t,n){"di"!==n?e.set(n,t):e.di&&function(e,t){Object(u.forEach)(t,(function(t,n){e.set(n,t)}))}(e.di,t)}))}Ys.$inject=["elementRegistry","moddle","translate","modeling","textRenderer"],Ys.prototype.execute=function(e){var t=e.element,n=[t],i=this._translate;if(!t)throw new Error(i("element required"));var r=this._elementRegistry,o=this._moddle.ids,a=t.businessObject,s=function(e){var t=Object(u.assign)({},e);return Zs.forEach((function(n){n in e&&(t[n]=Object(de.getBusinessObject)(t[n]))})),t}(e.properties),c=e.oldProperties||function(e,t){var n=Object(u.keys)(t);return Object(u.reduce)(n,(function(n,i){return n[i]="di"!==i?e.get(i):function(e,t){return Object(u.reduce)(t,(function(t,n){return t[n]=e.get(n),t}),{})}(e.di,Object(u.keys)(t.di)),n}),{})}(a,s);return Xs(s,a)&&(o.unclaim(a.id),r.updateId(t,s.id),o.claim(s.id,a)),"default"in s&&(s.default&&n.push(r.get(s.default.id)),a.default&&n.push(r.get(a.default.id))),Js(a,s),e.oldProperties=c,e.changed=n,n},Ys.prototype.postExecute=function(e){var t=e.element.label,n=t&&Object(de.getBusinessObject)(t).name;if(n){var i=this._textRenderer.getExternalLabelBounds(t,n);this._modeling.resizeShape(t,i,Ks)}},Ys.prototype.revert=function(e){var t=e.element,n=e.properties,i=e.oldProperties,r=t.businessObject,o=this._elementRegistry,a=this._moddle.ids;return Js(r,i),Xs(n,r)&&(a.unclaim(n.id),o.updateId(t,i.id),a.claim(i.id,r)),e.changed};var Zs=["default"];function Qs(e,t){this._canvas=e,this._modeling=t}function ec(e,t){this._modeling=e,this._spaceTool=t}function tc(e,t){this._modeling=e,this._translate=t}function nc(e,t){this._modeling=e,this._spaceTool=t}Qs.$inject=["canvas","modeling"],Qs.prototype.execute=function(e){var t=this._canvas,n=e.newRoot,i=n.businessObject,r=t.getRootElement(),o=r.businessObject,a=o.$parent,s=o.di;t.setRootElement(n,!0),Object(Yi.add)(a.rootElements,i),i.$parent=a,Object(Yi.remove)(a.rootElements,o),o.$parent=null,o.di=null,s.bpmnElement=i,i.di=s,e.oldRoot=r},Qs.prototype.revert=function(e){var t=this._canvas,n=e.newRoot.businessObject,i=e.oldRoot,r=i.businessObject,o=n.$parent,a=n.di;t.setRootElement(i,!0),Object(Yi.remove)(o.rootElements,n),n.$parent=null,Object(Yi.add)(o.rootElements,r),r.$parent=o,n.di=null,a.bpmnElement=r,r.di=a},ec.$inject=["modeling","spaceTool"],ec.prototype.preExecute=function(e){var t=this._spaceTool,n=this._modeling,i=e.shape,r=e.location,o=ei(i),a=o===i,s=a?i:i.parent;Qn(s).length||n.createShape({type:"bpmn:Lane"},{x:i.x+30,y:i.y,width:i.width-30,height:i.height},s);var c=[];Object(ge.a)(o,(function(e){return c.push(e),e.label&&c.push(e.label),e===i?[]:Object(u.filter)(e.children,(function(e){return e!==i}))}));var p="top"===r?-120:120,l="top"===r?i.y:i.y+i.height,d=l+("top"===r?10:-10),f="top"===r?"n":"s",h=t.calculateAdjustments(c,"y",p,d);t.makeSpace(h.movingShapes,h.resizingShapes,{x:0,y:p},f,d),e.newLane=n.createShape({type:"bpmn:Lane"},{x:i.x+(a?30:0),y:l-("top"===r?120:0),width:i.width-(a?30:0),height:120},s)},tc.$inject=["modeling","translate"],tc.prototype.preExecute=function(e){var t=this._modeling,n=this._translate,i=e.shape,r=e.count,o=Qn(i),a=o.length;if(a>r)throw new Error(n("more than {count} child lanes",{count:r}));var s,c,u,p,l,d=Math.round(i.height/r);for(l=0;l<r;l++)s=i.y+l*d,c=l===r-1?i.height-d*l:d,u={x:i.x+30,y:s,width:i.width-30,height:c},l<a?t.resizeShape(o[l],u):(p={type:"bpmn:Lane"},t.createShape(p,u,i))},nc.$inject=["modeling","spaceTool"],nc.prototype.preExecute=function(e){var t=e.shape,n=e.newBounds;!1!==e.balanced?this.resizeBalanced(t,n):this.resizeSpace(t,n)},nc.prototype.resizeBalanced=function(e,t){var n=this._modeling,i=ti(e,t);n.resizeShape(e,t),i.forEach((function(e){n.resizeShape(e.shape,e.newBounds)}))},nc.prototype.resizeSpace=function(e,t){var n,i,r,o,a,s=this._spaceTool,c=Object(ie.b)(e),u=Wn(Object(ie.b)(t),c),p=ei(e),l=[],d=[];Object(ge.a)(p,(function(e){return l.push(e),(Object(de.is)(e,"bpmn:Lane")||Object(de.is)(e,"bpmn:Participant"))&&d.push(e),e.children})),(u.bottom||u.top)&&(n=u.bottom||u.top,i=e.y+(u.bottom?e.height:0)+(u.bottom?-10:10),r=u.bottom?"s":"n",o=u.top>0||u.bottom<0?-n:n,a=s.calculateAdjustments(l,"y",o,i),s.makeSpace(a.movingShapes,a.resizingShapes,{x:0,y:n},r)),(u.left||u.right)&&(n=u.right||u.left,i=e.x+(u.right?e.width:0)+(u.right?-10:100),r=u.right?"e":"w",o=u.left>0||u.right<0?-n:n,a=s.calculateAdjustments(d,"x",o,i),s.makeSpace(a.movingShapes,a.resizingShapes,{x:n,y:0},r))};function ic(e){this._elementRegistry=e}function rc(e){this._moddle=e}ic.$inject=["elementRegistry"],ic.prototype.computeUpdates=function(e,t){var n=[],i=[],r={},o=[];function a(e){-1===n.indexOf(e)&&(o.push(e),n.push(e))}function s(e){return e.parent?function(e){var t=ei(e);return r[t.id]||(r[t.id]=Zn(t)),r[t.id]}(e).filter((function(t){return n=e,i=t,r=Object(ie.b)(i),o=n.x+n.width/2,a=n.y+n.height/2,o>r.left&&o<r.right&&a>r.top&&a<r.bottom;var n,i,r,o,a})).map((function(e){return e.businessObject})):[]}return t.forEach((function(e){var t=ei(e);t&&-1===n.indexOf(t)&&(t.children.filter((function(e){return Object(de.is)(e,"bpmn:FlowNode")})).forEach(a),n.push(t))})),e.forEach(a),o.forEach((function(e){var t=e.businessObject,n=t.get("lanes").slice(),r=s(e);i.push({flowNode:t,remove:n,add:r})})),t.forEach((function(e){var t=e.businessObject;e.parent||t.get("flowNodeRef").forEach((function(e){i.push({flowNode:e,remove:[t],add:[]})}))})),i},ic.prototype.execute=function(e){var t=e.updates;t||(t=e.updates=this.computeUpdates(e.flowNodeShapes,e.laneShapes)),t.forEach((function(e){var t=e.flowNode,n=t.get("lanes");e.remove.forEach((function(e){Object(Yi.remove)(n,e),Object(Yi.remove)(e.get("flowNodeRef"),t)})),e.add.forEach((function(e){Object(Yi.add)(n,e),Object(Yi.add)(e.get("flowNodeRef"),t)}))}))},ic.prototype.revert=function(e){e.updates.forEach((function(e){var t=e.flowNode,n=t.get("lanes");e.add.forEach((function(e){Object(Yi.remove)(n,e),Object(Yi.remove)(e.get("flowNodeRef"),t)})),e.remove.forEach((function(e){Object(Yi.add)(n,e),Object(Yi.add)(e.get("flowNodeRef"),t)}))}))},rc.$inject=["moddle"],rc.prototype.execute=function(e){var t=this._moddle.ids,n=e.id,i=e.element;e.claiming?t.claim(n,i):t.unclaim(n)},rc.prototype.revert=function(e){var t=this._moddle.ids,n=e.id,i=e.element;e.claiming?t.unclaim(n):t.claim(n,i)};n(543);var oc={fill:void 0,stroke:void 0};function ac(e){this._commandStack=e}ac.$inject=["commandStack"],ac.prototype.postExecute=function(e){var t=e.elements,n=e.colors||oc,i=this,r={};"fill"in n&&Object(u.assign)(r,{fill:n.fill}),"stroke"in n&&Object(u.assign)(r,{stroke:n.stroke}),Object(u.forEach)(t,(function(e){i._commandStack.execute("element.updateProperties",{element:e,properties:{di:r}})}))};var sc={width:0,height:0};function cc(e,t){function n(e,t){var n=e.label||e,i=e.labelTarget||e;return Object(Ki.b)(n,t,i!==n),[n,i]}this.preExecute=function(t){var n=t.element,i=n.businessObject,r=t.newLabel;if(!Object(Ji.e)(n)&&Object(Ji.f)(n)&&!Object(Ji.d)(n)&&!uc(r)){var o=Object(Ji.c)(n);o={x:o.x,y:o.y+7},e.createLabel(n,o,{id:i.id+"_label",businessObject:i})}},this.execute=function(e){return e.oldLabel=Object(Ki.a)(e.element),n(e.element,e.newLabel)},this.revert=function(e){return n(e.element,e.oldLabel)},this.postExecute=function(n){var i=n.element,r=i.label||i,o=n.newLabel,a=n.newBounds,s=n.hints||{};if(Object(Ji.e)(r)||Object(de.is)(r,"bpmn:TextAnnotation"))if(Object(Ji.e)(r)&&uc(o))!1!==s.removeShape&&e.removeShape(r,{unsetLabel:!1});else{var c=Object(Ki.a)(r);void 0===a&&(a=t.getExternalLabelBounds(r,c)),a&&e.resizeShape(r,a,sc)}}}function uc(e){return!e||!e.trim()}function pc(e,t,n,i){qs.call(this,e,t,n),this._bpmnRules=i}function lc(){}cc.$inject=["modeling","textRenderer"],r()(pc,qs),pc.$inject=["eventBus","elementFactory","commandStack","bpmnRules"],pc.prototype.getHandlers=function(){var e=qs.prototype.getHandlers.call(this);return e["element.updateProperties"]=Ys,e["canvas.updateRoot"]=Qs,e["lane.add"]=ec,e["lane.resize"]=nc,e["lane.split"]=tc,e["lane.updateRefs"]=ic,e["id.updateClaim"]=rc,e["element.setColor"]=ac,e["element.updateLabel"]=cc,e},pc.prototype.updateLabel=function(e,t,n,i){this._commandStack.execute("element.updateLabel",{element:e,newLabel:t,newBounds:n,hints:i||{}})},pc.prototype.connect=function(e,t,n,i){var r=this._bpmnRules;if(n||(n=r.canConnect(e,t)),n)return this.createConnection(e,t,n,e.parent,i)},pc.prototype.updateProperties=function(e,t){this._commandStack.execute("element.updateProperties",{element:e,properties:t})},pc.prototype.resizeLane=function(e,t,n){this._commandStack.execute("lane.resize",{shape:e,newBounds:t,balanced:n})},pc.prototype.addLane=function(e,t){var n={shape:e,location:t};return this._commandStack.execute("lane.add",n),n.newLane},pc.prototype.splitLane=function(e,t){this._commandStack.execute("lane.split",{shape:e,count:t})},pc.prototype.makeCollaboration=function(){var e=this._create("root",{type:"bpmn:Collaboration"}),t={newRoot:e};return this._commandStack.execute("canvas.updateRoot",t),e},pc.prototype.updateLaneRefs=function(e,t){this._commandStack.execute("lane.updateRefs",{flowNodeShapes:e,laneShapes:t})},pc.prototype.makeProcess=function(){var e={newRoot:this._create("root",{type:"bpmn:Process"})};this._commandStack.execute("canvas.updateRoot",e)},pc.prototype.claimId=function(e,t){this._commandStack.execute("id.updateClaim",{id:e,element:t,claiming:!0})},pc.prototype.unclaimId=function(e,t){this._commandStack.execute("id.updateClaim",{id:e,element:t})},pc.prototype.setColor=function(e,t){e.length||(e=[e]),this._commandStack.execute("element.setColor",{elements:e,colors:t})},lc.prototype.layoutConnection=function(e,t){return[(t=t||{}).connectionStart||Object(ie.e)(t.source||e.source),t.connectionEnd||Object(ie.e)(t.target||e.target)]};var dc=Math.round,fc={"h:h":20,"v:v":20,"h:v":-10,"v:h":-10};function hc(e,t,n){var i,r,o,a=Object(ie.f)(t,e,5),s=n.split(":")[0],c=dc((t.x-e.x)/2+e.x),u=dc((t.y-e.y)/2+e.y),p=(o=a,{t:/top/,r:/right/,b:/bottom/,l:/left/,h:/left|right/,v:/top|bottom/}[s].test(o)),l=/h|r|l/.test(s),d=!1;return p?(i=l?{x:c,y:e.y}:{x:e.x,y:u},r=l?"h:h":"v:v"):(r=l?"h:v":"v:h",function(e,t){return!{t:/top/,r:/right/,b:/bottom/,l:/left/,h:/./,v:/./}[t].test(e)}(a,s)?l?(d=u===e.y,i={x:e.x+20*(/l/.test(s)?-1:1),y:d?u+20:u}):i={x:(d=c===e.x)?c+20:c,y:e.y+20*(/t/.test(s)?-1:1)}:i={x:c,y:u}),{waypoints:vc(e,i,r).concat(i),directions:r,turnNextDirections:d}}function mc(e){return e.split(":").reverse().join(":")}function vc(e,t,n){if(!function(e){return e&&/^h|v|t|r|b|l:h|v|t|r|b|l$/.test(e)}(n=n||"h:h"))throw new Error("unknown directions: <"+n+">: must be specified as <start>:<end> with start/end in { h,v,t,r,b,l }");if(Oc(n)){var i=function(e,t,n){return hc(e,t,n)}(e,t,n),r=function(e,t,n){var i=hc(t,e,mc(n));return{waypoints:i.waypoints.slice().reverse(),directions:mc(i.directions),turnNextDirections:i.turnNextDirections}}(e,t,n),o=function(e,t){var n=e.directions.split(":")[1],i=t.directions.split(":")[0];e.turnNextDirections&&(n="h"==n?"v":"h"),t.turnNextDirections&&(i="h"==i?"v":"h");var r=n+":"+i;return{waypoints:vc(e.waypoints[e.waypoints.length-1],t.waypoints[0],r),directions:r}}(i,r);return[].concat(i.waypoints,o.waypoints,r.waypoints)}return function(e,t,n){var i=dc((t.x-e.x)/2+e.x),r=dc((t.y-e.y)/2+e.y);if("h:v"===n)return[{x:t.x,y:e.y}];if("v:h"===n)return[{x:e.x,y:t.y}];if("h:h"===n)return[{x:i,y:e.y},{x:i,y:t.y}];if("v:v"===n)return[{x:e.x,y:r},{x:t.x,y:r}];throw new Error("invalid directions: can only handle varians of [hv]:[hv]")}(e,t,n)}function bc(e,t,n,i,r){var o=r&&r.preferredLayouts||[],a=Object(u.without)(o,"straight")[0]||"h:h",s=fc[a]||0,c=Object(ie.f)(e,t,s),p=function(e,t){if(Oc(t))return t;switch(e){case"intersect":return"t:t";case"top":case"bottom":return"v:v";case"left":case"right":return"h:h";default:return t}}(c,a);n=n||Object(ie.e)(e),i=i||Object(ie.e)(t);var l=p.split(":");return function(e,t,n){var i=vc(e,t,n);return i.unshift(e),i.push(t),Ec(i)}(jc(n,e,l[0],function(e){return{top:"bottom",bottom:"top",left:"right",right:"left","top-left":"bottom-right","bottom-right":"top-left","top-right":"bottom-left","bottom-left":"top-right"}[e]}(c)),jc(i,t,l[1],c),p)}function gc(e,t,n,i,r,o){var a;return Object(u.isArray)(n)&&(r=n,o=i,n=Object(ie.e)(e),i=Object(ie.e)(t)),r=r||[],(a=-1!==(o=Object(u.assign)({preferredLayouts:[]},o)).preferredLayouts.indexOf("straight")&&function(e,t,n,i,r){var o,a,s={};if(a=Object(ie.f)(e,t),!/^(top|bottom|left|right)$/.test(a))return null;/top|bottom/.test(a)&&(o="x");/left|right/.test(a)&&(o="y");return"target"===r.preserveDocking?yc(o,i,e)?(s[o]=i[o],[{x:void 0!==s.x?s.x:n.x,y:void 0!==s.y?s.y:n.y,original:{x:void 0!==s.x?s.x:n.x,y:void 0!==s.y?s.y:n.y}},{x:i.x,y:i.y}]):null:yc(o,n,t)?(s[o]=n[o],[{x:n.x,y:n.y},{x:void 0!==s.x?s.x:i.x,y:void 0!==s.y?s.y:i.y,original:{x:void 0!==s.x?s.x:i.x,y:void 0!==s.y?s.y:i.y}}]):null}(e,t,n,i,o))||(a=o.connectionEnd&&function(e,t,n,i){var r=i.slice().reverse();return(r=xc(e,t,n,r))?r.reverse():null}(t,e,i,r))?a:(a=o.connectionStart&&xc(e,t,n,r))||(!o.connectionStart&&!o.connectionEnd&&r&&r.length?r:bc(e,t,n,i,o))}function yc(e,t,n){return function(e,t,n){return e>=t&&e<=n}(t[e],n[e],n[e]+n[{x:"width",y:"height"}[e]])}function xc(e,t,n,i){if(function(e){return e.length<3||!(e.length>4)&&!!Object(u.find)(e,(function(t,n){var i=e[n-1];return i&&Object(Ie.b)(t,i)<3}))}(i))return null;var r,o=i[0],a=i.slice();return a[0]=n,a[1]=function(e,t,n){switch(Object(Ie.d)(t,e)){case"v":return{x:n.x,y:e.y};case"h":return{x:e.x,y:n.y}}return{x:e.x,y:e.y}}(a[1],o,n),(r=function(e,t,n){var i;for(i=e.length-2;0!==i;i--)if(Object(Ie.c)(e[i],t,20)||Object(Ie.c)(e[i],n,20))return e.slice(i);return e}(a,e,t))!==a&&(a=xc(e,t,n,r)),a&&Object(Ie.d)(a)?null:a}function Oc(e){return e&&/t|r|b|l/.test(e)}function jc(e,t,n,i){if("h"===n&&(n=/left/.test(i)?"l":"r"),"v"===n&&(n=/top/.test(i)?"t":"b"),"t"===n)return{original:e,x:e.x,y:t.y};if("r"===n)return{original:e,x:t.x+t.width,y:e.y};if("b"===n)return{original:e,x:e.x,y:t.y+t.height};if("l"===n)return{original:e,x:t.x,y:e.y};throw new Error("unexpected dockingDirection: <"+n+">")}function Ec(e){return e.reduce((function(t,n,i){var r=t[t.length-1],o=e[i+1];return Object(Ie.e)(r,o,n,0)||t.push(n),t}),[])}var _c={top:"bottom","top-right":"bottom-left","top-left":"bottom-right",right:"left",bottom:"top","bottom-right":"top-left","bottom-left":"top-right",left:"right"},wc={top:"t",right:"r",bottom:"b",left:"l"};function Sc(){}function Tc(e,t){return Object(de.is)(t,"bpmn:Participant")?"source":Object(de.is)(e,"bpmn:Participant")?"target":Rc(t)?"source":Rc(e)||Object(de.is)(t,"bpmn:Event")?"target":Object(de.is)(e,"bpmn:Event")?"source":null}function Pc(e){return Rc(e)?"target":"source"}function Cc(e,t){return e?e.original||e:Object(ie.e)(t)}function Ac(e,t){return Object(de.is)(t,"bpmn:Activity")&&Object(de.is)(e,"bpmn:BoundaryEvent")&&t.businessObject.isForCompensation}function Rc(e){return Object(de.is)(e,"bpmn:SubProcess")&&Object(On.isExpanded)(e)}function kc(e,t){return e===t}function Bc(e){var t=/right|left/.exec(e);return t&&t[0]}function Mc(e){var t=/top|bottom/.exec(e);return t&&t[0]}function Dc(e){return"right"===e||"left"===e}function Nc(e,t){var n=t.waypoints,i=n&&n.length&&Object(ie.f)(n[0],e);return"top"===i?["t:r"]:"right"===i?["r:b"]:"left"===i?["l:t"]:["b:l"]}function Lc(e,t,n){var i,r,o=Object(ie.e)(e),a=Object(ie.e)(t),s=(r=(i=e).host,Object(ie.f)(Object(ie.e)(i),r,-10)),c=kc(e.host,t),u=-1!==["top","right","bottom","left"].indexOf(s),p=Object(ie.f)(a,o,{x:e.width/2+t.width/2,y:e.height/2+t.height/2});return c?function(e,t,n,i,r){var o,a=t?e:Mc(e),s=wc[a];o=t?Dc(e)?Ic("y",n,i,r)?"h":"b":Ic("x",n,i,r)?"v":"l":"v";return[s+":"+o]}(s,u,e,t,n):[function(e,t,n){if(n)return wc[e];if(kc(Mc(e),Mc(t))||(i=Bc(e),r=Bc(t),_c[i]===r))return wc[Mc(e)];var i,r;return wc[Bc(e)]}(s,p,u)+":"+function(e,t,n){if(n)return Dc(e)?(i=t,r=Bc(e),o=_c[r],-1!==i.indexOf(o)||kc(e,t)?"h":"v"):function(e,t){var n=Mc(e),i=_c[n];return-1!==t.indexOf(i)}(e,t)||kc(e,t)?"v":"h";var i,r,o;return Dc(t)||kc(Mc(e),Mc(t))&&Bc(t)?"h":"v"}(s,p,u)]}function Ic(e,t,n,i){return!(Fc(e,i,n,40)||Fc(e,i,{x:n.x+n.width,y:n.y+n.height},40)||Fc(e,i,Object(ie.e)(t),40))}function Fc(e,t,n,i){return Math.abs(t[e]-n[e])<i}function zc(e){return Object(u.assign)({original:e.point.original||e.point},e.actual)}function Vc(e,t){this._elementRegistry=e,this._graphicsFactory=t}r()(Sc,lc),Sc.prototype.layoutConnection=function(e,t){t||(t={});var n,i,r=t.source||e.source,o=t.target||e.target,a=t.waypoints||e.waypoints,s=t.connectionStart,c=t.connectionEnd;return s||(s=Cc(a&&a[0],r)),c||(c=Cc(a&&a[a.length-1],o)),(Object(de.is)(e,"bpmn:Association")||Object(de.is)(e,"bpmn:DataAssociation"))&&a&&!Ac(r,o)?[].concat([s],a.slice(1,-1),[c]):(Object(de.is)(e,"bpmn:MessageFlow")?n=function(e,t){return{preferredLayouts:["straight","v:v"],preserveDocking:Tc(e,t)}}(r,o):(Object(de.is)(e,"bpmn:SequenceFlow")||Ac(r,o))&&(n=r===o?{preferredLayouts:Nc(r,e)}:Object(de.is)(r,"bpmn:BoundaryEvent")?{preferredLayouts:Lc(r,o,c)}:Rc(r)||Rc(o)?function(e){return{preferredLayouts:["straight","h:h"],preserveDocking:Pc(e)}}(r):Object(de.is)(r,"bpmn:Gateway")?{preferredLayouts:["v:h"]}:Object(de.is)(o,"bpmn:Gateway")?{preferredLayouts:["h:v"]}:{preferredLayouts:["h:h"]}),n&&(i=Ec(gc(r,o,s,c,a,n=Object(u.assign)(n,t)))),i||[s,c])},Vc.$inject=["elementRegistry","graphicsFactory"],Vc.prototype.getCroppedWaypoints=function(e,t,n){t=t||e.source,n=n||e.target;var i=this.getDockingPoint(e,t,!0),r=this.getDockingPoint(e,n),o=e.waypoints.slice(i.idx+1,r.idx);return o.unshift(zc(i)),o.push(zc(r)),o},Vc.prototype.getDockingPoint=function(e,t,n){var i,r,o=e.waypoints;return{point:r=o[i=n?0:o.length-1],actual:this._getIntersection(t,e,n)||r,idx:i}},Vc.prototype._getIntersection=function(e,t,n){var i=this._getShapePath(e),r=this._getConnectionPath(t);return Object(ie.d)(i,r,n)},Vc.prototype._getConnectionPath=function(e){return this._graphicsFactory.getConnectionPath(e)},Vc.prototype._getShapePath=function(e){return this._graphicsFactory.getShapePath(e)},Vc.prototype._getGfx=function(e){return this._elementRegistry.getGraphics(e)};var $c={__init__:["modeling","bpmnUpdater"],__depends__:[Ro,la,ha,ga,Sn,xa,_a,Pa,Ra,Pe.a,zi,Ka],bpmnFactory:["type",Ya],bpmnUpdater:["type",Ja],elementFactory:["type",es],modeling:["type",pc],layouter:["type",Sc],connectionDocking:["type",Vc]},Hc=n(913),Gc=Math.round;function Wc(e,t,n,i,r){function o(e,t,n,i){return r.allowed("elements.move",{shapes:e,delta:t,position:n,target:i})}function a(e,n,i,r){if(Object(u.isObject)(i)&&(r=i,i=!1),!n.waypoints&&n.parent){var o=function(e){return{x:e.x+Gc(e.width/2),y:e.y+Gc(e.height/2)}}(n);return t.init(e,o,"shape.move",{cursor:"grabbing",autoActivate:i,data:{shape:n,context:r||{}}}),!0}}e.on("shape.move.start",1500,(function(e){var t,n,r=e.context,o=e.shape,a=i.get().slice();-1===a.indexOf(o)&&(a=[o]),t=a,n=Object(u.groupBy)(t,"id"),a=Object(u.filter)(t,(function(e){for(;e=e.parent;)if(n[e.id])return!1;return!0})),Object(u.assign)(r,{shapes:a,validatedShapes:a,shape:o})})),e.on("shape.move.start",1250,(function(e){var t=e.context,n=t.validatedShapes;if(!(t.canExecute=o(n)))return!1})),e.on("shape.move.move",500,(function(e){var t,n=e.context,i=n.validatedShapes,r=e.hover,a={x:e.dx,y:e.dy};t=o(i,a,{x:e.x,y:e.y},r),n.delta=a,n.canExecute=t,n.target=null!==t?r:null})),e.on("shape.move.end",(function(e){var t=e.context,i=t.delta,r=t.canExecute,o="attach"===r,a=t.shapes;if(!1===r)return!1;i.x=Gc(i.x),i.y=Gc(i.y),0===i.x&&0===i.y||n.moveElements(a,i,t.target,{primaryShape:t.shape,attach:o})})),e.on("element.mousedown",(function(e){var t=Object(A.a)(e);if(!t)throw new Error("must supply DOM mousedown event");return a(t,e.element)})),this.start=a}Wc.$inject=["eventBus","dragging","modeling","selection","rules"];var qc="drop-ok",Uc="drop-not-ok",Kc="new-parent",Yc="attach-ok";function Xc(e,t,n,i){function r(e){return function(e){return Object(u.filter)(e,(function(t){return!function(e){return e.waypoints}(t)||Object(u.find)(e,Object(u.matchPattern)({id:t.source.id}))&&Object(u.find)(e,Object(u.matchPattern)({id:t.target.id}))}))}(o(e))}function o(e){var t=Object(ge.h)(e,!0),n=Object(u.map)(t,(function(e){return(e.incoming||[]).concat(e.outgoing||[])}));return Object(u.flatten)(t.concat(n))}function a(e,n){[Yc,qc,Uc,Kc].forEach((function(i){i===n?t.addMarker(e,i):t.removeMarker(e,i)}))}e.on("shape.move.start",499,(function(e){var a,s=e.context,c=s.shapes,p=s.allDraggedElements,l=r(c);if(!s.dragGroup){var d=Object(K.f)("g");Object(K.b)(d,n.cls("djs-drag-group",["no-events"]));var f=t.getDefaultLayer();Object(K.a)(f,d),s.dragGroup=d}l.forEach((function(e){i.addDragger(e,s.dragGroup)})),p=p?Object(u.flatten)([p,o(c)]):o(c),Object(u.forEach)(p,(function(e){t.addMarker(e,"djs-dragging")})),s.allDraggedElements=p,s.differentParents=(a=c,1!==Object(u.size)(Object(u.groupBy)(a,(function(e){return e.parent&&e.parent.id}))))})),e.on("shape.move.move",499,(function(e){var t=e.context,n=t.dragGroup,i=t.target,r=t.shape.parent,o=t.canExecute;i&&("attach"===o?a(i,Yc):t.canExecute&&i&&i.id!==r.id?a(i,Kc):a(i,t.canExecute?qc:Uc)),Object(Fe.c)(n,e.dx,e.dy)})),e.on(["shape.move.out","shape.move.cleanup"],(function(e){var t=e.context.target;t&&a(t,null)})),e.on("shape.move.cleanup",(function(e){var n=e.context,i=n.allDraggedElements,r=n.dragGroup;Object(u.forEach)(i,(function(e){t.removeMarker(e,"djs-dragging")})),r&&Object(K.j)(r)})),this.makeDraggable=function(e,n,r){i.addDragger(n,e.dragGroup),r&&t.addMarker(n,"djs-dragging"),e.allDraggedElements?e.allDraggedElements.push(n):e.allDraggedElements=[n]}}Xc.$inject=["eventBus","canvas","styles","previewSupport"];var Jc={__depends__:[z.a,Pe.a,Hc.a,Le,ke,zt],__init__:["move","movePreview"],move:["type",Wc],movePreview:["type",Xc]};function Zc(e,t){this._eventBus=e,this._canvas=t;var n=this;e.on("tool-manager.update",(function(e){var t=e.tool;n.updateToolHighlight(t)})),e.on("i18n.changed",(function(){n._update()})),e.on("diagram.init",(function(){n._diagramInitialized=!0,n._rebuild()}))}function Qc(e,t){var n=t.getPaletteEntries();return Object(u.isFunction)(n)?n(e):(Object(u.forEach)(n,(function(t,n){e[n]=t})),e)}Zc.$inject=["eventBus","canvas"],Zc.prototype.registerProvider=function(e,t){t||(t=e,e=1e3),this._eventBus.on("palette.getProviders",e,(function(e){e.providers.push(t)})),this._rebuild()},Zc.prototype.getEntries=function(){return this._getProviders().reduce(Qc,{})},Zc.prototype._rebuild=function(){this._diagramInitialized&&(this._getProviders().length&&(this._container||this._init(),this._update()))},Zc.prototype._init=function(){var e=this,t=this._eventBus,n=this._getParentContainer(),i=this._container=Object(p.domify)(Zc.HTML_MARKUP);n.appendChild(i),p.delegate.bind(i,".djs-palette-toggle, .entry","click",(function(t){var n=t.delegateTarget;if(Object(p.matches)(n,".djs-palette-toggle"))return e.toggle();e.trigger("click",t)})),p.event.bind(i,"mousedown",(function(e){e.stopPropagation()})),p.delegate.bind(i,".entry","dragstart",(function(t){e.trigger("dragstart",t)})),t.on("canvas.resized",this._layoutChanged,this),t.fire("palette.create",{container:i})},Zc.prototype._getProviders=function(e){var t=this._eventBus.createEvent({type:"palette.getProviders",providers:[]});return this._eventBus.fire(t),t.providers},Zc.prototype._toggleState=function(e){e=e||{};var t,n=this._getParentContainer(),i=this._container,r=this._eventBus,o=Object(p.classes)(i);t="twoColumn"in e?e.twoColumn:this._needsCollapse(n.clientHeight,this._entries||{}),o.toggle("two-column",t),"open"in e&&o.toggle("open",e.open),r.fire("palette.changed",{twoColumn:t,open:this.isOpen()})},Zc.prototype._update=function(){var e=Object(p.query)(".djs-palette-entries",this._container),t=this._entries=this.getEntries();Object(p.clear)(e),Object(u.forEach)(t,(function(t,n){var i=t.group||"default",r=Object(p.query)("[data-group="+i+"]",e);r||(r=Object(p.domify)('<div class="group" data-group="'+i+'"></div>'),e.appendChild(r));var o,a,s,c=t.html||(t.separator?'<hr class="separator" />':'<div class="entry" draggable="true"></div>'),l=Object(p.domify)(c);r.appendChild(l),t.separator||(Object(p.attr)(l,"data-action",n),t.title&&Object(p.attr)(l,"title",t.title),t.className&&(o=l,a=t.className,s=Object(p.classes)(o),(Object(u.isArray)(a)?a:a.split(/\s+/g)).forEach((function(e){s.add(e)}))),t.imageUrl&&l.appendChild(Object(p.domify)('<img src="'+t.imageUrl+'">')))})),this.open()},Zc.prototype.trigger=function(e,t,n){var i,r,o,a=this._entries,s=t.delegateTarget||t.target;if(!s)return t.preventDefault();(i=a[Object(p.attr)(s,"data-action")])&&(r=i.action,o=t.originalEvent||t,Object(u.isFunction)(r)?"click"===e&&r(o,n):r[e]&&r[e](o,n),t.preventDefault())},Zc.prototype._layoutChanged=function(){this._toggleState({})},Zc.prototype._needsCollapse=function(e,t){return e<46*Object.keys(t).length+50},Zc.prototype.close=function(){this._toggleState({open:!1,twoColumn:!1})},Zc.prototype.open=function(){this._toggleState({open:!0})},Zc.prototype.toggle=function(e){this.isOpen()?this.close():this.open()},Zc.prototype.isActiveTool=function(e){return e&&this._activeTool===e},Zc.prototype.updateToolHighlight=function(e){var t,n;this._toolsContainer||(t=Object(p.query)(".djs-palette-entries",this._container),this._toolsContainer=Object(p.query)("[data-group=tools]",t)),n=this._toolsContainer,Object(u.forEach)(n.children,(function(t){var n=t.getAttribute("data-action");if(n){var i=Object(p.classes)(t);n=n.replace("-tool",""),i.contains("entry")&&n===e?i.add("highlighted-entry"):i.remove("highlighted-entry")}}))},Zc.prototype.isOpen=function(){return Object(p.classes)(this._container).has("open")},Zc.prototype._getParentContainer=function(){return this._canvas.getContainer()},Zc.HTML_MARKUP='<div class="djs-palette"><div class="djs-palette-entries"></div><div class="djs-palette-toggle"></div></div>';var eu={__init__:["palette"],palette:["type",Zc]};function tu(e,t,n,i,r,o){this._selection=r,this._dragging=n;var a=this,s=function(e){var n,i=t.getDefaultLayer();n=e.frame=Object(K.f)("rect"),Object(K.b)(n,{class:"djs-lasso-overlay",width:1,height:1,x:0,y:0}),Object(K.a)(i,n)},c=function(e){var t=e.frame,n=e.bbox;Object(K.b)(t,{x:n.x,y:n.y,width:n.width,height:n.height})},u=function(e){e.frame&&Object(K.j)(e.frame)};o.registerTool("lasso",{tool:"lasso.selection",dragging:"lasso"}),e.on("lasso.selection.end",(function(t){var n=t.originalEvent.target;(t.hover||n instanceof SVGElement)&&e.once("lasso.selection.ended",(function(){a.activateLasso(t.originalEvent,!0)}))})),e.on("lasso.end",(function(e){var t=nu(e),n=i.filter((function(e){return e}));a.select(n,t)})),e.on("lasso.start",(function(e){var t=e.context;t.bbox=nu(e),s(t)})),e.on("lasso.move",(function(e){var t=e.context;t.bbox=nu(e),c(t)})),e.on("lasso.cleanup",(function(e){var t=e.context;u(t)})),e.on("element.mousedown",1500,(function(e){if(Object(ni.b)(e))return a.activateLasso(e.originalEvent),!0}))}function nu(e){var t={x:e.x-e.dx,y:e.y-e.dy},n={x:e.x,y:e.y};return t.x<=n.x&&t.y<n.y||t.x<n.x&&t.y<=n.y?{x:t.x,y:t.y,width:n.x-t.x,height:n.y-t.y}:t.x>=n.x&&t.y<n.y||t.x>n.x&&t.y<=n.y?{x:n.x,y:t.y,width:t.x-n.x,height:n.y-t.y}:t.x<=n.x&&t.y>n.y||t.x<n.x&&t.y>=n.y?{x:t.x,y:n.y,width:n.x-t.x,height:t.y-n.y}:t.x>=n.x&&t.y>n.y||t.x>n.x&&t.y>=n.y?{x:n.x,y:n.y,width:t.x-n.x,height:t.y-n.y}:{x:n.x,y:n.y,width:0,height:0}}tu.$inject=["eventBus","canvas","dragging","elementRegistry","selection","toolManager"],tu.prototype.activateLasso=function(e,t){this._dragging.init(e,"lasso",{autoActivate:t,cursor:"crosshair",data:{context:{}}})},tu.prototype.activateSelection=function(e){this._dragging.init(e,"lasso.selection",{trapClick:!1,cursor:"crosshair",data:{context:{}}})},tu.prototype.select=function(e,t){var n=Object(ge.d)(e,t);this._selection.select(Object(u.values)(n))},tu.prototype.toggle=function(){this.isActive()?this._dragging.cancel():this.activateSelection()},tu.prototype.isActive=function(){var e=this._dragging.context();return e&&/^lasso/.test(e.prefix)};var iu={__depends__:[Ba],__init__:["lassoTool"],lassoTool:["type",tu]};function ru(e,t,n,i,r){this._dragging=n;var o=this,a=i.get("keyboard",!1);r.registerTool("hand",{tool:"hand",dragging:"hand.move"}),e.on("element.mousedown",1500,(function(e){if(Object(ni.a)(e))return this.activateMove(e.originalEvent),!1}),this),a&&a.addListener(1500,(function(e){function t(e){o.activateMove(e),window.removeEventListener("mousemove",t)}ou(e.keyEvent)&&(o.isActive()||(window.addEventListener("mousemove",t),a.addListener(1500,(function e(i){ou(i.keyEvent)&&(window.removeEventListener("mousemove",t),a.removeListener(e,"keyboard.keyup"),n.cancel())}),"keyboard.keyup")))}),"keyboard.keydown"),e.on("hand.end",(function(t){var n=t.originalEvent.target;if(!(t.hover||n instanceof SVGElement))return!1;e.once("hand.ended",(function(){this.activateMove(t.originalEvent,{reactivate:!0})}),this)}),this),e.on("hand.move.move",(function(e){var n=t.viewbox().scale;t.scroll({dx:e.dx*n,dy:e.dy*n})})),e.on("hand.move.end",(function(t){var n=t.context.reactivate;return!Object(ni.a)(t)&&n&&e.once("hand.move.ended",(function(e){this.activateHand(e.originalEvent,!0,!0)}),this),!1}),this)}function ou(e){return d(" ",e)}ru.$inject=["eventBus","canvas","dragging","injector","toolManager"],ru.prototype.activateMove=function(e,t,n){"object"===Object($n.a)(t)&&(n=t,t=!1),this._dragging.init(e,"hand.move",{autoActivate:t,cursor:"grab",data:{context:n||{}}})},ru.prototype.activateHand=function(e,t,n){this._dragging.init(e,"hand",{trapClick:!1,autoActivate:t,cursor:"grab",data:{context:{reactivate:n}}})},ru.prototype.toggle=function(){this.isActive()?this._dragging.cancel():this.activateHand()},ru.prototype.isActive=function(){var e=this._dragging.context();return!!e&&/^(hand|hand\.move)$/.test(e.prefix)};var au={__depends__:[Ba],__init__:["handTool"],handTool:["type",ru]};function su(e,t,n,i,r,o){var a=this;this._dragging=t,this._rules=o,r.registerTool("global-connect",{tool:"global-connect",dragging:"global-connect.drag"}),e.on("global-connect.hover",(function(e){var t=e.context,n=e.hover,r=t.canStartConnect=a.canStartConnect(n);null!==r&&(t.startTarget=n,i.addMarker(n,r?"connect-ok":"connect-not-ok"))})),e.on(["global-connect.out","global-connect.cleanup"],(function(e){var t=e.context.startTarget,n=e.context.canStartConnect;t&&i.removeMarker(t,n?"connect-ok":"connect-not-ok")})),e.on(["global-connect.ended"],(function(t){var i=t.context.startTarget,r={x:t.x,y:t.y};if(a.canStartConnect(i))return e.once("element.out",(function(){e.once(["connect.ended","connect.canceled"],(function(){e.fire("global-connect.drag.ended")})),n.start(null,i,r)})),!1}))}su.$inject=["eventBus","dragging","connect","canvas","toolManager","rules"],su.prototype.start=function(e){this._dragging.init(e,"global-connect",{trapClick:!1,data:{context:{}}})},su.prototype.toggle=function(){this.isActive()?this._dragging.cancel():this.start()},su.prototype.isActive=function(){var e=this._dragging.context();return e&&/^global-connect/.test(e.prefix)},su.prototype.canStartConnect=function(e){return this._rules.allowed("connection.start",{source:e})};var cu={__depends__:[Et,Le,ke,Ba],globalConnect:["type",su]};function uu(e,t,n,i,r,o,a,s){this._palette=e,this._create=t,this._elementFactory=n,this._spaceTool=i,this._lassoTool=r,this._handTool=o,this._globalConnect=a,this._translate=s,e.registerProvider(this)}uu.$inject=["palette","create","elementFactory","spaceTool","lassoTool","handTool","globalConnect","translate"],uu.prototype.getPaletteEntries=function(e){var t={},n=this._create,i=this._elementFactory,r=this._spaceTool,o=this._lassoTool,a=this._handTool,s=this._globalConnect,c=this._translate;function p(e,t,r,o,a){function s(t){var r=i.createShape(Object(u.assign)({type:e},a));a&&(r.businessObject.di.isExpanded=a.isExpanded),n.start(t,r)}var p=e.replace(/^bpmn:/,"");return{group:t,className:r,title:o||c("Create {type}",{type:p}),action:{dragstart:s,click:s}}}function l(e){var t=i.createShape({type:"bpmn:SubProcess",x:0,y:0,isExpanded:!0}),r=i.createShape({type:"bpmn:StartEvent",x:40,y:82,parent:t});n.start(e,[t,r],{hints:{autoSelect:[r]}})}function d(e){n.start(e,i.createParticipantShape())}return Object(u.assign)(t,{"hand-tool":{group:"tools",className:"bpmn-icon-hand-tool",title:c("Activate the hand tool"),action:{click:function(e){a.activateHand(e)}}},"lasso-tool":{group:"tools",className:"bpmn-icon-lasso-tool",title:c("Activate the lasso tool"),action:{click:function(e){o.activateSelection(e)}}},"space-tool":{group:"tools",className:"bpmn-icon-space-tool",title:c("Activate the create/remove space tool"),action:{click:function(e){r.activateSelection(e)}}},"global-connect-tool":{group:"tools",className:"bpmn-icon-connection-multi",title:c("Activate the global connect tool"),action:{click:function(e){s.toggle(e)}}},"tool-separator":{group:"tools",separator:!0},"create.start-event":p("bpmn:StartEvent","event","bpmn-icon-start-event-none",c("Create StartEvent")),"create.intermediate-event":p("bpmn:IntermediateThrowEvent","event","bpmn-icon-intermediate-event-none",c("Create Intermediate/Boundary Event")),"create.end-event":p("bpmn:EndEvent","event","bpmn-icon-end-event-none",c("Create EndEvent")),"create.exclusive-gateway":p("bpmn:ExclusiveGateway","gateway","bpmn-icon-gateway-none",c("Create Gateway")),"create.task":p("bpmn:Task","activity","bpmn-icon-task",c("Create Task")),"create.data-object":p("bpmn:DataObjectReference","data-object","bpmn-icon-data-object",c("Create DataObjectReference")),"create.data-store":p("bpmn:DataStoreReference","data-store","bpmn-icon-data-store",c("Create DataStoreReference")),"create.subprocess-expanded":{group:"activity",className:"bpmn-icon-subprocess-expanded",title:c("Create expanded SubProcess"),action:{dragstart:l,click:l}},"create.participant-expanded":{group:"collaboration",className:"bpmn-icon-participant",title:c("Create Pool/Participant"),action:{dragstart:d,click:d}},"create.group":p("bpmn:Group","artifact","bpmn-icon-group",c("Create Group"))}),t};var pu={__depends__:[eu,Xt,Ka,iu,au,cu,ma.default],__init__:["paletteProvider"],paletteProvider:["type",uu]};function lu(e,t,n,i,r){ye.call(this,e),e.on("shape.move.move",250,(function(e){var o=e.context,a=o.canExecute;o.visualReplacements||(o.visualReplacements={}),a&&a.replacements?function(e){var o=e.canExecute.replacements;Object(u.forEach)(o,(function(o){var a=o.oldElementId,s={type:o.newElementType};if(!e.visualReplacements[a]){var c=t.get(a);Object(u.assign)(s,{x:c.x,y:c.y});var l=n.createShape(s);i.addShape(l,c.parent);var d=Object(p.query)('[data-element-id="'+Je()(c.id)+'"]',e.dragGroup);d&&Object(K.b)(d,{display:"none"});var f=r.addDragger(l,e.dragGroup);e.visualReplacements[a]=f,i.removeShape(l)}}))}(o):function(e){var t=e.visualReplacements;Object(u.forEach)(t,(function(n,i){var r=Object(p.query)('[data-element-id="'+Je()(i)+'"]',e.dragGroup);r&&Object(K.b)(r,{display:"inline"}),n.remove(),t[i]&&delete t[i]}))}(o)}))}lu.$inject=["eventBus","elementRegistry","elementFactory","canvas","previewSupport"],r()(lu,ye);var du={__depends__:[zt],__init__:["bpmnReplacePreview"],bpmnReplacePreview:["type",lu]},fu=["x","y"],hu=Math.abs;function mu(e){e.on(["connect.hover","connect.move","connect.end"],1250,(function(e){var t,n,i=e.context,r=i.canExecute,o=i.start,a=i.hover,s=i.source,c=i.target;e.originalEvent&&l(e.originalEvent)||(i.initialConnectionStart||(i.initialConnectionStart=i.connectionStart),r&&a&&function(e,t,n){fu.forEach((function(i){var r=gu(i,t);e[i]<t[i]+n?ht(e,i,t[i]+n):e[i]>t[i]+r-n&&ht(e,i,t[i]+r-n)}))}(e,a,function(e){return Object(de.is)(e,"bpmn:Task")?10:20}(a)),a&&(t=r,n=["bpmn:Association","bpmn:DataInputAssociation","bpmn:DataOutputAssociation","bpmn:SequenceFlow"],Object(u.some)(n,(function(e){return bu(t,e)})))?(i.connectionStart=dt(o),Object(fe.isAny)(a,["bpmn:Event","bpmn:Gateway"])&&vu(e,dt(a)),Object(fe.isAny)(a,["bpmn:Task","bpmn:SubProcess"])&&function(e,t){var n=dt(t);fu.forEach((function(i){(function(e,t,n){return e[n]>t[n]+20&&e[n]<t[n]+gu(n,t)-20})(e,t,i)&&ht(e,i,n[i])}))}(e,a),Object(de.is)(s,"bpmn:BoundaryEvent")&&c===s.host&&function(e){var t=e.context,n=t.source,i=t.target;if(function(e){var t=e.hover,n=e.source;return t&&n&&t===n}(t))return;var r=dt(n),o=Object(ie.f)(r,i,-10),a=[];/top|bottom/.test(o)&&a.push("x");/left|right/.test(o)&&a.push("y");a.forEach((function(t){var n,i=e[t];hu(i-r[t])<40&&(n=i>r[t]?r[t]+40:r[t]-40,ht(e,t,n))}))}(e)):bu(r,"bpmn:MessageFlow")?(Object(de.is)(o,"bpmn:Event")&&(i.connectionStart=dt(o)),Object(de.is)(a,"bpmn:Event")&&vu(e,dt(a))):i.connectionStart=i.initialConnectionStart)}))}function vu(e,t){ht(e,"x",t.x),ht(e,"y",t.y)}function bu(e,t){return e&&e.type===t}function gu(e,t){return"x"===e?t.width:t.height}function yu(){this._targets={},this._snapOrigins={},this._snapLocations=[],this._defaultSnaps={}}function xu(e){this._snapValues={}}mu.$inject=["eventBus"],yu.prototype.getSnapOrigin=function(e){return this._snapOrigins[e]},yu.prototype.setSnapOrigin=function(e,t){this._snapOrigins[e]=t,-1===this._snapLocations.indexOf(e)&&this._snapLocations.push(e)},yu.prototype.addDefaultSnap=function(e,t){var n=this._defaultSnaps[e];n||(n=this._defaultSnaps[e]=[]),n.push(t)},yu.prototype.getSnapLocations=function(){return this._snapLocations},yu.prototype.setSnapLocations=function(e){this._snapLocations=e},yu.prototype.pointsForTarget=function(e){var t=e.id||e,n=this._targets[t];return n||(n=this._targets[t]=new xu).initDefaults(this._defaultSnaps),n},xu.prototype.add=function(e,t){var n=this._snapValues[e];n||(n=this._snapValues[e]={x:[],y:[]}),-1===n.x.indexOf(t.x)&&n.x.push(t.x),-1===n.y.indexOf(t.y)&&n.y.push(t.y)},xu.prototype.snap=function(e,t,n,i){var r=this._snapValues[t];return r&&function(e,t,n){var i,r;for(n=void 0===n?10:n,i=0;i<t.length;i++)if(r=t[i],ct(r-e)<=n)return r}(e[n],r[n],i)},xu.prototype.initDefaults=function(e){var t=this;Object(u.forEach)(e||{},(function(e,n){Object(u.forEach)(e,(function(e){t.add(n,e)}))}))};function Ou(e,t,n){var i=this;this._elementRegistry=e,t.on(["create.start","shape.move.start"],(function(e){i.initSnap(e)})),t.on(["create.move","create.end","shape.move.move","shape.move.end"],1250,(function(e){var t=e.context,r=t.shape,o=t.snapContext,a=t.target;if((!e.originalEvent||!l(e.originalEvent))&&!ft(e)&&a){var s=o.pointsForTarget(a);s.initialized||((s=i.addSnapTargetPoints(s,r,a)).initialized=!0),n.snap(e,s)}})),t.on(["create.cleanup","shape.move.cleanup"],(function(){n.hide()}))}function ju(e){return!!e.labelTarget}Ou.$inject=["elementRegistry","eventBus","snapping"],Ou.prototype.initSnap=function(e){var t,n=this._elementRegistry,i=e.context,r=i.shape,o=i.snapContext;o||(o=i.snapContext=new yu);var a=(t=n.get(r.id)?dt(r,e):{x:e.x+dt(r).x,y:e.y+dt(r).y}).x-r.width/2,s=t.y-r.height/2,c=t.x+r.width/2,u=t.y+r.height/2;return o.setSnapOrigin("mid",{x:t.x-e.x,y:t.y-e.y}),ju(r)||(o.setSnapOrigin("top-left",{x:a-e.x,y:s-e.y}),o.setSnapOrigin("bottom-right",{x:c-e.x,y:u-e.y})),o},Ou.prototype.addSnapTargetPoints=function(e,t,n){var i=this.getSnapTargets(t,n);return Object(u.forEach)(i,(function(n){if(ju(n))ju(t)&&e.add("mid",dt(n));else if(n.waypoints){if(n.waypoints.length<3)return;var i=n.waypoints.slice(1,-1);Object(u.forEach)(i,(function(t){e.add("mid",t)}))}else{e.add("mid",dt(n))}})),Object(u.isNumber)(t.x)&&Object(u.isNumber)(t.y)?(this._elementRegistry.get(t.id)&&e.add("mid",dt(t)),e):e},Ou.prototype.getSnapTargets=function(e,t){return mt(t).filter((function(e){return!e.hidden}))};function Eu(e,t){t.invoke(Ou,this),e.on(["create.move","create.end"],1500,_u),e.on(["create.move","create.end","shape.move.move","shape.move.end"],1500,(function(e){var t=e.context,n=t.canExecute,i=t.target;n&&("attach"===n||n.attach)&&!ft(e)&&function(e,t){var n,i=Object(ie.b)(t),r=ko(e,t),o=e.context.shape;n=o.parent?{x:0,y:0}:Object(ie.e)(o);/top/.test(r)?ht(e,"y",i.top-n.y):/bottom/.test(r)&&ht(e,"y",i.bottom-n.y);/left/.test(r)?ht(e,"x",i.left-n.x):/right/.test(r)&&ht(e,"x",i.right-n.x)}(e,i)}))}function _u(e){var t=e.context.createConstraints;if(t){var n=t.top,i=t.right,r=t.bottom,o=t.left;(o&&o>=e.x||i&&i<=e.x)&&ht(e,"x",e.x),(n&&n>=e.y||r&&r<=e.y)&&ht(e,"y",e.y)}}function wu(e,t){return-1!==e.indexOf(t)}function Su(e,t,n){return t?{x:e.x-n.x,y:e.y-n.y}:{x:e.x,y:e.y}}r()(Eu,Ou),Eu.$inject=["eventBus","injector"],Eu.prototype.initSnap=function(e){var t=Ou.prototype.initSnap.call(this,e),n=e.shape,i=!!this._elementRegistry.get(n.id);return Object(u.forEach)(n.outgoing,(function(n){var r=n.waypoints[0];r=r.original||r,t.setSnapOrigin(n.id+"-docking",Su(r,i,e))})),Object(u.forEach)(n.incoming,(function(n){var r=n.waypoints[n.waypoints.length-1];r=r.original||r,t.setSnapOrigin(n.id+"-docking",Su(r,i,e))})),Object(de.is)(n,"bpmn:Participant")&&t.setSnapLocations(["top-left","bottom-right","mid"]),t},Eu.prototype.addSnapTargetPoints=function(e,t,n){Ou.prototype.addSnapTargetPoints.call(this,e,t,n);var i=this.getSnapTargets(t,n);Object(u.forEach)(i,(function(n){var i;(function(e){if(Object(de.is)(e,"bpmn:SubProcess")&&Object(On.isExpanded)(e))return!0;return Object(de.is)(e,"bpmn:Participant")}(n)||(i="bpmn:TextAnnotation",[t,n].every((function(e){return Object(de.is)(e,i)}))))&&(e.add("top-left",pt(n)),e.add("bottom-right",lt(n)))}));var r=this._elementRegistry;return Object(u.forEach)(t.incoming,(function(n){if(r.get(t.id)){wu(i,n.source)||e.add("mid",Object(ie.e)(n.source));var o=n.waypoints[0];e.add(n.id+"-docking",o.original||o)}})),Object(u.forEach)(t.outgoing,(function(n){if(r.get(t.id)){wu(i,n.target)||e.add("mid",Object(ie.e)(n.target));var o=n.waypoints[n.waypoints.length-1];e.add(n.id+"-docking",o.original||o)}})),Object(de.is)(n,"bpmn:SequenceFlow")&&(e=this.addSnapTargetPoints(e,t,n.parent)),e},Eu.prototype.getSnapTargets=function(e,t){return Ou.prototype.getSnapTargets.call(this,e,t).filter((function(e){return!Object(de.is)(e,"bpmn:Lane")}))};function Tu(e,t){var n=this;e.on(["resize.start"],(function(e){n.initSnap(e)})),e.on(["resize.move","resize.end"],1250,(function(e){var i=e.context,r=i.shape,o=r.parent,a=i.direction,s=i.snapContext;if(!(e.originalEvent&&l(e.originalEvent)||ft(e))){var c=s.pointsForTarget(o);c.initialized||((c=n.addSnapTargetPoints(c,r,o,a)).initialized=!0),function(e){return"n"===e||"s"===e}(a)&&ht(e,"x",e.x),function(e){return"e"===e||"w"===e}(a)&&ht(e,"y",e.y),t.snap(e,c)}})),e.on(["resize.cleanup"],(function(){t.hide()}))}function Pu(e,t){var n=Object(ie.e)(e),i=Object(ie.b)(e),r={x:n.x,y:n.y};return-1!==t.indexOf("n")?r.y=i.top:-1!==t.indexOf("s")&&(r.y=i.bottom),-1!==t.indexOf("e")?r.x=i.right:-1!==t.indexOf("w")&&(r.x=i.left),r}Tu.prototype.initSnap=function(e){var t=e.context,n=t.shape,i=t.direction,r=t.snapContext;r||(r=t.snapContext=new yu);var o=Pu(n,i);return r.setSnapOrigin("corner",{x:o.x-e.x,y:o.y-e.y}),r},Tu.prototype.addSnapTargetPoints=function(e,t,n,i){var r=this.getSnapTargets(t,n);return Object(u.forEach)(r,(function(t){e.add("corner",lt(t)),e.add("corner",pt(t))})),e.add("corner",Pu(t,i)),e},Tu.$inject=["eventBus","snapping"],Tu.prototype.getSnapTargets=function(e,t){return mt(t).filter((function(t){return!(n=t,i=e,n.host===i||function(e){return!!e.waypoints}(t)||function(e){return!!e.hidden}(t)||function(e){return!!e.labelTarget}(t));var n,i}))};function Cu(e){this._canvas=e,this._asyncHide=Object(u.debounce)(Object(u.bind)(this.hide,this),1e3)}Cu.$inject=["canvas"],Cu.prototype.snap=function(e,t){var n=e.context.snapContext,i=n.getSnapLocations(),r={x:ft(e,"x"),y:ft(e,"y")};Object(u.forEach)(i,(function(i){var o=n.getSnapOrigin(i),a={x:e.x+o.x,y:e.y+o.y};if(Object(u.forEach)(["x","y"],(function(e){var n;r[e]||void 0!==(n=t.snap(a,i,e,7))&&(r[e]={value:n,originValue:n-o[e]})})),r.x&&r.y)return!1})),this.showSnapLine("vertical",r.x&&r.x.value),this.showSnapLine("horizontal",r.y&&r.y.value),Object(u.forEach)(["x","y"],(function(t){var n=r[t];Object(u.isObject)(n)&&ht(e,t,n.originValue)}))},Cu.prototype._createLine=function(e){var t=this._canvas.getLayer("snap"),n=Object(K.f)("path");return Object(K.b)(n,{d:"M0,0 L0,0"}),Object(K.c)(n).add("djs-snap-line"),Object(K.a)(t,n),{update:function(t){Object(u.isNumber)(t)?"horizontal"===e?Object(K.b)(n,{d:"M-100000,"+t+" L+100000,"+t,display:""}):Object(K.b)(n,{d:"M "+t+",-100000 L "+t+", +100000",display:""}):Object(K.b)(n,{display:"none"})}}},Cu.prototype._createSnapLines=function(){this._snapLines={horizontal:this._createLine("horizontal"),vertical:this._createLine("vertical")}},Cu.prototype.showSnapLine=function(e,t){var n=this.getSnapLine(e);n&&n.update(t),this._asyncHide()},Cu.prototype.getSnapLine=function(e){return this._snapLines||this._createSnapLines(),this._snapLines[e]},Cu.prototype.hide=function(){Object(u.forEach)(this._snapLines,(function(e){e.update()}))};var Au={__depends__:[{__init__:["createMoveSnapping","resizeSnapping","snapping"],createMoveSnapping:["type",Ou],resizeSnapping:["type",Tu],snapping:["type",Cu]}],__init__:["connectSnapping","createMoveSnapping"],connectSnapping:["type",mu],createMoveSnapping:["type",Eu]},Ru=(n(65),{"&":"&","<":"<",">":">",'"':""","'":"'"});function ku(e){return(e=""+e)&&e.replace(/[&<>"']/g,(function(e){return Ru[e]}))}function Bu(e,t,n,i){this._open=!1,this._results=[],this._eventMaps=[],this._canvas=e,this._eventBus=t,this._overlays=n,this._selection=i,this._container=Object(p.domify)(Bu.BOX_HTML),this._searchInput=Object(p.query)(Bu.INPUT_SELECTOR,this._container),this._resultsContainer=Object(p.query)(Bu.RESULTS_CONTAINER_SELECTOR,this._container),this._canvas.getContainer().appendChild(this._container),t.on(["canvas.destroy","diagram.destroy"],this.close,this)}function Mu(e,t,n){var i=function(e){var t="";return e.forEach((function(e){e.matched?t+='<strong class="'+Bu.RESULT_HIGHLIGHT_CLASS+'">'+ku(e.matched)+"</strong>":t+=ku(e.normal)})),""!==t?t:null}(t),r=Object(p.domify)(n);r.innerHTML=i,e.appendChild(r)}Bu.$inject=["canvas","eventBus","overlays","selection"],Bu.prototype._bindEvents=function(){var e=this;function t(t,n,i,r){e._eventMaps.push({el:t,type:i,listener:p.delegate.bind(t,n,i,r)})}t(document,"html","click",(function(t){e.close()})),t(this._container,Bu.INPUT_SELECTOR,"click",(function(e){e.stopPropagation(),e.delegateTarget.focus()})),t(this._container,Bu.RESULT_SELECTOR,"mouseover",(function(t){t.stopPropagation(),e._scrollToNode(t.delegateTarget),e._preselect(t.delegateTarget)})),t(this._container,Bu.RESULT_SELECTOR,"click",(function(t){t.stopPropagation(),e._select(t.delegateTarget)})),t(this._container,Bu.INPUT_SELECTOR,"keydown",(function(e){38===e.keyCode&&e.preventDefault(),40===e.keyCode&&e.preventDefault()})),t(this._container,Bu.INPUT_SELECTOR,"keyup",(function(t){if(27===t.keyCode)return e.close();if(13===t.keyCode){var n=e._getCurrentResult();return n?e._select(n):e.close()}return 38===t.keyCode?e._scrollToDirection(!0):40===t.keyCode?e._scrollToDirection():void(37!==t.keyCode&&39!==t.keyCode&&e._search(t.delegateTarget.value))}))},Bu.prototype._unbindEvents=function(){this._eventMaps.forEach((function(e){p.delegate.unbind(e.el,e.type,e.listener)}))},Bu.prototype._search=function(e){var t=this;if(this._clearResults(),e&&""!==e){var n=this._searchProvider.find(e);if(n.length){n.forEach((function(e){var n=e.element.id,i=t._createResultNode(e,n);t._results[n]={element:e.element,node:i}}));var i=Object(p.query)(Bu.RESULT_SELECTOR,this._resultsContainer);this._scrollToNode(i),this._preselect(i)}}},Bu.prototype._scrollToDirection=function(e){var t=this._getCurrentResult();if(t){var n=e?t.previousElementSibling:t.nextElementSibling;n&&(this._scrollToNode(n),this._preselect(n))}},Bu.prototype._scrollToNode=function(e){if(e&&e!==this._getCurrentResult()){var t=e.offsetTop,n=this._resultsContainer.scrollTop,i=t-this._resultsContainer.clientHeight+e.clientHeight;t<n?this._resultsContainer.scrollTop=t:n<i&&(this._resultsContainer.scrollTop=i)}},Bu.prototype._clearResults=function(){Object(p.clear)(this._resultsContainer),this._results=[],this._resetOverlay(),this._eventBus.fire("searchPad.cleared")},Bu.prototype._getCurrentResult=function(){return Object(p.query)(Bu.RESULT_SELECTED_SELECTOR,this._resultsContainer)},Bu.prototype._createResultNode=function(e,t){var n=Object(p.domify)(Bu.RESULT_HTML);return e.primaryTokens.length>0&&Mu(n,e.primaryTokens,Bu.RESULT_PRIMARY_HTML),Mu(n,e.secondaryTokens,Bu.RESULT_SECONDARY_HTML),Object(p.attr)(n,Bu.RESULT_ID_ATTRIBUTE,t),this._resultsContainer.appendChild(n),n},Bu.prototype.registerProvider=function(e){this._searchProvider=e},Bu.prototype.open=function(){if(!this._searchProvider)throw new Error("no search provider registered");this.isOpen()||(this._bindEvents(),this._open=!0,Object(p.classes)(this._container).add("open"),this._searchInput.focus(),this._eventBus.fire("searchPad.opened"))},Bu.prototype.close=function(){this.isOpen()&&(this._unbindEvents(),this._open=!1,Object(p.classes)(this._container).remove("open"),this._clearResults(),this._searchInput.value="",this._searchInput.blur(),this._resetOverlay(),this._eventBus.fire("searchPad.closed"))},Bu.prototype.toggle=function(){this.isOpen()?this.close():this.open()},Bu.prototype.isOpen=function(){return this._open},Bu.prototype._preselect=function(e){var t=this._getCurrentResult();if(e!==t){t&&Object(p.classes)(t).remove(Bu.RESULT_SELECTED_CLASS);var n=Object(p.attr)(e,Bu.RESULT_ID_ATTRIBUTE),i=this._results[n].element;Object(p.classes)(e).add(Bu.RESULT_SELECTED_CLASS),this._resetOverlay(i),this._centerViewbox(i),this._selection.select(i),this._eventBus.fire("searchPad.preselected",i)}},Bu.prototype._select=function(e){var t=Object(p.attr)(e,Bu.RESULT_ID_ATTRIBUTE),n=this._results[t].element;this.close(),this._resetOverlay(),this._centerViewbox(n),this._selection.select(n),this._eventBus.fire("searchPad.selected",n)},Bu.prototype._centerViewbox=function(e){var t=this._canvas.viewbox(),n=Object(ge.b)(e),i={x:n.x+n.width/2-t.outer.width/2,y:n.y+n.height/2-t.outer.height/2,width:t.outer.width,height:t.outer.height};this._canvas.viewbox(i),this._canvas.zoom(t.scale)},Bu.prototype._resetOverlay=function(e){if(this._overlayId&&this._overlays.remove(this._overlayId),e){var t=function(e){var t=e.width+12,n=e.height+12,i=["width: "+t+"px","height: "+n+"px"].join("; ");return{position:{bottom:n-6,right:t-6},show:!0,html:'<div style="'+i+'" class="'+Bu.OVERLAY_CLASS+'"></div>'}}(Object(ge.b)(e));this._overlayId=this._overlays.add(e,t)}},Bu.CONTAINER_SELECTOR=".djs-search-container",Bu.INPUT_SELECTOR=".djs-search-input input",Bu.RESULTS_CONTAINER_SELECTOR=".djs-search-results",Bu.RESULT_SELECTOR=".djs-search-result",Bu.RESULT_SELECTED_CLASS="djs-search-result-selected",Bu.RESULT_SELECTED_SELECTOR="."+Bu.RESULT_SELECTED_CLASS,Bu.RESULT_ID_ATTRIBUTE="data-result-id",Bu.RESULT_HIGHLIGHT_CLASS="djs-search-highlight",Bu.OVERLAY_CLASS="djs-search-overlay",Bu.BOX_HTML='<div class="djs-search-container djs-draggable djs-scrollable"><div class="djs-search-input"><input type="text"/></div><div class="djs-search-results"></div></div>',Bu.RESULT_HTML='<div class="djs-search-result"></div>',Bu.RESULT_PRIMARY_HTML='<div class="djs-search-result-primary"></div>',Bu.RESULT_SECONDARY_HTML='<p class="djs-search-result-secondary"></p>';var Du={__depends__:[Bt.a,Pe.a],searchPad:["type",Bu]};function Nu(e,t,n){this._elementRegistry=e,this._canvas=n,t.registerProvider(this)}function Lu(e){return Object(u.filter)(e,(function(e){return!!e.matched})).length>0}function Iu(e,t){var n=[],i=e;if(!e)return n;e=e.toLowerCase(),t=t.toLowerCase();var r=e.indexOf(t);return r>-1?(0!==r&&n.push({normal:i.substr(0,r)}),n.push({matched:i.substr(r,t.length)}),t.length+r<e.length&&n.push({normal:i.substr(t.length+r,e.length)})):n.push({normal:i}),n}Nu.$inject=["elementRegistry","searchPad","canvas"],Nu.prototype.find=function(e){var t=this._canvas.getRootElement(),n=this._elementRegistry.filter((function(e){return!e.labelTarget}));return n=Object(u.filter)(n,(function(e){return e!==t})),n=Object(u.map)(n,(function(t){return{primaryTokens:Iu(Object(Ki.a)(t),e),secondaryTokens:Iu(t.id,e),element:t}})),n=Object(u.filter)(n,(function(e){return Lu(e.primaryTokens)||Lu(e.secondaryTokens)})),n=Object(u.sortBy)(n,(function(e){return Object(Ki.a)(e.element)+e.element.id}))};var Fu={__depends__:[Du],__init__:["bpmnSearch"],bpmnSearch:["type",Nu]};function zu(e){s.call(this,e)}r()(zu,s),zu.Viewer=c.a,zu.NavigatedViewer=F,zu.prototype.createDiagram=function(e){return this.importXML('<?xml version="1.0" encoding="UTF-8"?><bpmn:definitions xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:bpmn="http://www.omg.org/spec/BPMN/20100524/MODEL" xmlns:bpmndi="http://www.omg.org/spec/BPMN/20100524/DI" xmlns:dc="http://www.omg.org/spec/DD/20100524/DC" targetNamespace="http://bpmn.io/schema/bpmn" id="Definitions_1"><bpmn:process id="Process_1" isExecutable="false"><bpmn:startEvent id="StartEvent_1"/></bpmn:process><bpmndi:BPMNDiagram id="BPMNDiagram_1"><bpmndi:BPMNPlane id="BPMNPlane_1" bpmnElement="Process_1"><bpmndi:BPMNShape id="_BPMNShape_StartEvent_2" bpmnElement="StartEvent_1"><dc:Bounds height="36.0" width="36.0" x="173.0" y="102.0"/></bpmndi:BPMNShape></bpmndi:BPMNPlane></bpmndi:BPMNDiagram></bpmn:definitions>',e)},zu.prototype._interactionModules=[E,k,X,I],zu.prototype._modelingModules=[ne,be,De,we,yt,Et,wt,oi,bn,Xt,pi,mi,Ci,Ri,Bi,Ii,nr,$c,Jc,pu,du,Ui,Au,Fu],zu.prototype._modules=[].concat(c.a.prototype._modules,zu.prototype._interactionModules,zu.prototype._modelingModules)}])]);
|