process_engine 0.0.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (409) hide show
  1. checksums.yaml +7 -0
  2. data/MIT-LICENSE +20 -0
  3. data/Rakefile +37 -0
  4. data/app/assets/bower_components/process_engine/Snap.svg/CONTRIBUTING +3 -0
  5. data/app/assets/bower_components/process_engine/Snap.svg/Gruntfile.js +59 -0
  6. data/app/assets/bower_components/process_engine/Snap.svg/LICENSE +202 -0
  7. data/app/assets/bower_components/process_engine/Snap.svg/NOTICE +190 -0
  8. data/app/assets/bower_components/process_engine/Snap.svg/README.md +62 -0
  9. data/app/assets/bower_components/process_engine/Snap.svg/bower.json +25 -0
  10. data/app/assets/bower_components/process_engine/Snap.svg/component.json +13 -0
  11. data/app/assets/bower_components/process_engine/Snap.svg/dist/snap.svg-min.js +20 -0
  12. data/app/assets/bower_components/process_engine/Snap.svg/dist/snap.svg.js +7653 -0
  13. data/app/assets/bower_components/process_engine/Snap.svg/doc/css/dr.css +144 -0
  14. data/app/assets/bower_components/process_engine/Snap.svg/doc/css/main.css +508 -0
  15. data/app/assets/bower_components/process_engine/Snap.svg/doc/css/prism.css +168 -0
  16. data/app/assets/bower_components/process_engine/Snap.svg/doc/css/topcoat-desktop-light.css +3700 -0
  17. data/app/assets/bower_components/process_engine/Snap.svg/doc/fonts/sourcecodepro-regular-webfont.eot +0 -0
  18. data/app/assets/bower_components/process_engine/Snap.svg/doc/fonts/sourcecodepro-regular-webfont.svg +242 -0
  19. data/app/assets/bower_components/process_engine/Snap.svg/doc/fonts/sourcecodepro-regular-webfont.ttf +0 -0
  20. data/app/assets/bower_components/process_engine/Snap.svg/doc/fonts/sourcecodepro-regular-webfont.woff +0 -0
  21. data/app/assets/bower_components/process_engine/Snap.svg/doc/fonts/sourcesanspro-light-webfont.eot +0 -0
  22. data/app/assets/bower_components/process_engine/Snap.svg/doc/fonts/sourcesanspro-light-webfont.svg +243 -0
  23. data/app/assets/bower_components/process_engine/Snap.svg/doc/fonts/sourcesanspro-light-webfont.ttf +0 -0
  24. data/app/assets/bower_components/process_engine/Snap.svg/doc/fonts/sourcesanspro-light-webfont.woff +0 -0
  25. data/app/assets/bower_components/process_engine/Snap.svg/doc/fonts/sourcesanspro-regular-webfont.eot +0 -0
  26. data/app/assets/bower_components/process_engine/Snap.svg/doc/fonts/sourcesanspro-regular-webfont.svg +243 -0
  27. data/app/assets/bower_components/process_engine/Snap.svg/doc/fonts/sourcesanspro-regular-webfont.ttf +0 -0
  28. data/app/assets/bower_components/process_engine/Snap.svg/doc/fonts/sourcesanspro-regular-webfont.woff +0 -0
  29. data/app/assets/bower_components/process_engine/Snap.svg/doc/fonts/sourcesanspro-semibold-webfont.eot +0 -0
  30. data/app/assets/bower_components/process_engine/Snap.svg/doc/fonts/sourcesanspro-semibold-webfont.svg +243 -0
  31. data/app/assets/bower_components/process_engine/Snap.svg/doc/fonts/sourcesanspro-semibold-webfont.ttf +0 -0
  32. data/app/assets/bower_components/process_engine/Snap.svg/doc/fonts/sourcesanspro-semibold-webfont.woff +0 -0
  33. data/app/assets/bower_components/process_engine/Snap.svg/doc/fonts/stylesheet.css +57 -0
  34. data/app/assets/bower_components/process_engine/Snap.svg/doc/img/search.svg +11 -0
  35. data/app/assets/bower_components/process_engine/Snap.svg/doc/img/search_dark.svg +16 -0
  36. data/app/assets/bower_components/process_engine/Snap.svg/doc/js/prism.js +9 -0
  37. data/app/assets/bower_components/process_engine/Snap.svg/doc/reference.html +13633 -0
  38. data/app/assets/bower_components/process_engine/Snap.svg/dr.json +33 -0
  39. data/app/assets/bower_components/process_engine/Snap.svg/history.md +31 -0
  40. data/app/assets/bower_components/process_engine/Snap.svg/package.json +22 -0
  41. data/app/assets/bower_components/process_engine/Snap.svg/template.dot +157 -0
  42. data/app/assets/bower_components/process_engine/Snap.svg/test.html +75 -0
  43. data/app/assets/bower_components/process_engine/bpmn-js/LICENSE +22 -0
  44. data/app/assets/bower_components/process_engine/bpmn-js/README.md +46 -0
  45. data/app/assets/bower_components/process_engine/bpmn-js/bower.json +28 -0
  46. data/app/assets/bower_components/process_engine/bpmn-js/dist/assets/bpmn-font/css/bpmn-embedded.css +40 -0
  47. data/app/assets/bower_components/process_engine/bpmn-js/dist/assets/bpmn-font/font/bpmn.eot +0 -0
  48. data/app/assets/bower_components/process_engine/bpmn-js/dist/assets/bpmn-font/font/bpmn.svg +21 -0
  49. data/app/assets/bower_components/process_engine/bpmn-js/dist/assets/bpmn-font/font/bpmn.ttf +0 -0
  50. data/app/assets/bower_components/process_engine/bpmn-js/dist/assets/bpmn-font/font/bpmn.woff +0 -0
  51. data/app/assets/bower_components/process_engine/bpmn-js/dist/assets/diagram-js.css +355 -0
  52. data/app/assets/bower_components/process_engine/bpmn-js/dist/bpmn-modeler.js +21552 -0
  53. data/app/assets/bower_components/process_engine/bpmn-js/dist/bpmn-modeler.js.map +1 -0
  54. data/app/assets/bower_components/process_engine/bpmn-js/dist/bpmn-modeler.min.js +8 -0
  55. data/app/assets/bower_components/process_engine/bpmn-js/dist/bpmn-navigated-viewer.js +13542 -0
  56. data/app/assets/bower_components/process_engine/bpmn-js/dist/bpmn-navigated-viewer.js.map +1 -0
  57. data/app/assets/bower_components/process_engine/bpmn-js/dist/bpmn-navigated-viewer.min.js +5 -0
  58. data/app/assets/bower_components/process_engine/bpmn-js/dist/bpmn-viewer.js +13294 -0
  59. data/app/assets/bower_components/process_engine/bpmn-js/dist/bpmn-viewer.js.map +1 -0
  60. data/app/assets/bower_components/process_engine/bpmn-js/dist/bpmn-viewer.min.js +5 -0
  61. data/app/assets/bower_components/process_engine/hammerjs/CHANGELOG.md +30 -0
  62. data/app/assets/bower_components/process_engine/hammerjs/CONTRIBUTING.md +41 -0
  63. data/app/assets/bower_components/process_engine/hammerjs/Gruntfile.coffee +123 -0
  64. data/app/assets/bower_components/process_engine/hammerjs/LICENSE.md +21 -0
  65. data/app/assets/bower_components/process_engine/hammerjs/README.md +6 -0
  66. data/app/assets/bower_components/process_engine/hammerjs/bower.json +9 -0
  67. data/app/assets/bower_components/process_engine/hammerjs/component.json +8 -0
  68. data/app/assets/bower_components/process_engine/hammerjs/hammer.js +2463 -0
  69. data/app/assets/bower_components/process_engine/hammerjs/hammer.min.js +7 -0
  70. data/app/assets/bower_components/process_engine/hammerjs/hammer.min.map +1 -0
  71. data/app/assets/bower_components/process_engine/hammerjs/package.json +50 -0
  72. data/app/assets/bower_components/process_engine/jquery/MIT-LICENSE.txt +21 -0
  73. data/app/assets/bower_components/process_engine/jquery/bower.json +27 -0
  74. data/app/assets/bower_components/process_engine/jquery/dist/jquery.js +9205 -0
  75. data/app/assets/bower_components/process_engine/jquery/dist/jquery.min.js +5 -0
  76. data/app/assets/bower_components/process_engine/jquery/dist/jquery.min.map +1 -0
  77. data/app/assets/bower_components/process_engine/jquery/src/ajax/jsonp.js +89 -0
  78. data/app/assets/bower_components/process_engine/jquery/src/ajax/load.js +75 -0
  79. data/app/assets/bower_components/process_engine/jquery/src/ajax/parseJSON.js +13 -0
  80. data/app/assets/bower_components/process_engine/jquery/src/ajax/parseXML.js +28 -0
  81. data/app/assets/bower_components/process_engine/jquery/src/ajax/script.js +64 -0
  82. data/app/assets/bower_components/process_engine/jquery/src/ajax/var/nonce.js +5 -0
  83. data/app/assets/bower_components/process_engine/jquery/src/ajax/var/rquery.js +3 -0
  84. data/app/assets/bower_components/process_engine/jquery/src/ajax/xhr.js +136 -0
  85. data/app/assets/bower_components/process_engine/jquery/src/ajax.js +786 -0
  86. data/app/assets/bower_components/process_engine/jquery/src/attributes/attr.js +141 -0
  87. data/app/assets/bower_components/process_engine/jquery/src/attributes/classes.js +158 -0
  88. data/app/assets/bower_components/process_engine/jquery/src/attributes/prop.js +94 -0
  89. data/app/assets/bower_components/process_engine/jquery/src/attributes/support.js +35 -0
  90. data/app/assets/bower_components/process_engine/jquery/src/attributes/val.js +161 -0
  91. data/app/assets/bower_components/process_engine/jquery/src/attributes.js +11 -0
  92. data/app/assets/bower_components/process_engine/jquery/src/callbacks.js +205 -0
  93. data/app/assets/bower_components/process_engine/jquery/src/core/access.js +60 -0
  94. data/app/assets/bower_components/process_engine/jquery/src/core/init.js +123 -0
  95. data/app/assets/bower_components/process_engine/jquery/src/core/parseHTML.js +39 -0
  96. data/app/assets/bower_components/process_engine/jquery/src/core/ready.js +97 -0
  97. data/app/assets/bower_components/process_engine/jquery/src/core/var/rsingleTag.js +4 -0
  98. data/app/assets/bower_components/process_engine/jquery/src/core.js +497 -0
  99. data/app/assets/bower_components/process_engine/jquery/src/css/addGetHookIf.js +22 -0
  100. data/app/assets/bower_components/process_engine/jquery/src/css/curCSS.js +57 -0
  101. data/app/assets/bower_components/process_engine/jquery/src/css/defaultDisplay.js +70 -0
  102. data/app/assets/bower_components/process_engine/jquery/src/css/hiddenVisibleSelectors.js +15 -0
  103. data/app/assets/bower_components/process_engine/jquery/src/css/support.js +96 -0
  104. data/app/assets/bower_components/process_engine/jquery/src/css/swap.js +28 -0
  105. data/app/assets/bower_components/process_engine/jquery/src/css/var/cssExpand.js +3 -0
  106. data/app/assets/bower_components/process_engine/jquery/src/css/var/getStyles.js +12 -0
  107. data/app/assets/bower_components/process_engine/jquery/src/css/var/isHidden.js +13 -0
  108. data/app/assets/bower_components/process_engine/jquery/src/css/var/rmargin.js +3 -0
  109. data/app/assets/bower_components/process_engine/jquery/src/css/var/rnumnonpx.js +5 -0
  110. data/app/assets/bower_components/process_engine/jquery/src/css.js +450 -0
  111. data/app/assets/bower_components/process_engine/jquery/src/data/Data.js +181 -0
  112. data/app/assets/bower_components/process_engine/jquery/src/data/accepts.js +20 -0
  113. data/app/assets/bower_components/process_engine/jquery/src/data/var/data_priv.js +5 -0
  114. data/app/assets/bower_components/process_engine/jquery/src/data/var/data_user.js +5 -0
  115. data/app/assets/bower_components/process_engine/jquery/src/data.js +178 -0
  116. data/app/assets/bower_components/process_engine/jquery/src/deferred.js +149 -0
  117. data/app/assets/bower_components/process_engine/jquery/src/deprecated.js +13 -0
  118. data/app/assets/bower_components/process_engine/jquery/src/dimensions.js +50 -0
  119. data/app/assets/bower_components/process_engine/jquery/src/effects/Tween.js +114 -0
  120. data/app/assets/bower_components/process_engine/jquery/src/effects/animatedSelector.js +13 -0
  121. data/app/assets/bower_components/process_engine/jquery/src/effects.js +648 -0
  122. data/app/assets/bower_components/process_engine/jquery/src/event/ajax.js +13 -0
  123. data/app/assets/bower_components/process_engine/jquery/src/event/alias.js +39 -0
  124. data/app/assets/bower_components/process_engine/jquery/src/event/support.js +9 -0
  125. data/app/assets/bower_components/process_engine/jquery/src/event.js +868 -0
  126. data/app/assets/bower_components/process_engine/jquery/src/exports/amd.js +24 -0
  127. data/app/assets/bower_components/process_engine/jquery/src/exports/global.js +32 -0
  128. data/app/assets/bower_components/process_engine/jquery/src/intro.js +44 -0
  129. data/app/assets/bower_components/process_engine/jquery/src/jquery.js +37 -0
  130. data/app/assets/bower_components/process_engine/jquery/src/manipulation/_evalUrl.js +18 -0
  131. data/app/assets/bower_components/process_engine/jquery/src/manipulation/support.js +32 -0
  132. data/app/assets/bower_components/process_engine/jquery/src/manipulation/var/rcheckableType.js +3 -0
  133. data/app/assets/bower_components/process_engine/jquery/src/manipulation.js +580 -0
  134. data/app/assets/bower_components/process_engine/jquery/src/offset.js +207 -0
  135. data/app/assets/bower_components/process_engine/jquery/src/outro.js +1 -0
  136. data/app/assets/bower_components/process_engine/jquery/src/queue/delay.js +22 -0
  137. data/app/assets/bower_components/process_engine/jquery/src/queue.js +142 -0
  138. data/app/assets/bower_components/process_engine/jquery/src/selector-native.js +172 -0
  139. data/app/assets/bower_components/process_engine/jquery/src/selector-sizzle.js +14 -0
  140. data/app/assets/bower_components/process_engine/jquery/src/selector.js +1 -0
  141. data/app/assets/bower_components/process_engine/jquery/src/serialize.js +111 -0
  142. data/app/assets/bower_components/process_engine/jquery/src/sizzle/dist/sizzle.js +2067 -0
  143. data/app/assets/bower_components/process_engine/jquery/src/sizzle/dist/sizzle.min.js +3 -0
  144. data/app/assets/bower_components/process_engine/jquery/src/sizzle/dist/sizzle.min.map +1 -0
  145. data/app/assets/bower_components/process_engine/jquery/src/traversing/findFilter.js +100 -0
  146. data/app/assets/bower_components/process_engine/jquery/src/traversing/var/rneedsContext.js +6 -0
  147. data/app/assets/bower_components/process_engine/jquery/src/traversing.js +199 -0
  148. data/app/assets/bower_components/process_engine/jquery/src/var/arr.js +3 -0
  149. data/app/assets/bower_components/process_engine/jquery/src/var/class2type.js +4 -0
  150. data/app/assets/bower_components/process_engine/jquery/src/var/concat.js +5 -0
  151. data/app/assets/bower_components/process_engine/jquery/src/var/hasOwn.js +5 -0
  152. data/app/assets/bower_components/process_engine/jquery/src/var/indexOf.js +5 -0
  153. data/app/assets/bower_components/process_engine/jquery/src/var/pnum.js +3 -0
  154. data/app/assets/bower_components/process_engine/jquery/src/var/push.js +5 -0
  155. data/app/assets/bower_components/process_engine/jquery/src/var/rnotwhite.js +3 -0
  156. data/app/assets/bower_components/process_engine/jquery/src/var/slice.js +5 -0
  157. data/app/assets/bower_components/process_engine/jquery/src/var/strundefined.js +3 -0
  158. data/app/assets/bower_components/process_engine/jquery/src/var/support.js +4 -0
  159. data/app/assets/bower_components/process_engine/jquery/src/var/toString.js +5 -0
  160. data/app/assets/bower_components/process_engine/jquery/src/wrap.js +79 -0
  161. data/app/assets/bower_components/process_engine/jquery-mousewheel/ChangeLog.md +141 -0
  162. data/app/assets/bower_components/process_engine/jquery-mousewheel/LICENSE.txt +20 -0
  163. data/app/assets/bower_components/process_engine/jquery-mousewheel/README.md +85 -0
  164. data/app/assets/bower_components/process_engine/jquery-mousewheel/bower.json +17 -0
  165. data/app/assets/bower_components/process_engine/jquery-mousewheel/jquery.mousewheel.js +221 -0
  166. data/app/assets/bower_components/process_engine/jquery-mousewheel/jquery.mousewheel.min.js +8 -0
  167. data/app/assets/bower_components/process_engine/lodash/LICENSE.txt +22 -0
  168. data/app/assets/bower_components/process_engine/lodash/bower.json +23 -0
  169. data/app/assets/bower_components/process_engine/lodash/dist/lodash.compat.js +7157 -0
  170. data/app/assets/bower_components/process_engine/lodash/dist/lodash.compat.min.js +61 -0
  171. data/app/assets/bower_components/process_engine/lodash/dist/lodash.js +6785 -0
  172. data/app/assets/bower_components/process_engine/lodash/dist/lodash.min.js +56 -0
  173. data/app/assets/bower_components/process_engine/lodash/dist/lodash.underscore.js +4979 -0
  174. data/app/assets/bower_components/process_engine/lodash/dist/lodash.underscore.min.js +39 -0
  175. data/app/assets/bower_components/process_engine/sax/AUTHORS +10 -0
  176. data/app/assets/bower_components/process_engine/sax/LICENSE +32 -0
  177. data/app/assets/bower_components/process_engine/sax/LICENSE-W3C.html +188 -0
  178. data/app/assets/bower_components/process_engine/sax/README.md +216 -0
  179. data/app/assets/bower_components/process_engine/sax/component.json +12 -0
  180. data/app/assets/bower_components/process_engine/sax/examples/big-not-pretty.xml +8002 -0
  181. data/app/assets/bower_components/process_engine/sax/examples/example.js +29 -0
  182. data/app/assets/bower_components/process_engine/sax/examples/get-products.js +58 -0
  183. data/app/assets/bower_components/process_engine/sax/examples/hello-world.js +4 -0
  184. data/app/assets/bower_components/process_engine/sax/examples/not-pretty.xml +8 -0
  185. data/app/assets/bower_components/process_engine/sax/examples/pretty-print.js +74 -0
  186. data/app/assets/bower_components/process_engine/sax/examples/shopping.xml +2 -0
  187. data/app/assets/bower_components/process_engine/sax/examples/strict.dtd +870 -0
  188. data/app/assets/bower_components/process_engine/sax/examples/test.html +15 -0
  189. data/app/assets/bower_components/process_engine/sax/examples/test.xml +1254 -0
  190. data/app/assets/bower_components/process_engine/sax/lib/sax.js +1410 -0
  191. data/app/assets/bower_components/process_engine/sax/package.json +12 -0
  192. data/app/assets/bower_components/process_engine/sax/test/attribute-name.js +33 -0
  193. data/app/assets/bower_components/process_engine/sax/test/attribute-no-space.js +75 -0
  194. data/app/assets/bower_components/process_engine/sax/test/buffer-overrun.js +26 -0
  195. data/app/assets/bower_components/process_engine/sax/test/case.js +50 -0
  196. data/app/assets/bower_components/process_engine/sax/test/cdata-chunked.js +11 -0
  197. data/app/assets/bower_components/process_engine/sax/test/cdata-end-split.js +15 -0
  198. data/app/assets/bower_components/process_engine/sax/test/cdata-fake-end.js +28 -0
  199. data/app/assets/bower_components/process_engine/sax/test/cdata-multiple.js +15 -0
  200. data/app/assets/bower_components/process_engine/sax/test/cdata.js +10 -0
  201. data/app/assets/bower_components/process_engine/sax/test/cyrillic.js +8 -0
  202. data/app/assets/bower_components/process_engine/sax/test/duplicate-attribute.js +13 -0
  203. data/app/assets/bower_components/process_engine/sax/test/emoji.js +12 -0
  204. data/app/assets/bower_components/process_engine/sax/test/end_empty_stream.js +5 -0
  205. data/app/assets/bower_components/process_engine/sax/test/entities.js +10 -0
  206. data/app/assets/bower_components/process_engine/sax/test/entity-mega.js +16 -0
  207. data/app/assets/bower_components/process_engine/sax/test/flush.js +13 -0
  208. data/app/assets/bower_components/process_engine/sax/test/index.js +86 -0
  209. data/app/assets/bower_components/process_engine/sax/test/issue-23.js +43 -0
  210. data/app/assets/bower_components/process_engine/sax/test/issue-30.js +24 -0
  211. data/app/assets/bower_components/process_engine/sax/test/issue-35.js +15 -0
  212. data/app/assets/bower_components/process_engine/sax/test/issue-47.js +12 -0
  213. data/app/assets/bower_components/process_engine/sax/test/issue-49.js +31 -0
  214. data/app/assets/bower_components/process_engine/sax/test/issue-84.js +13 -0
  215. data/app/assets/bower_components/process_engine/sax/test/parser-position.js +28 -0
  216. data/app/assets/bower_components/process_engine/sax/test/script-close-better.js +12 -0
  217. data/app/assets/bower_components/process_engine/sax/test/script.js +12 -0
  218. data/app/assets/bower_components/process_engine/sax/test/self-closing-child-strict.js +44 -0
  219. data/app/assets/bower_components/process_engine/sax/test/self-closing-child.js +44 -0
  220. data/app/assets/bower_components/process_engine/sax/test/self-closing-tag.js +25 -0
  221. data/app/assets/bower_components/process_engine/sax/test/stray-ending.js +17 -0
  222. data/app/assets/bower_components/process_engine/sax/test/trailing-attribute-no-value.js +10 -0
  223. data/app/assets/bower_components/process_engine/sax/test/trailing-non-whitespace.js +18 -0
  224. data/app/assets/bower_components/process_engine/sax/test/unclosed-root.js +11 -0
  225. data/app/assets/bower_components/process_engine/sax/test/unquoted.js +18 -0
  226. data/app/assets/bower_components/process_engine/sax/test/utf8-split.js +32 -0
  227. data/app/assets/bower_components/process_engine/sax/test/xmlns-as-tag-name.js +15 -0
  228. data/app/assets/bower_components/process_engine/sax/test/xmlns-issue-41.js +68 -0
  229. data/app/assets/bower_components/process_engine/sax/test/xmlns-rebinding.js +63 -0
  230. data/app/assets/bower_components/process_engine/sax/test/xmlns-strict.js +74 -0
  231. data/app/assets/bower_components/process_engine/sax/test/xmlns-unbound-element.js +33 -0
  232. data/app/assets/bower_components/process_engine/sax/test/xmlns-unbound.js +15 -0
  233. data/app/assets/bower_components/process_engine/sax/test/xmlns-xml-default-ns.js +31 -0
  234. data/app/assets/bower_components/process_engine/sax/test/xmlns-xml-default-prefix-attribute.js +36 -0
  235. data/app/assets/bower_components/process_engine/sax/test/xmlns-xml-default-prefix.js +21 -0
  236. data/app/assets/bower_components/process_engine/sax/test/xmlns-xml-default-redefine.js +41 -0
  237. data/app/assets/javascripts/process_engine/application.js +65 -0
  238. data/app/assets/stylesheets/process_engine/application.css +39 -0
  239. data/app/controllers/process_engine/application_controller.rb +28 -0
  240. data/app/controllers/process_engine/process_definitions_controller.rb +63 -0
  241. data/app/controllers/process_engine/process_instances_controller.rb +42 -0
  242. data/app/controllers/process_engine/process_tasks_controller.rb +23 -0
  243. data/app/helpers/process_engine/application_helper.rb +4 -0
  244. data/app/models/process_engine/consumer/consumer_task.rb +15 -0
  245. data/app/models/process_engine/error/false_task_state.rb +2 -0
  246. data/app/models/process_engine/listener/base.rb +49 -0
  247. data/app/models/process_engine/node_data_injection.rb +22 -0
  248. data/app/models/process_engine/parser/complex_gateway.rb +21 -0
  249. data/app/models/process_engine/parser/end_event.rb +23 -0
  250. data/app/models/process_engine/parser/exclusive_gateway.rb +25 -0
  251. data/app/models/process_engine/parser/extension/condition_expression.rb +39 -0
  252. data/app/models/process_engine/parser/extension/execution_listener.rb +15 -0
  253. data/app/models/process_engine/parser/extension/form_field.rb +50 -0
  254. data/app/models/process_engine/parser/extension/input_output.rb +28 -0
  255. data/app/models/process_engine/parser/extension/listener.rb +43 -0
  256. data/app/models/process_engine/parser/extension/property.rb +20 -0
  257. data/app/models/process_engine/parser/extension/task_listener.rb +15 -0
  258. data/app/models/process_engine/parser/extension/transitional_parameter.rb +53 -0
  259. data/app/models/process_engine/parser/inclusive_gateway.rb +25 -0
  260. data/app/models/process_engine/parser/parallel_gateway.rb +19 -0
  261. data/app/models/process_engine/parser/script_task.rb +37 -0
  262. data/app/models/process_engine/parser/sequence_flow.rb +36 -0
  263. data/app/models/process_engine/parser/start_event.rb +27 -0
  264. data/app/models/process_engine/parser/user_task.rb +36 -0
  265. data/app/models/process_engine/parser/xml_node.rb +125 -0
  266. data/app/models/process_engine/process_definition.rb +50 -0
  267. data/app/models/process_engine/process_instance.rb +72 -0
  268. data/app/models/process_engine/process_query.rb +52 -0
  269. data/app/models/process_engine/process_schema.rb +30 -0
  270. data/app/models/process_engine/process_task.rb +70 -0
  271. data/app/models/process_engine/schema/interceptor/exclusive_gateway.rb +39 -0
  272. data/app/models/process_engine/schema/node.rb +48 -0
  273. data/app/models/process_engine/schema/node_extension.rb +79 -0
  274. data/app/models/process_engine/schema/transition.rb +22 -0
  275. data/app/views/layouts/process_engine/application.html.erb +14 -0
  276. data/app/views/process_engine/layouts/_menu.html.haml +6 -0
  277. data/app/views/process_engine/layouts/application.html.haml +11 -0
  278. data/app/views/process_engine/process_definitions/_form.html.haml +6 -0
  279. data/app/views/process_engine/process_definitions/edit.html.haml +3 -0
  280. data/app/views/process_engine/process_definitions/index.html.haml +26 -0
  281. data/app/views/process_engine/process_definitions/new.html.haml +3 -0
  282. data/app/views/process_engine/process_definitions/show.html.haml +51 -0
  283. data/app/views/process_engine/process_instances/_form.html.haml +5 -0
  284. data/app/views/process_engine/process_instances/edit.html.haml +3 -0
  285. data/app/views/process_engine/process_instances/index.html.haml +29 -0
  286. data/app/views/process_engine/process_instances/show.html.haml +38 -0
  287. data/app/views/process_engine/process_tasks/index.html.haml +44 -0
  288. data/app/views/process_engine/share/_bpmn_canvas.html.haml +7 -0
  289. data/config/initializers/bower_rails.rb +16 -0
  290. data/config/initializers/simple_form.rb +166 -0
  291. data/config/initializers/simple_form_bootstrap.rb +135 -0
  292. data/config/locales/simple_form.en.yml +31 -0
  293. data/config/routes.rb +18 -0
  294. data/db/migrate/20150313063311_create_process_engine_process_definitions.rb +14 -0
  295. data/db/migrate/20150313063508_create_process_engine_process_instances.rb +15 -0
  296. data/db/migrate/20150313063633_create_process_engine_process_tasks.rb +30 -0
  297. data/lib/process_engine/engine.rb +12 -0
  298. data/lib/process_engine/version.rb +3 -0
  299. data/lib/process_engine.rb +8 -0
  300. data/lib/tasks/process_engine_tasks.rake +4 -0
  301. data/lib/templates/erb/scaffold/_form.html.erb +13 -0
  302. data/test/dummy/README.rdoc +28 -0
  303. data/test/dummy/Rakefile +6 -0
  304. data/test/dummy/app/assets/javascripts/application.js +13 -0
  305. data/test/dummy/app/assets/stylesheets/application.css +15 -0
  306. data/test/dummy/app/controllers/application_controller.rb +5 -0
  307. data/test/dummy/app/helpers/application_helper.rb +2 -0
  308. data/test/dummy/app/views/layouts/application.html.erb +14 -0
  309. data/test/dummy/bin/bundle +3 -0
  310. data/test/dummy/bin/rails +4 -0
  311. data/test/dummy/bin/rake +4 -0
  312. data/test/dummy/bin/setup +29 -0
  313. data/test/dummy/config/application.rb +26 -0
  314. data/test/dummy/config/boot.rb +5 -0
  315. data/test/dummy/config/database.yml +85 -0
  316. data/test/dummy/config/environment.rb +5 -0
  317. data/test/dummy/config/environments/development.rb +41 -0
  318. data/test/dummy/config/environments/production.rb +79 -0
  319. data/test/dummy/config/environments/test.rb +42 -0
  320. data/test/dummy/config/initializers/assets.rb +11 -0
  321. data/test/dummy/config/initializers/backtrace_silencers.rb +7 -0
  322. data/test/dummy/config/initializers/cookies_serializer.rb +3 -0
  323. data/test/dummy/config/initializers/filter_parameter_logging.rb +4 -0
  324. data/test/dummy/config/initializers/inflections.rb +16 -0
  325. data/test/dummy/config/initializers/mime_types.rb +4 -0
  326. data/test/dummy/config/initializers/session_store.rb +3 -0
  327. data/test/dummy/config/initializers/wrap_parameters.rb +14 -0
  328. data/test/dummy/config/locales/en.yml +23 -0
  329. data/test/dummy/config/routes.rb +4 -0
  330. data/test/dummy/config/secrets.yml +22 -0
  331. data/test/dummy/config.ru +4 -0
  332. data/test/dummy/db/schema.rb +66 -0
  333. data/test/dummy/log/development.log +9722 -0
  334. data/test/dummy/public/404.html +67 -0
  335. data/test/dummy/public/422.html +67 -0
  336. data/test/dummy/public/500.html +66 -0
  337. data/test/dummy/public/favicon.ico +0 -0
  338. data/test/dummy/tmp/cache/assets/development/sass/8afee1847b645742b0d2535a7c32f4f22e7926ec/bootstrap.scssc +0 -0
  339. data/test/dummy/tmp/cache/assets/development/sass/b5911aa594334efca1023d6f01abce0758e9648a/bootstrap.scssc +0 -0
  340. data/test/dummy/tmp/cache/assets/development/sprockets/014d8413350c7d85a5429f5e2c9ac911 +0 -0
  341. data/test/dummy/tmp/cache/assets/development/sprockets/0cbd667d0fbf9e0e6f60b5ebf2f95fa3 +0 -0
  342. data/test/dummy/tmp/cache/assets/development/sprockets/0f7ba040a442530a6d4a5bc8307769c1 +0 -0
  343. data/test/dummy/tmp/cache/assets/development/sprockets/0fca2cc9aa38138660d8c7d492cf81e4 +0 -0
  344. data/test/dummy/tmp/cache/assets/development/sprockets/0ff24903c54f534941fbc96ff862e475 +0 -0
  345. data/test/dummy/tmp/cache/assets/development/sprockets/11100f87277a2892323fe5581af75a7b +0 -0
  346. data/test/dummy/tmp/cache/assets/development/sprockets/13fe41fee1fe35b49d145bcc06610705 +0 -0
  347. data/test/dummy/tmp/cache/assets/development/sprockets/18a34084783e8b7f9bc871bc64b13eed +0 -0
  348. data/test/dummy/tmp/cache/assets/development/sprockets/1a3821ce28e0196075ed0830fcb45f38 +0 -0
  349. data/test/dummy/tmp/cache/assets/development/sprockets/1cf94b9a49ee68cb0f4065d48e9cbaf3 +0 -0
  350. data/test/dummy/tmp/cache/assets/development/sprockets/21a6373d6c40614fd05be57194c68248 +0 -0
  351. data/test/dummy/tmp/cache/assets/development/sprockets/26276ae8df51c046f3adc0b50a1521ba +0 -0
  352. data/test/dummy/tmp/cache/assets/development/sprockets/2eea4a8f4854d438cd03cb23a89b6d8c +0 -0
  353. data/test/dummy/tmp/cache/assets/development/sprockets/2f5173deea6c795b8fdde723bb4b63af +0 -0
  354. data/test/dummy/tmp/cache/assets/development/sprockets/357970feca3ac29060c1e3861e2c0953 +0 -0
  355. data/test/dummy/tmp/cache/assets/development/sprockets/3993bcd8bae4771e550d8fc91d1debbc +0 -0
  356. data/test/dummy/tmp/cache/assets/development/sprockets/3ccc4edae36a9c4bd70fc330c9c83dc9 +0 -0
  357. data/test/dummy/tmp/cache/assets/development/sprockets/3e391b0f37505fffc40ba9ffa13330a2 +0 -0
  358. data/test/dummy/tmp/cache/assets/development/sprockets/42e258b77f5dd532dfb9344a2d766de6 +0 -0
  359. data/test/dummy/tmp/cache/assets/development/sprockets/43a5910cb7a330ece5856c0e9099efa2 +0 -0
  360. data/test/dummy/tmp/cache/assets/development/sprockets/4e65ec1149f01e749e1e372861210d4d +0 -0
  361. data/test/dummy/tmp/cache/assets/development/sprockets/501160bcee63ae68449a5a5eb78b6d41 +0 -0
  362. data/test/dummy/tmp/cache/assets/development/sprockets/517beb0bf366ec3c8649da9ac8a8a01e +0 -0
  363. data/test/dummy/tmp/cache/assets/development/sprockets/525a556b1eaacfa041722e1250d9859a +0 -0
  364. data/test/dummy/tmp/cache/assets/development/sprockets/56edbae38e4e0ff9f4b4fc576ae3d746 +0 -0
  365. data/test/dummy/tmp/cache/assets/development/sprockets/5b04f4a7058d92f88f89f2248bcc16b0 +0 -0
  366. data/test/dummy/tmp/cache/assets/development/sprockets/5c3c69f7c2520b57620931c150032d7e +0 -0
  367. data/test/dummy/tmp/cache/assets/development/sprockets/5d1f8f2111e14084ebf711412c9230d2 +0 -0
  368. data/test/dummy/tmp/cache/assets/development/sprockets/5f9833d6835900c56d0e76a1b2924cc2 +0 -0
  369. data/test/dummy/tmp/cache/assets/development/sprockets/67c653cc36eb639f7a7af5159e9f9de3 +0 -0
  370. data/test/dummy/tmp/cache/assets/development/sprockets/704b33432a5ba417bcd5962ad999c671 +0 -0
  371. data/test/dummy/tmp/cache/assets/development/sprockets/7301f83e8e67f30be13546a794a553ef +0 -0
  372. data/test/dummy/tmp/cache/assets/development/sprockets/7482c8f712712a79937caf41413bca15 +0 -0
  373. data/test/dummy/tmp/cache/assets/development/sprockets/761cb171e67ddca71e8b9c74f0220457 +0 -0
  374. data/test/dummy/tmp/cache/assets/development/sprockets/7e23bd4385e166267961b6d936363042 +0 -0
  375. data/test/dummy/tmp/cache/assets/development/sprockets/7e5100f290c9ba0d4c026e43b58d0d79 +0 -0
  376. data/test/dummy/tmp/cache/assets/development/sprockets/80743880e8d46958e9839ff9408c3113 +0 -0
  377. data/test/dummy/tmp/cache/assets/development/sprockets/8b8941aae968854bafb4638a86cad77b +0 -0
  378. data/test/dummy/tmp/cache/assets/development/sprockets/9c292f3b6b577a92970303c351e1d4a1 +0 -0
  379. data/test/dummy/tmp/cache/assets/development/sprockets/a3435b13cfa60fb7469a19703350bda7 +0 -0
  380. data/test/dummy/tmp/cache/assets/development/sprockets/a6ce1b2837383f1e8b62b7f1ddcc6820 +0 -0
  381. data/test/dummy/tmp/cache/assets/development/sprockets/a7e90acc68ba69b7cd5c0a7005467c4b +0 -0
  382. data/test/dummy/tmp/cache/assets/development/sprockets/be4d00fb7bf467b370f0fda7e453ec68 +0 -0
  383. data/test/dummy/tmp/cache/assets/development/sprockets/c4fbf44e63e40cbbf825fe750374728f +0 -0
  384. data/test/dummy/tmp/cache/assets/development/sprockets/c593bacb8d3f003125f91763a7b36b10 +0 -0
  385. data/test/dummy/tmp/cache/assets/development/sprockets/c5ae3bc69f7b1e1fdb51a667c9f3cdd6 +0 -0
  386. data/test/dummy/tmp/cache/assets/development/sprockets/cc843b336460771bf75c97cf0935301b +0 -0
  387. data/test/dummy/tmp/cache/assets/development/sprockets/ce3b6127737ed36f7b62a54acec06b3e +0 -0
  388. data/test/dummy/tmp/cache/assets/development/sprockets/cffd775d018f68ce5dba1ee0d951a994 +0 -0
  389. data/test/dummy/tmp/cache/assets/development/sprockets/d58931b13c55c146d21475e532b126ba +0 -0
  390. data/test/dummy/tmp/cache/assets/development/sprockets/d771ace226fc8215a3572e0aa35bb0d6 +0 -0
  391. data/test/dummy/tmp/cache/assets/development/sprockets/dc6bbdc1e385c7bb2743011e9c2a7407 +0 -0
  392. data/test/dummy/tmp/cache/assets/development/sprockets/dd7270e11b484ae10f601e1dd014445a +0 -0
  393. data/test/dummy/tmp/cache/assets/development/sprockets/de86beefc60e0cd84dd1525af863e64d +0 -0
  394. data/test/dummy/tmp/cache/assets/development/sprockets/e0953e6e4a6c208e350f7f25d85bdce8 +0 -0
  395. data/test/dummy/tmp/cache/assets/development/sprockets/ec3b479833be43bf164a3deb119c3aee +0 -0
  396. data/test/dummy/tmp/cache/assets/development/sprockets/ef2cb0afc9a61a3d5819b4dfc84720ad +0 -0
  397. data/test/dummy/tmp/cache/assets/development/sprockets/f0511bbd6f6cd5530acddebb6d7e7044 +0 -0
  398. data/test/dummy/tmp/cache/assets/development/sprockets/f7009bba030498129042e0c542d4f264 +0 -0
  399. data/test/dummy/tmp/cache/assets/development/sprockets/f7cbd26ba1d28d48de824f0e94586655 +0 -0
  400. data/test/fixtures/process_engine/process_definitions.yml +17 -0
  401. data/test/fixtures/process_engine/process_instances.yml +11 -0
  402. data/test/fixtures/process_engine/process_tasks.yml +11 -0
  403. data/test/integration/navigation_test.rb +10 -0
  404. data/test/models/process_engine/process_definition_test.rb +9 -0
  405. data/test/models/process_engine/process_instance_test.rb +9 -0
  406. data/test/models/process_engine/process_task_test.rb +9 -0
  407. data/test/process_engine_test.rb +7 -0
  408. data/test/test_helper.rb +19 -0
  409. metadata +740 -0
