From b3a60ca64c8e0cacab0c90327e44615f1f0f3f5d Mon Sep 17 00:00:00 2001 From: process-analytics-bot <62586190+process-analytics-bot@users.noreply.github.com> Date: Thu, 19 Jun 2025 07:17:02 +0000 Subject: [PATCH] chore(deps): bump bpmn-visualization to 0.47.0 --- demo/draw-path/index.html | 2 +- demo/hacktoberfest-custom-themes/index.html | 2 +- demo/load-and-navigation/assets/index.css | 2 +- demo/load-and-navigation/assets/index.js | 2 +- demo/load-and-navigation/assets/main.js | 16 ++++++++-------- demo/monitoring-all-process-instances/index.html | 2 +- demo/prediction/index.html | 2 +- .../custom-behavior/apply-css-classes/index.html | 2 +- .../index.html | 2 +- .../index.html | 2 +- .../call-activity-with-tabs-on-click/index.html | 2 +- .../growing-sequence-flow/index.html | 2 +- .../javascript-tooltip-and-popover/index.html | 2 +- .../running-dashed-message-flow/index.html | 2 +- .../select-elements-by-bpmn-kind/index.html | 2 +- .../custom-bpmn-theme/custom-colors/index.html | 2 +- .../custom-edge-marker-colors/index.html | 2 +- .../custom-bpmn-theme/custom-fonts/index.html | 2 +- .../custom-user-task-icon/index.html | 2 +- .../diagram-fit-after-load/index.html | 2 +- .../diagram-fit-on-load/index.html | 2 +- .../diagram-navigation/index.html | 2 +- .../load-local-bpmn-diagrams/index.html | 2 +- .../load-remote-bpmn-diagrams/index.html | 2 +- .../pools-filter-on-load/index.html | 2 +- examples/misc/compare-with-bpmn-js/index.html | 2 +- .../index.html | 2 +- examples/overlays/add-remove/index.html | 2 +- examples/overlays/add-stylized/index.html | 2 +- .../custom-overlay-default-style/index.html | 2 +- .../javascript-vanilla-with-webpack/package.json | 2 +- projects/typescript-angular/package.json | 2 +- projects/typescript-lit-element/package.json | 2 +- .../typescript-vanilla-with-parcel/package.json | 2 +- .../typescript-vanilla-with-rollup/package.json | 2 +- .../typescript-vanilla-with-rsbuild/package.json | 2 +- .../typescript-vanilla-with-vitejs/package.json | 2 +- projects/typescript-vue/package.json | 2 +- 38 files changed, 45 insertions(+), 45 deletions(-) diff --git a/demo/draw-path/index.html b/demo/draw-path/index.html index 8b64a3b0..b4f0eb13 100644 --- a/demo/draw-path/index.html +++ b/demo/draw-path/index.html @@ -26,7 +26,7 @@ - + diff --git a/demo/hacktoberfest-custom-themes/index.html b/demo/hacktoberfest-custom-themes/index.html index 3bae9028..9da77dbb 100644 --- a/demo/hacktoberfest-custom-themes/index.html +++ b/demo/hacktoberfest-custom-themes/index.html @@ -35,7 +35,7 @@ - + diff --git a/demo/load-and-navigation/assets/index.css b/demo/load-and-navigation/assets/index.css index 2b5d9b91..c6c2c190 100644 --- a/demo/load-and-navigation/assets/index.css +++ b/demo/load-and-navigation/assets/index.css @@ -1 +1 @@ -/*! tailwindcss v4.0.12 | MIT License | https://tailwindcss.com */@layer theme{:host,:root{--font-sans:ui-sans-serif,system-ui,sans-serif,"Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol","Noto Color Emoji";--font-mono:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,"Liberation Mono","Courier New",monospace;--color-red-100:oklch(.936 .032 17.717);--color-red-200:oklch(.885 .062 18.334);--color-red-500:oklch(.637 .237 25.331);--color-red-600:oklch(.577 .245 27.325);--color-red-900:oklch(.396 .141 25.723);--color-yellow-500:oklch(.795 .184 86.047);--color-blue-600:oklch(.546 .245 262.881);--color-blue-900:oklch(.379 .146 265.522);--color-purple-500:oklch(.627 .265 303.9);--color-fuchsia-400:oklch(.74 .238 322.16);--color-gray-100:oklch(.967 .003 264.542);--color-gray-200:oklch(.928 .006 264.531);--color-gray-800:oklch(.278 .033 256.848);--color-white:#fff;--spacing:.25rem;--text-2xl:1.5rem;--text-2xl--line-height:1.33333;--text-3xl:1.875rem;--text-3xl--line-height:1.2;--font-weight-bold:700;--tracking-normal:0em;--leading-normal:1.5;--radius-lg:.5rem;--radius-2xl:1rem;--default-transition-duration:.15s;--default-transition-timing-function:cubic-bezier(.4,0,.2,1);--default-font-family:var(--font-sans);--default-font-feature-settings:var(--font-sans--font-feature-settings);--default-font-variation-settings:var(--font-sans--font-variation-settings);--default-mono-font-family:var(--font-mono);--default-mono-font-feature-settings:var(--font-mono--font-feature-settings);--default-mono-font-variation-settings:var(--font-mono--font-variation-settings)}}@layer base{*,::backdrop,:after,:before{border:0 solid;box-sizing:border-box;margin:0;padding:0}::file-selector-button{border:0 solid;box-sizing:border-box;margin:0;padding:0}:host,html{-webkit-text-size-adjust:100%;font-family:var(--default-font-family,ui-sans-serif,system-ui,sans-serif,"Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol","Noto Color Emoji");font-feature-settings:var(--default-font-feature-settings,normal);font-variation-settings:var(--default-font-variation-settings,normal);line-height:1.5;-moz-tab-size:4;tab-size:4;-webkit-tap-highlight-color:transparent}body{line-height:inherit}hr{border-top-width:1px;color:inherit;height:0}abbr:where([title]){-webkit-text-decoration:underline dotted;text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;-webkit-text-decoration:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,pre,samp{font-family:var(--default-mono-font-family,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,"Liberation Mono","Courier New",monospace);font-feature-settings:var(--default-mono-font-feature-settings,normal);font-size:1em;font-variation-settings:var(--default-mono-font-variation-settings,normal)}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-.25em}sup{top:-.5em}table{border-collapse:collapse;border-color:inherit;text-indent:0}:-moz-focusring{outline:auto}progress{vertical-align:baseline}summary{display:list-item}menu,ol,ul{list-style:none}audio,canvas,embed,iframe,img,object,svg,video{display:block;vertical-align:middle}img,video{height:auto;max-width:100%}button,input,optgroup,select,textarea{background-color:#0000;border-radius:0;color:inherit;font:inherit;font-feature-settings:inherit;font-variation-settings:inherit;letter-spacing:inherit;opacity:1}::file-selector-button{background-color:#0000;border-radius:0;color:inherit;font:inherit;font-feature-settings:inherit;font-variation-settings:inherit;letter-spacing:inherit;opacity:1}:where(select:is([multiple],[size])) optgroup{font-weight:bolder}:where(select:is([multiple],[size])) optgroup option{padding-inline-start:20px}::file-selector-button{margin-inline-end:4px}::placeholder{color:color-mix(in oklab,currentColor 50%,transparent);opacity:1}textarea{resize:vertical}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-date-and-time-value{min-height:1lh;text-align:inherit}::-webkit-datetime-edit{display:inline-flex}::-webkit-datetime-edit-fields-wrapper{padding:0}::-webkit-datetime-edit,::-webkit-datetime-edit-year-field{padding-block:0}::-webkit-datetime-edit-day-field,::-webkit-datetime-edit-month-field{padding-block:0}::-webkit-datetime-edit-hour-field,::-webkit-datetime-edit-minute-field{padding-block:0}::-webkit-datetime-edit-millisecond-field,::-webkit-datetime-edit-second-field{padding-block:0}::-webkit-datetime-edit-meridiem-field{padding-block:0}:-moz-ui-invalid{box-shadow:none}button,input:where([type=button],[type=reset],[type=submit]){-webkit-appearance:button;-moz-appearance:button;appearance:button}::file-selector-button{-webkit-appearance:button;-moz-appearance:button;appearance:button}::-webkit-inner-spin-button,::-webkit-outer-spin-button{height:auto}[hidden]:where(:not([hidden=until-found])){display:none!important}*,::backdrop,:after,:before{border-color:var(--color-gray-200,currentColor)}::file-selector-button{border-color:var(--color-gray-200,currentColor)}}@layer components;@layer utilities{.collapse{visibility:collapse}.invisible{visibility:hidden}.visible{visibility:visible}.absolute{position:absolute}.fixed{position:fixed}.relative{position:relative}.static{position:static}.inset-0{inset:calc(var(--spacing)*0)}.container{width:100%}@media (width>=40rem){.container{max-width:40rem}}@media (width>=48rem){.container{max-width:48rem}}@media (width>=64rem){.container{max-width:64rem}}@media (width>=80rem){.container{max-width:80rem}}@media (width>=96rem){.container{max-width:96rem}}.mt-0{margin-top:calc(var(--spacing)*0)}.mt-2{margin-top:calc(var(--spacing)*2)}.mr-2{margin-right:calc(var(--spacing)*2)}.mr-3{margin-right:calc(var(--spacing)*3)}.mb-1{margin-bottom:calc(var(--spacing)*1)}.ml-2{margin-left:calc(var(--spacing)*2)}.ml-3{margin-left:calc(var(--spacing)*3)}.ml-4{margin-left:calc(var(--spacing)*4)}.block{display:block}.contents{display:contents}.flex{display:flex}.grid{display:grid}.hidden{display:none}.table{display:table}.h-11{height:calc(var(--spacing)*11)}.h-auto{height:auto}.h-screen{height:100vh}.w-1\/2{width:50%}.w-1\/3{width:33.3333%}.w-full{width:100%}.flex-1{flex:1}.shrink{flex-shrink:1}.flex-grow,.grow{flex-grow:1}.transform{transform:var(--tw-rotate-x)var(--tw-rotate-y)var(--tw-rotate-z)var(--tw-skew-x)var(--tw-skew-y)}.cursor-pointer{cursor:pointer}.resize{resize:both}.flex-col{flex-direction:column}.flex-col-reverse{flex-direction:column-reverse}.flex-row{flex-direction:row}.flex-wrap{flex-wrap:wrap}.items-center{align-items:center}.items-end{align-items:flex-end}.justify-around{justify-content:space-around}.justify-center{justify-content:center}.justify-evenly{justify-content:space-evenly}.overflow-hidden{overflow:hidden}.rounded{border-radius:.25rem}.rounded-lg{border-radius:var(--radius-lg)}.border{border-style:var(--tw-border-style);border-width:1px}.border-b-2{border-bottom-style:var(--tw-border-style);border-bottom-width:2px}.border-b-4{border-bottom-style:var(--tw-border-style);border-bottom-width:4px}.border-gray-800{border-color:var(--color-gray-800)}.border-red-600{border-color:var(--color-red-600)}.border-transparent{border-color:#0000}.bg-gray-100{background-color:var(--color-gray-100)}.bg-gray-800{background-color:var(--color-gray-800)}.bg-white{background-color:var(--color-white)}.bg-linear-to-b{--tw-gradient-position:to bottom in oklab;background-image:linear-gradient(var(--tw-gradient-stops))}.from-red-200{--tw-gradient-from:var(--color-red-200);--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position),var(--tw-gradient-from)var(--tw-gradient-from-position),var(--tw-gradient-to)var(--tw-gradient-to-position))}.to-red-100{--tw-gradient-to:var(--color-red-100);--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position),var(--tw-gradient-from)var(--tw-gradient-from-position),var(--tw-gradient-to)var(--tw-gradient-to-position))}.p-6{padding:calc(var(--spacing)*6)}.px-1{padding-inline:calc(var(--spacing)*1)}.py-0{padding-block:calc(var(--spacing)*0)}.py-1{padding-block:calc(var(--spacing)*1)}.py-3{padding-block:calc(var(--spacing)*3)}.pt-1{padding-top:calc(var(--spacing)*1)}.pt-2{padding-top:calc(var(--spacing)*2)}.pb-0\.5{padding-bottom:calc(var(--spacing)*.5)}.pb-1{padding-bottom:calc(var(--spacing)*1)}.pl-1{padding-left:calc(var(--spacing)*1)}.text-center{text-align:center}.font-sans{font-family:var(--font-sans)}.text-2xl{font-size:var(--text-2xl);line-height:var(--tw-leading,var(--text-2xl--line-height))}.leading-normal{--tw-leading:var(--leading-normal);line-height:var(--leading-normal)}.font-bold{--tw-font-weight:var(--font-weight-bold);font-weight:var(--font-weight-bold)}.tracking-normal{--tw-tracking:var(--tracking-normal);letter-spacing:var(--tracking-normal)}.text-blue-900{color:var(--color-blue-900)}.text-red-500{color:var(--color-red-500)}.text-red-900{color:var(--color-red-900)}.text-white{color:var(--color-white)}.italic{font-style:italic}.no-underline{text-decoration-line:none}.underline{text-decoration-line:underline}.shadow{--tw-shadow:0 1px 3px 0 var(--tw-shadow-color,#0000001a),0 1px 2px -1px var(--tw-shadow-color,#0000001a)}.shadow,.shadow-xl{box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.shadow-xl{--tw-shadow:0 20px 25px -5px var(--tw-shadow-color,#0000001a),0 8px 10px -6px var(--tw-shadow-color,#0000001a)}.outline{outline-style:var(--tw-outline-style);outline-width:1px}.invert{--tw-invert:invert(100%)}.filter,.invert{filter:var(--tw-blur,)var(--tw-brightness,)var(--tw-contrast,)var(--tw-grayscale,)var(--tw-hue-rotate,)var(--tw-invert,)var(--tw-saturate,)var(--tw-sepia,)var(--tw-drop-shadow,)}.transition{transition-duration:var(--tw-duration,var(--default-transition-duration));transition-property:color,background-color,border-color,outline-color,text-decoration-color,fill,stroke,--tw-gradient-from,--tw-gradient-via,--tw-gradient-to,opacity,box-shadow,transform,translate,scale,rotate,filter,-webkit-backdrop-filter,backdrop-filter;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function))}.select-none{-webkit-user-select:none;user-select:none}@media (hover:hover){.hover\:border-red-900:hover{border-color:var(--color-red-900)}.hover\:text-red-900:hover{color:var(--color-red-900)}}@media (width>=48rem){.md\:mt-0{margin-top:calc(var(--spacing)*0)}.md\:mt-2{margin-top:calc(var(--spacing)*2)}.md\:mt-3{margin-top:calc(var(--spacing)*3)}.md\:mr-3{margin-right:calc(var(--spacing)*3)}.md\:mb-2{margin-bottom:calc(var(--spacing)*2)}.md\:ml-0{margin-left:calc(var(--spacing)*0)}.md\:ml-4{margin-left:calc(var(--spacing)*4)}.md\:ml-auto{margin-left:auto}.md\:block{display:block}.md\:w-48{width:calc(var(--spacing)*48)}.md\:w-full{width:100%}.md\:flex-col{flex-direction:column}.md\:flex-row{flex-direction:row}.md\:justify-between{justify-content:space-between}.md\:justify-start{justify-content:flex-start}.md\:rounded-tl-2xl{border-top-left-radius:var(--radius-2xl)}.md\:rounded-bl-2xl{border-bottom-left-radius:var(--radius-2xl)}.md\:border-b-2{border-bottom-style:var(--tw-border-style);border-bottom-width:2px}.md\:border-blue-600{border-color:var(--color-blue-600)}.md\:border-purple-500{border-color:var(--color-purple-500)}.md\:border-red-500{border-color:var(--color-red-500)}.md\:border-yellow-500{border-color:var(--color-yellow-500)}.md\:border-b-fuchsia-400{border-bottom-color:var(--color-fuchsia-400)}.md\:px-2{padding-inline:calc(var(--spacing)*2)}.md\:py-3{padding-block:calc(var(--spacing)*3)}.md\:pt-0{padding-top:calc(var(--spacing)*0)}.md\:pt-1{padding-top:calc(var(--spacing)*1)}.md\:pb-3{padding-bottom:calc(var(--spacing)*3)}.md\:pb-5{padding-bottom:calc(var(--spacing)*5)}.md\:pl-0{padding-left:calc(var(--spacing)*0)}.md\:text-3xl{font-size:var(--text-3xl);line-height:var(--tw-leading,var(--text-3xl--line-height))}}}@property --tw-rotate-x{syntax:"*";inherits:false;initial-value:rotateX(0)}@property --tw-rotate-y{syntax:"*";inherits:false;initial-value:rotateY(0)}@property --tw-rotate-z{syntax:"*";inherits:false;initial-value:rotateZ(0)}@property --tw-skew-x{syntax:"*";inherits:false;initial-value:skewX(0)}@property --tw-skew-y{syntax:"*";inherits:false;initial-value:skewY(0)}@property --tw-border-style{syntax:"*";inherits:false;initial-value:solid}@property --tw-gradient-position{syntax:"*";inherits:false}@property --tw-gradient-from{syntax:"";inherits:false;initial-value:#0000}@property --tw-gradient-via{syntax:"";inherits:false;initial-value:#0000}@property --tw-gradient-to{syntax:"";inherits:false;initial-value:#0000}@property --tw-gradient-stops{syntax:"*";inherits:false}@property --tw-gradient-via-stops{syntax:"*";inherits:false}@property --tw-gradient-from-position{syntax:"";inherits:false;initial-value:0}@property --tw-gradient-via-position{syntax:"";inherits:false;initial-value:50%}@property --tw-gradient-to-position{syntax:"";inherits:false;initial-value:100%}@property --tw-leading{syntax:"*";inherits:false}@property --tw-font-weight{syntax:"*";inherits:false}@property --tw-tracking{syntax:"*";inherits:false}@property --tw-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-shadow-color{syntax:"*";inherits:false}@property --tw-inset-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-inset-shadow-color{syntax:"*";inherits:false}@property --tw-ring-color{syntax:"*";inherits:false}@property --tw-ring-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-inset-ring-color{syntax:"*";inherits:false}@property --tw-inset-ring-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-ring-inset{syntax:"*";inherits:false}@property --tw-ring-offset-width{syntax:"";inherits:false;initial-value:0}@property --tw-ring-offset-color{syntax:"*";inherits:false;initial-value:#fff}@property --tw-ring-offset-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-outline-style{syntax:"*";inherits:false;initial-value:solid}@property --tw-blur{syntax:"*";inherits:false}@property --tw-brightness{syntax:"*";inherits:false}@property --tw-contrast{syntax:"*";inherits:false}@property --tw-grayscale{syntax:"*";inherits:false}@property --tw-hue-rotate{syntax:"*";inherits:false}@property --tw-invert{syntax:"*";inherits:false}@property --tw-opacity{syntax:"*";inherits:false}@property --tw-saturate{syntax:"*";inherits:false}@property --tw-sepia{syntax:"*";inherits:false}@property --tw-drop-shadow{syntax:"*";inherits:false} +/*! tailwindcss v4.1.10 | MIT License | https://tailwindcss.com */@layer properties{@supports (((-webkit-hyphens:none)) and (not (margin-trim:inline))) or ((-moz-orient:inline) and (not (color:rgb(from red r g b)))){*,::backdrop,:after,:before{--tw-rotate-x:initial;--tw-rotate-y:initial;--tw-rotate-z:initial;--tw-skew-x:initial;--tw-skew-y:initial;--tw-border-style:solid;--tw-gradient-position:initial;--tw-gradient-from:#0000;--tw-gradient-via:#0000;--tw-gradient-to:#0000;--tw-gradient-stops:initial;--tw-gradient-via-stops:initial;--tw-gradient-from-position:0%;--tw-gradient-via-position:50%;--tw-gradient-to-position:100%;--tw-leading:initial;--tw-font-weight:initial;--tw-tracking:initial;--tw-shadow:0 0 #0000;--tw-shadow-color:initial;--tw-shadow-alpha:100%;--tw-inset-shadow:0 0 #0000;--tw-inset-shadow-color:initial;--tw-inset-shadow-alpha:100%;--tw-ring-color:initial;--tw-ring-shadow:0 0 #0000;--tw-inset-ring-color:initial;--tw-inset-ring-shadow:0 0 #0000;--tw-ring-inset:initial;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-offset-shadow:0 0 #0000;--tw-outline-style:solid;--tw-blur:initial;--tw-brightness:initial;--tw-contrast:initial;--tw-grayscale:initial;--tw-hue-rotate:initial;--tw-invert:initial;--tw-opacity:initial;--tw-saturate:initial;--tw-sepia:initial;--tw-drop-shadow:initial;--tw-drop-shadow-color:initial;--tw-drop-shadow-alpha:100%;--tw-drop-shadow-size:initial}}}@layer theme{:host,:root{--font-sans:ui-sans-serif,system-ui,sans-serif,"Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol","Noto Color Emoji";--font-mono:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,"Liberation Mono","Courier New",monospace;--color-red-100:oklch(93.6% .032 17.717);--color-red-200:oklch(88.5% .062 18.334);--color-red-500:oklch(63.7% .237 25.331);--color-red-600:oklch(57.7% .245 27.325);--color-red-900:oklch(39.6% .141 25.723);--color-yellow-500:oklch(79.5% .184 86.047);--color-blue-600:oklch(54.6% .245 262.881);--color-blue-900:oklch(37.9% .146 265.522);--color-purple-500:oklch(62.7% .265 303.9);--color-fuchsia-400:oklch(74% .238 322.16);--color-gray-100:oklch(96.7% .003 264.542);--color-gray-200:oklch(92.8% .006 264.531);--color-gray-800:oklch(27.8% .033 256.848);--color-white:#fff;--spacing:.25rem;--text-2xl:1.5rem;--text-2xl--line-height:1.33333;--text-3xl:1.875rem;--text-3xl--line-height:1.2;--font-weight-bold:700;--tracking-normal:0em;--leading-normal:1.5;--radius-lg:.5rem;--radius-2xl:1rem;--default-transition-duration:.15s;--default-transition-timing-function:cubic-bezier(.4,0,.2,1);--default-font-family:var(--font-sans);--default-mono-font-family:var(--font-mono)}}@layer base{*,::backdrop,:after,:before{border:0 solid;box-sizing:border-box;margin:0;padding:0}::file-selector-button{border:0 solid;box-sizing:border-box;margin:0;padding:0}:host,html{-webkit-text-size-adjust:100%;font-family:var(--default-font-family,ui-sans-serif,system-ui,sans-serif,"Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol","Noto Color Emoji");font-feature-settings:var(--default-font-feature-settings,normal);font-variation-settings:var(--default-font-variation-settings,normal);line-height:1.5;-moz-tab-size:4;tab-size:4;-webkit-tap-highlight-color:transparent}hr{border-top-width:1px;color:inherit;height:0}abbr:where([title]){-webkit-text-decoration:underline dotted;text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;-webkit-text-decoration:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,pre,samp{font-family:var(--default-mono-font-family,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,"Liberation Mono","Courier New",monospace);font-feature-settings:var(--default-mono-font-feature-settings,normal);font-size:1em;font-variation-settings:var(--default-mono-font-variation-settings,normal)}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-.25em}sup{top:-.5em}table{border-collapse:collapse;border-color:inherit;text-indent:0}:-moz-focusring{outline:auto}progress{vertical-align:baseline}summary{display:list-item}menu,ol,ul{list-style:none}audio,canvas,embed,iframe,img,object,svg,video{display:block;vertical-align:middle}img,video{height:auto;max-width:100%}button,input,optgroup,select,textarea{background-color:#0000;border-radius:0;color:inherit;font:inherit;font-feature-settings:inherit;font-variation-settings:inherit;letter-spacing:inherit;opacity:1}::file-selector-button{background-color:#0000;border-radius:0;color:inherit;font:inherit;font-feature-settings:inherit;font-variation-settings:inherit;letter-spacing:inherit;opacity:1}:where(select:is([multiple],[size])) optgroup{font-weight:bolder}:where(select:is([multiple],[size])) optgroup option{padding-inline-start:20px}::file-selector-button{margin-inline-end:4px}::placeholder{opacity:1}@supports (not ((-webkit-appearance:-apple-pay-button))) or (contain-intrinsic-size:1px){::placeholder{color:currentColor}@supports (color:color-mix(in lab,red,red)){::placeholder{color:color-mix(in oklab,currentcolor 50%,transparent)}}}textarea{resize:vertical}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-date-and-time-value{min-height:1lh;text-align:inherit}::-webkit-datetime-edit{display:inline-flex}::-webkit-datetime-edit-fields-wrapper{padding:0}::-webkit-datetime-edit,::-webkit-datetime-edit-year-field{padding-block:0}::-webkit-datetime-edit-day-field,::-webkit-datetime-edit-month-field{padding-block:0}::-webkit-datetime-edit-hour-field,::-webkit-datetime-edit-minute-field{padding-block:0}::-webkit-datetime-edit-millisecond-field,::-webkit-datetime-edit-second-field{padding-block:0}::-webkit-datetime-edit-meridiem-field{padding-block:0}:-moz-ui-invalid{box-shadow:none}button,input:where([type=button],[type=reset],[type=submit]){-webkit-appearance:button;-moz-appearance:button;appearance:button}::file-selector-button{-webkit-appearance:button;-moz-appearance:button;appearance:button}::-webkit-inner-spin-button,::-webkit-outer-spin-button{height:auto}[hidden]:where(:not([hidden=until-found])){display:none!important}*,::backdrop,:after,:before{border-color:var(--color-gray-200,currentColor)}::file-selector-button{border-color:var(--color-gray-200,currentColor)}}@layer components;@layer utilities{.collapse{visibility:collapse}.invisible{visibility:hidden}.visible{visibility:visible}.absolute{position:absolute}.fixed{position:fixed}.relative{position:relative}.static{position:static}.inset-0{inset:calc(var(--spacing)*0)}.container{width:100%}@media (min-width:40rem){.container{max-width:40rem}}@media (min-width:48rem){.container{max-width:48rem}}@media (min-width:64rem){.container{max-width:64rem}}@media (min-width:80rem){.container{max-width:80rem}}@media (min-width:96rem){.container{max-width:96rem}}.mt-0{margin-top:calc(var(--spacing)*0)}.mt-2{margin-top:calc(var(--spacing)*2)}.mr-2{margin-right:calc(var(--spacing)*2)}.mr-3{margin-right:calc(var(--spacing)*3)}.mb-1{margin-bottom:calc(var(--spacing)*1)}.ml-2{margin-left:calc(var(--spacing)*2)}.ml-3{margin-left:calc(var(--spacing)*3)}.ml-4{margin-left:calc(var(--spacing)*4)}.block{display:block}.contents{display:contents}.flex{display:flex}.grid{display:grid}.hidden{display:none}.table{display:table}.h-11{height:calc(var(--spacing)*11)}.h-auto{height:auto}.h-screen{height:100vh}.w-1\/2{width:50%}.w-1\/3{width:33.3333%}.w-full{width:100%}.flex-1{flex:1}.shrink{flex-shrink:1}.flex-grow,.grow{flex-grow:1}.transform{transform:var(--tw-rotate-x,)var(--tw-rotate-y,)var(--tw-rotate-z,)var(--tw-skew-x,)var(--tw-skew-y,)}.cursor-pointer{cursor:pointer}.resize{resize:both}.flex-col{flex-direction:column}.flex-col-reverse{flex-direction:column-reverse}.flex-row{flex-direction:row}.flex-wrap{flex-wrap:wrap}.items-center{align-items:center}.items-end{align-items:flex-end}.justify-around{justify-content:space-around}.justify-center{justify-content:center}.justify-evenly{justify-content:space-evenly}.overflow-hidden{overflow:hidden}.rounded{border-radius:.25rem}.rounded-lg{border-radius:var(--radius-lg)}.border{border-style:var(--tw-border-style);border-width:1px}.border-b-2{border-bottom-style:var(--tw-border-style);border-bottom-width:2px}.border-b-4{border-bottom-style:var(--tw-border-style);border-bottom-width:4px}.border-gray-800{border-color:var(--color-gray-800)}.border-red-600{border-color:var(--color-red-600)}.border-transparent{border-color:#0000}.bg-gray-100{background-color:var(--color-gray-100)}.bg-gray-800{background-color:var(--color-gray-800)}.bg-white{background-color:var(--color-white)}.bg-linear-to-b{--tw-gradient-position:to bottom}@supports (background-image:linear-gradient(in lab,red,red)){.bg-linear-to-b{--tw-gradient-position:to bottom in oklab}}.bg-linear-to-b{background-image:linear-gradient(var(--tw-gradient-stops))}.from-red-200{--tw-gradient-from:var(--color-red-200);--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position),var(--tw-gradient-from)var(--tw-gradient-from-position),var(--tw-gradient-to)var(--tw-gradient-to-position))}.to-red-100{--tw-gradient-to:var(--color-red-100);--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position),var(--tw-gradient-from)var(--tw-gradient-from-position),var(--tw-gradient-to)var(--tw-gradient-to-position))}.p-6{padding:calc(var(--spacing)*6)}.px-1{padding-inline:calc(var(--spacing)*1)}.py-0{padding-block:calc(var(--spacing)*0)}.py-1{padding-block:calc(var(--spacing)*1)}.py-3{padding-block:calc(var(--spacing)*3)}.pt-1{padding-top:calc(var(--spacing)*1)}.pt-2{padding-top:calc(var(--spacing)*2)}.pb-0\.5{padding-bottom:calc(var(--spacing)*.5)}.pb-1{padding-bottom:calc(var(--spacing)*1)}.pl-1{padding-left:calc(var(--spacing)*1)}.text-center{text-align:center}.font-sans{font-family:var(--font-sans)}.text-2xl{font-size:var(--text-2xl);line-height:var(--tw-leading,var(--text-2xl--line-height))}.leading-normal{--tw-leading:var(--leading-normal);line-height:var(--leading-normal)}.font-bold{--tw-font-weight:var(--font-weight-bold);font-weight:var(--font-weight-bold)}.tracking-normal{--tw-tracking:var(--tracking-normal);letter-spacing:var(--tracking-normal)}.text-blue-900{color:var(--color-blue-900)}.text-red-500{color:var(--color-red-500)}.text-red-900{color:var(--color-red-900)}.text-white{color:var(--color-white)}.italic{font-style:italic}.no-underline{text-decoration-line:none}.underline{text-decoration-line:underline}.shadow{--tw-shadow:0 1px 3px 0 var(--tw-shadow-color,#0000001a),0 1px 2px -1px var(--tw-shadow-color,#0000001a)}.shadow,.shadow-xl{box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.shadow-xl{--tw-shadow:0 20px 25px -5px var(--tw-shadow-color,#0000001a),0 8px 10px -6px var(--tw-shadow-color,#0000001a)}.outline{outline-style:var(--tw-outline-style);outline-width:1px}.invert{--tw-invert:invert(100%)}.filter,.invert{filter:var(--tw-blur,)var(--tw-brightness,)var(--tw-contrast,)var(--tw-grayscale,)var(--tw-hue-rotate,)var(--tw-invert,)var(--tw-saturate,)var(--tw-sepia,)var(--tw-drop-shadow,)}.transition{transition-duration:var(--tw-duration,var(--default-transition-duration));transition-property:color,background-color,border-color,outline-color,text-decoration-color,fill,stroke,--tw-gradient-from,--tw-gradient-via,--tw-gradient-to,opacity,box-shadow,transform,translate,scale,rotate,filter,-webkit-backdrop-filter,backdrop-filter,display,visibility,content-visibility,overlay,pointer-events;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function))}.select-none{-webkit-user-select:none;user-select:none}@media (hover:hover){.hover\:border-red-900:hover{border-color:var(--color-red-900)}.hover\:text-red-900:hover{color:var(--color-red-900)}}@media (min-width:48rem){.md\:mt-0{margin-top:calc(var(--spacing)*0)}.md\:mt-2{margin-top:calc(var(--spacing)*2)}.md\:mt-3{margin-top:calc(var(--spacing)*3)}.md\:mr-3{margin-right:calc(var(--spacing)*3)}.md\:mb-2{margin-bottom:calc(var(--spacing)*2)}.md\:ml-0{margin-left:calc(var(--spacing)*0)}.md\:ml-4{margin-left:calc(var(--spacing)*4)}.md\:ml-auto{margin-left:auto}.md\:block{display:block}.md\:w-48{width:calc(var(--spacing)*48)}.md\:w-full{width:100%}.md\:flex-col{flex-direction:column}.md\:flex-row{flex-direction:row}.md\:justify-between{justify-content:space-between}.md\:justify-start{justify-content:flex-start}.md\:rounded-tl-2xl{border-top-left-radius:var(--radius-2xl)}.md\:rounded-bl-2xl{border-bottom-left-radius:var(--radius-2xl)}.md\:border-b-2{border-bottom-style:var(--tw-border-style);border-bottom-width:2px}.md\:border-blue-600{border-color:var(--color-blue-600)}.md\:border-purple-500{border-color:var(--color-purple-500)}.md\:border-red-500{border-color:var(--color-red-500)}.md\:border-yellow-500{border-color:var(--color-yellow-500)}.md\:border-b-fuchsia-400{border-bottom-color:var(--color-fuchsia-400)}.md\:px-2{padding-inline:calc(var(--spacing)*2)}.md\:py-3{padding-block:calc(var(--spacing)*3)}.md\:pt-0{padding-top:calc(var(--spacing)*0)}.md\:pt-1{padding-top:calc(var(--spacing)*1)}.md\:pb-3{padding-bottom:calc(var(--spacing)*3)}.md\:pb-5{padding-bottom:calc(var(--spacing)*5)}.md\:pl-0{padding-left:calc(var(--spacing)*0)}.md\:text-3xl{font-size:var(--text-3xl);line-height:var(--tw-leading,var(--text-3xl--line-height))}}}@property --tw-rotate-x{syntax:"*";inherits:false}@property --tw-rotate-y{syntax:"*";inherits:false}@property --tw-rotate-z{syntax:"*";inherits:false}@property --tw-skew-x{syntax:"*";inherits:false}@property --tw-skew-y{syntax:"*";inherits:false}@property --tw-border-style{syntax:"*";inherits:false;initial-value:solid}@property --tw-gradient-position{syntax:"*";inherits:false}@property --tw-gradient-from{syntax:"";inherits:false;initial-value:#0000}@property --tw-gradient-via{syntax:"";inherits:false;initial-value:#0000}@property --tw-gradient-to{syntax:"";inherits:false;initial-value:#0000}@property --tw-gradient-stops{syntax:"*";inherits:false}@property --tw-gradient-via-stops{syntax:"*";inherits:false}@property --tw-gradient-from-position{syntax:"";inherits:false;initial-value:0}@property --tw-gradient-via-position{syntax:"";inherits:false;initial-value:50%}@property --tw-gradient-to-position{syntax:"";inherits:false;initial-value:100%}@property --tw-leading{syntax:"*";inherits:false}@property --tw-font-weight{syntax:"*";inherits:false}@property --tw-tracking{syntax:"*";inherits:false}@property --tw-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-shadow-color{syntax:"*";inherits:false}@property --tw-shadow-alpha{syntax:"";inherits:false;initial-value:100%}@property --tw-inset-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-inset-shadow-color{syntax:"*";inherits:false}@property --tw-inset-shadow-alpha{syntax:"";inherits:false;initial-value:100%}@property --tw-ring-color{syntax:"*";inherits:false}@property --tw-ring-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-inset-ring-color{syntax:"*";inherits:false}@property --tw-inset-ring-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-ring-inset{syntax:"*";inherits:false}@property --tw-ring-offset-width{syntax:"";inherits:false;initial-value:0}@property --tw-ring-offset-color{syntax:"*";inherits:false;initial-value:#fff}@property --tw-ring-offset-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-outline-style{syntax:"*";inherits:false;initial-value:solid}@property --tw-blur{syntax:"*";inherits:false}@property --tw-brightness{syntax:"*";inherits:false}@property --tw-contrast{syntax:"*";inherits:false}@property --tw-grayscale{syntax:"*";inherits:false}@property --tw-hue-rotate{syntax:"*";inherits:false}@property --tw-invert{syntax:"*";inherits:false}@property --tw-opacity{syntax:"*";inherits:false}@property --tw-saturate{syntax:"*";inherits:false}@property --tw-sepia{syntax:"*";inherits:false}@property --tw-drop-shadow{syntax:"*";inherits:false}@property --tw-drop-shadow-color{syntax:"*";inherits:false}@property --tw-drop-shadow-alpha{syntax:"";inherits:false;initial-value:100%}@property --tw-drop-shadow-size{syntax:"*";inherits:false} diff --git a/demo/load-and-navigation/assets/index.js b/demo/load-and-navigation/assets/index.js index 77b2bdfd..493443df 100644 --- a/demo/load-and-navigation/assets/index.js +++ b/demo/load-and-navigation/assets/index.js @@ -1 +1 @@ -import{m,d as f,s as p,w as g,h as v,g as y,f as c,l as r,u as s,Z as h,z as S,a as b,b as E}from"./main.js";import"./mxgraph.js";const L="0.46.0",O=()=>({lib:L,dependencies:new Map([["mxGraph",m.VERSION]])});let o=!0,t={};function C(){const e=document.querySelector("#fitOnLoad");e.addEventListener("change",n=>{o=n.target.checked,r("Fit on load updated!",o),s(o?t:{})}),e.checked=o}function i(e){r("Updating fit config",e),t.margin=e.margin??t.margin,e.type&&(t.type=e.type),r("Fit config updated!",t),o&&s(t)}function T(){const e=document.querySelector("#fitType-selected");e.addEventListener("change",n=>{i({type:n.target.value}),c(t)}),t.type?e.value=t.type:i({type:e.value})}function q(){const e=document.querySelector("#fit-margin");e.addEventListener("change",n=>{i({margin:Number(n.target.value)}),c(t)}),t.margin?e.value=String(t.margin):i({margin:Number(e.value)})}function F(){for(const e of Object.values(h))document.querySelector(`#zoom-${e}`).addEventListener("click",()=>S(e));document.querySelector("#zoom-reset").addEventListener("click",()=>c(t))}function w(){const e=document.querySelector("#theme-selected");e.addEventListener("change",a=>{b(a.target.value)});const n=E();n&&(e.value=n)}function z(){const e=O(),n=`bpmn-visualization@${e.lib}`,a=[...e.dependencies].map(([d,l])=>`${d}@${l}`).join("/"),u=document.querySelector("#footer-content");u.textContent=`${n} with ${a}`}function $(){document.addEventListener("wheel",e=>{e.ctrlKey&&e.preventDefault()},{passive:!1,capture:!0})}function k(){$(),p({globalOptions:{container:"bpmn-container",navigation:{enabled:!0}},statusKoNotifier:g}),document.querySelector("#bpmn-file").addEventListener("change",v,!1),t=y().fit,T(),q(),C(),F(),w(),z()}f(k); +import{m,d as f,s as p,w as g,h as v,g as y,f as c,l as r,u as s,Z as h,z as S,a as b,b as E}from"./main.js";import"./mxgraph.js";const L="0.47.0",O=()=>({lib:L,dependencies:new Map([["mxGraph",m.VERSION]])});let o=!0,t={};function C(){const e=document.querySelector("#fitOnLoad");e.addEventListener("change",n=>{o=n.target.checked,r("Fit on load updated!",o),s(o?t:{})}),e.checked=o}function i(e){r("Updating fit config",e),t.margin=e.margin??t.margin,e.type&&(t.type=e.type),r("Fit config updated!",t),o&&s(t)}function T(){const e=document.querySelector("#fitType-selected");e.addEventListener("change",n=>{i({type:n.target.value}),c(t)}),t.type?e.value=t.type:i({type:e.value})}function q(){const e=document.querySelector("#fit-margin");e.addEventListener("change",n=>{i({margin:Number(n.target.value)}),c(t)}),t.margin?e.value=String(t.margin):i({margin:Number(e.value)})}function F(){for(const e of Object.values(h))document.querySelector(`#zoom-${e}`).addEventListener("click",()=>S(e));document.querySelector("#zoom-reset").addEventListener("click",()=>c(t))}function w(){const e=document.querySelector("#theme-selected");e.addEventListener("change",a=>{b(a.target.value)});const n=E();n&&(e.value=n)}function z(){const e=O(),n=`bpmn-visualization@${e.lib}`,a=[...e.dependencies].map(([d,l])=>`${d}@${l}`).join("/"),u=document.querySelector("#footer-content");u.textContent=`${n} with ${a}`}function $(){document.addEventListener("wheel",e=>{e.ctrlKey&&e.preventDefault()},{passive:!1,capture:!0})}function k(){$(),p({globalOptions:{container:"bpmn-container",navigation:{enabled:!0}},statusKoNotifier:g}),document.querySelector("#bpmn-file").addEventListener("change",v,!1),t=y().fit,T(),q(),C(),F(),w(),z()}f(k); diff --git a/demo/load-and-navigation/assets/main.js b/demo/load-and-navigation/assets/main.js index 2d6f2d10..b45fa820 100644 --- a/demo/load-and-navigation/assets/main.js +++ b/demo/load-and-navigation/assets/main.js @@ -1,8 +1,8 @@ -var yt=Object.defineProperty;var wt=(n,t,e)=>t in n?yt(n,t,{enumerable:!0,configurable:!0,writable:!0,value:e}):n[t]=e;var g=(n,t,e)=>wt(n,typeof t!="symbol"?t+"":t,e);import{g as Rt,r as bt}from"./mxgraph.js";(function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const o of document.querySelectorAll('link[rel="modulepreload"]'))s(o);new MutationObserver(o=>{for(const i of o)if(i.type==="childList")for(const r of i.addedNodes)r.tagName==="LINK"&&r.rel==="modulepreload"&&s(r)}).observe(document,{childList:!0,subtree:!0});function e(o){const i={};return o.integrity&&(i.integrity=o.integrity),o.referrerPolicy&&(i.referrerPolicy=o.referrerPolicy),o.crossOrigin==="use-credentials"?i.credentials="include":o.crossOrigin==="anonymous"?i.credentials="omit":i.credentials="same-origin",i}function s(o){if(o.ep)return;o.ep=!0;const i=e(o);fetch(o.href,i)}})();var Q=(n=>(n.None="None",n.HorizontalVertical="HorizontalVertical",n.Horizontal="Horizontal",n.Vertical="Vertical",n.Center="Center",n))(Q||{}),Ft=(n=>(n.In="in",n.Out="out",n))(Ft||{});function Pt(n){return n instanceof HTMLElement?n:document.querySelector(`#${n}`)}var d=(n=>(n.LANE="lane",n.POOL="pool",n.CALL_ACTIVITY="callActivity",n.SUB_PROCESS="subProcess",n.TASK="task",n.TASK_USER="userTask",n.TASK_SERVICE="serviceTask",n.TASK_RECEIVE="receiveTask",n.TASK_SEND="sendTask",n.TASK_MANUAL="manualTask",n.TASK_SCRIPT="scriptTask",n.TASK_BUSINESS_RULE="businessRuleTask",n.GLOBAL_TASK="globalTask",n.GLOBAL_TASK_USER="globalUserTask",n.GLOBAL_TASK_MANUAL="globalManualTask",n.GLOBAL_TASK_SCRIPT="globalScriptTask",n.GLOBAL_TASK_BUSINESS_RULE="globalBusinessRuleTask",n.GROUP="group",n.TEXT_ANNOTATION="textAnnotation",n.GATEWAY_PARALLEL="parallelGateway",n.GATEWAY_EXCLUSIVE="exclusiveGateway",n.GATEWAY_INCLUSIVE="inclusiveGateway",n.GATEWAY_EVENT_BASED="eventBasedGateway",n.GATEWAY_COMPLEX="complexGateway",n.EVENT_START="startEvent",n.EVENT_END="endEvent",n.EVENT_INTERMEDIATE_CATCH="intermediateCatchEvent",n.EVENT_INTERMEDIATE_THROW="intermediateThrowEvent",n.EVENT_BOUNDARY="boundaryEvent",n))(d||{}),J=(n=>(n.CALLING_PROCESS="process",n.CALLING_GLOBAL_TASK="global task",n))(J||{}),ee=(n=>(n.Exclusive="Exclusive",n.None="None",n.Parallel="Parallel",n))(ee||{}),y=(n=>(n.NONE="none",n.TERMINATE="terminate",n.CANCEL="cancel",n.COMPENSATION="compensate",n.CONDITIONAL="conditional",n.ERROR="error",n.ESCALATION="escalation",n.LINK="link",n.MESSAGE="message",n.SIGNAL="signal",n.TIMER="timer",n))(y||{}),_=(n=>(n.ADHOC="adhoc",n.COMPENSATION="compensation",n.EXPAND="expand",n.LOOP="loop",n.MULTI_INSTANCE_PARALLEL="multi-parallel",n.MULTI_INSTANCE_SEQUENTIAL="multi-sequential",n))(_||{}),Y=(n=>(n.AD_HOC="adhoc",n.EMBEDDED="embedded",n.EVENT="event",n.TRANSACTION="transaction",n))(Y||{});function kt(n,t){return n===""?t?{}:void 0:n}function S(n,t=!1){return n==null?[]:(Array.isArray(n)?n:[n]).map(e=>kt(e,t)).filter(Boolean)}function Bt(n,t,e){const s=[];e!=null&&e.startingWith?s.push(`^(${e.startingWith}).*`):e!=null&&e.notStartingWith&&s.push(`^(?!(${e.notStartingWith})).*`),s.push(`${t}$`);const o=s.join("");return n.filter(i=>e!=null&&e.ignoreCase?new RegExp(o,"i").test(i):new RegExp(o).test(i))}class E{static isEvent(t){return oe(xe,t)}static eventKinds(){return[...xe]}static isBoundaryEvent(t){return d.EVENT_BOUNDARY===t}static isStartEvent(t){return d.EVENT_START===t}static isCatchEvent(t){return d.EVENT_INTERMEDIATE_CATCH===t||d.EVENT_BOUNDARY===t||d.EVENT_START===t}static isIntermediateCatchEvent(t){return d.EVENT_INTERMEDIATE_CATCH===t}static isIntermediateThrowEvent(t){return d.EVENT_INTERMEDIATE_THROW===t}static isCallActivity(t){return d.CALL_ACTIVITY===t}static isSubProcess(t){return d.SUB_PROCESS===t}static canHaveNoneEvent(t){return d.EVENT_INTERMEDIATE_THROW===t||d.EVENT_END===t||d.EVENT_START===t}static isActivity(t){return oe(pe,t)}static activityKinds(){return[...pe]}static isWithDefaultSequenceFlow(t){return Mt.has(t)}static isTask(t){return oe(Te,t)}static taskKinds(){return[...Te]}static gatewayKinds(){return[...Ye]}static isGateway(t){return oe(Ye,t)}static flowNodeKinds(){return Object.values(d).filter(t=>!E.isPoolOrLane(t))}static isPoolOrLane(t){return t==d.POOL||t==d.LANE}}function Ne(n,t){return Bt(Object.values(d),n,t)}function oe(n,t){return Object.values(n).map(e=>e).includes(t)}const xe=Ne("Event"),Ye=Ne("Gateway"),Te=Ne("Task",{ignoreCase:!0,notStartingWith:"global"}),pe=[...Te,d.CALL_ACTIVITY,d.SUB_PROCESS],Mt=new Set([...pe,d.GATEWAY_EXCLUSIVE,d.GATEWAY_INCLUSIVE,d.GATEWAY_COMPLEX]),Je=Object.values(y).filter(n=>n!=y.NONE);var K=(n=>(n.NONE="None",n.ONE="One",n.BOTH="Both",n))(K||{}),k=(n=>(n.SEQUENCE_FLOW="sequenceFlow",n.MESSAGE_FLOW="messageFlow",n.ASSOCIATION_FLOW="association",n))(k||{}),te=(n=>(n.NONE="none",n.INITIATING="initiating",n.NON_INITIATING="non_initiating",n))(te||{}),x=(n=>(n.NORMAL="normal",n.DEFAULT="default",n.CONDITIONAL_FROM_ACTIVITY="conditional_from_activity",n.CONDITIONAL_FROM_GATEWAY="conditional_from_gateway",n))(x||{});class ue{constructor(t,e,s,o,i){this.id=t,this.name=e,this.kind=s,this.sourceReferenceId=o,this.targetReferenceId=i}}class et extends ue{constructor(t,e,s,o,i=x.NORMAL){super(t,e,k.SEQUENCE_FLOW,s,o),this.sequenceFlowKind=i}}class tt extends ue{constructor(t,e,s,o){super(t,e,k.MESSAGE_FLOW,s,o)}}class nt extends ue{constructor(t,e,s,o,i=K.NONE){super(t,e,k.ASSOCIATION_FLOW,s,o),this.associationDirectionKind=i}}var xt=bt();const Yt=Rt(xt),L=Dt(),Gt=L.mxCellRenderer,Vt=L.mxClient,c=L.mxConstants,G=L.mxEvent,Ge=L.mxPerimeter,P=L.mxPoint,Ee=L.mxRectangle,_e=L.mxRectangleShape,ye=L.mxSvgCanvas2D,v=L.mxUtils;function Dt(){return window.mxForceIncludes=!1,window.mxLoadResources=!1,window.mxLoadStylesheets=!1,window.mxResourceExtension=".txt",Yt({})}class Ut{constructor(t){this.graph=t}computeRelativeCoordinates(t,e){const s=this.getTranslateForRoot(t),o=e.x+s.x,i=e.y+s.y;return new P(o,i)}getTranslateForRoot(t){const e=this.graph.getModel(),s=new P(0,0);for(;t!=null;){const o=e.getGeometry(t);o!=null&&(s.x-=o.x,s.y-=o.y),t=e.getParent(t)}return s}computeEdgeCenter(t){const e=t.geometry.points,s=e[0],o=e.at(-1),i=o.x-s.x,r=o.y-s.y;return new P(s.x+i/2,s.y+r/2)}}class re{constructor(t,e,s,o,i){g(this,"extensions",{});this.id=t,this.bpmnElement=e,this.bounds=s,this.label=o,this.isHorizontal=i}}class M{constructor(t,e,s,o,i=!1){g(this,"incomingIds",[]);g(this,"outgoingIds",[]);this.id=t,this.name=e,this.kind=s,this.parentId=o,this.instantiate=i}}class de extends M{constructor(t,e,s,o,i,r=[]){super(t,e,s,o,i),this.markers=r}}class H extends de{constructor(t,e,s,o,i,r){super(t,e,d.CALL_ACTIVITY,o,void 0,i),this.callActivityKind=s,this.globalTaskKind=r}}class ne extends de{constructor(t,e,s,o,i){s==Y.AD_HOC&&!i.includes(_.ADHOC)&&i.push(_.ADHOC),super(t,e,d.SUB_PROCESS,o,void 0,i),this.subProcessKind=s}}class D extends M{constructor(t,e,s,o,i){super(t,e,s,i),this.eventDefinitionKind=o}}class Se extends D{constructor(e,s,o,i){super(e,s,d.EVENT_INTERMEDIATE_CATCH,o,i);g(this,"sourceIds",[])}}class Ie extends D{constructor(e,s,o,i){super(e,s,d.EVENT_INTERMEDIATE_THROW,o,i);g(this,"targetId")}}class st extends D{constructor(t,e,s,o,i){super(t,e,d.EVENT_START,s,o),this.isInterrupting=i}}class ot extends D{constructor(t,e,s,o,i=!0){super(t,e,d.EVENT_BOUNDARY,s,o),this.isInterrupting=i}}class it extends M{constructor(t,e,s,o,i=ee.None){super(t,e,d.GATEWAY_EVENT_BASED,s,o),this.gatewayKind=i}}function le(n,t,e,s){return Math.min(Math.max(n??s,t),e)}function Wt(n){return Math.max(n??0,0)}function Ht(n){const t=n??{};return t.debounceDelay=le(t.debounceDelay,0,100,50),t.throttleDelay=le(t.throttleDelay,0,100,50),t}function he(n){return n=="default"?void 0:le(n,0,100,100)}function Kt(n){return n=="default"?void 0:le(n,1,50,1)}const I={EDGE:"bpmn.edge",EDGE_START_FILL_COLOR:"bpmn.edge.startFillColor",EDGE_END_FILL_COLOR:"bpmn.edge.endFillColor",EVENT_BASED_GATEWAY_KIND:"bpmn.gatewayKind",EVENT_DEFINITION_KIND:"bpmn.eventDefinitionKind",GLOBAL_TASK_KIND:"bpmn.globalTaskKind",SUB_PROCESS_KIND:"bpmn.subProcessKind",IS_INITIATING:"bpmn.isInitiating",IS_INSTANTIATING:"bpmn.isInstantiating",IS_INTERRUPTING:"bpmn.isInterrupting",EXTRA_CSS_CLASSES:"bpmn.extra.css.classes",MARKERS:"bpmn.markers",MESSAGE_FLOW_ICON:"bpmn.messageFlowIcon"},rt={ARROW_DASH:"bpmn.dash"},T={STROKE_WIDTH_THIN:2,STROKE_WIDTH_THICK:5,SHAPE_ACTIVITY_BOTTOM_MARGIN:7,SHAPE_ACTIVITY_TOP_MARGIN:7,SHAPE_ACTIVITY_LEFT_MARGIN:7,SHAPE_ACTIVITY_MARKER_ICON_MARGIN:5,SHAPE_ACTIVITY_MARKER_ICON_SIZE:20,POOL_LABEL_SIZE:30,POOL_LABEL_FILL_COLOR:"none",LANE_LABEL_SIZE:30,LANE_LABEL_FILL_COLOR:"none",SUB_PROCESS_TRANSACTION_INNER_RECT_OFFSET:4,SUB_PROCESS_TRANSACTION_INNER_RECT_ARC_SIZE:6,TEXT_ANNOTATION_BORDER_LENGTH:10,TEXT_ANNOTATION_FILL_COLOR:"none",GROUP_FILL_COLOR:"none",DEFAULT_FILL_COLOR:"White",DEFAULT_STROKE_COLOR:"Black",DEFAULT_FONT_FAMILY:"Arial, Helvetica, sans-serif",DEFAULT_FONT_SIZE:11,DEFAULT_FONT_COLOR:"Black",DEFAULT_MARGIN:0,SHAPE_ARC_SIZE:20,DEFAULT_OVERLAY_FILL_COLOR:"White",DEFAULT_OVERLAY_FILL_OPACITY:100,DEFAULT_OVERLAY_STROKE_COLOR:"Black",DEFAULT_OVERLAY_STROKE_WIDTH:1,DEFAULT_OVERLAY_FONT_SIZE:11,DEFAULT_OVERLAY_FONT_COLOR:"Black",SEQUENCE_FLOW_CONDITIONAL_FROM_ACTIVITY_MARKER_FILL_COLOR:"White",MESSAGE_FLOW_MARKER_START_FILL_COLOR:"White",MESSAGE_FLOW_MARKER_END_FILL_COLOR:"White"},lt=n=>v.getValue(n,I.IS_INSTANTIATING,"false")=="true",ae=n=>n=="default"?void 0:n,zt=(n,t)=>(t&&(n=R(n,c.STYLE_STROKECOLOR,t.color,ae),n=R(n,c.STYLE_STROKE_OPACITY,t.opacity,he),n=R(n,c.STYLE_STROKEWIDTH,t.width,Kt)),n),R=(n,t,e,s=o=>o)=>e==null?n:v.setStyle(n,t,s(e)),ie=(n,t,e,s)=>s==null?n:v.setStyleFlag(n,t,e,s),Xt=(n,t)=>(t&&(n=R(n,c.STYLE_FONTCOLOR,t.color,ae),n=R(n,c.STYLE_FONTSIZE,t.size),n=R(n,c.STYLE_FONTFAMILY,t.family),n=ie(n,c.STYLE_FONTSTYLE,c.FONT_BOLD,t.isBold),n=ie(n,c.STYLE_FONTSTYLE,c.FONT_ITALIC,t.isItalic),n=ie(n,c.STYLE_FONTSTYLE,c.FONT_UNDERLINE,t.isUnderline),n=ie(n,c.STYLE_FONTSTYLE,c.FONT_STRIKETHROUGH,t.isStrikeThrough),n=R(n,c.STYLE_TEXT_OPACITY,t.opacity,he)),n),Zt=(n,t,e)=>(n==null?void 0:n.split(";").map(s=>s.split("=")).filter(([s])=>s===t).map(([,s])=>s)[0])??e,jt=n=>{switch(n){case"right-to-left":return c.DIRECTION_WEST;case"bottom-to-top":return c.DIRECTION_NORTH;case"top-to-bottom":return c.DIRECTION_SOUTH;default:return c.DIRECTION_EAST}},$t=(n,t)=>{const e=t.color;if(e){const s=Qt(e),o=s?e.startColor:e;n=R(n,c.STYLE_FILLCOLOR,o,ae),s?(n=v.setStyle(n,c.STYLE_GRADIENTCOLOR,e.endColor),n=v.setStyle(n,c.STYLE_GRADIENT_DIRECTION,jt(e.direction))):e==="default"&&(n=v.setStyle(n,c.STYLE_GRADIENTCOLOR,void 0),n=v.setStyle(n,c.STYLE_GRADIENT_DIRECTION,void 0)),(n.includes(d.POOL)||n.includes(d.LANE))&&(n=R(n,c.STYLE_SWIMLANE_FILLCOLOR,o,ae))}return n=R(n,c.STYLE_FILL_OPACITY,t.opacity,he),n},qt=n=>n&&typeof n=="object"&&"fill"in n,Qt=n=>n&&typeof n=="object";class Jt{constructor(t){g(this,"ignoreBpmnColors");this.ignoreBpmnColors=(t==null?void 0:t.ignoreBpmnColors)??!0}computeStyle(t,e){const s=[t.bpmnElement.kind];let o;t instanceof re?o=this.computeShapeStyleValues(t):(s.push(...nn(t)),o=this.computeEdgeStyleValues(t));const i=this.computeFontStyleValues(t),r=sn(t,e);return s.push(...Ve([...o,...i,...r])),s.join(";")}computeShapeStyleValues(t){const e=new Map,s=t.bpmnElement;if(s instanceof D?en(s,e):s instanceof de?tn(s,e):E.isPoolOrLane(s.kind)?e.set(c.STYLE_HORIZONTAL,t.isHorizontal?"0":"1"):s instanceof it&&(e.set(I.IS_INSTANTIATING,String(s.instantiate)),e.set(I.EVENT_BASED_GATEWAY_KIND,String(s.gatewayKind))),!this.ignoreBpmnColors){const o=t.extensions,i=o.fillColor;i&&(e.set(c.STYLE_FILLCOLOR,i),E.isPoolOrLane(s.kind)&&e.set(c.STYLE_SWIMLANE_FILLCOLOR,i)),o.strokeColor&&e.set(c.STYLE_STROKECOLOR,o.strokeColor)}return e}computeEdgeStyleValues(t){const e=new Map;if(!this.ignoreBpmnColors){const s=t.extensions;s.strokeColor&&e.set(c.STYLE_STROKECOLOR,s.strokeColor)}return e}computeFontStyleValues(t){var o,i;const e=new Map,s=(o=t.label)==null?void 0:o.font;if(s&&(e.set(c.STYLE_FONTFAMILY,s.name),e.set(c.STYLE_FONTSIZE,s.size),e.set(c.STYLE_FONTSTYLE,on(s))),!this.ignoreBpmnColors){const r=(i=t.label)==null?void 0:i.extensions;r!=null&&r.color&&e.set(c.STYLE_FONTCOLOR,r.color)}return e}computeMessageFlowIconStyle(t){const e=[];return e.push(["shape",I.MESSAGE_FLOW_ICON],[I.IS_INITIATING,String(t.messageVisibleKind===te.INITIATING)]),this.ignoreBpmnColors||t.extensions.strokeColor&&e.push([c.STYLE_STROKECOLOR,t.extensions.strokeColor]),Ve(e).join(";")}}function en(n,t){t.set(I.EVENT_DEFINITION_KIND,n.eventDefinitionKind),(n instanceof ot||n instanceof st&&n.isInterrupting!==void 0)&&t.set(I.IS_INTERRUPTING,String(n.isInterrupting))}function tn(n,t){n instanceof ne?t.set(I.SUB_PROCESS_KIND,n.subProcessKind):n.kind===d.TASK_RECEIVE?t.set(I.IS_INSTANTIATING,String(n.instantiate)):n instanceof H&&t.set(I.GLOBAL_TASK_KIND,n.globalTaskKind);const e=n.markers;e.length>0&&t.set(I.MARKERS,e.join(","))}function nn(n){const t=[],e=n.bpmnElement;return e instanceof et&&t.push(e.sequenceFlowKind),e instanceof nt&&t.push(e.associationDirectionKind),t}function sn(n,t){const e=new Map,s=n.bpmnElement;return t?(e.set(c.STYLE_VERTICAL_ALIGN,c.ALIGN_TOP),n.bpmnElement.kind!=d.TEXT_ANNOTATION&&e.set(c.STYLE_ALIGN,c.ALIGN_CENTER),n instanceof re&&(e.set(c.STYLE_LABEL_WIDTH,t.width+1),e.set(c.STYLE_LABEL_POSITION,"ignore"),e.set(c.STYLE_VERTICAL_LABEL_POSITION,c.ALIGN_MIDDLE))):n instanceof re&&(s instanceof ne||s instanceof H&&s.callActivityKind===J.CALLING_PROCESS)&&!s.markers.includes(_.EXPAND)&&e.set(c.STYLE_VERTICAL_ALIGN,c.ALIGN_TOP),e}function on(n){let t=0;return n.isBold&&(t+=c.FONT_BOLD),n.isItalic&&(t+=c.FONT_ITALIC),n.isStrikeThrough&&(t+=c.FONT_STRIKETHROUGH),n.isUnderline&&(t+=c.FONT_UNDERLINE),t}function Ve(n){return n.filter(([,t])=>t&&t!="undefined").map(([t,e])=>`${t}=${e}`)}class rn{constructor(t,e,s){this.graph=t,this.coordinatesTranslator=e,this.styleComputer=s}render(t,e){this.insertShapesAndEdges(t),this.graph.customFit(e)}insertShapesAndEdges({pools:t,lanes:e,subprocesses:s,otherFlowNodes:o,boundaryEvents:i,edges:r}){this.graph.batchUpdate(()=>{this.graph.getModel().clear(),this.insertShapes(t),this.insertShapes(e),this.insertShapes(s),this.insertShapes(o),this.insertShapes(i),this.insertEdges(r)})}insertShapes(t){for(const e of t)this.insertShape(e)}getParent(t){return this.getCell(t.parentId)??this.graph.getDefaultParent()}insertShape(t){var l;const e=t.bpmnElement,s=this.getParent(e),o=t.bounds;let i=(l=t.label)==null?void 0:l.bounds;i=E.isPoolOrLane(e.kind)?void 0:i;const r=this.styleComputer.computeStyle(t,i);this.insertVertex(s,e.id,e.name,o,i,r)}insertEdges(t){var e;for(const s of t){const o=s.bpmnElement,i=this.graph.getDefaultParent(),r=this.getCell(o.sourceReferenceId),l=this.getCell(o.targetReferenceId),a=(e=s.label)==null?void 0:e.bounds,h=this.styleComputer.computeStyle(s,a),u=this.graph.insertEdge(i,o.id,o.name,r,l,h);if(this.insertWaypoints(s.waypoints,u),a){u.geometry.width=a.width,u.geometry.height=a.height;const f=this.coordinatesTranslator.computeEdgeCenter(u);u.geometry.relative=!1;const p=this.coordinatesTranslator.computeRelativeCoordinates(u.parent,new P(a.x,a.y)),m=p.x+a.width/2-f.x,C=p.y-f.y;u.geometry.offset=new P(m,C)}this.insertMessageFlowIconIfNeeded(s,u)}}insertMessageFlowIconIfNeeded(t,e){if(t.bpmnElement instanceof tt&&t.messageVisibleKind!==te.NONE){const s=this.graph.insertVertex(e,we(e.id),void 0,0,0,20,14,this.styleComputer.computeMessageFlowIconStyle(t));s.geometry.relative=!0,s.geometry.offset=new P(-10,-7)}}insertWaypoints(t,e){t&&(e.geometry.points=t.map(s=>this.coordinatesTranslator.computeRelativeCoordinates(e.parent,new P(s.x,s.y))))}getCell(t){return this.graph.getModel().getCell(t)}insertVertex(t,e,s,o,i,r){const l=this.coordinatesTranslator.computeRelativeCoordinates(t,new P(o.x,o.y)),a=this.graph.insertVertex(t,e,s,l.x,l.y,o.width,o.height,r);if(i){const h=i.x-o.x,u=i.y-o.y;a.geometry.offset=new P(h,u)}return a}}function ln(n,t){return new rn(n,new Ut(n),new Jt(t))}function we(n){return`messageFlowIcon_of_${n}`}function at(n,t,{signal:e,edges:s}={}){let o,i=null;const r=s!=null&&s.includes("leading"),l=s==null||s.includes("trailing"),a=()=>{i!==null&&(n.apply(o,i),o=void 0,i=null)},h=()=>{l&&a(),m()};let u=null;const f=()=>{u!=null&&clearTimeout(u),u=setTimeout(()=>{u=null,h()},t)},p=()=>{u!==null&&(clearTimeout(u),u=null)},m=()=>{p(),o=void 0,i=null},C=()=>{p(),a()},b=function(...j){if(e!=null&&e.aborted)return;o=this,i=j;const _t=u==null;f(),r&&_t&&a()};return b.schedule=f,b.cancel=m,b.flush=C,e==null||e.addEventListener("abort",m,{once:!0}),b}function an(n,t,{signal:e,edges:s=["leading","trailing"]}={}){let o=null;const i=at(n,t,{signal:e,edges:s}),r=function(...l){o==null?o=Date.now():Date.now()-o>=t&&(o=Date.now(),i.cancel(),i(...l)),i(...l)};return r.cancel=i.cancel,r.flush=i.flush,r}class ct extends L.mxCellOverlay{constructor(e,s){super(null,"",s.position.horizontalAlign,s.position.verticalAlign,null,"default");g(this,"style");this.label=e,this.style=s.style}getBounds(e){const s=e.view.graph.getModel().isEdge(e.cell),o=e.view.scale;let i;const r=0,l=0;return s?i=this.computeEdgeBounds(e):(i=new P,this.align==c.ALIGN_LEFT?i.x=e.x:this.align==c.ALIGN_CENTER?i.x=e.x+e.width/2:i.x=e.x+e.width,this.verticalAlign==c.ALIGN_TOP?i.y=e.y:this.verticalAlign==c.ALIGN_MIDDLE?i.y=e.y+e.height/2:i.y=e.y+e.height),new Ee(Math.round(i.x-(r*this.defaultOverlap-this.offset.x)*o),Math.round(i.y-(l*this.defaultOverlap-this.offset.y)*o),r*o,l*o)}computeEdgeBounds(e){const s=e.absolutePoints;if(this.align==c.ALIGN_LEFT)return s[0];if(this.align==c.ALIGN_CENTER){if(s.length%2==1)return s[Math.floor(s.length/2)];{const o=s.length/2,i=s[o-1],r=s[o];return new P(i.x+(r.x-i.x)/2,i.y+(r.y-i.y)/2)}}else return s.at(-1)}}class De extends L.mxText{constructor(t,e,s){super(t,e,void 0,void 0,s.font.color,void 0,s.font.size,void 0,void 0,void 0,void 0,void 0,void 0,void 0,s.fill.color,s.stroke.color),this.fillOpacity=s.fill.opacity,this.strokewidth=s.stroke.width}}function cn(n){return Object.values(k).map(t=>t).includes(n)}function un(n,t){return dn(n.style,t)}function dn(n,t){const e=[],s=n.split(";"),i=s[0].replace(/shape=bpmn./g,""),r=new Map;r.set("bpmn-type-activity",E.isActivity(i)),r.set("bpmn-type-container",E.isPoolOrLane(i)),r.set("bpmn-type-event",E.isEvent(i)),r.set("bpmn-type-flow",cn(i)),r.set("bpmn-type-gateway",E.isGateway(i)),r.set("bpmn-type-task",E.isTask(i));for(const[l]of[...r].filter(([,a])=>a))e.push(l);e.push(Ce(i));for(const[l,a]of s.map(h=>{const u=h.split("=");return[u[0],u[1]]}))switch(l){case I.EVENT_DEFINITION_KIND:{e.push(`bpmn-event-def-${a}`);break}case I.EVENT_BASED_GATEWAY_KIND:{e.push(`bpmn-gateway-kind-${a.toLowerCase()}`);break}case I.IS_INITIATING:{e.push(a=="true"?"bpmn-icon-initiating":"bpmn-icon-non-initiating");break}case I.SUB_PROCESS_KIND:{e.push(`bpmn-sub-process-${a.toLowerCase()}`);break}case I.GLOBAL_TASK_KIND:{e.push(Ce(a));break}}return t&&e.push("bpmn-label"),e}function Ce(n){return n?"bpmn-"+n.replace(/([A-Z])/g,t=>"-"+t[0].toLowerCase()):""}const Ue=function(n){const t=n.createSvgCanvas;n.createSvgCanvas=function(){var o;const e=t.bind(this)(),s=e.getTextCss;if(e.getTextCss=function(){const i=this.pointerEvents;this.pointerEvents=!1;const r=s.bind(this)();return this.pointerEvents=i,r},(o=this.state)!=null&&o.cell){const i=this.state.cell,r=un(i,this.dialect===c.DIALECT_STRICTHTML),l=this.state.style[I.EXTRA_CSS_CLASSES];typeof l=="string"&&r.push(...l.split(",")),this.node.setAttribute("class",r.join(" ")),this.node.dataset.bpmnId=this.state.cell.id}return e}};class hn extends L.mxCellRenderer{constructor(t){super(),this.iconPainter=t}createCellOverlays(t){const s=t.view.graph.getCellOverlays(t.cell);let o=null;if(s!=null){o=new L.mxDictionary;for(const i of s){const r=t.overlays==null?null:t.overlays.remove(i);if(r!=null){o.put(i,r);continue}let l;i instanceof ct?l=new De(i.label,new Ee(0,0,0,0),i.style):(l=new L.mxImageShape(new Ee(0,0,0,0),i.image.src),l.preserveImageAspect=!1),l.dialect=t.view.graph.dialect,l.overlay=i,this.initializeOverlay(t,l),this.installCellOverlayListeners(t,i,l),i.cursor!=null&&(l.node.style.cursor=i.cursor),l instanceof De&&(l.node.classList.add("overlay-badge"),l.node.dataset.bpmnId=t.cell.id),o.put(i,l)}}t.overlays!=null&&t.overlays.visit(function(i,r){r.destroy()}),t.overlays=o}createShape(t){const e=super.createShape(t);return"iconPainter"in e&&(e.iconPainter=this.iconPainter),Ue(e),e}createLabel(t,e){super.createLabel(t,e),Ue(t.text)}}function fn(n,t,e,s){let o,i;n.heightm.setIconOriginForIconCentered(),shapeConfig:{x:t,y:e,width:s,height:o,strokeWidth:h},iconStyleConfig:{isFilled:l,fillColor:u,strokeColor:f,strokeWidth:a,margin:p}}}class Tn{newBpmnCanvas({canvas:t,ratioFromParent:e,setIconOriginFunct:s,shapeConfig:o,iconStyleConfig:i},r){return new gn({canvas:t,shapeConfig:o,iconConfig:{originalSize:r,styleConfig:i,ratioFromParent:e,setIconOriginFunct:s}})}paintEnvelopeIcon(t){const e={width:485.41,height:321.76},s=this.newBpmnCanvas(t,e),o=e.width,i=e.height;s.rect(0,0,o,i),s.fillAndStroke();const{iconStyleConfig:r}=t;r.isFilled&&s.setStrokeColor(r.fillColor),s.begin(),s.moveTo(0,0),s.lineTo(o*.5,i*.6),s.lineTo(o,0),s.moveTo(0,i),s.lineTo(o/3,i*.45),s.moveTo(o,i),s.lineTo(o*2/3,i*.45),s.stroke()}paintCircleIcon(t){const e={width:t.shapeConfig.width,height:t.shapeConfig.height},s=this.newBpmnCanvas(t,e),o=e.width,i=e.height;o>0&&i>0&&s.ellipse(0,0,o,i),t.iconStyleConfig.isFilled?s.fillAndStroke():s.stroke()}paintClockIcon(t){const e=this.newBpmnCanvas(t,{height:152,width:152});e.begin(),e.moveTo(184,60),e.curveTo(188.4,60,192,56.4,192,52),e.lineTo(192,48),e.curveTo(192,40,188.4,40,184,40),e.curveTo(179.6,40,176,43.6,176,48),e.lineTo(176,52),e.curveTo(176,56.4,179.6,60,184,60),e.close(),e.moveTo(184,308),e.curveTo(179.6,308,176,311.6,176,316),e.lineTo(176,320),e.curveTo(176,324.4,179.6,328,184,328),e.curveTo(188.4,328,192,324.4,192,320),e.lineTo(192,316),e.curveTo(192,311.6,188.4,308,184,308),e.close(),e.moveTo(52,176),e.lineTo(48,176),e.curveTo(43.6,176,40,179.6,40,184),e.curveTo(40,188.4,43.6,192,48,192),e.lineTo(52,192),e.curveTo(56.4,192,69,188.4,60,184),e.curveTo(60,179.6,56.4,176,52,176),e.close(),e.moveTo(320,176),e.lineTo(316,176),e.curveTo(311.6,176,308,179.6,308,184),e.curveTo(308,188.4,311.6,192,316,192),e.lineTo(320,192),e.curveTo(324.4,192,328,188.4,328,184),e.curveTo(328,179.6,324.4,176,320,176),e.moveTo(93.6,82.4),e.curveTo(90.4,79.2,85.6,79.2,82.4,82.4),e.curveTo(79.2,85.6,79.2,90.4,82.4,93.6),e.lineTo(85.2,96.4),e.curveTo(86.8,98,88.8,98.8,90.8,98.8),e.curveTo(92.8,98.8,94.4,98,96.4,96.4),e.curveTo(99.6,93.2,99.6,88.4,96.4,85.2),e.lineTo(93.6,82.4),e.moveTo(85.2,271.6),e.lineTo(82.4,274.4),e.curveTo(79.2,277.6,79.2,282.4,82.4,285.6),e.curveTo(84,287.2,86,288,88,288),e.curveTo(90,288,92,287.2,93.6,285.6),e.lineTo(96.4,282.8),e.curveTo(99.6,279.6,99.6,274.8,96.4,271.6),e.curveTo(93.2,268.4,88.4,268.4,85.2,271.6),e.moveTo(274.4,82.4),e.lineTo(271.6,85.2),e.curveTo(268.4,88.4,268.4,93.2,271.6,96.4),e.curveTo(273.298,98,275.2,98.8,277.2,98.8),e.curveTo(279.2,98.8,281.2,98,282.8,96.4),e.lineTo(285.6,93.6),e.curveTo(288.8,90.4,288.8,85.6,285.6,82.4),e.curveTo(282.4,79.2,277.6,79.2,274.4,82.4),e.moveTo(192,180.8),e.lineTo(192,108),e.curveTo(192,103.6,188.4,100,184,100),e.curveTo(179.6,100,176,103.6,176,108),e.lineTo(176,184),e.curveTo(176,186,176.8,188,178.4,189.6),e.lineTo(266,277.2),e.curveTo(267.6,278.8,269.6,279.6,271.6,279.6),e.curveTo(273.6,279.6,275.6,278.8,277.2,277.2),e.curveTo(280.4,274,280.4,269.2,277.2,266),e.lineTo(192,180.8),e.moveTo(184,0),e.curveTo(82.4,0,0,82.4,0,184),e.curveTo(0,285.6,82.4,368,184,368),e.curveTo(285.6,368,368,285.6,368,184),e.curveTo(368,82.4,285.6,0,184,0),e.moveTo(184,352),e.curveTo(91.2,352,16,276.8,16,184),e.curveTo(16,91.2,91.2,16,184,16),e.curveTo(276.8,16,352,91.2,352,184),e.curveTo(352,276.8,276.8,352,184,352),e.fillAndStroke()}paintTriangleIcon(t){const e=this.newBpmnCanvas(t,{height:735,width:849});e.begin(),e.moveTo(497,55),e.lineTo(817,609),e.curveTo(849,665,808,735,744,735),e.lineTo(105,735),e.curveTo(40,735,0,665,32,609),e.lineTo(352,55),e.curveTo(384,0,465,0,497,55),e.close(),e.fillAndStroke()}paintUpArrowheadIcon(t){const e=this.newBpmnCanvas(t,{height:50,width:40});e.begin(),e.moveTo(0,49.5),e.lineTo(19.5,1),e.curveTo(19.75,.25,20,0,20.25,.25),e.lineTo(40,49.5),e.curveTo(40,49.5,39.75,50,39.6,49.75),e.lineTo(20,30),e.lineTo(.4,49.75),e.curveTo(.4,49.75,.25,50,0,49.5),e.close(),e.fillAndStroke()}paintDoubleLeftArrowheadsIcon(t){const e=this.newBpmnCanvas(t,{height:53.5,width:105});e.begin(),e.moveTo(91.4,0),e.curveTo(91.4,0,91.2,0,91,.2),e.lineTo(50,25),e.curveTo(47.9,25.8,46.7,26.6,46.4,27.3),e.lineTo(46.4,0),e.curveTo(46.4,0,46.2,0,46,.2),e.lineTo(4.9,25),e.curveTo(2,26.2,0,27.3,4.9,28.5),e.lineTo(45.8,53),e.curveTo(46,53.3,46.2,53.5,46.4,53.5),e.lineTo(46.4,27),e.curveTo(46.6,27.3,47.8,28.1,49.9,29.9),e.lineTo(90.8,53.3),e.curveTo(91,53.3,91.2,53.5,91.4,53.5),e.lineTo(91.4,0),e.close(),e.fillAndStroke()}drawCrossIcon(t){const e=this.newBpmnCanvas(t,{height:1,width:1});return e.begin(),e.moveTo(.38,0),e.lineTo(.62,0),e.lineTo(.62,.38),e.lineTo(1,.38),e.lineTo(1,.62),e.lineTo(.62,.62),e.lineTo(.62,1),e.lineTo(.38,1),e.lineTo(.38,.62),e.lineTo(0,.62),e.lineTo(0,.38),e.lineTo(.38,.38),e.close(),e}paintListIcon(t){const e=this.newBpmnCanvas(t,{height:60,width:60});e.begin(),e.moveTo(0,0),e.lineTo(60,0),e.lineTo(60,60),e.lineTo(0,60),e.lineTo(0,0),e.close(),e.moveTo(5,5),e.lineTo(55,5),e.close(),e.moveTo(5,21.6),e.lineTo(55,21.6),e.close(),e.moveTo(5,38.3),e.lineTo(55,38.3),e.close(),e.moveTo(5,55),e.lineTo(55,55),e.close(),e.fillAndStroke()}paintXCrossIcon(t){const e=this.drawCrossIcon(t);e.rotateOnIconCenter(45),e.fillAndStroke()}paintPlusCrossIcon(t){this.drawCrossIcon(t).fillAndStroke()}paintAsteriskIcon(t){const e=this.newBpmnCanvas(t,{height:1,width:1});fe(e),e.fillAndStroke(),fe(e),e.rotateOnIconCenter(60),e.fillAndStroke(),fe(e),e.rotateOnIconCenter(240),e.fillAndStroke()}paintPersonIcon(t){const e=this.newBpmnCanvas({...t,iconStyleConfig:{...t.iconStyleConfig,isFilled:!0}},{height:239.68,width:143.61});e.begin(),e.moveTo(124.31,150.29),e.lineTo(99.66,141.03),e.arcTo(6.43,6.43,0,0,1,95.51,135.03),e.lineTo(95.51,130.66),e.arcTo(47.75,47.75,0,0,0,119.51,89.25),e.lineTo(119.51,71.25),e.arcTo(47.62,47.62,0,0,0,101.18,33.64),e.arcTo(29.35,29.35,0,0,0,101.52,29.14),e.arcTo(29.68,29.68,0,0,0,42.17,29.14),e.arcTo(29.24,29.24,0,0,0,42.53,33.63),e.arcTo(47.65,47.65,0,0,0,24.14,71.23),e.lineTo(24.14,89.23),e.arcTo(47.7,47.7,0,0,0,48.19,130.63),e.lineTo(48.19,135.03),e.arcTo(6.43,6.43,0,0,1,44.03,141.03),e.lineTo(19.31,150.29),e.arcTo(29.81,29.81,0,0,0,.09,178.03),e.lineTo(.09,233.51),e.arcTo(5.63,5.63,0,1,0,11.34,233.51),e.lineTo(11.34,178.03),e.arcTo(18.19,18.19,0,0,1,11.57,175.17),e.lineTo(20.5,184.11),e.arcTo(12.32,12.32,0,0,1,24.14,192.89),e.lineTo(24.14,233.51),e.arcTo(5.63,5.63,0,1,0,35.39,233.51),e.lineTo(35.39,192.93),e.arcTo(23.5,23.5,0,0,0,28.46,176.2),e.lineTo(17.04,164.78),e.arcTo(18.34,18.34,0,0,1,23.29,160.78),e.lineTo(43.65,153.15),e.lineTo(66.22,175.72),e.lineTo(66.22,233.51),e.arcTo(5.63,5.63,0,1,0,77.47,233.51),e.lineTo(77.47,175.76),e.lineTo(100.04,153.19),e.lineTo(120.4,160.82),e.arcTo(18.39,18.39,0,0,1,126.65,164.82),e.lineTo(115.24,176.24),e.arcTo(23.5,23.5,0,0,0,108.31,192.93),e.lineTo(108.31,233.55),e.arcTo(5.63,5.63,0,1,0,119.56,233.55),e.lineTo(119.56,192.93),e.arcTo(12.35,12.35,0,0,1,123.19,184.15),e.lineTo(132.13,175.22),e.arcTo(18,18,0,0,1,132.36,178.08),e.lineTo(132.36,233.56),e.arcTo(5.63,5.63,0,0,0,143.61,233.56),e.lineTo(143.61,178.03),e.arcTo(29.81,29.81,0,0,0,124.31,150.29),e.close(),e.moveTo(71.85,10.72),e.arcTo(18.46,18.46,0,0,1,90.17,27.18),e.arcTo(47.68,47.68,0,0,0,53.53,27.18),e.arcTo(18.44,18.44,0,0,1,71.85,10.72),e.close(),e.moveTo(35.39,71.23),e.arcTo(36.46,36.46,0,0,1,108.31,71.23),e.lineTo(108.31,77.4),e.curveTo(82.12,75.4,56.97,60.55,56.71,60.4),e.arcTo(5.62,5.62,0,0,0,48.78,62.71),e.curveTo(46.24,67.79,40.45,71.89,35.39,74.62),e.close(),e.moveTo(35.39,89.23),e.lineTo(35.39,87.08),e.curveTo(40.55,84.85,49.73,80.08,55.67,72.66),e.curveTo(64.83,77.46,85.92,87.21,108.31,88.66),e.lineTo(108.31,89.24),e.arcTo(36.46,36.46,0,1,1,35.39,89.24),e.close(),e.moveTo(71.85,165.45),e.lineTo(54.06,147.69),e.arcTo(17.7,17.7,0,0,0,59.43,135.32),e.arcTo(47.57,47.57,0,0,0,84.27,135.32),e.arcTo(17.7,17.7,0,0,0,89.64,147.69),e.close(),e.fill()}paintGearIcon(t){const e=this.newBpmnCanvas(t,{height:100,width:100});pn(e),e.translateIconOrigin(14,14),En(e)}paintExpandIcon(t){const e={width:16,height:16},s=this.newBpmnCanvas(t,e),o=e.width,i=e.height;s.roundrect(0,0,o,i,2,2),s.stroke(),s.begin(),s.moveTo(o/2,i/4),s.lineTo(o/2,i*3/4),s.close(),s.moveTo(o/4,i/2),s.lineTo(o*3/4,i/2),s.close(),s.fillAndStroke()}paintLoopIcon(t){const{iconStyleConfig:e}=t;e.fillColor=e.strokeColor;const s=this.newBpmnCanvas(t,{width:22.49,height:21.62});s.begin(),s.moveTo(5.5,19.08),s.arcTo(8,8,0,1,1,10.5,21.08),s.stroke(),s.begin(),s.moveTo(7.5,14.08),s.lineTo(5.75,19.08),s.lineTo(0,17.08),s.close(),s.fillAndStroke()}paintSequentialMultiInstanceIcon(t){const e={width:16,height:16},s=this.newBpmnCanvas(t,e),{canvas:o,iconStyleConfig:i}=t;o.setFillColor(i.strokeColor);const r=e.width,l=e.height/5;s.rect(0,0,r,l),s.fill(),s.rect(0,2*l,r,l),s.fill(),s.rect(0,4*l,r,l),s.fill()}paintParallelMultiInstanceIcon(t){const e={width:16,height:16},s=this.newBpmnCanvas(t,e),{canvas:o,iconStyleConfig:i}=t;o.setFillColor(i.strokeColor);const r=e.width/5,l=e.height;s.begin(),s.rect(0,0,r,l),s.fill(),s.rect(2*r,0,r,l),s.fill(),s.rect(4*r,0,r,l),s.fill()}paintRightArrowIcon(t){const e=this.newBpmnCanvas(t,{width:512,height:415.23});e.setRoundLineJoin(),e.begin(),e.moveTo(512,207.61),e.lineTo(304.38,0),e.lineTo(304.38,135.39),e.lineTo(0,135.39),e.lineTo(0,279.84),e.lineTo(304.38,279.84),e.lineTo(304.38,415.23),e.lineTo(512,207.61),e.close(),e.fillAndStroke()}paintErrorIcon(t){const e=this.newBpmnCanvas(t,{width:72.44,height:71.82});e.begin(),e.moveTo(0,53.32),e.lineTo(19.48,0),e.lineTo(19.48,0),e.lineTo(50.85,40.07),e.lineTo(72.44,18.21),e.lineTo(53.12,71.82),e.lineTo(22.5,31.37),e.close(),e.fillAndStroke()}paintHandIcon(t){const e=this.newBpmnCanvas(t,{width:343.65,height:354.12});e.begin(),e.moveTo(231.66,336.39),e.curveTo(240.84,316.9,220.53,306.92,220.53,306.92),e.curveTo(215.2,303.67,188.58,287.43,140.67,258.19),e.lineTo(146.33,248.39),e.curveTo(223.98,269.38,267.12,281.04,275.75,283.38),e.curveTo(275.75,283.38,297.25,288,301.42,267.77),e.curveTo(306.34,245.29,288.32,238.63,288.32,238.63),e.curveTo(279.91,236.44,237.86,225.48,162.18,205.75),e.lineTo(165.2,194.8),e.curveTo(255.88,204.4,306.27,209.73,316.34,210.8),e.curveTo(316.34,210.8,339.89,212.16,341.76,189.55),e.curveTo(343.65,166.93,320.5,164.13,320.5,164.13),e.curveTo(310.43,163.1,260.04,157.99,169.35,148.77),e.lineTo(169.35,138.97),e.curveTo(253.41,132.12,300.11,128.32,309.45,127.56),e.curveTo(309.45,127.56,332.27,122.38,332.27,102.61),e.curveTo(332.27,82.85,305.48,81.87,305.48,81.87),e.curveTo(293.99,82.2,236.54,83.88,133.13,86.9),e.lineTo(127.61,81.87),e.curveTo(145.3,59.39,155.12,46.9,157.09,44.41),e.curveTo(157.09,44.41,171.12,26.8,156.78,12.72),e.curveTo(143.83,0,124.08,14.49,124.08,14.49),e.curveTo(116.45,19.41,78.35,44.06,9.77,88.43),e.lineTo(0,251.94),e.curveTo(122.84,308.79,191.09,340.37,204.74,346.69),e.curveTo(204.74,346.69,222.91,354.12,231.66,336.39),e.fillAndStroke()}paintScriptIcon(t){t.iconStyleConfig.fillColor=t.iconStyleConfig.strokeColor;const e=this.newBpmnCanvas(t,{width:458.75,height:461.64});e.begin(),e.moveTo(67.85,.57),e.curveTo(50.73,0,33.26,8.86,22.35,18.84),e.curveTo(8.11,32.15,0,50.77,0,70.26),e.curveTo(0,73.15,0,87.59,0,113.6),e.curveTo(55.4,113.6,86.18,113.6,92.33,113.6),e.curveTo(94.92,150.46,85.64,180.4,74.22,211.27),e.curveTo(40.16,298.07,30.77,339.83,55.56,410.87),e.curveTo(63.72,438.26,87.59,457.85,114.91,461.09),e.curveTo(216.96,460.85,294.9,461.64,388.41,461.2),e.curveTo(407.2,461.09,425.14,453.55,438.3,440.13),e.curveTo(451.46,426.71,458.75,403.06,458.46,384.26),e.curveTo(458.43,382.23,458.18,365.93,458.15,363.89),e.curveTo(432.12,364.24,406.09,364.04,380.06,364.04),e.curveTo(377.61,347.52,377.24,337.58,378.28,324.48),e.curveTo(380.5,296.47,389.08,273.36,398.59,247.1),e.curveTo(408.11,220.83,418.41,191.47,420.86,154.24),e.curveTo(422.11,135.34,421.4,110.24,417.77,86.75),e.curveTo(417.76,86.71,417.73,86.54,417.69,86.22),e.curveTo(417.64,85.95,417.61,85.79,417.6,85.76),e.curveTo(414.03,68.13,410.49,48.84,399.79,31.47),e.curveTo(389.09,14.11,366.95,.59,341.75,.59),e.curveTo(286.97,.59,122.63,.57,67.85,.57),e.close(),e.moveTo(85.04,72.68),e.curveTo(80.63,72.68,45.33,72.68,40.92,72.68),e.curveTo(40.46,58.4,47.15,51.87,50.27,48.75),e.curveTo(55.8,44.28,59.84,41,73.82,41),e.curveTo(78.45,52.13,82.23,62.71,85.04,72.68),e.close(),e.moveTo(364.94,52.9),e.curveTo(370,61.11,373.9,76.44,377.38,93.51),e.curveTo(380.35,113.1,381.01,136.42,380.02,151.57),e.curveTo(377.97,182.76,369.51,207.12,360.1,233.1),e.curveTo(350.69,259.09,340.27,286.77,337.53,321.27),e.curveTo(336.38,335.86,336.72,346.69,338.87,364.01),e.curveTo(326.35,364.01,263.75,364.01,151.06,364.01),e.curveTo(151.06,382.2,151.06,392.31,151.06,394.33),e.curveTo(147.77,404.8,138.9,418.2,127.43,419.94),e.curveTo(111.49,422.35,97.86,411.8,94.75,399.19),e.curveTo(65.14,321.99,94.93,275.54,112.57,225.47),e.curveTo(130.14,177.95,137.92,117.41,112.71,42.09),e.curveTo(192.88,41.9,274.33,42.21,342.89,41.98),e.curveTo(357.15,42.03,359.83,44.61,364.94,52.9),e.close(),e.moveTo(409.96,399.48),e.curveTo(409.96,408.42,398.54,425.67,392.02,425.67),e.curveTo(325.19,425.79,252.29,425.67,185.23,425.67),e.curveTo(189.88,424.43,194.66,405.64,194.66,399.48),e.curveTo(237.72,399.48,388.43,399.48,409.96,399.48),e.close(),e.fill(),e.begin(),e.moveTo(182.1,131.2),e.lineTo(182.1,151.68),e.lineTo(321.89,151.68),e.lineTo(321.89,131.2),e.lineTo(182.1,131.2),e.close(),e.moveTo(162.25,251.09),e.lineTo(162.25,271.49),e.lineTo(301.96,271.49),e.lineTo(301.96,251.09),e.lineTo(162.25,251.09),e.close(),e.fill()}paintTableIcon(t){const e=this.newBpmnCanvas(t,{width:640,height:640});e.begin(),e.moveTo(.19,.1),e.lineTo(298.78,.1),e.lineTo(298.78,198.88),e.lineTo(.19,198.88),e.lineTo(.19,.1),e.close(),e.fillAndStroke(),e.begin(),e.moveTo(0,0),e.lineTo(298.78,0),e.lineTo(298.78,48.88),e.lineTo(0,48.88),e.lineTo(0,0),e.close(),e.fillAndStroke(),e.begin(),e.moveTo(0,48.88),e.lineTo(98.78,48.88),e.lineTo(98.78,198.88),e.lineTo(0,198.88),e.lineTo(0,48.88),e.close(),e.fillAndStroke(),e.begin(),e.moveTo(1.09,122.69),e.lineTo(298.78,122.69),e.close(),e.fillAndStroke(),e.setFillColor(t.iconStyleConfig.strokeColor),e.begin(),e.moveTo(0,0),e.lineTo(298.78,0),e.lineTo(298.78,48.88),e.lineTo(0,48.88),e.lineTo(0,0),e.close(),e.fillAndStroke()}paintPentagon(t){const e=this.newBpmnCanvas(t,{width:16,height:16});e.begin(),e.moveTo(16,6.5),e.lineTo(8,0),e.lineTo(0,6.5),e.lineTo(3,16),e.lineTo(13,16),e.lineTo(16,6.5),e.lineTo(8,0),e.stroke()}}function fe(n){n.begin(),n.moveTo(.38,0),n.lineTo(.62,0),n.lineTo(.62,1),n.lineTo(.38,1),n.close()}function pn(n){n.begin(),n.moveTo(2.06,24.62),n.lineTo(10.17,30.95),n.lineTo(9.29,37.73),n.lineTo(0,41.42),n.lineTo(2.95,54.24),n.lineTo(13.41,52.92),n.lineTo(17.39,58.52),n.lineTo(13.56,67.66),n.lineTo(24.47,74.44),n.lineTo(30.81,66.33),n.lineTo(37.88,67.21),n.lineTo(41.57,76.5),n.lineTo(54.24,73.55),n.lineTo(53.06,62.94),n.lineTo(58.52,58.52),n.lineTo(67.21,63.09),n.lineTo(74.58,51.88),n.lineTo(66.03,45.25),n.lineTo(66.92,38.62),n.lineTo(76.5,34.93),n.lineTo(73.7,22.26),n.lineTo(62.64,23.44),n.lineTo(58.81,18.42),n.lineTo(62.79,8.7),n.lineTo(51.74,2.21),n.lineTo(44.81,10.47),n.lineTo(38.03,9.43),n.lineTo(33.75,0),n.lineTo(21.52,3.24),n.lineTo(22.7,13.56),n.lineTo(18.13,17.54),n.lineTo(8.7,13.56),n.close(),me(n,24.8,39)}function En(n){n.begin(),n.moveTo(16.46,41.42),n.lineTo(24.57,47.75),n.lineTo(23.69,54.53),n.lineTo(14.4,58.22),n.lineTo(17.35,71.04),n.lineTo(27.81,69.72),n.lineTo(31.79,75.32),n.lineTo(27.96,84.46),n.lineTo(38.87,91.24),n.lineTo(45.21,83.13),n.lineTo(52.28,84.01),n.lineTo(55.97,93.3),n.lineTo(68.64,90.35),n.lineTo(67.46,79.74),n.lineTo(72.92,75.32),n.lineTo(81.61,79.89),n.lineTo(88.98,68.68),n.lineTo(80.43,62.05),n.lineTo(81.32,55.42),n.lineTo(90.9,51.73),n.lineTo(88.1,39.06),n.lineTo(77.04,40.24),n.lineTo(73.21,35.22),n.lineTo(77.19,25.5),n.lineTo(66.14,19.01),n.lineTo(59.21,27.27),n.lineTo(52.43,26.23),n.lineTo(48.15,16.8),n.lineTo(35.92,20.04),n.lineTo(37.1,30.36),n.lineTo(32.53,34.34),n.lineTo(23.1,30.36),n.close();const t=39.2,e=55.8;me(n,t,e),n.begin(),me(n,t,e)}function me(n,t,e){n.moveTo(t,e),n.arcTo(13.5,13.5,0,1,1,t+2*13.5,e),n.arcTo(13.5,13.5,0,0,1,t,e),n.close(),n.fillAndStroke()}class ut{static get(){return this.instance}static set(t){this.instance=t}}g(ut,"instance",new Tn);const Ae=1.25,Sn=1/Ae;class In extends L.mxGraph{constructor(e){super(e);g(this,"currentZoomLevel",1);this.zoomFactor=Ae,this.container&&(this.container.style.cursor="default")}createGraphView(){return new Cn(this)}createCellRenderer(){return new hn(ut.get())}batchUpdate(e){this.model.beginUpdate();try{e()}finally{this.model.endUpdate()}}fit(e,s,o,i,r,l,a){const h=super.fit(e,s,o,i,r,l,a);return this.setCurrentZoomLevel(h),h}setCurrentZoomLevel(e){this.currentZoomLevel=e??this.view.scale}zoomActual(){super.zoomActual(),this.setCurrentZoomLevel()}zoomIn(){super.zoomIn(),this.setCurrentZoomLevel()}zoomOut(){super.zoomOut(),this.setCurrentZoomLevel()}customFit(e){this.zoomActual();const s=e==null?void 0:e.type;if(s==null||s==Q.None)return;const o=Wt(e==null?void 0:e.margin);if(s==Q.Center){const r=this.getGraphBounds(),l=this.container.clientWidth-o,a=this.container.clientHeight-o,h=r.width/this.view.scale,u=r.height/this.view.scale,f=Math.min(3,Math.min(l/h,a/u));this.setCurrentZoomLevel(f),this.view.scaleAndTranslate(f,(o+l-h*f)/(2*f)-r.x/this.view.scale,(o+a-u*f)/(2*f)-r.y/this.view.scale)}else{let i=!1,r=!1;switch(s){case Q.Horizontal:{r=!0;break}case Q.Vertical:{i=!0;break}}this.fit(this.border,!1,o,!0,i,r)}}registerMouseWheelZoomListeners(e){e=Ht(e),G.addMouseWheelListener(at(this.createMouseWheelZoomListener(!0),e.debounceDelay),this.container),G.addMouseWheelListener(an(this.createMouseWheelZoomListener(!1),e.throttleDelay),this.container)}manageMouseWheelZoomEvent(e,s,o){if(o){const[i,r]=this.getEventRelativeCoordinates(s),[l,a,h]=this.getScaleAndTranslationDeltas(i,r);this.view.scaleAndTranslate(l,this.view.translate.x+a,this.view.translate.y+h),G.consume(s)}else this.currentZoomLevel*=e?Ae:Sn}createMouseWheelZoomListener(e){return(s,o)=>{if(G.isConsumed(s)||!(s instanceof MouseEvent))return;s.ctrlKey&&!s.altKey&&!s.shiftKey&&!s.metaKey&&this.manageMouseWheelZoomEvent(o,s,e)}}getEventRelativeCoordinates(e){const s=this.container.getBoundingClientRect(),o=e.clientX-s.left,i=e.clientY-s.top;return[o,i]}getScaleAndTranslationDeltas(e,s){const[o,i]=this.calculateFactorAndScale(),[r,l]=this.calculateTranslationDeltas(o,i,e*2,s*2);return[i,r,l]}calculateTranslationDeltas(e,s,o,i){if(e>1){const r=(e-1)/(s*2);o*=-r,i*=-r}else{const r=(1/e-1)/(this.view.scale*2);o*=r,i*=r}return[o,i]}calculateFactorAndScale(){const e=Math.round(this.currentZoomLevel*100)/100;return[e/this.view.scale,e]}}class Cn extends L.mxGraphView{getFloatingTerminalPoint(t,e,s,o){if(t.absolutePoints.filter(Boolean).length<2)return super.getFloatingTerminalPoint(t,e,s,o);const l=t.absolutePoints;return o?l[1]:l.at(-2)}}class mn{configureMarkers(){this.registerArrowDashMarker()}registerArrowDashMarker(){const t=(e,s,o,i,r,l,a,h,u)=>{const f=r*(a+u+4),p=l*(a+u+4);return function(){e.begin(),e.moveTo(i.x-f/2-p/2,i.y-p/2+f/2),e.lineTo(i.x+p/2-3*f/2,i.y-3*p/2-f/2),e.stroke()}};L.mxMarker.addMarker(rt.ARROW_DASH,t)}}const An=[_.LOOP,_.MULTI_INSTANCE_PARALLEL,_.MULTI_INSTANCE_SEQUENTIAL,_.COMPENSATION,_.EXPAND,_.ADHOC];function vn(n){const t=An.filter(e=>n.includes(e));for(const e of n.filter(s=>!t.includes(s)))t.push(e);return t}function On(n,t){return n===1?e=>e.setIconOriginForIconBottomCentered():e=>{e.setIconOriginForIconBottomCentered();const s=Math.pow(-1,t)*(T.SHAPE_ACTIVITY_MARKER_ICON_SIZE+T.SHAPE_ACTIVITY_MARKER_ICON_MARGIN)/2;e.translateIconOrigin(s,0)}}class Re extends _e{constructor(){super(void 0,void 0,void 0);g(this,"iconPainter");g(this,"markerPainterFunctions",new Map([[_.EXPAND,e=>this.iconPainter.paintExpandIcon(e)],[_.LOOP,e=>this.iconPainter.paintLoopIcon(e)],[_.MULTI_INSTANCE_PARALLEL,e=>this.iconPainter.paintParallelMultiInstanceIcon(e)],[_.MULTI_INSTANCE_SEQUENTIAL,e=>this.iconPainter.paintSequentialMultiInstanceIcon(e)]]))}paintForeground(e,s,o,i,r){super.paintForeground(e,s,o,i,r),this.paintMarkerIcons(X({canvas:e,x:s,y:o,width:i,height:r,shape:this,ratioFromParent:0,iconStrokeWidth:1.5}))}paintMarkerIcons(e){var o;const s=v.getValue(this.style,I.MARKERS,void 0);if(s){const i=vn(s.split(","));for(const[r,l]of i.entries())e={...e,setIconOriginFunct:On(i.length,r+1)},e.canvas.save(),(o=this.markerPainterFunctions.get(l))==null||o(e),e.canvas.restore()}}paintEnvelopeIcon(e,s){this.iconPainter.paintEnvelopeIcon({...e,setIconOriginFunct:o=>o.setIconOriginToShapeTopLeft(),ratioFromParent:.2,iconStyleConfig:{...e.iconStyleConfig,isFilled:s}})}}class U extends Re{paintForeground(t,e,s,o,i){super.paintForeground(t,e,s,o,i),this.paintTaskIcon(X({canvas:t,x:e,y:s,width:o,height:i,shape:this}))}}class Ln extends U{paintTaskIcon(t){}}class Nn extends U{paintTaskIcon(t){this.iconPainter.paintGearIcon({...t,setIconOriginFunct:e=>e.setIconOriginToShapeTopLeftProportionally(20)})}}class _n extends U{paintTaskIcon(t){this.iconPainter.paintPersonIcon({...t,setIconOriginFunct:e=>e.setIconOriginToShapeTopLeftProportionally(20)})}}class yn extends U{paintTaskIcon(t){if(!lt(this.style)){this.paintEnvelopeIcon(t,!1);return}const e=4,s=4,o={...t.shapeConfig,width:20,height:20};this.iconPainter.paintCircleIcon({canvas:t.canvas,shapeConfig:o,iconStyleConfig:{...t.iconStyleConfig,isFilled:!1},ratioFromParent:void 0,setIconOriginFunct:i=>i.setIconOriginToShapeTopLeft(s,e)}),o.x+=e,o.y+=s,this.iconPainter.paintEnvelopeIcon({...t,shapeConfig:o,ratioFromParent:.65,setIconOriginFunct:i=>i.setIconOriginForIconCentered()})}}class wn extends U{paintTaskIcon(t){this.paintEnvelopeIcon(t,!0)}}class Rn extends U{paintTaskIcon(t){this.iconPainter.paintHandIcon({...t,ratioFromParent:.18,setIconOriginFunct:e=>e.setIconOriginToShapeTopLeftProportionally(20)})}}class bn extends U{paintTaskIcon(t){this.iconPainter.paintScriptIcon({...t,ratioFromParent:.22,setIconOriginFunct:e=>e.setIconOriginToShapeTopLeftProportionally(20)})}}class Fn extends Re{paintForeground(t,e,s,o,i){super.paintForeground(t,e,s,o,i);const r=X({canvas:t,x:e,y:s,width:o,height:i,shape:this});switch(v.getValue(this.style,I.GLOBAL_TASK_KIND,void 0)){case d.GLOBAL_TASK_MANUAL:{this.iconPainter.paintHandIcon({...r,ratioFromParent:.18,setIconOriginFunct:l=>l.setIconOriginToShapeTopLeftProportionally(20)});break}case d.GLOBAL_TASK_SCRIPT:{this.iconPainter.paintScriptIcon({...r,ratioFromParent:.22,setIconOriginFunct:l=>l.setIconOriginToShapeTopLeftProportionally(20)});break}case d.GLOBAL_TASK_USER:{this.iconPainter.paintPersonIcon({...r,setIconOriginFunct:l=>l.setIconOriginToShapeTopLeftProportionally(20)});break}case d.GLOBAL_TASK_BUSINESS_RULE:{this.iconPainter.paintTableIcon({...r,ratioFromParent:.6,setIconOriginFunct:l=>l.setIconOriginToShapeTopLeftProportionally(15)});break}}}}class Pn extends Re{paintBackground(t,e,s,o,i){const r=v.getValue(this.style,I.SUB_PROCESS_KIND,void 0);if(t.save(),r===Y.EVENT&&(t.setDashed(!0,!1),t.setDashPattern("1 2")),super.paintBackground(t,e,s,o,i),r===Y.TRANSACTION){const l=T.SUB_PROCESS_TRANSACTION_INNER_RECT_OFFSET,a=T.SUB_PROCESS_TRANSACTION_INNER_RECT_ARC_SIZE;t.roundrect(e+l,s+l,o-2*l,i-2*l,a,a),t.stroke()}t.restore()}}class kn extends U{paintTaskIcon(t){this.iconPainter.paintTableIcon({...t,ratioFromParent:.6,setIconOriginFunct:e=>e.setIconOriginToShapeTopLeftProportionally(15)})}}class Bn extends L.mxConnector{paintEdgeShape(t,e){const s=this.createMarker(t,e,!0),o=this.createMarker(t,e,!1);this.paintEdgeLine(t,e),t.setShadow(!1),t.setDashed(!1,!1),s!=null&&(t.setFillColor(v.getValue(this.style,I.EDGE_START_FILL_COLOR,this.stroke)),s()),o!=null&&(t.setFillColor(v.getValue(this.style,I.EDGE_END_FILL_COLOR,this.stroke)),o())}paintEdgeLine(t,e){const s=Mn(t);We(t,"stroke"),this.paintLine(t,e,this.isRounded),We(t,s)}}function Mn(n){return n instanceof ye?n.pointerEventsValue:null}function We(n,t){n instanceof ye&&(n.pointerEventsValue=t)}class be extends L.mxEllipse{constructor(){super(void 0,void 0,void 0);g(this,"iconPainter");g(this,"iconPainters",new Map([[y.MESSAGE,e=>this.iconPainter.paintEnvelopeIcon({...e,ratioFromParent:.5})],[y.TERMINATE,e=>this.iconPainter.paintCircleIcon({...e,ratioFromParent:.6})],[y.TIMER,e=>this.iconPainter.paintClockIcon({...e,setIconOriginFunct:s=>s.setIconOriginToShapeTopLeftProportionally(5)})],[y.SIGNAL,e=>this.iconPainter.paintTriangleIcon({...e,ratioFromParent:.55,iconStyleConfig:{...e.iconStyleConfig,strokeWidth:T.STROKE_WIDTH_THIN.valueOf()},setIconOriginFunct:s=>s.setIconOriginToShapeTopLeftProportionally(4)})],[y.LINK,e=>this.iconPainter.paintRightArrowIcon({...e,ratioFromParent:.55,iconStyleConfig:{...e.iconStyleConfig,strokeWidth:1.5}})],[y.ERROR,e=>this.iconPainter.paintErrorIcon({...e,ratioFromParent:.55,iconStyleConfig:{...e.iconStyleConfig,strokeWidth:1.5}})],[y.COMPENSATION,e=>this.iconPainter.paintDoubleLeftArrowheadsIcon({...e,ratioFromParent:.7,iconStyleConfig:{...e.iconStyleConfig,strokeWidth:1.5}})],[y.CANCEL,e=>this.iconPainter.paintXCrossIcon({...e,ratioFromParent:.78})],[y.ESCALATION,e=>this.iconPainter.paintUpArrowheadIcon({...e,ratioFromParent:.55,iconStyleConfig:{...e.iconStyleConfig,strokeWidth:T.STROKE_WIDTH_THIN.valueOf()}})],[y.CONDITIONAL,e=>this.iconPainter.paintListIcon({...e,ratioFromParent:.6,iconStyleConfig:{...e.iconStyleConfig,strokeWidth:1.5}})]]));g(this,"withFilledIcon",!1)}paintVertexShape(e,s,o,i,r){const l=X({canvas:e,x:s,y:o,width:i,height:r,shape:this,isFilled:this.withFilledIcon});xn(l,v.getValue(this.style,I.IS_INTERRUPTING,void 0)),this.paintOuterShape(l),Yn(l),this.paintInnerShape(l)}paintOuterShape({canvas:e,shapeConfig:{x:s,y:o,width:i,height:r}}){super.paintVertexShape(e,s,o,i,r)}paintInnerShape(e){const s=this.iconPainters.get(v.getValue(this.style,I.EVENT_DEFINITION_KIND,y.NONE));s==null||s(e)}}function xn(n,t){n.canvas.save(),t==="false"&&(n.canvas.setDashed(!0,!1),n.canvas.setDashPattern("3 2"))}function Yn(n){n.canvas.restore()}class Gn extends be{constructor(){super(),this.withFilledIcon=!0}}class ve extends be{paintOuterShape({canvas:t,shapeConfig:{x:e,y:s,width:o,height:i,strokeWidth:r}}){t.ellipse(e,s,o,i),t.fillAndStroke();const l=r*1.5;t.ellipse(o*.02+l+e,i*.02+l+s,o*.96-2*l,i*.96-2*l),t.stroke()}}class Vn extends ve{constructor(){super(),this.withFilledIcon=!0}}class Dn extends _e{constructor(){super(...arguments);g(this,"iconPainter")}paintVertexShape(e,s,o,i,r){const l=X({canvas:e,x:s,y:o,width:i,height:r,shape:this,ratioFromParent:1,isFilled:v.getValue(this.style,I.IS_INITIATING,"true")=="false"});this.iconPainter.paintEnvelopeIcon(l)}}class se extends L.mxRhombus{constructor(){super(...arguments);g(this,"iconPainter")}paintVertexShape(e,s,o,i,r){const l=X({canvas:e,x:s,y:o,width:i,height:r,shape:this});this.paintOuterShape(l),this.paintInnerShape(l)}paintOuterShape({canvas:e,shapeConfig:{x:s,y:o,width:i,height:r}}){super.paintVertexShape(e,s,o,i,r)}}class Un extends se{paintInnerShape(t){this.iconPainter.paintXCrossIcon({...t,iconStyleConfig:{...t.iconStyleConfig,isFilled:!0},ratioFromParent:.5})}}class Wn extends se{paintInnerShape(t){this.iconPainter.paintPlusCrossIcon({...t,iconStyleConfig:{...t.iconStyleConfig,isFilled:!0},ratioFromParent:.5})}}class Hn extends se{paintInnerShape(t){this.iconPainter.paintCircleIcon({...t,ratioFromParent:.62,iconStyleConfig:{...t.iconStyleConfig,isFilled:!1,strokeWidth:T.STROKE_WIDTH_THICK.valueOf()}})}}class Kn extends se{paintInnerShape(t){this.iconPainter.paintAsteriskIcon({...t,iconStyleConfig:{...t.iconStyleConfig,isFilled:!0},ratioFromParent:.5})}}class zn extends se{paintInnerShape(t){t={...t,iconStyleConfig:{...t.iconStyleConfig,strokeWidth:1}},this.iconPainter.paintCircleIcon({...t,ratioFromParent:.55}),lt(this.style)||this.iconPainter.paintCircleIcon({...t,ratioFromParent:.45});const e={...t,ratioFromParent:.3};v.getValue(this.style,I.EVENT_BASED_GATEWAY_KIND,ee.Exclusive)==ee.Parallel?this.iconPainter.paintPlusCrossIcon(e):this.iconPainter.paintPentagon(e)}}class Xn extends _e{paintForeground(t,e,s,o,i){t.begin(),t.moveTo(e+T.TEXT_ANNOTATION_BORDER_LENGTH,s),t.lineTo(e,s),t.lineTo(e,s+i),t.lineTo(e+T.TEXT_ANNOTATION_BORDER_LENGTH,s+i),t.stroke()}paintBackground(t,e,s,o,i){t.save(),t.setStrokeColor("none"),super.paintBackground(t,e,s,o,i),t.restore()}}const Zn=()=>{const n=[[d.EVENT_END,Gn],[d.EVENT_START,be],[d.EVENT_INTERMEDIATE_THROW,Vn],[d.EVENT_INTERMEDIATE_CATCH,ve],[d.EVENT_BOUNDARY,ve],[d.GATEWAY_COMPLEX,Kn],[d.GATEWAY_EVENT_BASED,zn],[d.GATEWAY_EXCLUSIVE,Un],[d.GATEWAY_INCLUSIVE,Hn],[d.GATEWAY_PARALLEL,Wn],[d.SUB_PROCESS,Pn],[d.CALL_ACTIVITY,Fn],[d.TASK,Ln],[d.TASK_SERVICE,Nn],[d.TASK_USER,_n],[d.TASK_RECEIVE,yn],[d.TASK_SEND,wn],[d.TASK_MANUAL,Rn],[d.TASK_SCRIPT,bn],[d.TASK_BUSINESS_RULE,kn],[d.TEXT_ANNOTATION,Xn],[I.EDGE,Bn],[I.MESSAGE_FLOW_ICON,Dn]];for(const[t,e]of n)Gt.registerShape(t,e)};class jn{configureShapes(){Zn()}}const dt=12;class Fe extends Map{get(t){return super.get(t)??(()=>{})}}const $n=new Fe([[k.SEQUENCE_FLOW,n=>{n[c.STYLE_ENDARROW]=c.ARROW_BLOCK_THIN}],[k.MESSAGE_FLOW,n=>{n[c.STYLE_DASHED]=!0,n[c.STYLE_DASH_PATTERN]="8 5",n[c.STYLE_STARTARROW]=c.ARROW_OVAL,n[c.STYLE_STARTSIZE]=8,n[c.STYLE_STARTFILL]=!0,n[I.EDGE_START_FILL_COLOR]=T.MESSAGE_FLOW_MARKER_START_FILL_COLOR,n[c.STYLE_ENDARROW]=c.ARROW_BLOCK_THIN,n[c.STYLE_ENDFILL]=!0,n[I.EDGE_END_FILL_COLOR]=T.MESSAGE_FLOW_MARKER_END_FILL_COLOR}],[k.ASSOCIATION_FLOW,n=>{n[c.STYLE_DASHED]=!0,n[c.STYLE_DASH_PATTERN]="1 2",n[c.STYLE_STARTSIZE]=dt}]]),qn=new Fe([[x.DEFAULT,n=>{n[c.STYLE_STARTARROW]=rt.ARROW_DASH}],[x.CONDITIONAL_FROM_ACTIVITY,n=>{n[c.STYLE_STARTARROW]=c.ARROW_DIAMOND_THIN,n[c.STYLE_STARTSIZE]=18,n[c.STYLE_STARTFILL]=!0,n[I.EDGE_START_FILL_COLOR]=T.SEQUENCE_FLOW_CONDITIONAL_FROM_ACTIVITY_MARKER_FILL_COLOR}]]),Qn=new Fe([[K.NONE,n=>{}],[K.ONE,n=>{n[c.STYLE_ENDARROW]=c.ARROW_OPEN_THIN}],[K.BOTH,n=>{n[c.STYLE_STARTARROW]=c.ARROW_OPEN_THIN,n[c.STYLE_ENDARROW]=c.ARROW_OPEN_THIN}]]);class ht{constructor(t){this.graph=t}configureStyles(){this.configureDefaultVertexStyle(),this.configurePoolStyle(),this.configureLaneStyle(),this.configureTextAnnotationStyle(),this.configureGroupStyle(),this.configureActivityStyles(),this.configureEventStyles(),this.configureGatewayStyles(),this.configureDefaultEdgeStyle(),this.configureFlowStyles()}getStylesheet(){return this.graph.getStylesheet()}putCellStyle(t,e){this.getStylesheet().putCellStyle(t,e)}configureDefaultVertexStyle(){const t=this.getStylesheet().getDefaultVertexStyle();He(t),t[c.STYLE_ABSOLUTE_ARCSIZE]=!0,t[c.STYLE_ARCSIZE]=T.SHAPE_ARC_SIZE}configurePoolStyle(){const t={};t[c.STYLE_SHAPE]=c.SHAPE_SWIMLANE,t[c.STYLE_VERTICAL_ALIGN]=c.ALIGN_MIDDLE,t[c.STYLE_ALIGN]=c.ALIGN_CENTER,t[c.STYLE_STARTSIZE]=T.POOL_LABEL_SIZE,t[c.STYLE_FILLCOLOR]=T.POOL_LABEL_FILL_COLOR,this.graph.getStylesheet().putCellStyle(d.POOL,t)}configureLaneStyle(){const t={};t[c.STYLE_SHAPE]=c.SHAPE_SWIMLANE,t[c.STYLE_VERTICAL_ALIGN]=c.ALIGN_MIDDLE,t[c.STYLE_ALIGN]=c.ALIGN_CENTER,t[c.STYLE_SWIMLANE_LINE]=0,t[c.STYLE_STARTSIZE]=T.LANE_LABEL_SIZE,t[c.STYLE_FILLCOLOR]=T.LANE_LABEL_FILL_COLOR,this.graph.getStylesheet().putCellStyle(d.LANE,t)}configureEventStyles(){for(const t of E.eventKinds()){const e={};e[c.STYLE_SHAPE]=t,e[c.STYLE_PERIMETER]=Ge.EllipsePerimeter,e[c.STYLE_STROKEWIDTH]=t==d.EVENT_END?T.STROKE_WIDTH_THICK:T.STROKE_WIDTH_THIN,e[c.STYLE_VERTICAL_LABEL_POSITION]=c.ALIGN_BOTTOM,this.putCellStyle(t,e)}}configureTextAnnotationStyle(){const t={};t[c.STYLE_SHAPE]=d.TEXT_ANNOTATION,t[c.STYLE_VERTICAL_ALIGN]=c.ALIGN_MIDDLE,t[c.STYLE_ALIGN]=c.ALIGN_LEFT,t[c.STYLE_SPACING_LEFT]=5,t[c.STYLE_FILLCOLOR]=T.TEXT_ANNOTATION_FILL_COLOR,t[c.STYLE_STROKEWIDTH]=T.STROKE_WIDTH_THIN,this.putCellStyle(d.TEXT_ANNOTATION,t)}configureGroupStyle(){const t={};t[c.STYLE_ROUNDED]=!0,t[c.STYLE_DASHED]=!0,t[c.STYLE_DASH_PATTERN]="7 4 1 4",t[c.STYLE_STROKEWIDTH]=T.STROKE_WIDTH_THIN,t[c.STYLE_FILLCOLOR]=T.GROUP_FILL_COLOR,t[c.STYLE_ALIGN]=c.ALIGN_CENTER,t[c.STYLE_VERTICAL_ALIGN]=c.ALIGN_TOP,this.putCellStyle(d.GROUP,t)}configureActivityStyles(){for(const t of E.activityKinds()){const e={};e[c.STYLE_SHAPE]=t,e[c.STYLE_ROUNDED]=!0,e[c.STYLE_VERTICAL_ALIGN]=c.ALIGN_MIDDLE,e[c.STYLE_STROKEWIDTH]=t==d.CALL_ACTIVITY?T.STROKE_WIDTH_THICK:T.STROKE_WIDTH_THIN,this.putCellStyle(t,e)}}configureGatewayStyles(){for(const t of E.gatewayKinds()){const e={};e[c.STYLE_SHAPE]=t,e[c.STYLE_PERIMETER]=Ge.RhombusPerimeter,e[c.STYLE_STROKEWIDTH]=T.STROKE_WIDTH_THIN,e[c.STYLE_VERTICAL_ALIGN]=c.ALIGN_TOP,e[c.STYLE_LABEL_POSITION]=c.ALIGN_LEFT,e[c.STYLE_VERTICAL_LABEL_POSITION]=c.ALIGN_TOP,this.putCellStyle(t,e)}}configureDefaultEdgeStyle(){const t=this.getStylesheet().getDefaultEdgeStyle();He(t),t[c.STYLE_SHAPE]=I.EDGE,t[c.STYLE_ENDSIZE]=dt,t[c.STYLE_STROKEWIDTH]=1.5,t[c.STYLE_ROUNDED]=!0,t[c.STYLE_ARCSIZE]=5,t[c.STYLE_VERTICAL_ALIGN]=c.ALIGN_BOTTOM,delete t[c.STYLE_ENDARROW]}configureEdgeStyles(t,e){for(const s of t){const o={};e.get(s)(o),this.graph.getStylesheet().putCellStyle(s.toString(),o)}}configureFlowStyles(){this.configureEdgeStyles(Object.values(k),$n),this.configureEdgeStyles(Object.values(x),qn),this.configureEdgeStyles(Object.values(K),Qn)}}function He(n){n[c.STYLE_FONTFAMILY]=T.DEFAULT_FONT_FAMILY,n[c.STYLE_FONTSIZE]=T.DEFAULT_FONT_SIZE,n[c.STYLE_FONTCOLOR]=T.DEFAULT_FONT_COLOR,n[c.STYLE_FILLCOLOR]=T.DEFAULT_FILL_COLOR,n[c.STYLE_STROKECOLOR]=T.DEFAULT_STROKE_COLOR,n[c.STYLE_LABEL_BACKGROUNDCOLOR]=c.NONE,n[c.STYLE_WHITE_SPACE]="wrap"}class Jn{constructor(t){g(this,"graph");this.graph=new In(t)}configure(t){return this.configureGraph(),this.configureNavigationSupport(t),new ht(this.graph).configureStyles(),new jn().configureShapes(),new mn().configureMarkers(),this.graph}configureGraph(){this.graph.setCellsLocked(!0),this.graph.setCellsSelectable(!1),this.graph.setEdgeLabelsMovable(!1),this.graph.setHtmlLabels(!0),this.graph.setConstrainChildren(!1),this.graph.setExtendParents(!1),this.graph.foldingEnabled=!1}configureNavigationSupport(t){var s;const e=this.graph.panningHandler;(s=t==null?void 0:t.navigation)!=null&&s.enabled?(e.addListener(G.PAN_START,Ke(this.graph,"grab")),e.addListener(G.PAN_END,Ke(this.graph,"default")),e.usePopupTrigger=!1,e.isForcePanningEvent=o=>G.isLeftMouseButton(o.getEvent())||G.isMultiTouchEvent(o.getEvent()),this.graph.setPanning(!0),this.graph.registerMouseWheelZoomListeners(t.navigation.zoom)):(this.graph.setPanning(!1),e.setPinchEnabled(!1),e.isForcePanningEvent=o=>!1)}}function Ke(n,t){return()=>{n.container.style.cursor=t}}class es{constructor(t){this.graph=t}fit(t){this.graph.customFit(t)}zoom(t){t=="in"?this.graph.zoomIn():this.graph.zoomOut()}}class ts{constructor(t){this.convertedElements=t}deserialize(t){const e=S(t.category).flatMap(s=>S(s.categoryValue));for(const s of e)this.convertedElements.registerCategoryValue(s.id,s.value)}}class Z{}class ns{constructor(t){this.options=t}warning(t){var s;if((s=this.options)!=null&&s.disableConsoleLog)return;const e=t.getMessage();console.warn(`[bv-parser] ${e.template}`,...e.arguments)}}class ss extends Z{constructor(t,e){super(),this.groupBpmnElementId=t,this.categoryValueReference=e}getMessage(){return{arguments:[this.categoryValueReference,this.groupBpmnElementId],template:"Group json deserialization: unable to find category value ref %s for bpmn element %s"}}}class os extends Z{constructor(t){super(),this.bpmnElementId=t}getMessage(){return{arguments:[this.bpmnElementId],template:"Shape json deserialization: unable to find bpmn element with id %s"}}}class is extends Z{constructor(t){super(),this.bpmnElementId=t}getMessage(){return{arguments:[this.bpmnElementId],template:"Edge json deserialization: unable to find bpmn element with id %s"}}}class rs extends Z{constructor(t,e){super(),this.shapeOrEdgeId=t,this.labelStyleId=e}getMessage(){return{arguments:[this.labelStyleId,this.shapeOrEdgeId],template:"Unable to assign font from style %s to shape/edge %s"}}}class ls extends Z{constructor(t,e){super(),this.laneId=t,this.flowNodeReference=e}getMessage(){return{arguments:[this.flowNodeReference,this.laneId],template:"Unable to assign lane %s as parent: flow node %s is not found"}}}class as extends Z{constructor(t,e,s){super(),this.bpmnElementId=t,this.attachedToReference=e,this.attachedToKind=s}getMessage(){return{arguments:[this.bpmnElementId,this.attachedToReference,this.attachedToKind],template:"The boundary event %s must be attached to an activity, and not to %s of kind %s"}}}class cs{constructor(){g(this,"poolsById",new Map);g(this,"poolsByProcessRef",new Map);g(this,"messageFlows",new Map);g(this,"flowNodes",new Map);g(this,"lanes",new Map);g(this,"sequenceFlows",new Map);g(this,"associationFlows",new Map);g(this,"eventDefinitionsOfDefinitions",new Map);g(this,"globalTasks",new Map);g(this,"categoryValues",new Map)}getFlows(){return[...this.messageFlows.values(),...this.sequenceFlows.values(),...this.associationFlows.values()]}findPoolById(t){return this.poolsById.get(t)}findPoolByProcessRef(t){return this.poolsByProcessRef.get(t)}registerPool(t,e){this.poolsById.set(t.id,t),e&&this.poolsByProcessRef.set(e,t)}findMessageFlow(t){return this.messageFlows.get(t)}registerMessageFlow(t){this.messageFlows.set(t.id,t)}findFlowNode(t){return this.flowNodes.get(t)}registerFlowNode(t){this.flowNodes.set(t.id,t)}findLane(t){return this.lanes.get(t)}registerLane(t){this.lanes.set(t.id,t)}findSequenceFlow(t){return this.sequenceFlows.get(t)}registerSequenceFlow(t){this.sequenceFlows.set(t.id,t)}findAssociationFlow(t){return this.associationFlows.get(t)}registerAssociationFlow(t){this.associationFlows.set(t.id,t)}findEventDefinitionOfDefinition(t){return this.eventDefinitionsOfDefinitions.get(t)}registerEventDefinitionsOfDefinition(t,e){this.eventDefinitionsOfDefinitions.set(t,e)}findGlobalTask(t){return this.globalTasks.get(t)}registerGlobalTask(t,e){this.globalTasks.set(t,e)}findCategoryValue(t){return this.categoryValues.get(t)}registerCategoryValue(t,e){this.categoryValues.set(t,{value:e})}}const ft=(n,t,e,s)=>{const o=n.findCategoryValue(e.categoryValueRef);if(o)return new M(e.id,o.value,d.GROUP,s);t.warning(new ss(e.id,e.categoryValueRef))},gt=(n,t)=>{for(const e of S(t)){const s=e.associationDirection;n.registerAssociationFlow(new nt(e.id,void 0,e.sourceRef,e.targetRef,s))}};class us{constructor(t,e){this.convertedElements=t,this.parsingMessageCollector=e}deserialize(t){for(const e of S(t))this.parseCollaboration(e)}parseCollaboration(t){this.buildParticipant(t.participant),this.buildMessageFlows(t.messageFlow),gt(this.convertedElements,t.association),this.buildGroups(t.group),this.buildTextAnnotation(t.textAnnotation)}buildParticipant(t){for(const e of S(t))this.convertedElements.registerPool(new M(e.id,e.name,d.POOL),e.processRef)}buildMessageFlows(t){for(const e of S(t))this.convertedElements.registerMessageFlow(new tt(e.id,e.name,e.sourceRef,e.targetRef))}buildGroups(t){for(const e of S(t)){const s=ft(this.convertedElements,this.parsingMessageCollector,e);s&&this.convertedElements.registerFlowNode(s)}}buildTextAnnotation(t){for(const e of S(t))this.convertedElements.registerFlowNode(new M(e.id,e.text,d.TEXT_ANNOTATION))}}class ds{constructor(t,e,s,o){this.x=t,this.y=e,this.width=s,this.height=o}}class hs{constructor(t,e,s,o,i=te.NONE){g(this,"extensions",{});this.id=t,this.bpmnElement=e,this.waypoints=s,this.label=o,this.messageVisibleKind=i}}class fs{constructor(t,e){this.x=t,this.y=e}}class gs{constructor(t,e){g(this,"extensions",{});this.font=t,this.bounds=e}}class Ts{constructor(t,e,s,o,i,r){this.name=t,this.size=e,this.isBold=s,this.isItalic=o,this.isUnderline=i,this.isStrikeThrough=r}}class ps{constructor(t,e){g(this,"convertedFonts",new Map);this.convertedElements=t,this.parsingMessageCollector=e}deserialize(t){const e=[],s=[],o=[],i=[],r=S(t)[0];if(r){this.deserializeFonts(r.BPMNLabelStyle);const l=r.BPMNPlane,a=this.deserializeEdges(l.BPMNEdge),h=this.deserializeShapes(l.BPMNShape);e.push(...h.flowNodes),s.push(...h.lanes),o.push(...h.pools),i.push(...a)}return{flowNodes:e,lanes:s,pools:o,edges:i}}deserializeFonts(t){for(const e of S(t))for(const s of S(e.Font))this.convertedFonts.set(e.id,new Ts(s.name,s.size,s.isBold,s.isItalic,s.isUnderline,s.isStrikeThrough))}deserializeShapes(t){const e={flowNodes:[],lanes:[],pools:[]};for(const s of S(t))this.deserializeShapeAndStoreIfFound(s,e.flowNodes,o=>this.convertedElements.findFlowNode(o))||this.deserializeShapeAndStoreIfFound(s,e.lanes,o=>this.convertedElements.findLane(o))||this.deserializeShapeAndStoreIfFound(s,e.pools,o=>this.convertedElements.findPoolById(o))||this.parsingMessageCollector.warning(new os(s.bpmnElement));return e}deserializeShapeAndStoreIfFound(t,e,s){const o=this.deserializeShape(t,s);return o?(e.push(o),!0):!1}deserializeShape(t,e){const s=e(t.bpmnElement);if(s){const o=ze(t);(s instanceof ne||s instanceof H&&s.callActivityKind===J.CALLING_PROCESS)&&!t.isExpanded&&s.markers.push(_.EXPAND);let i;E.isPoolOrLane(s.kind)&&(i=t.isHorizontal??!0);const r=t.BPMNLabel,l=this.deserializeLabel(r,t.id),a=new re(t.id,s,o,l,i);return Es(a,t),a}}deserializeEdges(t){return S(t).map(e=>{const s=this.convertedElements.findSequenceFlow(e.bpmnElement)||this.convertedElements.findMessageFlow(e.bpmnElement)||this.convertedElements.findAssociationFlow(e.bpmnElement);if(!s){this.parsingMessageCollector.warning(new is(e.bpmnElement));return}const o=this.deserializeWaypoints(e.waypoint),i=this.deserializeLabel(e.BPMNLabel,e.id),r=e.messageVisibleKind?e.messageVisibleKind:te.NONE,l=new hs(e.id,s,o,i,r);return Ss(l,e),l}).filter(Boolean)}deserializeWaypoints(t){return S(t).map(e=>new fs(e.x,e.y))}deserializeLabel(t,e){if(t&&typeof t=="object"){const s=this.findFont(t.labelStyle,e),o=ze(t),i=new gs(s,o);if("color"in t)return i.extensions.color=t.color,i;if(s||o)return i}}findFont(t,e){let s;return t&&(s=this.convertedFonts.get(t),s||this.parsingMessageCollector.warning(new rs(e,t))),s}}function Es(n,t){"background-color"in t?n.extensions.fillColor=t["background-color"]:"fill"in t&&(n.extensions.fillColor=t.fill),"border-color"in t?n.extensions.strokeColor=t["border-color"]:"stroke"in t&&(n.extensions.strokeColor=t.stroke)}function ze(n){const t=n.Bounds;if(t)return new ds(t.x,t.y,t.width,t.height)}function Ss(n,t){"border-color"in t?n.extensions.strokeColor=t["border-color"]:"stroke"in t&&(n.extensions.strokeColor=t.stroke)}const Is=n=>"source"in n||"target"in n;class Cs{constructor(t){this.convertedElements=t}deserialize(t){for(const e of Je){const s=t[e+"EventDefinition"];for(const o of S(s,!0))this.convertedElements.registerEventDefinitionsOfDefinition(o.id,{id:o.id,kind:e,...Is(o)?{source:o.source,target:o.target}:{}})}}}class ms{constructor(t){this.convertedElements=t}deserialize(t){this.parseGlobalTasks(t.globalTask,d.GLOBAL_TASK),this.parseGlobalTasks(t.globalBusinessRuleTask,d.GLOBAL_TASK_BUSINESS_RULE),this.parseGlobalTasks(t.globalManualTask,d.GLOBAL_TASK_MANUAL),this.parseGlobalTasks(t.globalScriptTask,d.GLOBAL_TASK_SCRIPT),this.parseGlobalTasks(t.globalUserTask,d.GLOBAL_TASK_USER)}parseGlobalTasks(t,e){for(const s of S(t))this.convertedElements.registerGlobalTask(s.id,e)}}const As=(n,t)=>{switch(n){case"adHocSubProcess":return Y.AD_HOC;case"transaction":return Y.TRANSACTION;default:return t.triggeredByEvent?Y.EVENT:Y.EMBEDDED}},vs=["adHocSubProcess","transaction",...E.flowNodeKinds().filter(n=>n!==d.EVENT_BOUNDARY),d.EVENT_BOUNDARY];function Os(n){return["adHocSubProcess","transaction"].includes(n)?d.SUB_PROCESS:n}class Ls{constructor(t,e){g(this,"defaultSequenceFlowIds",[]);g(this,"elementsWithoutParentByProcessId",new Map);g(this,"callActivitiesCallingProcess",new Map);g(this,"eventsByLinkEventDefinition",new Map);this.convertedElements=t,this.parsingMessageCollector=e}deserialize(t){for(const e of S(t))this.parseProcess(e);for(const e of S(t))this.assignParentOfProcessElementsCalledByCallActivity(e.id);this.assignIncomingAndOutgoingIdsFromFlows(),this.assignSourceAndTargetIdsToLinkEvents()}assignParentOfProcessElementsCalledByCallActivity(t){const e=this.callActivitiesCallingProcess.get(t);if(e){const s=this.convertedElements.findPoolByProcessRef(t);s&&(s.parentId=e.id);for(const o of this.elementsWithoutParentByProcessId.get(t))o.parentId=e.id}}assignIncomingAndOutgoingIdsFromFlows(){const t=(e,s,o)=>{const i=this.convertedElements.findFlowNode(e)??this.convertedElements.findLane(e)??this.convertedElements.findPoolById(e);i&&!i[s].includes(o)&&i[s].push(o)};for(const e of this.convertedElements.getFlows())t(e.sourceReferenceId,"outgoingIds",e.id),t(e.targetReferenceId,"incomingIds",e.id)}assignSourceAndTargetIdsToLinkEvents(){var e;const t=[...this.eventsByLinkEventDefinition.entries()].filter(([s])=>s.id);for(const[s,o]of this.eventsByLinkEventDefinition)if(o instanceof Ie){const i=t.find(([r])=>s.target===r.id);o.targetId=(e=i==null?void 0:i[1])==null?void 0:e.id}else o instanceof Se&&(o.sourceIds=t.filter(([i])=>Array.isArray(s.source)?s.source.includes(i.id):s.source===i.id).map(([,i])=>i.id))}parseProcess(t){const e=t.id,s=this.convertedElements.findPoolByProcessRef(e);s&&!s.name&&this.convertedElements.registerPool(new M(s.id,t.name,d.POOL),e),this.buildProcessInnerElements(t,s==null?void 0:s.id)}buildProcessInnerElements(t,e){this.elementsWithoutParentByProcessId.set(t.id,[]);for(const s of vs)this.buildFlowNodeBpmnElements(t[s],Os(s),e,t.id,s);this.buildLaneSetBpmnElements(t.laneSet,e,t.id),this.buildSequenceFlows(t.sequenceFlow),gt(this.convertedElements,t.association)}buildFlowNodeBpmnElements(t,e,s,o,i){for(const r of S(t)){const l=this.buildFlowNodeBpmnElement(e,r,s,i);"default"in r&&E.isWithDefaultSequenceFlow(e)&&this.defaultSequenceFlowIds.push(r.default),l&&(this.convertedElements.registerFlowNode(l),s||this.elementsWithoutParentByProcessId.get(o).push(l))}}buildFlowNodeBpmnElement(t,e,s,o){if(E.isEvent(t))return this.buildShapeBpmnEvent(e,t,s);if(E.isActivity(t))return this.buildShapeBpmnActivity(e,t,s,o);if(t==d.GATEWAY_EVENT_BASED){const i=e;return new it(i.id,i.name,s,i.instantiate,ee[i.eventGatewayType])}else{if(t==d.GROUP)return ft(this.convertedElements,this.parsingMessageCollector,e,s);{const i=t===d.TEXT_ANNOTATION?e.text:e.name;return new M(e.id,i,t,s,e.instantiate)}}}buildShapeBpmnActivity(t,e,s,o){const i=Ns(t);return E.isSubProcess(e)?this.buildShapeBpmnSubProcess(t,s,As(o,t),i):E.isCallActivity(e)?this.buildShapeBpmnCallActivity(t,s,i):new de(t.id,t.name,e,s,t.instantiate,i)}buildShapeBpmnCallActivity(t,e,s){const o=this.convertedElements.findGlobalTask(t.calledElement);if(!o){const i=new H(t.id,t.name,J.CALLING_PROCESS,e,s);return this.callActivitiesCallingProcess.set(t.calledElement,i),i}return new H(t.id,t.name,J.CALLING_GLOBAL_TASK,e,s,o)}buildShapeBpmnEvent(t,e,s){const o=this.getEventDefinitions(t),i=[...o.entries()].map(([,r])=>r.length).reduce((r,l)=>r+l,0);if(i==0&&E.canHaveNoneEvent(e))return new D(t.id,t.name,e,y.NONE,s);if(i==1){const[r,l]=[...o.entries()][0],a=E.isCatchEvent(e)?this.buildShapeBpmnCatchEvent(t,e,r,s):this.buildShapeBpmnThrowEvent(t,e,r,s);return r===y.LINK&&(l[0].id||l[0].target||l[0].source)&&this.eventsByLinkEventDefinition.set(l[0],a),a}}buildShapeBpmnCatchEvent(t,e,s,o){return E.isBoundaryEvent(e)?this.buildShapeBpmnBoundaryEvent(t,s):E.isStartEvent(e)?new st(t.id,t.name,s,o,t.isInterrupting):new Se(t.id,t.name,s,o)}buildShapeBpmnThrowEvent(t,e,s,o){return E.isIntermediateThrowEvent(e)?new Ie(t.id,t.name,s,o):new D(t.id,t.name,e,s,o)}buildShapeBpmnBoundaryEvent(t,e){const s=this.convertedElements.findFlowNode(t.attachedToRef);if(E.isActivity(s==null?void 0:s.kind))return new ot(t.id,t.name,e,t.attachedToRef,t.cancelActivity);this.parsingMessageCollector.warning(new as(t.id,t.attachedToRef,s==null?void 0:s.kind))}getEventDefinitions(t){const e=new Map;for(const s of Je){const o=t[`${s}EventDefinition`];e.set(s,S(o,!0))}for(const s of S(t.eventDefinitionRef)){const o=this.convertedElements.findEventDefinitionOfDefinition(s);o&&e.get(o.kind).push(o)}for(const[s]of[...e.entries()].filter(([,o])=>o.length===0))e.delete(s);return e}buildShapeBpmnSubProcess(t,e,s,o){const i=new ne(t.id,t.name,s,e,o);return this.buildProcessInnerElements(t,t.id),i}buildLaneSetBpmnElements(t,e,s){for(const o of S(t))this.buildLaneBpmnElements(o.lane,e,s)}buildLaneBpmnElements(t,e,s){var o;for(const i of S(t)){const r=new M(i.id,i.name,d.LANE,e);this.convertedElements.registerLane(r),e||this.elementsWithoutParentByProcessId.get(s).push(r),this.assignParentOfLaneFlowNodes(i),(o=i.childLaneSet)!=null&&o.lane&&this.buildLaneBpmnElements(i.childLaneSet.lane,i.id,s)}}assignParentOfLaneFlowNodes(t){for(const e of S(t.flowNodeRef)){const s=this.convertedElements.findFlowNode(e),o=t.id;s?E.isBoundaryEvent(s.kind)||(s.parentId=o):this.parsingMessageCollector.warning(new ls(o,e))}}buildSequenceFlows(t){for(const e of S(t)){const s=this.getSequenceFlowKind(e);this.convertedElements.registerSequenceFlow(new et(e.id,e.name,e.sourceRef,e.targetRef,s))}}getSequenceFlowKind(t){if(this.defaultSequenceFlowIds.includes(t.id))return x.DEFAULT;{const e=this.convertedElements.findFlowNode(t.sourceRef);if(e&&E.isWithDefaultSequenceFlow(e.kind)&&t.conditionExpression)return E.isActivity(e.kind)?x.CONDITIONAL_FROM_ACTIVITY:x.CONDITIONAL_FROM_GATEWAY}return x.NORMAL}}const Ns=n=>{const t=[],e=n.standardLoopCharacteristics,s=S(n.multiInstanceLoopCharacteristics,!0)[0];return e!==void 0?t.push(_.LOOP):s&&t.push(s.isSequential?_.MULTI_INSTANCE_SEQUENTIAL:_.MULTI_INSTANCE_PARALLEL),t};class _s{constructor(t,e,s,o,i,r){this.categoryConverter=t,this.collaborationConverter=e,this.eventDefinitionConverter=s,this.globalTaskConverter=o,this.processConverter=i,this.diagramConverter=r}parse(t){const e=t.definitions;return this.categoryConverter.deserialize(e),this.collaborationConverter.deserialize(e.collaboration),this.eventDefinitionConverter.deserialize(e),this.globalTaskConverter.deserialize(e),this.processConverter.deserialize(e.process),this.diagramConverter.deserialize(e.BPMNDiagram)}}function ys(n){const t=new cs;return new _s(new ts(t),new us(t,n),new Cs(t),new ms(t),new Ls(t,n),new ps(t,n))}const Tt=":A-Za-z_\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD",ws=Tt+"\\-.\\d\\u00B7\\u0300-\\u036F\\u203F-\\u2040",Rs="["+Tt+"]["+ws+"]*",bs=new RegExp("^"+Rs+"$");function pt(n,t){const e=[];let s=t.exec(n);for(;s;){const o=[];o.startIndex=t.lastIndex-s[0].length;const i=s.length;for(let r=0;r"u")};function Fs(n){return typeof n<"u"}const Ps={allowBooleanAttributes:!1,unpairedTags:[]};function ks(n,t){t=Object.assign({},Ps,t);const e=[];let s=!1,o=!1;n[0]==="\uFEFF"&&(n=n.substr(1));for(let i=0;i"&&n[i]!==" "&&n[i]!==" "&&n[i]!==` -`&&n[i]!=="\r";i++)a+=n[i];if(a=a.trim(),a[a.length-1]==="/"&&(a=a.substring(0,a.length-1),i--),!Us(a)){let f;return a.trim().length===0?f="Invalid space after '<'.":f="Tag '"+a+"' is an invalid name.",N("InvalidTag",f,w(n,i))}const h=xs(n,i);if(h===!1)return N("InvalidAttr","Attributes for '"+a+"' have open quote.",w(n,i));let u=h.value;if(i=h.index,u[u.length-1]==="/"){const f=i-u.length;u=u.substring(0,u.length-1);const p=$e(u,t);if(p===!0)s=!0;else return N(p.err.code,p.err.msg,w(n,f+p.err.line))}else if(l)if(h.tagClosed){if(u.trim().length>0)return N("InvalidTag","Closing tag '"+a+"' can't have attributes or invalid starting.",w(n,r));if(e.length===0)return N("InvalidTag","Closing tag '"+a+"' has not been opened.",w(n,r));{const f=e.pop();if(a!==f.tagName){let p=w(n,f.tagStartPos);return N("InvalidTag","Expected closing tag '"+f.tagName+"' (opened in line "+p.line+", col "+p.col+") instead of closing tag '"+a+"'.",w(n,r))}e.length==0&&(o=!0)}}else return N("InvalidTag","Closing tag '"+a+"' doesn't have proper closing.",w(n,i));else{const f=$e(u,t);if(f!==!0)return N(f.err.code,f.err.msg,w(n,i-u.length+f.err.line));if(o===!0)return N("InvalidXml","Multiple possible root nodes found.",w(n,i));t.unpairedTags.indexOf(a)!==-1||e.push({tagName:a,tagStartPos:r}),s=!0}for(i++;i0)return N("InvalidXml","Invalid '"+JSON.stringify(e.map(i=>i.tagName),null,4).replace(/\r?\n/g,"")+"' found.",{line:1,col:1})}else return N("InvalidXml","Start tag expected.",1);return!0}function Xe(n){return n===" "||n===" "||n===` -`||n==="\r"}function Ze(n,t){const e=t;for(;t5&&s==="xml")return N("InvalidXml","XML declaration allowed only at the start of the document.",w(n,t));if(n[t]=="?"&&n[t+1]==">"){t++;break}else continue}return t}function je(n,t){if(n.length>t+5&&n[t+1]==="-"&&n[t+2]==="-"){for(t+=3;t"){t+=2;break}}else if(n.length>t+8&&n[t+1]==="D"&&n[t+2]==="O"&&n[t+3]==="C"&&n[t+4]==="T"&&n[t+5]==="Y"&&n[t+6]==="P"&&n[t+7]==="E"){let e=1;for(t+=8;t"&&(e--,e===0))break}else if(n.length>t+9&&n[t+1]==="["&&n[t+2]==="C"&&n[t+3]==="D"&&n[t+4]==="A"&&n[t+5]==="T"&&n[t+6]==="A"&&n[t+7]==="["){for(t+=8;t"){t+=2;break}}return t}const Bs='"',Ms="'";function xs(n,t){let e="",s="",o=!1;for(;t"&&s===""){o=!0;break}e+=n[t]}return s!==""?!1:{value:e,index:t,tagClosed:o}}const Ys=new RegExp(`(\\s*)([^\\s=]+)(\\s*=)?(\\s*(['"])(([\\s\\S])*?)\\5)?`,"g");function $e(n,t){const e=pt(n,Ys),s={};for(let o=0;o!1,commentPropName:!1,unpairedTags:[],processEntities:!0,htmlEntities:!1,ignoreDeclaration:!1,ignorePiTags:!1,transformTagName:!1,transformAttributeName:!1,updateTag:function(n,t,e){return n}},Hs=function(n){return Object.assign({},Ws,n)};class q{constructor(t){this.tagname=t,this.child=[],this[":@"]={}}add(t,e){t==="__proto__"&&(t="#__proto__"),this.child.push({[t]:e})}addChild(t){t.tagname==="__proto__"&&(t.tagname="#__proto__"),t[":@"]&&Object.keys(t[":@"]).length>0?this.child.push({[t.tagname]:t.child,":@":t[":@"]}):this.child.push({[t.tagname]:t.child})}}function Ks(n,t){const e={};if(n[t+3]==="O"&&n[t+4]==="C"&&n[t+5]==="T"&&n[t+6]==="Y"&&n[t+7]==="P"&&n[t+8]==="E"){t=t+9;let s=1,o=!1,i=!1,r="";for(;t"){if(i?n[t-1]==="-"&&n[t-2]==="-"&&(i=!1,s--):s--,s===0)break}else n[t]==="["?o=!0:r+=n[t];if(s!==0)throw new Error("Unclosed DOCTYPE")}else throw new Error("Invalid Tag instead of DOCTYPE");return{entities:e,i:t}}function zs(n,t){let e="";for(;t0&&o&&e[2]!==".")return n;if(!t.leadingZeros&&i.length>0&&!o&&e[1]!==".")return n;if(t.leadingZeros&&i===n)return 0;{const l=Number(e),a=""+l;return a.search(/[eE]/)!==-1?t.eNotation?l:n:e.indexOf(".")!==-1?a==="0"&&r===""||a===r||o&&a==="-"+r?l:n:i?r===a||o+r===a?l:n:e===a||e===o+a?l:n}}else return n}}function so(n){return n&&n.indexOf(".")!==-1&&(n=n.replace(/0+$/,""),n==="."?n="0":n[0]==="."?n="0"+n:n[n.length-1]==="."&&(n=n.substr(0,n.length-1))),n}function oo(n,t){if(parseInt)return parseInt(n,t);if(Number.parseInt)return Number.parseInt(n,t);if(window&&window.parseInt)return window.parseInt(n,t);throw new Error("parseInt, Number.parseInt, window.parseInt are not supported")}function io(n){return typeof n=="function"?n:Array.isArray(n)?t=>{for(const e of n)if(typeof e=="string"&&t===e||e instanceof RegExp&&e.test(t))return!0}:()=>!1}class ro{constructor(t){this.options=t,this.currentNode=null,this.tagsNodeStack=[],this.docTypeEntities={},this.lastEntities={apos:{regex:/&(apos|#39|#x27);/g,val:"'"},gt:{regex:/&(gt|#62|#x3E);/g,val:">"},lt:{regex:/&(lt|#60|#x3C);/g,val:"<"},quot:{regex:/&(quot|#34|#x22);/g,val:'"'}},this.ampEntity={regex:/&(amp|#38|#x26);/g,val:"&"},this.htmlEntities={space:{regex:/&(nbsp|#160);/g,val:" "},cent:{regex:/&(cent|#162);/g,val:"¢"},pound:{regex:/&(pound|#163);/g,val:"£"},yen:{regex:/&(yen|#165);/g,val:"¥"},euro:{regex:/&(euro|#8364);/g,val:"€"},copyright:{regex:/&(copy|#169);/g,val:"©"},reg:{regex:/&(reg|#174);/g,val:"®"},inr:{regex:/&(inr|#8377);/g,val:"₹"},num_dec:{regex:/&#([0-9]{1,7});/g,val:(e,s)=>String.fromCharCode(Number.parseInt(s,10))},num_hex:{regex:/&#x([0-9a-fA-F]{1,6});/g,val:(e,s)=>String.fromCharCode(Number.parseInt(s,16))}},this.addExternalEntities=lo,this.parseXml=fo,this.parseTextData=ao,this.resolveNameSpace=co,this.buildAttributesMap=ho,this.isItStopNode=Eo,this.replaceEntitiesValue=To,this.readStopNodeData=Io,this.saveTextToParentTag=po,this.addChild=go,this.ignoreAttributesFn=io(this.options.ignoreAttributes)}}function lo(n){const t=Object.keys(n);for(let e=0;e0)){r||(n=this.replaceEntitiesValue(n));const l=this.options.tagValueProcessor(t,n,e,o,i);return l==null?n:typeof l!=typeof n||l!==n?l:this.options.trimValues?Le(n,this.options.parseTagValue,this.options.numberParseOptions):n.trim()===n?Le(n,this.options.parseTagValue,this.options.numberParseOptions):n}}function co(n){if(this.options.removeNSPrefix){const t=n.split(":"),e=n.charAt(0)==="/"?"/":"";if(t[0]==="xmlns")return"";t.length===2&&(n=e+t[1])}return n}const uo=new RegExp(`([^\\s=]+)\\s*(=\\s*(['"])([\\s\\S]*?)\\3)?`,"gm");function ho(n,t,e){if(this.options.ignoreAttributes!==!0&&typeof n=="string"){const s=pt(n,uo),o=s.length,i={};for(let r=0;r",i,"Closing Tag is not closed.");let a=n.substring(i+2,l).trim();if(this.options.removeNSPrefix){const f=a.indexOf(":");f!==-1&&(a=a.substr(f+1))}this.options.transformTagName&&(a=this.options.transformTagName(a)),e&&(s=this.saveTextToParentTag(s,e,o));const h=o.substring(o.lastIndexOf(".")+1);if(a&&this.options.unpairedTags.indexOf(a)!==-1)throw new Error(`Unpaired tag can not be used as closing tag: `);let u=0;h&&this.options.unpairedTags.indexOf(h)!==-1?(u=o.lastIndexOf(".",o.lastIndexOf(".")-1),this.tagsNodeStack.pop()):u=o.lastIndexOf("."),o=o.substring(0,u),e=this.tagsNodeStack.pop(),s="",i=l}else if(n[i+1]==="?"){let l=Oe(n,i,!1,"?>");if(!l)throw new Error("Pi Tag is not closed.");if(s=this.saveTextToParentTag(s,e,o),!(this.options.ignoreDeclaration&&l.tagName==="?xml"||this.options.ignorePiTags)){const a=new q(l.tagName);a.add(this.options.textNodeName,""),l.tagName!==l.tagExp&&l.attrExpPresent&&(a[":@"]=this.buildAttributesMap(l.tagExp,o,l.tagName)),this.addChild(e,a,o)}i=l.closeIndex+1}else if(n.substr(i+1,3)==="!--"){const l=W(n,"-->",i+4,"Comment is not closed.");if(this.options.commentPropName){const a=n.substring(i+4,l-2);s=this.saveTextToParentTag(s,e,o),e.add(this.options.commentPropName,[{[this.options.textNodeName]:a}])}i=l}else if(n.substr(i+1,2)==="!D"){const l=Ks(n,i);this.docTypeEntities=l.entities,i=l.i}else if(n.substr(i+1,2)==="!["){const l=W(n,"]]>",i,"CDATA is not closed.")-2,a=n.substring(i+9,l);s=this.saveTextToParentTag(s,e,o);let h=this.parseTextData(a,e.tagname,o,!0,!1,!0,!0);h==null&&(h=""),this.options.cdataPropName?e.add(this.options.cdataPropName,[{[this.options.textNodeName]:a}]):e.add(this.options.textNodeName,h),i=l+2}else{let l=Oe(n,i,this.options.removeNSPrefix),a=l.tagName;const h=l.rawTagName;let u=l.tagExp,f=l.attrExpPresent,p=l.closeIndex;this.options.transformTagName&&(a=this.options.transformTagName(a)),e&&s&&e.tagname!=="!xml"&&(s=this.saveTextToParentTag(s,e,o,!1));const m=e;if(m&&this.options.unpairedTags.indexOf(m.tagname)!==-1&&(e=this.tagsNodeStack.pop(),o=o.substring(0,o.lastIndexOf("."))),a!==t.tagname&&(o+=o?"."+a:a),this.isItStopNode(this.options.stopNodes,o,a)){let C="";if(u.length>0&&u.lastIndexOf("/")===u.length-1)a[a.length-1]==="/"?(a=a.substr(0,a.length-1),o=o.substr(0,o.length-1),u=a):u=u.substr(0,u.length-1),i=l.closeIndex;else if(this.options.unpairedTags.indexOf(a)!==-1)i=l.closeIndex;else{const j=this.readStopNodeData(n,h,p+1);if(!j)throw new Error(`Unexpected end of ${h}`);i=j.i,C=j.tagContent}const b=new q(a);a!==u&&f&&(b[":@"]=this.buildAttributesMap(u,o,a)),C&&(C=this.parseTextData(C,a,o,!0,f,!0,!0)),o=o.substr(0,o.lastIndexOf(".")),b.add(this.options.textNodeName,C),this.addChild(e,b,o)}else{if(u.length>0&&u.lastIndexOf("/")===u.length-1){a[a.length-1]==="/"?(a=a.substr(0,a.length-1),o=o.substr(0,o.length-1),u=a):u=u.substr(0,u.length-1),this.options.transformTagName&&(a=this.options.transformTagName(a));const C=new q(a);a!==u&&f&&(C[":@"]=this.buildAttributesMap(u,o,a)),this.addChild(e,C,o),o=o.substr(0,o.lastIndexOf("."))}else{const C=new q(a);this.tagsNodeStack.push(e),a!==u&&f&&(C[":@"]=this.buildAttributesMap(u,o,a)),this.addChild(e,C,o),e=C}s="",i=p}}else s+=n[i];return t.child};function go(n,t,e){const s=this.options.updateTag(t.tagname,e,t[":@"]);s===!1||(typeof s=="string"&&(t.tagname=s),n.addChild(t))}const To=function(n){if(this.options.processEntities){for(let t in this.docTypeEntities){const e=this.docTypeEntities[t];n=n.replace(e.regx,e.val)}for(let t in this.lastEntities){const e=this.lastEntities[t];n=n.replace(e.regex,e.val)}if(this.options.htmlEntities)for(let t in this.htmlEntities){const e=this.htmlEntities[t];n=n.replace(e.regex,e.val)}n=n.replace(this.ampEntity.regex,this.ampEntity.val)}return n};function po(n,t,e,s){return n&&(s===void 0&&(s=t.child.length===0),n=this.parseTextData(n,t.tagname,e,!1,t[":@"]?Object.keys(t[":@"]).length!==0:!1,s),n!==void 0&&n!==""&&t.add(this.options.textNodeName,n),n=""),n}function Eo(n,t,e){const s="*."+e;for(const o in n){const i=n[o];if(s===i||t===i)return!0}return!1}function So(n,t,e=">"){let s,o="";for(let i=t;i",e,`${t} is not closed`);if(n.substring(e+2,i).trim()===t&&(o--,o===0))return{tagContent:n.substring(s,e),i};e=i}else if(n[e+1]==="?")e=W(n,"?>",e+1,"StopNode is not closed.");else if(n.substr(e+1,3)==="!--")e=W(n,"-->",e+3,"StopNode is not closed.");else if(n.substr(e+1,2)==="![")e=W(n,"]]>",e,"StopNode is not closed.")-2;else{const i=Oe(n,e,">");i&&((i&&i.tagName)===t&&i.tagExp[i.tagExp.length-1]!=="/"&&o++,e=i.closeIndex)}}function Le(n,t,e){if(t&&typeof n=="string"){const s=n.trim();return s==="true"?!0:s==="false"?!1:no(n,e)}else return Fs(n)?n:""}function Co(n,t){return Et(n,t)}function Et(n,t,e){let s;const o={};for(let i=0;i0&&(o[t.textNodeName]=s):s!==void 0&&(o[t.textNodeName]=s),o}function mo(n){const t=Object.keys(n);for(let e=0;e"},{regex:/&(lt|#60|#x3c|#x3C);/g,val:"<"},{regex:/&(quot|#34|#x22);/g,val:'"'}],No=new Set(["BPMNShape.Bounds","BPMNShape.BPMNLabel.Bounds","BPMNEdge.BPMNLabel.Bounds","BPMNEdge.waypoint"].map(n=>`definitions.BPMNDiagram.BPMNPlane.${n}`)),_o=new Set(["x","y","width","height"]),yo=(n,t)=>No.has(t)&&_o.has(n);class wo{constructor(t){g(this,"x2jOptions",{attributeNamePrefix:"",removeNSPrefix:!0,ignoreAttributes:!1,parseAttributeValue:!0,processEntities:!1,attributeValueProcessor:(t,e,s)=>yo(t,s)?Number(e):this.processAttribute(e)});g(this,"xmlParser",new Oo(this.x2jOptions));this.options=t}parse(t){let e;try{e=this.xmlParser.parse(t)}catch{throw new Error("XML parsing failed. Invalid BPMN source.")}if(!e.definitions)throw new Error("XML parsing failed. Unable to retrieve 'definitions' from the BPMN source.");return e}processAttribute(t){var e;for(const s of Lo)t=t.replace(s.regex,s.val);return(e=this.options)!=null&&e.additionalXmlAttributeProcessor&&(t=this.options.additionalXmlAttributeProcessor(t)),t}}class Ro{constructor(t,e){this.jsonParser=t,this.xmlParser=e}parse(t){const e=this.xmlParser.parse(t);return this.jsonParser.parse(e)}}function bo(n){return new Ro(ys(new ns(n)),new wo(n))}function Fo(n){return new Po(n)}class Po{constructor(t){this.graph=t}updateAndRefreshCssClassesOfCell(t,e){this.updateAndRefreshCssClassesOfElement(t,e),this.updateAndRefreshCssClassesOfElement(we(t),e)}updateAndRefreshCssClassesOfElement(t,e){const s=this.graph.getModel(),o=s.getCell(t);if(!o)return;let i=o.getStyle();i=R(i,I.EXTRA_CSS_CLASSES,e.join(",")),s.setStyle(o,i)}}function ko(n){return new Bo(Fo(n),new Mo)}class Bo{constructor(t,e){this.cssClassesUpdater=t,this.cssClassesCache=e}clearCache(){this.cssClassesCache.clear()}addCssClasses(t,e){this.updateCssClasses(t,e,this.cssClassesCache.addClassNames)}removeCssClasses(t,e){this.updateCssClasses(t,e,this.cssClassesCache.removeClassNames)}removeAllCssClasses(t){if(t||t=="")for(const e of S(t)){const s=this.cssClassesCache.removeAllClassNames(e);this.updateCellIfChanged(s,e)}else{const e=this.cssClassesCache.getBpmnIds();this.cssClassesCache.clear();for(const s of e)this.updateCellIfChanged(!0,s)}}toggleCssClasses(t,e){this.updateCssClasses(t,e,this.cssClassesCache.toggleClassNames)}updateCssClasses(t,e,s){const o=S(e);for(const i of S(t))this.updateCellIfChanged(s(i,o),i)}updateCellIfChanged(t,e){if(t){const s=this.cssClassesCache.getClassNames(e);this.cssClassesUpdater.updateAndRefreshCssClassesOfCell(e,s)}}}class Mo{constructor(){g(this,"classNamesByBpmnId",new Map);g(this,"clear",()=>{this.classNamesByBpmnId.clear()});g(this,"addClassNames",(t,e)=>this.updateClassNames(t,e,(s,o)=>s.add(o)));g(this,"removeClassNames",(t,e)=>this.updateClassNames(t,e,(s,o)=>s.delete(o)));g(this,"toggleClassNames",(t,e)=>(this.updateClassNames(t,e,(s,o)=>s.has(o)?s.delete(o):s.add(o)),e&&e.length>0))}getClassNames(t){return this.classNamesByBpmnId.has(t)?[...this.classNamesByBpmnId.get(t)]:[]}getBpmnIds(){return[...this.classNamesByBpmnId.keys()]}removeAllClassNames(t){const e=this.getOrInitializeClassNames(t),s=e.size;return e.clear(),e.sizexo.get(n.position),Go=(n,t)=>{t&&(n.fill.color=t.color??n.fill.color,n.fill.opacity=t.opacity??n.fill.opacity)},Vo=(n,t)=>{t&&(n.stroke.color=t.color??n.stroke.color,n.stroke.width=t.width??n.stroke.width)},Do=(n,t)=>{t&&(n.font.color=t.color??n.font.color,n.font.size=t.size??n.font.size)},Uo=n=>{const t={fill:{color:T.DEFAULT_OVERLAY_FILL_COLOR.valueOf(),opacity:T.DEFAULT_OVERLAY_FILL_OPACITY.valueOf()},stroke:{color:T.DEFAULT_OVERLAY_STROKE_COLOR.valueOf(),width:T.DEFAULT_OVERLAY_STROKE_WIDTH.valueOf()},font:{color:T.DEFAULT_OVERLAY_FONT_COLOR.valueOf(),size:T.DEFAULT_OVERLAY_FONT_SIZE.valueOf()}},e=n.style,s={...t};return e&&(Go(s,e.fill),Vo(s,e.stroke),Do(s,e.font)),s};class Wo{convert(t){const e=Yo(t),s=Uo(t);return{position:e,style:s}}}function Ho(n){return new Ko(n,new Wo)}class Ko{constructor(t,e){this.graph=t,this.overlayConverter=e}addOverlays(t,e){const s=this.graph.getModel().getCell(t);if(s)for(const o of S(e)){const i=new ct(o.label,this.overlayConverter.convert(o));this.graph.addCellOverlay(s,i)}}removeAllOverlays(t){const e=this.graph.getModel().getCell(t);e&&this.graph.removeCellOverlays(e)}}function zo(n){return new Xo(Ho(n))}class Xo{constructor(t){this.overlaysUpdater=t}addOverlays(t,e){this.overlaysUpdater.addOverlays(t,e)}removeAllOverlays(t){this.overlaysUpdater.removeAllOverlays(t)}}class Zo{element(t){return`svg > g > g > g[data-bpmn-id="${t}"]`}elementsOfKind(t){return`svg > g > g > g.${t}:not(.bpmn-label)`}}function jo(n){return new $o(n,new qo(n.getModel()))}const qe=n=>{const t=S(n);return t.push(...t.map(e=>we(e))),t};class $o{constructor(t,e){this.graph=t,this.styleManager=e}clear(){this.styleManager.clear()}updateStyle(t,e){if(!e)return;const s=this.graph.getModel(),o=qe(t).map(i=>s.getCell(i)).filter(Boolean);o.length!==0&&this.graph.batchUpdate(()=>{for(const i of o){this.styleManager.ensureStyleIsStored(i);let r=i.getStyle();r=R(r,c.STYLE_OPACITY,e.opacity,he),r=zt(r,e.stroke),r=Xt(r,e.font),qt(e)&&(r=$t(r,e.fill)),s.setStyle(i,r)}})}resetStyle(t){this.graph.batchUpdate(()=>{if(t||t=="")for(const e of qe(t))this.styleManager.resetStyleIfIsStored(e);else this.styleManager.resetAllStyles()})}}const Qe=I.EXTRA_CSS_CLASSES;class qo{constructor(t){g(this,"stylesCache",new Map);this.model=t}clear(){this.stylesCache.clear()}resetAllStyles(){for(const t of this.stylesCache.keys())this.resetStyle(t,this.stylesCache.get(t))}resetStyleIfIsStored(t){const e=this.stylesCache.get(t);e&&this.resetStyle(t,e)}resetStyle(t,e){const s=this.model.getCell(t),o=Zt(s.getStyle(),Qe,""),i=R(e,Qe,o);this.model.setStyle(s,i),this.stylesCache.delete(t)}ensureStyleIsStored(t){const e=t.getId();this.stylesCache.has(e)||this.stylesCache.set(e,t.getStyle())}}function Qo(n){return new Jo(jo(n))}class Jo{constructor(t){this.styleUpdater=t}clearCache(){this.styleUpdater.clear()}updateStyle(t,e){this.styleUpdater.updateStyle(t,e)}resetStyle(t){this.styleUpdater.resetStyle(t)}}function ei(n,t){return new ti(n,new ni(t.container,new Zo),ko(t),zo(t),Qo(t))}class ti{constructor(t,e,s,o,i){this.bpmnModelRegistry=t,this.htmlElementRegistry=e,this.cssClassesRegistry=s,this.overlaysRegistry=o,this.styleRegistry=i,this.bpmnModelRegistry.registerOnLoadCallback(()=>{this.cssClassesRegistry.clearCache(),this.styleRegistry.clearCache()})}getModelElementsByIds(t){return ge(t).map(e=>this.bpmnModelRegistry.getBpmnSemantic(e)).filter(Boolean)}getElementsByIds(t){return this.getModelElementsByIds(t).map(e=>({bpmnSemantic:e,htmlElement:this.htmlElementRegistry.getBpmnHtmlElement(e.id)}))}getModelElementsByKinds(t){return ge(t).flatMap(e=>this.htmlElementRegistry.getBpmnHtmlElements(e)).map(e=>this.getRelatedBpmnSemantic(e))}getElementsByKinds(t){return ge(t).flatMap(e=>this.htmlElementRegistry.getBpmnHtmlElements(e)).map(e=>({htmlElement:e,bpmnSemantic:this.getRelatedBpmnSemantic(e)}))}getRelatedBpmnSemantic(t){return this.bpmnModelRegistry.getBpmnSemantic(t.dataset.bpmnId)}addCssClasses(t,e){this.cssClassesRegistry.addCssClasses(t,e)}removeCssClasses(t,e){this.cssClassesRegistry.removeCssClasses(t,e)}removeAllCssClasses(t){this.cssClassesRegistry.removeAllCssClasses(t)}toggleCssClasses(t,e){this.cssClassesRegistry.toggleCssClasses(t,e)}addOverlays(t,e){this.overlaysRegistry.addOverlays(t,e)}removeAllOverlays(t){this.overlaysRegistry.removeAllOverlays(t)}updateStyle(t,e){this.styleRegistry.updateStyle(t,e)}resetStyle(t){this.styleRegistry.resetStyle(t)}}class ni{constructor(t,e){this.container=t,this.querySelectors=e}getBpmnHtmlElement(t){return this.container.querySelector(this.querySelectors.element(t))}getBpmnHtmlElements(t){const e=this.querySelectors.elementsOfKind(Ce(t));return[...this.container.querySelectorAll(e)]}}const ge=n=>[...new Set(S(n))];class si{filter(t,e){const s=[],o=[];for(const m of S(e==null?void 0:e.pools).filter(C=>C&&Object.keys(C).length>0))m.id?s.push(m.id):m.name&&o.push(m.name);if(s.length===0&&o.length===0)return t;const{filteredPools:i,filteredPoolIds:r}=oi(t,s,o),l=[...s,...r],{filteredLanes:a,filteredLaneIds:h,filteredFlowNodes:u,filteredFlowNodeIds:f}=St(t.lanes,t.flowNodes,l),p=ri(t.edges,[...l,...h,...f]);if(i.length===0&&a.length===0&&u.length===0&&p.length===0){let m=s.length>0?` for ids [${s}]`:"";const C=m?" and":"";throw m+=o.length>0?`${C} for names [${o}]`:"",new Error("No matching pools"+m)}return{lanes:a,flowNodes:u,pools:i,edges:p}}}function oi(n,t,e){const s=n.pools.filter(i=>t.includes(i.bpmnElement.id)||e.includes(i.bpmnElement.name)),o=s.map(i=>i.bpmnElement.id);return{filteredPools:s,filteredPoolIds:o}}function St(n,t,e){const{filteredLanes:s,filteredLaneIds:o}=It(n,e),{filteredLanes:i,filteredLaneIds:r,filteredFlowNodes:l,filteredFlowNodeIds:a}=ii(t,[...e,...o],n);return s.push(...i),o.push(...r),{filteredLanes:s,filteredLaneIds:o,filteredFlowNodes:l,filteredFlowNodeIds:a}}function It(n,t){const e=n.filter(o=>t.includes(o.bpmnElement.parentId)),s=e.map(o=>o.bpmnElement.id);if(e.length>0){const{filteredLanes:o,filteredLaneIds:i}=It(n,s);e.push(...o),s.push(...i)}return{filteredLanes:e,filteredLaneIds:s}}function ii(n,t,e){const s=n.filter(h=>t.includes(h.bpmnElement.parentId));if(s.length===0)return{filteredLanes:[],filteredLaneIds:[],filteredFlowNodes:[],filteredFlowNodeIds:[]};const o=s.map(h=>h.bpmnElement.id),{filteredLanes:i,filteredLaneIds:r,filteredFlowNodes:l,filteredFlowNodeIds:a}=St(e,n,o);return s.push(...l),o.push(...a),{filteredLanes:i,filteredLaneIds:r,filteredFlowNodes:s,filteredFlowNodeIds:o}}function ri(n,t){return n.filter(e=>t.includes(e.bpmnElement.sourceReferenceId)&&t.includes(e.bpmnElement.targetReferenceId))}class li{constructor(){g(this,"searchableModel");g(this,"onLoadCallback")}load(t,e){var o;const s=new si().filter(t,e);return this.searchableModel=new ci(s),(o=this.onLoadCallback)==null||o.call(this),ai(s)}registerOnLoadCallback(t){this.onLoadCallback=t}getBpmnSemantic(t){var i;const e=(i=this.searchableModel)==null?void 0:i.elementById(t);if(!e)return;const s=e.bpmnElement,o=s instanceof M;return{id:t,isShape:o,kind:s.kind,name:s.name,...s instanceof ue?{sourceRefId:s.sourceReferenceId,targetRefId:s.targetReferenceId}:{callActivityGlobalTaskKind:s instanceof H?s.globalTaskKind:void 0,callActivityKind:s instanceof H?s.callActivityKind:void 0,eventDefinitionKind:s instanceof D?s.eventDefinitionKind:void 0,linkEventSourceIds:s instanceof Se&&s.eventDefinitionKind==y.LINK?s.sourceIds:void 0,linkEventTargetId:s instanceof Ie?s.targetId:void 0,incomingIds:s.incomingIds,outgoingIds:s.outgoingIds,parentId:s.parentId,subProcessKind:s instanceof ne?s.subProcessKind:void 0}}}}function ai(n){const t=new Set(n.flowNodes.filter(i=>{const r=i.bpmnElement;return E.isSubProcess(r.kind)&&r.markers.includes(_.EXPAND)}).map(i=>i.bpmnElement.id)),e=[],s=[],o=[];for(const i of n.flowNodes){const r=i.bpmnElement.kind;E.isSubProcess(r)?e.push(i):E.isBoundaryEvent(r)?s.push(i):t.has(i.bpmnElement.parentId)||o.push(i)}return{boundaryEvents:s,edges:n.edges,lanes:n.lanes,otherFlowNodes:o,pools:n.pools,subprocesses:e}}class ci{constructor(t){g(this,"elements",new Map);for(const e of[...t.pools,...t.lanes,...t.flowNodes,...t.edges])this.elements.set(e.bpmnElement.id,e)}elementById(t){return this.elements.get(t)}}class ui{constructor(t){g(this,"graph");g(this,"navigation");g(this,"bpmnElementsRegistry");g(this,"bpmnModelRegistry");g(this,"parserOptions");g(this,"rendererOptions");this.rendererOptions=t==null?void 0:t.renderer;const e=new Jn(Pt(t==null?void 0:t.container));this.graph=e.configure(t),this.navigation=new es(this.graph),this.bpmnModelRegistry=new li,this.bpmnElementsRegistry=ei(this.bpmnModelRegistry,this.graph),this.parserOptions=t==null?void 0:t.parser}load(t,e){const s=bo(this.parserOptions).parse(t),o=this.bpmnModelRegistry.load(s,e==null?void 0:e.modelFilter);ln(this.graph,this.rendererOptions).render(o,e==null?void 0:e.fit)}}function bi(n){document.readyState==="complete"||document.readyState==="interactive"?setTimeout(n,1):document.addEventListener("DOMContentLoaded",n)}function A(n,...t){ke("[DEMO]",n,...t)}function ke(n,t,...e){console.info(`${n} ${t}`,...e)}function F(n,...t){ke("[DEMO STARTUP]",n,...t)}function Ct(n,t){mt(n),window.alert(n)}function mt(n){console.error("[DEMO]",n)}function z(n,...t){ke("[DEMO DOWNLOAD]",n,...t)}async function di(n){A(`Fetching BPMN content from url ${n}`);const t=await fetch(n);if(!t.ok)throw new Error(`HTTP status ${t.status}`);return await t.text()}function At(n,t,e){const s=document.createElement("a");t.startsWith("data:image/svg+xml")&&(e=encodeURIComponent(e),t+=","),s.setAttribute("href",t+e),s.setAttribute("download",n),s.style.display="none",document.body.append(s),s.click(),s.remove()}function hi(n){z("Start SVG download"),At("diagram.svg","data:image/svg+xml",n),z("Download completed")}function fi(n){z("Start PNG download");const t=new Blob([n],{type:"image/svg+xml;charset=utf-8"}),e=URL.createObjectURL(t),s=document.createElement("img");s.setAttribute("style","position: absolute; top: -9999px"),s.crossOrigin="anonymous",document.body.append(s);const o=document.createElement("canvas"),i=o.getContext("2d");s.addEventListener("load",function(){const r=new Image;o.width=s.naturalWidth,o.height=s.naturalHeight,r.crossOrigin="Anonymous",r.addEventListener("load",function(){i.drawImage(r,0,0),URL.revokeObjectURL(e);const l=o.toDataURL("image/png");s.remove(),At("diagram.png","",l),z("Download completed")}),r.src=s.src}),s.src=e}class gi{constructor(t,e,s,o){g(this,"document");g(this,"head");this.window=t,this.outerContainerId=e,this.containerToFade=s,this.dropCallback=o,this.document=t.document,this.head=document.head,this.initializeDragAndDrop()}initializeDragAndDrop(){this.containerToFade.classList.add("faded-container"),this.addDomElements(this.containerToFade),this.addStyle();const t=document.querySelector(`#${this.outerContainerId}`);this.preventDefaultsOnEvents(["dragover","drop"],this.window),this.preventDefaultsOnEvents(["dragover","dragleave","drop"],t),this.addEventsOnDropContainer(t,this.containerToFade),this.addEventsOnDocument(this.outerContainerId,this.containerToFade)}preventDefaults(t){t.preventDefault(),t.stopPropagation()}preventDefaultsOnEvents(t,e){for(const s of t)e.addEventListener(s,this.preventDefaults.bind(this),!1)}addDomElements(t){const e=this.document.createElement("p");e.textContent="open BPMN diagram";const s=this.document.createElement("div");s.classList.add("drop-here-text"),s.append(e);const o=this.document.createElement("div");o.id=this.outerContainerId,o.append(s),t.parentNode.prepend(o)}addStyle(){const t=` +var kt=Object.defineProperty;var Mt=(n,e,t)=>e in n?kt(n,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[e]=t;var f=(n,e,t)=>Mt(n,typeof e!="symbol"?e+"":e,t);import{g as Bt,r as xt}from"./mxgraph.js";(function(){const e=document.createElement("link").relList;if(e&&e.supports&&e.supports("modulepreload"))return;for(const o of document.querySelectorAll('link[rel="modulepreload"]'))s(o);new MutationObserver(o=>{for(const i of o)if(i.type==="childList")for(const r of i.addedNodes)r.tagName==="LINK"&&r.rel==="modulepreload"&&s(r)}).observe(document,{childList:!0,subtree:!0});function t(o){const i={};return o.integrity&&(i.integrity=o.integrity),o.referrerPolicy&&(i.referrerPolicy=o.referrerPolicy),o.crossOrigin==="use-credentials"?i.credentials="include":o.crossOrigin==="anonymous"?i.credentials="omit":i.credentials="same-origin",i}function s(o){if(o.ep)return;o.ep=!0;const i=t(o);fetch(o.href,i)}})();var te=(n=>(n.None="None",n.HorizontalVertical="HorizontalVertical",n.Horizontal="Horizontal",n.Vertical="Vertical",n.Center="Center",n))(te||{}),Yt=(n=>(n.In="in",n.Out="out",n))(Yt||{});function Vt(n){return n instanceof HTMLElement?n:document.querySelector(`#${n}`)}var h=(n=>(n.LANE="lane",n.POOL="pool",n.CALL_ACTIVITY="callActivity",n.SUB_PROCESS="subProcess",n.TASK="task",n.TASK_USER="userTask",n.TASK_SERVICE="serviceTask",n.TASK_RECEIVE="receiveTask",n.TASK_SEND="sendTask",n.TASK_MANUAL="manualTask",n.TASK_SCRIPT="scriptTask",n.TASK_BUSINESS_RULE="businessRuleTask",n.GLOBAL_TASK="globalTask",n.GLOBAL_TASK_USER="globalUserTask",n.GLOBAL_TASK_MANUAL="globalManualTask",n.GLOBAL_TASK_SCRIPT="globalScriptTask",n.GLOBAL_TASK_BUSINESS_RULE="globalBusinessRuleTask",n.GROUP="group",n.TEXT_ANNOTATION="textAnnotation",n.GATEWAY_PARALLEL="parallelGateway",n.GATEWAY_EXCLUSIVE="exclusiveGateway",n.GATEWAY_INCLUSIVE="inclusiveGateway",n.GATEWAY_EVENT_BASED="eventBasedGateway",n.GATEWAY_COMPLEX="complexGateway",n.EVENT_START="startEvent",n.EVENT_END="endEvent",n.EVENT_INTERMEDIATE_CATCH="intermediateCatchEvent",n.EVENT_INTERMEDIATE_THROW="intermediateThrowEvent",n.EVENT_BOUNDARY="boundaryEvent",n))(h||{}),ne=(n=>(n.CALLING_PROCESS="process",n.CALLING_GLOBAL_TASK="global task",n))(ne||{}),se=(n=>(n.Exclusive="Exclusive",n.None="None",n.Parallel="Parallel",n))(se||{}),w=(n=>(n.NONE="none",n.TERMINATE="terminate",n.CANCEL="cancel",n.COMPENSATION="compensate",n.CONDITIONAL="conditional",n.ERROR="error",n.ESCALATION="escalation",n.LINK="link",n.MESSAGE="message",n.SIGNAL="signal",n.TIMER="timer",n))(w||{}),y=(n=>(n.ADHOC="adhoc",n.COMPENSATION="compensation",n.EXPAND="expand",n.LOOP="loop",n.MULTI_INSTANCE_PARALLEL="multi-parallel",n.MULTI_INSTANCE_SEQUENTIAL="multi-sequential",n))(y||{}),Y=(n=>(n.AD_HOC="adhoc",n.EMBEDDED="embedded",n.EVENT="event",n.TRANSACTION="transaction",n))(Y||{});function Gt(n,e){return n===""?e?{}:void 0:n}function E(n,e=!1){return n==null?[]:(Array.isArray(n)?n:[n]).map(t=>Gt(t,e)).filter(Boolean)}function Dt(n,e,t){const s=[];t!=null&&t.startingWith?s.push(`^(${t.startingWith}).*`):t!=null&&t.notStartingWith&&s.push(`^(?!(${t.notStartingWith})).*`),s.push(`${e}$`);const o=s.join("");return n.filter(i=>t!=null&&t.ignoreCase?new RegExp(o,"i").test(i):new RegExp(o).test(i))}class p{static isEvent(e){return le(He,e)}static eventKinds(){return[...He]}static isBoundaryEvent(e){return h.EVENT_BOUNDARY===e}static isStartEvent(e){return h.EVENT_START===e}static isCatchEvent(e){return h.EVENT_INTERMEDIATE_CATCH===e||h.EVENT_BOUNDARY===e||h.EVENT_START===e}static isIntermediateCatchEvent(e){return h.EVENT_INTERMEDIATE_CATCH===e}static isIntermediateThrowEvent(e){return h.EVENT_INTERMEDIATE_THROW===e}static isCallActivity(e){return h.CALL_ACTIVITY===e}static isSubProcess(e){return h.SUB_PROCESS===e}static canHaveNoneEvent(e){return h.EVENT_INTERMEDIATE_THROW===e||h.EVENT_END===e||h.EVENT_START===e}static isActivity(e){return le(Ae,e)}static activityKinds(){return[...Ae]}static isWithDefaultSequenceFlow(e){return Ut.has(e)}static isTask(e){return le(me,e)}static taskKinds(){return[...me]}static gatewayKinds(){return[...Ke]}static isGateway(e){return le(Ke,e)}static flowNodeKinds(){return Object.values(h).filter(e=>!p.isPoolOrLane(e))}static isPoolOrLane(e){return e==h.POOL||e==h.LANE}}function Fe(n,e){return Dt(Object.values(h),n,e)}function le(n,e){return Object.values(n).map(t=>t).includes(e)}const He=Fe("Event"),Ke=Fe("Gateway"),me=Fe("Task",{ignoreCase:!0,notStartingWith:"global"}),Ae=[...me,h.CALL_ACTIVITY,h.SUB_PROCESS],Ut=new Set([...Ae,h.GATEWAY_EXCLUSIVE,h.GATEWAY_INCLUSIVE,h.GATEWAY_COMPLEX]),rt=Object.values(w).filter(n=>n!=w.NONE);var $=(n=>(n.NONE="None",n.ONE="One",n.BOTH="Both",n))($||{}),k=(n=>(n.SEQUENCE_FLOW="sequenceFlow",n.MESSAGE_FLOW="messageFlow",n.ASSOCIATION_FLOW="association",n))(k||{}),oe=(n=>(n.NONE="none",n.INITIATING="initiating",n.NON_INITIATING="non_initiating",n))(oe||{}),x=(n=>(n.NORMAL="normal",n.DEFAULT="default",n.CONDITIONAL_FROM_ACTIVITY="conditional_from_activity",n.CONDITIONAL_FROM_GATEWAY="conditional_from_gateway",n))(x||{});class Te{constructor(e,t,s,o,i){this.id=e,this.name=t,this.kind=s,this.sourceReferenceId=o,this.targetReferenceId=i}}class lt extends Te{constructor(e,t,s,o,i=x.NORMAL){super(e,t,k.SEQUENCE_FLOW,s,o),this.sequenceFlowKind=i}}class at extends Te{constructor(e,t,s,o){super(e,t,k.MESSAGE_FLOW,s,o)}}class ct extends Te{constructor(e,t,s,o,i=$.NONE){super(e,t,k.ASSOCIATION_FLOW,s,o),this.associationDirectionKind=i}}var Wt=xt();const Ht=Bt(Wt),O=Xt(),Kt=O.mxCellRenderer,zt=O.mxClient,c=O.mxConstants,V=O.mxEvent,ze=O.mxPerimeter,P=O.mxPoint,ve=O.mxRectangle,Pe=O.mxRectangleShape,ke=O.mxSvgCanvas2D,A=O.mxUtils;function Xt(){return window.mxForceIncludes=!1,window.mxLoadResources=!1,window.mxLoadStylesheets=!1,window.mxResourceExtension=".txt",Ht({})}class $t{constructor(e){this.graph=e}computeRelativeCoordinates(e,t){const s=this.getTranslateForRoot(e),o=t.x+s.x,i=t.y+s.y;return new P(o,i)}getTranslateForRoot(e){const t=this.graph.getModel(),s=new P(0,0);for(;e!=null;){const o=t.getGeometry(e);o!=null&&(s.x-=o.x,s.y-=o.y),e=t.getParent(e)}return s}computeEdgeCenter(e){const t=e.geometry.points,s=t[0],o=t.at(-1),i=o.x-s.x,r=o.y-s.y;return new P(s.x+i/2,s.y+r/2)}}class ue{constructor(e,t,s,o,i){f(this,"extensions",{});this.id=e,this.bpmnElement=t,this.bounds=s,this.label=o,this.isHorizontal=i}}class B{constructor(e,t,s,o,i=!1){f(this,"incomingIds",[]);f(this,"outgoingIds",[]);this.id=e,this.name=t,this.kind=s,this.parentId=o,this.instantiate=i}}class pe extends B{constructor(e,t,s,o,i,r=[]){super(e,t,s,o,i),this.markers=r}}class X extends pe{constructor(e,t,s,o,i,r){super(e,t,h.CALL_ACTIVITY,o,void 0,i),this.callActivityKind=s,this.globalTaskKind=r}}class ie extends pe{constructor(e,t,s,o,i){s==Y.AD_HOC&&!i.includes(y.ADHOC)&&i.push(y.ADHOC),super(e,t,h.SUB_PROCESS,o,void 0,i),this.subProcessKind=s}}class U extends B{constructor(e,t,s,o,i){super(e,t,s,i),this.eventDefinitionKind=o}}class Oe extends U{constructor(t,s,o,i){super(t,s,h.EVENT_INTERMEDIATE_CATCH,o,i);f(this,"sourceIds",[])}}class Le extends U{constructor(t,s,o,i){super(t,s,h.EVENT_INTERMEDIATE_THROW,o,i);f(this,"targetId")}}class ut extends U{constructor(e,t,s,o,i){super(e,t,h.EVENT_START,s,o),this.isInterrupting=i}}class dt extends U{constructor(e,t,s,o,i=!0){super(e,t,h.EVENT_BOUNDARY,s,o),this.isInterrupting=i}}class ht extends B{constructor(e,t,s,o,i=se.None){super(e,t,h.GATEWAY_EVENT_BASED,s,o),this.gatewayKind=i}}function de(n,e,t,s){return Math.min(Math.max(n??s,e),t)}function Zt(n){return Math.max(n??0,0)}function jt(n){const e=n??{};return e.debounceDelay=de(e.debounceDelay,0,100,50),e.throttleDelay=de(e.throttleDelay,0,100,50),e}function Ee(n){return n=="default"?void 0:de(n,0,100,100)}function qt(n){return n=="default"?void 0:de(n,1,50,1)}const S={EDGE:"bpmn.edge",EDGE_START_FILL_COLOR:"bpmn.edge.startFillColor",EDGE_END_FILL_COLOR:"bpmn.edge.endFillColor",EVENT_BASED_GATEWAY_KIND:"bpmn.gatewayKind",EVENT_DEFINITION_KIND:"bpmn.eventDefinitionKind",GLOBAL_TASK_KIND:"bpmn.globalTaskKind",SUB_PROCESS_KIND:"bpmn.subProcessKind",IS_INITIATING:"bpmn.isInitiating",IS_INSTANTIATING:"bpmn.isInstantiating",IS_INTERRUPTING:"bpmn.isInterrupting",EXTRA_CSS_CLASSES:"bpmn.extra.css.classes",MARKERS:"bpmn.markers",MESSAGE_FLOW_ICON:"bpmn.messageFlowIcon"},ft={ARROW_DASH:"bpmn.dash"},T={STROKE_WIDTH_THIN:2,STROKE_WIDTH_THICK:5,SHAPE_ACTIVITY_BOTTOM_MARGIN:7,SHAPE_ACTIVITY_TOP_MARGIN:7,SHAPE_ACTIVITY_LEFT_MARGIN:7,SHAPE_ACTIVITY_MARKER_ICON_MARGIN:5,SHAPE_ACTIVITY_MARKER_ICON_SIZE:20,POOL_LABEL_SIZE:30,POOL_LABEL_FILL_COLOR:"none",LANE_LABEL_SIZE:30,LANE_LABEL_FILL_COLOR:"none",SUB_PROCESS_TRANSACTION_INNER_RECT_OFFSET:4,SUB_PROCESS_TRANSACTION_INNER_RECT_ARC_SIZE:6,TEXT_ANNOTATION_BORDER_LENGTH:10,TEXT_ANNOTATION_FILL_COLOR:"none",GROUP_FILL_COLOR:"none",DEFAULT_FILL_COLOR:"White",DEFAULT_STROKE_COLOR:"Black",DEFAULT_FONT_FAMILY:"Arial, Helvetica, sans-serif",DEFAULT_FONT_SIZE:11,DEFAULT_FONT_COLOR:"Black",DEFAULT_MARGIN:0,SHAPE_ARC_SIZE:20,DEFAULT_OVERLAY_FILL_COLOR:"White",DEFAULT_OVERLAY_FILL_OPACITY:100,DEFAULT_OVERLAY_STROKE_COLOR:"Black",DEFAULT_OVERLAY_STROKE_WIDTH:1,DEFAULT_OVERLAY_FONT_SIZE:11,DEFAULT_OVERLAY_FONT_COLOR:"Black",SEQUENCE_FLOW_CONDITIONAL_FROM_ACTIVITY_MARKER_FILL_COLOR:"White",MESSAGE_FLOW_MARKER_START_FILL_COLOR:"White",MESSAGE_FLOW_MARKER_END_FILL_COLOR:"White"},gt=n=>A.getValue(n,S.IS_INSTANTIATING,"false")=="true",he=n=>n=="default"?void 0:n,Qt=(n,e)=>(e&&(n=b(n,c.STYLE_STROKECOLOR,e.color,he),n=b(n,c.STYLE_STROKE_OPACITY,e.opacity,Ee),n=b(n,c.STYLE_STROKEWIDTH,e.width,qt)),n),b=(n,e,t,s=o=>o)=>t==null?n:A.setStyle(n,e,s(t)),ae=(n,e,t,s)=>s==null?n:A.setStyleFlag(n,e,t,s),Jt=(n,e)=>(e&&(n=b(n,c.STYLE_FONTCOLOR,e.color,he),n=b(n,c.STYLE_FONTSIZE,e.size),n=b(n,c.STYLE_FONTFAMILY,e.family),n=ae(n,c.STYLE_FONTSTYLE,c.FONT_BOLD,e.isBold),n=ae(n,c.STYLE_FONTSTYLE,c.FONT_ITALIC,e.isItalic),n=ae(n,c.STYLE_FONTSTYLE,c.FONT_UNDERLINE,e.isUnderline),n=ae(n,c.STYLE_FONTSTYLE,c.FONT_STRIKETHROUGH,e.isStrikeThrough),n=b(n,c.STYLE_TEXT_OPACITY,e.opacity,Ee)),n),en=(n,e,t)=>(n==null?void 0:n.split(";").map(s=>s.split("=")).filter(([s])=>s===e).map(([,s])=>s)[0])??t,tn=n=>{switch(n){case"right-to-left":return c.DIRECTION_WEST;case"bottom-to-top":return c.DIRECTION_NORTH;case"top-to-bottom":return c.DIRECTION_SOUTH;default:return c.DIRECTION_EAST}},nn=(n,e)=>{const t=e.color;if(t){const s=on(t),o=s?t.startColor:t;n=b(n,c.STYLE_FILLCOLOR,o,he),s?(n=A.setStyle(n,c.STYLE_GRADIENTCOLOR,t.endColor),n=A.setStyle(n,c.STYLE_GRADIENT_DIRECTION,tn(t.direction))):t==="default"&&(n=A.setStyle(n,c.STYLE_GRADIENTCOLOR,void 0),n=A.setStyle(n,c.STYLE_GRADIENT_DIRECTION,void 0)),(n.includes(h.POOL)||n.includes(h.LANE))&&(n=b(n,c.STYLE_SWIMLANE_FILLCOLOR,o,he))}return n=b(n,c.STYLE_FILL_OPACITY,e.opacity,Ee),n},sn=n=>n&&typeof n=="object"&&"fill"in n,on=n=>n&&typeof n=="object";class rn{constructor(e){f(this,"ignoreBpmnColors");this.ignoreBpmnColors=(e==null?void 0:e.ignoreBpmnColors)??!0}computeStyle(e,t){const s=[e.bpmnElement.kind];let o;e instanceof ue?o=this.computeShapeStyleValues(e):(s.push(...cn(e)),o=this.computeEdgeStyleValues(e));const i=this.computeFontStyleValues(e),r=un(e,t);return s.push(...Xe([...o,...i,...r])),s.join(";")}computeShapeStyleValues(e){const t=new Map,s=e.bpmnElement;if(s instanceof U?ln(s,t):s instanceof pe?an(s,t):p.isPoolOrLane(s.kind)?t.set(c.STYLE_HORIZONTAL,e.isHorizontal?"0":"1"):s instanceof ht&&(t.set(S.IS_INSTANTIATING,String(s.instantiate)),t.set(S.EVENT_BASED_GATEWAY_KIND,String(s.gatewayKind))),!this.ignoreBpmnColors){const o=e.extensions,i=o.fillColor;i&&(t.set(c.STYLE_FILLCOLOR,i),p.isPoolOrLane(s.kind)&&t.set(c.STYLE_SWIMLANE_FILLCOLOR,i)),o.strokeColor&&t.set(c.STYLE_STROKECOLOR,o.strokeColor)}return t}computeEdgeStyleValues(e){const t=new Map;if(!this.ignoreBpmnColors){const s=e.extensions;s.strokeColor&&t.set(c.STYLE_STROKECOLOR,s.strokeColor)}return t}computeFontStyleValues(e){var o,i;const t=new Map,s=(o=e.label)==null?void 0:o.font;if(s&&(t.set(c.STYLE_FONTFAMILY,s.name),t.set(c.STYLE_FONTSIZE,s.size),t.set(c.STYLE_FONTSTYLE,dn(s))),!this.ignoreBpmnColors){const r=(i=e.label)==null?void 0:i.extensions;r!=null&&r.color&&t.set(c.STYLE_FONTCOLOR,r.color)}return t}computeMessageFlowIconStyle(e){const t=[];return t.push(["shape",S.MESSAGE_FLOW_ICON],[S.IS_INITIATING,String(e.messageVisibleKind===oe.INITIATING)]),this.ignoreBpmnColors||e.extensions.strokeColor&&t.push([c.STYLE_STROKECOLOR,e.extensions.strokeColor]),Xe(t).join(";")}}function ln(n,e){e.set(S.EVENT_DEFINITION_KIND,n.eventDefinitionKind),(n instanceof dt||n instanceof ut&&n.isInterrupting!==void 0)&&e.set(S.IS_INTERRUPTING,String(n.isInterrupting))}function an(n,e){n instanceof ie?e.set(S.SUB_PROCESS_KIND,n.subProcessKind):n.kind===h.TASK_RECEIVE?e.set(S.IS_INSTANTIATING,String(n.instantiate)):n instanceof X&&e.set(S.GLOBAL_TASK_KIND,n.globalTaskKind);const t=n.markers;t.length>0&&e.set(S.MARKERS,t.join(","))}function cn(n){const e=[],t=n.bpmnElement;return t instanceof lt&&e.push(t.sequenceFlowKind),t instanceof ct&&e.push(t.associationDirectionKind),e}function un(n,e){const t=new Map,s=n.bpmnElement;return e?(t.set(c.STYLE_VERTICAL_ALIGN,c.ALIGN_TOP),n.bpmnElement.kind!=h.TEXT_ANNOTATION&&t.set(c.STYLE_ALIGN,c.ALIGN_CENTER),n instanceof ue&&(t.set(c.STYLE_LABEL_WIDTH,e.width+1),t.set(c.STYLE_LABEL_POSITION,"ignore"),t.set(c.STYLE_VERTICAL_LABEL_POSITION,c.ALIGN_MIDDLE))):n instanceof ue&&(s instanceof ie||s instanceof X&&s.callActivityKind===ne.CALLING_PROCESS)&&!s.markers.includes(y.EXPAND)&&t.set(c.STYLE_VERTICAL_ALIGN,c.ALIGN_TOP),t}function dn(n){let e=0;return n.isBold&&(e+=c.FONT_BOLD),n.isItalic&&(e+=c.FONT_ITALIC),n.isStrikeThrough&&(e+=c.FONT_STRIKETHROUGH),n.isUnderline&&(e+=c.FONT_UNDERLINE),e}function Xe(n){return n.filter(([,e])=>e&&e!="undefined").map(([e,t])=>`${e}=${t}`)}class hn{constructor(e,t,s){this.graph=e,this.coordinatesTranslator=t,this.styleComputer=s}render(e){this.insertShapesAndEdges(e)}insertShapesAndEdges({pools:e,lanes:t,subprocesses:s,otherFlowNodes:o,boundaryEvents:i,edges:r}){this.graph.batchUpdate(()=>{this.graph.getModel().clear(),this.insertShapes(e),this.insertShapes(t),this.insertShapes(s),this.insertShapes(o),this.insertShapes(i),this.insertEdges(r)})}insertShapes(e){for(const t of e)this.insertShape(t)}getParent(e){return this.getCell(e.parentId)??this.graph.getDefaultParent()}insertShape(e){var l;const t=e.bpmnElement,s=this.getParent(t),o=e.bounds;let i=(l=e.label)==null?void 0:l.bounds;i=p.isPoolOrLane(t.kind)?void 0:i;const r=this.styleComputer.computeStyle(e,i);this.insertVertex(s,t.id,t.name,o,i,r)}insertEdges(e){var t;for(const s of e){const o=s.bpmnElement,i=this.graph.getDefaultParent(),r=this.getCell(o.sourceReferenceId),l=this.getCell(o.targetReferenceId),a=(t=s.label)==null?void 0:t.bounds,d=this.styleComputer.computeStyle(s,a),u=this.graph.insertEdge(i,o.id,o.name,r,l,d);if(this.insertWaypoints(s.waypoints,u),a){u.geometry.width=a.width,u.geometry.height=a.height;const g=this.coordinatesTranslator.computeEdgeCenter(u);u.geometry.relative=!1;const I=this.coordinatesTranslator.computeRelativeCoordinates(u.parent,new P(a.x,a.y)),C=I.x+a.width/2-g.x,L=I.y-g.y;u.geometry.offset=new P(C,L)}this.insertMessageFlowIconIfNeeded(s,u)}}insertMessageFlowIconIfNeeded(e,t){if(e.bpmnElement instanceof at&&e.messageVisibleKind!==oe.NONE){const s=this.graph.insertVertex(t,Me(t.id),void 0,0,0,20,14,this.styleComputer.computeMessageFlowIconStyle(e));s.geometry.relative=!0,s.geometry.offset=new P(-10,-7)}}insertWaypoints(e,t){e&&(t.geometry.points=e.map(s=>this.coordinatesTranslator.computeRelativeCoordinates(t.parent,new P(s.x,s.y))))}getCell(e){return this.graph.getModel().getCell(e)}insertVertex(e,t,s,o,i,r){const l=this.coordinatesTranslator.computeRelativeCoordinates(e,new P(o.x,o.y)),a=this.graph.insertVertex(e,t,s,l.x,l.y,o.width,o.height,r);if(i){const d=i.x-o.x,u=i.y-o.y;a.geometry.offset=new P(d,u)}return a}}function fn(n,e){return new hn(n,new $t(n),new rn(e))}function Me(n){return`messageFlowIcon_of_${n}`}class Tt extends O.mxCellOverlay{constructor(t,s){super(null,"",s.position.horizontalAlign,s.position.verticalAlign,null,"default");f(this,"style");this.label=t,this.style=s.style}getBounds(t){const s=t.view.graph.getModel().isEdge(t.cell),o=t.view.scale;let i;const r=0,l=0;return s?i=this.computeEdgeBounds(t):(i=new P,this.align==c.ALIGN_LEFT?i.x=t.x:this.align==c.ALIGN_CENTER?i.x=t.x+t.width/2:i.x=t.x+t.width,this.verticalAlign==c.ALIGN_TOP?i.y=t.y:this.verticalAlign==c.ALIGN_MIDDLE?i.y=t.y+t.height/2:i.y=t.y+t.height),new ve(Math.round(i.x-(r*this.defaultOverlap-this.offset.x)*o),Math.round(i.y-(l*this.defaultOverlap-this.offset.y)*o),r*o,l*o)}computeEdgeBounds(t){const s=t.absolutePoints;if(this.align==c.ALIGN_LEFT)return s[0];if(this.align==c.ALIGN_CENTER){if(s.length%2==1)return s[Math.floor(s.length/2)];{const o=s.length/2,i=s[o-1],r=s[o];return new P(i.x+(r.x-i.x)/2,i.y+(r.y-i.y)/2)}}else return s.at(-1)}}class $e extends O.mxText{constructor(e,t,s){super(e,t,void 0,void 0,s.font.color,void 0,s.font.size,void 0,void 0,void 0,void 0,void 0,void 0,void 0,s.fill.color,s.stroke.color),this.fillOpacity=s.fill.opacity,this.strokewidth=s.stroke.width}}function gn(n){return Object.values(k).map(e=>e).includes(n)}function Tn(n,e){return pn(n.style,e)}function pn(n,e){const t=[],s=n.split(";"),i=s[0].replace(/shape=bpmn./g,""),r=new Map;r.set("bpmn-type-activity",p.isActivity(i)),r.set("bpmn-type-container",p.isPoolOrLane(i)),r.set("bpmn-type-event",p.isEvent(i)),r.set("bpmn-type-flow",gn(i)),r.set("bpmn-type-gateway",p.isGateway(i)),r.set("bpmn-type-task",p.isTask(i));for(const[l]of[...r].filter(([,a])=>a))t.push(l);t.push(Ne(i));for(const[l,a]of s.map(d=>{const u=d.split("=");return[u[0],u[1]]}))switch(l){case S.EVENT_DEFINITION_KIND:{t.push(`bpmn-event-def-${a}`);break}case S.EVENT_BASED_GATEWAY_KIND:{t.push(`bpmn-gateway-kind-${a.toLowerCase()}`);break}case S.IS_INITIATING:{t.push(a=="true"?"bpmn-icon-initiating":"bpmn-icon-non-initiating");break}case S.SUB_PROCESS_KIND:{t.push(`bpmn-sub-process-${a.toLowerCase()}`);break}case S.GLOBAL_TASK_KIND:{t.push(Ne(a));break}}return e&&t.push("bpmn-label"),t}function Ne(n){return n?"bpmn-"+n.replace(/([A-Z])/g,e=>"-"+e[0].toLowerCase()):""}const Ze=function(n){const e=n.createSvgCanvas;n.createSvgCanvas=function(){var o;const t=e.bind(this)(),s=t.getTextCss;if(t.getTextCss=function(){const i=this.pointerEvents;this.pointerEvents=!1;const r=s.bind(this)();return this.pointerEvents=i,r},(o=this.state)!=null&&o.cell){const i=this.state.cell,r=Tn(i,this.dialect===c.DIALECT_STRICTHTML),l=this.state.style[S.EXTRA_CSS_CLASSES];typeof l=="string"&&r.push(...l.split(",")),this.node.setAttribute("class",r.join(" ")),this.node.dataset.bpmnId=this.state.cell.id}return t}};class En extends O.mxCellRenderer{constructor(e){super(),this.iconPainter=e}createCellOverlays(e){const s=e.view.graph.getCellOverlays(e.cell);let o=null;if(s!=null){o=new O.mxDictionary;for(const i of s){const r=e.overlays==null?null:e.overlays.remove(i);if(r!=null){o.put(i,r);continue}let l;i instanceof Tt?l=new $e(i.label,new ve(0,0,0,0),i.style):(l=new O.mxImageShape(new ve(0,0,0,0),i.image.src),l.preserveImageAspect=!1),l.dialect=e.view.graph.dialect,l.overlay=i,this.initializeOverlay(e,l),this.installCellOverlayListeners(e,i,l),i.cursor!=null&&(l.node.style.cursor=i.cursor),l instanceof $e&&(l.node.classList.add("overlay-badge"),l.node.dataset.bpmnId=e.cell.id),o.put(i,l)}}e.overlays!=null&&e.overlays.visit(function(i,r){r.destroy()}),e.overlays=o}createShape(e){const t=super.createShape(e);return"iconPainter"in t&&(t.iconPainter=this.iconPainter),Ze(t),t}createLabel(e,t){super.createLabel(e,t),Ze(e.text)}}function Sn(n,e,t,s){let o,i;n.heightC.setIconOriginForIconCentered(),shapeConfig:{x:e,y:t,width:s,height:o,strokeWidth:d},iconStyleConfig:{isFilled:l,fillColor:u,strokeColor:g,strokeWidth:a,margin:I}}}class Cn{newBpmnCanvas({canvas:e,ratioFromParent:t,setIconOriginFunct:s,shapeConfig:o,iconStyleConfig:i},r){return new In({canvas:e,shapeConfig:o,iconConfig:{originalSize:r,styleConfig:i,ratioFromParent:t,setIconOriginFunct:s}})}paintEnvelopeIcon(e){const t={width:485.41,height:321.76},s=this.newBpmnCanvas(e,t),o=t.width,i=t.height;s.rect(0,0,o,i),s.fillAndStroke();const{iconStyleConfig:r}=e;r.isFilled&&s.setStrokeColor(r.fillColor),s.begin(),s.moveTo(0,0),s.lineTo(o*.5,i*.6),s.lineTo(o,0),s.moveTo(0,i),s.lineTo(o/3,i*.45),s.moveTo(o,i),s.lineTo(o*2/3,i*.45),s.stroke()}paintCircleIcon(e){const t={width:e.shapeConfig.width,height:e.shapeConfig.height},s=this.newBpmnCanvas(e,t),o=t.width,i=t.height;o>0&&i>0&&s.ellipse(0,0,o,i),e.iconStyleConfig.isFilled?s.fillAndStroke():s.stroke()}paintClockIcon(e){const t=this.newBpmnCanvas(e,{height:152,width:152});t.begin(),t.moveTo(184,60),t.curveTo(188.4,60,192,56.4,192,52),t.lineTo(192,48),t.curveTo(192,40,188.4,40,184,40),t.curveTo(179.6,40,176,43.6,176,48),t.lineTo(176,52),t.curveTo(176,56.4,179.6,60,184,60),t.close(),t.moveTo(184,308),t.curveTo(179.6,308,176,311.6,176,316),t.lineTo(176,320),t.curveTo(176,324.4,179.6,328,184,328),t.curveTo(188.4,328,192,324.4,192,320),t.lineTo(192,316),t.curveTo(192,311.6,188.4,308,184,308),t.close(),t.moveTo(52,176),t.lineTo(48,176),t.curveTo(43.6,176,40,179.6,40,184),t.curveTo(40,188.4,43.6,192,48,192),t.lineTo(52,192),t.curveTo(56.4,192,69,188.4,60,184),t.curveTo(60,179.6,56.4,176,52,176),t.close(),t.moveTo(320,176),t.lineTo(316,176),t.curveTo(311.6,176,308,179.6,308,184),t.curveTo(308,188.4,311.6,192,316,192),t.lineTo(320,192),t.curveTo(324.4,192,328,188.4,328,184),t.curveTo(328,179.6,324.4,176,320,176),t.moveTo(93.6,82.4),t.curveTo(90.4,79.2,85.6,79.2,82.4,82.4),t.curveTo(79.2,85.6,79.2,90.4,82.4,93.6),t.lineTo(85.2,96.4),t.curveTo(86.8,98,88.8,98.8,90.8,98.8),t.curveTo(92.8,98.8,94.4,98,96.4,96.4),t.curveTo(99.6,93.2,99.6,88.4,96.4,85.2),t.lineTo(93.6,82.4),t.moveTo(85.2,271.6),t.lineTo(82.4,274.4),t.curveTo(79.2,277.6,79.2,282.4,82.4,285.6),t.curveTo(84,287.2,86,288,88,288),t.curveTo(90,288,92,287.2,93.6,285.6),t.lineTo(96.4,282.8),t.curveTo(99.6,279.6,99.6,274.8,96.4,271.6),t.curveTo(93.2,268.4,88.4,268.4,85.2,271.6),t.moveTo(274.4,82.4),t.lineTo(271.6,85.2),t.curveTo(268.4,88.4,268.4,93.2,271.6,96.4),t.curveTo(273.298,98,275.2,98.8,277.2,98.8),t.curveTo(279.2,98.8,281.2,98,282.8,96.4),t.lineTo(285.6,93.6),t.curveTo(288.8,90.4,288.8,85.6,285.6,82.4),t.curveTo(282.4,79.2,277.6,79.2,274.4,82.4),t.moveTo(192,180.8),t.lineTo(192,108),t.curveTo(192,103.6,188.4,100,184,100),t.curveTo(179.6,100,176,103.6,176,108),t.lineTo(176,184),t.curveTo(176,186,176.8,188,178.4,189.6),t.lineTo(266,277.2),t.curveTo(267.6,278.8,269.6,279.6,271.6,279.6),t.curveTo(273.6,279.6,275.6,278.8,277.2,277.2),t.curveTo(280.4,274,280.4,269.2,277.2,266),t.lineTo(192,180.8),t.moveTo(184,0),t.curveTo(82.4,0,0,82.4,0,184),t.curveTo(0,285.6,82.4,368,184,368),t.curveTo(285.6,368,368,285.6,368,184),t.curveTo(368,82.4,285.6,0,184,0),t.moveTo(184,352),t.curveTo(91.2,352,16,276.8,16,184),t.curveTo(16,91.2,91.2,16,184,16),t.curveTo(276.8,16,352,91.2,352,184),t.curveTo(352,276.8,276.8,352,184,352),t.fillAndStroke()}paintTriangleIcon(e){const t=this.newBpmnCanvas(e,{height:735,width:849});t.begin(),t.moveTo(497,55),t.lineTo(817,609),t.curveTo(849,665,808,735,744,735),t.lineTo(105,735),t.curveTo(40,735,0,665,32,609),t.lineTo(352,55),t.curveTo(384,0,465,0,497,55),t.close(),t.fillAndStroke()}paintUpArrowheadIcon(e){const t=this.newBpmnCanvas(e,{height:50,width:40});t.begin(),t.moveTo(0,49.5),t.lineTo(19.5,1),t.curveTo(19.75,.25,20,0,20.25,.25),t.lineTo(40,49.5),t.curveTo(40,49.5,39.75,50,39.6,49.75),t.lineTo(20,30),t.lineTo(.4,49.75),t.curveTo(.4,49.75,.25,50,0,49.5),t.close(),t.fillAndStroke()}paintDoubleLeftArrowheadsIcon(e){const t=this.newBpmnCanvas(e,{height:53.5,width:105});t.begin(),t.moveTo(91.4,0),t.curveTo(91.4,0,91.2,0,91,.2),t.lineTo(50,25),t.curveTo(47.9,25.8,46.7,26.6,46.4,27.3),t.lineTo(46.4,0),t.curveTo(46.4,0,46.2,0,46,.2),t.lineTo(4.9,25),t.curveTo(2,26.2,0,27.3,4.9,28.5),t.lineTo(45.8,53),t.curveTo(46,53.3,46.2,53.5,46.4,53.5),t.lineTo(46.4,27),t.curveTo(46.6,27.3,47.8,28.1,49.9,29.9),t.lineTo(90.8,53.3),t.curveTo(91,53.3,91.2,53.5,91.4,53.5),t.lineTo(91.4,0),t.close(),t.fillAndStroke()}drawCrossIcon(e){const t=this.newBpmnCanvas(e,{height:1,width:1});return t.begin(),t.moveTo(.38,0),t.lineTo(.62,0),t.lineTo(.62,.38),t.lineTo(1,.38),t.lineTo(1,.62),t.lineTo(.62,.62),t.lineTo(.62,1),t.lineTo(.38,1),t.lineTo(.38,.62),t.lineTo(0,.62),t.lineTo(0,.38),t.lineTo(.38,.38),t.close(),t}paintListIcon(e){const t=this.newBpmnCanvas(e,{height:60,width:60});t.begin(),t.moveTo(0,0),t.lineTo(60,0),t.lineTo(60,60),t.lineTo(0,60),t.lineTo(0,0),t.close(),t.moveTo(5,5),t.lineTo(55,5),t.close(),t.moveTo(5,21.6),t.lineTo(55,21.6),t.close(),t.moveTo(5,38.3),t.lineTo(55,38.3),t.close(),t.moveTo(5,55),t.lineTo(55,55),t.close(),t.fillAndStroke()}paintXCrossIcon(e){const t=this.drawCrossIcon(e);t.rotateOnIconCenter(45),t.fillAndStroke()}paintPlusCrossIcon(e){this.drawCrossIcon(e).fillAndStroke()}paintAsteriskIcon(e){const t=this.newBpmnCanvas(e,{height:1,width:1});Se(t),t.fillAndStroke(),Se(t),t.rotateOnIconCenter(60),t.fillAndStroke(),Se(t),t.rotateOnIconCenter(240),t.fillAndStroke()}paintPersonIcon(e){const t=this.newBpmnCanvas({...e,iconStyleConfig:{...e.iconStyleConfig,isFilled:!0}},{height:239.68,width:143.61});t.begin(),t.moveTo(124.31,150.29),t.lineTo(99.66,141.03),t.arcTo(6.43,6.43,0,0,1,95.51,135.03),t.lineTo(95.51,130.66),t.arcTo(47.75,47.75,0,0,0,119.51,89.25),t.lineTo(119.51,71.25),t.arcTo(47.62,47.62,0,0,0,101.18,33.64),t.arcTo(29.35,29.35,0,0,0,101.52,29.14),t.arcTo(29.68,29.68,0,0,0,42.17,29.14),t.arcTo(29.24,29.24,0,0,0,42.53,33.63),t.arcTo(47.65,47.65,0,0,0,24.14,71.23),t.lineTo(24.14,89.23),t.arcTo(47.7,47.7,0,0,0,48.19,130.63),t.lineTo(48.19,135.03),t.arcTo(6.43,6.43,0,0,1,44.03,141.03),t.lineTo(19.31,150.29),t.arcTo(29.81,29.81,0,0,0,.09,178.03),t.lineTo(.09,233.51),t.arcTo(5.63,5.63,0,1,0,11.34,233.51),t.lineTo(11.34,178.03),t.arcTo(18.19,18.19,0,0,1,11.57,175.17),t.lineTo(20.5,184.11),t.arcTo(12.32,12.32,0,0,1,24.14,192.89),t.lineTo(24.14,233.51),t.arcTo(5.63,5.63,0,1,0,35.39,233.51),t.lineTo(35.39,192.93),t.arcTo(23.5,23.5,0,0,0,28.46,176.2),t.lineTo(17.04,164.78),t.arcTo(18.34,18.34,0,0,1,23.29,160.78),t.lineTo(43.65,153.15),t.lineTo(66.22,175.72),t.lineTo(66.22,233.51),t.arcTo(5.63,5.63,0,1,0,77.47,233.51),t.lineTo(77.47,175.76),t.lineTo(100.04,153.19),t.lineTo(120.4,160.82),t.arcTo(18.39,18.39,0,0,1,126.65,164.82),t.lineTo(115.24,176.24),t.arcTo(23.5,23.5,0,0,0,108.31,192.93),t.lineTo(108.31,233.55),t.arcTo(5.63,5.63,0,1,0,119.56,233.55),t.lineTo(119.56,192.93),t.arcTo(12.35,12.35,0,0,1,123.19,184.15),t.lineTo(132.13,175.22),t.arcTo(18,18,0,0,1,132.36,178.08),t.lineTo(132.36,233.56),t.arcTo(5.63,5.63,0,0,0,143.61,233.56),t.lineTo(143.61,178.03),t.arcTo(29.81,29.81,0,0,0,124.31,150.29),t.close(),t.moveTo(71.85,10.72),t.arcTo(18.46,18.46,0,0,1,90.17,27.18),t.arcTo(47.68,47.68,0,0,0,53.53,27.18),t.arcTo(18.44,18.44,0,0,1,71.85,10.72),t.close(),t.moveTo(35.39,71.23),t.arcTo(36.46,36.46,0,0,1,108.31,71.23),t.lineTo(108.31,77.4),t.curveTo(82.12,75.4,56.97,60.55,56.71,60.4),t.arcTo(5.62,5.62,0,0,0,48.78,62.71),t.curveTo(46.24,67.79,40.45,71.89,35.39,74.62),t.close(),t.moveTo(35.39,89.23),t.lineTo(35.39,87.08),t.curveTo(40.55,84.85,49.73,80.08,55.67,72.66),t.curveTo(64.83,77.46,85.92,87.21,108.31,88.66),t.lineTo(108.31,89.24),t.arcTo(36.46,36.46,0,1,1,35.39,89.24),t.close(),t.moveTo(71.85,165.45),t.lineTo(54.06,147.69),t.arcTo(17.7,17.7,0,0,0,59.43,135.32),t.arcTo(47.57,47.57,0,0,0,84.27,135.32),t.arcTo(17.7,17.7,0,0,0,89.64,147.69),t.close(),t.fill()}paintGearIcon(e){const t=this.newBpmnCanvas(e,{height:100,width:100});mn(t),t.translateIconOrigin(14,14),An(t)}paintExpandIcon(e){const t={width:16,height:16},s=this.newBpmnCanvas(e,t),o=t.width,i=t.height;s.roundrect(0,0,o,i,2,2),s.stroke(),s.begin(),s.moveTo(o/2,i/4),s.lineTo(o/2,i*3/4),s.close(),s.moveTo(o/4,i/2),s.lineTo(o*3/4,i/2),s.close(),s.fillAndStroke()}paintLoopIcon(e){const{iconStyleConfig:t}=e;t.fillColor=t.strokeColor;const s=this.newBpmnCanvas(e,{width:22.49,height:21.62});s.begin(),s.moveTo(5.5,19.08),s.arcTo(8,8,0,1,1,10.5,21.08),s.stroke(),s.begin(),s.moveTo(7.5,14.08),s.lineTo(5.75,19.08),s.lineTo(0,17.08),s.close(),s.fillAndStroke()}paintSequentialMultiInstanceIcon(e){const t={width:16,height:16},s=this.newBpmnCanvas(e,t),{canvas:o,iconStyleConfig:i}=e;o.setFillColor(i.strokeColor);const r=t.width,l=t.height/5;s.rect(0,0,r,l),s.fill(),s.rect(0,2*l,r,l),s.fill(),s.rect(0,4*l,r,l),s.fill()}paintParallelMultiInstanceIcon(e){const t={width:16,height:16},s=this.newBpmnCanvas(e,t),{canvas:o,iconStyleConfig:i}=e;o.setFillColor(i.strokeColor);const r=t.width/5,l=t.height;s.begin(),s.rect(0,0,r,l),s.fill(),s.rect(2*r,0,r,l),s.fill(),s.rect(4*r,0,r,l),s.fill()}paintRightArrowIcon(e){const t=this.newBpmnCanvas(e,{width:512,height:415.23});t.setRoundLineJoin(),t.begin(),t.moveTo(512,207.61),t.lineTo(304.38,0),t.lineTo(304.38,135.39),t.lineTo(0,135.39),t.lineTo(0,279.84),t.lineTo(304.38,279.84),t.lineTo(304.38,415.23),t.lineTo(512,207.61),t.close(),t.fillAndStroke()}paintErrorIcon(e){const t=this.newBpmnCanvas(e,{width:72.44,height:71.82});t.begin(),t.moveTo(0,53.32),t.lineTo(19.48,0),t.lineTo(19.48,0),t.lineTo(50.85,40.07),t.lineTo(72.44,18.21),t.lineTo(53.12,71.82),t.lineTo(22.5,31.37),t.close(),t.fillAndStroke()}paintHandIcon(e){const t=this.newBpmnCanvas(e,{width:343.65,height:354.12});t.begin(),t.moveTo(231.66,336.39),t.curveTo(240.84,316.9,220.53,306.92,220.53,306.92),t.curveTo(215.2,303.67,188.58,287.43,140.67,258.19),t.lineTo(146.33,248.39),t.curveTo(223.98,269.38,267.12,281.04,275.75,283.38),t.curveTo(275.75,283.38,297.25,288,301.42,267.77),t.curveTo(306.34,245.29,288.32,238.63,288.32,238.63),t.curveTo(279.91,236.44,237.86,225.48,162.18,205.75),t.lineTo(165.2,194.8),t.curveTo(255.88,204.4,306.27,209.73,316.34,210.8),t.curveTo(316.34,210.8,339.89,212.16,341.76,189.55),t.curveTo(343.65,166.93,320.5,164.13,320.5,164.13),t.curveTo(310.43,163.1,260.04,157.99,169.35,148.77),t.lineTo(169.35,138.97),t.curveTo(253.41,132.12,300.11,128.32,309.45,127.56),t.curveTo(309.45,127.56,332.27,122.38,332.27,102.61),t.curveTo(332.27,82.85,305.48,81.87,305.48,81.87),t.curveTo(293.99,82.2,236.54,83.88,133.13,86.9),t.lineTo(127.61,81.87),t.curveTo(145.3,59.39,155.12,46.9,157.09,44.41),t.curveTo(157.09,44.41,171.12,26.8,156.78,12.72),t.curveTo(143.83,0,124.08,14.49,124.08,14.49),t.curveTo(116.45,19.41,78.35,44.06,9.77,88.43),t.lineTo(0,251.94),t.curveTo(122.84,308.79,191.09,340.37,204.74,346.69),t.curveTo(204.74,346.69,222.91,354.12,231.66,336.39),t.fillAndStroke()}paintScriptIcon(e){e.iconStyleConfig.fillColor=e.iconStyleConfig.strokeColor;const t=this.newBpmnCanvas(e,{width:458.75,height:461.64});t.begin(),t.moveTo(67.85,.57),t.curveTo(50.73,0,33.26,8.86,22.35,18.84),t.curveTo(8.11,32.15,0,50.77,0,70.26),t.curveTo(0,73.15,0,87.59,0,113.6),t.curveTo(55.4,113.6,86.18,113.6,92.33,113.6),t.curveTo(94.92,150.46,85.64,180.4,74.22,211.27),t.curveTo(40.16,298.07,30.77,339.83,55.56,410.87),t.curveTo(63.72,438.26,87.59,457.85,114.91,461.09),t.curveTo(216.96,460.85,294.9,461.64,388.41,461.2),t.curveTo(407.2,461.09,425.14,453.55,438.3,440.13),t.curveTo(451.46,426.71,458.75,403.06,458.46,384.26),t.curveTo(458.43,382.23,458.18,365.93,458.15,363.89),t.curveTo(432.12,364.24,406.09,364.04,380.06,364.04),t.curveTo(377.61,347.52,377.24,337.58,378.28,324.48),t.curveTo(380.5,296.47,389.08,273.36,398.59,247.1),t.curveTo(408.11,220.83,418.41,191.47,420.86,154.24),t.curveTo(422.11,135.34,421.4,110.24,417.77,86.75),t.curveTo(417.76,86.71,417.73,86.54,417.69,86.22),t.curveTo(417.64,85.95,417.61,85.79,417.6,85.76),t.curveTo(414.03,68.13,410.49,48.84,399.79,31.47),t.curveTo(389.09,14.11,366.95,.59,341.75,.59),t.curveTo(286.97,.59,122.63,.57,67.85,.57),t.close(),t.moveTo(85.04,72.68),t.curveTo(80.63,72.68,45.33,72.68,40.92,72.68),t.curveTo(40.46,58.4,47.15,51.87,50.27,48.75),t.curveTo(55.8,44.28,59.84,41,73.82,41),t.curveTo(78.45,52.13,82.23,62.71,85.04,72.68),t.close(),t.moveTo(364.94,52.9),t.curveTo(370,61.11,373.9,76.44,377.38,93.51),t.curveTo(380.35,113.1,381.01,136.42,380.02,151.57),t.curveTo(377.97,182.76,369.51,207.12,360.1,233.1),t.curveTo(350.69,259.09,340.27,286.77,337.53,321.27),t.curveTo(336.38,335.86,336.72,346.69,338.87,364.01),t.curveTo(326.35,364.01,263.75,364.01,151.06,364.01),t.curveTo(151.06,382.2,151.06,392.31,151.06,394.33),t.curveTo(147.77,404.8,138.9,418.2,127.43,419.94),t.curveTo(111.49,422.35,97.86,411.8,94.75,399.19),t.curveTo(65.14,321.99,94.93,275.54,112.57,225.47),t.curveTo(130.14,177.95,137.92,117.41,112.71,42.09),t.curveTo(192.88,41.9,274.33,42.21,342.89,41.98),t.curveTo(357.15,42.03,359.83,44.61,364.94,52.9),t.close(),t.moveTo(409.96,399.48),t.curveTo(409.96,408.42,398.54,425.67,392.02,425.67),t.curveTo(325.19,425.79,252.29,425.67,185.23,425.67),t.curveTo(189.88,424.43,194.66,405.64,194.66,399.48),t.curveTo(237.72,399.48,388.43,399.48,409.96,399.48),t.close(),t.fill(),t.begin(),t.moveTo(182.1,131.2),t.lineTo(182.1,151.68),t.lineTo(321.89,151.68),t.lineTo(321.89,131.2),t.lineTo(182.1,131.2),t.close(),t.moveTo(162.25,251.09),t.lineTo(162.25,271.49),t.lineTo(301.96,271.49),t.lineTo(301.96,251.09),t.lineTo(162.25,251.09),t.close(),t.fill()}paintTableIcon(e){const t=this.newBpmnCanvas(e,{width:640,height:640});t.begin(),t.moveTo(.19,.1),t.lineTo(298.78,.1),t.lineTo(298.78,198.88),t.lineTo(.19,198.88),t.lineTo(.19,.1),t.close(),t.fillAndStroke(),t.begin(),t.moveTo(0,0),t.lineTo(298.78,0),t.lineTo(298.78,48.88),t.lineTo(0,48.88),t.lineTo(0,0),t.close(),t.fillAndStroke(),t.begin(),t.moveTo(0,48.88),t.lineTo(98.78,48.88),t.lineTo(98.78,198.88),t.lineTo(0,198.88),t.lineTo(0,48.88),t.close(),t.fillAndStroke(),t.begin(),t.moveTo(1.09,122.69),t.lineTo(298.78,122.69),t.close(),t.fillAndStroke(),t.setFillColor(e.iconStyleConfig.strokeColor),t.begin(),t.moveTo(0,0),t.lineTo(298.78,0),t.lineTo(298.78,48.88),t.lineTo(0,48.88),t.lineTo(0,0),t.close(),t.fillAndStroke()}paintPentagon(e){const t=this.newBpmnCanvas(e,{width:16,height:16});t.begin(),t.moveTo(16,6.5),t.lineTo(8,0),t.lineTo(0,6.5),t.lineTo(3,16),t.lineTo(13,16),t.lineTo(16,6.5),t.lineTo(8,0),t.stroke()}}function Se(n){n.begin(),n.moveTo(.38,0),n.lineTo(.62,0),n.lineTo(.62,1),n.lineTo(.38,1),n.close()}function mn(n){n.begin(),n.moveTo(2.06,24.62),n.lineTo(10.17,30.95),n.lineTo(9.29,37.73),n.lineTo(0,41.42),n.lineTo(2.95,54.24),n.lineTo(13.41,52.92),n.lineTo(17.39,58.52),n.lineTo(13.56,67.66),n.lineTo(24.47,74.44),n.lineTo(30.81,66.33),n.lineTo(37.88,67.21),n.lineTo(41.57,76.5),n.lineTo(54.24,73.55),n.lineTo(53.06,62.94),n.lineTo(58.52,58.52),n.lineTo(67.21,63.09),n.lineTo(74.58,51.88),n.lineTo(66.03,45.25),n.lineTo(66.92,38.62),n.lineTo(76.5,34.93),n.lineTo(73.7,22.26),n.lineTo(62.64,23.44),n.lineTo(58.81,18.42),n.lineTo(62.79,8.7),n.lineTo(51.74,2.21),n.lineTo(44.81,10.47),n.lineTo(38.03,9.43),n.lineTo(33.75,0),n.lineTo(21.52,3.24),n.lineTo(22.7,13.56),n.lineTo(18.13,17.54),n.lineTo(8.7,13.56),n.close(),_e(n,24.8,39)}function An(n){n.begin(),n.moveTo(16.46,41.42),n.lineTo(24.57,47.75),n.lineTo(23.69,54.53),n.lineTo(14.4,58.22),n.lineTo(17.35,71.04),n.lineTo(27.81,69.72),n.lineTo(31.79,75.32),n.lineTo(27.96,84.46),n.lineTo(38.87,91.24),n.lineTo(45.21,83.13),n.lineTo(52.28,84.01),n.lineTo(55.97,93.3),n.lineTo(68.64,90.35),n.lineTo(67.46,79.74),n.lineTo(72.92,75.32),n.lineTo(81.61,79.89),n.lineTo(88.98,68.68),n.lineTo(80.43,62.05),n.lineTo(81.32,55.42),n.lineTo(90.9,51.73),n.lineTo(88.1,39.06),n.lineTo(77.04,40.24),n.lineTo(73.21,35.22),n.lineTo(77.19,25.5),n.lineTo(66.14,19.01),n.lineTo(59.21,27.27),n.lineTo(52.43,26.23),n.lineTo(48.15,16.8),n.lineTo(35.92,20.04),n.lineTo(37.1,30.36),n.lineTo(32.53,34.34),n.lineTo(23.1,30.36),n.close();const e=39.2,t=55.8;_e(n,e,t),n.begin(),_e(n,e,t)}function _e(n,e,t){n.moveTo(e,t),n.arcTo(13.5,13.5,0,1,1,e+2*13.5,t),n.arcTo(13.5,13.5,0,0,1,e,t),n.close(),n.fillAndStroke()}class pt{static get(){return this.instance}static set(e){this.instance=e}}f(pt,"instance",new Cn);class vn extends O.mxGraph{constructor(e){super(e),this.container&&(this.container.style.cursor="default")}createGraphView(){return new On(this)}createCellRenderer(){return new En(pt.get())}batchUpdate(e){this.model.beginUpdate();try{e()}finally{this.model.endUpdate()}}}class On extends O.mxGraphView{getFloatingTerminalPoint(e,t,s,o){if(e.absolutePoints.filter(Boolean).length<2)return super.getFloatingTerminalPoint(e,t,s,o);const l=e.absolutePoints;return o?l[1]:l.at(-2)}}const Ln=[y.LOOP,y.MULTI_INSTANCE_PARALLEL,y.MULTI_INSTANCE_SEQUENTIAL,y.COMPENSATION,y.EXPAND,y.ADHOC];function Nn(n){const e=Ln.filter(t=>n.includes(t));for(const t of n.filter(s=>!e.includes(s)))e.push(t);return e}function _n(n,e){return n===1?t=>t.setIconOriginForIconBottomCentered():t=>{t.setIconOriginForIconBottomCentered();const s=Math.pow(-1,e)*(T.SHAPE_ACTIVITY_MARKER_ICON_SIZE+T.SHAPE_ACTIVITY_MARKER_ICON_MARGIN)/2;t.translateIconOrigin(s,0)}}class Be extends Pe{constructor(){super(void 0,void 0,void 0);f(this,"iconPainter");f(this,"markerPainterFunctions",new Map([[y.EXPAND,t=>this.iconPainter.paintExpandIcon(t)],[y.LOOP,t=>this.iconPainter.paintLoopIcon(t)],[y.MULTI_INSTANCE_PARALLEL,t=>this.iconPainter.paintParallelMultiInstanceIcon(t)],[y.MULTI_INSTANCE_SEQUENTIAL,t=>this.iconPainter.paintSequentialMultiInstanceIcon(t)]]))}paintForeground(t,s,o,i,r){super.paintForeground(t,s,o,i,r),this.paintMarkerIcons(j({canvas:t,x:s,y:o,width:i,height:r,shape:this,ratioFromParent:0,iconStrokeWidth:1.5}))}paintMarkerIcons(t){var o;const s=A.getValue(this.style,S.MARKERS,void 0);if(s){const i=Nn(s.split(","));for(const[r,l]of i.entries())t={...t,setIconOriginFunct:_n(i.length,r+1)},t.canvas.save(),(o=this.markerPainterFunctions.get(l))==null||o(t),t.canvas.restore()}}paintEnvelopeIcon(t,s){this.iconPainter.paintEnvelopeIcon({...t,setIconOriginFunct:o=>o.setIconOriginToShapeTopLeft(),ratioFromParent:.2,iconStyleConfig:{...t.iconStyleConfig,isFilled:s}})}}class W extends Be{paintForeground(e,t,s,o,i){super.paintForeground(e,t,s,o,i),this.paintTaskIcon(j({canvas:e,x:t,y:s,width:o,height:i,shape:this}))}}class yn extends W{paintTaskIcon(e){}}class wn extends W{paintTaskIcon(e){this.iconPainter.paintGearIcon({...e,setIconOriginFunct:t=>t.setIconOriginToShapeTopLeftProportionally(20)})}}class Rn extends W{paintTaskIcon(e){this.iconPainter.paintPersonIcon({...e,setIconOriginFunct:t=>t.setIconOriginToShapeTopLeftProportionally(20)})}}class bn extends W{paintTaskIcon(e){if(!gt(this.style)){this.paintEnvelopeIcon(e,!1);return}const t=4,s=4,o={...e.shapeConfig,width:20,height:20};this.iconPainter.paintCircleIcon({canvas:e.canvas,shapeConfig:o,iconStyleConfig:{...e.iconStyleConfig,isFilled:!1},ratioFromParent:void 0,setIconOriginFunct:i=>i.setIconOriginToShapeTopLeft(s,t)}),o.x+=t,o.y+=s,this.iconPainter.paintEnvelopeIcon({...e,shapeConfig:o,ratioFromParent:.65,setIconOriginFunct:i=>i.setIconOriginForIconCentered()})}}class Fn extends W{paintTaskIcon(e){this.paintEnvelopeIcon(e,!0)}}class Pn extends W{paintTaskIcon(e){this.iconPainter.paintHandIcon({...e,ratioFromParent:.18,setIconOriginFunct:t=>t.setIconOriginToShapeTopLeftProportionally(20)})}}class kn extends W{paintTaskIcon(e){this.iconPainter.paintScriptIcon({...e,ratioFromParent:.22,setIconOriginFunct:t=>t.setIconOriginToShapeTopLeftProportionally(20)})}}class Mn extends Be{paintForeground(e,t,s,o,i){super.paintForeground(e,t,s,o,i);const r=j({canvas:e,x:t,y:s,width:o,height:i,shape:this});switch(A.getValue(this.style,S.GLOBAL_TASK_KIND,void 0)){case h.GLOBAL_TASK_MANUAL:{this.iconPainter.paintHandIcon({...r,ratioFromParent:.18,setIconOriginFunct:l=>l.setIconOriginToShapeTopLeftProportionally(20)});break}case h.GLOBAL_TASK_SCRIPT:{this.iconPainter.paintScriptIcon({...r,ratioFromParent:.22,setIconOriginFunct:l=>l.setIconOriginToShapeTopLeftProportionally(20)});break}case h.GLOBAL_TASK_USER:{this.iconPainter.paintPersonIcon({...r,setIconOriginFunct:l=>l.setIconOriginToShapeTopLeftProportionally(20)});break}case h.GLOBAL_TASK_BUSINESS_RULE:{this.iconPainter.paintTableIcon({...r,ratioFromParent:.6,setIconOriginFunct:l=>l.setIconOriginToShapeTopLeftProportionally(15)});break}}}}class Bn extends Be{paintBackground(e,t,s,o,i){const r=A.getValue(this.style,S.SUB_PROCESS_KIND,void 0);if(e.save(),r===Y.EVENT&&(e.setDashed(!0,!1),e.setDashPattern("1 2")),super.paintBackground(e,t,s,o,i),r===Y.TRANSACTION){const l=T.SUB_PROCESS_TRANSACTION_INNER_RECT_OFFSET,a=T.SUB_PROCESS_TRANSACTION_INNER_RECT_ARC_SIZE;e.roundrect(t+l,s+l,o-2*l,i-2*l,a,a),e.stroke()}e.restore()}}class xn extends W{paintTaskIcon(e){this.iconPainter.paintTableIcon({...e,ratioFromParent:.6,setIconOriginFunct:t=>t.setIconOriginToShapeTopLeftProportionally(15)})}}class Yn extends O.mxConnector{paintEdgeShape(e,t){const s=this.createMarker(e,t,!0),o=this.createMarker(e,t,!1);this.paintEdgeLine(e,t),e.setShadow(!1),e.setDashed(!1,!1),s!=null&&(e.setFillColor(A.getValue(this.style,S.EDGE_START_FILL_COLOR,this.stroke)),s()),o!=null&&(e.setFillColor(A.getValue(this.style,S.EDGE_END_FILL_COLOR,this.stroke)),o())}paintEdgeLine(e,t){const s=Vn(e);je(e,"stroke"),this.paintLine(e,t,this.isRounded),je(e,s)}}function Vn(n){return n instanceof ke?n.pointerEventsValue:null}function je(n,e){n instanceof ke&&(n.pointerEventsValue=e)}class xe extends O.mxEllipse{constructor(){super(void 0,void 0,void 0);f(this,"iconPainter");f(this,"iconPainters",new Map([[w.MESSAGE,t=>this.iconPainter.paintEnvelopeIcon({...t,ratioFromParent:.5})],[w.TERMINATE,t=>this.iconPainter.paintCircleIcon({...t,ratioFromParent:.6})],[w.TIMER,t=>this.iconPainter.paintClockIcon({...t,setIconOriginFunct:s=>s.setIconOriginToShapeTopLeftProportionally(5)})],[w.SIGNAL,t=>this.iconPainter.paintTriangleIcon({...t,ratioFromParent:.55,iconStyleConfig:{...t.iconStyleConfig,strokeWidth:T.STROKE_WIDTH_THIN.valueOf()},setIconOriginFunct:s=>s.setIconOriginToShapeTopLeftProportionally(4)})],[w.LINK,t=>this.iconPainter.paintRightArrowIcon({...t,ratioFromParent:.55,iconStyleConfig:{...t.iconStyleConfig,strokeWidth:1.5}})],[w.ERROR,t=>this.iconPainter.paintErrorIcon({...t,ratioFromParent:.55,iconStyleConfig:{...t.iconStyleConfig,strokeWidth:1.5}})],[w.COMPENSATION,t=>this.iconPainter.paintDoubleLeftArrowheadsIcon({...t,ratioFromParent:.7,iconStyleConfig:{...t.iconStyleConfig,strokeWidth:1.5}})],[w.CANCEL,t=>this.iconPainter.paintXCrossIcon({...t,ratioFromParent:.78})],[w.ESCALATION,t=>this.iconPainter.paintUpArrowheadIcon({...t,ratioFromParent:.55,iconStyleConfig:{...t.iconStyleConfig,strokeWidth:T.STROKE_WIDTH_THIN.valueOf()}})],[w.CONDITIONAL,t=>this.iconPainter.paintListIcon({...t,ratioFromParent:.6,iconStyleConfig:{...t.iconStyleConfig,strokeWidth:1.5}})]]));f(this,"withFilledIcon",!1)}paintVertexShape(t,s,o,i,r){const l=j({canvas:t,x:s,y:o,width:i,height:r,shape:this,isFilled:this.withFilledIcon});Gn(l,A.getValue(this.style,S.IS_INTERRUPTING,void 0)),this.paintOuterShape(l),Dn(l),this.paintInnerShape(l)}paintOuterShape({canvas:t,shapeConfig:{x:s,y:o,width:i,height:r}}){super.paintVertexShape(t,s,o,i,r)}paintInnerShape(t){const s=this.iconPainters.get(A.getValue(this.style,S.EVENT_DEFINITION_KIND,w.NONE));s==null||s(t)}}function Gn(n,e){n.canvas.save(),e==="false"&&(n.canvas.setDashed(!0,!1),n.canvas.setDashPattern("3 2"))}function Dn(n){n.canvas.restore()}class Un extends xe{constructor(){super(),this.withFilledIcon=!0}}class ye extends xe{paintOuterShape({canvas:e,shapeConfig:{x:t,y:s,width:o,height:i,strokeWidth:r}}){e.ellipse(t,s,o,i),e.fillAndStroke();const l=r*1.5;e.ellipse(o*.02+l+t,i*.02+l+s,o*.96-2*l,i*.96-2*l),e.stroke()}}class Wn extends ye{constructor(){super(),this.withFilledIcon=!0}}class Hn extends Pe{constructor(){super(...arguments);f(this,"iconPainter")}paintVertexShape(t,s,o,i,r){const l=j({canvas:t,x:s,y:o,width:i,height:r,shape:this,ratioFromParent:1,isFilled:A.getValue(this.style,S.IS_INITIATING,"true")=="false"});this.iconPainter.paintEnvelopeIcon(l)}}class re extends O.mxRhombus{constructor(){super(...arguments);f(this,"iconPainter")}paintVertexShape(t,s,o,i,r){const l=j({canvas:t,x:s,y:o,width:i,height:r,shape:this});this.paintOuterShape(l),this.paintInnerShape(l)}paintOuterShape({canvas:t,shapeConfig:{x:s,y:o,width:i,height:r}}){super.paintVertexShape(t,s,o,i,r)}}class Kn extends re{paintInnerShape(e){this.iconPainter.paintXCrossIcon({...e,iconStyleConfig:{...e.iconStyleConfig,isFilled:!0},ratioFromParent:.5})}}class zn extends re{paintInnerShape(e){this.iconPainter.paintPlusCrossIcon({...e,iconStyleConfig:{...e.iconStyleConfig,isFilled:!0},ratioFromParent:.5})}}class Xn extends re{paintInnerShape(e){this.iconPainter.paintCircleIcon({...e,ratioFromParent:.62,iconStyleConfig:{...e.iconStyleConfig,isFilled:!1,strokeWidth:T.STROKE_WIDTH_THICK.valueOf()}})}}class $n extends re{paintInnerShape(e){this.iconPainter.paintAsteriskIcon({...e,iconStyleConfig:{...e.iconStyleConfig,isFilled:!0},ratioFromParent:.5})}}class Zn extends re{paintInnerShape(e){e={...e,iconStyleConfig:{...e.iconStyleConfig,strokeWidth:1}},this.iconPainter.paintCircleIcon({...e,ratioFromParent:.55}),gt(this.style)||this.iconPainter.paintCircleIcon({...e,ratioFromParent:.45});const t={...e,ratioFromParent:.3};A.getValue(this.style,S.EVENT_BASED_GATEWAY_KIND,se.Exclusive)==se.Parallel?this.iconPainter.paintPlusCrossIcon(t):this.iconPainter.paintPentagon(t)}}class jn extends Pe{paintForeground(e,t,s,o,i){e.begin(),e.moveTo(t+T.TEXT_ANNOTATION_BORDER_LENGTH,s),e.lineTo(t,s),e.lineTo(t,s+i),e.lineTo(t+T.TEXT_ANNOTATION_BORDER_LENGTH,s+i),e.stroke()}paintBackground(e,t,s,o,i){e.save(),e.setStrokeColor("none"),super.paintBackground(e,t,s,o,i),e.restore()}}const qn=()=>{const n=[[h.EVENT_END,Un],[h.EVENT_START,xe],[h.EVENT_INTERMEDIATE_THROW,Wn],[h.EVENT_INTERMEDIATE_CATCH,ye],[h.EVENT_BOUNDARY,ye],[h.GATEWAY_COMPLEX,$n],[h.GATEWAY_EVENT_BASED,Zn],[h.GATEWAY_EXCLUSIVE,Kn],[h.GATEWAY_INCLUSIVE,Xn],[h.GATEWAY_PARALLEL,zn],[h.SUB_PROCESS,Bn],[h.CALL_ACTIVITY,Mn],[h.TASK,yn],[h.TASK_SERVICE,wn],[h.TASK_USER,Rn],[h.TASK_RECEIVE,bn],[h.TASK_SEND,Fn],[h.TASK_MANUAL,Pn],[h.TASK_SCRIPT,kn],[h.TASK_BUSINESS_RULE,xn],[h.TEXT_ANNOTATION,jn],[S.EDGE,Yn],[S.MESSAGE_FLOW_ICON,Hn]];for(const[e,t]of n)Kt.registerShape(e,t)},Qn=(n,e,t,s,o,i,r,l,a)=>{const d=o*(r+a+4),u=i*(r+a+4);return function(){n.begin(),n.moveTo(s.x-d/2-u/2,s.y-u/2+d/2),n.lineTo(s.x+u/2-3*d/2,s.y-3*u/2-d/2),n.stroke()}},Jn=()=>{O.mxMarker.addMarker(ft.ARROW_DASH,Qn)},Et=12;class Ye extends Map{get(e){return super.get(e)??(()=>{})}}const es=new Ye([[k.SEQUENCE_FLOW,n=>{n[c.STYLE_ENDARROW]=c.ARROW_BLOCK_THIN}],[k.MESSAGE_FLOW,n=>{n[c.STYLE_DASHED]=!0,n[c.STYLE_DASH_PATTERN]="8 5",n[c.STYLE_STARTARROW]=c.ARROW_OVAL,n[c.STYLE_STARTSIZE]=8,n[c.STYLE_STARTFILL]=!0,n[S.EDGE_START_FILL_COLOR]=T.MESSAGE_FLOW_MARKER_START_FILL_COLOR,n[c.STYLE_ENDARROW]=c.ARROW_BLOCK_THIN,n[c.STYLE_ENDFILL]=!0,n[S.EDGE_END_FILL_COLOR]=T.MESSAGE_FLOW_MARKER_END_FILL_COLOR}],[k.ASSOCIATION_FLOW,n=>{n[c.STYLE_DASHED]=!0,n[c.STYLE_DASH_PATTERN]="1 2",n[c.STYLE_STARTSIZE]=Et}]]),ts=new Ye([[x.DEFAULT,n=>{n[c.STYLE_STARTARROW]=ft.ARROW_DASH}],[x.CONDITIONAL_FROM_ACTIVITY,n=>{n[c.STYLE_STARTARROW]=c.ARROW_DIAMOND_THIN,n[c.STYLE_STARTSIZE]=18,n[c.STYLE_STARTFILL]=!0,n[S.EDGE_START_FILL_COLOR]=T.SEQUENCE_FLOW_CONDITIONAL_FROM_ACTIVITY_MARKER_FILL_COLOR}]]),ns=new Ye([[$.NONE,n=>{}],[$.ONE,n=>{n[c.STYLE_ENDARROW]=c.ARROW_OPEN_THIN}],[$.BOTH,n=>{n[c.STYLE_STARTARROW]=c.ARROW_OPEN_THIN,n[c.STYLE_ENDARROW]=c.ARROW_OPEN_THIN}]]);class St{constructor(e){this.graph=e}configureStyles(){this.configureDefaultVertexStyle(),this.configurePoolStyle(),this.configureLaneStyle(),this.configureTextAnnotationStyle(),this.configureGroupStyle(),this.configureActivityStyles(),this.configureEventStyles(),this.configureGatewayStyles(),this.configureDefaultEdgeStyle(),this.configureFlowStyles()}getStylesheet(){return this.graph.getStylesheet()}putCellStyle(e,t){this.getStylesheet().putCellStyle(e,t)}configureDefaultVertexStyle(){const e=this.getStylesheet().getDefaultVertexStyle();qe(e),e[c.STYLE_ABSOLUTE_ARCSIZE]=!0,e[c.STYLE_ARCSIZE]=T.SHAPE_ARC_SIZE}configurePoolStyle(){const e={};e[c.STYLE_SHAPE]=c.SHAPE_SWIMLANE,e[c.STYLE_VERTICAL_ALIGN]=c.ALIGN_MIDDLE,e[c.STYLE_ALIGN]=c.ALIGN_CENTER,e[c.STYLE_STARTSIZE]=T.POOL_LABEL_SIZE,e[c.STYLE_FILLCOLOR]=T.POOL_LABEL_FILL_COLOR,this.graph.getStylesheet().putCellStyle(h.POOL,e)}configureLaneStyle(){const e={};e[c.STYLE_SHAPE]=c.SHAPE_SWIMLANE,e[c.STYLE_VERTICAL_ALIGN]=c.ALIGN_MIDDLE,e[c.STYLE_ALIGN]=c.ALIGN_CENTER,e[c.STYLE_SWIMLANE_LINE]=0,e[c.STYLE_STARTSIZE]=T.LANE_LABEL_SIZE,e[c.STYLE_FILLCOLOR]=T.LANE_LABEL_FILL_COLOR,this.graph.getStylesheet().putCellStyle(h.LANE,e)}configureEventStyles(){for(const e of p.eventKinds()){const t={};t[c.STYLE_SHAPE]=e,t[c.STYLE_PERIMETER]=ze.EllipsePerimeter,t[c.STYLE_STROKEWIDTH]=e==h.EVENT_END?T.STROKE_WIDTH_THICK:T.STROKE_WIDTH_THIN,t[c.STYLE_VERTICAL_LABEL_POSITION]=c.ALIGN_BOTTOM,this.putCellStyle(e,t)}}configureTextAnnotationStyle(){const e={};e[c.STYLE_SHAPE]=h.TEXT_ANNOTATION,e[c.STYLE_VERTICAL_ALIGN]=c.ALIGN_MIDDLE,e[c.STYLE_ALIGN]=c.ALIGN_LEFT,e[c.STYLE_SPACING_LEFT]=5,e[c.STYLE_FILLCOLOR]=T.TEXT_ANNOTATION_FILL_COLOR,e[c.STYLE_STROKEWIDTH]=T.STROKE_WIDTH_THIN,this.putCellStyle(h.TEXT_ANNOTATION,e)}configureGroupStyle(){const e={};e[c.STYLE_ROUNDED]=!0,e[c.STYLE_DASHED]=!0,e[c.STYLE_DASH_PATTERN]="7 4 1 4",e[c.STYLE_STROKEWIDTH]=T.STROKE_WIDTH_THIN,e[c.STYLE_FILLCOLOR]=T.GROUP_FILL_COLOR,e[c.STYLE_ALIGN]=c.ALIGN_CENTER,e[c.STYLE_VERTICAL_ALIGN]=c.ALIGN_TOP,this.putCellStyle(h.GROUP,e)}configureActivityStyles(){for(const e of p.activityKinds()){const t={};t[c.STYLE_SHAPE]=e,t[c.STYLE_ROUNDED]=!0,t[c.STYLE_VERTICAL_ALIGN]=c.ALIGN_MIDDLE,t[c.STYLE_STROKEWIDTH]=e==h.CALL_ACTIVITY?T.STROKE_WIDTH_THICK:T.STROKE_WIDTH_THIN,this.putCellStyle(e,t)}}configureGatewayStyles(){for(const e of p.gatewayKinds()){const t={};t[c.STYLE_SHAPE]=e,t[c.STYLE_PERIMETER]=ze.RhombusPerimeter,t[c.STYLE_STROKEWIDTH]=T.STROKE_WIDTH_THIN,t[c.STYLE_VERTICAL_ALIGN]=c.ALIGN_TOP,t[c.STYLE_LABEL_POSITION]=c.ALIGN_LEFT,t[c.STYLE_VERTICAL_LABEL_POSITION]=c.ALIGN_TOP,this.putCellStyle(e,t)}}configureDefaultEdgeStyle(){const e=this.getStylesheet().getDefaultEdgeStyle();qe(e),e[c.STYLE_SHAPE]=S.EDGE,e[c.STYLE_ENDSIZE]=Et,e[c.STYLE_STROKEWIDTH]=1.5,e[c.STYLE_ROUNDED]=!0,e[c.STYLE_ARCSIZE]=5,e[c.STYLE_VERTICAL_ALIGN]=c.ALIGN_BOTTOM,delete e[c.STYLE_ENDARROW]}configureEdgeStyles(e,t){for(const s of e){const o={};t.get(s)(o),this.graph.getStylesheet().putCellStyle(s.toString(),o)}}configureFlowStyles(){this.configureEdgeStyles(Object.values(k),es),this.configureEdgeStyles(Object.values(x),ts),this.configureEdgeStyles(Object.values($),ns)}}function qe(n){n[c.STYLE_FONTFAMILY]=T.DEFAULT_FONT_FAMILY,n[c.STYLE_FONTSIZE]=T.DEFAULT_FONT_SIZE,n[c.STYLE_FONTCOLOR]=T.DEFAULT_FONT_COLOR,n[c.STYLE_FILLCOLOR]=T.DEFAULT_FILL_COLOR,n[c.STYLE_STROKECOLOR]=T.DEFAULT_STROKE_COLOR,n[c.STYLE_LABEL_BACKGROUNDCOLOR]=c.NONE,n[c.STYLE_WHITE_SPACE]="wrap"}class ss{constructor(e){f(this,"graph");this.graph=new vn(e)}configure(){return this.configureGraph(),new St(this.graph).configureStyles(),qn(),Jn(),this.graph}configureGraph(){this.graph.setCellsLocked(!0),this.graph.setCellsSelectable(!1),this.graph.setEdgeLabelsMovable(!1),this.graph.setHtmlLabels(!0),this.graph.setConstrainChildren(!1),this.graph.setExtendParents(!1),this.graph.foldingEnabled=!1}}function It(n,e,{signal:t,edges:s}={}){let o,i=null;const r=s!=null&&s.includes("leading"),l=s==null||s.includes("trailing"),a=()=>{i!==null&&(n.apply(o,i),o=void 0,i=null)},d=()=>{l&&a(),C()};let u=null;const g=()=>{u!=null&&clearTimeout(u),u=setTimeout(()=>{u=null,d()},e)},I=()=>{u!==null&&(clearTimeout(u),u=null)},C=()=>{I(),o=void 0,i=null},L=()=>{I(),a()},_=function(...Q){if(t!=null&&t.aborted)return;o=this,i=Q;const J=u==null;g(),r&&J&&a()};return _.schedule=g,_.cancel=C,_.flush=L,t==null||t.addEventListener("abort",C,{once:!0}),_}function os(n,e,{signal:t,edges:s=["leading","trailing"]}={}){let o=null;const i=It(n,e,{signal:t,edges:s}),r=function(...l){o==null?o=Date.now():Date.now()-o>=e&&(o=Date.now(),i.cancel()),i(...l)};return r.cancel=i.cancel,r.flush=i.flush,r}class is{constructor(e,t){this.graph=e,this.zoomSupport=t}fit(e){this.zoomSupport.fit(e)}zoom(e){e=="in"?this.zoomSupport.zoomIn():this.zoomSupport.zoomOut()}configure(e){const t=this.graph.panningHandler;e!=null&&e.enabled?(t.addListener(V.PAN_START,Qe(this.graph,"grab")),t.addListener(V.PAN_END,Qe(this.graph,"default")),t.usePopupTrigger=!1,t.isForcePanningEvent=s=>V.isLeftMouseButton(s.getEvent())||V.isMultiTouchEvent(s.getEvent()),this.graph.setPanning(!0),this.zoomSupport.registerMouseWheelZoomListeners(e==null?void 0:e.zoom)):(this.graph.setPanning(!1),t.setPinchEnabled(!1),t.isForcePanningEvent=s=>!1)}}function Qe(n,e){return()=>{n.container.style.cursor=e}}function rs(n,e){const t=new is(n,new as(n));return t.configure(e),t}const we=1.25,ls=1/we;class as{constructor(e){f(this,"currentZoomLevel",1);this.graph=e,this.graph.zoomFactor=we}graphFit(e,t,s,o,i,r,l){const a=this.graph.fit(e,t,s,o,i,r,l);return this.setCurrentZoomLevel(a),a}setCurrentZoomLevel(e){this.currentZoomLevel=e??this.graph.view.scale}zoomActual(){this.graph.zoomActual(),this.setCurrentZoomLevel()}zoomIn(){this.graph.zoomIn(),this.setCurrentZoomLevel()}zoomOut(){this.graph.zoomOut(),this.setCurrentZoomLevel()}fit(e){this.zoomActual();const t=e==null?void 0:e.type;if(t==null||t==te.None)return;const s=Zt(e==null?void 0:e.margin);if(t==te.Center){const i=this.graph.getGraphBounds(),r=this.graph.container.clientWidth-s,l=this.graph.container.clientHeight-s,a=i.width/this.graph.view.scale,d=i.height/this.graph.view.scale,u=Math.min(3,Math.min(r/a,l/d));this.setCurrentZoomLevel(u),this.graph.view.scaleAndTranslate(u,(s+r-a*u)/(2*u)-i.x/this.graph.view.scale,(s+l-d*u)/(2*u)-i.y/this.graph.view.scale)}else{let o=!1,i=!1;switch(t){case te.Horizontal:{i=!0;break}case te.Vertical:{o=!0;break}}this.graphFit(this.graph.border,!1,s,!0,o,i)}}registerMouseWheelZoomListeners(e){e=jt(e),V.addMouseWheelListener(It(this.createMouseWheelZoomListener(!0),e.debounceDelay),this.graph.container),V.addMouseWheelListener(os(this.createMouseWheelZoomListener(!1),e.throttleDelay),this.graph.container)}createMouseWheelZoomListener(e){return(t,s)=>{if(V.isConsumed(t)||!(t instanceof MouseEvent))return;if(t.ctrlKey&&!t.altKey&&!t.shiftKey&&!t.metaKey)if(e){const[i,r]=this.getEventRelativeCoordinates(t),[l,a,d]=this.getScaleAndTranslationDeltas(i,r);this.graph.view.scaleAndTranslate(l,this.graph.view.translate.x+a,this.graph.view.translate.y+d),V.consume(t)}else this.currentZoomLevel*=s?we:ls}}getEventRelativeCoordinates(e){const t=this.graph.container.getBoundingClientRect(),s=e.clientX-t.left,o=e.clientY-t.top;return[s,o]}getScaleAndTranslationDeltas(e,t){const[s,o]=this.calculateFactorAndScale(),[i,r]=this.calculateTranslationDeltas(s,o,e*2,t*2);return[o,i,r]}calculateTranslationDeltas(e,t,s,o){if(e>1){const i=(e-1)/(t*2);s*=-i,o*=-i}else{const i=(1/e-1)/(this.graph.view.scale*2);s*=i,o*=i}return[s,o]}calculateFactorAndScale(){const e=Math.round(this.currentZoomLevel*100)/100;return[e/this.graph.view.scale,e]}}class cs{constructor(e){this.convertedElements=e}deserialize(e){const t=E(e.category).flatMap(s=>E(s.categoryValue));for(const s of t)this.convertedElements.registerCategoryValue(s.id,s.value)}}class q{}class us{constructor(e){this.options=e}warning(e){var s;if((s=this.options)!=null&&s.disableConsoleLog)return;const t=e.getMessage();console.warn(`[bv-parser] ${t.template}`,...t.arguments)}}class ds extends q{constructor(e,t){super(),this.groupBpmnElementId=e,this.categoryValueReference=t}getMessage(){return{arguments:[this.categoryValueReference,this.groupBpmnElementId],template:"Group json deserialization: unable to find category value ref %s for bpmn element %s"}}}class hs extends q{constructor(e){super(),this.bpmnElementId=e}getMessage(){return{arguments:[this.bpmnElementId],template:"Shape json deserialization: unable to find bpmn element with id %s"}}}class fs extends q{constructor(e){super(),this.bpmnElementId=e}getMessage(){return{arguments:[this.bpmnElementId],template:"Edge json deserialization: unable to find bpmn element with id %s"}}}class gs extends q{constructor(e,t){super(),this.shapeOrEdgeId=e,this.labelStyleId=t}getMessage(){return{arguments:[this.labelStyleId,this.shapeOrEdgeId],template:"Unable to assign font from style %s to shape/edge %s"}}}class Ts extends q{constructor(e,t){super(),this.laneId=e,this.flowNodeReference=t}getMessage(){return{arguments:[this.flowNodeReference,this.laneId],template:"Unable to assign lane %s as parent: flow node %s is not found"}}}class ps extends q{constructor(e,t,s){super(),this.bpmnElementId=e,this.attachedToReference=t,this.attachedToKind=s}getMessage(){return{arguments:[this.bpmnElementId,this.attachedToReference,this.attachedToKind],template:"The boundary event %s must be attached to an activity, and not to %s of kind %s"}}}class Es{constructor(){f(this,"poolsById",new Map);f(this,"poolsByProcessRef",new Map);f(this,"messageFlows",new Map);f(this,"flowNodes",new Map);f(this,"lanes",new Map);f(this,"sequenceFlows",new Map);f(this,"associationFlows",new Map);f(this,"eventDefinitionsOfDefinitions",new Map);f(this,"globalTasks",new Map);f(this,"categoryValues",new Map)}getFlows(){return[...this.messageFlows.values(),...this.sequenceFlows.values(),...this.associationFlows.values()]}findPoolById(e){return this.poolsById.get(e)}findPoolByProcessRef(e){return this.poolsByProcessRef.get(e)}registerPool(e,t){this.poolsById.set(e.id,e),t&&this.poolsByProcessRef.set(t,e)}findMessageFlow(e){return this.messageFlows.get(e)}registerMessageFlow(e){this.messageFlows.set(e.id,e)}findFlowNode(e){return this.flowNodes.get(e)}registerFlowNode(e){this.flowNodes.set(e.id,e)}findLane(e){return this.lanes.get(e)}registerLane(e){this.lanes.set(e.id,e)}findSequenceFlow(e){return this.sequenceFlows.get(e)}registerSequenceFlow(e){this.sequenceFlows.set(e.id,e)}findAssociationFlow(e){return this.associationFlows.get(e)}registerAssociationFlow(e){this.associationFlows.set(e.id,e)}findEventDefinitionOfDefinition(e){return this.eventDefinitionsOfDefinitions.get(e)}registerEventDefinitionsOfDefinition(e,t){this.eventDefinitionsOfDefinitions.set(e,t)}findGlobalTask(e){return this.globalTasks.get(e)}registerGlobalTask(e,t){this.globalTasks.set(e,t)}findCategoryValue(e){return this.categoryValues.get(e)}registerCategoryValue(e,t){this.categoryValues.set(e,{value:t})}}const Ct=(n,e,t,s)=>{const o=n.findCategoryValue(t.categoryValueRef);if(o)return new B(t.id,o.value,h.GROUP,s);e.warning(new ds(t.id,t.categoryValueRef))},mt=(n,e)=>{for(const t of E(e)){const s=t.associationDirection;n.registerAssociationFlow(new ct(t.id,void 0,t.sourceRef,t.targetRef,s))}};class Ss{constructor(e,t){this.convertedElements=e,this.parsingMessageCollector=t}deserialize(e){for(const t of E(e))this.parseCollaboration(t)}parseCollaboration(e){this.buildParticipant(e.participant),this.buildMessageFlows(e.messageFlow),mt(this.convertedElements,e.association),this.buildGroups(e.group),this.buildTextAnnotation(e.textAnnotation)}buildParticipant(e){for(const t of E(e))this.convertedElements.registerPool(new B(t.id,t.name,h.POOL),t.processRef)}buildMessageFlows(e){for(const t of E(e))this.convertedElements.registerMessageFlow(new at(t.id,t.name,t.sourceRef,t.targetRef))}buildGroups(e){for(const t of E(e)){const s=Ct(this.convertedElements,this.parsingMessageCollector,t);s&&this.convertedElements.registerFlowNode(s)}}buildTextAnnotation(e){for(const t of E(e))this.convertedElements.registerFlowNode(new B(t.id,t.text,h.TEXT_ANNOTATION))}}class Is{constructor(e,t,s,o){this.x=e,this.y=t,this.width=s,this.height=o}}class Cs{constructor(e,t,s,o,i=oe.NONE){f(this,"extensions",{});this.id=e,this.bpmnElement=t,this.waypoints=s,this.label=o,this.messageVisibleKind=i}}class ms{constructor(e,t){this.x=e,this.y=t}}class As{constructor(e,t){f(this,"extensions",{});this.font=e,this.bounds=t}}class vs{constructor(e,t,s,o,i,r){this.name=e,this.size=t,this.isBold=s,this.isItalic=o,this.isUnderline=i,this.isStrikeThrough=r}}class Os{constructor(e,t){f(this,"convertedFonts",new Map);this.convertedElements=e,this.parsingMessageCollector=t}deserialize(e){const t=[],s=[],o=[],i=[],r=E(e)[0];if(r){this.deserializeFonts(r.BPMNLabelStyle);const l=r.BPMNPlane,a=this.deserializeEdges(l.BPMNEdge),d=this.deserializeShapes(l.BPMNShape);t.push(...d.flowNodes),s.push(...d.lanes),o.push(...d.pools),i.push(...a)}return{flowNodes:t,lanes:s,pools:o,edges:i}}deserializeFonts(e){for(const t of E(e))for(const s of E(t.Font))this.convertedFonts.set(t.id,new vs(s.name,s.size,s.isBold,s.isItalic,s.isUnderline,s.isStrikeThrough))}deserializeShapes(e){const t={flowNodes:[],lanes:[],pools:[]};for(const s of E(e))this.deserializeShapeAndStoreIfFound(s,t.flowNodes,o=>this.convertedElements.findFlowNode(o))||this.deserializeShapeAndStoreIfFound(s,t.lanes,o=>this.convertedElements.findLane(o))||this.deserializeShapeAndStoreIfFound(s,t.pools,o=>this.convertedElements.findPoolById(o))||this.parsingMessageCollector.warning(new hs(s.bpmnElement));return t}deserializeShapeAndStoreIfFound(e,t,s){const o=this.deserializeShape(e,s);return o?(t.push(o),!0):!1}deserializeShape(e,t){const s=t(e.bpmnElement);if(s){const o=Je(e);(s instanceof ie||s instanceof X&&s.callActivityKind===ne.CALLING_PROCESS)&&!e.isExpanded&&s.markers.push(y.EXPAND);let i;p.isPoolOrLane(s.kind)&&(i=e.isHorizontal??!0);const r=e.BPMNLabel,l=this.deserializeLabel(r,e.id),a=new ue(e.id,s,o,l,i);return Ls(a,e),a}}deserializeEdges(e){return E(e).map(t=>{const s=this.convertedElements.findSequenceFlow(t.bpmnElement)||this.convertedElements.findMessageFlow(t.bpmnElement)||this.convertedElements.findAssociationFlow(t.bpmnElement);if(!s){this.parsingMessageCollector.warning(new fs(t.bpmnElement));return}const o=this.deserializeWaypoints(t.waypoint),i=this.deserializeLabel(t.BPMNLabel,t.id),r=t.messageVisibleKind?t.messageVisibleKind:oe.NONE,l=new Cs(t.id,s,o,i,r);return Ns(l,t),l}).filter(Boolean)}deserializeWaypoints(e){return E(e).map(t=>new ms(t.x,t.y))}deserializeLabel(e,t){if(e&&typeof e=="object"){const s=this.findFont(e.labelStyle,t),o=Je(e),i=new As(s,o);if("color"in e)return i.extensions.color=e.color,i;if(s||o)return i}}findFont(e,t){let s;return e&&(s=this.convertedFonts.get(e),s||this.parsingMessageCollector.warning(new gs(t,e))),s}}function Ls(n,e){"background-color"in e?n.extensions.fillColor=e["background-color"]:"fill"in e&&(n.extensions.fillColor=e.fill),"border-color"in e?n.extensions.strokeColor=e["border-color"]:"stroke"in e&&(n.extensions.strokeColor=e.stroke)}function Je(n){const e=n.Bounds;if(e)return new Is(e.x,e.y,e.width,e.height)}function Ns(n,e){"border-color"in e?n.extensions.strokeColor=e["border-color"]:"stroke"in e&&(n.extensions.strokeColor=e.stroke)}const _s=n=>"source"in n||"target"in n;class ys{constructor(e){this.convertedElements=e}deserialize(e){for(const t of rt){const s=e[t+"EventDefinition"];for(const o of E(s,!0))this.convertedElements.registerEventDefinitionsOfDefinition(o.id,{id:o.id,kind:t,..._s(o)?{source:o.source,target:o.target}:{}})}}}class ws{constructor(e){this.convertedElements=e}deserialize(e){this.parseGlobalTasks(e.globalTask,h.GLOBAL_TASK),this.parseGlobalTasks(e.globalBusinessRuleTask,h.GLOBAL_TASK_BUSINESS_RULE),this.parseGlobalTasks(e.globalManualTask,h.GLOBAL_TASK_MANUAL),this.parseGlobalTasks(e.globalScriptTask,h.GLOBAL_TASK_SCRIPT),this.parseGlobalTasks(e.globalUserTask,h.GLOBAL_TASK_USER)}parseGlobalTasks(e,t){for(const s of E(e))this.convertedElements.registerGlobalTask(s.id,t)}}const Rs=(n,e)=>{switch(n){case"adHocSubProcess":return Y.AD_HOC;case"transaction":return Y.TRANSACTION;default:return e.triggeredByEvent?Y.EVENT:Y.EMBEDDED}},bs=["adHocSubProcess","transaction",...p.flowNodeKinds().filter(n=>n!==h.EVENT_BOUNDARY),h.EVENT_BOUNDARY];function Fs(n){return["adHocSubProcess","transaction"].includes(n)?h.SUB_PROCESS:n}class Ps{constructor(e,t){f(this,"defaultSequenceFlowIds",[]);f(this,"elementsWithoutParentByProcessId",new Map);f(this,"callActivitiesCallingProcess",new Map);f(this,"eventsByLinkEventDefinition",new Map);this.convertedElements=e,this.parsingMessageCollector=t}deserialize(e){for(const t of E(e))this.parseProcess(t);for(const t of E(e))this.assignParentOfProcessElementsCalledByCallActivity(t.id);this.assignIncomingAndOutgoingIdsFromFlows(),this.assignSourceAndTargetIdsToLinkEvents()}assignParentOfProcessElementsCalledByCallActivity(e){const t=this.callActivitiesCallingProcess.get(e);if(t){const s=this.convertedElements.findPoolByProcessRef(e);s&&(s.parentId=t.id);for(const o of this.elementsWithoutParentByProcessId.get(e))o.parentId=t.id}}assignIncomingAndOutgoingIdsFromFlows(){const e=(t,s,o)=>{const i=this.convertedElements.findFlowNode(t)??this.convertedElements.findLane(t)??this.convertedElements.findPoolById(t);i&&!i[s].includes(o)&&i[s].push(o)};for(const t of this.convertedElements.getFlows())e(t.sourceReferenceId,"outgoingIds",t.id),e(t.targetReferenceId,"incomingIds",t.id)}assignSourceAndTargetIdsToLinkEvents(){var t;const e=[...this.eventsByLinkEventDefinition.entries()].filter(([s])=>s.id);for(const[s,o]of this.eventsByLinkEventDefinition)if(o instanceof Le){const i=e.find(([r])=>s.target===r.id);o.targetId=(t=i==null?void 0:i[1])==null?void 0:t.id}else o instanceof Oe&&(o.sourceIds=e.filter(([i])=>Array.isArray(s.source)?s.source.includes(i.id):s.source===i.id).map(([,i])=>i.id))}parseProcess(e){const t=e.id,s=this.convertedElements.findPoolByProcessRef(t);s&&!s.name&&this.convertedElements.registerPool(new B(s.id,e.name,h.POOL),t),this.buildProcessInnerElements(e,s==null?void 0:s.id)}buildProcessInnerElements(e,t){this.elementsWithoutParentByProcessId.set(e.id,[]);for(const s of bs)this.buildFlowNodeBpmnElements(e[s],Fs(s),t,e.id,s);this.buildLaneSetBpmnElements(e.laneSet,t,e.id),this.buildSequenceFlows(e.sequenceFlow),mt(this.convertedElements,e.association)}buildFlowNodeBpmnElements(e,t,s,o,i){for(const r of E(e)){const l=this.buildFlowNodeBpmnElement(t,r,s,i);"default"in r&&p.isWithDefaultSequenceFlow(t)&&this.defaultSequenceFlowIds.push(r.default),l&&(this.convertedElements.registerFlowNode(l),s||this.elementsWithoutParentByProcessId.get(o).push(l))}}buildFlowNodeBpmnElement(e,t,s,o){if(p.isEvent(e))return this.buildShapeBpmnEvent(t,e,s);if(p.isActivity(e))return this.buildShapeBpmnActivity(t,e,s,o);if(e==h.GATEWAY_EVENT_BASED){const i=t;return new ht(i.id,i.name,s,i.instantiate,se[i.eventGatewayType])}else{if(e==h.GROUP)return Ct(this.convertedElements,this.parsingMessageCollector,t,s);{const i=e===h.TEXT_ANNOTATION?t.text:t.name;return new B(t.id,i,e,s,t.instantiate)}}}buildShapeBpmnActivity(e,t,s,o){const i=ks(e);return p.isSubProcess(t)?this.buildShapeBpmnSubProcess(e,s,Rs(o,e),i):p.isCallActivity(t)?this.buildShapeBpmnCallActivity(e,s,i):new pe(e.id,e.name,t,s,e.instantiate,i)}buildShapeBpmnCallActivity(e,t,s){const o=this.convertedElements.findGlobalTask(e.calledElement);if(!o){const i=new X(e.id,e.name,ne.CALLING_PROCESS,t,s);return this.callActivitiesCallingProcess.set(e.calledElement,i),i}return new X(e.id,e.name,ne.CALLING_GLOBAL_TASK,t,s,o)}buildShapeBpmnEvent(e,t,s){const o=this.getEventDefinitions(e),i=[...o.entries()].map(([,r])=>r.length).reduce((r,l)=>r+l,0);if(i==0&&p.canHaveNoneEvent(t))return new U(e.id,e.name,t,w.NONE,s);if(i==1){const[r,l]=[...o.entries()][0],a=p.isCatchEvent(t)?this.buildShapeBpmnCatchEvent(e,t,r,s):this.buildShapeBpmnThrowEvent(e,t,r,s);return r===w.LINK&&(l[0].id||l[0].target||l[0].source)&&this.eventsByLinkEventDefinition.set(l[0],a),a}}buildShapeBpmnCatchEvent(e,t,s,o){return p.isBoundaryEvent(t)?this.buildShapeBpmnBoundaryEvent(e,s):p.isStartEvent(t)?new ut(e.id,e.name,s,o,e.isInterrupting):new Oe(e.id,e.name,s,o)}buildShapeBpmnThrowEvent(e,t,s,o){return p.isIntermediateThrowEvent(t)?new Le(e.id,e.name,s,o):new U(e.id,e.name,t,s,o)}buildShapeBpmnBoundaryEvent(e,t){const s=this.convertedElements.findFlowNode(e.attachedToRef);if(p.isActivity(s==null?void 0:s.kind))return new dt(e.id,e.name,t,e.attachedToRef,e.cancelActivity);this.parsingMessageCollector.warning(new ps(e.id,e.attachedToRef,s==null?void 0:s.kind))}getEventDefinitions(e){const t=new Map;for(const s of rt){const o=e[`${s}EventDefinition`];t.set(s,E(o,!0))}for(const s of E(e.eventDefinitionRef)){const o=this.convertedElements.findEventDefinitionOfDefinition(s);o&&t.get(o.kind).push(o)}for(const[s]of[...t.entries()].filter(([,o])=>o.length===0))t.delete(s);return t}buildShapeBpmnSubProcess(e,t,s,o){const i=new ie(e.id,e.name,s,t,o);return this.buildProcessInnerElements(e,e.id),i}buildLaneSetBpmnElements(e,t,s){for(const o of E(e))this.buildLaneBpmnElements(o.lane,t,s)}buildLaneBpmnElements(e,t,s){var o;for(const i of E(e)){const r=new B(i.id,i.name,h.LANE,t);this.convertedElements.registerLane(r),t||this.elementsWithoutParentByProcessId.get(s).push(r),this.assignParentOfLaneFlowNodes(i),(o=i.childLaneSet)!=null&&o.lane&&this.buildLaneBpmnElements(i.childLaneSet.lane,i.id,s)}}assignParentOfLaneFlowNodes(e){for(const t of E(e.flowNodeRef)){const s=this.convertedElements.findFlowNode(t),o=e.id;s?p.isBoundaryEvent(s.kind)||(s.parentId=o):this.parsingMessageCollector.warning(new Ts(o,t))}}buildSequenceFlows(e){for(const t of E(e)){const s=this.getSequenceFlowKind(t);this.convertedElements.registerSequenceFlow(new lt(t.id,t.name,t.sourceRef,t.targetRef,s))}}getSequenceFlowKind(e){if(this.defaultSequenceFlowIds.includes(e.id))return x.DEFAULT;{const t=this.convertedElements.findFlowNode(e.sourceRef);if(t&&p.isWithDefaultSequenceFlow(t.kind)&&e.conditionExpression)return p.isActivity(t.kind)?x.CONDITIONAL_FROM_ACTIVITY:x.CONDITIONAL_FROM_GATEWAY}return x.NORMAL}}const ks=n=>{const e=[],t=n.standardLoopCharacteristics,s=E(n.multiInstanceLoopCharacteristics,!0)[0];return t!==void 0?e.push(y.LOOP):s&&e.push(s.isSequential?y.MULTI_INSTANCE_SEQUENTIAL:y.MULTI_INSTANCE_PARALLEL),e};class Ms{constructor(e,t,s,o,i,r){this.categoryConverter=e,this.collaborationConverter=t,this.eventDefinitionConverter=s,this.globalTaskConverter=o,this.processConverter=i,this.diagramConverter=r}parse(e){const t=e.definitions;return this.categoryConverter.deserialize(t),this.collaborationConverter.deserialize(t.collaboration),this.eventDefinitionConverter.deserialize(t),this.globalTaskConverter.deserialize(t),this.processConverter.deserialize(t.process),this.diagramConverter.deserialize(t.BPMNDiagram)}}function Bs(n){const e=new Es;return new Ms(new cs(e),new Ss(e,n),new ys(e),new ws(e),new Ps(e,n),new Os(e,n))}const At=":A-Za-z_\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD",xs=At+"\\-.\\d\\u00B7\\u0300-\\u036F\\u203F-\\u2040",Ys="["+At+"]["+xs+"]*",Vs=new RegExp("^"+Ys+"$");function vt(n,e){const t=[];let s=e.exec(n);for(;s;){const o=[];o.startIndex=e.lastIndex-s[0].length;const i=s.length;for(let r=0;r"u")};function Gs(n){return typeof n<"u"}const Ds={allowBooleanAttributes:!1,unpairedTags:[]};function Us(n,e){e=Object.assign({},Ds,e);const t=[];let s=!1,o=!1;n[0]==="\uFEFF"&&(n=n.substr(1));for(let i=0;i"&&n[i]!==" "&&n[i]!==" "&&n[i]!==` +`&&n[i]!=="\r";i++)a+=n[i];if(a=a.trim(),a[a.length-1]==="/"&&(a=a.substring(0,a.length-1),i--),!js(a)){let g;return a.trim().length===0?g="Invalid space after '<'.":g="Tag '"+a+"' is an invalid name.",N("InvalidTag",g,R(n,i))}const d=Ks(n,i);if(d===!1)return N("InvalidAttr","Attributes for '"+a+"' have open quote.",R(n,i));let u=d.value;if(i=d.index,u[u.length-1]==="/"){const g=i-u.length;u=u.substring(0,u.length-1);const I=st(u,e);if(I===!0)s=!0;else return N(I.err.code,I.err.msg,R(n,g+I.err.line))}else if(l)if(d.tagClosed){if(u.trim().length>0)return N("InvalidTag","Closing tag '"+a+"' can't have attributes or invalid starting.",R(n,r));if(t.length===0)return N("InvalidTag","Closing tag '"+a+"' has not been opened.",R(n,r));{const g=t.pop();if(a!==g.tagName){let I=R(n,g.tagStartPos);return N("InvalidTag","Expected closing tag '"+g.tagName+"' (opened in line "+I.line+", col "+I.col+") instead of closing tag '"+a+"'.",R(n,r))}t.length==0&&(o=!0)}}else return N("InvalidTag","Closing tag '"+a+"' doesn't have proper closing.",R(n,i));else{const g=st(u,e);if(g!==!0)return N(g.err.code,g.err.msg,R(n,i-u.length+g.err.line));if(o===!0)return N("InvalidXml","Multiple possible root nodes found.",R(n,i));e.unpairedTags.indexOf(a)!==-1||t.push({tagName:a,tagStartPos:r}),s=!0}for(i++;i0)return N("InvalidXml","Invalid '"+JSON.stringify(t.map(i=>i.tagName),null,4).replace(/\r?\n/g,"")+"' found.",{line:1,col:1})}else return N("InvalidXml","Start tag expected.",1);return!0}function et(n){return n===" "||n===" "||n===` +`||n==="\r"}function tt(n,e){const t=e;for(;e5&&s==="xml")return N("InvalidXml","XML declaration allowed only at the start of the document.",R(n,e));if(n[e]=="?"&&n[e+1]==">"){e++;break}else continue}return e}function nt(n,e){if(n.length>e+5&&n[e+1]==="-"&&n[e+2]==="-"){for(e+=3;e"){e+=2;break}}else if(n.length>e+8&&n[e+1]==="D"&&n[e+2]==="O"&&n[e+3]==="C"&&n[e+4]==="T"&&n[e+5]==="Y"&&n[e+6]==="P"&&n[e+7]==="E"){let t=1;for(e+=8;e"&&(t--,t===0))break}else if(n.length>e+9&&n[e+1]==="["&&n[e+2]==="C"&&n[e+3]==="D"&&n[e+4]==="A"&&n[e+5]==="T"&&n[e+6]==="A"&&n[e+7]==="["){for(e+=8;e"){e+=2;break}}return e}const Ws='"',Hs="'";function Ks(n,e){let t="",s="",o=!1;for(;e"&&s===""){o=!0;break}t+=n[e]}return s!==""?!1:{value:t,index:e,tagClosed:o}}const zs=new RegExp(`(\\s*)([^\\s=]+)(\\s*=)?(\\s*(['"])(([\\s\\S])*?)\\5)?`,"g");function st(n,e){const t=vt(n,zs),s={};for(let o=0;o!1,commentPropName:!1,unpairedTags:[],processEntities:!0,htmlEntities:!1,ignoreDeclaration:!1,ignorePiTags:!1,transformTagName:!1,transformAttributeName:!1,updateTag:function(n,e,t){return n},captureMetaData:!1},Qs=function(n){return Object.assign({},qs,n)};let fe;typeof Symbol!="function"?fe="@@xmlMetadata":fe=Symbol("XML Node Metadata");class H{constructor(e){this.tagname=e,this.child=[],this[":@"]={}}add(e,t){e==="__proto__"&&(e="#__proto__"),this.child.push({[e]:t})}addChild(e,t){e.tagname==="__proto__"&&(e.tagname="#__proto__"),e[":@"]&&Object.keys(e[":@"]).length>0?this.child.push({[e.tagname]:e.child,":@":e[":@"]}):this.child.push({[e.tagname]:e.child}),t!==void 0&&(this.child[this.child.length-1][fe]={startIndex:t})}static getMetaDataSymbol(){return fe}}function Js(n,e){const t={};if(n[e+3]==="O"&&n[e+4]==="C"&&n[e+5]==="T"&&n[e+6]==="Y"&&n[e+7]==="P"&&n[e+8]==="E"){e=e+9;let s=1,o=!1,i=!1,r="";for(;e"){if(i?n[e-1]==="-"&&n[e-2]==="-"&&(i=!1,s--):s--,s===0)break}else n[e]==="["?o=!0:r+=n[e];if(s!==0)throw new Error("Unclosed DOCTYPE")}else throw new Error("Invalid Tag instead of DOCTYPE");return{entities:t,i:e}}const G=(n,e)=>{for(;e1||i.length===1&&!l))return n;{const a=Number(t),d=String(a);if(a===0)return a;if(d.search(/[eE]/)!==-1)return e.eNotation?a:n;if(t.indexOf(".")!==-1)return d==="0"||d===r||d===`${o}${r}`?a:n;let u=i?r:t;return i?u===d||o+u===d?a:n:u===d||u===o+d?a:n}}else return n}}const lo=/^([-+])?(0*)(\d*(\.\d*)?[eE][-\+]?\d+)$/;function ao(n,e,t){if(!t.eNotation)return n;const s=e.match(lo);if(s){let o=s[1]||"";const i=s[3].indexOf("e")===-1?"E":"e",r=s[2],l=o?n[r.length+1]===i:n[r.length]===i;return r.length>1&&l?n:r.length===1&&(s[3].startsWith(`.${i}`)||s[3][0]===i)?Number(e):t.leadingZeros&&!l?(e=(s[1]||"")+s[3],Number(e)):n}else return n}function co(n){return n&&n.indexOf(".")!==-1&&(n=n.replace(/0+$/,""),n==="."?n="0":n[0]==="."?n="0"+n:n[n.length-1]==="."&&(n=n.substring(0,n.length-1))),n}function uo(n,e){if(parseInt)return parseInt(n,e);if(Number.parseInt)return Number.parseInt(n,e);if(window&&window.parseInt)return window.parseInt(n,e);throw new Error("parseInt, Number.parseInt, window.parseInt are not supported")}function ho(n){return typeof n=="function"?n:Array.isArray(n)?e=>{for(const t of n)if(typeof t=="string"&&e===t||t instanceof RegExp&&t.test(e))return!0}:()=>!1}class fo{constructor(e){this.options=e,this.currentNode=null,this.tagsNodeStack=[],this.docTypeEntities={},this.lastEntities={apos:{regex:/&(apos|#39|#x27);/g,val:"'"},gt:{regex:/&(gt|#62|#x3E);/g,val:">"},lt:{regex:/&(lt|#60|#x3C);/g,val:"<"},quot:{regex:/&(quot|#34|#x22);/g,val:'"'}},this.ampEntity={regex:/&(amp|#38|#x26);/g,val:"&"},this.htmlEntities={space:{regex:/&(nbsp|#160);/g,val:" "},cent:{regex:/&(cent|#162);/g,val:"¢"},pound:{regex:/&(pound|#163);/g,val:"£"},yen:{regex:/&(yen|#165);/g,val:"¥"},euro:{regex:/&(euro|#8364);/g,val:"€"},copyright:{regex:/&(copy|#169);/g,val:"©"},reg:{regex:/&(reg|#174);/g,val:"®"},inr:{regex:/&(inr|#8377);/g,val:"₹"},num_dec:{regex:/&#([0-9]{1,7});/g,val:(t,s)=>String.fromCodePoint(Number.parseInt(s,10))},num_hex:{regex:/&#x([0-9a-fA-F]{1,6});/g,val:(t,s)=>String.fromCodePoint(Number.parseInt(s,16))}},this.addExternalEntities=go,this.parseXml=Io,this.parseTextData=To,this.resolveNameSpace=po,this.buildAttributesMap=So,this.isItStopNode=vo,this.replaceEntitiesValue=mo,this.readStopNodeData=Lo,this.saveTextToParentTag=Ao,this.addChild=Co,this.ignoreAttributesFn=ho(this.options.ignoreAttributes)}}function go(n){const e=Object.keys(n);for(let t=0;t0)){r||(n=this.replaceEntitiesValue(n));const l=this.options.tagValueProcessor(e,n,t,o,i);return l==null?n:typeof l!=typeof n||l!==n?l:this.options.trimValues?be(n,this.options.parseTagValue,this.options.numberParseOptions):n.trim()===n?be(n,this.options.parseTagValue,this.options.numberParseOptions):n}}function po(n){if(this.options.removeNSPrefix){const e=n.split(":"),t=n.charAt(0)==="/"?"/":"";if(e[0]==="xmlns")return"";e.length===2&&(n=t+e[1])}return n}const Eo=new RegExp(`([^\\s=]+)\\s*(=\\s*(['"])([\\s\\S]*?)\\3)?`,"gm");function So(n,e,t){if(this.options.ignoreAttributes!==!0&&typeof n=="string"){const s=vt(n,Eo),o=s.length,i={};for(let r=0;r",i,"Closing Tag is not closed.");let a=n.substring(i+2,l).trim();if(this.options.removeNSPrefix){const g=a.indexOf(":");g!==-1&&(a=a.substr(g+1))}this.options.transformTagName&&(a=this.options.transformTagName(a)),t&&(s=this.saveTextToParentTag(s,t,o));const d=o.substring(o.lastIndexOf(".")+1);if(a&&this.options.unpairedTags.indexOf(a)!==-1)throw new Error(`Unpaired tag can not be used as closing tag: `);let u=0;d&&this.options.unpairedTags.indexOf(d)!==-1?(u=o.lastIndexOf(".",o.lastIndexOf(".")-1),this.tagsNodeStack.pop()):u=o.lastIndexOf("."),o=o.substring(0,u),t=this.tagsNodeStack.pop(),s="",i=l}else if(n[i+1]==="?"){let l=Re(n,i,!1,"?>");if(!l)throw new Error("Pi Tag is not closed.");if(s=this.saveTextToParentTag(s,t,o),!(this.options.ignoreDeclaration&&l.tagName==="?xml"||this.options.ignorePiTags)){const a=new H(l.tagName);a.add(this.options.textNodeName,""),l.tagName!==l.tagExp&&l.attrExpPresent&&(a[":@"]=this.buildAttributesMap(l.tagExp,o,l.tagName)),this.addChild(t,a,o,i)}i=l.closeIndex+1}else if(n.substr(i+1,3)==="!--"){const l=z(n,"-->",i+4,"Comment is not closed.");if(this.options.commentPropName){const a=n.substring(i+4,l-2);s=this.saveTextToParentTag(s,t,o),t.add(this.options.commentPropName,[{[this.options.textNodeName]:a}])}i=l}else if(n.substr(i+1,2)==="!D"){const l=Js(n,i);this.docTypeEntities=l.entities,i=l.i}else if(n.substr(i+1,2)==="!["){const l=z(n,"]]>",i,"CDATA is not closed.")-2,a=n.substring(i+9,l);s=this.saveTextToParentTag(s,t,o);let d=this.parseTextData(a,t.tagname,o,!0,!1,!0,!0);d==null&&(d=""),this.options.cdataPropName?t.add(this.options.cdataPropName,[{[this.options.textNodeName]:a}]):t.add(this.options.textNodeName,d),i=l+2}else{let l=Re(n,i,this.options.removeNSPrefix),a=l.tagName;const d=l.rawTagName;let u=l.tagExp,g=l.attrExpPresent,I=l.closeIndex;this.options.transformTagName&&(a=this.options.transformTagName(a)),t&&s&&t.tagname!=="!xml"&&(s=this.saveTextToParentTag(s,t,o,!1));const C=t;C&&this.options.unpairedTags.indexOf(C.tagname)!==-1&&(t=this.tagsNodeStack.pop(),o=o.substring(0,o.lastIndexOf("."))),a!==e.tagname&&(o+=o?"."+a:a);const L=i;if(this.isItStopNode(this.options.stopNodes,o,a)){let _="";if(u.length>0&&u.lastIndexOf("/")===u.length-1)a[a.length-1]==="/"?(a=a.substr(0,a.length-1),o=o.substr(0,o.length-1),u=a):u=u.substr(0,u.length-1),i=l.closeIndex;else if(this.options.unpairedTags.indexOf(a)!==-1)i=l.closeIndex;else{const J=this.readStopNodeData(n,d,I+1);if(!J)throw new Error(`Unexpected end of ${d}`);i=J.i,_=J.tagContent}const Q=new H(a);a!==u&&g&&(Q[":@"]=this.buildAttributesMap(u,o,a)),_&&(_=this.parseTextData(_,a,o,!0,g,!0,!0)),o=o.substr(0,o.lastIndexOf(".")),Q.add(this.options.textNodeName,_),this.addChild(t,Q,o,L)}else{if(u.length>0&&u.lastIndexOf("/")===u.length-1){a[a.length-1]==="/"?(a=a.substr(0,a.length-1),o=o.substr(0,o.length-1),u=a):u=u.substr(0,u.length-1),this.options.transformTagName&&(a=this.options.transformTagName(a));const _=new H(a);a!==u&&g&&(_[":@"]=this.buildAttributesMap(u,o,a)),this.addChild(t,_,o,L),o=o.substr(0,o.lastIndexOf("."))}else{const _=new H(a);this.tagsNodeStack.push(t),a!==u&&g&&(_[":@"]=this.buildAttributesMap(u,o,a)),this.addChild(t,_,o,L),t=_}s="",i=I}}else s+=n[i];return e.child};function Co(n,e,t,s){this.options.captureMetaData||(s=void 0);const o=this.options.updateTag(e.tagname,t,e[":@"]);o===!1||(typeof o=="string"&&(e.tagname=o),n.addChild(e,s))}const mo=function(n){if(this.options.processEntities){for(let e in this.docTypeEntities){const t=this.docTypeEntities[e];n=n.replace(t.regx,t.val)}for(let e in this.lastEntities){const t=this.lastEntities[e];n=n.replace(t.regex,t.val)}if(this.options.htmlEntities)for(let e in this.htmlEntities){const t=this.htmlEntities[e];n=n.replace(t.regex,t.val)}n=n.replace(this.ampEntity.regex,this.ampEntity.val)}return n};function Ao(n,e,t,s){return n&&(s===void 0&&(s=e.child.length===0),n=this.parseTextData(n,e.tagname,t,!1,e[":@"]?Object.keys(e[":@"]).length!==0:!1,s),n!==void 0&&n!==""&&e.add(this.options.textNodeName,n),n=""),n}function vo(n,e,t){const s="*."+t;for(const o in n){const i=n[o];if(s===i||e===i)return!0}return!1}function Oo(n,e,t=">"){let s,o="";for(let i=e;i",t,`${e} is not closed`);if(n.substring(t+2,i).trim()===e&&(o--,o===0))return{tagContent:n.substring(s,t),i};t=i}else if(n[t+1]==="?")t=z(n,"?>",t+1,"StopNode is not closed.");else if(n.substr(t+1,3)==="!--")t=z(n,"-->",t+3,"StopNode is not closed.");else if(n.substr(t+1,2)==="![")t=z(n,"]]>",t,"StopNode is not closed.")-2;else{const i=Re(n,t,">");i&&((i&&i.tagName)===e&&i.tagExp[i.tagExp.length-1]!=="/"&&o++,t=i.closeIndex)}}function be(n,e,t){if(e&&typeof n=="string"){const s=n.trim();return s==="true"?!0:s==="false"?!1:ro(n,t)}else return Gs(n)?n:""}const Ie=H.getMetaDataSymbol();function No(n,e){return Ot(n,e)}function Ot(n,e,t){let s;const o={};for(let i=0;i0&&(o[e.textNodeName]=s):s!==void 0&&(o[e.textNodeName]=s),o}function _o(n){const e=Object.keys(n);for(let t=0;t"},{regex:/&(lt|#60|#x3c|#x3C);/g,val:"<"},{regex:/&(quot|#34|#x22);/g,val:'"'}],Fo=new Set(["BPMNShape.Bounds","BPMNShape.BPMNLabel.Bounds","BPMNEdge.BPMNLabel.Bounds","BPMNEdge.waypoint"].map(n=>`definitions.BPMNDiagram.BPMNPlane.${n}`)),Po=new Set(["x","y","width","height"]),ko=(n,e)=>Fo.has(e)&&Po.has(n);class Mo{constructor(e){f(this,"x2jOptions",{attributeNamePrefix:"",removeNSPrefix:!0,ignoreAttributes:!1,parseAttributeValue:!0,processEntities:!1,attributeValueProcessor:(e,t,s)=>ko(e,s)?Number(t):this.processAttribute(t)});f(this,"xmlParser",new Ro(this.x2jOptions));this.options=e}parse(e){let t;try{t=this.xmlParser.parse(e)}catch{throw new Error("XML parsing failed. Invalid BPMN source.")}if(!t.definitions)throw new Error("XML parsing failed. Unable to retrieve 'definitions' from the BPMN source.");return t}processAttribute(e){var t;for(const s of bo)e=e.replace(s.regex,s.val);return(t=this.options)!=null&&t.additionalXmlAttributeProcessor&&(e=this.options.additionalXmlAttributeProcessor(e)),e}}class Bo{constructor(e,t){this.jsonParser=e,this.xmlParser=t}parse(e){const t=this.xmlParser.parse(e);return this.jsonParser.parse(t)}}function xo(n){return new Bo(Bs(new us(n)),new Mo(n))}function Yo(n){return new Vo(n)}class Vo{constructor(e){this.graph=e}updateAndRefreshCssClassesOfCell(e,t){this.updateAndRefreshCssClassesOfElement(e,t),this.updateAndRefreshCssClassesOfElement(Me(e),t)}updateAndRefreshCssClassesOfElement(e,t){const s=this.graph.getModel(),o=s.getCell(e);if(!o)return;let i=o.getStyle();i=b(i,S.EXTRA_CSS_CLASSES,t.join(",")),s.setStyle(o,i)}}function Go(n){return new Do(Yo(n),new Uo)}class Do{constructor(e,t){this.cssClassesUpdater=e,this.cssClassesCache=t}clearCache(){this.cssClassesCache.clear()}addCssClasses(e,t){this.updateCssClasses(e,t,this.cssClassesCache.addClassNames)}removeCssClasses(e,t){this.updateCssClasses(e,t,this.cssClassesCache.removeClassNames)}removeAllCssClasses(e){if(e||e=="")for(const t of E(e)){const s=this.cssClassesCache.removeAllClassNames(t);this.updateCellIfChanged(s,t)}else{const t=this.cssClassesCache.getBpmnIds();this.cssClassesCache.clear();for(const s of t)this.updateCellIfChanged(!0,s)}}toggleCssClasses(e,t){this.updateCssClasses(e,t,this.cssClassesCache.toggleClassNames)}updateCssClasses(e,t,s){const o=E(t);for(const i of E(e))this.updateCellIfChanged(s(i,o),i)}updateCellIfChanged(e,t){if(e){const s=this.cssClassesCache.getClassNames(t);this.cssClassesUpdater.updateAndRefreshCssClassesOfCell(t,s)}}}class Uo{constructor(){f(this,"classNamesByBpmnId",new Map);f(this,"clear",()=>{this.classNamesByBpmnId.clear()});f(this,"addClassNames",(e,t)=>this.updateClassNames(e,t,(s,o)=>s.add(o)));f(this,"removeClassNames",(e,t)=>this.updateClassNames(e,t,(s,o)=>s.delete(o)));f(this,"toggleClassNames",(e,t)=>(this.updateClassNames(e,t,(s,o)=>s.has(o)?s.delete(o):s.add(o)),t&&t.length>0))}getClassNames(e){return this.classNamesByBpmnId.has(e)?[...this.classNamesByBpmnId.get(e)]:[]}getBpmnIds(){return[...this.classNamesByBpmnId.keys()]}removeAllClassNames(e){const t=this.getOrInitializeClassNames(e),s=t.size;return t.clear(),t.sizeWo.get(n.position),Ko=(n,e)=>{e&&(n.fill.color=e.color??n.fill.color,n.fill.opacity=e.opacity??n.fill.opacity)},zo=(n,e)=>{e&&(n.stroke.color=e.color??n.stroke.color,n.stroke.width=e.width??n.stroke.width)},Xo=(n,e)=>{e&&(n.font.color=e.color??n.font.color,n.font.size=e.size??n.font.size)},$o=n=>{const e={fill:{color:T.DEFAULT_OVERLAY_FILL_COLOR.valueOf(),opacity:T.DEFAULT_OVERLAY_FILL_OPACITY.valueOf()},stroke:{color:T.DEFAULT_OVERLAY_STROKE_COLOR.valueOf(),width:T.DEFAULT_OVERLAY_STROKE_WIDTH.valueOf()},font:{color:T.DEFAULT_OVERLAY_FONT_COLOR.valueOf(),size:T.DEFAULT_OVERLAY_FONT_SIZE.valueOf()}},t=n.style,s={...e};return t&&(Ko(s,t.fill),zo(s,t.stroke),Xo(s,t.font)),s};class Zo{convert(e){const t=Ho(e),s=$o(e);return{position:t,style:s}}}function jo(n){return new qo(n,new Zo)}class qo{constructor(e,t){this.graph=e,this.overlayConverter=t}addOverlays(e,t){const s=this.graph.getModel().getCell(e);if(s)for(const o of E(t)){const i=new Tt(o.label,this.overlayConverter.convert(o));this.graph.addCellOverlay(s,i)}}removeAllOverlays(e){const t=this.graph.getModel().getCell(e);t&&this.graph.removeCellOverlays(t)}}function Qo(n){return new Jo(jo(n))}class Jo{constructor(e){this.overlaysUpdater=e}addOverlays(e,t){this.overlaysUpdater.addOverlays(e,t)}removeAllOverlays(e){this.overlaysUpdater.removeAllOverlays(e)}}class ei{element(e){return`svg > g > g > g[data-bpmn-id="${e}"]`}elementsOfKind(e){return`svg > g > g > g.${e}:not(.bpmn-label)`}}function ti(n){return new ni(n,new si(n.getModel()))}const ot=n=>{const e=E(n);return e.push(...e.map(t=>Me(t))),e};class ni{constructor(e,t){this.graph=e,this.styleManager=t}clear(){this.styleManager.clear()}updateStyle(e,t){if(!t)return;const s=this.graph.getModel(),o=ot(e).map(i=>s.getCell(i)).filter(Boolean);o.length!==0&&this.graph.batchUpdate(()=>{for(const i of o){this.styleManager.ensureStyleIsStored(i);let r=i.getStyle();r=b(r,c.STYLE_OPACITY,t.opacity,Ee),r=Qt(r,t.stroke),r=Jt(r,t.font),sn(t)&&(r=nn(r,t.fill)),s.setStyle(i,r)}})}resetStyle(e){this.graph.batchUpdate(()=>{if(e||e=="")for(const t of ot(e))this.styleManager.resetStyleIfIsStored(t);else this.styleManager.resetAllStyles()})}}const it=S.EXTRA_CSS_CLASSES;class si{constructor(e){f(this,"stylesCache",new Map);this.model=e}clear(){this.stylesCache.clear()}resetAllStyles(){for(const e of this.stylesCache.keys())this.resetStyle(e,this.stylesCache.get(e))}resetStyleIfIsStored(e){const t=this.stylesCache.get(e);t&&this.resetStyle(e,t)}resetStyle(e,t){const s=this.model.getCell(e),o=en(s.getStyle(),it,""),i=b(t,it,o);this.model.setStyle(s,i),this.stylesCache.delete(e)}ensureStyleIsStored(e){const t=e.getId();this.stylesCache.has(t)||this.stylesCache.set(t,e.getStyle())}}function oi(n){return new ii(ti(n))}class ii{constructor(e){this.styleUpdater=e}clearCache(){this.styleUpdater.clear()}updateStyle(e,t){this.styleUpdater.updateStyle(e,t)}resetStyle(e){this.styleUpdater.resetStyle(e)}}function ri(n,e){return new li(n,new ai(e.container,new ei),Go(e),Qo(e),oi(e))}class li{constructor(e,t,s,o,i){this.bpmnModelRegistry=e,this.htmlElementRegistry=t,this.cssClassesRegistry=s,this.overlaysRegistry=o,this.styleRegistry=i,this.bpmnModelRegistry.registerOnLoadCallback(()=>{this.cssClassesRegistry.clearCache(),this.styleRegistry.clearCache()})}getModelElementsByIds(e){return Ce(e).map(t=>this.bpmnModelRegistry.getBpmnSemantic(t)).filter(Boolean)}getElementsByIds(e){return this.getModelElementsByIds(e).map(t=>({bpmnSemantic:t,htmlElement:this.htmlElementRegistry.getBpmnHtmlElement(t.id)}))}getModelElementsByKinds(e){return Ce(e).flatMap(t=>this.htmlElementRegistry.getBpmnHtmlElements(t)).map(t=>this.getRelatedBpmnSemantic(t))}getElementsByKinds(e){return Ce(e).flatMap(t=>this.htmlElementRegistry.getBpmnHtmlElements(t)).map(t=>({htmlElement:t,bpmnSemantic:this.getRelatedBpmnSemantic(t)}))}getRelatedBpmnSemantic(e){return this.bpmnModelRegistry.getBpmnSemantic(e.dataset.bpmnId)}addCssClasses(e,t){this.cssClassesRegistry.addCssClasses(e,t)}removeCssClasses(e,t){this.cssClassesRegistry.removeCssClasses(e,t)}removeAllCssClasses(e){this.cssClassesRegistry.removeAllCssClasses(e)}toggleCssClasses(e,t){this.cssClassesRegistry.toggleCssClasses(e,t)}addOverlays(e,t){this.overlaysRegistry.addOverlays(e,t)}removeAllOverlays(e){this.overlaysRegistry.removeAllOverlays(e)}updateStyle(e,t){this.styleRegistry.updateStyle(e,t)}resetStyle(e){this.styleRegistry.resetStyle(e)}}class ai{constructor(e,t){this.container=e,this.querySelectors=t}getBpmnHtmlElement(e){return this.container.querySelector(this.querySelectors.element(e))}getBpmnHtmlElements(e){const t=this.querySelectors.elementsOfKind(Ne(e));return[...this.container.querySelectorAll(t)]}}const Ce=n=>[...new Set(E(n))];class ci{filter(e,t){const s=[],o=[];for(const C of E(t==null?void 0:t.pools).filter(L=>L&&Object.keys(L).length>0))C.id?s.push(C.id):C.name&&o.push(C.name);if(s.length===0&&o.length===0)return e;const{filteredPools:i,filteredPoolIds:r}=ui(e,s,o),l=[...s,...r],{filteredLanes:a,filteredLaneIds:d,filteredFlowNodes:u,filteredFlowNodeIds:g}=Lt(e.lanes,e.flowNodes,l),I=hi(e.edges,[...l,...d,...g]);if(i.length===0&&a.length===0&&u.length===0&&I.length===0){let C=s.length>0?` for ids [${s}]`:"";const L=C?" and":"";throw C+=o.length>0?`${L} for names [${o}]`:"",new Error("No matching pools"+C)}return{lanes:a,flowNodes:u,pools:i,edges:I}}}function ui(n,e,t){const s=n.pools.filter(i=>e.includes(i.bpmnElement.id)||t.includes(i.bpmnElement.name)),o=s.map(i=>i.bpmnElement.id);return{filteredPools:s,filteredPoolIds:o}}function Lt(n,e,t){const{filteredLanes:s,filteredLaneIds:o}=Nt(n,t),{filteredLanes:i,filteredLaneIds:r,filteredFlowNodes:l,filteredFlowNodeIds:a}=di(e,[...t,...o],n);return s.push(...i),o.push(...r),{filteredLanes:s,filteredLaneIds:o,filteredFlowNodes:l,filteredFlowNodeIds:a}}function Nt(n,e){const t=n.filter(o=>e.includes(o.bpmnElement.parentId)),s=t.map(o=>o.bpmnElement.id);if(t.length>0){const{filteredLanes:o,filteredLaneIds:i}=Nt(n,s);t.push(...o),s.push(...i)}return{filteredLanes:t,filteredLaneIds:s}}function di(n,e,t){const s=n.filter(d=>e.includes(d.bpmnElement.parentId));if(s.length===0)return{filteredLanes:[],filteredLaneIds:[],filteredFlowNodes:[],filteredFlowNodeIds:[]};const o=s.map(d=>d.bpmnElement.id),{filteredLanes:i,filteredLaneIds:r,filteredFlowNodes:l,filteredFlowNodeIds:a}=Lt(t,n,o);return s.push(...l),o.push(...a),{filteredLanes:i,filteredLaneIds:r,filteredFlowNodes:s,filteredFlowNodeIds:o}}function hi(n,e){return n.filter(t=>e.includes(t.bpmnElement.sourceReferenceId)&&e.includes(t.bpmnElement.targetReferenceId))}class fi{constructor(){f(this,"searchableModel");f(this,"onLoadCallback")}load(e,t){var o;const s=new ci().filter(e,t);return this.searchableModel=new Ti(s),(o=this.onLoadCallback)==null||o.call(this),gi(s)}registerOnLoadCallback(e){this.onLoadCallback=e}getBpmnSemantic(e){var i;const t=(i=this.searchableModel)==null?void 0:i.elementById(e);if(!t)return;const s=t.bpmnElement,o=s instanceof B;return{id:e,isShape:o,kind:s.kind,name:s.name,...s instanceof Te?{sourceRefId:s.sourceReferenceId,targetRefId:s.targetReferenceId}:{callActivityGlobalTaskKind:s instanceof X?s.globalTaskKind:void 0,callActivityKind:s instanceof X?s.callActivityKind:void 0,eventDefinitionKind:s instanceof U?s.eventDefinitionKind:void 0,linkEventSourceIds:s instanceof Oe&&s.eventDefinitionKind==w.LINK?s.sourceIds:void 0,linkEventTargetId:s instanceof Le?s.targetId:void 0,incomingIds:s.incomingIds,outgoingIds:s.outgoingIds,parentId:s.parentId,subProcessKind:s instanceof ie?s.subProcessKind:void 0}}}}function gi(n){const e=new Set(n.flowNodes.filter(i=>{const r=i.bpmnElement;return p.isSubProcess(r.kind)&&r.markers.includes(y.EXPAND)}).map(i=>i.bpmnElement.id)),t=[],s=[],o=[];for(const i of n.flowNodes){const r=i.bpmnElement.kind;p.isSubProcess(r)?t.push(i):p.isBoundaryEvent(r)?s.push(i):e.has(i.bpmnElement.parentId)||o.push(i)}return{boundaryEvents:s,edges:n.edges,lanes:n.lanes,otherFlowNodes:o,pools:n.pools,subprocesses:t}}class Ti{constructor(e){f(this,"elements",new Map);for(const t of[...e.pools,...e.lanes,...e.flowNodes,...e.edges])this.elements.set(t.bpmnElement.id,t)}elementById(e){return this.elements.get(e)}}class pi{constructor(e){f(this,"graph");f(this,"navigation");f(this,"bpmnElementsRegistry");f(this,"bpmnModelRegistry");f(this,"parserOptions");f(this,"rendererOptions");this.rendererOptions=e==null?void 0:e.renderer;const t=new ss(Vt(e==null?void 0:e.container));this.graph=t.configure(),this.navigation=rs(this.graph,e==null?void 0:e.navigation),this.bpmnModelRegistry=new fi,this.bpmnElementsRegistry=ri(this.bpmnModelRegistry,this.graph),this.parserOptions=e==null?void 0:e.parser}load(e,t){const s=xo(this.parserOptions).parse(e),o=this.bpmnModelRegistry.load(s,t==null?void 0:t.modelFilter);fn(this.graph,this.rendererOptions).render(o),this.navigation.fit(t==null?void 0:t.fit)}}function xi(n){document.readyState==="complete"||document.readyState==="interactive"?setTimeout(n,1):document.addEventListener("DOMContentLoaded",n)}function m(n,...e){De("[DEMO]",n,...e)}function De(n,e,...t){console.info(`${n} ${e}`,...t)}function F(n,...e){De("[DEMO STARTUP]",n,...e)}function _t(n,e){yt(n),window.alert(n)}function yt(n){console.error("[DEMO]",n)}function Z(n,...e){De("[DEMO DOWNLOAD]",n,...e)}async function Ei(n){m(`Fetching BPMN content from url ${n}`);const e=await fetch(n);if(!e.ok)throw new Error(`HTTP status ${e.status}`);return await e.text()}function wt(n,e,t){const s=document.createElement("a");e.startsWith("data:image/svg+xml")&&(t=encodeURIComponent(t),e+=","),s.setAttribute("href",e+t),s.setAttribute("download",n),s.style.display="none",document.body.append(s),s.click(),s.remove()}function Si(n){Z("Start SVG download"),wt("diagram.svg","data:image/svg+xml",n),Z("Download completed")}function Ii(n){Z("Start PNG download");const e=new Blob([n],{type:"image/svg+xml;charset=utf-8"}),t=URL.createObjectURL(e),s=document.createElement("img");s.setAttribute("style","position: absolute; top: -9999px"),s.crossOrigin="anonymous",document.body.append(s);const o=document.createElement("canvas"),i=o.getContext("2d");s.addEventListener("load",function(){const r=new Image;o.width=s.naturalWidth,o.height=s.naturalHeight,r.crossOrigin="Anonymous",r.addEventListener("load",function(){i.drawImage(r,0,0),URL.revokeObjectURL(t);const l=o.toDataURL("image/png");s.remove(),wt("diagram.png","",l),Z("Download completed")}),r.src=s.src}),s.src=t}class Ci{constructor(e,t,s,o){f(this,"document");f(this,"head");this.window=e,this.outerContainerId=t,this.containerToFade=s,this.dropCallback=o,this.document=e.document,this.head=document.head,this.initializeDragAndDrop()}initializeDragAndDrop(){this.containerToFade.classList.add("faded-container"),this.addDomElements(this.containerToFade),this.addStyle();const e=document.querySelector(`#${this.outerContainerId}`);this.preventDefaultsOnEvents(["dragover","drop"],this.window),this.preventDefaultsOnEvents(["dragover","dragleave","drop"],e),this.addEventsOnDropContainer(e,this.containerToFade),this.addEventsOnDocument(this.outerContainerId,this.containerToFade)}preventDefaults(e){e.preventDefault(),e.stopPropagation()}preventDefaultsOnEvents(e,t){for(const s of e)t.addEventListener(s,this.preventDefaults.bind(this),!1)}addDomElements(e){const t=this.document.createElement("p");t.textContent="open BPMN diagram";const s=this.document.createElement("div");s.classList.add("drop-here-text"),s.append(t);const o=this.document.createElement("div");o.id=this.outerContainerId,o.append(s),e.parentNode.prepend(o)}addStyle(){const e=` .faded-container { opacity: 1; } @@ -44,7 +44,7 @@ var yt=Object.defineProperty;var wt=(n,t,e)=>t in n?yt(n,t,{enumerable:!0,config align-items: center; border: 2px dashed rgba(0,0,0,.2); border-radius: 7px; -}`,e=document.createElement("style");e.append(document.createTextNode(t)),this.head.append(e)}addEventsOnDropContainer(t,e){t.addEventListener("dragover",this.getAddClassCallback(e,!1),!1),t.addEventListener("mousedown",this.getRemoveClassCallback(e,!1),!1),t.addEventListener("drop",this.getDropCallbackForElement(e,!1,this.dropCallback),!1)}addEventsOnDocument(t,e){this.document.addEventListener("dragover",this.getAddClassCallback(e,!0,t),!1),this.document.addEventListener("dragleave",this.getRemoveClassCallback(e,!0,t),!1),this.document.addEventListener("drop",this.getDropCallbackForElement(e,!0,this.dropCallback,t),!1)}getAddClassCallback(t,e,s){return function(){e?this.querySelector("#"+s).classList.add("dragging"):this.classList.add("dragging"),t.classList.add("faded")}}getRemoveClassCallback(t,e,s){return function(){e?this.querySelector("#"+s).classList.remove("dragging"):this.classList.remove("dragging"),t.classList.remove("faded")}}getDropCallbackForElement(t,e,s,o){return function(i){try{const l=i.dataTransfer.files;s(l[0])}catch(r){const l=r instanceof Error?r.message:String(r);Ct(l)}finally{e?this.querySelector("#"+o).classList.remove("dragging"):this.classList.remove("dragging"),t.classList.remove("faded")}}}}class vt{constructor(t){this.graph=t}exportSvg(){return this.doSvgExport(!0)}exportSvgForPng(){const t=Vt.IS_FF;return this.doSvgExport(t)}doSvgExport(t){const e=this.computeSvg({scale:1,border:25,enableForeignObjectForLabel:t});return` +}`,t=document.createElement("style");t.append(document.createTextNode(e)),this.head.append(t)}addEventsOnDropContainer(e,t){e.addEventListener("dragover",this.getAddClassCallback(t,!1),!1),e.addEventListener("mousedown",this.getRemoveClassCallback(t,!1),!1),e.addEventListener("drop",this.getDropCallbackForElement(t,!1,this.dropCallback),!1)}addEventsOnDocument(e,t){this.document.addEventListener("dragover",this.getAddClassCallback(t,!0,e),!1),this.document.addEventListener("dragleave",this.getRemoveClassCallback(t,!0,e),!1),this.document.addEventListener("drop",this.getDropCallbackForElement(t,!0,this.dropCallback,e),!1)}getAddClassCallback(e,t,s){return function(){t?this.querySelector("#"+s).classList.add("dragging"):this.classList.add("dragging"),e.classList.add("faded")}}getRemoveClassCallback(e,t,s){return function(){t?this.querySelector("#"+s).classList.remove("dragging"):this.classList.remove("dragging"),e.classList.remove("faded")}}getDropCallbackForElement(e,t,s,o){return function(i){try{const l=i.dataTransfer.files;s(l[0])}catch(r){const l=r instanceof Error?r.message:String(r);_t(l)}finally{t?this.querySelector("#"+o).classList.remove("dragging"):this.classList.remove("dragging"),e.classList.remove("faded")}}}}class Rt{constructor(e){this.graph=e}exportSvg(){return this.doSvgExport(!0)}exportSvgForPng(){const e=zt.IS_FF;return this.doSvgExport(e)}doSvgExport(e){const t=this.computeSvg({scale:1,border:25,enableForeignObjectForLabel:e});return` -${v.getXml(e)} -`}computeSvg(t){const e=t.scale??1,s=t.border??0,o=t.crisp??!0,i=t.enableForeignObjectForLabel??!0,r=this.graph.getGraphBounds(),l=this.graph.view.scale,a=v.createXmlDocument(),h=a.createElementNS(c.NS_SVG,"svg"),u=e/l,f=Math.max(1,Math.ceil(r.width*u)+2*s),p=Math.max(1,Math.ceil(r.height*u)+2*s);h.setAttribute("version","1.1"),h.setAttribute("width",f+"px"),h.setAttribute("height",p+"px"),h.setAttribute("viewBox",(o?"-0.5 -0.5":"0 0")+" "+f+" "+p),a.append(h);const m=a.createElementNS(c.NS_SVG,"g");h.append(m);const C=this.createSvgCanvas(m);C.foEnabled=i,C.foOffset=o?-.5:0,C.textOffset=o?-.5:0,C.imageOffset=o?-.5:0,C.translate(Math.floor((s/e-r.x)/l),Math.floor((s/e-r.y)/l)),C.scale(u);const b=new L.mxImageExport;return b.includeOverlays=!0,b.drawState(this.graph.getView().getState(this.graph.model.root),C),a}createSvgCanvas(t){const e=new Ti(t);return e.pointerEvents=!0,e}}class Ti extends ye{constructor(e){super(e);g(this,"htmlConverter",document.createElement("div"))}getAlternateText(e,s,o,i,r,l,a,h,u,f,p,m,C){return this.computeTruncatedText(l,i)}plainText(e,s,o,i,r,l,a,h,u,f,p,m){r=this.computeTruncatedText(r,o),super.plainText(e,s,o,i,r,l,a,h,u,f,p,m)}computeTruncatedText(e,s){if(e==null||this.state.fontSize<=0)return"";try{this.htmlConverter.innerHTML=e,e=v.extractTextWithWhitespace(this.htmlConverter.childNodes);const o=Math.ceil(2*s/this.state.fontSize),i=[];let r=0,l=0;for(;(o==0||r0)break}else i.push(e.charAt(l)),a<255&&r++;l++}i.length1&&(e=v.trim(i.join(""))+"...")}catch(o){console.warn("Error while computing txt label",o)}return e}}const pi=new Map([["dark",{defaultFillColor:"#334352",defaultFontColor:"white",defaultStrokeColor:"#c0ddeb",endEventFillColor:"pink",endEventStrokeColor:"FireBrick",startEventFillColor:"DarkSeaGreen",startEventStrokeColor:"DarkGreen",taskAndCallActivityFillColor:"#5c8599",laneFillColor:"#2b3742",poolFillColor:"#232b33"}],["brown",{defaultFillColor:"#ede7e1",defaultFontColor:"#414666",defaultStrokeColor:"#414666",flowColor:"#666666",catchAndThrowEventStrokeColor:"#377f87",endEventFillColor:"pink",endEventStrokeColor:"FireBrick",startEventFillColor:"DarkSeaGreen",startEventStrokeColor:"DarkGreen",taskAndCallActivityFillColor:"#dadce8",laneFillColor:"#d4c3b2",poolFillColor:"#d1b9a1"}],["light-blue",{defaultFillColor:"#ffffff",defaultFontColor:"#002395",defaultStrokeColor:"#002395",endEventFillColor:"#f9dadc",endEventStrokeColor:"#e20613",startEventFillColor:"#ffffff",startEventStrokeColor:"#05d99e",taskAndCallActivityFillColor:"rgba(132,158,253,0.1)",textAnnotationFillColor:"rgba(237,237,245,0.5)",laneFillColor:"#edeef5",poolFillColor:"#dbefff"}]]);class Ei extends ui{configureTheme(t){if(t=="default")return new ht(this.graph).configureStyles(),!0;const e=pi.get(t);if(!e)return!1;const s=this.graph.getStylesheet();for(const u of E.eventKinds()){let f,p;switch(u){case"endEvent":{f=e.endEventFillColor,p=e.endEventStrokeColor;break}case"startEvent":{f=e.startEventFillColor,p=e.startEventStrokeColor;break}case"intermediateCatchEvent":case"intermediateThrowEvent":case"boundaryEvent":{f=e.defaultFillColor,p=e.catchAndThrowEventStrokeColor??e.defaultStrokeColor;break}default:{f=e.defaultFillColor,p=e.defaultStrokeColor;break}}const m=s.styles[u];m.fillColor=f,m.strokeColor=p}for(const u of E.taskKinds()){const f=s.styles[u];f.fillColor=e.taskAndCallActivityFillColor}const o=s.styles[d.CALL_ACTIVITY];o.fillColor=e.taskAndCallActivityFillColor;const i=s.styles[d.TEXT_ANNOTATION];i.fillColor=e.textAnnotationFillColor??T.TEXT_ANNOTATION_FILL_COLOR;const r=s.styles[d.POOL];r.fillColor=e.poolFillColor,r.swimlaneFillColor=e.defaultFillColor;const l=s.styles[d.LANE];l.fillColor=e.laneFillColor;const a=s.getDefaultVertexStyle();a.fontColor=e.defaultFontColor,a.fillColor=e.defaultFillColor,a.strokeColor=e.defaultStrokeColor;const h=s.getDefaultEdgeStyle();return h.fontColor=e.defaultFontColor,h.fillColor=e.defaultFillColor,h.strokeColor=e.flowColor??e.defaultStrokeColor,!0}configureSequenceFlowColor(t){F(`Use dedicated ${t} color for sequence flows`);const s=this.graph.getStylesheet().styles[k.SEQUENCE_FLOW];s[c.STYLE_STROKECOLOR]=t,s[c.STYLE_FILLCOLOR]=t,F("Sequence flows style updated")}}let O,V={},Be,Me,ce,B;function Fi(n){A("Updating load options"),V.fit=n,A("Load options updated",V)}function Pi(){return{...V}}function ki(){return ce}function Bi(n){A("Switching theme from %s to %s",ce,n),O.configureTheme(n)?(O.graph.refresh(),A("Theme switch done"),ce=n):A("Unknown theme, do nothing")}function Ot(n,t=!0){A("Loading bpmn...");try{O.load(n,V),A("BPMN loaded with configuration",V),Ii(Me),document.dispatchEvent(new CustomEvent("diagramLoaded"))}catch(e){if(t)Be(`Cannot load the BPMN diagram: ${e instanceof Error?e.message:String(e)}`);else throw e}}function Mi(n){A("Fitting..."),O.navigation.fit(n),A("Fit done with configuration",n)}function xi(n){A(`Zooming '${n}'...`),O.navigation.zoom(n),A("Zoom done")}function Yi(n){return O.bpmnElementsRegistry.getModelElementsByKinds(n)}function Si(n){return O.bpmnElementsRegistry.getModelElementsByIds(n)}function Lt(n){const t=O.graph.model,e=t.getCell(n);return t.getParent(e)}function Gi(n){return n.map(t=>Lt(t).getId()).filter((t,e,s)=>s.indexOf(t)===e)}function Vi(n){var s;const t=Lt(n),e=Si(t.getId());return e&&((s=e[0])==null?void 0:s.kind)===d.SUB_PROCESS}function Di(n,t){return O.bpmnElementsRegistry.addCssClasses(n,t)}function Ui(n,t){return O.bpmnElementsRegistry.removeCssClasses(n,t)}function Wi(n,t){return O.bpmnElementsRegistry.addOverlays(n,[t])}function Hi(n){return O.bpmnElementsRegistry.removeAllOverlays(n)}function Ii(n){if(!Me)return;A("Updating model, bpmnElement to collapse:",n);const t=O.graph.getModel(),e=t.getCell(n);if(e){t.beginUpdate();try{t.setCollapsed(e,!0)}finally{t.endUpdate()}A("Model updated")}else A("Element not found in the model, do nothing")}function Nt(n){n.text().then(t=>{Ot(t)}).catch(t=>{throw t})}function Ki(n){const t=n.target.files;if(t&&t.length>0){const e=t[0];Nt(e)}}function Ci(n){di(n).catch(t=>{throw new Error(`Unable to fetch ${n}. ${t}`)}).then(t=>(A("BPMN content fetched"),t)).then(t=>{Ot(t,!1),A(`BPMN content loaded from url ${n}`)}).then(()=>{_i()}).catch(t=>{Be(t.message)})}function zi(n){Ct(n)}function mi(n){mt(n)}function Ai(n,t){var i;const e=((i=n.loadOptions)==null?void 0:i.fit)??{},s=t.get("fitTypeOnLoad");s&&(e.type=s);const o=t.get("fitMargin");return o&&(e.margin=Number(o)),e}function vi(n){if(n.get("style.container.alternative.background.color")=="true"){const i="yellow";F("Use alternative color for the bpmn container background, color",i);const r=O.graph.container;r.style.backgroundColor=i,F("Bpmn container style updated")}const e=n.get("style.theme");F(`Configuring the '${e}' BPMN theme`),O.configureTheme(e)?(ce=e,F(`'${e}' BPMN theme configured`)):F(`Unknown '${e}' BPMN theme, skipping configuration`),n.get("style.seqFlow.light.colors")=="true"&&O.configureSequenceFlowColor("#E9E9E9"),F('Configuring the "Update Style" API from query parameters'),[...n.keys()].some(i=>i.startsWith("style.api."))?(B={stroke:{},font:{},fill:{}},n.get("style.api.stroke.color")&&(B.stroke.color=n.get("style.api.stroke.color")),n.get("style.api.font.color")&&(B.font.color=n.get("style.api.font.color")),n.get("style.api.font.opacity")&&(B.font.opacity=Number(n.get("style.api.font.opacity"))),n.get("style.api.fill.color")?B.fill.color=n.get("style.api.fill.color"):n.get("style.api.fill.color.startColor")&&n.get("style.api.fill.color.endColor")&&n.get("style.api.fill.color.direction")&&(B.fill.color={startColor:n.get("style.api.fill.color.startColor"),endColor:n.get("style.api.fill.color.endColor"),direction:n.get("style.api.fill.color.direction")}),n.get("style.api.fill.opacity")&&(B.fill.opacity=Number(n.get("style.api.fill.opacity"))),F('Prepared "Update Style" API object',B)):F('No query parameters, do not set the "Update Style" API object')}function Oi(n){Me=n.get("bpmn.element.id.collapsed")}function Li(n){const t=n.get("bpmn.filter.pool.ids");if(!t)return;const e=t.split(",");return A("Configuring load options to only include pool id: ",e),{pools:e.map(s=>({id:s}))}}function Xi(n){const t=F;t("Initializing BpmnVisualization with container:",n.globalOptions.container);const e=new URLSearchParams(window.location.search),s=e.get("renderer.ignore.bpmn.colors");if(s){const i=s==="true";t('Ignore support for "BPMN in Color"?',i),!n.globalOptions.renderer&&(n.globalOptions.renderer={}),n.globalOptions.renderer.ignoreBpmnColors=i}O=new Ei(n.globalOptions),t("Initialization completed"),new gi(window,"drop-container",O.graph.container,Nt),t("Drag&Drop support initialized"),Be=n.statusKoNotifier??mi,t("Configuring Load Options"),V=n.loadOptions??{},V.fit=Ai(n,e),V.modelFilter=Li(e),vi(e),Oi(e),t("Checking if an 'url to fetch BPMN content' is provided as query parameter");const o=e.get("url");if(o){const i=decodeURIComponent(o);Ci(i);return}t("No 'url to fetch BPMN content' provided")}function Zi(){z("Trigger SVG Download"),hi(new vt(O.graph).exportSvg())}function ji(){z("Trigger PNG Download"),fi(new vt(O.graph).exportSvgForPng())}function Ni(n,t){A("Applying style using the style API: %O",t),O.bpmnElementsRegistry.updateStyle(n,t),A("New style applied on: %O",n)}function $i(n){A("Resetting styles using the style API!"),O.bpmnElementsRegistry.resetStyle(n),A("Styles reset")}function _i(){if(B){const n=yi();A("Number of elements whose style is to be updated",n.length),Ni(n,B)}}function yi(){A("Retrieving ids of all BPMN elements");const n=[...Object.values(d),...Object.values(k)],t=O.bpmnElementsRegistry.getModelElementsByKinds(n).map(e=>e.id);return A("All BPMN elements ids retrieved:",t.length),t}export{Q as F,E as S,Ft as Z,Bi as a,ki as b,Hi as c,bi as d,Di as e,Mi as f,Pi as g,Ki as h,Zi as i,ji as j,Yi as k,A as l,Vt as m,$i as n,Vi as o,Ni as p,Gi as q,Ui as r,Xi as s,Wi as t,Fi as u,cn as v,zi as w,d as x,xi as z}; +${A.getXml(t)} +`}computeSvg(e){const t=e.scale??1,s=e.border??0,o=e.crisp??!0,i=e.enableForeignObjectForLabel??!0,r=this.graph.getGraphBounds(),l=this.graph.view.scale,a=A.createXmlDocument(),d=a.createElementNS(c.NS_SVG,"svg"),u=t/l,g=Math.max(1,Math.ceil(r.width*u)+2*s),I=Math.max(1,Math.ceil(r.height*u)+2*s);d.setAttribute("version","1.1"),d.setAttribute("width",g+"px"),d.setAttribute("height",I+"px"),d.setAttribute("viewBox",(o?"-0.5 -0.5":"0 0")+" "+g+" "+I),a.append(d);const C=a.createElementNS(c.NS_SVG,"g");d.append(C);const L=this.createSvgCanvas(C);L.foEnabled=i,L.foOffset=o?-.5:0,L.textOffset=o?-.5:0,L.imageOffset=o?-.5:0,L.translate(Math.floor((s/t-r.x)/l),Math.floor((s/t-r.y)/l)),L.scale(u);const _=new O.mxImageExport;return _.includeOverlays=!0,_.drawState(this.graph.getView().getState(this.graph.model.root),L),a}createSvgCanvas(e){const t=new mi(e);return t.pointerEvents=!0,t}}class mi extends ke{constructor(t){super(t);f(this,"htmlConverter",document.createElement("div"))}getAlternateText(t,s,o,i,r,l,a,d,u,g,I,C,L){return this.computeTruncatedText(l,i)}plainText(t,s,o,i,r,l,a,d,u,g,I,C){r=this.computeTruncatedText(r,o),super.plainText(t,s,o,i,r,l,a,d,u,g,I,C)}computeTruncatedText(t,s){if(t==null||this.state.fontSize<=0)return"";try{this.htmlConverter.innerHTML=t,t=A.extractTextWithWhitespace(this.htmlConverter.childNodes);const o=Math.ceil(2*s/this.state.fontSize),i=[];let r=0,l=0;for(;(o==0||r0)break}else i.push(t.charAt(l)),a<255&&r++;l++}i.length1&&(t=A.trim(i.join(""))+"...")}catch(o){console.warn("Error while computing txt label",o)}return t}}const Ai=new Map([["dark",{defaultFillColor:"#334352",defaultFontColor:"white",defaultStrokeColor:"#c0ddeb",endEventFillColor:"pink",endEventStrokeColor:"FireBrick",startEventFillColor:"DarkSeaGreen",startEventStrokeColor:"DarkGreen",taskAndCallActivityFillColor:"#5c8599",laneFillColor:"#2b3742",poolFillColor:"#232b33"}],["brown",{defaultFillColor:"#ede7e1",defaultFontColor:"#414666",defaultStrokeColor:"#414666",flowColor:"#666666",catchAndThrowEventStrokeColor:"#377f87",endEventFillColor:"pink",endEventStrokeColor:"FireBrick",startEventFillColor:"DarkSeaGreen",startEventStrokeColor:"DarkGreen",taskAndCallActivityFillColor:"#dadce8",laneFillColor:"#d4c3b2",poolFillColor:"#d1b9a1"}],["light-blue",{defaultFillColor:"#ffffff",defaultFontColor:"#002395",defaultStrokeColor:"#002395",endEventFillColor:"#f9dadc",endEventStrokeColor:"#e20613",startEventFillColor:"#ffffff",startEventStrokeColor:"#05d99e",taskAndCallActivityFillColor:"rgba(132,158,253,0.1)",textAnnotationFillColor:"rgba(237,237,245,0.5)",laneFillColor:"#edeef5",poolFillColor:"#dbefff"}]]);class vi extends pi{configureTheme(e){if(e=="default")return new St(this.graph).configureStyles(),!0;const t=Ai.get(e);if(!t)return!1;const s=this.graph.getStylesheet();for(const u of p.eventKinds()){let g,I;switch(u){case"endEvent":{g=t.endEventFillColor,I=t.endEventStrokeColor;break}case"startEvent":{g=t.startEventFillColor,I=t.startEventStrokeColor;break}case"intermediateCatchEvent":case"intermediateThrowEvent":case"boundaryEvent":{g=t.defaultFillColor,I=t.catchAndThrowEventStrokeColor??t.defaultStrokeColor;break}default:{g=t.defaultFillColor,I=t.defaultStrokeColor;break}}const C=s.styles[u];C.fillColor=g,C.strokeColor=I}for(const u of p.taskKinds()){const g=s.styles[u];g.fillColor=t.taskAndCallActivityFillColor}const o=s.styles[h.CALL_ACTIVITY];o.fillColor=t.taskAndCallActivityFillColor;const i=s.styles[h.TEXT_ANNOTATION];i.fillColor=t.textAnnotationFillColor??T.TEXT_ANNOTATION_FILL_COLOR;const r=s.styles[h.POOL];r.fillColor=t.poolFillColor,r.swimlaneFillColor=t.defaultFillColor;const l=s.styles[h.LANE];l.fillColor=t.laneFillColor;const a=s.getDefaultVertexStyle();a.fontColor=t.defaultFontColor,a.fillColor=t.defaultFillColor,a.strokeColor=t.defaultStrokeColor;const d=s.getDefaultEdgeStyle();return d.fontColor=t.defaultFontColor,d.fillColor=t.defaultFillColor,d.strokeColor=t.flowColor??t.defaultStrokeColor,!0}configureSequenceFlowColor(e){F(`Use dedicated ${e} color for sequence flows`);const s=this.graph.getStylesheet().styles[k.SEQUENCE_FLOW];s[c.STYLE_STROKECOLOR]=e,s[c.STYLE_FILLCOLOR]=e,F("Sequence flows style updated")}}let v,D={},Ue,We,ge,M;function Yi(n){m("Updating load options"),D.fit=n,m("Load options updated",D)}function Vi(){return{...D}}function Gi(){return ge}function Di(n){m("Switching theme from %s to %s",ge,n),v.configureTheme(n)?(v.graph.refresh(),m("Theme switch done"),ge=n):m("Unknown theme, do nothing")}function bt(n,e=!0){m("Loading bpmn...");try{v.load(n,D),m("BPMN loaded with configuration",D),Li(We),document.dispatchEvent(new CustomEvent("diagramLoaded"))}catch(t){if(e)Ue(`Cannot load the BPMN diagram: ${t instanceof Error?t.message:String(t)}`);else throw t}}function Ui(n){m("Fitting..."),v.navigation.fit(n),m("Fit done with configuration",n)}function Wi(n){m(`Zooming '${n}'...`),v.navigation.zoom(n),m("Zoom done")}function Hi(n){return v.bpmnElementsRegistry.getModelElementsByKinds(n)}function Oi(n){return v.bpmnElementsRegistry.getModelElementsByIds(n)}function Ft(n){const e=v.graph.model,t=e.getCell(n);return e.getParent(t)}function Ki(n){return n.map(e=>Ft(e).getId()).filter((e,t,s)=>s.indexOf(e)===t)}function zi(n){var s;const e=Ft(n),t=Oi(e.getId());return t&&((s=t[0])==null?void 0:s.kind)===h.SUB_PROCESS}function Xi(n,e){return v.bpmnElementsRegistry.addCssClasses(n,e)}function $i(n,e){return v.bpmnElementsRegistry.removeCssClasses(n,e)}function Zi(n,e){return v.bpmnElementsRegistry.addOverlays(n,[e])}function ji(n){return v.bpmnElementsRegistry.removeAllOverlays(n)}function Li(n){if(!We)return;m("Updating model, bpmnElement to collapse:",n);const e=v.graph.getModel(),t=e.getCell(n);if(t){e.beginUpdate();try{e.setCollapsed(t,!0)}finally{e.endUpdate()}m("Model updated")}else m("Element not found in the model, do nothing")}function Pt(n){n.text().then(e=>{bt(e)}).catch(e=>{throw e})}function qi(n){const e=n.target.files;if(e&&e.length>0){const t=e[0];Pt(t)}}function Ni(n){Ei(n).catch(e=>{throw new Error(`Unable to fetch ${n}. ${e}`)}).then(e=>(m("BPMN content fetched"),e)).then(e=>{bt(e,!1),m(`BPMN content loaded from url ${n}`)}).then(()=>{Pi()}).catch(e=>{Ue(e.message)})}function Qi(n){_t(n)}function _i(n){yt(n)}function yi(n,e){var i;const t=((i=n.loadOptions)==null?void 0:i.fit)??{},s=e.get("fitTypeOnLoad");s&&(t.type=s);const o=e.get("fitMargin");return o&&(t.margin=Number(o)),t}function wi(n){if(n.get("style.container.alternative.background.color")=="true"){const i="yellow";F("Use alternative color for the bpmn container background, color",i);const r=v.graph.container;r.style.backgroundColor=i,F("Bpmn container style updated")}const t=n.get("style.theme");F(`Configuring the '${t}' BPMN theme`),v.configureTheme(t)?(ge=t,F(`'${t}' BPMN theme configured`)):F(`Unknown '${t}' BPMN theme, skipping configuration`),n.get("style.seqFlow.light.colors")=="true"&&v.configureSequenceFlowColor("#E9E9E9"),F('Configuring the "Update Style" API from query parameters'),[...n.keys()].some(i=>i.startsWith("style.api."))?(M={stroke:{},font:{},fill:{}},n.get("style.api.stroke.color")&&(M.stroke.color=n.get("style.api.stroke.color")),n.get("style.api.font.color")&&(M.font.color=n.get("style.api.font.color")),n.get("style.api.font.opacity")&&(M.font.opacity=Number(n.get("style.api.font.opacity"))),n.get("style.api.fill.color")?M.fill.color=n.get("style.api.fill.color"):n.get("style.api.fill.color.startColor")&&n.get("style.api.fill.color.endColor")&&n.get("style.api.fill.color.direction")&&(M.fill.color={startColor:n.get("style.api.fill.color.startColor"),endColor:n.get("style.api.fill.color.endColor"),direction:n.get("style.api.fill.color.direction")}),n.get("style.api.fill.opacity")&&(M.fill.opacity=Number(n.get("style.api.fill.opacity"))),F('Prepared "Update Style" API object',M)):F('No query parameters, do not set the "Update Style" API object')}function Ri(n){We=n.get("bpmn.element.id.collapsed")}function bi(n){const e=n.get("bpmn.filter.pool.ids");if(!e)return;const t=e.split(",");return m("Configuring load options to only include pool id: ",t),{pools:t.map(s=>({id:s}))}}function Ji(n){const e=F;e("Initializing BpmnVisualization with container:",n.globalOptions.container);const t=new URLSearchParams(window.location.search),s=t.get("renderer.ignore.bpmn.colors");if(s){const i=s==="true";e('Ignore support for "BPMN in Color"?',i),!n.globalOptions.renderer&&(n.globalOptions.renderer={}),n.globalOptions.renderer.ignoreBpmnColors=i}v=new vi(n.globalOptions),e("Initialization completed"),new Ci(window,"drop-container",v.graph.container,Pt),e("Drag&Drop support initialized"),Ue=n.statusKoNotifier??_i,e("Configuring Load Options"),D=n.loadOptions??{},D.fit=yi(n,t),D.modelFilter=bi(t),wi(t),Ri(t),e("Checking if an 'url to fetch BPMN content' is provided as query parameter");const o=t.get("url");if(o){const i=decodeURIComponent(o);Ni(i);return}e("No 'url to fetch BPMN content' provided")}function er(){Z("Trigger SVG Download"),Si(new Rt(v.graph).exportSvg())}function tr(){Z("Trigger PNG Download"),Ii(new Rt(v.graph).exportSvgForPng())}function Fi(n,e){m("Applying style using the style API: %O",e),v.bpmnElementsRegistry.updateStyle(n,e),m("New style applied on: %O",n)}function nr(n){m("Resetting styles using the style API!"),v.bpmnElementsRegistry.resetStyle(n),m("Styles reset")}function Pi(){if(M){const n=ki();m("Number of elements whose style is to be updated",n.length),Fi(n,M)}}function ki(){m("Retrieving ids of all BPMN elements");const n=[...Object.values(h),...Object.values(k)],e=v.bpmnElementsRegistry.getModelElementsByKinds(n).map(t=>t.id);return m("All BPMN elements ids retrieved:",e.length),e}export{te as F,p as S,Yt as Z,Di as a,Gi as b,ji as c,xi as d,Xi as e,Ui as f,Vi as g,qi as h,er as i,tr as j,Hi as k,m as l,zt as m,nr as n,zi as o,Fi as p,Ki as q,$i as r,Ji as s,Zi as t,Yi as u,gn as v,Qi as w,h as x,Wi as z}; diff --git a/demo/monitoring-all-process-instances/index.html b/demo/monitoring-all-process-instances/index.html index cbdec0fd..5860772b 100644 --- a/demo/monitoring-all-process-instances/index.html +++ b/demo/monitoring-all-process-instances/index.html @@ -24,7 +24,7 @@ - + diff --git a/demo/prediction/index.html b/demo/prediction/index.html index 0628a2ef..55793c27 100644 --- a/demo/prediction/index.html +++ b/demo/prediction/index.html @@ -30,7 +30,7 @@ - + diff --git a/examples/custom-behavior/apply-css-classes/index.html b/examples/custom-behavior/apply-css-classes/index.html index 81e21e83..b11301b0 100644 --- a/examples/custom-behavior/apply-css-classes/index.html +++ b/examples/custom-behavior/apply-css-classes/index.html @@ -86,7 +86,7 @@ } - + diff --git a/examples/custom-behavior/call-activity-with-modal-on-mouse-over/index.html b/examples/custom-behavior/call-activity-with-modal-on-mouse-over/index.html index 17080a30..54071db9 100644 --- a/examples/custom-behavior/call-activity-with-modal-on-mouse-over/index.html +++ b/examples/custom-behavior/call-activity-with-modal-on-mouse-over/index.html @@ -34,7 +34,7 @@ - + diff --git a/examples/custom-behavior/call-activity-with-reload-on-dblclick/index.html b/examples/custom-behavior/call-activity-with-reload-on-dblclick/index.html index 9e6c73ec..0288d7a5 100644 --- a/examples/custom-behavior/call-activity-with-reload-on-dblclick/index.html +++ b/examples/custom-behavior/call-activity-with-reload-on-dblclick/index.html @@ -36,7 +36,7 @@ - + diff --git a/examples/custom-behavior/call-activity-with-tabs-on-click/index.html b/examples/custom-behavior/call-activity-with-tabs-on-click/index.html index 5943ad02..17700b7b 100644 --- a/examples/custom-behavior/call-activity-with-tabs-on-click/index.html +++ b/examples/custom-behavior/call-activity-with-tabs-on-click/index.html @@ -36,7 +36,7 @@ - + diff --git a/examples/custom-behavior/growing-sequence-flow/index.html b/examples/custom-behavior/growing-sequence-flow/index.html index 30430d23..689e755f 100644 --- a/examples/custom-behavior/growing-sequence-flow/index.html +++ b/examples/custom-behavior/growing-sequence-flow/index.html @@ -57,7 +57,7 @@ - + diff --git a/examples/custom-behavior/javascript-tooltip-and-popover/index.html b/examples/custom-behavior/javascript-tooltip-and-popover/index.html index 464f4835..7ba3f643 100644 --- a/examples/custom-behavior/javascript-tooltip-and-popover/index.html +++ b/examples/custom-behavior/javascript-tooltip-and-popover/index.html @@ -49,7 +49,7 @@ - + diff --git a/examples/custom-behavior/running-dashed-message-flow/index.html b/examples/custom-behavior/running-dashed-message-flow/index.html index 6d03d00b..5eb15375 100644 --- a/examples/custom-behavior/running-dashed-message-flow/index.html +++ b/examples/custom-behavior/running-dashed-message-flow/index.html @@ -57,7 +57,7 @@ - + diff --git a/examples/custom-behavior/select-elements-by-bpmn-kind/index.html b/examples/custom-behavior/select-elements-by-bpmn-kind/index.html index d8a04b1c..631e0973 100644 --- a/examples/custom-behavior/select-elements-by-bpmn-kind/index.html +++ b/examples/custom-behavior/select-elements-by-bpmn-kind/index.html @@ -55,7 +55,7 @@ } - + diff --git a/examples/custom-bpmn-theme/custom-colors/index.html b/examples/custom-bpmn-theme/custom-colors/index.html index 4c2d04d2..bcb4c1fe 100644 --- a/examples/custom-bpmn-theme/custom-colors/index.html +++ b/examples/custom-bpmn-theme/custom-colors/index.html @@ -22,7 +22,7 @@ - + diff --git a/examples/custom-bpmn-theme/custom-edge-marker-colors/index.html b/examples/custom-bpmn-theme/custom-edge-marker-colors/index.html index 28f08e42..d6b2c6ad 100644 --- a/examples/custom-bpmn-theme/custom-edge-marker-colors/index.html +++ b/examples/custom-bpmn-theme/custom-edge-marker-colors/index.html @@ -36,7 +36,7 @@ - + diff --git a/examples/custom-bpmn-theme/custom-fonts/index.html b/examples/custom-bpmn-theme/custom-fonts/index.html index 7a20c1f7..d58145ff 100644 --- a/examples/custom-bpmn-theme/custom-fonts/index.html +++ b/examples/custom-bpmn-theme/custom-fonts/index.html @@ -22,7 +22,7 @@ - + diff --git a/examples/custom-bpmn-theme/custom-user-task-icon/index.html b/examples/custom-bpmn-theme/custom-user-task-icon/index.html index f3b7814a..1a3a5245 100644 --- a/examples/custom-bpmn-theme/custom-user-task-icon/index.html +++ b/examples/custom-bpmn-theme/custom-user-task-icon/index.html @@ -22,7 +22,7 @@ - + diff --git a/examples/diagram-navigation/diagram-fit-after-load/index.html b/examples/diagram-navigation/diagram-fit-after-load/index.html index 56830bf6..7f737053 100644 --- a/examples/diagram-navigation/diagram-fit-after-load/index.html +++ b/examples/diagram-navigation/diagram-fit-after-load/index.html @@ -53,7 +53,7 @@ - + diff --git a/examples/diagram-navigation/diagram-fit-on-load/index.html b/examples/diagram-navigation/diagram-fit-on-load/index.html index 2d4c5329..3dd68a7a 100644 --- a/examples/diagram-navigation/diagram-fit-on-load/index.html +++ b/examples/diagram-navigation/diagram-fit-on-load/index.html @@ -40,7 +40,7 @@ - + diff --git a/examples/diagram-navigation/diagram-navigation/index.html b/examples/diagram-navigation/diagram-navigation/index.html index f5b7d8c6..b54d25d0 100644 --- a/examples/diagram-navigation/diagram-navigation/index.html +++ b/examples/diagram-navigation/diagram-navigation/index.html @@ -34,7 +34,7 @@ } - + diff --git a/examples/display-bpmn-diagram/load-local-bpmn-diagrams/index.html b/examples/display-bpmn-diagram/load-local-bpmn-diagrams/index.html index 2a0ae198..f5210e03 100644 --- a/examples/display-bpmn-diagram/load-local-bpmn-diagrams/index.html +++ b/examples/display-bpmn-diagram/load-local-bpmn-diagrams/index.html @@ -50,7 +50,7 @@ - + diff --git a/examples/display-bpmn-diagram/load-remote-bpmn-diagrams/index.html b/examples/display-bpmn-diagram/load-remote-bpmn-diagrams/index.html index e69c5384..7af8c3ff 100644 --- a/examples/display-bpmn-diagram/load-remote-bpmn-diagrams/index.html +++ b/examples/display-bpmn-diagram/load-remote-bpmn-diagrams/index.html @@ -60,7 +60,7 @@ - + diff --git a/examples/display-bpmn-diagram/pools-filter-on-load/index.html b/examples/display-bpmn-diagram/pools-filter-on-load/index.html index 5e68d313..e05e90bd 100644 --- a/examples/display-bpmn-diagram/pools-filter-on-load/index.html +++ b/examples/display-bpmn-diagram/pools-filter-on-load/index.html @@ -34,7 +34,7 @@ - + diff --git a/examples/misc/compare-with-bpmn-js/index.html b/examples/misc/compare-with-bpmn-js/index.html index 1f2f36f8..a5745068 100644 --- a/examples/misc/compare-with-bpmn-js/index.html +++ b/examples/misc/compare-with-bpmn-js/index.html @@ -59,7 +59,7 @@ - + diff --git a/examples/misc/compare-with-kie-editors-standalone/index.html b/examples/misc/compare-with-kie-editors-standalone/index.html index c3a1d8f9..8a0a27c0 100644 --- a/examples/misc/compare-with-kie-editors-standalone/index.html +++ b/examples/misc/compare-with-kie-editors-standalone/index.html @@ -59,7 +59,7 @@ - + diff --git a/examples/overlays/add-remove/index.html b/examples/overlays/add-remove/index.html index 03dc404f..c1551c7f 100644 --- a/examples/overlays/add-remove/index.html +++ b/examples/overlays/add-remove/index.html @@ -48,7 +48,7 @@ - + diff --git a/examples/overlays/add-stylized/index.html b/examples/overlays/add-stylized/index.html index b6db3a6b..3952cdbc 100644 --- a/examples/overlays/add-stylized/index.html +++ b/examples/overlays/add-stylized/index.html @@ -43,7 +43,7 @@ - + diff --git a/examples/overlays/custom-overlay-default-style/index.html b/examples/overlays/custom-overlay-default-style/index.html index 108a2143..af66797c 100644 --- a/examples/overlays/custom-overlay-default-style/index.html +++ b/examples/overlays/custom-overlay-default-style/index.html @@ -29,7 +29,7 @@ - + diff --git a/projects/javascript-vanilla-with-webpack/package.json b/projects/javascript-vanilla-with-webpack/package.json index 5b9b6c59..c8e2a0ac 100644 --- a/projects/javascript-vanilla-with-webpack/package.json +++ b/projects/javascript-vanilla-with-webpack/package.json @@ -9,7 +9,7 @@ "serve": "webpack serve" }, "dependencies": { - "bpmn-visualization": "0.46.0" + "bpmn-visualization": "0.47.0" }, "devDependencies": { "html-webpack-plugin": "~5.6.3", diff --git a/projects/typescript-angular/package.json b/projects/typescript-angular/package.json index e73dc0d6..5d3f94cb 100644 --- a/projects/typescript-angular/package.json +++ b/projects/typescript-angular/package.json @@ -19,7 +19,7 @@ "@angular/platform-browser": "~15.2.10", "@angular/platform-browser-dynamic": "~15.2.10", "@angular/router": "~15.2.10", - "bpmn-visualization": "0.46.0", + "bpmn-visualization": "0.47.0", "rxjs": "~7.8.1", "tslib": "~2.5.3", "zone.js": "~0.12.0" diff --git a/projects/typescript-lit-element/package.json b/projects/typescript-lit-element/package.json index 81a4fe1c..4130d88b 100644 --- a/projects/typescript-lit-element/package.json +++ b/projects/typescript-lit-element/package.json @@ -11,7 +11,7 @@ }, "dependencies": { "lit": "~3.3.0", - "bpmn-visualization": "0.46.0" + "bpmn-visualization": "0.47.0" }, "devDependencies": { "patch-package": "~8.0.0", diff --git a/projects/typescript-vanilla-with-parcel/package.json b/projects/typescript-vanilla-with-parcel/package.json index 074339db..4dd48619 100644 --- a/projects/typescript-vanilla-with-parcel/package.json +++ b/projects/typescript-vanilla-with-parcel/package.json @@ -8,7 +8,7 @@ "build": "tsc && parcel build --public-url ./ index.html" }, "dependencies": { - "bpmn-visualization": "0.46.0" + "bpmn-visualization": "0.47.0" }, "devDependencies": { "@parcel/core": "~2.14.4", diff --git a/projects/typescript-vanilla-with-rollup/package.json b/projects/typescript-vanilla-with-rollup/package.json index bde9f267..12417e1f 100644 --- a/projects/typescript-vanilla-with-rollup/package.json +++ b/projects/typescript-vanilla-with-rollup/package.json @@ -10,7 +10,7 @@ "start": "rollup -cw --environment devMode:true" }, "dependencies": { - "bpmn-visualization": "0.46.0" + "bpmn-visualization": "0.47.0" }, "devDependencies": { "@rollup/plugin-commonjs": "~28.0.3", diff --git a/projects/typescript-vanilla-with-rsbuild/package.json b/projects/typescript-vanilla-with-rsbuild/package.json index 6fed626d..bbf149b6 100644 --- a/projects/typescript-vanilla-with-rsbuild/package.json +++ b/projects/typescript-vanilla-with-rsbuild/package.json @@ -8,7 +8,7 @@ "preview": "rsbuild preview" }, "dependencies": { - "bpmn-visualization": "0.46.0" + "bpmn-visualization": "0.47.0" }, "devDependencies": { "@rsbuild/core": "1.3.7", diff --git a/projects/typescript-vanilla-with-vitejs/package.json b/projects/typescript-vanilla-with-vitejs/package.json index 23557ecb..dbc90498 100644 --- a/projects/typescript-vanilla-with-vitejs/package.json +++ b/projects/typescript-vanilla-with-vitejs/package.json @@ -9,7 +9,7 @@ "preview": "vite preview" }, "dependencies": { - "bpmn-visualization": "0.46.0" + "bpmn-visualization": "0.47.0" }, "devDependencies": { "typescript": "~4.5.5", diff --git a/projects/typescript-vue/package.json b/projects/typescript-vue/package.json index 5413057b..b555318d 100644 --- a/projects/typescript-vue/package.json +++ b/projects/typescript-vue/package.json @@ -10,7 +10,7 @@ }, "dependencies": { "@process-analytics/bpmn-visualization-addons": "0.8.0", - "bpmn-visualization": "0.46.0", + "bpmn-visualization": "0.47.0", "spectre.css": "~0.5.9", "vue": "~3.5.13" },