diff --git a/dist/client.js b/dist/client.js index 39367a3..060a3bf 100644 --- a/dist/client.js +++ b/dist/client.js @@ -1128,13 +1128,13 @@ function getAllBpmnElements(rootElements) { */ function getAllDiBpmnReferences(definitionsNode) { return flatten( - definitionsNode.diagrams.map((diagram) => { + definitionsNode.get('diagrams').map((diagram) => { const diElements = diagram.plane.planeElement || []; return diElements.map((element) => { - return element.bpmnElement.id; + return element.bpmnElement?.id; }); }) ); @@ -1712,7 +1712,15 @@ function checkElementsArray(elements, elementsToReport, diObjects) { continue; } - if (isCollision(diObjects.get(element).bounds, diObjects.get(element2).bounds)) { + const bounds1 = diObjects.get(element)?.bounds; + const bounds2 = diObjects.get(element2)?.bounds; + + // ignore if an element doesn't have bounds + if (!bounds1 || !bounds2) { + continue; + } + + if (isCollision(bounds1, bounds2)) { elementsToReport.add(element); elementsToReport.add(element2); } @@ -2556,7 +2564,7 @@ function ensureArray(obj) { * @return {Boolean} */ function has(target, key) { - return nativeHasOwnProperty.call(target, key); + return !isNil(target) && nativeHasOwnProperty.call(target, key); } /** @@ -2645,7 +2653,7 @@ function find(collection, matcher) { * @param {Collection} collection * @param {Matcher} matcher * - * @return {number} + * @return {number | string | undefined} */ function findIndex(collection, matcher) { diff --git a/dist/client.js.map b/dist/client.js.map index 156c554..6890fad 100644 --- a/dist/client.js.map +++ b/dist/client.js.map @@ -1 +1 @@ -{"version":3,"file":"client.js","mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;AC9KA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACnBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;AC9CA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;AC3EA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;AClDA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACpCA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;ACpCA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;ACjCA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;AC3IA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;AC5DA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;ACnEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;ACnGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACjIA;AACA;AACA;;;;;;;;;;ACFA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;ACxEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;AC/DA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;AC7BA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;ACxFA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;ACjDA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACrDA;AACA;AACA;;;;;;;;;;ACFA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACpLA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;ACxCA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;AC3BA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACpCA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;ACrCA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;AC7BA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AC9DA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACjWA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;;;;;AC74BA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;ACpCA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;ACvBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;ACPA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;ACPA;;;;;ACAA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;;ACNA;AACA;AACA;AACA;AACA;AACA;AACA","sources":["webpack://camunda-modeler-custom-linter-rules-plugin/./.bpmnlintrc","webpack://camunda-modeler-custom-linter-rules-plugin/./node_modules/bpmnlint-plugin-camunda/rules/avoid-lanes.js","webpack://camunda-modeler-custom-linter-rules-plugin/./node_modules/bpmnlint-plugin-camunda/rules/forking-conditions.js","webpack://camunda-modeler-custom-linter-rules-plugin/./node_modules/bpmnlint-plugin-camunda/rules/implementation.js","webpack://camunda-modeler-custom-linter-rules-plugin/./node_modules/bpmnlint/rules/conditional-flows.js","webpack://camunda-modeler-custom-linter-rules-plugin/./node_modules/bpmnlint/rules/end-event-required.js","webpack://camunda-modeler-custom-linter-rules-plugin/./node_modules/bpmnlint/rules/event-sub-process-typed-start-event.js","webpack://camunda-modeler-custom-linter-rules-plugin/./node_modules/bpmnlint/rules/fake-join.js","webpack://camunda-modeler-custom-linter-rules-plugin/./node_modules/bpmnlint/rules/global.js","webpack://camunda-modeler-custom-linter-rules-plugin/./node_modules/bpmnlint/rules/helper.js","webpack://camunda-modeler-custom-linter-rules-plugin/./node_modules/bpmnlint/rules/label-required.js","webpack://camunda-modeler-custom-linter-rules-plugin/./node_modules/bpmnlint/rules/link-event.js","webpack://camunda-modeler-custom-linter-rules-plugin/./node_modules/bpmnlint/rules/no-bpmndi.js","webpack://camunda-modeler-custom-linter-rules-plugin/./node_modules/bpmnlint/rules/no-complex-gateway.js","webpack://camunda-modeler-custom-linter-rules-plugin/./node_modules/bpmnlint/rules/no-disconnected.js","webpack://camunda-modeler-custom-linter-rules-plugin/./node_modules/bpmnlint/rules/no-duplicate-sequence-flows.js","webpack://camunda-modeler-custom-linter-rules-plugin/./node_modules/bpmnlint/rules/no-gateway-join-fork.js","webpack://camunda-modeler-custom-linter-rules-plugin/./node_modules/bpmnlint/rules/no-implicit-end.js","webpack://camunda-modeler-custom-linter-rules-plugin/./node_modules/bpmnlint/rules/no-implicit-split.js","webpack://camunda-modeler-custom-linter-rules-plugin/./node_modules/bpmnlint/rules/no-implicit-start.js","webpack://camunda-modeler-custom-linter-rules-plugin/./node_modules/bpmnlint/rules/no-inclusive-gateway.js","webpack://camunda-modeler-custom-linter-rules-plugin/./node_modules/bpmnlint/rules/no-overlapping-elements.js","webpack://camunda-modeler-custom-linter-rules-plugin/./node_modules/bpmnlint/rules/single-blank-start-event.js","webpack://camunda-modeler-custom-linter-rules-plugin/./node_modules/bpmnlint/rules/single-event-definition.js","webpack://camunda-modeler-custom-linter-rules-plugin/./node_modules/bpmnlint/rules/start-event-required.js","webpack://camunda-modeler-custom-linter-rules-plugin/./node_modules/bpmnlint/rules/sub-process-blank-start-event.js","webpack://camunda-modeler-custom-linter-rules-plugin/./node_modules/bpmnlint/rules/superfluous-gateway.js","webpack://camunda-modeler-custom-linter-rules-plugin/./node_modules/bpmnlint/rules/superfluous-termination.js","webpack://camunda-modeler-custom-linter-rules-plugin/./node_modules/camunda-modeler-plugin-helpers/index.js","webpack://camunda-modeler-custom-linter-rules-plugin/./node_modules/min-dash/dist/index.cjs","webpack://camunda-modeler-custom-linter-rules-plugin/./node_modules/bpmnlint-utils/dist/index.esm.js","webpack://camunda-modeler-custom-linter-rules-plugin/webpack/bootstrap","webpack://camunda-modeler-custom-linter-rules-plugin/webpack/runtime/compat get default export","webpack://camunda-modeler-custom-linter-rules-plugin/webpack/runtime/define property getters","webpack://camunda-modeler-custom-linter-rules-plugin/webpack/runtime/hasOwnProperty shorthand","webpack://camunda-modeler-custom-linter-rules-plugin/webpack/runtime/make namespace object","webpack://camunda-modeler-custom-linter-rules-plugin/./client/index.js"],"sourcesContent":["\nconst cache = {};\n\n/**\n * A resolver that caches rules and configuration as part of the bundle,\n * making them accessible in the browser.\n *\n * @param {Object} cache\n */\nfunction Resolver() {}\n\nResolver.prototype.resolveRule = function(pkg, ruleName) {\n\n const rule = cache[pkg + '/' + ruleName];\n\n if (!rule) {\n throw new Error('cannot resolve rule <' + pkg + '/' + ruleName + '>: not bundled');\n }\n\n return rule;\n};\n\nResolver.prototype.resolveConfig = function(pkg, configName) {\n throw new Error(\n 'cannot resolve config <' + configName + '> in <' + pkg +'>: not bundled'\n );\n};\n\nconst resolver = new Resolver();\n\nconst rules = {\n \"conditional-flows\": \"error\",\n \"end-event-required\": \"error\",\n \"event-sub-process-typed-start-event\": \"error\",\n \"fake-join\": \"warn\",\n \"global\": \"warn\",\n \"label-required\": \"error\",\n \"link-event\": \"error\",\n \"no-bpmndi\": \"error\",\n \"no-complex-gateway\": \"error\",\n \"no-disconnected\": \"error\",\n \"no-duplicate-sequence-flows\": \"error\",\n \"no-gateway-join-fork\": \"error\",\n \"no-implicit-split\": \"error\",\n \"no-implicit-end\": \"error\",\n \"no-implicit-start\": \"error\",\n \"no-inclusive-gateway\": \"error\",\n \"no-overlapping-elements\": \"warn\",\n \"single-blank-start-event\": \"error\",\n \"single-event-definition\": \"error\",\n \"start-event-required\": \"error\",\n \"sub-process-blank-start-event\": \"error\",\n \"superfluous-gateway\": \"warn\",\n \"superfluous-termination\": \"warn\",\n \"camunda/avoid-lanes\": \"warn\",\n \"camunda/forking-conditions\": \"error\",\n \"camunda/implementation\": \"warning\"\n};\n\nconst config = {\n rules: rules\n};\n\nconst bundle = {\n resolver: resolver,\n config: config\n};\n\nexport { resolver, config };\n\nexport default bundle;\n\nimport rule_0 from 'bpmnlint/rules/conditional-flows';\n\ncache['bpmnlint/conditional-flows'] = rule_0;\n\nimport rule_1 from 'bpmnlint/rules/end-event-required';\n\ncache['bpmnlint/end-event-required'] = rule_1;\n\nimport rule_2 from 'bpmnlint/rules/event-sub-process-typed-start-event';\n\ncache['bpmnlint/event-sub-process-typed-start-event'] = rule_2;\n\nimport rule_3 from 'bpmnlint/rules/fake-join';\n\ncache['bpmnlint/fake-join'] = rule_3;\n\nimport rule_4 from 'bpmnlint/rules/global';\n\ncache['bpmnlint/global'] = rule_4;\n\nimport rule_5 from 'bpmnlint/rules/label-required';\n\ncache['bpmnlint/label-required'] = rule_5;\n\nimport rule_6 from 'bpmnlint/rules/link-event';\n\ncache['bpmnlint/link-event'] = rule_6;\n\nimport rule_7 from 'bpmnlint/rules/no-bpmndi';\n\ncache['bpmnlint/no-bpmndi'] = rule_7;\n\nimport rule_8 from 'bpmnlint/rules/no-complex-gateway';\n\ncache['bpmnlint/no-complex-gateway'] = rule_8;\n\nimport rule_9 from 'bpmnlint/rules/no-disconnected';\n\ncache['bpmnlint/no-disconnected'] = rule_9;\n\nimport rule_10 from 'bpmnlint/rules/no-duplicate-sequence-flows';\n\ncache['bpmnlint/no-duplicate-sequence-flows'] = rule_10;\n\nimport rule_11 from 'bpmnlint/rules/no-gateway-join-fork';\n\ncache['bpmnlint/no-gateway-join-fork'] = rule_11;\n\nimport rule_12 from 'bpmnlint/rules/no-implicit-split';\n\ncache['bpmnlint/no-implicit-split'] = rule_12;\n\nimport rule_13 from 'bpmnlint/rules/no-implicit-end';\n\ncache['bpmnlint/no-implicit-end'] = rule_13;\n\nimport rule_14 from 'bpmnlint/rules/no-implicit-start';\n\ncache['bpmnlint/no-implicit-start'] = rule_14;\n\nimport rule_15 from 'bpmnlint/rules/no-inclusive-gateway';\n\ncache['bpmnlint/no-inclusive-gateway'] = rule_15;\n\nimport rule_16 from 'bpmnlint/rules/no-overlapping-elements';\n\ncache['bpmnlint/no-overlapping-elements'] = rule_16;\n\nimport rule_17 from 'bpmnlint/rules/single-blank-start-event';\n\ncache['bpmnlint/single-blank-start-event'] = rule_17;\n\nimport rule_18 from 'bpmnlint/rules/single-event-definition';\n\ncache['bpmnlint/single-event-definition'] = rule_18;\n\nimport rule_19 from 'bpmnlint/rules/start-event-required';\n\ncache['bpmnlint/start-event-required'] = rule_19;\n\nimport rule_20 from 'bpmnlint/rules/sub-process-blank-start-event';\n\ncache['bpmnlint/sub-process-blank-start-event'] = rule_20;\n\nimport rule_21 from 'bpmnlint/rules/superfluous-gateway';\n\ncache['bpmnlint/superfluous-gateway'] = rule_21;\n\nimport rule_22 from 'bpmnlint/rules/superfluous-termination';\n\ncache['bpmnlint/superfluous-termination'] = rule_22;\n\nimport rule_23 from 'bpmnlint-plugin-camunda/rules/avoid-lanes';\n\ncache['bpmnlint-plugin-camunda/avoid-lanes'] = rule_23;\n\nimport rule_24 from 'bpmnlint-plugin-camunda/rules/forking-conditions';\n\ncache['bpmnlint-plugin-camunda/forking-conditions'] = rule_24;\n\nimport rule_25 from 'bpmnlint-plugin-camunda/rules/implementation';\n\ncache['bpmnlint-plugin-camunda/implementation'] = rule_25;","const {\n is\n} = require('bpmnlint-utils');\n\n\n/**\n * Rule that reports the usage of lanes.\n */\nmodule.exports = function() {\n\n function check(node, reporter) {\n if (is(node, 'bpmn:Lane')) {\n reporter.report(node.id, 'lanes should be avoided');\n }\n }\n\n return {\n check: check\n };\n};\n","const {\n is\n} = require('bpmnlint-utils');\n\n/**\n * A rule that checks that sequence flows after\n * an exclusive forking gateway have conditions\n * attached.\n */\nmodule.exports = function() {\n\n function check(node, reporter) {\n\n const outgoing = node.outgoing || [];\n\n if (!is(node, 'bpmn:ExclusiveGateway') || outgoing.length < 2) {\n return;\n }\n\n outgoing.forEach((flow) => {\n const missingCondition = (\n !hasCondition(flow) &&\n !isDefaultFlow(node, flow)\n );\n\n if (missingCondition) {\n reporter.report(flow.id, 'Sequence flow is missing condition');\n }\n });\n }\n\n return {\n check\n };\n\n};\n\n\n// helpers /////////////////////////////\n\nfunction hasCondition(flow) {\n return !!flow.conditionExpression;\n}\n\nfunction isDefaultFlow(node, flow) {\n return node['default'] === flow;\n}","const {\n is\n} = require('bpmnlint-utils');\n\nconst implementationAttributes = [\n 'camunda:expression',\n 'camunda:delegateExpression',\n 'camunda:class',\n 'camunda:type'\n];\n\n/**\n * Rule that reports the usage of collapsed sub-processes.\n */\nmodule.exports = function() {\n\n function check(node, reporter) {\n if (is(node, 'camunda:ServiceTaskLike')) {\n\n const process = findNodeProcess(node);\n\n if (!process || !process.get('isExecutable')) {\n return;\n }\n\n if (\n hasConnector(node) ||\n hasAnyAttribute(node, implementationAttributes)\n ) {\n return;\n }\n\n if (is(node, 'bpmn:BusinessRuleTask') && hasAttribute(node, 'camunda:decisionRef')) {\n return;\n }\n\n reporter.report(node.id, 'Implementation is missing');\n }\n }\n\n return {\n check: check\n };\n};\n\nfunction findNodeProcess(node) {\n let parent = node.$parent;\n\n while (parent && !is(parent, 'bpmn:Process')) {\n parent = parent.$parent;\n }\n\n return parent;\n}\n\nfunction hasConnector(bpmnElement) {\n const extensionElements = bpmnElement.get('extensionElements');\n\n if (!extensionElements) {\n return false;\n }\n\n return extensionElements.get('values').some(function(extension) {\n return is(extension, 'camunda:Connector');\n });\n}\n\nfunction hasAnyAttribute(bpmnElement, attributes) {\n return attributes.some(function(attribute) {\n return hasAttribute(bpmnElement, attribute);\n });\n}\n\nfunction hasAttribute(bpmnElement, attribute) {\n return bpmnElement.get(attribute) !== undefined;\n}\n","/**\n * A rule that checks that sequence flows outgoing from a\n * conditional forking gateway or activity are\n * either default flows _or_ have a condition attached\n */\nmodule.exports = function() {\n\n function check(node, reporter) {\n\n if (!isConditionalForking(node)) {\n return;\n }\n\n const outgoing = node.outgoing || [];\n\n outgoing.forEach((flow) => {\n const missingCondition = (\n !hasCondition(flow) &&\n !isDefaultFlow(node, flow)\n );\n\n if (missingCondition) {\n reporter.report(flow.id, 'Sequence flow is missing condition', [ 'conditionExpression' ]);\n }\n });\n }\n\n return {\n check\n };\n\n};\n\n\n// helpers /////////////////////////////\n\nfunction isConditionalForking(node) {\n\n const defaultFlow = node['default'];\n const outgoing = node.outgoing || [];\n\n return defaultFlow || outgoing.find(hasCondition);\n}\n\nfunction hasCondition(flow) {\n return !!flow.conditionExpression;\n}\n\nfunction isDefaultFlow(node, flow) {\n return node['default'] === flow;\n}","const {\n is,\n isAny\n} = require('bpmnlint-utils');\n\n\n/**\n * A rule that checks the presence of an end event per scope.\n */\nmodule.exports = function() {\n\n function hasEndEvent(node) {\n const flowElements = node.flowElements || [];\n\n return (\n flowElements.some(node => is(node, 'bpmn:EndEvent'))\n );\n }\n\n function check(node, reporter) {\n\n if (!isAny(node, [\n 'bpmn:Process',\n 'bpmn:SubProcess'\n ])) {\n return;\n }\n\n if (!hasEndEvent(node)) {\n const type = is(node, 'bpmn:SubProcess') ? 'Sub process' : 'Process';\n\n reporter.report(node.id, type + ' is missing end event');\n }\n }\n\n return { check };\n};\n","const {\n is\n} = require('bpmnlint-utils');\n\n/**\n * A rule that checks that start events inside an event sub-process\n * are typed.\n */\nmodule.exports = function() {\n\n function check(node, reporter) {\n\n if (!is(node, 'bpmn:SubProcess') || !node.triggeredByEvent) {\n return;\n }\n\n const flowElements = node.flowElements || [];\n\n flowElements.forEach(function(flowElement) {\n\n if (!is(flowElement, 'bpmn:StartEvent')) {\n return false;\n }\n\n const eventDefinitions = flowElement.eventDefinitions || [];\n\n if (eventDefinitions.length === 0) {\n reporter.report(flowElement.id, 'Start event is missing event definition', [ 'eventDefinitions' ]);\n }\n });\n }\n\n return {\n check\n };\n\n};","const {\n isAny\n} = require('bpmnlint-utils');\n\n/**\n * A rule that checks that no fake join is modeled by attempting\n * to give a task or event join semantics.\n *\n * Users should model a parallel joining gateway\n * to achieve the desired behavior.\n */\nmodule.exports = function() {\n\n function check(node, reporter) {\n\n if (!isAny(node, [\n 'bpmn:Activity',\n 'bpmn:Event'\n ])) {\n return;\n }\n\n const incoming = node.incoming || [];\n\n if (incoming.length > 1) {\n reporter.report(node.id, 'Incoming flows do not join');\n }\n }\n\n return {\n check\n };\n\n};","const {\n is,\n isAny\n} = require('bpmnlint-utils');\n\n\n/**\n * A rule that verifies that global elements are properly used.\n *\n * Currently recognized global elements are:\n *\n * * `bpmn:Error`\n * * `bpmn:Escalation`\n * * `bpmn:Message`\n * * `bpmn:Signal`\n *\n * For each of these elements proper usage implies:\n *\n * * element must have a name\n * * element is referenced by at least one element\n * * there exists only a single element per type with a given name\n */\nmodule.exports = function() {\n\n function check(node, reporter) {\n\n if (!is(node, 'bpmn:Definitions')) {\n return false;\n }\n\n const rootElements = getRootElements(node);\n\n const referencingElements = getReferencingElements(node);\n\n rootElements.forEach(rootElement => {\n if (!hasName(rootElement)) {\n reporter.report(rootElement.id, 'Element is missing name');\n }\n\n if (!isReferenced(rootElement, referencingElements)) {\n reporter.report(rootElement.id, 'Element is unused');\n }\n\n if (!isUnique(rootElement, rootElements)) {\n reporter.report(rootElement.id, 'Element name is not unique');\n }\n });\n\n }\n\n return {\n check\n };\n\n // helpers /////////////////////////////\n\n function getRootElements(definitions) {\n return definitions.rootElements.filter(node => isAny(node, [ 'bpmn:Error', 'bpmn:Escalation', 'bpmn:Message', 'bpmn:Signal' ]));\n }\n\n function getReferencingElements(definitions) {\n const referencingElements = [];\n\n function traverse(element) {\n if (is(element, 'bpmn:Definitions') && element.get('rootElements').length) {\n element.get('rootElements').forEach(traverse);\n }\n\n if (is(element, 'bpmn:FlowElementsContainer') && element.get('flowElements').length) {\n element.get('flowElements').forEach(traverse);\n }\n\n if (is(element, 'bpmn:Event') && element.get('eventDefinitions').length) {\n element.get('eventDefinitions').forEach(eventDefinition => referencingElements.push(eventDefinition));\n }\n\n if (is(element, 'bpmn:Collaboration') && element.get('messageFlows').length) {\n element.get('messageFlows').forEach(traverse);\n }\n\n if (isAny(element, [\n 'bpmn:MessageFlow',\n 'bpmn:ReceiveTask',\n 'bpmn:SendTask'\n ])) {\n referencingElements.push(element);\n }\n }\n\n traverse(definitions);\n\n return referencingElements;\n }\n\n function hasName(event) {\n return (\n event.name?.trim() !== ''\n );\n }\n\n function isReferenced(rootElement, referencingElements) {\n if (is(rootElement, 'bpmn:Error')) {\n return referencingElements.some(referencingElement => {\n return is(referencingElement, 'bpmn:ErrorEventDefinition')\n && rootElement.get('id') === referencingElement.get('errorRef')?.get('id');\n });\n }\n\n if (is(rootElement, 'bpmn:Escalation')) {\n return referencingElements.some(referencingElement => {\n return is(referencingElement, 'bpmn:EscalationEventDefinition')\n && rootElement.get('id') === referencingElement.get('escalationRef')?.get('id');\n });\n }\n\n if (is(rootElement, 'bpmn:Message')) {\n return referencingElements.some(referencingElement => {\n return isAny(referencingElement, [\n 'bpmn:MessageEventDefinition',\n 'bpmn:MessageFlow',\n 'bpmn:ReceiveTask',\n 'bpmn:SendTask'\n ]) && rootElement.get('id') === referencingElement.get('messageRef')?.get('id');\n });\n }\n\n if (is(rootElement, 'bpmn:Signal')) {\n return referencingElements.some(referencingElement => {\n return is(referencingElement, 'bpmn:SignalEventDefinition')\n && rootElement.get('id') === referencingElement.get('signalRef')?.get('id');\n });\n }\n }\n\n function isUnique(rootElement, rootElements) {\n return (\n rootElements.filter(otherRootElement => is(otherRootElement, rootElement.$type) && rootElement.name === otherRootElement.name).length === 1\n );\n }\n};","const {\n is\n} = require('bpmnlint-utils');\n\n/**\n * Create a checker that disallows the given element type.\n *\n * @param {String} type\n *\n * @return {Function} ruleImpl\n */\nfunction disallowNodeType(type) {\n\n return function() {\n\n function check(node, reporter) {\n\n if (is(node, type)) {\n reporter.report(node.id, 'Element has disallowed type <' + type + '>');\n }\n }\n\n return {\n check\n };\n\n };\n\n}\n\nmodule.exports.disallowNodeType = disallowNodeType;\n\n/**\n * Find a parent for the given element\n *\n * @param {ModdleElement} node\n *\n * @param {String} type\n *\n * @return {ModdleElement} element\n */\n\nfunction findParent(node, type) {\n if (!node) {\n return null;\n }\n\n const parent = node.$parent;\n\n if (!parent) {\n return node;\n }\n\n if (is(parent, type)) {\n return parent;\n }\n\n return findParent(parent, type);\n}\n\nmodule.exports.findParent = findParent;","const {\n is,\n isAny\n} = require('bpmnlint-utils');\n\n\n/**\n * A rule that checks the presence of a label.\n */\nmodule.exports = function() {\n\n function check(node, reporter) {\n\n if (isAny(node, [\n 'bpmn:ParallelGateway',\n 'bpmn:EventBasedGateway'\n ])) {\n return;\n }\n\n // ignore joining gateways\n if (is(node, 'bpmn:Gateway') && !isForking(node)) {\n return;\n }\n\n // ignore sub-processes\n if (is(node, 'bpmn:SubProcess')) {\n\n // TODO(nikku): better ignore expanded sub-processes only\n return;\n }\n\n // ignore sequence flow without condition\n if (is(node, 'bpmn:SequenceFlow') && !hasCondition(node)) {\n return;\n }\n\n // ignore data objects and artifacts for now\n if (isAny(node, [\n 'bpmn:FlowNode',\n 'bpmn:SequenceFlow',\n 'bpmn:Participant',\n 'bpmn:Lane'\n ])) {\n\n const name = (node.name || '').trim();\n\n if (name.length === 0) {\n reporter.report(node.id, 'Element is missing label/name', [ 'name' ]);\n }\n }\n }\n\n return { check };\n};\n\n\n// helpers ////////////////////////\n\nfunction isForking(node) {\n const outgoing = node.outgoing || [];\n\n return outgoing.length > 1;\n}\n\nfunction hasCondition(node) {\n return node.conditionExpression;\n}","const {\n groupBy\n} = require('min-dash');\n\nconst {\n is\n} = require('bpmnlint-utils');\n\n\n/**\n * A rule that verifies that link events are properly used.\n *\n * This implies:\n *\n * * for every link throw there exists a link catch within\n * the same scope, and vice versa\n * * there exists only a single pair of [ throw, catch ] links\n * with a given name, per scope\n * * link events have a name\n *\n */\nmodule.exports = function() {\n\n function check(node, reporter) {\n\n if (!is(node, 'bpmn:FlowElementsContainer')) {\n return;\n }\n\n const links = (node.flowElements || []).filter(isLinkEvent);\n\n for (const link of links) {\n if (!link.name) {\n reporter.report(link.id, 'Link event is missing name');\n }\n }\n\n const names = groupBy(links, (link) => link.name);\n\n for (const [ name, events ] of Object.entries(names)) {\n\n // ignore unnamed (validated earlier)\n if (!name) {\n continue;\n }\n\n // missing catch or throw event\n if (events.length === 1) {\n const event = events[0];\n\n reporter.report(event.id, `Link ${isThrowEvent(event) ? 'catch' : 'throw' } event with name <${ name }> missing in scope`);\n }\n\n const throwEvents = events.filter(isThrowEvent);\n\n if (throwEvents.length > 1) {\n for (const event of throwEvents) {\n reporter.report(event.id, `Duplicate link throw event with name <${name}> in scope`);\n }\n }\n\n const catchEvents = events.filter(isCatchEvent);\n\n if (catchEvents.length > 1) {\n for (const event of catchEvents) {\n reporter.report(event.id, `Duplicate link catch event with name <${name}> in scope`);\n }\n }\n }\n\n }\n\n return {\n check\n };\n};\n\n\n// helpers /////////////////\n\nfunction isLinkEvent(node) {\n\n var eventDefinitions = node.eventDefinitions || [];\n\n if (!is(node, 'bpmn:Event')) {\n return false;\n }\n\n return eventDefinitions.some(\n definition => is(definition, 'bpmn:LinkEventDefinition')\n );\n}\n\nfunction isThrowEvent(node) {\n return is(node, 'bpmn:ThrowEvent');\n}\n\nfunction isCatchEvent(node) {\n return is(node, 'bpmn:CatchEvent');\n}","const {\n is\n} = require('bpmnlint-utils');\n\nconst {\n flatten\n} = require('min-dash');\n\n/**\n * A rule that checks that there is no BPMNDI information missing for elements,\n * which require BPMNDI.\n */\nmodule.exports = function() {\n\n function check(node, reporter) {\n\n if (!is(node, 'bpmn:Definitions')) {\n return false;\n }\n\n // (1) Construct array of all BPMN elements\n const bpmnElements = getAllBpmnElements(node.rootElements);\n\n // (2) Filter BPMN elements without visual representation\n const visualBpmnElements = bpmnElements.filter(hasVisualRepresentation);\n\n // (3) Construct array of BPMNDI references\n const diBpmnReferences = getAllDiBpmnReferences(node);\n\n // (4) Report elements without BPMNDI\n visualBpmnElements.forEach((element) => {\n if (diBpmnReferences.indexOf(element.id) === -1) {\n reporter.report(element.id, 'Element is missing bpmndi');\n }\n });\n }\n\n return {\n check\n };\n\n};\n\n\n// helpers /////////////////////////////\n\n/**\n * Get all BPMN elements within a bpmn:Definitions node\n *\n * @param {array} rootElements - An array of Moddle rootElements\n * @return {array} A flat array with all BPMN elements, each represented with { id: elementId, $type: elementType }\n *\n */\nfunction getAllBpmnElements(rootElements) {\n return flatten(rootElements.map((rootElement) => {\n const laneSet =\n rootElement.laneSets && rootElement.laneSets[0] || rootElement.childLaneSet;\n\n // Include\n // * flowElements (e.g., tasks, sequenceFlows),\n // * nested flowElements,\n // * participants,\n // * artifacts (groups),\n // * laneSets\n // * nested laneSets\n // * childLaneSets\n // * nested childLaneSets\n // * messageFlows\n const elements = flatten([].concat(\n rootElement.flowElements || [],\n (rootElement.flowElements && getAllBpmnElements(rootElement.flowElements.filter(hasFlowElements))) || [],\n rootElement.participants || [],\n rootElement.artifacts || [],\n laneSet && laneSet.lanes || [],\n laneSet && laneSet.lanes && getAllBpmnElements(laneSet.lanes.filter(hasChildLaneSet)) || [],\n rootElement.messageFlows || []\n ));\n\n if (elements.length > 0) {\n return elements.map((element) => {\n\n return {\n id: element.id,\n $type: element.$type\n };\n });\n } else {\n\n // We are not interested in the rest here (DI)\n return [];\n }\n }));\n}\n\n/**\n * Get all BPMN elements within a bpmn:Definitions node\n *\n * @param {ModdleElement} definitionsNode - A moddleElement representing the\n * bpmn:Definitions element\n * @return {array} A flat array with all BPMNDI element ids part of\n * this bpmn:Definitions node\n *\n */\nfunction getAllDiBpmnReferences(definitionsNode) {\n return flatten(\n definitionsNode.diagrams.map((diagram) => {\n\n const diElements = diagram.plane.planeElement || [];\n\n return diElements.map((element) => {\n\n return element.bpmnElement.id;\n });\n })\n );\n}\n\nfunction hasVisualRepresentation(element) {\n const noVisRepresentation = [ 'bpmn:DataObject' ];\n\n return noVisRepresentation.includes(element.$type) ? false : true;\n}\n\nfunction hasFlowElements(element) {\n return element.flowElements ? true : false;\n}\n\nfunction hasChildLaneSet(element) {\n return element.childLaneSet ? true : false;\n}\n","const disallowNodeType = require('./helper').disallowNodeType;\n\nmodule.exports = disallowNodeType('bpmn:ComplexGateway');","const {\n isAny,\n is\n} = require('bpmnlint-utils');\n\n\n/**\n * A rule that verifies that there exists no disconnected\n * flow elements, i.e. elements without incoming\n * _or_ outgoing sequence flows\n */\nmodule.exports = function() {\n\n function check(node, reporter) {\n\n if (!isAny(node, [\n 'bpmn:Task',\n 'bpmn:Gateway',\n 'bpmn:SubProcess',\n 'bpmn:Event'\n ]) || node.triggeredByEvent) {\n return;\n }\n\n // compensation activity and boundary events are\n // linked visually via associations. If these associations\n // exist we are fine, too\n if (isCompensationLinked(node)) {\n return;\n }\n\n const incoming = node.incoming || [];\n const outgoing = node.outgoing || [];\n\n if (!incoming.length && !outgoing.length) {\n reporter.report(node.id, 'Element is not connected');\n }\n }\n\n return {\n check\n };\n};\n\n\n// helpers /////////////////\n\nfunction isCompensationBoundary(node) {\n\n var eventDefinitions = node.eventDefinitions;\n\n if (!is(node, 'bpmn:BoundaryEvent')) {\n return false;\n }\n\n if (!eventDefinitions || eventDefinitions.length !== 1) {\n return false;\n }\n\n return is(eventDefinitions[0], 'bpmn:CompensateEventDefinition');\n}\n\nfunction isCompensationActivity(node) {\n return node.isForCompensation;\n}\n\nfunction isCompensationLinked(node) {\n var source = isCompensationBoundary(node);\n var target = isCompensationActivity(node);\n\n // TODO(nikku): check, whether compensation association exists\n return source || target;\n}","const {\n is\n} = require('bpmnlint-utils');\n\n/**\n * A rule that verifies that there are no disconnected\n * flow elements, i.e. elements without incoming\n * _or_ outgoing sequence flows\n */\nmodule.exports = function() {\n\n const keyed = {};\n\n const outgoingReported = {};\n const incomingReported = {};\n\n function check(node, reporter) {\n\n if (!is(node, 'bpmn:SequenceFlow')) {\n return;\n }\n\n const key = flowKey(node);\n\n if (key in keyed) {\n reporter.report(node.id, 'SequenceFlow is a duplicate');\n\n const sourceId = node.sourceRef.id;\n const targetId = node.targetRef.id;\n\n if (!outgoingReported[sourceId]) {\n reporter.report(sourceId, 'Duplicate outgoing sequence flows');\n\n outgoingReported[sourceId] = true;\n }\n\n if (!incomingReported[targetId]) {\n reporter.report(targetId, 'Duplicate incoming sequence flows');\n\n incomingReported[targetId] = true;\n }\n } else {\n keyed[key] = node;\n }\n }\n\n return {\n check\n };\n\n};\n\n\n// helpers /////////////////\n\nfunction flowKey(flow) {\n const conditionExpression = flow.conditionExpression;\n\n const condition = conditionExpression ? conditionExpression.body : '';\n const source = flow.sourceRef ? flow.sourceRef.id : flow.id;\n const target = flow.targetRef ? flow.targetRef.id : flow.id;\n\n return source + '#' + target + '#' + condition;\n}","const {\n is\n} = require('bpmnlint-utils');\n\n\n/**\n * A rule that checks, whether a gateway forks and joins\n * at the same time.\n */\nmodule.exports = function() {\n\n function check(node, reporter) {\n\n if (!is(node, 'bpmn:Gateway')) {\n return;\n }\n\n const incoming = node.incoming || [];\n const outgoing = node.outgoing || [];\n\n if (incoming.length > 1 && outgoing.length > 1) {\n reporter.report(node.id, 'Gateway forks and joins');\n }\n }\n\n return {\n check\n };\n\n};","const {\n is,\n isAny\n} = require('bpmnlint-utils');\n\nconst {\n findParent\n} = require('./helper');\n\n/**\n * A rule that checks that an element is not an implicit end (token sink).\n */\nmodule.exports = function() {\n\n function isLinkEvent(node) {\n const eventDefinitions = node.eventDefinitions || [];\n\n return eventDefinitions.length && eventDefinitions.every(\n definition => is(definition, 'bpmn:LinkEventDefinition')\n );\n }\n\n function isCompensationEvent(node) {\n const eventDefinitions = node.eventDefinitions || [];\n\n return eventDefinitions.length && eventDefinitions.every(\n definition => is(definition, 'bpmn:CompensateEventDefinition')\n );\n }\n\n function hasCompensationActivity(node) {\n const parent = findParent(node, 'bpmn:Process');\n\n const artifacts = parent.artifacts || [];\n\n return artifacts.some((element) => {\n if (!is(element, 'bpmn:Association')) {\n return false;\n }\n\n const source = element.sourceRef;\n\n return source.id === node.id;\n });\n }\n\n function isForCompensation(node) {\n return node.isForCompensation;\n }\n\n function isImplicitEnd(node) {\n const outgoing = node.outgoing || [];\n\n if (is(node, 'bpmn:SubProcess') && node.triggeredByEvent) {\n return false;\n }\n\n if (is(node, 'bpmn:IntermediateThrowEvent') && isLinkEvent(node)) {\n return false;\n }\n\n if (is(node, 'bpmn:EndEvent')) {\n return false;\n }\n\n if (is(node, 'bpmn:BoundaryEvent') && isCompensationEvent(node) && hasCompensationActivity(node)) {\n return false;\n }\n\n if (is(node, 'bpmn:Task') && isForCompensation(node)) {\n return false;\n }\n\n return outgoing.length === 0;\n }\n\n function check(node, reporter) {\n\n if (!isAny(node, [ 'bpmn:Event', 'bpmn:Activity', 'bpmn:Gateway' ])) {\n return;\n }\n\n if (isImplicitEnd(node)) {\n reporter.report(node.id, 'Element is an implicit end');\n }\n }\n\n return { check };\n};","const {\n isAny\n} = require('bpmnlint-utils');\n\n\n/**\n * A rule that checks that no implicit split is modeled\n * starting from a task.\n *\n * users should model the parallel splitting gateway\n * explicitly instead.\n */\nmodule.exports = function() {\n\n function check(node, reporter) {\n\n if (!isAny(node, [\n 'bpmn:Activity',\n 'bpmn:Event'\n ])) {\n return;\n }\n\n const outgoing = node.outgoing || [];\n\n const outgoingWithoutCondition = outgoing.filter((flow) => {\n return !hasCondition(flow) && !isDefaultFlow(node, flow);\n });\n\n if (outgoingWithoutCondition.length > 1) {\n reporter.report(node.id, 'Flow splits implicitly');\n }\n }\n\n return {\n check\n };\n\n};\n\n\n// helpers /////////////////////////////\n\nfunction hasCondition(flow) {\n return !!flow.conditionExpression;\n}\n\nfunction isDefaultFlow(node, flow) {\n return node['default'] === flow;\n}","const {\n is,\n isAny\n} = require('bpmnlint-utils');\n\n\n/**\n * A rule that checks that an element is not an implicit start (token spawn).\n */\nmodule.exports = function() {\n\n function isLinkEvent(node) {\n const eventDefinitions = node.eventDefinitions || [];\n\n return eventDefinitions.length && eventDefinitions.every(\n definition => is(definition, 'bpmn:LinkEventDefinition')\n );\n }\n\n function isImplicitStart(node) {\n const incoming = node.incoming || [];\n\n if (is(node, 'bpmn:Activity') && node.isForCompensation) {\n return false;\n }\n\n if (is(node, 'bpmn:SubProcess') && node.triggeredByEvent) {\n return false;\n }\n\n if (is(node, 'bpmn:IntermediateCatchEvent') && isLinkEvent(node)) {\n return false;\n }\n\n if (isAny(node, [ 'bpmn:StartEvent', 'bpmn:BoundaryEvent' ])) {\n return false;\n }\n\n return incoming.length === 0;\n }\n\n function check(node, reporter) {\n\n if (!isAny(node, [ 'bpmn:Event', 'bpmn:Activity', 'bpmn:Gateway' ])) {\n return;\n }\n\n if (isImplicitStart(node)) {\n reporter.report(node.id, 'Element is an implicit start');\n }\n }\n\n return { check };\n};\n","const disallowNodeType = require('./helper').disallowNodeType;\n\nmodule.exports = disallowNodeType('bpmn:InclusiveGateway');","const {\n is\n} = require('bpmnlint-utils');\n\n\n/**\n * Rule that checks if two elements overlap except:\n * - Boundary events overlap their host\n * - Child elements overlap / are on top of their parent (e.g., elements within a subProcess)\n */\nmodule.exports = function() {\n\n function check(node, reporter) {\n if (!is(node, 'bpmn:Definitions')) {\n return;\n }\n\n const rootElements = node.rootElements || [];\n const elementsToReport = new Set();\n const elementsOutsideToReport = new Set();\n const diObjects = getAllDiObjects(node);\n const processElementsParentDiMap = new Map(); // map with sub/process as key and its parent boundary di object\n\n rootElements\n .filter(element => is(element, 'bpmn:Collaboration'))\n .forEach(collaboration => {\n const participants = collaboration.participants || [];\n checkElementsArray(participants, elementsToReport, diObjects);\n\n participants.forEach(participant => {\n processElementsParentDiMap.set(participant.processRef, diObjects.get(participant));\n });\n });\n\n rootElements\n .filter(element => is(element, 'bpmn:Process'))\n .forEach(process => {\n const parentDi = processElementsParentDiMap.get(process) || {};\n checkProcess(process, elementsToReport, elementsOutsideToReport, diObjects, parentDi);\n });\n\n // report elements\n elementsToReport.forEach(element => reporter.report(element.id, 'Element overlaps with other element'));\n elementsOutsideToReport.forEach(element => reporter.report(element.id, 'Element is outside of parent boundary'));\n }\n\n return {\n check: check\n };\n};\n\n// helpers /////////////////\n\n/**\n * Recursively check subprocesses in a process\n * @param {Object} node Process or SubProcess\n * @param {Set} elementsToReport\n * @param {Set} elementsOutsideToReport\n * @param {Map} diObjects\n */\nfunction checkProcess(node, elementsToReport, elementsOutsideToReport, diObjects, parentDi) {\n\n const flowElements = node.flowElements || [];\n\n const flowElementsWithDi = flowElements.filter(element => diObjects.has(element));\n\n // check child elements for overlap\n checkElementsArray(flowElementsWithDi, elementsToReport, diObjects);\n\n // check child elements outside parent boundary\n //\n // * data objects do not have a visual representation\n // * for historical reasons data store references may be\n // outside of parent boundaries\n //\n flowElementsWithDi.forEach(element => {\n if (\n !is(element, 'bpmn:DataStoreReference') &&\n isOutsideParentBoundary(diObjects.get(element).bounds, parentDi.bounds)\n ) {\n elementsOutsideToReport.add(element);\n }\n });\n\n // recurse into subprocesses\n const subProcesses = flowElements.filter(element => is(element, 'bpmn:SubProcess'));\n subProcesses.forEach(subProcess => {\n const subProcessDi = diObjects.get(subProcess) || {};\n const subProcessParentBoundary = subProcessDi.isExpanded ? subProcessDi : {};\n checkProcess(subProcess, elementsToReport, elementsOutsideToReport, diObjects, subProcessParentBoundary);\n });\n}\n\n/**\n * @param {Array} elements\n * @param {Set} elementsToReport\n */\nfunction checkElementsArray(elements, elementsToReport, diObjects) {\n for (let i = 0; i < elements.length - 1; i++) {\n const element = elements[i];\n\n for (let j = i + 1; j < elements.length; j++) {\n const element2 = elements[j];\n\n // ignore if Boundary events overlap their host\n // but still check if they overlap other elements\n if (element.attachedToRef === element2 || element2.attachedToRef === element) {\n continue;\n }\n\n if (isCollision(diObjects.get(element).bounds, diObjects.get(element2).bounds)) {\n elementsToReport.add(element);\n elementsToReport.add(element2);\n }\n }\n }\n}\n\n/**\n * Check if child element is outside of parent boundary\n */\nfunction isOutsideParentBoundary(childBounds, parentBounds) {\n if (!isValidShapeElement(childBounds) || !isValidShapeElement(parentBounds)) {\n return false;\n }\n\n const isTopLeftCornerInside = childBounds.x >= parentBounds.x && childBounds.y >= parentBounds.y;\n const isBottomRightCornerInside = childBounds.x + childBounds.width <= parentBounds.x + parentBounds.width && childBounds.y + childBounds.height <= parentBounds.y + parentBounds.height;\n const isInside = isTopLeftCornerInside && isBottomRightCornerInside;\n\n return !isInside;\n}\n\n/**\n * Check if two rectangle shapes collides\n */\nfunction isCollision(firstBounds, secondBounds) {\n if (!isValidShapeElement(firstBounds) || !isValidShapeElement(secondBounds)) {\n return false;\n }\n\n const collisionX = firstBounds.x + firstBounds.width >= secondBounds.x && secondBounds.x + secondBounds.width >= firstBounds.x;\n const collisionY = firstBounds.y + firstBounds.height >= secondBounds.y && secondBounds.y + secondBounds.height >= firstBounds.y;\n\n // collision on both axis\n return collisionX && collisionY;\n}\n\n/**\n * Checks if shape bounds has all necessary values for collision check\n */\nfunction isValidShapeElement(bounds) {\n return !!bounds && is(bounds, 'dc:Bounds') &&\n typeof (bounds.x) === 'number' &&\n typeof (bounds.y) === 'number' &&\n typeof (bounds.width) === 'number' &&\n typeof (bounds.height) === 'number';\n}\n\n/**\n * Get all di object as one map object\n * @param {Object} node bpmn:Definitions\n * @returns {Map} map of di objects with element as key\n */\nfunction getAllDiObjects(node) {\n const diObjects = new Map();\n const diagrams = node.diagrams || [];\n\n diagrams\n .filter(diagram => !!diagram.plane)\n .forEach(diagram => {\n const planeElements = diagram.plane.planeElement || [];\n planeElements\n .filter(planeElement => !!planeElement.bpmnElement)\n .forEach(planeElement => {\n diObjects.set(planeElement.bpmnElement, planeElement);\n });\n });\n\n return diObjects;\n}\n","const {\n is\n} = require('bpmnlint-utils');\n\n/**\n * A rule that checks whether not more than one blank start event\n * exists per scope.\n */\nmodule.exports = function() {\n\n function check(node, reporter) {\n\n if (!is(node, 'bpmn:FlowElementsContainer')) {\n return;\n }\n\n const flowElements = node.flowElements || [];\n\n const blankStartEvents = flowElements.filter(function(flowElement) {\n\n if (!is(flowElement, 'bpmn:StartEvent')) {\n return false;\n }\n\n const eventDefinitions = flowElement.eventDefinitions || [];\n\n return eventDefinitions.length === 0;\n });\n\n if (blankStartEvents.length > 1) {\n const type = is(node, 'bpmn:SubProcess') ? 'Sub process' : 'Process';\n\n reporter.report(node.id, type + ' has multiple blank start events');\n }\n }\n\n return {\n check\n };\n\n};","const {\n is\n} = require('bpmnlint-utils');\n\n\n/**\n * A rule that verifies that an event contains maximum one event definition.\n */\nmodule.exports = function() {\n\n function check(node, reporter) {\n\n if (!is(node, 'bpmn:Event')) {\n return;\n }\n\n const eventDefinitions = node.eventDefinitions || [];\n\n if (eventDefinitions.length > 1) {\n reporter.report(node.id, 'Event has multiple event definitions', [ 'eventDefinitions' ]);\n }\n }\n\n return {\n check\n };\n\n};","const {\n is,\n isAny\n} = require('bpmnlint-utils');\n\n\n/**\n * A rule that checks for the presence of a start event per scope.\n */\nmodule.exports = function() {\n\n function hasStartEvent(node) {\n const flowElements = node.flowElements || [];\n\n return (\n flowElements.some(node => is(node, 'bpmn:StartEvent'))\n );\n }\n\n function check(node, reporter) {\n\n if (!isAny(node, [\n 'bpmn:Process',\n 'bpmn:SubProcess'\n ])) {\n return;\n }\n\n if (!hasStartEvent(node)) {\n const type = is(node, 'bpmn:SubProcess') ? 'Sub process' : 'Process';\n\n reporter.report(node.id, type + ' is missing start event');\n }\n }\n\n return { check };\n};\n","const {\n is\n} = require('bpmnlint-utils');\n\n\n/**\n * A rule that checks that start events inside a normal sub-processes\n * are blank (do not have an event definition).\n */\nmodule.exports = function() {\n\n function check(node, reporter) {\n\n if (!is(node, 'bpmn:SubProcess') || node.triggeredByEvent) {\n return;\n }\n\n const flowElements = node.flowElements || [];\n\n flowElements.forEach(function(flowElement) {\n\n if (!is(flowElement, 'bpmn:StartEvent')) {\n return false;\n }\n\n const eventDefinitions = flowElement.eventDefinitions || [];\n\n if (eventDefinitions.length > 0) {\n reporter.report(flowElement.id, 'Start event must be blank', [ 'eventDefinitions' ]);\n }\n });\n }\n\n return {\n check\n };\n\n};","const {\n is\n} = require('bpmnlint-utils');\n\n/**\n * A rule that checks, whether a gateway has only one source and target.\n *\n * Those gateways are superfluous since they don't do anything.\n */\nmodule.exports = function() {\n\n function check(node, reporter) {\n\n if (!is(node, 'bpmn:Gateway')) {\n return;\n }\n\n const incoming = node.incoming || [];\n const outgoing = node.outgoing || [];\n\n if (incoming.length === 1 && outgoing.length === 1) {\n reporter.report(node.id, 'Gateway is superfluous. It only has one source and target.');\n }\n }\n\n return {\n check\n };\n\n};","const {\n is, isAny\n} = require('bpmnlint-utils');\n\n/**\n * A rule that checks, whether a gateway has only one source and target.\n *\n * Those gateways are superfluous since they don't do anything.\n */\nmodule.exports = function() {\n\n function check(node, reporter) {\n\n if (!isAny(node, [ 'bpmn:Process', 'bpmn:SubProcess' ])) {\n return;\n }\n\n const flowElements = node.flowElements || [];\n\n const ends = flowElements.filter(\n element => is(element, 'bpmn:FlowNode') && (element.outgoing || []).length === 0\n );\n\n const terminateEnds = ends.filter(isTerminateEnd);\n\n if (terminateEnds.length !== 1) {\n\n // TODO(nikku): only detect basic cases, do not\n // do any kinds of elaborate flow analysis\n return;\n }\n\n const superfluous = ends.every(\n (end) => isInterruptingEventSub(end) || isTerminateEnd(end)\n );\n\n if (superfluous) {\n\n for (const node of terminateEnds) {\n reporter.report(node.id, 'Termination is superfluous.');\n }\n }\n }\n\n return {\n check\n };\n\n};\n\nfunction isTerminateEnd(element) {\n return is(element, 'bpmn:EndEvent') && (element.eventDefinitions || []).some(\n eventDefinition => is(eventDefinition, 'bpmn:TerminateEventDefinition')\n );\n}\n\nfunction isInterruptingEventSub(element) {\n const isEventSub = is(element, 'bpmn:SubProcess') && element.triggeredByEvent;\n\n return isEventSub && (element.flowElements || []).some(\n element => is(element, 'bpmn:StartEvent') && element.isInterrupting\n );\n}","/**\n * Validate and register a client plugin.\n *\n * @param {Object} plugin\n * @param {String} type\n */\nexport function registerClientPlugin(plugin, type) {\n var plugins = window.plugins || [];\n window.plugins = plugins;\n\n if (!plugin) {\n throw new Error('plugin not specified');\n }\n\n if (!type) {\n throw new Error('type not specified');\n }\n\n plugins.push({\n plugin: plugin,\n type: type\n });\n}\n\n/**\n * Validate and register a client plugin.\n *\n * @param {import('react').ComponentType} extension\n *\n * @example\n *\n * import MyExtensionComponent from './MyExtensionComponent';\n *\n * registerClientExtension(MyExtensionComponent);\n */\nexport function registerClientExtension(component) {\n registerClientPlugin(component, 'client');\n}\n\n/**\n * Validate and register a bpmn-js plugin.\n *\n * @param {Object} module\n *\n * @example\n *\n * import {\n * registerBpmnJSPlugin\n * } from 'camunda-modeler-plugin-helpers';\n *\n * const BpmnJSModule = {\n * __init__: [ 'myService' ],\n * myService: [ 'type', ... ]\n * };\n *\n * registerBpmnJSPlugin(BpmnJSModule);\n */\nexport function registerBpmnJSPlugin(module) {\n registerClientPlugin(module, 'bpmn.modeler.additionalModules');\n}\n\n/**\n * Validate and register a platform specific bpmn-js plugin.\n *\n * @param {Object} module\n *\n * @example\n *\n * import {\n * registerPlatformBpmnJSPlugin\n * } from 'camunda-modeler-plugin-helpers';\n *\n * const BpmnJSModule = {\n * __init__: [ 'myService' ],\n * myService: [ 'type', ... ]\n * };\n *\n * registerPlatformBpmnJSPlugin(BpmnJSModule);\n */\nexport function registerPlatformBpmnJSPlugin(module) {\n registerClientPlugin(module, 'bpmn.platform.modeler.additionalModules');\n}\n\n/**\n * Validate and register a cloud specific bpmn-js plugin.\n *\n * @param {Object} module\n *\n * @example\n *\n * import {\n * registerCloudBpmnJSPlugin\n * } from 'camunda-modeler-plugin-helpers';\n *\n * const BpmnJSModule = {\n * __init__: [ 'myService' ],\n * myService: [ 'type', ... ]\n * };\n *\n * registerCloudBpmnJSPlugin(BpmnJSModule);\n */\nexport function registerCloudBpmnJSPlugin(module) {\n registerClientPlugin(module, 'bpmn.cloud.modeler.additionalModules');\n}\n\n/**\n * Validate and register a bpmn-moddle extension plugin.\n *\n * @param {Object} descriptor\n *\n * @example\n * import {\n * registerBpmnJSModdleExtension\n * } from 'camunda-modeler-plugin-helpers';\n *\n * var moddleDescriptor = {\n * name: 'my descriptor',\n * uri: 'http://example.my.company.localhost/schema/my-descriptor/1.0',\n * prefix: 'mydesc',\n *\n * ...\n * };\n *\n * registerBpmnJSModdleExtension(moddleDescriptor);\n */\nexport function registerBpmnJSModdleExtension(descriptor) {\n registerClientPlugin(descriptor, 'bpmn.modeler.moddleExtension');\n}\n\n/**\n * Validate and register a platform specific bpmn-moddle extension plugin.\n *\n * @param {Object} descriptor\n *\n * @example\n * import {\n * registerPlatformBpmnJSModdleExtension\n * } from 'camunda-modeler-plugin-helpers';\n *\n * var moddleDescriptor = {\n * name: 'my descriptor',\n * uri: 'http://example.my.company.localhost/schema/my-descriptor/1.0',\n * prefix: 'mydesc',\n *\n * ...\n * };\n *\n * registerPlatformBpmnJSModdleExtension(moddleDescriptor);\n */\nexport function registerPlatformBpmnJSModdleExtension(descriptor) {\n registerClientPlugin(descriptor, 'bpmn.platform.modeler.moddleExtension');\n}\n\n/**\n * Validate and register a cloud specific bpmn-moddle extension plugin.\n *\n * @param {Object} descriptor\n *\n * @example\n * import {\n * registerCloudBpmnJSModdleExtension\n * } from 'camunda-modeler-plugin-helpers';\n *\n * var moddleDescriptor = {\n * name: 'my descriptor',\n * uri: 'http://example.my.company.localhost/schema/my-descriptor/1.0',\n * prefix: 'mydesc',\n *\n * ...\n * };\n *\n * registerCloudBpmnJSModdleExtension(moddleDescriptor);\n */\nexport function registerCloudBpmnJSModdleExtension(descriptor) {\n registerClientPlugin(descriptor, 'bpmn.cloud.modeler.moddleExtension');\n}\n\n/**\n * Validate and register a dmn-moddle extension plugin.\n *\n * @param {Object} descriptor\n *\n * @example\n * import {\n * registerDmnJSModdleExtension\n * } from 'camunda-modeler-plugin-helpers';\n *\n * var moddleDescriptor = {\n * name: 'my descriptor',\n * uri: 'http://example.my.company.localhost/schema/my-descriptor/1.0',\n * prefix: 'mydesc',\n *\n * ...\n * };\n *\n * registerDmnJSModdleExtension(moddleDescriptor);\n */\nexport function registerDmnJSModdleExtension(descriptor) {\n registerClientPlugin(descriptor, 'dmn.modeler.moddleExtension');\n}\n\n/**\n * Validate and register a cloud specific dmn-moddle extension plugin.\n *\n * @param {Object} descriptor\n *\n * @example\n * import {\n * registerCloudDmnJSModdleExtension\n * } from 'camunda-modeler-plugin-helpers';\n *\n * var moddleDescriptor = {\n * name: 'my descriptor',\n * uri: 'http://example.my.company.localhost/schema/my-descriptor/1.0',\n * prefix: 'mydesc',\n *\n * ...\n * };\n *\n * registerCloudDmnJSModdleExtension(moddleDescriptor);\n */\nexport function registerCloudDmnJSModdleExtension(descriptor) {\n registerClientPlugin(descriptor, 'dmn.cloud.modeler.moddleExtension');\n}\n\n/**\n * Validate and register a platform specific dmn-moddle extension plugin.\n *\n * @param {Object} descriptor\n *\n * @example\n * import {\n * registerPlatformDmnJSModdleExtension\n * } from 'camunda-modeler-plugin-helpers';\n *\n * var moddleDescriptor = {\n * name: 'my descriptor',\n * uri: 'http://example.my.company.localhost/schema/my-descriptor/1.0',\n * prefix: 'mydesc',\n *\n * ...\n * };\n *\n * registerPlatformDmnJSModdleExtension(moddleDescriptor);\n */\nexport function registerPlatformDmnJSModdleExtension(descriptor) {\n registerClientPlugin(descriptor, 'dmn.platform.modeler.moddleExtension');\n}\n\n/**\n * Validate and register a dmn-js plugin.\n *\n * @param {Object} module\n *\n * @example\n *\n * import {\n * registerDmnJSPlugin\n * } from 'camunda-modeler-plugin-helpers';\n *\n * const DmnJSModule = {\n * __init__: [ 'myService' ],\n * myService: [ 'type', ... ]\n * };\n *\n * registerDmnJSPlugin(DmnJSModule, [ 'drd', 'literalExpression' ]);\n * registerDmnJSPlugin(DmnJSModule, 'drd')\n */\nexport function registerDmnJSPlugin(module, components) {\n\n if (!Array.isArray(components)) {\n components = [ components ]\n }\n\n components.forEach(c => registerClientPlugin(module, `dmn.modeler.${c}.additionalModules`));\n}\n\n/**\n * Validate and register a cloud specific dmn-js plugin.\n *\n * @param {Object} module\n *\n * @example\n *\n * import {\n * registerCloudDmnJSPlugin\n * } from 'camunda-modeler-plugin-helpers';\n *\n * const DmnJSModule = {\n * __init__: [ 'myService' ],\n * myService: [ 'type', ... ]\n * };\n *\n * registerCloudDmnJSPlugin(DmnJSModule, [ 'drd', 'literalExpression' ]);\n * registerCloudDmnJSPlugin(DmnJSModule, 'drd')\n */\nexport function registerCloudDmnJSPlugin(module, components) {\n\n if (!Array.isArray(components)) {\n components = [ components ]\n }\n\n components.forEach(c => registerClientPlugin(module, `dmn.cloud.modeler.${c}.additionalModules`));\n}\n\n/**\n * Validate and register a platform specific dmn-js plugin.\n *\n * @param {Object} module\n *\n * @example\n *\n * import {\n * registerPlatformDmnJSPlugin\n * } from 'camunda-modeler-plugin-helpers';\n *\n * const DmnJSModule = {\n * __init__: [ 'myService' ],\n * myService: [ 'type', ... ]\n * };\n *\n * registerPlatformDmnJSPlugin(DmnJSModule, [ 'drd', 'literalExpression' ]);\n * registerPlatformDmnJSPlugin(DmnJSModule, 'drd')\n */\nexport function registerPlatformDmnJSPlugin(module, components) {\n\n if (!Array.isArray(components)) {\n components = [ components ]\n }\n\n components.forEach(c => registerClientPlugin(module, `dmn.platform.modeler.${c}.additionalModules`));\n}\n\n/**\n * Return the modeler directory, as a string.\n *\n * @deprecated Will be removed in future Camunda Modeler versions without replacement.\n *\n * @return {String}\n */\nexport function getModelerDirectory() {\n return window.getModelerDirectory();\n}\n\n/**\n * Return the modeler plugin directory, as a string.\n *\n * @deprecated Will be removed in future Camunda Modeler versions without replacement.\n *\n * @return {String}\n */\nexport function getPluginsDirectory() {\n return window.getPluginsDirectory();\n}","'use strict';\n\n/**\n * Flatten array, one level deep.\n *\n * @template T\n *\n * @param {T[][] | T[] | null} [arr]\n *\n * @return {T[]}\n */\nfunction flatten(arr) {\n return Array.prototype.concat.apply([], arr);\n}\n\nconst nativeToString = Object.prototype.toString;\nconst nativeHasOwnProperty = Object.prototype.hasOwnProperty;\n\nfunction isUndefined(obj) {\n return obj === undefined;\n}\n\nfunction isDefined(obj) {\n return obj !== undefined;\n}\n\nfunction isNil(obj) {\n return obj == null;\n}\n\nfunction isArray(obj) {\n return nativeToString.call(obj) === '[object Array]';\n}\n\nfunction isObject(obj) {\n return nativeToString.call(obj) === '[object Object]';\n}\n\nfunction isNumber(obj) {\n return nativeToString.call(obj) === '[object Number]';\n}\n\n/**\n * @param {any} obj\n *\n * @return {boolean}\n */\nfunction isFunction(obj) {\n const tag = nativeToString.call(obj);\n\n return (\n tag === '[object Function]' ||\n tag === '[object AsyncFunction]' ||\n tag === '[object GeneratorFunction]' ||\n tag === '[object AsyncGeneratorFunction]' ||\n tag === '[object Proxy]'\n );\n}\n\nfunction isString(obj) {\n return nativeToString.call(obj) === '[object String]';\n}\n\n\n/**\n * Ensure collection is an array.\n *\n * @param {Object} obj\n */\nfunction ensureArray(obj) {\n\n if (isArray(obj)) {\n return;\n }\n\n throw new Error('must supply array');\n}\n\n/**\n * Return true, if target owns a property with the given key.\n *\n * @param {Object} target\n * @param {String} key\n *\n * @return {Boolean}\n */\nfunction has(target, key) {\n return nativeHasOwnProperty.call(target, key);\n}\n\n/**\n * @template T\n * @typedef { (\n * ((e: T) => boolean) |\n * ((e: T, idx: number) => boolean) |\n * ((e: T, key: string) => boolean) |\n * string |\n * number\n * ) } Matcher\n */\n\n/**\n * @template T\n * @template U\n *\n * @typedef { (\n * ((e: T) => U) | string | number\n * ) } Extractor\n */\n\n\n/**\n * @template T\n * @typedef { (val: T, key: any) => boolean } MatchFn\n */\n\n/**\n * @template T\n * @typedef { T[] } ArrayCollection\n */\n\n/**\n * @template T\n * @typedef { { [key: string]: T } } StringKeyValueCollection\n */\n\n/**\n * @template T\n * @typedef { { [key: number]: T } } NumberKeyValueCollection\n */\n\n/**\n * @template T\n * @typedef { StringKeyValueCollection | NumberKeyValueCollection } KeyValueCollection\n */\n\n/**\n * @template T\n * @typedef { KeyValueCollection | ArrayCollection } Collection\n */\n\n/**\n * Find element in collection.\n *\n * @template T\n * @param {Collection} collection\n * @param {Matcher} matcher\n *\n * @return {Object}\n */\nfunction find(collection, matcher) {\n\n const matchFn = toMatcher(matcher);\n\n let match;\n\n forEach(collection, function(val, key) {\n if (matchFn(val, key)) {\n match = val;\n\n return false;\n }\n });\n\n return match;\n\n}\n\n\n/**\n * Find element index in collection.\n *\n * @template T\n * @param {Collection} collection\n * @param {Matcher} matcher\n *\n * @return {number}\n */\nfunction findIndex(collection, matcher) {\n\n const matchFn = toMatcher(matcher);\n\n let idx = isArray(collection) ? -1 : undefined;\n\n forEach(collection, function(val, key) {\n if (matchFn(val, key)) {\n idx = key;\n\n return false;\n }\n });\n\n return idx;\n}\n\n\n/**\n * Filter elements in collection.\n *\n * @template T\n * @param {Collection} collection\n * @param {Matcher} matcher\n *\n * @return {T[]} result\n */\nfunction filter(collection, matcher) {\n\n const matchFn = toMatcher(matcher);\n\n let result = [];\n\n forEach(collection, function(val, key) {\n if (matchFn(val, key)) {\n result.push(val);\n }\n });\n\n return result;\n}\n\n\n/**\n * Iterate over collection; returning something\n * (non-undefined) will stop iteration.\n *\n * @template T\n * @param {Collection} collection\n * @param { ((item: T, idx: number) => (boolean|void)) | ((item: T, key: string) => (boolean|void)) } iterator\n *\n * @return {T} return result that stopped the iteration\n */\nfunction forEach(collection, iterator) {\n\n let val,\n result;\n\n if (isUndefined(collection)) {\n return;\n }\n\n const convertKey = isArray(collection) ? toNum : identity;\n\n for (let key in collection) {\n\n if (has(collection, key)) {\n val = collection[key];\n\n result = iterator(val, convertKey(key));\n\n if (result === false) {\n return val;\n }\n }\n }\n}\n\n/**\n * Return collection without element.\n *\n * @template T\n * @param {ArrayCollection} arr\n * @param {Matcher} matcher\n *\n * @return {T[]}\n */\nfunction without(arr, matcher) {\n\n if (isUndefined(arr)) {\n return [];\n }\n\n ensureArray(arr);\n\n const matchFn = toMatcher(matcher);\n\n return arr.filter(function(el, idx) {\n return !matchFn(el, idx);\n });\n\n}\n\n\n/**\n * Reduce collection, returning a single result.\n *\n * @template T\n * @template V\n *\n * @param {Collection} collection\n * @param {(result: V, entry: T, index: any) => V} iterator\n * @param {V} result\n *\n * @return {V} result returned from last iterator\n */\nfunction reduce(collection, iterator, result) {\n\n forEach(collection, function(value, idx) {\n result = iterator(result, value, idx);\n });\n\n return result;\n}\n\n\n/**\n * Return true if every element in the collection\n * matches the criteria.\n *\n * @param {Object|Array} collection\n * @param {Function} matcher\n *\n * @return {Boolean}\n */\nfunction every(collection, matcher) {\n\n return !!reduce(collection, function(matches, val, key) {\n return matches && matcher(val, key);\n }, true);\n}\n\n\n/**\n * Return true if some elements in the collection\n * match the criteria.\n *\n * @param {Object|Array} collection\n * @param {Function} matcher\n *\n * @return {Boolean}\n */\nfunction some(collection, matcher) {\n\n return !!find(collection, matcher);\n}\n\n\n/**\n * Transform a collection into another collection\n * by piping each member through the given fn.\n *\n * @param {Object|Array} collection\n * @param {Function} fn\n *\n * @return {Array} transformed collection\n */\nfunction map(collection, fn) {\n\n let result = [];\n\n forEach(collection, function(val, key) {\n result.push(fn(val, key));\n });\n\n return result;\n}\n\n\n/**\n * Get the collections keys.\n *\n * @param {Object|Array} collection\n *\n * @return {Array}\n */\nfunction keys(collection) {\n return collection && Object.keys(collection) || [];\n}\n\n\n/**\n * Shorthand for `keys(o).length`.\n *\n * @param {Object|Array} collection\n *\n * @return {Number}\n */\nfunction size(collection) {\n return keys(collection).length;\n}\n\n\n/**\n * Get the values in the collection.\n *\n * @param {Object|Array} collection\n *\n * @return {Array}\n */\nfunction values(collection) {\n return map(collection, (val) => val);\n}\n\n\n/**\n * Group collection members by attribute.\n *\n * @param {Object|Array} collection\n * @param {Extractor} extractor\n *\n * @return {Object} map with { attrValue => [ a, b, c ] }\n */\nfunction groupBy(collection, extractor, grouped = {}) {\n\n extractor = toExtractor(extractor);\n\n forEach(collection, function(val) {\n let discriminator = extractor(val) || '_';\n\n let group = grouped[discriminator];\n\n if (!group) {\n group = grouped[discriminator] = [];\n }\n\n group.push(val);\n });\n\n return grouped;\n}\n\n\nfunction uniqueBy(extractor, ...collections) {\n\n extractor = toExtractor(extractor);\n\n let grouped = {};\n\n forEach(collections, (c) => groupBy(c, extractor, grouped));\n\n let result = map(grouped, function(val, key) {\n return val[0];\n });\n\n return result;\n}\n\n\nconst unionBy = uniqueBy;\n\n\n\n/**\n * Sort collection by criteria.\n *\n * @template T\n *\n * @param {Collection} collection\n * @param {Extractor} extractor\n *\n * @return {Array}\n */\nfunction sortBy(collection, extractor) {\n\n extractor = toExtractor(extractor);\n\n let sorted = [];\n\n forEach(collection, function(value, key) {\n let disc = extractor(value, key);\n\n let entry = {\n d: disc,\n v: value\n };\n\n for (var idx = 0; idx < sorted.length; idx++) {\n let { d } = sorted[idx];\n\n if (disc < d) {\n sorted.splice(idx, 0, entry);\n return;\n }\n }\n\n // not inserted, append (!)\n sorted.push(entry);\n });\n\n return map(sorted, (e) => e.v);\n}\n\n\n/**\n * Create an object pattern matcher.\n *\n * @example\n *\n * ```javascript\n * const matcher = matchPattern({ id: 1 });\n *\n * let element = find(elements, matcher);\n * ```\n *\n * @template T\n *\n * @param {T} pattern\n *\n * @return { (el: any) => boolean } matcherFn\n */\nfunction matchPattern(pattern) {\n\n return function(el) {\n\n return every(pattern, function(val, key) {\n return el[key] === val;\n });\n\n };\n}\n\n\n/**\n * @param {string | ((e: any) => any) } extractor\n *\n * @return { (e: any) => any }\n */\nfunction toExtractor(extractor) {\n\n /**\n * @satisfies { (e: any) => any }\n */\n return isFunction(extractor) ? extractor : (e) => {\n\n // @ts-ignore: just works\n return e[extractor];\n };\n}\n\n\n/**\n * @template T\n * @param {Matcher} matcher\n *\n * @return {MatchFn}\n */\nfunction toMatcher(matcher) {\n return isFunction(matcher) ? matcher : (e) => {\n return e === matcher;\n };\n}\n\n\nfunction identity(arg) {\n return arg;\n}\n\nfunction toNum(arg) {\n return Number(arg);\n}\n\n/* global setTimeout clearTimeout */\n\n/**\n * @typedef { {\n * (...args: any[]): any;\n * flush: () => void;\n * cancel: () => void;\n * } } DebouncedFunction\n */\n\n/**\n * Debounce fn, calling it only once if the given time\n * elapsed between calls.\n *\n * Lodash-style the function exposes methods to `#clear`\n * and `#flush` to control internal behavior.\n *\n * @param {Function} fn\n * @param {Number} timeout\n *\n * @return {DebouncedFunction} debounced function\n */\nfunction debounce(fn, timeout) {\n\n let timer;\n\n let lastArgs;\n let lastThis;\n\n let lastNow;\n\n function fire(force) {\n\n let now = Date.now();\n\n let scheduledDiff = force ? 0 : (lastNow + timeout) - now;\n\n if (scheduledDiff > 0) {\n return schedule(scheduledDiff);\n }\n\n fn.apply(lastThis, lastArgs);\n\n clear();\n }\n\n function schedule(timeout) {\n timer = setTimeout(fire, timeout);\n }\n\n function clear() {\n if (timer) {\n clearTimeout(timer);\n }\n\n timer = lastNow = lastArgs = lastThis = undefined;\n }\n\n function flush() {\n if (timer) {\n fire(true);\n }\n\n clear();\n }\n\n /**\n * @type { DebouncedFunction }\n */\n function callback(...args) {\n lastNow = Date.now();\n\n lastArgs = args;\n lastThis = this;\n\n // ensure an execution is scheduled\n if (!timer) {\n schedule(timeout);\n }\n }\n\n callback.flush = flush;\n callback.cancel = clear;\n\n return callback;\n}\n\n/**\n * Throttle fn, calling at most once\n * in the given interval.\n *\n * @param {Function} fn\n * @param {Number} interval\n *\n * @return {Function} throttled function\n */\nfunction throttle(fn, interval) {\n let throttling = false;\n\n return function(...args) {\n\n if (throttling) {\n return;\n }\n\n fn(...args);\n throttling = true;\n\n setTimeout(() => {\n throttling = false;\n }, interval);\n };\n}\n\n/**\n * Bind function against target .\n *\n * @param {Function} fn\n * @param {Object} target\n *\n * @return {Function} bound function\n */\nfunction bind(fn, target) {\n return fn.bind(target);\n}\n\n/**\n * Convenience wrapper for `Object.assign`.\n *\n * @param {Object} target\n * @param {...Object} others\n *\n * @return {Object} the target\n */\nfunction assign(target, ...others) {\n return Object.assign(target, ...others);\n}\n\n/**\n * Sets a nested property of a given object to the specified value.\n *\n * This mutates the object and returns it.\n *\n * @template T\n *\n * @param {T} target The target of the set operation.\n * @param {(string|number)[]} path The path to the nested value.\n * @param {any} value The value to set.\n *\n * @return {T}\n */\nfunction set(target, path, value) {\n\n let currentTarget = target;\n\n forEach(path, function(key, idx) {\n\n if (typeof key !== 'number' && typeof key !== 'string') {\n throw new Error('illegal key type: ' + typeof key + '. Key should be of type number or string.');\n }\n\n if (key === 'constructor') {\n throw new Error('illegal key: constructor');\n }\n\n if (key === '__proto__') {\n throw new Error('illegal key: __proto__');\n }\n\n let nextKey = path[idx + 1];\n let nextTarget = currentTarget[key];\n\n if (isDefined(nextKey) && isNil(nextTarget)) {\n nextTarget = currentTarget[key] = isNaN(+nextKey) ? {} : [];\n }\n\n if (isUndefined(nextKey)) {\n if (isUndefined(value)) {\n delete currentTarget[key];\n } else {\n currentTarget[key] = value;\n }\n } else {\n currentTarget = nextTarget;\n }\n });\n\n return target;\n}\n\n\n/**\n * Gets a nested property of a given object.\n *\n * @param {Object} target The target of the get operation.\n * @param {(string|number)[]} path The path to the nested value.\n * @param {any} [defaultValue] The value to return if no value exists.\n *\n * @return {any}\n */\nfunction get(target, path, defaultValue) {\n\n let currentTarget = target;\n\n forEach(path, function(key) {\n\n // accessing nil property yields \n if (isNil(currentTarget)) {\n currentTarget = undefined;\n\n return false;\n }\n\n currentTarget = currentTarget[key];\n });\n\n return isUndefined(currentTarget) ? defaultValue : currentTarget;\n}\n\n/**\n * Pick properties from the given target.\n *\n * @template T\n * @template {any[]} V\n *\n * @param {T} target\n * @param {V} properties\n *\n * @return Pick\n */\nfunction pick(target, properties) {\n\n let result = {};\n\n let obj = Object(target);\n\n forEach(properties, function(prop) {\n\n if (prop in obj) {\n result[prop] = target[prop];\n }\n });\n\n return result;\n}\n\n/**\n * Pick all target properties, excluding the given ones.\n *\n * @template T\n * @template {any[]} V\n *\n * @param {T} target\n * @param {V} properties\n *\n * @return {Omit} target\n */\nfunction omit(target, properties) {\n\n let result = {};\n\n let obj = Object(target);\n\n forEach(obj, function(prop, key) {\n\n if (properties.indexOf(key) === -1) {\n result[key] = prop;\n }\n });\n\n return result;\n}\n\n/**\n * Recursively merge `...sources` into given target.\n *\n * Does support merging objects; does not support merging arrays.\n *\n * @param {Object} target\n * @param {...Object} sources\n *\n * @return {Object} the target\n */\nfunction merge(target, ...sources) {\n\n if (!sources.length) {\n return target;\n }\n\n forEach(sources, function(source) {\n\n // skip non-obj sources, i.e. null\n if (!source || !isObject(source)) {\n return;\n }\n\n forEach(source, function(sourceVal, key) {\n\n if (key === '__proto__') {\n return;\n }\n\n let targetVal = target[key];\n\n if (isObject(sourceVal)) {\n\n if (!isObject(targetVal)) {\n\n // override target[key] with object\n targetVal = {};\n }\n\n target[key] = merge(targetVal, sourceVal);\n } else {\n target[key] = sourceVal;\n }\n\n });\n });\n\n return target;\n}\n\nexports.assign = assign;\nexports.bind = bind;\nexports.debounce = debounce;\nexports.ensureArray = ensureArray;\nexports.every = every;\nexports.filter = filter;\nexports.find = find;\nexports.findIndex = findIndex;\nexports.flatten = flatten;\nexports.forEach = forEach;\nexports.get = get;\nexports.groupBy = groupBy;\nexports.has = has;\nexports.isArray = isArray;\nexports.isDefined = isDefined;\nexports.isFunction = isFunction;\nexports.isNil = isNil;\nexports.isNumber = isNumber;\nexports.isObject = isObject;\nexports.isString = isString;\nexports.isUndefined = isUndefined;\nexports.keys = keys;\nexports.map = map;\nexports.matchPattern = matchPattern;\nexports.merge = merge;\nexports.omit = omit;\nexports.pick = pick;\nexports.reduce = reduce;\nexports.set = set;\nexports.size = size;\nexports.some = some;\nexports.sortBy = sortBy;\nexports.throttle = throttle;\nexports.unionBy = unionBy;\nexports.uniqueBy = uniqueBy;\nexports.values = values;\nexports.without = without;\n","/**\n * Checks whether node is of specific bpmn type.\n *\n * @param {ModdleElement} node\n * @param {String} type\n *\n * @return {Boolean}\n */\nfunction is(node, type) {\n\n if (type.indexOf(':') === -1) {\n type = 'bpmn:' + type;\n }\n\n return (\n (typeof node.$instanceOf === 'function')\n ? node.$instanceOf(type)\n : node.$type === type\n );\n}\n\n/**\n * Checks whether node has any of the specified types.\n *\n * @param {ModdleElement} node\n * @param {Array} types\n *\n * @return {Boolean}\n */\nfunction isAny(node, types) {\n return types.some(function(type) {\n return is(node, type);\n });\n}\n\nexport { is, isAny };\n//# sourceMappingURL=index.esm.js.map\n","// The module cache\nvar __webpack_module_cache__ = {};\n\n// The require function\nfunction __webpack_require__(moduleId) {\n\t// Check if module is in cache\n\tvar cachedModule = __webpack_module_cache__[moduleId];\n\tif (cachedModule !== undefined) {\n\t\treturn cachedModule.exports;\n\t}\n\t// Create a new module (and put it into the cache)\n\tvar module = __webpack_module_cache__[moduleId] = {\n\t\t// no module.id needed\n\t\t// no module.loaded needed\n\t\texports: {}\n\t};\n\n\t// Execute the module function\n\t__webpack_modules__[moduleId](module, module.exports, __webpack_require__);\n\n\t// Return the exports of the module\n\treturn module.exports;\n}\n\n","// getDefaultExport function for compatibility with non-harmony modules\n__webpack_require__.n = (module) => {\n\tvar getter = module && module.__esModule ?\n\t\t() => (module['default']) :\n\t\t() => (module);\n\t__webpack_require__.d(getter, { a: getter });\n\treturn getter;\n};","// define getter functions for harmony exports\n__webpack_require__.d = (exports, definition) => {\n\tfor(var key in definition) {\n\t\tif(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {\n\t\t\tObject.defineProperty(exports, key, { enumerable: true, get: definition[key] });\n\t\t}\n\t}\n};","__webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))","// define __esModule on exports\n__webpack_require__.r = (exports) => {\n\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n\t}\n\tObject.defineProperty(exports, '__esModule', { value: true });\n};","import { registerClientPlugin } from 'camunda-modeler-plugin-helpers';\r\n\r\nimport { config, resolver } from '../.bpmnlintrc';\r\n\r\n// provide { config, resolver } as a `lintRules.${tabType}` plug-in\r\nregisterClientPlugin({ config, resolver }, 'lintRules.cloud-bpmn');\r\nregisterClientPlugin({ config, resolver }, 'lintRules.bpmn');\r\n"],"names":[],"sourceRoot":""} \ No newline at end of file +{"version":3,"file":"client.js","mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;AC9KA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACnBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;AC9CA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;AC3EA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;AClDA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACpCA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;ACpCA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;ACjCA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;AC3IA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;AC5DA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;ACnEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;ACnGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACjIA;AACA;AACA;;;;;;;;;;ACFA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;ACxEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;AC/DA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;AC7BA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;ACxFA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;ACjDA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACrDA;AACA;AACA;;;;;;;;;;ACFA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;AC5LA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;ACxCA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;AC3BA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACpCA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;ACrCA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;AC7BA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AC9DA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACjWA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;;;;;AC74BA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;ACpCA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;ACvBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;ACPA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;ACPA;;;;;ACAA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;;ACNA;AACA;AACA;AACA;AACA;AACA;AACA","sources":["webpack://camunda-modeler-custom-linter-rules-plugin/./.bpmnlintrc","webpack://camunda-modeler-custom-linter-rules-plugin/./node_modules/bpmnlint-plugin-camunda/rules/avoid-lanes.js","webpack://camunda-modeler-custom-linter-rules-plugin/./node_modules/bpmnlint-plugin-camunda/rules/forking-conditions.js","webpack://camunda-modeler-custom-linter-rules-plugin/./node_modules/bpmnlint-plugin-camunda/rules/implementation.js","webpack://camunda-modeler-custom-linter-rules-plugin/./node_modules/bpmnlint/rules/conditional-flows.js","webpack://camunda-modeler-custom-linter-rules-plugin/./node_modules/bpmnlint/rules/end-event-required.js","webpack://camunda-modeler-custom-linter-rules-plugin/./node_modules/bpmnlint/rules/event-sub-process-typed-start-event.js","webpack://camunda-modeler-custom-linter-rules-plugin/./node_modules/bpmnlint/rules/fake-join.js","webpack://camunda-modeler-custom-linter-rules-plugin/./node_modules/bpmnlint/rules/global.js","webpack://camunda-modeler-custom-linter-rules-plugin/./node_modules/bpmnlint/rules/helper.js","webpack://camunda-modeler-custom-linter-rules-plugin/./node_modules/bpmnlint/rules/label-required.js","webpack://camunda-modeler-custom-linter-rules-plugin/./node_modules/bpmnlint/rules/link-event.js","webpack://camunda-modeler-custom-linter-rules-plugin/./node_modules/bpmnlint/rules/no-bpmndi.js","webpack://camunda-modeler-custom-linter-rules-plugin/./node_modules/bpmnlint/rules/no-complex-gateway.js","webpack://camunda-modeler-custom-linter-rules-plugin/./node_modules/bpmnlint/rules/no-disconnected.js","webpack://camunda-modeler-custom-linter-rules-plugin/./node_modules/bpmnlint/rules/no-duplicate-sequence-flows.js","webpack://camunda-modeler-custom-linter-rules-plugin/./node_modules/bpmnlint/rules/no-gateway-join-fork.js","webpack://camunda-modeler-custom-linter-rules-plugin/./node_modules/bpmnlint/rules/no-implicit-end.js","webpack://camunda-modeler-custom-linter-rules-plugin/./node_modules/bpmnlint/rules/no-implicit-split.js","webpack://camunda-modeler-custom-linter-rules-plugin/./node_modules/bpmnlint/rules/no-implicit-start.js","webpack://camunda-modeler-custom-linter-rules-plugin/./node_modules/bpmnlint/rules/no-inclusive-gateway.js","webpack://camunda-modeler-custom-linter-rules-plugin/./node_modules/bpmnlint/rules/no-overlapping-elements.js","webpack://camunda-modeler-custom-linter-rules-plugin/./node_modules/bpmnlint/rules/single-blank-start-event.js","webpack://camunda-modeler-custom-linter-rules-plugin/./node_modules/bpmnlint/rules/single-event-definition.js","webpack://camunda-modeler-custom-linter-rules-plugin/./node_modules/bpmnlint/rules/start-event-required.js","webpack://camunda-modeler-custom-linter-rules-plugin/./node_modules/bpmnlint/rules/sub-process-blank-start-event.js","webpack://camunda-modeler-custom-linter-rules-plugin/./node_modules/bpmnlint/rules/superfluous-gateway.js","webpack://camunda-modeler-custom-linter-rules-plugin/./node_modules/bpmnlint/rules/superfluous-termination.js","webpack://camunda-modeler-custom-linter-rules-plugin/./node_modules/camunda-modeler-plugin-helpers/index.js","webpack://camunda-modeler-custom-linter-rules-plugin/./node_modules/min-dash/dist/index.cjs","webpack://camunda-modeler-custom-linter-rules-plugin/./node_modules/bpmnlint-utils/dist/index.esm.js","webpack://camunda-modeler-custom-linter-rules-plugin/webpack/bootstrap","webpack://camunda-modeler-custom-linter-rules-plugin/webpack/runtime/compat get default export","webpack://camunda-modeler-custom-linter-rules-plugin/webpack/runtime/define property getters","webpack://camunda-modeler-custom-linter-rules-plugin/webpack/runtime/hasOwnProperty shorthand","webpack://camunda-modeler-custom-linter-rules-plugin/webpack/runtime/make namespace object","webpack://camunda-modeler-custom-linter-rules-plugin/./client/index.js"],"sourcesContent":["\nconst cache = {};\n\n/**\n * A resolver that caches rules and configuration as part of the bundle,\n * making them accessible in the browser.\n *\n * @param {Object} cache\n */\nfunction Resolver() {}\n\nResolver.prototype.resolveRule = function(pkg, ruleName) {\n\n const rule = cache[pkg + '/' + ruleName];\n\n if (!rule) {\n throw new Error('cannot resolve rule <' + pkg + '/' + ruleName + '>: not bundled');\n }\n\n return rule;\n};\n\nResolver.prototype.resolveConfig = function(pkg, configName) {\n throw new Error(\n 'cannot resolve config <' + configName + '> in <' + pkg +'>: not bundled'\n );\n};\n\nconst resolver = new Resolver();\n\nconst rules = {\n \"conditional-flows\": \"error\",\n \"end-event-required\": \"error\",\n \"event-sub-process-typed-start-event\": \"error\",\n \"fake-join\": \"warn\",\n \"global\": \"warn\",\n \"label-required\": \"error\",\n \"link-event\": \"error\",\n \"no-bpmndi\": \"error\",\n \"no-complex-gateway\": \"error\",\n \"no-disconnected\": \"error\",\n \"no-duplicate-sequence-flows\": \"error\",\n \"no-gateway-join-fork\": \"error\",\n \"no-implicit-split\": \"error\",\n \"no-implicit-end\": \"error\",\n \"no-implicit-start\": \"error\",\n \"no-inclusive-gateway\": \"error\",\n \"no-overlapping-elements\": \"warn\",\n \"single-blank-start-event\": \"error\",\n \"single-event-definition\": \"error\",\n \"start-event-required\": \"error\",\n \"sub-process-blank-start-event\": \"error\",\n \"superfluous-gateway\": \"warn\",\n \"superfluous-termination\": \"warn\",\n \"camunda/avoid-lanes\": \"warn\",\n \"camunda/forking-conditions\": \"error\",\n \"camunda/implementation\": \"warning\"\n};\n\nconst config = {\n rules: rules\n};\n\nconst bundle = {\n resolver: resolver,\n config: config\n};\n\nexport { resolver, config };\n\nexport default bundle;\n\nimport rule_0 from 'bpmnlint/rules/conditional-flows';\n\ncache['bpmnlint/conditional-flows'] = rule_0;\n\nimport rule_1 from 'bpmnlint/rules/end-event-required';\n\ncache['bpmnlint/end-event-required'] = rule_1;\n\nimport rule_2 from 'bpmnlint/rules/event-sub-process-typed-start-event';\n\ncache['bpmnlint/event-sub-process-typed-start-event'] = rule_2;\n\nimport rule_3 from 'bpmnlint/rules/fake-join';\n\ncache['bpmnlint/fake-join'] = rule_3;\n\nimport rule_4 from 'bpmnlint/rules/global';\n\ncache['bpmnlint/global'] = rule_4;\n\nimport rule_5 from 'bpmnlint/rules/label-required';\n\ncache['bpmnlint/label-required'] = rule_5;\n\nimport rule_6 from 'bpmnlint/rules/link-event';\n\ncache['bpmnlint/link-event'] = rule_6;\n\nimport rule_7 from 'bpmnlint/rules/no-bpmndi';\n\ncache['bpmnlint/no-bpmndi'] = rule_7;\n\nimport rule_8 from 'bpmnlint/rules/no-complex-gateway';\n\ncache['bpmnlint/no-complex-gateway'] = rule_8;\n\nimport rule_9 from 'bpmnlint/rules/no-disconnected';\n\ncache['bpmnlint/no-disconnected'] = rule_9;\n\nimport rule_10 from 'bpmnlint/rules/no-duplicate-sequence-flows';\n\ncache['bpmnlint/no-duplicate-sequence-flows'] = rule_10;\n\nimport rule_11 from 'bpmnlint/rules/no-gateway-join-fork';\n\ncache['bpmnlint/no-gateway-join-fork'] = rule_11;\n\nimport rule_12 from 'bpmnlint/rules/no-implicit-split';\n\ncache['bpmnlint/no-implicit-split'] = rule_12;\n\nimport rule_13 from 'bpmnlint/rules/no-implicit-end';\n\ncache['bpmnlint/no-implicit-end'] = rule_13;\n\nimport rule_14 from 'bpmnlint/rules/no-implicit-start';\n\ncache['bpmnlint/no-implicit-start'] = rule_14;\n\nimport rule_15 from 'bpmnlint/rules/no-inclusive-gateway';\n\ncache['bpmnlint/no-inclusive-gateway'] = rule_15;\n\nimport rule_16 from 'bpmnlint/rules/no-overlapping-elements';\n\ncache['bpmnlint/no-overlapping-elements'] = rule_16;\n\nimport rule_17 from 'bpmnlint/rules/single-blank-start-event';\n\ncache['bpmnlint/single-blank-start-event'] = rule_17;\n\nimport rule_18 from 'bpmnlint/rules/single-event-definition';\n\ncache['bpmnlint/single-event-definition'] = rule_18;\n\nimport rule_19 from 'bpmnlint/rules/start-event-required';\n\ncache['bpmnlint/start-event-required'] = rule_19;\n\nimport rule_20 from 'bpmnlint/rules/sub-process-blank-start-event';\n\ncache['bpmnlint/sub-process-blank-start-event'] = rule_20;\n\nimport rule_21 from 'bpmnlint/rules/superfluous-gateway';\n\ncache['bpmnlint/superfluous-gateway'] = rule_21;\n\nimport rule_22 from 'bpmnlint/rules/superfluous-termination';\n\ncache['bpmnlint/superfluous-termination'] = rule_22;\n\nimport rule_23 from 'bpmnlint-plugin-camunda/rules/avoid-lanes';\n\ncache['bpmnlint-plugin-camunda/avoid-lanes'] = rule_23;\n\nimport rule_24 from 'bpmnlint-plugin-camunda/rules/forking-conditions';\n\ncache['bpmnlint-plugin-camunda/forking-conditions'] = rule_24;\n\nimport rule_25 from 'bpmnlint-plugin-camunda/rules/implementation';\n\ncache['bpmnlint-plugin-camunda/implementation'] = rule_25;","const {\n is\n} = require('bpmnlint-utils');\n\n\n/**\n * Rule that reports the usage of lanes.\n */\nmodule.exports = function() {\n\n function check(node, reporter) {\n if (is(node, 'bpmn:Lane')) {\n reporter.report(node.id, 'lanes should be avoided');\n }\n }\n\n return {\n check: check\n };\n};\n","const {\n is\n} = require('bpmnlint-utils');\n\n/**\n * A rule that checks that sequence flows after\n * an exclusive forking gateway have conditions\n * attached.\n */\nmodule.exports = function() {\n\n function check(node, reporter) {\n\n const outgoing = node.outgoing || [];\n\n if (!is(node, 'bpmn:ExclusiveGateway') || outgoing.length < 2) {\n return;\n }\n\n outgoing.forEach((flow) => {\n const missingCondition = (\n !hasCondition(flow) &&\n !isDefaultFlow(node, flow)\n );\n\n if (missingCondition) {\n reporter.report(flow.id, 'Sequence flow is missing condition');\n }\n });\n }\n\n return {\n check\n };\n\n};\n\n\n// helpers /////////////////////////////\n\nfunction hasCondition(flow) {\n return !!flow.conditionExpression;\n}\n\nfunction isDefaultFlow(node, flow) {\n return node['default'] === flow;\n}","const {\n is\n} = require('bpmnlint-utils');\n\nconst implementationAttributes = [\n 'camunda:expression',\n 'camunda:delegateExpression',\n 'camunda:class',\n 'camunda:type'\n];\n\n/**\n * Rule that reports the usage of collapsed sub-processes.\n */\nmodule.exports = function() {\n\n function check(node, reporter) {\n if (is(node, 'camunda:ServiceTaskLike')) {\n\n const process = findNodeProcess(node);\n\n if (!process || !process.get('isExecutable')) {\n return;\n }\n\n if (\n hasConnector(node) ||\n hasAnyAttribute(node, implementationAttributes)\n ) {\n return;\n }\n\n if (is(node, 'bpmn:BusinessRuleTask') && hasAttribute(node, 'camunda:decisionRef')) {\n return;\n }\n\n reporter.report(node.id, 'Implementation is missing');\n }\n }\n\n return {\n check: check\n };\n};\n\nfunction findNodeProcess(node) {\n let parent = node.$parent;\n\n while (parent && !is(parent, 'bpmn:Process')) {\n parent = parent.$parent;\n }\n\n return parent;\n}\n\nfunction hasConnector(bpmnElement) {\n const extensionElements = bpmnElement.get('extensionElements');\n\n if (!extensionElements) {\n return false;\n }\n\n return extensionElements.get('values').some(function(extension) {\n return is(extension, 'camunda:Connector');\n });\n}\n\nfunction hasAnyAttribute(bpmnElement, attributes) {\n return attributes.some(function(attribute) {\n return hasAttribute(bpmnElement, attribute);\n });\n}\n\nfunction hasAttribute(bpmnElement, attribute) {\n return bpmnElement.get(attribute) !== undefined;\n}\n","/**\n * A rule that checks that sequence flows outgoing from a\n * conditional forking gateway or activity are\n * either default flows _or_ have a condition attached\n */\nmodule.exports = function() {\n\n function check(node, reporter) {\n\n if (!isConditionalForking(node)) {\n return;\n }\n\n const outgoing = node.outgoing || [];\n\n outgoing.forEach((flow) => {\n const missingCondition = (\n !hasCondition(flow) &&\n !isDefaultFlow(node, flow)\n );\n\n if (missingCondition) {\n reporter.report(flow.id, 'Sequence flow is missing condition', [ 'conditionExpression' ]);\n }\n });\n }\n\n return {\n check\n };\n\n};\n\n\n// helpers /////////////////////////////\n\nfunction isConditionalForking(node) {\n\n const defaultFlow = node['default'];\n const outgoing = node.outgoing || [];\n\n return defaultFlow || outgoing.find(hasCondition);\n}\n\nfunction hasCondition(flow) {\n return !!flow.conditionExpression;\n}\n\nfunction isDefaultFlow(node, flow) {\n return node['default'] === flow;\n}","const {\n is,\n isAny\n} = require('bpmnlint-utils');\n\n\n/**\n * A rule that checks the presence of an end event per scope.\n */\nmodule.exports = function() {\n\n function hasEndEvent(node) {\n const flowElements = node.flowElements || [];\n\n return (\n flowElements.some(node => is(node, 'bpmn:EndEvent'))\n );\n }\n\n function check(node, reporter) {\n\n if (!isAny(node, [\n 'bpmn:Process',\n 'bpmn:SubProcess'\n ])) {\n return;\n }\n\n if (!hasEndEvent(node)) {\n const type = is(node, 'bpmn:SubProcess') ? 'Sub process' : 'Process';\n\n reporter.report(node.id, type + ' is missing end event');\n }\n }\n\n return { check };\n};\n","const {\n is\n} = require('bpmnlint-utils');\n\n/**\n * A rule that checks that start events inside an event sub-process\n * are typed.\n */\nmodule.exports = function() {\n\n function check(node, reporter) {\n\n if (!is(node, 'bpmn:SubProcess') || !node.triggeredByEvent) {\n return;\n }\n\n const flowElements = node.flowElements || [];\n\n flowElements.forEach(function(flowElement) {\n\n if (!is(flowElement, 'bpmn:StartEvent')) {\n return false;\n }\n\n const eventDefinitions = flowElement.eventDefinitions || [];\n\n if (eventDefinitions.length === 0) {\n reporter.report(flowElement.id, 'Start event is missing event definition', [ 'eventDefinitions' ]);\n }\n });\n }\n\n return {\n check\n };\n\n};","const {\n isAny\n} = require('bpmnlint-utils');\n\n/**\n * A rule that checks that no fake join is modeled by attempting\n * to give a task or event join semantics.\n *\n * Users should model a parallel joining gateway\n * to achieve the desired behavior.\n */\nmodule.exports = function() {\n\n function check(node, reporter) {\n\n if (!isAny(node, [\n 'bpmn:Activity',\n 'bpmn:Event'\n ])) {\n return;\n }\n\n const incoming = node.incoming || [];\n\n if (incoming.length > 1) {\n reporter.report(node.id, 'Incoming flows do not join');\n }\n }\n\n return {\n check\n };\n\n};","const {\n is,\n isAny\n} = require('bpmnlint-utils');\n\n\n/**\n * A rule that verifies that global elements are properly used.\n *\n * Currently recognized global elements are:\n *\n * * `bpmn:Error`\n * * `bpmn:Escalation`\n * * `bpmn:Message`\n * * `bpmn:Signal`\n *\n * For each of these elements proper usage implies:\n *\n * * element must have a name\n * * element is referenced by at least one element\n * * there exists only a single element per type with a given name\n */\nmodule.exports = function() {\n\n function check(node, reporter) {\n\n if (!is(node, 'bpmn:Definitions')) {\n return false;\n }\n\n const rootElements = getRootElements(node);\n\n const referencingElements = getReferencingElements(node);\n\n rootElements.forEach(rootElement => {\n if (!hasName(rootElement)) {\n reporter.report(rootElement.id, 'Element is missing name');\n }\n\n if (!isReferenced(rootElement, referencingElements)) {\n reporter.report(rootElement.id, 'Element is unused');\n }\n\n if (!isUnique(rootElement, rootElements)) {\n reporter.report(rootElement.id, 'Element name is not unique');\n }\n });\n\n }\n\n return {\n check\n };\n\n // helpers /////////////////////////////\n\n function getRootElements(definitions) {\n return definitions.rootElements.filter(node => isAny(node, [ 'bpmn:Error', 'bpmn:Escalation', 'bpmn:Message', 'bpmn:Signal' ]));\n }\n\n function getReferencingElements(definitions) {\n const referencingElements = [];\n\n function traverse(element) {\n if (is(element, 'bpmn:Definitions') && element.get('rootElements').length) {\n element.get('rootElements').forEach(traverse);\n }\n\n if (is(element, 'bpmn:FlowElementsContainer') && element.get('flowElements').length) {\n element.get('flowElements').forEach(traverse);\n }\n\n if (is(element, 'bpmn:Event') && element.get('eventDefinitions').length) {\n element.get('eventDefinitions').forEach(eventDefinition => referencingElements.push(eventDefinition));\n }\n\n if (is(element, 'bpmn:Collaboration') && element.get('messageFlows').length) {\n element.get('messageFlows').forEach(traverse);\n }\n\n if (isAny(element, [\n 'bpmn:MessageFlow',\n 'bpmn:ReceiveTask',\n 'bpmn:SendTask'\n ])) {\n referencingElements.push(element);\n }\n }\n\n traverse(definitions);\n\n return referencingElements;\n }\n\n function hasName(event) {\n return (\n event.name?.trim() !== ''\n );\n }\n\n function isReferenced(rootElement, referencingElements) {\n if (is(rootElement, 'bpmn:Error')) {\n return referencingElements.some(referencingElement => {\n return is(referencingElement, 'bpmn:ErrorEventDefinition')\n && rootElement.get('id') === referencingElement.get('errorRef')?.get('id');\n });\n }\n\n if (is(rootElement, 'bpmn:Escalation')) {\n return referencingElements.some(referencingElement => {\n return is(referencingElement, 'bpmn:EscalationEventDefinition')\n && rootElement.get('id') === referencingElement.get('escalationRef')?.get('id');\n });\n }\n\n if (is(rootElement, 'bpmn:Message')) {\n return referencingElements.some(referencingElement => {\n return isAny(referencingElement, [\n 'bpmn:MessageEventDefinition',\n 'bpmn:MessageFlow',\n 'bpmn:ReceiveTask',\n 'bpmn:SendTask'\n ]) && rootElement.get('id') === referencingElement.get('messageRef')?.get('id');\n });\n }\n\n if (is(rootElement, 'bpmn:Signal')) {\n return referencingElements.some(referencingElement => {\n return is(referencingElement, 'bpmn:SignalEventDefinition')\n && rootElement.get('id') === referencingElement.get('signalRef')?.get('id');\n });\n }\n }\n\n function isUnique(rootElement, rootElements) {\n return (\n rootElements.filter(otherRootElement => is(otherRootElement, rootElement.$type) && rootElement.name === otherRootElement.name).length === 1\n );\n }\n};","const {\n is\n} = require('bpmnlint-utils');\n\n/**\n * Create a checker that disallows the given element type.\n *\n * @param {String} type\n *\n * @return {Function} ruleImpl\n */\nfunction disallowNodeType(type) {\n\n return function() {\n\n function check(node, reporter) {\n\n if (is(node, type)) {\n reporter.report(node.id, 'Element has disallowed type <' + type + '>');\n }\n }\n\n return {\n check\n };\n\n };\n\n}\n\nmodule.exports.disallowNodeType = disallowNodeType;\n\n/**\n * Find a parent for the given element\n *\n * @param {ModdleElement} node\n *\n * @param {String} type\n *\n * @return {ModdleElement} element\n */\n\nfunction findParent(node, type) {\n if (!node) {\n return null;\n }\n\n const parent = node.$parent;\n\n if (!parent) {\n return node;\n }\n\n if (is(parent, type)) {\n return parent;\n }\n\n return findParent(parent, type);\n}\n\nmodule.exports.findParent = findParent;","const {\n is,\n isAny\n} = require('bpmnlint-utils');\n\n\n/**\n * A rule that checks the presence of a label.\n */\nmodule.exports = function() {\n\n function check(node, reporter) {\n\n if (isAny(node, [\n 'bpmn:ParallelGateway',\n 'bpmn:EventBasedGateway'\n ])) {\n return;\n }\n\n // ignore joining gateways\n if (is(node, 'bpmn:Gateway') && !isForking(node)) {\n return;\n }\n\n // ignore sub-processes\n if (is(node, 'bpmn:SubProcess')) {\n\n // TODO(nikku): better ignore expanded sub-processes only\n return;\n }\n\n // ignore sequence flow without condition\n if (is(node, 'bpmn:SequenceFlow') && !hasCondition(node)) {\n return;\n }\n\n // ignore data objects and artifacts for now\n if (isAny(node, [\n 'bpmn:FlowNode',\n 'bpmn:SequenceFlow',\n 'bpmn:Participant',\n 'bpmn:Lane'\n ])) {\n\n const name = (node.name || '').trim();\n\n if (name.length === 0) {\n reporter.report(node.id, 'Element is missing label/name', [ 'name' ]);\n }\n }\n }\n\n return { check };\n};\n\n\n// helpers ////////////////////////\n\nfunction isForking(node) {\n const outgoing = node.outgoing || [];\n\n return outgoing.length > 1;\n}\n\nfunction hasCondition(node) {\n return node.conditionExpression;\n}","const {\n groupBy\n} = require('min-dash');\n\nconst {\n is\n} = require('bpmnlint-utils');\n\n\n/**\n * A rule that verifies that link events are properly used.\n *\n * This implies:\n *\n * * for every link throw there exists a link catch within\n * the same scope, and vice versa\n * * there exists only a single pair of [ throw, catch ] links\n * with a given name, per scope\n * * link events have a name\n *\n */\nmodule.exports = function() {\n\n function check(node, reporter) {\n\n if (!is(node, 'bpmn:FlowElementsContainer')) {\n return;\n }\n\n const links = (node.flowElements || []).filter(isLinkEvent);\n\n for (const link of links) {\n if (!link.name) {\n reporter.report(link.id, 'Link event is missing name');\n }\n }\n\n const names = groupBy(links, (link) => link.name);\n\n for (const [ name, events ] of Object.entries(names)) {\n\n // ignore unnamed (validated earlier)\n if (!name) {\n continue;\n }\n\n // missing catch or throw event\n if (events.length === 1) {\n const event = events[0];\n\n reporter.report(event.id, `Link ${isThrowEvent(event) ? 'catch' : 'throw' } event with name <${ name }> missing in scope`);\n }\n\n const throwEvents = events.filter(isThrowEvent);\n\n if (throwEvents.length > 1) {\n for (const event of throwEvents) {\n reporter.report(event.id, `Duplicate link throw event with name <${name}> in scope`);\n }\n }\n\n const catchEvents = events.filter(isCatchEvent);\n\n if (catchEvents.length > 1) {\n for (const event of catchEvents) {\n reporter.report(event.id, `Duplicate link catch event with name <${name}> in scope`);\n }\n }\n }\n\n }\n\n return {\n check\n };\n};\n\n\n// helpers /////////////////\n\nfunction isLinkEvent(node) {\n\n var eventDefinitions = node.eventDefinitions || [];\n\n if (!is(node, 'bpmn:Event')) {\n return false;\n }\n\n return eventDefinitions.some(\n definition => is(definition, 'bpmn:LinkEventDefinition')\n );\n}\n\nfunction isThrowEvent(node) {\n return is(node, 'bpmn:ThrowEvent');\n}\n\nfunction isCatchEvent(node) {\n return is(node, 'bpmn:CatchEvent');\n}","const {\n is\n} = require('bpmnlint-utils');\n\nconst {\n flatten\n} = require('min-dash');\n\n/**\n * A rule that checks that there is no BPMNDI information missing for elements,\n * which require BPMNDI.\n */\nmodule.exports = function() {\n\n function check(node, reporter) {\n\n if (!is(node, 'bpmn:Definitions')) {\n return false;\n }\n\n // (1) Construct array of all BPMN elements\n const bpmnElements = getAllBpmnElements(node.rootElements);\n\n // (2) Filter BPMN elements without visual representation\n const visualBpmnElements = bpmnElements.filter(hasVisualRepresentation);\n\n // (3) Construct array of BPMNDI references\n const diBpmnReferences = getAllDiBpmnReferences(node);\n\n // (4) Report elements without BPMNDI\n visualBpmnElements.forEach((element) => {\n if (diBpmnReferences.indexOf(element.id) === -1) {\n reporter.report(element.id, 'Element is missing bpmndi');\n }\n });\n }\n\n return {\n check\n };\n\n};\n\n\n// helpers /////////////////////////////\n\n/**\n * Get all BPMN elements within a bpmn:Definitions node\n *\n * @param {array} rootElements - An array of Moddle rootElements\n * @return {array} A flat array with all BPMN elements, each represented with { id: elementId, $type: elementType }\n *\n */\nfunction getAllBpmnElements(rootElements) {\n return flatten(rootElements.map((rootElement) => {\n const laneSet =\n rootElement.laneSets && rootElement.laneSets[0] || rootElement.childLaneSet;\n\n // Include\n // * flowElements (e.g., tasks, sequenceFlows),\n // * nested flowElements,\n // * participants,\n // * artifacts (groups),\n // * laneSets\n // * nested laneSets\n // * childLaneSets\n // * nested childLaneSets\n // * messageFlows\n const elements = flatten([].concat(\n rootElement.flowElements || [],\n (rootElement.flowElements && getAllBpmnElements(rootElement.flowElements.filter(hasFlowElements))) || [],\n rootElement.participants || [],\n rootElement.artifacts || [],\n laneSet && laneSet.lanes || [],\n laneSet && laneSet.lanes && getAllBpmnElements(laneSet.lanes.filter(hasChildLaneSet)) || [],\n rootElement.messageFlows || []\n ));\n\n if (elements.length > 0) {\n return elements.map((element) => {\n\n return {\n id: element.id,\n $type: element.$type\n };\n });\n } else {\n\n // We are not interested in the rest here (DI)\n return [];\n }\n }));\n}\n\n/**\n * Get all BPMN elements within a bpmn:Definitions node\n *\n * @param {ModdleElement} definitionsNode - A moddleElement representing the\n * bpmn:Definitions element\n * @return {array} A flat array with all BPMNDI element ids part of\n * this bpmn:Definitions node\n *\n */\nfunction getAllDiBpmnReferences(definitionsNode) {\n return flatten(\n definitionsNode.get('diagrams').map((diagram) => {\n\n const diElements = diagram.plane.planeElement || [];\n\n return diElements.map((element) => {\n\n return element.bpmnElement?.id;\n });\n })\n );\n}\n\nfunction hasVisualRepresentation(element) {\n const noVisRepresentation = [ 'bpmn:DataObject' ];\n\n return noVisRepresentation.includes(element.$type) ? false : true;\n}\n\nfunction hasFlowElements(element) {\n return element.flowElements ? true : false;\n}\n\nfunction hasChildLaneSet(element) {\n return element.childLaneSet ? true : false;\n}\n","const disallowNodeType = require('./helper').disallowNodeType;\n\nmodule.exports = disallowNodeType('bpmn:ComplexGateway');","const {\n isAny,\n is\n} = require('bpmnlint-utils');\n\n\n/**\n * A rule that verifies that there exists no disconnected\n * flow elements, i.e. elements without incoming\n * _or_ outgoing sequence flows\n */\nmodule.exports = function() {\n\n function check(node, reporter) {\n\n if (!isAny(node, [\n 'bpmn:Task',\n 'bpmn:Gateway',\n 'bpmn:SubProcess',\n 'bpmn:Event'\n ]) || node.triggeredByEvent) {\n return;\n }\n\n // compensation activity and boundary events are\n // linked visually via associations. If these associations\n // exist we are fine, too\n if (isCompensationLinked(node)) {\n return;\n }\n\n const incoming = node.incoming || [];\n const outgoing = node.outgoing || [];\n\n if (!incoming.length && !outgoing.length) {\n reporter.report(node.id, 'Element is not connected');\n }\n }\n\n return {\n check\n };\n};\n\n\n// helpers /////////////////\n\nfunction isCompensationBoundary(node) {\n\n var eventDefinitions = node.eventDefinitions;\n\n if (!is(node, 'bpmn:BoundaryEvent')) {\n return false;\n }\n\n if (!eventDefinitions || eventDefinitions.length !== 1) {\n return false;\n }\n\n return is(eventDefinitions[0], 'bpmn:CompensateEventDefinition');\n}\n\nfunction isCompensationActivity(node) {\n return node.isForCompensation;\n}\n\nfunction isCompensationLinked(node) {\n var source = isCompensationBoundary(node);\n var target = isCompensationActivity(node);\n\n // TODO(nikku): check, whether compensation association exists\n return source || target;\n}","const {\n is\n} = require('bpmnlint-utils');\n\n/**\n * A rule that verifies that there are no disconnected\n * flow elements, i.e. elements without incoming\n * _or_ outgoing sequence flows\n */\nmodule.exports = function() {\n\n const keyed = {};\n\n const outgoingReported = {};\n const incomingReported = {};\n\n function check(node, reporter) {\n\n if (!is(node, 'bpmn:SequenceFlow')) {\n return;\n }\n\n const key = flowKey(node);\n\n if (key in keyed) {\n reporter.report(node.id, 'SequenceFlow is a duplicate');\n\n const sourceId = node.sourceRef.id;\n const targetId = node.targetRef.id;\n\n if (!outgoingReported[sourceId]) {\n reporter.report(sourceId, 'Duplicate outgoing sequence flows');\n\n outgoingReported[sourceId] = true;\n }\n\n if (!incomingReported[targetId]) {\n reporter.report(targetId, 'Duplicate incoming sequence flows');\n\n incomingReported[targetId] = true;\n }\n } else {\n keyed[key] = node;\n }\n }\n\n return {\n check\n };\n\n};\n\n\n// helpers /////////////////\n\nfunction flowKey(flow) {\n const conditionExpression = flow.conditionExpression;\n\n const condition = conditionExpression ? conditionExpression.body : '';\n const source = flow.sourceRef ? flow.sourceRef.id : flow.id;\n const target = flow.targetRef ? flow.targetRef.id : flow.id;\n\n return source + '#' + target + '#' + condition;\n}","const {\n is\n} = require('bpmnlint-utils');\n\n\n/**\n * A rule that checks, whether a gateway forks and joins\n * at the same time.\n */\nmodule.exports = function() {\n\n function check(node, reporter) {\n\n if (!is(node, 'bpmn:Gateway')) {\n return;\n }\n\n const incoming = node.incoming || [];\n const outgoing = node.outgoing || [];\n\n if (incoming.length > 1 && outgoing.length > 1) {\n reporter.report(node.id, 'Gateway forks and joins');\n }\n }\n\n return {\n check\n };\n\n};","const {\n is,\n isAny\n} = require('bpmnlint-utils');\n\nconst {\n findParent\n} = require('./helper');\n\n/**\n * A rule that checks that an element is not an implicit end (token sink).\n */\nmodule.exports = function() {\n\n function isLinkEvent(node) {\n const eventDefinitions = node.eventDefinitions || [];\n\n return eventDefinitions.length && eventDefinitions.every(\n definition => is(definition, 'bpmn:LinkEventDefinition')\n );\n }\n\n function isCompensationEvent(node) {\n const eventDefinitions = node.eventDefinitions || [];\n\n return eventDefinitions.length && eventDefinitions.every(\n definition => is(definition, 'bpmn:CompensateEventDefinition')\n );\n }\n\n function hasCompensationActivity(node) {\n const parent = findParent(node, 'bpmn:Process');\n\n const artifacts = parent.artifacts || [];\n\n return artifacts.some((element) => {\n if (!is(element, 'bpmn:Association')) {\n return false;\n }\n\n const source = element.sourceRef;\n\n return source.id === node.id;\n });\n }\n\n function isForCompensation(node) {\n return node.isForCompensation;\n }\n\n function isImplicitEnd(node) {\n const outgoing = node.outgoing || [];\n\n if (is(node, 'bpmn:SubProcess') && node.triggeredByEvent) {\n return false;\n }\n\n if (is(node, 'bpmn:IntermediateThrowEvent') && isLinkEvent(node)) {\n return false;\n }\n\n if (is(node, 'bpmn:EndEvent')) {\n return false;\n }\n\n if (is(node, 'bpmn:BoundaryEvent') && isCompensationEvent(node) && hasCompensationActivity(node)) {\n return false;\n }\n\n if (is(node, 'bpmn:Task') && isForCompensation(node)) {\n return false;\n }\n\n return outgoing.length === 0;\n }\n\n function check(node, reporter) {\n\n if (!isAny(node, [ 'bpmn:Event', 'bpmn:Activity', 'bpmn:Gateway' ])) {\n return;\n }\n\n if (isImplicitEnd(node)) {\n reporter.report(node.id, 'Element is an implicit end');\n }\n }\n\n return { check };\n};","const {\n isAny\n} = require('bpmnlint-utils');\n\n\n/**\n * A rule that checks that no implicit split is modeled\n * starting from a task.\n *\n * users should model the parallel splitting gateway\n * explicitly instead.\n */\nmodule.exports = function() {\n\n function check(node, reporter) {\n\n if (!isAny(node, [\n 'bpmn:Activity',\n 'bpmn:Event'\n ])) {\n return;\n }\n\n const outgoing = node.outgoing || [];\n\n const outgoingWithoutCondition = outgoing.filter((flow) => {\n return !hasCondition(flow) && !isDefaultFlow(node, flow);\n });\n\n if (outgoingWithoutCondition.length > 1) {\n reporter.report(node.id, 'Flow splits implicitly');\n }\n }\n\n return {\n check\n };\n\n};\n\n\n// helpers /////////////////////////////\n\nfunction hasCondition(flow) {\n return !!flow.conditionExpression;\n}\n\nfunction isDefaultFlow(node, flow) {\n return node['default'] === flow;\n}","const {\n is,\n isAny\n} = require('bpmnlint-utils');\n\n\n/**\n * A rule that checks that an element is not an implicit start (token spawn).\n */\nmodule.exports = function() {\n\n function isLinkEvent(node) {\n const eventDefinitions = node.eventDefinitions || [];\n\n return eventDefinitions.length && eventDefinitions.every(\n definition => is(definition, 'bpmn:LinkEventDefinition')\n );\n }\n\n function isImplicitStart(node) {\n const incoming = node.incoming || [];\n\n if (is(node, 'bpmn:Activity') && node.isForCompensation) {\n return false;\n }\n\n if (is(node, 'bpmn:SubProcess') && node.triggeredByEvent) {\n return false;\n }\n\n if (is(node, 'bpmn:IntermediateCatchEvent') && isLinkEvent(node)) {\n return false;\n }\n\n if (isAny(node, [ 'bpmn:StartEvent', 'bpmn:BoundaryEvent' ])) {\n return false;\n }\n\n return incoming.length === 0;\n }\n\n function check(node, reporter) {\n\n if (!isAny(node, [ 'bpmn:Event', 'bpmn:Activity', 'bpmn:Gateway' ])) {\n return;\n }\n\n if (isImplicitStart(node)) {\n reporter.report(node.id, 'Element is an implicit start');\n }\n }\n\n return { check };\n};\n","const disallowNodeType = require('./helper').disallowNodeType;\n\nmodule.exports = disallowNodeType('bpmn:InclusiveGateway');","const {\n is\n} = require('bpmnlint-utils');\n\n\n/**\n * Rule that checks if two elements overlap except:\n * - Boundary events overlap their host\n * - Child elements overlap / are on top of their parent (e.g., elements within a subProcess)\n */\nmodule.exports = function() {\n\n function check(node, reporter) {\n if (!is(node, 'bpmn:Definitions')) {\n return;\n }\n\n const rootElements = node.rootElements || [];\n const elementsToReport = new Set();\n const elementsOutsideToReport = new Set();\n const diObjects = getAllDiObjects(node);\n const processElementsParentDiMap = new Map(); // map with sub/process as key and its parent boundary di object\n\n rootElements\n .filter(element => is(element, 'bpmn:Collaboration'))\n .forEach(collaboration => {\n const participants = collaboration.participants || [];\n checkElementsArray(participants, elementsToReport, diObjects);\n\n participants.forEach(participant => {\n processElementsParentDiMap.set(participant.processRef, diObjects.get(participant));\n });\n });\n\n rootElements\n .filter(element => is(element, 'bpmn:Process'))\n .forEach(process => {\n const parentDi = processElementsParentDiMap.get(process) || {};\n checkProcess(process, elementsToReport, elementsOutsideToReport, diObjects, parentDi);\n });\n\n // report elements\n elementsToReport.forEach(element => reporter.report(element.id, 'Element overlaps with other element'));\n elementsOutsideToReport.forEach(element => reporter.report(element.id, 'Element is outside of parent boundary'));\n }\n\n return {\n check: check\n };\n};\n\n// helpers /////////////////\n\n/**\n * Recursively check subprocesses in a process\n * @param {Object} node Process or SubProcess\n * @param {Set} elementsToReport\n * @param {Set} elementsOutsideToReport\n * @param {Map} diObjects\n */\nfunction checkProcess(node, elementsToReport, elementsOutsideToReport, diObjects, parentDi) {\n\n const flowElements = node.flowElements || [];\n\n const flowElementsWithDi = flowElements.filter(element => diObjects.has(element));\n\n // check child elements for overlap\n checkElementsArray(flowElementsWithDi, elementsToReport, diObjects);\n\n // check child elements outside parent boundary\n //\n // * data objects do not have a visual representation\n // * for historical reasons data store references may be\n // outside of parent boundaries\n //\n flowElementsWithDi.forEach(element => {\n if (\n !is(element, 'bpmn:DataStoreReference') &&\n isOutsideParentBoundary(diObjects.get(element).bounds, parentDi.bounds)\n ) {\n elementsOutsideToReport.add(element);\n }\n });\n\n // recurse into subprocesses\n const subProcesses = flowElements.filter(element => is(element, 'bpmn:SubProcess'));\n subProcesses.forEach(subProcess => {\n const subProcessDi = diObjects.get(subProcess) || {};\n const subProcessParentBoundary = subProcessDi.isExpanded ? subProcessDi : {};\n checkProcess(subProcess, elementsToReport, elementsOutsideToReport, diObjects, subProcessParentBoundary);\n });\n}\n\n/**\n * @param {Array} elements\n * @param {Set} elementsToReport\n */\nfunction checkElementsArray(elements, elementsToReport, diObjects) {\n for (let i = 0; i < elements.length - 1; i++) {\n const element = elements[i];\n\n for (let j = i + 1; j < elements.length; j++) {\n const element2 = elements[j];\n\n // ignore if Boundary events overlap their host\n // but still check if they overlap other elements\n if (element.attachedToRef === element2 || element2.attachedToRef === element) {\n continue;\n }\n\n const bounds1 = diObjects.get(element)?.bounds;\n const bounds2 = diObjects.get(element2)?.bounds;\n\n // ignore if an element doesn't have bounds\n if (!bounds1 || !bounds2) {\n continue;\n }\n\n if (isCollision(bounds1, bounds2)) {\n elementsToReport.add(element);\n elementsToReport.add(element2);\n }\n }\n }\n}\n\n/**\n * Check if child element is outside of parent boundary\n */\nfunction isOutsideParentBoundary(childBounds, parentBounds) {\n if (!isValidShapeElement(childBounds) || !isValidShapeElement(parentBounds)) {\n return false;\n }\n\n const isTopLeftCornerInside = childBounds.x >= parentBounds.x && childBounds.y >= parentBounds.y;\n const isBottomRightCornerInside = childBounds.x + childBounds.width <= parentBounds.x + parentBounds.width && childBounds.y + childBounds.height <= parentBounds.y + parentBounds.height;\n const isInside = isTopLeftCornerInside && isBottomRightCornerInside;\n\n return !isInside;\n}\n\n/**\n * Check if two rectangle shapes collides\n */\nfunction isCollision(firstBounds, secondBounds) {\n if (!isValidShapeElement(firstBounds) || !isValidShapeElement(secondBounds)) {\n return false;\n }\n\n const collisionX = firstBounds.x + firstBounds.width >= secondBounds.x && secondBounds.x + secondBounds.width >= firstBounds.x;\n const collisionY = firstBounds.y + firstBounds.height >= secondBounds.y && secondBounds.y + secondBounds.height >= firstBounds.y;\n\n // collision on both axis\n return collisionX && collisionY;\n}\n\n/**\n * Checks if shape bounds has all necessary values for collision check\n */\nfunction isValidShapeElement(bounds) {\n return !!bounds && is(bounds, 'dc:Bounds') &&\n typeof (bounds.x) === 'number' &&\n typeof (bounds.y) === 'number' &&\n typeof (bounds.width) === 'number' &&\n typeof (bounds.height) === 'number';\n}\n\n/**\n * Get all di object as one map object\n * @param {Object} node bpmn:Definitions\n * @returns {Map} map of di objects with element as key\n */\nfunction getAllDiObjects(node) {\n const diObjects = new Map();\n const diagrams = node.diagrams || [];\n\n diagrams\n .filter(diagram => !!diagram.plane)\n .forEach(diagram => {\n const planeElements = diagram.plane.planeElement || [];\n planeElements\n .filter(planeElement => !!planeElement.bpmnElement)\n .forEach(planeElement => {\n diObjects.set(planeElement.bpmnElement, planeElement);\n });\n });\n\n return diObjects;\n}\n","const {\n is\n} = require('bpmnlint-utils');\n\n/**\n * A rule that checks whether not more than one blank start event\n * exists per scope.\n */\nmodule.exports = function() {\n\n function check(node, reporter) {\n\n if (!is(node, 'bpmn:FlowElementsContainer')) {\n return;\n }\n\n const flowElements = node.flowElements || [];\n\n const blankStartEvents = flowElements.filter(function(flowElement) {\n\n if (!is(flowElement, 'bpmn:StartEvent')) {\n return false;\n }\n\n const eventDefinitions = flowElement.eventDefinitions || [];\n\n return eventDefinitions.length === 0;\n });\n\n if (blankStartEvents.length > 1) {\n const type = is(node, 'bpmn:SubProcess') ? 'Sub process' : 'Process';\n\n reporter.report(node.id, type + ' has multiple blank start events');\n }\n }\n\n return {\n check\n };\n\n};","const {\n is\n} = require('bpmnlint-utils');\n\n\n/**\n * A rule that verifies that an event contains maximum one event definition.\n */\nmodule.exports = function() {\n\n function check(node, reporter) {\n\n if (!is(node, 'bpmn:Event')) {\n return;\n }\n\n const eventDefinitions = node.eventDefinitions || [];\n\n if (eventDefinitions.length > 1) {\n reporter.report(node.id, 'Event has multiple event definitions', [ 'eventDefinitions' ]);\n }\n }\n\n return {\n check\n };\n\n};","const {\n is,\n isAny\n} = require('bpmnlint-utils');\n\n\n/**\n * A rule that checks for the presence of a start event per scope.\n */\nmodule.exports = function() {\n\n function hasStartEvent(node) {\n const flowElements = node.flowElements || [];\n\n return (\n flowElements.some(node => is(node, 'bpmn:StartEvent'))\n );\n }\n\n function check(node, reporter) {\n\n if (!isAny(node, [\n 'bpmn:Process',\n 'bpmn:SubProcess'\n ])) {\n return;\n }\n\n if (!hasStartEvent(node)) {\n const type = is(node, 'bpmn:SubProcess') ? 'Sub process' : 'Process';\n\n reporter.report(node.id, type + ' is missing start event');\n }\n }\n\n return { check };\n};\n","const {\n is\n} = require('bpmnlint-utils');\n\n\n/**\n * A rule that checks that start events inside a normal sub-processes\n * are blank (do not have an event definition).\n */\nmodule.exports = function() {\n\n function check(node, reporter) {\n\n if (!is(node, 'bpmn:SubProcess') || node.triggeredByEvent) {\n return;\n }\n\n const flowElements = node.flowElements || [];\n\n flowElements.forEach(function(flowElement) {\n\n if (!is(flowElement, 'bpmn:StartEvent')) {\n return false;\n }\n\n const eventDefinitions = flowElement.eventDefinitions || [];\n\n if (eventDefinitions.length > 0) {\n reporter.report(flowElement.id, 'Start event must be blank', [ 'eventDefinitions' ]);\n }\n });\n }\n\n return {\n check\n };\n\n};","const {\n is\n} = require('bpmnlint-utils');\n\n/**\n * A rule that checks, whether a gateway has only one source and target.\n *\n * Those gateways are superfluous since they don't do anything.\n */\nmodule.exports = function() {\n\n function check(node, reporter) {\n\n if (!is(node, 'bpmn:Gateway')) {\n return;\n }\n\n const incoming = node.incoming || [];\n const outgoing = node.outgoing || [];\n\n if (incoming.length === 1 && outgoing.length === 1) {\n reporter.report(node.id, 'Gateway is superfluous. It only has one source and target.');\n }\n }\n\n return {\n check\n };\n\n};","const {\n is, isAny\n} = require('bpmnlint-utils');\n\n/**\n * A rule that checks, whether a gateway has only one source and target.\n *\n * Those gateways are superfluous since they don't do anything.\n */\nmodule.exports = function() {\n\n function check(node, reporter) {\n\n if (!isAny(node, [ 'bpmn:Process', 'bpmn:SubProcess' ])) {\n return;\n }\n\n const flowElements = node.flowElements || [];\n\n const ends = flowElements.filter(\n element => is(element, 'bpmn:FlowNode') && (element.outgoing || []).length === 0\n );\n\n const terminateEnds = ends.filter(isTerminateEnd);\n\n if (terminateEnds.length !== 1) {\n\n // TODO(nikku): only detect basic cases, do not\n // do any kinds of elaborate flow analysis\n return;\n }\n\n const superfluous = ends.every(\n (end) => isInterruptingEventSub(end) || isTerminateEnd(end)\n );\n\n if (superfluous) {\n\n for (const node of terminateEnds) {\n reporter.report(node.id, 'Termination is superfluous.');\n }\n }\n }\n\n return {\n check\n };\n\n};\n\nfunction isTerminateEnd(element) {\n return is(element, 'bpmn:EndEvent') && (element.eventDefinitions || []).some(\n eventDefinition => is(eventDefinition, 'bpmn:TerminateEventDefinition')\n );\n}\n\nfunction isInterruptingEventSub(element) {\n const isEventSub = is(element, 'bpmn:SubProcess') && element.triggeredByEvent;\n\n return isEventSub && (element.flowElements || []).some(\n element => is(element, 'bpmn:StartEvent') && element.isInterrupting\n );\n}","/**\n * Validate and register a client plugin.\n *\n * @param {Object} plugin\n * @param {String} type\n */\nexport function registerClientPlugin(plugin, type) {\n var plugins = window.plugins || [];\n window.plugins = plugins;\n\n if (!plugin) {\n throw new Error('plugin not specified');\n }\n\n if (!type) {\n throw new Error('type not specified');\n }\n\n plugins.push({\n plugin: plugin,\n type: type\n });\n}\n\n/**\n * Validate and register a client plugin.\n *\n * @param {import('react').ComponentType} extension\n *\n * @example\n *\n * import MyExtensionComponent from './MyExtensionComponent';\n *\n * registerClientExtension(MyExtensionComponent);\n */\nexport function registerClientExtension(component) {\n registerClientPlugin(component, 'client');\n}\n\n/**\n * Validate and register a bpmn-js plugin.\n *\n * @param {Object} module\n *\n * @example\n *\n * import {\n * registerBpmnJSPlugin\n * } from 'camunda-modeler-plugin-helpers';\n *\n * const BpmnJSModule = {\n * __init__: [ 'myService' ],\n * myService: [ 'type', ... ]\n * };\n *\n * registerBpmnJSPlugin(BpmnJSModule);\n */\nexport function registerBpmnJSPlugin(module) {\n registerClientPlugin(module, 'bpmn.modeler.additionalModules');\n}\n\n/**\n * Validate and register a platform specific bpmn-js plugin.\n *\n * @param {Object} module\n *\n * @example\n *\n * import {\n * registerPlatformBpmnJSPlugin\n * } from 'camunda-modeler-plugin-helpers';\n *\n * const BpmnJSModule = {\n * __init__: [ 'myService' ],\n * myService: [ 'type', ... ]\n * };\n *\n * registerPlatformBpmnJSPlugin(BpmnJSModule);\n */\nexport function registerPlatformBpmnJSPlugin(module) {\n registerClientPlugin(module, 'bpmn.platform.modeler.additionalModules');\n}\n\n/**\n * Validate and register a cloud specific bpmn-js plugin.\n *\n * @param {Object} module\n *\n * @example\n *\n * import {\n * registerCloudBpmnJSPlugin\n * } from 'camunda-modeler-plugin-helpers';\n *\n * const BpmnJSModule = {\n * __init__: [ 'myService' ],\n * myService: [ 'type', ... ]\n * };\n *\n * registerCloudBpmnJSPlugin(BpmnJSModule);\n */\nexport function registerCloudBpmnJSPlugin(module) {\n registerClientPlugin(module, 'bpmn.cloud.modeler.additionalModules');\n}\n\n/**\n * Validate and register a bpmn-moddle extension plugin.\n *\n * @param {Object} descriptor\n *\n * @example\n * import {\n * registerBpmnJSModdleExtension\n * } from 'camunda-modeler-plugin-helpers';\n *\n * var moddleDescriptor = {\n * name: 'my descriptor',\n * uri: 'http://example.my.company.localhost/schema/my-descriptor/1.0',\n * prefix: 'mydesc',\n *\n * ...\n * };\n *\n * registerBpmnJSModdleExtension(moddleDescriptor);\n */\nexport function registerBpmnJSModdleExtension(descriptor) {\n registerClientPlugin(descriptor, 'bpmn.modeler.moddleExtension');\n}\n\n/**\n * Validate and register a platform specific bpmn-moddle extension plugin.\n *\n * @param {Object} descriptor\n *\n * @example\n * import {\n * registerPlatformBpmnJSModdleExtension\n * } from 'camunda-modeler-plugin-helpers';\n *\n * var moddleDescriptor = {\n * name: 'my descriptor',\n * uri: 'http://example.my.company.localhost/schema/my-descriptor/1.0',\n * prefix: 'mydesc',\n *\n * ...\n * };\n *\n * registerPlatformBpmnJSModdleExtension(moddleDescriptor);\n */\nexport function registerPlatformBpmnJSModdleExtension(descriptor) {\n registerClientPlugin(descriptor, 'bpmn.platform.modeler.moddleExtension');\n}\n\n/**\n * Validate and register a cloud specific bpmn-moddle extension plugin.\n *\n * @param {Object} descriptor\n *\n * @example\n * import {\n * registerCloudBpmnJSModdleExtension\n * } from 'camunda-modeler-plugin-helpers';\n *\n * var moddleDescriptor = {\n * name: 'my descriptor',\n * uri: 'http://example.my.company.localhost/schema/my-descriptor/1.0',\n * prefix: 'mydesc',\n *\n * ...\n * };\n *\n * registerCloudBpmnJSModdleExtension(moddleDescriptor);\n */\nexport function registerCloudBpmnJSModdleExtension(descriptor) {\n registerClientPlugin(descriptor, 'bpmn.cloud.modeler.moddleExtension');\n}\n\n/**\n * Validate and register a dmn-moddle extension plugin.\n *\n * @param {Object} descriptor\n *\n * @example\n * import {\n * registerDmnJSModdleExtension\n * } from 'camunda-modeler-plugin-helpers';\n *\n * var moddleDescriptor = {\n * name: 'my descriptor',\n * uri: 'http://example.my.company.localhost/schema/my-descriptor/1.0',\n * prefix: 'mydesc',\n *\n * ...\n * };\n *\n * registerDmnJSModdleExtension(moddleDescriptor);\n */\nexport function registerDmnJSModdleExtension(descriptor) {\n registerClientPlugin(descriptor, 'dmn.modeler.moddleExtension');\n}\n\n/**\n * Validate and register a cloud specific dmn-moddle extension plugin.\n *\n * @param {Object} descriptor\n *\n * @example\n * import {\n * registerCloudDmnJSModdleExtension\n * } from 'camunda-modeler-plugin-helpers';\n *\n * var moddleDescriptor = {\n * name: 'my descriptor',\n * uri: 'http://example.my.company.localhost/schema/my-descriptor/1.0',\n * prefix: 'mydesc',\n *\n * ...\n * };\n *\n * registerCloudDmnJSModdleExtension(moddleDescriptor);\n */\nexport function registerCloudDmnJSModdleExtension(descriptor) {\n registerClientPlugin(descriptor, 'dmn.cloud.modeler.moddleExtension');\n}\n\n/**\n * Validate and register a platform specific dmn-moddle extension plugin.\n *\n * @param {Object} descriptor\n *\n * @example\n * import {\n * registerPlatformDmnJSModdleExtension\n * } from 'camunda-modeler-plugin-helpers';\n *\n * var moddleDescriptor = {\n * name: 'my descriptor',\n * uri: 'http://example.my.company.localhost/schema/my-descriptor/1.0',\n * prefix: 'mydesc',\n *\n * ...\n * };\n *\n * registerPlatformDmnJSModdleExtension(moddleDescriptor);\n */\nexport function registerPlatformDmnJSModdleExtension(descriptor) {\n registerClientPlugin(descriptor, 'dmn.platform.modeler.moddleExtension');\n}\n\n/**\n * Validate and register a dmn-js plugin.\n *\n * @param {Object} module\n *\n * @example\n *\n * import {\n * registerDmnJSPlugin\n * } from 'camunda-modeler-plugin-helpers';\n *\n * const DmnJSModule = {\n * __init__: [ 'myService' ],\n * myService: [ 'type', ... ]\n * };\n *\n * registerDmnJSPlugin(DmnJSModule, [ 'drd', 'literalExpression' ]);\n * registerDmnJSPlugin(DmnJSModule, 'drd')\n */\nexport function registerDmnJSPlugin(module, components) {\n\n if (!Array.isArray(components)) {\n components = [ components ]\n }\n\n components.forEach(c => registerClientPlugin(module, `dmn.modeler.${c}.additionalModules`));\n}\n\n/**\n * Validate and register a cloud specific dmn-js plugin.\n *\n * @param {Object} module\n *\n * @example\n *\n * import {\n * registerCloudDmnJSPlugin\n * } from 'camunda-modeler-plugin-helpers';\n *\n * const DmnJSModule = {\n * __init__: [ 'myService' ],\n * myService: [ 'type', ... ]\n * };\n *\n * registerCloudDmnJSPlugin(DmnJSModule, [ 'drd', 'literalExpression' ]);\n * registerCloudDmnJSPlugin(DmnJSModule, 'drd')\n */\nexport function registerCloudDmnJSPlugin(module, components) {\n\n if (!Array.isArray(components)) {\n components = [ components ]\n }\n\n components.forEach(c => registerClientPlugin(module, `dmn.cloud.modeler.${c}.additionalModules`));\n}\n\n/**\n * Validate and register a platform specific dmn-js plugin.\n *\n * @param {Object} module\n *\n * @example\n *\n * import {\n * registerPlatformDmnJSPlugin\n * } from 'camunda-modeler-plugin-helpers';\n *\n * const DmnJSModule = {\n * __init__: [ 'myService' ],\n * myService: [ 'type', ... ]\n * };\n *\n * registerPlatformDmnJSPlugin(DmnJSModule, [ 'drd', 'literalExpression' ]);\n * registerPlatformDmnJSPlugin(DmnJSModule, 'drd')\n */\nexport function registerPlatformDmnJSPlugin(module, components) {\n\n if (!Array.isArray(components)) {\n components = [ components ]\n }\n\n components.forEach(c => registerClientPlugin(module, `dmn.platform.modeler.${c}.additionalModules`));\n}\n\n/**\n * Return the modeler directory, as a string.\n *\n * @deprecated Will be removed in future Camunda Modeler versions without replacement.\n *\n * @return {String}\n */\nexport function getModelerDirectory() {\n return window.getModelerDirectory();\n}\n\n/**\n * Return the modeler plugin directory, as a string.\n *\n * @deprecated Will be removed in future Camunda Modeler versions without replacement.\n *\n * @return {String}\n */\nexport function getPluginsDirectory() {\n return window.getPluginsDirectory();\n}","'use strict';\n\n/**\n * Flatten array, one level deep.\n *\n * @template T\n *\n * @param {T[][] | T[] | null} [arr]\n *\n * @return {T[]}\n */\nfunction flatten(arr) {\n return Array.prototype.concat.apply([], arr);\n}\n\nconst nativeToString = Object.prototype.toString;\nconst nativeHasOwnProperty = Object.prototype.hasOwnProperty;\n\nfunction isUndefined(obj) {\n return obj === undefined;\n}\n\nfunction isDefined(obj) {\n return obj !== undefined;\n}\n\nfunction isNil(obj) {\n return obj == null;\n}\n\nfunction isArray(obj) {\n return nativeToString.call(obj) === '[object Array]';\n}\n\nfunction isObject(obj) {\n return nativeToString.call(obj) === '[object Object]';\n}\n\nfunction isNumber(obj) {\n return nativeToString.call(obj) === '[object Number]';\n}\n\n/**\n * @param {any} obj\n *\n * @return {boolean}\n */\nfunction isFunction(obj) {\n const tag = nativeToString.call(obj);\n\n return (\n tag === '[object Function]' ||\n tag === '[object AsyncFunction]' ||\n tag === '[object GeneratorFunction]' ||\n tag === '[object AsyncGeneratorFunction]' ||\n tag === '[object Proxy]'\n );\n}\n\nfunction isString(obj) {\n return nativeToString.call(obj) === '[object String]';\n}\n\n\n/**\n * Ensure collection is an array.\n *\n * @param {Object} obj\n */\nfunction ensureArray(obj) {\n\n if (isArray(obj)) {\n return;\n }\n\n throw new Error('must supply array');\n}\n\n/**\n * Return true, if target owns a property with the given key.\n *\n * @param {Object} target\n * @param {String} key\n *\n * @return {Boolean}\n */\nfunction has(target, key) {\n return !isNil(target) && nativeHasOwnProperty.call(target, key);\n}\n\n/**\n * @template T\n * @typedef { (\n * ((e: T) => boolean) |\n * ((e: T, idx: number) => boolean) |\n * ((e: T, key: string) => boolean) |\n * string |\n * number\n * ) } Matcher\n */\n\n/**\n * @template T\n * @template U\n *\n * @typedef { (\n * ((e: T) => U) | string | number\n * ) } Extractor\n */\n\n\n/**\n * @template T\n * @typedef { (val: T, key: any) => boolean } MatchFn\n */\n\n/**\n * @template T\n * @typedef { T[] } ArrayCollection\n */\n\n/**\n * @template T\n * @typedef { { [key: string]: T } } StringKeyValueCollection\n */\n\n/**\n * @template T\n * @typedef { { [key: number]: T } } NumberKeyValueCollection\n */\n\n/**\n * @template T\n * @typedef { StringKeyValueCollection | NumberKeyValueCollection } KeyValueCollection\n */\n\n/**\n * @template T\n * @typedef { KeyValueCollection | ArrayCollection } Collection\n */\n\n/**\n * Find element in collection.\n *\n * @template T\n * @param {Collection} collection\n * @param {Matcher} matcher\n *\n * @return {Object}\n */\nfunction find(collection, matcher) {\n\n const matchFn = toMatcher(matcher);\n\n let match;\n\n forEach(collection, function(val, key) {\n if (matchFn(val, key)) {\n match = val;\n\n return false;\n }\n });\n\n return match;\n\n}\n\n\n/**\n * Find element index in collection.\n *\n * @template T\n * @param {Collection} collection\n * @param {Matcher} matcher\n *\n * @return {number | string | undefined}\n */\nfunction findIndex(collection, matcher) {\n\n const matchFn = toMatcher(matcher);\n\n let idx = isArray(collection) ? -1 : undefined;\n\n forEach(collection, function(val, key) {\n if (matchFn(val, key)) {\n idx = key;\n\n return false;\n }\n });\n\n return idx;\n}\n\n\n/**\n * Filter elements in collection.\n *\n * @template T\n * @param {Collection} collection\n * @param {Matcher} matcher\n *\n * @return {T[]} result\n */\nfunction filter(collection, matcher) {\n\n const matchFn = toMatcher(matcher);\n\n let result = [];\n\n forEach(collection, function(val, key) {\n if (matchFn(val, key)) {\n result.push(val);\n }\n });\n\n return result;\n}\n\n\n/**\n * Iterate over collection; returning something\n * (non-undefined) will stop iteration.\n *\n * @template T\n * @param {Collection} collection\n * @param { ((item: T, idx: number) => (boolean|void)) | ((item: T, key: string) => (boolean|void)) } iterator\n *\n * @return {T} return result that stopped the iteration\n */\nfunction forEach(collection, iterator) {\n\n let val,\n result;\n\n if (isUndefined(collection)) {\n return;\n }\n\n const convertKey = isArray(collection) ? toNum : identity;\n\n for (let key in collection) {\n\n if (has(collection, key)) {\n val = collection[key];\n\n result = iterator(val, convertKey(key));\n\n if (result === false) {\n return val;\n }\n }\n }\n}\n\n/**\n * Return collection without element.\n *\n * @template T\n * @param {ArrayCollection} arr\n * @param {Matcher} matcher\n *\n * @return {T[]}\n */\nfunction without(arr, matcher) {\n\n if (isUndefined(arr)) {\n return [];\n }\n\n ensureArray(arr);\n\n const matchFn = toMatcher(matcher);\n\n return arr.filter(function(el, idx) {\n return !matchFn(el, idx);\n });\n\n}\n\n\n/**\n * Reduce collection, returning a single result.\n *\n * @template T\n * @template V\n *\n * @param {Collection} collection\n * @param {(result: V, entry: T, index: any) => V} iterator\n * @param {V} result\n *\n * @return {V} result returned from last iterator\n */\nfunction reduce(collection, iterator, result) {\n\n forEach(collection, function(value, idx) {\n result = iterator(result, value, idx);\n });\n\n return result;\n}\n\n\n/**\n * Return true if every element in the collection\n * matches the criteria.\n *\n * @param {Object|Array} collection\n * @param {Function} matcher\n *\n * @return {Boolean}\n */\nfunction every(collection, matcher) {\n\n return !!reduce(collection, function(matches, val, key) {\n return matches && matcher(val, key);\n }, true);\n}\n\n\n/**\n * Return true if some elements in the collection\n * match the criteria.\n *\n * @param {Object|Array} collection\n * @param {Function} matcher\n *\n * @return {Boolean}\n */\nfunction some(collection, matcher) {\n\n return !!find(collection, matcher);\n}\n\n\n/**\n * Transform a collection into another collection\n * by piping each member through the given fn.\n *\n * @param {Object|Array} collection\n * @param {Function} fn\n *\n * @return {Array} transformed collection\n */\nfunction map(collection, fn) {\n\n let result = [];\n\n forEach(collection, function(val, key) {\n result.push(fn(val, key));\n });\n\n return result;\n}\n\n\n/**\n * Get the collections keys.\n *\n * @param {Object|Array} collection\n *\n * @return {Array}\n */\nfunction keys(collection) {\n return collection && Object.keys(collection) || [];\n}\n\n\n/**\n * Shorthand for `keys(o).length`.\n *\n * @param {Object|Array} collection\n *\n * @return {Number}\n */\nfunction size(collection) {\n return keys(collection).length;\n}\n\n\n/**\n * Get the values in the collection.\n *\n * @param {Object|Array} collection\n *\n * @return {Array}\n */\nfunction values(collection) {\n return map(collection, (val) => val);\n}\n\n\n/**\n * Group collection members by attribute.\n *\n * @param {Object|Array} collection\n * @param {Extractor} extractor\n *\n * @return {Object} map with { attrValue => [ a, b, c ] }\n */\nfunction groupBy(collection, extractor, grouped = {}) {\n\n extractor = toExtractor(extractor);\n\n forEach(collection, function(val) {\n let discriminator = extractor(val) || '_';\n\n let group = grouped[discriminator];\n\n if (!group) {\n group = grouped[discriminator] = [];\n }\n\n group.push(val);\n });\n\n return grouped;\n}\n\n\nfunction uniqueBy(extractor, ...collections) {\n\n extractor = toExtractor(extractor);\n\n let grouped = {};\n\n forEach(collections, (c) => groupBy(c, extractor, grouped));\n\n let result = map(grouped, function(val, key) {\n return val[0];\n });\n\n return result;\n}\n\n\nconst unionBy = uniqueBy;\n\n\n\n/**\n * Sort collection by criteria.\n *\n * @template T\n *\n * @param {Collection} collection\n * @param {Extractor} extractor\n *\n * @return {Array}\n */\nfunction sortBy(collection, extractor) {\n\n extractor = toExtractor(extractor);\n\n let sorted = [];\n\n forEach(collection, function(value, key) {\n let disc = extractor(value, key);\n\n let entry = {\n d: disc,\n v: value\n };\n\n for (var idx = 0; idx < sorted.length; idx++) {\n let { d } = sorted[idx];\n\n if (disc < d) {\n sorted.splice(idx, 0, entry);\n return;\n }\n }\n\n // not inserted, append (!)\n sorted.push(entry);\n });\n\n return map(sorted, (e) => e.v);\n}\n\n\n/**\n * Create an object pattern matcher.\n *\n * @example\n *\n * ```javascript\n * const matcher = matchPattern({ id: 1 });\n *\n * let element = find(elements, matcher);\n * ```\n *\n * @template T\n *\n * @param {T} pattern\n *\n * @return { (el: any) => boolean } matcherFn\n */\nfunction matchPattern(pattern) {\n\n return function(el) {\n\n return every(pattern, function(val, key) {\n return el[key] === val;\n });\n\n };\n}\n\n\n/**\n * @param {string | ((e: any) => any) } extractor\n *\n * @return { (e: any) => any }\n */\nfunction toExtractor(extractor) {\n\n /**\n * @satisfies { (e: any) => any }\n */\n return isFunction(extractor) ? extractor : (e) => {\n\n // @ts-ignore: just works\n return e[extractor];\n };\n}\n\n\n/**\n * @template T\n * @param {Matcher} matcher\n *\n * @return {MatchFn}\n */\nfunction toMatcher(matcher) {\n return isFunction(matcher) ? matcher : (e) => {\n return e === matcher;\n };\n}\n\n\nfunction identity(arg) {\n return arg;\n}\n\nfunction toNum(arg) {\n return Number(arg);\n}\n\n/* global setTimeout clearTimeout */\n\n/**\n * @typedef { {\n * (...args: any[]): any;\n * flush: () => void;\n * cancel: () => void;\n * } } DebouncedFunction\n */\n\n/**\n * Debounce fn, calling it only once if the given time\n * elapsed between calls.\n *\n * Lodash-style the function exposes methods to `#clear`\n * and `#flush` to control internal behavior.\n *\n * @param {Function} fn\n * @param {Number} timeout\n *\n * @return {DebouncedFunction} debounced function\n */\nfunction debounce(fn, timeout) {\n\n let timer;\n\n let lastArgs;\n let lastThis;\n\n let lastNow;\n\n function fire(force) {\n\n let now = Date.now();\n\n let scheduledDiff = force ? 0 : (lastNow + timeout) - now;\n\n if (scheduledDiff > 0) {\n return schedule(scheduledDiff);\n }\n\n fn.apply(lastThis, lastArgs);\n\n clear();\n }\n\n function schedule(timeout) {\n timer = setTimeout(fire, timeout);\n }\n\n function clear() {\n if (timer) {\n clearTimeout(timer);\n }\n\n timer = lastNow = lastArgs = lastThis = undefined;\n }\n\n function flush() {\n if (timer) {\n fire(true);\n }\n\n clear();\n }\n\n /**\n * @type { DebouncedFunction }\n */\n function callback(...args) {\n lastNow = Date.now();\n\n lastArgs = args;\n lastThis = this;\n\n // ensure an execution is scheduled\n if (!timer) {\n schedule(timeout);\n }\n }\n\n callback.flush = flush;\n callback.cancel = clear;\n\n return callback;\n}\n\n/**\n * Throttle fn, calling at most once\n * in the given interval.\n *\n * @param {Function} fn\n * @param {Number} interval\n *\n * @return {Function} throttled function\n */\nfunction throttle(fn, interval) {\n let throttling = false;\n\n return function(...args) {\n\n if (throttling) {\n return;\n }\n\n fn(...args);\n throttling = true;\n\n setTimeout(() => {\n throttling = false;\n }, interval);\n };\n}\n\n/**\n * Bind function against target .\n *\n * @param {Function} fn\n * @param {Object} target\n *\n * @return {Function} bound function\n */\nfunction bind(fn, target) {\n return fn.bind(target);\n}\n\n/**\n * Convenience wrapper for `Object.assign`.\n *\n * @param {Object} target\n * @param {...Object} others\n *\n * @return {Object} the target\n */\nfunction assign(target, ...others) {\n return Object.assign(target, ...others);\n}\n\n/**\n * Sets a nested property of a given object to the specified value.\n *\n * This mutates the object and returns it.\n *\n * @template T\n *\n * @param {T} target The target of the set operation.\n * @param {(string|number)[]} path The path to the nested value.\n * @param {any} value The value to set.\n *\n * @return {T}\n */\nfunction set(target, path, value) {\n\n let currentTarget = target;\n\n forEach(path, function(key, idx) {\n\n if (typeof key !== 'number' && typeof key !== 'string') {\n throw new Error('illegal key type: ' + typeof key + '. Key should be of type number or string.');\n }\n\n if (key === 'constructor') {\n throw new Error('illegal key: constructor');\n }\n\n if (key === '__proto__') {\n throw new Error('illegal key: __proto__');\n }\n\n let nextKey = path[idx + 1];\n let nextTarget = currentTarget[key];\n\n if (isDefined(nextKey) && isNil(nextTarget)) {\n nextTarget = currentTarget[key] = isNaN(+nextKey) ? {} : [];\n }\n\n if (isUndefined(nextKey)) {\n if (isUndefined(value)) {\n delete currentTarget[key];\n } else {\n currentTarget[key] = value;\n }\n } else {\n currentTarget = nextTarget;\n }\n });\n\n return target;\n}\n\n\n/**\n * Gets a nested property of a given object.\n *\n * @param {Object} target The target of the get operation.\n * @param {(string|number)[]} path The path to the nested value.\n * @param {any} [defaultValue] The value to return if no value exists.\n *\n * @return {any}\n */\nfunction get(target, path, defaultValue) {\n\n let currentTarget = target;\n\n forEach(path, function(key) {\n\n // accessing nil property yields \n if (isNil(currentTarget)) {\n currentTarget = undefined;\n\n return false;\n }\n\n currentTarget = currentTarget[key];\n });\n\n return isUndefined(currentTarget) ? defaultValue : currentTarget;\n}\n\n/**\n * Pick properties from the given target.\n *\n * @template T\n * @template {any[]} V\n *\n * @param {T} target\n * @param {V} properties\n *\n * @return Pick\n */\nfunction pick(target, properties) {\n\n let result = {};\n\n let obj = Object(target);\n\n forEach(properties, function(prop) {\n\n if (prop in obj) {\n result[prop] = target[prop];\n }\n });\n\n return result;\n}\n\n/**\n * Pick all target properties, excluding the given ones.\n *\n * @template T\n * @template {any[]} V\n *\n * @param {T} target\n * @param {V} properties\n *\n * @return {Omit} target\n */\nfunction omit(target, properties) {\n\n let result = {};\n\n let obj = Object(target);\n\n forEach(obj, function(prop, key) {\n\n if (properties.indexOf(key) === -1) {\n result[key] = prop;\n }\n });\n\n return result;\n}\n\n/**\n * Recursively merge `...sources` into given target.\n *\n * Does support merging objects; does not support merging arrays.\n *\n * @param {Object} target\n * @param {...Object} sources\n *\n * @return {Object} the target\n */\nfunction merge(target, ...sources) {\n\n if (!sources.length) {\n return target;\n }\n\n forEach(sources, function(source) {\n\n // skip non-obj sources, i.e. null\n if (!source || !isObject(source)) {\n return;\n }\n\n forEach(source, function(sourceVal, key) {\n\n if (key === '__proto__') {\n return;\n }\n\n let targetVal = target[key];\n\n if (isObject(sourceVal)) {\n\n if (!isObject(targetVal)) {\n\n // override target[key] with object\n targetVal = {};\n }\n\n target[key] = merge(targetVal, sourceVal);\n } else {\n target[key] = sourceVal;\n }\n\n });\n });\n\n return target;\n}\n\nexports.assign = assign;\nexports.bind = bind;\nexports.debounce = debounce;\nexports.ensureArray = ensureArray;\nexports.every = every;\nexports.filter = filter;\nexports.find = find;\nexports.findIndex = findIndex;\nexports.flatten = flatten;\nexports.forEach = forEach;\nexports.get = get;\nexports.groupBy = groupBy;\nexports.has = has;\nexports.isArray = isArray;\nexports.isDefined = isDefined;\nexports.isFunction = isFunction;\nexports.isNil = isNil;\nexports.isNumber = isNumber;\nexports.isObject = isObject;\nexports.isString = isString;\nexports.isUndefined = isUndefined;\nexports.keys = keys;\nexports.map = map;\nexports.matchPattern = matchPattern;\nexports.merge = merge;\nexports.omit = omit;\nexports.pick = pick;\nexports.reduce = reduce;\nexports.set = set;\nexports.size = size;\nexports.some = some;\nexports.sortBy = sortBy;\nexports.throttle = throttle;\nexports.unionBy = unionBy;\nexports.uniqueBy = uniqueBy;\nexports.values = values;\nexports.without = without;\n","/**\n * Checks whether node is of specific bpmn type.\n *\n * @param {ModdleElement} node\n * @param {String} type\n *\n * @return {Boolean}\n */\nfunction is(node, type) {\n\n if (type.indexOf(':') === -1) {\n type = 'bpmn:' + type;\n }\n\n return (\n (typeof node.$instanceOf === 'function')\n ? node.$instanceOf(type)\n : node.$type === type\n );\n}\n\n/**\n * Checks whether node has any of the specified types.\n *\n * @param {ModdleElement} node\n * @param {Array} types\n *\n * @return {Boolean}\n */\nfunction isAny(node, types) {\n return types.some(function(type) {\n return is(node, type);\n });\n}\n\nexport { is, isAny };\n//# sourceMappingURL=index.esm.js.map\n","// The module cache\nvar __webpack_module_cache__ = {};\n\n// The require function\nfunction __webpack_require__(moduleId) {\n\t// Check if module is in cache\n\tvar cachedModule = __webpack_module_cache__[moduleId];\n\tif (cachedModule !== undefined) {\n\t\treturn cachedModule.exports;\n\t}\n\t// Create a new module (and put it into the cache)\n\tvar module = __webpack_module_cache__[moduleId] = {\n\t\t// no module.id needed\n\t\t// no module.loaded needed\n\t\texports: {}\n\t};\n\n\t// Execute the module function\n\t__webpack_modules__[moduleId](module, module.exports, __webpack_require__);\n\n\t// Return the exports of the module\n\treturn module.exports;\n}\n\n","// getDefaultExport function for compatibility with non-harmony modules\n__webpack_require__.n = (module) => {\n\tvar getter = module && module.__esModule ?\n\t\t() => (module['default']) :\n\t\t() => (module);\n\t__webpack_require__.d(getter, { a: getter });\n\treturn getter;\n};","// define getter functions for harmony exports\n__webpack_require__.d = (exports, definition) => {\n\tfor(var key in definition) {\n\t\tif(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {\n\t\t\tObject.defineProperty(exports, key, { enumerable: true, get: definition[key] });\n\t\t}\n\t}\n};","__webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))","// define __esModule on exports\n__webpack_require__.r = (exports) => {\n\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n\t}\n\tObject.defineProperty(exports, '__esModule', { value: true });\n};","import { registerClientPlugin } from 'camunda-modeler-plugin-helpers';\r\n\r\nimport { config, resolver } from '../.bpmnlintrc';\r\n\r\n// provide { config, resolver } as a `lintRules.${tabType}` plug-in\r\nregisterClientPlugin({ config, resolver }, 'lintRules.cloud-bpmn');\r\nregisterClientPlugin({ config, resolver }, 'lintRules.bpmn');\r\n"],"names":[],"sourceRoot":""} \ No newline at end of file diff --git a/package-lock.json b/package-lock.json index 02550f8..f057617 100644 --- a/package-lock.json +++ b/package-lock.json @@ -9,7 +9,7 @@ "version": "0.1.0", "license": "MIT", "devDependencies": { - "bpmnlint": "^10.3.1", + "bpmnlint": "^11.0.0", "bpmnlint-loader": "^0.1.6", "bpmnlint-plugin-camunda": "^0.6.1", "camunda-modeler-plugin-helpers": "^5.1.0", @@ -410,29 +410,32 @@ "dev": true }, "node_modules/bpmn-moddle": { - "version": "8.1.0", - "resolved": "https://registry.npmjs.org/bpmn-moddle/-/bpmn-moddle-8.1.0.tgz", - "integrity": "sha512-yI5OAFfYVJwViKTsTsonVfCBPtB3MlefADUORwNIxxBOMp21vnoxuxsdgUWlPH/dvAEZh/+mr8UtqOBNu8NC5Q==", + "version": "9.0.1", + "resolved": "https://registry.npmjs.org/bpmn-moddle/-/bpmn-moddle-9.0.1.tgz", + "integrity": "sha512-jO2P5RBx0cZCCd+imqhpNE5anttaYuGd71u76NEA/qMZwJSW1t5ETAtw9/E2InfiPU2w0TR8oxPyopJXRc9VQg==", "dev": true, "dependencies": { - "min-dash": "^4.0.0", - "moddle": "^6.2.3", - "moddle-xml": "^10.1.0" + "min-dash": "^4.2.1", + "moddle": "^7.0.0", + "moddle-xml": "^11.0.0" + }, + "engines": { + "node": ">= 18" } }, "node_modules/bpmnlint": { - "version": "10.3.1", - "resolved": "https://registry.npmjs.org/bpmnlint/-/bpmnlint-10.3.1.tgz", - "integrity": "sha512-yKkL9iJLBWGTRgiJNiZ4zsJHXwyJmmgQij/4fhRMMfsEDWNk0V5iFtGYF57jH4o/riXTfIototyy/MxOCAyu2g==", + "version": "11.0.0", + "resolved": "https://registry.npmjs.org/bpmnlint/-/bpmnlint-11.0.0.tgz", + "integrity": "sha512-7e8WGtK78xJTaRsQ6QhBSgwXynAOaY5P4Ny4/nDryBAiF4gjowI9aqARXZZrluO4lTxmgDYQRpmLVcTVE9ZYIw==", "dev": true, "dependencies": { "@bpmn-io/moddle-utils": "^0.2.1", "ansi-colors": "^4.1.3", - "bpmn-moddle": "^8.1.0", + "bpmn-moddle": "^9.0.1", "bpmnlint-utils": "^1.1.1", "cli-table": "^0.3.11", "color-support": "^1.1.3", - "min-dash": "^4.2.1", + "min-dash": "^4.2.2", "mri": "^1.2.0", "pluralize": "^7.0.0", "tiny-glob": "^0.2.9" @@ -441,7 +444,7 @@ "bpmnlint": "bin/bpmnlint.js" }, "engines": { - "node": ">= 16" + "node": ">= 20" } }, "node_modules/bpmnlint-loader": { @@ -1182,9 +1185,9 @@ } }, "node_modules/min-dash": { - "version": "4.2.1", - "resolved": "https://registry.npmjs.org/min-dash/-/min-dash-4.2.1.tgz", - "integrity": "sha512-to+unsToePnm7cUeR9TrMzFlETHd/UXmU+ELTRfWZj5XGT41KF6X3L233o3E/GdEs3sk2Tbw/lOLD1avmWkg8A==", + "version": "4.2.2", + "resolved": "https://registry.npmjs.org/min-dash/-/min-dash-4.2.2.tgz", + "integrity": "sha512-qbhSYUxk6mBaF096B3JOQSumXbKWHenmT97cSpdNzgkWwGjhjhE/KZODCoDNhI2I4C9Cb6R/Q13S4BYkUSXoXQ==", "dev": true }, "node_modules/minimatch": { @@ -1200,23 +1203,28 @@ } }, "node_modules/moddle": { - "version": "6.2.3", - "resolved": "https://registry.npmjs.org/moddle/-/moddle-6.2.3.tgz", - "integrity": "sha512-bLVN+ZHL3aKnhxc19XtjUfvdJsS3EsiEJC7bT6YPD11qYmTzvsxrGgyYz1Ouof7TZuGw0lDJ1OLmEnxcpQWk3Q==", + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/moddle/-/moddle-7.2.0.tgz", + "integrity": "sha512-x1+JREThy7JBOBR3g2hbOnOfrlC/YAWXX9RzrSZS5HhqeuBly9H/PCtOBtcQs+Y2sjRAXF+WTNSgHvn8Uq+6Yw==", "dev": true, "dependencies": { - "min-dash": "^4.0.0" + "min-dash": "^4.2.1" } }, "node_modules/moddle-xml": { - "version": "10.1.0", - "resolved": "https://registry.npmjs.org/moddle-xml/-/moddle-xml-10.1.0.tgz", - "integrity": "sha512-erWckwLt+dYskewKXJso9u+aAZ5172lOiYxSOqKCPTy7L/xmqH1PoeoA7eVC7oJTt3PqF5TkZzUmbjGH6soQBg==", + "version": "11.0.0", + "resolved": "https://registry.npmjs.org/moddle-xml/-/moddle-xml-11.0.0.tgz", + "integrity": "sha512-L3Sseepfcq9Uy0iIfqEDTXSoYLva1Y/JGbN/4AMOeQ6cqbu8Ma/SDJIdOFm7smsAa64j2z3SwCGG3FIilQVnUg==", "dev": true, "dependencies": { "min-dash": "^4.0.0", - "moddle": "^6.0.0", - "saxen": "^8.1.2" + "saxen": "^10.0.0" + }, + "engines": { + "node": ">= 18" + }, + "peerDependencies": { + "moddle": ">= 6.2.0" } }, "node_modules/mri": { @@ -1528,10 +1536,13 @@ ] }, "node_modules/saxen": { - "version": "8.1.2", - "resolved": "https://registry.npmjs.org/saxen/-/saxen-8.1.2.tgz", - "integrity": "sha512-xUOiiFbc3Ow7p8KMxwsGICPx46ZQvy3+qfNVhrkwfz3Vvq45eGt98Ft5IQaA1R/7Tb5B5MKh9fUR9x3c3nDTxw==", - "dev": true + "version": "10.0.0", + "resolved": "https://registry.npmjs.org/saxen/-/saxen-10.0.0.tgz", + "integrity": "sha512-RXsmWok/SAWqOG/f5ADEz51DN9WtZEzqih3e08ranldcaXekxjx8NBKjGh/y5hlowjo0JH/LekBu6gtPFD1G6g==", + "dev": true, + "engines": { + "node": ">= 18" + } }, "node_modules/schema-utils": { "version": "3.3.0", @@ -2381,29 +2392,29 @@ "dev": true }, "bpmn-moddle": { - "version": "8.1.0", - "resolved": "https://registry.npmjs.org/bpmn-moddle/-/bpmn-moddle-8.1.0.tgz", - "integrity": "sha512-yI5OAFfYVJwViKTsTsonVfCBPtB3MlefADUORwNIxxBOMp21vnoxuxsdgUWlPH/dvAEZh/+mr8UtqOBNu8NC5Q==", + "version": "9.0.1", + "resolved": "https://registry.npmjs.org/bpmn-moddle/-/bpmn-moddle-9.0.1.tgz", + "integrity": "sha512-jO2P5RBx0cZCCd+imqhpNE5anttaYuGd71u76NEA/qMZwJSW1t5ETAtw9/E2InfiPU2w0TR8oxPyopJXRc9VQg==", "dev": true, "requires": { - "min-dash": "^4.0.0", - "moddle": "^6.2.3", - "moddle-xml": "^10.1.0" + "min-dash": "^4.2.1", + "moddle": "^7.0.0", + "moddle-xml": "^11.0.0" } }, "bpmnlint": { - "version": "10.3.1", - "resolved": "https://registry.npmjs.org/bpmnlint/-/bpmnlint-10.3.1.tgz", - "integrity": "sha512-yKkL9iJLBWGTRgiJNiZ4zsJHXwyJmmgQij/4fhRMMfsEDWNk0V5iFtGYF57jH4o/riXTfIototyy/MxOCAyu2g==", + "version": "11.0.0", + "resolved": "https://registry.npmjs.org/bpmnlint/-/bpmnlint-11.0.0.tgz", + "integrity": "sha512-7e8WGtK78xJTaRsQ6QhBSgwXynAOaY5P4Ny4/nDryBAiF4gjowI9aqARXZZrluO4lTxmgDYQRpmLVcTVE9ZYIw==", "dev": true, "requires": { "@bpmn-io/moddle-utils": "^0.2.1", "ansi-colors": "^4.1.3", - "bpmn-moddle": "^8.1.0", + "bpmn-moddle": "^9.0.1", "bpmnlint-utils": "^1.1.1", "cli-table": "^0.3.11", "color-support": "^1.1.3", - "min-dash": "^4.2.1", + "min-dash": "^4.2.2", "mri": "^1.2.0", "pluralize": "^7.0.0", "tiny-glob": "^0.2.9" @@ -2971,9 +2982,9 @@ } }, "min-dash": { - "version": "4.2.1", - "resolved": "https://registry.npmjs.org/min-dash/-/min-dash-4.2.1.tgz", - "integrity": "sha512-to+unsToePnm7cUeR9TrMzFlETHd/UXmU+ELTRfWZj5XGT41KF6X3L233o3E/GdEs3sk2Tbw/lOLD1avmWkg8A==", + "version": "4.2.2", + "resolved": "https://registry.npmjs.org/min-dash/-/min-dash-4.2.2.tgz", + "integrity": "sha512-qbhSYUxk6mBaF096B3JOQSumXbKWHenmT97cSpdNzgkWwGjhjhE/KZODCoDNhI2I4C9Cb6R/Q13S4BYkUSXoXQ==", "dev": true }, "minimatch": { @@ -2986,23 +2997,22 @@ } }, "moddle": { - "version": "6.2.3", - "resolved": "https://registry.npmjs.org/moddle/-/moddle-6.2.3.tgz", - "integrity": "sha512-bLVN+ZHL3aKnhxc19XtjUfvdJsS3EsiEJC7bT6YPD11qYmTzvsxrGgyYz1Ouof7TZuGw0lDJ1OLmEnxcpQWk3Q==", + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/moddle/-/moddle-7.2.0.tgz", + "integrity": "sha512-x1+JREThy7JBOBR3g2hbOnOfrlC/YAWXX9RzrSZS5HhqeuBly9H/PCtOBtcQs+Y2sjRAXF+WTNSgHvn8Uq+6Yw==", "dev": true, "requires": { - "min-dash": "^4.0.0" + "min-dash": "^4.2.1" } }, "moddle-xml": { - "version": "10.1.0", - "resolved": "https://registry.npmjs.org/moddle-xml/-/moddle-xml-10.1.0.tgz", - "integrity": "sha512-erWckwLt+dYskewKXJso9u+aAZ5172lOiYxSOqKCPTy7L/xmqH1PoeoA7eVC7oJTt3PqF5TkZzUmbjGH6soQBg==", + "version": "11.0.0", + "resolved": "https://registry.npmjs.org/moddle-xml/-/moddle-xml-11.0.0.tgz", + "integrity": "sha512-L3Sseepfcq9Uy0iIfqEDTXSoYLva1Y/JGbN/4AMOeQ6cqbu8Ma/SDJIdOFm7smsAa64j2z3SwCGG3FIilQVnUg==", "dev": true, "requires": { "min-dash": "^4.0.0", - "moddle": "^6.0.0", - "saxen": "^8.1.2" + "saxen": "^10.0.0" } }, "mri": { @@ -3226,9 +3236,9 @@ "dev": true }, "saxen": { - "version": "8.1.2", - "resolved": "https://registry.npmjs.org/saxen/-/saxen-8.1.2.tgz", - "integrity": "sha512-xUOiiFbc3Ow7p8KMxwsGICPx46ZQvy3+qfNVhrkwfz3Vvq45eGt98Ft5IQaA1R/7Tb5B5MKh9fUR9x3c3nDTxw==", + "version": "10.0.0", + "resolved": "https://registry.npmjs.org/saxen/-/saxen-10.0.0.tgz", + "integrity": "sha512-RXsmWok/SAWqOG/f5ADEz51DN9WtZEzqih3e08ranldcaXekxjx8NBKjGh/y5hlowjo0JH/LekBu6gtPFD1G6g==", "dev": true }, "schema-utils": { diff --git a/package.json b/package.json index 37e6028..b251762 100644 --- a/package.json +++ b/package.json @@ -21,7 +21,7 @@ "author": "Jonathan Lukas", "license": "MIT", "devDependencies": { - "bpmnlint": "^10.3.1", + "bpmnlint": "^11.0.0", "bpmnlint-loader": "^0.1.6", "bpmnlint-plugin-camunda": "^0.6.1", "camunda-modeler-plugin-helpers": "^5.1.0",