@@ -0,0 +1,5 @@
1
+ /*! bpmn-js - bpmn-viewer v0.8.0 | (c) 2014, 2015 camunda Services GmbH | bpmn.io/license */
2
+ !function(e){if("object"==typeof exports&&"undefined"!=typeof module)module.exports=e();else if("function"==typeof define&&define.amd)define([],e);else{var t;"undefined"!=typeof window?t=window:"undefined"!=typeof global?t=global:"undefined"!=typeof self&&(t=self),t.BpmnJS=e()}}(function(){var e;return function t(e,n,i){function r(o,s){if(!n[o]){if(!e[o]){var p="function"==typeof require&&require;if(!s&&p)return p(o,!0);if(a)return a(o,!0);var c=new Error("Cannot find module '"+o+"'");throw c.code="MODULE_NOT_FOUND",c}var l=n[o]={exports:{}};e[o][0].call(l.exports,function(t){var n=e[o][1][t];return r(n?n:t)},l,l.exports,t,e,n,i)}return n[o].exports}for(var a="function"==typeof require&&require,o=0;o<i.length;o++)r(i[o]);return r}({1:[function(e,t){"use strict";function n(e,t){var n=e.get("eventBus");t.forEach(function(e){n.on(e.event,e.handler)})}function i(e){var t=/unparsable content <([^>]+)> detected([\s\S]*)$/,n=t.exec(e.message);return n&&(e.message="unparsable content <"+n[1]+"> detected; this may indicate an invalid BPMN 2.0 diagram file"+n[2]),e}function r(e){this.options=e=p.extend({},l,e||{});var t=e.container||s("body"),n=s('<div class="bjs-container"></div>').appendTo(t);n.css({width:e.width,height:e.height,position:e.position}),this.container=n.get(0);{var i="iVBORw0KGgoAAAANSUhEUgAAADQAAAA0CAMAAADypuvZAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAADBQTFRFiMte9PrwldFwfcZPqtqN0+zEyOe1XLgjvuKncsJAZ70y6fXh3vDT////UrQV////G2zN+AAAABB0Uk5T////////////////////AOAjXRkAAAHDSURBVHjavJZJkoUgDEBJmAX8979tM8u3E6x20VlYJfFFMoL4vBDxATxZcakIOJTWSmxvKWVIkJ8jHvlRv1F2LFrVISCZI+tCtQx+XfewgVTfyY3plPiQEAzI3zWy+kR6NBhFBYeBuscJLOUuA2WVLpCjVIaFzrNQZArxAZKUQm6gsj37L9Cb7dnIBUKxENaaMJQqMpDXvSL+ktxdGRm2IsKgJGGPg7atwUG5CcFUEuSv+CwQqizTrvDTNXdMU2bMiDWZd8d7QIySWVRsb2vBBioxOFt4OinPBapL+neAb5KL5IJ8szOza2/DYoipUCx+CjO0Bpsv0V6mktNZ+k8rlABlWG0FrOpKYVo8DT3dBeLEjUBAj7moDogVii7nSS9QzZnFcOVBp1g2PyBQ3Vr5aIapN91VJy33HTJLC1iX2FY6F8gRdaAeIEfVONgtFCzZTmoLEdOjBDfsIOA6128gw3eu1shAajdZNAORxuQDJN5A5PbEG6gNIu24QJD5iNyRMZIr6bsHbCtCU/OaOaSvgkUyDMdDa1BXGf5HJ1To+/Ym6mCKT02Y+/Sa126ZKyd3jxhzpc1r8zVL6YM1Qy/kR4ABAFJ6iQUnivhAAAAAAElFTkSuQmCC",r=s('<a href="http://bpmn.io" target="_blank" class="bjs-powered-by" title="Powered by bpmn.io" />').css({position:"absolute",bottom:15,right:15,zIndex:100});s("<img/>").attr("src","data:image/png;base64,"+i).appendTo(r)}r.appendTo(n)}var a=e(34),o=e(13),s=window.$,p=window._,c=e(8),l={width:"100%",height:"100%",position:"relative"};r.prototype.importXML=function(e,t){var n=this;this.moddle=this.createModdle(),this.moddle.fromXML(e,"bpmn:Definitions",function(e,r){return e?(e=i(e),t(e)):void n.importDefinitions(r,t)})},r.prototype.saveXML=function(e,t){t||(t=e,e={});var n=this.definitions;return n?void this.moddle.toXML(n,e,t):t(new Error("no definitions loaded"))},r.prototype.createModdle=function(){return new o},r.prototype.saveSVG=function(e,t){t||(t=e,e={});var n=this.get("canvas"),i=n.getDefaultLayer(),r=n._svg.select("defs"),a=i.innerSVG(),o=r&&r.outerSVG()||"",s=i.getBBox(),p='<?xml version="1.0" encoding="utf-8"?>\n<!-- created with bpmn-js / http://bpmn.io -->\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="'+s.width+'" height="'+s.height+'" viewBox="'+s.x+" "+s.y+" "+s.width+" "+s.height+'" version="1.1">'+o+a+"</svg>";t(null,p)},r.prototype.get=function(e){if(!this.diagram)throw new Error("no diagram loaded");return this.diagram.get(e)},r.prototype.invoke=function(e){if(!this.diagram)throw new Error("no diagram loaded");return this.diagram.invoke(e)},r.prototype.importDefinitions=function(e,t){try{this.diagram&&this.clear(),this.definitions=e;var n=this.diagram=this._createDiagram(this.options);this._init(n),c.importBpmnDiagram(n,e,t)}catch(i){t(i)}},r.prototype._init=function(e){n(e,this.__listeners||[])},r.prototype._createDiagram=function(e){var t=[].concat(e.modules||this.getModules(),e.additionalModules||[]);return t.unshift({bpmnjs:["value",this],moddle:["value",this.moddle]}),e=p.omit(e,"additionalModules"),e=p.extend(e,{canvas:{container:this.container},modules:t}),new a(e)},r.prototype.getModules=function(){return this._modules},r.prototype.clear=function(){var e=this.diagram;e&&e.destroy()},r.prototype.destroy=function(){this.clear(),s(this.container).remove()},r.prototype.on=function(e,t){var n=this.diagram,i=this.__listeners=this.__listeners||[];i.push({event:e,handler:t}),n&&n.get("eventBus").on(e,t)},r.prototype._modules=[e(2),e(56),e(52)],t.exports=r},{}],2:[function(e,t){t.exports={__depends__:[e(5),e(10)]}},{}],3:[function(e,t){"use strict";function n(e,t,n){function p(e,t){F[e]=t}function c(e){return F[e]}function l(e){function t(e,t){var n=i.extend({fill:"black",strokeWidth:1,strokeLinecap:"round",strokeDasharray:"none"},t.attrs),r=t.ref||{x:0,y:0},a=t.scale||1;"none"===n.strokeDasharray&&(n.strokeDasharray=[1e4,1]);var o=t.element.attr(n).marker(0,0,20,20,r.x,r.y).attr({markerWidth:20*a,markerHeight:20*a});return p(e,o)}t("sequenceflow-end",{element:e.path("M 1 5 L 11 10 L 1 15 Z"),ref:{x:11,y:10},scale:.5}),t("messageflow-start",{element:e.circle(6,6,5),attrs:{fill:"white",stroke:"black"},ref:{x:6,y:6}}),t("messageflow-end",{element:e.path("M 1 5 L 11 10 L 1 15 Z"),attrs:{fill:"white",stroke:"black"},ref:{x:11,y:10}}),t("data-association-end",{element:e.path("M 1 5 L 11 10 L 1 15"),attrs:{fill:"white",stroke:"black"},ref:{x:11,y:10},scale:.5}),t("conditional-flow-marker",{element:e.path("M 0 10 L 8 6 L 16 10 L 8 14 Z"),attrs:{fill:"white",stroke:"black"},ref:{x:-1,y:10},scale:.5}),t("conditional-default-flow-marker",{element:e.path("M 1 4 L 5 16"),attrs:{stroke:"black"},ref:{x:-5,y:10},scale:.5})}function u(e,n,r){return i.isArray(n)||(r=n,n=[]),t.style(n||[],i.extend(r,e||{}))}function m(e,t,n,r,a){i.isObject(r)&&(a=r,r=0),r=r||0,a=u(a,{stroke:"black",strokeWidth:2,fill:"white"});var o=t/2,s=n/2;return e.circle(o,s,Math.round((t+n)/4-r)).attr(a)}function h(e,t,n,r,a,o){return i.isObject(a)&&(o=a,a=0),a=a||0,o=u(o,{stroke:"black",strokeWidth:2,fill:"white"}),e.rect(a,a,t-2*a,n-2*a,r).attr(o)}function f(e,t,n,i){var r=t/2,a=n/2,o=[r,0,t,a,r,n,0,a];return i=u(i,{stroke:"black",strokeWidth:2,fill:"white"}),e.polygon(o).attr(i)}function d(e,t,n){return n=u(n,["no-fill"],{stroke:"black",strokeWidth:2,fill:"none"}),s(t,n).appendTo(e)}function y(e,t,n){return n=u(n,["no-fill"],{strokeWidth:2,stroke:"black"}),e.path(t).attr(n)}function g(e){return function(t,n){return W[e](t,n)}}function v(e){return W[e]}function E(e,t){var n=k(e),i=N(n);return D(n,"bpmn:MessageEventDefinition")?v("bpmn:MessageEventDefinition")(t,e,i):D(n,"bpmn:TimerEventDefinition")?v("bpmn:TimerEventDefinition")(t,e,i):D(n,"bpmn:ConditionalEventDefinition")?v("bpmn:ConditionalEventDefinition")(t,e):D(n,"bpmn:SignalEventDefinition")?v("bpmn:SignalEventDefinition")(t,e,i):D(n,"bpmn:CancelEventDefinition")&&D(n,"bpmn:TerminateEventDefinition",{parallelMultiple:!1})?v("bpmn:MultipleEventDefinition")(t,e,i):D(n,"bpmn:CancelEventDefinition")&&D(n,"bpmn:TerminateEventDefinition",{parallelMultiple:!0})?v("bpmn:ParallelMultipleEventDefinition")(t,e,i):D(n,"bpmn:EscalationEventDefinition")?v("bpmn:EscalationEventDefinition")(t,e,i):D(n,"bpmn:LinkEventDefinition")?v("bpmn:LinkEventDefinition")(t,e,i):D(n,"bpmn:ErrorEventDefinition")?v("bpmn:ErrorEventDefinition")(t,e,i):D(n,"bpmn:CancelEventDefinition")?v("bpmn:CancelEventDefinition")(t,e,i):D(n,"bpmn:CompensateEventDefinition")?v("bpmn:CompensateEventDefinition")(t,e,i):D(n,"bpmn:TerminateEventDefinition")?v("bpmn:TerminateEventDefinition")(t,e,i):null}function x(e,t,n){return I.createText(e,t||"",n).addClass("djs-label")}function w(e,t,n){var i=k(t);return x(e,i.name,{box:t,align:n,padding:5})}function b(e,t,n){var i=k(t);return i.name||(t.hidden=!0),x(e,i.name,{box:t,align:n,style:{fontSize:"11px"}})}function A(e,t,n){var i=x(e,t,{box:{height:30,width:n.height},align:"center-middle"}),r=-1*n.height;i.transform("rotate(270) translate("+r+",0)")}function S(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}function R(e,t,n){var r,a=k(t),o=i.contains(n,"SubProcessMarker");return r=o?{seq:-21,parallel:-22,compensation:-42,loop:-18,adhoc:10}:{seq:-3,parallel:-6,compensation:-27,loop:0,adhoc:10},i.forEach(n,function(n){v(n)(e,t,r)}),"bpmn:AdHocSubProcess"===a.$type&&v("AdhocMarker")(e,t,r),a.loopCharacteristics&&void 0===a.loopCharacteristics.isSequential?void v("LoopMarker")(e,t,r):(a.loopCharacteristics&&void 0!==a.loopCharacteristics.isSequential&&!a.loopCharacteristics.isSequential&&v("ParallelMarker")(e,t,r),a.loopCharacteristics&&a.loopCharacteristics.isSequential&&v("SequentialMarker")(e,t,r),void(a.isForCompensation&&v("CompensationMarker")(e,t,r)))}function _(e,t){var n=t.type,i=W[n];return i?i(e,t):r.prototype.drawShape.apply(this,[e,t])}function C(e,t){var n=t.type,i=W[n];return i?i(e,t):r.prototype.drawConnection.apply(this,[e,t])}function M(e,t){{var i=(t.height-16)/t.height,r=n.getScaledPath("DATA_OBJECT_COLLECTION_PATH",{xScaleFactor:1,yScaleFactor:1,containerWidth:t.width,containerHeight:t.height,position:{mx:.451,my:i}});y(e,r,{strokeWidth:2})}}function T(e){return e.isCollection||e.elementObjectRef&&e.elementObjectRef.isCollection}function P(e){return e.businessObject.di}function k(e){return e.businessObject}function D(e,t,n){function r(e,t){return i.all(t,function(t,n){return e[n]==t})}return i.any(e.eventDefinitions,function(i){return i.$type===t&&r(e,n)})}function N(e){return"bpmn:IntermediateThrowEvent"===e.$type||"bpmn:EndEvent"===e.$type}r.call(this,t);var B=10,O=3,L={fontFamily:"Arial, sans-serif",fontSize:"12px"},I=new a({style:L,size:{width:100}}),F={},W={"bpmn:Event":function(e,t,n){return m(e,t.width,t.height,n)},"bpmn:StartEvent":function(e,t){var n={},i=k(t);i.isInterrupting||(n={strokeDasharray:"6",strokeLinecap:"round"});var r=v("bpmn:Event")(e,t,n);return E(t,e),r},"bpmn:MessageEventDefinition":function(e,t,i){var r=n.getScaledPath("EVENT_MESSAGE",{xScaleFactor:.9,yScaleFactor:.9,containerWidth:t.width,containerHeight:t.height,position:{mx:.235,my:.315}}),a=i?"black":"white",o=i?"white":"black",s=y(e,r,{strokeWidth:1,fill:a,stroke:o});return s},"bpmn:TimerEventDefinition":function(e,t){for(var i=m(e,t.width,t.height,.2*t.height,{strokeWidth:2}),r=n.getScaledPath("EVENT_TIMER_WH",{xScaleFactor:.75,yScaleFactor:.75,containerWidth:t.width,containerHeight:t.height,position:{mx:.5,my:.5}}),a=(y(e,r,{strokeWidth:2,strokeLinecap:"square"}),0);12>a;a++){var o=n.getScaledPath("EVENT_TIMER_LINE",{xScaleFactor:.75,yScaleFactor:.75,containerWidth:t.width,containerHeight:t.height,position:{mx:.5,my:.5}}),s=t.width/2,p=t.height/2;y(e,o,{strokeWidth:1,strokeLinecap:"square",transform:"rotate("+30*a+","+p+","+s+")"})}return i},"bpmn:EscalationEventDefinition":function(e,t,i){var r=n.getScaledPath("EVENT_ESCALATION",{xScaleFactor:1,yScaleFactor:1,containerWidth:t.width,containerHeight:t.height,position:{mx:.5,my:.555}}),a=i?"black":"none";return y(e,r,{strokeWidth:1,fill:a})},"bpmn:ConditionalEventDefinition":function(e,t){var i=n.getScaledPath("EVENT_CONDITIONAL",{xScaleFactor:1,yScaleFactor:1,containerWidth:t.width,containerHeight:t.height,position:{mx:.5,my:.222}});return y(e,i,{strokeWidth:1})},"bpmn:LinkEventDefinition":function(e,t){var i=n.getScaledPath("EVENT_LINK",{xScaleFactor:1,yScaleFactor:1,containerWidth:t.width,containerHeight:t.height,position:{mx:.57,my:.263}});return y(e,i,{strokeWidth:1})},"bpmn:ErrorEventDefinition":function(e,t,i){var r=n.getScaledPath("EVENT_ERROR",{xScaleFactor:1.1,yScaleFactor:1.1,containerWidth:t.width,containerHeight:t.height,position:{mx:.2,my:.722}}),a=i?"black":"none";return y(e,r,{strokeWidth:1,fill:a})},"bpmn:CancelEventDefinition":function(e,t,i){var r=n.getScaledPath("EVENT_CANCEL_45",{xScaleFactor:1,yScaleFactor:1,containerWidth:t.width,containerHeight:t.height,position:{mx:.638,my:-.055}}),a=i?"black":"none";return y(e,r,{strokeWidth:1,fill:a}).transform("rotate(45)")},"bpmn:CompensateEventDefinition":function(e,t,i){var r=n.getScaledPath("EVENT_COMPENSATION",{xScaleFactor:1,yScaleFactor:1,containerWidth:t.width,containerHeight:t.height,position:{mx:.201,my:.472}}),a=i?"black":"none";return y(e,r,{strokeWidth:1,fill:a})},"bpmn:SignalEventDefinition":function(e,t,i){var r=n.getScaledPath("EVENT_SIGNAL",{xScaleFactor:.9,yScaleFactor:.9,containerWidth:t.width,containerHeight:t.height,position:{mx:.5,my:.2}}),a=i?"black":"none";return y(e,r,{strokeWidth:1,fill:a})},"bpmn:MultipleEventDefinition":function(e,t,i){var r=n.getScaledPath("EVENT_MULTIPLE",{xScaleFactor:1.1,yScaleFactor:1.1,containerWidth:t.width,containerHeight:t.height,position:{mx:.222,my:.36}}),a=i?"black":"none";return y(e,r,{strokeWidth:1,fill:a})},"bpmn:ParallelMultipleEventDefinition":function(e,t){var i=n.getScaledPath("EVENT_PARALLEL_MULTIPLE",{xScaleFactor:1.2,yScaleFactor:1.2,containerWidth:t.width,containerHeight:t.height,position:{mx:.458,my:.194}});return y(e,i,{strokeWidth:1})},"bpmn:EndEvent":function(e,t){var n=v("bpmn:Event")(e,t,{strokeWidth:4});return E(t,e,!0),n},"bpmn:TerminateEventDefinition":function(e,t){var n=m(e,t.width,t.height,8,{strokeWidth:4,fill:"black"});return n},"bpmn:IntermediateEvent":function(e,t){{var n=v("bpmn:Event")(e,t,{strokeWidth:1});m(e,t.width,t.height,O,{strokeWidth:1,fill:"none"})}return E(t,e),n},"bpmn:IntermediateCatchEvent":g("bpmn:IntermediateEvent"),"bpmn:IntermediateThrowEvent":g("bpmn:IntermediateEvent"),"bpmn:Activity":function(e,t,n){return h(e,t.width,t.height,B,n)},"bpmn:Task":function(e,t){var n=v("bpmn:Activity")(e,t);return w(e,t,"center-middle"),R(e,t),n},"bpmn:ServiceTask":function(e,t){{var i=v("bpmn:Task")(e,t),r=n.getScaledPath("TASK_TYPE_SERVICE",{abspos:{x:12,y:18}}),a=(y(e,r,{strokeWidth:1,fill:"none"}),n.getScaledPath("TASK_TYPE_SERVICE_FILL",{abspos:{x:17.2,y:18}})),o=(y(e,a,{strokeWidth:0,stroke:"none",fill:"white"}),n.getScaledPath("TASK_TYPE_SERVICE",{abspos:{x:17,y:22}}));y(e,o,{strokeWidth:1,fill:"white"})}return i},"bpmn:UserTask":function(e,t){{var i=v("bpmn:Task")(e,t),r=15,a=12,o=n.getScaledPath("TASK_TYPE_USER_1",{abspos:{x:r,y:a}}),s=(y(e,o,{strokeWidth:.5,fill:"none"}),n.getScaledPath("TASK_TYPE_USER_2",{abspos:{x:r,y:a}})),p=(y(e,s,{strokeWidth:.5,fill:"none"}),n.getScaledPath("TASK_TYPE_USER_3",{abspos:{x:r,y:a}}));y(e,p,{strokeWidth:.5,fill:"black"})}return i},"bpmn:ManualTask":function(e,t){{var i=v("bpmn:Task")(e,t),r=n.getScaledPath("TASK_TYPE_MANUAL",{abspos:{x:17,y:15}});y(e,r,{strokeWidth:.25,fill:"white",stroke:"black"})}return i},"bpmn:SendTask":function(e,t){{var i=v("bpmn:Task")(e,t),r=n.getScaledPath("TASK_TYPE_SEND",{xScaleFactor:1,yScaleFactor:1,containerWidth:21,containerHeight:14,position:{mx:.285,my:.357}});y(e,r,{strokeWidth:1,fill:"black",stroke:"white"})}return i},"bpmn:ReceiveTask":function(e,t){var i,r=k(t),a=v("bpmn:Task")(e,t);r.instantiate?(m(e,28,28,4.4,{strokeWidth:1}),i=n.getScaledPath("TASK_TYPE_INSTANTIATING_SEND",{abspos:{x:7.77,y:9.52}})):i=n.getScaledPath("TASK_TYPE_SEND",{xScaleFactor:.9,yScaleFactor:.9,containerWidth:21,containerHeight:14,position:{mx:.3,my:.4}});y(e,i,{strokeWidth:1});return a},"bpmn:ScriptTask":function(e,t){{var i=v("bpmn:Task")(e,t),r=n.getScaledPath("TASK_TYPE_SCRIPT",{abspos:{x:15,y:20}});y(e,r,{strokeWidth:1})}return i},"bpmn:BusinessRuleTask":function(e,t){var i=v("bpmn:Task")(e,t),r=n.getScaledPath("TASK_TYPE_BUSINESS_RULE_HEADER",{abspos:{x:8,y:8}}),a=y(e,r);a.attr({strokeWidth:1,fill:"AAA"});var o=n.getScaledPath("TASK_TYPE_BUSINESS_RULE_MAIN",{abspos:{x:8,y:8}}),s=y(e,o);return s.attr({strokeWidth:1}),i},"bpmn:SubProcess":function(e,t,n){var i=v("bpmn:Activity")(e,t,n),r=k(t),a=(P(t),o.isExpanded(r)),s=!!r.triggeredByEvent;return s&&i.attr({strokeDasharray:"1,2"}),w(e,t,a?"center-top":"center-middle"),a?R(e,t):R(e,t,["SubProcessMarker"]),i},"bpmn:AdHocSubProcess":function(e,t){return v("bpmn:SubProcess")(e,t)},"bpmn:Transaction":function(e,n){{var i=v("bpmn:SubProcess")(e,n),r=t.style(["no-fill","no-events"]);h(e,n.width,n.height,B-2,O,r)}return i},"bpmn:CallActivity":function(e,t){return v("bpmn:SubProcess")(e,t,{strokeWidth:5})},"bpmn:Participant":function(e,t){var n=v("bpmn:Lane")(e,t),i=o.isExpandedPool(k(t));if(i){d(e,[{x:30,y:0},{x:30,y:t.height}]);var r=k(t).name;A(e,r,t)}else{var a=k(t).name;x(e,a,{box:t,align:"center-middle"})}var s=!!k(t).participantMultiplicity;return s&&v("ParticipantMultiplicityMarker")(e,t),n},"bpmn:Lane":function(e,t){var n=h(e,t.width,t.height,0,{fill:"none"}),i=k(t);if("bpmn:Lane"===i.$type){var r=i.name;A(e,r,t)}return n},"bpmn:InclusiveGateway":function(e,t){{var n=f(e,t.width,t.height);m(e,t.width,t.height,.24*t.height,{strokeWidth:2.5,fill:"none"})}return n},"bpmn:ExclusiveGateway":function(e,t){var i=f(e,t.width,t.height),r=n.getScaledPath("GATEWAY_EXCLUSIVE",{xScaleFactor:.4,yScaleFactor:.4,containerWidth:t.width,containerHeight:t.height,position:{mx:.32,my:.3}});return P(t).isMarkerVisible&&y(e,r,{strokeWidth:1,fill:"black"}),i},"bpmn:ComplexGateway":function(e,t){{var i=f(e,t.width,t.height),r=n.getScaledPath("GATEWAY_COMPLEX",{xScaleFactor:.5,yScaleFactor:.5,containerWidth:t.width,containerHeight:t.height,position:{mx:.46,my:.26}});y(e,r,{strokeWidth:1,fill:"black"})}return i},"bpmn:ParallelGateway":function(e,t){{var i=f(e,t.width,t.height),r=n.getScaledPath("GATEWAY_PARALLEL",{xScaleFactor:.6,yScaleFactor:.6,containerWidth:t.width,containerHeight:t.height,position:{mx:.46,my:.2}});y(e,r,{strokeWidth:1,fill:"black"})}return i},"bpmn:EventBasedGateway":function(e,t){function i(){{var i=n.getScaledPath("GATEWAY_EVENT_BASED",{xScaleFactor:.18,yScaleFactor:.18,containerWidth:t.width,containerHeight:t.height,position:{mx:.36,my:.44}});y(e,i,{strokeWidth:2,fill:"none"})}}var r=k(t),a=f(e,t.width,t.height),o=(m(e,t.width,t.height,.2*t.height,{strokeWidth:1,fill:"none"}),r.eventGatewayType),s=!!r.instantiate;if("Parallel"===o){var p=n.getScaledPath("GATEWAY_PARALLEL",{xScaleFactor:.4,yScaleFactor:.4,containerWidth:t.width,containerHeight:t.height,position:{mx:.474,my:.296}}),c=y(e,p);c.attr({strokeWidth:1,fill:"none"})}else if("Exclusive"===o){if(!s){var l=m(e,t.width,t.height,.26*t.height);l.attr({strokeWidth:1,fill:"none"})}i()}return a},"bpmn:Gateway":function(e,t){return f(e,t.width,t.height)},"bpmn:SequenceFlow":function(e,t){var n=S(t),i=y(e,n,{markerEnd:c("sequenceflow-end")}),r=k(t),a=t.source.businessObject;return r.conditionExpression&&a.$instanceOf("bpmn:Task")&&i.attr({markerStart:c("conditional-flow-marker")}),a["default"]&&a.$instanceOf("bpmn:Gateway")&&a["default"]===r&&i.attr({markerStart:c("conditional-default-flow-marker")}),i},"bpmn:Association":function(e,t,n){return n=i.extend({strokeDasharray:"1,6",strokeLinecap:"round"},n||{}),d(e,t.waypoints,n)},"bpmn:DataInputAssociation":function(e,t){return v("bpmn:Association")(e,t,{markerEnd:c("data-association-end")})},"bpmn:DataOutputAssociation":function(e,t){return v("bpmn:Association")(e,t,{markerEnd:c("data-association-end")})},"bpmn:MessageFlow":function(e,t){var i=P(t),r=S(t),a=y(e,r,{markerEnd:c("messageflow-end"),markerStart:c("messageflow-start"),strokeDasharray:"10",strokeLinecap:"round",strokeWidth:1});if(i.messageVisibleKind){var o=a.getPointAtLength(a.getTotalLength()/2),s=n.getScaledPath("MESSAGE_FLOW_MARKER",{abspos:{x:o.x,y:o.y}}),p={strokeWidth:1};"initiating"===i.messageVisibleKind?(p.fill="white",p.stroke="black"):(p.fill="#888",p.stroke="white"),y(e,s,p)}return a},"bpmn:DataObject":function(e,t){var i=n.getScaledPath("DATA_OBJECT_PATH",{xScaleFactor:1,yScaleFactor:1,containerWidth:t.width,containerHeight:t.height,position:{mx:.474,my:.296}}),r=y(e,i,{fill:"white"}),a=k(t);return T(a)&&M(e,t),r},"bpmn:DataObjectReference":g("bpmn:DataObject"),"bpmn:DataInput":function(e,t){{var i=n.getRawPath("DATA_ARROW"),r=v("bpmn:DataObject")(e,t);y(e,i,{strokeWidth:1})}return r},"bpmn:DataOutput":function(e,t){{var i=n.getRawPath("DATA_ARROW"),r=v("bpmn:DataObject")(e,t);y(e,i,{strokeWidth:1,fill:"black"})}return r},"bpmn:DataStoreReference":function(e,t){var i=n.getScaledPath("DATA_STORE",{xScaleFactor:1,yScaleFactor:1,containerWidth:t.width,containerHeight:t.height,position:{mx:0,my:.133}}),r=y(e,i,{strokeWidth:2,fill:"white"});return r},"bpmn:BoundaryEvent":function(e,t){var n=k(t),i=n.cancelActivity,r={strokeLinecap:"round",strokeWidth:1};i||(r.strokeDasharray="6");{var a=v("bpmn:Event")(e,t,r);m(e,t.width,t.height,O,r)}return E(t,e),a},"bpmn:Group":function(e,t){return h(e,t.width,t.height,B,{strokeWidth:1,strokeDasharray:"8,3,1,3",fill:"none",pointerEvents:"none"})},label:function(e,t){return b(e,t,"")},"bpmn:TextAnnotation":function(e,t){var i={fill:"none",stroke:"none"},r=h(e,t.width,t.height,0,0,i),a=n.getScaledPath("TEXT_ANNOTATION",{xScaleFactor:1,yScaleFactor:1,containerWidth:t.width,containerHeight:t.height,position:{mx:0,my:0}});y(e,a);var o=k(t).text||"";return x(e,o,{box:t,align:"left-middle",padding:5}),r},ParticipantMultiplicityMarker:function(e,t){var i=n.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}});y(e,i)},SubProcessMarker:function(e,t){var i=h(e,14,14,0,{strokeWidth:1});i.transform("translate("+(t.width/2-7.5)+","+(t.height-20)+")");var r=n.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}});y(e,r)},ParallelMarker:function(e,t,i){var r=n.getScaledPath("MARKER_PARALLEL",{xScaleFactor:1,yScaleFactor:1,containerWidth:t.width,containerHeight:t.height,position:{mx:(t.width/2+i.parallel)/t.width,my:(t.height-20)/t.height}});y(e,r)},SequentialMarker:function(e,t,i){var r=n.getScaledPath("MARKER_SEQUENTIAL",{xScaleFactor:1,yScaleFactor:1,containerWidth:t.width,containerHeight:t.height,position:{mx:(t.width/2+i.seq)/t.width,my:(t.height-19)/t.height}});y(e,r)},CompensationMarker:function(e,t,i){var r=n.getScaledPath("MARKER_COMPENSATION",{xScaleFactor:1,yScaleFactor:1,containerWidth:t.width,containerHeight:t.height,position:{mx:(t.width/2+i.compensation)/t.width,my:(t.height-13)/t.height}});y(e,r,{strokeWidth:1})},LoopMarker:function(e,t,i){var r=n.getScaledPath("MARKER_LOOP",{xScaleFactor:1,yScaleFactor:1,containerWidth:t.width,containerHeight:t.height,position:{mx:(t.width/2+i.loop)/t.width,my:(t.height-7)/t.height}});y(e,r,{strokeWidth:1,fill:"none",strokeLinecap:"round",strokeMiterlimit:.5})},AdhocMarker:function(e,t,i){var r=n.getScaledPath("MARKER_ADHOC",{xScaleFactor:1,yScaleFactor:1,containerWidth:t.width,containerHeight:t.height,position:{mx:(t.width/2+i.adhoc)/t.width,my:(t.height-15)/t.height}});y(e,r,{strokeWidth:1,fill:"black"})}};e.on("canvas.init",function(e){l(e.svg)}),this.drawShape=_,this.drawConnection=C}var i=window._,r=e(42),a=e(64),o=e(11),s=r.createLine;n.prototype=Object.create(r.prototype),n.$inject=["eventBus","styles","pathMap"],t.exports=n},{}],4:[function(e,t){"use strict";function n(e){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} c -{e.x1},{e.y0} -{e.x3},{e.y1} -{e.x5},{e.y4} {e.x1},-{e.y3} {e.x3},-{e.y5} {e.x5},-{e.y6} {e.x0},{e.y3} {e.x2},{e.y5} {e.x4},{e.y6} -{e.x0},-{e.y0} -{e.x2},-{e.y1} -{e.x4},-{e.y4} z",height:36,width:36,heightElements:[2.382,4.764,4.926,6.589333,7.146,13.178667,19.768],widthElements:[2.463,2.808,4.926,5.616,7.389,8.424]},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.x0},0 {e.x0},-{e.y0} 0,{e.y1} z",height:36,width:36,heightElements:[5,10],widthElements:[10]},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} 8,-5 0,10 z m 9,0 8,-5 0,10 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
3
+ },this.getScaledPath=function(t,n){var i,r,a=this.pathMap[t];n.abspos?(i=n.abspos.x,r=n.abspos.y):(i=n.containerWidth*n.position.mx,r=n.containerHeight*n.position.my);var o={};if(n.position){for(var s=n.containerHeight/a.height*n.yScaleFactor,p=n.containerWidth/a.width*n.xScaleFactor,c=0;c<a.heightElements.length;c++)o["y"+c]=a.heightElements[c]*s;for(var l=0;l<a.widthElements.length;l++)o["x"+l]=a.widthElements[l]*p}var u=e.format(a.d,{mx:i,my:r,e:o});return u}}n.$inject=["snap"],t.exports=n},{}],5:[function(e,t){t.exports={renderer:["type",e(3)],pathMap:["type",e(4)]}},{}],6:[function(e,t){"use strict";function n(e,t){return a.extend({id:e.id,type:e.$type,businessObject:e},t)}function i(e){return a.collect(e,function(e){return{x:e.x,y:e.y}})}function r(e,t,n,i){this._eventBus=e,this._canvas=t,this._elementFactory=n,this._elementRegistry=i}var a=window._,o=e(12),s=o.hasExternalLabel,p=o.getExternalLabelBounds,c=e(11).isExpanded,l=e(9).elementToString;r.$inject=["eventBus","canvas","elementFactory","elementRegistry"],t.exports=r,r.prototype.add=function(e,t){var r,a=e.di;if(a.$instanceOf("bpmndi:BPMNPlane"))r=this._elementFactory.createRoot(n(e)),this._canvas.setRootElement(r);else if(a.$instanceOf("bpmndi:BPMNShape")){var o=!c(e),p=t&&(t.hidden||t.collapsed),u=e.di.bounds;r=this._elementFactory.createShape(n(e,{collapsed:o,hidden:p,x:Math.round(u.x),y:Math.round(u.y),width:Math.round(u.width),height:Math.round(u.height)})),this._canvas.addShape(r,t)}else{if(!a.$instanceOf("bpmndi:BPMNEdge"))throw new Error("unknown di "+l(a)+" for element "+l(e));var m=this._getSource(e),h=this._getTarget(e);r=this._elementFactory.createConnection(n(e,{source:m,target:h,waypoints:i(e.di.waypoint)})),this._canvas.addConnection(r,t)}return s(e)&&this.addLabel(e,r),this._eventBus.fire("bpmnElement.added",{element:r}),r},r.prototype.addLabel=function(e,t){var i=p(e,t),r=this._elementFactory.createLabel(n(e,{id:e.id+"_label",labelTarget:t,type:"label",hidden:t.hidden,x:Math.round(i.x),y:Math.round(i.y),width:Math.round(i.width),height:Math.round(i.height)}));return this._canvas.addShape(r,t.parent)},r.prototype._getEnd=function(e,t){var n,i,r=e.$type;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 new Error(i?"element "+l(i)+" referenced by "+l(e)+"#"+t+"Ref not yet drawn":l(e)+"#"+t+"Ref not specified")},r.prototype._getSource=function(e){return this._getEnd(e,"source")},r.prototype._getTarget=function(e){return this._getEnd(e,"target")},r.prototype._getElement=function(e){return this._elementRegistry.get(e.id)}},{}],7:[function(e,t){"use strict";function n(e){return r.find(e.rootElements,function(e){return e.$instanceOf("bpmn:Process")||e.$instanceOf("bpmn:Collaboration")})}function i(e){function t(e,t){return function(n){e(n,t)}}function i(e,t){return e.$instanceOf(t)}function a(t,n){var i=t.gfx;if(i)throw new Error("already rendered "+o(t));return e.element(t,n)}function p(t,n){return e.root(t,n)}function c(e,t){try{return e.di&&a(e,t)}catch(n){l(n.message,{element:e,error:n}),console.error("failed to import "+o(e)),console.error(n)}}function l(t,n){e.error(t,n)}function u(e){var t=e.bpmnElement;t?t.di?l("multiple DI elements defined for "+o(t),{element:t}):(s.bind(t,"di"),t.di=e):l("no bpmnElement referenced in "+o(e),{element:e})}function m(e){h(e.plane)}function h(e){u(e),r.forEach(e.planeElement,f)}function f(e){u(e)}function d(e,t){var r=e.diagrams;if(t&&-1===r.indexOf(t))throw new Error("diagram not part of bpmn:Definitions");if(!t&&r&&r.length&&(t=r[0]),t){m(t);var a=t.plane;if(!a)throw new Error("no plane for "+o(t));var s=a.bpmnElement;if(!s){if(s=n(e),!s)throw new Error("do not know what to display");l("correcting missing bpmnElement on "+o(a)+" to "+o(s)),a.bpmnElement=s,u(a)}var c=p(s,a);if(i(s,"bpmn:Process"))g(s,c);else{if(!i(s,"bpmn:Collaboration"))throw new Error("unsupported bpmnElement for "+o(a)+" : "+o(s));W(s,c),v(e.rootElements,c)}y(j)}}function y(e){r.forEach(e,function(e){e()})}function g(e,t){O(e,t),_(e.ioSpecification,t),R(e.artifacts,t),V.push(e)}function v(e){var n=r.filter(e,function(e){return i(e,"bpmn:Process")&&e.laneSets&&-1===V.indexOf(e)});n.forEach(t(g))}function E(e,t){c(e,t)}function x(e,n){r.forEach(e,t(E,n))}function w(e,t){c(e,t)}function b(e,t){c(e,t)}function A(e,t){c(e,t)}function S(e,t){c(e,t)}function R(e,t){r.forEach(e,function(e){i(e,"bpmn:Association")?j.push(function(){S(e,t)}):S(e,t)})}function _(e,n){e&&(r.forEach(e.dataInputs,t(b,n)),r.forEach(e.dataOutputs,t(A,n)))}function C(e,t){O(e,t),R(e.artifacts,t)}function M(e,t){var n=c(e,t);i(e,"bpmn:SubProcess")&&C(e,n||t)}function T(e,t){c(e,t)}function P(e,t){c(e,t)}function k(e,t){c(e,t)}function D(e,t){var n=c(e,t);if(e.childLaneSet)N(e.childLaneSet,n||t);else{var i=r.filter(e.flowNodeRef,function(e){return"bpmn:BoundaryEvent"!==e.$type});I(i,n||t)}}function N(e,n){r.forEach(e.lanes,t(D,n))}function B(e,n){r.forEach(e,t(N,n))}function O(e,t){e.laneSets?(B(e.laneSets,t),L(e.flowElements)):I(e.flowElements,t)}function L(e,t){r.forEach(e,function(e){i(e,"bpmn:SequenceFlow")?j.push(function(){T(e,t)}):i(e,"bpmn:BoundaryEvent")?j.unshift(function(){k(e,t)}):i(e,"bpmn:DataObject")||(i(e,"bpmn:DataStoreReference")?P(e,t):i(e,"bpmn:DataObjectReference")&&P(e,t))})}function I(e,n){r.forEach(e,function(e){i(e,"bpmn:SequenceFlow")?j.push(function(){T(e,n)}):i(e,"bpmn:BoundaryEvent")?j.unshift(function(){k(e,n)}):i(e,"bpmn:FlowNode")?(M(e,n),i(e,"bpmn:Activity")&&(_(e.ioSpecification,n),j.push(function(){r.forEach(e.dataInputAssociations,t(w,n)),r.forEach(e.dataOutputAssociations,t(w,n))}))):i(e,"bpmn:DataObject")||(i(e,"bpmn:DataStoreReference")?P(e,n):i(e,"bpmn:DataObjectReference")?P(e,n):l("unrecognized flowElement "+o(e)+" in context "+(n?o(n.businessObject):null),{element:e,context:n}))})}function F(e,t){var n=c(e,t),i=e.processRef;i&&g(i,n||t)}function W(e){r.forEach(e.participants,t(F)),R(e.artifacts),j.push(function(){x(e.messageFlows)})}var V=[],j=[];return{handleDefinitions:d}}var r=window._,a=e(69),o=e(9).elementToString,s=new a({name:"bpmnElement",enumerable:!0},{name:"di"});t.exports=i},{}],8:[function(e,t){"use strict";function n(e,t,n){function r(e){var t={root:function(e){return o.add(e)},element:function(e,t){return o.add(e,t)},error:function(e,t){p.push({message:e,context:t})}},n=new i(t);n.handleDefinitions(e)}var a,o=e.get("bpmnImporter"),s=e.get("eventBus"),p=[];s.fire("import.start");try{r(t)}catch(c){a=c}s.fire(a?"import.error":"import.success",{error:a,warnings:p}),n(a,p)}var i=e(7);t.exports.importBpmnDiagram=n},{}],9:[function(e,t){t.exports.elementToString=function(e){return e?"<"+e.$type+(e.id?' id="'+e.id:"")+'" />':"<null>"}},{}],10:[function(e,t){t.exports={bpmnImporter:["type",e(6)]}},{}],11:[function(e,t){"use strict";t.exports.isExpandedPool=function(e){return!!e.processRef},t.exports.isExpanded=function(e){var t=!(e.$instanceOf("bpmn:SubProcess")||e.$instanceOf("bpmn:CallActivity")),n=t||e.di.isExpanded;return n}},{}],12:[function(e,t){"use strict";var n=window._,i=t.exports.DEFAULT_LABEL_SIZE={width:90,height:20};t.exports.hasExternalLabel=function(e){return e.$instanceOf("bpmn:Event")||e.$instanceOf("bpmn:Gateway")||e.$instanceOf("bpmn:DataStoreReference")||e.$instanceOf("bpmn:DataObjectReference")||e.$instanceOf("bpmn:SequenceFlow")||e.$instanceOf("bpmn:MessageFlow")};var r=t.exports.getWaypointsMid=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}},a=t.exports.getExternalLabelMid=function(e){return e.waypoints?r(e.waypoints):{x:e.x+e.width/2,y:e.y+e.height+i.height/2}};t.exports.getExternalLabelBounds=function(e,t){var r,o,s,p=e.di,c=p.label;return c&&c.bounds?(s=c.bounds,o={width:Math.max(i.width,s.width),height:s.height},r={x:s.x+s.width/2,y:s.y+s.height/2}):(r=a(t),o=i),n.extend({x:r.x-o.width/2,y:r.y-o.height/2},o)}},{}],13:[function(e,t){t.exports=e(15)},{}],14:[function(e,t){"use strict";function n(e,t){r.call(this,e,t)}var i=window._,r=e(21),a=e(16);n.prototype=Object.create(r.prototype),t.exports=n,n.prototype.fromXML=function(e,t,n,r){i.isString(t)||(r=n,n=t,t="bpmn:Definitions"),i.isFunction(n)&&(r=n,n={});var o=new a.Reader(this,n),s=o.handler(t);o.fromXML(e,s,r)},n.prototype.toXML=function(e,t,n){i.isFunction(t)&&(n=t,t={});var r=new a.Writer(t);try{var o=r.toXML(e);n(null,o)}catch(s){n(s)}}},{}],15:[function(e,t){var n=e(14),i={bpmn:e(30),bpmndi:e(31),dc:e(32),di:e(33)};t.exports=function(){return new n(i)}},{}],16:[function(e,t){"use strict";t.exports.Reader=e(18),t.exports.Writer=e(19)},{}],17:[function(e,t){"use strict";function n(e){return e.charAt(0).toUpperCase()+e.slice(1)}function i(e){return e.charAt(0).toLowerCase()+e.slice(1)}function r(e){return e.xml&&"lowerCase"===e.xml.tagAlias}t.exports.aliasToName=function(e,t){return r(t)?n(e):e},t.exports.nameToAlias=function(e,t){return r(t)?i(e):e},t.exports.DEFAULT_NS_MAP={xsi:"http://www.w3.org/2001/XMLSchema-instance"},t.exports.XSI_TYPE="xsi:type"},{}],18:[function(e,t){"use strict";function n(e){var t=e.attributes;return d.reduce(t,function(e,t){var n,i;return t.local?(i=w(t.name,t.prefix),n=i.name):n=t.prefix,e[n]=t.value,e},{})}function i(e,t,n){var i,r=w(t.value),a=e.ns[r.prefix||""],o=r.localName,s=a&&n.getPackage(a);s&&(i=s.xml&&s.xml.typePrefix,i&&0===o.indexOf(i)&&(o=o.slice(i.length)),t.value=s.prefix+":"+o)}function r(e,t,n){var a,o;if(a=e.uri||n){var s=t.getPackage(a);o=s?s.prefix:e.prefix,e.prefix=o,e.uri=a}d.forEach(e.attributes,function(n){n.uri===v&&"type"===n.local&&i(e,n,t),r(n,t,null)})}function a(e){var t={},n=[],i=[];this.addReference=function(e){n.push(e)},this.addElement=function(e,n){if(!e||!n)throw new Error("[xml-reader] id or ctx must not be null");t[e]=n},this.addWarning=function(e){i.push(e)},this.warnings=i,this.references=n,this.elementsById=t,this.parseRoot=e}function o(){}function s(){}function p(e,t){this.property=e,this.context=t}function c(e,t){this.element=t,this.propertyDesc=e}function l(){}function u(e,t,n){this.model=e,this.type=e.getType(t),this.context=n}function m(e,t,n){this.model=e,this.context=n}function h(e){this.model=e}var f=window.sax,d=window._,y=e(17),g=y.XSI_TYPE,v=y.DEFAULT_NS_MAP.xsi,E=e(21).types,x=e(20),w=e(21).ns.parseName,b=y.aliasToName;o.prototype.handleEnd=function(){},o.prototype.handleText=function(){},o.prototype.handleNode=function(){},s.prototype=new o,s.prototype.handleText=function(e){this.body=(this.body||"")+e},p.prototype=new s,p.prototype.handleNode=function(e){if(this.element)throw new Error("expected no sub nodes");return this.element=this.createReference(e),this},p.prototype.handleEnd=function(){this.element.id=this.body},p.prototype.createReference=function(){return{property:this.property.ns.name,id:""}},c.prototype=new s,c.prototype.handleEnd=function(){var e=this.body,t=this.element,n=this.propertyDesc;e=E.coerceType(n.type,e),n.isMany?t.get(n.name).push(e):t.set(n.name,e)},l.prototype=Object.create(s.prototype),l.prototype.handleNode=function(e){var t,n=this,i=this.element;return i?n=this.handleChild(e):(i=this.element=this.createElement(e),t=i.id,t&&this.context.addElement(t,i)),n},u.prototype=new l,u.prototype.addReference=function(e){this.context.addReference(e)},u.prototype.handleEnd=function(){var e=this.body,t=this.element,n=t.$descriptor,i=n.bodyProperty;i&&void 0!==e&&(e=E.coerceType(i.type,e),t.set(i.name,e))},u.prototype.createElement=function(e){var t=n(e),i=this.type,r=i.$descriptor,a=this.context,o=new i({});return d.forEach(t,function(e,t){var n=r.propertiesByName[t];n&&n.isReference?a.addReference({element:o,property:n.ns.name,id:e}):(n&&(e=E.coerceType(n.type,e)),o.set(t,e))}),o},u.prototype.getPropertyForNode=function(e){var t,n,i,r=w(e.local,e.prefix),a=this.type,o=this.model,s=a.$descriptor,p=r.name,c=s.propertiesByName[p];if(c)return c.serialize===g&&(i=e.attributes[g])?(t=i.value,n=o.getType(t),d.extend({},c,{effectiveType:n.$descriptor.name})):c;var l=o.getPackage(r.prefix);if(l){if(t=r.prefix+":"+b(r.localName,s.$pkg),n=o.getType(t),c=d.find(s.properties,function(e){return!e.isVirtual&&!e.isReference&&!e.isAttribute&&n.hasType(e.type)}))return d.extend({},c,{effectiveType:n.$descriptor.name})}else if(c=d.find(s.properties,function(e){return!e.isReference&&!e.isAttribute&&"Element"===e.type}))return c;throw new Error("unrecognized element <"+r.name+">")},u.prototype.toString=function(){return"ElementDescriptor["+this.type.$descriptor.name+"]"},u.prototype.valueHandler=function(e,t){return new c(e,t)},u.prototype.referenceHandler=function(e){return new p(e,this.context)},u.prototype.handler=function(e){return"Element"===e?new m(this.model,e,this.context):new u(this.model,e,this.context)},u.prototype.handleChild=function(e){var t,n,i,r;if(t=this.getPropertyForNode(e),i=this.element,n=t.effectiveType||t.type,E.isSimple(n))return this.valueHandler(t,i);r=t.isReference?this.referenceHandler(t).handleNode(e):this.handler(n).handleNode(e);var a=r.element;return void 0!==a&&(t.isMany?i.get(t.name).push(a):i.set(t.name,a),t.isReference?(d.extend(a,{element:i}),this.context.addReference(a)):a.$parent=i),r},m.prototype=Object.create(l.prototype),m.prototype.createElement=function(e){var t=e.name,n=e.prefix,i=e.ns[n],r=e.attributes;return this.model.createAny(t,i,r)},m.prototype.handleChild=function(e){var t,n=new m(this.model,"Element",this.context).handleNode(e),i=this.element,r=n.element;return void 0!==r&&(t=i.$children=i.$children||[],t.push(r),r.$parent=i),n},m.prototype.handleText=function(e){this.body=this.body||""+e},m.prototype.handleEnd=function(){this.body&&(this.element.$body=this.body)},h.prototype.fromXML=function(e,t,n){function i(){var e,t,n=c.elementsById,i=c.references;for(e=0;t=i[e];e++){var r=t.element,a=n[t.id],o=r.$descriptor.propertiesByName[t.property];if(a||c.addWarning({message:"unresolved reference <"+t.id+">",element:t.element,property:t.property,value:t.id}),o.isMany){var s=r.get(o.name),p=s.indexOf(t);a?s[p]=a:s.splice(p,1)}else r.set(o.name,a)}}function o(){u.pop().handleEnd()}function s(e){var t=u.peek();r(e,m);try{u.push(t.handleNode(e))}catch(n){var i=this.line,a=this.column;throw console.error("failed to parse document"),console.error(n),new Error("unparsable content <"+e.name+"> detected\n line: "+i+"\n column: "+a+"\n nested error: "+n.message)}}function p(e){u.peek().handleText(e)}var c=new a(t),l=f.parser(!0,{xmlns:!0,trim:!0}),u=new x,m=this.model;t.context=c,u.push(t),l.onopentag=s,l.oncdata=l.ontext=p,l.onclosetag=o,l.onend=i,d.defer(function(){var i;try{l.write(e).close()}catch(r){i=r}n(i,i?void 0:t.element,c)})},h.prototype.handler=function(e){return new u(this.model,e)},t.exports=h,t.exports.ElementHandler=u},{}],19:[function(e,t){"use strict";function n(e){return g.isString(e)?e:(e.prefix?e.prefix+":":"")+e.localName}function i(e,t){return t.isGeneric?t.name:g.extend({localName:w(t.ns.localName,t.$pkg)},e)}function r(e,t){return g.extend({localName:t.ns.localName},e)}function a(e){var t=e.$descriptor;return g.filter(t.properties,function(t){var n=t.name;if(!e.hasOwnProperty(n))return!1;var i=e[n];return i===t["default"]?!1:t.isMany?i.length:!0})}function o(e){var t={"\n":"&#10;","\n\r":"&#10;",'"':"&quot;"};return e=g.isString(e)?e:""+e,e.replace(/(\n|\n\r|")/g,function(e){return t[e]})}function s(e){return g.filter(e,function(e){return e.isAttr})}function p(e){return g.filter(e,function(e){return!e.isAttr})}function c(e,t){this.ns=t}function l(){}function u(e){this.ns=e}function m(e,t){this.body=[],this.attrs=[],this.parent=e,this.ns=t}function h(e,t){m.call(this,e,t)}function f(){this.value="",this.write=function(e){this.value+=e}}function d(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 y(e){function t(t,n){var i=n||new f,r=new d(i,e.format);return e.preamble&&r.append(b),(new m).build(t).serializeTo(r),n?void 0:i.value}return e=g.extend({format:!1,preamble:!0},e||{}),{toXML:t}}var g=window._,v=e(21).types,E=e(17),x=e(21).ns.parseName,w=E.nameToAlias,b='<?xml version="1.0" encoding="UTF-8"?>\n',A=/[<>"&]+/,S=E.DEFAULT_NS_MAP,R=E.XSI_TYPE;c.prototype.build=function(e){return this.element=e,this},c.prototype.serializeTo=function(e){e.appendIndent().append("<"+n(this.ns)+">"+this.element.id+"</"+n(this.ns)+">").appendNewLine()},l.prototype.serializeValue=l.prototype.serializeTo=function(e){var t=this.escape;t&&e.append("<![CDATA["),e.append(this.value),t&&e.append("]]>")},l.prototype.build=function(e,t){return this.value=t,"String"===e.type&&A.test(t)&&(this.escape=!0),this},u.prototype=new l,u.prototype.serializeTo=function(e){e.appendIndent().append("<"+n(this.ns)+">"),this.serializeValue(e),e.append("</"+n(this.ns)+">").appendNewLine()},m.prototype.build=function(e){this.element=e;var t=this.parseNsAttributes(e);if(this.ns||(this.ns=this.nsTagName(e.$descriptor)),e.$descriptor.isGeneric)this.parseGeneric(e);else{var n=a(e);this.parseAttributes(s(n)),this.parseContainments(p(n)),this.parseGenericAttributes(e,t)}return this},m.prototype.nsTagName=function(e){var t=this.logNamespaceUsed(e.ns);return i(t,e)},m.prototype.nsPropertyTagName=function(e){var t=this.logNamespaceUsed(e.ns);return r(t,e)},m.prototype.isLocalNs=function(e){return e.uri===this.ns.uri},m.prototype.nsAttributeName=function(e){var t;g.isString(e)?t=x(e):e.ns&&(t=e.ns);var n=this.logNamespaceUsed(t);return this.isLocalNs(n)?{localName:t.localName}:g.extend({localName:t.localName},n)},m.prototype.parseGeneric=function(e){var t=this,n=this.body,i=this.attrs;g.forEach(e,function(e,r){"$body"===r?n.push((new l).build({type:"String"},e)):"$children"===r?g.forEach(e,function(e){n.push(new m(t).build(e))}):0!==r.indexOf("$")&&i.push({name:r,value:o(e)})})},m.prototype.parseNsAttributes=function(e){var t=this,n=e.$attrs,i=[];return g.forEach(n,function(e,n){var r=x(n);"xmlns"===r.prefix?t.logNamespace({prefix:r.localName,uri:e}):r.prefix||"xmlns"!==r.localName?i.push({name:n,value:e}):t.logNamespace({uri:e})}),i},m.prototype.parseGenericAttributes=function(e,t){var n=this;g.forEach(t,function(t){if(t.name!==R)try{n.addAttribute(n.nsAttributeName(t.name),t.value)}catch(i){console.warn("[writer] missing namespace information for ",t.name,"=",t.value,"on",e,i)}})},m.prototype.parseContainments=function(e){var t=this,n=this.body,i=this.element;g.forEach(e,function(e){var r=i.get(e.name),a=e.isReference,o=e.isMany,s=t.nsPropertyTagName(e);if(o||(r=[r]),e.isBody)n.push((new l).build(e,r[0]));else if(v.isSimple(e.type))g.forEach(r,function(t){n.push(new u(s).build(e,t))});else if(a)g.forEach(r,function(e){n.push(new c(t,s).build(e))});else{var p=e.serialize===R;g.forEach(r,function(e){var i;i=p?new h(t,s):new m(t),n.push(i.build(e))})}})},m.prototype.getNamespaces=function(){return this.parent?this.namespaces=this.parent.getNamespaces():this.namespaces||(this.namespaces={prefixMap:{},uriMap:{},used:{}}),this.namespaces},m.prototype.logNamespace=function(e){var t=this.getNamespaces(),n=t.uriMap[e.uri];return n||(t.uriMap[e.uri]=e),t.prefixMap[e.prefix]=e.uri,e},m.prototype.logNamespaceUsed=function(e){var t=this.element,n=t.$model,i=this.getNamespaces(),r=e.prefix,a=e.uri||S[r]||i.prefixMap[r]||(n?(n.getPackage(r)||{}).uri:null);if(!a)throw new Error("no namespace uri given for prefix <"+e.prefix+">");return e=i.uriMap[a],e||(e=this.logNamespace({prefix:r,uri:a})),i.used[e.uri]||(i.used[e.uri]=e),e},m.prototype.parseAttributes=function(e){var t=this,n=this.element;g.forEach(e,function(e){t.logNamespaceUsed(e.ns);var i=n.get(e.name);e.isReference&&(i=i.id),t.addAttribute(t.nsAttributeName(e),i)})},m.prototype.addAttribute=function(e,t){var n=this.attrs;g.isString(t)&&(t=o(t)),n.push({name:e,value:t})},m.prototype.serializeAttributes=function(e){function t(){return g.collect(a.used,function(e){var t="xmlns"+(e.prefix?":"+e.prefix:"");return{name:t,value:e.uri}})}var i=this.attrs,r=!this.parent,a=this.namespaces;r&&(i=t().concat(i)),g.forEach(i,function(t){e.append(" ").append(n(t.name)).append('="').append(t.value).append('"')})},m.prototype.serializeTo=function(e){var t=this.body.length,i=!(1===this.body.length&&this.body[0]instanceof l);e.appendIndent().append("<"+n(this.ns)),this.serializeAttributes(e),e.append(t?">":" />"),t&&(i&&e.appendNewLine().indent(),g.forEach(this.body,function(t){t.serializeTo(e)}),i&&e.unindent().appendIndent(),e.append("</"+n(this.ns)+">")),e.appendNewLine()},h.prototype=new m,h.prototype.build=function(e){var t=e.$descriptor;this.element=e,this.typeNs=this.nsTagName(t);var n=this.typeNs,i=e.$model.getPackage(n.uri),r=i.xml&&i.xml.typePrefix||"";return this.addAttribute(this.nsAttributeName(R),(n.prefix?n.prefix+":":"")+r+t.ns.localName),m.prototype.build.call(this,e)},h.prototype.isLocalNs=function(e){return e.uri===this.typeNs.uri},t.exports=y},{}],20:[function(t,n,i){!function(t){"use strict";function r(){this.data=[null],this.top=0}function a(){return new r}r.prototype.clear=function(){return this.data=[null],this.top=0,this},r.prototype.length=function(){return this.top},r.prototype.peek=function(){return this.data[this.top]},r.prototype.pop=function(){return this.top>0?(this.top--,this.data.pop()):void 0},r.prototype.push=function(e){return this.data[++this.top]=e,this},"undefined"!=typeof i?n.exports=a:"function"==typeof e?e(function(){return a}):t.stack=a}(this)},{}],21:[function(e,t){"use strict";t.exports=e(25),t.exports.types=e(29),t.exports.ns=e(26)},{}],22:[function(e,t){"use strict";function n(){}n.prototype.get=function(e){return this.$model.properties.get(this,e)},n.prototype.set=function(e,t){this.$model.properties.set(this,e,t)},t.exports=n},{}],23:[function(e,t){"use strict";function n(e){this.ns=e,this.name=e.name,this.allTypes=[],this.properties=[],this.propertiesByName={}}var i=window._,r=e(26).parseName;t.exports=n,n.prototype.build=function(){return i.pick(this,["ns","name","allTypes","properties","propertiesByName","bodyProperty"])},n.prototype.addProperty=function(e,t){this.addNamedProperty(e,!0);var n=this.properties;void 0!==t?n.splice(t,0,e):n.push(e)},n.prototype.replaceProperty=function(e,t){var n=e.ns,i=this.properties,r=this.propertiesByName;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)}this.addNamedProperty(t,!0);var a=i.indexOf(e);if(-1===a)throw new Error("property <"+n.name+"> not found in property list");i[a]=t,r[n.name]=r[n.localName]=t},n.prototype.redefineProperty=function(e){var t=e.ns.prefix,n=e.redefines.split("#"),i=r(n[0],t),a=r(n[1],i.prefix).name,o=this.propertiesByName[a];if(!o)throw new Error("refined property <"+a+"> not found");this.replaceProperty(o,e),delete e.redefines},n.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},n.prototype.removeNamedProperty=function(e){var t=e.ns,n=this.propertiesByName;delete n[t.name],delete n[t.localName]},n.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},n.prototype.addIdProperty=function(e){var t=r(e,this.ns.prefix),n={name:t.localName,type:"String",isAttr:!0,ns:t};this.addProperty(n,0)},n.prototype.assertNotDefined=function(e){var t=e.name,n=this.propertiesByName[t];if(n)throw new Error("property <"+t+"> already defined; override of <"+n.definedBy.ns.name+"#"+n.ns.name+"> by <"+e.definedBy.ns.name+"#"+e.ns.name+"> not allowed without redefines")},n.prototype.hasProperty=function(e){return this.propertiesByName[e]},n.prototype.addTrait=function(e){var t=this.allTypes;-1===t.indexOf(e)&&(i.forEach(e.properties,function(t){t=i.extend({},t,{name:t.ns.localName}),Object.defineProperty(t,"definedBy",{value:e}),t.redefines?this.redefineProperty(t):(t.isBody&&this.setBodyProperty(t),this.addProperty(t))},this),t.push(e))}},{}],24:[function(e,t){"use strict";function n(e,t){this.model=e,this.properties=t}var i=window._,r=e(22);t.exports=n,n.prototype.createType=function(e){function t(e){a.define(this,"$type",{value:s,enumerable:!0}),a.define(this,"$attrs",{value:{}}),a.define(this,"$parent",{writable:!0}),i.forEach(e,function(e,t){this.set(t,e)},this)}var n=this.model,a=this.properties,o=Object.create(r.prototype);i.forEach(e.properties,function(e){e.isMany||void 0===e["default"]||(o[e.name]=e["default"])}),a.defineModel(o,n),a.defineDescriptor(o,e);var s=e.ns.name;return t.prototype=o,t.hasType=o.$instanceOf=this.model.hasType,a.defineModel(t,n),a.defineDescriptor(t,e),t}},{}],25:[function(e,t){"use strict";function n(e,t){t=t||{},this.properties=new o(this),this.factory=new r(this,this.properties),this.registry=new a(e,this.properties,t),this.typeCache={}}var i=window._,r=e(24),a=e(28),o=e(27),s=e(26).parseName;t.exports=n,n.prototype.create=function(e,t){var n=this.getType(e);if(!n)throw new Error("unknown type <"+e+">");return new n(t)},n.prototype.getType=function(e){var t=this.typeCache,n=i.isString(e)?e:e.ns.name,r=t[n];return r||(e=this.registry.getEffectiveDescriptor(n),r=t[e.name]=this.factory.createType(e)),r},n.prototype.createAny=function(e,t,n){var r=s(e),a={$type:e},o={name:e,isGeneric:!0,ns:{prefix:r.prefix,localName:r.localName,uri:t}};return this.properties.defineDescriptor(a,o),this.properties.defineModel(a,this),this.properties.define(a,"$parent",{enumerable:!1,writable:!0}),i.forEach(n,function(e,t){i.isObject(e)&&void 0!==e.value?a[e.name]=e.value:a[t]=e}),a},n.prototype.getPackage=function(e){return this.registry.getPackage(e)},n.prototype.getPackages=function(){return this.registry.getPackages()},n.prototype.getElementDescriptor=function(e){return e.$descriptor},n.prototype.hasType=function(e,t){void 0===t&&(t=e,e=this);var n=e.$model.getElementDescriptor(e);return!!i.find(n.allTypes,function(e){return e.name===t})},n.prototype.getPropertyDescriptor=function(e,t){return this.getElementDescriptor(e).propertiesByName[t]}},{}],26:[function(e,t){"use strict";t.exports.parseName=function(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 e=(i?i+":":"")+n,{name:e,prefix:i,localName:n}}},{}],27:[function(e,t){"use strict";function n(e){this.model=e}t.exports=n,n.prototype.set=function(e,t,n){var i=this.model.getPropertyDescriptor(e,t);i?Object.defineProperty(e,i.name,{enumerable:!i.isReference,writable:!0,value:n}):e.$attrs[t]=n},n.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&&Object.defineProperty(e,i,{enumerable:!n.isReference,writable:!0,value:[]}),e[i]},n.prototype.define=function(e,t,n){Object.defineProperty(e,t,n)},n.prototype.defineDescriptor=function(e,t){this.define(e,"$descriptor",{value:t})},n.prototype.defineModel=function(e,t){this.define(e,"$model",{value:t})}},{}],28:[function(e,t){"use strict";function n(e,t,n){this.options=i.extend({generateId:"id"},n||{}),this.packageMap={},this.typeMap={},this.packages=[],this.properties=t,i.forEach(e,this.registerPackage,this)}var i=window._,r=e(29),a=e(23),o=e(26).parseName;t.exports=n,n.prototype.getPackage=function(e){return this.packageMap[e]},n.prototype.getPackages=function(){return this.packages},n.prototype.registerPackage=function(e){i.forEach(e.types,function(t){this.registerType(t,e)},this),this.packageMap[e.uri]=this.packageMap[e.prefix]=e,this.packages.push(e)},n.prototype.registerType=function(e,t){var n=o(e.name,t.prefix),a=n.name,s={};i.forEach(e.properties,function(e){var t=o(e.name,n.prefix),a=t.name;r.isBuiltIn(e.type)||(e.type=o(e.type,t.prefix).name),i.extend(e,{ns:t,name:a}),s[a]=e}),i.extend(e,{ns:n,name:a,propertiesByName:s}),this.definePackage(e,t),this.typeMap[a]=e},n.prototype.mapTypes=function(e,t){var n=this.typeMap[e.name];if(!n)throw new Error("unknown type <"+e.name+">");i.forEach(n.superClass,function(n){var i=o(n,e.prefix);this.mapTypes(i,t)},this),t(n)},n.prototype.getEffectiveDescriptor=function(e){var t=o(e),n=new a(t);this.mapTypes(t,function(e){n.addTrait(e)});var i=this.options.generateId;i&&!n.hasProperty(i)&&n.addIdProperty(i);var r=n.build();return this.definePackage(r,r.allTypes[r.allTypes.length-1].$pkg),r},n.prototype.definePackage=function(e,t){this.properties.define(e,"$pkg",{value:t})}},{}],29:[function(e,t){"use strict";var n={String:!0,Boolean:!0,Integer:!0,Real:!0,Element:!0},i={String:function(e){return e},Boolean:function(e){return"true"===e},Integer:function(e){return parseInt(e,10)},Real:function(e){return parseFloat(e,10)}};t.exports.coerceType=function(e,t){var n=i[e];return n?n(t):t},t.exports.isBuiltIn=function(e){return!!n[e]},t.exports.isSimple=function(e){return!!i[e]}},{}],30:[function(e,t){t.exports={name:"BPMN20",uri:"http://www.omg.org/spec/BPMN/20100524/MODEL",associations:[],types:[{name:"Interface",superClass:["RootElement"],properties:[{name:"name",isAttr:!0,type:"String"},{name:"operations",type:"Operation",isMany:!0},{name:"implementationRef",type:"String",isAttr:!0}]},{name:"Operation",superClass:["BaseElement"],properties:[{name:"name",isAttr:!0,type:"String"},{name:"inMessageRef",type:"Message",isAttr:!0,isReference:!0},{name:"outMessageRef",type:"Message",isAttr:!0,isReference:!0},{name:"errorRefs",type:"Error",isMany:!0,isReference:!0},{name:"implementationRef",type:"String",isAttr:!0}]},{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:"supports",type:"Process",isMany:!0,isReference:!0},{name:"definitionalCollaborationRef",type:"Collaboration",isAttr:!0,isReference:!0},{name:"isExecutable",isAttr:!0,type:"Boolean"},{name:"resources",type:"ResourceRole",isMany:!0},{name:"artifacts",type:"Artifact",isMany:!0},{name:"correlationSubscriptions",type:"CorrelationSubscription",isMany:!0}]},{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:"childLaneSet",type:"LaneSet",serialize:"xsi:type"},{name:"partitionElementRef",type:"BaseElement",isAttr:!0,isReference:!0},{name:"flowNodeRef",type:"FlowNode",isMany:!0,isReference:!0},{name:"partitionElement",type:"BaseElement"}]},{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",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:"sources",isMany:!0,isReference:!0,type:"Element"},{name:"targets",isMany:!0,isReference:!0,type:"Element"}]},{name:"BaseElement",isAbstract:!0,properties:[{name:"id",isAttr:!0,type:"String"},{name:"extensionDefinitions",type:"ExtensionDefinition",isMany:!0,isReference:!0},{name:"extensionElements",type:"ExtensionElements"},{name:"documentation",type:"Documentation",isMany:!0}]},{name:"Extension",properties:[{name:"mustUnderstand","default":!1,isAttr:!0,type:"Boolean"},{name:"definition",type:"ExtensionDefinition"}]},{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:"inputSet",type:"InputSet"},{name:"eventDefinitionRefs",type:"EventDefinition",isMany:!0,isReference:!0},{name:"dataInputAssociation",type:"DataInputAssociation",isMany:!0},{name:"dataInputs",type:"DataInput",isMany:!0},{name:"eventDefinitions",type:"EventDefinition",isMany:!0}]},{name:"CatchEvent",isAbstract:!0,superClass:["Event"],properties:[{name:"parallelMultiple",isAttr:!0,type:"Boolean","default":!1},{name:"outputSet",type:"OutputSet"},{name:"eventDefinitionRefs",type:"EventDefinition",isMany:!0,isReference:!0},{name:"dataOutputAssociation",type:"DataOutputAssociation",isMany:!0},{name:"dataOutputs",type:"DataOutput",isMany:!0},{name:"eventDefinitions",type:"EventDefinition",isMany:!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"},{name:"activityRef",type:"Activity",isAttr:!0,isReference:!0}]},{name:"TimerEventDefinition",superClass:["EventDefinition"],properties:[{name:"timeDate",type:"Expression",serialize:"xsi:type"},{name:"timeCycle",type:"Expression",serialize:"xsi:type"},{name:"timeDuration",type:"Expression",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",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:"transformation",type:"FormalExpression"},{name:"assignment",type:"Assignment",isMany:!0},{name:"sourceRef",type:"ItemAwareElement",isMany:!0,isReference:!0},{name:"targetRef",type:"ItemAwareElement",isReference:!0}]},{name:"DataInput",superClass:["ItemAwareElement"],properties:[{name:"name",isAttr:!0,type:"String"},{name:"isCollection","default":!1,isAttr:!0,type:"Boolean"},{name:"inputSetRefs",type:"InputSet",isVirtual:!0,isMany:!0,isReference:!0},{name:"inputSetWithOptional",type:"InputSet",isVirtual:!0,isMany:!0,isReference:!0},{name:"inputSetWithWhileExecuting",type:"InputSet",isVirtual:!0,isMany:!0,isReference:!0}]},{name:"DataOutput",superClass:["ItemAwareElement"],properties:[{name:"name",isAttr:!0,type:"String"},{name:"isCollection","default":!1,isAttr:!0,type:"Boolean"},{name:"outputSetRefs",type:"OutputSet",isVirtual:!0,isMany:!0,isReference:!0},{name:"outputSetWithOptional",type:"OutputSet",isVirtual:!0,isMany:!0,isReference:!0},{name:"outputSetWithWhileExecuting",type:"OutputSet",isVirtual:!0,isMany:!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:"inputSets",type:"InputSet",isMany:!0},{name:"outputSets",type:"OutputSet",isMany:!0},{name:"dataInputs",type:"DataInput",isMany:!0},{name:"dataOutputs",type:"DataOutput",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",serialize:"xsi:type"},{name:"to",type:"Expression",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:"participantRefs",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:!0},{name:"FormalExpression",superClass:["Expression"],properties:[{name:"language",isAttr:!0,type:"String"},{name:"body",type:"String",isBody:!0},{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",type:"String",isAttr:!0},{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",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"},{name:"supportedInterfaceRefs",type:"Interface",isMany:!0,isReference:!0},{name:"ioBinding",type:"InputOutputBinding",isMany:!0}]},{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",isVirtual:!0,isMany:!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",isVirtual:!0,isMany:!0,isReference:!0},{name:"outgoingConversationLinks",type:"ConversationLink",isVirtual:!0,isMany:!0,isReference:!0}]},{name:"Participant",superClass:["InteractionNode","BaseElement"],properties:[{name:"name",isAttr:!0,type:"String"},{name:"interfaceRefs",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"}]},{name:"Collaboration",superClass:["RootElement"],properties:[{name:"name",isAttr:!0,type:"String"},{name:"isClosed",isAttr:!0,type:"Boolean"},{name:"choreographyRef",type:"Choreography",isMany:!0,isReference:!0},{name:"artifacts",type:"Artifact",isMany:!0},{name:"participantAssociations",type:"ParticipantAssociation",isMany:!0},{name:"messageFlowAssociations",type:"MessageFlowAssociation",isMany:!0},{name:"conversationAssociations",type:"ConversationAssociation"},{name:"participants",type:"Participant",isMany:!0},{name:"messageFlows",type:"MessageFlow",isMany:!0},{name:"correlationKeys",type:"CorrelationKey",isMany:!0},{name:"conversations",type:"ConversationNode",isMany:!0},{name:"conversationLinks",type:"ConversationLink",isMany:!0}]},{name:"ChoreographyActivity",isAbstract:!0,superClass:["FlowNode"],properties:[{name:"participantRefs",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:["FlowElementsContainer","Collaboration"]},{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",isVirtual:!0,isMany:!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:"loopCharacteristics",type:"LoopCharacteristics"},{name:"resources",type:"ResourceRole",isMany:!0},{name:"default",type:"SequenceFlow",isAttr:!0,isReference:!0},{name:"properties",type:"Property",isMany:!0},{name:"ioSpecification",type:"InputOutputSpecification"},{name:"boundaryEventRefs",type:"BoundaryEvent",isMany:!0,isReference:!0},{name:"dataInputAssociations",type:"DataInputAssociation",isMany:!0},{name:"dataOutputAssociations",type:"DataOutputAssociation",isMany:!0},{name:"startQuantity","default":1,isAttr:!0,type:"Integer"},{name:"completionQuantity","default":1,isAttr:!0,type:"Integer"}]},{name:"ServiceTask",superClass:["Task"],properties:[{name:"implementation",isAttr:!0,type:"String"},{name:"operationRef",type:"Operation",isAttr:!0,isReference:!0}]},{name:"SubProcess",superClass:["Activity","FlowElementsContainer"],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",serialize:"xsi:type"},{name:"loopDataInputRef",type:"ItemAwareElement",isAttr:!0,isReference:!0},{name:"loopDataOutputRef",type:"ItemAwareElement",isAttr:!0,isReference:!0},{name:"inputDataItem",type:"DataInput"},{name:"outputDataItem",type:"DataOutput"},{name:"completionCondition",type:"Expression",serialize:"xsi:type"},{name:"complexBehaviorDefinition",type:"ComplexBehaviorDefinition",isMany:!0},{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",serialize:"xsi:type"},{name:"loopMaximum",type:"Expression",serialize:"xsi:type"}]},{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",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",isAttr:!0,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",serialize:"xsi:type"},{name:"parameterRef",type:"ResourceParameter",isAttr:!0,isReference:!0}]},{name:"ResourceAssignmentExpression",properties:[{name:"expression",type:"Expression",serialize:"xsi:type"}]},{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:"relationships",type:"Relationship",isMany:!0},{name:"rootElements",type:"RootElement",isMany:!0},{name:"diagrams",isMany:!0,type:"bpmndi:BPMNDiagram"},{name:"exporter",isAttr:!0,type:"String"},{name:"exporterVersion",isAttr:!0,type:"String"}]}],emumerations:[{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"}]}],prefix:"bpmn",xml:{tagAlias:"lowerCase",typePrefix:"t"}}
4
+ },{}],31:[function(e,t){t.exports={name:"BPMNDI",uri:"http://www.omg.org/spec/BPMN/20100524/DI",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"]}],emumerations:[{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:[],prefix:"bpmndi"}},{}],32:[function(e,t){t.exports={name:"DC",uri:"http://www.omg.org/spec/DD/20100524/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}]}],prefix:"dc",associations:[]}},{}],33:[function(e,t){t.exports={name:"DI",uri:"http://www.omg.org/spec/DD/20100524/DI",types:[{name:"DiagramElement",isAbstract:!0,properties:[{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,isVirtual:!0,isMany:!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",serialize:"xsi:type"}]},{name:"Diagram",isAbstract:!0,properties:[{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,isVirtual:!0,isMany:!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",isVirtual:!0,isMany:!0}]},{name:"LabeledShape",isAbstract:!0,superClass:["Shape"],properties:[{name:"ownedLabel",type:"Label",isReadOnly:!0,subsettedProperty:"DiagramElement-ownedElement",isVirtual:!0,isMany:!0}]},{name:"Label",isAbstract:!0,superClass:["Node"],properties:[{name:"bounds",type:"dc:Bounds"}]},{name:"Style",isAbstract:!0},{name:"Extension",properties:[{name:"values",type:"Element",isMany:!0}]}],associations:[],prefix:"di",xml:{tagAlias:"lowerCase"}}},{}],34:[function(e,t){t.exports=e(35)},{}],35:[function(e,t){"use strict";function n(e){function t(e){return r.indexOf(e)>=0}function n(e){r.push(e)}function i(e){t(e)||((e.__depends__||[]).forEach(i),t(e)||(n(e),(e.__init__||[]).forEach(function(e){o.push(e)})))}var r=[],o=[];e.forEach(i);var s=new a.Injector(r);return o.forEach(function(e){try{s["string"==typeof e?"get":"invoke"](e)}catch(t){throw console.error("Failed to instantiate component"),console.error(t.stack),t}}),s}function i(t){t=t||{};var i={config:["value",t]},r=e(41),a=[i,r].concat(t.modules||[]);return n(a)}function r(e,t){this.injector=t=t||i(e),this.get=t.get,this.invoke=t.invoke,this.get("eventBus").fire("diagram.init")}var a=e(66);t.exports=r,r.prototype.destroy=function(){this.get("eventBus").fire("diagram.destroy")}},{}],36:[function(e,t){"use strict";function n(e,t){return Math.round(e*t)/t}function i(e){return p.isNumber(e)?e+"px":e}function r(e){e=p.extend({},{width:"100%",height:"100%"},e);var t=e.container||document.body,n=document.createElement("div");return n.setAttribute("class","djs-container"),p.extend(n.style,{position:"relative",width:i(e.width),height:i(e.height)}),t.appendChild(n),n}function a(e,t){return e.group().attr({"class":t})}function o(e,t,n,i,r){this._snap=r,this._eventBus=t,this._elementRegistry=i,this._graphicsFactory=n,this._init(e||{})}function s(e,t){var n="matrix("+t.a+","+t.b+","+t.c+","+t.d+","+t.e+","+t.f+")";e.setAttribute("transform",n)}var p=window._,c=e(58),l="base";o.$inject=["config.canvas","eventBus","graphicsFactory","elementRegistry","snap"],t.exports=o,o.prototype._init=function(e){var t=this._eventBus,n=this._snap,i=r(e),o=n.createSnapAt("100%","100%",i),s=a(o,"viewport"),p=this;this._container=i,this._svg=o,this._viewport=s,this._layers={},t.on("diagram.init",function(){t.fire("canvas.init",{svg:o,viewport:s})}),t.on("diagram.destroy",function(){var e=p._container.parentNode;e&&e.removeChild(i),t.fire("canvas.destroy",{svg:p._svg,viewport:p._viewport}),p._svg.remove(),p._svg=p._container=p._layers=p._viewport=null})},o.prototype.getDefaultLayer=function(){return this.getLayer(l)},o.prototype.getLayer=function(e){if(!e)throw new Error("must specify a name");var t=this._layers[e];return t||(t=this._layers[e]=a(this._viewport,"layer-"+e)),t},o.prototype.getContainer=function(){return this._container},o.prototype._updateMarker=function(e,t,n){var i;e.id||(e=this._elementRegistry.get(e)),i=this.getGraphics(e),i&&(i[n?"addClass":"removeClass"](t),this._eventBus.fire("element.marker.update",{element:e,gfx:i,marker:t,add:!!n}))},o.prototype.addMarker=function(e,t){this._updateMarker(e,t,!0)},o.prototype.removeMarker=function(e,t){this._updateMarker(e,t,!1)},o.prototype.getRootElement=function(){return this._rootElement||this.setRootElement({id:"__implicitroot"}),this._rootElement},o.prototype.setRootElement=function(e,t){var n=this._rootElement,i=this._elementRegistry;if(n){if(!t)throw new Error("rootElement already defined");i.remove(n)}return i.add(e,this.getDefaultLayer(),this._svg),this._rootElement=e,e},o.prototype._ensureValidId=function(e){if(!e.id)throw new Error("element must have an id");if(this._elementRegistry.get(e.id))throw new Error("element with id "+e.id+" already exists")},o.prototype._setParent=function(e,t){c.add(t.children,e),e.parent=t},o.prototype._addElement=function(e,t,n){n=n||this.getRootElement();var i=this._eventBus,r=this._graphicsFactory;this._ensureValidId(t),i.fire(e+".add",{element:t,parent:n}),this._setParent(t,n);var a=r.create(e,t);return this._elementRegistry.add(t,a),r.update(e,t,a),i.fire(e+".added",{element:t,gfx:a}),t},o.prototype.addShape=function(e,t){return this._addElement("shape",e,t)},o.prototype.addConnection=function(e,t){return this._addElement("connection",e,t)},o.prototype._removeElement=function(e,t){var n=this._elementRegistry,i=this._graphicsFactory,r=this._eventBus;return(e=n.get(e.id||e))?(r.fire(t+".remove",{element:e}),i.remove(e),c.remove(e.parent&&e.parent.children,e),e.parent=null,r.fire(t+".removed",{element:e}),n.remove(e),e):void 0},o.prototype.removeShape=function(e){return this._removeElement(e,"shape")},o.prototype.removeConnection=function(e){return this._removeElement(e,"connection")},o.prototype.sendToFront=function(e,t){t!==!1&&(t=!0),t&&e.parent&&this.sendToFront(e.parent),p.forEach(e.children,function(e){this.sendToFront(e,!1)},this);var n=this.getGraphics(e),i=n.parent();n.remove().appendTo(i)},o.prototype.getGraphics=function(e){return this._elementRegistry.getGraphics(e)},o.prototype._fireViewboxChange=function(){this._eventBus.fire("canvas.viewbox.changed",{viewbox:this.viewbox(!1)})},o.prototype.viewbox=function(e){if(void 0===e&&this._cachedViewbox)return this._cachedViewbox;var t,i,r,a,o,s=this._viewport,p=this.getSize();return e?(r=Math.max(p.width/e.width,p.height/e.height),i=(new this._snap.Matrix).scale(r).translate(-e.x,-e.y),s.transform(i),this._fireViewboxChange(),e):(t=s.getBBox(!0),i=s.transform().localMatrix,r=n(i.a,1e3),a=n(-i.e||0,1e3),o=n(-i.f||0,1e3),e=this._cachedViewbox={x:a?a/r:0,y:o?o/r:0,width:p.width/r,height:p.height/r,scale:r,inner:{width:t.width,height:t.height,x:t.x,y:t.y},outer:p})},o.prototype.scroll=function(e){var t=this._viewport.node,n=t.getCTM();return e&&(e=p.extend({dx:0,dy:0},e||{}),n=this._svg.node.createSVGMatrix().translate(e.dx,e.dy).multiply(n),s(t,n),this._fireViewboxChange()),{x:n.e,y:n.f}},o.prototype.zoom=function(e,t){var i=this.viewbox();if(void 0===e)return i.scale;var r=i.outer;"fit-viewport"===e&&(e=Math.min(1,r.width/(i.inner.width+i.inner.x),r.height/(i.inner.height+i.inner.y))),"auto"===t&&(t={x:r.width/2,y:r.height/2});var a=this._setZoom(e,t);return this._fireViewboxChange(),n(a.a,1e3)},o.prototype._setZoom=function(e,t){var n,i,r,a,o,c=this._svg.node,l=this._viewport.node,u=c.createSVGMatrix(),m=c.createSVGPoint();r=l.getCTM();var h=r.a;return t?(n=p.extend(m,t),i=n.matrixTransform(r.inverse()),a=u.translate(i.x,i.y).scale(1/h*e).translate(-i.x,-i.y),o=r.multiply(a)):o=u.scale(e),s(this._viewport.node,o),o},o.prototype.getSize=function(){return{width:this._container.clientWidth,height:this._container.clientHeight}},o.prototype.getAbsoluteBBox=function(e){var t,n=this.viewbox();if(e.waypoints){var i=this.getGraphics(e),r=i.getBBox(!0);t=i.getBBox(),t.x-=r.x,t.y-=r.y,t.width+=2*r.x,t.height+=2*r.y}else t=e;var a=t.x*n.scale-n.x*n.scale,o=t.y*n.scale-n.y*n.scale,s=t.width*n.scale,p=t.height*n.scale;return{x:a,y:o,width:s,height:p}}},{}],37:[function(e,t){"use strict";function n(){this._uid=12}var i=e(57);t.exports=n,n.prototype.createRoot=function(e){return this.create("root",e)},n.prototype.createLabel=function(e){return this.create("label",e)},n.prototype.createShape=function(e){return this.create("shape",e)},n.prototype.createConnection=function(e){return this.create("connection",e)},n.prototype.create=function(e,t){return t=t||{},t.id||(t.id=e+"_"+this._uid++),i.create(e,t)}},{}],38:[function(e,t){"use strict";function n(){this._elements={}}var i="data-element-id";t.exports=n,n.prototype.add=function(e,t,n){var r=e.id;if(!r)throw new Error("element must have an id");if(this._elements[r])throw new Error("element with id "+r+" already added");t.attr(i,r),n&&n.attr(i,r),this._elements[r]={element:e,gfx:t,secondaryGfx:n}},n.prototype.remove=function(e){var t=this._elements,n=e.id||e,r=n&&t[n];r&&(r.gfx.attr(i,null),r.secondaryGfx&&r.secondaryGfx.attr(i,null),delete t[n])},n.prototype.get=function(e){var t;t="string"==typeof e?e:e&&e.attr(i);var n=this._elements[t];return n&&n.element},n.prototype.filter=function(e){var t=this._elements,n=[];return Object.keys(t).forEach(function(i){var r=t[i],a=r.element,o=r.gfx;e(a,o)&&n.push(a)}),n},n.prototype.getGraphics=function(e){var t=e.id||e,n=this._elements[t];return n&&n.gfx}},{}],39:[function(e,t){"use strict";function n(){}function i(){this._listeners={};var e=this;this.on("diagram.destroy",1,function(){e._listeners=null})}var r=window._,a=1e3;n.prototype={stopPropagation:function(){this.propagationStopped=!0},preventDefault:function(){this.defaultPrevented=!0},init:function(e){r.extend(this,e||{})}},t.exports=i,t.exports.Event=n,i.prototype.on=function(e,t,n){if(e=r.isArray(e)?e:[e],r.isFunction(t)&&(n=t,t=a),!r.isNumber(t))throw new Error("priority must be a number");var i=this,o={priority:t,callback:n};e.forEach(function(e){i._addListener(e,o)})},i.prototype.once=function(e,t){function n(){t.apply(i,arguments),i.off(e,n)}var i=this;this.on(e,n)},i.prototype.off=function(e,t){var n,i,r=this._getListeners(e);if(t)for(i=r.length-1;n=r[i];i--)n.callback===t&&r.splice(i,1);else r.length=0},i.prototype.fire=function(e,t){var i,r,a,o,s,p;if(p=Array.prototype.slice.call(arguments),"string"==typeof e?p.shift():(i=e,e=i.type),!e)throw new Error("no event type specified");if(a=this._listeners[e],!a)return!0;t instanceof n?i=t:(i=Object.create(n.prototype),i.init(t)),p[0]=i,r=i.type;try{for(e!==r&&(i.type=e),o=0,s;(s=a[o])&&!i.propagationStopped;o++)try{s.callback.apply(null,p)===!1&&i.preventDefault()}catch(c){if(!this.handleError(c))throw console.error("unhandled error in event listener"),console.error(c.stack),c}}finally{e!==r&&(i.type=r)}return i.defaultPrevented?!1:i.propagationStopped?null:!0},i.prototype.handleError=function(e){return!this.fire("error",{error:e})},i.prototype._addListener=function(e,t){var n,i,r=this._getListeners(e);for(n=0;i=r[n];n++)if(i.priority<t.priority)return void r.splice(n,0,t);r.push(t)},i.prototype._getListeners=function(e){var t=this._listeners[e];return t||(this._listeners[e]=t=[]),t}},{}],40:[function(e,t){function n(e,t,n){this._renderer=e,this._elementRegistry=t,this._snap=n}var i=window._,r=e(62),a=e(59);n.$inject=["renderer","elementRegistry","snap"],t.exports=n,n.prototype._getChildren=function(e){var t,n=this._elementRegistry.getGraphics(e);return e.parent?(t=r.getChildren(n),t||(t=n.parent().group().attr("class","djs-children"))):t=n,t},n.prototype._clear=function(e){var t=r.getVisual(e);return a.clear(t.node),t},n.prototype._createContainer=function(e,t){var n=t.group().attr("class","djs-group"),i=n.group().attr("class","djs-element djs-"+e);return i.group().attr("class","djs-visual"),i},n.prototype.create=function(e,t){var n=this._getChildren(t.parent);return this._createContainer(e,n)},n.prototype.updateContainments=function(e){var t,n=this,r=this._elementRegistry;t=i.reduce(e,function(e,t){return t.parent&&(e[t.parent.id]=t.parent),e},{}),i.forEach(t,function(e){var t=n._getChildren(e),a=e.children;a&&i.forEach(a.slice().reverse(),function(e){var n=r.getGraphics(e);n.parent().prependTo(t)})})},n.prototype.update=function(e,t,n){var i=this._clear(n);if("shape"===e)this._renderer.drawShape(i,t),n.translate(t.x,t.y);else{if("connection"!==e)throw new Error("unknown type: "+e);this._renderer.drawConnection(i,t)}n.attr("display",t.hidden?"none":"block")},n.prototype.remove=function(e){var t=this._elementRegistry.getGraphics(e);t.parent().remove()}},{}],41:[function(e,t){t.exports={__depends__:[e(45)],__init__:["canvas"],canvas:["type",e(36)],elementRegistry:["type",e(38)],elementFactory:["type",e(37)],eventBus:["type",e(39)],graphicsFactory:["type",e(40)]}},{}],42:[function(e,t){"use strict";function n(e){this.CONNECTION_STYLE=e.style(["no-fill"],{strokeWidth:5,stroke:"fuchsia"}),this.SHAPE_STYLE=e.style({fill:"white",stroke:"fuchsia",strokeWidth:2})}function i(e){for(var t,n="",i=0;t=e[i];i++)n+=t.x+","+t.y+" ";return n}function r(e,t){return o.create("polyline",{points:i(e)}).attr(t||{})}function a(e,t){return e.attr({points:i(t)})}var o=e(43);t.exports=n,n.$inject=["styles"],n.prototype.drawShape=function(e,t){return e.rect(0,0,t.width||0,t.height||0,10,10).attr(this.SHAPE_STYLE)},n.prototype.drawConnection=function(e,t){return r(t.waypoints,this.CONNECTION_STYLE).appendTo(e)},t.exports.createLine=r,t.exports.updateLine=a},{}],43:[function(e,t){var n=window.Snap;e(46),t.exports=n},{}],44:[function(e,t){"use strict";function n(){var e={"no-fill":{fill:"none"},"no-border":{strokeOpacity:0},"no-events":{pointerEvents:"none"}};this.cls=function(e,t,n){var r=this.style(t,n);return i.extend(r,{"class":e})},this.style=function(t,n){i.isArray(t)||n||(n=t,t=[]);var r=i.inject(t,function(t,n){return i.extend(t,e[n]||{})},{});return n?i.extend(r,n):r}}var i=window._;t.exports=n},{}],45:[function(e,t){"use strict";t.exports={renderer:["type",e(42)],snap:["value",e(43)],styles:["type",e(44)]}},{}],46:[function(){"use strict";var e=window.Snap;e.plugin(function(e,t){t.prototype.children=function(){for(var t=[],n=this.node.childNodes,i=0,r=n.length;r>i;i++)t[i]=new e(n[i]);return t}}),e.plugin(function(e,t){function n(e){return e.split(/\s+/)}function i(e){return e.join(" ")}function r(e){return n(e.attr("class")||"")}function a(e,t){e.attr("class",i(t))}t.prototype.addClass=function(e){var t,i,o=r(this),s=n(e);for(t=0,i;i=s[t];t++)-1===o.indexOf(i)&&o.push(i);return a(this,o),this},t.prototype.hasClass=function(e){if(!e)throw new Error("[snapsvg] syntax: hasClass(clsStr)");return-1!==r(this).indexOf(e)},t.prototype.removeClass=function(e){var t,i,o,s=r(this),p=n(e);for(t=0,i;i=p[t];t++)o=s.indexOf(i),-1!==o&&s.splice(o,1);return a(this,s),this}}),e.plugin(function(e,t){t.prototype.translate=function(t,n){var i=new e.Matrix;return i.translate(t,n),this.transform(i)}}),e.plugin(function(e){e.create=function(t,n){return e._.wrap(e._.$(t,n))}}),e.plugin(function(e){e.createSnapAt=function(t,n,i){var r=document.createElementNS("http://www.w3.org/2000/svg","svg");return r.setAttribute("width",t),r.setAttribute("height",n),i||(i=document.body),i.appendChild(r),new e(r)}})},{}],47:[function(e,t){"use strict";function n(e,t,n,r){function p(n,i){var o,s=a.closest(i.target,"svg, .djs-element"),p=s&&r(s),c=t.get(p);p&&c&&(o=e.fire(n,{element:c,gfx:p,originalEvent:i}),o&&i.preventDefault())}function c(e){var t=h[e];return t||(t=h[e]=function(t){t.button||p(e,t)}),t}function l(e){var t=e.node;a.on(t,"mouseover",c("element.hover")),a.on(t,"mouseout",c("element.out")),a.on(t,"click",c("element.click")),a.on(t,"dblclick",c("element.dblclick")),a.on(t,"mousedown",c("element.mousedown")),a.on(t,"mouseup",c("element.mouseup"))}function u(e){var t=e.node;a.off(t,"mouseover",c("element.hover")),a.off(t,"mouseout",c("element.out")),a.off(t,"click",c("element.click")),a.off(t,"dblclick",c("element.dblclick")),a.off(t,"mousedown",c("element.mousedown")),a.off(t,"mouseup",c("element.mouseup"))}var m=n.cls("djs-hit",["no-fill","no-border"],{stroke:"white",strokeWidth:15}),h={};e.on("canvas.destroy",function(e){u(e.svg)}),e.on("canvas.init",function(e){l(e.svg)}),e.on(["shape.added","connection.added"],function(e){var t,n,r=e.element,a=e.gfx;r.waypoints?(t=o(r.waypoints),n="connection"):(t=i.create("rect",{x:0,y:0,width:r.width,height:r.height}),n="shape"),t.attr(m).appendTo(a.node)}),e.on("shape.changed",function(e){var t=e.element,n=e.gfx,i=n.select(".djs-hit");i.attr({width:t.width,height:t.height})}),e.on("connection.changed",function(e){var t=e.element,n=e.gfx,i=n.select(".djs-hit");s(i,t.waypoints)}),this.fire=p,this.mouseHandler=c}var i=window.Snap,r=e(42),a=e(59),o=r.createLine,s=r.updateLine;n.$inject=["eventBus","elementRegistry","styles","snap"],t.exports=n},{}],48:[function(e,t){t.exports={__init__:["interactionEvents"],interactionEvents:["type",e(47)]}},{}],49:[function(e,t){"use strict";function n(e,t){function n(e){return i.create("rect",p).prependTo(e)}function a(e,t){e.attr({x:-s,y:-s,width:t.width+2*s,height:t.height+2*s})}function o(e,t){var n=r(t);e.attr({x:n.x-s,y:n.y-s,width:n.width+2*s,height:n.height+2*s})}var s=6,p=t.cls("djs-outline",["no-fill"]);e.on(["shape.added","shape.changed"],function(e){var t=e.element,i=e.gfx,r=i.select(".djs-outline");r||(r=n(i,t)),a(r,t)}),e.on(["connection.added","connection.changed"],function(e){var t=e.element,i=e.gfx,r=i.select(".djs-outline");r||(r=n(i,t)),o(r,t)})}var i=window.Snap,r=e(60).getBBox;n.$inject=["eventBus","styles","elementRegistry"],t.exports=n},{}],50:[function(e,t){"use strict";t.exports={__init__:["outline"],outline:["type",e(49)]}},{}],51:[function(e,t){"use strict";function n(e,t,n,i){this._eventBus=t,this._canvas=n,this._elementRegistry=i,this._ids=o,this._overlayDefaults={show:{trigger:"automatic",minZoom:.7,maxZoom:5}},this._overlays={},this._overlayContainers={},this._overlayRoot=r('<div class="djs-overlay-container" />').css({position:"absolute",width:0,height:0}).prependTo(n.getContainer()),this._init(e)}var i=window._,r=window.$,a=e(60).getBBox,o=new(e(63))("ov");n.$inject=["config.overlays","eventBus","canvas","elementRegistry"],t.exports=n,n.prototype.get=function(e){if(i.isString(e)&&(e={id:e}),e.element){var t=this._getOverlayContainer(e.element,!0);return t?e.type?i.filter(t.overlays,{type:e.type}):i.clone(t.overlays):[]}return e.type?i.filter(this._overlays,{type:e.type}):e.id?this._overlays[e.id]:null},n.prototype.add=function(e,t,n){if(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 a=this._ids.next();return n=i.extend({},this._overlayDefaults,n,{id:a,type:t,element:e,html:r(n.html)}),this._addOverlay(n),a},n.prototype.remove=function(e){var t=this.get(e)||[];i.isArray(t)||(t=[t]);var n=this;i.forEach(t,function(e){var t=n._getOverlayContainer(e.element,!0);if(e&&(e.html.remove(),e.htmlContainer.remove(),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)}})},n.prototype.show=function(){this._overlayRoot.show()},n.prototype.hide=function(){this._overlayRoot.hide()},n.prototype._updateOverlayContainer=function(e){var t=e.element,n=e.html,i=t.x,r=t.y;if(t.waypoints){var o=a(t);i=o.x,r=o.y}n.css({left:i,top:r})},n.prototype._updateOverlay=function(e){var t=e.position,n=e.htmlContainer,i=e.element,r=t.left,o=t.top;if(void 0!==t.right){var s;s=i.waypoints?a(i).width:i.width,r=-1*t.right+s}if(void 0!==t.bottom){var p;p=i.waypoints?a(i).height:i.height,o=-1*t.bottom+p}n.css({left:r||0,top:o||0})},n.prototype._createOverlayContainer=function(e){var t=r("<div />").addClass("djs-overlays").addClass("djs-overlays-"+e.id).css({position:"absolute"});t.appendTo(this._overlayRoot);var n={html:t,element:e,overlays:[]};return this._updateOverlayContainer(n),n},n.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._overlayRoot.css("transform",i)},n.prototype._getOverlayContainer=function(e,t){var n=e&&e.id||e,i=this._overlayContainers[n];return i||t||(i=this._overlayContainers[n]=this._createOverlayContainer(e)),i},n.prototype._addOverlay=function(e){var t=e.id,n=e.element,i=this._getOverlayContainer(n),a=r("<div>",{id:t,"class":"djs-overlay"}).css({position:"absolute"}).append(e.html);e.type&&a.addClass("djs-overlay-"+e.type),e.htmlContainer=a,i.overlays.push(e),i.html.append(a),this._overlays[t]=e,this._updateOverlay(e)},n.prototype._updateOverlayVisibilty=function(e){i.forEach(this._overlays,function(t){t.show&&(t.show.minZoom>e.scale||t.show.maxZoom<e.scale?t.htmlContainer.hide():t.htmlContainer.show())})},n.prototype._init=function(e){var t=this._eventBus,n=this,r=function(e){n._updateRoot(e),n._updateOverlayVisibilty(e),n.show()};e&&e.deferUpdate===!1||(r=i.debounce(r,300)),t.on("canvas.viewbox.changed",function(e){n.hide(),r(e.viewbox)}),t.on(["shape.remove","connection.remove"],function(e){var t=n.get({element:e.element});i.forEach(t,function(e){n.remove(e.id)})}),t.on(["element.changed"],function(e){var t=e.element,r=n._getOverlayContainer(t,!0);r&&(i.forEach(r.overlays,function(e){n._updateOverlay(e)}),n._updateOverlayContainer(r))}),t.on("element.marker.update",function(e){var t=n._getOverlayContainer(e.element,!0);t&&t.html[e.add?"addClass":"removeClass"](e.marker)})}},{}],52:[function(e,t){"use strict";t.exports={__init__:["overlays"],overlays:["type",e(51)]}},{}],53:[function(e,t){"use strict";function n(e){this._eventBus=e,this._selectedElements=[];var t=this;e.on(["shape.remove","connection.remove"],function(e){var n=e.element;t.deselect(n)})}var i=window._;n.$inject=["eventBus"],t.exports=n,n.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})}},n.prototype.get=function(){return this._selectedElements},n.prototype.isSelected=function(e){return-1!==this._selectedElements.indexOf(e)},n.prototype.select=function(e,t){var n=this._selectedElements,r=n.slice();i.isArray(e)||(e=e?[e]:[]),t?i.forEach(e,function(e){-1===n.indexOf(e)&&n.push(e)}):this._selectedElements=n=e.slice(),this._eventBus.fire("selection.changed",{oldSelection:r,newSelection:n})}},{}],54:[function(e,t){"use strict";function n(e,t,n){e.on("create.end",500,function(e){e.context.canExecute&&t.select(e.shape)}),e.on("connect.end",500,function(e){e.context.canExecute&&e.context.target&&t.select(e.context.target)}),e.on("shape.move.end",500,function(e){t.select(e.context.shapes)}),e.on("element.click",function(e){var r=e.element;if(r===n.getRootElement()&&(r=null),t.isSelected(r))t.deselect(r);else{var a=i(e)||e,o=a.shiftKey;a.altKey||t.select(r,o)}})}var i=e(61).getOriginal;n.$inject=["eventBus","selection","canvas"],t.exports=n},{}],55:[function(e,t){"use strict";function n(e,t){function n(e,n){t.addMarker(e,n)}function o(e,n){t.removeMarker(e,n)}this._multiSelectionBox=null,e.on("element.hover",function(e){n(e.element,r)}),e.on("element.out",function(e){o(e.element,r)}),e.on("selection.changed",function(e){function t(e){o(e,a)}function r(e){n(e,a)}var s=e.oldSelection,p=e.newSelection;i.forEach(s,function(e){-1===p.indexOf(e)&&t(e)}),i.forEach(p,function(e){-1===s.indexOf(e)&&r(e)})})}var i=window._,r="hover",a="selected";n.$inject=["eventBus","canvas","selection","graphicsFactory","styles"],t.exports=n},{}],56:[function(e,t){"use strict";t.exports={__init__:["selectionVisuals","selectionBehavior"],__depends__:[e(48),e(50)],selection:["type",e(53)],selectionVisuals:["type",e(55)],selectionBehavior:["type",e(54)]}},{}],57:[function(e,t){"use strict";function n(){Object.defineProperty(this,"businessObject",{writable:!0}),c.bind(this,"parent"),l.bind(this,"label"),u.bind(this,"outgoing"),m.bind(this,"incoming")}function i(){n.call(this),c.bind(this,"children")}function r(){i.call(this)}function a(){i.call(this),l.bind(this,"labelTarget")}function o(){n.call(this),u.bind(this,"source"),m.bind(this,"target")}var s=window._,p=e(69),c=new p({name:"children",enumerable:!0,collection:!0},{name:"parent"}),l=new p({name:"label",enumerable:!0},{name:"labelTarget"}),u=new p({name:"outgoing",collection:!0},{name:"source"}),m=new p({name:"incoming",collection:!0},{name:"target"});i.prototype=Object.create(n.prototype),r.prototype=Object.create(i.prototype),a.prototype=Object.create(i.prototype),o.prototype=Object.create(n.prototype);var h={connection:o,shape:i,label:a,root:r};t.exports.create=function(e,t){var n=h[e];if(!n)throw new Error("unknown type: <"+e+">");return s.extend(new n,t)},t.exports.Base=n,t.exports.Root=r,t.exports.Shape=i,t.exports.Connection=o,t.exports.Label=a},{}],58:[function(e,t){"use strict";t.exports.remove=function(e,t){if(e&&t){var n=e.indexOf(t);if(-1!==n)return e.splice(n,1),t}},t.exports.add=function(e,t,n){if(e&&t){isNaN(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)}},t.exports.indexOf=function(e,t){return e&&t?e.indexOf(t):-1}},{}],59:[function(e,t){function n(e,t){return l.call(e,t)}function i(e,t){for(;e&&e instanceof Element;){if(n(e,t))return e;e=e.parentNode}return null}function r(e){for(;e.childNodes.length;)e.removeChild(e.childNodes[0])}function a(e,t,n,i){e.addEventListener(t,n,i||!1)}function o(e,t,n,i){e.removeEventListener(t,n,i||!1)}function s(e,t,n,i){var r=function(a){n(a),o(e,t,r,i)};a(e,t,r,i)}var p=Element.prototype,c=function(e){for(var t=this,n=(t.document||t.ownerDocument).querySelectorAll(e),i=0;n[i]&&n[i]!==t;)i++;return n[i]?!0:!1},l=p.matches||p.mozMatchesSelector||p.webkitMatchesSelecor||p.msMatchesSelector||c;t.exports.matches=n,t.exports.closest=i,t.exports.clear=r,t.exports.on=a,t.exports.off=o,t.exports.once=s},{}],60:[function(e,t){function n(e,t,n){var i=!n||-1===e.indexOf(t);return i&&e.push(t),i}function i(e,t,n){n=n||0,l.forEach(e,function(e,r){var a=t(e,r,n);l.isArray(a)&&a.length&&i(a,t,n+1)})}function r(e,t,r){var a=[],o=[];return i(e,function(e,i,s){n(a,e,t);var p=e.children;return(-1===r||r>s)&&p&&n(o,p,t)?p:void 0}),a}function a(e,t){return r(e,!t,1)}function o(e,t){return r(e,!t,-1)}function s(e){function t(e){r[e.source.id]&&r[e.target.id]&&(r[e.id]=e),a[e.source.id]&&a[e.target.id]&&(p[e.id]=s[e.id]=e),o[e.id]=e}function n(e){return s[e.id]=e,e.waypoints?void(p[e.id]=o[e.id]=e):(a[e.id]=e,l.forEach(e.incoming,t),l.forEach(e.outgoing,t),e.children)}var r=l.groupBy(e,function(e){return e.id}),a={},o={},s={},p={};return i(e,n),{allShapes:a,allConnections:o,topLevel:r,enclosedConnections:p,enclosedElements:s}}function p(e,t){t=!!t,l.isArray(e)||(e=[e]);var n,i,r,a;return l.forEach(e,function(e){var o=e;e.waypoints&&!t&&(o=p(e.waypoints,!0));var s=o.x,c=o.y,l=o.height||0,u=o.width||0;(n>s||void 0===n)&&(n=s),(i>c||void 0===i)&&(i=c),(s+u>r||void 0===r)&&(r=s+u),(c+l>a||void 0===a)&&(a=c+l)}),{x:n,y:i,height:a-i,width:r-n}}function c(e,t){var n={};return l.forEach(e,function(e){var i=e;i.waypoints&&(i=p(i)),!l.isNumber(t.y)&&i.x>t.x&&(n[e.id]=e),!l.isNumber(t.x)&&i.y>t.y&&(n[e.id]=e),i.x>t.x&&i.y>t.y&&(l.isNumber(t.width)&&l.isNumber(t.height)&&i.width+i.x<t.width+t.x&&i.height+i.y<t.height+t.y?n[e.id]=e:l.isNumber(t.width)&&l.isNumber(t.height)||(n[e.id]=e))}),n}var l=window._;t.exports.eachElement=i,t.exports.selfAndDirectChildren=a,t.exports.selfAndAllChildren=o,t.exports.getBBox=p,t.exports.getEnclosedElements=c,t.exports.getClosure=s},{}],61:[function(e,t){function n(e){return e&&e.preventDefault()}function i(e,t){e&&(e.stopPropagation&&e.stopPropagation(),t&&e.stopImmediatePropagation&&e.stopImmediatePropagation())}function r(e){return e.originalEvent||e.srcEvent}function a(e,t){s(e,t),o(e)}function o(e){n(e),n(r(e))}function s(e,t){i(e,t),i(r(e),t)}function p(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}t.exports.getOriginal=r,t.exports.stopEvent=a,t.exports.preventDefault=o,t.exports.stopPropagation=s,t.exports.toPoint=p},{}],62:[function(e,t){function n(e){return e.select(".djs-visual")}function i(e){return e.parent().children()[1]}function r(e){return n(e).select("*").getBBox()}t.exports.getVisual=n,t.exports.getChildren=i,t.exports.getBBox=r},{}],63:[function(e,t){"use strict";function n(e){this._counter=0,this._prefix=(e?e+"-":"")+Math.floor(1e9*Math.random())+"-"
5
+ }t.exports=n,n.prototype.next=function(){return this._prefix+ ++this._counter}},{}],64:[function(e,t){"use strict";function n(e){var t=e.split("-");return{horizontal:t[0]||"center",vertical:t[1]||"top"}}function i(e){return o.isObject(e)?o.extend({top:0,left:0,right:0,bottom:0},e):{top:e,left:e,right:e,bottom:e}}function r(e){this._config=o.extend({},{size:p,padding:s,style:{},align:"center-top"},e||{})}var a=window.Snap,o=window._,s=0,p={width:150,height:50};r.prototype.createText=function(e,t,r){function s(e){function t(){if(s.length<o.length){var t=e[0]||"",n=o.slice(s.length);t=/-\s*$/.test(n)?n.replace(/-\s*$/,"")+t.replace(/^\s+/,""):n+" "+t,e[0]=t}return{width:a.width,height:a.height,text:s}}function n(e){return d.textContent=e,d.getBBox()}function i(e,t){var n,i=e.split(/(\s|-)/g),r=[],a=0;if(i.length>1)for(;n=i.shift();){if(!(n.length+a<t)){"-"===n&&r.pop();break}r.push(n),a+=n.length}return r.join("")}function r(e,t,n){var r=e.length*(n/t),a=i(e,r);return a||(a=e.slice(0,Math.floor(r-1))),a}for(var a,o=e.shift(),s=o;;){if(a=n(s),a.width<f)return t();s=r(s,a.width,f)}}var p=o.merge({},this._config.size,r.box||{}),c=o.merge({},this._config.style,r.style||{}),l=n(r.align||this._config.align),u=i(void 0!==r.padding?r.padding:this._config.padding),m=t.split(/\r?\n/g),h=[],f=p.width-u.left-u.right,d=e.text(0,0,"").attr(c).node;for(d.ownerSVGElement.appendChild(d);m.length;)h.push(s(m));var y,g,v=o.reduce(h,function(e,t){return e+t.height},0);switch(l.vertical){case"middle":y=(p.height-v)/2-h[0].height/4;break;default:y=u.top}var E=e.text().attr(c);return o.forEach(h,function(e){switch(y+=e.height,l.horizontal){case"left":g=u.left;break;case"right":g=f-u.right-e.width;break;default:g=(f-e.width)/2+u.left}var t=a.create("tspan",{x:g,y:y}).node;t.textContent=e.text,E.append(t)}),d.parentNode.removeChild(d),E},t.exports=r},{}],65:[function(e,t,n){var i=function(e){return"[object Array]"===Object.prototype.toString.call(e)},r=function(){var e=Array.prototype.slice.call(arguments);1===e.length&&i(e[0])&&(e=e[0]);var t=e.pop();return t.$inject=e,t},a=/^function\s*[^\(]*\(\s*([^\)]*)\)/m,o=/\/\*([^\*]*)\*\//m,s=function(e){if("function"!=typeof e)throw new Error('Cannot annotate "'+e+'". Expected a function!');var t=e.toString().match(a);return t[1]&&t[1].split(",").map(function(e){return t=e.match(o),t?t[1].trim():e.trim()})||[]};n.annotate=r,n.parse=s,n.isArray=i},{}],66:[function(e,t){t.exports={annotate:e(65).annotate,Module:e(68),Injector:e(67)}},{}],67:[function(e,t){var n=e(68),i=e(65).parse,r=e(65).annotate,a=e(65).isArray,o=function(e,t){t=t||{get:function(e){throw s.push(e),u('No provider for "'+e+'"!')}};var s=[],p=this._providers=Object.create(t._providers||null),c=this._instances=Object.create(null),l=c.injector=this,u=function(e){var t=s.join(" -> ");return s.length=0,new Error(t?e+" (Resolving: "+t+")":e)},m=function(e){if(!p[e]&&-1!==e.indexOf(".")){for(var n=e.split("."),i=m(n.shift());n.length;)i=i[n.shift()];return i}if(Object.hasOwnProperty.call(c,e))return c[e];if(Object.hasOwnProperty.call(p,e)){if(-1!==s.indexOf(e))throw s.push(e),u("Cannot resolve circular dependency!");return s.push(e),c[e]=p[e][0](p[e][1]),s.pop(),c[e]}return t.get(e)},h=function(e){var t=Object.create(e.prototype),n=f(e,t);return"object"==typeof n?n:t},f=function(e,t){if("function"!=typeof e){if(!a(e))throw new Error('Cannot invoke "'+e+'". Expected a function!');e=r(e.slice())}var n=e.$inject&&e.$inject||i(e),o=n.map(function(e){return m(e)});return e.apply(t,o)},d=function(e){return r(function(t){return e.get(t)})},y=function(e,t){if(t&&t.length){var n,i,r,a,s=Object.create(null),c=Object.create(null),u=[],m=[],h=[];for(var f in p)n=p[f],-1!==t.indexOf(f)&&("private"===n[2]?(i=u.indexOf(n[3]),-1===i?(r=n[3].createChild([],t),a=d(r),u.push(n[3]),m.push(r),h.push(a),s[f]=[a,f,"private",r]):s[f]=[h[i],f,"private",m[i]]):s[f]=[n[2],n[1]],c[f]=!0),"factory"!==n[2]&&"type"!==n[2]||!n[1].$scope||t.forEach(function(e){-1!==n[1].$scope.indexOf(e)&&(s[f]=[n[2],n[1]],c[e]=!0)});t.forEach(function(e){if(!c[e])throw new Error('No provider for "'+e+'". Cannot use provider from the parent!')}),e.unshift(s)}return new o(e,l)},g={factory:f,type:h,value:function(e){return e}};e.forEach(function(e){function t(e,t){return"value"!==e&&a(t)&&(t=r(t.slice())),t}if(e instanceof n)e.forEach(function(e){var n=e[0],i=e[1],r=e[2];p[n]=[g[i],t(i,r),i]});else if("object"==typeof e)if(e.__exports__){var i=Object.keys(e).reduce(function(t,n){return"__"!==n.substring(0,2)&&(t[n]=e[n]),t},Object.create(null)),s=new o((e.__modules__||[]).concat([i]),l),c=r(function(e){return s.get(e)});e.__exports__.forEach(function(e){p[e]=[c,e,"private",s]})}else Object.keys(e).forEach(function(n){if("private"===e[n][2])return void(p[n]=e[n]);var i=e[n][0],r=e[n][1];p[n]=[g[i],t(i,r),i]})}),this.get=m,this.invoke=f,this.instantiate=h,this.createChild=y};t.exports=o},{}],68:[function(e,t){var n=function(){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)}};t.exports=n},{}],69:[function(e,t){t.exports=e(71),t.exports.Collection=e(70)},{}],70:[function(e,t){"use strict";function n(e,t,n,i){var r=n.inverse;return e.remove=function(e){var n=this.indexOf(e);return-1!==n&&(this.splice(n,1),t.unset(e,r,i)),e},e.contains=function(e){return-1!==this.indexOf(e)},e.add=function(e){this.contains(e)||(this.push(e),t.set(e,r,i))},e}t.exports.extend=n},{}],71:[function(e,t){"use strict";function n(e,t){return Object.prototype.hasOwnProperty.call(e,t.name||t)}function i(e,t,n){Object.defineProperty(n,t.name,{enumerable:t.enumerable,value:o.extend(n[t.name]||[],e,t,n)})}function r(e,t,n){var i=t.inverse,r=n[t.name];Object.defineProperty(n,t.name,{enumerable:t.enumerable,get:function(){return r},set:function(t){if(t!==r){var a=r;r=null,a&&e.unset(a,i,n),r=t,e.set(r,i,n)}}})}function a(e,t){return this instanceof a?(e.inverse=t,t.inverse=e,this.props={},this.props[e.name]=e,void(this.props[t.name]=t)):new a(e,t)}var o=e(70);a.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?i(this,t,e):r(this,t,e)},a.prototype.ensureBound=function(e,t){n(e,t)||this.bind(e,t)},a.prototype.unset=function(e,t,n){e&&(this.ensureBound(e,t),t.collection?e[t.name].remove(n):e[t.name]=void 0)},a.prototype.set=function(e,t,n){e&&(this.ensureBound(e,t),t.collection?e[t.name].add(n):e[t.name]=n)},t.exports=a},{}]},{},[1])(1)});
@@ -0,0 +1,30 @@
1
+ # Changelog
2
+
3
+ ### 2.0.4, 2014-09-28
4
+ - Fix IE pointer issue. [#665](https://github.com/hammerjs/hammer.js/pull/665)
5
+ - Fix multi-touch at different elements. [#668](https://github.com/hammerjs/hammer.js/pull/668)
6
+ - Added experimental [single-user Touch input handler](src/input/singletouch.js). This to improve performance/ux when only a single user has to be supported. Plans are to release 2.1 with this as default, and a settings to enable the multi-user handler.
7
+
8
+ ### 2.0.3, 2014-09-10
9
+ - Manager.set improvements.
10
+ - Fix requireFailure() call in Manager.options.recognizers.
11
+ - Make DIRECTION_ALL for pan and swipe gestures less blocking.
12
+ - Fix Swipe recognizer threshold option.
13
+ - Expose the Input classes.
14
+ - Added the option `inputClass` to set the used input handler.
15
+
16
+ ### 2.0.2, 2014-07-26
17
+ - Improved mouse and pointer-events input, now able to move outside the window.
18
+ - Added the export name (`Hammer`) as an argument to the wrapper.
19
+ - Add the option *experimental* `inputTarget` to change the element that receives the events.
20
+ - Improved performance when only one touch being active.
21
+ - Fixed the jumping deltaXY bug when going from single to multi-touch.
22
+ - Improved velocity calculations.
23
+
24
+ ### 2.0.1, 2014-07-15
25
+ - Fix issue when no document.body is available
26
+ - Added pressup event for the press recognizer
27
+ - Removed alternative for Object.create
28
+
29
+ ### 2.0.0, 2014-07-11
30
+ - Full rewrite of the library.
@@ -0,0 +1,41 @@
1
+ # Contributing to Hammer.js
2
+
3
+ Looking to contribute something to Hammer.js? **Here's how you can help.**
4
+
5
+
6
+ ## Reporting issues
7
+
8
+ We only accept issues that are bug reports or feature requests. Bugs must be
9
+ isolated and reproducible problems that can be fixed within the Hammer.js.
10
+ Please read the following guidelines before opening any issue.
11
+
12
+ 1. [**Read the documentation**](https://hammerjs.github.io)
13
+
14
+ 2. **Search for existing issues.** We get a lot of duplicate issues, and you'd
15
+ help us out a lot by first checking if someone else has reported the same issue.
16
+ Moreover, the issue may have already been resolved with a fix available. Also
17
+ take a look if your problem is explained at the Wiki.
18
+
19
+ 3. **Create an isolated and reproducible test case.** Be sure the problem exists
20
+ in Hammer's code with a reduced test case that should be included in each bug
21
+ report.
22
+
23
+ 4. **Include a live example.** Make use of jsFiddle or jsBin to share your
24
+ isolated test cases. Also, a screen capture would work, with tools like LICEcap.
25
+
26
+ 5. **Share as much information as possible.** Include operating system and
27
+ version, browser and version, version of Hammer.js, customized or vanilla build,
28
+ etc. where appropriate. Also include steps to reproduce the bug.
29
+
30
+ ## Pull requests
31
+
32
+ 1. Changes must be done in `/src` files, never just the compiled files. Also, don't
33
+ commit the compiled files.
34
+
35
+ 2. Try not to pollute your pull request with unintended changes. Keep them simple
36
+ and small
37
+
38
+ 3. Try to share which browsers your code has been tested in before submitting a
39
+ pull request
40
+
41
+ 4. Write tests for your code, these can be found in `/tests`.
@@ -0,0 +1,123 @@
1
+ module.exports = (grunt) ->
2
+ grunt.initConfig
3
+ pkg: grunt.file.readJSON 'package.json'
4
+
5
+ usebanner:
6
+ taskName:
7
+ options:
8
+ position: 'top'
9
+ banner: '
10
+ /*! <%= pkg.title || pkg.name %> - v<%= pkg.version %> - <%= grunt.template.today("yyyy-mm-dd") %>\n
11
+ * <%= pkg.homepage %>\n
12
+ *\n
13
+ * Copyright (c) <%= grunt.template.today("yyyy") %> <%= pkg.author.name %>;\n
14
+ * Licensed under the <%= _.pluck(pkg.licenses, "type").join(", ") %> license */'
15
+ linebreak: true
16
+ files:
17
+ src: ['./hammer.js','./hammer.min.js']
18
+
19
+ concat:
20
+ build:
21
+ src: [
22
+ 'src/hammer.prefix'
23
+ 'src/utils.js'
24
+ 'src/input.js'
25
+ 'src/input/*.js'
26
+ 'src/touchaction.js'
27
+ 'src/recognizer.js'
28
+ 'src/recognizers/*.js'
29
+ 'src/hammer.js'
30
+ 'src/manager.js'
31
+ 'src/expose.js'
32
+ 'src/hammer.suffix']
33
+ dest: 'hammer.js'
34
+
35
+ uglify:
36
+ min:
37
+ options:
38
+ report: 'gzip'
39
+ sourceMap: 'hammer.min.map'
40
+ files:
41
+ 'hammer.min.js': ['hammer.js']
42
+ # special test build that exposes everything so it's testable
43
+ test:
44
+ options:
45
+ wrap: "$H"
46
+ comments: 'all'
47
+ exportAll: true
48
+ mangle: false
49
+ beautify: true
50
+ compress:
51
+ global_defs:
52
+ exportName: 'Hammer'
53
+ files:
54
+ 'tests/build.js': [
55
+ 'src/utils.js'
56
+ 'src/input.js'
57
+ 'src/input/*.js'
58
+ 'src/touchaction.js'
59
+ 'src/recognizer.js'
60
+ 'src/recognizers/*.js'
61
+ 'src/hammer.js'
62
+ 'src/manager.js'
63
+ 'src/expose.js']
64
+
65
+ 'string-replace':
66
+ version:
67
+ files:
68
+ 'hammer.js': 'hammer.js'
69
+ options:
70
+ replacements: [
71
+ pattern: '{{PKG_VERSION}}'
72
+ replacement: '<%= pkg.version %>'
73
+ ]
74
+
75
+ jshint:
76
+ options:
77
+ jshintrc: true
78
+ build:
79
+ src: ['hammer.js']
80
+
81
+ jscs:
82
+ src: [
83
+ 'src/**/*.js'
84
+ 'tests/unit/*.js'
85
+ ]
86
+ options:
87
+ config: "./.jscsrc"
88
+ force: true
89
+
90
+ watch:
91
+ scripts:
92
+ files: ['src/**/*.js']
93
+ tasks: ['concat','string-replace','uglify','jshint','jscs']
94
+ options:
95
+ interrupt: true
96
+
97
+ connect:
98
+ server:
99
+ options:
100
+ hostname: "0.0.0.0"
101
+ port: 8000
102
+
103
+ qunit:
104
+ all: ['tests/unit/index.html']
105
+
106
+
107
+ # Load tasks
108
+ grunt.loadNpmTasks 'grunt-contrib-concat'
109
+ grunt.loadNpmTasks 'grunt-contrib-uglify'
110
+ grunt.loadNpmTasks 'grunt-contrib-qunit'
111
+ grunt.loadNpmTasks 'grunt-contrib-watch'
112
+ grunt.loadNpmTasks 'grunt-contrib-jshint'
113
+ grunt.loadNpmTasks 'grunt-contrib-connect'
114
+ grunt.loadNpmTasks 'grunt-string-replace'
115
+ grunt.loadNpmTasks 'grunt-banner'
116
+ grunt.loadNpmTasks 'grunt-jscs-checker'
117
+
118
+ # Default task(s)
119
+ grunt.registerTask 'default', ['connect', 'watch']
120
+ grunt.registerTask 'default-test', ['connect', 'uglify:test', 'watch']
121
+ grunt.registerTask 'build', ['concat', 'string-replace', 'uglify:min', 'usebanner', 'test']
122
+ grunt.registerTask 'test', ['jshint', 'jscs', 'uglify:test', 'qunit']
123
+ grunt.registerTask 'test-travis', ['build']
@@ -0,0 +1,21 @@
1
+ The MIT License (MIT)
2
+
3
+ Copyright (C) 2011-2014 by Jorik Tangelder (Eight Media)
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in
13
+ all copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
21
+ THE SOFTWARE.
@@ -0,0 +1,6 @@
1
+ # Hammer.js 2.0 [![Build Status](https://travis-ci.org/hammerjs/hammer.js.svg)](https://travis-ci.org/hammerjs/hammer.js/)
2
+
3
+ Visit [hammerjs.github.io](http://hammerjs.github.io) for documentation.
4
+
5
+ You can get the pre-build versions from the Hammer.js website, or do this by yourself running
6
+ `npm install -g grunt-cli && npm install && grunt build`
@@ -0,0 +1,9 @@
1
+ {
2
+ "name": "hammerjs",
3
+ "version": "2.0.4",
4
+ "main": "hammer.js",
5
+ "ignore": [
6
+ "tests",
7
+ "src"
8
+ ]
9
+ }
@@ -0,0 +1,8 @@
1
+ {
2
+ "name": "hammerjs",
3
+ "version": "2.0.3",
4
+ "main": "hammer.js",
5
+ "scripts": [
6
+ "hammer.js"
7
+ ]
8
+ }