UNPKG

@zklogic/draw.io

Version:

Draw.IO - Graph Editor integration in Angular-cli

1 lines 151 kB
!function(){"undefined"!=typeof html4&&(html4.ATTRIBS["span::data-lucid-content"]=0,html4.ATTRIBS["span::data-lucid-type"]=0,html4.ATTRIBS["font::data-font-src"]=0),Editor.prototype.appName="diagrams.net",Editor.prototype.diagramFileTypes=[{description:"diagramXmlDesc",extension:"drawio",mimeType:"text/xml"},{description:"diagramPngDesc",extension:"png",mimeType:"image/png"},{description:"diagramSvgDesc",extension:"svg",mimeType:"image/svg"},{description:"diagramHtmlDesc",extension:"html",mimeType:"text/html"},{description:"diagramXmlDesc",extension:"xml",mimeType:"text/xml"}],Editor.prototype.libraryFileTypes=[{description:"Library (.drawiolib, .xml)",extensions:["drawiolib","xml"]}],Editor.prototype.fileExtensions=[{ext:"html",title:"filetypeHtml"},{ext:"png",title:"filetypePng"},{ext:"svg",title:"filetypeSvg"}],Editor.styles=[{},{commonStyle:{fontColor:"#5C5C5C",strokeColor:"#006658",fillColor:"#21C0A5"}},{commonStyle:{fontColor:"#095C86",strokeColor:"#AF45ED",fillColor:"#F694C1"},edgeStyle:{strokeColor:"#60E696"}},{commonStyle:{fontColor:"#46495D",strokeColor:"#788AA3",fillColor:"#B2C9AB"}},{commonStyle:{fontColor:"#5AA9E6",strokeColor:"#FF6392",fillColor:"#FFE45E"}},{commonStyle:{fontColor:"#1D3557",strokeColor:"#457B9D",fillColor:"#A8DADC"},graph:{background:"#F1FAEE"}},{commonStyle:{fontColor:"#393C56",strokeColor:"#E07A5F",fillColor:"#F2CC8F"},graph:{background:"#F4F1DE",gridColor:"#D4D0C0"}},{commonStyle:{fontColor:"#143642",strokeColor:"#0F8B8D",fillColor:"#FAE5C7"},edgeStyle:{strokeColor:"#A8201A"},graph:{background:"#DAD2D8",gridColor:"#ABA4A9"}},{commonStyle:{fontColor:"#FEFAE0",strokeColor:"#DDA15E",fillColor:"#BC6C25"},graph:{background:"#283618",gridColor:"#48632C"}},{commonStyle:{fontColor:"#E4FDE1",strokeColor:"#028090",fillColor:"#F45B69"},graph:{background:"#114B5F",gridColor:"#0B3240"}},{},{vertexStyle:{strokeColor:"#D0CEE2",fillColor:"#FAD9D5"},edgeStyle:{strokeColor:"#09555B"},commonStyle:{fontColor:"#1A1A1A"}},{vertexStyle:{strokeColor:"#BAC8D3",fillColor:"#09555B",fontColor:"#EEEEEE"},edgeStyle:{strokeColor:"#0B4D6A"}},{vertexStyle:{strokeColor:"#D0CEE2",fillColor:"#5D7F99"},edgeStyle:{strokeColor:"#736CA8"},commonStyle:{fontColor:"#1A1A1A"}},{vertexStyle:{strokeColor:"#FFFFFF",fillColor:"#182E3E",fontColor:"#FFFFFF"},edgeStyle:{strokeColor:"#23445D"},graph:{background:"#FCE7CD",gridColor:"#CFBDA8"}},{vertexStyle:{strokeColor:"#FFFFFF",fillColor:"#F08E81"},edgeStyle:{strokeColor:"#182E3E"},commonStyle:{fontColor:"#1A1A1A"},graph:{background:"#B0E3E6",gridColor:"#87AEB0"}},{vertexStyle:{strokeColor:"#909090",fillColor:"#F5AB50"},edgeStyle:{strokeColor:"#182E3E"},commonStyle:{fontColor:"#1A1A1A"},graph:{background:"#EEEEEE"}},{vertexStyle:{strokeColor:"#EEEEEE",fillColor:"#56517E",fontColor:"#FFFFFF"},edgeStyle:{strokeColor:"#182E3E"},graph:{background:"#FAD9D5",gridColor:"#BFA6A3"}},{vertexStyle:{strokeColor:"#BAC8D3",fillColor:"#B1DDF0",fontColor:"#182E3E"},edgeStyle:{strokeColor:"#EEEEEE",fontColor:"#FFFFFF"},graph:{background:"#09555B",gridColor:"#13B4C2"}},{vertexStyle:{fillColor:"#EEEEEE",fontColor:"#1A1A1A"},edgeStyle:{fontColor:"#FFFFFF"},commonStyle:{strokeColor:"#FFFFFF"},graph:{background:"#182E3E",gridColor:"#4D94C7"}}],Editor.saveImage="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXd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9rZS13aWR0aD0iNiI+CiAgICAgICAgICAgICAgICA8YW5pbWF0ZVRyYW5zZm9ybQogICAgICAgICAgICAgICAgICAgIGF0dHJpYnV0ZU5hbWU9InRyYW5zZm9ybSIKICAgICAgICAgICAgICAgICAgICB0eXBlPSJyb3RhdGUiCiAgICAgICAgICAgICAgICAgICAgZnJvbT0iMCAxOCAxOCIKICAgICAgICAgICAgICAgICAgICB0bz0iMzYwIDE4IDE4IgogICAgICAgICAgICAgICAgICAgIGR1cj0iMC45cyIKICAgICAgICAgICAgICAgICAgICByZXBlYXRDb3VudD0iaW5kZWZpbml0ZSIgLz4KICAgICAgICAgICAgPC9wYXRoPgogICAgICAgICAgICA8Y2lyY2xlIGZpbGw9IiM4MDgwODAiIGN4PSIzNiIgY3k9IjE4IiByPSIxIj4KICAgICAgICAgICAgICAgIDxhbmltYXRlVHJhbnNmb3JtCiAgICAgICAgICAgICAgICAgICAgYXR0cmlidXRlTmFtZT0idHJhbnNmb3JtIgogICAgICAgICAgICAgICAgICAgIHR5cGU9InJvdGF0ZSIKICAgICAgICAgICAgICAgICAgICBmcm9tPSIwIDE4IDE4IgogICAgICAgICAgICAgICAgICAgIHRvPSIzNjAgMTggMTgiCiAgICAgICAgICAgICAgICAgICAgZHVyPSIwLjlzIgogICAgICAgICAgICAgICAgICAgIHJlcGVhdENvdW50PSJpbmRlZmluaXRlIiAvPgogICAgICAgICAgICA8L2NpcmNsZT4KICAgICAgICA8L2c+CiAgICA8L2c+Cjwvc3ZnPgo=",Editor.tweetImage=IMAGE_PATH+"/tweet.png",Editor.facebookImage=IMAGE_PATH+"/facebook.png",Editor.blankImage="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAACklEQVR4nGMAAQAABQABDQottAAAAABJRU5ErkJggg==",Editor.hiResImage=mxClient.IS_SVG?"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAFAAAAA+CAMAAACLMWy1AAAAh1BMVEUAAABMTExERER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cmcvMjAwMC9zdmciIGVuYWJsZS1iYWNrZ3JvdW5kPSJuZXcgMCAwIDI0IDI0IiBoZWlnaHQ9IjE4cHgiIHZpZXdCb3g9IjAgMCAyNCAyNCIgd2lkdGg9IjE4cHgiIGZpbGw9IiMwMDAwMDAiPjxnPjxwYXRoIGQ9Ik0wLDBoMjR2MjRIMFYweiIgZmlsbD0ibm9uZSIvPjwvZz48Zz48Zz48cGF0aCBkPSJNMjEuNDEsMTEuNDFsLTguODMtOC44M0MxMi4yMSwyLjIxLDExLjcsMiwxMS4xNywySDRDMi45LDIsMiwyLjksMiw0djcuMTdjMCwwLjUzLDAuMjEsMS4wNCwwLjU5LDEuNDFsOC44Myw4LjgzIGMwLjc4LDAuNzgsMi4wNSwwLjc4LDIuODMsMGw3LjE3LTcuMTdDMjIuMiwxMy40NiwyMi4yLDEyLjIsMjEuNDEsMTEuNDF6IE0xMi44MywyMEw0LDExLjE3VjRoNy4xN0wyMCwxMi44M0wxMi44MywyMHoiLz48Y2lyY2xlIGN4PSI2LjUiIGN5PSI2LjUiIHI9IjEuNSIvPjwvZz48L2c+PC9zdmc+",Editor.svgBrokenImage=Graph.createSvgImage(10,10,'<rect x="0" y="0" width="10" height="10" stroke="#000" fill="transparent"/><path d="m 0 0 L 10 10 L 0 10 L 10 0" stroke="#000" fill="transparent"/>'),Editor.errorImage="data:image/gif;base64,R0lGODlhEAAQAPcAAADGAIQAAISEhP8AAP///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////yH5BAEAAAAALAAAAAAQABAAAAhoAAEIFBigYMGBCAkGGMCQ4cGECxtKHBAAYUQCEzFSHLiQgMeGHjEGEAAg4oCQJz86LCkxpEqHAkwyRClxpEyXGmGaREmTIsmOL1GO/DkzI0yOE2sKIMlRJsWhCQHENDiUaVSpS5cmDAgAOw==",Editor.configurationKey=".configuration",Editor.settingsKey=".drawio-config",Editor.defaultCustomLibraries=[],Editor.enableCustomLibraries=!0,Editor.enableCustomProperties=!0,Editor.defaultIncludeDiagram=!0,Editor.enableServiceWorker="0"!=urlParams.pwa&&"serviceWorker"in navigator&&("1"==urlParams.offline||/.*\.diagrams\.net$/.test(window.location.hostname)||/.*\.draw\.io$/.test(window.location.hostname)),Editor.enableWebFonts="1"!=urlParams["safe-style-src"],Editor.enableShadowOption=!mxClient.IS_SF,Editor.enableExportUrl=!0,Editor.compressXml=!0,Editor.oneDriveInlinePicker=null==window.urlParams||"0"!=window.urlParams.inlinePicker,Editor.globalVars=null,Editor.config=null,Editor.configVersion=null,Editor.defaultBorder=5,Editor.commonProperties=[{name:"comic",dispName:"Comic",type:"bool",defVal:!1,isVisible:function(e,t){return"1"!=mxUtils.getValue(e.style,"sketch","0")}},{name:"jiggle",dispName:"Jiggle",type:"float",min:0,defVal:1,isVisible:function(e,t){return"1"==mxUtils.getValue(e.style,"comic","0")||"1"==mxUtils.getValue(e.style,"sketch","1"==urlParams.rough?"1":"0")}},{name:"fillWeight",dispName:"Fill Weight",type:"int",defVal:-1,isVisible:function(e,t){return"1"==mxUtils.getValue(e.style,"sketch","1"==urlParams.rough?"1":"0")}},{name:"hachureGap",dispName:"Hachure Gap",type:"int",defVal:-1,isVisible:function(e,t){return"1"==mxUtils.getValue(e.style,"sketch","1"==urlParams.rough?"1":"0")}},{name:"hachureAngle",dispName:"Hachure Angle",type:"int",defVal:-41,isVisible:function(e,t){return"1"==mxUtils.getValue(e.style,"sketch","1"==urlParams.rough?"1":"0")}},{name:"curveFitting",dispName:"Curve Fitting",type:"float",defVal:.95,isVisible:function(e,t){return"1"==mxUtils.getValue(e.style,"sketch","1"==urlParams.rough?"1":"0")}},{name:"simplification",dispName:"Simplification",type:"float",defVal:0,min:0,max:1,isVisible:function(e,t){return"1"==mxUtils.getValue(e.style,"sketch","1"==urlParams.rough?"1":"0")}},{name:"disableMultiStroke",dispName:"Disable Multi Stroke",type:"bool",defVal:!1,isVisible:function(e,t){return"1"==mxUtils.getValue(e.style,"sketch","1"==urlParams.rough?"1":"0")}},{name:"disableMultiStrokeFill",dispName:"Disable Multi Stroke Fill",type:"bool",defVal:!1,isVisible:function(e,t){return"1"==mxUtils.getValue(e.style,"sketch","1"==urlParams.rough?"1":"0")}},{name:"dashOffset",dispName:"Dash Offset",type:"int",defVal:-1,isVisible:function(e,t){return"1"==mxUtils.getValue(e.style,"sketch","1"==urlParams.rough?"1":"0")}},{name:"dashGap",dispName:"Dash Gap",type:"int",defVal:-1,isVisible:function(e,t){return"1"==mxUtils.getValue(e.style,"sketch","1"==urlParams.rough?"1":"0")}},{name:"zigzagOffset",dispName:"ZigZag Offset",type:"int",defVal:-1,isVisible:function(e,t){return"1"==mxUtils.getValue(e.style,"sketch","1"==urlParams.rough?"1":"0")}},{name:"jiggle",dispName:"Jiggle",type:"float",min:0,defVal:1,isVisible:function(e,t){return"1"==mxUtils.getValue(e.style,"comic","0")||"1"==mxUtils.getValue(e.style,"sketch","1"==urlParams.rough?"1":"0")}},{name:"sketchStyle",dispName:"Sketch Style",type:"enum",defVal:"rough",enumList:[{val:"rough",dispName:"Rough"},{val:"comic",dispName:"Comic"}],isVisible:function(e,t){return"1"==mxUtils.getValue(e.style,"sketch","1"==urlParams.rough?"1":"0")}}],Editor.commonEdgeProperties=[{type:"separator"},{name:"arcSize",dispName:"Arc Size",type:"float",min:0,defVal:mxConstants.LINE_ARCSIZE},{name:"sourcePortConstraint",dispName:"Source Constraint",type:"enum",defVal:"none",enumList:[{val:"none",dispName:"None"},{val:"north",dispName:"North"},{val:"east",dispName:"East"},{val:"south",dispName:"South"},{val:"west",dispName:"West"}]},{name:"targetPortConstraint",dispName:"Target Constraint",type:"enum",defVal:"none",enumList:[{val:"none",dispName:"None"},{val:"north",dispName:"North"},{val:"east",dispName:"East"},{val:"south",dispName:"South"},{val:"west",dispName:"West"}]},{name:"jettySize",dispName:"Jetty Size",type:"int",min:0,defVal:"auto",allowAuto:!0,isVisible:function(e){return"orthogonalEdgeStyle"==mxUtils.getValue(e.style,mxConstants.STYLE_EDGE,null)}},{name:"fillOpacity",dispName:"Fill Opacity",type:"int",min:0,max:100,defVal:100},{name:"strokeOpacity",dispName:"Stroke Opacity",type:"int",min:0,max:100,defVal:100},{name:"startFill",dispName:"Start Fill",type:"bool",defVal:!0},{name:"endFill",dispName:"End Fill",type:"bool",defVal:!0},{name:"perimeterSpacing",dispName:"Terminal Spacing",type:"float",defVal:0},{name:"anchorPointDirection",dispName:"Anchor Direction",type:"bool",defVal:!0},{name:"snapToPoint",dispName:"Snap to Point",type:"bool",defVal:!1},{name:"fixDash",dispName:"Fixed Dash",type:"bool",defVal:!1},{name:"editable",dispName:"Editable",type:"bool",defVal:!0},{name:"metaEdit",dispName:"Edit Dialog",type:"bool",defVal:!1},{name:"backgroundOutline",dispName:"Background Outline",type:"bool",defVal:!1},{name:"bendable",dispName:"Bendable",type:"bool",defVal:!0},{name:"movable",dispName:"Movable",type:"bool",defVal:!0},{name:"cloneable",dispName:"Cloneable",type:"bool",defVal:!0},{name:"deletable",dispName:"Deletable",type:"bool",defVal:!0},{name:"noJump",dispName:"No Jumps",type:"bool",defVal:!1},{name:"flowAnimation",dispName:"Flow Animation",type:"bool",defVal:!1},{name:"ignoreEdge",dispName:"Ignore Edge",type:"bool",defVal:!1},{name:"orthogonalLoop",dispName:"Loop Routing",type:"bool",defVal:!1},{name:"orthogonal",dispName:"Orthogonal",type:"bool",defVal:!1}].concat(Editor.commonProperties),Editor.commonVertexProperties=[{name:"colspan",dispName:"Colspan",type:"int",min:1,defVal:1,isVisible:function(e,t){var i=t.editorUi.editor.graph;return 1==e.vertices.length&&0==e.edges.length&&i.isTableCell(e.vertices[0])}},{name:"rowspan",dispName:"Rowspan",type:"int",min:1,defVal:1,isVisible:function(e,t){var i=t.editorUi.editor.graph;return 1==e.vertices.length&&0==e.edges.length&&i.isTableCell(e.vertices[0])}},{type:"separator"},{name:"resizeLastRow",dispName:"Resize Last Row",type:"bool",getDefaultValue:function(e,t){var i=1==e.vertices.length&&0==e.edges.length?e.vertices[0]:null,a=t.editorUi.editor.graph.getCellStyle(i);return"1"==mxUtils.getValue(a,"resizeLastRow","0")},isVisible:function(e,t){var i=t.editorUi.editor.graph;return 1==e.vertices.length&&0==e.edges.length&&i.isTable(e.vertices[0])}},{name:"resizeLast",dispName:"Resize Last Column",type:"bool",getDefaultValue:function(e,t){var i=1==e.vertices.length&&0==e.edges.length?e.vertices[0]:null,a=t.editorUi.editor.graph.getCellStyle(i);return"1"==mxUtils.getValue(a,"resizeLast","0")},isVisible:function(e,t){var i=t.editorUi.editor.graph;return 1==e.vertices.length&&0==e.edges.length&&i.isTable(e.vertices[0])}},{name:"fillOpacity",dispName:"Fill Opacity",type:"int",min:0,max:100,defVal:100},{name:"strokeOpacity",dispName:"Stroke Opacity",type:"int",min:0,max:100,defVal:100},{name:"overflow",dispName:"Text Overflow",defVal:"visible",type:"enum",enumList:[{val:"visible",dispName:"Visible"},{val:"hidden",dispName:"Hidden"},{val:"block",dispName:"Block"},{val:"fill",dispName:"Fill"},{val:"width",dispName:"Width"}]},{name:"noLabel",dispName:"Hide Label",type:"bool",defVal:!1},{name:"labelPadding",dispName:"Label Padding",type:"float",defVal:0},{name:"direction",dispName:"Direction",type:"enum",defVal:"east",enumList:[{val:"north",dispName:"North"},{val:"east",dispName:"East"},{val:"south",dispName:"South"},{val:"west",dispName:"West"}]},{name:"portConstraint",dispName:"Constraint",type:"enum",defVal:"none",enumList:[{val:"none",dispName:"None"},{val:"north",dispName:"North"},{val:"east",dispName:"East"},{val:"south",dispName:"South"},{val:"west",dispName:"West"}]},{name:"portConstraintRotation",dispName:"Rotate Constraint",type:"bool",defVal:!1},{name:"connectable",dispName:"Connectable",type:"bool",getDefaultValue:function(e,t){var i=e.vertices.length>0&&0==e.edges.length?e.vertices[0]:null;return t.editorUi.editor.graph.isCellConnectable(i)},isVisible:function(e,t){return e.vertices.length>0&&0==e.edges.length}},{name:"allowArrows",dispName:"Allow Arrows",type:"bool",defVal:!0},{name:"snapToPoint",dispName:"Snap to Point",type:"bool",defVal:!1},{name:"perimeter",dispName:"Perimeter",defVal:"none",type:"enum",enumList:[{val:"none",dispName:"None"},{val:"rectanglePerimeter",dispName:"Rectangle"},{val:"ellipsePerimeter",dispName:"Ellipse"},{val:"rhombusPerimeter",dispName:"Rhombus"},{val:"trianglePerimeter",dispName:"Triangle"},{val:"hexagonPerimeter2",dispName:"Hexagon"},{val:"lifelinePerimeter",dispName:"Lifeline"},{val:"orthogonalPerimeter",dispName:"Orthogonal"},{val:"backbonePerimeter",dispName:"Backbone"},{val:"calloutPerimeter",dispName:"Callout"},{val:"parallelogramPerimeter",dispName:"Parallelogram"},{val:"trapezoidPerimeter",dispName:"Trapezoid"},{val:"stepPerimeter",dispName:"Step"},{val:"centerPerimeter",dispName:"Center"}]},{name:"fixDash",dispName:"Fixed Dash",type:"bool",defVal:!1},{name:"autosize",dispName:"Autosize",type:"bool",defVal:!1},{name:"container",dispName:"Container",type:"bool",defVal:!1,isVisible:function(e,t){return 1==e.vertices.length&&0==e.edges.length}},{name:"dropTarget",dispName:"Drop Target",type:"bool",getDefaultValue:function(e,t){var i=1==e.vertices.length&&0==e.edges.length?e.vertices[0]:null,a=t.editorUi.editor.graph;return null!=i&&(a.isSwimlane(i)||a.model.getChildCount(i)>0)},isVisible:function(e,t){return 1==e.vertices.length&&0==e.edges.length}},{name:"collapsible",dispName:"Collapsible",type:"bool",getDefaultValue:function(e,t){var i=1==e.vertices.length&&0==e.edges.length?e.vertices[0]:null,a=t.editorUi.editor.graph;return null!=i&&(a.isContainer(i)&&"0"!=e.style.collapsible||!a.isContainer(i)&&"1"==e.style.collapsible)},isVisible:function(e,t){return 1==e.vertices.length&&0==e.edges.length}},{name:"recursiveResize",dispName:"Resize Children",type:"bool",defVal:!0,isVisible:function(e,t){return 1==e.vertices.length&&0==e.edges.length&&!t.editorUi.editor.graph.isSwimlane(e.vertices[0])&&null==mxUtils.getValue(e.style,"childLayout",null)}},{name:"expand",dispName:"Expand",type:"bool",defVal:!0},{name:"part",dispName:"Part",type:"bool",defVal:!1,isVisible:function(e,t){var i=t.editorUi.editor.graph.model;return e.vertices.length>0&&i.isVertex(i.getParent(e.vertices[0]))}},{name:"editable",dispName:"Editable",type:"bool",defVal:!0},{name:"metaEdit",dispName:"Edit Dialog",type:"bool",defVal:!1},{name:"backgroundOutline",dispName:"Background Outline",type:"bool",defVal:!1},{name:"movable",dispName:"Movable",type:"bool",defVal:!0},{name:"movableLabel",dispName:"Movable Label",type:"bool",defVal:!1,isVisible:function(e,t){var i=e.vertices.length>0?t.editorUi.editor.graph.getCellGeometry(e.vertices[0]):null;return null!=i&&!i.relative}},{name:"resizable",dispName:"Resizable",type:"bool",defVal:!0},{name:"resizeWidth",dispName:"Resize Width",type:"bool",defVal:!1},{name:"resizeHeight",dispName:"Resize Height",type:"bool",defVal:!1},{name:"rotatable",dispName:"Rotatable",type:"bool",defVal:!0},{name:"cloneable",dispName:"Cloneable",type:"bool",defVal:!0},{name:"deletable",dispName:"Deletable",type:"bool",defVal:!0},{name:"treeFolding",dispName:"Tree Folding",type:"bool",defVal:!1},{name:"treeMoving",dispName:"Tree Moving",type:"bool",defVal:!1},{name:"pointerEvents",dispName:"Pointer Events",type:"bool",defVal:!0,isVisible:function(e,t){var i=mxUtils.getValue(e.style,mxConstants.STYLE_FILLCOLOR,null);return t.editorUi.editor.graph.isSwimlane(e.vertices[0])||null==i||i==mxConstants.NONE||0==mxUtils.getValue(e.style,mxConstants.STYLE_FILL_OPACITY,100)||0==mxUtils.getValue(e.style,mxConstants.STYLE_OPACITY,100)||null!=e.style.pointerEvents}},{name:"moveCells",dispName:"Move Cells on Fold",type:"bool",defVal:!1,isVisible:function(e,t){return e.vertices.length>0&&t.editorUi.editor.graph.isContainer(e.vertices[0])}}].concat(Editor.commonProperties),Editor.defaultCsvValue='##\n## Example CSV import. Use ## for comments and # for configuration. Paste CSV below.\n## The following names are reserved and should not be used (or ignored):\n## id, tooltip, placeholder(s), link and label (see below)\n##\n#\n## Node label with placeholders and HTML.\n## Default is \'%name_of_first_column%\'.\n#\n# label: %name%<br><i style="color:gray;">%position%</i><br><a href="mailto:%email%">Email</a>\n#\n## Node style (placeholders are replaced once).\n## Default is the current style for nodes.\n#\n# style: label;image=%image%;whiteSpace=wrap;html=1;rounded=1;fillColor=%fill%;strokeColor=%stroke%;\n#\n## Parent style for nodes with child nodes (placeholders are replaced once).\n#\n# parentstyle: swimlane;whiteSpace=wrap;html=1;childLayout=stackLayout;horizontal=1;horizontalStack=0;resizeParent=1;resizeLast=0;collapsible=1;\n#\n## Optional column name that contains a reference to a named style in styles.\n## Default is the current style for nodes.\n#\n# stylename: -\n#\n## JSON for named styles of the form {"name": "style", "name": "style"} where style is a cell style with\n## placeholders that are replaced once.\n#\n# styles: -\n#\n## JSON for variables in styles of the form {"name": "value", "name": "value"} where name is a string\n## that will replace a placeholder in a style.\n#\n# vars: -\n#\n## Optional column name that contains a reference to a named label in labels.\n## Default is the current label.\n#\n# labelname: -\n#\n## JSON for named labels of the form {"name": "label", "name": "label"} where label is a cell label with\n## placeholders.\n#\n# labels: -\n#\n## Uses the given column name as the identity for cells (updates existing cells).\n## Default is no identity (empty value or -).\n#\n# identity: -\n#\n## Uses the given column name as the parent reference for cells. Default is no parent (empty or -).\n## The identity above is used for resolving the reference so it must be specified.\n#\n# parent: -\n#\n## Adds a prefix to the identity of cells to make sure they do not collide with existing cells (whose\n## IDs are numbers from 0..n, sometimes with a GUID prefix in the context of realtime collaboration).\n## Default is csvimport-.\n#\n# namespace: csvimport-\n#\n## Connections between rows ("from": source colum, "to": target column).\n## Label, style and invert are optional. Defaults are \'\', current style and false.\n## If placeholders are used in the style, they are replaced with data from the source.\n## An optional placeholders can be set to target to use data from the target instead.\n## In addition to label, an optional fromlabel and tolabel can be used to name the column\n## that contains the text for the label in the edges source or target (invert ignored).\n## In addition to those, an optional source and targetlabel can be used to specify a label\n## that contains placeholders referencing the respective columns in the source or target row.\n## The label is created in the form fromlabel + sourcelabel + label + tolabel + targetlabel.\n## Additional labels can be added by using an optional labels array with entries of the\n## form {"label": string, "x": number, "y": number, "dx": number, "dy": number} where\n## x is from -1 to 1 along the edge, y is orthogonal, and dx/dy are offsets in pixels.\n## An optional placeholders with the string value "source" or "target" can be specified\n## to replace placeholders in the additional label with data from the source or target.\n## The target column may contain a comma-separated list of values.\n## Multiple connect entries are allowed.\n#\n# connect: {"from": "manager", "to": "name", "invert": true, "label": "manages", \\\n#          "style": "curved=1;endArrow=blockThin;endFill=1;fontSize=11;"}\n# connect: {"from": "refs", "to": "id", "style": "curved=1;fontSize=11;"}\n#\n## Node x-coordinate. Possible value is a column name. Default is empty. Layouts will\n## override this value.\n#\n# left: \n#\n## Node y-coordinate. Possible value is a column name. Default is empty. Layouts will\n## override this value.\n#\n# top: \n#\n## Node width. Possible value is a number (in px), auto or an @ sign followed by a column\n## name that contains the value for the width. Default is auto.\n#\n# width: auto\n#\n## Node height. Possible value is a number (in px), auto or an @ sign followed by a column\n## name that contains the value for the height. Default is auto.\n#\n# height: auto\n#\n## Padding for autosize. Default is 0.\n#\n# padding: -12\n#\n## Comma-separated list of ignored columns for metadata. (These can be\n## used for connections and styles but will not be added as metadata.)\n#\n# ignore: id,image,fill,stroke,refs,manager\n#\n## Column to be renamed to link attribute (used as link).\n#\n# link: url\n#\n## Spacing between nodes. Default is 40.\n#\n# nodespacing: 40\n#\n## Spacing between levels of hierarchical layouts. Default is 100.\n#\n# levelspacing: 100\n#\n## Spacing between parallel edges. Default is 40. Use 0 to disable.\n#\n# edgespacing: 40\n#\n## Name or JSON of layout. Possible values are auto, none, verticaltree, horizontaltree,\n## verticalflow, horizontalflow, organic, circle or a JSON string as used in Layout, Apply.\n## Default is auto.\n#\n# layout: auto\n#\n## ---- CSV below this line. First line are column names. ----\nname,position,id,location,manager,email,fill,stroke,refs,url,image\nTessa Miller,CFO,emi,Office 1,,me@example.com,#dae8fc,#6c8ebf,,https://www.draw.io,https://cdn3.iconfinder.com/data/icons/user-avatars-1/512/users-3-128.png\nEdward Morrison,Brand Manager,emo,Office 2,Tessa Miller,me@example.com,#d5e8d4,#82b366,,https://www.draw.io,https://cdn3.iconfinder.com/data/icons/user-avatars-1/512/users-10-3-128.png\nAlison Donovan,System Admin,rdo,Office 3,Tessa Miller,me@example.com,#d5e8d4,#82b366,"emo,tva",https://www.draw.io,https://cdn3.iconfinder.com/data/icons/user-avatars-1/512/users-2-128.png\nEvan Valet,HR Director,tva,Office 4,Tessa Miller,me@example.com,#d5e8d4,#82b366,,https://www.draw.io,https://cdn3.iconfinder.com/data/icons/user-avatars-1/512/users-9-2-128.png\n',Editor.createRoughCanvas=function(e){var t=rough.canvas({getContext:function(){return e}});return t.draw=function(t){for(var i=t.sets||[],a=t.options||this.getDefaultOptions(),l=0;l<i.length;l++){var n=i[l];switch(n.type){case"path":null!=a.stroke&&this._drawToContext(e,n,a);break;case"fillPath":this._drawToContext(e,n,a);break;case"fillSketch":this.fillSketch(e,n,a)}}},t.fillSketch=function(t,i,a){var l=e.state.strokeColor,n=e.state.strokeWidth,r=e.state.strokeAlpha,o=e.state.dashed,s=a.fillWeight;s<0&&(s=a.strokeWidth/2),e.setStrokeAlpha(e.state.fillAlpha),e.setStrokeColor(a.fill||""),e.setStrokeWidth(s),e.setDashed(!1),this._drawToContext(t,i,a),e.setDashed(o),e.setStrokeWidth(n),e.setStrokeColor(l),e.setStrokeAlpha(r)},t._drawToContext=function(e,t,i){e.begin();for(var a=0;a<t.ops.length;a++){var l=t.ops[a],n=l.data;switch(l.op){case"move":e.moveTo(n[0],n[1]);break;case"bcurveTo":e.curveTo(n[0],n[1],n[2],n[3],n[4],n[5]);break;case"lineTo":e.lineTo(n[0],n[1])}}e.end(),"fillPath"===t.type&&i.filled?e.fill():e.stroke()},t},function(){function e(t,i,a){this.canvas=t,this.rc=i,this.shape=a,this.canvas.setLineJoin("round"),this.canvas.setLineCap("round"),this.originalBegin=this.canvas.begin,this.canvas.begin=mxUtils.bind(this,e.prototype.begin),this.originalEnd=this.canvas.end,this.canvas.end=mxUtils.bind(this,e.prototype.end),this.originalRect=this.canvas.rect,this.canvas.rect=mxUtils.bind(this,e.prototype.rect),this.originalRoundrect=this.canvas.roundrect,this.canvas.roundrect=mxUtils.bind(this,e.prototype.roundrect),this.originalEllipse=this.canvas.ellipse,this.canvas.ellipse=mxUtils.bind(this,e.prototype.ellipse),this.originalLineTo=this.canvas.lineTo,this.canvas.lineTo=mxUtils.bind(this,e.prototype.lineTo),this.originalMoveTo=this.canvas.moveTo,this.canvas.moveTo=mxUtils.bind(this,e.prototype.moveTo),this.originalQuadTo=this.canvas.quadTo,this.canvas.quadTo=mxUtils.bind(this,e.prototype.quadTo),this.originalCurveTo=this.canvas.curveTo,this.canvas.curveTo=mxUtils.bind(this,e.prototype.curveTo),this.originalArcTo=this.canvas.arcTo,this.canvas.arcTo=mxUtils.bind(this,e.prototype.arcTo),this.originalClose=this.canvas.close,this.canvas.close=mxUtils.bind(this,e.prototype.close),this.originalFill=this.canvas.fill,this.canvas.fill=mxUtils.bind(this,e.prototype.fill),this.originalStroke=this.canvas.stroke,this.canvas.stroke=mxUtils.bind(this,e.prototype.stroke),this.originalFillAndStroke=this.canvas.fillAndStroke,this.canvas.fillAndStroke=mxUtils.bind(this,e.prototype.fillAndStroke),this.path=[],this.passThrough=!1}e.prototype.moveOp="M",e.prototype.lineOp="L",e.prototype.quadOp="Q",e.prototype.curveOp="C",e.prototype.closeOp="Z",e.prototype.getStyle=function(e,t){var i=1;if(null!=this.shape.state){var a=this.shape.state.cell.id;if(null!=a)for(var l=0;l<a.length;l++)i=(i<<5)-i+a.charCodeAt(l)<<0}var n={strokeWidth:this.canvas.state.strokeWidth,seed:i,preserveVertices:!0},r=this.rc.getDefaultOptions();n.stroke=e?"none"===this.canvas.state.strokeColor?"transparent":this.canvas.state.strokeColor:"none";var o=null;n.filled=t,t?(n.fill="none"===this.canvas.state.fillColor?"":this.canvas.state.fillColor,o="none"===this.canvas.state.gradientColor?null:this.canvas.state.gradientColor):n.fill="",n.bowing=mxUtils.getValue(this.shape.style,"bowing",r.bowing),n.hachureAngle=mxUtils.getValue(this.shape.style,"hachureAngle",r.hachureAngle),n.curveFitting=mxUtils.getValue(this.shape.style,"curveFitting",r.curveFitting),n.roughness=mxUtils.getValue(this.shape.style,"jiggle",r.roughness),n.simplification=mxUtils.getValue(this.shape.style,"simplification",r.simplification),n.disableMultiStroke=mxUtils.getValue(this.shape.style,"disableMultiStroke",r.disableMultiStroke),n.disableMultiStrokeFill=mxUtils.getValue(this.shape.style,"disableMultiStrokeFill",r.disableMultiStrokeFill);var s=mxUtils.getValue(this.shape.style,"hachureGap",-1);n.hachureGap="auto"==s?-1:s,n.dashGap=mxUtils.getValue(this.shape.style,"dashGap",s),n.dashOffset=mxUtils.getValue(this.shape.style,"dashOffset",s),n.zigzagOffset=mxUtils.getValue(this.shape.style,"zigzagOffset",s);var d=mxUtils.getValue(this.shape.style,"fillWeight",-1);n.fillWeight="auto"==d?-1:d;var p=mxUtils.getValue(this.shape.style,"fillStyle","auto");if("auto"==p){var m=mxUtils.hex2rgb(null!=this.shape.state?this.shape.state.view.graph.shapeBackgroundColor:Editor.isDarkMode()?Editor.darkColor:"#ffffff");p=null!=n.fill&&(null!=o||null!=m&&n.fill==m)?"solid":r.fillStyle}return n.fillStyle=p,n},e.prototype.begin=function(){this.passThrough?this.originalBegin.apply(this.canvas,arguments):this.path=[]},e.prototype.end=function(){this.passThrough&&this.originalEnd.apply(this.canvas,arguments)},e.prototype.addOp=function(){if(null!=this.path&&(this.path.push(arguments[0]),arguments.length>2)){this.canvas.state;for(var e=2;e<arguments.length;e+=2)this.lastX=arguments[e-1],this.lastY=arguments[e],this.path.push(this.canvas.format(this.lastX)),this.path.push(this.canvas.format(this.lastY))}},e.prototype.lineTo=function(e,t){this.passThrough?this.originalLineTo.apply(this.canvas,arguments):(this.addOp(this.lineOp,e,t),this.lastX=e,this.lastY=t)},e.prototype.moveTo=function(e,t){this.passThrough?this.originalMoveTo.apply(this.canvas,arguments):(this.addOp(this.moveOp,e,t),this.lastX=e,this.lastY=t,this.firstX=e,this.firstY=t)},e.prototype.close=function(){this.passThrough?this.originalClose.apply(this.canvas,arguments):this.addOp(this.closeOp)},e.prototype.quadTo=function(e,t,i,a){this.passThrough?this.originalQuadTo.apply(this.canvas,arguments):(this.addOp(this.quadOp,e,t,i,a),this.lastX=i,this.lastY=a)},e.prototype.curveTo=function(e,t,i,a,l,n){this.passThrough?this.originalCurveTo.apply(this.canvas,arguments):(this.addOp(this.curveOp,e,t,i,a,l,n),this.lastX=l,this.lastY=n)},e.prototype.arcTo=function(e,t,i,a,l,n,r){if(this.passThrough)this.originalArcTo.apply(this.canvas,arguments);else{var o=mxUtils.arcToCurves(this.lastX,this.lastY,e,t,i,a,l,n,r);if(null!=o)for(var s=0;s<o.length;s+=6)this.curveTo(o[s],o[s+1],o[s+2],o[s+3],o[s+4],o[s+5]);this.lastX=n,this.lastY=r}},e.prototype.rect=function(e,t,i,a){this.passThrough?this.originalRect.apply(this.canvas,arguments):(this.path=[],this.nextShape=this.rc.generator.rectangle(e,t,i,a,this.getStyle(!0,!0)))},e.prototype.ellipse=function(e,t,i,a){this.passThrough?this.originalEllipse.apply(this.canvas,arguments):(this.path=[],this.nextShape=this.rc.generator.ellipse(e+i/2,t+a/2,i,a,this.getStyle(!0,!0)))},e.prototype.roundrect=function(e,t,i,a,l,n){this.passThrough?this.originalRoundrect.apply(this.canvas,arguments):(this.begin(),this.moveTo(e+l,t),this.lineTo(e+i-l,t),this.quadTo(e+i,t,e+i,t+n),this.lineTo(e+i,t+a-n),this.quadTo(e+i,t+a,e+i-l,t+a),this.lineTo(e+l,t+a),this.quadTo(e,t+a,e,t+a-n),this.lineTo(e,t+n),this.quadTo(e,t,e+l,t))},e.prototype.drawPath=function(e){if(this.path.length>0){this.passThrough=!0;try{this.rc.path(this.path.join(" "),e)}catch(e){}this.passThrough=!1}else if(null!=this.nextShape){for(var t in e)this.nextShape.options[t]=e[t];null==e.stroke&&delete this.nextShape.options.stroke,e.filled||delete this.nextShape.options.fill,this.passThrough=!0,this.rc.draw(this.nextShape),this.passThrough=!1}},e.prototype.stroke=function(){this.passThrough?this.originalStroke.apply(this.canvas,arguments):this.drawPath(this.getStyle(!0,!1))},e.prototype.fill=function(){this.passThrough?this.originalFill.apply(this.canvas,arguments):this.drawPath(this.getStyle(!1,!0))},e.prototype.fillAndStroke=function(){this.passThrough?this.originalFillAndStroke.apply(this.canvas,arguments):this.drawPath(this.getStyle(!0,!0))},e.prototype.destroy=function(){this.canvas.lineTo=this.originalLineTo,this.canvas.moveTo=this.originalMoveTo,this.canvas.close=this.originalClose,this.canvas.quadTo=this.originalQuadTo,this.canvas.curveTo=this.originalCurveTo,this.canvas.arcTo=this.originalArcTo,this.canvas.close=this.originalClose,this.canvas.fill=this.originalFill,this.canvas.stroke=this.originalStroke,this.canvas.fillAndStroke=this.originalFillAndStroke,this.canvas.begin=this.originalBegin,this.canvas.end=this.originalEnd,this.canvas.rect=this.originalRect,this.canvas.ellipse=this.originalEllipse,this.canvas.roundrect=this.originalRoundrect},mxShape.prototype.createRoughCanvas=function(t){return new e(t,Editor.createRoughCanvas(t),this)};var t=mxShape.prototype.createHandJiggle;mxShape.prototype.createHandJiggle=function(e){return this.outline||null==this.style||"0"==mxUtils.getValue(this.style,"sketch","0")?t.apply(this,arguments):"comic"==mxUtils.getValue(this.style,"sketchStyle","rough")?this.createComicCanvas(e):this.createRoughCanvas(e)};var i=mxShape.prototype.paint;mxShape.prototype.paint=function(t){var a=t.addTolerance,l=!0;if(null!=this.style&&(l="1"==mxUtils.getValue(this.style,mxConstants.STYLE_POINTER_EVENTS,"1")),null!=t.handJiggle&&t.handJiggle.constructor==e&&!this.outline){t.save();var n=this.fill,r=this.stroke;this.fill=null,this.stroke=null;var o=this.configurePointerEvents,s=t.setStrokeColor;t.setStrokeColor=function(){};var d=t.setFillColor;t.setFillColor=function(){},l||null==n||(this.configurePointerEvents=function(){}),t.handJiggle.passThrough=!0,i.apply(this,arguments),t.handJiggle.passThrough=!1,t.setFillColor=d,t.setStrokeColor=s,this.configurePointerEvents=o,this.stroke=r,this.fill=n,t.restore(),l&&null!=n&&(t.addTolerance=function(){})}i.apply(this,arguments),t.addTolerance=a};var a=mxShape.prototype.paintGlassEffect;mxShape.prototype.paintGlassEffect=function(t,i,l,n,r,o){null!=t.handJiggle&&t.handJiggle.constructor==e?(t.handJiggle.passThrough=!0,a.apply(this,arguments),t.handJiggle.passThrough=!1):a.apply(this,arguments)}}(),Editor.fastCompress=function(e){return null==e||0==e.length||"undefined"==typeof pako?e:Graph.arrayBufferToString(pako.deflateRaw(e))},Editor.fastDecompress=function(e){return null==e||0==e.length||"undefined"==typeof pako?e:pako.inflateRaw(Graph.stringToArrayBuffer(atob(e)),{to:"string"})},Editor.extractGraphModel=function(e,t,i){if(null!=e&&"undefined"!=typeof pako){var a=[];if(null!=(s=e.ownerDocument.getElementsByTagName("div"))&&s.length>0)for(var l=0;l<s.length;l++)if("mxgraph"==s[l].getAttribute("class")){a.push(s[l]);break}if(a.length>0)if(null!=(o=a[0].getAttribute("data-mxgraph"))){var n=JSON.parse(o);null!=n&&null!=n.xml&&(e=mxUtils.parseXml(n.xml).documentElement)}else{var r=a[0].getElementsByTagName("div");if(r.length>0){var o=mxUtils.getTextContent(r[0]);(o=Graph.decompress(o,null,i)).length>0&&(e=mxUtils.parseXml(o).documentElement)}}}if(null!=e&&"svg"==e.nodeName){var s;if(null!=(s=e.getAttribute("content"))&&"<"!=s.charAt(0)&&"%"!=s.charAt(0)&&(s=unescape(window.atob?atob(s):Base64.decode(cont,s))),null!=s&&"%"==s.charAt(0)&&(s=decodeURIComponent(s)),!(null!=s&&s.length>0))throw{message:mxResources.get("notADiagramFile")};e=mxUtils.parseXml(s).documentElement}if(null!=e&&!t){var d=null;if("diagram"==e.nodeName)d=e;else if("mxfile"==e.nodeName){var p=e.getElementsByTagName("diagram");p.length>0&&(d=p[Math.max(0,Math.min(p.length-1,urlParams.page||0))])}null!=d&&(e=Editor.parseDiagramNode(d,i))}return null==e||"mxGraphModel"==e.nodeName||t&&"mxfile"==e.nodeName||(e=null),e},Editor.parseDiagramNode=function(e,t){var i=mxUtils.trim(mxUtils.getTextContent(e)),a=null;if(i.length>0){var l=Graph.decompress(i,null,t);null!=l&&l.length>0&&(a=mxUtils.parseXml(l).documentElement)}else{var n=mxUtils.getChildNodes(e);if(n.length>0){var r=mxUtils.createXmlDocument();r.appendChild(r.importNode(n[0],!0)),a=r.documentElement}}return a},Editor.getDiagramNodeXml=function(e){var t=mxUtils.getTextContent(e),i=null;return t.length>0?i=Graph.decompress(t):null!=e.firstChild&&(i=mxUtils.getXml(e.firstChild)),i},Editor.extractGraphModelFromPdf=function(e){e=e.substring(e.indexOf(",")+1);var t=window.atob&&!mxClient.IS_SF?atob(e):Base64.decode(e,!0);if("%PDF-1.7"==t.substring(0,8)){var i=t.indexOf("EmbeddedFile");if(i>-1){var a=t.indexOf("stream",i)+9;if(t.substring(i,a).indexOf("application#2Fvnd.jgraph.mxfile")>0){var l=t.indexOf("endstream",a-1);return pako.inflateRaw(Graph.stringToArrayBuffer(t.substring(a,l)),{to:"string"})}}return null}for(var n="/Subject (%3Cmxfile",r=null,o="",s=0,d=0,p=[],m=null;d<t.length;){var u=t.charCodeAt(d);if(d+=1,10!=u&&(o+=String.fromCharCode(u)),u==n.charCodeAt(s)?s++:s=0,s==n.length){var h=t.indexOf("%3C%2Fmxfile%3E)",d)+15;if(h>(d-=9)){r=t.substring(d,h);break}}10==u&&("endobj"==o?m=null:"obj"==o.substring(o.length-3,o.length)||"xref"==o||"trailer"==o?(m=[],p[o.split(" ")[0]]=m):null!=m&&m.push(o),o="")}return null==r&&(r=Editor.extractGraphModelFromXref(p)),null!=r&&(r=decodeURIComponent(r.replace(/\\\(/g,"(").replace(/\\\)/g,")"))),r},Editor.extractGraphModelFromXref=function(e){var t=e.trailer,i=null;if(null!=t){var a=/.* \/Info (\d+) (\d+) R/g.exec(t.join("\n"));if(null!=a&&a.length>0){var l=e[a[1]];if(null!=l&&null!=(a=/.* \/Subject (\d+) (\d+) R/g.exec(l.join("\n")))&&a.length>0){var n=e[a[1]];null!=n&&(i=(n=n.join("\n")).substring(1,n.length-1))}}}return i},Editor.extractParserError=function(e,t){var i=null,a=null!=e?e.getElementsByTagName("parsererror"):null;if(null!=a&&a.length>0){i=t||mxResources.get("invalidChars");var l=a[0].getElementsByTagName("div");l.length>0&&(i=mxUtils.getTextContent(l[0]))}return null!=i?mxUtils.trim(i):i},Editor.addRetryToError=function(e,t){if(null!=e){var i=null!=e.error?e.error:e;null==i.retry&&(i.retry=t)}},Editor.configure=function(e,t){if(null!=e){if(Editor.config=e,Editor.configVersion=e.version,Menus.prototype.defaultFonts=e.defaultFonts||Menus.prototype.defaultFonts,ColorDialog.prototype.presetColors=e.presetColors||ColorDialog.prototype.presetColors,ColorDialog.prototype.defaultColors=e.defaultColors||ColorDialog.prototype.defaultColors,ColorDialog.prototype.colorNames=e.colorNames||ColorDialog.prototype.colorNames,StyleFormatPanel.prototype.defaultColorSchemes=e.defaultColorSchemes||StyleFormatPanel.prototype.defaultColorSchemes,Graph.prototype.defaultEdgeLength=e.defaultEdgeLength||Graph.prototype.defaultEdgeLength,DrawioFile.prototype.autosaveDelay=e.autosaveDelay||DrawioFile.prototype.autosaveDelay,null!=e.templateFile&&(EditorUi.templateFile=e.templateFile),null!=e.styles&&(Array.isArray(e.styles)?Editor.styles=e.styles:EditorUi.debug("Configuration Error: Array expected for styles")),null!=e.globalVars&&(Editor.globalVars=e.globalVars),null!=e.compressXml&&(Editor.compressXml=e.compressXml),null!=e.includeDiagram&&(Editor.defaultIncludeDiagram=e.includeDiagram),null!=e.simpleLabels&&(Editor.simpleLabels=e.simpleLabels),null!=e.oneDriveInlinePicker&&(Editor.oneDriveInlinePicker=e.oneDriveInlinePicker),null!=e.darkColor&&(Editor.darkColor=e.darkColor),null!=e.lightColor&&(Editor.lightColor=e.lightColor),null!=e.settingsName&&(Editor.configurationKey="."+e.settingsName+"-configuration",Editor.settingsKey="."+e.settingsName+"-config",mxSettings.key=Editor.settingsKey),e.customFonts&&(Menus.prototype.defaultFonts=e.customFonts.concat(Menus.prototype.defaultFonts)),e.customPresetColors&&(ColorDialog.prototype.presetColors=e.customPresetColors.concat(ColorDialog.prototype.presetColors)),null!=e.customColorSchemes&&(StyleFormatPanel.prototype.defaultColorSchemes=e.customColorSchemes.concat(StyleFormatPanel.prototype.defaultColorSchemes)),null!=e.css){var i=document.createElement("style");i.setAttribute("type","text/css"),i.appendChild(document.createTextNode(e.css));var a=document.getElementsByTagName("script")[0];a.parentNode.insertBefore(i,a)}if(null!=e.libraries&&(Sidebar.prototype.customEntries=e.libraries),null!=e.enabledLibraries&&(Array.isArray(e.enabledLibraries)?Sidebar.prototype.enabledLibraries=e.enabledLibraries:EditorUi.debug("Configuration Error: Array expected for enabledLibraries")),null!=e.defaultLibraries&&(Sidebar.prototype.defaultEntries=e.defaultLibraries),null!=e.defaultCustomLibraries&&(Editor.defaultCustomLibraries=e.defaultCustomLibraries),null!=e.enableCustomLibraries&&(Editor.enableCustomLibraries=e.enableCustomLibraries),null!=e.defaultVertexStyle&&(Graph.prototype.defaultVertexStyle=e.defaultVertexStyle),null!=e.defaultEdgeStyle&&(Graph.prototype.defaultEdgeStyle=e.defaultEdgeStyle),null!=e.defaultPageVisible&&(Graph.prototype.defaultPageVisible=e.defaultPageVisible),null!=e.defaultGridEnabled&&(Graph.prototype.defaultGridEnabled=e.defaultGridEnabled),null!=e.zoomWheel&&(Graph.zoomWheel=e.zoomWheel),null!=e.zoomFactor){var l=parseFloat(e.zoomFactor);!isNaN(l)&&l>1?Graph.prototype.zoomFactor=l:EditorUi.debug("Configuration Error: Float > 1 expected for zoomFactor")}if(null!=e.gridSteps&&(l=parseInt(e.gridSteps),!isNaN(l)&&l>0?mxGraphView.prototype.gridSteps=l:EditorUi.debug("Configuration Error: Int > 0 expected for gridSteps")),null!=e.pageFormat){var n=parseInt(e.pageFormat.width),r=parseInt(e.pageFormat.height);!isNaN(n)&&n>0&&!isNaN(r)&&r>0?(mxGraph.prototype.defaultPageFormat=new mxRectangle(0,0,n,r),mxGraph.prototype.pageFormat=mxGraph.prototype.defaultPageFormat):EditorUi.debug("Configuration Error: {width: int, height: int} expected for pageFormat")}if(e.thumbWidth&&(Sidebar.prototype.thumbWidth=e.thumbWidth),e.thumbHeight&&(Sidebar.prototype.thumbHeight=e.thumbHeight),e.emptyLibraryXml&&(EditorUi.prototype.emptyLibraryXml=e.emptyLibraryXml),e.emptyDiagramXml&&(EditorUi.prototype.emptyDiagramXml=e.emptyDiagramXml),e.sidebarWidth&&(EditorUi.prototype.hsplitPosition=e.sidebarWidth),e.sidebarTitles&&(Sidebar.prototype.sidebarTitles=e.sidebarTitles),e.sidebarTitleSize&&(l=parseInt(e.sidebarTitleSize),!isNaN(l)&&l>0?Sidebar.prototype.sidebarTitleSize=l:EditorUi.debug("Configuration Error: Int > 0 expected for sidebarTitleSize")),e.fontCss&&("string"==typeof e.fontCss?Editor.configureFontCss(e.fontCss):EditorUi.debug("Configuration Error: String expected for fontCss")),null!=e.autosaveDelay&&(l=parseInt(e.autosaveDelay),!isNaN(l)&&l>0?DrawioFile.prototype.autosaveDelay=l:EditorUi.debug("Configuration Error: Int > 0 expected for autosaveDelay")),null!=e.plugins&&!t){App.initPluginCallback();for(var o=0;o<e.plugins.length;o++)mxscript(e.plugins[o])}null!=e.maxImageBytes&&(EditorUi.prototype.maxImageBytes=e.maxImageBytes),null!=e.maxImageSize&&(EditorUi.prototype.maxImageSize=e.maxImageSize)}},Editor.configureFontCss=function(e){if(null!=e){Editor.prototype.fontCss=e;var t=document.getElementsByTagName("script")[0];if(null!=t&&null!=t.parentNode){var i=document.createElement("style");i.setAttribute("type","text/css"),i.appendChild(document.createTextNode(e)),t.parentNode.insertBefore(i,t);for(var a=e.split("url("),l=1;l<a.length;l++){var n=a[l].indexOf(")"),r=Editor.trimCssUrl(a[l].substring(0,n)),o=document.createElement("link");o.setAttribute("rel","preload"),o.setAttribute("href",r),o.setAttribute("as","font"),o.setAttribute("crossorigin",""),t.parentNode.insertBefore(o,t)}}}},Editor.trimCssUrl=function(e){return e.replace(new RegExp("^[\\s\"']+","g"),"").replace(new RegExp("[\\s\"']+$","g"),"")},Editor.GOOGLE_FONTS="https://fonts.googleapis.com/css?family=",Editor.GUID_ALPHABET="0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ-_",Editor.GUID_LENGTH=20,Editor.guid=function(e){for(var t=null!=e?e:Editor.GUID_LENGTH,i=[],a=0;a<t;a++)i.push(Editor.GUID_ALPHABET.charAt(Math.floor(Math.random()*Editor.GUID_ALPHABET.length)));return i.join("")},Editor.prototype.timeout=25e3,Editor.prototype.useForeignObjectForMath=!0,Editor.prototype.editButtonLink=null!=urlParams.edit?decodeURIComponent(urlParams.edit):null,Editor.prototype.crossOriginImages=!mxClient.IS_IE;var e=Editor.prototype.setGraphXml;Editor.prototype.setGraphXml=function(t){if(null==(t=null!=t&&"mxlibrary"!=t.nodeName?this.extractGraphModel(t):null))throw{message:mxResources.get("notADiagramFile")||"Invalid data",toString:function(){return this.message}};var i=t.getElementsByTagName("parsererror");if(null!=i&&i.length>0){var a=i[0],l=a.getElementsByTagName("div");throw null!=l&&l.length>0&&(a=l[0]),{message:mxUtils.getTextContent(a)}}if("mxGraphModel"==t.nodeName){var n=t.getAttribute("style")||"default-style2";if("1"==urlParams.embed||null!=n&&""!=n){if(n!=this.graph.currentStyle){var r;null!=(r=null!=this.graph.themes?this.graph.themes[n]:mxUtils.load(STYLE_PATH+"/"+n+".xml").getDocumentElement())&&new mxCodec(r.ownerDocument).decode(r,this.graph.getStylesheet())}}else null!=(r=null!=this.graph.themes?this.graph.themes["default-old"]:mxUtils.load(STYLE_PATH+"/default-old.xml").getDocumentElement())&&new mxCodec(r.ownerDocument).decode(r,this.graph.getStylesheet());this.graph.currentStyle=n,this.graph.mathEnabled="1"==urlParams.math||"1"==t.getAttribute("math");var o=t.getAttribute("backgroundImage");null!=o?this.graph.setBackgroundImage(this.graph.parseBackgroundImage(o)):this.graph.setBackgroundImage(null),mxClient.NO_FO=!(!this.graph.mathEnabled||this.useForeignObjectForMath)||this.originalNoForeignObject,this.graph.useCssTransforms=!mxClient.NO_FO&&this.isChromelessView()&&this.graph.isCssTransformsSupported(),this.graph.updateCssTransform(),this.graph.setShadowVisible("1"==t.getAttribute("shadow"),!1);var s=t.getAttribute("extFonts");if(s)try{s=s.split("|").map((function(e){var t=e.split("^");return{name:t[0],url:t[1]}}));for(var d=0;d<s.length;d++)this.graph.addExtFont(s[d].name,s[d].url)}catch(e){console.log("ExtFonts format error: "+e.message)}else null!=this.graph.extFonts&&this.graph.extFonts.length>0&&(this.graph.extFonts=[])}e.apply(this,arguments)};var t=Editor.prototype.getGraphXml;Editor.prototype.getGraphXml=function(e,i){e=null==e||e;var a=t.apply(this,arguments);null!=this.graph.currentStyle&&"default-style2"!=this.graph.currentStyle&&a.setAttribute("style",this.graph.currentStyle);var l=this.graph.getBackgroundImageObject(this.graph.backgroundImage,i);if(null!=l&&a.setAttribute("backgroundImage",JSON.stringify(l)),a.setAttribute("math",this.graph.mathEnabled?"1":"0"),a.setAttribute("shadow",this.graph.shadowVisible?"1":"0"),null!=this.graph.extFonts&&this.graph.extFonts.length>0){var n=this.graph.extFonts.map((function(e){return e.name+"^"+e.url}));a.setAttribute("extFonts",n.join("|"))}return a},Editor.prototype.isDataSvg=function(e){try{var t=mxUtils.parseXml(e).documentElement.getAttribute("content");if(null!=t&&(null!=t&&"<"!=t.charAt(0)&&"%"!=t.charAt(0)&&(t=unescape(window.atob?atob(t):Base64.decode(cont,t))),null!=t&&"%"==t.charAt(0)&&(t=decodeURIComponent(t)),null!=t&&t.length>0)){var i=mxUtils.parseXml(t).documentElement;return"mxfile"==i.nodeName||"mxGraphModel"==i.nodeName}}catch(e){}return!1},Editor.prototype.extractGraphModel=function(e,t,i){return Editor.extractGraphModel.apply(this,arguments)};var i=Editor.prototype.resetGraph;Editor.prototype.resetGraph=function(){this.graph.mathEnabled="1"==urlParams.math,this.graph.view.x0=null,this.graph.view.y0=null,mxClient.NO_FO=!(!this.graph.mathEnabled||this.useForeignObjectForMath)||this.originalNoForeignObject,this.graph.useCssTransforms=!mxClient.NO_FO&&this.isChromelessView()&&this.graph.isCssTransformsSupported(),this.graph.updateCssTransform(),i.apply(this,arguments)};var l=Editor.prototype.updateGraphComponents;Editor.prototype.updateGraphComponents=function(){l.apply(this,arguments),mxClient.NO_FO=!(!this.graph.mathEnabled||this.useForeignObjectForMath||null==Editor.MathJaxRender)||this.originalNoForeignObject,this.graph.useCssTransforms=!mxClient.NO_FO&&this.isChromelessView()&&this.graph.isCssTransformsSupported(),this.graph.updateCssTransform()},Editor.mathJaxWebkitCss="div.MathJax_SVG_Display { position: static; }\nspan.MathJax_SVG { position: static !important; }",Editor.initMath=function(e,t){if(void 0===window.MathJax){e=(null!=e?e:DRAW_MATH_URL+"/MathJax.js")+"?config=TeX-MML-AM_"+("html"==urlParams["math-output"]?"HTMLorMML":"SVG")+"-full",Editor.mathJaxQueue=[],Editor.doMathJaxRender=function(e){window.setTimeout((function(){"hidden"!=e.style.visibility&&MathJax.Hub.Queue(["Typeset",MathJax.Hub,e])}),0)};var i=null!=urlParams["math-font"]?decodeURIComponent(urlParams["math-font"]):"TeX";t=null!=t?t:{"HTML-CSS":{availableFonts:[i],imageFont:null},SVG:{font:i,useFontCache:!1},tex2jax:{ignoreClass:"mxCellEditor"},asciimath2jax:{ignoreClass:"mxCellEditor"}},window.MathJax={skipStartupTypeset:!0,showMathMenu:!1,messageStyle:"none",AuthorInit:function(){MathJax.Hub.Config(t),MathJax.Hub.Register.StartupHook("Begin",(function(){for(var e=0;e<Editor.mathJaxQueue.length;e++)Editor.doMathJaxRender(Editor.mathJaxQueue[e])}))}},Editor.MathJaxRender=function(e){"undefined"!=typeof MathJax&&void 0!==MathJax.Hub?Editor.doMathJaxRender(e):Editor.mathJaxQueue.push(e)},Editor.MathJaxClear=function(){Editor.mathJaxQueue=[]};var a=Editor.prototype.init;Editor.prototype.init=function(){a.apply(this,arguments),this.graph.addListener(mxEvent.SIZE,mxUtils.bind(this,(function(e,t){null!=this.graph.container&&this.graph.mathEnabled&&!this.graph.blockMathRender&&Editor.MathJaxRender(this.graph.container)})))};var l=document.getElementsByTagName("script");if(null!=l&&l.length>0){var n=document.createElement("script");n.setAttribute("type","text/javascript"),n.setAttribute("src",e),l[0].parentNode.appendChild(n)}try{if(mxClient.IS_GC||mxClient.IS_SF){var r=document.createElement("style");r.type="text/css",r.innerHTML=Editor.mathJaxWebkitCss,document.getElementsByTagName("head")[0].appendChild(r)}}catch(e){}}},Editor.prototype.csvToArray=function(e){if(!/^\s*(?:'[^'\\]*(?:\\[\S\s][^'\\]*)*'|"[^"\\]*(?:\\[\S\s][^"\\]*)*"|[^,'"\s\\]*(?:\s+[^,'"\s\\]+)*)\s*(?:,\s*(?:'[^'\\]*(?:\\[\S\s][^'\\]*)*'|"[^"\\]*(?:\\[\S\s][^"\\]*)*"|[^,'"\s\\]*(?:\s+[^,'"\s\\]+)*)\s*)*$/.test(e))return null;var t=[];return e.replace(/(?!\s*$)\s*(?:'([^'\\]*(?:\\[\S\s][^'\\]*)*)'|"([^"\\]*(?:\\[\S\s][^"\\]*)*)"|([^,'"\s\\]*(?:\s+[^,'"\s\\]+)*))\s*(?:,|$)/g,(function(e,i,a,l){return void 0!==i?t.push(i.replace(/\\'/g,"'")):void 0!==a?t.push(a.replace(/\\"/g,'"')):void 0!==l&&t.push(l),""})),/,\s*$/.test(e)&&t.push(""),t},Editor.prototype.isCorsEnabledForUrl=function(e){return!(!mxClient.IS_CHROMEAPP&&!EditorUi.isElectronApp)||e.substring(0,window.location.origin.length)==window.location.origin||(null!=urlParams.cors&&null==this.corsRegExp&&(this.corsRegExp=new RegExp(decodeURIComponent(urlParams.cors))),null!=this.corsRegExp&&this.corsRegExp.test(e)||"https://raw.githubusercontent.com/"===e.substring(0,34))},Editor.prototype.createImageUrlConverter=function(){var e=new mxUrlConverter;e.updateBaseUrl();var t=e.convert,i=this;return e.convert=function(a){if(null!=a){var l="http://"==a.substring(0,7)||"https://"==a.substring(0,8);l&&!navigator.onLine?a=Editor.svgBrokenImage.src:!l||a.substring(0,e.baseUrl.length)==e.baseUrl||i.crossOriginImages&&i.isCorsEnabledForUrl(a)?"chrome-extension://"==a.substring(0,19)||mxClient.IS_CHROMEAPP||(a=t.apply(this,arguments)):a=PROXY_URL+"?url="+encodeURIComponent(a)}return a},e},Editor.createSvgDataUri=function(e){return"data:image/svg+xml;base64,"+btoa(unescape(encodeURIComponent(e)))},Editor.prototype.convertImageToDataUri=function(e,t){try{var i=!0,a=window.setTimeout(mxUtils.bind(this,(function(){i=!1,t(Editor.svgBrokenImage.src)})),this.timeout);if(/(\.svg)$/i.test(e))mxUtils.get(e,mxUtils.bind(this,(function(e){window.clearTimeout(a),i&&t(Editor.createSvgDataUri(e.getText()))})),(function(){window.clearTimeout(a),i&&t(Editor.svgBrokenImage.src)}));else{var l=new Image;this.crossOriginImages&&(l.crossOrigin="anonymous"),l.onload=function(){if(window.clearTimeout(a),i)try{var e=document.createElement("canvas"),n=e.getContext("2d");e.height=l.height,e.width=l.width,n.drawImage(l,0,0),t(e.toDataURL())}catch(e){t(Editor.svgBrokenImage.src)}},l.onerror=function(){window.clearTimeout(a),i&&t(Editor.svgBrokenImage.src)},l.src=e}}catch(e){t(Editor.svgBrokenImage.src)}},Editor.prototype.convertImages=function(e,t,i,a){null==a&&(a=this.createImageUrlConverter());var l=0,n=i||new Object,r=mxUtils.bind(this,(function(i,r){for(var o=e.getElementsByTagName(i),s=0;s<o.length;s++)mxUtils.bind(this,(function(i){try{if(null!=i){var o=a.convert(i.getAttribute(r));if(null!=o&&"data:"!=o.substring(0,5)){var s=n[o];null==s?(l++,this.convertImageToDataUri(o,(function(a){null!=a&&(n[o]=a,i.setAttribute(r,a)),0==--l&&t(e)}))):i.setAttribute(r,s)}else null!=o&&i.setAttribute(r,o)}}catch(e){}}))(o[s])}));r("image","xlink:href"),r("img","src"),0==l&&t(e)},Editor.base64Encode=function(e){for(var t,i,a,l="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",n="",r=0,o=e.length;r<o;){if(t=255&e.charCodeAt(r++),r==o){n+=l.charAt(t>>2),n+=l.charAt((3&t)<<4),n+="==";break}if(i=e.charCodeAt(r++),r==o){n+=l.charAt(t>>2),n+=l.charAt((3&t)<<4|(240&i)>>4),n+=l.charAt((15&i)<<2),n+="=";break}a=e.charCodeAt(r++),n+=l.charAt(t>>2),n+=l.charAt((3&t)<<4|(240&i)>>4),n+=l.charAt((15&i)<<2|(192&a)>>6),n+=l.charAt(63&a)}return n},Editor.prototype.loadUrl=function(e,t,i,a,l,n,r,o){try{var s=!r&&(a||/(\.png)($|\?)/i.test(e)||/(\.jpe?g)($|\?)/i.test(e)||/(\.gif)($|\?)/i.test(e)||/(\.pdf)($|\?)/i.test(e));l=null==l||l;var d=mxUtils.bind(this,(function(){mxUtils.get(e,mxUtils.bind(this,(function(e){if(e.getStatus()>=200&&e.getStatus()<=299){if(null!=t){var a=e.getText();if(s){if((9==document.documentMode||10==document.documentMode)&&void 0!==window.mxUtilsBinaryToArray){for(var l=mxUtilsBinaryToArray(e.request.responseBody).toArray(),r=new Array(l.length),o=0;o<l.length;o++)r[o]=String.fromCharCode(l[o]);a=r.join("")}a=(n=null!=n?n:"data:image/png;base64,")+Editor.base64Encode(a)}t(a)}}else null!=i&&(0==e.getStatus()?i({message:mxResources.get("accessDenied")},e):i({message:mxResources.get("error")+" "+e.getStatus()},e))})),(function(e){null!=i&&i({message:mxResources.get("error")+" "+e.getStatus()})}),s,this.timeout,(function(){l&&null!=i&&i({code:App.ERROR_TIMEOUT,retry:d})}),o)}));d()}catch(e){null!=i&&i(e)}},Editor.prototype.absoluteCssFonts=function(e){var t=null;if(null!=e){var i=e.split("url(");if(i.length>0){t=[i[0]];var a=window.location.pathname;(o=null!=a?a.lastIndexOf("/"):-1)>=0&&(a=a.substring(0,o+1));var l=document.getElementsByTagName("base"),n=null;null!=l&&l.length>0&&(n=l[0].getAttribute("href"));for(var r=1;r<i.length;r++){var o;if((o=i[r].indexOf(")"))>0){var s=Editor.trimCssUrl(i[r].substring(0,o));this.graph.isRelativeUrl(s)&&(s=null!=n?n+s:window.location.protocol+"//"+window.location.hostname+("/"==s.charAt(0)?"":a)+s),t.push('url("'+s+'"'+i[r].substring(o))}else t.push(i[r])}}else t=[e]}return null!=t?t.join(""):null},Editor.prototype.embedCssFonts=function(e,t){var i=e.split("url("),a=0;null==this.cachedFonts&&(this.cachedFonts={});var l=mxUtils.bind(this,(function(){if(0==a){for(var e=[i[0]],l=1;l<i.length;l++){var n=i[l].indexOf(")");e.push('url("'),e.push(this.cachedFonts[Editor.trimCssUrl(i[l].substring(0,n))]),e.push('"'+i[l].substring(n))}t(e.join(""))}}));if(i.length>0){for(var n=1;n<i.length;n++){var r=i[n].indexOf(")"),o=null,s=i[n].indexOf("format(",r);s>0&&(o=Editor.trimCssUrl(i[n].substring(s+7,i[n].indexOf(")",s)))),mxUtils.bind(this,(function(e){if(null==this.cachedFonts[e]){this.cachedFonts[e]=e,a++;var t="application/x-font-ttf";"svg"==o||/(\.svg)($|\?)/i.test(e)?t="image/svg+xml":"otf"==o||"embedded-opentype"==o||/(\.otf)($|\?)/i.test(e)?t="application/x-font-opentype":"woff"==o||/(\.woff)($|\?)/i.test(e)?t="application/font-woff":"woff2"==o||/(\.woff2)($|\?)/i.test(e)?t="application/font-woff2":"eot"==o||/(\.eot)($|\?)/i.test(e)?t="application/vnd.ms-fontobject":("sfnt"==o||/(\.sfnt)($|\?)/i.test(e))&&(t="application/font-sfnt");var i=e;/^https?:\/\//.test(i)&&!this.isCorsEnabledForUrl(i)&&(i=PROXY_URL+"?url="+encodeURIComponent(e)),this.loadUrl(i,mxUtils.bind(this,(function(t){this.cachedFonts[e]=t,a--,l()})),mxUtils.bind(this,(function(e){a--,l()})),!0,null,"data:"+t+";charset=utf-8;base64,")}}))(Editor.trimCssUrl(i[n].substring(0,r)),o)}l()}else t(e)},Editor.prototype.loadFonts=function(e){null!=this.fontCss&&null==this.resolvedFontCss?this.embedCssFonts(this.fontCss,mxUtils.bind(this,(function(t){this.resolvedFontCss=t,null!=e&&e()}))):null!=e&&e()},Editor.prototype.embedExtFonts=function(e){var t=this.graph.getCustomFonts();if(t.length>0){var i="",a=0;null==this.cachedGoogleFonts&&(this.cachedGoogleFonts={});for(var l=mxUtils.bind(this,(function(){0==a&&this.embedCssFonts(i,e)})),n=0;n<t.length;n++)mxUtils.bind(this,(function(e,t){Graph.isCssFontUrl(t)?null==this.cachedGoogleFonts[t]?(a++,this.loadUrl(t,mxUtils.bind(this,(function(e){this.cachedGoogleFonts[t]=e,i+=e,a--,l()})),mxUtils.bind(this,(function(e){a--,i+="@import url("+t+");",l()})))):i+=this.cachedGoogleFonts[t]:i+='@font-face {font-family: "'+e+'";src: url("'+t+'")}'}))(t[n].name,t[n].url);l()}else e()},Editor.prototype.addMathCss=function(e){var t=e.getElementsByTagName("defs");if(null!=t&&t.length>0)for(var i=document.getElementsByTagName("style"),a=0;a<i.length;a++)mxUtils.getTextContent(i[a]).indexOf("MathJax")>0&&t[0].appendChild(i[a].cloneNode(!0))},Editor.prototype.addFontCss=function(e,t){if(null!=(t=null!=t?t:this.absoluteCssFonts(this.fontCss))){var i=e.getElementsByTagName("defs"),a=e.ownerDocument,l=null;0==i.length?(l=null!=a.createElementNS?a.createElementNS(mxConstants.NS_SVG,"defs"):a.createElement("defs"),null!=e.firstChild?e.insertBefore(l,e.firstChild):e.appendChild(l)):l=i[0];var n=null!=a.createElementNS?a.createElementNS(mxConstants.NS_SVG,"style"):a.createElement("style");n.setAttribute("type","text/css"),mxUtils.setTextContent(n,t),l.appendChild(n)}},Editor.prototype.isExportToCanvas=function(){return mxClient.IS_CHROMEAPP||this.useCanvasForExport},Editor.prototype.getMaxCanvasScale=function(e,t,i){var a=mxClient.IS_FF?8192:16384;return Math.min(i,Math.min(a/e,a/t))},Editor.prototype.exportToCanvas=function(e,t,i,a,l,n,r,o,s,d,p,m,u,h,c,g,f,A){try{n=null==n||n,r=null==r||r,m=null!=m?m:this.graph,u=null!=u?u:0;var y=s?null:m.background;y==mxConstants.NONE&&(y=null),null==y&&(y=a),null==y&&0==s&&(y=g?this.graph.defaultPageBackgroundColor:"#ffffff"),this.convertImages(m.getSvg(null,null,u,h,null,r,null,null,null,d,null,g,f,A),mxUtils.bind(this,(function(i){try{var a=new Image;a.onload=mxUtils.bind(this,(function(){try{var r=document.createElement("canvas"),s=parseInt(i.getAttribute("width")),d=parseInt(i.getAttribute("height"));o=null!=o?o:1,null!=t&&(o=n?Math.min(1,Math.min(3*t/(4*d),t/s)):t/s),o=this.getMaxCanvasScale(s,d,o),s=Math.ceil(o*s),d=Math.ceil(o*d),r.setAttribute("width",s),r.setAttribute("height",d);var p=r.getContext("2d");function h(){mxClient.IS_SF?window.setTimeout((function(){p.drawImage(a,0,0),e(r,i)}),0):(p.drawImage(a,0,0),e(r,i))}if(null!=y&&(p.beginPath(),p.rect(0,0,s,d),p.fillStyle=y,p.fill()),1!=o&&p.scale(o,o),c){var g=m.view,f=g.scale;g.scale=1;var A=btoa(unescape(encodeURIComponent(g.createSvgGrid(g.gridColor))));g.scale=f,A="data:image/svg+xml;base64,"+A;var C=m.gridSize*g.gridSteps*o,x=m.getGraphBounds(),b=g.translate.x*f,v=g.translate.y*f,S=b+(x.x-b)/f-u,E=v+(x.y-v)/f-u,I=new Image;I.onload=function(){try{for(var e=-Math.round(C-mxUtils.mod((b-S)*o,C)),t=-Math.round(C-mxUtils.mod((v-E)*o,C)),i=e;i<s;i+=C)for(var a=t;a<d;a+=C)p.drawImage(I,i/o,a/o);h()}catch(e){null!=l&&l(e)}},I.onerror=function(e){null!=l&&l(e)},I.src=A}else h()}catch(e){null!=l&&l(e)}})),a.onerror=function(e){null!=l&&l(e)},d&&this.graph.addSvgShadow(i),this.graph.mathEnabled&&this.addMathCss(i);var r=mxUtils.bind(this,(function(){try{null!=this.resolvedFontCss&&this.addFontCss(i,this.resolvedFontCss),a.src=Editor.createSvgDataUri(mxUtils.getXml(i))}catch(e){null!=l&&l(e)}}));this.embedExtFonts(mxUtils.bind(this,(function(e){try{null!=e&&this.addFontCss(i,e),this.loadFonts(r)}catch(e){null!=l&&l(e)}})))}catch(e){null!=l&&l(e)}})),i,p)}catch(e){null!=l&&l(e)}},Editor.crcTable=[];for(var n=0;n<256;n++)for(var r=n,o=0;o<8;o++)1==(1&r)?r=3988292384^r>>>1:r>>>=1,Editor.crcTable[n]=r;if(Editor.updateCRC=function(e,t,i,a){for(var l=e,n=0;n<a;n++)l=Editor.crcTable[255&(l^t.charCodeAt(i+n))]^l>>>8;return l},Editor.crc32=function(e){for(var t=-1,i=0;i<e.length;i++)t=t>>>8^Editor.crcTable[255&(t^e.charCodeAt(i))];return(-1^t)>>>0},Editor.writeGraphModelToPng=function(e,t,i,a,l){var n=e.substring(e.indexOf(",")+1),r=window.atob?atob(n):Base64.decode(n,!0),o=0;function s(e,t){var i=o;return o+=t,e.substring(i,o)}function d(e){return String.fromCharCode(e>>24&255,e>>16&255,e>>8&255,255&e)}if(s(r,8)==String.fromCharCode(137)+"PNG"+String.fromCharCode(13,10,26,10)){if(s(r,4),"IHDR"==s(r,4)){s(r,17);var p,m=r.substring(0,o);do{var u=(p=void 0,(p=s(r,4)).charCodeAt(3)+(p.charCodeAt(2)<<8)+(p.charCodeAt(1)<<16)+(p.charCodeAt(0)<<24));if("IDAT"==s(r,4)){if(m=r.substring(0,o-8),"pHYs"==t&&"dpi"==i)var h=Math.round(a/.0254),c=d(h)+d(h)+String.fromCharCode(1);else c=i+String.fromCharCode(0)+("zTXt"==t?String.fromCharCode(0):"")+a;var g=4294967295;g=Editor.updateCRC(g,t,0,4),g=Editor.updateCRC(g,c,0,c.length),m+=d(c.length)+t+c+d(4294967295^g),m+=r.substring(o-8,r.length);break}m+=r.substring(o-8,o-4+u),s(r,u),s(r,4)}while(u);return"data:image/png;base64,"+(window.btoa?btoa(m):Base64.encode(m,!0))}null!=l&&l()}else null!=l&&l()},window.ColorDialog){FilenameDialog.filenameHelpLink="https://www.diagrams.net/doc/faq/save-file-formats";var s=ColorDialog.addRecentColor;ColorDialog.addRecentColor=function(e,t){s.apply(this,arguments),mxSettings.setRecentColors(ColorDialog.recentColors),mxSettings.save()};var d=ColorDialog.resetRecentColors;ColorDialog.resetRecentColors=function(){d.apply(this,arguments),mxSettings.setRecentColors(ColorDialog.recentColors),mxSettings.save()}}if(window.EditDataDialog&&(EditDataDialog.getDisplayIdForCell=function(e,t){var i=null;return null!=e.editor.graph.getModel().getParent(t)?i=t.getId():null!=e.currentPage&&(i=e.currentPage.getId()),i}),null!=window.StyleFormatPanel){var p=Format.prototype.init;Format.prototype.init=function(){p.apply(this,arguments),this.editorUi.editor.addListener("fileLoaded",this.update)};var m=Format.prototype.refresh;Format.prototype.refresh=function(){null!=this.editorUi.getCurrentFile()||"1"==urlParams.embed||this.editorUi.editor.chromeless?m.apply(this,arguments):this.clear()},DiagramFormatPanel.prototype.isShadowOptionVisible=function(){var e=this.editorUi.getCurrentFile();return"1"==urlParams.embed||null!=e&&e.isEditable()},DiagramFormatPanel.prototype.isMathOptionVisible=function(e){return!1};var u=DiagramFormatPanel.prototype.addView;DiagramFormatPanel.prototype.addView=function(e){if(e=u.apply(this,arguments),this.editorUi.getCurrentFile(),mxClient.IS_SVG&&this.isShadowOptionVisible()){var t=this.editorUi,i=t.editor,a=i.graph,l=this.createOption(mxResources.get("shadow"),(function(){return a.shadowVisible}),(function(e){var i=new ChangePageSetup(t);i.ignoreColor=!0,i.ignoreImage=!0,i.shadowVisible=e,a.model.execute(i)}),{install:function(e){this.listener=function(){e(a.shadowVisible)},t.addListener("shadowVisibleChanged",this.listener)},destroy:function(){t.removeListener(this.listener)}});Editor.enableShadowOption||(l.getElementsByTagName("input")[0].setAttribute("disabled","disabled"),mxUtils.setOpacity(l,60)),e.appendChild(l)}return e};var c=DiagramFormatPanel.prototype.addOptions;DiagramFormatPanel.prototype.addOptions=function(e){e=c.apply(this,arguments);var t=this.editorUi,i=t.editor,a=i.graph;if(a.isEnabled()){var l=t.getCurrentFile();if(null!=l&&l.isAutosaveOptional()){var n=this.createOption(mxResources.get("autosave"),(function(){return t.editor.autosave}),(function(e){t.editor.setAutosave(e),t.editor.autosave&&l.isModified()&&l.fileChanged()}),{install:function(e){this.listener=function(){e(t.editor.autosave)},t.editor.addListener("autosaveChanged",this.listener)},destroy:function(){t.editor.removeListener(this.listener)}});e.appendChild(n)}}if(this.isMathOptionVisible()&&a.isEnabled()&&"undefined"!=typeof MathJax){var r=this.createOption(mxResources.get("mathematicalTypesetting"),(function(){return a.mathEnabled}),(function(e){t.actions.get("mathematicalTypesetting").funct()}),{install:function(e){this.listener=function(){e(a.mathEnabled)},t.addListener("mathEnabledChanged",this.listener)},destroy:function(){t.removeListener(this.listener)}});r.style.paddingTop="5px",e.appendChild(r);var o=t.menus.createHelpLink("https://www.diagrams.net/doc/faq/math-typesetting");o.style.position="relative",o.style.marginLeft="6px",o.style.top="2px",r.appendChild(o)}return e},mxCellRenderer.prototype.defaultVertexShape.prototype.customProperties=[{name:"arcSize",dispName:"Arc Size",type:"float",min:0,defVal:mxConstants.LINE_ARCSIZE},{name:"absoluteArcSize",dispName:"Abs. Arc Size",type:"bool",defVal:!1}],mxCellRenderer.defaultShapes.link.prototype.customProperties=[{name:"width",dispName:"Width",type:"float",min:0,defVal:4}],mxCellRenderer.defaultShapes.flexArrow.prototype.customProperties=[{name:"width",dispName:"Width",type:"float",min:0,defVal:10},{name:"startWidth",dispName:"Start Width",type:"float",min:0,defVal:20},{name:"endWidth",dispName:"End Width",type:"float",min:0,defVal:20}],mxCellRenderer.defaultShapes.process.prototype.customProperties=[{name:"size",dispName:"Indent",type:"float",min:0,max:.5,defVal:.1}],mxCellRenderer.defaultShapes.rhombus.prototype.customProperties=[{name:"arcSize",dispName:"Arc Size",type:"float",min:0,max:50,defVal:mxConstants.LINE_ARCSIZE},{name:"double",dispName:"Double",type:"bool",defVal:!1}],mxCellRenderer.defaultShapes.partialRectangle.prototype.customProperties=[{name:"top",dispName:"Top Line",type:"bool",defVal:!0},{name:"bottom",dispName:"Bottom Line",type:"bool",defVal:!0},{name:"left",dispName:"Left Line",type:"bool",defVal:!0},{name:"right",dispName:"Right Line",type:"bool",defVal:!0}],mxCellRenderer.defaultShapes.parallelogram.prototype.customProperties=[{name:"arcSize",dispName:"Arc Size",type:"float",min:0,defVal:mxConstants.LINE_ARCSIZE},{name:"size",dispName:"Slope Angle",type:"float",min:0,max:1,defVal:.2}],mxCellRenderer.defaultShapes.hexagon.prototype.customProperties=[{name:"arcSize",dispName:"Arc Size",type:"float",min:0,defVal:mxConstants.LINE_ARCSIZE},{name:"size",dispName:"Slope Angle",type:"float",min:0,max:1,defVal:.25}],mxCellRenderer.defaultShapes.triangle.prototype.customProperties=[{name:"arcSize",dispName:"Arc Size",type:"float",min:0,defVal:mxConstants.LINE_ARCSIZE}],mxCellRenderer.defaultShapes.document.prototype.customProperties=[{name:"size",dispName:"Size",type:"float",defVal:.3,min:0,max:1}],mxCellRenderer.defaultShapes.internalStorage.prototype.customProperties=[{name:"arcSize",dispName:"Arc Size",type:"float",min:0,defVal:mxConstants.LINE_ARCSIZE},{name:"dx",dispName:"Left Line",type:"float",min:0,defVal:20},{name:"dy",dispName:"Top Line",type:"float",min:0,defVal:20}],mxCellRenderer.defaultShapes.cube.prototype.customProperties=[{name:"size",dispName:"Size",type:"float",min:0,defVal:20},{name:"darkOpacity",dispName:"Dark Opacity",type:"float",min:-1,max:1,defVal:0},{name:"darkOpacity2",dispName:"Dark Opacity 2",type:"float",min:-1,max:1,defVal:0}],mxCellRenderer.defaultShapes.step.prototype.customProperties=[{name:"size",dispName:"Notch Size",type:"float",min:0,defVal:20},{name:"fixedSize",dispName:"Fixed Size",type:"bool",defVal:!0}],mxCellRenderer.defaultShapes.trapezoid.prototype.customProperties=[{name:"arcSize",dispName:"Arc Size",type:"float",min:0,defVal:mxConstants.LINE_ARCSIZE},{name:"size",dispName:"Slope Angle",type:"float",min:0,max:1,defVal:.2}],mxCellRenderer.defaultShapes.tape.prototype.customProperties=[{name:"size",dispName:"Size",type:"float",min:0,max:1,defVal:.4}],mxCellRenderer.defaultShapes.note.prototype.customProperties=[{name:"size",dispName:"Fold Size",type:"float",min:0,defVal:30},{name:"darkOpacity",dispName:"Dark Opacity",type:"float",min:-1,max:1,defVal:0}],mxCellRenderer.defaultShapes.card.prototype.customProperties=[{name:"arcSize",dispName:"Arc Size",type:"float",min:0,defVal:mxConstants.LINE_ARCSIZE},{name:"size",dispName:"Cutoff Size",type:"float",min:0,defVal:30}],mxCellRenderer.defaultShapes.callout.prototype.customProperties=[{name:"arcSize",dispName:"Arc Size",type:"float",min:0,defVal:mxConstants.LINE_ARCSIZE},{name:"base",dispName:"Callout Width",type:"float",min:0,defVal:20},{name:"size",dispName:"Callout Length",type:"float",min:0,defVal:30},{name:"position",dispName:"Callout Position",type:"float",min:0,max:1,defVal:.5},{name:"position2",dispName:"Callout Tip Position",type:"float",min:0,max:1,defVal:.5}],mxCellRenderer.defaultShapes.folder.prototype.customProperties=[{name:"tabWidth",dispName:"Tab Width",type:"float"},{name:"tabHeight",dispName:"Tab Height",type:"float"},{name:"tabPosition",dispName:"Tap Position",type:"enum",enumList:[{val:"left",dispName:"Left"},{val:"right",dispName:"Right"}]}],mxCellRenderer.defaultShapes.swimlane.prototype.customProperties=[{name:"arcSize",dispName:"Arc Size",type:"float",min:0,defVal:15},{name:"startSize",dispName:"Header Size",type:"float"},{name:"swimlaneHead",dispName:"Head Border",type:"bool",defVal:!0},{name:"swimlaneBody",dispName:"Body Border",type:"bool",defVal:!0},{name:"horizontal",dispName:"Horizontal",type:"bool",defVal:!0},{name:"separatorColor",dispName:"Separator Color",type:"color",defVal:null}],mxCellRenderer.defaultShapes.table.prototype.customProperties=[{name:"rowLines",dispName:"Row Lines",type:"bool",defVal:!0},{name:"columnLines",dispName:"Column Lines",type:"bool",defVal:!0},{name:"fixedRows",dispName:"Fixed Rows",type:"bool",defVal:!1},{name:"resizeLast",dispName:"Resize Last Column",type:"bool",defVal:!1},{name:"resizeLastRow",dispName:"Resize Last Row",type:"bool",defVal:!1}].concat(mxCellRenderer.defaultShapes.swimlane.prototype.customProperties),mxCellRenderer.defaultShapes.doubleEllipse.prototype.customProperties=[{name:"margin",dispName:"Indent",type:"float",min:0,defVal:4}],mxCellRenderer.defaultShapes.ext.prototype.customProperties=[{name:"arcSize",dispName:"Arc Size",type:"float",min:0,defVal:15},{name:"double",dispName:"Double",type:"bool",defVal:!1},{name:"margin",dispName:"Indent",type:"float",min:0,defVal:0}],mxCellRenderer.defaultShapes.curlyBracket.prototype.customProperties=[{name:"rounded",dispName:"Rounded",type:"bool",defVal:!0},{name:"size",dispName:"Size",type:"float",min:0,max:1,defVal:.5}],mxCellRenderer.defaultShapes.image.prototype.customProperties=[{name:"imageAspect",dispName:"Fixed Image Aspect",type:"bool",defVal:!0}],mxCellRenderer.defaultShapes.label.prototype.customProperties=[{name:"imageAspect",dispName:"Fixed Image Aspect",type:"bool",defVal:!0},{name:"imageAlign",dispName:"Image Align",type:"enum",enumList:[{val:"left",dispName:"Left"},{val:"center",dispName:"Center"},{val:"right",dispName:"Right"}],defVal:"left"},{name:"imageVerticalAlign",dispName:"Image Vertical Align",type:"enum",enumList:[{val:"top",dispName:"Top"},{val:"middle",dispName:"Middle"},{val:"bottom",dispName:"Bottom"}],defVal:"middle"},{name:"imageWidth",dispName:"Image Width",type:"float",min:0,defVal:24},{name:"imageHeight",dispName:"Image Height",type:"float",min:0,defVal:24},{name:"arcSize",dispName:"Arc Size",type:"float",min:0,defVal:12},{name:"absoluteArcSize",dispName:"Abs. Arc Size",type:"bool",defVal:!1}],mxCellRenderer.defaultShapes.dataStorage.prototype.customProperties=[{name:"size",dispName:"Size",type:"float",min:0,max:1,defVal:.1}],mxCellRenderer.defaultShapes.manualInput.prototype.customProperties=[{name:"size",dispName:"Size",type:"float",min:0,defVal:30},{name:"arcSize",dispName:"Arc Size",type:"float",min:0,defVal:20}],mxCellRenderer.defaultShapes.loopLimit.prototype.customProperties=[{name:"size",dispName:"Size",type:"float",min:0,defVal:20},{name:"arcSize",dispName:"Arc Size",type:"float",min:0,defVal:20}],mxCellRenderer.defaultShapes.offPageConnector.prototype.customProperties=[{name:"size",dispName:"Size",type:"float",min:0,defVal:38},{name:"arcSize",dispName:"Arc Size",type:"float",min:0,defVal:20}],mxCellRenderer.defaultShapes.display.prototype.customProperties=[{name:"size",dispName:"Size",type:"float",min:0,max:1,defVal:.25}],mxCellRenderer.defaultShapes.singleArrow.prototype.customProperties=[{name:"arrowWidth",dispName:"Arrow Width",type:"float",min:0,max:1,defVal:.3},{name:"arrowSize",dispName:"Arrowhead Length",type:"float",min:0,max:1,defVal:.2}],mxCellRenderer.defaultShapes.doubleArrow.prototype.customProperties=[{name:"arrowWidth",dispName:"Arrow Width",type:"float",min:0,max:1,defVal:.3},{name:"arrowSize",dispName:"Arrowhead Length",type:"float",min:0,max:1,defVal:.2}],mxCellRenderer.defaultShapes.cross.prototype.customProperties=[{name:"size",dispName:"Size",type:"float",min:0,max:1,defVal:.2}],mxCellRenderer.defaultShapes.corner.prototype.customProperties=[{name:"dx",dispName:"Width1",type:"float",min:0,defVal:20},{name:"dy",dispName:"Width2",type:"float",min:0,defVal:20}],mxCellRenderer.defaultShapes.tee.prototype.customProperties=[{name:"dx",dispName:"Width1",type:"float",min:0,defVal:20},{name:"dy",dispName:"Width2",type:"float",min:0,defVal:20}],mxCellRenderer.defaultShapes.umlLifeline.prototype.customProperties=[{name:"participant",dispName:"Participant",type:"enum",defVal:"none",enumList:[{val:"none",dispName:"Default"},{val:"umlActor",dispName:"Actor"},{val:"umlBoundary",dispName:"Boundary"},{val:"umlEntity",dispName:"Entity"},{val:"umlControl",dispName:"Control"}]},{name:"size",dispName:"Height",type:"float",defVal:40,min:0}],mxCellRenderer.defaultShapes.umlFrame.prototype.customProperties=[{name:"width",dispName:"Title Width",type:"float",defVal:60,min:0},{name:"height",dispName:"Title Height",type:"float",defVal:30,min:0}],StyleFormatPanel.prototype.defaultColorSchemes=[[{fill:"",stroke:""},{fill:"#f5f5f5",stroke:"#666666",font:"#333333"},{fill:"#dae8fc",stroke:"#6c8ebf"},{fill:"#d5e8d4",stroke:"#82b366"},{fill:"#ffe6cc",stroke:"#d79b00"},{fill:"#fff2cc",stroke:"#d6b656"},{fill:"#f8cecc",stroke:"#b85450"},{fill:"#e1d5e7",stroke:"#9673a6"}],[{fill:"",stroke:""},{fill:"#60a917",stroke:"#2D7600",font:"#ffffff"},{fill:"#008a00",stroke:"#005700",font:"#ffffff"},{fill:"#1ba1e2",stroke:"#006EAF",font:"#ffffff"},{fill:"#0050ef",stroke:"#001DBC",font:"#ffffff"},{fill:"#6a00ff",stroke:"#3700CC",font:"#ffffff"},{fill:"#d80073",stroke:"#A50040",font:"#ffffff"},{fill:"#a20025",stroke:"#6F0000",font:"#ffffff"}],[{fill:"#e51400",stroke:"#B20000",font:"#ffffff"},{fill:"#fa6800",stroke:"#C73500",font:"#000000"},{fill:"#f0a30a",stroke:"#BD7000",font:"#000000"},{fill:"#e3c800",stroke:"#B09500",font:"#000000"},{fill:"#6d8764",stroke:"#3A5431",font:"#ffffff"},{fill:"#647687",stroke:"#314354",font:"#ffffff"},{fill:"#76608a",stroke:"#432D57",font:"#ffffff"},{fill:"#a0522d",stroke:"#6D1F00",font:"#ffffff"}],[{fill:"",stroke:""},{fill:mxConstants.NONE,stroke:""},{fill:"#fad7ac",stroke:"#b46504"},{fill:"#fad9d5",stroke:"#ae4132"},{fill:"#b0e3e6",stroke:"#0e8088"},{fill:"#b1ddf0",stroke:"#10739e"},{fill:"#d0cee2",stroke:"#56517e"},{fill:"#bac8d3",stroke:"#23445d"}],[{fill:"",stroke:""},{fill:"#f5f5f5",stroke:"#666666",gradient:"#b3b3b3"},{fill:"#dae8fc",stroke:"#6c8ebf",gradient:"#7ea6e0"},{fill:"#d5e8d4",stroke:"#82b366",gradient:"#97d077"},{fill:"#ffcd28",stroke:"#d79b00",gradient:"#ffa500"},{fill:"#fff2cc",stroke:"#d6b656",gradient:"#ffd966"},{fill:"#f8cecc",stroke:"#b85450",gradient:"#ea6b66"},{fill:"#e6d0de",stroke:"#996185",gradient:"#d5739d"}],[{fill:"",stroke:""},{fill:"#eeeeee",stroke:"#36393d"},{fill:"#f9f7ed",stroke:"#36393d"},{fill:"#ffcc99",stroke:"#36393d"},{fill:"#cce5ff",stroke:"#36393d"},{fill:"#ffff88",stroke:"#36393d"},{fill:"#cdeb8b",stroke:"#36393d"},{fill:"#ffcccc",stroke:"#36393d"}]],StyleFormatPanel.prototype.customColorSchemes=null,StyleFormatPanel.prototype.findCommonProperties=function(e,t,i){if(null!=t){var a=function(e){if(null!=e)if(i)for(var a=0;a<e.length;a++)t[e[a].name]=e[a];else for(var l in t){var n=!1;for(a=0;a<e.length;a++)if(e[a].name==l&&e[a].type==t[l].type){n=!0;break}n||delete t[l]}},l=this.editorUi.editor.graph.view.getState(e);null!=l&&null!=l.shape&&(l.shape.commonCustomPropAdded||(l.shape.commonCustomPropAdded=!0,l.shape.customProperties=l.shape.customProperties||[],l.cell.vertex?Array.prototype.push.apply(l.shape.customProperties,Editor.commonVertexProperties):Array.prototype.push.apply(l.shape.customProperties,Editor.commonEdgeProperties)),a(l.shape.customProperties));var n=e.getAttribute("customProperties");if(null!=n)try{a(JSON.parse(n))}catch(e){}}};var g=StyleFormatPanel.prototype.init;StyleFormatPanel.prototype.init=function(){var e=this.editorUi.getSelectionState();if("image"!=e.style.shape&&!e.containsLabel&&e.cells.length>0&&this.container.appendChild(this.addStyles(this.createPanel())),g.apply(this,arguments),Editor.enableCustomProperties){for(var t={},i=e.vertices,a=e.edges,l=0;l<i.length;l++)this.findCommonProperties(i[l],t,0==l);for(l=0;l<a.length;l++)this.findCommonProperties(a[l],t,0==i.length&&0==l);null!=Object.getOwnPropertyNames&&Object.getOwnPropertyNames(t).length>0&&this.container.appendChild(this.addProperties(this.createPanel(),t,e))}};var f=StyleFormatPanel.prototype.addStyleOps;StyleFormatPanel.prototype.addStyleOps=function(e){return this.addActions(e,["copyStyle","pasteStyle"]),f.apply(this,arguments)},EditorUi.prototype.propertiesCollapsed=!0,StyleFormatPanel.prototype.addProperties=function(e,t,i){var a=this,l=this.editorUi.editor.graph,n=[];function r(e,t){t.parentNode.insertBefore(e,t.nextSibling)}function o(e,t,i,n){l.getModel().beginUpdate();try{var r=[],o=[];if(null!=i.index){for(var s=[],d=i.parentRow.nextSibling;d&&d.getAttribute("data-pName")==e;)s.push(d.getAttribute("data-pValue")),d=d.nextSibling;i.index<s.length?null!=n?s.splice(n,1):s[i.index]=t:s.push(t),null!=i.size&&s.length>i.size&&(s=s.slice(0,i.size)),t=s.join(","),null!=i.countProperty&&(l.setCellStyles(i.countProperty,s.length,l.getSelectionCells()),r.push(i.countProperty),o.push(s.length))}if(l.setCellStyles(e,t,l.getSelectionCells()),r.push(e),o.push(t),null!=i.dependentProps)for(var p=0;p<i.dependentProps.length;p++){var m=i.dependentPropsDefVal[p],u=i.dependentPropsVals[p];if(u.length>t)u=u.slice(0,t);else for(var h=u.length;h<t;h++)u.push(m);u=u.join(","),l.setCellStyles(i.dependentProps[p],u,l.getSelectionCells()),r.push(i.dependentProps[p]),o.push(u)}"function"==typeof i.onChange&&i.onChange(l,t),a.editorUi.fireEvent(new mxEventObject("styleChanged","keys",r,"values",o,"cells",l.getSelectionCells()))}finally{l.getModel().endUpdate()}}function s(t,i,a){var l=mxUtils.getOffset(e,!0),n=mxUtils.getOffset(t,!0);i.style.position="absolute",i.style.left=n.x-l.x+"px",i.style.top=n.y-l.y+"px",i.style.width=t.offsetWidth+"px",i.style.height=t.offsetHeight-(a?4:0)+"px",i.style.zIndex=5}function d(t,i,l,p,m){var u=l.dispName,h=l.type,c=document.createElement("tr");c.className="gePropRow"+(m?"Dark":"")+(p?"Alt":"")+" gePropNonHeaderRow",c.setAttribute("data-pName",t),c.setAttribute("data-pValue",i);var g=!1;null!=l.index&&(c.setAttribute("data-index",l.index),u=(null!=u?u:"")+"["+l.index+"]",g=!0);var f=document.createElement("td");f.className="gePropRowCell";var A=mxResources.get(u,null,u);if(mxUtils.write(f,A),f.setAttribute("title",A),g&&(f.style.textAlign="right"),c.appendChild(f),(f=document.createElement("td")).className="gePropRowCell","color"==h)f.appendChild(function(e,t,i){var l=document.createElement("div");return l.style.width="32px",l.style.height="4px",l.style.margin="2px",l.style.border="1px solid black",l.style.background=t&&"none"!=t?t:"url('"+Dialog.prototype.noColorImage+"')",btn=mxUtils.button("",mxUtils.bind(a,(function(a){this.editorUi.pickColor(t,(function(t){l.style.background="none"==t?"url('"+Dialog.prototype.noColorImage+"')":t,o(e,t,i)})),mxEvent.consume(a)}))),btn.style.height="12px",btn.style.width="40px",btn.className="geColorBtn",btn.appendChild(l),btn}(t,i,l));else if("bool"==h||"boolean"==h)f.appendChild(function(e,t,i){var a=document.createElement("input");return a.type="checkbox",a.checked="1"==t,mxEvent.addListener(a,"change",(function(){o(e,a.checked?"1":"0",i)})),a}(t,i,l));else if("enum"==h){for(var y=l.enumList,C=0;C<y.length;C++){var x=y[C];if(x.val==i){mxUtils.write(f,mxResources.get(x.dispName,null,x.dispName));break}}mxEvent.addListener(f,"click",mxUtils.bind(a,(function(){var a=document.createElement("select");s(f,a);for(var n=0;n<y.length;n++){var r=y[n],d=document.createElement("option");d.value=mxUtils.htmlEntities(r.val),mxUtils.write(d,mxResources.get(r.dispName,null,r.dispName)),a.appendChild(d)}a.value=i,e.appendChild(a),mxEvent.addListener(a,"change",(function(){var e=mxUtils.htmlEntities(a.value);o(t,e,l)})),a.focus(),mxEvent.addListener(a,"blur",(function(){e.removeChild(a)}))})))}else if("dynamicArr"==h)f.appendChild(function(e,t,i,l,s,p,m){if(null!=t){var u=t.split(",");n.push({name:e,values:u,type:i,defVal:l,countProperty:s,parentRow:p,isDeletable:!0,flipBkg:m})}return btn=mxUtils.button("+",mxUtils.bind(a,(function(t){for(var a=p,n=0;null!=a.nextSibling&&a.nextSibling.getAttribute("data-pName")==e;)a=a.nextSibling,n++;var u={type:i,parentRow:p,index:n,isDeletable:!0,defVal:l,countProperty:s},h=d(e,"",u,n%2==0,m);o(e,l,u),r(h,a),mxEvent.consume(t)}))),btn.style.height="16px",btn.style.width="25px",btn.className="geColorBtn",btn}(t,i,l.subType,l.subDefVal,l.countProperty,c,m));else if("staticArr"==h)f.appendChild(function(e,t,i,a,l,r,o){if(l>0){for(var s=new Array(l),d=null!=t?t.split(","):[],p=0;p<l;p++)s[p]=null!=d[p]?d[p]:null!=a?a:"";n.push({name:e,values:s,type:i,defVal:a,parentRow:r,flipBkg:o,size:l})}return document.createElement("div")}(t,i,l.subType,l.subDefVal,l.size,c,m));else if("readOnly"==h){var b=document.createElement("input");b.setAttribute("readonly",""),b.value=i,b.style.width="96px",b.style.borderWidth="0px",f.appendChild(b)}else f.innerHTML=i,mxEvent.addListener(f,"click",mxUtils.bind(a,(function(){var a=document.createElement("input");function n(){var e=a.value;e=0==e.length&&"string"!=h?0:e,l.allowAuto&&(null!=e.trim&&"auto"==e.trim().toLowerCase()?(e="auto",h="string"):(e=parseFloat(e),e=isNaN(e)?0:e)),null!=l.min&&e<l.min?e=l.min:null!=l.max&&e>l.max&&(e=l.max);var i=mxUtils.htmlEntities(("int"==h?parseInt(e):e)+"");o(t,i,l)}s(f,a,!0),a.value=i,a.className="gePropEditor","int"!=h&&"float"!=h||l.allowAuto||(a.type="number",a.step="int"==h?"1":"any",null!=l.min&&(a.min=parseFloat(l.min)),null!=l.max&&(a.max=parseFloat(l.max))),e.appendChild(a),mxEvent.addListener(a,"keypress",(function(e){13==e.keyCode&&n()})),a.focus(),mxEvent.addListener(a,"blur",(function(){n()}))})));if(l.isDeletable){var v=mxUtils.button("-",mxUtils.bind(a,(function(e){o(t,"",l,l.index),mxEvent.consume(e)})));v.style.height="16px",v.style.width="25px",v.style.float="right",v.className="geColorBtn",f.appendChild(v)}return c.appendChild(f),c}e.style.position="relative",e.style.padding="0";var p=document.createElement("table");p.className="geProperties",p.style.whiteSpace="nowrap",p.style.width="100%";var m=document.createElement("tr");m.className="gePropHeader";var u=document.createElement("th");u.className="gePropHeaderCell";var h=document.createElement("img");h.src=Sidebar.prototype.expandedImage,h.style.verticalAlign="middle",u.appendChild(h),mxUtils.write(u,mxResources.get("property")),m.style.cursor="pointer";var c=function(){var t,i=p.querySelectorAll(".gePropNonHeaderRow");if(a.editorUi.propertiesCollapsed){h.src=Sidebar.prototype.collapsedImage,t="none";for(var l=e.childNodes.length-1;l>=0;l--)try{var n=e.childNodes[l],r=n.nodeName.toUpperCase();"INPUT"!=r&&"SELECT"!=r||e.removeChild(n)}catch(e){}}else h.src=Sidebar.prototype.expandedImage,t="";for(var o=0;o<i.length;o++)i[o].style.display=t};mxEvent.addListener(m,"click",(function(){a.editorUi.propertiesCollapsed=!a.editorUi.propertiesCollapsed,c()})),m.appendChild(u),(u=document.createElement("th")).className="gePropHeaderCell",u.innerHTML=mxResources.get("value"),m.appendChild(u),p.appendChild(m);var g=!1,f=!1,A=null;for(var y in 1==i.vertices.length&&0==i.edges.length?A=i.vertices[0].id:0==i.vertices.length&&1==i.edges.length&&(A=i.edges[0].id),null!=A&&p.appendChild(d("id",mxUtils.htmlEntities(A),{dispName:"ID",type:"readOnly"},!0,!1)),t)if("function"!=typeof(I=t[y]).isVisible||I.isVisible(i,this)){var C=null!=i.style[y]?mxUtils.htmlEntities(i.style[y]+""):null!=I.getDefaultValue?I.getDefaultValue(i,this):I.defVal;if("separator"!=I.type){if("staticArr"==I.type)I.size=parseInt(i.style[I.sizeProperty]||t[I.sizeProperty].defVal)||0;else if(null!=I.dependentProps){for(var x=I.dependentProps,b=[],v=[],S=0;S<x.length;S++){var E=i.style[x[S]];v.push(t[x[S]].subDefVal),b.push(null!=E?E.split(","):[])}I.dependentPropsDefVal=v,I.dependentPropsVals=b}p.appendChild(d(y,C,I,g,f)),g=!g}else f=!f}for(S=0;S<n.length;S++)for(var I,N=(I=n[S]).parentRow,M=0;M<I.values.length;M++){var w={type:I.type,parentRow:I.parentRow,isDeletable:I.isDeletable,index:M,defVal:I.defVal,countProperty:I.countProperty,size:I.size},T=d(I.name,I.values[M],w,M%2==0,I.flipBkg);r(T,N),N=T}return e.appendChild(p),c(),e},StyleFormatPanel.prototype.addStyles=function(e){var t=this.editorUi,i=t.editor.graph,a=document.createElement("div");a.style.whiteSpace="nowrap",a.style.paddingLeft="24px",a.style.paddingRight="20px",e.style.paddingLeft="16px",e.style.paddingBottom="6px",e.style.position="relative",e.appendChild(a);var l=["plain-gray","plain-blue","plain-green","plain-turquoise","plain-orange","plain-yellow","plain-red","plain-pink","plain-purple","gray","blue","green","turquoise","orange","yellow","red","pink","purple"],n=document.createElement("div");n.style.whiteSpace="nowrap",n.style.position="relative",n.style.textAlign="center",n.style.width="210px";for(var r=[],o=0;o<this.defaultColorSchemes.length;o++){var s=document.createElement("div");s.style.display="inline-block",s.style.width="6px",s.style.height="6px",s.style.marginLeft="4px",s.style.marginRight="3px",s.style.borderRadius="3px",s.style.cursor="pointer",s.style.background="transparent",s.style.border="1px solid #b5b6b7",mxUtils.bind(this,(function(e){mxEvent.addListener(s,"click",mxUtils.bind(this,(function(){d(e)})))}))(o),r.push(s),n.appendChild(s)}var d=mxUtils.bind(this,(function(e){null!=r[e]&&(null!=this.format.currentScheme&&null!=r[this.format.currentScheme]&&(r[this.format.currentScheme].style.background="transparent"),this.format.currentScheme=e,p(this.defaultColorSchemes[this.format.currentScheme]),r[this.format.currentScheme].style.background="#84d7ff")})),p=mxUtils.bind(this,(function(e){var n=mxUtils.bind(this,(function(e){var n=mxUtils.button("",mxUtils.bind(this,(function(a){i.getModel().beginUpdate();try{for(var n=t.getSelectionState().cells,r=0;r<n.length;r++){for(var o=i.getModel().getStyle(n[r]),s=0;s<l.length;s++)o=mxUtils.removeStylename(o,l[s]);var d=i.getModel().isVertex(n[r])?i.defaultVertexStyle:i.defaultEdgeStyle;null!=e?(mxEvent.isShiftDown(a)||(o=""==e.fill?mxUtils.setStyle(o,mxConstants.STYLE_FILLCOLOR,null):mxUtils.setStyle(o,mxConstants.STYLE_FILLCOLOR,e.fill||mxUtils.getValue(d,mxConstants.STYLE_FILLCOLOR,null)),o=mxUtils.setStyle(o,mxConstants.STYLE_GRADIENTCOLOR,e.gradient||mxUtils.getValue(d,mxConstants.STYLE_GRADIENTCOLOR,null)),mxEvent.isControlDown(a)||mxClient.IS_MAC&&mxEvent.isMetaDown(a)||!i.getModel().isVertex(n[r])||(o=mxUtils.setStyle(o,mxConstants.STYLE_FONTCOLOR,e.font||mxUtils.getValue(d,mxConstants.STYLE_FONTCOLOR,null)))),mxEvent.isAltDown(a)||(o=""==e.stroke?mxUtils.setStyle(o,mxConstants.STYLE_STROKECOLOR,null):mxUtils.setStyle(o,mxConstants.STYLE_STROKECOLOR,e.stroke||mxUtils.getValue(d,mxConstants.STYLE_STROKECOLOR,null)))):(o=mxUtils.setStyle(o,mxConstants.STYLE_FILLCOLOR,mxUtils.getValue(d,mxConstants.STYLE_FILLCOLOR,"#ffffff")),o=mxUtils.setStyle(o,mxConstants.STYLE_STROKECOLOR,mxUtils.getValue(d,mxConstants.STYLE_STROKECOLOR,"#000000")),o=mxUtils.setStyle(o,mxConstants.STYLE_GRADIENTCOLOR,mxUtils.getValue(d,mxConstants.STYLE_GRADIENTCOLOR,null)),i.getModel().isVertex(n[r])&&(o=mxUtils.setStyle(o,mxConstants.STYLE_FONTCOLOR,mxUtils.getValue(d,mxConstants.STYLE_FONTCOLOR,null)))),i.getModel().setStyle(n[r],o)}}finally{i.getModel().endUpdate()}})));if(n.className="geStyleButton",n.style.width="36px",n.style.height=this.defaultColorSchemes.length<=10?"24px":"30px",n.style.margin="0px 6px 6px 0px",null!=e){var r="1"==urlParams.sketch?"2px solid":"1px solid";null!=e.gradient?mxClient.IS_IE&&document.documentMode<10?n.style.filter="progid:DXImageTransform.Microsoft.Gradient(StartColorStr='"+e.fill+"', EndColorStr='"+e.gradient+"', GradientType=0)":n.style.backgroundImage="linear-gradient("+e.fill+" 0px,"+e.gradient+" 100%)":e.fill==mxConstants.NONE?n.style.background="url('"+Dialog.prototype.noColorImage+"')":""==e.fill?n.style.backgroundColor=mxUtils.getValue(i.defaultVertexStyle,mxConstants.STYLE_FILLCOLOR,Editor.isDarkMode()?Editor.darkColor:"#ffffff"):n.style.backgroundColor=e.fill||mxUtils.getValue(i.defaultVertexStyle,mxConstants.STYLE_FILLCOLOR,Editor.isDarkMode()?Editor.darkColor:"#ffffff"),e.stroke==mxConstants.NONE?n.style.border=r+" transparent":""==e.stroke?n.style.border=r+" "+mxUtils.getValue(i.defaultVertexStyle,mxConstants.STYLE_STROKECOLOR,Editor.isDarkMode()?"#ffffff":Editor.darkColor):n.style.border=r+" "+(e.stroke||mxUtils.getValue(i.defaultVertexStyle,mxConstants.STYLE_STROKECOLOR,Editor.isDarkMode()?"#ffffff":Editor.darkColor)),null!=e.title&&n.setAttribute("title",e.title)}else{var o=mxUtils.getValue(i.defaultVertexStyle,mxConstants.STYLE_FILLCOLOR,"#ffffff"),s=mxUtils.getValue(i.defaultVertexStyle,mxConstants.STYLE_STROKECOLOR,"#000000");n.style.backgroundColor=o,n.style.border="1px solid "+s}n.style.borderRadius="0",a.appendChild(n)}));a.innerHTML="";for(var r=0;r<e.length;r++)r>0&&0==mxUtils.mod(r,4)&&mxUtils.br(a),n(e[r])}));null==this.format.currentScheme?d(Editor.isDarkMode()?1:"1"==urlParams.sketch?5:0):d(this.format.currentScheme);var m=this.defaultColorSchemes.length<=10?28:8,u=document.createElement("div");u.style.cssText="position:absolute;left:10px;top:8px;bottom:"+m+"px;width:20px;margin:4px;opacity:0.5;background-repeat:no-repeat;background-position:center center;background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAwAAAAQBAMAAADQT4M0AAAAIVBMVEUAAAB2dnZ4eHh3d3d1dXVxcXF2dnZ2dnZ2dnZxcXF2dnYmb3w1AAAACnRSTlMAfCTkhhvb7cQSPH2JPgAAADRJREFUCNdjwACMAmBKaiGYs2oJmLPKAZ3DabU8AMRTXpUKopislqFyVzCAuUZgikkBZjoAcMYLnp53P/UAAAAASUVORK5CYII=);",mxEvent.addListener(u,"click",mxUtils.bind(this,(function(){d(mxUtils.mod(this.format.currentScheme-1,this.defaultColorSchemes.length))})));var h=document.createElement("div");function c(e){mxEvent.addListener(e,"mouseenter",(function(){e.style.opacity="1"})),mxEvent.addListener(e,"mouseleave",(function(){e.style.opacity="0.5"}))}return h.style.cssText="position:absolute;left:202px;top:8px;bottom:"+m+"px;width:20px;margin:4px;opacity:0.5;background-repeat:no-repeat;background-position:center center;background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAwAAAAQBAMAAADQT4M0AAAAIVBMVEUAAAB2dnZ2dnZ2dnZ2dnZ2dnZ2dnZ2dnZ2dnZ2dnZ2dnYBuwCcAAAACnRSTlMAfCTkhhvb7cQSPH2JPgAAADZJREFUCNdjQAOMAmBKaiGY8loF5rKswsZlrVo8AUiFrTICcbIWK8A5DF1gDoMymMPApIAwHwCS0Qx/U7qCBQAAAABJRU5ErkJggg==);",this.defaultColorSchemes.length>1&&(e.appendChild(u),e.appendChild(h)),mxEvent.addListener(h,"click",mxUtils.bind(this,(function(){d(mxUtils.mod(this.format.currentScheme+1,this.defaultColorSchemes.length))}))),c(u),c(h),p(this.defaultColorSchemes[this.format.currentScheme]),this.defaultColorSchemes.length<=10&&e.appendChild(n),e},StyleFormatPanel.prototype.addEditOps=function(e){var t=this.editorUi.getSelectionState(),i=this.editorUi.editor.graph,a=null;1==t.cells.length&&(a=mxUtils.button(mxResources.get("editStyle"),mxUtils.bind(this,(function(e){this.editorUi.actions.get("editStyle").funct()}))),this.editorUi.actions.get("editStyle")&&a.setAttribute("title",mxResources.get("editStyle")+" ("+this.editorUi.actions.get("editStyle").shortcut+")"),a.style.width="210px",a.style.marginBottom="2px",this.editorUi.actions.get("editStyle")&&e.appendChild(a));var l=1==t.cells.length?i.view.getState(t.cells[0]):null;if(null!=l&&null!=l.shape&&null!=l.shape.stencil)(n=mxUtils.button(mxResources.get("editShape"),mxUtils.bind(this,(function(e){this.editorUi.actions.get("editShape").funct()})))).setAttribute("title",mxResources.get("editShape")),n.style.marginBottom="2px",null==a?n.style.width="210px":(a.style.width="104px",n.style.width="104px",n.style.marginLeft="2px"),e.appendChild(n);else if(t.image&&t.cells.length>0){var n;(n=mxUtils.button(mxResources.get("editImage"),mxUtils.bind(this,(function(e){this.editorUi.actions.get("image").funct()})))).setAttribute("title",mxResources.get("editImage")),n.style.marginBottom="2px",null==a?n.style.width="210px":(a.style.width="104px",n.style.width="104px",n.style.marginLeft="2px"),e.appendChild(n)}return e}}Graph.customFontElements={},Graph.recentCustomFonts={},Graph.isGoogleFontUrl=function(e){return e.substring(0,Editor.GOOGLE_FONTS.length)==Editor.GOOGLE_FONTS},Graph.isCssFontUrl=function(e){return Graph.isGoogleFontUrl(e)},Graph.createFontElement=function(e,t){var i=null;return Graph.isCssFontUrl(t)?((i=document.createElement("link")).setAttribute("rel","stylesheet"),i.setAttribute("type","text/css"),i.setAttribute("charset","UTF-8"),i.setAttribute("href",t)):(i=document.createElement("style"),mxUtils.write(i,'@font-face {\nfont-family: "'+e+'";\nsrc: url("'+t+'");\n}')),i},Graph.addFont=function(e,t,i){if(null!=e&&e.length>0&&null!=t&&t.length>0){var a=e.toLowerCase();if("helvetica"!=a&&"arial"!=e&&"sans-serif"!=a){var l=Graph.customFontElements[a];if(null!=l&&l.url!=t&&(l.elt.parentNode.removeChild(l.elt),l=null),null==l){var n=t;"http:"==t.substring(0,5)&&(n=PROXY_URL+"?url="+encodeURIComponent(t)),l={name:e,url:t,elt:Graph.createFontElement(e,n)},Graph.customFontElements[a]=l,Graph.recentCustomFonts[a]=l;var r=document.getElementsByTagName("head")[0];null!=i&&("link"==l.elt.nodeName.toLowerCase()?(l.elt.onload=i,l.elt.onerror=i):i()),null!=r&&r.appendChild(l.elt)}else null!=i&&i()}else null!=i&&i()}else null!=i&&i();return e},Graph.getFontUrl=function(e,t){var i=Graph.customFontElements[e.toLowerCase()];return null!=i&&(t=i.url),t},Graph.processFontAttributes=function(e){for(var t=e.getElementsByTagName("*"),i=0;i<t.length;i++){var a=t[i].getAttribute("data-font-src");if(null!=a){var l="FONT"==t[i].nodeName?t[i].getAttribute("face"):t[i].style.fontFamily;null!=l&&Graph.addFont(l,a)}}},Graph.processFontStyle=function(e){if(null!=e){var t=mxUtils.getValue(e,"fontSource",null);if(null!=t){var i=mxUtils.getValue(e,mxConstants.STYLE_FONTFAMILY,null);null!=i&&Graph.addFont(i,decodeURIComponent(t))}}return e},Graph.prototype.defaultThemeName="default-style2",Graph.prototype.lastPasteXml=null,Graph.prototype.pasteCounter=0,Graph.prototype.defaultScrollbars="0"!=urlParams.sb,Graph.prototype.defaultPageVisible="0"!=urlParams.pv,Graph.prototype.shadowId="dropShadow",Graph.prototype.svgShadowColor="#3D4574",Graph.prototype.svgShadowOpacity="0.4",Graph.prototype.svgShadowBlur="1.7",Graph.prototype.svgShadowSize="3",Graph.prototype.edgeMode="move"!=urlParams.edge,Graph.prototype.hiddenTags=null,Graph.prototype.defaultMathEnabled=!1;var A=Graph.prototype.init;Graph.prototype.init=function(){A.apply(this,arguments),this.hiddenTags=[],window.mxFreehand&&(this.freehand=new mxFreehand(this));var e=null;function t(t){e=t}mxEvent.addListener(this.container,"mouseenter",t),mxEvent.addListener(this.container,"mousemove",t),mxEvent.addListener(this.container,"mouseleave",(function(t){e=null})),this.isMouseInsertPoint=function(){return null!=e};var i=this.getInsertPoint;this.getInsertPoint=function(){return null!=e?this.getPointForEvent(e):i.apply(this,arguments)};var a=this.layoutManager.getLayout;this.layoutManager.getLayout=function(e){var t=this.graph.getCellStyle(e);if(null!=t&&"rack"==t.childLayout){var i=new mxStackLayout(this.graph,!1),l=20;return null!=t.rackUnitSize?i.gridSize=parseFloat(t.rackUnitSize):i.gridSize="undefined"!=typeof mxRackContainer?mxRackContainer.unitSize:l,i.marginLeft=t.marginLeft||0,i.marginRight=t.marginRight||0,i.marginTop=t.marginTop||0,i.marginBottom=t.marginBottom||0,i.allowGaps=t.allowGaps||0,i.horizontal="1"==mxUtils.getValue(t,"horizontalRack","0"),i.resizeParent=!1,i.fill=!0,i}return a.apply(this,arguments)},this.updateGlobalUrlVariables()};var y=Graph.prototype.postProcessCellStyle;Graph.prototype.postProcessCellStyle=function(e,t){return Graph.processFontStyle(y.apply(this,arguments))};var C=mxSvgCanvas2D.prototype.updateTextNodes;mxSvgCanvas2D.prototype.updateTextNodes=function(e,t,i,a,l,n,r,o,s,d,p){C.apply(this,arguments),Graph.processFontAttributes(p)};var x=mxText.prototype.redraw;mxText.prototype.redraw=function(){x.apply(this,arguments),null!=this.node&&"DIV"==this.node.nodeName&&Graph.processFontAttributes(this.node)},Graph.prototype.createTagsDialog=function(e,t,i){var l=this,n=l.hiddenTags.slice(),r=document.createElement("div");r.style.userSelect="none",r.style.overflow="hidden",r.style.padding="10px",r.style.height="100%";var o=document.createElement("div");function s(){for(var e=l.getSelectionCells(),t=[],i=0;i<e.length;i++)l.isCellVisible(e[i])&&t.push(e[i]);l.setSelectionCells(t)}function d(e){l.hiddenTags=e?[]:n.slice(),s(),l.refresh()}o.style.boxSizing="border-box",o.style.borderRadius="4px",o.style.userSelect="none",o.style.overflow="auto",o.style.position="absolute",o.style.left="10px",o.style.right="10px",o.style.top="10px",o.style.border=l.isEnabled()?"1px solid #808080":"none",o.style.bottom=l.isEnabled()?"48px":"10px",r.appendChild(o);var p=mxUtils.button(mxResources.get("reset"),(function(e){l.hiddenTags=[],mxEvent.isShiftDown(e)||(n=l.hiddenTags.slice()),s(),l.refresh()}));p.setAttribute("title",mxResources.get("reset")),p.className="geBtn",p.style.margin="0 4px 0 0";var m=mxUtils.button(mxResources.get("add"),(function(){null!=i&&i(n,(function(e){n=e,h()}))}));function u(e,i){if(o.innerHTML="",e.length>0){var r=document.createElement("table");r.setAttribute("cellpadding","2"),r.style.boxSizing="border-box",r.style.tableLayout="fixed",r.style.width="100%";var p=document.createElement("tbody");if(null!=e&&e.length>0)for(var m=0;m<e.length;m++)!function(e){var r=mxUtils.indexOf(l.hiddenTags,e)<0,o=document.createElement("tr"),m=document.createElement("td");if(m.style.align="center",m.style.width="16px",(u=document.createElement("img")).setAttribute("src",r?Editor.visibleImage:Editor.hiddenImage),u.setAttribute("title",mxResources.get(r?"hideIt":"show",[e])),mxUtils.setOpacity(u,r?75:25),u.style.verticalAlign="middle",u.style.cursor="pointer",u.style.width="16px",(t||Editor.isDarkMode())&&(u.style.filter="invert(100%)"),m.appendChild(u),mxEvent.addListener(u,"click",(function(t){var i=mxUtils.indexOf(l.hiddenTags,e);mxEvent.isShiftDown(t)?d(mxUtils.indexOf(l.hiddenTags,e)>=0):(i<0?l.hiddenTags.push(e):i>=0&&l.hiddenTags.splice(i,1),s(),l.refresh()),mxEvent.consume(t)})),o.appendChild(m),(m=document.createElement("td")).style.overflow="hidden",m.style.whiteSpace="nowrap",m.style.textOverflow="ellipsis",m.style.verticalAlign="middle",m.style.cursor="pointer",m.setAttribute("title",e),a=document.createElement("a"),mxUtils.write(a,e),a.style.textOverflow="ellipsis",a.style.position="relative",mxUtils.setOpacity(a,r?100:40),m.appendChild(a),mxEvent.addListener(m,"click",(function(t){var i,a,o;mxEvent.isShiftDown(t)?(d(!0),o=l.getCellsForTags([e],null,null,!0),l.isEnabled()?l.setSelectionCells(o):l.highlightCells(o)):r&&l.hiddenTags.length>0?d(!0):(i=n.slice(),a=mxUtils.indexOf(i,e),i.splice(a,1),l.hiddenTags=i,s(),l.refresh()),mxEvent.consume(t)})),o.appendChild(m),l.isEnabled()){if((m=document.createElement("td")).style.verticalAlign="middle",m.style.textAlign="center",m.style.width="18px",null==i){var u;m.style.align="center",m.style.width="16px",(u=document.createElement("img")).setAttribute("src",Editor.crossImage),u.setAttribute("title",mxResources.get("removeIt",[e])),mxUtils.setOpacity(u,r?75:25),u.style.verticalAlign="middle",u.style.cursor="pointer",u.style.width="16px",(t||Editor.isDarkMode())&&(u.style.filter="invert(100%)"),mxEvent.addListener(u,"click",(function(t){var i=mxUtils.indexOf(n,e);i>=0&&n.splice(i,1),l.removeTagsForCells(l.model.getDescendants(l.model.getRoot()),[e]),l.refresh(),mxEvent.consume(t)})),m.appendChild(u)}else{var h=document.createElement("input");h.setAttribute("type","checkbox"),h.style.margin="0px",h.defaultChecked=null!=i&&mxUtils.indexOf(i,e)>=0,h.checked=h.defaultChecked,h.style.background="transparent",h.setAttribute("title",mxResources.get(h.defaultChecked?"removeIt":"add",[e])),mxEvent.addListener(h,"change",(function(t){h.checked?l.addTagsForCells(l.getSelectionCells(),[e]):l.removeTagsForCells(l.getSelectionCells(),[e]),mxEvent.consume(t)})),m.appendChild(h)}o.appendChild(m)}p.appendChild(o)}(e[m]);r.appendChild(p),o.appendChild(r)}}m.setAttribute("title",mxResources.get("add")),m.className="geBtn",m.style.margin="0",l.addListener(mxEvent.ROOT,(function(){n=l.hiddenTags.slice()}));var h=mxUtils.bind(this,(function(t,i){if(e()){for(var a=l.getAllTags(),r=0;r<a.length;r++)mxUtils.indexOf(n,a[r])<0&&n.push(a[r]);n.sort(),l.isSelectionEmpty()?u(n):u(n,l.getCommonTagsForCells(l.getSelectionCells()))}}));l.selectionModel.addListener(mxEvent.CHANGE,h),l.model.addListener(mxEvent.CHANGE,h),l.addListener(mxEvent.REFRESH,h);var c=document.createElement("div");return c.style.boxSizing="border-box",c.style.whiteSpace="nowrap",c.style.position="absolute",c.style.overflow="hidden",c.style.bottom="0px",c.style.height="42px",c.style.right="10px",c.style.left="10px",l.isEnabled()&&(c.appendChild(p),c.appendChild(m),r.appendChild(c)),{div:r,refresh:h}},Graph.prototype.getCustomFonts=function(){var e=this.extFonts;for(var t in e=null!=e?e.slice():[],Graph.customFontElements){var i=Graph.customFontElements[t];e.push({name:i.name,url:i.url})}return e},Graph.prototype.setFont=function(e,t){if(Graph.addFont(e,t),document.execCommand("fontname",!1,e),null!=t){var i=this.cellEditor.textarea.getElementsByTagName("font");t=Graph.getFontUrl(e,t);for(var a=0;a<i.length;a++)i[a].getAttribute("face")==e&&i[a].getAttribute("data-font-src")!=t&&i[a].setAttribute("data-font-src",t)}};var b=Graph.prototype.isFastZoomEnabled;Graph.prototype.isFastZoomEnabled=function(){return b.apply(this,arguments)&&(!this.shadowVisible||!mxClient.IS_SF)},Graph.prototype.updateGlobalUrlVariables=function(){if(this.globalVars=Editor.globalVars,null!=urlParams.vars)try{this.globalVars=null!=this.globalVars?mxUtils.clone(this.globalVars):{};var e=JSON.parse(decodeURIComponent(urlParams.vars));if(null!=e)for(var t in e)this.globalVars[t]=e[t]}catch(e){null!=window.console&&console.log("Error in vars URL parameter: "+e)}},Graph.prototype.getExportVariables=function(){return null!=this.globalVars?mxUtils.clone(this.globalVars):{}};var v=Graph.prototype.getGlobalVariable;Graph.prototype.getGlobalVariable=function(e){var t=v.apply(this,arguments);return null==t&&null!=this.globalVars&&(t=this.globalVars[e]),t},Graph.prototype.getDefaultStylesheet=function(){if(null==this.defaultStylesheet){var e=this.themes["default-style2"],t=new mxCodec(e.ownerDocument);this.defaultStylesheet=t.decode(e)}return this.defaultStylesheet},Graph.prototype.isViewer=function(){return urlParams.viewer};var S=Graph.prototype.getSvg;Graph.prototype.getSvg=function(e,t,i,a,l,n,r,o,s,d,p,m,u,h){var c=null,g=null,f=null;m||null==this.themes||"darkTheme"!=this.defaultThemeName||(c=this.stylesheet,g=this.shapeForegroundColor,f=this.shapeBackgroundColor,this.shapeForegroundColor="darkTheme"==this.defaultThemeName?"#000000":Editor.lightColor,this.shapeBackgroundColor="darkTheme"==this.defaultThemeName?"#ffffff":Editor.darkColor,this.stylesheet=this.getDefaultStylesheet(),this.refresh());var A=S.apply(this,arguments),y=this.getCustomFonts();if(p&&y.length>0){var C=A.ownerDocument,x=null!=C.createElementNS?C.createElementNS(mxConstants.NS_SVG,"style"):C.createElement("style");null!=C.setAttributeNS?x.setAttributeNS("type","text/css"):x.setAttribute("type","text/css");for(var b="",v="",E=0;E<y.length;E++){var I=y[E].name,N=y[E].url;Graph.isCssFontUrl(N)?b+="@import url("+N+");\n":v+='@font-face {\nfont-family: "'+I+'";\nsrc: url("'+N+'");\n}\n'}x.appendChild(C.createTextNode(b+v)),A.getElementsByTagName("defs")[0].appendChild(x)}return null!=c&&(this.shapeBackgroundColor=f,this.shapeForegroundColor=g,this.stylesheet=c,this.refresh()),A};var E=Graph.prototype.createSvgImageExport;Graph.prototype.createSvgImageExport=function(){var e=E.apply(this,arguments);if(this.mathEnabled){var t=e.drawText;e.drawText=function(e,i){if(null!=e.text&&null!=e.text.value&&e.text.checkBounds()&&(mxUtils.isNode(e.text.value)||e.text.dialect==mxConstants.DIALECT_STRICTHTML)){var a=e.text.getContentNode();if(null!=a){if((a=a.cloneNode(!0)).getElementsByTagNameNS)for(var l=a.getElementsByTagNameNS("http://www.w3.org/1998/Math/MathML","math");l.length>0;)l[0].parentNode.removeChild(l[0]);if(null!=a.innerHTML){var n=e.text.value;e.text.value=a.innerHTML,t.apply(this,arguments),e.text.value=n}}}else t.apply(this,arguments)}}return e};var I=mxGraphView.prototype.validateBackgroundPage;mxGraphView.prototype.validateBackgroundPage=function(){if(I.apply(this,arguments),mxClient.IS_GC&&null!=this.getDrawPane()){var e=this.getDrawPane().parentNode;!this.graph.mathEnabled||mxClient.NO_FO||null!=this.webKitForceRepaintNode&&null!=this.webKitForceRepaintNode.parentNode||"svg"!=this.graph.container.firstChild.nodeName?null==this.webKitForceRepaintNode||this.graph.mathEnabled&&("svg"==this.graph.container.firstChild.nodeName||this.graph.container.firstChild==this.webKitForceRepaintNode)||(null!=this.webKitForceRepaintNode.parentNode&&this.webKitForceRepaintNode.parentNode.removeChild(this.webKitForceRepaintNode),this.webKitForceRepaintNode=null):(this.webKitForceRepaintNode=document.createElement("div"),this.webKitForceRepaintNode.style.cssText="position:absolute;",e.ownerSVGElement.parentNode.insertBefore(this.webKitForceRepaintNode,e.ownerSVGElement))}};var N=Graph.prototype.refresh;Graph.prototype.refresh=function(){N.apply(this,arguments),this.refreshBackgroundImage()},Graph.prototype.refreshBackgroundImage=function(){null!=this.backgroundImage&&null!=this.backgroundImage.originalSrc&&(this.setBackgroundImage(this.backgroundImage),this.view.validateBackgroundImage())};var M=Graph.prototype.loadStylesheet;Graph.prototype.loadStylesheet=function(){M.apply(this,arguments),this.currentStyle="default-style2"},Graph.prototype.handleCustomLink=function(e){if("data:action/json,"==e.substring(0,17)){var t=JSON.parse(e.substring(17));null!=t.actions&&this.executeCustomActions(t.actions)}},Graph.prototype.executeCustomActions=function(e,t){if(this.executingCustomActions)this.stoppingCustomActions=!0,null!=this.pendingWaitThread&&window.clearTimeout(this.pendingWaitThread),null!=this.pendingExecuteNextAction&&this.pendingExecuteNextAction(),this.fireEvent(new mxEventObject("stopExecutingCustomActions"));else{this.executingCustomActions=!0;var i=!1,a=0,l=0,n=mxUtils.bind(this,(function(){i||(i=!0,this.model.beginUpdate())})),r=mxUtils.bind(this,(function(){i&&(i=!1,this.model.endUpdate())})),o=mxUtils.bind(this,(function(){a>0&&a--,0==a&&s()})),s=mxUtils.bind(this,(function(){if(l<e.length){var i=this.stoppingCustomActions,d=e[l++],p=[];if(null!=d.open)if(r(),this.isCustomLink(d.open)){if(!this.customLinkClicked(d.open))return}else this.openLink(d.open);if(null==d.wait||i||(this.pendingExecuteNextAction=mxUtils.bind(this,(function(){this.pendingExecuteNextAction=null,this.pendingWaitThread=null,o()})),a++,this.pendingWaitThread=window.setTimeout(this.pendingExecuteNextAction,""!=d.wait?parseInt(d.wait):1e3),r()),null!=d.opacity&&null!=d.opacity.value&&Graph.setOpacityForNodes(this.getNodesForCells(this.getCellsForAction(d.opacity,!0)),d.opacity.value),null!=d.fadeIn&&(a++,Graph.fadeNodes(this.getNodesForCells(this.getCellsForAction(d.fadeIn,!0)),0,1,o,i?0:d.fadeIn.delay)),null!=d.fadeOut&&(a++,Graph.fadeNodes(this.getNodesForCells(this.getCellsForAction(d.fadeOut,!0)),1,0,o,i?0:d.fadeOut.delay)),null!=d.wipeIn&&(p=p.concat(this.createWipeAnimations(this.getCellsForAction(d.wipeIn,!0),!0))),null!=d.wipeOut&&(p=p.concat(this.createWipeAnimations(this.getCellsForAction(d.wipeOut,!0),!1))),null!=d.toggle&&(n(),this.toggleCells(this.getCellsForAction(d.toggle,!0))),null!=d.show){n();var m=this.getCellsForAction(d.show,!0);Graph.setOpacityForNodes(this.getNodesForCells(m),1),this.setCellsVisible(m,!0)}null!=d.hide&&(n(),m=this.getCellsForAction(d.hide,!0),Graph.setOpacityForNodes(this.getNodesForCells(m),0),this.setCellsVisible(m,!1)),null!=d.toggleStyle&&null!=d.toggleStyle.key&&(n(),this.toggleCellStyles(d.toggleStyle.key,null!=d.toggleStyle.defaultValue?d.toggleStyle.defaultValue:"0",this.getCellsForAction(d.toggleStyle,!0))),null!=d.style&&null!=d.style.key&&(n(),this.setCellStyles(d.style.key,d.style.value,this.getCellsForAction(d.style,!0)));var u=[];if(null!=d.select&&this.isEnabled()&&(u=this.getCellsForAction(d.select),this.setSelectionCells(u)),null!=d.highlight&&(u=this.getCellsForAction(d.highlight),this.highlightCells(u,d.highlight.color,d.highlight.duration,d.highlight.opacity)),null!=d.scroll&&(u=this.getCellsForAction(d.scroll)),null!=d.viewbox&&this.fitWindow(d.viewbox,d.viewbox.border),u.length>0&&this.scrollCellToVisible(u[0]),null!=d.tags){var h=[];if(null!=d.tags.hidden&&(h=h.concat(d.tags.hidden)),null!=d.tags.visible)for(var c=this.getAllTags(),g=0;g<c.length;g++)mxUtils.indexOf(d.tags.visible,c[g])<0&&mxUtils.indexOf(h,c[g])<0&&h.push(c[g]);this.hiddenTags=h,this.refresh()}p.length>0&&(a++,this.executeAnimations(p,o,i?1:d.steps,i?0:d.delay)),0==a?s():r()}else this.executingCustomActions=!1,this.stoppingCustomActions=!1,r(),null!=t&&t()}));s()}},Graph.prototype.doUpdateCustomLinksForCell=function(e,t){var i=this.getLinkForCell(t);if(null!=i&&"data:action/json,"==i.substring(0,17)&&this.setLinkForCell(t,this.updateCustomLink(e,i)),this.isHtmlLabel(t)){var a=document.createElement("div");a.innerHTML=this.sanitizeHtml(this.getLabel(t));for(var l=a.getElementsByTagName("a"),n=!1,r=0;r<l.length;r++)null!=(i=l[r].getAttribute("href"))&&"data:action/json,"==i.substring(0,17)&&(l[r].setAttribute("href",this.updateCustomLink(e,i)),n=!0);n&&this.labelChanged(t,a.innerHTML)}},Graph.prototype.updateCustomLink=function(e,t){if("data:action/json,"==t.substring(0,17))try{var i=JSON.parse(t.substring(17));null!=i.actions&&(this.updateCustomLinkActions(e,i.actions),t="data:action/json,"+JSON.stringify(i))}catch(e){}return t},Graph.prototype.updateCustomLinkActions=function(e,t){for(var i=0;i<t.length;i++){var a=t[i];for(var l in a)this.updateCustomLinkAction(e,a[l],"cells"),this.updateCustomLinkAction(e,a[l],"excludeCells")}},Graph.prototype.updateCustomLinkAction=function(e,t,i){if(null!=t&&null!=t[i]){for(var a=[],l=0;l<t[i].length;l++)if("*"==t[i][l])a.push(t[i][l]);else{var n=e[t[i][l]];null!=n?""!=n&&a.push(n):a.push(t[i][l])}t[i]=a}},Graph.prototype.getCellsForAction=function(e,t){var i=this.getCellsById(e.cells).concat(this.getCellsForTags(e.tags,null,t));if(null!=e.excludeCells){for(var a=[],l=0;l<i.length;l++)e.excludeCells.indexOf(i[l].id)<0&&a.push(i[l]);i=a}return i},Graph.prototype.getCellsById=function(e){var t=[];if(null!=e)for(var i=0;i<e.length;i++)if("*"==e[i]){var a=this.model.getRoot();t=t.concat(this.model.filterDescendants((function(e){return e!=a}),a))}else{var l=this.model.getCell(e[i]);null!=l&&t.push(l)}return t};var T=Graph.prototype.isCellVisible;Graph.prototype.isCellVisible=function(e){return T.apply(this,arguments)&&!this.isAllTagsHidden(this.getTagsForCell(e))},Graph.prototype.isAllTagsHidden=function(e){if(null==e||0==e.length||0==this.hiddenTags.length)return!1;var t=e.split(" ");if(t.length>this.hiddenTags.length)return!1;for(var i=0;i<t.length;i++)if(mxUtils.indexOf(this.hiddenTags,t[i])<0)return!1;return!0},Graph.prototype.getCellsForTags=function(e,t,i,a){var l=[];if(null!=e){t=null!=t?t:this.model.getDescendants(this.model.getRoot());for(var n=0,r={},o=0;o<e.length;o++)e[o].length>0&&(r[e[o]]=!0,n++);for(o=0;o<t.length;o++)if(i&&this.model.getParent(t[o])==this.model.root||this.model.isVertex(t[o])||this.model.isEdge(t[o])){var s=this.getTagsForCell(t[o]),d=!1;if(s.length>0){var p=s.split(" ");if(p.length>=e.length){for(var m=0,u=0;u<p.length&&m<n;u++)null!=r[p[u]]&&m++;d=m==n}}d&&(1!=a||this.isCellVisible(t[o]))&&l.push(t[o])}}return l},Graph.prototype.getAllTags=function(){return this.getTagsForCells(this.model.getDescendants(this.model.getRoot()))},Graph.prototype.getCommonTagsForCells=function(e){for(var t=null,i=[],a=0;a<e.length;a++){var l=this.getTagsForCell(e[a]);if(i=[],!(l.length>0))return[];for(var n=l.split(" "),r={},o=0;o<n.length;o++)null!=t&&null==t[n[o]]||(r[n[o]]=!0,i.push(n[o]));t=r}return i},Graph.prototype.getTagsForCells=function(e){for(var t=[],i={},a=0;a<e.length;a++){var l=this.getTagsForCell(e[a]);if(l.length>0)for(var n=l.split(" "),r=0;r<n.length;r++)null==i[n[r]]&&(i[n[r]]=!0,t.push(n[r]))}return t},Graph.prototype.getTagsForCell=function(e){return this.getAttributeForCell(e,"tags","")},Graph.prototype.addTagsForCells=function(e,t){if(e.length>0&&t.length>0){this.model.beginUpdate();try{for(var i=0;i<e.length;i++){for(var a=this.getTagsForCell(e[i]),l=a.split(" "),n=!1,r=0;r<t.length;r++){var o=mxUtils.trim(t[r]);""!=o&&mxUtils.indexOf(l,o)<0&&(a=a.length>0?a+" "+o:o,n=!0)}n&&this.setAttributeForCell(e[i],"tags",a)}}finally{this.model.endUpdate()}}},Graph.prototype.removeTagsForCells=function(e,t){if(e.length>0&&t.length>0){this.model.beginUpdate();try{for(var i=0;i<e.length;i++){var a=this.getTagsForCell(e[i]);if(a.length>0){for(var l=a.split(" "),n=!1,r=0;r<t.length;r++){var o=mxUtils.indexOf(l,t[r]);o>=0&&(l.splice(o,1),n=!0)}n&&this.setAttributeForCell(e[i],"tags",l.join(" "))}}}finally{this.model.endUpdate()}}},Graph.prototype.toggleCells=function(e){this.model.beginUpdate();try{for(var t=0;t<e.length;t++)this.model.setVisible(e[t],!this.model.isVisible(e[t]))}finally{this.model.endUpdate()}},Graph.prototype.setCellsVisible=function(e,t){this.model.beginUpdate();try{for(var i=0;i<e.length;i++)this.model.setVisible(e[i],t)}finally{this.model.endUpdate()}},Graph.prototype.highlightCells=function(e,t,i,a){for(var l=0;l<e.length;l++)this.highlightCell(e[l],t,i,a)},Graph.prototype.highlightCell=function(e,t,i,a){t=null!=t?t:mxConstants.DEFAULT_VALID_COLOR,i=null!=i?i:1e3;var l=this.view.getState(e);if(null!=l){var n=Math.max(5,mxUtils.getValue(l.style,mxConstants.STYLE_STROKEWIDTH,1)+4),r=new mxCellHighlight(this,t,n,!1);null!=a&&(r.opacity=a),r.highlight(l),window.setTimeout((function(){null!=r.shape&&(mxUtils.setPrefixedStyle(r.shape.node.style,"transition","all 1200ms ease-in-out"),r.shape.node.style.opacity=0),window.setTimeout((function(){r.destroy()}),1200)}),i)}},Graph.prototype.addSvgShadow=function(e,t,i,a){i=null!=i&&i,a=null==a||a;var l=e.ownerDocument,n=null!=l.createElementNS?l.createElementNS(mxConstants.NS_SVG,"filter"):l.createElement("filter");n.setAttribute("id",this.shadowId);var r=null!=l.createElementNS?l.createElementNS(mxConstants.NS_SVG,"feGaussianBlur"):l.createElement("feGaussianBlur");r.setAttribute("in","SourceAlpha"),r.setAttribute("stdDeviation",this.svgShadowBlur),r.setAttribute("result","blur"),n.appendChild(r);var o=null!=l.createElementNS?l.createElementNS(mxConstants.NS_SVG,"feOffset"):l.createElement("feOffset");o.setAttribute("in","blur"),o.setAttribute("dx",this.svgShadowSize),o.setAttribute("dy",this.svgShadowSize),o.setAttribute("result","offsetBlur"),n.appendChild(o);var s=null!=l.createElementNS?l.createElementNS(mxConstants.NS_SVG,"feFlood"):l.createElement("feFlood");s.setAttribute("flood-color",this.svgShadowColor),s.setAttribute("flood-opacity",this.svgShadowOpacity),s.setAttribute("result","offsetColor"),n.appendChild(s);var d=null!=l.createElementNS?l.createElementNS(mxConstants.NS_SVG,"feComposite"):l.createElement("feComposite");d.setAttribute("in","offsetColor"),d.setAttribute("in2","offsetBlur"),d.setAttribute("operator","in"),d.setAttribute("result","offsetBlur"),n.appendChild(d);var p=null!=l.createElementNS?l.createElementNS(mxConstants.NS_SVG,"feBlend"):l.createElement("feBlend");p.setAttribute("in","SourceGraphic"),p.setAttribute("in2","offsetBlur"),n.appendChild(p);var m=e.getElementsByTagName("defs"),u=null;if(0==m.length?(u=null!=l.createElementNS?l.createElementNS(mxConstants.NS_SVG,"defs"):l.createElement("defs"),null!=e.firstChild?e.insertBefore(u,e.firstChild):e.appendChild(u)):u=m[0],u.appendChild(n),!i&&null!=(t=null!=t?t:e.getElementsByTagName("g")[0])&&(t.setAttribute("filter","url(#"+this.shadowId+")"),!isNaN(parseInt(e.getAttribute("width")))&&a)){e.setAttribute("width",parseInt(e.getAttribute("width"))+6),e.setAttribute("height",parseInt(e.getAttribute("height"))+6);var c=e.getAttribute("viewBox");if(null!=c&&c.length>0){var g=c.split(" ");g.length>3&&(w=parseFloat(g[2])+6,h=parseFloat(g[3])+6,e.setAttribute("viewBox",g[0]+" "+g[1]+" "+w+" "+h))}}return n},Graph.prototype.setShadowVisible=function(e,t){mxClient.IS_SVG&&!mxClient.IS_SF&&(t=null==t||t,this.shadowVisible=e,this.shadowVisible?this.view.getDrawPane().setAttribute("filter","url(#"+this.shadowId+")"):this.view.getDrawPane().removeAttribute("filter"),t&&this.fireEvent(new mxEventObject("shadowVisibleChanged")))},Graph.prototype.selectUnlockedLayer=function(){if(null==this.defaultParent){var e=this.model.getChildCount(this.model.root),t=null,i=0;do{t=this.model.getChildAt(this.model.root,i)}while(i++<e&&"1"==mxUtils.getValue(this.getCellStyle(t),"locked","0"));null!=t&&this.setDefaultParent(t)}},mxStencilRegistry.libraries.mockup=[SHAPES_PATH+"/mockup/mxMockupButtons.js"],mxStencilRegistry.libraries.arrows2=[SHAPES_PATH+"/mxArrows.js"],mxStencilRegistry.libraries.atlassian=[STENCIL_PATH+"/atlassian.xml",SHAPES_PATH+"/mxAtlassian.js"],mxStencilRegistry.libraries.bpmn=[SHAPES_PATH+"/mxBasic.js",STENCIL_PATH+"/bpmn.xml",SHAPES_PATH+"/bpmn/mxBpmnShape2.js"],mxStencilRegistry.libraries.bpmn2=[SHAPES_PATH+"/mxBasic.js",STENCIL_PATH+"/bpmn.xml",SHAPES_PATH+"/bpmn/mxBpmnShape2.js"],mxStencilRegistry.libraries.c4=[SHAPES_PATH+"/mxC4.js"],mxStencilRegistry.libraries.cisco19=[SHAPES_PATH+"/mxCisco19.js",STENCIL_PATH+"/cisco19.xml"],mxStencilRegistry.libraries.cisco_safe=[SHAPES_PATH+"/mxCiscoSafe.js",STENCIL_PATH+"/cisco_safe/architecture.xml",STENCIL_PATH+"/cisco_safe/business_icons.xml",STENCIL_PATH+"/cisco_safe/capability.xml",STENCIL_PATH+"/cisco_safe/design.xml",STENCIL_PATH+"/cisco_safe/iot_things_icons.xml",STENCIL_PATH+"/cisco_safe/people_places_things_icons.xml",STENCIL_PATH+"/cisco_safe/security_icons.xml",STENCIL_PATH+"/cisco_safe/technology_icons.xml",STENCIL_PATH+"/cisco_safe/threat.xml"],mxStencilRegistry.libraries.dfd=[SHAPES_PATH+"/mxDFD.js"],mxStencilRegistry.libraries.er=[SHAPES_PATH+"/er/mxER.js"],mxStencilRegistry.libraries.kubernetes=[SHAPES_PATH+"/mxKubernetes.js",STENCIL_PATH+"/kubernetes.xml"],mxStencilRegistry.libraries.flowchart=[SHAPES_PATH+"/mxFlowchart.js",STENCIL_PATH+"/flowchart.xml"],mxStencilRegistry.libraries.ios=[SHAPES_PATH+"/mockup/mxMockupiOS.js"],mxStencilRegistry.libraries.rackGeneral=[SHAPES_PATH+"/rack/mxRack.js",STENCIL_PATH+"/rack/general.xml"],mxStencilRegistry.libraries.rackF5=[STENCIL_PATH+"/rack/f5.xml"],mxStencilRegistry.libraries.lean_mapping=[SHAPES_PATH+"/mxLeanMap.js",STENCIL_PATH+"/lean_mapping.xml"],mxStencilRegistry.libraries.basic=[SHAPES_PATH+"/mxBasic.js",STENCIL_PATH+"/basic.xml"],mxStencilRegistry.libraries.ios7icons=[STENCIL_PATH+"/ios7/icons.xml"],mxStencilRegistry.libraries.ios7ui=[SHAPES_PATH+"/ios7/mxIOS7Ui.js",STENCIL_PATH+"/ios7/misc.xml"],mxStencilRegistry.libraries.android=[SHAPES_PATH+"/mxAndroid.js",STENCIL_PATH+"/android/android.xml"],mxStencilRegistry.libraries["electrical/abstract"]=[SHAPES_PATH+"/mxElectrical.js",STENCIL_PATH+"/electrical/abstract.xml"],mxStencilRegistry.libraries["electrical/logic_gates"]=[SHAPES_PATH+"/mxElectrical.js",STENCIL_PATH+"/electrical/logic_gates.xml"],mxStencilRegistry.libraries["electrical/miscellaneous"]=[SHAPES_PATH+"/mxElectrical.js",STENCIL_PATH+"/electrical/miscellaneous.xml"],mxStencilRegistry.libraries["electrical/signal_sources"]=[SHAPES_PATH+"/mxElectrical.js",STENCIL_PATH+"/electrical/signal_sources.xml"],mxStencilRegistry.libraries["electrical/transmission"]=[SHAPES_PATH+"/mxElectrical.js",STENCIL_PATH+"/electrical/transmission.xml"],mxStencilRegistry.libraries.infographic=[SHAPES_PATH+"/mxInfographic.js"],mxStencilRegistry.libraries["mockup/buttons"]=[SHAPES_PATH+"/mockup/mxMockupButtons.js"],mxStencilRegistry.libraries["mockup/containers"]=[SHAPES_PATH+"/mockup/mxMockupContainers.js"],mxStencilRegistry.libraries["mockup/forms"]=[SHAPES_PATH+"/mockup/mxMockupForms.js"],mxStencilRegistry.libraries["mockup/graphics"]=[SHAPES_PATH+"/mockup/mxMockupGraphics.js",STENCIL_PATH+"/mockup/misc.xml"],mxStencilRegistry.libraries["mockup/markup"]=[SHAPES_PATH+"/mockup/mxMockupMarkup.js"],mxStencilRegistry.libraries["mockup/misc"]=[SHAPES_PATH+"/mockup/mxMockupMisc.js",STENCIL_PATH+"/mockup/misc.xml"],mxStencilRegistry.libraries["mockup/navigation"]=[SHAPES_PATH+"/mockup/mxMockupNavigation.js",STENCIL_PATH+"/mockup/misc.xml"],mxStencilRegistry.libraries["mockup/text"]=[SHAPES_PATH+"/mockup/mxMockupText.js"],mxStencilRegistry.libraries.floorplan=[SHAPES_PATH+"/mxFloorplan.js",STENCIL_PATH+"/floorplan.xml"],mxStencilRegistry.libraries.bootstrap=[SHAPES_PATH+"/mxBootstrap.js",SHAPES_PATH+"/mxBasic.js",STENCIL_PATH+"/bootstrap.xml"],mxStencilRegistry.libraries.gmdl=[SHAPES_PATH+"/mxGmdl.js",STENCIL_PATH+"/gmdl.xml"],mxStencilRegistry.libraries.gcp2=[SHAPES_PATH+"/mxGCP2.js",STENCIL_PATH+"/gcp2.xml"],mxStencilRegistry.libraries.ibm=[SHAPES_PATH+"/mxIBM.js",STENCIL_PATH+"/ibm.xml"],mxStencilRegistry.libraries.cabinets=[SHAPES_PATH+"/mxCabinets.js",STENCIL_PATH+"/cabinets.xml"],mxStencilRegistry.libraries.archimate=[SHAPES_PATH+"/mxArchiMate.js"],mxStencilRegistry.libraries.archimate3=[SHAPES_PATH+"/mxArchiMate3.js"],mxStencilRegistry.libraries.sysml=[SHAPES_PATH+"/mxSysML.js"],mxStencilRegistry.libraries.eip=[SHAPES_PATH+"/mxEip.js",STENCIL_PATH+"/eip.xml"],mxStencilRegistry.libraries.networks=[SHAPES_PATH+"/mxNetworks.js",STENCIL_PATH+"/networks.xml"],mxStencilRegistry.libraries.aws3d=[SHAPES_PATH+"/mxAWS3D.js",STENCIL_PATH+"/aws3d.xml"],mxStencilRegistry.libraries.aws4=[SHAPES_PATH+"/mxAWS4.js",STENCIL_PATH+"/aws4.xml"],mxStencilRegistry.libraries.aws4b=[SHAPES_PATH+"/mxAWS4.js",STENCIL_PATH+"/aws4.xml"],mxStencilRegistry.libraries.uml25=[SHAPES_PATH+"/mxUML25.js"],mxStencilRegistry.libraries.veeam=[STENCIL_PATH+"/veeam/2d.xml",STENCIL_PATH+"/veeam/3d.xml",STENCIL_PATH+"/veeam/veeam.xml"],mxStencilRegistry.libraries.veeam2=[STENCIL_PATH+"/veeam/2d.xml",STENCIL_PATH+"/veeam/3d.xml",STENCIL_PATH+"/veeam/veeam2.xml"],mxStencilRegistry.libraries.pid2inst=[SHAPES_PATH+"/pid2/mxPidInstruments.js"],mxStencilRegistry.libraries.pid2misc=[SHAPES_PATH+"/pid2/mxPidMisc.js",STENCIL_PATH+"/pid/misc.xml"],mxStencilRegistry.libraries.pid2valves=[SHAPES_PATH+"/pid2/mxPidValves.js"],mxStencilRegistry.libraries.pidFlowSensors=[STENCIL_PATH+"/pid/flow_sensors.xml"],mxMarker.getPackageForType=function(e){var t=null;return null!=e&&e.length>0&&("ER"==e.substring(0,2)?t="mxgraph.er":"sysML"==e.substring(0,5)&&(t="mxgraph.sysml")),t};var L=mxMarker.createMarker;mxMarker.createMarker=function(e,t,i,a,l,n,r,o,s,d){if(null!=i){var p=mxMarker.markers[i];if(null==p){var m=this.getPackageForType(i);null!=m&&mxStencilRegistry.getStencil(m)}}return L.apply(this,arguments)},PrintDialog.prototype.create=function(e,t){var i=e.editor.graph,a=document.createElement("div"),l=document.createElement("h3");l.style.width="100%",l.style.textAlign="center",l.style.marginTop="0px",mxUtils.write(l,t||mxResources.get("print")),a.appendChild(l);var n=1,r=1,o=document.createElement("div");o.style.cssText="border-bottom:1px solid lightGray;padding-bottom:12px;margin-bottom:12px;";var s=document.createElement("input");s.style.cssText="margin-right:8px;margin-bottom:8px;",s.setAttribute("value","all"),s.setAttribute("type","radio"),s.setAttribute("name","pages-printdialog"),o.appendChild(s);var d=document.createElement("span");mxUtils.write(d,mxResources.get("printAllPages")),o.appendChild(d),mxUtils.br(o);var p=s.cloneNode(!0);s.setAttribute("checked","checked"),p.setAttribute("value","range"),o.appendChild(p),d=document.createElement("span"),mxUtils.write(d,mxResources.get("pages")+":"),o.appendChild(d);var m=document.createElement("input");m.style.cssText="margin:0 8px 0 8px;",m.setAttribute("value","1"),m.setAttribute("type","number"),m.setAttribute("min","1"),m.style.width="50px",o.appendChild(m),d=document.createElement("span"),mxUtils.write(d,mxResources.get("to")),o.appendChild(d);var u=m.cloneNode(!0);function h(){u.value=Math.max(1,Math.min(n,Math.max(parseInt(u.value),parseInt(m.value)))),m.value=Math.max(1,Math.min(n,Math.min(parseInt(u.value),parseInt(m.value))))}if(o.appendChild(u),mxEvent.addListener(m,"focus",(function(){p.checked=!0})),mxEvent.addListener(u,"focus",(function(){p.checked=!0})),mxEvent.addListener(m,"change",h),mxEvent.addListener(u,"change",h),null!=e.pages&&(n=e.pages.length,null!=e.currentPage))for(var c=0;c<e.pages.length;c++)if(e.currentPage==e.pages[c]){r=c+1,m.value=r,u.value=r;break}m.setAttribute("max",n),u.setAttribute("max",n),e.isPagesEnabled()?n>1&&(a.appendChild(o),p.checked=!0):p.checked=!0;var g=document.createElement("div");g.style.marginBottom="10px";var f=document.createElement("input");f.style.marginRight="8px",f.setAttribute("value","adjust"),f.setAttribute("type","radio"),f.setAttribute("name","printZoom"),g.appendChild(f),d=document.createElement("span"),mxUtils.write(d,mxResources.get("adjustTo")),g.appendChild(d);var A=document.createElement("input");A.style.cssText="margin:0 8px 0 8px;",A.setAttribute("value","100 %"),A.style.width="50px",g.appendChild(A),mxEvent.addListener(A,"focus",(function(){f.checked=!0})),a.appendChild(g);var y=o.cloneNode(!1),C=f.cloneNode(!0);C.setAttribute("value","fit"),f.setAttribute("checked","checked");var x=document.createElement("div");x.style.cssText="display:inline-block;height:100%;vertical-align:top;padding-top:2px;",x.appendChild(C),y.appendChild(x);var b=document.createElement("table");b.style.display="inline-block";var v=document.createElement("tbody"),S=document.createElement("tr"),E=S.cloneNode(!0),I=document.createElement("td"),N=I.cloneNode(!0),M=I.cloneNode(!0),w=I.cloneNode(!0),T=I.cloneNode(!0),L=I.cloneNode(!0);I.style.textAlign="right",w.style.textAlign="right",mxUtils.write(I,mxResources.get("fitTo"));var D=document.createElement("input");D.style.cssText="margin:0 8px 0 8px;",D.setAttribute("value","1"),D.setAttribute("min","1"),D.setAttribute("type","number"),D.style.width="40px",N.appendChild(D),d=document.createElement("span"),mxUtils.write(d,mxResources.get("fitToSheetsAcross")),M.appendChild(d),mxUtils.write(w,mxResources.get("fitToBy"));var P=D.cloneNode(!0);T.appendChild(P),mxEvent.addListener(D,"focus",(function(){C.checked=!0})),mxEvent.addListener(P,"focus",(function(){C.checked=!0})),d=document.createElement("span"),mxUtils.write(d,mxResources.get("fitToSheetsDown")),L.appendChild(d),S.appendChild(I),S.appendChild(N),S.appendChild(M),E.appendChild(w),E.appendChild(T),E.appendChild(L),v.appendChild(S),v.appendChild(E),b.appendChild(v),y.appendChild(b),a.appendChild(y);var k=document.createElement("div");(d=document.createElement("div")).style.fontWeight="bold",d.style.marginBottom="12px",mxUtils.write(d,mxResources.get("paperSize")),k.appendChild(d),(d=document.createElement("div")).style.marginBottom="12px";var j=PageSetupDialog.addPageFormatPanel(d,"printdialog",e.editor.graph.pageFormat||mxConstants.PAGE_FORMAT_A4_PORTRAIT);k.appendChild(d),d=document.createElement("span"),mxUtils.write(d,mxResources.get("pageScale")),k.appendChild(d);var F=document.createElement("input");F.style.cssText="margin:0 8px 0 8px;",F.setAttribute("value","100 %"),F.style.width="60px",k.appendChild(F),a.appendChild(k);var U=document.createElement("div");function R(t){var a=parseInt(F.value)/100;isNaN(a)&&(a=1,F.value="100 %"),a*=.75;var l=null;function n(t,l,n){var r=t.useCssTransforms,o=t.currentTranslate,s=t.currentScale,d=t.view.translate,p=t.view.scale;t.useCssTransforms&&(t.useCssTransforms=!1,t.currentTranslate=new mxPoint(0,0),t.currentScale=1,t.view.translate=new mxPoint(0,0),t.view.scale=1);var m=t.getGraphBounds(),u=0,h=0,c=j.get(),g=1/t.pageScale,f=C.checked;if(f){var y=parseInt(D.value),x=parseInt(P.value);g=Math.min(c.height*x/(m.height/t.view.scale),c.width*y/(m.width/t.view.scale))}else g=parseInt(A.value)/(100*t.pageScale),isNaN(g)&&(a=1/t.pageScale,A.value="100 %");if((c=mxRectangle.fromRectangle(c)).width=Math.ceil(c.width*a),c.height=Math.ceil(c.height*a),g*=a,!f&&t.pageVisible){var b=t.getPageLayout();u-=b.x*c.width,h-=b.y*c.height}else f=!0;if(null==l){(l=PrintDialog.createPrintPreview(t,g,c,0,u,h,f)).pageSelector=!1,l.mathEnabled=!1;var v=e.getCurrentFile();null!=v&&(l.title=v.getTitle());var S=l.writeHead;if(l.writeHead=function(i){S.apply(this,arguments),(mxClient.IS_GC||mxClient.IS_SF)&&(i.writeln('<style type="text/css">'),i.writeln(Editor.mathJaxWebkitCss),i.writeln("</style>")),mxClient.IS_GC&&(i.writeln('<style type="text/css">'),i.writeln("@media print {"),i.writeln("span.MathJax_SVG svg { shape-rendering: crispEdges; }"),i.writeln("}"),i.writeln("</style>")),null!=e.editor.fontCss&&(i.writeln('<style type="text/css">'),i.writeln(e.editor.fontCss),i.writeln("</style>"));for(var a=t.getCustomFonts(),l=0;l<a.length;l++){var n=a[l].name,r=a[l].url;Graph.isCssFontUrl(r)?i.writeln('<link rel="stylesheet" href="'+mxUtils.htmlEntities(r)+'" charset="UTF-8" type="text/css">'):(i.writeln('<style type="text/css">'),i.writeln('@font-face {\nfont-family: "'+mxUtils.htmlEntities(n)+'";\nsrc: url("'+mxUtils.htmlEntities(r)+'");\n}'),i.writeln("</style>"))}},"undefined"!=typeof MathJax){var E=l.renderPage;l.renderPage=function(t,i,a,l,n,r){var o=mxClient.NO_FO;mxClient.NO_FO=!(!this.graph.mathEnabled||e.editor.useForeignObjectForMath)||e.editor.originalNoForeignObject;var s=E.apply(this,arguments);return mxClient.NO_FO=o,this.graph.mathEnabled?this.mathEnabled=this.mathEnabled||!0:s.className="geDisableMathJax",s}}var I=null,N=i.enableFlowAnimation;i.enableFlowAnimation=!1,null!=i.themes&&"darkTheme"==i.defaultThemeName&&(I=i.stylesheet,i.stylesheet=i.getDefaultStylesheet(),i.refresh()),l.open(null,null,n,!0),i.enableFlowAnimation=N,null!=I&&(i.stylesheet=I,i.refresh())}else{var M=t.background;null!=M&&""!=M&&M!=mxConstants.NONE||(M="#ffffff"),l.backgroundColor=M,l.autoOrigin=f,l.appendGraph(t,g,u,h,n,!0);var w=t.getCustomFonts();if(null!=l.wnd)for(var T=0;T<w.length;T++){var L=w[T].name,k=w[T].url;Graph.isCssFontUrl(k)?l.wnd.document.writeln('<link rel="stylesheet" href="'+mxUtils.htmlEntities(k)+'" charset="UTF-8" type="text/css">'):(l.wnd.document.writeln('<style type="text/css">'),l.wnd.document.writeln('@font-face {\nfont-family: "'+mxUtils.htmlEntities(L)+'";\nsrc: url("'+mxUtils.htmlEntities(k)+'");\n}'),l.wnd.document.writeln("</style>"))}}return r&&(t.useCssTransforms=r,t.currentTranslate=o,t.currentScale=s,t.view.translate=d,t.view.scale=p),l}null!=i.themes&&"darkTheme"==i.defaultThemeName&&(l=i.stylesheet,i.stylesheet=i.getDefaultStylesheet(),i.refresh());var o=m.value,d=u.value,p=!s.checked,h=null;if(EditorUi.isElectronApp)PrintDialog.electronPrint(e,s.checked,o,d,C.checked,D.value,P.value,parseInt(A.value)/100,parseInt(F.value)/100,j.get());else{if(p&&(p=o==r&&d==r),!p&&null!=e.pages&&e.pages.length){var c=0,g=e.pages.length-1;s.checked||(c=parseInt(o)-1,g=parseInt(d)-1);for(var f=c;f<=g;f++){var y=e.pages[f],x=y==e.currentPage?i:null;if(null==x){x=e.createTemporaryGraph(i.stylesheet);var b=!0,v=!1,S=null,E=null;null==y.viewState&&null==y.root&&e.updatePageRoot(y),null!=y.viewState&&(b=y.viewState.pageVisible,v=y.viewState.mathEnabled,S=y.viewState.background,E=y.viewState.backgroundImage,x.extFonts=y.viewState.extFonts),x.background=S,x.backgroundImage=null!=E?new mxImage(E.src,E.width,E.height):null,x.pageVisible=b,x.mathEnabled=v;var I=x.getGlobalVariable;x.getGlobalVariable=function(t){return"page"==t?y.getName():"pagenumber"==t?f+1:"pagecount"==t?null!=e.pages?e.pages.length:1:I.apply(this,arguments)},e.container.appendChild(x.container)||document.body.appendChild(x.container),e.updatePageRoot(y),x.model.setRoot(y.root)}h=n(x,h,f!=g),x!=i&&x.container.parentNode.removeChild(x.container)}}else h=n(i);if(null==h)e.handleError({message:mxResources.get("errorUpdatingPreview")});else{if(h.mathEnabled){var N=h.wnd.document;t&&(h.wnd.IMMEDIATE_PRINT=!0),N.writeln('<script type="text/javascript" src="'+DRAWIO_BASE_URL+'/js/math-print.js"><\/script>')}h.closeDocument(),!h.mathEnabled&&t&&PrintDialog.printPreview(h)}null!=l&&(i.stylesheet=l,i.refresh())}}U.style.cssText="text-align:right;margin:48px 0 0 0;";var V=mxUtils.button(mxResources.get("cancel"),(function(){e.hideDialog()}));if(V.className="geBtn",e.editor.cancelFirst&&U.appendChild(V),!e.isOffline()){var O=mxUtils.button(mxResources.get("help"),(function(){i.openLink("https://www.diagrams.net/doc/faq/print-diagram")}));O.className="geBtn",U.appendChild(O)}if(PrintDialog.previewEnabled){var G=mxUtils.button(mxResources.get("preview"),(function(){e.hideDialog(),R(!1)}));G.className="geBtn",U.appendChild(G)}var z=mxUtils.button(mxResources.get(PrintDialog.previewEnabled?"print":"ok"),(function(){e.hideDialog(),R(!0)}));z.className="geBtn gePrimaryBtn",U.appendChild(z),e.editor.cancelFirst||U.appendChild(V),a.appendChild(U),this.container=a};var D=ChangePageSetup.prototype.execute;ChangePageSetup.prototype.execute=function(){if(null==this.page&&(this.page=this.ui.currentPage),this.page!=this.ui.currentPage){if(null!=this.page.viewState){if(this.ignoreColor||(this.page.viewState.background=this.color),!this.ignoreImage){var e=this.image;null!=e&&null!=e.src&&Graph.isPageLink(e.src)&&(e={originalSrc:e.src}),this.page.viewState.backgroundImage=e}null!=this.format&&(this.page.viewState.pageFormat=this.format),null!=this.mathEnabled&&(this.page.viewState.mathEnabled=this.mathEnabled),null!=this.shadowVisible&&(this.page.viewState.shadowVisible=this.shadowVisible)}}else D.apply(this,arguments),null!=this.mathEnabled&&this.mathEnabled!=this.ui.isMathEnabled()&&(this.ui.setMathEnabled(this.mathEnabled),this.mathEnabled=!this.mathEnabled),null!=this.shadowVisible&&this.shadowVisible!=this.ui.editor.graph.shadowVisible&&(this.ui.editor.graph.setShadowVisible(this.shadowVisible),this.shadowVisible=!this.shadowVisible)},Editor.prototype.useCanvasForExport=!1;try{var P=document.createElement("canvas"),k=new Image;k.onload=function(){try{P.getContext("2d").drawImage(k,0,0);var e=P.toDataURL("image/png");Editor.prototype.useCanvasForExport=null!=e&&e.length>6}catch(e){}},k.src="data:image/svg+xml;base64,"+btoa(unescape(encodeURIComponent('<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="1px" height="1px" version="1.1"><foreignObject pointer-events="all" width="1" height="1"><div xmlns="http://www.w3.org/1999/xhtml"></div></foreignObject></svg>')))}catch(e){}}(),function(){var e=new mxObjectCodec(new ChangePageSetup,["ui","previousColor","previousImage","previousFormat"]);e.beforeDecode=function(e,t,i){return i.ui=e.ui,t},e.afterDecode=function(e,t,i){return i.previousColor=i.color,i.previousImage=i.image,i.previousFormat=i.format,null!=i.foldingEnabled&&(i.foldingEnabled=!i.foldingEnabled),null!=i.mathEnabled&&(i.mathEnabled=!i.mathEnabled),null!=i.shadowVisible&&(i.shadowVisible=!i.shadowVisible),i},mxCodecRegistry.register(e)}(),function(){var e=new mxObjectCodec(new ChangeGridColor,["ui"]);e.beforeDecode=function(e,t,i){return i.ui=e.ui,t},mxCodecRegistry.register(e)}();