bpmn-visualization
Version:
A TypeScript library for visualizing process execution data on BPMN diagrams
2 lines • 979 kB
JavaScript
/* bpmn-visualization v0.46.0 | Copyright (c) 2020-2025, Bonitasoft SA | Apache 2.0 license */
var bpmnvisu=function(exports){"use strict";var FitType,ZoomType,ShapeBpmnElementKind,ShapeBpmnCallActivityKind,ShapeBpmnEventBasedGatewayKind,ShapeBpmnEventDefinitionKind,ShapeBpmnMarkerKind,ShapeBpmnSubProcessKind;function htmlElement(t){return t instanceof HTMLElement?t:document.querySelector(`#${t}`)}function convertEmptyStringAndObject(t,e){return""===t?e?{}:void 0:t}function ensureIsArray(t,e=!1){return null==t?[]:(Array.isArray(t)?t:[t]).map((t=>convertEmptyStringAndObject(t,e))).filter(Boolean)}function filter(t,e,n){const i=[];(null==n?void 0:n.startingWith)?i.push(`^(${n.startingWith}).*`):(null==n?void 0:n.notStartingWith)&&i.push(`^(?!(${n.notStartingWith})).*`),i.push(`${e}$`);const s=i.join("");return t.filter((t=>(null==n?void 0:n.ignoreCase)?new RegExp(s,"i").test(t):new RegExp(s).test(t)))}exports.FitType=void 0,FitType=exports.FitType||(exports.FitType={}),FitType.None="None",FitType.HorizontalVertical="HorizontalVertical",FitType.Horizontal="Horizontal",FitType.Vertical="Vertical",FitType.Center="Center",exports.ZoomType=void 0,ZoomType=exports.ZoomType||(exports.ZoomType={}),ZoomType.In="in",ZoomType.Out="out",exports.ShapeBpmnElementKind=void 0,ShapeBpmnElementKind=exports.ShapeBpmnElementKind||(exports.ShapeBpmnElementKind={}),ShapeBpmnElementKind.LANE="lane",ShapeBpmnElementKind.POOL="pool",ShapeBpmnElementKind.CALL_ACTIVITY="callActivity",ShapeBpmnElementKind.SUB_PROCESS="subProcess",ShapeBpmnElementKind.TASK="task",ShapeBpmnElementKind.TASK_USER="userTask",ShapeBpmnElementKind.TASK_SERVICE="serviceTask",ShapeBpmnElementKind.TASK_RECEIVE="receiveTask",ShapeBpmnElementKind.TASK_SEND="sendTask",ShapeBpmnElementKind.TASK_MANUAL="manualTask",ShapeBpmnElementKind.TASK_SCRIPT="scriptTask",ShapeBpmnElementKind.TASK_BUSINESS_RULE="businessRuleTask",ShapeBpmnElementKind.GLOBAL_TASK="globalTask",ShapeBpmnElementKind.GLOBAL_TASK_USER="globalUserTask",ShapeBpmnElementKind.GLOBAL_TASK_MANUAL="globalManualTask",ShapeBpmnElementKind.GLOBAL_TASK_SCRIPT="globalScriptTask",ShapeBpmnElementKind.GLOBAL_TASK_BUSINESS_RULE="globalBusinessRuleTask",ShapeBpmnElementKind.GROUP="group",ShapeBpmnElementKind.TEXT_ANNOTATION="textAnnotation",ShapeBpmnElementKind.GATEWAY_PARALLEL="parallelGateway",ShapeBpmnElementKind.GATEWAY_EXCLUSIVE="exclusiveGateway",ShapeBpmnElementKind.GATEWAY_INCLUSIVE="inclusiveGateway",ShapeBpmnElementKind.GATEWAY_EVENT_BASED="eventBasedGateway",ShapeBpmnElementKind.GATEWAY_COMPLEX="complexGateway",ShapeBpmnElementKind.EVENT_START="startEvent",ShapeBpmnElementKind.EVENT_END="endEvent",ShapeBpmnElementKind.EVENT_INTERMEDIATE_CATCH="intermediateCatchEvent",ShapeBpmnElementKind.EVENT_INTERMEDIATE_THROW="intermediateThrowEvent",ShapeBpmnElementKind.EVENT_BOUNDARY="boundaryEvent",exports.ShapeBpmnCallActivityKind=void 0,ShapeBpmnCallActivityKind=exports.ShapeBpmnCallActivityKind||(exports.ShapeBpmnCallActivityKind={}),ShapeBpmnCallActivityKind.CALLING_PROCESS="process",ShapeBpmnCallActivityKind.CALLING_GLOBAL_TASK="global task",exports.ShapeBpmnEventBasedGatewayKind=void 0,ShapeBpmnEventBasedGatewayKind=exports.ShapeBpmnEventBasedGatewayKind||(exports.ShapeBpmnEventBasedGatewayKind={}),ShapeBpmnEventBasedGatewayKind.Exclusive="Exclusive",ShapeBpmnEventBasedGatewayKind.None="None",ShapeBpmnEventBasedGatewayKind.Parallel="Parallel",exports.ShapeBpmnEventDefinitionKind=void 0,ShapeBpmnEventDefinitionKind=exports.ShapeBpmnEventDefinitionKind||(exports.ShapeBpmnEventDefinitionKind={}),ShapeBpmnEventDefinitionKind.NONE="none",ShapeBpmnEventDefinitionKind.TERMINATE="terminate",ShapeBpmnEventDefinitionKind.CANCEL="cancel",ShapeBpmnEventDefinitionKind.COMPENSATION="compensate",ShapeBpmnEventDefinitionKind.CONDITIONAL="conditional",ShapeBpmnEventDefinitionKind.ERROR="error",ShapeBpmnEventDefinitionKind.ESCALATION="escalation",ShapeBpmnEventDefinitionKind.LINK="link",ShapeBpmnEventDefinitionKind.MESSAGE="message",ShapeBpmnEventDefinitionKind.SIGNAL="signal",ShapeBpmnEventDefinitionKind.TIMER="timer",exports.ShapeBpmnMarkerKind=void 0,ShapeBpmnMarkerKind=exports.ShapeBpmnMarkerKind||(exports.ShapeBpmnMarkerKind={}),ShapeBpmnMarkerKind.ADHOC="adhoc",ShapeBpmnMarkerKind.COMPENSATION="compensation",ShapeBpmnMarkerKind.EXPAND="expand",ShapeBpmnMarkerKind.LOOP="loop",ShapeBpmnMarkerKind.MULTI_INSTANCE_PARALLEL="multi-parallel",ShapeBpmnMarkerKind.MULTI_INSTANCE_SEQUENTIAL="multi-sequential",exports.ShapeBpmnSubProcessKind=void 0,ShapeBpmnSubProcessKind=exports.ShapeBpmnSubProcessKind||(exports.ShapeBpmnSubProcessKind={}),ShapeBpmnSubProcessKind.AD_HOC="adhoc",ShapeBpmnSubProcessKind.EMBEDDED="embedded",ShapeBpmnSubProcessKind.EVENT="event",ShapeBpmnSubProcessKind.TRANSACTION="transaction";class ShapeUtil{static isEvent(t){return isKindOf(EVENT_KINDS,t)}static eventKinds(){return[...EVENT_KINDS]}static isBoundaryEvent(t){return exports.ShapeBpmnElementKind.EVENT_BOUNDARY===t}static isStartEvent(t){return exports.ShapeBpmnElementKind.EVENT_START===t}static isCatchEvent(t){return exports.ShapeBpmnElementKind.EVENT_INTERMEDIATE_CATCH===t||exports.ShapeBpmnElementKind.EVENT_BOUNDARY===t||exports.ShapeBpmnElementKind.EVENT_START===t}static isIntermediateCatchEvent(t){return exports.ShapeBpmnElementKind.EVENT_INTERMEDIATE_CATCH===t}static isIntermediateThrowEvent(t){return exports.ShapeBpmnElementKind.EVENT_INTERMEDIATE_THROW===t}static isCallActivity(t){return exports.ShapeBpmnElementKind.CALL_ACTIVITY===t}static isSubProcess(t){return exports.ShapeBpmnElementKind.SUB_PROCESS===t}static canHaveNoneEvent(t){return exports.ShapeBpmnElementKind.EVENT_INTERMEDIATE_THROW===t||exports.ShapeBpmnElementKind.EVENT_END===t||exports.ShapeBpmnElementKind.EVENT_START===t}static isActivity(t){return isKindOf(ACTIVITY_KINDS,t)}static activityKinds(){return[...ACTIVITY_KINDS]}static isWithDefaultSequenceFlow(t){return FLOW_NODE_WITH_DEFAULT_SEQUENCE_FLOW_KINDS.has(t)}static isTask(t){return isKindOf(TASK_KINDS,t)}static taskKinds(){return[...TASK_KINDS]}static gatewayKinds(){return[...GATEWAY_KINDS]}static isGateway(t){return isKindOf(GATEWAY_KINDS,t)}static flowNodeKinds(){return Object.values(exports.ShapeBpmnElementKind).filter((t=>!ShapeUtil.isPoolOrLane(t)))}static isPoolOrLane(t){return t==exports.ShapeBpmnElementKind.POOL||t==exports.ShapeBpmnElementKind.LANE}}function filterKind(t,e){return filter(Object.values(exports.ShapeBpmnElementKind),t,e)}function isKindOf(t,e){return Object.values(t).map((t=>t)).includes(e)}const EVENT_KINDS=filterKind("Event"),GATEWAY_KINDS=filterKind("Gateway"),TASK_KINDS=filterKind("Task",{ignoreCase:!0,notStartingWith:"global"}),ACTIVITY_KINDS=[...TASK_KINDS,exports.ShapeBpmnElementKind.CALL_ACTIVITY,exports.ShapeBpmnElementKind.SUB_PROCESS],FLOW_NODE_WITH_DEFAULT_SEQUENCE_FLOW_KINDS=new Set([...ACTIVITY_KINDS,exports.ShapeBpmnElementKind.GATEWAY_EXCLUSIVE,exports.ShapeBpmnElementKind.GATEWAY_INCLUSIVE,exports.ShapeBpmnElementKind.GATEWAY_COMPLEX]),eventDefinitionKinds=Object.values(exports.ShapeBpmnEventDefinitionKind).filter((t=>t!=exports.ShapeBpmnEventDefinitionKind.NONE));var AssociationDirectionKind,FlowKind,MessageVisibleKind,SequenceFlowKind;exports.AssociationDirectionKind=void 0,AssociationDirectionKind=exports.AssociationDirectionKind||(exports.AssociationDirectionKind={}),AssociationDirectionKind.NONE="None",AssociationDirectionKind.ONE="One",AssociationDirectionKind.BOTH="Both",exports.FlowKind=void 0,FlowKind=exports.FlowKind||(exports.FlowKind={}),FlowKind.SEQUENCE_FLOW="sequenceFlow",FlowKind.MESSAGE_FLOW="messageFlow",FlowKind.ASSOCIATION_FLOW="association",exports.MessageVisibleKind=void 0,MessageVisibleKind=exports.MessageVisibleKind||(exports.MessageVisibleKind={}),MessageVisibleKind.NONE="none",MessageVisibleKind.INITIATING="initiating",MessageVisibleKind.NON_INITIATING="non_initiating",exports.SequenceFlowKind=void 0,SequenceFlowKind=exports.SequenceFlowKind||(exports.SequenceFlowKind={}),SequenceFlowKind.NORMAL="normal",SequenceFlowKind.DEFAULT="default",SequenceFlowKind.CONDITIONAL_FROM_ACTIVITY="conditional_from_activity",SequenceFlowKind.CONDITIONAL_FROM_GATEWAY="conditional_from_gateway";class Flow{constructor(t,e,n,i,s){Object.defineProperty(this,"id",{enumerable:!0,configurable:!0,writable:!0,value:t}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:e}),Object.defineProperty(this,"kind",{enumerable:!0,configurable:!0,writable:!0,value:n}),Object.defineProperty(this,"sourceReferenceId",{enumerable:!0,configurable:!0,writable:!0,value:i}),Object.defineProperty(this,"targetReferenceId",{enumerable:!0,configurable:!0,writable:!0,value:s})}}class SequenceFlow extends Flow{constructor(t,e,n,i,s=exports.SequenceFlowKind.NORMAL){super(t,e,exports.FlowKind.SEQUENCE_FLOW,n,i),Object.defineProperty(this,"sequenceFlowKind",{enumerable:!0,configurable:!0,writable:!0,value:s})}}class MessageFlow extends Flow{constructor(t,e,n,i){super(t,e,exports.FlowKind.MESSAGE_FLOW,n,i)}}class AssociationFlow extends Flow{constructor(t,e,n,i,s=exports.AssociationDirectionKind.NONE){super(t,e,exports.FlowKind.ASSOCIATION_FLOW,n,i),Object.defineProperty(this,"associationDirectionKind",{enumerable:!0,configurable:!0,writable:!0,value:s})}}function getDefaultExportFromCjs(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}var build$1={exports:{}},build=build$1.exports,hasRequiredBuild;function requireBuild(){return hasRequiredBuild||(hasRequiredBuild=1,function(module){!function(t,e){module.exports?module.exports=e():t.mxgraph=e()}(build,(function(){return function(opts){for(var name in opts)this[name]=opts[name];var __mxOutput={},mxClient={VERSION:"4.2.2",IS_IE:null!=navigator.userAgent&&navigator.userAgent.indexOf("MSIE")>=0,IS_IE6:null!=navigator.userAgent&&navigator.userAgent.indexOf("MSIE 6")>=0,IS_IE11:null!=navigator.userAgent&&!!navigator.userAgent.match(/Trident\/7\./),IS_EDGE:null!=navigator.userAgent&&!!navigator.userAgent.match(/Edge\//),IS_QUIRKS:null!=navigator.userAgent&&navigator.userAgent.indexOf("MSIE")>=0&&(null==document.documentMode||5==document.documentMode),IS_EM:"spellcheck"in document.createElement("textarea")&&8==document.documentMode,VML_PREFIX:"v",OFFICE_PREFIX:"o",IS_NS:null!=navigator.userAgent&&navigator.userAgent.indexOf("Mozilla/")>=0&&navigator.userAgent.indexOf("MSIE")<0&&navigator.userAgent.indexOf("Edge/")<0,IS_OP:null!=navigator.userAgent&&(navigator.userAgent.indexOf("Opera/")>=0||navigator.userAgent.indexOf("OPR/")>=0),IS_OT:null!=navigator.userAgent&&navigator.userAgent.indexOf("Presto/")>=0&&navigator.userAgent.indexOf("Presto/2.4.")<0&&navigator.userAgent.indexOf("Presto/2.3.")<0&&navigator.userAgent.indexOf("Presto/2.2.")<0&&navigator.userAgent.indexOf("Presto/2.1.")<0&&navigator.userAgent.indexOf("Presto/2.0.")<0&&navigator.userAgent.indexOf("Presto/1.")<0,IS_SF:/Apple Computer, Inc/.test(navigator.vendor),IS_ANDROID:navigator.appVersion.indexOf("Android")>=0,IS_IOS:/iP(hone|od|ad)/.test(navigator.platform),IS_GC:/Google Inc/.test(navigator.vendor),IS_CHROMEAPP:null!=window.chrome&&null!=chrome.app&&null!=chrome.app.runtime,IS_FF:"undefined"!=typeof InstallTrigger,IS_MT:navigator.userAgent.indexOf("Firefox/")>=0&&navigator.userAgent.indexOf("Firefox/1.")<0&&navigator.userAgent.indexOf("Firefox/2.")<0||navigator.userAgent.indexOf("Iceweasel/")>=0&&navigator.userAgent.indexOf("Iceweasel/1.")<0&&navigator.userAgent.indexOf("Iceweasel/2.")<0||navigator.userAgent.indexOf("SeaMonkey/")>=0&&navigator.userAgent.indexOf("SeaMonkey/1.")<0||navigator.userAgent.indexOf("Iceape/")>=0&&navigator.userAgent.indexOf("Iceape/1.")<0,IS_VML:"MICROSOFT INTERNET EXPLORER"==navigator.appName.toUpperCase(),IS_SVG:"MICROSOFT INTERNET EXPLORER"!=navigator.appName.toUpperCase(),NO_FO:!document.createElementNS||"[object SVGForeignObjectElement]"!=document.createElementNS("http://www.w3.org/2000/svg","foreignObject")||navigator.userAgent.indexOf("Opera/")>=0,IS_WIN:navigator.appVersion.indexOf("Win")>0,IS_MAC:navigator.appVersion.indexOf("Mac")>0,IS_CHROMEOS:/\bCrOS\b/.test(navigator.appVersion),IS_TOUCH:"ontouchstart"in document.documentElement,IS_POINTER:null!=window.PointerEvent&&!(navigator.appVersion.indexOf("Mac")>0),IS_LOCAL:document.location.href.indexOf("http://")<0&&document.location.href.indexOf("https://")<0,defaultBundles:[],isBrowserSupported:function(){return mxClient.IS_VML||mxClient.IS_SVG},link:function(t,e,n,i){if(n=n||document,mxClient.IS_IE6)n.write('<link rel="'+t+'" href="'+e+'" charset="UTF-8" type="text/css"/>');else{var s=n.createElement("link");s.setAttribute("rel",t),s.setAttribute("href",e),s.setAttribute("charset","UTF-8"),s.setAttribute("type","text/css"),i&&s.setAttribute("id",i),n.getElementsByTagName("head")[0].appendChild(s)}},loadResources:function(t,e){var n=mxClient.defaultBundles.length;function i(){0==--n&&t()}for(var s=0;s<mxClient.defaultBundles.length;s++)mxResources.add(mxClient.defaultBundles[s],e,i)},include:function(t){document.write('<script src="'+t+'"><\/script>')}},node;"undefined"==typeof mxLoadResources&&(mxLoadResources=!0),"undefined"==typeof mxForceIncludes&&(mxForceIncludes=!1),"undefined"==typeof mxResourceExtension&&(mxResourceExtension=".txt"),"undefined"==typeof mxLoadStylesheets&&(mxLoadStylesheets=!0),"undefined"!=typeof mxBasePath&&mxBasePath.length>0?("/"==mxBasePath.substring(mxBasePath.length-1)&&(mxBasePath=mxBasePath.substring(0,mxBasePath.length-1)),mxClient.basePath=mxBasePath):mxClient.basePath=".","undefined"!=typeof mxImageBasePath&&mxImageBasePath.length>0?("/"==mxImageBasePath.substring(mxImageBasePath.length-1)&&(mxImageBasePath=mxImageBasePath.substring(0,mxImageBasePath.length-1)),mxClient.imageBasePath=mxImageBasePath):mxClient.imageBasePath=mxClient.basePath+"/images","undefined"!=typeof mxLanguage&&null!=mxLanguage?mxClient.language=mxLanguage:mxClient.language=mxClient.IS_IE?navigator.userLanguage:navigator.language,"undefined"!=typeof mxDefaultLanguage&&null!=mxDefaultLanguage?mxClient.defaultLanguage=mxDefaultLanguage:mxClient.defaultLanguage="en",mxLoadStylesheets&&mxClient.link("stylesheet",mxClient.basePath+"/css/common.css"),"undefined"!=typeof mxLanguages&&null!=mxLanguages&&(mxClient.languages=mxLanguages),mxClient.IS_VML&&(mxClient.IS_SVG?mxClient.IS_VML=!1:(null!=document.namespaces&&(8==document.documentMode?(document.namespaces.add(mxClient.VML_PREFIX,"urn:schemas-microsoft-com:vml","#default#VML"),document.namespaces.add(mxClient.OFFICE_PREFIX,"urn:schemas-microsoft-com:office:office","#default#VML")):(document.namespaces.add(mxClient.VML_PREFIX,"urn:schemas-microsoft-com:vml"),document.namespaces.add(mxClient.OFFICE_PREFIX,"urn:schemas-microsoft-com:office:office"))),mxClient.IS_QUIRKS&&document.styleSheets.length>=30?(node=document.createElement("style"),node.type="text/css",node.styleSheet.cssText=mxClient.VML_PREFIX+"\\:*{behavior:url(#default#VML)}"+mxClient.OFFICE_PREFIX+"\\:*{behavior:url(#default#VML)}",document.getElementsByTagName("head")[0].appendChild(node)):document.createStyleSheet().cssText=mxClient.VML_PREFIX+"\\:*{behavior:url(#default#VML)}"+mxClient.OFFICE_PREFIX+"\\:*{behavior:url(#default#VML)}",mxLoadStylesheets&&mxClient.link("stylesheet",mxClient.basePath+"/css/explorer.css"))),(mxForceIncludes||null==module.exports)&&(mxClient.include(mxClient.basePath+"/js/util/mxLog.js"),mxClient.include(mxClient.basePath+"/js/util/mxObjectIdentity.js"),mxClient.include(mxClient.basePath+"/js/util/mxDictionary.js"),mxClient.include(mxClient.basePath+"/js/util/mxResources.js"),mxClient.include(mxClient.basePath+"/js/util/mxPoint.js"),mxClient.include(mxClient.basePath+"/js/util/mxRectangle.js"),mxClient.include(mxClient.basePath+"/js/util/mxEffects.js"),mxClient.include(mxClient.basePath+"/js/util/mxUtils.js"),mxClient.include(mxClient.basePath+"/js/util/mxConstants.js"),mxClient.include(mxClient.basePath+"/js/util/mxEventObject.js"),mxClient.include(mxClient.basePath+"/js/util/mxMouseEvent.js"),mxClient.include(mxClient.basePath+"/js/util/mxEventSource.js"),mxClient.include(mxClient.basePath+"/js/util/mxEvent.js"),mxClient.include(mxClient.basePath+"/js/util/mxXmlRequest.js"),mxClient.include(mxClient.basePath+"/js/util/mxClipboard.js"),mxClient.include(mxClient.basePath+"/js/util/mxWindow.js"),mxClient.include(mxClient.basePath+"/js/util/mxForm.js"),mxClient.include(mxClient.basePath+"/js/util/mxImage.js"),mxClient.include(mxClient.basePath+"/js/util/mxDivResizer.js"),mxClient.include(mxClient.basePath+"/js/util/mxDragSource.js"),mxClient.include(mxClient.basePath+"/js/util/mxToolbar.js"),mxClient.include(mxClient.basePath+"/js/util/mxUndoableEdit.js"),mxClient.include(mxClient.basePath+"/js/util/mxUndoManager.js"),mxClient.include(mxClient.basePath+"/js/util/mxUrlConverter.js"),mxClient.include(mxClient.basePath+"/js/util/mxPanningManager.js"),mxClient.include(mxClient.basePath+"/js/util/mxPopupMenu.js"),mxClient.include(mxClient.basePath+"/js/util/mxAutoSaveManager.js"),mxClient.include(mxClient.basePath+"/js/util/mxAnimation.js"),mxClient.include(mxClient.basePath+"/js/util/mxMorphing.js"),mxClient.include(mxClient.basePath+"/js/util/mxImageBundle.js"),mxClient.include(mxClient.basePath+"/js/util/mxImageExport.js"),mxClient.include(mxClient.basePath+"/js/util/mxAbstractCanvas2D.js"),mxClient.include(mxClient.basePath+"/js/util/mxXmlCanvas2D.js"),mxClient.include(mxClient.basePath+"/js/util/mxSvgCanvas2D.js"),mxClient.include(mxClient.basePath+"/js/util/mxVmlCanvas2D.js"),mxClient.include(mxClient.basePath+"/js/util/mxGuide.js"),mxClient.include(mxClient.basePath+"/js/shape/mxShape.js"),mxClient.include(mxClient.basePath+"/js/shape/mxStencil.js"),mxClient.include(mxClient.basePath+"/js/shape/mxStencilRegistry.js"),mxClient.include(mxClient.basePath+"/js/shape/mxMarker.js"),mxClient.include(mxClient.basePath+"/js/shape/mxActor.js"),mxClient.include(mxClient.basePath+"/js/shape/mxCloud.js"),mxClient.include(mxClient.basePath+"/js/shape/mxRectangleShape.js"),mxClient.include(mxClient.basePath+"/js/shape/mxEllipse.js"),mxClient.include(mxClient.basePath+"/js/shape/mxDoubleEllipse.js"),mxClient.include(mxClient.basePath+"/js/shape/mxRhombus.js"),mxClient.include(mxClient.basePath+"/js/shape/mxPolyline.js"),mxClient.include(mxClient.basePath+"/js/shape/mxArrow.js"),mxClient.include(mxClient.basePath+"/js/shape/mxArrowConnector.js"),mxClient.include(mxClient.basePath+"/js/shape/mxText.js"),mxClient.include(mxClient.basePath+"/js/shape/mxTriangle.js"),mxClient.include(mxClient.basePath+"/js/shape/mxHexagon.js"),mxClient.include(mxClient.basePath+"/js/shape/mxLine.js"),mxClient.include(mxClient.basePath+"/js/shape/mxImageShape.js"),mxClient.include(mxClient.basePath+"/js/shape/mxLabel.js"),mxClient.include(mxClient.basePath+"/js/shape/mxCylinder.js"),mxClient.include(mxClient.basePath+"/js/shape/mxConnector.js"),mxClient.include(mxClient.basePath+"/js/shape/mxSwimlane.js"),mxClient.include(mxClient.basePath+"/js/layout/mxGraphLayout.js"),mxClient.include(mxClient.basePath+"/js/layout/mxStackLayout.js"),mxClient.include(mxClient.basePath+"/js/layout/mxPartitionLayout.js"),mxClient.include(mxClient.basePath+"/js/layout/mxCompactTreeLayout.js"),mxClient.include(mxClient.basePath+"/js/layout/mxRadialTreeLayout.js"),mxClient.include(mxClient.basePath+"/js/layout/mxFastOrganicLayout.js"),mxClient.include(mxClient.basePath+"/js/layout/mxCircleLayout.js"),mxClient.include(mxClient.basePath+"/js/layout/mxParallelEdgeLayout.js"),mxClient.include(mxClient.basePath+"/js/layout/mxCompositeLayout.js"),mxClient.include(mxClient.basePath+"/js/layout/mxEdgeLabelLayout.js"),mxClient.include(mxClient.basePath+"/js/layout/hierarchical/model/mxGraphAbstractHierarchyCell.js"),mxClient.include(mxClient.basePath+"/js/layout/hierarchical/model/mxGraphHierarchyNode.js"),mxClient.include(mxClient.basePath+"/js/layout/hierarchical/model/mxGraphHierarchyEdge.js"),mxClient.include(mxClient.basePath+"/js/layout/hierarchical/model/mxGraphHierarchyModel.js"),mxClient.include(mxClient.basePath+"/js/layout/hierarchical/model/mxSwimlaneModel.js"),mxClient.include(mxClient.basePath+"/js/layout/hierarchical/stage/mxHierarchicalLayoutStage.js"),mxClient.include(mxClient.basePath+"/js/layout/hierarchical/stage/mxMedianHybridCrossingReduction.js"),mxClient.include(mxClient.basePath+"/js/layout/hierarchical/stage/mxMinimumCycleRemover.js"),mxClient.include(mxClient.basePath+"/js/layout/hierarchical/stage/mxCoordinateAssignment.js"),mxClient.include(mxClient.basePath+"/js/layout/hierarchical/stage/mxSwimlaneOrdering.js"),mxClient.include(mxClient.basePath+"/js/layout/hierarchical/mxHierarchicalLayout.js"),mxClient.include(mxClient.basePath+"/js/layout/hierarchical/mxSwimlaneLayout.js"),mxClient.include(mxClient.basePath+"/js/model/mxGraphModel.js"),mxClient.include(mxClient.basePath+"/js/model/mxCell.js"),mxClient.include(mxClient.basePath+"/js/model/mxGeometry.js"),mxClient.include(mxClient.basePath+"/js/model/mxCellPath.js"),mxClient.include(mxClient.basePath+"/js/view/mxPerimeter.js"),mxClient.include(mxClient.basePath+"/js/view/mxPrintPreview.js"),mxClient.include(mxClient.basePath+"/js/view/mxStylesheet.js"),mxClient.include(mxClient.basePath+"/js/view/mxCellState.js"),mxClient.include(mxClient.basePath+"/js/view/mxGraphSelectionModel.js"),mxClient.include(mxClient.basePath+"/js/view/mxCellEditor.js"),mxClient.include(mxClient.basePath+"/js/view/mxCellRenderer.js"),mxClient.include(mxClient.basePath+"/js/view/mxEdgeStyle.js"),mxClient.include(mxClient.basePath+"/js/view/mxStyleRegistry.js"),mxClient.include(mxClient.basePath+"/js/view/mxGraphView.js"),mxClient.include(mxClient.basePath+"/js/view/mxGraph.js"),mxClient.include(mxClient.basePath+"/js/view/mxCellOverlay.js"),mxClient.include(mxClient.basePath+"/js/view/mxOutline.js"),mxClient.include(mxClient.basePath+"/js/view/mxMultiplicity.js"),mxClient.include(mxClient.basePath+"/js/view/mxLayoutManager.js"),mxClient.include(mxClient.basePath+"/js/view/mxSwimlaneManager.js"),mxClient.include(mxClient.basePath+"/js/view/mxTemporaryCellStates.js"),mxClient.include(mxClient.basePath+"/js/view/mxCellStatePreview.js"),mxClient.include(mxClient.basePath+"/js/view/mxConnectionConstraint.js"),mxClient.include(mxClient.basePath+"/js/handler/mxGraphHandler.js"),mxClient.include(mxClient.basePath+"/js/handler/mxPanningHandler.js"),mxClient.include(mxClient.basePath+"/js/handler/mxPopupMenuHandler.js"),mxClient.include(mxClient.basePath+"/js/handler/mxCellMarker.js"),mxClient.include(mxClient.basePath+"/js/handler/mxSelectionCellsHandler.js"),mxClient.include(mxClient.basePath+"/js/handler/mxConnectionHandler.js"),mxClient.include(mxClient.basePath+"/js/handler/mxConstraintHandler.js"),mxClient.include(mxClient.basePath+"/js/handler/mxRubberband.js"),mxClient.include(mxClient.basePath+"/js/handler/mxHandle.js"),mxClient.include(mxClient.basePath+"/js/handler/mxVertexHandler.js"),mxClient.include(mxClient.basePath+"/js/handler/mxEdgeHandler.js"),mxClient.include(mxClient.basePath+"/js/handler/mxElbowEdgeHandler.js"),mxClient.include(mxClient.basePath+"/js/handler/mxEdgeSegmentHandler.js"),mxClient.include(mxClient.basePath+"/js/handler/mxKeyHandler.js"),mxClient.include(mxClient.basePath+"/js/handler/mxTooltipHandler.js"),mxClient.include(mxClient.basePath+"/js/handler/mxCellTracker.js"),mxClient.include(mxClient.basePath+"/js/handler/mxCellHighlight.js"),mxClient.include(mxClient.basePath+"/js/editor/mxDefaultKeyHandler.js"),mxClient.include(mxClient.basePath+"/js/editor/mxDefaultPopupMenu.js"),mxClient.include(mxClient.basePath+"/js/editor/mxDefaultToolbar.js"),mxClient.include(mxClient.basePath+"/js/editor/mxEditor.js"),mxClient.include(mxClient.basePath+"/js/io/mxCodecRegistry.js"),mxClient.include(mxClient.basePath+"/js/io/mxCodec.js"),mxClient.include(mxClient.basePath+"/js/io/mxObjectCodec.js"),mxClient.include(mxClient.basePath+"/js/io/mxCellCodec.js"),mxClient.include(mxClient.basePath+"/js/io/mxModelCodec.js"),mxClient.include(mxClient.basePath+"/js/io/mxRootChangeCodec.js"),mxClient.include(mxClient.basePath+"/js/io/mxChildChangeCodec.js"),mxClient.include(mxClient.basePath+"/js/io/mxTerminalChangeCodec.js"),mxClient.include(mxClient.basePath+"/js/io/mxGenericChangeCodec.js"),mxClient.include(mxClient.basePath+"/js/io/mxGraphCodec.js"),mxClient.include(mxClient.basePath+"/js/io/mxGraphViewCodec.js"),mxClient.include(mxClient.basePath+"/js/io/mxStylesheetCodec.js"),mxClient.include(mxClient.basePath+"/js/io/mxDefaultKeyHandlerCodec.js"),mxClient.include(mxClient.basePath+"/js/io/mxDefaultToolbarCodec.js"),mxClient.include(mxClient.basePath+"/js/io/mxDefaultPopupMenuCodec.js"),mxClient.include(mxClient.basePath+"/js/io/mxEditorCodec.js")),__mxOutput.mxClient=void 0!==mxClient?mxClient:void 0;var mxLog={consoleName:"Console",TRACE:!1,DEBUG:!0,WARN:!0,buffer:"",init:function(){if(null==mxLog.window&&null!=document.body){var t=mxLog.consoleName+" - mxGraph "+mxClient.VERSION,e=document.createElement("table");e.setAttribute("width","100%"),e.setAttribute("height","100%");var n=document.createElement("tbody"),i=document.createElement("tr"),s=document.createElement("td");s.style.verticalAlign="top",mxLog.textarea=document.createElement("textarea"),mxLog.textarea.setAttribute("wrap","off"),mxLog.textarea.setAttribute("readOnly","true"),mxLog.textarea.style.height="100%",mxLog.textarea.style.resize="none",mxLog.textarea.value=mxLog.buffer,mxClient.IS_NS&&"BackCompat"!=document.compatMode?mxLog.textarea.style.width="99%":mxLog.textarea.style.width="100%",s.appendChild(mxLog.textarea),i.appendChild(s),n.appendChild(i),i=document.createElement("tr"),mxLog.td=document.createElement("td"),mxLog.td.style.verticalAlign="top",mxLog.td.setAttribute("height","30px"),i.appendChild(mxLog.td),n.appendChild(i),e.appendChild(n),mxLog.addButton("Info",(function(t){mxLog.info()})),mxLog.addButton("DOM",(function(t){var e=mxUtils.getInnerHtml(document.body);mxLog.debug(e)})),mxLog.addButton("Trace",(function(t){mxLog.TRACE=!mxLog.TRACE,mxLog.TRACE?mxLog.debug("Tracing enabled"):mxLog.debug("Tracing disabled")})),mxLog.addButton("Copy",(function(t){try{mxUtils.copy(mxLog.textarea.value)}catch(t){mxUtils.alert(t)}})),mxLog.addButton("Show",(function(t){try{mxUtils.popup(mxLog.textarea.value)}catch(t){mxUtils.alert(t)}})),mxLog.addButton("Clear",(function(t){mxLog.textarea.value=""}));var r=0,o=0;if("number"==typeof window.innerWidth?(r=window.innerHeight,o=window.innerWidth):(r=document.documentElement.clientHeight||document.body.clientHeight,o=document.body.clientWidth),mxLog.window=new mxWindow(t,e,Math.max(0,o-320),Math.max(0,r-210),300,160),mxLog.window.setMaximizable(!0),mxLog.window.setScrollable(!1),mxLog.window.setResizable(!0),mxLog.window.setClosable(!0),mxLog.window.destroyOnClose=!1,(mxClient.IS_NS||mxClient.IS_IE)&&!mxClient.IS_GC&&!mxClient.IS_SF&&"BackCompat"!=document.compatMode||11==document.documentMode){var l=mxLog.window.getElement(),a=function(t,e){mxLog.textarea.style.height=Math.max(0,l.offsetHeight-70)+"px"};mxLog.window.addListener(mxEvent.RESIZE_END,a),mxLog.window.addListener(mxEvent.MAXIMIZE,a),mxLog.window.addListener(mxEvent.NORMALIZE,a),mxLog.textarea.style.height="92px"}}},info:function(){mxLog.writeln(mxUtils.toString(navigator))},addButton:function(t,e){var n=document.createElement("button");mxUtils.write(n,t),mxEvent.addListener(n,"click",e),mxLog.td.appendChild(n)},isVisible:function(){return null!=mxLog.window&&mxLog.window.isVisible()},show:function(){mxLog.setVisible(!0)},setVisible:function(t){null==mxLog.window&&mxLog.init(),null!=mxLog.window&&mxLog.window.setVisible(t)},enter:function(t){if(mxLog.TRACE)return mxLog.writeln("Entering "+t),(new Date).getTime()},leave:function(t,e){if(mxLog.TRACE){var n=0!=e?" ("+((new Date).getTime()-e)+" ms)":"";mxLog.writeln("Leaving "+t+n)}},debug:function(){mxLog.DEBUG&&mxLog.writeln.apply(this,arguments)},warn:function(){mxLog.WARN&&mxLog.writeln.apply(this,arguments)},write:function(){for(var t="",e=0;e<arguments.length;e++)t+=arguments[e],e<arguments.length-1&&(t+=" ");null!=mxLog.textarea?(mxLog.textarea.value=mxLog.textarea.value+t,null!=navigator.userAgent&&navigator.userAgent.indexOf("Presto/2.5")>=0&&(mxLog.textarea.style.visibility="hidden",mxLog.textarea.style.visibility="visible"),mxLog.textarea.scrollTop=mxLog.textarea.scrollHeight):mxLog.buffer+=t},writeln:function(){for(var t="",e=0;e<arguments.length;e++)t+=arguments[e],e<arguments.length-1&&(t+=" ");mxLog.write(t+"\n")}};__mxOutput.mxLog=void 0!==mxLog?mxLog:void 0;var mxObjectIdentity={FIELD_NAME:"mxObjectId",counter:0,get:function(t){if(null!=t){if(null==t[mxObjectIdentity.FIELD_NAME])if("object"==typeof t){var e=mxUtils.getFunctionName(t.constructor);t[mxObjectIdentity.FIELD_NAME]=e+"#"+mxObjectIdentity.counter++}else"function"==typeof t&&(t[mxObjectIdentity.FIELD_NAME]="Function#"+mxObjectIdentity.counter++);return t[mxObjectIdentity.FIELD_NAME]}return null},clear:function(t){"object"!=typeof t&&"function"!=typeof t||delete t[mxObjectIdentity.FIELD_NAME]}};function mxDictionary(){this.clear()}__mxOutput.mxObjectIdentity=void 0!==mxObjectIdentity?mxObjectIdentity:void 0,mxDictionary.prototype.map=null,mxDictionary.prototype.clear=function(){this.map={}},mxDictionary.prototype.get=function(t){var e=mxObjectIdentity.get(t);return this.map[e]},mxDictionary.prototype.put=function(t,e){var n=mxObjectIdentity.get(t),i=this.map[n];return this.map[n]=e,i},mxDictionary.prototype.remove=function(t){var e=mxObjectIdentity.get(t),n=this.map[e];return delete this.map[e],n},mxDictionary.prototype.getKeys=function(){var t=[];for(var e in this.map)t.push(e);return t},mxDictionary.prototype.getValues=function(){var t=[];for(var e in this.map)t.push(this.map[e]);return t},mxDictionary.prototype.visit=function(t){for(var e in this.map)t(e,this.map[e])},__mxOutput.mxDictionary=void 0!==mxDictionary?mxDictionary:void 0;var mxResources={resources:{},extension:mxResourceExtension,resourcesEncoded:!1,loadDefaultBundle:!0,loadSpecialBundle:!0,isLanguageSupported:function(t){return null==mxClient.languages||mxUtils.indexOf(mxClient.languages,t)>=0},getDefaultBundle:function(t,e){return mxResources.loadDefaultBundle||!mxResources.isLanguageSupported(e)?t+mxResources.extension:null},getSpecialBundle:function(t,e){if(null==mxClient.languages||!this.isLanguageSupported(e)){var n=e.indexOf("-");n>0&&(e=e.substring(0,n))}return mxResources.loadSpecialBundle&&mxResources.isLanguageSupported(e)&&e!=mxClient.defaultLanguage?t+"_"+e+mxResources.extension:null},add:function(t,e,n){if((e=null!=e?e:null!=mxClient.language?mxClient.language.toLowerCase():mxConstants.NONE)!=mxConstants.NONE){var i=mxResources.getDefaultBundle(t,e),s=mxResources.getSpecialBundle(t,e),r=function(){if(null!=s)if(n)mxUtils.get(s,(function(t){mxResources.parse(t.getText()),n()}),(function(){n()}));else try{var t=mxUtils.load(s);t.isReady()&&mxResources.parse(t.getText())}catch(t){}else null!=n&&n()};if(null!=i)if(n)mxUtils.get(i,(function(t){mxResources.parse(t.getText()),r()}),(function(){r()}));else try{var o=mxUtils.load(i);o.isReady()&&mxResources.parse(o.getText()),r()}catch(t){}else r()}},parse:function(t){if(null!=t)for(var e=t.split("\n"),n=0;n<e.length;n++)if("#"!=e[n].charAt(0)){var i=e[n].indexOf("=");if(i>0){var s=e[n].substring(0,i),r=e[n].length;13==e[n].charCodeAt(r-1)&&r--;var o=e[n].substring(i+1,r);this.resourcesEncoded?(o=o.replace(/\\(?=u[a-fA-F\d]{4})/g,"%"),mxResources.resources[s]=unescape(o)):mxResources.resources[s]=o}}},get:function(t,e,n){var i=mxResources.resources[t];return null==i&&(i=n),null!=i&&null!=e&&(i=mxResources.replacePlaceholders(i,e)),i},replacePlaceholders:function(t,e){for(var n=[],i=null,s=0;s<t.length;s++){var r=t.charAt(s);"{"==r?i="":null!=i&&"}"==r?((i=parseInt(i)-1)>=0&&i<e.length&&n.push(e[i]),i=null):null!=i?i+=r:n.push(r)}return n.join("")},loadResources:function(t){mxResources.add(mxClient.basePath+"/resources/editor",null,(function(){mxResources.add(mxClient.basePath+"/resources/graph",null,t)}))}};function mxPoint(t,e){this.x=null!=t?t:0,this.y=null!=e?e:0}function mxRectangle(t,e,n,i){mxPoint.call(this,t,e),this.width=null!=n?n:0,this.height=null!=i?i:0}__mxOutput.mxResources=void 0!==mxResources?mxResources:void 0,mxPoint.prototype.x=null,mxPoint.prototype.y=null,mxPoint.prototype.equals=function(t){return null!=t&&t.x==this.x&&t.y==this.y},mxPoint.prototype.clone=function(){return mxUtils.clone(this)},__mxOutput.mxPoint=void 0!==mxPoint?mxPoint:void 0,mxRectangle.prototype=new mxPoint,mxRectangle.prototype.constructor=mxRectangle,mxRectangle.prototype.width=null,mxRectangle.prototype.height=null,mxRectangle.prototype.setRect=function(t,e,n,i){this.x=t,this.y=e,this.width=n,this.height=i},mxRectangle.prototype.getCenterX=function(){return this.x+this.width/2},mxRectangle.prototype.getCenterY=function(){return this.y+this.height/2},mxRectangle.prototype.add=function(t){if(null!=t){var e=Math.min(this.x,t.x),n=Math.min(this.y,t.y),i=Math.max(this.x+this.width,t.x+t.width),s=Math.max(this.y+this.height,t.y+t.height);this.x=e,this.y=n,this.width=i-e,this.height=s-n}},mxRectangle.prototype.intersect=function(t){if(null!=t){var e=this.x+this.width,n=t.x+t.width,i=this.y+this.height,s=t.y+t.height;this.x=Math.max(this.x,t.x),this.y=Math.max(this.y,t.y),this.width=Math.min(e,n)-this.x,this.height=Math.min(i,s)-this.y}},mxRectangle.prototype.grow=function(t){return this.x-=t,this.y-=t,this.width+=2*t,this.height+=2*t,this},mxRectangle.prototype.getPoint=function(){return new mxPoint(this.x,this.y)},mxRectangle.prototype.rotate90=function(){var t=(this.width-this.height)/2;this.x+=t,this.y-=t;var e=this.width;this.width=this.height,this.height=e},mxRectangle.prototype.equals=function(t){return null!=t&&t.x==this.x&&t.y==this.y&&t.width==this.width&&t.height==this.height},mxRectangle.fromRectangle=function(t){return new mxRectangle(t.x,t.y,t.width,t.height)},__mxOutput.mxRectangle=void 0!==mxRectangle?mxRectangle:void 0;var mxEffects={animateChanges:function(t,e,n){var i=10,s=0,r=function(){for(var l=!1,a=0;a<e.length;a++){var h=e[a];if(h instanceof mxGeometryChange||h instanceof mxTerminalChange||h instanceof mxValueChange||h instanceof mxChildChange||h instanceof mxStyleChange){var u=t.getView().getState(h.cell||h.child,!1);if(null!=u)if(l=!0,h.constructor!=mxGeometryChange||t.model.isEdge(h.cell))mxUtils.setOpacity(u.shape.node,100*s/i);else{var d=t.getView().scale,p=(h.geometry.x-h.previous.x)*d,m=(h.geometry.y-h.previous.y)*d,c=(h.geometry.width-h.previous.width)*d,g=(h.geometry.height-h.previous.height)*d;0==s?(u.x-=p,u.y-=m,u.width-=c,u.height-=g):(u.x+=p/i,u.y+=m/i,u.width+=c/i,u.height+=g/i),t.cellRenderer.redraw(u),mxEffects.cascadeOpacity(t,h.cell,100*s/i)}}}s<i&&l?(s++,window.setTimeout(r,o)):null!=n&&n()},o=30;r()},cascadeOpacity:function(t,e,n){for(var i=t.model.getChildCount(e),s=0;s<i;s++){var r=t.model.getChildAt(e,s),o=t.getView().getState(r);null!=o&&(mxUtils.setOpacity(o.shape.node,n),mxEffects.cascadeOpacity(t,r,n))}var l=t.model.getEdges(e);if(null!=l)for(s=0;s<l.length;s++){var a=t.getView().getState(l[s]);null!=a&&mxUtils.setOpacity(a.shape.node,n)}},fadeOut:function(t,e,n,i,s,r){i=i||40,s=s||30;var o=e||100;if(mxUtils.setOpacity(t,o),r||null==r){var l=function(){o=Math.max(o-i,0),mxUtils.setOpacity(t,o),o>0?window.setTimeout(l,s):(t.style.visibility="hidden",n&&t.parentNode&&t.parentNode.removeChild(t))};window.setTimeout(l,s)}else t.style.visibility="hidden",n&&t.parentNode&&t.parentNode.removeChild(t)}};__mxOutput.mxEffects=void 0!==mxEffects?mxEffects:void 0;var mxUtils={errorResource:"none"!=mxClient.language?"error":"",closeResource:"none"!=mxClient.language?"close":"",errorImage:mxClient.imageBasePath+"/error.gif",removeCursors:function(t){null!=t.style&&(t.style.cursor="");var e=t.childNodes;if(null!=e)for(var n=e.length,i=0;i<n;i+=1)mxUtils.removeCursors(e[i])},getCurrentStyle:mxClient.IS_IE&&(null==document.documentMode||document.documentMode<9)?function(t){return null!=t?t.currentStyle:null}:function(t){return null!=t?window.getComputedStyle(t,""):null},parseCssNumber:function(t){return"thin"==t?t="2":"medium"==t?t="4":"thick"==t&&(t="6"),t=parseFloat(t),isNaN(t)&&(t=0),t},setPrefixedStyle:(prefix=null,mxClient.IS_OT?prefix="O":mxClient.IS_SF||mxClient.IS_GC?prefix="Webkit":mxClient.IS_MT?prefix="Moz":mxClient.IS_IE&&document.documentMode>=9&&document.documentMode<10&&(prefix="ms"),function(t,e,n){t[e]=n,null!=prefix&&e.length>0&&(t[e=prefix+e.substring(0,1).toUpperCase()+e.substring(1)]=n)}),hasScrollbars:function(t){var e=mxUtils.getCurrentStyle(t);return null!=e&&("scroll"==e.overflow||"auto"==e.overflow)},bind:function(t,e){return function(){return e.apply(t,arguments)}},eval:function(expr){var result=null;if(expr.indexOf("function")>=0)try{eval("var _mxJavaScriptExpression="+expr),result=_mxJavaScriptExpression,_mxJavaScriptExpression=null}catch(t){mxLog.warn(t.message+" while evaluating "+expr)}else try{result=eval(expr)}catch(t){mxLog.warn(t.message+" while evaluating "+expr)}return result},findNode:function(t,e,n){if(t.nodeType==mxConstants.NODETYPE_ELEMENT){var i=t.getAttribute(e);if(null!=i&&i==n)return t}for(t=t.firstChild;null!=t;){var s=mxUtils.findNode(t,e,n);if(null!=s)return s;t=t.nextSibling}return null},getFunctionName:function(t){var e=null;if(null!=t)if(null!=t.name)e=t.name;else if(e=mxUtils.trim(t.toString()),/^function\s/.test(e)){var n=(e=mxUtils.ltrim(e.substring(9))).indexOf("(");n>0&&(e=e.substring(0,n))}return e},indexOf:function(t,e){if(null!=t&&null!=e)for(var n=0;n<t.length;n++)if(t[n]==e)return n;return-1},forEach:function(t,e){if(null!=t&&null!=e)for(var n=0;n<t.length;n++)e(t[n]);return t},remove:function(t,e){var n=null;if("object"==typeof e)for(var i=mxUtils.indexOf(e,t);i>=0;)e.splice(i,1),n=t,i=mxUtils.indexOf(e,t);for(var s in e)e[s]==t&&(delete e[s],n=t);return n},isNode:function(t,e,n,i){return!(null==t||isNaN(t.nodeType)||null!=e&&t.nodeName.toLowerCase()!=e.toLowerCase())&&(null==n||t.getAttribute(n)==i)},isAncestorNode:function(t,e){for(var n=e;null!=n;){if(n==t)return!0;n=n.parentNode}return!1},getChildNodes:function(t,e){e=e||mxConstants.NODETYPE_ELEMENT;for(var n=[],i=t.firstChild;null!=i;)i.nodeType==e&&n.push(i),i=i.nextSibling;return n},importNode:function(t,e,n){return mxClient.IS_IE&&(null==document.documentMode||document.documentMode<10)?mxUtils.importNodeImplementation(t,e,n):t.importNode(e,n)},importNodeImplementation:function(t,e,n){switch(e.nodeType){case 1:var i=t.createElement(e.nodeName);if(e.attributes&&e.attributes.length>0)for(var s=0;s<e.attributes.length;s++)i.setAttribute(e.attributes[s].nodeName,e.getAttribute(e.attributes[s].nodeName));if(n&&e.childNodes&&e.childNodes.length>0)for(s=0;s<e.childNodes.length;s++)i.appendChild(mxUtils.importNodeImplementation(t,e.childNodes[s],n));return i;case 3:case 4:case 8:return t.createTextNode(null!=e.nodeValue?e.nodeValue:e.value)}},createXmlDocument:function(){var t=null;return document.implementation&&document.implementation.createDocument?t=document.implementation.createDocument("","",null):"ActiveXObject"in window&&(t=mxUtils.createMsXmlDocument()),t},createMsXmlDocument:function(){var t=new ActiveXObject("Microsoft.XMLDOM");return t.async=!1,t.validateOnParse=!1,t.resolveExternals=!1,t},parseXml:window.DOMParser?function(t){return(new DOMParser).parseFromString(t,"text/xml")}:function(t){var e=mxUtils.createMsXmlDocument();return e.loadXML(t),e},clearSelection:document.selection?function(){document.selection.empty()}:window.getSelection?function(){window.getSelection().empty?window.getSelection().empty():window.getSelection().removeAllRanges&&window.getSelection().removeAllRanges()}:function(){},removeWhitespace:function(t,e){for(var n=e?t.previousSibling:t.nextSibling;null!=n&&n.nodeType==mxConstants.NODETYPE_TEXT;){var i=e?n.previousSibling:n.nextSibling,s=mxUtils.getTextContent(n);0==mxUtils.trim(s).length&&n.parentNode.removeChild(n),n=i}},htmlEntities:function(t,e){return t=(t=(t=(t=(t=(t=String(t||"")).replace(/&/g,"&")).replace(/"/g,""")).replace(/\'/g,"'")).replace(/</g,"<")).replace(/>/g,">"),(null==e||e)&&(t=t.replace(/\n/g,"
")),t},isVml:function(t){return null!=t&&"urn:schemas-microsoft-com:vml"==t.tagUrn},getXml:function(t,e){var n="";if(mxClient.IS_IE||mxClient.IS_IE11)n=mxUtils.getPrettyXml(t,"","","");else if(null!=window.XMLSerializer){n=(new XMLSerializer).serializeToString(t)}else null!=t.xml&&(n=t.xml.replace(/\r\n\t[\t]*/g,"").replace(/>\r\n/g,">").replace(/\r\n/g,"\n"));return e=e||"
",n=n.replace(/\n/g,e)},getPrettyXml:function(t,e,n,i,s){var r=[];if(null!=t)if(e=null!=e?e:" ",n=null!=n?n:"",i=null!=i?i:"\n",null!=t.namespaceURI&&t.namespaceURI!=s&&(s=t.namespaceURI,null==t.getAttribute("xmlns")&&t.setAttribute("xmlns",t.namespaceURI)),t.nodeType==mxConstants.NODETYPE_DOCUMENT)r.push(mxUtils.getPrettyXml(t.documentElement,e,n,i,s));else if(t.nodeType==mxConstants.NODETYPE_DOCUMENT_FRAGMENT){if(null!=(l=t.firstChild))for(;null!=l;)r.push(mxUtils.getPrettyXml(l,e,n,i,s)),l=l.nextSibling}else if(t.nodeType==mxConstants.NODETYPE_COMMENT){(o=mxUtils.getTextContent(t)).length>0&&r.push(n+"\x3c!--"+o+"--\x3e"+i)}else if(t.nodeType==mxConstants.NODETYPE_TEXT){(o=mxUtils.trim(mxUtils.getTextContent(t))).length>0&&r.push(n+mxUtils.htmlEntities(o,!1)+i)}else if(t.nodeType==mxConstants.NODETYPE_CDATA){var o;(o=mxUtils.getTextContent(t)).length>0&&r.push(n+"<![CDATA["+o+"]]"+i)}else{r.push(n+"<"+t.nodeName);var l,a=t.attributes;if(null!=a)for(var h=0;h<a.length;h++){var u=mxUtils.htmlEntities(a[h].value);r.push(" "+a[h].nodeName+'="'+u+'"')}if(null!=(l=t.firstChild)){for(r.push(">"+i);null!=l;)r.push(mxUtils.getPrettyXml(l,e,n+e,i,s)),l=l.nextSibling;r.push(n+"</"+t.nodeName+">"+i)}else r.push(" />"+i)}return r.join("")},extractTextWithWhitespace:function(t){var e=["BLOCKQUOTE","DIV","H1","H2","H3","H4","H5","H6","OL","P","PRE","TABLE","UL"],n=[];return function t(i){if(1!=i.length||"BR"!=i[0].nodeName&&"\n"!=i[0].innerHTML)for(var s=0;s<i.length;s++){var r=i[s];"BR"==r.nodeName||"\n"==r.innerHTML||(1==i.length||0==s)&&"DIV"==r.nodeName&&"<br>"==r.innerHTML.toLowerCase()?n.push("\n"):(3===r.nodeType||4===r.nodeType?r.nodeValue.length>0&&n.push(r.nodeValue):8!==r.nodeType&&r.childNodes.length>0&&t(r.childNodes),s<i.length-1&&mxUtils.indexOf(e,i[s+1].nodeName)>=0&&n.push("\n"))}}(t),n.join("")},replaceTrailingNewlines:function(t,e){for(var n="";t.length>0&&"\n"==t.charAt(t.length-1);)t=t.substring(0,t.length-1),n+=e;return t+n},getTextContent:function(t){return mxClient.IS_IE&&void 0!==t.innerText?t.innerText:null!=t?t[void 0===t.textContent?"text":"textContent"]:""},setTextContent:function(t,e){void 0!==t.innerText?t.innerText=e:t[void 0===t.textContent?"text":"textContent"]=e},getInnerHtml:mxClient.IS_IE?function(t){return null!=t?t.innerHTML:""}:function(t){return null!=t?(new XMLSerializer).serializeToString(t):""},getOuterHtml:mxClient.IS_IE?function(t){if(null!=t){if(null!=t.outerHTML)return t.outerHTML;var e=[];e.push("<"+t.nodeName);var n=t.attributes;if(null!=n)for(var i=0;i<n.length;i++){var s=n[i].value;null!=s&&s.length>0&&(e.push(" "),e.push(n[i].nodeName),e.push('="'),e.push(s),e.push('"'))}return 0==t.innerHTML.length?e.push("/>"):(e.push(">"),e.push(t.innerHTML),e.push("</"+t.nodeName+">")),e.join("")}return""}:function(t){return null!=t?(new XMLSerializer).serializeToString(t):""},write:function(t,e){var n=t.ownerDocument.createTextNode(e);return null!=t&&t.appendChild(n),n},writeln:function(t,e){var n=t.ownerDocument.createTextNode(e);return null!=t&&(t.appendChild(n),t.appendChild(document.createElement("br"))),n},br:function(t,e){e=e||1;for(var n=null,i=0;i<e;i++)null!=t&&(n=t.ownerDocument.createElement("br"),t.appendChild(n));return n},button:function(t,e,n){var i=(n=null!=n?n:document).createElement("button");return mxUtils.write(i,t),mxEvent.addListener(i,"click",(function(t){e(t)})),i},para:function(t,e){var n=document.createElement("p");return mxUtils.write(n,e),null!=t&&t.appendChild(n),n},addTransparentBackgroundFilter:function(t){t.style.filter+="progid:DXImageTransform.Microsoft.AlphaImageLoader(src='"+mxClient.imageBasePath+"/transparent.gif', sizingMethod='scale')"},linkAction:function(t,e,n,i,s){return mxUtils.link(t,e,(function(){n.execute(i)}),s)},linkInvoke:function(t,e,n,i,s,r){return mxUtils.link(t,e,(function(){n[i](s)}),r)},link:function(t,e,n,i){var s=document.createElement("span");return s.style.color="blue",s.style.textDecoration="underline",s.style.cursor="pointer",null!=i&&(s.style.paddingLeft=i+"px"),mxEvent.addListener(s,"click",n),mxUtils.write(s,e),null!=t&&t.appendChild(s),s},getDocumentSize:function(){var t=document.body,e=document.documentElement;try{return new mxRectangle(0,0,t.clientWidth||e.clientWidth,Math.max(t.clientHeight||0,e.clientHeight))}catch(t){return new mxRectangle}},fit:function(t){var e=mxUtils.getDocumentSize(),n=parseInt(t.offsetLeft),i=parseInt(t.offsetWidth),s=mxUtils.getDocumentScrollOrigin(t.ownerDocument),r=s.x,o=s.y,l=r+e.width;n+i>l&&(t.style.left=Math.max(r,l-i)+"px");var a=parseInt(t.offsetTop),h=parseInt(t.offsetHeight),u=o+e.height;a+h>u&&(t.style.top=Math.max(o,u-h)+"px")},load:function(t){var e=new mxXmlRequest(t,null,"GET",!1);return e.send(),e},get:function(t,e,n,i,s,r,o){var l=new mxXmlRequest(t,null,"GET"),a=l.setRequestHeaders;return o&&(l.setRequestHeaders=function(t,e){for(var n in a.apply(this,arguments),o)t.setRequestHeader(n,o[n])}),null!=i&&l.setBinary(i),l.send(e,n,s,r),l},getAll:function(t,e,n){for(var i=t.length,s=[],r=0,o=function(){0==r&&null!=n&&n(),r++},l=0;l<t.length;l++)!function(t,n){mxUtils.get(t,(function(t){var r=t.getStatus();r<200||r>299?o():(s[n]=t,0==--i&&e(s))}),o)}(t[l],l);0==i&&e(s)},post:function(t,e,n,i){return new mxXmlRequest(t,e).send(n,i)},submit:function(t,e,n,i){return new mxXmlRequest(t,e).simulate(n,i)},loadInto:function(t,e,n){mxClient.IS_IE?e.onreadystatechange=function(){4==e.readyState&&n()}:e.addEventListener("load",n,!1),e.load(t)},getValue:function(t,e,n){var i=null!=t?t[e]:null;return null==i&&(i=n),i},getNumber:function(t,e,n){var i=null!=t?t[e]:null;return null==i&&(i=n||0),Number(i)},getColor:function(t,e,n){var i=null!=t?t[e]:null;return null==i?i=n:i==mxConstants.NONE&&(i=null),i},clone:function(t,e,n){n=null!=n&&n;var i=null;if(null!=t&&"function"==typeof t.constructor)for(var s in i=new t.constructor,t)s!=mxObjectIdentity.FIELD_NAME&&(null==e||mxUtils.indexOf(e,s)<0)&&(n||"object"!=typeof t[s]?i[s]=t[s]:i[s]=mxUtils.clone(t[s]));return i},equalPoints:function(t,e){if(null==t&&null!=e||null!=t&&null==e||null!=t&&null!=e&&t.length!=e.length)return!1;if(null!=t&&null!=e)for(var n=0;n<t.length;n++)if(null!=t[n]&&null==e[n]||null==t[n]&&null!=e[n]||null!=t[n]&&null!=e[n]&&(t[n].x!=e[n].x||t[n].y!=e[n].y))return!1;return!0},equalEntries:function(t,e){var n=0;if(null==t&&null!=e||null!=t&&null==e||null!=t&&null!=e&&t.length!=e.length)return!1;if(null!=t&&null!=e){for(var i in e)n++;for(var i in t)if(n--,!(mxUtils.isNaN(t[i])&&mxUtils.isNaN(e[i])||t[i]==e[i]))return!1}return 0==n},removeDuplicates:function(t){for(var e=new mxDictionary,n=[],i=0;i<t.length;i++)e.get(t[i])||(n.push(t[i]),e.put(t[i],!0));return n},isNaN:function(t){return"number"==typeof t&&isNaN(t)},extend:function(t,e){var n=function(){};n.prototype=e.prototype,t.prototype=new n,t.prototype.constructor=t},toString:function(t){var e="";for(var n in t)try{if(null==t[n])e+=n+" = [null]\n";else if("function"==typeof t[n])e+=n+" => [Function]\n";else if("object"==typeof t[n]){e+=n+" => ["+mxUtils.getFunctionName(t[n].constructor)+"]\n"}else e+=n+" = "+t[n]+"\n"}catch(t){e+=n+"="+t.message}return e},toRadians:function(t){return Math.PI*t/180},toDegree:function(t){return 180*t/Math.PI},arcToCurves:function(t,e,n,i,s,r,o,l,a){if(l-=t,a-=e,0===n||0===i)return j;var h=o,u=s;n=Math.abs(n),i=Math.abs(i);var d,p=-l/2,m=-a/2,c=Math.cos(u*Math.PI/180),g=Math.sin(u*Math.PI/180),x=c*p+g*m,y=-1*g*p+c*m,f=x*x,v=y*y,C=n*n,E=i*i,S=f/C+v/E;if(S>1)n=Math.sqrt(S)*n,i=Math.sqrt(S)*i,d=0;else{var b=1;r===h&&(b=-1),d=b*Math.sqrt((C*E-C*v-E*f)/(C*v+E*f))}var T=d*n*y/i,w=-1*d*i*x/n,L=c*T-g*w+l/2,I=g*T+c*w+a/2,O=Math.atan2((y-w)/i,(x-T)/n)-Math.atan2(0,1),A=O>=0?O:2*Math.PI+O,P=(O=Math.atan2((-y-w)/i,(-x-T)/n)-Math.atan2((y-w)/i,(x-T)/n))>=0?O:2*Math.PI+O;0==h&&P>0?P-=2*Math.PI:0!=h&&P<0&&(P+=2*Math.PI);for(var _=2*P/Math.PI,R=Math.ceil(_<0?-1*_:_),M=P/R,N=8/3*Math.sin(M/4)*Math.sin(M/4)/Math.sin(M/2),D=c*n,H=c*i,G=g*n,U=g*i,V=Math.cos(A),B=Math.sin(A),F=-N*(D*B+U*V),k=-N*(G*B-H*V),Y=0,z=0,j=[],K=0;K<R;++K){A+=M,Y=D*(V=Math.cos(A))-U*(B=Math.sin(A))+L,z=G*V+H*B+I;var W=-N*(D*B+U*V),X=-N*(G*B-H*V),Z=6*K;j[Z]=Number(F+t),j[Z+1]=Number(k+e),j[Z+2]=Number(Y-W+t),j[Z+3]=Number(z-X+e),j[Z+4]=Number(Y+t),j[Z+5]=Number(z+e),F=Y+W,k=z+X}return j},getBoundingBox:function(t,e,n){var i=null;if(null!=t&&null!=e&&0!=e){var s=mxUtils.toRadians(e),r=Math.cos(s),o=Math.sin(s);n=null!=n?n:new mxPoint(t.x+t.width/2,t.y+t.height/2);var l=new mxPoint(t.x,t.y),a=new mxPoint(t.x+t.width,t.y),h=new mxPoint(a.x,t.y+t.height),u=new mxPoint(t.x,h.y);l=mxUtils.getRotatedPoint(l,r,o,n),a=mxUtils.getRotatedPoint(a,r,o,n),h=mxUtils.getRotatedPoint(h,r,o,n),u=mxUtils.getRotatedPoint(u,r,o,n),(i=new mxRectangle(l.x,l.y,0,0)).add(new mxRectangle(a.x,a.y,0,0)),i.add(new mxRectangle(h.x,h.y,0,0)),i.add(new mxRectangle(u.x,u.y,0,0))}return i},getRotatedPoint:function(t,e,n,i){i=null!=i?i:new mxPoint;var s=t.x-i.x,r=t.y-i.y,o=r*e+s*n;return new mxPoint(s*e-r*n+i.x,o+i.y)},getPortConstraints:function(t,e,n,i){var s=mxUtils.getValue(t.style,mxConstants.STYLE_PORT_CONSTRAINT,mxUtils.getValue(e.style,n?mxConstants.STYLE_SOURCE_PORT_CONSTRAINT:mxConstants.STYLE_TARGET_PORT_CONSTRAINT,null));if(null==s)return i;var r=s.toString(),o=mxConstants.DIRECTION_MASK_NONE,l=0;1==mxUtils.getValue(t.style,mxConstants.STYLE_PORT_CONSTRAINT_ROTATION,0)&&(l=mxUtils.getValue(t.style,mxConstants.STYLE_ROTATION,0));var a=0;if(l>45?(a=1,l>=1