diff --git a/ChangeLog b/ChangeLog
index cab35914b3e5aaace1043c74b0488aea7ebe33f3..1c81bfc32e1d451283b00cf681d673a888afbe89 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+10-OCT-2017: 7.5.5
+
+- Hides tooltips for page links
+- Fixes scrollwheel zooming with no scrollbars in chromeless mode
+- Uses mxGraph 3.7.6 beta 3
+
 09-OCT-2017: 7.5.4
 
 - Adds missing page option in insert link dialog
diff --git a/VERSION b/VERSION
index a0e1e886a2dc7634ff508c835da6cd7703ca237f..c25dbee88bf8faf182b30876c1d57304a69f536b 100644
--- a/VERSION
+++ b/VERSION
@@ -1 +1 @@
-7.5.4
\ No newline at end of file
+7.5.5
\ No newline at end of file
diff --git a/etc/mxgraph/mxClient.js b/etc/mxgraph/mxClient.js
index 200c1d04c0464997403518eae687b5af3b30d96d..4888aa12c86b1fa2330e5f8d2c2b7389affa24e4 100644
--- a/etc/mxgraph/mxClient.js
+++ b/etc/mxgraph/mxClient.js
@@ -1461,8 +1461,8 @@ g=this.getAlignmentTolerance();if(0<g){var k=this.graph.view.getState(b);if(null
 mxConnectionHandler.prototype.createEdge=function(a,b,c,d){var e=null;null!=this.factoryMethod&&(e=this.factoryMethod(b,c,d));null==e&&(e=new mxCell(a||""),e.setEdge(!0),e.setStyle(d),a=new mxGeometry,a.relative=!0,e.setGeometry(a));return e};
 mxConnectionHandler.prototype.destroy=function(){this.graph.removeMouseListener(this);null!=this.shape&&(this.shape.destroy(),this.shape=null);null!=this.marker&&(this.marker.destroy(),this.marker=null);null!=this.constraintHandler&&(this.constraintHandler.destroy(),this.constraintHandler=null);null!=this.changeHandler&&(this.graph.getModel().removeListener(this.changeHandler),this.graph.getView().removeListener(this.changeHandler),this.changeHandler=null);null!=this.drillHandler&&(this.graph.removeListener(this.drillHandler),
 this.graph.getView().removeListener(this.drillHandler),this.drillHandler=null);null!=this.escapeHandler&&(this.graph.removeListener(this.escapeHandler),this.escapeHandler=null)};
-function mxConstraintHandler(a){this.graph=a;this.resetHandler=mxUtils.bind(this,function(a,c){null!=this.currentFocus&&null==this.graph.view.getState(this.currentFocus.cell)?this.reset():this.redraw()});this.graph.model.addListener(mxEvent.CHANGE,this.resetHandler);this.graph.view.addListener(mxEvent.SCALE,this.resetHandler);this.graph.addListener(mxEvent.ROOT,this.resetHandler)}mxConstraintHandler.prototype.pointImage=new mxImage(mxClient.imageBasePath+"/point.gif",5,5);
-mxConstraintHandler.prototype.graph=null;mxConstraintHandler.prototype.enabled=!0;mxConstraintHandler.prototype.highlightColor=mxConstants.DEFAULT_VALID_COLOR;mxConstraintHandler.prototype.isEnabled=function(){return this.enabled};mxConstraintHandler.prototype.setEnabled=function(a){this.enabled=a};
+function mxConstraintHandler(a){this.graph=a;this.resetHandler=mxUtils.bind(this,function(a,c){null!=this.currentFocus&&null==this.graph.view.getState(this.currentFocus.cell)?this.reset():this.redraw()});this.graph.model.addListener(mxEvent.CHANGE,this.resetHandler);this.graph.view.addListener(mxEvent.SCALE_AND_TRANSLATE,this.resetHandler);this.graph.view.addListener(mxEvent.TRANSLATE,this.resetHandler);this.graph.view.addListener(mxEvent.SCALE,this.resetHandler);this.graph.addListener(mxEvent.ROOT,
+this.resetHandler)}mxConstraintHandler.prototype.pointImage=new mxImage(mxClient.imageBasePath+"/point.gif",5,5);mxConstraintHandler.prototype.graph=null;mxConstraintHandler.prototype.enabled=!0;mxConstraintHandler.prototype.highlightColor=mxConstants.DEFAULT_VALID_COLOR;mxConstraintHandler.prototype.isEnabled=function(){return this.enabled};mxConstraintHandler.prototype.setEnabled=function(a){this.enabled=a};
 mxConstraintHandler.prototype.reset=function(){if(null!=this.focusIcons){for(var a=0;a<this.focusIcons.length;a++)this.focusIcons[a].destroy();this.focusIcons=null}null!=this.focusHighlight&&(this.focusHighlight.destroy(),this.focusHighlight=null);this.focusPoints=this.currentFocus=this.currentPoint=this.currentFocusArea=this.currentConstraint=null};mxConstraintHandler.prototype.getTolerance=function(a){return this.graph.getTolerance()};
 mxConstraintHandler.prototype.getImageForConstraint=function(a,b,c){return this.pointImage};mxConstraintHandler.prototype.isEventIgnored=function(a,b){return!1};mxConstraintHandler.prototype.isStateIgnored=function(a,b){return!1};mxConstraintHandler.prototype.destroyIcons=function(){if(null!=this.focusIcons){for(var a=0;a<this.focusIcons.length;a++)this.focusIcons[a].destroy();this.focusPoints=this.focusIcons=null}};
 mxConstraintHandler.prototype.destroyFocusHighlight=function(){null!=this.focusHighlight&&(this.focusHighlight.destroy(),this.focusHighlight=null)};mxConstraintHandler.prototype.isKeepFocusEvent=function(a){return mxEvent.isShiftDown(a.getEvent())};
diff --git a/src/com/mxgraph/io/gliffy/importer/gliffyTranslation.properties b/src/com/mxgraph/io/gliffy/importer/gliffyTranslation.properties
index 6a548dacbac080cae9c90bc776d247fd6c8bd8f7..28abac7a1eb489576eba22dc78f0e46b876cef28 100644
--- a/src/com/mxgraph/io/gliffy/importer/gliffyTranslation.properties
+++ b/src/com/mxgraph/io/gliffy/importer/gliffyTranslation.properties
@@ -1002,7 +1002,7 @@ com.gliffy.shape.cisco.cisco_v1.switches.workgroup_switch=mxgraph.cisco.switches
 # CISCO WIRELESS
 com.gliffy.shape.cisco.cisco_v1.wireless.antenna=mxgraph.cisco.wireless.antenna;strokeColor=#ffffff
 com.gliffy.shape.cisco.cisco_v1.wireless.ground_terminal=mxgraph.cisco.wireless.ground_terminal;strokeColor=#ffffff
-com.gliffy.shape.cisco.cisco_v1.wireless.radio_tower=mxgraph.cisco.wireless.radio_tower;strokeColor=#ffffff
+com.gliffy.shape.cisco.cisco_v1.wireless.radio_tower=mxgraph.cisco.wireless.radio_tower;fillColor=#02709F;strokeColor=#02709F
 com.gliffy.shape.cisco.cisco_v1.wireless.sattelite=mxgraph.cisco.wireless.satellite;strokeColor=#ffffff
 com.gliffy.shape.cisco.cisco_v1.wireless.sattelite_dish=mxgraph.cisco.wireless.satellite_dish;strokeColor=#ffffff
 com.gliffy.shape.cisco.cisco_v1.wireless.wifi_tag=mxgraph.cisco.wireless.wi-fi_tag;strokeColor=#ffffff
@@ -1015,39 +1015,38 @@ com.gliffy.shape.cisco.cisco_v1.wireless.wlan_controller=mxgraph.cisco.wireless.
 # NETWORK v4
 #
 # NETWORK v4 HOME
-com.gliffy.shape.network.network_v4.home.cloud=mxgraph.networks.cloud
-com.gliffy.shape.network.network_v4.home.comm_link=mxgraph.networks.comm_link;flipH=1
-com.gliffy.shape.network.network_v4.home.computer=mxgraph.networks.pc
-com.gliffy.shape.network.network_v4.home.crt_tv=mxgraph.networks.monitor
-com.gliffy.shape.network.network_v4.home.external_storage=mxgraph.networks.external_storage
-com.gliffy.shape.network.network_v4.home.fax=mxgraph.networks.printer
-com.gliffy.shape.network.network_v4.home.firewall=mxgraph.networks.firewall
-com.gliffy.shape.network.network_v4.home.flatscreen_tv=mxgraph.networks.monitor
-com.gliffy.shape.network.network_v4.home.game_console=mxgraph.networks.gamepad
-com.gliffy.shape.network.network_v4.home.hub=mxgraph.networks.hub
-com.gliffy.shape.network.network_v4.home.iphone=mxgraph.android.phone2
-com.gliffy.shape.network.network_v4.home.laptop=mxgraph.networks.laptop
-com.gliffy.shape.network.network_v4.home.mac=mxgraph.networks.monitor
-com.gliffy.shape.network.network_v4.home.modem=mxgraph.networks.hub
-com.gliffy.shape.network.network_v4.home.monitor=mxgraph.networks.monitor
+com.gliffy.shape.network.network_v4.home.cloud=mxgraph.networks.cloud;strokeColor=#ffffff
+com.gliffy.shape.network.network_v4.home.comm_link=mxgraph.networks.comm_link;flipH=1;strokeColor=#ffffff
+com.gliffy.shape.network.network_v4.home.computer=mxgraph.networks.pc;strokeColor=#ffffff
+com.gliffy.shape.network.network_v4.home.crt_tv=mxgraph.networks.monitor;strokeColor=#ffffff
+com.gliffy.shape.network.network_v4.home.external_storage=mxgraph.networks.external_storage;strokeColor=#ffffff
+com.gliffy.shape.network.network_v4.home.fax=mxgraph.networks.printer;strokeColor=#ffffff
+com.gliffy.shape.network.network_v4.home.firewall=mxgraph.networks.firewall;strokeColor=#ffffff
+com.gliffy.shape.network.network_v4.home.flatscreen_tv=mxgraph.networks.monitor;strokeColor=#ffffff
+com.gliffy.shape.network.network_v4.home.game_console=mxgraph.networks.gamepad;strokeColor=#ffffff
+com.gliffy.shape.network.network_v4.home.hub=mxgraph.networks.hub;strokeColor=#ffffff
+com.gliffy.shape.network.network_v4.home.iphone=mxgraph.android.phone2;strokeColor=#ffffff
+com.gliffy.shape.network.network_v4.home.laptop=mxgraph.networks.laptop;strokeColor=#ffffff
+com.gliffy.shape.network.network_v4.home.mac=mxgraph.networks.monitor;strokeColor=#ffffff
+com.gliffy.shape.network.network_v4.home.modem=mxgraph.networks.hub;strokeColor=#ffffff
+com.gliffy.shape.network.network_v4.home.monitor=mxgraph.networks.monitor;strokeColor=#ffffff
 #com.gliffy.shape.network.network_v4.home.outlet=
-com.gliffy.shape.network.network_v4.home.phone1=mxgraph.networks.phone_1
-com.gliffy.shape.network.network_v4.home.phone2=mxgraph.networks.phone_2
-com.gliffy.shape.network.network_v4.home.printer=mxgraph.networks.printer
-com.gliffy.shape.network.network_v4.home.router=mxgraph.networks.router
-com.gliffy.shape.network.network_v4.home.scanner=mxgraph.networks.scanner
-com.gliffy.shape.network.network_v4.home.security_camera=mxgraph.networks.security_camera
-com.gliffy.shape.network.network_v4.home.server=mxgraph.networks.server
-com.gliffy.shape.network.network_v4.home.smartphone=mxgraph.android.phone2
-#tmp
-com.gliffy.shape.network.network_v4.home.speaker=mxgraph.cisco.computers_and_peripherals.speaker
+com.gliffy.shape.network.network_v4.home.phone1=mxgraph.networks.phone_1;strokeColor=#ffffff
+com.gliffy.shape.network.network_v4.home.phone2=mxgraph.networks.phone_2;strokeColor=#ffffff
+com.gliffy.shape.network.network_v4.home.printer=mxgraph.networks.printer;strokeColor=#ffffff
+com.gliffy.shape.network.network_v4.home.router=mxgraph.networks.router;strokeColor=#ffffff
+com.gliffy.shape.network.network_v4.home.scanner=mxgraph.networks.scanner;strokeColor=#ffffff
+com.gliffy.shape.network.network_v4.home.security_camera=mxgraph.networks.security_camera;strokeColor=#ffffff
+com.gliffy.shape.network.network_v4.home.server=mxgraph.networks.server;strokeColor=#ffffff
+com.gliffy.shape.network.network_v4.home.smartphone=mxgraph.android.phone2;strokeColor=#ffffff
+com.gliffy.shape.network.network_v4.home.speaker=mxgraph.cisco.computers_and_peripherals.speaker;strokeColor=#ffffff
 #com.gliffy.shape.network.network_v4.home.stereo=
-com.gliffy.shape.network.network_v4.home.subwoofer=mxgraph.cisco.computers_and_peripherals.speaker
+com.gliffy.shape.network.network_v4.home.subwoofer=mxgraph.cisco.computers_and_peripherals.speaker;strokeColor=#ffffff
 com.gliffy.shape.network.network_v4.home.tablet=mxgraph.android.tab2
-com.gliffy.shape.network.network_v4.home.wireless_modem=mxgraph.networks.wireless_hub
+com.gliffy.shape.network.network_v4.home.wireless_modem=mxgraph.networks.wireless_hub;strokeColor=#ffffff
 com.gliffy.shape.network.network_v3.home.firewall=image;image=img/lib/clip_art/networking/Firewall-page1_128x128.png
-com.gliffy.shape.network.network_v3.home.cloud=cloud
-com.gliffy.shape.network.network_v3.home.comm_link=mxgraph.networks.comm_link
+com.gliffy.shape.network.network_v3.home.cloud=cloud;strokeColor=#ffffff
+com.gliffy.shape.network.network_v3.home.comm_link=mxgraph.networks.comm_link;strokeColor=#ffffff
 com.gliffy.shape.network.network_v3.home.server=image;image=img/lib/clip_art/computers/Server_Tower_128x128.png
 com.gliffy.shape.network.network_v3.home.computer=image;image=img/lib/clip_art/computers/Workstation_128x128.png
 com.gliffy.shape.network.network_v3.home.laptop=image;image=img/lib/clip_art/computers/Laptop_128x128.png
@@ -1073,53 +1072,53 @@ com.gliffy.shape.network.network_v3.home.router=image;image=img/lib/clip_art/net
 com.gliffy.shape.network.network_v3.home.tv=image;image=img/lib/clip_art/computers/Monitor_128x128.png
 com.gliffy.shape.network.network_v3.home.tv_flatscreen=image;image=img/lib/clip_art/computers/Monitor_128x128.png
 # NETWORK v4 BUSINESS
-com.gliffy.shape.network.network_v4.business.cloud=cloud
-com.gliffy.shape.network.network_v4.business.comm_link=mxgraph.networks.comm_link;flipH=1
-com.gliffy.shape.network.network_v4.business.computer=mxgraph.networks.pc
-com.gliffy.shape.network.network_v4.business.copy_machine=mxgraph.networks.copier
-com.gliffy.shape.network.network_v4.business.database=mxgraph.networks.storage
-com.gliffy.shape.network.network_v4.business.database_server=mxgraph.networks.server_storage
-com.gliffy.shape.network.network_v4.business.encrypted=mxgraph.networks.secured
-com.gliffy.shape.network.network_v4.business.fax=mxgraph.networks.printer
-com.gliffy.shape.network.network_v4.business.female_user=mxgraph.networks.user_female
-com.gliffy.shape.network.network_v4.business.firewall=mxgraph.networks.firewall
-com.gliffy.shape.network.network_v4.business.hub=mxgraph.networks.hub
-com.gliffy.shape.network.network_v4.business.iphone=mxgraph.networks.mobile
-com.gliffy.shape.network.network_v4.business.laptop=mxgraph.networks.laptop
-com.gliffy.shape.network.network_v4.business.load_balancer=mxgraph.networks.load_balancer
-com.gliffy.shape.network.network_v4.business.mac=mxgraph.networks.monitor
-com.gliffy.shape.network.network_v4.business.mail_server=mxgraph.networks.mail_server
-com.gliffy.shape.network.network_v4.business.mainframe=mxgraph.networks.mainframe
-com.gliffy.shape.network.network_v4.business.male_user=mxgraph.networks.user_male
-com.gliffy.shape.network.network_v4.business.modem=mxgraph.networks.hub
-com.gliffy.shape.network.network_v4.business.monitor=mxgraph.networks.monitor
-com.gliffy.shape.network.network_v4.business.multi_u_server=mxgraph.networks.server
-com.gliffy.shape.network.network_v4.business.nas_filer=mxgraph.networks.nas_filer
-com.gliffy.shape.network.network_v4.business.phone1=mxgraph.networks.phone_1
-com.gliffy.shape.network.network_v4.business.phone2=mxgraph.networks.phone_2
-com.gliffy.shape.network.network_v4.business.printer=mxgraph.networks.printer
-com.gliffy.shape.network.network_v4.business.proxy_server=mxgraph.networks.proxy_server
-com.gliffy.shape.network.network_v4.business.rack=mxgraph.networks.rack
+com.gliffy.shape.network.network_v4.business.cloud=cloud;strokeColor=#ffffff
+com.gliffy.shape.network.network_v4.business.comm_link=mxgraph.networks.comm_link;flipH=1;strokeColor=#ffffff
+com.gliffy.shape.network.network_v4.business.computer=mxgraph.networks.pc;strokeColor=#ffffff
+com.gliffy.shape.network.network_v4.business.copy_machine=mxgraph.networks.copier;strokeColor=#ffffff
+com.gliffy.shape.network.network_v4.business.database=mxgraph.networks.storage;strokeColor=#ffffff
+com.gliffy.shape.network.network_v4.business.database_server=mxgraph.networks.server_storage;strokeColor=#ffffff
+com.gliffy.shape.network.network_v4.business.encrypted=mxgraph.networks.secured;strokeColor=#ffffff
+com.gliffy.shape.network.network_v4.business.fax=mxgraph.networks.printer;strokeColor=#ffffff
+com.gliffy.shape.network.network_v4.business.female_user=mxgraph.networks.user_female;strokeColor=#ffffff
+com.gliffy.shape.network.network_v4.business.firewall=mxgraph.networks.firewall;strokeColor=#ffffff
+com.gliffy.shape.network.network_v4.business.hub=mxgraph.networks.hub;strokeColor=#ffffff
+com.gliffy.shape.network.network_v4.business.iphone=mxgraph.networks.mobile;strokeColor=#ffffff
+com.gliffy.shape.network.network_v4.business.laptop=mxgraph.networks.laptop;strokeColor=#ffffff
+com.gliffy.shape.network.network_v4.business.load_balancer=mxgraph.networks.load_balancer;strokeColor=#ffffff
+com.gliffy.shape.network.network_v4.business.mac=mxgraph.networks.monitor;strokeColor=#ffffff
+com.gliffy.shape.network.network_v4.business.mail_server=mxgraph.networks.mail_server;strokeColor=#ffffff
+com.gliffy.shape.network.network_v4.business.mainframe=mxgraph.networks.mainframe;strokeColor=#ffffff
+com.gliffy.shape.network.network_v4.business.male_user=mxgraph.networks.user_male;strokeColor=#ffffff
+com.gliffy.shape.network.network_v4.business.modem=mxgraph.networks.hub;strokeColor=#ffffff
+com.gliffy.shape.network.network_v4.business.monitor=mxgraph.networks.monitor;strokeColor=#ffffff
+com.gliffy.shape.network.network_v4.business.multi_u_server=mxgraph.networks.server;strokeColor=#ffffff
+com.gliffy.shape.network.network_v4.business.nas_filer=mxgraph.networks.nas_filer;strokeColor=#ffffff
+com.gliffy.shape.network.network_v4.business.phone1=mxgraph.networks.phone_1;strokeColor=#ffffff
+com.gliffy.shape.network.network_v4.business.phone2=mxgraph.networks.phone_2;strokeColor=#ffffff
+com.gliffy.shape.network.network_v4.business.printer=mxgraph.networks.printer;strokeColor=#ffffff
+com.gliffy.shape.network.network_v4.business.proxy_server=mxgraph.networks.proxy_server;strokeColor=#ffffff
+com.gliffy.shape.network.network_v4.business.rack=mxgraph.networks.rack;strokeColor=#ffffff
 #com.gliffy.shape.network.network_v4.business.rack_server_1u=
-com.gliffy.shape.network.network_v4.business.router=mxgraph.networks.router
-com.gliffy.shape.network.network_v4.business.satellite=mxgraph.networks.satellite
-com.gliffy.shape.network.network_v4.business.satellite_antenna=mxgraph.networks.satellite_dish
-com.gliffy.shape.network.network_v4.business.scanner=mxgraph.networks.scanner
-com.gliffy.shape.network.network_v4.business.server=mxgraph.networks.server
-com.gliffy.shape.network.network_v4.business.smartphone=mxgraph.networks.mobile
-com.gliffy.shape.network.network_v4.business.switch=mxgraph.networks.switch
-com.gliffy.shape.network.network_v4.business.tablet=mxgraph.networks.tablet
-com.gliffy.shape.network.network_v4.business.tape_backup=mxgraph.networks.tape_storage
-com.gliffy.shape.network.network_v4.business.ups=mxgraph.networks.ups_small
-com.gliffy.shape.network.network_v4.business.usb=mxgraph.networks.usb_stick
-com.gliffy.shape.network.network_v4.business.user=mxgraph.networks.user_male
-com.gliffy.shape.network.network_v4.business.user_group=mxgraph.networks.users
-com.gliffy.shape.network.network_v4.business.video_projector=mxgraph.networks.video_projector
-com.gliffy.shape.network.network_v4.business.video_screen=mxgraph.networks.video_projector_screen
-com.gliffy.shape.network.network_v4.business.virtual_server=mxgraph.networks.virtual_server
-com.gliffy.shape.network.network_v4.business.virus=mxgraph.networks.virus
-com.gliffy.shape.network.network_v4.business.web_server=mxgraph.networks.web_server
-com.gliffy.shape.network.network_v4.business.wireless_modem=mxgraph.networks.wireless_hub
+com.gliffy.shape.network.network_v4.business.router=mxgraph.networks.router;strokeColor=#ffffff
+com.gliffy.shape.network.network_v4.business.satellite=mxgraph.networks.satellite;strokeColor=#ffffff
+com.gliffy.shape.network.network_v4.business.satellite_antenna=mxgraph.networks.satellite_dish;strokeColor=#ffffff
+com.gliffy.shape.network.network_v4.business.scanner=mxgraph.networks.scanner;strokeColor=#ffffff
+com.gliffy.shape.network.network_v4.business.server=mxgraph.networks.server;strokeColor=#ffffff
+com.gliffy.shape.network.network_v4.business.smartphone=mxgraph.networks.mobile;strokeColor=#ffffff
+com.gliffy.shape.network.network_v4.business.switch=mxgraph.networks.switch;strokeColor=#ffffff
+com.gliffy.shape.network.network_v4.business.tablet=mxgraph.networks.tablet;strokeColor=#ffffff
+com.gliffy.shape.network.network_v4.business.tape_backup=mxgraph.networks.tape_storage;strokeColor=#ffffff
+com.gliffy.shape.network.network_v4.business.ups=mxgraph.networks.ups_small;strokeColor=#ffffff
+com.gliffy.shape.network.network_v4.business.usb=mxgraph.networks.usb_stick;strokeColor=#ffffff
+com.gliffy.shape.network.network_v4.business.user=mxgraph.networks.user_male;strokeColor=#ffffff
+com.gliffy.shape.network.network_v4.business.user_group=mxgraph.networks.users;strokeColor=#ffffff
+com.gliffy.shape.network.network_v4.business.video_projector=mxgraph.networks.video_projector;strokeColor=#ffffff
+com.gliffy.shape.network.network_v4.business.video_screen=mxgraph.networks.video_projector_screen;strokeColor=#ffffff
+com.gliffy.shape.network.network_v4.business.virtual_server=mxgraph.networks.virtual_server;strokeColor=#ffffff
+com.gliffy.shape.network.network_v4.business.virus=mxgraph.networks.virus;strokeColor=#ffffff
+com.gliffy.shape.network.network_v4.business.web_server=mxgraph.networks.web_server;strokeColor=#ffffff
+com.gliffy.shape.network.network_v4.business.wireless_modem=mxgraph.networks.wireless_hub;strokeColor=#ffffff
 # NETWORK v3 BUSINESS
 com.gliffy.shape.network.network_v3.business.firewall=image;image=img/lib/clip_art/networking/Firewall-page1_128x128.png
 com.gliffy.shape.network.network_v3.business.cloud=cloud;fillColor=#bfc0c2;gradientColor=#ffffff;gradientDirection=west
@@ -1297,7 +1296,7 @@ com.gliffy.shape.ui.ui_v3.containers_content.popover_bottom=callout;perimeter=ca
 com.gliffy.shape.ui.ui_v3.containers_content.circle_dashed_line=ellipse
 com.gliffy.shape.ui.ui_v3.containers_content.speech_bubble_right=callout;perimeter=calloutPerimeter;rounded=1;position=0.6;position2=0.55;size=15
 com.gliffy.shape.ui.ui_v3.containers_content.speech_bubble_left=callout;perimeter=calloutPerimeter;rounded=1;position=0.6;position2=0.55;size=15;flipH=1
-com.gliffy.shape.ui.ui_v3.containers_content.rectangle_dashed_line=rect
+com.gliffy.shape.ui.ui_v3.containers_content.rectangle_dashed_line=rect;dashed=1;dashPattern=5 3
 com.gliffy.shape.ui.ui_v3.containers_content.tooltip_top=callout;perimeter=calloutPerimeter;rounded=1;position=0.48;position2=0.5;size=5;base=10
 com.gliffy.shape.ui.ui_v3.containers_content.tooltip_bottom=callout;perimeter=calloutPerimeter;rounded=1;position=0.48;position2=0.5;size=5;base=10;flipV=1
 com.gliffy.shape.ui.ui_v3.containers_content.image=mxgraph.mockup.graphics.simpleIcon
diff --git a/war/cache.manifest b/war/cache.manifest
index ae5922d99f5d480f200be366788d58b37f0a173c..e8aae2c288b2ddba7583684d39f00fe9a45df297 100644
--- a/war/cache.manifest
+++ b/war/cache.manifest
@@ -1,7 +1,7 @@
 CACHE MANIFEST
 
 # THIS FILE WAS GENERATED. DO NOT MODIFY!
-# 10/09/2017 11:05 AM
+# 10/10/2017 11:23 AM
 
 app.html
 index.html?offline=1
diff --git a/war/images/sidebar-atlassian.png b/war/images/sidebar-atlassian.png
index 9b924f42eaca4beb7aab41d94f3c57ad59c2f9a0..91aecd760d363001935ce4baa40ec3269ab5ce19 100644
Binary files a/war/images/sidebar-atlassian.png and b/war/images/sidebar-atlassian.png differ
diff --git a/war/images/sidebar-webIcons.png b/war/images/sidebar-webIcons.png
index 0a39c46e018dd843ec937e2f83bc80a61ed06be0..0bb18a059cb5747a70c6d3218576669ace99d79d 100644
Binary files a/war/images/sidebar-webIcons.png and b/war/images/sidebar-webIcons.png differ
diff --git a/war/js/app.min.js b/war/js/app.min.js
index 268f48e06593c6cc1372e62c4367818f8439caac..e23a1d06658a25d0791fecc81a663c06ec8a7fc5 100644
--- a/war/js/app.min.js
+++ b/war/js/app.min.js
@@ -1567,8 +1567,8 @@ g=this.getAlignmentTolerance();if(0<g){var k=this.graph.view.getState(b);if(null
 mxConnectionHandler.prototype.createEdge=function(a,b,c,d){var e=null;null!=this.factoryMethod&&(e=this.factoryMethod(b,c,d));null==e&&(e=new mxCell(a||""),e.setEdge(!0),e.setStyle(d),a=new mxGeometry,a.relative=!0,e.setGeometry(a));return e};
 mxConnectionHandler.prototype.destroy=function(){this.graph.removeMouseListener(this);null!=this.shape&&(this.shape.destroy(),this.shape=null);null!=this.marker&&(this.marker.destroy(),this.marker=null);null!=this.constraintHandler&&(this.constraintHandler.destroy(),this.constraintHandler=null);null!=this.changeHandler&&(this.graph.getModel().removeListener(this.changeHandler),this.graph.getView().removeListener(this.changeHandler),this.changeHandler=null);null!=this.drillHandler&&(this.graph.removeListener(this.drillHandler),
 this.graph.getView().removeListener(this.drillHandler),this.drillHandler=null);null!=this.escapeHandler&&(this.graph.removeListener(this.escapeHandler),this.escapeHandler=null)};
-function mxConstraintHandler(a){this.graph=a;this.resetHandler=mxUtils.bind(this,function(a,c){null!=this.currentFocus&&null==this.graph.view.getState(this.currentFocus.cell)?this.reset():this.redraw()});this.graph.model.addListener(mxEvent.CHANGE,this.resetHandler);this.graph.view.addListener(mxEvent.SCALE,this.resetHandler);this.graph.addListener(mxEvent.ROOT,this.resetHandler)}mxConstraintHandler.prototype.pointImage=new mxImage(mxClient.imageBasePath+"/point.gif",5,5);
-mxConstraintHandler.prototype.graph=null;mxConstraintHandler.prototype.enabled=!0;mxConstraintHandler.prototype.highlightColor=mxConstants.DEFAULT_VALID_COLOR;mxConstraintHandler.prototype.isEnabled=function(){return this.enabled};mxConstraintHandler.prototype.setEnabled=function(a){this.enabled=a};
+function mxConstraintHandler(a){this.graph=a;this.resetHandler=mxUtils.bind(this,function(a,c){null!=this.currentFocus&&null==this.graph.view.getState(this.currentFocus.cell)?this.reset():this.redraw()});this.graph.model.addListener(mxEvent.CHANGE,this.resetHandler);this.graph.view.addListener(mxEvent.SCALE_AND_TRANSLATE,this.resetHandler);this.graph.view.addListener(mxEvent.TRANSLATE,this.resetHandler);this.graph.view.addListener(mxEvent.SCALE,this.resetHandler);this.graph.addListener(mxEvent.ROOT,
+this.resetHandler)}mxConstraintHandler.prototype.pointImage=new mxImage(mxClient.imageBasePath+"/point.gif",5,5);mxConstraintHandler.prototype.graph=null;mxConstraintHandler.prototype.enabled=!0;mxConstraintHandler.prototype.highlightColor=mxConstants.DEFAULT_VALID_COLOR;mxConstraintHandler.prototype.isEnabled=function(){return this.enabled};mxConstraintHandler.prototype.setEnabled=function(a){this.enabled=a};
 mxConstraintHandler.prototype.reset=function(){if(null!=this.focusIcons){for(var a=0;a<this.focusIcons.length;a++)this.focusIcons[a].destroy();this.focusIcons=null}null!=this.focusHighlight&&(this.focusHighlight.destroy(),this.focusHighlight=null);this.focusPoints=this.currentFocus=this.currentPoint=this.currentFocusArea=this.currentConstraint=null};mxConstraintHandler.prototype.getTolerance=function(a){return this.graph.getTolerance()};
 mxConstraintHandler.prototype.getImageForConstraint=function(a,b,c){return this.pointImage};mxConstraintHandler.prototype.isEventIgnored=function(a,b){return!1};mxConstraintHandler.prototype.isStateIgnored=function(a,b){return!1};mxConstraintHandler.prototype.destroyIcons=function(){if(null!=this.focusIcons){for(var a=0;a<this.focusIcons.length;a++)this.focusIcons[a].destroy();this.focusPoints=this.focusIcons=null}};
 mxConstraintHandler.prototype.destroyFocusHighlight=function(){null!=this.focusHighlight&&(this.focusHighlight.destroy(),this.focusHighlight=null)};mxConstraintHandler.prototype.isKeepFocusEvent=function(a){return mxEvent.isShiftDown(a.getEvent())};
@@ -1967,11 +1967,11 @@ f.appendChild(l);mxUtils.write(f,mxResources.get("gridSize")+":");var n=document
 mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog()});r.className="geBtn";a.editor.cancelFirst&&f.appendChild(r);var t=mxUtils.button(mxResources.get("apply"),function(){a.hideDialog();b.gridSize!==n.value&&b.setGridSize(parseInt(n.value));var c=new ChangePageSetup(a,m,q,k.get());c.ignoreColor=b.background==m;c.ignoreImage=(null!=b.backgroundImage?b.backgroundImage.src:null)===(null!=q?q.src:null);b.pageFormat.width==c.previousFormat.width&&b.pageFormat.height==c.previousFormat.height&&
 c.ignoreColor&&c.ignoreImage||b.model.execute(c)});t.className="geBtn gePrimaryBtn";f.appendChild(t);a.editor.cancelFirst||f.appendChild(r);e.appendChild(f);g.appendChild(e);h.appendChild(g);this.container=h};
 PageSetupDialog.addPageFormatPanel=function(a,c,d,b){function e(a,b,c){if(c||n!=document.activeElement&&p!=document.activeElement){a=!1;for(b=0;b<r.length;b++)c=r[b],v?"custom"==c.key&&(g.value=c.key,v=!1):null!=c.format&&("a4"==c.key?826==d.width?(d=mxRectangle.fromRectangle(d),d.width=827):826==d.height&&(d=mxRectangle.fromRectangle(d),d.height=827):"a5"==c.key&&(584==d.width?(d=mxRectangle.fromRectangle(d),d.width=583):584==d.height&&(d=mxRectangle.fromRectangle(d),d.height=583)),d.width==c.format.width&&
-d.height==c.format.height?(g.value=c.key,f.setAttribute("checked","checked"),f.defaultChecked=!0,f.checked=!0,h.removeAttribute("checked"),h.defaultChecked=!1,h.checked=!1,a=!0):d.width==c.format.height&&d.height==c.format.width&&(g.value=c.key,f.removeAttribute("checked"),f.defaultChecked=!1,f.checked=!1,h.setAttribute("checked","checked"),h.defaultChecked=!0,a=h.checked=!0));a?(k.style.display="",m.style.display="none"):(n.value=d.width/100,p.value=d.height/100,w.setAttribute("selected","selected"),
+d.height==c.format.height?(g.value=c.key,f.setAttribute("checked","checked"),f.defaultChecked=!0,f.checked=!0,h.removeAttribute("checked"),h.defaultChecked=!1,h.checked=!1,a=!0):d.width==c.format.height&&d.height==c.format.width&&(g.value=c.key,f.removeAttribute("checked"),f.defaultChecked=!1,f.checked=!1,h.setAttribute("checked","checked"),h.defaultChecked=!0,a=h.checked=!0));a?(k.style.display="",m.style.display="none"):(n.value=d.width/100,p.value=d.height/100,u.setAttribute("selected","selected"),
 f.setAttribute("checked","checked"),f.defaultChecked=!0,k.style.display="none",m.style.display="")}}c="format-"+c;var f=document.createElement("input");f.setAttribute("name",c);f.setAttribute("type","radio");f.setAttribute("value","portrait");var h=document.createElement("input");h.setAttribute("name",c);h.setAttribute("type","radio");h.setAttribute("value","landscape");var g=document.createElement("select");g.style.marginBottom="8px";g.style.width="202px";var k=document.createElement("div");k.style.marginLeft=
 "4px";k.style.width="210px";k.style.height="24px";f.style.marginRight="6px";k.appendChild(f);c=document.createElement("span");c.style.maxWidth="100px";mxUtils.write(c,mxResources.get("portrait"));k.appendChild(c);h.style.marginLeft="10px";h.style.marginRight="6px";k.appendChild(h);var l=document.createElement("span");l.style.width="100px";mxUtils.write(l,mxResources.get("landscape"));k.appendChild(l);var m=document.createElement("div");m.style.marginLeft="4px";m.style.width="210px";m.style.height=
-"24px";var n=document.createElement("input");n.setAttribute("size","7");n.setAttribute("value",d.width);n.style.textAlign="right";m.appendChild(n);mxUtils.write(m," in x ");var p=document.createElement("input");p.setAttribute("size","7");p.setAttribute("value",d.height);p.style.textAlign="right";m.appendChild(p);mxUtils.write(m," in");k.style.display="none";m.style.display="none";for(var q={},r=PageSetupDialog.getFormats(),t=0;t<r.length;t++){var u=r[t];q[u.key]=u;var w=document.createElement("option");
-w.setAttribute("value",u.key);mxUtils.write(w,u.title);g.appendChild(w)}var v=!1;e();a.appendChild(g);mxUtils.br(a);a.appendChild(k);a.appendChild(m);var A=d,x=function(){var a=q[g.value];null!=a.format?(n.value=a.format.width/100,p.value=a.format.height/100,m.style.display="none",k.style.display=""):(k.style.display="none",m.style.display="");a=new mxRectangle(0,0,Math.floor(100*parseFloat(n.value)),Math.floor(100*parseFloat(p.value)));"custom"!=g.value&&h.checked&&(a=new mxRectangle(0,0,a.height,
+"24px";var n=document.createElement("input");n.setAttribute("size","7");n.setAttribute("value",d.width);n.style.textAlign="right";m.appendChild(n);mxUtils.write(m," in x ");var p=document.createElement("input");p.setAttribute("size","7");p.setAttribute("value",d.height);p.style.textAlign="right";m.appendChild(p);mxUtils.write(m," in");k.style.display="none";m.style.display="none";for(var q={},r=PageSetupDialog.getFormats(),t=0;t<r.length;t++){var w=r[t];q[w.key]=w;var u=document.createElement("option");
+u.setAttribute("value",w.key);mxUtils.write(u,w.title);g.appendChild(u)}var v=!1;e();a.appendChild(g);mxUtils.br(a);a.appendChild(k);a.appendChild(m);var A=d,x=function(){var a=q[g.value];null!=a.format?(n.value=a.format.width/100,p.value=a.format.height/100,m.style.display="none",k.style.display=""):(k.style.display="none",m.style.display="");a=new mxRectangle(0,0,Math.floor(100*parseFloat(n.value)),Math.floor(100*parseFloat(p.value)));"custom"!=g.value&&h.checked&&(a=new mxRectangle(0,0,a.height,
 a.width));if(a.width!=A.width||a.height!=A.height)A=a,null!=b&&b(A)};mxEvent.addListener(c,"click",function(a){f.checked=!0;x();mxEvent.consume(a)});mxEvent.addListener(l,"click",function(a){h.checked=!0;x();mxEvent.consume(a)});mxEvent.addListener(n,"blur",x);mxEvent.addListener(n,"click",x);mxEvent.addListener(p,"blur",x);mxEvent.addListener(p,"click",x);mxEvent.addListener(h,"change",x);mxEvent.addListener(f,"change",x);mxEvent.addListener(g,"change",function(){v="custom"==g.value;x()});x();return{set:function(a){d=
 a;e(null,null,!0)},get:function(){return A},widthInput:n,heightInput:p}};
 PageSetupDialog.getFormats=function(){return[{key:"letter",title:'US-Letter (8,5" x 11")',format:mxConstants.PAGE_FORMAT_LETTER_PORTRAIT},{key:"legal",title:'US-Legal (8,5" x 14")',format:new mxRectangle(0,0,850,1400)},{key:"tabloid",title:"US-Tabloid (279 mm x 432 mm)",format:new mxRectangle(0,0,1100,1700)},{key:"a0",title:"A0 (841 mm x 1189 mm)",format:new mxRectangle(0,0,3300,4681)},{key:"a1",title:"A1 (594 mm x 841 mm)",format:new mxRectangle(0,0,2339,3300)},{key:"a2",title:"A2 (420 mm x 594 mm)",
@@ -1984,7 +1984,7 @@ null);this.validateBackgroundStyles()}};mxGraphView.prototype.validateBackground
 "geDiagramContainer geDiagramBackdrop",c.style.backgroundImage="none",c.style.backgroundColor=""):(a.container.className="geDiagramContainer",c.style.backgroundPosition=f,c.style.backgroundColor=b,c.style.backgroundImage=d)};mxGraphView.prototype.createSvgGrid=function(a){for(var b=this.graph.gridSize*this.scale;b<this.minGridSize;)b*=2;for(var c=this.gridSteps*b,d=[],f=1;f<this.gridSteps;f++){var e=f*b;d.push("M 0 "+e+" L "+c+" "+e+" M "+e+" 0 L "+e+" "+c)}return'<svg width="'+c+'" height="'+c+'" xmlns="'+
 mxConstants.NS_SVG+'"><defs><pattern id="grid" width="'+c+'" height="'+c+'" patternUnits="userSpaceOnUse"><path d="'+d.join(" ")+'" fill="none" stroke="'+a+'" opacity="0.2" stroke-width="1"/><path d="M '+c+" 0 L 0 0 0 "+c+'" fill="none" stroke="'+a+'" stroke-width="1"/></pattern></defs><rect width="100%" height="100%" fill="url(#grid)"/></svg>'};var a=mxGraph.prototype.panGraph;mxGraph.prototype.panGraph=function(b,c){a.apply(this,arguments);if(null!=this.shiftPreview1){var d=this.view.canvas;null!=
 d.ownerSVGElement&&(d=d.ownerSVGElement);var f=this.gridSize*this.view.scale*this.view.gridSteps,f=-Math.round(f-mxUtils.mod(this.view.translate.x*this.view.scale+b,f))+"px "+-Math.round(f-mxUtils.mod(this.view.translate.y*this.view.scale+c,f))+"px";d.style.backgroundPosition=f}};mxGraph.prototype.updatePageBreaks=function(a,b,c){var d=this.view.scale,f=this.view.translate,e=this.pageFormat,g=d*this.pageScale,h=this.view.getBackgroundPageBounds();b=h.width;c=h.height;var k=new mxRectangle(d*f.x,d*
-f.y,e.width*g,e.height*g),l=(a=a&&Math.min(k.width,k.height)>this.minPageBreakDist)?Math.ceil(c/k.height)-1:0,w=a?Math.ceil(b/k.width)-1:0,v=h.x+b,A=h.y+c;null==this.horizontalPageBreaks&&0<l&&(this.horizontalPageBreaks=[]);null==this.verticalPageBreaks&&0<w&&(this.verticalPageBreaks=[]);a=mxUtils.bind(this,function(a){if(null!=a){for(var b=a==this.horizontalPageBreaks?l:w,c=0;c<=b;c++){var d=a==this.horizontalPageBreaks?[new mxPoint(Math.round(h.x),Math.round(h.y+(c+1)*k.height)),new mxPoint(Math.round(v),
+f.y,e.width*g,e.height*g),l=(a=a&&Math.min(k.width,k.height)>this.minPageBreakDist)?Math.ceil(c/k.height)-1:0,u=a?Math.ceil(b/k.width)-1:0,v=h.x+b,A=h.y+c;null==this.horizontalPageBreaks&&0<l&&(this.horizontalPageBreaks=[]);null==this.verticalPageBreaks&&0<u&&(this.verticalPageBreaks=[]);a=mxUtils.bind(this,function(a){if(null!=a){for(var b=a==this.horizontalPageBreaks?l:u,c=0;c<=b;c++){var d=a==this.horizontalPageBreaks?[new mxPoint(Math.round(h.x),Math.round(h.y+(c+1)*k.height)),new mxPoint(Math.round(v),
 Math.round(h.y+(c+1)*k.height))]:[new mxPoint(Math.round(h.x+(c+1)*k.width),Math.round(h.y)),new mxPoint(Math.round(h.x+(c+1)*k.width),Math.round(A))];null!=a[c]?(a[c].points=d,a[c].redraw()):(d=new mxPolyline(d,this.pageBreakColor),d.dialect=this.dialect,d.isDashed=this.pageBreakDashed,d.pointerEvents=!1,d.init(this.view.backgroundPane),d.redraw(),a[c]=d)}for(c=b;c<a.length;c++)a[c].destroy();a.splice(b,a.length-b)}});a(this.horizontalPageBreaks);a(this.verticalPageBreaks)};var c=mxGraphHandler.prototype.shouldRemoveCellsFromParent;
 mxGraphHandler.prototype.shouldRemoveCellsFromParent=function(a,b,d){for(var f=0;f<b.length;f++)if(this.graph.getModel().isVertex(b[f])){var e=this.graph.getCellGeometry(b[f]);if(null!=e&&e.relative)return!1}return c.apply(this,arguments)};var d=mxConnectionHandler.prototype.createMarker;mxConnectionHandler.prototype.createMarker=function(){var a=d.apply(this,arguments);a.intersects=mxUtils.bind(this,function(b,c){return this.isConnecting()?!0:mxCellMarker.prototype.intersects.apply(a,arguments)});
 return a};mxGraphView.prototype.createBackgroundPageShape=function(a){return new mxRectangleShape(a,"#ffffff","#cacaca")};mxGraphView.prototype.getBackgroundPageBounds=function(){var a=this.getGraphBounds(),b=0<a.width?a.x/this.scale-this.translate.x:0,c=0<a.height?a.y/this.scale-this.translate.y:0,d=this.graph.pageFormat,f=this.graph.pageScale,e=d.width*f,d=d.height*f,f=Math.floor(Math.min(0,b)/e),h=Math.floor(Math.min(0,c)/d);return new mxRectangle(this.scale*(this.translate.x+f*e),this.scale*(this.translate.y+
@@ -2000,14 +2000,14 @@ this.diagramContainer.setAttribute("title",mxResources.get("panTooltip")):this.d
 var g=b.cellEditor.isStopEditingEvent;b.cellEditor.isStopEditingEvent=function(a){return g.apply(this,arguments)||13==a.keyCode&&(!mxClient.IS_SF&&mxEvent.isControlDown(a)||mxClient.IS_MAC&&mxEvent.isMetaDown(a)||mxClient.IS_SF&&mxEvent.isShiftDown(a))};var k=!1,l=null,m=null,n=null,p=mxUtils.bind(this,function(){if(null!=this.toolbar&&k!=b.cellEditor.isContentEditing()){for(var a=this.toolbar.container.firstChild,c=[];null!=a;){var d=a.nextSibling;0>mxUtils.indexOf(this.toolbar.staticElements,a)&&
 (a.parentNode.removeChild(a),c.push(a));a=d}a=this.toolbar.fontMenu;d=this.toolbar.sizeMenu;if(null==n)this.toolbar.createTextToolbar();else{for(var f=0;f<n.length;f++)this.toolbar.container.appendChild(n[f]);this.toolbar.fontMenu=l;this.toolbar.sizeMenu=m}k=b.cellEditor.isContentEditing();l=a;m=d;n=c}}),q=this,r=b.cellEditor.startEditing;b.cellEditor.startEditing=function(){r.apply(this,arguments);p();if(b.cellEditor.isContentEditing()){var a=!1,c=function(){a||(a=!0,window.setTimeout(function(){for(var c=
 b.getSelectedElement();null!=c&&c.nodeType!=mxConstants.NODETYPE_ELEMENT;)c=c.parentNode;if(null!=c&&(c=mxUtils.getCurrentStyle(c),null!=c&&null!=q.toolbar)){var d=c.fontFamily;"'"==d.charAt(0)&&(d=d.substring(1));"'"==d.charAt(d.length-1)&&(d=d.substring(0,d.length-1));q.toolbar.setFontName(d);q.toolbar.setFontSize(parseInt(c.fontSize))}a=!1},0))};mxEvent.addListener(b.cellEditor.textarea,"input",c);mxEvent.addListener(b.cellEditor.textarea,"touchend",c);mxEvent.addListener(b.cellEditor.textarea,
-"mouseup",c);mxEvent.addListener(b.cellEditor.textarea,"keyup",c);c()}};var t=b.cellEditor.stopEditing;b.cellEditor.stopEditing=function(a,b){t.apply(this,arguments);p()};b.container.setAttribute("tabindex","0");b.container.style.cursor="default";if(window.self===window.top&&null!=b.container.parentNode)try{b.container.focus()}catch(y){}var u=b.fireMouseEvent;b.fireMouseEvent=function(a,b,c){a==mxEvent.MOUSE_DOWN&&this.container.focus();u.apply(this,arguments)};b.popupMenuHandler.autoExpand=!0;null!=
-this.menus&&(b.popupMenuHandler.factoryMethod=mxUtils.bind(this,function(a,b,c){this.menus.createPopupMenu(a,b,c)}));mxEvent.addGestureListeners(document,mxUtils.bind(this,function(a){b.popupMenuHandler.hideMenu()}));this.keyHandler=this.createKeyHandler(a);this.getKeyHandler=function(){return keyHandler};var w="rounded shadow glass dashed dashPattern comic labelBackgroundColor".split(" "),v="shape edgeStyle curved rounded elbow comic jumpStyle jumpSize".split(" ");this.setDefaultStyle=function(a){var c=
+"mouseup",c);mxEvent.addListener(b.cellEditor.textarea,"keyup",c);c()}};var t=b.cellEditor.stopEditing;b.cellEditor.stopEditing=function(a,b){t.apply(this,arguments);p()};b.container.setAttribute("tabindex","0");b.container.style.cursor="default";if(window.self===window.top&&null!=b.container.parentNode)try{b.container.focus()}catch(y){}var w=b.fireMouseEvent;b.fireMouseEvent=function(a,b,c){a==mxEvent.MOUSE_DOWN&&this.container.focus();w.apply(this,arguments)};b.popupMenuHandler.autoExpand=!0;null!=
+this.menus&&(b.popupMenuHandler.factoryMethod=mxUtils.bind(this,function(a,b,c){this.menus.createPopupMenu(a,b,c)}));mxEvent.addGestureListeners(document,mxUtils.bind(this,function(a){b.popupMenuHandler.hideMenu()}));this.keyHandler=this.createKeyHandler(a);this.getKeyHandler=function(){return keyHandler};var u="rounded shadow glass dashed dashPattern comic labelBackgroundColor".split(" "),v="shape edgeStyle curved rounded elbow comic jumpStyle jumpSize".split(" ");this.setDefaultStyle=function(a){var c=
 b.view.getState(a);if(null!=c){a=a.clone();a.style="";a=b.getCellStyle(a);var d=[],f=[],e;for(e in c.style)a[e]!=c.style[e]&&(d.push(c.style[e]),f.push(e));e=b.getModel().getStyle(c.cell);for(var g=null!=e?e.split(";"):[],h=0;h<g.length;h++){var k=g[h],l=k.indexOf("=");0<=l&&(e=k.substring(0,l),k=k.substring(l+1),null!=a[e]&&"none"==k&&(d.push(k),f.push(e)))}b.getModel().isEdge(c.cell)?b.currentEdgeStyle={}:b.currentVertexStyle={};this.fireEvent(new mxEventObject("styleChanged","keys",f,"values",
-d,"cells",[c.cell]))}};this.clearDefaultStyle=function(){b.currentEdgeStyle=mxUtils.clone(b.defaultEdgeStyle);b.currentVertexStyle=mxUtils.clone(b.defaultVertexStyle);this.fireEvent(new mxEventObject("styleChanged","keys",[],"values",[],"cells",[]))};var A=["fontFamily","fontSize","fontColor"],x="edgeStyle startArrow startFill startSize endArrow endFill endSize jettySize orthogonalLoop".split(" "),C=["startArrow startFill startSize endArrow endFill endSize jettySize orthogonalLoop".split(" "),["strokeColor",
-"strokeWidth"],["fillColor","gradientColor"],A,["align"],["html"]];for(a=0;a<C.length;a++)for(c=0;c<C[a].length;c++)w.push(C[a][c]);for(a=0;a<v.length;a++)0>mxUtils.indexOf(w,v[a])&&w.push(v[a]);var B=function(a,c){b.getModel().beginUpdate();try{if(c)for(var d=b.getModel().isEdge(h),f=d?b.currentEdgeStyle:b.currentVertexStyle,d=["fontSize","fontFamily","fontColor"],e=0;e<d.length;e++){var g=f[d[e]];null!=g&&b.setCellStyles(d[e],g,a)}else for(g=0;g<a.length;g++){for(var h=a[g],k=b.getModel().getStyle(h),
-l=null!=k?k.split(";"):[],m=w.slice(),e=0;e<l.length;e++){var n=l[e],D=n.indexOf("=");if(0<=D){var p=n.substring(0,D),z=mxUtils.indexOf(m,p);0<=z&&m.splice(z,1);for(var P=0;P<C.length;P++){var r=C[P];if(0<=mxUtils.indexOf(r,p))for(var q=0;q<r.length;q++){var t=mxUtils.indexOf(m,r[q]);0<=t&&m.splice(t,1)}}}}f=(d=b.getModel().isEdge(h))?b.currentEdgeStyle:b.currentVertexStyle;for(e=0;e<m.length;e++){var p=m[e],u=f[p];null==u||"shape"==p&&!d||(!d||0>mxUtils.indexOf(v,p))&&b.setCellStyles(p,u,[h])}}}finally{b.getModel().endUpdate()}};
-b.addListener("cellsInserted",function(a,b){B(b.getProperty("cells"))});b.addListener("textInserted",function(a,b){B(b.getProperty("cells"),!0)});b.connectionHandler.addListener(mxEvent.CONNECT,function(a,b){var c=[b.getProperty("cell")];b.getProperty("terminalInserted")&&c.push(b.getProperty("terminal"));B(c)});this.addListener("styleChanged",mxUtils.bind(this,function(a,c){var d=c.getProperty("cells"),f=!1,e=!1;if(0<d.length)for(var g=0;g<d.length&&(f=b.getModel().isVertex(d[g])||f,!(e=b.getModel().isEdge(d[g])||
-e)||!f);g++);else e=f=!0;for(var d=c.getProperty("keys"),h=c.getProperty("values"),g=0;g<d.length;g++){var k=0<=mxUtils.indexOf(A,d[g]);if("strokeColor"!=d[g]||null!=h[g]&&"none"!=h[g])if(0<=mxUtils.indexOf(v,d[g]))e||0<=mxUtils.indexOf(x,d[g])?null==h[g]?delete b.currentEdgeStyle[d[g]]:b.currentEdgeStyle[d[g]]=h[g]:f&&0<=mxUtils.indexOf(w,d[g])&&(null==h[g]?delete b.currentVertexStyle[d[g]]:b.currentVertexStyle[d[g]]=h[g]);else if(0<=mxUtils.indexOf(w,d[g])){if(f||k)null==h[g]?delete b.currentVertexStyle[d[g]]:
+d,"cells",[c.cell]))}};this.clearDefaultStyle=function(){b.currentEdgeStyle=mxUtils.clone(b.defaultEdgeStyle);b.currentVertexStyle=mxUtils.clone(b.defaultVertexStyle);this.fireEvent(new mxEventObject("styleChanged","keys",[],"values",[],"cells",[]))};var A=["fontFamily","fontSize","fontColor"],x="edgeStyle startArrow startFill startSize endArrow endFill endSize jettySize orthogonalLoop".split(" "),B=["startArrow startFill startSize endArrow endFill endSize jettySize orthogonalLoop".split(" "),["strokeColor",
+"strokeWidth"],["fillColor","gradientColor"],A,["align"],["html"]];for(a=0;a<B.length;a++)for(c=0;c<B[a].length;c++)u.push(B[a][c]);for(a=0;a<v.length;a++)0>mxUtils.indexOf(u,v[a])&&u.push(v[a]);var C=function(a,c){b.getModel().beginUpdate();try{if(c)for(var d=b.getModel().isEdge(h),f=d?b.currentEdgeStyle:b.currentVertexStyle,d=["fontSize","fontFamily","fontColor"],e=0;e<d.length;e++){var g=f[d[e]];null!=g&&b.setCellStyles(d[e],g,a)}else for(g=0;g<a.length;g++){for(var h=a[g],k=b.getModel().getStyle(h),
+l=null!=k?k.split(";"):[],m=u.slice(),e=0;e<l.length;e++){var n=l[e],E=n.indexOf("=");if(0<=E){var p=n.substring(0,E),z=mxUtils.indexOf(m,p);0<=z&&m.splice(z,1);for(var Q=0;Q<B.length;Q++){var r=B[Q];if(0<=mxUtils.indexOf(r,p))for(var q=0;q<r.length;q++){var t=mxUtils.indexOf(m,r[q]);0<=t&&m.splice(t,1)}}}}f=(d=b.getModel().isEdge(h))?b.currentEdgeStyle:b.currentVertexStyle;for(e=0;e<m.length;e++){var p=m[e],w=f[p];null==w||"shape"==p&&!d||(!d||0>mxUtils.indexOf(v,p))&&b.setCellStyles(p,w,[h])}}}finally{b.getModel().endUpdate()}};
+b.addListener("cellsInserted",function(a,b){C(b.getProperty("cells"))});b.addListener("textInserted",function(a,b){C(b.getProperty("cells"),!0)});b.connectionHandler.addListener(mxEvent.CONNECT,function(a,b){var c=[b.getProperty("cell")];b.getProperty("terminalInserted")&&c.push(b.getProperty("terminal"));C(c)});this.addListener("styleChanged",mxUtils.bind(this,function(a,c){var d=c.getProperty("cells"),f=!1,e=!1;if(0<d.length)for(var g=0;g<d.length&&(f=b.getModel().isVertex(d[g])||f,!(e=b.getModel().isEdge(d[g])||
+e)||!f);g++);else e=f=!0;for(var d=c.getProperty("keys"),h=c.getProperty("values"),g=0;g<d.length;g++){var k=0<=mxUtils.indexOf(A,d[g]);if("strokeColor"!=d[g]||null!=h[g]&&"none"!=h[g])if(0<=mxUtils.indexOf(v,d[g]))e||0<=mxUtils.indexOf(x,d[g])?null==h[g]?delete b.currentEdgeStyle[d[g]]:b.currentEdgeStyle[d[g]]=h[g]:f&&0<=mxUtils.indexOf(u,d[g])&&(null==h[g]?delete b.currentVertexStyle[d[g]]:b.currentVertexStyle[d[g]]=h[g]);else if(0<=mxUtils.indexOf(u,d[g])){if(f||k)null==h[g]?delete b.currentVertexStyle[d[g]]:
 b.currentVertexStyle[d[g]]=h[g];if(e||k||0<=mxUtils.indexOf(x,d[g]))null==h[g]?delete b.currentEdgeStyle[d[g]]:b.currentEdgeStyle[d[g]]=h[g]}}null!=this.toolbar&&(this.toolbar.setFontName(b.currentVertexStyle.fontFamily||Menus.prototype.defaultFont),this.toolbar.setFontSize(b.currentVertexStyle.fontSize||Menus.prototype.defaultFontSize),null!=this.toolbar.edgeStyleMenu&&(this.toolbar.edgeStyleMenu.getElementsByTagName("div")[0].className="orthogonalEdgeStyle"==b.currentEdgeStyle.edgeStyle&&"1"==b.currentEdgeStyle.curved?
 "geSprite geSprite-curved":"straight"==b.currentEdgeStyle.edgeStyle||"none"==b.currentEdgeStyle.edgeStyle||null==b.currentEdgeStyle.edgeStyle?"geSprite geSprite-straight":"entityRelationEdgeStyle"==b.currentEdgeStyle.edgeStyle?"geSprite geSprite-entity":"elbowEdgeStyle"==b.currentEdgeStyle.edgeStyle?"geSprite geSprite-"+("vertical"==b.currentEdgeStyle.elbow?"verticalelbow":"horizontalelbow"):"isometricEdgeStyle"==b.currentEdgeStyle.edgeStyle?"geSprite geSprite-"+("vertical"==b.currentEdgeStyle.elbow?
 "verticalisometric":"horizontalisometric"):"geSprite geSprite-orthogonal"),null!=this.toolbar.edgeShapeMenu&&(this.toolbar.edgeShapeMenu.getElementsByTagName("div")[0].className="link"==b.currentEdgeStyle.shape?"geSprite geSprite-linkedge":"flexArrow"==b.currentEdgeStyle.shape?"geSprite geSprite-arrow":"arrow"==b.currentEdgeStyle.shape?"geSprite geSprite-simplearrow":"geSprite geSprite-connection"),null!=this.toolbar.lineStartMenu&&(this.toolbar.lineStartMenu.getElementsByTagName("div")[0].className=
@@ -2029,28 +2029,29 @@ EditorUi.prototype.updatePasteActionStates=function(){var a=this.editor.graph,c=
 EditorUi.prototype.initClipboard=function(){var a=this,c=mxClipboard.cut;mxClipboard.cut=function(b){b.cellEditor.isContentEditing()?document.execCommand("cut",!1,null):c.apply(this,arguments);a.updatePasteActionStates()};var d=mxClipboard.copy;mxClipboard.copy=function(b){b.cellEditor.isContentEditing()?document.execCommand("copy",!1,null):d.apply(this,arguments);a.updatePasteActionStates()};var b=mxClipboard.paste;mxClipboard.paste=function(c){var d=null;c.cellEditor.isContentEditing()?document.execCommand("paste",
 !1,null):d=b.apply(this,arguments);a.updatePasteActionStates();return d};var e=this.editor.graph.cellEditor.startEditing;this.editor.graph.cellEditor.startEditing=function(){e.apply(this,arguments);a.updatePasteActionStates()};var f=this.editor.graph.cellEditor.stopEditing;this.editor.graph.cellEditor.stopEditing=function(b,c){f.apply(this,arguments);a.updatePasteActionStates()};this.updatePasteActionStates()};
 EditorUi.prototype.initCanvas=function(){var a=this.editor.graph,a=this.editor.graph;a.timerAutoScroll=!0;a.getPagePadding=function(){return new mxPoint(Math.max(0,Math.round((a.container.offsetWidth-34)/a.view.scale)),Math.max(0,Math.round((a.container.offsetHeight-34)/a.view.scale)))};a.view.getBackgroundPageBounds=function(){var a=this.graph.getPageLayout(),b=this.graph.getPageSize();return new mxRectangle(this.scale*(this.translate.x+a.x*b.width),this.scale*(this.translate.y+a.y*b.height),this.scale*
-a.width*b.width,this.scale*a.height*b.height)};a.getPreferredPageSize=function(a,b,c){a=this.getPageLayout();b=this.getPageSize();return new mxRectangle(0,0,a.width*b.width,a.height*b.height)};var c=null;if(this.editor.chromeless){this.chromelessResize=c=mxUtils.bind(this,function(b,c){if(null!=a.container){var d=a.pageVisible?a.view.getBackgroundPageBounds():a.getGraphBounds(),f=a.view.translate,e=a.view.scale,d=mxRectangle.fromRectangle(d);d.x=d.x/e-f.x;d.y=d.y/e-f.y;d.width/=e;d.height/=e;var f=
-a.container.scrollTop,g=a.container.scrollLeft,h=mxClient.IS_QUIRKS||8<=document.documentMode?20:14;if(8==document.documentMode||9==document.documentMode)h+=3;var k=a.container.offsetWidth-h,l=b?Math.max(.3,Math.min(c||1,k/d.width)):e;a.view.scaleAndTranslate(l,Math.floor(Math.max((k-l*d.width)/2,0)/l-d.x),Math.floor(Math.max((a.container.offsetHeight-h-l*d.height)/this.lightboxVerticalDivider,0)/l-d.y));a.container.scrollTop=f*l/e;a.container.scrollLeft=g*l/e}});var d=mxUtils.bind(this,function(){c(!1)});
-mxEvent.addListener(window,"resize",d);this.destroyFunctions.push(function(){mxEvent.removeListener(window,"resize",d)});this.editor.addListener("resetGraphView",mxUtils.bind(this,function(){c(!0)}));this.actions.get("zoomIn").funct=function(b){a.zoomIn();c(!1)};this.actions.get("zoomOut").funct=function(b){a.zoomOut();c(!1)};if("0"!=urlParams.toolbar){this.chromelessToolbar=document.createElement("div");this.chromelessToolbar.style.position="fixed";this.chromelessToolbar.style.overflow="hidden";
-this.chromelessToolbar.style.boxSizing="border-box";this.chromelessToolbar.style.whiteSpace="nowrap";this.chromelessToolbar.style.backgroundColor="#000000";this.chromelessToolbar.style.padding="10px 10px 8px 10px";this.chromelessToolbar.style.left="50%";mxClient.IS_VML||(mxUtils.setPrefixedStyle(this.chromelessToolbar.style,"borderRadius","20px"),mxUtils.setPrefixedStyle(this.chromelessToolbar.style,"transition","opacity 600ms ease-in-out"));var b=mxUtils.bind(this,function(){var b=mxUtils.getCurrentStyle(a.container);
-this.chromelessToolbar.style.bottom=(null!=b?parseInt(b["margin-bottom"]||0):0)+(null!=this.tabContainer?20+parseInt(this.tabContainer.style.height):20)+"px"});this.editor.addListener("resetGraphView",b);b();var e=0,b=mxUtils.bind(this,function(a,b,c){e++;var d=document.createElement("span");d.style.paddingLeft="8px";d.style.paddingRight="8px";d.style.cursor="pointer";mxEvent.addListener(d,"click",a);null!=c&&d.setAttribute("title",c);a=document.createElement("img");a.setAttribute("border","0");a.setAttribute("src",
-b);d.appendChild(a);this.chromelessToolbar.appendChild(d);return d}),f=b(mxUtils.bind(this,function(a){this.actions.get("previousPage").funct();mxEvent.consume(a)}),Editor.previousLargeImage,mxResources.get("previousPage")),h=document.createElement("div");h.style.display="inline-block";h.style.verticalAlign="top";h.style.fontFamily="Helvetica,Arial";h.style.marginTop="8px";h.style.color="#ffffff";this.chromelessToolbar.appendChild(h);var g=b(mxUtils.bind(this,function(a){this.actions.get("nextPage").funct();
-mxEvent.consume(a)}),Editor.nextLargeImage,mxResources.get("nextPage")),k=mxUtils.bind(this,function(){null!=this.pages&&1<this.pages.length&&null!=this.currentPage&&(h.innerHTML="",mxUtils.write(h,mxUtils.indexOf(this.pages,this.currentPage)+1+" / "+this.pages.length))});f.style.paddingLeft="0px";f.style.paddingRight="4px";g.style.paddingLeft="4px";g.style.paddingRight="0px";var l=mxUtils.bind(this,function(){null!=this.pages&&1<this.pages.length&&null!=this.currentPage?(g.style.display="",f.style.display=
-"",h.style.display="inline-block"):(g.style.display="none",f.style.display="none",h.style.display="none");k()});this.editor.addListener("resetGraphView",l);this.editor.addListener("pageSelected",k);b(mxUtils.bind(this,function(a){this.actions.get("zoomOut").funct();mxEvent.consume(a)}),Editor.zoomOutLargeImage,mxResources.get("zoomOut")+" (Alt+Mousewheel)");b(mxUtils.bind(this,function(a){this.actions.get("zoomIn").funct();mxEvent.consume(a)}),Editor.zoomInLargeImage,mxResources.get("zoomIn")+" (Alt+Mousewheel)");
-b(mxUtils.bind(this,function(b){a.lightbox?(1==a.view.scale?this.lightboxFit():a.zoomTo(1),c(!1)):c(!0);mxEvent.consume(b)}),Editor.actualSizeLargeImage,mxResources.get("fit"));var m=null,n=null,p=mxUtils.bind(this,function(a){null!=m&&(window.clearTimeout(m),fadeThead=null);null!=n&&(window.clearTimeout(n),fadeThead2=null);m=window.setTimeout(mxUtils.bind(this,function(){mxUtils.setOpacity(this.chromelessToolbar,0);m=null;n=window.setTimeout(mxUtils.bind(this,function(){this.chromelessToolbar.style.display=
-"none";n=null}),600)}),a||200)}),q=mxUtils.bind(this,function(a){null!=m&&(window.clearTimeout(m),fadeThead=null);null!=n&&(window.clearTimeout(n),fadeThead2=null);this.chromelessToolbar.style.display="";mxUtils.setOpacity(this.chromelessToolbar,a||30)});if("1"==urlParams.layers){this.layersDialog=null;var r=b(mxUtils.bind(this,function(b){if(null!=this.layersDialog)this.layersDialog.parentNode.removeChild(this.layersDialog),this.layersDialog=null;else{this.layersDialog=a.createLayersDialog();mxEvent.addListener(this.layersDialog,
-"mouseleave",mxUtils.bind(this,function(){this.layersDialog.parentNode.removeChild(this.layersDialog);this.layersDialog=null}));var c=r.getBoundingClientRect();mxUtils.setPrefixedStyle(this.layersDialog.style,"borderRadius","5px");this.layersDialog.style.position="fixed";this.layersDialog.style.fontFamily="Helvetica,Arial";this.layersDialog.style.backgroundColor="#000000";this.layersDialog.style.width="160px";this.layersDialog.style.padding="4px 2px 4px 2px";this.layersDialog.style.color="#ffffff";
-mxUtils.setOpacity(this.layersDialog,70);this.layersDialog.style.left=c.left+"px";this.layersDialog.style.bottom=parseInt(this.chromelessToolbar.style.bottom)+this.chromelessToolbar.offsetHeight+4+"px";c=mxUtils.getCurrentStyle(this.editor.graph.container);this.layersDialog.style.zIndex=c.zIndex;document.body.appendChild(this.layersDialog)}mxEvent.consume(b)}),Editor.layersLargeImage,mxResources.get("layers")),t=a.getModel();t.addListener(mxEvent.CHANGE,function(){r.style.display=1<t.getChildCount(t.root)?
-"":"none"})}this.addChromelessToolbarItems(b);null!=this.editor.editButtonLink&&b(mxUtils.bind(this,function(a){"_blank"==this.editor.editButtonLink?this.editor.editAsNew(this.getEditBlankXml(),null,!0):window.open(this.editor.editButtonLink,"editWindow");mxEvent.consume(a)}),Editor.editLargeImage,mxResources.get("openInNewWindow"));!a.lightbox||"1"!=urlParams.close&&this.container==document.body||b(mxUtils.bind(this,function(a){"1"==urlParams.close?window.close():(this.destroy(),mxEvent.consume(a))}),
-Editor.closeLargeImage,mxResources.get("close")+" (Escape)");this.chromelessToolbar.style.display="none";mxUtils.setPrefixedStyle(this.chromelessToolbar.style,"transform","translate(-50%,0)");a.container.appendChild(this.chromelessToolbar);mxEvent.addListener(a.container,mxClient.IS_POINTER?"pointermove":"mousemove",mxUtils.bind(this,function(a){mxEvent.isTouchEvent(a)||(mxEvent.isShiftDown(a)||q(30),p())}));mxEvent.addListener(this.chromelessToolbar,mxClient.IS_POINTER?"pointermove":"mousemove",
-function(a){mxEvent.consume(a)});mxEvent.addListener(this.chromelessToolbar,"mouseenter",mxUtils.bind(this,function(a){mxEvent.isShiftDown(a)?p():q(100)}));mxEvent.addListener(this.chromelessToolbar,"mousemove",mxUtils.bind(this,function(a){mxEvent.isShiftDown(a)?p():q(100);mxEvent.consume(a)}));mxEvent.addListener(this.chromelessToolbar,"mouseleave",mxUtils.bind(this,function(a){mxEvent.isTouchEvent(a)||q(30)}));var u=a.getTolerance(),w=this;a.addMouseListener({startX:0,startY:0,scrollLeft:0,scrollTop:0,
-mouseDown:function(b,c){this.startX=c.getGraphX();this.startY=c.getGraphY();this.scrollLeft=a.container.scrollLeft;this.scrollTop=a.container.scrollTop},mouseMove:function(a,b){},mouseUp:function(b,c){mxEvent.isTouchEvent(c.getEvent())&&Math.abs(this.scrollLeft-a.container.scrollLeft)<u&&Math.abs(this.scrollTop-a.container.scrollTop)<u&&Math.abs(this.startX-c.getGraphX())<u&&Math.abs(this.startY-c.getGraphY())<u&&(0<parseFloat(w.chromelessToolbar.style.opacity||0)?p():q(30))}})}this.editor.editable||
-this.addChromelessClickHandler()}else if(this.editor.extendCanvas){var v=a.view.validate;a.view.validate=function(){if(null!=this.graph.container&&mxUtils.hasScrollbars(this.graph.container)){var a=this.graph.getPagePadding(),b=this.graph.getPageSize();this.translate.x=a.x-(this.x0||0)*b.width;this.translate.y=a.y-(this.y0||0)*b.height}v.apply(this,arguments)};var A=a.sizeDidChange;a.sizeDidChange=function(){if(null!=this.container&&mxUtils.hasScrollbars(this.container)){var b=this.getPageLayout(),
-c=this.getPagePadding(),d=this.getPageSize(),f=Math.ceil(2*c.x+b.width*d.width),e=Math.ceil(2*c.y+b.height*d.height),g=a.minimumGraphSize;if(null==g||g.width!=f||g.height!=e)a.minimumGraphSize=new mxRectangle(0,0,f,e);f=c.x-b.x*d.width;c=c.y-b.y*d.height;this.autoTranslate||this.view.translate.x==f&&this.view.translate.y==c?A.apply(this,arguments):(this.autoTranslate=!0,this.view.x0=b.x,this.view.y0=b.y,b=a.view.translate.x,d=a.view.translate.y,a.view.setTranslate(f,c),a.container.scrollLeft+=Math.round((f-
-b)*a.view.scale),a.container.scrollTop+=Math.round((c-d)*a.view.scale),this.autoTranslate=!1)}}}a.updateZoomTimeout=null;a.cumulativeZoomFactor=1;var x=null;a.lazyZoom=function(b){null!=this.updateZoomTimeout&&window.clearTimeout(this.updateZoomTimeout);b?.15>this.view.scale*this.cumulativeZoomFactor?this.cumulativeZoomFactor=(this.view.scale+.01)/this.view.scale:(this.cumulativeZoomFactor*=this.zoomFactor,this.cumulativeZoomFactor=Math.round(this.view.scale*this.cumulativeZoomFactor*20)/20/this.view.scale):
-.15>=this.view.scale*this.cumulativeZoomFactor?this.cumulativeZoomFactor=(this.view.scale-.01)/this.view.scale:(this.cumulativeZoomFactor/=this.zoomFactor,this.cumulativeZoomFactor=Math.round(this.view.scale*this.cumulativeZoomFactor*20)/20/this.view.scale);this.cumulativeZoomFactor=Math.max(.01,Math.min(this.view.scale*this.cumulativeZoomFactor,160)/this.view.scale);this.updateZoomTimeout=window.setTimeout(mxUtils.bind(this,function(){this.zoom(this.cumulativeZoomFactor);null!=c&&c(!1);if(null!=
-x&&mxUtils.hasScrollbars(a.container)){var b=mxUtils.getOffset(a.container),d=a.container.offsetHeight/2-x.y+b.y;a.container.scrollLeft-=(a.container.offsetWidth/2-x.x+b.x)*(this.cumulativeZoomFactor-1);a.container.scrollTop-=d*(this.cumulativeZoomFactor-1)}this.cumulativeZoomFactor=1;this.updateZoomTimeout=null}),20)};mxEvent.addMouseWheelListener(mxUtils.bind(this,function(b,c){if((mxEvent.isAltDown(b)||mxEvent.isControlDown(b)&&!mxClient.IS_MAC||a.panningHandler.isActive())&&(null==this.dialogs||
-0==this.dialogs.length))for(var d=mxEvent.getSource(b);null!=d;){if(d==a.container){x=new mxPoint(mxEvent.getClientX(b),mxEvent.getClientY(b));a.lazyZoom(c);mxEvent.consume(b);break}d=d.parentNode}}))};EditorUi.prototype.addChromelessToolbarItems=function(a){a(mxUtils.bind(this,function(a){this.actions.get("print").funct();mxEvent.consume(a)}),Editor.printLargeImage,mxResources.get("print"))};
+a.width*b.width,this.scale*a.height*b.height)};a.getPreferredPageSize=function(a,b,c){a=this.getPageLayout();b=this.getPageSize();return new mxRectangle(0,0,a.width*b.width,a.height*b.height)};var c=null;if(this.editor.chromeless){this.chromelessResize=c=mxUtils.bind(this,function(b,c,d,f){if(null!=a.container){d=null!=d?d:0;f=null!=f?f:0;var e=a.pageVisible?a.view.getBackgroundPageBounds():a.getGraphBounds(),g=mxUtils.hasScrollbars(a.container),h=a.view.translate,k=a.view.scale,l=mxRectangle.fromRectangle(e);
+l.x=l.x/k-h.x;l.y=l.y/k-h.y;l.width/=k;l.height/=k;var h=a.container.scrollTop,m=a.container.scrollLeft,n=mxClient.IS_QUIRKS||8<=document.documentMode?20:14;if(8==document.documentMode||9==document.documentMode)n+=3;var p=a.container.offsetWidth-n,n=a.container.offsetHeight-n;b=b?Math.max(.3,Math.min(c||1,p/l.width)):k;c=(p-b*l.width)/2/b;var r=(n-b*l.height)/this.lightboxVerticalDivider/b;g&&(c=Math.max(c,0),r=Math.max(r,0));if(g||e.width<p||e.height<n)a.view.scaleAndTranslate(b,Math.floor(c-l.x),
+Math.floor(r-l.y)),a.container.scrollTop=h*b/k,a.container.scrollLeft=m*b/k;else if(0!=d||0!=f)e=a.view.translate,a.view.setTranslate(Math.floor(e.x+d/k),Math.floor(e.y+f/k))}});var d=mxUtils.bind(this,function(){c(!1)});mxEvent.addListener(window,"resize",d);this.destroyFunctions.push(function(){mxEvent.removeListener(window,"resize",d)});this.editor.addListener("resetGraphView",mxUtils.bind(this,function(){c(!0)}));this.actions.get("zoomIn").funct=function(b){a.zoomIn();c(!1)};this.actions.get("zoomOut").funct=
+function(b){a.zoomOut();c(!1)};if("0"!=urlParams.toolbar){this.chromelessToolbar=document.createElement("div");this.chromelessToolbar.style.position="fixed";this.chromelessToolbar.style.overflow="hidden";this.chromelessToolbar.style.boxSizing="border-box";this.chromelessToolbar.style.whiteSpace="nowrap";this.chromelessToolbar.style.backgroundColor="#000000";this.chromelessToolbar.style.padding="10px 10px 8px 10px";this.chromelessToolbar.style.left="50%";mxClient.IS_VML||(mxUtils.setPrefixedStyle(this.chromelessToolbar.style,
+"borderRadius","20px"),mxUtils.setPrefixedStyle(this.chromelessToolbar.style,"transition","opacity 600ms ease-in-out"));var b=mxUtils.bind(this,function(){var b=mxUtils.getCurrentStyle(a.container);this.chromelessToolbar.style.bottom=(null!=b?parseInt(b["margin-bottom"]||0):0)+(null!=this.tabContainer?20+parseInt(this.tabContainer.style.height):20)+"px"});this.editor.addListener("resetGraphView",b);b();var e=0,b=mxUtils.bind(this,function(a,b,c){e++;var d=document.createElement("span");d.style.paddingLeft=
+"8px";d.style.paddingRight="8px";d.style.cursor="pointer";mxEvent.addListener(d,"click",a);null!=c&&d.setAttribute("title",c);a=document.createElement("img");a.setAttribute("border","0");a.setAttribute("src",b);d.appendChild(a);this.chromelessToolbar.appendChild(d);return d}),f=b(mxUtils.bind(this,function(a){this.actions.get("previousPage").funct();mxEvent.consume(a)}),Editor.previousLargeImage,mxResources.get("previousPage")),h=document.createElement("div");h.style.display="inline-block";h.style.verticalAlign=
+"top";h.style.fontFamily="Helvetica,Arial";h.style.marginTop="8px";h.style.color="#ffffff";this.chromelessToolbar.appendChild(h);var g=b(mxUtils.bind(this,function(a){this.actions.get("nextPage").funct();mxEvent.consume(a)}),Editor.nextLargeImage,mxResources.get("nextPage")),k=mxUtils.bind(this,function(){null!=this.pages&&1<this.pages.length&&null!=this.currentPage&&(h.innerHTML="",mxUtils.write(h,mxUtils.indexOf(this.pages,this.currentPage)+1+" / "+this.pages.length))});f.style.paddingLeft="0px";
+f.style.paddingRight="4px";g.style.paddingLeft="4px";g.style.paddingRight="0px";var l=mxUtils.bind(this,function(){null!=this.pages&&1<this.pages.length&&null!=this.currentPage?(g.style.display="",f.style.display="",h.style.display="inline-block"):(g.style.display="none",f.style.display="none",h.style.display="none");k()});this.editor.addListener("resetGraphView",l);this.editor.addListener("pageSelected",k);b(mxUtils.bind(this,function(a){this.actions.get("zoomOut").funct();mxEvent.consume(a)}),Editor.zoomOutLargeImage,
+mxResources.get("zoomOut")+" (Alt+Mousewheel)");b(mxUtils.bind(this,function(a){this.actions.get("zoomIn").funct();mxEvent.consume(a)}),Editor.zoomInLargeImage,mxResources.get("zoomIn")+" (Alt+Mousewheel)");b(mxUtils.bind(this,function(b){a.lightbox?(1==a.view.scale?this.lightboxFit():a.zoomTo(1),c(!1)):c(!0);mxEvent.consume(b)}),Editor.actualSizeLargeImage,mxResources.get("fit"));var m=null,n=null,p=mxUtils.bind(this,function(a){null!=m&&(window.clearTimeout(m),fadeThead=null);null!=n&&(window.clearTimeout(n),
+fadeThead2=null);m=window.setTimeout(mxUtils.bind(this,function(){mxUtils.setOpacity(this.chromelessToolbar,0);m=null;n=window.setTimeout(mxUtils.bind(this,function(){this.chromelessToolbar.style.display="none";n=null}),600)}),a||200)}),q=mxUtils.bind(this,function(a){null!=m&&(window.clearTimeout(m),fadeThead=null);null!=n&&(window.clearTimeout(n),fadeThead2=null);this.chromelessToolbar.style.display="";mxUtils.setOpacity(this.chromelessToolbar,a||30)});if("1"==urlParams.layers){this.layersDialog=
+null;var r=b(mxUtils.bind(this,function(b){if(null!=this.layersDialog)this.layersDialog.parentNode.removeChild(this.layersDialog),this.layersDialog=null;else{this.layersDialog=a.createLayersDialog();mxEvent.addListener(this.layersDialog,"mouseleave",mxUtils.bind(this,function(){this.layersDialog.parentNode.removeChild(this.layersDialog);this.layersDialog=null}));var c=r.getBoundingClientRect();mxUtils.setPrefixedStyle(this.layersDialog.style,"borderRadius","5px");this.layersDialog.style.position=
+"fixed";this.layersDialog.style.fontFamily="Helvetica,Arial";this.layersDialog.style.backgroundColor="#000000";this.layersDialog.style.width="160px";this.layersDialog.style.padding="4px 2px 4px 2px";this.layersDialog.style.color="#ffffff";mxUtils.setOpacity(this.layersDialog,70);this.layersDialog.style.left=c.left+"px";this.layersDialog.style.bottom=parseInt(this.chromelessToolbar.style.bottom)+this.chromelessToolbar.offsetHeight+4+"px";c=mxUtils.getCurrentStyle(this.editor.graph.container);this.layersDialog.style.zIndex=
+c.zIndex;document.body.appendChild(this.layersDialog)}mxEvent.consume(b)}),Editor.layersLargeImage,mxResources.get("layers")),t=a.getModel();t.addListener(mxEvent.CHANGE,function(){r.style.display=1<t.getChildCount(t.root)?"":"none"})}this.addChromelessToolbarItems(b);null!=this.editor.editButtonLink&&b(mxUtils.bind(this,function(a){"_blank"==this.editor.editButtonLink?this.editor.editAsNew(this.getEditBlankXml(),null,!0):window.open(this.editor.editButtonLink,"editWindow");mxEvent.consume(a)}),Editor.editLargeImage,
+mxResources.get("openInNewWindow"));!a.lightbox||"1"!=urlParams.close&&this.container==document.body||b(mxUtils.bind(this,function(a){"1"==urlParams.close?window.close():(this.destroy(),mxEvent.consume(a))}),Editor.closeLargeImage,mxResources.get("close")+" (Escape)");this.chromelessToolbar.style.display="none";mxUtils.setPrefixedStyle(this.chromelessToolbar.style,"transform","translate(-50%,0)");a.container.appendChild(this.chromelessToolbar);mxEvent.addListener(a.container,mxClient.IS_POINTER?"pointermove":
+"mousemove",mxUtils.bind(this,function(a){mxEvent.isTouchEvent(a)||(mxEvent.isShiftDown(a)||q(30),p())}));mxEvent.addListener(this.chromelessToolbar,mxClient.IS_POINTER?"pointermove":"mousemove",function(a){mxEvent.consume(a)});mxEvent.addListener(this.chromelessToolbar,"mouseenter",mxUtils.bind(this,function(a){mxEvent.isShiftDown(a)?p():q(100)}));mxEvent.addListener(this.chromelessToolbar,"mousemove",mxUtils.bind(this,function(a){mxEvent.isShiftDown(a)?p():q(100);mxEvent.consume(a)}));mxEvent.addListener(this.chromelessToolbar,
+"mouseleave",mxUtils.bind(this,function(a){mxEvent.isTouchEvent(a)||q(30)}));var w=a.getTolerance(),u=this;a.addMouseListener({startX:0,startY:0,scrollLeft:0,scrollTop:0,mouseDown:function(b,c){this.startX=c.getGraphX();this.startY=c.getGraphY();this.scrollLeft=a.container.scrollLeft;this.scrollTop=a.container.scrollTop},mouseMove:function(a,b){},mouseUp:function(b,c){mxEvent.isTouchEvent(c.getEvent())&&Math.abs(this.scrollLeft-a.container.scrollLeft)<w&&Math.abs(this.scrollTop-a.container.scrollTop)<
+w&&Math.abs(this.startX-c.getGraphX())<w&&Math.abs(this.startY-c.getGraphY())<w&&(0<parseFloat(u.chromelessToolbar.style.opacity||0)?p():q(30))}})}this.editor.editable||this.addChromelessClickHandler()}else if(this.editor.extendCanvas){var v=a.view.validate;a.view.validate=function(){if(null!=this.graph.container&&mxUtils.hasScrollbars(this.graph.container)){var a=this.graph.getPagePadding(),b=this.graph.getPageSize();this.translate.x=a.x-(this.x0||0)*b.width;this.translate.y=a.y-(this.y0||0)*b.height}v.apply(this,
+arguments)};var A=a.sizeDidChange;a.sizeDidChange=function(){if(null!=this.container&&mxUtils.hasScrollbars(this.container)){var b=this.getPageLayout(),c=this.getPagePadding(),d=this.getPageSize(),f=Math.ceil(2*c.x+b.width*d.width),e=Math.ceil(2*c.y+b.height*d.height),g=a.minimumGraphSize;if(null==g||g.width!=f||g.height!=e)a.minimumGraphSize=new mxRectangle(0,0,f,e);f=c.x-b.x*d.width;c=c.y-b.y*d.height;this.autoTranslate||this.view.translate.x==f&&this.view.translate.y==c?A.apply(this,arguments):
+(this.autoTranslate=!0,this.view.x0=b.x,this.view.y0=b.y,b=a.view.translate.x,d=a.view.translate.y,a.view.setTranslate(f,c),a.container.scrollLeft+=Math.round((f-b)*a.view.scale),a.container.scrollTop+=Math.round((c-d)*a.view.scale),this.autoTranslate=!1)}}}a.updateZoomTimeout=null;a.cumulativeZoomFactor=1;var x=null;a.lazyZoom=function(b){null!=this.updateZoomTimeout&&window.clearTimeout(this.updateZoomTimeout);b?.15>this.view.scale*this.cumulativeZoomFactor?this.cumulativeZoomFactor=(this.view.scale+
+.01)/this.view.scale:(this.cumulativeZoomFactor*=this.zoomFactor,this.cumulativeZoomFactor=Math.round(this.view.scale*this.cumulativeZoomFactor*20)/20/this.view.scale):.15>=this.view.scale*this.cumulativeZoomFactor?this.cumulativeZoomFactor=(this.view.scale-.01)/this.view.scale:(this.cumulativeZoomFactor/=this.zoomFactor,this.cumulativeZoomFactor=Math.round(this.view.scale*this.cumulativeZoomFactor*20)/20/this.view.scale);this.cumulativeZoomFactor=Math.max(.01,Math.min(this.view.scale*this.cumulativeZoomFactor,
+160)/this.view.scale);this.updateZoomTimeout=window.setTimeout(mxUtils.bind(this,function(){var b=mxUtils.getOffset(a.container),d=0,f=0;null!=x&&(d=a.container.offsetWidth/2-x.x+b.x,f=a.container.offsetHeight/2-x.y+b.y);b=this.view.scale;this.zoom(this.cumulativeZoomFactor);this.view.scale!=b&&(null!=c&&c(!1,null,d*(this.cumulativeZoomFactor-1),f*(this.cumulativeZoomFactor-1)),!mxUtils.hasScrollbars(a.container)||0==d&&0==f||(a.container.scrollLeft-=d*(this.cumulativeZoomFactor-1),a.container.scrollTop-=
+f*(this.cumulativeZoomFactor-1)));this.cumulativeZoomFactor=1;this.updateZoomTimeout=null}),20)};mxEvent.addMouseWheelListener(mxUtils.bind(this,function(b,c){if((mxEvent.isAltDown(b)||mxEvent.isControlDown(b)&&!mxClient.IS_MAC||a.panningHandler.isActive())&&(null==this.dialogs||0==this.dialogs.length))for(var d=mxEvent.getSource(b);null!=d;){if(d==a.container){x=new mxPoint(mxEvent.getClientX(b),mxEvent.getClientY(b));a.lazyZoom(c);mxEvent.consume(b);break}d=d.parentNode}}))};
+EditorUi.prototype.addChromelessToolbarItems=function(a){a(mxUtils.bind(this,function(a){this.actions.get("print").funct();mxEvent.consume(a)}),Editor.printLargeImage,mxResources.get("print"))};
 EditorUi.prototype.createTemporaryGraph=function(a){a=new Graph(document.createElement("div"),null,null,a);a.resetViewOnRootChange=!1;a.setConnectable(!1);a.gridEnabled=!1;a.autoScroll=!1;a.setTooltips(!1);a.setEnabled(!1);a.container.style.visibility="hidden";a.container.style.position="absolute";a.container.style.overflow="hidden";a.container.style.height="1px";a.container.style.width="1px";return a};
 EditorUi.prototype.addChromelessClickHandler=function(){var a=urlParams.highlight;null!=a&&0<a.length&&(a="#"+a);this.editor.graph.addClickHandler(a)};EditorUi.prototype.toggleFormatPanel=function(a){this.formatWidth=a||0<this.formatWidth?0:240;this.formatContainer.style.display=a||0<this.formatWidth?"":"none";this.refresh();this.format.refresh();this.fireEvent(new mxEventObject("formatWidthChanged"))};
 EditorUi.prototype.lightboxFit=function(){if(this.isDiagramEmpty())this.editor.graph.view.setScale(1);else{var a=urlParams.border,c=60;null!=a&&(c=parseInt(a));this.editor.graph.maxFitScale=this.lightboxMaxFitScale;this.editor.graph.fit(c);this.editor.graph.maxFitScale=null}};EditorUi.prototype.isDiagramEmpty=function(){var a=this.editor.graph.getModel();return 1==a.getChildCount(a.root)&&0==a.getChildCount(a.getChildAt(a.root,0))};
@@ -2134,15 +2135,15 @@ Sidebar.prototype.expandedImage=mxClient.IS_SVG?"data:image/gif;base64,R0lGODlhD
 "/expanded.gif";Sidebar.prototype.tooltipImage=mxClient.IS_SVG?"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAA4AAAAbCAMAAAB7jU7LAAAACVBMVEX///+ZmZn///9Y2COLAAAAA3RSTlP//wDXyg1BAAAAOElEQVR42mXQMQ4AMAgDsWv//+iutcJmIQSk+9dJpVKpVCqVSqVSqZTdncWzF8/NeP7FkxWenPEDOnUBiL3jWx0AAAAASUVORK5CYII=":IMAGE_PATH+"/tooltip.png";
 Sidebar.prototype.searchImage=mxClient.IS_SVG?"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAwAAAAMCAYAAABWdVznAAAACXBIWXMAAAsTAAALEwEAmpwYAAAAIGNIUk0AAHolAACAgwAA+f8AAIDpAAB1MAAA6mAAADqYAAAXb5JfxUYAAAEaSURBVHjabNGxS5VxFIfxz71XaWuQUJCG/gCHhgTD9VpEETg4aMOlQRp0EoezObgcd220KQiXmpretTAHQRBdojlQEJyukPdt+b1ywfvAGc7wnHP4nlZd1yKijQW8xzNc4Su+ZOYfQ3T6/f4YNvEJYzjELXp4VVXVz263+7cR2niBxAFeZ2YPi3iHR/gYERPDwhpOsd6sz8x/mfkNG3iOlWFhFj8y89J9KvzGXER0GuEaD42mgwHqUtoljbcRsTBCeINpfM/MgZLKPpaxFxGbOCqDXmILN7hoJrTKH+axhxmcYRxP0MIDnOBDZv5q1XUNIuJxifJp+UNV7t7BFM6xeic0RMQ4Bpl5W/ol7GISx/eEUUTECrbx+f8A8xhiZht9zsgAAAAASUVORK5CYII=":IMAGE_PATH+
 "/search.png";Sidebar.prototype.enableTooltips=!0;Sidebar.prototype.tooltipBorder=16;Sidebar.prototype.tooltipDelay=300;Sidebar.prototype.dropTargetDelay=200;Sidebar.prototype.gearImage=STENCIL_PATH+"/clipart/Gear_128x128.png";Sidebar.prototype.thumbWidth=36;Sidebar.prototype.thumbHeight=36;Sidebar.prototype.thumbPadding=5<=document.documentMode?0:1;Sidebar.prototype.thumbBorder=2;Sidebar.prototype.sidebarTitleSize=9;Sidebar.prototype.sidebarTitles=!1;Sidebar.prototype.tooltipTitles=!0;
-Sidebar.prototype.maxTooltipWidth=400;Sidebar.prototype.maxTooltipHeight=400;Sidebar.prototype.addStencilsToIndex=!0;Sidebar.prototype.defaultImageWidth=80;Sidebar.prototype.defaultImageHeight=80;
+Sidebar.prototype.maxTooltipWidth=400;Sidebar.prototype.maxTooltipHeight=400;Sidebar.prototype.addStencilsToIndex=!0;Sidebar.prototype.defaultImageWidth=80;Sidebar.prototype.defaultImageHeight=80;Sidebar.prototype.getTooltipOffset=function(){return new mxPoint(0,0)};
 Sidebar.prototype.showTooltip=function(a,c,d,b,e,f){if(this.enableTooltips&&this.showTooltips&&this.currentElt!=a){null!=this.thread&&(window.clearTimeout(this.thread),this.thread=null);var h=mxUtils.bind(this,function(){null==this.tooltip&&(this.tooltip=document.createElement("div"),this.tooltip.className="geSidebarTooltip",this.tooltip.style.zIndex=mxPopupMenu.prototype.zIndex-1,document.body.appendChild(this.tooltip),this.graph2=new Graph(this.tooltip,null,null,this.editorUi.editor.graph.getStylesheet()),
 this.graph2.resetViewOnRootChange=!1,this.graph2.foldingEnabled=!1,this.graph2.gridEnabled=!1,this.graph2.autoScroll=!1,this.graph2.setTooltips(!1),this.graph2.setConnectable(!1),this.graph2.setEnabled(!1),mxClient.IS_SVG||(this.graph2.view.canvas.style.position="relative"),this.tooltipImage=mxUtils.createImage(this.tooltipImage),this.tooltipImage.className="geSidebarTooltipImage",this.tooltipImage.style.zIndex=mxPopupMenu.prototype.zIndex-1,this.tooltipImage.style.position="absolute",this.tooltipImage.style.width=
 "14px",this.tooltipImage.style.height="27px",document.body.appendChild(this.tooltipImage));this.graph2.model.clear();this.graph2.view.setTranslate(this.tooltipBorder,this.tooltipBorder);this.graph2.view.scale=d>this.maxTooltipWidth||b>this.maxTooltipHeight?Math.round(100*Math.min(this.maxTooltipWidth/d,this.maxTooltipHeight/b))/100:1;this.tooltip.style.display="block";this.graph2.labelsVisible=null==f||f;var g=mxClient.NO_FO;mxClient.NO_FO=Editor.prototype.originalNoForeignObject;this.graph2.addCells(c);
 mxClient.NO_FO=g;var h=this.graph2.getGraphBounds(),l=h.width+2*this.tooltipBorder+4,g=h.height+2*this.tooltipBorder;mxClient.IS_QUIRKS?(g+=4,this.tooltip.style.overflow="hidden"):this.tooltip.style.overflow="visible";this.tooltipImage.style.visibility="visible";this.tooltip.style.width=l+"px";this.tooltipTitles&&null!=e&&0<e.length?(null==this.tooltipTitle?(this.tooltipTitle=document.createElement("div"),this.tooltipTitle.style.borderTop="1px solid gray",this.tooltipTitle.style.textAlign="center",
 this.tooltipTitle.style.width="100%",this.tooltipTitle.style.overflow="hidden",mxClient.IS_SVG||(this.tooltipTitle.style.position="absolute"),this.tooltipTitle.style.paddingTop="6px",this.tooltip.appendChild(this.tooltipTitle)):this.tooltipTitle.innerHTML="",this.tooltipTitle.style.display="",mxUtils.write(this.tooltipTitle,e),l=this.tooltipTitle.offsetHeight+10,g+=l,mxClient.IS_SVG?this.tooltipTitle.style.marginTop=2-l+"px":(g-=6,this.tooltipTitle.style.top=g-l+"px")):null!=this.tooltipTitle&&null!=
-this.tooltipTitle.parentNode&&(this.tooltipTitle.style.display="none");this.tooltip.style.height=g+"px";var l=-Math.round(h.x-this.tooltipBorder),h=-Math.round(h.y-this.tooltipBorder),m=this.container.clientWidth+this.editorUi.splitSize+3+this.editorUi.container.offsetLeft,n=Math.min(Math.max(document.body.clientHeight||0,document.documentElement.clientHeight)-g-20,Math.max(0,this.editorUi.container.offsetTop+this.container.offsetTop+a.offsetTop-this.container.scrollTop-g/2+16));mxClient.IS_SVG?0!=
-l||0!=h?this.graph2.view.canvas.setAttribute("transform","translate("+l+","+h+")"):this.graph2.view.canvas.removeAttribute("transform"):(this.graph2.view.drawPane.style.left=l+"px",this.graph2.view.drawPane.style.top=h+"px");this.tooltip.style.position="absolute";this.tooltip.style.left=m+"px";this.tooltip.style.top=n+"px";this.tooltipImage.style.left=m-13+"px";this.tooltipImage.style.top=n+g/2-13+"px"});null!=this.tooltip&&"none"!=this.tooltip.style.display?h():this.thread=window.setTimeout(h,this.tooltipDelay);
-this.currentElt=a}};Sidebar.prototype.hideTooltip=function(){null!=this.thread&&(window.clearTimeout(this.thread),this.thread=null);null!=this.tooltip&&(this.tooltip.style.display="none",this.tooltipImage.style.visibility="hidden",this.currentElt=null)};Sidebar.prototype.addDataEntry=function(a,c,d,b,e){return this.addEntry(a,mxUtils.bind(this,function(){return this.createVertexTemplateFromData(e,c,d,b)}))};
+this.tooltipTitle.parentNode&&(this.tooltipTitle.style.display="none");this.tooltip.style.height=g+"px";var l=-Math.round(h.x-this.tooltipBorder),h=-Math.round(h.y-this.tooltipBorder),m=document.body,n=document.documentElement,p=this.getTooltipOffset(),q=this.container.clientWidth+this.editorUi.splitSize+3+this.editorUi.container.offsetLeft+p.x,m=Math.min(Math.max(m.clientHeight||0,n.clientHeight)-g-20,Math.max(0,this.editorUi.container.offsetTop+this.container.offsetTop+a.offsetTop-this.container.scrollTop-
+g/2+16))+p.y;mxClient.IS_SVG?0!=l||0!=h?this.graph2.view.canvas.setAttribute("transform","translate("+l+","+h+")"):this.graph2.view.canvas.removeAttribute("transform"):(this.graph2.view.drawPane.style.left=l+"px",this.graph2.view.drawPane.style.top=h+"px");this.tooltip.style.position="absolute";this.tooltip.style.left=q+"px";this.tooltip.style.top=m+"px";this.tooltipImage.style.left=q-13+"px";this.tooltipImage.style.top=m+g/2-13+"px"});null!=this.tooltip&&"none"!=this.tooltip.style.display?h():this.thread=
+window.setTimeout(h,this.tooltipDelay);this.currentElt=a}};Sidebar.prototype.hideTooltip=function(){null!=this.thread&&(window.clearTimeout(this.thread),this.thread=null);null!=this.tooltip&&(this.tooltip.style.display="none",this.tooltipImage.style.visibility="hidden",this.currentElt=null)};Sidebar.prototype.addDataEntry=function(a,c,d,b,e){return this.addEntry(a,mxUtils.bind(this,function(){return this.createVertexTemplateFromData(e,c,d,b)}))};
 Sidebar.prototype.addEntry=function(a,c){if(null!=this.taglist&&null!=a&&0<a.length)for(var d=a.toLowerCase().replace(/[\/\,\(\)]/g," ").split(" "),b=mxUtils.bind(this,function(a){if(1<a.length){var b=this.taglist[a];"object"!==typeof b&&(b={entries:[],dict:new mxDictionary},this.taglist[a]=b);null==b.dict.get(c)&&(b.dict.put(c,c),b.entries.push(c))}}),e=0;e<d.length;e++){b(d[e]);var f=d[e].replace(/\.*\d*$/,"");f!=d[e]&&b(f)}return c};
 Sidebar.prototype.searchEntries=function(a,c,d,b,e){if(null!=this.taglist&&null!=a){var f=a.toLowerCase().split(" ");e=new mxDictionary;var h=(d+1)*c;a=[];for(var g=0,k=0;k<f.length;k++)if(0<f[k].length){var l=this.taglist[f[k]],m=new mxDictionary;if(null!=l){var n=l.entries;a=[];for(var p=0;p<n.length;p++)if(l=n[p],0==g==(null==e.get(l))&&(m.put(l,l),a.push(l),k==f.length-1&&a.length==h)){b(a.slice(d*c,h),h,!0,f);return}}else a=[];e=m;g++}e=a.length;b(a.slice(d*c,(d+1)*c),e,!1,f)}else b([],null,
 null,f)};Sidebar.prototype.filterTags=function(a){if(null!=a){a=a.split(" ");for(var c=[],d={},b=0;b<a.length;b++)null==d[a[b]]&&(d[a[b]]="1",c.push(a[b]));return c.join(" ")}return null};Sidebar.prototype.cloneCell=function(a,c){var d=a.clone();null!=c&&(d.value=c);return d};
@@ -2263,10 +2264,10 @@ Sidebar.prototype.updateShapes=function(a,c){var d=this.editorUi.editor.graph,b=
 d.view.getState(k),m=null!=l?l.style:d.getCellStyle(c[g]);d.getModel().setStyle(k,f);if(null!=l&&"1"==mxUtils.getValue(l.style,"composite","0"))for(var n=d.model.getChildCount(k);0<=n;n--)d.model.remove(d.model.getChildAt(k,n));if(null!=m)for("umlLifeline"==m[mxConstants.STYLE_SHAPE]&&"umlLifeline"!=b[mxConstants.STYLE_SHAPE]&&(d.setCellStyles(mxConstants.STYLE_SHAPE,"umlLifeline",[k]),d.setCellStyles("participant",b[mxConstants.STYLE_SHAPE],[k])),n=0;n<h.length;n++){var p=m[h[n]];null!=p&&d.setCellStyles(h[n],
 p,[k])}e.push(k)}}}finally{d.model.endUpdate()}return e};
 Sidebar.prototype.createDropHandler=function(a,c,d,b){d=null!=d?d:!0;return mxUtils.bind(this,function(e,f,h,g,k){if(e.isEnabled()){a=e.getImportableCells(a);if(0<a.length){e.stopEditing();var l=null==h||mxEvent.isAltDown(f)?!1:e.isValidDropTarget(h,a,f),m=null;null==h||l||(h=null);if(!e.isCellLocked(h||e.getDefaultParent())){e.model.beginUpdate();try{g=Math.round(g);k=Math.round(k);if(c&&e.isSplitTarget(h,a,f)){var n=e.cloneCells(a);e.splitEdge(h,n,null,g-b.width/2,k-b.height/2);m=n}else 0<a.length&&
-(m=e.importCells(a,g,k,h));if(null!=e.layoutManager){var p=e.layoutManager.getLayout(h);if(null!=p){var q=e.view.scale,r=e.view.translate,t=(g+r.x)*q,u=(k+r.y)*q;for(h=0;h<m.length;h++)p.moveCell(m[h],t,u)}}d&&e.fireEvent(new mxEventObject("cellsInserted","cells",m))}finally{e.model.endUpdate()}null!=m&&0<m.length&&(e.scrollCellToVisible(m[0]),e.setSelectionCells(m))}}mxEvent.consume(f)}})};
+(m=e.importCells(a,g,k,h));if(null!=e.layoutManager){var p=e.layoutManager.getLayout(h);if(null!=p){var q=e.view.scale,r=e.view.translate,t=(g+r.x)*q,w=(k+r.y)*q;for(h=0;h<m.length;h++)p.moveCell(m[h],t,w)}}d&&e.fireEvent(new mxEventObject("cellsInserted","cells",m))}finally{e.model.endUpdate()}null!=m&&0<m.length&&(e.scrollCellToVisible(m[0]),e.setSelectionCells(m))}}mxEvent.consume(f)}})};
 Sidebar.prototype.createDragPreview=function(a,c){var d=document.createElement("div");d.style.border="1px dashed black";d.style.width=a+"px";d.style.height=c+"px";return d};
 Sidebar.prototype.dropAndConnect=function(a,c,d,b){var e=this.getDropAndConnectGeometry(a,c[b],d,c),f=[];if(null!=e){var h=this.editorUi.editor.graph;h.model.beginUpdate();try{var g=h.getCellGeometry(a),k=h.getCellGeometry(c[b]),l=h.model.getParent(a),m=!0;if(null!=h.layoutManager){var n=h.layoutManager.getLayout(l);if(null!=n&&n.constructor==mxStackLayout&&(m=!1,f=h.view.getState(l),null!=f)){var p=new mxPoint(f.x/h.view.scale-h.view.translate.x,f.y/h.view.scale-h.view.translate.y);e.x+=p.x;e.y+=
-p.y;var q=e.getTerminalPoint(!1);null!=q&&(q.x+=p.x,q.y+=p.y)}}var r=k.x,t=k.y;h.model.isEdge(c[b])&&(t=r=0);var u=h.model.isEdge(a)||null!=g&&!g.relative&&m,f=c=h.importCells(c,e.x-(u?r:0),e.y-(u?t:0),u?l:null);if(h.model.isEdge(a))h.model.setTerminal(a,c[b],d==mxConstants.DIRECTION_NORTH);else if(h.model.isEdge(c[b])){h.model.setTerminal(c[b],a,!0);var w=h.getCellGeometry(c[b]);w.points=null;if(null!=w.getTerminalPoint(!1))w.setTerminalPoint(e.getTerminalPoint(!1),!1);else if(u&&h.model.isVertex(l)){var v=
+p.y;var q=e.getTerminalPoint(!1);null!=q&&(q.x+=p.x,q.y+=p.y)}}var r=k.x,t=k.y;h.model.isEdge(c[b])&&(t=r=0);var w=h.model.isEdge(a)||null!=g&&!g.relative&&m,f=c=h.importCells(c,e.x-(w?r:0),e.y-(w?t:0),w?l:null);if(h.model.isEdge(a))h.model.setTerminal(a,c[b],d==mxConstants.DIRECTION_NORTH);else if(h.model.isEdge(c[b])){h.model.setTerminal(c[b],a,!0);var u=h.getCellGeometry(c[b]);u.points=null;if(null!=u.getTerminalPoint(!1))u.setTerminalPoint(e.getTerminalPoint(!1),!1);else if(w&&h.model.isVertex(l)){var v=
 h.view.getState(l),p=v.cell!=h.view.currentRoot?new mxPoint(v.x/h.view.scale-h.view.translate.x,v.y/h.view.scale-h.view.translate.y):new mxPoint(0,0);h.cellsMoved(c,p.x,p.y,null,null,!0)}}else k=h.getCellGeometry(c[b]),r=e.x-Math.round(k.x),t=e.y-Math.round(k.y),e.x=Math.round(k.x),e.y=Math.round(k.y),h.model.setGeometry(c[b],e),h.cellsMoved(c,r,t,null,null,!0),f=c.slice(),c.push(h.insertEdge(null,null,"",a,c[b],h.createCurrentEdgeStyle()));h.fireEvent(new mxEventObject("cellsInserted","cells",c))}finally{h.model.endUpdate()}}return f};
 Sidebar.prototype.getDropAndConnectGeometry=function(a,c,d,b){var e=this.editorUi.editor.graph,f=e.view,h=1<b.length,g=e.getCellGeometry(a);b=e.getCellGeometry(c);null!=g&&null!=b&&(b=b.clone(),e.model.isEdge(a)?(a=e.view.getState(a),g=a.absolutePoints,c=g[0],e=g[g.length-1],d==mxConstants.DIRECTION_NORTH?(b.x=c.x/f.scale-f.translate.x-b.width/2,b.y=c.y/f.scale-f.translate.y-b.height/2):(b.x=e.x/f.scale-f.translate.x-b.width/2,b.y=e.y/f.scale-f.translate.y-b.height/2)):(g.relative&&(a=e.view.getState(a),
 g=g.clone(),g.x=(a.x-f.translate.x)/f.scale,g.y=(a.y-f.translate.y)/f.scale),f=e.defaultEdgeLength,e.model.isEdge(c)&&null!=b.getTerminalPoint(!0)&&null!=b.getTerminalPoint(!1)?(c=b.getTerminalPoint(!0),e=b.getTerminalPoint(!1),f=e.x-c.x,c=e.y-c.y,f=Math.sqrt(f*f+c*c),b.x=g.getCenterX(),b.y=g.getCenterY(),b.width=1,b.height=1,d==mxConstants.DIRECTION_NORTH?(b.height=f,b.y=g.y-f,b.setTerminalPoint(new mxPoint(b.x,b.y),!1)):d==mxConstants.DIRECTION_EAST?(b.width=f,b.x=g.x+g.width,b.setTerminalPoint(new mxPoint(b.x+
@@ -2274,27 +2275,27 @@ b.width,b.y),!1)):d==mxConstants.DIRECTION_SOUTH?(b.height=f,b.y=g.y+g.height,b.
 b.width/2+f:d==mxConstants.DIRECTION_SOUTH?b.y=b.y+g.height/2+b.height/2+f:d==mxConstants.DIRECTION_WEST&&(b.x=b.x-g.width/2-b.width/2-f),e.model.isEdge(c)&&null!=b.getTerminalPoint(!0)&&null!=c.getTerminal(!1)&&(g=e.getCellGeometry(c.getTerminal(!1)),null!=g&&(d==mxConstants.DIRECTION_NORTH?(b.x-=g.getCenterX(),b.y-=g.getCenterY()+g.height/2):d==mxConstants.DIRECTION_EAST?(b.x-=g.getCenterX()-g.width/2,b.y-=g.getCenterY()):d==mxConstants.DIRECTION_SOUTH?(b.x-=g.getCenterX(),b.y-=g.getCenterY()-g.height/
 2):d==mxConstants.DIRECTION_WEST&&(b.x-=g.getCenterX()+g.width/2,b.y-=g.getCenterY()))))));return b};
 Sidebar.prototype.createDragSource=function(a,c,d,b,e){function f(a,b){var c;mxClient.IS_IE&&!mxClient.IS_SVG?(mxClient.IS_IE6&&"CSS1Compat"!=document.compatMode?(c=document.createElement(mxClient.VML_PREFIX+":image"),c.setAttribute("src",a.src),c.style.borderStyle="none"):(c=document.createElement("div"),c.style.backgroundImage="url("+a.src+")",c.style.backgroundPosition="center",c.style.backgroundRepeat="no-repeat"),c.style.width=a.width+4+"px",c.style.height=a.height+4+"px",c.style.display=mxClient.IS_QUIRKS?
-"inline":"inline-block"):(c=mxUtils.createImage(a.src),c.style.width=a.width+"px",c.style.height=a.height+"px");null!=b&&c.setAttribute("title",b);mxUtils.setOpacity(c,a==this.refreshTarget?30:20);c.style.position="absolute";c.style.cursor="crosshair";return c}function h(a,b,c,d){null!=d.parentNode&&(mxUtils.contains(c,a,b)?(mxUtils.setOpacity(d,100),E=d):mxUtils.setOpacity(d,d==y?30:20));return c}for(var g=this.editorUi,k=g.editor.graph,l=null,m=null,n=this,p=0;p<b.length&&(null==m&&this.editorUi.editor.graph.model.isVertex(b[p])?
-m=p:null==l&&this.editorUi.editor.graph.model.isEdge(b[p])&&null==this.editorUi.editor.graph.model.getTerminal(b[p],!0)&&(l=p),null==m||null==l);p++);var q=mxUtils.makeDraggable(a,this.editorUi.editor.graph,mxUtils.bind(this,function(a,d,f,e,g){null!=this.updateThread&&window.clearTimeout(this.updateThread);if(null!=b&&null!=w&&E==y){var h=a.isCellSelected(w.cell)?a.getSelectionCells():[w.cell],h=this.updateShapes(a.model.isEdge(w.cell)?b[0]:b[m],h);a.setSelectionCells(h)}else null!=b&&null!=E&&null!=
-t&&E!=y?(h=a.model.isEdge(t.cell)||null==l?m:l,a.setSelectionCells(this.dropAndConnect(t.cell,b,F,h))):c.apply(this,arguments);null!=this.editorUi.hoverIcons&&this.editorUi.hoverIcons.update(a.view.getState(a.getSelectionCell()))}),d,0,0,this.editorUi.editor.graph.autoscroll,!0,!0);this.editorUi.editor.graph.addListener(mxEvent.ESCAPE,function(a,b){q.isActive()&&q.reset()});var r=q.mouseDown;q.mouseDown=function(a){mxEvent.isPopupTrigger(a)||mxEvent.isMultiTouchEvent(a)||(k.stopEditing(),r.apply(this,
-arguments))};var t=null,u=null,w=null,v=!1,A=f(this.triangleUp,mxResources.get("connect")),x=f(this.triangleRight,mxResources.get("connect")),C=f(this.triangleDown,mxResources.get("connect")),B=f(this.triangleLeft,mxResources.get("connect")),y=f(this.refreshTarget,mxResources.get("replace")),J=null,K=f(this.roundDrop),I=f(this.roundDrop),F=mxConstants.DIRECTION_NORTH,E=null,N=q.createPreviewElement;q.createPreviewElement=function(a){var b=N.apply(this,arguments);mxClient.IS_SVG&&(b.style.pointerEvents=
-"none");this.previewElementWidth=b.style.width;this.previewElementHeight=b.style.height;return b};var M=q.dragEnter;q.dragEnter=function(a,b){null!=g.hoverIcons&&g.hoverIcons.setDisplay("none");M.apply(this,arguments)};var Q=q.dragExit;q.dragExit=function(a,b){null!=g.hoverIcons&&g.hoverIcons.setDisplay("");Q.apply(this,arguments)};q.dragOver=function(a,c){mxDragSource.prototype.dragOver.apply(this,arguments);null!=this.currentGuide&&null!=E&&this.currentGuide.hide();if(null!=this.previewElement){var d=
-a.view;if(null!=w&&E==y)this.previewElement.style.display=a.model.isEdge(w.cell)?"none":"",this.previewElement.style.left=w.x+"px",this.previewElement.style.top=w.y+"px",this.previewElement.style.width=w.width+"px",this.previewElement.style.height=w.height+"px";else if(null!=t&&null!=E){var f=a.model.isEdge(t.cell)||null==l?m:l,g=n.getDropAndConnectGeometry(t.cell,b[f],F,b),h=a.model.isEdge(t.cell)?null:a.getCellGeometry(t.cell),k=a.getCellGeometry(b[f]),z=a.model.getParent(t.cell),D=d.translate.x*
-d.scale,H=d.translate.y*d.scale;null!=h&&!h.relative&&a.model.isVertex(z)&&z!=d.currentRoot&&(H=d.getState(z),D=H.x,H=H.y);h=k.x;k=k.y;a.model.isEdge(b[f])&&(k=h=0);this.previewElement.style.left=(g.x-h)*d.scale+D+"px";this.previewElement.style.top=(g.y-k)*d.scale+H+"px";1==b.length&&(this.previewElement.style.width=g.width*d.scale+"px",this.previewElement.style.height=g.height*d.scale+"px");this.previewElement.style.display=""}else null!=q.currentHighlight.state&&a.model.isEdge(q.currentHighlight.state.cell)?
-(this.previewElement.style.left=Math.round(parseInt(this.previewElement.style.left)-e.width*d.scale/2)+"px",this.previewElement.style.top=Math.round(parseInt(this.previewElement.style.top)-e.height*d.scale/2)+"px"):(this.previewElement.style.width=this.previewElementWidth,this.previewElement.style.height=this.previewElementHeight,this.previewElement.style.display="")}};var O=(new Date).getTime(),G=0,D=null,H=this.editorUi.editor.graph.getCellStyle(b[0]);q.getDropTarget=mxUtils.bind(this,function(a,
-c,d,f){var e=mxEvent.isAltDown(f)||null==b?null:a.getCellAt(c,d);if(null!=e&&!this.graph.isCellConnectable(e)){var g=this.graph.getModel().getParent(e);this.graph.getModel().isVertex(g)&&this.graph.isCellConnectable(g)&&(e=g)}a.isCellLocked(e)&&(e=null);var k=a.view.getState(e),g=E=null;D!=k?(D=k,O=(new Date).getTime(),G=0,null!=this.updateThread&&window.clearTimeout(this.updateThread),null!=k&&(this.updateThread=window.setTimeout(function(){null==E&&(D=k,q.getDropTarget(a,c,d,f))},this.dropTargetDelay+
-10))):G=(new Date).getTime()-O;if(2500>G&&null!=k&&!mxEvent.isShiftDown(f)&&(mxUtils.getValue(k.style,mxConstants.STYLE_SHAPE)!=mxUtils.getValue(H,mxConstants.STYLE_SHAPE)&&mxUtils.getValue(k.style,mxConstants.STYLE_STROKECOLOR,mxConstants.NONE)!=mxConstants.NONE||"image"==mxUtils.getValue(H,mxConstants.STYLE_SHAPE)||1500<G||a.model.isEdge(k.cell))&&G>this.dropTargetDelay&&(a.model.isVertex(k.cell)&&null!=m||a.model.isEdge(k.cell)&&a.model.isEdge(b[0]))){w=k;var l=a.model.isEdge(k.cell)?a.view.getPoint(k):
-new mxPoint(k.getCenterX(),k.getCenterY()),l=new mxRectangle(l.x-this.refreshTarget.width/2,l.y-this.refreshTarget.height/2,this.refreshTarget.width,this.refreshTarget.height);y.style.left=Math.floor(l.x)+"px";y.style.top=Math.floor(l.y)+"px";null==J&&(a.container.appendChild(y),J=y.parentNode);h(c,d,l,y)}else null==w||!mxUtils.contains(w,c,d)||1500<G&&!mxEvent.isShiftDown(f)?(w=null,null!=J&&(y.parentNode.removeChild(y),J=null)):null!=w&&null!=J&&(l=a.model.isEdge(w.cell)?a.view.getPoint(w):new mxPoint(w.getCenterX(),
-w.getCenterY()),l=new mxRectangle(l.x-this.refreshTarget.width/2,l.y-this.refreshTarget.height/2,this.refreshTarget.width,this.refreshTarget.height),h(c,d,l,y));if(v&&null!=t&&!mxEvent.isAltDown(f)&&null==E){g=mxRectangle.fromRectangle(t);if(a.model.isEdge(t.cell)){var z=t.absolutePoints;null!=K.parentNode&&(l=z[0],g.add(h(c,d,new mxRectangle(l.x-this.roundDrop.width/2,l.y-this.roundDrop.height/2,this.roundDrop.width,this.roundDrop.height),K)));null!=I.parentNode&&(z=z[z.length-1],g.add(h(c,d,new mxRectangle(z.x-
-this.roundDrop.width/2,z.y-this.roundDrop.height/2,this.roundDrop.width,this.roundDrop.height),I)))}else l=mxRectangle.fromRectangle(t),null!=t.shape&&null!=t.shape.boundingBox&&(l=mxRectangle.fromRectangle(t.shape.boundingBox)),l.grow(this.graph.tolerance),l.grow(HoverIcons.prototype.arrowSpacing),z=this.graph.selectionCellsHandler.getHandler(t.cell),null!=z&&(l.x-=z.horizontalOffset/2,l.y-=z.verticalOffset/2,l.width+=z.horizontalOffset,l.height+=z.verticalOffset,null!=z.rotationShape&&null!=z.rotationShape.node&&
+"inline":"inline-block"):(c=mxUtils.createImage(a.src),c.style.width=a.width+"px",c.style.height=a.height+"px");null!=b&&c.setAttribute("title",b);mxUtils.setOpacity(c,a==this.refreshTarget?30:20);c.style.position="absolute";c.style.cursor="crosshair";return c}function h(a,b,c,d){null!=d.parentNode&&(mxUtils.contains(c,a,b)?(mxUtils.setOpacity(d,100),D=d):mxUtils.setOpacity(d,d==y?30:20));return c}for(var g=this.editorUi,k=g.editor.graph,l=null,m=null,n=this,p=0;p<b.length&&(null==m&&this.editorUi.editor.graph.model.isVertex(b[p])?
+m=p:null==l&&this.editorUi.editor.graph.model.isEdge(b[p])&&null==this.editorUi.editor.graph.model.getTerminal(b[p],!0)&&(l=p),null==m||null==l);p++);var q=mxUtils.makeDraggable(a,this.editorUi.editor.graph,mxUtils.bind(this,function(a,d,f,e,g){null!=this.updateThread&&window.clearTimeout(this.updateThread);if(null!=b&&null!=u&&D==y){var h=a.isCellSelected(u.cell)?a.getSelectionCells():[u.cell],h=this.updateShapes(a.model.isEdge(u.cell)?b[0]:b[m],h);a.setSelectionCells(h)}else null!=b&&null!=D&&null!=
+t&&D!=y?(h=a.model.isEdge(t.cell)||null==l?m:l,a.setSelectionCells(this.dropAndConnect(t.cell,b,G,h))):c.apply(this,arguments);null!=this.editorUi.hoverIcons&&this.editorUi.hoverIcons.update(a.view.getState(a.getSelectionCell()))}),d,0,0,this.editorUi.editor.graph.autoscroll,!0,!0);this.editorUi.editor.graph.addListener(mxEvent.ESCAPE,function(a,b){q.isActive()&&q.reset()});var r=q.mouseDown;q.mouseDown=function(a){mxEvent.isPopupTrigger(a)||mxEvent.isMultiTouchEvent(a)||(k.stopEditing(),r.apply(this,
+arguments))};var t=null,w=null,u=null,v=!1,A=f(this.triangleUp,mxResources.get("connect")),x=f(this.triangleRight,mxResources.get("connect")),B=f(this.triangleDown,mxResources.get("connect")),C=f(this.triangleLeft,mxResources.get("connect")),y=f(this.refreshTarget,mxResources.get("replace")),I=null,L=f(this.roundDrop),J=f(this.roundDrop),G=mxConstants.DIRECTION_NORTH,D=null,K=q.createPreviewElement;q.createPreviewElement=function(a){var b=K.apply(this,arguments);mxClient.IS_SVG&&(b.style.pointerEvents=
+"none");this.previewElementWidth=b.style.width;this.previewElementHeight=b.style.height;return b};var N=q.dragEnter;q.dragEnter=function(a,b){null!=g.hoverIcons&&g.hoverIcons.setDisplay("none");N.apply(this,arguments)};var P=q.dragExit;q.dragExit=function(a,b){null!=g.hoverIcons&&g.hoverIcons.setDisplay("");P.apply(this,arguments)};q.dragOver=function(a,c){mxDragSource.prototype.dragOver.apply(this,arguments);null!=this.currentGuide&&null!=D&&this.currentGuide.hide();if(null!=this.previewElement){var d=
+a.view;if(null!=u&&D==y)this.previewElement.style.display=a.model.isEdge(u.cell)?"none":"",this.previewElement.style.left=u.x+"px",this.previewElement.style.top=u.y+"px",this.previewElement.style.width=u.width+"px",this.previewElement.style.height=u.height+"px";else if(null!=t&&null!=D){var f=a.model.isEdge(t.cell)||null==l?m:l,g=n.getDropAndConnectGeometry(t.cell,b[f],G,b),h=a.model.isEdge(t.cell)?null:a.getCellGeometry(t.cell),k=a.getCellGeometry(b[f]),z=a.model.getParent(t.cell),E=d.translate.x*
+d.scale,H=d.translate.y*d.scale;null!=h&&!h.relative&&a.model.isVertex(z)&&z!=d.currentRoot&&(H=d.getState(z),E=H.x,H=H.y);h=k.x;k=k.y;a.model.isEdge(b[f])&&(k=h=0);this.previewElement.style.left=(g.x-h)*d.scale+E+"px";this.previewElement.style.top=(g.y-k)*d.scale+H+"px";1==b.length&&(this.previewElement.style.width=g.width*d.scale+"px",this.previewElement.style.height=g.height*d.scale+"px");this.previewElement.style.display=""}else null!=q.currentHighlight.state&&a.model.isEdge(q.currentHighlight.state.cell)?
+(this.previewElement.style.left=Math.round(parseInt(this.previewElement.style.left)-e.width*d.scale/2)+"px",this.previewElement.style.top=Math.round(parseInt(this.previewElement.style.top)-e.height*d.scale/2)+"px"):(this.previewElement.style.width=this.previewElementWidth,this.previewElement.style.height=this.previewElementHeight,this.previewElement.style.display="")}};var O=(new Date).getTime(),F=0,E=null,H=this.editorUi.editor.graph.getCellStyle(b[0]);q.getDropTarget=mxUtils.bind(this,function(a,
+c,d,f){var e=mxEvent.isAltDown(f)||null==b?null:a.getCellAt(c,d);if(null!=e&&!this.graph.isCellConnectable(e)){var g=this.graph.getModel().getParent(e);this.graph.getModel().isVertex(g)&&this.graph.isCellConnectable(g)&&(e=g)}a.isCellLocked(e)&&(e=null);var k=a.view.getState(e),g=D=null;E!=k?(E=k,O=(new Date).getTime(),F=0,null!=this.updateThread&&window.clearTimeout(this.updateThread),null!=k&&(this.updateThread=window.setTimeout(function(){null==D&&(E=k,q.getDropTarget(a,c,d,f))},this.dropTargetDelay+
+10))):F=(new Date).getTime()-O;if(2500>F&&null!=k&&!mxEvent.isShiftDown(f)&&(mxUtils.getValue(k.style,mxConstants.STYLE_SHAPE)!=mxUtils.getValue(H,mxConstants.STYLE_SHAPE)&&mxUtils.getValue(k.style,mxConstants.STYLE_STROKECOLOR,mxConstants.NONE)!=mxConstants.NONE||"image"==mxUtils.getValue(H,mxConstants.STYLE_SHAPE)||1500<F||a.model.isEdge(k.cell))&&F>this.dropTargetDelay&&(a.model.isVertex(k.cell)&&null!=m||a.model.isEdge(k.cell)&&a.model.isEdge(b[0]))){u=k;var l=a.model.isEdge(k.cell)?a.view.getPoint(k):
+new mxPoint(k.getCenterX(),k.getCenterY()),l=new mxRectangle(l.x-this.refreshTarget.width/2,l.y-this.refreshTarget.height/2,this.refreshTarget.width,this.refreshTarget.height);y.style.left=Math.floor(l.x)+"px";y.style.top=Math.floor(l.y)+"px";null==I&&(a.container.appendChild(y),I=y.parentNode);h(c,d,l,y)}else null==u||!mxUtils.contains(u,c,d)||1500<F&&!mxEvent.isShiftDown(f)?(u=null,null!=I&&(y.parentNode.removeChild(y),I=null)):null!=u&&null!=I&&(l=a.model.isEdge(u.cell)?a.view.getPoint(u):new mxPoint(u.getCenterX(),
+u.getCenterY()),l=new mxRectangle(l.x-this.refreshTarget.width/2,l.y-this.refreshTarget.height/2,this.refreshTarget.width,this.refreshTarget.height),h(c,d,l,y));if(v&&null!=t&&!mxEvent.isAltDown(f)&&null==D){g=mxRectangle.fromRectangle(t);if(a.model.isEdge(t.cell)){var z=t.absolutePoints;null!=L.parentNode&&(l=z[0],g.add(h(c,d,new mxRectangle(l.x-this.roundDrop.width/2,l.y-this.roundDrop.height/2,this.roundDrop.width,this.roundDrop.height),L)));null!=J.parentNode&&(z=z[z.length-1],g.add(h(c,d,new mxRectangle(z.x-
+this.roundDrop.width/2,z.y-this.roundDrop.height/2,this.roundDrop.width,this.roundDrop.height),J)))}else l=mxRectangle.fromRectangle(t),null!=t.shape&&null!=t.shape.boundingBox&&(l=mxRectangle.fromRectangle(t.shape.boundingBox)),l.grow(this.graph.tolerance),l.grow(HoverIcons.prototype.arrowSpacing),z=this.graph.selectionCellsHandler.getHandler(t.cell),null!=z&&(l.x-=z.horizontalOffset/2,l.y-=z.verticalOffset/2,l.width+=z.horizontalOffset,l.height+=z.verticalOffset,null!=z.rotationShape&&null!=z.rotationShape.node&&
 "hidden"!=z.rotationShape.node.style.visibility&&"none"!=z.rotationShape.node.style.display&&null!=z.rotationShape.boundingBox&&l.add(z.rotationShape.boundingBox)),g.add(h(c,d,new mxRectangle(t.getCenterX()-this.triangleUp.width/2,l.y-this.triangleUp.height,this.triangleUp.width,this.triangleUp.height),A)),g.add(h(c,d,new mxRectangle(l.x+l.width,t.getCenterY()-this.triangleRight.height/2,this.triangleRight.width,this.triangleRight.height),x)),g.add(h(c,d,new mxRectangle(t.getCenterX()-this.triangleDown.width/
-2,l.y+l.height,this.triangleDown.width,this.triangleDown.height),C)),g.add(h(c,d,new mxRectangle(l.x-this.triangleLeft.width,t.getCenterY()-this.triangleLeft.height/2,this.triangleLeft.width,this.triangleLeft.height),B));null!=g&&g.grow(10)}F=mxConstants.DIRECTION_NORTH;E==x?F=mxConstants.DIRECTION_EAST:E==C||E==I?F=mxConstants.DIRECTION_SOUTH:E==B&&(F=mxConstants.DIRECTION_WEST);null!=w&&E==y&&(k=w);l=(null==m||a.isCellConnectable(b[m]))&&(a.model.isEdge(e)&&null!=m||a.model.isVertex(e)&&a.isCellConnectable(e));
-if(null!=t&&5E3<=G||t!=k&&(null==g||!mxUtils.contains(g,c,d)||500<G&&null==E&&l))if(v=!1,t=5E3>G&&G>this.dropTargetDelay||a.model.isEdge(e)?k:null,null!=t&&l){g=[K,I,A,x,C,B];for(l=0;l<g.length;l++)null!=g[l].parentNode&&g[l].parentNode.removeChild(g[l]);a.model.isEdge(e)?(z=k.absolutePoints,null!=z&&(l=z[0],z=z[z.length-1],g=a.tolerance,new mxRectangle(c-g,d-g,2*g,2*g),K.style.left=Math.floor(l.x-this.roundDrop.width/2)+"px",K.style.top=Math.floor(l.y-this.roundDrop.height/2)+"px",I.style.left=Math.floor(z.x-
-this.roundDrop.width/2)+"px",I.style.top=Math.floor(z.y-this.roundDrop.height/2)+"px",null==a.model.getTerminal(e,!0)&&a.container.appendChild(K),null==a.model.getTerminal(e,!1)&&a.container.appendChild(I))):(l=mxRectangle.fromRectangle(k),null!=k.shape&&null!=k.shape.boundingBox&&(l=mxRectangle.fromRectangle(k.shape.boundingBox)),l.grow(this.graph.tolerance),l.grow(HoverIcons.prototype.arrowSpacing),z=this.graph.selectionCellsHandler.getHandler(k.cell),null!=z&&(l.x-=z.horizontalOffset/2,l.y-=z.verticalOffset/
+2,l.y+l.height,this.triangleDown.width,this.triangleDown.height),B)),g.add(h(c,d,new mxRectangle(l.x-this.triangleLeft.width,t.getCenterY()-this.triangleLeft.height/2,this.triangleLeft.width,this.triangleLeft.height),C));null!=g&&g.grow(10)}G=mxConstants.DIRECTION_NORTH;D==x?G=mxConstants.DIRECTION_EAST:D==B||D==J?G=mxConstants.DIRECTION_SOUTH:D==C&&(G=mxConstants.DIRECTION_WEST);null!=u&&D==y&&(k=u);l=(null==m||a.isCellConnectable(b[m]))&&(a.model.isEdge(e)&&null!=m||a.model.isVertex(e)&&a.isCellConnectable(e));
+if(null!=t&&5E3<=F||t!=k&&(null==g||!mxUtils.contains(g,c,d)||500<F&&null==D&&l))if(v=!1,t=5E3>F&&F>this.dropTargetDelay||a.model.isEdge(e)?k:null,null!=t&&l){g=[L,J,A,x,B,C];for(l=0;l<g.length;l++)null!=g[l].parentNode&&g[l].parentNode.removeChild(g[l]);a.model.isEdge(e)?(z=k.absolutePoints,null!=z&&(l=z[0],z=z[z.length-1],g=a.tolerance,new mxRectangle(c-g,d-g,2*g,2*g),L.style.left=Math.floor(l.x-this.roundDrop.width/2)+"px",L.style.top=Math.floor(l.y-this.roundDrop.height/2)+"px",J.style.left=Math.floor(z.x-
+this.roundDrop.width/2)+"px",J.style.top=Math.floor(z.y-this.roundDrop.height/2)+"px",null==a.model.getTerminal(e,!0)&&a.container.appendChild(L),null==a.model.getTerminal(e,!1)&&a.container.appendChild(J))):(l=mxRectangle.fromRectangle(k),null!=k.shape&&null!=k.shape.boundingBox&&(l=mxRectangle.fromRectangle(k.shape.boundingBox)),l.grow(this.graph.tolerance),l.grow(HoverIcons.prototype.arrowSpacing),z=this.graph.selectionCellsHandler.getHandler(k.cell),null!=z&&(l.x-=z.horizontalOffset/2,l.y-=z.verticalOffset/
 2,l.width+=z.horizontalOffset,l.height+=z.verticalOffset,null!=z.rotationShape&&null!=z.rotationShape.node&&"hidden"!=z.rotationShape.node.style.visibility&&"none"!=z.rotationShape.node.style.display&&null!=z.rotationShape.boundingBox&&l.add(z.rotationShape.boundingBox)),A.style.left=Math.floor(k.getCenterX()-this.triangleUp.width/2)+"px",A.style.top=Math.floor(l.y-this.triangleUp.height)+"px",x.style.left=Math.floor(l.x+l.width)+"px",x.style.top=Math.floor(k.getCenterY()-this.triangleRight.height/
-2)+"px",C.style.left=A.style.left,C.style.top=Math.floor(l.y+l.height)+"px",B.style.left=Math.floor(l.x-this.triangleLeft.width)+"px",B.style.top=x.style.top,"eastwest"!=k.style.portConstraint&&(a.container.appendChild(A),a.container.appendChild(C)),a.container.appendChild(x),a.container.appendChild(B));null!=k&&(u=a.selectionCellsHandler.getHandler(k.cell),null!=u&&null!=u.setHandlesVisible&&u.setHandlesVisible(!1));v=!0}else for(g=[K,I,A,x,C,B],l=0;l<g.length;l++)null!=g[l].parentNode&&g[l].parentNode.removeChild(g[l]);
-v||null==u||u.setHandlesVisible(!0);e=mxEvent.isAltDown(f)&&!mxEvent.isShiftDown(f)||null!=w&&E==y?null:mxDragSource.prototype.getDropTarget.apply(this,arguments);g=a.getModel();if(null!=e&&(null!=E||!a.isSplitTarget(e,b,f))){for(;null!=e&&!a.isValidDropTarget(e,b,f)&&g.isVertex(g.getParent(e));)e=g.getParent(e);if(a.view.currentRoot==e||!a.isValidRoot(e)&&0==a.getModel().getChildCount(e)||a.isCellLocked(e)||g.isEdge(e))e=null}return e});q.stopDrag=function(){mxDragSource.prototype.stopDrag.apply(this,
-arguments);for(var a=[K,I,y,A,x,C,B],b=0;b<a.length;b++)null!=a[b].parentNode&&a[b].parentNode.removeChild(a[b]);null!=t&&null!=u&&u.reset();E=J=w=t=u=null};return q};
+2)+"px",B.style.left=A.style.left,B.style.top=Math.floor(l.y+l.height)+"px",C.style.left=Math.floor(l.x-this.triangleLeft.width)+"px",C.style.top=x.style.top,"eastwest"!=k.style.portConstraint&&(a.container.appendChild(A),a.container.appendChild(B)),a.container.appendChild(x),a.container.appendChild(C));null!=k&&(w=a.selectionCellsHandler.getHandler(k.cell),null!=w&&null!=w.setHandlesVisible&&w.setHandlesVisible(!1));v=!0}else for(g=[L,J,A,x,B,C],l=0;l<g.length;l++)null!=g[l].parentNode&&g[l].parentNode.removeChild(g[l]);
+v||null==w||w.setHandlesVisible(!0);e=mxEvent.isAltDown(f)&&!mxEvent.isShiftDown(f)||null!=u&&D==y?null:mxDragSource.prototype.getDropTarget.apply(this,arguments);g=a.getModel();if(null!=e&&(null!=D||!a.isSplitTarget(e,b,f))){for(;null!=e&&!a.isValidDropTarget(e,b,f)&&g.isVertex(g.getParent(e));)e=g.getParent(e);if(a.view.currentRoot==e||!a.isValidRoot(e)&&0==a.getModel().getChildCount(e)||a.isCellLocked(e)||g.isEdge(e))e=null}return e});q.stopDrag=function(){mxDragSource.prototype.stopDrag.apply(this,
+arguments);for(var a=[L,J,y,A,x,B,C],b=0;b<a.length;b++)null!=a[b].parentNode&&a[b].parentNode.removeChild(a[b]);null!=t&&null!=w&&w.reset();D=I=u=t=w=null};return q};
 Sidebar.prototype.itemClicked=function(a,c,d,b){b=this.editorUi.editor.graph;if(mxEvent.isAltDown(d)){if(1==b.getSelectionCount()&&b.model.isVertex(b.getSelectionCell())){c=null;for(var e=0;e<a.length&&null==c;e++)b.model.isVertex(a[e])&&(c=e);null!=c&&(b.setSelectionCells(this.dropAndConnect(b.getSelectionCell(),a,mxEvent.isMetaDown(d)||mxEvent.isControlDown(d)?mxEvent.isShiftDown(d)?mxConstants.DIRECTION_WEST:mxConstants.DIRECTION_NORTH:mxEvent.isShiftDown(d)?mxConstants.DIRECTION_EAST:mxConstants.DIRECTION_SOUTH,
 c)),b.scrollCellToVisible(b.getSelectionCell()))}}else mxEvent.isShiftDown(d)?b.isSelectionEmpty()||(this.updateShapes(a[0],b.getSelectionCells()),b.scrollCellToVisible(b.getSelectionCell())):(a=b.getFreeInsertPoint(),c.drop(b,d,null,a.x,a.y),null!=this.editorUi.hoverIcons&&(mxEvent.isTouchEvent(d)||mxEvent.isPenEvent(d))&&this.editorUi.hoverIcons.update(b.view.getState(b.getSelectionCell())))};
 Sidebar.prototype.addClickHandler=function(a,c,d){var b=this.editorUi.editor.graph,e=c.mouseUp,f=null;mxEvent.addGestureListeners(a,function(a){f=new mxPoint(mxEvent.getClientX(a),mxEvent.getClientY(a))});c.mouseUp=mxUtils.bind(this,function(h){if(!mxEvent.isPopupTrigger(h)&&null==this.currentGraph&&null!=f){var g=b.tolerance;Math.abs(f.x-mxEvent.getClientX(h))<=g&&Math.abs(f.y-mxEvent.getClientY(h))<=g&&this.itemClicked(d,c,h,a)}e.apply(c,arguments);f=null;this.currentElt=a})};
@@ -2329,12 +2330,12 @@ function(){var a=m.apply(this,arguments);if(this.graph.pageVisible){for(var b=[]
 function(a,b){return null==a.cell?"#ffa500":mxConstants.GUIDE_COLOR};this.graphHandler.createPreviewShape=function(a){this.previewColor="#000000"==this.graph.background?"#ffffff":mxGraphHandler.prototype.previewColor;return mxGraphHandler.prototype.createPreviewShape.apply(this,arguments)};this.graphHandler.getCells=function(a){for(var b=mxGraphHandler.prototype.getCells.apply(this,arguments),c=[],d=0;d<b.length;d++){var e=this.graph.view.getState(b[d]),e=null!=e?e.style:this.graph.getCellStyle(b[d]);
 "1"==mxUtils.getValue(e,"part","0")?(e=this.graph.model.getParent(b[d]),this.graph.model.isVertex(e)&&0>mxUtils.indexOf(b,e)&&c.push(e)):c.push(b[d])}return c};this.connectionHandler.createTargetVertex=function(a,b){var c=this.graph.view.getState(b),c=null!=c?c.style:this.graph.getCellStyle(b);mxUtils.getValue(c,"part",!1)&&(c=this.graph.model.getParent(b),this.graph.model.isVertex(c)&&(b=c));return mxConnectionHandler.prototype.createTargetVertex.apply(this,arguments)};var n=new mxRubberband(this);
 this.getRubberband=function(){return n};var p=(new Date).getTime(),q=0,r=this.connectionHandler.mouseMove;this.connectionHandler.mouseMove=function(){var a=this.currentState;r.apply(this,arguments);a!=this.currentState?(p=(new Date).getTime(),q=0):q=(new Date).getTime()-p};var t=this.connectionHandler.isOutlineConnectEvent;this.connectionHandler.isOutlineConnectEvent=function(a){return null!=this.currentState&&a.getState()==this.currentState&&2E3<q||(null==this.currentState||"0"!=mxUtils.getValue(this.currentState.style,
-"outlineConnect","1"))&&t.apply(this,arguments)};var u=this.isToggleEvent;this.isToggleEvent=function(a){return u.apply(this,arguments)||mxEvent.isShiftDown(a)};var w=n.isForceRubberbandEvent;n.isForceRubberbandEvent=function(a){return w.apply(this,arguments)||mxUtils.hasScrollbars(this.graph.container)&&mxClient.IS_FF&&mxClient.IS_WIN&&null==a.getState()&&mxEvent.isTouchEvent(a.getEvent())};var v=null;this.panningHandler.addListener(mxEvent.PAN_START,mxUtils.bind(this,function(){this.isEnabled()&&
+"outlineConnect","1"))&&t.apply(this,arguments)};var w=this.isToggleEvent;this.isToggleEvent=function(a){return w.apply(this,arguments)||mxEvent.isShiftDown(a)};var u=n.isForceRubberbandEvent;n.isForceRubberbandEvent=function(a){return u.apply(this,arguments)||mxUtils.hasScrollbars(this.graph.container)&&mxClient.IS_FF&&mxClient.IS_WIN&&null==a.getState()&&mxEvent.isTouchEvent(a.getEvent())};var v=null;this.panningHandler.addListener(mxEvent.PAN_START,mxUtils.bind(this,function(){this.isEnabled()&&
 (v=this.container.style.cursor,this.container.style.cursor="move")}));this.panningHandler.addListener(mxEvent.PAN_END,mxUtils.bind(this,function(){this.isEnabled()&&(this.container.style.cursor=v)}));this.popupMenuHandler.autoExpand=!0;this.popupMenuHandler.isSelectOnPopup=function(a){return mxEvent.isMouseEvent(a.getEvent())};var A=this.click;this.click=function(a){if(this.isEnabled()||a.isConsumed())return A.apply(this,arguments);var b=a.getCell();null!=b&&(b=this.getLinkForCell(b),null!=b&&window.open(b))};
 var x=this.getCursorForCell;this.getCursorForCell=function(a){if(this.isEnabled())return x.apply(this,arguments);if(null!=this.getLinkForCell(a))return"pointer"};this.selectRegion=function(a,b){var c=this.getAllCells(a.x,a.y,a.width,a.height);this.selectCellsForEvent(c,b);return c};this.getAllCells=function(a,b,c,d,e,f){f=null!=f?f:[];if(0<c||0<d){var g=this.getModel(),h=a+c,k=b+d;null==e&&(e=this.getCurrentRoot(),null==e&&(e=g.getRoot()));if(null!=e)for(var l=g.getChildCount(e),m=0;m<l;m++){var n=
-g.getChildAt(e,m),z=this.view.getState(n);if(null!=z&&this.isCellVisible(n)&&"1"!=mxUtils.getValue(z.style,"locked","0")){var p=mxUtils.getValue(z.style,mxConstants.STYLE_ROTATION)||0;0!=p&&(z=mxUtils.getBoundingBox(z,p));(g.isEdge(n)||g.isVertex(n))&&z.x>=a&&z.y+z.height<=k&&z.y>=b&&z.x+z.width<=h&&f.push(n);this.getAllCells(a,b,c,d,n,f)}}}return f};var C=this.graphHandler.shouldRemoveCellsFromParent;this.graphHandler.shouldRemoveCellsFromParent=function(a,b,c){return this.graph.isCellSelected(a)?
-!1:C.apply(this,arguments)};this.isCellLocked=function(a){for(a=this.view.getState(a);null!=a;){if("1"==mxUtils.getValue(a.style,"locked","0"))return!0;a=this.view.getState(this.model.getParent(a.cell))}return!1};var B=null;this.addListener(mxEvent.FIRE_MOUSE_EVENT,mxUtils.bind(this,function(a,b){if("mouseDown"==b.getProperty("eventName")){var c=b.getProperty("event").getState();B=null==c||this.isSelectionEmpty()||this.isCellSelected(c.cell)?null:this.getSelectionCells()}}));this.addListener(mxEvent.TAP_AND_HOLD,
-mxUtils.bind(this,function(a,b){if(!mxEvent.isMultiTouchEvent(b)){var c=b.getProperty("event"),d=b.getProperty("cell");null==d?(c=mxUtils.convertPoint(this.container,mxEvent.getClientX(c),mxEvent.getClientY(c)),n.start(c.x,c.y)):null!=B?this.addSelectionCells(B):1<this.getSelectionCount()&&this.isCellSelected(d)&&this.removeSelectionCell(d);B=null;b.consume()}}));this.connectionHandler.selectCells=function(a,b){this.graph.setSelectionCell(b||a)};this.connectionHandler.constraintHandler.isStateIgnored=
+g.getChildAt(e,m),z=this.view.getState(n);if(null!=z&&this.isCellVisible(n)&&"1"!=mxUtils.getValue(z.style,"locked","0")){var p=mxUtils.getValue(z.style,mxConstants.STYLE_ROTATION)||0;0!=p&&(z=mxUtils.getBoundingBox(z,p));(g.isEdge(n)||g.isVertex(n))&&z.x>=a&&z.y+z.height<=k&&z.y>=b&&z.x+z.width<=h&&f.push(n);this.getAllCells(a,b,c,d,n,f)}}}return f};var B=this.graphHandler.shouldRemoveCellsFromParent;this.graphHandler.shouldRemoveCellsFromParent=function(a,b,c){return this.graph.isCellSelected(a)?
+!1:B.apply(this,arguments)};this.isCellLocked=function(a){for(a=this.view.getState(a);null!=a;){if("1"==mxUtils.getValue(a.style,"locked","0"))return!0;a=this.view.getState(this.model.getParent(a.cell))}return!1};var C=null;this.addListener(mxEvent.FIRE_MOUSE_EVENT,mxUtils.bind(this,function(a,b){if("mouseDown"==b.getProperty("eventName")){var c=b.getProperty("event").getState();C=null==c||this.isSelectionEmpty()||this.isCellSelected(c.cell)?null:this.getSelectionCells()}}));this.addListener(mxEvent.TAP_AND_HOLD,
+mxUtils.bind(this,function(a,b){if(!mxEvent.isMultiTouchEvent(b)){var c=b.getProperty("event"),d=b.getProperty("cell");null==d?(c=mxUtils.convertPoint(this.container,mxEvent.getClientX(c),mxEvent.getClientY(c)),n.start(c.x,c.y)):null!=C?this.addSelectionCells(C):1<this.getSelectionCount()&&this.isCellSelected(d)&&this.removeSelectionCell(d);C=null;b.consume()}}));this.connectionHandler.selectCells=function(a,b){this.graph.setSelectionCell(b||a)};this.connectionHandler.constraintHandler.isStateIgnored=
 function(a,b){return b&&a.view.graph.isCellSelected(a.cell)};this.selectionModel.addListener(mxEvent.CHANGE,mxUtils.bind(this,function(){var a=this.connectionHandler.constraintHandler;null!=a.currentFocus&&a.isStateIgnored(a.currentFocus,!0)&&(a.currentFocus=null,a.constraints=null,a.destroyIcons());a.destroyFocusHighlight()}));Graph.touchStyle&&this.initTouch();var y=this.updateMouseEvent;this.updateMouseEvent=function(a){a=y.apply(this,arguments);this.isCellLocked(a.getCell())&&(a.state=null);return a}}};
 Graph.touchStyle=mxClient.IS_TOUCH||mxClient.IS_FF&&mxClient.IS_WIN||0<navigator.maxTouchPoints||0<navigator.msMaxTouchPoints||null==window.urlParams||"1"==urlParams.touch;Graph.fileSupport=null!=window.File&&null!=window.FileReader&&null!=window.FileList&&(null==window.urlParams||"0"!=urlParams.filesupport);Graph.lineJumpsEnabled=!0;Graph.defaultJumpSize=6;mxUtils.extend(Graph,mxGraph);Graph.prototype.minFitScale=null;Graph.prototype.maxFitScale=null;
 Graph.prototype.linkPolicy="frame"==urlParams.target?"blank":urlParams.target||"auto";Graph.prototype.linkTarget="frame"==urlParams.target?"_self":"_blank";Graph.prototype.defaultScrollbars=!mxClient.IS_IOS;Graph.prototype.defaultPageVisible=!0;Graph.prototype.lightbox=!1;Graph.prototype.defaultGraphBackground="#ffffff";Graph.prototype.scrollTileSize=new mxRectangle(0,0,400,400);Graph.prototype.transparentBackground=!0;Graph.prototype.defaultEdgeLength=80;Graph.prototype.edgeMode=!1;
@@ -2354,8 +2355,8 @@ Graph.prototype.getLabel=function(a){var c=mxGraph.prototype.getLabel.apply(this
 Graph.prototype.setGridSize=function(a){this.gridSize=a;this.fireEvent(new mxEventObject("gridSizeChanged"))};Graph.prototype.getGlobalVariable=function(a){var c=null;"date"==a?c=(new Date).toLocaleDateString():"time"==a?c=(new Date).toLocaleTimeString():"timestamp"==a?c=(new Date).toLocaleString():"date{"==a.substring(0,5)&&(a=a.substring(5,a.length-1),c=this.formatDate(new Date,a));return c};
 Graph.prototype.formatDate=function(a,c,d){null==this.dateFormatCache&&(this.dateFormatCache={i18n:{dayNames:"Sun Mon Tue Wed Thu Fri Sat Sunday Monday Tuesday Wednesday Thursday Friday Saturday".split(" "),monthNames:"Jan Feb Mar Apr May Jun Jul Aug Sep Oct Nov Dec January February March April May June July August September October November December".split(" ")},masks:{"default":"ddd mmm dd yyyy HH:MM:ss",shortDate:"m/d/yy",mediumDate:"mmm d, yyyy",longDate:"mmmm d, yyyy",fullDate:"dddd, mmmm d, yyyy",
 shortTime:"h:MM TT",mediumTime:"h:MM:ss TT",longTime:"h:MM:ss TT Z",isoDate:"yyyy-mm-dd",isoTime:"HH:MM:ss",isoDateTime:"yyyy-mm-dd'T'HH:MM:ss",isoUtcDateTime:"UTC:yyyy-mm-dd'T'HH:MM:ss'Z'"}});var b=this.dateFormatCache,e=/\b(?:[PMCEA][SDP]T|(?:Pacific|Mountain|Central|Eastern|Atlantic) (?:Standard|Daylight|Prevailing) Time|(?:GMT|UTC)(?:[-+]\d{4})?)\b/g,f=/[^-+\dA-Z]/g,h=function(a,b){a=String(a);for(b=b||2;a.length<b;)a="0"+a;return a};1!=arguments.length||"[object String]"!=Object.prototype.toString.call(a)||
-/\d/.test(a)||(c=a,a=void 0);a=a?new Date(a):new Date;if(isNaN(a))throw SyntaxError("invalid date");c=String(b.masks[c]||c||b.masks["default"]);"UTC:"==c.slice(0,4)&&(c=c.slice(4),d=!0);var g=d?"getUTC":"get",k=a[g+"Date"](),l=a[g+"Day"](),m=a[g+"Month"](),n=a[g+"FullYear"](),p=a[g+"Hours"](),q=a[g+"Minutes"](),r=a[g+"Seconds"](),g=a[g+"Milliseconds"](),t=d?0:a.getTimezoneOffset(),u={d:k,dd:h(k),ddd:b.i18n.dayNames[l],dddd:b.i18n.dayNames[l+7],m:m+1,mm:h(m+1),mmm:b.i18n.monthNames[m],mmmm:b.i18n.monthNames[m+
-12],yy:String(n).slice(2),yyyy:n,h:p%12||12,hh:h(p%12||12),H:p,HH:h(p),M:q,MM:h(q),s:r,ss:h(r),l:h(g,3),L:h(99<g?Math.round(g/10):g),t:12>p?"a":"p",tt:12>p?"am":"pm",T:12>p?"A":"P",TT:12>p?"AM":"PM",Z:d?"UTC":(String(a).match(e)||[""]).pop().replace(f,""),o:(0<t?"-":"+")+h(100*Math.floor(Math.abs(t)/60)+Math.abs(t)%60,4),S:["th","st","nd","rd"][3<k%10?0:(10!=k%100-k%10)*k%10]};return c.replace(/d{1,4}|m{1,4}|yy(?:yy)?|([HhMsTt])\1?|[LloSZ]|"[^"]*"|'[^']*'/g,function(a){return a in u?u[a]:a.slice(1,
+/\d/.test(a)||(c=a,a=void 0);a=a?new Date(a):new Date;if(isNaN(a))throw SyntaxError("invalid date");c=String(b.masks[c]||c||b.masks["default"]);"UTC:"==c.slice(0,4)&&(c=c.slice(4),d=!0);var g=d?"getUTC":"get",k=a[g+"Date"](),l=a[g+"Day"](),m=a[g+"Month"](),n=a[g+"FullYear"](),p=a[g+"Hours"](),q=a[g+"Minutes"](),r=a[g+"Seconds"](),g=a[g+"Milliseconds"](),t=d?0:a.getTimezoneOffset(),w={d:k,dd:h(k),ddd:b.i18n.dayNames[l],dddd:b.i18n.dayNames[l+7],m:m+1,mm:h(m+1),mmm:b.i18n.monthNames[m],mmmm:b.i18n.monthNames[m+
+12],yy:String(n).slice(2),yyyy:n,h:p%12||12,hh:h(p%12||12),H:p,HH:h(p),M:q,MM:h(q),s:r,ss:h(r),l:h(g,3),L:h(99<g?Math.round(g/10):g),t:12>p?"a":"p",tt:12>p?"am":"pm",T:12>p?"A":"P",TT:12>p?"AM":"PM",Z:d?"UTC":(String(a).match(e)||[""]).pop().replace(f,""),o:(0<t?"-":"+")+h(100*Math.floor(Math.abs(t)/60)+Math.abs(t)%60,4),S:["th","st","nd","rd"][3<k%10?0:(10!=k%100-k%10)*k%10]};return c.replace(/d{1,4}|m{1,4}|yy(?:yy)?|([HhMsTt])\1?|[LloSZ]|"[^"]*"|'[^']*'/g,function(a){return a in w?w[a]:a.slice(1,
 a.length-1)})};
 Graph.prototype.createLayersDialog=function(){var a=document.createElement("div");a.style.position="absolute";for(var c=this.getModel(),d=c.getChildCount(c.root),b=0;b<d;b++)(function(b){var d=document.createElement("div");d.style.overflow="hidden";d.style.textOverflow="ellipsis";d.style.padding="2px";d.style.whiteSpace="nowrap";var e=document.createElement("input");e.style.display="inline-block";e.setAttribute("type","checkbox");c.isVisible(b)&&(e.setAttribute("checked","checked"),e.defaultChecked=
 !0);d.appendChild(e);var g=b.value||mxResources.get("background")||"Background";d.setAttribute("title",g);mxUtils.write(d,g);a.appendChild(d);mxEvent.addListener(e,"click",function(){null!=e.getAttribute("checked")?e.removeAttribute("checked"):e.setAttribute("checked","checked");c.setVisible(b,e.checked)})})(c.getChildAt(c.root,b));return a};
@@ -2381,7 +2382,7 @@ Graph.prototype.selectAll=function(a){a=a||this.getDefaultParent();this.isCellLo
 Graph.prototype.isCellFoldable=function(a){var c=this.view.getState(a),c=null!=c?c.style:this.getCellStyle(a);return this.foldingEnabled&&!this.isCellLocked(a)&&(this.isContainer(a)&&"0"!=c.collapsible||!this.isContainer(a)&&"1"==c.collapsible)};Graph.prototype.reset=function(){this.isEditing()&&this.stopEditing(!0);this.escape();this.isSelectionEmpty()||this.clearSelection()};
 Graph.prototype.zoom=function(a,c){a=Math.max(.01,Math.min(this.view.scale*a,160))/this.view.scale;mxGraph.prototype.zoom.apply(this,arguments)};Graph.prototype.zoomIn=function(){.15>this.view.scale?this.zoom((this.view.scale+.01)/this.view.scale):this.zoom(Math.round(this.view.scale*this.zoomFactor*20)/20/this.view.scale)};Graph.prototype.zoomOut=function(){.15>=this.view.scale?this.zoom((this.view.scale-.01)/this.view.scale):this.zoom(Math.round(1/this.zoomFactor*this.view.scale*20)/20/this.view.scale)};
 Graph.prototype.getTooltipForCell=function(a){var c="";if(mxUtils.isNode(a.value)){var d=a.value.getAttribute("tooltip");if(null!=d)null!=d&&this.isReplacePlaceholders(a)&&(d=this.replacePlaceholders(a,d)),c=this.sanitizeHtml(d);else{d=["label","tooltip","placeholders","placeholder"];a=a.value.attributes;var b=[];this.isEnabled()&&d.push("link");for(var e=0;e<a.length;e++)0>mxUtils.indexOf(d,a[e].nodeName)&&0<a[e].nodeValue.length&&b.push({name:a[e].nodeName,value:a[e].nodeValue});b.sort(function(a,
-b){return a.name<b.name?-1:a.name>b.name?1:0});for(e=0;e<b.length;e++)c+=("link"!=b[e].name?b[e].name+":":"")+mxUtils.htmlEntities(b[e].value)+"\n";0<c.length&&(c=c.substring(0,c.length-1))}}return c};Graph.prototype.stringToBytes=function(a){for(var c=Array(a.length),d=0;d<a.length;d++)c[d]=a.charCodeAt(d);return c};Graph.prototype.bytesToString=function(a){for(var c=Array(a.length),d=0;d<a.length;d++)c[d]=String.fromCharCode(a[d]);return c.join("")};
+b){return a.name<b.name?-1:a.name>b.name?1:0});for(e=0;e<b.length;e++)"link"==b[e].name&&this.isPageLink(b[e].value)||(c+=("link"!=b[e].name?b[e].name+":":"")+mxUtils.htmlEntities(b[e].value)+"\n");0<c.length&&(c=c.substring(0,c.length-1))}}return c};Graph.prototype.stringToBytes=function(a){for(var c=Array(a.length),d=0;d<a.length;d++)c[d]=a.charCodeAt(d);return c};Graph.prototype.bytesToString=function(a){for(var c=Array(a.length),d=0;d<a.length;d++)c[d]=String.fromCharCode(a[d]);return c.join("")};
 Graph.prototype.compress=function(a){if(null==a||0==a.length||"undefined"===typeof pako)return a;a=this.bytesToString(pako.deflateRaw(encodeURIComponent(a)));return window.btoa?btoa(a):Base64.encode(a,!0)};Graph.prototype.decompress=function(a){if(null==a||0==a.length||"undefined"===typeof pako)return a;a=window.atob?atob(a):Base64.decode(a,!0);return this.zapGremlins(decodeURIComponent(this.bytesToString(pako.inflateRaw(a))))};
 Graph.prototype.zapGremlins=function(a){for(var c=[],d=0;d<a.length;d++){var b=a.charCodeAt(d);(32<=b||9==b||10==b||13==b)&&c.push(a.charAt(d))}return c.join("")};HoverIcons=function(a){this.graph=a;this.init()};HoverIcons.prototype.arrowSpacing=6;HoverIcons.prototype.updateDelay=500;HoverIcons.prototype.activationDelay=140;HoverIcons.prototype.currentState=null;HoverIcons.prototype.activeArrow=null;HoverIcons.prototype.inactiveOpacity=15;HoverIcons.prototype.checkCollisions=!0;
 HoverIcons.prototype.triangleUp=new mxImage(mxClient.IS_SVG?"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABoAAAAOCAYAAAAxDQxDAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAyJpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuMC1jMDYwIDYxLjEzNDc3NywgMjAxMC8wMi8xMi0xNzozMjowMCAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvIiB4bWxuczp4bXBNTT0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL21tLyIgeG1sbnM6c3RSZWY9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9zVHlwZS9SZXNvdXJjZVJlZiMiIHhtcDpDcmVhdG9yVG9vbD0iQWRvYmUgUGhvdG9zaG9wIENTNSBNYWNpbnRvc2giIHhtcE1NOkluc3RhbmNlSUQ9InhtcC5paWQ6N0ZBN0E3M0U5NjZGMTFFNTg5NTRDNzQwMTgwNDlEQzQiIHhtcE1NOkRvY3VtZW50SUQ9InhtcC5kaWQ6N0ZBN0E3M0Y5NjZGMTFFNTg5NTRDNzQwMTgwNDlEQzQiPiA8eG1wTU06RGVyaXZlZEZyb20gc3RSZWY6aW5zdGFuY2VJRD0ieG1wLmlpZDo3RkE3QTczQzk2NkYxMUU1ODk1NEM3NDAxODA0OURDNCIgc3RSZWY6ZG9jdW1lbnRJRD0ieG1wLmRpZDo3RkE3QTczRDk2NkYxMUU1ODk1NEM3NDAxODA0OURDNCIvPiA8L3JkZjpEZXNjcmlwdGlvbj4gPC9yZGY6UkRGPiA8L3g6eG1wbWV0YT4gPD94cGFja2V0IGVuZD0iciI/Pj625P8AAACySURBVHjaYmRY956BROABxF+A+AgpmpjIsGQjEO8CYidaWeQHtYQNiDmBeAspljGRYMlqqCUwALPMg1oWhWCxBNmyjVCHUGQRyJKlOCyBATaoQ/zItSgciFcQsATdshBSLYqC+oSZhMTCBnVYFLEWgRQuItESGGCG6o0iZFECBZagW5aAyyKQxBwKLUG2bD4Qp6FblAyVoIYlyGAmzDIWKGMmA+0AyGw2RjIKVbIAQIABAFJRHSSk2rPoAAAAAElFTkSuQmCC":
@@ -2424,12 +2425,12 @@ this.setDisplay("");null!=this.currentState&&this.currentState!=a&&b<this.activa
 this.reset())}else this.reset()};HoverIcons.prototype.setCurrentState=function(a){"eastwest"!=a.style.portConstraint&&(this.graph.container.appendChild(this.arrowUp),this.graph.container.appendChild(this.arrowDown));this.graph.container.appendChild(this.arrowRight);this.graph.container.appendChild(this.arrowLeft);this.currentState=a};
 (function(){var a=mxGraphView.prototype.resetValidationState;mxGraphView.prototype.resetValidationState=function(){a.apply(this,arguments);this.validEdges=[]};var c=mxGraphView.prototype.validateCellState;mxGraphView.prototype.validateCellState=function(a,b){var d=this.getState(a);null!=d&&this.graph.model.isEdge(d.cell)&&null!=d.style&&1!=d.style[mxConstants.STYLE_CURVED]&&!d.invalid&&this.updateLineJumps(d)&&this.graph.cellRenderer.redraw(d,!1,this.isRendering());d=c.apply(this,arguments);null!=
 d&&this.graph.model.isEdge(d.cell)&&1!=d.style[mxConstants.STYLE_CURVED]&&this.validEdges.push(d);return d};var d=mxCellRenderer.prototype.isShapeInvalid;mxCellRenderer.prototype.isShapeInvalid=function(a,b){return d.apply(this,arguments)||null!=a.routedPoints&&null!=b.routedPoints&&!mxUtils.equalPoints(b.routedPoints,a.routedPoints)};var b=mxGraphView.prototype.updateCellState;mxGraphView.prototype.updateCellState=function(a){b.apply(this,arguments);this.graph.model.isEdge(a.cell)&&1!=a.style[mxConstants.STYLE_CURVED]&&
-this.updateLineJumps(a)};mxGraphView.prototype.updateLineJumps=function(a){var b=a.absolutePoints;if(Graph.lineJumpsEnabled){var c=null!=a.routedPoints,d=null;if(null!=b&&null!=this.validEdges&&"none"!==mxUtils.getValue(a.style,"jumpStyle","none")){for(var e=function(b,c,e){var f=new mxPoint(c,e);f.type=b;d.push(f);f=null!=a.routedPoints?a.routedPoints[d.length-1]:null;return null==f||f.type!=b||f.x!=c||f.y!=e},f=.5*this.scale,c=!1,d=[],g=0;g<b.length-1;g++){for(var h=b[g+1],k=b[g],w=[],v=b[g+2];g<
-b.length-2&&mxUtils.ptSegDistSq(k.x,k.y,v.x,v.y,h.x,h.y)<1*this.scale*this.scale;)h=v,g++,v=b[g+2];for(var c=e(0,k.x,k.y)||c,A=0;A<this.validEdges.length;A++){var x=this.validEdges[A],C=x.absolutePoints;if(null!=C&&mxUtils.intersects(a,x))for(x=0;x<C.length-1;x++){for(var B=C[x+1],y=C[x],v=C[x+2];x<C.length-2&&mxUtils.ptSegDistSq(y.x,y.y,v.x,v.y,B.x,B.y)<1*this.scale*this.scale;)B=v,x++,v=C[x+2];v=mxUtils.intersection(k.x,k.y,h.x,h.y,y.x,y.y,B.x,B.y);if(null!=v&&(Math.abs(v.x-y.x)>f||Math.abs(v.y-
-y.y)>f)&&(Math.abs(v.x-B.x)>f||Math.abs(v.y-B.y)>f)){B=v.x-k.x;y=v.y-k.y;v={distSq:B*B+y*y,x:v.x,y:v.y};for(B=0;B<w.length;B++)if(w[B].distSq>v.distSq){w.splice(B,0,v);v=null;break}null==v||0!=w.length&&w[w.length-1].x===v.x&&w[w.length-1].y===v.y||w.push(v)}}}for(x=0;x<w.length;x++)c=e(1,w[x].x,w[x].y)||c}v=b[b.length-1];c=e(0,v.x,v.y)||c}a.routedPoints=d;return c}return!1};var e=mxConnector.prototype.paintLine;mxConnector.prototype.paintLine=function(a,b,c){this.routedPoints=null!=this.state?this.state.routedPoints:
+this.updateLineJumps(a)};mxGraphView.prototype.updateLineJumps=function(a){var b=a.absolutePoints;if(Graph.lineJumpsEnabled){var c=null!=a.routedPoints,d=null;if(null!=b&&null!=this.validEdges&&"none"!==mxUtils.getValue(a.style,"jumpStyle","none")){for(var e=function(b,c,e){var f=new mxPoint(c,e);f.type=b;d.push(f);f=null!=a.routedPoints?a.routedPoints[d.length-1]:null;return null==f||f.type!=b||f.x!=c||f.y!=e},f=.5*this.scale,c=!1,d=[],g=0;g<b.length-1;g++){for(var h=b[g+1],k=b[g],u=[],v=b[g+2];g<
+b.length-2&&mxUtils.ptSegDistSq(k.x,k.y,v.x,v.y,h.x,h.y)<1*this.scale*this.scale;)h=v,g++,v=b[g+2];for(var c=e(0,k.x,k.y)||c,A=0;A<this.validEdges.length;A++){var x=this.validEdges[A],B=x.absolutePoints;if(null!=B&&mxUtils.intersects(a,x))for(x=0;x<B.length-1;x++){for(var C=B[x+1],y=B[x],v=B[x+2];x<B.length-2&&mxUtils.ptSegDistSq(y.x,y.y,v.x,v.y,C.x,C.y)<1*this.scale*this.scale;)C=v,x++,v=B[x+2];v=mxUtils.intersection(k.x,k.y,h.x,h.y,y.x,y.y,C.x,C.y);if(null!=v&&(Math.abs(v.x-y.x)>f||Math.abs(v.y-
+y.y)>f)&&(Math.abs(v.x-C.x)>f||Math.abs(v.y-C.y)>f)){C=v.x-k.x;y=v.y-k.y;v={distSq:C*C+y*y,x:v.x,y:v.y};for(C=0;C<u.length;C++)if(u[C].distSq>v.distSq){u.splice(C,0,v);v=null;break}null==v||0!=u.length&&u[u.length-1].x===v.x&&u[u.length-1].y===v.y||u.push(v)}}}for(x=0;x<u.length;x++)c=e(1,u[x].x,u[x].y)||c}v=b[b.length-1];c=e(0,v.x,v.y)||c}a.routedPoints=d;return c}return!1};var e=mxConnector.prototype.paintLine;mxConnector.prototype.paintLine=function(a,b,c){this.routedPoints=null!=this.state?this.state.routedPoints:
 null;if(this.outline||null==this.state||null==this.style||null==this.state.routedPoints||0==this.state.routedPoints.length)e.apply(this,arguments);else{var d=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2,f=(parseInt(mxUtils.getValue(this.style,"jumpSize",Graph.defaultJumpSize))-2)/2+this.strokewidth,g=mxUtils.getValue(this.style,"jumpStyle","none"),h,k=!0,l=null,m=null;h=[];var v=null;a.begin();for(var A=0;A<this.state.routedPoints.length;A++){var x=this.state.routedPoints[A],
-C=new mxPoint(x.x/this.scale,x.y/this.scale);0==A?C=b[0]:A==this.state.routedPoints.length-1&&(C=b[b.length-1]);var B=!1;if(null!=l&&1==x.type){var y=this.state.routedPoints[A+1],x=y.x/this.scale-C.x,y=y.y/this.scale-C.y,x=x*x+y*y;null==v&&(v=new mxPoint(C.x-l.x,C.y-l.y),m=Math.sqrt(v.x*v.x+v.y*v.y),v.x=v.x*f/m,v.y=v.y*f/m);x>f*f&&0<m&&(x=l.x-C.x,y=l.y-C.y,x=x*x+y*y,x>f*f&&(B=new mxPoint(C.x-v.x,C.y-v.y),x=new mxPoint(C.x+v.x,C.y+v.y),h.push(B),this.addPoints(a,h,c,d,!1,null,k),h=0>Math.round(v.x)||
-0==Math.round(v.x)&&0>=Math.round(v.y)?1:-1,k=!1,"sharp"==g?(a.lineTo(B.x-v.y*h,B.y+v.x*h),a.lineTo(x.x-v.y*h,x.y+v.x*h),a.lineTo(x.x,x.y)):"arc"==g?(h*=1.3,a.curveTo(B.x-v.y*h,B.y+v.x*h,x.x-v.y*h,x.y+v.x*h,x.x,x.y)):(a.moveTo(x.x,x.y),k=!0),h=[x],B=!0))}else v=null;B||(h.push(C),l=C)}this.addPoints(a,h,c,d,!1,null,k);a.stroke()}};var f=mxGraphView.prototype.updateFloatingTerminalPoint;mxGraphView.prototype.updateFloatingTerminalPoint=function(a,b,c,d){if(null==b||null==a||"1"!=b.style.snapToPoint&&
+B=new mxPoint(x.x/this.scale,x.y/this.scale);0==A?B=b[0]:A==this.state.routedPoints.length-1&&(B=b[b.length-1]);var C=!1;if(null!=l&&1==x.type){var y=this.state.routedPoints[A+1],x=y.x/this.scale-B.x,y=y.y/this.scale-B.y,x=x*x+y*y;null==v&&(v=new mxPoint(B.x-l.x,B.y-l.y),m=Math.sqrt(v.x*v.x+v.y*v.y),v.x=v.x*f/m,v.y=v.y*f/m);x>f*f&&0<m&&(x=l.x-B.x,y=l.y-B.y,x=x*x+y*y,x>f*f&&(C=new mxPoint(B.x-v.x,B.y-v.y),x=new mxPoint(B.x+v.x,B.y+v.y),h.push(C),this.addPoints(a,h,c,d,!1,null,k),h=0>Math.round(v.x)||
+0==Math.round(v.x)&&0>=Math.round(v.y)?1:-1,k=!1,"sharp"==g?(a.lineTo(C.x-v.y*h,C.y+v.x*h),a.lineTo(x.x-v.y*h,x.y+v.x*h),a.lineTo(x.x,x.y)):"arc"==g?(h*=1.3,a.curveTo(C.x-v.y*h,C.y+v.x*h,x.x-v.y*h,x.y+v.x*h,x.x,x.y)):(a.moveTo(x.x,x.y),k=!0),h=[x],C=!0))}else v=null;C||(h.push(B),l=B)}this.addPoints(a,h,c,d,!1,null,k);a.stroke()}};var f=mxGraphView.prototype.updateFloatingTerminalPoint;mxGraphView.prototype.updateFloatingTerminalPoint=function(a,b,c,d){if(null==b||null==a||"1"!=b.style.snapToPoint&&
 "1"!=a.style.snapToPoint)f.apply(this,arguments);else{b=this.getTerminalPort(a,b,d);var e=this.getNextPoint(a,c,d),g=this.graph.isOrthogonal(a),h=mxUtils.toRadians(Number(b.style[mxConstants.STYLE_ROTATION]||"0")),k=new mxPoint(b.getCenterX(),b.getCenterY());if(0!=h)var l=Math.cos(-h),m=Math.sin(-h),e=mxUtils.getRotatedPoint(e,l,m,k);l=parseFloat(a.style[mxConstants.STYLE_PERIMETER_SPACING]||0);l+=parseFloat(a.style[d?mxConstants.STYLE_SOURCE_PERIMETER_SPACING:mxConstants.STYLE_TARGET_PERIMETER_SPACING]||
 0);e=this.getPerimeterPoint(b,e,0==h&&g,l);0!=h&&(l=Math.cos(h),m=Math.sin(h),e=mxUtils.getRotatedPoint(e,l,m,k));a.setAbsoluteTerminalPoint(this.snapToAnchorPoint(a,b,c,d,e),d)}};mxGraphView.prototype.snapToAnchorPoint=function(a,b,c,d,e){if(null!=b&&null!=a){a=this.graph.getAllConnectionConstraints(b);d=c=null;for(var f=0;f<a.length;f++){var g=this.graph.getConnectionPoint(b,a[f]);if(null!=g){var h=(g.x-e.x)*(g.x-e.x)+(g.y-e.y)*(g.y-e.y);if(null==d||h<d)c=g,d=h}}null!=c&&(e=c)}return e};var h=mxStencil.prototype.evaluateTextAttribute;
 mxStencil.prototype.evaluateTextAttribute=function(a,b,c){var d=h.apply(this,arguments);"1"==a.getAttribute("placeholders")&&null!=c.state&&(d=c.state.view.graph.replacePlaceholders(c.state.cell,d));return d};var g=mxCellRenderer.prototype.createShape;mxCellRenderer.prototype.createShape=function(a){if(null!=a.style&&"undefined"!==typeof pako){var b=mxUtils.getValue(a.style,mxConstants.STYLE_SHAPE,null);if(null!=b&&"stencil("==b.substring(0,8))try{var c=b.substring(8,b.length-1),d=mxUtils.parseXml(a.view.graph.decompress(c));
@@ -2448,11 +2449,11 @@ this.graph.currentEdgeStyle[b];return a};var d=mxConnectionHandler.prototype.cre
 c.apply(this,arguments);this.error=null;return b});return a};Graph.prototype.defaultVertexStyle={};Graph.prototype.defaultEdgeStyle={edgeStyle:"orthogonalEdgeStyle",rounded:"0",jettySize:"auto",orthogonalLoop:"1"};Graph.prototype.createCurrentEdgeStyle=function(){var a="edgeStyle="+(this.currentEdgeStyle.edgeStyle||"none")+";";null!=this.currentEdgeStyle.shape&&(a+="shape="+this.currentEdgeStyle.shape+";");null!=this.currentEdgeStyle.curved&&(a+="curved="+this.currentEdgeStyle.curved+";");null!=this.currentEdgeStyle.rounded&&
 (a+="rounded="+this.currentEdgeStyle.rounded+";");null!=this.currentEdgeStyle.comic&&(a+="comic="+this.currentEdgeStyle.comic+";");null!=this.currentEdgeStyle.jumpStyle&&(a+="jumpStyle="+this.currentEdgeStyle.jumpStyle+";");null!=this.currentEdgeStyle.jumpSize&&(a+="jumpSize="+this.currentEdgeStyle.jumpSize+";");"elbowEdgeStyle"==this.currentEdgeStyle.edgeStyle&&null!=this.currentEdgeStyle.elbow&&(a+="elbow="+this.currentEdgeStyle.elbow+";");return a=null!=this.currentEdgeStyle.html?a+("html="+this.currentEdgeStyle.html+
 ";"):a+"html=1;"};Graph.prototype.getPagePadding=function(){return new mxPoint(0,0)};Graph.prototype.loadStylesheet=function(){var a=null!=this.themes?this.themes[this.defaultThemeName]:mxStyleRegistry.dynamicLoading?mxUtils.load(STYLE_PATH+"/default.xml").getDocumentElement():null;null!=a&&(new mxCodec(a.ownerDocument)).decode(a,this.getStylesheet())};Graph.prototype.getAllConnectionConstraints=function(a,b){if(null!=a){var c=mxUtils.getValue(a.style,"points",null);if(null!=c){var d=[];try{for(var e=
-JSON.parse(c),c=0;c<e.length;c++){var f=e[c];d.push(new mxConnectionConstraint(new mxPoint(f[0],f[1]),2<f.length?"0"!=f[2]:!0))}}catch(S){}return d}if(null!=a.shape)if(null!=a.shape.stencil){if(null!=a.shape.stencil)return a.shape.stencil.constraints}else if(null!=a.shape.constraints)return a.shape.constraints}return null};Graph.prototype.flipEdge=function(a){if(null!=a){var b=this.view.getState(a),b=null!=b?b.style:this.getCellStyle(a);null!=b&&(b=mxUtils.getValue(b,mxConstants.STYLE_ELBOW,mxConstants.ELBOW_HORIZONTAL)==
+JSON.parse(c),c=0;c<e.length;c++){var f=e[c];d.push(new mxConnectionConstraint(new mxPoint(f[0],f[1]),2<f.length?"0"!=f[2]:!0))}}catch(aa){}return d}if(null!=a.shape)if(null!=a.shape.stencil){if(null!=a.shape.stencil)return a.shape.stencil.constraints}else if(null!=a.shape.constraints)return a.shape.constraints}return null};Graph.prototype.flipEdge=function(a){if(null!=a){var b=this.view.getState(a),b=null!=b?b.style:this.getCellStyle(a);null!=b&&(b=mxUtils.getValue(b,mxConstants.STYLE_ELBOW,mxConstants.ELBOW_HORIZONTAL)==
 mxConstants.ELBOW_HORIZONTAL?mxConstants.ELBOW_VERTICAL:mxConstants.ELBOW_HORIZONTAL,this.setCellStyles(mxConstants.STYLE_ELBOW,b,[a]))}};Graph.prototype.isValidRoot=function(a){for(var b=this.model.getChildCount(a),c=0,d=0;d<b;d++){var e=this.model.getChildAt(a,d);this.model.isVertex(e)&&(e=this.getCellGeometry(e),null==e||e.relative||c++)}return 0<c||this.isContainer(a)};Graph.prototype.isValidDropTarget=function(a){var b=this.view.getState(a),b=null!=b?b.style:this.getCellStyle(a);return"1"!=mxUtils.getValue(b,
 "part","0")&&(this.isContainer(a)||mxGraph.prototype.isValidDropTarget.apply(this,arguments)&&"0"!=mxUtils.getValue(b,"dropTarget","1"))};Graph.prototype.createGroupCell=function(){var a=mxGraph.prototype.createGroupCell.apply(this,arguments);a.setStyle("group");return a};Graph.prototype.isExtendParentsOnAdd=function(a){var b=mxGraph.prototype.isExtendParentsOnAdd.apply(this,arguments);if(b&&null!=a&&null!=this.layoutManager){var c=this.model.getParent(a);null!=c&&(c=this.layoutManager.getLayout(c),
 null!=c&&c.constructor==mxStackLayout&&(b=!1))}return b};Graph.prototype.getPreferredSizeForCell=function(a){var b=mxGraph.prototype.getPreferredSizeForCell.apply(this,arguments);null!=b&&(b.width+=10,b.height+=4,this.gridEnabled&&(b.width=this.snap(b.width),b.height=this.snap(b.height)));return b};Graph.prototype.turnShapes=function(a){var b=this.getModel(),c=[];b.beginUpdate();try{for(var d=0;d<a.length;d++){var e=a[d];if(b.isEdge(e)){var f=b.getTerminal(e,!0),g=b.getTerminal(e,!1);b.setTerminal(e,
-g,!0);b.setTerminal(e,f,!1);var h=b.getGeometry(e);if(null!=h){h=h.clone();null!=h.points&&h.points.reverse();var k=h.getTerminalPoint(!0),l=h.getTerminalPoint(!1);h.setTerminalPoint(k,!1);h.setTerminalPoint(l,!0);b.setGeometry(e,h);var m=this.view.getState(e),D=this.view.getState(f),n=this.view.getState(g);if(null!=m){var p=null!=D?this.getConnectionConstraint(m,D,!0):null,q=null!=n?this.getConnectionConstraint(m,n,!1):null;this.setConnectionConstraint(e,f,!0,q);this.setConnectionConstraint(e,g,
+g,!0);b.setTerminal(e,f,!1);var h=b.getGeometry(e);if(null!=h){h=h.clone();null!=h.points&&h.points.reverse();var k=h.getTerminalPoint(!0),l=h.getTerminalPoint(!1);h.setTerminalPoint(k,!1);h.setTerminalPoint(l,!0);b.setGeometry(e,h);var m=this.view.getState(e),E=this.view.getState(f),n=this.view.getState(g);if(null!=m){var p=null!=E?this.getConnectionConstraint(m,E,!0):null,q=null!=n?this.getConnectionConstraint(m,n,!1):null;this.setConnectionConstraint(e,f,!0,q);this.setConnectionConstraint(e,g,
 !1,p)}c.push(e)}}else if(b.isVertex(e)&&(h=this.getCellGeometry(e),null!=h)){h=h.clone();h.x+=h.width/2-h.height/2;h.y+=h.height/2-h.width/2;var r=h.width;h.width=h.height;h.height=r;b.setGeometry(e,h);var t=this.view.getState(e);if(null!=t){var x=t.style[mxConstants.STYLE_DIRECTION]||"east";"east"==x?x="south":"south"==x?x="west":"west"==x?x="north":"north"==x&&(x="east");this.setCellStyles(mxConstants.STYLE_DIRECTION,x,[e])}c.push(e)}}}finally{b.endUpdate()}return c};Graph.prototype.processChange=
 function(a){mxGraph.prototype.processChange.apply(this,arguments);if(a instanceof mxValueChange&&null!=a.cell.value&&"object"==typeof a.cell.value){var b=this.model.getDescendants(a.cell);if(0<b.length)for(var c=0;c<b.length;c++)this.isReplacePlaceholders(b[c])&&this.view.invalidate(b[c],!1,!1)}};Graph.prototype.cellLabelChanged=function(a,b,c){b=this.zapGremlins(b);this.model.beginUpdate();try{if(null!=a.value&&"object"==typeof a.value){if(this.isReplacePlaceholders(a)&&null!=a.getAttribute("placeholder"))for(var d=
 a.getAttribute("placeholder"),e=a;null!=e;){if(e==this.model.getRoot()||null!=e.value&&"object"==typeof e.value&&e.hasAttribute(d)){this.setAttributeForCell(e,d,b);break}e=this.model.getParent(e)}var f=a.value.cloneNode(!0);f.setAttribute("label",b);b=f}mxGraph.prototype.cellLabelChanged.apply(this,arguments)}finally{this.model.endUpdate()}};Graph.prototype.removeCellsAfterUngroup=function(a){for(var b=[],c=0;c<a.length;c++)if(this.isCellDeletable(a[c])){var d=this.view.getState(a[c]);if(null!=d){var e=
@@ -2478,8 +2479,8 @@ d=d+k;null!=m&&null!=l&&(m=m.clone(),a?m.x=Math.round(d-m.width/2)-l.origin.x:m.
 e){var f=this.getCellGeometry(b[d]);null==f||!f.relative||this.model.isEdge(a[d])||c.get(this.model.getParent(a[d]))||(f.relative=!1,f.x=e.x/e.view.scale-e.view.translate.x,f.y=e.y/e.view.scale-e.view.translate.y)}}c=new mxCodec;e=new mxGraphModel;f=e.getChildAt(e.getRoot(),0);for(d=0;d<a.length;d++)e.add(f,b[d]);return c.encode(e)};Graph.prototype.createSvgImageExport=function(){var a=new mxImageExport;a.getLinkForCellState=mxUtils.bind(this,function(a,b){return this.getLinkForCell(a.cell)});return a};
 Graph.prototype.getSvg=function(a,b,c,d,e,f,g){b=null!=b?b:1;c=null!=c?c:0;e=null!=e?e:!0;f=null!=f?f:!0;g=null!=g?g:!0;var h=f||d?this.getGraphBounds():this.getBoundingBox(this.getSelectionCells());if(null==h)throw Error(mxResources.get("drawingEmpty"));var k=this.view.scale,l=mxUtils.createXmlDocument();d=null!=l.createElementNS?l.createElementNS(mxConstants.NS_SVG,"svg"):l.createElement("svg");null!=a&&(null!=d.style?d.style.backgroundColor=a:d.setAttribute("style","background-color:"+a));null==
 l.createElementNS?(d.setAttribute("xmlns",mxConstants.NS_SVG),d.setAttribute("xmlns:xlink",mxConstants.NS_XLINK)):d.setAttributeNS("http://www.w3.org/2000/xmlns/","xmlns:xlink",mxConstants.NS_XLINK);a=b/k;d.setAttribute("width",Math.max(1,Math.ceil(h.width*a)+2*c)+"px");d.setAttribute("height",Math.max(1,Math.ceil(h.height*a)+2*c)+"px");d.setAttribute("version","1.1");var m=d;e&&(m=null!=l.createElementNS?l.createElementNS(mxConstants.NS_SVG,"g"):l.createElement("g"),m.setAttribute("transform","translate(0.5,0.5)"),
-d.appendChild(m));l.appendChild(d);l=this.createSvgCanvas(m);l.foOffset=e?-.5:0;l.textOffset=e?-.5:0;l.imageOffset=e?-.5:0;l.translate(Math.floor((c/b-h.x)/k),Math.floor((c/b-h.y)/k));var n=l.createAlternateContent;l.createAlternateContent=function(a,b,c,d,e,f,g,h,k,l,m,z,p){var D=this.state;if(null!=this.foAltText&&(0==d||0!=D.fontSize&&f.length<5*d/D.fontSize)){var q=this.createElement("text");q.setAttribute("x",Math.round(d/2));q.setAttribute("y",Math.round((e+D.fontSize)/2));q.setAttribute("fill",
-D.fontColor||"black");q.setAttribute("text-anchor","middle");q.setAttribute("font-size",Math.round(D.fontSize)+"px");q.setAttribute("font-family",D.fontFamily);(D.fontStyle&mxConstants.FONT_BOLD)==mxConstants.FONT_BOLD&&q.setAttribute("font-weight","bold");(D.fontStyle&mxConstants.FONT_ITALIC)==mxConstants.FONT_ITALIC&&q.setAttribute("font-style","italic");(D.fontStyle&mxConstants.FONT_UNDERLINE)==mxConstants.FONT_UNDERLINE&&q.setAttribute("text-decoration","underline");mxUtils.write(q,f);return q}return n.apply(this,
+d.appendChild(m));l.appendChild(d);l=this.createSvgCanvas(m);l.foOffset=e?-.5:0;l.textOffset=e?-.5:0;l.imageOffset=e?-.5:0;l.translate(Math.floor((c/b-h.x)/k),Math.floor((c/b-h.y)/k));var n=l.createAlternateContent;l.createAlternateContent=function(a,b,c,d,e,f,g,h,k,l,m,z,p){var E=this.state;if(null!=this.foAltText&&(0==d||0!=E.fontSize&&f.length<5*d/E.fontSize)){var q=this.createElement("text");q.setAttribute("x",Math.round(d/2));q.setAttribute("y",Math.round((e+E.fontSize)/2));q.setAttribute("fill",
+E.fontColor||"black");q.setAttribute("text-anchor","middle");q.setAttribute("font-size",Math.round(E.fontSize)+"px");q.setAttribute("font-family",E.fontFamily);(E.fontStyle&mxConstants.FONT_BOLD)==mxConstants.FONT_BOLD&&q.setAttribute("font-weight","bold");(E.fontStyle&mxConstants.FONT_ITALIC)==mxConstants.FONT_ITALIC&&q.setAttribute("font-style","italic");(E.fontStyle&mxConstants.FONT_UNDERLINE)==mxConstants.FONT_UNDERLINE&&q.setAttribute("text-decoration","underline");mxUtils.write(q,f);return q}return n.apply(this,
 arguments)};c=this.backgroundImage;null!=c&&(e=k/b,b=this.view.translate,e=new mxRectangle(b.x*e,b.y*e,c.width*e,c.height*e),mxUtils.intersects(h,e)&&l.image(b.x,b.y,c.width,c.height,c.src,!0));l.scale(a);l.textEnabled=g;g=this.createSvgImageExport();var z=g.drawCellState;g.drawCellState=function(a,b){(f||a.view.graph.isCellSelected(a.cell))&&z.apply(this,arguments)};g.drawState(this.getView().getState(this.model.root),l);return d};Graph.prototype.createSvgCanvas=function(a){return new mxSvgCanvas2D(a)};
 Graph.prototype.getSelectedElement=function(){var a=null;if(window.getSelection){var b=window.getSelection();b.getRangeAt&&b.rangeCount&&(a=b.getRangeAt(0).commonAncestorContainer)}else document.selection&&(a=document.selection.createRange().parentElement());return a};Graph.prototype.getParentByName=function(a,b,c){for(;null!=a&&a.nodeName!=b;){if(a==c)return null;a=a.parentNode}return a};Graph.prototype.selectNode=function(a){var b=null;if(window.getSelection){if(b=window.getSelection(),b.getRangeAt&&
 b.rangeCount){var c=document.createRange();c.selectNode(a);b.removeAllRanges();b.addRange(c)}}else(b=document.selection)&&"Control"!=b.type&&(a=b.createRange(),a.collapse(!0),c=b.createRange(),c.setEndPoint("StartToStart",a),c.select())};Graph.prototype.insertRow=function(a,b){for(var c=a.tBodies[0],d=0<c.rows.length?c.rows[0].cells.length:1,c=c.insertRow(b),e=0;e<d;e++)mxUtils.br(c.insertCell(-1));return c.cells[0]};Graph.prototype.deleteRow=function(a,b){a.tBodies[0].deleteRow(b)};Graph.prototype.insertColumn=
@@ -2489,7 +2490,7 @@ c.setAttribute("target",this.linkTarget);60<b.length&&(b=b.substring(0,36)+"..."
 this.getCellAt(b.graphX,b.graphY);null!=c&&this.isSwimlane(c)&&this.hitsSwimlaneContent(c,b.graphX,b.graphY)||(b.state=this.view.getState(c),null!=b.state&&null!=b.state.shape&&(this.container.style.cursor=b.state.shape.node.style.cursor))}null==b.getState()&&this.isEnabled()&&(this.container.style.cursor="default");return b};var b=!1,c=!1,d=!1,e=this.fireMouseEvent;this.fireMouseEvent=function(a,f,g){a==mxEvent.MOUSE_DOWN&&(f=this.updateMouseEvent(f),b=this.isCellSelected(f.getCell()),c=this.isSelectionEmpty(),
 d=this.popupMenuHandler.isMenuShowing());e.apply(this,arguments)};this.popupMenuHandler.mouseUp=mxUtils.bind(this,function(a,e){this.popupMenuHandler.popupTrigger=!this.isEditing()&&this.isEnabled()&&(null==e.getState()||!e.isSource(e.getState().control))&&(this.popupMenuHandler.popupTrigger||!d&&!mxEvent.isMouseEvent(e.getEvent())&&(c&&null==e.getCell()&&this.isSelectionEmpty()||b&&this.isCellSelected(e.getCell())));mxPopupMenuHandler.prototype.mouseUp.apply(this.popupMenuHandler,arguments)})};mxCellEditor.prototype.isContentEditing=
 function(){var a=this.graph.view.getState(this.editingCell);return null!=a&&1==a.style.html};mxCellEditor.prototype.saveSelection=function(){if(window.getSelection){if(sel=window.getSelection(),sel.getRangeAt&&sel.rangeCount){for(var a=[],b=0,c=sel.rangeCount;b<c;++b)a.push(sel.getRangeAt(b));return a}}else if(document.selection&&document.selection.createRange)return document.selection.createRange();return null};mxCellEditor.prototype.restoreSelection=function(a){try{if(a)if(window.getSelection){sel=
-window.getSelection();sel.removeAllRanges();for(var b=0,c=a.length;b<c;++b)sel.addRange(a[b])}else document.selection&&a.select&&a.select()}catch(P){}};var e=mxCellRenderer.prototype.initializeLabel;mxCellRenderer.prototype.initializeLabel=function(a){null!=a.text&&(a.text.replaceLinefeeds="0"!=mxUtils.getValue(a.style,"nl2Br","1"));e.apply(this,arguments)};var f=mxConstraintHandler.prototype.update;mxConstraintHandler.prototype.update=function(a,b){this.isKeepFocusEvent(a)||!mxEvent.isAltDown(a.getEvent())?
+window.getSelection();sel.removeAllRanges();for(var b=0,c=a.length;b<c;++b)sel.addRange(a[b])}else document.selection&&a.select&&a.select()}catch(Q){}};var e=mxCellRenderer.prototype.initializeLabel;mxCellRenderer.prototype.initializeLabel=function(a){null!=a.text&&(a.text.replaceLinefeeds="0"!=mxUtils.getValue(a.style,"nl2Br","1"));e.apply(this,arguments)};var f=mxConstraintHandler.prototype.update;mxConstraintHandler.prototype.update=function(a,b){this.isKeepFocusEvent(a)||!mxEvent.isAltDown(a.getEvent())?
 f.apply(this,arguments):this.reset()};mxGuide.prototype.createGuideShape=function(a){return new mxPolyline([],mxConstants.GUIDE_COLOR,mxConstants.GUIDE_STROKEWIDTH)};mxCellEditor.prototype.escapeCancelsEditing=!1;var h=mxCellEditor.prototype.startEditing;mxCellEditor.prototype.startEditing=function(a,b){h.apply(this,arguments);var c=this.graph.view.getState(a);this.textarea.className=null!=c&&1==c.style.html?"mxCellEditor geContentEditable":"mxCellEditor mxPlainTextEditor";this.codeViewMode=!1;this.switchSelectionState=
 null;this.graph.setSelectionCell(a);var c=this.graph.getModel().getParent(a),d=this.graph.getCellGeometry(a);this.graph.getModel().isEdge(c)&&null!=d&&d.relative||this.graph.getModel().isEdge(a)?mxClient.IS_QUIRKS?this.textarea.style.border="gray dotted 1px":this.textarea.style.outline=mxClient.IS_IE||mxClient.IS_IE11||mxClient.IS_FF&&mxClient.IS_WIN?"gray dotted 1px":"":mxClient.IS_QUIRKS&&(this.textarea.style.outline="none",this.textarea.style.border="")};var g=mxCellEditor.prototype.installListeners;
 mxCellEditor.prototype.installListeners=function(a){function b(a,c){c.originalNode=a;a=a.firstChild;for(var d=c.firstChild;null!=a&&null!=d;)b(a,d),a=a.nextSibling,d=d.nextSibling;return c}function c(a,b){if(null!=a)if(b.originalNode!=a)d(a);else for(a=a.firstChild,b=b.firstChild;null!=a;){var e=a.nextSibling;null==b?d(a):(c(a,b),b=b.nextSibling);a=e}}function d(a){for(var b=a.firstChild;null!=b;){var c=b.nextSibling;d(b);b=c}1==a.nodeType&&("BR"===a.nodeName||null!=a.firstChild)||3==a.nodeType&&
@@ -2504,7 +2505,7 @@ null!=a){var c=a.view.scale;this.bounds=mxRectangle.fromRectangle(a);if(0==this.
 Math.round((this.bounds.width-4)/c)+"px";this.textarea.style.height=Math.round((this.bounds.height-4)/c)+"px";this.textarea.style.overflow="auto";this.textarea.clientHeight<this.textarea.offsetHeight&&(this.textarea.style.height=Math.round(this.bounds.height/c)+(this.textarea.offsetHeight-this.textarea.clientHeight)+"px",this.bounds.height=parseInt(this.textarea.style.height)*c);this.textarea.clientWidth<this.textarea.offsetWidth&&(this.textarea.style.width=Math.round(this.bounds.width/c)+(this.textarea.offsetWidth-
 this.textarea.clientWidth)+"px",this.bounds.width=parseInt(this.textarea.style.width)*c);this.textarea.style.left=Math.round(this.bounds.x)+"px";this.textarea.style.top=Math.round(this.bounds.y)+"px";mxClient.IS_VML?this.textarea.style.zoom=c:mxUtils.setPrefixedStyle(this.textarea.style,"transform","scale("+c+","+c+")")}else this.textarea.style.height="",this.textarea.style.overflow="",k.apply(this,arguments)};mxCellEditorGetInitialValue=mxCellEditor.prototype.getInitialValue;mxCellEditor.prototype.getInitialValue=
 function(a,b){if("0"==mxUtils.getValue(a.style,"html","0"))return mxCellEditorGetInitialValue.apply(this,arguments);var c=this.graph.getEditingValue(a.cell,b);"1"==mxUtils.getValue(a.style,"nl2Br","1")&&(c=c.replace(/\n/g,"<br/>"));return c=this.graph.sanitizeHtml(c,!0)};mxCellEditorGetCurrentValue=mxCellEditor.prototype.getCurrentValue;mxCellEditor.prototype.getCurrentValue=function(a){if("0"==mxUtils.getValue(a.style,"html","0"))return mxCellEditorGetCurrentValue.apply(this,arguments);var b=this.graph.sanitizeHtml(this.textarea.innerHTML,
-!0);return b="1"==mxUtils.getValue(a.style,"nl2Br","1")?b.replace(/\r\n/g,"<br/>").replace(/\n/g,"<br/>"):b.replace(/\r\n/g,"").replace(/\n/g,"")};var l=mxCellEditor.prototype.stopEditing;mxCellEditor.prototype.stopEditing=function(a){this.codeViewMode&&this.toggleViewMode();l.apply(this,arguments);this.focusContainer()};mxCellEditor.prototype.focusContainer=function(){try{this.graph.container.focus()}catch(D){}};var m=mxCellEditor.prototype.applyValue;mxCellEditor.prototype.applyValue=function(a,
+!0);return b="1"==mxUtils.getValue(a.style,"nl2Br","1")?b.replace(/\r\n/g,"<br/>").replace(/\n/g,"<br/>"):b.replace(/\r\n/g,"").replace(/\n/g,"")};var l=mxCellEditor.prototype.stopEditing;mxCellEditor.prototype.stopEditing=function(a){this.codeViewMode&&this.toggleViewMode();l.apply(this,arguments);this.focusContainer()};mxCellEditor.prototype.focusContainer=function(){try{this.graph.container.focus()}catch(E){}};var m=mxCellEditor.prototype.applyValue;mxCellEditor.prototype.applyValue=function(a,
 b){this.graph.getModel().beginUpdate();try{if(m.apply(this,arguments),this.graph.isCellDeletable(a.cell)&&0==this.graph.model.getChildCount(a.cell)){var c=mxUtils.getValue(a.style,mxConstants.STYLE_STROKECOLOR,mxConstants.NONE),d=mxUtils.getValue(a.style,mxConstants.STYLE_FILLCOLOR,mxConstants.NONE);""==b&&c==mxConstants.NONE&&d==mxConstants.NONE&&this.graph.removeCells([a.cell],!1)}}finally{this.graph.getModel().endUpdate()}};mxCellEditor.prototype.getBackgroundColor=function(a){var b=null;if(this.graph.getModel().isEdge(a.cell)||
 this.graph.getModel().isEdge(this.graph.getModel().getParent(a.cell)))b=mxUtils.getValue(a.style,mxConstants.STYLE_LABEL_BACKGROUNDCOLOR,null),b==mxConstants.NONE&&(b=null);return b};mxCellEditor.prototype.getMinimumSize=function(a){var b=this.graph.getView().scale;return new mxRectangle(0,0,null==a.text?30:a.text.size*b+20,30)};var n=mxGraphHandler.prototype.moveCells;mxGraphHandler.prototype.moveCells=function(a,b,c,d,e,f){mxEvent.isAltDown(f)&&(e=null);n.apply(this,arguments)};mxGraphHandler.prototype.updateHint=
 function(b){if(null!=this.shape){null==this.hint&&(this.hint=a(),this.graph.container.appendChild(this.hint));var c=this.graph.view.translate,d=this.graph.view.scale;b=this.roundLength((this.bounds.x+this.currentDx)/d-c.x);c=this.roundLength((this.bounds.y+this.currentDy)/d-c.y);this.hint.innerHTML=b+", "+c;this.hint.style.left=this.shape.bounds.x+Math.round((this.shape.bounds.width-this.hint.clientWidth)/2)+"px";this.hint.style.top=this.shape.bounds.y+this.shape.bounds.height+12+"px"}};mxGraphHandler.prototype.removeHint=
@@ -2531,35 +2532,35 @@ e,this.graph.getDefaultParent(),!0,!0),c=0;c<h.length;c++)if(this.graph.isCellMo
 d=mxUtils.getOffset(this.graph.container);c.x-=d.x;c.y-=d.y;var d=b.getX()+c.x,c=b.getY()+c.y,e=this.first.x-d,f=this.first.y-c,g=this.graph.tolerance;if(null!=this.div||Math.abs(e)>g||Math.abs(f)>g)null==this.div&&(this.div=this.createShape()),mxUtils.clearSelection(),this.update(d,c),this.isSpaceEvent(b)?(d=this.x+this.width,c=this.y+this.height,e=this.graph.view.scale,mxEvent.isAltDown(b.getEvent())||(this.width=this.graph.snap(this.width/e)*e,this.height=this.graph.snap(this.height/e)*e,this.graph.isGridEnabled()||
 (this.width<this.graph.tolerance&&(this.width=0),this.height<this.graph.tolerance&&(this.height=0)),this.x<this.first.x&&(this.x=d-this.width),this.y<this.first.y&&(this.y=c-this.height)),this.div.style.borderStyle="dashed",this.div.style.backgroundColor="white",this.div.style.left=this.x+"px",this.div.style.top=this.y+"px",this.div.style.width=Math.max(0,this.width)+"px",this.div.style.height=this.graph.container.clientHeight+"px",this.div.style.borderWidth=0>=this.width?"0px 1px 0px 0px":"0px 1px 0px 1px",
 null==this.secondDiv&&(this.secondDiv=this.div.cloneNode(!0),this.div.parentNode.appendChild(this.secondDiv)),this.secondDiv.style.left=this.x+"px",this.secondDiv.style.top=this.y+"px",this.secondDiv.style.width=this.graph.container.clientWidth+"px",this.secondDiv.style.height=Math.max(0,this.height)+"px",this.secondDiv.style.borderWidth=0>=this.height?"1px 0px 0px 0px":"1px 0px 1px 0px"):(this.div.style.backgroundColor="",this.div.style.borderWidth="",this.div.style.borderStyle="",null!=this.secondDiv&&
-(this.secondDiv.parentNode.removeChild(this.secondDiv),this.secondDiv=null)),b.consume()}};var r=mxRubberband.prototype.reset;mxRubberband.prototype.reset=function(){null!=this.secondDiv&&(this.secondDiv.parentNode.removeChild(this.secondDiv),this.secondDiv=null);r.apply(this,arguments)};var t=(new Date).getTime(),u=0,w=mxEdgeHandler.prototype.updatePreviewState;mxEdgeHandler.prototype.updatePreviewState=function(a,b,c,d){w.apply(this,arguments);c!=this.currentTerminalState?(t=(new Date).getTime(),
-u=0):u=(new Date).getTime()-t;this.currentTerminalState=c};var v=mxEdgeHandler.prototype.isOutlineConnectEvent;mxEdgeHandler.prototype.isOutlineConnectEvent=function(a){return null!=this.currentTerminalState&&a.getState()==this.currentTerminalState&&2E3<u||(null==this.currentTerminalState||"0"!=mxUtils.getValue(this.currentTerminalState.style,"outlineConnect","1"))&&v.apply(this,arguments)};mxVertexHandler.prototype.isCustomHandleEvent=function(a){return!mxEvent.isShiftDown(a.getEvent())};mxEdgeHandler.prototype.createHandleShape=
+(this.secondDiv.parentNode.removeChild(this.secondDiv),this.secondDiv=null)),b.consume()}};var r=mxRubberband.prototype.reset;mxRubberband.prototype.reset=function(){null!=this.secondDiv&&(this.secondDiv.parentNode.removeChild(this.secondDiv),this.secondDiv=null);r.apply(this,arguments)};var t=(new Date).getTime(),w=0,u=mxEdgeHandler.prototype.updatePreviewState;mxEdgeHandler.prototype.updatePreviewState=function(a,b,c,d){u.apply(this,arguments);c!=this.currentTerminalState?(t=(new Date).getTime(),
+w=0):w=(new Date).getTime()-t;this.currentTerminalState=c};var v=mxEdgeHandler.prototype.isOutlineConnectEvent;mxEdgeHandler.prototype.isOutlineConnectEvent=function(a){return null!=this.currentTerminalState&&a.getState()==this.currentTerminalState&&2E3<w||(null==this.currentTerminalState||"0"!=mxUtils.getValue(this.currentTerminalState.style,"outlineConnect","1"))&&v.apply(this,arguments)};mxVertexHandler.prototype.isCustomHandleEvent=function(a){return!mxEvent.isShiftDown(a.getEvent())};mxEdgeHandler.prototype.createHandleShape=
 function(a,b){var c=null!=a&&0==a,d=this.state.getVisibleTerminalState(c),e=null!=a&&(0==a||a>=this.state.absolutePoints.length-1||this.constructor==mxElbowEdgeHandler&&2==a)?this.graph.getConnectionConstraint(this.state,d,c):null,c=null!=(null!=e?this.graph.getConnectionPoint(this.state.getVisibleTerminalState(c),e):null)?this.fixedHandleImage:null!=e&&null!=d?this.terminalHandleImage:this.handleImage;if(null!=c)return c=new mxImageShape(new mxRectangle(0,0,c.width,c.height),c.src),c.preserveImageAspect=
 !1,c;c=mxConstants.HANDLE_SIZE;this.preferHtml&&--c;return new mxRectangleShape(new mxRectangle(0,0,c,c),mxConstants.HANDLE_FILLCOLOR,mxConstants.HANDLE_STROKECOLOR)};var A=mxVertexHandler.prototype.createSizerShape;mxVertexHandler.prototype.createSizerShape=function(a,b,c){this.handleImage=b==mxEvent.ROTATION_HANDLE?HoverIcons.prototype.rotationHandle:b==mxEvent.LABEL_HANDLE?this.secondaryHandleImage:this.handleImage;return A.apply(this,arguments)};var x=mxGraphHandler.prototype.getBoundingBox;mxGraphHandler.prototype.getBoundingBox=
-function(a){if(null!=a&&1==a.length){var b=this.graph.getModel(),c=b.getParent(a[0]),d=this.graph.getCellGeometry(a[0]);if(b.isEdge(c)&&null!=d&&d.relative&&(b=this.graph.view.getState(a[0]),null!=b&&2>b.width&&2>b.height&&null!=b.text&&null!=b.text.boundingBox))return mxRectangle.fromRectangle(b.text.boundingBox)}return x.apply(this,arguments)};var C=mxVertexHandler.prototype.getSelectionBounds;mxVertexHandler.prototype.getSelectionBounds=function(a){var b=this.graph.getModel(),c=b.getParent(a.cell),
-d=this.graph.getCellGeometry(a.cell);return b.isEdge(c)&&null!=d&&d.relative&&2>a.width&&2>a.height&&null!=a.text&&null!=a.text.boundingBox?(b=a.text.unrotatedBoundingBox||a.text.boundingBox,new mxRectangle(Math.round(b.x),Math.round(b.y),Math.round(b.width),Math.round(b.height))):C.apply(this,arguments)};var B=mxVertexHandler.prototype.mouseDown;mxVertexHandler.prototype.mouseDown=function(a,b){var c=this.graph.getModel(),d=c.getParent(this.state.cell),e=this.graph.getCellGeometry(this.state.cell);
-(this.getHandleForEvent(b)==mxEvent.ROTATION_HANDLE||!c.isEdge(d)||null==e||!e.relative||null==this.state||2<=this.state.width||2<=this.state.height)&&B.apply(this,arguments)};mxVertexHandler.prototype.isRotationHandleVisible=function(){return this.graph.isEnabled()&&this.rotationEnabled&&this.graph.isCellRotatable(this.state.cell)&&(0>=mxGraphHandler.prototype.maxCells||this.graph.getSelectionCount()<mxGraphHandler.prototype.maxCells)};mxVertexHandler.prototype.rotateClick=function(){this.state.view.graph.turnShapes([this.state.cell])};
-var y=mxVertexHandler.prototype.mouseMove;mxVertexHandler.prototype.mouseMove=function(a,b){y.apply(this,arguments);null!=this.graph.graphHandler.first&&null!=this.rotationShape&&null!=this.rotationShape.node&&(this.rotationShape.node.style.display="none")};var J=mxVertexHandler.prototype.mouseUp;mxVertexHandler.prototype.mouseUp=function(a,b){J.apply(this,arguments);null!=this.rotationShape&&null!=this.rotationShape.node&&(this.rotationShape.node.style.display=1==this.graph.getSelectionCount()?"":
-"none")};var K=mxVertexHandler.prototype.init;mxVertexHandler.prototype.init=function(){K.apply(this,arguments);var a=!1;null!=this.rotationShape&&this.rotationShape.node.setAttribute("title",mxResources.get("rotateTooltip"));var b=mxUtils.bind(this,function(){null!=this.rotationShape&&null!=this.rotationShape.node&&(this.rotationShape.node.style.display=1==this.graph.getSelectionCount()?"":"none");null!=this.specialHandle&&(this.specialHandle.node.style.display=this.graph.isEnabled()&&this.graph.getSelectionCount()<
+function(a){if(null!=a&&1==a.length){var b=this.graph.getModel(),c=b.getParent(a[0]),d=this.graph.getCellGeometry(a[0]);if(b.isEdge(c)&&null!=d&&d.relative&&(b=this.graph.view.getState(a[0]),null!=b&&2>b.width&&2>b.height&&null!=b.text&&null!=b.text.boundingBox))return mxRectangle.fromRectangle(b.text.boundingBox)}return x.apply(this,arguments)};var B=mxVertexHandler.prototype.getSelectionBounds;mxVertexHandler.prototype.getSelectionBounds=function(a){var b=this.graph.getModel(),c=b.getParent(a.cell),
+d=this.graph.getCellGeometry(a.cell);return b.isEdge(c)&&null!=d&&d.relative&&2>a.width&&2>a.height&&null!=a.text&&null!=a.text.boundingBox?(b=a.text.unrotatedBoundingBox||a.text.boundingBox,new mxRectangle(Math.round(b.x),Math.round(b.y),Math.round(b.width),Math.round(b.height))):B.apply(this,arguments)};var C=mxVertexHandler.prototype.mouseDown;mxVertexHandler.prototype.mouseDown=function(a,b){var c=this.graph.getModel(),d=c.getParent(this.state.cell),e=this.graph.getCellGeometry(this.state.cell);
+(this.getHandleForEvent(b)==mxEvent.ROTATION_HANDLE||!c.isEdge(d)||null==e||!e.relative||null==this.state||2<=this.state.width||2<=this.state.height)&&C.apply(this,arguments)};mxVertexHandler.prototype.isRotationHandleVisible=function(){return this.graph.isEnabled()&&this.rotationEnabled&&this.graph.isCellRotatable(this.state.cell)&&(0>=mxGraphHandler.prototype.maxCells||this.graph.getSelectionCount()<mxGraphHandler.prototype.maxCells)};mxVertexHandler.prototype.rotateClick=function(){this.state.view.graph.turnShapes([this.state.cell])};
+var y=mxVertexHandler.prototype.mouseMove;mxVertexHandler.prototype.mouseMove=function(a,b){y.apply(this,arguments);null!=this.graph.graphHandler.first&&null!=this.rotationShape&&null!=this.rotationShape.node&&(this.rotationShape.node.style.display="none")};var I=mxVertexHandler.prototype.mouseUp;mxVertexHandler.prototype.mouseUp=function(a,b){I.apply(this,arguments);null!=this.rotationShape&&null!=this.rotationShape.node&&(this.rotationShape.node.style.display=1==this.graph.getSelectionCount()?"":
+"none")};var L=mxVertexHandler.prototype.init;mxVertexHandler.prototype.init=function(){L.apply(this,arguments);var a=!1;null!=this.rotationShape&&this.rotationShape.node.setAttribute("title",mxResources.get("rotateTooltip"));var b=mxUtils.bind(this,function(){null!=this.rotationShape&&null!=this.rotationShape.node&&(this.rotationShape.node.style.display=1==this.graph.getSelectionCount()?"":"none");null!=this.specialHandle&&(this.specialHandle.node.style.display=this.graph.isEnabled()&&this.graph.getSelectionCount()<
 this.graph.graphHandler.maxCells?"":"none");this.redrawHandles()});this.selectionHandler=mxUtils.bind(this,function(a,c){b()});this.graph.getSelectionModel().addListener(mxEvent.CHANGE,this.selectionHandler);this.changeHandler=mxUtils.bind(this,function(a,c){this.updateLinkHint(this.graph.getLinkForCell(this.state.cell),this.graph.getLinksForState(this.state));b()});this.graph.getModel().addListener(mxEvent.CHANGE,this.changeHandler);this.editingHandler=mxUtils.bind(this,function(a,b){this.redrawHandles()});
 this.graph.addListener(mxEvent.EDITING_STOPPED,this.editingHandler);var c=this.graph.getLinkForCell(this.state.cell),d=this.graph.getLinksForState(this.state);this.updateLinkHint(c,d);if(null!=c||null!=d&&0<d.length)a=!0;a&&this.redrawHandles()};mxVertexHandler.prototype.updateLinkHint=function(b,c){if(null==b&&(null==c||0==c.length)||1<this.graph.getSelectionCount())null!=this.linkHint&&(this.linkHint.parentNode.removeChild(this.linkHint),this.linkHint=null);else if(null!=b||null!=c&&0<c.length){null==
 this.linkHint&&(this.linkHint=a(),this.linkHint.style.padding="6px 8px 6px 8px",this.linkHint.style.fontSize="90%",this.linkHint.style.opacity="1",this.linkHint.style.filter="",this.graph.container.appendChild(this.linkHint));this.linkHint.innerHTML="";if(null!=b&&(this.linkHint.appendChild(this.graph.createLinkForHint(b)),this.graph.isEnabled()&&"function"===typeof this.graph.editLink)){var d=document.createElement("img");d.setAttribute("src",IMAGE_PATH+"/edit.gif");d.setAttribute("title",mxResources.get("editLink"));
 d.setAttribute("width","11");d.setAttribute("height","11");d.style.marginLeft="10px";d.style.marginBottom="-1px";d.style.cursor="pointer";this.linkHint.appendChild(d);mxEvent.addListener(d,"click",mxUtils.bind(this,function(a){this.graph.setSelectionCell(this.state.cell);this.graph.editLink();mxEvent.consume(a)}))}if(null!=c)for(d=0;d<c.length;d++){var e=document.createElement("div");e.style.marginTop=null!=b||0<d?"6px":"0px";e.appendChild(this.graph.createLinkForHint(c[d].getAttribute("href"),mxUtils.getTextContent(c[d])));
-this.linkHint.appendChild(e)}}};mxEdgeHandler.prototype.updateLinkHint=mxVertexHandler.prototype.updateLinkHint;var I=mxEdgeHandler.prototype.init;mxEdgeHandler.prototype.init=function(){I.apply(this,arguments);this.constraintHandler.isEnabled=mxUtils.bind(this,function(){return this.state.view.graph.connectionHandler.isEnabled()});var a=mxUtils.bind(this,function(){null!=this.linkHint&&(this.linkHint.style.display=1==this.graph.getSelectionCount()?"":"none");null!=this.labelShape&&(this.labelShape.node.style.display=
+this.linkHint.appendChild(e)}}};mxEdgeHandler.prototype.updateLinkHint=mxVertexHandler.prototype.updateLinkHint;var J=mxEdgeHandler.prototype.init;mxEdgeHandler.prototype.init=function(){J.apply(this,arguments);this.constraintHandler.isEnabled=mxUtils.bind(this,function(){return this.state.view.graph.connectionHandler.isEnabled()});var a=mxUtils.bind(this,function(){null!=this.linkHint&&(this.linkHint.style.display=1==this.graph.getSelectionCount()?"":"none");null!=this.labelShape&&(this.labelShape.node.style.display=
 this.graph.isEnabled()&&this.graph.getSelectionCount()<this.graph.graphHandler.maxCells?"":"none")});this.selectionHandler=mxUtils.bind(this,function(b,c){a()});this.graph.getSelectionModel().addListener(mxEvent.CHANGE,this.selectionHandler);this.changeHandler=mxUtils.bind(this,function(b,c){this.updateLinkHint(this.graph.getLinkForCell(this.state.cell),this.graph.getLinksForState(this.state));a();this.redrawHandles()});this.graph.getModel().addListener(mxEvent.CHANGE,this.changeHandler);var b=this.graph.getLinkForCell(this.state.cell),
-c=this.graph.getLinksForState(this.state);if(null!=b||null!=c&&0<c.length)this.updateLinkHint(b,c),this.redrawHandles()};var F=mxConnectionHandler.prototype.init;mxConnectionHandler.prototype.init=function(){F.apply(this,arguments);this.constraintHandler.isEnabled=mxUtils.bind(this,function(){return this.graph.connectionHandler.isEnabled()})};var E=mxVertexHandler.prototype.redrawHandles;mxVertexHandler.prototype.redrawHandles=function(){E.apply(this);if(null!=this.state&&null!=this.linkHint){var a=
+c=this.graph.getLinksForState(this.state);if(null!=b||null!=c&&0<c.length)this.updateLinkHint(b,c),this.redrawHandles()};var G=mxConnectionHandler.prototype.init;mxConnectionHandler.prototype.init=function(){G.apply(this,arguments);this.constraintHandler.isEnabled=mxUtils.bind(this,function(){return this.graph.connectionHandler.isEnabled()})};var D=mxVertexHandler.prototype.redrawHandles;mxVertexHandler.prototype.redrawHandles=function(){D.apply(this);if(null!=this.state&&null!=this.linkHint){var a=
 new mxPoint(this.state.getCenterX(),this.state.getCenterY()),b=new mxRectangle(this.state.x,this.state.y-22,this.state.width+24,this.state.height+22),c=mxUtils.getBoundingBox(b,this.state.style[mxConstants.STYLE_ROTATION]||"0",a),a=null!=c?mxUtils.getBoundingBox(this.state,this.state.style[mxConstants.STYLE_ROTATION]||"0"):this.state,b=null!=this.state.text?this.state.text.boundingBox:null;null==c&&(c=this.state);c=c.y+c.height;null!=b&&(c=Math.max(c,b.y+b.height));this.linkHint.style.left=Math.round(a.x+
-(a.width-this.linkHint.clientWidth)/2)+"px";this.linkHint.style.top=Math.round(c+this.verticalOffset/2+6+this.state.view.graph.tolerance)+"px"}};var N=mxVertexHandler.prototype.reset;mxVertexHandler.prototype.reset=function(){N.apply(this,arguments);null!=this.rotationShape&&null!=this.rotationShape.node&&(this.rotationShape.node.style.display=1==this.graph.getSelectionCount()?"":"none")};var M=mxVertexHandler.prototype.destroy;mxVertexHandler.prototype.destroy=function(){M.apply(this,arguments);
-null!=this.linkHint&&(this.linkHint.parentNode.removeChild(this.linkHint),this.linkHint=null);null!=this.selectionHandler&&(this.graph.getSelectionModel().removeListener(this.selectionHandler),this.selectionHandler=null);null!=this.changeHandler&&(this.graph.getModel().removeListener(this.changeHandler),this.changeHandler=null);null!=this.editingHandler&&(this.graph.removeListener(this.editingHandler),this.editingHandler=null)};var Q=mxEdgeHandler.prototype.redrawHandles;mxEdgeHandler.prototype.redrawHandles=
-function(){if(null!=this.marker&&(Q.apply(this),null!=this.state&&null!=this.linkHint)){var a=this.state;null!=this.state.text&&null!=this.state.text.bounds&&(a=new mxRectangle(a.x,a.y,a.width,a.height),a.add(this.state.text.bounds));this.linkHint.style.left=Math.round(a.x+(a.width-this.linkHint.clientWidth)/2)+"px";this.linkHint.style.top=Math.round(a.y+a.height+6+this.state.view.graph.tolerance)+"px"}};var O=mxEdgeHandler.prototype.reset;mxEdgeHandler.prototype.reset=function(){O.apply(this,arguments);
-null!=this.linkHint&&(this.linkHint.style.visibility="")};var G=mxEdgeHandler.prototype.destroy;mxEdgeHandler.prototype.destroy=function(){G.apply(this,arguments);null!=this.linkHint&&(this.linkHint.parentNode.removeChild(this.linkHint),this.linkHint=null);null!=this.selectionHandler&&(this.graph.getSelectionModel().removeListener(this.selectionHandler),this.selectionHandler=null);null!=this.changeHandler&&(this.graph.getModel().removeListener(this.changeHandler),this.changeHandler=null)}}();(function(){function a(){mxCylinder.call(this)}function c(){mxActor.call(this)}function d(){mxCylinder.call(this)}function b(){mxCylinder.call(this)}function e(){mxCylinder.call(this)}function f(){mxActor.call(this)}function h(){mxCylinder.call(this)}function g(){mxActor.call(this)}function k(){mxActor.call(this)}function l(){mxActor.call(this)}function m(){mxActor.call(this)}function n(){mxActor.call(this)}function p(){mxActor.call(this)}function q(){mxActor.call(this)}function r(a,b){this.canvas=
+(a.width-this.linkHint.clientWidth)/2)+"px";this.linkHint.style.top=Math.round(c+this.verticalOffset/2+6+this.state.view.graph.tolerance)+"px"}};var K=mxVertexHandler.prototype.reset;mxVertexHandler.prototype.reset=function(){K.apply(this,arguments);null!=this.rotationShape&&null!=this.rotationShape.node&&(this.rotationShape.node.style.display=1==this.graph.getSelectionCount()?"":"none")};var N=mxVertexHandler.prototype.destroy;mxVertexHandler.prototype.destroy=function(){N.apply(this,arguments);
+null!=this.linkHint&&(this.linkHint.parentNode.removeChild(this.linkHint),this.linkHint=null);null!=this.selectionHandler&&(this.graph.getSelectionModel().removeListener(this.selectionHandler),this.selectionHandler=null);null!=this.changeHandler&&(this.graph.getModel().removeListener(this.changeHandler),this.changeHandler=null);null!=this.editingHandler&&(this.graph.removeListener(this.editingHandler),this.editingHandler=null)};var P=mxEdgeHandler.prototype.redrawHandles;mxEdgeHandler.prototype.redrawHandles=
+function(){if(null!=this.marker&&(P.apply(this),null!=this.state&&null!=this.linkHint)){var a=this.state;null!=this.state.text&&null!=this.state.text.bounds&&(a=new mxRectangle(a.x,a.y,a.width,a.height),a.add(this.state.text.bounds));this.linkHint.style.left=Math.round(a.x+(a.width-this.linkHint.clientWidth)/2)+"px";this.linkHint.style.top=Math.round(a.y+a.height+6+this.state.view.graph.tolerance)+"px"}};var O=mxEdgeHandler.prototype.reset;mxEdgeHandler.prototype.reset=function(){O.apply(this,arguments);
+null!=this.linkHint&&(this.linkHint.style.visibility="")};var F=mxEdgeHandler.prototype.destroy;mxEdgeHandler.prototype.destroy=function(){F.apply(this,arguments);null!=this.linkHint&&(this.linkHint.parentNode.removeChild(this.linkHint),this.linkHint=null);null!=this.selectionHandler&&(this.graph.getSelectionModel().removeListener(this.selectionHandler),this.selectionHandler=null);null!=this.changeHandler&&(this.graph.getModel().removeListener(this.changeHandler),this.changeHandler=null)}}();(function(){function a(){mxCylinder.call(this)}function c(){mxActor.call(this)}function d(){mxCylinder.call(this)}function b(){mxCylinder.call(this)}function e(){mxCylinder.call(this)}function f(){mxActor.call(this)}function h(){mxCylinder.call(this)}function g(){mxActor.call(this)}function k(){mxActor.call(this)}function l(){mxActor.call(this)}function m(){mxActor.call(this)}function n(){mxActor.call(this)}function p(){mxActor.call(this)}function q(){mxActor.call(this)}function r(a,b){this.canvas=
 a;this.canvas.setLineJoin("round");this.canvas.setLineCap("round");this.defaultVariation=b;this.originalLineTo=this.canvas.lineTo;this.canvas.lineTo=mxUtils.bind(this,r.prototype.lineTo);this.originalMoveTo=this.canvas.moveTo;this.canvas.moveTo=mxUtils.bind(this,r.prototype.moveTo);this.originalClose=this.canvas.close;this.canvas.close=mxUtils.bind(this,r.prototype.close);this.originalQuadTo=this.canvas.quadTo;this.canvas.quadTo=mxUtils.bind(this,r.prototype.quadTo);this.originalCurveTo=this.canvas.curveTo;
-this.canvas.curveTo=mxUtils.bind(this,r.prototype.curveTo);this.originalArcTo=this.canvas.arcTo;this.canvas.arcTo=mxUtils.bind(this,r.prototype.arcTo)}function t(){mxRectangleShape.call(this)}function u(){mxActor.call(this)}function w(){mxActor.call(this)}function v(){mxActor.call(this)}function A(){mxRectangleShape.call(this)}function x(){mxRectangleShape.call(this)}function C(){mxCylinder.call(this)}function B(){mxShape.call(this)}function y(){mxShape.call(this)}function J(){mxEllipse.call(this)}
-function K(){mxShape.call(this)}function I(){mxShape.call(this)}function F(){mxRectangleShape.call(this)}function E(){mxShape.call(this)}function N(){mxShape.call(this)}function M(){mxShape.call(this)}function Q(){mxCylinder.call(this)}function O(){mxDoubleEllipse.call(this)}function G(){mxDoubleEllipse.call(this)}function D(){mxArrowConnector.call(this);this.spacing=0}function H(){mxArrowConnector.call(this);this.spacing=0}function z(){mxActor.call(this)}function P(){mxRectangleShape.call(this)}
-function V(){mxActor.call(this)}function Z(){mxActor.call(this)}function S(){mxActor.call(this)}function T(){mxActor.call(this)}function ia(){mxActor.call(this)}function aa(){mxActor.call(this)}function ja(){mxActor.call(this)}function ka(){mxActor.call(this)}function W(){mxActor.call(this)}function X(){mxActor.call(this)}function ba(){mxEllipse.call(this)}function ca(){mxEllipse.call(this)}function da(){mxEllipse.call(this)}function ea(){mxRhombus.call(this)}function oa(){mxEllipse.call(this)}function U(){mxEllipse.call(this)}
-function la(){mxEllipse.call(this)}function R(){mxEllipse.call(this)}function ta(){mxActor.call(this)}function pa(){mxActor.call(this)}function qa(){mxActor.call(this)}function ma(){mxConnector.call(this)}function Ba(a,b,c,d,e,f,g,h,k,l){g+=k;var ga=d.clone();d.x-=e*(2*g+k);d.y-=f*(2*g+k);e*=g+k;f*=g+k;return function(){a.ellipse(ga.x-e-g,ga.y-f-g,2*g,2*g);l?a.fillAndStroke():a.stroke()}}mxUtils.extend(a,mxCylinder);a.prototype.size=20;a.prototype.redrawPath=function(a,b,c,d,e,f){b=Math.max(0,Math.min(d,
+this.canvas.curveTo=mxUtils.bind(this,r.prototype.curveTo);this.originalArcTo=this.canvas.arcTo;this.canvas.arcTo=mxUtils.bind(this,r.prototype.arcTo)}function t(){mxRectangleShape.call(this)}function w(){mxRectangleShape.call(this)}function u(){mxActor.call(this)}function v(){mxActor.call(this)}function A(){mxActor.call(this)}function x(){mxRectangleShape.call(this)}function B(){mxRectangleShape.call(this)}function C(){mxCylinder.call(this)}function y(){mxShape.call(this)}function I(){mxShape.call(this)}
+function L(){mxEllipse.call(this)}function J(){mxShape.call(this)}function G(){mxShape.call(this)}function D(){mxRectangleShape.call(this)}function K(){mxShape.call(this)}function N(){mxShape.call(this)}function P(){mxShape.call(this)}function O(){mxCylinder.call(this)}function F(){mxDoubleEllipse.call(this)}function E(){mxDoubleEllipse.call(this)}function H(){mxArrowConnector.call(this);this.spacing=0}function z(){mxArrowConnector.call(this);this.spacing=0}function Q(){mxActor.call(this)}function S(){mxRectangleShape.call(this)}
+function T(){mxActor.call(this)}function aa(){mxActor.call(this)}function W(){mxActor.call(this)}function U(){mxActor.call(this)}function ia(){mxActor.call(this)}function ba(){mxActor.call(this)}function ja(){mxActor.call(this)}function ca(){mxActor.call(this)}function X(){mxActor.call(this)}function Y(){mxActor.call(this)}function da(){mxEllipse.call(this)}function ea(){mxEllipse.call(this)}function Z(){mxEllipse.call(this)}function na(){mxRhombus.call(this)}function V(){mxEllipse.call(this)}function ka(){mxEllipse.call(this)}
+function R(){mxEllipse.call(this)}function ta(){mxEllipse.call(this)}function ua(){mxActor.call(this)}function oa(){mxActor.call(this)}function pa(){mxActor.call(this)}function la(){mxConnector.call(this)}function Ca(a,b,c,d,e,f,g,h,k,l){g+=k;var ga=d.clone();d.x-=e*(2*g+k);d.y-=f*(2*g+k);e*=g+k;f*=g+k;return function(){a.ellipse(ga.x-e-g,ga.y-f-g,2*g,2*g);l?a.fillAndStroke():a.stroke()}}mxUtils.extend(a,mxCylinder);a.prototype.size=20;a.prototype.redrawPath=function(a,b,c,d,e,f){b=Math.max(0,Math.min(d,
 Math.min(e,parseFloat(mxUtils.getValue(this.style,"size",this.size)))));f?(a.moveTo(b,e),a.lineTo(b,b),a.lineTo(0,0),a.moveTo(b,b),a.lineTo(d,b)):(a.moveTo(0,0),a.lineTo(d-b,0),a.lineTo(d,b),a.lineTo(d,e),a.lineTo(b,e),a.lineTo(0,e-b),a.lineTo(0,0),a.close());a.end()};a.prototype.getLabelMargins=function(a){return mxUtils.getValue(this.style,"boundedLbl",!1)?(a=parseFloat(mxUtils.getValue(this.style,"size",this.size))*this.scale,new mxRectangle(a,a,0,0)):null};mxCellRenderer.prototype.defaultShapes.cube=
-a;var xa=Math.tan(mxUtils.toRadians(30)),na=(.5-xa)/2;mxUtils.extend(c,mxActor);c.prototype.size=20;c.prototype.redrawPath=function(a,b,c,d,e){b=Math.min(d,e/xa);a.translate((d-b)/2,(e-b)/2+b/4);a.moveTo(0,.25*b);a.lineTo(.5*b,b*na);a.lineTo(b,.25*b);a.lineTo(.5*b,(.5-na)*b);a.lineTo(0,.25*b);a.close();a.end()};mxCellRenderer.prototype.defaultShapes.isoRectangle=c;mxUtils.extend(d,mxCylinder);d.prototype.size=20;d.prototype.redrawPath=function(a,b,c,d,e,f){b=Math.min(d,e/(.5+xa));f?(a.moveTo(0,.25*
-b),a.lineTo(.5*b,(.5-na)*b),a.lineTo(b,.25*b),a.moveTo(.5*b,(.5-na)*b),a.lineTo(.5*b,(1-na)*b)):(a.translate((d-b)/2,(e-b)/2),a.moveTo(0,.25*b),a.lineTo(.5*b,b*na),a.lineTo(b,.25*b),a.lineTo(b,.75*b),a.lineTo(.5*b,(1-na)*b),a.lineTo(0,.75*b),a.close());a.end()};mxCellRenderer.prototype.defaultShapes.isoCube=d;mxUtils.extend(b,mxCylinder);b.prototype.redrawPath=function(a,b,c,d,e,f){b=Math.min(e/2,Math.round(e/8)+this.strokewidth-1);if(f&&null!=this.fill||!f&&null==this.fill)a.moveTo(0,b),a.curveTo(0,
+a;var za=Math.tan(mxUtils.toRadians(30)),ma=(.5-za)/2;mxUtils.extend(c,mxActor);c.prototype.size=20;c.prototype.redrawPath=function(a,b,c,d,e){b=Math.min(d,e/za);a.translate((d-b)/2,(e-b)/2+b/4);a.moveTo(0,.25*b);a.lineTo(.5*b,b*ma);a.lineTo(b,.25*b);a.lineTo(.5*b,(.5-ma)*b);a.lineTo(0,.25*b);a.close();a.end()};mxCellRenderer.prototype.defaultShapes.isoRectangle=c;mxUtils.extend(d,mxCylinder);d.prototype.size=20;d.prototype.redrawPath=function(a,b,c,d,e,f){b=Math.min(d,e/(.5+za));f?(a.moveTo(0,.25*
+b),a.lineTo(.5*b,(.5-ma)*b),a.lineTo(b,.25*b),a.moveTo(.5*b,(.5-ma)*b),a.lineTo(.5*b,(1-ma)*b)):(a.translate((d-b)/2,(e-b)/2),a.moveTo(0,.25*b),a.lineTo(.5*b,b*ma),a.lineTo(b,.25*b),a.lineTo(b,.75*b),a.lineTo(.5*b,(1-ma)*b),a.lineTo(0,.75*b),a.close());a.end()};mxCellRenderer.prototype.defaultShapes.isoCube=d;mxUtils.extend(b,mxCylinder);b.prototype.redrawPath=function(a,b,c,d,e,f){b=Math.min(e/2,Math.round(e/8)+this.strokewidth-1);if(f&&null!=this.fill||!f&&null==this.fill)a.moveTo(0,b),a.curveTo(0,
 2*b,d,2*b,d,b),f||(a.stroke(),a.begin()),a.translate(0,b/2),a.moveTo(0,b),a.curveTo(0,2*b,d,2*b,d,b),f||(a.stroke(),a.begin()),a.translate(0,b/2),a.moveTo(0,b),a.curveTo(0,2*b,d,2*b,d,b),f||(a.stroke(),a.begin()),a.translate(0,-b);f||(a.moveTo(0,b),a.curveTo(0,-b/3,d,-b/3,d,b),a.lineTo(d,e-b),a.curveTo(d,e+b/3,0,e+b/3,0,e-b),a.close())};b.prototype.getLabelMargins=function(a){return new mxRectangle(0,2.5*Math.min(a.height/2,Math.round(a.height/8)+this.strokewidth-1)*this.scale,0,0)};mxCellRenderer.prototype.defaultShapes.datastore=
 b;mxUtils.extend(e,mxCylinder);e.prototype.size=30;e.prototype.redrawPath=function(a,b,c,d,e,f){b=Math.max(0,Math.min(d,Math.min(e,parseFloat(mxUtils.getValue(this.style,"size",this.size)))));f?(a.moveTo(d-b,0),a.lineTo(d-b,b),a.lineTo(d,b)):(a.moveTo(0,0),a.lineTo(d-b,0),a.lineTo(d,b),a.lineTo(d,e),a.lineTo(0,e),a.lineTo(0,0),a.close());a.end()};mxCellRenderer.prototype.defaultShapes.note=e;mxUtils.extend(f,mxActor);f.prototype.redrawPath=function(a,b,c,d,e){a.moveTo(0,0);a.quadTo(d/2,.5*e,d,0);
 a.quadTo(.5*d,e/2,d,e);a.quadTo(d/2,.5*e,0,e);a.quadTo(.5*d,e/2,0,0);a.end()};mxCellRenderer.prototype.defaultShapes["switch"]=f;mxUtils.extend(h,mxCylinder);h.prototype.tabWidth=60;h.prototype.tabHeight=20;h.prototype.tabPosition="right";h.prototype.redrawPath=function(a,b,c,d,e,f){b=Math.max(0,Math.min(d,parseFloat(mxUtils.getValue(this.style,"tabWidth",this.tabWidth))));c=Math.max(0,Math.min(e,parseFloat(mxUtils.getValue(this.style,"tabHeight",this.tabHeight))));var g=mxUtils.getValue(this.style,
@@ -2574,125 +2575,126 @@ e/2),new mxPoint(b,e/2),new mxPoint(b,e),new mxPoint(d,e)],this.isRounded,c,!1);
 this.lastX=a;this.lastY=b;this.firstX=a;this.firstY=b};r.prototype.close=function(){null!=this.firstX&&null!=this.firstY&&(this.lineTo(this.firstX,this.firstY),this.originalClose.apply(this.canvas,arguments));this.originalClose.apply(this.canvas,arguments)};r.prototype.quadTo=function(a,b,c,d){this.originalQuadTo.apply(this.canvas,arguments);this.lastX=c;this.lastY=d};r.prototype.curveTo=function(a,b,c,d,e,f){this.originalCurveTo.apply(this.canvas,arguments);this.lastX=e;this.lastY=f};r.prototype.arcTo=
 function(a,b,c,d,e,f,g){this.originalArcTo.apply(this.canvas,arguments);this.lastX=f;this.lastY=g};r.prototype.lineTo=function(a,b){if(null!=this.lastX&&null!=this.lastY){var c=function(a){return"number"===typeof a?a?0>a?-1:1:a===a?0:NaN:NaN},d=Math.abs(a-this.lastX),e=Math.abs(b-this.lastY),f=Math.sqrt(d*d+e*e);if(2>f){this.originalLineTo.apply(this.canvas,arguments);this.lastX=a;this.lastY=b;return}var g=Math.round(f/10),h=this.defaultVariation;5>g&&(g=5,h/=3);for(var ga=c(a-this.lastX)*d/g,c=c(b-
 this.lastY)*e/g,d=d/f,e=e/f,f=0;f<g;f++){var k=(Math.random()-.5)*h;this.originalLineTo.call(this.canvas,ga*f+this.lastX-k*e,c*f+this.lastY-k*d)}this.originalLineTo.call(this.canvas,a,b)}else this.originalLineTo.apply(this.canvas,arguments);this.lastX=a;this.lastY=b};r.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};var Fa=mxShape.prototype.paint;mxShape.prototype.defaultJiggle=1.5;mxShape.prototype.paint=function(a){null!=this.style&&"0"!=mxUtils.getValue(this.style,"comic","0")&&null==a.handHiggle&&(a.handJiggle=new r(a,mxUtils.getValue(this.style,"jiggle",this.defaultJiggle)));Fa.apply(this,arguments);null!=a.handJiggle&&(a.handJiggle.destroy(),delete a.handJiggle)};mxRhombus.prototype.defaultJiggle=2;var Ga=mxRectangleShape.prototype.isHtmlAllowed;mxRectangleShape.prototype.isHtmlAllowed=
-function(){return(null==this.style||"0"==mxUtils.getValue(this.style,"comic","0"))&&Ga.apply(this,arguments)};var Ha=mxRectangleShape.prototype.paintBackground;mxRectangleShape.prototype.paintBackground=function(a,b,c,d,e){if(null==a.handJiggle)Ha.apply(this,arguments);else{var f=!0;null!=this.style&&(f="1"==mxUtils.getValue(this.style,mxConstants.STYLE_POINTER_EVENTS,"1"));if(f||null!=this.fill&&this.fill!=mxConstants.NONE||null!=this.stroke&&this.stroke!=mxConstants.NONE)f||null!=this.fill&&this.fill!=
+this.originalArcTo};var Ga=mxShape.prototype.paint;mxShape.prototype.defaultJiggle=1.5;mxShape.prototype.paint=function(a){null!=this.style&&"0"!=mxUtils.getValue(this.style,"comic","0")&&null==a.handHiggle&&(a.handJiggle=new r(a,mxUtils.getValue(this.style,"jiggle",this.defaultJiggle)));Ga.apply(this,arguments);null!=a.handJiggle&&(a.handJiggle.destroy(),delete a.handJiggle)};mxRhombus.prototype.defaultJiggle=2;var Ha=mxRectangleShape.prototype.isHtmlAllowed;mxRectangleShape.prototype.isHtmlAllowed=
+function(){return(null==this.style||"0"==mxUtils.getValue(this.style,"comic","0"))&&Ha.apply(this,arguments)};var Ia=mxRectangleShape.prototype.paintBackground;mxRectangleShape.prototype.paintBackground=function(a,b,c,d,e){if(null==a.handJiggle)Ia.apply(this,arguments);else{var f=!0;null!=this.style&&(f="1"==mxUtils.getValue(this.style,mxConstants.STYLE_POINTER_EVENTS,"1"));if(f||null!=this.fill&&this.fill!=mxConstants.NONE||null!=this.stroke&&this.stroke!=mxConstants.NONE)f||null!=this.fill&&this.fill!=
 mxConstants.NONE||(a.pointerEvents=!1),a.begin(),this.isRounded?("1"==mxUtils.getValue(this.style,mxConstants.STYLE_ABSOLUTE_ARCSIZE,0)?f=Math.min(d/2,Math.min(e/2,mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2)):(f=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,100*mxConstants.RECTANGLE_ROUNDING_FACTOR)/100,f=Math.min(d*f,e*f)),a.moveTo(b+f,c),a.lineTo(b+d-f,c),a.quadTo(b+d,c,b+d,c+f),a.lineTo(b+d,c+e-f),a.quadTo(b+d,c+e,b+d-f,c+e),a.lineTo(b+f,c+e),a.quadTo(b,
-c+e,b,c+e-f),a.lineTo(b,c+f),a.quadTo(b,c,b+f,c)):(a.moveTo(b,c),a.lineTo(b+d,c),a.lineTo(b+d,c+e),a.lineTo(b,c+e),a.lineTo(b,c)),a.close(),a.end(),a.fillAndStroke()}};var Ia=mxRectangleShape.prototype.paintForeground;mxRectangleShape.prototype.paintForeground=function(a,b,c,d,e){null==a.handJiggle&&Ia.apply(this,arguments)};mxUtils.extend(t,mxRectangleShape);t.prototype.size=.1;t.prototype.isHtmlAllowed=function(){return!1};t.prototype.getLabelBounds=function(a){if(mxUtils.getValue(this.state.style,
+c+e,b,c+e-f),a.lineTo(b,c+f),a.quadTo(b,c,b+f,c)):(a.moveTo(b,c),a.lineTo(b+d,c),a.lineTo(b+d,c+e),a.lineTo(b,c+e),a.lineTo(b,c)),a.close(),a.end(),a.fillAndStroke()}};var Ja=mxRectangleShape.prototype.paintForeground;mxRectangleShape.prototype.paintForeground=function(a,b,c,d,e){null==a.handJiggle&&Ja.apply(this,arguments)};mxUtils.extend(t,mxRectangleShape);t.prototype.size=.1;t.prototype.isHtmlAllowed=function(){return!1};t.prototype.getLabelBounds=function(a){if(mxUtils.getValue(this.state.style,
 mxConstants.STYLE_HORIZONTAL,!0)==(null==this.direction||this.direction==mxConstants.DIRECTION_EAST||this.direction==mxConstants.DIRECTION_WEST)){var b=a.width,c=a.height;a=new mxRectangle(a.x,a.y,b,c);var d=b*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));if(this.isRounded)var e=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,100*mxConstants.RECTANGLE_ROUNDING_FACTOR)/100,d=Math.max(d,Math.min(b*e,c*e));a.x+=d;a.width-=2*d}return a};t.prototype.paintForeground=
-function(a,b,c,d,e){var f=d*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));if(this.isRounded)var g=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,100*mxConstants.RECTANGLE_ROUNDING_FACTOR)/100,f=Math.max(f,Math.min(d*g,e*g));a.begin();a.moveTo(b+f,c);a.lineTo(b+f,c+e);a.moveTo(b+d-f,c);a.lineTo(b+d-f,c+e);a.end();a.stroke();mxRectangleShape.prototype.paintForeground.apply(this,arguments)};mxCellRenderer.prototype.defaultShapes.process=t;mxUtils.extend(u,mxHexagon);
-u.prototype.size=30;u.prototype.position=.5;u.prototype.position2=.5;u.prototype.base=20;u.prototype.getLabelMargins=function(){return new mxRectangle(0,0,0,parseFloat(mxUtils.getValue(this.style,"size",this.size))*this.scale)};u.prototype.redrawPath=function(a,b,c,d,e){b=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;c=Math.max(0,Math.min(e,parseFloat(mxUtils.getValue(this.style,"size",this.size))));var f=d*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,
-"position",this.position)))),g=d*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"position2",this.position2)))),h=Math.max(0,Math.min(d,parseFloat(mxUtils.getValue(this.style,"base",this.base))));this.addPoints(a,[new mxPoint(0,0),new mxPoint(d,0),new mxPoint(d,e-c),new mxPoint(Math.min(d,f+h),e-c),new mxPoint(g,e),new mxPoint(Math.max(0,f),e-c),new mxPoint(0,e-c)],this.isRounded,b,!0,[4])};mxCellRenderer.prototype.defaultShapes.callout=u;mxUtils.extend(w,mxActor);w.prototype.size=.2;
-w.prototype.redrawPath=function(a,b,c,d,e){b=d*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));c=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(a,[new mxPoint(0,0),new mxPoint(d-b,0),new mxPoint(d,e/2),new mxPoint(d-b,e),new mxPoint(0,e),new mxPoint(b,e/2)],this.isRounded,c,!0);a.end()};mxCellRenderer.prototype.defaultShapes.step=w;mxUtils.extend(v,mxHexagon);v.prototype.size=.25;v.prototype.redrawPath=function(a,
-b,c,d,e){b=d*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));c=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(a,[new mxPoint(b,0),new mxPoint(d-b,0),new mxPoint(d,.5*e),new mxPoint(d-b,e),new mxPoint(b,e),new mxPoint(0,.5*e)],this.isRounded,c,!0)};mxCellRenderer.prototype.defaultShapes.hexagon=v;mxUtils.extend(A,mxRectangleShape);A.prototype.isHtmlAllowed=function(){return!1};A.prototype.paintForeground=function(a,
-b,c,d,e){var f=Math.min(d/5,e/5)+1;a.begin();a.moveTo(b+d/2,c+f);a.lineTo(b+d/2,c+e-f);a.moveTo(b+f,c+e/2);a.lineTo(b+d-f,c+e/2);a.end();a.stroke();mxRectangleShape.prototype.paintForeground.apply(this,arguments)};mxCellRenderer.prototype.defaultShapes.plus=A;var Ca=mxRhombus.prototype.paintVertexShape;mxRhombus.prototype.getLabelBounds=function(a){if(1==this.style["double"]){var b=(2*Math.max(2,this.strokewidth+1)+parseFloat(this.style[mxConstants.STYLE_MARGIN]||0))*this.scale;return new mxRectangle(a.x+
-b,a.y+b,a.width-2*b,a.height-2*b)}return a};mxRhombus.prototype.paintVertexShape=function(a,b,c,d,e){Ca.apply(this,arguments);if(!this.outline&&1==this.style["double"]){var f=2*Math.max(2,this.strokewidth+1)+parseFloat(this.style[mxConstants.STYLE_MARGIN]||0);b+=f;c+=f;d-=2*f;e-=2*f;0<d&&0<e&&(a.setShadow(!1),Ca.apply(this,[a,b,c,d,e]))}};mxUtils.extend(x,mxRectangleShape);x.prototype.isHtmlAllowed=function(){return!1};x.prototype.getLabelBounds=function(a){if(1==this.style["double"]){var b=(Math.max(2,
-this.strokewidth+1)+parseFloat(this.style[mxConstants.STYLE_MARGIN]||0))*this.scale;return new mxRectangle(a.x+b,a.y+b,a.width-2*b,a.height-2*b)}return a};x.prototype.paintForeground=function(a,b,c,d,e){if(null!=this.style){if(!this.outline&&1==this.style["double"]){var f=Math.max(2,this.strokewidth+1)+parseFloat(this.style[mxConstants.STYLE_MARGIN]||0);b+=f;c+=f;d-=2*f;e-=2*f;0<d&&0<e&&mxRectangleShape.prototype.paintBackground.apply(this,arguments)}a.setDashed(!1);var f=0,g;do{g=mxCellRenderer.prototype.defaultShapes[this.style["symbol"+
-f]];if(null!=g){var h=this.style["symbol"+f+"Align"],k=this.style["symbol"+f+"VerticalAlign"],ga=this.style["symbol"+f+"Width"],l=this.style["symbol"+f+"Height"],m=this.style["symbol"+f+"Spacing"]||0,ya=this.style["symbol"+f+"VSpacing"]||m,Y=this.style["symbol"+f+"ArcSpacing"];null!=Y&&(Y*=this.getArcSize(d+this.strokewidth,e+this.strokewidth),m+=Y,ya+=Y);var Y=b,n=c,Y=h==mxConstants.ALIGN_CENTER?Y+(d-ga)/2:h==mxConstants.ALIGN_RIGHT?Y+(d-ga-m):Y+m,n=k==mxConstants.ALIGN_MIDDLE?n+(e-l)/2:k==mxConstants.ALIGN_BOTTOM?
-n+(e-l-ya):n+ya;a.save();h=new g;h.style=this.style;g.prototype.paintVertexShape.call(h,a,Y,n,ga,l);a.restore()}f++}while(null!=g)}mxRectangleShape.prototype.paintForeground.apply(this,arguments)};mxCellRenderer.prototype.defaultShapes.ext=x;mxUtils.extend(C,mxCylinder);C.prototype.redrawPath=function(a,b,c,d,e,f){f?(a.moveTo(0,0),a.lineTo(d/2,e/2),a.lineTo(d,0),a.end()):(a.moveTo(0,0),a.lineTo(d,0),a.lineTo(d,e),a.lineTo(0,e),a.close())};mxCellRenderer.prototype.defaultShapes.message=C;mxUtils.extend(B,
-mxShape);B.prototype.paintBackground=function(a,b,c,d,e){a.translate(b,c);a.ellipse(d/4,0,d/2,e/4);a.fillAndStroke();a.begin();a.moveTo(d/2,e/4);a.lineTo(d/2,2*e/3);a.moveTo(d/2,e/3);a.lineTo(0,e/3);a.moveTo(d/2,e/3);a.lineTo(d,e/3);a.moveTo(d/2,2*e/3);a.lineTo(0,e);a.moveTo(d/2,2*e/3);a.lineTo(d,e);a.end();a.stroke()};mxCellRenderer.prototype.defaultShapes.umlActor=B;mxUtils.extend(y,mxShape);y.prototype.getLabelMargins=function(a){return new mxRectangle(a.width/6,0,0,0)};y.prototype.paintBackground=
-function(a,b,c,d,e){a.translate(b,c);a.begin();a.moveTo(0,e/4);a.lineTo(0,3*e/4);a.end();a.stroke();a.begin();a.moveTo(0,e/2);a.lineTo(d/6,e/2);a.end();a.stroke();a.ellipse(d/6,0,5*d/6,e);a.fillAndStroke()};mxCellRenderer.prototype.defaultShapes.umlBoundary=y;mxUtils.extend(J,mxEllipse);J.prototype.paintVertexShape=function(a,b,c,d,e){mxEllipse.prototype.paintVertexShape.apply(this,arguments);a.begin();a.moveTo(b+d/8,c+e);a.lineTo(b+7*d/8,c+e);a.end();a.stroke()};mxCellRenderer.prototype.defaultShapes.umlEntity=
-J;mxUtils.extend(K,mxShape);K.prototype.paintVertexShape=function(a,b,c,d,e){a.translate(b,c);a.begin();a.moveTo(d,0);a.lineTo(0,e);a.moveTo(0,0);a.lineTo(d,e);a.end();a.stroke()};mxCellRenderer.prototype.defaultShapes.umlDestroy=K;mxUtils.extend(I,mxShape);I.prototype.getLabelBounds=function(a){return new mxRectangle(a.x,a.y+a.height/8,a.width,7*a.height/8)};I.prototype.paintBackground=function(a,b,c,d,e){a.translate(b,c);a.begin();a.moveTo(3*d/8,e/8*1.1);a.lineTo(5*d/8,0);a.end();a.stroke();a.ellipse(0,
-e/8,d,7*e/8);a.fillAndStroke()};I.prototype.paintForeground=function(a,b,c,d,e){a.begin();a.moveTo(3*d/8,e/8*1.1);a.lineTo(5*d/8,e/4);a.end();a.stroke()};mxCellRenderer.prototype.defaultShapes.umlControl=I;mxUtils.extend(F,mxRectangleShape);F.prototype.size=40;F.prototype.isHtmlAllowed=function(){return!1};F.prototype.getLabelBounds=function(a){var b=Math.max(0,Math.min(a.height,parseFloat(mxUtils.getValue(this.style,"size",this.size))*this.scale));return new mxRectangle(a.x,a.y,a.width,b)};F.prototype.paintBackground=
-function(a,b,c,d,e){var f=Math.max(0,Math.min(e,parseFloat(mxUtils.getValue(this.style,"size",this.size)))),g=mxUtils.getValue(this.style,"participant");null==g||null==this.state?mxRectangleShape.prototype.paintBackground.call(this,a,b,c,d,f):(g=this.state.view.graph.cellRenderer.getShape(g),null!=g&&g!=F&&(g=new g,g.apply(this.state),a.save(),g.paintVertexShape(a,b,c,d,f),a.restore()));f<e&&(a.setDashed(!0),a.begin(),a.moveTo(b+d/2,c+f),a.lineTo(b+d/2,c+e),a.end(),a.stroke())};F.prototype.paintForeground=
-function(a,b,c,d,e){var f=Math.max(0,Math.min(e,parseFloat(mxUtils.getValue(this.style,"size",this.size))));mxRectangleShape.prototype.paintForeground.call(this,a,b,c,d,Math.min(e,f))};mxCellRenderer.prototype.defaultShapes.umlLifeline=F;mxUtils.extend(E,mxShape);E.prototype.width=60;E.prototype.height=30;E.prototype.corner=10;E.prototype.getLabelMargins=function(a){return new mxRectangle(0,0,a.width-parseFloat(mxUtils.getValue(this.style,"width",this.width)*this.scale),a.height-parseFloat(mxUtils.getValue(this.style,
-"height",this.height)*this.scale))};E.prototype.paintBackground=function(a,b,c,d,e){var f=this.corner,g=Math.min(d,Math.max(f,parseFloat(mxUtils.getValue(this.style,"width",this.width)))),h=Math.min(e,Math.max(1.5*f,parseFloat(mxUtils.getValue(this.style,"height",this.height))));a.begin();a.moveTo(b,c);a.lineTo(b+g,c);a.lineTo(b+g,c+Math.max(0,h-1.5*f));a.lineTo(b+Math.max(0,g-f),c+h);a.lineTo(b,c+h);a.close();a.fillAndStroke();a.begin();a.moveTo(b+g,c);a.lineTo(b+d,c);a.lineTo(b+d,c+e);a.lineTo(b,
-c+e);a.lineTo(b,c+h);a.stroke()};mxCellRenderer.prototype.defaultShapes.umlFrame=E;mxPerimeter.LifelinePerimeter=function(a,b,c,d){d=F.prototype.size;null!=b&&(d=mxUtils.getValue(b.style,"size",d)*b.view.scale);b=parseFloat(b.style[mxConstants.STYLE_STROKEWIDTH]||1)*b.view.scale/2-1;c.x<a.getCenterX()&&(b=-1*(b+1));return new mxPoint(a.getCenterX()+b,Math.min(a.y+a.height,Math.max(a.y+d,c.y)))};mxStyleRegistry.putValue("lifelinePerimeter",mxPerimeter.LifelinePerimeter);mxPerimeter.OrthogonalPerimeter=
-function(a,b,c,d){d=!0;return mxPerimeter.RectanglePerimeter.apply(this,arguments)};mxStyleRegistry.putValue("orthogonalPerimeter",mxPerimeter.OrthogonalPerimeter);mxPerimeter.BackbonePerimeter=function(a,b,c,d){d=parseFloat(b.style[mxConstants.STYLE_STROKEWIDTH]||1)*b.view.scale/2-1;null!=b.style.backboneSize&&(d+=parseFloat(b.style.backboneSize)*b.view.scale/2-1);if("south"==b.style[mxConstants.STYLE_DIRECTION]||"north"==b.style[mxConstants.STYLE_DIRECTION])return c.x<a.getCenterX()&&(d=-1*(d+1)),
-new mxPoint(a.getCenterX()+d,Math.min(a.y+a.height,Math.max(a.y,c.y)));c.y<a.getCenterY()&&(d=-1*(d+1));return new mxPoint(Math.min(a.x+a.width,Math.max(a.x,c.x)),a.getCenterY()+d)};mxStyleRegistry.putValue("backbonePerimeter",mxPerimeter.BackbonePerimeter);mxPerimeter.CalloutPerimeter=function(a,b,c,d){return mxPerimeter.RectanglePerimeter(mxUtils.getDirectedBounds(a,new mxRectangle(0,0,0,Math.max(0,Math.min(a.height,parseFloat(mxUtils.getValue(b.style,"size",u.prototype.size))*b.view.scale))),b.style),
-b,c,d)};mxStyleRegistry.putValue("calloutPerimeter",mxPerimeter.CalloutPerimeter);mxPerimeter.ParallelogramPerimeter=function(a,b,c,d){var e=m.prototype.size;null!=b&&(e=mxUtils.getValue(b.style,"size",e));var f=a.x,g=a.y,h=a.width,k=a.height;b=null!=b?mxUtils.getValue(b.style,mxConstants.STYLE_DIRECTION,mxConstants.DIRECTION_EAST):mxConstants.DIRECTION_EAST;b==mxConstants.DIRECTION_NORTH||b==mxConstants.DIRECTION_SOUTH?(e=k*Math.max(0,Math.min(1,e)),g=[new mxPoint(f,g),new mxPoint(f+h,g+e),new mxPoint(f+
-h,g+k),new mxPoint(f,g+k-e),new mxPoint(f,g)]):(e=h*Math.max(0,Math.min(1,e)),g=[new mxPoint(f+e,g),new mxPoint(f+h,g),new mxPoint(f+h-e,g+k),new mxPoint(f,g+k),new mxPoint(f+e,g)]);k=a.getCenterX();a=a.getCenterY();a=new mxPoint(k,a);d&&(c.x<f||c.x>f+h?a.y=c.y:a.x=c.x);return mxUtils.getPerimeterPoint(g,a,c)};mxStyleRegistry.putValue("parallelogramPerimeter",mxPerimeter.ParallelogramPerimeter);mxPerimeter.TrapezoidPerimeter=function(a,b,c,d){var e=n.prototype.size;null!=b&&(e=mxUtils.getValue(b.style,
-"size",e));var f=a.x,g=a.y,h=a.width,k=a.height;b=null!=b?mxUtils.getValue(b.style,mxConstants.STYLE_DIRECTION,mxConstants.DIRECTION_EAST):mxConstants.DIRECTION_EAST;b==mxConstants.DIRECTION_EAST?(e=h*Math.max(0,Math.min(1,e)),g=[new mxPoint(f+e,g),new mxPoint(f+h-e,g),new mxPoint(f+h,g+k),new mxPoint(f,g+k),new mxPoint(f+e,g)]):b==mxConstants.DIRECTION_WEST?(e=h*Math.max(0,Math.min(1,e)),g=[new mxPoint(f,g),new mxPoint(f+h,g),new mxPoint(f+h-e,g+k),new mxPoint(f+e,g+k),new mxPoint(f,g)]):b==mxConstants.DIRECTION_NORTH?
-(e=k*Math.max(0,Math.min(1,e)),g=[new mxPoint(f,g+e),new mxPoint(f+h,g),new mxPoint(f+h,g+k),new mxPoint(f,g+k-e),new mxPoint(f,g+e)]):(e=k*Math.max(0,Math.min(1,e)),g=[new mxPoint(f,g),new mxPoint(f+h,g+e),new mxPoint(f+h,g+k-e),new mxPoint(f,g+k),new mxPoint(f,g)]);k=a.getCenterX();a=a.getCenterY();a=new mxPoint(k,a);d&&(c.x<f||c.x>f+h?a.y=c.y:a.x=c.x);return mxUtils.getPerimeterPoint(g,a,c)};mxStyleRegistry.putValue("trapezoidPerimeter",mxPerimeter.TrapezoidPerimeter);mxPerimeter.StepPerimeter=
-function(a,b,c,d){var e=w.prototype.size;null!=b&&(e=mxUtils.getValue(b.style,"size",e));var f=a.x,g=a.y,h=a.width,k=a.height,l=a.getCenterX();a=a.getCenterY();b=null!=b?mxUtils.getValue(b.style,mxConstants.STYLE_DIRECTION,mxConstants.DIRECTION_EAST):mxConstants.DIRECTION_EAST;b==mxConstants.DIRECTION_EAST?(e=h*Math.max(0,Math.min(1,e)),g=[new mxPoint(f,g),new mxPoint(f+h-e,g),new mxPoint(f+h,a),new mxPoint(f+h-e,g+k),new mxPoint(f,g+k),new mxPoint(f+e,a),new mxPoint(f,g)]):b==mxConstants.DIRECTION_WEST?
-(e=h*Math.max(0,Math.min(1,e)),g=[new mxPoint(f+e,g),new mxPoint(f+h,g),new mxPoint(f+h-e,a),new mxPoint(f+h,g+k),new mxPoint(f+e,g+k),new mxPoint(f,a),new mxPoint(f+e,g)]):b==mxConstants.DIRECTION_NORTH?(e=k*Math.max(0,Math.min(1,e)),g=[new mxPoint(f,g+e),new mxPoint(l,g),new mxPoint(f+h,g+e),new mxPoint(f+h,g+k),new mxPoint(l,g+k-e),new mxPoint(f,g+k),new mxPoint(f,g+e)]):(e=k*Math.max(0,Math.min(1,e)),g=[new mxPoint(f,g),new mxPoint(l,g+e),new mxPoint(f+h,g),new mxPoint(f+h,g+k-e),new mxPoint(l,
-g+k),new mxPoint(f,g+k-e),new mxPoint(f,g)]);l=new mxPoint(l,a);d&&(c.x<f||c.x>f+h?l.y=c.y:l.x=c.x);return mxUtils.getPerimeterPoint(g,l,c)};mxStyleRegistry.putValue("stepPerimeter",mxPerimeter.StepPerimeter);mxPerimeter.HexagonPerimeter2=function(a,b,c,d){var e=v.prototype.size;null!=b&&(e=mxUtils.getValue(b.style,"size",e));var f=a.x,g=a.y,h=a.width,k=a.height,l=a.getCenterX();a=a.getCenterY();b=null!=b?mxUtils.getValue(b.style,mxConstants.STYLE_DIRECTION,mxConstants.DIRECTION_EAST):mxConstants.DIRECTION_EAST;
-b==mxConstants.DIRECTION_NORTH||b==mxConstants.DIRECTION_SOUTH?(e=k*Math.max(0,Math.min(1,e)),g=[new mxPoint(l,g),new mxPoint(f+h,g+e),new mxPoint(f+h,g+k-e),new mxPoint(l,g+k),new mxPoint(f,g+k-e),new mxPoint(f,g+e),new mxPoint(l,g)]):(e=h*Math.max(0,Math.min(1,e)),g=[new mxPoint(f+e,g),new mxPoint(f+h-e,g),new mxPoint(f+h,a),new mxPoint(f+h-e,g+k),new mxPoint(f+e,g+k),new mxPoint(f,a),new mxPoint(f+e,g)]);l=new mxPoint(l,a);d&&(c.x<f||c.x>f+h?l.y=c.y:l.x=c.x);return mxUtils.getPerimeterPoint(g,
-l,c)};mxStyleRegistry.putValue("hexagonPerimeter2",mxPerimeter.HexagonPerimeter2);mxUtils.extend(N,mxShape);N.prototype.size=10;N.prototype.paintBackground=function(a,b,c,d,e){var f=parseFloat(mxUtils.getValue(this.style,"size",this.size));a.translate(b,c);a.ellipse((d-f)/2,0,f,f);a.fillAndStroke();a.begin();a.moveTo(d/2,f);a.lineTo(d/2,e);a.end();a.stroke()};mxCellRenderer.prototype.defaultShapes.lollipop=N;mxUtils.extend(M,mxShape);M.prototype.size=10;M.prototype.inset=2;M.prototype.paintBackground=
-function(a,b,c,d,e){var f=parseFloat(mxUtils.getValue(this.style,"size",this.size)),g=parseFloat(mxUtils.getValue(this.style,"inset",this.inset))+this.strokewidth;a.translate(b,c);a.begin();a.moveTo(d/2,f+g);a.lineTo(d/2,e);a.end();a.stroke();a.begin();a.moveTo((d-f)/2-g,f/2);a.quadTo((d-f)/2-g,f+g,d/2,f+g);a.quadTo((d+f)/2+g,f+g,(d+f)/2+g,f/2);a.end();a.stroke()};mxCellRenderer.prototype.defaultShapes.requires=M;mxUtils.extend(Q,mxCylinder);Q.prototype.jettyWidth=32;Q.prototype.jettyHeight=12;Q.prototype.redrawPath=
-function(a,b,c,d,e,f){var g=parseFloat(mxUtils.getValue(this.style,"jettyWidth",this.jettyWidth));b=parseFloat(mxUtils.getValue(this.style,"jettyHeight",this.jettyHeight));c=g/2;var g=c+g/2,h=.3*e-b/2,k=.7*e-b/2;f?(a.moveTo(c,h),a.lineTo(g,h),a.lineTo(g,h+b),a.lineTo(c,h+b),a.moveTo(c,k),a.lineTo(g,k),a.lineTo(g,k+b),a.lineTo(c,k+b)):(a.moveTo(c,0),a.lineTo(d,0),a.lineTo(d,e),a.lineTo(c,e),a.lineTo(c,k+b),a.lineTo(0,k+b),a.lineTo(0,k),a.lineTo(c,k),a.lineTo(c,h+b),a.lineTo(0,h+b),a.lineTo(0,h),a.lineTo(c,
-h),a.close());a.end()};mxCellRenderer.prototype.defaultShapes.component=Q;mxUtils.extend(O,mxDoubleEllipse);O.prototype.outerStroke=!0;O.prototype.paintVertexShape=function(a,b,c,d,e){var f=Math.min(4,Math.min(d/5,e/5));0<d&&0<e&&(a.ellipse(b+f,c+f,d-2*f,e-2*f),a.fillAndStroke());a.setShadow(!1);this.outerStroke&&(a.ellipse(b,c,d,e),a.stroke())};mxCellRenderer.prototype.defaultShapes.endState=O;mxUtils.extend(G,O);G.prototype.outerStroke=!1;mxCellRenderer.prototype.defaultShapes.startState=G;mxUtils.extend(D,
-mxArrowConnector);D.prototype.defaultWidth=4;D.prototype.isOpenEnded=function(){return!0};D.prototype.getEdgeWidth=function(){return mxUtils.getNumber(this.style,"width",this.defaultWidth)+Math.max(0,this.strokewidth-1)};D.prototype.isArrowRounded=function(){return this.isRounded};mxCellRenderer.prototype.defaultShapes.link=D;mxUtils.extend(H,mxArrowConnector);H.prototype.defaultWidth=10;H.prototype.defaultArrowWidth=20;H.prototype.getStartArrowWidth=function(){return this.getEdgeWidth()+mxUtils.getNumber(this.style,
-"startWidth",this.defaultArrowWidth)};H.prototype.getEndArrowWidth=function(){return this.getEdgeWidth()+mxUtils.getNumber(this.style,"endWidth",this.defaultArrowWidth)};H.prototype.getEdgeWidth=function(){return mxUtils.getNumber(this.style,"width",this.defaultWidth)+Math.max(0,this.strokewidth-1)};mxCellRenderer.prototype.defaultShapes.flexArrow=H;mxUtils.extend(z,mxActor);z.prototype.size=30;z.prototype.redrawPath=function(a,b,c,d,e){b=Math.min(e,parseFloat(mxUtils.getValue(this.style,"size",this.size)));
-c=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(a,[new mxPoint(0,e),new mxPoint(0,b),new mxPoint(d,0),new mxPoint(d,e)],this.isRounded,c,!0);a.end()};mxCellRenderer.prototype.defaultShapes.manualInput=z;mxUtils.extend(P,mxRectangleShape);P.prototype.dx=20;P.prototype.dy=20;P.prototype.isHtmlAllowed=function(){return!1};P.prototype.paintForeground=function(a,b,c,d,e){mxRectangleShape.prototype.paintForeground.apply(this,arguments);var f=0;if(this.isRounded)var g=
-mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,100*mxConstants.RECTANGLE_ROUNDING_FACTOR)/100,f=Math.max(f,Math.min(d*g,e*g));g=Math.max(f,Math.min(d,parseFloat(mxUtils.getValue(this.style,"dx",this.dx))));f=Math.max(f,Math.min(e,parseFloat(mxUtils.getValue(this.style,"dy",this.dy))));a.begin();a.moveTo(b,c+f);a.lineTo(b+d,c+f);a.end();a.stroke();a.begin();a.moveTo(b+g,c);a.lineTo(b+g,c+e);a.end();a.stroke()};mxCellRenderer.prototype.defaultShapes.internalStorage=P;mxUtils.extend(V,mxActor);
-V.prototype.dx=20;V.prototype.dy=20;V.prototype.redrawPath=function(a,b,c,d,e){b=Math.max(0,Math.min(d,parseFloat(mxUtils.getValue(this.style,"dx",this.dx))));c=Math.max(0,Math.min(e,parseFloat(mxUtils.getValue(this.style,"dy",this.dy))));parseFloat(mxUtils.getValue(this.style,"size",this.size));var f=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(a,[new mxPoint(0,0),new mxPoint(d,0),new mxPoint(d,c),new mxPoint(b,c),new mxPoint(b,e),new mxPoint(0,
-e)],this.isRounded,f,!0);a.end()};mxCellRenderer.prototype.defaultShapes.corner=V;mxUtils.extend(Z,mxActor);Z.prototype.redrawPath=function(a,b,c,d,e){a.moveTo(0,0);a.lineTo(0,e);a.end();a.moveTo(d,0);a.lineTo(d,e);a.end();a.moveTo(0,e/2);a.lineTo(d,e/2);a.end()};mxCellRenderer.prototype.defaultShapes.crossbar=Z;mxUtils.extend(S,mxActor);S.prototype.dx=20;S.prototype.dy=20;S.prototype.redrawPath=function(a,b,c,d,e){b=Math.max(0,Math.min(d,parseFloat(mxUtils.getValue(this.style,"dx",this.dx))));c=
-Math.max(0,Math.min(e,parseFloat(mxUtils.getValue(this.style,"dy",this.dy))));parseFloat(mxUtils.getValue(this.style,"size",this.size));var f=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(a,[new mxPoint(0,0),new mxPoint(d,0),new mxPoint(d,c),new mxPoint((d+b)/2,c),new mxPoint((d+b)/2,e),new mxPoint((d-b)/2,e),new mxPoint((d-b)/2,c),new mxPoint(0,c)],this.isRounded,f,!0);a.end()};mxCellRenderer.prototype.defaultShapes.tee=S;mxUtils.extend(T,mxActor);
-T.prototype.arrowWidth=.3;T.prototype.arrowSize=.2;T.prototype.redrawPath=function(a,b,c,d,e){var f=e*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"arrowWidth",this.arrowWidth))));b=d*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"arrowSize",this.arrowSize))));c=(e-f)/2;var f=c+f,g=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(a,[new mxPoint(0,c),new mxPoint(d-b,c),new mxPoint(d-b,0),new mxPoint(d,e/2),new mxPoint(d-
-b,e),new mxPoint(d-b,f),new mxPoint(0,f)],this.isRounded,g,!0);a.end()};mxCellRenderer.prototype.defaultShapes.singleArrow=T;mxUtils.extend(ia,mxActor);ia.prototype.redrawPath=function(a,b,c,d,e){var f=e*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"arrowWidth",T.prototype.arrowWidth))));b=d*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"arrowSize",T.prototype.arrowSize))));c=(e-f)/2;var f=c+f,g=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/
-2;this.addPoints(a,[new mxPoint(0,e/2),new mxPoint(b,0),new mxPoint(b,c),new mxPoint(d-b,c),new mxPoint(d-b,0),new mxPoint(d,e/2),new mxPoint(d-b,e),new mxPoint(d-b,f),new mxPoint(b,f),new mxPoint(b,e)],this.isRounded,g,!0);a.end()};mxCellRenderer.prototype.defaultShapes.doubleArrow=ia;mxUtils.extend(aa,mxActor);aa.prototype.size=.1;aa.prototype.redrawPath=function(a,b,c,d,e){b=d*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));a.moveTo(b,0);a.lineTo(d,0);a.quadTo(d-
-2*b,e/2,d,e);a.lineTo(b,e);a.quadTo(b-2*b,e/2,b,0);a.close();a.end()};mxCellRenderer.prototype.defaultShapes.dataStorage=aa;mxUtils.extend(ja,mxActor);ja.prototype.redrawPath=function(a,b,c,d,e){a.moveTo(0,0);a.quadTo(d,0,d,e/2);a.quadTo(d,e,0,e);a.close();a.end()};mxCellRenderer.prototype.defaultShapes.or=ja;mxUtils.extend(ka,mxActor);ka.prototype.redrawPath=function(a,b,c,d,e){a.moveTo(0,0);a.quadTo(d,0,d,e/2);a.quadTo(d,e,0,e);a.quadTo(d/2,e/2,0,0);a.close();a.end()};mxCellRenderer.prototype.defaultShapes.xor=
-ka;mxUtils.extend(W,mxActor);W.prototype.size=20;W.prototype.redrawPath=function(a,b,c,d,e){b=Math.min(d/2,Math.min(e,parseFloat(mxUtils.getValue(this.style,"size",this.size))));c=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(a,[new mxPoint(b,0),new mxPoint(d-b,0),new mxPoint(d,.8*b),new mxPoint(d,e),new mxPoint(0,e),new mxPoint(0,.8*b)],this.isRounded,c,!0);a.end()};mxCellRenderer.prototype.defaultShapes.loopLimit=W;mxUtils.extend(X,mxActor);X.prototype.size=
-.375;X.prototype.redrawPath=function(a,b,c,d,e){b=e*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));c=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(a,[new mxPoint(0,0),new mxPoint(d,0),new mxPoint(d,e-b),new mxPoint(d/2,e),new mxPoint(0,e-b)],this.isRounded,c,!0);a.end()};mxCellRenderer.prototype.defaultShapes.offPageConnector=X;mxUtils.extend(ba,mxEllipse);ba.prototype.paintVertexShape=function(a,b,c,d,e){mxEllipse.prototype.paintVertexShape.apply(this,
-arguments);a.begin();a.moveTo(b+d/2,c+e);a.lineTo(b+d,c+e);a.end();a.stroke()};mxCellRenderer.prototype.defaultShapes.tapeData=ba;mxUtils.extend(ca,mxEllipse);ca.prototype.paintVertexShape=function(a,b,c,d,e){mxEllipse.prototype.paintVertexShape.apply(this,arguments);a.setShadow(!1);a.begin();a.moveTo(b,c+e/2);a.lineTo(b+d,c+e/2);a.end();a.stroke();a.begin();a.moveTo(b+d/2,c);a.lineTo(b+d/2,c+e);a.end();a.stroke()};mxCellRenderer.prototype.defaultShapes.orEllipse=ca;mxUtils.extend(da,mxEllipse);da.prototype.paintVertexShape=
-function(a,b,c,d,e){mxEllipse.prototype.paintVertexShape.apply(this,arguments);a.setShadow(!1);a.begin();a.moveTo(b+.145*d,c+.145*e);a.lineTo(b+.855*d,c+.855*e);a.end();a.stroke();a.begin();a.moveTo(b+.855*d,c+.145*e);a.lineTo(b+.145*d,c+.855*e);a.end();a.stroke()};mxCellRenderer.prototype.defaultShapes.sumEllipse=da;mxUtils.extend(ea,mxRhombus);ea.prototype.paintVertexShape=function(a,b,c,d,e){mxRhombus.prototype.paintVertexShape.apply(this,arguments);a.setShadow(!1);a.begin();a.moveTo(b,c+e/2);
-a.lineTo(b+d,c+e/2);a.end();a.stroke()};mxCellRenderer.prototype.defaultShapes.sortShape=ea;mxUtils.extend(oa,mxEllipse);oa.prototype.paintVertexShape=function(a,b,c,d,e){a.begin();a.moveTo(b,c);a.lineTo(b+d,c);a.lineTo(b+d/2,c+e/2);a.close();a.fillAndStroke();a.begin();a.moveTo(b,c+e);a.lineTo(b+d,c+e);a.lineTo(b+d/2,c+e/2);a.close();a.fillAndStroke()};mxCellRenderer.prototype.defaultShapes.collate=oa;mxUtils.extend(U,mxEllipse);U.prototype.paintVertexShape=function(a,b,c,d,e){var f=c+e-5;a.begin();
-a.moveTo(b,c);a.lineTo(b,c+e);a.moveTo(b,f);a.lineTo(b+10,f-5);a.moveTo(b,f);a.lineTo(b+10,f+5);a.moveTo(b,f);a.lineTo(b+d,f);a.moveTo(b+d,c);a.lineTo(b+d,c+e);a.moveTo(b+d,f);a.lineTo(b+d-10,f-5);a.moveTo(b+d,f);a.lineTo(b+d-10,f+5);a.end();a.stroke()};mxCellRenderer.prototype.defaultShapes.dimension=U;mxUtils.extend(la,mxEllipse);la.prototype.paintVertexShape=function(a,b,c,d,e){this.outline||a.setStrokeColor(null);mxRectangleShape.prototype.paintBackground.apply(this,arguments);null!=this.style&&
-(a.setStrokeColor(this.stroke),a.rect(b,c,d,e),a.fill(),a.begin(),a.moveTo(b,c),"1"==mxUtils.getValue(this.style,"top","1")?a.lineTo(b+d,c):a.moveTo(b+d,c),"1"==mxUtils.getValue(this.style,"right","1")?a.lineTo(b+d,c+e):a.moveTo(b+d,c+e),"1"==mxUtils.getValue(this.style,"bottom","1")?a.lineTo(b,c+e):a.moveTo(b,c+e),"1"==mxUtils.getValue(this.style,"left","1")&&a.lineTo(b,c-this.strokewidth/2),a.end(),a.stroke())};mxCellRenderer.prototype.defaultShapes.partialRectangle=la;mxUtils.extend(R,mxEllipse);
-R.prototype.paintVertexShape=function(a,b,c,d,e){mxEllipse.prototype.paintVertexShape.apply(this,arguments);a.setShadow(!1);a.begin();"vertical"==mxUtils.getValue(this.style,"line")?(a.moveTo(b+d/2,c),a.lineTo(b+d/2,c+e)):(a.moveTo(b,c+e/2),a.lineTo(b+d,c+e/2));a.end();a.stroke()};mxCellRenderer.prototype.defaultShapes.lineEllipse=R;mxUtils.extend(ta,mxActor);ta.prototype.redrawPath=function(a,b,c,d,e){b=Math.min(d,e/2);a.moveTo(0,0);a.lineTo(d-b,0);a.quadTo(d,0,d,e/2);a.quadTo(d,e,d-b,e);a.lineTo(0,
-e);a.close();a.end()};mxCellRenderer.prototype.defaultShapes.delay=ta;mxUtils.extend(pa,mxActor);pa.prototype.size=.2;pa.prototype.redrawPath=function(a,b,c,d,e){b=Math.min(e,d);var f=Math.max(0,Math.min(b,b*parseFloat(mxUtils.getValue(this.style,"size",this.size))));b=(e-f)/2;c=b+f;var g=(d-f)/2,f=g+f;a.moveTo(0,b);a.lineTo(g,b);a.lineTo(g,0);a.lineTo(f,0);a.lineTo(f,b);a.lineTo(d,b);a.lineTo(d,c);a.lineTo(f,c);a.lineTo(f,e);a.lineTo(g,e);a.lineTo(g,c);a.lineTo(0,c);a.close();a.end()};mxCellRenderer.prototype.defaultShapes.cross=
-pa;mxUtils.extend(qa,mxActor);qa.prototype.size=.25;qa.prototype.redrawPath=function(a,b,c,d,e){b=Math.min(d,e/2);c=Math.min(d-b,Math.max(0,parseFloat(mxUtils.getValue(this.style,"size",this.size)))*d);a.moveTo(0,e/2);a.lineTo(c,0);a.lineTo(d-b,0);a.quadTo(d,0,d,e/2);a.quadTo(d,e,d-b,e);a.lineTo(c,e);a.close();a.end()};mxCellRenderer.prototype.defaultShapes.display=qa;mxUtils.extend(ma,mxConnector);ma.prototype.origPaintEdgeShape=ma.prototype.paintEdgeShape;ma.prototype.paintEdgeShape=function(a,
-b,c){var d=a.state.dashed,e=a.state.fixDash;ma.prototype.origPaintEdgeShape.apply(this,arguments);if(3<=a.state.strokeWidth){var f=mxUtils.getValue(this.style,"fillColor",null);null!=f&&(a.setStrokeColor(f),a.setStrokeWidth(a.state.strokeWidth-2),a.setDashed(d,e),ma.prototype.origPaintEdgeShape.apply(this,arguments))}};mxCellRenderer.prototype.defaultShapes.filledEdge=ma;mxMarker.addMarker("dash",function(a,b,c,d,e,f,g,h,k,l){var m=e*(g+k+1),n=f*(g+k+1);return function(){a.begin();a.moveTo(d.x-m/
-2-n/2,d.y-n/2+m/2);a.lineTo(d.x+n/2-3*m/2,d.y-3*n/2-m/2);a.stroke()}});mxMarker.addMarker("cross",function(a,b,c,d,e,f,g,h,k,l){var m=e*(g+k+1),n=f*(g+k+1);return function(){a.begin();a.moveTo(d.x-m/2-n/2,d.y-n/2+m/2);a.lineTo(d.x+n/2-3*m/2,d.y-3*n/2-m/2);a.moveTo(d.x-m/2+n/2,d.y-n/2-m/2);a.lineTo(d.x-n/2-3*m/2,d.y-3*n/2+m/2);a.stroke()}});mxMarker.addMarker("circle",Ba);mxMarker.addMarker("circlePlus",function(a,b,c,d,e,f,g,h,k,l){var m=d.clone(),n=Ba.apply(this,arguments),p=e*(g+2*k),q=f*(g+2*k);
-return function(){n.apply(this,arguments);a.begin();a.moveTo(m.x-e*k,m.y-f*k);a.lineTo(m.x-2*p+e*k,m.y-2*q+f*k);a.moveTo(m.x-p-q+f*k,m.y-q+p-e*k);a.lineTo(m.x+q-p-f*k,m.y-q-p+e*k);a.stroke()}});mxMarker.addMarker("async",function(a,b,c,d,e,f,g,h,k,l){b=e*k*1.118;c=f*k*1.118;e*=g+k;f*=g+k;var m=d.clone();m.x-=b;m.y-=c;d.x+=1*-e-b;d.y+=1*-f-c;return function(){a.begin();a.moveTo(m.x,m.y);h?a.lineTo(m.x-e-f/2,m.y-f+e/2):a.lineTo(m.x+f/2-e,m.y-f-e/2);a.lineTo(m.x-e,m.y-f);a.close();l?a.fillAndStroke():
-a.stroke()}});mxMarker.addMarker("openAsync",function(a){a=null!=a?a:2;return function(b,c,d,e,f,g,h,k,l,m){f*=h+l;g*=h+l;var n=e.clone();return function(){b.begin();b.moveTo(n.x,n.y);k?b.lineTo(n.x-f-g/a,n.y-g+f/a):b.lineTo(n.x+g/a-f,n.y-g-f/a);b.stroke()}}}(2));if("undefined"!==typeof mxVertexHandler){var Da=function(a,b,c){return ra(a,["width"],b,function(b,d,e,f,g){g=a.shape.getEdgeWidth()*a.view.scale+c;return new mxPoint(f.x+d*b/4+e*g/2,f.y+e*b/4-d*g/2)},function(b,d,e,f,g,h){b=Math.sqrt(mxUtils.ptSegDistSq(f.x,
-f.y,g.x,g.y,h.x,h.y));a.style.width=Math.round(2*b)/a.view.scale-c})},ra=function(a,b,c,d,e){var f=a.absolutePoints,g=f.length-1,h=a.view.translate,k=a.view.scale,l=c?f[0]:f[g],m=c?f[1]:f[g-1],n=m.x-l.x,p=m.y-l.y,q=Math.sqrt(n*n+p*p);return L(a,b,function(a){a=d.call(this,q,n/q,p/q,l,m);return new mxPoint(a.x/k-h.x,a.y/k-h.y)},function(a,b,c){a=Math.sqrt(n*n+p*p);b.x=(b.x+h.x)*k;b.y=(b.y+h.y)*k;e.call(this,a,n/a,p/a,l,m,b,c)})},ha=function(a){return function(b){return[L(b,["arrowWidth","arrowSize"],
-function(b){var c=Math.max(0,Math.min(1,mxUtils.getValue(this.state.style,"arrowWidth",T.prototype.arrowWidth))),d=Math.max(0,Math.min(a,mxUtils.getValue(this.state.style,"arrowSize",T.prototype.arrowSize)));return new mxPoint(b.x+(1-d)*b.width,b.y+(1-c)*b.height/2)},function(b,c){this.state.style.arrowWidth=Math.max(0,Math.min(1,Math.abs(b.y+b.height/2-c.y)/b.height*2));this.state.style.arrowSize=Math.max(0,Math.min(a,(b.x+b.width-c.x)/b.width))})]}},za=function(a,b,c){return function(d){var e=[L(d,
-["size"],function(c){var d=Math.max(0,Math.min(c.width,Math.min(c.height,parseFloat(mxUtils.getValue(this.state.style,"size",b)))))*a;return new mxPoint(c.x+d,c.y+d)},function(b,c){this.state.style.size=Math.round(Math.max(0,Math.min(Math.min(b.width,c.x-b.x),Math.min(b.height,c.y-b.y)))/a)})];c&&mxUtils.getValue(d.style,mxConstants.STYLE_ROUNDED,!1)&&e.push(fa(d));return e}},ua=function(a,b,c,d){c=null!=c?c:1;return function(e){var f=[L(e,["size"],function(b){var c=parseFloat(mxUtils.getValue(this.state.style,
-"size",a));return new mxPoint(b.x+c*b.width,b.getCenterY())},function(a,b){this.state.style.size=Math.max(0,Math.min(c,(b.x-a.x)/a.width))},null,d)];b&&mxUtils.getValue(e.style,mxConstants.STYLE_ROUNDED,!1)&&f.push(fa(e));return f}},Ea=function(a){return function(b){var c=[L(b,["size"],function(b){var c=Math.max(0,Math.min(a,parseFloat(mxUtils.getValue(this.state.style,"size",n.prototype.size))));return new mxPoint(b.x+c*b.width*.75,b.y+b.height/4)},function(b,c){this.state.style.size=Math.max(0,
-Math.min(a,(c.x-b.x)/(.75*b.width)))},null,!0)];mxUtils.getValue(b.style,mxConstants.STYLE_ROUNDED,!1)&&c.push(fa(b));return c}},sa=function(){return function(a){var b=[];mxUtils.getValue(a.style,mxConstants.STYLE_ROUNDED,!1)&&b.push(fa(a));return b}},fa=function(a,b){return L(a,[mxConstants.STYLE_ARCSIZE],function(c){var d=null!=b?b:c.height/8;if("1"==mxUtils.getValue(a.style,mxConstants.STYLE_ABSOLUTE_ARCSIZE,0)){var e=mxUtils.getValue(a.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/
-2;return new mxPoint(c.x+c.width-Math.min(c.width/2,e),c.y+d)}e=Math.max(0,parseFloat(mxUtils.getValue(a.style,mxConstants.STYLE_ARCSIZE,100*mxConstants.RECTANGLE_ROUNDING_FACTOR)))/100;return new mxPoint(c.x+c.width-Math.min(Math.max(c.width/2,c.height/2),Math.min(c.width,c.height)*e),c.y+d)},function(b,c,d){"1"==mxUtils.getValue(a.style,mxConstants.STYLE_ABSOLUTE_ARCSIZE,0)?this.state.style[mxConstants.STYLE_ARCSIZE]=Math.round(Math.max(0,Math.min(b.width,2*(b.x+b.width-c.x)))):this.state.style[mxConstants.STYLE_ARCSIZE]=
-Math.round(Math.min(50,Math.max(0,100*(b.width-c.x+b.x)/Math.min(b.width,b.height))))})},L=function(a,b,c,d,e,f){var g=new mxHandle(a,null,mxVertexHandler.prototype.secondaryHandleImage);g.execute=function(){for(var a=0;a<b.length;a++)this.copyStyle(b[a])};g.getPosition=c;g.setPosition=d;g.ignoreGrid=null!=e?e:!0;if(f){var h=g.positionChanged;g.positionChanged=function(){h.apply(this,arguments);a.view.invalidate(this.state.cell);a.view.validate()}}return g},Aa={link:function(a){return[Da(a,!0,10),
-Da(a,!1,10)]},flexArrow:function(a){var b=a.view.graph.gridSize/a.view.scale,c=[];mxUtils.getValue(a.style,mxConstants.STYLE_STARTARROW,mxConstants.NONE)!=mxConstants.NONE&&(c.push(ra(a,["width",mxConstants.STYLE_STARTSIZE,mxConstants.STYLE_ENDSIZE],!0,function(b,c,d,e,f){b=(a.shape.getEdgeWidth()-a.shape.strokewidth)*a.view.scale;f=3*mxUtils.getNumber(a.style,mxConstants.STYLE_STARTSIZE,mxConstants.ARROW_SIZE/5)*a.view.scale;return new mxPoint(e.x+c*(f+a.shape.strokewidth*a.view.scale)+d*b/2,e.y+
-d*(f+a.shape.strokewidth*a.view.scale)-c*b/2)},function(c,d,e,f,g,h,k){c=Math.sqrt(mxUtils.ptSegDistSq(f.x,f.y,g.x,g.y,h.x,h.y));d=mxUtils.ptLineDist(f.x,f.y,f.x+e,f.y-d,h.x,h.y);a.style[mxConstants.STYLE_STARTSIZE]=Math.round(100*(d-a.shape.strokewidth)/3)/100/a.view.scale;a.style.width=Math.round(2*c)/a.view.scale;mxEvent.isControlDown(k.getEvent())&&(a.style[mxConstants.STYLE_ENDSIZE]=a.style[mxConstants.STYLE_STARTSIZE]);mxEvent.isAltDown(k.getEvent())||Math.abs(parseFloat(a.style[mxConstants.STYLE_STARTSIZE])-
-parseFloat(a.style[mxConstants.STYLE_ENDSIZE]))<b/6&&(a.style[mxConstants.STYLE_STARTSIZE]=a.style[mxConstants.STYLE_ENDSIZE])})),c.push(ra(a,["startWidth","endWidth",mxConstants.STYLE_STARTSIZE,mxConstants.STYLE_ENDSIZE],!0,function(b,c,d,e,f){b=(a.shape.getStartArrowWidth()-a.shape.strokewidth)*a.view.scale;f=3*mxUtils.getNumber(a.style,mxConstants.STYLE_STARTSIZE,mxConstants.ARROW_SIZE/5)*a.view.scale;return new mxPoint(e.x+c*(f+a.shape.strokewidth*a.view.scale)+d*b/2,e.y+d*(f+a.shape.strokewidth*
-a.view.scale)-c*b/2)},function(c,d,e,f,g,h,k){c=Math.sqrt(mxUtils.ptSegDistSq(f.x,f.y,g.x,g.y,h.x,h.y));d=mxUtils.ptLineDist(f.x,f.y,f.x+e,f.y-d,h.x,h.y);a.style[mxConstants.STYLE_STARTSIZE]=Math.round(100*(d-a.shape.strokewidth)/3)/100/a.view.scale;a.style.startWidth=Math.max(0,Math.round(2*c)-a.shape.getEdgeWidth())/a.view.scale;mxEvent.isControlDown(k.getEvent())&&(a.style[mxConstants.STYLE_ENDSIZE]=a.style[mxConstants.STYLE_STARTSIZE],a.style.endWidth=a.style.startWidth);mxEvent.isAltDown(k.getEvent())||
-(Math.abs(parseFloat(a.style[mxConstants.STYLE_STARTSIZE])-parseFloat(a.style[mxConstants.STYLE_ENDSIZE]))<b/6&&(a.style[mxConstants.STYLE_STARTSIZE]=a.style[mxConstants.STYLE_ENDSIZE]),Math.abs(parseFloat(a.style.startWidth)-parseFloat(a.style.endWidth))<b&&(a.style.startWidth=a.style.endWidth))})));mxUtils.getValue(a.style,mxConstants.STYLE_ENDARROW,mxConstants.NONE)!=mxConstants.NONE&&(c.push(ra(a,["width",mxConstants.STYLE_STARTSIZE,mxConstants.STYLE_ENDSIZE],!1,function(b,c,d,e,f){b=(a.shape.getEdgeWidth()-
-a.shape.strokewidth)*a.view.scale;f=3*mxUtils.getNumber(a.style,mxConstants.STYLE_ENDSIZE,mxConstants.ARROW_SIZE/5)*a.view.scale;return new mxPoint(e.x+c*(f+a.shape.strokewidth*a.view.scale)-d*b/2,e.y+d*(f+a.shape.strokewidth*a.view.scale)+c*b/2)},function(c,d,e,f,g,h,k){c=Math.sqrt(mxUtils.ptSegDistSq(f.x,f.y,g.x,g.y,h.x,h.y));d=mxUtils.ptLineDist(f.x,f.y,f.x+e,f.y-d,h.x,h.y);a.style[mxConstants.STYLE_ENDSIZE]=Math.round(100*(d-a.shape.strokewidth)/3)/100/a.view.scale;a.style.width=Math.round(2*
-c)/a.view.scale;mxEvent.isControlDown(k.getEvent())&&(a.style[mxConstants.STYLE_STARTSIZE]=a.style[mxConstants.STYLE_ENDSIZE]);mxEvent.isAltDown(k.getEvent())||Math.abs(parseFloat(a.style[mxConstants.STYLE_ENDSIZE])-parseFloat(a.style[mxConstants.STYLE_STARTSIZE]))<b/6&&(a.style[mxConstants.STYLE_ENDSIZE]=a.style[mxConstants.STYLE_STARTSIZE])})),c.push(ra(a,["startWidth","endWidth",mxConstants.STYLE_STARTSIZE,mxConstants.STYLE_ENDSIZE],!1,function(b,c,d,e,f){b=(a.shape.getEndArrowWidth()-a.shape.strokewidth)*
-a.view.scale;f=3*mxUtils.getNumber(a.style,mxConstants.STYLE_ENDSIZE,mxConstants.ARROW_SIZE/5)*a.view.scale;return new mxPoint(e.x+c*(f+a.shape.strokewidth*a.view.scale)-d*b/2,e.y+d*(f+a.shape.strokewidth*a.view.scale)+c*b/2)},function(c,d,e,f,g,h,k){c=Math.sqrt(mxUtils.ptSegDistSq(f.x,f.y,g.x,g.y,h.x,h.y));d=mxUtils.ptLineDist(f.x,f.y,f.x+e,f.y-d,h.x,h.y);a.style[mxConstants.STYLE_ENDSIZE]=Math.round(100*(d-a.shape.strokewidth)/3)/100/a.view.scale;a.style.endWidth=Math.max(0,Math.round(2*c)-a.shape.getEdgeWidth())/
-a.view.scale;mxEvent.isControlDown(k.getEvent())&&(a.style[mxConstants.STYLE_STARTSIZE]=a.style[mxConstants.STYLE_ENDSIZE],a.style.startWidth=a.style.endWidth);mxEvent.isAltDown(k.getEvent())||(Math.abs(parseFloat(a.style[mxConstants.STYLE_ENDSIZE])-parseFloat(a.style[mxConstants.STYLE_STARTSIZE]))<b/6&&(a.style[mxConstants.STYLE_ENDSIZE]=a.style[mxConstants.STYLE_STARTSIZE]),Math.abs(parseFloat(a.style.endWidth)-parseFloat(a.style.startWidth))<b&&(a.style.endWidth=a.style.startWidth))})));return c},
-swimlane:function(a){var b=[L(a,[mxConstants.STYLE_STARTSIZE],function(b){var c=parseFloat(mxUtils.getValue(a.style,mxConstants.STYLE_STARTSIZE,mxConstants.DEFAULT_STARTSIZE));return 1==mxUtils.getValue(a.style,mxConstants.STYLE_HORIZONTAL,1)?new mxPoint(b.getCenterX(),b.y+Math.max(0,Math.min(b.height,c))):new mxPoint(b.x+Math.max(0,Math.min(b.width,c)),b.getCenterY())},function(b,c){a.style[mxConstants.STYLE_STARTSIZE]=1==mxUtils.getValue(this.state.style,mxConstants.STYLE_HORIZONTAL,1)?Math.round(Math.max(0,
-Math.min(b.height,c.y-b.y))):Math.round(Math.max(0,Math.min(b.width,c.x-b.x)))})];if(mxUtils.getValue(a.style,mxConstants.STYLE_ROUNDED)){var c=parseFloat(mxUtils.getValue(a.style,mxConstants.STYLE_STARTSIZE,mxConstants.DEFAULT_STARTSIZE));b.push(fa(a,c/2))}return b},label:sa(),ext:sa(),rectangle:sa(),triangle:sa(),rhombus:sa(),umlLifeline:function(a){return[L(a,["size"],function(a){var b=Math.max(0,Math.min(a.height,parseFloat(mxUtils.getValue(this.state.style,"size",F.prototype.size))));return new mxPoint(a.getCenterX(),
-a.y+b)},function(a,b){this.state.style.size=Math.round(Math.max(0,Math.min(a.height,b.y-a.y)))},!1)]},umlFrame:function(a){return[L(a,["width","height"],function(a){var b=Math.max(E.prototype.corner,Math.min(a.width,mxUtils.getValue(this.state.style,"width",E.prototype.width))),c=Math.max(1.5*E.prototype.corner,Math.min(a.height,mxUtils.getValue(this.state.style,"height",E.prototype.height)));return new mxPoint(a.x+b,a.y+c)},function(a,b){this.state.style.width=Math.round(Math.max(E.prototype.corner,
-Math.min(a.width,b.x-a.x)));this.state.style.height=Math.round(Math.max(1.5*E.prototype.corner,Math.min(a.height,b.y-a.y)))},!1)]},process:function(a){var b=[L(a,["size"],function(a){var b=Math.max(0,Math.min(.5,parseFloat(mxUtils.getValue(this.state.style,"size",t.prototype.size))));return new mxPoint(a.x+a.width*b,a.y+a.height/4)},function(a,b){this.state.style.size=Math.max(0,Math.min(.5,(b.x-a.x)/a.width))})];mxUtils.getValue(a.style,mxConstants.STYLE_ROUNDED,!1)&&b.push(fa(a));return b},cross:function(a){return[L(a,
-["size"],function(a){var b=Math.min(a.width,a.height),b=Math.max(0,Math.min(1,mxUtils.getValue(this.state.style,"size",pa.prototype.size)))*b/2;return new mxPoint(a.getCenterX()-b,a.getCenterY()-b)},function(a,b){var c=Math.min(a.width,a.height);this.state.style.size=Math.max(0,Math.min(1,Math.min(Math.max(0,a.getCenterY()-b.y)/c*2,Math.max(0,a.getCenterX()-b.x)/c*2)))})]},note:function(a){return[L(a,["size"],function(a){var b=Math.max(0,Math.min(a.width,Math.min(a.height,parseFloat(mxUtils.getValue(this.state.style,
-"size",e.prototype.size)))));return new mxPoint(a.x+a.width-b,a.y+b)},function(a,b){this.state.style.size=Math.round(Math.max(0,Math.min(Math.min(a.width,a.x+a.width-b.x),Math.min(a.height,b.y-a.y))))})]},manualInput:function(a){var b=[L(a,["size"],function(a){var b=Math.max(0,Math.min(a.height,mxUtils.getValue(this.state.style,"size",z.prototype.size)));return new mxPoint(a.x+a.width/4,a.y+3*b/4)},function(a,b){this.state.style.size=Math.round(Math.max(0,Math.min(a.height,4*(b.y-a.y)/3)))})];mxUtils.getValue(a.style,
-mxConstants.STYLE_ROUNDED,!1)&&b.push(fa(a));return b},dataStorage:function(a){return[L(a,["size"],function(a){var b=Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.state.style,"size",aa.prototype.size))));return new mxPoint(a.x+(1-b)*a.width,a.getCenterY())},function(a,b){this.state.style.size=Math.max(0,Math.min(1,(a.x+a.width-b.x)/a.width))})]},callout:function(a){var b=[L(a,["size","position"],function(a){var b=Math.max(0,Math.min(a.height,mxUtils.getValue(this.state.style,"size",u.prototype.size))),
-c=Math.max(0,Math.min(1,mxUtils.getValue(this.state.style,"position",u.prototype.position)));mxUtils.getValue(this.state.style,"base",u.prototype.base);return new mxPoint(a.x+c*a.width,a.y+a.height-b)},function(a,b){mxUtils.getValue(this.state.style,"base",u.prototype.base);this.state.style.size=Math.round(Math.max(0,Math.min(a.height,a.y+a.height-b.y)));this.state.style.position=Math.round(100*Math.max(0,Math.min(1,(b.x-a.x)/a.width)))/100}),L(a,["position2"],function(a){var b=Math.max(0,Math.min(1,
-mxUtils.getValue(this.state.style,"position2",u.prototype.position2)));return new mxPoint(a.x+b*a.width,a.y+a.height)},function(a,b){this.state.style.position2=Math.round(100*Math.max(0,Math.min(1,(b.x-a.x)/a.width)))/100}),L(a,["base"],function(a){var b=Math.max(0,Math.min(a.height,mxUtils.getValue(this.state.style,"size",u.prototype.size))),c=Math.max(0,Math.min(1,mxUtils.getValue(this.state.style,"position",u.prototype.position))),d=Math.max(0,Math.min(a.width,mxUtils.getValue(this.state.style,
-"base",u.prototype.base)));return new mxPoint(a.x+Math.min(a.width,c*a.width+d),a.y+a.height-b)},function(a,b){var c=Math.max(0,Math.min(1,mxUtils.getValue(this.state.style,"position",u.prototype.position)));this.state.style.base=Math.round(Math.max(0,Math.min(a.width,b.x-a.x-c*a.width)))})];mxUtils.getValue(a.style,mxConstants.STYLE_ROUNDED,!1)&&b.push(fa(a));return b},internalStorage:function(a){var b=[L(a,["dx","dy"],function(a){var b=Math.max(0,Math.min(a.width,mxUtils.getValue(this.state.style,
-"dx",P.prototype.dx))),c=Math.max(0,Math.min(a.height,mxUtils.getValue(this.state.style,"dy",P.prototype.dy)));return new mxPoint(a.x+b,a.y+c)},function(a,b){this.state.style.dx=Math.round(Math.max(0,Math.min(a.width,b.x-a.x)));this.state.style.dy=Math.round(Math.max(0,Math.min(a.height,b.y-a.y)))})];mxUtils.getValue(a.style,mxConstants.STYLE_ROUNDED,!1)&&b.push(fa(a));return b},corner:function(a){return[L(a,["dx","dy"],function(a){var b=Math.max(0,Math.min(a.width,mxUtils.getValue(this.state.style,
-"dx",V.prototype.dx))),c=Math.max(0,Math.min(a.height,mxUtils.getValue(this.state.style,"dy",V.prototype.dy)));return new mxPoint(a.x+b,a.y+c)},function(a,b){this.state.style.dx=Math.round(Math.max(0,Math.min(a.width,b.x-a.x)));this.state.style.dy=Math.round(Math.max(0,Math.min(a.height,b.y-a.y)))})]},tee:function(a){return[L(a,["dx","dy"],function(a){var b=Math.max(0,Math.min(a.width,mxUtils.getValue(this.state.style,"dx",S.prototype.dx))),c=Math.max(0,Math.min(a.height,mxUtils.getValue(this.state.style,
-"dy",S.prototype.dy)));return new mxPoint(a.x+(a.width+b)/2,a.y+c)},function(a,b){this.state.style.dx=Math.round(Math.max(0,2*Math.min(a.width/2,b.x-a.x-a.width/2)));this.state.style.dy=Math.round(Math.max(0,Math.min(a.height,b.y-a.y)))})]},singleArrow:ha(1),doubleArrow:ha(.5),folder:function(a){return[L(a,["tabWidth","tabHeight"],function(a){var b=Math.max(0,Math.min(a.width,mxUtils.getValue(this.state.style,"tabWidth",h.prototype.tabWidth))),c=Math.max(0,Math.min(a.height,mxUtils.getValue(this.state.style,
-"tabHeight",h.prototype.tabHeight)));mxUtils.getValue(this.state.style,"tabPosition",h.prototype.tabPosition)==mxConstants.ALIGN_RIGHT&&(b=a.width-b);return new mxPoint(a.x+b,a.y+c)},function(a,b){var c=Math.max(0,Math.min(a.width,b.x-a.x));mxUtils.getValue(this.state.style,"tabPosition",h.prototype.tabPosition)==mxConstants.ALIGN_RIGHT&&(c=a.width-c);this.state.style.tabWidth=Math.round(c);this.state.style.tabHeight=Math.round(Math.max(0,Math.min(a.height,b.y-a.y)))})]},document:function(a){return[L(a,
-["size"],function(a){var b=Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.state.style,"size",l.prototype.size))));return new mxPoint(a.x+3*a.width/4,a.y+(1-b)*a.height)},function(a,b){this.state.style.size=Math.max(0,Math.min(1,(a.y+a.height-b.y)/a.height))})]},tape:function(a){return[L(a,["size"],function(a){var b=Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.state.style,"size",k.prototype.size))));return new mxPoint(a.getCenterX(),a.y+b*a.height/2)},function(a,b){this.state.style.size=
-Math.max(0,Math.min(1,(b.y-a.y)/a.height*2))})]},offPageConnector:function(a){return[L(a,["size"],function(a){var b=Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.state.style,"size",X.prototype.size))));return new mxPoint(a.getCenterX(),a.y+(1-b)*a.height)},function(a,b){this.state.style.size=Math.max(0,Math.min(1,(a.y+a.height-b.y)/a.height))})]},step:ua(w.prototype.size,!0,null,!0),hexagon:ua(v.prototype.size,!0,.5,!0),curlyBracket:ua(p.prototype.size,!1),display:ua(qa.prototype.size,!1),
-cube:za(1,a.prototype.size,!1),card:za(.5,g.prototype.size,!0),loopLimit:za(.5,W.prototype.size,!0),trapezoid:Ea(.5),parallelogram:Ea(1)};Graph.createHandle=L;Graph.handleFactory=Aa;mxVertexHandler.prototype.createCustomHandles=function(){if(1==this.state.view.graph.getSelectionCount()&&this.graph.isCellRotatable(this.state.cell)){var a=this.state.style.shape;null==this.state.view.graph.cellRenderer.defaultShapes[a]&&null==mxStencilRegistry.getStencil(a)&&(a=mxConstants.SHAPE_RECTANGLE);a=Aa[a];if(null!=
-a)return a(this.state)}return null};mxEdgeHandler.prototype.createCustomHandles=function(){if(1==this.state.view.graph.getSelectionCount()){var a=this.state.style.shape;null==this.state.view.graph.cellRenderer.defaultShapes[a]&&null==mxStencilRegistry.getStencil(a)&&(a=mxConstants.SHAPE_CONNECTOR);a=Aa[a];if(null!=a)return a(this.state)}return null}}else Graph.createHandle=function(){},Graph.handleFactory={};var va=new mxPoint(1,0),wa=new mxPoint(1,0),ha=mxUtils.toRadians(-30),va=mxUtils.getRotatedPoint(va,
-Math.cos(ha),Math.sin(ha)),ha=mxUtils.toRadians(-150),wa=mxUtils.getRotatedPoint(wa,Math.cos(ha),Math.sin(ha));mxEdgeStyle.IsometricConnector=function(a,b,c,d,e){var f=a.view;d=null!=d&&0<d.length?d[0]:null;var g=a.absolutePoints,h=g[0],g=g[g.length-1];null!=d&&(d=f.transformControlPoint(a,d));null==h&&null!=b&&(h=new mxPoint(b.getCenterX(),b.getCenterY()));null==g&&null!=c&&(g=new mxPoint(c.getCenterX(),c.getCenterY()));var k=va.x,l=va.y,m=wa.x,n=wa.y,p="horizontal"==mxUtils.getValue(a.style,"elbow",
-"horizontal");if(null!=g&&null!=h){a=function(a,b,c){a-=q.x;var d=b-q.y;b=(n*a-m*d)/(k*n-l*m);a=(l*a-k*d)/(l*m-k*n);p?(c&&(q=new mxPoint(q.x+k*b,q.y+l*b),e.push(q)),q=new mxPoint(q.x+m*a,q.y+n*a)):(c&&(q=new mxPoint(q.x+m*a,q.y+n*a),e.push(q)),q=new mxPoint(q.x+k*b,q.y+l*b));e.push(q)};var q=h;null==d&&(d=new mxPoint(h.x+(g.x-h.x)/2,h.y+(g.y-h.y)/2));a(d.x,d.y,!0);a(g.x,g.y,!1)}};mxStyleRegistry.putValue("isometricEdgeStyle",mxEdgeStyle.IsometricConnector);var Ja=Graph.prototype.createEdgeHandler;
-Graph.prototype.createEdgeHandler=function(a,b){if(b==mxEdgeStyle.IsometricConnector){var c=new mxElbowEdgeHandler(a);c.snapToTerminals=!1;return c}return Ja.apply(this,arguments)};c.prototype.constraints=[];d.prototype.constraints=[];u.prototype.constraints=[];mxRectangleShape.prototype.constraints=[new mxConnectionConstraint(new mxPoint(.25,0),!0),new mxConnectionConstraint(new mxPoint(.5,0),!0),new mxConnectionConstraint(new mxPoint(.75,0),!0),new mxConnectionConstraint(new mxPoint(0,.25),!0),
-new mxConnectionConstraint(new mxPoint(0,.5),!0),new mxConnectionConstraint(new mxPoint(0,.75),!0),new mxConnectionConstraint(new mxPoint(1,.25),!0),new mxConnectionConstraint(new mxPoint(1,.5),!0),new mxConnectionConstraint(new mxPoint(1,.75),!0),new mxConnectionConstraint(new mxPoint(.25,1),!0),new mxConnectionConstraint(new mxPoint(.5,1),!0),new mxConnectionConstraint(new mxPoint(.75,1),!0)];mxEllipse.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,0),!0),new mxConnectionConstraint(new mxPoint(1,
-0),!0),new mxConnectionConstraint(new mxPoint(0,1),!0),new mxConnectionConstraint(new mxPoint(1,1),!0),new mxConnectionConstraint(new mxPoint(.5,0),!0),new mxConnectionConstraint(new mxPoint(.5,1),!0),new mxConnectionConstraint(new mxPoint(0,.5),!0),new mxConnectionConstraint(new mxPoint(1,.5))];mxLabel.prototype.constraints=mxRectangleShape.prototype.constraints;mxImageShape.prototype.constraints=mxRectangleShape.prototype.constraints;mxSwimlane.prototype.constraints=mxRectangleShape.prototype.constraints;
-A.prototype.constraints=mxRectangleShape.prototype.constraints;e.prototype.constraints=mxRectangleShape.prototype.constraints;g.prototype.constraints=mxRectangleShape.prototype.constraints;a.prototype.constraints=mxRectangleShape.prototype.constraints;h.prototype.constraints=mxRectangleShape.prototype.constraints;P.prototype.constraints=mxRectangleShape.prototype.constraints;aa.prototype.constraints=mxRectangleShape.prototype.constraints;ba.prototype.constraints=mxEllipse.prototype.constraints;ca.prototype.constraints=
-mxEllipse.prototype.constraints;da.prototype.constraints=mxEllipse.prototype.constraints;R.prototype.constraints=mxEllipse.prototype.constraints;z.prototype.constraints=mxRectangleShape.prototype.constraints;ta.prototype.constraints=mxRectangleShape.prototype.constraints;qa.prototype.constraints=mxRectangleShape.prototype.constraints;W.prototype.constraints=mxRectangleShape.prototype.constraints;X.prototype.constraints=mxRectangleShape.prototype.constraints;mxCylinder.prototype.constraints=[new mxConnectionConstraint(new mxPoint(.15,
-.05),!1),new mxConnectionConstraint(new mxPoint(.5,0),!0),new mxConnectionConstraint(new mxPoint(.85,.05),!1),new mxConnectionConstraint(new mxPoint(0,.3),!0),new mxConnectionConstraint(new mxPoint(0,.5),!0),new mxConnectionConstraint(new mxPoint(0,.7),!0),new mxConnectionConstraint(new mxPoint(1,.3),!0),new mxConnectionConstraint(new mxPoint(1,.5),!0),new mxConnectionConstraint(new mxPoint(1,.7),!0),new mxConnectionConstraint(new mxPoint(.15,.95),!1),new mxConnectionConstraint(new mxPoint(.5,1),
-!0),new mxConnectionConstraint(new mxPoint(.85,.95),!1)];B.prototype.constraints=[new mxConnectionConstraint(new mxPoint(.25,.1),!1),new mxConnectionConstraint(new mxPoint(.5,0),!1),new mxConnectionConstraint(new mxPoint(.75,.1),!1),new mxConnectionConstraint(new mxPoint(0,1/3),!1),new mxConnectionConstraint(new mxPoint(0,1),!1),new mxConnectionConstraint(new mxPoint(1,1/3),!1),new mxConnectionConstraint(new mxPoint(1,1),!1),new mxConnectionConstraint(new mxPoint(.5,.5),!1)];Q.prototype.constraints=
-[new mxConnectionConstraint(new mxPoint(.25,0),!0),new mxConnectionConstraint(new mxPoint(.5,0),!0),new mxConnectionConstraint(new mxPoint(.75,0),!0),new mxConnectionConstraint(new mxPoint(0,.3),!0),new mxConnectionConstraint(new mxPoint(0,.7),!0),new mxConnectionConstraint(new mxPoint(1,.25),!0),new mxConnectionConstraint(new mxPoint(1,.5),!0),new mxConnectionConstraint(new mxPoint(1,.75),!0),new mxConnectionConstraint(new mxPoint(.25,1),!0),new mxConnectionConstraint(new mxPoint(.5,1),!0),new mxConnectionConstraint(new mxPoint(.75,
-1),!0)];mxActor.prototype.constraints=[new mxConnectionConstraint(new mxPoint(.5,0),!0),new mxConnectionConstraint(new mxPoint(.25,.2),!1),new mxConnectionConstraint(new mxPoint(.1,.5),!1),new mxConnectionConstraint(new mxPoint(0,.75),!0),new mxConnectionConstraint(new mxPoint(.75,.25),!1),new mxConnectionConstraint(new mxPoint(.9,.5),!1),new mxConnectionConstraint(new mxPoint(1,.75),!0),new mxConnectionConstraint(new mxPoint(.25,1),!0),new mxConnectionConstraint(new mxPoint(.5,1),!0),new mxConnectionConstraint(new mxPoint(.75,
-1),!0)];f.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,0),!1),new mxConnectionConstraint(new mxPoint(.5,.25),!1),new mxConnectionConstraint(new mxPoint(1,0),!1),new mxConnectionConstraint(new mxPoint(.25,.5),!1),new mxConnectionConstraint(new mxPoint(.75,.5),!1),new mxConnectionConstraint(new mxPoint(0,1),!1),new mxConnectionConstraint(new mxPoint(.5,.75),!1),new mxConnectionConstraint(new mxPoint(1,1),!1)];k.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,.35),
-!1),new mxConnectionConstraint(new mxPoint(0,.5),!1),new mxConnectionConstraint(new mxPoint(0,.65),!1),new mxConnectionConstraint(new mxPoint(1,.35),!1),new mxConnectionConstraint(new mxPoint(1,.5),!1),new mxConnectionConstraint(new mxPoint(1,.65),!1),new mxConnectionConstraint(new mxPoint(.25,1),!1),new mxConnectionConstraint(new mxPoint(.75,0),!1)];w.prototype.constraints=[new mxConnectionConstraint(new mxPoint(.25,0),!0),new mxConnectionConstraint(new mxPoint(.5,0),!0),new mxConnectionConstraint(new mxPoint(.75,
-0),!0),new mxConnectionConstraint(new mxPoint(.25,1),!0),new mxConnectionConstraint(new mxPoint(.5,1),!0),new mxConnectionConstraint(new mxPoint(.75,1),!0),new mxConnectionConstraint(new mxPoint(.1,.25),!0),new mxConnectionConstraint(new mxPoint(.2,.5),!0),new mxConnectionConstraint(new mxPoint(.1,.75),!0),new mxConnectionConstraint(new mxPoint(.9,.25),!0),new mxConnectionConstraint(new mxPoint(1,.5),!0),new mxConnectionConstraint(new mxPoint(.9,.75),!0)];mxLine.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,
-.5),!1),new mxConnectionConstraint(new mxPoint(.25,.5),!1),new mxConnectionConstraint(new mxPoint(.75,.5),!1),new mxConnectionConstraint(new mxPoint(1,.5),!1)];N.prototype.constraints=[new mxConnectionConstraint(new mxPoint(.5,0),!1),new mxConnectionConstraint(new mxPoint(.5,1),!1)];mxDoubleEllipse.prototype.constraints=mxEllipse.prototype.constraints;mxRhombus.prototype.constraints=mxEllipse.prototype.constraints;mxTriangle.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,.25),!0),
-new mxConnectionConstraint(new mxPoint(0,.5),!0),new mxConnectionConstraint(new mxPoint(0,.75),!0),new mxConnectionConstraint(new mxPoint(.5,0),!0),new mxConnectionConstraint(new mxPoint(.5,1),!0),new mxConnectionConstraint(new mxPoint(1,.5),!0)];mxHexagon.prototype.constraints=[new mxConnectionConstraint(new mxPoint(.375,0),!0),new mxConnectionConstraint(new mxPoint(.5,0),!0),new mxConnectionConstraint(new mxPoint(.625,0),!0),new mxConnectionConstraint(new mxPoint(.125,.25),!0),new mxConnectionConstraint(new mxPoint(0,
-.5),!0),new mxConnectionConstraint(new mxPoint(.125,.75),!0),new mxConnectionConstraint(new mxPoint(.875,.25),!0),new mxConnectionConstraint(new mxPoint(0,.5),!0),new mxConnectionConstraint(new mxPoint(1,.5),!0),new mxConnectionConstraint(new mxPoint(.875,.75),!0),new mxConnectionConstraint(new mxPoint(.375,1),!0),new mxConnectionConstraint(new mxPoint(.5,1),!0),new mxConnectionConstraint(new mxPoint(.625,1),!0)];mxCloud.prototype.constraints=[new mxConnectionConstraint(new mxPoint(.25,.25),!1),new mxConnectionConstraint(new mxPoint(.4,
-.1),!1),new mxConnectionConstraint(new mxPoint(.16,.55),!1),new mxConnectionConstraint(new mxPoint(.07,.4),!1),new mxConnectionConstraint(new mxPoint(.31,.8),!1),new mxConnectionConstraint(new mxPoint(.13,.77),!1),new mxConnectionConstraint(new mxPoint(.8,.8),!1),new mxConnectionConstraint(new mxPoint(.55,.95),!1),new mxConnectionConstraint(new mxPoint(.875,.5),!1),new mxConnectionConstraint(new mxPoint(.96,.7),!1),new mxConnectionConstraint(new mxPoint(.625,.2),!1),new mxConnectionConstraint(new mxPoint(.88,
-.25),!1)];m.prototype.constraints=mxRectangleShape.prototype.constraints;n.prototype.constraints=mxRectangleShape.prototype.constraints;l.prototype.constraints=[new mxConnectionConstraint(new mxPoint(.25,0),!0),new mxConnectionConstraint(new mxPoint(.5,0),!0),new mxConnectionConstraint(new mxPoint(.75,0),!0),new mxConnectionConstraint(new mxPoint(0,.25),!0),new mxConnectionConstraint(new mxPoint(0,.5),!0),new mxConnectionConstraint(new mxPoint(0,.75),!0),new mxConnectionConstraint(new mxPoint(1,.25),
-!0),new mxConnectionConstraint(new mxPoint(1,.5),!0),new mxConnectionConstraint(new mxPoint(1,.75),!0)];mxArrow.prototype.constraints=null;S.prototype.constraints=null;V.prototype.constraints=null;Z.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,0),!1),new mxConnectionConstraint(new mxPoint(0,.5),!1),new mxConnectionConstraint(new mxPoint(0,1),!1),new mxConnectionConstraint(new mxPoint(.25,.5),!1),new mxConnectionConstraint(new mxPoint(.5,.5),!1),new mxConnectionConstraint(new mxPoint(.75,
-.5),!1),new mxConnectionConstraint(new mxPoint(1,0),!1),new mxConnectionConstraint(new mxPoint(1,.5),!1),new mxConnectionConstraint(new mxPoint(1,1),!1)];T.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,.5),!1),new mxConnectionConstraint(new mxPoint(1,.5),!1)];ia.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,.5),!1),new mxConnectionConstraint(new mxPoint(1,.5),!1)];pa.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,.5),!1),new mxConnectionConstraint(new mxPoint(1,
-.5),!1),new mxConnectionConstraint(new mxPoint(.5,0),!1),new mxConnectionConstraint(new mxPoint(.5,1),!1)];F.prototype.constraints=null;ja.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,.25),!1),new mxConnectionConstraint(new mxPoint(0,.5),!1),new mxConnectionConstraint(new mxPoint(0,.75),!1),new mxConnectionConstraint(new mxPoint(1,.5),!1),new mxConnectionConstraint(new mxPoint(.7,.1),!1),new mxConnectionConstraint(new mxPoint(.7,.9),!1)];ka.prototype.constraints=[new mxConnectionConstraint(new mxPoint(.175,
-.25),!1),new mxConnectionConstraint(new mxPoint(.25,.5),!1),new mxConnectionConstraint(new mxPoint(.175,.75),!1),new mxConnectionConstraint(new mxPoint(1,.5),!1),new mxConnectionConstraint(new mxPoint(.7,.1),!1),new mxConnectionConstraint(new mxPoint(.7,.9),!1)]})();function Actions(a){this.editorUi=a;this.actions={};this.init()}
+function(a,b,c,d,e){var f=d*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));if(this.isRounded)var g=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,100*mxConstants.RECTANGLE_ROUNDING_FACTOR)/100,f=Math.max(f,Math.min(d*g,e*g));a.begin();a.moveTo(b+f,c);a.lineTo(b+f,c+e);a.moveTo(b+d-f,c);a.lineTo(b+d-f,c+e);a.end();a.stroke();mxRectangleShape.prototype.paintForeground.apply(this,arguments)};mxCellRenderer.prototype.defaultShapes.process=t;mxUtils.extend(w,mxRectangleShape);
+w.prototype.paintBackground=function(a,b,c,d,e){a.setFillColor(mxConstants.NONE);a.rect(b,c,d,e);a.fill()};w.prototype.paintForeground=function(a,b,c,d,e){};mxCellRenderer.prototype.defaultShapes.transparent=w;mxUtils.extend(u,mxHexagon);u.prototype.size=30;u.prototype.position=.5;u.prototype.position2=.5;u.prototype.base=20;u.prototype.getLabelMargins=function(){return new mxRectangle(0,0,0,parseFloat(mxUtils.getValue(this.style,"size",this.size))*this.scale)};u.prototype.redrawPath=function(a,b,
+c,d,e){b=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;c=Math.max(0,Math.min(e,parseFloat(mxUtils.getValue(this.style,"size",this.size))));var f=d*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"position",this.position)))),g=d*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"position2",this.position2)))),h=Math.max(0,Math.min(d,parseFloat(mxUtils.getValue(this.style,"base",this.base))));this.addPoints(a,[new mxPoint(0,0),new mxPoint(d,
+0),new mxPoint(d,e-c),new mxPoint(Math.min(d,f+h),e-c),new mxPoint(g,e),new mxPoint(Math.max(0,f),e-c),new mxPoint(0,e-c)],this.isRounded,b,!0,[4])};mxCellRenderer.prototype.defaultShapes.callout=u;mxUtils.extend(v,mxActor);v.prototype.size=.2;v.prototype.redrawPath=function(a,b,c,d,e){b=d*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));c=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(a,[new mxPoint(0,0),new mxPoint(d-
+b,0),new mxPoint(d,e/2),new mxPoint(d-b,e),new mxPoint(0,e),new mxPoint(b,e/2)],this.isRounded,c,!0);a.end()};mxCellRenderer.prototype.defaultShapes.step=v;mxUtils.extend(A,mxHexagon);A.prototype.size=.25;A.prototype.redrawPath=function(a,b,c,d,e){b=d*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));c=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(a,[new mxPoint(b,0),new mxPoint(d-b,0),new mxPoint(d,.5*e),new mxPoint(d-
+b,e),new mxPoint(b,e),new mxPoint(0,.5*e)],this.isRounded,c,!0)};mxCellRenderer.prototype.defaultShapes.hexagon=A;mxUtils.extend(x,mxRectangleShape);x.prototype.isHtmlAllowed=function(){return!1};x.prototype.paintForeground=function(a,b,c,d,e){var f=Math.min(d/5,e/5)+1;a.begin();a.moveTo(b+d/2,c+f);a.lineTo(b+d/2,c+e-f);a.moveTo(b+f,c+e/2);a.lineTo(b+d-f,c+e/2);a.end();a.stroke();mxRectangleShape.prototype.paintForeground.apply(this,arguments)};mxCellRenderer.prototype.defaultShapes.plus=x;var Da=
+mxRhombus.prototype.paintVertexShape;mxRhombus.prototype.getLabelBounds=function(a){if(1==this.style["double"]){var b=(2*Math.max(2,this.strokewidth+1)+parseFloat(this.style[mxConstants.STYLE_MARGIN]||0))*this.scale;return new mxRectangle(a.x+b,a.y+b,a.width-2*b,a.height-2*b)}return a};mxRhombus.prototype.paintVertexShape=function(a,b,c,d,e){Da.apply(this,arguments);if(!this.outline&&1==this.style["double"]){var f=2*Math.max(2,this.strokewidth+1)+parseFloat(this.style[mxConstants.STYLE_MARGIN]||0);
+b+=f;c+=f;d-=2*f;e-=2*f;0<d&&0<e&&(a.setShadow(!1),Da.apply(this,[a,b,c,d,e]))}};mxUtils.extend(B,mxRectangleShape);B.prototype.isHtmlAllowed=function(){return!1};B.prototype.getLabelBounds=function(a){if(1==this.style["double"]){var b=(Math.max(2,this.strokewidth+1)+parseFloat(this.style[mxConstants.STYLE_MARGIN]||0))*this.scale;return new mxRectangle(a.x+b,a.y+b,a.width-2*b,a.height-2*b)}return a};B.prototype.paintForeground=function(a,b,c,d,e){if(null!=this.style){if(!this.outline&&1==this.style["double"]){var f=
+Math.max(2,this.strokewidth+1)+parseFloat(this.style[mxConstants.STYLE_MARGIN]||0);b+=f;c+=f;d-=2*f;e-=2*f;0<d&&0<e&&mxRectangleShape.prototype.paintBackground.apply(this,arguments)}a.setDashed(!1);var f=0,g;do{g=mxCellRenderer.prototype.defaultShapes[this.style["symbol"+f]];if(null!=g){var h=this.style["symbol"+f+"Align"],k=this.style["symbol"+f+"VerticalAlign"],ga=this.style["symbol"+f+"Width"],l=this.style["symbol"+f+"Height"],m=this.style["symbol"+f+"Spacing"]||0,ya=this.style["symbol"+f+"VSpacing"]||
+m,n=this.style["symbol"+f+"ArcSpacing"];null!=n&&(n*=this.getArcSize(d+this.strokewidth,e+this.strokewidth),m+=n,ya+=n);var n=b,qa=c,n=h==mxConstants.ALIGN_CENTER?n+(d-ga)/2:h==mxConstants.ALIGN_RIGHT?n+(d-ga-m):n+m,qa=k==mxConstants.ALIGN_MIDDLE?qa+(e-l)/2:k==mxConstants.ALIGN_BOTTOM?qa+(e-l-ya):qa+ya;a.save();h=new g;h.style=this.style;g.prototype.paintVertexShape.call(h,a,n,qa,ga,l);a.restore()}f++}while(null!=g)}mxRectangleShape.prototype.paintForeground.apply(this,arguments)};mxCellRenderer.prototype.defaultShapes.ext=
+B;mxUtils.extend(C,mxCylinder);C.prototype.redrawPath=function(a,b,c,d,e,f){f?(a.moveTo(0,0),a.lineTo(d/2,e/2),a.lineTo(d,0),a.end()):(a.moveTo(0,0),a.lineTo(d,0),a.lineTo(d,e),a.lineTo(0,e),a.close())};mxCellRenderer.prototype.defaultShapes.message=C;mxUtils.extend(y,mxShape);y.prototype.paintBackground=function(a,b,c,d,e){a.translate(b,c);a.ellipse(d/4,0,d/2,e/4);a.fillAndStroke();a.begin();a.moveTo(d/2,e/4);a.lineTo(d/2,2*e/3);a.moveTo(d/2,e/3);a.lineTo(0,e/3);a.moveTo(d/2,e/3);a.lineTo(d,e/3);
+a.moveTo(d/2,2*e/3);a.lineTo(0,e);a.moveTo(d/2,2*e/3);a.lineTo(d,e);a.end();a.stroke()};mxCellRenderer.prototype.defaultShapes.umlActor=y;mxUtils.extend(I,mxShape);I.prototype.getLabelMargins=function(a){return new mxRectangle(a.width/6,0,0,0)};I.prototype.paintBackground=function(a,b,c,d,e){a.translate(b,c);a.begin();a.moveTo(0,e/4);a.lineTo(0,3*e/4);a.end();a.stroke();a.begin();a.moveTo(0,e/2);a.lineTo(d/6,e/2);a.end();a.stroke();a.ellipse(d/6,0,5*d/6,e);a.fillAndStroke()};mxCellRenderer.prototype.defaultShapes.umlBoundary=
+I;mxUtils.extend(L,mxEllipse);L.prototype.paintVertexShape=function(a,b,c,d,e){mxEllipse.prototype.paintVertexShape.apply(this,arguments);a.begin();a.moveTo(b+d/8,c+e);a.lineTo(b+7*d/8,c+e);a.end();a.stroke()};mxCellRenderer.prototype.defaultShapes.umlEntity=L;mxUtils.extend(J,mxShape);J.prototype.paintVertexShape=function(a,b,c,d,e){a.translate(b,c);a.begin();a.moveTo(d,0);a.lineTo(0,e);a.moveTo(0,0);a.lineTo(d,e);a.end();a.stroke()};mxCellRenderer.prototype.defaultShapes.umlDestroy=J;mxUtils.extend(G,
+mxShape);G.prototype.getLabelBounds=function(a){return new mxRectangle(a.x,a.y+a.height/8,a.width,7*a.height/8)};G.prototype.paintBackground=function(a,b,c,d,e){a.translate(b,c);a.begin();a.moveTo(3*d/8,e/8*1.1);a.lineTo(5*d/8,0);a.end();a.stroke();a.ellipse(0,e/8,d,7*e/8);a.fillAndStroke()};G.prototype.paintForeground=function(a,b,c,d,e){a.begin();a.moveTo(3*d/8,e/8*1.1);a.lineTo(5*d/8,e/4);a.end();a.stroke()};mxCellRenderer.prototype.defaultShapes.umlControl=G;mxUtils.extend(D,mxRectangleShape);
+D.prototype.size=40;D.prototype.isHtmlAllowed=function(){return!1};D.prototype.getLabelBounds=function(a){var b=Math.max(0,Math.min(a.height,parseFloat(mxUtils.getValue(this.style,"size",this.size))*this.scale));return new mxRectangle(a.x,a.y,a.width,b)};D.prototype.paintBackground=function(a,b,c,d,e){var f=Math.max(0,Math.min(e,parseFloat(mxUtils.getValue(this.style,"size",this.size)))),g=mxUtils.getValue(this.style,"participant");null==g||null==this.state?mxRectangleShape.prototype.paintBackground.call(this,
+a,b,c,d,f):(g=this.state.view.graph.cellRenderer.getShape(g),null!=g&&g!=D&&(g=new g,g.apply(this.state),a.save(),g.paintVertexShape(a,b,c,d,f),a.restore()));f<e&&(a.setDashed(!0),a.begin(),a.moveTo(b+d/2,c+f),a.lineTo(b+d/2,c+e),a.end(),a.stroke())};D.prototype.paintForeground=function(a,b,c,d,e){var f=Math.max(0,Math.min(e,parseFloat(mxUtils.getValue(this.style,"size",this.size))));mxRectangleShape.prototype.paintForeground.call(this,a,b,c,d,Math.min(e,f))};mxCellRenderer.prototype.defaultShapes.umlLifeline=
+D;mxUtils.extend(K,mxShape);K.prototype.width=60;K.prototype.height=30;K.prototype.corner=10;K.prototype.getLabelMargins=function(a){return new mxRectangle(0,0,a.width-parseFloat(mxUtils.getValue(this.style,"width",this.width)*this.scale),a.height-parseFloat(mxUtils.getValue(this.style,"height",this.height)*this.scale))};K.prototype.paintBackground=function(a,b,c,d,e){var f=this.corner,g=Math.min(d,Math.max(f,parseFloat(mxUtils.getValue(this.style,"width",this.width)))),h=Math.min(e,Math.max(1.5*
+f,parseFloat(mxUtils.getValue(this.style,"height",this.height))));a.begin();a.moveTo(b,c);a.lineTo(b+g,c);a.lineTo(b+g,c+Math.max(0,h-1.5*f));a.lineTo(b+Math.max(0,g-f),c+h);a.lineTo(b,c+h);a.close();a.fillAndStroke();a.begin();a.moveTo(b+g,c);a.lineTo(b+d,c);a.lineTo(b+d,c+e);a.lineTo(b,c+e);a.lineTo(b,c+h);a.stroke()};mxCellRenderer.prototype.defaultShapes.umlFrame=K;mxPerimeter.LifelinePerimeter=function(a,b,c,d){d=D.prototype.size;null!=b&&(d=mxUtils.getValue(b.style,"size",d)*b.view.scale);b=
+parseFloat(b.style[mxConstants.STYLE_STROKEWIDTH]||1)*b.view.scale/2-1;c.x<a.getCenterX()&&(b=-1*(b+1));return new mxPoint(a.getCenterX()+b,Math.min(a.y+a.height,Math.max(a.y+d,c.y)))};mxStyleRegistry.putValue("lifelinePerimeter",mxPerimeter.LifelinePerimeter);mxPerimeter.OrthogonalPerimeter=function(a,b,c,d){d=!0;return mxPerimeter.RectanglePerimeter.apply(this,arguments)};mxStyleRegistry.putValue("orthogonalPerimeter",mxPerimeter.OrthogonalPerimeter);mxPerimeter.BackbonePerimeter=function(a,b,c,
+d){d=parseFloat(b.style[mxConstants.STYLE_STROKEWIDTH]||1)*b.view.scale/2-1;null!=b.style.backboneSize&&(d+=parseFloat(b.style.backboneSize)*b.view.scale/2-1);if("south"==b.style[mxConstants.STYLE_DIRECTION]||"north"==b.style[mxConstants.STYLE_DIRECTION])return c.x<a.getCenterX()&&(d=-1*(d+1)),new mxPoint(a.getCenterX()+d,Math.min(a.y+a.height,Math.max(a.y,c.y)));c.y<a.getCenterY()&&(d=-1*(d+1));return new mxPoint(Math.min(a.x+a.width,Math.max(a.x,c.x)),a.getCenterY()+d)};mxStyleRegistry.putValue("backbonePerimeter",
+mxPerimeter.BackbonePerimeter);mxPerimeter.CalloutPerimeter=function(a,b,c,d){return mxPerimeter.RectanglePerimeter(mxUtils.getDirectedBounds(a,new mxRectangle(0,0,0,Math.max(0,Math.min(a.height,parseFloat(mxUtils.getValue(b.style,"size",u.prototype.size))*b.view.scale))),b.style),b,c,d)};mxStyleRegistry.putValue("calloutPerimeter",mxPerimeter.CalloutPerimeter);mxPerimeter.ParallelogramPerimeter=function(a,b,c,d){var e=m.prototype.size;null!=b&&(e=mxUtils.getValue(b.style,"size",e));var f=a.x,g=a.y,
+h=a.width,k=a.height;b=null!=b?mxUtils.getValue(b.style,mxConstants.STYLE_DIRECTION,mxConstants.DIRECTION_EAST):mxConstants.DIRECTION_EAST;b==mxConstants.DIRECTION_NORTH||b==mxConstants.DIRECTION_SOUTH?(e=k*Math.max(0,Math.min(1,e)),g=[new mxPoint(f,g),new mxPoint(f+h,g+e),new mxPoint(f+h,g+k),new mxPoint(f,g+k-e),new mxPoint(f,g)]):(e=h*Math.max(0,Math.min(1,e)),g=[new mxPoint(f+e,g),new mxPoint(f+h,g),new mxPoint(f+h-e,g+k),new mxPoint(f,g+k),new mxPoint(f+e,g)]);k=a.getCenterX();a=a.getCenterY();
+a=new mxPoint(k,a);d&&(c.x<f||c.x>f+h?a.y=c.y:a.x=c.x);return mxUtils.getPerimeterPoint(g,a,c)};mxStyleRegistry.putValue("parallelogramPerimeter",mxPerimeter.ParallelogramPerimeter);mxPerimeter.TrapezoidPerimeter=function(a,b,c,d){var e=n.prototype.size;null!=b&&(e=mxUtils.getValue(b.style,"size",e));var f=a.x,g=a.y,h=a.width,k=a.height;b=null!=b?mxUtils.getValue(b.style,mxConstants.STYLE_DIRECTION,mxConstants.DIRECTION_EAST):mxConstants.DIRECTION_EAST;b==mxConstants.DIRECTION_EAST?(e=h*Math.max(0,
+Math.min(1,e)),g=[new mxPoint(f+e,g),new mxPoint(f+h-e,g),new mxPoint(f+h,g+k),new mxPoint(f,g+k),new mxPoint(f+e,g)]):b==mxConstants.DIRECTION_WEST?(e=h*Math.max(0,Math.min(1,e)),g=[new mxPoint(f,g),new mxPoint(f+h,g),new mxPoint(f+h-e,g+k),new mxPoint(f+e,g+k),new mxPoint(f,g)]):b==mxConstants.DIRECTION_NORTH?(e=k*Math.max(0,Math.min(1,e)),g=[new mxPoint(f,g+e),new mxPoint(f+h,g),new mxPoint(f+h,g+k),new mxPoint(f,g+k-e),new mxPoint(f,g+e)]):(e=k*Math.max(0,Math.min(1,e)),g=[new mxPoint(f,g),new mxPoint(f+
+h,g+e),new mxPoint(f+h,g+k-e),new mxPoint(f,g+k),new mxPoint(f,g)]);k=a.getCenterX();a=a.getCenterY();a=new mxPoint(k,a);d&&(c.x<f||c.x>f+h?a.y=c.y:a.x=c.x);return mxUtils.getPerimeterPoint(g,a,c)};mxStyleRegistry.putValue("trapezoidPerimeter",mxPerimeter.TrapezoidPerimeter);mxPerimeter.StepPerimeter=function(a,b,c,d){var e=v.prototype.size;null!=b&&(e=mxUtils.getValue(b.style,"size",e));var f=a.x,g=a.y,h=a.width,k=a.height,l=a.getCenterX();a=a.getCenterY();b=null!=b?mxUtils.getValue(b.style,mxConstants.STYLE_DIRECTION,
+mxConstants.DIRECTION_EAST):mxConstants.DIRECTION_EAST;b==mxConstants.DIRECTION_EAST?(e=h*Math.max(0,Math.min(1,e)),g=[new mxPoint(f,g),new mxPoint(f+h-e,g),new mxPoint(f+h,a),new mxPoint(f+h-e,g+k),new mxPoint(f,g+k),new mxPoint(f+e,a),new mxPoint(f,g)]):b==mxConstants.DIRECTION_WEST?(e=h*Math.max(0,Math.min(1,e)),g=[new mxPoint(f+e,g),new mxPoint(f+h,g),new mxPoint(f+h-e,a),new mxPoint(f+h,g+k),new mxPoint(f+e,g+k),new mxPoint(f,a),new mxPoint(f+e,g)]):b==mxConstants.DIRECTION_NORTH?(e=k*Math.max(0,
+Math.min(1,e)),g=[new mxPoint(f,g+e),new mxPoint(l,g),new mxPoint(f+h,g+e),new mxPoint(f+h,g+k),new mxPoint(l,g+k-e),new mxPoint(f,g+k),new mxPoint(f,g+e)]):(e=k*Math.max(0,Math.min(1,e)),g=[new mxPoint(f,g),new mxPoint(l,g+e),new mxPoint(f+h,g),new mxPoint(f+h,g+k-e),new mxPoint(l,g+k),new mxPoint(f,g+k-e),new mxPoint(f,g)]);l=new mxPoint(l,a);d&&(c.x<f||c.x>f+h?l.y=c.y:l.x=c.x);return mxUtils.getPerimeterPoint(g,l,c)};mxStyleRegistry.putValue("stepPerimeter",mxPerimeter.StepPerimeter);mxPerimeter.HexagonPerimeter2=
+function(a,b,c,d){var e=A.prototype.size;null!=b&&(e=mxUtils.getValue(b.style,"size",e));var f=a.x,g=a.y,h=a.width,k=a.height,l=a.getCenterX();a=a.getCenterY();b=null!=b?mxUtils.getValue(b.style,mxConstants.STYLE_DIRECTION,mxConstants.DIRECTION_EAST):mxConstants.DIRECTION_EAST;b==mxConstants.DIRECTION_NORTH||b==mxConstants.DIRECTION_SOUTH?(e=k*Math.max(0,Math.min(1,e)),g=[new mxPoint(l,g),new mxPoint(f+h,g+e),new mxPoint(f+h,g+k-e),new mxPoint(l,g+k),new mxPoint(f,g+k-e),new mxPoint(f,g+e),new mxPoint(l,
+g)]):(e=h*Math.max(0,Math.min(1,e)),g=[new mxPoint(f+e,g),new mxPoint(f+h-e,g),new mxPoint(f+h,a),new mxPoint(f+h-e,g+k),new mxPoint(f+e,g+k),new mxPoint(f,a),new mxPoint(f+e,g)]);l=new mxPoint(l,a);d&&(c.x<f||c.x>f+h?l.y=c.y:l.x=c.x);return mxUtils.getPerimeterPoint(g,l,c)};mxStyleRegistry.putValue("hexagonPerimeter2",mxPerimeter.HexagonPerimeter2);mxUtils.extend(N,mxShape);N.prototype.size=10;N.prototype.paintBackground=function(a,b,c,d,e){var f=parseFloat(mxUtils.getValue(this.style,"size",this.size));
+a.translate(b,c);a.ellipse((d-f)/2,0,f,f);a.fillAndStroke();a.begin();a.moveTo(d/2,f);a.lineTo(d/2,e);a.end();a.stroke()};mxCellRenderer.prototype.defaultShapes.lollipop=N;mxUtils.extend(P,mxShape);P.prototype.size=10;P.prototype.inset=2;P.prototype.paintBackground=function(a,b,c,d,e){var f=parseFloat(mxUtils.getValue(this.style,"size",this.size)),g=parseFloat(mxUtils.getValue(this.style,"inset",this.inset))+this.strokewidth;a.translate(b,c);a.begin();a.moveTo(d/2,f+g);a.lineTo(d/2,e);a.end();a.stroke();
+a.begin();a.moveTo((d-f)/2-g,f/2);a.quadTo((d-f)/2-g,f+g,d/2,f+g);a.quadTo((d+f)/2+g,f+g,(d+f)/2+g,f/2);a.end();a.stroke()};mxCellRenderer.prototype.defaultShapes.requires=P;mxUtils.extend(O,mxCylinder);O.prototype.jettyWidth=32;O.prototype.jettyHeight=12;O.prototype.redrawPath=function(a,b,c,d,e,f){var g=parseFloat(mxUtils.getValue(this.style,"jettyWidth",this.jettyWidth));b=parseFloat(mxUtils.getValue(this.style,"jettyHeight",this.jettyHeight));c=g/2;var g=c+g/2,h=.3*e-b/2,k=.7*e-b/2;f?(a.moveTo(c,
+h),a.lineTo(g,h),a.lineTo(g,h+b),a.lineTo(c,h+b),a.moveTo(c,k),a.lineTo(g,k),a.lineTo(g,k+b),a.lineTo(c,k+b)):(a.moveTo(c,0),a.lineTo(d,0),a.lineTo(d,e),a.lineTo(c,e),a.lineTo(c,k+b),a.lineTo(0,k+b),a.lineTo(0,k),a.lineTo(c,k),a.lineTo(c,h+b),a.lineTo(0,h+b),a.lineTo(0,h),a.lineTo(c,h),a.close());a.end()};mxCellRenderer.prototype.defaultShapes.component=O;mxUtils.extend(F,mxDoubleEllipse);F.prototype.outerStroke=!0;F.prototype.paintVertexShape=function(a,b,c,d,e){var f=Math.min(4,Math.min(d/5,e/5));
+0<d&&0<e&&(a.ellipse(b+f,c+f,d-2*f,e-2*f),a.fillAndStroke());a.setShadow(!1);this.outerStroke&&(a.ellipse(b,c,d,e),a.stroke())};mxCellRenderer.prototype.defaultShapes.endState=F;mxUtils.extend(E,F);E.prototype.outerStroke=!1;mxCellRenderer.prototype.defaultShapes.startState=E;mxUtils.extend(H,mxArrowConnector);H.prototype.defaultWidth=4;H.prototype.isOpenEnded=function(){return!0};H.prototype.getEdgeWidth=function(){return mxUtils.getNumber(this.style,"width",this.defaultWidth)+Math.max(0,this.strokewidth-
+1)};H.prototype.isArrowRounded=function(){return this.isRounded};mxCellRenderer.prototype.defaultShapes.link=H;mxUtils.extend(z,mxArrowConnector);z.prototype.defaultWidth=10;z.prototype.defaultArrowWidth=20;z.prototype.getStartArrowWidth=function(){return this.getEdgeWidth()+mxUtils.getNumber(this.style,"startWidth",this.defaultArrowWidth)};z.prototype.getEndArrowWidth=function(){return this.getEdgeWidth()+mxUtils.getNumber(this.style,"endWidth",this.defaultArrowWidth)};z.prototype.getEdgeWidth=function(){return mxUtils.getNumber(this.style,
+"width",this.defaultWidth)+Math.max(0,this.strokewidth-1)};mxCellRenderer.prototype.defaultShapes.flexArrow=z;mxUtils.extend(Q,mxActor);Q.prototype.size=30;Q.prototype.redrawPath=function(a,b,c,d,e){b=Math.min(e,parseFloat(mxUtils.getValue(this.style,"size",this.size)));c=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(a,[new mxPoint(0,e),new mxPoint(0,b),new mxPoint(d,0),new mxPoint(d,e)],this.isRounded,c,!0);a.end()};mxCellRenderer.prototype.defaultShapes.manualInput=
+Q;mxUtils.extend(S,mxRectangleShape);S.prototype.dx=20;S.prototype.dy=20;S.prototype.isHtmlAllowed=function(){return!1};S.prototype.paintForeground=function(a,b,c,d,e){mxRectangleShape.prototype.paintForeground.apply(this,arguments);var f=0;if(this.isRounded)var g=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,100*mxConstants.RECTANGLE_ROUNDING_FACTOR)/100,f=Math.max(f,Math.min(d*g,e*g));g=Math.max(f,Math.min(d,parseFloat(mxUtils.getValue(this.style,"dx",this.dx))));f=Math.max(f,Math.min(e,
+parseFloat(mxUtils.getValue(this.style,"dy",this.dy))));a.begin();a.moveTo(b,c+f);a.lineTo(b+d,c+f);a.end();a.stroke();a.begin();a.moveTo(b+g,c);a.lineTo(b+g,c+e);a.end();a.stroke()};mxCellRenderer.prototype.defaultShapes.internalStorage=S;mxUtils.extend(T,mxActor);T.prototype.dx=20;T.prototype.dy=20;T.prototype.redrawPath=function(a,b,c,d,e){b=Math.max(0,Math.min(d,parseFloat(mxUtils.getValue(this.style,"dx",this.dx))));c=Math.max(0,Math.min(e,parseFloat(mxUtils.getValue(this.style,"dy",this.dy))));
+parseFloat(mxUtils.getValue(this.style,"size",this.size));var f=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(a,[new mxPoint(0,0),new mxPoint(d,0),new mxPoint(d,c),new mxPoint(b,c),new mxPoint(b,e),new mxPoint(0,e)],this.isRounded,f,!0);a.end()};mxCellRenderer.prototype.defaultShapes.corner=T;mxUtils.extend(aa,mxActor);aa.prototype.redrawPath=function(a,b,c,d,e){a.moveTo(0,0);a.lineTo(0,e);a.end();a.moveTo(d,0);a.lineTo(d,e);a.end();a.moveTo(0,e/
+2);a.lineTo(d,e/2);a.end()};mxCellRenderer.prototype.defaultShapes.crossbar=aa;mxUtils.extend(W,mxActor);W.prototype.dx=20;W.prototype.dy=20;W.prototype.redrawPath=function(a,b,c,d,e){b=Math.max(0,Math.min(d,parseFloat(mxUtils.getValue(this.style,"dx",this.dx))));c=Math.max(0,Math.min(e,parseFloat(mxUtils.getValue(this.style,"dy",this.dy))));parseFloat(mxUtils.getValue(this.style,"size",this.size));var f=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(a,
+[new mxPoint(0,0),new mxPoint(d,0),new mxPoint(d,c),new mxPoint((d+b)/2,c),new mxPoint((d+b)/2,e),new mxPoint((d-b)/2,e),new mxPoint((d-b)/2,c),new mxPoint(0,c)],this.isRounded,f,!0);a.end()};mxCellRenderer.prototype.defaultShapes.tee=W;mxUtils.extend(U,mxActor);U.prototype.arrowWidth=.3;U.prototype.arrowSize=.2;U.prototype.redrawPath=function(a,b,c,d,e){var f=e*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"arrowWidth",this.arrowWidth))));b=d*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,
+"arrowSize",this.arrowSize))));c=(e-f)/2;var f=c+f,g=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(a,[new mxPoint(0,c),new mxPoint(d-b,c),new mxPoint(d-b,0),new mxPoint(d,e/2),new mxPoint(d-b,e),new mxPoint(d-b,f),new mxPoint(0,f)],this.isRounded,g,!0);a.end()};mxCellRenderer.prototype.defaultShapes.singleArrow=U;mxUtils.extend(ia,mxActor);ia.prototype.redrawPath=function(a,b,c,d,e){var f=e*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,
+"arrowWidth",U.prototype.arrowWidth))));b=d*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"arrowSize",U.prototype.arrowSize))));c=(e-f)/2;var f=c+f,g=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(a,[new mxPoint(0,e/2),new mxPoint(b,0),new mxPoint(b,c),new mxPoint(d-b,c),new mxPoint(d-b,0),new mxPoint(d,e/2),new mxPoint(d-b,e),new mxPoint(d-b,f),new mxPoint(b,f),new mxPoint(b,e)],this.isRounded,g,!0);a.end()};mxCellRenderer.prototype.defaultShapes.doubleArrow=
+ia;mxUtils.extend(ba,mxActor);ba.prototype.size=.1;ba.prototype.redrawPath=function(a,b,c,d,e){b=d*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));a.moveTo(b,0);a.lineTo(d,0);a.quadTo(d-2*b,e/2,d,e);a.lineTo(b,e);a.quadTo(b-2*b,e/2,b,0);a.close();a.end()};mxCellRenderer.prototype.defaultShapes.dataStorage=ba;mxUtils.extend(ja,mxActor);ja.prototype.redrawPath=function(a,b,c,d,e){a.moveTo(0,0);a.quadTo(d,0,d,e/2);a.quadTo(d,e,0,e);a.close();a.end()};mxCellRenderer.prototype.defaultShapes.or=
+ja;mxUtils.extend(ca,mxActor);ca.prototype.redrawPath=function(a,b,c,d,e){a.moveTo(0,0);a.quadTo(d,0,d,e/2);a.quadTo(d,e,0,e);a.quadTo(d/2,e/2,0,0);a.close();a.end()};mxCellRenderer.prototype.defaultShapes.xor=ca;mxUtils.extend(X,mxActor);X.prototype.size=20;X.prototype.redrawPath=function(a,b,c,d,e){b=Math.min(d/2,Math.min(e,parseFloat(mxUtils.getValue(this.style,"size",this.size))));c=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(a,[new mxPoint(b,
+0),new mxPoint(d-b,0),new mxPoint(d,.8*b),new mxPoint(d,e),new mxPoint(0,e),new mxPoint(0,.8*b)],this.isRounded,c,!0);a.end()};mxCellRenderer.prototype.defaultShapes.loopLimit=X;mxUtils.extend(Y,mxActor);Y.prototype.size=.375;Y.prototype.redrawPath=function(a,b,c,d,e){b=e*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));c=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(a,[new mxPoint(0,0),new mxPoint(d,0),new mxPoint(d,
+e-b),new mxPoint(d/2,e),new mxPoint(0,e-b)],this.isRounded,c,!0);a.end()};mxCellRenderer.prototype.defaultShapes.offPageConnector=Y;mxUtils.extend(da,mxEllipse);da.prototype.paintVertexShape=function(a,b,c,d,e){mxEllipse.prototype.paintVertexShape.apply(this,arguments);a.begin();a.moveTo(b+d/2,c+e);a.lineTo(b+d,c+e);a.end();a.stroke()};mxCellRenderer.prototype.defaultShapes.tapeData=da;mxUtils.extend(ea,mxEllipse);ea.prototype.paintVertexShape=function(a,b,c,d,e){mxEllipse.prototype.paintVertexShape.apply(this,
+arguments);a.setShadow(!1);a.begin();a.moveTo(b,c+e/2);a.lineTo(b+d,c+e/2);a.end();a.stroke();a.begin();a.moveTo(b+d/2,c);a.lineTo(b+d/2,c+e);a.end();a.stroke()};mxCellRenderer.prototype.defaultShapes.orEllipse=ea;mxUtils.extend(Z,mxEllipse);Z.prototype.paintVertexShape=function(a,b,c,d,e){mxEllipse.prototype.paintVertexShape.apply(this,arguments);a.setShadow(!1);a.begin();a.moveTo(b+.145*d,c+.145*e);a.lineTo(b+.855*d,c+.855*e);a.end();a.stroke();a.begin();a.moveTo(b+.855*d,c+.145*e);a.lineTo(b+.145*
+d,c+.855*e);a.end();a.stroke()};mxCellRenderer.prototype.defaultShapes.sumEllipse=Z;mxUtils.extend(na,mxRhombus);na.prototype.paintVertexShape=function(a,b,c,d,e){mxRhombus.prototype.paintVertexShape.apply(this,arguments);a.setShadow(!1);a.begin();a.moveTo(b,c+e/2);a.lineTo(b+d,c+e/2);a.end();a.stroke()};mxCellRenderer.prototype.defaultShapes.sortShape=na;mxUtils.extend(V,mxEllipse);V.prototype.paintVertexShape=function(a,b,c,d,e){a.begin();a.moveTo(b,c);a.lineTo(b+d,c);a.lineTo(b+d/2,c+e/2);a.close();
+a.fillAndStroke();a.begin();a.moveTo(b,c+e);a.lineTo(b+d,c+e);a.lineTo(b+d/2,c+e/2);a.close();a.fillAndStroke()};mxCellRenderer.prototype.defaultShapes.collate=V;mxUtils.extend(ka,mxEllipse);ka.prototype.paintVertexShape=function(a,b,c,d,e){var f=c+e-5;a.begin();a.moveTo(b,c);a.lineTo(b,c+e);a.moveTo(b,f);a.lineTo(b+10,f-5);a.moveTo(b,f);a.lineTo(b+10,f+5);a.moveTo(b,f);a.lineTo(b+d,f);a.moveTo(b+d,c);a.lineTo(b+d,c+e);a.moveTo(b+d,f);a.lineTo(b+d-10,f-5);a.moveTo(b+d,f);a.lineTo(b+d-10,f+5);a.end();
+a.stroke()};mxCellRenderer.prototype.defaultShapes.dimension=ka;mxUtils.extend(R,mxEllipse);R.prototype.paintVertexShape=function(a,b,c,d,e){this.outline||a.setStrokeColor(null);mxRectangleShape.prototype.paintBackground.apply(this,arguments);null!=this.style&&(a.setStrokeColor(this.stroke),a.rect(b,c,d,e),a.fill(),a.begin(),a.moveTo(b,c),"1"==mxUtils.getValue(this.style,"top","1")?a.lineTo(b+d,c):a.moveTo(b+d,c),"1"==mxUtils.getValue(this.style,"right","1")?a.lineTo(b+d,c+e):a.moveTo(b+d,c+e),"1"==
+mxUtils.getValue(this.style,"bottom","1")?a.lineTo(b,c+e):a.moveTo(b,c+e),"1"==mxUtils.getValue(this.style,"left","1")&&a.lineTo(b,c-this.strokewidth/2),a.end(),a.stroke())};mxCellRenderer.prototype.defaultShapes.partialRectangle=R;mxUtils.extend(ta,mxEllipse);ta.prototype.paintVertexShape=function(a,b,c,d,e){mxEllipse.prototype.paintVertexShape.apply(this,arguments);a.setShadow(!1);a.begin();"vertical"==mxUtils.getValue(this.style,"line")?(a.moveTo(b+d/2,c),a.lineTo(b+d/2,c+e)):(a.moveTo(b,c+e/2),
+a.lineTo(b+d,c+e/2));a.end();a.stroke()};mxCellRenderer.prototype.defaultShapes.lineEllipse=ta;mxUtils.extend(ua,mxActor);ua.prototype.redrawPath=function(a,b,c,d,e){b=Math.min(d,e/2);a.moveTo(0,0);a.lineTo(d-b,0);a.quadTo(d,0,d,e/2);a.quadTo(d,e,d-b,e);a.lineTo(0,e);a.close();a.end()};mxCellRenderer.prototype.defaultShapes.delay=ua;mxUtils.extend(oa,mxActor);oa.prototype.size=.2;oa.prototype.redrawPath=function(a,b,c,d,e){b=Math.min(e,d);var f=Math.max(0,Math.min(b,b*parseFloat(mxUtils.getValue(this.style,
+"size",this.size))));b=(e-f)/2;c=b+f;var g=(d-f)/2,f=g+f;a.moveTo(0,b);a.lineTo(g,b);a.lineTo(g,0);a.lineTo(f,0);a.lineTo(f,b);a.lineTo(d,b);a.lineTo(d,c);a.lineTo(f,c);a.lineTo(f,e);a.lineTo(g,e);a.lineTo(g,c);a.lineTo(0,c);a.close();a.end()};mxCellRenderer.prototype.defaultShapes.cross=oa;mxUtils.extend(pa,mxActor);pa.prototype.size=.25;pa.prototype.redrawPath=function(a,b,c,d,e){b=Math.min(d,e/2);c=Math.min(d-b,Math.max(0,parseFloat(mxUtils.getValue(this.style,"size",this.size)))*d);a.moveTo(0,
+e/2);a.lineTo(c,0);a.lineTo(d-b,0);a.quadTo(d,0,d,e/2);a.quadTo(d,e,d-b,e);a.lineTo(c,e);a.close();a.end()};mxCellRenderer.prototype.defaultShapes.display=pa;mxUtils.extend(la,mxConnector);la.prototype.origPaintEdgeShape=la.prototype.paintEdgeShape;la.prototype.paintEdgeShape=function(a,b,c){var d=a.state.dashed,e=a.state.fixDash;la.prototype.origPaintEdgeShape.apply(this,arguments);if(3<=a.state.strokeWidth){var f=mxUtils.getValue(this.style,"fillColor",null);null!=f&&(a.setStrokeColor(f),a.setStrokeWidth(a.state.strokeWidth-
+2),a.setDashed(d,e),la.prototype.origPaintEdgeShape.apply(this,arguments))}};mxCellRenderer.prototype.defaultShapes.filledEdge=la;mxMarker.addMarker("dash",function(a,b,c,d,e,f,g,h,k,l){var m=e*(g+k+1),n=f*(g+k+1);return function(){a.begin();a.moveTo(d.x-m/2-n/2,d.y-n/2+m/2);a.lineTo(d.x+n/2-3*m/2,d.y-3*n/2-m/2);a.stroke()}});mxMarker.addMarker("cross",function(a,b,c,d,e,f,g,h,k,l){var m=e*(g+k+1),n=f*(g+k+1);return function(){a.begin();a.moveTo(d.x-m/2-n/2,d.y-n/2+m/2);a.lineTo(d.x+n/2-3*m/2,d.y-
+3*n/2-m/2);a.moveTo(d.x-m/2+n/2,d.y-n/2-m/2);a.lineTo(d.x-n/2-3*m/2,d.y-3*n/2+m/2);a.stroke()}});mxMarker.addMarker("circle",Ca);mxMarker.addMarker("circlePlus",function(a,b,c,d,e,f,g,h,k,l){var m=d.clone(),n=Ca.apply(this,arguments),p=e*(g+2*k),q=f*(g+2*k);return function(){n.apply(this,arguments);a.begin();a.moveTo(m.x-e*k,m.y-f*k);a.lineTo(m.x-2*p+e*k,m.y-2*q+f*k);a.moveTo(m.x-p-q+f*k,m.y-q+p-e*k);a.lineTo(m.x+q-p-f*k,m.y-q-p+e*k);a.stroke()}});mxMarker.addMarker("async",function(a,b,c,d,e,f,g,
+h,k,l){b=e*k*1.118;c=f*k*1.118;e*=g+k;f*=g+k;var m=d.clone();m.x-=b;m.y-=c;d.x+=1*-e-b;d.y+=1*-f-c;return function(){a.begin();a.moveTo(m.x,m.y);h?a.lineTo(m.x-e-f/2,m.y-f+e/2):a.lineTo(m.x+f/2-e,m.y-f-e/2);a.lineTo(m.x-e,m.y-f);a.close();l?a.fillAndStroke():a.stroke()}});mxMarker.addMarker("openAsync",function(a){a=null!=a?a:2;return function(b,c,d,e,f,g,h,k,l,m){f*=h+l;g*=h+l;var n=e.clone();return function(){b.begin();b.moveTo(n.x,n.y);k?b.lineTo(n.x-f-g/a,n.y-g+f/a):b.lineTo(n.x+g/a-f,n.y-g-f/
+a);b.stroke()}}}(2));if("undefined"!==typeof mxVertexHandler){var Ea=function(a,b,c){return ra(a,["width"],b,function(b,d,e,f,g){g=a.shape.getEdgeWidth()*a.view.scale+c;return new mxPoint(f.x+d*b/4+e*g/2,f.y+e*b/4-d*g/2)},function(b,d,e,f,g,h){b=Math.sqrt(mxUtils.ptSegDistSq(f.x,f.y,g.x,g.y,h.x,h.y));a.style.width=Math.round(2*b)/a.view.scale-c})},ra=function(a,b,c,d,e){var f=a.absolutePoints,g=f.length-1,h=a.view.translate,k=a.view.scale,l=c?f[0]:f[g],m=c?f[1]:f[g-1],n=m.x-l.x,p=m.y-l.y,q=Math.sqrt(n*
+n+p*p);return M(a,b,function(a){a=d.call(this,q,n/q,p/q,l,m);return new mxPoint(a.x/k-h.x,a.y/k-h.y)},function(a,b,c){a=Math.sqrt(n*n+p*p);b.x=(b.x+h.x)*k;b.y=(b.y+h.y)*k;e.call(this,a,n/a,p/a,l,m,b,c)})},ha=function(a){return function(b){return[M(b,["arrowWidth","arrowSize"],function(b){var c=Math.max(0,Math.min(1,mxUtils.getValue(this.state.style,"arrowWidth",U.prototype.arrowWidth))),d=Math.max(0,Math.min(a,mxUtils.getValue(this.state.style,"arrowSize",U.prototype.arrowSize)));return new mxPoint(b.x+
+(1-d)*b.width,b.y+(1-c)*b.height/2)},function(b,c){this.state.style.arrowWidth=Math.max(0,Math.min(1,Math.abs(b.y+b.height/2-c.y)/b.height*2));this.state.style.arrowSize=Math.max(0,Math.min(a,(b.x+b.width-c.x)/b.width))})]}},Aa=function(a,b,c){return function(d){var e=[M(d,["size"],function(c){var d=Math.max(0,Math.min(c.width,Math.min(c.height,parseFloat(mxUtils.getValue(this.state.style,"size",b)))))*a;return new mxPoint(c.x+d,c.y+d)},function(b,c){this.state.style.size=Math.round(Math.max(0,Math.min(Math.min(b.width,
+c.x-b.x),Math.min(b.height,c.y-b.y)))/a)})];c&&mxUtils.getValue(d.style,mxConstants.STYLE_ROUNDED,!1)&&e.push(fa(d));return e}},va=function(a,b,c,d){c=null!=c?c:1;return function(e){var f=[M(e,["size"],function(b){var c=parseFloat(mxUtils.getValue(this.state.style,"size",a));return new mxPoint(b.x+c*b.width,b.getCenterY())},function(a,b){this.state.style.size=Math.max(0,Math.min(c,(b.x-a.x)/a.width))},null,d)];b&&mxUtils.getValue(e.style,mxConstants.STYLE_ROUNDED,!1)&&f.push(fa(e));return f}},Fa=
+function(a){return function(b){var c=[M(b,["size"],function(b){var c=Math.max(0,Math.min(a,parseFloat(mxUtils.getValue(this.state.style,"size",n.prototype.size))));return new mxPoint(b.x+c*b.width*.75,b.y+b.height/4)},function(b,c){this.state.style.size=Math.max(0,Math.min(a,(c.x-b.x)/(.75*b.width)))},null,!0)];mxUtils.getValue(b.style,mxConstants.STYLE_ROUNDED,!1)&&c.push(fa(b));return c}},sa=function(){return function(a){var b=[];mxUtils.getValue(a.style,mxConstants.STYLE_ROUNDED,!1)&&b.push(fa(a));
+return b}},fa=function(a,b){return M(a,[mxConstants.STYLE_ARCSIZE],function(c){var d=null!=b?b:c.height/8;if("1"==mxUtils.getValue(a.style,mxConstants.STYLE_ABSOLUTE_ARCSIZE,0)){var e=mxUtils.getValue(a.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;return new mxPoint(c.x+c.width-Math.min(c.width/2,e),c.y+d)}e=Math.max(0,parseFloat(mxUtils.getValue(a.style,mxConstants.STYLE_ARCSIZE,100*mxConstants.RECTANGLE_ROUNDING_FACTOR)))/100;return new mxPoint(c.x+c.width-Math.min(Math.max(c.width/
+2,c.height/2),Math.min(c.width,c.height)*e),c.y+d)},function(b,c,d){"1"==mxUtils.getValue(a.style,mxConstants.STYLE_ABSOLUTE_ARCSIZE,0)?this.state.style[mxConstants.STYLE_ARCSIZE]=Math.round(Math.max(0,Math.min(b.width,2*(b.x+b.width-c.x)))):this.state.style[mxConstants.STYLE_ARCSIZE]=Math.round(Math.min(50,Math.max(0,100*(b.width-c.x+b.x)/Math.min(b.width,b.height))))})},M=function(a,b,c,d,e,f){var g=new mxHandle(a,null,mxVertexHandler.prototype.secondaryHandleImage);g.execute=function(){for(var a=
+0;a<b.length;a++)this.copyStyle(b[a])};g.getPosition=c;g.setPosition=d;g.ignoreGrid=null!=e?e:!0;if(f){var h=g.positionChanged;g.positionChanged=function(){h.apply(this,arguments);a.view.invalidate(this.state.cell);a.view.validate()}}return g},Ba={link:function(a){return[Ea(a,!0,10),Ea(a,!1,10)]},flexArrow:function(a){var b=a.view.graph.gridSize/a.view.scale,c=[];mxUtils.getValue(a.style,mxConstants.STYLE_STARTARROW,mxConstants.NONE)!=mxConstants.NONE&&(c.push(ra(a,["width",mxConstants.STYLE_STARTSIZE,
+mxConstants.STYLE_ENDSIZE],!0,function(b,c,d,e,f){b=(a.shape.getEdgeWidth()-a.shape.strokewidth)*a.view.scale;f=3*mxUtils.getNumber(a.style,mxConstants.STYLE_STARTSIZE,mxConstants.ARROW_SIZE/5)*a.view.scale;return new mxPoint(e.x+c*(f+a.shape.strokewidth*a.view.scale)+d*b/2,e.y+d*(f+a.shape.strokewidth*a.view.scale)-c*b/2)},function(c,d,e,f,g,h,k){c=Math.sqrt(mxUtils.ptSegDistSq(f.x,f.y,g.x,g.y,h.x,h.y));d=mxUtils.ptLineDist(f.x,f.y,f.x+e,f.y-d,h.x,h.y);a.style[mxConstants.STYLE_STARTSIZE]=Math.round(100*
+(d-a.shape.strokewidth)/3)/100/a.view.scale;a.style.width=Math.round(2*c)/a.view.scale;mxEvent.isControlDown(k.getEvent())&&(a.style[mxConstants.STYLE_ENDSIZE]=a.style[mxConstants.STYLE_STARTSIZE]);mxEvent.isAltDown(k.getEvent())||Math.abs(parseFloat(a.style[mxConstants.STYLE_STARTSIZE])-parseFloat(a.style[mxConstants.STYLE_ENDSIZE]))<b/6&&(a.style[mxConstants.STYLE_STARTSIZE]=a.style[mxConstants.STYLE_ENDSIZE])})),c.push(ra(a,["startWidth","endWidth",mxConstants.STYLE_STARTSIZE,mxConstants.STYLE_ENDSIZE],
+!0,function(b,c,d,e,f){b=(a.shape.getStartArrowWidth()-a.shape.strokewidth)*a.view.scale;f=3*mxUtils.getNumber(a.style,mxConstants.STYLE_STARTSIZE,mxConstants.ARROW_SIZE/5)*a.view.scale;return new mxPoint(e.x+c*(f+a.shape.strokewidth*a.view.scale)+d*b/2,e.y+d*(f+a.shape.strokewidth*a.view.scale)-c*b/2)},function(c,d,e,f,g,h,k){c=Math.sqrt(mxUtils.ptSegDistSq(f.x,f.y,g.x,g.y,h.x,h.y));d=mxUtils.ptLineDist(f.x,f.y,f.x+e,f.y-d,h.x,h.y);a.style[mxConstants.STYLE_STARTSIZE]=Math.round(100*(d-a.shape.strokewidth)/
+3)/100/a.view.scale;a.style.startWidth=Math.max(0,Math.round(2*c)-a.shape.getEdgeWidth())/a.view.scale;mxEvent.isControlDown(k.getEvent())&&(a.style[mxConstants.STYLE_ENDSIZE]=a.style[mxConstants.STYLE_STARTSIZE],a.style.endWidth=a.style.startWidth);mxEvent.isAltDown(k.getEvent())||(Math.abs(parseFloat(a.style[mxConstants.STYLE_STARTSIZE])-parseFloat(a.style[mxConstants.STYLE_ENDSIZE]))<b/6&&(a.style[mxConstants.STYLE_STARTSIZE]=a.style[mxConstants.STYLE_ENDSIZE]),Math.abs(parseFloat(a.style.startWidth)-
+parseFloat(a.style.endWidth))<b&&(a.style.startWidth=a.style.endWidth))})));mxUtils.getValue(a.style,mxConstants.STYLE_ENDARROW,mxConstants.NONE)!=mxConstants.NONE&&(c.push(ra(a,["width",mxConstants.STYLE_STARTSIZE,mxConstants.STYLE_ENDSIZE],!1,function(b,c,d,e,f){b=(a.shape.getEdgeWidth()-a.shape.strokewidth)*a.view.scale;f=3*mxUtils.getNumber(a.style,mxConstants.STYLE_ENDSIZE,mxConstants.ARROW_SIZE/5)*a.view.scale;return new mxPoint(e.x+c*(f+a.shape.strokewidth*a.view.scale)-d*b/2,e.y+d*(f+a.shape.strokewidth*
+a.view.scale)+c*b/2)},function(c,d,e,f,g,h,k){c=Math.sqrt(mxUtils.ptSegDistSq(f.x,f.y,g.x,g.y,h.x,h.y));d=mxUtils.ptLineDist(f.x,f.y,f.x+e,f.y-d,h.x,h.y);a.style[mxConstants.STYLE_ENDSIZE]=Math.round(100*(d-a.shape.strokewidth)/3)/100/a.view.scale;a.style.width=Math.round(2*c)/a.view.scale;mxEvent.isControlDown(k.getEvent())&&(a.style[mxConstants.STYLE_STARTSIZE]=a.style[mxConstants.STYLE_ENDSIZE]);mxEvent.isAltDown(k.getEvent())||Math.abs(parseFloat(a.style[mxConstants.STYLE_ENDSIZE])-parseFloat(a.style[mxConstants.STYLE_STARTSIZE]))<
+b/6&&(a.style[mxConstants.STYLE_ENDSIZE]=a.style[mxConstants.STYLE_STARTSIZE])})),c.push(ra(a,["startWidth","endWidth",mxConstants.STYLE_STARTSIZE,mxConstants.STYLE_ENDSIZE],!1,function(b,c,d,e,f){b=(a.shape.getEndArrowWidth()-a.shape.strokewidth)*a.view.scale;f=3*mxUtils.getNumber(a.style,mxConstants.STYLE_ENDSIZE,mxConstants.ARROW_SIZE/5)*a.view.scale;return new mxPoint(e.x+c*(f+a.shape.strokewidth*a.view.scale)-d*b/2,e.y+d*(f+a.shape.strokewidth*a.view.scale)+c*b/2)},function(c,d,e,f,g,h,k){c=
+Math.sqrt(mxUtils.ptSegDistSq(f.x,f.y,g.x,g.y,h.x,h.y));d=mxUtils.ptLineDist(f.x,f.y,f.x+e,f.y-d,h.x,h.y);a.style[mxConstants.STYLE_ENDSIZE]=Math.round(100*(d-a.shape.strokewidth)/3)/100/a.view.scale;a.style.endWidth=Math.max(0,Math.round(2*c)-a.shape.getEdgeWidth())/a.view.scale;mxEvent.isControlDown(k.getEvent())&&(a.style[mxConstants.STYLE_STARTSIZE]=a.style[mxConstants.STYLE_ENDSIZE],a.style.startWidth=a.style.endWidth);mxEvent.isAltDown(k.getEvent())||(Math.abs(parseFloat(a.style[mxConstants.STYLE_ENDSIZE])-
+parseFloat(a.style[mxConstants.STYLE_STARTSIZE]))<b/6&&(a.style[mxConstants.STYLE_ENDSIZE]=a.style[mxConstants.STYLE_STARTSIZE]),Math.abs(parseFloat(a.style.endWidth)-parseFloat(a.style.startWidth))<b&&(a.style.endWidth=a.style.startWidth))})));return c},swimlane:function(a){var b=[M(a,[mxConstants.STYLE_STARTSIZE],function(b){var c=parseFloat(mxUtils.getValue(a.style,mxConstants.STYLE_STARTSIZE,mxConstants.DEFAULT_STARTSIZE));return 1==mxUtils.getValue(a.style,mxConstants.STYLE_HORIZONTAL,1)?new mxPoint(b.getCenterX(),
+b.y+Math.max(0,Math.min(b.height,c))):new mxPoint(b.x+Math.max(0,Math.min(b.width,c)),b.getCenterY())},function(b,c){a.style[mxConstants.STYLE_STARTSIZE]=1==mxUtils.getValue(this.state.style,mxConstants.STYLE_HORIZONTAL,1)?Math.round(Math.max(0,Math.min(b.height,c.y-b.y))):Math.round(Math.max(0,Math.min(b.width,c.x-b.x)))})];if(mxUtils.getValue(a.style,mxConstants.STYLE_ROUNDED)){var c=parseFloat(mxUtils.getValue(a.style,mxConstants.STYLE_STARTSIZE,mxConstants.DEFAULT_STARTSIZE));b.push(fa(a,c/2))}return b},
+label:sa(),ext:sa(),rectangle:sa(),triangle:sa(),rhombus:sa(),umlLifeline:function(a){return[M(a,["size"],function(a){var b=Math.max(0,Math.min(a.height,parseFloat(mxUtils.getValue(this.state.style,"size",D.prototype.size))));return new mxPoint(a.getCenterX(),a.y+b)},function(a,b){this.state.style.size=Math.round(Math.max(0,Math.min(a.height,b.y-a.y)))},!1)]},umlFrame:function(a){return[M(a,["width","height"],function(a){var b=Math.max(K.prototype.corner,Math.min(a.width,mxUtils.getValue(this.state.style,
+"width",K.prototype.width))),c=Math.max(1.5*K.prototype.corner,Math.min(a.height,mxUtils.getValue(this.state.style,"height",K.prototype.height)));return new mxPoint(a.x+b,a.y+c)},function(a,b){this.state.style.width=Math.round(Math.max(K.prototype.corner,Math.min(a.width,b.x-a.x)));this.state.style.height=Math.round(Math.max(1.5*K.prototype.corner,Math.min(a.height,b.y-a.y)))},!1)]},process:function(a){var b=[M(a,["size"],function(a){var b=Math.max(0,Math.min(.5,parseFloat(mxUtils.getValue(this.state.style,
+"size",t.prototype.size))));return new mxPoint(a.x+a.width*b,a.y+a.height/4)},function(a,b){this.state.style.size=Math.max(0,Math.min(.5,(b.x-a.x)/a.width))})];mxUtils.getValue(a.style,mxConstants.STYLE_ROUNDED,!1)&&b.push(fa(a));return b},cross:function(a){return[M(a,["size"],function(a){var b=Math.min(a.width,a.height),b=Math.max(0,Math.min(1,mxUtils.getValue(this.state.style,"size",oa.prototype.size)))*b/2;return new mxPoint(a.getCenterX()-b,a.getCenterY()-b)},function(a,b){var c=Math.min(a.width,
+a.height);this.state.style.size=Math.max(0,Math.min(1,Math.min(Math.max(0,a.getCenterY()-b.y)/c*2,Math.max(0,a.getCenterX()-b.x)/c*2)))})]},note:function(a){return[M(a,["size"],function(a){var b=Math.max(0,Math.min(a.width,Math.min(a.height,parseFloat(mxUtils.getValue(this.state.style,"size",e.prototype.size)))));return new mxPoint(a.x+a.width-b,a.y+b)},function(a,b){this.state.style.size=Math.round(Math.max(0,Math.min(Math.min(a.width,a.x+a.width-b.x),Math.min(a.height,b.y-a.y))))})]},manualInput:function(a){var b=
+[M(a,["size"],function(a){var b=Math.max(0,Math.min(a.height,mxUtils.getValue(this.state.style,"size",Q.prototype.size)));return new mxPoint(a.x+a.width/4,a.y+3*b/4)},function(a,b){this.state.style.size=Math.round(Math.max(0,Math.min(a.height,4*(b.y-a.y)/3)))})];mxUtils.getValue(a.style,mxConstants.STYLE_ROUNDED,!1)&&b.push(fa(a));return b},dataStorage:function(a){return[M(a,["size"],function(a){var b=Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.state.style,"size",ba.prototype.size))));
+return new mxPoint(a.x+(1-b)*a.width,a.getCenterY())},function(a,b){this.state.style.size=Math.max(0,Math.min(1,(a.x+a.width-b.x)/a.width))})]},callout:function(a){var b=[M(a,["size","position"],function(a){var b=Math.max(0,Math.min(a.height,mxUtils.getValue(this.state.style,"size",u.prototype.size))),c=Math.max(0,Math.min(1,mxUtils.getValue(this.state.style,"position",u.prototype.position)));mxUtils.getValue(this.state.style,"base",u.prototype.base);return new mxPoint(a.x+c*a.width,a.y+a.height-
+b)},function(a,b){mxUtils.getValue(this.state.style,"base",u.prototype.base);this.state.style.size=Math.round(Math.max(0,Math.min(a.height,a.y+a.height-b.y)));this.state.style.position=Math.round(100*Math.max(0,Math.min(1,(b.x-a.x)/a.width)))/100}),M(a,["position2"],function(a){var b=Math.max(0,Math.min(1,mxUtils.getValue(this.state.style,"position2",u.prototype.position2)));return new mxPoint(a.x+b*a.width,a.y+a.height)},function(a,b){this.state.style.position2=Math.round(100*Math.max(0,Math.min(1,
+(b.x-a.x)/a.width)))/100}),M(a,["base"],function(a){var b=Math.max(0,Math.min(a.height,mxUtils.getValue(this.state.style,"size",u.prototype.size))),c=Math.max(0,Math.min(1,mxUtils.getValue(this.state.style,"position",u.prototype.position))),d=Math.max(0,Math.min(a.width,mxUtils.getValue(this.state.style,"base",u.prototype.base)));return new mxPoint(a.x+Math.min(a.width,c*a.width+d),a.y+a.height-b)},function(a,b){var c=Math.max(0,Math.min(1,mxUtils.getValue(this.state.style,"position",u.prototype.position)));
+this.state.style.base=Math.round(Math.max(0,Math.min(a.width,b.x-a.x-c*a.width)))})];mxUtils.getValue(a.style,mxConstants.STYLE_ROUNDED,!1)&&b.push(fa(a));return b},internalStorage:function(a){var b=[M(a,["dx","dy"],function(a){var b=Math.max(0,Math.min(a.width,mxUtils.getValue(this.state.style,"dx",S.prototype.dx))),c=Math.max(0,Math.min(a.height,mxUtils.getValue(this.state.style,"dy",S.prototype.dy)));return new mxPoint(a.x+b,a.y+c)},function(a,b){this.state.style.dx=Math.round(Math.max(0,Math.min(a.width,
+b.x-a.x)));this.state.style.dy=Math.round(Math.max(0,Math.min(a.height,b.y-a.y)))})];mxUtils.getValue(a.style,mxConstants.STYLE_ROUNDED,!1)&&b.push(fa(a));return b},corner:function(a){return[M(a,["dx","dy"],function(a){var b=Math.max(0,Math.min(a.width,mxUtils.getValue(this.state.style,"dx",T.prototype.dx))),c=Math.max(0,Math.min(a.height,mxUtils.getValue(this.state.style,"dy",T.prototype.dy)));return new mxPoint(a.x+b,a.y+c)},function(a,b){this.state.style.dx=Math.round(Math.max(0,Math.min(a.width,
+b.x-a.x)));this.state.style.dy=Math.round(Math.max(0,Math.min(a.height,b.y-a.y)))})]},tee:function(a){return[M(a,["dx","dy"],function(a){var b=Math.max(0,Math.min(a.width,mxUtils.getValue(this.state.style,"dx",W.prototype.dx))),c=Math.max(0,Math.min(a.height,mxUtils.getValue(this.state.style,"dy",W.prototype.dy)));return new mxPoint(a.x+(a.width+b)/2,a.y+c)},function(a,b){this.state.style.dx=Math.round(Math.max(0,2*Math.min(a.width/2,b.x-a.x-a.width/2)));this.state.style.dy=Math.round(Math.max(0,
+Math.min(a.height,b.y-a.y)))})]},singleArrow:ha(1),doubleArrow:ha(.5),folder:function(a){return[M(a,["tabWidth","tabHeight"],function(a){var b=Math.max(0,Math.min(a.width,mxUtils.getValue(this.state.style,"tabWidth",h.prototype.tabWidth))),c=Math.max(0,Math.min(a.height,mxUtils.getValue(this.state.style,"tabHeight",h.prototype.tabHeight)));mxUtils.getValue(this.state.style,"tabPosition",h.prototype.tabPosition)==mxConstants.ALIGN_RIGHT&&(b=a.width-b);return new mxPoint(a.x+b,a.y+c)},function(a,b){var c=
+Math.max(0,Math.min(a.width,b.x-a.x));mxUtils.getValue(this.state.style,"tabPosition",h.prototype.tabPosition)==mxConstants.ALIGN_RIGHT&&(c=a.width-c);this.state.style.tabWidth=Math.round(c);this.state.style.tabHeight=Math.round(Math.max(0,Math.min(a.height,b.y-a.y)))})]},document:function(a){return[M(a,["size"],function(a){var b=Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.state.style,"size",l.prototype.size))));return new mxPoint(a.x+3*a.width/4,a.y+(1-b)*a.height)},function(a,b){this.state.style.size=
+Math.max(0,Math.min(1,(a.y+a.height-b.y)/a.height))})]},tape:function(a){return[M(a,["size"],function(a){var b=Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.state.style,"size",k.prototype.size))));return new mxPoint(a.getCenterX(),a.y+b*a.height/2)},function(a,b){this.state.style.size=Math.max(0,Math.min(1,(b.y-a.y)/a.height*2))})]},offPageConnector:function(a){return[M(a,["size"],function(a){var b=Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.state.style,"size",Y.prototype.size))));
+return new mxPoint(a.getCenterX(),a.y+(1-b)*a.height)},function(a,b){this.state.style.size=Math.max(0,Math.min(1,(a.y+a.height-b.y)/a.height))})]},step:va(v.prototype.size,!0,null,!0),hexagon:va(A.prototype.size,!0,.5,!0),curlyBracket:va(p.prototype.size,!1),display:va(pa.prototype.size,!1),cube:Aa(1,a.prototype.size,!1),card:Aa(.5,g.prototype.size,!0),loopLimit:Aa(.5,X.prototype.size,!0),trapezoid:Fa(.5),parallelogram:Fa(1)};Graph.createHandle=M;Graph.handleFactory=Ba;mxVertexHandler.prototype.createCustomHandles=
+function(){if(1==this.state.view.graph.getSelectionCount()&&this.graph.isCellRotatable(this.state.cell)){var a=this.state.style.shape;null==this.state.view.graph.cellRenderer.defaultShapes[a]&&null==mxStencilRegistry.getStencil(a)&&(a=mxConstants.SHAPE_RECTANGLE);a=Ba[a];if(null!=a)return a(this.state)}return null};mxEdgeHandler.prototype.createCustomHandles=function(){if(1==this.state.view.graph.getSelectionCount()){var a=this.state.style.shape;null==this.state.view.graph.cellRenderer.defaultShapes[a]&&
+null==mxStencilRegistry.getStencil(a)&&(a=mxConstants.SHAPE_CONNECTOR);a=Ba[a];if(null!=a)return a(this.state)}return null}}else Graph.createHandle=function(){},Graph.handleFactory={};var wa=new mxPoint(1,0),xa=new mxPoint(1,0),ha=mxUtils.toRadians(-30),wa=mxUtils.getRotatedPoint(wa,Math.cos(ha),Math.sin(ha)),ha=mxUtils.toRadians(-150),xa=mxUtils.getRotatedPoint(xa,Math.cos(ha),Math.sin(ha));mxEdgeStyle.IsometricConnector=function(a,b,c,d,e){var f=a.view;d=null!=d&&0<d.length?d[0]:null;var g=a.absolutePoints,
+h=g[0],g=g[g.length-1];null!=d&&(d=f.transformControlPoint(a,d));null==h&&null!=b&&(h=new mxPoint(b.getCenterX(),b.getCenterY()));null==g&&null!=c&&(g=new mxPoint(c.getCenterX(),c.getCenterY()));var k=wa.x,l=wa.y,m=xa.x,n=xa.y,p="horizontal"==mxUtils.getValue(a.style,"elbow","horizontal");if(null!=g&&null!=h){a=function(a,b,c){a-=q.x;var d=b-q.y;b=(n*a-m*d)/(k*n-l*m);a=(l*a-k*d)/(l*m-k*n);p?(c&&(q=new mxPoint(q.x+k*b,q.y+l*b),e.push(q)),q=new mxPoint(q.x+m*a,q.y+n*a)):(c&&(q=new mxPoint(q.x+m*a,q.y+
+n*a),e.push(q)),q=new mxPoint(q.x+k*b,q.y+l*b));e.push(q)};var q=h;null==d&&(d=new mxPoint(h.x+(g.x-h.x)/2,h.y+(g.y-h.y)/2));a(d.x,d.y,!0);a(g.x,g.y,!1)}};mxStyleRegistry.putValue("isometricEdgeStyle",mxEdgeStyle.IsometricConnector);var Ka=Graph.prototype.createEdgeHandler;Graph.prototype.createEdgeHandler=function(a,b){if(b==mxEdgeStyle.IsometricConnector){var c=new mxElbowEdgeHandler(a);c.snapToTerminals=!1;return c}return Ka.apply(this,arguments)};c.prototype.constraints=[];d.prototype.constraints=
+[];u.prototype.constraints=[];mxRectangleShape.prototype.constraints=[new mxConnectionConstraint(new mxPoint(.25,0),!0),new mxConnectionConstraint(new mxPoint(.5,0),!0),new mxConnectionConstraint(new mxPoint(.75,0),!0),new mxConnectionConstraint(new mxPoint(0,.25),!0),new mxConnectionConstraint(new mxPoint(0,.5),!0),new mxConnectionConstraint(new mxPoint(0,.75),!0),new mxConnectionConstraint(new mxPoint(1,.25),!0),new mxConnectionConstraint(new mxPoint(1,.5),!0),new mxConnectionConstraint(new mxPoint(1,
+.75),!0),new mxConnectionConstraint(new mxPoint(.25,1),!0),new mxConnectionConstraint(new mxPoint(.5,1),!0),new mxConnectionConstraint(new mxPoint(.75,1),!0)];mxEllipse.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,0),!0),new mxConnectionConstraint(new mxPoint(1,0),!0),new mxConnectionConstraint(new mxPoint(0,1),!0),new mxConnectionConstraint(new mxPoint(1,1),!0),new mxConnectionConstraint(new mxPoint(.5,0),!0),new mxConnectionConstraint(new mxPoint(.5,1),!0),new mxConnectionConstraint(new mxPoint(0,
+.5),!0),new mxConnectionConstraint(new mxPoint(1,.5))];mxLabel.prototype.constraints=mxRectangleShape.prototype.constraints;mxImageShape.prototype.constraints=mxRectangleShape.prototype.constraints;mxSwimlane.prototype.constraints=mxRectangleShape.prototype.constraints;x.prototype.constraints=mxRectangleShape.prototype.constraints;e.prototype.constraints=mxRectangleShape.prototype.constraints;g.prototype.constraints=mxRectangleShape.prototype.constraints;a.prototype.constraints=mxRectangleShape.prototype.constraints;
+h.prototype.constraints=mxRectangleShape.prototype.constraints;S.prototype.constraints=mxRectangleShape.prototype.constraints;ba.prototype.constraints=mxRectangleShape.prototype.constraints;da.prototype.constraints=mxEllipse.prototype.constraints;ea.prototype.constraints=mxEllipse.prototype.constraints;Z.prototype.constraints=mxEllipse.prototype.constraints;ta.prototype.constraints=mxEllipse.prototype.constraints;Q.prototype.constraints=mxRectangleShape.prototype.constraints;ua.prototype.constraints=
+mxRectangleShape.prototype.constraints;pa.prototype.constraints=mxRectangleShape.prototype.constraints;X.prototype.constraints=mxRectangleShape.prototype.constraints;Y.prototype.constraints=mxRectangleShape.prototype.constraints;mxCylinder.prototype.constraints=[new mxConnectionConstraint(new mxPoint(.15,.05),!1),new mxConnectionConstraint(new mxPoint(.5,0),!0),new mxConnectionConstraint(new mxPoint(.85,.05),!1),new mxConnectionConstraint(new mxPoint(0,.3),!0),new mxConnectionConstraint(new mxPoint(0,
+.5),!0),new mxConnectionConstraint(new mxPoint(0,.7),!0),new mxConnectionConstraint(new mxPoint(1,.3),!0),new mxConnectionConstraint(new mxPoint(1,.5),!0),new mxConnectionConstraint(new mxPoint(1,.7),!0),new mxConnectionConstraint(new mxPoint(.15,.95),!1),new mxConnectionConstraint(new mxPoint(.5,1),!0),new mxConnectionConstraint(new mxPoint(.85,.95),!1)];y.prototype.constraints=[new mxConnectionConstraint(new mxPoint(.25,.1),!1),new mxConnectionConstraint(new mxPoint(.5,0),!1),new mxConnectionConstraint(new mxPoint(.75,
+.1),!1),new mxConnectionConstraint(new mxPoint(0,1/3),!1),new mxConnectionConstraint(new mxPoint(0,1),!1),new mxConnectionConstraint(new mxPoint(1,1/3),!1),new mxConnectionConstraint(new mxPoint(1,1),!1),new mxConnectionConstraint(new mxPoint(.5,.5),!1)];O.prototype.constraints=[new mxConnectionConstraint(new mxPoint(.25,0),!0),new mxConnectionConstraint(new mxPoint(.5,0),!0),new mxConnectionConstraint(new mxPoint(.75,0),!0),new mxConnectionConstraint(new mxPoint(0,.3),!0),new mxConnectionConstraint(new mxPoint(0,
+.7),!0),new mxConnectionConstraint(new mxPoint(1,.25),!0),new mxConnectionConstraint(new mxPoint(1,.5),!0),new mxConnectionConstraint(new mxPoint(1,.75),!0),new mxConnectionConstraint(new mxPoint(.25,1),!0),new mxConnectionConstraint(new mxPoint(.5,1),!0),new mxConnectionConstraint(new mxPoint(.75,1),!0)];mxActor.prototype.constraints=[new mxConnectionConstraint(new mxPoint(.5,0),!0),new mxConnectionConstraint(new mxPoint(.25,.2),!1),new mxConnectionConstraint(new mxPoint(.1,.5),!1),new mxConnectionConstraint(new mxPoint(0,
+.75),!0),new mxConnectionConstraint(new mxPoint(.75,.25),!1),new mxConnectionConstraint(new mxPoint(.9,.5),!1),new mxConnectionConstraint(new mxPoint(1,.75),!0),new mxConnectionConstraint(new mxPoint(.25,1),!0),new mxConnectionConstraint(new mxPoint(.5,1),!0),new mxConnectionConstraint(new mxPoint(.75,1),!0)];f.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,0),!1),new mxConnectionConstraint(new mxPoint(.5,.25),!1),new mxConnectionConstraint(new mxPoint(1,0),!1),new mxConnectionConstraint(new mxPoint(.25,
+.5),!1),new mxConnectionConstraint(new mxPoint(.75,.5),!1),new mxConnectionConstraint(new mxPoint(0,1),!1),new mxConnectionConstraint(new mxPoint(.5,.75),!1),new mxConnectionConstraint(new mxPoint(1,1),!1)];k.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,.35),!1),new mxConnectionConstraint(new mxPoint(0,.5),!1),new mxConnectionConstraint(new mxPoint(0,.65),!1),new mxConnectionConstraint(new mxPoint(1,.35),!1),new mxConnectionConstraint(new mxPoint(1,.5),!1),new mxConnectionConstraint(new mxPoint(1,
+.65),!1),new mxConnectionConstraint(new mxPoint(.25,1),!1),new mxConnectionConstraint(new mxPoint(.75,0),!1)];v.prototype.constraints=[new mxConnectionConstraint(new mxPoint(.25,0),!0),new mxConnectionConstraint(new mxPoint(.5,0),!0),new mxConnectionConstraint(new mxPoint(.75,0),!0),new mxConnectionConstraint(new mxPoint(.25,1),!0),new mxConnectionConstraint(new mxPoint(.5,1),!0),new mxConnectionConstraint(new mxPoint(.75,1),!0),new mxConnectionConstraint(new mxPoint(.1,.25),!0),new mxConnectionConstraint(new mxPoint(.2,
+.5),!0),new mxConnectionConstraint(new mxPoint(.1,.75),!0),new mxConnectionConstraint(new mxPoint(.9,.25),!0),new mxConnectionConstraint(new mxPoint(1,.5),!0),new mxConnectionConstraint(new mxPoint(.9,.75),!0)];mxLine.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,.5),!1),new mxConnectionConstraint(new mxPoint(.25,.5),!1),new mxConnectionConstraint(new mxPoint(.75,.5),!1),new mxConnectionConstraint(new mxPoint(1,.5),!1)];N.prototype.constraints=[new mxConnectionConstraint(new mxPoint(.5,
+0),!1),new mxConnectionConstraint(new mxPoint(.5,1),!1)];mxDoubleEllipse.prototype.constraints=mxEllipse.prototype.constraints;mxRhombus.prototype.constraints=mxEllipse.prototype.constraints;mxTriangle.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,.25),!0),new mxConnectionConstraint(new mxPoint(0,.5),!0),new mxConnectionConstraint(new mxPoint(0,.75),!0),new mxConnectionConstraint(new mxPoint(.5,0),!0),new mxConnectionConstraint(new mxPoint(.5,1),!0),new mxConnectionConstraint(new mxPoint(1,
+.5),!0)];mxHexagon.prototype.constraints=[new mxConnectionConstraint(new mxPoint(.375,0),!0),new mxConnectionConstraint(new mxPoint(.5,0),!0),new mxConnectionConstraint(new mxPoint(.625,0),!0),new mxConnectionConstraint(new mxPoint(.125,.25),!0),new mxConnectionConstraint(new mxPoint(0,.5),!0),new mxConnectionConstraint(new mxPoint(.125,.75),!0),new mxConnectionConstraint(new mxPoint(.875,.25),!0),new mxConnectionConstraint(new mxPoint(0,.5),!0),new mxConnectionConstraint(new mxPoint(1,.5),!0),new mxConnectionConstraint(new mxPoint(.875,
+.75),!0),new mxConnectionConstraint(new mxPoint(.375,1),!0),new mxConnectionConstraint(new mxPoint(.5,1),!0),new mxConnectionConstraint(new mxPoint(.625,1),!0)];mxCloud.prototype.constraints=[new mxConnectionConstraint(new mxPoint(.25,.25),!1),new mxConnectionConstraint(new mxPoint(.4,.1),!1),new mxConnectionConstraint(new mxPoint(.16,.55),!1),new mxConnectionConstraint(new mxPoint(.07,.4),!1),new mxConnectionConstraint(new mxPoint(.31,.8),!1),new mxConnectionConstraint(new mxPoint(.13,.77),!1),new mxConnectionConstraint(new mxPoint(.8,
+.8),!1),new mxConnectionConstraint(new mxPoint(.55,.95),!1),new mxConnectionConstraint(new mxPoint(.875,.5),!1),new mxConnectionConstraint(new mxPoint(.96,.7),!1),new mxConnectionConstraint(new mxPoint(.625,.2),!1),new mxConnectionConstraint(new mxPoint(.88,.25),!1)];m.prototype.constraints=mxRectangleShape.prototype.constraints;n.prototype.constraints=mxRectangleShape.prototype.constraints;l.prototype.constraints=[new mxConnectionConstraint(new mxPoint(.25,0),!0),new mxConnectionConstraint(new mxPoint(.5,
+0),!0),new mxConnectionConstraint(new mxPoint(.75,0),!0),new mxConnectionConstraint(new mxPoint(0,.25),!0),new mxConnectionConstraint(new mxPoint(0,.5),!0),new mxConnectionConstraint(new mxPoint(0,.75),!0),new mxConnectionConstraint(new mxPoint(1,.25),!0),new mxConnectionConstraint(new mxPoint(1,.5),!0),new mxConnectionConstraint(new mxPoint(1,.75),!0)];mxArrow.prototype.constraints=null;W.prototype.constraints=null;T.prototype.constraints=null;aa.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,
+0),!1),new mxConnectionConstraint(new mxPoint(0,.5),!1),new mxConnectionConstraint(new mxPoint(0,1),!1),new mxConnectionConstraint(new mxPoint(.25,.5),!1),new mxConnectionConstraint(new mxPoint(.5,.5),!1),new mxConnectionConstraint(new mxPoint(.75,.5),!1),new mxConnectionConstraint(new mxPoint(1,0),!1),new mxConnectionConstraint(new mxPoint(1,.5),!1),new mxConnectionConstraint(new mxPoint(1,1),!1)];U.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,.5),!1),new mxConnectionConstraint(new mxPoint(1,
+.5),!1)];ia.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,.5),!1),new mxConnectionConstraint(new mxPoint(1,.5),!1)];oa.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,.5),!1),new mxConnectionConstraint(new mxPoint(1,.5),!1),new mxConnectionConstraint(new mxPoint(.5,0),!1),new mxConnectionConstraint(new mxPoint(.5,1),!1)];D.prototype.constraints=null;ja.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,.25),!1),new mxConnectionConstraint(new mxPoint(0,
+.5),!1),new mxConnectionConstraint(new mxPoint(0,.75),!1),new mxConnectionConstraint(new mxPoint(1,.5),!1),new mxConnectionConstraint(new mxPoint(.7,.1),!1),new mxConnectionConstraint(new mxPoint(.7,.9),!1)];ca.prototype.constraints=[new mxConnectionConstraint(new mxPoint(.175,.25),!1),new mxConnectionConstraint(new mxPoint(.25,.5),!1),new mxConnectionConstraint(new mxPoint(.175,.75),!1),new mxConnectionConstraint(new mxPoint(1,.5),!1),new mxConnectionConstraint(new mxPoint(.7,.1),!1),new mxConnectionConstraint(new mxPoint(.7,
+.9),!1)]})();function Actions(a){this.editorUi=a;this.actions={};this.init()}
 Actions.prototype.init=function(){function a(a){b.escape();var c=b.getDeletableCells(b.getSelectionCells());if(null!=c&&0<c.length){var d=b.model.getParents(c);b.removeCells(c,a);if(null!=d){a=[];for(c=0;c<d.length;c++)b.model.contains(d[c])&&(b.model.isVertex(d[c])||b.model.isEdge(d[c]))&&a.push(d[c]);b.setSelectionCells(a)}}}var c=this.editorUi,d=c.editor,b=d.graph,e=function(){return Action.prototype.isEnabled.apply(this,arguments)&&b.isEnabled()};this.addAction("new...",function(){window.open(c.getUrl())});
 this.addAction("open...",function(){window.openNew=!0;window.openKey="open";c.openFile()});this.addAction("import...",function(){window.openNew=!1;window.openKey="import";window.openFile=new OpenFile(mxUtils.bind(this,function(){c.hideDialog()}));window.openFile.setConsumer(mxUtils.bind(this,function(a,b){try{var c=mxUtils.parseXml(a),e=new mxGraphModel;(new mxCodec(c)).decode(c.documentElement,e);var f=e.getChildren(e.getChildAt(e.getRoot(),0));d.graph.setSelectionCells(d.graph.importCells(f))}catch(p){mxUtils.alert(mxResources.get("invalidOrMissingFile")+
 ": "+p.message)}}));c.showDialog((new OpenDialog(this)).container,320,220,!0,!0,function(){window.openFile=null})}).isEnabled=e;this.addAction("save",function(){c.saveFile(!1)},null,null,Editor.ctrlKey+"+S").isEnabled=e;this.addAction("saveAs...",function(){c.saveFile(!0)},null,null,Editor.ctrlKey+"+Shift+S").isEnabled=e;this.addAction("export...",function(){c.showDialog((new ExportDialog(c)).container,300,230,!0,!0)});this.addAction("editDiagram...",function(){var a=new EditDiagramDialog(c);c.showDialog(a.container,
@@ -2808,7 +2810,7 @@ l=k.cloneNode(!1);k.style.backgroundColor="#d7d7d7";l.style.backgroundColor="#d7
 mxUtils.write(l,mxResources.get("arrange"));d.appendChild(l);d=d.cloneNode(!1);d.style.display="none";this.panels.push(new ArrangePanel(this,a,d));this.container.appendChild(d);c(k,b,g++);c(l,d,g++)}}};BaseFormatPanel=function(a,c,d){this.format=a;this.editorUi=c;this.container=d;this.listeners=[]};
 BaseFormatPanel.prototype.getSelectionState=function(){for(var a=this.editorUi.editor.graph,c=a.getSelectionCells(),d=null,b=0;b<c.length;b++){var e=a.view.getState(c[b]);if(null!=e&&(e=mxUtils.getValue(e.style,mxConstants.STYLE_SHAPE,null),null!=e))if(null==d)d=e;else if(d!=e)return null}return d};
 BaseFormatPanel.prototype.installInputHandler=function(a,c,d,b,e,f,h,g){f=null!=f?f:"";g=null!=g?g:!1;var k=this.editorUi,l=k.editor.graph;b=null!=b?b:1;e=null!=e?e:999;var m=null,n=!1,p=mxUtils.bind(this,function(p){var q=g?parseFloat(a.value):parseInt(a.value);isNaN(q)||c!=mxConstants.STYLE_ROTATION||(q=mxUtils.mod(Math.round(100*q),36E3)/100);q=Math.min(e,Math.max(b,isNaN(q)?d:q));if(l.cellEditor.isContentEditing()&&h)n||(n=!0,null!=m&&(l.cellEditor.restoreSelection(m),m=null),h(q),a.value=q+f,
-n=!1);else if(q!=mxUtils.getValue(this.format.getSelectionState().style,c,d)){l.isEditing()&&l.stopEditing(!0);l.getModel().beginUpdate();try{if(l.setCellStyles(c,q,l.getSelectionCells()),c==mxConstants.STYLE_FONTSIZE)for(var t=l.getSelectionCells(),u=0;u<t.length;u++){var w=t[u];if(l.isHtmlLabel(w)){var v=document.createElement("div");v.innerHTML=l.convertValueToString(w);for(var A=v.getElementsByTagName("font"),x=0;x<A.length;x++)A[x].removeAttribute("size"),A[x].style.fontSize=q+"px";l.cellLabelChanged(w,
+n=!1);else if(q!=mxUtils.getValue(this.format.getSelectionState().style,c,d)){l.isEditing()&&l.stopEditing(!0);l.getModel().beginUpdate();try{if(l.setCellStyles(c,q,l.getSelectionCells()),c==mxConstants.STYLE_FONTSIZE)for(var t=l.getSelectionCells(),w=0;w<t.length;w++){var u=t[w];if(l.isHtmlLabel(u)){var v=document.createElement("div");v.innerHTML=l.convertValueToString(u);for(var A=v.getElementsByTagName("font"),x=0;x<A.length;x++)A[x].removeAttribute("size"),A[x].style.fontSize=q+"px";l.cellLabelChanged(u,
 v.innerHTML)}}}finally{l.getModel().endUpdate()}k.fireEvent(new mxEventObject("styleChanged","keys",[c],"values",[q],"cells",l.getSelectionCells()))}a.value=q+f;mxEvent.consume(p)});h&&l.cellEditor.isContentEditing()&&(mxEvent.addListener(a,"mousedown",function(){m=l.cellEditor.saveSelection()}),mxEvent.addListener(a,"touchstart",function(){m=l.cellEditor.saveSelection()}));mxEvent.addListener(a,"change",p);mxEvent.addListener(a,"blur",p);return p};
 BaseFormatPanel.prototype.createPanel=function(){var a=document.createElement("div");a.style.padding="12px 0px 12px 18px";a.style.borderBottom="1px solid #c0c0c0";return a};BaseFormatPanel.prototype.createTitle=function(a){var c=document.createElement("div");c.style.padding="0px 0px 6px 0px";c.style.whiteSpace="nowrap";c.style.overflow="hidden";c.style.width="200px";c.style.fontWeight="bold";mxUtils.write(c,a);return c};
 BaseFormatPanel.prototype.createStepper=function(a,c,d,b,e,f){d=null!=d?d:1;b=null!=b?b:8;if(mxClient.IS_QUIRKS)b-=2;else if(mxClient.IS_MT||8<=document.documentMode)b+=1;var h=document.createElement("div");mxUtils.setPrefixedStyle(h.style,"borderRadius","3px");h.style.border="1px solid rgb(192, 192, 192)";h.style.position="absolute";var g=document.createElement("div");g.style.borderBottom="1px solid rgb(192, 192, 192)";g.style.position="relative";g.style.height=b+"px";g.style.width="10px";g.className=
@@ -2854,10 +2856,10 @@ ArrangePanel.prototype.addAngle=function(a){var c=this.editorUi,d=c.editor.graph
 a=parseFloat(mxUtils.getValue(b.style,mxConstants.STYLE_ROTATION,0)),f.value=isNaN(a)?"":a+"°"}),h=this.installInputHandler(f,mxConstants.STYLE_ROTATION,0,0,360,"°",null,!0);this.addKeyHandler(f,k);d.getModel().addListener(mxEvent.CHANGE,k);this.listeners.push({destroy:function(){d.getModel().removeListener(k)}});k()}return a};
 ArrangePanel.prototype.addGeometry=function(a){var c=this.editorUi,d=c.editor.graph,b=this.format.getSelectionState(),e=this.createPanel();e.style.paddingBottom="8px";var f=document.createElement("div");f.style.position="absolute";f.style.width="50px";f.style.marginTop="0px";f.style.fontWeight="bold";mxUtils.write(f,mxResources.get("size"));e.appendChild(f);var h,g,k,l,m=this.addUnitInput(e,"pt",84,44,function(){h.apply(this,arguments)}),n=this.addUnitInput(e,"pt",20,44,function(){g.apply(this,arguments)}),
 p=document.createElement("div");p.className="geSprite geSprite-fit";p.setAttribute("title",mxResources.get("autosize")+" ("+this.editorUi.actions.get("autosize").shortcut+")");p.style.position="relative";p.style.cursor="pointer";p.style.marginTop="-3px";p.style.border="0px";p.style.left="52px";mxUtils.setOpacity(p,50);mxEvent.addListener(p,"mouseenter",function(){mxUtils.setOpacity(p,100)});mxEvent.addListener(p,"mouseleave",function(){mxUtils.setOpacity(p,50)});mxEvent.addListener(p,"click",function(){c.actions.get("autosize").funct()});
-e.appendChild(p);this.addLabel(e,mxResources.get("width"),84);this.addLabel(e,mxResources.get("height"),20);mxUtils.br(e);f=document.createElement("div");f.style.paddingTop="8px";f.style.paddingRight="20px";f.style.whiteSpace="nowrap";f.style.textAlign="right";var q=this.createCellOption(mxResources.get("constrainProportions"),mxConstants.STYLE_ASPECT,null,"fixed","null");q.style.width="100%";f.appendChild(q);e.appendChild(f);this.addKeyHandler(m,w);this.addKeyHandler(n,w);h=this.addGeometryHandler(m,
-function(a,b){0<a.width&&(a.width=Math.max(1,b))});g=this.addGeometryHandler(n,function(a,b){0<a.height&&(a.height=Math.max(1,b))});a.appendChild(e);var r=this.createPanel();r.style.paddingBottom="30px";f=document.createElement("div");f.style.position="absolute";f.style.width="70px";f.style.marginTop="0px";f.style.fontWeight="bold";mxUtils.write(f,mxResources.get("position"));r.appendChild(f);var t=this.addUnitInput(r,"pt",84,44,function(){k.apply(this,arguments)}),u=this.addUnitInput(r,"pt",20,44,
-function(){l.apply(this,arguments)});mxUtils.br(r);this.addLabel(r,mxResources.get("left"),84);this.addLabel(r,mxResources.get("top"),20);var w=mxUtils.bind(this,function(a,c,f){b=this.format.getSelectionState();if(b.containsLabel||b.vertices.length!=d.getSelectionCount()||null==b.width||null==b.height)e.style.display="none";else{e.style.display="";if(f||document.activeElement!=m)m.value=b.width+(""==b.width?"":" pt");if(f||document.activeElement!=n)n.value=b.height+(""==b.height?"":" pt")}if(b.vertices.length==
-d.getSelectionCount()&&null!=b.x&&null!=b.y){r.style.display="";if(f||document.activeElement!=t)t.value=b.x+(""==b.x?"":" pt");if(f||document.activeElement!=u)u.value=b.y+(""==b.y?"":" pt")}else r.style.display="none"});this.addKeyHandler(t,w);this.addKeyHandler(u,w);d.getModel().addListener(mxEvent.CHANGE,w);this.listeners.push({destroy:function(){d.getModel().removeListener(w)}});w();k=this.addGeometryHandler(t,function(a,b){a.relative?a.offset.x=b:a.x=b});l=this.addGeometryHandler(u,function(a,
+e.appendChild(p);this.addLabel(e,mxResources.get("width"),84);this.addLabel(e,mxResources.get("height"),20);mxUtils.br(e);f=document.createElement("div");f.style.paddingTop="8px";f.style.paddingRight="20px";f.style.whiteSpace="nowrap";f.style.textAlign="right";var q=this.createCellOption(mxResources.get("constrainProportions"),mxConstants.STYLE_ASPECT,null,"fixed","null");q.style.width="100%";f.appendChild(q);e.appendChild(f);this.addKeyHandler(m,u);this.addKeyHandler(n,u);h=this.addGeometryHandler(m,
+function(a,b){0<a.width&&(a.width=Math.max(1,b))});g=this.addGeometryHandler(n,function(a,b){0<a.height&&(a.height=Math.max(1,b))});a.appendChild(e);var r=this.createPanel();r.style.paddingBottom="30px";f=document.createElement("div");f.style.position="absolute";f.style.width="70px";f.style.marginTop="0px";f.style.fontWeight="bold";mxUtils.write(f,mxResources.get("position"));r.appendChild(f);var t=this.addUnitInput(r,"pt",84,44,function(){k.apply(this,arguments)}),w=this.addUnitInput(r,"pt",20,44,
+function(){l.apply(this,arguments)});mxUtils.br(r);this.addLabel(r,mxResources.get("left"),84);this.addLabel(r,mxResources.get("top"),20);var u=mxUtils.bind(this,function(a,c,f){b=this.format.getSelectionState();if(b.containsLabel||b.vertices.length!=d.getSelectionCount()||null==b.width||null==b.height)e.style.display="none";else{e.style.display="";if(f||document.activeElement!=m)m.value=b.width+(""==b.width?"":" pt");if(f||document.activeElement!=n)n.value=b.height+(""==b.height?"":" pt")}if(b.vertices.length==
+d.getSelectionCount()&&null!=b.x&&null!=b.y){r.style.display="";if(f||document.activeElement!=t)t.value=b.x+(""==b.x?"":" pt");if(f||document.activeElement!=w)w.value=b.y+(""==b.y?"":" pt")}else r.style.display="none"});this.addKeyHandler(t,u);this.addKeyHandler(w,u);d.getModel().addListener(mxEvent.CHANGE,u);this.listeners.push({destroy:function(){d.getModel().removeListener(u)}});u();k=this.addGeometryHandler(t,function(a,b){a.relative?a.offset.x=b:a.x=b});l=this.addGeometryHandler(w,function(a,
 b){a.relative?a.offset.y=b:a.y=b});a.appendChild(r)};
 ArrangePanel.prototype.addGeometryHandler=function(a,c){function d(d){if(""!=a.value){var f=parseFloat(a.value);if(f!=e){b.getModel().beginUpdate();try{for(var g=b.getSelectionCells(),k=0;k<g.length;k++)if(b.getModel().isVertex(g[k])){var l=b.getCellGeometry(g[k]);null!=l&&(l=l.clone(),c(l,f),b.getModel().setGeometry(g[k],l))}}finally{b.getModel().endUpdate()}e=f;a.value=f+" pt"}else isNaN(f)&&(a.value=e+" pt")}mxEvent.consume(d)}var b=this.editorUi.editor.graph,e=null;mxEvent.addListener(a,"blur",
 d);mxEvent.addListener(a,"change",d);mxEvent.addListener(a,"focus",function(){e=a.value});return d};
@@ -2871,45 +2873,45 @@ g.style.margin="0px";this.addArrow(g);g.style.width="192px";g.style.height="15px
 "0px";this.addArrow(k);k.style.width="192px";k.style.height="15px";mxClient.IS_FF&&(k.getElementsByTagName("div")[0].style.marginTop="-18px");g=f.cloneNode(!1);g.style.marginLeft="-3px";var l=this.editorUi.toolbar.addItems(["bold","italic","underline"],g,!0);l[0].setAttribute("title",mxResources.get("bold")+" ("+this.editorUi.actions.get("bold").shortcut+")");l[1].setAttribute("title",mxResources.get("italic")+" ("+this.editorUi.actions.get("italic").shortcut+")");l[2].setAttribute("title",mxResources.get("underline")+
 " ("+this.editorUi.actions.get("underline").shortcut+")");var m=this.editorUi.toolbar.addItems(["vertical"],g,!0)[0];mxClient.IS_QUIRKS&&mxUtils.br(a);a.appendChild(g);this.styleButtons(l);this.styleButtons([m]);var n=f.cloneNode(!1);n.style.marginLeft="-3px";n.style.paddingBottom="0px";var p=this.editorUi.toolbar.addButton("geSprite-left",mxResources.get("left"),b.cellEditor.isContentEditing()?function(){document.execCommand("justifyleft",!1,null)}:this.editorUi.menus.createStyleChangeFunction([mxConstants.STYLE_ALIGN],
 [mxConstants.ALIGN_LEFT]),n),q=this.editorUi.toolbar.addButton("geSprite-center",mxResources.get("center"),b.cellEditor.isContentEditing()?function(){document.execCommand("justifycenter",!1,null)}:this.editorUi.menus.createStyleChangeFunction([mxConstants.STYLE_ALIGN],[mxConstants.ALIGN_CENTER]),n),r=this.editorUi.toolbar.addButton("geSprite-right",mxResources.get("right"),b.cellEditor.isContentEditing()?function(){document.execCommand("justifyright",!1,null)}:this.editorUi.menus.createStyleChangeFunction([mxConstants.STYLE_ALIGN],
-[mxConstants.ALIGN_RIGHT]),n);this.styleButtons([p,q,r]);if(b.cellEditor.isContentEditing()){var t=this.editorUi.toolbar.addButton("geSprite-removeformat",mxResources.get("removeFormat"),function(){document.execCommand("removeformat",!1,null)},g);this.styleButtons([t])}var u=this.editorUi.toolbar.addButton("geSprite-top",mxResources.get("top"),this.editorUi.menus.createStyleChangeFunction([mxConstants.STYLE_VERTICAL_ALIGN],[mxConstants.ALIGN_TOP]),n),w=this.editorUi.toolbar.addButton("geSprite-middle",
-mxResources.get("middle"),this.editorUi.menus.createStyleChangeFunction([mxConstants.STYLE_VERTICAL_ALIGN],[mxConstants.ALIGN_MIDDLE]),n),v=this.editorUi.toolbar.addButton("geSprite-bottom",mxResources.get("bottom"),this.editorUi.menus.createStyleChangeFunction([mxConstants.STYLE_VERTICAL_ALIGN],[mxConstants.ALIGN_BOTTOM]),n);this.styleButtons([u,w,v]);mxClient.IS_QUIRKS&&mxUtils.br(a);a.appendChild(n);var A,x,C,B,y,J,K;b.cellEditor.isContentEditing()?(u.style.display="none",w.style.display="none",
-v.style.display="none",m.style.display="none",C=this.editorUi.toolbar.addButton("geSprite-justifyfull",null,function(){document.execCommand("justifyfull",!1,null)},n),this.styleButtons([C,A=this.editorUi.toolbar.addButton("geSprite-subscript",mxResources.get("subscript")+" ("+Editor.ctrlKey+"+,)",function(){document.execCommand("subscript",!1,null)},n),x=this.editorUi.toolbar.addButton("geSprite-superscript",mxResources.get("superscript")+" ("+Editor.ctrlKey+"+.)",function(){document.execCommand("superscript",
-!1,null)},n)]),C.style.marginRight="9px",t=n.cloneNode(!1),t.style.paddingTop="4px",n=[this.editorUi.toolbar.addButton("geSprite-orderedlist",mxResources.get("numberedList"),function(){document.execCommand("insertorderedlist",!1,null)},t),this.editorUi.toolbar.addButton("geSprite-unorderedlist",mxResources.get("bulletedList"),function(){document.execCommand("insertunorderedlist",!1,null)},t),this.editorUi.toolbar.addButton("geSprite-outdent",mxResources.get("decreaseIndent"),function(){document.execCommand("outdent",
+[mxConstants.ALIGN_RIGHT]),n);this.styleButtons([p,q,r]);if(b.cellEditor.isContentEditing()){var t=this.editorUi.toolbar.addButton("geSprite-removeformat",mxResources.get("removeFormat"),function(){document.execCommand("removeformat",!1,null)},g);this.styleButtons([t])}var w=this.editorUi.toolbar.addButton("geSprite-top",mxResources.get("top"),this.editorUi.menus.createStyleChangeFunction([mxConstants.STYLE_VERTICAL_ALIGN],[mxConstants.ALIGN_TOP]),n),u=this.editorUi.toolbar.addButton("geSprite-middle",
+mxResources.get("middle"),this.editorUi.menus.createStyleChangeFunction([mxConstants.STYLE_VERTICAL_ALIGN],[mxConstants.ALIGN_MIDDLE]),n),v=this.editorUi.toolbar.addButton("geSprite-bottom",mxResources.get("bottom"),this.editorUi.menus.createStyleChangeFunction([mxConstants.STYLE_VERTICAL_ALIGN],[mxConstants.ALIGN_BOTTOM]),n);this.styleButtons([w,u,v]);mxClient.IS_QUIRKS&&mxUtils.br(a);a.appendChild(n);var A,x,B,C,y,I,L;b.cellEditor.isContentEditing()?(w.style.display="none",u.style.display="none",
+v.style.display="none",m.style.display="none",B=this.editorUi.toolbar.addButton("geSprite-justifyfull",null,function(){document.execCommand("justifyfull",!1,null)},n),this.styleButtons([B,A=this.editorUi.toolbar.addButton("geSprite-subscript",mxResources.get("subscript")+" ("+Editor.ctrlKey+"+,)",function(){document.execCommand("subscript",!1,null)},n),x=this.editorUi.toolbar.addButton("geSprite-superscript",mxResources.get("superscript")+" ("+Editor.ctrlKey+"+.)",function(){document.execCommand("superscript",
+!1,null)},n)]),B.style.marginRight="9px",t=n.cloneNode(!1),t.style.paddingTop="4px",n=[this.editorUi.toolbar.addButton("geSprite-orderedlist",mxResources.get("numberedList"),function(){document.execCommand("insertorderedlist",!1,null)},t),this.editorUi.toolbar.addButton("geSprite-unorderedlist",mxResources.get("bulletedList"),function(){document.execCommand("insertunorderedlist",!1,null)},t),this.editorUi.toolbar.addButton("geSprite-outdent",mxResources.get("decreaseIndent"),function(){document.execCommand("outdent",
 !1,null)},t),this.editorUi.toolbar.addButton("geSprite-indent",mxResources.get("increaseIndent"),function(){document.execCommand("indent",!1,null)},t),this.editorUi.toolbar.addButton("geSprite-code",mxResources.get("html"),function(){b.cellEditor.toggleViewMode()},t)],this.styleButtons(n),n[n.length-1].style.marginLeft="9px",mxClient.IS_QUIRKS&&(mxUtils.br(a),t.style.height="40"),a.appendChild(t)):(l[2].style.marginRight="9px",r.style.marginRight="9px");n=f.cloneNode(!1);n.style.marginLeft="0px";
-n.style.paddingTop="8px";n.style.paddingBottom="4px";n.style.fontWeight="normal";mxUtils.write(n,mxResources.get("position"));var I=document.createElement("select");I.style.position="absolute";I.style.right="20px";I.style.width="97px";I.style.marginTop="-2px";for(var F="topLeft top topRight left center right bottomLeft bottom bottomRight".split(" "),E={topLeft:[mxConstants.ALIGN_LEFT,mxConstants.ALIGN_TOP,mxConstants.ALIGN_RIGHT,mxConstants.ALIGN_BOTTOM],top:[mxConstants.ALIGN_CENTER,mxConstants.ALIGN_TOP,
+n.style.paddingTop="8px";n.style.paddingBottom="4px";n.style.fontWeight="normal";mxUtils.write(n,mxResources.get("position"));var J=document.createElement("select");J.style.position="absolute";J.style.right="20px";J.style.width="97px";J.style.marginTop="-2px";for(var G="topLeft top topRight left center right bottomLeft bottom bottomRight".split(" "),D={topLeft:[mxConstants.ALIGN_LEFT,mxConstants.ALIGN_TOP,mxConstants.ALIGN_RIGHT,mxConstants.ALIGN_BOTTOM],top:[mxConstants.ALIGN_CENTER,mxConstants.ALIGN_TOP,
 mxConstants.ALIGN_CENTER,mxConstants.ALIGN_BOTTOM],topRight:[mxConstants.ALIGN_RIGHT,mxConstants.ALIGN_TOP,mxConstants.ALIGN_LEFT,mxConstants.ALIGN_BOTTOM],left:[mxConstants.ALIGN_LEFT,mxConstants.ALIGN_MIDDLE,mxConstants.ALIGN_RIGHT,mxConstants.ALIGN_MIDDLE],center:[mxConstants.ALIGN_CENTER,mxConstants.ALIGN_MIDDLE,mxConstants.ALIGN_CENTER,mxConstants.ALIGN_MIDDLE],right:[mxConstants.ALIGN_RIGHT,mxConstants.ALIGN_MIDDLE,mxConstants.ALIGN_LEFT,mxConstants.ALIGN_MIDDLE],bottomLeft:[mxConstants.ALIGN_LEFT,
-mxConstants.ALIGN_BOTTOM,mxConstants.ALIGN_RIGHT,mxConstants.ALIGN_TOP],bottom:[mxConstants.ALIGN_CENTER,mxConstants.ALIGN_BOTTOM,mxConstants.ALIGN_CENTER,mxConstants.ALIGN_TOP],bottomRight:[mxConstants.ALIGN_RIGHT,mxConstants.ALIGN_BOTTOM,mxConstants.ALIGN_LEFT,mxConstants.ALIGN_TOP]},t=0;t<F.length;t++){var N=document.createElement("option");N.setAttribute("value",F[t]);mxUtils.write(N,mxResources.get(F[t]));I.appendChild(N)}n.appendChild(I);F=f.cloneNode(!1);F.style.marginLeft="0px";F.style.paddingTop=
-"4px";F.style.paddingBottom="4px";F.style.fontWeight="normal";mxUtils.write(F,mxResources.get("writingDirection"));var M=document.createElement("select");M.style.position="absolute";M.style.right="20px";M.style.width="97px";M.style.marginTop="-2px";for(var N=["automatic","leftToRight","rightToLeft"],Q={automatic:null,leftToRight:mxConstants.TEXT_DIRECTION_LTR,rightToLeft:mxConstants.TEXT_DIRECTION_RTL},t=0;t<N.length;t++){var O=document.createElement("option");O.setAttribute("value",N[t]);mxUtils.write(O,
-mxResources.get(N[t]));M.appendChild(O)}F.appendChild(M);b.isEditing()||(a.appendChild(n),mxEvent.addListener(I,"change",function(a){b.getModel().beginUpdate();try{var c=E[I.value];null!=c&&(b.setCellStyles(mxConstants.STYLE_LABEL_POSITION,c[0],b.getSelectionCells()),b.setCellStyles(mxConstants.STYLE_VERTICAL_LABEL_POSITION,c[1],b.getSelectionCells()),b.setCellStyles(mxConstants.STYLE_ALIGN,c[2],b.getSelectionCells()),b.setCellStyles(mxConstants.STYLE_VERTICAL_ALIGN,c[3],b.getSelectionCells()))}finally{b.getModel().endUpdate()}mxEvent.consume(a)}),
-a.appendChild(F),mxEvent.addListener(M,"change",function(a){b.setCellStyles(mxConstants.STYLE_TEXT_DIRECTION,Q[M.value],b.getSelectionCells());mxEvent.consume(a)}));var G=document.createElement("input");G.style.textAlign="right";G.style.marginTop="4px";mxClient.IS_QUIRKS||(G.style.position="absolute",G.style.right="32px");G.style.width="46px";G.style.height=mxClient.IS_QUIRKS?"21px":"17px";g.appendChild(G);var D=null,n=this.installInputHandler(G,mxConstants.STYLE_FONTSIZE,Menus.prototype.defaultFontSize,
-1,999," pt",function(a){D=a;document.execCommand("fontSize",!1,"4");a=b.cellEditor.textarea.getElementsByTagName("font");for(var c=0;c<a.length;c++)if("4"==a[c].getAttribute("size")){a[c].removeAttribute("size");a[c].style.fontSize=D+"px";window.setTimeout(function(){G.value=D+" pt";D=null},0);break}},!0),n=this.createStepper(G,n,1,10,!0,Menus.prototype.defaultFontSize);n.style.display=G.style.display;n.style.marginTop="4px";mxClient.IS_QUIRKS||(n.style.right="20px");g.appendChild(n);g=k.getElementsByTagName("div")[0];
-g.style.cssFloat="right";var H=null,z="#ffffff",P=null,V="#000000",Z=b.cellEditor.isContentEditing()?this.createColorOption(mxResources.get("backgroundColor"),function(){return z},function(a){document.execCommand("backcolor",!1,a!=mxConstants.NONE?a:"transparent")},"#ffffff",{install:function(a){H=a},destroy:function(){H=null}},null,!0):this.createCellColorOption(mxResources.get("backgroundColor"),mxConstants.STYLE_LABEL_BACKGROUNDCOLOR,"#ffffff");Z.style.fontWeight="bold";var S=this.createCellColorOption(mxResources.get("borderColor"),
-mxConstants.STYLE_LABEL_BORDERCOLOR,"#000000");S.style.fontWeight="bold";g=b.cellEditor.isContentEditing()?this.createColorOption(mxResources.get("fontColor"),function(){return V},function(a){document.execCommand("forecolor",!1,a!=mxConstants.NONE?a:"transparent")},"#000000",{install:function(a){P=a},destroy:function(){P=null}},null,!0):this.createCellColorOption(mxResources.get("fontColor"),mxConstants.STYLE_FONTCOLOR,"#000000",function(a){Z.style.display=null==a||a==mxConstants.NONE?"none":"";S.style.display=
-Z.style.display},function(a){null==a||a==mxConstants.NONE?b.setCellStyles(mxConstants.STYLE_NOLABEL,"1",b.getSelectionCells()):b.setCellStyles(mxConstants.STYLE_NOLABEL,null,b.getSelectionCells())});g.style.fontWeight="bold";h.appendChild(g);h.appendChild(Z);b.cellEditor.isContentEditing()||h.appendChild(S);a.appendChild(h);h=this.createPanel();h.style.paddingTop="2px";h.style.paddingBottom="4px";g=this.createCellOption(mxResources.get("wordWrap"),mxConstants.STYLE_WHITE_SPACE,null,"wrap","null",
-null,null,!0);g.style.fontWeight="bold";e.containsLabel||e.autoSize||0!=e.edges.length||h.appendChild(g);g=this.createCellOption(mxResources.get("formattedText"),"html","0",null,null,null,d.actions.get("formattedText"));g.style.fontWeight="bold";h.appendChild(g);g=this.createPanel();g.style.paddingTop="10px";g.style.paddingBottom="28px";g.style.fontWeight="normal";n=document.createElement("div");n.style.position="absolute";n.style.width="70px";n.style.marginTop="0px";n.style.fontWeight="bold";mxUtils.write(n,
-mxResources.get("spacing"));g.appendChild(n);var T,ia,aa,ja,ka,W=this.addUnitInput(g,"pt",91,44,function(){T.apply(this,arguments)}),X=this.addUnitInput(g,"pt",20,44,function(){ia.apply(this,arguments)});mxUtils.br(g);this.addLabel(g,mxResources.get("top"),91);this.addLabel(g,mxResources.get("global"),20);mxUtils.br(g);mxUtils.br(g);var ba=this.addUnitInput(g,"pt",162,44,function(){aa.apply(this,arguments)}),ca=this.addUnitInput(g,"pt",91,44,function(){ja.apply(this,arguments)}),da=this.addUnitInput(g,
-"pt",20,44,function(){ka.apply(this,arguments)});mxUtils.br(g);this.addLabel(g,mxResources.get("left"),162);this.addLabel(g,mxResources.get("bottom"),91);this.addLabel(g,mxResources.get("right"),20);if(b.cellEditor.isContentEditing()){var ea=null,oa=null;a.appendChild(this.createRelativeOption(mxResources.get("lineheight"),null,null,function(a){var c=""==a.value?120:parseInt(a.value),c=Math.max(0,isNaN(c)?120:c);null!=ea&&(b.cellEditor.restoreSelection(ea),ea=null);for(var d=b.getSelectedElement();null!=
-d&&d.nodeType!=mxConstants.NODETYPE_ELEMENT;)d=d.parentNode;null!=d&&d==b.cellEditor.textarea&&null!=b.cellEditor.textarea.firstChild&&("P"!=b.cellEditor.textarea.firstChild.nodeName&&(b.cellEditor.textarea.innerHTML="<p>"+b.cellEditor.textarea.innerHTML+"</p>"),d=b.cellEditor.textarea.firstChild);null!=d&&d!=b.cellEditor.textarea&&(d.style.lineHeight=c+"%");a.value=c+" %"},function(a){oa=a;mxEvent.addListener(a,"mousedown",function(){ea=b.cellEditor.saveSelection()});mxEvent.addListener(a,"touchstart",
-function(){ea=b.cellEditor.saveSelection()});a.value="120 %"}));h=f.cloneNode(!1);h.style.paddingLeft="0px";g=this.editorUi.toolbar.addItems(["link","image"],h,!0);n=[this.editorUi.toolbar.addButton("geSprite-horizontalrule",mxResources.get("insertHorizontalRule"),function(){document.execCommand("inserthorizontalrule",!1,null)},h),this.editorUi.toolbar.addMenuFunctionInContainer(h,"geSprite-table",mxResources.get("table"),!1,mxUtils.bind(this,function(a){this.editorUi.menus.addInsertTableItem(a)}))];
-this.styleButtons(g);this.styleButtons(n);g=this.createPanel();g.style.paddingTop="10px";g.style.paddingBottom="10px";g.appendChild(this.createTitle(mxResources.get("insert")));g.appendChild(h);a.appendChild(g);mxClient.IS_QUIRKS&&(g.style.height="70");g=f.cloneNode(!1);g.style.paddingLeft="0px";n=[this.editorUi.toolbar.addButton("geSprite-insertcolumnbefore",mxResources.get("insertColumnBefore"),function(){try{null!=y&&b.selectNode(b.insertColumn(y,null!=J?J.cellIndex:0))}catch(R){alert(R)}},g),
-this.editorUi.toolbar.addButton("geSprite-insertcolumnafter",mxResources.get("insertColumnAfter"),function(){try{null!=y&&b.selectNode(b.insertColumn(y,null!=J?J.cellIndex+1:-1))}catch(R){alert(R)}},g),this.editorUi.toolbar.addButton("geSprite-deletecolumn",mxResources.get("deleteColumn"),function(){try{null!=y&&null!=J&&b.deleteColumn(y,J.cellIndex)}catch(R){alert(R)}},g),this.editorUi.toolbar.addButton("geSprite-insertrowbefore",mxResources.get("insertRowBefore"),function(){try{null!=y&&null!=K&&
-b.selectNode(b.insertRow(y,K.sectionRowIndex))}catch(R){alert(R)}},g),this.editorUi.toolbar.addButton("geSprite-insertrowafter",mxResources.get("insertRowAfter"),function(){try{null!=y&&null!=K&&b.selectNode(b.insertRow(y,K.sectionRowIndex+1))}catch(R){alert(R)}},g),this.editorUi.toolbar.addButton("geSprite-deleterow",mxResources.get("deleteRow"),function(){try{null!=y&&null!=K&&b.deleteRow(y,K.sectionRowIndex)}catch(R){alert(R)}},g)];this.styleButtons(n);n[2].style.marginRight="9px";h=this.createPanel();
+mxConstants.ALIGN_BOTTOM,mxConstants.ALIGN_RIGHT,mxConstants.ALIGN_TOP],bottom:[mxConstants.ALIGN_CENTER,mxConstants.ALIGN_BOTTOM,mxConstants.ALIGN_CENTER,mxConstants.ALIGN_TOP],bottomRight:[mxConstants.ALIGN_RIGHT,mxConstants.ALIGN_BOTTOM,mxConstants.ALIGN_LEFT,mxConstants.ALIGN_TOP]},t=0;t<G.length;t++){var K=document.createElement("option");K.setAttribute("value",G[t]);mxUtils.write(K,mxResources.get(G[t]));J.appendChild(K)}n.appendChild(J);G=f.cloneNode(!1);G.style.marginLeft="0px";G.style.paddingTop=
+"4px";G.style.paddingBottom="4px";G.style.fontWeight="normal";mxUtils.write(G,mxResources.get("writingDirection"));var N=document.createElement("select");N.style.position="absolute";N.style.right="20px";N.style.width="97px";N.style.marginTop="-2px";for(var K=["automatic","leftToRight","rightToLeft"],P={automatic:null,leftToRight:mxConstants.TEXT_DIRECTION_LTR,rightToLeft:mxConstants.TEXT_DIRECTION_RTL},t=0;t<K.length;t++){var O=document.createElement("option");O.setAttribute("value",K[t]);mxUtils.write(O,
+mxResources.get(K[t]));N.appendChild(O)}G.appendChild(N);b.isEditing()||(a.appendChild(n),mxEvent.addListener(J,"change",function(a){b.getModel().beginUpdate();try{var c=D[J.value];null!=c&&(b.setCellStyles(mxConstants.STYLE_LABEL_POSITION,c[0],b.getSelectionCells()),b.setCellStyles(mxConstants.STYLE_VERTICAL_LABEL_POSITION,c[1],b.getSelectionCells()),b.setCellStyles(mxConstants.STYLE_ALIGN,c[2],b.getSelectionCells()),b.setCellStyles(mxConstants.STYLE_VERTICAL_ALIGN,c[3],b.getSelectionCells()))}finally{b.getModel().endUpdate()}mxEvent.consume(a)}),
+a.appendChild(G),mxEvent.addListener(N,"change",function(a){b.setCellStyles(mxConstants.STYLE_TEXT_DIRECTION,P[N.value],b.getSelectionCells());mxEvent.consume(a)}));var F=document.createElement("input");F.style.textAlign="right";F.style.marginTop="4px";mxClient.IS_QUIRKS||(F.style.position="absolute",F.style.right="32px");F.style.width="46px";F.style.height=mxClient.IS_QUIRKS?"21px":"17px";g.appendChild(F);var E=null,n=this.installInputHandler(F,mxConstants.STYLE_FONTSIZE,Menus.prototype.defaultFontSize,
+1,999," pt",function(a){E=a;document.execCommand("fontSize",!1,"4");a=b.cellEditor.textarea.getElementsByTagName("font");for(var c=0;c<a.length;c++)if("4"==a[c].getAttribute("size")){a[c].removeAttribute("size");a[c].style.fontSize=E+"px";window.setTimeout(function(){F.value=E+" pt";E=null},0);break}},!0),n=this.createStepper(F,n,1,10,!0,Menus.prototype.defaultFontSize);n.style.display=F.style.display;n.style.marginTop="4px";mxClient.IS_QUIRKS||(n.style.right="20px");g.appendChild(n);g=k.getElementsByTagName("div")[0];
+g.style.cssFloat="right";var H=null,z="#ffffff",Q=null,S="#000000",T=b.cellEditor.isContentEditing()?this.createColorOption(mxResources.get("backgroundColor"),function(){return z},function(a){document.execCommand("backcolor",!1,a!=mxConstants.NONE?a:"transparent")},"#ffffff",{install:function(a){H=a},destroy:function(){H=null}},null,!0):this.createCellColorOption(mxResources.get("backgroundColor"),mxConstants.STYLE_LABEL_BACKGROUNDCOLOR,"#ffffff");T.style.fontWeight="bold";var aa=this.createCellColorOption(mxResources.get("borderColor"),
+mxConstants.STYLE_LABEL_BORDERCOLOR,"#000000");aa.style.fontWeight="bold";g=b.cellEditor.isContentEditing()?this.createColorOption(mxResources.get("fontColor"),function(){return S},function(a){document.execCommand("forecolor",!1,a!=mxConstants.NONE?a:"transparent")},"#000000",{install:function(a){Q=a},destroy:function(){Q=null}},null,!0):this.createCellColorOption(mxResources.get("fontColor"),mxConstants.STYLE_FONTCOLOR,"#000000",function(a){T.style.display=null==a||a==mxConstants.NONE?"none":"";
+aa.style.display=T.style.display},function(a){null==a||a==mxConstants.NONE?b.setCellStyles(mxConstants.STYLE_NOLABEL,"1",b.getSelectionCells()):b.setCellStyles(mxConstants.STYLE_NOLABEL,null,b.getSelectionCells())});g.style.fontWeight="bold";h.appendChild(g);h.appendChild(T);b.cellEditor.isContentEditing()||h.appendChild(aa);a.appendChild(h);h=this.createPanel();h.style.paddingTop="2px";h.style.paddingBottom="4px";g=this.createCellOption(mxResources.get("wordWrap"),mxConstants.STYLE_WHITE_SPACE,null,
+"wrap","null",null,null,!0);g.style.fontWeight="bold";e.containsLabel||e.autoSize||0!=e.edges.length||h.appendChild(g);g=this.createCellOption(mxResources.get("formattedText"),"html","0",null,null,null,d.actions.get("formattedText"));g.style.fontWeight="bold";h.appendChild(g);g=this.createPanel();g.style.paddingTop="10px";g.style.paddingBottom="28px";g.style.fontWeight="normal";n=document.createElement("div");n.style.position="absolute";n.style.width="70px";n.style.marginTop="0px";n.style.fontWeight=
+"bold";mxUtils.write(n,mxResources.get("spacing"));g.appendChild(n);var W,U,ia,ba,ja,ca=this.addUnitInput(g,"pt",91,44,function(){W.apply(this,arguments)}),X=this.addUnitInput(g,"pt",20,44,function(){U.apply(this,arguments)});mxUtils.br(g);this.addLabel(g,mxResources.get("top"),91);this.addLabel(g,mxResources.get("global"),20);mxUtils.br(g);mxUtils.br(g);var Y=this.addUnitInput(g,"pt",162,44,function(){ia.apply(this,arguments)}),da=this.addUnitInput(g,"pt",91,44,function(){ba.apply(this,arguments)}),
+ea=this.addUnitInput(g,"pt",20,44,function(){ja.apply(this,arguments)});mxUtils.br(g);this.addLabel(g,mxResources.get("left"),162);this.addLabel(g,mxResources.get("bottom"),91);this.addLabel(g,mxResources.get("right"),20);if(b.cellEditor.isContentEditing()){var Z=null,na=null;a.appendChild(this.createRelativeOption(mxResources.get("lineheight"),null,null,function(a){var c=""==a.value?120:parseInt(a.value),c=Math.max(0,isNaN(c)?120:c);null!=Z&&(b.cellEditor.restoreSelection(Z),Z=null);for(var d=b.getSelectedElement();null!=
+d&&d.nodeType!=mxConstants.NODETYPE_ELEMENT;)d=d.parentNode;null!=d&&d==b.cellEditor.textarea&&null!=b.cellEditor.textarea.firstChild&&("P"!=b.cellEditor.textarea.firstChild.nodeName&&(b.cellEditor.textarea.innerHTML="<p>"+b.cellEditor.textarea.innerHTML+"</p>"),d=b.cellEditor.textarea.firstChild);null!=d&&d!=b.cellEditor.textarea&&(d.style.lineHeight=c+"%");a.value=c+" %"},function(a){na=a;mxEvent.addListener(a,"mousedown",function(){Z=b.cellEditor.saveSelection()});mxEvent.addListener(a,"touchstart",
+function(){Z=b.cellEditor.saveSelection()});a.value="120 %"}));h=f.cloneNode(!1);h.style.paddingLeft="0px";g=this.editorUi.toolbar.addItems(["link","image"],h,!0);n=[this.editorUi.toolbar.addButton("geSprite-horizontalrule",mxResources.get("insertHorizontalRule"),function(){document.execCommand("inserthorizontalrule",!1,null)},h),this.editorUi.toolbar.addMenuFunctionInContainer(h,"geSprite-table",mxResources.get("table"),!1,mxUtils.bind(this,function(a){this.editorUi.menus.addInsertTableItem(a)}))];
+this.styleButtons(g);this.styleButtons(n);g=this.createPanel();g.style.paddingTop="10px";g.style.paddingBottom="10px";g.appendChild(this.createTitle(mxResources.get("insert")));g.appendChild(h);a.appendChild(g);mxClient.IS_QUIRKS&&(g.style.height="70");g=f.cloneNode(!1);g.style.paddingLeft="0px";n=[this.editorUi.toolbar.addButton("geSprite-insertcolumnbefore",mxResources.get("insertColumnBefore"),function(){try{null!=y&&b.selectNode(b.insertColumn(y,null!=I?I.cellIndex:0))}catch(R){alert(R)}},g),
+this.editorUi.toolbar.addButton("geSprite-insertcolumnafter",mxResources.get("insertColumnAfter"),function(){try{null!=y&&b.selectNode(b.insertColumn(y,null!=I?I.cellIndex+1:-1))}catch(R){alert(R)}},g),this.editorUi.toolbar.addButton("geSprite-deletecolumn",mxResources.get("deleteColumn"),function(){try{null!=y&&null!=I&&b.deleteColumn(y,I.cellIndex)}catch(R){alert(R)}},g),this.editorUi.toolbar.addButton("geSprite-insertrowbefore",mxResources.get("insertRowBefore"),function(){try{null!=y&&null!=L&&
+b.selectNode(b.insertRow(y,L.sectionRowIndex))}catch(R){alert(R)}},g),this.editorUi.toolbar.addButton("geSprite-insertrowafter",mxResources.get("insertRowAfter"),function(){try{null!=y&&null!=L&&b.selectNode(b.insertRow(y,L.sectionRowIndex+1))}catch(R){alert(R)}},g),this.editorUi.toolbar.addButton("geSprite-deleterow",mxResources.get("deleteRow"),function(){try{null!=y&&null!=L&&b.deleteRow(y,L.sectionRowIndex)}catch(R){alert(R)}},g)];this.styleButtons(n);n[2].style.marginRight="9px";h=this.createPanel();
 h.style.paddingTop="10px";h.style.paddingBottom="10px";h.appendChild(this.createTitle(mxResources.get("table")));h.appendChild(g);mxClient.IS_QUIRKS&&(mxUtils.br(a),h.style.height="70");f=f.cloneNode(!1);f.style.paddingLeft="0px";n=[this.editorUi.toolbar.addButton("geSprite-strokecolor",mxResources.get("borderColor"),mxUtils.bind(this,function(){if(null!=y){var a=y.style.borderColor.replace(/\brgb\s*\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*\)/g,function(a,b,c,d){return"#"+("0"+Number(b).toString(16)).substr(-2)+
 ("0"+Number(c).toString(16)).substr(-2)+("0"+Number(d).toString(16)).substr(-2)});this.editorUi.pickColor(a,function(a){null==a||a==mxConstants.NONE?(y.removeAttribute("border"),y.style.border="",y.style.borderCollapse=""):(y.setAttribute("border","1"),y.style.border="1px solid "+a,y.style.borderCollapse="collapse")})}}),f),this.editorUi.toolbar.addButton("geSprite-fillcolor",mxResources.get("backgroundColor"),mxUtils.bind(this,function(){if(null!=y){var a=y.style.backgroundColor.replace(/\brgb\s*\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*\)/g,
 function(a,b,c,d){return"#"+("0"+Number(b).toString(16)).substr(-2)+("0"+Number(c).toString(16)).substr(-2)+("0"+Number(d).toString(16)).substr(-2)});this.editorUi.pickColor(a,function(a){y.style.backgroundColor=null==a||a==mxConstants.NONE?"":a})}}),f),this.editorUi.toolbar.addButton("geSprite-fit",mxResources.get("spacing"),function(){if(null!=y){var a=y.getAttribute("cellPadding")||0,a=new FilenameDialog(d,a,mxResources.get("apply"),mxUtils.bind(this,function(a){null!=a&&0<a.length?y.setAttribute("cellPadding",
 a):y.removeAttribute("cellPadding")}),mxResources.get("spacing"));d.showDialog(a.container,300,80,!0,!0);a.init()}},f),this.editorUi.toolbar.addButton("geSprite-left",mxResources.get("left"),function(){null!=y&&y.setAttribute("align","left")},f),this.editorUi.toolbar.addButton("geSprite-center",mxResources.get("center"),function(){null!=y&&y.setAttribute("align","center")},f),this.editorUi.toolbar.addButton("geSprite-right",mxResources.get("right"),function(){null!=y&&y.setAttribute("align","right")},
-f)];this.styleButtons(n);n[2].style.marginRight="9px";mxClient.IS_QUIRKS&&(mxUtils.br(h),mxUtils.br(h));h.appendChild(f);a.appendChild(h);B=h}else a.appendChild(h),a.appendChild(this.createRelativeOption(mxResources.get("opacity"),mxConstants.STYLE_TEXT_OPACITY)),a.appendChild(g);var U=mxUtils.bind(this,function(a,b,d){e=this.format.getSelectionState();a=mxUtils.getValue(e.style,mxConstants.STYLE_FONTSTYLE,0);c(l[0],(a&mxConstants.FONT_BOLD)==mxConstants.FONT_BOLD);c(l[1],(a&mxConstants.FONT_ITALIC)==
-mxConstants.FONT_ITALIC);c(l[2],(a&mxConstants.FONT_UNDERLINE)==mxConstants.FONT_UNDERLINE);k.firstChild.nodeValue=mxUtils.htmlEntities(mxUtils.getValue(e.style,mxConstants.STYLE_FONTFAMILY,Menus.prototype.defaultFont));c(m,"0"==mxUtils.getValue(e.style,mxConstants.STYLE_HORIZONTAL,"1"));if(d||document.activeElement!=G)a=parseFloat(mxUtils.getValue(e.style,mxConstants.STYLE_FONTSIZE,Menus.prototype.defaultFontSize)),G.value=isNaN(a)?"":a+" pt";a=mxUtils.getValue(e.style,mxConstants.STYLE_ALIGN,mxConstants.ALIGN_CENTER);
-c(p,a==mxConstants.ALIGN_LEFT);c(q,a==mxConstants.ALIGN_CENTER);c(r,a==mxConstants.ALIGN_RIGHT);a=mxUtils.getValue(e.style,mxConstants.STYLE_VERTICAL_ALIGN,mxConstants.ALIGN_MIDDLE);c(u,a==mxConstants.ALIGN_TOP);c(w,a==mxConstants.ALIGN_MIDDLE);c(v,a==mxConstants.ALIGN_BOTTOM);a=mxUtils.getValue(e.style,mxConstants.STYLE_LABEL_POSITION,mxConstants.ALIGN_CENTER);b=mxUtils.getValue(e.style,mxConstants.STYLE_VERTICAL_LABEL_POSITION,mxConstants.ALIGN_MIDDLE);I.value=a==mxConstants.ALIGN_LEFT&&b==mxConstants.ALIGN_TOP?
+f)];this.styleButtons(n);n[2].style.marginRight="9px";mxClient.IS_QUIRKS&&(mxUtils.br(h),mxUtils.br(h));h.appendChild(f);a.appendChild(h);C=h}else a.appendChild(h),a.appendChild(this.createRelativeOption(mxResources.get("opacity"),mxConstants.STYLE_TEXT_OPACITY)),a.appendChild(g);var V=mxUtils.bind(this,function(a,b,d){e=this.format.getSelectionState();a=mxUtils.getValue(e.style,mxConstants.STYLE_FONTSTYLE,0);c(l[0],(a&mxConstants.FONT_BOLD)==mxConstants.FONT_BOLD);c(l[1],(a&mxConstants.FONT_ITALIC)==
+mxConstants.FONT_ITALIC);c(l[2],(a&mxConstants.FONT_UNDERLINE)==mxConstants.FONT_UNDERLINE);k.firstChild.nodeValue=mxUtils.htmlEntities(mxUtils.getValue(e.style,mxConstants.STYLE_FONTFAMILY,Menus.prototype.defaultFont));c(m,"0"==mxUtils.getValue(e.style,mxConstants.STYLE_HORIZONTAL,"1"));if(d||document.activeElement!=F)a=parseFloat(mxUtils.getValue(e.style,mxConstants.STYLE_FONTSIZE,Menus.prototype.defaultFontSize)),F.value=isNaN(a)?"":a+" pt";a=mxUtils.getValue(e.style,mxConstants.STYLE_ALIGN,mxConstants.ALIGN_CENTER);
+c(p,a==mxConstants.ALIGN_LEFT);c(q,a==mxConstants.ALIGN_CENTER);c(r,a==mxConstants.ALIGN_RIGHT);a=mxUtils.getValue(e.style,mxConstants.STYLE_VERTICAL_ALIGN,mxConstants.ALIGN_MIDDLE);c(w,a==mxConstants.ALIGN_TOP);c(u,a==mxConstants.ALIGN_MIDDLE);c(v,a==mxConstants.ALIGN_BOTTOM);a=mxUtils.getValue(e.style,mxConstants.STYLE_LABEL_POSITION,mxConstants.ALIGN_CENTER);b=mxUtils.getValue(e.style,mxConstants.STYLE_VERTICAL_LABEL_POSITION,mxConstants.ALIGN_MIDDLE);J.value=a==mxConstants.ALIGN_LEFT&&b==mxConstants.ALIGN_TOP?
 "topLeft":a==mxConstants.ALIGN_CENTER&&b==mxConstants.ALIGN_TOP?"top":a==mxConstants.ALIGN_RIGHT&&b==mxConstants.ALIGN_TOP?"topRight":a==mxConstants.ALIGN_LEFT&&b==mxConstants.ALIGN_BOTTOM?"bottomLeft":a==mxConstants.ALIGN_CENTER&&b==mxConstants.ALIGN_BOTTOM?"bottom":a==mxConstants.ALIGN_RIGHT&&b==mxConstants.ALIGN_BOTTOM?"bottomRight":a==mxConstants.ALIGN_LEFT?"left":a==mxConstants.ALIGN_RIGHT?"right":"center";a=mxUtils.getValue(e.style,mxConstants.STYLE_TEXT_DIRECTION,mxConstants.DEFAULT_TEXT_DIRECTION);
-a==mxConstants.TEXT_DIRECTION_RTL?M.value="rightToLeft":a==mxConstants.TEXT_DIRECTION_LTR?M.value="leftToRight":a==mxConstants.TEXT_DIRECTION_AUTO&&(M.value="automatic");if(d||document.activeElement!=X)a=parseFloat(mxUtils.getValue(e.style,mxConstants.STYLE_SPACING,2)),X.value=isNaN(a)?"":a+" pt";if(d||document.activeElement!=W)a=parseFloat(mxUtils.getValue(e.style,mxConstants.STYLE_SPACING_TOP,0)),W.value=isNaN(a)?"":a+" pt";if(d||document.activeElement!=da)a=parseFloat(mxUtils.getValue(e.style,
-mxConstants.STYLE_SPACING_RIGHT,0)),da.value=isNaN(a)?"":a+" pt";if(d||document.activeElement!=ca)a=parseFloat(mxUtils.getValue(e.style,mxConstants.STYLE_SPACING_BOTTOM,0)),ca.value=isNaN(a)?"":a+" pt";if(d||document.activeElement!=ba)a=parseFloat(mxUtils.getValue(e.style,mxConstants.STYLE_SPACING_LEFT,0)),ba.value=isNaN(a)?"":a+" pt"});ia=this.installInputHandler(X,mxConstants.STYLE_SPACING,2,-999,999," pt");T=this.installInputHandler(W,mxConstants.STYLE_SPACING_TOP,0,-999,999," pt");ka=this.installInputHandler(da,
-mxConstants.STYLE_SPACING_RIGHT,0,-999,999," pt");ja=this.installInputHandler(ca,mxConstants.STYLE_SPACING_BOTTOM,0,-999,999," pt");aa=this.installInputHandler(ba,mxConstants.STYLE_SPACING_LEFT,0,-999,999," pt");this.addKeyHandler(G,U);this.addKeyHandler(X,U);this.addKeyHandler(W,U);this.addKeyHandler(da,U);this.addKeyHandler(ca,U);this.addKeyHandler(ba,U);b.getModel().addListener(mxEvent.CHANGE,U);this.listeners.push({destroy:function(){b.getModel().removeListener(U)}});U();if(b.cellEditor.isContentEditing()){var la=
-!1,f=function(){la||(la=!0,window.setTimeout(function(){for(var a=b.getSelectedElement();null!=a&&a.nodeType!=mxConstants.NODETYPE_ELEMENT;)a=a.parentNode;if(null!=a){a==b.cellEditor.textarea&&1==b.cellEditor.textarea.children.length&&b.cellEditor.textarea.firstChild.nodeType==mxConstants.NODETYPE_ELEMENT&&(a=b.cellEditor.textarea.firstChild);var d=mxUtils.getCurrentStyle(a);if(null!=d){c(l[0],"bold"==d.fontWeight||null!=b.getParentByName(a,"B",b.cellEditor.textarea));c(l[1],"italic"==d.fontStyle||
-null!=b.getParentByName(a,"I",b.cellEditor.textarea));c(l[2],null!=b.getParentByName(a,"U",b.cellEditor.textarea));c(p,"left"==d.textAlign);c(q,"center"==d.textAlign);c(r,"right"==d.textAlign);c(C,"justify"==d.textAlign);c(x,null!=b.getParentByName(a,"SUP",b.cellEditor.textarea));c(A,null!=b.getParentByName(a,"SUB",b.cellEditor.textarea));y=b.getParentByName(a,"TABLE",b.cellEditor.textarea);K=null==y?null:b.getParentByName(a,"TR",y);J=null==y?null:b.getParentByName(a,"TD",y);B.style.display=null!=
-y?"":"none";if(document.activeElement!=G){"FONT"==a.nodeName&&"4"==a.getAttribute("size")&&null!=D?(a.removeAttribute("size"),a.style.fontSize=D+"px",D=null):G.value=parseFloat(d.fontSize)+" pt";var a=a.style.lineHeight||d.lineHeight,e=parseFloat(a);"px"==a.substring(a.length-2)&&(e/=parseFloat(d.fontSize));"%"!=a.substring(a.length-1)&&(e*=100);oa.value=e+" %"}a=d.color.replace(/\brgb\s*\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*\)/g,function(a,b,c,d){return"#"+("0"+Number(b).toString(16)).substr(-2)+
-("0"+Number(c).toString(16)).substr(-2)+("0"+Number(d).toString(16)).substr(-2)});e=d.backgroundColor.replace(/\brgb\s*\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*\)/g,function(a,b,c,d){return"#"+("0"+Number(b).toString(16)).substr(-2)+("0"+Number(c).toString(16)).substr(-2)+("0"+Number(d).toString(16)).substr(-2)});null!=P&&(V="#"==a.charAt(0)?a:"#000000",P(V,!0));null!=H&&(z="#"==e.charAt(0)?e:null,H(z,!0));null!=k.firstChild&&(d=d.fontFamily,"'"==d.charAt(0)&&(d=d.substring(1)),"'"==d.charAt(d.length-
-1)&&(d=d.substring(0,d.length-1)),'"'==d.charAt(0)&&(d=d.substring(1)),'"'==d.charAt(d.length-1)&&(d=d.substring(0,d.length-1)),k.firstChild.nodeValue=d)}}la=!1},0))};mxEvent.addListener(b.cellEditor.textarea,"input",f);mxEvent.addListener(b.cellEditor.textarea,"touchend",f);mxEvent.addListener(b.cellEditor.textarea,"mouseup",f);mxEvent.addListener(b.cellEditor.textarea,"keyup",f);this.listeners.push({destroy:function(){}});f()}return a};
+a==mxConstants.TEXT_DIRECTION_RTL?N.value="rightToLeft":a==mxConstants.TEXT_DIRECTION_LTR?N.value="leftToRight":a==mxConstants.TEXT_DIRECTION_AUTO&&(N.value="automatic");if(d||document.activeElement!=X)a=parseFloat(mxUtils.getValue(e.style,mxConstants.STYLE_SPACING,2)),X.value=isNaN(a)?"":a+" pt";if(d||document.activeElement!=ca)a=parseFloat(mxUtils.getValue(e.style,mxConstants.STYLE_SPACING_TOP,0)),ca.value=isNaN(a)?"":a+" pt";if(d||document.activeElement!=ea)a=parseFloat(mxUtils.getValue(e.style,
+mxConstants.STYLE_SPACING_RIGHT,0)),ea.value=isNaN(a)?"":a+" pt";if(d||document.activeElement!=da)a=parseFloat(mxUtils.getValue(e.style,mxConstants.STYLE_SPACING_BOTTOM,0)),da.value=isNaN(a)?"":a+" pt";if(d||document.activeElement!=Y)a=parseFloat(mxUtils.getValue(e.style,mxConstants.STYLE_SPACING_LEFT,0)),Y.value=isNaN(a)?"":a+" pt"});U=this.installInputHandler(X,mxConstants.STYLE_SPACING,2,-999,999," pt");W=this.installInputHandler(ca,mxConstants.STYLE_SPACING_TOP,0,-999,999," pt");ja=this.installInputHandler(ea,
+mxConstants.STYLE_SPACING_RIGHT,0,-999,999," pt");ba=this.installInputHandler(da,mxConstants.STYLE_SPACING_BOTTOM,0,-999,999," pt");ia=this.installInputHandler(Y,mxConstants.STYLE_SPACING_LEFT,0,-999,999," pt");this.addKeyHandler(F,V);this.addKeyHandler(X,V);this.addKeyHandler(ca,V);this.addKeyHandler(ea,V);this.addKeyHandler(da,V);this.addKeyHandler(Y,V);b.getModel().addListener(mxEvent.CHANGE,V);this.listeners.push({destroy:function(){b.getModel().removeListener(V)}});V();if(b.cellEditor.isContentEditing()){var ka=
+!1,f=function(){ka||(ka=!0,window.setTimeout(function(){for(var a=b.getSelectedElement();null!=a&&a.nodeType!=mxConstants.NODETYPE_ELEMENT;)a=a.parentNode;if(null!=a){a==b.cellEditor.textarea&&1==b.cellEditor.textarea.children.length&&b.cellEditor.textarea.firstChild.nodeType==mxConstants.NODETYPE_ELEMENT&&(a=b.cellEditor.textarea.firstChild);var d=mxUtils.getCurrentStyle(a);if(null!=d){c(l[0],"bold"==d.fontWeight||null!=b.getParentByName(a,"B",b.cellEditor.textarea));c(l[1],"italic"==d.fontStyle||
+null!=b.getParentByName(a,"I",b.cellEditor.textarea));c(l[2],null!=b.getParentByName(a,"U",b.cellEditor.textarea));c(p,"left"==d.textAlign);c(q,"center"==d.textAlign);c(r,"right"==d.textAlign);c(B,"justify"==d.textAlign);c(x,null!=b.getParentByName(a,"SUP",b.cellEditor.textarea));c(A,null!=b.getParentByName(a,"SUB",b.cellEditor.textarea));y=b.getParentByName(a,"TABLE",b.cellEditor.textarea);L=null==y?null:b.getParentByName(a,"TR",y);I=null==y?null:b.getParentByName(a,"TD",y);C.style.display=null!=
+y?"":"none";if(document.activeElement!=F){"FONT"==a.nodeName&&"4"==a.getAttribute("size")&&null!=E?(a.removeAttribute("size"),a.style.fontSize=E+"px",E=null):F.value=parseFloat(d.fontSize)+" pt";var a=a.style.lineHeight||d.lineHeight,e=parseFloat(a);"px"==a.substring(a.length-2)&&(e/=parseFloat(d.fontSize));"%"!=a.substring(a.length-1)&&(e*=100);na.value=e+" %"}a=d.color.replace(/\brgb\s*\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*\)/g,function(a,b,c,d){return"#"+("0"+Number(b).toString(16)).substr(-2)+
+("0"+Number(c).toString(16)).substr(-2)+("0"+Number(d).toString(16)).substr(-2)});e=d.backgroundColor.replace(/\brgb\s*\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*\)/g,function(a,b,c,d){return"#"+("0"+Number(b).toString(16)).substr(-2)+("0"+Number(c).toString(16)).substr(-2)+("0"+Number(d).toString(16)).substr(-2)});null!=Q&&(S="#"==a.charAt(0)?a:"#000000",Q(S,!0));null!=H&&(z="#"==e.charAt(0)?e:null,H(z,!0));null!=k.firstChild&&(d=d.fontFamily,"'"==d.charAt(0)&&(d=d.substring(1)),"'"==d.charAt(d.length-
+1)&&(d=d.substring(0,d.length-1)),'"'==d.charAt(0)&&(d=d.substring(1)),'"'==d.charAt(d.length-1)&&(d=d.substring(0,d.length-1)),k.firstChild.nodeValue=d)}}ka=!1},0))};mxEvent.addListener(b.cellEditor.textarea,"input",f);mxEvent.addListener(b.cellEditor.textarea,"touchend",f);mxEvent.addListener(b.cellEditor.textarea,"mouseup",f);mxEvent.addListener(b.cellEditor.textarea,"keyup",f);this.listeners.push({destroy:function(){}});f()}return a};
 StyleFormatPanel=function(a,c,d){BaseFormatPanel.call(this,a,c,d);this.init()};mxUtils.extend(StyleFormatPanel,BaseFormatPanel);
 StyleFormatPanel.prototype.init=function(){var a=this.format.getSelectionState();a.containsImage&&"image"!=a.style.shape||this.container.appendChild(this.addFill(this.createPanel()));this.container.appendChild(this.addStroke(this.createPanel()));this.container.appendChild(this.addLineJumps(this.createPanel()));a=this.createRelativeOption(mxResources.get("opacity"),mxConstants.STYLE_OPACITY,41);a.style.paddingTop="8px";a.style.paddingBottom="8px";this.container.appendChild(a);this.container.appendChild(this.addEffects(this.createPanel()));
 a=this.addEditOps(this.createPanel());null!=a.firstChild&&mxUtils.br(a);this.container.appendChild(this.addStyleOps(a))};
@@ -2919,8 +2921,8 @@ StyleFormatPanel.prototype.addFill=function(a){var c=this.editorUi.editor.graph,
 null==a||a==mxConstants.NONE?"none":""}),f="image"==d.style.shape?mxConstants.STYLE_IMAGE_BACKGROUND:mxConstants.STYLE_FILLCOLOR,h=this.createCellColorOption(mxResources.get("fill"),f,"#ffffff");h.style.fontWeight="bold";f=mxUtils.getValue(d.style,f,null);e.style.display=null!=f&&f!=mxConstants.NONE&&d.fill&&"image"!=d.style.shape?"":"none";for(var f=[mxConstants.DIRECTION_NORTH,mxConstants.DIRECTION_EAST,mxConstants.DIRECTION_SOUTH,mxConstants.DIRECTION_WEST],g=0;g<f.length;g++){var k=document.createElement("option");
 k.setAttribute("value",f[g]);mxUtils.write(k,mxResources.get(f[g]));b.appendChild(k)}e.appendChild(b);var l=mxUtils.bind(this,function(){d=this.format.getSelectionState();var c=mxUtils.getValue(d.style,mxConstants.STYLE_GRADIENT_DIRECTION,mxConstants.DIRECTION_SOUTH);""==c&&(c=mxConstants.DIRECTION_SOUTH);b.value=c;a.style.display=d.fill?"":"none";c=mxUtils.getValue(d.style,mxConstants.STYLE_FILLCOLOR,null);e.style.display=!d.fill||d.containsImage||null==c||c==mxConstants.NONE||"filledEdge"==d.style.shape?
 "none":""});c.getModel().addListener(mxEvent.CHANGE,l);this.listeners.push({destroy:function(){c.getModel().removeListener(l)}});l();mxEvent.addListener(b,"change",function(a){c.setCellStyles(mxConstants.STYLE_GRADIENT_DIRECTION,b.value,c.getSelectionCells());mxEvent.consume(a)});a.appendChild(h);a.appendChild(e);"swimlane"==d.style.shape&&a.appendChild(this.createCellColorOption(mxResources.get("laneColor"),"swimlaneFillColor","#ffffff"));return a};
-StyleFormatPanel.prototype.addStroke=function(a){function c(a){var c=parseInt(u.value),c=Math.min(999,Math.max(1,isNaN(c)?1:c));c!=mxUtils.getValue(f.style,mxConstants.STYLE_STROKEWIDTH,1)&&(e.setCellStyles(mxConstants.STYLE_STROKEWIDTH,c,e.getSelectionCells()),b.fireEvent(new mxEventObject("styleChanged","keys",[mxConstants.STYLE_STROKEWIDTH],"values",[c],"cells",e.getSelectionCells())));u.value=c+" pt";mxEvent.consume(a)}function d(a){var c=parseInt(w.value),c=Math.min(999,Math.max(1,isNaN(c)?1:
-c));c!=mxUtils.getValue(f.style,mxConstants.STYLE_STROKEWIDTH,1)&&(e.setCellStyles(mxConstants.STYLE_STROKEWIDTH,c,e.getSelectionCells()),b.fireEvent(new mxEventObject("styleChanged","keys",[mxConstants.STYLE_STROKEWIDTH],"values",[c],"cells",e.getSelectionCells())));w.value=c+" pt";mxEvent.consume(a)}var b=this.editorUi,e=b.editor.graph,f=this.format.getSelectionState();a.style.paddingTop="4px";a.style.paddingBottom="4px";a.style.whiteSpace="normal";var h=document.createElement("div");h.style.fontWeight=
+StyleFormatPanel.prototype.addStroke=function(a){function c(a){var c=parseInt(w.value),c=Math.min(999,Math.max(1,isNaN(c)?1:c));c!=mxUtils.getValue(f.style,mxConstants.STYLE_STROKEWIDTH,1)&&(e.setCellStyles(mxConstants.STYLE_STROKEWIDTH,c,e.getSelectionCells()),b.fireEvent(new mxEventObject("styleChanged","keys",[mxConstants.STYLE_STROKEWIDTH],"values",[c],"cells",e.getSelectionCells())));w.value=c+" pt";mxEvent.consume(a)}function d(a){var c=parseInt(u.value),c=Math.min(999,Math.max(1,isNaN(c)?1:
+c));c!=mxUtils.getValue(f.style,mxConstants.STYLE_STROKEWIDTH,1)&&(e.setCellStyles(mxConstants.STYLE_STROKEWIDTH,c,e.getSelectionCells()),b.fireEvent(new mxEventObject("styleChanged","keys",[mxConstants.STYLE_STROKEWIDTH],"values",[c],"cells",e.getSelectionCells())));u.value=c+" pt";mxEvent.consume(a)}var b=this.editorUi,e=b.editor.graph,f=this.format.getSelectionState();a.style.paddingTop="4px";a.style.paddingBottom="4px";a.style.whiteSpace="normal";var h=document.createElement("div");h.style.fontWeight=
 "bold";var g=document.createElement("select");g.style.position="absolute";g.style.marginTop="-2px";g.style.right="72px";g.style.width="80px";for(var k=["sharp","rounded","curved"],l=0;l<k.length;l++){var m=document.createElement("option");m.setAttribute("value",k[l]);mxUtils.write(m,mxResources.get(k[l]));g.appendChild(m)}mxEvent.addListener(g,"change",function(a){e.getModel().beginUpdate();try{var c=[mxConstants.STYLE_ROUNDED,mxConstants.STYLE_CURVED],d=["0",null];"rounded"==g.value?d=["1",null]:
 "curved"==g.value&&(d=[null,"1"]);for(var f=0;f<c.length;f++)e.setCellStyles(c[f],d[f],e.getSelectionCells());b.fireEvent(new mxEventObject("styleChanged","keys",c,"values",d,"cells",e.getSelectionCells()))}finally{e.getModel().endUpdate()}mxEvent.consume(a)});mxEvent.addListener(g,"click",function(a){mxEvent.consume(a)});var n="image"==f.style.shape?mxConstants.STYLE_IMAGE_BORDER:mxConstants.STYLE_STROKECOLOR,k=this.createCellColorOption(mxResources.get("line"),n,"#000000");k.appendChild(g);h.appendChild(k);
 var p=h.cloneNode(!1);p.style.fontWeight="normal";p.style.whiteSpace="nowrap";p.style.position="relative";p.style.paddingLeft="16px";p.style.marginBottom="2px";p.style.marginTop="2px";p.className="geToolbarContainer";var q=mxUtils.bind(this,function(a,b,c,d,e){a=this.editorUi.menus.styleChange(a,"",d,e,"geIcon",null);d=document.createElement("div");d.style.width=b+"px";d.style.height="1px";d.style.borderBottom="1px "+c+" black";d.style.paddingTop="6px";a.firstChild.firstChild.style.padding="0px 4px 0px 4px";
@@ -2929,13 +2931,13 @@ a.firstChild.firstChild.style.width=b+"px";a.firstChild.firstChild.appendChild(d
 mxResources.get("connection"),!1,mxUtils.bind(this,function(a){this.editorUi.menus.styleChange(a,"",[mxConstants.STYLE_SHAPE,mxConstants.STYLE_STARTSIZE,mxConstants.STYLE_ENDSIZE,"width"],[null,null,null,null],"geIcon geSprite geSprite-connection",null,!0).setAttribute("title",mxResources.get("line"));this.editorUi.menus.styleChange(a,"",[mxConstants.STYLE_SHAPE,mxConstants.STYLE_STARTSIZE,mxConstants.STYLE_ENDSIZE,"width"],["link",null,null,null],"geIcon geSprite geSprite-linkedge",null,!0).setAttribute("title",
 mxResources.get("link"));this.editorUi.menus.styleChange(a,"",[mxConstants.STYLE_SHAPE,mxConstants.STYLE_STARTSIZE,mxConstants.STYLE_ENDSIZE,"width"],["flexArrow",null,null,null],"geIcon geSprite geSprite-arrow",null,!0).setAttribute("title",mxResources.get("arrow"));this.editorUi.menus.styleChange(a,"",[mxConstants.STYLE_SHAPE,mxConstants.STYLE_STARTSIZE,mxConstants.STYLE_ENDSIZE,"width"],["arrow",null,null,null],"geIcon geSprite geSprite-simplearrow",null,!0).setAttribute("title",mxResources.get("simpleArrow"))})),
 m=this.editorUi.toolbar.addMenuFunctionInContainer(r,"geSprite-orthogonal",mxResources.get("pattern"),!1,mxUtils.bind(this,function(a){q(a,33,"solid",[mxConstants.STYLE_DASHED,mxConstants.STYLE_DASH_PATTERN],[null,null]).setAttribute("title",mxResources.get("solid"));q(a,33,"dashed",[mxConstants.STYLE_DASHED,mxConstants.STYLE_DASH_PATTERN],["1",null]).setAttribute("title",mxResources.get("dashed"));q(a,33,"dotted",[mxConstants.STYLE_DASHED,mxConstants.STYLE_DASH_PATTERN],["1","1 1"]).setAttribute("title",
-mxResources.get("dotted")+" (1)");q(a,33,"dotted",[mxConstants.STYLE_DASHED,mxConstants.STYLE_DASH_PATTERN],["1","1 2"]).setAttribute("title",mxResources.get("dotted")+" (2)");q(a,33,"dotted",[mxConstants.STYLE_DASHED,mxConstants.STYLE_DASH_PATTERN],["1","1 4"]).setAttribute("title",mxResources.get("dotted")+" (3)")})),k=p.cloneNode(!1),u=document.createElement("input");u.style.textAlign="right";u.style.marginTop="2px";u.style.width="41px";u.setAttribute("title",mxResources.get("linewidth"));p.appendChild(u);
-var w=u.cloneNode(!0);r.appendChild(w);var v=this.createStepper(u,c,1,9);v.style.display=u.style.display;v.style.marginTop="2px";p.appendChild(v);var A=this.createStepper(w,d,1,9);A.style.display=w.style.display;A.style.marginTop="2px";r.appendChild(A);mxClient.IS_QUIRKS?(u.style.height="17px",w.style.height="17px"):(u.style.position="absolute",u.style.right="32px",u.style.height="15px",v.style.right="20px",w.style.position="absolute",w.style.right="32px",w.style.height="15px",A.style.right="20px");
-mxEvent.addListener(u,"blur",c);mxEvent.addListener(u,"change",c);mxEvent.addListener(w,"blur",d);mxEvent.addListener(w,"change",d);mxClient.IS_QUIRKS&&(mxUtils.br(k),mxUtils.br(k));var x=this.editorUi.toolbar.addMenuFunctionInContainer(k,"geSprite-orthogonal",mxResources.get("waypoints"),!1,mxUtils.bind(this,function(a){"arrow"!=f.style.shape&&(this.editorUi.menus.edgeStyleChange(a,"",[mxConstants.STYLE_EDGE,mxConstants.STYLE_CURVED,mxConstants.STYLE_NOEDGESTYLE],[null,null,null],"geIcon geSprite geSprite-straight",
+mxResources.get("dotted")+" (1)");q(a,33,"dotted",[mxConstants.STYLE_DASHED,mxConstants.STYLE_DASH_PATTERN],["1","1 2"]).setAttribute("title",mxResources.get("dotted")+" (2)");q(a,33,"dotted",[mxConstants.STYLE_DASHED,mxConstants.STYLE_DASH_PATTERN],["1","1 4"]).setAttribute("title",mxResources.get("dotted")+" (3)")})),k=p.cloneNode(!1),w=document.createElement("input");w.style.textAlign="right";w.style.marginTop="2px";w.style.width="41px";w.setAttribute("title",mxResources.get("linewidth"));p.appendChild(w);
+var u=w.cloneNode(!0);r.appendChild(u);var v=this.createStepper(w,c,1,9);v.style.display=w.style.display;v.style.marginTop="2px";p.appendChild(v);var A=this.createStepper(u,d,1,9);A.style.display=u.style.display;A.style.marginTop="2px";r.appendChild(A);mxClient.IS_QUIRKS?(w.style.height="17px",u.style.height="17px"):(w.style.position="absolute",w.style.right="32px",w.style.height="15px",v.style.right="20px",u.style.position="absolute",u.style.right="32px",u.style.height="15px",A.style.right="20px");
+mxEvent.addListener(w,"blur",c);mxEvent.addListener(w,"change",c);mxEvent.addListener(u,"blur",d);mxEvent.addListener(u,"change",d);mxClient.IS_QUIRKS&&(mxUtils.br(k),mxUtils.br(k));var x=this.editorUi.toolbar.addMenuFunctionInContainer(k,"geSprite-orthogonal",mxResources.get("waypoints"),!1,mxUtils.bind(this,function(a){"arrow"!=f.style.shape&&(this.editorUi.menus.edgeStyleChange(a,"",[mxConstants.STYLE_EDGE,mxConstants.STYLE_CURVED,mxConstants.STYLE_NOEDGESTYLE],[null,null,null],"geIcon geSprite geSprite-straight",
 null,!0).setAttribute("title",mxResources.get("straight")),this.editorUi.menus.edgeStyleChange(a,"",[mxConstants.STYLE_EDGE,mxConstants.STYLE_CURVED,mxConstants.STYLE_NOEDGESTYLE],["orthogonalEdgeStyle",null,null],"geIcon geSprite geSprite-orthogonal",null,!0).setAttribute("title",mxResources.get("orthogonal")),this.editorUi.menus.edgeStyleChange(a,"",[mxConstants.STYLE_EDGE,mxConstants.STYLE_ELBOW,mxConstants.STYLE_CURVED,mxConstants.STYLE_NOEDGESTYLE],["elbowEdgeStyle",null,null,null],"geIcon geSprite geSprite-horizontalelbow",
 null,!0).setAttribute("title",mxResources.get("simple")),this.editorUi.menus.edgeStyleChange(a,"",[mxConstants.STYLE_EDGE,mxConstants.STYLE_ELBOW,mxConstants.STYLE_CURVED,mxConstants.STYLE_NOEDGESTYLE],["elbowEdgeStyle","vertical",null,null],"geIcon geSprite geSprite-verticalelbow",null,!0).setAttribute("title",mxResources.get("simple")),this.editorUi.menus.edgeStyleChange(a,"",[mxConstants.STYLE_EDGE,mxConstants.STYLE_ELBOW,mxConstants.STYLE_CURVED,mxConstants.STYLE_NOEDGESTYLE],["isometricEdgeStyle",
 null,null,null],"geIcon geSprite geSprite-horizontalisometric",null,!0).setAttribute("title",mxResources.get("isometric")),this.editorUi.menus.edgeStyleChange(a,"",[mxConstants.STYLE_EDGE,mxConstants.STYLE_ELBOW,mxConstants.STYLE_CURVED,mxConstants.STYLE_NOEDGESTYLE],["isometricEdgeStyle","vertical",null,null],"geIcon geSprite geSprite-verticalisometric",null,!0).setAttribute("title",mxResources.get("isometric")),"connector"==f.style.shape&&this.editorUi.menus.edgeStyleChange(a,"",[mxConstants.STYLE_EDGE,
-mxConstants.STYLE_CURVED,mxConstants.STYLE_NOEDGESTYLE],["orthogonalEdgeStyle","1",null],"geIcon geSprite geSprite-curved",null,!0).setAttribute("title",mxResources.get("curved")),this.editorUi.menus.edgeStyleChange(a,"",[mxConstants.STYLE_EDGE,mxConstants.STYLE_CURVED,mxConstants.STYLE_NOEDGESTYLE],["entityRelationEdgeStyle",null,null],"geIcon geSprite geSprite-entity",null,!0).setAttribute("title",mxResources.get("entityRelation")))})),C=this.editorUi.toolbar.addMenuFunctionInContainer(k,"geSprite-startclassic",
+mxConstants.STYLE_CURVED,mxConstants.STYLE_NOEDGESTYLE],["orthogonalEdgeStyle","1",null],"geIcon geSprite geSprite-curved",null,!0).setAttribute("title",mxResources.get("curved")),this.editorUi.menus.edgeStyleChange(a,"",[mxConstants.STYLE_EDGE,mxConstants.STYLE_CURVED,mxConstants.STYLE_NOEDGESTYLE],["entityRelationEdgeStyle",null,null],"geIcon geSprite geSprite-entity",null,!0).setAttribute("title",mxResources.get("entityRelation")))})),B=this.editorUi.toolbar.addMenuFunctionInContainer(k,"geSprite-startclassic",
 mxResources.get("linestart"),!1,mxUtils.bind(this,function(a){if("connector"==f.style.shape||"flexArrow"==f.style.shape){var b=this.editorUi.menus.edgeStyleChange(a,"",[mxConstants.STYLE_STARTARROW,"startFill"],[mxConstants.NONE,0],"geIcon",null,!1);b.setAttribute("title",mxResources.get("none"));b.firstChild.firstChild.innerHTML='<font style="font-size:10px;">'+mxUtils.htmlEntities(mxResources.get("none"))+"</font>";"connector"==f.style.shape?(this.editorUi.menus.edgeStyleChange(a,"",[mxConstants.STYLE_STARTARROW,
 "startFill"],[mxConstants.ARROW_CLASSIC,1],"geIcon geSprite geSprite-startclassic",null,!1).setAttribute("title",mxResources.get("classic")),this.editorUi.menus.edgeStyleChange(a,"",[mxConstants.STYLE_STARTARROW,"startFill"],[mxConstants.ARROW_CLASSIC_THIN,1],"geIcon geSprite geSprite-startclassicthin",null,!1),this.editorUi.menus.edgeStyleChange(a,"",[mxConstants.STYLE_STARTARROW,"startFill"],[mxConstants.ARROW_OPEN,0],"geIcon geSprite geSprite-startopen",null,!1).setAttribute("title",mxResources.get("openArrow")),
 this.editorUi.menus.edgeStyleChange(a,"",[mxConstants.STYLE_STARTARROW,"startFill"],[mxConstants.ARROW_OPEN_THIN,0],"geIcon geSprite geSprite-startopenthin",null,!1),this.editorUi.menus.edgeStyleChange(a,"",[mxConstants.STYLE_STARTARROW,"startFill"],["openAsync",0],"geIcon geSprite geSprite-startopenasync",null,!1),this.editorUi.menus.edgeStyleChange(a,"",[mxConstants.STYLE_STARTARROW,"startFill"],[mxConstants.ARROW_BLOCK,1],"geIcon geSprite geSprite-startblock",null,!1).setAttribute("title",mxResources.get("block")),
@@ -2947,7 +2949,7 @@ mxResources.get("block")),this.editorUi.menus.edgeStyleChange(a,"",[mxConstants.
 "",[mxConstants.STYLE_STARTARROW,"startFill"],["dash",0],"geIcon geSprite geSprite-startdash",null,!1),this.editorUi.menus.edgeStyleChange(a,"",[mxConstants.STYLE_STARTARROW,"startFill"],["cross",0],"geIcon geSprite geSprite-startcross",null,!1),this.editorUi.menus.edgeStyleChange(a,"",[mxConstants.STYLE_STARTARROW,"startFill"],["circlePlus",0],"geIcon geSprite geSprite-startcircleplus",null,!1),this.editorUi.menus.edgeStyleChange(a,"",[mxConstants.STYLE_STARTARROW,"startFill"],["circle",1],"geIcon geSprite geSprite-startcircle",
 null,!1),this.editorUi.menus.edgeStyleChange(a,"",[mxConstants.STYLE_STARTARROW,"startFill"],["ERone",0],"geIcon geSprite geSprite-starterone",null,!1),this.editorUi.menus.edgeStyleChange(a,"",[mxConstants.STYLE_STARTARROW,"startFill"],["ERmandOne",0],"geIcon geSprite geSprite-starteronetoone",null,!1),this.editorUi.menus.edgeStyleChange(a,"",[mxConstants.STYLE_STARTARROW,"startFill"],["ERmany",0],"geIcon geSprite geSprite-startermany",null,!1),this.editorUi.menus.edgeStyleChange(a,"",[mxConstants.STYLE_STARTARROW,
 "startFill"],["ERoneToMany",0],"geIcon geSprite geSprite-starteronetomany",null,!1),this.editorUi.menus.edgeStyleChange(a,"",[mxConstants.STYLE_STARTARROW,"startFill"],["ERzeroToOne",1],"geIcon geSprite geSprite-starteroneopt",null,!1),this.editorUi.menus.edgeStyleChange(a,"",[mxConstants.STYLE_STARTARROW,"startFill"],["ERzeroToMany",1],"geIcon geSprite geSprite-startermanyopt",null,!1)):this.editorUi.menus.edgeStyleChange(a,"",[mxConstants.STYLE_STARTARROW],[mxConstants.ARROW_BLOCK],"geIcon geSprite geSprite-startblocktrans",
-null,!1).setAttribute("title",mxResources.get("block"))}})),B=this.editorUi.toolbar.addMenuFunctionInContainer(k,"geSprite-endclassic",mxResources.get("lineend"),!1,mxUtils.bind(this,function(a){if("connector"==f.style.shape||"flexArrow"==f.style.shape){var b=this.editorUi.menus.edgeStyleChange(a,"",[mxConstants.STYLE_ENDARROW,"endFill"],[mxConstants.NONE,0],"geIcon",null,!1);b.setAttribute("title",mxResources.get("none"));b.firstChild.firstChild.innerHTML='<font style="font-size:10px;">'+mxUtils.htmlEntities(mxResources.get("none"))+
+null,!1).setAttribute("title",mxResources.get("block"))}})),C=this.editorUi.toolbar.addMenuFunctionInContainer(k,"geSprite-endclassic",mxResources.get("lineend"),!1,mxUtils.bind(this,function(a){if("connector"==f.style.shape||"flexArrow"==f.style.shape){var b=this.editorUi.menus.edgeStyleChange(a,"",[mxConstants.STYLE_ENDARROW,"endFill"],[mxConstants.NONE,0],"geIcon",null,!1);b.setAttribute("title",mxResources.get("none"));b.firstChild.firstChild.innerHTML='<font style="font-size:10px;">'+mxUtils.htmlEntities(mxResources.get("none"))+
 "</font>";"connector"==f.style.shape?(this.editorUi.menus.edgeStyleChange(a,"",[mxConstants.STYLE_ENDARROW,"endFill"],[mxConstants.ARROW_CLASSIC,1],"geIcon geSprite geSprite-endclassic",null,!1).setAttribute("title",mxResources.get("classic")),this.editorUi.menus.edgeStyleChange(a,"",[mxConstants.STYLE_ENDARROW,"endFill"],[mxConstants.ARROW_CLASSIC_THIN,1],"geIcon geSprite geSprite-endclassicthin",null,!1),this.editorUi.menus.edgeStyleChange(a,"",[mxConstants.STYLE_ENDARROW,"endFill"],[mxConstants.ARROW_OPEN,
 0],"geIcon geSprite geSprite-endopen",null,!1).setAttribute("title",mxResources.get("openArrow")),this.editorUi.menus.edgeStyleChange(a,"",[mxConstants.STYLE_ENDARROW,"endFill"],[mxConstants.ARROW_OPEN_THIN,0],"geIcon geSprite geSprite-endopenthin",null,!1),this.editorUi.menus.edgeStyleChange(a,"",[mxConstants.STYLE_ENDARROW,"endFill"],["openAsync",0],"geIcon geSprite geSprite-endopenasync",null,!1),this.editorUi.menus.edgeStyleChange(a,"",[mxConstants.STYLE_ENDARROW,"endFill"],[mxConstants.ARROW_BLOCK,
 1],"geIcon geSprite geSprite-endblock",null,!1).setAttribute("title",mxResources.get("block")),this.editorUi.menus.edgeStyleChange(a,"",[mxConstants.STYLE_ENDARROW,"endFill"],[mxConstants.ARROW_BLOCK_THIN,1],"geIcon geSprite geSprite-endblockthin",null,!1),this.editorUi.menus.edgeStyleChange(a,"",[mxConstants.STYLE_ENDARROW,"endFill"],["async",1],"geIcon geSprite geSprite-endasync",null,!1),this.editorUi.menus.edgeStyleChange(a,"",[mxConstants.STYLE_ENDARROW,"endFill"],[mxConstants.ARROW_OVAL,1],
@@ -2958,20 +2960,20 @@ null,!1).setAttribute("title",mxResources.get("oval")),this.editorUi.menus.edgeS
 "",[mxConstants.STYLE_ENDARROW,"endFill"],["dash",0],"geIcon geSprite geSprite-enddash",null,!1),this.editorUi.menus.edgeStyleChange(a,"",[mxConstants.STYLE_ENDARROW,"endFill"],["cross",0],"geIcon geSprite geSprite-endcross",null,!1),this.editorUi.menus.edgeStyleChange(a,"",[mxConstants.STYLE_ENDARROW,"endFill"],["circlePlus",0],"geIcon geSprite geSprite-endcircleplus",null,!1),this.editorUi.menus.edgeStyleChange(a,"",[mxConstants.STYLE_ENDARROW,"endFill"],["circle",1],"geIcon geSprite geSprite-endcircle",
 null,!1),this.editorUi.menus.edgeStyleChange(a,"",[mxConstants.STYLE_ENDARROW,"endFill"],["ERone",0],"geIcon geSprite geSprite-enderone",null,!1),this.editorUi.menus.edgeStyleChange(a,"",[mxConstants.STYLE_ENDARROW,"endFill"],["ERmandOne",0],"geIcon geSprite geSprite-enderonetoone",null,!1),this.editorUi.menus.edgeStyleChange(a,"",[mxConstants.STYLE_ENDARROW,"endFill"],["ERmany",0],"geIcon geSprite geSprite-endermany",null,!1),this.editorUi.menus.edgeStyleChange(a,"",[mxConstants.STYLE_ENDARROW,"endFill"],
 ["ERoneToMany",0],"geIcon geSprite geSprite-enderonetomany",null,!1),this.editorUi.menus.edgeStyleChange(a,"",[mxConstants.STYLE_ENDARROW,"endFill"],["ERzeroToOne",1],"geIcon geSprite geSprite-enderoneopt",null,!1),this.editorUi.menus.edgeStyleChange(a,"",[mxConstants.STYLE_ENDARROW,"endFill"],["ERzeroToMany",1],"geIcon geSprite geSprite-endermanyopt",null,!1)):this.editorUi.menus.edgeStyleChange(a,"",[mxConstants.STYLE_ENDARROW],[mxConstants.ARROW_BLOCK],"geIcon geSprite geSprite-endblocktrans",
-null,!1).setAttribute("title",mxResources.get("block"))}}));this.addArrow(t,8);this.addArrow(x);this.addArrow(C);this.addArrow(B);v=this.addArrow(l,9);v.className="geIcon";v.style.width="84px";A=this.addArrow(m,9);A.className="geIcon";A.style.width="22px";var y=document.createElement("div");y.style.width="85px";y.style.height="1px";y.style.borderBottom="1px solid black";y.style.marginBottom="9px";v.appendChild(y);var J=document.createElement("div");J.style.width="23px";J.style.height="1px";J.style.borderBottom=
-"1px solid black";J.style.marginBottom="9px";A.appendChild(J);l.style.height="15px";m.style.height="15px";t.style.height="15px";x.style.height="17px";C.style.marginLeft="3px";C.style.height="17px";B.style.marginLeft="3px";B.style.height="17px";a.appendChild(h);a.appendChild(r);a.appendChild(p);l=p.cloneNode(!1);l.style.paddingBottom="6px";l.style.paddingTop="4px";l.style.fontWeight="normal";m=document.createElement("div");m.style.position="absolute";m.style.marginLeft="3px";m.style.marginBottom="12px";
-m.style.marginTop="2px";m.style.fontWeight="normal";m.style.width="76px";mxUtils.write(m,mxResources.get("lineend"));l.appendChild(m);var K,I,F=this.addUnitInput(l,"pt",74,33,function(){K.apply(this,arguments)}),E=this.addUnitInput(l,"pt",20,33,function(){I.apply(this,arguments)});mxUtils.br(l);v=document.createElement("div");v.style.height="8px";l.appendChild(v);m=m.cloneNode(!1);mxUtils.write(m,mxResources.get("linestart"));l.appendChild(m);var N,M,Q=this.addUnitInput(l,"pt",74,33,function(){N.apply(this,
-arguments)}),O=this.addUnitInput(l,"pt",20,33,function(){M.apply(this,arguments)});mxUtils.br(l);this.addLabel(l,mxResources.get("spacing"),74,50);this.addLabel(l,mxResources.get("size"),20,50);mxUtils.br(l);h=h.cloneNode(!1);h.style.fontWeight="normal";h.style.position="relative";h.style.paddingLeft="16px";h.style.marginBottom="2px";h.style.marginTop="6px";h.style.borderWidth="0px";h.style.paddingBottom="18px";m=document.createElement("div");m.style.position="absolute";m.style.marginLeft="3px";m.style.marginBottom=
-"12px";m.style.marginTop="1px";m.style.fontWeight="normal";m.style.width="120px";mxUtils.write(m,mxResources.get("perimeter"));h.appendChild(m);var G,D=this.addUnitInput(h,"pt",20,41,function(){G.apply(this,arguments)});f.edges.length==e.getSelectionCount()?(a.appendChild(k),mxClient.IS_QUIRKS&&(mxUtils.br(a),mxUtils.br(a)),a.appendChild(l)):f.vertices.length==e.getSelectionCount()&&(mxClient.IS_QUIRKS&&mxUtils.br(a),a.appendChild(h));var H=mxUtils.bind(this,function(a,c,d){function h(a,c,d,e){d=
-d.getElementsByTagName("div")[0];d.className=b.getCssClassForMarker(e,f.style.shape,a,c);"geSprite geSprite-noarrow"==d.className&&(d.innerHTML=mxUtils.htmlEntities(mxResources.get("none")),d.style.backgroundImage="none",d.style.verticalAlign="top",d.style.marginTop="5px",d.style.fontSize="10px",d.nextSibling.style.marginTop="0px");return d}f=this.format.getSelectionState();mxUtils.getValue(f.style,n,null);if(d||document.activeElement!=u)a=parseInt(mxUtils.getValue(f.style,mxConstants.STYLE_STROKEWIDTH,
-1)),u.value=isNaN(a)?"":a+" pt";if(d||document.activeElement!=w)a=parseInt(mxUtils.getValue(f.style,mxConstants.STYLE_STROKEWIDTH,1)),w.value=isNaN(a)?"":a+" pt";g.style.visibility="connector"==f.style.shape||"filledEdge"==f.style.shape?"":"hidden";"1"==mxUtils.getValue(f.style,mxConstants.STYLE_CURVED,null)?g.value="curved":"1"==mxUtils.getValue(f.style,mxConstants.STYLE_ROUNDED,null)&&(g.value="rounded");"1"==mxUtils.getValue(f.style,mxConstants.STYLE_DASHED,null)?null==mxUtils.getValue(f.style,
-mxConstants.STYLE_DASH_PATTERN,null)?y.style.borderBottom="1px dashed black":y.style.borderBottom="1px dotted black":y.style.borderBottom="1px solid black";J.style.borderBottom=y.style.borderBottom;a=x.getElementsByTagName("div")[0];c=mxUtils.getValue(f.style,mxConstants.STYLE_EDGE,null);"1"==mxUtils.getValue(f.style,mxConstants.STYLE_NOEDGESTYLE,null)&&(c=null);"orthogonalEdgeStyle"==c&&"1"==mxUtils.getValue(f.style,mxConstants.STYLE_CURVED,null)?a.className="geSprite geSprite-curved":a.className=
+null,!1).setAttribute("title",mxResources.get("block"))}}));this.addArrow(t,8);this.addArrow(x);this.addArrow(B);this.addArrow(C);v=this.addArrow(l,9);v.className="geIcon";v.style.width="84px";A=this.addArrow(m,9);A.className="geIcon";A.style.width="22px";var y=document.createElement("div");y.style.width="85px";y.style.height="1px";y.style.borderBottom="1px solid black";y.style.marginBottom="9px";v.appendChild(y);var I=document.createElement("div");I.style.width="23px";I.style.height="1px";I.style.borderBottom=
+"1px solid black";I.style.marginBottom="9px";A.appendChild(I);l.style.height="15px";m.style.height="15px";t.style.height="15px";x.style.height="17px";B.style.marginLeft="3px";B.style.height="17px";C.style.marginLeft="3px";C.style.height="17px";a.appendChild(h);a.appendChild(r);a.appendChild(p);l=p.cloneNode(!1);l.style.paddingBottom="6px";l.style.paddingTop="4px";l.style.fontWeight="normal";m=document.createElement("div");m.style.position="absolute";m.style.marginLeft="3px";m.style.marginBottom="12px";
+m.style.marginTop="2px";m.style.fontWeight="normal";m.style.width="76px";mxUtils.write(m,mxResources.get("lineend"));l.appendChild(m);var L,J,G=this.addUnitInput(l,"pt",74,33,function(){L.apply(this,arguments)}),D=this.addUnitInput(l,"pt",20,33,function(){J.apply(this,arguments)});mxUtils.br(l);v=document.createElement("div");v.style.height="8px";l.appendChild(v);m=m.cloneNode(!1);mxUtils.write(m,mxResources.get("linestart"));l.appendChild(m);var K,N,P=this.addUnitInput(l,"pt",74,33,function(){K.apply(this,
+arguments)}),O=this.addUnitInput(l,"pt",20,33,function(){N.apply(this,arguments)});mxUtils.br(l);this.addLabel(l,mxResources.get("spacing"),74,50);this.addLabel(l,mxResources.get("size"),20,50);mxUtils.br(l);h=h.cloneNode(!1);h.style.fontWeight="normal";h.style.position="relative";h.style.paddingLeft="16px";h.style.marginBottom="2px";h.style.marginTop="6px";h.style.borderWidth="0px";h.style.paddingBottom="18px";m=document.createElement("div");m.style.position="absolute";m.style.marginLeft="3px";m.style.marginBottom=
+"12px";m.style.marginTop="1px";m.style.fontWeight="normal";m.style.width="120px";mxUtils.write(m,mxResources.get("perimeter"));h.appendChild(m);var F,E=this.addUnitInput(h,"pt",20,41,function(){F.apply(this,arguments)});f.edges.length==e.getSelectionCount()?(a.appendChild(k),mxClient.IS_QUIRKS&&(mxUtils.br(a),mxUtils.br(a)),a.appendChild(l)):f.vertices.length==e.getSelectionCount()&&(mxClient.IS_QUIRKS&&mxUtils.br(a),a.appendChild(h));var H=mxUtils.bind(this,function(a,c,d){function h(a,c,d,e){d=
+d.getElementsByTagName("div")[0];d.className=b.getCssClassForMarker(e,f.style.shape,a,c);"geSprite geSprite-noarrow"==d.className&&(d.innerHTML=mxUtils.htmlEntities(mxResources.get("none")),d.style.backgroundImage="none",d.style.verticalAlign="top",d.style.marginTop="5px",d.style.fontSize="10px",d.nextSibling.style.marginTop="0px");return d}f=this.format.getSelectionState();mxUtils.getValue(f.style,n,null);if(d||document.activeElement!=w)a=parseInt(mxUtils.getValue(f.style,mxConstants.STYLE_STROKEWIDTH,
+1)),w.value=isNaN(a)?"":a+" pt";if(d||document.activeElement!=u)a=parseInt(mxUtils.getValue(f.style,mxConstants.STYLE_STROKEWIDTH,1)),u.value=isNaN(a)?"":a+" pt";g.style.visibility="connector"==f.style.shape||"filledEdge"==f.style.shape?"":"hidden";"1"==mxUtils.getValue(f.style,mxConstants.STYLE_CURVED,null)?g.value="curved":"1"==mxUtils.getValue(f.style,mxConstants.STYLE_ROUNDED,null)&&(g.value="rounded");"1"==mxUtils.getValue(f.style,mxConstants.STYLE_DASHED,null)?null==mxUtils.getValue(f.style,
+mxConstants.STYLE_DASH_PATTERN,null)?y.style.borderBottom="1px dashed black":y.style.borderBottom="1px dotted black":y.style.borderBottom="1px solid black";I.style.borderBottom=y.style.borderBottom;a=x.getElementsByTagName("div")[0];c=mxUtils.getValue(f.style,mxConstants.STYLE_EDGE,null);"1"==mxUtils.getValue(f.style,mxConstants.STYLE_NOEDGESTYLE,null)&&(c=null);"orthogonalEdgeStyle"==c&&"1"==mxUtils.getValue(f.style,mxConstants.STYLE_CURVED,null)?a.className="geSprite geSprite-curved":a.className=
 "straight"==c||"none"==c||null==c?"geSprite geSprite-straight":"entityRelationEdgeStyle"==c?"geSprite geSprite-entity":"elbowEdgeStyle"==c?"geSprite "+("vertical"==mxUtils.getValue(f.style,mxConstants.STYLE_ELBOW,null)?"geSprite-verticalelbow":"geSprite-horizontalelbow"):"isometricEdgeStyle"==c?"geSprite "+("vertical"==mxUtils.getValue(f.style,mxConstants.STYLE_ELBOW,null)?"geSprite-verticalisometric":"geSprite-horizontalisometric"):"geSprite geSprite-orthogonal";t.getElementsByTagName("div")[0].className=
-"link"==f.style.shape?"geSprite geSprite-linkedge":"flexArrow"==f.style.shape?"geSprite geSprite-arrow":"arrow"==f.style.shape?"geSprite geSprite-simplearrow":"geSprite geSprite-connection";f.edges.length==e.getSelectionCount()?(r.style.display="",p.style.display="none"):(r.style.display="none",p.style.display="");a=h(mxUtils.getValue(f.style,mxConstants.STYLE_STARTARROW,null),mxUtils.getValue(f.style,"startFill","1"),C,"start");c=h(mxUtils.getValue(f.style,mxConstants.STYLE_ENDARROW,null),mxUtils.getValue(f.style,
-"endFill","1"),B,"end");"arrow"==f.style.shape?(a.className="geSprite geSprite-noarrow",c.className="geSprite geSprite-endblocktrans"):"link"==f.style.shape&&(a.className="geSprite geSprite-noarrow",c.className="geSprite geSprite-noarrow");mxUtils.setOpacity(x,"arrow"==f.style.shape?30:100);"connector"!=f.style.shape&&"flexArrow"!=f.style.shape?(mxUtils.setOpacity(C,30),mxUtils.setOpacity(B,30)):(mxUtils.setOpacity(C,100),mxUtils.setOpacity(B,100));if(d||document.activeElement!=O)a=parseInt(mxUtils.getValue(f.style,
-mxConstants.STYLE_STARTSIZE,mxConstants.DEFAULT_MARKERSIZE)),O.value=isNaN(a)?"":a+" pt";if(d||document.activeElement!=Q)a=parseInt(mxUtils.getValue(f.style,mxConstants.STYLE_SOURCE_PERIMETER_SPACING,0)),Q.value=isNaN(a)?"":a+" pt";if(d||document.activeElement!=E)a=parseInt(mxUtils.getValue(f.style,mxConstants.STYLE_ENDSIZE,mxConstants.DEFAULT_MARKERSIZE)),E.value=isNaN(a)?"":a+" pt";if(d||document.activeElement!=Q)a=parseInt(mxUtils.getValue(f.style,mxConstants.STYLE_TARGET_PERIMETER_SPACING,0)),
-F.value=isNaN(a)?"":a+" pt";if(d||document.activeElement!=D)a=parseInt(mxUtils.getValue(f.style,mxConstants.STYLE_PERIMETER_SPACING,0)),D.value=isNaN(a)?"":a+" pt"});M=this.installInputHandler(O,mxConstants.STYLE_STARTSIZE,mxConstants.DEFAULT_MARKERSIZE,0,999," pt");N=this.installInputHandler(Q,mxConstants.STYLE_SOURCE_PERIMETER_SPACING,0,-999,999," pt");I=this.installInputHandler(E,mxConstants.STYLE_ENDSIZE,mxConstants.DEFAULT_MARKERSIZE,0,999," pt");K=this.installInputHandler(F,mxConstants.STYLE_TARGET_PERIMETER_SPACING,
-0,-999,999," pt");G=this.installInputHandler(D,mxConstants.STYLE_PERIMETER_SPACING,0,0,999," pt");this.addKeyHandler(u,H);this.addKeyHandler(O,H);this.addKeyHandler(Q,H);this.addKeyHandler(E,H);this.addKeyHandler(F,H);this.addKeyHandler(D,H);e.getModel().addListener(mxEvent.CHANGE,H);this.listeners.push({destroy:function(){e.getModel().removeListener(H)}});H();return a};
+"link"==f.style.shape?"geSprite geSprite-linkedge":"flexArrow"==f.style.shape?"geSprite geSprite-arrow":"arrow"==f.style.shape?"geSprite geSprite-simplearrow":"geSprite geSprite-connection";f.edges.length==e.getSelectionCount()?(r.style.display="",p.style.display="none"):(r.style.display="none",p.style.display="");a=h(mxUtils.getValue(f.style,mxConstants.STYLE_STARTARROW,null),mxUtils.getValue(f.style,"startFill","1"),B,"start");c=h(mxUtils.getValue(f.style,mxConstants.STYLE_ENDARROW,null),mxUtils.getValue(f.style,
+"endFill","1"),C,"end");"arrow"==f.style.shape?(a.className="geSprite geSprite-noarrow",c.className="geSprite geSprite-endblocktrans"):"link"==f.style.shape&&(a.className="geSprite geSprite-noarrow",c.className="geSprite geSprite-noarrow");mxUtils.setOpacity(x,"arrow"==f.style.shape?30:100);"connector"!=f.style.shape&&"flexArrow"!=f.style.shape?(mxUtils.setOpacity(B,30),mxUtils.setOpacity(C,30)):(mxUtils.setOpacity(B,100),mxUtils.setOpacity(C,100));if(d||document.activeElement!=O)a=parseInt(mxUtils.getValue(f.style,
+mxConstants.STYLE_STARTSIZE,mxConstants.DEFAULT_MARKERSIZE)),O.value=isNaN(a)?"":a+" pt";if(d||document.activeElement!=P)a=parseInt(mxUtils.getValue(f.style,mxConstants.STYLE_SOURCE_PERIMETER_SPACING,0)),P.value=isNaN(a)?"":a+" pt";if(d||document.activeElement!=D)a=parseInt(mxUtils.getValue(f.style,mxConstants.STYLE_ENDSIZE,mxConstants.DEFAULT_MARKERSIZE)),D.value=isNaN(a)?"":a+" pt";if(d||document.activeElement!=P)a=parseInt(mxUtils.getValue(f.style,mxConstants.STYLE_TARGET_PERIMETER_SPACING,0)),
+G.value=isNaN(a)?"":a+" pt";if(d||document.activeElement!=E)a=parseInt(mxUtils.getValue(f.style,mxConstants.STYLE_PERIMETER_SPACING,0)),E.value=isNaN(a)?"":a+" pt"});N=this.installInputHandler(O,mxConstants.STYLE_STARTSIZE,mxConstants.DEFAULT_MARKERSIZE,0,999," pt");K=this.installInputHandler(P,mxConstants.STYLE_SOURCE_PERIMETER_SPACING,0,-999,999," pt");J=this.installInputHandler(D,mxConstants.STYLE_ENDSIZE,mxConstants.DEFAULT_MARKERSIZE,0,999," pt");L=this.installInputHandler(G,mxConstants.STYLE_TARGET_PERIMETER_SPACING,
+0,-999,999," pt");F=this.installInputHandler(E,mxConstants.STYLE_PERIMETER_SPACING,0,0,999," pt");this.addKeyHandler(w,H);this.addKeyHandler(O,H);this.addKeyHandler(P,H);this.addKeyHandler(D,H);this.addKeyHandler(G,H);this.addKeyHandler(E,H);e.getModel().addListener(mxEvent.CHANGE,H);this.listeners.push({destroy:function(){e.getModel().removeListener(H)}});H();return a};
 StyleFormatPanel.prototype.addLineJumps=function(a){var c=this.format.getSelectionState();if(Graph.lineJumpsEnabled&&0<c.edges.length&&0==c.vertices.length&&c.lineJumps){a.style.padding="8px 0px 24px 18px";var d=this.editorUi,b=d.editor.graph,e=document.createElement("div");e.style.position="absolute";e.style.fontWeight="bold";e.style.width="80px";mxUtils.write(e,mxResources.get("lineJumps"));a.appendChild(e);var f=document.createElement("select");f.style.position="absolute";f.style.marginTop="-2px";
 f.style.right="76px";f.style.width="62px";for(var e=["none","arc","gap","sharp"],h=0;h<e.length;h++){var g=document.createElement("option");g.setAttribute("value",e[h]);mxUtils.write(g,mxResources.get(e[h]));f.appendChild(g)}mxEvent.addListener(f,"change",function(a){b.getModel().beginUpdate();try{b.setCellStyles("jumpStyle",f.value,b.getSelectionCells()),d.fireEvent(new mxEventObject("styleChanged","keys",["jumpStyle"],"values",[f.value],"cells",b.getSelectionCells()))}finally{b.getModel().endUpdate()}mxEvent.consume(a)});
 mxEvent.addListener(f,"click",function(a){mxEvent.consume(a)});a.appendChild(f);var k,l=this.addUnitInput(a,"pt",22,33,function(){k.apply(this,arguments)});k=this.installInputHandler(l,"jumpSize",Graph.defaultJumpSize,0,999," pt");var m=mxUtils.bind(this,function(a,b,d){c=this.format.getSelectionState();f.value=mxUtils.getValue(c.style,"jumpStyle","none");if(d||document.activeElement!=l)a=parseInt(mxUtils.getValue(c.style,"jumpSize",Graph.defaultJumpSize)),l.value=isNaN(a)?"":a+" pt"});this.addKeyHandler(l,
@@ -3056,38 +3058,38 @@ var AboutDialog=function(a){var c=document.createElement("div");c.setAttribute("
 document.execCommand("selectAll",!1,null),Graph.fileSupport){var a=p.parentNode,b=null;mxEvent.addListener(a,"dragleave",function(a){null!=b&&(b.style.backgroundColor="",b=null);a.stopPropagation();a.preventDefault()});mxEvent.addListener(a,"dragover",mxUtils.bind(this,function(a){null==b&&(!mxClient.IS_IE||10<document.documentMode)&&(b=r,b.style.backgroundColor="#ebf2f9");a.stopPropagation();a.preventDefault()}));mxEvent.addListener(a,"drop",mxUtils.bind(this,function(a){null!=b&&(b.style.backgroundColor=
 "",b=null);0<=mxUtils.indexOf(a.dataTransfer.types,"text/uri-list")&&(r.value=decodeURIComponent(a.dataTransfer.getData("text/uri-list")),t.click());a.stopPropagation();a.preventDefault()}))}};n=document.createElement("td");n.appendChild(r);m.appendChild(n);null==e&&null!=h||q.appendChild(m);null!=h&&(m=document.createElement("tr"),n=document.createElement("td"),n.colSpan=2,n.appendChild(h),m.appendChild(n),q.appendChild(m));m=document.createElement("tr");n=document.createElement("td");n.colSpan=
 2;n.style.paddingTop="20px";n.style.whiteSpace="nowrap";n.setAttribute("align","right");c=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog();null!=l&&l()});c.className="geBtn";a.editor.cancelFirst&&n.appendChild(c);null!=g&&(d=mxUtils.button(mxResources.get("help"),function(){window.open(g)}),d.className="geBtn",n.appendChild(d));mxEvent.addListener(r,"keypress",function(a){13==a.keyCode&&t.click()});n.appendChild(t);a.editor.cancelFirst||n.appendChild(c);m.appendChild(n);q.appendChild(m);
-p.appendChild(q);this.container=p},TextareaDialog=function(a,c,d,b,e,f,h,g,k,l,m,n){h=null!=h?h:300;g=null!=g?g:120;l=null!=l?l:!1;var p,q,r=document.createElement("table"),t=document.createElement("tbody");p=document.createElement("tr");q=document.createElement("td");q.style.fontSize="10pt";q.style.width="100px";mxUtils.write(q,c);p.appendChild(q);t.appendChild(p);p=document.createElement("tr");q=document.createElement("td");var u=document.createElement("textarea");m&&u.setAttribute("wrap","off");
-u.setAttribute("spellcheck","false");u.setAttribute("autocorrect","off");u.setAttribute("autocomplete","off");u.setAttribute("autocapitalize","off");mxUtils.write(u,d||"");u.style.resize="none";u.style.width=h+"px";u.style.height=g+"px";this.textarea=u;this.init=function(){u.focus();u.scrollTop=0};q.appendChild(u);p.appendChild(q);t.appendChild(p);p=document.createElement("tr");q=document.createElement("td");q.style.paddingTop="14px";q.style.whiteSpace="nowrap";q.setAttribute("align","right");c=mxUtils.button(f||
-mxResources.get("cancel"),function(){a.hideDialog();null!=e&&e()});c.className="geBtn";a.editor.cancelFirst&&q.appendChild(c);null!=k&&k(q);null!=b&&(k=mxUtils.button(n||mxResources.get("apply"),function(){l||a.hideDialog();b(u.value)}),k.className="geBtn gePrimaryBtn",q.appendChild(k));a.editor.cancelFirst||q.appendChild(c);p.appendChild(q);t.appendChild(p);r.appendChild(t);this.container=r},EditDiagramDialog=function(a){var c=document.createElement("div");c.style.textAlign="right";var d=document.createElement("textarea");
+p.appendChild(q);this.container=p},TextareaDialog=function(a,c,d,b,e,f,h,g,k,l,m,n){h=null!=h?h:300;g=null!=g?g:120;l=null!=l?l:!1;var p,q,r=document.createElement("table"),t=document.createElement("tbody");p=document.createElement("tr");q=document.createElement("td");q.style.fontSize="10pt";q.style.width="100px";mxUtils.write(q,c);p.appendChild(q);t.appendChild(p);p=document.createElement("tr");q=document.createElement("td");var w=document.createElement("textarea");m&&w.setAttribute("wrap","off");
+w.setAttribute("spellcheck","false");w.setAttribute("autocorrect","off");w.setAttribute("autocomplete","off");w.setAttribute("autocapitalize","off");mxUtils.write(w,d||"");w.style.resize="none";w.style.width=h+"px";w.style.height=g+"px";this.textarea=w;this.init=function(){w.focus();w.scrollTop=0};q.appendChild(w);p.appendChild(q);t.appendChild(p);p=document.createElement("tr");q=document.createElement("td");q.style.paddingTop="14px";q.style.whiteSpace="nowrap";q.setAttribute("align","right");c=mxUtils.button(f||
+mxResources.get("cancel"),function(){a.hideDialog();null!=e&&e()});c.className="geBtn";a.editor.cancelFirst&&q.appendChild(c);null!=k&&k(q);null!=b&&(k=mxUtils.button(n||mxResources.get("apply"),function(){l||a.hideDialog();b(w.value)}),k.className="geBtn gePrimaryBtn",q.appendChild(k));a.editor.cancelFirst||q.appendChild(c);p.appendChild(q);t.appendChild(p);r.appendChild(t);this.container=r},EditDiagramDialog=function(a){var c=document.createElement("div");c.style.textAlign="right";var d=document.createElement("textarea");
 d.setAttribute("wrap","off");d.setAttribute("spellcheck","false");d.setAttribute("autocorrect","off");d.setAttribute("autocomplete","off");d.setAttribute("autocapitalize","off");d.style.overflow="auto";d.style.resize="none";d.style.width="600px";d.style.height="370px";d.style.marginBottom="16px";d.value=mxUtils.getPrettyXml(a.editor.getGraphXml());c.appendChild(d);this.init=function(){d.focus()};Graph.fileSupport&&(d.addEventListener("dragover",function(a){a.stopPropagation();a.preventDefault()},
 !1),d.addEventListener("drop",function(b){b.stopPropagation();b.preventDefault();if(0<b.dataTransfer.files.length){b=b.dataTransfer.files[0];var c=new FileReader;c.onload=function(a){d.value=a.target.result};c.readAsText(b)}else d.value=a.extractGraphModelFromEvent(b)},!1));var b=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog()});b.className="geBtn";a.editor.cancelFirst&&c.appendChild(b);var e=document.createElement("select");e.style.width="180px";e.className="geBtn";if(a.editor.graph.isEnabled()){var f=
 document.createElement("option");f.setAttribute("value","replace");mxUtils.write(f,mxResources.get("replaceExistingDrawing"));e.appendChild(f)}f=document.createElement("option");f.setAttribute("value","new");mxUtils.write(f,mxResources.get("openInNewWindow"));EditDiagramDialog.showNewWindowOption&&e.appendChild(f);a.editor.graph.isEnabled()&&(f=document.createElement("option"),f.setAttribute("value","import"),mxUtils.write(f,mxResources.get("addToExistingDrawing")),e.appendChild(f));c.appendChild(e);
 f=mxUtils.button(mxResources.get("ok"),function(){var b=a.editor.graph.zapGremlins(mxUtils.trim(d.value)),c=null;if("new"==e.value)window.openFile=new OpenFile(function(){a.hideDialog();window.openFile=null}),window.openFile.setData(b,null),window.open(a.getUrl());else if("replace"==e.value){a.editor.graph.model.beginUpdate();try{a.editor.setGraphXml(mxUtils.parseXml(b).documentElement),a.hideDialog()}catch(n){c=n}finally{a.editor.graph.model.endUpdate()}}else if("import"==e.value){a.editor.graph.model.beginUpdate();
 try{var f=mxUtils.parseXml(b),l=new mxGraphModel;(new mxCodec(f)).decode(f.documentElement,l);var m=l.getChildren(l.getChildAt(l.getRoot(),0));a.editor.graph.setSelectionCells(a.editor.graph.importCells(m));a.hideDialog()}catch(n){c=n}finally{a.editor.graph.model.endUpdate()}}null!=c&&mxUtils.alert(c.message)});f.className="geBtn gePrimaryBtn";c.appendChild(f);a.editor.cancelFirst||c.appendChild(b);this.container=c};EditDiagramDialog.showNewWindowOption=!0;
-var ExportDialog=function(a){function c(){var a=m.value,b=a.lastIndexOf(".");m.value=0<b?a.substring(0,b+1)+n.value:a+"."+n.value;"xml"===n.value?(p.setAttribute("disabled","true"),q.setAttribute("disabled","true"),r.setAttribute("disabled","true"),u.setAttribute("disabled","true")):(p.removeAttribute("disabled"),q.removeAttribute("disabled"),r.removeAttribute("disabled"),u.removeAttribute("disabled"));"png"===n.value||"svg"===n.value?t.removeAttribute("disabled"):t.setAttribute("disabled","disabled")}
+var ExportDialog=function(a){function c(){var a=m.value,b=a.lastIndexOf(".");m.value=0<b?a.substring(0,b+1)+n.value:a+"."+n.value;"xml"===n.value?(p.setAttribute("disabled","true"),q.setAttribute("disabled","true"),r.setAttribute("disabled","true"),w.setAttribute("disabled","true")):(p.removeAttribute("disabled"),q.removeAttribute("disabled"),r.removeAttribute("disabled"),w.removeAttribute("disabled"));"png"===n.value||"svg"===n.value?t.removeAttribute("disabled"):t.setAttribute("disabled","disabled")}
 function d(){q.style.backgroundColor=q.value*r.value>MAX_AREA||0>=q.value?"red":"";r.style.backgroundColor=q.value*r.value>MAX_AREA||0>=r.value?"red":""}var b=a.editor.graph,e=b.getGraphBounds(),f=b.view.scale,h=Math.ceil(e.width/f),g=Math.ceil(e.height/f),k,f=document.createElement("table"),l=document.createElement("tbody");f.setAttribute("cellpadding",mxClient.IS_SF?"0":"2");e=document.createElement("tr");k=document.createElement("td");k.style.fontSize="10pt";k.style.width="100px";mxUtils.write(k,
 mxResources.get("filename")+":");e.appendChild(k);var m=document.createElement("input");m.setAttribute("value",a.editor.getOrCreateFilename());m.style.width="180px";k=document.createElement("td");k.appendChild(m);e.appendChild(k);l.appendChild(e);e=document.createElement("tr");k=document.createElement("td");k.style.fontSize="10pt";mxUtils.write(k,mxResources.get("format")+":");e.appendChild(k);var n=document.createElement("select");n.style.width="180px";k=document.createElement("option");k.setAttribute("value",
 "png");mxUtils.write(k,mxResources.get("formatPng"));n.appendChild(k);k=document.createElement("option");ExportDialog.showGifOption&&(k.setAttribute("value","gif"),mxUtils.write(k,mxResources.get("formatGif")),n.appendChild(k));k=document.createElement("option");k.setAttribute("value","jpg");mxUtils.write(k,mxResources.get("formatJpg"));n.appendChild(k);k=document.createElement("option");k.setAttribute("value","pdf");mxUtils.write(k,mxResources.get("formatPdf"));n.appendChild(k);k=document.createElement("option");
 k.setAttribute("value","svg");mxUtils.write(k,mxResources.get("formatSvg"));n.appendChild(k);ExportDialog.showXmlOption&&(k=document.createElement("option"),k.setAttribute("value","xml"),mxUtils.write(k,mxResources.get("formatXml")),n.appendChild(k));k=document.createElement("td");k.appendChild(n);e.appendChild(k);l.appendChild(e);e=document.createElement("tr");k=document.createElement("td");k.style.fontSize="10pt";mxUtils.write(k,mxResources.get("zoom")+" (%):");e.appendChild(k);var p=document.createElement("input");
 p.setAttribute("type","number");p.setAttribute("value","100");p.style.width="180px";k=document.createElement("td");k.appendChild(p);e.appendChild(k);l.appendChild(e);e=document.createElement("tr");k=document.createElement("td");k.style.fontSize="10pt";mxUtils.write(k,mxResources.get("width")+":");e.appendChild(k);var q=document.createElement("input");q.setAttribute("value",h);q.style.width="180px";k=document.createElement("td");k.appendChild(q);e.appendChild(k);l.appendChild(e);e=document.createElement("tr");
 k=document.createElement("td");k.style.fontSize="10pt";mxUtils.write(k,mxResources.get("height")+":");e.appendChild(k);var r=document.createElement("input");r.setAttribute("value",g);r.style.width="180px";k=document.createElement("td");k.appendChild(r);e.appendChild(k);l.appendChild(e);e=document.createElement("tr");k=document.createElement("td");k.style.fontSize="10pt";mxUtils.write(k,mxResources.get("background")+":");e.appendChild(k);var t=document.createElement("input");t.setAttribute("type",
-"checkbox");t.checked=null==b.background||b.background==mxConstants.NONE;k=document.createElement("td");k.appendChild(t);mxUtils.write(k,mxResources.get("transparent"));e.appendChild(k);l.appendChild(e);e=document.createElement("tr");k=document.createElement("td");k.style.fontSize="10pt";mxUtils.write(k,mxResources.get("borderWidth")+":");e.appendChild(k);var u=document.createElement("input");u.setAttribute("type","number");u.setAttribute("value",ExportDialog.lastBorderValue);u.style.width="180px";
-k=document.createElement("td");k.appendChild(u);e.appendChild(k);l.appendChild(e);f.appendChild(l);mxEvent.addListener(n,"change",c);c();mxEvent.addListener(p,"change",function(){var a=Math.max(0,parseFloat(p.value)||100)/100;p.value=parseFloat((100*a).toFixed(2));0<h?(q.value=Math.floor(h*a),r.value=Math.floor(g*a)):(p.value="100",q.value=h,r.value=g);d()});mxEvent.addListener(q,"change",function(){var a=parseInt(q.value)/h;0<a?(p.value=parseFloat((100*a).toFixed(2)),r.value=Math.floor(g*a)):(p.value=
-"100",q.value=h,r.value=g);d()});mxEvent.addListener(r,"change",function(){var a=parseInt(r.value)/g;0<a?(p.value=parseFloat((100*a).toFixed(2)),q.value=Math.floor(h*a)):(p.value="100",q.value=h,r.value=g);d()});e=document.createElement("tr");k=document.createElement("td");k.setAttribute("align","right");k.style.paddingTop="22px";k.colSpan=2;var w=mxUtils.button(mxResources.get("export"),mxUtils.bind(this,function(){if(0>=parseInt(p.value))mxUtils.alert(mxResources.get("drawingEmpty"));else{var c=
-m.value,d=n.value,e=Math.max(0,parseFloat(p.value)||100)/100,f=Math.max(0,parseInt(u.value)),g=b.background;if(("svg"==d||"png"==d)&&t.checked)g=null;else if(null==g||g==mxConstants.NONE)g="#ffffff";ExportDialog.lastBorderValue=f;ExportDialog.exportFile(a,c,d,g,e,f)}}));w.className="geBtn gePrimaryBtn";var v=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog()});v.className="geBtn";a.editor.cancelFirst?(k.appendChild(v),k.appendChild(w)):(k.appendChild(w),k.appendChild(v));e.appendChild(k);
+"checkbox");t.checked=null==b.background||b.background==mxConstants.NONE;k=document.createElement("td");k.appendChild(t);mxUtils.write(k,mxResources.get("transparent"));e.appendChild(k);l.appendChild(e);e=document.createElement("tr");k=document.createElement("td");k.style.fontSize="10pt";mxUtils.write(k,mxResources.get("borderWidth")+":");e.appendChild(k);var w=document.createElement("input");w.setAttribute("type","number");w.setAttribute("value",ExportDialog.lastBorderValue);w.style.width="180px";
+k=document.createElement("td");k.appendChild(w);e.appendChild(k);l.appendChild(e);f.appendChild(l);mxEvent.addListener(n,"change",c);c();mxEvent.addListener(p,"change",function(){var a=Math.max(0,parseFloat(p.value)||100)/100;p.value=parseFloat((100*a).toFixed(2));0<h?(q.value=Math.floor(h*a),r.value=Math.floor(g*a)):(p.value="100",q.value=h,r.value=g);d()});mxEvent.addListener(q,"change",function(){var a=parseInt(q.value)/h;0<a?(p.value=parseFloat((100*a).toFixed(2)),r.value=Math.floor(g*a)):(p.value=
+"100",q.value=h,r.value=g);d()});mxEvent.addListener(r,"change",function(){var a=parseInt(r.value)/g;0<a?(p.value=parseFloat((100*a).toFixed(2)),q.value=Math.floor(h*a)):(p.value="100",q.value=h,r.value=g);d()});e=document.createElement("tr");k=document.createElement("td");k.setAttribute("align","right");k.style.paddingTop="22px";k.colSpan=2;var u=mxUtils.button(mxResources.get("export"),mxUtils.bind(this,function(){if(0>=parseInt(p.value))mxUtils.alert(mxResources.get("drawingEmpty"));else{var c=
+m.value,d=n.value,e=Math.max(0,parseFloat(p.value)||100)/100,f=Math.max(0,parseInt(w.value)),g=b.background;if(("svg"==d||"png"==d)&&t.checked)g=null;else if(null==g||g==mxConstants.NONE)g="#ffffff";ExportDialog.lastBorderValue=f;ExportDialog.exportFile(a,c,d,g,e,f)}}));u.className="geBtn gePrimaryBtn";var v=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog()});v.className="geBtn";a.editor.cancelFirst?(k.appendChild(v),k.appendChild(u)):(k.appendChild(u),k.appendChild(v));e.appendChild(k);
 l.appendChild(e);f.appendChild(l);this.container=f};ExportDialog.lastBorderValue=0;ExportDialog.showGifOption=!0;ExportDialog.showXmlOption=!0;
 ExportDialog.exportFile=function(a,c,d,b,e,f){var h=a.editor.graph;if("xml"==d)ExportDialog.saveLocalFile(a,mxUtils.getXml(a.editor.getGraphXml()),c,d);else if("svg"==d)ExportDialog.saveLocalFile(a,mxUtils.getXml(h.getSvg(b,e,f)),c,d);else{var g=h.getGraphBounds(),k=mxUtils.createXmlDocument(),l=k.createElement("output");k.appendChild(l);k=new mxXmlCanvas2D(l);k.translate(Math.floor((f/e-g.x)/h.view.scale),Math.floor((f/e-g.y)/h.view.scale));k.scale(e/h.view.scale);(new mxImageExport).drawState(h.getView().getState(h.model.root),
 k);l="xml="+encodeURIComponent(mxUtils.getXml(l));k=Math.ceil(g.width*e/h.view.scale+2*f);e=Math.ceil(g.height*e/h.view.scale+2*f);l.length<=MAX_REQUEST_SIZE&&k*e<MAX_AREA?(a.hideDialog(),(new mxXmlRequest(EXPORT_URL,"format="+d+"&filename="+encodeURIComponent(c)+"&bg="+(null!=b?b:"none")+"&w="+k+"&h="+e+"&"+l)).simulate(document,"_blank")):mxUtils.alert(mxResources.get("drawingTooLarge"))}};
 ExportDialog.saveLocalFile=function(a,c,d,b){c.length<MAX_REQUEST_SIZE?(a.hideDialog(),(new mxXmlRequest(SAVE_URL,"xml="+encodeURIComponent(c)+"&filename="+encodeURIComponent(d)+"&format="+b)).simulate(document,"_blank")):(mxUtils.alert(mxResources.get("drawingTooLarge")),mxUtils.popup(xml))};
-var EditDataDialog=function(a,c){function d(){0<t.value.length?u.removeAttribute("disabled"):u.setAttribute("disabled","disabled")}var b=document.createElement("div"),e=a.editor.graph;b.style.height="310px";b.style.overflow="auto";var f=e.getModel().getValue(c);if(!mxUtils.isNode(f)){var h=mxUtils.createXmlDocument().createElement("object");h.setAttribute("label",f||"");f=h}var g=new mxForm("properties");g.table.style.width="100%";g.table.style.paddingRight="20px";for(var h=f.attributes,k=[],l=[],
+var EditDataDialog=function(a,c){function d(){0<t.value.length?w.removeAttribute("disabled"):w.setAttribute("disabled","disabled")}var b=document.createElement("div"),e=a.editor.graph;b.style.height="310px";b.style.overflow="auto";var f=e.getModel().getValue(c);if(!mxUtils.isNode(f)){var h=mxUtils.createXmlDocument().createElement("object");h.setAttribute("label",f||"");f=h}var g=new mxForm("properties");g.table.style.width="100%";g.table.style.paddingRight="20px";for(var h=f.attributes,k=[],l=[],
 m=0,n=function(a,b){a.parentNode.style.marginRight="12px";var c=document.createElement("a"),d=mxUtils.createImage(Dialog.prototype.closeImage);d.style.height="9px";d.style.fontSize="9px";d.style.marginBottom=mxClient.IS_IE11?"-1px":"5px";c.className="geButton";c.setAttribute("title",mxResources.get("delete"));c.style.margin="0px";c.style.width="14px";c.style.height="14px";c.style.fontSize="14px";c.style.cursor="pointer";c.style.marginLeft="6px";c.appendChild(d);d=function(a){return function(){for(var b=
 0,c=0;c<k.length;c++){if(k[c]==a){l[c]=null;g.table.deleteRow(b);break}null!=l[c]&&b++}}}(b);mxEvent.addListener(c,"click",d);a.parentNode.style.whiteSpace="nowrap";a.parentNode.appendChild(c)},p=function(a,b,c){k[a]=b;l[a]=g.addTextarea(k[m]+":",c,2);l[a].style.width="100%";n(l[a],b)},q=[],r=0;r<h.length;r++)"label"!=h[r].nodeName&&"placeholders"!=h[r].nodeName&&q.push({name:h[r].nodeName,value:h[r].nodeValue});q.sort(function(a,b){return a.name<b.name?-1:a.name>b.name?1:0});for(r=0;r<q.length;r++)p(m,
-q[r].name,q[r].value),m++;b.appendChild(g.table);h=document.createElement("div");h.style.whiteSpace="nowrap";h.style.marginTop="6px";var t=document.createElement("input");t.setAttribute("placeholder",mxResources.get("enterPropertyName"));t.setAttribute("type","text");t.setAttribute("size",mxClient.IS_IE||mxClient.IS_IE11?"18":"22");t.style.marginLeft="2px";h.appendChild(t);b.appendChild(h);var u=mxUtils.button(mxResources.get("addProperty"),function(){var a=t.value;if(0<a.length&&"label"!=a&&"placeholders"!=
-a&&0>a.indexOf(":"))try{var b=mxUtils.indexOf(k,a);if(0<=b&&null!=l[b])l[b].focus();else{f.cloneNode(!1).setAttribute(a,"");0<=b&&(k.splice(b,1),l.splice(b,1));k.push(a);var c=g.addTextarea(a+":","",2);c.style.width="100%";l.push(c);n(c,a);c.focus()}t.value=""}catch(B){mxUtils.alert(B)}else mxUtils.alert(mxResources.get("invalidName"))});this.init=function(){0<l.length?l[0].focus():t.focus()};u.setAttribute("disabled","disabled");u.style.marginLeft="10px";u.style.width="144px";h.appendChild(u);h=
-mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog.apply(a,arguments)});h.className="geBtn";p=mxUtils.button(mxResources.get("apply"),function(){try{a.hideDialog.apply(a,arguments);f=f.cloneNode(!0);for(var b=!1,d=0;d<k.length;d++)null==l[d]?f.removeAttribute(k[d]):(f.setAttribute(k[d],l[d].value),b=b||"placeholder"==k[d]&&"1"==f.getAttribute("placeholders"));b&&f.removeAttribute("label");e.getModel().setValue(c,f)}catch(C){mxUtils.alert(C)}});p.className="geBtn gePrimaryBtn";mxEvent.addListener(t,
-"keyup",d);mxEvent.addListener(t,"change",d);q=document.createElement("div");q.style.marginTop="18px";q.style.textAlign="right";if(a.editor.graph.getModel().isVertex(c)||a.editor.graph.getModel().isEdge(c)){r=document.createElement("span");r.style.marginRight="10px";var w=document.createElement("input");w.setAttribute("type","checkbox");w.style.marginRight="6px";"1"==f.getAttribute("placeholders")&&(w.setAttribute("checked","checked"),w.defaultChecked=!0);mxEvent.addListener(w,"click",function(){"1"==
-f.getAttribute("placeholders")?f.removeAttribute("placeholders"):f.setAttribute("placeholders","1")});r.appendChild(w);mxUtils.write(r,mxResources.get("placeholders"));if(null!=EditDataDialog.placeholderHelpLink){w=document.createElement("a");w.setAttribute("href",EditDataDialog.placeholderHelpLink);w.setAttribute("title",mxResources.get("help"));w.setAttribute("target","_blank");w.style.marginLeft="10px";w.style.cursor="help";var v=document.createElement("img");v.setAttribute("border","0");v.setAttribute("valign",
-"middle");v.style.marginTop=mxClient.IS_IE11?"0px":"-4px";v.setAttribute("src",Editor.helpImage);w.appendChild(v);r.appendChild(w)}q.appendChild(r)}a.editor.cancelFirst?(q.appendChild(h),q.appendChild(p)):(q.appendChild(p),q.appendChild(h));b.appendChild(q);this.container=b};EditDataDialog.placeholderHelpLink=null;
+q[r].name,q[r].value),m++;b.appendChild(g.table);h=document.createElement("div");h.style.whiteSpace="nowrap";h.style.marginTop="6px";var t=document.createElement("input");t.setAttribute("placeholder",mxResources.get("enterPropertyName"));t.setAttribute("type","text");t.setAttribute("size",mxClient.IS_IE||mxClient.IS_IE11?"18":"22");t.style.marginLeft="2px";h.appendChild(t);b.appendChild(h);var w=mxUtils.button(mxResources.get("addProperty"),function(){var a=t.value;if(0<a.length&&"label"!=a&&"placeholders"!=
+a&&0>a.indexOf(":"))try{var b=mxUtils.indexOf(k,a);if(0<=b&&null!=l[b])l[b].focus();else{f.cloneNode(!1).setAttribute(a,"");0<=b&&(k.splice(b,1),l.splice(b,1));k.push(a);var c=g.addTextarea(a+":","",2);c.style.width="100%";l.push(c);n(c,a);c.focus()}t.value=""}catch(C){mxUtils.alert(C)}else mxUtils.alert(mxResources.get("invalidName"))});this.init=function(){0<l.length?l[0].focus():t.focus()};w.setAttribute("disabled","disabled");w.style.marginLeft="10px";w.style.width="144px";h.appendChild(w);h=
+mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog.apply(a,arguments)});h.className="geBtn";p=mxUtils.button(mxResources.get("apply"),function(){try{a.hideDialog.apply(a,arguments);f=f.cloneNode(!0);for(var b=!1,d=0;d<k.length;d++)null==l[d]?f.removeAttribute(k[d]):(f.setAttribute(k[d],l[d].value),b=b||"placeholder"==k[d]&&"1"==f.getAttribute("placeholders"));b&&f.removeAttribute("label");e.getModel().setValue(c,f)}catch(B){mxUtils.alert(B)}});p.className="geBtn gePrimaryBtn";mxEvent.addListener(t,
+"keyup",d);mxEvent.addListener(t,"change",d);q=document.createElement("div");q.style.marginTop="18px";q.style.textAlign="right";if(a.editor.graph.getModel().isVertex(c)||a.editor.graph.getModel().isEdge(c)){r=document.createElement("span");r.style.marginRight="10px";var u=document.createElement("input");u.setAttribute("type","checkbox");u.style.marginRight="6px";"1"==f.getAttribute("placeholders")&&(u.setAttribute("checked","checked"),u.defaultChecked=!0);mxEvent.addListener(u,"click",function(){"1"==
+f.getAttribute("placeholders")?f.removeAttribute("placeholders"):f.setAttribute("placeholders","1")});r.appendChild(u);mxUtils.write(r,mxResources.get("placeholders"));if(null!=EditDataDialog.placeholderHelpLink){u=document.createElement("a");u.setAttribute("href",EditDataDialog.placeholderHelpLink);u.setAttribute("title",mxResources.get("help"));u.setAttribute("target","_blank");u.style.marginLeft="10px";u.style.cursor="help";var v=document.createElement("img");v.setAttribute("border","0");v.setAttribute("valign",
+"middle");v.style.marginTop=mxClient.IS_IE11?"0px":"-4px";v.setAttribute("src",Editor.helpImage);u.appendChild(v);r.appendChild(u)}q.appendChild(r)}a.editor.cancelFirst?(q.appendChild(h),q.appendChild(p)):(q.appendChild(p),q.appendChild(h));b.appendChild(q);this.container=b};EditDataDialog.placeholderHelpLink=null;
 var LinkDialog=function(a,c,d,b){var e=document.createElement("div");mxUtils.write(e,mxResources.get("editLink")+":");var f=document.createElement("div");f.className="geTitle";f.style.backgroundColor="transparent";f.style.borderColor="transparent";f.style.whiteSpace="nowrap";f.style.textOverflow="clip";f.style.cursor="default";mxClient.IS_VML||(f.style.paddingRight="20px");var h=document.createElement("input");h.setAttribute("value",c);h.setAttribute("placeholder","http://www.example.com/");h.setAttribute("type",
 "text");h.style.marginTop="6px";h.style.width="400px";h.style.backgroundImage="url('"+Dialog.prototype.clearImage+"')";h.style.backgroundRepeat="no-repeat";h.style.backgroundPosition="100% 50%";h.style.paddingRight="14px";c=document.createElement("div");c.setAttribute("title",mxResources.get("reset"));c.style.position="relative";c.style.left="-16px";c.style.width="12px";c.style.height="14px";c.style.cursor="pointer";c.style.display=mxClient.IS_VML?"inline":"inline-block";c.style.top=(mxClient.IS_VML?
 0:3)+"px";c.style.background="url("+IMAGE_PATH+"/transparent.gif)";mxEvent.addListener(c,"click",function(){h.value="";h.focus()});f.appendChild(h);f.appendChild(c);e.appendChild(f);this.init=function(){h.focus();mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode||mxClient.IS_QUIRKS?h.select():document.execCommand("selectAll",!1,null)};f=document.createElement("div");f.style.marginTop="18px";f.style.textAlign="right";mxEvent.addListener(h,"keypress",function(c){13==c.keyCode&&(a.hideDialog(),
@@ -3099,21 +3101,21 @@ function(){k.suspended=!0}));this.window.addListener(mxEvent.NORMALIZE,mxUtils.b
 k.init(g);a.editor.addListener("resetGraphView",f);a.addListener("pageFormatChanged",f);a.addListener("backgroundColorChanged",f);a.addListener("backgroundImageChanged",f);a.addListener("pageViewChanged",function(){f();k.update(!0)});if(k.outline.dialect==mxConstants.DIALECT_SVG){var m=a.actions.get("zoomIn"),n=a.actions.get("zoomOut");mxEvent.addMouseWheelListener(function(a,b){for(var c=!1,d=mxEvent.getSource(a);null!=d;){if(d==k.outline.view.canvas.ownerSVGElement){c=!0;break}d=d.parentNode}c&&
 (b?m.funct():n.funct(),mxEvent.consume(a))})}},LayersWindow=function(a,c,d,b,e){function f(b){if(g.isEnabled()&&null!=b){var c=new FilenameDialog(a,b.value||mxResources.get("background"),mxResources.get("rename"),mxUtils.bind(this,function(a){null!=a&&g.getModel().setValue(b,a)}),mxResources.get("enterName"));a.showDialog(c.container,300,100,!0,!0);c.init()}}function h(){function a(a,b,c,d){var e=document.createElement("div");e.className="geToolbarContainer";e.style.overflow="hidden";e.style.position=
 "relative";e.style.padding="4px";e.style.height="22px";e.style.display="block";e.style.backgroundColor="whiteSmoke";e.style.borderWidth="0px 0px 1px 0px";e.style.borderColor="#c3c3c3";e.style.borderStyle="solid";e.style.whiteSpace="nowrap";var k=document.createElement("div");k.style.display="inline-block";k.style.width="100%";k.style.textOverflow="ellipsis";k.style.overflow="hidden";mxEvent.addListener(e,"dragover",function(b){b.dataTransfer.dropEffect="move";p=a;b.stopPropagation();b.preventDefault()});
-mxEvent.addListener(e,"dragstart",function(a){n=e;mxClient.IS_FF&&a.dataTransfer.setData("Text","<layer/>")});mxEvent.addListener(e,"dragend",function(a){null!=n&&null!=p&&g.addCell(c,g.model.root,p);p=n=null;a.stopPropagation();a.preventDefault()});var l=document.createElement("img");l.setAttribute("draggable","false");l.setAttribute("align","top");l.setAttribute("border","0");l.style.padding="4px";l.setAttribute("title",mxResources.get("lockUnlock"));var t=g.view.getState(c),x=null!=t?t.style:g.getCellStyle(c);
-"1"==mxUtils.getValue(x,"locked","0")?l.setAttribute("src",Dialog.prototype.lockedImage):l.setAttribute("src",Dialog.prototype.unlockedImage);g.isEnabled()&&(l.style.cursor="pointer");mxEvent.addListener(l,"click",function(a){if(g.isEnabled()){var b=null;g.getModel().beginUpdate();try{b="1"==mxUtils.getValue(x,"locked","0")?null:"1",g.setCellStyles("locked",b,[c])}finally{g.getModel().endUpdate()}"1"==b&&g.removeSelectionCells(g.getModel().getDescendants(c));mxEvent.consume(a)}});k.appendChild(l);
+mxEvent.addListener(e,"dragstart",function(a){n=e;mxClient.IS_FF&&a.dataTransfer.setData("Text","<layer/>")});mxEvent.addListener(e,"dragend",function(a){null!=n&&null!=p&&g.addCell(c,g.model.root,p);p=n=null;a.stopPropagation();a.preventDefault()});var l=document.createElement("img");l.setAttribute("draggable","false");l.setAttribute("align","top");l.setAttribute("border","0");l.style.padding="4px";l.setAttribute("title",mxResources.get("lockUnlock"));var t=g.view.getState(c),u=null!=t?t.style:g.getCellStyle(c);
+"1"==mxUtils.getValue(u,"locked","0")?l.setAttribute("src",Dialog.prototype.lockedImage):l.setAttribute("src",Dialog.prototype.unlockedImage);g.isEnabled()&&(l.style.cursor="pointer");mxEvent.addListener(l,"click",function(a){if(g.isEnabled()){var b=null;g.getModel().beginUpdate();try{b="1"==mxUtils.getValue(u,"locked","0")?null:"1",g.setCellStyles("locked",b,[c])}finally{g.getModel().endUpdate()}"1"==b&&g.removeSelectionCells(g.getModel().getDescendants(c));mxEvent.consume(a)}});k.appendChild(l);
 l=document.createElement("input");l.setAttribute("type","checkbox");l.setAttribute("title",mxResources.get("hideIt",[c.value||mxResources.get("background")]));l.style.marginLeft="4px";l.style.marginRight="6px";l.style.marginTop="4px";k.appendChild(l);g.model.isVisible(c)&&(l.setAttribute("checked","checked"),l.defaultChecked=!0);mxEvent.addListener(l,"click",function(a){g.model.setVisible(c,!g.model.isVisible(c));mxEvent.consume(a)});mxUtils.write(k,b);e.appendChild(k);if(g.isEnabled()){if(mxClient.IS_TOUCH||
 mxClient.IS_POINTER||mxClient.IS_VML||mxClient.IS_IE&&10>document.documentMode)b=document.createElement("div"),b.style.display="block",b.style.textAlign="right",b.style.whiteSpace="nowrap",b.style.position="absolute",b.style.right="6px",b.style.top="6px",0<a&&(k=document.createElement("a"),k.setAttribute("title",mxResources.get("toBack")),k.className="geButton",k.style.cssFloat="none",k.innerHTML="&#9660;",k.style.width="14px",k.style.height="14px",k.style.fontSize="14px",k.style.margin="0px",k.style.marginTop=
 "-1px",b.appendChild(k),mxEvent.addListener(k,"click",function(b){g.isEnabled()&&g.addCell(c,g.model.root,a-1);mxEvent.consume(b)})),0<=a&&a<q-1&&(k=document.createElement("a"),k.setAttribute("title",mxResources.get("toFront")),k.className="geButton",k.style.cssFloat="none",k.innerHTML="&#9650;",k.style.width="14px",k.style.height="14px",k.style.fontSize="14px",k.style.margin="0px",k.style.marginTop="-1px",b.appendChild(k),mxEvent.addListener(k,"click",function(b){g.isEnabled()&&g.addCell(c,g.model.root,
 a+1);mxEvent.consume(b)})),e.appendChild(b);mxClient.IS_SVG&&(!mxClient.IS_IE||10<=document.documentMode)&&(e.setAttribute("draggable","true"),e.style.cursor="move")}mxEvent.addListener(e,"dblclick",function(a){var b=mxEvent.getSource(a).nodeName;"INPUT"!=b&&"IMG"!=b&&(f(c),mxEvent.consume(a))});g.getDefaultParent()==c?(e.style.background="#e6eff8",e.style.fontWeight=g.isEnabled()?"bold":"",r=c):mxEvent.addListener(e,"click",function(a){g.isEnabled()&&(g.setDefaultParent(d),g.view.setCurrentRoot(null),
-h())});m.appendChild(e)}q=g.model.getChildCount(g.model.root);m.innerHTML="";for(var b=q-1;0<=b;b--)mxUtils.bind(this,function(c){a(b,c.value||mxResources.get("background"),c,c)})(g.model.getChildAt(g.model.root,b));u.setAttribute("title",mxResources.get("removeIt",[r.value||mxResources.get("background")]));w.setAttribute("title",mxResources.get("moveSelectionTo",[r.value||mxResources.get("background")]));A.setAttribute("title",mxResources.get("duplicateIt",[r.value||mxResources.get("background")]));
-v.setAttribute("title",mxResources.get("renameIt",[r.value||mxResources.get("background")]));g.isSelectionEmpty()&&(w.className="geButton mxDisabled")}var g=a.editor.graph,k=document.createElement("div");k.style.userSelect="none";k.style.background="whiteSmoke";k.style.border="1px solid whiteSmoke";k.style.height="100%";k.style.marginBottom="10px";k.style.overflow="auto";var l=EditorUi.compactUi?"26px":"30px",m=document.createElement("div");m.style.backgroundColor="#e5e5e5";m.style.position="absolute";
+h())});m.appendChild(e)}q=g.model.getChildCount(g.model.root);m.innerHTML="";for(var b=q-1;0<=b;b--)mxUtils.bind(this,function(c){a(b,c.value||mxResources.get("background"),c,c)})(g.model.getChildAt(g.model.root,b));w.setAttribute("title",mxResources.get("removeIt",[r.value||mxResources.get("background")]));u.setAttribute("title",mxResources.get("moveSelectionTo",[r.value||mxResources.get("background")]));A.setAttribute("title",mxResources.get("duplicateIt",[r.value||mxResources.get("background")]));
+v.setAttribute("title",mxResources.get("renameIt",[r.value||mxResources.get("background")]));g.isSelectionEmpty()&&(u.className="geButton mxDisabled")}var g=a.editor.graph,k=document.createElement("div");k.style.userSelect="none";k.style.background="whiteSmoke";k.style.border="1px solid whiteSmoke";k.style.height="100%";k.style.marginBottom="10px";k.style.overflow="auto";var l=EditorUi.compactUi?"26px":"30px",m=document.createElement("div");m.style.backgroundColor="#e5e5e5";m.style.position="absolute";
 m.style.overflow="auto";m.style.left="0px";m.style.right="0px";m.style.top="0px";m.style.bottom=parseInt(l)+7+"px";k.appendChild(m);var n=null,p=null;mxEvent.addListener(k,"dragover",function(a){a.dataTransfer.dropEffect="move";p=0;a.stopPropagation();a.preventDefault()});mxEvent.addListener(k,"drop",function(a){a.stopPropagation();a.preventDefault()});var q=null,r=null,t=document.createElement("div");t.className="geToolbarContainer";t.style.position="absolute";t.style.bottom="0px";t.style.left="0px";
-t.style.right="0px";t.style.height=l;t.style.overflow="hidden";t.style.padding=EditorUi.compactUi?"4px 0px 3px 0px":"1px";t.style.backgroundColor="whiteSmoke";t.style.borderWidth="1px 0px 0px 0px";t.style.borderColor="#c3c3c3";t.style.borderStyle="solid";t.style.display="block";t.style.whiteSpace="nowrap";mxClient.IS_QUIRKS&&(t.style.filter="none");l=document.createElement("a");l.className="geButton";mxClient.IS_QUIRKS&&(l.style.filter="none");var u=l.cloneNode();u.innerHTML='<div class="geSprite geSprite-delete" style="display:inline-block;"></div>';
-mxEvent.addListener(u,"click",function(a){if(g.isEnabled()){g.model.beginUpdate();try{var b=g.model.root.getIndex(r);g.removeCells([r],!1);0==g.model.getChildCount(g.model.root)?(g.model.add(g.model.root,new mxCell),g.setDefaultParent(null)):0<b&&b<=g.model.getChildCount(g.model.root)?g.setDefaultParent(g.model.getChildAt(g.model.root,b-1)):g.setDefaultParent(null)}finally{g.model.endUpdate()}}mxEvent.consume(a)});g.isEnabled()||(u.className="geButton mxDisabled");t.appendChild(u);var w=l.cloneNode();
-w.innerHTML='<div class="geSprite geSprite-insert" style="display:inline-block;"></div>';mxEvent.addListener(w,"click",function(a){g.isEnabled()&&!g.isSelectionEmpty()&&g.moveCells(g.getSelectionCells(),0,0,!1,r)});t.appendChild(w);var v=l.cloneNode();v.innerHTML='<div class="geSprite geSprite-dots" style="display:inline-block;"></div>';v.setAttribute("title",mxResources.get("rename"));mxEvent.addListener(v,"click",function(a){g.isEnabled()&&f(r);mxEvent.consume(a)});g.isEnabled()||(v.className="geButton mxDisabled");
+t.style.right="0px";t.style.height=l;t.style.overflow="hidden";t.style.padding=EditorUi.compactUi?"4px 0px 3px 0px":"1px";t.style.backgroundColor="whiteSmoke";t.style.borderWidth="1px 0px 0px 0px";t.style.borderColor="#c3c3c3";t.style.borderStyle="solid";t.style.display="block";t.style.whiteSpace="nowrap";mxClient.IS_QUIRKS&&(t.style.filter="none");l=document.createElement("a");l.className="geButton";mxClient.IS_QUIRKS&&(l.style.filter="none");var w=l.cloneNode();w.innerHTML='<div class="geSprite geSprite-delete" style="display:inline-block;"></div>';
+mxEvent.addListener(w,"click",function(a){if(g.isEnabled()){g.model.beginUpdate();try{var b=g.model.root.getIndex(r);g.removeCells([r],!1);0==g.model.getChildCount(g.model.root)?(g.model.add(g.model.root,new mxCell),g.setDefaultParent(null)):0<b&&b<=g.model.getChildCount(g.model.root)?g.setDefaultParent(g.model.getChildAt(g.model.root,b-1)):g.setDefaultParent(null)}finally{g.model.endUpdate()}}mxEvent.consume(a)});g.isEnabled()||(w.className="geButton mxDisabled");t.appendChild(w);var u=l.cloneNode();
+u.innerHTML='<div class="geSprite geSprite-insert" style="display:inline-block;"></div>';mxEvent.addListener(u,"click",function(a){g.isEnabled()&&!g.isSelectionEmpty()&&g.moveCells(g.getSelectionCells(),0,0,!1,r)});t.appendChild(u);var v=l.cloneNode();v.innerHTML='<div class="geSprite geSprite-dots" style="display:inline-block;"></div>';v.setAttribute("title",mxResources.get("rename"));mxEvent.addListener(v,"click",function(a){g.isEnabled()&&f(r);mxEvent.consume(a)});g.isEnabled()||(v.className="geButton mxDisabled");
 t.appendChild(v);var A=l.cloneNode();A.innerHTML='<div class="geSprite geSprite-duplicate" style="display:inline-block;"></div>';mxEvent.addListener(A,"click",function(a){if(g.isEnabled()){a=null;g.model.beginUpdate();try{a=g.cloneCells([r])[0],a.value=mxResources.get("untitledLayer"),a.setVisible(!0),a=g.addCell(a,g.model.root),g.setDefaultParent(a)}finally{g.model.endUpdate()}null==a||g.isCellLocked(a)||g.selectAll(a)}});g.isEnabled()||(A.className="geButton mxDisabled");t.appendChild(A);l=l.cloneNode();
 l.innerHTML='<div class="geSprite geSprite-plus" style="display:inline-block;"></div>';l.setAttribute("title",mxResources.get("addLayer"));mxEvent.addListener(l,"click",function(a){if(g.isEnabled()){g.model.beginUpdate();try{var b=g.addCell(new mxCell(mxResources.get("untitledLayer")),g.model.root);g.setDefaultParent(b)}finally{g.model.endUpdate()}}mxEvent.consume(a)});g.isEnabled()||(l.className="geButton mxDisabled");t.appendChild(l);k.appendChild(t);h();g.model.addListener(mxEvent.CHANGE,function(){h()});
-g.selectionModel.addListener(mxEvent.CHANGE,function(){g.isSelectionEmpty()?w.className="geButton mxDisabled":w.className="geButton"});this.window=new mxWindow(mxResources.get("layers"),k,c,d,b,e,!0,!0);this.window.destroyOnClose=!1;this.window.setMaximizable(!1);this.window.setResizable(!0);this.window.setClosable(!0);this.window.setVisible(!0);this.refreshLayers=h;this.window.setLocation=function(a,b){var c=window.innerHeight||document.documentElement.clientHeight||document.body.clientHeight;a=
+g.selectionModel.addListener(mxEvent.CHANGE,function(){g.isSelectionEmpty()?u.className="geButton mxDisabled":u.className="geButton"});this.window=new mxWindow(mxResources.get("layers"),k,c,d,b,e,!0,!0);this.window.destroyOnClose=!1;this.window.setMaximizable(!1);this.window.setResizable(!0);this.window.setClosable(!0);this.window.setVisible(!0);this.refreshLayers=h;this.window.setLocation=function(a,b){var c=window.innerHeight||document.documentElement.clientHeight||document.body.clientHeight;a=
 Math.max(0,Math.min(a,(window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth)-this.table.clientWidth));b=Math.max(0,Math.min(b,c-this.table.clientHeight-48));this.getX()==a&&this.getY()==b||mxWindow.prototype.setLocation.apply(this,arguments)};mxEvent.addListener(window,"resize",mxUtils.bind(this,function(){var a=this.window.getX(),b=this.window.getY();this.window.setLocation(a,b)}))};
 (function(){Sidebar.prototype.tagIndex="5V1dV+M6sv01rDvngax0oLvveYQEaGaAziE0PW8sxVYSDbblI9uk6V9/VVWS7ST+kB0zL3etbmIn3ltlfZRKUqkU/rpRLN6MmFJym5yM/8QL/Xnw7yLceXQ03fA3JaOTyfjCQCKZehvu66tErCMW6J9E1M4jlJcFTJWIPP1VIKK1ixj/zML4VBRiTMaf9HOKx8G7/lwy71V/ZJEv8Vv8cKea9KW646tU41nk678/4tK7SZVu5FpC9oz/TDPVnkEPJlsn4wVma1lEnVemGByy6q+M+SXkSmaQ6Vv27gJeBDzyOQDMu1ma5FVEEVBEtuokgQhdyZ62Uv/9qWWoYPRltgx4A3U970/hc6BnIuD+kdI+KbGTcelGce6ec4evOBl/k0r8llGKtWBTvulF98xVKjzEvxWXDVS/M8VHF57Hk0TDpzpxJQGScC9TIoX3euXvVV/UcWWpDFkqsCYyfaM/1ly36vGfgVhv0oiasyfh7ypgyaaBaKHl5/nThqb5VeAvZEigXx8k0AolJJUkVjo7jGBOHFOm29Se3FZin6VsyRL42V+2U90z9crTOGAeIEK8Q1UCnMlGxk4CLWb/gsflKt0y/MLnbzyQccgjaIivAjgTT/Gtr4Quf9cXXWRLjRKxyRwvkBko75hHnjisPzUkP/kyESnHtwoAtQ7kkrehL7UyzUAtLrh6E5g7Nnn9iYo2SWW8ZVr1QYsTIW8gE+ll5kHWQlXGdr/Qug1Zl/RDe2O4FL+fWPBaiJSUZGoDT6HRYT3DN9Gdgy4agY3Q59gj+iIOdAOB/MmYYlHKqYp5PMLaFHMVirSSG2XYySnnZrGHNW19JdaZoiYxGV8LbGq+9DKsT0APT3Sk1ldzXaZszQvOpfzlkndUYodytAPDOEuxuocyEqlUmM+Jbm6HevkAq0sAW8+MB9BmQJs+8HQr1Wup3G2zL6uCetJZjXKofV7J+FLnUUWtxZyLTYa20FzpV1GxEgnVdxH4JOgyS0QECr4F3z3nEUHWUQfUjUi/ZUv7tjqTGaCkl0q6Wou0Ef9tdhslUBAn9Xq4GshZkG6gTmx0m8EqvuGoYzb4iwMYdDnVMcpbS2QM3TYB3mM0Sp71/0fuSVPf7lmki1d10DN3LE6x0/CKut+GuddVgGpRyFCtc/sZYS/Cm9FySdUj3sgIPlOZeZvWNAm1o0uTXH81UO3zZEEqQDkwD5q37t+zdAOqNe/RS/aJ6Tdi5purBt73xV930PiLapT8HTTXqz2Kh7JloQ26bIlVOtAl6dIY9uBPMhbeCdgtu/ZLJeEe1XdduTSPrpc6v9+TlIf64jakMpeQ9RumQFVr3YiV3vcb+eZyy9Viw4Ogl1p+nM2xmofSyNSdYgHjnSzA6m26fu+wTKtwYM30S1LXTkxPsYp0qp+nbu8yg271r4xnWM3/hoseBI+8qttygmLlSfLhZtmsS7CZUd1Kds295iT2m4dTh7aH0qLgF2QqGo5qVVdLtHiPvIp2mdDXinvvXtBgGhLRI4/1sJs09z5TqY6sRCNVqlU+2qxPDNuRuxm20MqLmqNOO3CqHRqxEGEclC3jNtATkMOLhFZpOynrH5FAc3UlcKRsbJHvy/9wD8iylUSFJHhrrfmRYBPaZCGDZ2Mu6QXolr3prFf16OdvsxOjqyqUVPXzVEngw+g2Qrur8WehCxWnqu71sE9gv/QWnrSalK00WglxllLFX+VXVaxv1TMae7yFcRrlV2059PNiNr2+wdxh60gmKamJ7trRDvIm4xsecYXqxI7z6sQ5pICWKDHp6jFiEyjpgtLioL1lU6MmSu3VHZm0QtcI1RVNeKNzGAFJgWOKBdVznGCrFreM/HKITETdyKkM/N9DIDf2cRv0kkURtlU9wqmbZi0/PyWLbc1lyFPVML+0A1ISRx9xkOHMcnWTLiNmB8o4kjikjlm8b+zuQa+bh2qVmG/Gis+HAYE2zZHj9dAqLgPvJXahkWNuP0g0zcIlzrGtpFoK369Qp4fI78Vsse53lGDRGrMlOTTcK/GLUGcjKBk0xzyUesPi+L0VaKqwwAyJsZa1QTJg91Gn6b9BZebsYZ4EWlt2PIafME3WhvvJUC5Te5e2Njdi/n1Ck0qQDos8HmD1qimQAitlmqT6ctQuZDXuvnbYFeZDs2aGrHO/ahjiEB4oTQTESnp0FepuPqhLWeNGFz7OU3sdshlglzYxrUSzgBfmUpPpU8LfSSohuypUtyJVgTLzrapCYpy/3+DL1HLo4Th1tUbgDZjTrfLmYw6DMgpLG2I0PG/UXEiQW/NOdmUJieZWIW7X2uGxpS6pFOc56RJq59+ZiCutggPcaHoJq215aQnIhaXijIqAeoxY7hd6Pc9k/OvTeBi2SZ1U2lbpyNMkVUe2s1qpcEWpG5OW6/NQdOd1ghkTpgtRg1wd2O6nlP+f9Z8vZxfwynOo0yIS1pbu8OYu/Ocu/NVvUEv/5QzTGH+Y/OUEhn0BCXOdv2nZeStgGca+Qv6L7k7ply5yV/GeD8QLo1fUJVis52OdLdW54KDcdgnh5SdDsZ1NSMYB+OZKdzeemUTU5L0JH3kifOr+pplSdm3E9EwTKCDlNXeHjlznnbgWmcIlpZ0X/QQUdT2COw2+VZ0Kd6fBVlGvct2JMGdqdWQlzxMsG9Lo4HwchpO8t1pWzpe2cgxAAVrpeJrPA7zNF9SNx/N87cjBBXSnvLwsp4dPfK3sokXMwDiMauCrQEoVB2i9Bey9fj1h7/HRJWrVmXWaWeIi7ipTkTAdgiPDQphRZj22Bi7lq0fTbl2h0w0Tqg9OxgJ1nM/N6pIbiuZFE7liXfNo+vgERvfzSXkOrzSvVyFHBcuMJ6842apogGJHR51E2SWhBdl+REqP2OxKZIIDgS1TvqL5thqqCp6rgOvhBuYDTzwWmGsXEa71wwPk6zVcaZ47FkIjrJ6EqIZWLa7GMGIMmfmrW7EkNyArDMx8JmnhXlRB+321oo7PVnGvtapXsMwFw7kK/T2OSkWUpKp6+rYKrf/QRJeC6XD9w7ZpIF8CKtBcndvXI4uwewNXTBbHgYD5lo7YSR8sXymxhuVQrDNd4QtSB57RDp0K6Mm0O58nzb3DPoRyycB6JGn8MI7Anx2JPz8S/7kvXgpa79KqQ9HSTcBQ/4Dq0CotVVIe+nbu0/xkKWrPqZS05LyFLzx75yLJzx01EPRQJJW0vr5Ab1tYrMEaHdBdYnvoZrEA9Gg9ZohAmVtHhi359DlmAzyd92ievajkqEH/qHu+GnJYvo0JiMiv9m2vyT6h9WtStVreDrmUaYqylUmW9stWHl2ZhEr0QArLCm8gZwSuUij6ur3sc1PQFH7uT92evohejWaqqiltuElXXLmm/j+A3FjIVhsDuAQF1ydoG5BfGf87K1xIBdNpVK4S5xSjiyiSqXUn+oTtLzTmgdat7X4fNUyTY5imMgjIJXajR7XrgFU4I1Yj9z1PktyDoh1a69DRhEJPs9MSNoQvnJbIC5I5i82MfOy0OrWPXxSlbhwbwJ6vXeg7gIOHiil9HgQiTuwsYHWjr8NPeuOloiEoiV5XaDXoLAyNw1gWeda9L4NqX7NyvM/wpG3jZMXLa0aqbhGSsAFn0UuozURaL35jQQYGiTYcOKvsWCqRo2sRiYS26NxI6cPaVypx9ktnQdhXoNENLhtzM0/kZ3aeyLjHkczYqnhzu9ph/Z6liSi5G+P6TyFokoHR3FRfd9ie9YiCNrGY5SezVumCvRCoMEGUr5BFNCpS1oeBfqvWtnoQpKSAWhFK3EnQpJrNw+T0/cv401zY3LzE1TG/bT23nQQGnZGvh73YYAcmnIx/bsw2i+oq1JX6WLqFriXpUPlYSTZEfrYSf1BG9KKdg180DntLtdt48jVOf1iCvzLhveoeWqIBnV8syacIb5f7q8qNJMaS60e0sM8le6A9vkYOrShobmsmEhgugo691r1yQrtqXCtFI4+uD6aMOhRWwTjHybOe4lhwLxn0ANpM+Z2Yib+G2aAcpGvuSvAABIZafAJ2Et22IcEVW4us6wfq+C6S7kDBQsCcas+wbYINImS/0R7YcrQGi10FbJvU4Ua6m3mxj9J+pQVnCqd2rEttYr9oSL+eB7bmXeu/IU+ZTzZPf+Ir4x9kPrpAF1cLSNL6C1tPo2LHhSPNww7N3t7JPmyTMb3VZPywRzZoIt+enuYfnYbdoTEY6187mW23DfShmYyLPT4DEf5l0UfT/bwu08B8uRnq9mGCZWRP+GSoDsZpvH57U5ppvhet7F6MNzSYt1dTGkgx8LsuqYaeVNrCuL+tIwxz53URloZcHchRr/00+20P07A7cftJPgO3BzSObqMkNTPyh4nQhoxi6C+Kh7umeGXIdYrzyrTE4d5rV+7GdziaNakWdy8rutDfP+5Q6uGXHqZnFasiznRQXfSQERvNwMTfZtcLB/4N88lR1Bd6tC6Wmg837JK1nNA2OOekn+dT/fCb2WwBbrLizezlPixWZ8bSBMBkfKP5KGDE8MncwhpdhPvfPzKZR2kWM4anfp4/4AqMtort1M9HJXJkDjXvPK59fDR7j1goZ+Ci5eNlH6zuA1JT24fiScpErMTelfGWWtwxQgHFjjzCtuJuPPlabFdZTK9hI4CU1LD5pjsLmKV+V7LRWsksxg1IcNHhDR5nYFYqnRg0I1Y7DGhmMD12qaM7njEng/2Y6I//yONAG9BDsy/0hb98H4T2Hv7QJtJBMyPfgD54Nn9XzMNV9SGpaSsqKq/cRu6MBdc0PRqMupDoGiLfYQUGNXqIARPglobh11LlMYfykB2l7wahxgrlvX5sEk9cZ8huDzRQKtakbzDk+1FCsCUTpGAQ6tuLe/08bUXGeA7Ms1uV8of6M2tpff8UM/Pjklg8LY7ij2R0alrmSxLrke4KNjZKlWGvuIKL9jaT+K844epjECUbNApnkPOgUeM/X3eCrRwyjB44eY2kUW34pDKElvowWzyKrfPim8g6prYrSdGFbPU290OwgmbZRoHEXmVmBwR7emHQ9K589FG7k96B/hk0nQWuRNKy6Ee92NUl1NrCPFkWAbhqXT7dWLX8EYuTjUw/LIFnGWQh/wD6BXjF5f1UsZTtMB/UxgtxO0xUsg9OYDJGlyEbzSFpS1HaoA990z06HU8knhzZKFZAVIpoVV/L92CjS6WtHnxx8r5FZ4xmPbZPYSMdQGbmEnRmuZ+BSxs5k2zBqQJpskiklWy1PIuQ4XrcZbGXdyOzpNmGIhLrhZhgucX6peINVyxIRreX0Gvda5tspRiF2Sk8FlPjIwyemeTOGHtHJCIiCOR0sTgfj3fTib1jX+DJSDoQaa0feE+++5K/Z4mSnEGL3N11JS8SdE9HeEra2FrFD0fVEJwXKwldJ25PbrDKdG6T+y2FbhlOcDth5Q1LnHvED0S48Kx/2FCEsd33NxRhFplVkqLAB2obiywGV+ucayDaPBLSTg7QOnlfSrsfbDAhf+w3rmPInvWoA13OtB5XbLiypwg8lxB5eMgqVVuZanqbKm6MWRxY9lBCxLhk9Gl8cwW+HVN5dYJRLrKWiYZmurNPX2FH4z9mJNcfpaWJPG5yYKpu6aZ3cv+m5HAb00cnVgRBzXdi39v8OjrjroXiW7JZiggXhh5ecLu4/2OIdA7Ih+C0URSHz/MioFee56VEdMY8L6Zn4/H4j64J+jq/IUgmzp+b6y6wEYxlgxIykG1Rnohhky3pFde0sAJNcHzJEg7bJCks5iZrXimpI5rC90ezHIe2hvdxLPtLT+vGRajDkGp7CYT67+hf/B0KezcseyPicb7Q//TPKq5zGD7AVEZwdULma3qeVjJ2S57b61YwSp+Hph8BE1dXDgpQOjcGb+4p2SrbAdM3KdPcbjaf3VnymLd5WP3beUk+j7fsaqrn9TkFJPQrFsNcGBZy1fn98ihC1q+7DaDQ1oZqouwycRukFLu3dNmOgkittj46JoQQiBge6qE3zdklpmeydmfxSwdGCKWYi9Gw3aQOW5ZhVeZyJcFB35Yvc2AIX5xYT8lmDuyBqGnbgCttmK3uIAKaf9iKlahB3CBCP+hRsMARW0IkMy8dzS7A6PXFWtBxF0yb1JJOhojg6IqKWFkNZDzMIFCirvAwwaIr7K+WkNhVLLocKNmlbjNx2x6lKob77NeplWVXkmbJ2kgP6LoxmMDQJnrgRQixmXBHdhgHEO11GMbJcYxPF0YqWeLWYzXYy6PrBOx6MQuYNYk40E8+lv7so+hhS5RdIZybEIxJ7RrQAY/HYuYJYxPmN93Ro2mOpaLKnJtIDclkCBLIdnpKBu809V/B2YEQ9rFnzXF120k+DyHVvWn16MhY4oLxfZEUdGfgX8JJf4YhBSXl2riksJ0fl+Yc48rnacYyEc5p+kJbKDRMIc8YJ5TJ09OQexsW4VeTUzoFaZFHC9vWOfu40N3JzE/yubPiqi/fPEs25XHeA/R8EazqB3igGIZaadjY2JH9+y67VkgNe3SbuSkWPY1MtR4aXPYK/r7SC+6df/o6upieXkyJMbcictOiI9GslqgwW9z5ZkOSYUybzp1tCT0ZXwoa49uuqi/bZWEsrawB1RVvovH2ws8u9jK2wqZ0J6uoPkfyHdSigq/G1G2hFKsVV/nu8OOqwlXkqfcYV+Ujr4MSNvBv4piSv5N90S+6GISHsyroG8kqHFXr0GiLkSlkrztjR7cWaQxpYQKduHV8lTxnA/F8PoaHds5r9cvtqwllZuaP5Jr04rKxrai0aiNdteNB6XEtitG9YVy6dGx/u3UO7+rqXgt8BIeZbHRmSDrxBfxX7ozPnDnQxIkSZtd4ALvjNdHoOktsECndRI7iwMLi3LlRVZLgaGiZyIC7t85KovOjpLkNggwW7MwhRJdZAPMhwn4LrDY4HH4u6YFOaWCQOcp6yyXKyXaX2jBOBmREmsMMILbD/OiTDw8ch6gm5l5rEsfQm0o6QBIyWfE0gbKjyxM4p6UhNEcFdjSjpRyY14cFqO+L6ytY9Xg42RmGgd0b7Qfb70kNm9lKo61e1DnZ7XQgYXcZB5UR1hDw/AxdgV+HFHW+R3ysxA+nFlYqrk8nDQPyXoyTwRnPBmc8H5zx8+CMX45hnNeVde1ESC/GyeCMZ4Mzng/O+Hlwxi/9GaEI+vYPk8F1Qg3jETqhhvEInVDDeIROqGE8QifUMB6hEyaD64QaxiN0Qg3jETqhhvEInVDDeIROqGHsoxNknMoXM58ZCS8ZfcX127U5iH2Wh61O+Fvt8V59WXNf/tm8lILPPRGSP8XhGV1Oqf1Z8w6RqHUU6Eu6+womgePf4O5qtjcK46FI7Xmfh4sMHUgnA5MC1SnzUnR9wVj7UwjOkHgUfiQwR7Tlnl8wxY6ztXuTfE6pfddfnHoyi8mDDH4v7vqVK1Li6qZIaAYNHtn5oh/xfCNTabM1hpvqbK7le9GjQwwIhWPQ3eXYDmuvceC9BMz3uYIjmnUBfc/SOLNRNdvOdnYimvQmGkCW3lLAHouXRLcBs6wtjQtO6YtjuEY3T9+L5tDeEMz8W5rhMRpytYKbzbsytdA52dubqe2n7RkdmJbhR7+g1HxX4u/+fiahyYcn9IBud7c3l8V7JVmwm9pSxJIO16tsuv3SmvwX0zr7L6Z1/rFpzR/m/7Xy2knrg8trJ60PLq+dtD64vEBF2cjozv119wQmH5jArfXCwy1oVdqmnlFxyjr09OTdev1ErHWH/JLkcYfpqh98hCu2C8vAYC3RTAF75tSxHqSzEqk5mQOXy4dknXwI69lArM8YbPtNBmlb7O4GDlzfPZpj0p0k3cA+LbApXyhkLjoaNZ1d40BB1qnx4LbGaaVDdyVfrm6SOuXjit+Ztvhn5XTSf1wnqVpoJwPQzqul7TrsbqHsMyOyZW8c1qjRj9lcN2KFTL6OQInikrRX6yS+//ToApuTp3ibs0IZg4FVMCYjRjJIRUgRfEIR+U3L1iWOS4pZo3iMDlXOmK3ZLat01ZcZaXk4OMWRAEbHyQbdepby8BD7ShA1JGaiyXR7SylfMSnZdCJ3BQxEKyITQKzeRvfFMlYJvjKn3KVSBlWvWQOdsoBHvomT7l4dphsME+CLxMuSuvNoKoG79cfmsANQhrpFYVgNXzSPEXdQaKTQuBCnSsyR43ownoqKMwoqSTDc2X/YG3NN1pw20RyYrxLIjY+CrnKyRXeUYcWhIJ6MnRuXhWGHVFDELGnyJNkh2OKMnw11g4Ygd622V/bY+cn4H1dhnL7j7ss8brDizK2Jl3lM2GFgyqJKhjqSd7TIMX64iWZRLOk3nS1T4rgOWLLZceFwTf1aBqRfpFqzSPx2LnkCGte1ljM3dmDKaNXIxFtn+wc41SBvWIalAw242V4ogwI6tnGtP2t3cB6gvnE6eWjDtSVdtxPoECVRszSFIjnA3JXcTA6dXOigrHLNaKWLMDhbOXaomxw2eFN+ylHr5p9d9CuOxmLmGzVbeTBsNVa+klvSjTkTqSZcfA3+3kSKz1svt42yCP7eRpFjPepdikOenMHJjgyGxwFdjlPyJskyh+TpZEut1OQ6EnkQdyXa+IozQvPFCzdBJG2YyE/Ii/6HPnXBRNJ0uWmmlq08CcyoPgu+5XRoBzo61vWBMqbth22kb6Bj8RyhXGExPDHH+QUfJHYtekSFORtmCfouAkUgKs6QOyD4rm2dKD8L7M7E1dLGLK49KZlHcKjM+SpG3MZEGyx4hVFZh1IcnZ+9vQx0MDOq6cQb80Ba44HuJMQjz7vdleIJncQXc6z1iqfK4e0fi+cLipzVkYIe6y/Eopxp1fm6n58eur+vuTmvpZJ1Q2EGs9i8j1OeLvRQISZVOKX+Z5k5V++F7oTNWW0p6RITC84nS6kNrkcM+b7oxu3jh9AUc0JVO2XWgmS8LaJxtljmNQwHAxZfsZqzfA/hGTZVbKaOtlcVjTndDjV3w2Elhzh5MDZwwylt6Hm4CV33De8U3XYpnPv5H3HnavmDgt3AYbLMhv5gnlv3lkckbNf/u83PgdQsSMuMuoOKyNBV4J8soGhI1LbM8NwBJ66h7y1t+W6BYdiHqT0vsDhC0AlmZix3gmrStI6LSYccnQd0hCJtYU/oc4Fc/YrJWLGg1pJAmDnLt0tKd7rWGv1o8zUxh0e5ETzarPB5q0d+CWVsoi6iLuyZYf/4JpX4DU0mgKFhzXlhDjzP0Ga8niw42wdtd8MrzPIaUDe9jhhUL035tEYAnVM4Yj5s/RIJ8dccDVqB88zUEW3lzqeRHHAKxmbB6EEPPU+1HfV2sjO5507QBwvHclIoEjydTFtegtsjbu1nO0sxrWQuXVAwowseJnbKxVy6QPVzGUm9zNIUp160/j6hKMPgQ6Z/hwalvzSWRkjftNAaNZfgfq0LU2Pi3CDuSPCNNFBX/A03PRrO1PIUNZfpqk5aOqdKQjMYtaZAMSBsFkZXCFwOYUtYqG2JVRXjYYixMOe0Fhu88o5CSRNpm0drEXGudhtwmWkyHNWIwZ5Os7JjryE/U6F7s0qrrAI7urBIrfOmSibJ6SVnIYYAgztQFFXn0TqwXcMi+OllwPDA1znz/QCn6xri2N4UlHHMtCrUbcG5HRVgDPokVhlNExR37UAZxnAooglbkd91AdLa8IUwEQsKhk6rxPukU/sSuDOnxDsZn+r/T5laCjzNdqbHl+SdqdrWpPbSeDl9EYns+N4qSzYQZ26ta6qJU4zfnZTPBcMf7SfFPCKcG+doCt+gJQJZe2OTgvDBNok9wlqBda7QLCpe4Od70xAGMNQWi1YJ7yYbfRZKqNGVWfkDcaVpGhfTP/pUiCbKGVK6L8KX+TDcNBtGth2uPkKtOLcT3XjVWqS0ldtxU3cJMLoTf2cCD2MlnBb4UkjcNEt231I0x/Qgsnyktcp9dFsggdy+JDxKrB9j5NLUNpylL/wXLEGv6XXzmxOcOk/zC3eW0bX4Rb7AqWJmt+ZTtuSwR/gbME3GV6VU0mzZrlL2kzjggZ5G4smcmNQfQxJfw/jEL94CFMY1iwZNYz+vepP/gIzfsLgscO9s77VzHYChrgJYn/DC8fHRbXR6Rz3Oo9QjF3Cwvzd4EQVt/vuVRAuwg7zuRGRQlYiOxePknteJIiMPcPh0e1j3tj7OIxmIXzGptINKOFpEVmeYm9bEEl2/9Nu9mN6YDoSxvWYz9A2Oh8axD125AkYzmS1xpgwCcCqOu4ifmF0qS5mggacnILxwy2tbTsRjc362whzHdbQsureQMv1jCKJSPkH02qE4oR8DSqlHkuHApI9Srj6AUn/A2HJgod/0YNIfkotq4mDlPxPaePWHzNUdRpL2QyrENQswYMaQlIG0kTMGy449ziOKTzHv1cQjtSGipyxlwTuuw9rRbh4a7Ww8GeuPFU2bwNazDd8GPCX3G++VfDMGSuvTsWl1BYHbLB24s8bTzSIaNOQn/b2HS5wxM79X40csgk14OI0Rme14qcwUrRLTVVj+sZlmhIEVZnJtzi1bCt9v2RBJ+JWUfk3SrbjRlGFQ30J3kY8OLR0t8d6J55ph2V6TLCFvcaIpIR95krJMschu0lo1cLQSTLoRkOeOR8uwuRtPyH3hkaWxkUl8GHKulkXnJ27WvMNjMzx9A7GTxO+mGMk1TLcYXfk3s3OLonTfjWkhPQqA5hyXvIboaTaD6gWrBHuxn3NvcZ+zlXlmP2z2Hq9ub5nmvGIK8zyGyDUYrFW33tY6Z8D/zHTh0BkbFr7Gste1UcGI+L2CsJrqnlEczzt6Ad0AmN/sTrkHR/v2eDG48jL1PggVueokeoAdBKJlGWsH+cDjNKPQ58cKMQ8y9Pw/mmjBzL7F45kiuV0F7BWe3DYtBFRh8Vgf3MiUtiyrVeAmPXFnPXHnnXE/tBrNBqnIz/xYIqdw+oeA0TXX3SkWruyEuydUR4ytDybNTrhJZ9xPfCXTT/J+2EkXbMJWHI8Y2LDfVSZVHQKsmW5mTIHTHVVIzp5g165p7Q0+tXXX2jMknoA5kJHugSXONIDwQcUpVhXQWCo6hxEuSp8OKAgrKdGA1WZtGJLwsaxdd61g+Bd7Z7j9RG7NSrckL1MWybrACTsEj3juzTJgZkEjPwdH5T+0Z5+l2prU96VxQj+foN8RbOAh++CNb4TXbkoa/IIJGu5hiom+a5ue3oNHwkztQRQNmZDxk69WFodopeAmBZricENBDbXHI5zqA8dVG3vjTZvdLqaC5XjVPbLOTWWKKcnvO3BEWECK1hkSe1e+bgx9uEtma6zdatal1pbAE3dwyr1N7Wk0VcZjA8veYXB0RmRYOkBy99jFtDiUrpbTfX3+APq4gMOCYAkI2oCgQKVkfSVwNAHqoyaCp/ztTXE0nD7TCJ4cAz47Bnx+DPhzFzDscoR6WGrQb9ycJgGn2HYjGF2gr3iR9XjdVYwyy2QQlrNBWM4HYfk8CMuXQVi+9me5xHDCWMjZMsCKkj/Ri2oyHNXZcFTnQ1BNWR68Ww/mHLy+G1gmg7CcDcJyfiQLHNeYqgw9JVcCp5DsbReaG4V7TSbjpwptVlNgraQLWo295AGaUPpuSZcdecySE1Mh+QLBJ87PO1p0+3SKiWiohmfJBml6lmyQxqfJwgHfMhzuJaF6kmBHVC5LMxmG5mwYmvNhaD4PQ/NlGJqv3WmMAVSzCFAHGZFz7WT8cHWCx8qkm1NOe27xhjfuv61m+pkzbXnBZK67MC1ApkRmhUx400Omxc+cyciBNx1kumTrNQ0GgsxeOUPVEl1xFrSdZMOE8lriye0SQOiGyfgCu4uFzN70aLTEByEdktJl2nh6xA4zbSXx3ksePCcYI85tkcCwXAX8zXh3BGLV4cVwZzB5AdvtWo5InC+aM2Xmi7rMOBmGudnq6dksqDzRrBoLGY8zRpTrXXL8R6zHpIK8YuzF3r//Aw==";
 Sidebar.prototype.searchFileUrl="search.xml";Sidebar.prototype.gearImage=GRAPH_IMAGE_PATH+"/clipart/Gear_128x128.png";Sidebar.prototype.libAliases={aws2:"aws3"};Sidebar.prototype.defaultEntries="general;images;uml;er;bpmn;flowchart;basic;arrows2";Sidebar.prototype.signs="Animals Food Healthcare Nature People Safety Science Sports Tech Transportation Travel".split(" ");Sidebar.prototype.gcp="Cards;Big Data;Compute;Developer Tools;Extras;Identity and Security;Machine Learning;Management Tools;Networking;Storage Databases".split(";");
@@ -5910,7 +5912,7 @@ this.createVertexTemplateEntry(a+"vimeo;fillColor=#1AB7EA;strokeColor=none",62.6
 DrawioFile=function(a,b){mxEventSource.call(this);this.ui=a;this.data=b||""};mxUtils.extend(DrawioFile,mxEventSource);DrawioFile.prototype.autosaveDelay=1500;DrawioFile.prototype.maxAutosaveDelay=3E4;DrawioFile.prototype.autosaveThread=null;DrawioFile.prototype.lastAutosave=null;DrawioFile.prototype.modified=!1;DrawioFile.prototype.changeListenerEnabled=!0;DrawioFile.prototype.lastAutosaveRevision=null;DrawioFile.prototype.maxAutosaveRevisionDelay=18E5;DrawioFile.prototype.descriptorChanged=function(){this.fireEvent(new mxEventObject("descriptorChanged"))};
 DrawioFile.prototype.contentChanged=function(){this.fireEvent(new mxEventObject("contentChanged"))};DrawioFile.prototype.save=function(a,b,d,c){this.updateFileData();this.clearAutosave()};DrawioFile.prototype.updateFileData=function(){this.setData(this.ui.getFileData())};DrawioFile.prototype.saveAs=function(a,b,d){};DrawioFile.prototype.saveFile=function(a,b,d,c){};DrawioFile.prototype.getPublicUrl=function(a){a(null)};DrawioFile.prototype.isRestricted=function(){return!1};
 DrawioFile.prototype.isModified=function(){return this.modified};DrawioFile.prototype.setModified=function(a){this.modified=a};DrawioFile.prototype.isAutosaveOptional=function(){return!1};DrawioFile.prototype.isAutosave=function(){return this.ui.editor.autosave};DrawioFile.prototype.isRenamable=function(){return!1};DrawioFile.prototype.rename=function(a,b,d){};DrawioFile.prototype.isMovable=function(){return!1};DrawioFile.prototype.move=function(a,b,d){};DrawioFile.prototype.getHash=function(){return""};
-DrawioFile.prototype.getId=function(){return""};DrawioFile.prototype.isEditable=function(){return!this.ui.editor.chromeless};DrawioFile.prototype.getUi=function(){return this.ui};DrawioFile.prototype.getTitle=function(){return""};DrawioFile.prototype.setData=function(a){this.data=a};DrawioFile.prototype.getData=function(){return this.data};
+DrawioFile.prototype.getId=function(){return""};DrawioFile.prototype.isEditable=function(){return!this.ui.editor.chromeless||this.ui.editor.editable};DrawioFile.prototype.getUi=function(){return this.ui};DrawioFile.prototype.getTitle=function(){return""};DrawioFile.prototype.setData=function(a){this.data=a};DrawioFile.prototype.getData=function(){return this.data};
 DrawioFile.prototype.open=function(){this.ui.setFileData(this.getData());this.changeListener=mxUtils.bind(this,function(a,b){var d=null!=b?b.getProperty("edit"):null;!this.changeListenerEnabled||!this.isEditable()||null!=d&&d.ignoreEdit||(this.setModified(!0),this.isAutosave()?(this.ui.editor.setStatus(mxUtils.htmlEntities(mxResources.get("saving"))+"..."),this.autosave(this.autosaveDelay,this.maxAutosaveDelay,mxUtils.bind(this,function(a){null!=this.autosaveThread||this.ui.getCurrentFile()!=this||
 this.isModified()||this.ui.editor.setStatus(mxUtils.htmlEntities(mxResources.get("allChangesSaved")))}),mxUtils.bind(this,function(a){this.ui.getCurrentFile()==this&&this.addUnsavedStatus(a)}))):this.addUnsavedStatus())});this.ui.editor.graph.model.addListener(mxEvent.CHANGE,this.changeListener);this.ui.editor.graph.addListener("gridSizeChanged",this.changeListener);this.ui.editor.graph.addListener("shadowVisibleChanged",this.changeListener);this.ui.addListener("pageFormatChanged",this.changeListener);
 this.ui.addListener("pageScaleChanged",this.changeListener);this.ui.addListener("backgroundColorChanged",this.changeListener);this.ui.addListener("backgroundImageChanged",this.changeListener);this.ui.addListener("foldingEnabledChanged",this.changeListener);this.ui.addListener("mathEnabledChanged",this.changeListener);this.ui.addListener("gridEnabledChanged",this.changeListener);this.ui.addListener("guidesEnabledChanged",this.changeListener);this.ui.addListener("pageViewChanged",this.changeListener)};
@@ -5927,18 +5929,18 @@ StorageFile.prototype.isRenamable=function(){return!0};StorageFile.prototype.sav
 StorageFile.prototype.saveFile=function(a,b,d,c){if(this.isEditable()){var f=mxUtils.bind(this,function(){this.isRenamable()&&(this.title=a);try{this.ui.setLocalData(this.title,this.getData(),mxUtils.bind(this,function(){this.setModified(!1);this.contentChanged();null!=d&&d()}))}catch(g){null!=c&&c(g)}});this.isRenamable()&&"."==a.charAt(0)&&null!=c?c({message:mxResources.get("invalidName")}):this.ui.getLocalData(a,mxUtils.bind(this,function(b){this.isRenamable()&&this.getTitle()!=a&&null!=b?this.ui.confirm(mxResources.get("replaceIt",
 [a]),f,c):f()}))}else null!=d&&d()};StorageFile.prototype.rename=function(a,b,d){var c=this.getTitle();c!=a?this.ui.getLocalData(a,mxUtils.bind(this,function(f){this.ui.confirm(mxResources.get("replaceIt",[a]),mxUtils.bind(this,function(){this.title=a;this.hasSameExtension(c,a)||this.setData(this.ui.getFileData());this.saveFile(a,!1,mxUtils.bind(this,function(){this.ui.removeLocalData(c,b)}),d)}),d)})):b()};StorageFile.prototype.open=function(){DrawioFile.prototype.open.apply(this,arguments);this.saveFile(this.getTitle())};
 StorageFile.prototype.destroy=function(){DrawioFile.prototype.destroy.apply(this,arguments);null!=this.storageListener&&(mxEvent.removeListener(window,"storage",this.storageListener),this.storageListener=null)};StorageLibrary=function(a,b,d){StorageFile.call(this,a,b,d)};mxUtils.extend(StorageLibrary,StorageFile);StorageLibrary.prototype.isAutosave=function(){return!0};StorageLibrary.prototype.saveAs=function(a,b,d){this.saveFile(a,!1,b,d)};StorageLibrary.prototype.getHash=function(){return"L"+encodeURIComponent(this.title)};StorageLibrary.prototype.getTitle=function(){return".scratchpad"==this.title?mxResources.get("scratchpad"):this.title};
-StorageLibrary.prototype.isRenamable=function(a,b,d){return".scratchpad"!=this.title};StorageLibrary.prototype.open=function(){};UrlLibrary=function(a,b,d){StorageFile.call(this,a,b,d);a=d;b=a.lastIndexOf("/");0<=b&&(a=a.substring(b+1));this.fname=a};mxUtils.extend(UrlLibrary,StorageFile);UrlLibrary.prototype.getHash=function(){return"U"+encodeURIComponent(this.title)};UrlLibrary.prototype.getTitle=function(){return this.fname};UrlLibrary.prototype.isAutosave=function(){return!1};UrlLibrary.prototype.isEditable=function(a,b,d){return!1};UrlLibrary.prototype.saveAs=function(a,b,d){};UrlLibrary.prototype.open=function(){};var StorageDialog=function(a,b,d){function c(c,f,g,x,p,k){function q(){mxEvent.addListener(v,"click",null!=k?k:function(){g!=App.MODE_GOOGLE||a.isDriveDomain()?g==App.MODE_GOOGLE&&a.spinner.spin(document.body,mxResources.get("authorizing"))?a.drive.checkToken(mxUtils.bind(this,function(){a.spinner.stop();a.setMode(g,h.checked);b()})):(a.setMode(g,h.checked),b()):window.location.hostname=DriveClient.prototype.newAppHostname})}var v=document.createElement("a");v.style.overflow="hidden";v.style.display=
+StorageLibrary.prototype.isRenamable=function(a,b,d){return".scratchpad"!=this.title};StorageLibrary.prototype.open=function(){};UrlLibrary=function(a,b,d){StorageFile.call(this,a,b,d);a=d;b=a.lastIndexOf("/");0<=b&&(a=a.substring(b+1));this.fname=a};mxUtils.extend(UrlLibrary,StorageFile);UrlLibrary.prototype.getHash=function(){return"U"+encodeURIComponent(this.title)};UrlLibrary.prototype.getTitle=function(){return this.fname};UrlLibrary.prototype.isAutosave=function(){return!1};UrlLibrary.prototype.isEditable=function(a,b,d){return!1};UrlLibrary.prototype.saveAs=function(a,b,d){};UrlLibrary.prototype.open=function(){};var StorageDialog=function(a,b,d){function c(c,f,g,w,p,k){function q(){mxEvent.addListener(v,"click",null!=k?k:function(){g!=App.MODE_GOOGLE||a.isDriveDomain()?g==App.MODE_GOOGLE&&a.spinner.spin(document.body,mxResources.get("authorizing"))?a.drive.checkToken(mxUtils.bind(this,function(){a.spinner.stop();a.setMode(g,h.checked);b()})):(a.setMode(g,h.checked),b()):window.location.hostname=DriveClient.prototype.newAppHostname})}var v=document.createElement("a");v.style.overflow="hidden";v.style.display=
 mxClient.IS_QUIRKS?"inline":"inline-block";v.className="geBaseButton";v.style.fontSize="11px";v.style.position="relative";v.style.margin="4px";v.style.padding="8px 10px 12px 10px";v.style.width="68px";v.style.height="80px";v.style.whiteSpace="nowrap";v.setAttribute("title",f);mxClient.IS_QUIRKS&&(v.style.cssFloat="left",v.style.zoom="1");var m=document.createElement("div");m.style.textOverflow="ellipsis";m.style.overflow="hidden";if(null!=c){var y=document.createElement("img");y.setAttribute("src",
-c);y.setAttribute("border","0");y.setAttribute("align","absmiddle");y.style.width="60px";y.style.height="60px";y.style.paddingBottom="6px";v.appendChild(y)}else m.style.paddingTop="5px",m.style.whiteSpace="normal",mxClient.IS_IOS?(v.style.padding="0px 10px 20px 10px",v.style.top="6px"):mxClient.IS_FF&&(m.style.paddingTop="0px",m.style.marginTop="-2px");v.appendChild(m);mxUtils.write(m,f);if(null!=p)for(c=0;c<p.length;c++)mxUtils.br(m),mxUtils.write(m,p[c]);if(null!=x&&null==a[x]){y.style.visibility=
-"hidden";mxUtils.setOpacity(m,10);var t=new Spinner({lines:12,length:12,width:5,radius:10,rotate:0,color:"#000",speed:1.5,trail:60,shadow:!1,hwaccel:!1,top:"40%",zIndex:2E9});t.spin(v);var u=window.setTimeout(function(){null==a[x]&&(t.stop(),v.style.display="none")},3E4);a.addListener("clientLoaded",mxUtils.bind(this,function(){null!=a[x]&&(window.clearTimeout(u),mxUtils.setOpacity(m,100),y.style.visibility="",t.stop(),q(),"drive"==x&&null!=n.parentNode&&n.parentNode.removeChild(n))}))}else q();e.appendChild(v);
+c);y.setAttribute("border","0");y.setAttribute("align","absmiddle");y.style.width="60px";y.style.height="60px";y.style.paddingBottom="6px";v.appendChild(y)}else m.style.paddingTop="5px",m.style.whiteSpace="normal",mxClient.IS_IOS?(v.style.padding="0px 10px 20px 10px",v.style.top="6px"):mxClient.IS_FF&&(m.style.paddingTop="0px",m.style.marginTop="-2px");v.appendChild(m);mxUtils.write(m,f);if(null!=p)for(c=0;c<p.length;c++)mxUtils.br(m),mxUtils.write(m,p[c]);if(null!=w&&null==a[w]){y.style.visibility=
+"hidden";mxUtils.setOpacity(m,10);var u=new Spinner({lines:12,length:12,width:5,radius:10,rotate:0,color:"#000",speed:1.5,trail:60,shadow:!1,hwaccel:!1,top:"40%",zIndex:2E9});u.spin(v);var t=window.setTimeout(function(){null==a[w]&&(u.stop(),v.style.display="none")},3E4);a.addListener("clientLoaded",mxUtils.bind(this,function(){null!=a[w]&&(window.clearTimeout(t),mxUtils.setOpacity(m,100),y.style.visibility="",u.stop(),q(),"drive"==w&&null!=n.parentNode&&n.parentNode.removeChild(n))}))}else q();e.appendChild(v);
 ++l>=d&&(mxUtils.br(e),l=0)}d=null!=d?d:3;var f=document.createElement("div");f.style.textAlign="center";f.style.whiteSpace="nowrap";f.style.paddingTop="0px";f.style.paddingBottom="20px";var g=a.addLanguageMenu(f,!0);null!=g&&(g.style.bottom=parseInt("28px")-2+"px");if(!a.isOffline()&&1<a.getServiceCount()){g=document.createElement("a");g.setAttribute("href","https://support.draw.io/display/DO/Selecting+Storage");g.setAttribute("title",mxResources.get("help"));g.setAttribute("target","_blank");g.style.position=
 "absolute";g.style.textDecoration="none";g.style.cursor="pointer";g.style.fontSize="12px";g.style.bottom="28px";g.style.left="26px";g.style.color="gray";var k=document.createElement("img");k.setAttribute("border","0");k.setAttribute("valign","bottom");k.setAttribute("src",Editor.helpImage);k.style.marginRight="2px";g.appendChild(k);mxUtils.write(g,mxResources.get("help"));f.appendChild(g)}var m=document.createElement("div");m.style.position="absolute";m.style.cursor="pointer";m.style.fontSize="12px";
 m.style.bottom="28px";m.style.color="gray";mxUtils.write(m,mxResources.get("decideLater"));a.isOfflineApp()?m.style.right="20px":(mxUtils.setPrefixedStyle(m.style,"transform","translate(-50%,0)"),m.style.left="50%");this.init=function(){if(mxClient.IS_QUIRKS||8==document.documentMode)m.style.marginLeft=-Math.round(m.clientWidth/2)+"px"};f.appendChild(m);mxEvent.addListener(m,"click",function(){a.hideDialog();var b=Editor.useLocalStorage;a.createFile(a.defaultFilename,null,null,null,null,null,null,
 !0);Editor.useLocalStorage=b});var e=document.createElement("div");mxClient.IS_QUIRKS&&(e.style.whiteSpace="nowrap",e.style.cssFloat="left");e.style.border="1px solid #d3d3d3";e.style.borderWidth="1px 0px 1px 0px";e.style.padding="12px 0px 12px 0px";var h=document.createElement("input");h.setAttribute("type","checkbox");h.setAttribute("checked","checked");h.defaultChecked=!0;var l=0,n=document.createElement("p"),g=document.createElement("p");g.style.fontSize="16pt";g.style.padding="0px";g.style.paddingTop=
 "4px";g.style.paddingBottom="16px";g.style.margin="0px";g.style.color="gray";mxUtils.write(g,mxResources.get("saveDiagramsTo")+":");f.appendChild(g);"function"===typeof window.DriveClient&&c(IMAGE_PATH+"/google-drive-logo.svg",mxResources.get("googleDrive"),App.MODE_GOOGLE,"drive");null!=a.gitHub&&c(IMAGE_PATH+"/github-logo.svg",mxResources.get("github"),App.MODE_GITHUB,"gitHub");"function"===typeof window.DropboxClient&&c(IMAGE_PATH+"/dropbox-logo.svg",mxResources.get("dropbox"),App.MODE_DROPBOX,
 "dropbox");"function"===typeof window.OneDriveClient&&c(IMAGE_PATH+"/onedrive-logo.svg",mxResources.get("oneDrive"),App.MODE_ONEDRIVE,"oneDrive");"function"===typeof window.TrelloClient&&c(IMAGE_PATH+"/trello-logo.svg",mxResources.get("trello"),App.MODE_TRELLO,"trello");mxClient.IS_IOS&&"device"!=urlParams.storage||c(IMAGE_PATH+"/osa_drive-harddisk.png",mxResources.get("device"),App.MODE_DEVICE);!isLocalStorage||"1"!=urlParams.browser&&"1"!=urlParams.offline||c(IMAGE_PATH+"/osa_database.png",mxResources.get("browser"),
-App.MODE_BROWSER);f.appendChild(e);g=document.createElement("p");g.style.marginTop="12px";g.style.marginBottom="6px";g.appendChild(h);k=document.createElement("span");k.style.color="gray";k.style.fontSize="12px";mxUtils.write(k," "+mxResources.get("rememberThisSetting"));g.appendChild(k);mxUtils.br(g);var p=a.getRecent();if(null!=p&&0<p.length){var t=document.createElement("select");t.style.marginTop="8px";t.style.width="140px";var u=document.createElement("option");u.setAttribute("value","");u.setAttribute("selected",
-"selected");u.style.textAlign="center";mxUtils.write(u,mxResources.get("openRecent")+"...");t.appendChild(u);for(u=0;u<p.length;u++)(function(a){var b=a.mode;b==App.MODE_GOOGLE?b="googleDrive":b==App.MODE_ONEDRIVE&&(b="oneDrive");var c=document.createElement("option");c.setAttribute("value",a.id);mxUtils.write(c,a.title+" ("+mxResources.get(b)+")");t.appendChild(c)})(p[u]);g.appendChild(t);mxEvent.addListener(t,"change",function(b){""!=t.value&&a.loadFile(t.value)})}else g.style.marginTop="20px",
+App.MODE_BROWSER);f.appendChild(e);g=document.createElement("p");g.style.marginTop="12px";g.style.marginBottom="6px";g.appendChild(h);k=document.createElement("span");k.style.color="gray";k.style.fontSize="12px";mxUtils.write(k," "+mxResources.get("rememberThisSetting"));g.appendChild(k);mxUtils.br(g);var p=a.getRecent();if(null!=p&&0<p.length){var u=document.createElement("select");u.style.marginTop="8px";u.style.width="140px";var t=document.createElement("option");t.setAttribute("value","");t.setAttribute("selected",
+"selected");t.style.textAlign="center";mxUtils.write(t,mxResources.get("openRecent")+"...");u.appendChild(t);for(t=0;t<p.length;t++)(function(a){var b=a.mode;b==App.MODE_GOOGLE?b="googleDrive":b==App.MODE_ONEDRIVE&&(b="oneDrive");var c=document.createElement("option");c.setAttribute("value",a.id);mxUtils.write(c,a.title+" ("+mxResources.get(b)+")");u.appendChild(c)})(p[t]);g.appendChild(u);mxEvent.addListener(u,"change",function(b){""!=u.value&&a.loadFile(u.value)})}else g.style.marginTop="20px",
 e.style.padding="30px 0px 26px 0px";!Graph.fileSupport||mxClient.IS_IE||mxClient.IS_IE11||(p=document.createElement("div"),p.style.cursor="pointer",p.style.padding="18px 0px 6px 0px",p.style.fontSize="12px",p.style.color="gray",mxUtils.write(p,mxResources.get("import")+" "+mxResources.get("gliffy")+", "+mxResources.get("formatVssx")+", "+mxResources.get("formatVsdx")+", "+mxResources.get("lucidchart")+"..."),mxEvent.addListener(p,"click",function(){var b=document.createElement("input");b.setAttribute("type",
 "file");mxEvent.addListener(b,"change",function(){null!=b.files&&(a.hideDialog(),a.openFiles(b.files,!0))});b.click()}),g.appendChild(p),e.style.paddingBottom="4px");e.appendChild(g);mxEvent.addListener(k,"click",function(a){h.checked=!h.checked;mxEvent.consume(a)});mxClient.IS_SVG&&isLocalStorage&&"0"!=urlParams.gapi&&(null==document.documentMode||10<=document.documentMode)&&window.setTimeout(function(){null==a.drive&&(n.style.padding="8px",n.style.fontSize="9pt",n.style.marginTop="-14px",n.innerHTML=
 '<a style="background-color:#dcdcdc;padding:5px;color:black;text-decoration:none;" href="https://plus.google.com/u/0/+DrawIo1/posts/1HTrfsb5wDN" target="_blank"><img border="0" src="'+mxGraph.prototype.warningImage.src+'" align="top"> '+mxResources.get("googleDriveMissingClickHere")+"</a>",f.appendChild(n))},5E3);this.container=f},SplashDialog=function(a){var b=document.createElement("div");b.style.textAlign="center";a.addLanguageMenu(b,!0);var d=null,c=a.getServiceCount();!a.isOffline()&&1<c&&(d=
@@ -5960,30 +5962,30 @@ b);h.appendChild(l)}b=document.createElement("div");b.style.padding="6px";b.inne
 null!=m&&m()}),c.className="geBtn gePrimaryBtn",d.appendChild(c));this.init=function(){n.focus()};h.appendChild(d);this.container=h},EmbedDialog=function(a,b,d,c,f){c=document.createElement("div");var g=/^https?:\/\//.test(b)||/^mailto:\/\//.test(b);mxUtils.write(c,mxResources.get(5E5>b.length?g?"link":"mainEmbedNotice":"preview")+":");mxUtils.br(c);var k=document.createElement("div");k.style.position="absolute";k.style.top="30px";k.style.right="30px";k.style.color="gray";mxUtils.write(k,a.formatFileSize(b.length));
 c.appendChild(k);var m=document.createElement("textarea");m.setAttribute("autocomplete","off");m.setAttribute("autocorrect","off");m.setAttribute("autocapitalize","off");m.setAttribute("spellcheck","false");m.style.marginTop="10px";m.style.resize="none";m.style.height="150px";m.style.width="440px";m.style.border="1px solid gray";m.value=mxResources.get("updatingDocument");c.appendChild(m);mxUtils.br(c);this.init=function(){window.setTimeout(function(){5E5>b.length?(m.value=b,m.focus(),mxClient.IS_GC||
 mxClient.IS_FF||5<=document.documentMode||mxClient.IS_QUIRKS?m.select():document.execCommand("selectAll",!1,null)):(m.setAttribute("readonly","true"),m.value=b.substring(0,340)+"... ("+mxResources.get("drawingTooLarge")+")")},0)};k=document.createElement("div");k.style.position="absolute";k.style.bottom="36px";k.style.right="32px";var e=null;mxClient.IS_CHROMEAPP&&!g||navigator.standalone||!(g||mxClient.IS_SVG&&(null==document.documentMode||9<document.documentMode))||(e=mxUtils.button(mxResources.get(5E5>
-b.length?"preview":"openInNewWindow"),function(){var c=5E5>b.length?m.value:b;if(null!=f)f(c);else if(g)try{var e=window.open(c);(null==d||0<d)&&window.setTimeout(mxUtils.bind(this,function(){null!=e&&null!=e.location.href&&e.location.href.substring(0,8)!=c.substring(0,8)&&(e.close(),a.handleError({message:mxResources.get("drawingTooLarge")}))}),d||500)}catch(u){a.handleError({message:u.message||mxResources.get("drawingTooLarge")})}else{var h=window.open().document;h.writeln("<html><head><title>"+
+b.length?"preview":"openInNewWindow"),function(){var c=5E5>b.length?m.value:b;if(null!=f)f(c);else if(g)try{var e=window.open(c);(null==d||0<d)&&window.setTimeout(mxUtils.bind(this,function(){null!=e&&null!=e.location.href&&e.location.href.substring(0,8)!=c.substring(0,8)&&(e.close(),a.handleError({message:mxResources.get("drawingTooLarge")}))}),d||500)}catch(t){a.handleError({message:t.message||mxResources.get("drawingTooLarge")})}else{var h=window.open().document;h.writeln("<html><head><title>"+
 encodeURIComponent(mxResources.get("preview"))+'</title><meta charset="utf-8"></head><body>'+b+"</body></html>");h.close()}}),e.className="geBtn",k.appendChild(e));if(!g||7500<b.length){var h=mxUtils.button(mxResources.get("download"),function(){a.saveData("embed.txt","txt",b,"text/plain")});h.className="geBtn";k.appendChild(h)}if(g&&(!a.isOffline()||mxClient.IS_CHROMEAPP)){if(51200>b.length){var l=mxUtils.button("",function(){try{var b="https://www.facebook.com/sharer.php?p[url]="+encodeURIComponent(m.value);
 window.open(b)}catch(p){a.handleError({message:p.message||mxResources.get("drawingTooLarge")})}}),h=document.createElement("img");h.setAttribute("src",Editor.facebookImage);h.setAttribute("width","18");h.setAttribute("height","18");h.setAttribute("border","0");l.appendChild(h);l.setAttribute("title",mxResources.get("facebook")+" ("+a.formatFileSize(51200)+" max)");l.style.verticalAlign="bottom";l.style.paddingTop="4px";l.style.minWidth="46px";l.className="geBtn";k.appendChild(l)}7168>b.length&&(l=
 mxUtils.button("",function(){try{var b="https://twitter.com/intent/tweet?text="+encodeURIComponent("Check out the diagram I made using @drawio")+"&url="+encodeURIComponent(m.value);window.open(b)}catch(p){a.handleError({message:p.message||mxResources.get("drawingTooLarge")})}}),h=document.createElement("img"),h.setAttribute("src",Editor.tweetImage),h.setAttribute("width","18"),h.setAttribute("height","18"),h.setAttribute("border","0"),h.style.marginBottom="5px",l.appendChild(h),l.setAttribute("title",
 mxResources.get("twitter")+" ("+a.formatFileSize(7168)+" max)"),l.style.verticalAlign="bottom",l.style.paddingTop="4px",l.style.minWidth="46px",l.className="geBtn",k.appendChild(l))}h=mxUtils.button(mxResources.get("close"),function(){a.hideDialog()});k.appendChild(h);l=mxUtils.button(mxResources.get("copy"),function(){m.focus();mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode||mxClient.IS_QUIRKS?m.select():document.execCommand("selectAll",!1,null);document.execCommand("copy");a.alert(mxResources.get("copiedToClipboard"))});
-5E5>b.length?mxClient.IS_SF||null!=document.documentMode?h.className="geBtn gePrimaryBtn":(k.appendChild(l),l.className="geBtn gePrimaryBtn",h.className="geBtn"):(k.appendChild(e),h.className="geBtn",e.className="geBtn gePrimaryBtn");c.appendChild(k);this.container=c},GoogleSitesDialog=function(a,b){function d(){var a=null!=A.getTitle()?A.getTitle():this.defaultFilename;if(D.checked&&""!=p.value){var b="https://www.draw.io/gadget.xml?type=4&diagram="+encodeURIComponent(mxUtils.htmlEntities(p.value));
-null!=a&&(b+="&title="+encodeURIComponent(a));0<B.length&&(b+="&s="+B);""!=t.value&&"0"!=t.value&&(b+="&border="+t.value);""!=n.value&&(b+="&height="+n.value);b+="&pan="+(u.checked?"1":"0");b+="&zoom="+(q.checked?"1":"0");b+="&fit="+(v.checked?"1":"0");b+="&resize="+(x.checked?"1":"0");b+="&x0="+Number(l.value);b+="&y0="+e;f.mathEnabled&&(b+="&math=1");y.checked?b+="&edit=_blank":w.checked&&(b+="&edit="+encodeURIComponent(mxUtils.htmlEntities(window.location.href)));h.value=b}else A.constructor==
+5E5>b.length?mxClient.IS_SF||null!=document.documentMode?h.className="geBtn gePrimaryBtn":(k.appendChild(l),l.className="geBtn gePrimaryBtn",h.className="geBtn"):(k.appendChild(e),h.className="geBtn",e.className="geBtn gePrimaryBtn");c.appendChild(k);this.container=c},GoogleSitesDialog=function(a,b){function d(){var a=null!=A.getTitle()?A.getTitle():this.defaultFilename;if(C.checked&&""!=p.value){var b="https://www.draw.io/gadget.xml?type=4&diagram="+encodeURIComponent(mxUtils.htmlEntities(p.value));
+null!=a&&(b+="&title="+encodeURIComponent(a));0<B.length&&(b+="&s="+B);""!=u.value&&"0"!=u.value&&(b+="&border="+u.value);""!=n.value&&(b+="&height="+n.value);b+="&pan="+(t.checked?"1":"0");b+="&zoom="+(q.checked?"1":"0");b+="&fit="+(v.checked?"1":"0");b+="&resize="+(w.checked?"1":"0");b+="&x0="+Number(l.value);b+="&y0="+e;f.mathEnabled&&(b+="&math=1");y.checked?b+="&edit=_blank":x.checked&&(b+="&edit="+encodeURIComponent(mxUtils.htmlEntities(window.location.href)));h.value=b}else A.constructor==
 DriveFile||A.constructor==DropboxFile?(b="https://www.draw.io/gadget.xml?embed=0&diagram=",""!=p.value?b+=encodeURIComponent(mxUtils.htmlEntities(p.value))+"&type=3":(b+=A.getHash().substring(1),b=A.constructor==DropboxFile?b+"&type=2":b+"&type=1"),null!=a&&(b+="&title="+encodeURIComponent(a)),""!=n.value&&(a=parseInt(n.value)+parseInt(l.value),b+="&height="+a),h.value=b):h.value=""}var c=document.createElement("div"),f=a.editor.graph,g=f.getGraphBounds(),k=f.view.scale,m=Math.floor(g.x/k-f.view.translate.x),
 e=Math.floor(g.y/k-f.view.translate.y);mxUtils.write(c,mxResources.get("googleGadget")+":");mxUtils.br(c);var h=document.createElement("input");h.setAttribute("type","text");h.style.marginBottom="8px";h.style.marginTop="2px";h.style.width="410px";c.appendChild(h);mxUtils.br(c);this.init=function(){h.focus();mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode||mxClient.IS_QUIRKS?h.select():document.execCommand("selectAll",!1,null)};mxUtils.write(c,mxResources.get("top")+":");var l=document.createElement("input");
 l.setAttribute("type","text");l.setAttribute("size","4");l.style.marginRight="16px";l.style.marginLeft="4px";l.value=m;c.appendChild(l);mxUtils.write(c,mxResources.get("height")+":");var n=document.createElement("input");n.setAttribute("type","text");n.setAttribute("size","4");n.style.marginLeft="4px";n.value=Math.ceil(g.height/k);c.appendChild(n);mxUtils.br(c);g=document.createElement("hr");g.setAttribute("size","1");g.style.marginBottom="16px";g.style.marginTop="16px";c.appendChild(g);mxUtils.write(c,
-mxResources.get("publicDiagramUrl")+":");mxUtils.br(c);var p=document.createElement("input");p.setAttribute("type","text");p.setAttribute("size","28");p.style.marginBottom="8px";p.style.marginTop="2px";p.style.width="410px";p.value=b||"";c.appendChild(p);mxUtils.br(c);mxUtils.write(c,mxResources.get("borderWidth")+":");var t=document.createElement("input");t.setAttribute("type","text");t.setAttribute("size","3");t.style.marginBottom="8px";t.style.marginLeft="4px";t.value="0";c.appendChild(t);mxUtils.br(c);
-var u=document.createElement("input");u.setAttribute("type","checkbox");u.setAttribute("checked","checked");u.defaultChecked=!0;u.style.marginLeft="16px";c.appendChild(u);mxUtils.write(c,mxResources.get("pan")+" ");var q=document.createElement("input");q.setAttribute("type","checkbox");q.setAttribute("checked","checked");q.defaultChecked=!0;q.style.marginLeft="8px";c.appendChild(q);mxUtils.write(c,mxResources.get("zoom")+" ");var w=document.createElement("input");w.setAttribute("type","checkbox");
-w.style.marginLeft="8px";w.setAttribute("title",window.location.href);c.appendChild(w);mxUtils.write(c,mxResources.get("edit")+" ");var y=document.createElement("input");y.setAttribute("type","checkbox");y.style.marginLeft="8px";c.appendChild(y);mxUtils.write(c,mxResources.get("asNew")+" ");mxUtils.br(c);var x=document.createElement("input");x.setAttribute("type","checkbox");x.setAttribute("checked","checked");x.defaultChecked=!0;x.style.marginLeft="16px";c.appendChild(x);mxUtils.write(c,mxResources.get("resize")+
-" ");var v=document.createElement("input");v.setAttribute("type","checkbox");v.style.marginLeft="8px";c.appendChild(v);mxUtils.write(c,mxResources.get("fit")+" ");var D=document.createElement("input");D.setAttribute("type","checkbox");D.style.marginLeft="8px";c.appendChild(D);mxUtils.write(c,mxResources.get("embed")+" ");var B=a.getBasenames().join(";"),A=a.getCurrentFile();mxEvent.addListener(u,"change",d);mxEvent.addListener(q,"change",d);mxEvent.addListener(x,"change",d);mxEvent.addListener(v,
-"change",d);mxEvent.addListener(w,"change",d);mxEvent.addListener(y,"change",d);mxEvent.addListener(D,"change",d);mxEvent.addListener(n,"change",d);mxEvent.addListener(l,"change",d);mxEvent.addListener(t,"change",d);mxEvent.addListener(p,"change",d);d();mxEvent.addListener(h,"click",function(){h.focus();mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode||mxClient.IS_QUIRKS?h.select():document.execCommand("selectAll",!1,null)});g=document.createElement("div");g.style.paddingTop="12px";g.style.textAlign=
+mxResources.get("publicDiagramUrl")+":");mxUtils.br(c);var p=document.createElement("input");p.setAttribute("type","text");p.setAttribute("size","28");p.style.marginBottom="8px";p.style.marginTop="2px";p.style.width="410px";p.value=b||"";c.appendChild(p);mxUtils.br(c);mxUtils.write(c,mxResources.get("borderWidth")+":");var u=document.createElement("input");u.setAttribute("type","text");u.setAttribute("size","3");u.style.marginBottom="8px";u.style.marginLeft="4px";u.value="0";c.appendChild(u);mxUtils.br(c);
+var t=document.createElement("input");t.setAttribute("type","checkbox");t.setAttribute("checked","checked");t.defaultChecked=!0;t.style.marginLeft="16px";c.appendChild(t);mxUtils.write(c,mxResources.get("pan")+" ");var q=document.createElement("input");q.setAttribute("type","checkbox");q.setAttribute("checked","checked");q.defaultChecked=!0;q.style.marginLeft="8px";c.appendChild(q);mxUtils.write(c,mxResources.get("zoom")+" ");var x=document.createElement("input");x.setAttribute("type","checkbox");
+x.style.marginLeft="8px";x.setAttribute("title",window.location.href);c.appendChild(x);mxUtils.write(c,mxResources.get("edit")+" ");var y=document.createElement("input");y.setAttribute("type","checkbox");y.style.marginLeft="8px";c.appendChild(y);mxUtils.write(c,mxResources.get("asNew")+" ");mxUtils.br(c);var w=document.createElement("input");w.setAttribute("type","checkbox");w.setAttribute("checked","checked");w.defaultChecked=!0;w.style.marginLeft="16px";c.appendChild(w);mxUtils.write(c,mxResources.get("resize")+
+" ");var v=document.createElement("input");v.setAttribute("type","checkbox");v.style.marginLeft="8px";c.appendChild(v);mxUtils.write(c,mxResources.get("fit")+" ");var C=document.createElement("input");C.setAttribute("type","checkbox");C.style.marginLeft="8px";c.appendChild(C);mxUtils.write(c,mxResources.get("embed")+" ");var B=a.getBasenames().join(";"),A=a.getCurrentFile();mxEvent.addListener(t,"change",d);mxEvent.addListener(q,"change",d);mxEvent.addListener(w,"change",d);mxEvent.addListener(v,
+"change",d);mxEvent.addListener(x,"change",d);mxEvent.addListener(y,"change",d);mxEvent.addListener(C,"change",d);mxEvent.addListener(n,"change",d);mxEvent.addListener(l,"change",d);mxEvent.addListener(u,"change",d);mxEvent.addListener(p,"change",d);d();mxEvent.addListener(h,"click",function(){h.focus();mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode||mxClient.IS_QUIRKS?h.select():document.execCommand("selectAll",!1,null)});g=document.createElement("div");g.style.paddingTop="12px";g.style.textAlign=
 "right";k=mxUtils.button(mxResources.get("close"),function(){a.hideDialog()});k.className="geBtn gePrimaryBtn";g.appendChild(k);c.appendChild(g);this.container=c},CreateGraphDialog=function(a,b,d){var c=document.createElement("div");c.style.textAlign="right";this.init=function(){var b=document.createElement("div");b.style.position="relative";b.style.border="1px solid gray";b.style.width="100%";b.style.height="360px";b.style.overflow="hidden";b.style.marginBottom="16px";mxEvent.disableContextMenu(b);
 c.appendChild(b);var g=new Graph(b);g.setCellsCloneable(!0);g.setPanning(!0);g.setAllowDanglingEdges(!1);g.connectionHandler.select=!1;g.view.setTranslate(20,20);g.border=20;g.panningHandler.useLeftButtonForPanning=!0;var k="curved=1;";g.cellRenderer.installCellOverlayListeners=function(a,b,c){mxCellRenderer.prototype.installCellOverlayListeners.apply(this,arguments);mxEvent.addListener(c.node,mxClient.IS_POINTER?"pointerdown":"mousedown",function(c){b.fireEvent(new mxEventObject("pointerdown","event",
 c,"state",a))});!mxClient.IS_POINTER&&mxClient.IS_TOUCH&&mxEvent.addListener(c.node,"touchstart",function(c){b.fireEvent(new mxEventObject("pointerdown","event",c,"state",a))})};g.getAllConnectionConstraints=function(){return null};g.connectionHandler.marker.highlight.keepOnTop=!1;g.connectionHandler.createEdgeState=function(a){a=g.createEdge(null,null,null,null,null,k);return new mxCellState(this.graph.view,a,this.graph.getCellStyle(a))};var m=g.getDefaultParent(),e=mxUtils.bind(this,function(a){var b=
 new mxCellOverlay(this.connectImage,"Add outgoing");b.cursor="hand";b.addListener(mxEvent.CLICK,function(b,c){g.connectionHandler.reset();g.clearSelection();var d=g.getCellGeometry(a),h;n(function(){h=g.insertVertex(m,null,"Entry",d.x,d.y,80,30,"rounded=1;");e(h);g.view.refresh(h);g.insertEdge(m,null,"",a,h,k)},function(){g.scrollCellToVisible(h)})});b.addListener("pointerdown",function(a,b){var c=b.getProperty("event"),d=b.getProperty("state");g.popupMenuHandler.hideMenu();g.stopEditing(!1);var e=
 mxUtils.convertPoint(g.container,mxEvent.getClientX(c),mxEvent.getClientY(c));g.connectionHandler.start(d,e.x,e.y);g.isMouseDown=!0;g.isMouseTrigger=mxEvent.isMouseEvent(c);mxEvent.consume(c)});g.addCellOverlay(a,b)});g.getModel().beginUpdate();var h;try{h=g.insertVertex(m,null,"Start",0,0,80,30,"ellipse"),e(h)}finally{g.getModel().endUpdate()}var l;"horizontalTree"==d?(l=new mxCompactTreeLayout(g),l.edgeRouting=!1,l.levelDistance=30,k="edgeStyle=elbowEdgeStyle;elbow=horizontal;"):"verticalTree"==
-d?(l=new mxCompactTreeLayout(g,!1),l.edgeRouting=!1,l.levelDistance=30,k="edgeStyle=elbowEdgeStyle;elbow=vertical;"):"verticalFlow"==d?l=new mxHierarchicalLayout(g,mxConstants.DIRECTION_NORTH):"horizontalFlow"==d?l=new mxHierarchicalLayout(g,mxConstants.DIRECTION_WEST):"organic"==d?(l=new mxFastOrganicLayout(g,!1),l.forceConstant=80):"circle"==d&&(l=new mxCircleLayout(g));if(null!=l){var n=function(a,b){g.getModel().beginUpdate();try{null!=a&&a(),l.execute(g.getDefaultParent(),h)}catch(x){throw x;
-}finally{var c=new mxMorphing(g);c.addListener(mxEvent.DONE,mxUtils.bind(this,function(){g.getModel().endUpdate();null!=b&&b()}));c.startAnimation()}},p=mxEdgeHandler.prototype.connect;mxEdgeHandler.prototype.connect=function(a,b,c,d,e){p.apply(this,arguments);n()};g.resizeCell=function(){mxGraph.prototype.resizeCell.apply(this,arguments);n()};g.connectionHandler.addListener(mxEvent.CONNECT,function(){n()})}var t=mxUtils.button(mxResources.get("close"),function(){a.confirm(mxResources.get("areYouSure"),
-function(){null!=b.parentNode&&(g.destroy(),b.parentNode.removeChild(b));a.hideDialog()})});t.className="geBtn";a.editor.cancelFirst&&c.appendChild(t);var u=mxUtils.button(mxResources.get("insert"),function(){g.clearCellOverlays();var c=a.editor.graph.getFreeInsertPoint(),c=a.editor.graph.importCells(g.getModel().getChildren(g.getDefaultParent()),c.x,c.y),d=a.editor.graph.view,e=d.getBounds(c);e.x-=d.translate.x;e.y-=d.translate.y;a.editor.graph.scrollRectToVisible(e);a.editor.graph.setSelectionCells(c);
-null!=b.parentNode&&(g.destroy(),b.parentNode.removeChild(b));a.hideDialog()});c.appendChild(u);u.className="geBtn gePrimaryBtn";a.editor.cancelFirst||c.appendChild(t)};this.container=c};
+d?(l=new mxCompactTreeLayout(g,!1),l.edgeRouting=!1,l.levelDistance=30,k="edgeStyle=elbowEdgeStyle;elbow=vertical;"):"verticalFlow"==d?l=new mxHierarchicalLayout(g,mxConstants.DIRECTION_NORTH):"horizontalFlow"==d?l=new mxHierarchicalLayout(g,mxConstants.DIRECTION_WEST):"organic"==d?(l=new mxFastOrganicLayout(g,!1),l.forceConstant=80):"circle"==d&&(l=new mxCircleLayout(g));if(null!=l){var n=function(a,b){g.getModel().beginUpdate();try{null!=a&&a(),l.execute(g.getDefaultParent(),h)}catch(w){throw w;
+}finally{var c=new mxMorphing(g);c.addListener(mxEvent.DONE,mxUtils.bind(this,function(){g.getModel().endUpdate();null!=b&&b()}));c.startAnimation()}},p=mxEdgeHandler.prototype.connect;mxEdgeHandler.prototype.connect=function(a,b,c,d,e){p.apply(this,arguments);n()};g.resizeCell=function(){mxGraph.prototype.resizeCell.apply(this,arguments);n()};g.connectionHandler.addListener(mxEvent.CONNECT,function(){n()})}var u=mxUtils.button(mxResources.get("close"),function(){a.confirm(mxResources.get("areYouSure"),
+function(){null!=b.parentNode&&(g.destroy(),b.parentNode.removeChild(b));a.hideDialog()})});u.className="geBtn";a.editor.cancelFirst&&c.appendChild(u);var t=mxUtils.button(mxResources.get("insert"),function(){g.clearCellOverlays();var c=a.editor.graph.getFreeInsertPoint(),c=a.editor.graph.importCells(g.getModel().getChildren(g.getDefaultParent()),c.x,c.y),d=a.editor.graph.view,e=d.getBounds(c);e.x-=d.translate.x;e.y-=d.translate.y;a.editor.graph.scrollRectToVisible(e);a.editor.graph.setSelectionCells(c);
+null!=b.parentNode&&(g.destroy(),b.parentNode.removeChild(b));a.hideDialog()});c.appendChild(t);t.className="geBtn gePrimaryBtn";a.editor.cancelFirst||c.appendChild(u)};this.container=c};
 CreateGraphDialog.prototype.connectImage=new mxImage(mxClient.IS_SVG?"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABoAAAAaCAYAAACpSkzOAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAyJpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuMC1jMDYwIDYxLjEzNDc3NywgMjAxMC8wMi8xMi0xNzozMjowMCAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvIiB4bWxuczp4bXBNTT0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL21tLyIgeG1sbnM6c3RSZWY9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9zVHlwZS9SZXNvdXJjZVJlZiMiIHhtcDpDcmVhdG9yVG9vbD0iQWRvYmUgUGhvdG9zaG9wIENTNSBNYWNpbnRvc2giIHhtcE1NOkluc3RhbmNlSUQ9InhtcC5paWQ6RjQ3OTk0QjMyRDcyMTFFNThGQThGNDVBMjNBMjFDMzkiIHhtcE1NOkRvY3VtZW50SUQ9InhtcC5kaWQ6RjQ3OTk0QjQyRDcyMTFFNThGQThGNDVBMjNBMjFDMzkiPiA8eG1wTU06RGVyaXZlZEZyb20gc3RSZWY6aW5zdGFuY2VJRD0ieG1wLmlpZDoyRjA0N0I2MjJENzExMUU1OEZBOEY0NUEyM0EyMUMzOSIgc3RSZWY6ZG9jdW1lbnRJRD0ieG1wLmRpZDpGNDc5OTRCMjJENzIxMUU1OEZBOEY0NUEyM0EyMUMzOSIvPiA8L3JkZjpEZXNjcmlwdGlvbj4gPC9yZGY6UkRGPiA8L3g6eG1wbWV0YT4gPD94cGFja2V0IGVuZD0iciI/PjIf+MgAAATlSURBVHjanFZraFxFFD735u4ru3ls0yZG26ShgmJoKK1J2vhIYzBgRdtIURHyw1hQUH9IxIgI2h8iCEUF/1RRlNQYCsYfCTHVhiTtNolpZCEStqSC22xIsrs1bDfu7t37Gs/cO3Ozxs1DBw73zpk555vzmHNGgJ0NYatFgmNLYUHYUoHASMz5ijmgVLmxgfKCUiBxC4ACJAeSG8nb1dVVOTc3dyoSibwWDofPBIPBJzo7O8vpGtvjpDICGztxkciECpF2LS0tvZtOpwNkk5FKpcYXFxffwL1+JuPgllPj8nk1F6RoaGjoKCqZ5ApljZDZO4SMRA0SuG2QUJIQRV8HxMOM9vf3H0ZZH9Nhg20MMl2QkFwjIyNHWlpahtADnuUMwLcRHX5aNSBjCJYEsSSLUeLEbhGe3ytCmQtA1/XY+Pj46dbW1iDuyCJp9BC5ycBj4hoeHq5ra2sbw0Xn1ZgBZ+dVkA1Lc+6p0Ck2p0QS4Ox9EhwpEylYcmBg4LH29vYQLilIOt0u5FhDfevNZDI/u93uw6PLOrwTUtjxrbPYbhD42WgMrF8JmR894ICmCgnQjVe8Xu8pXEkzMJKbuo5oNPomBbm1ZsD7s2kwFA1JZ6QBUXWT1nmGNc/qoMgavDcrQzxjQGFh4aOYIJ0sFAXcEtui4uLiVjr5KpSBVFYDDZVrWUaKRRWSAYeK0fmKykgDXbVoNaPChRuyqdDv97czL5nXxQbq6empQmsaklkDBiNpSwFVrmr2P6UyicD5piI4f8wHh0oEm8/p4h8pyGiEWvVQd3e3nxtjAzU1NR2jP7NRBWQ8GbdEzzJAmc0V3RR4cI8Dvmwuhc8fKUFA0d6/ltHg5p+Kuaejo6OeY0jcNJ/PV00ZS0nFUoZRvvFS1bZFsKHCCQ2Pl8H0chY+C96B6ZUsrCQ1qKtwQVFRURW/QhIXMAzDPAZ6BgOr8tTa8dDxCmiYGApaJbJMxSzV+brE8pdgWkcpY5dbMF1AR9XH8/xu2ilef48bvn92n82ZwHh+8ssqTEXS9p7dHisiiURikd8PbpExNTU1UVNTA3V3Y7lC16n0gpB/NwpNcZjfa7dScC4Qh0kOQCwnlEgi3F/hMVl9fX0zvKrzSk2lfXjRhj0eT/2rvWG4+Pta3oJY7XfC3hInXAv/ldeFLx8shQ+eqQL0UAAz7ylkpej5eNZRVBWL6BU6ef14OYiY1oqyTtmsavr/5koaRucT1pzx+ZpL1+GV5nLutksUgIcmtwTRiuuVZXnU5XId7A2swJkfFsymRWC91hHg1Viw6x23+7vn9sPJ+j20BE1hCXqSWaNSQ8ScbknRZWxub1PGCw/fBV+c3AeijlUbY5bBjEqr9GuYZP4jP41WudGSC6erTRCqdGZm5i1WvXWeDHnbBCZGc2Nj4wBl/hZOwrmBBfgmlID1HmGJutHaF+tKoevp/XCgstDkjo2NtWKLuc6AVN4mNjY+s1XQxoenOoFuDPHGtnRbJj9ej5GvL0dI7+giuRyMk1giazc+DP6vgUDgOJVlOv7R+PJ12QIeL6SyeDz+Kfp8ZrNWjgDTsVjsQ7qXyTjztXJhm9ePxFLfMTg4eG9tbe1RTP9KFFYQfHliYmIS69kCC7jKYmKwxxD5P88tkVkqbPPcIps9t4T/+HjcuJ/s5BFJgf4WYABCtxGuxIZ90gAAAABJRU5ErkJggg==":IMAGE_PATH+
 "/handle-connect.png",26,26);
 var BackgroundImageDialog=function(a,b){var d=document.createElement("div");d.style.whiteSpace="nowrap";var c=document.createElement("h2");mxUtils.write(c,mxResources.get("backgroundImage"));c.style.marginTop="0px";d.appendChild(c);mxUtils.write(d,mxResources.get("image")+" "+mxResources.get("url")+":");mxUtils.br(d);var c=a.editor.graph.backgroundImage,f=document.createElement("input");f.setAttribute("type","text");f.style.marginTop="4px";f.style.marginBottom="4px";f.style.width="350px";f.value=
@@ -6007,59 +6009,59 @@ f.x,f.y));a.editor.graph.scrollCellToVisible(a.editor.graph.getSelectionCell());
 "16px";var m=document.createElement("select"),e=document.createElement("option");e.setAttribute("value","list");e.setAttribute("selected","selected");mxUtils.write(e,mxResources.get("list"));m.appendChild(e);e=document.createElement("option");e.setAttribute("value","diagram");mxUtils.write(e,mxResources.get("diagram"));m.appendChild(e);e=document.createElement("option");e.setAttribute("value","plantUmlSvg");mxUtils.write(e,mxResources.get("plantUml")+" ("+mxResources.get("formatSvg")+")");var h=document.createElement("option");
 h.setAttribute("value","plantUmlPng");mxUtils.write(h,mxResources.get("plantUml")+" ("+mxResources.get("formatPng")+")");EditorUi.enablePlantUml&&Graph.fileSupport&&!a.isOffline()&&(m.appendChild(e),m.appendChild(h));var l=c();k.value=l;g.appendChild(k);this.init=function(){k.focus()};Graph.fileSupport&&(k.addEventListener("dragover",function(a){a.stopPropagation();a.preventDefault()},!1),k.addEventListener("drop",function(a){a.stopPropagation();a.preventDefault();if(0<a.dataTransfer.files.length){a=
 a.dataTransfer.files[0];var b=new FileReader;b.onload=function(a){k.value=a.target.result};b.readAsText(a)}},!1));g.appendChild(m);mxEvent.addListener(m,"change",function(){var a=c();if(0==k.value.length||k.value==l)l=a,k.value=l});e=mxUtils.button(mxResources.get("close"),function(){k.value==l?a.hideDialog():a.confirm(mxResources.get("areYouSure"),function(){a.hideDialog()})});e.className="geBtn";a.editor.cancelFirst&&g.appendChild(e);h=mxUtils.button(mxResources.get("insert"),function(){a.hideDialog();
-d(k.value,m.value)});g.appendChild(h);h.className="geBtn gePrimaryBtn";a.editor.cancelFirst||g.appendChild(e);this.container=g},NewDialog=function(a,b,d,c,f){function g(){if(c)d||a.hideDialog(),c(u,p.value);else{var b=p.value;null!=b&&0<b.length&&a.pickFolder(a.mode==App.MODE_ONEDRIVE||a.mode==App.MODE_TRELLO||a.mode==App.MODE_GOOGLE&&(null==a.stateArg||null==a.stateArg.folderId)?a.mode:null,function(c){a.createFile(b,u,null!=t&&0<t.length?t:null,null,function(){a.hideDialog()},null,c)})}}function k(a,
-b,c){null!=q&&(q.style.backgroundColor="transparent",q.style.border="1px solid transparent");u=b;t=c;q=a;q.style.backgroundColor="#e6eff8";q.style.border="1px solid #ccd9ea"}function m(a,b,c,d,e){var h=document.createElement("div");h.className="geTemplate";h.style.height="140px";h.style.width="140px";null!=d&&0<d.length&&h.setAttribute("title",d);if(null!=a&&0<a.length){a.substring(0,a.length-4);h.style.backgroundImage="url("+TEMPLATE_PATH+"/"+a.substring(0,a.length-4)+".png)";h.style.backgroundPosition=
-"center center";h.style.backgroundRepeat="no-repeat";var l=!1;mxEvent.addListener(h,"click",function(c){w.setAttribute("disabled","disabled");h.style.backgroundColor="transparent";h.style.border="1px solid transparent";mxUtils.get(TEMPLATE_PATH+"/"+a,mxUtils.bind(this,function(a){200<=a.getStatus()&&299>=a.getStatus()&&(w.removeAttribute("disabled"),k(h,a.getText(),b),l&&g())}))});mxEvent.addListener(h,"dblclick",function(a){l=!0})}else h.innerHTML='<table width="100%" height="100%"><tr><td align="center" valign="middle">'+
-mxResources.get(c)+"</td></tr></table>",e&&k(h),mxEvent.addListener(h,"click",function(a){k(h)}),mxEvent.addListener(h,"dblclick",function(a){g()});y.appendChild(h)}function e(){function a(){for(var a=!0;b<B.length&&(a||0!=mxUtils.mod(b,30));)a=B[b++],m(a.url,a.libs,a.title,a.tooltip,a.select),a=!1}var b=0;mxEvent.addListener(y,"scroll",function(b){y.scrollTop+y.clientHeight>=y.scrollHeight&&(a(),mxEvent.consume(b))});var c=null,d;for(d in v){var e=document.createElement("div"),h=mxResources.get(d),
-l=v[d];null==h&&(h=d.substring(0,1).toUpperCase()+d.substring(1));18<h.length&&(h=h.substring(0,18)+"&hellip;");e.style.cssText="display:block;cursor:pointer;padding:6px;white-space:nowrap;margin-bottom:-1px;overflow:hidden;text-overflow:ellipsis;";e.setAttribute("title",h+" ("+l.length+")");mxUtils.write(e,e.getAttribute("title"));x.appendChild(e);null==c&&(c=e,c.style.backgroundColor="#ebf2f9");(function(d,h){mxEvent.addListener(e,"click",function(){c!=h&&(c.style.backgroundColor="",c=h,c.style.backgroundColor=
-"#ebf2f9",y.scrollTop=0,y.innerHTML="",b=0,B=v[d],a())})})(d,e)}a()}d=null!=d?d:!0;f=null!=f?f:!1;var h=document.createElement("div");h.style.height="100%";var l=document.createElement("div");l.style.whiteSpace="nowrap";l.style.height="46px";h.appendChild(l);var n=document.createElement("img");n.setAttribute("border","0");n.setAttribute("align","absmiddle");n.style.width="40px";n.style.height="40px";n.style.marginRight="10px";n.style.paddingBottom="4px";n.src=a.mode==App.MODE_GOOGLE?IMAGE_PATH+"/google-drive-logo.svg":
-a.mode==App.MODE_DROPBOX?IMAGE_PATH+"/dropbox-logo.svg":a.mode==App.MODE_ONEDRIVE?IMAGE_PATH+"/onedrive-logo.svg":a.mode==App.MODE_GITHUB?IMAGE_PATH+"/github-logo.svg":a.mode==App.MODE_TRELLO?IMAGE_PATH+"/trello-logo.svg":a.mode==App.MODE_BROWSER?IMAGE_PATH+"/osa_database.png":IMAGE_PATH+"/osa_drive-harddisk.png";!b&&d&&l.appendChild(n);d&&mxUtils.write(l,(null==a.mode||a.mode==App.MODE_GOOGLE||a.mode==App.MODE_BROWSER?mxResources.get("diagramName"):mxResources.get("filename"))+":");n=".xml";a.mode==
-App.MODE_GOOGLE&&null!=a.drive?n=a.drive.extension:a.mode==App.MODE_DROPBOX&&null!=a.dropbox?n=a.dropbox.extension:a.mode==App.MODE_ONEDRIVE&&null!=a.oneDrive?n=a.oneDrive.extension:a.mode==App.MODE_GITHUB&&null!=a.gitHub?n=a.gitHub.extension:a.mode==App.MODE_TRELLO&&null!=a.trello&&(n=a.trello.extension);var p=document.createElement("input");p.setAttribute("value",a.defaultFilename+n);p.style.marginRight="20px";p.style.marginLeft="10px";p.style.width=b?"220px":"450px";this.init=function(){d&&(p.focus(),
-mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode||mxClient.IS_QUIRKS?p.select():document.execCommand("selectAll",!1,null))};d&&l.appendChild(p);var t=null,u=null,q=null,w=mxUtils.button(mxResources.get("create"),function(){g()});w.className="geBtn gePrimaryBtn";var y=document.createElement("div");y.style.border="1px solid #d3d3d3";y.style.position="absolute";y.style.left="160px";y.style.right="34px";y.style.top=d?"72px":"40px";y.style.bottom="76px";y.style.margin="6px 0 0 -1px";y.style.padding=
-"6px";y.style.overflow="auto";var x=document.createElement("div");x.style.cssText="position:absolute;left:30px;width:128px;top:72px;bottom:76px;margin-top:6px;overflow:auto;border:1px solid #d3d3d3;";d||(x.style.top="40px");var v={},D=1;v.basic=[{title:"blankDiagram",select:!0}];var B=v.basic;if(!b){h.appendChild(x);h.appendChild(y);var A=!1;mxUtils.get(TEMPLATE_PATH+"/index.xml",function(a){if(!A){A=!0;for(a=a.getXml().documentElement.firstChild;null!=a;){if("undefined"!==typeof a.getAttribute){var b=
-a.getAttribute("url");if(null!=b){var c=b.indexOf("/"),b=b.substring(0,c),c=v[b];null==c&&(D++,c=[],v[b]=c);c.push({url:a.getAttribute("url"),libs:a.getAttribute("libs"),title:a.getAttribute("title"),tooltip:a.getAttribute("url")})}}a=a.nextSibling}e()}})}mxEvent.addListener(p,"keypress",function(a){13==a.keyCode&&g()});l=document.createElement("div");l.style.marginTop=b?"4px":"16px";l.style.textAlign="right";l.style.position="absolute";l.style.left="40px";l.style.bottom="30px";l.style.right="40px";
-n=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog(!0)});n.className="geBtn";a.editor.cancelFirst&&!f&&l.appendChild(n);if(!b&&!a.isOffline()&&d&&null==c&&!f){var G=mxUtils.button(mxResources.get("help"),function(){window.open("https://support.draw.io/display/DO/Creating+and+Opening+Files")});G.className="geBtn";l.appendChild(G)}b||"1"==urlParams.embed||f||(b=mxUtils.button(mxResources.get("fromTemplateUrl"),function(){var b=new FilenameDialog(a,"",mxResources.get("create"),function(b){null!=
-b&&0<b.length&&(b=a.getUrl(window.location.pathname+"?mode="+a.mode+"&title="+encodeURIComponent(p.value)+"&create="+encodeURIComponent(b)),null==a.getCurrentFile()?window.location.href=b:window.openWindow(b))},mxResources.get("url"));a.showDialog(b.container,300,80,!0,!0);b.init()}),b.className="geBtn",l.appendChild(b));l.appendChild(w);a.editor.cancelFirst||null!=c||f||l.appendChild(n);h.appendChild(l);this.container=h},CreateDialog=function(a,b,d,c,f,g,k,m,e,h,l,n,p,t,u){function q(c,d,e,h){function l(){mxEvent.addListener(f,
-"click",function(){var c=e;if(k){var d=v.value,h=d.lastIndexOf(".");if(0>b.lastIndexOf(".")&&0>h){var c=null!=c?c:A.value,l="";c==App.MODE_GOOGLE?l=a.drive.extension:c==App.MODE_GITHUB?l=a.gitHub.extension:c==App.MODE_TRELLO?l=a.trello.extension:c==App.MODE_DROPBOX?l=a.dropbox.extension:c==App.MODE_ONEDRIVE?l=a.oneDrive.extension:c==App.MODE_DEVICE&&(l=".xml");0<=h&&(d=d.substring(0,h));v.value=d+l}}w(e)})}var f=document.createElement("a");f.style.overflow="hidden";var g=document.createElement("img");
-g.src=c;g.setAttribute("border","0");g.setAttribute("align","absmiddle");g.style.width="60px";g.style.height="60px";g.style.paddingBottom="6px";f.style.display=mxClient.IS_QUIRKS?"inline":"inline-block";f.className="geBaseButton";f.style.position="relative";f.style.margin="4px";f.style.padding="8px 8px 10px 8px";f.style.whiteSpace="nowrap";f.appendChild(g);mxClient.IS_QUIRKS&&(f.style.cssFloat="left",f.style.zoom="1");f.style.color="gray";f.style.fontSize="11px";var x=document.createElement("div");
-f.appendChild(x);mxUtils.write(x,d);if(null!=h&&null==a[h]){g.style.visibility="hidden";mxUtils.setOpacity(x,10);var q=new Spinner({lines:12,length:12,width:5,radius:10,rotate:0,color:"#000",speed:1.5,trail:60,shadow:!1,hwaccel:!1,top:"40%",zIndex:2E9});q.spin(f);var p=window.setTimeout(function(){null==a[h]&&(q.stop(),f.style.display="none")},3E4);a.addListener("clientLoaded",mxUtils.bind(this,function(){null!=a[h]&&(window.clearTimeout(p),mxUtils.setOpacity(x,100),g.style.visibility="",q.stop(),
-l())}))}else l();D.appendChild(f);++B==n&&(mxUtils.br(D),B=0)}function w(b){var c=v.value;if(null==b||null!=c&&0<c.length)a.hideDialog(),d(c,b)}k=null!=k?k:!0;m=null!=m?m:!0;n=null!=n?n:3;var y=document.createElement("div");null==c&&a.addLanguageMenu(y);var x=document.createElement("h2");mxUtils.write(x,f||mxResources.get("create"));x.style.marginTop="0px";x.style.marginBottom="24px";y.appendChild(x);mxUtils.write(y,mxResources.get("filename")+":");var v=document.createElement("input");v.setAttribute("value",
-b);v.style.width="280px";v.style.marginLeft="10px";v.style.marginBottom="20px";this.init=function(){v.focus();mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode||mxClient.IS_QUIRKS?v.select():document.execCommand("selectAll",!1,null)};y.appendChild(v);null!=p&&null!=t&&"image/"==t.substring(0,6)&&(v.style.width="160px",f=document.createElement("img"),f.setAttribute("src","data:"+t+(u?";base64,":";utf8,")+p),f.style.position="absolute",f.style.top="70px",f.style.right="100px",f.style.maxWidth=
-"120px",f.style.maxHeight="80px",mxUtils.setPrefixedStyle(f.style,"transform","translate(50%,-50%)"),y.appendChild(f));mxUtils.br(y);var D=document.createElement("div");D.style.textAlign="center";var B=0;D.style.marginTop="6px";y.appendChild(D);var A=document.createElement("select");A.style.marginLeft="10px";a.isOfflineApp()||a.isOffline()||("function"===typeof window.DriveClient&&(p=document.createElement("option"),p.setAttribute("value",App.MODE_GOOGLE),mxUtils.write(p,mxResources.get("googleDrive")),
-A.appendChild(p),q(IMAGE_PATH+"/google-drive-logo.svg",mxResources.get("googleDrive"),App.MODE_GOOGLE,"drive")),null!=a.gitHub&&(p=document.createElement("option"),p.setAttribute("value",App.MODE_GITHUB),mxUtils.write(p,mxResources.get("github")),A.appendChild(p),q(IMAGE_PATH+"/github-logo.svg",mxResources.get("github"),App.MODE_GITHUB,"gitHub")),"function"===typeof window.DropboxClient&&(p=document.createElement("option"),p.setAttribute("value",App.MODE_DROPBOX),mxUtils.write(p,mxResources.get("dropbox")),
-A.appendChild(p),a.mode==App.MODE_DROPBOX&&p.setAttribute("selected","selected"),q(IMAGE_PATH+"/dropbox-logo.svg",mxResources.get("dropbox"),App.MODE_DROPBOX,"dropbox")),"function"===typeof window.OneDriveClient&&(p=document.createElement("option"),p.setAttribute("value",App.MODE_ONEDRIVE),mxUtils.write(p,mxResources.get("oneDrive")),A.appendChild(p),a.mode==App.MODE_ONEDRIVE&&p.setAttribute("selected","selected"),q(IMAGE_PATH+"/onedrive-logo.svg",mxResources.get("oneDrive"),App.MODE_ONEDRIVE,"oneDrive")),
-null!=a.trello&&(p=document.createElement("option"),p.setAttribute("value",App.MODE_TRELLO),mxUtils.write(p,mxResources.get("trello")),A.appendChild(p),q(IMAGE_PATH+"/trello-logo.svg",mxResources.get("trello"),App.MODE_TRELLO,"trello")));if(!Editor.useLocalStorage||"device"==urlParams.storage||null!=a.getCurrentFile()&&!mxClient.IS_IOS)p=document.createElement("option"),p.setAttribute("value",App.MODE_DEVICE),mxUtils.write(p,mxResources.get("device")),A.appendChild(p),a.mode!=App.MODE_DEVICE&&m||
-p.setAttribute("selected","selected"),l&&q(IMAGE_PATH+"/osa_drive-harddisk.png",mxResources.get("device"),App.MODE_DEVICE);m&&isLocalStorage&&"0"!=urlParams.browser&&(m=document.createElement("option"),m.setAttribute("value",App.MODE_BROWSER),mxUtils.write(m,mxResources.get("browser")),A.appendChild(m),a.mode==App.MODE_BROWSER&&m.setAttribute("selected","selected"),q(IMAGE_PATH+"/osa_database.png",mxResources.get("browser"),App.MODE_BROWSER));m=document.createElement("div");m.style.marginTop="26px";
-m.style.textAlign="center";null!=h&&(p=mxUtils.button(mxResources.get("help"),function(){window.open(h)}),p.className="geBtn",m.appendChild(p));p=mxUtils.button(mxResources.get("cancel"),function(){null!=c?c():(a.fileLoaded(null),a.hideDialog(),window.close(),window.location.href=a.getUrl())});p.className="geBtn";a.editor.cancelFirst&&m.appendChild(p);null==c&&(t=mxUtils.button(mxResources.get("decideLater"),function(){w(null)}),t.className="geBtn",m.appendChild(t));e&&(e=mxUtils.button(mxResources.get("openInNewWindow"),
-function(){w("_blank")}),e.className="geBtn",m.appendChild(e));mxClient.IS_IOS||(g=mxUtils.button(g||mxResources.get("create"),function(){w(l?"download":App.MODE_DEVICE)}),g.className="geBtn gePrimaryBtn",m.appendChild(g));a.editor.cancelFirst||m.appendChild(p);mxEvent.addListener(v,"keypress",function(b){13==b.keyCode?w(App.MODE_DEVICE):27==b.keyCode&&(a.fileLoaded(null),a.hideDialog(),window.close())});y.appendChild(m);this.container=y},PopupDialog=function(a,b,d,c,f){f=null!=f?f:!0;var g=document.createElement("div");
-g.style.textAlign="left";mxUtils.write(g,mxResources.get("fileOpenLocation"));mxUtils.br(g);mxUtils.br(g);var k=mxUtils.button(mxResources.get("openInThisWindow"),function(){f&&a.hideDialog();null!=c&&c()});k.className="geBtn";k.style.marginBottom="8px";k.style.width="280px";g.appendChild(k);mxUtils.br(g);var m=mxUtils.button(mxResources.get("openInNewWindow"),function(){f&&a.hideDialog();null!=d&&d();window.open(b)});m.className="geBtn gePrimaryBtn";m.style.width=k.style.width;g.appendChild(m);mxUtils.br(g);
-mxUtils.br(g);mxUtils.write(g,mxResources.get("allowPopups"));this.container=g},ImageDialog=function(a,b,d,c,f,g){g=null!=g?g:!0;var k=a.editor.graph,m=document.createElement("div");mxUtils.write(m,b);b=document.createElement("div");b.className="geTitle";b.style.backgroundColor="transparent";b.style.borderColor="transparent";b.style.whiteSpace="nowrap";b.style.textOverflow="clip";b.style.cursor="default";mxClient.IS_VML||(b.style.paddingRight="20px");var e=document.createElement("input");e.setAttribute("value",
-d);e.setAttribute("type","text");e.setAttribute("spellcheck","false");e.setAttribute("autocorrect","off");e.setAttribute("autocomplete","off");e.setAttribute("autocapitalize","off");e.style.marginTop="6px";e.style.width=(Graph.fileSupport?420:340)+(mxClient.IS_QUIRKS?20:-20)+"px";e.style.backgroundImage="url('"+Dialog.prototype.clearImage+"')";e.style.backgroundRepeat="no-repeat";e.style.backgroundPosition="100% 50%";e.style.paddingRight="14px";d=document.createElement("div");d.setAttribute("title",
-mxResources.get("reset"));d.style.position="relative";d.style.left="-16px";d.style.width="12px";d.style.height="14px";d.style.cursor="pointer";d.style.display=mxClient.IS_VML?"inline":"inline-block";d.style.top=(mxClient.IS_VML?0:3)+"px";d.style.background="url('"+a.editor.transparentImage+"')";mxEvent.addListener(d,"click",function(){e.value="";e.focus()});b.appendChild(e);b.appendChild(d);m.appendChild(b);var h=function(b,d,e){var h="data:"==b.substring(0,5);(!a.isOffline()||h&&"undefined"===typeof chrome)&&
-a.spinner.spin(document.body,mxResources.get("inserting"))?a.loadImage(b,function(h){a.spinner.stop();a.hideDialog();var l=null!=d&&null!=e?Math.max(d/h.width,e/h.height):Math.min(1,Math.min(520/h.width,520/h.height));g&&(b=a.convertDataUri(b));c(b,Math.round(Number(h.width)*l),Math.round(Number(h.height)*l))},function(){a.spinner.stop();c(null);a.showError(mxResources.get("error"),mxResources.get("fileNotFound"),mxResources.get("ok"))}):(b=a.convertDataUri(b),d=null==d?120:d,e=null==e?100:e,a.hideDialog(),
-c(b,d,e))},l=function(b){if(null!=b&&0<b.length){var d=f?null:k.getModel().getGeometry(k.getSelectionCell());null!=d?h(b,d.width,d.height):h(b)}else a.hideDialog(),c(null)};this.init=function(){e.focus();if(Graph.fileSupport){e.setAttribute("placeholder",mxResources.get("dragImagesHere"));var b=m.parentNode,c=null;mxEvent.addListener(b,"dragleave",function(a){null!=c&&(c.parentNode.removeChild(c),c=null);a.stopPropagation();a.preventDefault()});mxEvent.addListener(b,"dragover",mxUtils.bind(this,function(d){null==
-c&&(!mxClient.IS_IE||10<document.documentMode)&&(c=a.highlightElement(b));d.stopPropagation();d.preventDefault()}));mxEvent.addListener(b,"drop",mxUtils.bind(this,function(b){null!=c&&(c.parentNode.removeChild(c),c=null);if(0<b.dataTransfer.files.length)a.importFiles(b.dataTransfer.files,0,0,a.maxImageSize,function(a,b,c,d,e,h){l(a)},function(){},function(a){return"image/"==a.type.substring(0,6)},function(a){for(var b=0;b<a.length;b++)a[b]()},!mxEvent.isControlDown(b));else if(0<=mxUtils.indexOf(b.dataTransfer.types,
-"text/uri-list")){var d=b.dataTransfer.getData("text/uri-list");/\.(gif|jpg|jpeg|tiff|png|svg)($|\?)/i.test(d)&&l(decodeURIComponent(d))}b.stopPropagation();b.preventDefault()}),!1)}};d=document.createElement("div");d.style.marginTop=mxClient.IS_QUIRKS?"22px":"14px";d.style.textAlign="right";b=mxUtils.button(mxResources.get("cancel"),function(){a.spinner.stop();a.hideDialog()});b.className="geBtn";a.editor.cancelFirst&&d.appendChild(b);ImageDialog.filePicked=function(a){a.action==google.picker.Action.PICKED&&
-null!=a.docs[0].thumbnails&&(a=a.docs[0].thumbnails[a.docs[0].thumbnails.length-1],null!=a&&(e.value=a.url));e.focus()};if(Graph.fileSupport){var n=document.createElement("input");n.setAttribute("multiple","multiple");n.setAttribute("type","file");if(null==document.documentMode){mxEvent.addListener(n,"change",function(b){a.importFiles(n.files,0,0,a.maxImageSize,function(a,b,c,d,e,h){l(a)},function(){},function(a){return"image/"==a.type.substring(0,6)},function(a){for(var b=0;b<a.length;b++)a[b]()},
-!0)});var p=mxUtils.button(mxResources.get("open"),function(){n.click()});p.className="geBtn";d.appendChild(p)}}document.createElement("canvas").getContext&&"data:image/"==e.value.substring(0,11)&&"data:image/svg"!=e.value.substring(0,14)&&(p=mxUtils.button(mxResources.get("crop"),function(){var b=new CropImageDialog(a,e.value,function(a){e.value=a});a.showDialog(b.container,200,180,!0,!0);b.init()}),p.className="geBtn",d.appendChild(p));"undefined"!=typeof google&&"undefined"!=typeof google.picker&&
-window.self===window.top&&(p=mxUtils.button(mxResources.get("search"),function(){if(null==a.imageSearchPicker){var b=(new google.picker.PickerBuilder).setLocale(mxLanguage).addView(google.picker.ViewId.IMAGE_SEARCH).enableFeature(google.picker.Feature.NAV_HIDDEN);a.imageSearchPicker=b.setCallback(function(a){ImageDialog.filePicked(a)}).build()}a.imageSearchPicker.setVisible(!0);a.movePickersToTop()}),p.className="geBtn",d.appendChild(p),null!=a.drive&&"1"==urlParams.photos&&(p=mxUtils.button(mxResources.get("googlePlus"),
-function(){a.spinner.spin(document.body,mxResources.get("authorizing"))&&a.drive.checkToken(mxUtils.bind(this,function(){a.spinner.stop();if(null==a.photoPicker){var b=gapi.auth.getToken().access_token,b=(new google.picker.PickerBuilder).setAppId(a.drive.appId).setLocale(mxLanguage).setOAuthToken(b).addView(google.picker.ViewId.PHOTOS).addView(google.picker.ViewId.PHOTO_ALBUMS).addView(google.picker.ViewId.PHOTO_UPLOAD);a.photoPicker=b.setCallback(function(a){ImageDialog.filePicked(a)}).build()}a.photoPicker.setVisible(!0);
-a.movePickersToTop()}))}),p.className="geBtn",d.appendChild(p)));mxEvent.addListener(e,"keypress",function(a){13==a.keyCode&&l(e.value)});p=mxUtils.button(mxResources.get("apply"),function(){l(e.value)});p.className="geBtn gePrimaryBtn";d.appendChild(p);a.editor.cancelFirst||d.appendChild(b);Graph.fileSupport&&(d.style.marginTop="120px",m.style.backgroundImage="url('"+IMAGE_PATH+"/droptarget.png')",m.style.backgroundPosition="center 65%",m.style.backgroundRepeat="no-repeat",b=document.createElement("div"),
-b.style.position="absolute",b.style.width="420px",b.style.top="58%",b.style.textAlign="center",b.style.fontSize="18px",b.style.color="#a0c3ff",mxUtils.write(b,mxResources.get("dragImagesHere")),m.appendChild(b));m.appendChild(d);this.container=m},LinkDialog=function(a,b,d,c,f){function g(a,b,c){c=mxUtils.button("",c);c.className="geBtn";c.setAttribute("title",b);b=document.createElement("img");b.style.height="26px";b.style.width="26px";b.setAttribute("src",a);c.style.minWidth="42px";c.style.verticalAlign=
-"middle";c.appendChild(b);w.appendChild(c)}var k=document.createElement("div");mxUtils.write(k,mxResources.get("editLink")+":");var m=document.createElement("div");m.className="geTitle";m.style.backgroundColor="transparent";m.style.borderColor="transparent";m.style.whiteSpace="nowrap";m.style.textOverflow="clip";m.style.cursor="default";mxClient.IS_VML||(m.style.paddingRight="20px");var e=document.createElement("input");e.setAttribute("placeholder",mxResources.get("dragUrlsHere"));e.setAttribute("type",
-"text");e.style.marginTop="6px";e.style.width="400px";e.style.backgroundImage="url('"+Dialog.prototype.clearImage+"')";e.style.backgroundRepeat="no-repeat";e.style.backgroundPosition="100% 50%";e.style.paddingRight="14px";var h=document.createElement("div");h.setAttribute("title",mxResources.get("reset"));h.style.position="relative";h.style.left="-16px";h.style.width="12px";h.style.height="14px";h.style.cursor="pointer";h.style.display=mxClient.IS_VML?"inline":"inline-block";h.style.top=(mxClient.IS_VML?
-0:3)+"px";h.style.background="url('"+a.editor.transparentImage+"')";mxEvent.addListener(h,"click",function(){e.value="";e.focus()});var l=document.createElement("input");l.style.cssText="margin-right:8px;margin-bottom:8px;";l.setAttribute("value","url");l.setAttribute("type","radio");l.setAttribute("name","current-linkdialog");var n=document.createElement("input");n.style.cssText="margin-right:8px;margin-bottom:8px;";n.setAttribute("value","url");n.setAttribute("type","radio");n.setAttribute("name",
-"current-linkdialog");var p=document.createElement("select");p.style.width="380px";if(f&&null!=a.pages){null!=b&&a.editor.graph.isPageLink(b)?(n.setAttribute("checked","checked"),n.defaultChecked=!0):(e.setAttribute("value",b),l.setAttribute("checked","checked"),l.defaultChecked=!0);e.style.width="380px";m.appendChild(l);m.appendChild(e);m.appendChild(h);mxUtils.br(m);m.appendChild(n);f=!1;for(h=0;h<a.pages.length;h++){var t=document.createElement("option");mxUtils.write(t,a.pages[h].getName()||mxResources.get("pageWithNumber",
-[h+1]));t.setAttribute("value","data:page/id,"+a.pages[h].getId());b==t.getAttribute("value")&&(t.setAttribute("selected","selected"),f=!0);p.appendChild(t)}if(!f&&n.checked){var u=document.createElement("option");mxUtils.write(u,mxResources.get("pageNotFound"));u.setAttribute("disabled","disabled");u.setAttribute("selected","selected");u.setAttribute("value","pageNotFound");p.appendChild(u);mxEvent.addListener(p,"change",function(){null==u.parentNode||u.selected||u.parentNode.removeChild(u)})}m.appendChild(p)}else e.setAttribute("value",
-b),m.appendChild(e),m.appendChild(h);k.appendChild(m);var q=mxUtils.button(d,function(){a.hideDialog();c(n.checked?"pageNotFound"!==p.value?p.value:b:e.value,LinkDialog.selectedDocs)});q.style.verticalAlign="middle";q.className="geBtn gePrimaryBtn";this.init=function(){n.checked?p.focus():(e.focus(),mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode||mxClient.IS_QUIRKS?e.select():document.execCommand("selectAll",!1,null));mxEvent.addListener(p,"focus",function(){l.removeAttribute("checked");
-n.setAttribute("checked","checked");n.checked=!0});mxEvent.addListener(e,"focus",function(){n.removeAttribute("checked");l.setAttribute("checked","checked");l.checked=!0});if(Graph.fileSupport){var b=k.parentNode,c=null;mxEvent.addListener(b,"dragleave",function(a){null!=c&&(c.parentNode.removeChild(c),c=null);a.stopPropagation();a.preventDefault()});mxEvent.addListener(b,"dragover",mxUtils.bind(this,function(d){null==c&&(!mxClient.IS_IE||10<document.documentMode)&&(c=a.highlightElement(b));d.stopPropagation();
-d.preventDefault()}));mxEvent.addListener(b,"drop",mxUtils.bind(this,function(a){null!=c&&(c.parentNode.removeChild(c),c=null);0<=mxUtils.indexOf(a.dataTransfer.types,"text/uri-list")&&(e.value=decodeURIComponent(a.dataTransfer.getData("text/uri-list")),l.setAttribute("checked","checked"),l.checked=!0,q.click());a.stopPropagation();a.preventDefault()}),!1)}};var w=document.createElement("div");w.style.marginTop="20px";w.style.textAlign="right";d=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog()});
-d.style.verticalAlign="middle";d.className="geBtn";a.editor.cancelFirst&&w.appendChild(d);LinkDialog.selectedDocs=null;LinkDialog.filePicked=function(a){if(a.action==google.picker.Action.PICKED){LinkDialog.selectedDocs=a.docs;var b=a.docs[0].url;"application/mxe"==a.docs[0].mimeType||"application/vnd.jgraph.mxfile"==a.docs[0].mimeType?(b=DriveClient.prototype.oldAppHostname,b="https://"+b+"/#G"+a.docs[0].id):"application/mxr"==a.docs[0].mimeType||"application/vnd.jgraph.mxfile.realtime"==a.docs[0].mimeType?
-(b=DriveClient.prototype.newAppHostname,b="https://"+b+"/#G"+a.docs[0].id):"application/vnd.google-apps.folder"==a.docs[0].mimeType&&(b="https://drive.google.com/#folders/"+a.docs[0].id);e.value=b;e.focus()}else LinkDialog.selectedDocs=null;e.focus()};"undefined"!=typeof google&&"undefined"!=typeof google.picker&&null!=a.drive&&g(IMAGE_PATH+"/google-drive-logo.svg",mxResources.get("googlePlus"),function(){a.spinner.spin(document.body,mxResources.get("authorizing"))&&a.drive.checkToken(mxUtils.bind(this,
-function(){a.spinner.stop();if(null==a.linkPicker){var b=gapi.auth.getToken().access_token,c=(new google.picker.DocsView(google.picker.ViewId.FOLDERS)).setParent("root").setIncludeFolders(!0).setSelectFolderEnabled(!0),d=(new google.picker.DocsView).setIncludeFolders(!0).setSelectFolderEnabled(!0),b=(new google.picker.PickerBuilder).setAppId(a.drive.appId).setLocale(mxLanguage).setOAuthToken(b).addView(c).addView(d).addView(google.picker.ViewId.RECENTLY_PICKED).addView(google.picker.ViewId.IMAGE_SEARCH).addView(google.picker.ViewId.VIDEO_SEARCH).addView(google.picker.ViewId.MAPS);
+d(k.value,m.value)});g.appendChild(h);h.className="geBtn gePrimaryBtn";a.editor.cancelFirst||g.appendChild(e);this.container=g},NewDialog=function(a,b,d,c,f,g){function k(){if(c)d||a.hideDialog(),c(q,u.value);else{var b=u.value;null!=b&&0<b.length&&a.pickFolder(a.mode==App.MODE_ONEDRIVE||a.mode==App.MODE_TRELLO||a.mode==App.MODE_GOOGLE&&(null==a.stateArg||null==a.stateArg.folderId)?a.mode:null,function(c){a.createFile(b,q,null!=t&&0<t.length?t:null,null,function(){a.hideDialog()},null,c)})}}function m(a,
+b,c){null!=x&&(x.style.backgroundColor="transparent",x.style.border="1px solid transparent");q=b;t=c;x=a;x.style.backgroundColor="#e6eff8";x.style.border="1px solid #ccd9ea"}function e(a,b,c,d,e){var h=document.createElement("div");h.className="geTemplate";h.style.height="140px";h.style.width="140px";null!=d&&0<d.length&&h.setAttribute("title",d);if(null!=a&&0<a.length){a.substring(0,a.length-4);h.style.backgroundImage="url("+TEMPLATE_PATH+"/"+a.substring(0,a.length-4)+".png)";h.style.backgroundPosition=
+"center center";h.style.backgroundRepeat="no-repeat";var l=!1;mxEvent.addListener(h,"click",function(c){y.setAttribute("disabled","disabled");h.style.backgroundColor="transparent";h.style.border="1px solid transparent";mxUtils.get(TEMPLATE_PATH+"/"+a,mxUtils.bind(this,function(a){200<=a.getStatus()&&299>=a.getStatus()&&(y.removeAttribute("disabled"),m(h,a.getText(),b),l&&k())}))});mxEvent.addListener(h,"dblclick",function(a){l=!0})}else h.innerHTML='<table width="100%" height="100%"><tr><td align="center" valign="middle">'+
+mxResources.get(c)+"</td></tr></table>",e&&m(h),mxEvent.addListener(h,"click",function(a){m(h)}),mxEvent.addListener(h,"dblclick",function(a){k()});w.appendChild(h)}function h(){function a(){for(var a=!0;b<A.length&&(a||0!=mxUtils.mod(b,30));)a=A[b++],e(a.url,a.libs,a.title,a.tooltip,a.select),a=!1}var b=0;mxEvent.addListener(w,"scroll",function(b){w.scrollTop+w.clientHeight>=w.scrollHeight&&(a(),mxEvent.consume(b))});var c=null,d;for(d in C){var h=document.createElement("div"),l=mxResources.get(d),
+f=C[d];null==l&&(l=d.substring(0,1).toUpperCase()+d.substring(1));18<l.length&&(l=l.substring(0,18)+"&hellip;");h.style.cssText="display:block;cursor:pointer;padding:6px;white-space:nowrap;margin-bottom:-1px;overflow:hidden;text-overflow:ellipsis;";h.setAttribute("title",l+" ("+f.length+")");mxUtils.write(h,h.getAttribute("title"));v.appendChild(h);null==c&&(c=h,c.style.backgroundColor="#ebf2f9");(function(d,e){mxEvent.addListener(h,"click",function(){c!=e&&(c.style.backgroundColor="",c=e,c.style.backgroundColor=
+"#ebf2f9",w.scrollTop=0,w.innerHTML="",b=0,A=C[d],a())})})(d,h)}a()}d=null!=d?d:!0;f=null!=f?f:!1;var l=document.createElement("div");l.style.height="100%";var n=document.createElement("div");n.style.whiteSpace="nowrap";n.style.height="46px";l.appendChild(n);var p=document.createElement("img");p.setAttribute("border","0");p.setAttribute("align","absmiddle");p.style.width="40px";p.style.height="40px";p.style.marginRight="10px";p.style.paddingBottom="4px";p.src=a.mode==App.MODE_GOOGLE?IMAGE_PATH+"/google-drive-logo.svg":
+a.mode==App.MODE_DROPBOX?IMAGE_PATH+"/dropbox-logo.svg":a.mode==App.MODE_ONEDRIVE?IMAGE_PATH+"/onedrive-logo.svg":a.mode==App.MODE_GITHUB?IMAGE_PATH+"/github-logo.svg":a.mode==App.MODE_TRELLO?IMAGE_PATH+"/trello-logo.svg":a.mode==App.MODE_BROWSER?IMAGE_PATH+"/osa_database.png":IMAGE_PATH+"/osa_drive-harddisk.png";!b&&d&&n.appendChild(p);d&&mxUtils.write(n,(null==a.mode||a.mode==App.MODE_GOOGLE||a.mode==App.MODE_BROWSER?mxResources.get("diagramName"):mxResources.get("filename"))+":");p=".xml";a.mode==
+App.MODE_GOOGLE&&null!=a.drive?p=a.drive.extension:a.mode==App.MODE_DROPBOX&&null!=a.dropbox?p=a.dropbox.extension:a.mode==App.MODE_ONEDRIVE&&null!=a.oneDrive?p=a.oneDrive.extension:a.mode==App.MODE_GITHUB&&null!=a.gitHub?p=a.gitHub.extension:a.mode==App.MODE_TRELLO&&null!=a.trello&&(p=a.trello.extension);var u=document.createElement("input");u.setAttribute("value",a.defaultFilename+p);u.style.marginRight="20px";u.style.marginLeft="10px";u.style.width=b?"220px":"450px";this.init=function(){d&&(u.focus(),
+mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode||mxClient.IS_QUIRKS?u.select():document.execCommand("selectAll",!1,null))};d&&n.appendChild(u);var t=null,q=null,x=null,y=mxUtils.button(mxResources.get("create"),function(){k()});y.className="geBtn gePrimaryBtn";var w=document.createElement("div");w.style.border="1px solid #d3d3d3";w.style.position="absolute";w.style.left="160px";w.style.right="34px";w.style.top=d?"72px":"40px";w.style.bottom="76px";w.style.margin="6px 0 0 -1px";w.style.padding=
+"6px";w.style.overflow="auto";var v=document.createElement("div");v.style.cssText="position:absolute;left:30px;width:128px;top:72px;bottom:76px;margin-top:6px;overflow:auto;border:1px solid #d3d3d3;";d||(v.style.top="40px");var C={},B=1;C.basic=[{title:"blankDiagram",select:!0}];var A=C.basic;if(!b){l.appendChild(v);l.appendChild(w);var G=!1;mxUtils.get(TEMPLATE_PATH+"/index.xml",function(a){if(!G){G=!0;for(a=a.getXml().documentElement.firstChild;null!=a;){if("undefined"!==typeof a.getAttribute){var b=
+a.getAttribute("url");if(null!=b){var c=b.indexOf("/"),b=b.substring(0,c),c=C[b];null==c&&(B++,c=[],C[b]=c);c.push({url:a.getAttribute("url"),libs:a.getAttribute("libs"),title:a.getAttribute("title"),tooltip:a.getAttribute("url")})}}a=a.nextSibling}h()}})}mxEvent.addListener(u,"keypress",function(a){13==a.keyCode&&k()});n=document.createElement("div");n.style.marginTop=b?"4px":"16px";n.style.textAlign="right";n.style.position="absolute";n.style.left="40px";n.style.bottom="30px";n.style.right="40px";
+p=mxUtils.button(mxResources.get("cancel"),function(){null!=g&&g();a.hideDialog(!0)});p.className="geBtn";!a.editor.cancelFirst||f&&null==g||n.appendChild(p);if(!b&&!a.isOffline()&&d&&null==c&&!f){var z=mxUtils.button(mxResources.get("help"),function(){window.open("https://support.draw.io/display/DO/Creating+and+Opening+Files")});z.className="geBtn";n.appendChild(z)}b||"1"==urlParams.embed||f||(b=mxUtils.button(mxResources.get("fromTemplateUrl"),function(){var b=new FilenameDialog(a,"",mxResources.get("create"),
+function(b){null!=b&&0<b.length&&(b=a.getUrl(window.location.pathname+"?mode="+a.mode+"&title="+encodeURIComponent(u.value)+"&create="+encodeURIComponent(b)),null==a.getCurrentFile()?window.location.href=b:window.openWindow(b))},mxResources.get("url"));a.showDialog(b.container,300,80,!0,!0);b.init()}),b.className="geBtn",n.appendChild(b));n.appendChild(y);a.editor.cancelFirst||null!=c||f&&null==g||n.appendChild(p);l.appendChild(n);this.container=l},CreateDialog=function(a,b,d,c,f,g,k,m,e,h,l,n,p,
+u,t){function q(c,d,e,h){function l(){mxEvent.addListener(f,"click",function(){var c=e;if(k){var d=v.value,h=d.lastIndexOf(".");if(0>b.lastIndexOf(".")&&0>h){var c=null!=c?c:A.value,l="";c==App.MODE_GOOGLE?l=a.drive.extension:c==App.MODE_GITHUB?l=a.gitHub.extension:c==App.MODE_TRELLO?l=a.trello.extension:c==App.MODE_DROPBOX?l=a.dropbox.extension:c==App.MODE_ONEDRIVE?l=a.oneDrive.extension:c==App.MODE_DEVICE&&(l=".xml");0<=h&&(d=d.substring(0,h));v.value=d+l}}x(e)})}var f=document.createElement("a");
+f.style.overflow="hidden";var g=document.createElement("img");g.src=c;g.setAttribute("border","0");g.setAttribute("align","absmiddle");g.style.width="60px";g.style.height="60px";g.style.paddingBottom="6px";f.style.display=mxClient.IS_QUIRKS?"inline":"inline-block";f.className="geBaseButton";f.style.position="relative";f.style.margin="4px";f.style.padding="8px 8px 10px 8px";f.style.whiteSpace="nowrap";f.appendChild(g);mxClient.IS_QUIRKS&&(f.style.cssFloat="left",f.style.zoom="1");f.style.color="gray";
+f.style.fontSize="11px";var w=document.createElement("div");f.appendChild(w);mxUtils.write(w,d);if(null!=h&&null==a[h]){g.style.visibility="hidden";mxUtils.setOpacity(w,10);var q=new Spinner({lines:12,length:12,width:5,radius:10,rotate:0,color:"#000",speed:1.5,trail:60,shadow:!1,hwaccel:!1,top:"40%",zIndex:2E9});q.spin(f);var p=window.setTimeout(function(){null==a[h]&&(q.stop(),f.style.display="none")},3E4);a.addListener("clientLoaded",mxUtils.bind(this,function(){null!=a[h]&&(window.clearTimeout(p),
+mxUtils.setOpacity(w,100),g.style.visibility="",q.stop(),l())}))}else l();C.appendChild(f);++B==n&&(mxUtils.br(C),B=0)}function x(b){var c=v.value;if(null==b||null!=c&&0<c.length)a.hideDialog(),d(c,b)}k=null!=k?k:!0;m=null!=m?m:!0;n=null!=n?n:3;var y=document.createElement("div");null==c&&a.addLanguageMenu(y);var w=document.createElement("h2");mxUtils.write(w,f||mxResources.get("create"));w.style.marginTop="0px";w.style.marginBottom="24px";y.appendChild(w);mxUtils.write(y,mxResources.get("filename")+
+":");var v=document.createElement("input");v.setAttribute("value",b);v.style.width="280px";v.style.marginLeft="10px";v.style.marginBottom="20px";this.init=function(){v.focus();mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode||mxClient.IS_QUIRKS?v.select():document.execCommand("selectAll",!1,null)};y.appendChild(v);null!=p&&null!=u&&"image/"==u.substring(0,6)&&(v.style.width="160px",f=document.createElement("img"),f.setAttribute("src","data:"+u+(t?";base64,":";utf8,")+p),f.style.position="absolute",
+f.style.top="70px",f.style.right="100px",f.style.maxWidth="120px",f.style.maxHeight="80px",mxUtils.setPrefixedStyle(f.style,"transform","translate(50%,-50%)"),y.appendChild(f));mxUtils.br(y);var C=document.createElement("div");C.style.textAlign="center";var B=0;C.style.marginTop="6px";y.appendChild(C);var A=document.createElement("select");A.style.marginLeft="10px";a.isOfflineApp()||a.isOffline()||("function"===typeof window.DriveClient&&(p=document.createElement("option"),p.setAttribute("value",
+App.MODE_GOOGLE),mxUtils.write(p,mxResources.get("googleDrive")),A.appendChild(p),q(IMAGE_PATH+"/google-drive-logo.svg",mxResources.get("googleDrive"),App.MODE_GOOGLE,"drive")),null!=a.gitHub&&(p=document.createElement("option"),p.setAttribute("value",App.MODE_GITHUB),mxUtils.write(p,mxResources.get("github")),A.appendChild(p),q(IMAGE_PATH+"/github-logo.svg",mxResources.get("github"),App.MODE_GITHUB,"gitHub")),"function"===typeof window.DropboxClient&&(p=document.createElement("option"),p.setAttribute("value",
+App.MODE_DROPBOX),mxUtils.write(p,mxResources.get("dropbox")),A.appendChild(p),a.mode==App.MODE_DROPBOX&&p.setAttribute("selected","selected"),q(IMAGE_PATH+"/dropbox-logo.svg",mxResources.get("dropbox"),App.MODE_DROPBOX,"dropbox")),"function"===typeof window.OneDriveClient&&(p=document.createElement("option"),p.setAttribute("value",App.MODE_ONEDRIVE),mxUtils.write(p,mxResources.get("oneDrive")),A.appendChild(p),a.mode==App.MODE_ONEDRIVE&&p.setAttribute("selected","selected"),q(IMAGE_PATH+"/onedrive-logo.svg",
+mxResources.get("oneDrive"),App.MODE_ONEDRIVE,"oneDrive")),null!=a.trello&&(p=document.createElement("option"),p.setAttribute("value",App.MODE_TRELLO),mxUtils.write(p,mxResources.get("trello")),A.appendChild(p),q(IMAGE_PATH+"/trello-logo.svg",mxResources.get("trello"),App.MODE_TRELLO,"trello")));if(!Editor.useLocalStorage||"device"==urlParams.storage||null!=a.getCurrentFile()&&!mxClient.IS_IOS)p=document.createElement("option"),p.setAttribute("value",App.MODE_DEVICE),mxUtils.write(p,mxResources.get("device")),
+A.appendChild(p),a.mode!=App.MODE_DEVICE&&m||p.setAttribute("selected","selected"),l&&q(IMAGE_PATH+"/osa_drive-harddisk.png",mxResources.get("device"),App.MODE_DEVICE);m&&isLocalStorage&&"0"!=urlParams.browser&&(m=document.createElement("option"),m.setAttribute("value",App.MODE_BROWSER),mxUtils.write(m,mxResources.get("browser")),A.appendChild(m),a.mode==App.MODE_BROWSER&&m.setAttribute("selected","selected"),q(IMAGE_PATH+"/osa_database.png",mxResources.get("browser"),App.MODE_BROWSER));m=document.createElement("div");
+m.style.marginTop="26px";m.style.textAlign="center";null!=h&&(p=mxUtils.button(mxResources.get("help"),function(){window.open(h)}),p.className="geBtn",m.appendChild(p));p=mxUtils.button(mxResources.get("cancel"),function(){null!=c?c():(a.fileLoaded(null),a.hideDialog(),window.close(),window.location.href=a.getUrl())});p.className="geBtn";a.editor.cancelFirst&&m.appendChild(p);null==c&&(u=mxUtils.button(mxResources.get("decideLater"),function(){x(null)}),u.className="geBtn",m.appendChild(u));e&&(e=
+mxUtils.button(mxResources.get("openInNewWindow"),function(){x("_blank")}),e.className="geBtn",m.appendChild(e));mxClient.IS_IOS||(g=mxUtils.button(g||mxResources.get("create"),function(){x(l?"download":App.MODE_DEVICE)}),g.className="geBtn gePrimaryBtn",m.appendChild(g));a.editor.cancelFirst||m.appendChild(p);mxEvent.addListener(v,"keypress",function(b){13==b.keyCode?x(App.MODE_DEVICE):27==b.keyCode&&(a.fileLoaded(null),a.hideDialog(),window.close())});y.appendChild(m);this.container=y},PopupDialog=
+function(a,b,d,c,f){f=null!=f?f:!0;var g=document.createElement("div");g.style.textAlign="left";mxUtils.write(g,mxResources.get("fileOpenLocation"));mxUtils.br(g);mxUtils.br(g);var k=mxUtils.button(mxResources.get("openInThisWindow"),function(){f&&a.hideDialog();null!=c&&c()});k.className="geBtn";k.style.marginBottom="8px";k.style.width="280px";g.appendChild(k);mxUtils.br(g);var m=mxUtils.button(mxResources.get("openInNewWindow"),function(){f&&a.hideDialog();null!=d&&d();window.open(b)});m.className=
+"geBtn gePrimaryBtn";m.style.width=k.style.width;g.appendChild(m);mxUtils.br(g);mxUtils.br(g);mxUtils.write(g,mxResources.get("allowPopups"));this.container=g},ImageDialog=function(a,b,d,c,f,g){g=null!=g?g:!0;var k=a.editor.graph,m=document.createElement("div");mxUtils.write(m,b);b=document.createElement("div");b.className="geTitle";b.style.backgroundColor="transparent";b.style.borderColor="transparent";b.style.whiteSpace="nowrap";b.style.textOverflow="clip";b.style.cursor="default";mxClient.IS_VML||
+(b.style.paddingRight="20px");var e=document.createElement("input");e.setAttribute("value",d);e.setAttribute("type","text");e.setAttribute("spellcheck","false");e.setAttribute("autocorrect","off");e.setAttribute("autocomplete","off");e.setAttribute("autocapitalize","off");e.style.marginTop="6px";e.style.width=(Graph.fileSupport?420:340)+(mxClient.IS_QUIRKS?20:-20)+"px";e.style.backgroundImage="url('"+Dialog.prototype.clearImage+"')";e.style.backgroundRepeat="no-repeat";e.style.backgroundPosition=
+"100% 50%";e.style.paddingRight="14px";d=document.createElement("div");d.setAttribute("title",mxResources.get("reset"));d.style.position="relative";d.style.left="-16px";d.style.width="12px";d.style.height="14px";d.style.cursor="pointer";d.style.display=mxClient.IS_VML?"inline":"inline-block";d.style.top=(mxClient.IS_VML?0:3)+"px";d.style.background="url('"+a.editor.transparentImage+"')";mxEvent.addListener(d,"click",function(){e.value="";e.focus()});b.appendChild(e);b.appendChild(d);m.appendChild(b);
+var h=function(b,d,e){var h="data:"==b.substring(0,5);(!a.isOffline()||h&&"undefined"===typeof chrome)&&a.spinner.spin(document.body,mxResources.get("inserting"))?a.loadImage(b,function(h){a.spinner.stop();a.hideDialog();var l=null!=d&&null!=e?Math.max(d/h.width,e/h.height):Math.min(1,Math.min(520/h.width,520/h.height));g&&(b=a.convertDataUri(b));c(b,Math.round(Number(h.width)*l),Math.round(Number(h.height)*l))},function(){a.spinner.stop();c(null);a.showError(mxResources.get("error"),mxResources.get("fileNotFound"),
+mxResources.get("ok"))}):(b=a.convertDataUri(b),d=null==d?120:d,e=null==e?100:e,a.hideDialog(),c(b,d,e))},l=function(b){if(null!=b&&0<b.length){var d=f?null:k.getModel().getGeometry(k.getSelectionCell());null!=d?h(b,d.width,d.height):h(b)}else a.hideDialog(),c(null)};this.init=function(){e.focus();if(Graph.fileSupport){e.setAttribute("placeholder",mxResources.get("dragImagesHere"));var b=m.parentNode,c=null;mxEvent.addListener(b,"dragleave",function(a){null!=c&&(c.parentNode.removeChild(c),c=null);
+a.stopPropagation();a.preventDefault()});mxEvent.addListener(b,"dragover",mxUtils.bind(this,function(d){null==c&&(!mxClient.IS_IE||10<document.documentMode)&&(c=a.highlightElement(b));d.stopPropagation();d.preventDefault()}));mxEvent.addListener(b,"drop",mxUtils.bind(this,function(b){null!=c&&(c.parentNode.removeChild(c),c=null);if(0<b.dataTransfer.files.length)a.importFiles(b.dataTransfer.files,0,0,a.maxImageSize,function(a,b,c,d,e,h){l(a)},function(){},function(a){return"image/"==a.type.substring(0,
+6)},function(a){for(var b=0;b<a.length;b++)a[b]()},!mxEvent.isControlDown(b));else if(0<=mxUtils.indexOf(b.dataTransfer.types,"text/uri-list")){var d=b.dataTransfer.getData("text/uri-list");/\.(gif|jpg|jpeg|tiff|png|svg)($|\?)/i.test(d)&&l(decodeURIComponent(d))}b.stopPropagation();b.preventDefault()}),!1)}};d=document.createElement("div");d.style.marginTop=mxClient.IS_QUIRKS?"22px":"14px";d.style.textAlign="right";b=mxUtils.button(mxResources.get("cancel"),function(){a.spinner.stop();a.hideDialog()});
+b.className="geBtn";a.editor.cancelFirst&&d.appendChild(b);ImageDialog.filePicked=function(a){a.action==google.picker.Action.PICKED&&null!=a.docs[0].thumbnails&&(a=a.docs[0].thumbnails[a.docs[0].thumbnails.length-1],null!=a&&(e.value=a.url));e.focus()};if(Graph.fileSupport){var n=document.createElement("input");n.setAttribute("multiple","multiple");n.setAttribute("type","file");if(null==document.documentMode){mxEvent.addListener(n,"change",function(b){a.importFiles(n.files,0,0,a.maxImageSize,function(a,
+b,c,d,e,h){l(a)},function(){},function(a){return"image/"==a.type.substring(0,6)},function(a){for(var b=0;b<a.length;b++)a[b]()},!0)});var p=mxUtils.button(mxResources.get("open"),function(){n.click()});p.className="geBtn";d.appendChild(p)}}document.createElement("canvas").getContext&&"data:image/"==e.value.substring(0,11)&&"data:image/svg"!=e.value.substring(0,14)&&(p=mxUtils.button(mxResources.get("crop"),function(){var b=new CropImageDialog(a,e.value,function(a){e.value=a});a.showDialog(b.container,
+200,180,!0,!0);b.init()}),p.className="geBtn",d.appendChild(p));"undefined"!=typeof google&&"undefined"!=typeof google.picker&&window.self===window.top&&(p=mxUtils.button(mxResources.get("search"),function(){if(null==a.imageSearchPicker){var b=(new google.picker.PickerBuilder).setLocale(mxLanguage).addView(google.picker.ViewId.IMAGE_SEARCH).enableFeature(google.picker.Feature.NAV_HIDDEN);a.imageSearchPicker=b.setCallback(function(a){ImageDialog.filePicked(a)}).build()}a.imageSearchPicker.setVisible(!0);
+a.movePickersToTop()}),p.className="geBtn",d.appendChild(p),null!=a.drive&&"1"==urlParams.photos&&(p=mxUtils.button(mxResources.get("googlePlus"),function(){a.spinner.spin(document.body,mxResources.get("authorizing"))&&a.drive.checkToken(mxUtils.bind(this,function(){a.spinner.stop();if(null==a.photoPicker){var b=gapi.auth.getToken().access_token,b=(new google.picker.PickerBuilder).setAppId(a.drive.appId).setLocale(mxLanguage).setOAuthToken(b).addView(google.picker.ViewId.PHOTOS).addView(google.picker.ViewId.PHOTO_ALBUMS).addView(google.picker.ViewId.PHOTO_UPLOAD);
+a.photoPicker=b.setCallback(function(a){ImageDialog.filePicked(a)}).build()}a.photoPicker.setVisible(!0);a.movePickersToTop()}))}),p.className="geBtn",d.appendChild(p)));mxEvent.addListener(e,"keypress",function(a){13==a.keyCode&&l(e.value)});p=mxUtils.button(mxResources.get("apply"),function(){l(e.value)});p.className="geBtn gePrimaryBtn";d.appendChild(p);a.editor.cancelFirst||d.appendChild(b);Graph.fileSupport&&(d.style.marginTop="120px",m.style.backgroundImage="url('"+IMAGE_PATH+"/droptarget.png')",
+m.style.backgroundPosition="center 65%",m.style.backgroundRepeat="no-repeat",b=document.createElement("div"),b.style.position="absolute",b.style.width="420px",b.style.top="58%",b.style.textAlign="center",b.style.fontSize="18px",b.style.color="#a0c3ff",mxUtils.write(b,mxResources.get("dragImagesHere")),m.appendChild(b));m.appendChild(d);this.container=m},LinkDialog=function(a,b,d,c,f){function g(a,b,c){c=mxUtils.button("",c);c.className="geBtn";c.setAttribute("title",b);b=document.createElement("img");
+b.style.height="26px";b.style.width="26px";b.setAttribute("src",a);c.style.minWidth="42px";c.style.verticalAlign="middle";c.appendChild(b);x.appendChild(c)}var k=document.createElement("div");mxUtils.write(k,mxResources.get("editLink")+":");var m=document.createElement("div");m.className="geTitle";m.style.backgroundColor="transparent";m.style.borderColor="transparent";m.style.whiteSpace="nowrap";m.style.textOverflow="clip";m.style.cursor="default";mxClient.IS_VML||(m.style.paddingRight="20px");var e=
+document.createElement("input");e.setAttribute("placeholder",mxResources.get("dragUrlsHere"));e.setAttribute("type","text");e.style.marginTop="6px";e.style.width="400px";e.style.backgroundImage="url('"+Dialog.prototype.clearImage+"')";e.style.backgroundRepeat="no-repeat";e.style.backgroundPosition="100% 50%";e.style.paddingRight="14px";var h=document.createElement("div");h.setAttribute("title",mxResources.get("reset"));h.style.position="relative";h.style.left="-16px";h.style.width="12px";h.style.height=
+"14px";h.style.cursor="pointer";h.style.display=mxClient.IS_VML?"inline":"inline-block";h.style.top=(mxClient.IS_VML?0:3)+"px";h.style.background="url('"+a.editor.transparentImage+"')";mxEvent.addListener(h,"click",function(){e.value="";e.focus()});var l=document.createElement("input");l.style.cssText="margin-right:8px;margin-bottom:8px;";l.setAttribute("value","url");l.setAttribute("type","radio");l.setAttribute("name","current-linkdialog");var n=document.createElement("input");n.style.cssText="margin-right:8px;margin-bottom:8px;";
+n.setAttribute("value","url");n.setAttribute("type","radio");n.setAttribute("name","current-linkdialog");var p=document.createElement("select");p.style.width="380px";if(f&&null!=a.pages){null!=b&&a.editor.graph.isPageLink(b)?(n.setAttribute("checked","checked"),n.defaultChecked=!0):(e.setAttribute("value",b),l.setAttribute("checked","checked"),l.defaultChecked=!0);e.style.width="380px";m.appendChild(l);m.appendChild(e);m.appendChild(h);mxUtils.br(m);m.appendChild(n);f=!1;for(h=0;h<a.pages.length;h++){var u=
+document.createElement("option");mxUtils.write(u,a.pages[h].getName()||mxResources.get("pageWithNumber",[h+1]));u.setAttribute("value","data:page/id,"+a.pages[h].getId());b==u.getAttribute("value")&&(u.setAttribute("selected","selected"),f=!0);p.appendChild(u)}if(!f&&n.checked){var t=document.createElement("option");mxUtils.write(t,mxResources.get("pageNotFound"));t.setAttribute("disabled","disabled");t.setAttribute("selected","selected");t.setAttribute("value","pageNotFound");p.appendChild(t);mxEvent.addListener(p,
+"change",function(){null==t.parentNode||t.selected||t.parentNode.removeChild(t)})}m.appendChild(p)}else e.setAttribute("value",b),m.appendChild(e),m.appendChild(h);k.appendChild(m);var q=mxUtils.button(d,function(){a.hideDialog();c(n.checked?"pageNotFound"!==p.value?p.value:b:e.value,LinkDialog.selectedDocs)});q.style.verticalAlign="middle";q.className="geBtn gePrimaryBtn";this.init=function(){n.checked?p.focus():(e.focus(),mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode||mxClient.IS_QUIRKS?
+e.select():document.execCommand("selectAll",!1,null));mxEvent.addListener(p,"focus",function(){l.removeAttribute("checked");n.setAttribute("checked","checked");n.checked=!0});mxEvent.addListener(e,"focus",function(){n.removeAttribute("checked");l.setAttribute("checked","checked");l.checked=!0});if(Graph.fileSupport){var b=k.parentNode,c=null;mxEvent.addListener(b,"dragleave",function(a){null!=c&&(c.parentNode.removeChild(c),c=null);a.stopPropagation();a.preventDefault()});mxEvent.addListener(b,"dragover",
+mxUtils.bind(this,function(d){null==c&&(!mxClient.IS_IE||10<document.documentMode)&&(c=a.highlightElement(b));d.stopPropagation();d.preventDefault()}));mxEvent.addListener(b,"drop",mxUtils.bind(this,function(a){null!=c&&(c.parentNode.removeChild(c),c=null);0<=mxUtils.indexOf(a.dataTransfer.types,"text/uri-list")&&(e.value=decodeURIComponent(a.dataTransfer.getData("text/uri-list")),l.setAttribute("checked","checked"),l.checked=!0,q.click());a.stopPropagation();a.preventDefault()}),!1)}};var x=document.createElement("div");
+x.style.marginTop="20px";x.style.textAlign="right";d=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog()});d.style.verticalAlign="middle";d.className="geBtn";a.editor.cancelFirst&&x.appendChild(d);LinkDialog.selectedDocs=null;LinkDialog.filePicked=function(a){if(a.action==google.picker.Action.PICKED){LinkDialog.selectedDocs=a.docs;var b=a.docs[0].url;"application/mxe"==a.docs[0].mimeType||"application/vnd.jgraph.mxfile"==a.docs[0].mimeType?(b=DriveClient.prototype.oldAppHostname,b=
+"https://"+b+"/#G"+a.docs[0].id):"application/mxr"==a.docs[0].mimeType||"application/vnd.jgraph.mxfile.realtime"==a.docs[0].mimeType?(b=DriveClient.prototype.newAppHostname,b="https://"+b+"/#G"+a.docs[0].id):"application/vnd.google-apps.folder"==a.docs[0].mimeType&&(b="https://drive.google.com/#folders/"+a.docs[0].id);e.value=b;e.focus()}else LinkDialog.selectedDocs=null;e.focus()};"undefined"!=typeof google&&"undefined"!=typeof google.picker&&null!=a.drive&&g(IMAGE_PATH+"/google-drive-logo.svg",
+mxResources.get("googlePlus"),function(){a.spinner.spin(document.body,mxResources.get("authorizing"))&&a.drive.checkToken(mxUtils.bind(this,function(){a.spinner.stop();if(null==a.linkPicker){var b=gapi.auth.getToken().access_token,c=(new google.picker.DocsView(google.picker.ViewId.FOLDERS)).setParent("root").setIncludeFolders(!0).setSelectFolderEnabled(!0),d=(new google.picker.DocsView).setIncludeFolders(!0).setSelectFolderEnabled(!0),b=(new google.picker.PickerBuilder).setAppId(a.drive.appId).setLocale(mxLanguage).setOAuthToken(b).addView(c).addView(d).addView(google.picker.ViewId.RECENTLY_PICKED).addView(google.picker.ViewId.IMAGE_SEARCH).addView(google.picker.ViewId.VIDEO_SEARCH).addView(google.picker.ViewId.MAPS);
 "1"==urlParams.photos&&b.addView(google.picker.ViewId.PHOTOS).addView(google.picker.ViewId.PHOTO_ALBUMS).addView(google.picker.ViewId.PHOTO_UPLOAD);a.linkPicker=b.setCallback(function(a){LinkDialog.filePicked(a)}).build()}a.linkPicker.setVisible(!0);a.movePickersToTop()}))});"undefined"!=typeof Dropbox&&"undefined"!=typeof Dropbox.choose&&g(IMAGE_PATH+"/dropbox-logo.svg",mxResources.get("dropbox"),function(){Dropbox.choose({linkType:"direct",cancel:function(){},success:function(a){e.value=a[0].link;
 e.focus()}})});null!=a.oneDrive&&g(IMAGE_PATH+"/onedrive-logo.svg",mxResources.get("oneDrive"),function(){a.oneDrive.pickFile(function(a,b){e.value=b.value[0].webUrl;e.focus()})});null!=a.gitHub&&g(IMAGE_PATH+"/github-logo.svg",mxResources.get("github"),function(){a.gitHub.pickFile(function(a){if(null!=a){a=a.split("/");var b=a[0],c=a[1],d=a[2];a=a.slice(3,a.length).join("/");e.value="https://github.com/"+b+"/"+c+"/blob/"+d+"/"+a;e.focus()}})});mxEvent.addListener(e,"keypress",function(b){13==b.keyCode&&
-(a.hideDialog(),c(n.checked?p.value:e.value,LinkDialog.selectedDocs))});w.appendChild(q);a.editor.cancelFirst||w.appendChild(d);k.appendChild(w);this.container=k},AboutDialog=function(a){var b=document.createElement("div");b.style.marginTop="6px";b.setAttribute("align","center");var d=document.createElement("img");d.style.border="0px";d.setAttribute("width","176");d.setAttribute("width","151");d.style.width="170px";d.style.height="219px";d.setAttribute("src",IMAGE_PATH+"/logo-flat.png");b.appendChild(d);
+(a.hideDialog(),c(n.checked?p.value:e.value,LinkDialog.selectedDocs))});x.appendChild(q);a.editor.cancelFirst||x.appendChild(d);k.appendChild(x);this.container=k},AboutDialog=function(a){var b=document.createElement("div");b.style.marginTop="6px";b.setAttribute("align","center");var d=document.createElement("img");d.style.border="0px";d.setAttribute("width","176");d.setAttribute("width","151");d.style.width="170px";d.style.height="219px";d.setAttribute("src",IMAGE_PATH+"/logo-flat.png");b.appendChild(d);
 mxUtils.br(b);d=document.createElement("small");d.innerHTML="v "+EditorUi.VERSION;d.style.color="#505050";b.appendChild(d);mxUtils.br(b);mxUtils.br(b);d=document.createElement("small");d.style.color="#505050";d.innerHTML='&copy; 2005-2017 <a href="https://about.draw.io/" style="color:inherit;" target="_blank">JGraph Ltd</a>.<br>All Rights Reserved.';b.appendChild(d);mxEvent.addListener(b,"click",function(b){"A"!=mxEvent.getSource(b).nodeName&&a.hideDialog()});this.container=b},FeedbackDialog=function(a){var b=
 document.createElement("div"),d=document.createElement("div");mxUtils.write(d,mxResources.get("sendYourFeedbackToDrawIo"));d.style.fontSize="18px";d.style.marginBottom="18px";b.appendChild(d);d=document.createElement("div");mxUtils.write(d,mxResources.get("yourEmailAddress")+" ("+mxResources.get("required")+")");b.appendChild(d);var c=document.createElement("input");c.setAttribute("type","text");c.style.marginTop="6px";c.style.width="600px";var f=mxUtils.button(mxResources.get("sendMessage"),function(){var b=
 (k.checked?"\nDiagram:\n"+a.getFileData():"")+"\nBrowser:\n"+navigator.userAgent;b.length>FeedbackDialog.maxAttachmentSize?a.alert(mxResources.get("drawingTooLarge")):(a.hideDialog(),a.spinner.spin(document.body)&&mxUtils.post(null!=FeedbackDialog.feedbackUrl?FeedbackDialog.feedbackUrl:"/email","email="+encodeURIComponent(c.value)+"&version="+encodeURIComponent(EditorUi.VERSION)+"&url="+encodeURIComponent(window.location.href)+"&body="+encodeURIComponent("Feedback:\n"+e.value+b),function(b){a.spinner.stop();
@@ -6069,36 +6071,36 @@ mxUtils.write(m," "+mxResources.get("includeCopyOfMyDiagram"));d.appendChild(m);
 d.style.marginTop="26px";d.style.textAlign="right";m=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog()});m.className="geBtn";a.editor.cancelFirst?(d.appendChild(m),d.appendChild(f)):(d.appendChild(f),d.appendChild(m));b.appendChild(d);this.container=b};FeedbackDialog.maxAttachmentSize=1E6;
 var RevisionDialog=function(a,b){var d=document.createElement("div"),c=document.createElement("h3");c.style.marginTop="0px";mxUtils.write(c,mxResources.get("revisionHistory"));d.appendChild(c);var f=document.createElement("div");f.style.position="absolute";f.style.overflow="auto";f.style.width="170px";f.style.height="378px";d.appendChild(f);var g=document.createElement("div");g.style.position="absolute";g.style.border="1px solid lightGray";g.style.left="199px";g.style.width="470px";g.style.height=
 "376px";g.style.overflow="hidden";mxEvent.disableContextMenu(g);d.appendChild(g);var k=new Graph(g);k.setEnabled(!1);k.setPanning(!0);k.panningHandler.ignoreCell=!0;k.panningHandler.useLeftButtonForPanning=!0;k.minFitScale=null;k.maxFitScale=null;k.centerZoom=!0;var m=0,e=null,h=0,l=k.getGlobalVariable;k.getGlobalVariable=function(a){return"page"==a&&null!=e&&null!=e[h]?e[h].getAttribute("name"):"pagenumber"==a?h+1:l.apply(this,arguments)};k.getLinkForCell=function(){return null};Editor.MathJaxRender&&
-k.addListener(mxEvent.SIZE,mxUtils.bind(this,function(b,c){a.editor.graph.mathEnabled&&Editor.MathJaxRender(k.container)}));var n=new Spinner({lines:11,length:15,width:6,radius:10,corners:1,rotate:0,direction:1,color:"#000",speed:1.4,trail:60,shadow:!1,hwaccel:!1,className:"spinner",zIndex:2E9,top:"50%",left:"50%"}),p=a.getCurrentFile(),t=null,u=null,q=null,w=null,y=mxUtils.button("",function(){null!=q&&k.zoomIn()});y.className="geSprite geSprite-zoomin";y.setAttribute("title",mxResources.get("zoomIn"));
-y.style.outline="none";y.style.border="none";y.style.margin="2px";y.setAttribute("disabled","disabled");mxUtils.setOpacity(y,20);var x=mxUtils.button("",function(){null!=q&&k.zoomOut()});x.className="geSprite geSprite-zoomout";x.setAttribute("title",mxResources.get("zoomOut"));x.style.outline="none";x.style.border="none";x.style.margin="2px";x.setAttribute("disabled","disabled");mxUtils.setOpacity(x,20);var v=mxUtils.button("",function(){null!=q&&(k.maxFitScale=8,k.fit(8),k.center())});v.className=
-"geSprite geSprite-fit";v.setAttribute("title",mxResources.get("fit"));v.style.outline="none";v.style.border="none";v.style.margin="2px";v.setAttribute("disabled","disabled");mxUtils.setOpacity(v,20);var D=mxUtils.button("",function(){null!=q&&(k.zoomActual(),k.center())});D.className="geSprite geSprite-actualsize";D.setAttribute("title",mxResources.get("actualSize"));D.style.outline="none";D.style.border="none";D.style.margin="2px";D.setAttribute("disabled","disabled");mxUtils.setOpacity(D,20);var B=
+k.addListener(mxEvent.SIZE,mxUtils.bind(this,function(b,c){a.editor.graph.mathEnabled&&Editor.MathJaxRender(k.container)}));var n=new Spinner({lines:11,length:15,width:6,radius:10,corners:1,rotate:0,direction:1,color:"#000",speed:1.4,trail:60,shadow:!1,hwaccel:!1,className:"spinner",zIndex:2E9,top:"50%",left:"50%"}),p=a.getCurrentFile(),u=null,t=null,q=null,x=null,y=mxUtils.button("",function(){null!=q&&k.zoomIn()});y.className="geSprite geSprite-zoomin";y.setAttribute("title",mxResources.get("zoomIn"));
+y.style.outline="none";y.style.border="none";y.style.margin="2px";y.setAttribute("disabled","disabled");mxUtils.setOpacity(y,20);var w=mxUtils.button("",function(){null!=q&&k.zoomOut()});w.className="geSprite geSprite-zoomout";w.setAttribute("title",mxResources.get("zoomOut"));w.style.outline="none";w.style.border="none";w.style.margin="2px";w.setAttribute("disabled","disabled");mxUtils.setOpacity(w,20);var v=mxUtils.button("",function(){null!=q&&(k.maxFitScale=8,k.fit(8),k.center())});v.className=
+"geSprite geSprite-fit";v.setAttribute("title",mxResources.get("fit"));v.style.outline="none";v.style.border="none";v.style.margin="2px";v.setAttribute("disabled","disabled");mxUtils.setOpacity(v,20);var C=mxUtils.button("",function(){null!=q&&(k.zoomActual(),k.center())});C.className="geSprite geSprite-actualsize";C.setAttribute("title",mxResources.get("actualSize"));C.style.outline="none";C.style.border="none";C.style.margin="2px";C.setAttribute("disabled","disabled");mxUtils.setOpacity(C,20);var B=
 document.createElement("div");B.style.position="absolute";B.style.textAlign="right";B.style.color="gray";B.style.marginTop="10px";B.style.backgroundColor="transparent";B.style.top="440px";B.style.right="32px";B.style.maxWidth="380px";B.style.cursor="default";var A=mxUtils.button(mxResources.get("download"),function(){if(null!=q){var b=a.getCurrentFile(),b=null!=b&&null!=b.getTitle()?b.getTitle():a.defaultFilename,c=mxUtils.getXml(q.documentElement);a.isLocalFileSave()?a.saveLocalFile(c,b,"text/xml"):
-(c="undefined"===typeof pako?"&xml="+encodeURIComponent(c):"&data="+encodeURIComponent(a.editor.graph.compress(c)),(new mxXmlRequest(SAVE_URL,"filename="+encodeURIComponent(b)+"&format=xml"+c)).simulate(document,"_blank"))}});A.className="geBtn";A.setAttribute("disabled","disabled");var G=mxUtils.button(mxResources.get("restore"),function(){null!=q&&null!=w&&a.confirm(mxResources.get("areYouSure"),function(){a.spinner.spin(document.body,mxResources.get("restoring"))&&p.save(!0,function(b){a.spinner.stop();
-a.replaceFileData(w);a.hideDialog()},function(b){a.spinner.stop();a.editor.setStatus("");a.handleError(b,null!=b?mxResources.get("errorSavingFile"):null)})})});G.className="geBtn";G.setAttribute("disabled","disabled");var z=document.createElement("select");z.setAttribute("disabled","disabled");z.style.maxWidth="80px";z.style.position="relative";z.style.top="-2px";z.style.verticalAlign="bottom";z.style.marginRight="6px";z.style.display="none";var E=null;mxEvent.addListener(z,"change",function(a){null!=
-E&&(E(a),mxEvent.consume(a))});var C=mxUtils.button(mxResources.get("openInNewWindow"),function(){null!=q&&(window.openFile=new OpenFile(function(){window.openFile=null}),window.openFile.setData(mxUtils.getXml(q.documentElement)),window.openWindow(a.getUrl()))});C.className="geBtn";C.setAttribute("disabled","disabled");var L=mxUtils.button(mxResources.get("show"),function(){null!=u&&window.open(u.getUrl())});L.className="geBtn gePrimaryBtn";L.setAttribute("disabled","disabled");c=document.createElement("div");
+(c="undefined"===typeof pako?"&xml="+encodeURIComponent(c):"&data="+encodeURIComponent(a.editor.graph.compress(c)),(new mxXmlRequest(SAVE_URL,"filename="+encodeURIComponent(b)+"&format=xml"+c)).simulate(document,"_blank"))}});A.className="geBtn";A.setAttribute("disabled","disabled");var G=mxUtils.button(mxResources.get("restore"),function(){null!=q&&null!=x&&a.confirm(mxResources.get("areYouSure"),function(){a.spinner.spin(document.body,mxResources.get("restoring"))&&p.save(!0,function(b){a.spinner.stop();
+a.replaceFileData(x);a.hideDialog()},function(b){a.spinner.stop();a.editor.setStatus("");a.handleError(b,null!=b?mxResources.get("errorSavingFile"):null)})})});G.className="geBtn";G.setAttribute("disabled","disabled");var z=document.createElement("select");z.setAttribute("disabled","disabled");z.style.maxWidth="80px";z.style.position="relative";z.style.top="-2px";z.style.verticalAlign="bottom";z.style.marginRight="6px";z.style.display="none";var E=null;mxEvent.addListener(z,"change",function(a){null!=
+E&&(E(a),mxEvent.consume(a))});var D=mxUtils.button(mxResources.get("openInNewWindow"),function(){null!=q&&(window.openFile=new OpenFile(function(){window.openFile=null}),window.openFile.setData(mxUtils.getXml(q.documentElement)),window.openWindow(a.getUrl()))});D.className="geBtn";D.setAttribute("disabled","disabled");var L=mxUtils.button(mxResources.get("show"),function(){null!=t&&window.open(t.getUrl())});L.className="geBtn gePrimaryBtn";L.setAttribute("disabled","disabled");c=document.createElement("div");
 c.style.position="absolute";c.style.top="482px";c.style.width="640px";c.style.textAlign="right";var F=document.createElement("div");F.className="geToolbarContainer";F.style.backgroundColor="transparent";F.style.padding="2px";F.style.border="none";F.style.left="199px";F.style.top="442px";var H=null;if(null==p||null==a.drive&&p.constructor==window.DriveFile||null==a.dropbox&&p.constructor==window.DropboxFile)g.style.display="none",F.style.display="none",mxUtils.write(f,mxResources.get("notAvailable"));
 else if(null!=b&&0<b.length){g.style.cursor="move";var I=document.createElement("table");I.style.border="1px solid lightGray";I.style.borderCollapse="collapse";I.style.borderSpacing="0px";I.style.width="100%";var N=document.createElement("tbody"),M=(new Date).toDateString();null!=a.currentPage&&null!=a.pages&&(m=mxUtils.indexOf(a.pages,a.currentPage));for(var R=b.length-1;0<=R;R--){var K=function(c){var d=new Date(c.modifiedDate),l=null;if(0<=d.getTime()){var f=function(b){n.stop();var c=mxUtils.parseXml(b),
-f=a.editor.extractGraphModel(c.documentElement,!0);if(null!=f){var t=function(b){null!=b&&(b=u(mxUtils.parseXml(a.editor.graph.decompress(mxUtils.getTextContent(b))).documentElement));return b},u=function(a){var b=a.getAttribute("background");if(null==b||""==b||b==mxConstants.NONE)b="#ffffff";g.style.backgroundColor=b;(new mxCodec(a.ownerDocument)).decode(a,k.getModel());k.maxFitScale=1;k.fit(8);k.center();return a};z.style.display="none";z.innerHTML="";q=c;w=b;e=parseSelectFunction=null;h=0;if("mxfile"==
-f.nodeName){c=f.getElementsByTagName("diagram");e=[];for(b=0;b<c.length;b++)e.push(c[b]);h=Math.min(m,e.length-1);0<e.length&&t(e[h]);if(1<e.length)for(z.removeAttribute("disabled"),z.style.display="",b=0;b<e.length;b++)c=document.createElement("option"),mxUtils.write(c,e[b].getAttribute("name")||mxResources.get("pageWithNumber",[b+1])),c.setAttribute("value",b),b==h&&c.setAttribute("selected","selected"),z.appendChild(c);E=function(){h=m=parseInt(z.value);t(e[m])}}else u(f);B.innerHTML="";mxUtils.write(B,
-d.toLocaleDateString()+" "+d.toLocaleTimeString());B.setAttribute("title",l.getAttribute("title"));y.removeAttribute("disabled");x.removeAttribute("disabled");v.removeAttribute("disabled");D.removeAttribute("disabled");null!=p&&p.isRestricted()||(a.editor.graph.isEnabled()&&G.removeAttribute("disabled"),A.removeAttribute("disabled"),L.removeAttribute("disabled"),C.removeAttribute("disabled"));mxUtils.setOpacity(y,60);mxUtils.setOpacity(x,60);mxUtils.setOpacity(v,60);mxUtils.setOpacity(D,60)}else z.style.display=
+f=a.editor.extractGraphModel(c.documentElement,!0);if(null!=f){var u=function(b){null!=b&&(b=t(mxUtils.parseXml(a.editor.graph.decompress(mxUtils.getTextContent(b))).documentElement));return b},t=function(a){var b=a.getAttribute("background");if(null==b||""==b||b==mxConstants.NONE)b="#ffffff";g.style.backgroundColor=b;(new mxCodec(a.ownerDocument)).decode(a,k.getModel());k.maxFitScale=1;k.fit(8);k.center();return a};z.style.display="none";z.innerHTML="";q=c;x=b;e=parseSelectFunction=null;h=0;if("mxfile"==
+f.nodeName){c=f.getElementsByTagName("diagram");e=[];for(b=0;b<c.length;b++)e.push(c[b]);h=Math.min(m,e.length-1);0<e.length&&u(e[h]);if(1<e.length)for(z.removeAttribute("disabled"),z.style.display="",b=0;b<e.length;b++)c=document.createElement("option"),mxUtils.write(c,e[b].getAttribute("name")||mxResources.get("pageWithNumber",[b+1])),c.setAttribute("value",b),b==h&&c.setAttribute("selected","selected"),z.appendChild(c);E=function(){h=m=parseInt(z.value);u(e[m])}}else t(f);B.innerHTML="";mxUtils.write(B,
+d.toLocaleDateString()+" "+d.toLocaleTimeString());B.setAttribute("title",l.getAttribute("title"));y.removeAttribute("disabled");w.removeAttribute("disabled");v.removeAttribute("disabled");C.removeAttribute("disabled");null!=p&&p.isRestricted()||(a.editor.graph.isEnabled()&&G.removeAttribute("disabled"),A.removeAttribute("disabled"),L.removeAttribute("disabled"),D.removeAttribute("disabled"));mxUtils.setOpacity(y,60);mxUtils.setOpacity(w,60);mxUtils.setOpacity(v,60);mxUtils.setOpacity(C,60)}else z.style.display=
 "none",z.innerHTML="",B.innerHTML="",mxUtils.write(B,mxResources.get("errorLoadingFile"))},l=document.createElement("tr");l.style.borderBottom="1px solid lightGray";l.style.fontSize="12px";l.style.cursor="pointer";var H=document.createElement("td");H.style.padding="6px";H.style.whiteSpace="nowrap";c==b[b.length-1]?mxUtils.write(H,mxResources.get("current")):d.toDateString()===M?mxUtils.write(H,d.toLocaleTimeString()):mxUtils.write(H,d.toLocaleDateString()+" "+d.toLocaleTimeString());l.appendChild(H);
-l.setAttribute("title",d.toLocaleDateString()+" "+d.toLocaleTimeString()+" "+a.formatFileSize(parseInt(c.fileSize))+(null!=c.lastModifyingUserName?" "+c.lastModifyingUserName:""));mxEvent.addListener(l,"click",function(a){u!=c&&(n.stop(),null!=t&&(t.style.backgroundColor=""),u=c,t=l,t.style.backgroundColor="#ebf2f9",w=q=null,B.removeAttribute("title"),B.innerHTML=mxResources.get("loading")+"...",g.style.backgroundColor="#ffffff",k.getModel().clear(),G.setAttribute("disabled","disabled"),A.setAttribute("disabled",
-"disabled"),y.setAttribute("disabled","disabled"),x.setAttribute("disabled","disabled"),D.setAttribute("disabled","disabled"),v.setAttribute("disabled","disabled"),C.setAttribute("disabled","disabled"),L.setAttribute("disabled","disabled"),z.setAttribute("disabled","disabled"),mxUtils.setOpacity(y,20),mxUtils.setOpacity(x,20),mxUtils.setOpacity(v,20),mxUtils.setOpacity(D,20),n.spin(g),c.getXml(function(a){u==c&&f(a)},function(a){n.stop();z.style.display="none";z.innerHTML="";B.innerHTML="";mxUtils.write(B,
+l.setAttribute("title",d.toLocaleDateString()+" "+d.toLocaleTimeString()+" "+a.formatFileSize(parseInt(c.fileSize))+(null!=c.lastModifyingUserName?" "+c.lastModifyingUserName:""));mxEvent.addListener(l,"click",function(a){t!=c&&(n.stop(),null!=u&&(u.style.backgroundColor=""),t=c,u=l,u.style.backgroundColor="#ebf2f9",x=q=null,B.removeAttribute("title"),B.innerHTML=mxResources.get("loading")+"...",g.style.backgroundColor="#ffffff",k.getModel().clear(),G.setAttribute("disabled","disabled"),A.setAttribute("disabled",
+"disabled"),y.setAttribute("disabled","disabled"),w.setAttribute("disabled","disabled"),C.setAttribute("disabled","disabled"),v.setAttribute("disabled","disabled"),D.setAttribute("disabled","disabled"),L.setAttribute("disabled","disabled"),z.setAttribute("disabled","disabled"),mxUtils.setOpacity(y,20),mxUtils.setOpacity(w,20),mxUtils.setOpacity(v,20),mxUtils.setOpacity(C,20),n.spin(g),c.getXml(function(a){t==c&&f(a)},function(a){n.stop();z.style.display="none";z.innerHTML="";B.innerHTML="";mxUtils.write(B,
 mxResources.get("errorLoadingFile"))}),mxEvent.consume(a))});mxEvent.addListener(l,"dblclick",function(a){L.click();window.getSelection?window.getSelection().removeAllRanges():document.selection&&document.selection.empty();mxEvent.consume(a)},!1);N.appendChild(l)}return l}(b[R]);null!=K&&R==b.length-1&&(H=K)}I.appendChild(N);f.appendChild(I)}else g.style.display="none",F.style.display="none",mxUtils.write(f,mxResources.get("noRevisions"));this.init=function(){null!=H&&H.click()};f=mxUtils.button(mxResources.get("close"),
-function(){a.hideDialog()});f.className="geBtn";F.appendChild(z);F.appendChild(y);F.appendChild(x);F.appendChild(D);F.appendChild(v);a.editor.cancelFirst?(c.appendChild(f),c.appendChild(A),c.appendChild(C),c.appendChild(G),c.appendChild(L)):(c.appendChild(A),c.appendChild(C),c.appendChild(G),c.appendChild(L),c.appendChild(f));d.appendChild(c);d.appendChild(F);d.appendChild(B);this.container=d},DraftDialog=function(a,b,d,c,f,g,k,m){var e=document.createElement("div"),h=document.createElement("div");
+function(){a.hideDialog()});f.className="geBtn";F.appendChild(z);F.appendChild(y);F.appendChild(w);F.appendChild(C);F.appendChild(v);a.editor.cancelFirst?(c.appendChild(f),c.appendChild(A),c.appendChild(D),c.appendChild(G),c.appendChild(L)):(c.appendChild(A),c.appendChild(D),c.appendChild(G),c.appendChild(L),c.appendChild(f));d.appendChild(c);d.appendChild(F);d.appendChild(B);this.container=d},DraftDialog=function(a,b,d,c,f,g,k,m){var e=document.createElement("div"),h=document.createElement("div");
 h.style.marginTop="0px";h.style.whiteSpace="nowrap";h.style.overflow="auto";mxUtils.write(h,b);e.appendChild(h);var l=document.createElement("div");l.style.position="absolute";l.style.border="1px solid lightGray";l.style.marginTop="10px";l.style.width="640px";l.style.top="46px";l.style.bottom="74px";l.style.overflow="hidden";mxEvent.disableContextMenu(l);e.appendChild(l);var n=new Graph(l);n.setEnabled(!1);n.setPanning(!0);n.panningHandler.ignoreCell=!0;n.panningHandler.useLeftButtonForPanning=!0;
-n.minFitScale=null;n.maxFitScale=null;n.centerZoom=!0;b=mxUtils.parseXml(d);var p=a.editor.extractGraphModel(b.documentElement,!0),t=0,u=null,q=n.getGlobalVariable;n.getGlobalVariable=function(a){return"page"==a&&null!=u&&null!=u[t]?u[t].getAttribute("name"):"pagenumber"==a?t+1:q.apply(this,arguments)};n.getLinkForCell=function(){return null};b=mxUtils.button("",function(){n.zoomIn()});b.className="geSprite geSprite-zoomin";b.setAttribute("title",mxResources.get("zoomIn"));b.style.outline="none";
+n.minFitScale=null;n.maxFitScale=null;n.centerZoom=!0;b=mxUtils.parseXml(d);var p=a.editor.extractGraphModel(b.documentElement,!0),u=0,t=null,q=n.getGlobalVariable;n.getGlobalVariable=function(a){return"page"==a&&null!=t&&null!=t[u]?t[u].getAttribute("name"):"pagenumber"==a?u+1:q.apply(this,arguments)};n.getLinkForCell=function(){return null};b=mxUtils.button("",function(){n.zoomIn()});b.className="geSprite geSprite-zoomin";b.setAttribute("title",mxResources.get("zoomIn"));b.style.outline="none";
 b.style.border="none";b.style.margin="2px";mxUtils.setOpacity(b,60);d=mxUtils.button("",function(){n.zoomOut()});d.className="geSprite geSprite-zoomout";d.setAttribute("title",mxResources.get("zoomOut"));d.style.outline="none";d.style.border="none";d.style.margin="2px";mxUtils.setOpacity(d,60);h=mxUtils.button("",function(){n.maxFitScale=8;n.fit(8);n.center()});h.className="geSprite geSprite-fit";h.setAttribute("title",mxResources.get("fit"));h.style.outline="none";h.style.border="none";h.style.margin=
-"2px";mxUtils.setOpacity(h,60);var w=mxUtils.button("",function(){n.zoomActual();n.center()});w.className="geSprite geSprite-actualsize";w.setAttribute("title",mxResources.get("actualSize"));w.style.outline="none";w.style.border="none";w.style.margin="2px";mxUtils.setOpacity(w,60);f=mxUtils.button(k||mxResources.get("discard"),f);f.className="geBtn";var y=document.createElement("select");y.style.maxWidth="80px";y.style.position="relative";y.style.top="-2px";y.style.verticalAlign="bottom";y.style.marginRight=
+"2px";mxUtils.setOpacity(h,60);var x=mxUtils.button("",function(){n.zoomActual();n.center()});x.className="geSprite geSprite-actualsize";x.setAttribute("title",mxResources.get("actualSize"));x.style.outline="none";x.style.border="none";x.style.margin="2px";mxUtils.setOpacity(x,60);f=mxUtils.button(k||mxResources.get("discard"),f);f.className="geBtn";var y=document.createElement("select");y.style.maxWidth="80px";y.style.position="relative";y.style.top="-2px";y.style.verticalAlign="bottom";y.style.marginRight=
 "6px";y.style.display="none";c=mxUtils.button(g||mxResources.get("edit"),c);c.className="geBtn gePrimaryBtn";g=document.createElement("div");g.style.position="absolute";g.style.bottom="30px";g.style.width="640px";g.style.textAlign="right";k=document.createElement("div");k.className="geToolbarContainer";k.style.cssText="box-shadow:none !important;background-color:transparent;padding:2px;border-style:none !important;bottom:30px;";this.init=function(){function b(a){if(null!=a){var b=a.getAttribute("background");
-if(null==b||""==b||b==mxConstants.NONE)b="#ffffff";l.style.backgroundColor=b;(new mxCodec(a.ownerDocument)).decode(a,n.getModel());n.maxFitScale=1;n.fit(8);n.center()}}function c(c){null!=c&&(c=b(mxUtils.parseXml(a.editor.graph.decompress(mxUtils.getTextContent(c))).documentElement));return c}mxEvent.addListener(y,"change",function(a){t=parseInt(y.value);c(u[t]);mxEvent.consume(a)});if("mxfile"==p.nodeName){var d=p.getElementsByTagName("diagram");u=[];for(var e=0;e<d.length;e++)u.push(d[e]);0<u.length&&
-c(u[t]);if(1<u.length)for(y.style.display="",e=0;e<u.length;e++)d=document.createElement("option"),mxUtils.write(d,u[e].getAttribute("name")||mxResources.get("pageWithNumber",[e+1])),d.setAttribute("value",e),e==t&&d.setAttribute("selected","selected"),y.appendChild(d)}else b(p)};k.appendChild(y);k.appendChild(b);k.appendChild(d);k.appendChild(w);k.appendChild(h);b=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog(!0)});b.className="geBtn";m=null!=m?mxUtils.button(mxResources.get("ignore"),
+if(null==b||""==b||b==mxConstants.NONE)b="#ffffff";l.style.backgroundColor=b;(new mxCodec(a.ownerDocument)).decode(a,n.getModel());n.maxFitScale=1;n.fit(8);n.center()}}function c(c){null!=c&&(c=b(mxUtils.parseXml(a.editor.graph.decompress(mxUtils.getTextContent(c))).documentElement));return c}mxEvent.addListener(y,"change",function(a){u=parseInt(y.value);c(t[u]);mxEvent.consume(a)});if("mxfile"==p.nodeName){var d=p.getElementsByTagName("diagram");t=[];for(var e=0;e<d.length;e++)t.push(d[e]);0<t.length&&
+c(t[u]);if(1<t.length)for(y.style.display="",e=0;e<t.length;e++)d=document.createElement("option"),mxUtils.write(d,t[e].getAttribute("name")||mxResources.get("pageWithNumber",[e+1])),d.setAttribute("value",e),e==u&&d.setAttribute("selected","selected"),y.appendChild(d)}else b(p)};k.appendChild(y);k.appendChild(b);k.appendChild(d);k.appendChild(x);k.appendChild(h);b=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog(!0)});b.className="geBtn";m=null!=m?mxUtils.button(mxResources.get("ignore"),
 m):null;null!=m&&(m.className="geBtn");a.editor.cancelFirst?(g.appendChild(b),null!=m&&g.appendChild(m),g.appendChild(f),g.appendChild(c)):(g.appendChild(c),g.appendChild(f),null!=m&&g.appendChild(m),g.appendChild(b));e.appendChild(g);e.appendChild(k);this.container=e},FindWindow=function(a,b,d,c,f){function g(){var a=m.model.getDescendants(m.model.getRoot()),b=n.value.toLowerCase(),c=p.checked?new RegExp(b):null,d=null;e!=b&&(e=b,h=null);var l=null==h;if(m.isEnabled()&&0<b.length)for(var f=0;f<a.length;f++){var g=
-m.view.getState(a[f]);if(null!=g&&null!=g.cell.value&&(l||null==d)&&(m.model.isVertex(g.cell)||m.model.isEdge(g.cell))){m.isHtmlLabel(g.cell)?(t.innerHTML=m.getLabel(g.cell),label=mxUtils.extractTextWithWhitespace([t])):label=m.getLabel(g.cell);label=mxUtils.trim(label.replace(/[\x00-\x1F\x7F-\x9F]|\s+/g," ")).toLowerCase();var k;if(!(k=null==c&&label.substring(0,b.length)===b)&&(k=null!=c)&&!(k=c.test(label)))a:{k=c;var u=g.cell;if("object"===typeof u.value&&null!=u.value.attributes)for(var u=u.value.attributes,
-z=0;z<u.length;z++)if("label"!=u[z].nodeName&&k.test(u[z].nodeValue.toLowerCase())){k=!0;break a}k=!1}if(k)if(l){d=g;break}else null==d&&(d=g)}l=l||g==h}null!=d?(h=d,m.setSelectionCell(h.cell),m.scrollCellToVisible(h.cell)):m.clearSelection();return!m.isEnabled()||0==b.length||null!=d}var k=a.actions.get("find"),m=a.editor.graph,e=null,h=null,l=document.createElement("div");l.style.userSelect="none";l.style.overflow="hidden";l.style.padding="10px";l.style.height="100%";var n=document.createElement("input");
-n.setAttribute("placeholder",mxResources.get("find"));n.setAttribute("type","text");n.style.marginTop="4px";n.style.marginBottom="6px";n.style.width="170px";n.style.fontSize="12px";n.style.borderRadius="4px";n.style.padding="6px";l.appendChild(n);var p=document.createElement("input");p.setAttribute("type","checkbox");l.appendChild(p);mxUtils.write(l,mxResources.get("regularExpression"));var t=document.createElement("div");mxUtils.br(l);var u=mxUtils.button(mxResources.get("reset"),function(){n.value=
-"";n.style.backgroundColor="";e=h=null;n.focus()});u.setAttribute("title",mxResources.get("reset"));u.style.marginTop="6px";u.style.marginRight="4px";u.style.backgroundColor="#f5f5f5";u.style.backgroundImage="none";u.className="geBtn";l.appendChild(u);u=mxUtils.button(mxResources.get("find"),function(){try{n.style.backgroundColor=g()?"":"#ffcfcf"}catch(q){a.handleError(q)}});u.setAttribute("title",mxResources.get("find")+" (Enter)");u.style.marginTop="6px";u.style.backgroundColor="#4d90fe";u.style.backgroundImage=
-"none";u.className="geBtn gePrimaryBtn";l.appendChild(u);mxEvent.addListener(n,"keyup",function(a){if(91==a.keyCode||17==a.keyCode)mxEvent.consume(a);else if(27==a.keyCode)k.funct();else if(e!=n.value.toLowerCase()||13==a.keyCode)try{n.style.backgroundColor=g()?"":"#ffcfcf"}catch(w){n.style.backgroundColor="#ffcfcf"}});mxEvent.addListener(l,"keydown",function(b){70==b.keyCode&&a.keyHandler.isControlDown(b)&&!mxEvent.isShiftDown(b)&&(k.funct(),mxEvent.consume(b))});this.window=new mxWindow(mxResources.get("find"),
+m.view.getState(a[f]);if(null!=g&&null!=g.cell.value&&(l||null==d)&&(m.model.isVertex(g.cell)||m.model.isEdge(g.cell))){m.isHtmlLabel(g.cell)?(u.innerHTML=m.getLabel(g.cell),label=mxUtils.extractTextWithWhitespace([u])):label=m.getLabel(g.cell);label=mxUtils.trim(label.replace(/[\x00-\x1F\x7F-\x9F]|\s+/g," ")).toLowerCase();var k;if(!(k=null==c&&label.substring(0,b.length)===b)&&(k=null!=c)&&!(k=c.test(label)))a:{k=c;var t=g.cell;if("object"===typeof t.value&&null!=t.value.attributes)for(var t=t.value.attributes,
+z=0;z<t.length;z++)if("label"!=t[z].nodeName&&k.test(t[z].nodeValue.toLowerCase())){k=!0;break a}k=!1}if(k)if(l){d=g;break}else null==d&&(d=g)}l=l||g==h}null!=d?(h=d,m.setSelectionCell(h.cell),m.scrollCellToVisible(h.cell)):m.clearSelection();return!m.isEnabled()||0==b.length||null!=d}var k=a.actions.get("find"),m=a.editor.graph,e=null,h=null,l=document.createElement("div");l.style.userSelect="none";l.style.overflow="hidden";l.style.padding="10px";l.style.height="100%";var n=document.createElement("input");
+n.setAttribute("placeholder",mxResources.get("find"));n.setAttribute("type","text");n.style.marginTop="4px";n.style.marginBottom="6px";n.style.width="170px";n.style.fontSize="12px";n.style.borderRadius="4px";n.style.padding="6px";l.appendChild(n);var p=document.createElement("input");p.setAttribute("type","checkbox");l.appendChild(p);mxUtils.write(l,mxResources.get("regularExpression"));var u=document.createElement("div");mxUtils.br(l);var t=mxUtils.button(mxResources.get("reset"),function(){n.value=
+"";n.style.backgroundColor="";e=h=null;n.focus()});t.setAttribute("title",mxResources.get("reset"));t.style.marginTop="6px";t.style.marginRight="4px";t.style.backgroundColor="#f5f5f5";t.style.backgroundImage="none";t.className="geBtn";l.appendChild(t);t=mxUtils.button(mxResources.get("find"),function(){try{n.style.backgroundColor=g()?"":"#ffcfcf"}catch(q){a.handleError(q)}});t.setAttribute("title",mxResources.get("find")+" (Enter)");t.style.marginTop="6px";t.style.backgroundColor="#4d90fe";t.style.backgroundImage=
+"none";t.className="geBtn gePrimaryBtn";l.appendChild(t);mxEvent.addListener(n,"keyup",function(a){if(91==a.keyCode||17==a.keyCode)mxEvent.consume(a);else if(27==a.keyCode)k.funct();else if(e!=n.value.toLowerCase()||13==a.keyCode)try{n.style.backgroundColor=g()?"":"#ffcfcf"}catch(x){n.style.backgroundColor="#ffcfcf"}});mxEvent.addListener(l,"keydown",function(b){70==b.keyCode&&a.keyHandler.isControlDown(b)&&!mxEvent.isShiftDown(b)&&(k.funct(),mxEvent.consume(b))});this.window=new mxWindow(mxResources.get("find"),
 l,b,d,c,f,!0,!0);this.window.destroyOnClose=!1;this.window.setMaximizable(!1);this.window.setResizable(!1);this.window.setClosable(!0);this.window.addListener("show",mxUtils.bind(this,function(){this.window.isVisible()?(n.focus(),mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode||mxClient.IS_QUIRKS?n.select():document.execCommand("selectAll",!1,null)):m.container.focus()}))},TagsWindow=function(a,b,d,c,f){function g(a){a=null!=a?a:m.model.getDescendants(m.model.getRoot());for(var b=l.value.split(" "),
 c=[],d=0;d<a.length;d++)if(m.model.isVertex(a[d])||m.model.isEdge(a[d])){var h=null!=a[d].value&&"object"==typeof a[d].value?mxUtils.trim(a[d].value.getAttribute(e)||""):"",f=!0;if(0<h.length)for(var h=h.toLowerCase().split(" "),g=0;g<b.length&&f;g++)var n=mxUtils.trim(b[g]).toLowerCase(),f=f&&(0==n.length||0<=mxUtils.indexOf(h,n));else f=0==mxUtils.trim(l.value).length;f&&c.push(a[d])}return c}function k(a,b){m.model.beginUpdate();try{for(var c=0;c<a.length;c++)m.model.setVisible(a[c],b)}finally{m.model.endUpdate()}}
 var m=a.editor.graph,e="tags",h=document.createElement("div");h.style.userSelect="none";h.style.overflow="hidden";h.style.padding="10px";h.style.height="100%";var l=document.createElement("input");l.setAttribute("placeholder",mxResources.get("allTags"));l.setAttribute("type","text");l.style.marginTop="4px";l.style.width="240px";l.style.fontSize="12px";l.style.borderRadius="4px";l.style.padding="6px";h.appendChild(l);mxEvent.addListener(l,"dblclick",function(){var b=new FilenameDialog(a,e,mxResources.get("ok"),
@@ -6114,9 +6116,9 @@ g.style.marginTop=f.style.marginTop);var k=null,m=[],e=document.createElement("d
 l.setAttribute("type","checkbox");l.checked=a.sidebar.isEntryVisible(b.id);l.defaultChecked=l.checked;c.appendChild(l);mxUtils.write(c," "+b.title);f.appendChild(c);var n=function(a){if(null==a||"INPUT"!=mxEvent.getSource(a).nodeName)null!=b.imageCallback?b.imageCallback(g):null!=b.image?g.innerHTML='<img border="0" src="'+b.image+'"/>':(g.innerHTML="<br>",mxUtils.write(g,mxResources.get("noPreview"))),null!=k&&(k.style.backgroundColor=""),k=c,k.style.backgroundColor="#ebf2f9",null!=a&&mxEvent.consume(a)};
 mxEvent.addListener(c,"click",n);mxEvent.addListener(c,"dblclick",function(a){l.checked=!l.checked;mxEvent.consume(a)});m.push(function(){return l.checked?b.id:null});0==h&&0==d&&n()})(b.entries[d])})(d[h]);c.style.padding="30px";c.appendChild(b);c.appendChild(f);c.appendChild(g);d=document.createElement("div");d.className="geDialogFooter";d.style.position="absolute";d.style.paddingRight="16px";d.style.color="gray";d.style.left="0px";d.style.right="0px";d.style.bottom="0px";d.style.height="60px";
 d.style.lineHeight="52px";mxClient.IS_QUIRKS&&(d.style.width=b.style.width,d.style.paddingTop="12px");var l=document.createElement("input");l.setAttribute("type","checkbox");if(isLocalStorage||mxClient.IS_CHROMEAPP)b=document.createElement("span"),b.style.paddingRight="20px",b.appendChild(l),mxUtils.write(b," "+mxResources.get("rememberThisSetting")),l.checked=!0,l.defaultChecked=!0,mxEvent.addListener(b,"click",function(a){mxEvent.getSource(a)!=l&&(l.checked=!l.checked,mxEvent.consume(a))}),mxClient.IS_QUIRKS&&
-(b.style.position="relative",b.style.top="-6px"),d.appendChild(b);b=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog()});b.className="geBtn";var n=mxUtils.button(mxResources.get("apply"),function(){a.hideDialog();for(var b=[],c=0;c<m.length;c++){var d=m[c].apply(this,arguments);null!=d&&b.push(d)}a.sidebar.showEntries(b.join(";"),l.checked,!0)});n.className="geBtn gePrimaryBtn"}else{var p=document.createElement("table"),t=document.createElement("tbody");c.style.height="100%";c.style.overflow=
-"auto";var u=document.createElement("tr");p.style.width="100%";b=document.createElement("td");var n=document.createElement("td"),q=document.createElement("td"),w=mxUtils.bind(this,function(b,c,d){var e=document.createElement("input");e.type="checkbox";p.appendChild(e);e.checked=a.sidebar.isEntryVisible(d);var h=document.createElement("span");mxUtils.write(h,c);c=document.createElement("div");c.style.display="block";c.appendChild(e);c.appendChild(h);mxEvent.addListener(h,"click",function(a){e.checked=
-!e.checked;mxEvent.consume(a)});b.appendChild(c);return function(){return e.checked?d:null}});u.appendChild(b);u.appendChild(n);u.appendChild(q);t.appendChild(u);p.appendChild(t);for(var m=[],y=0,h=0;h<d.length;h++)for(t=0;t<d[h].entries.length;t++)y++;for(var x=[b,n,q],v=0,h=0;h<d.length;h++)(function(a){for(var b=0;b<a.entries.length;b++){var c=a.entries[b];m.push(w(x[Math.floor(v/(y/3))],c.title,c.id));v++}})(d[h]);c.appendChild(p);d=document.createElement("div");d.style.marginTop="18px";d.style.textAlign=
+(b.style.position="relative",b.style.top="-6px"),d.appendChild(b);b=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog()});b.className="geBtn";var n=mxUtils.button(mxResources.get("apply"),function(){a.hideDialog();for(var b=[],c=0;c<m.length;c++){var d=m[c].apply(this,arguments);null!=d&&b.push(d)}a.sidebar.showEntries(b.join(";"),l.checked,!0)});n.className="geBtn gePrimaryBtn"}else{var p=document.createElement("table"),u=document.createElement("tbody");c.style.height="100%";c.style.overflow=
+"auto";var t=document.createElement("tr");p.style.width="100%";b=document.createElement("td");var n=document.createElement("td"),q=document.createElement("td"),x=mxUtils.bind(this,function(b,c,d){var e=document.createElement("input");e.type="checkbox";p.appendChild(e);e.checked=a.sidebar.isEntryVisible(d);var h=document.createElement("span");mxUtils.write(h,c);c=document.createElement("div");c.style.display="block";c.appendChild(e);c.appendChild(h);mxEvent.addListener(h,"click",function(a){e.checked=
+!e.checked;mxEvent.consume(a)});b.appendChild(c);return function(){return e.checked?d:null}});t.appendChild(b);t.appendChild(n);t.appendChild(q);u.appendChild(t);p.appendChild(u);for(var m=[],y=0,h=0;h<d.length;h++)for(u=0;u<d[h].entries.length;u++)y++;for(var w=[b,n,q],v=0,h=0;h<d.length;h++)(function(a){for(var b=0;b<a.entries.length;b++){var c=a.entries[b];m.push(x(w[Math.floor(v/(y/3))],c.title,c.id));v++}})(d[h]);c.appendChild(p);d=document.createElement("div");d.style.marginTop="18px";d.style.textAlign=
 "center";l=document.createElement("input");isLocalStorage&&(l.setAttribute("type","checkbox"),l.checked=!0,l.defaultChecked=!0,d.appendChild(l),b=document.createElement("span"),mxUtils.write(b," "+mxResources.get("rememberThisSetting")),d.appendChild(b),mxEvent.addListener(b,"click",function(a){l.checked=!l.checked;mxEvent.consume(a)}));c.appendChild(d);b=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog()});b.className="geBtn";n=mxUtils.button(mxResources.get("apply"),function(){for(var b=
 ["search"],c=0;c<m.length;c++){var d=m[c].apply(this,arguments);null!=d&&b.push(d)}a.sidebar.showEntries(0<b.length?b.join(";"):"",l.checked);a.hideDialog()});n.className="geBtn gePrimaryBtn";d=document.createElement("div");d.style.marginTop="26px";d.style.textAlign="right"}a.editor.cancelFirst?(d.appendChild(b),d.appendChild(n)):(d.appendChild(n),d.appendChild(b));c.appendChild(d);this.container=c},PluginsDialog=function(a){function b(){if(0==f.length)c.innerHTML=mxResources.get("noPlugins");else{c.innerHTML=
 "";for(var d=0;d<f.length;d++){var e=document.createElement("span");e.style.whiteSpace="nowrap";var g=document.createElement("span");g.className="geSprite geSprite-delete";g.style.position="relative";g.style.cursor="pointer";g.style.top="5px";g.style.marginRight="4px";g.style.display="inline-block";e.appendChild(g);mxUtils.write(e,f[d]);c.appendChild(e);mxUtils.br(c);mxEvent.addListener(g,"click",function(c){return function(){a.confirm(window.parent.mxResources.get("delete")+' "'+f[c]+'"?',function(){f.splice(c,
@@ -6125,42 +6127,42 @@ a&&0<a.length){e=a.split(";");for(a=0;a<e.length;a++)0<e[a].length&&0>mxUtils.in
 m.className="geBtn gePrimaryBtn";var e=document.createElement("div");e.style.marginTop="14px";e.style.textAlign="right";a.editor.cancelFirst?(e.appendChild(k),e.appendChild(g),e.appendChild(m)):(e.appendChild(g),e.appendChild(m),e.appendChild(k));d.appendChild(e);this.container=d},CropImageDialog=function(a,b,d){var c=document.createElement("div"),f=document.createElement("table"),g=document.createElement("tbody"),k=document.createElement("tr"),m=document.createElement("td");m.style.whiteSpace="nowrap";
 m.setAttribute("colspan","2");mxUtils.write(m,mxResources.get("loading")+"...");k.appendChild(m);g.appendChild(k);var k=document.createElement("tr"),e=document.createElement("td"),h=document.createElement("td");f.style.paddingLeft="6px";mxUtils.write(e,mxResources.get("left")+":");var l=document.createElement("input");l.setAttribute("type","text");l.style.width="100px";l.value="0";this.init=function(){l.focus();l.select()};h.appendChild(l);k.appendChild(e);k.appendChild(h);g.appendChild(k);k=document.createElement("tr");
 e=document.createElement("td");h=document.createElement("td");mxUtils.write(e,mxResources.get("top")+":");var n=document.createElement("input");n.setAttribute("type","text");n.style.width="100px";n.value="0";h.appendChild(n);k.appendChild(e);k.appendChild(h);g.appendChild(k);k=document.createElement("tr");e=document.createElement("td");h=document.createElement("td");mxUtils.write(e,mxResources.get("right")+":");var p=document.createElement("input");p.setAttribute("type","text");p.style.width="100px";
-p.value="0";h.appendChild(p);k.appendChild(e);k.appendChild(h);g.appendChild(k);k=document.createElement("tr");e=document.createElement("td");h=document.createElement("td");mxUtils.write(e,mxResources.get("bottom")+":");var t=document.createElement("input");t.setAttribute("type","text");t.style.width="100px";t.value="0";h.appendChild(t);k.appendChild(e);k.appendChild(h);g.appendChild(k);k=document.createElement("tr");e=document.createElement("td");h=document.createElement("td");mxUtils.write(e,mxResources.get("circle")+
-":");k.appendChild(e);var u=document.createElement("input");u.setAttribute("type","checkbox");h.appendChild(u);k.appendChild(h);g.appendChild(k);f.appendChild(g);c.appendChild(f);var f=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog()}),q=new Image,w=mxUtils.button(mxResources.get("apply"),function(){a.hideDialog();var b=document.createElement("canvas"),c=b.getContext("2d"),e=q.width,h=q.height,f=parseInt(l.value),g=parseInt(n.value),e=Math.max(1,e-f-parseInt(p.value)),h=Math.max(1,
-h-g-parseInt(t.value));b.width=e;b.height=h;u.checked&&(c.fillStyle="#000000",c.arc(e/2,h/2,Math.min(e/2,h/2),0,2*Math.PI),c.fill(),c.globalCompositeOperation="source-in");c.drawImage(q,f,g,e,h,0,0,e,h);d(b.toDataURL())});w.setAttribute("disabled","disabled");q.onload=function(){w.removeAttribute("disabled");m.innerHTML="";mxUtils.write(m,mxResources.get("width")+": "+q.width+" "+mxResources.get("height")+": "+q.height)};q.src=b;mxEvent.addListener(c,"keypress",function(a){13==a.keyCode&&w.click()});
-b=document.createElement("div");b.style.marginTop="20px";b.style.textAlign="right";a.editor.cancelFirst?(b.appendChild(f),b.appendChild(w)):(b.appendChild(w),b.appendChild(f));c.appendChild(b);this.container=c},EditGeometryDialog=function(a,b){var d=a.editor.graph,c=1==b.length?d.getCellGeometry(b[0]):null,f=document.createElement("div"),g=document.createElement("table"),k=document.createElement("tbody"),m=document.createElement("tr"),e=document.createElement("td"),h=document.createElement("td");
+p.value="0";h.appendChild(p);k.appendChild(e);k.appendChild(h);g.appendChild(k);k=document.createElement("tr");e=document.createElement("td");h=document.createElement("td");mxUtils.write(e,mxResources.get("bottom")+":");var u=document.createElement("input");u.setAttribute("type","text");u.style.width="100px";u.value="0";h.appendChild(u);k.appendChild(e);k.appendChild(h);g.appendChild(k);k=document.createElement("tr");e=document.createElement("td");h=document.createElement("td");mxUtils.write(e,mxResources.get("circle")+
+":");k.appendChild(e);var t=document.createElement("input");t.setAttribute("type","checkbox");h.appendChild(t);k.appendChild(h);g.appendChild(k);f.appendChild(g);c.appendChild(f);var f=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog()}),q=new Image,x=mxUtils.button(mxResources.get("apply"),function(){a.hideDialog();var b=document.createElement("canvas"),c=b.getContext("2d"),e=q.width,h=q.height,f=parseInt(l.value),g=parseInt(n.value),e=Math.max(1,e-f-parseInt(p.value)),h=Math.max(1,
+h-g-parseInt(u.value));b.width=e;b.height=h;t.checked&&(c.fillStyle="#000000",c.arc(e/2,h/2,Math.min(e/2,h/2),0,2*Math.PI),c.fill(),c.globalCompositeOperation="source-in");c.drawImage(q,f,g,e,h,0,0,e,h);d(b.toDataURL())});x.setAttribute("disabled","disabled");q.onload=function(){x.removeAttribute("disabled");m.innerHTML="";mxUtils.write(m,mxResources.get("width")+": "+q.width+" "+mxResources.get("height")+": "+q.height)};q.src=b;mxEvent.addListener(c,"keypress",function(a){13==a.keyCode&&x.click()});
+b=document.createElement("div");b.style.marginTop="20px";b.style.textAlign="right";a.editor.cancelFirst?(b.appendChild(f),b.appendChild(x)):(b.appendChild(x),b.appendChild(f));c.appendChild(b);this.container=c},EditGeometryDialog=function(a,b){var d=a.editor.graph,c=1==b.length?d.getCellGeometry(b[0]):null,f=document.createElement("div"),g=document.createElement("table"),k=document.createElement("tbody"),m=document.createElement("tr"),e=document.createElement("td"),h=document.createElement("td");
 g.style.paddingLeft="6px";mxUtils.write(e,mxResources.get("left")+":");var l=document.createElement("input");l.setAttribute("type","text");l.style.width="100px";l.value=null!=c?c.x:"";this.init=function(){l.focus();l.select()};h.appendChild(l);m.appendChild(e);m.appendChild(h);k.appendChild(m);m=document.createElement("tr");e=document.createElement("td");h=document.createElement("td");mxUtils.write(e,mxResources.get("top")+":");var n=document.createElement("input");n.setAttribute("type","text");n.style.width=
 "100px";n.value=null!=c?c.y:"";h.appendChild(n);m.appendChild(e);m.appendChild(h);k.appendChild(m);m=document.createElement("tr");e=document.createElement("td");h=document.createElement("td");mxUtils.write(e,mxResources.get("width")+":");var p=document.createElement("input");p.setAttribute("type","text");p.style.width="100px";p.value=null!=c?c.width:"";h.appendChild(p);m.appendChild(e);m.appendChild(h);k.appendChild(m);m=document.createElement("tr");e=document.createElement("td");h=document.createElement("td");
-mxUtils.write(e,mxResources.get("height")+":");var t=document.createElement("input");t.setAttribute("type","text");t.style.width="100px";t.value=null!=c?c.height:"";h.appendChild(t);m.appendChild(e);m.appendChild(h);k.appendChild(m);m=document.createElement("tr");e=document.createElement("td");h=document.createElement("td");mxUtils.write(e,mxResources.get("rotation")+":");var u=document.createElement("input");u.setAttribute("type","text");u.style.width="100px";u.value=1==b.length?mxUtils.getValue(d.getCellStyle(b[0]),
-mxConstants.STYLE_ROTATION,0):"";h.appendChild(u);m.appendChild(e);m.appendChild(h);k.appendChild(m);g.appendChild(k);f.appendChild(g);var c=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog()}),q=mxUtils.button(mxResources.get("apply"),function(){a.hideDialog();d.getModel().beginUpdate();try{for(var c=0;c<b.length;c++){var e=d.getCellGeometry(b[c]);null!=e&&(e=e.clone(),d.isCellMovable(b[c])&&(0<mxUtils.trim(l.value).length&&(e.x=Number(l.value)),0<mxUtils.trim(n.value).length&&(e.y=
-Number(n.value))),d.isCellResizable(b[c])&&(0<mxUtils.trim(p.value).length&&(e.width=Number(p.value)),0<mxUtils.trim(t.value).length&&(e.height=Number(t.value))),d.getModel().setGeometry(b[c],e));0<mxUtils.trim(u.value).length&&d.setCellStyles(mxConstants.STYLE_ROTATION,Number(u.value),[b[c]])}}finally{d.getModel().endUpdate()}});mxEvent.addListener(f,"keypress",function(a){13==a.keyCode&&q.click()});g=document.createElement("div");g.style.marginTop="20px";g.style.textAlign="right";a.editor.cancelFirst?
-(g.appendChild(c),g.appendChild(q)):(g.appendChild(q),g.appendChild(c));f.appendChild(g);this.container=f},LibraryDialog=function(a,b,d,c,f,g){function k(a){for(a=document.elementFromPoint(a.clientX,a.clientY);null!=a&&a.parentNode!=t;)a=a.parentNode;var b=null;if(null!=a)for(var c=t.firstChild,b=0;null!=c&&c!=a;)c=c.nextSibling,b++;return b}function m(b,c,d,e,h,f,g,n,p){try{if(null==c||"image/"==c.substring(0,6))if(null==b&&null!=g||null==q[b]){var y=function(){F.innerHTML="";F.style.cursor="pointer";
-F.style.whiteSpace="nowrap";F.style.textOverflow="ellipsis";mxUtils.write(F,null!=A.title&&0<A.title.length?A.title:mxResources.get("untitled"));F.style.color=null==A.title||0==A.title.length?"#d0d0d0":""};t.style.backgroundImage="";u.style.display="none";var C=h,B=f;if(h>a.maxImageSize||f>a.maxImageSize){var L=Math.min(1,Math.min(a.maxImageSize/Math.max(1,h)),a.maxImageSize/Math.max(1,f));h*=L;f*=L}C>B?(B=Math.round(100*B/C),C=100):(C=Math.round(100*C/B),B=100);var E=document.createElement("div");
-E.setAttribute("draggable","true");E.style.display=mxClient.IS_QUIRKS?"inline":"inline-block";E.style.position="relative";E.style.cursor="move";mxUtils.setPrefixedStyle(E.style,"transition","transform .1s ease-in-out");if(null!=b){var z=document.createElement("img");z.setAttribute("src",v.convert(b));z.style.width=C+"px";z.style.height=B+"px";z.style.margin="10px";z.style.paddingBottom=Math.floor((100-B)/2)+"px";z.style.paddingLeft=Math.floor((100-C)/2)+"px";E.appendChild(z)}else if(null!=g){var H=
+mxUtils.write(e,mxResources.get("height")+":");var u=document.createElement("input");u.setAttribute("type","text");u.style.width="100px";u.value=null!=c?c.height:"";h.appendChild(u);m.appendChild(e);m.appendChild(h);k.appendChild(m);m=document.createElement("tr");e=document.createElement("td");h=document.createElement("td");mxUtils.write(e,mxResources.get("rotation")+":");var t=document.createElement("input");t.setAttribute("type","text");t.style.width="100px";t.value=1==b.length?mxUtils.getValue(d.getCellStyle(b[0]),
+mxConstants.STYLE_ROTATION,0):"";h.appendChild(t);m.appendChild(e);m.appendChild(h);k.appendChild(m);g.appendChild(k);f.appendChild(g);var c=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog()}),q=mxUtils.button(mxResources.get("apply"),function(){a.hideDialog();d.getModel().beginUpdate();try{for(var c=0;c<b.length;c++){var e=d.getCellGeometry(b[c]);null!=e&&(e=e.clone(),d.isCellMovable(b[c])&&(0<mxUtils.trim(l.value).length&&(e.x=Number(l.value)),0<mxUtils.trim(n.value).length&&(e.y=
+Number(n.value))),d.isCellResizable(b[c])&&(0<mxUtils.trim(p.value).length&&(e.width=Number(p.value)),0<mxUtils.trim(u.value).length&&(e.height=Number(u.value))),d.getModel().setGeometry(b[c],e));0<mxUtils.trim(t.value).length&&d.setCellStyles(mxConstants.STYLE_ROTATION,Number(t.value),[b[c]])}}finally{d.getModel().endUpdate()}});mxEvent.addListener(f,"keypress",function(a){13==a.keyCode&&q.click()});g=document.createElement("div");g.style.marginTop="20px";g.style.textAlign="right";a.editor.cancelFirst?
+(g.appendChild(c),g.appendChild(q)):(g.appendChild(q),g.appendChild(c));f.appendChild(g);this.container=f},LibraryDialog=function(a,b,d,c,f,g){function k(a){for(a=document.elementFromPoint(a.clientX,a.clientY);null!=a&&a.parentNode!=u;)a=a.parentNode;var b=null;if(null!=a)for(var c=u.firstChild,b=0;null!=c&&c!=a;)c=c.nextSibling,b++;return b}function m(b,c,d,e,h,f,g,n,p){try{if(null==c||"image/"==c.substring(0,6))if(null==b&&null!=g||null==q[b]){var y=function(){F.innerHTML="";F.style.cursor="pointer";
+F.style.whiteSpace="nowrap";F.style.textOverflow="ellipsis";mxUtils.write(F,null!=A.title&&0<A.title.length?A.title:mxResources.get("untitled"));F.style.color=null==A.title||0==A.title.length?"#d0d0d0":""};u.style.backgroundImage="";t.style.display="none";var D=h,B=f;if(h>a.maxImageSize||f>a.maxImageSize){var L=Math.min(1,Math.min(a.maxImageSize/Math.max(1,h)),a.maxImageSize/Math.max(1,f));h*=L;f*=L}D>B?(B=Math.round(100*B/D),D=100):(D=Math.round(100*D/B),B=100);var E=document.createElement("div");
+E.setAttribute("draggable","true");E.style.display=mxClient.IS_QUIRKS?"inline":"inline-block";E.style.position="relative";E.style.cursor="move";mxUtils.setPrefixedStyle(E.style,"transition","transform .1s ease-in-out");if(null!=b){var z=document.createElement("img");z.setAttribute("src",v.convert(b));z.style.width=D+"px";z.style.height=B+"px";z.style.margin="10px";z.style.paddingBottom=Math.floor((100-B)/2)+"px";z.style.paddingLeft=Math.floor((100-D)/2)+"px";E.appendChild(z)}else if(null!=g){var H=
 a.stringToCells(a.editor.graph.decompress(g.xml));0<H.length&&(a.sidebar.createThumb(H,100,100,E,null,!0,!1),E.firstChild.style.display=mxClient.IS_QUIRKS?"inline":"inline-block",E.firstChild.style.cursor="")}var I=document.createElement("img");I.setAttribute("src",Editor.closeImage);I.setAttribute("border","0");I.setAttribute("title",mxResources.get("delete"));I.setAttribute("align","top");I.style.paddingTop="4px";I.style.marginLeft="-22px";I.style.cursor="pointer";mxEvent.addListener(I,"dragstart",
-function(a){mxEvent.consume(a)});null==b&&null!=g&&(I.style.position="relative");(function(a,b,c){mxEvent.addListener(I,"click",function(d){q[b]=null;for(var e=0;e<l.length;e++)if(null!=l[e].data&&l[e].data==b||null!=l[e].xml&&null!=c&&l[e].xml==c.xml){l.splice(e,1);break}E.parentNode.removeChild(a);0==l.length&&(t.style.backgroundImage="url('"+IMAGE_PATH+"/droptarget.png')",u.style.display="");mxEvent.consume(d)});mxEvent.addListener(I,"dblclick",function(a){mxEvent.consume(a)})})(E,b,g);E.appendChild(I);
-E.style.marginBottom="30px";var F=document.createElement("div");F.style.position="absolute";F.style.boxSizing="border-box";F.style.bottom="-18px";F.style.left="10px";F.style.right="10px";F.style.backgroundColor="#ffffff";F.style.overflow="hidden";F.style.textAlign="center";var A=null;null!=b?(A={data:b,w:h,h:f,title:p},null!=n&&(A.aspect=n),q[b]=z,l.push(A)):null!=g&&(g.aspect="fixed",l.push(g),A=g);mxEvent.addListener(F,"keydown",function(a){13==a.keyCode&&null!=x&&(x(),x=null,mxEvent.consume(a))});
+function(a){mxEvent.consume(a)});null==b&&null!=g&&(I.style.position="relative");(function(a,b,c){mxEvent.addListener(I,"click",function(d){q[b]=null;for(var e=0;e<l.length;e++)if(null!=l[e].data&&l[e].data==b||null!=l[e].xml&&null!=c&&l[e].xml==c.xml){l.splice(e,1);break}E.parentNode.removeChild(a);0==l.length&&(u.style.backgroundImage="url('"+IMAGE_PATH+"/droptarget.png')",t.style.display="");mxEvent.consume(d)});mxEvent.addListener(I,"dblclick",function(a){mxEvent.consume(a)})})(E,b,g);E.appendChild(I);
+E.style.marginBottom="30px";var F=document.createElement("div");F.style.position="absolute";F.style.boxSizing="border-box";F.style.bottom="-18px";F.style.left="10px";F.style.right="10px";F.style.backgroundColor="#ffffff";F.style.overflow="hidden";F.style.textAlign="center";var A=null;null!=b?(A={data:b,w:h,h:f,title:p},null!=n&&(A.aspect=n),q[b]=z,l.push(A)):null!=g&&(g.aspect="fixed",l.push(g),A=g);mxEvent.addListener(F,"keydown",function(a){13==a.keyCode&&null!=w&&(w(),w=null,mxEvent.consume(a))});
 y();E.appendChild(F);mxEvent.addListener(F,"mousedown",function(a){"true"!=F.getAttribute("contentEditable")&&mxEvent.consume(a)});H=function(b){if(mxClient.IS_IOS||mxClient.IS_QUIRKS||mxClient.IS_FF||!(null==document.documentMode||9<document.documentMode)){var c=new FilenameDialog(a,A.title||"",mxResources.get("ok"),function(a){null!=a&&(A.title=a,y())},mxResources.get("enterValue"));a.showDialog(c.container,300,80,!0,!0);c.init();mxEvent.consume(b)}else if("true"!=F.getAttribute("contentEditable")){null!=
-x&&(x(),x=null);if(null==A.title||0==A.title.length)F.innerHTML="";F.style.textOverflow="";F.style.whiteSpace="";F.style.cursor="text";F.style.color="";F.setAttribute("contentEditable","true");F.focus();document.execCommand("selectAll",!1,null);x=function(){F.removeAttribute("contentEditable");F.style.cursor="pointer";A.title=F.innerHTML;y()};mxEvent.consume(b)}};mxEvent.addListener(F,"click",H);mxEvent.addListener(E,"dblclick",H);t.appendChild(E);mxEvent.addListener(E,"dragstart",function(a){null==
-b&&null!=g&&(I.style.visibility="hidden",F.style.visibility="hidden");mxClient.IS_FF&&null!=g.xml&&a.dataTransfer.setData("Text",g.xml);w=k(a);mxClient.IS_GC&&(E.style.opacity="0.9");window.setTimeout(function(){mxUtils.setPrefixedStyle(E.style,"transform","scale(0.5,0.5)");mxUtils.setOpacity(E,30);I.style.visibility="";F.style.visibility=""},0)});mxEvent.addListener(E,"dragend",function(a){"hidden"==I.style.visibility&&(I.style.visibility="",F.style.visibility="");w=null;mxUtils.setOpacity(E,100);
-mxUtils.setPrefixedStyle(E.style,"transform",null)})}else D||(D=!0,a.handleError({message:mxResources.get("fileExists")}));else{h=!1;try{if(a.spinner.stop(),C=mxUtils.parseXml(b),"mxlibrary"==C.documentElement.nodeName){B=JSON.parse(mxUtils.getTextContent(C.documentElement));if(null!=B&&0<B.length)for(var G=0;G<B.length;G++)null!=B[G].xml?m(null,null,0,0,0,0,B[G]):m(B[G].data,null,0,0,B[G].w,B[G].h,null,"fixed",B[G].title);h=!0}else if("mxfile"==C.documentElement.nodeName){for(var N=C.documentElement.getElementsByTagName("diagram"),
-G=0;G<N.length;G++){var B=mxUtils.getTextContent(N[G]),H=a.stringToCells(a.editor.graph.decompress(B)),V=a.editor.graph.getBoundingBoxFromGeometry(H);m(null,null,0,0,0,0,{xml:B,w:V.width,h:V.height})}h=!0}}catch(U){}h||(a.spinner.stop(),a.handleError({message:mxResources.get("errorLoadingFile")}))}}catch(U){}return null}function e(a){a.dataTransfer.dropEffect=null!=w?"move":"copy";a.stopPropagation();a.preventDefault()}function h(b){b.stopPropagation();b.preventDefault();D=!1;y=k(b);if(null!=w)null!=
-y&&y<t.children.length?(l.splice(y>w?y-1:y,0,l.splice(w,1)[0]),t.insertBefore(t.children[w],t.children[y])):(l.push(l.splice(w,1)[0]),t.appendChild(t.children[w]));else if(0<b.dataTransfer.files.length)a.importFiles(b.dataTransfer.files,0,0,a.maxImageSize,B(b));else if(0<=mxUtils.indexOf(b.dataTransfer.types,"text/uri-list")){var c=decodeURIComponent(b.dataTransfer.getData("text/uri-list"));(/(\.jpg)($|\?)/i.test(c)||/(\.png)($|\?)/i.test(c)||/(\.gif)($|\?)/i.test(c)||/(\.svg)($|\?)/i.test(c))&&a.loadImage(c,
-function(a){m(c,null,0,0,a.width,a.height);t.scrollTop=t.scrollHeight})}b.stopPropagation();b.preventDefault()}var l=[];d=document.createElement("div");d.style.height="100%";var n=document.createElement("div");n.style.whiteSpace="nowrap";n.style.height="40px";d.appendChild(n);mxUtils.write(n,mxResources.get("filename")+":");null==b&&(b=a.defaultLibraryName+".xml");var p=document.createElement("input");p.setAttribute("value",b);p.style.marginRight="20px";p.style.marginLeft="10px";p.style.width="500px";
-null==f||f.isRenamable()||p.setAttribute("disabled","true");this.init=function(){if(null==f||f.isRenamable())p.focus(),mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode||mxClient.IS_QUIRKS?p.select():document.execCommand("selectAll",!1,null)};n.appendChild(p);var t=document.createElement("div");t.style.borderWidth="1px 0px 1px 0px";t.style.borderColor="#d3d3d3";t.style.borderStyle="solid";t.style.marginTop="6px";t.style.overflow="auto";t.style.height="340px";t.style.backgroundPosition="center center";
-t.style.backgroundRepeat="no-repeat";0==l.length&&Graph.fileSupport&&(t.style.backgroundImage="url('"+IMAGE_PATH+"/droptarget.png')");var u=document.createElement("div");u.style.position="absolute";u.style.width="640px";u.style.top="260px";u.style.textAlign="center";u.style.fontSize="22px";u.style.color="#a0c3ff";mxUtils.write(u,mxResources.get("dragImagesHere"));d.appendChild(u);var q={},w=null,y=null,x=null;b=function(a){"true"!=mxEvent.getSource(a).getAttribute("contentEditable")&&null!=x&&(x(),
-x=null,mxEvent.consume(a))};mxEvent.addListener(t,"mousedown",b);mxEvent.addListener(t,"pointerdown",b);mxEvent.addListener(t,"touchstart",b);var v=new mxUrlConverter,D=!1;if(null!=c)for(b=0;b<c.length;b++)n=c[b],m(n.data,null,0,0,n.w,n.h,n,n.aspect,n.title);mxEvent.addListener(t,"dragleave",function(a){u.style.cursor="";for(var b=mxEvent.getSource(a);null!=b;){if(b==t||b==u){a.stopPropagation();a.preventDefault();break}b=b.parentNode}});var B=function(b){return function(c,d,e,h,l,f,g,n,k){null!=
-k&&!a.isOffline()&&(new XMLHttpRequest).upload&&a.isRemoteFileFormat(c,k.name)?a.parseFile(k,mxUtils.bind(this,function(c){4==c.readyState&&(a.spinner.stop(),200<=c.status&&299>=c.status&&(m(c.responseText,d,e,h,l,f,g,"fixed",mxEvent.isAltDown(b)?null:g.substring(0,g.lastIndexOf(".")).replace(/_/g," ")),t.scrollTop=t.scrollHeight))})):(m(c,d,e,h,l,f,g,"fixed",mxEvent.isAltDown(b)?null:g.substring(0,g.lastIndexOf(".")).replace(/_/g," ")),t.scrollTop=t.scrollHeight)}};mxEvent.addListener(t,"dragover",
-e);mxEvent.addListener(t,"drop",h);mxEvent.addListener(u,"dragover",e);mxEvent.addListener(u,"drop",h);d.appendChild(t);c=document.createElement("div");c.style.textAlign="right";c.style.marginTop="20px";b=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog(!0)});b.setAttribute("id","btnCancel");b.className="geBtn";a.editor.cancelFirst&&c.appendChild(b);n=mxUtils.button(mxResources.get("export"),function(){var b=a.createLibraryDataFromImages(l),c=p.value;/(\.xml)$/i.test(c)||(c+=".xml");
-a.isLocalFileSave()?a.saveLocalFile(b,c,"text/xml",null,null,!0):(new mxXmlRequest(SAVE_URL,"filename="+encodeURIComponent(c)+"&format=xml&xml="+encodeURIComponent(b))).simulate(document,"_blank")});n.setAttribute("id","btnDownload");n.className="geBtn";c.appendChild(n);var A=document.createElement("input");A.setAttribute("multiple","multiple");A.setAttribute("type","file");null==document.documentMode&&(mxEvent.addListener(A,"change",function(b){D=!1;a.importFiles(A.files,0,0,a.maxImageSize,function(a,
-c,d,e,h,l,f,g,n){B(b)(a,c,d,e,h,l,f,g,n);A.value=""});t.scrollTop=t.scrollHeight}),n=mxUtils.button(mxResources.get("import"),function(){null!=x&&(x(),x=null);A.click()}),n.setAttribute("id","btnAddImage"),n.className="geBtn",c.appendChild(n));n=mxUtils.button(mxResources.get("addImageUrl"),function(){null!=x&&(x(),x=null);a.showImageDialog(mxResources.get("addImageUrl"),"",function(a,b,c){D=!1;if(null!=a){if("data:image/"==a.substring(0,11)){var d=a.indexOf(",");0<d&&(a=a.substring(0,d)+";base64,"+
-a.substring(d+1))}m(a,null,0,0,b,c);t.scrollTop=t.scrollHeight}})});n.setAttribute("id","btnAddImageUrl");n.className="geBtn";c.appendChild(n);this.saveBtnClickHandler=function(b,c,d,e){a.saveLibrary(b,c,d,e)};n=mxUtils.button(mxResources.get("save"),mxUtils.bind(this,function(){null!=x&&(x(),x=null);this.saveBtnClickHandler(p.value,l,f,g)}));n.setAttribute("id","btnSave");n.className="geBtn gePrimaryBtn";c.appendChild(n);a.editor.cancelFirst||c.appendChild(b);d.appendChild(c);this.container=d},EditShapeDialog=
+w&&(w(),w=null);if(null==A.title||0==A.title.length)F.innerHTML="";F.style.textOverflow="";F.style.whiteSpace="";F.style.cursor="text";F.style.color="";F.setAttribute("contentEditable","true");F.focus();document.execCommand("selectAll",!1,null);w=function(){F.removeAttribute("contentEditable");F.style.cursor="pointer";A.title=F.innerHTML;y()};mxEvent.consume(b)}};mxEvent.addListener(F,"click",H);mxEvent.addListener(E,"dblclick",H);u.appendChild(E);mxEvent.addListener(E,"dragstart",function(a){null==
+b&&null!=g&&(I.style.visibility="hidden",F.style.visibility="hidden");mxClient.IS_FF&&null!=g.xml&&a.dataTransfer.setData("Text",g.xml);x=k(a);mxClient.IS_GC&&(E.style.opacity="0.9");window.setTimeout(function(){mxUtils.setPrefixedStyle(E.style,"transform","scale(0.5,0.5)");mxUtils.setOpacity(E,30);I.style.visibility="";F.style.visibility=""},0)});mxEvent.addListener(E,"dragend",function(a){"hidden"==I.style.visibility&&(I.style.visibility="",F.style.visibility="");x=null;mxUtils.setOpacity(E,100);
+mxUtils.setPrefixedStyle(E.style,"transform",null)})}else C||(C=!0,a.handleError({message:mxResources.get("fileExists")}));else{h=!1;try{if(a.spinner.stop(),D=mxUtils.parseXml(b),"mxlibrary"==D.documentElement.nodeName){B=JSON.parse(mxUtils.getTextContent(D.documentElement));if(null!=B&&0<B.length)for(var G=0;G<B.length;G++)null!=B[G].xml?m(null,null,0,0,0,0,B[G]):m(B[G].data,null,0,0,B[G].w,B[G].h,null,"fixed",B[G].title);h=!0}else if("mxfile"==D.documentElement.nodeName){for(var N=D.documentElement.getElementsByTagName("diagram"),
+G=0;G<N.length;G++){var B=mxUtils.getTextContent(N[G]),H=a.stringToCells(a.editor.graph.decompress(B)),V=a.editor.graph.getBoundingBoxFromGeometry(H);m(null,null,0,0,0,0,{xml:B,w:V.width,h:V.height})}h=!0}}catch(U){}h||(a.spinner.stop(),a.handleError({message:mxResources.get("errorLoadingFile")}))}}catch(U){}return null}function e(a){a.dataTransfer.dropEffect=null!=x?"move":"copy";a.stopPropagation();a.preventDefault()}function h(b){b.stopPropagation();b.preventDefault();C=!1;y=k(b);if(null!=x)null!=
+y&&y<u.children.length?(l.splice(y>x?y-1:y,0,l.splice(x,1)[0]),u.insertBefore(u.children[x],u.children[y])):(l.push(l.splice(x,1)[0]),u.appendChild(u.children[x]));else if(0<b.dataTransfer.files.length)a.importFiles(b.dataTransfer.files,0,0,a.maxImageSize,B(b));else if(0<=mxUtils.indexOf(b.dataTransfer.types,"text/uri-list")){var c=decodeURIComponent(b.dataTransfer.getData("text/uri-list"));(/(\.jpg)($|\?)/i.test(c)||/(\.png)($|\?)/i.test(c)||/(\.gif)($|\?)/i.test(c)||/(\.svg)($|\?)/i.test(c))&&a.loadImage(c,
+function(a){m(c,null,0,0,a.width,a.height);u.scrollTop=u.scrollHeight})}b.stopPropagation();b.preventDefault()}var l=[];d=document.createElement("div");d.style.height="100%";var n=document.createElement("div");n.style.whiteSpace="nowrap";n.style.height="40px";d.appendChild(n);mxUtils.write(n,mxResources.get("filename")+":");null==b&&(b=a.defaultLibraryName+".xml");var p=document.createElement("input");p.setAttribute("value",b);p.style.marginRight="20px";p.style.marginLeft="10px";p.style.width="500px";
+null==f||f.isRenamable()||p.setAttribute("disabled","true");this.init=function(){if(null==f||f.isRenamable())p.focus(),mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode||mxClient.IS_QUIRKS?p.select():document.execCommand("selectAll",!1,null)};n.appendChild(p);var u=document.createElement("div");u.style.borderWidth="1px 0px 1px 0px";u.style.borderColor="#d3d3d3";u.style.borderStyle="solid";u.style.marginTop="6px";u.style.overflow="auto";u.style.height="340px";u.style.backgroundPosition="center center";
+u.style.backgroundRepeat="no-repeat";0==l.length&&Graph.fileSupport&&(u.style.backgroundImage="url('"+IMAGE_PATH+"/droptarget.png')");var t=document.createElement("div");t.style.position="absolute";t.style.width="640px";t.style.top="260px";t.style.textAlign="center";t.style.fontSize="22px";t.style.color="#a0c3ff";mxUtils.write(t,mxResources.get("dragImagesHere"));d.appendChild(t);var q={},x=null,y=null,w=null;b=function(a){"true"!=mxEvent.getSource(a).getAttribute("contentEditable")&&null!=w&&(w(),
+w=null,mxEvent.consume(a))};mxEvent.addListener(u,"mousedown",b);mxEvent.addListener(u,"pointerdown",b);mxEvent.addListener(u,"touchstart",b);var v=new mxUrlConverter,C=!1;if(null!=c)for(b=0;b<c.length;b++)n=c[b],m(n.data,null,0,0,n.w,n.h,n,n.aspect,n.title);mxEvent.addListener(u,"dragleave",function(a){t.style.cursor="";for(var b=mxEvent.getSource(a);null!=b;){if(b==u||b==t){a.stopPropagation();a.preventDefault();break}b=b.parentNode}});var B=function(b){return function(c,d,e,h,l,f,g,n,k){null!=
+k&&!a.isOffline()&&(new XMLHttpRequest).upload&&a.isRemoteFileFormat(c,k.name)?a.parseFile(k,mxUtils.bind(this,function(c){4==c.readyState&&(a.spinner.stop(),200<=c.status&&299>=c.status&&(m(c.responseText,d,e,h,l,f,g,"fixed",mxEvent.isAltDown(b)?null:g.substring(0,g.lastIndexOf(".")).replace(/_/g," ")),u.scrollTop=u.scrollHeight))})):(m(c,d,e,h,l,f,g,"fixed",mxEvent.isAltDown(b)?null:g.substring(0,g.lastIndexOf(".")).replace(/_/g," ")),u.scrollTop=u.scrollHeight)}};mxEvent.addListener(u,"dragover",
+e);mxEvent.addListener(u,"drop",h);mxEvent.addListener(t,"dragover",e);mxEvent.addListener(t,"drop",h);d.appendChild(u);c=document.createElement("div");c.style.textAlign="right";c.style.marginTop="20px";b=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog(!0)});b.setAttribute("id","btnCancel");b.className="geBtn";a.editor.cancelFirst&&c.appendChild(b);n=mxUtils.button(mxResources.get("export"),function(){var b=a.createLibraryDataFromImages(l),c=p.value;/(\.xml)$/i.test(c)||(c+=".xml");
+a.isLocalFileSave()?a.saveLocalFile(b,c,"text/xml",null,null,!0):(new mxXmlRequest(SAVE_URL,"filename="+encodeURIComponent(c)+"&format=xml&xml="+encodeURIComponent(b))).simulate(document,"_blank")});n.setAttribute("id","btnDownload");n.className="geBtn";c.appendChild(n);var A=document.createElement("input");A.setAttribute("multiple","multiple");A.setAttribute("type","file");null==document.documentMode&&(mxEvent.addListener(A,"change",function(b){C=!1;a.importFiles(A.files,0,0,a.maxImageSize,function(a,
+c,d,e,h,l,f,g,n){B(b)(a,c,d,e,h,l,f,g,n);A.value=""});u.scrollTop=u.scrollHeight}),n=mxUtils.button(mxResources.get("import"),function(){null!=w&&(w(),w=null);A.click()}),n.setAttribute("id","btnAddImage"),n.className="geBtn",c.appendChild(n));n=mxUtils.button(mxResources.get("addImageUrl"),function(){null!=w&&(w(),w=null);a.showImageDialog(mxResources.get("addImageUrl"),"",function(a,b,c){C=!1;if(null!=a){if("data:image/"==a.substring(0,11)){var d=a.indexOf(",");0<d&&(a=a.substring(0,d)+";base64,"+
+a.substring(d+1))}m(a,null,0,0,b,c);u.scrollTop=u.scrollHeight}})});n.setAttribute("id","btnAddImageUrl");n.className="geBtn";c.appendChild(n);this.saveBtnClickHandler=function(b,c,d,e){a.saveLibrary(b,c,d,e)};n=mxUtils.button(mxResources.get("save"),mxUtils.bind(this,function(){null!=w&&(w(),w=null);this.saveBtnClickHandler(p.value,l,f,g)}));n.setAttribute("id","btnSave");n.className="geBtn gePrimaryBtn";c.appendChild(n);a.editor.cancelFirst||c.appendChild(b);d.appendChild(c);this.container=d},EditShapeDialog=
 function(a,b,d,c,f){c=null!=c?c:300;f=null!=f?f:120;var g,k,m=document.createElement("table"),e=document.createElement("tbody");m.style.cellPadding="4px";g=document.createElement("tr");k=document.createElement("td");k.setAttribute("colspan","2");k.style.fontSize="10pt";mxUtils.write(k,d);g.appendChild(k);e.appendChild(g);g=document.createElement("tr");k=document.createElement("td");var h=document.createElement("textarea");h.style.outline="none";h.style.resize="none";h.style.width=c-200+"px";h.style.height=
 f+"px";this.textarea=h;this.init=function(){h.focus();h.scrollTop=0};k.appendChild(h);g.appendChild(k);k=document.createElement("td");d=document.createElement("div");d.style.position="relative";d.style.border="1px solid gray";d.style.top="6px";d.style.width="200px";d.style.height=f+4+"px";d.style.overflow="hidden";d.style.marginBottom="16px";mxEvent.disableContextMenu(d);k.appendChild(d);var l=new Graph(d);l.setEnabled(!1);var n=a.editor.graph.cloneCells([b])[0];l.addCells([n]);d=l.view.getState(n);
 var p="";null!=d.shape&&null!=d.shape.stencil&&(p=mxUtils.getPrettyXml(d.shape.stencil.desc));mxUtils.write(h,p||"");d=l.getGraphBounds();f=Math.min(160/d.width,(f-40)/d.height);l.view.scaleAndTranslate(f,20/f-d.x,20/f-d.y);g.appendChild(k);e.appendChild(g);g=document.createElement("tr");k=document.createElement("td");k.setAttribute("colspan","2");k.style.paddingTop="2px";k.style.whiteSpace="nowrap";k.setAttribute("align","right");f=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog()});
-f.className="geBtn";a.editor.cancelFirst&&k.appendChild(f);a.isOffline()||(d=mxUtils.button(mxResources.get("help"),function(){window.open("https://desk.draw.io/support/solutions/articles/16000052874")}),d.className="geBtn",k.appendChild(d));var t=function(b,c,d){var e=h.value,l=mxUtils.parseXml(e),e=mxUtils.getPrettyXml(l.documentElement),l=l.documentElement.getElementsByTagName("parsererror");if(null!=l&&0<l.length)a.showError(mxResources.get("error"),mxResources.get("containsValidationErrors"),
-mxResources.get("ok"));else if(d&&a.hideDialog(),l=!b.model.contains(c),!d||l||e!=p){e=a.editor.graph.compress(e);b.getModel().beginUpdate();try{if(l){var f=a.editor.graph.getInsertPoint();c.geometry.x=f.x;c.geometry.y=f.y;b.addCell(c)}b.setCellStyles(mxConstants.STYLE_SHAPE,"stencil("+e+")",[c])}catch(D){throw D;}finally{b.getModel().endUpdate()}l&&b.setSelectionCell(c)}};d=mxUtils.button(mxResources.get("preview"),function(){t(l,n,!1)});d.className="geBtn";k.appendChild(d);d=mxUtils.button(mxResources.get("apply"),
-function(){t(a.editor.graph,b,!0)});d.className="geBtn gePrimaryBtn";k.appendChild(d);a.editor.cancelFirst||k.appendChild(f);g.appendChild(k);e.appendChild(g);m.appendChild(e);this.container=m},CustomDialog=function(a,b,d,c,f,g){var k=document.createElement("div");k.appendChild(b);b=document.createElement("div");b.style.marginTop="16px";b.style.textAlign="right";var m=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog();null!=c&&c()});m.className="geBtn";a.editor.cancelFirst&&b.appendChild(m);
+f.className="geBtn";a.editor.cancelFirst&&k.appendChild(f);a.isOffline()||(d=mxUtils.button(mxResources.get("help"),function(){window.open("https://desk.draw.io/support/solutions/articles/16000052874")}),d.className="geBtn",k.appendChild(d));var u=function(b,c,d){var e=h.value,l=mxUtils.parseXml(e),e=mxUtils.getPrettyXml(l.documentElement),l=l.documentElement.getElementsByTagName("parsererror");if(null!=l&&0<l.length)a.showError(mxResources.get("error"),mxResources.get("containsValidationErrors"),
+mxResources.get("ok"));else if(d&&a.hideDialog(),l=!b.model.contains(c),!d||l||e!=p){e=a.editor.graph.compress(e);b.getModel().beginUpdate();try{if(l){var f=a.editor.graph.getInsertPoint();c.geometry.x=f.x;c.geometry.y=f.y;b.addCell(c)}b.setCellStyles(mxConstants.STYLE_SHAPE,"stencil("+e+")",[c])}catch(C){throw C;}finally{b.getModel().endUpdate()}l&&b.setSelectionCell(c)}};d=mxUtils.button(mxResources.get("preview"),function(){u(l,n,!1)});d.className="geBtn";k.appendChild(d);d=mxUtils.button(mxResources.get("apply"),
+function(){u(a.editor.graph,b,!0)});d.className="geBtn gePrimaryBtn";k.appendChild(d);a.editor.cancelFirst||k.appendChild(f);g.appendChild(k);e.appendChild(g);m.appendChild(e);this.container=m},CustomDialog=function(a,b,d,c,f,g){var k=document.createElement("div");k.appendChild(b);b=document.createElement("div");b.style.marginTop="16px";b.style.textAlign="right";var m=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog();null!=c&&c()});m.className="geBtn";a.editor.cancelFirst&&b.appendChild(m);
 if(!a.isOffline()&&null!=g){var e=mxUtils.button(mxResources.get("help"),function(){window.open(g)});e.className="geBtn";b.appendChild(e)}f=mxUtils.button(f||mxResources.get("ok"),function(){a.hideDialog();null!=d&&d()});b.appendChild(f);f.className="geBtn gePrimaryBtn";a.editor.cancelFirst||b.appendChild(m);k.appendChild(b);this.cancelBtn=m;this.okButton=f;this.container=k};(function(){Editor.prototype.appName="draw.io";Editor.closeImage=mxClient.IS_SVG?"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABkAAAAZCAMAAADzN3VRAAAApVBMVEUAAAD////k5OT///8AAAB1dXXMzMz9/f39/f37+/v5+fn+/v7///9iYmJaWlqFhYWnp6ejo6OHh4f////////////////7+/v5+fnx8fH///8AAAD///8bGxv7+/v5+fkoKCghISFDQ0MYGBjh4eHY2Njb29tQUFBvb29HR0c/Pz82NjYrKyu/v78SEhLu7u7s7OzV1dVVVVU7OzsVFRXAv78QEBBzqehMAAAAG3RSTlMAA/7p/vz5xZlrTiPL/v78+/v7+OXd2TYQDs8L70ZbAAABKUlEQVQoz3VS13LCMBBUXHChd8iukDslQChJ/v/TchaG4cXS+OSb1c7trU7V60OpdRz2ZtNZL4zXNlcN8BEtSG6+NxIXkeRPoBuQ1cjvZ31/VJFB10ISli6diYfH8iYO3WUNCcNlB0gTrXOtkxTo0O1aKKiBBMhhv2MNBQKoiA5wxlZo0JDzD3AYKbWacyj3fs01wxey0pyEP+R8pWKWXoqtIZ0DDg5pbki9krEKOa6LVDQsdoXEsi46Zqh69KFz7B1u7Hb2yDV8firXDKBlZ4UFiswKGRhXTS93/ECK7yxnJ3+S3y/ThpO+cfSD017nqa18aasabU0/t7d+tk0/1oMEJ1NaD67iwdF68OabFSLn+eHb0+vjy+uk8br9fdrftH0O2menfd7+AQfYM/lNjoDHAAAAAElFTkSuQmCC":
 IMAGE_PATH+"/delete.png";Editor.plusImage=mxClient.IS_SVG?"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAoAAAAKCAYAAACNMs+9AAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAyJpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuMC1jMDYwIDYxLjEzNDc3NywgMjAxMC8wMi8xMi0xNzozMjowMCAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvIiB4bWxuczp4bXBNTT0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL21tLyIgeG1sbnM6c3RSZWY9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9zVHlwZS9SZXNvdXJjZVJlZiMiIHhtcDpDcmVhdG9yVG9vbD0iQWRvYmUgUGhvdG9zaG9wIENTNSBNYWNpbnRvc2giIHhtcE1NOkluc3RhbmNlSUQ9InhtcC5paWQ6MDdCMTdENjVCOEM4MTFFNDlCRjVBNDdCODU5NjNBNUMiIHhtcE1NOkRvY3VtZW50SUQ9InhtcC5kaWQ6MDdCMTdENjZCOEM4MTFFNDlCRjVBNDdCODU5NjNBNUMiPiA8eG1wTU06RGVyaXZlZEZyb20gc3RSZWY6aW5zdGFuY2VJRD0ieG1wLmlpZDowN0IxN0Q2M0I4QzgxMUU0OUJGNUE0N0I4NTk2M0E1QyIgc3RSZWY6ZG9jdW1lbnRJRD0ieG1wLmRpZDowN0IxN0Q2NEI4QzgxMUU0OUJGNUE0N0I4NTk2M0E1QyIvPiA8L3JkZjpEZXNjcmlwdGlvbj4gPC9yZGY6UkRGPiA8L3g6eG1wbWV0YT4gPD94cGFja2V0IGVuZD0iciI/PtjrjmgAAAAtSURBVHjaYvz//z8DMigvLwcLdHZ2MiKLMzEQCaivkLGsrOw/dU0cAr4GCDAARQsQbTFrv10AAAAASUVORK5CYII=":
 IMAGE_PATH+"/plus.png";Editor.spinImage=mxClient.IS_SVG?"data:image/gif;base64,R0lGODlhDAAMAPUxAEVriVp7lmCAmmGBm2OCnGmHn3OPpneSqYKbr4OcsIScsI2kto6kt46lt5KnuZmtvpquvpuvv56ywaCzwqK1xKu7yay9yq+/zLHAzbfF0bjG0bzJ1LzK1MDN18jT28nT3M3X3tHa4dTc49Xd5Njf5dng5t3k6d/l6uDm6uru8e7x8/Dz9fT29/b4+Pj5+fj5+vr6+v///wAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACH5BAkKADEAIf8LTkVUU0NBUEUyLjADAQAAACwAAAAADAAMAAAGR8CYcEgsOgYAIax4CCQuQldrCBEsiK8VS2hoFGOrlJDA+cZQwkLnqyoJFZKviSS0ICrE0ec0jDAwIiUeGyBFGhMPFBkhZo1BACH5BAkKAC4ALAAAAAAMAAwAhVB0kFR3k1V4k2CAmmWEnW6Lo3KOpXeSqH2XrIOcsISdsImhtIqhtJCmuJGnuZuwv52wwJ+ywZ+ywqm6yLHBzbLCzrXEz7fF0LnH0rrI0r7L1b/M1sXR2cfT28rV3czW3s/Z4Nfe5Nvi6ODm6uLn6+Ln7OLo7OXq7efs7+zw8u/y9PDy9PX3+Pr7+////wAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAZDQJdwSCxGDAIAoVFkFBwYSyIwGE4OkCJxIdG6WkJEx8sSKj7elfBB0a5SQg1EQ0SVVMPKhDM6iUIkRR4ZFxsgJl6JQQAh+QQJCgAxACwAAAAADAAMAIVGa4lcfZdjgpxkg51nhp5ui6N3kqh5lKqFnbGHn7KIoLOQp7iRp7mSqLmTqbqarr6br7+fssGitcOitcSuvsuuv8uwwMyzw861xNC5x9K6x9K/zNbDztjE0NnG0drJ1NzQ2eDS2+LT2+LV3ePZ4Oba4ebb4ufc4+jm6+7t8PLt8PPt8fPx8/Xx9PX09vf19/j3+Pn///8AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAGQ8CYcEgsUhQFggFSjCQmnE1jcBhqGBXiIuAQSi7FGEIgfIzCFoCXFCZiPO0hKBMiwl7ET6eUYqlWLkUnISImKC1xbUEAIfkECQoAMgAsAAAAAAwADACFTnKPT3KPVHaTYoKcb4yjcY6leZSpf5mtgZuvh5+yiqG0i6K1jqW3kae5nrHBnrLBn7LCoLPCobTDqbrIqrvIs8LOtMPPtcPPtcTPuMbRucfSvcrUvsvVwMzWxdHaydTcytXdzNbezdff0drh2ODl2+Ln3eTp4Obq4ujs5Ont5uvu6O3w6u7w6u7x7/L09vj5+vr7+vv7////AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABkdAmXBILHIcicOCUqxELKKPxKAYgiYd4oMAEWo8RVmjIMScwhmBcJMKXwLCECmMGAhPI1QRwBiaSixCMDFhLSorLi8wYYxCQQAh+QQJCgAxACwAAAAADAAMAIVZepVggJphgZtnhp5vjKN2kah3kqmBmq+KobSLorWNpLaRp7mWq7ybr7+gs8KitcSktsWnuManucexwM2ywc63xtG6yNO9ytS+ytW/zNbDz9jH0tvL1d3N197S2+LU3OPU3ePV3eTX3+Xa4efb4ufd5Onl6u7r7vHs7/Lt8PLw8/Xy9Pby9fb09ff2+Pn3+Pn6+vr///8AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAGSMCYcEgseiwSR+RS7GA4JFGF8RiWNiEiJTERgkjFGAQh/KTCGoJwpApnBkITKrwoCFWnFlEhaAxXLC9CBwAGRS4wQgELYY1CQQAh+QQJCgAzACwAAAAADAAMAIVMcI5SdZFhgZtti6JwjaR4k6mAma6Cm6+KobSLorWLo7WNo7aPpredsMCescGitMOitcSmuMaqu8ixwc2zws63xdC4xtG5x9K9ytXAzdfCztjF0NnF0drK1d3M1t7P2N/P2eDT2+LX3+Xe5Onh5+vi5+vj6Ozk6e3n7O/o7O/q7vHs7/Lt8PPu8fPx8/X3+Pn6+vv7+/v8/Pz///8AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAGRcCZcEgsmkIbTOZTLIlGqZNnchm2SCgiJ6IRqljFmQUiXIVnoITQde4chC9Y+LEQxmTFRkFSNFAqDAMIRQoCAAEEDmeLQQAh+QQJCgAwACwAAAAADAAMAIVXeZRefplff5lhgZtph59yjqV2kaeAmq6FnbGFnrGLorWNpLaQp7mRqLmYrb2essGgs8Klt8apusitvcquv8u2xNC7yNO8ydS8ytTAzdfBzdfM1t7N197Q2eDU3OPX3+XZ4ObZ4ebc4+jf5erg5erg5uvp7fDu8fPv8vTz9fb09vf19/j3+Pn4+fn5+vr6+/v///8AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAGRUCYcEgspkwjEKhUVJ1QsBNp0xm2VixiSOMRvlxFGAcTJook5eEHIhQcwpWIkAFQECkNy9AQWFwyEAkPRQ4FAwQIE2llQQAh+QQJCgAvACwAAAAADAAMAIVNcY5SdZFigptph6BvjKN0kKd8lquAmq+EnbGGn7KHn7ONpLaOpbearr+csMCdscCescGhtMOnuMauvsuzws60w862xdC9ytW/y9a/zNbCztjG0drH0tvK1N3M1t7N19/U3ePb4uff5urj6Ozk6e3l6u7m6u7o7PDq7vDt8PPv8vTw8vTw8/X19vf6+vv///8AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAGQ8CXcEgsvlytVUplJLJIpSEDUESFTELBwSgCCQEV42kjDFiMo4uQsDB2MkLHoEHUTD7DRAHC8VAiZ0QSCgYIDxhNiUEAOw==":
@@ -6168,33 +6170,33 @@ IMAGE_PATH+"/spin.gif";Editor.tweetImage=IMAGE_PATH+"/tweet.png";Editor.facebook
 IMAGE_PATH+"/img-hi-res.png";Editor.loResImage=mxClient.IS_SVG?"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAFAAAAA+CAMAAACLMWy1AAAAS1BMVEVAQEAAAAA1NTVBQUFDQ0NDQ0NFRUVERERBQUFBQUFBQUFAQEBBQUFBQUFCQkJCQkJCQkJBQUFCQkJDQ0NDQ0NCQkJCQkJCQkJGRkb5/XqTAAAAGXRSTlP+AAWODlASCsesX+Lc2LyWe3pwa1tCPjohjSJfoAAAAI1JREFUWMPt1MkKhTAMRuG0anvneXr/J71nUypKcdqI/N8yhLMKMZE1CahnClDQzMPB44ED3EgeCubgDWnWQMHpwTtKwTe+UHD4sJ94wbUEHHFGhILlYDeSnsQeabeCgsPBgB0MOZZ9oGA5GJFiJSfUULAfjLjARrhCwX7wh2YCDwVbwZkUBKqFFJRN+wOcwSgR2sREcgAAAABJRU5ErkJggg==":
 IMAGE_PATH+"/img-lo-res.png";Editor.cameraLargeImage="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAYAAABzenr0AAAAAXNSR0IArs4c6QAAAAlwSFlzAAALEwAACxMBAJqcGAAAAVlpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IlhNUCBDb3JlIDUuNC4wIj4KICAgPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4KICAgICAgPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIKICAgICAgICAgICAgeG1sbnM6dGlmZj0iaHR0cDovL25zLmFkb2JlLmNvbS90aWZmLzEuMC8iPgogICAgICAgICA8dGlmZjpPcmllbnRhdGlvbj4xPC90aWZmOk9yaWVudGF0aW9uPgogICAgICA8L3JkZjpEZXNjcmlwdGlvbj4KICAgPC9yZGY6UkRGPgo8L3g6eG1wbWV0YT4KTMInWQAAA/BJREFUWAnFl0uIjWEYx885buPSuGwmSYwtwsY1ikKSNYNclmQnadgrZSPlsnBLSlaGBdNYKY0Vdi4L4zYzIqxGxmXG//d+7//0+uY7nWMiT/2/53mf+3v7vnNKpf9M5UbrDw8Pj4m+wzmeT1FBUS6Xf+YNox6reMONukijMXUTM3NmI75PyXcJPwRWg5kS7xysDLNmfEUxpx2rceNE50IlYjyRklcLf0prY+x4BTqfmx3ZUHQaO9ISGngYq38V/1EH+ECPa+QaK1u1kVBQirDMChiS3CTeIkwWvghtwhKBpZ8g1CO2B99FynVU/KowSRgQ3mlrBsVZ1awmQlS0SGbfXglfBPbdRGMm5O8RXg2P835pDCvzWjghTHETcLpZLHwS8kTCtBEK1SN83Egam8YxyVZqc+Do5qkwS+gT9grNwkUBG6cbsG/gs3BTuC/0ChCxq4QtwgzBMdwUZBPyN4Ftfi4sYPZHktbOSRlIuutRP5jYj0ueZp88xyYcS/zZoiLyQT1IA/cTj7eSlwnrhI+JnkQbCwo2Sx/2M7VJt17wdhVtgxvrpoFnAuSAbJQ97biZAlKxBfD9wgOhV+BgIR/AZtJ4kwD5PGSj7OmmekjWEy0oAQHAS3+KpBpzXqYK3UItopHpSRMno2N+cm7gDYnfRCcr3QBqriMHLJDkeyhFfiG5aVbK+8rhtP9M6QcIEJHX5Fp9NMAyQlYiu+OOJNlODCIXyka/P23bncTdiC7OydC1+v1Bsb+5r84DK8S3Rdmf5cRUFW3bXtWUSt1Rdk6G4SyJV2o1YId+vNUxr+x5yCJiapFtcxQzLjrxboGcMxvFJwEOKnLwjIbkx/sdSmeSaUY++SwTAxV+4DJT7RVwkbk46gNCsifIItuy0e9PF33Cb4homhN5YRyzL5q5V2VNkv98kqgoGTo3YF9CnMM5Y5rItFfvBSi9JulVXOgI+VwIntkt+SaZ6weQfcovJf7zpTfl86P/wAF7Fz18NeKwmvAWCaX0Z/uMHQr42ZxvR/Rxcw5xM+9J/CJq8w2gduDhmDgso/QrBH47dEXQ1IqczyHpIOfIRtnTtV7SwO1oKXKkU3fbToFGSDHtMWcaH1WBuVYnDbRFi99iqSMySdzxXckrazUh23KBVYGIcfNBkTxca0e4ATJ0KukGYVBgr/MnlhPOtQq/ksUfCbzh+EFCjtnCUoHfjhA/OsiTv2HcEvJMELp0VakZDliTmriTdPivxU4VmEhtPrGV+KJhO7ZKt0doFZh1fgZSBWIW2AGEHwg3BUWOnKtH+suqdw07tYMfglCrWPD5mw9qVYuniaXkT0OtWaSuo5LJTY1RBf+roF9X5+y/5qU+DAAAAABJRU5ErkJggg==";
 Editor.defaultCustomLibraries=[];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## 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## Connections between rows ("from": source colum, "to": target column).\n## Label, style and invert are optional. Defaults are \'\', current style and false.\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 width. Possible value are px or auto. Default is auto.\n#\n# width: auto\n#\n## Node height. Possible value are px or auto. Default is auto.\n#\n# height: auto\n#\n## Padding for autosize. Default is 0.\n#\n# padding: -26\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\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 parallel edges. Default is 40.\n#\n# edgespacing: 40\n#\n## Name of layout. Possible values are auto, none, verticaltree, horizontaltree,\n## verticalflow, horizontalflow, organic, circle. 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\nEvan 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-9-2-128.png\nEdward Morrison,Brand Manager,emo,Office 2,Evan 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\nRon Donovan,System Admin,rdo,Office 3,Evan 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\nTessa Valet,HR Director,tva,Office 4,Evan Miller,me@example.com,#d5e8d4,#82b366,,https://www.draw.io,https://cdn3.iconfinder.com/data/icons/user-avatars-1/512/users-3-128.png\n';
-Editor.configure=function(a){if(null!=a){Menus.prototype.defaultFonts=a.defaultFonts||Menus.prototype.defaultFonts;ColorDialog.prototype.presetColors=a.presetColors||ColorDialog.prototype.presetColors;ColorDialog.prototype.defaultColors=a.defaultColors||ColorDialog.prototype.defaultColors;StyleFormatPanel.prototype.defaultColorSchemes=a.defaultColorSchemes||StyleFormatPanel.prototype.defaultColorSchemes;if(null!=a.css){var b=document.createElement("style");b.setAttribute("type","text/css");b.appendChild(document.createTextNode(a.css));
-var c=document.getElementsByTagName("script")[0];c.parentNode.insertBefore(b,c)}null!=a.defaultLibraries&&(Sidebar.prototype.defaultEntries=a.defaultLibraries);null!=a.defaultCustomLibraries&&(Editor.defaultCustomLibraries=a.defaultCustomLibraries);null!=a.defaultVertexStyle&&(Graph.prototype.defaultVertexStyle=a.defaultVertexStyle);null!=a.defaultEdgeStyle&&(Graph.prototype.defaultEdgeStyle=a.defaultEdgeStyle);a.emptyDiagramXml&&(EditorUi.prototype.emptyDiagramXml=a.emptyDiagramXml);a.thumbWidth&&
-(Sidebar.prototype.thumbWidth=a.thumbWidth);a.thumbHeight&&(Sidebar.prototype.thumbHeight=a.thumbHeight);a.emptyLibraryXml&&(EditorUi.prototype.emptyLibraryXml=a.emptyLibraryXml);a.sidebarWidth&&(EditorUi.prototype.hsplitPosition=a.sidebarWidth);a.fontCss&&(b=document.createElement("style"),b.setAttribute("type","text/css"),b.appendChild(document.createTextNode(a.fontCss)),c=document.getElementsByTagName("script")[0],c.parentNode.insertBefore(b,c),Editor.prototype.fontCss=a.fontCss);if(null!=a.plugins)for(App.initPluginCallback(),
-b=0;b<a.plugins.length;b++)mxscript(a.plugins[b])}};Editor.prototype.editButtonLink=null!=urlParams.edit?decodeURIComponent(urlParams.edit):null;var a=Editor.prototype.setGraphXml;Editor.prototype.setGraphXml=function(b){b=null!=b&&"mxlibrary"!=b.nodeName?this.extractGraphModel(b):null;if(null!=b){var c=b.getElementsByTagName("parsererror");if(null!=c&&0<c.length){var c=c[0],d=c.getElementsByTagName("div");null!=d&&0<d.length&&(c=d[0]);throw{message:mxUtils.getTextContent(c)};}if("mxGraphModel"==
-b.nodeName){c=b.getAttribute("style")||"default-style2";if("1"==urlParams.embed||null!=c&&""!=c)c!=this.graph.currentStyle&&(d=null!=this.graph.themes?this.graph.themes[c]:mxUtils.load(STYLE_PATH+"/"+c+".xml").getDocumentElement(),null!=d&&(e=new mxCodec(d.ownerDocument),e.decode(d,this.graph.getStylesheet())));else if(d=null!=this.graph.themes?this.graph.themes["default-old"]:mxUtils.load(STYLE_PATH+"/default-old.xml").getDocumentElement(),null!=d){var e=new mxCodec(d.ownerDocument);e.decode(d,this.graph.getStylesheet())}this.graph.currentStyle=
-c;this.graph.mathEnabled="1"==urlParams.math||"1"==b.getAttribute("math");c=b.getAttribute("backgroundImage");null!=c?(c=JSON.parse(c),this.graph.setBackgroundImage(new mxImage(c.src,c.width,c.height))):this.graph.setBackgroundImage(null);mxClient.NO_FO=this.graph.mathEnabled?!0:this.originalNoForeignObject;this.graph.setShadowVisible("1"==b.getAttribute("shadow"),!1)}a.apply(this,arguments)}else throw{message:mxResources.get("notADiagramFile")||"Invalid data",toString:function(){return this.message}};
-};var b=Editor.prototype.getGraphXml;Editor.prototype.getGraphXml=function(a){a=null!=a?a:!0;var c=b.apply(this,arguments);null!=this.graph.currentStyle&&"default-style2"!=this.graph.currentStyle&&c.setAttribute("style",this.graph.currentStyle);null!=this.graph.backgroundImage&&c.setAttribute("backgroundImage",JSON.stringify(this.graph.backgroundImage));c.setAttribute("math",this.graph.mathEnabled?"1":"0");c.setAttribute("shadow",this.graph.shadowVisible?"1":"0");return c};Editor.prototype.isDataSvg=
-function(a){try{var b=mxUtils.parseXml(a).documentElement.getAttribute("content");if(null!=b&&(null!=b&&"<"!=b.charAt(0)&&"%"!=b.charAt(0)&&(b=unescape(window.atob?atob(b):Base64.decode(cont,b))),null!=b&&"%"==b.charAt(0)&&(b=decodeURIComponent(b)),null!=b&&0<b.length)){var c=mxUtils.parseXml(b).documentElement;return"mxfile"==c.nodeName||"mxGraphModel"==c.nodeName}}catch(x){}return!1};Editor.prototype.extractGraphModel=function(a,b){if(null!=a&&"undefined"!==typeof pako){var c=a.ownerDocument.getElementsByTagName("div"),
-d=[];if(null!=c&&0<c.length)for(var e=0;e<c.length;e++)if("mxgraph"==c[e].getAttribute("class")){d.push(c[e]);break}0<d.length&&(c=d[0].getAttribute("data-mxgraph"),null!=c?(d=JSON.parse(c),null!=d&&null!=d.xml&&(d=mxUtils.parseXml(d.xml),a=d.documentElement)):(d=d[0].getElementsByTagName("div"),0<d.length&&(c=mxUtils.getTextContent(d[0]),c=this.graph.decompress(c),0<c.length&&(d=mxUtils.parseXml(c),a=d.documentElement))))}if(null!=a&&"svg"==a.nodeName)if(c=a.getAttribute("content"),null!=c&&"<"!=
-c.charAt(0)&&"%"!=c.charAt(0)&&(c=unescape(window.atob?atob(c):Base64.decode(cont,c))),null!=c&&"%"==c.charAt(0)&&(c=decodeURIComponent(c)),null!=c&&0<c.length)a=mxUtils.parseXml(c).documentElement;else throw{message:mxResources.get("notADiagramFile")};null==a||b||(d=null,"diagram"==a.nodeName?d=a:"mxfile"==a.nodeName&&(c=a.getElementsByTagName("diagram"),0<c.length&&(d=c[Math.max(0,Math.min(c.length-1,urlParams.page||0))])),null!=d&&(c=this.graph.decompress(mxUtils.getTextContent(d)),null!=c&&0<
-c.length&&(a=mxUtils.parseXml(c).documentElement)));null==a||"mxGraphModel"==a.nodeName||b&&"mxfile"==a.nodeName||(a=null);return a};var d=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?!0:this.originalNoForeignObject;d.apply(this,arguments)};Editor.prototype.originalNoForeignObject=mxClient.NO_FO;var c=Editor.prototype.updateGraphComponents;Editor.prototype.updateGraphComponents=
-function(){c.apply(this,arguments);mxClient.NO_FO=this.graph.mathEnabled&&null!=Editor.MathJaxRender?!0:this.originalNoForeignObject};Editor.initMath=function(a,b){a=null!=a?a:"https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.0/MathJax.js?config=TeX-MML-AM_HTMLorMML";Editor.mathJaxQueue=[];Editor.doMathJaxRender=function(a){MathJax.Hub.Queue(["Typeset",MathJax.Hub,a])};window.MathJax={skipStartupTypeset:!0,showMathMenu:!1,messageStyle:"none",AuthorInit:function(){MathJax.Hub.Config(b||{jax:["input/TeX",
-"input/MathML","input/AsciiMath","output/HTML-CSS"],extensions:["tex2jax.js","mml2jax.js","asciimath2jax.js"],TeX:{extensions:["AMSmath.js","AMSsymbols.js","noErrors.js","noUndefined.js"]},tex2jax:{ignoreClass:"mxCellEditor"},asciimath2jax:{ignoreClass:"mxCellEditor"}});MathJax.Hub.Register.StartupHook("Begin",function(){for(var a=0;a<Editor.mathJaxQueue.length;a++)Editor.doMathJaxRender(Editor.mathJaxQueue[a])})}};Editor.MathJaxRender=function(a){"undefined"!==typeof MathJax&&"undefined"!==typeof MathJax.Hub?
-Editor.doMathJaxRender(a):Editor.mathJaxQueue.push(a)};Editor.MathJaxClear=function(){Editor.mathJaxQueue=[]};var c=Editor.prototype.init;Editor.prototype.init=function(){c.apply(this,arguments);this.graph.addListener(mxEvent.SIZE,mxUtils.bind(this,function(a,b){this.graph.mathEnabled&&Editor.MathJaxRender(this.graph.container)}))};var d=document.getElementsByTagName("script");if(null!=d&&0<d.length){var e=document.createElement("script");e.type="text/javascript";e.src=a;d[0].parentNode.appendChild(e)}};
-Editor.prototype.csvToArray=function(a){if(!/^\s*(?:'[^'\\]*(?:\\[\S\s][^'\\]*)*'|"[^"\\]*(?:\\[\S\s][^"\\]*)*"|[^,'"\s\\]*(?:\s+[^,'"\s\\]+)*)\s*(?:,\s*(?:'[^'\\]*(?:\\[\S\s][^'\\]*)*'|"[^"\\]*(?:\\[\S\s][^"\\]*)*"|[^,'"\s\\]*(?:\s+[^,'"\s\\]+)*)\s*)*$/.test(a))return null;var b=[];a.replace(/(?!\s*$)\s*(?:'([^'\\]*(?:\\[\S\s][^'\\]*)*)'|"([^"\\]*(?:\\[\S\s][^"\\]*)*)"|([^,'"\s\\]*(?:\s+[^,'"\s\\]+)*))\s*(?:,|$)/g,function(a,c,d,e){void 0!==c?b.push(c.replace(/\\'/g,"'")):void 0!==d?b.push(d.replace(/\\"/g,
-'"')):void 0!==e&&b.push(e);return""});/,\s*$/.test(a)&&b.push("");return b};if(window.ColorDialog){var f=ColorDialog.addRecentColor;ColorDialog.addRecentColor=function(a,b){f.apply(this,arguments);mxSettings.setRecentColors(ColorDialog.recentColors);mxSettings.save()};var g=ColorDialog.resetRecentColors;ColorDialog.resetRecentColors=function(){g.apply(this,arguments);mxSettings.setRecentColors(ColorDialog.recentColors);mxSettings.save()}}if(null!=window.StyleFormatPanel){var k=Format.prototype.init;
-Format.prototype.init=function(){k.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()};var e=DiagramFormatPanel.prototype.addView;DiagramFormatPanel.prototype.addView=function(a){a=e.apply(this,arguments);if(mxClient.IS_SVG){var b=this.editorUi,c=b.editor.graph;a.appendChild(this.createOption(mxResources.get("shadow"),
-function(){return c.shadowVisible},function(a){c.setShadowVisible(!c.shadowVisible)},{install:function(a){this.listener=function(){a(c.shadowVisible)};b.addListener("shadowVisibleChanged",this.listener)},destroy:function(){b.removeListener(this.listener)}}))}return a};var h=DiagramFormatPanel.prototype.addOptions;DiagramFormatPanel.prototype.addOptions=function(a){a=h.apply(this,arguments);var b=this.editorUi;if(b.editor.graph.isEnabled()){var c=b.getCurrentFile();null!=c&&c.isAutosaveOptional()&&
-(c=this.createOption(mxResources.get("autosave"),function(){return b.editor.autosave},function(a){b.editor.setAutosave(a)},{install:function(a){this.listener=function(){a(b.editor.autosave)};b.editor.addListener("autosaveChanged",this.listener)},destroy:function(){b.editor.removeListener(this.listener)}}),a.appendChild(c))}return a};StyleFormatPanel.prototype.defaultColorSchemes=[[null,{fill:"#f5f5f5",stroke:"#666666"},{fill:"#dae8fc",stroke:"#6c8ebf"},{fill:"#d5e8d4",stroke:"#82b366"},{fill:"#ffe6cc",
-stroke:"#d79b00"},{fill:"#fff2cc",stroke:"#d6b656"},{fill:"#f8cecc",stroke:"#b85450"},{fill:"#e1d5e7",stroke:"#9673a6"}],[null,{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"}],[null,
-{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"}]];var l=StyleFormatPanel.prototype.init;StyleFormatPanel.prototype.init=function(){"image"!=this.format.createSelectionState().style.shape&&this.container.appendChild(this.addStyles(this.createPanel()));l.apply(this,arguments)};var n=StyleFormatPanel.prototype.addStyleOps;
-StyleFormatPanel.prototype.addStyleOps=function(a){var b=mxUtils.button(mxResources.get("copyStyle"),mxUtils.bind(this,function(a){this.editorUi.actions.get("copyStyle").funct()}));b.setAttribute("title",mxResources.get("copyStyle")+" ("+this.editorUi.actions.get("copyStyle").shortcut+")");b.style.marginBottom="2px";b.style.width="100px";b.style.marginRight="2px";a.appendChild(b);b=mxUtils.button(mxResources.get("pasteStyle"),mxUtils.bind(this,function(a){this.editorUi.actions.get("pasteStyle").funct()}));
-b.setAttribute("title",mxResources.get("pasteStyle")+" ("+this.editorUi.actions.get("pasteStyle").shortcut+")");b.style.marginBottom="2px";b.style.width="100px";a.appendChild(b);mxUtils.br(a);return n.apply(this,arguments)};StyleFormatPanel.prototype.addStyles=function(a){function b(a){function b(a){var b=mxUtils.button("",function(b){d.getModel().beginUpdate();try{var c=d.getSelectionCells();for(b=0;b<c.length;b++){for(var e=d.getModel().getStyle(c[b]),l=0;l<h.length;l++)e=mxUtils.removeStylename(e,
-h[l]);null!=a?(e=mxUtils.setStyle(e,mxConstants.STYLE_FILLCOLOR,a.fill),e=mxUtils.setStyle(e,mxConstants.STYLE_STROKECOLOR,a.stroke),e=mxUtils.setStyle(e,mxConstants.STYLE_GRADIENTCOLOR,a.gradient)):(e=mxUtils.setStyle(e,mxConstants.STYLE_FILLCOLOR,"#ffffff"),e=mxUtils.setStyle(e,mxConstants.STYLE_STROKECOLOR,"#000000"),e=mxUtils.setStyle(e,mxConstants.STYLE_GRADIENTCOLOR,null));d.getModel().setStyle(c[b],e)}}finally{d.getModel().endUpdate()}});b.className="geStyleButton";b.style.width="36px";b.style.height=
-"30px";b.style.margin="0px 6px 6px 0px";null!=a?(null!=a.gradient?mxClient.IS_IE&&(mxClient.IS_QUIRKS||10>document.documentMode)?b.style.filter="progid:DXImageTransform.Microsoft.Gradient(StartColorStr='"+a.fill+"', EndColorStr='"+a.gradient+"', GradientType=0)":b.style.backgroundImage="linear-gradient("+a.fill+" 0px,"+a.gradient+" 100%)":b.style.backgroundColor=a.fill,b.style.border="1px solid "+a.stroke):(b.style.backgroundColor="#ffffff",b.style.border="1px solid #000000");e.appendChild(b)}e.innerHTML=
-"";for(var c=0;c<a.length;c++)0<c&&0==mxUtils.mod(c,4)&&mxUtils.br(e),b(a[c])}function c(a){mxEvent.addListener(a,"mouseenter",function(){a.style.opacity="1"});mxEvent.addListener(a,"mouseleave",function(){a.style.opacity="0.5"})}var d=this.editorUi.editor.graph,e=document.createElement("div");e.style.whiteSpace="normal";e.style.paddingLeft="24px";e.style.paddingRight="20px";a.style.paddingLeft="16px";a.style.paddingBottom="6px";a.style.position="relative";a.appendChild(e);var h="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".split(" ");
-null==this.editorUi.currentScheme&&(this.editorUi.currentScheme=0);var l=document.createElement("div");l.style.cssText="position:absolute;left:10px;top:8px;bottom:8px;width:20px;margin:4px;opacity:0.5;background-repeat:no-repeat;background-position:center center;background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAwAAAAQBAMAAADQT4M0AAAAIVBMVEUAAAB2dnZ4eHh3d3d1dXVxcXF2dnZ2dnZ2dnZxcXF2dnYmb3w1AAAACnRSTlMAfCTkhhvb7cQSPH2JPgAAADRJREFUCNdjwACMAmBKaiGYs2oJmLPKAZ3DabU8AMRTXpUKopislqFyVzCAuUZgikkBZjoAcMYLnp53P/UAAAAASUVORK5CYII=);";
+Editor.configure=function(a){if(null!=a){Menus.prototype.defaultFonts=a.defaultFonts||Menus.prototype.defaultFonts;ColorDialog.prototype.presetColors=a.presetColors||ColorDialog.prototype.presetColors;ColorDialog.prototype.defaultColors=a.defaultColors||ColorDialog.prototype.defaultColors;StyleFormatPanel.prototype.defaultColorSchemes=a.defaultColorSchemes||StyleFormatPanel.prototype.defaultColorSchemes;Graph.prototype.defaultEdgeLength=a.defaultEdgeLength||Graph.prototype.defaultEdgeLength;if(null!=
+a.css){var b=document.createElement("style");b.setAttribute("type","text/css");b.appendChild(document.createTextNode(a.css));var c=document.getElementsByTagName("script")[0];c.parentNode.insertBefore(b,c)}null!=a.defaultLibraries&&(Sidebar.prototype.defaultEntries=a.defaultLibraries);null!=a.defaultCustomLibraries&&(Editor.defaultCustomLibraries=a.defaultCustomLibraries);null!=a.defaultVertexStyle&&(Graph.prototype.defaultVertexStyle=a.defaultVertexStyle);null!=a.defaultEdgeStyle&&(Graph.prototype.defaultEdgeStyle=
+a.defaultEdgeStyle);a.emptyDiagramXml&&(EditorUi.prototype.emptyDiagramXml=a.emptyDiagramXml);a.thumbWidth&&(Sidebar.prototype.thumbWidth=a.thumbWidth);a.thumbHeight&&(Sidebar.prototype.thumbHeight=a.thumbHeight);a.emptyLibraryXml&&(EditorUi.prototype.emptyLibraryXml=a.emptyLibraryXml);a.sidebarWidth&&(EditorUi.prototype.hsplitPosition=a.sidebarWidth);a.fontCss&&(b=document.createElement("style"),b.setAttribute("type","text/css"),b.appendChild(document.createTextNode(a.fontCss)),c=document.getElementsByTagName("script")[0],
+c.parentNode.insertBefore(b,c),Editor.prototype.fontCss=a.fontCss);if(null!=a.plugins)for(App.initPluginCallback(),b=0;b<a.plugins.length;b++)mxscript(a.plugins[b])}};Editor.prototype.editButtonLink=null!=urlParams.edit?decodeURIComponent(urlParams.edit):null;var a=Editor.prototype.setGraphXml;Editor.prototype.setGraphXml=function(b){b=null!=b&&"mxlibrary"!=b.nodeName?this.extractGraphModel(b):null;if(null!=b){var c=b.getElementsByTagName("parsererror");if(null!=c&&0<c.length){var c=c[0],d=c.getElementsByTagName("div");
+null!=d&&0<d.length&&(c=d[0]);throw{message:mxUtils.getTextContent(c)};}if("mxGraphModel"==b.nodeName){c=b.getAttribute("style")||"default-style2";if("1"==urlParams.embed||null!=c&&""!=c)c!=this.graph.currentStyle&&(d=null!=this.graph.themes?this.graph.themes[c]:mxUtils.load(STYLE_PATH+"/"+c+".xml").getDocumentElement(),null!=d&&(e=new mxCodec(d.ownerDocument),e.decode(d,this.graph.getStylesheet())));else if(d=null!=this.graph.themes?this.graph.themes["default-old"]:mxUtils.load(STYLE_PATH+"/default-old.xml").getDocumentElement(),
+null!=d){var e=new mxCodec(d.ownerDocument);e.decode(d,this.graph.getStylesheet())}this.graph.currentStyle=c;this.graph.mathEnabled="1"==urlParams.math||"1"==b.getAttribute("math");c=b.getAttribute("backgroundImage");null!=c?(c=JSON.parse(c),this.graph.setBackgroundImage(new mxImage(c.src,c.width,c.height))):this.graph.setBackgroundImage(null);mxClient.NO_FO=this.graph.mathEnabled?!0:this.originalNoForeignObject;this.graph.setShadowVisible("1"==b.getAttribute("shadow"),!1)}a.apply(this,arguments)}else throw{message:mxResources.get("notADiagramFile")||
+"Invalid data",toString:function(){return this.message}};};var b=Editor.prototype.getGraphXml;Editor.prototype.getGraphXml=function(a){a=null!=a?a:!0;var c=b.apply(this,arguments);null!=this.graph.currentStyle&&"default-style2"!=this.graph.currentStyle&&c.setAttribute("style",this.graph.currentStyle);null!=this.graph.backgroundImage&&c.setAttribute("backgroundImage",JSON.stringify(this.graph.backgroundImage));c.setAttribute("math",this.graph.mathEnabled?"1":"0");c.setAttribute("shadow",this.graph.shadowVisible?
+"1":"0");return c};Editor.prototype.isDataSvg=function(a){try{var b=mxUtils.parseXml(a).documentElement.getAttribute("content");if(null!=b&&(null!=b&&"<"!=b.charAt(0)&&"%"!=b.charAt(0)&&(b=unescape(window.atob?atob(b):Base64.decode(cont,b))),null!=b&&"%"==b.charAt(0)&&(b=decodeURIComponent(b)),null!=b&&0<b.length)){var c=mxUtils.parseXml(b).documentElement;return"mxfile"==c.nodeName||"mxGraphModel"==c.nodeName}}catch(w){}return!1};Editor.prototype.extractGraphModel=function(a,b){if(null!=a&&"undefined"!==
+typeof pako){var c=a.ownerDocument.getElementsByTagName("div"),d=[];if(null!=c&&0<c.length)for(var e=0;e<c.length;e++)if("mxgraph"==c[e].getAttribute("class")){d.push(c[e]);break}0<d.length&&(c=d[0].getAttribute("data-mxgraph"),null!=c?(d=JSON.parse(c),null!=d&&null!=d.xml&&(d=mxUtils.parseXml(d.xml),a=d.documentElement)):(d=d[0].getElementsByTagName("div"),0<d.length&&(c=mxUtils.getTextContent(d[0]),c=this.graph.decompress(c),0<c.length&&(d=mxUtils.parseXml(c),a=d.documentElement))))}if(null!=a&&
+"svg"==a.nodeName)if(c=a.getAttribute("content"),null!=c&&"<"!=c.charAt(0)&&"%"!=c.charAt(0)&&(c=unescape(window.atob?atob(c):Base64.decode(cont,c))),null!=c&&"%"==c.charAt(0)&&(c=decodeURIComponent(c)),null!=c&&0<c.length)a=mxUtils.parseXml(c).documentElement;else throw{message:mxResources.get("notADiagramFile")};null==a||b||(d=null,"diagram"==a.nodeName?d=a:"mxfile"==a.nodeName&&(c=a.getElementsByTagName("diagram"),0<c.length&&(d=c[Math.max(0,Math.min(c.length-1,urlParams.page||0))])),null!=d&&
+(c=this.graph.decompress(mxUtils.getTextContent(d)),null!=c&&0<c.length&&(a=mxUtils.parseXml(c).documentElement)));null==a||"mxGraphModel"==a.nodeName||b&&"mxfile"==a.nodeName||(a=null);return a};var d=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?!0:this.originalNoForeignObject;d.apply(this,arguments)};Editor.prototype.originalNoForeignObject=mxClient.NO_FO;
+var c=Editor.prototype.updateGraphComponents;Editor.prototype.updateGraphComponents=function(){c.apply(this,arguments);mxClient.NO_FO=this.graph.mathEnabled&&null!=Editor.MathJaxRender?!0:this.originalNoForeignObject};Editor.initMath=function(a,b){a=null!=a?a:"https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.0/MathJax.js?config=TeX-MML-AM_HTMLorMML";Editor.mathJaxQueue=[];Editor.doMathJaxRender=function(a){MathJax.Hub.Queue(["Typeset",MathJax.Hub,a])};window.MathJax={skipStartupTypeset:!0,showMathMenu:!1,
+messageStyle:"none",AuthorInit:function(){MathJax.Hub.Config(b||{jax:["input/TeX","input/MathML","input/AsciiMath","output/HTML-CSS"],extensions:["tex2jax.js","mml2jax.js","asciimath2jax.js"],TeX:{extensions:["AMSmath.js","AMSsymbols.js","noErrors.js","noUndefined.js"]},tex2jax:{ignoreClass:"mxCellEditor"},asciimath2jax:{ignoreClass:"mxCellEditor"}});MathJax.Hub.Register.StartupHook("Begin",function(){for(var a=0;a<Editor.mathJaxQueue.length;a++)Editor.doMathJaxRender(Editor.mathJaxQueue[a])})}};
+Editor.MathJaxRender=function(a){"undefined"!==typeof MathJax&&"undefined"!==typeof MathJax.Hub?Editor.doMathJaxRender(a):Editor.mathJaxQueue.push(a)};Editor.MathJaxClear=function(){Editor.mathJaxQueue=[]};var c=Editor.prototype.init;Editor.prototype.init=function(){c.apply(this,arguments);this.graph.addListener(mxEvent.SIZE,mxUtils.bind(this,function(a,b){this.graph.mathEnabled&&Editor.MathJaxRender(this.graph.container)}))};var d=document.getElementsByTagName("script");if(null!=d&&0<d.length){var e=
+document.createElement("script");e.type="text/javascript";e.src=a;d[0].parentNode.appendChild(e)}};Editor.prototype.csvToArray=function(a){if(!/^\s*(?:'[^'\\]*(?:\\[\S\s][^'\\]*)*'|"[^"\\]*(?:\\[\S\s][^"\\]*)*"|[^,'"\s\\]*(?:\s+[^,'"\s\\]+)*)\s*(?:,\s*(?:'[^'\\]*(?:\\[\S\s][^'\\]*)*'|"[^"\\]*(?:\\[\S\s][^"\\]*)*"|[^,'"\s\\]*(?:\s+[^,'"\s\\]+)*)\s*)*$/.test(a))return null;var b=[];a.replace(/(?!\s*$)\s*(?:'([^'\\]*(?:\\[\S\s][^'\\]*)*)'|"([^"\\]*(?:\\[\S\s][^"\\]*)*)"|([^,'"\s\\]*(?:\s+[^,'"\s\\]+)*))\s*(?:,|$)/g,
+function(a,c,d,e){void 0!==c?b.push(c.replace(/\\'/g,"'")):void 0!==d?b.push(d.replace(/\\"/g,'"')):void 0!==e&&b.push(e);return""});/,\s*$/.test(a)&&b.push("");return b};if(window.ColorDialog){var f=ColorDialog.addRecentColor;ColorDialog.addRecentColor=function(a,b){f.apply(this,arguments);mxSettings.setRecentColors(ColorDialog.recentColors);mxSettings.save()};var g=ColorDialog.resetRecentColors;ColorDialog.resetRecentColors=function(){g.apply(this,arguments);mxSettings.setRecentColors(ColorDialog.recentColors);
+mxSettings.save()}}if(null!=window.StyleFormatPanel){var k=Format.prototype.init;Format.prototype.init=function(){k.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()};var e=DiagramFormatPanel.prototype.addView;DiagramFormatPanel.prototype.addView=function(a){a=e.apply(this,
+arguments);if(mxClient.IS_SVG){var b=this.editorUi,c=b.editor.graph;a.appendChild(this.createOption(mxResources.get("shadow"),function(){return c.shadowVisible},function(a){c.setShadowVisible(!c.shadowVisible)},{install:function(a){this.listener=function(){a(c.shadowVisible)};b.addListener("shadowVisibleChanged",this.listener)},destroy:function(){b.removeListener(this.listener)}}))}return a};var h=DiagramFormatPanel.prototype.addOptions;DiagramFormatPanel.prototype.addOptions=function(a){a=h.apply(this,
+arguments);var b=this.editorUi;if(b.editor.graph.isEnabled()){var c=b.getCurrentFile();null!=c&&c.isAutosaveOptional()&&(c=this.createOption(mxResources.get("autosave"),function(){return b.editor.autosave},function(a){b.editor.setAutosave(a)},{install:function(a){this.listener=function(){a(b.editor.autosave)};b.editor.addListener("autosaveChanged",this.listener)},destroy:function(){b.editor.removeListener(this.listener)}}),a.appendChild(c))}return a};StyleFormatPanel.prototype.defaultColorSchemes=
+[[null,{fill:"#f5f5f5",stroke:"#666666"},{fill:"#dae8fc",stroke:"#6c8ebf"},{fill:"#d5e8d4",stroke:"#82b366"},{fill:"#ffe6cc",stroke:"#d79b00"},{fill:"#fff2cc",stroke:"#d6b656"},{fill:"#f8cecc",stroke:"#b85450"},{fill:"#e1d5e7",stroke:"#9673a6"}],[null,{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"}],[null,{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"}]];var l=StyleFormatPanel.prototype.init;StyleFormatPanel.prototype.init=function(){"image"!=this.format.createSelectionState().style.shape&&this.container.appendChild(this.addStyles(this.createPanel()));
+l.apply(this,arguments)};var n=StyleFormatPanel.prototype.addStyleOps;StyleFormatPanel.prototype.addStyleOps=function(a){var b=mxUtils.button(mxResources.get("copyStyle"),mxUtils.bind(this,function(a){this.editorUi.actions.get("copyStyle").funct()}));b.setAttribute("title",mxResources.get("copyStyle")+" ("+this.editorUi.actions.get("copyStyle").shortcut+")");b.style.marginBottom="2px";b.style.width="100px";b.style.marginRight="2px";a.appendChild(b);b=mxUtils.button(mxResources.get("pasteStyle"),mxUtils.bind(this,
+function(a){this.editorUi.actions.get("pasteStyle").funct()}));b.setAttribute("title",mxResources.get("pasteStyle")+" ("+this.editorUi.actions.get("pasteStyle").shortcut+")");b.style.marginBottom="2px";b.style.width="100px";a.appendChild(b);mxUtils.br(a);return n.apply(this,arguments)};StyleFormatPanel.prototype.addStyles=function(a){function b(a){function b(a){var b=mxUtils.button("",function(b){d.getModel().beginUpdate();try{var c=d.getSelectionCells();for(b=0;b<c.length;b++){for(var e=d.getModel().getStyle(c[b]),
+l=0;l<h.length;l++)e=mxUtils.removeStylename(e,h[l]);null!=a?(e=mxUtils.setStyle(e,mxConstants.STYLE_FILLCOLOR,a.fill),e=mxUtils.setStyle(e,mxConstants.STYLE_STROKECOLOR,a.stroke),e=mxUtils.setStyle(e,mxConstants.STYLE_GRADIENTCOLOR,a.gradient)):(e=mxUtils.setStyle(e,mxConstants.STYLE_FILLCOLOR,"#ffffff"),e=mxUtils.setStyle(e,mxConstants.STYLE_STROKECOLOR,"#000000"),e=mxUtils.setStyle(e,mxConstants.STYLE_GRADIENTCOLOR,null));d.getModel().setStyle(c[b],e)}}finally{d.getModel().endUpdate()}});b.className=
+"geStyleButton";b.style.width="36px";b.style.height="30px";b.style.margin="0px 6px 6px 0px";null!=a?(null!=a.gradient?mxClient.IS_IE&&(mxClient.IS_QUIRKS||10>document.documentMode)?b.style.filter="progid:DXImageTransform.Microsoft.Gradient(StartColorStr='"+a.fill+"', EndColorStr='"+a.gradient+"', GradientType=0)":b.style.backgroundImage="linear-gradient("+a.fill+" 0px,"+a.gradient+" 100%)":b.style.backgroundColor=a.fill,b.style.border="1px solid "+a.stroke):(b.style.backgroundColor="#ffffff",b.style.border=
+"1px solid #000000");e.appendChild(b)}e.innerHTML="";for(var c=0;c<a.length;c++)0<c&&0==mxUtils.mod(c,4)&&mxUtils.br(e),b(a[c])}function c(a){mxEvent.addListener(a,"mouseenter",function(){a.style.opacity="1"});mxEvent.addListener(a,"mouseleave",function(){a.style.opacity="0.5"})}var d=this.editorUi.editor.graph,e=document.createElement("div");e.style.whiteSpace="normal";e.style.paddingLeft="24px";e.style.paddingRight="20px";a.style.paddingLeft="16px";a.style.paddingBottom="6px";a.style.position="relative";
+a.appendChild(e);var h="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".split(" ");null==this.editorUi.currentScheme&&(this.editorUi.currentScheme=0);var l=document.createElement("div");l.style.cssText="position:absolute;left:10px;top:8px;bottom:8px;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(l,"click",mxUtils.bind(this,function(){this.editorUi.currentScheme=mxUtils.mod(this.editorUi.currentScheme-1,this.defaultColorSchemes.length);b(this.defaultColorSchemes[this.editorUi.currentScheme])}));var f=document.createElement("div");f.style.cssText="position:absolute;left:202px;top:8px;bottom:8px;width:20px;margin:4px;opacity:0.5;background-repeat:no-repeat;background-position:center center;background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAwAAAAQBAMAAADQT4M0AAAAIVBMVEUAAAB2dnZ2dnZ2dnZ2dnZ2dnZ2dnZ2dnZ2dnZ2dnZ2dnYBuwCcAAAACnRSTlMAfCTkhhvb7cQSPH2JPgAAADZJREFUCNdjQAOMAmBKaiGY8loF5rKswsZlrVo8AUiFrTICcbIWK8A5DF1gDoMymMPApIAwHwCS0Qx/U7qCBQAAAABJRU5ErkJggg==);";
 1<this.defaultColorSchemes.length&&(a.appendChild(l),a.appendChild(f));mxEvent.addListener(f,"click",mxUtils.bind(this,function(){this.editorUi.currentScheme=mxUtils.mod(this.editorUi.currentScheme+1,this.defaultColorSchemes.length);b(this.defaultColorSchemes[this.editorUi.currentScheme])}));c(l);c(f);b(this.defaultColorSchemes[this.editorUi.currentScheme]);return a};StyleFormatPanel.prototype.addEditOps=function(a){var b=this.format.getSelectionState(),c=null;1==this.editorUi.editor.graph.getSelectionCount()&&
 (c=mxUtils.button(mxResources.get("editStyle"),mxUtils.bind(this,function(a){this.editorUi.actions.get("editStyle").funct()})),c.setAttribute("title",mxResources.get("editStyle")+" ("+this.editorUi.actions.get("editStyle").shortcut+")"),c.style.width="202px",c.style.marginBottom="2px",a.appendChild(c));var d=this.editorUi.editor.graph,e=d.view.getState(d.getSelectionCell());1==d.getSelectionCount()&&null!=e&&null!=e.shape&&null!=e.shape.stencil?(b=mxUtils.button(mxResources.get("editShape"),mxUtils.bind(this,
@@ -6202,7 +6204,7 @@ function(a){this.editorUi.actions.get("editShape").funct()})),b.setAttribute("ti
 (c.style.width="100px",b.style.width="100px",b.style.marginLeft="2px"),a.appendChild(b));return a}}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.edgeMode="move"!=urlParams.edge;var p=Graph.prototype.init;Graph.prototype.init=function(){function a(a){b=a;if(mxClient.IS_QUIRKS||
 7==document.documentMode||8==document.documentMode)b=mxUtils.clone(a)}p.apply(this,arguments);var b=null;mxEvent.addListener(this.container,"mouseenter",a);mxEvent.addListener(this.container,"mousemove",a);mxEvent.addListener(this.container,"mouseleave",function(a){b=null});this.isMouseInsertPoint=function(){return null!=b};var c=this.getInsertPoint;this.getInsertPoint=function(){return null!=b?this.getPointForEvent(b):c.apply(this,arguments)};var d=this.layoutManager.getLayout;this.layoutManager.getLayout=
 function(a){var b=this.graph.view.getState(a),b=null!=b?b.style:this.graph.getCellStyle(a);if("undefined"!=typeof mxRackContainer&&"rack"==b.childLayout){var c=new mxStackLayout(this.graph,!1);c.setChildGeometry=function(a,b){b.height=Math.max(b.height,20);if(1<b.height/20){var c=b.height%20;b.height+=10<c?20-c:-c}this.graph.getModel().setGeometry(a,b)};c.fill=!0;c.unitSize=mxRackContainer.unitSize|20;c.marginLeft=b.marginLeft||0;c.marginRight=b.marginRight||0;c.marginTop=b.marginTop||0;c.marginBottom=
-b.marginBottom||0;c.resizeParent=!1;return c}return d.apply(this,arguments)}};var t=Graph.prototype.loadStylesheet;Graph.prototype.loadStylesheet=function(){t.apply(this,arguments);this.currentStyle="default-style2"};Graph.prototype.isPageLink=function(a){return null!=a&&"data:page/"==a.substring(0,10)};Graph.prototype.addSvgShadow=function(a,b,c){c=null!=c?c:!1;var d=a.ownerDocument,e=null!=d.createElementNS?d.createElementNS(mxConstants.NS_SVG,"filter"):d.createElement("filter");e.setAttribute("id",
+b.marginBottom||0;c.resizeParent=!1;return c}return d.apply(this,arguments)}};var u=Graph.prototype.loadStylesheet;Graph.prototype.loadStylesheet=function(){u.apply(this,arguments);this.currentStyle="default-style2"};Graph.prototype.isPageLink=function(a){return null!=a&&"data:page/"==a.substring(0,10)};Graph.prototype.addSvgShadow=function(a,b,c){c=null!=c?c:!1;var d=a.ownerDocument,e=null!=d.createElementNS?d.createElementNS(mxConstants.NS_SVG,"filter"):d.createElement("filter");e.setAttribute("id",
 this.shadowId);var h=null!=d.createElementNS?d.createElementNS(mxConstants.NS_SVG,"feGaussianBlur"):d.createElement("feGaussianBlur");h.setAttribute("in","SourceAlpha");h.setAttribute("stdDeviation","1.7");h.setAttribute("result","blur");e.appendChild(h);h=null!=d.createElementNS?d.createElementNS(mxConstants.NS_SVG,"feOffset"):d.createElement("feOffset");h.setAttribute("in","blur");h.setAttribute("dx","3");h.setAttribute("dy","3");h.setAttribute("result","offsetBlur");e.appendChild(h);h=null!=d.createElementNS?
 d.createElementNS(mxConstants.NS_SVG,"feFlood"):d.createElement("feFlood");h.setAttribute("flood-color","#3D4574");h.setAttribute("flood-opacity","0.4");h.setAttribute("result","offsetColor");e.appendChild(h);h=null!=d.createElementNS?d.createElementNS(mxConstants.NS_SVG,"feComposite"):d.createElement("feComposite");h.setAttribute("in","offsetColor");h.setAttribute("in2","offsetBlur");h.setAttribute("operator","in");h.setAttribute("result","offsetBlur");e.appendChild(h);h=null!=d.createElementNS?
 d.createElementNS(mxConstants.NS_SVG,"feBlend"):d.createElement("feBlend");h.setAttribute("in","SourceGraphic");h.setAttribute("in2","offsetBlur");e.appendChild(h);h=a.getElementsByTagName("defs");0==h.length?(d=null!=d.createElementNS?d.createElementNS(mxConstants.NS_SVG,"defs"):d.createElement("defs"),null!=a.firstChild?a.insertBefore(d,a.firstChild):a.appendChild(d)):d=h[0];d.appendChild(e);c||((b||a.getElementsByTagName("g")[0]).setAttribute("filter","url(#"+this.shadowId+")"),isNaN(parseInt(a.getAttribute("width")))||
@@ -6214,40 +6216,40 @@ mxStencilRegistry.libraries.er=[SHAPES_PATH+"/er/mxER.js"];mxStencilRegistry.lib
 [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",STENCIL_PATH+"/bootstrap.xml"];mxStencilRegistry.libraries.gmdl=[SHAPES_PATH+"/mxGmdl.js",STENCIL_PATH+"/gmdl.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.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(a){var b=null;null!=a&&0<a.length&&("ER"==a.substring(0,2)?b="mxgraph.er":"sysML"==a.substring(0,5)&&(b="mxgraph.sysml"));return b};
-var u=mxMarker.createMarker;mxMarker.createMarker=function(a,b,c,d,e,h,l,f,g,n){if(null!=c&&null==mxMarker.markers[c]){var k=this.getPackageForType(c);null!=k&&mxStencilRegistry.getStencil(k)}return u.apply(this,arguments)};PrintDialog.prototype.create=function(a,b){function c(){q.value=Math.max(1,Math.min(f,Math.max(parseInt(q.value),parseInt(m.value))));m.value=Math.max(1,Math.min(f,Math.min(parseInt(q.value),parseInt(m.value))))}function d(b){function c(b,c,e){var h=b.getGraphBounds(),l=0,f=0,
-g=V.get(),n=1/b.pageScale,k=M.checked;if(k)var n=parseInt(P.value),p=parseInt(T.value),n=Math.min(g.height*p/(h.height/b.view.scale),g.width*n/(h.width/b.view.scale));else n=parseInt(w.value)/(100*b.pageScale),isNaN(n)&&(d=1/b.pageScale,w.value="100 %");g=mxRectangle.fromRectangle(g);g.width=Math.ceil(g.width*d);g.height=Math.ceil(g.height*d);n*=d;!k&&b.pageVisible?(h=b.getPageLayout(),l-=h.x*g.width,f-=h.y*g.height):k=!0;if(null==c){c=PrintDialog.createPrintPreview(b,n,g,0,l,f,k);c.pageSelector=
-!1;c.mathEnabled=!1;b=a.getCurrentFile();null!=b&&(c.title=b.getTitle());var m=c.writeHead;c.writeHead=function(b){m.apply(this,arguments);null!=a.editor.fontCss&&(b.writeln('<style type="text/css">'),b.writeln(a.editor.fontCss),b.writeln("</style>"))};if("undefined"!==typeof MathJax){var x=c.renderPage;c.renderPage=function(a,b,c,d,e,h){var l=x.apply(this,arguments);this.graph.mathEnabled?this.mathEnabled=!0:l.className="geDisableMathJax";return l}}c.open(null,null,e,!0)}else{g=b.background;if(null==
-g||""==g||g==mxConstants.NONE)g="#ffffff";c.backgroundColor=g;c.autoOrigin=k;c.appendGraph(b,n,l,f,e,!0)}return c}var d=parseInt(U.value)/100;isNaN(d)&&(d=1,U.value="100 %");var d=.75*d,h=m.value,l=q.value,f=!k.checked,n=null;f&&(f=h==g&&l==g);if(!f&&null!=a.pages&&a.pages.length){var p=0,f=a.pages.length-1;k.checked||(p=parseInt(h)-1,f=parseInt(l)-1);for(var x=p;x<=f;x++){var v=a.pages[x],h=v==a.currentPage?e:null;if(null==h){var h=a.createTemporaryGraph(e.getStylesheet()),l=!0,p=!1,u=null,t=null;
-null==v.viewState&&null==v.mapping&&null==v.root&&a.updatePageRoot(v);null!=v.viewState?(l=v.viewState.pageVisible,p=v.viewState.mathEnabled,u=v.viewState.background,t=v.viewState.backgroundImage):null!=v.mapping&&null!=v.mapping.diagramMap&&(p="0"!=v.mapping.diagramMap.get("mathEnabled"),u=v.mapping.diagramMap.get("background"),t=v.mapping.diagramMap.get("backgroundImage"),t=null!=t&&0<t.length?JSON.parse(t):null);h.background=u;h.backgroundImage=null!=t?new mxImage(t.src,t.width,t.height):null;
-h.pageVisible=l;h.mathEnabled=p;var y=h.getGlobalVariable;h.getGlobalVariable=function(a){return"page"==a?v.getName():"pagenumber"==a?x+1:y.apply(this,arguments)};document.body.appendChild(h.container);a.updatePageRoot(v);h.model.setRoot(v.root)}n=c(h,n,x!=f);h!=e&&h.container.parentNode.removeChild(h.container)}}else n=c(e);n.mathEnabled&&(f=n.wnd.document,f.writeln('<script type="text/x-mathjax-config">'),f.writeln("MathJax.Hub.Config({"),f.writeln('messageStyle: "none",'),f.writeln('jax: ["input/TeX", "input/MathML", "input/AsciiMath", "output/HTML-CSS"],'),
+var t=mxMarker.createMarker;mxMarker.createMarker=function(a,b,c,d,e,h,l,f,g,n){if(null!=c&&null==mxMarker.markers[c]){var k=this.getPackageForType(c);null!=k&&mxStencilRegistry.getStencil(k)}return t.apply(this,arguments)};PrintDialog.prototype.create=function(a,b){function c(){q.value=Math.max(1,Math.min(f,Math.max(parseInt(q.value),parseInt(m.value))));m.value=Math.max(1,Math.min(f,Math.min(parseInt(q.value),parseInt(m.value))))}function d(b){function c(b,c,e){var h=b.getGraphBounds(),l=0,f=0,
+g=V.get(),n=1/b.pageScale,k=M.checked;if(k)var n=parseInt(P.value),p=parseInt(T.value),n=Math.min(g.height*p/(h.height/b.view.scale),g.width*n/(h.width/b.view.scale));else n=parseInt(x.value)/(100*b.pageScale),isNaN(n)&&(d=1/b.pageScale,x.value="100 %");g=mxRectangle.fromRectangle(g);g.width=Math.ceil(g.width*d);g.height=Math.ceil(g.height*d);n*=d;!k&&b.pageVisible?(h=b.getPageLayout(),l-=h.x*g.width,f-=h.y*g.height):k=!0;if(null==c){c=PrintDialog.createPrintPreview(b,n,g,0,l,f,k);c.pageSelector=
+!1;c.mathEnabled=!1;b=a.getCurrentFile();null!=b&&(c.title=b.getTitle());var m=c.writeHead;c.writeHead=function(b){m.apply(this,arguments);null!=a.editor.fontCss&&(b.writeln('<style type="text/css">'),b.writeln(a.editor.fontCss),b.writeln("</style>"))};if("undefined"!==typeof MathJax){var w=c.renderPage;c.renderPage=function(a,b,c,d,e,h){var l=w.apply(this,arguments);this.graph.mathEnabled?this.mathEnabled=!0:l.className="geDisableMathJax";return l}}c.open(null,null,e,!0)}else{g=b.background;if(null==
+g||""==g||g==mxConstants.NONE)g="#ffffff";c.backgroundColor=g;c.autoOrigin=k;c.appendGraph(b,n,l,f,e,!0)}return c}var d=parseInt(U.value)/100;isNaN(d)&&(d=1,U.value="100 %");var d=.75*d,h=m.value,l=q.value,f=!k.checked,n=null;f&&(f=h==g&&l==g);if(!f&&null!=a.pages&&a.pages.length){var p=0,f=a.pages.length-1;k.checked||(p=parseInt(h)-1,f=parseInt(l)-1);for(var w=p;w<=f;w++){var v=a.pages[w],h=v==a.currentPage?e:null;if(null==h){var h=a.createTemporaryGraph(e.getStylesheet()),l=!0,p=!1,t=null,u=null;
+null==v.viewState&&null==v.mapping&&null==v.root&&a.updatePageRoot(v);null!=v.viewState?(l=v.viewState.pageVisible,p=v.viewState.mathEnabled,t=v.viewState.background,u=v.viewState.backgroundImage):null!=v.mapping&&null!=v.mapping.diagramMap&&(p="0"!=v.mapping.diagramMap.get("mathEnabled"),t=v.mapping.diagramMap.get("background"),u=v.mapping.diagramMap.get("backgroundImage"),u=null!=u&&0<u.length?JSON.parse(u):null);h.background=t;h.backgroundImage=null!=u?new mxImage(u.src,u.width,u.height):null;
+h.pageVisible=l;h.mathEnabled=p;var D=h.getGlobalVariable;h.getGlobalVariable=function(a){return"page"==a?v.getName():"pagenumber"==a?w+1:D.apply(this,arguments)};document.body.appendChild(h.container);a.updatePageRoot(v);h.model.setRoot(v.root)}n=c(h,n,w!=f);h!=e&&h.container.parentNode.removeChild(h.container)}}else n=c(e);n.mathEnabled&&(f=n.wnd.document,f.writeln('<script type="text/x-mathjax-config">'),f.writeln("MathJax.Hub.Config({"),f.writeln('messageStyle: "none",'),f.writeln('jax: ["input/TeX", "input/MathML", "input/AsciiMath", "output/HTML-CSS"],'),
 f.writeln('extensions: ["tex2jax.js", "mml2jax.js", "asciimath2jax.js"],'),f.writeln("TeX: {"),f.writeln('extensions: ["AMSmath.js", "AMSsymbols.js", "noErrors.js", "noUndefined.js"]'),f.writeln("},"),f.writeln("tex2jax: {"),f.writeln('\tignoreClass: "geDisableMathJax"'),f.writeln("},"),f.writeln("asciimath2jax: {"),f.writeln('\tignoreClass: "geDisableMathJax"'),f.writeln("}"),f.writeln("});"),b&&(f.writeln("MathJax.Hub.Queue(function () {"),f.writeln("window.print();"),f.writeln("});")),f.writeln("\x3c/script>"),
 f.writeln('<script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.0/MathJax.js">\x3c/script>'));n.closeDocument();!n.mathEnabled&&b&&PrintDialog.printPreview(n)}var e=a.editor.graph,h=document.createElement("div"),l=document.createElement("h3");l.style.width="100%";l.style.textAlign="center";l.style.marginTop="0px";mxUtils.write(l,b||mxResources.get("print"));h.appendChild(l);var f=1,g=1,n=document.createElement("div");n.style.cssText="border-bottom:1px solid lightGray;padding-bottom:12px;margin-bottom:12px;";
 var k=document.createElement("input");k.style.cssText="margin-right:8px;margin-bottom:8px;";k.setAttribute("value","all");k.setAttribute("type","radio");k.setAttribute("name","pages-printdialog");n.appendChild(k);l=document.createElement("span");mxUtils.write(l,mxResources.get("printAllPages"));n.appendChild(l);mxUtils.br(n);var p=k.cloneNode(!0);k.setAttribute("checked","checked");p.setAttribute("value","range");n.appendChild(p);l=document.createElement("span");mxUtils.write(l,mxResources.get("pages")+
 ":");n.appendChild(l);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";n.appendChild(m);l=document.createElement("span");mxUtils.write(l,mxResources.get("to"));n.appendChild(l);var q=m.cloneNode(!0);n.appendChild(q);mxEvent.addListener(m,"focus",function(){p.checked=!0});mxEvent.addListener(q,"focus",function(){p.checked=!0});mxEvent.addListener(m,"change",c);mxEvent.addListener(q,
-"change",c);if(null!=a.pages&&(f=a.pages.length,null!=a.currentPage))for(l=0;l<a.pages.length;l++)if(a.currentPage==a.pages[l]){g=l+1;m.value=g;q.value=g;break}m.setAttribute("max",f);q.setAttribute("max",f);1<f&&h.appendChild(n);var u=document.createElement("div");u.style.marginBottom="10px";var t=document.createElement("input");t.style.marginRight="8px";t.setAttribute("value","adjust");t.setAttribute("type","radio");t.setAttribute("name","printZoom");u.appendChild(t);l=document.createElement("span");
-mxUtils.write(l,mxResources.get("adjustTo"));u.appendChild(l);var w=document.createElement("input");w.style.cssText="margin:0 8px 0 8px;";w.setAttribute("value","100 %");w.style.width="50px";u.appendChild(w);mxEvent.addListener(w,"focus",function(){t.checked=!0});h.appendChild(u);var n=n.cloneNode(!1),M=t.cloneNode(!0);M.setAttribute("value","fit");t.setAttribute("checked","checked");l=document.createElement("div");l.style.cssText="display:inline-block;height:100%;vertical-align:top;padding-top:2px;";
-l.appendChild(M);n.appendChild(l);u=document.createElement("table");u.style.display="inline-block";var R=document.createElement("tbody"),K=document.createElement("tr"),O=K.cloneNode(!0),S=document.createElement("td"),J=S.cloneNode(!0),X=S.cloneNode(!0),Q=S.cloneNode(!0),Y=S.cloneNode(!0),W=S.cloneNode(!0);S.style.textAlign="right";Q.style.textAlign="right";mxUtils.write(S,mxResources.get("fitTo"));var P=document.createElement("input");P.style.cssText="margin:0 8px 0 8px;";P.setAttribute("value","1");
+"change",c);if(null!=a.pages&&(f=a.pages.length,null!=a.currentPage))for(l=0;l<a.pages.length;l++)if(a.currentPage==a.pages[l]){g=l+1;m.value=g;q.value=g;break}m.setAttribute("max",f);q.setAttribute("max",f);1<f&&h.appendChild(n);var t=document.createElement("div");t.style.marginBottom="10px";var u=document.createElement("input");u.style.marginRight="8px";u.setAttribute("value","adjust");u.setAttribute("type","radio");u.setAttribute("name","printZoom");t.appendChild(u);l=document.createElement("span");
+mxUtils.write(l,mxResources.get("adjustTo"));t.appendChild(l);var x=document.createElement("input");x.style.cssText="margin:0 8px 0 8px;";x.setAttribute("value","100 %");x.style.width="50px";t.appendChild(x);mxEvent.addListener(x,"focus",function(){u.checked=!0});h.appendChild(t);var n=n.cloneNode(!1),M=u.cloneNode(!0);M.setAttribute("value","fit");u.setAttribute("checked","checked");l=document.createElement("div");l.style.cssText="display:inline-block;height:100%;vertical-align:top;padding-top:2px;";
+l.appendChild(M);n.appendChild(l);t=document.createElement("table");t.style.display="inline-block";var R=document.createElement("tbody"),K=document.createElement("tr"),O=K.cloneNode(!0),S=document.createElement("td"),J=S.cloneNode(!0),X=S.cloneNode(!0),Q=S.cloneNode(!0),Y=S.cloneNode(!0),W=S.cloneNode(!0);S.style.textAlign="right";Q.style.textAlign="right";mxUtils.write(S,mxResources.get("fitTo"));var P=document.createElement("input");P.style.cssText="margin:0 8px 0 8px;";P.setAttribute("value","1");
 P.setAttribute("min","1");P.setAttribute("type","number");P.style.width="40px";J.appendChild(P);l=document.createElement("span");mxUtils.write(l,mxResources.get("fitToSheetsAcross"));X.appendChild(l);mxUtils.write(Q,mxResources.get("fitToBy"));var T=P.cloneNode(!0);Y.appendChild(T);mxEvent.addListener(P,"focus",function(){M.checked=!0});mxEvent.addListener(T,"focus",function(){M.checked=!0});l=document.createElement("span");mxUtils.write(l,mxResources.get("fitToSheetsDown"));W.appendChild(l);K.appendChild(S);
-K.appendChild(J);K.appendChild(X);O.appendChild(Q);O.appendChild(Y);O.appendChild(W);R.appendChild(K);R.appendChild(O);u.appendChild(R);n.appendChild(u);h.appendChild(n);n=document.createElement("div");l=document.createElement("div");l.style.fontWeight="bold";l.style.marginBottom="12px";mxUtils.write(l,mxResources.get("paperSize"));n.appendChild(l);l=document.createElement("div");l.style.marginBottom="12px";var V=PageSetupDialog.addPageFormatPanel(l,"printdialog",a.editor.graph.pageFormat||mxConstants.PAGE_FORMAT_A4_PORTRAIT);
+K.appendChild(J);K.appendChild(X);O.appendChild(Q);O.appendChild(Y);O.appendChild(W);R.appendChild(K);R.appendChild(O);t.appendChild(R);n.appendChild(t);h.appendChild(n);n=document.createElement("div");l=document.createElement("div");l.style.fontWeight="bold";l.style.marginBottom="12px";mxUtils.write(l,mxResources.get("paperSize"));n.appendChild(l);l=document.createElement("div");l.style.marginBottom="12px";var V=PageSetupDialog.addPageFormatPanel(l,"printdialog",a.editor.graph.pageFormat||mxConstants.PAGE_FORMAT_A4_PORTRAIT);
 n.appendChild(l);l=document.createElement("span");mxUtils.write(l,mxResources.get("pageScale"));n.appendChild(l);var U=document.createElement("input");U.style.cssText="margin:0 8px 0 8px;";U.setAttribute("value","100 %");U.style.width="60px";n.appendChild(U);h.appendChild(n);l=document.createElement("div");l.style.cssText="text-align:right;margin:62px 0 0 0;";n=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog()});n.className="geBtn";a.editor.cancelFirst&&l.appendChild(n);a.isOffline()||
-(u=mxUtils.button(mxResources.get("help"),function(){window.open("https://desk.draw.io/support/solutions/articles/16000048947")}),u.className="geBtn",l.appendChild(u));PrintDialog.previewEnabled&&(u=mxUtils.button(mxResources.get("preview"),function(){a.hideDialog();d(!1)}),u.className="geBtn",l.appendChild(u));u=mxUtils.button(mxResources.get(PrintDialog.previewEnabled?"print":"ok"),function(){a.hideDialog();d(!0)});u.className="geBtn gePrimaryBtn";l.appendChild(u);a.editor.cancelFirst||l.appendChild(n);
-h.appendChild(l);this.container=h}})();(function(){EditorUi.VERSION="7.5.4";EditorUi.compactUi="atlas"!=uiTheme;EditorUi.enableLogging=/.*\.draw\.io$/.test(window.location.hostname);EditorUi.enablePlantUml=EditorUi.enableLogging;EditorUi.isElectronApp=null!=window&&null!=window.process&&null!=window.process.versions&&null!=window.process.versions.electron;EditorUi.prototype.emptyDiagramXml='<mxGraphModel><root><mxCell id="0"/><mxCell id="1" parent="0"/></root></mxGraphModel>';EditorUi.prototype.emptyLibraryXml="<mxlibrary>[]</mxlibrary>";
+(t=mxUtils.button(mxResources.get("help"),function(){window.open("https://desk.draw.io/support/solutions/articles/16000048947")}),t.className="geBtn",l.appendChild(t));PrintDialog.previewEnabled&&(t=mxUtils.button(mxResources.get("preview"),function(){a.hideDialog();d(!1)}),t.className="geBtn",l.appendChild(t));t=mxUtils.button(mxResources.get(PrintDialog.previewEnabled?"print":"ok"),function(){a.hideDialog();d(!0)});t.className="geBtn gePrimaryBtn";l.appendChild(t);a.editor.cancelFirst||l.appendChild(n);
+h.appendChild(l);this.container=h}})();(function(){EditorUi.VERSION="7.5.5";EditorUi.compactUi="atlas"!=uiTheme;EditorUi.enableLogging=/.*\.draw\.io$/.test(window.location.hostname);EditorUi.enablePlantUml=EditorUi.enableLogging;EditorUi.isElectronApp=null!=window&&null!=window.process&&null!=window.process.versions&&null!=window.process.versions.electron;EditorUi.prototype.emptyDiagramXml='<mxGraphModel><root><mxCell id="0"/><mxCell id="1" parent="0"/></root></mxGraphModel>';EditorUi.prototype.emptyLibraryXml="<mxlibrary>[]</mxlibrary>";
 EditorUi.prototype.mode=null;EditorUi.prototype.sidebarFooterHeight=36;EditorUi.prototype.defaultCustomShapeStyle="shape=stencil(tZRtTsQgEEBPw1+DJR7AoN6DbWftpAgE0Ortd/jYRGq72R+YNE2YgTePloEJGWblgA18ZuKFDcMj5/Sm8boZq+BgjCX4pTyqk6ZlKROitwusOMXKQDODx5iy4pXxZ5qTHiFHawxB0JrQZH7lCabQ0Fr+XWC1/E8zcsT/gAi+Subo2/3Mh6d/oJb5nU1b5tW7r2knautaa3T+U32o7f7vZwpJkaNDLORJjcu7t59m2jXxqX9un+tt022acsfmoKaQZ+vhhswZtS6Ne/ThQGt0IV0N3Yyv6P3CeT9/tHO0XFI5cAE=);whiteSpace=wrap;html=1;";EditorUi.prototype.maxBackgroundSize=1600;
 EditorUi.prototype.maxImageSize=520;EditorUi.prototype.resampleThreshold=1E5;EditorUi.prototype.maxImageBytes=1E6;EditorUi.prototype.maxBackgroundBytes=25E5;EditorUi.prototype.currentFile=null;EditorUi.prototype.printPdfExport=!1;EditorUi.prototype.pdfPageExport=!0;EditorUi.prototype.formatEnabled="0"!=urlParams.format;(function(){EditorUi.prototype.useCanvasForExport=!1;EditorUi.prototype.jpgSupported=!1;try{var a=document.createElement("canvas"),b=new Image;b.onload=function(){try{a.getContext("2d").drawImage(b,
 0,0);var c=a.toDataURL("image/png");EditorUi.prototype.useCanvasForExport=null!=c&&6<c.length}catch(p){}};b.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(n){}try{a=document.createElement("canvas");a.width=a.height=1;var c=
-a.toDataURL("image/jpeg");EditorUi.prototype.jpgSupported=null!==c.match("image/jpeg")}catch(n){}})();EditorUi.prototype.getLocalData=function(a,b){b(localStorage.getItem(a))};EditorUi.prototype.setLocalData=function(a,b,c){localStorage.setItem(a,b);c()};EditorUi.prototype.removeLocalData=function(a,b){localStorage.removeItem(a);b()};EditorUi.prototype.setMathEnabled=function(a){this.editor.graph.mathEnabled=a;this.editor.updateGraphComponents();this.editor.graph.refresh();this.fireEvent(new mxEventObject("mathEnabledChanged"))};
-EditorUi.prototype.isMathEnabled=function(a){return this.editor.graph.mathEnabled};EditorUi.prototype.movePickersToTop=function(){for(var a=document.getElementsByTagName("div"),b=0;b<a.length;b++)"picker modal-dialog picker-dialog"==a[b].className&&(a[b].style.zIndex=mxPopupMenu.prototype.zIndex+1)};EditorUi.prototype.isOfflineApp=function(){return"1"==urlParams.offline};EditorUi.prototype.isOffline=function(){return this.isOfflineApp()||!navigator.onLine||"1"==urlParams.stealth};EditorUi.prototype.createSpinner=
-function(a,b,c){c=null!=c?c:24;var d=new Spinner({lines:12,length:c,width:Math.round(c/3),radius:Math.round(c/2),rotate:0,color:"#000",speed:1.5,trail:60,shadow:!1,hwaccel:!1,zIndex:2E9}),e=d.spin;d.spin=function(c,h){var l=!1;this.active||(e.call(this,c),this.active=!0,null!=h&&(l=document.createElement("div"),l.style.position="absolute",l.style.whiteSpace="nowrap",l.style.background="#4B4243",l.style.color="white",l.style.fontFamily="Helvetica, Arial",l.style.fontSize="9pt",l.style.padding="6px",
-l.style.paddingLeft="10px",l.style.paddingRight="10px",l.style.zIndex=2E9,l.style.left=Math.max(0,a)+"px",l.style.top=Math.max(0,b+70)+"px",mxUtils.setPrefixedStyle(l.style,"borderRadius","6px"),mxUtils.setPrefixedStyle(l.style,"boxShadow","2px 2px 3px 0px #ddd"),mxUtils.setPrefixedStyle(l.style,"transform","translate(-50%,-50%)"),l.innerHTML=h+"...",c.appendChild(l),d.status=l,mxClient.IS_VML&&(null==document.documentMode||8>=document.documentMode)&&(l.style.left=Math.round(Math.max(0,a-l.offsetWidth/
-2))+"px",l.style.top=Math.round(Math.max(0,b+70-l.offsetHeight/2))+"px")),this.pause=mxUtils.bind(this,function(){var a=function(){};this.active&&(a=mxUtils.bind(this,function(){this.spin(c,h)}));this.stop();return a}),l=!0);return l};var h=d.stop;d.stop=function(){h.call(this);this.active=!1;null!=d.status&&(d.status.parentNode.removeChild(d.status),d.status=null)};d.pause=function(){return function(){}};return d};EditorUi.parsePng=function(a,b,c){function d(a,b){var c=h;h+=b;return a.substring(c,
-h)}function e(a){a=d(a,4);return a.charCodeAt(3)+(a.charCodeAt(2)<<8)+(a.charCodeAt(1)<<16)+(a.charCodeAt(0)<<24)}var h=0;if(d(a,8)!=String.fromCharCode(137)+"PNG"+String.fromCharCode(13,10,26,10))null!=c&&c();else if(d(a,4),"IHDR"!=d(a,4))null!=c&&c();else{d(a,17);do{c=e(a);var l=d(a,4);if(null!=b&&b(h-8,l,c))break;value=d(a,c);d(a,4);if("IEND"==l)break}while(c)}};EditorUi.prototype.isCompatibleString=function(a){try{var b=mxUtils.parseXml(a),c=this.editor.extractGraphModel(b.documentElement,!0);
-return null!=c&&0==c.getElementsByTagName("parsererror").length}catch(n){}return!1};var a=EditorUi.prototype.extractGraphModelFromHtml;EditorUi.prototype.extractGraphModelFromHtml=function(b){var c=a.apply(this,arguments);if(null==c)try{var d=b.indexOf("&lt;mxfile ");if(0<=d){var e=b.lastIndexOf("&lt;/mxfile&gt;");e>d&&(c=b.substring(d,e+15).replace(/&gt;/g,">").replace(/&lt;/g,"<").replace(/\\&quot;/g,'"').replace(/\n/g,""))}else var f=mxUtils.parseXml(b),g=this.editor.extractGraphModel(f.documentElement,
-null!=this.pages),c=null!=g?mxUtils.getXml(g):""}catch(u){}return c};EditorUi.prototype.validateFileData=function(a){if(null!=a&&0<a.length){var b=a.indexOf('<meta charset="utf-8">');0<=b&&(a=a.slice(0,b)+'<meta charset="utf-8"/>'+a.slice(b+23-1,a.length))}return a};EditorUi.prototype.replaceFileData=function(a){a=this.validateFileData(a);a=null!=a&&0<a.length?mxUtils.parseXml(a).documentElement:null;var b=null!=a?this.editor.extractGraphModel(a,!0):null;null!=b&&(a=b);if(null!=a){b=this.editor.graph;
+a.toDataURL("image/jpeg");EditorUi.prototype.jpgSupported=null!==c.match("image/jpeg")}catch(n){}})();EditorUi.prototype.showSplash=function(a){};EditorUi.prototype.getLocalData=function(a,b){b(localStorage.getItem(a))};EditorUi.prototype.setLocalData=function(a,b,c){localStorage.setItem(a,b);c()};EditorUi.prototype.removeLocalData=function(a,b){localStorage.removeItem(a);b()};EditorUi.prototype.setMathEnabled=function(a){this.editor.graph.mathEnabled=a;this.editor.updateGraphComponents();this.editor.graph.refresh();
+this.fireEvent(new mxEventObject("mathEnabledChanged"))};EditorUi.prototype.isMathEnabled=function(a){return this.editor.graph.mathEnabled};EditorUi.prototype.movePickersToTop=function(){for(var a=document.getElementsByTagName("div"),b=0;b<a.length;b++)"picker modal-dialog picker-dialog"==a[b].className&&(a[b].style.zIndex=mxPopupMenu.prototype.zIndex+1)};EditorUi.prototype.isOfflineApp=function(){return"1"==urlParams.offline};EditorUi.prototype.isOffline=function(){return this.isOfflineApp()||!navigator.onLine||
+"1"==urlParams.stealth};EditorUi.prototype.createSpinner=function(a,b,c){c=null!=c?c:24;var d=new Spinner({lines:12,length:c,width:Math.round(c/3),radius:Math.round(c/2),rotate:0,color:"#000",speed:1.5,trail:60,shadow:!1,hwaccel:!1,zIndex:2E9}),e=d.spin;d.spin=function(c,h){var l=!1;this.active||(e.call(this,c),this.active=!0,null!=h&&(l=document.createElement("div"),l.style.position="absolute",l.style.whiteSpace="nowrap",l.style.background="#4B4243",l.style.color="white",l.style.fontFamily="Helvetica, Arial",
+l.style.fontSize="9pt",l.style.padding="6px",l.style.paddingLeft="10px",l.style.paddingRight="10px",l.style.zIndex=2E9,l.style.left=Math.max(0,a)+"px",l.style.top=Math.max(0,b+70)+"px",mxUtils.setPrefixedStyle(l.style,"borderRadius","6px"),mxUtils.setPrefixedStyle(l.style,"boxShadow","2px 2px 3px 0px #ddd"),mxUtils.setPrefixedStyle(l.style,"transform","translate(-50%,-50%)"),l.innerHTML=h+"...",c.appendChild(l),d.status=l,mxClient.IS_VML&&(null==document.documentMode||8>=document.documentMode)&&(l.style.left=
+Math.round(Math.max(0,a-l.offsetWidth/2))+"px",l.style.top=Math.round(Math.max(0,b+70-l.offsetHeight/2))+"px")),this.pause=mxUtils.bind(this,function(){var a=function(){};this.active&&(a=mxUtils.bind(this,function(){this.spin(c,h)}));this.stop();return a}),l=!0);return l};var h=d.stop;d.stop=function(){h.call(this);this.active=!1;null!=d.status&&(d.status.parentNode.removeChild(d.status),d.status=null)};d.pause=function(){return function(){}};return d};EditorUi.parsePng=function(a,b,c){function d(a,
+b){var c=h;h+=b;return a.substring(c,h)}function e(a){a=d(a,4);return a.charCodeAt(3)+(a.charCodeAt(2)<<8)+(a.charCodeAt(1)<<16)+(a.charCodeAt(0)<<24)}var h=0;if(d(a,8)!=String.fromCharCode(137)+"PNG"+String.fromCharCode(13,10,26,10))null!=c&&c();else if(d(a,4),"IHDR"!=d(a,4))null!=c&&c();else{d(a,17);do{c=e(a);var l=d(a,4);if(null!=b&&b(h-8,l,c))break;value=d(a,c);d(a,4);if("IEND"==l)break}while(c)}};EditorUi.prototype.isCompatibleString=function(a){try{var b=mxUtils.parseXml(a),c=this.editor.extractGraphModel(b.documentElement,
+!0);return null!=c&&0==c.getElementsByTagName("parsererror").length}catch(n){}return!1};var a=EditorUi.prototype.extractGraphModelFromHtml;EditorUi.prototype.extractGraphModelFromHtml=function(b){var c=a.apply(this,arguments);if(null==c)try{var d=b.indexOf("&lt;mxfile ");if(0<=d){var e=b.lastIndexOf("&lt;/mxfile&gt;");e>d&&(c=b.substring(d,e+15).replace(/&gt;/g,">").replace(/&lt;/g,"<").replace(/\\&quot;/g,'"').replace(/\n/g,""))}else var f=mxUtils.parseXml(b),g=this.editor.extractGraphModel(f.documentElement,
+null!=this.pages),c=null!=g?mxUtils.getXml(g):""}catch(t){}return c};EditorUi.prototype.validateFileData=function(a){if(null!=a&&0<a.length){var b=a.indexOf('<meta charset="utf-8">');0<=b&&(a=a.slice(0,b)+'<meta charset="utf-8"/>'+a.slice(b+23-1,a.length))}return a};EditorUi.prototype.replaceFileData=function(a){a=this.validateFileData(a);a=null!=a&&0<a.length?mxUtils.parseXml(a).documentElement:null;var b=null!=a?this.editor.extractGraphModel(a,!0):null;null!=b&&(a=b);if(null!=a){b=this.editor.graph;
 b.model.beginUpdate();try{var c=null!=this.pages?this.pages.slice():null,d=a.getElementsByTagName("diagram");if("0"!=urlParams.pages||1<d.length||1==d.length&&d[0].hasAttribute("name")){this.fileNode=a;this.pages=null!=this.pages?this.pages:[];for(var e=d.length-1;0<=e;e--){var f=this.updatePageRoot(new DiagramPage(d[e]));null==f.getName()&&f.setName(mxResources.get("pageWithNumber",[e+1]));b.model.execute(new ChangePage(this,f,0==e?f:null,0))}}else"0"!=urlParams.pages&&null==this.fileNode&&(this.fileNode=
 a.ownerDocument.createElement("mxfile"),this.currentPage=new DiagramPage(a.ownerDocument.createElement("diagram")),this.currentPage.setName(mxResources.get("pageWithNumber",[1])),b.model.execute(new ChangePage(this,this.currentPage,this.currentPage,0))),this.editor.setGraphXml(a),null!=this.currentPage&&(this.currentPage.root=this.editor.graph.model.root);if(null!=c)for(e=0;e<c.length;e++)b.model.execute(new ChangePage(this,c[e],null))}finally{b.model.endUpdate()}}};EditorUi.prototype.createFileData=
-function(a,b,c,d,f,g,k,m,w,y){b=null!=b?b:this.editor.graph;f=null!=f?f:!1;w=null!=w?w:!0;var e,h=null;null==c||c.getMode()==App.MODE_DEVICE||c.getMode()==App.MODE_BROWSER?e="_blank":h=e=d;if(null==a)return"";var l=a;if("mxfile"!=l.nodeName.toLowerCase()){var n=b.zapGremlins(mxUtils.getXml(a)),l=b.compress(n);if(b.decompress(l)!=n)return n;n=a.ownerDocument.createElement("diagram");mxUtils.setTextContent(n,l);l=a.ownerDocument.createElement("mxfile");l.appendChild(n)}y?(l=l.cloneNode(!0),l.removeAttribute("userAgent"),
+function(a,b,c,d,f,g,k,m,x,y){b=null!=b?b:this.editor.graph;f=null!=f?f:!1;x=null!=x?x:!0;var e,h=null;null==c||c.getMode()==App.MODE_DEVICE||c.getMode()==App.MODE_BROWSER?e="_blank":h=e=d;if(null==a)return"";var l=a;if("mxfile"!=l.nodeName.toLowerCase()){var n=b.zapGremlins(mxUtils.getXml(a)),l=b.compress(n);if(b.decompress(l)!=n)return n;n=a.ownerDocument.createElement("diagram");mxUtils.setTextContent(n,l);l=a.ownerDocument.createElement("mxfile");l.appendChild(n)}y?(l=l.cloneNode(!0),l.removeAttribute("userAgent"),
 l.removeAttribute("version"),l.removeAttribute("editor"),l.removeAttribute("type")):(l.setAttribute("userAgent",navigator.userAgent),l.setAttribute("version",EditorUi.VERSION),l.setAttribute("editor","www.draw.io"),a=null!=c?c.getMode():this.mode,null!=a&&l.setAttribute("type",a));a=mxUtils.getXml(l);if(!g&&!f&&(k||null!=c&&/(\.html)$/i.test(c.getTitle())))a=this.getHtml2(mxUtils.getXml(l),b,null!=c?c.getTitle():null,e,h);else if(g||!f&&null!=c&&/(\.svg)$/i.test(c.getTitle()))null==c||c.getMode()!=
-App.MODE_DEVICE&&c.getMode()!=App.MODE_BROWSER||(d=null),a=this.getEmbeddedSvg(a,b,d,null,m,w,h);return a};EditorUi.prototype.getXmlFileData=function(a,b){a=null!=a?a:!0;b=null!=b?b:!1;var c=this.editor.getGraphXml(a);if(a&&null!=this.fileNode&&null!=this.currentPage){var d=this.editor.graph.compress(this.editor.graph.zapGremlins(mxUtils.getXml(c)));mxUtils.setTextContent(this.currentPage.node,d);c=this.fileNode.cloneNode(!1);if(b)c.appendChild(this.currentPage.node);else for(var e=0;e<this.pages.length;e++){var h=
+App.MODE_DEVICE&&c.getMode()!=App.MODE_BROWSER||(d=null),a=this.getEmbeddedSvg(a,b,d,null,m,x,h);return a};EditorUi.prototype.getXmlFileData=function(a,b){a=null!=a?a:!0;b=null!=b?b:!1;var c=this.editor.getGraphXml(a);if(a&&null!=this.fileNode&&null!=this.currentPage){var d=this.editor.graph.compress(this.editor.graph.zapGremlins(mxUtils.getXml(c)));mxUtils.setTextContent(this.currentPage.node,d);c=this.fileNode.cloneNode(!1);if(b)c.appendChild(this.currentPage.node);else for(var e=0;e<this.pages.length;e++){var h=
 this.pages[e].mapping;this.currentPage!=this.pages[e]&&null!=h&&h.needsUpdate&&(d=(new mxCodec(mxUtils.createXmlDocument())).encode(h.graphModel),h.writeRealtimeToNode(d),d=this.editor.graph.compress(this.editor.graph.zapGremlins(mxUtils.getXml(d))),mxUtils.setTextContent(this.pages[e].node,d),h.needsUpdate=!1);c.appendChild(this.pages[e].node)}}return c};EditorUi.prototype.getFileData=function(a,b,c,d,f,g,k,m){f=null!=f?f:!0;k=null!=k?k:this.getXmlFileData(f,null!=g?g:!1);g=this.editor.graph;var e=
 this.getCurrentFile();if(null!=this.pages&&this.currentPage!=this.pages[0]&&(b||!a&&null!=e&&/(\.svg)$/i.test(e.getTitle()))){g=this.createTemporaryGraph(g.getStylesheet());var h=g.getGlobalVariable,l=this.pages[0];g.getGlobalVariable=function(a){return"page"==a?l.getName():"pagenumber"==a?1:h.apply(this,arguments)};document.body.appendChild(g.container);g.model.setRoot(l.root)}a=this.createFileData(k,g,e,window.location.href,a,b,c,d,f,m);g!=this.editor.graph&&g.container.parentNode.removeChild(g.container);
 return a};EditorUi.prototype.getHtml=function(a,b,c,d,f,g){g=null!=g?g:!0;var e=null,h="https://www.draw.io/js/embed-static.min.js";if(null!=b){var e=g?b.getGraphBounds():b.getBoundingBox(b.getSelectionCells()),l=b.view.scale;g=Math.floor(e.x/l-b.view.translate.x);l=Math.floor(e.y/l-b.view.translate.y);e=b.background;null==f&&(b=this.getBasenames().join(";"),0<b.length&&(h="https://www.draw.io/embed.js?s="+b));a.setAttribute("x0",g);a.setAttribute("y0",l)}null!=a&&(a.setAttribute("pan","1"),a.setAttribute("zoom",
@@ -6267,134 +6269,134 @@ this.editor.undoManager.clear();var d=mxUtils.bind(this,function(){this.setGraph
 a.addListener("descriptorChanged",this.descriptorChangedListener);a.addListener("contentChanged",this.descriptorChangedListener);a.open();this.setGraphEnabled(!0);this.setMode(a.getMode());this.editor.undoManager.clear();this.descriptorChanged();this.updateUi();null==a.realtime&&(a.isEditable()?this.editor.setStatus(""):this.editor.setStatus('<span class="geStatusAlert" style="margin-left:8px;">'+mxUtils.htmlEntities(mxResources.get("readOnly"))+"</span>"));!this.editor.chromeless||this.editor.editable?
 (this.editor.graph.selectUnlockedLayer(),this.showLayersDialog(),this.restoreLibraries(),window.self!==window.top&&window.focus()):this.editor.graph.lightbox&&this.lightboxFit();this.chromelessResize&&this.chromelessResize();this.editor.fireEvent(new mxEventObject("fileLoaded"));b=!0;if(EditorUi.enableLogging&&!this.isOffline()&&null!=a.getMode())try{"function"===typeof window.ga&&ga("send","event","File","open",a.getMode())}catch(p){}if(this.mode==a.getMode()&&a.getMode()!=App.MODE_DEVICE&&null!=
 a.getMode())try{this.addRecent({id:a.getHash(),title:a.getTitle(),mode:a.getMode()})}catch(p){}try{mxSettings.setOpenCounter(mxSettings.getOpenCounter()+1),mxSettings.save()}catch(p){}}catch(p){null!=window.console&&console.log("error in fileLoaded:",a,p);if(EditorUi.enableLogging&&!this.isOffline())try{(new Image).src=(null!=window.DRAWIO_LOG_URL?window.DRAWIO_LOG_URL:"")+"/log?v="+encodeURIComponent(EditorUi.VERSION)+"&msg=errorInFileLoaded:url:"+encodeURIComponent(window.location.href)+(null!=
-p&&null!=p.message?":err:"+encodeURIComponent(p.message):"")+(null!=p&&null!=p.stack?"&stack="+encodeURIComponent(p.stack):"")}catch(t){}this.handleError(p,mxResources.get("errorLoadingFile"),mxUtils.bind(this,function(){null!=urlParams.url&&this.spinner.spin(document.body,mxResources.get("reconnecting"))?window.location.search=this.getSearch(["url"]):null!=c?c.constructor==DriveFile?this.loadFile(c.getHash()):this.fileLoaded(c):d()}))}else d();return b};EditorUi.prototype.restoreLibraries=function(){};
-EditorUi.prototype.saveLibrary=function(a,b,c,d,f,g,k){};EditorUi.prototype.toggleScratchpad=function(){if(isLocalStorage||mxClient.IS_CHROMEAPP)null==this.scratchpad?this.getLocalData(".scratchpad",mxUtils.bind(this,function(a){null==a&&(a=this.emptyLibraryXml);this.loadLibrary(new StorageLibrary(this,a,".scratchpad"))})):this.closeLibrary(this.scratchpad)};EditorUi.prototype.createLibraryDataFromImages=function(a){var b=mxUtils.createXmlDocument(),c=b.createElement("mxlibrary");mxUtils.setTextContent(c,
-JSON.stringify(a));b.appendChild(c);return mxUtils.getXml(b)};EditorUi.prototype.closeLibrary=function(a){null!=a&&(this.removeLibrarySidebar(a.getHash()),a.constructor!=LocalLibrary&&mxSettings.removeCustomLibrary(a.getHash()),".scratchpad"==a.title&&(this.scratchpad=null))};EditorUi.prototype.removeLibrarySidebar=function(a){var b=this.sidebar.palettes[a];if(null!=b){for(var c=0;c<b.length;c++)b[c].parentNode.removeChild(b[c]);delete this.sidebar.palettes[a]}};EditorUi.prototype.repositionLibrary=
-function(a){var b=this.sidebar.container;if(null==a){var c=this.sidebar.palettes["L.scratchpad"];null==c&&(c=this.sidebar.palettes.search);null!=c&&(a=c[c.length-1].nextSibling)}a=null!=a?a:b.firstChild.nextSibling.nextSibling;var c=b.lastChild,d=c.previousSibling;b.insertBefore(c,a);b.insertBefore(d,c)};EditorUi.prototype.loadLibrary=function(a){var b=mxUtils.parseXml(a.getData());if("mxlibrary"==b.documentElement.nodeName){var c=JSON.parse(mxUtils.getTextContent(b.documentElement));this.libraryLoaded(a,
-c,b.documentElement.getAttribute("title"))}else throw{message:mxResources.get("notALibraryFile")};};EditorUi.prototype.getLibraryStorageHint=function(a){return""};EditorUi.prototype.libraryLoaded=function(a,b,c){a.constructor!=LocalLibrary&&mxSettings.addCustomLibrary(a.getHash());".scratchpad"==a.title&&(this.scratchpad=a);var d=this.sidebar.palettes[a.getHash()],d=null!=d?d[d.length-1].nextSibling:null;this.removeLibrarySidebar(a.getHash());var e=null,h=mxUtils.bind(this,function(b,c){if(0==b.length&&
-a.isEditable())null==e&&(e=document.createElement("div"),mxUtils.setPrefixedStyle(e.style,"borderRadius","6px"),e.style.border="3px dotted lightGray",e.style.textAlign="center",e.style.padding="8px",e.style.color="#B3B3B3",mxUtils.write(e,mxResources.get("dragElementsHere"))),c.appendChild(e);else for(var d=0;d<b.length;d++){var h=b[d],l=h.data;if(null!=l){var l=this.convertDataUri(l),f="shape=image;verticalLabelPosition=bottom;verticalAlign=top;imageAspect=0;";"fixed"==h.aspect&&(f+="aspect=fixed;");
-c.appendChild(this.sidebar.createVertexTemplate(f+"image="+l,h.w,h.h,"",h.title||"",!1,!1,!1))}else null!=h.xml&&(l=this.stringToCells(this.editor.graph.decompress(h.xml)),0<l.length&&c.appendChild(this.sidebar.createVertexTemplateFromCells(l,h.w,h.h,h.title||"",!0,!1,!1)))}});c=null!=c&&0<c.length?c:a.getTitle();var l=this.sidebar.addPalette(a.getHash(),c,!0,mxUtils.bind(this,function(a){h(b,a)}));this.repositionLibrary(d);var f=l.parentNode.previousSibling;c=f.getAttribute("title");null!=c&&0<c.length&&
-".scratchpad"!=a.title&&f.setAttribute("title",this.getLibraryStorageHint(a)+"\n"+c);var g=document.createElement("div");g.style.position="absolute";g.style.right="0px";g.style.top="5px";mxClient.IS_QUIRKS||8==document.documentMode||(g.style.backgroundColor="inherit");f.style.position="relative";var k=document.createElement("img");k.setAttribute("src",Dialog.prototype.closeImage);k.setAttribute("title",mxResources.get("close"));k.setAttribute("align","top");k.setAttribute("border","0");k.className=
-"geButton";k.style.marginRight="1px";k.style.marginTop="-1px";g.appendChild(k);var m=null;mxEvent.addListener(k,"click",mxUtils.bind(this,function(b){if(!mxEvent.isConsumed(b)){var c=mxUtils.bind(this,function(){this.closeLibrary(a)});null!=m?this.confirm(mxResources.get("allChangesLost"),null,c,mxResources.get("cancel"),mxResources.get("discardChanges")):c();mxEvent.consume(b)}}));mxEvent.addListener(l,"mousemove",mxUtils.bind(this,function(a){mxEvent.getSource(a)==l?l.setAttribute("title",mxResources.get("libraryTooltip")):
-l.removeAttribute("title")}));if(a.isEditable()){var v=this.editor.graph,D=mxUtils.bind(this,function(c){this.showLibraryDialog(a.getTitle(),l,b,a,a.getMode());mxEvent.consume(c)}),B=mxUtils.bind(this,function(c){a.setModified(!0);a.isAutosave()?(null!=z&&null!=z.parentNode&&z.parentNode.removeChild(z),z=k.cloneNode(!1),z.setAttribute("src",Editor.spinImage),z.setAttribute("title",mxResources.get("saving")),z.style.cursor="default",z.style.marginRight="2px",z.style.marginTop="-2px",g.insertBefore(z,
-g.firstChild),f.style.paddingRight=18*g.childNodes.length+"px",this.saveLibrary(a.getTitle(),b,a,a.getMode(),!0,!0,function(){null!=z&&null!=z.parentNode&&(z.parentNode.removeChild(z),f.style.paddingRight=18*g.childNodes.length+"px")})):null==m&&(m=k.cloneNode(!1),m.setAttribute("src",IMAGE_PATH+"/download.png"),m.setAttribute("title",mxResources.get("save")),g.insertBefore(m,g.firstChild),mxEvent.addListener(m,"click",mxUtils.bind(this,function(c){this.saveLibrary(a.getTitle(),b,a,a.getMode(),a.constructor==
-LocalLibrary,!0,function(){null==m||a.isModified()||(f.style.paddingRight=18*g.childNodes.length+"px",m.parentNode.removeChild(m),m=null)});mxEvent.consume(c)})),f.style.paddingRight=18*g.childNodes.length+"px")}),A=mxUtils.bind(this,function(a,c,d,h){a=v.cloneCells(mxUtils.sortCells(v.model.getTopmostCells(a)));for(var f=0;f<a.length;f++){var g=v.getCellGeometry(a[f]);null!=g&&g.translate(-c.x,-c.y)}l.appendChild(this.sidebar.createVertexTemplateFromCells(a,c.width,c.height,h||"",!0,!1,!1));a={xml:this.editor.graph.compress(mxUtils.getXml(this.editor.graph.encodeCells(a))),
-w:c.width,h:c.height};null!=h&&(a.title=h);b.push(a);B(d);null!=e&&null!=e.parentNode&&0<b.length&&(e.parentNode.removeChild(e),e=null)}),G=mxUtils.bind(this,function(a){if(v.isSelectionEmpty())v.getRubberband().isActive()?(v.getRubberband().execute(a),v.getRubberband().reset()):this.showError(mxResources.get("error"),mxResources.get("nothingIsSelected"),mxResources.get("ok"));else{var b=v.getSelectionCells(),c=v.view.getBounds(b),d=v.view.scale;c.x/=d;c.y/=d;c.width/=d;c.height/=d;c.x-=v.view.translate.x;
-c.y-=v.view.translate.y;A(b,c)}mxEvent.consume(a)});l.style.border="3px solid transparent";mxEvent.addGestureListeners(l,function(){},mxUtils.bind(this,function(a){v.isMouseDown&&null!=v.panningManager&&null!=v.graphHandler.shape&&(v.graphHandler.shape.node.style.visibility="hidden",null!=e?e.style.border="3px dotted rgb(254, 137, 12)":l.style.border="3px dotted rgb(254, 137, 12)",l.style.cursor="copy",v.panningManager.stop(),v.autoScroll=!1,null!=v.graphHandler.guide&&v.graphHandler.guide.setVisible(!1),
-null!=v.graphHandler.hint&&(v.graphHandler.hint.style.visibility="hidden"),mxEvent.consume(a))}),mxUtils.bind(this,function(a){v.isMouseDown&&null!=v.panningManager&&null!=v.graphHandler&&(l.style.border="3px solid transparent",null!=e&&(e.style.border="3px dotted lightGray"),l.style.cursor="default",this.sidebar.showTooltips=!0,v.panningManager.stop(),v.graphHandler.reset(),v.isMouseDown=!1,v.autoScroll=!0,G(a),mxEvent.consume(a))}));mxEvent.addListener(l,"mouseleave",mxUtils.bind(this,function(a){v.isMouseDown&&
-null!=v.graphHandler.shape&&(v.graphHandler.shape.node.style.visibility="visible",l.style.border="3px solid transparent",l.style.cursor="",v.autoScroll=!0,null!=v.graphHandler.guide&&v.graphHandler.guide.setVisible(!0),null!=v.graphHandler.hint&&(v.graphHandler.hint.style.visibility="visible"),null!=e&&(e.style.border="3px dotted lightGray"))}));Graph.fileSupport&&(mxEvent.addListener(l,"dragover",mxUtils.bind(this,function(a){null!=e?e.style.border="3px dotted rgb(254, 137, 12)":l.style.border="3px dotted rgb(254, 137, 12)";
-a.dataTransfer.dropEffect="copy";l.style.cursor="copy";this.sidebar.hideTooltip();a.stopPropagation();a.preventDefault()})),mxEvent.addListener(l,"drop",mxUtils.bind(this,function(a){l.style.border="3px solid transparent";l.style.cursor="";null!=e&&(e.style.border="3px dotted lightGray");0<a.dataTransfer.files.length&&this.importFiles(a.dataTransfer.files,0,0,this.maxImageSize,mxUtils.bind(this,function(c,d,f,g,n,k,m,x,p){if(null!=c&&"image/"==d.substring(0,6))c="shape=image;verticalLabelPosition=bottom;verticalAlign=top;aspect=fixed;image="+
-this.convertDataUri(c),c=[new mxCell("",new mxGeometry(0,0,n,k),c)],c[0].vertex=!0,A(c,new mxRectangle(0,0,n,k),a,mxEvent.isAltDown(a)?null:m.substring(0,m.lastIndexOf(".")).replace(/_/g," ")),null!=e&&null!=e.parentNode&&0<b.length&&(e.parentNode.removeChild(e),e=null);else{var v=!1,q=mxUtils.bind(this,function(c,d){if(null!=c&&"text/xml"==d){var f=mxUtils.parseXml(c);if("mxlibrary"==f.documentElement.nodeName)try{var g=JSON.parse(mxUtils.getTextContent(f.documentElement));h(g,l);b=b.concat(g);B(a);
-this.spinner.stop();v=!0}catch(V){}else if("mxfile"==f.documentElement.nodeName)try{for(var n=f.documentElement.getElementsByTagName("diagram"),f=0;f<n.length;f++){var g=mxUtils.getTextContent(n[f]),k=this.stringToCells(this.editor.graph.decompress(g)),m=this.editor.graph.getBoundingBoxFromGeometry(k);A(k,new mxRectangle(0,0,m.width,m.height),a)}v=!0}catch(V){null!=window.console&&console.log("error in drop handler:",V)}}v||(this.spinner.stop(),this.handleError({message:mxResources.get("errorLoadingFile")}));
-null!=e&&null!=e.parentNode&&0<b.length&&(e.parentNode.removeChild(e),e=null)});!this.isOffline()&&(new XMLHttpRequest).upload&&this.isRemoteFileFormat(c,m)&&null!=p?this.parseFile(p,mxUtils.bind(this,function(a){4==a.readyState&&(this.spinner.stop(),200<=a.status&&299>=a.status?q(a.responseText,"text/xml"):this.handleError({message:mxResources.get(413==a.status?"drawingTooLarge":"invalidOrMissingFile")},mxResources.get("errorLoadingFile")))})):q(c,d)}}));a.stopPropagation();a.preventDefault()})),
-mxEvent.addListener(l,"dragleave",function(a){null!=e?e.style.border="3px dotted lightGray":(l.style.border="3px solid transparent",l.style.cursor="");a.stopPropagation();a.preventDefault()}));k=k.cloneNode(!1);k.setAttribute("src",IMAGE_PATH+"/edit.gif");k.setAttribute("title",mxResources.get("edit"));g.insertBefore(k,g.firstChild);mxEvent.addListener(k,"click",D);mxEvent.addListener(l,"dblclick",function(a){mxEvent.getSource(a)==l&&D(a)});k=k.cloneNode(!1);k.setAttribute("src",Editor.plusImage);
-k.setAttribute("title",mxResources.get("add"));g.insertBefore(k,g.firstChild);this.isOffline()||".scratchpad"!=a.title||(c=document.createElement("span"),c.setAttribute("title",mxResources.get("help")),c.style.cssText="color:gray;text-decoration:none;",c.className="geButton",mxUtils.write(c,"?"),mxEvent.addGestureListeners(c,mxUtils.bind(this,function(a){window.open("https://desk.draw.io/support/solutions/articles/16000042367");mxEvent.consume(a)})),g.insertBefore(c,g.firstChild));var z=null;mxEvent.addListener(k,
-"click",G)}f.appendChild(g);f.style.paddingRight=18*g.childNodes.length+"px"};"1"==urlParams.offline?EditorUi.prototype.footerHeight=4:("atlas"==uiTheme?("undefined"!==typeof Toolbar&&(Toolbar.prototype.unselectedBackground=mxClient.IS_QUIRKS?"none":"linear-gradient(rgb(255, 255, 255) 0px, rgb(242, 242, 242) 100%)",Toolbar.prototype.selectedBackground="rgb(242, 242, 242)"),Editor.prototype.initialTopSpacing=3,EditorUi.prototype.menubarHeight=41,EditorUi.prototype.toolbarHeight=38,EditorUi.prototype.hsplitPosition=
-188,Sidebar.prototype.thumbWidth=46,Sidebar.prototype.thumbHeight=46,Sidebar.prototype.thumbPadding=5<=document.documentMode?0:1,Sidebar.prototype.thumbBorder=2):"1"==urlParams.savesidebar&&(Sidebar.prototype.thumbWidth=64,Sidebar.prototype.thumbHeight=64),EditorUi.prototype.footerHeight=760<=screen.width&&240<=screen.height?46:0,EditorUi.prototype.createFooter=function(){var a=document.getElementById("geFooter");if(null!=a){a.style.visibility="visible";var b=document.createElement("img");b.setAttribute("border",
-"0");b.setAttribute("src",Dialog.prototype.closeImage);b.setAttribute("title",mxResources.get("hide"));a.appendChild(b);mxClient.IS_QUIRKS&&(b.style.position="relative",b.style.styleFloat="right",b.style.top="-30px",b.style.left="164px",b.style.cursor="pointer");mxEvent.addListener(b,"click",mxUtils.bind(this,function(){this.hideFooter()}))}return a});EditorUi.prototype.hideFooter=function(){var a=document.getElementById("geFooter");null!=a&&(this.footerHeight=0,a.style.display="none",this.refresh())};
-EditorUi.prototype.showImageDialog=function(a,b,c,d,f){a=new ImageDialog(this,a,b,c,d,f);this.showDialog(a.container,Graph.fileSupport?440:360,Graph.fileSupport?200:90,!0,!0);a.init()};EditorUi.prototype.showBackgroundImageDialog=function(a){a=null!=a?a:mxUtils.bind(this,function(a){a=new ChangePageSetup(this,null,a);a.ignoreColor=!0;this.editor.graph.model.execute(a)});var b=new BackgroundImageDialog(this,mxUtils.bind(this,function(b){a(b)}));this.showDialog(b.container,360,200,!0,!0);b.init()};
-EditorUi.prototype.showLibraryDialog=function(a,b,c,d,f){a=new LibraryDialog(this,a,b,c,d,f);this.showDialog(a.container,620,440,!0,!1,mxUtils.bind(this,function(a){a&&null==this.getCurrentFile()&&"1"!=urlParams.embed&&this.showSplash()}));a.init()};EditorUi.prototype.createSidebarFooterContainer=function(){var a=this.createDiv("geSidebarContainer");a.style.position="absolute";a.style.overflow="hidden";a.style.borderWidth="3px";var b=document.createElement("a");b.setAttribute("href","javascript:void(0);");
-b.className="geTitle";b.style.height="100%";b.style.paddingTop="9px";mxUtils.write(b,mxResources.get("moreShapes")+"...");mxEvent.addListener(b,"click",mxUtils.bind(this,function(a){this.actions.get("shapes").funct();mxEvent.consume(a)}));a.appendChild(b);return a};EditorUi.prototype.handleError=function(a,b,c){var d=null!=this.spinner&&null!=this.spinner.pause?this.spinner.pause():function(){},e=null!=a&&null!=a.error?a.error:a;if(null!=e||null!=b){a=mxUtils.htmlEntities(mxResources.get("unknownError"));
-var h=mxResources.get("ok"),l=null;b=null!=b?b:mxResources.get("error");if(null!=e)if(null!=e.retry&&(h=mxResources.get("cancel"),l=function(){d();e.retry()}),"undefined"!=typeof gapi&&"undefined"!=typeof gapi.drive&&"undefined"!=typeof gapi.drive.realtime&&e.type==gapi.drive.realtime.ErrorType.FORBIDDEN)a=mxUtils.htmlEntities(mxResources.get("forbidden"));else if(404==e.code||404==e.status||"undefined"!=typeof gapi&&"undefined"!=typeof gapi.drive&&"undefined"!=typeof gapi.drive.realtime&&e.type==
-gapi.drive.realtime.ErrorType.NOT_FOUND){a=mxUtils.htmlEntities(mxResources.get("fileNotFoundOrDenied"));var f=window.location.hash;null!=f&&"#G"==f.substring(0,2)&&(f=f.substring(2),a+=' <a href="https://drive.google.com/open?id='+f+'" target="_blank">'+mxUtils.htmlEntities(mxResources.get("tryOpeningViaThisPage"))+"</a>")}else e.code==App.ERROR_TIMEOUT?a=mxUtils.htmlEntities(mxResources.get("timeout")):e.code==App.ERROR_BUSY?a=mxUtils.htmlEntities(mxResources.get("busy")):null!=e.message?a=mxUtils.htmlEntities(e.message):
-null!=e.response&&null!=e.response.error&&(a=mxUtils.htmlEntities(e.response.error));this.showError(b,a,h,c,l)}else null!=c&&c()};EditorUi.prototype.showError=function(a,b,c,d,f,g,k){a=new ErrorDialog(this,a,b,c,d,f,g,k);this.showDialog(a.container,340,150,!0,!1);a.init()};EditorUi.prototype.alert=function(a,b){var c=new ErrorDialog(this,null,a,mxResources.get("ok"),b);this.showDialog(c.container,340,100,!0,!1);c.init()};EditorUi.prototype.confirm=function(a,b,c,d,f){var e=null!=this.spinner&&null!=
-this.spinner.pause?this.spinner.pause():function(){};this.showDialog((new ConfirmDialog(this,a,function(){e();null!=b&&b()},function(){e();null!=c&&c()},d,f)).container,340,90,!0,!1)};EditorUi.prototype.setCurrentFile=function(a){this.currentFile=a};EditorUi.prototype.getCurrentFile=function(){return this.currentFile};EditorUi.prototype.isExportToCanvas=function(){return mxClient.IS_CHROMEAPP||!this.editor.graph.mathEnabled&&this.useCanvasForExport};EditorUi.prototype.createSvgDataUri=function(a){return"data:image/svg+xml;base64,"+
-btoa(unescape(encodeURIComponent(a)))};EditorUi.prototype.createImageDataUri=function(a,b,c){var d=a.toDataURL("image/"+c);if(6>=d.length||d==a.cloneNode(!1).toDataURL("image/"+c))throw{message:"Invalid image"};null!=b&&(d=this.writeGraphModelToPng(d,"zTXt","mxGraphModel",atob(this.editor.graph.compress(b))));return d};EditorUi.prototype.saveCanvas=function(a,b,c){var d="jpeg"==c?"jpg":c,e=this.getBaseFilename()+"."+d;a=this.createImageDataUri(a,b,c);this.saveData(e,d,a.substring(a.lastIndexOf(",")+
-1),"image/"+c,!0)};EditorUi.prototype.isLocalFileSave=function(){return"remote"!=urlParams.save&&(mxClient.IS_IE||"undefined"!==typeof window.Blob&&"undefined"!==typeof window.URL)&&9!=document.documentMode&&8!=document.documentMode&&7!=document.documentMode&&!mxClient.IS_QUIRKS||this.isOfflineApp()||mxClient.IS_IOS};EditorUi.prototype.doSaveLocalFile=function(a,b,c,d,f){if(window.Blob&&navigator.msSaveOrOpenBlob)a=d?this.base64ToBlob(a,c):new Blob([a],{type:c}),navigator.msSaveOrOpenBlob(a,b);else if(mxClient.IS_IE)c=
-window.open("about:blank","_blank"),null==c?mxUtils.popup(a,!0):(c.document.write(a),c.document.close(),c.document.execCommand("SaveAs",!0,b),c.close());else if(mxClient.IS_IOS)b=new TextareaDialog(this,b+":",a,null,null,mxResources.get("close")),b.textarea.style.width="600px",b.textarea.style.height="380px",this.showDialog(b.container,620,460,!0,!0),b.init(),document.execCommand("selectall",!1,null);else{var e=document.createElement("a"),h=!mxClient.IS_SF&&"undefined"!==typeof e.download;if(h||this.isOffline()){e.href=
-URL.createObjectURL(d?this.base64ToBlob(a,c):new Blob([a],{type:c}));h?e.download=b:e.setAttribute("target","_blank");document.body.appendChild(e);try{window.setTimeout(function(){URL.revokeObjectURL(e.href)},0),e.click(),e.parentNode.removeChild(e)}catch(q){}}else this.createEchoRequest(a,b,c,d,f).simulate(document,"_blank")}};EditorUi.prototype.createEchoRequest=function(a,b,c,d,f,g){a="xml="+encodeURIComponent(a);return new mxXmlRequest(SAVE_URL,a+(null!=c?"&mime="+c:"")+(null!=f?"&format="+f:
-"")+(null!=g?"&base64="+g:"")+(null!=b?"&filename="+encodeURIComponent(b):"")+(d?"&binary=1":""))};EditorUi.prototype.base64ToBlob=function(a,b){b=b||"";for(var c=atob(a),d=c.length,e=Math.ceil(d/1024),f=Array(e),h=0;h<e;++h){for(var g=1024*h,k=Math.min(g+1024,d),m=Array(k-g),x=0;g<k;++x,++g)m[x]=c[g].charCodeAt(0);f[h]=new Uint8Array(m)}return new Blob(f,{type:b})};EditorUi.prototype.saveLocalFile=function(a,b,c,d,f,g){g=null!=g?g:!1;var e="vsdx"!=f&&(!mxClient.IS_IOS||!navigator.standalone);f=this.getServiceCount(g);
-b=new CreateDialog(this,b,mxUtils.bind(this,function(b,e){try{if("_blank"==e)if(null==c||"image/"!=c.substring(0,6)||"image/svg"==c.substring(0,9)&&!mxClient.IS_SVG){var f=window.open("about:blank");null==f?mxUtils.popup(a,!0):(f.document.write(mxUtils.htmlEntities(a,!1)),f.document.close())}else this.openInNewWindow(a,c,d);else e==App.MODE_DEVICE?this.doSaveLocalFile(a,b,c,d):null!=b&&0<b.length&&this.pickFolder(e,mxUtils.bind(this,function(f){try{this.exportFile(a,b,c,d,e,f)}catch(v){this.handleError(v)}}))}catch(x){this.handleError(x)}}),
-mxUtils.bind(this,function(){this.hideDialog()}),mxResources.get("saveAs"),mxResources.get("download"),!1,g,e,null,null,4<f?3:4,a,c,d);this.showDialog(b.container,380,4<f?390:270,!0,!0);b.init()};EditorUi.prototype.openInNewWindow=function(a,b,c){if(mxClient.IS_GC||mxClient.IS_EDGE||11==document.documentMode||10==document.documentMode){var d=window.open("about:blank");null==d?mxUtils.popup(a,!0):(d.document.write('<html><img src="data:'+b+(c?";base64,"+a:";charset=utf8,"+encodeURIComponent(a))+'"/></html>'),
-d.document.close())}else d=window.open("data:"+b+(c?";base64,"+a:";charset=utf8,"+encodeURIComponent(a))),null==d&&mxUtils.popup(a,!0)};var b=EditorUi.prototype.addChromelessToolbarItems;EditorUi.prototype.addChromelessToolbarItems=function(a){if(this.isExportToCanvas()){this.exportDialog=null;var c=a(mxUtils.bind(this,function(a){var b=mxUtils.bind(this,function(){mxEvent.removeListener(this.editor.graph.container,"click",b);null!=this.exportDialog&&(this.exportDialog.parentNode.removeChild(this.exportDialog),
-this.exportDialog=null)});if(null!=this.exportDialog)b.apply(this);else{this.exportDialog=document.createElement("div");var d=c.getBoundingClientRect();mxUtils.setPrefixedStyle(this.exportDialog.style,"borderRadius","5px");this.exportDialog.style.position="fixed";this.exportDialog.style.textAlign="center";this.exportDialog.style.fontFamily="Helvetica,Arial";this.exportDialog.style.backgroundColor="#000000";this.exportDialog.style.width="50px";this.exportDialog.style.height="50px";this.exportDialog.style.padding=
-"4px 2px 4px 2px";this.exportDialog.style.color="#ffffff";mxUtils.setOpacity(this.exportDialog,70);this.exportDialog.style.left=d.left+"px";this.exportDialog.style.bottom=parseInt(this.chromelessToolbar.style.bottom)+this.chromelessToolbar.offsetHeight+4+"px";d=mxUtils.getCurrentStyle(this.editor.graph.container);this.exportDialog.style.zIndex=d.zIndex;var e=new Spinner({lines:8,length:6,width:5,radius:6,rotate:0,color:"#fff",speed:1.5,trail:60,shadow:!1,hwaccel:!1,top:"28px",zIndex:2E9});e.spin(this.exportDialog);
-this.exportToCanvas(mxUtils.bind(this,function(a){e.stop();this.exportDialog.style.width="auto";this.exportDialog.style.height="auto";this.exportDialog.style.padding="10px";var c=this.createImageDataUri(a,null,"png");a=document.createElement("img");a.style.maxWidth="140px";a.style.maxHeight="140px";a.style.cursor="pointer";a.setAttribute("title",mxResources.get("openInNewWindow"));a.setAttribute("border","0");a.setAttribute("src",c);this.exportDialog.appendChild(a);mxEvent.addListener(a,"click",mxUtils.bind(this,
-function(){this.openInNewWindow(c.substring(c.indexOf(",")+1),"image/png",!0);b.apply(this,arguments)}))}),null,this.thumbImageCache,null,mxUtils.bind(this,function(a){this.spinner.stop();this.handleError(a)}));mxEvent.addListener(this.editor.graph.container,"click",b);document.body.appendChild(this.exportDialog)}mxEvent.consume(a)}),Editor.cameraLargeImage,mxResources.get("export"))}b.apply(this,arguments)};EditorUi.prototype.saveData=function(a,b,c,d,f){this.isLocalFileSave()?this.saveLocalFile(c,
-a,d,f,b):this.saveRequest(a,b,mxUtils.bind(this,function(a,e){return this.createEchoRequest(c,a,d,f,b,e)}),c,f,d)};EditorUi.prototype.saveRequest=function(a,b,c,d,f,g){var e=!mxClient.IS_IOS||!navigator.standalone,h=this.getServiceCount(!1);a=new CreateDialog(this,a,mxUtils.bind(this,function(a,e){if("_blank"==e||null!=a&&0<a.length){var f=c("_blank"==e?null:a,e==App.MODE_DEVICE||null==e||"_blank"==e?"0":"1");null!=f&&(e==App.MODE_DEVICE||"_blank"==e?f.simulate(document,"_blank"):this.pickFolder(e,
-mxUtils.bind(this,function(c){g=null!=g?g:"pdf"==b?"application/pdf":"image/"+b;if(null!=d)try{this.exportFile(d,a,g,!0,e,c)}catch(D){this.handleError(D)}else this.spinner.spin(document.body,mxResources.get("saving"))&&f.send(mxUtils.bind(this,function(){this.spinner.stop();if(200<=f.getStatus()&&299>=f.getStatus())try{this.exportFile(f.getText(),a,g,!0,e,c)}catch(D){this.handleError(D)}else this.handleError({message:mxResources.get("errorSavingFile")})}),function(a){this.spinner.stop();this.handleError(a)})})))}}),
-mxUtils.bind(this,function(){this.hideDialog()}),mxResources.get("saveAs"),mxResources.get("download"),!1,!1,e,null,null,4<h?3:4,d,g,f);this.showDialog(a.container,380,4<h?390:270,!0,!0);a.init()};EditorUi.prototype.exportFile=function(a,b,c,d,f,g){};EditorUi.prototype.pickFolder=function(a,b,c){b(null)};EditorUi.prototype.exportSvg=function(a,b,c,d,f,g,k,m,w){if(this.spinner.spin(document.body,mxResources.get("export"))){var e=this.editor.graph.isSelectionEmpty();c=null!=c?c:e;e=b?null:this.editor.graph.background;
-e==mxConstants.NONE&&(e=null);null==e&&0==b&&(e="#ffffff");var h=this.editor.graph.getSvg(e,a,k,m,null,c);d&&this.editor.graph.addSvgShadow(h);var l=this.getBaseFilename()+".svg",n=mxUtils.bind(this,function(a){this.spinner.stop();f&&a.setAttribute("content",this.getFileData(!0,null,null,null,c,w));var b='<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">\n'+mxUtils.getXml(a);this.isLocalFileSave()||b.length<=MAX_REQUEST_SIZE?this.saveData(l,"svg",b,
-"image/svg+xml"):this.handleError({message:mxResources.get("drawingTooLarge")},mxResources.get("error"),mxUtils.bind(this,function(){mxUtils.popup(b)}))});this.convertMath(this.editor.graph,h,!1,mxUtils.bind(this,function(){g?(null==this.thumbImageCache&&(this.thumbImageCache={}),this.convertImages(h,n,this.thumbImageCache)):n(h)}))}};EditorUi.prototype.addCheckbox=function(a,b,c,d,f,g){g=null!=g?g:!0;var e=document.createElement("input");e.style.marginRight="8px";e.style.marginTop="16px";e.setAttribute("type",
-"checkbox");c&&(e.setAttribute("checked","checked"),e.defaultChecked=!0);d&&e.setAttribute("disabled","disabled");g&&(a.appendChild(e),mxUtils.write(a,b),f||mxUtils.br(a));return e};EditorUi.prototype.addEditButton=function(a,b){var c=this.addCheckbox(a,mxResources.get("edit")+":",!0,null,!0);c.style.marginLeft="24px";var d=this.getCurrentFile(),e="";null!=d&&d.getMode()!=App.MODE_DEVICE&&d.getMode()!=App.MODE_BROWSER&&(e=window.location.href);var f=document.createElement("select");f.style.width=
-"120px";f.style.marginLeft="8px";f.style.marginRight="10px";f.className="geBtn";d=document.createElement("option");d.setAttribute("value","blank");mxUtils.write(d,mxResources.get("makeCopy"));f.appendChild(d);d=document.createElement("option");d.setAttribute("value","custom");mxUtils.write(d,mxResources.get("custom")+"...");f.appendChild(d);a.appendChild(f);mxEvent.addListener(f,"change",mxUtils.bind(this,function(){if("custom"==f.value){var a=new FilenameDialog(this,e,mxResources.get("ok"),function(a){null!=
-a?e=a:f.value="blank"},mxResources.get("url"),null,null,null,null,function(){f.value="blank"});this.showDialog(a.container,300,80,!0,!1);a.init()}}));mxEvent.addListener(c,"change",mxUtils.bind(this,function(){c.checked&&(null==b||b.checked)?f.removeAttribute("disabled"):f.setAttribute("disabled","disabled")}));mxUtils.br(a);return{getLink:function(){return c.checked?"blank"===f.value?"_blank":e:null},getEditInput:function(){return c},getEditSelect:function(){return f}}};EditorUi.prototype.addLinkSection=
-function(a,b){function c(){h.innerHTML='<div style="width:100%;height:100%;box-sizing:border-box;'+(null!=f&&f!=mxConstants.NONE?"border:1px solid black;background-color:"+f:"background-position:center center;background-repeat:no-repeat;background-image:url('"+Dialog.prototype.closeImage+"')")+';"></div>'}mxUtils.write(a,mxResources.get("links")+":");var d=document.createElement("select");d.style.width="100px";d.style.marginLeft="8px";d.style.marginRight="10px";d.className="geBtn";var e=document.createElement("option");
-e.setAttribute("value","auto");mxUtils.write(e,mxResources.get("automatic"));d.appendChild(e);e=document.createElement("option");e.setAttribute("value","blank");mxUtils.write(e,mxResources.get("openInNewWindow"));d.appendChild(e);e=document.createElement("option");e.setAttribute("value","self");mxUtils.write(e,mxResources.get("openInThisWindow"));d.appendChild(e);b&&(e=document.createElement("option"),e.setAttribute("value","frame"),mxUtils.write(e,mxResources.get("openInThisWindow")+" ("+mxResources.get("iframe")+
-")"),d.appendChild(e));a.appendChild(d);mxUtils.write(a,mxResources.get("borderColor")+":");var f="#0000ff",h=null,h=mxUtils.button("",mxUtils.bind(this,function(a){this.pickColor(f||"none",function(a){f=a;c()});mxEvent.consume(a)}));c();h.style.padding=mxClient.IS_FF?"4px 2px 4px 2px":"4px";h.style.marginLeft="4px";h.style.height="22px";h.style.width="22px";h.style.position="relative";h.style.top=mxClient.IS_IE||mxClient.IS_IE11||mxClient.IS_EDGE?"6px":"1px";h.className="geColorBtn";a.appendChild(h);
-mxUtils.br(a);return{getColor:function(){return f},getTarget:function(){return d.value},focus:function(){d.focus()}}};EditorUi.prototype.createLink=function(a,b,c,d,f,g,k,m){var e=this.getCurrentFile(),h=[];d&&(h.push("lightbox=1"),"auto"!=a&&h.push("target="+a),null!=b&&b!=mxConstants.NONE&&h.push("highlight="+("#"==b.charAt(0)?b.substring(1):b)),null!=f&&0<f.length&&h.push("edit="+encodeURIComponent(f)),g&&h.push("layers=1"),this.editor.graph.foldingEnabled&&h.push("nav=1"));if(c&&null!=this.pages&&
-null!=this.currentPage)for(a=0;a<this.pages.length;a++)if(this.pages[a]==this.currentPage){0<a&&h.push("page="+a);break}a=!0;null!=k?c="#U"+encodeURIComponent(k):(e=this.getCurrentFile(),m||null==e||e.constructor!=window.DriveFile?c="#R"+encodeURIComponent(c?this.getFileData(!0,null,null,null,null,null,null,!0):this.editor.graph.compress(mxUtils.getXml(this.editor.getGraphXml()))):(c="#"+e.getHash(),a=!1));a&&null!=e&&null!=e.getTitle()&&e.getTitle()!=this.defaultFilename&&h.push("title="+encodeURIComponent(e.getTitle()));
-return(mxClient.IS_CHROMEAPP||EditorUi.isElectronApp?"https://www.draw.io/":"https://"+location.host+"/")+(0<h.length?"?"+h.join("&"):"")+c};EditorUi.prototype.createHtml=function(a,b,c,d,f,g,k,m,w,y,x){this.getBasenames();var e={};""!=f&&f!=mxConstants.NONE&&(e.highlight=f);"auto"!==d&&(e.target=d);w||(e.lightbox=!1);e.nav=this.editor.graph.foldingEnabled;c=parseInt(c);isNaN(c)||100==c||(e.zoom=c/100);c=[];k&&(c.push("pages"),e.resize=!0,null!=this.pages&&null!=this.currentPage&&(e.page=mxUtils.indexOf(this.pages,
-this.currentPage)));b&&(c.push("zoom"),e.resize=!0);m&&c.push("layers");0<c.length&&(w&&c.push("lightbox"),e.toolbar=c.join(" "));null!=y&&0<y.length&&(e.edit=y);null!=a?e.url=a:e.xml=this.getFileData(!0,null,null,null,null,!k);b='<div class="mxgraph" style="'+(g?"max-width:100%;":"")+(""!=c?"border:1px solid transparent;":"")+'" data-mxgraph="'+mxUtils.htmlEntities(JSON.stringify(e))+'"></div>';a=null!=a?"&fetch="+encodeURIComponent(a):"";x(b,'<script type="text/javascript" src="'+(0<a.length?("1"==
-urlParams.dev?"https://test.draw.io/embed2.js?dev=1":"https://www.draw.io/embed2.js?")+a:"1"==urlParams.dev?"https://test.draw.io/js/viewer.min.js":"https://www.draw.io/js/viewer.min.js")+'">\x3c/script>')};EditorUi.prototype.showHtmlDialog=function(a,b,c,d){var e=document.createElement("div");e.style.whiteSpace="nowrap";var f=document.createElement("h3");mxUtils.write(f,mxResources.get("html"));f.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:12px";e.appendChild(f);var h=
-document.createElement("div");h.style.cssText="border-bottom:1px solid lightGray;padding-bottom:8px;margin-bottom:12px;";var g=document.createElement("input");g.style.cssText="margin-right:8px;margin-top:8px;margin-bottom:8px;";g.setAttribute("value","url");g.setAttribute("type","radio");g.setAttribute("name","type-embedhtmldialog");f=g.cloneNode(!0);f.setAttribute("value","copy");h.appendChild(f);var l=document.createElement("span");mxUtils.write(l,mxResources.get("includeCopyOfMyDiagram"));h.appendChild(l);
-mxUtils.br(h);h.appendChild(g);l=document.createElement("span");mxUtils.write(l,mxResources.get("publicDiagramUrl"));h.appendChild(l);var k=this.getCurrentFile();null==c&&null!=k&&k.constructor==window.DriveFile&&(l=document.createElement("a"),l.style.paddingLeft="12px",l.style.color="gray",l.setAttribute("href","javascript:void(0);"),mxUtils.write(l,mxResources.get("share")),h.appendChild(l),mxEvent.addListener(l,"click",mxUtils.bind(this,function(){this.hideDialog();this.drive.showPermissions(k.getId())})));
-f.setAttribute("checked","checked");null==c&&g.setAttribute("disabled","disabled");e.appendChild(h);var n=this.addLinkSection(e),m=this.addCheckbox(e,mxResources.get("zoom"),!0,null,!0);mxUtils.write(e,":");var D=document.createElement("input");D.setAttribute("type","text");D.style.marginRight="16px";D.style.width="60px";D.style.marginLeft="4px";D.style.marginRight="12px";D.value="100%";e.appendChild(D);var B=this.addCheckbox(e,mxResources.get("fit"),!0),h=null!=this.pages&&1<this.pages.length,A=
-A=this.addCheckbox(e,mxResources.get("allPages"),h,!h),G=this.addCheckbox(e,mxResources.get("layers"),!0),z=this.addCheckbox(e,mxResources.get("lightbox"),!0),E=this.addEditButton(e,z),C=E.getEditInput();C.style.marginBottom="16px";mxEvent.addListener(z,"change",function(){z.checked?C.removeAttribute("disabled"):C.setAttribute("disabled","disabled");C.checked&&z.checked?E.getEditSelect().removeAttribute("disabled"):E.getEditSelect().setAttribute("disabled","disabled")});a=new CustomDialog(this,e,
-mxUtils.bind(this,function(){d(g.checked?c:null,m.checked,D.value,n.getTarget(),n.getColor(),B.checked,A.checked,G.checked,z.checked,E.getLink())}),null,a,b);this.showDialog(a.container,340,360,!0,!0);f.focus()};EditorUi.prototype.showPublishLinkDialog=function(a,b,c,d,f,g){var e=document.createElement("div");e.style.whiteSpace="nowrap";var h=document.createElement("h3");mxUtils.write(h,a||mxResources.get("link"));h.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:12px";e.appendChild(h);
-var l=this.getCurrentFile(),h="https://desk.draw.io/support/solutions/articles/16000051941";a=0;if(null!=l&&l.constructor==window.DriveFile&&!b){a=80;var h="https://desk.draw.io/support/solutions/articles/16000039384",k=document.createElement("div");k.style.cssText="border-bottom:1px solid lightGray;padding-bottom:14px;padding-top:6px;margin-bottom:14px;text-align:center;";var n=document.createElement("div");n.style.whiteSpace="normal";mxUtils.write(n,mxResources.get("linkAccountRequired"));k.appendChild(n);
-n=mxUtils.button(mxResources.get("share"),mxUtils.bind(this,function(){this.drive.showPermissions(l.getId())}));n.style.marginTop="12px";n.className="geBtn";k.appendChild(n);e.appendChild(k);n=document.createElement("a");n.style.paddingLeft="12px";n.style.color="gray";n.style.fontSize="11px";n.setAttribute("href","javascript:void(0);");mxUtils.write(n,mxResources.get("check"));k.appendChild(n);mxEvent.addListener(n,"click",mxUtils.bind(this,function(){this.spinner.spin(document.body,mxResources.get("loading"))&&
-this.getPublicUrl(this.getCurrentFile(),mxUtils.bind(this,function(a){this.spinner.stop();a=new ErrorDialog(this,null,mxResources.get(null!=a?"diagramIsPublic":"diagramIsNotPublic"),mxResources.get("ok"));this.showDialog(a.container,300,80,!0,!1);a.init()}))}))}var m=null,p=null;if(null!=c||null!=d)a+=30,mxUtils.write(e,mxResources.get("width")+":"),m=document.createElement("input"),m.setAttribute("type","text"),m.style.marginRight="16px",m.style.width="50px",m.style.marginLeft="6px",m.style.marginRight=
-"16px",m.style.marginBottom="10px",m.value="100%",e.appendChild(m),mxUtils.write(e,mxResources.get("height")+":"),p=document.createElement("input"),p.setAttribute("type","text"),p.style.width="50px",p.style.marginLeft="6px",p.style.marginBottom="10px",p.value=d+"px",e.appendChild(p),mxUtils.br(e);var t=this.addLinkSection(e,g);c=null!=this.pages&&1<this.pages.length;var A=null;if(null==l||l.constructor!=window.DriveFile||b)A=this.addCheckbox(e,mxResources.get("allPages"),c,!c);var G=this.addCheckbox(e,
-mxResources.get("lightbox"),!0),z=this.addEditButton(e,G),E=z.getEditInput(),C=this.addCheckbox(e,mxResources.get("layers"),!0);C.style.marginLeft=E.style.marginLeft;C.style.marginBottom="16px";C.style.marginTop="8px";mxEvent.addListener(G,"change",function(){G.checked?(C.removeAttribute("disabled"),E.removeAttribute("disabled")):(C.setAttribute("disabled","disabled"),E.setAttribute("disabled","disabled"));E.checked&&G.checked?z.getEditSelect().removeAttribute("disabled"):z.getEditSelect().setAttribute("disabled",
-"disabled")});b=new CustomDialog(this,e,mxUtils.bind(this,function(){f(t.getTarget(),t.getColor(),null==A?!0:A.checked,G.checked,z.getLink(),C.checked,null!=m?m.value:null,null!=p?p.value:null)}),null,mxResources.get("create"),h);this.showDialog(b.container,340,246+a,!0,!0);null!=m?(m.focus(),mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode||mxClient.IS_QUIRKS?m.select():document.execCommand("selectAll",!1,null)):t.focus()};EditorUi.prototype.showRemoteExportDialog=function(a,b,c,d){var e=
-document.createElement("div");e.style.whiteSpace="nowrap";var f=document.createElement("h3");mxUtils.write(f,mxResources.get("image"));f.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:4px";e.appendChild(f);var h=this.addCheckbox(e,mxResources.get("selectionOnly"),!1,this.editor.graph.isSelectionEmpty()),g=d?null:this.addCheckbox(e,mxResources.get("includeCopyOfMyDiagram"),!0);null!=g&&(g.style.marginBottom="16px");a=new CustomDialog(this,e,mxUtils.bind(this,function(){c(!h.checked,
-null!=g?g.checked:!1)}),null,a,b);this.showDialog(a.container,300,d?100:146,!0,!0)};EditorUi.prototype.showExportDialog=function(a,b,c,d,f,g,k,m){k=null!=k?k:!0;var e=document.createElement("div");e.style.whiteSpace="nowrap";var h=this.editor.graph,l="jpeg"==m?170:280,n=document.createElement("h3");mxUtils.write(n,a);n.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:10px";e.appendChild(n);mxUtils.write(e,mxResources.get("zoom")+":");var p=document.createElement("input");p.setAttribute("type",
-"text");p.style.marginRight="16px";p.style.width="60px";p.style.marginLeft="4px";p.style.marginRight="12px";p.value=this.lastExportZoom||"100%";e.appendChild(p);mxUtils.write(e,mxResources.get("borderWidth")+":");var q=document.createElement("input");q.setAttribute("type","text");q.style.marginRight="16px";q.style.width="60px";q.style.marginLeft="4px";q.value=this.lastExportBorder||"0";e.appendChild(q);mxUtils.br(e);var u=this.addCheckbox(e,mxResources.get("transparentBackground"),h.background==mxConstants.NONE||
-null==h.background,null,null,"jpeg"!=m),t=this.addCheckbox(e,mxResources.get("selectionOnly"),!1,h.isSelectionEmpty()),z=document.createElement("input");z.style.marginTop="16px";z.style.marginRight="8px";z.style.marginLeft="24px";z.setAttribute("disabled","disabled");z.setAttribute("type","checkbox");g&&(e.appendChild(z),mxUtils.write(e,mxResources.get("crop")),mxUtils.br(e),l+=26,mxEvent.addListener(t,"change",function(){t.checked?z.removeAttribute("disabled"):z.setAttribute("disabled","disabled")}));
-h.isSelectionEmpty()||(z.setAttribute("checked","checked"),z.defaultChecked=!0);var E=this.addCheckbox(e,mxResources.get("shadow"),h.shadowVisible),C=document.createElement("input");C.style.marginTop="16px";C.style.marginRight="8px";C.setAttribute("type","checkbox");!this.isOffline()&&this.canvasSupported||C.setAttribute("disabled","disabled");b&&(e.appendChild(C),mxUtils.write(e,mxResources.get("embedImages")),mxUtils.br(e),l+=26);var L=this.addCheckbox(e,mxResources.get("includeCopyOfMyDiagram"),
-k,null,null,"jpeg"!=m),F=null!=this.pages&&1<this.pages.length,H=this.addCheckbox(e,F?mxResources.get("allPages"):"",F,!F,null,"jpeg"!=m);H.style.marginLeft="24px";H.style.marginBottom="16px";F||(H.style.visibility="hidden");mxEvent.addListener(L,"change",function(){L.checked&&F?H.removeAttribute("disabled"):H.setAttribute("disabled","disabled")});k&&F||H.setAttribute("disabled","disabled");a=new CustomDialog(this,e,mxUtils.bind(this,function(){this.lastExportBorder=q.value;this.lastExportZoom=p.value;
-f(p.value,u.checked,!t.checked,E.checked,L.checked,C.checked,q.value,z.checked,!H.checked)}),null,c,d);this.showDialog(a.container,320,l,!0,!0);p.focus();mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode||mxClient.IS_QUIRKS?p.select():document.execCommand("selectAll",!1,null)};EditorUi.prototype.showEmbedImageDialog=function(a,b,c,d,f){var e=document.createElement("div");e.style.whiteSpace="nowrap";var h=this.editor.graph;if(null!=b){var g=document.createElement("h3");mxUtils.write(g,b);g.style.cssText=
-"width:100%;text-align:center;margin-top:0px;margin-bottom:4px";e.appendChild(g)}var l=this.addCheckbox(e,mxResources.get("fit"),!0),k=this.addCheckbox(e,mxResources.get("shadow"),h.shadowVisible&&d,!d),n=this.addCheckbox(e,c),m=this.addCheckbox(e,mxResources.get("lightbox"),!0),p=this.addEditButton(e,m),B=p.getEditInput(),A=1<h.model.getChildCount(h.model.getRoot()),G=this.addCheckbox(e,mxResources.get("layers"),A,!A);G.style.marginLeft=B.style.marginLeft;G.style.marginBottom="12px";G.style.marginTop=
-"8px";mxEvent.addListener(m,"change",function(){m.checked?(A&&G.removeAttribute("disabled"),B.removeAttribute("disabled")):(G.setAttribute("disabled","disabled"),B.setAttribute("disabled","disabled"));B.checked&&m.checked?p.getEditSelect().removeAttribute("disabled"):p.getEditSelect().setAttribute("disabled","disabled")});b=new CustomDialog(this,e,mxUtils.bind(this,function(){a(l.checked,k.checked,n.checked,m.checked,p.getLink(),G.checked)}),null,mxResources.get("embed"),f);this.showDialog(b.container,
-280,280,!0,!0)};EditorUi.prototype.createEmbedImage=function(a,b,c,d,f,g,k,m){function e(b){var e=" ",l="";d&&(e=" onclick=\"(function(img){if(img.wnd!=null&&!img.wnd.closed){img.wnd.focus();}else{var r=function(evt){if(evt.data=='ready'&&evt.source==img.wnd){img.wnd.postMessage(decodeURIComponent(img.getAttribute('src')),'*');window.removeEventListener('message',r);}};window.addEventListener('message',r);img.wnd=window.open('https://www.draw.io/?client=1&lightbox=1"+(f?"&edit=_blank":"")+(g?"&layers=1":
-"")+"');}})(this);\"",l+="cursor:pointer;");a&&(l+="max-width:100%;");var n="";c&&(n=' width="'+Math.round(h.width)+'" height="'+Math.round(h.height)+'"');k('<img src="'+b+'"'+n+(""!=l?' style="'+l+'"':"")+e+"/>")}var h=this.editor.graph.getGraphBounds();if(this.isExportToCanvas())this.exportToCanvas(mxUtils.bind(this,function(a){var b=d?this.getFileData(!0):null;a=this.createImageDataUri(a,b,"png");e(a)}),null,null,null,mxUtils.bind(this,function(a){m({message:mxResources.get("unknownError")})}),
+p&&null!=p.message?":err:"+encodeURIComponent(p.message):"")+(null!=p&&null!=p.stack?"&stack="+encodeURIComponent(p.stack):"")}catch(u){}this.handleError(p,mxResources.get("errorLoadingFile"),mxUtils.bind(this,function(){null!=urlParams.url&&this.spinner.spin(document.body,mxResources.get("reconnecting"))?window.location.search=this.getSearch(["url"]):null!=c?c.constructor==DriveFile?this.loadFile(c.getHash()):this.fileLoaded(c):d()}))}else d();return b};EditorUi.prototype.restoreLibraries=function(){};
+EditorUi.prototype.saveLibrary=function(a,b,c,d,f,g,k){};EditorUi.prototype.isScratchpadEnabled=function(){return isLocalStorage||mxClient.IS_CHROMEAPP};EditorUi.prototype.toggleScratchpad=function(){this.isScratchpadEnabled()&&(null==this.scratchpad?this.getLocalData(".scratchpad",mxUtils.bind(this,function(a){null==a&&(a=this.emptyLibraryXml);this.loadLibrary(new StorageLibrary(this,a,".scratchpad"))})):this.closeLibrary(this.scratchpad))};EditorUi.prototype.createLibraryDataFromImages=function(a){var b=
+mxUtils.createXmlDocument(),c=b.createElement("mxlibrary");mxUtils.setTextContent(c,JSON.stringify(a));b.appendChild(c);return mxUtils.getXml(b)};EditorUi.prototype.closeLibrary=function(a){null!=a&&(this.removeLibrarySidebar(a.getHash()),a.constructor!=LocalLibrary&&mxSettings.removeCustomLibrary(a.getHash()),".scratchpad"==a.title&&(this.scratchpad=null))};EditorUi.prototype.removeLibrarySidebar=function(a){var b=this.sidebar.palettes[a];if(null!=b){for(var c=0;c<b.length;c++)b[c].parentNode.removeChild(b[c]);
+delete this.sidebar.palettes[a]}};EditorUi.prototype.repositionLibrary=function(a){var b=this.sidebar.container;if(null==a){var c=this.sidebar.palettes["L.scratchpad"];null==c&&(c=this.sidebar.palettes.search);null!=c&&(a=c[c.length-1].nextSibling)}a=null!=a?a:b.firstChild.nextSibling.nextSibling;var c=b.lastChild,d=c.previousSibling;b.insertBefore(c,a);b.insertBefore(d,c)};EditorUi.prototype.loadLibrary=function(a){var b=mxUtils.parseXml(a.getData());if("mxlibrary"==b.documentElement.nodeName){var c=
+JSON.parse(mxUtils.getTextContent(b.documentElement));this.libraryLoaded(a,c,b.documentElement.getAttribute("title"))}else throw{message:mxResources.get("notALibraryFile")};};EditorUi.prototype.getLibraryStorageHint=function(a){return""};EditorUi.prototype.libraryLoaded=function(a,b,c){a.constructor!=LocalLibrary&&mxSettings.addCustomLibrary(a.getHash());".scratchpad"==a.title&&(this.scratchpad=a);var d=this.sidebar.palettes[a.getHash()],d=null!=d?d[d.length-1].nextSibling:null;this.removeLibrarySidebar(a.getHash());
+var e=null,h=mxUtils.bind(this,function(b,c){if(0==b.length&&a.isEditable())null==e&&(e=document.createElement("div"),mxUtils.setPrefixedStyle(e.style,"borderRadius","6px"),e.style.border="3px dotted lightGray",e.style.textAlign="center",e.style.padding="8px",e.style.color="#B3B3B3",mxUtils.write(e,mxResources.get("dragElementsHere"))),c.appendChild(e);else for(var d=0;d<b.length;d++){var h=b[d],l=h.data;if(null!=l){var l=this.convertDataUri(l),f="shape=image;verticalLabelPosition=bottom;verticalAlign=top;imageAspect=0;";
+"fixed"==h.aspect&&(f+="aspect=fixed;");c.appendChild(this.sidebar.createVertexTemplate(f+"image="+l,h.w,h.h,"",h.title||"",!1,!1,!1))}else null!=h.xml&&(l=this.stringToCells(this.editor.graph.decompress(h.xml)),0<l.length&&c.appendChild(this.sidebar.createVertexTemplateFromCells(l,h.w,h.h,h.title||"",!0,!1,!1)))}});c=null!=c&&0<c.length?c:a.getTitle();var l=this.sidebar.addPalette(a.getHash(),c,!0,mxUtils.bind(this,function(a){h(b,a)}));this.repositionLibrary(d);var f=l.parentNode.previousSibling;
+c=f.getAttribute("title");null!=c&&0<c.length&&".scratchpad"!=a.title&&f.setAttribute("title",this.getLibraryStorageHint(a)+"\n"+c);var g=document.createElement("div");g.style.position="absolute";g.style.right="0px";g.style.top="5px";mxClient.IS_QUIRKS||8==document.documentMode||(g.style.backgroundColor="inherit");f.style.position="relative";var k=document.createElement("img");k.setAttribute("src",Dialog.prototype.closeImage);k.setAttribute("title",mxResources.get("close"));k.setAttribute("align",
+"top");k.setAttribute("border","0");k.className="geButton";k.style.marginRight="1px";k.style.marginTop="-1px";g.appendChild(k);var m=null;mxEvent.addListener(k,"click",mxUtils.bind(this,function(b){if(!mxEvent.isConsumed(b)){var c=mxUtils.bind(this,function(){this.closeLibrary(a)});null!=m?this.confirm(mxResources.get("allChangesLost"),null,c,mxResources.get("cancel"),mxResources.get("discardChanges")):c();mxEvent.consume(b)}}));mxEvent.addListener(l,"mousemove",mxUtils.bind(this,function(a){mxEvent.getSource(a)==
+l?l.setAttribute("title",mxResources.get("libraryTooltip")):l.removeAttribute("title")}));if(a.isEditable()){var v=this.editor.graph,C=mxUtils.bind(this,function(c){this.showLibraryDialog(a.getTitle(),l,b,a,a.getMode());mxEvent.consume(c)}),B=mxUtils.bind(this,function(c){a.setModified(!0);a.isAutosave()?(null!=z&&null!=z.parentNode&&z.parentNode.removeChild(z),z=k.cloneNode(!1),z.setAttribute("src",Editor.spinImage),z.setAttribute("title",mxResources.get("saving")),z.style.cursor="default",z.style.marginRight=
+"2px",z.style.marginTop="-2px",g.insertBefore(z,g.firstChild),f.style.paddingRight=18*g.childNodes.length+"px",this.saveLibrary(a.getTitle(),b,a,a.getMode(),!0,!0,function(){null!=z&&null!=z.parentNode&&(z.parentNode.removeChild(z),f.style.paddingRight=18*g.childNodes.length+"px")})):null==m&&(m=k.cloneNode(!1),m.setAttribute("src",IMAGE_PATH+"/download.png"),m.setAttribute("title",mxResources.get("save")),g.insertBefore(m,g.firstChild),mxEvent.addListener(m,"click",mxUtils.bind(this,function(c){this.saveLibrary(a.getTitle(),
+b,a,a.getMode(),a.constructor==LocalLibrary,!0,function(){null==m||a.isModified()||(f.style.paddingRight=18*g.childNodes.length+"px",m.parentNode.removeChild(m),m=null)});mxEvent.consume(c)})),f.style.paddingRight=18*g.childNodes.length+"px")}),A=mxUtils.bind(this,function(a,c,d,h){a=v.cloneCells(mxUtils.sortCells(v.model.getTopmostCells(a)));for(var f=0;f<a.length;f++){var g=v.getCellGeometry(a[f]);null!=g&&g.translate(-c.x,-c.y)}l.appendChild(this.sidebar.createVertexTemplateFromCells(a,c.width,
+c.height,h||"",!0,!1,!1));a={xml:this.editor.graph.compress(mxUtils.getXml(this.editor.graph.encodeCells(a))),w:c.width,h:c.height};null!=h&&(a.title=h);b.push(a);B(d);null!=e&&null!=e.parentNode&&0<b.length&&(e.parentNode.removeChild(e),e=null)}),G=mxUtils.bind(this,function(a){if(v.isSelectionEmpty())v.getRubberband().isActive()?(v.getRubberband().execute(a),v.getRubberband().reset()):this.showError(mxResources.get("error"),mxResources.get("nothingIsSelected"),mxResources.get("ok"));else{var b=
+v.getSelectionCells(),c=v.view.getBounds(b),d=v.view.scale;c.x/=d;c.y/=d;c.width/=d;c.height/=d;c.x-=v.view.translate.x;c.y-=v.view.translate.y;A(b,c)}mxEvent.consume(a)});l.style.border="3px solid transparent";mxEvent.addGestureListeners(l,function(){},mxUtils.bind(this,function(a){v.isMouseDown&&null!=v.panningManager&&null!=v.graphHandler.shape&&(v.graphHandler.shape.node.style.visibility="hidden",null!=e?e.style.border="3px dotted rgb(254, 137, 12)":l.style.border="3px dotted rgb(254, 137, 12)",
+l.style.cursor="copy",v.panningManager.stop(),v.autoScroll=!1,null!=v.graphHandler.guide&&v.graphHandler.guide.setVisible(!1),null!=v.graphHandler.hint&&(v.graphHandler.hint.style.visibility="hidden"),mxEvent.consume(a))}),mxUtils.bind(this,function(a){v.isMouseDown&&null!=v.panningManager&&null!=v.graphHandler&&(l.style.border="3px solid transparent",null!=e&&(e.style.border="3px dotted lightGray"),l.style.cursor="default",this.sidebar.showTooltips=!0,v.panningManager.stop(),v.graphHandler.reset(),
+v.isMouseDown=!1,v.autoScroll=!0,G(a),mxEvent.consume(a))}));mxEvent.addListener(l,"mouseleave",mxUtils.bind(this,function(a){v.isMouseDown&&null!=v.graphHandler.shape&&(v.graphHandler.shape.node.style.visibility="visible",l.style.border="3px solid transparent",l.style.cursor="",v.autoScroll=!0,null!=v.graphHandler.guide&&v.graphHandler.guide.setVisible(!0),null!=v.graphHandler.hint&&(v.graphHandler.hint.style.visibility="visible"),null!=e&&(e.style.border="3px dotted lightGray"))}));Graph.fileSupport&&
+(mxEvent.addListener(l,"dragover",mxUtils.bind(this,function(a){null!=e?e.style.border="3px dotted rgb(254, 137, 12)":l.style.border="3px dotted rgb(254, 137, 12)";a.dataTransfer.dropEffect="copy";l.style.cursor="copy";this.sidebar.hideTooltip();a.stopPropagation();a.preventDefault()})),mxEvent.addListener(l,"drop",mxUtils.bind(this,function(a){l.style.border="3px solid transparent";l.style.cursor="";null!=e&&(e.style.border="3px dotted lightGray");0<a.dataTransfer.files.length&&this.importFiles(a.dataTransfer.files,
+0,0,this.maxImageSize,mxUtils.bind(this,function(c,d,f,g,n,k,m,w,p){if(null!=c&&"image/"==d.substring(0,6))c="shape=image;verticalLabelPosition=bottom;verticalAlign=top;aspect=fixed;image="+this.convertDataUri(c),c=[new mxCell("",new mxGeometry(0,0,n,k),c)],c[0].vertex=!0,A(c,new mxRectangle(0,0,n,k),a,mxEvent.isAltDown(a)?null:m.substring(0,m.lastIndexOf(".")).replace(/_/g," ")),null!=e&&null!=e.parentNode&&0<b.length&&(e.parentNode.removeChild(e),e=null);else{var v=!1,q=mxUtils.bind(this,function(c,
+d){if(null!=c&&"text/xml"==d){var f=mxUtils.parseXml(c);if("mxlibrary"==f.documentElement.nodeName)try{var g=JSON.parse(mxUtils.getTextContent(f.documentElement));h(g,l);b=b.concat(g);B(a);this.spinner.stop();v=!0}catch(V){}else if("mxfile"==f.documentElement.nodeName)try{for(var n=f.documentElement.getElementsByTagName("diagram"),f=0;f<n.length;f++){var g=mxUtils.getTextContent(n[f]),k=this.stringToCells(this.editor.graph.decompress(g)),m=this.editor.graph.getBoundingBoxFromGeometry(k);A(k,new mxRectangle(0,
+0,m.width,m.height),a)}v=!0}catch(V){null!=window.console&&console.log("error in drop handler:",V)}}v||(this.spinner.stop(),this.handleError({message:mxResources.get("errorLoadingFile")}));null!=e&&null!=e.parentNode&&0<b.length&&(e.parentNode.removeChild(e),e=null)});!this.isOffline()&&(new XMLHttpRequest).upload&&this.isRemoteFileFormat(c,m)&&null!=p?this.parseFile(p,mxUtils.bind(this,function(a){4==a.readyState&&(this.spinner.stop(),200<=a.status&&299>=a.status?q(a.responseText,"text/xml"):this.handleError({message:mxResources.get(413==
+a.status?"drawingTooLarge":"invalidOrMissingFile")},mxResources.get("errorLoadingFile")))})):q(c,d)}}));a.stopPropagation();a.preventDefault()})),mxEvent.addListener(l,"dragleave",function(a){null!=e?e.style.border="3px dotted lightGray":(l.style.border="3px solid transparent",l.style.cursor="");a.stopPropagation();a.preventDefault()}));k=k.cloneNode(!1);k.setAttribute("src",IMAGE_PATH+"/edit.gif");k.setAttribute("title",mxResources.get("edit"));g.insertBefore(k,g.firstChild);mxEvent.addListener(k,
+"click",C);mxEvent.addListener(l,"dblclick",function(a){mxEvent.getSource(a)==l&&C(a)});k=k.cloneNode(!1);k.setAttribute("src",Editor.plusImage);k.setAttribute("title",mxResources.get("add"));g.insertBefore(k,g.firstChild);this.isOffline()||".scratchpad"!=a.title||(c=document.createElement("span"),c.setAttribute("title",mxResources.get("help")),c.style.cssText="color:gray;text-decoration:none;",c.className="geButton",mxUtils.write(c,"?"),mxEvent.addGestureListeners(c,mxUtils.bind(this,function(a){window.open("https://desk.draw.io/support/solutions/articles/16000042367");
+mxEvent.consume(a)})),g.insertBefore(c,g.firstChild));var z=null;mxEvent.addListener(k,"click",G)}f.appendChild(g);f.style.paddingRight=18*g.childNodes.length+"px"};"1"==urlParams.offline?EditorUi.prototype.footerHeight=4:("atlas"==uiTheme?("undefined"!==typeof Toolbar&&(Toolbar.prototype.unselectedBackground=mxClient.IS_QUIRKS?"none":"linear-gradient(rgb(255, 255, 255) 0px, rgb(242, 242, 242) 100%)",Toolbar.prototype.selectedBackground="rgb(242, 242, 242)"),Editor.prototype.initialTopSpacing=3,EditorUi.prototype.menubarHeight=
+41,EditorUi.prototype.toolbarHeight=38,EditorUi.prototype.hsplitPosition=188,Sidebar.prototype.thumbWidth=46,Sidebar.prototype.thumbHeight=46,Sidebar.prototype.thumbPadding=5<=document.documentMode?0:1,Sidebar.prototype.thumbBorder=2):"1"==urlParams.savesidebar&&(Sidebar.prototype.thumbWidth=64,Sidebar.prototype.thumbHeight=64),EditorUi.prototype.footerHeight=760<=screen.width&&240<=screen.height?46:0,EditorUi.prototype.createFooter=function(){var a=document.getElementById("geFooter");if(null!=a){a.style.visibility=
+"visible";var b=document.createElement("img");b.setAttribute("border","0");b.setAttribute("src",Dialog.prototype.closeImage);b.setAttribute("title",mxResources.get("hide"));a.appendChild(b);mxClient.IS_QUIRKS&&(b.style.position="relative",b.style.styleFloat="right",b.style.top="-30px",b.style.left="164px",b.style.cursor="pointer");mxEvent.addListener(b,"click",mxUtils.bind(this,function(){this.hideFooter()}))}return a});EditorUi.prototype.hideFooter=function(){var a=document.getElementById("geFooter");
+null!=a&&(this.footerHeight=0,a.style.display="none",this.refresh())};EditorUi.prototype.showImageDialog=function(a,b,c,d,f){a=new ImageDialog(this,a,b,c,d,f);this.showDialog(a.container,Graph.fileSupport?440:360,Graph.fileSupport?200:90,!0,!0);a.init()};EditorUi.prototype.showBackgroundImageDialog=function(a){a=null!=a?a:mxUtils.bind(this,function(a){a=new ChangePageSetup(this,null,a);a.ignoreColor=!0;this.editor.graph.model.execute(a)});var b=new BackgroundImageDialog(this,mxUtils.bind(this,function(b){a(b)}));
+this.showDialog(b.container,360,200,!0,!0);b.init()};EditorUi.prototype.showLibraryDialog=function(a,b,c,d,f){a=new LibraryDialog(this,a,b,c,d,f);this.showDialog(a.container,620,440,!0,!1,mxUtils.bind(this,function(a){a&&null==this.getCurrentFile()&&"1"!=urlParams.embed&&this.showSplash()}));a.init()};EditorUi.prototype.createSidebarFooterContainer=function(){var a=this.createDiv("geSidebarContainer");a.style.position="absolute";a.style.overflow="hidden";a.style.borderWidth="3px";var b=document.createElement("a");
+b.setAttribute("href","javascript:void(0);");b.className="geTitle";b.style.height="100%";b.style.paddingTop="9px";mxUtils.write(b,mxResources.get("moreShapes")+"...");mxEvent.addListener(b,"click",mxUtils.bind(this,function(a){this.actions.get("shapes").funct();mxEvent.consume(a)}));a.appendChild(b);return a};EditorUi.prototype.handleError=function(a,b,c){var d=null!=this.spinner&&null!=this.spinner.pause?this.spinner.pause():function(){},e=null!=a&&null!=a.error?a.error:a;if(null!=e||null!=b){a=
+mxUtils.htmlEntities(mxResources.get("unknownError"));var h=mxResources.get("ok"),f=null;b=null!=b?b:mxResources.get("error");if(null!=e)if(null!=e.retry&&(h=mxResources.get("cancel"),f=function(){d();e.retry()}),"undefined"!=typeof gapi&&"undefined"!=typeof gapi.drive&&"undefined"!=typeof gapi.drive.realtime&&e.type==gapi.drive.realtime.ErrorType.FORBIDDEN)a=mxUtils.htmlEntities(mxResources.get("forbidden"));else if(404==e.code||404==e.status||"undefined"!=typeof gapi&&"undefined"!=typeof gapi.drive&&
+"undefined"!=typeof gapi.drive.realtime&&e.type==gapi.drive.realtime.ErrorType.NOT_FOUND){a=mxUtils.htmlEntities(mxResources.get("fileNotFoundOrDenied"));var l=window.location.hash;null!=l&&"#G"==l.substring(0,2)&&(l=l.substring(2),a+=' <a href="https://drive.google.com/open?id='+l+'" target="_blank">'+mxUtils.htmlEntities(mxResources.get("tryOpeningViaThisPage"))+"</a>")}else e.code==App.ERROR_TIMEOUT?a=mxUtils.htmlEntities(mxResources.get("timeout")):e.code==App.ERROR_BUSY?a=mxUtils.htmlEntities(mxResources.get("busy")):
+null!=e.message?a=mxUtils.htmlEntities(e.message):null!=e.response&&null!=e.response.error&&(a=mxUtils.htmlEntities(e.response.error));this.showError(b,a,h,c,f)}else null!=c&&c()};EditorUi.prototype.showError=function(a,b,c,d,f,g,k){a=new ErrorDialog(this,a,b,c,d,f,g,k);this.showDialog(a.container,340,150,!0,!1);a.init()};EditorUi.prototype.alert=function(a,b){var c=new ErrorDialog(this,null,a,mxResources.get("ok"),b);this.showDialog(c.container,340,100,!0,!1);c.init()};EditorUi.prototype.confirm=
+function(a,b,c,d,f){var e=null!=this.spinner&&null!=this.spinner.pause?this.spinner.pause():function(){};this.showDialog((new ConfirmDialog(this,a,function(){e();null!=b&&b()},function(){e();null!=c&&c()},d,f)).container,340,90,!0,!1)};EditorUi.prototype.setCurrentFile=function(a){this.currentFile=a};EditorUi.prototype.getCurrentFile=function(){return this.currentFile};EditorUi.prototype.isExportToCanvas=function(){return mxClient.IS_CHROMEAPP||!this.editor.graph.mathEnabled&&this.useCanvasForExport};
+EditorUi.prototype.createSvgDataUri=function(a){return"data:image/svg+xml;base64,"+btoa(unescape(encodeURIComponent(a)))};EditorUi.prototype.createImageDataUri=function(a,b,c){var d=a.toDataURL("image/"+c);if(6>=d.length||d==a.cloneNode(!1).toDataURL("image/"+c))throw{message:"Invalid image"};null!=b&&(d=this.writeGraphModelToPng(d,"zTXt","mxGraphModel",atob(this.editor.graph.compress(b))));return d};EditorUi.prototype.saveCanvas=function(a,b,c){var d="jpeg"==c?"jpg":c,e=this.getBaseFilename()+"."+
+d;a=this.createImageDataUri(a,b,c);this.saveData(e,d,a.substring(a.lastIndexOf(",")+1),"image/"+c,!0)};EditorUi.prototype.isLocalFileSave=function(){return"remote"!=urlParams.save&&(mxClient.IS_IE||"undefined"!==typeof window.Blob&&"undefined"!==typeof window.URL)&&9!=document.documentMode&&8!=document.documentMode&&7!=document.documentMode&&!mxClient.IS_QUIRKS||this.isOfflineApp()||mxClient.IS_IOS};EditorUi.prototype.doSaveLocalFile=function(a,b,c,d,f){if(window.Blob&&navigator.msSaveOrOpenBlob)a=
+d?this.base64ToBlob(a,c):new Blob([a],{type:c}),navigator.msSaveOrOpenBlob(a,b);else if(mxClient.IS_IE)c=window.open("about:blank","_blank"),null==c?mxUtils.popup(a,!0):(c.document.write(a),c.document.close(),c.document.execCommand("SaveAs",!0,b),c.close());else if(mxClient.IS_IOS)b=new TextareaDialog(this,b+":",a,null,null,mxResources.get("close")),b.textarea.style.width="600px",b.textarea.style.height="380px",this.showDialog(b.container,620,460,!0,!0),b.init(),document.execCommand("selectall",!1,
+null);else{var e=document.createElement("a"),h=!mxClient.IS_SF&&"undefined"!==typeof e.download;if(h||this.isOffline()){e.href=URL.createObjectURL(d?this.base64ToBlob(a,c):new Blob([a],{type:c}));h?e.download=b:e.setAttribute("target","_blank");document.body.appendChild(e);try{window.setTimeout(function(){URL.revokeObjectURL(e.href)},0),e.click(),e.parentNode.removeChild(e)}catch(q){}}else this.createEchoRequest(a,b,c,d,f).simulate(document,"_blank")}};EditorUi.prototype.createEchoRequest=function(a,
+b,c,d,f,g){a="xml="+encodeURIComponent(a);return new mxXmlRequest(SAVE_URL,a+(null!=c?"&mime="+c:"")+(null!=f?"&format="+f:"")+(null!=g?"&base64="+g:"")+(null!=b?"&filename="+encodeURIComponent(b):"")+(d?"&binary=1":""))};EditorUi.prototype.base64ToBlob=function(a,b){b=b||"";for(var c=atob(a),d=c.length,e=Math.ceil(d/1024),f=Array(e),h=0;h<e;++h){for(var g=1024*h,k=Math.min(g+1024,d),m=Array(k-g),w=0;g<k;++w,++g)m[w]=c[g].charCodeAt(0);f[h]=new Uint8Array(m)}return new Blob(f,{type:b})};EditorUi.prototype.saveLocalFile=
+function(a,b,c,d,f,g){g=null!=g?g:!1;var e="vsdx"!=f&&(!mxClient.IS_IOS||!navigator.standalone);f=this.getServiceCount(g);b=new CreateDialog(this,b,mxUtils.bind(this,function(b,e){try{if("_blank"==e)if(null==c||"image/"!=c.substring(0,6)||"image/svg"==c.substring(0,9)&&!mxClient.IS_SVG){var f=window.open("about:blank");null==f?mxUtils.popup(a,!0):(f.document.write(mxUtils.htmlEntities(a,!1)),f.document.close())}else this.openInNewWindow(a,c,d);else e==App.MODE_DEVICE?this.doSaveLocalFile(a,b,c,d):
+null!=b&&0<b.length&&this.pickFolder(e,mxUtils.bind(this,function(f){try{this.exportFile(a,b,c,d,e,f)}catch(v){this.handleError(v)}}))}catch(w){this.handleError(w)}}),mxUtils.bind(this,function(){this.hideDialog()}),mxResources.get("saveAs"),mxResources.get("download"),!1,g,e,null,null,4<f?3:4,a,c,d);this.showDialog(b.container,380,4<f?390:270,!0,!0);b.init()};EditorUi.prototype.openInNewWindow=function(a,b,c){if(mxClient.IS_GC||mxClient.IS_EDGE||11==document.documentMode||10==document.documentMode){var d=
+window.open("about:blank");null==d?mxUtils.popup(a,!0):(d.document.write('<html><img src="data:'+b+(c?";base64,"+a:";charset=utf8,"+encodeURIComponent(a))+'"/></html>'),d.document.close())}else d=window.open("data:"+b+(c?";base64,"+a:";charset=utf8,"+encodeURIComponent(a))),null==d&&mxUtils.popup(a,!0)};var b=EditorUi.prototype.addChromelessToolbarItems;EditorUi.prototype.addChromelessToolbarItems=function(a){if(this.isExportToCanvas()){this.exportDialog=null;var c=a(mxUtils.bind(this,function(a){var b=
+mxUtils.bind(this,function(){mxEvent.removeListener(this.editor.graph.container,"click",b);null!=this.exportDialog&&(this.exportDialog.parentNode.removeChild(this.exportDialog),this.exportDialog=null)});if(null!=this.exportDialog)b.apply(this);else{this.exportDialog=document.createElement("div");var d=c.getBoundingClientRect();mxUtils.setPrefixedStyle(this.exportDialog.style,"borderRadius","5px");this.exportDialog.style.position="fixed";this.exportDialog.style.textAlign="center";this.exportDialog.style.fontFamily=
+"Helvetica,Arial";this.exportDialog.style.backgroundColor="#000000";this.exportDialog.style.width="50px";this.exportDialog.style.height="50px";this.exportDialog.style.padding="4px 2px 4px 2px";this.exportDialog.style.color="#ffffff";mxUtils.setOpacity(this.exportDialog,70);this.exportDialog.style.left=d.left+"px";this.exportDialog.style.bottom=parseInt(this.chromelessToolbar.style.bottom)+this.chromelessToolbar.offsetHeight+4+"px";d=mxUtils.getCurrentStyle(this.editor.graph.container);this.exportDialog.style.zIndex=
+d.zIndex;var e=new Spinner({lines:8,length:6,width:5,radius:6,rotate:0,color:"#fff",speed:1.5,trail:60,shadow:!1,hwaccel:!1,top:"28px",zIndex:2E9});e.spin(this.exportDialog);this.exportToCanvas(mxUtils.bind(this,function(a){e.stop();this.exportDialog.style.width="auto";this.exportDialog.style.height="auto";this.exportDialog.style.padding="10px";var c=this.createImageDataUri(a,null,"png");a=document.createElement("img");a.style.maxWidth="140px";a.style.maxHeight="140px";a.style.cursor="pointer";a.setAttribute("title",
+mxResources.get("openInNewWindow"));a.setAttribute("border","0");a.setAttribute("src",c);this.exportDialog.appendChild(a);mxEvent.addListener(a,"click",mxUtils.bind(this,function(){this.openInNewWindow(c.substring(c.indexOf(",")+1),"image/png",!0);b.apply(this,arguments)}))}),null,this.thumbImageCache,null,mxUtils.bind(this,function(a){this.spinner.stop();this.handleError(a)}));mxEvent.addListener(this.editor.graph.container,"click",b);document.body.appendChild(this.exportDialog)}mxEvent.consume(a)}),
+Editor.cameraLargeImage,mxResources.get("export"))}b.apply(this,arguments)};EditorUi.prototype.saveData=function(a,b,c,d,f){this.isLocalFileSave()?this.saveLocalFile(c,a,d,f,b):this.saveRequest(a,b,mxUtils.bind(this,function(a,e){return this.createEchoRequest(c,a,d,f,b,e)}),c,f,d)};EditorUi.prototype.saveRequest=function(a,b,c,d,f,g){var e=!mxClient.IS_IOS||!navigator.standalone,h=this.getServiceCount(!1);a=new CreateDialog(this,a,mxUtils.bind(this,function(a,e){if("_blank"==e||null!=a&&0<a.length){var f=
+c("_blank"==e?null:a,e==App.MODE_DEVICE||null==e||"_blank"==e?"0":"1");null!=f&&(e==App.MODE_DEVICE||"_blank"==e?f.simulate(document,"_blank"):this.pickFolder(e,mxUtils.bind(this,function(c){g=null!=g?g:"pdf"==b?"application/pdf":"image/"+b;if(null!=d)try{this.exportFile(d,a,g,!0,e,c)}catch(C){this.handleError(C)}else this.spinner.spin(document.body,mxResources.get("saving"))&&f.send(mxUtils.bind(this,function(){this.spinner.stop();if(200<=f.getStatus()&&299>=f.getStatus())try{this.exportFile(f.getText(),
+a,g,!0,e,c)}catch(C){this.handleError(C)}else this.handleError({message:mxResources.get("errorSavingFile")})}),function(a){this.spinner.stop();this.handleError(a)})})))}}),mxUtils.bind(this,function(){this.hideDialog()}),mxResources.get("saveAs"),mxResources.get("download"),!1,!1,e,null,null,4<h?3:4,d,g,f);this.showDialog(a.container,380,4<h?390:270,!0,!0);a.init()};EditorUi.prototype.exportFile=function(a,b,c,d,f,g){};EditorUi.prototype.pickFolder=function(a,b,c){b(null)};EditorUi.prototype.exportSvg=
+function(a,b,c,d,f,g,k,m,x){if(this.spinner.spin(document.body,mxResources.get("export"))){var e=this.editor.graph.isSelectionEmpty();c=null!=c?c:e;e=b?null:this.editor.graph.background;e==mxConstants.NONE&&(e=null);null==e&&0==b&&(e="#ffffff");var h=this.editor.graph.getSvg(e,a,k,m,null,c);d&&this.editor.graph.addSvgShadow(h);var l=this.getBaseFilename()+".svg",n=mxUtils.bind(this,function(a){this.spinner.stop();f&&a.setAttribute("content",this.getFileData(!0,null,null,null,c,x));var b='<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">\n'+
+mxUtils.getXml(a);this.isLocalFileSave()||b.length<=MAX_REQUEST_SIZE?this.saveData(l,"svg",b,"image/svg+xml"):this.handleError({message:mxResources.get("drawingTooLarge")},mxResources.get("error"),mxUtils.bind(this,function(){mxUtils.popup(b)}))});this.convertMath(this.editor.graph,h,!1,mxUtils.bind(this,function(){g?(null==this.thumbImageCache&&(this.thumbImageCache={}),this.convertImages(h,n,this.thumbImageCache)):n(h)}))}};EditorUi.prototype.addCheckbox=function(a,b,c,d,f,g){g=null!=g?g:!0;var e=
+document.createElement("input");e.style.marginRight="8px";e.style.marginTop="16px";e.setAttribute("type","checkbox");c&&(e.setAttribute("checked","checked"),e.defaultChecked=!0);d&&e.setAttribute("disabled","disabled");g&&(a.appendChild(e),mxUtils.write(a,b),f||mxUtils.br(a));return e};EditorUi.prototype.addEditButton=function(a,b){var c=this.addCheckbox(a,mxResources.get("edit")+":",!0,null,!0);c.style.marginLeft="24px";var d=this.getCurrentFile(),e="";null!=d&&d.getMode()!=App.MODE_DEVICE&&d.getMode()!=
+App.MODE_BROWSER&&(e=window.location.href);var f=document.createElement("select");f.style.width="120px";f.style.marginLeft="8px";f.style.marginRight="10px";f.className="geBtn";d=document.createElement("option");d.setAttribute("value","blank");mxUtils.write(d,mxResources.get("makeCopy"));f.appendChild(d);d=document.createElement("option");d.setAttribute("value","custom");mxUtils.write(d,mxResources.get("custom")+"...");f.appendChild(d);a.appendChild(f);mxEvent.addListener(f,"change",mxUtils.bind(this,
+function(){if("custom"==f.value){var a=new FilenameDialog(this,e,mxResources.get("ok"),function(a){null!=a?e=a:f.value="blank"},mxResources.get("url"),null,null,null,null,function(){f.value="blank"});this.showDialog(a.container,300,80,!0,!1);a.init()}}));mxEvent.addListener(c,"change",mxUtils.bind(this,function(){c.checked&&(null==b||b.checked)?f.removeAttribute("disabled"):f.setAttribute("disabled","disabled")}));mxUtils.br(a);return{getLink:function(){return c.checked?"blank"===f.value?"_blank":
+e:null},getEditInput:function(){return c},getEditSelect:function(){return f}}};EditorUi.prototype.addLinkSection=function(a,b){function c(){h.innerHTML='<div style="width:100%;height:100%;box-sizing:border-box;'+(null!=f&&f!=mxConstants.NONE?"border:1px solid black;background-color:"+f:"background-position:center center;background-repeat:no-repeat;background-image:url('"+Dialog.prototype.closeImage+"')")+';"></div>'}mxUtils.write(a,mxResources.get("links")+":");var d=document.createElement("select");
+d.style.width="100px";d.style.marginLeft="8px";d.style.marginRight="10px";d.className="geBtn";var e=document.createElement("option");e.setAttribute("value","auto");mxUtils.write(e,mxResources.get("automatic"));d.appendChild(e);e=document.createElement("option");e.setAttribute("value","blank");mxUtils.write(e,mxResources.get("openInNewWindow"));d.appendChild(e);e=document.createElement("option");e.setAttribute("value","self");mxUtils.write(e,mxResources.get("openInThisWindow"));d.appendChild(e);b&&
+(e=document.createElement("option"),e.setAttribute("value","frame"),mxUtils.write(e,mxResources.get("openInThisWindow")+" ("+mxResources.get("iframe")+")"),d.appendChild(e));a.appendChild(d);mxUtils.write(a,mxResources.get("borderColor")+":");var f="#0000ff",h=null,h=mxUtils.button("",mxUtils.bind(this,function(a){this.pickColor(f||"none",function(a){f=a;c()});mxEvent.consume(a)}));c();h.style.padding=mxClient.IS_FF?"4px 2px 4px 2px":"4px";h.style.marginLeft="4px";h.style.height="22px";h.style.width=
+"22px";h.style.position="relative";h.style.top=mxClient.IS_IE||mxClient.IS_IE11||mxClient.IS_EDGE?"6px":"1px";h.className="geColorBtn";a.appendChild(h);mxUtils.br(a);return{getColor:function(){return f},getTarget:function(){return d.value},focus:function(){d.focus()}}};EditorUi.prototype.createLink=function(a,b,c,d,f,g,k,m){var e=this.getCurrentFile(),h=[];d&&(h.push("lightbox=1"),"auto"!=a&&h.push("target="+a),null!=b&&b!=mxConstants.NONE&&h.push("highlight="+("#"==b.charAt(0)?b.substring(1):b)),
+null!=f&&0<f.length&&h.push("edit="+encodeURIComponent(f)),g&&h.push("layers=1"),this.editor.graph.foldingEnabled&&h.push("nav=1"));if(c&&null!=this.pages&&null!=this.currentPage)for(a=0;a<this.pages.length;a++)if(this.pages[a]==this.currentPage){0<a&&h.push("page="+a);break}a=!0;null!=k?c="#U"+encodeURIComponent(k):(e=this.getCurrentFile(),m||null==e||e.constructor!=window.DriveFile?c="#R"+encodeURIComponent(c?this.getFileData(!0,null,null,null,null,null,null,!0):this.editor.graph.compress(mxUtils.getXml(this.editor.getGraphXml()))):
+(c="#"+e.getHash(),a=!1));a&&null!=e&&null!=e.getTitle()&&e.getTitle()!=this.defaultFilename&&h.push("title="+encodeURIComponent(e.getTitle()));return(mxClient.IS_CHROMEAPP||EditorUi.isElectronApp?"https://www.draw.io/":"https://"+location.host+"/")+(0<h.length?"?"+h.join("&"):"")+c};EditorUi.prototype.createHtml=function(a,b,c,d,f,g,k,m,x,y,w){this.getBasenames();var e={};""!=f&&f!=mxConstants.NONE&&(e.highlight=f);"auto"!==d&&(e.target=d);x||(e.lightbox=!1);e.nav=this.editor.graph.foldingEnabled;
+c=parseInt(c);isNaN(c)||100==c||(e.zoom=c/100);c=[];k&&(c.push("pages"),e.resize=!0,null!=this.pages&&null!=this.currentPage&&(e.page=mxUtils.indexOf(this.pages,this.currentPage)));b&&(c.push("zoom"),e.resize=!0);m&&c.push("layers");0<c.length&&(x&&c.push("lightbox"),e.toolbar=c.join(" "));null!=y&&0<y.length&&(e.edit=y);null!=a?e.url=a:e.xml=this.getFileData(!0,null,null,null,null,!k);b='<div class="mxgraph" style="'+(g?"max-width:100%;":"")+(""!=c?"border:1px solid transparent;":"")+'" data-mxgraph="'+
+mxUtils.htmlEntities(JSON.stringify(e))+'"></div>';a=null!=a?"&fetch="+encodeURIComponent(a):"";w(b,'<script type="text/javascript" src="'+(0<a.length?("1"==urlParams.dev?"https://test.draw.io/embed2.js?dev=1":"https://www.draw.io/embed2.js?")+a:"1"==urlParams.dev?"https://test.draw.io/js/viewer.min.js":"https://www.draw.io/js/viewer.min.js")+'">\x3c/script>')};EditorUi.prototype.showHtmlDialog=function(a,b,c,d){var e=document.createElement("div");e.style.whiteSpace="nowrap";var f=document.createElement("h3");
+mxUtils.write(f,mxResources.get("html"));f.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:12px";e.appendChild(f);var h=document.createElement("div");h.style.cssText="border-bottom:1px solid lightGray;padding-bottom:8px;margin-bottom:12px;";var g=document.createElement("input");g.style.cssText="margin-right:8px;margin-top:8px;margin-bottom:8px;";g.setAttribute("value","url");g.setAttribute("type","radio");g.setAttribute("name","type-embedhtmldialog");f=g.cloneNode(!0);f.setAttribute("value",
+"copy");h.appendChild(f);var l=document.createElement("span");mxUtils.write(l,mxResources.get("includeCopyOfMyDiagram"));h.appendChild(l);mxUtils.br(h);h.appendChild(g);l=document.createElement("span");mxUtils.write(l,mxResources.get("publicDiagramUrl"));h.appendChild(l);var k=this.getCurrentFile();null==c&&null!=k&&k.constructor==window.DriveFile&&(l=document.createElement("a"),l.style.paddingLeft="12px",l.style.color="gray",l.setAttribute("href","javascript:void(0);"),mxUtils.write(l,mxResources.get("share")),
+h.appendChild(l),mxEvent.addListener(l,"click",mxUtils.bind(this,function(){this.hideDialog();this.drive.showPermissions(k.getId())})));f.setAttribute("checked","checked");null==c&&g.setAttribute("disabled","disabled");e.appendChild(h);var n=this.addLinkSection(e),m=this.addCheckbox(e,mxResources.get("zoom"),!0,null,!0);mxUtils.write(e,":");var C=document.createElement("input");C.setAttribute("type","text");C.style.marginRight="16px";C.style.width="60px";C.style.marginLeft="4px";C.style.marginRight=
+"12px";C.value="100%";e.appendChild(C);var B=this.addCheckbox(e,mxResources.get("fit"),!0),h=null!=this.pages&&1<this.pages.length,A=A=this.addCheckbox(e,mxResources.get("allPages"),h,!h),G=this.addCheckbox(e,mxResources.get("layers"),!0),z=this.addCheckbox(e,mxResources.get("lightbox"),!0),E=this.addEditButton(e,z),D=E.getEditInput();D.style.marginBottom="16px";mxEvent.addListener(z,"change",function(){z.checked?D.removeAttribute("disabled"):D.setAttribute("disabled","disabled");D.checked&&z.checked?
+E.getEditSelect().removeAttribute("disabled"):E.getEditSelect().setAttribute("disabled","disabled")});a=new CustomDialog(this,e,mxUtils.bind(this,function(){d(g.checked?c:null,m.checked,C.value,n.getTarget(),n.getColor(),B.checked,A.checked,G.checked,z.checked,E.getLink())}),null,a,b);this.showDialog(a.container,340,360,!0,!0);f.focus()};EditorUi.prototype.showPublishLinkDialog=function(a,b,c,d,f,g){var e=document.createElement("div");e.style.whiteSpace="nowrap";var h=document.createElement("h3");
+mxUtils.write(h,a||mxResources.get("link"));h.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:12px";e.appendChild(h);var l=this.getCurrentFile(),h="https://desk.draw.io/support/solutions/articles/16000051941";a=0;if(null!=l&&l.constructor==window.DriveFile&&!b){a=80;var h="https://desk.draw.io/support/solutions/articles/16000039384",k=document.createElement("div");k.style.cssText="border-bottom:1px solid lightGray;padding-bottom:14px;padding-top:6px;margin-bottom:14px;text-align:center;";
+var n=document.createElement("div");n.style.whiteSpace="normal";mxUtils.write(n,mxResources.get("linkAccountRequired"));k.appendChild(n);n=mxUtils.button(mxResources.get("share"),mxUtils.bind(this,function(){this.drive.showPermissions(l.getId())}));n.style.marginTop="12px";n.className="geBtn";k.appendChild(n);e.appendChild(k);n=document.createElement("a");n.style.paddingLeft="12px";n.style.color="gray";n.style.fontSize="11px";n.setAttribute("href","javascript:void(0);");mxUtils.write(n,mxResources.get("check"));
+k.appendChild(n);mxEvent.addListener(n,"click",mxUtils.bind(this,function(){this.spinner.spin(document.body,mxResources.get("loading"))&&this.getPublicUrl(this.getCurrentFile(),mxUtils.bind(this,function(a){this.spinner.stop();a=new ErrorDialog(this,null,mxResources.get(null!=a?"diagramIsPublic":"diagramIsNotPublic"),mxResources.get("ok"));this.showDialog(a.container,300,80,!0,!1);a.init()}))}))}var m=null,p=null;if(null!=c||null!=d)a+=30,mxUtils.write(e,mxResources.get("width")+":"),m=document.createElement("input"),
+m.setAttribute("type","text"),m.style.marginRight="16px",m.style.width="50px",m.style.marginLeft="6px",m.style.marginRight="16px",m.style.marginBottom="10px",m.value="100%",e.appendChild(m),mxUtils.write(e,mxResources.get("height")+":"),p=document.createElement("input"),p.setAttribute("type","text"),p.style.width="50px",p.style.marginLeft="6px",p.style.marginBottom="10px",p.value=d+"px",e.appendChild(p),mxUtils.br(e);var u=this.addLinkSection(e,g);c=null!=this.pages&&1<this.pages.length;var A=null;
+if(null==l||l.constructor!=window.DriveFile||b)A=this.addCheckbox(e,mxResources.get("allPages"),c,!c);var G=this.addCheckbox(e,mxResources.get("lightbox"),!0),z=this.addEditButton(e,G),E=z.getEditInput(),D=this.addCheckbox(e,mxResources.get("layers"),!0);D.style.marginLeft=E.style.marginLeft;D.style.marginBottom="16px";D.style.marginTop="8px";mxEvent.addListener(G,"change",function(){G.checked?(D.removeAttribute("disabled"),E.removeAttribute("disabled")):(D.setAttribute("disabled","disabled"),E.setAttribute("disabled",
+"disabled"));E.checked&&G.checked?z.getEditSelect().removeAttribute("disabled"):z.getEditSelect().setAttribute("disabled","disabled")});b=new CustomDialog(this,e,mxUtils.bind(this,function(){f(u.getTarget(),u.getColor(),null==A?!0:A.checked,G.checked,z.getLink(),D.checked,null!=m?m.value:null,null!=p?p.value:null)}),null,mxResources.get("create"),h);this.showDialog(b.container,340,246+a,!0,!0);null!=m?(m.focus(),mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode||mxClient.IS_QUIRKS?m.select():
+document.execCommand("selectAll",!1,null)):u.focus()};EditorUi.prototype.showRemoteExportDialog=function(a,b,c,d){var e=document.createElement("div");e.style.whiteSpace="nowrap";var f=document.createElement("h3");mxUtils.write(f,mxResources.get("image"));f.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:4px";e.appendChild(f);var h=this.addCheckbox(e,mxResources.get("selectionOnly"),!1,this.editor.graph.isSelectionEmpty()),g=d?null:this.addCheckbox(e,mxResources.get("includeCopyOfMyDiagram"),
+!0);null!=g&&(g.style.marginBottom="16px");a=new CustomDialog(this,e,mxUtils.bind(this,function(){c(!h.checked,null!=g?g.checked:!1)}),null,a,b);this.showDialog(a.container,300,d?100:146,!0,!0)};EditorUi.prototype.showExportDialog=function(a,b,c,d,f,g,k,m){k=null!=k?k:!0;var e=document.createElement("div");e.style.whiteSpace="nowrap";var h=this.editor.graph,l="jpeg"==m?170:280,n=document.createElement("h3");mxUtils.write(n,a);n.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:10px";
+e.appendChild(n);mxUtils.write(e,mxResources.get("zoom")+":");var p=document.createElement("input");p.setAttribute("type","text");p.style.marginRight="16px";p.style.width="60px";p.style.marginLeft="4px";p.style.marginRight="12px";p.value=this.lastExportZoom||"100%";e.appendChild(p);mxUtils.write(e,mxResources.get("borderWidth")+":");var q=document.createElement("input");q.setAttribute("type","text");q.style.marginRight="16px";q.style.width="60px";q.style.marginLeft="4px";q.value=this.lastExportBorder||
+"0";e.appendChild(q);mxUtils.br(e);var t=this.addCheckbox(e,mxResources.get("transparentBackground"),h.background==mxConstants.NONE||null==h.background,null,null,"jpeg"!=m),u=this.addCheckbox(e,mxResources.get("selectionOnly"),!1,h.isSelectionEmpty()),z=document.createElement("input");z.style.marginTop="16px";z.style.marginRight="8px";z.style.marginLeft="24px";z.setAttribute("disabled","disabled");z.setAttribute("type","checkbox");g&&(e.appendChild(z),mxUtils.write(e,mxResources.get("crop")),mxUtils.br(e),
+l+=26,mxEvent.addListener(u,"change",function(){u.checked?z.removeAttribute("disabled"):z.setAttribute("disabled","disabled")}));h.isSelectionEmpty()||(z.setAttribute("checked","checked"),z.defaultChecked=!0);var E=this.addCheckbox(e,mxResources.get("shadow"),h.shadowVisible),D=document.createElement("input");D.style.marginTop="16px";D.style.marginRight="8px";D.setAttribute("type","checkbox");!this.isOffline()&&this.canvasSupported||D.setAttribute("disabled","disabled");b&&(e.appendChild(D),mxUtils.write(e,
+mxResources.get("embedImages")),mxUtils.br(e),l+=26);var L=this.addCheckbox(e,mxResources.get("includeCopyOfMyDiagram"),k,null,null,"jpeg"!=m),F=null!=this.pages&&1<this.pages.length,H=this.addCheckbox(e,F?mxResources.get("allPages"):"",F,!F,null,"jpeg"!=m);H.style.marginLeft="24px";H.style.marginBottom="16px";F||(H.style.visibility="hidden");mxEvent.addListener(L,"change",function(){L.checked&&F?H.removeAttribute("disabled"):H.setAttribute("disabled","disabled")});k&&F||H.setAttribute("disabled",
+"disabled");a=new CustomDialog(this,e,mxUtils.bind(this,function(){this.lastExportBorder=q.value;this.lastExportZoom=p.value;f(p.value,t.checked,!u.checked,E.checked,L.checked,D.checked,q.value,z.checked,!H.checked)}),null,c,d);this.showDialog(a.container,320,l,!0,!0);p.focus();mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode||mxClient.IS_QUIRKS?p.select():document.execCommand("selectAll",!1,null)};EditorUi.prototype.showEmbedImageDialog=function(a,b,c,d,f){var e=document.createElement("div");
+e.style.whiteSpace="nowrap";var h=this.editor.graph;if(null!=b){var g=document.createElement("h3");mxUtils.write(g,b);g.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:4px";e.appendChild(g)}var l=this.addCheckbox(e,mxResources.get("fit"),!0),k=this.addCheckbox(e,mxResources.get("shadow"),h.shadowVisible&&d,!d),n=this.addCheckbox(e,c),m=this.addCheckbox(e,mxResources.get("lightbox"),!0),p=this.addEditButton(e,m),B=p.getEditInput(),A=1<h.model.getChildCount(h.model.getRoot()),
+G=this.addCheckbox(e,mxResources.get("layers"),A,!A);G.style.marginLeft=B.style.marginLeft;G.style.marginBottom="12px";G.style.marginTop="8px";mxEvent.addListener(m,"change",function(){m.checked?(A&&G.removeAttribute("disabled"),B.removeAttribute("disabled")):(G.setAttribute("disabled","disabled"),B.setAttribute("disabled","disabled"));B.checked&&m.checked?p.getEditSelect().removeAttribute("disabled"):p.getEditSelect().setAttribute("disabled","disabled")});b=new CustomDialog(this,e,mxUtils.bind(this,
+function(){a(l.checked,k.checked,n.checked,m.checked,p.getLink(),G.checked)}),null,mxResources.get("embed"),f);this.showDialog(b.container,280,280,!0,!0)};EditorUi.prototype.createEmbedImage=function(a,b,c,d,f,g,k,m){function e(b){var e=" ",l="";d&&(e=" onclick=\"(function(img){if(img.wnd!=null&&!img.wnd.closed){img.wnd.focus();}else{var r=function(evt){if(evt.data=='ready'&&evt.source==img.wnd){img.wnd.postMessage(decodeURIComponent(img.getAttribute('src')),'*');window.removeEventListener('message',r);}};window.addEventListener('message',r);img.wnd=window.open('https://www.draw.io/?client=1&lightbox=1"+
+(f?"&edit=_blank":"")+(g?"&layers=1":"")+"');}})(this);\"",l+="cursor:pointer;");a&&(l+="max-width:100%;");var n="";c&&(n=' width="'+Math.round(h.width)+'" height="'+Math.round(h.height)+'"');k('<img src="'+b+'"'+n+(""!=l?' style="'+l+'"':"")+e+"/>")}var h=this.editor.graph.getGraphBounds();if(this.isExportToCanvas())this.exportToCanvas(mxUtils.bind(this,function(a){var b=d?this.getFileData(!0):null;a=this.createImageDataUri(a,b,"png");e(a)}),null,null,null,mxUtils.bind(this,function(a){m({message:mxResources.get("unknownError")})}),
 null,!0,c?2:1,null,b);else if(b=this.getFileData(!0),h.width*h.height<=MAX_AREA&&b.length<=MAX_REQUEST_SIZE){var l="";c&&(l="&w="+Math.round(2*h.width)+"&h="+Math.round(2*h.height));var n=new mxXmlRequest(EXPORT_URL,"format=png&base64=1&embedXml="+(d?"1":"0")+l+"&xml="+encodeURIComponent(b));n.send(mxUtils.bind(this,function(){200<=n.getStatus()&&299>=n.getStatus()?e("data:image/png;base64,"+n.getText()):m({message:mxResources.get("unknownError")})}))}else m({message:mxResources.get("drawingTooLarge")})};
 EditorUi.prototype.createEmbedSvg=function(a,b,c,d,f,g,k){var e=this.editor.graph.getSvg(),h=e.getElementsByTagName("a");if(null!=h)for(var l=0;l<h.length;l++){var n=h[l].getAttribute("href");null!=n&&"#"==n.charAt(0)&&"_blank"==h[l].getAttribute("target")&&h[l].removeAttribute("target")}d&&e.setAttribute("content",this.getFileData(!0));b&&this.editor.graph.addSvgShadow(e);if(c){var m=" ",p="";d&&(m="onclick=\"(function(img){if(img.wnd!=null&&!img.wnd.closed){img.wnd.focus();}else{var r=function(evt){if(evt.data=='ready'&&evt.source==img.wnd){img.wnd.postMessage(decodeURIComponent(img.getAttribute('src')),'*');window.removeEventListener('message',r);}};window.addEventListener('message',r);img.wnd=window.open('https://www.draw.io/?client=1&lightbox=1"+
 (f?"&edit=_blank":"")+(g?"&layers=1":"")+"');}})(this);\"",p+="cursor:pointer;");a&&(p+="max-width:100%;");this.convertImages(e,mxUtils.bind(this,function(a){k('<img src="'+this.createSvgDataUri(mxUtils.getXml(a))+'"'+(""!=p?' style="'+p+'"':"")+m+"/>")}))}else p="",d&&(e.setAttribute("onclick","(function(svg){var src=window.event.target||window.event.srcElement;while (src!=null&&src.nodeName.toLowerCase()!='a'){src=src.parentNode;}if(src==null){if(svg.wnd!=null&&!svg.wnd.closed){svg.wnd.focus();}else{var r=function(evt){if(evt.data=='ready'&&evt.source==svg.wnd){svg.wnd.postMessage(decodeURIComponent(svg.getAttribute('content')),'*');window.removeEventListener('message',r);}};window.addEventListener('message',r);svg.wnd=window.open('https://www.draw.io/?client=1&lightbox=1"+
 (f?"&edit=_blank":"")+(g?"&layers=1":"")+"');}}})(this);"),p+="cursor:pointer;"),a&&(a=parseInt(e.getAttribute("width")),b=parseInt(e.getAttribute("height")),e.setAttribute("viewBox","0 0 "+a+" "+b),p+="max-width:100%;max-height:"+b+"px;",e.removeAttribute("height")),""!=p&&e.setAttribute("style",p),k(mxUtils.getXml(e))};EditorUi.prototype.timeSince=function(a){a=Math.floor((new Date-a)/1E3);var b=Math.floor(a/31536E3);if(1<b)return b+" "+mxResources.get("years");b=Math.floor(a/2592E3);if(1<b)return b+
 " "+mxResources.get("months");b=Math.floor(a/86400);if(1<b)return b+" "+mxResources.get("days");b=Math.floor(a/3600);if(1<b)return b+" "+mxResources.get("hours");b=Math.floor(a/60);return 1<b?b+" "+mxResources.get("minutes"):1==b?b+" "+mxResources.get("minute"):null};EditorUi.prototype.convertMath=function(a,b,c,d){d()};EditorUi.prototype.decodeNodeIntoGraph=function(a,b){if(null!=a){var c=null;if("diagram"==a.nodeName)c=a;else if("mxfile"==a.nodeName){var d=a.getElementsByTagName("diagram");if(0<
-d.length){var c=d[0],e=b.getGlobalVariable;b.getGlobalVariable=function(a){return"page"==a?c.getAttribute("name")||mxResources.get("pageWithNumber",[1]):"pagenumber"==a?1:e.apply(this,arguments)}}}null!=c&&(d=b.decompress(mxUtils.getTextContent(c)),null!=d&&0<d.length&&(a=mxUtils.parseXml(d).documentElement))}d=this.editor.graph;try{this.editor.graph=b,this.editor.setGraphXml(a)}catch(t){}finally{this.editor.graph=d}return a};EditorUi.prototype.getEmbeddedPng=function(a,b,c){var d=this.editor.graph,
+d.length){var c=d[0],e=b.getGlobalVariable;b.getGlobalVariable=function(a){return"page"==a?c.getAttribute("name")||mxResources.get("pageWithNumber",[1]):"pagenumber"==a?1:e.apply(this,arguments)}}}null!=c&&(d=b.decompress(mxUtils.getTextContent(c)),null!=d&&0<d.length&&(a=mxUtils.parseXml(d).documentElement))}d=this.editor.graph;try{this.editor.graph=b,this.editor.setGraphXml(a)}catch(u){}finally{this.editor.graph=d}return a};EditorUi.prototype.getEmbeddedPng=function(a,b,c){var d=this.editor.graph,
 e=null;if(null!=c&&0<c.length)d=this.createTemporaryGraph(this.editor.graph.getStylesheet()),document.body.appendChild(d.container),this.decodeNodeIntoGraph(this.editor.extractGraphModel(mxUtils.parseXml(c).documentElement,!0),d),e=c;else if(null!=this.pages&&this.currentPage!=this.pages[0]){var d=this.createTemporaryGraph(d.getStylesheet()),f=d.getGlobalVariable,g=this.pages[0];d.getGlobalVariable=function(a){return"page"==a?g.getName():"pagenumber"==a?1:f.apply(this,arguments)};document.body.appendChild(d.container);
 d.model.setRoot(g.root)}this.exportToCanvas(mxUtils.bind(this,function(c){try{null==e&&(e=this.getFileData(!0));var f=c.toDataURL("image/png"),f=this.writeGraphModelToPng(f,"zTXt","mxGraphModel",atob(this.editor.graph.compress(e)));a(f.substring(f.lastIndexOf(",")+1));d!=this.editor.graph&&d.container.parentNode.removeChild(d.container)}catch(y){null!=b&&b(y)}}),null,null,null,mxUtils.bind(this,function(a){null!=b&&b(a)}),null,null,null,null,d.shadowVisible,null,d)};EditorUi.prototype.getEmbeddedSvg=
 function(a,b,c,d,f,g,k){k=b.background;k==mxConstants.NONE&&(k=null);b=b.getSvg(k,null,null,null,null,g);null!=a&&b.setAttribute("content",a);null!=c&&b.setAttribute("resource",c);if(null!=f)this.convertImages(b,mxUtils.bind(this,function(a){f((d?"":'<?xml version="1.0" encoding="UTF-8"?>\n<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">\n')+mxUtils.getXml(a))}));else return(d?"":'<?xml version="1.0" encoding="UTF-8"?>\n<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">\n')+
-mxUtils.getXml(b)};EditorUi.prototype.exportImage=function(a,b,c,d,f,g,k,m,w){w=null!=w?w:"png";if(this.spinner.spin(document.body,mxResources.get("exporting"))){var e=this.editor.graph.isSelectionEmpty();c=null!=c?c:e;null==this.thumbImageCache&&(this.thumbImageCache={});try{this.exportToCanvas(mxUtils.bind(this,function(a){this.spinner.stop();try{this.saveCanvas(a,f?this.getFileData(!0,null,null,null,c,m):null,w)}catch(v){"Invalid image"==v.message?this.downloadFile(w):this.handleError(v)}}),null,
-this.thumbImageCache,null,mxUtils.bind(this,function(a){this.spinner.stop();this.handleError(a)}),null,c,a||1,b,d,null,null,g,k)}catch(x){this.spinner.stop(),this.handleError(x)}}};EditorUi.prototype.loadFonts=function(a){if(null!=this.editor.fontCss&&null==this.editor.resolvedFontCss){var b=this.editor.fontCss.split("url("),c=0,d={},e=mxUtils.bind(this,function(){if(0==c){for(var e=[b[0]],f=1;f<b.length;f++){var g=b[f].indexOf(")");e.push("url(");e.push(d[b[f].substring(0,g)]);e.push(b[f].substring(g))}this.editor.resolvedFontCss=
+mxUtils.getXml(b)};EditorUi.prototype.exportImage=function(a,b,c,d,f,g,k,m,x){x=null!=x?x:"png";if(this.spinner.spin(document.body,mxResources.get("exporting"))){var e=this.editor.graph.isSelectionEmpty();c=null!=c?c:e;null==this.thumbImageCache&&(this.thumbImageCache={});try{this.exportToCanvas(mxUtils.bind(this,function(a){this.spinner.stop();try{this.saveCanvas(a,f?this.getFileData(!0,null,null,null,c,m):null,x)}catch(v){"Invalid image"==v.message?this.downloadFile(x):this.handleError(v)}}),null,
+this.thumbImageCache,null,mxUtils.bind(this,function(a){this.spinner.stop();this.handleError(a)}),null,c,a||1,b,d,null,null,g,k)}catch(w){this.spinner.stop(),this.handleError(w)}}};EditorUi.prototype.loadFonts=function(a){if(null!=this.editor.fontCss&&null==this.editor.resolvedFontCss){var b=this.editor.fontCss.split("url("),c=0,d={},e=mxUtils.bind(this,function(){if(0==c){for(var e=[b[0]],f=1;f<b.length;f++){var g=b[f].indexOf(")");e.push("url(");e.push(d[b[f].substring(0,g)]);e.push(b[f].substring(g))}this.editor.resolvedFontCss=
 e.join("");a()}});if(0<b.length)for(var f=1;f<b.length;f++){var g=b[f].indexOf(")");mxUtils.bind(this,function(a){if(null==d[a]){d[a]=a;c++;var b="application/x-font-ttf";/(\.svg)($|\?)/i.test(a)?b="image/svg+xml":/(\.otf)($|\?)/i.test(a)?b="application/x-font-opentype":/(\.woff)($|\?)/i.test(a)?b="application/font-woff":/(\.woff2)($|\?)/i.test(a)?b="application/font-woff2":/(\.eot)($|\?)/i.test(a)?b="application/vnd.ms-fontobject":/(\.sfnt)($|\?)/i.test(a)&&(b="application/font-sfnt");var f=a;/^https?:\/\//.test(f)&&
-!this.isCorsEnabledForUrl(f)&&(f=PROXY_URL+"?url="+encodeURIComponent(a));this.loadUrl(f,mxUtils.bind(this,function(b){d[a]=b;c--;e()}),mxUtils.bind(this,function(a){c--;e()}),!0,null,"data:"+b+";charset=utf-8;base64,")}})(b[f].substring(0,g))}}else a()};EditorUi.prototype.exportToCanvas=function(a,b,c,d,f,g,k,m,w,y,x,v,D,B){g=null!=g?g:!0;v=null!=v?v:this.editor.graph;D=null!=D?D:0;var e=w?null:v.background;e==mxConstants.NONE&&(e=null);null==e&&(e=d);null==e&&0==w&&(e="#ffffff");this.convertImages(v.getSvg(e,
-null,null,B,null,null!=k?k:!0),mxUtils.bind(this,function(c){var d=new Image;d.onload=mxUtils.bind(this,function(){try{var h=document.createElement("canvas"),l=parseInt(c.getAttribute("width")),k=parseInt(c.getAttribute("height"));m=null!=m?m:1;null!=b&&(m=g?Math.min(1,Math.min(3*b/(4*k),b/l)):b/l);l=Math.ceil(m*l)+2*D;k=Math.ceil(m*k)+2*D;h.setAttribute("width",l);h.setAttribute("height",k);var n=h.getContext("2d");null!=e&&(n.beginPath(),n.rect(0,0,l,k),n.fillStyle=e,n.fill());n.scale(m,m);n.drawImage(d,
-D/m,D/m);a(h)}catch(I){null!=f&&f(I)}});d.onerror=function(a){null!=f&&f(a)};try{y&&this.editor.graph.addSvgShadow(c);var h=mxUtils.bind(this,function(){if(null!=this.editor.resolvedFontCss){var a=document.createElement("style");a.setAttribute("type","text/css");a.innerHTML=this.editor.resolvedFontCss;c.getElementsByTagName("defs")[0].appendChild(a)}this.convertMath(v,c,!0,mxUtils.bind(this,function(){d.src=this.createSvgDataUri(mxUtils.getXml(c))}))});this.loadFonts(h)}catch(C){null!=f&&f(C)}}),
-c,x)};EditorUi.prototype.createImageUrlConverter=function(){var a=new mxUrlConverter;a.updateBaseUrl();var b=a.convert;a.convert=function(c){null!=c&&("http://"!=c.substring(0,7)&&"https://"!=c.substring(0,8)||c.substring(0,a.baseUrl.length)==a.baseUrl?"chrome-extension://"!=c.substring(0,19)&&(c=b.apply(this,arguments)):c=PROXY_URL+"?url="+encodeURIComponent(c));return c};return a};EditorUi.prototype.convertImages=function(a,b,c,d){null==d&&(d=this.createImageUrlConverter());var e=0,f=c||{};c=mxUtils.bind(this,
+!this.isCorsEnabledForUrl(f)&&(f=PROXY_URL+"?url="+encodeURIComponent(a));this.loadUrl(f,mxUtils.bind(this,function(b){d[a]=b;c--;e()}),mxUtils.bind(this,function(a){c--;e()}),!0,null,"data:"+b+";charset=utf-8;base64,")}})(b[f].substring(0,g))}}else a()};EditorUi.prototype.exportToCanvas=function(a,b,c,d,f,g,k,m,x,y,w,v,C,B){g=null!=g?g:!0;v=null!=v?v:this.editor.graph;C=null!=C?C:0;var e=x?null:v.background;e==mxConstants.NONE&&(e=null);null==e&&(e=d);null==e&&0==x&&(e="#ffffff");this.convertImages(v.getSvg(e,
+null,null,B,null,null!=k?k:!0),mxUtils.bind(this,function(c){var d=new Image;d.onload=mxUtils.bind(this,function(){try{var h=document.createElement("canvas"),l=parseInt(c.getAttribute("width")),k=parseInt(c.getAttribute("height"));m=null!=m?m:1;null!=b&&(m=g?Math.min(1,Math.min(3*b/(4*k),b/l)):b/l);l=Math.ceil(m*l)+2*C;k=Math.ceil(m*k)+2*C;h.setAttribute("width",l);h.setAttribute("height",k);var n=h.getContext("2d");null!=e&&(n.beginPath(),n.rect(0,0,l,k),n.fillStyle=e,n.fill());n.scale(m,m);n.drawImage(d,
+C/m,C/m);a(h)}catch(I){null!=f&&f(I)}});d.onerror=function(a){null!=f&&f(a)};try{y&&this.editor.graph.addSvgShadow(c);var h=mxUtils.bind(this,function(){if(null!=this.editor.resolvedFontCss){var a=document.createElement("style");a.setAttribute("type","text/css");a.innerHTML=this.editor.resolvedFontCss;c.getElementsByTagName("defs")[0].appendChild(a)}this.convertMath(v,c,!0,mxUtils.bind(this,function(){d.src=this.createSvgDataUri(mxUtils.getXml(c))}))});this.loadFonts(h)}catch(D){null!=f&&f(D)}}),
+c,w)};EditorUi.prototype.createImageUrlConverter=function(){var a=new mxUrlConverter;a.updateBaseUrl();var b=a.convert;a.convert=function(c){null!=c&&("http://"!=c.substring(0,7)&&"https://"!=c.substring(0,8)||c.substring(0,a.baseUrl.length)==a.baseUrl?"chrome-extension://"!=c.substring(0,19)&&(c=b.apply(this,arguments)):c=PROXY_URL+"?url="+encodeURIComponent(c));return c};return a};EditorUi.prototype.convertImages=function(a,b,c,d){null==d&&(d=this.createImageUrlConverter());var e=0,f=c||{};c=mxUtils.bind(this,
 function(c,g){for(var h=a.getElementsByTagName(c),l=0;l<h.length;l++)mxUtils.bind(this,function(c){var h=d.convert(c.getAttribute(g));if(null!=h&&"data:"!=h.substring(0,5)){var l=f[h];null==l?(e++,this.convertImageToDataUri(h,function(d){null!=d&&(f[h]=d,c.setAttribute(g,d));e--;0==e&&b(a)})):c.setAttribute(g,l)}})(h[l])});c("image","xlink:href");c("img","src");0==e&&b(a)};EditorUi.prototype.loadUrl=function(a,b,c,d,f,g){try{var e=d||/(\.png)($|\?)/i.test(a)||/(\.jpe?g)($|\?)/i.test(a)||/(\.gif)($|\?)/i.test(a);
 f=null!=f?f:!0;var h=mxUtils.bind(this,function(){mxUtils.get(a,mxUtils.bind(this,function(a){if(200<=a.getStatus()&&299>=a.getStatus()){if(null!=b){var d=a.getText();if(e){if((9==document.documentMode||10==document.documentMode)&&"undefined"!==typeof window.mxUtilsBinaryToArray){a=mxUtilsBinaryToArray(a.request.responseBody).toArray();for(var d=Array(a.length),f=0;f<a.length;f++)d[f]=String.fromCharCode(a[f]);d=d.join("")}g=null!=g?g:"data:image/png;base64,";d=g+this.base64Encode(d)}b(d)}}else null!=
-c&&c({code:App.ERROR_UNKNOWN})}),function(){null!=c&&c({code:App.ERROR_UNKNOWN})},e,this.timeout,function(){f&&null!=c&&c({code:App.ERROR_TIMEOUT,retry:h})})});h()}catch(w){null!=c&&c(w)}};EditorUi.prototype.isCorsEnabledForUrl=function(a){return"https?://raw.githubusercontent.com/"===a.substring(0,34)||/^https?:\/\/.*\.github\.io\//.test(a)||/^https?:\/\/(.*\.)?rawgit\.com\//.test(a)};EditorUi.prototype.convertImageToDataUri=function(a,b){if(/(\.svg)$/i.test(a))mxUtils.get(a,mxUtils.bind(this,function(a){b(this.createSvgDataUri(a.getText()))}),
+c&&c({code:App.ERROR_UNKNOWN})}),function(){null!=c&&c({code:App.ERROR_UNKNOWN})},e,this.timeout,function(){f&&null!=c&&c({code:App.ERROR_TIMEOUT,retry:h})})});h()}catch(x){null!=c&&c(x)}};EditorUi.prototype.isCorsEnabledForUrl=function(a){return"https?://raw.githubusercontent.com/"===a.substring(0,34)||/^https?:\/\/.*\.github\.io\//.test(a)||/^https?:\/\/(.*\.)?rawgit\.com\//.test(a)};EditorUi.prototype.convertImageToDataUri=function(a,b){if(/(\.svg)$/i.test(a))mxUtils.get(a,mxUtils.bind(this,function(a){b(this.createSvgDataUri(a.getText()))}),
 function(){b()});else{var c=new Image;c.onload=function(){var a=document.createElement("canvas"),d=a.getContext("2d");a.height=c.height;a.width=c.width;d.drawImage(c,0,0);b(a.toDataURL())};c.onerror=function(){b()};c.src=a}};EditorUi.prototype.importXml=function(a,b,c,d,f){b=null!=b?b:0;c=null!=c?c:0;var e=[];try{var g=this.editor.graph;if(null!=a&&0<a.length){var h=mxUtils.parseXml(a),l=this.editor.extractGraphModel(h.documentElement,null!=this.pages);if(null!=l&&"mxfile"==l.nodeName&&null!=this.pages){var k=
 l.getElementsByTagName("diagram");if(1==k.length)l=mxUtils.parseXml(g.decompress(mxUtils.getTextContent(k[0]))).documentElement;else if(1<k.length){g.model.beginUpdate();try{for(var m=0;m<k.length;m++){var n=this.updatePageRoot(new DiagramPage(k[m])),p=this.pages.length;null==n.getName()&&n.setName(mxResources.get("pageWithNumber",[p+1]));g.model.execute(new ChangePage(this,n,n,p))}}finally{g.model.endUpdate()}}}if(null!=l&&"mxGraphModel"===l.nodeName){var B=new mxGraphModel;(new mxCodec(l.ownerDocument)).decode(l,
 B);var A=B.getChildCount(B.getRoot());g.model.getChildCount(g.model.getRoot());g.model.beginUpdate();try{a={};for(m=0;m<A;m++){var G=B.getChildAt(B.getRoot(),m);if(1!=A||g.isCellLocked(g.getDefaultParent()))G=g.importCells([G],0,0,g.model.getRoot(),null,a)[0],z=g.model.getChildren(G),g.moveCells(z,b,c),e=e.concat(z);else var z=B.getChildren(G),e=e.concat(g.importCells(z,b,c,g.getDefaultParent(),null,a))}if(d){g.isGridEnabled()&&(b=g.snap(b),c=g.snap(c));var E=g.getBoundingBoxFromGeometry(e,!0);null!=
-E&&g.moveCells(e,b-E.x,c-E.y)}}finally{g.model.endUpdate()}}}}catch(C){throw f||this.handleError(C,mxResources.get("invalidOrMissingFile")),C;}return e};EditorUi.prototype.importLucidChart=function(a,b,c,d,f){var e=mxUtils.bind(this,function(){if(this.pasteLucidChart)try{this.insertLucidChart(a,b,c,d,f)}catch(u){this.handleError(u)}finally{null!=f&&f()}});this.pasteLucidChart||this.loadingExtensions||this.isOffline()?window.setTimeout(e,0):(this.loadingExtensions=!0,"1"==urlParams.dev?mxscript("js/diagramly/Extensions.js",
+E&&g.moveCells(e,b-E.x,c-E.y)}}finally{g.model.endUpdate()}}}}catch(D){throw f||this.handleError(D,mxResources.get("invalidOrMissingFile")),D;}return e};EditorUi.prototype.importLucidChart=function(a,b,c,d,f){var e=mxUtils.bind(this,function(){if(this.pasteLucidChart)try{this.insertLucidChart(a,b,c,d,f)}catch(t){this.handleError(t)}finally{null!=f&&f()}});this.pasteLucidChart||this.loadingExtensions||this.isOffline()?window.setTimeout(e,0):(this.loadingExtensions=!0,"1"==urlParams.dev?mxscript("js/diagramly/Extensions.js",
 e):mxscript("js/extensions.min.js",e))};EditorUi.prototype.insertLucidChart=function(a,b,c,d,f){f=JSON.parse(a);a=[];if(null!=f.state){f=JSON.parse(f.state);for(var e in f.Pages)a.push(f.Pages[e]);a.sort(function(a,b){return a.Properties.Order<b.Properties.Order?-1:a.Properties.Order>b.Properties.Order?1:0})}else a.push(f);if(0<a.length){this.editor.graph.getModel().beginUpdate();try{if(this.pasteLucidChart(a[0],b,c,d),null!=this.pages){var g=this.currentPage;for(b=1;b<a.length;b++)this.insertPage(),
 this.pasteLucidChart(a[b]);this.selectPage(g)}}finally{this.editor.graph.getModel().endUpdate()}}};EditorUi.prototype.insertTextAt=function(a,b,c,d,f,g,k){g=null!=g?g:!0;k=null!=k?k:!0;if(null!=a)if(Graph.fileSupport&&!this.isOffline()&&(new XMLHttpRequest).upload&&this.isRemoteFileFormat(a))this.parseFile(new Blob([a.replace(/\s+/g," ")],{type:"application/octet-stream"}),mxUtils.bind(this,function(a){4==a.readyState&&200<=a.status&&299>=a.status&&this.editor.graph.setSelectionCells(this.insertTextAt(a.responseText,
 b,c,!0))}));else if("data:"==a.substring(0,5)||!this.isOffline()&&(f||/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(a))){var e=this.editor.graph;if("data:image/png;base64,"==a.substring(0,22)){var h=this.extractGraphModelFromPng(a),l=this.importXml(h,b,c,g,!0);if(0<l.length)return l}if("data:image/svg+xml;"==a.substring(0,19))try{if(h=null,"data:image/svg+xml;base64,"==a.substring(0,26)?(h=a.substring(a.indexOf(",")+1),h=window.atob&&!mxClient.IS_SF?atob(h):Base64.decode(h,!0)):h=decodeURIComponent(a.substring(a.indexOf(",")+
-1)),l=this.importXml(h,b,c,g,!0),0<l.length)return l}catch(x){}this.loadImage(a,mxUtils.bind(this,function(d){if("data:"==a.substring(0,5))this.resizeImage(d,a,mxUtils.bind(this,function(a,d,f){e.setSelectionCell(e.insertVertex(null,null,"",e.snap(b),e.snap(c),d,f,"shape=image;verticalLabelPosition=bottom;labelBackgroundColor=#ffffff;verticalAlign=top;aspect=fixed;imageAspect=0;image="+this.convertDataUri(a)+";"))}),k,this.maxImageSize);else{var f=Math.min(1,Math.min(this.maxImageSize/d.width,this.maxImageSize/
+1)),l=this.importXml(h,b,c,g,!0),0<l.length)return l}catch(w){}this.loadImage(a,mxUtils.bind(this,function(d){if("data:"==a.substring(0,5))this.resizeImage(d,a,mxUtils.bind(this,function(a,d,f){e.setSelectionCell(e.insertVertex(null,null,"",e.snap(b),e.snap(c),d,f,"shape=image;verticalLabelPosition=bottom;labelBackgroundColor=#ffffff;verticalAlign=top;aspect=fixed;imageAspect=0;image="+this.convertDataUri(a)+";"))}),k,this.maxImageSize);else{var f=Math.min(1,Math.min(this.maxImageSize/d.width,this.maxImageSize/
 d.height)),g=Math.round(d.width*f);d=Math.round(d.height*f);e.setSelectionCell(e.insertVertex(null,null,"",e.snap(b),e.snap(c),g,d,"shape=image;verticalLabelPosition=bottom;labelBackgroundColor=#ffffff;verticalAlign=top;aspect=fixed;imageAspect=0;image="+a+";"))}}),mxUtils.bind(this,function(){var f=null;e.getModel().beginUpdate();try{f=e.insertVertex(e.getDefaultParent(),null,a,e.snap(b),e.snap(c),1,1,"text;"+(d?"html=1;":"")),e.updateCellSize(f),e.fireEvent(new mxEventObject("textInserted","cells",
 [f]))}finally{e.getModel().endUpdate()}e.setSelectionCell(f)}))}else{a=this.editor.graph.zapGremlins(mxUtils.trim(a));if(this.isCompatibleString(a))return this.importXml(a,b,c,g);if(0<a.length)if('{"state":"{\\"Properties\\":'==a.substring(0,26))this.importLucidChart(a,b,c,g);else{e=this.editor.graph;f=null;e.getModel().beginUpdate();try{f=e.insertVertex(e.getDefaultParent(),null,"",e.snap(b),e.snap(c),1,1,"text;"+(d?"html=1;":"")),e.fireEvent(new mxEventObject("textInserted","cells",[f])),f.value=
 a,e.updateCellSize(f),/\b((?:[a-z][\w-]+:(?:\/{1,3}|[a-z0-9%])|www\d{0,3}[.]|[a-z0-9.\-]+[.][a-z]{2,4}\/)(?:[^\s()<>]+|\(([^\s()<>]+|(\([^\s()<>]+\)))*\))+(?:\(([^\s()<>]+|(\([^\s()<>]+\)))*\)|[^\s`!()\[\]{};:'".,<>?«»“”‘’]))/i.test(f.value)&&e.setLinkForCell(f,f.value),f.geometry.width+=e.gridSize,f.geometry.height+=e.gridSize}finally{e.getModel().endUpdate()}return[f]}}return[]};EditorUi.prototype.formatFileSize=function(a){var b=-1;do a/=1024,b++;while(1024<a);return Math.max(a,.1).toFixed(1)+
-" kB; MB; GB; TB;PB;EB;ZB;YB".split(";")[b]};EditorUi.prototype.convertDataUri=function(a){if("data:"==a.substring(0,5)){var b=a.indexOf(";");0<b&&(a=a.substring(0,b)+a.substring(a.indexOf(",",b+1)))}return a};EditorUi.prototype.isRemoteFileFormat=function(a,b){return/(\.*<graphml xmlns=\".*)/.test(a)||/(\"contentType\":\s*\"application\/gliffy\+json\")/.test(a)||null!=b&&/(\.vsdx)($|\?)/i.test(b)||null!=b&&/(\.vssx)($|\?)/i.test(b)};EditorUi.prototype.importFile=function(a,b,c,d,f,g,k,m,w,y,x){y=
-null!=y?y:!0;var e=!1,h=null;"image"==b.substring(0,5)?(w=!1,"image/png"==b.substring(0,9)&&(b=x?null:this.extractGraphModelFromPng(a),null!=b&&0<b.length&&(h=this.importXml(b,c,d,y),w=!0)),w||(h=this.editor.graph,b=a.indexOf(";"),0<b&&(a=a.substring(0,b)+a.substring(a.indexOf(",",b+1))),y&&h.isGridEnabled()&&(c=h.snap(c),d=h.snap(d)),h=[h.insertVertex(null,null,"",c,d,f,g,"shape=image;verticalLabelPosition=bottom;labelBackgroundColor=#ffffff;verticalAlign=top;aspect=fixed;imageAspect=0;image="+a+
-";")])):!this.isOffline()&&(new XMLHttpRequest).upload&&this.isRemoteFileFormat(a,k)?(e=!0,this.parseFile(null!=w?w:new Blob([a],{type:"application/octet-stream"}),mxUtils.bind(this,function(a){if(4==a.readyState){var b=null;200<=a.status&&299>=a.status&&(a=a.responseText,null!=a&&"<mxlibrary"==a.substring(0,10)?(null!=k&&".vssx"==k.toLowerCase().substring(k.length-5)&&(k=k.substring(0,k.length-5)+".xml"),this.loadLibrary(new LocalLibrary(this,a,k))):b=this.importXml(a,c,d,y));null!=m&&m(b)}}),k)):
+" kB; MB; GB; TB;PB;EB;ZB;YB".split(";")[b]};EditorUi.prototype.convertDataUri=function(a){if("data:"==a.substring(0,5)){var b=a.indexOf(";");0<b&&(a=a.substring(0,b)+a.substring(a.indexOf(",",b+1)))}return a};EditorUi.prototype.isRemoteFileFormat=function(a,b){return/(\.*<graphml xmlns=\".*)/.test(a)||/(\"contentType\":\s*\"application\/gliffy\+json\")/.test(a)||null!=b&&/(\.vsdx)($|\?)/i.test(b)||null!=b&&/(\.vssx)($|\?)/i.test(b)};EditorUi.prototype.importFile=function(a,b,c,d,f,g,k,m,x,y,w){y=
+null!=y?y:!0;var e=!1,h=null;"image"==b.substring(0,5)?(x=!1,"image/png"==b.substring(0,9)&&(b=w?null:this.extractGraphModelFromPng(a),null!=b&&0<b.length&&(h=this.importXml(b,c,d,y),x=!0)),x||(h=this.editor.graph,b=a.indexOf(";"),0<b&&(a=a.substring(0,b)+a.substring(a.indexOf(",",b+1))),y&&h.isGridEnabled()&&(c=h.snap(c),d=h.snap(d)),h=[h.insertVertex(null,null,"",c,d,f,g,"shape=image;verticalLabelPosition=bottom;labelBackgroundColor=#ffffff;verticalAlign=top;aspect=fixed;imageAspect=0;image="+a+
+";")])):!this.isOffline()&&(new XMLHttpRequest).upload&&this.isRemoteFileFormat(a,k)?(e=!0,this.parseFile(null!=x?x:new Blob([a],{type:"application/octet-stream"}),mxUtils.bind(this,function(a){if(4==a.readyState){var b=null;200<=a.status&&299>=a.status&&(a=a.responseText,null!=a&&"<mxlibrary"==a.substring(0,10)?(null!=k&&".vssx"==k.toLowerCase().substring(k.length-5)&&(k=k.substring(0,k.length-5)+".xml"),this.loadLibrary(new LocalLibrary(this,a,k))):b=this.importXml(a,c,d,y));null!=m&&m(b)}}),k)):
 /(\.vsd)($|\?)/i.test(k)||(h=this.insertTextAt(this.validateFileData(a),c,d,!0,null,y));e||null==m||m(h);return h};EditorUi.prototype.base64Encode=function(a){for(var b="",c=0,d=a.length,e,f,g;c<d;){e=a.charCodeAt(c++)&255;if(c==d){b+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(e>>2);b+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((e&3)<<4);b+="==";break}f=a.charCodeAt(c++);if(c==d){b+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(e>>
 2);b+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((e&3)<<4|(f&240)>>4);b+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((f&15)<<2);b+="=";break}g=a.charCodeAt(c++);b+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(e>>2);b+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((e&3)<<4|(f&240)>>4);b+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((f&15)<<2|(g&192)>>6);
-b+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(g&63)}return b};EditorUi.prototype.importFiles=function(a,b,c,d,f,g,k,m,w,y,x,v){b=null!=b?b:0;c=null!=c?c:0;d=null!=d?d:this.maxImageSize;y=null!=y?y:this.maxImageBytes;var e=null!=b&&null!=c,h=!0,l=!1;if(!mxClient.IS_CHROMEAPP&&null!=a)for(var n=x||this.resampleThreshold,p=0;p<a.length;p++)if("image/"==a[p].type.substring(0,6)&&a[p].size>n){l=!0;break}var q=mxUtils.bind(this,function(){var l=this.editor.graph,n=l.gridSize;
-f=null!=f?f:mxUtils.bind(this,function(a,b,c,d,f,g,h,l,k){return null!=a&&"<mxlibrary"==a.substring(0,10)?(this.spinner.stop(),this.loadLibrary(new LocalLibrary(this,a,h)),null):this.importFile(a,b,c,d,f,g,h,l,k,e,v)});g=null!=g?g:mxUtils.bind(this,function(a){l.setSelectionCells(a)});if(this.spinner.spin(document.body,mxResources.get("loading")))for(var p=a.length,q=p,u=[],t=mxUtils.bind(this,function(a,b){u[a]=b;if(0==--q){this.spinner.stop();if(null!=m)m(u);else{var c=[];l.getModel().beginUpdate();
-try{for(var d=0;d<u.length;d++){var e=u[d]();null!=e&&(c=c.concat(e))}}finally{l.getModel().endUpdate()}}g(c)}}),D=0;D<p;D++)mxUtils.bind(this,function(e){var g=a[e],l=new FileReader;l.onload=mxUtils.bind(this,function(a){if(null==k||k(g))if("image/"==g.type.substring(0,6))if("image/svg"==g.type.substring(0,9)){var l=a.target.result,m=l.indexOf(","),p=atob(l.substring(m+1)),q=mxUtils.parseXml(p),p=q.getElementsByTagName("svg");if(0<p.length){var p=p[0],C=v?null:p.getAttribute("content");null!=C&&
-"<"!=C.charAt(0)&&"%"!=C.charAt(0)&&(C=unescape(window.atob?atob(C):Base64.decode(C,!0)));null!=C&&"%"==C.charAt(0)&&(C=decodeURIComponent(C));null==C||"<mxfile "!==C.substring(0,8)&&"<mxGraphModel "!==C.substring(0,14)?t(e,mxUtils.bind(this,function(){try{if(l.substring(0,m+1),null!=q){var a=q.getElementsByTagName("svg");if(0<a.length){var h=a[0],k=parseFloat(h.getAttribute("width")),x=parseFloat(h.getAttribute("height")),v=h.getAttribute("viewBox");if(null==v||0==v.length)h.setAttribute("viewBox",
-"0 0 "+k+" "+x);else if(isNaN(k)||isNaN(x)){var p=v.split(" ");3<p.length&&(k=parseFloat(p[2]),x=parseFloat(p[3]))}l=this.createSvgDataUri(mxUtils.getXml(a[0]));var C=Math.min(1,Math.min(d/Math.max(1,k)),d/Math.max(1,x));return f(l,g.type,b+e*n,c+e*n,Math.max(1,Math.round(k*C)),Math.max(1,Math.round(x*C)),g.name)}}}catch(Z){}return null})):t(e,mxUtils.bind(this,function(){return f(C,"text/xml",b+e*n,c+e*n,0,0,g.name)}))}}else{p=!1;if("image/png"==g.type){var u=v?null:this.extractGraphModelFromPng(a.target.result);
-if(null!=u&&0<u.length){var D=new Image;D.src=a.target.result;t(e,mxUtils.bind(this,function(){return f(u,"text/xml",b+e*n,c+e*n,D.width,D.height,g.name)}));p=!0}}p||(mxClient.IS_CHROMEAPP?(this.spinner.stop(),this.showError(mxResources.get("error"),mxResources.get("dragAndDropNotSupported"),mxResources.get("cancel"),mxUtils.bind(this,function(){}),null,mxResources.get("ok"),mxUtils.bind(this,function(){this.actions.get("import").funct()}))):this.loadImage(a.target.result,mxUtils.bind(this,function(l){this.resizeImage(l,
-a.target.result,mxUtils.bind(this,function(l,k,m){t(e,mxUtils.bind(this,function(){if(null!=l&&l.length<y){var v=h&&this.isResampleImage(a.target.result,x)?Math.min(1,Math.min(d/k,d/m)):1;return f(l,g.type,b+e*n,c+e*n,Math.round(k*v),Math.round(m*v),g.name)}this.handleError({message:mxResources.get("imageTooBig")});return null}))}),h,d,x)})))}else f(a.target.result,g.type,b+e*n,c+e*n,240,160,g.name,function(a){t(e,function(){return a})})});/(\.vsdx)($|\?)/i.test(g.name)||/(\.vssx)($|\?)/i.test(g.name)?
-f(null,g.type,b+e*n,c+e*n,240,160,g.name,function(a){t(e,function(){return a})},g):"image"==g.type.substring(0,5)?l.readAsDataURL(g):l.readAsText(g)})(D)});l?this.confirmImageResize(function(a){h=a;q()},w):q()};EditorUi.prototype.confirmImageResize=function(a,b){b=null!=b?b:!1;var c=null!=this.spinner&&null!=this.spinner.pause?this.spinner.pause():function(){},d=isLocalStorage||mxClient.IS_CHROMEAPP?mxSettings.getResizeImages():null,e=function(d,e){if(d||b)mxSettings.setResizeImages(d?e:null),mxSettings.save();
+b+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(g&63)}return b};EditorUi.prototype.importFiles=function(a,b,c,d,f,g,k,m,x,y,w,v){b=null!=b?b:0;c=null!=c?c:0;d=null!=d?d:this.maxImageSize;y=null!=y?y:this.maxImageBytes;var e=null!=b&&null!=c,h=!0,l=!1;if(!mxClient.IS_CHROMEAPP&&null!=a)for(var n=w||this.resampleThreshold,p=0;p<a.length;p++)if("image/"==a[p].type.substring(0,6)&&a[p].size>n){l=!0;break}var q=mxUtils.bind(this,function(){var l=this.editor.graph,n=l.gridSize;
+f=null!=f?f:mxUtils.bind(this,function(a,b,c,d,f,g,h,l,k){return null!=a&&"<mxlibrary"==a.substring(0,10)?(this.spinner.stop(),this.loadLibrary(new LocalLibrary(this,a,h)),null):this.importFile(a,b,c,d,f,g,h,l,k,e,v)});g=null!=g?g:mxUtils.bind(this,function(a){l.setSelectionCells(a)});if(this.spinner.spin(document.body,mxResources.get("loading")))for(var p=a.length,q=p,t=[],u=mxUtils.bind(this,function(a,b){t[a]=b;if(0==--q){this.spinner.stop();if(null!=m)m(t);else{var c=[];l.getModel().beginUpdate();
+try{for(var d=0;d<t.length;d++){var e=t[d]();null!=e&&(c=c.concat(e))}}finally{l.getModel().endUpdate()}}g(c)}}),C=0;C<p;C++)mxUtils.bind(this,function(e){var g=a[e],l=new FileReader;l.onload=mxUtils.bind(this,function(a){if(null==k||k(g))if("image/"==g.type.substring(0,6))if("image/svg"==g.type.substring(0,9)){var l=a.target.result,m=l.indexOf(","),p=atob(l.substring(m+1)),q=mxUtils.parseXml(p),p=q.getElementsByTagName("svg");if(0<p.length){var p=p[0],D=v?null:p.getAttribute("content");null!=D&&
+"<"!=D.charAt(0)&&"%"!=D.charAt(0)&&(D=unescape(window.atob?atob(D):Base64.decode(D,!0)));null!=D&&"%"==D.charAt(0)&&(D=decodeURIComponent(D));null==D||"<mxfile "!==D.substring(0,8)&&"<mxGraphModel "!==D.substring(0,14)?u(e,mxUtils.bind(this,function(){try{if(l.substring(0,m+1),null!=q){var a=q.getElementsByTagName("svg");if(0<a.length){var h=a[0],k=parseFloat(h.getAttribute("width")),w=parseFloat(h.getAttribute("height")),p=h.getAttribute("viewBox");if(null==p||0==p.length)h.setAttribute("viewBox",
+"0 0 "+k+" "+w);else if(isNaN(k)||isNaN(w)){var v=p.split(" ");3<v.length&&(k=parseFloat(v[2]),w=parseFloat(v[3]))}l=this.createSvgDataUri(mxUtils.getXml(a[0]));var D=Math.min(1,Math.min(d/Math.max(1,k)),d/Math.max(1,w));return f(l,g.type,b+e*n,c+e*n,Math.max(1,Math.round(k*D)),Math.max(1,Math.round(w*D)),g.name)}}}catch(Z){}return null})):u(e,mxUtils.bind(this,function(){return f(D,"text/xml",b+e*n,c+e*n,0,0,g.name)}))}}else{p=!1;if("image/png"==g.type){var t=v?null:this.extractGraphModelFromPng(a.target.result);
+if(null!=t&&0<t.length){var C=new Image;C.src=a.target.result;u(e,mxUtils.bind(this,function(){return f(t,"text/xml",b+e*n,c+e*n,C.width,C.height,g.name)}));p=!0}}p||(mxClient.IS_CHROMEAPP?(this.spinner.stop(),this.showError(mxResources.get("error"),mxResources.get("dragAndDropNotSupported"),mxResources.get("cancel"),mxUtils.bind(this,function(){}),null,mxResources.get("ok"),mxUtils.bind(this,function(){this.actions.get("import").funct()}))):this.loadImage(a.target.result,mxUtils.bind(this,function(l){this.resizeImage(l,
+a.target.result,mxUtils.bind(this,function(l,k,m){u(e,mxUtils.bind(this,function(){if(null!=l&&l.length<y){var p=h&&this.isResampleImage(a.target.result,w)?Math.min(1,Math.min(d/k,d/m)):1;return f(l,g.type,b+e*n,c+e*n,Math.round(k*p),Math.round(m*p),g.name)}this.handleError({message:mxResources.get("imageTooBig")});return null}))}),h,d,w)})))}else f(a.target.result,g.type,b+e*n,c+e*n,240,160,g.name,function(a){u(e,function(){return a})})});/(\.vsdx)($|\?)/i.test(g.name)||/(\.vssx)($|\?)/i.test(g.name)?
+f(null,g.type,b+e*n,c+e*n,240,160,g.name,function(a){u(e,function(){return a})},g):"image"==g.type.substring(0,5)?l.readAsDataURL(g):l.readAsText(g)})(C)});l?this.confirmImageResize(function(a){h=a;q()},x):q()};EditorUi.prototype.confirmImageResize=function(a,b){b=null!=b?b:!1;var c=null!=this.spinner&&null!=this.spinner.pause?this.spinner.pause():function(){},d=isLocalStorage||mxClient.IS_CHROMEAPP?mxSettings.getResizeImages():null,e=function(d,e){if(d||b)mxSettings.setResizeImages(d?e:null),mxSettings.save();
 c();a(e)};null==d||b?this.showDialog((new ConfirmDialog(this,mxResources.get("resizeLargeImages"),function(a){e(a,!0)},function(a){e(a,!1)},mxResources.get("resize"),mxResources.get("actualSize"),'<img style="margin-top:8px;" src="'+Editor.loResImage+'"/>','<img style="margin-top:8px;" src="'+Editor.hiResImage+'"/>',isLocalStorage||mxClient.IS_CHROMEAPP)).container,340,isLocalStorage||mxClient.IS_CHROMEAPP?220:200,!0,!0):e(!1,d)};EditorUi.prototype.parseFile=function(a,b,c){c=null!=c?c:a.name;var d=
 new FormData;d.append("format","xml");d.append("upfile",a,c);var e=new XMLHttpRequest;e.open("POST",OPEN_URL);e.onreadystatechange=function(){b(e)};e.send(d)};EditorUi.prototype.isResampleImage=function(a,b){b=null!=b?b:this.resampleThreshold;return a.length>b};EditorUi.prototype.resizeImage=function(a,b,c,d,f,g){f=null!=f?f:this.maxImageSize;var e=Math.max(1,a.width),h=Math.max(1,a.height);if(d&&this.isResampleImage(b,g))try{var l=Math.max(e/f,h/f);if(1<l){var k=Math.round(e/l),m=Math.round(h/l),
-n=document.createElement("canvas");n.width=k;n.height=m;n.getContext("2d").drawImage(a,0,0,k,m);var p=n.toDataURL();if(p.length<b.length){var t=document.createElement("canvas");t.width=k;t.height=m;var A=t.toDataURL();p!==A&&(b=p,e=k,h=m)}}}catch(G){}c(b,e,h)};EditorUi.prototype.crcTable=[];for(var d=0;256>d;d++)for(var c=d,f=0;8>f;f++)c=1==(c&1)?3988292384^c>>>1:c>>>1,EditorUi.prototype.crcTable[d]=c;EditorUi.prototype.updateCRC=function(a,b,c,d){for(var e=0;e<d;e++)a=EditorUi.prototype.crcTable[(a^
+n=document.createElement("canvas");n.width=k;n.height=m;n.getContext("2d").drawImage(a,0,0,k,m);var p=n.toDataURL();if(p.length<b.length){var u=document.createElement("canvas");u.width=k;u.height=m;var A=u.toDataURL();p!==A&&(b=p,e=k,h=m)}}}catch(G){}c(b,e,h)};EditorUi.prototype.crcTable=[];for(var d=0;256>d;d++)for(var c=d,f=0;8>f;f++)c=1==(c&1)?3988292384^c>>>1:c>>>1,EditorUi.prototype.crcTable[d]=c;EditorUi.prototype.updateCRC=function(a,b,c,d){for(var e=0;e<d;e++)a=EditorUi.prototype.crcTable[(a^
 b[c+e])&255]^a>>>8;return a};EditorUi.prototype.writeGraphModelToPng=function(a,b,c,d,f){function e(a,b){var c=l;l+=b;return a.substring(c,l)}function g(a){a=e(a,4);return a.charCodeAt(3)+(a.charCodeAt(2)<<8)+(a.charCodeAt(1)<<16)+(a.charCodeAt(0)<<24)}function h(a){return String.fromCharCode(a>>24&255,a>>16&255,a>>8&255,a&255)}a=a.substring(a.indexOf(",")+1);a=window.atob?atob(a):Base64.decode(a,!0);var l=0;if(e(a,8)!=String.fromCharCode(137)+"PNG"+String.fromCharCode(13,10,26,10))null!=f&&f();else if(e(a,
 4),"IHDR"!=e(a,4))null!=f&&f();else{e(a,17);f=a.substring(0,l);do{var k=g(a);if("IDAT"==e(a,4)){f=a.substring(0,l-8);c=c+String.fromCharCode(0)+("zTXt"==b?String.fromCharCode(0):"")+d;d=4294967295;d=this.updateCRC(d,b,0,4);d=this.updateCRC(d,c,0,c.length);f+=h(c.length)+b+c+h(d^4294967295);f+=a.substring(l-8,a.length);break}f+=a.substring(l-8,l-4+k);d=e(a,k);e(a,4)}while(k);return"data:image/png;base64,"+(window.btoa?btoa(f):Base64.encode(f,!0))}};EditorUi.prototype.extractGraphModelFromPng=function(a){var b=
 null;try{var c=a.substring(a.indexOf(",")+1),d=window.atob&&!mxClient.IS_SF?atob(c):Base64.decode(c,!0);EditorUi.parsePng(d,mxUtils.bind(this,function(a,c,e){a=d.substring(a+8,a+8+e);"zTXt"==c?(e=a.indexOf(String.fromCharCode(0)),"mxGraphModel"==a.substring(0,e)&&(a=this.editor.graph.bytesToString(pako.inflateRaw(a.substring(e+2))).replace(/\+/g," "),null!=a&&0<a.length&&(b=a))):"tEXt"==c&&(a=a.split(String.fromCharCode(0)),1<a.length&&"mxGraphModel"==a[0]&&(b=a[1]));if(null!=b||"IDAT"==c)return!0}))}catch(p){}null!=
@@ -6402,63 +6404,63 @@ b&&"%"==b.charAt(0)&&(b=decodeURIComponent(b));null!=b&&"%"==b.charAt(0)&&(b=dec
 d=b.editor.getEditBlankUrl;this.editor.getEditBlankUrl=function(a){a=null!=a?a:"";if(null!=b.pages&&null!=b.currentPage)for(var c=0;c<b.pages.length;c++)if(b.pages[c]==b.currentPage){0<c&&(a+=(0<a.length?"&":"?")+"page="+c);break}"1"==urlParams.dev&&(a+=(0<a.length?"&":"?")+"dev=1&drawdev=1");return d.apply(this,arguments)};var f=c.addClickHandler;c.addClickHandler=function(b,d,e){var g=d;d=function(b,d){if(null==d){var e=mxEvent.getSource(b);"a"==e.nodeName.toLowerCase()&&(d=e.getAttribute("href"))}null==
 d||!c.isPageLink(d)||!mxEvent.isTouchEvent(b)&&mxEvent.isPopupTrigger(b)||(a(d),mxEvent.consume(b));null!=g&&g(b,d)};f.call(this,b,d,e)};g.apply(this,arguments);mxClient.IS_SVG&&this.editor.graph.addSvgShadow(c.view.canvas.ownerSVGElement,null,!0);b.actions.get("print").funct=function(){b.showDialog((new PrintDialog(b)).container,360,null!=b.pages&&1<b.pages.length?420:360,!0,!0)};this.defaultFilename=mxResources.get("untitledDiagram");var k=c.getGlobalVariable;c.getGlobalVariable=function(a){return"page"==
 a&&null!=b.currentPage?b.currentPage.getName():"pagenumber"==a?null!=b.currentPage&&null!=b.pages?mxUtils.indexOf(b.pages,b.currentPage)+1:1:k.apply(this,arguments)};var m=c.createLinkForHint;c.createLinkForHint=function(d,e){var f=c.isPageLink(d);if(f){var g=d.indexOf(",");0<g&&(g=b.getPageById(d.substring(g+1)),e=null!=g?g.getName():mxResources.get("pageNotFound"))}g=m.call(this,d,e);f&&mxEvent.addListener(g,"click",function(b){a(d);mxEvent.consume(b)});return g};var q=c.labelLinkClicked;c.labelLinkClicked=
-function(b,d,e){var f=d.getAttribute("href");null==f||!c.isPageLink(f)||!mxEvent.isTouchEvent(e)&&mxEvent.isPopupTrigger(e)?q.apply(this,arguments):(c.isEnabled()||a(f),mxEvent.consume(e))};this.editor.getOrCreateFilename=function(){var a=b.defaultFilename,c=b.getCurrentFile();null!=c&&(a=null!=c.getTitle()?c.getTitle():a);return a};var w=this.actions.get("print");w.setEnabled(!mxClient.IS_IOS||!navigator.standalone);w.visible=w.isEnabled();if(!this.editor.chromeless||this.editor.editable){var y=
-function(){window.setTimeout(function(){x.innerHTML="&nbsp;";x.focus();document.execCommand("selectAll",!1,null)},0)};this.keyHandler.bindAction(70,!0,"find");this.keyHandler.bindAction(67,!0,"copyStyle",!0);this.keyHandler.bindAction(86,!0,"pasteStyle",!0);this.keyHandler.bindAction(77,!0,"editGeometry",!0);this.keyHandler.bindAction(88,!0,"insertText",!0);this.keyHandler.bindAction(75,!0,"insertRectangle");this.keyHandler.bindAction(75,!0,"insertEllipse",!0);mxClient.IS_IE||c.container.addEventListener("paste",
+function(b,d,e){var f=d.getAttribute("href");null==f||!c.isPageLink(f)||!mxEvent.isTouchEvent(e)&&mxEvent.isPopupTrigger(e)?q.apply(this,arguments):(c.isEnabled()||a(f),mxEvent.consume(e))};this.editor.getOrCreateFilename=function(){var a=b.defaultFilename,c=b.getCurrentFile();null!=c&&(a=null!=c.getTitle()?c.getTitle():a);return a};var x=this.actions.get("print");x.setEnabled(!mxClient.IS_IOS||!navigator.standalone);x.visible=x.isEnabled();if(!this.editor.chromeless||this.editor.editable){var y=
+function(){window.setTimeout(function(){w.innerHTML="&nbsp;";w.focus();document.execCommand("selectAll",!1,null)},0)};this.keyHandler.bindAction(70,!0,"find");this.keyHandler.bindAction(67,!0,"copyStyle",!0);this.keyHandler.bindAction(86,!0,"pasteStyle",!0);this.keyHandler.bindAction(77,!0,"editGeometry",!0);this.keyHandler.bindAction(88,!0,"insertText",!0);this.keyHandler.bindAction(75,!0,"insertRectangle");this.keyHandler.bindAction(75,!0,"insertEllipse",!0);mxClient.IS_IE||c.container.addEventListener("paste",
 mxUtils.bind(this,function(a){var b=this.editor.graph;if(!mxEvent.isConsumed(a))try{for(var c=a.clipboardData||a.originalEvent.clipboardData,d=!1,e=0;e<c.types.length;e++)if("text/"===c.types[e].substring(0,5)){d=!0;break}if(!d){var f=c.items;for(index in f){var g=f[index];if("file"===g.kind){if(b.isEditing())this.importFiles([g.getAsFile()],0,0,this.maxImageSize,function(a,c,d,e,f,g){b.insertImage(a,f,g)},function(){},function(a){return"image/"==a.type.substring(0,6)},function(a){for(var b=0;b<a.length;b++)a[b]()});
-else{var h=this.editor.graph.getInsertPoint();this.importFiles([g.getAsFile()],h.x,h.y,this.maxImageSize);mxEvent.consume(a)}break}}}}catch(R){}}),!1);var x=document.createElement("div");x.style.position="absolute";x.style.whiteSpace="nowrap";x.style.overflow="hidden";x.style.display="block";x.contentEditable=!0;mxUtils.setOpacity(x,0);x.style.width="1px";x.style.height="1px";x.innerHTML="&nbsp;";var v=!1;this.keyHandler.bindControlKey(88,null);this.keyHandler.bindControlKey(67,null);this.keyHandler.bindControlKey(86,
-null);mxEvent.addListener(document,"keydown",mxUtils.bind(this,function(a){var b=mxEvent.getSource(a);null==c.container||!c.isEnabled()||c.isMouseDown||c.isEditing()||null!=this.dialog||"INPUT"==b.nodeName||"TEXTAREA"==b.nodeName||!(224==a.keyCode||!mxClient.IS_MAC&&17==a.keyCode||mxClient.IS_MAC&&91==a.keyCode)||v||(x.style.left=c.container.scrollLeft+10+"px",x.style.top=c.container.scrollTop+10+"px",c.container.appendChild(x),v=!0,mxClient.IS_QUIRKS?window.setTimeout(function(){x.focus();document.execCommand("selectAll",
-!1,null)},0):(x.focus(),document.execCommand("selectAll",!1,null)))}));mxEvent.addListener(document,"keyup",mxUtils.bind(this,function(a){var b=a.keyCode;window.setTimeout(mxUtils.bind(this,function(){!v||224!=b&&17!=b&&91!=b||(v=!1,c.isEditing()||null!=this.dialog||null==c.container||c.container.focus(),x.parentNode.removeChild(x))}),0)}));mxEvent.addListener(x,"copy",mxUtils.bind(this,function(a){c.isEnabled()&&(mxClipboard.copy(c),this.copyCells(x),y())}));mxEvent.addListener(x,"cut",mxUtils.bind(this,
-function(a){c.isEnabled()&&(this.copyCells(x,!0),y())}));mxEvent.addListener(x,"paste",mxUtils.bind(this,function(a){c.isEnabled()&&!c.isCellLocked(c.getDefaultParent())&&(x.innerHTML="&nbsp;",x.focus(),window.setTimeout(mxUtils.bind(this,function(){this.pasteCells(a,x);x.innerHTML="&nbsp;"}),0))}),!0);var D=this.isSelectionAllowed;this.isSelectionAllowed=function(a){return mxEvent.getSource(a)==x?!0:D.apply(this,arguments)}}this.spinner=this.createSpinner(document.body.clientWidth/2-2,Math.max(document.body.clientHeight||
+else{var h=this.editor.graph.getInsertPoint();this.importFiles([g.getAsFile()],h.x,h.y,this.maxImageSize);mxEvent.consume(a)}break}}}}catch(R){}}),!1);var w=document.createElement("div");w.style.position="absolute";w.style.whiteSpace="nowrap";w.style.overflow="hidden";w.style.display="block";w.contentEditable=!0;mxUtils.setOpacity(w,0);w.style.width="1px";w.style.height="1px";w.innerHTML="&nbsp;";var v=!1;this.keyHandler.bindControlKey(88,null);this.keyHandler.bindControlKey(67,null);this.keyHandler.bindControlKey(86,
+null);mxEvent.addListener(document,"keydown",mxUtils.bind(this,function(a){var b=mxEvent.getSource(a);null==c.container||!c.isEnabled()||c.isMouseDown||c.isEditing()||null!=this.dialog||"INPUT"==b.nodeName||"TEXTAREA"==b.nodeName||!(224==a.keyCode||!mxClient.IS_MAC&&17==a.keyCode||mxClient.IS_MAC&&91==a.keyCode)||v||(w.style.left=c.container.scrollLeft+10+"px",w.style.top=c.container.scrollTop+10+"px",c.container.appendChild(w),v=!0,mxClient.IS_QUIRKS?window.setTimeout(function(){w.focus();document.execCommand("selectAll",
+!1,null)},0):(w.focus(),document.execCommand("selectAll",!1,null)))}));mxEvent.addListener(document,"keyup",mxUtils.bind(this,function(a){var b=a.keyCode;window.setTimeout(mxUtils.bind(this,function(){!v||224!=b&&17!=b&&91!=b||(v=!1,c.isEditing()||null!=this.dialog||null==c.container||c.container.focus(),w.parentNode.removeChild(w))}),0)}));mxEvent.addListener(w,"copy",mxUtils.bind(this,function(a){c.isEnabled()&&(mxClipboard.copy(c),this.copyCells(w),y())}));mxEvent.addListener(w,"cut",mxUtils.bind(this,
+function(a){c.isEnabled()&&(this.copyCells(w,!0),y())}));mxEvent.addListener(w,"paste",mxUtils.bind(this,function(a){c.isEnabled()&&!c.isCellLocked(c.getDefaultParent())&&(w.innerHTML="&nbsp;",w.focus(),window.setTimeout(mxUtils.bind(this,function(){this.pasteCells(a,w);w.innerHTML="&nbsp;"}),0))}),!0);var C=this.isSelectionAllowed;this.isSelectionAllowed=function(a){return mxEvent.getSource(a)==w?!0:C.apply(this,arguments)}}this.spinner=this.createSpinner(document.body.clientWidth/2-2,Math.max(document.body.clientHeight||
 0,document.documentElement.clientHeight||0)/2,24);Graph.fileSupport&&this.editor.graph.addListener(mxEvent.EDITING_STARTED,mxUtils.bind(this,function(a){var b=this.editor.graph,c=b.cellEditor.text2,d=null;null!=c&&(mxEvent.addListener(c,"dragleave",function(a){null!=d&&(d.parentNode.removeChild(d),d=null);a.stopPropagation();a.preventDefault()}),mxEvent.addListener(c,"dragover",mxUtils.bind(this,function(a){null==d&&(!mxClient.IS_IE||10<document.documentMode)&&(d=this.highlightElement(c));a.stopPropagation();
 a.preventDefault()})),mxEvent.addListener(c,"drop",mxUtils.bind(this,function(a){null!=d&&(d.parentNode.removeChild(d),d=null);if(0<a.dataTransfer.files.length)this.importFiles(a.dataTransfer.files,0,0,this.maxImageSize,function(a,c,d,e,f,g){b.insertImage(a,f,g)},function(){},function(a){return"image/"==a.type.substring(0,6)},function(a){for(var b=0;b<a.length;b++)a[b]()},mxEvent.isControlDown(a));else if(0<=mxUtils.indexOf(a.dataTransfer.types,"text/uri-list")){var c=a.dataTransfer.getData("text/uri-list");
 /\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(c)?this.loadImage(decodeURIComponent(c),mxUtils.bind(this,function(a){var d=Math.max(1,a.width);a=Math.max(1,a.height);var e=this.maxImageSize,e=Math.min(1,Math.min(e/Math.max(1,d)),e/Math.max(1,a));b.insertImage(decodeURIComponent(c),d*e,a*e)})):document.execCommand("insertHTML",!1,a.dataTransfer.getData("text/plain"))}else 0<=mxUtils.indexOf(a.dataTransfer.types,"text/html")?document.execCommand("insertHTML",!1,a.dataTransfer.getData("text/html")):0<=mxUtils.indexOf(a.dataTransfer.types,
-"text/plain")&&document.execCommand("insertHTML",!1,a.dataTransfer.getData("text/plain"));a.stopPropagation();a.preventDefault()})))}));if("1"==urlParams.ruler&&"undefined"!==typeof mxRuler){w=document.createElement("div");w.style.position="absolute";w.style.top="95px";w.style.left="250px";w.style.width="2000px";w.style.height="30px";w.style.background="whiteSmoke";document.body.appendChild(w);var B=document.createElement("div");B.style.position="absolute";B.style.top="125px";B.style.left="220px";
-B.style.width="30px";B.style.height="1000px";B.style.background="whiteSmoke";document.body.appendChild(B);var A=document.createElement("div");A.style.position="absolute";A.style.top="95px";A.style.left="220px";A.style.width="30px";A.style.height="30px";A.style.background="whiteSmoke";document.body.appendChild(A);this.vRuler=new mxRuler(this.editor.graph,B,!0);this.hRuler=new mxRuler(this.editor.graph,w,!1)}if("1"==urlParams.test){w=document.getElementById("geFooter");null!=w&&(this.styleInput=document.createElement("input"),
-this.styleInput.setAttribute("type","text"),this.styleInput.style.position="absolute",this.styleInput.style.top="14px",this.styleInput.style.left="2px",this.styleInput.style.width="98%",this.styleInput.style.visibility="hidden",this.styleInput.style.opacity="0.9",mxEvent.addListener(this.styleInput,"change",mxUtils.bind(this,function(){this.editor.graph.getModel().setStyle(this.editor.graph.getSelectionCell(),this.styleInput.value)})),w.appendChild(this.styleInput),this.editor.graph.getSelectionModel().addListener(mxEvent.CHANGE,
-mxUtils.bind(this,function(a,b){if(0<this.editor.graph.getSelectionCount()){var c=this.editor.graph.getSelectionCell(),c=this.editor.graph.getModel().getStyle(c);this.styleInput.value=c||"";this.styleInput.style.visibility="visible"}else this.styleInput.style.visibility="hidden"})));var G=this.isSelectionAllowed;this.isSelectionAllowed=function(a){return mxEvent.getSource(a)==this.styleInput?!0:G.apply(this,arguments)}}w=document.getElementById("geInfo");null!=w&&w.parentNode.removeChild(w);if(Graph.fileSupport&&
+"text/plain")&&document.execCommand("insertHTML",!1,a.dataTransfer.getData("text/plain"));a.stopPropagation();a.preventDefault()})))}));if("1"==urlParams.ruler&&"undefined"!==typeof mxRuler){x=document.createElement("div");x.style.position="absolute";x.style.top="95px";x.style.left="250px";x.style.width="2000px";x.style.height="30px";x.style.background="whiteSmoke";document.body.appendChild(x);var B=document.createElement("div");B.style.position="absolute";B.style.top="125px";B.style.left="220px";
+B.style.width="30px";B.style.height="1000px";B.style.background="whiteSmoke";document.body.appendChild(B);var A=document.createElement("div");A.style.position="absolute";A.style.top="95px";A.style.left="220px";A.style.width="30px";A.style.height="30px";A.style.background="whiteSmoke";document.body.appendChild(A);this.vRuler=new mxRuler(this.editor.graph,B,!0);this.hRuler=new mxRuler(this.editor.graph,x,!1)}if("1"==urlParams.test){x=document.getElementById("geFooter");null!=x&&(this.styleInput=document.createElement("input"),
+this.styleInput.setAttribute("type","text"),this.styleInput.style.position="absolute",this.styleInput.style.top="14px",this.styleInput.style.left="2px",this.styleInput.style.width="98%",this.styleInput.style.visibility="hidden",this.styleInput.style.opacity="0.9",mxEvent.addListener(this.styleInput,"change",mxUtils.bind(this,function(){this.editor.graph.getModel().setStyle(this.editor.graph.getSelectionCell(),this.styleInput.value)})),x.appendChild(this.styleInput),this.editor.graph.getSelectionModel().addListener(mxEvent.CHANGE,
+mxUtils.bind(this,function(a,b){if(0<this.editor.graph.getSelectionCount()){var c=this.editor.graph.getSelectionCell(),c=this.editor.graph.getModel().getStyle(c);this.styleInput.value=c||"";this.styleInput.style.visibility="visible"}else this.styleInput.style.visibility="hidden"})));var G=this.isSelectionAllowed;this.isSelectionAllowed=function(a){return mxEvent.getSource(a)==this.styleInput?!0:G.apply(this,arguments)}}x=document.getElementById("geInfo");null!=x&&x.parentNode.removeChild(x);if(Graph.fileSupport&&
 (!this.editor.chromeless||this.editor.editable)){var z=null;mxEvent.addListener(c.container,"dragleave",function(a){c.isEnabled()&&(null!=z&&(z.parentNode.removeChild(z),z=null),a.stopPropagation(),a.preventDefault())});mxEvent.addListener(c.container,"dragover",mxUtils.bind(this,function(a){null==z&&(!mxClient.IS_IE||10<document.documentMode)&&(z=this.highlightElement(c.container));null!=this.sidebar&&this.sidebar.hideTooltip();a.stopPropagation();a.preventDefault()}));mxEvent.addListener(c.container,
 "drop",mxUtils.bind(this,function(a){null!=z&&(z.parentNode.removeChild(z),z=null);if(c.isEnabled()){var b=mxUtils.convertPoint(c.container,mxEvent.getClientX(a),mxEvent.getClientY(a)),d=c.view.translate,e=c.view.scale,f=b.x/e-d.x,g=b.y/e-d.y;mxEvent.isAltDown(a)&&(g=f=0);if(0<a.dataTransfer.files.length)this.importFiles(a.dataTransfer.files,f,g,this.maxImageSize,null,null,null,null,mxEvent.isControlDown(a),null,null,mxEvent.isShiftDown(a));else{var h=0<=mxUtils.indexOf(a.dataTransfer.types,"text/uri-list")?
-a.dataTransfer.getData("text/uri-list"):null,b=this.extractGraphModelFromEvent(a,null!=this.pages);if(null!=b)c.setSelectionCells(this.importXml(b,f,g,!0));else if(0<=mxUtils.indexOf(a.dataTransfer.types,"text/html")){var l=a.dataTransfer.getData("text/html"),b=document.createElement("div");b.innerHTML=l;var k=null,d=b.getElementsByTagName("img");null!=d&&1==d.length?(l=d[0].getAttribute("src"),/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(l)||(k=!0)):(b=b.getElementsByTagName("a"),null!=b&&1==b.length&&
-(l=b[0].getAttribute("href")));var m=!0,n=mxUtils.bind(this,function(){c.setSelectionCells(this.insertTextAt(l,f,g,!0,k,null,m))});k&&l.length>this.resampleThreshold?this.confirmImageResize(function(a){m=a;n()},mxEvent.isControlDown(a)):n()}else null!=h&&/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(h)?this.loadImage(decodeURIComponent(h),mxUtils.bind(this,function(a){var b=Math.max(1,a.width);a=Math.max(1,a.height);var d=this.maxImageSize,d=Math.min(1,Math.min(d/Math.max(1,b)),d/Math.max(1,a));c.setSelectionCell(c.insertVertex(null,
-null,"",f,g,b*d,a*d,"shape=image;verticalLabelPosition=bottom;labelBackgroundColor=#ffffff;verticalAlign=top;aspect=fixed;imageAspect=0;image="+h+";"))}),mxUtils.bind(this,function(a){c.setSelectionCells(this.insertTextAt(h,f,g,!0))})):0<=mxUtils.indexOf(a.dataTransfer.types,"text/plain")&&c.setSelectionCells(this.insertTextAt(a.dataTransfer.getData("text/plain"),f,g,!0))}}a.stopPropagation();a.preventDefault()}),!1)}this.initPages();"1"==urlParams.embed&&this.initializeEmbedMode();"undefined"!==
-typeof window.mxSettings&&this.installSettings()};EditorUi.prototype.installSettings=function(){if(isLocalStorage||mxClient.IS_CHROMEAPP){ColorDialog.recentColors=mxSettings.getRecentColors();this.editor.graph.currentEdgeStyle=mxSettings.getCurrentEdgeStyle();this.editor.graph.currentVertexStyle=mxSettings.getCurrentVertexStyle();this.fireEvent(new mxEventObject("styleChanged","keys",[],"values",[],"cells",[]));this.addListener("styleChanged",mxUtils.bind(this,function(a,b){mxSettings.setCurrentEdgeStyle(this.editor.graph.currentEdgeStyle);
-mxSettings.setCurrentVertexStyle(this.editor.graph.currentVertexStyle);mxSettings.save()}));this.editor.graph.connectionHandler.setCreateTarget(mxSettings.isCreateTarget());this.fireEvent(new mxEventObject("copyConnectChanged"));this.addListener("copyConnectChanged",mxUtils.bind(this,function(a,b){mxSettings.setCreateTarget(this.editor.graph.connectionHandler.isCreateTarget());mxSettings.save()}));this.editor.graph.pageFormat=mxSettings.getPageFormat();this.addListener("pageFormatChanged",mxUtils.bind(this,
-function(a,b){mxSettings.setPageFormat(this.editor.graph.pageFormat);mxSettings.save()}));this.editor.graph.view.gridColor=mxSettings.getGridColor();this.addListener("gridColorChanged",mxUtils.bind(this,function(a,b){mxSettings.setGridColor(this.editor.graph.view.gridColor);mxSettings.save()}));if(mxClient.IS_CHROMEAPP||EditorUi.isElectronApp)this.editor.addListener("autosaveChanged",mxUtils.bind(this,function(a,b){mxSettings.setAutosave(this.editor.autosave);mxSettings.save()})),this.editor.autosave=
-mxSettings.getAutosave();null!=this.sidebar&&this.sidebar.showPalette("search",mxSettings.settings.search);this.editor.chromeless&&!this.editor.editable||null==this.sidebar||!(mxSettings.settings.isNew||8>=parseInt(mxSettings.settings.version||0))||(this.toggleScratchpad(),mxSettings.save());this.addListener("formatWidthChanged",function(){mxSettings.setFormatWidth(this.formatWidth);mxSettings.save()})}};EditorUi.prototype.copyCells=function(a,b){var c=this.editor.graph;if(c.isSelectionEmpty())a.innerHTML=
-"";else{var d=mxUtils.sortCells(c.model.getTopmostCells(c.getSelectionCells())),e=mxUtils.getXml(this.editor.graph.encodeCells(d));mxUtils.setTextContent(a,encodeURIComponent(e));b?(c.removeCells(d,!1),c.lastPasteXml=null):(c.lastPasteXml=e,c.pasteCounter=0);a.focus();document.execCommand("selectAll",!1,null)}};EditorUi.prototype.pasteCells=function(a,b){if(!mxEvent.isConsumed(a)){var c=b.getElementsByTagName("span");if(null!=c&&0<c.length&&"application/vnd.lucid.chart.objects"===c[0].getAttribute("data-lucid-type")){var d=
-c[0].getAttribute("data-lucid-content");null!=d&&0<d.length&&(this.importLucidChart(d,0,0),mxEvent.consume(a))}else{var d=this.editor.graph,e=mxUtils.trim(mxClient.IS_QUIRKS||8==document.documentMode?mxUtils.getTextContent(b):b.textContent),f=!1;try{var g=e.lastIndexOf("%3E");0<=g&&g<e.length-3&&(e=e.substring(0,g+3))}catch(w){}try{var c=b.getElementsByTagName("span"),h=null!=c&&0<c.length?mxUtils.trim(decodeURIComponent(c[0].textContent)):decodeURIComponent(e);this.isCompatibleString(h)&&(f=!0,e=
-h)}catch(w){}d.lastPasteXml==e?d.pasteCounter++:(d.lastPasteXml=e,d.pasteCounter=0);c=d.pasteCounter*d.gridSize;if(null!=e&&0<e.length&&(f||this.isCompatibleString(e)?d.setSelectionCells(this.importXml(e,c,c)):(f=d.getInsertPoint(),d.isMouseInsertPoint()&&(c=0,d.lastPasteXml==e&&0<d.pasteCounter&&d.pasteCounter--),d.setSelectionCells(this.insertTextAt(e,f.x+c,f.y+c,!0))),!d.isSelectionEmpty())){d.scrollCellToVisible(d.getSelectionCell());null!=this.hoverIcons&&this.hoverIcons.update(d.view.getState(d.getSelectionCell()));
-try{mxEvent.consume(a)}catch(w){}}}}};EditorUi.prototype.addFileDropHandler=function(a){if(Graph.fileSupport)for(var b=null,c=0;c<a.length;c++)mxEvent.addListener(a[c],"dragleave",function(a){null!=b&&(b.parentNode.removeChild(b),b=null);a.stopPropagation();a.preventDefault()}),mxEvent.addListener(a[c],"dragover",mxUtils.bind(this,function(a){(this.editor.graph.isEnabled()||"1"!=urlParams.embed)&&null==b&&(!mxClient.IS_IE||10<document.documentMode&&12>document.documentMode)&&(b=this.highlightElement());
-a.stopPropagation();a.preventDefault()})),mxEvent.addListener(a[c],"drop",mxUtils.bind(this,function(a){null!=b&&(b.parentNode.removeChild(b),b=null);if(this.editor.graph.isEnabled()||"1"!=urlParams.embed)if(0<a.dataTransfer.files.length)this.hideDialog(),"1"==urlParams.embed?this.importFiles(a.dataTransfer.files,0,0,this.maxImageSize,null,null,null,null,!mxEvent.isControlDown(a)&&!mxEvent.isShiftDown(a)):this.openFiles(a.dataTransfer.files,!0);else{var c=this.extractGraphModelFromEvent(a);if(null==
-c){var d=null!=a.dataTransfer?a.dataTransfer:a.clipboardData;null!=d&&(10==document.documentMode||11==document.documentMode?c=d.getData("Text"):(c=null,c=0<=mxUtils.indexOf(d.types,"text/uri-list")?a.dataTransfer.getData("text/uri-list"):0<=mxUtils.indexOf(d.types,"text/html")?d.getData("text/html"):null,null!=c&&0<c.length?(d=document.createElement("div"),d.innerHTML=c,d=d.getElementsByTagName("img"),0<d.length&&(c=d[0].getAttribute("src"))):0<=mxUtils.indexOf(d.types,"text/plain")&&(c=d.getData("text/plain"))),
-null!=c&&("data:image/png;base64,"==c.substring(0,22)?(c=this.extractGraphModelFromPng(c),null!=c&&0<c.length&&this.openLocalFile(c,null,!0)):!this.isOffline()&&this.isRemoteFileFormat(c)?(new mxXmlRequest(OPEN_URL,"format=xml&data="+encodeURIComponent(c))).send(mxUtils.bind(this,function(a){200<=a.getStatus()&&299>=a.getStatus()&&this.openLocalFile(a.getText(),null,!0)})):/^https?:\/\//.test(c)&&(null==this.getCurrentFile()?window.location.hash="#U"+encodeURIComponent(c):window.openWindow((mxClient.IS_CHROMEAPP?
-"https://www.draw.io/":"https://"+location.host+"/")+window.location.search+"#U"+encodeURIComponent(c)))))}else this.openLocalFile(c,null,!0)}a.stopPropagation();a.preventDefault()}))};EditorUi.prototype.highlightElement=function(a){var b=0,c=0,d,e;if(null==a){e=document.body;var f=document.documentElement;d=(e.clientWidth||f.clientWidth)-3;e=Math.max(e.clientHeight||0,f.clientHeight)-3}else b=a.offsetTop,c=a.offsetLeft,d=a.clientWidth,e=a.clientHeight;f=document.createElement("div");f.style.zIndex=
-mxPopupMenu.prototype.zIndex+2;f.style.border="3px dotted rgb(254, 137, 12)";f.style.pointerEvents="none";f.style.position="absolute";f.style.top=b+"px";f.style.left=c+"px";f.style.width=Math.max(0,d-3)+"px";f.style.height=Math.max(0,e-3)+"px";null!=a&&a.parentNode==this.editor.graph.container?this.editor.graph.container.appendChild(f):document.body.appendChild(f);return f};EditorUi.prototype.stringToCells=function(a){a=mxUtils.parseXml(a);var b=this.editor.extractGraphModel(a.documentElement);a=
-[];if(null!=b){var c=new mxCodec(b.ownerDocument),d=new mxGraphModel;c.decode(b,d);b=d.getChildAt(d.getRoot(),0);for(c=0;c<d.getChildCount(b);c++)a.push(d.getChildAt(b,c))}return a};EditorUi.prototype.openFiles=function(a,b){if(this.spinner.spin(document.body,mxResources.get("loading")))for(var c=0;c<a.length;c++)mxUtils.bind(this,function(a){var c=new FileReader;c.onload=mxUtils.bind(this,function(c){var d=c.target.result,e=a.name;if(null!=e&&0<e.length)if(!this.useCanvasForExport&&/(\.png)$/i.test(e)&&
-(e=e.substring(0,e.length-4)+".xml"),Graph.fileSupport&&!this.isOffline()&&(new XMLHttpRequest).upload&&this.isRemoteFileFormat(d,e))e=0<=e.lastIndexOf(".")?e.substring(0,e.lastIndexOf("."))+".xml":e+".xml",this.parseFile(a,mxUtils.bind(this,function(a){if(4==a.readyState)if(this.spinner.stop(),200<=a.status&&299>=a.status)if(a=a.responseText,"<mxlibrary"==a.substring(0,10)){null==this.getCurrentFile()&&"1"!=urlParams.embed&&this.openLocalFile(this.emptyDiagramXml,this.defaultFilename,b);null!=e&&
-".vssx"==e.toLowerCase().substring(e.length-5)&&(e=e.substring(0,filename.length-5)+".xml");try{this.loadLibrary(new LocalLibrary(this,a,e))}catch(y){this.handleError(y,mxResources.get("errorLoadingFile"))}}else this.openLocalFile(a,e,b);else this.handleError({message:mxResources.get(413==a.status?"drawingTooLarge":"invalidOrMissingFile")},mxResources.get("errorLoadingFile"))}));else if('{"state":"{\\"Properties\\":'==d.substring(0,26))/(\.json)$/i.test(e)&&(e=e.substring(0,e.length-5)+".xml"),this.openLocalFile(this.emptyDiagramXml,
-e,b),this.importLucidChart(d,0,0,null,mxUtils.bind(this,function(){this.editor.undoManager.clear();this.spinner.stop()}));else if("<mxlibrary"==c.target.result.substring(0,10)){this.spinner.stop();null==this.getCurrentFile()&&"1"!=urlParams.embed&&this.openLocalFile(this.emptyDiagramXml,this.defaultFilename,b);try{this.loadLibrary(new LocalLibrary(this,c.target.result,a.name))}catch(w){this.handleError(w,mxResources.get("errorLoadingFile"))}}else"image/png"==a.type.substring(0,9)&&(d=this.extractGraphModelFromPng(d)),
-this.spinner.stop(),this.openLocalFile(d,e,b)});c.onerror=mxUtils.bind(this,function(a){this.spinner.stop();this.handleError(a);window.openFile=null});"image"===a.type.substring(0,5)&&"image/svg"!==a.type.substring(0,9)?c.readAsDataURL(a):c.readAsText(a)})(a[c])};EditorUi.prototype.openLocalFile=function(a,b,c){var d=this.getCurrentFile(),e=mxUtils.bind(this,function(){window.openFile=null;if(null==b&&null!=this.getCurrentFile()&&this.isDiagramEmpty()){var d=mxUtils.parseXml(a);null!=d&&(this.editor.setGraphXml(d.documentElement),
-this.editor.graph.selectAll())}else this.fileLoaded(new LocalFile(this,a,b||this.defaultFilename,c))});null!=a&&0<a.length&&(null==d||!d.isModified()&&(mxClient.IS_CHROMEAPP||EditorUi.isElectronApp)?e():(mxClient.IS_CHROMEAPP||EditorUi.isElectronApp)&&null!=d&&d.isModified()?this.confirm(mxResources.get("allChangesLost"),null,e,mxResources.get("cancel"),mxResources.get("discardChanges")):(window.openFile=new OpenFile(function(){window.openFile=null}),window.openFile.setData(a,b),window.openWindow(this.getUrl(),
-null,mxUtils.bind(this,function(){this.confirm(mxResources.get("allChangesLost"),null,e,mxResources.get("cancel"),mxResources.get("discardChanges"))}))))};EditorUi.prototype.getBasenames=function(){var a={};if(null!=this.pages)for(var b=0;b<this.pages.length;b++)this.updatePageRoot(this.pages[b]),this.addBasenamesForCell(this.pages[b].root,a);else this.addBasenamesForCell(this.editor.graph.model.getRoot(),a);var b=[],c;for(c in a)b.push(c);return b};EditorUi.prototype.addBasenamesForCell=function(a,
-b){function c(a){if(null!=a){var c=a.lastIndexOf(".");0<c&&(a=a.substring(c+1,a.length));null==b[a]&&(b[a]=!0)}}var d=this.editor.graph,e=d.getCellStyle(a);c(mxStencilRegistry.getBasenameForStencil(e[mxConstants.STYLE_SHAPE]));d.model.isEdge(a)&&(c(mxMarker.getPackageForType(e[mxConstants.STYLE_STARTARROW])),c(mxMarker.getPackageForType(e[mxConstants.STYLE_ENDARROW])));for(var e=d.model.getChildCount(a),f=0;f<e;f++)this.addBasenamesForCell(d.model.getChildAt(a,f),b)};EditorUi.prototype.setGraphEnabled=
-function(a){this.diagramContainer.style.visibility=a?"":"hidden";this.formatContainer.style.visibility=a?"":"hidden";this.sidebarFooterContainer.style.display=a?"":"none";this.sidebarContainer.style.display=a?"":"none";this.hsplit.style.display=a?"":"none";this.editor.graph.setEnabled(a);null!=this.tabContainer&&(this.tabContainer.style.visibility=a?"":"hidden")};EditorUi.prototype.initializeEmbedMode=function(){this.setGraphEnabled(!1);(window.opener||window.parent)!=window&&("1"!=urlParams.spin||
-this.spinner.spin(document.body,mxResources.get("loading")))&&this.installMessageHandler(mxUtils.bind(this,function(a,b,c){this.spinner.stop();this.addEmbedButtons();this.setGraphEnabled(!0);null!=a&&0<a.length?(this.setFileData(a),this.editor.chromeless?this.editor.graph.lightbox&&this.lightboxFit():this.showLayersDialog(),this.chromelessResize&&this.chromelessResize()):(this.editor.graph.model.clear(),this.editor.fireEvent(new mxEventObject("resetGraphView")));this.editor.undoManager.clear();this.editor.modified=
-null!=c?c:!1;this.updateUi();window.self!==window.top&&window.focus();null!=this.format&&this.format.refresh()}))};EditorUi.prototype.showLayersDialog=function(){1<this.editor.graph.getModel().getChildCount(this.editor.graph.getModel().getRoot())&&(null==this.actions.layersWindow?this.actions.get("layers").funct():this.actions.layersWindow.window.setVisible(!0))};EditorUi.prototype.getPublicUrl=function(a,b){null!=a?a.getPublicUrl(b):b(null)};EditorUi.prototype.createLoadMessage=function(a){var b=
-this.editor.graph;return{event:a,pageVisible:b.pageVisible,translate:b.view.translate,scale:b.view.scale,page:b.view.getBackgroundPageBounds(),bounds:b.getGraphBounds()}};EditorUi.prototype.installMessageHandler=function(a){var b=null,c=!1,d=!1,e=null,f=mxUtils.bind(this,function(a,b){this.editor.modified&&"0"!=urlParams.modified?null!=urlParams.modified&&this.editor.setStatus(mxUtils.htmlEntities(mxResources.get(urlParams.modified))):this.editor.setStatus("")});this.editor.graph.model.addListener(mxEvent.CHANGE,
+a.dataTransfer.getData("text/uri-list"):null,b=this.extractGraphModelFromEvent(a,null!=this.pages);if(null!=b)c.setSelectionCells(this.importXml(b,f,g,!0));else if(0<=mxUtils.indexOf(a.dataTransfer.types,"text/html")){var k=a.dataTransfer.getData("text/html"),b=document.createElement("div");b.innerHTML=k;var l=null,d=b.getElementsByTagName("img");null!=d&&1==d.length?(k=d[0].getAttribute("src"),/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(k)||(l=!0)):(b=b.getElementsByTagName("a"),null!=b&&1==b.length&&
+(k=b[0].getAttribute("href")));var m=!0,n=mxUtils.bind(this,function(){c.setSelectionCells(this.insertTextAt(k,f,g,!0,l,null,m))});l&&k.length>this.resampleThreshold?this.confirmImageResize(function(a){m=a;n()},mxEvent.isControlDown(a)):n()}else null!=h&&/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(h)?this.loadImage(decodeURIComponent(h),mxUtils.bind(this,function(a){var b=Math.max(1,a.width);a=Math.max(1,a.height);var d=this.maxImageSize,d=Math.min(1,Math.min(d/Math.max(1,b)),d/Math.max(1,a));c.setSelectionCell(c.insertVertex(null,
+null,"",f,g,b*d,a*d,"shape=image;verticalLabelPosition=bottom;labelBackgroundColor=#ffffff;verticalAlign=top;aspect=fixed;imageAspect=0;image="+h+";"))}),mxUtils.bind(this,function(a){c.setSelectionCells(this.insertTextAt(h,f,g,!0))})):0<=mxUtils.indexOf(a.dataTransfer.types,"text/plain")&&c.setSelectionCells(this.insertTextAt(a.dataTransfer.getData("text/plain"),f,g,!0))}}a.stopPropagation();a.preventDefault()}),!1)}this.initPages();"1"==urlParams.embed&&this.initializeEmbedMode();this.installSettings()};
+EditorUi.prototype.isSettingsEnabled=function(){return"undefined"!==typeof window.mxSettings&&(isLocalStorage||mxClient.IS_CHROMEAPP)};EditorUi.prototype.installSettings=function(){if(this.isSettingsEnabled()){ColorDialog.recentColors=mxSettings.getRecentColors();this.editor.graph.currentEdgeStyle=mxSettings.getCurrentEdgeStyle();this.editor.graph.currentVertexStyle=mxSettings.getCurrentVertexStyle();this.fireEvent(new mxEventObject("styleChanged","keys",[],"values",[],"cells",[]));this.addListener("styleChanged",
+mxUtils.bind(this,function(a,b){mxSettings.setCurrentEdgeStyle(this.editor.graph.currentEdgeStyle);mxSettings.setCurrentVertexStyle(this.editor.graph.currentVertexStyle);mxSettings.save()}));this.editor.graph.connectionHandler.setCreateTarget(mxSettings.isCreateTarget());this.fireEvent(new mxEventObject("copyConnectChanged"));this.addListener("copyConnectChanged",mxUtils.bind(this,function(a,b){mxSettings.setCreateTarget(this.editor.graph.connectionHandler.isCreateTarget());mxSettings.save()}));this.editor.graph.pageFormat=
+mxSettings.getPageFormat();this.addListener("pageFormatChanged",mxUtils.bind(this,function(a,b){mxSettings.setPageFormat(this.editor.graph.pageFormat);mxSettings.save()}));this.editor.graph.view.gridColor=mxSettings.getGridColor();this.addListener("gridColorChanged",mxUtils.bind(this,function(a,b){mxSettings.setGridColor(this.editor.graph.view.gridColor);mxSettings.save()}));if(mxClient.IS_CHROMEAPP||EditorUi.isElectronApp)this.editor.addListener("autosaveChanged",mxUtils.bind(this,function(a,b){mxSettings.setAutosave(this.editor.autosave);
+mxSettings.save()})),this.editor.autosave=mxSettings.getAutosave();null!=this.sidebar&&this.sidebar.showPalette("search",mxSettings.settings.search);this.editor.chromeless&&!this.editor.editable||null==this.sidebar||!(mxSettings.settings.isNew||8>=parseInt(mxSettings.settings.version||0))||(this.toggleScratchpad(),mxSettings.save());this.addListener("formatWidthChanged",function(){mxSettings.setFormatWidth(this.formatWidth);mxSettings.save()})}};EditorUi.prototype.copyCells=function(a,b){var c=this.editor.graph;
+if(c.isSelectionEmpty())a.innerHTML="";else{var d=mxUtils.sortCells(c.model.getTopmostCells(c.getSelectionCells())),e=mxUtils.getXml(this.editor.graph.encodeCells(d));mxUtils.setTextContent(a,encodeURIComponent(e));b?(c.removeCells(d,!1),c.lastPasteXml=null):(c.lastPasteXml=e,c.pasteCounter=0);a.focus();document.execCommand("selectAll",!1,null)}};EditorUi.prototype.pasteCells=function(a,b){if(!mxEvent.isConsumed(a)){var c=b.getElementsByTagName("span");if(null!=c&&0<c.length&&"application/vnd.lucid.chart.objects"===
+c[0].getAttribute("data-lucid-type")){var d=c[0].getAttribute("data-lucid-content");null!=d&&0<d.length&&(this.importLucidChart(d,0,0),mxEvent.consume(a))}else{var d=this.editor.graph,e=mxUtils.trim(mxClient.IS_QUIRKS||8==document.documentMode?mxUtils.getTextContent(b):b.textContent),f=!1;try{var g=e.lastIndexOf("%3E");0<=g&&g<e.length-3&&(e=e.substring(0,g+3))}catch(x){}try{var c=b.getElementsByTagName("span"),h=null!=c&&0<c.length?mxUtils.trim(decodeURIComponent(c[0].textContent)):decodeURIComponent(e);
+this.isCompatibleString(h)&&(f=!0,e=h)}catch(x){}d.lastPasteXml==e?d.pasteCounter++:(d.lastPasteXml=e,d.pasteCounter=0);c=d.pasteCounter*d.gridSize;if(null!=e&&0<e.length&&(f||this.isCompatibleString(e)?d.setSelectionCells(this.importXml(e,c,c)):(f=d.getInsertPoint(),d.isMouseInsertPoint()&&(c=0,d.lastPasteXml==e&&0<d.pasteCounter&&d.pasteCounter--),d.setSelectionCells(this.insertTextAt(e,f.x+c,f.y+c,!0))),!d.isSelectionEmpty())){d.scrollCellToVisible(d.getSelectionCell());null!=this.hoverIcons&&
+this.hoverIcons.update(d.view.getState(d.getSelectionCell()));try{mxEvent.consume(a)}catch(x){}}}}};EditorUi.prototype.addFileDropHandler=function(a){if(Graph.fileSupport)for(var b=null,c=0;c<a.length;c++)mxEvent.addListener(a[c],"dragleave",function(a){null!=b&&(b.parentNode.removeChild(b),b=null);a.stopPropagation();a.preventDefault()}),mxEvent.addListener(a[c],"dragover",mxUtils.bind(this,function(a){(this.editor.graph.isEnabled()||"1"!=urlParams.embed)&&null==b&&(!mxClient.IS_IE||10<document.documentMode&&
+12>document.documentMode)&&(b=this.highlightElement());a.stopPropagation();a.preventDefault()})),mxEvent.addListener(a[c],"drop",mxUtils.bind(this,function(a){null!=b&&(b.parentNode.removeChild(b),b=null);if(this.editor.graph.isEnabled()||"1"!=urlParams.embed)if(0<a.dataTransfer.files.length)this.hideDialog(),"1"==urlParams.embed?this.importFiles(a.dataTransfer.files,0,0,this.maxImageSize,null,null,null,null,!mxEvent.isControlDown(a)&&!mxEvent.isShiftDown(a)):this.openFiles(a.dataTransfer.files,!0);
+else{var c=this.extractGraphModelFromEvent(a);if(null==c){var d=null!=a.dataTransfer?a.dataTransfer:a.clipboardData;null!=d&&(10==document.documentMode||11==document.documentMode?c=d.getData("Text"):(c=null,c=0<=mxUtils.indexOf(d.types,"text/uri-list")?a.dataTransfer.getData("text/uri-list"):0<=mxUtils.indexOf(d.types,"text/html")?d.getData("text/html"):null,null!=c&&0<c.length?(d=document.createElement("div"),d.innerHTML=c,d=d.getElementsByTagName("img"),0<d.length&&(c=d[0].getAttribute("src"))):
+0<=mxUtils.indexOf(d.types,"text/plain")&&(c=d.getData("text/plain"))),null!=c&&("data:image/png;base64,"==c.substring(0,22)?(c=this.extractGraphModelFromPng(c),null!=c&&0<c.length&&this.openLocalFile(c,null,!0)):!this.isOffline()&&this.isRemoteFileFormat(c)?(new mxXmlRequest(OPEN_URL,"format=xml&data="+encodeURIComponent(c))).send(mxUtils.bind(this,function(a){200<=a.getStatus()&&299>=a.getStatus()&&this.openLocalFile(a.getText(),null,!0)})):/^https?:\/\//.test(c)&&(null==this.getCurrentFile()?window.location.hash=
+"#U"+encodeURIComponent(c):window.openWindow((mxClient.IS_CHROMEAPP?"https://www.draw.io/":"https://"+location.host+"/")+window.location.search+"#U"+encodeURIComponent(c)))))}else this.openLocalFile(c,null,!0)}a.stopPropagation();a.preventDefault()}))};EditorUi.prototype.highlightElement=function(a){var b=0,c=0,d,e;if(null==a){e=document.body;var f=document.documentElement;d=(e.clientWidth||f.clientWidth)-3;e=Math.max(e.clientHeight||0,f.clientHeight)-3}else b=a.offsetTop,c=a.offsetLeft,d=a.clientWidth,
+e=a.clientHeight;f=document.createElement("div");f.style.zIndex=mxPopupMenu.prototype.zIndex+2;f.style.border="3px dotted rgb(254, 137, 12)";f.style.pointerEvents="none";f.style.position="absolute";f.style.top=b+"px";f.style.left=c+"px";f.style.width=Math.max(0,d-3)+"px";f.style.height=Math.max(0,e-3)+"px";null!=a&&a.parentNode==this.editor.graph.container?this.editor.graph.container.appendChild(f):document.body.appendChild(f);return f};EditorUi.prototype.stringToCells=function(a){a=mxUtils.parseXml(a);
+var b=this.editor.extractGraphModel(a.documentElement);a=[];if(null!=b){var c=new mxCodec(b.ownerDocument),d=new mxGraphModel;c.decode(b,d);b=d.getChildAt(d.getRoot(),0);for(c=0;c<d.getChildCount(b);c++)a.push(d.getChildAt(b,c))}return a};EditorUi.prototype.openFiles=function(a,b){if(this.spinner.spin(document.body,mxResources.get("loading")))for(var c=0;c<a.length;c++)mxUtils.bind(this,function(a){var c=new FileReader;c.onload=mxUtils.bind(this,function(c){var d=c.target.result,e=a.name;if(null!=
+e&&0<e.length)if(!this.useCanvasForExport&&/(\.png)$/i.test(e)&&(e=e.substring(0,e.length-4)+".xml"),Graph.fileSupport&&!this.isOffline()&&(new XMLHttpRequest).upload&&this.isRemoteFileFormat(d,e))e=0<=e.lastIndexOf(".")?e.substring(0,e.lastIndexOf("."))+".xml":e+".xml",this.parseFile(a,mxUtils.bind(this,function(a){if(4==a.readyState)if(this.spinner.stop(),200<=a.status&&299>=a.status)if(a=a.responseText,"<mxlibrary"==a.substring(0,10)){null==this.getCurrentFile()&&"1"!=urlParams.embed&&this.openLocalFile(this.emptyDiagramXml,
+this.defaultFilename,b);null!=e&&".vssx"==e.toLowerCase().substring(e.length-5)&&(e=e.substring(0,filename.length-5)+".xml");try{this.loadLibrary(new LocalLibrary(this,a,e))}catch(y){this.handleError(y,mxResources.get("errorLoadingFile"))}}else this.openLocalFile(a,e,b);else this.handleError({message:mxResources.get(413==a.status?"drawingTooLarge":"invalidOrMissingFile")},mxResources.get("errorLoadingFile"))}));else if('{"state":"{\\"Properties\\":'==d.substring(0,26))/(\.json)$/i.test(e)&&(e=e.substring(0,
+e.length-5)+".xml"),this.openLocalFile(this.emptyDiagramXml,e,b),this.importLucidChart(d,0,0,null,mxUtils.bind(this,function(){this.editor.undoManager.clear();this.spinner.stop()}));else if("<mxlibrary"==c.target.result.substring(0,10)){this.spinner.stop();null==this.getCurrentFile()&&"1"!=urlParams.embed&&this.openLocalFile(this.emptyDiagramXml,this.defaultFilename,b);try{this.loadLibrary(new LocalLibrary(this,c.target.result,a.name))}catch(x){this.handleError(x,mxResources.get("errorLoadingFile"))}}else"image/png"==
+a.type.substring(0,9)&&(d=this.extractGraphModelFromPng(d)),this.spinner.stop(),this.openLocalFile(d,e,b)});c.onerror=mxUtils.bind(this,function(a){this.spinner.stop();this.handleError(a);window.openFile=null});"image"===a.type.substring(0,5)&&"image/svg"!==a.type.substring(0,9)?c.readAsDataURL(a):c.readAsText(a)})(a[c])};EditorUi.prototype.openLocalFile=function(a,b,c){var d=this.getCurrentFile(),e=mxUtils.bind(this,function(){window.openFile=null;if(null==b&&null!=this.getCurrentFile()&&this.isDiagramEmpty()){var d=
+mxUtils.parseXml(a);null!=d&&(this.editor.setGraphXml(d.documentElement),this.editor.graph.selectAll())}else this.fileLoaded(new LocalFile(this,a,b||this.defaultFilename,c))});null!=a&&0<a.length&&(null==d||!d.isModified()&&(mxClient.IS_CHROMEAPP||EditorUi.isElectronApp)?e():(mxClient.IS_CHROMEAPP||EditorUi.isElectronApp)&&null!=d&&d.isModified()?this.confirm(mxResources.get("allChangesLost"),null,e,mxResources.get("cancel"),mxResources.get("discardChanges")):(window.openFile=new OpenFile(function(){window.openFile=
+null}),window.openFile.setData(a,b),window.openWindow(this.getUrl(),null,mxUtils.bind(this,function(){this.confirm(mxResources.get("allChangesLost"),null,e,mxResources.get("cancel"),mxResources.get("discardChanges"))}))))};EditorUi.prototype.getBasenames=function(){var a={};if(null!=this.pages)for(var b=0;b<this.pages.length;b++)this.updatePageRoot(this.pages[b]),this.addBasenamesForCell(this.pages[b].root,a);else this.addBasenamesForCell(this.editor.graph.model.getRoot(),a);var b=[],c;for(c in a)b.push(c);
+return b};EditorUi.prototype.addBasenamesForCell=function(a,b){function c(a){if(null!=a){var c=a.lastIndexOf(".");0<c&&(a=a.substring(c+1,a.length));null==b[a]&&(b[a]=!0)}}var d=this.editor.graph,e=d.getCellStyle(a);c(mxStencilRegistry.getBasenameForStencil(e[mxConstants.STYLE_SHAPE]));d.model.isEdge(a)&&(c(mxMarker.getPackageForType(e[mxConstants.STYLE_STARTARROW])),c(mxMarker.getPackageForType(e[mxConstants.STYLE_ENDARROW])));for(var e=d.model.getChildCount(a),f=0;f<e;f++)this.addBasenamesForCell(d.model.getChildAt(a,
+f),b)};EditorUi.prototype.setGraphEnabled=function(a){this.diagramContainer.style.visibility=a?"":"hidden";this.formatContainer.style.visibility=a?"":"hidden";this.sidebarFooterContainer.style.display=a?"":"none";this.sidebarContainer.style.display=a?"":"none";this.hsplit.style.display=a?"":"none";this.editor.graph.setEnabled(a);null!=this.tabContainer&&(this.tabContainer.style.visibility=a?"":"hidden")};EditorUi.prototype.initializeEmbedMode=function(){this.setGraphEnabled(!1);(window.opener||window.parent)!=
+window&&("1"!=urlParams.spin||this.spinner.spin(document.body,mxResources.get("loading")))&&this.installMessageHandler(mxUtils.bind(this,function(a,b,c){this.spinner.stop();this.addEmbedButtons();this.setGraphEnabled(!0);null!=a&&0<a.length?(this.setFileData(a),this.editor.chromeless?this.editor.graph.lightbox&&this.lightboxFit():this.showLayersDialog(),this.chromelessResize&&this.chromelessResize()):(this.editor.graph.model.clear(),this.editor.fireEvent(new mxEventObject("resetGraphView")));this.editor.undoManager.clear();
+this.editor.modified=null!=c?c:!1;this.updateUi();window.self!==window.top&&window.focus();null!=this.format&&this.format.refresh()}))};EditorUi.prototype.showLayersDialog=function(){1<this.editor.graph.getModel().getChildCount(this.editor.graph.getModel().getRoot())&&(null==this.actions.layersWindow?this.actions.get("layers").funct():this.actions.layersWindow.window.setVisible(!0))};EditorUi.prototype.getPublicUrl=function(a,b){null!=a?a.getPublicUrl(b):b(null)};EditorUi.prototype.createLoadMessage=
+function(a){var b=this.editor.graph;return{event:a,pageVisible:b.pageVisible,translate:b.view.translate,scale:b.view.scale,page:b.view.getBackgroundPageBounds(),bounds:b.getGraphBounds()}};EditorUi.prototype.installMessageHandler=function(a){var b=null,c=!1,d=!1,e=null,f=mxUtils.bind(this,function(a,b){this.editor.modified&&"0"!=urlParams.modified?null!=urlParams.modified&&this.editor.setStatus(mxUtils.htmlEntities(mxResources.get(urlParams.modified))):this.editor.setStatus("")});this.editor.graph.model.addListener(mxEvent.CHANGE,
 f);mxEvent.addListener(window,"message",mxUtils.bind(this,function(f){function k(a){if(null!=a&&"function"===typeof a.charAt&&"<"!=a.charAt(0))try{"data:image/svg+xml;base64,"==a.substring(0,26)?a=atob(a.substring(26)):"data:image/svg+xml;utf8,"==a.substring(0,24)&&(a=a.substring(24)),null!=a&&("%"==a.charAt(0)?a=decodeURIComponent(a):"<"!=a.charAt(0)&&(a=this.editor.graph.decompress(a)))}catch(N){}return a}var h=f.data;if("json"==urlParams.proto){try{h=JSON.parse(h)}catch(I){h=null}if(null==h)return;
 if("dialog"==h.action){this.showError(null!=h.titleKey?mxResources.get(h.titleKey):h.title,null!=h.messageKey?mxResources.get(h.messageKey):h.message,null!=h.buttonKey?mxResources.get(h.buttonKey):h.button);null!=h.modified&&(this.editor.modified=h.modified);return}if("prompt"==h.action){this.spinner.stop();var l=new FilenameDialog(this,h.defaultValue||"",null!=h.okKey?mxResources.get(h.okKey):null,function(a){null!=a&&g.postMessage(JSON.stringify({event:"prompt",value:a,message:h}),"*")},null!=h.titleKey?
 mxResources.get(h.titleKey):h.title);this.showDialog(l.container,300,80,!0,!1);l.init();return}if("draft"==h.action){l=null;l="data:image/png;base64,"==h.xml.substring(0,22)?this.extractGraphModelFromPng(h.xml):k(h.xml);this.spinner.stop();l=new DraftDialog(this,mxResources.get("draftFound",[h.name||this.defaultFilename]),l,mxUtils.bind(this,function(){this.hideDialog();g.postMessage(JSON.stringify({event:"draft",result:"edit",message:h}),"*")}),mxUtils.bind(this,function(){this.hideDialog();g.postMessage(JSON.stringify({event:"draft",
 result:"discard",message:h}),"*")}),h.editKey?mxResources.get(h.editKey):null,h.discardKey?mxResources.get(h.discardKey):null,h.ignore?mxUtils.bind(this,function(){this.hideDialog();g.postMessage(JSON.stringify({event:"draft",result:"ignore",message:h}),"*")}):null);this.showDialog(l.container,640,480,!0,!1,mxUtils.bind(this,function(a){a&&this.actions.get("exit").funct()}));try{l.init()}catch(I){g.postMessage(JSON.stringify({event:"draft",error:I.toString(),message:h}),"*")}return}if("template"==
 h.action){this.spinner.stop();l=new NewDialog(this,!1,null!=h.callback,mxUtils.bind(this,function(b,c){b=b||this.emptyDiagramXml;null!=h.callback?g.postMessage(JSON.stringify({event:"template",xml:b,blank:b==this.emptyDiagramXml,name:c}),"*"):(a(b,f,b!=this.emptyDiagramXml),this.editor.modified||this.editor.setStatus(""))}));this.showDialog(l.container,620,440,!0,!1,mxUtils.bind(this,function(a){a&&this.actions.get("exit").funct()}));l.init();return}if("status"==h.action){null!=h.messageKey?this.editor.setStatus(mxUtils.htmlEntities(mxResources.get(h.messageKey))):
 null!=h.message&&this.editor.setStatus(mxUtils.htmlEntities(h.message));null!=h.modified&&(this.editor.modified=h.modified);return}if("spinner"==h.action){var m=null!=h.messageKey?mxResources.get(h.messageKey):h.message;null==h.show||h.show?this.spinner.spin(document.body,m):this.spinner.stop();return}if("export"==h.action){if("png"==h.format||"xmlpng"==h.format){if(null==h.spin&&null==h.spinKey||this.spinner.spin(document.body,null!=h.spinKey?mxResources.get(h.spinKey):h.spin)){var n=null!=h.xml?
-h.xml:this.getFileData(!0);this.editor.graph.setEnabled(!1);var p=this.editor.graph,q=mxUtils.bind(this,function(a){this.editor.graph.setEnabled(!0);this.spinner.stop();var b=this.createLoadMessage("export");b.format=h.format;b.message=h;b.data=a;b.xml=encodeURIComponent(n);g.postMessage(JSON.stringify(b),"*")}),u=mxUtils.bind(this,function(a){null==a&&(a=Editor.blankImage);"xmlpng"==h.format&&(a=this.writeGraphModelToPng(a,"zTXt","mxGraphModel",atob(this.editor.graph.compress(n))));p!=this.editor.graph&&
-p.container.parentNode.removeChild(p.container);q(a)});if(this.isExportToCanvas()){if(null!=this.pages&&this.currentPage!=this.pages[0]){var p=this.createTemporaryGraph(p.getStylesheet()),t=p.getGlobalVariable,E=this.pages[0];p.getGlobalVariable=function(a){return"page"==a?E.getName():"pagenumber"==a?1:t.apply(this,arguments)};document.body.appendChild(p.container);p.model.setRoot(E.root)}this.exportToCanvas(mxUtils.bind(this,function(a){u(a.toDataURL("image/png"))}),null,null,null,mxUtils.bind(this,
-function(){u(null)}),null,null,null,null,null,null,p)}else(new mxXmlRequest(EXPORT_URL,"format=png&embedXml="+("xmlpng"==h.format?"1":"0")+"&base64=1&xml="+encodeURIComponent(encodeURIComponent(n)))).send(mxUtils.bind(this,function(a){200<=a.getStatus()&&299>=a.getStatus()?q("data:image/png;base64,"+a.getText()):u(null)}),mxUtils.bind(this,function(){u(null)}))}}else{null!=h.xml&&0<h.xml.length&&this.setFileData(h.xml);m=this.createLoadMessage("export");if("html2"==h.format||"html"==h.format&&("0"!=
+h.xml:this.getFileData(!0);this.editor.graph.setEnabled(!1);var p=this.editor.graph,q=mxUtils.bind(this,function(a){this.editor.graph.setEnabled(!0);this.spinner.stop();var b=this.createLoadMessage("export");b.format=h.format;b.message=h;b.data=a;b.xml=encodeURIComponent(n);g.postMessage(JSON.stringify(b),"*")}),t=mxUtils.bind(this,function(a){null==a&&(a=Editor.blankImage);"xmlpng"==h.format&&(a=this.writeGraphModelToPng(a,"zTXt","mxGraphModel",atob(this.editor.graph.compress(n))));p!=this.editor.graph&&
+p.container.parentNode.removeChild(p.container);q(a)});if(this.isExportToCanvas()){if(null!=this.pages&&this.currentPage!=this.pages[0]){var p=this.createTemporaryGraph(p.getStylesheet()),u=p.getGlobalVariable,E=this.pages[0];p.getGlobalVariable=function(a){return"page"==a?E.getName():"pagenumber"==a?1:u.apply(this,arguments)};document.body.appendChild(p.container);p.model.setRoot(E.root)}this.exportToCanvas(mxUtils.bind(this,function(a){t(a.toDataURL("image/png"))}),null,null,null,mxUtils.bind(this,
+function(){t(null)}),null,null,null,null,null,null,p)}else(new mxXmlRequest(EXPORT_URL,"format=png&embedXml="+("xmlpng"==h.format?"1":"0")+"&base64=1&xml="+encodeURIComponent(encodeURIComponent(n)))).send(mxUtils.bind(this,function(a){200<=a.getStatus()&&299>=a.getStatus()?q("data:image/png;base64,"+a.getText()):t(null)}),mxUtils.bind(this,function(){t(null)}))}}else{null!=h.xml&&0<h.xml.length&&this.setFileData(h.xml);m=this.createLoadMessage("export");if("html2"==h.format||"html"==h.format&&("0"!=
 urlParams.pages||null!=this.pages&&1<this.pages.length))l=this.getXmlFileData(),m.xml=mxUtils.getXml(l),m.data=this.getFileData(null,null,!0,null,null,null,l),m.format=h.format;else if("html"==h.format)n=this.editor.getGraphXml(),m.data=this.getHtml(n,this.editor.graph),m.xml=mxUtils.getXml(n),m.format=h.format;else{mxSvgCanvas2D.prototype.foAltText=null;l=this.editor.graph.background;l==mxConstants.NONE&&(l=null);m.xml=this.getFileData(!0);m.format="svg";if(h.embedImages||null==h.embedImages){if(null==
 h.spin&&null==h.spinKey||this.spinner.spin(document.body,null!=h.spinKey?mxResources.get(h.spinKey):h.spin))this.editor.graph.setEnabled(!1),"xmlsvg"==h.format?this.getEmbeddedSvg(m.xml,this.editor.graph,null,!0,mxUtils.bind(this,function(a){this.editor.graph.setEnabled(!0);this.spinner.stop();m.data=this.createSvgDataUri(a);g.postMessage(JSON.stringify(m),"*")})):this.convertImages(this.editor.graph.getSvg(l),mxUtils.bind(this,function(a){this.editor.graph.setEnabled(!0);this.spinner.stop();m.data=
-this.createSvgDataUri(mxUtils.getXml(a));g.postMessage(JSON.stringify(m),"*")}));return}l="xmlsvg"==h.format?this.getEmbeddedSvg(this.getFileData(!0),this.editor.graph,null,!0):mxUtils.getXml(this.editor.graph.getSvg(l));m.data=this.createSvgDataUri(l)}g.postMessage(JSON.stringify(m),"*")}return}if("create"==h.action&&this.createFile){if("trello"==h.mode){var C=mxUtils.bind(this,function(a){this.createFile(h.name,a||this.getFileData(/(\.xml)$/i.test(name)||0>name.indexOf("."),/(\.svg)$/i.test(name),
-/(\.html)$/i.test(name)),null,h.mode,null,!0,h.folder)}),L=mxUtils.bind(this,function(){null!=h.template?this.trello.getFile(h.folder+this.trello.SEPARATOR+h.template,function(a){C(a.getData())},function(){C()}):C()});if(null==this.trello){var F=function(){null!=this.trello&&(this.removeListener(F),L())};this.addListener("clientLoaded",F)}else L()}return}if("load"==h.action)d=1==h.autosave,this.hideDialog(),null!=h.modified&&null==urlParams.modified&&(urlParams.modified=h.modified),null!=h.saveAndExit&&
+this.createSvgDataUri(mxUtils.getXml(a));g.postMessage(JSON.stringify(m),"*")}));return}l="xmlsvg"==h.format?this.getEmbeddedSvg(this.getFileData(!0),this.editor.graph,null,!0):mxUtils.getXml(this.editor.graph.getSvg(l));m.data=this.createSvgDataUri(l)}g.postMessage(JSON.stringify(m),"*")}return}if("create"==h.action&&this.createFile){if("trello"==h.mode){var D=mxUtils.bind(this,function(a){this.createFile(h.name,a||this.getFileData(/(\.xml)$/i.test(name)||0>name.indexOf("."),/(\.svg)$/i.test(name),
+/(\.html)$/i.test(name)),null,h.mode,null,!0,h.folder)}),L=mxUtils.bind(this,function(){null!=h.template?this.trello.getFile(h.folder+this.trello.SEPARATOR+h.template,function(a){D(a.getData())},function(){D()}):D()});if(null==this.trello){var F=function(){null!=this.trello&&(this.removeListener(F),L())};this.addListener("clientLoaded",F)}else L()}return}if("load"==h.action)d=1==h.autosave,this.hideDialog(),null!=h.modified&&null==urlParams.modified&&(urlParams.modified=h.modified),null!=h.saveAndExit&&
 null==urlParams.saveAndExit&&(urlParams.saveAndExit=h.saveAndExit),null!=h.title&&null!=this.buttonContainer&&(l=document.createElement("span"),mxUtils.write(l,h.title),"atlas"==uiTheme?(this.buttonContainer.style.paddingRight="12px",this.buttonContainer.style.paddingTop="12px"):(this.buttonContainer.style.paddingRight="38px",this.buttonContainer.style.paddingTop="6px"),null!=this.embedFilenameSpan&&this.embedFilenameSpan.parentNode.removeChild(this.embedFilenameSpan),this.buttonContainer.appendChild(l),
 this.embedFilenameSpan=l),h=null!=h.xmlpng?this.extractGraphModelFromPng(h.xmlpng):null!=h.xml&&"data:image/png;base64,"==h.xml.substring(0,22)?this.extractGraphModelFromPng(h.xml):h.xml;else{g.postMessage(JSON.stringify({error:"unknownMessage",data:JSON.stringify(h)}),"*");return}}h=k(h);c=!0;try{a(h,f)}catch(I){this.handleError(I)}c=!1;null!=urlParams.modified&&this.editor.setStatus("");var H=mxUtils.bind(this,function(){return"0"!=urlParams.pages||null!=this.pages&&1<this.pages.length?this.getFileData(!0):
 mxUtils.getXml(this.editor.getGraphXml())});e=H();d&&null==b&&(b=mxUtils.bind(this,function(a,b){var d=H();if(d!=e&&!c){var f=this.createLoadMessage("autosave");f.xml=d;d=JSON.stringify(f);(window.opener||window.parent).postMessage(d,"*")}e=d}),this.editor.graph.model.addListener(mxEvent.CHANGE,b),this.editor.graph.addListener("gridSizeChanged",b),this.editor.graph.addListener("shadowVisibleChanged",b),this.addListener("pageFormatChanged",b),this.addListener("pageScaleChanged",b),this.addListener("backgroundColorChanged",
@@ -6466,15 +6468,15 @@ b),this.addListener("backgroundImageChanged",b),this.addListener("foldingEnabled
 "*")};EditorUi.prototype.addEmbedButtons=function(){if(null!=this.menubar){var a=document.createElement("div");a.style.display="inline-block";a.style.position="absolute";a.style.paddingTop="atlas"==uiTheme?"2px":"3px";a.style.paddingLeft="8px";a.style.paddingBottom="2px";var b=document.createElement("button");mxUtils.write(b,mxResources.get("save"));b.setAttribute("title",mxResources.get("save")+" ("+Editor.ctrlKey+"+S)");b.className="geBigButton";b.style.fontSize="12px";b.style.padding="4px 6px 4px 6px";
 b.style.borderRadius="3px";mxEvent.addListener(b,"click",mxUtils.bind(this,function(){this.actions.get("save").funct()}));a.appendChild(b);"1"==urlParams.saveAndExit&&(b=document.createElement("a"),mxUtils.write(b,mxResources.get("saveAndExit")),b.setAttribute("title",mxResources.get("saveAndExit")),b.style.fontSize="12px",b.style.marginLeft="6px",b.style.padding="4px",b.style.cursor="pointer",mxEvent.addListener(b,"click",mxUtils.bind(this,function(){this.actions.get("saveAndExit").funct()})),a.appendChild(b));
 b=document.createElement("a");mxUtils.write(b,mxResources.get("exit"));b.setAttribute("title",mxResources.get("exit"));b.style.fontSize="12px";b.style.marginLeft="6px";b.style.marginRight="20px";b.style.padding="4px";b.style.cursor="pointer";mxEvent.addListener(b,"click",mxUtils.bind(this,function(){this.actions.get("exit").funct()}));a.appendChild(b);this.toolbar.container.appendChild(a);this.toolbar.staticElements.push(a);a.style.right="atlas"!=uiTheme?"52px":"42px"}};EditorUi.prototype.showImportCsvDialog=
-function(){null==this.importCsvDialog&&(this.importCsvDialog=new TextareaDialog(this,mxResources.get("csv")+":",Editor.defaultCsvValue,mxUtils.bind(this,function(a){this.importCsv(a)}),null,null,620,430,null,!0,!0,mxResources.get("import")));this.showDialog(this.importCsvDialog.container,640,520,!0,!0);this.importCsvDialog.init()};EditorUi.prototype.importCsv=function(a){try{var b=a.split("\n"),c=[];if(0<b.length){var d={},f=null,e=null,g="auto",k="auto",m=40,y=40,x=0,v=this.editor.graph;v.getGraphBounds();
-for(var D=function(){v.setSelectionCells(P);v.scrollCellToVisible(v.getSelectionCell())},B=v.getFreeInsertPoint(),A=B.x,G=B.y,B=G,z=null,E="auto",C=[],L=null,F=null,H=0;H<b.length&&"#"==b[H].charAt(0);){a=b[H];for(H++;H<b.length&&"\\"==a.charAt(a.length-1)&&"#"==b[H].charAt(0);)a=a.substring(0,a.length-1)+mxUtils.trim(b[H].substring(1)),H++;if("#"!=a.charAt(1)){var I=a.indexOf(":");if(0<I){var N=mxUtils.trim(a.substring(1,I)),M=mxUtils.trim(a.substring(I+1));"label"==N?z=v.sanitizeHtml(M):"style"==
-N?f=M:"identity"==N&&0<M.length&&"-"!=M?e=M:"width"==N?g=M:"height"==N?k=M:"ignore"==N?F=M.split(","):"connect"==N?C.push(JSON.parse(M)):"link"==N?L=M:"padding"==N?x=parseFloat(M):"edgespacing"==N?m=parseFloat(M):"nodespacing"==N?y=parseFloat(M):"layout"==N&&(E=M)}}}var R=this.editor.csvToArray(b[H]);a=null;if(null!=e)for(var K=0;K<R.length;K++)if(e==R[K]){a=K;break}null==z&&(z="%"+R[0]+"%");if(null!=C)for(var O=0;O<C.length;O++)null==d[C[O].to]&&(d[C[O].to]={});v.model.beginUpdate();try{for(K=H+
-1;K<b.length;K++){var S=this.editor.csvToArray(b[K]);if(S.length==R.length){var J=null,X=null!=a?S[a]:null;null!=X&&(J=v.model.getCell(X));null==J&&(J=new mxCell(z,new mxGeometry(A,B,0,0),f||"whiteSpace=wrap;html=1;"),J.vertex=!0,J.id=X);for(var Q=0;Q<S.length;Q++)v.setAttributeForCell(J,R[Q],S[Q]);v.setAttributeForCell(J,"placeholders","1");J.style=v.replacePlaceholders(J,J.style);for(O=0;O<C.length;O++)d[C[O].to][J.getAttribute(C[O].to)]=J;null!=L&&"link"!=L&&(v.setLinkForCell(J,J.getAttribute(L)),
-v.setAttributeForCell(J,L,null));var Y=this.editor.graph.getPreferredSizeForCell(J);J.geometry.width="auto"==g?Y.width+x:parseFloat(g);J.geometry.height="auto"==k?Y.height+x:parseFloat(k);B+=J.geometry.height+y;c.push(v.addCell(J))}}null==f&&v.fireEvent(new mxEventObject("cellsInserted","cells",c));for(var W=c.slice(),P=c.slice(),O=0;O<C.length;O++)for(var T=C[O],K=0;K<c.length;K++){var J=c[K],V=J.getAttribute(T.from);if(null!=V){v.setAttributeForCell(J,T.from,null);for(var U=V.split(","),Q=0;Q<U.length;Q++){var ba=
+function(){null==this.importCsvDialog&&(this.importCsvDialog=new TextareaDialog(this,mxResources.get("csv")+":",Editor.defaultCsvValue,mxUtils.bind(this,function(a){this.importCsv(a)}),null,null,620,430,null,!0,!0,mxResources.get("import")));this.showDialog(this.importCsvDialog.container,640,520,!0,!0);this.importCsvDialog.init()};EditorUi.prototype.importCsv=function(a){try{var b=a.split("\n"),c=[];if(0<b.length){var d={},f=null,e=null,g="auto",k="auto",m=40,y=40,w=0,v=this.editor.graph;v.getGraphBounds();
+for(var C=function(){v.setSelectionCells(P);v.scrollCellToVisible(v.getSelectionCell())},B=v.getFreeInsertPoint(),A=B.x,G=B.y,B=G,z=null,E="auto",D=[],L=null,F=null,H=0;H<b.length&&"#"==b[H].charAt(0);){a=b[H];for(H++;H<b.length&&"\\"==a.charAt(a.length-1)&&"#"==b[H].charAt(0);)a=a.substring(0,a.length-1)+mxUtils.trim(b[H].substring(1)),H++;if("#"!=a.charAt(1)){var I=a.indexOf(":");if(0<I){var N=mxUtils.trim(a.substring(1,I)),M=mxUtils.trim(a.substring(I+1));"label"==N?z=v.sanitizeHtml(M):"style"==
+N?f=M:"identity"==N&&0<M.length&&"-"!=M?e=M:"width"==N?g=M:"height"==N?k=M:"ignore"==N?F=M.split(","):"connect"==N?D.push(JSON.parse(M)):"link"==N?L=M:"padding"==N?w=parseFloat(M):"edgespacing"==N?m=parseFloat(M):"nodespacing"==N?y=parseFloat(M):"layout"==N&&(E=M)}}}var R=this.editor.csvToArray(b[H]);a=null;if(null!=e)for(var K=0;K<R.length;K++)if(e==R[K]){a=K;break}null==z&&(z="%"+R[0]+"%");if(null!=D)for(var O=0;O<D.length;O++)null==d[D[O].to]&&(d[D[O].to]={});v.model.beginUpdate();try{for(K=H+
+1;K<b.length;K++){var S=this.editor.csvToArray(b[K]);if(S.length==R.length){var J=null,X=null!=a?S[a]:null;null!=X&&(J=v.model.getCell(X));null==J&&(J=new mxCell(z,new mxGeometry(A,B,0,0),f||"whiteSpace=wrap;html=1;"),J.vertex=!0,J.id=X);for(var Q=0;Q<S.length;Q++)v.setAttributeForCell(J,R[Q],S[Q]);v.setAttributeForCell(J,"placeholders","1");J.style=v.replacePlaceholders(J,J.style);for(O=0;O<D.length;O++)d[D[O].to][J.getAttribute(D[O].to)]=J;null!=L&&"link"!=L&&(v.setLinkForCell(J,J.getAttribute(L)),
+v.setAttributeForCell(J,L,null));var Y=this.editor.graph.getPreferredSizeForCell(J);J.geometry.width="auto"==g?Y.width+w:parseFloat(g);J.geometry.height="auto"==k?Y.height+w:parseFloat(k);B+=J.geometry.height+y;c.push(v.addCell(J))}}null==f&&v.fireEvent(new mxEventObject("cellsInserted","cells",c));for(var W=c.slice(),P=c.slice(),O=0;O<D.length;O++)for(var T=D[O],K=0;K<c.length;K++){var J=c[K],V=J.getAttribute(T.from);if(null!=V){v.setAttributeForCell(J,T.from,null);for(var U=V.split(","),Q=0;Q<U.length;Q++){var ba=
 d[T.to][U[Q]];null!=ba&&(P.push(v.insertEdge(null,null,T.label||"",T.invert?ba:J,T.invert?J:ba,T.style||v.createCurrentEdgeStyle())),mxUtils.remove(T.invert?J:ba,W))}}}if(null!=F)for(K=0;K<c.length;K++)for(J=c[K],Q=0;Q<F.length;Q++)v.setAttributeForCell(J,mxUtils.trim(F[Q]),null);var ca=new mxParallelEdgeLayout(v);ca.spacing=m;var fa=function(){ca.execute(v.getDefaultParent());for(var a=0;a<c.length;a++){var b=v.getCellGeometry(c[a]);b.x=Math.round(v.snap(b.x));b.y=Math.round(v.snap(b.y));"auto"==
-g&&(b.width=Math.round(v.snap(b.width)));"auto"==k&&(b.height=Math.round(v.snap(b.height)))}};if("circle"==E){var da=new mxCircleLayout(v);da.resetEdges=!1;var ha=da.isVertexIgnored;da.isVertexIgnored=function(a){return ha.apply(this,arguments)||0>mxUtils.indexOf(c,a)};this.executeLayout(function(){da.execute(v.getDefaultParent());fa()},!0,D);D=null}else if("horizontaltree"==E||"verticaltree"==E||"auto"==E&&P.length==2*c.length-1&&1==W.length){v.view.validate();var Z=new mxCompactTreeLayout(v,"horizontaltree"==
-E);Z.levelDistance=y;Z.edgeRouting=!1;Z.resetEdges=!1;this.executeLayout(function(){Z.execute(v.getDefaultParent(),0<W.length?W[0]:null)},!0,D);D=null}else if("horizontalflow"==E||"verticalflow"==E||"auto"==E&&1==W.length){v.view.validate();var ea=new mxHierarchicalLayout(v,"horizontalflow"==E?mxConstants.DIRECTION_WEST:mxConstants.DIRECTION_NORTH);ea.intraCellSpacing=y;ea.disableEdgeStyle=!1;this.executeLayout(function(){ea.execute(v.getDefaultParent(),P);v.moveCells(P,A,G)},!0,D);D=null}else if("organic"==
-E||"auto"==E&&P.length>c.length){v.view.validate();var aa=new mxFastOrganicLayout(v);aa.forceConstant=3*y;aa.resetEdges=!1;var ia=aa.isVertexIgnored;aa.isVertexIgnored=function(a){return ia.apply(this,arguments)||0>mxUtils.indexOf(c,a)};ca=new mxParallelEdgeLayout(v);ca.spacing=m;this.executeLayout(function(){aa.execute(v.getDefaultParent());fa()},!0,D);D=null}this.hideDialog()}finally{v.model.endUpdate()}null!=D&&D()}}catch(ja){this.handleError(ja)}};EditorUi.prototype.getSearch=function(a){var b=
+g&&(b.width=Math.round(v.snap(b.width)));"auto"==k&&(b.height=Math.round(v.snap(b.height)))}};if("circle"==E){var da=new mxCircleLayout(v);da.resetEdges=!1;var ha=da.isVertexIgnored;da.isVertexIgnored=function(a){return ha.apply(this,arguments)||0>mxUtils.indexOf(c,a)};this.executeLayout(function(){da.execute(v.getDefaultParent());fa()},!0,C);C=null}else if("horizontaltree"==E||"verticaltree"==E||"auto"==E&&P.length==2*c.length-1&&1==W.length){v.view.validate();var Z=new mxCompactTreeLayout(v,"horizontaltree"==
+E);Z.levelDistance=y;Z.edgeRouting=!1;Z.resetEdges=!1;this.executeLayout(function(){Z.execute(v.getDefaultParent(),0<W.length?W[0]:null)},!0,C);C=null}else if("horizontalflow"==E||"verticalflow"==E||"auto"==E&&1==W.length){v.view.validate();var ea=new mxHierarchicalLayout(v,"horizontalflow"==E?mxConstants.DIRECTION_WEST:mxConstants.DIRECTION_NORTH);ea.intraCellSpacing=y;ea.disableEdgeStyle=!1;this.executeLayout(function(){ea.execute(v.getDefaultParent(),P);v.moveCells(P,A,G)},!0,C);C=null}else if("organic"==
+E||"auto"==E&&P.length>c.length){v.view.validate();var aa=new mxFastOrganicLayout(v);aa.forceConstant=3*y;aa.resetEdges=!1;var ia=aa.isVertexIgnored;aa.isVertexIgnored=function(a){return ia.apply(this,arguments)||0>mxUtils.indexOf(c,a)};ca=new mxParallelEdgeLayout(v);ca.spacing=m;this.executeLayout(function(){aa.execute(v.getDefaultParent());fa()},!0,C);C=null}this.hideDialog()}finally{v.model.endUpdate()}null!=C&&C()}}catch(ja){this.handleError(ja)}};EditorUi.prototype.getSearch=function(a){var b=
 "";if("1"!=urlParams.offline&&"1"!=urlParams.demo&&null!=a&&0<window.location.search.length){var c="?",d;for(d in urlParams)0>mxUtils.indexOf(a,d)&&null!=urlParams[d]&&(b+=c+d+"="+urlParams[d],c="&")}else b=window.location.search;return b};EditorUi.prototype.getUrl=function(a){a=null!=a?a:window.location.pathname;var b=0<a.indexOf("?")?1:0;if("1"==urlParams.offline)a+=window.location.search;else{var c="tmp libs clibs state fileId code share notitle data url embed client create title splash".split(" "),
 d;for(d in urlParams)0>mxUtils.indexOf(c,d)&&(a=0==b?a+"?":a+"&",null!=urlParams[d]&&(a+=d+"="+urlParams[d],b++))}return a};EditorUi.prototype.showLinkDialog=function(a,b,c){a=new LinkDialog(this,a,b,c,!0);this.showDialog(a.container,420,120,!0,!0);a.init()};var k=EditorUi.prototype.createOutline;EditorUi.prototype.createOutline=function(a){var b=k.apply(this,arguments),c=this.editor.graph,d=b.getSourceGraphBounds;b.getSourceGraphBounds=function(){if(mxUtils.hasScrollbars(c.container)&&c.pageVisible&&
 null!=this.source.minimumGraphSize){var a=this.source.getPagePadding(),b=this.source.view.scale;return new mxRectangle(0,0,Math.ceil(this.source.minimumGraphSize.width-2*a.x/b),Math.ceil(this.source.minimumGraphSize.height-2*a.y/b))}return d.apply(this,arguments)};var f=b.getSourceContainerSize;b.getSourceContainerSize=function(){if(mxUtils.hasScrollbars(c.container)&&null!=this.source.minimumGraphSize){var a=this.source.getPagePadding(),b=this.source.view.scale;return new mxRectangle(0,0,Math.ceil(this.source.minimumGraphSize.width*
@@ -6756,7 +6758,7 @@ this.contentChanged();null!=d&&d()}),mxUtils.bind(this,function(a){this.savingFi
 GitHubClient.prototype.updateUser=function(a,b,d){var c=!0,f=window.setTimeout(mxUtils.bind(this,function(){c=!1;b({code:App.ERROR_TIMEOUT})}),this.ui.timeout);mxUtils.get(this.baseUrl+"/user?access_token="+this.token,mxUtils.bind(this,function(g){window.clearTimeout(f);c&&(401===g.getStatus()?d?b({message:mxResources.get("accessDenied")}):(this.logout(),this.authenticate(mxUtils.bind(this,function(){this.updateUser(a,b,!0)}),b)):200>g.getStatus()||300<=g.getStatus()?b({message:mxResources.get("accessDenied")}):
 (g=JSON.parse(g.getText()),this.setUser(new DrawioUser(g.id,g.email,g.name)),a()))}))};
 GitHubClient.prototype.authenticate=function(a,b){if(null==window.onGitHubCallback){var d=mxUtils.bind(this,function(){var c=!0;this.ui.showAuthDialog(this,!0,mxUtils.bind(this,function(f,g){null!=window.open("https://github.com/login/oauth/authorize?client_id="+this.clientId+"&scope="+this.scope,"ghauth")?window.onGitHubCallback=mxUtils.bind(this,function(k,m){if(c)if(window.onGitHubCallback=null,c=!1,null==k)b({message:mxResources.get("accessDenied"),retry:d});else{var e=mxUtils.bind(this,function(){var c=
-!0,d=window.setTimeout(mxUtils.bind(this,function(){c=!1;b({code:App.ERROR_TIMEOUT,retry:e})}),this.ui.timeout);mxUtils.get("/github?client_id="+this.clientId+"&code="+k,mxUtils.bind(this,function(e){window.clearTimeout(d);if(c)try{if(200>e.getStatus()||300<=e.getStatus())b({message:mxResources.get("cannotLogin")});else{null!=g&&g();var k=e.getText();this.token=k.substring(k.indexOf("=")+1,k.indexOf("&"));this.setUser(null);f&&this.setPersistentToken(this.token);a()}}catch(t){b(t)}finally{null!=m&&
+!0,d=window.setTimeout(mxUtils.bind(this,function(){c=!1;b({code:App.ERROR_TIMEOUT,retry:e})}),this.ui.timeout);mxUtils.get("/github?client_id="+this.clientId+"&code="+k,mxUtils.bind(this,function(e){window.clearTimeout(d);if(c)try{if(200>e.getStatus()||300<=e.getStatus())b({message:mxResources.get("cannotLogin")});else{null!=g&&g();var k=e.getText();this.token=k.substring(k.indexOf("=")+1,k.indexOf("&"));this.setUser(null);f&&this.setPersistentToken(this.token);a()}}catch(u){b(u)}finally{null!=m&&
 m.close()}}))});e()}else null!=m&&m.close()}):b({message:mxResources.get("serviceUnavailableOrBlocked"),retry:d})}),mxUtils.bind(this,function(){c&&(window.onGitHubCallback=null,c=!1,b({message:mxResources.get("accessDenied"),retry:d}))}))});d()}else b({code:App.ERROR_BUSY})};
 GitHubClient.prototype.executeRequest=function(a,b,d){var c=mxUtils.bind(this,function(g){var k=!0,m=window.setTimeout(mxUtils.bind(this,function(){k=!1;d({code:App.ERROR_TIMEOUT,retry:f})}),this.ui.timeout),e=this.token;a.setRequestHeaders=function(a,b){a.setRequestHeader("Authorization","token "+e)};a.send(mxUtils.bind(this,function(){window.clearTimeout(m);if(k)if(200<=a.getStatus()&&299>=a.getStatus())b(a);else if(401===a.getStatus())g?d({message:mxResources.get("accessDenied"),retry:mxUtils.bind(this,
 function(){this.authenticate(function(){f(!0)},d)})}):this.authenticate(function(){c(!0)},d);else if(403===a.getStatus()){var e=!1;try{var l=JSON.parse(a.getText());null!=l&&null!=l.errors&&0<l.errors.length&&(e="too_large"==l.errors[0].code)}catch(n){}d({message:mxResources.get(e?"drawingTooLarge":"forbidden")})}else 404===a.getStatus()?d({message:mxResources.get("fileNotFound")}):409===a.getStatus()?d({status:409}):d({message:mxResources.get("error")+" "+a.getStatus()})}),d)}),f=mxUtils.bind(this,
@@ -6765,7 +6767,7 @@ GitHubClient.prototype.getFile=function(a,b,d,c,f){c=null!=c?c:!1;var g=a.split(
 "/repos/"+k+"/"+m+"/contents/"+a+"?ref="+e,null,"GET"),this.executeRequest(a,mxUtils.bind(this,function(a){try{b(this.createGitHubFile(k,m,e,JSON.parse(a.getText()),c))}catch(l){d(l)}}),d))};
 GitHubClient.prototype.createGitHubFile=function(a,b,d,c,f){a={org:a,repo:b,ref:d,name:c.name,path:c.path,sha:c.sha,html_url:c.html_url,download_url:c.download_url};b=c.content;"base64"===c.encoding&&(/\.jpe?g$/i.test(c.name)?b="data:image/jpeg;base64,"+b:/\.gif$/i.test(c.name)?b="data:image/gif;base64,"+b:/\.png$/i.test(c.name)?(c=this.ui.extractGraphModelFromPng(b),b=null!=c&&0<c.length?c:"data:image/png;base64,"+b):b=Base64.decode(b));return f?new GitHubLibrary(this.ui,b,a):new GitHubFile(this.ui,
 b,a)};GitHubClient.prototype.insertLibrary=function(a,b,d,c,f){this.insertFile(a,b,d,c,!0,f,!1)};
-GitHubClient.prototype.insertFile=function(a,b,d,c,f,g,k){f=null!=f?f:!1;g=g.split("/");var m=g[0],e=g[1],h=g[2],l=g.slice(3,g.length).join("/");0<l.length&&(l+="/");l+=a;this.checkExists(m+"/"+e+"/"+h+"/"+l,!0,mxUtils.bind(this,function(g,p){g?f?(k||(b=Base64.encode(b)),this.showCommitDialog(a,!0,mxUtils.bind(this,function(a){this.writeFile(m,e,h,l,a,b,p,mxUtils.bind(this,function(a){try{var b=JSON.parse(a.getText());d(this.createGitHubFile(m,e,h,b.content,f))}catch(w){c(w)}}),c)}),c)):d(new GitHubFile(this.ui,
+GitHubClient.prototype.insertFile=function(a,b,d,c,f,g,k){f=null!=f?f:!1;g=g.split("/");var m=g[0],e=g[1],h=g[2],l=g.slice(3,g.length).join("/");0<l.length&&(l+="/");l+=a;this.checkExists(m+"/"+e+"/"+h+"/"+l,!0,mxUtils.bind(this,function(g,p){g?f?(k||(b=Base64.encode(b)),this.showCommitDialog(a,!0,mxUtils.bind(this,function(a){this.writeFile(m,e,h,l,a,b,p,mxUtils.bind(this,function(a){try{var b=JSON.parse(a.getText());d(this.createGitHubFile(m,e,h,b.content,f))}catch(x){c(x)}}),c)}),c)):d(new GitHubFile(this.ui,
 b,{org:m,repo:e,ref:h,name:a,path:l,sha:p,isNew:!0})):c()}))};GitHubClient.prototype.showCommitDialog=function(a,b,d,c){var f=this.ui.spinner.pause();a=new FilenameDialog(this.ui,mxResources.get(b?"addedFile":"updateFile",[a]),mxResources.get("ok"),mxUtils.bind(this,function(a){f();d(a)}),mxResources.get("commitMessage"),null,null,null,null,mxUtils.bind(this,function(){c()}));this.ui.showDialog(a.container,300,80,!0,!1);a.init()};
 GitHubClient.prototype.writeFile=function(a,b,d,c,f,g,k,m,e){g.length>=this.maxFileSize?e({message:mxResources.get("drawingTooLarge")+" ("+this.ui.formatFileSize(g.length)+" / 1 MB)"}):(d={path:c,branch:decodeURIComponent(d),message:f,content:g},null!=k&&(d.sha=k),a=new mxXmlRequest(this.baseUrl+"/repos/"+a+"/"+b+"/contents/"+c,JSON.stringify(d),"PUT"),this.executeRequest(a,mxUtils.bind(this,function(a){m(a)}),e))};
 GitHubClient.prototype.checkExists=function(a,b,d){this.getFile(a,mxUtils.bind(this,function(c){if(b&&null!=c.meta){var f=this.ui.spinner.pause();this.ui.confirm(mxResources.get("replaceIt",[a]),function(){f();d(!0,c.meta.sha)},function(){f();d(!1)})}else this.ui.spinner.stop(),this.ui.showError(mxResources.get("error"),mxResources.get("fileExists"),mxResources.get("ok"),function(){d(!1)})}),mxUtils.bind(this,function(a){d(!0)}),null,!0)};
@@ -6774,15 +6776,15 @@ mxResources.get("cancel"),mxUtils.bind(this,function(){d()}),null,mxResources.ge
 Base64.encode(a.getData()))}),mxUtils.bind(this,function(){d()}))};GitHubClient.prototype.pickLibrary=function(a){this.pickFile(a)};GitHubClient.prototype.pickFolder=function(a){this.showGitHubDialog(!1,a)};GitHubClient.prototype.pickFile=function(a){a=null!=a?a:mxUtils.bind(this,function(a){this.ui.loadFile("H"+encodeURIComponent(a))});this.showGitHubDialog(!0,a)};
 GitHubClient.prototype.showGitHubDialog=function(a,b){var d=null,c=null,f=null,g=null,k=document.createElement("div");k.style.whiteSpace="nowrap";k.style.overflow="hidden";k.style.height="224px";var m=document.createElement("h3");mxUtils.write(m,mxResources.get(a?"selectFile":"selectFolder"));m.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:12px";k.appendChild(m);var e=document.createElement("div");e.style.whiteSpace="nowrap";e.style.overflow="auto";e.style.height="194px";
 k.appendChild(e);var h=new CustomDialog(this.ui,k,mxUtils.bind(this,function(){b(d+"/"+c+"/"+encodeURIComponent(f)+"/"+g)}));this.ui.showDialog(h.container,340,270,!0,!0);a&&h.okButton.parentNode.removeChild(h.okButton);var l=mxUtils.bind(this,function(a,b){var c=document.createElement("a");c.setAttribute("href","javascript:void(0);");mxUtils.write(c,a);mxEvent.addListener(c,"click",b);return c}),n=mxUtils.bind(this,function(a){var b=document.createElement("div");b.style.marginBottom="8px";b.appendChild(l(d+
-"/"+c,mxUtils.bind(this,function(){g=null;y()})));a||(mxUtils.write(b," / "),b.appendChild(l(decodeURIComponent(f),mxUtils.bind(this,function(){g=null;w()}))));if(null!=g&&0<g.length){var k=g.split("/");for(a=0;a<k.length;a++)(function(a){mxUtils.write(b," / ");b.appendChild(l(k[a],mxUtils.bind(this,function(){g=k.slice(0,a+1).join("/");t()})))})(a)}e.appendChild(b)}),p=mxUtils.bind(this,function(a){this.ui.handleError(a,null,mxUtils.bind(this,function(){this.ui.spinner.stop();null!=this.getUser()?
-(g=f=c=d=null,y()):this.ui.hideDialog()}))}),t=mxUtils.bind(this,function(){var k=new mxXmlRequest(this.baseUrl+"/repos/"+d+"/"+c+"/contents/"+g+"?ref="+encodeURIComponent(f),null,"GET");h.okButton.removeAttribute("disabled");e.innerHTML="";this.ui.spinner.spin(e,mxResources.get("loading"));this.executeRequest(k,mxUtils.bind(this,function(k){n();this.ui.spinner.stop();var h=JSON.parse(k.getText());e.appendChild(l("../ [Up]",mxUtils.bind(this,function(){if(""==g)g=null,y();else{var a=g.split("/");
-g=a.slice(0,a.length-1).join("/");t()}})));mxUtils.br(e);null==h||0==h.length?mxUtils.write(e,mxResources.get("noFiles")):(k=mxUtils.bind(this,function(k){for(var m=0;m<h.length;m++)mxUtils.bind(this,function(h){k==("dir"==h.type)&&(e.appendChild(l(h.name+("dir"==h.type?"/":""),mxUtils.bind(this,function(){"dir"==h.type?(g=h.path,t()):a&&"file"==h.type&&(this.ui.hideDialog(),b(d+"/"+c+"/"+encodeURIComponent(f)+"/"+h.path))}))),mxUtils.br(e))})(h[m])}),k(!0),a&&k(!1))}),p)}),u=null,q=null,w=mxUtils.bind(this,
-function(a){null==a&&(e.innerHTML="",a=1);var b=new mxXmlRequest(this.baseUrl+"/repos/"+d+"/"+c+"/branches?per_page=100&page="+a,null,"GET");h.okButton.setAttribute("disabled","disabled");this.ui.spinner.spin(e,mxResources.get("loading"));null!=u&&null!=u.parentNode&&u.parentNode.removeChild(u);u=document.createElement("a");u.style.display="block";u.setAttribute("href","javascript:void(0);");mxUtils.write(u,mxResources.get("more")+"...");var k=mxUtils.bind(this,function(){mxEvent.removeListener(e,
-"scroll",q);w(a+1)});mxEvent.addListener(u,"click",k);this.executeRequest(b,mxUtils.bind(this,function(b){this.ui.spinner.stop();1==a&&(n(!0),e.appendChild(l("../ [Up]",mxUtils.bind(this,function(){g=null;y()}))),mxUtils.br(e));b=JSON.parse(b.getText());if(null==b||0==b.length)mxUtils.write(e,mxResources.get("noFiles"));else{for(var c=0;c<b.length;c++)mxUtils.bind(this,function(a){e.appendChild(l(a.name,mxUtils.bind(this,function(){f=a.name;g="";t()})));mxUtils.br(e)})(b[c]);100==b.length&&(e.appendChild(u),
-q=function(){e.scrollTop>=e.scrollHeight-e.offsetHeight&&k()},mxEvent.addListener(e,"scroll",q))}}),p)}),y=mxUtils.bind(this,function(a){null==a&&(e.innerHTML="",a=1);var b=new mxXmlRequest(this.baseUrl+"/user/repos?per_page=100&page="+a,null,"GET");h.okButton.setAttribute("disabled","disabled");this.ui.spinner.spin(e,mxResources.get("loading"));null!=u&&null!=u.parentNode&&u.parentNode.removeChild(u);u=document.createElement("a");u.style.display="block";u.setAttribute("href","javascript:void(0);");
-mxUtils.write(u,mxResources.get("more")+"...");var k=mxUtils.bind(this,function(){mxEvent.removeListener(e,"scroll",q);y(a+1)});mxEvent.addListener(u,"click",k);this.executeRequest(b,mxUtils.bind(this,function(b){this.ui.spinner.stop();b=JSON.parse(b.getText());if(null==b||0==b.length)mxUtils.write(e,mxResources.get("noFiles"));else{1==a&&(e.appendChild(l(mxResources.get("enterValue")+"...",mxUtils.bind(this,function(){var a=new FilenameDialog(this.ui,"org/repo/ref",mxResources.get("ok"),mxUtils.bind(this,
-function(a){if(null!=a){var b=a.split("/");if(1<b.length){a=b[0];var k=b[1];3>b.length?(d=a,c=k,g=f=null,w()):this.ui.spinner.spin(e,mxResources.get("loading"))&&(b=encodeURIComponent(b.slice(2,b.length).join("/")),this.getFile(a+"/"+k+"/"+b,mxUtils.bind(this,function(a){this.ui.spinner.stop();d=a.meta.org;c=a.meta.repo;f=decodeURIComponent(a.meta.ref);g="";t()}),mxUtils.bind(this,function(a){this.ui.spinner.stop();this.ui.handleError({message:mxResources.get("fileNotFound")})})))}else this.ui.spinner.stop(),
-this.ui.handleError({message:mxResources.get("invalidName")})}}),mxResources.get("enterValue"));this.ui.showDialog(a.container,300,80,!0,!1);a.init()}))),mxUtils.br(e),mxUtils.br(e));for(var h=0;h<b.length;h++)mxUtils.bind(this,function(a){e.appendChild(l(a.full_name,mxUtils.bind(this,function(){d=a.owner.login;c=a.name;f=a.default_branch;g="";t()})));mxUtils.br(e)})(b[h])}100==b.length&&(e.appendChild(u),q=function(){e.scrollTop>=e.scrollHeight-e.offsetHeight&&k()},mxEvent.addListener(e,"scroll",
+"/"+c,mxUtils.bind(this,function(){g=null;y()})));a||(mxUtils.write(b," / "),b.appendChild(l(decodeURIComponent(f),mxUtils.bind(this,function(){g=null;x()}))));if(null!=g&&0<g.length){var k=g.split("/");for(a=0;a<k.length;a++)(function(a){mxUtils.write(b," / ");b.appendChild(l(k[a],mxUtils.bind(this,function(){g=k.slice(0,a+1).join("/");u()})))})(a)}e.appendChild(b)}),p=mxUtils.bind(this,function(a){this.ui.handleError(a,null,mxUtils.bind(this,function(){this.ui.spinner.stop();null!=this.getUser()?
+(g=f=c=d=null,y()):this.ui.hideDialog()}))}),u=mxUtils.bind(this,function(){var k=new mxXmlRequest(this.baseUrl+"/repos/"+d+"/"+c+"/contents/"+g+"?ref="+encodeURIComponent(f),null,"GET");h.okButton.removeAttribute("disabled");e.innerHTML="";this.ui.spinner.spin(e,mxResources.get("loading"));this.executeRequest(k,mxUtils.bind(this,function(k){n();this.ui.spinner.stop();var h=JSON.parse(k.getText());e.appendChild(l("../ [Up]",mxUtils.bind(this,function(){if(""==g)g=null,y();else{var a=g.split("/");
+g=a.slice(0,a.length-1).join("/");u()}})));mxUtils.br(e);null==h||0==h.length?mxUtils.write(e,mxResources.get("noFiles")):(k=mxUtils.bind(this,function(k){for(var m=0;m<h.length;m++)mxUtils.bind(this,function(h){k==("dir"==h.type)&&(e.appendChild(l(h.name+("dir"==h.type?"/":""),mxUtils.bind(this,function(){"dir"==h.type?(g=h.path,u()):a&&"file"==h.type&&(this.ui.hideDialog(),b(d+"/"+c+"/"+encodeURIComponent(f)+"/"+h.path))}))),mxUtils.br(e))})(h[m])}),k(!0),a&&k(!1))}),p)}),t=null,q=null,x=mxUtils.bind(this,
+function(a){null==a&&(e.innerHTML="",a=1);var b=new mxXmlRequest(this.baseUrl+"/repos/"+d+"/"+c+"/branches?per_page=100&page="+a,null,"GET");h.okButton.setAttribute("disabled","disabled");this.ui.spinner.spin(e,mxResources.get("loading"));null!=t&&null!=t.parentNode&&t.parentNode.removeChild(t);t=document.createElement("a");t.style.display="block";t.setAttribute("href","javascript:void(0);");mxUtils.write(t,mxResources.get("more")+"...");var k=mxUtils.bind(this,function(){mxEvent.removeListener(e,
+"scroll",q);x(a+1)});mxEvent.addListener(t,"click",k);this.executeRequest(b,mxUtils.bind(this,function(b){this.ui.spinner.stop();1==a&&(n(!0),e.appendChild(l("../ [Up]",mxUtils.bind(this,function(){g=null;y()}))),mxUtils.br(e));b=JSON.parse(b.getText());if(null==b||0==b.length)mxUtils.write(e,mxResources.get("noFiles"));else{for(var c=0;c<b.length;c++)mxUtils.bind(this,function(a){e.appendChild(l(a.name,mxUtils.bind(this,function(){f=a.name;g="";u()})));mxUtils.br(e)})(b[c]);100==b.length&&(e.appendChild(t),
+q=function(){e.scrollTop>=e.scrollHeight-e.offsetHeight&&k()},mxEvent.addListener(e,"scroll",q))}}),p)}),y=mxUtils.bind(this,function(a){null==a&&(e.innerHTML="",a=1);var b=new mxXmlRequest(this.baseUrl+"/user/repos?per_page=100&page="+a,null,"GET");h.okButton.setAttribute("disabled","disabled");this.ui.spinner.spin(e,mxResources.get("loading"));null!=t&&null!=t.parentNode&&t.parentNode.removeChild(t);t=document.createElement("a");t.style.display="block";t.setAttribute("href","javascript:void(0);");
+mxUtils.write(t,mxResources.get("more")+"...");var k=mxUtils.bind(this,function(){mxEvent.removeListener(e,"scroll",q);y(a+1)});mxEvent.addListener(t,"click",k);this.executeRequest(b,mxUtils.bind(this,function(b){this.ui.spinner.stop();b=JSON.parse(b.getText());if(null==b||0==b.length)mxUtils.write(e,mxResources.get("noFiles"));else{1==a&&(e.appendChild(l(mxResources.get("enterValue")+"...",mxUtils.bind(this,function(){var a=new FilenameDialog(this.ui,"org/repo/ref",mxResources.get("ok"),mxUtils.bind(this,
+function(a){if(null!=a){var b=a.split("/");if(1<b.length){a=b[0];var k=b[1];3>b.length?(d=a,c=k,g=f=null,x()):this.ui.spinner.spin(e,mxResources.get("loading"))&&(b=encodeURIComponent(b.slice(2,b.length).join("/")),this.getFile(a+"/"+k+"/"+b,mxUtils.bind(this,function(a){this.ui.spinner.stop();d=a.meta.org;c=a.meta.repo;f=decodeURIComponent(a.meta.ref);g="";u()}),mxUtils.bind(this,function(a){this.ui.spinner.stop();this.ui.handleError({message:mxResources.get("fileNotFound")})})))}else this.ui.spinner.stop(),
+this.ui.handleError({message:mxResources.get("invalidName")})}}),mxResources.get("enterValue"));this.ui.showDialog(a.container,300,80,!0,!1);a.init()}))),mxUtils.br(e),mxUtils.br(e));for(var h=0;h<b.length;h++)mxUtils.bind(this,function(a){e.appendChild(l(a.full_name,mxUtils.bind(this,function(){d=a.owner.login;c=a.name;f=a.default_branch;g="";u()})));mxUtils.br(e)})(b[h])}100==b.length&&(e.appendChild(t),q=function(){e.scrollTop>=e.scrollHeight-e.offsetHeight&&k()},mxEvent.addListener(e,"scroll",
 q))}),p)});y()};GitHubClient.prototype.logout=function(){this.clearPersistentToken();this.setUser(null);this.token=null};TrelloFile=function(a,b,d){DrawioFile.call(this,a,b);this.meta=d};mxUtils.extend(TrelloFile,DrawioFile);TrelloFile.prototype.getHash=function(){return"T"+encodeURIComponent(this.meta.compoundId)};TrelloFile.prototype.getMode=function(){return App.MODE_TRELLO};TrelloFile.prototype.isAutosave=function(){return!1};TrelloFile.prototype.getTitle=function(){return this.meta.name};TrelloFile.prototype.isRenamable=function(){return!1};
 TrelloFile.prototype.save=function(a,b,d){this.doSave(this.getTitle(),b,d)};TrelloFile.prototype.saveAs=function(a,b,d){this.doSave(a,b,d)};TrelloFile.prototype.doSave=function(a,b,d){var c=this.meta.name;this.meta.name=a;DrawioFile.prototype.save.apply(this,arguments);this.meta.name=c;this.saveFile(a,!1,b,d)};
 TrelloFile.prototype.saveFile=function(a,b,d,c){if(this.isEditable())if(this.savingFile)null!=c&&c({code:App.ERROR_BUSY});else if(this.savingFile=!0,this.getTitle()==a){var f=this.isModified,g=this.isModified(),k=mxUtils.bind(this,function(){this.setModified(!1);this.isModified=function(){return g}});k();this.ui.trello.saveFile(this,mxUtils.bind(this,function(a){this.savingFile=!1;this.isModified=f;this.meta=a;this.contentChanged();null!=d&&d()}),mxUtils.bind(this,function(a){this.savingFile=!1;this.isModified=
@@ -6800,11 +6802,11 @@ TrelloClient.prototype.pickLibrary=function(a){this.pickFile(a)};TrelloClient.pr
 TrelloClient.prototype.pickFile=function(a,b){a=null!=a?a:mxUtils.bind(this,function(a){this.ui.loadFile("T"+encodeURIComponent(a))});Trello.authorize({type:"popup",name:"draw.io",scope:{read:"true",write:"true"},expiration:"never",success:mxUtils.bind(this,function(){this.showTrelloDialog(!0,a)}),error:mxUtils.bind(this,function(a){this.ui.showError(mxResources.get("error"),a)})})};
 TrelloClient.prototype.showTrelloDialog=function(a,b){var d=null,c=null,f=0,g=document.createElement("div");g.style.whiteSpace="nowrap";g.style.overflow="hidden";g.style.height="224px";var k=document.createElement("h3");mxUtils.write(k,a?mxResources.get("selectFile"):mxResources.get("selectCard"));k.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:12px";g.appendChild(k);var m=document.createElement("div");m.style.whiteSpace="nowrap";m.style.overflow="auto";m.style.height="194px";
 g.appendChild(m);g=new CustomDialog(this.ui,g);this.ui.showDialog(g.container,340,270,!0,!0);g.okButton.parentNode.removeChild(g.okButton);var e=mxUtils.bind(this,function(a,b,c){f++;var d=document.createElement("div");d.style="width:100%;vertical-align:middle;background:"+(0==f%2?"#eee":"#fff");var e=document.createElement("a");e.setAttribute("href","javascript:void(0);");if(null!=c){var g=document.createElement("img");g.src=c.url;g.width=c.width;g.height=c.height;g.style="border: 1px solid black;margin:5px;vertical-align:middle";
-e.appendChild(g)}mxUtils.write(e,a);mxEvent.addListener(e,"click",b);d.appendChild(e);return d}),h=mxUtils.bind(this,function(a){this.ui.handleError(a,null,mxUtils.bind(this,function(){this.ui.spinner.stop();this.ui.hideDialog()}))}),l=mxUtils.bind(this,function(){f=0;m.innerHTML="";this.ui.spinner.spin(m,mxResources.get("loading"));Trello.cards.get(d+"/attachments",{fields:"id,name,previews"},mxUtils.bind(this,function(a){this.ui.spinner.stop();m.appendChild(e("../ [Up]",mxUtils.bind(this,function(){t()})));
-mxUtils.br(m);null==a||0==a.length?mxUtils.write(m,mxResources.get("noFiles")):mxUtils.bind(this,function(){for(var c=0;c<a.length;c++)mxUtils.bind(this,function(a){m.appendChild(e(a.name,mxUtils.bind(this,function(){this.ui.hideDialog();b(d+this.SEPARATOR+a.id)}),null!=a.previews?a.previews[0]:null))})(a[c])})()}),h)}),n=null,p=null,t=mxUtils.bind(this,function(g){null==g&&(f=0,m.innerHTML="",g=1);this.ui.spinner.spin(m,mxResources.get("loading"));null!=n&&null!=n.parentNode&&n.parentNode.removeChild(n);
-n=document.createElement("a");n.style.display="block";n.setAttribute("href","javascript:void(0);");mxUtils.write(n,mxResources.get("more")+"...");var k=mxUtils.bind(this,function(){mxEvent.removeListener(m,"scroll",p);t(g+1)});mxEvent.addListener(n,"click",k);Trello.get("search",{query:null!=c?c:"is:open",cards_limit:100,cards_page:g-1},mxUtils.bind(this,function(f){this.ui.spinner.stop();f=null!=f?f.cards:null;if(null==f||0==f.length)null!=c&&(m.appendChild(e(mxResources.get("clearFilter"),mxUtils.bind(this,
-function(){c=null;t()}))),mxUtils.br(m)),mxUtils.write(m,mxResources.get("noFiles"));else{1==g&&(null!=c?m.appendChild(e(mxResources.get("clearFilter"),mxUtils.bind(this,function(){c=null;t()}))):m.appendChild(e(mxResources.get("filterCards")+"...",mxUtils.bind(this,function(){var a=new FilenameDialog(this.ui,"is:open",mxResources.get("ok"),mxUtils.bind(this,function(a){null!=a&&(c=a,t())}),mxResources.get("cardName"),null,null,"http://help.trello.com/article/808-searching-for-cards-all-boards");
-this.ui.showDialog(a.container,300,80,!0,!1);a.init()}))),mxUtils.br(m));for(var h=0;h<f.length;h++)mxUtils.bind(this,function(c){m.appendChild(e(c.name,mxUtils.bind(this,function(){a?(d=c.id,l()):(this.ui.hideDialog(),b(c.id))})))})(f[h]);100==f.length&&(m.appendChild(n),p=function(){m.scrollTop>=m.scrollHeight-m.offsetHeight&&k()},mxEvent.addListener(m,"scroll",p))}}),h)});t()};TrelloClient.prototype.isAuthorized=function(){try{return null!=localStorage.trello_token}catch(a){}return!1};
+e.appendChild(g)}mxUtils.write(e,a);mxEvent.addListener(e,"click",b);d.appendChild(e);return d}),h=mxUtils.bind(this,function(a){this.ui.handleError(a,null,mxUtils.bind(this,function(){this.ui.spinner.stop();this.ui.hideDialog()}))}),l=mxUtils.bind(this,function(){f=0;m.innerHTML="";this.ui.spinner.spin(m,mxResources.get("loading"));Trello.cards.get(d+"/attachments",{fields:"id,name,previews"},mxUtils.bind(this,function(a){this.ui.spinner.stop();m.appendChild(e("../ [Up]",mxUtils.bind(this,function(){u()})));
+mxUtils.br(m);null==a||0==a.length?mxUtils.write(m,mxResources.get("noFiles")):mxUtils.bind(this,function(){for(var c=0;c<a.length;c++)mxUtils.bind(this,function(a){m.appendChild(e(a.name,mxUtils.bind(this,function(){this.ui.hideDialog();b(d+this.SEPARATOR+a.id)}),null!=a.previews?a.previews[0]:null))})(a[c])})()}),h)}),n=null,p=null,u=mxUtils.bind(this,function(g){null==g&&(f=0,m.innerHTML="",g=1);this.ui.spinner.spin(m,mxResources.get("loading"));null!=n&&null!=n.parentNode&&n.parentNode.removeChild(n);
+n=document.createElement("a");n.style.display="block";n.setAttribute("href","javascript:void(0);");mxUtils.write(n,mxResources.get("more")+"...");var k=mxUtils.bind(this,function(){mxEvent.removeListener(m,"scroll",p);u(g+1)});mxEvent.addListener(n,"click",k);Trello.get("search",{query:null!=c?c:"is:open",cards_limit:100,cards_page:g-1},mxUtils.bind(this,function(f){this.ui.spinner.stop();f=null!=f?f.cards:null;if(null==f||0==f.length)null!=c&&(m.appendChild(e(mxResources.get("clearFilter"),mxUtils.bind(this,
+function(){c=null;u()}))),mxUtils.br(m)),mxUtils.write(m,mxResources.get("noFiles"));else{1==g&&(null!=c?m.appendChild(e(mxResources.get("clearFilter"),mxUtils.bind(this,function(){c=null;u()}))):m.appendChild(e(mxResources.get("filterCards")+"...",mxUtils.bind(this,function(){var a=new FilenameDialog(this.ui,"is:open",mxResources.get("ok"),mxUtils.bind(this,function(a){null!=a&&(c=a,u())}),mxResources.get("cardName"),null,null,"http://help.trello.com/article/808-searching-for-cards-all-boards");
+this.ui.showDialog(a.container,300,80,!0,!1);a.init()}))),mxUtils.br(m));for(var h=0;h<f.length;h++)mxUtils.bind(this,function(c){m.appendChild(e(c.name,mxUtils.bind(this,function(){a?(d=c.id,l()):(this.ui.hideDialog(),b(c.id))})))})(f[h]);100==f.length&&(m.appendChild(n),p=function(){m.scrollTop>=m.scrollHeight-m.offsetHeight&&k()},mxEvent.addListener(m,"scroll",p))}}),h)});u()};TrelloClient.prototype.isAuthorized=function(){try{return null!=localStorage.trello_token}catch(a){}return!1};
 TrelloClient.prototype.logout=function(){Trello.deauthorize()};function ChatWindow(a,b,d,c,f,g,k,m){this.editorUi=a;this.doc=m.doc;this.rtModel=m.rt;this.chatHistory=m.chatHistory;this.chatMap=m.chatMap;this.configCollabInfo();d=document.createElement("div");d.id="mainDiv";m=document.createElement("div");m.style.padding="3px";d.appendChild(m);var e=document.createElement("div");e.style.paddingLeft="3px";e.style.paddingRight="15px";a.editor.graph.isEnabled()&&d.appendChild(e);this.chatArea=document.createElement("div");this.chatArea.style.backgroundColor="white";
 this.chatArea.style.overflowX="hidden";this.chatArea.style.overflowY="auto";this.chatArea.style.width="98%";this.chatArea.style.resize="none";m.appendChild(this.chatArea);this.chatLineArea=document.createElement("textarea");this.chatLineArea.style.resize="none";this.chatLineArea.rows=1;this.chatLineArea.onkeydown=mxUtils.bind(this,function(a){13==(a.keyCode||window.event.keyCode)&&""!=this.chatLineArea.value&&this.sendMessage()});this.sendBtn=document.createElement("button");this.sendBtn.style.cssFloat=
 "right";this.sendBtn.style.styleFloat="right";mxUtils.write(this.sendBtn,mxResources.get("sendMessage"));mxEvent.addListener(this.sendBtn,"click",mxUtils.bind(this,function(a){""!=this.chatLineArea.value&&this.sendMessage()}));e.appendChild(this.chatLineArea);e.appendChild(this.sendBtn);this.window=new mxWindow(b,d,c,f,g,k,!0,!0);this.window.destroyOnClose=!1;this.window.setMaximizable(!0);this.window.setScrollable(!0);this.window.setResizable(!0);this.window.setClosable(!0);this.window.setVisible(!0);
@@ -6869,8 +6871,8 @@ App.prototype.updateDocumentTitle=function(){if(!this.editor.graph.lightbox){var
 App.prototype.crc32=function(a){this.crcTable=this.crcTable||this.createCrcTable();for(var b=-1,d=0;d<a.length;d++)b=b>>>8^this.crcTable[(b^a.charCodeAt(d))&255];return(b^-1)>>>0};
 App.prototype.getThumbnail=function(a,b){var d=!1;try{null==this.thumbImageCache&&(this.thumbImageCache={});var c=this.editor.graph;if(null!=this.pages&&this.currentPage!=this.pages[0]){var c=this.createTemporaryGraph(c.getStylesheet()),f=c.getGlobalVariable,g=this.pages[0];c.getGlobalVariable=function(a){return"page"==a?g.getName():"pagenumber"==a?1:f.apply(this,arguments)};document.body.appendChild(c.container);c.model.setRoot(g.root)}if(mxClient.IS_CHROMEAPP||!c.mathEnabled&&this.useCanvasForExport)this.exportToCanvas(mxUtils.bind(this,
 function(a){c!=this.editor.graph&&c.container.parentNode.removeChild(c.container);b(a)}),a,this.thumbImageCache,"#ffffff",function(){b()},null,null,null,null,null,null,c),d=!0;else if(this.canvasSupported&&null!=this.getCurrentFile()){var k=document.createElement("canvas"),m=c.getGraphBounds(),e=a/m.width,e=Math.min(1,Math.min(3*a/(4*m.height),e)),h=Math.floor(m.x),l=Math.floor(m.y);k.setAttribute("width",Math.ceil(e*(m.width+4)));k.setAttribute("height",Math.ceil(e*(m.height+4)));var n=k.getContext("2d");
-n.scale(e,e);n.translate(-h,-l);var p=c.background;if(null==p||""==p||p==mxConstants.NONE)p="#ffffff";n.save();n.fillStyle=p;n.fillRect(h,l,Math.ceil(m.width+4),Math.ceil(m.height+4));n.restore();var t=new mxJsCanvas(k),u=new mxAsyncCanvas(this.thumbImageCache);t.images=this.thumbImageCache.images;var q=new mxImageExport;q.drawShape=function(a,b){a.shape instanceof mxShape&&a.shape.checkBounds()&&(b.save(),b.translate(.5,.5),a.shape.paint(b),b.translate(-.5,-.5),b.restore())};q.drawText=function(a,
-b){};q.drawState(c.getView().getState(c.model.root),u);u.finish(mxUtils.bind(this,function(){q.drawState(c.getView().getState(c.model.root),t);c!=this.editor.graph&&c.container.parentNode.removeChild(c.container);b(k)}));d=!0}}catch(w){c!=this.editor.graph&&c.container.parentNode.removeChild(c.container)}return d};
+n.scale(e,e);n.translate(-h,-l);var p=c.background;if(null==p||""==p||p==mxConstants.NONE)p="#ffffff";n.save();n.fillStyle=p;n.fillRect(h,l,Math.ceil(m.width+4),Math.ceil(m.height+4));n.restore();var u=new mxJsCanvas(k),t=new mxAsyncCanvas(this.thumbImageCache);u.images=this.thumbImageCache.images;var q=new mxImageExport;q.drawShape=function(a,b){a.shape instanceof mxShape&&a.shape.checkBounds()&&(b.save(),b.translate(.5,.5),a.shape.paint(b),b.translate(-.5,-.5),b.restore())};q.drawText=function(a,
+b){};q.drawState(c.getView().getState(c.model.root),t);t.finish(mxUtils.bind(this,function(){q.drawState(c.getView().getState(c.model.root),u);c!=this.editor.graph&&c.container.parentNode.removeChild(c.container);b(k)}));d=!0}}catch(x){c!=this.editor.graph&&c.container.parentNode.removeChild(c.container)}return d};
 App.prototype.createBackground=function(){var a=this.createDiv("background");a.style.position="absolute";a.style.background="white";a.style.left="0px";a.style.top="0px";a.style.bottom="0px";a.style.right="0px";mxUtils.setOpacity(a,100);mxClient.IS_QUIRKS&&new mxDivResizer(a);return a};
 (function(){var a=EditorUi.prototype.setMode;App.prototype.setMode=function(b,d){a.apply(this,arguments);null!=this.mode&&(Editor.useLocalStorage=this.mode==App.MODE_BROWSER);if(d)if(isLocalStorage)localStorage.setItem(".mode",b);else if("undefined"!=typeof Storage){var c=new Date;c.setYear(c.getFullYear()+1);document.cookie="MODE="+b+"; expires="+c.toUTCString()}null!=this.appIcon&&(c=this.getCurrentFile(),b=null!=c?c.getMode():null,b==App.MODE_GOOGLE?(this.appIcon.setAttribute("title",mxResources.get("openIt",
 [mxResources.get("googleDrive")])),this.appIcon.style.cursor="pointer"):b==App.MODE_DROPBOX?(this.appIcon.setAttribute("title",mxResources.get("openIt",[mxResources.get("dropbox")])),this.appIcon.style.cursor="pointer"):b==App.MODE_ONEDRIVE?(this.appIcon.setAttribute("title",mxResources.get("openIt",[mxResources.get("oneDrive")])),this.appIcon.style.cursor="pointer"):(this.appIcon.removeAttribute("title"),this.appIcon.style.cursor="default"))}})();
@@ -6989,10 +6991,10 @@ null!=a?(this.userElement.innerHTML="",560<screen.width&&(mxUtils.write(this.use
 var c=document.createElement("img");c.setAttribute("border","0");c.setAttribute("valign","bottom");c.setAttribute("src",Editor.helpImage);b.appendChild(c);mxEvent.addGestureListeners(b,mxUtils.bind(this,function(b){null!=this.editorUi.menubar&&this.editorUi.menubar.hideMenu();window.open(a);mxEvent.consume(b)}));return b};Menus.prototype.addLinkToItem=function(a,b){null!=a&&a.firstChild.nextSibling.appendChild(this.createHelpLink(b))};var b=Menus.prototype.init;Menus.prototype.init=function(){b.apply(this,
 arguments);var a=this.editorUi,d=a.editor.graph,g=mxUtils.bind(d,d.isEnabled),k=("1"!=urlParams.embed&&"0"!=urlParams.gapi||"1"==urlParams.embed&&"1"==urlParams.gapi)&&mxClient.IS_SVG&&isLocalStorage&&(null==document.documentMode||10<=document.documentMode),m=("1"!=urlParams.embed&&"0"!=urlParams.db||"1"==urlParams.embed&&"1"==urlParams.db)&&mxClient.IS_SVG&&(null==document.documentMode||9<document.documentMode),e=("www.draw.io"==window.location.hostname||"test.draw.io"==window.location.hostname||
 "drive.draw.io"==window.location.hostname||"legacy.draw.io"==window.location.hostname)&&("1"!=urlParams.embed&&"0"!=urlParams.od||"1"==urlParams.embed&&"1"==urlParams.od)&&!navigator.userAgent.match(/(iPad|iPhone|iPod)/g)&&(0>navigator.userAgent.indexOf("MSIE")||10<=document.documentMode),h=("1"!=urlParams.embed&&"0"!=urlParams.tr||"1"==urlParams.embed&&"1"==urlParams.tr)&&mxClient.IS_SVG&&(null==document.documentMode||9<document.documentMode);a.isOffline()||((new Image).src=IMAGE_PATH+"/help.png");
-a.actions.addAction("new...",function(){var b=a.isOffline(),c=new NewDialog(a,b);a.showDialog(c.container,b?350:620,b?70:440,!0,!0,function(b){b&&null==a.getCurrentFile()&&a.showSplash()});c.init()});a.actions.put("exportSvg",new Action(mxResources.get("formatSvg")+"...",function(){a.showExportDialog(mxResources.get("formatSvg"),!0,mxResources.get("export"),"https://support.draw.io/display/DO/Exporting+Files",mxUtils.bind(this,function(b,c,d,e,f,g,h,k,l){b=parseInt(b);!isNaN(b)&&0<b&&a.exportSvg(b/
-100,c,d,e,f,g,h,!k,l)}),!0,null,"svg")}));a.actions.put("exportXml",new Action(mxResources.get("formatXml")+"...",function(){var b=document.createElement("div");b.style.whiteSpace="nowrap";var c=null==a.pages||1>=a.pages.length,e=document.createElement("h3");mxUtils.write(e,mxResources.get("formatXml"));e.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:4px";b.appendChild(e);var f=a.addCheckbox(b,mxResources.get("selectionOnly"),!1,d.isSelectionEmpty()),g=a.addCheckbox(b,mxResources.get(c?
+a.actions.addAction("new...",function(){var b=a.isOffline(),c=new NewDialog(a,b);a.showDialog(c.container,b?350:620,b?70:440,!0,!0,function(b){b&&null==a.getCurrentFile()&&a.showSplash()});c.init()});a.actions.put("exportSvg",new Action(mxResources.get("formatSvg")+"...",function(){a.showExportDialog(mxResources.get("formatSvg"),!0,mxResources.get("export"),"https://support.draw.io/display/DO/Exporting+Files",mxUtils.bind(this,function(b,c,d,e,f,g,k,h,l){b=parseInt(b);!isNaN(b)&&0<b&&a.exportSvg(b/
+100,c,d,e,f,g,k,!h,l)}),!0,null,"svg")}));a.actions.put("exportXml",new Action(mxResources.get("formatXml")+"...",function(){var b=document.createElement("div");b.style.whiteSpace="nowrap";var c=null==a.pages||1>=a.pages.length,e=document.createElement("h3");mxUtils.write(e,mxResources.get("formatXml"));e.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:4px";b.appendChild(e);var f=a.addCheckbox(b,mxResources.get("selectionOnly"),!1,d.isSelectionEmpty()),g=a.addCheckbox(b,mxResources.get(c?
 "compressed":"allPages"),!0);g.style.marginBottom="16px";mxEvent.addListener(f,"change",function(){f.checked?g.setAttribute("disabled","disabled"):g.removeAttribute("disabled")});b=new CustomDialog(a,b,mxUtils.bind(this,function(){a.downloadFile("xml",c?!g.checked:null,null,!f.checked,c?null:!g.checked)}),null,mxResources.get("export"));a.showDialog(b.container,300,146,!0,!0)}));a.actions.put("exportHtml",new Action(mxResources.get("formatHtmlEmbedded")+"...",function(){a.spinner.spin(document.body,
-mxResources.get("loading"))&&a.getPublicUrl(a.getCurrentFile(),function(b){a.spinner.stop();a.showHtmlDialog(mxResources.get("export"),null,b,function(b,c,d,e,f,g,h,k,l,m){a.createHtml(b,c,d,e,f,g,h,k,l,m,mxUtils.bind(this,function(b,c){var d=a.getBaseFilename(),e='\x3c!--[if IE]><meta http-equiv="X-UA-Compatible" content="IE=5,IE=9" ><![endif]--\x3e\n<!DOCTYPE html>\n<html>\n<head>\n<title>'+mxUtils.htmlEntities(d)+'</title>\n<meta charset="utf-8"/>\n</head>\n<body>'+b+"\n"+c+"\n</body>\n</html>";
+mxResources.get("loading"))&&a.getPublicUrl(a.getCurrentFile(),function(b){a.spinner.stop();a.showHtmlDialog(mxResources.get("export"),null,b,function(b,c,d,e,f,g,k,h,l,m){a.createHtml(b,c,d,e,f,g,k,h,l,m,mxUtils.bind(this,function(b,c){var d=a.getBaseFilename(),e='\x3c!--[if IE]><meta http-equiv="X-UA-Compatible" content="IE=5,IE=9" ><![endif]--\x3e\n<!DOCTYPE html>\n<html>\n<head>\n<title>'+mxUtils.htmlEntities(d)+'</title>\n<meta charset="utf-8"/>\n</head>\n<body>'+b+"\n"+c+"\n</body>\n</html>";
 a.saveData(d+".html","html",e,"text/html")}))})})}));a.actions.put("exportPdf",new Action(mxResources.get("formatPdf")+"...",function(){if(a.isOffline()||a.printPdfExport)a.showDialog((new PrintDialog(a,mxResources.get("formatPdf"))).container,360,null!=a.pages&&1<a.pages.length?420:360,!0,!0);else{var b=document.createElement("div");b.style.whiteSpace="nowrap";var c=document.createElement("h3");mxUtils.write(c,mxResources.get("formatPdf"));c.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:4px";
 b.appendChild(c);var e=a.addCheckbox(b,mxResources.get("selectionOnly"),!1,d.isSelectionEmpty()),f=a.addCheckbox(b,mxResources.get("crop"),!d.pageVisible||!a.pdfPageExport,!a.pdfPageExport);f.style.marginBottom="16px";a.pdfPageExport||mxEvent.addListener(e,"change",function(){e.checked?f.removeAttribute("disabled"):f.setAttribute("disabled","disabled")});b=new CustomDialog(a,b,mxUtils.bind(this,function(){a.downloadFile("pdf",null,null,!e.checked,null,!f.checked)}),null,mxResources.get("export"));
 a.showDialog(b.container,300,146,!0,!0)}}));a.actions.addAction("open...",function(){a.pickFile()});a.actions.addAction("close",function(){a.fileLoaded(null)});a.actions.addAction("editShape...",mxUtils.bind(this,function(){d.getSelectionCells();if(1==d.getSelectionCount()){var b=d.getSelectionCell(),c=d.view.getState(b);null!=c&&null!=c.shape&&null!=c.shape.stencil&&(b=new EditShapeDialog(a,b,mxResources.get("editShape")+":",630,400),a.showDialog(b.container,640,480,!0,!1),b.init())}}));a.actions.addAction("revisionHistory...",
@@ -7003,46 +7005,46 @@ c.items);a.showDialog(d.container,640,480,!0,!0);d.init()},function(b){a.spinner
 "")+"title="+encodeURIComponent(b)))});if("undefined"!==typeof MathJax){var l=a.actions.addAction("mathematicalTypesetting",function(){a.setMathEnabled(!a.isMathEnabled())});l.setToggleAction(!0);l.setSelectedCallback(function(){return a.isMathEnabled()});l.isEnabled=g}isLocalStorage&&(l=a.actions.addAction("showStartScreen",function(){mxSettings.setShowStartScreen(!mxSettings.getShowStartScreen());mxSettings.save()}),l.setToggleAction(!0),l.setSelectedCallback(function(){return mxSettings.getShowStartScreen()}));
 var n=a.actions.addAction("autosave",function(){a.editor.setAutosave(!a.editor.autosave)});n.setToggleAction(!0);n.setSelectedCallback(function(){return n.isEnabled()&&a.editor.autosave});a.actions.addAction("editGeometry...",function(){for(var b=d.getSelectionCells(),c=[],e=0;e<b.length;e++)d.getModel().isVertex(b[e])&&c.push(b[e]);0<c.length&&(b=new EditGeometryDialog(a,c),a.showDialog(b.container,180,180,!0,!0),b.init())},null,null,Editor.ctrlKey+"+Shift+M");var p="rounded shadow dashed dashPattern fontFamily fontSize fontColor fontStyle align verticalAlign strokeColor strokeWidth fillColor gradientColor swimlaneFillColor textOpacity gradientDirection glass labelBackgroundColor labelBorderColor opacity spacing spacingTop spacingLeft spacingBottom spacingRight endFill endArrow endSize startStill startArrow startSize arcSize".split(" ");
 a.actions.addAction("copyStyle",function(){var b=d.view.getState(d.getSelectionCell());if(d.isEnabled()&&null!=b){a.copiedStyle=mxUtils.clone(b.style);for(var b=d.getModel().getStyle(b.cell),b=null!=b?b.split(";"):[],c=0;c<b.length;c++){var e=b[c],f=e.indexOf("=");if(0<=f){var g=e.substring(0,f),e=e.substring(f+1);null==a.copiedStyle[g]&&"none"==e&&(a.copiedStyle[g]="none")}}}},null,null,Editor.ctrlKey+"+Shift+C");a.actions.addAction("pasteStyle",function(){if(d.isEnabled()&&!d.isSelectionEmpty()&&
-null!=a.copiedStyle){d.getModel().beginUpdate();try{for(var b=d.getSelectionCells(),c=0;c<b.length;c++)for(var e=d.view.getState(b[c]),f=0;f<p.length;f++){var g=p[f],h=a.copiedStyle[g];e.style[g]!=h&&d.setCellStyles(g,h,[b[c]])}}finally{d.getModel().endUpdate()}}},null,null,Editor.ctrlKey+"+Shift+V");a.actions.put("pageBackgroundImage",new Action(mxResources.get("backgroundImage")+"...",function(){if(!a.isOffline()){var b=new BackgroundImageDialog(a,function(b){a.setBackgroundImage(b)});a.showDialog(b.container,
-320,170,!0,!0);b.init()}}));a.actions.put("exportPng",new Action(mxResources.get("formatPng")+"...",function(){a.isExportToCanvas()?a.showExportDialog(mxResources.get("image"),!1,mxResources.get("export"),"https://support.draw.io/display/DO/Exporting+Files",mxUtils.bind(this,function(b,c,d,e,f,g,h,k,l){b=parseInt(b);!isNaN(b)&&0<b&&a.exportImage(b/100,c,d,e,f,h,!k,l)}),!0,!1,"png"):a.showRemoteExportDialog(mxResources.get("export"),null,mxUtils.bind(this,function(b,c){a.downloadFile(c?"xmlpng":"png",
-null,null,b)}))}));l=a.actions.put("shadowVisible",new Action(mxResources.get("shadow"),function(){d.setShadowVisible(!d.shadowVisible)}));l.setToggleAction(!0);l.setSelectedCallback(function(){return d.shadowVisible});var t=!1;a.actions.put("about",new Action(mxResources.get("aboutDrawio")+"...",function(){t||(a.showDialog((new AboutDialog(a)).container,220,300,!0,!0,function(){t=!1}),t=!0)},null,null,"F1"));a.actions.addAction("userManual...",function(){window.open("https://support.draw.io/display/DO/Draw.io+Online+User+Manual")});
+null!=a.copiedStyle){d.getModel().beginUpdate();try{for(var b=d.getSelectionCells(),c=0;c<b.length;c++)for(var e=d.view.getState(b[c]),f=0;f<p.length;f++){var g=p[f],k=a.copiedStyle[g];e.style[g]!=k&&d.setCellStyles(g,k,[b[c]])}}finally{d.getModel().endUpdate()}}},null,null,Editor.ctrlKey+"+Shift+V");a.actions.put("pageBackgroundImage",new Action(mxResources.get("backgroundImage")+"...",function(){if(!a.isOffline()){var b=new BackgroundImageDialog(a,function(b){a.setBackgroundImage(b)});a.showDialog(b.container,
+320,170,!0,!0);b.init()}}));a.actions.put("exportPng",new Action(mxResources.get("formatPng")+"...",function(){a.isExportToCanvas()?a.showExportDialog(mxResources.get("image"),!1,mxResources.get("export"),"https://support.draw.io/display/DO/Exporting+Files",mxUtils.bind(this,function(b,c,d,e,f,g,k,h,l){b=parseInt(b);!isNaN(b)&&0<b&&a.exportImage(b/100,c,d,e,f,k,!h,l)}),!0,!1,"png"):a.showRemoteExportDialog(mxResources.get("export"),null,mxUtils.bind(this,function(b,c){a.downloadFile(c?"xmlpng":"png",
+null,null,b)}))}));l=a.actions.put("shadowVisible",new Action(mxResources.get("shadow"),function(){d.setShadowVisible(!d.shadowVisible)}));l.setToggleAction(!0);l.setSelectedCallback(function(){return d.shadowVisible});var u=!1;a.actions.put("about",new Action(mxResources.get("aboutDrawio")+"...",function(){u||(a.showDialog((new AboutDialog(a)).container,220,300,!0,!0,function(){u=!1}),u=!0)},null,null,"F1"));a.actions.addAction("userManual...",function(){window.open("https://support.draw.io/display/DO/Draw.io+Online+User+Manual")});
 a.actions.addAction("support...",function(){window.open("https://about.draw.io/support/")});a.actions.addAction("exportOptionsDisabled...",function(){a.handleError({message:mxResources.get("exportOptionsDisabledDetails")},mxResources.get("exportOptionsDisabled"))});a.actions.addAction("keyboardShortcuts...",function(){mxClient.IS_CHROMEAPP?window.open("https://www.draw.io/shortcuts.svg"):mxClient.IS_SVG?window.open("shortcuts.svg"):window.open("https://www.draw.io/?lightbox=1#Uhttps%3A%2F%2Fwww.draw.io%2Fshortcuts.svg")});
 a.actions.addAction("feedback...",function(){var b=new FeedbackDialog(a);a.showDialog(b.container,610,360,!0,!0);b.init()});a.actions.addAction("quickStart...",function(){window.open("https://www.youtube.com/watch?v=Z0D96ZikMkc")});l=a.actions.addAction("tags...",mxUtils.bind(this,function(){null==this.tagsWindow?(this.tagsWindow=new TagsWindow(a,document.body.offsetWidth-380,230,280,120),this.tagsWindow.window.addListener("show",function(){a.fireEvent(new mxEventObject("tags"))}),this.tagsWindow.window.addListener("hide",
 function(){a.fireEvent(new mxEventObject("tags"))}),this.tagsWindow.window.setVisible(!0),a.fireEvent(new mxEventObject("tags"))):this.tagsWindow.window.setVisible(!this.tagsWindow.window.isVisible())}));l.setToggleAction(!0);l.setSelectedCallback(mxUtils.bind(this,function(){return null!=this.tagsWindow&&this.tagsWindow.window.isVisible()}));l=a.actions.addAction("find...",mxUtils.bind(this,function(){null==this.findWindow?(this.findWindow=new FindWindow(a,document.body.offsetWidth-300,110,204,140),
 this.findWindow.window.addListener("show",function(){a.fireEvent(new mxEventObject("find"))}),this.findWindow.window.addListener("hide",function(){a.fireEvent(new mxEventObject("find"))}),this.findWindow.window.setVisible(!0),a.fireEvent(new mxEventObject("find"))):this.findWindow.window.setVisible(!this.findWindow.window.isVisible())}));l.setToggleAction(!0);l.setSelectedCallback(mxUtils.bind(this,function(){return null!=this.findWindow&&this.findWindow.window.isVisible()}));a.actions.put("exportVsdx",
 new Action(mxResources.get("formatVsdx")+" (beta)...",function(){var b=mxUtils.bind(this,function(){if("undefined"!==typeof VsdxExport)try{(new VsdxExport(a)).exportCurrentDiagrams()}catch(v){}});"undefined"!==typeof VsdxExport||this.loadingVsdx||a.isOffline()?window.setTimeout(b,0):(this.loadingVsdx=!0,mxscript("js/vsdx.min.js",b))}));if(mxClient.IS_CHROMEAPP||isLocalStorage&&"1"!=urlParams.offline)if(this.put("language",new Menu(mxUtils.bind(this,function(b,c){var d=mxUtils.bind(this,function(d){var e=
-""==d?mxResources.get("automatic"):mxLanguageMap[d],f=null;""!=e&&(f=b.addItem(e,null,mxUtils.bind(this,function(){mxSettings.setLanguage(d);mxSettings.save();mxClient.language=d;mxResources.loadDefaultBundle=!1;mxResources.add(RESOURCE_BASE);a.alert(mxResources.get("restartForChangeRequired"))}),c),(d==mxLanguage||""==d&&null==mxLanguage)&&b.addCheckmark(f,Editor.checkmarkImage));return f});d("");b.addSeparator(c);for(var e in mxLanguageMap)d(e)}))),"atlas"!=uiTheme){var u=Menus.prototype.createMenubar;
-Menus.prototype.createMenubar=function(a){var b=u.apply(this,arguments);if(null!=b){var c=this.get("language");null!=c&&(c=b.addMenu("",c.funct),c.setAttribute("title",mxResources.get("language")),c.style.width="16px",c.style.paddingTop="2px",c.style.paddingLeft="4px",c.innerHTML='<div class="geIcon geSprite geSprite-globe"/>',c.style.zIndex="1",c.style.position="absolute",c.style.top="2px",c.style.right="17px",c.style.display="block",mxClient.IS_VML||mxUtils.setOpacity(c,60),document.body.appendChild(c))}return b}}this.put("help",
+""==d?mxResources.get("automatic"):mxLanguageMap[d],f=null;""!=e&&(f=b.addItem(e,null,mxUtils.bind(this,function(){mxSettings.setLanguage(d);mxSettings.save();mxClient.language=d;mxResources.loadDefaultBundle=!1;mxResources.add(RESOURCE_BASE);a.alert(mxResources.get("restartForChangeRequired"))}),c),(d==mxLanguage||""==d&&null==mxLanguage)&&b.addCheckmark(f,Editor.checkmarkImage));return f});d("");b.addSeparator(c);for(var e in mxLanguageMap)d(e)}))),"atlas"!=uiTheme){var t=Menus.prototype.createMenubar;
+Menus.prototype.createMenubar=function(a){var b=t.apply(this,arguments);if(null!=b){var c=this.get("language");null!=c&&(c=b.addMenu("",c.funct),c.setAttribute("title",mxResources.get("language")),c.style.width="16px",c.style.paddingTop="2px",c.style.paddingLeft="4px",c.innerHTML='<div class="geIcon geSprite geSprite-globe"/>',c.style.zIndex="1",c.style.position="absolute",c.style.top="2px",c.style.right="17px",c.style.display="block",mxClient.IS_VML||mxUtils.setOpacity(c,60),document.body.appendChild(c))}return b}}this.put("help",
 new Menu(mxUtils.bind(this,function(b,c){if(!mxClient.IS_CHROMEAPP&&a.isOffline())this.addMenuItems(b,["about"]);else{var e=b.addItem("Search",null,null,c,null,null,!1),f=document.createElement("div");f.style.display="inline";f.innerHTML=':<form style="display:inline;margin-left:8px;"target="_blank" method="get" action="https://desk.draw.io/support/search/solutions"><input type="text" name="term" size="25"></form>';e.firstChild.nextSibling.appendChild(f);e.style.backgroundColor="whiteSmoke";e.style.cursor=
-"default";var g=f.getElementsByTagName("form")[0],h=f.getElementsByTagName("input")[0];null!=h&&null!=g&&(mxEvent.addListener(g,"submit",function(){if(EditorUi.enableLogging)try{(new Image).src=(null!=window.DRAWIO_LOG_URL?window.DRAWIO_LOG_URL:"")+"/log?severity=CONFIG&msg=helpsearch:"+encodeURIComponent(h.value)+"&v="+encodeURIComponent(EditorUi.VERSION)}catch(z){}window.setTimeout(function(){a.menubar.hideMenu()},0)}),mxEvent.addGestureListeners(e,function(a){document.activeElement!=h&&h.focus();
-mxEvent.consume(a)},function(a){mxEvent.consume(a)},function(a){mxEvent.consume(a)}),window.setTimeout(function(){h.focus()},0));this.addMenuItems(b,["-","quickStart","userManual","keyboardShortcuts","-"]);mxClient.IS_CHROMEAPP||this.addMenuItems(b,["feedback"]);this.addMenuItems(b,["support","-","about"])}"1"==urlParams.ruler&&(mxResources.parse("rulerInch=Ruler unit: Inches"),this.editorUi.actions.addAction("rulerInch",mxUtils.bind(this,function(){this.editorUi.vRuler.setUnit(mxRuler.prototype.INCHES);
+"default";var g=f.getElementsByTagName("form")[0],k=f.getElementsByTagName("input")[0];null!=k&&null!=g&&(mxEvent.addListener(g,"submit",function(){if(EditorUi.enableLogging)try{(new Image).src=(null!=window.DRAWIO_LOG_URL?window.DRAWIO_LOG_URL:"")+"/log?severity=CONFIG&msg=helpsearch:"+encodeURIComponent(k.value)+"&v="+encodeURIComponent(EditorUi.VERSION)}catch(z){}window.setTimeout(function(){a.menubar.hideMenu()},0)}),mxEvent.addGestureListeners(e,function(a){document.activeElement!=k&&k.focus();
+mxEvent.consume(a)},function(a){mxEvent.consume(a)},function(a){mxEvent.consume(a)}),window.setTimeout(function(){k.focus()},0));this.addMenuItems(b,["-","quickStart","userManual","keyboardShortcuts","-"]);mxClient.IS_CHROMEAPP||this.addMenuItems(b,["feedback"]);this.addMenuItems(b,["support","-","about"])}"1"==urlParams.ruler&&(mxResources.parse("rulerInch=Ruler unit: Inches"),this.editorUi.actions.addAction("rulerInch",mxUtils.bind(this,function(){this.editorUi.vRuler.setUnit(mxRuler.prototype.INCHES);
 this.editorUi.hRuler.setUnit(mxRuler.prototype.INCHES);this.editorUi.vRuler.drawRuler(!0);this.editorUi.hRuler.drawRuler(!0)})),mxResources.parse("rulerCM=Ruler unit: CMs"),this.editorUi.actions.addAction("rulerCM",mxUtils.bind(this,function(){this.editorUi.vRuler.setUnit(mxRuler.prototype.CENTIMETER);this.editorUi.hRuler.setUnit(mxRuler.prototype.CENTIMETER);this.editorUi.vRuler.drawRuler(!0);this.editorUi.hRuler.drawRuler(!0)})),mxResources.parse("rulerPixel=Ruler unit: Pixels"),this.editorUi.actions.addAction("rulerPixel",
 mxUtils.bind(this,function(){this.editorUi.vRuler.setUnit(mxRuler.prototype.PIXELS);this.editorUi.hRuler.setUnit(mxRuler.prototype.PIXELS);this.editorUi.vRuler.drawRuler(!0);this.editorUi.hRuler.drawRuler(!0)})),this.addMenuItems(b,["-","rulerInch","rulerCM","rulerPixel"],c));"1"==urlParams.test&&(mxResources.parse("showBoundingBox=Show bounding box"),this.editorUi.actions.addAction("showBoundingBox",mxUtils.bind(this,function(){var a=d.getGraphBounds(),b=d.view.translate,e=d.view.scale;d.insertVertex(c,
 null,"",a.x/e-b.x,a.y/e-b.y,a.width/e,a.height/e,"fillColor=none;strokeColor=red;")})),this.addMenuItems(b,["-","showBoundingBox"],c),mxResources.parse("testXmlImageExport=XML Image Export"),this.editorUi.actions.addAction("testXmlImageExport",mxUtils.bind(this,function(){var a=new mxImageExport,b=d.getGraphBounds(),c=d.view.scale,e=mxUtils.createXmlDocument(),f=e.createElement("output");e.appendChild(f);e=new mxXmlCanvas2D(f);e.translate(Math.floor((1-b.x)/c),Math.floor((1-b.y)/c));e.scale(1/c);
-var g=0,h=e.save;e.save=function(){g++;h.apply(this,arguments)};var k=e.restore;e.restore=function(){g--;k.apply(this,arguments)};var l=a.drawShape;a.drawShape=function(a){mxLog.debug("entering shape",a,g);l.apply(this,arguments);mxLog.debug("leaving shape",a,g)};a.drawState(d.getView().getState(d.model.root),e);mxLog.show();mxLog.debug(mxUtils.getXml(f));mxLog.debug("stateCounter",g)})),this.addMenuItems(b,["testXmlImageExport"],c),mxResources.parse("testShowRtModel=Show RT model"),mxResources.parse("testDebugRtModel=Debug RT model"),
+var g=0,k=e.save;e.save=function(){g++;k.apply(this,arguments)};var h=e.restore;e.restore=function(){g--;h.apply(this,arguments)};var l=a.drawShape;a.drawShape=function(a){mxLog.debug("entering shape",a,g);l.apply(this,arguments);mxLog.debug("leaving shape",a,g)};a.drawState(d.getView().getState(d.model.root),e);mxLog.show();mxLog.debug(mxUtils.getXml(f));mxLog.debug("stateCounter",g)})),this.addMenuItems(b,["testXmlImageExport"],c),mxResources.parse("testShowRtModel=Show RT model"),mxResources.parse("testDebugRtModel=Debug RT model"),
 mxResources.parse("testDownloadRtModel=Download RT model"),this.editorUi.actions.addAction("testShowRtModel",mxUtils.bind(this,function(){null!=this.editorUi.getCurrentFile()&&null!=this.editorUi.getCurrentFile().realtime&&(console.log("bytesUsed",this.editorUi.getCurrentFile().realtime.rtModel.bytesUsed),console.log("root",this.editorUi.getCurrentFile().realtime.dumpRoot()),this.editorUi.getCurrentFile().realtime.check())})),this.editorUi.actions.addAction("testDebugRtModel",mxUtils.bind(this,function(){gapi.drive.realtime.debug()})),
 this.editorUi.actions.addAction("testDownloadRtModel",mxUtils.bind(this,function(){var b=this.editorUi.getCurrentFile();null!=b&&null!=b.realtime&&a.spinner.spin(document.body,mxResources.get("export"))&&(b=new mxXmlRequest("https://www.googleapis.com/drive/v2/files/"+b.getHash().substring(1)+"/realtime",null,"GET"),b.setRequestHeaders=function(a){mxXmlRequest.prototype.setRequestHeaders.apply(this,arguments);var b=gapi.auth.getToken().access_token;a.setRequestHeader("authorization","Bearer "+b)},
 b.send(function(b){a.spinner.stop();200<=b.getStatus()&&299>=b.getStatus()&&a.saveLocalFile(b.getText(),"realtime.txt","text/plain")}))})),null!=this.editorUi.getCurrentFile()&&null!=this.editorUi.getCurrentFile().realtime&&this.addMenuItems(b,["-","testShowRtModel","testDebugRtModel","testDownloadRtModel"],c),mxResources.parse("testShowConsole=Show Console"),this.editorUi.actions.addAction("testShowConsole",function(){mxLog.isVisible()?mxLog.window.fit():mxLog.show();mxLog.window.div.style.zIndex=
 mxPopupMenu.prototype.zIndex-1}),this.addMenuItems(b,["-","testShowConsole"]))})));a.actions.addAction("shapes...",function(){mxClient.IS_CHROMEAPP||!a.isOffline()?a.showDialog((new MoreShapesDialog(a,!0)).container,640,isLocalStorage?mxClient.IS_IOS?480:460:440,!0,!0):a.showDialog((new MoreShapesDialog(a,!1)).container,360,isLocalStorage?mxClient.IS_IOS?300:280:260,!0,!0)});a.actions.addAction("createShape...",function(){a.getCurrentFile();if(d.isEnabled()){var b=new mxCell("",new mxGeometry(0,0,
-120,120),a.defaultCustomShapeStyle);b.vertex=!0;b=new EditShapeDialog(a,b,mxResources.get("editShape")+":",630,400);a.showDialog(b.container,640,480,!0,!1);b.init()}});a.actions.put("embedHtml",new Action(mxResources.get("html")+"...",function(){a.spinner.spin(document.body,mxResources.get("loading"))&&a.getPublicUrl(a.getCurrentFile(),function(b){a.spinner.stop();a.showHtmlDialog(mxResources.get("create"),"https://desk.draw.io/support/solutions/articles/16000042542",b,function(b,c,d,e,f,g,h,k,l,
-m){a.createHtml(b,c,d,e,f,g,h,k,l,m,mxUtils.bind(this,function(b,c){var d=new EmbedDialog(a,b+"\n"+c,null,null,function(){var a=window.open(),d=a.document;"CSS1Compat"===document.compatMode&&d.writeln("<!DOCTYPE html>");d.writeln("<html>");d.writeln("<head><title>"+encodeURIComponent(mxResources.get("preview"))+'</title><meta charset="utf-8"></head>');d.writeln("<body>");d.writeln(b);var e=mxClient.IS_IE||mxClient.IS_EDGE||null!=document.documentMode;e&&d.writeln(c);d.writeln("</body>");d.writeln("</html>");
+120,120),a.defaultCustomShapeStyle);b.vertex=!0;b=new EditShapeDialog(a,b,mxResources.get("editShape")+":",630,400);a.showDialog(b.container,640,480,!0,!1);b.init()}});a.actions.put("embedHtml",new Action(mxResources.get("html")+"...",function(){a.spinner.spin(document.body,mxResources.get("loading"))&&a.getPublicUrl(a.getCurrentFile(),function(b){a.spinner.stop();a.showHtmlDialog(mxResources.get("create"),"https://desk.draw.io/support/solutions/articles/16000042542",b,function(b,c,d,e,f,g,k,h,l,
+m){a.createHtml(b,c,d,e,f,g,k,h,l,m,mxUtils.bind(this,function(b,c){var d=new EmbedDialog(a,b+"\n"+c,null,null,function(){var a=window.open(),d=a.document;"CSS1Compat"===document.compatMode&&d.writeln("<!DOCTYPE html>");d.writeln("<html>");d.writeln("<head><title>"+encodeURIComponent(mxResources.get("preview"))+'</title><meta charset="utf-8"></head>');d.writeln("<body>");d.writeln(b);var e=mxClient.IS_IE||mxClient.IS_EDGE||null!=document.documentMode;e&&d.writeln(c);d.writeln("</body>");d.writeln("</html>");
 d.close();if(!e){var f=a.document.createElement("div");f.marginLeft="26px";f.marginTop="26px";mxUtils.write(f,mxResources.get("updatingDocument"));e=a.document.createElement("img");e.setAttribute("src",window.location.protocol+"//"+window.location.hostname+"/"+IMAGE_PATH+"/spin.gif");e.style.marginLeft="6px";f.appendChild(e);a.document.body.insertBefore(f,a.document.body.firstChild);window.setTimeout(function(){var a=document.createElement("script");a.type="text/javascript";a.src=/<script.*?src="(.*?)"/.exec(c)[1];
 d.body.appendChild(a);f.parentNode.removeChild(f)},20)}});a.showDialog(d.container,440,240,!0,!0);d.init()}))})})}));a.actions.put("liveImage",new Action("Live image...",function(){a.spinner.spin(document.body,mxResources.get("loading"))&&a.getPublicUrl(a.getCurrentFile(),function(b){a.spinner.stop();null!=b?(b=encodeURIComponent(b),b=new EmbedDialog(a,EXPORT_URL+"?format=png&url="+b,0),a.showDialog(b.container,440,240,!0,!0),b.init()):a.handleError({message:mxResources.get("invalidPublicUrl")})})}));
 a.actions.put("embedImage",new Action(mxResources.get("image")+"...",function(){a.showEmbedImageDialog(function(b,c,d,e,f,g){a.spinner.spin(document.body,mxResources.get("loading"))&&a.createEmbedImage(b,c,d,e,f,g,function(b){a.spinner.stop();b=new EmbedDialog(a,b);a.showDialog(b.container,440,240,!0,!0);b.init()},function(b){a.spinner.stop();a.handleError(b)})},mxResources.get("image"),mxResources.get("retina"),a.isExportToCanvas())}));a.actions.put("embedSvg",new Action(mxResources.get("formatSvg")+
 "...",function(){a.showEmbedImageDialog(function(b,c,d,e,f,g){a.spinner.spin(document.body,mxResources.get("loading"))&&a.createEmbedSvg(b,c,d,e,f,g,function(b){a.spinner.stop();b=new EmbedDialog(a,b);a.showDialog(b.container,440,240,!0,!0);b.init()},function(b){a.spinner.stop();a.handleError(b)})},mxResources.get("formatSvg"),mxResources.get("image"),!0,"https://desk.draw.io/support/solutions/articles/16000042548")}));a.actions.put("embedIframe",new Action(mxResources.get("iframe")+"...",function(){var b=
-d.getGraphBounds();a.showPublishLinkDialog(mxResources.get("iframe"),null,"100%",Math.ceil((b.y+b.height-d.view.translate.y)/d.view.scale)+2,function(b,c,d,e,f,g,h,k){a.spinner.spin(document.body,mxResources.get("loading"))&&a.getPublicUrl(a.getCurrentFile(),function(l){a.spinner.stop();l=new EmbedDialog(a,'<iframe frameborder="0" style="width:'+h+";height:"+k+';" src="'+a.createLink(b,c,d,e,f,g,l)+'"></iframe>');a.showDialog(l.container,440,240,!0,!0);l.init()})},!0)}));a.actions.put("publishLink",
-new Action(mxResources.get("link")+"...",function(){a.showPublishLinkDialog(null,null,null,null,function(b,c,d,e,f,g){a.spinner.spin(document.body,mxResources.get("loading"))&&a.getPublicUrl(a.getCurrentFile(),function(h){a.spinner.stop();h=new EmbedDialog(a,a.createLink(b,c,d,e,f,g,h));a.showDialog(h.container,440,240,!0,!0);h.init()})})}));a.actions.addAction("googleDocs...",function(){window.open("http://docsaddon.draw.io")});a.actions.addAction("googleSites...",function(){a.spinner.spin(document.body,
+d.getGraphBounds();a.showPublishLinkDialog(mxResources.get("iframe"),null,"100%",Math.ceil((b.y+b.height-d.view.translate.y)/d.view.scale)+2,function(b,c,d,e,f,g,k,h){a.spinner.spin(document.body,mxResources.get("loading"))&&a.getPublicUrl(a.getCurrentFile(),function(l){a.spinner.stop();l=new EmbedDialog(a,'<iframe frameborder="0" style="width:'+k+";height:"+h+';" src="'+a.createLink(b,c,d,e,f,g,l)+'"></iframe>');a.showDialog(l.container,440,240,!0,!0);l.init()})},!0)}));a.actions.put("publishLink",
+new Action(mxResources.get("link")+"...",function(){a.showPublishLinkDialog(null,null,null,null,function(b,c,d,e,f,g){a.spinner.spin(document.body,mxResources.get("loading"))&&a.getPublicUrl(a.getCurrentFile(),function(k){a.spinner.stop();k=new EmbedDialog(a,a.createLink(b,c,d,e,f,g,k));a.showDialog(k.container,440,240,!0,!0);k.init()})})}));a.actions.addAction("googleDocs...",function(){window.open("http://docsaddon.draw.io")});a.actions.addAction("googleSites...",function(){a.spinner.spin(document.body,
 mxResources.get("loading"))&&a.getPublicUrl(a.getCurrentFile(),function(b){a.spinner.stop();b=new GoogleSitesDialog(a,b);a.showDialog(b.container,420,256,!0,!0);b.init()})});if(isLocalStorage||mxClient.IS_CHROMEAPP)l=a.actions.addAction("scratchpad",function(){a.toggleScratchpad()}),l.setToggleAction(!0),l.setSelectedCallback(function(){return null!=a.scratchpad}),a.actions.addAction("plugins...",function(){a.showDialog((new PluginsDialog(a)).container,360,156,!0,!1)});l=a.actions.addAction("search",
 function(){var b=a.sidebar.isEntryVisible("search");a.sidebar.showPalette("search",!b);isLocalStorage&&(mxSettings.settings.search=!b,mxSettings.save())});l.setToggleAction(!0);l.setSelectedCallback(function(){return a.sidebar.isEntryVisible("search")});"1"==urlParams.embed&&(a.actions.get("save").funct=function(b){d.isEditing()&&d.stopEditing();var c="0"!=urlParams.pages||null!=a.pages&&1<a.pages.length?a.getFileData(!0):mxUtils.getXml(a.editor.getGraphXml());if("json"==urlParams.proto){var e=a.createLoadMessage("save");
 e.xml=c;b&&(e.exit=!0);c=JSON.stringify(e)}(window.opener||window.parent).postMessage(c,"*");"0"!=urlParams.modified&&"1"!=urlParams.keepmodified&&(a.editor.modified=!1,a.editor.setStatus(""));null!=a.getCurrentFile()&&a.saveFile()},a.actions.addAction("saveAndExit",function(){a.actions.get("save").funct(!0)}),a.actions.addAction("exit",function(){var b=function(){a.editor.modified=!1;var b="json"==urlParams.proto?JSON.stringify({event:"exit",modified:a.editor.modified}):"";(window.opener||window.parent).postMessage(b,
 "*")};a.editor.modified?a.confirm(mxResources.get("allChangesLost"),null,b,mxResources.get("cancel"),mxResources.get("discardChanges")):b()}));this.put("exportAs",new Menu(mxUtils.bind(this,function(b,c){a.isExportToCanvas()?(this.addMenuItems(b,["exportPng"],c),a.jpgSupported&&b.addItem(mxResources.get("formatJpg")+"...",null,mxUtils.bind(this,function(){a.showExportDialog(mxResources.get("image"),!1,mxResources.get("export"),"https://support.draw.io/display/DO/Exporting+Files",mxUtils.bind(this,
-function(a,b,c,d,e,f,g,h,k){a=parseInt(a);!isNaN(a)&&0<a&&this.editorUi.exportImage(a/100,!1,c,d,!1,g,!h,!1,"jpeg")}),!0,!1,"jpeg")}),c)):a.isOffline()||mxClient.IS_IOS&&navigator.standalone||(this.addMenuItems(b,["exportPng"],c),b.addItem(mxResources.get("formatJpg")+"...",null,mxUtils.bind(this,function(){a.showRemoteExportDialog(mxResources.get("export"),null,mxUtils.bind(this,function(b,c){a.downloadFile("jpeg",null,null,b)}),!0)}),c));this.addMenuItems(b,["exportSvg","-"],c);a.isOffline()||a.printPdfExport?
+function(a,b,c,d,e,f,g,k,h){a=parseInt(a);!isNaN(a)&&0<a&&this.editorUi.exportImage(a/100,!1,c,d,!1,g,!k,!1,"jpeg")}),!0,!1,"jpeg")}),c)):a.isOffline()||mxClient.IS_IOS&&navigator.standalone||(this.addMenuItems(b,["exportPng"],c),b.addItem(mxResources.get("formatJpg")+"...",null,mxUtils.bind(this,function(){a.showRemoteExportDialog(mxResources.get("export"),null,mxUtils.bind(this,function(b,c){a.downloadFile("jpeg",null,null,b)}),!0)}),c));this.addMenuItems(b,["exportSvg","-"],c);a.isOffline()||a.printPdfExport?
 this.addMenuItems(b,["exportPdf"],c):a.isOffline()||mxClient.IS_IOS&&navigator.standalone||this.addMenuItems(b,["exportPdf"],c);this.addMenuItems(b,["exportHtml"],c);mxClient.IS_IE11||mxClient.IS_IE||"undefined"===typeof VsdxExport&&a.isOffline()||this.addMenuItems(b,["exportVsdx"],c);this.addMenuItems(b,["-","exportXml"],c);(mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||/.*\.draw\.io$/.test(window.location.hostname))&&b.addItem(mxResources.get("url")+"...",null,mxUtils.bind(this,function(){a.showPublishLinkDialog(mxResources.get("url"),
 !0,null,null,function(b,c,d,e,f,g){b=new EmbedDialog(a,a.createLink(b,c,d,e,f,g,null,!0));a.showDialog(b.container,440,240,!0,!0);b.init()})}),c);a.isOffline()||(b.addSeparator(c),this.addMenuItem(b,"export",c).firstChild.nextSibling.innerHTML=mxResources.get("advanced")+"...")})));this.editorUi.actions.addAction("chatWindowTitle...",mxUtils.bind(this.editorUi,this.editorUi.toggleChat));this.put("importFrom",new Menu(function(b,c){function f(b){if(b&&Graph.fileSupport&&!mxClient.IS_IE&&!mxClient.IS_IE11){var c=
 document.createElement("input");c.setAttribute("type","file");mxEvent.addListener(c,"change",function(){null!=c.files&&a.importFiles(c.files,null,null,a.maxImageSize)});c.click()}else{window.openNew=!1;window.openKey="import";var e=Editor.useLocalStorage;Editor.useLocalStorage=!b;window.openFile=new OpenFile(function(b){a.hideDialog(b)});window.openFile.setConsumer(function(b,c){d.setSelectionCells(a.importXml(b))});a.showDialog((new OpenDialog(a)).container,360,220,!0,!0,function(){window.openFile=
 null});var f=a.dialog,g=f.close;a.dialog.close=function(b){Editor.useLocalStorage=e;g.apply(f,arguments);b&&null==a.getCurrentFile()&&"1"!=urlParams.embed&&a.showSplash()}}}function g(b){b.pickFile(function(c){a.spinner.spin(document.body,mxResources.get("loading"))&&b.getFile(c,function(b){var c=n(b.getTitle());/\.svg$/i.test(b.getTitle())&&!a.editor.isDataSvg(b.getData())&&(b.setData(a.createSvgDataUri(b.getData())),c="image/svg+xml");l(b.getData(),c,b.getTitle())},function(b){a.handleError(b,null!=
-b?mxResources.get("errorLoadingFile"):null)},b==a.drive)},!0)}var l=mxUtils.bind(this,function(b,c,e){var f=d.view,g=d.getGraphBounds(),h=d.snap(Math.ceil(Math.max(0,g.x/f.scale-f.translate.x)+4*d.gridSize)),k=d.snap(Math.ceil(Math.max(0,(g.y+g.height)/f.scale-f.translate.y)+4*d.gridSize));"data:image/"==b.substring(0,11)?a.loadImage(b,mxUtils.bind(this,function(f){var g=!0,l=mxUtils.bind(this,function(){a.resizeImage(f,b,mxUtils.bind(this,function(f,l,m){f=g?Math.min(1,Math.min(a.maxImageSize/l,
-a.maxImageSize/m)):1;a.importFile(b,c,h,k,Math.round(l*f),Math.round(m*f),e,function(b){a.spinner.stop();d.setSelectionCells(b);d.scrollCellToVisible(d.getSelectionCell())})}),g)});b.length>a.resampleThreshold?a.confirmImageResize(function(a){g=a;l()}):l()}),mxUtils.bind(this,function(){a.handleError({message:mxResources.get("cannotOpenFile")})})):a.importFile(b,c,h,k,0,0,e,function(b){a.spinner.stop();d.setSelectionCells(b);d.scrollCellToVisible(d.getSelectionCell())})}),n=mxUtils.bind(this,function(a){var b=
+b?mxResources.get("errorLoadingFile"):null)},b==a.drive)},!0)}var l=mxUtils.bind(this,function(b,c,e){var f=d.view,g=d.getGraphBounds(),k=d.snap(Math.ceil(Math.max(0,g.x/f.scale-f.translate.x)+4*d.gridSize)),h=d.snap(Math.ceil(Math.max(0,(g.y+g.height)/f.scale-f.translate.y)+4*d.gridSize));"data:image/"==b.substring(0,11)?a.loadImage(b,mxUtils.bind(this,function(f){var g=!0,l=mxUtils.bind(this,function(){a.resizeImage(f,b,mxUtils.bind(this,function(f,l,m){f=g?Math.min(1,Math.min(a.maxImageSize/l,
+a.maxImageSize/m)):1;a.importFile(b,c,k,h,Math.round(l*f),Math.round(m*f),e,function(b){a.spinner.stop();d.setSelectionCells(b);d.scrollCellToVisible(d.getSelectionCell())})}),g)});b.length>a.resampleThreshold?a.confirmImageResize(function(a){g=a;l()}):l()}),mxUtils.bind(this,function(){a.handleError({message:mxResources.get("cannotOpenFile")})})):a.importFile(b,c,k,h,0,0,e,function(b){a.spinner.stop();d.setSelectionCells(b);d.scrollCellToVisible(d.getSelectionCell())})}),n=mxUtils.bind(this,function(a){var b=
 "text/xml";/\.png$/i.test(a)?b="image/png":/\.jpe?g$/i.test(a)?b="image/jpg":/\.gif$/i.test(a)&&(b="image/gif");return b});"undefined"!=typeof google&&"undefined"!=typeof google.picker&&(null!=a.drive?b.addItem(mxResources.get("googleDrive")+"...",null,function(){g(a.drive)},c):k&&b.addItem(mxResources.get("googleDrive")+" ("+mxResources.get("loading")+"...)",null,function(){},c,null,!1));null!=a.gitHub&&b.addItem(mxResources.get("github")+"...",null,function(){g(a.gitHub)},c);null!=a.dropbox?b.addItem(mxResources.get("dropbox")+
 "...",null,function(){g(a.dropbox)},c):m&&b.addItem(mxResources.get("dropbox")+" ("+mxResources.get("loading")+"...)",null,function(){},c,null,!1);null!=a.oneDrive?b.addItem(mxResources.get("oneDrive")+"...",null,function(){g(a.oneDrive)},c):e&&b.addItem(mxResources.get("oneDrive")+" ("+mxResources.get("loading")+"...)",null,function(){},c,null,!1);null!=a.trello?b.addItem(mxResources.get("trello")+"...",null,function(){g(a.trello)},c):h&&b.addItem(mxResources.get("trello")+" ("+mxResources.get("loading")+
 "...)",null,function(){},c,null,!1);b.addSeparator(c);isLocalStorage&&"0"!=urlParams.browser&&b.addItem(mxResources.get("browser")+"...",null,function(){f(!1)},c);mxClient.IS_IOS||b.addItem(mxResources.get("device")+"...",null,function(){f(!0)},c);a.isOffline()||(b.addSeparator(c),b.addItem(mxResources.get("url")+"...",null,function(){var b=new FilenameDialog(a,"",mxResources.get("import"),function(b){if(null!=b&&0<b.length&&a.spinner.spin(document.body,mxResources.get("loading"))){var c=/(\.png)($|\?)/i.test(b)?
@@ -7054,9 +7056,9 @@ c,mxUtils.bind(this,function(c,d){"download"==d&&(d=App.MODE_GOOGLE);null!=c&&0<
 this.editorUi.getFileData(!0),null,d))}),mxUtils.bind(this,function(){a.hideDialog()}),mxResources.get("makeCopy"),mxResources.get("create"),null,null,null,null,!0),a.showDialog(c.container,420,380,!0,!0),c.init()):a.editor.editAsNew(a.getEditBlankXml(),c)}}));a.actions.addAction("moveToFolder...",mxUtils.bind(this,function(){var b=a.getCurrentFile();b.getMode()!=App.MODE_GOOGLE&&b.getMode()!=App.MODE_ONEDRIVE||a.pickFolder(b.getMode(),mxUtils.bind(this,function(c){a.spinner.spin(document.body,mxResources.get("moving"))&&
 b.move(c,mxUtils.bind(this,function(b){a.spinner.stop()}),mxUtils.bind(this,function(b){a.handleError(b)}))}))}));this.put("publish",new Menu(mxUtils.bind(this,function(a,b){this.addMenuItems(a,["publishLink"],b)})));a.actions.put("offline",new Action(mxResources.get("offline")+"...",function(){window.open("https://www.draw.io/app")}));a.actions.put("download",new Action(mxResources.get("download")+"...",function(){window.open("https://download.draw.io")}));this.editorUi.actions.addAction("share...",
 mxUtils.bind(this,function(){var a=this.editorUi.getCurrentFile();null!=a&&this.editorUi.drive.showPermissions(a.getId())}));this.put("embed",new Menu(mxUtils.bind(this,function(b,c){"1"==urlParams.test&&this.addMenuItems(b,["liveImage","-"],c);this.addMenuItems(b,["embedImage","embedSvg","-","embedHtml"],c);navigator.standalone||a.isOffline()||this.addMenuItems(b,["embedIframe"],c);a.isOffline()||this.addMenuItems(b,["-","googleSites","googleDocs"],c)})));var q="horizontalFlow verticalFlow - horizontalTree verticalTree - organic circle - fromText".split(" "),
-w=function(b,c,d,e){b.addItem(d,null,mxUtils.bind(this,function(){if("fromText"==e){var b=new ParseDialog(a,d);a.showDialog(b.container,620,420,!0,!1);a.dialog.container.style.overflow="auto"}else b=new CreateGraphDialog(a,d,e),a.showDialog(b.container,620,420,!0,!1);b.init()}),c)},y=function(a,b,c,e){var f=d.isMouseInsertPoint()?d.getInsertPoint():d.getFreeInsertPoint();a=new mxCell(a,new mxGeometry(f.x,f.y,b,c),e);a.vertex=!0;d.getModel().beginUpdate();try{a=d.addCell(a),d.fireEvent(new mxEventObject("cellsInserted",
+x=function(b,c,d,e){b.addItem(d,null,mxUtils.bind(this,function(){if("fromText"==e){var b=new ParseDialog(a,d);a.showDialog(b.container,620,420,!0,!1);a.dialog.container.style.overflow="auto"}else b=new CreateGraphDialog(a,d,e),a.showDialog(b.container,620,420,!0,!1);b.init()}),c)},y=function(a,b,c,e){var f=d.isMouseInsertPoint()?d.getInsertPoint():d.getFreeInsertPoint();a=new mxCell(a,new mxGeometry(f.x,f.y,b,c),e);a.vertex=!0;d.getModel().beginUpdate();try{a=d.addCell(a),d.fireEvent(new mxEventObject("cellsInserted",
 "cells",[a]))}finally{d.getModel().endUpdate()}d.setSelectionCell(a);d.scrollCellToVisible(a);return a};a.actions.addAction("insertText",function(){d.isEnabled()&&!d.isCellLocked(d.getDefaultParent())&&d.startEditingAtCell(y("Text",40,20,"text;html=1;resizable=0;autosize=1;align=left;verticalAlign=top;spacingTop=-4;points=[];"))},null,null,Editor.ctrlKey+"+Shift+X").isEnabled=g;a.actions.addAction("insertRectangle",function(){d.isEnabled()&&!d.isCellLocked(d.getDefaultParent())&&y("",120,60,"whiteSpace=wrap;html=1;")},
-null,null,Editor.ctrlKey+"+K").isEnabled=g;a.actions.addAction("insertEllipse",function(){d.isEnabled()&&!d.isCellLocked(d.getDefaultParent())&&y("",80,80,"ellipse;whiteSpace=wrap;html=1;")},null,null,Editor.ctrlKey+"+Shift+K").isEnabled=g;this.put("insert",new Menu(mxUtils.bind(this,function(a,b){this.addMenuItems(a,"insertText insertRectangle insertEllipse - insertLink insertImage".split(" "),b);a.addSeparator(b);for(var c=0;c<q.length;c++)"-"==q[c]?a.addSeparator(b):w(a,b,mxResources.get(q[c])+
+null,null,Editor.ctrlKey+"+K").isEnabled=g;a.actions.addAction("insertEllipse",function(){d.isEnabled()&&!d.isCellLocked(d.getDefaultParent())&&y("",80,80,"ellipse;whiteSpace=wrap;html=1;")},null,null,Editor.ctrlKey+"+Shift+K").isEnabled=g;this.put("insert",new Menu(mxUtils.bind(this,function(a,b){this.addMenuItems(a,"insertText insertRectangle insertEllipse - insertLink insertImage".split(" "),b);a.addSeparator(b);for(var c=0;c<q.length;c++)"-"==q[c]?a.addSeparator(b):x(a,b,mxResources.get(q[c])+
 "...",q[c])})));this.put("openRecent",new Menu(function(b,c){var d=a.getRecent();if(null!=d){for(var e=0;e<d.length;e++)(function(d){var e=d.mode;e==App.MODE_GOOGLE?e="googleDrive":e==App.MODE_ONEDRIVE&&(e="oneDrive");b.addItem(d.title+" ("+mxResources.get(e)+")",null,function(){a.loadFile(d.id)},c)})(d[e]);b.addSeparator(c)}b.addItem(mxResources.get("reset"),null,function(){a.resetRecent()},c)}));this.put("openFrom",new Menu(function(b,c){null!=a.drive?b.addItem(mxResources.get("googleDrive")+"...",
 null,function(){a.pickFile(App.MODE_GOOGLE)},c):k&&b.addItem(mxResources.get("googleDrive")+" ("+mxResources.get("loading")+"...)",null,function(){},c,null,!1);null!=a.gitHub&&b.addItem(mxResources.get("github")+"...",null,function(){a.pickFile(App.MODE_GITHUB)},c);null!=a.dropbox?b.addItem(mxResources.get("dropbox")+"...",null,function(){a.pickFile(App.MODE_DROPBOX)},c):m&&b.addItem(mxResources.get("dropbox")+" ("+mxResources.get("loading")+"...)",null,function(){},c,null,!1);null!=a.oneDrive?b.addItem(mxResources.get("oneDrive")+
 "...",null,function(){a.pickFile(App.MODE_ONEDRIVE)},c):e&&b.addItem(mxResources.get("oneDrive")+" ("+mxResources.get("loading")+"...)",null,function(){},c,null,!1);null!=a.trello?b.addItem(mxResources.get("trello")+"...",null,function(){a.pickFile(App.MODE_TRELLO)},c):h&&b.addItem(mxResources.get("trello")+" ("+mxResources.get("loading")+"...)",null,function(){},c,null,!1);b.addSeparator(c);isLocalStorage&&"0"!=urlParams.browser&&b.addItem(mxResources.get("browser")+"...",null,function(){a.pickFile(App.MODE_BROWSER)},
@@ -7122,40 +7124,40 @@ EditorUi.prototype.addTabListeners=function(a,b){mxEvent.disableContextMenu(b);v
 this.hideCurrentMenu();if(!mxEvent.isTouchEvent(g)||!c){var k=new mxPopupMenu(this.createPageMenu(a));k.div.className+=" geMenubarMenu";k.smartSeparators=!0;k.showDisabled=!0;k.autoExpand=!0;k.hideMenu=mxUtils.bind(this,function(){mxPopupMenu.prototype.hideMenu.apply(k,arguments);this.resetCurrentMenu();k.destroy()});var m=mxEvent.getClientX(g),e=mxEvent.getClientY(g);k.popup(m,e,null,g);this.setCurrentMenu(k,b)}mxEvent.consume(g)}}))};
 EditorUi.prototype.createPageMenu=function(a,b){return mxUtils.bind(this,function(d,c){d.addItem(mxResources.get("insert"),null,mxUtils.bind(this,function(){this.insertPage(null,mxUtils.indexOf(this.pages,a)+1)}),c);d.addItem(mxResources.get("delete"),null,mxUtils.bind(this,function(){this.removePage(a)}),c);d.addItem(mxResources.get("rename"),null,mxUtils.bind(this,function(){this.renamePage(a,b)}),c);d.addSeparator(c);d.addItem(mxResources.get("duplicate"),null,mxUtils.bind(this,function(){this.duplicatePage(a,
 mxResources.get("copyOf",[a.getName()]))}),c)})};(function(){var a=mxClient.IS_SVG?"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADQAAAA0CAMAAADypuvZAAAAhFBMVEUAAAD///8KCgpNTU24uLgBAQEBAQEMDAxFRUWEhIQBAQEBAQEBAQEAAAAVFRXAwMBYWFgBAQEBAQEAAAAAAAAAAAAAAAAAAAABAQEBAQEAAAAAAAAAAAABAQEBAQEAAAAAAAASEhLAwMC+vr4BAQEBAQEAAAAAAAAAAAABAQEAAAD///+vipwtAAAAKnRSTlMA/Prw9f7A+fHq1uvFOfPv7+TOmkUyCwb3kT9UT+yPLAL49PTbkmloKvYw/P7BAAABe0lEQVRIx52W63LCIBBGwRhUkFxNYtTEa9Xi+79fR9KxrgtY9/xjMmcIH5ddhmmqSylk3nW5FOWlath7dCsNQLY6bOzWwjgQ64CzmhsPYuVR6jY2XuK2djnbwgQptthZKPMGtXh1NkvzluXmZR7geC0w17YziNHIILrrU26FwzkeHVbxl+GXwxnfbmOH1T72NHY6Tiv+3eXd3Ol4rPnOSmv0YWIda03QxyF3NNE+5XxwOE/3aCp7F9CKkiyacevMoixBq9JDdJjpIE2NcQbYnIyDaJAi4+DUsCqGGSRYSmAaccXOMOs0w1KWwuTPrIT7w6dwTcMA7lfJBHDugd2x6T0NgCWYfDkH3GKdpwGwJMuB4wFaOVOP3A63IIdHhookkX6PFAQpctLmko4R6cCSrgbtEjJtCNed8LAQnjDSY0l4ljWhAPT0UmO5/rOoqSulfH5eqL83lJaA1nxg6j7U5vS1r6ESgYbKj7d1C6N7Cf9L9joogHZUKW87+gMYYTZWVGas2QAAAABJRU5ErkJggg==":
-IMAGE_PATH+"/move.png",b=Graph.prototype.foldCells;Graph.prototype.foldCells=function(a,c,d,m,e){c=null!=c?c:!1;null==d&&(d=this.getFoldableCells(this.getSelectionCells(),a));this.stopEditing();this.model.beginUpdate();try{for(var f=d.slice(),g=[],k=0;k<d.length;k++){var p=this.view.getState(d[k]),t=null!=p?p.style:this.getCellStyle(d[k]);"1"==mxUtils.getValue(t,"treeFolding","0")&&(this.traverse(d[k],!0,mxUtils.bind(this,function(a,b){null!=b&&g.push(b);a!=d[k]&&g.push(a);return a==d[k]||!this.model.isCollapsed(a)})),
-this.model.setCollapsed(d[k],a))}for(k=0;k<g.length;k++)this.model.setVisible(g[k],!a);d=f;d=b.apply(this,arguments)}finally{this.model.endUpdate()}return d};var d=EditorUi.prototype.init;EditorUi.prototype.init=function(){d.apply(this,arguments);this.editor.chromeless||this.addTrees()};EditorUi.prototype.addTrees=function(){function b(a){return w.isVertex(a)&&c(a)}function c(a){var b=!1;null!=a&&(a=w.getParent(a),b=q.view.getState(a),q.view.getState(a),b="tree"==(null!=b?b.style:q.getCellStyle(a)).containerType);
-return b}function d(a){var b=!1;null!=a&&(a=w.getParent(a),b=q.view.getState(a),q.view.getState(a),b=null!=(null!=b?b.style:q.getCellStyle(a)).childLayout);return b}function m(a){a=q.view.getState(a);if(null!=a){var b=q.getIncomingEdges(a.cell);if(0<b.length&&(b=q.view.getState(b[0]),null!=b&&(b=b.absolutePoints,null!=b&&0<b.length&&(b=b[b.length-1],null!=b)))){if(b.y==a.y&&Math.abs(b.x-a.getCenterX())<a.width/2)return mxConstants.DIRECTION_SOUTH;if(b.y==a.y+a.height&&Math.abs(b.x-a.getCenterX())<
+IMAGE_PATH+"/move.png",b=Graph.prototype.foldCells;Graph.prototype.foldCells=function(a,c,d,m,e){c=null!=c?c:!1;null==d&&(d=this.getFoldableCells(this.getSelectionCells(),a));this.stopEditing();this.model.beginUpdate();try{for(var f=d.slice(),g=[],k=0;k<d.length;k++){var p=this.view.getState(d[k]),u=null!=p?p.style:this.getCellStyle(d[k]);"1"==mxUtils.getValue(u,"treeFolding","0")&&(this.traverse(d[k],!0,mxUtils.bind(this,function(a,b){null!=b&&g.push(b);a!=d[k]&&g.push(a);return a==d[k]||!this.model.isCollapsed(a)})),
+this.model.setCollapsed(d[k],a))}for(k=0;k<g.length;k++)this.model.setVisible(g[k],!a);d=f;d=b.apply(this,arguments)}finally{this.model.endUpdate()}return d};var d=EditorUi.prototype.init;EditorUi.prototype.init=function(){d.apply(this,arguments);this.editor.chromeless||this.addTrees()};EditorUi.prototype.addTrees=function(){function b(a){return x.isVertex(a)&&c(a)}function c(a){var b=!1;null!=a&&(a=x.getParent(a),b=q.view.getState(a),q.view.getState(a),b="tree"==(null!=b?b.style:q.getCellStyle(a)).containerType);
+return b}function d(a){var b=!1;null!=a&&(a=x.getParent(a),b=q.view.getState(a),q.view.getState(a),b=null!=(null!=b?b.style:q.getCellStyle(a)).childLayout);return b}function m(a){a=q.view.getState(a);if(null!=a){var b=q.getIncomingEdges(a.cell);if(0<b.length&&(b=q.view.getState(b[0]),null!=b&&(b=b.absolutePoints,null!=b&&0<b.length&&(b=b[b.length-1],null!=b)))){if(b.y==a.y&&Math.abs(b.x-a.getCenterX())<a.width/2)return mxConstants.DIRECTION_SOUTH;if(b.y==a.y+a.height&&Math.abs(b.x-a.getCenterX())<
 a.width/2)return mxConstants.DIRECTION_NORTH;if(b.x>a.getCenterX())return mxConstants.DIRECTION_WEST}}return mxConstants.DIRECTION_EAST}function e(a,b){b=null!=b?b:!0;q.model.beginUpdate();try{var c=q.model.getParent(a),d=q.getIncomingEdges(a),e=q.cloneCells([d[0],a]);q.model.setTerminal(e[0],q.model.getTerminal(d[0],!0),!0);var f=m(a),g=c.geometry;f==mxConstants.DIRECTION_SOUTH||f==mxConstants.DIRECTION_NORTH?e[1].geometry.x+=b?a.geometry.width+10:-e[1].geometry.width-10:e[1].geometry.y+=b?a.geometry.height+
-10:-e[1].geometry.height-10;f==mxConstants.DIRECTION_WEST&&(e[1].geometry.x=a.geometry.x+a.geometry.width-e[1].geometry.width);q.view.currentRoot!=c&&(e[1].geometry.x-=g.x,e[1].geometry.y-=g.y);var h=q.view.getState(a),k=q.view.scale;if(null!=h){var l=mxRectangle.fromRectangle(h);f==mxConstants.DIRECTION_SOUTH||f==mxConstants.DIRECTION_NORTH?l.x+=(b?a.geometry.width+10:-e[1].geometry.width-10)*k:l.y+=(b?a.geometry.height+10:-e[1].geometry.height-10)*k;var n=q.getOutgoingEdges(q.model.getTerminal(d[0],
-!0));if(null!=n){for(var p=f==mxConstants.DIRECTION_SOUTH||f==mxConstants.DIRECTION_NORTH,C=g=d=0;C<n.length;C++){var u=q.model.getTerminal(n[C],!1);if(f==m(u)){var t=q.view.getState(u);u!=a&&null!=t&&(p&&b!=t.getCenterX()<h.getCenterX()||!p&&b!=t.getCenterY()<h.getCenterY())&&mxUtils.intersects(l,t)&&(d=10+Math.max(d,(Math.min(l.x+l.width,t.x+t.width)-Math.max(l.x,t.x))/k),g=10+Math.max(g,(Math.min(l.y+l.height,t.y+t.height)-Math.max(l.y,t.y))/k))}}p?g=0:d=0;for(C=0;C<n.length;C++)if(u=q.model.getTerminal(n[C],
-!1),f==m(u)&&(t=q.view.getState(u),u!=a&&null!=t&&(p&&b!=t.getCenterX()<h.getCenterX()||!p&&b!=t.getCenterY()<h.getCenterY()))){var v=[];q.traverse(t.cell,!0,function(a,b){null!=b&&v.push(b);v.push(a);return!0});q.moveCells(v,(b?1:-1)*d,(b?1:-1)*g)}}}return q.addCells(e,c)}finally{q.model.endUpdate()}}function h(a){q.model.beginUpdate();try{var b=m(a),c=q.getIncomingEdges(a),d=q.cloneCells([c[0],a]);q.model.setTerminal(c[0],d[1],!1);q.model.setTerminal(d[0],d[1],!0);q.model.setTerminal(d[0],a,!1);
-var e=q.model.getParent(a),f=e.geometry,g=[];q.view.currentRoot!=e&&(d[1].geometry.x-=f.x,d[1].geometry.y-=f.y);q.traverse(a,!0,function(a,b){null!=b&&g.push(b);g.push(a);return!0});var h=a.geometry.width+40,k=a.geometry.height+40;b==mxConstants.DIRECTION_SOUTH?h=0:b==mxConstants.DIRECTION_NORTH?(h=0,k=-40):b==mxConstants.DIRECTION_WEST?(h=-40,k=0):b==mxConstants.DIRECTION_EAST&&(k=0);q.moveCells(g,h,k);return q.addCells(d,e)}finally{q.model.endUpdate()}}function l(a){q.model.beginUpdate();try{var b=
-q.model.getParent(a),c=q.getIncomingEdges(a),d=q.cloneCells([c[0],a]);q.model.setTerminal(d[0],a,!0);var c=q.getOutgoingEdges(a),e=b.geometry,f=[];q.view.currentRoot==b&&(e=new mxRectangle);for(var g=0;g<c.length;g++){var h=q.model.getTerminal(c[g],!1);null!=h&&f.push(h)}var k=q.view.getBounds(f),l=m(a),n=q.view.translate,p=q.view.scale;l==mxConstants.DIRECTION_SOUTH?(d[1].geometry.x=null==k?a.geometry.x+(a.geometry.width-d[1].geometry.width)/2:(k.x+k.width)/p-n.x-e.x+10,d[1].geometry.y+=a.geometry.height-
-e.y+40):l==mxConstants.DIRECTION_NORTH?(d[1].geometry.x=null==k?a.geometry.x+(a.geometry.width-d[1].geometry.width)/2:(k.x+k.width)/p-n.x+-e.x+10,d[1].geometry.y-=d[1].geometry.height-e.y+40):(d[1].geometry.x=l==mxConstants.DIRECTION_WEST?d[1].geometry.x-(d[1].geometry.width-e.x+40):d[1].geometry.x+(a.geometry.width-e.x+40),d[1].geometry.y=null==k?a.geometry.y+(a.geometry.height-d[1].geometry.height)/2:(k.y+k.height)/p-n.y+-e.y+10);return q.addCells(d,b)}finally{q.model.endUpdate()}}function n(a,
+10:-e[1].geometry.height-10;f==mxConstants.DIRECTION_WEST&&(e[1].geometry.x=a.geometry.x+a.geometry.width-e[1].geometry.width);q.view.currentRoot!=c&&(e[1].geometry.x-=g.x,e[1].geometry.y-=g.y);var k=q.view.getState(a),h=q.view.scale;if(null!=k){var l=mxRectangle.fromRectangle(k);f==mxConstants.DIRECTION_SOUTH||f==mxConstants.DIRECTION_NORTH?l.x+=(b?a.geometry.width+10:-e[1].geometry.width-10)*h:l.y+=(b?a.geometry.height+10:-e[1].geometry.height-10)*h;var n=q.getOutgoingEdges(q.model.getTerminal(d[0],
+!0));if(null!=n){for(var p=f==mxConstants.DIRECTION_SOUTH||f==mxConstants.DIRECTION_NORTH,D=g=d=0;D<n.length;D++){var u=q.model.getTerminal(n[D],!1);if(f==m(u)){var t=q.view.getState(u);u!=a&&null!=t&&(p&&b!=t.getCenterX()<k.getCenterX()||!p&&b!=t.getCenterY()<k.getCenterY())&&mxUtils.intersects(l,t)&&(d=10+Math.max(d,(Math.min(l.x+l.width,t.x+t.width)-Math.max(l.x,t.x))/h),g=10+Math.max(g,(Math.min(l.y+l.height,t.y+t.height)-Math.max(l.y,t.y))/h))}}p?g=0:d=0;for(D=0;D<n.length;D++)if(u=q.model.getTerminal(n[D],
+!1),f==m(u)&&(t=q.view.getState(u),u!=a&&null!=t&&(p&&b!=t.getCenterX()<k.getCenterX()||!p&&b!=t.getCenterY()<k.getCenterY()))){var v=[];q.traverse(t.cell,!0,function(a,b){null!=b&&v.push(b);v.push(a);return!0});q.moveCells(v,(b?1:-1)*d,(b?1:-1)*g)}}}return q.addCells(e,c)}finally{q.model.endUpdate()}}function h(a){q.model.beginUpdate();try{var b=m(a),c=q.getIncomingEdges(a),d=q.cloneCells([c[0],a]);q.model.setTerminal(c[0],d[1],!1);q.model.setTerminal(d[0],d[1],!0);q.model.setTerminal(d[0],a,!1);
+var e=q.model.getParent(a),f=e.geometry,g=[];q.view.currentRoot!=e&&(d[1].geometry.x-=f.x,d[1].geometry.y-=f.y);q.traverse(a,!0,function(a,b){null!=b&&g.push(b);g.push(a);return!0});var k=a.geometry.width+40,h=a.geometry.height+40;b==mxConstants.DIRECTION_SOUTH?k=0:b==mxConstants.DIRECTION_NORTH?(k=0,h=-40):b==mxConstants.DIRECTION_WEST?(k=-40,h=0):b==mxConstants.DIRECTION_EAST&&(h=0);q.moveCells(g,k,h);return q.addCells(d,e)}finally{q.model.endUpdate()}}function l(a){q.model.beginUpdate();try{var b=
+q.model.getParent(a),c=q.getIncomingEdges(a),d=q.cloneCells([c[0],a]);q.model.setTerminal(d[0],a,!0);var c=q.getOutgoingEdges(a),e=b.geometry,f=[];q.view.currentRoot==b&&(e=new mxRectangle);for(var g=0;g<c.length;g++){var k=q.model.getTerminal(c[g],!1);null!=k&&f.push(k)}var h=q.view.getBounds(f),l=m(a),n=q.view.translate,p=q.view.scale;l==mxConstants.DIRECTION_SOUTH?(d[1].geometry.x=null==h?a.geometry.x+(a.geometry.width-d[1].geometry.width)/2:(h.x+h.width)/p-n.x-e.x+10,d[1].geometry.y+=a.geometry.height-
+e.y+40):l==mxConstants.DIRECTION_NORTH?(d[1].geometry.x=null==h?a.geometry.x+(a.geometry.width-d[1].geometry.width)/2:(h.x+h.width)/p-n.x+-e.x+10,d[1].geometry.y-=d[1].geometry.height-e.y+40):(d[1].geometry.x=l==mxConstants.DIRECTION_WEST?d[1].geometry.x-(d[1].geometry.width-e.x+40):d[1].geometry.x+(a.geometry.width-e.x+40),d[1].geometry.y=null==h?a.geometry.y+(a.geometry.height-d[1].geometry.height)/2:(h.y+h.height)/p-n.y+-e.y+10);return q.addCells(d,b)}finally{q.model.endUpdate()}}function n(a,
 b,c){a=q.getOutgoingEdges(a);c=q.view.getState(c);var d=[];if(null!=c&&null!=a){for(var e=0;e<a.length;e++){var f=q.view.getState(q.model.getTerminal(a[e],!1));null!=f&&(!b&&Math.min(f.x+f.width,c.x+c.width)>=Math.max(f.x,c.x)||b&&Math.min(f.y+f.height,c.y+c.height)>=Math.max(f.y,c.y))&&d.push(f)}d.sort(function(a,c){return b?a.x+a.width-c.x-c.width:a.y+a.height-c.y-c.height})}return d}function p(a,b){var c=m(a),d=b==mxConstants.DIRECTION_EAST||b==mxConstants.DIRECTION_WEST;(c==mxConstants.DIRECTION_EAST||
-c==mxConstants.DIRECTION_WEST)==d&&c!=b?u.actions.get("selectParent").funct():c==b?(d=q.getOutgoingEdges(a),null!=d&&0<d.length&&q.setSelectionCell(q.model.getTerminal(d[0],!1))):(c=q.getIncomingEdges(a),null!=c&&0<c.length&&(d=n(q.model.getTerminal(c[0],!0),d,a),c=q.view.getState(a),null!=c&&(c=mxUtils.indexOf(d,c),0<=c&&(c+=b==mxConstants.DIRECTION_NORTH||b==mxConstants.DIRECTION_WEST?-1:1,0<=c&&c<=d.length-1&&q.setSelectionCell(d[c].cell)))))}function t(b){this.images=[];var c=b.view.graph,d=mxUtils.createImage(a);
-d.setAttribute("title","Move Cell without Subtree");d.style.position="absolute";d.style.cursor="pointer";d.style.width="26px";d.style.height="26px";d.style.left=b.getCenterX()-13+"px";d.style.top=b.getCenterY()-13+"px";mxEvent.addGestureListeners(d,mxUtils.bind(this,function(a){c.stopEditing(!1);u.hoverIcons.reset();c.isCellSelected(b.cell)||c.setSelectionCell(b.cell);c.graphHandler.start(b.cell,mxEvent.getClientX(a),mxEvent.getClientY(a));c.graphHandler.cells=[b.cell];c.graphHandler.bounds=c.graphHandler.graph.getView().getBounds(c.graphHandler.cells);
-c.graphHandler.pBounds=c.graphHandler.getPreviewBounds(c.graphHandler.cells);c.graphHandler.cellWasClicked=!0;c.isMouseDown=!0;c.isMouseTrigger=mxEvent.isMouseEvent(a);mxEvent.consume(a);mxEvent.consume(a);this.destroy()}));b.view.graph.container.appendChild(d);this.images.push(d)}var u=this,q=u.editor.graph,w=q.getModel();mxResources.parse("selectChildren=Select Children");mxResources.parse("selectSiblings=Select Siblings");mxResources.parse("selectSubtree=Select Subtree");mxResources.parse("selectParent=Select Parent");
-var y=u.menus.createPopupMenu;u.menus.createPopupMenu=function(a,c,d){y.apply(this,arguments);if(b(q.getSelectionCell())&&1==q.getSelectionCount()){c=q.getSelectionCell();var e=q.getOutgoingEdges(c);a.addSeparator();null!=e&&0<e.length&&this.addMenuItems(a,["selectChildren","selectSubtree"],null,d);a.addSeparator();0<q.getIncomingEdges(c).length&&this.addMenuItems(a,["selectSiblings","selectParent"],null,d)}};u.actions.addAction("selectChildren",function(){if(q.isEnabled()&&1==q.getSelectionCount()){var a=
-q.getSelectionCell(),a=q.getOutgoingEdges(a);if(null!=a){for(var b=[],c=0;c<a.length;c++)b.push(q.model.getTerminal(a[c],!1));q.setSelectionCells(b)}}},null,null,"Alt+Shift+X");u.actions.addAction("selectSiblings",function(){if(q.isEnabled()&&1==q.getSelectionCount()){var a=q.getSelectionCell(),a=q.getIncomingEdges(a);if(null!=a&&0<a.length&&(a=q.getOutgoingEdges(q.model.getTerminal(a[0],!0)),null!=a)){for(var b=[],c=0;c<a.length;c++)b.push(q.model.getTerminal(a[c],!1));q.setSelectionCells(b)}}},
-null,null,"Alt+Shift+S");u.actions.addAction("selectParent",function(){if(q.isEnabled()&&1==q.getSelectionCount()){var a=q.getSelectionCell(),a=q.getIncomingEdges(a);null!=a&&0<a.length&&q.setSelectionCell(q.model.getTerminal(a[0],!0))}},null,null,"Alt+Shift+P");u.actions.addAction("selectSubtree",function(){if(q.isEnabled()&&1==q.getSelectionCount()){var a=q.getSelectionCell(),b=[];q.traverse(a,!0,function(a,c){null!=c&&b.push(c);b.push(a);return!0});q.setSelectionCells(b)}},null,null,"Alt+Shift+T");
-var x=q.removeCells;q.removeCells=function(a,d){d=null!=d?d:!0;null==a&&(a=this.getDeletableCells(this.getSelectionCells()));d&&(a=this.getDeletableCells(this.addAllEdges(a)));for(var e=[],f=0;f<a.length;f++){var g=a[f];w.isEdge(g)&&c(g)&&(e.push(g),g=w.getTerminal(g,!1));b(g)?(q.traverse(g,!0,function(a,b){null!=b&&e.push(b);e.push(a);return!0}),g=q.getIncomingEdges(a[f]),a=a.concat(g)):e.push(a[f])}a=e;return x.apply(this,arguments)};u.hoverIcons.getStateAt=function(a,c,d){return b(a.cell)?null:
-this.graph.view.getState(this.graph.getCellAt(c,d))};var v=q.duplicateCells;q.duplicateCells=function(a,c){a=null!=a?a:this.getSelectionCells();for(var d=a.slice(0),e=0;e<d.length;e++){var f=q.view.getState(d[e]);if(null!=f&&b(f.cell))for(var g=q.getIncomingEdges(f.cell),f=0;f<g.length;f++)mxUtils.remove(g[f],a)}this.model.beginUpdate();try{var h=v.call(this,a,c);if(h.length==a.length)for(e=0;e<a.length;e++)if(b(a[e])){var k=q.getIncomingEdges(h[e]),g=q.getIncomingEdges(a[e]);if(0==k.length&&0<g.length){var l=
-this.cloneCells([g[0]])[0];this.addEdge(l,q.getDefaultParent(),this.model.getTerminal(g[0],!0),h[e])}}}finally{this.model.endUpdate()}return h};var D=q.moveCells;q.moveCells=function(a,c,d,e,f,g,h){var k=null;this.model.beginUpdate();try{var l=f,m=this.view.getState(f),n=null!=m?m.style:this.getCellStyle(f);if(null!=a&&b(f)&&"1"==mxUtils.getValue(n,"treeFolding","0")){for(var p=0;p<a.length;p++)if(b(a[p])||q.model.isEdge(a[p])&&null==q.model.getTerminal(a[p],!0)){f=q.model.getParent(a[p]);break}if(null!=
-l&&f!=l&&null!=this.view.getState(a[0])){var t=q.getIncomingEdges(a[0]);if(0<t.length){var u=q.view.getState(q.model.getTerminal(t[0],!0));if(null!=u){var v=q.view.getState(l);null!=v&&(c=(v.getCenterX()-u.getCenterX())/q.view.scale,d=(v.getCenterY()-u.getCenterY())/q.view.scale)}}}}k=D.apply(this,arguments);if(null!=k&&null!=a&&k.length==a.length)for(p=0;p<k.length;p++)if(this.model.isEdge(k[p]))b(l)&&0>mxUtils.indexOf(k,this.model.getTerminal(k[p],!0))&&this.model.setTerminal(k[p],l,!0);else if(b(a[p])&&
-(t=q.getIncomingEdges(a[p]),0<t.length))if(!e)b(l)&&0>mxUtils.indexOf(a,this.model.getTerminal(t[0],!0))&&this.model.setTerminal(t[0],l,!0);else if(0==q.getIncomingEdges(k[p]).length){m=l;if(null==m||m==q.model.getParent(a[p]))m=q.model.getTerminal(t[0],!0);e=this.cloneCells([t[0]])[0];this.addEdge(e,q.getDefaultParent(),m,k[p])}}finally{this.model.endUpdate()}return k};var B=u.sidebar.dropAndConnect;u.sidebar.dropAndConnect=function(a,c,d,e){var f=q.model,g=null;f.beginUpdate();try{if(g=B.apply(this,
-arguments),b(a))for(var h=0;h<g.length;h++)if(f.isEdge(g[h])&&null==f.getTerminal(g[h],!0)){f.setTerminal(g[h],a,!0);var k=q.getCellGeometry(g[h]);k.points=null;null!=k.getTerminalPoint(!0)&&k.setTerminalPoint(null,!0)}}finally{f.endUpdate()}return g};var A={88:u.actions.get("selectChildren"),84:u.actions.get("selectSubtree"),80:u.actions.get("selectParent"),83:u.actions.get("selectSiblings")},G=u.onKeyDown;u.onKeyDown=function(a){try{if(q.isEnabled()&&!q.isEditing()&&b(q.getSelectionCell())&&1==
-q.getSelectionCount()){var c=null;0<q.getIncomingEdges(q.getSelectionCell()).length&&(9==a.which?c=mxEvent.isShiftDown(a)?h(q.getSelectionCell()):l(q.getSelectionCell()):13==a.which&&(c=e(q.getSelectionCell(),!mxEvent.isShiftDown(a))));if(null!=c&&0<c.length)1==c.length&&q.model.isEdge(c[0])?q.setSelectionCell(q.model.getTerminal(c[0],!1)):q.setSelectionCell(c[c.length-1]),null!=u.hoverIcons&&u.hoverIcons.update(q.view.getState(q.getSelectionCell())),q.startEditingAtCell(q.getSelectionCell()),mxEvent.consume(a);
+c==mxConstants.DIRECTION_WEST)==d&&c!=b?t.actions.get("selectParent").funct():c==b?(d=q.getOutgoingEdges(a),null!=d&&0<d.length&&q.setSelectionCell(q.model.getTerminal(d[0],!1))):(c=q.getIncomingEdges(a),null!=c&&0<c.length&&(d=n(q.model.getTerminal(c[0],!0),d,a),c=q.view.getState(a),null!=c&&(c=mxUtils.indexOf(d,c),0<=c&&(c+=b==mxConstants.DIRECTION_NORTH||b==mxConstants.DIRECTION_WEST?-1:1,0<=c&&c<=d.length-1&&q.setSelectionCell(d[c].cell)))))}function u(b){this.images=[];var c=b.view.graph,d=mxUtils.createImage(a);
+d.setAttribute("title","Move Cell without Subtree");d.style.position="absolute";d.style.cursor="pointer";d.style.width="26px";d.style.height="26px";d.style.left=b.getCenterX()-13+"px";d.style.top=b.getCenterY()-13+"px";mxEvent.addGestureListeners(d,mxUtils.bind(this,function(a){c.stopEditing(!1);t.hoverIcons.reset();c.isCellSelected(b.cell)||c.setSelectionCell(b.cell);c.graphHandler.start(b.cell,mxEvent.getClientX(a),mxEvent.getClientY(a));c.graphHandler.cells=[b.cell];c.graphHandler.bounds=c.graphHandler.graph.getView().getBounds(c.graphHandler.cells);
+c.graphHandler.pBounds=c.graphHandler.getPreviewBounds(c.graphHandler.cells);c.graphHandler.cellWasClicked=!0;c.isMouseDown=!0;c.isMouseTrigger=mxEvent.isMouseEvent(a);mxEvent.consume(a);mxEvent.consume(a);this.destroy()}));b.view.graph.container.appendChild(d);this.images.push(d)}var t=this,q=t.editor.graph,x=q.getModel();mxResources.parse("selectChildren=Select Children");mxResources.parse("selectSiblings=Select Siblings");mxResources.parse("selectSubtree=Select Subtree");mxResources.parse("selectParent=Select Parent");
+var y=t.menus.createPopupMenu;t.menus.createPopupMenu=function(a,c,d){y.apply(this,arguments);if(b(q.getSelectionCell())&&1==q.getSelectionCount()){c=q.getSelectionCell();var e=q.getOutgoingEdges(c);a.addSeparator();null!=e&&0<e.length&&this.addMenuItems(a,["selectChildren","selectSubtree"],null,d);a.addSeparator();0<q.getIncomingEdges(c).length&&this.addMenuItems(a,["selectSiblings","selectParent"],null,d)}};t.actions.addAction("selectChildren",function(){if(q.isEnabled()&&1==q.getSelectionCount()){var a=
+q.getSelectionCell(),a=q.getOutgoingEdges(a);if(null!=a){for(var b=[],c=0;c<a.length;c++)b.push(q.model.getTerminal(a[c],!1));q.setSelectionCells(b)}}},null,null,"Alt+Shift+X");t.actions.addAction("selectSiblings",function(){if(q.isEnabled()&&1==q.getSelectionCount()){var a=q.getSelectionCell(),a=q.getIncomingEdges(a);if(null!=a&&0<a.length&&(a=q.getOutgoingEdges(q.model.getTerminal(a[0],!0)),null!=a)){for(var b=[],c=0;c<a.length;c++)b.push(q.model.getTerminal(a[c],!1));q.setSelectionCells(b)}}},
+null,null,"Alt+Shift+S");t.actions.addAction("selectParent",function(){if(q.isEnabled()&&1==q.getSelectionCount()){var a=q.getSelectionCell(),a=q.getIncomingEdges(a);null!=a&&0<a.length&&q.setSelectionCell(q.model.getTerminal(a[0],!0))}},null,null,"Alt+Shift+P");t.actions.addAction("selectSubtree",function(){if(q.isEnabled()&&1==q.getSelectionCount()){var a=q.getSelectionCell(),b=[];q.traverse(a,!0,function(a,c){null!=c&&b.push(c);b.push(a);return!0});q.setSelectionCells(b)}},null,null,"Alt+Shift+T");
+var w=q.removeCells;q.removeCells=function(a,d){d=null!=d?d:!0;null==a&&(a=this.getDeletableCells(this.getSelectionCells()));d&&(a=this.getDeletableCells(this.addAllEdges(a)));for(var e=[],f=0;f<a.length;f++){var g=a[f];x.isEdge(g)&&c(g)&&(e.push(g),g=x.getTerminal(g,!1));b(g)?(q.traverse(g,!0,function(a,b){null!=b&&e.push(b);e.push(a);return!0}),g=q.getIncomingEdges(a[f]),a=a.concat(g)):e.push(a[f])}a=e;return w.apply(this,arguments)};t.hoverIcons.getStateAt=function(a,c,d){return b(a.cell)?null:
+this.graph.view.getState(this.graph.getCellAt(c,d))};var v=q.duplicateCells;q.duplicateCells=function(a,c){a=null!=a?a:this.getSelectionCells();for(var d=a.slice(0),e=0;e<d.length;e++){var f=q.view.getState(d[e]);if(null!=f&&b(f.cell))for(var g=q.getIncomingEdges(f.cell),f=0;f<g.length;f++)mxUtils.remove(g[f],a)}this.model.beginUpdate();try{var k=v.call(this,a,c);if(k.length==a.length)for(e=0;e<a.length;e++)if(b(a[e])){var h=q.getIncomingEdges(k[e]),g=q.getIncomingEdges(a[e]);if(0==h.length&&0<g.length){var l=
+this.cloneCells([g[0]])[0];this.addEdge(l,q.getDefaultParent(),this.model.getTerminal(g[0],!0),k[e])}}}finally{this.model.endUpdate()}return k};var C=q.moveCells;q.moveCells=function(a,c,d,e,f,g,k){var h=null;this.model.beginUpdate();try{var l=f,m=this.view.getState(f),n=null!=m?m.style:this.getCellStyle(f);if(null!=a&&b(f)&&"1"==mxUtils.getValue(n,"treeFolding","0")){for(var p=0;p<a.length;p++)if(b(a[p])||q.model.isEdge(a[p])&&null==q.model.getTerminal(a[p],!0)){f=q.model.getParent(a[p]);break}if(null!=
+l&&f!=l&&null!=this.view.getState(a[0])){var t=q.getIncomingEdges(a[0]);if(0<t.length){var u=q.view.getState(q.model.getTerminal(t[0],!0));if(null!=u){var v=q.view.getState(l);null!=v&&(c=(v.getCenterX()-u.getCenterX())/q.view.scale,d=(v.getCenterY()-u.getCenterY())/q.view.scale)}}}}h=C.apply(this,arguments);if(null!=h&&null!=a&&h.length==a.length)for(p=0;p<h.length;p++)if(this.model.isEdge(h[p]))b(l)&&0>mxUtils.indexOf(h,this.model.getTerminal(h[p],!0))&&this.model.setTerminal(h[p],l,!0);else if(b(a[p])&&
+(t=q.getIncomingEdges(a[p]),0<t.length))if(!e)b(l)&&0>mxUtils.indexOf(a,this.model.getTerminal(t[0],!0))&&this.model.setTerminal(t[0],l,!0);else if(0==q.getIncomingEdges(h[p]).length){m=l;if(null==m||m==q.model.getParent(a[p]))m=q.model.getTerminal(t[0],!0);e=this.cloneCells([t[0]])[0];this.addEdge(e,q.getDefaultParent(),m,h[p])}}finally{this.model.endUpdate()}return h};var B=t.sidebar.dropAndConnect;t.sidebar.dropAndConnect=function(a,c,d,e){var f=q.model,g=null;f.beginUpdate();try{if(g=B.apply(this,
+arguments),b(a))for(var k=0;k<g.length;k++)if(f.isEdge(g[k])&&null==f.getTerminal(g[k],!0)){f.setTerminal(g[k],a,!0);var h=q.getCellGeometry(g[k]);h.points=null;null!=h.getTerminalPoint(!0)&&h.setTerminalPoint(null,!0)}}finally{f.endUpdate()}return g};var A={88:t.actions.get("selectChildren"),84:t.actions.get("selectSubtree"),80:t.actions.get("selectParent"),83:t.actions.get("selectSiblings")},G=t.onKeyDown;t.onKeyDown=function(a){try{if(q.isEnabled()&&!q.isEditing()&&b(q.getSelectionCell())&&1==
+q.getSelectionCount()){var c=null;0<q.getIncomingEdges(q.getSelectionCell()).length&&(9==a.which?c=mxEvent.isShiftDown(a)?h(q.getSelectionCell()):l(q.getSelectionCell()):13==a.which&&(c=e(q.getSelectionCell(),!mxEvent.isShiftDown(a))));if(null!=c&&0<c.length)1==c.length&&q.model.isEdge(c[0])?q.setSelectionCell(q.model.getTerminal(c[0],!1)):q.setSelectionCell(c[c.length-1]),null!=t.hoverIcons&&t.hoverIcons.update(q.view.getState(q.getSelectionCell())),q.startEditingAtCell(q.getSelectionCell()),mxEvent.consume(a);
 else if(mxEvent.isAltDown(a)&&mxEvent.isShiftDown(a)){var d=A[a.keyCode];null!=d&&(d.funct(a),mxEvent.consume(a))}else 37==a.keyCode?(p(q.getSelectionCell(),mxConstants.DIRECTION_WEST),mxEvent.consume(a)):38==a.keyCode?(p(q.getSelectionCell(),mxConstants.DIRECTION_NORTH),mxEvent.consume(a)):39==a.keyCode?(p(q.getSelectionCell(),mxConstants.DIRECTION_EAST),mxEvent.consume(a)):40==a.keyCode&&(p(q.getSelectionCell(),mxConstants.DIRECTION_SOUTH),mxEvent.consume(a))}}catch(H){console.log("error",H)}mxEvent.isConsumed(a)||
 G.apply(this,arguments)};var z=q.connectVertex;q.connectVertex=function(a,c,d,f,g,k){var n=q.getIncomingEdges(a);if(b(a)&&0<n.length)return d=m(a),f=d==mxConstants.DIRECTION_EAST||d==mxConstants.DIRECTION_WEST,g=c==mxConstants.DIRECTION_EAST||c==mxConstants.DIRECTION_WEST,d==c?l(a):f==g?h(a):e(a,c!=mxConstants.DIRECTION_NORTH&&c!=mxConstants.DIRECTION_WEST);this.model.beginUpdate();try{var p=z.call(this,a,c,d,f,g,k||0==n.length)}finally{this.model.endUpdate()}return p};var E=q.graphHandler.getCells;
-q.graphHandler.getCells=function(a){for(var c=E.apply(this,arguments),e=c.slice(0),f=0;f<e.length;f++)if(b(e[f]))for(var g=q.getIncomingEdges(e[f]),h=0;h<g.length;h++)mxUtils.remove(g[h],c);for(f=0;f<e.length;f++)g=c[f],b(g)&&!d(g)&&q.traverse(g,!0,function(a,b){null!=b&&0>mxUtils.indexOf(c,b)&&c.push(b);0>mxUtils.indexOf(c,a)&&c.push(a);return!0});return c};t.prototype.destroy=function(){if(null!=this.images)for(var a=0;a<this.images.length;a++){var b=this.images[a];b.parentNode.removeChild(b)}this.images=
+q.graphHandler.getCells=function(a){for(var c=E.apply(this,arguments),e=c.slice(0),f=0;f<e.length;f++)if(b(e[f]))for(var g=q.getIncomingEdges(e[f]),k=0;k<g.length;k++)mxUtils.remove(g[k],c);for(f=0;f<e.length;f++)g=c[f],b(g)&&!d(g)&&q.traverse(g,!0,function(a,b){null!=b&&0>mxUtils.indexOf(c,b)&&c.push(b);0>mxUtils.indexOf(c,a)&&c.push(a);return!0});return c};u.prototype.destroy=function(){if(null!=this.images)for(var a=0;a<this.images.length;a++){var b=this.images[a];b.parentNode.removeChild(b)}this.images=
 null};q.addMouseListener({currentState:null,currentIconSet:null,mouseDown:function(a,b){null!=this.currentState&&(this.dragLeave(b.getEvent(),this.currentState),this.currentState=null)},mouseMove:function(a,c){if(null!=this.currentState&&(c.getState()==this.currentState||null==c.getState())){var e=new mxRectangle(c.getGraphX()-20,c.getGraphY()-20,40,40);if(mxUtils.intersects(e,this.currentState))return}e=c.getState();if(q.isMouseDown&&!mxEvent.isTouchEvent(c.getEvent())||q.isEditing()||null!=e&&(!q.getModel().isVertex(e.cell)||
-!b(c.getCell())||d(e.cell)))e=null;e!=this.currentState&&(null!=this.currentState&&this.dragLeave(c.getEvent(),this.currentState),this.currentState=e,null!=this.currentState&&this.dragEnter(c.getEvent(),this.currentState))},mouseUp:function(a,b){},dragEnter:function(a,b){null==this.currentIconSet&&(this.currentIconSet=new t(b))},dragLeave:function(a,b){null!=this.currentIconSet&&(this.currentIconSet.destroy(),this.currentIconSet=null)}})};if("undefined"!==typeof Sidebar){var c=Sidebar.prototype.createAdvancedShapes;
+!b(c.getCell())||d(e.cell)))e=null;e!=this.currentState&&(null!=this.currentState&&this.dragLeave(c.getEvent(),this.currentState),this.currentState=e,null!=this.currentState&&this.dragEnter(c.getEvent(),this.currentState))},mouseUp:function(a,b){},dragEnter:function(a,b){null==this.currentIconSet&&(this.currentIconSet=new u(b))},dragLeave:function(a,b){null!=this.currentIconSet&&(this.currentIconSet.destroy(),this.currentIconSet=null)}})};if("undefined"!==typeof Sidebar){var c=Sidebar.prototype.createAdvancedShapes;
 Sidebar.prototype.createAdvancedShapes=function(){var a=c.apply(this,arguments),b=this.editorUi.editor.graph;return a.concat([this.addEntry("tree mindmap central idea branch topic",function(){var a=new mxCell("Mindmap",new mxGeometry(0,0,420,126),"swimlane;html=1;startSize=20;horizontal=1;containerType=tree;");a.vertex=!0;var b=new mxCell("Central Idea",new mxGeometry(160,60,100,40),"ellipse;whiteSpace=wrap;html=1;align=center;container=1;recursiveResize=0;treeFolding=1;");b.vertex=!0;var c=new mxCell("Topic",
 new mxGeometry(320,40,80,20),"whiteSpace=wrap;html=1;rounded=1;arcSize=50;align=center;verticalAlign=middle;container=1;recursiveResize=0;strokeWidth=1;autosize=1;spacing=4;treeFolding=1;");c.vertex=!0;var d=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=entityRelationEdgeStyle;startArrow=none;endArrow=none;segment=10;curved=1;");d.geometry.relative=!0;d.edge=!0;b.insertEdge(d,!0);c.insertEdge(d,!1);var f=new mxCell("Branch",new mxGeometry(320,80,72,26),"whiteSpace=wrap;html=1;shape=partialRectangle;top=0;left=0;bottom=1;right=0;points=[[0,1],[1,1]];strokeColor=#000000;fillColor=none;align=center;verticalAlign=bottom;routingCenterY=0.5;snapToPoint=1;container=1;recursiveResize=0;autosize=1;treeFolding=1;");
-f.vertex=!0;var g=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=entityRelationEdgeStyle;startArrow=none;endArrow=none;segment=10;curved=1;");g.geometry.relative=!0;g.edge=!0;b.insertEdge(g,!0);f.insertEdge(g,!1);var p=new mxCell("Topic",new mxGeometry(20,40,80,20),"whiteSpace=wrap;html=1;rounded=1;arcSize=50;align=center;verticalAlign=middle;container=1;recursiveResize=0;strokeWidth=1;autosize=1;spacing=4;treeFolding=1;");p.vertex=!0;var t=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=entityRelationEdgeStyle;startArrow=none;endArrow=none;segment=10;curved=1;");
-t.geometry.relative=!0;t.edge=!0;b.insertEdge(t,!0);p.insertEdge(t,!1);var u=new mxCell("Branch",new mxGeometry(20,80,72,26),"whiteSpace=wrap;html=1;shape=partialRectangle;top=0;left=0;bottom=1;right=0;points=[[0,1],[1,1]];strokeColor=#000000;fillColor=none;align=center;verticalAlign=bottom;routingCenterY=0.5;snapToPoint=1;container=1;recursiveResize=0;autosize=1;treeFolding=1;");u.vertex=!0;var q=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=entityRelationEdgeStyle;startArrow=none;endArrow=none;segment=10;curved=1;");
-q.geometry.relative=!0;q.edge=!0;b.insertEdge(q,!0);u.insertEdge(q,!1);a.insert(d);a.insert(g);a.insert(t);a.insert(q);a.insert(b);a.insert(c);a.insert(f);a.insert(p);a.insert(u);return sb.createVertexTemplateFromCells([a],a.geometry.width,a.geometry.height,a.value)}),this.addEntry("tree mindmap central idea",function(){var a=new mxCell("Central Idea",new mxGeometry(0,0,100,40),"ellipse;whiteSpace=wrap;html=1;align=center;container=1;recursiveResize=0;treeFolding=1;");a.vertex=!0;return sb.createVertexTemplateFromCells([a],
+f.vertex=!0;var g=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=entityRelationEdgeStyle;startArrow=none;endArrow=none;segment=10;curved=1;");g.geometry.relative=!0;g.edge=!0;b.insertEdge(g,!0);f.insertEdge(g,!1);var p=new mxCell("Topic",new mxGeometry(20,40,80,20),"whiteSpace=wrap;html=1;rounded=1;arcSize=50;align=center;verticalAlign=middle;container=1;recursiveResize=0;strokeWidth=1;autosize=1;spacing=4;treeFolding=1;");p.vertex=!0;var u=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=entityRelationEdgeStyle;startArrow=none;endArrow=none;segment=10;curved=1;");
+u.geometry.relative=!0;u.edge=!0;b.insertEdge(u,!0);p.insertEdge(u,!1);var t=new mxCell("Branch",new mxGeometry(20,80,72,26),"whiteSpace=wrap;html=1;shape=partialRectangle;top=0;left=0;bottom=1;right=0;points=[[0,1],[1,1]];strokeColor=#000000;fillColor=none;align=center;verticalAlign=bottom;routingCenterY=0.5;snapToPoint=1;container=1;recursiveResize=0;autosize=1;treeFolding=1;");t.vertex=!0;var q=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=entityRelationEdgeStyle;startArrow=none;endArrow=none;segment=10;curved=1;");
+q.geometry.relative=!0;q.edge=!0;b.insertEdge(q,!0);t.insertEdge(q,!1);a.insert(d);a.insert(g);a.insert(u);a.insert(q);a.insert(b);a.insert(c);a.insert(f);a.insert(p);a.insert(t);return sb.createVertexTemplateFromCells([a],a.geometry.width,a.geometry.height,a.value)}),this.addEntry("tree mindmap central idea",function(){var a=new mxCell("Central Idea",new mxGeometry(0,0,100,40),"ellipse;whiteSpace=wrap;html=1;align=center;container=1;recursiveResize=0;treeFolding=1;");a.vertex=!0;return sb.createVertexTemplateFromCells([a],
 a.geometry.width,a.geometry.height,a.value)}),this.addEntry("tree mindmap branch",function(){var a=new mxCell("Branch",new mxGeometry(0,0,80,20),"whiteSpace=wrap;html=1;shape=partialRectangle;top=0;left=0;bottom=1;right=0;points=[[0,1],[1,1]];strokeColor=#000000;fillColor=none;align=center;verticalAlign=bottom;routingCenterY=0.5;snapToPoint=1;container=1;recursiveResize=0;autosize=1;treeFolding=1;");a.vertex=!0;var b=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=entityRelationEdgeStyle;startArrow=none;endArrow=none;segment=10;curved=1;");
 b.geometry.setTerminalPoint(new mxPoint(-40,40),!0);b.geometry.relative=!0;b.edge=!0;a.insertEdge(b,!1);return sb.createVertexTemplateFromCells([a,b],a.geometry.width,a.geometry.height,a.value)}),this.addEntry("tree mindmap sub topic",function(){var a=new mxCell("Sub Topic",new mxGeometry(0,0,72,26),"whiteSpace=wrap;html=1;rounded=1;arcSize=50;align=center;verticalAlign=middle;container=1;recursiveResize=0;strokeWidth=1;autosize=1;spacing=4;treeFolding=1;");a.vertex=!0;var b=new mxCell("",new mxGeometry(0,
 0,0,0),"edgeStyle=entityRelationEdgeStyle;startArrow=none;endArrow=none;segment=10;curved=1;");b.geometry.setTerminalPoint(new mxPoint(-40,40),!0);b.geometry.relative=!0;b.edge=!0;a.insertEdge(b,!1);return sb.createVertexTemplateFromCells([a,b],a.geometry.width,a.geometry.height,a.value)}),this.addEntry("tree orgchart organization division",function(){var a=new mxCell("Orgchart",new mxGeometry(0,0,280,220),"swimlane;html=1;startSize=20;horizontal=1;containerType=tree;");a.vertex=!0;var c=new mxCell("Organization",
diff --git a/war/js/atlas-viewer.min.js b/war/js/atlas-viewer.min.js
index 7673bfa448fef2374d4deae2c35a46e1ee4034aa..06bed8633b9441138d086637a78ca9338df7d3ec 100644
--- a/war/js/atlas-viewer.min.js
+++ b/war/js/atlas-viewer.min.js
@@ -1568,8 +1568,8 @@ g=this.getAlignmentTolerance();if(0<g){var k=this.graph.view.getState(b);if(null
 mxConnectionHandler.prototype.createEdge=function(a,b,c,d){var e=null;null!=this.factoryMethod&&(e=this.factoryMethod(b,c,d));null==e&&(e=new mxCell(a||""),e.setEdge(!0),e.setStyle(d),a=new mxGeometry,a.relative=!0,e.setGeometry(a));return e};
 mxConnectionHandler.prototype.destroy=function(){this.graph.removeMouseListener(this);null!=this.shape&&(this.shape.destroy(),this.shape=null);null!=this.marker&&(this.marker.destroy(),this.marker=null);null!=this.constraintHandler&&(this.constraintHandler.destroy(),this.constraintHandler=null);null!=this.changeHandler&&(this.graph.getModel().removeListener(this.changeHandler),this.graph.getView().removeListener(this.changeHandler),this.changeHandler=null);null!=this.drillHandler&&(this.graph.removeListener(this.drillHandler),
 this.graph.getView().removeListener(this.drillHandler),this.drillHandler=null);null!=this.escapeHandler&&(this.graph.removeListener(this.escapeHandler),this.escapeHandler=null)};
-function mxConstraintHandler(a){this.graph=a;this.resetHandler=mxUtils.bind(this,function(a,c){null!=this.currentFocus&&null==this.graph.view.getState(this.currentFocus.cell)?this.reset():this.redraw()});this.graph.model.addListener(mxEvent.CHANGE,this.resetHandler);this.graph.view.addListener(mxEvent.SCALE,this.resetHandler);this.graph.addListener(mxEvent.ROOT,this.resetHandler)}mxConstraintHandler.prototype.pointImage=new mxImage(mxClient.imageBasePath+"/point.gif",5,5);
-mxConstraintHandler.prototype.graph=null;mxConstraintHandler.prototype.enabled=!0;mxConstraintHandler.prototype.highlightColor=mxConstants.DEFAULT_VALID_COLOR;mxConstraintHandler.prototype.isEnabled=function(){return this.enabled};mxConstraintHandler.prototype.setEnabled=function(a){this.enabled=a};
+function mxConstraintHandler(a){this.graph=a;this.resetHandler=mxUtils.bind(this,function(a,c){null!=this.currentFocus&&null==this.graph.view.getState(this.currentFocus.cell)?this.reset():this.redraw()});this.graph.model.addListener(mxEvent.CHANGE,this.resetHandler);this.graph.view.addListener(mxEvent.SCALE_AND_TRANSLATE,this.resetHandler);this.graph.view.addListener(mxEvent.TRANSLATE,this.resetHandler);this.graph.view.addListener(mxEvent.SCALE,this.resetHandler);this.graph.addListener(mxEvent.ROOT,
+this.resetHandler)}mxConstraintHandler.prototype.pointImage=new mxImage(mxClient.imageBasePath+"/point.gif",5,5);mxConstraintHandler.prototype.graph=null;mxConstraintHandler.prototype.enabled=!0;mxConstraintHandler.prototype.highlightColor=mxConstants.DEFAULT_VALID_COLOR;mxConstraintHandler.prototype.isEnabled=function(){return this.enabled};mxConstraintHandler.prototype.setEnabled=function(a){this.enabled=a};
 mxConstraintHandler.prototype.reset=function(){if(null!=this.focusIcons){for(var a=0;a<this.focusIcons.length;a++)this.focusIcons[a].destroy();this.focusIcons=null}null!=this.focusHighlight&&(this.focusHighlight.destroy(),this.focusHighlight=null);this.focusPoints=this.currentFocus=this.currentPoint=this.currentFocusArea=this.currentConstraint=null};mxConstraintHandler.prototype.getTolerance=function(a){return this.graph.getTolerance()};
 mxConstraintHandler.prototype.getImageForConstraint=function(a,b,c){return this.pointImage};mxConstraintHandler.prototype.isEventIgnored=function(a,b){return!1};mxConstraintHandler.prototype.isStateIgnored=function(a,b){return!1};mxConstraintHandler.prototype.destroyIcons=function(){if(null!=this.focusIcons){for(var a=0;a<this.focusIcons.length;a++)this.focusIcons[a].destroy();this.focusPoints=this.focusIcons=null}};
 mxConstraintHandler.prototype.destroyFocusHighlight=function(){null!=this.focusHighlight&&(this.focusHighlight.destroy(),this.focusHighlight=null)};mxConstraintHandler.prototype.isKeepFocusEvent=function(a){return mxEvent.isShiftDown(a.getEvent())};
@@ -1903,7 +1903,7 @@ mxCodecRegistry.register(function(){var a=new mxObjectCodec(new mxEditor,"modifi
 c,d);return}}else if("ui"==c.nodeName){this.decodeUi(a,c,d);return}mxObjectCodec.prototype.decodeChild.apply(this,arguments)};a.decodeUi=function(a,c,d){for(a=c.firstChild;null!=a;){if("add"==a.nodeName){c=a.getAttribute("as");var b=a.getAttribute("element"),f=a.getAttribute("style");if(null!=b)b=document.getElementById(b),null!=b&&null!=f&&(b.style.cssText+=";"+f);else{var g=parseInt(a.getAttribute("x")),k=parseInt(a.getAttribute("y")),l=a.getAttribute("width"),m=a.getAttribute("height"),b=document.createElement("div");
 b.style.cssText=f;(new mxWindow(mxResources.get(c)||c,b,g,k,l,m,!1,!0)).setVisible(!0)}"graph"==c?d.setGraphContainer(b):"toolbar"==c?d.setToolbarContainer(b):"title"==c?d.setTitleContainer(b):"status"==c?d.setStatusContainer(b):"map"==c&&d.setMapContainer(b)}else"resource"==a.nodeName?mxResources.add(a.getAttribute("basename")):"stylesheet"==a.nodeName&&mxClient.link("stylesheet",a.getAttribute("name"));a=a.nextSibling}};a.decodeTemplates=function(a,c,d){null==d.templates&&(d.templates=[]);c=mxUtils.getChildNodes(c);
 for(var b=0;b<c.length;b++){for(var f=c[b].getAttribute("as"),g=c[b].firstChild;null!=g&&1!=g.nodeType;)g=g.nextSibling;null!=g&&(d.templates[f]=a.decodeCell(g))}};return a}());
-Editor=function(a,b,e,d,g){mxEventSource.call(this);this.chromeless=null!=a?a:this.chromeless;this.initStencilRegistry();this.graph=d||this.createGraph(b,e);this.editable=null!=g?g:!a;this.undoManager=this.createUndoManager();this.status="";this.getOrCreateFilename=function(){return this.filename||mxResources.get("drawing",[Editor.pageCounter])+".xml"};this.getFilename=function(){return this.filename};this.setStatus=function(a){this.status=a;this.fireEvent(new mxEventObject("statusChanged"))};this.getStatus=
+Editor=function(a,b,e,d,h){mxEventSource.call(this);this.chromeless=null!=a?a:this.chromeless;this.initStencilRegistry();this.graph=d||this.createGraph(b,e);this.editable=null!=h?h:!a;this.undoManager=this.createUndoManager();this.status="";this.getOrCreateFilename=function(){return this.filename||mxResources.get("drawing",[Editor.pageCounter])+".xml"};this.getFilename=function(){return this.filename};this.setStatus=function(a){this.status=a;this.fireEvent(new mxEventObject("statusChanged"))};this.getStatus=
 function(){return this.status};this.graphChangeListener=function(a,b){var d=null!=b?b.getProperty("edit"):null;null!=d&&d.ignoreEdit||this.setModified(!0)};this.graph.getModel().addListener(mxEvent.CHANGE,mxUtils.bind(this,function(){this.graphChangeListener.apply(this,arguments)}));this.graph.resetViewOnRootChange=!1;this.init()};Editor.pageCounter=0;
 (function(){try{for(var a=window;null!=a.opener&&"undefined"!==typeof a.opener.Editor&&!isNaN(a.opener.Editor.pageCounter)&&a.opener!=a;)a=a.opener;null!=a&&(a.Editor.pageCounter++,Editor.pageCounter=a.Editor.pageCounter)}catch(b){}})();Editor.useLocalStorage="undefined"!=typeof Storage&&mxClient.IS_IOS;
 Editor.helpImage=mxClient.IS_SVG?"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAMAAAAoLQ9TAAAAXVBMVEUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAC5BxTwAAAAH3RSTlMAlUF8boNQIE0LBgOgkGlHNSwqFIx/dGVUOjApmV9ezNACSAAAAIVJREFUGNNtjNsOgzAMQ5NeoVcKDAZs+//PXLKI8YKlWvaRU7jXuFpb9qsbdK05XILUiE8JHQox1Pv3OgFUzf1AGqWqUg+QBwLF0YAeegBlCNgRWOpB5vUfTCmeoHQ/wNdy0jLH/cM+b+wLTw4n/7ACEmHVVy8h6qy8V7MNcGowWpsNbvUFcGUEdSi1s/oAAAAASUVORK5CYII=":IMAGE_PATH+
@@ -1935,14 +1935,14 @@ this.updateGraphComponents();this.fireEvent(new mxEventObject("resetGraphView"))
 Editor.prototype.getGraphXml=function(a){a=(null!=a?a:1)?(new mxCodec(mxUtils.createXmlDocument())).encode(this.graph.getModel()):this.graph.encodeCells(mxUtils.sortCells(this.graph.model.getTopmostCells(this.graph.getSelectionCells())));if(0!=this.graph.view.translate.x||0!=this.graph.view.translate.y)a.setAttribute("dx",Math.round(100*this.graph.view.translate.x)/100),a.setAttribute("dy",Math.round(100*this.graph.view.translate.y)/100);a.setAttribute("grid",this.graph.isGridEnabled()?"1":"0");a.setAttribute("gridSize",
 this.graph.gridSize);a.setAttribute("guides",this.graph.graphHandler.guidesEnabled?"1":"0");a.setAttribute("tooltips",this.graph.tooltipHandler.isEnabled()?"1":"0");a.setAttribute("connect",this.graph.connectionHandler.isEnabled()?"1":"0");a.setAttribute("arrows",this.graph.connectionArrowsEnabled?"1":"0");a.setAttribute("fold",this.graph.foldingEnabled?"1":"0");a.setAttribute("page",this.graph.pageVisible?"1":"0");a.setAttribute("pageScale",this.graph.pageScale);a.setAttribute("pageWidth",this.graph.pageFormat.width);
 a.setAttribute("pageHeight",this.graph.pageFormat.height);null!=this.graph.background&&a.setAttribute("background",this.graph.background);return a};Editor.prototype.updateGraphComponents=function(){var a=this.graph;null!=a.container&&(a.view.validateBackground(),a.container.style.overflow=a.scrollbars?"auto":"hidden",this.fireEvent(new mxEventObject("updateGraphComponents")))};Editor.prototype.setModified=function(a){this.modified=a};Editor.prototype.setFilename=function(a){this.filename=a};
-Editor.prototype.createUndoManager=function(){var a=this.graph,b=new mxUndoManager;this.undoListener=function(a,e){b.undoableEditHappened(e.getProperty("edit"))};var e=mxUtils.bind(this,function(a,b){this.undoListener.apply(this,arguments)});a.getModel().addListener(mxEvent.UNDO,e);a.getView().addListener(mxEvent.UNDO,e);e=function(b,e){for(var d=a.getSelectionCellsForChanges(e.getProperty("edit").changes),g=a.getModel(),q=[],c=0;c<d.length;c++)(g.isVertex(d[c])||g.isEdge(d[c]))&&null!=a.view.getState(d[c])&&
+Editor.prototype.createUndoManager=function(){var a=this.graph,b=new mxUndoManager;this.undoListener=function(a,e){b.undoableEditHappened(e.getProperty("edit"))};var e=mxUtils.bind(this,function(a,b){this.undoListener.apply(this,arguments)});a.getModel().addListener(mxEvent.UNDO,e);a.getView().addListener(mxEvent.UNDO,e);e=function(b,e){for(var d=a.getSelectionCellsForChanges(e.getProperty("edit").changes),h=a.getModel(),q=[],c=0;c<d.length;c++)(h.isVertex(d[c])||h.isEdge(d[c]))&&null!=a.view.getState(d[c])&&
 q.push(d[c]);a.setSelectionCells(q)};b.addListener(mxEvent.UNDO,e);b.addListener(mxEvent.REDO,e);return b};Editor.prototype.initStencilRegistry=function(){};Editor.prototype.destroy=function(){null!=this.graph&&(this.graph.destroy(),this.graph=null)};OpenFile=function(a){this.consumer=this.producer=null;this.done=a;this.args=null};OpenFile.prototype.setConsumer=function(a){this.consumer=a;this.execute()};OpenFile.prototype.setData=function(){this.args=arguments;this.execute()};
 OpenFile.prototype.error=function(a){this.cancel(!0);mxUtils.alert(a)};OpenFile.prototype.execute=function(){null!=this.consumer&&null!=this.args&&(this.cancel(!1),this.consumer.apply(this,this.args))};OpenFile.prototype.cancel=function(a){null!=this.done&&this.done(null!=a?a:!0)};
-function Dialog(a,b,e,d,g,l,p){var q=0;mxClient.IS_VML&&(null==document.documentMode||8>document.documentMode)&&(q=80);e+=q;d+=q;var c=e,f=d,h=Math.max(document.body.clientHeight,document.documentElement.clientHeight),m=Math.max(1,Math.round((document.body.clientWidth-e-64)/2)),n=Math.max(1,Math.round((h-d-a.footerHeight)/3));mxClient.IS_QUIRKS||(b.style.maxHeight="100%");e=Math.min(e,document.body.scrollWidth-64);d>h-64&&(b.style.overflowY="auto");d=Math.min(d,h-64);0<a.dialogs.length&&(this.zIndex+=
-2*a.dialogs.length);null==this.bg&&(this.bg=a.createDiv("background"),this.bg.style.position="absolute",this.bg.style.background="white",this.bg.style.height=h+"px",this.bg.style.right="0px",this.bg.style.zIndex=this.zIndex-2,mxUtils.setOpacity(this.bg,this.bgOpacity),mxClient.IS_QUIRKS&&new mxDivResizer(this.bg));var u=mxUtils.getDocumentScrollOrigin(document);this.bg.style.left=u.x+"px";this.bg.style.top=u.y+"px";m+=u.x;n+=u.y;g&&document.body.appendChild(this.bg);var r=a.createDiv("geDialog");
-r.style.width=e+"px";r.style.height=d+"px";r.style.left=m+"px";r.style.top=n+"px";r.style.zIndex=this.zIndex;r.appendChild(b);document.body.appendChild(r);l&&(g=document.createElement("img"),g.setAttribute("src",Dialog.prototype.closeImage),g.setAttribute("title",mxResources.get("close")),g.className="geDialogClose",g.style.top=n+14+"px",g.style.left=m+e+38-q+"px",g.style.zIndex=this.zIndex,mxEvent.addListener(g,"click",mxUtils.bind(this,function(){a.hideDialog(!0)})),document.body.appendChild(g),
-this.dialogImg=g,mxEvent.addGestureListeners(this.bg,null,null,mxUtils.bind(this,function(c){a.hideDialog(!0)})));this.resizeListener=mxUtils.bind(this,function(){h=Math.max(document.body.clientHeight,document.documentElement.clientHeight);this.bg.style.height=h+"px";m=Math.max(1,Math.round((document.body.clientWidth-e-64)/2));n=Math.max(1,Math.round((h-d-a.footerHeight)/3));r.style.left=m+"px";r.style.top=n+"px";e=Math.min(c,document.body.scrollWidth-64);d=Math.min(f,h-64);r.style.width=e+"px";r.style.height=
-d+"px";b.style.overflowY=f>h-64?"auto":"";null!=this.dialogImg&&(this.dialogImg.style.top=n+14+"px",this.dialogImg.style.left=m+e+38-q+"px")});mxEvent.addListener(window,"resize",this.resizeListener);this.onDialogClose=p;this.container=r;a.editor.fireEvent(new mxEventObject("showDialog"))}Dialog.prototype.zIndex=mxPopupMenu.prototype.zIndex-1;
+function Dialog(a,b,e,d,h,l,n){var q=0;mxClient.IS_VML&&(null==document.documentMode||8>document.documentMode)&&(q=80);e+=q;d+=q;var c=e,f=d,g=Math.max(document.body.clientHeight,document.documentElement.clientHeight),p=Math.max(1,Math.round((document.body.clientWidth-e-64)/2)),m=Math.max(1,Math.round((g-d-a.footerHeight)/3));mxClient.IS_QUIRKS||(b.style.maxHeight="100%");e=Math.min(e,document.body.scrollWidth-64);d>g-64&&(b.style.overflowY="auto");d=Math.min(d,g-64);0<a.dialogs.length&&(this.zIndex+=
+2*a.dialogs.length);null==this.bg&&(this.bg=a.createDiv("background"),this.bg.style.position="absolute",this.bg.style.background="white",this.bg.style.height=g+"px",this.bg.style.right="0px",this.bg.style.zIndex=this.zIndex-2,mxUtils.setOpacity(this.bg,this.bgOpacity),mxClient.IS_QUIRKS&&new mxDivResizer(this.bg));var u=mxUtils.getDocumentScrollOrigin(document);this.bg.style.left=u.x+"px";this.bg.style.top=u.y+"px";p+=u.x;m+=u.y;h&&document.body.appendChild(this.bg);var r=a.createDiv("geDialog");
+r.style.width=e+"px";r.style.height=d+"px";r.style.left=p+"px";r.style.top=m+"px";r.style.zIndex=this.zIndex;r.appendChild(b);document.body.appendChild(r);l&&(h=document.createElement("img"),h.setAttribute("src",Dialog.prototype.closeImage),h.setAttribute("title",mxResources.get("close")),h.className="geDialogClose",h.style.top=m+14+"px",h.style.left=p+e+38-q+"px",h.style.zIndex=this.zIndex,mxEvent.addListener(h,"click",mxUtils.bind(this,function(){a.hideDialog(!0)})),document.body.appendChild(h),
+this.dialogImg=h,mxEvent.addGestureListeners(this.bg,null,null,mxUtils.bind(this,function(c){a.hideDialog(!0)})));this.resizeListener=mxUtils.bind(this,function(){g=Math.max(document.body.clientHeight,document.documentElement.clientHeight);this.bg.style.height=g+"px";p=Math.max(1,Math.round((document.body.clientWidth-e-64)/2));m=Math.max(1,Math.round((g-d-a.footerHeight)/3));r.style.left=p+"px";r.style.top=m+"px";e=Math.min(c,document.body.scrollWidth-64);d=Math.min(f,g-64);r.style.width=e+"px";r.style.height=
+d+"px";b.style.overflowY=f>g-64?"auto":"";null!=this.dialogImg&&(this.dialogImg.style.top=m+14+"px",this.dialogImg.style.left=p+e+38-q+"px")});mxEvent.addListener(window,"resize",this.resizeListener);this.onDialogClose=n;this.container=r;a.editor.fireEvent(new mxEventObject("showDialog"))}Dialog.prototype.zIndex=mxPopupMenu.prototype.zIndex-1;
 Dialog.prototype.noColorImage=mxClient.IS_SVG?"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAMAAAAoLQ9TAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAyBpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuMC1jMDYwIDYxLjEzNDc3NywgMjAxMC8wMi8xMi0xNzozMjowMCAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvIiB4bWxuczp4bXBNTT0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL21tLyIgeG1sbnM6c3RSZWY9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9zVHlwZS9SZXNvdXJjZVJlZiMiIHhtcDpDcmVhdG9yVG9vbD0iQWRvYmUgUGhvdG9zaG9wIENTNSBXaW5kb3dzIiB4bXBNTTpJbnN0YW5jZUlEPSJ4bXAuaWlkOkEzRDlBMUUwODYxMTExRTFCMzA4RDdDMjJBMEMxRDM3IiB4bXBNTTpEb2N1bWVudElEPSJ4bXAuZGlkOkEzRDlBMUUxODYxMTExRTFCMzA4RDdDMjJBMEMxRDM3Ij4gPHhtcE1NOkRlcml2ZWRGcm9tIHN0UmVmOmluc3RhbmNlSUQ9InhtcC5paWQ6QTNEOUExREU4NjExMTFFMUIzMDhEN0MyMkEwQzFEMzciIHN0UmVmOmRvY3VtZW50SUQ9InhtcC5kaWQ6QTNEOUExREY4NjExMTFFMUIzMDhEN0MyMkEwQzFEMzciLz4gPC9yZGY6RGVzY3JpcHRpb24+IDwvcmRmOlJERj4gPC94OnhtcG1ldGE+IDw/eHBhY2tldCBlbmQ9InIiPz5xh3fmAAAABlBMVEX////MzMw46qqDAAAAGElEQVR42mJggAJGKGAYIIGBth8KAAIMAEUQAIElnLuQAAAAAElFTkSuQmCC":IMAGE_PATH+
 "/nocolor.png";Dialog.prototype.closeImage=mxClient.IS_SVG?"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAkAAAAJAQMAAADaX5RTAAAABlBMVEV7mr3///+wksspAAAAAnRSTlP/AOW3MEoAAAAdSURBVAgdY9jXwCDDwNDRwHCwgeExmASygSL7GgB12QiqNHZZIwAAAABJRU5ErkJggg==":IMAGE_PATH+"/close.png";
 Dialog.prototype.clearImage=mxClient.IS_SVG?"data:image/gif;base64,R0lGODlhDQAKAIABAMDAwP///yH/C1hNUCBEYXRhWE1QPD94cGFja2V0IGJlZ2luPSLvu78iIGlkPSJXNU0wTXBDZWhpSHpyZVN6TlRjemtjOWQiPz4gPHg6eG1wbWV0YSB4bWxuczp4PSJhZG9iZTpuczptZXRhLyIgeDp4bXB0az0iQWRvYmUgWE1QIENvcmUgNS4wLWMwNjAgNjEuMTM0Nzc3LCAyMDEwLzAyLzEyLTE3OjMyOjAwICAgICAgICAiPiA8cmRmOlJERiB4bWxuczpyZGY9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkvMDIvMjItcmRmLXN5bnRheC1ucyMiPiA8cmRmOkRlc2NyaXB0aW9uIHJkZjphYm91dD0iIiB4bWxuczp4bXA9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC8iIHhtbG5zOnhtcE1NPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvbW0vIiB4bWxuczpzdFJlZj0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL3NUeXBlL1Jlc291cmNlUmVmIyIgeG1wOkNyZWF0b3JUb29sPSJBZG9iZSBQaG90b3Nob3AgQ1M1IFdpbmRvd3MiIHhtcE1NOkluc3RhbmNlSUQ9InhtcC5paWQ6OUIzOEM1NzI4NjEyMTFFMUEzMkNDMUE3NjZERDE2QjIiIHhtcE1NOkRvY3VtZW50SUQ9InhtcC5kaWQ6OUIzOEM1NzM4NjEyMTFFMUEzMkNDMUE3NjZERDE2QjIiPiA8eG1wTU06RGVyaXZlZEZyb20gc3RSZWY6aW5zdGFuY2VJRD0ieG1wLmlpZDo5QjM4QzU3MDg2MTIxMUUxQTMyQ0MxQTc2NkREMTZCMiIgc3RSZWY6ZG9jdW1lbnRJRD0ieG1wLmRpZDo5QjM4QzU3MTg2MTIxMUUxQTMyQ0MxQTc2NkREMTZCMiIvPiA8L3JkZjpEZXNjcmlwdGlvbj4gPC9yZGY6UkRGPiA8L3g6eG1wbWV0YT4gPD94cGFja2V0IGVuZD0iciI/PgH//v38+/r5+Pf29fTz8vHw7+7t7Ovq6ejn5uXk4+Lh4N/e3dzb2tnY19bV1NPS0dDPzs3My8rJyMfGxcTDwsHAv769vLu6ubi3trW0s7KxsK+urayrqqmop6alpKOioaCfnp2cm5qZmJeWlZSTkpGQj46NjIuKiYiHhoWEg4KBgH9+fXx7enl4d3Z1dHNycXBvbm1sa2ppaGdmZWRjYmFgX15dXFtaWVhXVlVUU1JRUE9OTUxLSklIR0ZFRENCQUA/Pj08Ozo5ODc2NTQzMjEwLy4tLCsqKSgnJiUkIyIhIB8eHRwbGhkYFxYVFBMSERAPDg0MCwoJCAcGBQQDAgEAACH5BAEAAAEALAAAAAANAAoAAAIXTGCJebD9jEOTqRlttXdrB32PJ2ncyRQAOw==":IMAGE_PATH+
@@ -1951,30 +1951,30 @@ Dialog.prototype.lockedImage=mxClient.IS_SVG?"data:image/png;base64,iVBORw0KGgoA
 "/locked.png";
 Dialog.prototype.unlockedImage=mxClient.IS_SVG?"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAwAAAAMCAMAAABhq6zVAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAyJpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuMC1jMDYwIDYxLjEzNDc3NywgMjAxMC8wMi8xMi0xNzozMjowMCAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvIiB4bWxuczp4bXBNTT0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL21tLyIgeG1sbnM6c3RSZWY9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9zVHlwZS9SZXNvdXJjZVJlZiMiIHhtcDpDcmVhdG9yVG9vbD0iQWRvYmUgUGhvdG9zaG9wIENTNSBNYWNpbnRvc2giIHhtcE1NOkluc3RhbmNlSUQ9InhtcC5paWQ6MzdDMDZCN0QxNzIxMTFFNUI0RTk5NTg4OTcyMUUyODEiIHhtcE1NOkRvY3VtZW50SUQ9InhtcC5kaWQ6MzdDMDZCN0UxNzIxMTFFNUI0RTk5NTg4OTcyMUUyODEiPiA8eG1wTU06RGVyaXZlZEZyb20gc3RSZWY6aW5zdGFuY2VJRD0ieG1wLmlpZDozN0MwNkI3QjE3MjExMUU1QjRFOTk1ODg5NzIxRTI4MSIgc3RSZWY6ZG9jdW1lbnRJRD0ieG1wLmRpZDozN0MwNkI3QzE3MjExMUU1QjRFOTk1ODg5NzIxRTI4MSIvPiA8L3JkZjpEZXNjcmlwdGlvbj4gPC9yZGY6UkRGPiA8L3g6eG1wbWV0YT4gPD94cGFja2V0IGVuZD0iciI/PkKMpVwAAAAYUExURZmZmbKysr+/v6ysrOXl5czMzLGxsf///zHN5lwAAAAIdFJOU/////////8A3oO9WQAAADxJREFUeNpUzFESACAEBNBVsfe/cZJU+8Mzs8CIABCidtfGOndnYsT40HDSiCcbPdoJo10o9aI677cpwACRoAF3dFNlswAAAABJRU5ErkJggg==":IMAGE_PATH+
 "/unlocked.png";Dialog.prototype.bgOpacity=80;Dialog.prototype.close=function(a){null!=this.onDialogClose&&(this.onDialogClose(a),this.onDialogClose=null);null!=this.dialogImg&&(this.dialogImg.parentNode.removeChild(this.dialogImg),this.dialogImg=null);null!=this.bg&&null!=this.bg.parentNode&&this.bg.parentNode.removeChild(this.bg);mxEvent.removeListener(window,"resize",this.resizeListener);this.container.parentNode.removeChild(this.container)};var PrintDialog=function(a,b){this.create(a,b)};
-PrintDialog.prototype.create=function(a){function b(a){var c=q.checked||f.checked,b=parseInt(m.value)/100;isNaN(b)&&(b=1,m.value="100%");var b=.75*b,d=e.pageFormat||mxConstants.PAGE_FORMAT_A4_PORTRAIT,n=1/e.pageScale;if(c){var u=q.checked?1:parseInt(h.value);isNaN(u)||(n=mxUtils.getScaleForPageCount(u,e,d))}e.getGraphBounds();var g=u=0,d=mxRectangle.fromRectangle(d);d.width=Math.ceil(d.width*b);d.height=Math.ceil(d.height*b);n*=b;!c&&e.pageVisible?(b=e.getPageLayout(),u-=b.x*d.width,g-=b.y*d.height):
-c=!0;c=PrintDialog.createPrintPreview(e,n,d,0,u,g,c);c.open();a&&PrintDialog.printPreview(c)}var e=a.editor.graph,d,g,l=document.createElement("table");l.style.width="100%";l.style.height="100%";var p=document.createElement("tbody");d=document.createElement("tr");var q=document.createElement("input");q.setAttribute("type","checkbox");g=document.createElement("td");g.setAttribute("colspan","2");g.style.fontSize="10pt";g.appendChild(q);var c=document.createElement("span");mxUtils.write(c," "+mxResources.get("fitPage"));
-g.appendChild(c);mxEvent.addListener(c,"click",function(a){q.checked=!q.checked;f.checked=!q.checked;mxEvent.consume(a)});mxEvent.addListener(q,"change",function(){f.checked=!q.checked});d.appendChild(g);p.appendChild(d);d=d.cloneNode(!1);var f=document.createElement("input");f.setAttribute("type","checkbox");g=document.createElement("td");g.style.fontSize="10pt";g.appendChild(f);c=document.createElement("span");mxUtils.write(c," "+mxResources.get("posterPrint")+":");g.appendChild(c);mxEvent.addListener(c,
-"click",function(a){f.checked=!f.checked;q.checked=!f.checked;mxEvent.consume(a)});d.appendChild(g);var h=document.createElement("input");h.setAttribute("value","1");h.setAttribute("type","number");h.setAttribute("min","1");h.setAttribute("size","4");h.setAttribute("disabled","disabled");h.style.width="50px";g=document.createElement("td");g.style.fontSize="10pt";g.appendChild(h);mxUtils.write(g," "+mxResources.get("pages")+" (max)");d.appendChild(g);p.appendChild(d);mxEvent.addListener(f,"change",
-function(){f.checked?h.removeAttribute("disabled"):h.setAttribute("disabled","disabled");q.checked=!f.checked});d=d.cloneNode(!1);g=document.createElement("td");mxUtils.write(g,mxResources.get("pageScale")+":");d.appendChild(g);g=document.createElement("td");var m=document.createElement("input");m.setAttribute("value","100 %");m.setAttribute("size","5");m.style.width="50px";g.appendChild(m);d.appendChild(g);p.appendChild(d);d=document.createElement("tr");g=document.createElement("td");g.colSpan=2;
-g.style.paddingTop="20px";g.setAttribute("align","right");c=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog()});c.className="geBtn";a.editor.cancelFirst&&g.appendChild(c);if(PrintDialog.previewEnabled){var n=mxUtils.button(mxResources.get("preview"),function(){a.hideDialog();b(!1)});n.className="geBtn";g.appendChild(n)}n=mxUtils.button(mxResources.get(PrintDialog.previewEnabled?"print":"ok"),function(){a.hideDialog();b(!0)});n.className="geBtn gePrimaryBtn";g.appendChild(n);a.editor.cancelFirst||
-g.appendChild(c);d.appendChild(g);p.appendChild(d);l.appendChild(p);this.container=l};PrintDialog.printPreview=function(a){if(null!=a.wnd){var b=function(){a.wnd.focus();a.wnd.print();a.wnd.close()};mxClient.IS_GC?window.setTimeout(b,500):b()}};
-PrintDialog.createPrintPreview=function(a,b,e,d,g,l,p){b=new mxPrintPreview(a,b,e,d,g,l);b.title=mxResources.get("preview");b.printBackgroundImage=!0;b.autoOrigin=p;a=a.background;if(null==a||""==a||a==mxConstants.NONE)a="#ffffff";b.backgroundColor=a;var q=b.writeHead;b.writeHead=function(a){q.apply(this,arguments);a.writeln('<style type="text/css">');a.writeln("@media screen {");a.writeln("  body > div { padding:30px;box-sizing:content-box; }");a.writeln("}");a.writeln("</style>")};return b};
+PrintDialog.prototype.create=function(a){function b(a){var c=q.checked||f.checked,b=parseInt(p.value)/100;isNaN(b)&&(b=1,p.value="100%");var b=.75*b,d=e.pageFormat||mxConstants.PAGE_FORMAT_A4_PORTRAIT,m=1/e.pageScale;if(c){var u=q.checked?1:parseInt(g.value);isNaN(u)||(m=mxUtils.getScaleForPageCount(u,e,d))}e.getGraphBounds();var h=u=0,d=mxRectangle.fromRectangle(d);d.width=Math.ceil(d.width*b);d.height=Math.ceil(d.height*b);m*=b;!c&&e.pageVisible?(b=e.getPageLayout(),u-=b.x*d.width,h-=b.y*d.height):
+c=!0;c=PrintDialog.createPrintPreview(e,m,d,0,u,h,c);c.open();a&&PrintDialog.printPreview(c)}var e=a.editor.graph,d,h,l=document.createElement("table");l.style.width="100%";l.style.height="100%";var n=document.createElement("tbody");d=document.createElement("tr");var q=document.createElement("input");q.setAttribute("type","checkbox");h=document.createElement("td");h.setAttribute("colspan","2");h.style.fontSize="10pt";h.appendChild(q);var c=document.createElement("span");mxUtils.write(c," "+mxResources.get("fitPage"));
+h.appendChild(c);mxEvent.addListener(c,"click",function(a){q.checked=!q.checked;f.checked=!q.checked;mxEvent.consume(a)});mxEvent.addListener(q,"change",function(){f.checked=!q.checked});d.appendChild(h);n.appendChild(d);d=d.cloneNode(!1);var f=document.createElement("input");f.setAttribute("type","checkbox");h=document.createElement("td");h.style.fontSize="10pt";h.appendChild(f);c=document.createElement("span");mxUtils.write(c," "+mxResources.get("posterPrint")+":");h.appendChild(c);mxEvent.addListener(c,
+"click",function(a){f.checked=!f.checked;q.checked=!f.checked;mxEvent.consume(a)});d.appendChild(h);var g=document.createElement("input");g.setAttribute("value","1");g.setAttribute("type","number");g.setAttribute("min","1");g.setAttribute("size","4");g.setAttribute("disabled","disabled");g.style.width="50px";h=document.createElement("td");h.style.fontSize="10pt";h.appendChild(g);mxUtils.write(h," "+mxResources.get("pages")+" (max)");d.appendChild(h);n.appendChild(d);mxEvent.addListener(f,"change",
+function(){f.checked?g.removeAttribute("disabled"):g.setAttribute("disabled","disabled");q.checked=!f.checked});d=d.cloneNode(!1);h=document.createElement("td");mxUtils.write(h,mxResources.get("pageScale")+":");d.appendChild(h);h=document.createElement("td");var p=document.createElement("input");p.setAttribute("value","100 %");p.setAttribute("size","5");p.style.width="50px";h.appendChild(p);d.appendChild(h);n.appendChild(d);d=document.createElement("tr");h=document.createElement("td");h.colSpan=2;
+h.style.paddingTop="20px";h.setAttribute("align","right");c=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog()});c.className="geBtn";a.editor.cancelFirst&&h.appendChild(c);if(PrintDialog.previewEnabled){var m=mxUtils.button(mxResources.get("preview"),function(){a.hideDialog();b(!1)});m.className="geBtn";h.appendChild(m)}m=mxUtils.button(mxResources.get(PrintDialog.previewEnabled?"print":"ok"),function(){a.hideDialog();b(!0)});m.className="geBtn gePrimaryBtn";h.appendChild(m);a.editor.cancelFirst||
+h.appendChild(c);d.appendChild(h);n.appendChild(d);l.appendChild(n);this.container=l};PrintDialog.printPreview=function(a){if(null!=a.wnd){var b=function(){a.wnd.focus();a.wnd.print();a.wnd.close()};mxClient.IS_GC?window.setTimeout(b,500):b()}};
+PrintDialog.createPrintPreview=function(a,b,e,d,h,l,n){b=new mxPrintPreview(a,b,e,d,h,l);b.title=mxResources.get("preview");b.printBackgroundImage=!0;b.autoOrigin=n;a=a.background;if(null==a||""==a||a==mxConstants.NONE)a="#ffffff";b.backgroundColor=a;var q=b.writeHead;b.writeHead=function(a){q.apply(this,arguments);a.writeln('<style type="text/css">');a.writeln("@media screen {");a.writeln("  body > div { padding:30px;box-sizing:content-box; }");a.writeln("}");a.writeln("</style>")};return b};
 PrintDialog.previewEnabled=!0;
-var PageSetupDialog=function(a){function b(){null==h||h==mxConstants.NONE?(f.style.backgroundColor="",f.style.backgroundImage="url('"+Dialog.prototype.noColorImage+"')"):(f.style.backgroundColor=h,f.style.backgroundImage="")}function e(){null==u?(n.removeAttribute("title"),n.style.fontSize="",n.innerHTML=mxResources.get("change")+"..."):(n.setAttribute("title",u.src),n.style.fontSize="11px",n.innerHTML=u.src.substring(0,42)+"...")}var d=a.editor.graph,g,l,p=document.createElement("table");p.style.width=
-"100%";p.style.height="100%";var q=document.createElement("tbody");g=document.createElement("tr");l=document.createElement("td");l.style.verticalAlign="top";l.style.fontSize="10pt";mxUtils.write(l,mxResources.get("paperSize")+":");g.appendChild(l);l=document.createElement("td");l.style.verticalAlign="top";l.style.fontSize="10pt";var c=PageSetupDialog.addPageFormatPanel(l,"pagesetupdialog",d.pageFormat);g.appendChild(l);q.appendChild(g);g=document.createElement("tr");l=document.createElement("td");
-mxUtils.write(l,mxResources.get("background")+":");g.appendChild(l);l=document.createElement("td");l.style.whiteSpace="nowrap";document.createElement("input").setAttribute("type","text");var f=document.createElement("button");f.style.width="18px";f.style.height="18px";f.style.marginRight="20px";f.style.backgroundPosition="center center";f.style.backgroundRepeat="no-repeat";var h=d.background;b();mxEvent.addListener(f,"click",function(c){a.pickColor(h||"none",function(a){h=a;b()});mxEvent.consume(c)});
-l.appendChild(f);mxUtils.write(l,mxResources.get("gridSize")+":");var m=document.createElement("input");m.setAttribute("type","number");m.setAttribute("min","0");m.style.width="40px";m.style.marginLeft="6px";m.value=d.getGridSize();l.appendChild(m);mxEvent.addListener(m,"change",function(){var a=parseInt(m.value);m.value=Math.max(1,isNaN(a)?d.getGridSize():a)});g.appendChild(l);q.appendChild(g);g=document.createElement("tr");l=document.createElement("td");mxUtils.write(l,mxResources.get("image")+
-":");g.appendChild(l);l=document.createElement("td");var n=document.createElement("a");n.style.textDecoration="underline";n.style.cursor="pointer";n.style.color="#a0a0a0";var u=d.backgroundImage;mxEvent.addListener(n,"click",function(c){a.showBackgroundImageDialog(function(a){u=a;e()});mxEvent.consume(c)});e();l.appendChild(n);g.appendChild(l);q.appendChild(g);g=document.createElement("tr");l=document.createElement("td");l.colSpan=2;l.style.paddingTop="16px";l.setAttribute("align","right");var r=
-mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog()});r.className="geBtn";a.editor.cancelFirst&&l.appendChild(r);var k=mxUtils.button(mxResources.get("apply"),function(){a.hideDialog();d.gridSize!==m.value&&d.setGridSize(parseInt(m.value));var f=new ChangePageSetup(a,h,u,c.get());f.ignoreColor=d.background==h;f.ignoreImage=(null!=d.backgroundImage?d.backgroundImage.src:null)===(null!=u?u.src:null);d.pageFormat.width==f.previousFormat.width&&d.pageFormat.height==f.previousFormat.height&&
-f.ignoreColor&&f.ignoreImage||d.model.execute(f)});k.className="geBtn gePrimaryBtn";l.appendChild(k);a.editor.cancelFirst||l.appendChild(r);g.appendChild(l);q.appendChild(g);p.appendChild(q);this.container=p};
-PageSetupDialog.addPageFormatPanel=function(a,b,e,d){function g(a,f,b){if(b||m!=document.activeElement&&n!=document.activeElement){a=!1;for(f=0;f<r.length;f++)b=r[f],x?"custom"==b.key&&(q.value=b.key,x=!1):null!=b.format&&("a4"==b.key?826==e.width?(e=mxRectangle.fromRectangle(e),e.width=827):826==e.height&&(e=mxRectangle.fromRectangle(e),e.height=827):"a5"==b.key&&(584==e.width?(e=mxRectangle.fromRectangle(e),e.width=583):584==e.height&&(e=mxRectangle.fromRectangle(e),e.height=583)),e.width==b.format.width&&
-e.height==b.format.height?(q.value=b.key,l.setAttribute("checked","checked"),l.defaultChecked=!0,l.checked=!0,p.removeAttribute("checked"),p.defaultChecked=!1,p.checked=!1,a=!0):e.width==b.format.height&&e.height==b.format.width&&(q.value=b.key,l.removeAttribute("checked"),l.defaultChecked=!1,l.checked=!1,p.setAttribute("checked","checked"),p.defaultChecked=!0,a=p.checked=!0));a?(c.style.display="",h.style.display="none"):(m.value=e.width/100,n.value=e.height/100,v.setAttribute("selected","selected"),
-l.setAttribute("checked","checked"),l.defaultChecked=!0,c.style.display="none",h.style.display="")}}b="format-"+b;var l=document.createElement("input");l.setAttribute("name",b);l.setAttribute("type","radio");l.setAttribute("value","portrait");var p=document.createElement("input");p.setAttribute("name",b);p.setAttribute("type","radio");p.setAttribute("value","landscape");var q=document.createElement("select");q.style.marginBottom="8px";q.style.width="202px";var c=document.createElement("div");c.style.marginLeft=
-"4px";c.style.width="210px";c.style.height="24px";l.style.marginRight="6px";c.appendChild(l);b=document.createElement("span");b.style.maxWidth="100px";mxUtils.write(b,mxResources.get("portrait"));c.appendChild(b);p.style.marginLeft="10px";p.style.marginRight="6px";c.appendChild(p);var f=document.createElement("span");f.style.width="100px";mxUtils.write(f,mxResources.get("landscape"));c.appendChild(f);var h=document.createElement("div");h.style.marginLeft="4px";h.style.width="210px";h.style.height=
-"24px";var m=document.createElement("input");m.setAttribute("size","7");m.setAttribute("value",e.width);m.style.textAlign="right";h.appendChild(m);mxUtils.write(h," in x ");var n=document.createElement("input");n.setAttribute("size","7");n.setAttribute("value",e.height);n.style.textAlign="right";h.appendChild(n);mxUtils.write(h," in");c.style.display="none";h.style.display="none";for(var u={},r=PageSetupDialog.getFormats(),k=0;k<r.length;k++){var t=r[k];u[t.key]=t;var v=document.createElement("option");
-v.setAttribute("value",t.key);mxUtils.write(v,t.title);q.appendChild(v)}var x=!1;g();a.appendChild(q);mxUtils.br(a);a.appendChild(c);a.appendChild(h);var w=e,D=function(){var a=u[q.value];null!=a.format?(m.value=a.format.width/100,n.value=a.format.height/100,h.style.display="none",c.style.display=""):(c.style.display="none",h.style.display="");a=new mxRectangle(0,0,Math.floor(100*parseFloat(m.value)),Math.floor(100*parseFloat(n.value)));"custom"!=q.value&&p.checked&&(a=new mxRectangle(0,0,a.height,
-a.width));if(a.width!=w.width||a.height!=w.height)w=a,null!=d&&d(w)};mxEvent.addListener(b,"click",function(a){l.checked=!0;D();mxEvent.consume(a)});mxEvent.addListener(f,"click",function(a){p.checked=!0;D();mxEvent.consume(a)});mxEvent.addListener(m,"blur",D);mxEvent.addListener(m,"click",D);mxEvent.addListener(n,"blur",D);mxEvent.addListener(n,"click",D);mxEvent.addListener(p,"change",D);mxEvent.addListener(l,"change",D);mxEvent.addListener(q,"change",function(){x="custom"==q.value;D()});D();return{set:function(a){e=
-a;g(null,null,!0)},get:function(){return w},widthInput:m,heightInput:n}};
+var PageSetupDialog=function(a){function b(){null==g||g==mxConstants.NONE?(f.style.backgroundColor="",f.style.backgroundImage="url('"+Dialog.prototype.noColorImage+"')"):(f.style.backgroundColor=g,f.style.backgroundImage="")}function e(){null==u?(m.removeAttribute("title"),m.style.fontSize="",m.innerHTML=mxResources.get("change")+"..."):(m.setAttribute("title",u.src),m.style.fontSize="11px",m.innerHTML=u.src.substring(0,42)+"...")}var d=a.editor.graph,h,l,n=document.createElement("table");n.style.width=
+"100%";n.style.height="100%";var q=document.createElement("tbody");h=document.createElement("tr");l=document.createElement("td");l.style.verticalAlign="top";l.style.fontSize="10pt";mxUtils.write(l,mxResources.get("paperSize")+":");h.appendChild(l);l=document.createElement("td");l.style.verticalAlign="top";l.style.fontSize="10pt";var c=PageSetupDialog.addPageFormatPanel(l,"pagesetupdialog",d.pageFormat);h.appendChild(l);q.appendChild(h);h=document.createElement("tr");l=document.createElement("td");
+mxUtils.write(l,mxResources.get("background")+":");h.appendChild(l);l=document.createElement("td");l.style.whiteSpace="nowrap";document.createElement("input").setAttribute("type","text");var f=document.createElement("button");f.style.width="18px";f.style.height="18px";f.style.marginRight="20px";f.style.backgroundPosition="center center";f.style.backgroundRepeat="no-repeat";var g=d.background;b();mxEvent.addListener(f,"click",function(c){a.pickColor(g||"none",function(a){g=a;b()});mxEvent.consume(c)});
+l.appendChild(f);mxUtils.write(l,mxResources.get("gridSize")+":");var p=document.createElement("input");p.setAttribute("type","number");p.setAttribute("min","0");p.style.width="40px";p.style.marginLeft="6px";p.value=d.getGridSize();l.appendChild(p);mxEvent.addListener(p,"change",function(){var a=parseInt(p.value);p.value=Math.max(1,isNaN(a)?d.getGridSize():a)});h.appendChild(l);q.appendChild(h);h=document.createElement("tr");l=document.createElement("td");mxUtils.write(l,mxResources.get("image")+
+":");h.appendChild(l);l=document.createElement("td");var m=document.createElement("a");m.style.textDecoration="underline";m.style.cursor="pointer";m.style.color="#a0a0a0";var u=d.backgroundImage;mxEvent.addListener(m,"click",function(c){a.showBackgroundImageDialog(function(a){u=a;e()});mxEvent.consume(c)});e();l.appendChild(m);h.appendChild(l);q.appendChild(h);h=document.createElement("tr");l=document.createElement("td");l.colSpan=2;l.style.paddingTop="16px";l.setAttribute("align","right");var r=
+mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog()});r.className="geBtn";a.editor.cancelFirst&&l.appendChild(r);var k=mxUtils.button(mxResources.get("apply"),function(){a.hideDialog();d.gridSize!==p.value&&d.setGridSize(parseInt(p.value));var f=new ChangePageSetup(a,g,u,c.get());f.ignoreColor=d.background==g;f.ignoreImage=(null!=d.backgroundImage?d.backgroundImage.src:null)===(null!=u?u.src:null);d.pageFormat.width==f.previousFormat.width&&d.pageFormat.height==f.previousFormat.height&&
+f.ignoreColor&&f.ignoreImage||d.model.execute(f)});k.className="geBtn gePrimaryBtn";l.appendChild(k);a.editor.cancelFirst||l.appendChild(r);h.appendChild(l);q.appendChild(h);n.appendChild(q);this.container=n};
+PageSetupDialog.addPageFormatPanel=function(a,b,e,d){function h(a,f,b){if(b||p!=document.activeElement&&m!=document.activeElement){a=!1;for(f=0;f<r.length;f++)b=r[f],x?"custom"==b.key&&(q.value=b.key,x=!1):null!=b.format&&("a4"==b.key?826==e.width?(e=mxRectangle.fromRectangle(e),e.width=827):826==e.height&&(e=mxRectangle.fromRectangle(e),e.height=827):"a5"==b.key&&(584==e.width?(e=mxRectangle.fromRectangle(e),e.width=583):584==e.height&&(e=mxRectangle.fromRectangle(e),e.height=583)),e.width==b.format.width&&
+e.height==b.format.height?(q.value=b.key,l.setAttribute("checked","checked"),l.defaultChecked=!0,l.checked=!0,n.removeAttribute("checked"),n.defaultChecked=!1,n.checked=!1,a=!0):e.width==b.format.height&&e.height==b.format.width&&(q.value=b.key,l.removeAttribute("checked"),l.defaultChecked=!1,l.checked=!1,n.setAttribute("checked","checked"),n.defaultChecked=!0,a=n.checked=!0));a?(c.style.display="",g.style.display="none"):(p.value=e.width/100,m.value=e.height/100,t.setAttribute("selected","selected"),
+l.setAttribute("checked","checked"),l.defaultChecked=!0,c.style.display="none",g.style.display="")}}b="format-"+b;var l=document.createElement("input");l.setAttribute("name",b);l.setAttribute("type","radio");l.setAttribute("value","portrait");var n=document.createElement("input");n.setAttribute("name",b);n.setAttribute("type","radio");n.setAttribute("value","landscape");var q=document.createElement("select");q.style.marginBottom="8px";q.style.width="202px";var c=document.createElement("div");c.style.marginLeft=
+"4px";c.style.width="210px";c.style.height="24px";l.style.marginRight="6px";c.appendChild(l);b=document.createElement("span");b.style.maxWidth="100px";mxUtils.write(b,mxResources.get("portrait"));c.appendChild(b);n.style.marginLeft="10px";n.style.marginRight="6px";c.appendChild(n);var f=document.createElement("span");f.style.width="100px";mxUtils.write(f,mxResources.get("landscape"));c.appendChild(f);var g=document.createElement("div");g.style.marginLeft="4px";g.style.width="210px";g.style.height=
+"24px";var p=document.createElement("input");p.setAttribute("size","7");p.setAttribute("value",e.width);p.style.textAlign="right";g.appendChild(p);mxUtils.write(g," in x ");var m=document.createElement("input");m.setAttribute("size","7");m.setAttribute("value",e.height);m.style.textAlign="right";g.appendChild(m);mxUtils.write(g," in");c.style.display="none";g.style.display="none";for(var u={},r=PageSetupDialog.getFormats(),k=0;k<r.length;k++){var v=r[k];u[v.key]=v;var t=document.createElement("option");
+t.setAttribute("value",v.key);mxUtils.write(t,v.title);q.appendChild(t)}var x=!1;h();a.appendChild(q);mxUtils.br(a);a.appendChild(c);a.appendChild(g);var w=e,D=function(){var a=u[q.value];null!=a.format?(p.value=a.format.width/100,m.value=a.format.height/100,g.style.display="none",c.style.display=""):(c.style.display="none",g.style.display="");a=new mxRectangle(0,0,Math.floor(100*parseFloat(p.value)),Math.floor(100*parseFloat(m.value)));"custom"!=q.value&&n.checked&&(a=new mxRectangle(0,0,a.height,
+a.width));if(a.width!=w.width||a.height!=w.height)w=a,null!=d&&d(w)};mxEvent.addListener(b,"click",function(a){l.checked=!0;D();mxEvent.consume(a)});mxEvent.addListener(f,"click",function(a){n.checked=!0;D();mxEvent.consume(a)});mxEvent.addListener(p,"blur",D);mxEvent.addListener(p,"click",D);mxEvent.addListener(m,"blur",D);mxEvent.addListener(m,"click",D);mxEvent.addListener(n,"change",D);mxEvent.addListener(l,"change",D);mxEvent.addListener(q,"change",function(){x="custom"==q.value;D()});D();return{set:function(a){e=
+a;h(null,null,!0)},get:function(){return w},widthInput:p,heightInput:m}};
 PageSetupDialog.getFormats=function(){return[{key:"letter",title:'US-Letter (8,5" x 11")',format:mxConstants.PAGE_FORMAT_LETTER_PORTRAIT},{key:"legal",title:'US-Legal (8,5" x 14")',format:new mxRectangle(0,0,850,1400)},{key:"tabloid",title:"US-Tabloid (279 mm x 432 mm)",format:new mxRectangle(0,0,1100,1700)},{key:"a0",title:"A0 (841 mm x 1189 mm)",format:new mxRectangle(0,0,3300,4681)},{key:"a1",title:"A1 (594 mm x 841 mm)",format:new mxRectangle(0,0,2339,3300)},{key:"a2",title:"A2 (420 mm x 594 mm)",
 format:new mxRectangle(0,0,1654,2336)},{key:"a3",title:"A3 (297 mm x 420 mm)",format:new mxRectangle(0,0,1169,1654)},{key:"a4",title:"A4 (210 mm x 297 mm)",format:mxConstants.PAGE_FORMAT_A4_PORTRAIT},{key:"a5",title:"A5 (148 mm x 210 mm)",format:new mxRectangle(0,0,583,827)},{key:"a6",title:"A6 (105 mm x 148 mm)",format:new mxRectangle(0,0,413,583)},{key:"a7",title:"A7 (74 mm x 105 mm)",format:new mxRectangle(0,0,291,413)},{key:"custom",title:mxResources.get("custom"),format:null}]};
 (function(){mxGraphView.prototype.validateBackgroundPage=function(){var a=this.graph;if(null!=a.container&&!a.transparentBackground){if(a.pageVisible){var c=this.getBackgroundPageBounds();if(null==this.backgroundPageShape){for(var f=a.container.firstChild;null!=f&&f.nodeType!=mxConstants.NODETYPE_ELEMENT;)f=f.nextSibling;null!=f&&(this.backgroundPageShape=this.createBackgroundPageShape(c),this.backgroundPageShape.scale=1,this.backgroundPageShape.isShadow=!mxClient.IS_QUIRKS,this.backgroundPageShape.dialect=
@@ -1985,31 +1985,31 @@ null);this.validateBackgroundStyles()}};mxGraphView.prototype.validateBackground
 "geDiagramContainer geDiagramBackdrop",f.style.backgroundImage="none",f.style.backgroundColor=""):(a.container.className="geDiagramContainer",f.style.backgroundPosition=d,f.style.backgroundColor=c,f.style.backgroundImage=b)};mxGraphView.prototype.createSvgGrid=function(a){for(var c=this.graph.gridSize*this.scale;c<this.minGridSize;)c*=2;for(var f=this.gridSteps*c,b=[],d=1;d<this.gridSteps;d++){var e=d*c;b.push("M 0 "+e+" L "+f+" "+e+" M "+e+" 0 L "+e+" "+f)}return'<svg width="'+f+'" height="'+f+'" xmlns="'+
 mxConstants.NS_SVG+'"><defs><pattern id="grid" width="'+f+'" height="'+f+'" patternUnits="userSpaceOnUse"><path d="'+b.join(" ")+'" fill="none" stroke="'+a+'" opacity="0.2" stroke-width="1"/><path d="M '+f+" 0 L 0 0 0 "+f+'" fill="none" stroke="'+a+'" stroke-width="1"/></pattern></defs><rect width="100%" height="100%" fill="url(#grid)"/></svg>'};var a=mxGraph.prototype.panGraph;mxGraph.prototype.panGraph=function(b,c){a.apply(this,arguments);if(null!=this.shiftPreview1){var f=this.view.canvas;null!=
 f.ownerSVGElement&&(f=f.ownerSVGElement);var d=this.gridSize*this.view.scale*this.view.gridSteps,d=-Math.round(d-mxUtils.mod(this.view.translate.x*this.view.scale+b,d))+"px "+-Math.round(d-mxUtils.mod(this.view.translate.y*this.view.scale+c,d))+"px";f.style.backgroundPosition=d}};mxGraph.prototype.updatePageBreaks=function(a,c,f){var b=this.view.scale,d=this.view.translate,e=this.pageFormat,u=b*this.pageScale,r=this.view.getBackgroundPageBounds();c=r.width;f=r.height;var k=new mxRectangle(b*d.x,b*
-d.y,e.width*u,e.height*u),t=(a=a&&Math.min(k.width,k.height)>this.minPageBreakDist)?Math.ceil(f/k.height)-1:0,v=a?Math.ceil(c/k.width)-1:0,q=r.x+c,g=r.y+f;null==this.horizontalPageBreaks&&0<t&&(this.horizontalPageBreaks=[]);null==this.verticalPageBreaks&&0<v&&(this.verticalPageBreaks=[]);a=mxUtils.bind(this,function(a){if(null!=a){for(var c=a==this.horizontalPageBreaks?t:v,f=0;f<=c;f++){var b=a==this.horizontalPageBreaks?[new mxPoint(Math.round(r.x),Math.round(r.y+(f+1)*k.height)),new mxPoint(Math.round(q),
-Math.round(r.y+(f+1)*k.height))]:[new mxPoint(Math.round(r.x+(f+1)*k.width),Math.round(r.y)),new mxPoint(Math.round(r.x+(f+1)*k.width),Math.round(g))];null!=a[f]?(a[f].points=b,a[f].redraw()):(b=new mxPolyline(b,this.pageBreakColor),b.dialect=this.dialect,b.isDashed=this.pageBreakDashed,b.pointerEvents=!1,b.init(this.view.backgroundPane),b.redraw(),a[f]=b)}for(f=c;f<a.length;f++)a[f].destroy();a.splice(c,a.length-c)}});a(this.horizontalPageBreaks);a(this.verticalPageBreaks)};var b=mxGraphHandler.prototype.shouldRemoveCellsFromParent;
+d.y,e.width*u,e.height*u),v=(a=a&&Math.min(k.width,k.height)>this.minPageBreakDist)?Math.ceil(f/k.height)-1:0,t=a?Math.ceil(c/k.width)-1:0,q=r.x+c,h=r.y+f;null==this.horizontalPageBreaks&&0<v&&(this.horizontalPageBreaks=[]);null==this.verticalPageBreaks&&0<t&&(this.verticalPageBreaks=[]);a=mxUtils.bind(this,function(a){if(null!=a){for(var c=a==this.horizontalPageBreaks?v:t,f=0;f<=c;f++){var b=a==this.horizontalPageBreaks?[new mxPoint(Math.round(r.x),Math.round(r.y+(f+1)*k.height)),new mxPoint(Math.round(q),
+Math.round(r.y+(f+1)*k.height))]:[new mxPoint(Math.round(r.x+(f+1)*k.width),Math.round(r.y)),new mxPoint(Math.round(r.x+(f+1)*k.width),Math.round(h))];null!=a[f]?(a[f].points=b,a[f].redraw()):(b=new mxPolyline(b,this.pageBreakColor),b.dialect=this.dialect,b.isDashed=this.pageBreakDashed,b.pointerEvents=!1,b.init(this.view.backgroundPane),b.redraw(),a[f]=b)}for(f=c;f<a.length;f++)a[f].destroy();a.splice(c,a.length-c)}});a(this.horizontalPageBreaks);a(this.verticalPageBreaks)};var b=mxGraphHandler.prototype.shouldRemoveCellsFromParent;
 mxGraphHandler.prototype.shouldRemoveCellsFromParent=function(a,c,f){for(var d=0;d<c.length;d++)if(this.graph.getModel().isVertex(c[d])){var e=this.graph.getCellGeometry(c[d]);if(null!=e&&e.relative)return!1}return b.apply(this,arguments)};var e=mxConnectionHandler.prototype.createMarker;mxConnectionHandler.prototype.createMarker=function(){var a=e.apply(this,arguments);a.intersects=mxUtils.bind(this,function(c,f){return this.isConnecting()?!0:mxCellMarker.prototype.intersects.apply(a,arguments)});
 return a};mxGraphView.prototype.createBackgroundPageShape=function(a){return new mxRectangleShape(a,"#ffffff","#cacaca")};mxGraphView.prototype.getBackgroundPageBounds=function(){var a=this.getGraphBounds(),c=0<a.width?a.x/this.scale-this.translate.x:0,f=0<a.height?a.y/this.scale-this.translate.y:0,b=this.graph.pageFormat,d=this.graph.pageScale,e=b.width*d,b=b.height*d,d=Math.floor(Math.min(0,c)/e),u=Math.floor(Math.min(0,f)/b);return new mxRectangle(this.scale*(this.translate.x+d*e),this.scale*(this.translate.y+
-u*b),this.scale*(Math.ceil(Math.max(1,c+a.width/this.scale)/e)-d)*e,this.scale*(Math.ceil(Math.max(1,f+a.height/this.scale)/b)-u)*b)};var d=mxGraph.prototype.panGraph;mxGraph.prototype.panGraph=function(a,c){d.apply(this,arguments);this.dialect==mxConstants.DIALECT_SVG||null==this.view.backgroundPageShape||this.useScrollbarsForPanning&&mxUtils.hasScrollbars(this.container)||(this.view.backgroundPageShape.node.style.marginLeft=a+"px",this.view.backgroundPageShape.node.style.marginTop=c+"px")};var g=
-mxPopupMenu.prototype.addItem;mxPopupMenu.prototype.addItem=function(a,c,f,b,d,e){var h=g.apply(this,arguments);null==e||e||mxEvent.addListener(h,"mousedown",function(a){mxEvent.consume(a)});return h};var l=mxGraphHandler.prototype.getInitialCellForEvent;mxGraphHandler.prototype.getInitialCellForEvent=function(a){var c=this.graph.getModel(),f=c.getParent(this.graph.getSelectionCell()),b=l.apply(this,arguments),d=c.getParent(b);if(null==f||f!=b&&f!=d)for(;!this.graph.isCellSelected(b)&&!this.graph.isCellSelected(d)&&
-c.isVertex(d)&&!this.graph.isContainer(d);)b=d,d=this.graph.getModel().getParent(b);return b};var p=mxGraphHandler.prototype.isDelayedSelection;mxGraphHandler.prototype.isDelayedSelection=function(a,c){var f=p.apply(this,arguments);if(!f)for(var b=this.graph.getModel(),d=b.getParent(a);null!=d;){if(this.graph.isCellSelected(d)&&b.isVertex(d)){f=!0;break}d=b.getParent(d)}return f};mxGraphHandler.prototype.selectDelayed=function(a){if(!this.graph.popupMenuHandler.isPopupTrigger(a)){var c=a.getCell();
+u*b),this.scale*(Math.ceil(Math.max(1,c+a.width/this.scale)/e)-d)*e,this.scale*(Math.ceil(Math.max(1,f+a.height/this.scale)/b)-u)*b)};var d=mxGraph.prototype.panGraph;mxGraph.prototype.panGraph=function(a,c){d.apply(this,arguments);this.dialect==mxConstants.DIALECT_SVG||null==this.view.backgroundPageShape||this.useScrollbarsForPanning&&mxUtils.hasScrollbars(this.container)||(this.view.backgroundPageShape.node.style.marginLeft=a+"px",this.view.backgroundPageShape.node.style.marginTop=c+"px")};var h=
+mxPopupMenu.prototype.addItem;mxPopupMenu.prototype.addItem=function(a,c,f,b,d,e){var g=h.apply(this,arguments);null==e||e||mxEvent.addListener(g,"mousedown",function(a){mxEvent.consume(a)});return g};var l=mxGraphHandler.prototype.getInitialCellForEvent;mxGraphHandler.prototype.getInitialCellForEvent=function(a){var c=this.graph.getModel(),f=c.getParent(this.graph.getSelectionCell()),b=l.apply(this,arguments),d=c.getParent(b);if(null==f||f!=b&&f!=d)for(;!this.graph.isCellSelected(b)&&!this.graph.isCellSelected(d)&&
+c.isVertex(d)&&!this.graph.isContainer(d);)b=d,d=this.graph.getModel().getParent(b);return b};var n=mxGraphHandler.prototype.isDelayedSelection;mxGraphHandler.prototype.isDelayedSelection=function(a,c){var f=n.apply(this,arguments);if(!f)for(var b=this.graph.getModel(),d=b.getParent(a);null!=d;){if(this.graph.isCellSelected(d)&&b.isVertex(d)){f=!0;break}d=b.getParent(d)}return f};mxGraphHandler.prototype.selectDelayed=function(a){if(!this.graph.popupMenuHandler.isPopupTrigger(a)){var c=a.getCell();
 null==c&&(c=this.cell);var f=this.graph.view.getState(c);if(null==f||!a.isSource(f.control))for(var f=this.graph.getModel(),b=f.getParent(c);!this.graph.isCellSelected(b)&&f.isVertex(b);)c=b,b=f.getParent(c);this.graph.selectCellForEvent(c,a.getEvent())}};mxPopupMenuHandler.prototype.getCellForPopupEvent=function(a){a=a.getCell();for(var c=this.graph.getModel(),b=c.getParent(a);c.isVertex(b)&&!this.graph.isContainer(b);)this.graph.isCellSelected(b)&&(a=b),b=c.getParent(b);return a}})();EditorUi=function(a,b,e){mxEventSource.call(this);this.destroyFunctions=[];this.editor=a||new Editor;this.container=b||document.body;var d=this.editor.graph;d.lightbox=e;mxClient.IS_SVG?mxPopupMenu.prototype.submenuImage="data:image/gif;base64,R0lGODlhCQAJAIAAAP///zMzMyH5BAEAAAAALAAAAAAJAAkAAAIPhI8WebHsHopSOVgb26AAADs=":(new Image).src=mxPopupMenu.prototype.submenuImage;mxClient.IS_SVG||null==mxConnectionHandler.prototype.connectImage||((new Image).src=mxConnectionHandler.prototype.connectImage.src);
 this.editor.chromeless&&!this.editor.editable&&(this.footerHeight=0,d.isEnabled=function(){return!1},d.panningHandler.isForcePanningEvent=function(a){return!mxEvent.isPopupTrigger(a.getEvent())});this.actions=new Actions(this);this.menus=this.createMenus();this.createDivs();this.createUi();this.refresh();b=mxUtils.bind(this,function(a){null==a&&(a=window.event);return this.isSelectionAllowed(a)||d.isEditing()});this.container==document.body&&(this.menubarContainer.onselectstart=b,this.menubarContainer.onmousedown=
 b,this.toolbarContainer.onselectstart=b,this.toolbarContainer.onmousedown=b,this.diagramContainer.onselectstart=b,this.diagramContainer.onmousedown=b,this.sidebarContainer.onselectstart=b,this.sidebarContainer.onmousedown=b,this.formatContainer.onselectstart=b,this.formatContainer.onmousedown=b,this.footerContainer.onselectstart=b,this.footerContainer.onmousedown=b,null!=this.tabContainer&&(this.tabContainer.onselectstart=b));!this.editor.chromeless||this.editor.editable?mxClient.IS_IE&&("undefined"===
 typeof document.documentMode||9>document.documentMode)?mxEvent.addListener(this.diagramContainer,"contextmenu",b):this.diagramContainer.oncontextmenu=b:d.panningHandler.usePopupTrigger=!1;d.init(this.diagramContainer);this.hoverIcons=this.createHoverIcons();mxEvent.addListener(this.diagramContainer,"mousemove",mxUtils.bind(this,function(a){var c=mxUtils.getOffset(this.diagramContainer);0<mxEvent.getClientX(a)-c.x-this.diagramContainer.clientWidth||0<mxEvent.getClientY(a)-c.y-this.diagramContainer.clientHeight?
-this.diagramContainer.setAttribute("title",mxResources.get("panTooltip")):this.diagramContainer.removeAttribute("title")}));var g=!1,l=this.hoverIcons.isResetEvent;this.hoverIcons.isResetEvent=function(a,c){return g||l.apply(this,arguments)};this.keydownHandler=mxUtils.bind(this,function(a){32==a.which?(g=!0,this.hoverIcons.reset(),d.container.style.cursor="move",d.isEditing()||mxEvent.getSource(a)!=d.container||mxEvent.consume(a)):mxEvent.isConsumed(a)||27!=a.keyCode||this.hideDialog()});mxEvent.addListener(document,
-"keydown",this.keydownHandler);this.keyupHandler=mxUtils.bind(this,function(a){d.container.style.cursor="";g=!1});mxEvent.addListener(document,"keyup",this.keyupHandler);var p=d.panningHandler.isForcePanningEvent;d.panningHandler.isForcePanningEvent=function(a){return p.apply(this,arguments)||g||mxEvent.isMouseEvent(a.getEvent())&&(this.usePopupTrigger||!mxEvent.isPopupTrigger(a.getEvent()))&&(!mxEvent.isControlDown(a.getEvent())&&mxEvent.isRightMouseButton(a.getEvent())||mxEvent.isMiddleMouseButton(a.getEvent()))};
-var q=d.cellEditor.isStopEditingEvent;d.cellEditor.isStopEditingEvent=function(a){return q.apply(this,arguments)||13==a.keyCode&&(!mxClient.IS_SF&&mxEvent.isControlDown(a)||mxClient.IS_MAC&&mxEvent.isMetaDown(a)||mxClient.IS_SF&&mxEvent.isShiftDown(a))};var c=!1,f=null,h=null,m=null,n=mxUtils.bind(this,function(){if(null!=this.toolbar&&c!=d.cellEditor.isContentEditing()){for(var a=this.toolbar.container.firstChild,b=[];null!=a;){var e=a.nextSibling;0>mxUtils.indexOf(this.toolbar.staticElements,a)&&
-(a.parentNode.removeChild(a),b.push(a));a=e}a=this.toolbar.fontMenu;e=this.toolbar.sizeMenu;if(null==m)this.toolbar.createTextToolbar();else{for(var k=0;k<m.length;k++)this.toolbar.container.appendChild(m[k]);this.toolbar.fontMenu=f;this.toolbar.sizeMenu=h}c=d.cellEditor.isContentEditing();f=a;h=e;m=b}}),u=this,r=d.cellEditor.startEditing;d.cellEditor.startEditing=function(){r.apply(this,arguments);n();if(d.cellEditor.isContentEditing()){var a=!1,c=function(){a||(a=!0,window.setTimeout(function(){for(var c=
+this.diagramContainer.setAttribute("title",mxResources.get("panTooltip")):this.diagramContainer.removeAttribute("title")}));var h=!1,l=this.hoverIcons.isResetEvent;this.hoverIcons.isResetEvent=function(a,c){return h||l.apply(this,arguments)};this.keydownHandler=mxUtils.bind(this,function(a){32==a.which?(h=!0,this.hoverIcons.reset(),d.container.style.cursor="move",d.isEditing()||mxEvent.getSource(a)!=d.container||mxEvent.consume(a)):mxEvent.isConsumed(a)||27!=a.keyCode||this.hideDialog()});mxEvent.addListener(document,
+"keydown",this.keydownHandler);this.keyupHandler=mxUtils.bind(this,function(a){d.container.style.cursor="";h=!1});mxEvent.addListener(document,"keyup",this.keyupHandler);var n=d.panningHandler.isForcePanningEvent;d.panningHandler.isForcePanningEvent=function(a){return n.apply(this,arguments)||h||mxEvent.isMouseEvent(a.getEvent())&&(this.usePopupTrigger||!mxEvent.isPopupTrigger(a.getEvent()))&&(!mxEvent.isControlDown(a.getEvent())&&mxEvent.isRightMouseButton(a.getEvent())||mxEvent.isMiddleMouseButton(a.getEvent()))};
+var q=d.cellEditor.isStopEditingEvent;d.cellEditor.isStopEditingEvent=function(a){return q.apply(this,arguments)||13==a.keyCode&&(!mxClient.IS_SF&&mxEvent.isControlDown(a)||mxClient.IS_MAC&&mxEvent.isMetaDown(a)||mxClient.IS_SF&&mxEvent.isShiftDown(a))};var c=!1,f=null,g=null,p=null,m=mxUtils.bind(this,function(){if(null!=this.toolbar&&c!=d.cellEditor.isContentEditing()){for(var a=this.toolbar.container.firstChild,b=[];null!=a;){var e=a.nextSibling;0>mxUtils.indexOf(this.toolbar.staticElements,a)&&
+(a.parentNode.removeChild(a),b.push(a));a=e}a=this.toolbar.fontMenu;e=this.toolbar.sizeMenu;if(null==p)this.toolbar.createTextToolbar();else{for(var k=0;k<p.length;k++)this.toolbar.container.appendChild(p[k]);this.toolbar.fontMenu=f;this.toolbar.sizeMenu=g}c=d.cellEditor.isContentEditing();f=a;g=e;p=b}}),u=this,r=d.cellEditor.startEditing;d.cellEditor.startEditing=function(){r.apply(this,arguments);m();if(d.cellEditor.isContentEditing()){var a=!1,c=function(){a||(a=!0,window.setTimeout(function(){for(var c=
 d.getSelectedElement();null!=c&&c.nodeType!=mxConstants.NODETYPE_ELEMENT;)c=c.parentNode;if(null!=c&&(c=mxUtils.getCurrentStyle(c),null!=c&&null!=u.toolbar)){var b=c.fontFamily;"'"==b.charAt(0)&&(b=b.substring(1));"'"==b.charAt(b.length-1)&&(b=b.substring(0,b.length-1));u.toolbar.setFontName(b);u.toolbar.setFontSize(parseInt(c.fontSize))}a=!1},0))};mxEvent.addListener(d.cellEditor.textarea,"input",c);mxEvent.addListener(d.cellEditor.textarea,"touchend",c);mxEvent.addListener(d.cellEditor.textarea,
-"mouseup",c);mxEvent.addListener(d.cellEditor.textarea,"keyup",c);c()}};var k=d.cellEditor.stopEditing;d.cellEditor.stopEditing=function(a,c){k.apply(this,arguments);n()};d.container.setAttribute("tabindex","0");d.container.style.cursor="default";if(window.self===window.top&&null!=d.container.parentNode)try{d.container.focus()}catch(C){}var t=d.fireMouseEvent;d.fireMouseEvent=function(a,c,b){a==mxEvent.MOUSE_DOWN&&this.container.focus();t.apply(this,arguments)};d.popupMenuHandler.autoExpand=!0;null!=
-this.menus&&(d.popupMenuHandler.factoryMethod=mxUtils.bind(this,function(a,c,b){this.menus.createPopupMenu(a,c,b)}));mxEvent.addGestureListeners(document,mxUtils.bind(this,function(a){d.popupMenuHandler.hideMenu()}));this.keyHandler=this.createKeyHandler(a);this.getKeyHandler=function(){return keyHandler};var v="rounded shadow glass dashed dashPattern comic labelBackgroundColor".split(" "),x="shape edgeStyle curved rounded elbow comic jumpStyle jumpSize".split(" ");this.setDefaultStyle=function(a){var c=
-d.view.getState(a);if(null!=c){a=a.clone();a.style="";a=d.getCellStyle(a);var b=[],f=[],h;for(h in c.style)a[h]!=c.style[h]&&(b.push(c.style[h]),f.push(h));h=d.getModel().getStyle(c.cell);for(var e=null!=h?h.split(";"):[],k=0;k<e.length;k++){var m=e[k],n=m.indexOf("=");0<=n&&(h=m.substring(0,n),m=m.substring(n+1),null!=a[h]&&"none"==m&&(b.push(m),f.push(h)))}d.getModel().isEdge(c.cell)?d.currentEdgeStyle={}:d.currentVertexStyle={};this.fireEvent(new mxEventObject("styleChanged","keys",f,"values",
-b,"cells",[c.cell]))}};this.clearDefaultStyle=function(){d.currentEdgeStyle=mxUtils.clone(d.defaultEdgeStyle);d.currentVertexStyle=mxUtils.clone(d.defaultVertexStyle);this.fireEvent(new mxEventObject("styleChanged","keys",[],"values",[],"cells",[]))};var w=["fontFamily","fontSize","fontColor"],D="edgeStyle startArrow startFill startSize endArrow endFill endSize jettySize orthogonalLoop".split(" "),B=["startArrow startFill startSize endArrow endFill endSize jettySize orthogonalLoop".split(" "),["strokeColor",
-"strokeWidth"],["fillColor","gradientColor"],w,["align"],["html"]];for(a=0;a<B.length;a++)for(b=0;b<B[a].length;b++)v.push(B[a][b]);for(a=0;a<x.length;a++)0>mxUtils.indexOf(v,x[a])&&v.push(x[a]);var y=function(a,c){d.getModel().beginUpdate();try{if(c)for(var b=d.getModel().isEdge(k),f=b?d.currentEdgeStyle:d.currentVertexStyle,b=["fontSize","fontFamily","fontColor"],h=0;h<b.length;h++){var e=f[b[h]];null!=e&&d.setCellStyles(b[h],e,a)}else for(e=0;e<a.length;e++){for(var k=a[e],m=d.getModel().getStyle(k),
-n=null!=m?m.split(";"):[],r=v.slice(),h=0;h<n.length;h++){var t=n[h],G=t.indexOf("=");if(0<=G){var u=t.substring(0,G),g=mxUtils.indexOf(r,u);0<=g&&r.splice(g,1);for(var q=0;q<B.length;q++){var l=B[q];if(0<=mxUtils.indexOf(l,u))for(var p=0;p<l.length;p++){var D=mxUtils.indexOf(r,l[p]);0<=D&&r.splice(D,1)}}}}f=(b=d.getModel().isEdge(k))?d.currentEdgeStyle:d.currentVertexStyle;for(h=0;h<r.length;h++){var u=r[h],w=f[u];null==w||"shape"==u&&!b||(!b||0>mxUtils.indexOf(x,u))&&d.setCellStyles(u,w,[k])}}}finally{d.getModel().endUpdate()}};
-d.addListener("cellsInserted",function(a,c){y(c.getProperty("cells"))});d.addListener("textInserted",function(a,c){y(c.getProperty("cells"),!0)});d.connectionHandler.addListener(mxEvent.CONNECT,function(a,c){var b=[c.getProperty("cell")];c.getProperty("terminalInserted")&&b.push(c.getProperty("terminal"));y(b)});this.addListener("styleChanged",mxUtils.bind(this,function(a,c){var b=c.getProperty("cells"),f=!1,h=!1;if(0<b.length)for(var e=0;e<b.length&&(f=d.getModel().isVertex(b[e])||f,!(h=d.getModel().isEdge(b[e])||
-h)||!f);e++);else h=f=!0;for(var b=c.getProperty("keys"),k=c.getProperty("values"),e=0;e<b.length;e++){var m=0<=mxUtils.indexOf(w,b[e]);if("strokeColor"!=b[e]||null!=k[e]&&"none"!=k[e])if(0<=mxUtils.indexOf(x,b[e]))h||0<=mxUtils.indexOf(D,b[e])?null==k[e]?delete d.currentEdgeStyle[b[e]]:d.currentEdgeStyle[b[e]]=k[e]:f&&0<=mxUtils.indexOf(v,b[e])&&(null==k[e]?delete d.currentVertexStyle[b[e]]:d.currentVertexStyle[b[e]]=k[e]);else if(0<=mxUtils.indexOf(v,b[e])){if(f||m)null==k[e]?delete d.currentVertexStyle[b[e]]:
-d.currentVertexStyle[b[e]]=k[e];if(h||m||0<=mxUtils.indexOf(D,b[e]))null==k[e]?delete d.currentEdgeStyle[b[e]]:d.currentEdgeStyle[b[e]]=k[e]}}null!=this.toolbar&&(this.toolbar.setFontName(d.currentVertexStyle.fontFamily||Menus.prototype.defaultFont),this.toolbar.setFontSize(d.currentVertexStyle.fontSize||Menus.prototype.defaultFontSize),null!=this.toolbar.edgeStyleMenu&&(this.toolbar.edgeStyleMenu.getElementsByTagName("div")[0].className="orthogonalEdgeStyle"==d.currentEdgeStyle.edgeStyle&&"1"==d.currentEdgeStyle.curved?
+"mouseup",c);mxEvent.addListener(d.cellEditor.textarea,"keyup",c);c()}};var k=d.cellEditor.stopEditing;d.cellEditor.stopEditing=function(a,c){k.apply(this,arguments);m()};d.container.setAttribute("tabindex","0");d.container.style.cursor="default";if(window.self===window.top&&null!=d.container.parentNode)try{d.container.focus()}catch(C){}var v=d.fireMouseEvent;d.fireMouseEvent=function(a,c,b){a==mxEvent.MOUSE_DOWN&&this.container.focus();v.apply(this,arguments)};d.popupMenuHandler.autoExpand=!0;null!=
+this.menus&&(d.popupMenuHandler.factoryMethod=mxUtils.bind(this,function(a,c,b){this.menus.createPopupMenu(a,c,b)}));mxEvent.addGestureListeners(document,mxUtils.bind(this,function(a){d.popupMenuHandler.hideMenu()}));this.keyHandler=this.createKeyHandler(a);this.getKeyHandler=function(){return keyHandler};var t="rounded shadow glass dashed dashPattern comic labelBackgroundColor".split(" "),x="shape edgeStyle curved rounded elbow comic jumpStyle jumpSize".split(" ");this.setDefaultStyle=function(a){var c=
+d.view.getState(a);if(null!=c){a=a.clone();a.style="";a=d.getCellStyle(a);var b=[],f=[],g;for(g in c.style)a[g]!=c.style[g]&&(b.push(c.style[g]),f.push(g));g=d.getModel().getStyle(c.cell);for(var e=null!=g?g.split(";"):[],k=0;k<e.length;k++){var p=e[k],m=p.indexOf("=");0<=m&&(g=p.substring(0,m),p=p.substring(m+1),null!=a[g]&&"none"==p&&(b.push(p),f.push(g)))}d.getModel().isEdge(c.cell)?d.currentEdgeStyle={}:d.currentVertexStyle={};this.fireEvent(new mxEventObject("styleChanged","keys",f,"values",
+b,"cells",[c.cell]))}};this.clearDefaultStyle=function(){d.currentEdgeStyle=mxUtils.clone(d.defaultEdgeStyle);d.currentVertexStyle=mxUtils.clone(d.defaultVertexStyle);this.fireEvent(new mxEventObject("styleChanged","keys",[],"values",[],"cells",[]))};var w=["fontFamily","fontSize","fontColor"],D="edgeStyle startArrow startFill startSize endArrow endFill endSize jettySize orthogonalLoop".split(" "),A=["startArrow startFill startSize endArrow endFill endSize jettySize orthogonalLoop".split(" "),["strokeColor",
+"strokeWidth"],["fillColor","gradientColor"],w,["align"],["html"]];for(a=0;a<A.length;a++)for(b=0;b<A[a].length;b++)t.push(A[a][b]);for(a=0;a<x.length;a++)0>mxUtils.indexOf(t,x[a])&&t.push(x[a]);var z=function(a,c){d.getModel().beginUpdate();try{if(c)for(var b=d.getModel().isEdge(k),f=b?d.currentEdgeStyle:d.currentVertexStyle,b=["fontSize","fontFamily","fontColor"],g=0;g<b.length;g++){var e=f[b[g]];null!=e&&d.setCellStyles(b[g],e,a)}else for(e=0;e<a.length;e++){for(var k=a[e],p=d.getModel().getStyle(k),
+m=null!=p?p.split(";"):[],r=t.slice(),g=0;g<m.length;g++){var v=m[g],H=v.indexOf("=");if(0<=H){var u=v.substring(0,H),h=mxUtils.indexOf(r,u);0<=h&&r.splice(h,1);for(var q=0;q<A.length;q++){var l=A[q];if(0<=mxUtils.indexOf(l,u))for(var n=0;n<l.length;n++){var D=mxUtils.indexOf(r,l[n]);0<=D&&r.splice(D,1)}}}}f=(b=d.getModel().isEdge(k))?d.currentEdgeStyle:d.currentVertexStyle;for(g=0;g<r.length;g++){var u=r[g],w=f[u];null==w||"shape"==u&&!b||(!b||0>mxUtils.indexOf(x,u))&&d.setCellStyles(u,w,[k])}}}finally{d.getModel().endUpdate()}};
+d.addListener("cellsInserted",function(a,c){z(c.getProperty("cells"))});d.addListener("textInserted",function(a,c){z(c.getProperty("cells"),!0)});d.connectionHandler.addListener(mxEvent.CONNECT,function(a,c){var b=[c.getProperty("cell")];c.getProperty("terminalInserted")&&b.push(c.getProperty("terminal"));z(b)});this.addListener("styleChanged",mxUtils.bind(this,function(a,c){var b=c.getProperty("cells"),f=!1,g=!1;if(0<b.length)for(var e=0;e<b.length&&(f=d.getModel().isVertex(b[e])||f,!(g=d.getModel().isEdge(b[e])||
+g)||!f);e++);else g=f=!0;for(var b=c.getProperty("keys"),k=c.getProperty("values"),e=0;e<b.length;e++){var p=0<=mxUtils.indexOf(w,b[e]);if("strokeColor"!=b[e]||null!=k[e]&&"none"!=k[e])if(0<=mxUtils.indexOf(x,b[e]))g||0<=mxUtils.indexOf(D,b[e])?null==k[e]?delete d.currentEdgeStyle[b[e]]:d.currentEdgeStyle[b[e]]=k[e]:f&&0<=mxUtils.indexOf(t,b[e])&&(null==k[e]?delete d.currentVertexStyle[b[e]]:d.currentVertexStyle[b[e]]=k[e]);else if(0<=mxUtils.indexOf(t,b[e])){if(f||p)null==k[e]?delete d.currentVertexStyle[b[e]]:
+d.currentVertexStyle[b[e]]=k[e];if(g||p||0<=mxUtils.indexOf(D,b[e]))null==k[e]?delete d.currentEdgeStyle[b[e]]:d.currentEdgeStyle[b[e]]=k[e]}}null!=this.toolbar&&(this.toolbar.setFontName(d.currentVertexStyle.fontFamily||Menus.prototype.defaultFont),this.toolbar.setFontSize(d.currentVertexStyle.fontSize||Menus.prototype.defaultFontSize),null!=this.toolbar.edgeStyleMenu&&(this.toolbar.edgeStyleMenu.getElementsByTagName("div")[0].className="orthogonalEdgeStyle"==d.currentEdgeStyle.edgeStyle&&"1"==d.currentEdgeStyle.curved?
 "geSprite geSprite-curved":"straight"==d.currentEdgeStyle.edgeStyle||"none"==d.currentEdgeStyle.edgeStyle||null==d.currentEdgeStyle.edgeStyle?"geSprite geSprite-straight":"entityRelationEdgeStyle"==d.currentEdgeStyle.edgeStyle?"geSprite geSprite-entity":"elbowEdgeStyle"==d.currentEdgeStyle.edgeStyle?"geSprite geSprite-"+("vertical"==d.currentEdgeStyle.elbow?"verticalelbow":"horizontalelbow"):"isometricEdgeStyle"==d.currentEdgeStyle.edgeStyle?"geSprite geSprite-"+("vertical"==d.currentEdgeStyle.elbow?
 "verticalisometric":"horizontalisometric"):"geSprite geSprite-orthogonal"),null!=this.toolbar.edgeShapeMenu&&(this.toolbar.edgeShapeMenu.getElementsByTagName("div")[0].className="link"==d.currentEdgeStyle.shape?"geSprite geSprite-linkedge":"flexArrow"==d.currentEdgeStyle.shape?"geSprite geSprite-arrow":"arrow"==d.currentEdgeStyle.shape?"geSprite geSprite-simplearrow":"geSprite geSprite-connection"),null!=this.toolbar.lineStartMenu&&(this.toolbar.lineStartMenu.getElementsByTagName("div")[0].className=
 this.getCssClassForMarker("start",d.currentEdgeStyle.shape,d.currentEdgeStyle[mxConstants.STYLE_STARTARROW],mxUtils.getValue(d.currentEdgeStyle,"startFill","1"))),null!=this.toolbar.lineEndMenu&&(this.toolbar.lineEndMenu.getElementsByTagName("div")[0].className=this.getCssClassForMarker("end",d.currentEdgeStyle.shape,d.currentEdgeStyle[mxConstants.STYLE_ENDARROW],mxUtils.getValue(d.currentEdgeStyle,"endFill","1"))))}));null!=this.toolbar&&(a=mxUtils.bind(this,function(){var a=d.currentVertexStyle.fontFamily||
@@ -2028,30 +2028,31 @@ a+"openthin":e==mxConstants.ARROW_BLOCK?"1"==d?"geSprite geSprite-"+a+"block":"g
 a+"ermany":"ERoneToMany"==e?"geSprite geSprite-"+a+"eronetomany":"ERzeroToOne"==e?"geSprite geSprite-"+a+"eroneopt":"ERzeroToMany"==e?"geSprite geSprite-"+a+"ermanyopt":"geSprite geSprite-noarrow"};EditorUi.prototype.createMenus=function(){return null};
 EditorUi.prototype.updatePasteActionStates=function(){var a=this.editor.graph,b=this.actions.get("paste"),e=this.actions.get("pasteHere");b.setEnabled(this.editor.graph.cellEditor.isContentEditing()||!mxClipboard.isEmpty()&&a.isEnabled()&&!a.isCellLocked(a.getDefaultParent()));e.setEnabled(b.isEnabled())};
 EditorUi.prototype.initClipboard=function(){var a=this,b=mxClipboard.cut;mxClipboard.cut=function(d){d.cellEditor.isContentEditing()?document.execCommand("cut",!1,null):b.apply(this,arguments);a.updatePasteActionStates()};var e=mxClipboard.copy;mxClipboard.copy=function(b){b.cellEditor.isContentEditing()?document.execCommand("copy",!1,null):e.apply(this,arguments);a.updatePasteActionStates()};var d=mxClipboard.paste;mxClipboard.paste=function(b){var e=null;b.cellEditor.isContentEditing()?document.execCommand("paste",
-!1,null):e=d.apply(this,arguments);a.updatePasteActionStates();return e};var g=this.editor.graph.cellEditor.startEditing;this.editor.graph.cellEditor.startEditing=function(){g.apply(this,arguments);a.updatePasteActionStates()};var l=this.editor.graph.cellEditor.stopEditing;this.editor.graph.cellEditor.stopEditing=function(b,d){l.apply(this,arguments);a.updatePasteActionStates()};this.updatePasteActionStates()};
+!1,null):e=d.apply(this,arguments);a.updatePasteActionStates();return e};var h=this.editor.graph.cellEditor.startEditing;this.editor.graph.cellEditor.startEditing=function(){h.apply(this,arguments);a.updatePasteActionStates()};var l=this.editor.graph.cellEditor.stopEditing;this.editor.graph.cellEditor.stopEditing=function(b,d){l.apply(this,arguments);a.updatePasteActionStates()};this.updatePasteActionStates()};
 EditorUi.prototype.initCanvas=function(){var a=this.editor.graph,a=this.editor.graph;a.timerAutoScroll=!0;a.getPagePadding=function(){return new mxPoint(Math.max(0,Math.round((a.container.offsetWidth-34)/a.view.scale)),Math.max(0,Math.round((a.container.offsetHeight-34)/a.view.scale)))};a.view.getBackgroundPageBounds=function(){var a=this.graph.getPageLayout(),c=this.graph.getPageSize();return new mxRectangle(this.scale*(this.translate.x+a.x*c.width),this.scale*(this.translate.y+a.y*c.height),this.scale*
-a.width*c.width,this.scale*a.height*c.height)};a.getPreferredPageSize=function(a,c,b){a=this.getPageLayout();c=this.getPageSize();return new mxRectangle(0,0,a.width*c.width,a.height*c.height)};var b=null;if(this.editor.chromeless){this.chromelessResize=b=mxUtils.bind(this,function(c,b){if(null!=a.container){var f=a.pageVisible?a.view.getBackgroundPageBounds():a.getGraphBounds(),d=a.view.translate,h=a.view.scale,f=mxRectangle.fromRectangle(f);f.x=f.x/h-d.x;f.y=f.y/h-d.y;f.width/=h;f.height/=h;var d=
-a.container.scrollTop,e=a.container.scrollLeft,k=mxClient.IS_QUIRKS||8<=document.documentMode?20:14;if(8==document.documentMode||9==document.documentMode)k+=3;var m=a.container.offsetWidth-k,n=c?Math.max(.3,Math.min(b||1,m/f.width)):h;a.view.scaleAndTranslate(n,Math.floor(Math.max((m-n*f.width)/2,0)/n-f.x),Math.floor(Math.max((a.container.offsetHeight-k-n*f.height)/this.lightboxVerticalDivider,0)/n-f.y));a.container.scrollTop=d*n/h;a.container.scrollLeft=e*n/h}});var e=mxUtils.bind(this,function(){b(!1)});
-mxEvent.addListener(window,"resize",e);this.destroyFunctions.push(function(){mxEvent.removeListener(window,"resize",e)});this.editor.addListener("resetGraphView",mxUtils.bind(this,function(){b(!0)}));this.actions.get("zoomIn").funct=function(c){a.zoomIn();b(!1)};this.actions.get("zoomOut").funct=function(c){a.zoomOut();b(!1)};if("0"!=urlParams.toolbar){this.chromelessToolbar=document.createElement("div");this.chromelessToolbar.style.position="fixed";this.chromelessToolbar.style.overflow="hidden";
-this.chromelessToolbar.style.boxSizing="border-box";this.chromelessToolbar.style.whiteSpace="nowrap";this.chromelessToolbar.style.backgroundColor="#000000";this.chromelessToolbar.style.padding="10px 10px 8px 10px";this.chromelessToolbar.style.left="50%";mxClient.IS_VML||(mxUtils.setPrefixedStyle(this.chromelessToolbar.style,"borderRadius","20px"),mxUtils.setPrefixedStyle(this.chromelessToolbar.style,"transition","opacity 600ms ease-in-out"));var d=mxUtils.bind(this,function(){var c=mxUtils.getCurrentStyle(a.container);
-this.chromelessToolbar.style.bottom=(null!=c?parseInt(c["margin-bottom"]||0):0)+(null!=this.tabContainer?20+parseInt(this.tabContainer.style.height):20)+"px"});this.editor.addListener("resetGraphView",d);d();var g=0,d=mxUtils.bind(this,function(a,c,b){g++;var f=document.createElement("span");f.style.paddingLeft="8px";f.style.paddingRight="8px";f.style.cursor="pointer";mxEvent.addListener(f,"click",a);null!=b&&f.setAttribute("title",b);a=document.createElement("img");a.setAttribute("border","0");a.setAttribute("src",
-c);f.appendChild(a);this.chromelessToolbar.appendChild(f);return f}),l=d(mxUtils.bind(this,function(a){this.actions.get("previousPage").funct();mxEvent.consume(a)}),Editor.previousLargeImage,mxResources.get("previousPage")),p=document.createElement("div");p.style.display="inline-block";p.style.verticalAlign="top";p.style.fontFamily="Helvetica,Arial";p.style.marginTop="8px";p.style.color="#ffffff";this.chromelessToolbar.appendChild(p);var q=d(mxUtils.bind(this,function(a){this.actions.get("nextPage").funct();
-mxEvent.consume(a)}),Editor.nextLargeImage,mxResources.get("nextPage")),c=mxUtils.bind(this,function(){null!=this.pages&&1<this.pages.length&&null!=this.currentPage&&(p.innerHTML="",mxUtils.write(p,mxUtils.indexOf(this.pages,this.currentPage)+1+" / "+this.pages.length))});l.style.paddingLeft="0px";l.style.paddingRight="4px";q.style.paddingLeft="4px";q.style.paddingRight="0px";var f=mxUtils.bind(this,function(){null!=this.pages&&1<this.pages.length&&null!=this.currentPage?(q.style.display="",l.style.display=
-"",p.style.display="inline-block"):(q.style.display="none",l.style.display="none",p.style.display="none");c()});this.editor.addListener("resetGraphView",f);this.editor.addListener("pageSelected",c);d(mxUtils.bind(this,function(a){this.actions.get("zoomOut").funct();mxEvent.consume(a)}),Editor.zoomOutLargeImage,mxResources.get("zoomOut")+" (Alt+Mousewheel)");d(mxUtils.bind(this,function(a){this.actions.get("zoomIn").funct();mxEvent.consume(a)}),Editor.zoomInLargeImage,mxResources.get("zoomIn")+" (Alt+Mousewheel)");
-d(mxUtils.bind(this,function(c){a.lightbox?(1==a.view.scale?this.lightboxFit():a.zoomTo(1),b(!1)):b(!0);mxEvent.consume(c)}),Editor.actualSizeLargeImage,mxResources.get("fit"));var h=null,m=null,n=mxUtils.bind(this,function(a){null!=h&&(window.clearTimeout(h),fadeThead=null);null!=m&&(window.clearTimeout(m),fadeThead2=null);h=window.setTimeout(mxUtils.bind(this,function(){mxUtils.setOpacity(this.chromelessToolbar,0);h=null;m=window.setTimeout(mxUtils.bind(this,function(){this.chromelessToolbar.style.display=
-"none";m=null}),600)}),a||200)}),u=mxUtils.bind(this,function(a){null!=h&&(window.clearTimeout(h),fadeThead=null);null!=m&&(window.clearTimeout(m),fadeThead2=null);this.chromelessToolbar.style.display="";mxUtils.setOpacity(this.chromelessToolbar,a||30)});if("1"==urlParams.layers){this.layersDialog=null;var r=d(mxUtils.bind(this,function(c){if(null!=this.layersDialog)this.layersDialog.parentNode.removeChild(this.layersDialog),this.layersDialog=null;else{this.layersDialog=a.createLayersDialog();mxEvent.addListener(this.layersDialog,
-"mouseleave",mxUtils.bind(this,function(){this.layersDialog.parentNode.removeChild(this.layersDialog);this.layersDialog=null}));var b=r.getBoundingClientRect();mxUtils.setPrefixedStyle(this.layersDialog.style,"borderRadius","5px");this.layersDialog.style.position="fixed";this.layersDialog.style.fontFamily="Helvetica,Arial";this.layersDialog.style.backgroundColor="#000000";this.layersDialog.style.width="160px";this.layersDialog.style.padding="4px 2px 4px 2px";this.layersDialog.style.color="#ffffff";
-mxUtils.setOpacity(this.layersDialog,70);this.layersDialog.style.left=b.left+"px";this.layersDialog.style.bottom=parseInt(this.chromelessToolbar.style.bottom)+this.chromelessToolbar.offsetHeight+4+"px";b=mxUtils.getCurrentStyle(this.editor.graph.container);this.layersDialog.style.zIndex=b.zIndex;document.body.appendChild(this.layersDialog)}mxEvent.consume(c)}),Editor.layersLargeImage,mxResources.get("layers")),k=a.getModel();k.addListener(mxEvent.CHANGE,function(){r.style.display=1<k.getChildCount(k.root)?
-"":"none"})}this.addChromelessToolbarItems(d);null!=this.editor.editButtonLink&&d(mxUtils.bind(this,function(a){"_blank"==this.editor.editButtonLink?this.editor.editAsNew(this.getEditBlankXml(),null,!0):window.open(this.editor.editButtonLink,"editWindow");mxEvent.consume(a)}),Editor.editLargeImage,mxResources.get("openInNewWindow"));!a.lightbox||"1"!=urlParams.close&&this.container==document.body||d(mxUtils.bind(this,function(a){"1"==urlParams.close?window.close():(this.destroy(),mxEvent.consume(a))}),
-Editor.closeLargeImage,mxResources.get("close")+" (Escape)");this.chromelessToolbar.style.display="none";mxUtils.setPrefixedStyle(this.chromelessToolbar.style,"transform","translate(-50%,0)");a.container.appendChild(this.chromelessToolbar);mxEvent.addListener(a.container,mxClient.IS_POINTER?"pointermove":"mousemove",mxUtils.bind(this,function(a){mxEvent.isTouchEvent(a)||(mxEvent.isShiftDown(a)||u(30),n())}));mxEvent.addListener(this.chromelessToolbar,mxClient.IS_POINTER?"pointermove":"mousemove",
-function(a){mxEvent.consume(a)});mxEvent.addListener(this.chromelessToolbar,"mouseenter",mxUtils.bind(this,function(a){mxEvent.isShiftDown(a)?n():u(100)}));mxEvent.addListener(this.chromelessToolbar,"mousemove",mxUtils.bind(this,function(a){mxEvent.isShiftDown(a)?n():u(100);mxEvent.consume(a)}));mxEvent.addListener(this.chromelessToolbar,"mouseleave",mxUtils.bind(this,function(a){mxEvent.isTouchEvent(a)||u(30)}));var t=a.getTolerance(),v=this;a.addMouseListener({startX:0,startY:0,scrollLeft:0,scrollTop:0,
-mouseDown:function(c,b){this.startX=b.getGraphX();this.startY=b.getGraphY();this.scrollLeft=a.container.scrollLeft;this.scrollTop=a.container.scrollTop},mouseMove:function(a,c){},mouseUp:function(c,b){mxEvent.isTouchEvent(b.getEvent())&&Math.abs(this.scrollLeft-a.container.scrollLeft)<t&&Math.abs(this.scrollTop-a.container.scrollTop)<t&&Math.abs(this.startX-b.getGraphX())<t&&Math.abs(this.startY-b.getGraphY())<t&&(0<parseFloat(v.chromelessToolbar.style.opacity||0)?n():u(30))}})}this.editor.editable||
-this.addChromelessClickHandler()}else if(this.editor.extendCanvas){var x=a.view.validate;a.view.validate=function(){if(null!=this.graph.container&&mxUtils.hasScrollbars(this.graph.container)){var a=this.graph.getPagePadding(),c=this.graph.getPageSize();this.translate.x=a.x-(this.x0||0)*c.width;this.translate.y=a.y-(this.y0||0)*c.height}x.apply(this,arguments)};var w=a.sizeDidChange;a.sizeDidChange=function(){if(null!=this.container&&mxUtils.hasScrollbars(this.container)){var c=this.getPageLayout(),
-b=this.getPagePadding(),f=this.getPageSize(),d=Math.ceil(2*b.x+c.width*f.width),h=Math.ceil(2*b.y+c.height*f.height),e=a.minimumGraphSize;if(null==e||e.width!=d||e.height!=h)a.minimumGraphSize=new mxRectangle(0,0,d,h);d=b.x-c.x*f.width;b=b.y-c.y*f.height;this.autoTranslate||this.view.translate.x==d&&this.view.translate.y==b?w.apply(this,arguments):(this.autoTranslate=!0,this.view.x0=c.x,this.view.y0=c.y,c=a.view.translate.x,f=a.view.translate.y,a.view.setTranslate(d,b),a.container.scrollLeft+=Math.round((d-
-c)*a.view.scale),a.container.scrollTop+=Math.round((b-f)*a.view.scale),this.autoTranslate=!1)}}}a.updateZoomTimeout=null;a.cumulativeZoomFactor=1;var D=null;a.lazyZoom=function(c){null!=this.updateZoomTimeout&&window.clearTimeout(this.updateZoomTimeout);c?.15>this.view.scale*this.cumulativeZoomFactor?this.cumulativeZoomFactor=(this.view.scale+.01)/this.view.scale:(this.cumulativeZoomFactor*=this.zoomFactor,this.cumulativeZoomFactor=Math.round(this.view.scale*this.cumulativeZoomFactor*20)/20/this.view.scale):
-.15>=this.view.scale*this.cumulativeZoomFactor?this.cumulativeZoomFactor=(this.view.scale-.01)/this.view.scale:(this.cumulativeZoomFactor/=this.zoomFactor,this.cumulativeZoomFactor=Math.round(this.view.scale*this.cumulativeZoomFactor*20)/20/this.view.scale);this.cumulativeZoomFactor=Math.max(.01,Math.min(this.view.scale*this.cumulativeZoomFactor,160)/this.view.scale);this.updateZoomTimeout=window.setTimeout(mxUtils.bind(this,function(){this.zoom(this.cumulativeZoomFactor);null!=b&&b(!1);if(null!=
-D&&mxUtils.hasScrollbars(a.container)){var c=mxUtils.getOffset(a.container),f=a.container.offsetHeight/2-D.y+c.y;a.container.scrollLeft-=(a.container.offsetWidth/2-D.x+c.x)*(this.cumulativeZoomFactor-1);a.container.scrollTop-=f*(this.cumulativeZoomFactor-1)}this.cumulativeZoomFactor=1;this.updateZoomTimeout=null}),20)};mxEvent.addMouseWheelListener(mxUtils.bind(this,function(c,b){if((mxEvent.isAltDown(c)||mxEvent.isControlDown(c)&&!mxClient.IS_MAC||a.panningHandler.isActive())&&(null==this.dialogs||
-0==this.dialogs.length))for(var f=mxEvent.getSource(c);null!=f;){if(f==a.container){D=new mxPoint(mxEvent.getClientX(c),mxEvent.getClientY(c));a.lazyZoom(b);mxEvent.consume(c);break}f=f.parentNode}}))};EditorUi.prototype.addChromelessToolbarItems=function(a){a(mxUtils.bind(this,function(a){this.actions.get("print").funct();mxEvent.consume(a)}),Editor.printLargeImage,mxResources.get("print"))};
+a.width*c.width,this.scale*a.height*c.height)};a.getPreferredPageSize=function(a,c,b){a=this.getPageLayout();c=this.getPageSize();return new mxRectangle(0,0,a.width*c.width,a.height*c.height)};var b=null;if(this.editor.chromeless){this.chromelessResize=b=mxUtils.bind(this,function(c,b,f,d){if(null!=a.container){f=null!=f?f:0;d=null!=d?d:0;var g=a.pageVisible?a.view.getBackgroundPageBounds():a.getGraphBounds(),e=mxUtils.hasScrollbars(a.container),k=a.view.translate,p=a.view.scale,m=mxRectangle.fromRectangle(g);
+m.x=m.x/p-k.x;m.y=m.y/p-k.y;m.width/=p;m.height/=p;var k=a.container.scrollTop,r=a.container.scrollLeft,t=mxClient.IS_QUIRKS||8<=document.documentMode?20:14;if(8==document.documentMode||9==document.documentMode)t+=3;var v=a.container.offsetWidth-t,t=a.container.offsetHeight-t;c=c?Math.max(.3,Math.min(b||1,v/m.width)):p;b=(v-c*m.width)/2/c;var u=(t-c*m.height)/this.lightboxVerticalDivider/c;e&&(b=Math.max(b,0),u=Math.max(u,0));if(e||g.width<v||g.height<t)a.view.scaleAndTranslate(c,Math.floor(b-m.x),
+Math.floor(u-m.y)),a.container.scrollTop=k*c/p,a.container.scrollLeft=r*c/p;else if(0!=f||0!=d)g=a.view.translate,a.view.setTranslate(Math.floor(g.x+f/p),Math.floor(g.y+d/p))}});var e=mxUtils.bind(this,function(){b(!1)});mxEvent.addListener(window,"resize",e);this.destroyFunctions.push(function(){mxEvent.removeListener(window,"resize",e)});this.editor.addListener("resetGraphView",mxUtils.bind(this,function(){b(!0)}));this.actions.get("zoomIn").funct=function(c){a.zoomIn();b(!1)};this.actions.get("zoomOut").funct=
+function(c){a.zoomOut();b(!1)};if("0"!=urlParams.toolbar){this.chromelessToolbar=document.createElement("div");this.chromelessToolbar.style.position="fixed";this.chromelessToolbar.style.overflow="hidden";this.chromelessToolbar.style.boxSizing="border-box";this.chromelessToolbar.style.whiteSpace="nowrap";this.chromelessToolbar.style.backgroundColor="#000000";this.chromelessToolbar.style.padding="10px 10px 8px 10px";this.chromelessToolbar.style.left="50%";mxClient.IS_VML||(mxUtils.setPrefixedStyle(this.chromelessToolbar.style,
+"borderRadius","20px"),mxUtils.setPrefixedStyle(this.chromelessToolbar.style,"transition","opacity 600ms ease-in-out"));var d=mxUtils.bind(this,function(){var c=mxUtils.getCurrentStyle(a.container);this.chromelessToolbar.style.bottom=(null!=c?parseInt(c["margin-bottom"]||0):0)+(null!=this.tabContainer?20+parseInt(this.tabContainer.style.height):20)+"px"});this.editor.addListener("resetGraphView",d);d();var h=0,d=mxUtils.bind(this,function(a,c,b){h++;var f=document.createElement("span");f.style.paddingLeft=
+"8px";f.style.paddingRight="8px";f.style.cursor="pointer";mxEvent.addListener(f,"click",a);null!=b&&f.setAttribute("title",b);a=document.createElement("img");a.setAttribute("border","0");a.setAttribute("src",c);f.appendChild(a);this.chromelessToolbar.appendChild(f);return f}),l=d(mxUtils.bind(this,function(a){this.actions.get("previousPage").funct();mxEvent.consume(a)}),Editor.previousLargeImage,mxResources.get("previousPage")),n=document.createElement("div");n.style.display="inline-block";n.style.verticalAlign=
+"top";n.style.fontFamily="Helvetica,Arial";n.style.marginTop="8px";n.style.color="#ffffff";this.chromelessToolbar.appendChild(n);var q=d(mxUtils.bind(this,function(a){this.actions.get("nextPage").funct();mxEvent.consume(a)}),Editor.nextLargeImage,mxResources.get("nextPage")),c=mxUtils.bind(this,function(){null!=this.pages&&1<this.pages.length&&null!=this.currentPage&&(n.innerHTML="",mxUtils.write(n,mxUtils.indexOf(this.pages,this.currentPage)+1+" / "+this.pages.length))});l.style.paddingLeft="0px";
+l.style.paddingRight="4px";q.style.paddingLeft="4px";q.style.paddingRight="0px";var f=mxUtils.bind(this,function(){null!=this.pages&&1<this.pages.length&&null!=this.currentPage?(q.style.display="",l.style.display="",n.style.display="inline-block"):(q.style.display="none",l.style.display="none",n.style.display="none");c()});this.editor.addListener("resetGraphView",f);this.editor.addListener("pageSelected",c);d(mxUtils.bind(this,function(a){this.actions.get("zoomOut").funct();mxEvent.consume(a)}),Editor.zoomOutLargeImage,
+mxResources.get("zoomOut")+" (Alt+Mousewheel)");d(mxUtils.bind(this,function(a){this.actions.get("zoomIn").funct();mxEvent.consume(a)}),Editor.zoomInLargeImage,mxResources.get("zoomIn")+" (Alt+Mousewheel)");d(mxUtils.bind(this,function(c){a.lightbox?(1==a.view.scale?this.lightboxFit():a.zoomTo(1),b(!1)):b(!0);mxEvent.consume(c)}),Editor.actualSizeLargeImage,mxResources.get("fit"));var g=null,p=null,m=mxUtils.bind(this,function(a){null!=g&&(window.clearTimeout(g),fadeThead=null);null!=p&&(window.clearTimeout(p),
+fadeThead2=null);g=window.setTimeout(mxUtils.bind(this,function(){mxUtils.setOpacity(this.chromelessToolbar,0);g=null;p=window.setTimeout(mxUtils.bind(this,function(){this.chromelessToolbar.style.display="none";p=null}),600)}),a||200)}),u=mxUtils.bind(this,function(a){null!=g&&(window.clearTimeout(g),fadeThead=null);null!=p&&(window.clearTimeout(p),fadeThead2=null);this.chromelessToolbar.style.display="";mxUtils.setOpacity(this.chromelessToolbar,a||30)});if("1"==urlParams.layers){this.layersDialog=
+null;var r=d(mxUtils.bind(this,function(c){if(null!=this.layersDialog)this.layersDialog.parentNode.removeChild(this.layersDialog),this.layersDialog=null;else{this.layersDialog=a.createLayersDialog();mxEvent.addListener(this.layersDialog,"mouseleave",mxUtils.bind(this,function(){this.layersDialog.parentNode.removeChild(this.layersDialog);this.layersDialog=null}));var b=r.getBoundingClientRect();mxUtils.setPrefixedStyle(this.layersDialog.style,"borderRadius","5px");this.layersDialog.style.position=
+"fixed";this.layersDialog.style.fontFamily="Helvetica,Arial";this.layersDialog.style.backgroundColor="#000000";this.layersDialog.style.width="160px";this.layersDialog.style.padding="4px 2px 4px 2px";this.layersDialog.style.color="#ffffff";mxUtils.setOpacity(this.layersDialog,70);this.layersDialog.style.left=b.left+"px";this.layersDialog.style.bottom=parseInt(this.chromelessToolbar.style.bottom)+this.chromelessToolbar.offsetHeight+4+"px";b=mxUtils.getCurrentStyle(this.editor.graph.container);this.layersDialog.style.zIndex=
+b.zIndex;document.body.appendChild(this.layersDialog)}mxEvent.consume(c)}),Editor.layersLargeImage,mxResources.get("layers")),k=a.getModel();k.addListener(mxEvent.CHANGE,function(){r.style.display=1<k.getChildCount(k.root)?"":"none"})}this.addChromelessToolbarItems(d);null!=this.editor.editButtonLink&&d(mxUtils.bind(this,function(a){"_blank"==this.editor.editButtonLink?this.editor.editAsNew(this.getEditBlankXml(),null,!0):window.open(this.editor.editButtonLink,"editWindow");mxEvent.consume(a)}),Editor.editLargeImage,
+mxResources.get("openInNewWindow"));!a.lightbox||"1"!=urlParams.close&&this.container==document.body||d(mxUtils.bind(this,function(a){"1"==urlParams.close?window.close():(this.destroy(),mxEvent.consume(a))}),Editor.closeLargeImage,mxResources.get("close")+" (Escape)");this.chromelessToolbar.style.display="none";mxUtils.setPrefixedStyle(this.chromelessToolbar.style,"transform","translate(-50%,0)");a.container.appendChild(this.chromelessToolbar);mxEvent.addListener(a.container,mxClient.IS_POINTER?"pointermove":
+"mousemove",mxUtils.bind(this,function(a){mxEvent.isTouchEvent(a)||(mxEvent.isShiftDown(a)||u(30),m())}));mxEvent.addListener(this.chromelessToolbar,mxClient.IS_POINTER?"pointermove":"mousemove",function(a){mxEvent.consume(a)});mxEvent.addListener(this.chromelessToolbar,"mouseenter",mxUtils.bind(this,function(a){mxEvent.isShiftDown(a)?m():u(100)}));mxEvent.addListener(this.chromelessToolbar,"mousemove",mxUtils.bind(this,function(a){mxEvent.isShiftDown(a)?m():u(100);mxEvent.consume(a)}));mxEvent.addListener(this.chromelessToolbar,
+"mouseleave",mxUtils.bind(this,function(a){mxEvent.isTouchEvent(a)||u(30)}));var v=a.getTolerance(),t=this;a.addMouseListener({startX:0,startY:0,scrollLeft:0,scrollTop:0,mouseDown:function(c,b){this.startX=b.getGraphX();this.startY=b.getGraphY();this.scrollLeft=a.container.scrollLeft;this.scrollTop=a.container.scrollTop},mouseMove:function(a,c){},mouseUp:function(c,b){mxEvent.isTouchEvent(b.getEvent())&&Math.abs(this.scrollLeft-a.container.scrollLeft)<v&&Math.abs(this.scrollTop-a.container.scrollTop)<
+v&&Math.abs(this.startX-b.getGraphX())<v&&Math.abs(this.startY-b.getGraphY())<v&&(0<parseFloat(t.chromelessToolbar.style.opacity||0)?m():u(30))}})}this.editor.editable||this.addChromelessClickHandler()}else if(this.editor.extendCanvas){var x=a.view.validate;a.view.validate=function(){if(null!=this.graph.container&&mxUtils.hasScrollbars(this.graph.container)){var a=this.graph.getPagePadding(),c=this.graph.getPageSize();this.translate.x=a.x-(this.x0||0)*c.width;this.translate.y=a.y-(this.y0||0)*c.height}x.apply(this,
+arguments)};var w=a.sizeDidChange;a.sizeDidChange=function(){if(null!=this.container&&mxUtils.hasScrollbars(this.container)){var c=this.getPageLayout(),b=this.getPagePadding(),f=this.getPageSize(),d=Math.ceil(2*b.x+c.width*f.width),g=Math.ceil(2*b.y+c.height*f.height),e=a.minimumGraphSize;if(null==e||e.width!=d||e.height!=g)a.minimumGraphSize=new mxRectangle(0,0,d,g);d=b.x-c.x*f.width;b=b.y-c.y*f.height;this.autoTranslate||this.view.translate.x==d&&this.view.translate.y==b?w.apply(this,arguments):
+(this.autoTranslate=!0,this.view.x0=c.x,this.view.y0=c.y,c=a.view.translate.x,f=a.view.translate.y,a.view.setTranslate(d,b),a.container.scrollLeft+=Math.round((d-c)*a.view.scale),a.container.scrollTop+=Math.round((b-f)*a.view.scale),this.autoTranslate=!1)}}}a.updateZoomTimeout=null;a.cumulativeZoomFactor=1;var D=null;a.lazyZoom=function(c){null!=this.updateZoomTimeout&&window.clearTimeout(this.updateZoomTimeout);c?.15>this.view.scale*this.cumulativeZoomFactor?this.cumulativeZoomFactor=(this.view.scale+
+.01)/this.view.scale:(this.cumulativeZoomFactor*=this.zoomFactor,this.cumulativeZoomFactor=Math.round(this.view.scale*this.cumulativeZoomFactor*20)/20/this.view.scale):.15>=this.view.scale*this.cumulativeZoomFactor?this.cumulativeZoomFactor=(this.view.scale-.01)/this.view.scale:(this.cumulativeZoomFactor/=this.zoomFactor,this.cumulativeZoomFactor=Math.round(this.view.scale*this.cumulativeZoomFactor*20)/20/this.view.scale);this.cumulativeZoomFactor=Math.max(.01,Math.min(this.view.scale*this.cumulativeZoomFactor,
+160)/this.view.scale);this.updateZoomTimeout=window.setTimeout(mxUtils.bind(this,function(){var c=mxUtils.getOffset(a.container),f=0,d=0;null!=D&&(f=a.container.offsetWidth/2-D.x+c.x,d=a.container.offsetHeight/2-D.y+c.y);c=this.view.scale;this.zoom(this.cumulativeZoomFactor);this.view.scale!=c&&(null!=b&&b(!1,null,f*(this.cumulativeZoomFactor-1),d*(this.cumulativeZoomFactor-1)),!mxUtils.hasScrollbars(a.container)||0==f&&0==d||(a.container.scrollLeft-=f*(this.cumulativeZoomFactor-1),a.container.scrollTop-=
+d*(this.cumulativeZoomFactor-1)));this.cumulativeZoomFactor=1;this.updateZoomTimeout=null}),20)};mxEvent.addMouseWheelListener(mxUtils.bind(this,function(c,b){if((mxEvent.isAltDown(c)||mxEvent.isControlDown(c)&&!mxClient.IS_MAC||a.panningHandler.isActive())&&(null==this.dialogs||0==this.dialogs.length))for(var f=mxEvent.getSource(c);null!=f;){if(f==a.container){D=new mxPoint(mxEvent.getClientX(c),mxEvent.getClientY(c));a.lazyZoom(b);mxEvent.consume(c);break}f=f.parentNode}}))};
+EditorUi.prototype.addChromelessToolbarItems=function(a){a(mxUtils.bind(this,function(a){this.actions.get("print").funct();mxEvent.consume(a)}),Editor.printLargeImage,mxResources.get("print"))};
 EditorUi.prototype.createTemporaryGraph=function(a){a=new Graph(document.createElement("div"),null,null,a);a.resetViewOnRootChange=!1;a.setConnectable(!1);a.gridEnabled=!1;a.autoScroll=!1;a.setTooltips(!1);a.setEnabled(!1);a.container.style.visibility="hidden";a.container.style.position="absolute";a.container.style.overflow="hidden";a.container.style.height="1px";a.container.style.width="1px";return a};
 EditorUi.prototype.addChromelessClickHandler=function(){var a=urlParams.highlight;null!=a&&0<a.length&&(a="#"+a);this.editor.graph.addClickHandler(a)};EditorUi.prototype.toggleFormatPanel=function(a){this.formatWidth=a||0<this.formatWidth?0:240;this.formatContainer.style.display=a||0<this.formatWidth?"":"none";this.refresh();this.format.refresh();this.fireEvent(new mxEventObject("formatWidthChanged"))};
 EditorUi.prototype.lightboxFit=function(){if(this.isDiagramEmpty())this.editor.graph.view.setScale(1);else{var a=urlParams.border,b=60;null!=a&&(b=parseInt(a));this.editor.graph.maxFitScale=this.lightboxMaxFitScale;this.editor.graph.fit(b);this.editor.graph.maxFitScale=null}};EditorUi.prototype.isDiagramEmpty=function(){var a=this.editor.graph.getModel();return 1==a.getChildCount(a.root)&&0==a.getChildCount(a.getChildAt(a.root,0))};
@@ -2067,27 +2068,27 @@ EditorUi.prototype.resetScrollbars=function(){var a=this.editor.graph;if(!this.e
 0<b.width&&0<b.height&&(b.x>a.container.scrollLeft+.9*a.container.clientWidth&&(a.container.scrollLeft=Math.min(b.x+b.width-a.container.clientWidth,b.x-10)),b.y>a.container.scrollTop+.9*a.container.clientHeight&&(a.container.scrollTop=Math.min(b.y+b.height-a.container.clientHeight,b.y-10)))}else{var b=a.getGraphBounds(),e=Math.max(b.width,a.scrollTileSize.width*a.view.scale);a.container.scrollTop=Math.floor(Math.max(0,b.y-Math.max(20,(a.container.clientHeight-Math.max(b.height,a.scrollTileSize.height*
 a.view.scale))/4)));a.container.scrollLeft=Math.floor(Math.max(0,b.x-Math.max(0,(a.container.clientWidth-e)/2)))}else a.pageVisible?(b=a.view.getBackgroundPageBounds(),a.view.setTranslate(Math.floor(Math.max(0,(a.container.clientWidth-b.width)/2)-b.x),Math.floor(Math.max(0,(a.container.clientHeight-b.height)/2)-b.y))):(b=a.getGraphBounds(),a.view.setTranslate(Math.floor(Math.max(0,Math.max(0,(a.container.clientWidth-b.width)/2)-b.x)),Math.floor(Math.max(0,Math.max(20,(a.container.clientHeight-b.height)/
 4))-b.y)))};
-EditorUi.prototype.setPageVisible=function(a){var b=this.editor.graph,e=mxUtils.hasScrollbars(b.container),d=0,g=0;e&&(d=b.view.translate.x*b.view.scale-b.container.scrollLeft,g=b.view.translate.y*b.view.scale-b.container.scrollTop);b.pageVisible=a;b.pageBreaksVisible=a;b.preferPageSize=a;b.view.validateBackground();e&&(a=b.getSelectionCells(),b.clearSelection(),b.setSelectionCells(a));b.sizeDidChange();e&&(b.container.scrollLeft=b.view.translate.x*b.view.scale-d,b.container.scrollTop=b.view.translate.y*
-b.view.scale-g);this.fireEvent(new mxEventObject("pageViewChanged"))};function ChangePageSetup(a,b,e,d){this.ui=a;this.previousColor=b;this.previousImage=e;this.previousFormat=d;this.ignoreImage=this.ignoreColor=!1}
+EditorUi.prototype.setPageVisible=function(a){var b=this.editor.graph,e=mxUtils.hasScrollbars(b.container),d=0,h=0;e&&(d=b.view.translate.x*b.view.scale-b.container.scrollLeft,h=b.view.translate.y*b.view.scale-b.container.scrollTop);b.pageVisible=a;b.pageBreaksVisible=a;b.preferPageSize=a;b.view.validateBackground();e&&(a=b.getSelectionCells(),b.clearSelection(),b.setSelectionCells(a));b.sizeDidChange();e&&(b.container.scrollLeft=b.view.translate.x*b.view.scale-d,b.container.scrollTop=b.view.translate.y*
+b.view.scale-h);this.fireEvent(new mxEventObject("pageViewChanged"))};function ChangePageSetup(a,b,e,d){this.ui=a;this.previousColor=b;this.previousImage=e;this.previousFormat=d;this.ignoreImage=this.ignoreColor=!1}
 ChangePageSetup.prototype.execute=function(){var a=this.ui.editor.graph;if(!this.ignoreColor){var b=a.background;this.ui.setBackgroundColor(this.previousColor);this.previousColor=b}this.ignoreImage||(b=a.backgroundImage,this.ui.setBackgroundImage(this.previousImage),this.previousImage=b);null!=this.previousFormat&&(b=a.pageFormat,this.previousFormat.width!=b.width||this.previousFormat.height!=b.height)&&(this.ui.setPageFormat(this.previousFormat),this.previousFormat=b)};
 EditorUi.prototype.setBackgroundColor=function(a){this.editor.graph.background=a;this.editor.graph.view.validateBackground();this.fireEvent(new mxEventObject("backgroundColorChanged"))};EditorUi.prototype.setFoldingEnabled=function(a){this.editor.graph.foldingEnabled=a;this.editor.graph.view.revalidate();this.fireEvent(new mxEventObject("foldingEnabledChanged"))};
 EditorUi.prototype.setPageFormat=function(a){this.editor.graph.pageFormat=a;this.editor.graph.pageVisible?(this.editor.graph.view.validateBackground(),this.editor.graph.sizeDidChange()):this.actions.get("pageView").funct();this.fireEvent(new mxEventObject("pageFormatChanged"))};EditorUi.prototype.setPageScale=function(a){this.editor.graph.pageScale=a;this.editor.graph.pageVisible?(this.editor.graph.view.validateBackground(),this.editor.graph.sizeDidChange()):this.actions.get("pageView").funct();this.fireEvent(new mxEventObject("pageScaleChanged"))};
 EditorUi.prototype.setGridColor=function(a){this.editor.graph.view.gridColor=a;this.editor.graph.view.validateBackground();this.fireEvent(new mxEventObject("gridColorChanged"))};
-EditorUi.prototype.addUndoListener=function(){var a=this.actions.get("undo"),b=this.actions.get("redo"),e=this.editor.undoManager,d=mxUtils.bind(this,function(){a.setEnabled(this.canUndo());b.setEnabled(this.canRedo())});e.addListener(mxEvent.ADD,d);e.addListener(mxEvent.UNDO,d);e.addListener(mxEvent.REDO,d);e.addListener(mxEvent.CLEAR,d);var g=this.editor.graph.cellEditor.startEditing;this.editor.graph.cellEditor.startEditing=function(){g.apply(this,arguments);d()};var l=this.editor.graph.cellEditor.stopEditing;
+EditorUi.prototype.addUndoListener=function(){var a=this.actions.get("undo"),b=this.actions.get("redo"),e=this.editor.undoManager,d=mxUtils.bind(this,function(){a.setEnabled(this.canUndo());b.setEnabled(this.canRedo())});e.addListener(mxEvent.ADD,d);e.addListener(mxEvent.UNDO,d);e.addListener(mxEvent.REDO,d);e.addListener(mxEvent.CLEAR,d);var h=this.editor.graph.cellEditor.startEditing;this.editor.graph.cellEditor.startEditing=function(){h.apply(this,arguments);d()};var l=this.editor.graph.cellEditor.stopEditing;
 this.editor.graph.cellEditor.stopEditing=function(a,b){l.apply(this,arguments);d()};d()};
-EditorUi.prototype.updateActionStates=function(){var a=this.editor.graph,b=!a.isSelectionEmpty(),e=!1,d=!1,g=a.getSelectionCells();if(null!=g)for(var l=0;l<g.length;l++){var p=g[l];a.getModel().isEdge(p)&&(d=!0);a.getModel().isVertex(p)&&(e=!0);if(d&&e)break}g="cut copy bold italic underline delete duplicate editStyle editTooltip editLink backgroundColor borderColor edit toFront toBack lockUnlock solid dashed dotted fillColor gradientColor shadow fontColor formattedText rounded toggleRounded sharp strokeColor".split(" ");for(l=
-0;l<g.length;l++)this.actions.get(g[l]).setEnabled(b);this.actions.get("setAsDefaultStyle").setEnabled(1==a.getSelectionCount());this.actions.get("clearWaypoints").setEnabled(!a.isSelectionEmpty());this.actions.get("turn").setEnabled(!a.isSelectionEmpty());this.actions.get("curved").setEnabled(d);this.actions.get("rotation").setEnabled(e);this.actions.get("wordWrap").setEnabled(e);this.actions.get("autosize").setEnabled(e);d=e&&1==a.getSelectionCount();this.actions.get("group").setEnabled(1<a.getSelectionCount()||
+EditorUi.prototype.updateActionStates=function(){var a=this.editor.graph,b=!a.isSelectionEmpty(),e=!1,d=!1,h=a.getSelectionCells();if(null!=h)for(var l=0;l<h.length;l++){var n=h[l];a.getModel().isEdge(n)&&(d=!0);a.getModel().isVertex(n)&&(e=!0);if(d&&e)break}h="cut copy bold italic underline delete duplicate editStyle editTooltip editLink backgroundColor borderColor edit toFront toBack lockUnlock solid dashed dotted fillColor gradientColor shadow fontColor formattedText rounded toggleRounded sharp strokeColor".split(" ");for(l=
+0;l<h.length;l++)this.actions.get(h[l]).setEnabled(b);this.actions.get("setAsDefaultStyle").setEnabled(1==a.getSelectionCount());this.actions.get("clearWaypoints").setEnabled(!a.isSelectionEmpty());this.actions.get("turn").setEnabled(!a.isSelectionEmpty());this.actions.get("curved").setEnabled(d);this.actions.get("rotation").setEnabled(e);this.actions.get("wordWrap").setEnabled(e);this.actions.get("autosize").setEnabled(e);d=e&&1==a.getSelectionCount();this.actions.get("group").setEnabled(1<a.getSelectionCount()||
 d&&!a.isContainer(a.getSelectionCell()));this.actions.get("ungroup").setEnabled(1==a.getSelectionCount()&&(0<a.getModel().getChildCount(a.getSelectionCell())||d&&a.isContainer(a.getSelectionCell())));this.actions.get("removeFromGroup").setEnabled(d&&a.getModel().isVertex(a.getModel().getParent(a.getSelectionCell())));a.view.getState(a.getSelectionCell());this.menus.get("navigation").setEnabled(b||null!=a.view.currentRoot);this.actions.get("collapsible").setEnabled(e&&(a.isContainer(a.getSelectionCell())||
 0<a.model.getChildCount(a.getSelectionCell())));this.actions.get("home").setEnabled(null!=a.view.currentRoot);this.actions.get("exitGroup").setEnabled(null!=a.view.currentRoot);this.actions.get("enterGroup").setEnabled(1==a.getSelectionCount()&&a.isValidRoot(a.getSelectionCell()));b=1==a.getSelectionCount()&&a.isCellFoldable(a.getSelectionCell());this.actions.get("expand").setEnabled(b);this.actions.get("collapse").setEnabled(b);this.actions.get("editLink").setEnabled(1==a.getSelectionCount());this.actions.get("openLink").setEnabled(1==
 a.getSelectionCount()&&null!=a.getLinkForCell(a.getSelectionCell()));this.actions.get("guides").setEnabled(a.isEnabled());this.actions.get("grid").setEnabled(!this.editor.chromeless||this.editor.editable);b=a.isEnabled()&&!a.isCellLocked(a.getDefaultParent());this.menus.get("layout").setEnabled(b);this.menus.get("insert").setEnabled(b);this.menus.get("direction").setEnabled(b&&e);this.menus.get("align").setEnabled(b&&e&&1<a.getSelectionCount());this.menus.get("distribute").setEnabled(b&&e&&1<a.getSelectionCount());
 this.actions.get("selectVertices").setEnabled(b);this.actions.get("selectEdges").setEnabled(b);this.actions.get("selectAll").setEnabled(b);this.actions.get("selectNone").setEnabled(b);this.updatePasteActionStates()};
-EditorUi.prototype.refresh=function(a){a=null!=a?a:!0;var b=mxClient.IS_IE&&(null==document.documentMode||5==document.documentMode),e=this.container.clientWidth,d=this.container.clientHeight;this.container==document.body&&(e=document.body.clientWidth||document.documentElement.clientWidth,d=b?document.body.clientHeight||document.documentElement.clientHeight:document.documentElement.clientHeight);var g=0;mxClient.IS_IOS&&!window.navigator.standalone&&window.innerHeight!=document.documentElement.clientHeight&&
-(g=document.documentElement.clientHeight-window.innerHeight,window.scrollTo(0,0));var l=Math.max(0,Math.min(this.hsplitPosition,e-this.splitSize-20)),p=0;null!=this.menubar&&(this.menubarContainer.style.height=this.menubarHeight+"px",p+=this.menubarHeight);null!=this.toolbar&&(this.toolbarContainer.style.top=this.menubarHeight+"px",this.toolbarContainer.style.height=this.toolbarHeight+"px",p+=this.toolbarHeight);0<p&&!mxClient.IS_QUIRKS&&(p+=1);var q=0;if(null!=this.sidebarFooterContainer){var c=
-this.footerHeight+g,q=Math.max(0,Math.min(d-p-c,this.sidebarFooterHeight));this.sidebarFooterContainer.style.width=l+"px";this.sidebarFooterContainer.style.height=q+"px";this.sidebarFooterContainer.style.bottom=c+"px"}c=null!=this.format?this.formatWidth:0;this.sidebarContainer.style.top=p+"px";this.sidebarContainer.style.width=l+"px";this.formatContainer.style.top=p+"px";this.formatContainer.style.width=c+"px";this.formatContainer.style.display=null!=this.format?"":"none";this.diagramContainer.style.left=
-null!=this.hsplit.parentNode?l+this.splitSize+"px":"0px";this.diagramContainer.style.top=this.sidebarContainer.style.top;this.footerContainer.style.height=this.footerHeight+"px";this.hsplit.style.top=this.sidebarContainer.style.top;this.hsplit.style.bottom=this.footerHeight+g+"px";this.hsplit.style.left=l+"px";null!=this.tabContainer&&(this.tabContainer.style.left=this.diagramContainer.style.left);b?(this.menubarContainer.style.width=e+"px",this.toolbarContainer.style.width=this.menubarContainer.style.width,
+EditorUi.prototype.refresh=function(a){a=null!=a?a:!0;var b=mxClient.IS_IE&&(null==document.documentMode||5==document.documentMode),e=this.container.clientWidth,d=this.container.clientHeight;this.container==document.body&&(e=document.body.clientWidth||document.documentElement.clientWidth,d=b?document.body.clientHeight||document.documentElement.clientHeight:document.documentElement.clientHeight);var h=0;mxClient.IS_IOS&&!window.navigator.standalone&&window.innerHeight!=document.documentElement.clientHeight&&
+(h=document.documentElement.clientHeight-window.innerHeight,window.scrollTo(0,0));var l=Math.max(0,Math.min(this.hsplitPosition,e-this.splitSize-20)),n=0;null!=this.menubar&&(this.menubarContainer.style.height=this.menubarHeight+"px",n+=this.menubarHeight);null!=this.toolbar&&(this.toolbarContainer.style.top=this.menubarHeight+"px",this.toolbarContainer.style.height=this.toolbarHeight+"px",n+=this.toolbarHeight);0<n&&!mxClient.IS_QUIRKS&&(n+=1);var q=0;if(null!=this.sidebarFooterContainer){var c=
+this.footerHeight+h,q=Math.max(0,Math.min(d-n-c,this.sidebarFooterHeight));this.sidebarFooterContainer.style.width=l+"px";this.sidebarFooterContainer.style.height=q+"px";this.sidebarFooterContainer.style.bottom=c+"px"}c=null!=this.format?this.formatWidth:0;this.sidebarContainer.style.top=n+"px";this.sidebarContainer.style.width=l+"px";this.formatContainer.style.top=n+"px";this.formatContainer.style.width=c+"px";this.formatContainer.style.display=null!=this.format?"":"none";this.diagramContainer.style.left=
+null!=this.hsplit.parentNode?l+this.splitSize+"px":"0px";this.diagramContainer.style.top=this.sidebarContainer.style.top;this.footerContainer.style.height=this.footerHeight+"px";this.hsplit.style.top=this.sidebarContainer.style.top;this.hsplit.style.bottom=this.footerHeight+h+"px";this.hsplit.style.left=l+"px";null!=this.tabContainer&&(this.tabContainer.style.left=this.diagramContainer.style.left);b?(this.menubarContainer.style.width=e+"px",this.toolbarContainer.style.width=this.menubarContainer.style.width,
 b=Math.max(0,d-this.footerHeight-this.menubarHeight-this.toolbarHeight),this.sidebarContainer.style.height=b-q+"px",this.formatContainer.style.height=b+"px",this.diagramContainer.style.width=null!=this.hsplit.parentNode?Math.max(0,e-l-this.splitSize-c)+"px":e+"px",this.footerContainer.style.width=this.menubarContainer.style.width,q=Math.max(0,d-this.footerHeight-this.menubarHeight-this.toolbarHeight),null!=this.tabContainer&&(this.tabContainer.style.width=this.diagramContainer.style.width,this.tabContainer.style.bottom=
-this.footerHeight+g+"px",q-=this.tabContainer.clientHeight),this.diagramContainer.style.height=q+"px",this.hsplit.style.height=q+"px"):(0<this.footerHeight&&(this.footerContainer.style.bottom=g+"px"),this.diagramContainer.style.right=c+"px",e=0,null!=this.tabContainer&&(this.tabContainer.style.bottom=this.footerHeight+g+"px",this.tabContainer.style.right=this.diagramContainer.style.right,e=this.tabContainer.clientHeight),this.sidebarContainer.style.bottom=this.footerHeight+q+g+"px",this.formatContainer.style.bottom=
-this.footerHeight+g+"px",this.diagramContainer.style.bottom=this.footerHeight+g+e+"px");a&&this.editor.graph.sizeDidChange()};EditorUi.prototype.createTabContainer=function(){return null};
+this.footerHeight+h+"px",q-=this.tabContainer.clientHeight),this.diagramContainer.style.height=q+"px",this.hsplit.style.height=q+"px"):(0<this.footerHeight&&(this.footerContainer.style.bottom=h+"px"),this.diagramContainer.style.right=c+"px",e=0,null!=this.tabContainer&&(this.tabContainer.style.bottom=this.footerHeight+h+"px",this.tabContainer.style.right=this.diagramContainer.style.right,e=this.tabContainer.clientHeight),this.sidebarContainer.style.bottom=this.footerHeight+q+h+"px",this.formatContainer.style.bottom=
+this.footerHeight+h+"px",this.diagramContainer.style.bottom=this.footerHeight+h+e+"px");a&&this.editor.graph.sizeDidChange()};EditorUi.prototype.createTabContainer=function(){return null};
 EditorUi.prototype.createDivs=function(){this.menubarContainer=this.createDiv("geMenubarContainer");this.toolbarContainer=this.createDiv("geToolbarContainer");this.sidebarContainer=this.createDiv("geSidebarContainer");this.formatContainer=this.createDiv("geSidebarContainer");this.diagramContainer=this.createDiv("geDiagramContainer");this.footerContainer=this.createDiv("geFooterContainer");this.hsplit=this.createDiv("geHsplit");this.hsplit.setAttribute("title",mxResources.get("collapseExpand"));this.menubarContainer.style.top=
 "0px";this.menubarContainer.style.left="0px";this.menubarContainer.style.right="0px";this.toolbarContainer.style.left="0px";this.toolbarContainer.style.right="0px";this.sidebarContainer.style.left="0px";this.formatContainer.style.right="0px";this.formatContainer.style.zIndex="1";this.diagramContainer.style.right=(null!=this.format?this.formatWidth:0)+"px";this.footerContainer.style.left="0px";this.footerContainer.style.right="0px";this.footerContainer.style.bottom="0px";this.footerContainer.style.zIndex=
 mxPopupMenu.prototype.zIndex-2;this.hsplit.style.width=this.splitSize+"px";this.formatContainer.style.backgroundColor="whiteSmoke";this.formatContainer.style.overflowX="hidden";this.formatContainer.style.overflowY="auto";this.formatContainer.style.fontSize="12px";if(this.sidebarFooterContainer=this.createSidebarFooterContainer())this.sidebarFooterContainer.style.left="0px";this.editor.chromeless||(this.tabContainer=this.createTabContainer())};EditorUi.prototype.createSidebarFooterContainer=function(){return null};
@@ -2096,103 +2097,103 @@ this.sidebar=this.editor.chromeless?null:this.createSidebar(this.sidebarContaine
 this.container.appendChild(this.sidebarFooterContainer);this.container.appendChild(this.diagramContainer);null!=this.container&&null!=this.tabContainer&&this.container.appendChild(this.tabContainer);this.toolbar=this.editor.chromeless?null:this.createToolbar(this.createDiv("geToolbar"));null!=this.toolbar&&(this.toolbarContainer.appendChild(this.toolbar.container),this.container.appendChild(this.toolbarContainer));null!=this.sidebar&&(this.container.appendChild(this.hsplit),this.addSplitHandler(this.hsplit,
 !0,0,mxUtils.bind(this,function(a){this.hsplitPosition=a;this.refresh()})))};EditorUi.prototype.createStatusContainer=function(){var a=document.createElement("a");a.className="geItem geStatus";420>screen.width&&(a.style.maxWidth=Math.max(20,screen.width-320)+"px",a.style.overflow="hidden");return a};EditorUi.prototype.setStatusText=function(a){this.statusContainer.innerHTML=a};EditorUi.prototype.createToolbar=function(a){return new Toolbar(this,a)};
 EditorUi.prototype.createSidebar=function(a){return new Sidebar(this,a)};EditorUi.prototype.createFormat=function(a){return new Format(this,a)};EditorUi.prototype.createFooter=function(){return this.createDiv("geFooter")};EditorUi.prototype.createDiv=function(a){var b=document.createElement("div");b.className=a;return b};
-EditorUi.prototype.addSplitHandler=function(a,b,e,d){function g(a){if(null!=p){var m=new mxPoint(mxEvent.getClientX(a),mxEvent.getClientY(a));d(Math.max(0,q+(b?m.x-p.x:p.y-m.y)-e));mxEvent.consume(a);q!=h()&&(c=!0,f=null)}}function l(a){g(a);p=q=null}var p=null,q=null,c=!0,f=null;mxClient.IS_POINTER&&(a.style.touchAction="none");var h=mxUtils.bind(this,function(){var c=parseInt(b?a.style.left:a.style.bottom);b||(c=c+e-this.footerHeight);return c});mxEvent.addGestureListeners(a,function(a){p=new mxPoint(mxEvent.getClientX(a),
-mxEvent.getClientY(a));q=h();c=!1;mxEvent.consume(a)});mxEvent.addListener(a,"click",function(a){if(!c){var b=null!=f?f-e:0;f=h();d(b);mxEvent.consume(a)}});mxEvent.addGestureListeners(document,null,g,l);this.destroyFunctions.push(function(){mxEvent.removeGestureListeners(document,null,g,l)})};EditorUi.prototype.showDialog=function(a,b,e,d,g,l){this.editor.graph.tooltipHandler.hideTooltip();null==this.dialogs&&(this.dialogs=[]);this.dialog=new Dialog(this,a,b,e,d,g,l);this.dialogs.push(this.dialog)};
+EditorUi.prototype.addSplitHandler=function(a,b,e,d){function h(a){if(null!=n){var p=new mxPoint(mxEvent.getClientX(a),mxEvent.getClientY(a));d(Math.max(0,q+(b?p.x-n.x:n.y-p.y)-e));mxEvent.consume(a);q!=g()&&(c=!0,f=null)}}function l(a){h(a);n=q=null}var n=null,q=null,c=!0,f=null;mxClient.IS_POINTER&&(a.style.touchAction="none");var g=mxUtils.bind(this,function(){var c=parseInt(b?a.style.left:a.style.bottom);b||(c=c+e-this.footerHeight);return c});mxEvent.addGestureListeners(a,function(a){n=new mxPoint(mxEvent.getClientX(a),
+mxEvent.getClientY(a));q=g();c=!1;mxEvent.consume(a)});mxEvent.addListener(a,"click",function(a){if(!c){var b=null!=f?f-e:0;f=g();d(b);mxEvent.consume(a)}});mxEvent.addGestureListeners(document,null,h,l);this.destroyFunctions.push(function(){mxEvent.removeGestureListeners(document,null,h,l)})};EditorUi.prototype.showDialog=function(a,b,e,d,h,l){this.editor.graph.tooltipHandler.hideTooltip();null==this.dialogs&&(this.dialogs=[]);this.dialog=new Dialog(this,a,b,e,d,h,l);this.dialogs.push(this.dialog)};
 EditorUi.prototype.hideDialog=function(a){null!=this.dialogs&&0<this.dialogs.length&&(this.dialogs.pop().close(a),this.dialog=0<this.dialogs.length?this.dialogs[this.dialogs.length-1]:null,null==this.dialog&&"hidden"!=this.editor.graph.container.style.visibility&&this.editor.graph.container.focus(),this.editor.fireEvent(new mxEventObject("hideDialog")))};
-EditorUi.prototype.pickColor=function(a,b){var e=this.editor.graph,d=e.cellEditor.saveSelection(),g=new ColorDialog(this,a||"none",function(a){e.cellEditor.restoreSelection(d);b(a)},function(){e.cellEditor.restoreSelection(d)});this.showDialog(g.container,220,430,!0,!1);g.init()};
+EditorUi.prototype.pickColor=function(a,b){var e=this.editor.graph,d=e.cellEditor.saveSelection(),h=new ColorDialog(this,a||"none",function(a){e.cellEditor.restoreSelection(d);b(a)},function(){e.cellEditor.restoreSelection(d)});this.showDialog(h.container,220,430,!0,!1);h.init()};
 EditorUi.prototype.openFile=function(){window.openFile=new OpenFile(mxUtils.bind(this,function(a){this.hideDialog(a)}));this.showDialog((new OpenDialog(this)).container,Editor.useLocalStorage?640:320,Editor.useLocalStorage?480:220,!0,!0,function(){window.openFile=null})};
-EditorUi.prototype.extractGraphModelFromHtml=function(a){var b=null;try{var e=a.indexOf("&lt;mxGraphModel ");if(0<=e){var d=a.lastIndexOf("&lt;/mxGraphModel&gt;");d>e&&(b=a.substring(e,d+21).replace(/&gt;/g,">").replace(/&lt;/g,"<").replace(/\\&quot;/g,'"').replace(/\n/g,""))}}catch(g){}return b};
+EditorUi.prototype.extractGraphModelFromHtml=function(a){var b=null;try{var e=a.indexOf("&lt;mxGraphModel ");if(0<=e){var d=a.lastIndexOf("&lt;/mxGraphModel&gt;");d>e&&(b=a.substring(e,d+21).replace(/&gt;/g,">").replace(/&lt;/g,"<").replace(/\\&quot;/g,'"').replace(/\n/g,""))}}catch(h){}return b};
 EditorUi.prototype.extractGraphModelFromEvent=function(a){var b=null,e=null;null!=a&&(a=null!=a.dataTransfer?a.dataTransfer:a.clipboardData,null!=a&&(10==document.documentMode||11==document.documentMode?e=a.getData("Text"):(e=0<=mxUtils.indexOf(a.types,"text/html")?a.getData("text/html"):null,mxUtils.indexOf(a.types,null==e||0==e.length)&&(e=a.getData("text/plain"))),null!=e&&(e=this.editor.graph.zapGremlins(mxUtils.trim(e)),a=this.extractGraphModelFromHtml(e),null!=a&&(e=a))));null!=e&&this.isCompatibleString(e)&&
 (b=e);return b};EditorUi.prototype.isCompatibleString=function(a){return!1};EditorUi.prototype.saveFile=function(a){a||null==this.editor.filename?(a=new FilenameDialog(this,this.editor.getOrCreateFilename(),mxResources.get("save"),mxUtils.bind(this,function(a){this.save(a)}),null,mxUtils.bind(this,function(a){if(null!=a&&0<a.length)return!0;mxUtils.confirm(mxResources.get("invalidName"));return!1})),this.showDialog(a.container,300,100,!0,!0),a.init()):this.save(this.editor.getOrCreateFilename())};
 EditorUi.prototype.save=function(a){if(null!=a){this.editor.graph.isEditing()&&this.editor.graph.stopEditing();var b=mxUtils.getXml(this.editor.getGraphXml());try{if(Editor.useLocalStorage){if(null!=localStorage.getItem(a)&&!mxUtils.confirm(mxResources.get("replaceIt",[a])))return;localStorage.setItem(a,b);this.editor.setStatus(mxUtils.htmlEntities(mxResources.get("saved"))+" "+new Date)}else if(b.length<MAX_REQUEST_SIZE)(new mxXmlRequest(SAVE_URL,"filename="+encodeURIComponent(a)+"&xml="+encodeURIComponent(b))).simulate(document,
 "_blank");else{mxUtils.alert(mxResources.get("drawingTooLarge"));mxUtils.popup(b);return}this.editor.setModified(!1);this.editor.setFilename(a);this.updateDocumentTitle()}catch(e){this.editor.setStatus(mxUtils.htmlEntities(mxResources.get("errorSavingFile")))}}};
-EditorUi.prototype.executeLayout=function(a,b,e){var d=this.editor.graph;if(d.isEnabled()){d.getModel().beginUpdate();try{a()}catch(g){throw g;}finally{this.allowAnimation&&b&&0>navigator.userAgent.indexOf("Camino")?(a=new mxMorphing(d),a.addListener(mxEvent.DONE,mxUtils.bind(this,function(){d.getModel().endUpdate();null!=e&&e()})),a.startAnimation()):(d.getModel().endUpdate(),null!=e&&e())}}};
-EditorUi.prototype.showImageDialog=function(a,b,e,d){d=this.editor.graph.cellEditor;var g=d.saveSelection(),l=mxUtils.prompt(a,b);d.restoreSelection(g);if(null!=l&&0<l.length){var p=new Image;p.onload=function(){e(l,p.width,p.height)};p.onerror=function(){e(null);mxUtils.alert(mxResources.get("fileNotFound"))};p.src=l}else e(null)};EditorUi.prototype.showLinkDialog=function(a,b,e){a=new LinkDialog(this,a,b,e);this.showDialog(a.container,420,90,!0,!0);a.init()};
+EditorUi.prototype.executeLayout=function(a,b,e){var d=this.editor.graph;if(d.isEnabled()){d.getModel().beginUpdate();try{a()}catch(h){throw h;}finally{this.allowAnimation&&b&&0>navigator.userAgent.indexOf("Camino")?(a=new mxMorphing(d),a.addListener(mxEvent.DONE,mxUtils.bind(this,function(){d.getModel().endUpdate();null!=e&&e()})),a.startAnimation()):(d.getModel().endUpdate(),null!=e&&e())}}};
+EditorUi.prototype.showImageDialog=function(a,b,e,d){d=this.editor.graph.cellEditor;var h=d.saveSelection(),l=mxUtils.prompt(a,b);d.restoreSelection(h);if(null!=l&&0<l.length){var n=new Image;n.onload=function(){e(l,n.width,n.height)};n.onerror=function(){e(null);mxUtils.alert(mxResources.get("fileNotFound"))};n.src=l}else e(null)};EditorUi.prototype.showLinkDialog=function(a,b,e){a=new LinkDialog(this,a,b,e);this.showDialog(a.container,420,90,!0,!0);a.init()};
 EditorUi.prototype.showBackgroundImageDialog=function(a){a=null!=a?a:mxUtils.bind(this,function(a){a=new ChangeGraphBackground(this,null,a);a.ignoreColor=!0;this.editor.graph.model.execute(a)});var b=mxUtils.prompt(mxResources.get("backgroundImage"),"");if(null!=b&&0<b.length){var e=new Image;e.onload=function(){a(new mxImage(b,e.width,e.height))};e.onerror=function(){a(null);mxUtils.alert(mxResources.get("fileNotFound"))};e.src=b}else a(null)};
 EditorUi.prototype.setBackgroundImage=function(a){this.editor.graph.setBackgroundImage(a);this.editor.graph.view.validateBackgroundImage();this.fireEvent(new mxEventObject("backgroundImageChanged"))};EditorUi.prototype.confirm=function(a,b,e){mxUtils.confirm(a)?null!=b&&b():null!=e&&e()};
 EditorUi.prototype.createOutline=function(a){var b=new mxOutline(this.editor.graph);b.border=20;mxEvent.addListener(window,"resize",function(){b.update()});this.addListener("pageFormatChanged",function(){b.update()});return b};
-EditorUi.prototype.createKeyHandler=function(a){function b(a,c,b){p.push(function(){if(!d.isSelectionEmpty()&&d.isEnabled())if(c=null!=c?c:1,b){d.getModel().beginUpdate();try{for(var f=d.getSelectionCells(),h=0;h<f.length;h++)if(d.getModel().isVertex(f[h])&&d.isCellResizable(f[h])){var e=d.getCellGeometry(f[h]);null!=e&&(e=e.clone(),37==a?e.width=Math.max(0,e.width-c):38==a?e.height=Math.max(0,e.height-c):39==a?e.width+=c:40==a&&(e.height+=c),d.getModel().setGeometry(f[h],e))}}finally{d.getModel().endUpdate()}}else f=
-d.getSelectionCell(),h=d.model.getParent(f),e=null,1==d.getSelectionCount()&&d.model.isVertex(f)&&null!=d.layoutManager&&!d.isCellLocked(f)&&(e=d.layoutManager.getLayout(h)),null!=e&&e.constructor==mxStackLayout?(e=h.getIndex(f),37==a||38==a?d.model.add(h,f,Math.max(0,e-1)):39!=a&&40!=a||d.model.add(h,f,Math.min(d.model.getChildCount(h),e+1))):(h=f=0,37==a?f=-c:38==a?h=-c:39==a?f=c:40==a&&(h=c),d.moveCells(d.getMovableCells(d.getSelectionCells()),f,h))});null!=q&&window.clearTimeout(q);q=window.setTimeout(function(){if(0<
-p.length){d.getModel().beginUpdate();try{for(var a=0;a<p.length;a++)p[a]();p=[]}finally{d.getModel().endUpdate()}d.scrollCellToVisible(d.getSelectionCell())}},200)}var e=this,d=this.editor.graph,g=new mxKeyHandler(d),l=g.isEventIgnored;g.isEventIgnored=function(a){return(!this.isControlDown(a)||mxEvent.isShiftDown(a)||90!=a.keyCode&&89!=a.keyCode&&188!=a.keyCode&&190!=a.keyCode&&85!=a.keyCode)&&(66!=a.keyCode&&73!=a.keyCode||!this.isControlDown(a)||this.graph.cellEditor.isContentEditing()&&!mxClient.IS_FF&&
-!mxClient.IS_SF)&&l.apply(this,arguments)};g.isEnabledForEvent=function(a){return!mxEvent.isConsumed(a)&&this.isGraphEvent(a)&&this.isEnabled()};g.isControlDown=function(a){return mxEvent.isControlDown(a)||mxClient.IS_MAC&&a.metaKey};var p=[],q=null,c={37:mxConstants.DIRECTION_WEST,38:mxConstants.DIRECTION_NORTH,39:mxConstants.DIRECTION_EAST,40:mxConstants.DIRECTION_SOUTH},f=g.getFunction,h={67:this.actions.get("clearWaypoints"),65:this.actions.get("connectionArrows"),80:this.actions.get("connectionPoints")};
-mxKeyHandler.prototype.getFunction=function(a){if(d.isEnabled()){if(mxEvent.isShiftDown(a)&&mxEvent.isAltDown(a)){var m=h[a.keyCode];if(null!=m)return m.funct}if(9==a.keyCode&&mxEvent.isAltDown(a))return mxEvent.isShiftDown(a)?function(){d.selectParentCell()}:function(){d.selectChildCell()};if(null!=c[a.keyCode]&&!d.isSelectionEmpty())if(mxEvent.isShiftDown(a)&&mxEvent.isAltDown(a)){if(d.model.isVertex(d.getSelectionCell()))return function(){var b=d.connectVertex(d.getSelectionCell(),c[a.keyCode],
-d.defaultEdgeLength,a,!0);null!=b&&0<b.length&&(1==b.length&&d.model.isEdge(b[0])?d.setSelectionCell(d.model.getTerminal(b[0],!1)):d.setSelectionCell(b[b.length-1]),d.scrollCellToVisible(d.getSelectionCell()),null!=e.hoverIcons&&e.hoverIcons.update(d.view.getState(d.getSelectionCell())))}}else return this.isControlDown(a)?function(){b(a.keyCode,mxEvent.isShiftDown(a)?d.gridSize:null,!0)}:function(){b(a.keyCode,mxEvent.isShiftDown(a)?d.gridSize:null)}}return f.apply(this,arguments)};g.bindAction=mxUtils.bind(this,
-function(a,c,b,f){var d=this.actions.get(b);null!=d&&(b=function(){d.isEnabled()&&d.funct()},c?f?g.bindControlShiftKey(a,b):g.bindControlKey(a,b):f?g.bindShiftKey(a,b):g.bindKey(a,b))});var m=g.escape;g.escape=function(a){m.apply(this,arguments)};g.enter=function(){};g.bindControlShiftKey(36,function(){d.exitGroup()});g.bindControlShiftKey(35,function(){d.enterGroup()});g.bindKey(36,function(){d.home()});g.bindKey(35,function(){d.refresh()});g.bindAction(107,!0,"zoomIn");g.bindAction(109,!0,"zoomOut");
-g.bindAction(80,!0,"print");g.bindAction(79,!0,"outline",!0);g.bindAction(112,!1,"about");if(!this.editor.chromeless||this.editor.editable)g.bindControlKey(36,function(){d.isEnabled()&&d.foldCells(!0)}),g.bindControlKey(35,function(){d.isEnabled()&&d.foldCells(!1)}),g.bindControlKey(13,function(){d.isEnabled()&&d.setSelectionCells(d.duplicateCells(d.getSelectionCells(),!1))}),g.bindAction(8,!1,"delete"),g.bindAction(8,!0,"deleteAll"),g.bindAction(46,!1,"delete"),g.bindAction(46,!0,"deleteAll"),g.bindAction(72,
-!0,"resetView"),g.bindAction(72,!0,"fitWindow",!0),g.bindAction(74,!0,"fitPage"),g.bindAction(74,!0,"fitTwoPages",!0),g.bindAction(48,!0,"customZoom"),g.bindAction(82,!0,"turn"),g.bindAction(82,!0,"clearDefaultStyle",!0),g.bindAction(83,!0,"save"),g.bindAction(83,!0,"saveAs",!0),g.bindAction(65,!0,"selectAll"),g.bindAction(65,!0,"selectNone",!0),g.bindAction(73,!0,"selectVertices",!0),g.bindAction(69,!0,"selectEdges",!0),g.bindAction(69,!0,"editStyle"),g.bindAction(66,!0,"bold"),g.bindAction(66,!0,
-"toBack",!0),g.bindAction(70,!0,"toFront",!0),g.bindAction(68,!0,"duplicate"),g.bindAction(68,!0,"setAsDefaultStyle",!0),g.bindAction(90,!0,"undo"),g.bindAction(89,!0,"autosize",!0),g.bindAction(88,!0,"cut"),g.bindAction(67,!0,"copy"),g.bindAction(86,!0,"paste"),g.bindAction(71,!0,"group"),g.bindAction(77,!0,"editData"),g.bindAction(71,!0,"grid",!0),g.bindAction(73,!0,"italic"),g.bindAction(76,!0,"lockUnlock"),g.bindAction(76,!0,"layers",!0),g.bindAction(80,!0,"formatPanel",!0),g.bindAction(85,!0,
-"underline"),g.bindAction(85,!0,"ungroup",!0),g.bindAction(190,!0,"superscript"),g.bindAction(188,!0,"subscript"),g.bindKey(13,function(){d.isEnabled()&&d.startEditingAtCell()}),g.bindKey(113,function(){d.isEnabled()&&d.startEditingAtCell()});mxClient.IS_WIN?g.bindAction(89,!0,"redo"):g.bindAction(90,!0,"redo",!0);return g};
+EditorUi.prototype.createKeyHandler=function(a){function b(a,c,b){n.push(function(){if(!d.isSelectionEmpty()&&d.isEnabled())if(c=null!=c?c:1,b){d.getModel().beginUpdate();try{for(var f=d.getSelectionCells(),g=0;g<f.length;g++)if(d.getModel().isVertex(f[g])&&d.isCellResizable(f[g])){var e=d.getCellGeometry(f[g]);null!=e&&(e=e.clone(),37==a?e.width=Math.max(0,e.width-c):38==a?e.height=Math.max(0,e.height-c):39==a?e.width+=c:40==a&&(e.height+=c),d.getModel().setGeometry(f[g],e))}}finally{d.getModel().endUpdate()}}else f=
+d.getSelectionCell(),g=d.model.getParent(f),e=null,1==d.getSelectionCount()&&d.model.isVertex(f)&&null!=d.layoutManager&&!d.isCellLocked(f)&&(e=d.layoutManager.getLayout(g)),null!=e&&e.constructor==mxStackLayout?(e=g.getIndex(f),37==a||38==a?d.model.add(g,f,Math.max(0,e-1)):39!=a&&40!=a||d.model.add(g,f,Math.min(d.model.getChildCount(g),e+1))):(g=f=0,37==a?f=-c:38==a?g=-c:39==a?f=c:40==a&&(g=c),d.moveCells(d.getMovableCells(d.getSelectionCells()),f,g))});null!=q&&window.clearTimeout(q);q=window.setTimeout(function(){if(0<
+n.length){d.getModel().beginUpdate();try{for(var a=0;a<n.length;a++)n[a]();n=[]}finally{d.getModel().endUpdate()}d.scrollCellToVisible(d.getSelectionCell())}},200)}var e=this,d=this.editor.graph,h=new mxKeyHandler(d),l=h.isEventIgnored;h.isEventIgnored=function(a){return(!this.isControlDown(a)||mxEvent.isShiftDown(a)||90!=a.keyCode&&89!=a.keyCode&&188!=a.keyCode&&190!=a.keyCode&&85!=a.keyCode)&&(66!=a.keyCode&&73!=a.keyCode||!this.isControlDown(a)||this.graph.cellEditor.isContentEditing()&&!mxClient.IS_FF&&
+!mxClient.IS_SF)&&l.apply(this,arguments)};h.isEnabledForEvent=function(a){return!mxEvent.isConsumed(a)&&this.isGraphEvent(a)&&this.isEnabled()};h.isControlDown=function(a){return mxEvent.isControlDown(a)||mxClient.IS_MAC&&a.metaKey};var n=[],q=null,c={37:mxConstants.DIRECTION_WEST,38:mxConstants.DIRECTION_NORTH,39:mxConstants.DIRECTION_EAST,40:mxConstants.DIRECTION_SOUTH},f=h.getFunction,g={67:this.actions.get("clearWaypoints"),65:this.actions.get("connectionArrows"),80:this.actions.get("connectionPoints")};
+mxKeyHandler.prototype.getFunction=function(a){if(d.isEnabled()){if(mxEvent.isShiftDown(a)&&mxEvent.isAltDown(a)){var p=g[a.keyCode];if(null!=p)return p.funct}if(9==a.keyCode&&mxEvent.isAltDown(a))return mxEvent.isShiftDown(a)?function(){d.selectParentCell()}:function(){d.selectChildCell()};if(null!=c[a.keyCode]&&!d.isSelectionEmpty())if(mxEvent.isShiftDown(a)&&mxEvent.isAltDown(a)){if(d.model.isVertex(d.getSelectionCell()))return function(){var b=d.connectVertex(d.getSelectionCell(),c[a.keyCode],
+d.defaultEdgeLength,a,!0);null!=b&&0<b.length&&(1==b.length&&d.model.isEdge(b[0])?d.setSelectionCell(d.model.getTerminal(b[0],!1)):d.setSelectionCell(b[b.length-1]),d.scrollCellToVisible(d.getSelectionCell()),null!=e.hoverIcons&&e.hoverIcons.update(d.view.getState(d.getSelectionCell())))}}else return this.isControlDown(a)?function(){b(a.keyCode,mxEvent.isShiftDown(a)?d.gridSize:null,!0)}:function(){b(a.keyCode,mxEvent.isShiftDown(a)?d.gridSize:null)}}return f.apply(this,arguments)};h.bindAction=mxUtils.bind(this,
+function(a,c,b,f){var d=this.actions.get(b);null!=d&&(b=function(){d.isEnabled()&&d.funct()},c?f?h.bindControlShiftKey(a,b):h.bindControlKey(a,b):f?h.bindShiftKey(a,b):h.bindKey(a,b))});var p=h.escape;h.escape=function(a){p.apply(this,arguments)};h.enter=function(){};h.bindControlShiftKey(36,function(){d.exitGroup()});h.bindControlShiftKey(35,function(){d.enterGroup()});h.bindKey(36,function(){d.home()});h.bindKey(35,function(){d.refresh()});h.bindAction(107,!0,"zoomIn");h.bindAction(109,!0,"zoomOut");
+h.bindAction(80,!0,"print");h.bindAction(79,!0,"outline",!0);h.bindAction(112,!1,"about");if(!this.editor.chromeless||this.editor.editable)h.bindControlKey(36,function(){d.isEnabled()&&d.foldCells(!0)}),h.bindControlKey(35,function(){d.isEnabled()&&d.foldCells(!1)}),h.bindControlKey(13,function(){d.isEnabled()&&d.setSelectionCells(d.duplicateCells(d.getSelectionCells(),!1))}),h.bindAction(8,!1,"delete"),h.bindAction(8,!0,"deleteAll"),h.bindAction(46,!1,"delete"),h.bindAction(46,!0,"deleteAll"),h.bindAction(72,
+!0,"resetView"),h.bindAction(72,!0,"fitWindow",!0),h.bindAction(74,!0,"fitPage"),h.bindAction(74,!0,"fitTwoPages",!0),h.bindAction(48,!0,"customZoom"),h.bindAction(82,!0,"turn"),h.bindAction(82,!0,"clearDefaultStyle",!0),h.bindAction(83,!0,"save"),h.bindAction(83,!0,"saveAs",!0),h.bindAction(65,!0,"selectAll"),h.bindAction(65,!0,"selectNone",!0),h.bindAction(73,!0,"selectVertices",!0),h.bindAction(69,!0,"selectEdges",!0),h.bindAction(69,!0,"editStyle"),h.bindAction(66,!0,"bold"),h.bindAction(66,!0,
+"toBack",!0),h.bindAction(70,!0,"toFront",!0),h.bindAction(68,!0,"duplicate"),h.bindAction(68,!0,"setAsDefaultStyle",!0),h.bindAction(90,!0,"undo"),h.bindAction(89,!0,"autosize",!0),h.bindAction(88,!0,"cut"),h.bindAction(67,!0,"copy"),h.bindAction(86,!0,"paste"),h.bindAction(71,!0,"group"),h.bindAction(77,!0,"editData"),h.bindAction(71,!0,"grid",!0),h.bindAction(73,!0,"italic"),h.bindAction(76,!0,"lockUnlock"),h.bindAction(76,!0,"layers",!0),h.bindAction(80,!0,"formatPanel",!0),h.bindAction(85,!0,
+"underline"),h.bindAction(85,!0,"ungroup",!0),h.bindAction(190,!0,"superscript"),h.bindAction(188,!0,"subscript"),h.bindKey(13,function(){d.isEnabled()&&d.startEditingAtCell()}),h.bindKey(113,function(){d.isEnabled()&&d.startEditingAtCell()});mxClient.IS_WIN?h.bindAction(89,!0,"redo"):h.bindAction(90,!0,"redo",!0);return h};
 EditorUi.prototype.destroy=function(){null!=this.editor&&(this.editor.destroy(),this.editor=null);null!=this.menubar&&(this.menubar.destroy(),this.menubar=null);null!=this.toolbar&&(this.toolbar.destroy(),this.toolbar=null);null!=this.sidebar&&(this.sidebar.destroy(),this.sidebar=null);null!=this.keyHandler&&(this.keyHandler.destroy(),this.keyHandler=null);null!=this.keydownHandler&&(mxEvent.removeListener(document,"keydown",this.keydownHandler),this.keydownHandler=null);null!=this.keyupHandler&&
 (mxEvent.removeListener(document,"keyup",this.keyupHandler),this.keyupHandler=null);null!=this.resizeHandler&&(mxEvent.removeListener(window,"resize",this.resizeHandler),this.resizeHandler=null);null!=this.gestureHandler&&(mxEvent.removeGestureListeners(document,this.gestureHandler),this.gestureHandler=null);null!=this.orientationChangeHandler&&(mxEvent.removeListener(window,"orientationchange",this.orientationChangeHandler),this.orientationChangeHandler=null);null!=this.scrollHandler&&(mxEvent.removeListener(window,
 "scroll",this.scrollHandler),this.scrollHandler=null);if(null!=this.destroyFunctions){for(var a=0;a<this.destroyFunctions.length;a++)this.destroyFunctions[a]();this.destroyFunctions=null}for(var b=[this.menubarContainer,this.toolbarContainer,this.sidebarContainer,this.formatContainer,this.diagramContainer,this.footerContainer,this.chromelessToolbar,this.hsplit,this.sidebarFooterContainer,this.layersDialog],a=0;a<b.length;a++)null!=b[a]&&null!=b[a].parentNode&&b[a].parentNode.removeChild(b[a])};"undefined"!==typeof html4&&(html4.ATTRIBS["a::target"]=0,html4.ATTRIBS["source::src"]=0,html4.ATTRIBS["video::src"]=0);mxConstants.SHADOW_OPACITY=.25;mxConstants.SHADOWCOLOR="#000000";mxConstants.VML_SHADOWCOLOR="#d0d0d0";mxGraph.prototype.pageBreakColor="#c0c0c0";mxGraph.prototype.pageScale=1;
 (function(){try{if(null!=navigator&&null!=navigator.language){var a=navigator.language.toLowerCase();mxGraph.prototype.pageFormat="en-us"===a||"en-ca"===a||"es-mx"===a?mxConstants.PAGE_FORMAT_LETTER_PORTRAIT:mxConstants.PAGE_FORMAT_A4_PORTRAIT}}catch(b){}})();mxText.prototype.baseSpacingTop=5;mxText.prototype.baseSpacingBottom=1;mxGraphModel.prototype.ignoreRelativeEdgeParent=!1;
 mxGraphView.prototype.gridImage=mxClient.IS_SVG?"data:image/gif;base64,R0lGODlhCgAKAJEAAAAAAP///8zMzP///yH5BAEAAAMALAAAAAAKAAoAAAIJ1I6py+0Po2wFADs=":IMAGE_PATH+"/grid.gif";mxGraphView.prototype.gridSteps=4;mxGraphView.prototype.minGridSize=4;mxGraphView.prototype.gridColor="#e0e0e0";mxSvgCanvas2D.prototype.foAltText="[Not supported by viewer]";
-Graph=function(a,b,e,d,g){mxGraph.call(this,a,b,e,d);this.themes=g||this.defaultThemes;this.currentEdgeStyle=mxUtils.clone(this.defaultEdgeStyle);this.currentVertexStyle=mxUtils.clone(this.defaultVertexStyle);a=this.baseUrl;b=a.indexOf("//");this.domainPathUrl=this.domainUrl="";0<b&&(b=a.indexOf("/",b+2),0<b&&(this.domainUrl=a.substring(0,b)),b=a.lastIndexOf("/"),0<b&&(this.domainPathUrl=a.substring(0,b+1)));this.isHtmlLabel=function(a){var c=this.view.getState(a);a=null!=c?c.style:this.getCellStyle(a);
-return"1"==a.html||"wrap"==a[mxConstants.STYLE_WHITE_SPACE]};if(this.edgeMode){var l=null,p=null,q=null,c=null,f=!1;this.addListener(mxEvent.FIRE_MOUSE_EVENT,mxUtils.bind(this,function(a,b){if("mouseDown"==b.getProperty("eventName")&&this.isEnabled()){var d=b.getProperty("event");if(!mxEvent.isControlDown(d.getEvent())&&!mxEvent.isShiftDown(d.getEvent())){var h=d.getState();null!=h&&this.model.isEdge(h.cell)&&(l=new mxPoint(d.getGraphX(),d.getGraphY()),f=this.isCellSelected(h.cell),q=h,p=d,null!=
-h.text&&null!=h.text.boundingBox&&mxUtils.contains(h.text.boundingBox,d.getGraphX(),d.getGraphY())?c=mxEvent.LABEL_HANDLE:(h=this.selectionCellsHandler.getHandler(h.cell),null!=h&&null!=h.bends&&0<h.bends.length&&(c=h.getHandleForEvent(d))))}}}));this.addMouseListener({mouseDown:function(a,c){},mouseMove:mxUtils.bind(this,function(a,b){var d=this.selectionCellsHandler.handlers.map,h;for(h in d)if(null!=d[h].index)return;if(this.isEnabled()&&!this.panningHandler.isActive()&&!mxEvent.isControlDown(b.getEvent())&&
-!mxEvent.isShiftDown(b.getEvent())&&!mxEvent.isAltDown(b.getEvent()))if(h=this.tolerance,null!=l&&null!=q&&null!=p){if(d=q,Math.abs(l.x-b.getGraphX())>h||Math.abs(l.y-b.getGraphY())>h){this.isCellSelected(d.cell)||this.setSelectionCell(d.cell);var e=this.selectionCellsHandler.getHandler(d.cell);if(null!=e&&null!=e.bends&&0<e.bends.length){var k=e.getHandleForEvent(p),m=this.view.getEdgeStyle(d);h=m==mxEdgeStyle.EntityRelation;f||c!=mxEvent.LABEL_HANDLE||(k=c);if(h&&0!=k&&k!=e.bends.length-1&&k!=mxEvent.LABEL_HANDLE)!h||
-null==d.visibleSourceState&&null==d.visibleTargetState||(this.graphHandler.reset(),b.consume());else if(k==mxEvent.LABEL_HANDLE||0==k||null!=d.visibleSourceState||k==e.bends.length-1||null!=d.visibleTargetState)h||k==mxEvent.LABEL_HANDLE||(h=d.absolutePoints,null!=h&&(null==m&&null==k||m==mxEdgeStyle.OrthConnector)&&(k=c,null==k&&(k=new mxRectangle(l.x,l.y),k.grow(mxEdgeHandler.prototype.handleImage.width/2),mxUtils.contains(k,h[0].x,h[0].y)?k=0:mxUtils.contains(k,h[h.length-1].x,h[h.length-1].y)?
-k=e.bends.length-1:null!=m&&(2==h.length||3==h.length&&(0==Math.round(h[0].x-h[1].x)&&0==Math.round(h[1].x-h[2].x)||0==Math.round(h[0].y-h[1].y)&&0==Math.round(h[1].y-h[2].y)))?k=2:(k=mxUtils.findNearestSegment(d,l.x,l.y),k=null==m?mxEvent.VIRTUAL_HANDLE-k:k+1))),null==k&&(k=mxEvent.VIRTUAL_HANDLE)),e.start(b.getGraphX(),b.getGraphX(),k),c=l=p=q=null,f=!1,b.consume(),this.graphHandler.reset()}}}else if(d=b.getState(),null!=d&&this.model.isEdge(d.cell)){e=null;h=d.absolutePoints;if(null!=h)if(k=new mxRectangle(b.getGraphX(),
-b.getGraphY()),k.grow(mxEdgeHandler.prototype.handleImage.width/2),null!=d.text&&null!=d.text.boundingBox&&mxUtils.contains(d.text.boundingBox,b.getGraphX(),b.getGraphY()))e="move";else if(mxUtils.contains(k,h[0].x,h[0].y)||mxUtils.contains(k,h[h.length-1].x,h[h.length-1].y))e="pointer";else if(null!=d.visibleSourceState||null!=d.visibleTargetState)m=this.view.getEdgeStyle(d),e="crosshair",m!=mxEdgeStyle.EntityRelation&&this.isOrthogonal(d)&&(m=mxUtils.findNearestSegment(d,b.getGraphX(),b.getGraphY()),
-m<h.length-1&&0<=m&&(e=0==Math.round(h[m].x-h[m+1].x)?"col-resize":"row-resize"));null!=e&&d.setCursor(e)}}),mouseUp:mxUtils.bind(this,function(a,b){c=l=p=q=null})})}this.cellRenderer.getLabelValue=function(a){var c=mxCellRenderer.prototype.getLabelValue.apply(this,arguments);a.view.graph.isHtmlLabel(a.cell)&&(c=1!=a.style.html?mxUtils.htmlEntities(c,!1):a.view.graph.sanitizeHtml(c));return c};if("undefined"!==typeof mxVertexHandler){this.setConnectable(!0);this.setDropEnabled(!0);this.setPanning(!0);
-this.setTooltips(!0);this.setAllowLoops(!0);this.allowAutoPanning=!0;this.constrainChildren=this.resetEdgesOnConnect=!1;this.constrainRelativeChildren=!0;this.graphHandler.scrollOnMove=!1;this.graphHandler.scaleGrid=!0;this.connectionHandler.setCreateTarget(!1);this.connectionHandler.insertBeforeSource=!0;this.connectionHandler.isValidSource=function(a,c){return!1};this.alternateEdgeStyle="vertical";null==d&&this.loadStylesheet();var h=this.graphHandler.getGuideStates;this.graphHandler.getGuideStates=
-function(){var a=h.apply(this,arguments);if(this.graph.pageVisible){for(var c=[],b=this.graph.pageFormat,f=this.graph.pageScale,d=b.width*f,b=b.height*f,f=this.graph.view.translate,e=this.graph.view.scale,k=this.graph.getPageLayout(),m=0;m<k.width;m++)c.push(new mxRectangle(((k.x+m)*d+f.x)*e,(k.y*b+f.y)*e,d*e,b*e));for(m=0;m<k.height;m++)c.push(new mxRectangle((k.x*d+f.x)*e,((k.y+m)*b+f.y)*e,d*e,b*e));a=c.concat(a)}return a};mxDragSource.prototype.dragElementZIndex=mxPopupMenu.prototype.zIndex;mxGuide.prototype.getGuideColor=
+Graph=function(a,b,e,d,h){mxGraph.call(this,a,b,e,d);this.themes=h||this.defaultThemes;this.currentEdgeStyle=mxUtils.clone(this.defaultEdgeStyle);this.currentVertexStyle=mxUtils.clone(this.defaultVertexStyle);a=this.baseUrl;b=a.indexOf("//");this.domainPathUrl=this.domainUrl="";0<b&&(b=a.indexOf("/",b+2),0<b&&(this.domainUrl=a.substring(0,b)),b=a.lastIndexOf("/"),0<b&&(this.domainPathUrl=a.substring(0,b+1)));this.isHtmlLabel=function(a){var c=this.view.getState(a);a=null!=c?c.style:this.getCellStyle(a);
+return"1"==a.html||"wrap"==a[mxConstants.STYLE_WHITE_SPACE]};if(this.edgeMode){var l=null,n=null,q=null,c=null,f=!1;this.addListener(mxEvent.FIRE_MOUSE_EVENT,mxUtils.bind(this,function(a,b){if("mouseDown"==b.getProperty("eventName")&&this.isEnabled()){var d=b.getProperty("event");if(!mxEvent.isControlDown(d.getEvent())&&!mxEvent.isShiftDown(d.getEvent())){var g=d.getState();null!=g&&this.model.isEdge(g.cell)&&(l=new mxPoint(d.getGraphX(),d.getGraphY()),f=this.isCellSelected(g.cell),q=g,n=d,null!=
+g.text&&null!=g.text.boundingBox&&mxUtils.contains(g.text.boundingBox,d.getGraphX(),d.getGraphY())?c=mxEvent.LABEL_HANDLE:(g=this.selectionCellsHandler.getHandler(g.cell),null!=g&&null!=g.bends&&0<g.bends.length&&(c=g.getHandleForEvent(d))))}}}));this.addMouseListener({mouseDown:function(a,c){},mouseMove:mxUtils.bind(this,function(a,b){var d=this.selectionCellsHandler.handlers.map,g;for(g in d)if(null!=d[g].index)return;if(this.isEnabled()&&!this.panningHandler.isActive()&&!mxEvent.isControlDown(b.getEvent())&&
+!mxEvent.isShiftDown(b.getEvent())&&!mxEvent.isAltDown(b.getEvent()))if(g=this.tolerance,null!=l&&null!=q&&null!=n){if(d=q,Math.abs(l.x-b.getGraphX())>g||Math.abs(l.y-b.getGraphY())>g){this.isCellSelected(d.cell)||this.setSelectionCell(d.cell);var e=this.selectionCellsHandler.getHandler(d.cell);if(null!=e&&null!=e.bends&&0<e.bends.length){var k=e.getHandleForEvent(n),p=this.view.getEdgeStyle(d);g=p==mxEdgeStyle.EntityRelation;f||c!=mxEvent.LABEL_HANDLE||(k=c);if(g&&0!=k&&k!=e.bends.length-1&&k!=mxEvent.LABEL_HANDLE)!g||
+null==d.visibleSourceState&&null==d.visibleTargetState||(this.graphHandler.reset(),b.consume());else if(k==mxEvent.LABEL_HANDLE||0==k||null!=d.visibleSourceState||k==e.bends.length-1||null!=d.visibleTargetState)g||k==mxEvent.LABEL_HANDLE||(g=d.absolutePoints,null!=g&&(null==p&&null==k||p==mxEdgeStyle.OrthConnector)&&(k=c,null==k&&(k=new mxRectangle(l.x,l.y),k.grow(mxEdgeHandler.prototype.handleImage.width/2),mxUtils.contains(k,g[0].x,g[0].y)?k=0:mxUtils.contains(k,g[g.length-1].x,g[g.length-1].y)?
+k=e.bends.length-1:null!=p&&(2==g.length||3==g.length&&(0==Math.round(g[0].x-g[1].x)&&0==Math.round(g[1].x-g[2].x)||0==Math.round(g[0].y-g[1].y)&&0==Math.round(g[1].y-g[2].y)))?k=2:(k=mxUtils.findNearestSegment(d,l.x,l.y),k=null==p?mxEvent.VIRTUAL_HANDLE-k:k+1))),null==k&&(k=mxEvent.VIRTUAL_HANDLE)),e.start(b.getGraphX(),b.getGraphX(),k),c=l=n=q=null,f=!1,b.consume(),this.graphHandler.reset()}}}else if(d=b.getState(),null!=d&&this.model.isEdge(d.cell)){e=null;g=d.absolutePoints;if(null!=g)if(k=new mxRectangle(b.getGraphX(),
+b.getGraphY()),k.grow(mxEdgeHandler.prototype.handleImage.width/2),null!=d.text&&null!=d.text.boundingBox&&mxUtils.contains(d.text.boundingBox,b.getGraphX(),b.getGraphY()))e="move";else if(mxUtils.contains(k,g[0].x,g[0].y)||mxUtils.contains(k,g[g.length-1].x,g[g.length-1].y))e="pointer";else if(null!=d.visibleSourceState||null!=d.visibleTargetState)p=this.view.getEdgeStyle(d),e="crosshair",p!=mxEdgeStyle.EntityRelation&&this.isOrthogonal(d)&&(p=mxUtils.findNearestSegment(d,b.getGraphX(),b.getGraphY()),
+p<g.length-1&&0<=p&&(e=0==Math.round(g[p].x-g[p+1].x)?"col-resize":"row-resize"));null!=e&&d.setCursor(e)}}),mouseUp:mxUtils.bind(this,function(a,b){c=l=n=q=null})})}this.cellRenderer.getLabelValue=function(a){var c=mxCellRenderer.prototype.getLabelValue.apply(this,arguments);a.view.graph.isHtmlLabel(a.cell)&&(c=1!=a.style.html?mxUtils.htmlEntities(c,!1):a.view.graph.sanitizeHtml(c));return c};if("undefined"!==typeof mxVertexHandler){this.setConnectable(!0);this.setDropEnabled(!0);this.setPanning(!0);
+this.setTooltips(!0);this.setAllowLoops(!0);this.allowAutoPanning=!0;this.constrainChildren=this.resetEdgesOnConnect=!1;this.constrainRelativeChildren=!0;this.graphHandler.scrollOnMove=!1;this.graphHandler.scaleGrid=!0;this.connectionHandler.setCreateTarget(!1);this.connectionHandler.insertBeforeSource=!0;this.connectionHandler.isValidSource=function(a,c){return!1};this.alternateEdgeStyle="vertical";null==d&&this.loadStylesheet();var g=this.graphHandler.getGuideStates;this.graphHandler.getGuideStates=
+function(){var a=g.apply(this,arguments);if(this.graph.pageVisible){for(var c=[],b=this.graph.pageFormat,f=this.graph.pageScale,d=b.width*f,b=b.height*f,f=this.graph.view.translate,e=this.graph.view.scale,k=this.graph.getPageLayout(),p=0;p<k.width;p++)c.push(new mxRectangle(((k.x+p)*d+f.x)*e,(k.y*b+f.y)*e,d*e,b*e));for(p=0;p<k.height;p++)c.push(new mxRectangle((k.x*d+f.x)*e,((k.y+p)*b+f.y)*e,d*e,b*e));a=c.concat(a)}return a};mxDragSource.prototype.dragElementZIndex=mxPopupMenu.prototype.zIndex;mxGuide.prototype.getGuideColor=
 function(a,c){return null==a.cell?"#ffa500":mxConstants.GUIDE_COLOR};this.graphHandler.createPreviewShape=function(a){this.previewColor="#000000"==this.graph.background?"#ffffff":mxGraphHandler.prototype.previewColor;return mxGraphHandler.prototype.createPreviewShape.apply(this,arguments)};this.graphHandler.getCells=function(a){for(var c=mxGraphHandler.prototype.getCells.apply(this,arguments),b=[],f=0;f<c.length;f++){var d=this.graph.view.getState(c[f]),d=null!=d?d.style:this.graph.getCellStyle(c[f]);
-"1"==mxUtils.getValue(d,"part","0")?(d=this.graph.model.getParent(c[f]),this.graph.model.isVertex(d)&&0>mxUtils.indexOf(c,d)&&b.push(d)):b.push(c[f])}return b};this.connectionHandler.createTargetVertex=function(a,c){var b=this.graph.view.getState(c),b=null!=b?b.style:this.graph.getCellStyle(c);mxUtils.getValue(b,"part",!1)&&(b=this.graph.model.getParent(c),this.graph.model.isVertex(b)&&(c=b));return mxConnectionHandler.prototype.createTargetVertex.apply(this,arguments)};var m=new mxRubberband(this);
-this.getRubberband=function(){return m};var n=(new Date).getTime(),u=0,r=this.connectionHandler.mouseMove;this.connectionHandler.mouseMove=function(){var a=this.currentState;r.apply(this,arguments);a!=this.currentState?(n=(new Date).getTime(),u=0):u=(new Date).getTime()-n};var k=this.connectionHandler.isOutlineConnectEvent;this.connectionHandler.isOutlineConnectEvent=function(a){return null!=this.currentState&&a.getState()==this.currentState&&2E3<u||(null==this.currentState||"0"!=mxUtils.getValue(this.currentState.style,
-"outlineConnect","1"))&&k.apply(this,arguments)};var t=this.isToggleEvent;this.isToggleEvent=function(a){return t.apply(this,arguments)||mxEvent.isShiftDown(a)};var v=m.isForceRubberbandEvent;m.isForceRubberbandEvent=function(a){return v.apply(this,arguments)||mxUtils.hasScrollbars(this.graph.container)&&mxClient.IS_FF&&mxClient.IS_WIN&&null==a.getState()&&mxEvent.isTouchEvent(a.getEvent())};var x=null;this.panningHandler.addListener(mxEvent.PAN_START,mxUtils.bind(this,function(){this.isEnabled()&&
+"1"==mxUtils.getValue(d,"part","0")?(d=this.graph.model.getParent(c[f]),this.graph.model.isVertex(d)&&0>mxUtils.indexOf(c,d)&&b.push(d)):b.push(c[f])}return b};this.connectionHandler.createTargetVertex=function(a,c){var b=this.graph.view.getState(c),b=null!=b?b.style:this.graph.getCellStyle(c);mxUtils.getValue(b,"part",!1)&&(b=this.graph.model.getParent(c),this.graph.model.isVertex(b)&&(c=b));return mxConnectionHandler.prototype.createTargetVertex.apply(this,arguments)};var p=new mxRubberband(this);
+this.getRubberband=function(){return p};var m=(new Date).getTime(),u=0,r=this.connectionHandler.mouseMove;this.connectionHandler.mouseMove=function(){var a=this.currentState;r.apply(this,arguments);a!=this.currentState?(m=(new Date).getTime(),u=0):u=(new Date).getTime()-m};var k=this.connectionHandler.isOutlineConnectEvent;this.connectionHandler.isOutlineConnectEvent=function(a){return null!=this.currentState&&a.getState()==this.currentState&&2E3<u||(null==this.currentState||"0"!=mxUtils.getValue(this.currentState.style,
+"outlineConnect","1"))&&k.apply(this,arguments)};var v=this.isToggleEvent;this.isToggleEvent=function(a){return v.apply(this,arguments)||mxEvent.isShiftDown(a)};var t=p.isForceRubberbandEvent;p.isForceRubberbandEvent=function(a){return t.apply(this,arguments)||mxUtils.hasScrollbars(this.graph.container)&&mxClient.IS_FF&&mxClient.IS_WIN&&null==a.getState()&&mxEvent.isTouchEvent(a.getEvent())};var x=null;this.panningHandler.addListener(mxEvent.PAN_START,mxUtils.bind(this,function(){this.isEnabled()&&
 (x=this.container.style.cursor,this.container.style.cursor="move")}));this.panningHandler.addListener(mxEvent.PAN_END,mxUtils.bind(this,function(){this.isEnabled()&&(this.container.style.cursor=x)}));this.popupMenuHandler.autoExpand=!0;this.popupMenuHandler.isSelectOnPopup=function(a){return mxEvent.isMouseEvent(a.getEvent())};var w=this.click;this.click=function(a){if(this.isEnabled()||a.isConsumed())return w.apply(this,arguments);var c=a.getCell();null!=c&&(c=this.getLinkForCell(c),null!=c&&window.open(c))};
-var D=this.getCursorForCell;this.getCursorForCell=function(a){if(this.isEnabled())return D.apply(this,arguments);if(null!=this.getLinkForCell(a))return"pointer"};this.selectRegion=function(a,c){var b=this.getAllCells(a.x,a.y,a.width,a.height);this.selectCellsForEvent(b,c);return b};this.getAllCells=function(a,c,b,f,d,h){h=null!=h?h:[];if(0<b||0<f){var e=this.getModel(),k=a+b,m=c+f;null==d&&(d=this.getCurrentRoot(),null==d&&(d=e.getRoot()));if(null!=d)for(var n=e.getChildCount(d),G=0;G<n;G++){var r=
-e.getChildAt(d,G),t=this.view.getState(r);if(null!=t&&this.isCellVisible(r)&&"1"!=mxUtils.getValue(t.style,"locked","0")){var v=mxUtils.getValue(t.style,mxConstants.STYLE_ROTATION)||0;0!=v&&(t=mxUtils.getBoundingBox(t,v));(e.isEdge(r)||e.isVertex(r))&&t.x>=a&&t.y+t.height<=m&&t.y>=c&&t.x+t.width<=k&&h.push(r);this.getAllCells(a,c,b,f,r,h)}}}return h};var B=this.graphHandler.shouldRemoveCellsFromParent;this.graphHandler.shouldRemoveCellsFromParent=function(a,c,b){return this.graph.isCellSelected(a)?
-!1:B.apply(this,arguments)};this.isCellLocked=function(a){for(a=this.view.getState(a);null!=a;){if("1"==mxUtils.getValue(a.style,"locked","0"))return!0;a=this.view.getState(this.model.getParent(a.cell))}return!1};var y=null;this.addListener(mxEvent.FIRE_MOUSE_EVENT,mxUtils.bind(this,function(a,c){if("mouseDown"==c.getProperty("eventName")){var b=c.getProperty("event").getState();y=null==b||this.isSelectionEmpty()||this.isCellSelected(b.cell)?null:this.getSelectionCells()}}));this.addListener(mxEvent.TAP_AND_HOLD,
-mxUtils.bind(this,function(a,c){if(!mxEvent.isMultiTouchEvent(c)){var b=c.getProperty("event"),f=c.getProperty("cell");null==f?(b=mxUtils.convertPoint(this.container,mxEvent.getClientX(b),mxEvent.getClientY(b)),m.start(b.x,b.y)):null!=y?this.addSelectionCells(y):1<this.getSelectionCount()&&this.isCellSelected(f)&&this.removeSelectionCell(f);y=null;c.consume()}}));this.connectionHandler.selectCells=function(a,c){this.graph.setSelectionCell(c||a)};this.connectionHandler.constraintHandler.isStateIgnored=
+var D=this.getCursorForCell;this.getCursorForCell=function(a){if(this.isEnabled())return D.apply(this,arguments);if(null!=this.getLinkForCell(a))return"pointer"};this.selectRegion=function(a,c){var b=this.getAllCells(a.x,a.y,a.width,a.height);this.selectCellsForEvent(b,c);return b};this.getAllCells=function(a,c,b,f,d,g){g=null!=g?g:[];if(0<b||0<f){var e=this.getModel(),k=a+b,p=c+f;null==d&&(d=this.getCurrentRoot(),null==d&&(d=e.getRoot()));if(null!=d)for(var m=e.getChildCount(d),H=0;H<m;H++){var r=
+e.getChildAt(d,H),t=this.view.getState(r);if(null!=t&&this.isCellVisible(r)&&"1"!=mxUtils.getValue(t.style,"locked","0")){var v=mxUtils.getValue(t.style,mxConstants.STYLE_ROTATION)||0;0!=v&&(t=mxUtils.getBoundingBox(t,v));(e.isEdge(r)||e.isVertex(r))&&t.x>=a&&t.y+t.height<=p&&t.y>=c&&t.x+t.width<=k&&g.push(r);this.getAllCells(a,c,b,f,r,g)}}}return g};var A=this.graphHandler.shouldRemoveCellsFromParent;this.graphHandler.shouldRemoveCellsFromParent=function(a,c,b){return this.graph.isCellSelected(a)?
+!1:A.apply(this,arguments)};this.isCellLocked=function(a){for(a=this.view.getState(a);null!=a;){if("1"==mxUtils.getValue(a.style,"locked","0"))return!0;a=this.view.getState(this.model.getParent(a.cell))}return!1};var z=null;this.addListener(mxEvent.FIRE_MOUSE_EVENT,mxUtils.bind(this,function(a,c){if("mouseDown"==c.getProperty("eventName")){var b=c.getProperty("event").getState();z=null==b||this.isSelectionEmpty()||this.isCellSelected(b.cell)?null:this.getSelectionCells()}}));this.addListener(mxEvent.TAP_AND_HOLD,
+mxUtils.bind(this,function(a,c){if(!mxEvent.isMultiTouchEvent(c)){var b=c.getProperty("event"),f=c.getProperty("cell");null==f?(b=mxUtils.convertPoint(this.container,mxEvent.getClientX(b),mxEvent.getClientY(b)),p.start(b.x,b.y)):null!=z?this.addSelectionCells(z):1<this.getSelectionCount()&&this.isCellSelected(f)&&this.removeSelectionCell(f);z=null;c.consume()}}));this.connectionHandler.selectCells=function(a,c){this.graph.setSelectionCell(c||a)};this.connectionHandler.constraintHandler.isStateIgnored=
 function(a,c){return c&&a.view.graph.isCellSelected(a.cell)};this.selectionModel.addListener(mxEvent.CHANGE,mxUtils.bind(this,function(){var a=this.connectionHandler.constraintHandler;null!=a.currentFocus&&a.isStateIgnored(a.currentFocus,!0)&&(a.currentFocus=null,a.constraints=null,a.destroyIcons());a.destroyFocusHighlight()}));Graph.touchStyle&&this.initTouch();var C=this.updateMouseEvent;this.updateMouseEvent=function(a){a=C.apply(this,arguments);this.isCellLocked(a.getCell())&&(a.state=null);return a}}};
 Graph.touchStyle=mxClient.IS_TOUCH||mxClient.IS_FF&&mxClient.IS_WIN||0<navigator.maxTouchPoints||0<navigator.msMaxTouchPoints||null==window.urlParams||"1"==urlParams.touch;Graph.fileSupport=null!=window.File&&null!=window.FileReader&&null!=window.FileList&&(null==window.urlParams||"0"!=urlParams.filesupport);Graph.lineJumpsEnabled=!0;Graph.defaultJumpSize=6;mxUtils.extend(Graph,mxGraph);Graph.prototype.minFitScale=null;Graph.prototype.maxFitScale=null;
 Graph.prototype.linkPolicy="frame"==urlParams.target?"blank":urlParams.target||"auto";Graph.prototype.linkTarget="frame"==urlParams.target?"_self":"_blank";Graph.prototype.defaultScrollbars=!mxClient.IS_IOS;Graph.prototype.defaultPageVisible=!0;Graph.prototype.lightbox=!1;Graph.prototype.defaultGraphBackground="#ffffff";Graph.prototype.scrollTileSize=new mxRectangle(0,0,400,400);Graph.prototype.transparentBackground=!0;Graph.prototype.defaultEdgeLength=80;Graph.prototype.edgeMode=!1;
 Graph.prototype.connectionArrowsEnabled=!0;Graph.prototype.placeholderPattern=RegExp("%(date{.*}|[^%^{^}]+)%","g");Graph.prototype.absoluteUrlPattern=/^(?:[a-z]+:)?\/\//i;Graph.prototype.defaultThemeName="default";Graph.prototype.defaultThemes={};Graph.prototype.baseUrl=(window!=window.top?document.referrer:document.location.toString()).split("#")[0];
-Graph.prototype.init=function(a){mxGraph.prototype.init.apply(this,arguments);this.cellRenderer.initializeLabel=function(a,e){mxCellRenderer.prototype.initializeLabel.apply(this,arguments);var b=a.view.graph.tolerance,g=!0,l=null,p=mxUtils.bind(this,function(a){g=!0;l=new mxPoint(mxEvent.getClientX(a),mxEvent.getClientY(a))}),q=mxUtils.bind(this,function(a){g=g&&null!=l&&Math.abs(l.x-mxEvent.getClientX(a))<b&&Math.abs(l.y-mxEvent.getClientY(a))<b}),c=mxUtils.bind(this,function(c){if(g)for(var b=mxEvent.getSource(c);null!=
-b&&b!=e.node;){if("a"==b.nodeName.toLowerCase()){a.view.graph.labelLinkClicked(a,b,c);break}b=b.parentNode}});mxEvent.addGestureListeners(e.node,p,q,c);mxEvent.addListener(e.node,"click",function(a){mxEvent.consume(a)})};this.initLayoutManager()};Graph.prototype.isPageLink=function(a){return!1};
+Graph.prototype.init=function(a){mxGraph.prototype.init.apply(this,arguments);this.cellRenderer.initializeLabel=function(a,e){mxCellRenderer.prototype.initializeLabel.apply(this,arguments);var b=a.view.graph.tolerance,h=!0,l=null,n=mxUtils.bind(this,function(a){h=!0;l=new mxPoint(mxEvent.getClientX(a),mxEvent.getClientY(a))}),q=mxUtils.bind(this,function(a){h=h&&null!=l&&Math.abs(l.x-mxEvent.getClientX(a))<b&&Math.abs(l.y-mxEvent.getClientY(a))<b}),c=mxUtils.bind(this,function(c){if(h)for(var b=mxEvent.getSource(c);null!=
+b&&b!=e.node;){if("a"==b.nodeName.toLowerCase()){a.view.graph.labelLinkClicked(a,b,c);break}b=b.parentNode}});mxEvent.addGestureListeners(e.node,n,q,c);mxEvent.addListener(e.node,"click",function(a){mxEvent.consume(a)})};this.initLayoutManager()};Graph.prototype.isPageLink=function(a){return!1};
 Graph.prototype.labelLinkClicked=function(a,b,e){b=b.getAttribute("href");if(null!=b&&!this.isPageLink(b)){if(!this.isEnabled()){var d=a.view.graph.isBlankLink(b)?a.view.graph.linkTarget:"_top";b=a.view.graph.getAbsoluteUrl(b);"_self"==d&&window!=window.top?window.location.href=b:b.substring(0,this.baseUrl.length)==this.baseUrl&&"#"==b.charAt(this.baseUrl.length)&&"_top"==d&&window==window.top?window.location.hash=b.split("#")[1]:(mxEvent.isLeftMouseButton(e)&&!mxEvent.isPopupTrigger(e)||mxEvent.isTouchEvent(e))&&
 window.open(b,d)}mxEvent.consume(e)}};
 Graph.prototype.initLayoutManager=function(){this.layoutManager=new mxLayoutManager(this);this.layoutManager.getLayout=function(a){var b=this.graph.view.getState(a);a=null!=b?b.style:this.graph.getCellStyle(a);return"stackLayout"==a.childLayout?(b=new mxStackLayout(this.graph,!0),b.resizeParentMax="1"==mxUtils.getValue(a,"resizeParentMax","1"),b.horizontal="1"==mxUtils.getValue(a,"horizontalStack","1"),b.resizeParent="1"==mxUtils.getValue(a,"resizeParent","1"),b.resizeLast="1"==mxUtils.getValue(a,
 "resizeLast","0"),b.marginLeft=a.marginLeft||0,b.marginRight=a.marginRight||0,b.marginTop=a.marginTop||0,b.marginBottom=a.marginBottom||0,b.fill=!0,b):"treeLayout"==a.childLayout?(b=new mxCompactTreeLayout(this.graph),b.horizontal="1"==mxUtils.getValue(a,"horizontalTree","1"),b.resizeParent="1"==mxUtils.getValue(a,"resizeParent","1"),b.groupPadding=mxUtils.getValue(a,"parentPadding",20),b.levelDistance=mxUtils.getValue(a,"treeLevelDistance",30),b.maintainParentLocation=!0,b.edgeRouting=!1,b.resetEdges=
 !1,b):"flowLayout"==a.childLayout?(b=new mxHierarchicalLayout(this.graph,mxUtils.getValue(a,"flowOrientation",mxConstants.DIRECTION_EAST)),b.resizeParent="1"==mxUtils.getValue(a,"resizeParent","1"),b.parentBorder=mxUtils.getValue(a,"parentPadding",20),b.maintainParentLocation=!0,b.intraCellSpacing=mxUtils.getValue(a,"intraCellSpacing",mxHierarchicalLayout.prototype.intraCellSpacing),b.interRankCellSpacing=mxUtils.getValue(a,"interRankCellSpacing",mxHierarchicalLayout.prototype.interRankCellSpacing),
 b.interHierarchySpacing=mxUtils.getValue(a,"interHierarchySpacing",mxHierarchicalLayout.prototype.interHierarchySpacing),b.parallelEdgeSpacing=mxUtils.getValue(a,"parallelEdgeSpacing",mxHierarchicalLayout.prototype.parallelEdgeSpacing),b):null}};Graph.prototype.getPageSize=function(){return this.pageVisible?new mxRectangle(0,0,this.pageFormat.width*this.pageScale,this.pageFormat.height*this.pageScale):this.scrollTileSize};
-Graph.prototype.getPageLayout=function(){var a=this.getPageSize(),b=this.getGraphBounds();if(0==b.width||0==b.height)return new mxRectangle(0,0,1,1);var e=Math.ceil(b.x/this.view.scale-this.view.translate.x),d=Math.ceil(b.y/this.view.scale-this.view.translate.y),g=Math.floor(e/a.width),l=Math.floor(d/a.height);return new mxRectangle(g,l,Math.ceil((e+Math.floor(b.width/this.view.scale))/a.width)-g,Math.ceil((d+Math.floor(b.height/this.view.scale))/a.height)-l)};
+Graph.prototype.getPageLayout=function(){var a=this.getPageSize(),b=this.getGraphBounds();if(0==b.width||0==b.height)return new mxRectangle(0,0,1,1);var e=Math.ceil(b.x/this.view.scale-this.view.translate.x),d=Math.ceil(b.y/this.view.scale-this.view.translate.y),h=Math.floor(e/a.width),l=Math.floor(d/a.height);return new mxRectangle(h,l,Math.ceil((e+Math.floor(b.width/this.view.scale))/a.width)-h,Math.ceil((d+Math.floor(b.height/this.view.scale))/a.height)-l)};
 Graph.prototype.sanitizeHtml=function(a,b){return html_sanitize(a,function(a){return null!=a&&"javascript:"!==a.toString().toLowerCase().substring(0,11)?a:null},function(a){return a})};Graph.prototype.updatePlaceholders=function(){var a=!1,b;for(b in this.model.cells){var e=this.model.cells[b];this.isReplacePlaceholders(e)&&(this.view.invalidate(e,!1,!1),a=!0)}a&&this.view.validate()};Graph.prototype.isReplacePlaceholders=function(a){return null!=a.value&&"object"==typeof a.value&&"1"==a.value.getAttribute("placeholders")};
 Graph.prototype.isTransparentClickEvent=function(a){return mxEvent.isAltDown(a)};Graph.prototype.isIgnoreTerminalEvent=function(a){return mxEvent.isShiftDown(a)&&mxEvent.isControlDown(a)};Graph.prototype.isSplitTarget=function(a,b,e){return!this.model.isEdge(b[0])&&!mxEvent.isAltDown(e)&&!mxEvent.isShiftDown(e)&&mxGraph.prototype.isSplitTarget.apply(this,arguments)};
 Graph.prototype.getLabel=function(a){var b=mxGraph.prototype.getLabel.apply(this,arguments);null!=b&&this.isReplacePlaceholders(a)&&null==a.getAttribute("placeholder")&&(b=this.replacePlaceholders(a,b));return b};Graph.prototype.isLabelMovable=function(a){var b=this.view.getState(a),b=null!=b?b.style:this.getCellStyle(a);return!this.isCellLocked(a)&&(this.model.isEdge(a)&&this.edgeLabelsMovable||this.model.isVertex(a)&&(this.vertexLabelsMovable||"1"==mxUtils.getValue(b,"labelMovable","0")))};
 Graph.prototype.setGridSize=function(a){this.gridSize=a;this.fireEvent(new mxEventObject("gridSizeChanged"))};Graph.prototype.getGlobalVariable=function(a){var b=null;"date"==a?b=(new Date).toLocaleDateString():"time"==a?b=(new Date).toLocaleTimeString():"timestamp"==a?b=(new Date).toLocaleString():"date{"==a.substring(0,5)&&(a=a.substring(5,a.length-1),b=this.formatDate(new Date,a));return b};
 Graph.prototype.formatDate=function(a,b,e){null==this.dateFormatCache&&(this.dateFormatCache={i18n:{dayNames:"Sun Mon Tue Wed Thu Fri Sat Sunday Monday Tuesday Wednesday Thursday Friday Saturday".split(" "),monthNames:"Jan Feb Mar Apr May Jun Jul Aug Sep Oct Nov Dec January February March April May June July August September October November December".split(" ")},masks:{"default":"ddd mmm dd yyyy HH:MM:ss",shortDate:"m/d/yy",mediumDate:"mmm d, yyyy",longDate:"mmmm d, yyyy",fullDate:"dddd, mmmm d, yyyy",
-shortTime:"h:MM TT",mediumTime:"h:MM:ss TT",longTime:"h:MM:ss TT Z",isoDate:"yyyy-mm-dd",isoTime:"HH:MM:ss",isoDateTime:"yyyy-mm-dd'T'HH:MM:ss",isoUtcDateTime:"UTC:yyyy-mm-dd'T'HH:MM:ss'Z'"}});var d=this.dateFormatCache,g=/\b(?:[PMCEA][SDP]T|(?:Pacific|Mountain|Central|Eastern|Atlantic) (?:Standard|Daylight|Prevailing) Time|(?:GMT|UTC)(?:[-+]\d{4})?)\b/g,l=/[^-+\dA-Z]/g,p=function(a,c){a=String(a);for(c=c||2;a.length<c;)a="0"+a;return a};1!=arguments.length||"[object String]"!=Object.prototype.toString.call(a)||
-/\d/.test(a)||(b=a,a=void 0);a=a?new Date(a):new Date;if(isNaN(a))throw SyntaxError("invalid date");b=String(d.masks[b]||b||d.masks["default"]);"UTC:"==b.slice(0,4)&&(b=b.slice(4),e=!0);var q=e?"getUTC":"get",c=a[q+"Date"](),f=a[q+"Day"](),h=a[q+"Month"](),m=a[q+"FullYear"](),n=a[q+"Hours"](),u=a[q+"Minutes"](),r=a[q+"Seconds"](),q=a[q+"Milliseconds"](),k=e?0:a.getTimezoneOffset(),t={d:c,dd:p(c),ddd:d.i18n.dayNames[f],dddd:d.i18n.dayNames[f+7],m:h+1,mm:p(h+1),mmm:d.i18n.monthNames[h],mmmm:d.i18n.monthNames[h+
-12],yy:String(m).slice(2),yyyy:m,h:n%12||12,hh:p(n%12||12),H:n,HH:p(n),M:u,MM:p(u),s:r,ss:p(r),l:p(q,3),L:p(99<q?Math.round(q/10):q),t:12>n?"a":"p",tt:12>n?"am":"pm",T:12>n?"A":"P",TT:12>n?"AM":"PM",Z:e?"UTC":(String(a).match(g)||[""]).pop().replace(l,""),o:(0<k?"-":"+")+p(100*Math.floor(Math.abs(k)/60)+Math.abs(k)%60,4),S:["th","st","nd","rd"][3<c%10?0:(10!=c%100-c%10)*c%10]};return b.replace(/d{1,4}|m{1,4}|yy(?:yy)?|([HhMsTt])\1?|[LloSZ]|"[^"]*"|'[^']*'/g,function(a){return a in t?t[a]:a.slice(1,
+shortTime:"h:MM TT",mediumTime:"h:MM:ss TT",longTime:"h:MM:ss TT Z",isoDate:"yyyy-mm-dd",isoTime:"HH:MM:ss",isoDateTime:"yyyy-mm-dd'T'HH:MM:ss",isoUtcDateTime:"UTC:yyyy-mm-dd'T'HH:MM:ss'Z'"}});var d=this.dateFormatCache,h=/\b(?:[PMCEA][SDP]T|(?:Pacific|Mountain|Central|Eastern|Atlantic) (?:Standard|Daylight|Prevailing) Time|(?:GMT|UTC)(?:[-+]\d{4})?)\b/g,l=/[^-+\dA-Z]/g,n=function(a,c){a=String(a);for(c=c||2;a.length<c;)a="0"+a;return a};1!=arguments.length||"[object String]"!=Object.prototype.toString.call(a)||
+/\d/.test(a)||(b=a,a=void 0);a=a?new Date(a):new Date;if(isNaN(a))throw SyntaxError("invalid date");b=String(d.masks[b]||b||d.masks["default"]);"UTC:"==b.slice(0,4)&&(b=b.slice(4),e=!0);var q=e?"getUTC":"get",c=a[q+"Date"](),f=a[q+"Day"](),g=a[q+"Month"](),p=a[q+"FullYear"](),m=a[q+"Hours"](),u=a[q+"Minutes"](),r=a[q+"Seconds"](),q=a[q+"Milliseconds"](),k=e?0:a.getTimezoneOffset(),v={d:c,dd:n(c),ddd:d.i18n.dayNames[f],dddd:d.i18n.dayNames[f+7],m:g+1,mm:n(g+1),mmm:d.i18n.monthNames[g],mmmm:d.i18n.monthNames[g+
+12],yy:String(p).slice(2),yyyy:p,h:m%12||12,hh:n(m%12||12),H:m,HH:n(m),M:u,MM:n(u),s:r,ss:n(r),l:n(q,3),L:n(99<q?Math.round(q/10):q),t:12>m?"a":"p",tt:12>m?"am":"pm",T:12>m?"A":"P",TT:12>m?"AM":"PM",Z:e?"UTC":(String(a).match(h)||[""]).pop().replace(l,""),o:(0<k?"-":"+")+n(100*Math.floor(Math.abs(k)/60)+Math.abs(k)%60,4),S:["th","st","nd","rd"][3<c%10?0:(10!=c%100-c%10)*c%10]};return b.replace(/d{1,4}|m{1,4}|yy(?:yy)?|([HhMsTt])\1?|[LloSZ]|"[^"]*"|'[^']*'/g,function(a){return a in v?v[a]:a.slice(1,
 a.length-1)})};
-Graph.prototype.createLayersDialog=function(){var a=document.createElement("div");a.style.position="absolute";for(var b=this.getModel(),e=b.getChildCount(b.root),d=0;d<e;d++)(function(d){var e=document.createElement("div");e.style.overflow="hidden";e.style.textOverflow="ellipsis";e.style.padding="2px";e.style.whiteSpace="nowrap";var g=document.createElement("input");g.style.display="inline-block";g.setAttribute("type","checkbox");b.isVisible(d)&&(g.setAttribute("checked","checked"),g.defaultChecked=
-!0);e.appendChild(g);var q=d.value||mxResources.get("background")||"Background";e.setAttribute("title",q);mxUtils.write(e,q);a.appendChild(e);mxEvent.addListener(g,"click",function(){null!=g.getAttribute("checked")?g.removeAttribute("checked"):g.setAttribute("checked","checked");b.setVisible(d,g.checked)})})(b.getChildAt(b.root,d));return a};
-Graph.prototype.replacePlaceholders=function(a,b){for(var e=[],d=0;match=this.placeholderPattern.exec(b);){var g=match[0];if(2<g.length&&"%label%"!=g&&"%tooltip%"!=g){var l=null;if(match.index>d&&"%"==b.charAt(match.index-1))l=g.substring(1);else{var p=g.substring(1,g.length-1);if(0>p.indexOf("{"))for(var q=a;null==l&&null!=q;)null!=q.value&&"object"==typeof q.value&&(l=q.hasAttribute(p)?null!=q.getAttribute(p)?q.getAttribute(p):"":null),q=this.model.getParent(q);null==l&&(l=this.getGlobalVariable(p))}e.push(b.substring(d,
-match.index)+(null!=l?l:g));d=match.index+g.length}}e.push(b.substring(d));return e.join("")};Graph.prototype.selectCellsForConnectVertex=function(a,b,e){2==a.length&&this.model.isVertex(a[1])?(this.setSelectionCell(a[1]),null!=e&&(mxEvent.isTouchEvent(b)?e.update(e.getState(this.view.getState(a[1]))):e.reset()),this.scrollCellToVisible(a[1])):this.setSelectionCells(a)};
-Graph.prototype.connectVertex=function(a,b,e,d,g,l){l=l?l:!1;var p=a.geometry.relative&&null!=a.parent.geometry?new mxPoint(a.parent.geometry.width*a.geometry.x,a.parent.geometry.height*a.geometry.y):new mxPoint(a.geometry.x,a.geometry.y);b==mxConstants.DIRECTION_NORTH?(p.x+=a.geometry.width/2,p.y-=e):b==mxConstants.DIRECTION_SOUTH?(p.x+=a.geometry.width/2,p.y+=a.geometry.height+e):(p.x=b==mxConstants.DIRECTION_WEST?p.x-e:p.x+(a.geometry.width+e),p.y+=a.geometry.height/2);e=this.view.getState(this.model.getParent(a));
-var q=this.view.scale,c=this.view.translate,f=c.x*q,c=c.y*q;this.model.isVertex(e.cell)&&(f=e.x,c=e.y);this.model.isVertex(a.parent)&&a.geometry.relative&&(p.x+=a.parent.geometry.x,p.y+=a.parent.geometry.y);l=l||mxEvent.isControlDown(d)&&!g?null:this.getCellAt(f+p.x*q,c+p.y*q);this.model.isAncestor(l,a)&&(l=null);for(e=l;null!=e;){if(this.isCellLocked(e)){l=null;break}e=this.model.getParent(e)}null!=l&&(e=this.view.getState(a),q=this.view.getState(l),null!=e&&null!=q&&mxUtils.intersects(e,q)&&(l=
-null));if(g=!mxEvent.isShiftDown(d)||g)b==mxConstants.DIRECTION_NORTH?p.y-=a.geometry.height/2:b==mxConstants.DIRECTION_SOUTH?p.y+=a.geometry.height/2:p.x=b==mxConstants.DIRECTION_WEST?p.x-a.geometry.width/2:p.x+a.geometry.width/2;null==l||this.isCellConnectable(l)||(e=this.getModel().getParent(l),this.getModel().isVertex(e)&&this.isCellConnectable(e)&&(l=e));if(l==a||this.model.isEdge(l)||!this.isCellConnectable(l))l=null;e=[];this.model.beginUpdate();try{q=l;if(null==q&&g){for(var f=a,h=this.getCellGeometry(a);null!=
-h&&h.relative;)f=this.getModel().getParent(f),h=this.getCellGeometry(f);var m=this.view.getState(f),n=null!=m?m.style:this.getCellStyle(f);if(mxUtils.getValue(n,"part",!1)){var u=this.model.getParent(f);this.model.isVertex(u)&&(f=u)}q=this.duplicateCells([f],!1)[0];h=this.getCellGeometry(q);null!=h&&(h.x=p.x-h.width/2,h.y=p.y-h.height/2)}h=null;null!=this.layoutManager&&(h=this.layoutManager.getLayout(this.model.getParent(a)));var r=mxEvent.isControlDown(d)&&g||null==l&&null!=h&&h.constructor==mxStackLayout?
-null:this.insertEdge(this.model.getParent(a),null,"",a,q,this.createCurrentEdgeStyle());if(null!=r&&this.connectionHandler.insertBeforeSource){var k=null;for(d=a;null!=d.parent&&null!=d.geometry&&d.geometry.relative&&d.parent!=r.parent;)d=this.model.getParent(d);null!=d&&null!=d.parent&&d.parent==r.parent&&(k=d.parent.getIndex(d),d.parent.insert(r,k))}null==l&&null!=q&&null!=h&&null!=a.parent&&h.constructor==mxStackLayout&&b==mxConstants.DIRECTION_WEST&&(k=a.parent.getIndex(a),a.parent.insert(q,k));
-null!=r&&e.push(r);null==l&&null!=q&&e.push(q);null==q&&null!=r&&r.geometry.setTerminalPoint(p,!1);null!=r&&this.fireEvent(new mxEventObject("cellsInserted","cells",[r]))}finally{this.model.endUpdate()}return e};
+Graph.prototype.createLayersDialog=function(){var a=document.createElement("div");a.style.position="absolute";for(var b=this.getModel(),e=b.getChildCount(b.root),d=0;d<e;d++)(function(d){var e=document.createElement("div");e.style.overflow="hidden";e.style.textOverflow="ellipsis";e.style.padding="2px";e.style.whiteSpace="nowrap";var h=document.createElement("input");h.style.display="inline-block";h.setAttribute("type","checkbox");b.isVisible(d)&&(h.setAttribute("checked","checked"),h.defaultChecked=
+!0);e.appendChild(h);var q=d.value||mxResources.get("background")||"Background";e.setAttribute("title",q);mxUtils.write(e,q);a.appendChild(e);mxEvent.addListener(h,"click",function(){null!=h.getAttribute("checked")?h.removeAttribute("checked"):h.setAttribute("checked","checked");b.setVisible(d,h.checked)})})(b.getChildAt(b.root,d));return a};
+Graph.prototype.replacePlaceholders=function(a,b){for(var e=[],d=0;match=this.placeholderPattern.exec(b);){var h=match[0];if(2<h.length&&"%label%"!=h&&"%tooltip%"!=h){var l=null;if(match.index>d&&"%"==b.charAt(match.index-1))l=h.substring(1);else{var n=h.substring(1,h.length-1);if(0>n.indexOf("{"))for(var q=a;null==l&&null!=q;)null!=q.value&&"object"==typeof q.value&&(l=q.hasAttribute(n)?null!=q.getAttribute(n)?q.getAttribute(n):"":null),q=this.model.getParent(q);null==l&&(l=this.getGlobalVariable(n))}e.push(b.substring(d,
+match.index)+(null!=l?l:h));d=match.index+h.length}}e.push(b.substring(d));return e.join("")};Graph.prototype.selectCellsForConnectVertex=function(a,b,e){2==a.length&&this.model.isVertex(a[1])?(this.setSelectionCell(a[1]),null!=e&&(mxEvent.isTouchEvent(b)?e.update(e.getState(this.view.getState(a[1]))):e.reset()),this.scrollCellToVisible(a[1])):this.setSelectionCells(a)};
+Graph.prototype.connectVertex=function(a,b,e,d,h,l){l=l?l:!1;var n=a.geometry.relative&&null!=a.parent.geometry?new mxPoint(a.parent.geometry.width*a.geometry.x,a.parent.geometry.height*a.geometry.y):new mxPoint(a.geometry.x,a.geometry.y);b==mxConstants.DIRECTION_NORTH?(n.x+=a.geometry.width/2,n.y-=e):b==mxConstants.DIRECTION_SOUTH?(n.x+=a.geometry.width/2,n.y+=a.geometry.height+e):(n.x=b==mxConstants.DIRECTION_WEST?n.x-e:n.x+(a.geometry.width+e),n.y+=a.geometry.height/2);e=this.view.getState(this.model.getParent(a));
+var q=this.view.scale,c=this.view.translate,f=c.x*q,c=c.y*q;this.model.isVertex(e.cell)&&(f=e.x,c=e.y);this.model.isVertex(a.parent)&&a.geometry.relative&&(n.x+=a.parent.geometry.x,n.y+=a.parent.geometry.y);l=l||mxEvent.isControlDown(d)&&!h?null:this.getCellAt(f+n.x*q,c+n.y*q);this.model.isAncestor(l,a)&&(l=null);for(e=l;null!=e;){if(this.isCellLocked(e)){l=null;break}e=this.model.getParent(e)}null!=l&&(e=this.view.getState(a),q=this.view.getState(l),null!=e&&null!=q&&mxUtils.intersects(e,q)&&(l=
+null));if(h=!mxEvent.isShiftDown(d)||h)b==mxConstants.DIRECTION_NORTH?n.y-=a.geometry.height/2:b==mxConstants.DIRECTION_SOUTH?n.y+=a.geometry.height/2:n.x=b==mxConstants.DIRECTION_WEST?n.x-a.geometry.width/2:n.x+a.geometry.width/2;null==l||this.isCellConnectable(l)||(e=this.getModel().getParent(l),this.getModel().isVertex(e)&&this.isCellConnectable(e)&&(l=e));if(l==a||this.model.isEdge(l)||!this.isCellConnectable(l))l=null;e=[];this.model.beginUpdate();try{q=l;if(null==q&&h){for(var f=a,g=this.getCellGeometry(a);null!=
+g&&g.relative;)f=this.getModel().getParent(f),g=this.getCellGeometry(f);var p=this.view.getState(f),m=null!=p?p.style:this.getCellStyle(f);if(mxUtils.getValue(m,"part",!1)){var u=this.model.getParent(f);this.model.isVertex(u)&&(f=u)}q=this.duplicateCells([f],!1)[0];g=this.getCellGeometry(q);null!=g&&(g.x=n.x-g.width/2,g.y=n.y-g.height/2)}g=null;null!=this.layoutManager&&(g=this.layoutManager.getLayout(this.model.getParent(a)));var r=mxEvent.isControlDown(d)&&h||null==l&&null!=g&&g.constructor==mxStackLayout?
+null:this.insertEdge(this.model.getParent(a),null,"",a,q,this.createCurrentEdgeStyle());if(null!=r&&this.connectionHandler.insertBeforeSource){var k=null;for(d=a;null!=d.parent&&null!=d.geometry&&d.geometry.relative&&d.parent!=r.parent;)d=this.model.getParent(d);null!=d&&null!=d.parent&&d.parent==r.parent&&(k=d.parent.getIndex(d),d.parent.insert(r,k))}null==l&&null!=q&&null!=g&&null!=a.parent&&g.constructor==mxStackLayout&&b==mxConstants.DIRECTION_WEST&&(k=a.parent.getIndex(a),a.parent.insert(q,k));
+null!=r&&e.push(r);null==l&&null!=q&&e.push(q);null==q&&null!=r&&r.geometry.setTerminalPoint(n,!1);null!=r&&this.fireEvent(new mxEventObject("cellsInserted","cells",[r]))}finally{this.model.endUpdate()}return e};
 Graph.prototype.getIndexableText=function(){var a=document.createElement("div"),b=[],e,d;for(d in this.model.cells)if(e=this.model.cells[d],this.model.isVertex(e)||this.model.isEdge(e))this.isHtmlLabel(e)?(a.innerHTML=this.getLabel(e),e=mxUtils.extractTextWithWhitespace([a])):e=this.getLabel(e),e=mxUtils.trim(e.replace(/[\x00-\x1F\x7F-\x9F]|\s+/g," ")),0<e.length&&b.push(e);return b.join(" ")};
 Graph.prototype.convertValueToString=function(a){if(null!=a.value&&"object"==typeof a.value){if(this.isReplacePlaceholders(a)&&null!=a.getAttribute("placeholder")){for(var b=a.getAttribute("placeholder"),e=a,d=null;null==d&&null!=e;)null!=e.value&&"object"==typeof e.value&&(d=e.hasAttribute(b)?null!=e.getAttribute(b)?e.getAttribute(b):"":null),e=this.model.getParent(e);return d||""}return a.value.getAttribute("label")}return mxGraph.prototype.convertValueToString.apply(this,arguments)};
 Graph.prototype.getLinksForState=function(a){return null!=a&&null!=a.text&&null!=a.text.node?a.text.node.getElementsByTagName("a"):null};Graph.prototype.getLinkForCell=function(a){return null!=a.value&&"object"==typeof a.value?(a=a.value.getAttribute("link"),null!=a&&"javascript:"===a.toLowerCase().substring(0,11)&&(a=a.substring(11)),a):null};
 Graph.prototype.getCellStyle=function(a){var b=mxGraph.prototype.getCellStyle.apply(this,arguments);if(null!=a&&null!=this.layoutManager){var e=this.model.getParent(a);this.model.isVertex(e)&&this.isCellCollapsed(a)&&(e=this.layoutManager.getLayout(e),null!=e&&e.constructor==mxStackLayout&&(b[mxConstants.STYLE_HORIZONTAL]=!e.horizontal))}return b};
 Graph.prototype.updateAlternateBounds=function(a,b,e){if(null!=a&&null!=b&&null!=this.layoutManager&&null!=b.alternateBounds){var d=this.layoutManager.getLayout(this.model.getParent(a));null!=d&&d.constructor==mxStackLayout&&(d.horizontal?b.alternateBounds.height=0:b.alternateBounds.width=0)}mxGraph.prototype.updateAlternateBounds.apply(this,arguments)};Graph.prototype.isMoveCellsEvent=function(a){return mxEvent.isShiftDown(a)};
-Graph.prototype.foldCells=function(a,b,e,d,g){b=null!=b?b:!1;null==e&&(e=this.getFoldableCells(this.getSelectionCells(),a));if(null!=e){this.model.beginUpdate();try{if(mxGraph.prototype.foldCells.apply(this,arguments),null!=this.layoutManager)for(var l=0;l<e.length;l++){var p=this.view.getState(e[l]),q=this.getCellGeometry(e[l]);if(null!=p&&null!=q){var c=Math.round(q.width-p.width/this.view.scale),f=Math.round(q.height-p.height/this.view.scale);if(0!=f||0!=c){var h=this.model.getParent(e[l]),m=this.layoutManager.getLayout(h);
-null==m?null!=g&&this.isMoveCellsEvent(g)&&this.moveSiblings(p,h,c,f):null!=g&&mxEvent.isAltDown(g)||m.constructor!=mxStackLayout||m.resizeLast||this.resizeParentStacks(h,m,c,f)}}}}finally{this.model.endUpdate()}this.isEnabled()&&this.setSelectionCells(e)}};
-Graph.prototype.moveSiblings=function(a,b,e,d){this.model.beginUpdate();try{var g=this.getCellsBeyond(a.x,a.y,b,!0,!0);for(b=0;b<g.length;b++)if(g[b]!=a.cell){var l=this.view.getState(g[b]),p=this.getCellGeometry(g[b]);null!=l&&null!=p&&(p=p.clone(),p.translate(Math.round(e*Math.max(0,Math.min(1,(l.x-a.x)/a.width))),Math.round(d*Math.max(0,Math.min(1,(l.y-a.y)/a.height)))),this.model.setGeometry(g[b],p))}}finally{this.model.endUpdate()}};
-Graph.prototype.resizeParentStacks=function(a,b,e,d){if(null!=this.layoutManager&&null!=b&&b.constructor==mxStackLayout&&!b.resizeLast){this.model.beginUpdate();try{for(var g=b.horizontal;null!=a&&null!=b&&b.constructor==mxStackLayout&&b.horizontal==g&&!b.resizeLast;){var l=this.getCellGeometry(a),p=this.view.getState(a);null!=p&&null!=l&&(l=l.clone(),b.horizontal?l.width+=e+Math.min(0,p.width/this.view.scale-l.width):l.height+=d+Math.min(0,p.height/this.view.scale-l.height),this.model.setGeometry(a,
+Graph.prototype.foldCells=function(a,b,e,d,h){b=null!=b?b:!1;null==e&&(e=this.getFoldableCells(this.getSelectionCells(),a));if(null!=e){this.model.beginUpdate();try{if(mxGraph.prototype.foldCells.apply(this,arguments),null!=this.layoutManager)for(var l=0;l<e.length;l++){var n=this.view.getState(e[l]),q=this.getCellGeometry(e[l]);if(null!=n&&null!=q){var c=Math.round(q.width-n.width/this.view.scale),f=Math.round(q.height-n.height/this.view.scale);if(0!=f||0!=c){var g=this.model.getParent(e[l]),p=this.layoutManager.getLayout(g);
+null==p?null!=h&&this.isMoveCellsEvent(h)&&this.moveSiblings(n,g,c,f):null!=h&&mxEvent.isAltDown(h)||p.constructor!=mxStackLayout||p.resizeLast||this.resizeParentStacks(g,p,c,f)}}}}finally{this.model.endUpdate()}this.isEnabled()&&this.setSelectionCells(e)}};
+Graph.prototype.moveSiblings=function(a,b,e,d){this.model.beginUpdate();try{var h=this.getCellsBeyond(a.x,a.y,b,!0,!0);for(b=0;b<h.length;b++)if(h[b]!=a.cell){var l=this.view.getState(h[b]),n=this.getCellGeometry(h[b]);null!=l&&null!=n&&(n=n.clone(),n.translate(Math.round(e*Math.max(0,Math.min(1,(l.x-a.x)/a.width))),Math.round(d*Math.max(0,Math.min(1,(l.y-a.y)/a.height)))),this.model.setGeometry(h[b],n))}}finally{this.model.endUpdate()}};
+Graph.prototype.resizeParentStacks=function(a,b,e,d){if(null!=this.layoutManager&&null!=b&&b.constructor==mxStackLayout&&!b.resizeLast){this.model.beginUpdate();try{for(var h=b.horizontal;null!=a&&null!=b&&b.constructor==mxStackLayout&&b.horizontal==h&&!b.resizeLast;){var l=this.getCellGeometry(a),n=this.view.getState(a);null!=n&&null!=l&&(l=l.clone(),b.horizontal?l.width+=e+Math.min(0,n.width/this.view.scale-l.width):l.height+=d+Math.min(0,n.height/this.view.scale-l.height),this.model.setGeometry(a,
 l));a=this.model.getParent(a);b=this.layoutManager.getLayout(a)}}finally{this.model.endUpdate()}}};Graph.prototype.isContainer=function(a){var b=this.view.getState(a),b=null!=b?b.style:this.getCellStyle(a);return this.isSwimlane(a)?"0"!=b.container:"1"==b.container};Graph.prototype.isCellConnectable=function(a){var b=this.view.getState(a),b=null!=b?b.style:this.getCellStyle(a);return null!=b.connectable?"0"!=b.connectable:mxGraph.prototype.isCellConnectable.apply(this,arguments)};
 Graph.prototype.selectAll=function(a){a=a||this.getDefaultParent();this.isCellLocked(a)||mxGraph.prototype.selectAll.apply(this,arguments)};Graph.prototype.selectCells=function(a,b,e){e=e||this.getDefaultParent();this.isCellLocked(e)||mxGraph.prototype.selectCells.apply(this,arguments)};Graph.prototype.getSwimlaneAt=function(a,b,e){e=e||this.getDefaultParent();return this.isCellLocked(e)?null:mxGraph.prototype.getSwimlaneAt.apply(this,arguments)};
 Graph.prototype.isCellFoldable=function(a){var b=this.view.getState(a),b=null!=b?b.style:this.getCellStyle(a);return this.foldingEnabled&&!this.isCellLocked(a)&&(this.isContainer(a)&&"0"!=b.collapsible||!this.isContainer(a)&&"1"==b.collapsible)};Graph.prototype.reset=function(){this.isEditing()&&this.stopEditing(!0);this.escape();this.isSelectionEmpty()||this.clearSelection()};
 Graph.prototype.zoom=function(a,b){a=Math.max(.01,Math.min(this.view.scale*a,160))/this.view.scale;mxGraph.prototype.zoom.apply(this,arguments)};Graph.prototype.zoomIn=function(){.15>this.view.scale?this.zoom((this.view.scale+.01)/this.view.scale):this.zoom(Math.round(this.view.scale*this.zoomFactor*20)/20/this.view.scale)};Graph.prototype.zoomOut=function(){.15>=this.view.scale?this.zoom((this.view.scale-.01)/this.view.scale):this.zoom(Math.round(1/this.zoomFactor*this.view.scale*20)/20/this.view.scale)};
-Graph.prototype.getTooltipForCell=function(a){var b="";if(mxUtils.isNode(a.value)){var e=a.value.getAttribute("tooltip");if(null!=e)null!=e&&this.isReplacePlaceholders(a)&&(e=this.replacePlaceholders(a,e)),b=this.sanitizeHtml(e);else{e=["label","tooltip","placeholders","placeholder"];a=a.value.attributes;var d=[];this.isEnabled()&&e.push("link");for(var g=0;g<a.length;g++)0>mxUtils.indexOf(e,a[g].nodeName)&&0<a[g].nodeValue.length&&d.push({name:a[g].nodeName,value:a[g].nodeValue});d.sort(function(a,
-b){return a.name<b.name?-1:a.name>b.name?1:0});for(g=0;g<d.length;g++)b+=("link"!=d[g].name?d[g].name+":":"")+mxUtils.htmlEntities(d[g].value)+"\n";0<b.length&&(b=b.substring(0,b.length-1))}}return b};Graph.prototype.stringToBytes=function(a){for(var b=Array(a.length),e=0;e<a.length;e++)b[e]=a.charCodeAt(e);return b};Graph.prototype.bytesToString=function(a){for(var b=Array(a.length),e=0;e<a.length;e++)b[e]=String.fromCharCode(a[e]);return b.join("")};
+Graph.prototype.getTooltipForCell=function(a){var b="";if(mxUtils.isNode(a.value)){var e=a.value.getAttribute("tooltip");if(null!=e)null!=e&&this.isReplacePlaceholders(a)&&(e=this.replacePlaceholders(a,e)),b=this.sanitizeHtml(e);else{e=["label","tooltip","placeholders","placeholder"];a=a.value.attributes;var d=[];this.isEnabled()&&e.push("link");for(var h=0;h<a.length;h++)0>mxUtils.indexOf(e,a[h].nodeName)&&0<a[h].nodeValue.length&&d.push({name:a[h].nodeName,value:a[h].nodeValue});d.sort(function(a,
+b){return a.name<b.name?-1:a.name>b.name?1:0});for(h=0;h<d.length;h++)"link"==d[h].name&&this.isPageLink(d[h].value)||(b+=("link"!=d[h].name?d[h].name+":":"")+mxUtils.htmlEntities(d[h].value)+"\n");0<b.length&&(b=b.substring(0,b.length-1))}}return b};Graph.prototype.stringToBytes=function(a){for(var b=Array(a.length),e=0;e<a.length;e++)b[e]=a.charCodeAt(e);return b};Graph.prototype.bytesToString=function(a){for(var b=Array(a.length),e=0;e<a.length;e++)b[e]=String.fromCharCode(a[e]);return b.join("")};
 Graph.prototype.compress=function(a){if(null==a||0==a.length||"undefined"===typeof pako)return a;a=this.bytesToString(pako.deflateRaw(encodeURIComponent(a)));return window.btoa?btoa(a):Base64.encode(a,!0)};Graph.prototype.decompress=function(a){if(null==a||0==a.length||"undefined"===typeof pako)return a;a=window.atob?atob(a):Base64.decode(a,!0);return this.zapGremlins(decodeURIComponent(this.bytesToString(pako.inflateRaw(a))))};
 Graph.prototype.zapGremlins=function(a){for(var b=[],e=0;e<a.length;e++){var d=a.charCodeAt(e);(32<=d||9==d||10==d||13==d)&&b.push(a.charAt(e))}return b.join("")};HoverIcons=function(a){this.graph=a;this.init()};HoverIcons.prototype.arrowSpacing=6;HoverIcons.prototype.updateDelay=500;HoverIcons.prototype.activationDelay=140;HoverIcons.prototype.currentState=null;HoverIcons.prototype.activeArrow=null;HoverIcons.prototype.inactiveOpacity=15;HoverIcons.prototype.checkCollisions=!0;
 HoverIcons.prototype.triangleUp=new mxImage(mxClient.IS_SVG?"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABoAAAAOCAYAAAAxDQxDAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAyJpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuMC1jMDYwIDYxLjEzNDc3NywgMjAxMC8wMi8xMi0xNzozMjowMCAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvIiB4bWxuczp4bXBNTT0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL21tLyIgeG1sbnM6c3RSZWY9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9zVHlwZS9SZXNvdXJjZVJlZiMiIHhtcDpDcmVhdG9yVG9vbD0iQWRvYmUgUGhvdG9zaG9wIENTNSBNYWNpbnRvc2giIHhtcE1NOkluc3RhbmNlSUQ9InhtcC5paWQ6N0ZBN0E3M0U5NjZGMTFFNTg5NTRDNzQwMTgwNDlEQzQiIHhtcE1NOkRvY3VtZW50SUQ9InhtcC5kaWQ6N0ZBN0E3M0Y5NjZGMTFFNTg5NTRDNzQwMTgwNDlEQzQiPiA8eG1wTU06RGVyaXZlZEZyb20gc3RSZWY6aW5zdGFuY2VJRD0ieG1wLmlpZDo3RkE3QTczQzk2NkYxMUU1ODk1NEM3NDAxODA0OURDNCIgc3RSZWY6ZG9jdW1lbnRJRD0ieG1wLmRpZDo3RkE3QTczRDk2NkYxMUU1ODk1NEM3NDAxODA0OURDNCIvPiA8L3JkZjpEZXNjcmlwdGlvbj4gPC9yZGY6UkRGPiA8L3g6eG1wbWV0YT4gPD94cGFja2V0IGVuZD0iciI/Pj625P8AAACySURBVHjaYmRY956BROABxF+A+AgpmpjIsGQjEO8CYidaWeQHtYQNiDmBeAspljGRYMlqqCUwALPMg1oWhWCxBNmyjVCHUGQRyJKlOCyBATaoQ/zItSgciFcQsATdshBSLYqC+oSZhMTCBnVYFLEWgRQuItESGGCG6o0iZFECBZagW5aAyyKQxBwKLUG2bD4Qp6FblAyVoIYlyGAmzDIWKGMmA+0AyGw2RjIKVbIAQIABAFJRHSSk2rPoAAAAAElFTkSuQmCC":
@@ -2219,13 +2220,13 @@ this.activeArrow=e,this.setDisplay("none"),mxEvent.consume(a))}));mxEvent.redire
 this.resetActiveArrow()}));return e};HoverIcons.prototype.resetActiveArrow=function(){null!=this.activeArrow&&(mxUtils.setOpacity(this.activeArrow,this.inactiveOpacity),this.activeArrow=null)};HoverIcons.prototype.getDirection=function(){var a=mxConstants.DIRECTION_EAST;this.activeArrow==this.arrowUp?a=mxConstants.DIRECTION_NORTH:this.activeArrow==this.arrowDown?a=mxConstants.DIRECTION_SOUTH:this.activeArrow==this.arrowLeft&&(a=mxConstants.DIRECTION_WEST);return a};
 HoverIcons.prototype.visitNodes=function(a){for(var b=0;b<this.elts.length;b++)null!=this.elts[b]&&a(this.elts[b])};HoverIcons.prototype.removeNodes=function(){this.visitNodes(function(a){null!=a.parentNode&&a.parentNode.removeChild(a)})};HoverIcons.prototype.setDisplay=function(a){this.visitNodes(function(b){b.style.display=a})};HoverIcons.prototype.isActive=function(){return null!=this.activeArrow&&null!=this.currentState};
 HoverIcons.prototype.drag=function(a,b,e){this.graph.popupMenuHandler.hideMenu();this.graph.stopEditing(!1);null!=this.currentState&&(this.graph.connectionHandler.start(this.currentState,b,e),this.graph.isMouseTrigger=mxEvent.isMouseEvent(a),this.graph.isMouseDown=!0,a=this.graph.selectionCellsHandler.getHandler(this.currentState.cell),null!=a&&a.setHandlesVisible(!1))};HoverIcons.prototype.getStateAt=function(a,b,e){return this.graph.view.getState(this.graph.getCellAt(b,e))};
-HoverIcons.prototype.click=function(a,b,e){var d=e.getEvent(),g=e.getGraphX(),l=e.getGraphY(),g=this.getStateAt(a,g,l);null==g||!this.graph.model.isEdge(g.cell)||mxEvent.isControlDown(d)||g.getVisibleTerminalState(!0)!=a&&g.getVisibleTerminalState(!1)!=a?null!=a&&(a=this.graph.connectVertex(a.cell,b,this.graph.defaultEdgeLength,d),this.graph.selectCellsForConnectVertex(a,d,this),2==a.length&&this.graph.model.isVertex(a[1])?(this.graph.setSelectionCell(a[1]),mxEvent.isTouchEvent(d)?this.update(this.getState(this.graph.view.getState(a[1]))):
-this.reset(),this.graph.scrollCellToVisible(a[1])):this.graph.setSelectionCells(a)):(this.graph.setSelectionCell(g.cell),this.reset());e.consume()};HoverIcons.prototype.reset=function(a){null!=a&&!a||null==this.updateThread||window.clearTimeout(this.updateThread);this.activeArrow=this.currentState=this.mouseDownPoint=null;this.removeNodes();this.bbox=null};
+HoverIcons.prototype.click=function(a,b,e){var d=e.getEvent(),h=e.getGraphX(),l=e.getGraphY(),h=this.getStateAt(a,h,l);null==h||!this.graph.model.isEdge(h.cell)||mxEvent.isControlDown(d)||h.getVisibleTerminalState(!0)!=a&&h.getVisibleTerminalState(!1)!=a?null!=a&&(a=this.graph.connectVertex(a.cell,b,this.graph.defaultEdgeLength,d),this.graph.selectCellsForConnectVertex(a,d,this),2==a.length&&this.graph.model.isVertex(a[1])?(this.graph.setSelectionCell(a[1]),mxEvent.isTouchEvent(d)?this.update(this.getState(this.graph.view.getState(a[1]))):
+this.reset(),this.graph.scrollCellToVisible(a[1])):this.graph.setSelectionCells(a)):(this.graph.setSelectionCell(h.cell),this.reset());e.consume()};HoverIcons.prototype.reset=function(a){null!=a&&!a||null==this.updateThread||window.clearTimeout(this.updateThread);this.activeArrow=this.currentState=this.mouseDownPoint=null;this.removeNodes();this.bbox=null};
 HoverIcons.prototype.repaint=function(){this.bbox=null;if(null!=this.currentState){this.currentState=this.getState(this.currentState);if(null!=this.currentState&&this.graph.model.isVertex(this.currentState.cell)&&this.graph.isCellConnectable(this.currentState.cell)){var a=mxRectangle.fromRectangle(this.currentState);null!=this.currentState.shape&&null!=this.currentState.shape.boundingBox&&(a=mxRectangle.fromRectangle(this.currentState.shape.boundingBox));a.grow(this.graph.tolerance);a.grow(this.arrowSpacing);
 var b=this.graph.selectionCellsHandler.getHandler(this.currentState.cell);null!=b&&(a.x-=b.horizontalOffset/2,a.y-=b.verticalOffset/2,a.width+=b.horizontalOffset,a.height+=b.verticalOffset,null!=b.rotationShape&&null!=b.rotationShape.node&&"hidden"!=b.rotationShape.node.style.visibility&&"none"!=b.rotationShape.node.style.display&&null!=b.rotationShape.boundingBox&&a.add(b.rotationShape.boundingBox));this.arrowUp.style.left=Math.round(this.currentState.getCenterX()-this.triangleUp.width/2-this.tolerance)+
 "px";this.arrowUp.style.top=Math.round(a.y-this.triangleUp.height-this.tolerance)+"px";mxUtils.setOpacity(this.arrowUp,this.inactiveOpacity);this.arrowRight.style.left=Math.round(a.x+a.width-this.tolerance)+"px";this.arrowRight.style.top=Math.round(this.currentState.getCenterY()-this.triangleRight.height/2-this.tolerance)+"px";mxUtils.setOpacity(this.arrowRight,this.inactiveOpacity);this.arrowDown.style.left=this.arrowUp.style.left;this.arrowDown.style.top=Math.round(a.y+a.height-this.tolerance)+
 "px";mxUtils.setOpacity(this.arrowDown,this.inactiveOpacity);this.arrowLeft.style.left=Math.round(a.x-this.triangleLeft.width-this.tolerance)+"px";this.arrowLeft.style.top=this.arrowRight.style.top;mxUtils.setOpacity(this.arrowLeft,this.inactiveOpacity);if(this.checkCollisions){var b=this.graph.getCellAt(a.x+a.width+this.triangleRight.width/2,this.currentState.getCenterY()),e=this.graph.getCellAt(a.x-this.triangleLeft.width/2,this.currentState.getCenterY()),d=this.graph.getCellAt(this.currentState.getCenterX(),
-a.y-this.triangleUp.height/2),a=this.graph.getCellAt(this.currentState.getCenterX(),a.y+a.height+this.triangleDown.height/2);null!=b&&b==e&&e==d&&d==a&&(a=d=e=b=null);var g=this.graph.getCellGeometry(this.currentState.cell),l=mxUtils.bind(this,function(a,b){var c=this.graph.model.isVertex(a)&&this.graph.getCellGeometry(a);null!=a&&!this.graph.model.isAncestor(a,this.currentState.cell)&&(null==c||null==g||c.height<6*g.height&&c.width<6*g.width)?b.style.visibility="hidden":b.style.visibility="visible"});
+a.y-this.triangleUp.height/2),a=this.graph.getCellAt(this.currentState.getCenterX(),a.y+a.height+this.triangleDown.height/2);null!=b&&b==e&&e==d&&d==a&&(a=d=e=b=null);var h=this.graph.getCellGeometry(this.currentState.cell),l=mxUtils.bind(this,function(a,b){var c=this.graph.model.isVertex(a)&&this.graph.getCellGeometry(a);null!=a&&!this.graph.model.isAncestor(a,this.currentState.cell)&&(null==c||null==h||c.height<6*h.height&&c.width<6*h.width)?b.style.visibility="hidden":b.style.visibility="visible"});
 l(b,this.arrowRight);l(e,this.arrowLeft);l(d,this.arrowUp);l(a,this.arrowDown)}else this.arrowLeft.style.visibility="visible",this.arrowRight.style.visibility="visible",this.arrowUp.style.visibility="visible",this.arrowDown.style.visibility="visible";this.graph.tooltipHandler.isEnabled()?(this.arrowLeft.setAttribute("title",mxResources.get("plusTooltip")),this.arrowRight.setAttribute("title",mxResources.get("plusTooltip")),this.arrowUp.setAttribute("title",mxResources.get("plusTooltip")),this.arrowDown.setAttribute("title",
 mxResources.get("plusTooltip"))):(this.arrowLeft.removeAttribute("title"),this.arrowRight.removeAttribute("title"),this.arrowUp.removeAttribute("title"),this.arrowDown.removeAttribute("title"))}else this.reset();null!=this.currentState&&(this.bbox=this.computeBoundingBox(),null!=this.bbox&&this.bbox.grow(10))}};
 HoverIcons.prototype.computeBoundingBox=function(){var a=this.graph.model.isEdge(this.currentState.cell)?null:mxRectangle.fromRectangle(this.currentState);this.visitNodes(function(b){null!=b.parentNode&&(b=new mxRectangle(b.offsetLeft,b.offsetTop,b.offsetWidth,b.offsetHeight),null==a?a=b:a.add(b))});return a};
@@ -2235,23 +2236,23 @@ this.setDisplay("");null!=this.currentState&&this.currentState!=a&&d<this.activa
 this.reset())}else this.reset()};HoverIcons.prototype.setCurrentState=function(a){"eastwest"!=a.style.portConstraint&&(this.graph.container.appendChild(this.arrowUp),this.graph.container.appendChild(this.arrowDown));this.graph.container.appendChild(this.arrowRight);this.graph.container.appendChild(this.arrowLeft);this.currentState=a};
 (function(){var a=mxGraphView.prototype.resetValidationState;mxGraphView.prototype.resetValidationState=function(){a.apply(this,arguments);this.validEdges=[]};var b=mxGraphView.prototype.validateCellState;mxGraphView.prototype.validateCellState=function(a,f){var c=this.getState(a);null!=c&&this.graph.model.isEdge(c.cell)&&null!=c.style&&1!=c.style[mxConstants.STYLE_CURVED]&&!c.invalid&&this.updateLineJumps(c)&&this.graph.cellRenderer.redraw(c,!1,this.isRendering());c=b.apply(this,arguments);null!=
 c&&this.graph.model.isEdge(c.cell)&&1!=c.style[mxConstants.STYLE_CURVED]&&this.validEdges.push(c);return c};var e=mxCellRenderer.prototype.isShapeInvalid;mxCellRenderer.prototype.isShapeInvalid=function(a,b){return e.apply(this,arguments)||null!=a.routedPoints&&null!=b.routedPoints&&!mxUtils.equalPoints(b.routedPoints,a.routedPoints)};var d=mxGraphView.prototype.updateCellState;mxGraphView.prototype.updateCellState=function(a){d.apply(this,arguments);this.graph.model.isEdge(a.cell)&&1!=a.style[mxConstants.STYLE_CURVED]&&
-this.updateLineJumps(a)};mxGraphView.prototype.updateLineJumps=function(a){var c=a.absolutePoints;if(Graph.lineJumpsEnabled){var b=null!=a.routedPoints,d=null;if(null!=c&&null!=this.validEdges&&"none"!==mxUtils.getValue(a.style,"jumpStyle","none")){for(var e=function(c,b,f){var h=new mxPoint(b,f);h.type=c;d.push(h);h=null!=a.routedPoints?a.routedPoints[d.length-1]:null;return null==h||h.type!=c||h.x!=b||h.y!=f},u=.5*this.scale,b=!1,d=[],r=0;r<c.length-1;r++){for(var k=c[r+1],t=c[r],v=[],g=c[r+2];r<
-c.length-2&&mxUtils.ptSegDistSq(t.x,t.y,g.x,g.y,k.x,k.y)<1*this.scale*this.scale;)k=g,r++,g=c[r+2];for(var b=e(0,t.x,t.y)||b,q=0;q<this.validEdges.length;q++){var l=this.validEdges[q],p=l.absolutePoints;if(null!=p&&mxUtils.intersects(a,l))for(l=0;l<p.length-1;l++){for(var y=p[l+1],C=p[l],g=p[l+2];l<p.length-2&&mxUtils.ptSegDistSq(C.x,C.y,g.x,g.y,y.x,y.y)<1*this.scale*this.scale;)y=g,l++,g=p[l+2];g=mxUtils.intersection(t.x,t.y,k.x,k.y,C.x,C.y,y.x,y.y);if(null!=g&&(Math.abs(g.x-C.x)>u||Math.abs(g.y-
-C.y)>u)&&(Math.abs(g.x-y.x)>u||Math.abs(g.y-y.y)>u)){y=g.x-t.x;C=g.y-t.y;g={distSq:y*y+C*C,x:g.x,y:g.y};for(y=0;y<v.length;y++)if(v[y].distSq>g.distSq){v.splice(y,0,g);g=null;break}null==g||0!=v.length&&v[v.length-1].x===g.x&&v[v.length-1].y===g.y||v.push(g)}}}for(l=0;l<v.length;l++)b=e(1,v[l].x,v[l].y)||b}g=c[c.length-1];b=e(0,g.x,g.y)||b}a.routedPoints=d;return b}return!1};var g=mxConnector.prototype.paintLine;mxConnector.prototype.paintLine=function(a,b,d){this.routedPoints=null!=this.state?this.state.routedPoints:
-null;if(this.outline||null==this.state||null==this.style||null==this.state.routedPoints||0==this.state.routedPoints.length)g.apply(this,arguments);else{var c=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2,f=(parseInt(mxUtils.getValue(this.style,"jumpSize",Graph.defaultJumpSize))-2)/2+this.strokewidth,h=mxUtils.getValue(this.style,"jumpStyle","none"),e,k=!0,t=null,v=null;e=[];var q=null;a.begin();for(var l=0;l<this.state.routedPoints.length;l++){var p=this.state.routedPoints[l],
-B=new mxPoint(p.x/this.scale,p.y/this.scale);0==l?B=b[0]:l==this.state.routedPoints.length-1&&(B=b[b.length-1]);var y=!1;if(null!=t&&1==p.type){var C=this.state.routedPoints[l+1],p=C.x/this.scale-B.x,C=C.y/this.scale-B.y,p=p*p+C*C;null==q&&(q=new mxPoint(B.x-t.x,B.y-t.y),v=Math.sqrt(q.x*q.x+q.y*q.y),q.x=q.x*f/v,q.y=q.y*f/v);p>f*f&&0<v&&(p=t.x-B.x,C=t.y-B.y,p=p*p+C*C,p>f*f&&(y=new mxPoint(B.x-q.x,B.y-q.y),p=new mxPoint(B.x+q.x,B.y+q.y),e.push(y),this.addPoints(a,e,d,c,!1,null,k),e=0>Math.round(q.x)||
-0==Math.round(q.x)&&0>=Math.round(q.y)?1:-1,k=!1,"sharp"==h?(a.lineTo(y.x-q.y*e,y.y+q.x*e),a.lineTo(p.x-q.y*e,p.y+q.x*e),a.lineTo(p.x,p.y)):"arc"==h?(e*=1.3,a.curveTo(y.x-q.y*e,y.y+q.x*e,p.x-q.y*e,p.y+q.x*e,p.x,p.y)):(a.moveTo(p.x,p.y),k=!0),e=[p],y=!0))}else q=null;y||(e.push(B),t=B)}this.addPoints(a,e,d,c,!1,null,k);a.stroke()}};var l=mxGraphView.prototype.updateFloatingTerminalPoint;mxGraphView.prototype.updateFloatingTerminalPoint=function(a,b,d,e){if(null==b||null==a||"1"!=b.style.snapToPoint&&
-"1"!=a.style.snapToPoint)l.apply(this,arguments);else{b=this.getTerminalPort(a,b,e);var c=this.getNextPoint(a,d,e),f=this.graph.isOrthogonal(a),h=mxUtils.toRadians(Number(b.style[mxConstants.STYLE_ROTATION]||"0")),k=new mxPoint(b.getCenterX(),b.getCenterY());if(0!=h)var m=Math.cos(-h),v=Math.sin(-h),c=mxUtils.getRotatedPoint(c,m,v,k);m=parseFloat(a.style[mxConstants.STYLE_PERIMETER_SPACING]||0);m+=parseFloat(a.style[e?mxConstants.STYLE_SOURCE_PERIMETER_SPACING:mxConstants.STYLE_TARGET_PERIMETER_SPACING]||
-0);c=this.getPerimeterPoint(b,c,0==h&&f,m);0!=h&&(m=Math.cos(h),v=Math.sin(h),c=mxUtils.getRotatedPoint(c,m,v,k));a.setAbsoluteTerminalPoint(this.snapToAnchorPoint(a,b,d,e,c),e)}};mxGraphView.prototype.snapToAnchorPoint=function(a,b,d,e,n){if(null!=b&&null!=a){a=this.graph.getAllConnectionConstraints(b);e=d=null;for(var c=0;c<a.length;c++){var f=this.graph.getConnectionPoint(b,a[c]);if(null!=f){var h=(f.x-n.x)*(f.x-n.x)+(f.y-n.y)*(f.y-n.y);if(null==e||h<e)d=f,e=h}}null!=d&&(n=d)}return n};var p=mxStencil.prototype.evaluateTextAttribute;
-mxStencil.prototype.evaluateTextAttribute=function(a,b,d){var c=p.apply(this,arguments);"1"==a.getAttribute("placeholders")&&null!=d.state&&(c=d.state.view.graph.replacePlaceholders(d.state.cell,c));return c};var q=mxCellRenderer.prototype.createShape;mxCellRenderer.prototype.createShape=function(a){if(null!=a.style&&"undefined"!==typeof pako){var c=mxUtils.getValue(a.style,mxConstants.STYLE_SHAPE,null);if(null!=c&&"stencil("==c.substring(0,8))try{var b=c.substring(8,c.length-1),d=mxUtils.parseXml(a.view.graph.decompress(b));
-return new mxShape(new mxStencil(d.documentElement))}catch(n){null!=window.console&&console.log("Error in shape: "+n)}}return q.apply(this,arguments)}})();mxStencilRegistry.libraries={};mxStencilRegistry.dynamicLoading=!0;mxStencilRegistry.packages=[];
-mxStencilRegistry.getStencil=function(a){var b=mxStencilRegistry.stencils[a];if(null==b&&null==mxCellRenderer.prototype.defaultShapes[a]&&mxStencilRegistry.dynamicLoading){var e=mxStencilRegistry.getBasenameForStencil(a);if(null!=e){b=mxStencilRegistry.libraries[e];if(null!=b){if(null==mxStencilRegistry.packages[e]){for(var d=0;d<b.length;d++){var g=b[d];if(".xml"==g.toLowerCase().substring(g.length-4,g.length))mxStencilRegistry.loadStencilSet(g,null);else if(".js"==g.toLowerCase().substring(g.length-
-3,g.length))try{var l=mxUtils.load(g);null!=l&&200<=l.getStatus()&&299>=l.getStatus()&&eval.call(window,l.getText())}catch(p){null!=window.console&&console.log("error in getStencil:",g,p)}}mxStencilRegistry.packages[e]=1}}else e=e.replace("_-_","_"),mxStencilRegistry.loadStencilSet(STENCIL_PATH+"/"+e+".xml",null);b=mxStencilRegistry.stencils[a]}}return b};
+this.updateLineJumps(a)};mxGraphView.prototype.updateLineJumps=function(a){var c=a.absolutePoints;if(Graph.lineJumpsEnabled){var b=null!=a.routedPoints,d=null;if(null!=c&&null!=this.validEdges&&"none"!==mxUtils.getValue(a.style,"jumpStyle","none")){for(var e=function(c,b,f){var g=new mxPoint(b,f);g.type=c;d.push(g);g=null!=a.routedPoints?a.routedPoints[d.length-1]:null;return null==g||g.type!=c||g.x!=b||g.y!=f},u=.5*this.scale,b=!1,d=[],r=0;r<c.length-1;r++){for(var k=c[r+1],v=c[r],t=[],h=c[r+2];r<
+c.length-2&&mxUtils.ptSegDistSq(v.x,v.y,h.x,h.y,k.x,k.y)<1*this.scale*this.scale;)k=h,r++,h=c[r+2];for(var b=e(0,v.x,v.y)||b,q=0;q<this.validEdges.length;q++){var l=this.validEdges[q],n=l.absolutePoints;if(null!=n&&mxUtils.intersects(a,l))for(l=0;l<n.length-1;l++){for(var z=n[l+1],C=n[l],h=n[l+2];l<n.length-2&&mxUtils.ptSegDistSq(C.x,C.y,h.x,h.y,z.x,z.y)<1*this.scale*this.scale;)z=h,l++,h=n[l+2];h=mxUtils.intersection(v.x,v.y,k.x,k.y,C.x,C.y,z.x,z.y);if(null!=h&&(Math.abs(h.x-C.x)>u||Math.abs(h.y-
+C.y)>u)&&(Math.abs(h.x-z.x)>u||Math.abs(h.y-z.y)>u)){z=h.x-v.x;C=h.y-v.y;h={distSq:z*z+C*C,x:h.x,y:h.y};for(z=0;z<t.length;z++)if(t[z].distSq>h.distSq){t.splice(z,0,h);h=null;break}null==h||0!=t.length&&t[t.length-1].x===h.x&&t[t.length-1].y===h.y||t.push(h)}}}for(l=0;l<t.length;l++)b=e(1,t[l].x,t[l].y)||b}h=c[c.length-1];b=e(0,h.x,h.y)||b}a.routedPoints=d;return b}return!1};var h=mxConnector.prototype.paintLine;mxConnector.prototype.paintLine=function(a,b,d){this.routedPoints=null!=this.state?this.state.routedPoints:
+null;if(this.outline||null==this.state||null==this.style||null==this.state.routedPoints||0==this.state.routedPoints.length)h.apply(this,arguments);else{var c=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2,f=(parseInt(mxUtils.getValue(this.style,"jumpSize",Graph.defaultJumpSize))-2)/2+this.strokewidth,g=mxUtils.getValue(this.style,"jumpStyle","none"),e,k=!0,v=null,t=null;e=[];var q=null;a.begin();for(var l=0;l<this.state.routedPoints.length;l++){var n=this.state.routedPoints[l],
+A=new mxPoint(n.x/this.scale,n.y/this.scale);0==l?A=b[0]:l==this.state.routedPoints.length-1&&(A=b[b.length-1]);var z=!1;if(null!=v&&1==n.type){var C=this.state.routedPoints[l+1],n=C.x/this.scale-A.x,C=C.y/this.scale-A.y,n=n*n+C*C;null==q&&(q=new mxPoint(A.x-v.x,A.y-v.y),t=Math.sqrt(q.x*q.x+q.y*q.y),q.x=q.x*f/t,q.y=q.y*f/t);n>f*f&&0<t&&(n=v.x-A.x,C=v.y-A.y,n=n*n+C*C,n>f*f&&(z=new mxPoint(A.x-q.x,A.y-q.y),n=new mxPoint(A.x+q.x,A.y+q.y),e.push(z),this.addPoints(a,e,d,c,!1,null,k),e=0>Math.round(q.x)||
+0==Math.round(q.x)&&0>=Math.round(q.y)?1:-1,k=!1,"sharp"==g?(a.lineTo(z.x-q.y*e,z.y+q.x*e),a.lineTo(n.x-q.y*e,n.y+q.x*e),a.lineTo(n.x,n.y)):"arc"==g?(e*=1.3,a.curveTo(z.x-q.y*e,z.y+q.x*e,n.x-q.y*e,n.y+q.x*e,n.x,n.y)):(a.moveTo(n.x,n.y),k=!0),e=[n],z=!0))}else q=null;z||(e.push(A),v=A)}this.addPoints(a,e,d,c,!1,null,k);a.stroke()}};var l=mxGraphView.prototype.updateFloatingTerminalPoint;mxGraphView.prototype.updateFloatingTerminalPoint=function(a,b,d,e){if(null==b||null==a||"1"!=b.style.snapToPoint&&
+"1"!=a.style.snapToPoint)l.apply(this,arguments);else{b=this.getTerminalPort(a,b,e);var c=this.getNextPoint(a,d,e),f=this.graph.isOrthogonal(a),g=mxUtils.toRadians(Number(b.style[mxConstants.STYLE_ROTATION]||"0")),k=new mxPoint(b.getCenterX(),b.getCenterY());if(0!=g)var p=Math.cos(-g),t=Math.sin(-g),c=mxUtils.getRotatedPoint(c,p,t,k);p=parseFloat(a.style[mxConstants.STYLE_PERIMETER_SPACING]||0);p+=parseFloat(a.style[e?mxConstants.STYLE_SOURCE_PERIMETER_SPACING:mxConstants.STYLE_TARGET_PERIMETER_SPACING]||
+0);c=this.getPerimeterPoint(b,c,0==g&&f,p);0!=g&&(p=Math.cos(g),t=Math.sin(g),c=mxUtils.getRotatedPoint(c,p,t,k));a.setAbsoluteTerminalPoint(this.snapToAnchorPoint(a,b,d,e,c),e)}};mxGraphView.prototype.snapToAnchorPoint=function(a,b,d,e,m){if(null!=b&&null!=a){a=this.graph.getAllConnectionConstraints(b);e=d=null;for(var c=0;c<a.length;c++){var f=this.graph.getConnectionPoint(b,a[c]);if(null!=f){var g=(f.x-m.x)*(f.x-m.x)+(f.y-m.y)*(f.y-m.y);if(null==e||g<e)d=f,e=g}}null!=d&&(m=d)}return m};var n=mxStencil.prototype.evaluateTextAttribute;
+mxStencil.prototype.evaluateTextAttribute=function(a,b,d){var c=n.apply(this,arguments);"1"==a.getAttribute("placeholders")&&null!=d.state&&(c=d.state.view.graph.replacePlaceholders(d.state.cell,c));return c};var q=mxCellRenderer.prototype.createShape;mxCellRenderer.prototype.createShape=function(a){if(null!=a.style&&"undefined"!==typeof pako){var c=mxUtils.getValue(a.style,mxConstants.STYLE_SHAPE,null);if(null!=c&&"stencil("==c.substring(0,8))try{var b=c.substring(8,c.length-1),d=mxUtils.parseXml(a.view.graph.decompress(b));
+return new mxShape(new mxStencil(d.documentElement))}catch(m){null!=window.console&&console.log("Error in shape: "+m)}}return q.apply(this,arguments)}})();mxStencilRegistry.libraries={};mxStencilRegistry.dynamicLoading=!0;mxStencilRegistry.packages=[];
+mxStencilRegistry.getStencil=function(a){var b=mxStencilRegistry.stencils[a];if(null==b&&null==mxCellRenderer.prototype.defaultShapes[a]&&mxStencilRegistry.dynamicLoading){var e=mxStencilRegistry.getBasenameForStencil(a);if(null!=e){b=mxStencilRegistry.libraries[e];if(null!=b){if(null==mxStencilRegistry.packages[e]){for(var d=0;d<b.length;d++){var h=b[d];if(".xml"==h.toLowerCase().substring(h.length-4,h.length))mxStencilRegistry.loadStencilSet(h,null);else if(".js"==h.toLowerCase().substring(h.length-
+3,h.length))try{var l=mxUtils.load(h);null!=l&&200<=l.getStatus()&&299>=l.getStatus()&&eval.call(window,l.getText())}catch(n){null!=window.console&&console.log("error in getStencil:",h,n)}}mxStencilRegistry.packages[e]=1}}else e=e.replace("_-_","_"),mxStencilRegistry.loadStencilSet(STENCIL_PATH+"/"+e+".xml",null);b=mxStencilRegistry.stencils[a]}}return b};
 mxStencilRegistry.getBasenameForStencil=function(a){var b=null;if(null!=a&&(a=a.split("."),0<a.length&&"mxgraph"==a[0]))for(var b=a[1],e=2;e<a.length-1;e++)b+="/"+a[e];return b};
-mxStencilRegistry.loadStencilSet=function(a,b,e,d){var g=mxStencilRegistry.packages[a];if(null!=e&&e||null==g){var l=!1;if(null==g)try{if(d){var p=mxUtils.get(a,mxUtils.bind(this,function(d){200<=d.getStatus()&&299>=d.getStatus()&&(g=d.getXml(),mxStencilRegistry.packages[a]=g,l=!0,null!=g&&null!=g.documentElement&&mxStencilRegistry.parseStencilSet(g.documentElement,b,l))}));return}p=mxUtils.load(a);g=p.getXml();mxStencilRegistry.packages[a]=g;l=!0}catch(q){null!=window.console&&console.log("error in loadStencilSet:",
-a,q)}null!=g&&null!=g.documentElement&&mxStencilRegistry.parseStencilSet(g.documentElement,b,l)}};mxStencilRegistry.parseStencilSets=function(a){for(var b=0;b<a.length;b++)mxStencilRegistry.parseStencilSet(mxUtils.parseXml(a[b]).documentElement)};
-mxStencilRegistry.parseStencilSet=function(a,b,e){if("stencils"==a.nodeName)for(var d=a.firstChild;null!=d;)"shapes"==d.nodeName&&mxStencilRegistry.parseStencilSet(d,b,e),d=d.nextSibling;else{e=null!=e?e:!0;var d=a.firstChild,g="";a=a.getAttribute("name");for(null!=a&&(g=a+".");null!=d;){if(d.nodeType==mxConstants.NODETYPE_ELEMENT&&(a=d.getAttribute("name"),null!=a)){var g=g.toLowerCase(),l=a.replace(/ /g,"_");e&&mxStencilRegistry.addStencil(g+l.toLowerCase(),new mxStencil(d));if(null!=b){var p=d.getAttribute("w"),
-q=d.getAttribute("h"),p=null==p?80:parseInt(p,10),q=null==q?80:parseInt(q,10);b(g,l,a,p,q)}}d=d.nextSibling}}};
+mxStencilRegistry.loadStencilSet=function(a,b,e,d){var h=mxStencilRegistry.packages[a];if(null!=e&&e||null==h){var l=!1;if(null==h)try{if(d){var n=mxUtils.get(a,mxUtils.bind(this,function(d){200<=d.getStatus()&&299>=d.getStatus()&&(h=d.getXml(),mxStencilRegistry.packages[a]=h,l=!0,null!=h&&null!=h.documentElement&&mxStencilRegistry.parseStencilSet(h.documentElement,b,l))}));return}n=mxUtils.load(a);h=n.getXml();mxStencilRegistry.packages[a]=h;l=!0}catch(q){null!=window.console&&console.log("error in loadStencilSet:",
+a,q)}null!=h&&null!=h.documentElement&&mxStencilRegistry.parseStencilSet(h.documentElement,b,l)}};mxStencilRegistry.parseStencilSets=function(a){for(var b=0;b<a.length;b++)mxStencilRegistry.parseStencilSet(mxUtils.parseXml(a[b]).documentElement)};
+mxStencilRegistry.parseStencilSet=function(a,b,e){if("stencils"==a.nodeName)for(var d=a.firstChild;null!=d;)"shapes"==d.nodeName&&mxStencilRegistry.parseStencilSet(d,b,e),d=d.nextSibling;else{e=null!=e?e:!0;var d=a.firstChild,h="";a=a.getAttribute("name");for(null!=a&&(h=a+".");null!=d;){if(d.nodeType==mxConstants.NODETYPE_ELEMENT&&(a=d.getAttribute("name"),null!=a)){var h=h.toLowerCase(),l=a.replace(/ /g,"_");e&&mxStencilRegistry.addStencil(h+l.toLowerCase(),new mxStencil(d));if(null!=b){var n=d.getAttribute("w"),
+q=d.getAttribute("h"),n=null==n?80:parseInt(n,10),q=null==q?80:parseInt(q,10);b(h,l,a,n,q)}}d=d.nextSibling}}};
 "undefined"!=typeof mxVertexHandler&&function(){function a(){var a=document.createElement("div");a.className="geHint";a.style.whiteSpace="nowrap";a.style.position="absolute";return a}mxConstants.HANDLE_FILLCOLOR="#99ccff";mxConstants.HANDLE_STROKECOLOR="#0088cf";mxConstants.VERTEX_SELECTION_COLOR="#00a8ff";mxConstants.OUTLINE_COLOR="#00a8ff";mxConstants.OUTLINE_HANDLE_FILLCOLOR="#99ccff";mxConstants.OUTLINE_HANDLE_STROKECOLOR="#00a8ff";mxConstants.CONNECT_HANDLE_FILLCOLOR="#cee7ff";mxConstants.EDGE_SELECTION_COLOR=
 "#00a8ff";mxConstants.DEFAULT_VALID_COLOR="#00a8ff";mxConstants.LABEL_HANDLE_FILLCOLOR="#cee7ff";mxConstants.GUIDE_COLOR="#0088cf";mxConstants.HIGHLIGHT_OPACITY=30;mxConstants.HIGHLIGHT_SIZE=8;mxEdgeHandler.prototype.snapToTerminals=!0;mxGraphHandler.prototype.guidesEnabled=!0;mxGuide.prototype.isEnabledForEvent=function(a){return!mxEvent.isAltDown(a)};var b=mxConnectionHandler.prototype.isCreateTarget;mxConnectionHandler.prototype.isCreateTarget=function(a){return mxEvent.isControlDown(a)||b.apply(this,
 arguments)};mxConstraintHandler.prototype.createHighlightShape=function(){var a=new mxEllipse(null,this.highlightColor,this.highlightColor,0);a.opacity=mxConstants.HIGHLIGHT_OPACITY;return a};mxConnectionHandler.prototype.livePreview=!0;mxConnectionHandler.prototype.cursor="crosshair";mxConnectionHandler.prototype.createEdgeState=function(a){a=this.graph.createCurrentEdgeStyle();a=this.graph.createEdge(null,null,null,null,null,a);a=new mxCellState(this.graph.view,a,this.graph.getCellStyle(a));for(var c in this.graph.currentEdgeStyle)a.style[c]=
@@ -2259,71 +2260,71 @@ this.graph.currentEdgeStyle[c];return a};var e=mxConnectionHandler.prototype.cre
 c.apply(this,arguments);this.error=null;return b});return a};Graph.prototype.defaultVertexStyle={};Graph.prototype.defaultEdgeStyle={edgeStyle:"orthogonalEdgeStyle",rounded:"0",jettySize:"auto",orthogonalLoop:"1"};Graph.prototype.createCurrentEdgeStyle=function(){var a="edgeStyle="+(this.currentEdgeStyle.edgeStyle||"none")+";";null!=this.currentEdgeStyle.shape&&(a+="shape="+this.currentEdgeStyle.shape+";");null!=this.currentEdgeStyle.curved&&(a+="curved="+this.currentEdgeStyle.curved+";");null!=this.currentEdgeStyle.rounded&&
 (a+="rounded="+this.currentEdgeStyle.rounded+";");null!=this.currentEdgeStyle.comic&&(a+="comic="+this.currentEdgeStyle.comic+";");null!=this.currentEdgeStyle.jumpStyle&&(a+="jumpStyle="+this.currentEdgeStyle.jumpStyle+";");null!=this.currentEdgeStyle.jumpSize&&(a+="jumpSize="+this.currentEdgeStyle.jumpSize+";");"elbowEdgeStyle"==this.currentEdgeStyle.edgeStyle&&null!=this.currentEdgeStyle.elbow&&(a+="elbow="+this.currentEdgeStyle.elbow+";");return a=null!=this.currentEdgeStyle.html?a+("html="+this.currentEdgeStyle.html+
 ";"):a+"html=1;"};Graph.prototype.getPagePadding=function(){return new mxPoint(0,0)};Graph.prototype.loadStylesheet=function(){var a=null!=this.themes?this.themes[this.defaultThemeName]:mxStyleRegistry.dynamicLoading?mxUtils.load(STYLE_PATH+"/default.xml").getDocumentElement():null;null!=a&&(new mxCodec(a.ownerDocument)).decode(a,this.getStylesheet())};Graph.prototype.getAllConnectionConstraints=function(a,c){if(null!=a){var b=mxUtils.getValue(a.style,"points",null);if(null!=b){var f=[];try{for(var d=
-JSON.parse(b),b=0;b<d.length;b++){var e=d[b];f.push(new mxConnectionConstraint(new mxPoint(e[0],e[1]),2<e.length?"0"!=e[2]:!0))}}catch(W){}return f}if(null!=a.shape)if(null!=a.shape.stencil){if(null!=a.shape.stencil)return a.shape.stencil.constraints}else if(null!=a.shape.constraints)return a.shape.constraints}return null};Graph.prototype.flipEdge=function(a){if(null!=a){var c=this.view.getState(a),c=null!=c?c.style:this.getCellStyle(a);null!=c&&(c=mxUtils.getValue(c,mxConstants.STYLE_ELBOW,mxConstants.ELBOW_HORIZONTAL)==
+JSON.parse(b),b=0;b<d.length;b++){var e=d[b];f.push(new mxConnectionConstraint(new mxPoint(e[0],e[1]),2<e.length?"0"!=e[2]:!0))}}catch(Y){}return f}if(null!=a.shape)if(null!=a.shape.stencil){if(null!=a.shape.stencil)return a.shape.stencil.constraints}else if(null!=a.shape.constraints)return a.shape.constraints}return null};Graph.prototype.flipEdge=function(a){if(null!=a){var c=this.view.getState(a),c=null!=c?c.style:this.getCellStyle(a);null!=c&&(c=mxUtils.getValue(c,mxConstants.STYLE_ELBOW,mxConstants.ELBOW_HORIZONTAL)==
 mxConstants.ELBOW_HORIZONTAL?mxConstants.ELBOW_VERTICAL:mxConstants.ELBOW_HORIZONTAL,this.setCellStyles(mxConstants.STYLE_ELBOW,c,[a]))}};Graph.prototype.isValidRoot=function(a){for(var c=this.model.getChildCount(a),b=0,f=0;f<c;f++){var d=this.model.getChildAt(a,f);this.model.isVertex(d)&&(d=this.getCellGeometry(d),null==d||d.relative||b++)}return 0<b||this.isContainer(a)};Graph.prototype.isValidDropTarget=function(a){var c=this.view.getState(a),c=null!=c?c.style:this.getCellStyle(a);return"1"!=mxUtils.getValue(c,
 "part","0")&&(this.isContainer(a)||mxGraph.prototype.isValidDropTarget.apply(this,arguments)&&"0"!=mxUtils.getValue(c,"dropTarget","1"))};Graph.prototype.createGroupCell=function(){var a=mxGraph.prototype.createGroupCell.apply(this,arguments);a.setStyle("group");return a};Graph.prototype.isExtendParentsOnAdd=function(a){var c=mxGraph.prototype.isExtendParentsOnAdd.apply(this,arguments);if(c&&null!=a&&null!=this.layoutManager){var b=this.model.getParent(a);null!=b&&(b=this.layoutManager.getLayout(b),
-null!=b&&b.constructor==mxStackLayout&&(c=!1))}return c};Graph.prototype.getPreferredSizeForCell=function(a){var c=mxGraph.prototype.getPreferredSizeForCell.apply(this,arguments);null!=c&&(c.width+=10,c.height+=4,this.gridEnabled&&(c.width=this.snap(c.width),c.height=this.snap(c.height)));return c};Graph.prototype.turnShapes=function(a){var c=this.getModel(),b=[];c.beginUpdate();try{for(var f=0;f<a.length;f++){var d=a[f];if(c.isEdge(d)){var e=c.getTerminal(d,!0),h=c.getTerminal(d,!1);c.setTerminal(d,
-h,!0);c.setTerminal(d,e,!1);var k=c.getGeometry(d);if(null!=k){k=k.clone();null!=k.points&&k.points.reverse();var m=k.getTerminalPoint(!0),n=k.getTerminalPoint(!1);k.setTerminalPoint(m,!1);k.setTerminalPoint(n,!0);c.setGeometry(d,k);var t=this.view.getState(d),r=this.view.getState(e),v=this.view.getState(h);if(null!=t){var g=null!=r?this.getConnectionConstraint(t,r,!0):null,G=null!=v?this.getConnectionConstraint(t,v,!1):null;this.setConnectionConstraint(d,e,!0,G);this.setConnectionConstraint(d,h,
-!1,g)}b.push(d)}}else if(c.isVertex(d)&&(k=this.getCellGeometry(d),null!=k)){k=k.clone();k.x+=k.width/2-k.height/2;k.y+=k.height/2-k.width/2;var q=k.width;k.width=k.height;k.height=q;c.setGeometry(d,k);var u=this.view.getState(d);if(null!=u){var l=u.style[mxConstants.STYLE_DIRECTION]||"east";"east"==l?l="south":"south"==l?l="west":"west"==l?l="north":"north"==l&&(l="east");this.setCellStyles(mxConstants.STYLE_DIRECTION,l,[d])}b.push(d)}}}finally{c.endUpdate()}return b};Graph.prototype.processChange=
+null!=b&&b.constructor==mxStackLayout&&(c=!1))}return c};Graph.prototype.getPreferredSizeForCell=function(a){var c=mxGraph.prototype.getPreferredSizeForCell.apply(this,arguments);null!=c&&(c.width+=10,c.height+=4,this.gridEnabled&&(c.width=this.snap(c.width),c.height=this.snap(c.height)));return c};Graph.prototype.turnShapes=function(a){var c=this.getModel(),b=[];c.beginUpdate();try{for(var f=0;f<a.length;f++){var d=a[f];if(c.isEdge(d)){var e=c.getTerminal(d,!0),g=c.getTerminal(d,!1);c.setTerminal(d,
+g,!0);c.setTerminal(d,e,!1);var k=c.getGeometry(d);if(null!=k){k=k.clone();null!=k.points&&k.points.reverse();var p=k.getTerminalPoint(!0),m=k.getTerminalPoint(!1);k.setTerminalPoint(p,!1);k.setTerminalPoint(m,!0);c.setGeometry(d,k);var t=this.view.getState(d),r=this.view.getState(e),v=this.view.getState(g);if(null!=t){var h=null!=r?this.getConnectionConstraint(t,r,!0):null,H=null!=v?this.getConnectionConstraint(t,v,!1):null;this.setConnectionConstraint(d,e,!0,H);this.setConnectionConstraint(d,g,
+!1,h)}b.push(d)}}else if(c.isVertex(d)&&(k=this.getCellGeometry(d),null!=k)){k=k.clone();k.x+=k.width/2-k.height/2;k.y+=k.height/2-k.width/2;var q=k.width;k.width=k.height;k.height=q;c.setGeometry(d,k);var u=this.view.getState(d);if(null!=u){var l=u.style[mxConstants.STYLE_DIRECTION]||"east";"east"==l?l="south":"south"==l?l="west":"west"==l?l="north":"north"==l&&(l="east");this.setCellStyles(mxConstants.STYLE_DIRECTION,l,[d])}b.push(d)}}}finally{c.endUpdate()}return b};Graph.prototype.processChange=
 function(a){mxGraph.prototype.processChange.apply(this,arguments);if(a instanceof mxValueChange&&null!=a.cell.value&&"object"==typeof a.cell.value){var c=this.model.getDescendants(a.cell);if(0<c.length)for(var b=0;b<c.length;b++)this.isReplacePlaceholders(c[b])&&this.view.invalidate(c[b],!1,!1)}};Graph.prototype.cellLabelChanged=function(a,c,b){c=this.zapGremlins(c);this.model.beginUpdate();try{if(null!=a.value&&"object"==typeof a.value){if(this.isReplacePlaceholders(a)&&null!=a.getAttribute("placeholder"))for(var f=
-a.getAttribute("placeholder"),d=a;null!=d;){if(d==this.model.getRoot()||null!=d.value&&"object"==typeof d.value&&d.hasAttribute(f)){this.setAttributeForCell(d,f,c);break}d=this.model.getParent(d)}var e=a.value.cloneNode(!0);e.setAttribute("label",c);c=e}mxGraph.prototype.cellLabelChanged.apply(this,arguments)}finally{this.model.endUpdate()}};Graph.prototype.removeCellsAfterUngroup=function(a){for(var c=[],b=0;b<a.length;b++)if(this.isCellDeletable(a[b])){var f=this.view.getState(a[b]);if(null!=f){var d=
-mxUtils.getValue(f.style,mxConstants.STYLE_STROKECOLOR,mxConstants.NONE),f=mxUtils.getValue(f.style,mxConstants.STYLE_FILLCOLOR,mxConstants.NONE);d==mxConstants.NONE&&f==mxConstants.NONE&&c.push(a[b])}}a=c;mxGraph.prototype.removeCellsAfterUngroup.apply(this,arguments)};Graph.prototype.setLinkForCell=function(a,c){this.setAttributeForCell(a,"link",c)};Graph.prototype.setTooltipForCell=function(a,c){this.setAttributeForCell(a,"tooltip",c)};Graph.prototype.setAttributeForCell=function(a,c,b){var f;
-null!=a.value&&"object"==typeof a.value?f=a.value.cloneNode(!0):(f=mxUtils.createXmlDocument().createElement("UserObject"),f.setAttribute("label",a.value||""));null!=b&&0<b.length?f.setAttribute(c,b):f.removeAttribute(c);this.model.setValue(a,f)};Graph.prototype.getDropTarget=function(a,c,b,f){this.getModel();if(mxEvent.isAltDown(c))return null;for(var d=0;d<a.length;d++)if(this.model.isEdge(this.model.getParent(a[d])))return null;return mxGraph.prototype.getDropTarget.apply(this,arguments)};Graph.prototype.click=
-function(a){mxGraph.prototype.click.call(this,a);this.firstClickState=a.getState();this.firstClickSource=a.getSource()};Graph.prototype.dblClick=function(a,c){if(this.isEnabled()){var b=mxUtils.convertPoint(this.container,mxEvent.getClientX(a),mxEvent.getClientY(a));if(null!=a&&!this.model.isVertex(c)){var f=this.model.isEdge(c)?this.view.getState(c):null,d=mxEvent.getSource(a);this.firstClickState!=f||this.firstClickSource!=d||null!=f&&null!=f.text&&null!=f.text.node&&(mxUtils.contains(f.text.boundingBox,
-b.x,b.y)||mxUtils.isAncestorNode(f.text.node,mxEvent.getSource(a)))||(null!=f||this.isCellLocked(this.getDefaultParent()))&&(null==f||this.isCellLocked(f.cell))||!(null!=f||mxClient.IS_VML&&d==this.view.getCanvas()||mxClient.IS_SVG&&d==this.view.getCanvas().ownerSVGElement)||(c=this.addText(b.x,b.y,f))}mxGraph.prototype.dblClick.call(this,a,c)}};Graph.prototype.getInsertPoint=function(){var a=this.getGridSize(),c=this.container.scrollLeft/this.view.scale-this.view.translate.x,b=this.container.scrollTop/
-this.view.scale-this.view.translate.y;if(this.pageVisible)var f=this.getPageLayout(),d=this.getPageSize(),c=Math.max(c,f.x*d.width),b=Math.max(b,f.y*d.height);return new mxPoint(this.snap(c+a),this.snap(b+a))};Graph.prototype.getFreeInsertPoint=function(){var a=this.view,c=this.getGraphBounds(),b=this.getInsertPoint(),f=this.snap(Math.round(Math.max(b.x,c.x/a.scale-a.translate.x+(0==c.width?this.gridSize:0)))),a=this.snap(Math.round(Math.max(b.y,(c.y+c.height)/a.scale-a.translate.y+(0==c.height?1:
-2)*this.gridSize)));return new mxPoint(f,a)};Graph.prototype.isMouseInsertPoint=function(){return!1};Graph.prototype.addText=function(a,c,b){var f=new mxCell;f.value="Text";f.style="text;html=1;resizable=0;points=[];";f.geometry=new mxGeometry(0,0,0,0);f.vertex=!0;if(null!=b){f.style+="align=center;verticalAlign=middle;labelBackgroundColor=#ffffff;";f.geometry.relative=!0;f.connectable=!1;var d=this.view.getRelativePoint(b,a,c);f.geometry.x=Math.round(1E4*d.x)/1E4;f.geometry.y=Math.round(d.y);f.geometry.offset=
-new mxPoint(0,0);var d=this.view.getPoint(b,f.geometry),e=this.view.scale;f.geometry.offset=new mxPoint(Math.round((a-d.x)/e),Math.round((c-d.y)/e))}else f.style+="autosize=1;align=left;verticalAlign=top;spacingTop=-4;",d=this.view.translate,f.geometry.width=40,f.geometry.height=20,f.geometry.x=Math.round(a/this.view.scale)-d.x,f.geometry.y=Math.round(c/this.view.scale)-d.y;this.getModel().beginUpdate();try{this.addCells([f],null!=b?b.cell:null),this.fireEvent(new mxEventObject("textInserted","cells",
-[f])),this.autoSizeCell(f)}finally{this.getModel().endUpdate()}return f};Graph.prototype.getAbsoluteUrl=function(a){null!=a&&this.isRelativeUrl(a)&&(a="#"==a.charAt(0)?this.baseUrl+a:"/"==a.charAt(0)?this.domainUrl+a:this.domainPathUrl+a);return a};Graph.prototype.isExternalProtocol=function(a){return"mailto:"===a.substring(0,7)};Graph.prototype.isBlankLink=function(a){return!this.isExternalProtocol(a)&&("blank"===this.linkPolicy||"self"!==this.linkPolicy&&!this.isRelativeUrl(a)&&a.substring(0,this.domainUrl.length)!==
-this.domainUrl)};Graph.prototype.isRelativeUrl=function(a){return null!=a&&!this.absoluteUrlPattern.test(a)&&"data:"!==a.substring(0,5)&&!this.isExternalProtocol(a)};Graph.prototype.addClickHandler=function(a,c,b){var f=mxUtils.bind(this,function(){var a=this.container.getElementsByTagName("a");if(null!=a)for(var b=0;b<a.length;b++){var f=this.getAbsoluteUrl(a[b].getAttribute("href"));null!=f&&(a[b].setAttribute("href",f),null!=c&&mxEvent.addGestureListeners(a[b],null,null,c))}});this.model.addListener(mxEvent.CHANGE,
-f);f();var d=this.container.style.cursor,e=this.getTolerance(),h=this,k={currentState:null,currentLink:null,highlight:null!=a&&""!=a&&a!=mxConstants.NONE?new mxCellHighlight(h,a,4):null,startX:0,startY:0,scrollLeft:0,scrollTop:0,updateCurrentState:function(a){a=h.view.getState(a.getCell());a!=this.currentState&&(null!=this.currentState&&this.clear(),this.currentState=a,null!=this.currentState&&this.activate(this.currentState))},mouseDown:function(a,c){this.startX=c.getGraphX();this.startY=c.getGraphY();
-this.scrollLeft=h.container.scrollLeft;this.scrollTop=h.container.scrollTop;null==this.currentLink&&"auto"==h.container.style.overflow&&(h.container.style.cursor="move");this.updateCurrentState(c)},mouseMove:function(a,c){if(h.isMouseDown){if(null!=this.currentLink){var b=Math.abs(this.startX-c.getGraphX()),f=Math.abs(this.startY-c.getGraphY());(b>e||f>e)&&this.clear()}}else{for(b=c.getSource();null!=b&&"a"!=b.nodeName.toLowerCase();)b=b.parentNode;null!=b?this.clear():(null==this.currentState||c.getState()!=
-this.currentState&&null!=c.getState()||!h.intersects(this.currentState,c.getGraphX(),c.getGraphY()))&&this.updateCurrentState(c)}},mouseUp:function(a,f){for(var d=f.getSource(),k=f.getEvent();null!=d&&"a"!=d.nodeName.toLowerCase();)d=d.parentNode;null==d&&Math.abs(this.scrollLeft-h.container.scrollLeft)<e&&Math.abs(this.scrollTop-h.container.scrollTop)<e&&(null==f.getState()||!f.isSource(f.getState().control))&&(mxEvent.isLeftMouseButton(k)&&!mxEvent.isPopupTrigger(k)||mxEvent.isTouchEvent(k))&&(null!=
-this.currentLink?(d=h.isBlankLink(this.currentLink),"data:"!==this.currentLink.substring(0,5)&&d||null==c||c(k,this.currentLink),mxEvent.isConsumed(k)||(k=d?h.linkTarget:"_top","_self"==k&&window!=window.top?window.location.href=this.currentLink:this.currentLink.substring(0,h.baseUrl.length)==h.baseUrl&&"#"==this.currentLink.charAt(h.baseUrl.length)&&"_top"==k&&window==window.top?window.location.hash=this.currentLink.split("#")[1]:window.open(this.currentLink,k),f.consume())):null!=b&&!f.isConsumed()&&
-Math.abs(this.scrollLeft-h.container.scrollLeft)<e&&Math.abs(this.scrollTop-h.container.scrollTop)<e&&Math.abs(this.startX-f.getGraphX())<e&&Math.abs(this.startY-f.getGraphY())<e&&b(f.getEvent()));this.clear()},activate:function(a){this.currentLink=h.getAbsoluteUrl(h.getLinkForCell(a.cell));null!=this.currentLink&&(h.container.style.cursor="pointer",null!=this.highlight&&this.highlight.highlight(a))},clear:function(){null!=h.container&&(h.container.style.cursor=d);this.currentLink=this.currentState=
-null;null!=this.highlight&&this.highlight.hide()}};h.click=function(a){};h.addMouseListener(k);mxEvent.addListener(document,"mouseleave",function(a){k.clear()})};Graph.prototype.duplicateCells=function(a,c){a=null!=a?a:this.getSelectionCells();c=null!=c?c:!0;a=this.model.getTopmostCells(a);var b=this.getModel(),f=this.gridSize,d=[];b.beginUpdate();try{for(var h=this.cloneCells(a,!1),e=0;e<a.length;e++){var k=b.getParent(a[e]),m=this.moveCells([h[e]],f,f,!1,k)[0];d.push(m);if(c)b.add(k,h[e]);else{var n=
-k.getIndex(a[e]);b.add(k,h[e],n+1)}}}finally{b.endUpdate()}return d};Graph.prototype.insertImage=function(a,c,b){if(null!=a){for(var f=this.cellEditor.textarea.getElementsByTagName("img"),d=[],e=0;e<f.length;e++)d.push(f[e]);document.execCommand("insertimage",!1,a);a=this.cellEditor.textarea.getElementsByTagName("img");if(a.length==d.length+1)for(e=a.length-1;0<=e;e--)if(0==e||a[e]!=d[e-1]){a[e].setAttribute("width",c);a[e].setAttribute("height",b);break}}};Graph.prototype.insertLink=function(a){0==
-a.length?document.execCommand("unlink",!1):document.execCommand("createlink",!1,mxUtils.trim(a))};Graph.prototype.isCellResizable=function(a){var c=mxGraph.prototype.isCellResizable.apply(this,arguments),b=this.view.getState(a),b=null!=b?b.style:this.getCellStyle(a);return c||"0"!=mxUtils.getValue(b,mxConstants.STYLE_RESIZABLE,"1")&&"wrap"==b[mxConstants.STYLE_WHITE_SPACE]};Graph.prototype.distributeCells=function(a,c){null==c&&(c=this.getSelectionCells());if(null!=c&&1<c.length){for(var b=[],f=null,
-d=null,e=0;e<c.length;e++)if(this.getModel().isVertex(c[e])){var h=this.view.getState(c[e]);if(null!=h){var k=a?h.getCenterX():h.getCenterY(),f=null!=f?Math.max(f,k):k,d=null!=d?Math.min(d,k):k;b.push(h)}}if(2<b.length){b.sort(function(c,b){return a?c.x-b.x:c.y-b.y});h=this.view.translate;k=this.view.scale;d=d/k-(a?h.x:h.y);f=f/k-(a?h.x:h.y);this.getModel().beginUpdate();try{for(var m=(f-d)/(b.length-1),f=d,e=1;e<b.length-1;e++){var n=this.view.getState(this.model.getParent(b[e].cell)),t=this.getCellGeometry(b[e].cell),
-f=f+m;null!=t&&null!=n&&(t=t.clone(),a?t.x=Math.round(f-t.width/2)-n.origin.x:t.y=Math.round(f-t.height/2)-n.origin.y,this.getModel().setGeometry(b[e].cell,t))}}finally{this.getModel().endUpdate()}}}return c};Graph.prototype.isCloneEvent=function(a){return mxClient.IS_MAC&&mxEvent.isMetaDown(a)||mxEvent.isControlDown(a)};Graph.prototype.encodeCells=function(a){for(var c=this.cloneCells(a),b=new mxDictionary,f=0;f<a.length;f++)b.put(a[f],!0);for(f=0;f<c.length;f++){var d=this.view.getState(a[f]);if(null!=
-d){var e=this.getCellGeometry(c[f]);null==e||!e.relative||this.model.isEdge(a[f])||b.get(this.model.getParent(a[f]))||(e.relative=!1,e.x=d.x/d.view.scale-d.view.translate.x,e.y=d.y/d.view.scale-d.view.translate.y)}}b=new mxCodec;d=new mxGraphModel;e=d.getChildAt(d.getRoot(),0);for(f=0;f<a.length;f++)d.add(e,c[f]);return b.encode(d)};Graph.prototype.createSvgImageExport=function(){var a=new mxImageExport;a.getLinkForCellState=mxUtils.bind(this,function(a,c){return this.getLinkForCell(a.cell)});return a};
-Graph.prototype.getSvg=function(a,c,b,f,d,e,h){c=null!=c?c:1;b=null!=b?b:0;d=null!=d?d:!0;e=null!=e?e:!0;h=null!=h?h:!0;var k=e||f?this.getGraphBounds():this.getBoundingBox(this.getSelectionCells());if(null==k)throw Error(mxResources.get("drawingEmpty"));var m=this.view.scale,n=mxUtils.createXmlDocument();f=null!=n.createElementNS?n.createElementNS(mxConstants.NS_SVG,"svg"):n.createElement("svg");null!=a&&(null!=f.style?f.style.backgroundColor=a:f.setAttribute("style","background-color:"+a));null==
-n.createElementNS?(f.setAttribute("xmlns",mxConstants.NS_SVG),f.setAttribute("xmlns:xlink",mxConstants.NS_XLINK)):f.setAttributeNS("http://www.w3.org/2000/xmlns/","xmlns:xlink",mxConstants.NS_XLINK);a=c/m;f.setAttribute("width",Math.max(1,Math.ceil(k.width*a)+2*b)+"px");f.setAttribute("height",Math.max(1,Math.ceil(k.height*a)+2*b)+"px");f.setAttribute("version","1.1");var t=f;d&&(t=null!=n.createElementNS?n.createElementNS(mxConstants.NS_SVG,"g"):n.createElement("g"),t.setAttribute("transform","translate(0.5,0.5)"),
-f.appendChild(t));n.appendChild(f);n=this.createSvgCanvas(t);n.foOffset=d?-.5:0;n.textOffset=d?-.5:0;n.imageOffset=d?-.5:0;n.translate(Math.floor((b/c-k.x)/m),Math.floor((b/c-k.y)/m));var r=n.createAlternateContent;n.createAlternateContent=function(a,c,b,f,d,e,h,k,m,n,t,v,g){var q=this.state;if(null!=this.foAltText&&(0==f||0!=q.fontSize&&e.length<5*f/q.fontSize)){var u=this.createElement("text");u.setAttribute("x",Math.round(f/2));u.setAttribute("y",Math.round((d+q.fontSize)/2));u.setAttribute("fill",
-q.fontColor||"black");u.setAttribute("text-anchor","middle");u.setAttribute("font-size",Math.round(q.fontSize)+"px");u.setAttribute("font-family",q.fontFamily);(q.fontStyle&mxConstants.FONT_BOLD)==mxConstants.FONT_BOLD&&u.setAttribute("font-weight","bold");(q.fontStyle&mxConstants.FONT_ITALIC)==mxConstants.FONT_ITALIC&&u.setAttribute("font-style","italic");(q.fontStyle&mxConstants.FONT_UNDERLINE)==mxConstants.FONT_UNDERLINE&&u.setAttribute("text-decoration","underline");mxUtils.write(u,e);return u}return r.apply(this,
-arguments)};b=this.backgroundImage;null!=b&&(d=m/c,c=this.view.translate,d=new mxRectangle(c.x*d,c.y*d,b.width*d,b.height*d),mxUtils.intersects(k,d)&&n.image(c.x,c.y,b.width,b.height,b.src,!0));n.scale(a);n.textEnabled=h;h=this.createSvgImageExport();var v=h.drawCellState;h.drawCellState=function(a,c){(e||a.view.graph.isCellSelected(a.cell))&&v.apply(this,arguments)};h.drawState(this.getView().getState(this.model.root),n);return f};Graph.prototype.createSvgCanvas=function(a){return new mxSvgCanvas2D(a)};
+a.getAttribute("placeholder"),d=a;null!=d;){if(d==this.model.getRoot()||null!=d.value&&"object"==typeof d.value&&d.hasAttribute(f)){this.setAttributeForCell(d,f,c);break}d=this.model.getParent(d)}var e=a.value.cloneNode(!0);e.setAttribute("label",c);c=e}mxGraph.prototype.cellLabelChanged.apply(this,arguments)}finally{this.model.endUpdate()}};Graph.prototype.removeCellsAfterUngroup=function(a){for(var c=[],b=0;b<a.length;b++)if(this.isCellDeletable(a[b])){var d=this.view.getState(a[b]);if(null!=d){var f=
+mxUtils.getValue(d.style,mxConstants.STYLE_STROKECOLOR,mxConstants.NONE),d=mxUtils.getValue(d.style,mxConstants.STYLE_FILLCOLOR,mxConstants.NONE);f==mxConstants.NONE&&d==mxConstants.NONE&&c.push(a[b])}}a=c;mxGraph.prototype.removeCellsAfterUngroup.apply(this,arguments)};Graph.prototype.setLinkForCell=function(a,c){this.setAttributeForCell(a,"link",c)};Graph.prototype.setTooltipForCell=function(a,c){this.setAttributeForCell(a,"tooltip",c)};Graph.prototype.setAttributeForCell=function(a,c,b){var d;
+null!=a.value&&"object"==typeof a.value?d=a.value.cloneNode(!0):(d=mxUtils.createXmlDocument().createElement("UserObject"),d.setAttribute("label",a.value||""));null!=b&&0<b.length?d.setAttribute(c,b):d.removeAttribute(c);this.model.setValue(a,d)};Graph.prototype.getDropTarget=function(a,c,b,d){this.getModel();if(mxEvent.isAltDown(c))return null;for(var f=0;f<a.length;f++)if(this.model.isEdge(this.model.getParent(a[f])))return null;return mxGraph.prototype.getDropTarget.apply(this,arguments)};Graph.prototype.click=
+function(a){mxGraph.prototype.click.call(this,a);this.firstClickState=a.getState();this.firstClickSource=a.getSource()};Graph.prototype.dblClick=function(a,c){if(this.isEnabled()){var b=mxUtils.convertPoint(this.container,mxEvent.getClientX(a),mxEvent.getClientY(a));if(null!=a&&!this.model.isVertex(c)){var d=this.model.isEdge(c)?this.view.getState(c):null,f=mxEvent.getSource(a);this.firstClickState!=d||this.firstClickSource!=f||null!=d&&null!=d.text&&null!=d.text.node&&(mxUtils.contains(d.text.boundingBox,
+b.x,b.y)||mxUtils.isAncestorNode(d.text.node,mxEvent.getSource(a)))||(null!=d||this.isCellLocked(this.getDefaultParent()))&&(null==d||this.isCellLocked(d.cell))||!(null!=d||mxClient.IS_VML&&f==this.view.getCanvas()||mxClient.IS_SVG&&f==this.view.getCanvas().ownerSVGElement)||(c=this.addText(b.x,b.y,d))}mxGraph.prototype.dblClick.call(this,a,c)}};Graph.prototype.getInsertPoint=function(){var a=this.getGridSize(),c=this.container.scrollLeft/this.view.scale-this.view.translate.x,b=this.container.scrollTop/
+this.view.scale-this.view.translate.y;if(this.pageVisible)var d=this.getPageLayout(),f=this.getPageSize(),c=Math.max(c,d.x*f.width),b=Math.max(b,d.y*f.height);return new mxPoint(this.snap(c+a),this.snap(b+a))};Graph.prototype.getFreeInsertPoint=function(){var a=this.view,c=this.getGraphBounds(),b=this.getInsertPoint(),d=this.snap(Math.round(Math.max(b.x,c.x/a.scale-a.translate.x+(0==c.width?this.gridSize:0)))),a=this.snap(Math.round(Math.max(b.y,(c.y+c.height)/a.scale-a.translate.y+(0==c.height?1:
+2)*this.gridSize)));return new mxPoint(d,a)};Graph.prototype.isMouseInsertPoint=function(){return!1};Graph.prototype.addText=function(a,c,b){var d=new mxCell;d.value="Text";d.style="text;html=1;resizable=0;points=[];";d.geometry=new mxGeometry(0,0,0,0);d.vertex=!0;if(null!=b){d.style+="align=center;verticalAlign=middle;labelBackgroundColor=#ffffff;";d.geometry.relative=!0;d.connectable=!1;var f=this.view.getRelativePoint(b,a,c);d.geometry.x=Math.round(1E4*f.x)/1E4;d.geometry.y=Math.round(f.y);d.geometry.offset=
+new mxPoint(0,0);var f=this.view.getPoint(b,d.geometry),e=this.view.scale;d.geometry.offset=new mxPoint(Math.round((a-f.x)/e),Math.round((c-f.y)/e))}else d.style+="autosize=1;align=left;verticalAlign=top;spacingTop=-4;",f=this.view.translate,d.geometry.width=40,d.geometry.height=20,d.geometry.x=Math.round(a/this.view.scale)-f.x,d.geometry.y=Math.round(c/this.view.scale)-f.y;this.getModel().beginUpdate();try{this.addCells([d],null!=b?b.cell:null),this.fireEvent(new mxEventObject("textInserted","cells",
+[d])),this.autoSizeCell(d)}finally{this.getModel().endUpdate()}return d};Graph.prototype.getAbsoluteUrl=function(a){null!=a&&this.isRelativeUrl(a)&&(a="#"==a.charAt(0)?this.baseUrl+a:"/"==a.charAt(0)?this.domainUrl+a:this.domainPathUrl+a);return a};Graph.prototype.isExternalProtocol=function(a){return"mailto:"===a.substring(0,7)};Graph.prototype.isBlankLink=function(a){return!this.isExternalProtocol(a)&&("blank"===this.linkPolicy||"self"!==this.linkPolicy&&!this.isRelativeUrl(a)&&a.substring(0,this.domainUrl.length)!==
+this.domainUrl)};Graph.prototype.isRelativeUrl=function(a){return null!=a&&!this.absoluteUrlPattern.test(a)&&"data:"!==a.substring(0,5)&&!this.isExternalProtocol(a)};Graph.prototype.addClickHandler=function(a,c,b){var d=mxUtils.bind(this,function(){var a=this.container.getElementsByTagName("a");if(null!=a)for(var b=0;b<a.length;b++){var d=this.getAbsoluteUrl(a[b].getAttribute("href"));null!=d&&(a[b].setAttribute("href",d),null!=c&&mxEvent.addGestureListeners(a[b],null,null,c))}});this.model.addListener(mxEvent.CHANGE,
+d);d();var f=this.container.style.cursor,e=this.getTolerance(),g=this,k={currentState:null,currentLink:null,highlight:null!=a&&""!=a&&a!=mxConstants.NONE?new mxCellHighlight(g,a,4):null,startX:0,startY:0,scrollLeft:0,scrollTop:0,updateCurrentState:function(a){a=g.view.getState(a.getCell());a!=this.currentState&&(null!=this.currentState&&this.clear(),this.currentState=a,null!=this.currentState&&this.activate(this.currentState))},mouseDown:function(a,c){this.startX=c.getGraphX();this.startY=c.getGraphY();
+this.scrollLeft=g.container.scrollLeft;this.scrollTop=g.container.scrollTop;null==this.currentLink&&"auto"==g.container.style.overflow&&(g.container.style.cursor="move");this.updateCurrentState(c)},mouseMove:function(a,c){if(g.isMouseDown){if(null!=this.currentLink){var b=Math.abs(this.startX-c.getGraphX()),d=Math.abs(this.startY-c.getGraphY());(b>e||d>e)&&this.clear()}}else{for(b=c.getSource();null!=b&&"a"!=b.nodeName.toLowerCase();)b=b.parentNode;null!=b?this.clear():(null==this.currentState||c.getState()!=
+this.currentState&&null!=c.getState()||!g.intersects(this.currentState,c.getGraphX(),c.getGraphY()))&&this.updateCurrentState(c)}},mouseUp:function(a,d){for(var f=d.getSource(),k=d.getEvent();null!=f&&"a"!=f.nodeName.toLowerCase();)f=f.parentNode;null==f&&Math.abs(this.scrollLeft-g.container.scrollLeft)<e&&Math.abs(this.scrollTop-g.container.scrollTop)<e&&(null==d.getState()||!d.isSource(d.getState().control))&&(mxEvent.isLeftMouseButton(k)&&!mxEvent.isPopupTrigger(k)||mxEvent.isTouchEvent(k))&&(null!=
+this.currentLink?(f=g.isBlankLink(this.currentLink),"data:"!==this.currentLink.substring(0,5)&&f||null==c||c(k,this.currentLink),mxEvent.isConsumed(k)||(k=f?g.linkTarget:"_top","_self"==k&&window!=window.top?window.location.href=this.currentLink:this.currentLink.substring(0,g.baseUrl.length)==g.baseUrl&&"#"==this.currentLink.charAt(g.baseUrl.length)&&"_top"==k&&window==window.top?window.location.hash=this.currentLink.split("#")[1]:window.open(this.currentLink,k),d.consume())):null!=b&&!d.isConsumed()&&
+Math.abs(this.scrollLeft-g.container.scrollLeft)<e&&Math.abs(this.scrollTop-g.container.scrollTop)<e&&Math.abs(this.startX-d.getGraphX())<e&&Math.abs(this.startY-d.getGraphY())<e&&b(d.getEvent()));this.clear()},activate:function(a){this.currentLink=g.getAbsoluteUrl(g.getLinkForCell(a.cell));null!=this.currentLink&&(g.container.style.cursor="pointer",null!=this.highlight&&this.highlight.highlight(a))},clear:function(){null!=g.container&&(g.container.style.cursor=f);this.currentLink=this.currentState=
+null;null!=this.highlight&&this.highlight.hide()}};g.click=function(a){};g.addMouseListener(k);mxEvent.addListener(document,"mouseleave",function(a){k.clear()})};Graph.prototype.duplicateCells=function(a,c){a=null!=a?a:this.getSelectionCells();c=null!=c?c:!0;a=this.model.getTopmostCells(a);var b=this.getModel(),d=this.gridSize,f=[];b.beginUpdate();try{for(var e=this.cloneCells(a,!1),g=0;g<a.length;g++){var k=b.getParent(a[g]),p=this.moveCells([e[g]],d,d,!1,k)[0];f.push(p);if(c)b.add(k,e[g]);else{var m=
+k.getIndex(a[g]);b.add(k,e[g],m+1)}}}finally{b.endUpdate()}return f};Graph.prototype.insertImage=function(a,c,b){if(null!=a){for(var d=this.cellEditor.textarea.getElementsByTagName("img"),f=[],g=0;g<d.length;g++)f.push(d[g]);document.execCommand("insertimage",!1,a);a=this.cellEditor.textarea.getElementsByTagName("img");if(a.length==f.length+1)for(g=a.length-1;0<=g;g--)if(0==g||a[g]!=f[g-1]){a[g].setAttribute("width",c);a[g].setAttribute("height",b);break}}};Graph.prototype.insertLink=function(a){0==
+a.length?document.execCommand("unlink",!1):document.execCommand("createlink",!1,mxUtils.trim(a))};Graph.prototype.isCellResizable=function(a){var c=mxGraph.prototype.isCellResizable.apply(this,arguments),b=this.view.getState(a),b=null!=b?b.style:this.getCellStyle(a);return c||"0"!=mxUtils.getValue(b,mxConstants.STYLE_RESIZABLE,"1")&&"wrap"==b[mxConstants.STYLE_WHITE_SPACE]};Graph.prototype.distributeCells=function(a,c){null==c&&(c=this.getSelectionCells());if(null!=c&&1<c.length){for(var b=[],d=null,
+f=null,g=0;g<c.length;g++)if(this.getModel().isVertex(c[g])){var e=this.view.getState(c[g]);if(null!=e){var k=a?e.getCenterX():e.getCenterY(),d=null!=d?Math.max(d,k):k,f=null!=f?Math.min(f,k):k;b.push(e)}}if(2<b.length){b.sort(function(c,b){return a?c.x-b.x:c.y-b.y});e=this.view.translate;k=this.view.scale;f=f/k-(a?e.x:e.y);d=d/k-(a?e.x:e.y);this.getModel().beginUpdate();try{for(var p=(d-f)/(b.length-1),d=f,g=1;g<b.length-1;g++){var m=this.view.getState(this.model.getParent(b[g].cell)),t=this.getCellGeometry(b[g].cell),
+d=d+p;null!=t&&null!=m&&(t=t.clone(),a?t.x=Math.round(d-t.width/2)-m.origin.x:t.y=Math.round(d-t.height/2)-m.origin.y,this.getModel().setGeometry(b[g].cell,t))}}finally{this.getModel().endUpdate()}}}return c};Graph.prototype.isCloneEvent=function(a){return mxClient.IS_MAC&&mxEvent.isMetaDown(a)||mxEvent.isControlDown(a)};Graph.prototype.encodeCells=function(a){for(var c=this.cloneCells(a),b=new mxDictionary,d=0;d<a.length;d++)b.put(a[d],!0);for(d=0;d<c.length;d++){var f=this.view.getState(a[d]);if(null!=
+f){var g=this.getCellGeometry(c[d]);null==g||!g.relative||this.model.isEdge(a[d])||b.get(this.model.getParent(a[d]))||(g.relative=!1,g.x=f.x/f.view.scale-f.view.translate.x,g.y=f.y/f.view.scale-f.view.translate.y)}}b=new mxCodec;f=new mxGraphModel;g=f.getChildAt(f.getRoot(),0);for(d=0;d<a.length;d++)f.add(g,c[d]);return b.encode(f)};Graph.prototype.createSvgImageExport=function(){var a=new mxImageExport;a.getLinkForCellState=mxUtils.bind(this,function(a,c){return this.getLinkForCell(a.cell)});return a};
+Graph.prototype.getSvg=function(a,c,b,d,f,g,e){c=null!=c?c:1;b=null!=b?b:0;f=null!=f?f:!0;g=null!=g?g:!0;e=null!=e?e:!0;var k=g||d?this.getGraphBounds():this.getBoundingBox(this.getSelectionCells());if(null==k)throw Error(mxResources.get("drawingEmpty"));var p=this.view.scale,m=mxUtils.createXmlDocument();d=null!=m.createElementNS?m.createElementNS(mxConstants.NS_SVG,"svg"):m.createElement("svg");null!=a&&(null!=d.style?d.style.backgroundColor=a:d.setAttribute("style","background-color:"+a));null==
+m.createElementNS?(d.setAttribute("xmlns",mxConstants.NS_SVG),d.setAttribute("xmlns:xlink",mxConstants.NS_XLINK)):d.setAttributeNS("http://www.w3.org/2000/xmlns/","xmlns:xlink",mxConstants.NS_XLINK);a=c/p;d.setAttribute("width",Math.max(1,Math.ceil(k.width*a)+2*b)+"px");d.setAttribute("height",Math.max(1,Math.ceil(k.height*a)+2*b)+"px");d.setAttribute("version","1.1");var t=d;f&&(t=null!=m.createElementNS?m.createElementNS(mxConstants.NS_SVG,"g"):m.createElement("g"),t.setAttribute("transform","translate(0.5,0.5)"),
+d.appendChild(t));m.appendChild(d);m=this.createSvgCanvas(t);m.foOffset=f?-.5:0;m.textOffset=f?-.5:0;m.imageOffset=f?-.5:0;m.translate(Math.floor((b/c-k.x)/p),Math.floor((b/c-k.y)/p));var r=m.createAlternateContent;m.createAlternateContent=function(a,c,b,d,f,g,e,k,p,m,t,v,h){var q=this.state;if(null!=this.foAltText&&(0==d||0!=q.fontSize&&g.length<5*d/q.fontSize)){var u=this.createElement("text");u.setAttribute("x",Math.round(d/2));u.setAttribute("y",Math.round((f+q.fontSize)/2));u.setAttribute("fill",
+q.fontColor||"black");u.setAttribute("text-anchor","middle");u.setAttribute("font-size",Math.round(q.fontSize)+"px");u.setAttribute("font-family",q.fontFamily);(q.fontStyle&mxConstants.FONT_BOLD)==mxConstants.FONT_BOLD&&u.setAttribute("font-weight","bold");(q.fontStyle&mxConstants.FONT_ITALIC)==mxConstants.FONT_ITALIC&&u.setAttribute("font-style","italic");(q.fontStyle&mxConstants.FONT_UNDERLINE)==mxConstants.FONT_UNDERLINE&&u.setAttribute("text-decoration","underline");mxUtils.write(u,g);return u}return r.apply(this,
+arguments)};b=this.backgroundImage;null!=b&&(f=p/c,c=this.view.translate,f=new mxRectangle(c.x*f,c.y*f,b.width*f,b.height*f),mxUtils.intersects(k,f)&&m.image(c.x,c.y,b.width,b.height,b.src,!0));m.scale(a);m.textEnabled=e;e=this.createSvgImageExport();var v=e.drawCellState;e.drawCellState=function(a,c){(g||a.view.graph.isCellSelected(a.cell))&&v.apply(this,arguments)};e.drawState(this.getView().getState(this.model.root),m);return d};Graph.prototype.createSvgCanvas=function(a){return new mxSvgCanvas2D(a)};
 Graph.prototype.getSelectedElement=function(){var a=null;if(window.getSelection){var c=window.getSelection();c.getRangeAt&&c.rangeCount&&(a=c.getRangeAt(0).commonAncestorContainer)}else document.selection&&(a=document.selection.createRange().parentElement());return a};Graph.prototype.getParentByName=function(a,c,b){for(;null!=a&&a.nodeName!=c;){if(a==b)return null;a=a.parentNode}return a};Graph.prototype.selectNode=function(a){var c=null;if(window.getSelection){if(c=window.getSelection(),c.getRangeAt&&
-c.rangeCount){var b=document.createRange();b.selectNode(a);c.removeAllRanges();c.addRange(b)}}else(c=document.selection)&&"Control"!=c.type&&(a=c.createRange(),a.collapse(!0),b=c.createRange(),b.setEndPoint("StartToStart",a),b.select())};Graph.prototype.insertRow=function(a,c){for(var b=a.tBodies[0],f=0<b.rows.length?b.rows[0].cells.length:1,b=b.insertRow(c),d=0;d<f;d++)mxUtils.br(b.insertCell(-1));return b.cells[0]};Graph.prototype.deleteRow=function(a,c){a.tBodies[0].deleteRow(c)};Graph.prototype.insertColumn=
-function(a,c){var b=a.tHead;if(null!=b)for(var f=0;f<b.rows.length;f++){var d=document.createElement("th");b.rows[f].appendChild(d);mxUtils.br(d)}b=a.tBodies[0];for(f=0;f<b.rows.length;f++)d=b.rows[f].insertCell(c),mxUtils.br(d);return b.rows[0].cells[0<=c?c:b.rows[0].cells.length-1]};Graph.prototype.deleteColumn=function(a,c){if(0<=c)for(var b=a.tBodies[0].rows,f=0;f<b.length;f++)b[f].cells.length>c&&b[f].deleteCell(c)};Graph.prototype.pasteHtmlAtCaret=function(a){var c;if(window.getSelection){if(c=
-window.getSelection(),c.getRangeAt&&c.rangeCount){c=c.getRangeAt(0);c.deleteContents();var b=document.createElement("div");b.innerHTML=a;a=document.createDocumentFragment();for(var f;f=b.firstChild;)lastNode=a.appendChild(f);c.insertNode(a)}}else(c=document.selection)&&"Control"!=c.type&&c.createRange().pasteHTML(a)};Graph.prototype.createLinkForHint=function(a,c){c=null!=c?c:a;var b=document.createElement("a");b.setAttribute("href",this.getAbsoluteUrl(a));b.setAttribute("title",a);null!=this.linkTarget&&
+c.rangeCount){var b=document.createRange();b.selectNode(a);c.removeAllRanges();c.addRange(b)}}else(c=document.selection)&&"Control"!=c.type&&(a=c.createRange(),a.collapse(!0),b=c.createRange(),b.setEndPoint("StartToStart",a),b.select())};Graph.prototype.insertRow=function(a,c){for(var b=a.tBodies[0],d=0<b.rows.length?b.rows[0].cells.length:1,b=b.insertRow(c),f=0;f<d;f++)mxUtils.br(b.insertCell(-1));return b.cells[0]};Graph.prototype.deleteRow=function(a,c){a.tBodies[0].deleteRow(c)};Graph.prototype.insertColumn=
+function(a,c){var b=a.tHead;if(null!=b)for(var d=0;d<b.rows.length;d++){var f=document.createElement("th");b.rows[d].appendChild(f);mxUtils.br(f)}b=a.tBodies[0];for(d=0;d<b.rows.length;d++)f=b.rows[d].insertCell(c),mxUtils.br(f);return b.rows[0].cells[0<=c?c:b.rows[0].cells.length-1]};Graph.prototype.deleteColumn=function(a,c){if(0<=c)for(var b=a.tBodies[0].rows,d=0;d<b.length;d++)b[d].cells.length>c&&b[d].deleteCell(c)};Graph.prototype.pasteHtmlAtCaret=function(a){var c;if(window.getSelection){if(c=
+window.getSelection(),c.getRangeAt&&c.rangeCount){c=c.getRangeAt(0);c.deleteContents();var b=document.createElement("div");b.innerHTML=a;a=document.createDocumentFragment();for(var d;d=b.firstChild;)lastNode=a.appendChild(d);c.insertNode(a)}}else(c=document.selection)&&"Control"!=c.type&&c.createRange().pasteHTML(a)};Graph.prototype.createLinkForHint=function(a,c){c=null!=c?c:a;var b=document.createElement("a");b.setAttribute("href",this.getAbsoluteUrl(a));b.setAttribute("title",a);null!=this.linkTarget&&
 b.setAttribute("target",this.linkTarget);60<c.length&&(c=c.substring(0,36)+"..."+c.substring(c.length-20));mxUtils.write(b,c);return b};Graph.prototype.initTouch=function(){this.connectionHandler.marker.isEnabled=function(){return null!=this.graph.connectionHandler.first};this.addListener(mxEvent.START_EDITING,function(a,c){this.popupMenuHandler.hideMenu()});var a=this.updateMouseEvent;this.updateMouseEvent=function(c){c=a.apply(this,arguments);if(mxEvent.isTouchEvent(c.getEvent())&&null==c.getState()){var b=
-this.getCellAt(c.graphX,c.graphY);null!=b&&this.isSwimlane(b)&&this.hitsSwimlaneContent(b,c.graphX,c.graphY)||(c.state=this.view.getState(b),null!=c.state&&null!=c.state.shape&&(this.container.style.cursor=c.state.shape.node.style.cursor))}null==c.getState()&&this.isEnabled()&&(this.container.style.cursor="default");return c};var c=!1,b=!1,f=!1,d=this.fireMouseEvent;this.fireMouseEvent=function(a,e,h){a==mxEvent.MOUSE_DOWN&&(e=this.updateMouseEvent(e),c=this.isCellSelected(e.getCell()),b=this.isSelectionEmpty(),
-f=this.popupMenuHandler.isMenuShowing());d.apply(this,arguments)};this.popupMenuHandler.mouseUp=mxUtils.bind(this,function(a,d){this.popupMenuHandler.popupTrigger=!this.isEditing()&&this.isEnabled()&&(null==d.getState()||!d.isSource(d.getState().control))&&(this.popupMenuHandler.popupTrigger||!f&&!mxEvent.isMouseEvent(d.getEvent())&&(b&&null==d.getCell()&&this.isSelectionEmpty()||c&&this.isCellSelected(d.getCell())));mxPopupMenuHandler.prototype.mouseUp.apply(this.popupMenuHandler,arguments)})};mxCellEditor.prototype.isContentEditing=
+this.getCellAt(c.graphX,c.graphY);null!=b&&this.isSwimlane(b)&&this.hitsSwimlaneContent(b,c.graphX,c.graphY)||(c.state=this.view.getState(b),null!=c.state&&null!=c.state.shape&&(this.container.style.cursor=c.state.shape.node.style.cursor))}null==c.getState()&&this.isEnabled()&&(this.container.style.cursor="default");return c};var c=!1,b=!1,d=!1,f=this.fireMouseEvent;this.fireMouseEvent=function(a,g,e){a==mxEvent.MOUSE_DOWN&&(g=this.updateMouseEvent(g),c=this.isCellSelected(g.getCell()),b=this.isSelectionEmpty(),
+d=this.popupMenuHandler.isMenuShowing());f.apply(this,arguments)};this.popupMenuHandler.mouseUp=mxUtils.bind(this,function(a,f){this.popupMenuHandler.popupTrigger=!this.isEditing()&&this.isEnabled()&&(null==f.getState()||!f.isSource(f.getState().control))&&(this.popupMenuHandler.popupTrigger||!d&&!mxEvent.isMouseEvent(f.getEvent())&&(b&&null==f.getCell()&&this.isSelectionEmpty()||c&&this.isCellSelected(f.getCell())));mxPopupMenuHandler.prototype.mouseUp.apply(this.popupMenuHandler,arguments)})};mxCellEditor.prototype.isContentEditing=
 function(){var a=this.graph.view.getState(this.editingCell);return null!=a&&1==a.style.html};mxCellEditor.prototype.saveSelection=function(){if(window.getSelection){if(sel=window.getSelection(),sel.getRangeAt&&sel.rangeCount){for(var a=[],c=0,b=sel.rangeCount;c<b;++c)a.push(sel.getRangeAt(c));return a}}else if(document.selection&&document.selection.createRange)return document.selection.createRange();return null};mxCellEditor.prototype.restoreSelection=function(a){try{if(a)if(window.getSelection){sel=
-window.getSelection();sel.removeAllRanges();for(var c=0,b=a.length;c<b;++c)sel.addRange(a[c])}else document.selection&&a.select&&a.select()}catch(E){}};var g=mxCellRenderer.prototype.initializeLabel;mxCellRenderer.prototype.initializeLabel=function(a){null!=a.text&&(a.text.replaceLinefeeds="0"!=mxUtils.getValue(a.style,"nl2Br","1"));g.apply(this,arguments)};var l=mxConstraintHandler.prototype.update;mxConstraintHandler.prototype.update=function(a,c){this.isKeepFocusEvent(a)||!mxEvent.isAltDown(a.getEvent())?
-l.apply(this,arguments):this.reset()};mxGuide.prototype.createGuideShape=function(a){return new mxPolyline([],mxConstants.GUIDE_COLOR,mxConstants.GUIDE_STROKEWIDTH)};mxCellEditor.prototype.escapeCancelsEditing=!1;var p=mxCellEditor.prototype.startEditing;mxCellEditor.prototype.startEditing=function(a,c){p.apply(this,arguments);var b=this.graph.view.getState(a);this.textarea.className=null!=b&&1==b.style.html?"mxCellEditor geContentEditable":"mxCellEditor mxPlainTextEditor";this.codeViewMode=!1;this.switchSelectionState=
-null;this.graph.setSelectionCell(a);var b=this.graph.getModel().getParent(a),f=this.graph.getCellGeometry(a);this.graph.getModel().isEdge(b)&&null!=f&&f.relative||this.graph.getModel().isEdge(a)?mxClient.IS_QUIRKS?this.textarea.style.border="gray dotted 1px":this.textarea.style.outline=mxClient.IS_IE||mxClient.IS_IE11||mxClient.IS_FF&&mxClient.IS_WIN?"gray dotted 1px":"":mxClient.IS_QUIRKS&&(this.textarea.style.outline="none",this.textarea.style.border="")};var q=mxCellEditor.prototype.installListeners;
-mxCellEditor.prototype.installListeners=function(a){function c(a,b){b.originalNode=a;a=a.firstChild;for(var f=b.firstChild;null!=a&&null!=f;)c(a,f),a=a.nextSibling,f=f.nextSibling;return b}function b(a,c){if(null!=a)if(c.originalNode!=a)f(a);else for(a=a.firstChild,c=c.firstChild;null!=a;){var d=a.nextSibling;null==c?f(a):(b(a,c),c=c.nextSibling);a=d}}function f(a){for(var c=a.firstChild;null!=c;){var b=c.nextSibling;f(c);c=b}1==a.nodeType&&("BR"===a.nodeName||null!=a.firstChild)||3==a.nodeType&&
+window.getSelection();sel.removeAllRanges();for(var c=0,b=a.length;c<b;++c)sel.addRange(a[c])}else document.selection&&a.select&&a.select()}catch(G){}};var h=mxCellRenderer.prototype.initializeLabel;mxCellRenderer.prototype.initializeLabel=function(a){null!=a.text&&(a.text.replaceLinefeeds="0"!=mxUtils.getValue(a.style,"nl2Br","1"));h.apply(this,arguments)};var l=mxConstraintHandler.prototype.update;mxConstraintHandler.prototype.update=function(a,c){this.isKeepFocusEvent(a)||!mxEvent.isAltDown(a.getEvent())?
+l.apply(this,arguments):this.reset()};mxGuide.prototype.createGuideShape=function(a){return new mxPolyline([],mxConstants.GUIDE_COLOR,mxConstants.GUIDE_STROKEWIDTH)};mxCellEditor.prototype.escapeCancelsEditing=!1;var n=mxCellEditor.prototype.startEditing;mxCellEditor.prototype.startEditing=function(a,c){n.apply(this,arguments);var b=this.graph.view.getState(a);this.textarea.className=null!=b&&1==b.style.html?"mxCellEditor geContentEditable":"mxCellEditor mxPlainTextEditor";this.codeViewMode=!1;this.switchSelectionState=
+null;this.graph.setSelectionCell(a);var b=this.graph.getModel().getParent(a),d=this.graph.getCellGeometry(a);this.graph.getModel().isEdge(b)&&null!=d&&d.relative||this.graph.getModel().isEdge(a)?mxClient.IS_QUIRKS?this.textarea.style.border="gray dotted 1px":this.textarea.style.outline=mxClient.IS_IE||mxClient.IS_IE11||mxClient.IS_FF&&mxClient.IS_WIN?"gray dotted 1px":"":mxClient.IS_QUIRKS&&(this.textarea.style.outline="none",this.textarea.style.border="")};var q=mxCellEditor.prototype.installListeners;
+mxCellEditor.prototype.installListeners=function(a){function c(a,b){b.originalNode=a;a=a.firstChild;for(var d=b.firstChild;null!=a&&null!=d;)c(a,d),a=a.nextSibling,d=d.nextSibling;return b}function b(a,c){if(null!=a)if(c.originalNode!=a)d(a);else for(a=a.firstChild,c=c.firstChild;null!=a;){var f=a.nextSibling;null==c?d(a):(b(a,c),c=c.nextSibling);a=f}}function d(a){for(var c=a.firstChild;null!=c;){var b=c.nextSibling;d(c);c=b}1==a.nodeType&&("BR"===a.nodeName||null!=a.firstChild)||3==a.nodeType&&
 0!=mxUtils.trim(mxUtils.getTextContent(a)).length?(3==a.nodeType&&mxUtils.setTextContent(a,mxUtils.getTextContent(a).replace(/\n|\r/g,"")),1==a.nodeType&&(a.removeAttribute("style"),a.removeAttribute("class"),a.removeAttribute("width"),a.removeAttribute("cellpadding"),a.removeAttribute("cellspacing"),a.removeAttribute("border"))):a.parentNode.removeChild(a)}q.apply(this,arguments);mxClient.IS_QUIRKS||7===document.documentMode||8===document.documentMode||mxEvent.addListener(this.textarea,"paste",mxUtils.bind(this,
-function(a){var f=c(this.textarea,this.textarea.cloneNode(!0));window.setTimeout(mxUtils.bind(this,function(){b(this.textarea,f)}),0)}))};mxCellEditor.prototype.toggleViewMode=function(){var a=this.graph.view.getState(this.editingCell),c=null!=a&&"0"!=mxUtils.getValue(a.style,"nl2Br","1"),b=this.saveSelection();if(this.codeViewMode){k=mxUtils.extractTextWithWhitespace(this.textarea.childNodes);0<k.length&&"\n"==k.charAt(k.length-1)&&(k=k.substring(0,k.length-1));k=this.graph.sanitizeHtml(c?k.replace(/\n/g,
-"<br/>"):k,!0);this.textarea.className="mxCellEditor geContentEditable";var f=mxUtils.getValue(a.style,mxConstants.STYLE_FONTSIZE,mxConstants.DEFAULT_FONTSIZE),c=mxUtils.getValue(a.style,mxConstants.STYLE_FONTFAMILY,mxConstants.DEFAULT_FONTFAMILY),d=mxUtils.getValue(a.style,mxConstants.STYLE_ALIGN,mxConstants.ALIGN_LEFT),e=(mxUtils.getValue(a.style,mxConstants.STYLE_FONTSTYLE,0)&mxConstants.FONT_BOLD)==mxConstants.FONT_BOLD,h=(mxUtils.getValue(a.style,mxConstants.STYLE_FONTSTYLE,0)&mxConstants.FONT_ITALIC)==
-mxConstants.FONT_ITALIC,a=(mxUtils.getValue(a.style,mxConstants.STYLE_FONTSTYLE,0)&mxConstants.FONT_UNDERLINE)==mxConstants.FONT_UNDERLINE;this.textarea.style.lineHeight=mxConstants.ABSOLUTE_LINE_HEIGHT?Math.round(f*mxConstants.LINE_HEIGHT)+"px":mxConstants.LINE_HEIGHT;this.textarea.style.fontSize=Math.round(f)+"px";this.textarea.style.textDecoration=a?"underline":"";this.textarea.style.fontWeight=e?"bold":"normal";this.textarea.style.fontStyle=h?"italic":"";this.textarea.style.fontFamily=c;this.textarea.style.textAlign=
-d;this.textarea.style.padding="0px";this.textarea.innerHTML!=k&&(this.textarea.innerHTML=k,0==this.textarea.innerHTML.length&&(this.textarea.innerHTML=this.getEmptyLabelText(),this.clearOnChange=0<this.textarea.innerHTML.length));this.codeViewMode=!1}else{this.clearOnChange&&this.textarea.innerHTML==this.getEmptyLabelText()&&(this.clearOnChange=!1,this.textarea.innerHTML="");var k=mxUtils.htmlEntities(this.textarea.innerHTML);mxClient.IS_QUIRKS||8==document.documentMode||(k=mxUtils.replaceTrailingNewlines(k,
-"<div><br></div>"));k=this.graph.sanitizeHtml(c?k.replace(/\n/g,"").replace(/&lt;br\s*.?&gt;/g,"<br>"):k,!0);this.textarea.className="mxCellEditor mxPlainTextEditor";var f=mxConstants.DEFAULT_FONTSIZE;this.textarea.style.lineHeight=mxConstants.ABSOLUTE_LINE_HEIGHT?Math.round(f*mxConstants.LINE_HEIGHT)+"px":mxConstants.LINE_HEIGHT;this.textarea.style.fontSize=Math.round(f)+"px";this.textarea.style.textDecoration="";this.textarea.style.fontWeight="normal";this.textarea.style.fontStyle="";this.textarea.style.fontFamily=
+function(a){var d=c(this.textarea,this.textarea.cloneNode(!0));window.setTimeout(mxUtils.bind(this,function(){b(this.textarea,d)}),0)}))};mxCellEditor.prototype.toggleViewMode=function(){var a=this.graph.view.getState(this.editingCell),c=null!=a&&"0"!=mxUtils.getValue(a.style,"nl2Br","1"),b=this.saveSelection();if(this.codeViewMode){k=mxUtils.extractTextWithWhitespace(this.textarea.childNodes);0<k.length&&"\n"==k.charAt(k.length-1)&&(k=k.substring(0,k.length-1));k=this.graph.sanitizeHtml(c?k.replace(/\n/g,
+"<br/>"):k,!0);this.textarea.className="mxCellEditor geContentEditable";var d=mxUtils.getValue(a.style,mxConstants.STYLE_FONTSIZE,mxConstants.DEFAULT_FONTSIZE),c=mxUtils.getValue(a.style,mxConstants.STYLE_FONTFAMILY,mxConstants.DEFAULT_FONTFAMILY),f=mxUtils.getValue(a.style,mxConstants.STYLE_ALIGN,mxConstants.ALIGN_LEFT),g=(mxUtils.getValue(a.style,mxConstants.STYLE_FONTSTYLE,0)&mxConstants.FONT_BOLD)==mxConstants.FONT_BOLD,e=(mxUtils.getValue(a.style,mxConstants.STYLE_FONTSTYLE,0)&mxConstants.FONT_ITALIC)==
+mxConstants.FONT_ITALIC,a=(mxUtils.getValue(a.style,mxConstants.STYLE_FONTSTYLE,0)&mxConstants.FONT_UNDERLINE)==mxConstants.FONT_UNDERLINE;this.textarea.style.lineHeight=mxConstants.ABSOLUTE_LINE_HEIGHT?Math.round(d*mxConstants.LINE_HEIGHT)+"px":mxConstants.LINE_HEIGHT;this.textarea.style.fontSize=Math.round(d)+"px";this.textarea.style.textDecoration=a?"underline":"";this.textarea.style.fontWeight=g?"bold":"normal";this.textarea.style.fontStyle=e?"italic":"";this.textarea.style.fontFamily=c;this.textarea.style.textAlign=
+f;this.textarea.style.padding="0px";this.textarea.innerHTML!=k&&(this.textarea.innerHTML=k,0==this.textarea.innerHTML.length&&(this.textarea.innerHTML=this.getEmptyLabelText(),this.clearOnChange=0<this.textarea.innerHTML.length));this.codeViewMode=!1}else{this.clearOnChange&&this.textarea.innerHTML==this.getEmptyLabelText()&&(this.clearOnChange=!1,this.textarea.innerHTML="");var k=mxUtils.htmlEntities(this.textarea.innerHTML);mxClient.IS_QUIRKS||8==document.documentMode||(k=mxUtils.replaceTrailingNewlines(k,
+"<div><br></div>"));k=this.graph.sanitizeHtml(c?k.replace(/\n/g,"").replace(/&lt;br\s*.?&gt;/g,"<br>"):k,!0);this.textarea.className="mxCellEditor mxPlainTextEditor";var d=mxConstants.DEFAULT_FONTSIZE;this.textarea.style.lineHeight=mxConstants.ABSOLUTE_LINE_HEIGHT?Math.round(d*mxConstants.LINE_HEIGHT)+"px":mxConstants.LINE_HEIGHT;this.textarea.style.fontSize=Math.round(d)+"px";this.textarea.style.textDecoration="";this.textarea.style.fontWeight="normal";this.textarea.style.fontStyle="";this.textarea.style.fontFamily=
 mxConstants.DEFAULT_FONTFAMILY;this.textarea.style.textAlign="left";this.textarea.style.padding="2px";this.textarea.innerHTML!=k&&(this.textarea.innerHTML=k);this.codeViewMode=!0}this.textarea.focus();null!=this.switchSelectionState&&this.restoreSelection(this.switchSelectionState);this.switchSelectionState=b;this.resize()};var c=mxCellEditor.prototype.resize;mxCellEditor.prototype.resize=function(a,b){if(null!=this.textarea)if(a=this.graph.getView().getState(this.editingCell),this.codeViewMode&&
-null!=a){var f=a.view.scale;this.bounds=mxRectangle.fromRectangle(a);if(0==this.bounds.width&&0==this.bounds.height){this.bounds.width=160*f;this.bounds.height=60*f;var d=null!=a.text?a.text.margin:null;null==d&&(d=mxUtils.getAlignmentAsPoint(mxUtils.getValue(a.style,mxConstants.STYLE_ALIGN,mxConstants.ALIGN_CENTER),mxUtils.getValue(a.style,mxConstants.STYLE_VERTICAL_ALIGN,mxConstants.ALIGN_MIDDLE)));this.bounds.x+=d.x*this.bounds.width;this.bounds.y+=d.y*this.bounds.height}this.textarea.style.width=
-Math.round((this.bounds.width-4)/f)+"px";this.textarea.style.height=Math.round((this.bounds.height-4)/f)+"px";this.textarea.style.overflow="auto";this.textarea.clientHeight<this.textarea.offsetHeight&&(this.textarea.style.height=Math.round(this.bounds.height/f)+(this.textarea.offsetHeight-this.textarea.clientHeight)+"px",this.bounds.height=parseInt(this.textarea.style.height)*f);this.textarea.clientWidth<this.textarea.offsetWidth&&(this.textarea.style.width=Math.round(this.bounds.width/f)+(this.textarea.offsetWidth-
-this.textarea.clientWidth)+"px",this.bounds.width=parseInt(this.textarea.style.width)*f);this.textarea.style.left=Math.round(this.bounds.x)+"px";this.textarea.style.top=Math.round(this.bounds.y)+"px";mxClient.IS_VML?this.textarea.style.zoom=f:mxUtils.setPrefixedStyle(this.textarea.style,"transform","scale("+f+","+f+")")}else this.textarea.style.height="",this.textarea.style.overflow="",c.apply(this,arguments)};mxCellEditorGetInitialValue=mxCellEditor.prototype.getInitialValue;mxCellEditor.prototype.getInitialValue=
+null!=a){var d=a.view.scale;this.bounds=mxRectangle.fromRectangle(a);if(0==this.bounds.width&&0==this.bounds.height){this.bounds.width=160*d;this.bounds.height=60*d;var f=null!=a.text?a.text.margin:null;null==f&&(f=mxUtils.getAlignmentAsPoint(mxUtils.getValue(a.style,mxConstants.STYLE_ALIGN,mxConstants.ALIGN_CENTER),mxUtils.getValue(a.style,mxConstants.STYLE_VERTICAL_ALIGN,mxConstants.ALIGN_MIDDLE)));this.bounds.x+=f.x*this.bounds.width;this.bounds.y+=f.y*this.bounds.height}this.textarea.style.width=
+Math.round((this.bounds.width-4)/d)+"px";this.textarea.style.height=Math.round((this.bounds.height-4)/d)+"px";this.textarea.style.overflow="auto";this.textarea.clientHeight<this.textarea.offsetHeight&&(this.textarea.style.height=Math.round(this.bounds.height/d)+(this.textarea.offsetHeight-this.textarea.clientHeight)+"px",this.bounds.height=parseInt(this.textarea.style.height)*d);this.textarea.clientWidth<this.textarea.offsetWidth&&(this.textarea.style.width=Math.round(this.bounds.width/d)+(this.textarea.offsetWidth-
+this.textarea.clientWidth)+"px",this.bounds.width=parseInt(this.textarea.style.width)*d);this.textarea.style.left=Math.round(this.bounds.x)+"px";this.textarea.style.top=Math.round(this.bounds.y)+"px";mxClient.IS_VML?this.textarea.style.zoom=d:mxUtils.setPrefixedStyle(this.textarea.style,"transform","scale("+d+","+d+")")}else this.textarea.style.height="",this.textarea.style.overflow="",c.apply(this,arguments)};mxCellEditorGetInitialValue=mxCellEditor.prototype.getInitialValue;mxCellEditor.prototype.getInitialValue=
 function(a,c){if("0"==mxUtils.getValue(a.style,"html","0"))return mxCellEditorGetInitialValue.apply(this,arguments);var b=this.graph.getEditingValue(a.cell,c);"1"==mxUtils.getValue(a.style,"nl2Br","1")&&(b=b.replace(/\n/g,"<br/>"));return b=this.graph.sanitizeHtml(b,!0)};mxCellEditorGetCurrentValue=mxCellEditor.prototype.getCurrentValue;mxCellEditor.prototype.getCurrentValue=function(a){if("0"==mxUtils.getValue(a.style,"html","0"))return mxCellEditorGetCurrentValue.apply(this,arguments);var c=this.graph.sanitizeHtml(this.textarea.innerHTML,
-!0);return c="1"==mxUtils.getValue(a.style,"nl2Br","1")?c.replace(/\r\n/g,"<br/>").replace(/\n/g,"<br/>"):c.replace(/\r\n/g,"").replace(/\n/g,"")};var f=mxCellEditor.prototype.stopEditing;mxCellEditor.prototype.stopEditing=function(a){this.codeViewMode&&this.toggleViewMode();f.apply(this,arguments);this.focusContainer()};mxCellEditor.prototype.focusContainer=function(){try{this.graph.container.focus()}catch(G){}};var h=mxCellEditor.prototype.applyValue;mxCellEditor.prototype.applyValue=function(a,
-c){this.graph.getModel().beginUpdate();try{if(h.apply(this,arguments),this.graph.isCellDeletable(a.cell)&&0==this.graph.model.getChildCount(a.cell)){var b=mxUtils.getValue(a.style,mxConstants.STYLE_STROKECOLOR,mxConstants.NONE),f=mxUtils.getValue(a.style,mxConstants.STYLE_FILLCOLOR,mxConstants.NONE);""==c&&b==mxConstants.NONE&&f==mxConstants.NONE&&this.graph.removeCells([a.cell],!1)}}finally{this.graph.getModel().endUpdate()}};mxCellEditor.prototype.getBackgroundColor=function(a){var c=null;if(this.graph.getModel().isEdge(a.cell)||
-this.graph.getModel().isEdge(this.graph.getModel().getParent(a.cell)))c=mxUtils.getValue(a.style,mxConstants.STYLE_LABEL_BACKGROUNDCOLOR,null),c==mxConstants.NONE&&(c=null);return c};mxCellEditor.prototype.getMinimumSize=function(a){var c=this.graph.getView().scale;return new mxRectangle(0,0,null==a.text?30:a.text.size*c+20,30)};var m=mxGraphHandler.prototype.moveCells;mxGraphHandler.prototype.moveCells=function(a,c,b,f,d,e){mxEvent.isAltDown(e)&&(d=null);m.apply(this,arguments)};mxGraphHandler.prototype.updateHint=
-function(c){if(null!=this.shape){null==this.hint&&(this.hint=a(),this.graph.container.appendChild(this.hint));var b=this.graph.view.translate,f=this.graph.view.scale;c=this.roundLength((this.bounds.x+this.currentDx)/f-b.x);b=this.roundLength((this.bounds.y+this.currentDy)/f-b.y);this.hint.innerHTML=c+", "+b;this.hint.style.left=this.shape.bounds.x+Math.round((this.shape.bounds.width-this.hint.clientWidth)/2)+"px";this.hint.style.top=this.shape.bounds.y+this.shape.bounds.height+12+"px"}};mxGraphHandler.prototype.removeHint=
+!0);return c="1"==mxUtils.getValue(a.style,"nl2Br","1")?c.replace(/\r\n/g,"<br/>").replace(/\n/g,"<br/>"):c.replace(/\r\n/g,"").replace(/\n/g,"")};var f=mxCellEditor.prototype.stopEditing;mxCellEditor.prototype.stopEditing=function(a){this.codeViewMode&&this.toggleViewMode();f.apply(this,arguments);this.focusContainer()};mxCellEditor.prototype.focusContainer=function(){try{this.graph.container.focus()}catch(H){}};var g=mxCellEditor.prototype.applyValue;mxCellEditor.prototype.applyValue=function(a,
+c){this.graph.getModel().beginUpdate();try{if(g.apply(this,arguments),this.graph.isCellDeletable(a.cell)&&0==this.graph.model.getChildCount(a.cell)){var b=mxUtils.getValue(a.style,mxConstants.STYLE_STROKECOLOR,mxConstants.NONE),d=mxUtils.getValue(a.style,mxConstants.STYLE_FILLCOLOR,mxConstants.NONE);""==c&&b==mxConstants.NONE&&d==mxConstants.NONE&&this.graph.removeCells([a.cell],!1)}}finally{this.graph.getModel().endUpdate()}};mxCellEditor.prototype.getBackgroundColor=function(a){var c=null;if(this.graph.getModel().isEdge(a.cell)||
+this.graph.getModel().isEdge(this.graph.getModel().getParent(a.cell)))c=mxUtils.getValue(a.style,mxConstants.STYLE_LABEL_BACKGROUNDCOLOR,null),c==mxConstants.NONE&&(c=null);return c};mxCellEditor.prototype.getMinimumSize=function(a){var c=this.graph.getView().scale;return new mxRectangle(0,0,null==a.text?30:a.text.size*c+20,30)};var p=mxGraphHandler.prototype.moveCells;mxGraphHandler.prototype.moveCells=function(a,c,b,d,f,g){mxEvent.isAltDown(g)&&(f=null);p.apply(this,arguments)};mxGraphHandler.prototype.updateHint=
+function(c){if(null!=this.shape){null==this.hint&&(this.hint=a(),this.graph.container.appendChild(this.hint));var b=this.graph.view.translate,d=this.graph.view.scale;c=this.roundLength((this.bounds.x+this.currentDx)/d-b.x);b=this.roundLength((this.bounds.y+this.currentDy)/d-b.y);this.hint.innerHTML=c+", "+b;this.hint.style.left=this.shape.bounds.x+Math.round((this.shape.bounds.width-this.hint.clientWidth)/2)+"px";this.hint.style.top=this.shape.bounds.y+this.shape.bounds.height+12+"px"}};mxGraphHandler.prototype.removeHint=
 function(){null!=this.hint&&(this.hint.parentNode.removeChild(this.hint),this.hint=null)};mxVertexHandler.prototype.isRecursiveResize=function(a,c){return!this.graph.isSwimlane(a.cell)&&0<this.graph.model.getChildCount(a.cell)&&!mxEvent.isControlDown(c.getEvent())&&!this.graph.isCellCollapsed(a.cell)&&"1"==mxUtils.getValue(a.style,"recursiveResize","1")&&null==mxUtils.getValue(a.style,"childLayout",null)};mxVertexHandler.prototype.isCenteredEvent=function(a,c){return!(!this.graph.isSwimlane(a.cell)&&
-0<this.graph.model.getChildCount(a.cell)&&!this.graph.isCellCollapsed(a.cell)&&"1"==mxUtils.getValue(a.style,"recursiveResize","1")&&null==mxUtils.getValue(a.style,"childLayout",null))&&mxEvent.isControlDown(c.getEvent())||mxEvent.isMetaDown(c.getEvent())};var n=mxVertexHandler.prototype.getHandlePadding;mxVertexHandler.prototype.getHandlePadding=function(){var a=new mxPoint(0,0),c=this.tolerance;this.graph.cellEditor.getEditingCell()==this.state.cell&&null!=this.sizers&&0<this.sizers.length&&null!=
-this.sizers[0]?(c/=2,a.x=this.sizers[0].bounds.width+c,a.y=this.sizers[0].bounds.height+c):a=n.apply(this,arguments);return a};mxVertexHandler.prototype.updateHint=function(c){this.index!=mxEvent.LABEL_HANDLE&&(null==this.hint&&(this.hint=a(),this.state.view.graph.container.appendChild(this.hint)),this.index==mxEvent.ROTATION_HANDLE?this.hint.innerHTML=this.currentAlpha+"&deg;":(c=this.state.view.scale,this.hint.innerHTML=this.roundLength(this.bounds.width/c)+" x "+this.roundLength(this.bounds.height/
-c)),c=mxUtils.getBoundingBox(this.bounds,null!=this.currentAlpha?this.currentAlpha:this.state.style[mxConstants.STYLE_ROTATION]||"0"),null==c&&(c=this.bounds),this.hint.style.left=c.x+Math.round((c.width-this.hint.clientWidth)/2)+"px",this.hint.style.top=c.y+c.height+12+"px")};mxVertexHandler.prototype.removeHint=mxGraphHandler.prototype.removeHint;mxEdgeHandler.prototype.updateHint=function(c,b){null==this.hint&&(this.hint=a(),this.state.view.graph.container.appendChild(this.hint));var f=this.graph.view.translate,
-d=this.graph.view.scale,e=this.roundLength(b.x/d-f.x),f=this.roundLength(b.y/d-f.y);this.hint.innerHTML=e+", "+f;this.hint.style.visibility="visible";if(this.isSource||this.isTarget)null!=this.constraintHandler.currentConstraint&&null!=this.constraintHandler.currentFocus?(e=this.constraintHandler.currentConstraint.point,this.hint.innerHTML="["+Math.round(100*e.x)+"%, "+Math.round(100*e.y)+"%]"):this.marker.hasValidState()&&(this.hint.style.visibility="hidden");this.hint.style.left=Math.round(c.getGraphX()-
+0<this.graph.model.getChildCount(a.cell)&&!this.graph.isCellCollapsed(a.cell)&&"1"==mxUtils.getValue(a.style,"recursiveResize","1")&&null==mxUtils.getValue(a.style,"childLayout",null))&&mxEvent.isControlDown(c.getEvent())||mxEvent.isMetaDown(c.getEvent())};var m=mxVertexHandler.prototype.getHandlePadding;mxVertexHandler.prototype.getHandlePadding=function(){var a=new mxPoint(0,0),c=this.tolerance;this.graph.cellEditor.getEditingCell()==this.state.cell&&null!=this.sizers&&0<this.sizers.length&&null!=
+this.sizers[0]?(c/=2,a.x=this.sizers[0].bounds.width+c,a.y=this.sizers[0].bounds.height+c):a=m.apply(this,arguments);return a};mxVertexHandler.prototype.updateHint=function(c){this.index!=mxEvent.LABEL_HANDLE&&(null==this.hint&&(this.hint=a(),this.state.view.graph.container.appendChild(this.hint)),this.index==mxEvent.ROTATION_HANDLE?this.hint.innerHTML=this.currentAlpha+"&deg;":(c=this.state.view.scale,this.hint.innerHTML=this.roundLength(this.bounds.width/c)+" x "+this.roundLength(this.bounds.height/
+c)),c=mxUtils.getBoundingBox(this.bounds,null!=this.currentAlpha?this.currentAlpha:this.state.style[mxConstants.STYLE_ROTATION]||"0"),null==c&&(c=this.bounds),this.hint.style.left=c.x+Math.round((c.width-this.hint.clientWidth)/2)+"px",this.hint.style.top=c.y+c.height+12+"px")};mxVertexHandler.prototype.removeHint=mxGraphHandler.prototype.removeHint;mxEdgeHandler.prototype.updateHint=function(c,b){null==this.hint&&(this.hint=a(),this.state.view.graph.container.appendChild(this.hint));var d=this.graph.view.translate,
+f=this.graph.view.scale,g=this.roundLength(b.x/f-d.x),d=this.roundLength(b.y/f-d.y);this.hint.innerHTML=g+", "+d;this.hint.style.visibility="visible";if(this.isSource||this.isTarget)null!=this.constraintHandler.currentConstraint&&null!=this.constraintHandler.currentFocus?(g=this.constraintHandler.currentConstraint.point,this.hint.innerHTML="["+Math.round(100*g.x)+"%, "+Math.round(100*g.y)+"%]"):this.marker.hasValidState()&&(this.hint.style.visibility="hidden");this.hint.style.left=Math.round(c.getGraphX()-
 this.hint.clientWidth/2)+"px";this.hint.style.top=Math.max(c.getGraphY(),b.y)+this.state.view.graph.gridSize+"px";null!=this.hideEdgeHintThread&&window.clearTimeout(this.hideEdgeHintThread);this.hideEdgeHintThread=window.setTimeout(mxUtils.bind(this,function(){null!=this.hint&&(this.hint.style.visibility="hidden")}),500)};mxEdgeHandler.prototype.removeHint=mxGraphHandler.prototype.removeHint;HoverIcons.prototype.mainHandle=new mxImage(mxClient.IS_SVG?"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABEAAAARCAYAAAA7bUf6AAAACXBIWXMAAAsTAAALEwEAmpwYAAABLUlEQVQ4y61US4rCQBBNeojiRrLSnbMOWWU3V1FPouARcgc9hyLOCSSbYZw5gRCIkM9KbevJaycS4zCOBY+iq6pf1y+xrNtiE6oEY/tVzMUXgSNoCJrUDu3qHpldutwSuIKOoEvt0m7I7DoCvNj2fb8XRdEojuN5lmVraJxhh59xFSLFF9phGL7lef6hRb63R73aHM8aAjv8JHJ47yqLlud5r0VRbHa51sPZQVuT/QU4ww4/4ljaJRubrC5SxouD6TWBQV/sEIkbs0eOIVGssSO1L5D6LQID+BHHZjdMSYpj7KZpun7/uk8CP5rNqTXLJP/OpNyTMWruP9CTP08nCILKdCp7gkCzJ8vPnz2BvW5PKhuLjJBykiQLaWIEjTP3o3Zjn/LtPO0rfvh/cgKu7z6wtPPltQAAAABJRU5ErkJggg==":
 IMAGE_PATH+"/handle-main.png",17,17);HoverIcons.prototype.fixedHandle=new mxImage(mxClient.IS_SVG?"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABEAAAARCAYAAAA7bUf6AAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAyJpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuMC1jMDYwIDYxLjEzNDc3NywgMjAxMC8wMi8xMi0xNzozMjowMCAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvIiB4bWxuczp4bXBNTT0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL21tLyIgeG1sbnM6c3RSZWY9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9zVHlwZS9SZXNvdXJjZVJlZiMiIHhtcDpDcmVhdG9yVG9vbD0iQWRvYmUgUGhvdG9zaG9wIENTNSBNYWNpbnRvc2giIHhtcE1NOkluc3RhbmNlSUQ9InhtcC5paWQ6NkE1NkU4Njk2QjI1MTFFNEFDMjFGQTcyODkzNTc3NkYiIHhtcE1NOkRvY3VtZW50SUQ9InhtcC5kaWQ6NkE1NkU4NkE2QjI1MTFFNEFDMjFGQTcyODkzNTc3NkYiPiA8eG1wTU06RGVyaXZlZEZyb20gc3RSZWY6aW5zdGFuY2VJRD0ieG1wLmlpZDo2QTU2RTg2NzZCMjUxMUU0QUMyMUZBNzI4OTM1Nzc2RiIgc3RSZWY6ZG9jdW1lbnRJRD0ieG1wLmRpZDo2QTU2RTg2ODZCMjUxMUU0QUMyMUZBNzI4OTM1Nzc2RiIvPiA8L3JkZjpEZXNjcmlwdGlvbj4gPC9yZGY6UkRGPiA8L3g6eG1wbWV0YT4gPD94cGFja2V0IGVuZD0iciI/Pmuk6K8AAAGBSURBVHjarFRBSsNQEM3/atNs6qLowixcKELoqjuXoqfQeoF6BMEj9BCC1YIXcCGlV8hGLNZlBKWlCk1JSs13Xvw/nca6UDrwmMzMy8tk/iTCWmwi52Eq53+QeWwg2bXSSNi1WiRibgRWCTahwEQmhJgw1WJGML2BC6wQnEqlsuH7fr3f7zdHo9EdPGLkUdc8mX8TJNYIpUajsR+G4YMie3pNVKebpB6GPOrgab7kr5F24Hne9ng87r6HStUuP5V1Mc2AGHnUwWMdCck6sVut1onjOHtnt4nV7M0fAuI65VEnXk3PTFq5Eyi4rnvUe1PW9fO3QOdUzvkbyqNOvEM2dMEHK2zbLr98zJ5+cJWkAvDGUC8Wi2X28Gww6bnHcTzYWp+JGAHTCQz1KIoGfFckCyZBELR3N4V1vCOyTrhHHnXw9N5kQn8+nWq1Onc6C/cERLMn7cfZniD/257wbjDxEjqiDT0fDof3tLE+PGK9HyXNy7pYyrez9K/43/+TLwEGAMb7AY6w980DAAAAAElFTkSuQmCC":
 IMAGE_PATH+"/handle-fixed.png",17,17);HoverIcons.prototype.terminalHandle=new mxImage(mxClient.IS_SVG?"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABEAAAARCAYAAAA7bUf6AAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAyJpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuMC1jMDYwIDYxLjEzNDc3NywgMjAxMC8wMi8xMi0xNzozMjowMCAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvIiB4bWxuczp4bXBNTT0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL21tLyIgeG1sbnM6c3RSZWY9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9zVHlwZS9SZXNvdXJjZVJlZiMiIHhtcDpDcmVhdG9yVG9vbD0iQWRvYmUgUGhvdG9zaG9wIENTNSBNYWNpbnRvc2giIHhtcE1NOkluc3RhbmNlSUQ9InhtcC5paWQ6MEMzRUVERTk2NzU1MTFFNTg5NjNEMjREQ0FFNENFQzgiIHhtcE1NOkRvY3VtZW50SUQ9InhtcC5kaWQ6MEMzRUVERUE2NzU1MTFFNTg5NjNEMjREQ0FFNENFQzgiPiA8eG1wTU06RGVyaXZlZEZyb20gc3RSZWY6aW5zdGFuY2VJRD0ieG1wLmlpZDowQzNFRURFNzY3NTUxMUU1ODk2M0QyNERDQUU0Q0VDOCIgc3RSZWY6ZG9jdW1lbnRJRD0ieG1wLmRpZDowQzNFRURFODY3NTUxMUU1ODk2M0QyNERDQUU0Q0VDOCIvPiA8L3JkZjpEZXNjcmlwdGlvbj4gPC9yZGY6UkRGPiA8L3g6eG1wbWV0YT4gPD94cGFja2V0IGVuZD0iciI/Poj8AGUAAAF6SURBVHjarFTBSsNAEM2u2jSXeCh6sAcPilB6ys2j6Fdo/YH6CYKf0I8QrBb8AQ9S+gu5iMV6jKC0VCEJTalZ54VNnMR4ULrwmJ2Zt5PZmdkIo3yJgsRSBfmDzPUUku2VRsz2qixIehBYJZiECgsyJ0SEhQ6WBkwO8AArBKvZbG64rtsej8dd3/fvIKHDDr/myeJNYFgj2J1OZz8IggdF6+k1VoNhnEgs2OEHT/Mlv0aSQaPR2A7DcPgeKNW6/FTGxSIDdNjhB49lJCTLxOz1eieWZe2d3cZGd5RvAvQ22eEnXkvXTBqFDlTq9frR6E0Z18+qtO83ZIefeIes6IIXVpimWXv5yB8cnMqcDn+1Wq2xj2eFSfoeRdFkaz0f5OAqzunwz2azCZ8VyZS553n93U1hHO+I0uvADj94em6yQH/ujuM4ue6UzgmI6Zz0H7/nBPbf5oRng4rbyIgm9Hw6nd7TxLqQ0PV82JqXZbGUt7P0V/zv/8mXAAMASSz1f9Cd7ycAAAAASUVORK5CYII=":
@@ -2336,192 +2337,192 @@ HoverIcons.prototype.roundDrop.src);mxVertexHandler.prototype.rotationEnabled=!0
 !0;mxEdgeHandler.prototype.virtualBendsEnabled=!0;mxEdgeHandler.prototype.mergeRemoveEnabled=!0;mxEdgeHandler.prototype.manageLabelHandle=!0;mxEdgeHandler.prototype.outlineConnect=!0;mxEdgeHandler.prototype.isAddVirtualBendEvent=function(a){return!mxEvent.isShiftDown(a.getEvent())};mxEdgeHandler.prototype.isCustomHandleEvent=function(a){return!mxEvent.isShiftDown(a.getEvent())};if(Graph.touchStyle){if(mxClient.IS_TOUCH||0<navigator.maxTouchPoints||0<navigator.msMaxTouchPoints)mxShape.prototype.svgStrokeTolerance=
 18,mxVertexHandler.prototype.tolerance=12,mxEdgeHandler.prototype.tolerance=12,Graph.prototype.tolerance=12,mxVertexHandler.prototype.rotationHandleVSpacing=-24,mxConstraintHandler.prototype.getTolerance=function(a){return mxEvent.isMouseEvent(a.getEvent())?4:this.graph.getTolerance()};mxPanningHandler.prototype.isPanningTrigger=function(a){var c=a.getEvent();return null==a.getState()&&!mxEvent.isMouseEvent(c)||mxEvent.isPopupTrigger(c)&&(null==a.getState()||mxEvent.isControlDown(c)||mxEvent.isShiftDown(c))};
 var u=mxGraphHandler.prototype.mouseDown;mxGraphHandler.prototype.mouseDown=function(a,c){u.apply(this,arguments);mxEvent.isTouchEvent(c.getEvent())&&this.graph.isCellSelected(c.getCell())&&1<this.graph.getSelectionCount()&&(this.delayedSelection=!1)}}else mxPanningHandler.prototype.isPanningTrigger=function(a){var c=a.getEvent();return mxEvent.isLeftMouseButton(c)&&(this.useLeftButtonForPanning&&null==a.getState()||mxEvent.isControlDown(c)&&!mxEvent.isShiftDown(c))||this.usePopupTrigger&&mxEvent.isPopupTrigger(c)};
-mxRubberband.prototype.isSpaceEvent=function(a){return this.graph.isEnabled()&&!this.graph.isCellLocked(this.graph.getDefaultParent())&&mxEvent.isControlDown(a.getEvent())&&mxEvent.isShiftDown(a.getEvent())};mxRubberband.prototype.mouseUp=function(a,c){var b=null!=this.div&&"none"!=this.div.style.display,f=null,d=null,e=null,h=null;null!=this.first&&null!=this.currentX&&null!=this.currentY&&(f=this.first.x,d=this.first.y,e=(this.currentX-f)/this.graph.view.scale,h=(this.currentY-d)/this.graph.view.scale,
-mxEvent.isAltDown(c.getEvent())||(e=this.graph.snap(e),h=this.graph.snap(h),this.graph.isGridEnabled()||(Math.abs(e)<this.graph.tolerance&&(e=0),Math.abs(h)<this.graph.tolerance&&(h=0))));this.reset();if(b){if(mxEvent.isAltDown(c.getEvent())&&this.graph.isToggleEvent(c.getEvent())){var e=new mxRectangle(this.x,this.y,this.width,this.height),k=this.graph.getCells(e.x,e.y,e.width,e.height);this.graph.removeSelectionCells(k)}else if(this.isSpaceEvent(c)){this.graph.model.beginUpdate();try{for(k=this.graph.getCellsBeyond(f,
-d,this.graph.getDefaultParent(),!0,!0),b=0;b<k.length;b++)if(this.graph.isCellMovable(k[b])){var m=this.graph.view.getState(k[b]),n=this.graph.getCellGeometry(k[b]);null!=m&&null!=n&&(n=n.clone(),n.translate(e,h),this.graph.model.setGeometry(k[b],n))}}finally{this.graph.model.endUpdate()}}else e=new mxRectangle(this.x,this.y,this.width,this.height),this.graph.selectRegion(e,c.getEvent());c.consume()}};mxRubberband.prototype.mouseMove=function(a,c){if(!c.isConsumed()&&null!=this.first){var b=mxUtils.getScrollOrigin(this.graph.container),
-f=mxUtils.getOffset(this.graph.container);b.x-=f.x;b.y-=f.y;var f=c.getX()+b.x,b=c.getY()+b.y,d=this.first.x-f,e=this.first.y-b,h=this.graph.tolerance;if(null!=this.div||Math.abs(d)>h||Math.abs(e)>h)null==this.div&&(this.div=this.createShape()),mxUtils.clearSelection(),this.update(f,b),this.isSpaceEvent(c)?(f=this.x+this.width,b=this.y+this.height,d=this.graph.view.scale,mxEvent.isAltDown(c.getEvent())||(this.width=this.graph.snap(this.width/d)*d,this.height=this.graph.snap(this.height/d)*d,this.graph.isGridEnabled()||
-(this.width<this.graph.tolerance&&(this.width=0),this.height<this.graph.tolerance&&(this.height=0)),this.x<this.first.x&&(this.x=f-this.width),this.y<this.first.y&&(this.y=b-this.height)),this.div.style.borderStyle="dashed",this.div.style.backgroundColor="white",this.div.style.left=this.x+"px",this.div.style.top=this.y+"px",this.div.style.width=Math.max(0,this.width)+"px",this.div.style.height=this.graph.container.clientHeight+"px",this.div.style.borderWidth=0>=this.width?"0px 1px 0px 0px":"0px 1px 0px 1px",
+mxRubberband.prototype.isSpaceEvent=function(a){return this.graph.isEnabled()&&!this.graph.isCellLocked(this.graph.getDefaultParent())&&mxEvent.isControlDown(a.getEvent())&&mxEvent.isShiftDown(a.getEvent())};mxRubberband.prototype.mouseUp=function(a,c){var b=null!=this.div&&"none"!=this.div.style.display,d=null,f=null,g=null,e=null;null!=this.first&&null!=this.currentX&&null!=this.currentY&&(d=this.first.x,f=this.first.y,g=(this.currentX-d)/this.graph.view.scale,e=(this.currentY-f)/this.graph.view.scale,
+mxEvent.isAltDown(c.getEvent())||(g=this.graph.snap(g),e=this.graph.snap(e),this.graph.isGridEnabled()||(Math.abs(g)<this.graph.tolerance&&(g=0),Math.abs(e)<this.graph.tolerance&&(e=0))));this.reset();if(b){if(mxEvent.isAltDown(c.getEvent())&&this.graph.isToggleEvent(c.getEvent())){var g=new mxRectangle(this.x,this.y,this.width,this.height),k=this.graph.getCells(g.x,g.y,g.width,g.height);this.graph.removeSelectionCells(k)}else if(this.isSpaceEvent(c)){this.graph.model.beginUpdate();try{for(k=this.graph.getCellsBeyond(d,
+f,this.graph.getDefaultParent(),!0,!0),b=0;b<k.length;b++)if(this.graph.isCellMovable(k[b])){var p=this.graph.view.getState(k[b]),m=this.graph.getCellGeometry(k[b]);null!=p&&null!=m&&(m=m.clone(),m.translate(g,e),this.graph.model.setGeometry(k[b],m))}}finally{this.graph.model.endUpdate()}}else g=new mxRectangle(this.x,this.y,this.width,this.height),this.graph.selectRegion(g,c.getEvent());c.consume()}};mxRubberband.prototype.mouseMove=function(a,c){if(!c.isConsumed()&&null!=this.first){var b=mxUtils.getScrollOrigin(this.graph.container),
+d=mxUtils.getOffset(this.graph.container);b.x-=d.x;b.y-=d.y;var d=c.getX()+b.x,b=c.getY()+b.y,f=this.first.x-d,g=this.first.y-b,e=this.graph.tolerance;if(null!=this.div||Math.abs(f)>e||Math.abs(g)>e)null==this.div&&(this.div=this.createShape()),mxUtils.clearSelection(),this.update(d,b),this.isSpaceEvent(c)?(d=this.x+this.width,b=this.y+this.height,f=this.graph.view.scale,mxEvent.isAltDown(c.getEvent())||(this.width=this.graph.snap(this.width/f)*f,this.height=this.graph.snap(this.height/f)*f,this.graph.isGridEnabled()||
+(this.width<this.graph.tolerance&&(this.width=0),this.height<this.graph.tolerance&&(this.height=0)),this.x<this.first.x&&(this.x=d-this.width),this.y<this.first.y&&(this.y=b-this.height)),this.div.style.borderStyle="dashed",this.div.style.backgroundColor="white",this.div.style.left=this.x+"px",this.div.style.top=this.y+"px",this.div.style.width=Math.max(0,this.width)+"px",this.div.style.height=this.graph.container.clientHeight+"px",this.div.style.borderWidth=0>=this.width?"0px 1px 0px 0px":"0px 1px 0px 1px",
 null==this.secondDiv&&(this.secondDiv=this.div.cloneNode(!0),this.div.parentNode.appendChild(this.secondDiv)),this.secondDiv.style.left=this.x+"px",this.secondDiv.style.top=this.y+"px",this.secondDiv.style.width=this.graph.container.clientWidth+"px",this.secondDiv.style.height=Math.max(0,this.height)+"px",this.secondDiv.style.borderWidth=0>=this.height?"1px 0px 0px 0px":"1px 0px 1px 0px"):(this.div.style.backgroundColor="",this.div.style.borderWidth="",this.div.style.borderStyle="",null!=this.secondDiv&&
-(this.secondDiv.parentNode.removeChild(this.secondDiv),this.secondDiv=null)),c.consume()}};var r=mxRubberband.prototype.reset;mxRubberband.prototype.reset=function(){null!=this.secondDiv&&(this.secondDiv.parentNode.removeChild(this.secondDiv),this.secondDiv=null);r.apply(this,arguments)};var k=(new Date).getTime(),t=0,v=mxEdgeHandler.prototype.updatePreviewState;mxEdgeHandler.prototype.updatePreviewState=function(a,c,b,f){v.apply(this,arguments);b!=this.currentTerminalState?(k=(new Date).getTime(),
-t=0):t=(new Date).getTime()-k;this.currentTerminalState=b};var x=mxEdgeHandler.prototype.isOutlineConnectEvent;mxEdgeHandler.prototype.isOutlineConnectEvent=function(a){return null!=this.currentTerminalState&&a.getState()==this.currentTerminalState&&2E3<t||(null==this.currentTerminalState||"0"!=mxUtils.getValue(this.currentTerminalState.style,"outlineConnect","1"))&&x.apply(this,arguments)};mxVertexHandler.prototype.isCustomHandleEvent=function(a){return!mxEvent.isShiftDown(a.getEvent())};mxEdgeHandler.prototype.createHandleShape=
-function(a,c){var b=null!=a&&0==a,f=this.state.getVisibleTerminalState(b),d=null!=a&&(0==a||a>=this.state.absolutePoints.length-1||this.constructor==mxElbowEdgeHandler&&2==a)?this.graph.getConnectionConstraint(this.state,f,b):null,b=null!=(null!=d?this.graph.getConnectionPoint(this.state.getVisibleTerminalState(b),d):null)?this.fixedHandleImage:null!=d&&null!=f?this.terminalHandleImage:this.handleImage;if(null!=b)return b=new mxImageShape(new mxRectangle(0,0,b.width,b.height),b.src),b.preserveImageAspect=
+(this.secondDiv.parentNode.removeChild(this.secondDiv),this.secondDiv=null)),c.consume()}};var r=mxRubberband.prototype.reset;mxRubberband.prototype.reset=function(){null!=this.secondDiv&&(this.secondDiv.parentNode.removeChild(this.secondDiv),this.secondDiv=null);r.apply(this,arguments)};var k=(new Date).getTime(),v=0,t=mxEdgeHandler.prototype.updatePreviewState;mxEdgeHandler.prototype.updatePreviewState=function(a,c,b,d){t.apply(this,arguments);b!=this.currentTerminalState?(k=(new Date).getTime(),
+v=0):v=(new Date).getTime()-k;this.currentTerminalState=b};var x=mxEdgeHandler.prototype.isOutlineConnectEvent;mxEdgeHandler.prototype.isOutlineConnectEvent=function(a){return null!=this.currentTerminalState&&a.getState()==this.currentTerminalState&&2E3<v||(null==this.currentTerminalState||"0"!=mxUtils.getValue(this.currentTerminalState.style,"outlineConnect","1"))&&x.apply(this,arguments)};mxVertexHandler.prototype.isCustomHandleEvent=function(a){return!mxEvent.isShiftDown(a.getEvent())};mxEdgeHandler.prototype.createHandleShape=
+function(a,c){var b=null!=a&&0==a,d=this.state.getVisibleTerminalState(b),f=null!=a&&(0==a||a>=this.state.absolutePoints.length-1||this.constructor==mxElbowEdgeHandler&&2==a)?this.graph.getConnectionConstraint(this.state,d,b):null,b=null!=(null!=f?this.graph.getConnectionPoint(this.state.getVisibleTerminalState(b),f):null)?this.fixedHandleImage:null!=f&&null!=d?this.terminalHandleImage:this.handleImage;if(null!=b)return b=new mxImageShape(new mxRectangle(0,0,b.width,b.height),b.src),b.preserveImageAspect=
 !1,b;b=mxConstants.HANDLE_SIZE;this.preferHtml&&--b;return new mxRectangleShape(new mxRectangle(0,0,b,b),mxConstants.HANDLE_FILLCOLOR,mxConstants.HANDLE_STROKECOLOR)};var w=mxVertexHandler.prototype.createSizerShape;mxVertexHandler.prototype.createSizerShape=function(a,c,b){this.handleImage=c==mxEvent.ROTATION_HANDLE?HoverIcons.prototype.rotationHandle:c==mxEvent.LABEL_HANDLE?this.secondaryHandleImage:this.handleImage;return w.apply(this,arguments)};var D=mxGraphHandler.prototype.getBoundingBox;mxGraphHandler.prototype.getBoundingBox=
-function(a){if(null!=a&&1==a.length){var c=this.graph.getModel(),b=c.getParent(a[0]),f=this.graph.getCellGeometry(a[0]);if(c.isEdge(b)&&null!=f&&f.relative&&(c=this.graph.view.getState(a[0]),null!=c&&2>c.width&&2>c.height&&null!=c.text&&null!=c.text.boundingBox))return mxRectangle.fromRectangle(c.text.boundingBox)}return D.apply(this,arguments)};var B=mxVertexHandler.prototype.getSelectionBounds;mxVertexHandler.prototype.getSelectionBounds=function(a){var c=this.graph.getModel(),b=c.getParent(a.cell),
-f=this.graph.getCellGeometry(a.cell);return c.isEdge(b)&&null!=f&&f.relative&&2>a.width&&2>a.height&&null!=a.text&&null!=a.text.boundingBox?(c=a.text.unrotatedBoundingBox||a.text.boundingBox,new mxRectangle(Math.round(c.x),Math.round(c.y),Math.round(c.width),Math.round(c.height))):B.apply(this,arguments)};var y=mxVertexHandler.prototype.mouseDown;mxVertexHandler.prototype.mouseDown=function(a,c){var b=this.graph.getModel(),f=b.getParent(this.state.cell),d=this.graph.getCellGeometry(this.state.cell);
-(this.getHandleForEvent(c)==mxEvent.ROTATION_HANDLE||!b.isEdge(f)||null==d||!d.relative||null==this.state||2<=this.state.width||2<=this.state.height)&&y.apply(this,arguments)};mxVertexHandler.prototype.isRotationHandleVisible=function(){return this.graph.isEnabled()&&this.rotationEnabled&&this.graph.isCellRotatable(this.state.cell)&&(0>=mxGraphHandler.prototype.maxCells||this.graph.getSelectionCount()<mxGraphHandler.prototype.maxCells)};mxVertexHandler.prototype.rotateClick=function(){this.state.view.graph.turnShapes([this.state.cell])};
-var C=mxVertexHandler.prototype.mouseMove;mxVertexHandler.prototype.mouseMove=function(a,c){C.apply(this,arguments);null!=this.graph.graphHandler.first&&null!=this.rotationShape&&null!=this.rotationShape.node&&(this.rotationShape.node.style.display="none")};var A=mxVertexHandler.prototype.mouseUp;mxVertexHandler.prototype.mouseUp=function(a,c){A.apply(this,arguments);null!=this.rotationShape&&null!=this.rotationShape.node&&(this.rotationShape.node.style.display=1==this.graph.getSelectionCount()?"":
-"none")};var F=mxVertexHandler.prototype.init;mxVertexHandler.prototype.init=function(){F.apply(this,arguments);var a=!1;null!=this.rotationShape&&this.rotationShape.node.setAttribute("title",mxResources.get("rotateTooltip"));var c=mxUtils.bind(this,function(){null!=this.rotationShape&&null!=this.rotationShape.node&&(this.rotationShape.node.style.display=1==this.graph.getSelectionCount()?"":"none");null!=this.specialHandle&&(this.specialHandle.node.style.display=this.graph.isEnabled()&&this.graph.getSelectionCount()<
+function(a){if(null!=a&&1==a.length){var c=this.graph.getModel(),b=c.getParent(a[0]),d=this.graph.getCellGeometry(a[0]);if(c.isEdge(b)&&null!=d&&d.relative&&(c=this.graph.view.getState(a[0]),null!=c&&2>c.width&&2>c.height&&null!=c.text&&null!=c.text.boundingBox))return mxRectangle.fromRectangle(c.text.boundingBox)}return D.apply(this,arguments)};var A=mxVertexHandler.prototype.getSelectionBounds;mxVertexHandler.prototype.getSelectionBounds=function(a){var c=this.graph.getModel(),b=c.getParent(a.cell),
+d=this.graph.getCellGeometry(a.cell);return c.isEdge(b)&&null!=d&&d.relative&&2>a.width&&2>a.height&&null!=a.text&&null!=a.text.boundingBox?(c=a.text.unrotatedBoundingBox||a.text.boundingBox,new mxRectangle(Math.round(c.x),Math.round(c.y),Math.round(c.width),Math.round(c.height))):A.apply(this,arguments)};var z=mxVertexHandler.prototype.mouseDown;mxVertexHandler.prototype.mouseDown=function(a,c){var b=this.graph.getModel(),d=b.getParent(this.state.cell),f=this.graph.getCellGeometry(this.state.cell);
+(this.getHandleForEvent(c)==mxEvent.ROTATION_HANDLE||!b.isEdge(d)||null==f||!f.relative||null==this.state||2<=this.state.width||2<=this.state.height)&&z.apply(this,arguments)};mxVertexHandler.prototype.isRotationHandleVisible=function(){return this.graph.isEnabled()&&this.rotationEnabled&&this.graph.isCellRotatable(this.state.cell)&&(0>=mxGraphHandler.prototype.maxCells||this.graph.getSelectionCount()<mxGraphHandler.prototype.maxCells)};mxVertexHandler.prototype.rotateClick=function(){this.state.view.graph.turnShapes([this.state.cell])};
+var C=mxVertexHandler.prototype.mouseMove;mxVertexHandler.prototype.mouseMove=function(a,c){C.apply(this,arguments);null!=this.graph.graphHandler.first&&null!=this.rotationShape&&null!=this.rotationShape.node&&(this.rotationShape.node.style.display="none")};var B=mxVertexHandler.prototype.mouseUp;mxVertexHandler.prototype.mouseUp=function(a,c){B.apply(this,arguments);null!=this.rotationShape&&null!=this.rotationShape.node&&(this.rotationShape.node.style.display=1==this.graph.getSelectionCount()?"":
+"none")};var E=mxVertexHandler.prototype.init;mxVertexHandler.prototype.init=function(){E.apply(this,arguments);var a=!1;null!=this.rotationShape&&this.rotationShape.node.setAttribute("title",mxResources.get("rotateTooltip"));var c=mxUtils.bind(this,function(){null!=this.rotationShape&&null!=this.rotationShape.node&&(this.rotationShape.node.style.display=1==this.graph.getSelectionCount()?"":"none");null!=this.specialHandle&&(this.specialHandle.node.style.display=this.graph.isEnabled()&&this.graph.getSelectionCount()<
 this.graph.graphHandler.maxCells?"":"none");this.redrawHandles()});this.selectionHandler=mxUtils.bind(this,function(a,b){c()});this.graph.getSelectionModel().addListener(mxEvent.CHANGE,this.selectionHandler);this.changeHandler=mxUtils.bind(this,function(a,b){this.updateLinkHint(this.graph.getLinkForCell(this.state.cell),this.graph.getLinksForState(this.state));c()});this.graph.getModel().addListener(mxEvent.CHANGE,this.changeHandler);this.editingHandler=mxUtils.bind(this,function(a,c){this.redrawHandles()});
-this.graph.addListener(mxEvent.EDITING_STOPPED,this.editingHandler);var b=this.graph.getLinkForCell(this.state.cell),f=this.graph.getLinksForState(this.state);this.updateLinkHint(b,f);if(null!=b||null!=f&&0<f.length)a=!0;a&&this.redrawHandles()};mxVertexHandler.prototype.updateLinkHint=function(c,b){if(null==c&&(null==b||0==b.length)||1<this.graph.getSelectionCount())null!=this.linkHint&&(this.linkHint.parentNode.removeChild(this.linkHint),this.linkHint=null);else if(null!=c||null!=b&&0<b.length){null==
-this.linkHint&&(this.linkHint=a(),this.linkHint.style.padding="6px 8px 6px 8px",this.linkHint.style.fontSize="90%",this.linkHint.style.opacity="1",this.linkHint.style.filter="",this.graph.container.appendChild(this.linkHint));this.linkHint.innerHTML="";if(null!=c&&(this.linkHint.appendChild(this.graph.createLinkForHint(c)),this.graph.isEnabled()&&"function"===typeof this.graph.editLink)){var f=document.createElement("img");f.setAttribute("src",IMAGE_PATH+"/edit.gif");f.setAttribute("title",mxResources.get("editLink"));
-f.setAttribute("width","11");f.setAttribute("height","11");f.style.marginLeft="10px";f.style.marginBottom="-1px";f.style.cursor="pointer";this.linkHint.appendChild(f);mxEvent.addListener(f,"click",mxUtils.bind(this,function(a){this.graph.setSelectionCell(this.state.cell);this.graph.editLink();mxEvent.consume(a)}))}if(null!=b)for(f=0;f<b.length;f++){var d=document.createElement("div");d.style.marginTop=null!=c||0<f?"6px":"0px";d.appendChild(this.graph.createLinkForHint(b[f].getAttribute("href"),mxUtils.getTextContent(b[f])));
-this.linkHint.appendChild(d)}}};mxEdgeHandler.prototype.updateLinkHint=mxVertexHandler.prototype.updateLinkHint;var z=mxEdgeHandler.prototype.init;mxEdgeHandler.prototype.init=function(){z.apply(this,arguments);this.constraintHandler.isEnabled=mxUtils.bind(this,function(){return this.state.view.graph.connectionHandler.isEnabled()});var a=mxUtils.bind(this,function(){null!=this.linkHint&&(this.linkHint.style.display=1==this.graph.getSelectionCount()?"":"none");null!=this.labelShape&&(this.labelShape.node.style.display=
+this.graph.addListener(mxEvent.EDITING_STOPPED,this.editingHandler);var b=this.graph.getLinkForCell(this.state.cell),d=this.graph.getLinksForState(this.state);this.updateLinkHint(b,d);if(null!=b||null!=d&&0<d.length)a=!0;a&&this.redrawHandles()};mxVertexHandler.prototype.updateLinkHint=function(c,b){if(null==c&&(null==b||0==b.length)||1<this.graph.getSelectionCount())null!=this.linkHint&&(this.linkHint.parentNode.removeChild(this.linkHint),this.linkHint=null);else if(null!=c||null!=b&&0<b.length){null==
+this.linkHint&&(this.linkHint=a(),this.linkHint.style.padding="6px 8px 6px 8px",this.linkHint.style.fontSize="90%",this.linkHint.style.opacity="1",this.linkHint.style.filter="",this.graph.container.appendChild(this.linkHint));this.linkHint.innerHTML="";if(null!=c&&(this.linkHint.appendChild(this.graph.createLinkForHint(c)),this.graph.isEnabled()&&"function"===typeof this.graph.editLink)){var d=document.createElement("img");d.setAttribute("src",IMAGE_PATH+"/edit.gif");d.setAttribute("title",mxResources.get("editLink"));
+d.setAttribute("width","11");d.setAttribute("height","11");d.style.marginLeft="10px";d.style.marginBottom="-1px";d.style.cursor="pointer";this.linkHint.appendChild(d);mxEvent.addListener(d,"click",mxUtils.bind(this,function(a){this.graph.setSelectionCell(this.state.cell);this.graph.editLink();mxEvent.consume(a)}))}if(null!=b)for(d=0;d<b.length;d++){var f=document.createElement("div");f.style.marginTop=null!=c||0<d?"6px":"0px";f.appendChild(this.graph.createLinkForHint(b[d].getAttribute("href"),mxUtils.getTextContent(b[d])));
+this.linkHint.appendChild(f)}}};mxEdgeHandler.prototype.updateLinkHint=mxVertexHandler.prototype.updateLinkHint;var y=mxEdgeHandler.prototype.init;mxEdgeHandler.prototype.init=function(){y.apply(this,arguments);this.constraintHandler.isEnabled=mxUtils.bind(this,function(){return this.state.view.graph.connectionHandler.isEnabled()});var a=mxUtils.bind(this,function(){null!=this.linkHint&&(this.linkHint.style.display=1==this.graph.getSelectionCount()?"":"none");null!=this.labelShape&&(this.labelShape.node.style.display=
 this.graph.isEnabled()&&this.graph.getSelectionCount()<this.graph.graphHandler.maxCells?"":"none")});this.selectionHandler=mxUtils.bind(this,function(c,b){a()});this.graph.getSelectionModel().addListener(mxEvent.CHANGE,this.selectionHandler);this.changeHandler=mxUtils.bind(this,function(c,b){this.updateLinkHint(this.graph.getLinkForCell(this.state.cell),this.graph.getLinksForState(this.state));a();this.redrawHandles()});this.graph.getModel().addListener(mxEvent.CHANGE,this.changeHandler);var c=this.graph.getLinkForCell(this.state.cell),
-b=this.graph.getLinksForState(this.state);if(null!=c||null!=b&&0<b.length)this.updateLinkHint(c,b),this.redrawHandles()};var J=mxConnectionHandler.prototype.init;mxConnectionHandler.prototype.init=function(){J.apply(this,arguments);this.constraintHandler.isEnabled=mxUtils.bind(this,function(){return this.graph.connectionHandler.isEnabled()})};var I=mxVertexHandler.prototype.redrawHandles;mxVertexHandler.prototype.redrawHandles=function(){I.apply(this);if(null!=this.state&&null!=this.linkHint){var a=
+b=this.graph.getLinksForState(this.state);if(null!=c||null!=b&&0<b.length)this.updateLinkHint(c,b),this.redrawHandles()};var O=mxConnectionHandler.prototype.init;mxConnectionHandler.prototype.init=function(){O.apply(this,arguments);this.constraintHandler.isEnabled=mxUtils.bind(this,function(){return this.graph.connectionHandler.isEnabled()})};var J=mxVertexHandler.prototype.redrawHandles;mxVertexHandler.prototype.redrawHandles=function(){J.apply(this);if(null!=this.state&&null!=this.linkHint){var a=
 new mxPoint(this.state.getCenterX(),this.state.getCenterY()),c=new mxRectangle(this.state.x,this.state.y-22,this.state.width+24,this.state.height+22),b=mxUtils.getBoundingBox(c,this.state.style[mxConstants.STYLE_ROTATION]||"0",a),a=null!=b?mxUtils.getBoundingBox(this.state,this.state.style[mxConstants.STYLE_ROTATION]||"0"):this.state,c=null!=this.state.text?this.state.text.boundingBox:null;null==b&&(b=this.state);b=b.y+b.height;null!=c&&(b=Math.max(b,c.y+c.height));this.linkHint.style.left=Math.round(a.x+
-(a.width-this.linkHint.clientWidth)/2)+"px";this.linkHint.style.top=Math.round(b+this.verticalOffset/2+6+this.state.view.graph.tolerance)+"px"}};var H=mxVertexHandler.prototype.reset;mxVertexHandler.prototype.reset=function(){H.apply(this,arguments);null!=this.rotationShape&&null!=this.rotationShape.node&&(this.rotationShape.node.style.display=1==this.graph.getSelectionCount()?"":"none")};var T=mxVertexHandler.prototype.destroy;mxVertexHandler.prototype.destroy=function(){T.apply(this,arguments);
-null!=this.linkHint&&(this.linkHint.parentNode.removeChild(this.linkHint),this.linkHint=null);null!=this.selectionHandler&&(this.graph.getSelectionModel().removeListener(this.selectionHandler),this.selectionHandler=null);null!=this.changeHandler&&(this.graph.getModel().removeListener(this.changeHandler),this.changeHandler=null);null!=this.editingHandler&&(this.graph.removeListener(this.editingHandler),this.editingHandler=null)};var N=mxEdgeHandler.prototype.redrawHandles;mxEdgeHandler.prototype.redrawHandles=
-function(){if(null!=this.marker&&(N.apply(this),null!=this.state&&null!=this.linkHint)){var a=this.state;null!=this.state.text&&null!=this.state.text.bounds&&(a=new mxRectangle(a.x,a.y,a.width,a.height),a.add(this.state.text.bounds));this.linkHint.style.left=Math.round(a.x+(a.width-this.linkHint.clientWidth)/2)+"px";this.linkHint.style.top=Math.round(a.y+a.height+6+this.state.view.graph.tolerance)+"px"}};var K=mxEdgeHandler.prototype.reset;mxEdgeHandler.prototype.reset=function(){K.apply(this,arguments);
-null!=this.linkHint&&(this.linkHint.style.visibility="")};var U=mxEdgeHandler.prototype.destroy;mxEdgeHandler.prototype.destroy=function(){U.apply(this,arguments);null!=this.linkHint&&(this.linkHint.parentNode.removeChild(this.linkHint),this.linkHint=null);null!=this.selectionHandler&&(this.graph.getSelectionModel().removeListener(this.selectionHandler),this.selectionHandler=null);null!=this.changeHandler&&(this.graph.getModel().removeListener(this.changeHandler),this.changeHandler=null)}}();(function(){function a(){mxCylinder.call(this)}function b(){mxActor.call(this)}function e(){mxCylinder.call(this)}function d(){mxCylinder.call(this)}function g(){mxCylinder.call(this)}function l(){mxActor.call(this)}function p(){mxCylinder.call(this)}function q(){mxActor.call(this)}function c(){mxActor.call(this)}function f(){mxActor.call(this)}function h(){mxActor.call(this)}function m(){mxActor.call(this)}function n(){mxActor.call(this)}function u(){mxActor.call(this)}function r(a,c){this.canvas=
+(a.width-this.linkHint.clientWidth)/2)+"px";this.linkHint.style.top=Math.round(b+this.verticalOffset/2+6+this.state.view.graph.tolerance)+"px"}};var F=mxVertexHandler.prototype.reset;mxVertexHandler.prototype.reset=function(){F.apply(this,arguments);null!=this.rotationShape&&null!=this.rotationShape.node&&(this.rotationShape.node.style.display=1==this.graph.getSelectionCount()?"":"none")};var R=mxVertexHandler.prototype.destroy;mxVertexHandler.prototype.destroy=function(){R.apply(this,arguments);
+null!=this.linkHint&&(this.linkHint.parentNode.removeChild(this.linkHint),this.linkHint=null);null!=this.selectionHandler&&(this.graph.getSelectionModel().removeListener(this.selectionHandler),this.selectionHandler=null);null!=this.changeHandler&&(this.graph.getModel().removeListener(this.changeHandler),this.changeHandler=null);null!=this.editingHandler&&(this.graph.removeListener(this.editingHandler),this.editingHandler=null)};var P=mxEdgeHandler.prototype.redrawHandles;mxEdgeHandler.prototype.redrawHandles=
+function(){if(null!=this.marker&&(P.apply(this),null!=this.state&&null!=this.linkHint)){var a=this.state;null!=this.state.text&&null!=this.state.text.bounds&&(a=new mxRectangle(a.x,a.y,a.width,a.height),a.add(this.state.text.bounds));this.linkHint.style.left=Math.round(a.x+(a.width-this.linkHint.clientWidth)/2)+"px";this.linkHint.style.top=Math.round(a.y+a.height+6+this.state.view.graph.tolerance)+"px"}};var I=mxEdgeHandler.prototype.reset;mxEdgeHandler.prototype.reset=function(){I.apply(this,arguments);
+null!=this.linkHint&&(this.linkHint.style.visibility="")};var S=mxEdgeHandler.prototype.destroy;mxEdgeHandler.prototype.destroy=function(){S.apply(this,arguments);null!=this.linkHint&&(this.linkHint.parentNode.removeChild(this.linkHint),this.linkHint=null);null!=this.selectionHandler&&(this.graph.getSelectionModel().removeListener(this.selectionHandler),this.selectionHandler=null);null!=this.changeHandler&&(this.graph.getModel().removeListener(this.changeHandler),this.changeHandler=null)}}();(function(){function a(){mxCylinder.call(this)}function b(){mxActor.call(this)}function e(){mxCylinder.call(this)}function d(){mxCylinder.call(this)}function h(){mxCylinder.call(this)}function l(){mxActor.call(this)}function n(){mxCylinder.call(this)}function q(){mxActor.call(this)}function c(){mxActor.call(this)}function f(){mxActor.call(this)}function g(){mxActor.call(this)}function p(){mxActor.call(this)}function m(){mxActor.call(this)}function u(){mxActor.call(this)}function r(a,c){this.canvas=
 a;this.canvas.setLineJoin("round");this.canvas.setLineCap("round");this.defaultVariation=c;this.originalLineTo=this.canvas.lineTo;this.canvas.lineTo=mxUtils.bind(this,r.prototype.lineTo);this.originalMoveTo=this.canvas.moveTo;this.canvas.moveTo=mxUtils.bind(this,r.prototype.moveTo);this.originalClose=this.canvas.close;this.canvas.close=mxUtils.bind(this,r.prototype.close);this.originalQuadTo=this.canvas.quadTo;this.canvas.quadTo=mxUtils.bind(this,r.prototype.quadTo);this.originalCurveTo=this.canvas.curveTo;
-this.canvas.curveTo=mxUtils.bind(this,r.prototype.curveTo);this.originalArcTo=this.canvas.arcTo;this.canvas.arcTo=mxUtils.bind(this,r.prototype.arcTo)}function k(){mxRectangleShape.call(this)}function t(){mxActor.call(this)}function v(){mxActor.call(this)}function x(){mxActor.call(this)}function w(){mxRectangleShape.call(this)}function D(){mxRectangleShape.call(this)}function B(){mxCylinder.call(this)}function y(){mxShape.call(this)}function C(){mxShape.call(this)}function A(){mxEllipse.call(this)}
-function F(){mxShape.call(this)}function z(){mxShape.call(this)}function J(){mxRectangleShape.call(this)}function I(){mxShape.call(this)}function H(){mxShape.call(this)}function T(){mxShape.call(this)}function N(){mxCylinder.call(this)}function K(){mxDoubleEllipse.call(this)}function U(){mxDoubleEllipse.call(this)}function G(){mxArrowConnector.call(this);this.spacing=0}function L(){mxArrowConnector.call(this);this.spacing=0}function Q(){mxActor.call(this)}function E(){mxRectangleShape.call(this)}
-function V(){mxActor.call(this)}function O(){mxActor.call(this)}function W(){mxActor.call(this)}function R(){mxActor.call(this)}function P(){mxActor.call(this)}function S(){mxActor.call(this)}function Y(){mxActor.call(this)}function X(){mxActor.call(this)}function Z(){mxActor.call(this)}function aa(){mxActor.call(this)}function ia(){mxEllipse.call(this)}function ba(){mxEllipse.call(this)}function ma(){mxEllipse.call(this)}function ca(){mxRhombus.call(this)}function ja(){mxEllipse.call(this)}function da(){mxEllipse.call(this)}
-function qa(){mxEllipse.call(this)}function na(){mxEllipse.call(this)}function ta(){mxActor.call(this)}function oa(){mxActor.call(this)}function pa(){mxActor.call(this)}function ka(){mxConnector.call(this)}function Aa(a,c,b,f,d,e,h,k,m,n){h+=m;var fa=f.clone();f.x-=d*(2*h+m);f.y-=e*(2*h+m);d*=h+m;e*=h+m;return function(){a.ellipse(fa.x-d-h,fa.y-e-h,2*h,2*h);n?a.fillAndStroke():a.stroke()}}mxUtils.extend(a,mxCylinder);a.prototype.size=20;a.prototype.redrawPath=function(a,c,b,f,d,e){c=Math.max(0,Math.min(f,
-Math.min(d,parseFloat(mxUtils.getValue(this.style,"size",this.size)))));e?(a.moveTo(c,d),a.lineTo(c,c),a.lineTo(0,0),a.moveTo(c,c),a.lineTo(f,c)):(a.moveTo(0,0),a.lineTo(f-c,0),a.lineTo(f,c),a.lineTo(f,d),a.lineTo(c,d),a.lineTo(0,d-c),a.lineTo(0,0),a.close());a.end()};a.prototype.getLabelMargins=function(a){return mxUtils.getValue(this.style,"boundedLbl",!1)?(a=parseFloat(mxUtils.getValue(this.style,"size",this.size))*this.scale,new mxRectangle(a,a,0,0)):null};mxCellRenderer.prototype.defaultShapes.cube=
-a;var xa=Math.tan(mxUtils.toRadians(30)),la=(.5-xa)/2;mxUtils.extend(b,mxActor);b.prototype.size=20;b.prototype.redrawPath=function(a,c,b,f,d){c=Math.min(f,d/xa);a.translate((f-c)/2,(d-c)/2+c/4);a.moveTo(0,.25*c);a.lineTo(.5*c,c*la);a.lineTo(c,.25*c);a.lineTo(.5*c,(.5-la)*c);a.lineTo(0,.25*c);a.close();a.end()};mxCellRenderer.prototype.defaultShapes.isoRectangle=b;mxUtils.extend(e,mxCylinder);e.prototype.size=20;e.prototype.redrawPath=function(a,c,b,f,d,e){c=Math.min(f,d/(.5+xa));e?(a.moveTo(0,.25*
-c),a.lineTo(.5*c,(.5-la)*c),a.lineTo(c,.25*c),a.moveTo(.5*c,(.5-la)*c),a.lineTo(.5*c,(1-la)*c)):(a.translate((f-c)/2,(d-c)/2),a.moveTo(0,.25*c),a.lineTo(.5*c,c*la),a.lineTo(c,.25*c),a.lineTo(c,.75*c),a.lineTo(.5*c,(1-la)*c),a.lineTo(0,.75*c),a.close());a.end()};mxCellRenderer.prototype.defaultShapes.isoCube=e;mxUtils.extend(d,mxCylinder);d.prototype.redrawPath=function(a,c,b,f,d,e){c=Math.min(d/2,Math.round(d/8)+this.strokewidth-1);if(e&&null!=this.fill||!e&&null==this.fill)a.moveTo(0,c),a.curveTo(0,
-2*c,f,2*c,f,c),e||(a.stroke(),a.begin()),a.translate(0,c/2),a.moveTo(0,c),a.curveTo(0,2*c,f,2*c,f,c),e||(a.stroke(),a.begin()),a.translate(0,c/2),a.moveTo(0,c),a.curveTo(0,2*c,f,2*c,f,c),e||(a.stroke(),a.begin()),a.translate(0,-c);e||(a.moveTo(0,c),a.curveTo(0,-c/3,f,-c/3,f,c),a.lineTo(f,d-c),a.curveTo(f,d+c/3,0,d+c/3,0,d-c),a.close())};d.prototype.getLabelMargins=function(a){return new mxRectangle(0,2.5*Math.min(a.height/2,Math.round(a.height/8)+this.strokewidth-1)*this.scale,0,0)};mxCellRenderer.prototype.defaultShapes.datastore=
-d;mxUtils.extend(g,mxCylinder);g.prototype.size=30;g.prototype.redrawPath=function(a,c,b,f,d,e){c=Math.max(0,Math.min(f,Math.min(d,parseFloat(mxUtils.getValue(this.style,"size",this.size)))));e?(a.moveTo(f-c,0),a.lineTo(f-c,c),a.lineTo(f,c)):(a.moveTo(0,0),a.lineTo(f-c,0),a.lineTo(f,c),a.lineTo(f,d),a.lineTo(0,d),a.lineTo(0,0),a.close());a.end()};mxCellRenderer.prototype.defaultShapes.note=g;mxUtils.extend(l,mxActor);l.prototype.redrawPath=function(a,c,b,f,d){a.moveTo(0,0);a.quadTo(f/2,.5*d,f,0);
-a.quadTo(.5*f,d/2,f,d);a.quadTo(f/2,.5*d,0,d);a.quadTo(.5*f,d/2,0,0);a.end()};mxCellRenderer.prototype.defaultShapes["switch"]=l;mxUtils.extend(p,mxCylinder);p.prototype.tabWidth=60;p.prototype.tabHeight=20;p.prototype.tabPosition="right";p.prototype.redrawPath=function(a,c,b,f,d,e){c=Math.max(0,Math.min(f,parseFloat(mxUtils.getValue(this.style,"tabWidth",this.tabWidth))));b=Math.max(0,Math.min(d,parseFloat(mxUtils.getValue(this.style,"tabHeight",this.tabHeight))));var h=mxUtils.getValue(this.style,
-"tabPosition",this.tabPosition);e?"left"==h?(a.moveTo(0,b),a.lineTo(c,b)):(a.moveTo(f-c,b),a.lineTo(f,b)):("left"==h?(a.moveTo(0,0),a.lineTo(c,0),a.lineTo(c,b),a.lineTo(f,b)):(a.moveTo(0,b),a.lineTo(f-c,b),a.lineTo(f-c,0),a.lineTo(f,0)),a.lineTo(f,d),a.lineTo(0,d),a.lineTo(0,b),a.close());a.end()};mxCellRenderer.prototype.defaultShapes.folder=p;mxUtils.extend(q,mxActor);q.prototype.size=30;q.prototype.redrawPath=function(a,c,b,f,d){c=Math.max(0,Math.min(f,Math.min(d,parseFloat(mxUtils.getValue(this.style,
-"size",this.size)))));b=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(a,[new mxPoint(c,0),new mxPoint(f,0),new mxPoint(f,d),new mxPoint(0,d),new mxPoint(0,c)],this.isRounded,b,!0);a.end()};mxCellRenderer.prototype.defaultShapes.card=q;mxUtils.extend(c,mxActor);c.prototype.size=.4;c.prototype.redrawPath=function(a,c,b,f,d){c=d*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));a.moveTo(0,c/2);a.quadTo(f/4,1.4*c,f/2,c/
-2);a.quadTo(3*f/4,c*(1-1.4),f,c/2);a.lineTo(f,d-c/2);a.quadTo(3*f/4,d-1.4*c,f/2,d-c/2);a.quadTo(f/4,d-c*(1-1.4),0,d-c/2);a.lineTo(0,c/2);a.close();a.end()};c.prototype.getLabelBounds=function(a){if(mxUtils.getValue(this.style,"boundedLbl",!1)){var c=mxUtils.getValue(this.style,"size",this.size),b=a.width,f=a.height;if(null==this.direction||this.direction==mxConstants.DIRECTION_EAST||this.direction==mxConstants.DIRECTION_WEST)return c*=f,new mxRectangle(a.x,a.y+c,b,f-2*c);c*=b;return new mxRectangle(a.x+
-c,a.y,b-2*c,f)}return a};mxCellRenderer.prototype.defaultShapes.tape=c;mxUtils.extend(f,mxActor);f.prototype.size=.3;f.prototype.getLabelMargins=function(a){return mxUtils.getValue(this.style,"boundedLbl",!1)?new mxRectangle(0,0,0,parseFloat(mxUtils.getValue(this.style,"size",this.size))*a.height):null};f.prototype.redrawPath=function(a,c,b,f,d){c=d*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));a.moveTo(0,0);a.lineTo(f,0);a.lineTo(f,d-c/2);a.quadTo(3*f/4,d-1.4*
-c,f/2,d-c/2);a.quadTo(f/4,d-c*(1-1.4),0,d-c/2);a.lineTo(0,c/2);a.close();a.end()};mxCellRenderer.prototype.defaultShapes.document=f;mxCylinder.prototype.getLabelMargins=function(a){return mxUtils.getValue(this.style,"boundedLbl",!1)?new mxRectangle(0,Math.min(this.maxHeight*this.scale,.3*a.height),0,0):null};mxUtils.extend(h,mxActor);h.prototype.size=.2;h.prototype.redrawPath=function(a,c,b,f,d){c=f*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));b=mxUtils.getValue(this.style,
-mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(a,[new mxPoint(0,d),new mxPoint(c,0),new mxPoint(f,0),new mxPoint(f-c,d)],this.isRounded,b,!0);a.end()};mxCellRenderer.prototype.defaultShapes.parallelogram=h;mxUtils.extend(m,mxActor);m.prototype.size=.2;m.prototype.redrawPath=function(a,c,b,f,d){c=f*Math.max(0,Math.min(.5,parseFloat(mxUtils.getValue(this.style,"size",this.size))));b=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(a,
-[new mxPoint(0,d),new mxPoint(c,0),new mxPoint(f-c,0),new mxPoint(f,d)],this.isRounded,b,!0)};mxCellRenderer.prototype.defaultShapes.trapezoid=m;mxUtils.extend(n,mxActor);n.prototype.size=.5;n.prototype.redrawPath=function(a,c,b,f,d){a.setFillColor(null);c=f*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));b=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(a,[new mxPoint(f,0),new mxPoint(c,0),new mxPoint(c,d/2),new mxPoint(0,
-d/2),new mxPoint(c,d/2),new mxPoint(c,d),new mxPoint(f,d)],this.isRounded,b,!1);a.end()};mxCellRenderer.prototype.defaultShapes.curlyBracket=n;mxUtils.extend(u,mxActor);u.prototype.redrawPath=function(a,c,b,f,d){a.setStrokeWidth(1);a.setFillColor(this.stroke);c=f/5;a.rect(0,0,c,d);a.fillAndStroke();a.rect(2*c,0,c,d);a.fillAndStroke();a.rect(4*c,0,c,d);a.fillAndStroke()};mxCellRenderer.prototype.defaultShapes.parallelMarker=u;r.prototype.moveTo=function(a,c){this.originalMoveTo.apply(this.canvas,arguments);
-this.lastX=a;this.lastY=c;this.firstX=a;this.firstY=c};r.prototype.close=function(){null!=this.firstX&&null!=this.firstY&&(this.lineTo(this.firstX,this.firstY),this.originalClose.apply(this.canvas,arguments));this.originalClose.apply(this.canvas,arguments)};r.prototype.quadTo=function(a,c,b,f){this.originalQuadTo.apply(this.canvas,arguments);this.lastX=b;this.lastY=f};r.prototype.curveTo=function(a,c,b,f,d,e){this.originalCurveTo.apply(this.canvas,arguments);this.lastX=d;this.lastY=e};r.prototype.arcTo=
-function(a,c,b,f,d,e,h){this.originalArcTo.apply(this.canvas,arguments);this.lastX=e;this.lastY=h};r.prototype.lineTo=function(a,c){if(null!=this.lastX&&null!=this.lastY){var b=function(a){return"number"===typeof a?a?0>a?-1:1:a===a?0:NaN:NaN},f=Math.abs(a-this.lastX),d=Math.abs(c-this.lastY),e=Math.sqrt(f*f+d*d);if(2>e){this.originalLineTo.apply(this.canvas,arguments);this.lastX=a;this.lastY=c;return}var h=Math.round(e/10),k=this.defaultVariation;5>h&&(h=5,k/=3);for(var fa=b(a-this.lastX)*f/h,b=b(c-
-this.lastY)*d/h,f=f/e,d=d/e,e=0;e<h;e++){var m=(Math.random()-.5)*k;this.originalLineTo.call(this.canvas,fa*e+this.lastX-m*d,b*e+this.lastY-m*f)}this.originalLineTo.call(this.canvas,a,c)}else this.originalLineTo.apply(this.canvas,arguments);this.lastX=a;this.lastY=c};r.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};var Ea=mxShape.prototype.paint;mxShape.prototype.defaultJiggle=1.5;mxShape.prototype.paint=function(a){null!=this.style&&"0"!=mxUtils.getValue(this.style,"comic","0")&&null==a.handHiggle&&(a.handJiggle=new r(a,mxUtils.getValue(this.style,"jiggle",this.defaultJiggle)));Ea.apply(this,arguments);null!=a.handJiggle&&(a.handJiggle.destroy(),delete a.handJiggle)};mxRhombus.prototype.defaultJiggle=2;var Fa=mxRectangleShape.prototype.isHtmlAllowed;mxRectangleShape.prototype.isHtmlAllowed=
-function(){return(null==this.style||"0"==mxUtils.getValue(this.style,"comic","0"))&&Fa.apply(this,arguments)};var Ga=mxRectangleShape.prototype.paintBackground;mxRectangleShape.prototype.paintBackground=function(a,c,b,f,d){if(null==a.handJiggle)Ga.apply(this,arguments);else{var e=!0;null!=this.style&&(e="1"==mxUtils.getValue(this.style,mxConstants.STYLE_POINTER_EVENTS,"1"));if(e||null!=this.fill&&this.fill!=mxConstants.NONE||null!=this.stroke&&this.stroke!=mxConstants.NONE)e||null!=this.fill&&this.fill!=
-mxConstants.NONE||(a.pointerEvents=!1),a.begin(),this.isRounded?("1"==mxUtils.getValue(this.style,mxConstants.STYLE_ABSOLUTE_ARCSIZE,0)?e=Math.min(f/2,Math.min(d/2,mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2)):(e=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,100*mxConstants.RECTANGLE_ROUNDING_FACTOR)/100,e=Math.min(f*e,d*e)),a.moveTo(c+e,b),a.lineTo(c+f-e,b),a.quadTo(c+f,b,c+f,b+e),a.lineTo(c+f,b+d-e),a.quadTo(c+f,b+d,c+f-e,b+d),a.lineTo(c+e,b+d),a.quadTo(c,
-b+d,c,b+d-e),a.lineTo(c,b+e),a.quadTo(c,b,c+e,b)):(a.moveTo(c,b),a.lineTo(c+f,b),a.lineTo(c+f,b+d),a.lineTo(c,b+d),a.lineTo(c,b)),a.close(),a.end(),a.fillAndStroke()}};var Ha=mxRectangleShape.prototype.paintForeground;mxRectangleShape.prototype.paintForeground=function(a,c,b,f,d){null==a.handJiggle&&Ha.apply(this,arguments)};mxUtils.extend(k,mxRectangleShape);k.prototype.size=.1;k.prototype.isHtmlAllowed=function(){return!1};k.prototype.getLabelBounds=function(a){if(mxUtils.getValue(this.state.style,
-mxConstants.STYLE_HORIZONTAL,!0)==(null==this.direction||this.direction==mxConstants.DIRECTION_EAST||this.direction==mxConstants.DIRECTION_WEST)){var c=a.width,b=a.height;a=new mxRectangle(a.x,a.y,c,b);var f=c*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));if(this.isRounded)var d=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,100*mxConstants.RECTANGLE_ROUNDING_FACTOR)/100,f=Math.max(f,Math.min(c*d,b*d));a.x+=f;a.width-=2*f}return a};k.prototype.paintForeground=
-function(a,c,b,f,d){var e=f*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));if(this.isRounded)var h=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,100*mxConstants.RECTANGLE_ROUNDING_FACTOR)/100,e=Math.max(e,Math.min(f*h,d*h));a.begin();a.moveTo(c+e,b);a.lineTo(c+e,b+d);a.moveTo(c+f-e,b);a.lineTo(c+f-e,b+d);a.end();a.stroke();mxRectangleShape.prototype.paintForeground.apply(this,arguments)};mxCellRenderer.prototype.defaultShapes.process=k;mxUtils.extend(t,mxHexagon);
-t.prototype.size=30;t.prototype.position=.5;t.prototype.position2=.5;t.prototype.base=20;t.prototype.getLabelMargins=function(){return new mxRectangle(0,0,0,parseFloat(mxUtils.getValue(this.style,"size",this.size))*this.scale)};t.prototype.redrawPath=function(a,c,b,f,d){c=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;b=Math.max(0,Math.min(d,parseFloat(mxUtils.getValue(this.style,"size",this.size))));var e=f*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,
-"position",this.position)))),h=f*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"position2",this.position2)))),k=Math.max(0,Math.min(f,parseFloat(mxUtils.getValue(this.style,"base",this.base))));this.addPoints(a,[new mxPoint(0,0),new mxPoint(f,0),new mxPoint(f,d-b),new mxPoint(Math.min(f,e+k),d-b),new mxPoint(h,d),new mxPoint(Math.max(0,e),d-b),new mxPoint(0,d-b)],this.isRounded,c,!0,[4])};mxCellRenderer.prototype.defaultShapes.callout=t;mxUtils.extend(v,mxActor);v.prototype.size=.2;
-v.prototype.redrawPath=function(a,c,b,f,d){c=f*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));b=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(a,[new mxPoint(0,0),new mxPoint(f-c,0),new mxPoint(f,d/2),new mxPoint(f-c,d),new mxPoint(0,d),new mxPoint(c,d/2)],this.isRounded,b,!0);a.end()};mxCellRenderer.prototype.defaultShapes.step=v;mxUtils.extend(x,mxHexagon);x.prototype.size=.25;x.prototype.redrawPath=function(a,
-c,b,f,d){c=f*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));b=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(a,[new mxPoint(c,0),new mxPoint(f-c,0),new mxPoint(f,.5*d),new mxPoint(f-c,d),new mxPoint(c,d),new mxPoint(0,.5*d)],this.isRounded,b,!0)};mxCellRenderer.prototype.defaultShapes.hexagon=x;mxUtils.extend(w,mxRectangleShape);w.prototype.isHtmlAllowed=function(){return!1};w.prototype.paintForeground=function(a,
-c,b,f,d){var e=Math.min(f/5,d/5)+1;a.begin();a.moveTo(c+f/2,b+e);a.lineTo(c+f/2,b+d-e);a.moveTo(c+e,b+d/2);a.lineTo(c+f-e,b+d/2);a.end();a.stroke();mxRectangleShape.prototype.paintForeground.apply(this,arguments)};mxCellRenderer.prototype.defaultShapes.plus=w;var Ba=mxRhombus.prototype.paintVertexShape;mxRhombus.prototype.getLabelBounds=function(a){if(1==this.style["double"]){var c=(2*Math.max(2,this.strokewidth+1)+parseFloat(this.style[mxConstants.STYLE_MARGIN]||0))*this.scale;return new mxRectangle(a.x+
-c,a.y+c,a.width-2*c,a.height-2*c)}return a};mxRhombus.prototype.paintVertexShape=function(a,c,b,f,d){Ba.apply(this,arguments);if(!this.outline&&1==this.style["double"]){var e=2*Math.max(2,this.strokewidth+1)+parseFloat(this.style[mxConstants.STYLE_MARGIN]||0);c+=e;b+=e;f-=2*e;d-=2*e;0<f&&0<d&&(a.setShadow(!1),Ba.apply(this,[a,c,b,f,d]))}};mxUtils.extend(D,mxRectangleShape);D.prototype.isHtmlAllowed=function(){return!1};D.prototype.getLabelBounds=function(a){if(1==this.style["double"]){var c=(Math.max(2,
-this.strokewidth+1)+parseFloat(this.style[mxConstants.STYLE_MARGIN]||0))*this.scale;return new mxRectangle(a.x+c,a.y+c,a.width-2*c,a.height-2*c)}return a};D.prototype.paintForeground=function(a,c,b,f,d){if(null!=this.style){if(!this.outline&&1==this.style["double"]){var e=Math.max(2,this.strokewidth+1)+parseFloat(this.style[mxConstants.STYLE_MARGIN]||0);c+=e;b+=e;f-=2*e;d-=2*e;0<f&&0<d&&mxRectangleShape.prototype.paintBackground.apply(this,arguments)}a.setDashed(!1);var e=0,h;do{h=mxCellRenderer.prototype.defaultShapes[this.style["symbol"+
-e]];if(null!=h){var k=this.style["symbol"+e+"Align"],m=this.style["symbol"+e+"VerticalAlign"],fa=this.style["symbol"+e+"Width"],n=this.style["symbol"+e+"Height"],t=this.style["symbol"+e+"Spacing"]||0,r=this.style["symbol"+e+"VSpacing"]||t,v=this.style["symbol"+e+"ArcSpacing"];null!=v&&(v*=this.getArcSize(f+this.strokewidth,d+this.strokewidth),t+=v,r+=v);var v=c,g=b,v=k==mxConstants.ALIGN_CENTER?v+(f-fa)/2:k==mxConstants.ALIGN_RIGHT?v+(f-fa-t):v+t,g=m==mxConstants.ALIGN_MIDDLE?g+(d-n)/2:m==mxConstants.ALIGN_BOTTOM?
-g+(d-n-r):g+r;a.save();k=new h;k.style=this.style;h.prototype.paintVertexShape.call(k,a,v,g,fa,n);a.restore()}e++}while(null!=h)}mxRectangleShape.prototype.paintForeground.apply(this,arguments)};mxCellRenderer.prototype.defaultShapes.ext=D;mxUtils.extend(B,mxCylinder);B.prototype.redrawPath=function(a,c,b,f,d,e){e?(a.moveTo(0,0),a.lineTo(f/2,d/2),a.lineTo(f,0),a.end()):(a.moveTo(0,0),a.lineTo(f,0),a.lineTo(f,d),a.lineTo(0,d),a.close())};mxCellRenderer.prototype.defaultShapes.message=B;mxUtils.extend(y,
-mxShape);y.prototype.paintBackground=function(a,c,b,f,d){a.translate(c,b);a.ellipse(f/4,0,f/2,d/4);a.fillAndStroke();a.begin();a.moveTo(f/2,d/4);a.lineTo(f/2,2*d/3);a.moveTo(f/2,d/3);a.lineTo(0,d/3);a.moveTo(f/2,d/3);a.lineTo(f,d/3);a.moveTo(f/2,2*d/3);a.lineTo(0,d);a.moveTo(f/2,2*d/3);a.lineTo(f,d);a.end();a.stroke()};mxCellRenderer.prototype.defaultShapes.umlActor=y;mxUtils.extend(C,mxShape);C.prototype.getLabelMargins=function(a){return new mxRectangle(a.width/6,0,0,0)};C.prototype.paintBackground=
-function(a,c,b,f,d){a.translate(c,b);a.begin();a.moveTo(0,d/4);a.lineTo(0,3*d/4);a.end();a.stroke();a.begin();a.moveTo(0,d/2);a.lineTo(f/6,d/2);a.end();a.stroke();a.ellipse(f/6,0,5*f/6,d);a.fillAndStroke()};mxCellRenderer.prototype.defaultShapes.umlBoundary=C;mxUtils.extend(A,mxEllipse);A.prototype.paintVertexShape=function(a,c,b,f,d){mxEllipse.prototype.paintVertexShape.apply(this,arguments);a.begin();a.moveTo(c+f/8,b+d);a.lineTo(c+7*f/8,b+d);a.end();a.stroke()};mxCellRenderer.prototype.defaultShapes.umlEntity=
-A;mxUtils.extend(F,mxShape);F.prototype.paintVertexShape=function(a,c,b,f,d){a.translate(c,b);a.begin();a.moveTo(f,0);a.lineTo(0,d);a.moveTo(0,0);a.lineTo(f,d);a.end();a.stroke()};mxCellRenderer.prototype.defaultShapes.umlDestroy=F;mxUtils.extend(z,mxShape);z.prototype.getLabelBounds=function(a){return new mxRectangle(a.x,a.y+a.height/8,a.width,7*a.height/8)};z.prototype.paintBackground=function(a,c,b,f,d){a.translate(c,b);a.begin();a.moveTo(3*f/8,d/8*1.1);a.lineTo(5*f/8,0);a.end();a.stroke();a.ellipse(0,
-d/8,f,7*d/8);a.fillAndStroke()};z.prototype.paintForeground=function(a,c,b,f,d){a.begin();a.moveTo(3*f/8,d/8*1.1);a.lineTo(5*f/8,d/4);a.end();a.stroke()};mxCellRenderer.prototype.defaultShapes.umlControl=z;mxUtils.extend(J,mxRectangleShape);J.prototype.size=40;J.prototype.isHtmlAllowed=function(){return!1};J.prototype.getLabelBounds=function(a){var c=Math.max(0,Math.min(a.height,parseFloat(mxUtils.getValue(this.style,"size",this.size))*this.scale));return new mxRectangle(a.x,a.y,a.width,c)};J.prototype.paintBackground=
-function(a,c,b,f,d){var e=Math.max(0,Math.min(d,parseFloat(mxUtils.getValue(this.style,"size",this.size)))),h=mxUtils.getValue(this.style,"participant");null==h||null==this.state?mxRectangleShape.prototype.paintBackground.call(this,a,c,b,f,e):(h=this.state.view.graph.cellRenderer.getShape(h),null!=h&&h!=J&&(h=new h,h.apply(this.state),a.save(),h.paintVertexShape(a,c,b,f,e),a.restore()));e<d&&(a.setDashed(!0),a.begin(),a.moveTo(c+f/2,b+e),a.lineTo(c+f/2,b+d),a.end(),a.stroke())};J.prototype.paintForeground=
-function(a,c,b,f,d){var e=Math.max(0,Math.min(d,parseFloat(mxUtils.getValue(this.style,"size",this.size))));mxRectangleShape.prototype.paintForeground.call(this,a,c,b,f,Math.min(d,e))};mxCellRenderer.prototype.defaultShapes.umlLifeline=J;mxUtils.extend(I,mxShape);I.prototype.width=60;I.prototype.height=30;I.prototype.corner=10;I.prototype.getLabelMargins=function(a){return new mxRectangle(0,0,a.width-parseFloat(mxUtils.getValue(this.style,"width",this.width)*this.scale),a.height-parseFloat(mxUtils.getValue(this.style,
-"height",this.height)*this.scale))};I.prototype.paintBackground=function(a,c,b,f,d){var e=this.corner,h=Math.min(f,Math.max(e,parseFloat(mxUtils.getValue(this.style,"width",this.width)))),k=Math.min(d,Math.max(1.5*e,parseFloat(mxUtils.getValue(this.style,"height",this.height))));a.begin();a.moveTo(c,b);a.lineTo(c+h,b);a.lineTo(c+h,b+Math.max(0,k-1.5*e));a.lineTo(c+Math.max(0,h-e),b+k);a.lineTo(c,b+k);a.close();a.fillAndStroke();a.begin();a.moveTo(c+h,b);a.lineTo(c+f,b);a.lineTo(c+f,b+d);a.lineTo(c,
-b+d);a.lineTo(c,b+k);a.stroke()};mxCellRenderer.prototype.defaultShapes.umlFrame=I;mxPerimeter.LifelinePerimeter=function(a,c,b,f){f=J.prototype.size;null!=c&&(f=mxUtils.getValue(c.style,"size",f)*c.view.scale);c=parseFloat(c.style[mxConstants.STYLE_STROKEWIDTH]||1)*c.view.scale/2-1;b.x<a.getCenterX()&&(c=-1*(c+1));return new mxPoint(a.getCenterX()+c,Math.min(a.y+a.height,Math.max(a.y+f,b.y)))};mxStyleRegistry.putValue("lifelinePerimeter",mxPerimeter.LifelinePerimeter);mxPerimeter.OrthogonalPerimeter=
-function(a,c,b,f){f=!0;return mxPerimeter.RectanglePerimeter.apply(this,arguments)};mxStyleRegistry.putValue("orthogonalPerimeter",mxPerimeter.OrthogonalPerimeter);mxPerimeter.BackbonePerimeter=function(a,c,b,f){f=parseFloat(c.style[mxConstants.STYLE_STROKEWIDTH]||1)*c.view.scale/2-1;null!=c.style.backboneSize&&(f+=parseFloat(c.style.backboneSize)*c.view.scale/2-1);if("south"==c.style[mxConstants.STYLE_DIRECTION]||"north"==c.style[mxConstants.STYLE_DIRECTION])return b.x<a.getCenterX()&&(f=-1*(f+1)),
-new mxPoint(a.getCenterX()+f,Math.min(a.y+a.height,Math.max(a.y,b.y)));b.y<a.getCenterY()&&(f=-1*(f+1));return new mxPoint(Math.min(a.x+a.width,Math.max(a.x,b.x)),a.getCenterY()+f)};mxStyleRegistry.putValue("backbonePerimeter",mxPerimeter.BackbonePerimeter);mxPerimeter.CalloutPerimeter=function(a,c,b,f){return mxPerimeter.RectanglePerimeter(mxUtils.getDirectedBounds(a,new mxRectangle(0,0,0,Math.max(0,Math.min(a.height,parseFloat(mxUtils.getValue(c.style,"size",t.prototype.size))*c.view.scale))),c.style),
-c,b,f)};mxStyleRegistry.putValue("calloutPerimeter",mxPerimeter.CalloutPerimeter);mxPerimeter.ParallelogramPerimeter=function(a,c,b,f){var d=h.prototype.size;null!=c&&(d=mxUtils.getValue(c.style,"size",d));var e=a.x,k=a.y,m=a.width,n=a.height;c=null!=c?mxUtils.getValue(c.style,mxConstants.STYLE_DIRECTION,mxConstants.DIRECTION_EAST):mxConstants.DIRECTION_EAST;c==mxConstants.DIRECTION_NORTH||c==mxConstants.DIRECTION_SOUTH?(d=n*Math.max(0,Math.min(1,d)),k=[new mxPoint(e,k),new mxPoint(e+m,k+d),new mxPoint(e+
-m,k+n),new mxPoint(e,k+n-d),new mxPoint(e,k)]):(d=m*Math.max(0,Math.min(1,d)),k=[new mxPoint(e+d,k),new mxPoint(e+m,k),new mxPoint(e+m-d,k+n),new mxPoint(e,k+n),new mxPoint(e+d,k)]);n=a.getCenterX();a=a.getCenterY();a=new mxPoint(n,a);f&&(b.x<e||b.x>e+m?a.y=b.y:a.x=b.x);return mxUtils.getPerimeterPoint(k,a,b)};mxStyleRegistry.putValue("parallelogramPerimeter",mxPerimeter.ParallelogramPerimeter);mxPerimeter.TrapezoidPerimeter=function(a,c,b,f){var d=m.prototype.size;null!=c&&(d=mxUtils.getValue(c.style,
-"size",d));var e=a.x,h=a.y,k=a.width,n=a.height;c=null!=c?mxUtils.getValue(c.style,mxConstants.STYLE_DIRECTION,mxConstants.DIRECTION_EAST):mxConstants.DIRECTION_EAST;c==mxConstants.DIRECTION_EAST?(d=k*Math.max(0,Math.min(1,d)),h=[new mxPoint(e+d,h),new mxPoint(e+k-d,h),new mxPoint(e+k,h+n),new mxPoint(e,h+n),new mxPoint(e+d,h)]):c==mxConstants.DIRECTION_WEST?(d=k*Math.max(0,Math.min(1,d)),h=[new mxPoint(e,h),new mxPoint(e+k,h),new mxPoint(e+k-d,h+n),new mxPoint(e+d,h+n),new mxPoint(e,h)]):c==mxConstants.DIRECTION_NORTH?
-(d=n*Math.max(0,Math.min(1,d)),h=[new mxPoint(e,h+d),new mxPoint(e+k,h),new mxPoint(e+k,h+n),new mxPoint(e,h+n-d),new mxPoint(e,h+d)]):(d=n*Math.max(0,Math.min(1,d)),h=[new mxPoint(e,h),new mxPoint(e+k,h+d),new mxPoint(e+k,h+n-d),new mxPoint(e,h+n),new mxPoint(e,h)]);n=a.getCenterX();a=a.getCenterY();a=new mxPoint(n,a);f&&(b.x<e||b.x>e+k?a.y=b.y:a.x=b.x);return mxUtils.getPerimeterPoint(h,a,b)};mxStyleRegistry.putValue("trapezoidPerimeter",mxPerimeter.TrapezoidPerimeter);mxPerimeter.StepPerimeter=
-function(a,c,b,f){var d=v.prototype.size;null!=c&&(d=mxUtils.getValue(c.style,"size",d));var e=a.x,h=a.y,k=a.width,m=a.height,n=a.getCenterX();a=a.getCenterY();c=null!=c?mxUtils.getValue(c.style,mxConstants.STYLE_DIRECTION,mxConstants.DIRECTION_EAST):mxConstants.DIRECTION_EAST;c==mxConstants.DIRECTION_EAST?(d=k*Math.max(0,Math.min(1,d)),h=[new mxPoint(e,h),new mxPoint(e+k-d,h),new mxPoint(e+k,a),new mxPoint(e+k-d,h+m),new mxPoint(e,h+m),new mxPoint(e+d,a),new mxPoint(e,h)]):c==mxConstants.DIRECTION_WEST?
-(d=k*Math.max(0,Math.min(1,d)),h=[new mxPoint(e+d,h),new mxPoint(e+k,h),new mxPoint(e+k-d,a),new mxPoint(e+k,h+m),new mxPoint(e+d,h+m),new mxPoint(e,a),new mxPoint(e+d,h)]):c==mxConstants.DIRECTION_NORTH?(d=m*Math.max(0,Math.min(1,d)),h=[new mxPoint(e,h+d),new mxPoint(n,h),new mxPoint(e+k,h+d),new mxPoint(e+k,h+m),new mxPoint(n,h+m-d),new mxPoint(e,h+m),new mxPoint(e,h+d)]):(d=m*Math.max(0,Math.min(1,d)),h=[new mxPoint(e,h),new mxPoint(n,h+d),new mxPoint(e+k,h),new mxPoint(e+k,h+m-d),new mxPoint(n,
-h+m),new mxPoint(e,h+m-d),new mxPoint(e,h)]);n=new mxPoint(n,a);f&&(b.x<e||b.x>e+k?n.y=b.y:n.x=b.x);return mxUtils.getPerimeterPoint(h,n,b)};mxStyleRegistry.putValue("stepPerimeter",mxPerimeter.StepPerimeter);mxPerimeter.HexagonPerimeter2=function(a,c,b,f){var d=x.prototype.size;null!=c&&(d=mxUtils.getValue(c.style,"size",d));var e=a.x,h=a.y,k=a.width,m=a.height,n=a.getCenterX();a=a.getCenterY();c=null!=c?mxUtils.getValue(c.style,mxConstants.STYLE_DIRECTION,mxConstants.DIRECTION_EAST):mxConstants.DIRECTION_EAST;
-c==mxConstants.DIRECTION_NORTH||c==mxConstants.DIRECTION_SOUTH?(d=m*Math.max(0,Math.min(1,d)),h=[new mxPoint(n,h),new mxPoint(e+k,h+d),new mxPoint(e+k,h+m-d),new mxPoint(n,h+m),new mxPoint(e,h+m-d),new mxPoint(e,h+d),new mxPoint(n,h)]):(d=k*Math.max(0,Math.min(1,d)),h=[new mxPoint(e+d,h),new mxPoint(e+k-d,h),new mxPoint(e+k,a),new mxPoint(e+k-d,h+m),new mxPoint(e+d,h+m),new mxPoint(e,a),new mxPoint(e+d,h)]);n=new mxPoint(n,a);f&&(b.x<e||b.x>e+k?n.y=b.y:n.x=b.x);return mxUtils.getPerimeterPoint(h,
-n,b)};mxStyleRegistry.putValue("hexagonPerimeter2",mxPerimeter.HexagonPerimeter2);mxUtils.extend(H,mxShape);H.prototype.size=10;H.prototype.paintBackground=function(a,c,b,f,d){var e=parseFloat(mxUtils.getValue(this.style,"size",this.size));a.translate(c,b);a.ellipse((f-e)/2,0,e,e);a.fillAndStroke();a.begin();a.moveTo(f/2,e);a.lineTo(f/2,d);a.end();a.stroke()};mxCellRenderer.prototype.defaultShapes.lollipop=H;mxUtils.extend(T,mxShape);T.prototype.size=10;T.prototype.inset=2;T.prototype.paintBackground=
-function(a,c,b,f,d){var e=parseFloat(mxUtils.getValue(this.style,"size",this.size)),h=parseFloat(mxUtils.getValue(this.style,"inset",this.inset))+this.strokewidth;a.translate(c,b);a.begin();a.moveTo(f/2,e+h);a.lineTo(f/2,d);a.end();a.stroke();a.begin();a.moveTo((f-e)/2-h,e/2);a.quadTo((f-e)/2-h,e+h,f/2,e+h);a.quadTo((f+e)/2+h,e+h,(f+e)/2+h,e/2);a.end();a.stroke()};mxCellRenderer.prototype.defaultShapes.requires=T;mxUtils.extend(N,mxCylinder);N.prototype.jettyWidth=32;N.prototype.jettyHeight=12;N.prototype.redrawPath=
-function(a,c,b,f,d,e){var h=parseFloat(mxUtils.getValue(this.style,"jettyWidth",this.jettyWidth));c=parseFloat(mxUtils.getValue(this.style,"jettyHeight",this.jettyHeight));b=h/2;var h=b+h/2,k=.3*d-c/2,m=.7*d-c/2;e?(a.moveTo(b,k),a.lineTo(h,k),a.lineTo(h,k+c),a.lineTo(b,k+c),a.moveTo(b,m),a.lineTo(h,m),a.lineTo(h,m+c),a.lineTo(b,m+c)):(a.moveTo(b,0),a.lineTo(f,0),a.lineTo(f,d),a.lineTo(b,d),a.lineTo(b,m+c),a.lineTo(0,m+c),a.lineTo(0,m),a.lineTo(b,m),a.lineTo(b,k+c),a.lineTo(0,k+c),a.lineTo(0,k),a.lineTo(b,
-k),a.close());a.end()};mxCellRenderer.prototype.defaultShapes.component=N;mxUtils.extend(K,mxDoubleEllipse);K.prototype.outerStroke=!0;K.prototype.paintVertexShape=function(a,c,b,f,d){var e=Math.min(4,Math.min(f/5,d/5));0<f&&0<d&&(a.ellipse(c+e,b+e,f-2*e,d-2*e),a.fillAndStroke());a.setShadow(!1);this.outerStroke&&(a.ellipse(c,b,f,d),a.stroke())};mxCellRenderer.prototype.defaultShapes.endState=K;mxUtils.extend(U,K);U.prototype.outerStroke=!1;mxCellRenderer.prototype.defaultShapes.startState=U;mxUtils.extend(G,
-mxArrowConnector);G.prototype.defaultWidth=4;G.prototype.isOpenEnded=function(){return!0};G.prototype.getEdgeWidth=function(){return mxUtils.getNumber(this.style,"width",this.defaultWidth)+Math.max(0,this.strokewidth-1)};G.prototype.isArrowRounded=function(){return this.isRounded};mxCellRenderer.prototype.defaultShapes.link=G;mxUtils.extend(L,mxArrowConnector);L.prototype.defaultWidth=10;L.prototype.defaultArrowWidth=20;L.prototype.getStartArrowWidth=function(){return this.getEdgeWidth()+mxUtils.getNumber(this.style,
-"startWidth",this.defaultArrowWidth)};L.prototype.getEndArrowWidth=function(){return this.getEdgeWidth()+mxUtils.getNumber(this.style,"endWidth",this.defaultArrowWidth)};L.prototype.getEdgeWidth=function(){return mxUtils.getNumber(this.style,"width",this.defaultWidth)+Math.max(0,this.strokewidth-1)};mxCellRenderer.prototype.defaultShapes.flexArrow=L;mxUtils.extend(Q,mxActor);Q.prototype.size=30;Q.prototype.redrawPath=function(a,c,b,f,d){c=Math.min(d,parseFloat(mxUtils.getValue(this.style,"size",this.size)));
-b=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(a,[new mxPoint(0,d),new mxPoint(0,c),new mxPoint(f,0),new mxPoint(f,d)],this.isRounded,b,!0);a.end()};mxCellRenderer.prototype.defaultShapes.manualInput=Q;mxUtils.extend(E,mxRectangleShape);E.prototype.dx=20;E.prototype.dy=20;E.prototype.isHtmlAllowed=function(){return!1};E.prototype.paintForeground=function(a,c,b,f,d){mxRectangleShape.prototype.paintForeground.apply(this,arguments);var e=0;if(this.isRounded)var h=
-mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,100*mxConstants.RECTANGLE_ROUNDING_FACTOR)/100,e=Math.max(e,Math.min(f*h,d*h));h=Math.max(e,Math.min(f,parseFloat(mxUtils.getValue(this.style,"dx",this.dx))));e=Math.max(e,Math.min(d,parseFloat(mxUtils.getValue(this.style,"dy",this.dy))));a.begin();a.moveTo(c,b+e);a.lineTo(c+f,b+e);a.end();a.stroke();a.begin();a.moveTo(c+h,b);a.lineTo(c+h,b+d);a.end();a.stroke()};mxCellRenderer.prototype.defaultShapes.internalStorage=E;mxUtils.extend(V,mxActor);
-V.prototype.dx=20;V.prototype.dy=20;V.prototype.redrawPath=function(a,c,b,f,d){c=Math.max(0,Math.min(f,parseFloat(mxUtils.getValue(this.style,"dx",this.dx))));b=Math.max(0,Math.min(d,parseFloat(mxUtils.getValue(this.style,"dy",this.dy))));parseFloat(mxUtils.getValue(this.style,"size",this.size));var e=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(a,[new mxPoint(0,0),new mxPoint(f,0),new mxPoint(f,b),new mxPoint(c,b),new mxPoint(c,d),new mxPoint(0,
-d)],this.isRounded,e,!0);a.end()};mxCellRenderer.prototype.defaultShapes.corner=V;mxUtils.extend(O,mxActor);O.prototype.redrawPath=function(a,c,b,f,d){a.moveTo(0,0);a.lineTo(0,d);a.end();a.moveTo(f,0);a.lineTo(f,d);a.end();a.moveTo(0,d/2);a.lineTo(f,d/2);a.end()};mxCellRenderer.prototype.defaultShapes.crossbar=O;mxUtils.extend(W,mxActor);W.prototype.dx=20;W.prototype.dy=20;W.prototype.redrawPath=function(a,c,b,f,d){c=Math.max(0,Math.min(f,parseFloat(mxUtils.getValue(this.style,"dx",this.dx))));b=
-Math.max(0,Math.min(d,parseFloat(mxUtils.getValue(this.style,"dy",this.dy))));parseFloat(mxUtils.getValue(this.style,"size",this.size));var e=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(a,[new mxPoint(0,0),new mxPoint(f,0),new mxPoint(f,b),new mxPoint((f+c)/2,b),new mxPoint((f+c)/2,d),new mxPoint((f-c)/2,d),new mxPoint((f-c)/2,b),new mxPoint(0,b)],this.isRounded,e,!0);a.end()};mxCellRenderer.prototype.defaultShapes.tee=W;mxUtils.extend(R,mxActor);
-R.prototype.arrowWidth=.3;R.prototype.arrowSize=.2;R.prototype.redrawPath=function(a,c,b,f,d){var e=d*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"arrowWidth",this.arrowWidth))));c=f*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"arrowSize",this.arrowSize))));b=(d-e)/2;var e=b+e,h=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(a,[new mxPoint(0,b),new mxPoint(f-c,b),new mxPoint(f-c,0),new mxPoint(f,d/2),new mxPoint(f-
-c,d),new mxPoint(f-c,e),new mxPoint(0,e)],this.isRounded,h,!0);a.end()};mxCellRenderer.prototype.defaultShapes.singleArrow=R;mxUtils.extend(P,mxActor);P.prototype.redrawPath=function(a,c,b,f,d){var e=d*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"arrowWidth",R.prototype.arrowWidth))));c=f*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"arrowSize",R.prototype.arrowSize))));b=(d-e)/2;var e=b+e,h=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/
-2;this.addPoints(a,[new mxPoint(0,d/2),new mxPoint(c,0),new mxPoint(c,b),new mxPoint(f-c,b),new mxPoint(f-c,0),new mxPoint(f,d/2),new mxPoint(f-c,d),new mxPoint(f-c,e),new mxPoint(c,e),new mxPoint(c,d)],this.isRounded,h,!0);a.end()};mxCellRenderer.prototype.defaultShapes.doubleArrow=P;mxUtils.extend(S,mxActor);S.prototype.size=.1;S.prototype.redrawPath=function(a,c,b,f,d){c=f*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));a.moveTo(c,0);a.lineTo(f,0);a.quadTo(f-2*
-c,d/2,f,d);a.lineTo(c,d);a.quadTo(c-2*c,d/2,c,0);a.close();a.end()};mxCellRenderer.prototype.defaultShapes.dataStorage=S;mxUtils.extend(Y,mxActor);Y.prototype.redrawPath=function(a,c,b,f,d){a.moveTo(0,0);a.quadTo(f,0,f,d/2);a.quadTo(f,d,0,d);a.close();a.end()};mxCellRenderer.prototype.defaultShapes.or=Y;mxUtils.extend(X,mxActor);X.prototype.redrawPath=function(a,c,b,f,d){a.moveTo(0,0);a.quadTo(f,0,f,d/2);a.quadTo(f,d,0,d);a.quadTo(f/2,d/2,0,0);a.close();a.end()};mxCellRenderer.prototype.defaultShapes.xor=
-X;mxUtils.extend(Z,mxActor);Z.prototype.size=20;Z.prototype.redrawPath=function(a,c,b,f,d){c=Math.min(f/2,Math.min(d,parseFloat(mxUtils.getValue(this.style,"size",this.size))));b=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(a,[new mxPoint(c,0),new mxPoint(f-c,0),new mxPoint(f,.8*c),new mxPoint(f,d),new mxPoint(0,d),new mxPoint(0,.8*c)],this.isRounded,b,!0);a.end()};mxCellRenderer.prototype.defaultShapes.loopLimit=Z;mxUtils.extend(aa,mxActor);aa.prototype.size=
-.375;aa.prototype.redrawPath=function(a,c,b,f,d){c=d*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));b=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(a,[new mxPoint(0,0),new mxPoint(f,0),new mxPoint(f,d-c),new mxPoint(f/2,d),new mxPoint(0,d-c)],this.isRounded,b,!0);a.end()};mxCellRenderer.prototype.defaultShapes.offPageConnector=aa;mxUtils.extend(ia,mxEllipse);ia.prototype.paintVertexShape=function(a,c,b,f,d){mxEllipse.prototype.paintVertexShape.apply(this,
-arguments);a.begin();a.moveTo(c+f/2,b+d);a.lineTo(c+f,b+d);a.end();a.stroke()};mxCellRenderer.prototype.defaultShapes.tapeData=ia;mxUtils.extend(ba,mxEllipse);ba.prototype.paintVertexShape=function(a,c,b,f,d){mxEllipse.prototype.paintVertexShape.apply(this,arguments);a.setShadow(!1);a.begin();a.moveTo(c,b+d/2);a.lineTo(c+f,b+d/2);a.end();a.stroke();a.begin();a.moveTo(c+f/2,b);a.lineTo(c+f/2,b+d);a.end();a.stroke()};mxCellRenderer.prototype.defaultShapes.orEllipse=ba;mxUtils.extend(ma,mxEllipse);ma.prototype.paintVertexShape=
-function(a,c,b,f,d){mxEllipse.prototype.paintVertexShape.apply(this,arguments);a.setShadow(!1);a.begin();a.moveTo(c+.145*f,b+.145*d);a.lineTo(c+.855*f,b+.855*d);a.end();a.stroke();a.begin();a.moveTo(c+.855*f,b+.145*d);a.lineTo(c+.145*f,b+.855*d);a.end();a.stroke()};mxCellRenderer.prototype.defaultShapes.sumEllipse=ma;mxUtils.extend(ca,mxRhombus);ca.prototype.paintVertexShape=function(a,c,b,f,d){mxRhombus.prototype.paintVertexShape.apply(this,arguments);a.setShadow(!1);a.begin();a.moveTo(c,b+d/2);
-a.lineTo(c+f,b+d/2);a.end();a.stroke()};mxCellRenderer.prototype.defaultShapes.sortShape=ca;mxUtils.extend(ja,mxEllipse);ja.prototype.paintVertexShape=function(a,c,b,f,d){a.begin();a.moveTo(c,b);a.lineTo(c+f,b);a.lineTo(c+f/2,b+d/2);a.close();a.fillAndStroke();a.begin();a.moveTo(c,b+d);a.lineTo(c+f,b+d);a.lineTo(c+f/2,b+d/2);a.close();a.fillAndStroke()};mxCellRenderer.prototype.defaultShapes.collate=ja;mxUtils.extend(da,mxEllipse);da.prototype.paintVertexShape=function(a,c,b,f,d){var e=b+d-5;a.begin();
-a.moveTo(c,b);a.lineTo(c,b+d);a.moveTo(c,e);a.lineTo(c+10,e-5);a.moveTo(c,e);a.lineTo(c+10,e+5);a.moveTo(c,e);a.lineTo(c+f,e);a.moveTo(c+f,b);a.lineTo(c+f,b+d);a.moveTo(c+f,e);a.lineTo(c+f-10,e-5);a.moveTo(c+f,e);a.lineTo(c+f-10,e+5);a.end();a.stroke()};mxCellRenderer.prototype.defaultShapes.dimension=da;mxUtils.extend(qa,mxEllipse);qa.prototype.paintVertexShape=function(a,c,b,f,d){this.outline||a.setStrokeColor(null);mxRectangleShape.prototype.paintBackground.apply(this,arguments);null!=this.style&&
-(a.setStrokeColor(this.stroke),a.rect(c,b,f,d),a.fill(),a.begin(),a.moveTo(c,b),"1"==mxUtils.getValue(this.style,"top","1")?a.lineTo(c+f,b):a.moveTo(c+f,b),"1"==mxUtils.getValue(this.style,"right","1")?a.lineTo(c+f,b+d):a.moveTo(c+f,b+d),"1"==mxUtils.getValue(this.style,"bottom","1")?a.lineTo(c,b+d):a.moveTo(c,b+d),"1"==mxUtils.getValue(this.style,"left","1")&&a.lineTo(c,b-this.strokewidth/2),a.end(),a.stroke())};mxCellRenderer.prototype.defaultShapes.partialRectangle=qa;mxUtils.extend(na,mxEllipse);
-na.prototype.paintVertexShape=function(a,c,b,f,d){mxEllipse.prototype.paintVertexShape.apply(this,arguments);a.setShadow(!1);a.begin();"vertical"==mxUtils.getValue(this.style,"line")?(a.moveTo(c+f/2,b),a.lineTo(c+f/2,b+d)):(a.moveTo(c,b+d/2),a.lineTo(c+f,b+d/2));a.end();a.stroke()};mxCellRenderer.prototype.defaultShapes.lineEllipse=na;mxUtils.extend(ta,mxActor);ta.prototype.redrawPath=function(a,c,b,f,d){c=Math.min(f,d/2);a.moveTo(0,0);a.lineTo(f-c,0);a.quadTo(f,0,f,d/2);a.quadTo(f,d,f-c,d);a.lineTo(0,
-d);a.close();a.end()};mxCellRenderer.prototype.defaultShapes.delay=ta;mxUtils.extend(oa,mxActor);oa.prototype.size=.2;oa.prototype.redrawPath=function(a,c,b,f,d){c=Math.min(d,f);var e=Math.max(0,Math.min(c,c*parseFloat(mxUtils.getValue(this.style,"size",this.size))));c=(d-e)/2;b=c+e;var h=(f-e)/2,e=h+e;a.moveTo(0,c);a.lineTo(h,c);a.lineTo(h,0);a.lineTo(e,0);a.lineTo(e,c);a.lineTo(f,c);a.lineTo(f,b);a.lineTo(e,b);a.lineTo(e,d);a.lineTo(h,d);a.lineTo(h,b);a.lineTo(0,b);a.close();a.end()};mxCellRenderer.prototype.defaultShapes.cross=
-oa;mxUtils.extend(pa,mxActor);pa.prototype.size=.25;pa.prototype.redrawPath=function(a,c,b,f,d){c=Math.min(f,d/2);b=Math.min(f-c,Math.max(0,parseFloat(mxUtils.getValue(this.style,"size",this.size)))*f);a.moveTo(0,d/2);a.lineTo(b,0);a.lineTo(f-c,0);a.quadTo(f,0,f,d/2);a.quadTo(f,d,f-c,d);a.lineTo(b,d);a.close();a.end()};mxCellRenderer.prototype.defaultShapes.display=pa;mxUtils.extend(ka,mxConnector);ka.prototype.origPaintEdgeShape=ka.prototype.paintEdgeShape;ka.prototype.paintEdgeShape=function(a,
-c,b){var f=a.state.dashed,d=a.state.fixDash;ka.prototype.origPaintEdgeShape.apply(this,arguments);if(3<=a.state.strokeWidth){var e=mxUtils.getValue(this.style,"fillColor",null);null!=e&&(a.setStrokeColor(e),a.setStrokeWidth(a.state.strokeWidth-2),a.setDashed(f,d),ka.prototype.origPaintEdgeShape.apply(this,arguments))}};mxCellRenderer.prototype.defaultShapes.filledEdge=ka;mxMarker.addMarker("dash",function(a,c,b,f,d,e,h,k,m,n){var t=d*(h+m+1),r=e*(h+m+1);return function(){a.begin();a.moveTo(f.x-t/
-2-r/2,f.y-r/2+t/2);a.lineTo(f.x+r/2-3*t/2,f.y-3*r/2-t/2);a.stroke()}});mxMarker.addMarker("cross",function(a,c,b,f,d,e,h,k,m,n){var t=d*(h+m+1),r=e*(h+m+1);return function(){a.begin();a.moveTo(f.x-t/2-r/2,f.y-r/2+t/2);a.lineTo(f.x+r/2-3*t/2,f.y-3*r/2-t/2);a.moveTo(f.x-t/2+r/2,f.y-r/2-t/2);a.lineTo(f.x-r/2-3*t/2,f.y-3*r/2+t/2);a.stroke()}});mxMarker.addMarker("circle",Aa);mxMarker.addMarker("circlePlus",function(a,c,b,f,d,e,h,k,m,n){var t=f.clone(),r=Aa.apply(this,arguments),v=d*(h+2*m),g=e*(h+2*m);
-return function(){r.apply(this,arguments);a.begin();a.moveTo(t.x-d*m,t.y-e*m);a.lineTo(t.x-2*v+d*m,t.y-2*g+e*m);a.moveTo(t.x-v-g+e*m,t.y-g+v-d*m);a.lineTo(t.x+g-v-e*m,t.y-g-v+d*m);a.stroke()}});mxMarker.addMarker("async",function(a,c,b,f,d,e,h,k,m,n){c=d*m*1.118;b=e*m*1.118;d*=h+m;e*=h+m;var t=f.clone();t.x-=c;t.y-=b;f.x+=1*-d-c;f.y+=1*-e-b;return function(){a.begin();a.moveTo(t.x,t.y);k?a.lineTo(t.x-d-e/2,t.y-e+d/2):a.lineTo(t.x+e/2-d,t.y-e-d/2);a.lineTo(t.x-d,t.y-e);a.close();n?a.fillAndStroke():
-a.stroke()}});mxMarker.addMarker("openAsync",function(a){a=null!=a?a:2;return function(c,b,f,d,e,h,k,m,n,t){e*=k+n;h*=k+n;var r=d.clone();return function(){c.begin();c.moveTo(r.x,r.y);m?c.lineTo(r.x-e-h/a,r.y-h+e/a):c.lineTo(r.x+h/a-e,r.y-h-e/a);c.stroke()}}}(2));if("undefined"!==typeof mxVertexHandler){var Ca=function(a,c,b){return ra(a,["width"],c,function(c,f,d,e,h){h=a.shape.getEdgeWidth()*a.view.scale+b;return new mxPoint(e.x+f*c/4+d*h/2,e.y+d*c/4-f*h/2)},function(c,f,d,e,h,k){c=Math.sqrt(mxUtils.ptSegDistSq(e.x,
-e.y,h.x,h.y,k.x,k.y));a.style.width=Math.round(2*c)/a.view.scale-b})},ra=function(a,c,b,f,d){var e=a.absolutePoints,h=e.length-1,k=a.view.translate,m=a.view.scale,n=b?e[0]:e[h],t=b?e[1]:e[h-1],r=t.x-n.x,v=t.y-n.y,g=Math.sqrt(r*r+v*v);return M(a,c,function(a){a=f.call(this,g,r/g,v/g,n,t);return new mxPoint(a.x/m-k.x,a.y/m-k.y)},function(a,c,b){a=Math.sqrt(r*r+v*v);c.x=(c.x+k.x)*m;c.y=(c.y+k.y)*m;d.call(this,a,r/a,v/a,n,t,c,b)})},ha=function(a){return function(c){return[M(c,["arrowWidth","arrowSize"],
-function(c){var b=Math.max(0,Math.min(1,mxUtils.getValue(this.state.style,"arrowWidth",R.prototype.arrowWidth))),f=Math.max(0,Math.min(a,mxUtils.getValue(this.state.style,"arrowSize",R.prototype.arrowSize)));return new mxPoint(c.x+(1-f)*c.width,c.y+(1-b)*c.height/2)},function(c,b){this.state.style.arrowWidth=Math.max(0,Math.min(1,Math.abs(c.y+c.height/2-b.y)/c.height*2));this.state.style.arrowSize=Math.max(0,Math.min(a,(c.x+c.width-b.x)/c.width))})]}},ya=function(a,c,b){return function(f){var d=[M(f,
-["size"],function(b){var f=Math.max(0,Math.min(b.width,Math.min(b.height,parseFloat(mxUtils.getValue(this.state.style,"size",c)))))*a;return new mxPoint(b.x+f,b.y+f)},function(c,b){this.state.style.size=Math.round(Math.max(0,Math.min(Math.min(c.width,b.x-c.x),Math.min(c.height,b.y-c.y)))/a)})];b&&mxUtils.getValue(f.style,mxConstants.STYLE_ROUNDED,!1)&&d.push(ea(f));return d}},ua=function(a,c,b,f){b=null!=b?b:1;return function(d){var e=[M(d,["size"],function(c){var b=parseFloat(mxUtils.getValue(this.state.style,
-"size",a));return new mxPoint(c.x+b*c.width,c.getCenterY())},function(a,c){this.state.style.size=Math.max(0,Math.min(b,(c.x-a.x)/a.width))},null,f)];c&&mxUtils.getValue(d.style,mxConstants.STYLE_ROUNDED,!1)&&e.push(ea(d));return e}},Da=function(a){return function(c){var b=[M(c,["size"],function(c){var b=Math.max(0,Math.min(a,parseFloat(mxUtils.getValue(this.state.style,"size",m.prototype.size))));return new mxPoint(c.x+b*c.width*.75,c.y+c.height/4)},function(c,b){this.state.style.size=Math.max(0,
-Math.min(a,(b.x-c.x)/(.75*c.width)))},null,!0)];mxUtils.getValue(c.style,mxConstants.STYLE_ROUNDED,!1)&&b.push(ea(c));return b}},sa=function(){return function(a){var c=[];mxUtils.getValue(a.style,mxConstants.STYLE_ROUNDED,!1)&&c.push(ea(a));return c}},ea=function(a,c){return M(a,[mxConstants.STYLE_ARCSIZE],function(b){var f=null!=c?c:b.height/8;if("1"==mxUtils.getValue(a.style,mxConstants.STYLE_ABSOLUTE_ARCSIZE,0)){var d=mxUtils.getValue(a.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/
-2;return new mxPoint(b.x+b.width-Math.min(b.width/2,d),b.y+f)}d=Math.max(0,parseFloat(mxUtils.getValue(a.style,mxConstants.STYLE_ARCSIZE,100*mxConstants.RECTANGLE_ROUNDING_FACTOR)))/100;return new mxPoint(b.x+b.width-Math.min(Math.max(b.width/2,b.height/2),Math.min(b.width,b.height)*d),b.y+f)},function(c,b,f){"1"==mxUtils.getValue(a.style,mxConstants.STYLE_ABSOLUTE_ARCSIZE,0)?this.state.style[mxConstants.STYLE_ARCSIZE]=Math.round(Math.max(0,Math.min(c.width,2*(c.x+c.width-b.x)))):this.state.style[mxConstants.STYLE_ARCSIZE]=
-Math.round(Math.min(50,Math.max(0,100*(c.width-b.x+c.x)/Math.min(c.width,c.height))))})},M=function(a,c,b,f,d,e){var h=new mxHandle(a,null,mxVertexHandler.prototype.secondaryHandleImage);h.execute=function(){for(var a=0;a<c.length;a++)this.copyStyle(c[a])};h.getPosition=b;h.setPosition=f;h.ignoreGrid=null!=d?d:!0;if(e){var k=h.positionChanged;h.positionChanged=function(){k.apply(this,arguments);a.view.invalidate(this.state.cell);a.view.validate()}}return h},za={link:function(a){return[Ca(a,!0,10),
-Ca(a,!1,10)]},flexArrow:function(a){var c=a.view.graph.gridSize/a.view.scale,b=[];mxUtils.getValue(a.style,mxConstants.STYLE_STARTARROW,mxConstants.NONE)!=mxConstants.NONE&&(b.push(ra(a,["width",mxConstants.STYLE_STARTSIZE,mxConstants.STYLE_ENDSIZE],!0,function(c,b,f,d,e){c=(a.shape.getEdgeWidth()-a.shape.strokewidth)*a.view.scale;e=3*mxUtils.getNumber(a.style,mxConstants.STYLE_STARTSIZE,mxConstants.ARROW_SIZE/5)*a.view.scale;return new mxPoint(d.x+b*(e+a.shape.strokewidth*a.view.scale)+f*c/2,d.y+
-f*(e+a.shape.strokewidth*a.view.scale)-b*c/2)},function(b,f,d,e,h,k,m){b=Math.sqrt(mxUtils.ptSegDistSq(e.x,e.y,h.x,h.y,k.x,k.y));f=mxUtils.ptLineDist(e.x,e.y,e.x+d,e.y-f,k.x,k.y);a.style[mxConstants.STYLE_STARTSIZE]=Math.round(100*(f-a.shape.strokewidth)/3)/100/a.view.scale;a.style.width=Math.round(2*b)/a.view.scale;mxEvent.isControlDown(m.getEvent())&&(a.style[mxConstants.STYLE_ENDSIZE]=a.style[mxConstants.STYLE_STARTSIZE]);mxEvent.isAltDown(m.getEvent())||Math.abs(parseFloat(a.style[mxConstants.STYLE_STARTSIZE])-
-parseFloat(a.style[mxConstants.STYLE_ENDSIZE]))<c/6&&(a.style[mxConstants.STYLE_STARTSIZE]=a.style[mxConstants.STYLE_ENDSIZE])})),b.push(ra(a,["startWidth","endWidth",mxConstants.STYLE_STARTSIZE,mxConstants.STYLE_ENDSIZE],!0,function(c,b,f,d,e){c=(a.shape.getStartArrowWidth()-a.shape.strokewidth)*a.view.scale;e=3*mxUtils.getNumber(a.style,mxConstants.STYLE_STARTSIZE,mxConstants.ARROW_SIZE/5)*a.view.scale;return new mxPoint(d.x+b*(e+a.shape.strokewidth*a.view.scale)+f*c/2,d.y+f*(e+a.shape.strokewidth*
-a.view.scale)-b*c/2)},function(b,f,d,e,h,k,m){b=Math.sqrt(mxUtils.ptSegDistSq(e.x,e.y,h.x,h.y,k.x,k.y));f=mxUtils.ptLineDist(e.x,e.y,e.x+d,e.y-f,k.x,k.y);a.style[mxConstants.STYLE_STARTSIZE]=Math.round(100*(f-a.shape.strokewidth)/3)/100/a.view.scale;a.style.startWidth=Math.max(0,Math.round(2*b)-a.shape.getEdgeWidth())/a.view.scale;mxEvent.isControlDown(m.getEvent())&&(a.style[mxConstants.STYLE_ENDSIZE]=a.style[mxConstants.STYLE_STARTSIZE],a.style.endWidth=a.style.startWidth);mxEvent.isAltDown(m.getEvent())||
-(Math.abs(parseFloat(a.style[mxConstants.STYLE_STARTSIZE])-parseFloat(a.style[mxConstants.STYLE_ENDSIZE]))<c/6&&(a.style[mxConstants.STYLE_STARTSIZE]=a.style[mxConstants.STYLE_ENDSIZE]),Math.abs(parseFloat(a.style.startWidth)-parseFloat(a.style.endWidth))<c&&(a.style.startWidth=a.style.endWidth))})));mxUtils.getValue(a.style,mxConstants.STYLE_ENDARROW,mxConstants.NONE)!=mxConstants.NONE&&(b.push(ra(a,["width",mxConstants.STYLE_STARTSIZE,mxConstants.STYLE_ENDSIZE],!1,function(c,b,f,d,e){c=(a.shape.getEdgeWidth()-
-a.shape.strokewidth)*a.view.scale;e=3*mxUtils.getNumber(a.style,mxConstants.STYLE_ENDSIZE,mxConstants.ARROW_SIZE/5)*a.view.scale;return new mxPoint(d.x+b*(e+a.shape.strokewidth*a.view.scale)-f*c/2,d.y+f*(e+a.shape.strokewidth*a.view.scale)+b*c/2)},function(b,f,d,e,h,k,m){b=Math.sqrt(mxUtils.ptSegDistSq(e.x,e.y,h.x,h.y,k.x,k.y));f=mxUtils.ptLineDist(e.x,e.y,e.x+d,e.y-f,k.x,k.y);a.style[mxConstants.STYLE_ENDSIZE]=Math.round(100*(f-a.shape.strokewidth)/3)/100/a.view.scale;a.style.width=Math.round(2*
-b)/a.view.scale;mxEvent.isControlDown(m.getEvent())&&(a.style[mxConstants.STYLE_STARTSIZE]=a.style[mxConstants.STYLE_ENDSIZE]);mxEvent.isAltDown(m.getEvent())||Math.abs(parseFloat(a.style[mxConstants.STYLE_ENDSIZE])-parseFloat(a.style[mxConstants.STYLE_STARTSIZE]))<c/6&&(a.style[mxConstants.STYLE_ENDSIZE]=a.style[mxConstants.STYLE_STARTSIZE])})),b.push(ra(a,["startWidth","endWidth",mxConstants.STYLE_STARTSIZE,mxConstants.STYLE_ENDSIZE],!1,function(c,b,f,d,e){c=(a.shape.getEndArrowWidth()-a.shape.strokewidth)*
-a.view.scale;e=3*mxUtils.getNumber(a.style,mxConstants.STYLE_ENDSIZE,mxConstants.ARROW_SIZE/5)*a.view.scale;return new mxPoint(d.x+b*(e+a.shape.strokewidth*a.view.scale)-f*c/2,d.y+f*(e+a.shape.strokewidth*a.view.scale)+b*c/2)},function(b,f,d,e,h,k,m){b=Math.sqrt(mxUtils.ptSegDistSq(e.x,e.y,h.x,h.y,k.x,k.y));f=mxUtils.ptLineDist(e.x,e.y,e.x+d,e.y-f,k.x,k.y);a.style[mxConstants.STYLE_ENDSIZE]=Math.round(100*(f-a.shape.strokewidth)/3)/100/a.view.scale;a.style.endWidth=Math.max(0,Math.round(2*b)-a.shape.getEdgeWidth())/
-a.view.scale;mxEvent.isControlDown(m.getEvent())&&(a.style[mxConstants.STYLE_STARTSIZE]=a.style[mxConstants.STYLE_ENDSIZE],a.style.startWidth=a.style.endWidth);mxEvent.isAltDown(m.getEvent())||(Math.abs(parseFloat(a.style[mxConstants.STYLE_ENDSIZE])-parseFloat(a.style[mxConstants.STYLE_STARTSIZE]))<c/6&&(a.style[mxConstants.STYLE_ENDSIZE]=a.style[mxConstants.STYLE_STARTSIZE]),Math.abs(parseFloat(a.style.endWidth)-parseFloat(a.style.startWidth))<c&&(a.style.endWidth=a.style.startWidth))})));return b},
-swimlane:function(a){var c=[M(a,[mxConstants.STYLE_STARTSIZE],function(c){var b=parseFloat(mxUtils.getValue(a.style,mxConstants.STYLE_STARTSIZE,mxConstants.DEFAULT_STARTSIZE));return 1==mxUtils.getValue(a.style,mxConstants.STYLE_HORIZONTAL,1)?new mxPoint(c.getCenterX(),c.y+Math.max(0,Math.min(c.height,b))):new mxPoint(c.x+Math.max(0,Math.min(c.width,b)),c.getCenterY())},function(c,b){a.style[mxConstants.STYLE_STARTSIZE]=1==mxUtils.getValue(this.state.style,mxConstants.STYLE_HORIZONTAL,1)?Math.round(Math.max(0,
-Math.min(c.height,b.y-c.y))):Math.round(Math.max(0,Math.min(c.width,b.x-c.x)))})];if(mxUtils.getValue(a.style,mxConstants.STYLE_ROUNDED)){var b=parseFloat(mxUtils.getValue(a.style,mxConstants.STYLE_STARTSIZE,mxConstants.DEFAULT_STARTSIZE));c.push(ea(a,b/2))}return c},label:sa(),ext:sa(),rectangle:sa(),triangle:sa(),rhombus:sa(),umlLifeline:function(a){return[M(a,["size"],function(a){var c=Math.max(0,Math.min(a.height,parseFloat(mxUtils.getValue(this.state.style,"size",J.prototype.size))));return new mxPoint(a.getCenterX(),
-a.y+c)},function(a,c){this.state.style.size=Math.round(Math.max(0,Math.min(a.height,c.y-a.y)))},!1)]},umlFrame:function(a){return[M(a,["width","height"],function(a){var c=Math.max(I.prototype.corner,Math.min(a.width,mxUtils.getValue(this.state.style,"width",I.prototype.width))),b=Math.max(1.5*I.prototype.corner,Math.min(a.height,mxUtils.getValue(this.state.style,"height",I.prototype.height)));return new mxPoint(a.x+c,a.y+b)},function(a,c){this.state.style.width=Math.round(Math.max(I.prototype.corner,
-Math.min(a.width,c.x-a.x)));this.state.style.height=Math.round(Math.max(1.5*I.prototype.corner,Math.min(a.height,c.y-a.y)))},!1)]},process:function(a){var c=[M(a,["size"],function(a){var c=Math.max(0,Math.min(.5,parseFloat(mxUtils.getValue(this.state.style,"size",k.prototype.size))));return new mxPoint(a.x+a.width*c,a.y+a.height/4)},function(a,c){this.state.style.size=Math.max(0,Math.min(.5,(c.x-a.x)/a.width))})];mxUtils.getValue(a.style,mxConstants.STYLE_ROUNDED,!1)&&c.push(ea(a));return c},cross:function(a){return[M(a,
-["size"],function(a){var c=Math.min(a.width,a.height),c=Math.max(0,Math.min(1,mxUtils.getValue(this.state.style,"size",oa.prototype.size)))*c/2;return new mxPoint(a.getCenterX()-c,a.getCenterY()-c)},function(a,c){var b=Math.min(a.width,a.height);this.state.style.size=Math.max(0,Math.min(1,Math.min(Math.max(0,a.getCenterY()-c.y)/b*2,Math.max(0,a.getCenterX()-c.x)/b*2)))})]},note:function(a){return[M(a,["size"],function(a){var c=Math.max(0,Math.min(a.width,Math.min(a.height,parseFloat(mxUtils.getValue(this.state.style,
-"size",g.prototype.size)))));return new mxPoint(a.x+a.width-c,a.y+c)},function(a,c){this.state.style.size=Math.round(Math.max(0,Math.min(Math.min(a.width,a.x+a.width-c.x),Math.min(a.height,c.y-a.y))))})]},manualInput:function(a){var c=[M(a,["size"],function(a){var c=Math.max(0,Math.min(a.height,mxUtils.getValue(this.state.style,"size",Q.prototype.size)));return new mxPoint(a.x+a.width/4,a.y+3*c/4)},function(a,c){this.state.style.size=Math.round(Math.max(0,Math.min(a.height,4*(c.y-a.y)/3)))})];mxUtils.getValue(a.style,
-mxConstants.STYLE_ROUNDED,!1)&&c.push(ea(a));return c},dataStorage:function(a){return[M(a,["size"],function(a){var c=Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.state.style,"size",S.prototype.size))));return new mxPoint(a.x+(1-c)*a.width,a.getCenterY())},function(a,c){this.state.style.size=Math.max(0,Math.min(1,(a.x+a.width-c.x)/a.width))})]},callout:function(a){var c=[M(a,["size","position"],function(a){var c=Math.max(0,Math.min(a.height,mxUtils.getValue(this.state.style,"size",t.prototype.size))),
-b=Math.max(0,Math.min(1,mxUtils.getValue(this.state.style,"position",t.prototype.position)));mxUtils.getValue(this.state.style,"base",t.prototype.base);return new mxPoint(a.x+b*a.width,a.y+a.height-c)},function(a,c){mxUtils.getValue(this.state.style,"base",t.prototype.base);this.state.style.size=Math.round(Math.max(0,Math.min(a.height,a.y+a.height-c.y)));this.state.style.position=Math.round(100*Math.max(0,Math.min(1,(c.x-a.x)/a.width)))/100}),M(a,["position2"],function(a){var c=Math.max(0,Math.min(1,
-mxUtils.getValue(this.state.style,"position2",t.prototype.position2)));return new mxPoint(a.x+c*a.width,a.y+a.height)},function(a,c){this.state.style.position2=Math.round(100*Math.max(0,Math.min(1,(c.x-a.x)/a.width)))/100}),M(a,["base"],function(a){var c=Math.max(0,Math.min(a.height,mxUtils.getValue(this.state.style,"size",t.prototype.size))),b=Math.max(0,Math.min(1,mxUtils.getValue(this.state.style,"position",t.prototype.position))),f=Math.max(0,Math.min(a.width,mxUtils.getValue(this.state.style,
-"base",t.prototype.base)));return new mxPoint(a.x+Math.min(a.width,b*a.width+f),a.y+a.height-c)},function(a,c){var b=Math.max(0,Math.min(1,mxUtils.getValue(this.state.style,"position",t.prototype.position)));this.state.style.base=Math.round(Math.max(0,Math.min(a.width,c.x-a.x-b*a.width)))})];mxUtils.getValue(a.style,mxConstants.STYLE_ROUNDED,!1)&&c.push(ea(a));return c},internalStorage:function(a){var c=[M(a,["dx","dy"],function(a){var c=Math.max(0,Math.min(a.width,mxUtils.getValue(this.state.style,
-"dx",E.prototype.dx))),b=Math.max(0,Math.min(a.height,mxUtils.getValue(this.state.style,"dy",E.prototype.dy)));return new mxPoint(a.x+c,a.y+b)},function(a,c){this.state.style.dx=Math.round(Math.max(0,Math.min(a.width,c.x-a.x)));this.state.style.dy=Math.round(Math.max(0,Math.min(a.height,c.y-a.y)))})];mxUtils.getValue(a.style,mxConstants.STYLE_ROUNDED,!1)&&c.push(ea(a));return c},corner:function(a){return[M(a,["dx","dy"],function(a){var c=Math.max(0,Math.min(a.width,mxUtils.getValue(this.state.style,
-"dx",V.prototype.dx))),b=Math.max(0,Math.min(a.height,mxUtils.getValue(this.state.style,"dy",V.prototype.dy)));return new mxPoint(a.x+c,a.y+b)},function(a,c){this.state.style.dx=Math.round(Math.max(0,Math.min(a.width,c.x-a.x)));this.state.style.dy=Math.round(Math.max(0,Math.min(a.height,c.y-a.y)))})]},tee:function(a){return[M(a,["dx","dy"],function(a){var c=Math.max(0,Math.min(a.width,mxUtils.getValue(this.state.style,"dx",W.prototype.dx))),b=Math.max(0,Math.min(a.height,mxUtils.getValue(this.state.style,
-"dy",W.prototype.dy)));return new mxPoint(a.x+(a.width+c)/2,a.y+b)},function(a,c){this.state.style.dx=Math.round(Math.max(0,2*Math.min(a.width/2,c.x-a.x-a.width/2)));this.state.style.dy=Math.round(Math.max(0,Math.min(a.height,c.y-a.y)))})]},singleArrow:ha(1),doubleArrow:ha(.5),folder:function(a){return[M(a,["tabWidth","tabHeight"],function(a){var c=Math.max(0,Math.min(a.width,mxUtils.getValue(this.state.style,"tabWidth",p.prototype.tabWidth))),b=Math.max(0,Math.min(a.height,mxUtils.getValue(this.state.style,
-"tabHeight",p.prototype.tabHeight)));mxUtils.getValue(this.state.style,"tabPosition",p.prototype.tabPosition)==mxConstants.ALIGN_RIGHT&&(c=a.width-c);return new mxPoint(a.x+c,a.y+b)},function(a,c){var b=Math.max(0,Math.min(a.width,c.x-a.x));mxUtils.getValue(this.state.style,"tabPosition",p.prototype.tabPosition)==mxConstants.ALIGN_RIGHT&&(b=a.width-b);this.state.style.tabWidth=Math.round(b);this.state.style.tabHeight=Math.round(Math.max(0,Math.min(a.height,c.y-a.y)))})]},document:function(a){return[M(a,
-["size"],function(a){var c=Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.state.style,"size",f.prototype.size))));return new mxPoint(a.x+3*a.width/4,a.y+(1-c)*a.height)},function(a,c){this.state.style.size=Math.max(0,Math.min(1,(a.y+a.height-c.y)/a.height))})]},tape:function(a){return[M(a,["size"],function(a){var b=Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.state.style,"size",c.prototype.size))));return new mxPoint(a.getCenterX(),a.y+b*a.height/2)},function(a,c){this.state.style.size=
-Math.max(0,Math.min(1,(c.y-a.y)/a.height*2))})]},offPageConnector:function(a){return[M(a,["size"],function(a){var c=Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.state.style,"size",aa.prototype.size))));return new mxPoint(a.getCenterX(),a.y+(1-c)*a.height)},function(a,c){this.state.style.size=Math.max(0,Math.min(1,(a.y+a.height-c.y)/a.height))})]},step:ua(v.prototype.size,!0,null,!0),hexagon:ua(x.prototype.size,!0,.5,!0),curlyBracket:ua(n.prototype.size,!1),display:ua(pa.prototype.size,!1),
-cube:ya(1,a.prototype.size,!1),card:ya(.5,q.prototype.size,!0),loopLimit:ya(.5,Z.prototype.size,!0),trapezoid:Da(.5),parallelogram:Da(1)};Graph.createHandle=M;Graph.handleFactory=za;mxVertexHandler.prototype.createCustomHandles=function(){if(1==this.state.view.graph.getSelectionCount()&&this.graph.isCellRotatable(this.state.cell)){var a=this.state.style.shape;null==this.state.view.graph.cellRenderer.defaultShapes[a]&&null==mxStencilRegistry.getStencil(a)&&(a=mxConstants.SHAPE_RECTANGLE);a=za[a];if(null!=
-a)return a(this.state)}return null};mxEdgeHandler.prototype.createCustomHandles=function(){if(1==this.state.view.graph.getSelectionCount()){var a=this.state.style.shape;null==this.state.view.graph.cellRenderer.defaultShapes[a]&&null==mxStencilRegistry.getStencil(a)&&(a=mxConstants.SHAPE_CONNECTOR);a=za[a];if(null!=a)return a(this.state)}return null}}else Graph.createHandle=function(){},Graph.handleFactory={};var va=new mxPoint(1,0),wa=new mxPoint(1,0),ha=mxUtils.toRadians(-30),va=mxUtils.getRotatedPoint(va,
-Math.cos(ha),Math.sin(ha)),ha=mxUtils.toRadians(-150),wa=mxUtils.getRotatedPoint(wa,Math.cos(ha),Math.sin(ha));mxEdgeStyle.IsometricConnector=function(a,c,b,f,d){var e=a.view;f=null!=f&&0<f.length?f[0]:null;var h=a.absolutePoints,k=h[0],h=h[h.length-1];null!=f&&(f=e.transformControlPoint(a,f));null==k&&null!=c&&(k=new mxPoint(c.getCenterX(),c.getCenterY()));null==h&&null!=b&&(h=new mxPoint(b.getCenterX(),b.getCenterY()));var m=va.x,n=va.y,t=wa.x,r=wa.y,v="horizontal"==mxUtils.getValue(a.style,"elbow",
-"horizontal");if(null!=h&&null!=k){a=function(a,c,b){a-=g.x;var f=c-g.y;c=(r*a-t*f)/(m*r-n*t);a=(n*a-m*f)/(n*t-m*r);v?(b&&(g=new mxPoint(g.x+m*c,g.y+n*c),d.push(g)),g=new mxPoint(g.x+t*a,g.y+r*a)):(b&&(g=new mxPoint(g.x+t*a,g.y+r*a),d.push(g)),g=new mxPoint(g.x+m*c,g.y+n*c));d.push(g)};var g=k;null==f&&(f=new mxPoint(k.x+(h.x-k.x)/2,k.y+(h.y-k.y)/2));a(f.x,f.y,!0);a(h.x,h.y,!1)}};mxStyleRegistry.putValue("isometricEdgeStyle",mxEdgeStyle.IsometricConnector);var Ia=Graph.prototype.createEdgeHandler;
-Graph.prototype.createEdgeHandler=function(a,c){if(c==mxEdgeStyle.IsometricConnector){var b=new mxElbowEdgeHandler(a);b.snapToTerminals=!1;return b}return Ia.apply(this,arguments)};b.prototype.constraints=[];e.prototype.constraints=[];t.prototype.constraints=[];mxRectangleShape.prototype.constraints=[new mxConnectionConstraint(new mxPoint(.25,0),!0),new mxConnectionConstraint(new mxPoint(.5,0),!0),new mxConnectionConstraint(new mxPoint(.75,0),!0),new mxConnectionConstraint(new mxPoint(0,.25),!0),
-new mxConnectionConstraint(new mxPoint(0,.5),!0),new mxConnectionConstraint(new mxPoint(0,.75),!0),new mxConnectionConstraint(new mxPoint(1,.25),!0),new mxConnectionConstraint(new mxPoint(1,.5),!0),new mxConnectionConstraint(new mxPoint(1,.75),!0),new mxConnectionConstraint(new mxPoint(.25,1),!0),new mxConnectionConstraint(new mxPoint(.5,1),!0),new mxConnectionConstraint(new mxPoint(.75,1),!0)];mxEllipse.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,0),!0),new mxConnectionConstraint(new mxPoint(1,
-0),!0),new mxConnectionConstraint(new mxPoint(0,1),!0),new mxConnectionConstraint(new mxPoint(1,1),!0),new mxConnectionConstraint(new mxPoint(.5,0),!0),new mxConnectionConstraint(new mxPoint(.5,1),!0),new mxConnectionConstraint(new mxPoint(0,.5),!0),new mxConnectionConstraint(new mxPoint(1,.5))];mxLabel.prototype.constraints=mxRectangleShape.prototype.constraints;mxImageShape.prototype.constraints=mxRectangleShape.prototype.constraints;mxSwimlane.prototype.constraints=mxRectangleShape.prototype.constraints;
-w.prototype.constraints=mxRectangleShape.prototype.constraints;g.prototype.constraints=mxRectangleShape.prototype.constraints;q.prototype.constraints=mxRectangleShape.prototype.constraints;a.prototype.constraints=mxRectangleShape.prototype.constraints;p.prototype.constraints=mxRectangleShape.prototype.constraints;E.prototype.constraints=mxRectangleShape.prototype.constraints;S.prototype.constraints=mxRectangleShape.prototype.constraints;ia.prototype.constraints=mxEllipse.prototype.constraints;ba.prototype.constraints=
-mxEllipse.prototype.constraints;ma.prototype.constraints=mxEllipse.prototype.constraints;na.prototype.constraints=mxEllipse.prototype.constraints;Q.prototype.constraints=mxRectangleShape.prototype.constraints;ta.prototype.constraints=mxRectangleShape.prototype.constraints;pa.prototype.constraints=mxRectangleShape.prototype.constraints;Z.prototype.constraints=mxRectangleShape.prototype.constraints;aa.prototype.constraints=mxRectangleShape.prototype.constraints;mxCylinder.prototype.constraints=[new mxConnectionConstraint(new mxPoint(.15,
-.05),!1),new mxConnectionConstraint(new mxPoint(.5,0),!0),new mxConnectionConstraint(new mxPoint(.85,.05),!1),new mxConnectionConstraint(new mxPoint(0,.3),!0),new mxConnectionConstraint(new mxPoint(0,.5),!0),new mxConnectionConstraint(new mxPoint(0,.7),!0),new mxConnectionConstraint(new mxPoint(1,.3),!0),new mxConnectionConstraint(new mxPoint(1,.5),!0),new mxConnectionConstraint(new mxPoint(1,.7),!0),new mxConnectionConstraint(new mxPoint(.15,.95),!1),new mxConnectionConstraint(new mxPoint(.5,1),
-!0),new mxConnectionConstraint(new mxPoint(.85,.95),!1)];y.prototype.constraints=[new mxConnectionConstraint(new mxPoint(.25,.1),!1),new mxConnectionConstraint(new mxPoint(.5,0),!1),new mxConnectionConstraint(new mxPoint(.75,.1),!1),new mxConnectionConstraint(new mxPoint(0,1/3),!1),new mxConnectionConstraint(new mxPoint(0,1),!1),new mxConnectionConstraint(new mxPoint(1,1/3),!1),new mxConnectionConstraint(new mxPoint(1,1),!1),new mxConnectionConstraint(new mxPoint(.5,.5),!1)];N.prototype.constraints=
-[new mxConnectionConstraint(new mxPoint(.25,0),!0),new mxConnectionConstraint(new mxPoint(.5,0),!0),new mxConnectionConstraint(new mxPoint(.75,0),!0),new mxConnectionConstraint(new mxPoint(0,.3),!0),new mxConnectionConstraint(new mxPoint(0,.7),!0),new mxConnectionConstraint(new mxPoint(1,.25),!0),new mxConnectionConstraint(new mxPoint(1,.5),!0),new mxConnectionConstraint(new mxPoint(1,.75),!0),new mxConnectionConstraint(new mxPoint(.25,1),!0),new mxConnectionConstraint(new mxPoint(.5,1),!0),new mxConnectionConstraint(new mxPoint(.75,
-1),!0)];mxActor.prototype.constraints=[new mxConnectionConstraint(new mxPoint(.5,0),!0),new mxConnectionConstraint(new mxPoint(.25,.2),!1),new mxConnectionConstraint(new mxPoint(.1,.5),!1),new mxConnectionConstraint(new mxPoint(0,.75),!0),new mxConnectionConstraint(new mxPoint(.75,.25),!1),new mxConnectionConstraint(new mxPoint(.9,.5),!1),new mxConnectionConstraint(new mxPoint(1,.75),!0),new mxConnectionConstraint(new mxPoint(.25,1),!0),new mxConnectionConstraint(new mxPoint(.5,1),!0),new mxConnectionConstraint(new mxPoint(.75,
-1),!0)];l.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,0),!1),new mxConnectionConstraint(new mxPoint(.5,.25),!1),new mxConnectionConstraint(new mxPoint(1,0),!1),new mxConnectionConstraint(new mxPoint(.25,.5),!1),new mxConnectionConstraint(new mxPoint(.75,.5),!1),new mxConnectionConstraint(new mxPoint(0,1),!1),new mxConnectionConstraint(new mxPoint(.5,.75),!1),new mxConnectionConstraint(new mxPoint(1,1),!1)];c.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,.35),
-!1),new mxConnectionConstraint(new mxPoint(0,.5),!1),new mxConnectionConstraint(new mxPoint(0,.65),!1),new mxConnectionConstraint(new mxPoint(1,.35),!1),new mxConnectionConstraint(new mxPoint(1,.5),!1),new mxConnectionConstraint(new mxPoint(1,.65),!1),new mxConnectionConstraint(new mxPoint(.25,1),!1),new mxConnectionConstraint(new mxPoint(.75,0),!1)];v.prototype.constraints=[new mxConnectionConstraint(new mxPoint(.25,0),!0),new mxConnectionConstraint(new mxPoint(.5,0),!0),new mxConnectionConstraint(new mxPoint(.75,
-0),!0),new mxConnectionConstraint(new mxPoint(.25,1),!0),new mxConnectionConstraint(new mxPoint(.5,1),!0),new mxConnectionConstraint(new mxPoint(.75,1),!0),new mxConnectionConstraint(new mxPoint(.1,.25),!0),new mxConnectionConstraint(new mxPoint(.2,.5),!0),new mxConnectionConstraint(new mxPoint(.1,.75),!0),new mxConnectionConstraint(new mxPoint(.9,.25),!0),new mxConnectionConstraint(new mxPoint(1,.5),!0),new mxConnectionConstraint(new mxPoint(.9,.75),!0)];mxLine.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,
-.5),!1),new mxConnectionConstraint(new mxPoint(.25,.5),!1),new mxConnectionConstraint(new mxPoint(.75,.5),!1),new mxConnectionConstraint(new mxPoint(1,.5),!1)];H.prototype.constraints=[new mxConnectionConstraint(new mxPoint(.5,0),!1),new mxConnectionConstraint(new mxPoint(.5,1),!1)];mxDoubleEllipse.prototype.constraints=mxEllipse.prototype.constraints;mxRhombus.prototype.constraints=mxEllipse.prototype.constraints;mxTriangle.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,.25),!0),
-new mxConnectionConstraint(new mxPoint(0,.5),!0),new mxConnectionConstraint(new mxPoint(0,.75),!0),new mxConnectionConstraint(new mxPoint(.5,0),!0),new mxConnectionConstraint(new mxPoint(.5,1),!0),new mxConnectionConstraint(new mxPoint(1,.5),!0)];mxHexagon.prototype.constraints=[new mxConnectionConstraint(new mxPoint(.375,0),!0),new mxConnectionConstraint(new mxPoint(.5,0),!0),new mxConnectionConstraint(new mxPoint(.625,0),!0),new mxConnectionConstraint(new mxPoint(.125,.25),!0),new mxConnectionConstraint(new mxPoint(0,
-.5),!0),new mxConnectionConstraint(new mxPoint(.125,.75),!0),new mxConnectionConstraint(new mxPoint(.875,.25),!0),new mxConnectionConstraint(new mxPoint(0,.5),!0),new mxConnectionConstraint(new mxPoint(1,.5),!0),new mxConnectionConstraint(new mxPoint(.875,.75),!0),new mxConnectionConstraint(new mxPoint(.375,1),!0),new mxConnectionConstraint(new mxPoint(.5,1),!0),new mxConnectionConstraint(new mxPoint(.625,1),!0)];mxCloud.prototype.constraints=[new mxConnectionConstraint(new mxPoint(.25,.25),!1),new mxConnectionConstraint(new mxPoint(.4,
-.1),!1),new mxConnectionConstraint(new mxPoint(.16,.55),!1),new mxConnectionConstraint(new mxPoint(.07,.4),!1),new mxConnectionConstraint(new mxPoint(.31,.8),!1),new mxConnectionConstraint(new mxPoint(.13,.77),!1),new mxConnectionConstraint(new mxPoint(.8,.8),!1),new mxConnectionConstraint(new mxPoint(.55,.95),!1),new mxConnectionConstraint(new mxPoint(.875,.5),!1),new mxConnectionConstraint(new mxPoint(.96,.7),!1),new mxConnectionConstraint(new mxPoint(.625,.2),!1),new mxConnectionConstraint(new mxPoint(.88,
-.25),!1)];h.prototype.constraints=mxRectangleShape.prototype.constraints;m.prototype.constraints=mxRectangleShape.prototype.constraints;f.prototype.constraints=[new mxConnectionConstraint(new mxPoint(.25,0),!0),new mxConnectionConstraint(new mxPoint(.5,0),!0),new mxConnectionConstraint(new mxPoint(.75,0),!0),new mxConnectionConstraint(new mxPoint(0,.25),!0),new mxConnectionConstraint(new mxPoint(0,.5),!0),new mxConnectionConstraint(new mxPoint(0,.75),!0),new mxConnectionConstraint(new mxPoint(1,.25),
-!0),new mxConnectionConstraint(new mxPoint(1,.5),!0),new mxConnectionConstraint(new mxPoint(1,.75),!0)];mxArrow.prototype.constraints=null;W.prototype.constraints=null;V.prototype.constraints=null;O.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,0),!1),new mxConnectionConstraint(new mxPoint(0,.5),!1),new mxConnectionConstraint(new mxPoint(0,1),!1),new mxConnectionConstraint(new mxPoint(.25,.5),!1),new mxConnectionConstraint(new mxPoint(.5,.5),!1),new mxConnectionConstraint(new mxPoint(.75,
-.5),!1),new mxConnectionConstraint(new mxPoint(1,0),!1),new mxConnectionConstraint(new mxPoint(1,.5),!1),new mxConnectionConstraint(new mxPoint(1,1),!1)];R.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,.5),!1),new mxConnectionConstraint(new mxPoint(1,.5),!1)];P.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,.5),!1),new mxConnectionConstraint(new mxPoint(1,.5),!1)];oa.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,.5),!1),new mxConnectionConstraint(new mxPoint(1,
-.5),!1),new mxConnectionConstraint(new mxPoint(.5,0),!1),new mxConnectionConstraint(new mxPoint(.5,1),!1)];J.prototype.constraints=null;Y.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,.25),!1),new mxConnectionConstraint(new mxPoint(0,.5),!1),new mxConnectionConstraint(new mxPoint(0,.75),!1),new mxConnectionConstraint(new mxPoint(1,.5),!1),new mxConnectionConstraint(new mxPoint(.7,.1),!1),new mxConnectionConstraint(new mxPoint(.7,.9),!1)];X.prototype.constraints=[new mxConnectionConstraint(new mxPoint(.175,
-.25),!1),new mxConnectionConstraint(new mxPoint(.25,.5),!1),new mxConnectionConstraint(new mxPoint(.175,.75),!1),new mxConnectionConstraint(new mxPoint(1,.5),!1),new mxConnectionConstraint(new mxPoint(.7,.1),!1),new mxConnectionConstraint(new mxPoint(.7,.9),!1)]})();function Actions(a){this.editorUi=a;this.actions={};this.init()}
-Actions.prototype.init=function(){function a(a){d.escape();var c=d.getDeletableCells(d.getSelectionCells());if(null!=c&&0<c.length){var b=d.model.getParents(c);d.removeCells(c,a);if(null!=b){a=[];for(c=0;c<b.length;c++)d.model.contains(b[c])&&(d.model.isVertex(b[c])||d.model.isEdge(b[c]))&&a.push(b[c]);d.setSelectionCells(a)}}}var b=this.editorUi,e=b.editor,d=e.graph,g=function(){return Action.prototype.isEnabled.apply(this,arguments)&&d.isEnabled()};this.addAction("new...",function(){window.open(b.getUrl())});
-this.addAction("open...",function(){window.openNew=!0;window.openKey="open";b.openFile()});this.addAction("import...",function(){window.openNew=!1;window.openKey="import";window.openFile=new OpenFile(mxUtils.bind(this,function(){b.hideDialog()}));window.openFile.setConsumer(mxUtils.bind(this,function(a,c){try{var b=mxUtils.parseXml(a),d=new mxGraphModel;(new mxCodec(b)).decode(b.documentElement,d);var m=d.getChildren(d.getChildAt(d.getRoot(),0));e.graph.setSelectionCells(e.graph.importCells(m))}catch(n){mxUtils.alert(mxResources.get("invalidOrMissingFile")+
-": "+n.message)}}));b.showDialog((new OpenDialog(this)).container,320,220,!0,!0,function(){window.openFile=null})}).isEnabled=g;this.addAction("save",function(){b.saveFile(!1)},null,null,Editor.ctrlKey+"+S").isEnabled=g;this.addAction("saveAs...",function(){b.saveFile(!0)},null,null,Editor.ctrlKey+"+Shift+S").isEnabled=g;this.addAction("export...",function(){b.showDialog((new ExportDialog(b)).container,300,230,!0,!0)});this.addAction("editDiagram...",function(){var a=new EditDiagramDialog(b);b.showDialog(a.container,
-620,420,!0,!1);a.init()});this.addAction("pageSetup...",function(){b.showDialog((new PageSetupDialog(b)).container,320,220,!0,!0)}).isEnabled=g;this.addAction("print...",function(){b.showDialog((new PrintDialog(b)).container,300,180,!0,!0)},null,"sprite-print",Editor.ctrlKey+"+P");this.addAction("preview",function(){mxUtils.show(d,null,10,10)});this.addAction("undo",function(){b.undo()},null,"sprite-undo",Editor.ctrlKey+"+Z");this.addAction("redo",function(){b.redo()},null,"sprite-redo",mxClient.IS_WIN?
+this.canvas.curveTo=mxUtils.bind(this,r.prototype.curveTo);this.originalArcTo=this.canvas.arcTo;this.canvas.arcTo=mxUtils.bind(this,r.prototype.arcTo)}function k(){mxRectangleShape.call(this)}function v(){mxRectangleShape.call(this)}function t(){mxActor.call(this)}function x(){mxActor.call(this)}function w(){mxActor.call(this)}function D(){mxRectangleShape.call(this)}function A(){mxRectangleShape.call(this)}function z(){mxCylinder.call(this)}function C(){mxShape.call(this)}function B(){mxShape.call(this)}
+function E(){mxEllipse.call(this)}function y(){mxShape.call(this)}function O(){mxShape.call(this)}function J(){mxRectangleShape.call(this)}function F(){mxShape.call(this)}function R(){mxShape.call(this)}function P(){mxShape.call(this)}function I(){mxCylinder.call(this)}function S(){mxDoubleEllipse.call(this)}function H(){mxDoubleEllipse.call(this)}function L(){mxArrowConnector.call(this);this.spacing=0}function Q(){mxArrowConnector.call(this);this.spacing=0}function G(){mxActor.call(this)}function V(){mxRectangleShape.call(this)}
+function M(){mxActor.call(this)}function Y(){mxActor.call(this)}function T(){mxActor.call(this)}function K(){mxActor.call(this)}function U(){mxActor.call(this)}function W(){mxActor.call(this)}function X(){mxActor.call(this)}function ba(){mxActor.call(this)}function Z(){mxActor.call(this)}function ca(){mxActor.call(this)}function da(){mxEllipse.call(this)}function ma(){mxEllipse.call(this)}function aa(){mxEllipse.call(this)}function ja(){mxRhombus.call(this)}function ea(){mxEllipse.call(this)}function pa(){mxEllipse.call(this)}
+function qa(){mxEllipse.call(this)}function ta(){mxEllipse.call(this)}function ua(){mxActor.call(this)}function na(){mxActor.call(this)}function oa(){mxActor.call(this)}function ka(){mxConnector.call(this)}function Ba(a,c,b,d,f,g,e,k,p,m){e+=p;var ha=d.clone();d.x-=f*(2*e+p);d.y-=g*(2*e+p);f*=e+p;g*=e+p;return function(){a.ellipse(ha.x-f-e,ha.y-g-e,2*e,2*e);m?a.fillAndStroke():a.stroke()}}mxUtils.extend(a,mxCylinder);a.prototype.size=20;a.prototype.redrawPath=function(a,c,b,d,f,g){c=Math.max(0,Math.min(d,
+Math.min(f,parseFloat(mxUtils.getValue(this.style,"size",this.size)))));g?(a.moveTo(c,f),a.lineTo(c,c),a.lineTo(0,0),a.moveTo(c,c),a.lineTo(d,c)):(a.moveTo(0,0),a.lineTo(d-c,0),a.lineTo(d,c),a.lineTo(d,f),a.lineTo(c,f),a.lineTo(0,f-c),a.lineTo(0,0),a.close());a.end()};a.prototype.getLabelMargins=function(a){return mxUtils.getValue(this.style,"boundedLbl",!1)?(a=parseFloat(mxUtils.getValue(this.style,"size",this.size))*this.scale,new mxRectangle(a,a,0,0)):null};mxCellRenderer.prototype.defaultShapes.cube=
+a;var ya=Math.tan(mxUtils.toRadians(30)),la=(.5-ya)/2;mxUtils.extend(b,mxActor);b.prototype.size=20;b.prototype.redrawPath=function(a,c,b,d,f){c=Math.min(d,f/ya);a.translate((d-c)/2,(f-c)/2+c/4);a.moveTo(0,.25*c);a.lineTo(.5*c,c*la);a.lineTo(c,.25*c);a.lineTo(.5*c,(.5-la)*c);a.lineTo(0,.25*c);a.close();a.end()};mxCellRenderer.prototype.defaultShapes.isoRectangle=b;mxUtils.extend(e,mxCylinder);e.prototype.size=20;e.prototype.redrawPath=function(a,c,b,d,f,g){c=Math.min(d,f/(.5+ya));g?(a.moveTo(0,.25*
+c),a.lineTo(.5*c,(.5-la)*c),a.lineTo(c,.25*c),a.moveTo(.5*c,(.5-la)*c),a.lineTo(.5*c,(1-la)*c)):(a.translate((d-c)/2,(f-c)/2),a.moveTo(0,.25*c),a.lineTo(.5*c,c*la),a.lineTo(c,.25*c),a.lineTo(c,.75*c),a.lineTo(.5*c,(1-la)*c),a.lineTo(0,.75*c),a.close());a.end()};mxCellRenderer.prototype.defaultShapes.isoCube=e;mxUtils.extend(d,mxCylinder);d.prototype.redrawPath=function(a,c,b,d,f,g){c=Math.min(f/2,Math.round(f/8)+this.strokewidth-1);if(g&&null!=this.fill||!g&&null==this.fill)a.moveTo(0,c),a.curveTo(0,
+2*c,d,2*c,d,c),g||(a.stroke(),a.begin()),a.translate(0,c/2),a.moveTo(0,c),a.curveTo(0,2*c,d,2*c,d,c),g||(a.stroke(),a.begin()),a.translate(0,c/2),a.moveTo(0,c),a.curveTo(0,2*c,d,2*c,d,c),g||(a.stroke(),a.begin()),a.translate(0,-c);g||(a.moveTo(0,c),a.curveTo(0,-c/3,d,-c/3,d,c),a.lineTo(d,f-c),a.curveTo(d,f+c/3,0,f+c/3,0,f-c),a.close())};d.prototype.getLabelMargins=function(a){return new mxRectangle(0,2.5*Math.min(a.height/2,Math.round(a.height/8)+this.strokewidth-1)*this.scale,0,0)};mxCellRenderer.prototype.defaultShapes.datastore=
+d;mxUtils.extend(h,mxCylinder);h.prototype.size=30;h.prototype.redrawPath=function(a,c,b,d,f,g){c=Math.max(0,Math.min(d,Math.min(f,parseFloat(mxUtils.getValue(this.style,"size",this.size)))));g?(a.moveTo(d-c,0),a.lineTo(d-c,c),a.lineTo(d,c)):(a.moveTo(0,0),a.lineTo(d-c,0),a.lineTo(d,c),a.lineTo(d,f),a.lineTo(0,f),a.lineTo(0,0),a.close());a.end()};mxCellRenderer.prototype.defaultShapes.note=h;mxUtils.extend(l,mxActor);l.prototype.redrawPath=function(a,c,b,d,f){a.moveTo(0,0);a.quadTo(d/2,.5*f,d,0);
+a.quadTo(.5*d,f/2,d,f);a.quadTo(d/2,.5*f,0,f);a.quadTo(.5*d,f/2,0,0);a.end()};mxCellRenderer.prototype.defaultShapes["switch"]=l;mxUtils.extend(n,mxCylinder);n.prototype.tabWidth=60;n.prototype.tabHeight=20;n.prototype.tabPosition="right";n.prototype.redrawPath=function(a,c,b,d,f,g){c=Math.max(0,Math.min(d,parseFloat(mxUtils.getValue(this.style,"tabWidth",this.tabWidth))));b=Math.max(0,Math.min(f,parseFloat(mxUtils.getValue(this.style,"tabHeight",this.tabHeight))));var e=mxUtils.getValue(this.style,
+"tabPosition",this.tabPosition);g?"left"==e?(a.moveTo(0,b),a.lineTo(c,b)):(a.moveTo(d-c,b),a.lineTo(d,b)):("left"==e?(a.moveTo(0,0),a.lineTo(c,0),a.lineTo(c,b),a.lineTo(d,b)):(a.moveTo(0,b),a.lineTo(d-c,b),a.lineTo(d-c,0),a.lineTo(d,0)),a.lineTo(d,f),a.lineTo(0,f),a.lineTo(0,b),a.close());a.end()};mxCellRenderer.prototype.defaultShapes.folder=n;mxUtils.extend(q,mxActor);q.prototype.size=30;q.prototype.redrawPath=function(a,c,b,d,f){c=Math.max(0,Math.min(d,Math.min(f,parseFloat(mxUtils.getValue(this.style,
+"size",this.size)))));b=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(a,[new mxPoint(c,0),new mxPoint(d,0),new mxPoint(d,f),new mxPoint(0,f),new mxPoint(0,c)],this.isRounded,b,!0);a.end()};mxCellRenderer.prototype.defaultShapes.card=q;mxUtils.extend(c,mxActor);c.prototype.size=.4;c.prototype.redrawPath=function(a,c,b,d,f){c=f*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));a.moveTo(0,c/2);a.quadTo(d/4,1.4*c,d/2,c/
+2);a.quadTo(3*d/4,c*(1-1.4),d,c/2);a.lineTo(d,f-c/2);a.quadTo(3*d/4,f-1.4*c,d/2,f-c/2);a.quadTo(d/4,f-c*(1-1.4),0,f-c/2);a.lineTo(0,c/2);a.close();a.end()};c.prototype.getLabelBounds=function(a){if(mxUtils.getValue(this.style,"boundedLbl",!1)){var c=mxUtils.getValue(this.style,"size",this.size),b=a.width,d=a.height;if(null==this.direction||this.direction==mxConstants.DIRECTION_EAST||this.direction==mxConstants.DIRECTION_WEST)return c*=d,new mxRectangle(a.x,a.y+c,b,d-2*c);c*=b;return new mxRectangle(a.x+
+c,a.y,b-2*c,d)}return a};mxCellRenderer.prototype.defaultShapes.tape=c;mxUtils.extend(f,mxActor);f.prototype.size=.3;f.prototype.getLabelMargins=function(a){return mxUtils.getValue(this.style,"boundedLbl",!1)?new mxRectangle(0,0,0,parseFloat(mxUtils.getValue(this.style,"size",this.size))*a.height):null};f.prototype.redrawPath=function(a,c,b,d,f){c=f*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));a.moveTo(0,0);a.lineTo(d,0);a.lineTo(d,f-c/2);a.quadTo(3*d/4,f-1.4*
+c,d/2,f-c/2);a.quadTo(d/4,f-c*(1-1.4),0,f-c/2);a.lineTo(0,c/2);a.close();a.end()};mxCellRenderer.prototype.defaultShapes.document=f;mxCylinder.prototype.getLabelMargins=function(a){return mxUtils.getValue(this.style,"boundedLbl",!1)?new mxRectangle(0,Math.min(this.maxHeight*this.scale,.3*a.height),0,0):null};mxUtils.extend(g,mxActor);g.prototype.size=.2;g.prototype.redrawPath=function(a,c,b,d,f){c=d*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));b=mxUtils.getValue(this.style,
+mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(a,[new mxPoint(0,f),new mxPoint(c,0),new mxPoint(d,0),new mxPoint(d-c,f)],this.isRounded,b,!0);a.end()};mxCellRenderer.prototype.defaultShapes.parallelogram=g;mxUtils.extend(p,mxActor);p.prototype.size=.2;p.prototype.redrawPath=function(a,c,b,d,f){c=d*Math.max(0,Math.min(.5,parseFloat(mxUtils.getValue(this.style,"size",this.size))));b=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(a,
+[new mxPoint(0,f),new mxPoint(c,0),new mxPoint(d-c,0),new mxPoint(d,f)],this.isRounded,b,!0)};mxCellRenderer.prototype.defaultShapes.trapezoid=p;mxUtils.extend(m,mxActor);m.prototype.size=.5;m.prototype.redrawPath=function(a,c,b,d,f){a.setFillColor(null);c=d*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));b=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(a,[new mxPoint(d,0),new mxPoint(c,0),new mxPoint(c,f/2),new mxPoint(0,
+f/2),new mxPoint(c,f/2),new mxPoint(c,f),new mxPoint(d,f)],this.isRounded,b,!1);a.end()};mxCellRenderer.prototype.defaultShapes.curlyBracket=m;mxUtils.extend(u,mxActor);u.prototype.redrawPath=function(a,c,b,d,f){a.setStrokeWidth(1);a.setFillColor(this.stroke);c=d/5;a.rect(0,0,c,f);a.fillAndStroke();a.rect(2*c,0,c,f);a.fillAndStroke();a.rect(4*c,0,c,f);a.fillAndStroke()};mxCellRenderer.prototype.defaultShapes.parallelMarker=u;r.prototype.moveTo=function(a,c){this.originalMoveTo.apply(this.canvas,arguments);
+this.lastX=a;this.lastY=c;this.firstX=a;this.firstY=c};r.prototype.close=function(){null!=this.firstX&&null!=this.firstY&&(this.lineTo(this.firstX,this.firstY),this.originalClose.apply(this.canvas,arguments));this.originalClose.apply(this.canvas,arguments)};r.prototype.quadTo=function(a,c,b,d){this.originalQuadTo.apply(this.canvas,arguments);this.lastX=b;this.lastY=d};r.prototype.curveTo=function(a,c,b,d,f,g){this.originalCurveTo.apply(this.canvas,arguments);this.lastX=f;this.lastY=g};r.prototype.arcTo=
+function(a,c,b,d,f,g,e){this.originalArcTo.apply(this.canvas,arguments);this.lastX=g;this.lastY=e};r.prototype.lineTo=function(a,c){if(null!=this.lastX&&null!=this.lastY){var b=function(a){return"number"===typeof a?a?0>a?-1:1:a===a?0:NaN:NaN},d=Math.abs(a-this.lastX),f=Math.abs(c-this.lastY),g=Math.sqrt(d*d+f*f);if(2>g){this.originalLineTo.apply(this.canvas,arguments);this.lastX=a;this.lastY=c;return}var e=Math.round(g/10),k=this.defaultVariation;5>e&&(e=5,k/=3);for(var ha=b(a-this.lastX)*d/e,b=b(c-
+this.lastY)*f/e,d=d/g,f=f/g,g=0;g<e;g++){var p=(Math.random()-.5)*k;this.originalLineTo.call(this.canvas,ha*g+this.lastX-p*f,b*g+this.lastY-p*d)}this.originalLineTo.call(this.canvas,a,c)}else this.originalLineTo.apply(this.canvas,arguments);this.lastX=a;this.lastY=c};r.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};var Fa=mxShape.prototype.paint;mxShape.prototype.defaultJiggle=1.5;mxShape.prototype.paint=function(a){null!=this.style&&"0"!=mxUtils.getValue(this.style,"comic","0")&&null==a.handHiggle&&(a.handJiggle=new r(a,mxUtils.getValue(this.style,"jiggle",this.defaultJiggle)));Fa.apply(this,arguments);null!=a.handJiggle&&(a.handJiggle.destroy(),delete a.handJiggle)};mxRhombus.prototype.defaultJiggle=2;var Ga=mxRectangleShape.prototype.isHtmlAllowed;mxRectangleShape.prototype.isHtmlAllowed=
+function(){return(null==this.style||"0"==mxUtils.getValue(this.style,"comic","0"))&&Ga.apply(this,arguments)};var Ha=mxRectangleShape.prototype.paintBackground;mxRectangleShape.prototype.paintBackground=function(a,c,b,d,f){if(null==a.handJiggle)Ha.apply(this,arguments);else{var g=!0;null!=this.style&&(g="1"==mxUtils.getValue(this.style,mxConstants.STYLE_POINTER_EVENTS,"1"));if(g||null!=this.fill&&this.fill!=mxConstants.NONE||null!=this.stroke&&this.stroke!=mxConstants.NONE)g||null!=this.fill&&this.fill!=
+mxConstants.NONE||(a.pointerEvents=!1),a.begin(),this.isRounded?("1"==mxUtils.getValue(this.style,mxConstants.STYLE_ABSOLUTE_ARCSIZE,0)?g=Math.min(d/2,Math.min(f/2,mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2)):(g=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,100*mxConstants.RECTANGLE_ROUNDING_FACTOR)/100,g=Math.min(d*g,f*g)),a.moveTo(c+g,b),a.lineTo(c+d-g,b),a.quadTo(c+d,b,c+d,b+g),a.lineTo(c+d,b+f-g),a.quadTo(c+d,b+f,c+d-g,b+f),a.lineTo(c+g,b+f),a.quadTo(c,
+b+f,c,b+f-g),a.lineTo(c,b+g),a.quadTo(c,b,c+g,b)):(a.moveTo(c,b),a.lineTo(c+d,b),a.lineTo(c+d,b+f),a.lineTo(c,b+f),a.lineTo(c,b)),a.close(),a.end(),a.fillAndStroke()}};var Ia=mxRectangleShape.prototype.paintForeground;mxRectangleShape.prototype.paintForeground=function(a,c,b,d,f){null==a.handJiggle&&Ia.apply(this,arguments)};mxUtils.extend(k,mxRectangleShape);k.prototype.size=.1;k.prototype.isHtmlAllowed=function(){return!1};k.prototype.getLabelBounds=function(a){if(mxUtils.getValue(this.state.style,
+mxConstants.STYLE_HORIZONTAL,!0)==(null==this.direction||this.direction==mxConstants.DIRECTION_EAST||this.direction==mxConstants.DIRECTION_WEST)){var c=a.width,b=a.height;a=new mxRectangle(a.x,a.y,c,b);var d=c*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));if(this.isRounded)var f=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,100*mxConstants.RECTANGLE_ROUNDING_FACTOR)/100,d=Math.max(d,Math.min(c*f,b*f));a.x+=d;a.width-=2*d}return a};k.prototype.paintForeground=
+function(a,c,b,d,f){var g=d*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));if(this.isRounded)var e=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,100*mxConstants.RECTANGLE_ROUNDING_FACTOR)/100,g=Math.max(g,Math.min(d*e,f*e));a.begin();a.moveTo(c+g,b);a.lineTo(c+g,b+f);a.moveTo(c+d-g,b);a.lineTo(c+d-g,b+f);a.end();a.stroke();mxRectangleShape.prototype.paintForeground.apply(this,arguments)};mxCellRenderer.prototype.defaultShapes.process=k;mxUtils.extend(v,mxRectangleShape);
+v.prototype.paintBackground=function(a,c,b,d,f){a.setFillColor(mxConstants.NONE);a.rect(c,b,d,f);a.fill()};v.prototype.paintForeground=function(a,c,b,d,f){};mxCellRenderer.prototype.defaultShapes.transparent=v;mxUtils.extend(t,mxHexagon);t.prototype.size=30;t.prototype.position=.5;t.prototype.position2=.5;t.prototype.base=20;t.prototype.getLabelMargins=function(){return new mxRectangle(0,0,0,parseFloat(mxUtils.getValue(this.style,"size",this.size))*this.scale)};t.prototype.redrawPath=function(a,c,
+b,d,f){c=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;b=Math.max(0,Math.min(f,parseFloat(mxUtils.getValue(this.style,"size",this.size))));var g=d*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"position",this.position)))),e=d*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"position2",this.position2)))),k=Math.max(0,Math.min(d,parseFloat(mxUtils.getValue(this.style,"base",this.base))));this.addPoints(a,[new mxPoint(0,0),new mxPoint(d,
+0),new mxPoint(d,f-b),new mxPoint(Math.min(d,g+k),f-b),new mxPoint(e,f),new mxPoint(Math.max(0,g),f-b),new mxPoint(0,f-b)],this.isRounded,c,!0,[4])};mxCellRenderer.prototype.defaultShapes.callout=t;mxUtils.extend(x,mxActor);x.prototype.size=.2;x.prototype.redrawPath=function(a,c,b,d,f){c=d*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));b=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(a,[new mxPoint(0,0),new mxPoint(d-
+c,0),new mxPoint(d,f/2),new mxPoint(d-c,f),new mxPoint(0,f),new mxPoint(c,f/2)],this.isRounded,b,!0);a.end()};mxCellRenderer.prototype.defaultShapes.step=x;mxUtils.extend(w,mxHexagon);w.prototype.size=.25;w.prototype.redrawPath=function(a,c,b,d,f){c=d*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));b=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(a,[new mxPoint(c,0),new mxPoint(d-c,0),new mxPoint(d,.5*f),new mxPoint(d-
+c,f),new mxPoint(c,f),new mxPoint(0,.5*f)],this.isRounded,b,!0)};mxCellRenderer.prototype.defaultShapes.hexagon=w;mxUtils.extend(D,mxRectangleShape);D.prototype.isHtmlAllowed=function(){return!1};D.prototype.paintForeground=function(a,c,b,d,f){var g=Math.min(d/5,f/5)+1;a.begin();a.moveTo(c+d/2,b+g);a.lineTo(c+d/2,b+f-g);a.moveTo(c+g,b+f/2);a.lineTo(c+d-g,b+f/2);a.end();a.stroke();mxRectangleShape.prototype.paintForeground.apply(this,arguments)};mxCellRenderer.prototype.defaultShapes.plus=D;var Ca=
+mxRhombus.prototype.paintVertexShape;mxRhombus.prototype.getLabelBounds=function(a){if(1==this.style["double"]){var c=(2*Math.max(2,this.strokewidth+1)+parseFloat(this.style[mxConstants.STYLE_MARGIN]||0))*this.scale;return new mxRectangle(a.x+c,a.y+c,a.width-2*c,a.height-2*c)}return a};mxRhombus.prototype.paintVertexShape=function(a,c,b,d,f){Ca.apply(this,arguments);if(!this.outline&&1==this.style["double"]){var g=2*Math.max(2,this.strokewidth+1)+parseFloat(this.style[mxConstants.STYLE_MARGIN]||0);
+c+=g;b+=g;d-=2*g;f-=2*g;0<d&&0<f&&(a.setShadow(!1),Ca.apply(this,[a,c,b,d,f]))}};mxUtils.extend(A,mxRectangleShape);A.prototype.isHtmlAllowed=function(){return!1};A.prototype.getLabelBounds=function(a){if(1==this.style["double"]){var c=(Math.max(2,this.strokewidth+1)+parseFloat(this.style[mxConstants.STYLE_MARGIN]||0))*this.scale;return new mxRectangle(a.x+c,a.y+c,a.width-2*c,a.height-2*c)}return a};A.prototype.paintForeground=function(a,c,b,d,f){if(null!=this.style){if(!this.outline&&1==this.style["double"]){var g=
+Math.max(2,this.strokewidth+1)+parseFloat(this.style[mxConstants.STYLE_MARGIN]||0);c+=g;b+=g;d-=2*g;f-=2*g;0<d&&0<f&&mxRectangleShape.prototype.paintBackground.apply(this,arguments)}a.setDashed(!1);var g=0,e;do{e=mxCellRenderer.prototype.defaultShapes[this.style["symbol"+g]];if(null!=e){var k=this.style["symbol"+g+"Align"],p=this.style["symbol"+g+"VerticalAlign"],ha=this.style["symbol"+g+"Width"],m=this.style["symbol"+g+"Height"],t=this.style["symbol"+g+"Spacing"]||0,r=this.style["symbol"+g+"VSpacing"]||
+t,v=this.style["symbol"+g+"ArcSpacing"];null!=v&&(v*=this.getArcSize(d+this.strokewidth,f+this.strokewidth),t+=v,r+=v);var v=c,h=b,v=k==mxConstants.ALIGN_CENTER?v+(d-ha)/2:k==mxConstants.ALIGN_RIGHT?v+(d-ha-t):v+t,h=p==mxConstants.ALIGN_MIDDLE?h+(f-m)/2:p==mxConstants.ALIGN_BOTTOM?h+(f-m-r):h+r;a.save();k=new e;k.style=this.style;e.prototype.paintVertexShape.call(k,a,v,h,ha,m);a.restore()}g++}while(null!=e)}mxRectangleShape.prototype.paintForeground.apply(this,arguments)};mxCellRenderer.prototype.defaultShapes.ext=
+A;mxUtils.extend(z,mxCylinder);z.prototype.redrawPath=function(a,c,b,d,f,g){g?(a.moveTo(0,0),a.lineTo(d/2,f/2),a.lineTo(d,0),a.end()):(a.moveTo(0,0),a.lineTo(d,0),a.lineTo(d,f),a.lineTo(0,f),a.close())};mxCellRenderer.prototype.defaultShapes.message=z;mxUtils.extend(C,mxShape);C.prototype.paintBackground=function(a,c,b,d,f){a.translate(c,b);a.ellipse(d/4,0,d/2,f/4);a.fillAndStroke();a.begin();a.moveTo(d/2,f/4);a.lineTo(d/2,2*f/3);a.moveTo(d/2,f/3);a.lineTo(0,f/3);a.moveTo(d/2,f/3);a.lineTo(d,f/3);
+a.moveTo(d/2,2*f/3);a.lineTo(0,f);a.moveTo(d/2,2*f/3);a.lineTo(d,f);a.end();a.stroke()};mxCellRenderer.prototype.defaultShapes.umlActor=C;mxUtils.extend(B,mxShape);B.prototype.getLabelMargins=function(a){return new mxRectangle(a.width/6,0,0,0)};B.prototype.paintBackground=function(a,c,b,d,f){a.translate(c,b);a.begin();a.moveTo(0,f/4);a.lineTo(0,3*f/4);a.end();a.stroke();a.begin();a.moveTo(0,f/2);a.lineTo(d/6,f/2);a.end();a.stroke();a.ellipse(d/6,0,5*d/6,f);a.fillAndStroke()};mxCellRenderer.prototype.defaultShapes.umlBoundary=
+B;mxUtils.extend(E,mxEllipse);E.prototype.paintVertexShape=function(a,c,b,d,f){mxEllipse.prototype.paintVertexShape.apply(this,arguments);a.begin();a.moveTo(c+d/8,b+f);a.lineTo(c+7*d/8,b+f);a.end();a.stroke()};mxCellRenderer.prototype.defaultShapes.umlEntity=E;mxUtils.extend(y,mxShape);y.prototype.paintVertexShape=function(a,c,b,d,f){a.translate(c,b);a.begin();a.moveTo(d,0);a.lineTo(0,f);a.moveTo(0,0);a.lineTo(d,f);a.end();a.stroke()};mxCellRenderer.prototype.defaultShapes.umlDestroy=y;mxUtils.extend(O,
+mxShape);O.prototype.getLabelBounds=function(a){return new mxRectangle(a.x,a.y+a.height/8,a.width,7*a.height/8)};O.prototype.paintBackground=function(a,c,b,d,f){a.translate(c,b);a.begin();a.moveTo(3*d/8,f/8*1.1);a.lineTo(5*d/8,0);a.end();a.stroke();a.ellipse(0,f/8,d,7*f/8);a.fillAndStroke()};O.prototype.paintForeground=function(a,c,b,d,f){a.begin();a.moveTo(3*d/8,f/8*1.1);a.lineTo(5*d/8,f/4);a.end();a.stroke()};mxCellRenderer.prototype.defaultShapes.umlControl=O;mxUtils.extend(J,mxRectangleShape);
+J.prototype.size=40;J.prototype.isHtmlAllowed=function(){return!1};J.prototype.getLabelBounds=function(a){var c=Math.max(0,Math.min(a.height,parseFloat(mxUtils.getValue(this.style,"size",this.size))*this.scale));return new mxRectangle(a.x,a.y,a.width,c)};J.prototype.paintBackground=function(a,c,b,d,f){var g=Math.max(0,Math.min(f,parseFloat(mxUtils.getValue(this.style,"size",this.size)))),e=mxUtils.getValue(this.style,"participant");null==e||null==this.state?mxRectangleShape.prototype.paintBackground.call(this,
+a,c,b,d,g):(e=this.state.view.graph.cellRenderer.getShape(e),null!=e&&e!=J&&(e=new e,e.apply(this.state),a.save(),e.paintVertexShape(a,c,b,d,g),a.restore()));g<f&&(a.setDashed(!0),a.begin(),a.moveTo(c+d/2,b+g),a.lineTo(c+d/2,b+f),a.end(),a.stroke())};J.prototype.paintForeground=function(a,c,b,d,f){var g=Math.max(0,Math.min(f,parseFloat(mxUtils.getValue(this.style,"size",this.size))));mxRectangleShape.prototype.paintForeground.call(this,a,c,b,d,Math.min(f,g))};mxCellRenderer.prototype.defaultShapes.umlLifeline=
+J;mxUtils.extend(F,mxShape);F.prototype.width=60;F.prototype.height=30;F.prototype.corner=10;F.prototype.getLabelMargins=function(a){return new mxRectangle(0,0,a.width-parseFloat(mxUtils.getValue(this.style,"width",this.width)*this.scale),a.height-parseFloat(mxUtils.getValue(this.style,"height",this.height)*this.scale))};F.prototype.paintBackground=function(a,c,b,d,f){var g=this.corner,e=Math.min(d,Math.max(g,parseFloat(mxUtils.getValue(this.style,"width",this.width)))),k=Math.min(f,Math.max(1.5*
+g,parseFloat(mxUtils.getValue(this.style,"height",this.height))));a.begin();a.moveTo(c,b);a.lineTo(c+e,b);a.lineTo(c+e,b+Math.max(0,k-1.5*g));a.lineTo(c+Math.max(0,e-g),b+k);a.lineTo(c,b+k);a.close();a.fillAndStroke();a.begin();a.moveTo(c+e,b);a.lineTo(c+d,b);a.lineTo(c+d,b+f);a.lineTo(c,b+f);a.lineTo(c,b+k);a.stroke()};mxCellRenderer.prototype.defaultShapes.umlFrame=F;mxPerimeter.LifelinePerimeter=function(a,c,b,d){d=J.prototype.size;null!=c&&(d=mxUtils.getValue(c.style,"size",d)*c.view.scale);c=
+parseFloat(c.style[mxConstants.STYLE_STROKEWIDTH]||1)*c.view.scale/2-1;b.x<a.getCenterX()&&(c=-1*(c+1));return new mxPoint(a.getCenterX()+c,Math.min(a.y+a.height,Math.max(a.y+d,b.y)))};mxStyleRegistry.putValue("lifelinePerimeter",mxPerimeter.LifelinePerimeter);mxPerimeter.OrthogonalPerimeter=function(a,c,b,d){d=!0;return mxPerimeter.RectanglePerimeter.apply(this,arguments)};mxStyleRegistry.putValue("orthogonalPerimeter",mxPerimeter.OrthogonalPerimeter);mxPerimeter.BackbonePerimeter=function(a,c,b,
+d){d=parseFloat(c.style[mxConstants.STYLE_STROKEWIDTH]||1)*c.view.scale/2-1;null!=c.style.backboneSize&&(d+=parseFloat(c.style.backboneSize)*c.view.scale/2-1);if("south"==c.style[mxConstants.STYLE_DIRECTION]||"north"==c.style[mxConstants.STYLE_DIRECTION])return b.x<a.getCenterX()&&(d=-1*(d+1)),new mxPoint(a.getCenterX()+d,Math.min(a.y+a.height,Math.max(a.y,b.y)));b.y<a.getCenterY()&&(d=-1*(d+1));return new mxPoint(Math.min(a.x+a.width,Math.max(a.x,b.x)),a.getCenterY()+d)};mxStyleRegistry.putValue("backbonePerimeter",
+mxPerimeter.BackbonePerimeter);mxPerimeter.CalloutPerimeter=function(a,c,b,d){return mxPerimeter.RectanglePerimeter(mxUtils.getDirectedBounds(a,new mxRectangle(0,0,0,Math.max(0,Math.min(a.height,parseFloat(mxUtils.getValue(c.style,"size",t.prototype.size))*c.view.scale))),c.style),c,b,d)};mxStyleRegistry.putValue("calloutPerimeter",mxPerimeter.CalloutPerimeter);mxPerimeter.ParallelogramPerimeter=function(a,c,b,d){var f=g.prototype.size;null!=c&&(f=mxUtils.getValue(c.style,"size",f));var e=a.x,k=a.y,
+p=a.width,m=a.height;c=null!=c?mxUtils.getValue(c.style,mxConstants.STYLE_DIRECTION,mxConstants.DIRECTION_EAST):mxConstants.DIRECTION_EAST;c==mxConstants.DIRECTION_NORTH||c==mxConstants.DIRECTION_SOUTH?(f=m*Math.max(0,Math.min(1,f)),k=[new mxPoint(e,k),new mxPoint(e+p,k+f),new mxPoint(e+p,k+m),new mxPoint(e,k+m-f),new mxPoint(e,k)]):(f=p*Math.max(0,Math.min(1,f)),k=[new mxPoint(e+f,k),new mxPoint(e+p,k),new mxPoint(e+p-f,k+m),new mxPoint(e,k+m),new mxPoint(e+f,k)]);m=a.getCenterX();a=a.getCenterY();
+a=new mxPoint(m,a);d&&(b.x<e||b.x>e+p?a.y=b.y:a.x=b.x);return mxUtils.getPerimeterPoint(k,a,b)};mxStyleRegistry.putValue("parallelogramPerimeter",mxPerimeter.ParallelogramPerimeter);mxPerimeter.TrapezoidPerimeter=function(a,c,b,d){var f=p.prototype.size;null!=c&&(f=mxUtils.getValue(c.style,"size",f));var g=a.x,e=a.y,k=a.width,m=a.height;c=null!=c?mxUtils.getValue(c.style,mxConstants.STYLE_DIRECTION,mxConstants.DIRECTION_EAST):mxConstants.DIRECTION_EAST;c==mxConstants.DIRECTION_EAST?(f=k*Math.max(0,
+Math.min(1,f)),e=[new mxPoint(g+f,e),new mxPoint(g+k-f,e),new mxPoint(g+k,e+m),new mxPoint(g,e+m),new mxPoint(g+f,e)]):c==mxConstants.DIRECTION_WEST?(f=k*Math.max(0,Math.min(1,f)),e=[new mxPoint(g,e),new mxPoint(g+k,e),new mxPoint(g+k-f,e+m),new mxPoint(g+f,e+m),new mxPoint(g,e)]):c==mxConstants.DIRECTION_NORTH?(f=m*Math.max(0,Math.min(1,f)),e=[new mxPoint(g,e+f),new mxPoint(g+k,e),new mxPoint(g+k,e+m),new mxPoint(g,e+m-f),new mxPoint(g,e+f)]):(f=m*Math.max(0,Math.min(1,f)),e=[new mxPoint(g,e),new mxPoint(g+
+k,e+f),new mxPoint(g+k,e+m-f),new mxPoint(g,e+m),new mxPoint(g,e)]);m=a.getCenterX();a=a.getCenterY();a=new mxPoint(m,a);d&&(b.x<g||b.x>g+k?a.y=b.y:a.x=b.x);return mxUtils.getPerimeterPoint(e,a,b)};mxStyleRegistry.putValue("trapezoidPerimeter",mxPerimeter.TrapezoidPerimeter);mxPerimeter.StepPerimeter=function(a,c,b,d){var f=x.prototype.size;null!=c&&(f=mxUtils.getValue(c.style,"size",f));var g=a.x,e=a.y,k=a.width,p=a.height,m=a.getCenterX();a=a.getCenterY();c=null!=c?mxUtils.getValue(c.style,mxConstants.STYLE_DIRECTION,
+mxConstants.DIRECTION_EAST):mxConstants.DIRECTION_EAST;c==mxConstants.DIRECTION_EAST?(f=k*Math.max(0,Math.min(1,f)),e=[new mxPoint(g,e),new mxPoint(g+k-f,e),new mxPoint(g+k,a),new mxPoint(g+k-f,e+p),new mxPoint(g,e+p),new mxPoint(g+f,a),new mxPoint(g,e)]):c==mxConstants.DIRECTION_WEST?(f=k*Math.max(0,Math.min(1,f)),e=[new mxPoint(g+f,e),new mxPoint(g+k,e),new mxPoint(g+k-f,a),new mxPoint(g+k,e+p),new mxPoint(g+f,e+p),new mxPoint(g,a),new mxPoint(g+f,e)]):c==mxConstants.DIRECTION_NORTH?(f=p*Math.max(0,
+Math.min(1,f)),e=[new mxPoint(g,e+f),new mxPoint(m,e),new mxPoint(g+k,e+f),new mxPoint(g+k,e+p),new mxPoint(m,e+p-f),new mxPoint(g,e+p),new mxPoint(g,e+f)]):(f=p*Math.max(0,Math.min(1,f)),e=[new mxPoint(g,e),new mxPoint(m,e+f),new mxPoint(g+k,e),new mxPoint(g+k,e+p-f),new mxPoint(m,e+p),new mxPoint(g,e+p-f),new mxPoint(g,e)]);m=new mxPoint(m,a);d&&(b.x<g||b.x>g+k?m.y=b.y:m.x=b.x);return mxUtils.getPerimeterPoint(e,m,b)};mxStyleRegistry.putValue("stepPerimeter",mxPerimeter.StepPerimeter);mxPerimeter.HexagonPerimeter2=
+function(a,c,b,d){var f=w.prototype.size;null!=c&&(f=mxUtils.getValue(c.style,"size",f));var g=a.x,e=a.y,k=a.width,p=a.height,m=a.getCenterX();a=a.getCenterY();c=null!=c?mxUtils.getValue(c.style,mxConstants.STYLE_DIRECTION,mxConstants.DIRECTION_EAST):mxConstants.DIRECTION_EAST;c==mxConstants.DIRECTION_NORTH||c==mxConstants.DIRECTION_SOUTH?(f=p*Math.max(0,Math.min(1,f)),e=[new mxPoint(m,e),new mxPoint(g+k,e+f),new mxPoint(g+k,e+p-f),new mxPoint(m,e+p),new mxPoint(g,e+p-f),new mxPoint(g,e+f),new mxPoint(m,
+e)]):(f=k*Math.max(0,Math.min(1,f)),e=[new mxPoint(g+f,e),new mxPoint(g+k-f,e),new mxPoint(g+k,a),new mxPoint(g+k-f,e+p),new mxPoint(g+f,e+p),new mxPoint(g,a),new mxPoint(g+f,e)]);m=new mxPoint(m,a);d&&(b.x<g||b.x>g+k?m.y=b.y:m.x=b.x);return mxUtils.getPerimeterPoint(e,m,b)};mxStyleRegistry.putValue("hexagonPerimeter2",mxPerimeter.HexagonPerimeter2);mxUtils.extend(R,mxShape);R.prototype.size=10;R.prototype.paintBackground=function(a,c,b,d,f){var g=parseFloat(mxUtils.getValue(this.style,"size",this.size));
+a.translate(c,b);a.ellipse((d-g)/2,0,g,g);a.fillAndStroke();a.begin();a.moveTo(d/2,g);a.lineTo(d/2,f);a.end();a.stroke()};mxCellRenderer.prototype.defaultShapes.lollipop=R;mxUtils.extend(P,mxShape);P.prototype.size=10;P.prototype.inset=2;P.prototype.paintBackground=function(a,c,b,d,f){var g=parseFloat(mxUtils.getValue(this.style,"size",this.size)),e=parseFloat(mxUtils.getValue(this.style,"inset",this.inset))+this.strokewidth;a.translate(c,b);a.begin();a.moveTo(d/2,g+e);a.lineTo(d/2,f);a.end();a.stroke();
+a.begin();a.moveTo((d-g)/2-e,g/2);a.quadTo((d-g)/2-e,g+e,d/2,g+e);a.quadTo((d+g)/2+e,g+e,(d+g)/2+e,g/2);a.end();a.stroke()};mxCellRenderer.prototype.defaultShapes.requires=P;mxUtils.extend(I,mxCylinder);I.prototype.jettyWidth=32;I.prototype.jettyHeight=12;I.prototype.redrawPath=function(a,c,b,d,f,g){var e=parseFloat(mxUtils.getValue(this.style,"jettyWidth",this.jettyWidth));c=parseFloat(mxUtils.getValue(this.style,"jettyHeight",this.jettyHeight));b=e/2;var e=b+e/2,k=.3*f-c/2,p=.7*f-c/2;g?(a.moveTo(b,
+k),a.lineTo(e,k),a.lineTo(e,k+c),a.lineTo(b,k+c),a.moveTo(b,p),a.lineTo(e,p),a.lineTo(e,p+c),a.lineTo(b,p+c)):(a.moveTo(b,0),a.lineTo(d,0),a.lineTo(d,f),a.lineTo(b,f),a.lineTo(b,p+c),a.lineTo(0,p+c),a.lineTo(0,p),a.lineTo(b,p),a.lineTo(b,k+c),a.lineTo(0,k+c),a.lineTo(0,k),a.lineTo(b,k),a.close());a.end()};mxCellRenderer.prototype.defaultShapes.component=I;mxUtils.extend(S,mxDoubleEllipse);S.prototype.outerStroke=!0;S.prototype.paintVertexShape=function(a,c,b,d,f){var g=Math.min(4,Math.min(d/5,f/5));
+0<d&&0<f&&(a.ellipse(c+g,b+g,d-2*g,f-2*g),a.fillAndStroke());a.setShadow(!1);this.outerStroke&&(a.ellipse(c,b,d,f),a.stroke())};mxCellRenderer.prototype.defaultShapes.endState=S;mxUtils.extend(H,S);H.prototype.outerStroke=!1;mxCellRenderer.prototype.defaultShapes.startState=H;mxUtils.extend(L,mxArrowConnector);L.prototype.defaultWidth=4;L.prototype.isOpenEnded=function(){return!0};L.prototype.getEdgeWidth=function(){return mxUtils.getNumber(this.style,"width",this.defaultWidth)+Math.max(0,this.strokewidth-
+1)};L.prototype.isArrowRounded=function(){return this.isRounded};mxCellRenderer.prototype.defaultShapes.link=L;mxUtils.extend(Q,mxArrowConnector);Q.prototype.defaultWidth=10;Q.prototype.defaultArrowWidth=20;Q.prototype.getStartArrowWidth=function(){return this.getEdgeWidth()+mxUtils.getNumber(this.style,"startWidth",this.defaultArrowWidth)};Q.prototype.getEndArrowWidth=function(){return this.getEdgeWidth()+mxUtils.getNumber(this.style,"endWidth",this.defaultArrowWidth)};Q.prototype.getEdgeWidth=function(){return mxUtils.getNumber(this.style,
+"width",this.defaultWidth)+Math.max(0,this.strokewidth-1)};mxCellRenderer.prototype.defaultShapes.flexArrow=Q;mxUtils.extend(G,mxActor);G.prototype.size=30;G.prototype.redrawPath=function(a,c,b,d,f){c=Math.min(f,parseFloat(mxUtils.getValue(this.style,"size",this.size)));b=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(a,[new mxPoint(0,f),new mxPoint(0,c),new mxPoint(d,0),new mxPoint(d,f)],this.isRounded,b,!0);a.end()};mxCellRenderer.prototype.defaultShapes.manualInput=
+G;mxUtils.extend(V,mxRectangleShape);V.prototype.dx=20;V.prototype.dy=20;V.prototype.isHtmlAllowed=function(){return!1};V.prototype.paintForeground=function(a,c,b,d,f){mxRectangleShape.prototype.paintForeground.apply(this,arguments);var g=0;if(this.isRounded)var e=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,100*mxConstants.RECTANGLE_ROUNDING_FACTOR)/100,g=Math.max(g,Math.min(d*e,f*e));e=Math.max(g,Math.min(d,parseFloat(mxUtils.getValue(this.style,"dx",this.dx))));g=Math.max(g,Math.min(f,
+parseFloat(mxUtils.getValue(this.style,"dy",this.dy))));a.begin();a.moveTo(c,b+g);a.lineTo(c+d,b+g);a.end();a.stroke();a.begin();a.moveTo(c+e,b);a.lineTo(c+e,b+f);a.end();a.stroke()};mxCellRenderer.prototype.defaultShapes.internalStorage=V;mxUtils.extend(M,mxActor);M.prototype.dx=20;M.prototype.dy=20;M.prototype.redrawPath=function(a,c,b,d,f){c=Math.max(0,Math.min(d,parseFloat(mxUtils.getValue(this.style,"dx",this.dx))));b=Math.max(0,Math.min(f,parseFloat(mxUtils.getValue(this.style,"dy",this.dy))));
+parseFloat(mxUtils.getValue(this.style,"size",this.size));var g=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(a,[new mxPoint(0,0),new mxPoint(d,0),new mxPoint(d,b),new mxPoint(c,b),new mxPoint(c,f),new mxPoint(0,f)],this.isRounded,g,!0);a.end()};mxCellRenderer.prototype.defaultShapes.corner=M;mxUtils.extend(Y,mxActor);Y.prototype.redrawPath=function(a,c,b,d,f){a.moveTo(0,0);a.lineTo(0,f);a.end();a.moveTo(d,0);a.lineTo(d,f);a.end();a.moveTo(0,f/2);
+a.lineTo(d,f/2);a.end()};mxCellRenderer.prototype.defaultShapes.crossbar=Y;mxUtils.extend(T,mxActor);T.prototype.dx=20;T.prototype.dy=20;T.prototype.redrawPath=function(a,c,b,d,f){c=Math.max(0,Math.min(d,parseFloat(mxUtils.getValue(this.style,"dx",this.dx))));b=Math.max(0,Math.min(f,parseFloat(mxUtils.getValue(this.style,"dy",this.dy))));parseFloat(mxUtils.getValue(this.style,"size",this.size));var g=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(a,
+[new mxPoint(0,0),new mxPoint(d,0),new mxPoint(d,b),new mxPoint((d+c)/2,b),new mxPoint((d+c)/2,f),new mxPoint((d-c)/2,f),new mxPoint((d-c)/2,b),new mxPoint(0,b)],this.isRounded,g,!0);a.end()};mxCellRenderer.prototype.defaultShapes.tee=T;mxUtils.extend(K,mxActor);K.prototype.arrowWidth=.3;K.prototype.arrowSize=.2;K.prototype.redrawPath=function(a,c,b,d,f){var g=f*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"arrowWidth",this.arrowWidth))));c=d*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,
+"arrowSize",this.arrowSize))));b=(f-g)/2;var g=b+g,e=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(a,[new mxPoint(0,b),new mxPoint(d-c,b),new mxPoint(d-c,0),new mxPoint(d,f/2),new mxPoint(d-c,f),new mxPoint(d-c,g),new mxPoint(0,g)],this.isRounded,e,!0);a.end()};mxCellRenderer.prototype.defaultShapes.singleArrow=K;mxUtils.extend(U,mxActor);U.prototype.redrawPath=function(a,c,b,d,f){var g=f*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,
+"arrowWidth",K.prototype.arrowWidth))));c=d*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"arrowSize",K.prototype.arrowSize))));b=(f-g)/2;var g=b+g,e=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(a,[new mxPoint(0,f/2),new mxPoint(c,0),new mxPoint(c,b),new mxPoint(d-c,b),new mxPoint(d-c,0),new mxPoint(d,f/2),new mxPoint(d-c,f),new mxPoint(d-c,g),new mxPoint(c,g),new mxPoint(c,f)],this.isRounded,e,!0);a.end()};mxCellRenderer.prototype.defaultShapes.doubleArrow=
+U;mxUtils.extend(W,mxActor);W.prototype.size=.1;W.prototype.redrawPath=function(a,c,b,d,f){c=d*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));a.moveTo(c,0);a.lineTo(d,0);a.quadTo(d-2*c,f/2,d,f);a.lineTo(c,f);a.quadTo(c-2*c,f/2,c,0);a.close();a.end()};mxCellRenderer.prototype.defaultShapes.dataStorage=W;mxUtils.extend(X,mxActor);X.prototype.redrawPath=function(a,c,b,d,f){a.moveTo(0,0);a.quadTo(d,0,d,f/2);a.quadTo(d,f,0,f);a.close();a.end()};mxCellRenderer.prototype.defaultShapes.or=
+X;mxUtils.extend(ba,mxActor);ba.prototype.redrawPath=function(a,c,b,d,f){a.moveTo(0,0);a.quadTo(d,0,d,f/2);a.quadTo(d,f,0,f);a.quadTo(d/2,f/2,0,0);a.close();a.end()};mxCellRenderer.prototype.defaultShapes.xor=ba;mxUtils.extend(Z,mxActor);Z.prototype.size=20;Z.prototype.redrawPath=function(a,c,b,d,f){c=Math.min(d/2,Math.min(f,parseFloat(mxUtils.getValue(this.style,"size",this.size))));b=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(a,[new mxPoint(c,
+0),new mxPoint(d-c,0),new mxPoint(d,.8*c),new mxPoint(d,f),new mxPoint(0,f),new mxPoint(0,.8*c)],this.isRounded,b,!0);a.end()};mxCellRenderer.prototype.defaultShapes.loopLimit=Z;mxUtils.extend(ca,mxActor);ca.prototype.size=.375;ca.prototype.redrawPath=function(a,c,b,d,f){c=f*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));b=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(a,[new mxPoint(0,0),new mxPoint(d,0),new mxPoint(d,
+f-c),new mxPoint(d/2,f),new mxPoint(0,f-c)],this.isRounded,b,!0);a.end()};mxCellRenderer.prototype.defaultShapes.offPageConnector=ca;mxUtils.extend(da,mxEllipse);da.prototype.paintVertexShape=function(a,c,b,d,f){mxEllipse.prototype.paintVertexShape.apply(this,arguments);a.begin();a.moveTo(c+d/2,b+f);a.lineTo(c+d,b+f);a.end();a.stroke()};mxCellRenderer.prototype.defaultShapes.tapeData=da;mxUtils.extend(ma,mxEllipse);ma.prototype.paintVertexShape=function(a,c,b,d,f){mxEllipse.prototype.paintVertexShape.apply(this,
+arguments);a.setShadow(!1);a.begin();a.moveTo(c,b+f/2);a.lineTo(c+d,b+f/2);a.end();a.stroke();a.begin();a.moveTo(c+d/2,b);a.lineTo(c+d/2,b+f);a.end();a.stroke()};mxCellRenderer.prototype.defaultShapes.orEllipse=ma;mxUtils.extend(aa,mxEllipse);aa.prototype.paintVertexShape=function(a,c,b,d,f){mxEllipse.prototype.paintVertexShape.apply(this,arguments);a.setShadow(!1);a.begin();a.moveTo(c+.145*d,b+.145*f);a.lineTo(c+.855*d,b+.855*f);a.end();a.stroke();a.begin();a.moveTo(c+.855*d,b+.145*f);a.lineTo(c+
+.145*d,b+.855*f);a.end();a.stroke()};mxCellRenderer.prototype.defaultShapes.sumEllipse=aa;mxUtils.extend(ja,mxRhombus);ja.prototype.paintVertexShape=function(a,c,b,d,f){mxRhombus.prototype.paintVertexShape.apply(this,arguments);a.setShadow(!1);a.begin();a.moveTo(c,b+f/2);a.lineTo(c+d,b+f/2);a.end();a.stroke()};mxCellRenderer.prototype.defaultShapes.sortShape=ja;mxUtils.extend(ea,mxEllipse);ea.prototype.paintVertexShape=function(a,c,b,d,f){a.begin();a.moveTo(c,b);a.lineTo(c+d,b);a.lineTo(c+d/2,b+f/
+2);a.close();a.fillAndStroke();a.begin();a.moveTo(c,b+f);a.lineTo(c+d,b+f);a.lineTo(c+d/2,b+f/2);a.close();a.fillAndStroke()};mxCellRenderer.prototype.defaultShapes.collate=ea;mxUtils.extend(pa,mxEllipse);pa.prototype.paintVertexShape=function(a,c,b,d,f){var g=b+f-5;a.begin();a.moveTo(c,b);a.lineTo(c,b+f);a.moveTo(c,g);a.lineTo(c+10,g-5);a.moveTo(c,g);a.lineTo(c+10,g+5);a.moveTo(c,g);a.lineTo(c+d,g);a.moveTo(c+d,b);a.lineTo(c+d,b+f);a.moveTo(c+d,g);a.lineTo(c+d-10,g-5);a.moveTo(c+d,g);a.lineTo(c+
+d-10,g+5);a.end();a.stroke()};mxCellRenderer.prototype.defaultShapes.dimension=pa;mxUtils.extend(qa,mxEllipse);qa.prototype.paintVertexShape=function(a,c,b,d,f){this.outline||a.setStrokeColor(null);mxRectangleShape.prototype.paintBackground.apply(this,arguments);null!=this.style&&(a.setStrokeColor(this.stroke),a.rect(c,b,d,f),a.fill(),a.begin(),a.moveTo(c,b),"1"==mxUtils.getValue(this.style,"top","1")?a.lineTo(c+d,b):a.moveTo(c+d,b),"1"==mxUtils.getValue(this.style,"right","1")?a.lineTo(c+d,b+f):
+a.moveTo(c+d,b+f),"1"==mxUtils.getValue(this.style,"bottom","1")?a.lineTo(c,b+f):a.moveTo(c,b+f),"1"==mxUtils.getValue(this.style,"left","1")&&a.lineTo(c,b-this.strokewidth/2),a.end(),a.stroke())};mxCellRenderer.prototype.defaultShapes.partialRectangle=qa;mxUtils.extend(ta,mxEllipse);ta.prototype.paintVertexShape=function(a,c,b,d,f){mxEllipse.prototype.paintVertexShape.apply(this,arguments);a.setShadow(!1);a.begin();"vertical"==mxUtils.getValue(this.style,"line")?(a.moveTo(c+d/2,b),a.lineTo(c+d/2,
+b+f)):(a.moveTo(c,b+f/2),a.lineTo(c+d,b+f/2));a.end();a.stroke()};mxCellRenderer.prototype.defaultShapes.lineEllipse=ta;mxUtils.extend(ua,mxActor);ua.prototype.redrawPath=function(a,c,b,d,f){c=Math.min(d,f/2);a.moveTo(0,0);a.lineTo(d-c,0);a.quadTo(d,0,d,f/2);a.quadTo(d,f,d-c,f);a.lineTo(0,f);a.close();a.end()};mxCellRenderer.prototype.defaultShapes.delay=ua;mxUtils.extend(na,mxActor);na.prototype.size=.2;na.prototype.redrawPath=function(a,c,b,d,f){c=Math.min(f,d);var g=Math.max(0,Math.min(c,c*parseFloat(mxUtils.getValue(this.style,
+"size",this.size))));c=(f-g)/2;b=c+g;var e=(d-g)/2,g=e+g;a.moveTo(0,c);a.lineTo(e,c);a.lineTo(e,0);a.lineTo(g,0);a.lineTo(g,c);a.lineTo(d,c);a.lineTo(d,b);a.lineTo(g,b);a.lineTo(g,f);a.lineTo(e,f);a.lineTo(e,b);a.lineTo(0,b);a.close();a.end()};mxCellRenderer.prototype.defaultShapes.cross=na;mxUtils.extend(oa,mxActor);oa.prototype.size=.25;oa.prototype.redrawPath=function(a,c,b,d,f){c=Math.min(d,f/2);b=Math.min(d-c,Math.max(0,parseFloat(mxUtils.getValue(this.style,"size",this.size)))*d);a.moveTo(0,
+f/2);a.lineTo(b,0);a.lineTo(d-c,0);a.quadTo(d,0,d,f/2);a.quadTo(d,f,d-c,f);a.lineTo(b,f);a.close();a.end()};mxCellRenderer.prototype.defaultShapes.display=oa;mxUtils.extend(ka,mxConnector);ka.prototype.origPaintEdgeShape=ka.prototype.paintEdgeShape;ka.prototype.paintEdgeShape=function(a,c,b){var d=a.state.dashed,f=a.state.fixDash;ka.prototype.origPaintEdgeShape.apply(this,arguments);if(3<=a.state.strokeWidth){var g=mxUtils.getValue(this.style,"fillColor",null);null!=g&&(a.setStrokeColor(g),a.setStrokeWidth(a.state.strokeWidth-
+2),a.setDashed(d,f),ka.prototype.origPaintEdgeShape.apply(this,arguments))}};mxCellRenderer.prototype.defaultShapes.filledEdge=ka;mxMarker.addMarker("dash",function(a,c,b,d,f,g,e,k,p,m){var t=f*(e+p+1),v=g*(e+p+1);return function(){a.begin();a.moveTo(d.x-t/2-v/2,d.y-v/2+t/2);a.lineTo(d.x+v/2-3*t/2,d.y-3*v/2-t/2);a.stroke()}});mxMarker.addMarker("cross",function(a,c,b,d,f,g,e,k,p,m){var t=f*(e+p+1),v=g*(e+p+1);return function(){a.begin();a.moveTo(d.x-t/2-v/2,d.y-v/2+t/2);a.lineTo(d.x+v/2-3*t/2,d.y-
+3*v/2-t/2);a.moveTo(d.x-t/2+v/2,d.y-v/2-t/2);a.lineTo(d.x-v/2-3*t/2,d.y-3*v/2+t/2);a.stroke()}});mxMarker.addMarker("circle",Ba);mxMarker.addMarker("circlePlus",function(a,c,b,d,f,g,e,k,p,m){var t=d.clone(),v=Ba.apply(this,arguments),r=f*(e+2*p),h=g*(e+2*p);return function(){v.apply(this,arguments);a.begin();a.moveTo(t.x-f*p,t.y-g*p);a.lineTo(t.x-2*r+f*p,t.y-2*h+g*p);a.moveTo(t.x-r-h+g*p,t.y-h+r-f*p);a.lineTo(t.x+h-r-g*p,t.y-h-r+f*p);a.stroke()}});mxMarker.addMarker("async",function(a,c,b,d,f,g,e,
+k,p,m){c=f*p*1.118;b=g*p*1.118;f*=e+p;g*=e+p;var t=d.clone();t.x-=c;t.y-=b;d.x+=1*-f-c;d.y+=1*-g-b;return function(){a.begin();a.moveTo(t.x,t.y);k?a.lineTo(t.x-f-g/2,t.y-g+f/2):a.lineTo(t.x+g/2-f,t.y-g-f/2);a.lineTo(t.x-f,t.y-g);a.close();m?a.fillAndStroke():a.stroke()}});mxMarker.addMarker("openAsync",function(a){a=null!=a?a:2;return function(c,b,d,f,g,e,k,p,m,t){g*=k+m;e*=k+m;var v=f.clone();return function(){c.begin();c.moveTo(v.x,v.y);p?c.lineTo(v.x-g-e/a,v.y-e+g/a):c.lineTo(v.x+e/a-g,v.y-e-g/
+a);c.stroke()}}}(2));if("undefined"!==typeof mxVertexHandler){var Da=function(a,c,b){return ra(a,["width"],c,function(c,d,f,g,e){e=a.shape.getEdgeWidth()*a.view.scale+b;return new mxPoint(g.x+d*c/4+f*e/2,g.y+f*c/4-d*e/2)},function(c,d,f,g,e,k){c=Math.sqrt(mxUtils.ptSegDistSq(g.x,g.y,e.x,e.y,k.x,k.y));a.style.width=Math.round(2*c)/a.view.scale-b})},ra=function(a,c,b,d,f){var g=a.absolutePoints,e=g.length-1,k=a.view.translate,p=a.view.scale,m=b?g[0]:g[e],t=b?g[1]:g[e-1],v=t.x-m.x,r=t.y-m.y,h=Math.sqrt(v*
+v+r*r);return N(a,c,function(a){a=d.call(this,h,v/h,r/h,m,t);return new mxPoint(a.x/p-k.x,a.y/p-k.y)},function(a,c,b){a=Math.sqrt(v*v+r*r);c.x=(c.x+k.x)*p;c.y=(c.y+k.y)*p;f.call(this,a,v/a,r/a,m,t,c,b)})},ia=function(a){return function(c){return[N(c,["arrowWidth","arrowSize"],function(c){var b=Math.max(0,Math.min(1,mxUtils.getValue(this.state.style,"arrowWidth",K.prototype.arrowWidth))),d=Math.max(0,Math.min(a,mxUtils.getValue(this.state.style,"arrowSize",K.prototype.arrowSize)));return new mxPoint(c.x+
+(1-d)*c.width,c.y+(1-b)*c.height/2)},function(c,b){this.state.style.arrowWidth=Math.max(0,Math.min(1,Math.abs(c.y+c.height/2-b.y)/c.height*2));this.state.style.arrowSize=Math.max(0,Math.min(a,(c.x+c.width-b.x)/c.width))})]}},za=function(a,c,b){return function(d){var f=[N(d,["size"],function(b){var d=Math.max(0,Math.min(b.width,Math.min(b.height,parseFloat(mxUtils.getValue(this.state.style,"size",c)))))*a;return new mxPoint(b.x+d,b.y+d)},function(c,b){this.state.style.size=Math.round(Math.max(0,Math.min(Math.min(c.width,
+b.x-c.x),Math.min(c.height,b.y-c.y)))/a)})];b&&mxUtils.getValue(d.style,mxConstants.STYLE_ROUNDED,!1)&&f.push(fa(d));return f}},va=function(a,c,b,d){b=null!=b?b:1;return function(f){var g=[N(f,["size"],function(c){var b=parseFloat(mxUtils.getValue(this.state.style,"size",a));return new mxPoint(c.x+b*c.width,c.getCenterY())},function(a,c){this.state.style.size=Math.max(0,Math.min(b,(c.x-a.x)/a.width))},null,d)];c&&mxUtils.getValue(f.style,mxConstants.STYLE_ROUNDED,!1)&&g.push(fa(f));return g}},Ea=
+function(a){return function(c){var b=[N(c,["size"],function(c){var b=Math.max(0,Math.min(a,parseFloat(mxUtils.getValue(this.state.style,"size",p.prototype.size))));return new mxPoint(c.x+b*c.width*.75,c.y+c.height/4)},function(c,b){this.state.style.size=Math.max(0,Math.min(a,(b.x-c.x)/(.75*c.width)))},null,!0)];mxUtils.getValue(c.style,mxConstants.STYLE_ROUNDED,!1)&&b.push(fa(c));return b}},sa=function(){return function(a){var c=[];mxUtils.getValue(a.style,mxConstants.STYLE_ROUNDED,!1)&&c.push(fa(a));
+return c}},fa=function(a,c){return N(a,[mxConstants.STYLE_ARCSIZE],function(b){var d=null!=c?c:b.height/8;if("1"==mxUtils.getValue(a.style,mxConstants.STYLE_ABSOLUTE_ARCSIZE,0)){var f=mxUtils.getValue(a.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;return new mxPoint(b.x+b.width-Math.min(b.width/2,f),b.y+d)}f=Math.max(0,parseFloat(mxUtils.getValue(a.style,mxConstants.STYLE_ARCSIZE,100*mxConstants.RECTANGLE_ROUNDING_FACTOR)))/100;return new mxPoint(b.x+b.width-Math.min(Math.max(b.width/
+2,b.height/2),Math.min(b.width,b.height)*f),b.y+d)},function(c,b,d){"1"==mxUtils.getValue(a.style,mxConstants.STYLE_ABSOLUTE_ARCSIZE,0)?this.state.style[mxConstants.STYLE_ARCSIZE]=Math.round(Math.max(0,Math.min(c.width,2*(c.x+c.width-b.x)))):this.state.style[mxConstants.STYLE_ARCSIZE]=Math.round(Math.min(50,Math.max(0,100*(c.width-b.x+c.x)/Math.min(c.width,c.height))))})},N=function(a,c,b,d,f,g){var e=new mxHandle(a,null,mxVertexHandler.prototype.secondaryHandleImage);e.execute=function(){for(var a=
+0;a<c.length;a++)this.copyStyle(c[a])};e.getPosition=b;e.setPosition=d;e.ignoreGrid=null!=f?f:!0;if(g){var k=e.positionChanged;e.positionChanged=function(){k.apply(this,arguments);a.view.invalidate(this.state.cell);a.view.validate()}}return e},Aa={link:function(a){return[Da(a,!0,10),Da(a,!1,10)]},flexArrow:function(a){var c=a.view.graph.gridSize/a.view.scale,b=[];mxUtils.getValue(a.style,mxConstants.STYLE_STARTARROW,mxConstants.NONE)!=mxConstants.NONE&&(b.push(ra(a,["width",mxConstants.STYLE_STARTSIZE,
+mxConstants.STYLE_ENDSIZE],!0,function(c,b,d,f,g){c=(a.shape.getEdgeWidth()-a.shape.strokewidth)*a.view.scale;g=3*mxUtils.getNumber(a.style,mxConstants.STYLE_STARTSIZE,mxConstants.ARROW_SIZE/5)*a.view.scale;return new mxPoint(f.x+b*(g+a.shape.strokewidth*a.view.scale)+d*c/2,f.y+d*(g+a.shape.strokewidth*a.view.scale)-b*c/2)},function(b,d,f,g,e,k,p){b=Math.sqrt(mxUtils.ptSegDistSq(g.x,g.y,e.x,e.y,k.x,k.y));d=mxUtils.ptLineDist(g.x,g.y,g.x+f,g.y-d,k.x,k.y);a.style[mxConstants.STYLE_STARTSIZE]=Math.round(100*
+(d-a.shape.strokewidth)/3)/100/a.view.scale;a.style.width=Math.round(2*b)/a.view.scale;mxEvent.isControlDown(p.getEvent())&&(a.style[mxConstants.STYLE_ENDSIZE]=a.style[mxConstants.STYLE_STARTSIZE]);mxEvent.isAltDown(p.getEvent())||Math.abs(parseFloat(a.style[mxConstants.STYLE_STARTSIZE])-parseFloat(a.style[mxConstants.STYLE_ENDSIZE]))<c/6&&(a.style[mxConstants.STYLE_STARTSIZE]=a.style[mxConstants.STYLE_ENDSIZE])})),b.push(ra(a,["startWidth","endWidth",mxConstants.STYLE_STARTSIZE,mxConstants.STYLE_ENDSIZE],
+!0,function(c,b,d,f,g){c=(a.shape.getStartArrowWidth()-a.shape.strokewidth)*a.view.scale;g=3*mxUtils.getNumber(a.style,mxConstants.STYLE_STARTSIZE,mxConstants.ARROW_SIZE/5)*a.view.scale;return new mxPoint(f.x+b*(g+a.shape.strokewidth*a.view.scale)+d*c/2,f.y+d*(g+a.shape.strokewidth*a.view.scale)-b*c/2)},function(b,d,f,g,e,k,p){b=Math.sqrt(mxUtils.ptSegDistSq(g.x,g.y,e.x,e.y,k.x,k.y));d=mxUtils.ptLineDist(g.x,g.y,g.x+f,g.y-d,k.x,k.y);a.style[mxConstants.STYLE_STARTSIZE]=Math.round(100*(d-a.shape.strokewidth)/
+3)/100/a.view.scale;a.style.startWidth=Math.max(0,Math.round(2*b)-a.shape.getEdgeWidth())/a.view.scale;mxEvent.isControlDown(p.getEvent())&&(a.style[mxConstants.STYLE_ENDSIZE]=a.style[mxConstants.STYLE_STARTSIZE],a.style.endWidth=a.style.startWidth);mxEvent.isAltDown(p.getEvent())||(Math.abs(parseFloat(a.style[mxConstants.STYLE_STARTSIZE])-parseFloat(a.style[mxConstants.STYLE_ENDSIZE]))<c/6&&(a.style[mxConstants.STYLE_STARTSIZE]=a.style[mxConstants.STYLE_ENDSIZE]),Math.abs(parseFloat(a.style.startWidth)-
+parseFloat(a.style.endWidth))<c&&(a.style.startWidth=a.style.endWidth))})));mxUtils.getValue(a.style,mxConstants.STYLE_ENDARROW,mxConstants.NONE)!=mxConstants.NONE&&(b.push(ra(a,["width",mxConstants.STYLE_STARTSIZE,mxConstants.STYLE_ENDSIZE],!1,function(c,b,d,f,g){c=(a.shape.getEdgeWidth()-a.shape.strokewidth)*a.view.scale;g=3*mxUtils.getNumber(a.style,mxConstants.STYLE_ENDSIZE,mxConstants.ARROW_SIZE/5)*a.view.scale;return new mxPoint(f.x+b*(g+a.shape.strokewidth*a.view.scale)-d*c/2,f.y+d*(g+a.shape.strokewidth*
+a.view.scale)+b*c/2)},function(b,d,f,g,e,k,p){b=Math.sqrt(mxUtils.ptSegDistSq(g.x,g.y,e.x,e.y,k.x,k.y));d=mxUtils.ptLineDist(g.x,g.y,g.x+f,g.y-d,k.x,k.y);a.style[mxConstants.STYLE_ENDSIZE]=Math.round(100*(d-a.shape.strokewidth)/3)/100/a.view.scale;a.style.width=Math.round(2*b)/a.view.scale;mxEvent.isControlDown(p.getEvent())&&(a.style[mxConstants.STYLE_STARTSIZE]=a.style[mxConstants.STYLE_ENDSIZE]);mxEvent.isAltDown(p.getEvent())||Math.abs(parseFloat(a.style[mxConstants.STYLE_ENDSIZE])-parseFloat(a.style[mxConstants.STYLE_STARTSIZE]))<
+c/6&&(a.style[mxConstants.STYLE_ENDSIZE]=a.style[mxConstants.STYLE_STARTSIZE])})),b.push(ra(a,["startWidth","endWidth",mxConstants.STYLE_STARTSIZE,mxConstants.STYLE_ENDSIZE],!1,function(c,b,d,f,g){c=(a.shape.getEndArrowWidth()-a.shape.strokewidth)*a.view.scale;g=3*mxUtils.getNumber(a.style,mxConstants.STYLE_ENDSIZE,mxConstants.ARROW_SIZE/5)*a.view.scale;return new mxPoint(f.x+b*(g+a.shape.strokewidth*a.view.scale)-d*c/2,f.y+d*(g+a.shape.strokewidth*a.view.scale)+b*c/2)},function(b,d,f,g,e,k,p){b=
+Math.sqrt(mxUtils.ptSegDistSq(g.x,g.y,e.x,e.y,k.x,k.y));d=mxUtils.ptLineDist(g.x,g.y,g.x+f,g.y-d,k.x,k.y);a.style[mxConstants.STYLE_ENDSIZE]=Math.round(100*(d-a.shape.strokewidth)/3)/100/a.view.scale;a.style.endWidth=Math.max(0,Math.round(2*b)-a.shape.getEdgeWidth())/a.view.scale;mxEvent.isControlDown(p.getEvent())&&(a.style[mxConstants.STYLE_STARTSIZE]=a.style[mxConstants.STYLE_ENDSIZE],a.style.startWidth=a.style.endWidth);mxEvent.isAltDown(p.getEvent())||(Math.abs(parseFloat(a.style[mxConstants.STYLE_ENDSIZE])-
+parseFloat(a.style[mxConstants.STYLE_STARTSIZE]))<c/6&&(a.style[mxConstants.STYLE_ENDSIZE]=a.style[mxConstants.STYLE_STARTSIZE]),Math.abs(parseFloat(a.style.endWidth)-parseFloat(a.style.startWidth))<c&&(a.style.endWidth=a.style.startWidth))})));return b},swimlane:function(a){var c=[N(a,[mxConstants.STYLE_STARTSIZE],function(c){var b=parseFloat(mxUtils.getValue(a.style,mxConstants.STYLE_STARTSIZE,mxConstants.DEFAULT_STARTSIZE));return 1==mxUtils.getValue(a.style,mxConstants.STYLE_HORIZONTAL,1)?new mxPoint(c.getCenterX(),
+c.y+Math.max(0,Math.min(c.height,b))):new mxPoint(c.x+Math.max(0,Math.min(c.width,b)),c.getCenterY())},function(c,b){a.style[mxConstants.STYLE_STARTSIZE]=1==mxUtils.getValue(this.state.style,mxConstants.STYLE_HORIZONTAL,1)?Math.round(Math.max(0,Math.min(c.height,b.y-c.y))):Math.round(Math.max(0,Math.min(c.width,b.x-c.x)))})];if(mxUtils.getValue(a.style,mxConstants.STYLE_ROUNDED)){var b=parseFloat(mxUtils.getValue(a.style,mxConstants.STYLE_STARTSIZE,mxConstants.DEFAULT_STARTSIZE));c.push(fa(a,b/2))}return c},
+label:sa(),ext:sa(),rectangle:sa(),triangle:sa(),rhombus:sa(),umlLifeline:function(a){return[N(a,["size"],function(a){var c=Math.max(0,Math.min(a.height,parseFloat(mxUtils.getValue(this.state.style,"size",J.prototype.size))));return new mxPoint(a.getCenterX(),a.y+c)},function(a,c){this.state.style.size=Math.round(Math.max(0,Math.min(a.height,c.y-a.y)))},!1)]},umlFrame:function(a){return[N(a,["width","height"],function(a){var c=Math.max(F.prototype.corner,Math.min(a.width,mxUtils.getValue(this.state.style,
+"width",F.prototype.width))),b=Math.max(1.5*F.prototype.corner,Math.min(a.height,mxUtils.getValue(this.state.style,"height",F.prototype.height)));return new mxPoint(a.x+c,a.y+b)},function(a,c){this.state.style.width=Math.round(Math.max(F.prototype.corner,Math.min(a.width,c.x-a.x)));this.state.style.height=Math.round(Math.max(1.5*F.prototype.corner,Math.min(a.height,c.y-a.y)))},!1)]},process:function(a){var c=[N(a,["size"],function(a){var c=Math.max(0,Math.min(.5,parseFloat(mxUtils.getValue(this.state.style,
+"size",k.prototype.size))));return new mxPoint(a.x+a.width*c,a.y+a.height/4)},function(a,c){this.state.style.size=Math.max(0,Math.min(.5,(c.x-a.x)/a.width))})];mxUtils.getValue(a.style,mxConstants.STYLE_ROUNDED,!1)&&c.push(fa(a));return c},cross:function(a){return[N(a,["size"],function(a){var c=Math.min(a.width,a.height),c=Math.max(0,Math.min(1,mxUtils.getValue(this.state.style,"size",na.prototype.size)))*c/2;return new mxPoint(a.getCenterX()-c,a.getCenterY()-c)},function(a,c){var b=Math.min(a.width,
+a.height);this.state.style.size=Math.max(0,Math.min(1,Math.min(Math.max(0,a.getCenterY()-c.y)/b*2,Math.max(0,a.getCenterX()-c.x)/b*2)))})]},note:function(a){return[N(a,["size"],function(a){var c=Math.max(0,Math.min(a.width,Math.min(a.height,parseFloat(mxUtils.getValue(this.state.style,"size",h.prototype.size)))));return new mxPoint(a.x+a.width-c,a.y+c)},function(a,c){this.state.style.size=Math.round(Math.max(0,Math.min(Math.min(a.width,a.x+a.width-c.x),Math.min(a.height,c.y-a.y))))})]},manualInput:function(a){var c=
+[N(a,["size"],function(a){var c=Math.max(0,Math.min(a.height,mxUtils.getValue(this.state.style,"size",G.prototype.size)));return new mxPoint(a.x+a.width/4,a.y+3*c/4)},function(a,c){this.state.style.size=Math.round(Math.max(0,Math.min(a.height,4*(c.y-a.y)/3)))})];mxUtils.getValue(a.style,mxConstants.STYLE_ROUNDED,!1)&&c.push(fa(a));return c},dataStorage:function(a){return[N(a,["size"],function(a){var c=Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.state.style,"size",W.prototype.size))));return new mxPoint(a.x+
+(1-c)*a.width,a.getCenterY())},function(a,c){this.state.style.size=Math.max(0,Math.min(1,(a.x+a.width-c.x)/a.width))})]},callout:function(a){var c=[N(a,["size","position"],function(a){var c=Math.max(0,Math.min(a.height,mxUtils.getValue(this.state.style,"size",t.prototype.size))),b=Math.max(0,Math.min(1,mxUtils.getValue(this.state.style,"position",t.prototype.position)));mxUtils.getValue(this.state.style,"base",t.prototype.base);return new mxPoint(a.x+b*a.width,a.y+a.height-c)},function(a,c){mxUtils.getValue(this.state.style,
+"base",t.prototype.base);this.state.style.size=Math.round(Math.max(0,Math.min(a.height,a.y+a.height-c.y)));this.state.style.position=Math.round(100*Math.max(0,Math.min(1,(c.x-a.x)/a.width)))/100}),N(a,["position2"],function(a){var c=Math.max(0,Math.min(1,mxUtils.getValue(this.state.style,"position2",t.prototype.position2)));return new mxPoint(a.x+c*a.width,a.y+a.height)},function(a,c){this.state.style.position2=Math.round(100*Math.max(0,Math.min(1,(c.x-a.x)/a.width)))/100}),N(a,["base"],function(a){var c=
+Math.max(0,Math.min(a.height,mxUtils.getValue(this.state.style,"size",t.prototype.size))),b=Math.max(0,Math.min(1,mxUtils.getValue(this.state.style,"position",t.prototype.position))),d=Math.max(0,Math.min(a.width,mxUtils.getValue(this.state.style,"base",t.prototype.base)));return new mxPoint(a.x+Math.min(a.width,b*a.width+d),a.y+a.height-c)},function(a,c){var b=Math.max(0,Math.min(1,mxUtils.getValue(this.state.style,"position",t.prototype.position)));this.state.style.base=Math.round(Math.max(0,Math.min(a.width,
+c.x-a.x-b*a.width)))})];mxUtils.getValue(a.style,mxConstants.STYLE_ROUNDED,!1)&&c.push(fa(a));return c},internalStorage:function(a){var c=[N(a,["dx","dy"],function(a){var c=Math.max(0,Math.min(a.width,mxUtils.getValue(this.state.style,"dx",V.prototype.dx))),b=Math.max(0,Math.min(a.height,mxUtils.getValue(this.state.style,"dy",V.prototype.dy)));return new mxPoint(a.x+c,a.y+b)},function(a,c){this.state.style.dx=Math.round(Math.max(0,Math.min(a.width,c.x-a.x)));this.state.style.dy=Math.round(Math.max(0,
+Math.min(a.height,c.y-a.y)))})];mxUtils.getValue(a.style,mxConstants.STYLE_ROUNDED,!1)&&c.push(fa(a));return c},corner:function(a){return[N(a,["dx","dy"],function(a){var c=Math.max(0,Math.min(a.width,mxUtils.getValue(this.state.style,"dx",M.prototype.dx))),b=Math.max(0,Math.min(a.height,mxUtils.getValue(this.state.style,"dy",M.prototype.dy)));return new mxPoint(a.x+c,a.y+b)},function(a,c){this.state.style.dx=Math.round(Math.max(0,Math.min(a.width,c.x-a.x)));this.state.style.dy=Math.round(Math.max(0,
+Math.min(a.height,c.y-a.y)))})]},tee:function(a){return[N(a,["dx","dy"],function(a){var c=Math.max(0,Math.min(a.width,mxUtils.getValue(this.state.style,"dx",T.prototype.dx))),b=Math.max(0,Math.min(a.height,mxUtils.getValue(this.state.style,"dy",T.prototype.dy)));return new mxPoint(a.x+(a.width+c)/2,a.y+b)},function(a,c){this.state.style.dx=Math.round(Math.max(0,2*Math.min(a.width/2,c.x-a.x-a.width/2)));this.state.style.dy=Math.round(Math.max(0,Math.min(a.height,c.y-a.y)))})]},singleArrow:ia(1),doubleArrow:ia(.5),
+folder:function(a){return[N(a,["tabWidth","tabHeight"],function(a){var c=Math.max(0,Math.min(a.width,mxUtils.getValue(this.state.style,"tabWidth",n.prototype.tabWidth))),b=Math.max(0,Math.min(a.height,mxUtils.getValue(this.state.style,"tabHeight",n.prototype.tabHeight)));mxUtils.getValue(this.state.style,"tabPosition",n.prototype.tabPosition)==mxConstants.ALIGN_RIGHT&&(c=a.width-c);return new mxPoint(a.x+c,a.y+b)},function(a,c){var b=Math.max(0,Math.min(a.width,c.x-a.x));mxUtils.getValue(this.state.style,
+"tabPosition",n.prototype.tabPosition)==mxConstants.ALIGN_RIGHT&&(b=a.width-b);this.state.style.tabWidth=Math.round(b);this.state.style.tabHeight=Math.round(Math.max(0,Math.min(a.height,c.y-a.y)))})]},document:function(a){return[N(a,["size"],function(a){var c=Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.state.style,"size",f.prototype.size))));return new mxPoint(a.x+3*a.width/4,a.y+(1-c)*a.height)},function(a,c){this.state.style.size=Math.max(0,Math.min(1,(a.y+a.height-c.y)/a.height))})]},
+tape:function(a){return[N(a,["size"],function(a){var b=Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.state.style,"size",c.prototype.size))));return new mxPoint(a.getCenterX(),a.y+b*a.height/2)},function(a,c){this.state.style.size=Math.max(0,Math.min(1,(c.y-a.y)/a.height*2))})]},offPageConnector:function(a){return[N(a,["size"],function(a){var c=Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.state.style,"size",ca.prototype.size))));return new mxPoint(a.getCenterX(),a.y+(1-c)*a.height)},
+function(a,c){this.state.style.size=Math.max(0,Math.min(1,(a.y+a.height-c.y)/a.height))})]},step:va(x.prototype.size,!0,null,!0),hexagon:va(w.prototype.size,!0,.5,!0),curlyBracket:va(m.prototype.size,!1),display:va(oa.prototype.size,!1),cube:za(1,a.prototype.size,!1),card:za(.5,q.prototype.size,!0),loopLimit:za(.5,Z.prototype.size,!0),trapezoid:Ea(.5),parallelogram:Ea(1)};Graph.createHandle=N;Graph.handleFactory=Aa;mxVertexHandler.prototype.createCustomHandles=function(){if(1==this.state.view.graph.getSelectionCount()&&
+this.graph.isCellRotatable(this.state.cell)){var a=this.state.style.shape;null==this.state.view.graph.cellRenderer.defaultShapes[a]&&null==mxStencilRegistry.getStencil(a)&&(a=mxConstants.SHAPE_RECTANGLE);a=Aa[a];if(null!=a)return a(this.state)}return null};mxEdgeHandler.prototype.createCustomHandles=function(){if(1==this.state.view.graph.getSelectionCount()){var a=this.state.style.shape;null==this.state.view.graph.cellRenderer.defaultShapes[a]&&null==mxStencilRegistry.getStencil(a)&&(a=mxConstants.SHAPE_CONNECTOR);
+a=Aa[a];if(null!=a)return a(this.state)}return null}}else Graph.createHandle=function(){},Graph.handleFactory={};var wa=new mxPoint(1,0),xa=new mxPoint(1,0),ia=mxUtils.toRadians(-30),wa=mxUtils.getRotatedPoint(wa,Math.cos(ia),Math.sin(ia)),ia=mxUtils.toRadians(-150),xa=mxUtils.getRotatedPoint(xa,Math.cos(ia),Math.sin(ia));mxEdgeStyle.IsometricConnector=function(a,c,b,d,f){var g=a.view;d=null!=d&&0<d.length?d[0]:null;var e=a.absolutePoints,k=e[0],e=e[e.length-1];null!=d&&(d=g.transformControlPoint(a,
+d));null==k&&null!=c&&(k=new mxPoint(c.getCenterX(),c.getCenterY()));null==e&&null!=b&&(e=new mxPoint(b.getCenterX(),b.getCenterY()));var p=wa.x,m=wa.y,t=xa.x,v=xa.y,r="horizontal"==mxUtils.getValue(a.style,"elbow","horizontal");if(null!=e&&null!=k){a=function(a,c,b){a-=h.x;var d=c-h.y;c=(v*a-t*d)/(p*v-m*t);a=(m*a-p*d)/(m*t-p*v);r?(b&&(h=new mxPoint(h.x+p*c,h.y+m*c),f.push(h)),h=new mxPoint(h.x+t*a,h.y+v*a)):(b&&(h=new mxPoint(h.x+t*a,h.y+v*a),f.push(h)),h=new mxPoint(h.x+p*c,h.y+m*c));f.push(h)};
+var h=k;null==d&&(d=new mxPoint(k.x+(e.x-k.x)/2,k.y+(e.y-k.y)/2));a(d.x,d.y,!0);a(e.x,e.y,!1)}};mxStyleRegistry.putValue("isometricEdgeStyle",mxEdgeStyle.IsometricConnector);var Ja=Graph.prototype.createEdgeHandler;Graph.prototype.createEdgeHandler=function(a,c){if(c==mxEdgeStyle.IsometricConnector){var b=new mxElbowEdgeHandler(a);b.snapToTerminals=!1;return b}return Ja.apply(this,arguments)};b.prototype.constraints=[];e.prototype.constraints=[];t.prototype.constraints=[];mxRectangleShape.prototype.constraints=
+[new mxConnectionConstraint(new mxPoint(.25,0),!0),new mxConnectionConstraint(new mxPoint(.5,0),!0),new mxConnectionConstraint(new mxPoint(.75,0),!0),new mxConnectionConstraint(new mxPoint(0,.25),!0),new mxConnectionConstraint(new mxPoint(0,.5),!0),new mxConnectionConstraint(new mxPoint(0,.75),!0),new mxConnectionConstraint(new mxPoint(1,.25),!0),new mxConnectionConstraint(new mxPoint(1,.5),!0),new mxConnectionConstraint(new mxPoint(1,.75),!0),new mxConnectionConstraint(new mxPoint(.25,1),!0),new mxConnectionConstraint(new mxPoint(.5,
+1),!0),new mxConnectionConstraint(new mxPoint(.75,1),!0)];mxEllipse.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,0),!0),new mxConnectionConstraint(new mxPoint(1,0),!0),new mxConnectionConstraint(new mxPoint(0,1),!0),new mxConnectionConstraint(new mxPoint(1,1),!0),new mxConnectionConstraint(new mxPoint(.5,0),!0),new mxConnectionConstraint(new mxPoint(.5,1),!0),new mxConnectionConstraint(new mxPoint(0,.5),!0),new mxConnectionConstraint(new mxPoint(1,.5))];mxLabel.prototype.constraints=
+mxRectangleShape.prototype.constraints;mxImageShape.prototype.constraints=mxRectangleShape.prototype.constraints;mxSwimlane.prototype.constraints=mxRectangleShape.prototype.constraints;D.prototype.constraints=mxRectangleShape.prototype.constraints;h.prototype.constraints=mxRectangleShape.prototype.constraints;q.prototype.constraints=mxRectangleShape.prototype.constraints;a.prototype.constraints=mxRectangleShape.prototype.constraints;n.prototype.constraints=mxRectangleShape.prototype.constraints;V.prototype.constraints=
+mxRectangleShape.prototype.constraints;W.prototype.constraints=mxRectangleShape.prototype.constraints;da.prototype.constraints=mxEllipse.prototype.constraints;ma.prototype.constraints=mxEllipse.prototype.constraints;aa.prototype.constraints=mxEllipse.prototype.constraints;ta.prototype.constraints=mxEllipse.prototype.constraints;G.prototype.constraints=mxRectangleShape.prototype.constraints;ua.prototype.constraints=mxRectangleShape.prototype.constraints;oa.prototype.constraints=mxRectangleShape.prototype.constraints;
+Z.prototype.constraints=mxRectangleShape.prototype.constraints;ca.prototype.constraints=mxRectangleShape.prototype.constraints;mxCylinder.prototype.constraints=[new mxConnectionConstraint(new mxPoint(.15,.05),!1),new mxConnectionConstraint(new mxPoint(.5,0),!0),new mxConnectionConstraint(new mxPoint(.85,.05),!1),new mxConnectionConstraint(new mxPoint(0,.3),!0),new mxConnectionConstraint(new mxPoint(0,.5),!0),new mxConnectionConstraint(new mxPoint(0,.7),!0),new mxConnectionConstraint(new mxPoint(1,
+.3),!0),new mxConnectionConstraint(new mxPoint(1,.5),!0),new mxConnectionConstraint(new mxPoint(1,.7),!0),new mxConnectionConstraint(new mxPoint(.15,.95),!1),new mxConnectionConstraint(new mxPoint(.5,1),!0),new mxConnectionConstraint(new mxPoint(.85,.95),!1)];C.prototype.constraints=[new mxConnectionConstraint(new mxPoint(.25,.1),!1),new mxConnectionConstraint(new mxPoint(.5,0),!1),new mxConnectionConstraint(new mxPoint(.75,.1),!1),new mxConnectionConstraint(new mxPoint(0,1/3),!1),new mxConnectionConstraint(new mxPoint(0,
+1),!1),new mxConnectionConstraint(new mxPoint(1,1/3),!1),new mxConnectionConstraint(new mxPoint(1,1),!1),new mxConnectionConstraint(new mxPoint(.5,.5),!1)];I.prototype.constraints=[new mxConnectionConstraint(new mxPoint(.25,0),!0),new mxConnectionConstraint(new mxPoint(.5,0),!0),new mxConnectionConstraint(new mxPoint(.75,0),!0),new mxConnectionConstraint(new mxPoint(0,.3),!0),new mxConnectionConstraint(new mxPoint(0,.7),!0),new mxConnectionConstraint(new mxPoint(1,.25),!0),new mxConnectionConstraint(new mxPoint(1,
+.5),!0),new mxConnectionConstraint(new mxPoint(1,.75),!0),new mxConnectionConstraint(new mxPoint(.25,1),!0),new mxConnectionConstraint(new mxPoint(.5,1),!0),new mxConnectionConstraint(new mxPoint(.75,1),!0)];mxActor.prototype.constraints=[new mxConnectionConstraint(new mxPoint(.5,0),!0),new mxConnectionConstraint(new mxPoint(.25,.2),!1),new mxConnectionConstraint(new mxPoint(.1,.5),!1),new mxConnectionConstraint(new mxPoint(0,.75),!0),new mxConnectionConstraint(new mxPoint(.75,.25),!1),new mxConnectionConstraint(new mxPoint(.9,
+.5),!1),new mxConnectionConstraint(new mxPoint(1,.75),!0),new mxConnectionConstraint(new mxPoint(.25,1),!0),new mxConnectionConstraint(new mxPoint(.5,1),!0),new mxConnectionConstraint(new mxPoint(.75,1),!0)];l.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,0),!1),new mxConnectionConstraint(new mxPoint(.5,.25),!1),new mxConnectionConstraint(new mxPoint(1,0),!1),new mxConnectionConstraint(new mxPoint(.25,.5),!1),new mxConnectionConstraint(new mxPoint(.75,.5),!1),new mxConnectionConstraint(new mxPoint(0,
+1),!1),new mxConnectionConstraint(new mxPoint(.5,.75),!1),new mxConnectionConstraint(new mxPoint(1,1),!1)];c.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,.35),!1),new mxConnectionConstraint(new mxPoint(0,.5),!1),new mxConnectionConstraint(new mxPoint(0,.65),!1),new mxConnectionConstraint(new mxPoint(1,.35),!1),new mxConnectionConstraint(new mxPoint(1,.5),!1),new mxConnectionConstraint(new mxPoint(1,.65),!1),new mxConnectionConstraint(new mxPoint(.25,1),!1),new mxConnectionConstraint(new mxPoint(.75,
+0),!1)];x.prototype.constraints=[new mxConnectionConstraint(new mxPoint(.25,0),!0),new mxConnectionConstraint(new mxPoint(.5,0),!0),new mxConnectionConstraint(new mxPoint(.75,0),!0),new mxConnectionConstraint(new mxPoint(.25,1),!0),new mxConnectionConstraint(new mxPoint(.5,1),!0),new mxConnectionConstraint(new mxPoint(.75,1),!0),new mxConnectionConstraint(new mxPoint(.1,.25),!0),new mxConnectionConstraint(new mxPoint(.2,.5),!0),new mxConnectionConstraint(new mxPoint(.1,.75),!0),new mxConnectionConstraint(new mxPoint(.9,
+.25),!0),new mxConnectionConstraint(new mxPoint(1,.5),!0),new mxConnectionConstraint(new mxPoint(.9,.75),!0)];mxLine.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,.5),!1),new mxConnectionConstraint(new mxPoint(.25,.5),!1),new mxConnectionConstraint(new mxPoint(.75,.5),!1),new mxConnectionConstraint(new mxPoint(1,.5),!1)];R.prototype.constraints=[new mxConnectionConstraint(new mxPoint(.5,0),!1),new mxConnectionConstraint(new mxPoint(.5,1),!1)];mxDoubleEllipse.prototype.constraints=
+mxEllipse.prototype.constraints;mxRhombus.prototype.constraints=mxEllipse.prototype.constraints;mxTriangle.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,.25),!0),new mxConnectionConstraint(new mxPoint(0,.5),!0),new mxConnectionConstraint(new mxPoint(0,.75),!0),new mxConnectionConstraint(new mxPoint(.5,0),!0),new mxConnectionConstraint(new mxPoint(.5,1),!0),new mxConnectionConstraint(new mxPoint(1,.5),!0)];mxHexagon.prototype.constraints=[new mxConnectionConstraint(new mxPoint(.375,
+0),!0),new mxConnectionConstraint(new mxPoint(.5,0),!0),new mxConnectionConstraint(new mxPoint(.625,0),!0),new mxConnectionConstraint(new mxPoint(.125,.25),!0),new mxConnectionConstraint(new mxPoint(0,.5),!0),new mxConnectionConstraint(new mxPoint(.125,.75),!0),new mxConnectionConstraint(new mxPoint(.875,.25),!0),new mxConnectionConstraint(new mxPoint(0,.5),!0),new mxConnectionConstraint(new mxPoint(1,.5),!0),new mxConnectionConstraint(new mxPoint(.875,.75),!0),new mxConnectionConstraint(new mxPoint(.375,
+1),!0),new mxConnectionConstraint(new mxPoint(.5,1),!0),new mxConnectionConstraint(new mxPoint(.625,1),!0)];mxCloud.prototype.constraints=[new mxConnectionConstraint(new mxPoint(.25,.25),!1),new mxConnectionConstraint(new mxPoint(.4,.1),!1),new mxConnectionConstraint(new mxPoint(.16,.55),!1),new mxConnectionConstraint(new mxPoint(.07,.4),!1),new mxConnectionConstraint(new mxPoint(.31,.8),!1),new mxConnectionConstraint(new mxPoint(.13,.77),!1),new mxConnectionConstraint(new mxPoint(.8,.8),!1),new mxConnectionConstraint(new mxPoint(.55,
+.95),!1),new mxConnectionConstraint(new mxPoint(.875,.5),!1),new mxConnectionConstraint(new mxPoint(.96,.7),!1),new mxConnectionConstraint(new mxPoint(.625,.2),!1),new mxConnectionConstraint(new mxPoint(.88,.25),!1)];g.prototype.constraints=mxRectangleShape.prototype.constraints;p.prototype.constraints=mxRectangleShape.prototype.constraints;f.prototype.constraints=[new mxConnectionConstraint(new mxPoint(.25,0),!0),new mxConnectionConstraint(new mxPoint(.5,0),!0),new mxConnectionConstraint(new mxPoint(.75,
+0),!0),new mxConnectionConstraint(new mxPoint(0,.25),!0),new mxConnectionConstraint(new mxPoint(0,.5),!0),new mxConnectionConstraint(new mxPoint(0,.75),!0),new mxConnectionConstraint(new mxPoint(1,.25),!0),new mxConnectionConstraint(new mxPoint(1,.5),!0),new mxConnectionConstraint(new mxPoint(1,.75),!0)];mxArrow.prototype.constraints=null;T.prototype.constraints=null;M.prototype.constraints=null;Y.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,0),!1),new mxConnectionConstraint(new mxPoint(0,
+.5),!1),new mxConnectionConstraint(new mxPoint(0,1),!1),new mxConnectionConstraint(new mxPoint(.25,.5),!1),new mxConnectionConstraint(new mxPoint(.5,.5),!1),new mxConnectionConstraint(new mxPoint(.75,.5),!1),new mxConnectionConstraint(new mxPoint(1,0),!1),new mxConnectionConstraint(new mxPoint(1,.5),!1),new mxConnectionConstraint(new mxPoint(1,1),!1)];K.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,.5),!1),new mxConnectionConstraint(new mxPoint(1,.5),!1)];U.prototype.constraints=
+[new mxConnectionConstraint(new mxPoint(0,.5),!1),new mxConnectionConstraint(new mxPoint(1,.5),!1)];na.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,.5),!1),new mxConnectionConstraint(new mxPoint(1,.5),!1),new mxConnectionConstraint(new mxPoint(.5,0),!1),new mxConnectionConstraint(new mxPoint(.5,1),!1)];J.prototype.constraints=null;X.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,.25),!1),new mxConnectionConstraint(new mxPoint(0,.5),!1),new mxConnectionConstraint(new mxPoint(0,
+.75),!1),new mxConnectionConstraint(new mxPoint(1,.5),!1),new mxConnectionConstraint(new mxPoint(.7,.1),!1),new mxConnectionConstraint(new mxPoint(.7,.9),!1)];ba.prototype.constraints=[new mxConnectionConstraint(new mxPoint(.175,.25),!1),new mxConnectionConstraint(new mxPoint(.25,.5),!1),new mxConnectionConstraint(new mxPoint(.175,.75),!1),new mxConnectionConstraint(new mxPoint(1,.5),!1),new mxConnectionConstraint(new mxPoint(.7,.1),!1),new mxConnectionConstraint(new mxPoint(.7,.9),!1)]})();function Actions(a){this.editorUi=a;this.actions={};this.init()}
+Actions.prototype.init=function(){function a(a){d.escape();var c=d.getDeletableCells(d.getSelectionCells());if(null!=c&&0<c.length){var b=d.model.getParents(c);d.removeCells(c,a);if(null!=b){a=[];for(c=0;c<b.length;c++)d.model.contains(b[c])&&(d.model.isVertex(b[c])||d.model.isEdge(b[c]))&&a.push(b[c]);d.setSelectionCells(a)}}}var b=this.editorUi,e=b.editor,d=e.graph,h=function(){return Action.prototype.isEnabled.apply(this,arguments)&&d.isEnabled()};this.addAction("new...",function(){window.open(b.getUrl())});
+this.addAction("open...",function(){window.openNew=!0;window.openKey="open";b.openFile()});this.addAction("import...",function(){window.openNew=!1;window.openKey="import";window.openFile=new OpenFile(mxUtils.bind(this,function(){b.hideDialog()}));window.openFile.setConsumer(mxUtils.bind(this,function(a,c){try{var b=mxUtils.parseXml(a),d=new mxGraphModel;(new mxCodec(b)).decode(b.documentElement,d);var p=d.getChildren(d.getChildAt(d.getRoot(),0));e.graph.setSelectionCells(e.graph.importCells(p))}catch(m){mxUtils.alert(mxResources.get("invalidOrMissingFile")+
+": "+m.message)}}));b.showDialog((new OpenDialog(this)).container,320,220,!0,!0,function(){window.openFile=null})}).isEnabled=h;this.addAction("save",function(){b.saveFile(!1)},null,null,Editor.ctrlKey+"+S").isEnabled=h;this.addAction("saveAs...",function(){b.saveFile(!0)},null,null,Editor.ctrlKey+"+Shift+S").isEnabled=h;this.addAction("export...",function(){b.showDialog((new ExportDialog(b)).container,300,230,!0,!0)});this.addAction("editDiagram...",function(){var a=new EditDiagramDialog(b);b.showDialog(a.container,
+620,420,!0,!1);a.init()});this.addAction("pageSetup...",function(){b.showDialog((new PageSetupDialog(b)).container,320,220,!0,!0)}).isEnabled=h;this.addAction("print...",function(){b.showDialog((new PrintDialog(b)).container,300,180,!0,!0)},null,"sprite-print",Editor.ctrlKey+"+P");this.addAction("preview",function(){mxUtils.show(d,null,10,10)});this.addAction("undo",function(){b.undo()},null,"sprite-undo",Editor.ctrlKey+"+Z");this.addAction("redo",function(){b.redo()},null,"sprite-redo",mxClient.IS_WIN?
 Editor.ctrlKey+"+Y":Editor.ctrlKey+"+Shift+Z");this.addAction("cut",function(){mxClipboard.cut(d)},null,"sprite-cut",Editor.ctrlKey+"+X");this.addAction("copy",function(){mxClipboard.copy(d)},null,"sprite-copy",Editor.ctrlKey+"+C");this.addAction("paste",function(){d.isEnabled()&&!d.isCellLocked(d.getDefaultParent())&&mxClipboard.paste(d)},!1,"sprite-paste",Editor.ctrlKey+"+V");this.addAction("pasteHere",function(a){if(d.isEnabled()&&!d.isCellLocked(d.getDefaultParent())){d.getModel().beginUpdate();
-try{var c=mxClipboard.paste(d);if(null!=c){var b=d.getBoundingBoxFromGeometry(c);if(null!=b){var e=d.view.translate,m=d.view.scale,n=e.y,g=Math.round(d.snap(d.popupMenuHandler.triggerX/m-e.x)),r=Math.round(d.snap(d.popupMenuHandler.triggerY/m-n));d.cellsMoved(c,g-b.x,r-b.y)}}}finally{d.getModel().endUpdate()}}});this.addAction("delete",function(b){a(null!=b&&mxEvent.isShiftDown(b))},null,null,"Delete");this.addAction("deleteAll",function(){a(!0)},null,null,Editor.ctrlKey+"+Delete");this.addAction("duplicate",
+try{var c=mxClipboard.paste(d);if(null!=c){var b=d.getBoundingBoxFromGeometry(c);if(null!=b){var g=d.view.translate,e=d.view.scale,m=g.y,h=Math.round(d.snap(d.popupMenuHandler.triggerX/e-g.x)),r=Math.round(d.snap(d.popupMenuHandler.triggerY/e-m));d.cellsMoved(c,h-b.x,r-b.y)}}}finally{d.getModel().endUpdate()}}});this.addAction("delete",function(b){a(null!=b&&mxEvent.isShiftDown(b))},null,null,"Delete");this.addAction("deleteAll",function(){a(!0)},null,null,Editor.ctrlKey+"+Delete");this.addAction("duplicate",
 function(){d.setSelectionCells(d.duplicateCells())},null,null,Editor.ctrlKey+"+D");this.put("turn",new Action(mxResources.get("turn")+" / "+mxResources.get("reverse"),function(){d.turnShapes(d.getSelectionCells())},null,null,Editor.ctrlKey+"+R"));this.addAction("selectVertices",function(){d.selectVertices()},null,null,Editor.ctrlKey+"+Shift+I");this.addAction("selectEdges",function(){d.selectEdges()},null,null,Editor.ctrlKey+"+Shift+E");this.addAction("selectAll",function(){d.selectAll(null,!0)},
 null,null,Editor.ctrlKey+"+A");this.addAction("selectNone",function(){d.clearSelection()},null,null,Editor.ctrlKey+"+Shift+A");this.addAction("lockUnlock",function(){if(!d.isSelectionEmpty()){d.getModel().beginUpdate();try{var a=d.isCellMovable(d.getSelectionCell())?1:0;d.toggleCellStyles(mxConstants.STYLE_MOVABLE,a);d.toggleCellStyles(mxConstants.STYLE_RESIZABLE,a);d.toggleCellStyles(mxConstants.STYLE_ROTATABLE,a);d.toggleCellStyles(mxConstants.STYLE_DELETABLE,a);d.toggleCellStyles(mxConstants.STYLE_EDITABLE,
 a);d.toggleCellStyles("connectable",a)}finally{d.getModel().endUpdate()}}},null,null,Editor.ctrlKey+"+L");this.addAction("home",function(){d.home()},null,null,"Home");this.addAction("exitGroup",function(){d.exitGroup()},null,null,Editor.ctrlKey+"+Shift+Page Up");this.addAction("enterGroup",function(){d.enterGroup()},null,null,Editor.ctrlKey+"+Shift+Page Down");this.addAction("expand",function(){d.foldCells(!1)},null,null,Editor.ctrlKey+"+Page Down");this.addAction("collapse",function(){d.foldCells(!0)},
 null,null,Editor.ctrlKey+"+Page Up");this.addAction("toFront",function(){d.orderCells(!1)},null,null,Editor.ctrlKey+"+Shift+F");this.addAction("toBack",function(){d.orderCells(!0)},null,null,Editor.ctrlKey+"+Shift+B");this.addAction("group",function(){1==d.getSelectionCount()?d.setCellStyles("container","1"):d.setSelectionCell(d.groupCells(null,0))},null,null,Editor.ctrlKey+"+G");this.addAction("ungroup",function(){1==d.getSelectionCount()&&0==d.getModel().getChildCount(d.getSelectionCell())?d.setCellStyles("container",
 "0"):d.setSelectionCells(d.ungroupCells())},null,null,Editor.ctrlKey+"+Shift+U");this.addAction("removeFromGroup",function(){d.removeCellsFromParent()});this.addAction("edit",function(){d.isEnabled()&&d.startEditingAtCell()},null,null,"F2/Enter");this.addAction("editData...",function(){var a=d.getSelectionCell()||d.getModel().getRoot();null!=a&&(a=new EditDataDialog(b,a),b.showDialog(a.container,320,320,!0,!1),a.init())},null,null,Editor.ctrlKey+"+M");this.addAction("editTooltip...",function(){var a=
-b.editor.graph;if(a.isEnabled()&&!a.isSelectionEmpty()){var c=a.getSelectionCell(),f="";if(mxUtils.isNode(c.value)){var d=c.value.getAttribute("tooltip");null!=d&&(f=d)}f=new TextareaDialog(b,mxResources.get("editTooltip")+":",f,function(b){a.setTooltipForCell(c,b)});b.showDialog(f.container,320,200,!0,!0);f.init()}});this.addAction("openLink",function(){var a=d.getLinkForCell(d.getSelectionCell());null!=a&&window.open(a)});this.addAction("editLink...",function(){var a=b.editor.graph;if(a.isEnabled()&&
-!a.isSelectionEmpty()){var c=a.getSelectionCell(),f=a.getLinkForCell(c)||"";b.showLinkDialog(f,mxResources.get("apply"),function(b){b=mxUtils.trim(b);a.setLinkForCell(c,0<b.length?b:null)})}});this.addAction("insertLink...",function(){d.isEnabled()&&!d.isCellLocked(d.getDefaultParent())&&b.showLinkDialog("",mxResources.get("insert"),function(a,c){a=mxUtils.trim(a);if(0<a.length){var f=null,e=a.substring(a.lastIndexOf("/")+1);if(d.isPageLink(a)){var m=a.indexOf(",");0<m&&(e=b.getPageById(a.substring(m+
-1)),e=null!=e?e.getName():mxResources.get("pageNotFound"))}null!=c&&0<c.length&&(f=c[0].iconUrl,e=c[0].name||c[0].type,e=e.charAt(0).toUpperCase()+e.substring(1),30<e.length&&(e=e.substring(0,30)+"..."));m=d.getFreeInsertPoint();f=new mxCell(e,new mxGeometry(m.x,m.y,100,40),"fontColor=#0000EE;fontStyle=4;rounded=1;overflow=hidden;"+(null!=f?"shape=label;imageWidth=16;imageHeight=16;spacingLeft=26;align=left;image="+f:"spacing=10;"));f.vertex=!0;d.setLinkForCell(f,a);d.cellSizeUpdated(f,!0);d.getModel().beginUpdate();
-try{f=d.addCell(f),d.fireEvent(new mxEventObject("cellsInserted","cells",[f]))}finally{d.getModel().endUpdate()}d.setSelectionCell(f);d.scrollCellToVisible(d.getSelectionCell())}})}).isEnabled=g;this.addAction("link...",mxUtils.bind(this,function(){var a=b.editor.graph;if(a.isEnabled())if(a.cellEditor.isContentEditing()){var c=a.getParentByName(a.getSelectedElement(),"A",a.cellEditor.textarea),f="";null!=c&&(f=c.getAttribute("href")||"");var d=a.cellEditor.saveSelection();b.showLinkDialog(f,mxResources.get("apply"),
-mxUtils.bind(this,function(c){a.cellEditor.restoreSelection(d);null!=c&&a.insertLink(c)}))}else a.isSelectionEmpty()?this.get("insertLink").funct():this.get("editLink").funct()})).isEnabled=g;this.addAction("autosize",function(){var a=d.getSelectionCells();if(null!=a){d.getModel().beginUpdate();try{for(var c=0;c<a.length;c++){var b=a[c];if(d.getModel().getChildCount(b))d.updateGroupBounds([b],20);else{var e=d.view.getState(b),m=d.getCellGeometry(b);d.getModel().isVertex(b)&&null!=e&&null!=e.text&&
-null!=m&&d.isWrapping(b)?(m=m.clone(),m.height=e.text.boundingBox.height/d.view.scale,d.getModel().setGeometry(b,m)):d.updateCellSize(b)}}}finally{d.getModel().endUpdate()}}},null,null,Editor.ctrlKey+"+Shift+Y");this.addAction("formattedText",function(){var a=d.getView().getState(d.getSelectionCell());if(null!=a){var c="1";d.stopEditing();d.getModel().beginUpdate();try{if("1"==a.style.html){var c=null,f=d.convertValueToString(a.cell);"0"!=mxUtils.getValue(a.style,"nl2Br","1")&&(f=f.replace(/\n/g,
-"").replace(/<br\s*.?>/g,"\n"));var e=document.createElement("div");e.innerHTML=f;f=mxUtils.extractTextWithWhitespace(e.childNodes);d.cellLabelChanged(a.cell,f)}else f=mxUtils.htmlEntities(d.convertValueToString(a.cell),!1),"0"!=mxUtils.getValue(a.style,"nl2Br","1")&&(f=f.replace(/\n/g,"<br/>")),d.cellLabelChanged(a.cell,d.sanitizeHtml(f));d.setCellStyles("html",c);b.fireEvent(new mxEventObject("styleChanged","keys",["html"],"values",[null!=c?c:"0"],"cells",d.getSelectionCells()))}finally{d.getModel().endUpdate()}}});
+b.editor.graph;if(a.isEnabled()&&!a.isSelectionEmpty()){var c=a.getSelectionCell(),d="";if(mxUtils.isNode(c.value)){var g=c.value.getAttribute("tooltip");null!=g&&(d=g)}d=new TextareaDialog(b,mxResources.get("editTooltip")+":",d,function(b){a.setTooltipForCell(c,b)});b.showDialog(d.container,320,200,!0,!0);d.init()}});this.addAction("openLink",function(){var a=d.getLinkForCell(d.getSelectionCell());null!=a&&window.open(a)});this.addAction("editLink...",function(){var a=b.editor.graph;if(a.isEnabled()&&
+!a.isSelectionEmpty()){var c=a.getSelectionCell(),d=a.getLinkForCell(c)||"";b.showLinkDialog(d,mxResources.get("apply"),function(b){b=mxUtils.trim(b);a.setLinkForCell(c,0<b.length?b:null)})}});this.addAction("insertLink...",function(){d.isEnabled()&&!d.isCellLocked(d.getDefaultParent())&&b.showLinkDialog("",mxResources.get("insert"),function(a,c){a=mxUtils.trim(a);if(0<a.length){var f=null,g=a.substring(a.lastIndexOf("/")+1);if(d.isPageLink(a)){var e=a.indexOf(",");0<e&&(g=b.getPageById(a.substring(e+
+1)),g=null!=g?g.getName():mxResources.get("pageNotFound"))}null!=c&&0<c.length&&(f=c[0].iconUrl,g=c[0].name||c[0].type,g=g.charAt(0).toUpperCase()+g.substring(1),30<g.length&&(g=g.substring(0,30)+"..."));e=d.getFreeInsertPoint();f=new mxCell(g,new mxGeometry(e.x,e.y,100,40),"fontColor=#0000EE;fontStyle=4;rounded=1;overflow=hidden;"+(null!=f?"shape=label;imageWidth=16;imageHeight=16;spacingLeft=26;align=left;image="+f:"spacing=10;"));f.vertex=!0;d.setLinkForCell(f,a);d.cellSizeUpdated(f,!0);d.getModel().beginUpdate();
+try{f=d.addCell(f),d.fireEvent(new mxEventObject("cellsInserted","cells",[f]))}finally{d.getModel().endUpdate()}d.setSelectionCell(f);d.scrollCellToVisible(d.getSelectionCell())}})}).isEnabled=h;this.addAction("link...",mxUtils.bind(this,function(){var a=b.editor.graph;if(a.isEnabled())if(a.cellEditor.isContentEditing()){var c=a.getParentByName(a.getSelectedElement(),"A",a.cellEditor.textarea),d="";null!=c&&(d=c.getAttribute("href")||"");var g=a.cellEditor.saveSelection();b.showLinkDialog(d,mxResources.get("apply"),
+mxUtils.bind(this,function(c){a.cellEditor.restoreSelection(g);null!=c&&a.insertLink(c)}))}else a.isSelectionEmpty()?this.get("insertLink").funct():this.get("editLink").funct()})).isEnabled=h;this.addAction("autosize",function(){var a=d.getSelectionCells();if(null!=a){d.getModel().beginUpdate();try{for(var c=0;c<a.length;c++){var b=a[c];if(d.getModel().getChildCount(b))d.updateGroupBounds([b],20);else{var g=d.view.getState(b),e=d.getCellGeometry(b);d.getModel().isVertex(b)&&null!=g&&null!=g.text&&
+null!=e&&d.isWrapping(b)?(e=e.clone(),e.height=g.text.boundingBox.height/d.view.scale,d.getModel().setGeometry(b,e)):d.updateCellSize(b)}}}finally{d.getModel().endUpdate()}}},null,null,Editor.ctrlKey+"+Shift+Y");this.addAction("formattedText",function(){var a=d.getView().getState(d.getSelectionCell());if(null!=a){var c="1";d.stopEditing();d.getModel().beginUpdate();try{if("1"==a.style.html){var c=null,f=d.convertValueToString(a.cell);"0"!=mxUtils.getValue(a.style,"nl2Br","1")&&(f=f.replace(/\n/g,
+"").replace(/<br\s*.?>/g,"\n"));var g=document.createElement("div");g.innerHTML=f;f=mxUtils.extractTextWithWhitespace(g.childNodes);d.cellLabelChanged(a.cell,f)}else f=mxUtils.htmlEntities(d.convertValueToString(a.cell),!1),"0"!=mxUtils.getValue(a.style,"nl2Br","1")&&(f=f.replace(/\n/g,"<br/>")),d.cellLabelChanged(a.cell,d.sanitizeHtml(f));d.setCellStyles("html",c);b.fireEvent(new mxEventObject("styleChanged","keys",["html"],"values",[null!=c?c:"0"],"cells",d.getSelectionCells()))}finally{d.getModel().endUpdate()}}});
 this.addAction("wordWrap",function(){var a=d.getView().getState(d.getSelectionCell()),c="wrap";d.stopEditing();null!=a&&"wrap"==a.style[mxConstants.STYLE_WHITE_SPACE]&&(c=null);d.setCellStyles(mxConstants.STYLE_WHITE_SPACE,c)});this.addAction("rotation",function(){var a="0",c=d.getView().getState(d.getSelectionCell());null!=c&&(a=c.style[mxConstants.STYLE_ROTATION]||a);a=new FilenameDialog(b,a,mxResources.get("apply"),function(a){null!=a&&0<a.length&&d.setCellStyles(mxConstants.STYLE_ROTATION,a)},
 mxResources.get("enterValue")+" ("+mxResources.get("rotation")+" 0-360)");b.showDialog(a.container,300,80,!0,!0);a.init()});this.addAction("resetView",function(){d.zoomTo(1);b.resetScrollbars()},null,null,Editor.ctrlKey+"+H");this.addAction("zoomIn",function(a){d.zoomIn()},null,null,Editor.ctrlKey+" + (Numpad) / Alt+Mousewheel");this.addAction("zoomOut",function(a){d.zoomOut()},null,null,Editor.ctrlKey+" - (Numpad) / Alt+Mousewheel");this.addAction("fitWindow",function(){d.fit()},null,null,Editor.ctrlKey+
 "+Shift+H");this.addAction("fitPage",mxUtils.bind(this,function(){d.pageVisible||this.get("pageView").funct();var a=d.pageFormat,c=d.pageScale;d.zoomTo(Math.floor(20*Math.min((d.container.clientWidth-10)/a.width/c,(d.container.clientHeight-10)/a.height/c))/20);mxUtils.hasScrollbars(d.container)&&(a=d.getPagePadding(),d.container.scrollTop=a.y*d.view.scale,d.container.scrollLeft=Math.min(a.x*d.view.scale,(d.container.scrollWidth-d.container.clientWidth)/2))}),null,null,Editor.ctrlKey+"+J");this.addAction("fitTwoPages",
@@ -2529,34 +2530,34 @@ mxUtils.bind(this,function(){d.pageVisible||this.get("pageView").funct();var a=d
 this.addAction("fitPageWidth",mxUtils.bind(this,function(){d.pageVisible||this.get("pageView").funct();d.zoomTo(Math.floor(20*(d.container.clientWidth-10)/d.pageFormat.width/d.pageScale)/20);if(mxUtils.hasScrollbars(d.container)){var a=d.getPagePadding();d.container.scrollLeft=Math.min(a.x*d.view.scale,(d.container.scrollWidth-d.container.clientWidth)/2)}}));this.put("customZoom",new Action(mxResources.get("custom")+"...",mxUtils.bind(this,function(){var a=new FilenameDialog(this.editorUi,parseInt(100*
 d.getView().getScale()),mxResources.get("apply"),mxUtils.bind(this,function(a){a=parseInt(a);!isNaN(a)&&0<a&&d.zoomTo(a/100)}),mxResources.get("zoom")+" (%)");this.editorUi.showDialog(a.container,300,80,!0,!0);a.init()}),null,null,Editor.ctrlKey+"+0"));this.addAction("pageScale...",mxUtils.bind(this,function(){var a=new FilenameDialog(this.editorUi,parseInt(100*d.pageScale),mxResources.get("apply"),mxUtils.bind(this,function(a){a=parseInt(a);!isNaN(a)&&0<a&&b.setPageScale(a/100)}),mxResources.get("pageScale")+
 " (%)");this.editorUi.showDialog(a.container,300,80,!0,!0);a.init()}));var l=null,l=this.addAction("grid",function(){d.setGridEnabled(!d.isGridEnabled());b.fireEvent(new mxEventObject("gridEnabledChanged"))},null,null,Editor.ctrlKey+"+Shift+G");l.setToggleAction(!0);l.setSelectedCallback(function(){return d.isGridEnabled()});l.setEnabled(!1);l=this.addAction("guides",function(){d.graphHandler.guidesEnabled=!d.graphHandler.guidesEnabled;b.fireEvent(new mxEventObject("guidesEnabledChanged"))});l.setToggleAction(!0);
-l.setSelectedCallback(function(){return d.graphHandler.guidesEnabled});l.setEnabled(!1);l=this.addAction("tooltips",function(){d.tooltipHandler.setEnabled(!d.tooltipHandler.isEnabled())});l.setToggleAction(!0);l.setSelectedCallback(function(){return d.tooltipHandler.isEnabled()});l=this.addAction("collapseExpand",function(){b.setFoldingEnabled(!d.foldingEnabled)});l.setToggleAction(!0);l.setSelectedCallback(function(){return d.foldingEnabled});l.isEnabled=g;l=this.addAction("scrollbars",function(){b.setScrollbars(!b.hasScrollbars())});
+l.setSelectedCallback(function(){return d.graphHandler.guidesEnabled});l.setEnabled(!1);l=this.addAction("tooltips",function(){d.tooltipHandler.setEnabled(!d.tooltipHandler.isEnabled())});l.setToggleAction(!0);l.setSelectedCallback(function(){return d.tooltipHandler.isEnabled()});l=this.addAction("collapseExpand",function(){b.setFoldingEnabled(!d.foldingEnabled)});l.setToggleAction(!0);l.setSelectedCallback(function(){return d.foldingEnabled});l.isEnabled=h;l=this.addAction("scrollbars",function(){b.setScrollbars(!b.hasScrollbars())});
 l.setToggleAction(!0);l.setSelectedCallback(function(){return d.scrollbars});l=this.addAction("pageView",mxUtils.bind(this,function(){b.setPageVisible(!d.pageVisible)}));l.setToggleAction(!0);l.setSelectedCallback(function(){return d.pageVisible});l=this.addAction("connectionArrows",function(){d.connectionArrowsEnabled=!d.connectionArrowsEnabled;b.fireEvent(new mxEventObject("connectionArrowsChanged"))},null,null,"Alt+Shift+A");l.setToggleAction(!0);l.setSelectedCallback(function(){return d.connectionArrowsEnabled});
 l=this.addAction("connectionPoints",function(){d.setConnectable(!d.connectionHandler.isEnabled());b.fireEvent(new mxEventObject("connectionPointsChanged"))},null,null,"Alt+Shift+P");l.setToggleAction(!0);l.setSelectedCallback(function(){return d.connectionHandler.isEnabled()});l=this.addAction("copyConnect",function(){d.connectionHandler.setCreateTarget(!d.connectionHandler.isCreateTarget());b.fireEvent(new mxEventObject("copyConnectChanged"))});l.setToggleAction(!0);l.setSelectedCallback(function(){return d.connectionHandler.isCreateTarget()});
-l.isEnabled=g;l=this.addAction("autosave",function(){b.editor.setAutosave(!b.editor.autosave)});l.setToggleAction(!0);l.setSelectedCallback(function(){return b.editor.autosave});l.isEnabled=g;l.visible=!1;this.addAction("help",function(){var a="";mxResources.isLanguageSupported(mxClient.language)&&(a="_"+mxClient.language);window.open(RESOURCES_PATH+"/help"+a+".html")});var p=!1;this.put("about",new Action(mxResources.get("about")+" Graph Editor...",function(){p||(b.showDialog((new AboutDialog(b)).container,
-320,280,!0,!0,function(){p=!1}),p=!0)},null,null,"F1"));l=mxUtils.bind(this,function(a,c,b,e){return this.addAction(a,function(){null!=b&&d.cellEditor.isContentEditing()?b():(d.stopEditing(!1),d.toggleCellStyleFlags(mxConstants.STYLE_FONTSTYLE,c))},null,null,e)});l("bold",mxConstants.FONT_BOLD,function(){document.execCommand("bold",!1,null)},Editor.ctrlKey+"+B");l("italic",mxConstants.FONT_ITALIC,function(){document.execCommand("italic",!1,null)},Editor.ctrlKey+"+I");l("underline",mxConstants.FONT_UNDERLINE,
+l.isEnabled=h;l=this.addAction("autosave",function(){b.editor.setAutosave(!b.editor.autosave)});l.setToggleAction(!0);l.setSelectedCallback(function(){return b.editor.autosave});l.isEnabled=h;l.visible=!1;this.addAction("help",function(){var a="";mxResources.isLanguageSupported(mxClient.language)&&(a="_"+mxClient.language);window.open(RESOURCES_PATH+"/help"+a+".html")});var n=!1;this.put("about",new Action(mxResources.get("about")+" Graph Editor...",function(){n||(b.showDialog((new AboutDialog(b)).container,
+320,280,!0,!0,function(){n=!1}),n=!0)},null,null,"F1"));l=mxUtils.bind(this,function(a,c,b,g){return this.addAction(a,function(){null!=b&&d.cellEditor.isContentEditing()?b():(d.stopEditing(!1),d.toggleCellStyleFlags(mxConstants.STYLE_FONTSTYLE,c))},null,null,g)});l("bold",mxConstants.FONT_BOLD,function(){document.execCommand("bold",!1,null)},Editor.ctrlKey+"+B");l("italic",mxConstants.FONT_ITALIC,function(){document.execCommand("italic",!1,null)},Editor.ctrlKey+"+I");l("underline",mxConstants.FONT_UNDERLINE,
 function(){document.execCommand("underline",!1,null)},Editor.ctrlKey+"+U");this.addAction("fontColor...",function(){b.menus.pickColor(mxConstants.STYLE_FONTCOLOR,"forecolor","000000")});this.addAction("strokeColor...",function(){b.menus.pickColor(mxConstants.STYLE_STROKECOLOR)});this.addAction("fillColor...",function(){b.menus.pickColor(mxConstants.STYLE_FILLCOLOR)});this.addAction("gradientColor...",function(){b.menus.pickColor(mxConstants.STYLE_GRADIENTCOLOR)});this.addAction("backgroundColor...",
 function(){b.menus.pickColor(mxConstants.STYLE_LABEL_BACKGROUNDCOLOR,"backcolor")});this.addAction("borderColor...",function(){b.menus.pickColor(mxConstants.STYLE_LABEL_BORDERCOLOR)});this.addAction("vertical",function(){b.menus.toggleStyle(mxConstants.STYLE_HORIZONTAL,!0)});this.addAction("shadow",function(){b.menus.toggleStyle(mxConstants.STYLE_SHADOW)});this.addAction("solid",function(){d.getModel().beginUpdate();try{d.setCellStyles(mxConstants.STYLE_DASHED,null),d.setCellStyles(mxConstants.STYLE_DASH_PATTERN,
 null),b.fireEvent(new mxEventObject("styleChanged","keys",[mxConstants.STYLE_DASHED,mxConstants.STYLE_DASH_PATTERN],"values",[null,null],"cells",d.getSelectionCells()))}finally{d.getModel().endUpdate()}});this.addAction("dashed",function(){d.getModel().beginUpdate();try{d.setCellStyles(mxConstants.STYLE_DASHED,"1"),d.setCellStyles(mxConstants.STYLE_DASH_PATTERN,null),b.fireEvent(new mxEventObject("styleChanged","keys",[mxConstants.STYLE_DASHED,mxConstants.STYLE_DASH_PATTERN],"values",["1",null],"cells",
 d.getSelectionCells()))}finally{d.getModel().endUpdate()}});this.addAction("dotted",function(){d.getModel().beginUpdate();try{d.setCellStyles(mxConstants.STYLE_DASHED,"1"),d.setCellStyles(mxConstants.STYLE_DASH_PATTERN,"1 4"),b.fireEvent(new mxEventObject("styleChanged","keys",[mxConstants.STYLE_DASHED,mxConstants.STYLE_DASH_PATTERN],"values",["1","1 4"],"cells",d.getSelectionCells()))}finally{d.getModel().endUpdate()}});this.addAction("sharp",function(){d.getModel().beginUpdate();try{d.setCellStyles(mxConstants.STYLE_ROUNDED,
 "0"),d.setCellStyles(mxConstants.STYLE_CURVED,"0"),b.fireEvent(new mxEventObject("styleChanged","keys",[mxConstants.STYLE_ROUNDED,mxConstants.STYLE_CURVED],"values",["0","0"],"cells",d.getSelectionCells()))}finally{d.getModel().endUpdate()}});this.addAction("rounded",function(){d.getModel().beginUpdate();try{d.setCellStyles(mxConstants.STYLE_ROUNDED,"1"),d.setCellStyles(mxConstants.STYLE_CURVED,"0"),b.fireEvent(new mxEventObject("styleChanged","keys",[mxConstants.STYLE_ROUNDED,mxConstants.STYLE_CURVED],
-"values",["1","0"],"cells",d.getSelectionCells()))}finally{d.getModel().endUpdate()}});this.addAction("toggleRounded",function(){if(!d.isSelectionEmpty()&&d.isEnabled()){d.getModel().beginUpdate();try{var a=d.getSelectionCells(),c=d.view.getState(a[0]),f=null!=c?c.style:d.getCellStyle(a[0]),e="1"==mxUtils.getValue(f,mxConstants.STYLE_ROUNDED,"0")?"0":"1";d.setCellStyles(mxConstants.STYLE_ROUNDED,e);d.setCellStyles(mxConstants.STYLE_CURVED,null);b.fireEvent(new mxEventObject("styleChanged","keys",
-[mxConstants.STYLE_ROUNDED,mxConstants.STYLE_CURVED],"values",[e,"0"],"cells",d.getSelectionCells()))}finally{d.getModel().endUpdate()}}});this.addAction("curved",function(){d.getModel().beginUpdate();try{d.setCellStyles(mxConstants.STYLE_ROUNDED,"0"),d.setCellStyles(mxConstants.STYLE_CURVED,"1"),b.fireEvent(new mxEventObject("styleChanged","keys",[mxConstants.STYLE_ROUNDED,mxConstants.STYLE_CURVED],"values",["0","1"],"cells",d.getSelectionCells()))}finally{d.getModel().endUpdate()}});this.addAction("collapsible",
+"values",["1","0"],"cells",d.getSelectionCells()))}finally{d.getModel().endUpdate()}});this.addAction("toggleRounded",function(){if(!d.isSelectionEmpty()&&d.isEnabled()){d.getModel().beginUpdate();try{var a=d.getSelectionCells(),c=d.view.getState(a[0]),f=null!=c?c.style:d.getCellStyle(a[0]),g="1"==mxUtils.getValue(f,mxConstants.STYLE_ROUNDED,"0")?"0":"1";d.setCellStyles(mxConstants.STYLE_ROUNDED,g);d.setCellStyles(mxConstants.STYLE_CURVED,null);b.fireEvent(new mxEventObject("styleChanged","keys",
+[mxConstants.STYLE_ROUNDED,mxConstants.STYLE_CURVED],"values",[g,"0"],"cells",d.getSelectionCells()))}finally{d.getModel().endUpdate()}}});this.addAction("curved",function(){d.getModel().beginUpdate();try{d.setCellStyles(mxConstants.STYLE_ROUNDED,"0"),d.setCellStyles(mxConstants.STYLE_CURVED,"1"),b.fireEvent(new mxEventObject("styleChanged","keys",[mxConstants.STYLE_ROUNDED,mxConstants.STYLE_CURVED],"values",["0","1"],"cells",d.getSelectionCells()))}finally{d.getModel().endUpdate()}});this.addAction("collapsible",
 function(){var a=d.view.getState(d.getSelectionCell()),c="1";null!=a&&null!=d.getFoldingImage(a)&&(c="0");d.setCellStyles("collapsible",c);b.fireEvent(new mxEventObject("styleChanged","keys",["collapsible"],"values",[c],"cells",d.getSelectionCells()))});this.addAction("editStyle...",mxUtils.bind(this,function(){var a=d.getSelectionCells();if(null!=a&&0<a.length){var c=d.getModel(),c=new TextareaDialog(this.editorUi,mxResources.get("editStyle")+":",c.getStyle(a[0])||"",function(c){null!=c&&d.setCellStyle(mxUtils.trim(c),
 a)},null,null,400,220);this.editorUi.showDialog(c.container,420,300,!0,!0);c.init()}}),null,null,Editor.ctrlKey+"+E");this.addAction("setAsDefaultStyle",function(){d.isEnabled()&&!d.isSelectionEmpty()&&b.setDefaultStyle(d.getSelectionCell())},null,null,Editor.ctrlKey+"+Shift+D");this.addAction("clearDefaultStyle",function(){d.isEnabled()&&b.clearDefaultStyle()},null,null,Editor.ctrlKey+"+Shift+R");this.addAction("addWaypoint",function(){var a=d.getSelectionCell();if(null!=a&&d.getModel().isEdge(a)){var c=
-e.graph.selectionCellsHandler.getHandler(a);if(c instanceof mxEdgeHandler){for(var b=d.view.translate,h=d.view.scale,m=b.x,b=b.y,a=d.getModel().getParent(a),n=d.getCellGeometry(a);d.getModel().isVertex(a)&&null!=n;)m+=n.x,b+=n.y,a=d.getModel().getParent(a),n=d.getCellGeometry(a);m=Math.round(d.snap(d.popupMenuHandler.triggerX/h-m));h=Math.round(d.snap(d.popupMenuHandler.triggerY/h-b));c.addPointAt(c.state,m,h)}}});this.addAction("removeWaypoint",function(){var a=b.actions.get("removeWaypoint");null!=
-a.handler&&a.handler.removePoint(a.handler.state,a.index)});this.addAction("clearWaypoints",function(){var a=d.getSelectionCells();if(null!=a){a=d.addAllEdges(a);d.getModel().beginUpdate();try{for(var c=0;c<a.length;c++){var b=a[c];if(d.getModel().isEdge(b)){var e=d.getCellGeometry(b);null!=e&&(e=e.clone(),e.points=null,d.getModel().setGeometry(b,e))}}}finally{d.getModel().endUpdate()}}},null,null,"Alt+Shift+C");l=this.addAction("subscript",mxUtils.bind(this,function(){d.cellEditor.isContentEditing()&&
+e.graph.selectionCellsHandler.getHandler(a);if(c instanceof mxEdgeHandler){for(var b=d.view.translate,g=d.view.scale,p=b.x,b=b.y,a=d.getModel().getParent(a),m=d.getCellGeometry(a);d.getModel().isVertex(a)&&null!=m;)p+=m.x,b+=m.y,a=d.getModel().getParent(a),m=d.getCellGeometry(a);p=Math.round(d.snap(d.popupMenuHandler.triggerX/g-p));g=Math.round(d.snap(d.popupMenuHandler.triggerY/g-b));c.addPointAt(c.state,p,g)}}});this.addAction("removeWaypoint",function(){var a=b.actions.get("removeWaypoint");null!=
+a.handler&&a.handler.removePoint(a.handler.state,a.index)});this.addAction("clearWaypoints",function(){var a=d.getSelectionCells();if(null!=a){a=d.addAllEdges(a);d.getModel().beginUpdate();try{for(var c=0;c<a.length;c++){var b=a[c];if(d.getModel().isEdge(b)){var g=d.getCellGeometry(b);null!=g&&(g=g.clone(),g.points=null,d.getModel().setGeometry(b,g))}}}finally{d.getModel().endUpdate()}}},null,null,"Alt+Shift+C");l=this.addAction("subscript",mxUtils.bind(this,function(){d.cellEditor.isContentEditing()&&
 document.execCommand("subscript",!1,null)}),null,null,Editor.ctrlKey+"+,");l=this.addAction("superscript",mxUtils.bind(this,function(){d.cellEditor.isContentEditing()&&document.execCommand("superscript",!1,null)}),null,null,Editor.ctrlKey+"+.");this.addAction("image...",function(){if(d.isEnabled()&&!d.isCellLocked(d.getDefaultParent())){var a=mxResources.get("image")+" ("+mxResources.get("url")+"):",c=d.getView().getState(d.getSelectionCell()),f="";null!=c&&(f=c.style[mxConstants.STYLE_IMAGE]||f);
-var e=d.cellEditor.saveSelection();b.showImageDialog(a,f,function(a,c,b){if(d.cellEditor.isContentEditing())d.cellEditor.restoreSelection(e),d.insertImage(a,c,b);else{var f=d.getSelectionCells();if(null!=a){var h=null;d.getModel().beginUpdate();try{if(0==f.length){var m=d.getFreeInsertPoint(),h=f=[d.insertVertex(d.getDefaultParent(),null,"",m.x,m.y,c,b,"shape=image;imageAspect=0;aspect=fixed;verticalLabelPosition=bottom;verticalAlign=top;")];d.fireEvent(new mxEventObject("cellsInserted","cells",h))}d.setCellStyles(mxConstants.STYLE_IMAGE,
-a,f);var n=d.view.getState(f[0]),g=null!=n?n.style:d.getCellStyle(f[0]);"image"!=g[mxConstants.STYLE_SHAPE]&&"label"!=g[mxConstants.STYLE_SHAPE]&&d.setCellStyles(mxConstants.STYLE_SHAPE,"image",f);if(1==d.getSelectionCount()&&null!=c&&null!=b){var u=f[0],l=d.getModel().getGeometry(u);null!=l&&(l=l.clone(),l.width=c,l.height=b,d.getModel().setGeometry(u,l))}}finally{d.getModel().endUpdate()}null!=h&&(d.setSelectionCells(h),d.scrollCellToVisible(h[0]))}}},d.cellEditor.isContentEditing(),!d.cellEditor.isContentEditing())}}).isEnabled=
-g;this.addAction("insertImage...",function(){d.isEnabled()&&!d.isCellLocked(d.getDefaultParent())&&(d.clearSelection(),b.actions.get("image").funct())}).isEnabled=g;l=this.addAction("layers",mxUtils.bind(this,function(){null==this.layersWindow?(this.layersWindow=new LayersWindow(b,document.body.offsetWidth-280,120,220,180),this.layersWindow.window.addListener("show",function(){b.fireEvent(new mxEventObject("layers"))}),this.layersWindow.window.addListener("hide",function(){b.fireEvent(new mxEventObject("layers"))}),
+var g=d.cellEditor.saveSelection();b.showImageDialog(a,f,function(a,c,b){if(d.cellEditor.isContentEditing())d.cellEditor.restoreSelection(g),d.insertImage(a,c,b);else{var f=d.getSelectionCells();if(null!=a){var e=null;d.getModel().beginUpdate();try{if(0==f.length){var p=d.getFreeInsertPoint(),e=f=[d.insertVertex(d.getDefaultParent(),null,"",p.x,p.y,c,b,"shape=image;imageAspect=0;aspect=fixed;verticalLabelPosition=bottom;verticalAlign=top;")];d.fireEvent(new mxEventObject("cellsInserted","cells",e))}d.setCellStyles(mxConstants.STYLE_IMAGE,
+a,f);var m=d.view.getState(f[0]),h=null!=m?m.style:d.getCellStyle(f[0]);"image"!=h[mxConstants.STYLE_SHAPE]&&"label"!=h[mxConstants.STYLE_SHAPE]&&d.setCellStyles(mxConstants.STYLE_SHAPE,"image",f);if(1==d.getSelectionCount()&&null!=c&&null!=b){var u=f[0],l=d.getModel().getGeometry(u);null!=l&&(l=l.clone(),l.width=c,l.height=b,d.getModel().setGeometry(u,l))}}finally{d.getModel().endUpdate()}null!=e&&(d.setSelectionCells(e),d.scrollCellToVisible(e[0]))}}},d.cellEditor.isContentEditing(),!d.cellEditor.isContentEditing())}}).isEnabled=
+h;this.addAction("insertImage...",function(){d.isEnabled()&&!d.isCellLocked(d.getDefaultParent())&&(d.clearSelection(),b.actions.get("image").funct())}).isEnabled=h;l=this.addAction("layers",mxUtils.bind(this,function(){null==this.layersWindow?(this.layersWindow=new LayersWindow(b,document.body.offsetWidth-280,120,220,180),this.layersWindow.window.addListener("show",function(){b.fireEvent(new mxEventObject("layers"))}),this.layersWindow.window.addListener("hide",function(){b.fireEvent(new mxEventObject("layers"))}),
 this.layersWindow.window.setVisible(!0),b.fireEvent(new mxEventObject("layers"))):this.layersWindow.window.setVisible(!this.layersWindow.window.isVisible())}),null,null,Editor.ctrlKey+"+Shift+L");l.setToggleAction(!0);l.setSelectedCallback(mxUtils.bind(this,function(){return null!=this.layersWindow&&this.layersWindow.window.isVisible()}));l=this.addAction("formatPanel",mxUtils.bind(this,function(){b.toggleFormatPanel()}),null,null,Editor.ctrlKey+"+Shift+P");l.setToggleAction(!0);l.setSelectedCallback(mxUtils.bind(this,
 function(){return 0<b.formatWidth}));l=this.addAction("outline",mxUtils.bind(this,function(){null==this.outlineWindow?(this.outlineWindow=new OutlineWindow(b,document.body.offsetWidth-260,100,180,180),this.outlineWindow.window.addListener("show",function(){b.fireEvent(new mxEventObject("outline"))}),this.outlineWindow.window.addListener("hide",function(){b.fireEvent(new mxEventObject("outline"))}),this.outlineWindow.window.setVisible(!0),b.fireEvent(new mxEventObject("outline"))):this.outlineWindow.window.setVisible(!this.outlineWindow.window.isVisible())}),
-null,null,Editor.ctrlKey+"+Shift+O");l.setToggleAction(!0);l.setSelectedCallback(mxUtils.bind(this,function(){return null!=this.outlineWindow&&this.outlineWindow.window.isVisible()}))};Actions.prototype.addAction=function(a,b,e,d,g){var l;"..."==a.substring(a.length-3)?(a=a.substring(0,a.length-3),l=mxResources.get(a)+"..."):l=mxResources.get(a);return this.put(a,new Action(l,b,e,d,g))};Actions.prototype.put=function(a,b){return this.actions[a]=b};Actions.prototype.get=function(a){return this.actions[a]};
-function Action(a,b,e,d,g){mxEventSource.call(this);this.label=a;this.funct=this.createFunction(b);this.enabled=null!=e?e:!0;this.iconCls=d;this.shortcut=g;this.visible=!0}mxUtils.extend(Action,mxEventSource);Action.prototype.createFunction=function(a){return a};Action.prototype.setEnabled=function(a){this.enabled!=a&&(this.enabled=a,this.fireEvent(new mxEventObject("stateChanged")))};Action.prototype.isEnabled=function(){return this.enabled};
+null,null,Editor.ctrlKey+"+Shift+O");l.setToggleAction(!0);l.setSelectedCallback(mxUtils.bind(this,function(){return null!=this.outlineWindow&&this.outlineWindow.window.isVisible()}))};Actions.prototype.addAction=function(a,b,e,d,h){var l;"..."==a.substring(a.length-3)?(a=a.substring(0,a.length-3),l=mxResources.get(a)+"..."):l=mxResources.get(a);return this.put(a,new Action(l,b,e,d,h))};Actions.prototype.put=function(a,b){return this.actions[a]=b};Actions.prototype.get=function(a){return this.actions[a]};
+function Action(a,b,e,d,h){mxEventSource.call(this);this.label=a;this.funct=this.createFunction(b);this.enabled=null!=e?e:!0;this.iconCls=d;this.shortcut=h;this.visible=!0}mxUtils.extend(Action,mxEventSource);Action.prototype.createFunction=function(a){return a};Action.prototype.setEnabled=function(a){this.enabled!=a&&(this.enabled=a,this.fireEvent(new mxEventObject("stateChanged")))};Action.prototype.isEnabled=function(){return this.enabled};
 Action.prototype.setToggleAction=function(a){this.toggleAction=a};Action.prototype.setSelectedCallback=function(a){this.selectedCallback=a};Action.prototype.isSelected=function(){return this.selectedCallback()};DrawioFile=function(a,b){mxEventSource.call(this);this.ui=a;this.data=b||""};mxUtils.extend(DrawioFile,mxEventSource);DrawioFile.prototype.autosaveDelay=1500;DrawioFile.prototype.maxAutosaveDelay=3E4;DrawioFile.prototype.autosaveThread=null;DrawioFile.prototype.lastAutosave=null;DrawioFile.prototype.modified=!1;DrawioFile.prototype.changeListenerEnabled=!0;DrawioFile.prototype.lastAutosaveRevision=null;DrawioFile.prototype.maxAutosaveRevisionDelay=18E5;DrawioFile.prototype.descriptorChanged=function(){this.fireEvent(new mxEventObject("descriptorChanged"))};
 DrawioFile.prototype.contentChanged=function(){this.fireEvent(new mxEventObject("contentChanged"))};DrawioFile.prototype.save=function(a,b,e,d){this.updateFileData();this.clearAutosave()};DrawioFile.prototype.updateFileData=function(){this.setData(this.ui.getFileData())};DrawioFile.prototype.saveAs=function(a,b,e){};DrawioFile.prototype.saveFile=function(a,b,e,d){};DrawioFile.prototype.getPublicUrl=function(a){a(null)};DrawioFile.prototype.isRestricted=function(){return!1};
 DrawioFile.prototype.isModified=function(){return this.modified};DrawioFile.prototype.setModified=function(a){this.modified=a};DrawioFile.prototype.isAutosaveOptional=function(){return!1};DrawioFile.prototype.isAutosave=function(){return this.ui.editor.autosave};DrawioFile.prototype.isRenamable=function(){return!1};DrawioFile.prototype.rename=function(a,b,e){};DrawioFile.prototype.isMovable=function(){return!1};DrawioFile.prototype.move=function(a,b,e){};DrawioFile.prototype.getHash=function(){return""};
-DrawioFile.prototype.getId=function(){return""};DrawioFile.prototype.isEditable=function(){return!this.ui.editor.chromeless};DrawioFile.prototype.getUi=function(){return this.ui};DrawioFile.prototype.getTitle=function(){return""};DrawioFile.prototype.setData=function(a){this.data=a};DrawioFile.prototype.getData=function(){return this.data};
+DrawioFile.prototype.getId=function(){return""};DrawioFile.prototype.isEditable=function(){return!this.ui.editor.chromeless||this.ui.editor.editable};DrawioFile.prototype.getUi=function(){return this.ui};DrawioFile.prototype.getTitle=function(){return""};DrawioFile.prototype.setData=function(a){this.data=a};DrawioFile.prototype.getData=function(){return this.data};
 DrawioFile.prototype.open=function(){this.ui.setFileData(this.getData());this.changeListener=mxUtils.bind(this,function(a,b){var e=null!=b?b.getProperty("edit"):null;!this.changeListenerEnabled||!this.isEditable()||null!=e&&e.ignoreEdit||(this.setModified(!0),this.isAutosave()?(this.ui.editor.setStatus(mxUtils.htmlEntities(mxResources.get("saving"))+"..."),this.autosave(this.autosaveDelay,this.maxAutosaveDelay,mxUtils.bind(this,function(a){null!=this.autosaveThread||this.ui.getCurrentFile()!=this||
 this.isModified()||this.ui.editor.setStatus(mxUtils.htmlEntities(mxResources.get("allChangesSaved")))}),mxUtils.bind(this,function(a){this.ui.getCurrentFile()==this&&this.addUnsavedStatus(a)}))):this.addUnsavedStatus())});this.ui.editor.graph.model.addListener(mxEvent.CHANGE,this.changeListener);this.ui.editor.graph.addListener("gridSizeChanged",this.changeListener);this.ui.editor.graph.addListener("shadowVisibleChanged",this.changeListener);this.ui.addListener("pageFormatChanged",this.changeListener);
 this.ui.addListener("pageScaleChanged",this.changeListener);this.ui.addListener("backgroundColorChanged",this.changeListener);this.ui.addListener("backgroundImageChanged",this.changeListener);this.ui.addListener("foldingEnabledChanged",this.changeListener);this.ui.addListener("mathEnabledChanged",this.changeListener);this.ui.addListener("gridEnabledChanged",this.changeListener);this.ui.addListener("guidesEnabledChanged",this.changeListener);this.ui.addListener("pageViewChanged",this.changeListener)};
@@ -2566,8 +2567,8 @@ DrawioFile.prototype.autosave=function(a,b,e,d){null==this.lastAutosave&&(this.l
 mxUtils.bind(this,function(a){null!=d&&d(a)}))}else null!=e&&e(null)}),a)};DrawioFile.prototype.isAutosaveNow=function(){return!0};DrawioFile.prototype.autosaveCompleted=function(){};DrawioFile.prototype.clearAutosave=function(){null!=this.autosaveThread&&(window.clearTimeout(this.autosaveThread),this.autosaveThread=null)};DrawioFile.prototype.isAutosaveRevision=function(){var a=(new Date).getTime();return null==this.lastAutosaveRevision||a-this.lastAutosaveRevision>this.maxAutosaveRevisionDelay};
 DrawioFile.prototype.close=function(a){this.isAutosave()&&this.isModified()&&this.save(this.isAutosaveRevision(),null,null,a);this.destroy()};DrawioFile.prototype.hasSameExtension=function(a,b){if(null!=a&&null!=b){var e=a.lastIndexOf("."),d=0<e?a.substring(e):"",e=b.lastIndexOf(".");return d===(0<e?b.substring(e):"")}return a==b};
 DrawioFile.prototype.destroy=function(){this.clearAutosave();null!=this.changeListener&&(this.ui.editor.graph.model.removeListener(this.changeListener),this.ui.editor.graph.removeListener(this.changeListener),this.ui.removeListener(this.changeListener),this.changeListener=null)};LocalFile=function(a,b,e,d){DrawioFile.call(this,a,b);this.title=e;this.mode=d?null:App.MODE_DEVICE};mxUtils.extend(LocalFile,DrawioFile);LocalFile.prototype.isAutosave=function(){return!1};LocalFile.prototype.getMode=function(){return this.mode};LocalFile.prototype.getTitle=function(){return this.title};LocalFile.prototype.isRenamable=function(){return!0};LocalFile.prototype.save=function(a,b,e){this.saveAs(this.title,b,e)};LocalFile.prototype.saveAs=function(a,b,e){this.saveFile(a,!1,b,e)};
-LocalFile.prototype.saveFile=function(a,b,e,d){this.title=a;this.updateFileData();b=this.getData();var g=this.ui.useCanvasForExport&&/(\.png)$/i.test(this.getTitle()),l=mxUtils.bind(this,function(b){if(this.ui.isOfflineApp()||this.ui.isLocalFileSave())this.ui.doSaveLocalFile(b,a,g?"image/png":"text/xml",g);else if(b.length<MAX_REQUEST_SIZE){var d=a.lastIndexOf("."),d=0<d?a.substring(d+1):"xml";(new mxXmlRequest(SAVE_URL,"format="+d+"&xml="+encodeURIComponent(b)+"&filename="+encodeURIComponent(a)+
-(g?"&binary=1":""))).simulate(document,"_blank")}else this.ui.handleError({message:mxResources.get("drawingTooLarge")},mxResources.get("error"),mxUtils.bind(this,function(){mxUtils.popup(b)}));this.setModified(!1);this.contentChanged();null!=e&&e()});g?this.ui.getEmbeddedPng(mxUtils.bind(this,function(a){l(a)}),d,this.ui.getCurrentFile()!=this?this.getData():null):l(b)};LocalFile.prototype.rename=function(a,b,e){this.title=a;this.descriptorChanged();null!=b&&b()};
+LocalFile.prototype.saveFile=function(a,b,e,d){this.title=a;this.updateFileData();b=this.getData();var h=this.ui.useCanvasForExport&&/(\.png)$/i.test(this.getTitle()),l=mxUtils.bind(this,function(b){if(this.ui.isOfflineApp()||this.ui.isLocalFileSave())this.ui.doSaveLocalFile(b,a,h?"image/png":"text/xml",h);else if(b.length<MAX_REQUEST_SIZE){var d=a.lastIndexOf("."),d=0<d?a.substring(d+1):"xml";(new mxXmlRequest(SAVE_URL,"format="+d+"&xml="+encodeURIComponent(b)+"&filename="+encodeURIComponent(a)+
+(h?"&binary=1":""))).simulate(document,"_blank")}else this.ui.handleError({message:mxResources.get("drawingTooLarge")},mxResources.get("error"),mxUtils.bind(this,function(){mxUtils.popup(b)}));this.setModified(!1);this.contentChanged();null!=e&&e()});h?this.ui.getEmbeddedPng(mxUtils.bind(this,function(a){l(a)}),d,this.ui.getCurrentFile()!=this?this.getData():null):l(b)};LocalFile.prototype.rename=function(a,b,e){this.title=a;this.descriptorChanged();null!=b&&b()};
 LocalFile.prototype.open=function(){this.ui.setFileData(this.getData());this.changeListener=mxUtils.bind(this,function(a,b){this.setModified(!0);this.addUnsavedStatus()});this.ui.editor.graph.model.addListener(mxEvent.CHANGE,this.changeListener)};(function(){Editor.prototype.appName="draw.io";Editor.closeImage=mxClient.IS_SVG?"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABkAAAAZCAMAAADzN3VRAAAApVBMVEUAAAD////k5OT///8AAAB1dXXMzMz9/f39/f37+/v5+fn+/v7///9iYmJaWlqFhYWnp6ejo6OHh4f////////////////7+/v5+fnx8fH///8AAAD///8bGxv7+/v5+fkoKCghISFDQ0MYGBjh4eHY2Njb29tQUFBvb29HR0c/Pz82NjYrKyu/v78SEhLu7u7s7OzV1dVVVVU7OzsVFRXAv78QEBBzqehMAAAAG3RSTlMAA/7p/vz5xZlrTiPL/v78+/v7+OXd2TYQDs8L70ZbAAABKUlEQVQoz3VS13LCMBBUXHChd8iukDslQChJ/v/TchaG4cXS+OSb1c7trU7V60OpdRz2ZtNZL4zXNlcN8BEtSG6+NxIXkeRPoBuQ1cjvZ31/VJFB10ISli6diYfH8iYO3WUNCcNlB0gTrXOtkxTo0O1aKKiBBMhhv2MNBQKoiA5wxlZo0JDzD3AYKbWacyj3fs01wxey0pyEP+R8pWKWXoqtIZ0DDg5pbki9krEKOa6LVDQsdoXEsi46Zqh69KFz7B1u7Hb2yDV8firXDKBlZ4UFiswKGRhXTS93/ECK7yxnJ3+S3y/ThpO+cfSD017nqa18aasabU0/t7d+tk0/1oMEJ1NaD67iwdF68OabFSLn+eHb0+vjy+uk8br9fdrftH0O2menfd7+AQfYM/lNjoDHAAAAAElFTkSuQmCC":
 IMAGE_PATH+"/delete.png";Editor.plusImage=mxClient.IS_SVG?"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAoAAAAKCAYAAACNMs+9AAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAyJpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuMC1jMDYwIDYxLjEzNDc3NywgMjAxMC8wMi8xMi0xNzozMjowMCAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvIiB4bWxuczp4bXBNTT0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL21tLyIgeG1sbnM6c3RSZWY9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9zVHlwZS9SZXNvdXJjZVJlZiMiIHhtcDpDcmVhdG9yVG9vbD0iQWRvYmUgUGhvdG9zaG9wIENTNSBNYWNpbnRvc2giIHhtcE1NOkluc3RhbmNlSUQ9InhtcC5paWQ6MDdCMTdENjVCOEM4MTFFNDlCRjVBNDdCODU5NjNBNUMiIHhtcE1NOkRvY3VtZW50SUQ9InhtcC5kaWQ6MDdCMTdENjZCOEM4MTFFNDlCRjVBNDdCODU5NjNBNUMiPiA8eG1wTU06RGVyaXZlZEZyb20gc3RSZWY6aW5zdGFuY2VJRD0ieG1wLmlpZDowN0IxN0Q2M0I4QzgxMUU0OUJGNUE0N0I4NTk2M0E1QyIgc3RSZWY6ZG9jdW1lbnRJRD0ieG1wLmRpZDowN0IxN0Q2NEI4QzgxMUU0OUJGNUE0N0I4NTk2M0E1QyIvPiA8L3JkZjpEZXNjcmlwdGlvbj4gPC9yZGY6UkRGPiA8L3g6eG1wbWV0YT4gPD94cGFja2V0IGVuZD0iciI/PtjrjmgAAAAtSURBVHjaYvz//z8DMigvLwcLdHZ2MiKLMzEQCaivkLGsrOw/dU0cAr4GCDAARQsQbTFrv10AAAAASUVORK5CYII=":
 IMAGE_PATH+"/plus.png";Editor.spinImage=mxClient.IS_SVG?"data:image/gif;base64,R0lGODlhDAAMAPUxAEVriVp7lmCAmmGBm2OCnGmHn3OPpneSqYKbr4OcsIScsI2kto6kt46lt5KnuZmtvpquvpuvv56ywaCzwqK1xKu7yay9yq+/zLHAzbfF0bjG0bzJ1LzK1MDN18jT28nT3M3X3tHa4dTc49Xd5Njf5dng5t3k6d/l6uDm6uru8e7x8/Dz9fT29/b4+Pj5+fj5+vr6+v///wAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACH5BAkKADEAIf8LTkVUU0NBUEUyLjADAQAAACwAAAAADAAMAAAGR8CYcEgsOgYAIax4CCQuQldrCBEsiK8VS2hoFGOrlJDA+cZQwkLnqyoJFZKviSS0ICrE0ec0jDAwIiUeGyBFGhMPFBkhZo1BACH5BAkKAC4ALAAAAAAMAAwAhVB0kFR3k1V4k2CAmmWEnW6Lo3KOpXeSqH2XrIOcsISdsImhtIqhtJCmuJGnuZuwv52wwJ+ywZ+ywqm6yLHBzbLCzrXEz7fF0LnH0rrI0r7L1b/M1sXR2cfT28rV3czW3s/Z4Nfe5Nvi6ODm6uLn6+Ln7OLo7OXq7efs7+zw8u/y9PDy9PX3+Pr7+////wAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAZDQJdwSCxGDAIAoVFkFBwYSyIwGE4OkCJxIdG6WkJEx8sSKj7elfBB0a5SQg1EQ0SVVMPKhDM6iUIkRR4ZFxsgJl6JQQAh+QQJCgAxACwAAAAADAAMAIVGa4lcfZdjgpxkg51nhp5ui6N3kqh5lKqFnbGHn7KIoLOQp7iRp7mSqLmTqbqarr6br7+fssGitcOitcSuvsuuv8uwwMyzw861xNC5x9K6x9K/zNbDztjE0NnG0drJ1NzQ2eDS2+LT2+LV3ePZ4Oba4ebb4ufc4+jm6+7t8PLt8PPt8fPx8/Xx9PX09vf19/j3+Pn///8AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAGQ8CYcEgsUhQFggFSjCQmnE1jcBhqGBXiIuAQSi7FGEIgfIzCFoCXFCZiPO0hKBMiwl7ET6eUYqlWLkUnISImKC1xbUEAIfkECQoAMgAsAAAAAAwADACFTnKPT3KPVHaTYoKcb4yjcY6leZSpf5mtgZuvh5+yiqG0i6K1jqW3kae5nrHBnrLBn7LCoLPCobTDqbrIqrvIs8LOtMPPtcPPtcTPuMbRucfSvcrUvsvVwMzWxdHaydTcytXdzNbezdff0drh2ODl2+Ln3eTp4Obq4ujs5Ont5uvu6O3w6u7w6u7x7/L09vj5+vr7+vv7////AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABkdAmXBILHIcicOCUqxELKKPxKAYgiYd4oMAEWo8RVmjIMScwhmBcJMKXwLCECmMGAhPI1QRwBiaSixCMDFhLSorLi8wYYxCQQAh+QQJCgAxACwAAAAADAAMAIVZepVggJphgZtnhp5vjKN2kah3kqmBmq+KobSLorWNpLaRp7mWq7ybr7+gs8KitcSktsWnuManucexwM2ywc63xtG6yNO9ytS+ytW/zNbDz9jH0tvL1d3N197S2+LU3OPU3ePV3eTX3+Xa4efb4ufd5Onl6u7r7vHs7/Lt8PLw8/Xy9Pby9fb09ff2+Pn3+Pn6+vr///8AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAGSMCYcEgseiwSR+RS7GA4JFGF8RiWNiEiJTERgkjFGAQh/KTCGoJwpApnBkITKrwoCFWnFlEhaAxXLC9CBwAGRS4wQgELYY1CQQAh+QQJCgAzACwAAAAADAAMAIVMcI5SdZFhgZtti6JwjaR4k6mAma6Cm6+KobSLorWLo7WNo7aPpredsMCescGitMOitcSmuMaqu8ixwc2zws63xdC4xtG5x9K9ytXAzdfCztjF0NnF0drK1d3M1t7P2N/P2eDT2+LX3+Xe5Onh5+vi5+vj6Ozk6e3n7O/o7O/q7vHs7/Lt8PPu8fPx8/X3+Pn6+vv7+/v8/Pz///8AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAGRcCZcEgsmkIbTOZTLIlGqZNnchm2SCgiJ6IRqljFmQUiXIVnoITQde4chC9Y+LEQxmTFRkFSNFAqDAMIRQoCAAEEDmeLQQAh+QQJCgAwACwAAAAADAAMAIVXeZRefplff5lhgZtph59yjqV2kaeAmq6FnbGFnrGLorWNpLaQp7mRqLmYrb2essGgs8Klt8apusitvcquv8u2xNC7yNO8ydS8ytTAzdfBzdfM1t7N197Q2eDU3OPX3+XZ4ObZ4ebc4+jf5erg5erg5uvp7fDu8fPv8vTz9fb09vf19/j3+Pn4+fn5+vr6+/v///8AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAGRUCYcEgspkwjEKhUVJ1QsBNp0xm2VixiSOMRvlxFGAcTJook5eEHIhQcwpWIkAFQECkNy9AQWFwyEAkPRQ4FAwQIE2llQQAh+QQJCgAvACwAAAAADAAMAIVNcY5SdZFigptph6BvjKN0kKd8lquAmq+EnbGGn7KHn7ONpLaOpbearr+csMCdscCescGhtMOnuMauvsuzws60w862xdC9ytW/y9a/zNbCztjG0drH0tvK1N3M1t7N19/U3ePb4uff5urj6Ozk6e3l6u7m6u7o7PDq7vDt8PPv8vTw8vTw8/X19vf6+vv///8AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAGQ8CXcEgsvlytVUplJLJIpSEDUESFTELBwSgCCQEV42kjDFiMo4uQsDB2MkLHoEHUTD7DRAHC8VAiZ0QSCgYIDxhNiUEAOw==":
@@ -2575,45 +2576,45 @@ IMAGE_PATH+"/spin.gif";Editor.tweetImage=IMAGE_PATH+"/tweet.png";Editor.facebook
 IMAGE_PATH+"/img-hi-res.png";Editor.loResImage=mxClient.IS_SVG?"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAFAAAAA+CAMAAACLMWy1AAAAS1BMVEVAQEAAAAA1NTVBQUFDQ0NDQ0NFRUVERERBQUFBQUFBQUFAQEBBQUFBQUFCQkJCQkJCQkJBQUFCQkJDQ0NDQ0NCQkJCQkJCQkJGRkb5/XqTAAAAGXRSTlP+AAWODlASCsesX+Lc2LyWe3pwa1tCPjohjSJfoAAAAI1JREFUWMPt1MkKhTAMRuG0anvneXr/J71nUypKcdqI/N8yhLMKMZE1CahnClDQzMPB44ED3EgeCubgDWnWQMHpwTtKwTe+UHD4sJ94wbUEHHFGhILlYDeSnsQeabeCgsPBgB0MOZZ9oGA5GJFiJSfUULAfjLjARrhCwX7wh2YCDwVbwZkUBKqFFJRN+wOcwSgR2sREcgAAAABJRU5ErkJggg==":
 IMAGE_PATH+"/img-lo-res.png";Editor.cameraLargeImage="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAYAAABzenr0AAAAAXNSR0IArs4c6QAAAAlwSFlzAAALEwAACxMBAJqcGAAAAVlpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IlhNUCBDb3JlIDUuNC4wIj4KICAgPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4KICAgICAgPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIKICAgICAgICAgICAgeG1sbnM6dGlmZj0iaHR0cDovL25zLmFkb2JlLmNvbS90aWZmLzEuMC8iPgogICAgICAgICA8dGlmZjpPcmllbnRhdGlvbj4xPC90aWZmOk9yaWVudGF0aW9uPgogICAgICA8L3JkZjpEZXNjcmlwdGlvbj4KICAgPC9yZGY6UkRGPgo8L3g6eG1wbWV0YT4KTMInWQAAA/BJREFUWAnFl0uIjWEYx885buPSuGwmSYwtwsY1ikKSNYNclmQnadgrZSPlsnBLSlaGBdNYKY0Vdi4L4zYzIqxGxmXG//d+7//0+uY7nWMiT/2/53mf+3v7vnNKpf9M5UbrDw8Pj4m+wzmeT1FBUS6Xf+YNox6reMONukijMXUTM3NmI75PyXcJPwRWg5kS7xysDLNmfEUxpx2rceNE50IlYjyRklcLf0prY+x4BTqfmx3ZUHQaO9ISGngYq38V/1EH+ECPa+QaK1u1kVBQirDMChiS3CTeIkwWvghtwhKBpZ8g1CO2B99FynVU/KowSRgQ3mlrBsVZ1awmQlS0SGbfXglfBPbdRGMm5O8RXg2P835pDCvzWjghTHETcLpZLHwS8kTCtBEK1SN83Egam8YxyVZqc+Do5qkwS+gT9grNwkUBG6cbsG/gs3BTuC/0ChCxq4QtwgzBMdwUZBPyN4Ftfi4sYPZHktbOSRlIuutRP5jYj0ueZp88xyYcS/zZoiLyQT1IA/cTj7eSlwnrhI+JnkQbCwo2Sx/2M7VJt17wdhVtgxvrpoFnAuSAbJQ97biZAlKxBfD9wgOhV+BgIR/AZtJ4kwD5PGSj7OmmekjWEy0oAQHAS3+KpBpzXqYK3UItopHpSRMno2N+cm7gDYnfRCcr3QBqriMHLJDkeyhFfiG5aVbK+8rhtP9M6QcIEJHX5Fp9NMAyQlYiu+OOJNlODCIXyka/P23bncTdiC7OydC1+v1Bsb+5r84DK8S3Rdmf5cRUFW3bXtWUSt1Rdk6G4SyJV2o1YId+vNUxr+x5yCJiapFtcxQzLjrxboGcMxvFJwEOKnLwjIbkx/sdSmeSaUY++SwTAxV+4DJT7RVwkbk46gNCsifIItuy0e9PF33Cb4homhN5YRyzL5q5V2VNkv98kqgoGTo3YF9CnMM5Y5rItFfvBSi9JulVXOgI+VwIntkt+SaZ6weQfcovJf7zpTfl86P/wAF7Fz18NeKwmvAWCaX0Z/uMHQr42ZxvR/Rxcw5xM+9J/CJq8w2gduDhmDgso/QrBH47dEXQ1IqczyHpIOfIRtnTtV7SwO1oKXKkU3fbToFGSDHtMWcaH1WBuVYnDbRFi99iqSMySdzxXckrazUh23KBVYGIcfNBkTxca0e4ATJ0KukGYVBgr/MnlhPOtQq/ksUfCbzh+EFCjtnCUoHfjhA/OsiTv2HcEvJMELp0VakZDliTmriTdPivxU4VmEhtPrGV+KJhO7ZKt0doFZh1fgZSBWIW2AGEHwg3BUWOnKtH+suqdw07tYMfglCrWPD5mw9qVYuniaXkT0OtWaSuo5LJTY1RBf+roF9X5+y/5qU+DAAAAABJRU5ErkJggg==";
 Editor.defaultCustomLibraries=[];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## 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## Connections between rows ("from": source colum, "to": target column).\n## Label, style and invert are optional. Defaults are \'\', current style and false.\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 width. Possible value are px or auto. Default is auto.\n#\n# width: auto\n#\n## Node height. Possible value are px or auto. Default is auto.\n#\n# height: auto\n#\n## Padding for autosize. Default is 0.\n#\n# padding: -26\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\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 parallel edges. Default is 40.\n#\n# edgespacing: 40\n#\n## Name of layout. Possible values are auto, none, verticaltree, horizontaltree,\n## verticalflow, horizontalflow, organic, circle. 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\nEvan 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-9-2-128.png\nEdward Morrison,Brand Manager,emo,Office 2,Evan 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\nRon Donovan,System Admin,rdo,Office 3,Evan 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\nTessa Valet,HR Director,tva,Office 4,Evan Miller,me@example.com,#d5e8d4,#82b366,,https://www.draw.io,https://cdn3.iconfinder.com/data/icons/user-avatars-1/512/users-3-128.png\n';
-Editor.configure=function(a){if(null!=a){Menus.prototype.defaultFonts=a.defaultFonts||Menus.prototype.defaultFonts;ColorDialog.prototype.presetColors=a.presetColors||ColorDialog.prototype.presetColors;ColorDialog.prototype.defaultColors=a.defaultColors||ColorDialog.prototype.defaultColors;StyleFormatPanel.prototype.defaultColorSchemes=a.defaultColorSchemes||StyleFormatPanel.prototype.defaultColorSchemes;if(null!=a.css){var c=document.createElement("style");c.setAttribute("type","text/css");c.appendChild(document.createTextNode(a.css));
-var b=document.getElementsByTagName("script")[0];b.parentNode.insertBefore(c,b)}null!=a.defaultLibraries&&(Sidebar.prototype.defaultEntries=a.defaultLibraries);null!=a.defaultCustomLibraries&&(Editor.defaultCustomLibraries=a.defaultCustomLibraries);null!=a.defaultVertexStyle&&(Graph.prototype.defaultVertexStyle=a.defaultVertexStyle);null!=a.defaultEdgeStyle&&(Graph.prototype.defaultEdgeStyle=a.defaultEdgeStyle);a.emptyDiagramXml&&(EditorUi.prototype.emptyDiagramXml=a.emptyDiagramXml);a.thumbWidth&&
-(Sidebar.prototype.thumbWidth=a.thumbWidth);a.thumbHeight&&(Sidebar.prototype.thumbHeight=a.thumbHeight);a.emptyLibraryXml&&(EditorUi.prototype.emptyLibraryXml=a.emptyLibraryXml);a.sidebarWidth&&(EditorUi.prototype.hsplitPosition=a.sidebarWidth);a.fontCss&&(c=document.createElement("style"),c.setAttribute("type","text/css"),c.appendChild(document.createTextNode(a.fontCss)),b=document.getElementsByTagName("script")[0],b.parentNode.insertBefore(c,b),Editor.prototype.fontCss=a.fontCss);if(null!=a.plugins)for(App.initPluginCallback(),
-c=0;c<a.plugins.length;c++)mxscript(a.plugins[c])}};Editor.prototype.editButtonLink=null!=urlParams.edit?decodeURIComponent(urlParams.edit):null;var a=Editor.prototype.setGraphXml;Editor.prototype.setGraphXml=function(c){c=null!=c&&"mxlibrary"!=c.nodeName?this.extractGraphModel(c):null;if(null!=c){var b=c.getElementsByTagName("parsererror");if(null!=b&&0<b.length){var b=b[0],f=b.getElementsByTagName("div");null!=f&&0<f.length&&(b=f[0]);throw{message:mxUtils.getTextContent(b)};}if("mxGraphModel"==
-c.nodeName){b=c.getAttribute("style")||"default-style2";if("1"==urlParams.embed||null!=b&&""!=b)b!=this.graph.currentStyle&&(f=null!=this.graph.themes?this.graph.themes[b]:mxUtils.load(STYLE_PATH+"/"+b+".xml").getDocumentElement(),null!=f&&(d=new mxCodec(f.ownerDocument),d.decode(f,this.graph.getStylesheet())));else if(f=null!=this.graph.themes?this.graph.themes["default-old"]:mxUtils.load(STYLE_PATH+"/default-old.xml").getDocumentElement(),null!=f){var d=new mxCodec(f.ownerDocument);d.decode(f,this.graph.getStylesheet())}this.graph.currentStyle=
-b;this.graph.mathEnabled="1"==urlParams.math||"1"==c.getAttribute("math");b=c.getAttribute("backgroundImage");null!=b?(b=JSON.parse(b),this.graph.setBackgroundImage(new mxImage(b.src,b.width,b.height))):this.graph.setBackgroundImage(null);mxClient.NO_FO=this.graph.mathEnabled?!0:this.originalNoForeignObject;this.graph.setShadowVisible("1"==c.getAttribute("shadow"),!1)}a.apply(this,arguments)}else throw{message:mxResources.get("notADiagramFile")||"Invalid data",toString:function(){return this.message}};
-};var b=Editor.prototype.getGraphXml;Editor.prototype.getGraphXml=function(a){a=null!=a?a:!0;var c=b.apply(this,arguments);null!=this.graph.currentStyle&&"default-style2"!=this.graph.currentStyle&&c.setAttribute("style",this.graph.currentStyle);null!=this.graph.backgroundImage&&c.setAttribute("backgroundImage",JSON.stringify(this.graph.backgroundImage));c.setAttribute("math",this.graph.mathEnabled?"1":"0");c.setAttribute("shadow",this.graph.shadowVisible?"1":"0");return c};Editor.prototype.isDataSvg=
-function(a){try{var c=mxUtils.parseXml(a).documentElement.getAttribute("content");if(null!=c&&(null!=c&&"<"!=c.charAt(0)&&"%"!=c.charAt(0)&&(c=unescape(window.atob?atob(c):Base64.decode(cont,c))),null!=c&&"%"==c.charAt(0)&&(c=decodeURIComponent(c)),null!=c&&0<c.length)){var b=mxUtils.parseXml(c).documentElement;return"mxfile"==b.nodeName||"mxGraphModel"==b.nodeName}}catch(x){}return!1};Editor.prototype.extractGraphModel=function(a,c){if(null!=a&&"undefined"!==typeof pako){var b=a.ownerDocument.getElementsByTagName("div"),
-f=[];if(null!=b&&0<b.length)for(var d=0;d<b.length;d++)if("mxgraph"==b[d].getAttribute("class")){f.push(b[d]);break}0<f.length&&(b=f[0].getAttribute("data-mxgraph"),null!=b?(f=JSON.parse(b),null!=f&&null!=f.xml&&(f=mxUtils.parseXml(f.xml),a=f.documentElement)):(f=f[0].getElementsByTagName("div"),0<f.length&&(b=mxUtils.getTextContent(f[0]),b=this.graph.decompress(b),0<b.length&&(f=mxUtils.parseXml(b),a=f.documentElement))))}if(null!=a&&"svg"==a.nodeName)if(b=a.getAttribute("content"),null!=b&&"<"!=
-b.charAt(0)&&"%"!=b.charAt(0)&&(b=unescape(window.atob?atob(b):Base64.decode(cont,b))),null!=b&&"%"==b.charAt(0)&&(b=decodeURIComponent(b)),null!=b&&0<b.length)a=mxUtils.parseXml(b).documentElement;else throw{message:mxResources.get("notADiagramFile")};null==a||c||(f=null,"diagram"==a.nodeName?f=a:"mxfile"==a.nodeName&&(b=a.getElementsByTagName("diagram"),0<b.length&&(f=b[Math.max(0,Math.min(b.length-1,urlParams.page||0))])),null!=f&&(b=this.graph.decompress(mxUtils.getTextContent(f)),null!=b&&0<
-b.length&&(a=mxUtils.parseXml(b).documentElement)));null==a||"mxGraphModel"==a.nodeName||c&&"mxfile"==a.nodeName||(a=null);return a};var e=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?!0:this.originalNoForeignObject;e.apply(this,arguments)};Editor.prototype.originalNoForeignObject=mxClient.NO_FO;var d=Editor.prototype.updateGraphComponents;Editor.prototype.updateGraphComponents=
-function(){d.apply(this,arguments);mxClient.NO_FO=this.graph.mathEnabled&&null!=Editor.MathJaxRender?!0:this.originalNoForeignObject};Editor.initMath=function(a,c){a=null!=a?a:"https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.0/MathJax.js?config=TeX-MML-AM_HTMLorMML";Editor.mathJaxQueue=[];Editor.doMathJaxRender=function(a){MathJax.Hub.Queue(["Typeset",MathJax.Hub,a])};window.MathJax={skipStartupTypeset:!0,showMathMenu:!1,messageStyle:"none",AuthorInit:function(){MathJax.Hub.Config(c||{jax:["input/TeX",
-"input/MathML","input/AsciiMath","output/HTML-CSS"],extensions:["tex2jax.js","mml2jax.js","asciimath2jax.js"],TeX:{extensions:["AMSmath.js","AMSsymbols.js","noErrors.js","noUndefined.js"]},tex2jax:{ignoreClass:"mxCellEditor"},asciimath2jax:{ignoreClass:"mxCellEditor"}});MathJax.Hub.Register.StartupHook("Begin",function(){for(var a=0;a<Editor.mathJaxQueue.length;a++)Editor.doMathJaxRender(Editor.mathJaxQueue[a])})}};Editor.MathJaxRender=function(a){"undefined"!==typeof MathJax&&"undefined"!==typeof MathJax.Hub?
-Editor.doMathJaxRender(a):Editor.mathJaxQueue.push(a)};Editor.MathJaxClear=function(){Editor.mathJaxQueue=[]};var b=Editor.prototype.init;Editor.prototype.init=function(){b.apply(this,arguments);this.graph.addListener(mxEvent.SIZE,mxUtils.bind(this,function(a,c){this.graph.mathEnabled&&Editor.MathJaxRender(this.graph.container)}))};var f=document.getElementsByTagName("script");if(null!=f&&0<f.length){var d=document.createElement("script");d.type="text/javascript";d.src=a;f[0].parentNode.appendChild(d)}};
-Editor.prototype.csvToArray=function(a){if(!/^\s*(?:'[^'\\]*(?:\\[\S\s][^'\\]*)*'|"[^"\\]*(?:\\[\S\s][^"\\]*)*"|[^,'"\s\\]*(?:\s+[^,'"\s\\]+)*)\s*(?:,\s*(?:'[^'\\]*(?:\\[\S\s][^'\\]*)*'|"[^"\\]*(?:\\[\S\s][^"\\]*)*"|[^,'"\s\\]*(?:\s+[^,'"\s\\]+)*)\s*)*$/.test(a))return null;var c=[];a.replace(/(?!\s*$)\s*(?:'([^'\\]*(?:\\[\S\s][^'\\]*)*)'|"([^"\\]*(?:\\[\S\s][^"\\]*)*)"|([^,'"\s\\]*(?:\s+[^,'"\s\\]+)*))\s*(?:,|$)/g,function(a,b,f,d){void 0!==b?c.push(b.replace(/\\'/g,"'")):void 0!==f?c.push(f.replace(/\\"/g,
-'"')):void 0!==d&&c.push(d);return""});/,\s*$/.test(a)&&c.push("");return c};if(window.ColorDialog){var g=ColorDialog.addRecentColor;ColorDialog.addRecentColor=function(a,c){g.apply(this,arguments);mxSettings.setRecentColors(ColorDialog.recentColors);mxSettings.save()};var l=ColorDialog.resetRecentColors;ColorDialog.resetRecentColors=function(){l.apply(this,arguments);mxSettings.setRecentColors(ColorDialog.recentColors);mxSettings.save()}}if(null!=window.StyleFormatPanel){var p=Format.prototype.init;
-Format.prototype.init=function(){p.apply(this,arguments);this.editorUi.editor.addListener("fileLoaded",this.update)};var q=Format.prototype.refresh;Format.prototype.refresh=function(){null!=this.editorUi.getCurrentFile()||"1"==urlParams.embed||this.editorUi.editor.chromeless?q.apply(this,arguments):this.clear()};var c=DiagramFormatPanel.prototype.addView;DiagramFormatPanel.prototype.addView=function(a){a=c.apply(this,arguments);if(mxClient.IS_SVG){var b=this.editorUi,f=b.editor.graph;a.appendChild(this.createOption(mxResources.get("shadow"),
-function(){return f.shadowVisible},function(a){f.setShadowVisible(!f.shadowVisible)},{install:function(a){this.listener=function(){a(f.shadowVisible)};b.addListener("shadowVisibleChanged",this.listener)},destroy:function(){b.removeListener(this.listener)}}))}return a};var f=DiagramFormatPanel.prototype.addOptions;DiagramFormatPanel.prototype.addOptions=function(a){a=f.apply(this,arguments);var c=this.editorUi;if(c.editor.graph.isEnabled()){var b=c.getCurrentFile();null!=b&&b.isAutosaveOptional()&&
-(b=this.createOption(mxResources.get("autosave"),function(){return c.editor.autosave},function(a){c.editor.setAutosave(a)},{install:function(a){this.listener=function(){a(c.editor.autosave)};c.editor.addListener("autosaveChanged",this.listener)},destroy:function(){c.editor.removeListener(this.listener)}}),a.appendChild(b))}return a};StyleFormatPanel.prototype.defaultColorSchemes=[[null,{fill:"#f5f5f5",stroke:"#666666"},{fill:"#dae8fc",stroke:"#6c8ebf"},{fill:"#d5e8d4",stroke:"#82b366"},{fill:"#ffe6cc",
-stroke:"#d79b00"},{fill:"#fff2cc",stroke:"#d6b656"},{fill:"#f8cecc",stroke:"#b85450"},{fill:"#e1d5e7",stroke:"#9673a6"}],[null,{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"}],[null,
-{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"}]];var h=StyleFormatPanel.prototype.init;StyleFormatPanel.prototype.init=function(){"image"!=this.format.createSelectionState().style.shape&&this.container.appendChild(this.addStyles(this.createPanel()));h.apply(this,arguments)};var m=StyleFormatPanel.prototype.addStyleOps;
-StyleFormatPanel.prototype.addStyleOps=function(a){var c=mxUtils.button(mxResources.get("copyStyle"),mxUtils.bind(this,function(a){this.editorUi.actions.get("copyStyle").funct()}));c.setAttribute("title",mxResources.get("copyStyle")+" ("+this.editorUi.actions.get("copyStyle").shortcut+")");c.style.marginBottom="2px";c.style.width="100px";c.style.marginRight="2px";a.appendChild(c);c=mxUtils.button(mxResources.get("pasteStyle"),mxUtils.bind(this,function(a){this.editorUi.actions.get("pasteStyle").funct()}));
-c.setAttribute("title",mxResources.get("pasteStyle")+" ("+this.editorUi.actions.get("pasteStyle").shortcut+")");c.style.marginBottom="2px";c.style.width="100px";a.appendChild(c);mxUtils.br(a);return m.apply(this,arguments)};StyleFormatPanel.prototype.addStyles=function(a){function c(a){function c(a){var c=mxUtils.button("",function(c){f.getModel().beginUpdate();try{var b=f.getSelectionCells();for(c=0;c<b.length;c++){for(var d=f.getModel().getStyle(b[c]),h=0;h<e.length;h++)d=mxUtils.removeStylename(d,
-e[h]);null!=a?(d=mxUtils.setStyle(d,mxConstants.STYLE_FILLCOLOR,a.fill),d=mxUtils.setStyle(d,mxConstants.STYLE_STROKECOLOR,a.stroke),d=mxUtils.setStyle(d,mxConstants.STYLE_GRADIENTCOLOR,a.gradient)):(d=mxUtils.setStyle(d,mxConstants.STYLE_FILLCOLOR,"#ffffff"),d=mxUtils.setStyle(d,mxConstants.STYLE_STROKECOLOR,"#000000"),d=mxUtils.setStyle(d,mxConstants.STYLE_GRADIENTCOLOR,null));f.getModel().setStyle(b[c],d)}}finally{f.getModel().endUpdate()}});c.className="geStyleButton";c.style.width="36px";c.style.height=
-"30px";c.style.margin="0px 6px 6px 0px";null!=a?(null!=a.gradient?mxClient.IS_IE&&(mxClient.IS_QUIRKS||10>document.documentMode)?c.style.filter="progid:DXImageTransform.Microsoft.Gradient(StartColorStr='"+a.fill+"', EndColorStr='"+a.gradient+"', GradientType=0)":c.style.backgroundImage="linear-gradient("+a.fill+" 0px,"+a.gradient+" 100%)":c.style.backgroundColor=a.fill,c.style.border="1px solid "+a.stroke):(c.style.backgroundColor="#ffffff",c.style.border="1px solid #000000");d.appendChild(c)}d.innerHTML=
-"";for(var b=0;b<a.length;b++)0<b&&0==mxUtils.mod(b,4)&&mxUtils.br(d),c(a[b])}function b(a){mxEvent.addListener(a,"mouseenter",function(){a.style.opacity="1"});mxEvent.addListener(a,"mouseleave",function(){a.style.opacity="0.5"})}var f=this.editorUi.editor.graph,d=document.createElement("div");d.style.whiteSpace="normal";d.style.paddingLeft="24px";d.style.paddingRight="20px";a.style.paddingLeft="16px";a.style.paddingBottom="6px";a.style.position="relative";a.appendChild(d);var e="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".split(" ");
-null==this.editorUi.currentScheme&&(this.editorUi.currentScheme=0);var h=document.createElement("div");h.style.cssText="position:absolute;left:10px;top:8px;bottom:8px;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(h,"click",mxUtils.bind(this,function(){this.editorUi.currentScheme=mxUtils.mod(this.editorUi.currentScheme-1,this.defaultColorSchemes.length);c(this.defaultColorSchemes[this.editorUi.currentScheme])}));var k=document.createElement("div");k.style.cssText="position:absolute;left:202px;top:8px;bottom:8px;width:20px;margin:4px;opacity:0.5;background-repeat:no-repeat;background-position:center center;background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAwAAAAQBAMAAADQT4M0AAAAIVBMVEUAAAB2dnZ2dnZ2dnZ2dnZ2dnZ2dnZ2dnZ2dnZ2dnZ2dnYBuwCcAAAACnRSTlMAfCTkhhvb7cQSPH2JPgAAADZJREFUCNdjQAOMAmBKaiGY8loF5rKswsZlrVo8AUiFrTICcbIWK8A5DF1gDoMymMPApIAwHwCS0Qx/U7qCBQAAAABJRU5ErkJggg==);";
-1<this.defaultColorSchemes.length&&(a.appendChild(h),a.appendChild(k));mxEvent.addListener(k,"click",mxUtils.bind(this,function(){this.editorUi.currentScheme=mxUtils.mod(this.editorUi.currentScheme+1,this.defaultColorSchemes.length);c(this.defaultColorSchemes[this.editorUi.currentScheme])}));b(h);b(k);c(this.defaultColorSchemes[this.editorUi.currentScheme]);return a};StyleFormatPanel.prototype.addEditOps=function(a){var c=this.format.getSelectionState(),b=null;1==this.editorUi.editor.graph.getSelectionCount()&&
-(b=mxUtils.button(mxResources.get("editStyle"),mxUtils.bind(this,function(a){this.editorUi.actions.get("editStyle").funct()})),b.setAttribute("title",mxResources.get("editStyle")+" ("+this.editorUi.actions.get("editStyle").shortcut+")"),b.style.width="202px",b.style.marginBottom="2px",a.appendChild(b));var f=this.editorUi.editor.graph,d=f.view.getState(f.getSelectionCell());1==f.getSelectionCount()&&null!=d&&null!=d.shape&&null!=d.shape.stencil?(c=mxUtils.button(mxResources.get("editShape"),mxUtils.bind(this,
+Editor.configure=function(a){if(null!=a){Menus.prototype.defaultFonts=a.defaultFonts||Menus.prototype.defaultFonts;ColorDialog.prototype.presetColors=a.presetColors||ColorDialog.prototype.presetColors;ColorDialog.prototype.defaultColors=a.defaultColors||ColorDialog.prototype.defaultColors;StyleFormatPanel.prototype.defaultColorSchemes=a.defaultColorSchemes||StyleFormatPanel.prototype.defaultColorSchemes;Graph.prototype.defaultEdgeLength=a.defaultEdgeLength||Graph.prototype.defaultEdgeLength;if(null!=
+a.css){var c=document.createElement("style");c.setAttribute("type","text/css");c.appendChild(document.createTextNode(a.css));var b=document.getElementsByTagName("script")[0];b.parentNode.insertBefore(c,b)}null!=a.defaultLibraries&&(Sidebar.prototype.defaultEntries=a.defaultLibraries);null!=a.defaultCustomLibraries&&(Editor.defaultCustomLibraries=a.defaultCustomLibraries);null!=a.defaultVertexStyle&&(Graph.prototype.defaultVertexStyle=a.defaultVertexStyle);null!=a.defaultEdgeStyle&&(Graph.prototype.defaultEdgeStyle=
+a.defaultEdgeStyle);a.emptyDiagramXml&&(EditorUi.prototype.emptyDiagramXml=a.emptyDiagramXml);a.thumbWidth&&(Sidebar.prototype.thumbWidth=a.thumbWidth);a.thumbHeight&&(Sidebar.prototype.thumbHeight=a.thumbHeight);a.emptyLibraryXml&&(EditorUi.prototype.emptyLibraryXml=a.emptyLibraryXml);a.sidebarWidth&&(EditorUi.prototype.hsplitPosition=a.sidebarWidth);a.fontCss&&(c=document.createElement("style"),c.setAttribute("type","text/css"),c.appendChild(document.createTextNode(a.fontCss)),b=document.getElementsByTagName("script")[0],
+b.parentNode.insertBefore(c,b),Editor.prototype.fontCss=a.fontCss);if(null!=a.plugins)for(App.initPluginCallback(),c=0;c<a.plugins.length;c++)mxscript(a.plugins[c])}};Editor.prototype.editButtonLink=null!=urlParams.edit?decodeURIComponent(urlParams.edit):null;var a=Editor.prototype.setGraphXml;Editor.prototype.setGraphXml=function(c){c=null!=c&&"mxlibrary"!=c.nodeName?this.extractGraphModel(c):null;if(null!=c){var b=c.getElementsByTagName("parsererror");if(null!=b&&0<b.length){var b=b[0],d=b.getElementsByTagName("div");
+null!=d&&0<d.length&&(b=d[0]);throw{message:mxUtils.getTextContent(b)};}if("mxGraphModel"==c.nodeName){b=c.getAttribute("style")||"default-style2";if("1"==urlParams.embed||null!=b&&""!=b)b!=this.graph.currentStyle&&(d=null!=this.graph.themes?this.graph.themes[b]:mxUtils.load(STYLE_PATH+"/"+b+".xml").getDocumentElement(),null!=d&&(f=new mxCodec(d.ownerDocument),f.decode(d,this.graph.getStylesheet())));else if(d=null!=this.graph.themes?this.graph.themes["default-old"]:mxUtils.load(STYLE_PATH+"/default-old.xml").getDocumentElement(),
+null!=d){var f=new mxCodec(d.ownerDocument);f.decode(d,this.graph.getStylesheet())}this.graph.currentStyle=b;this.graph.mathEnabled="1"==urlParams.math||"1"==c.getAttribute("math");b=c.getAttribute("backgroundImage");null!=b?(b=JSON.parse(b),this.graph.setBackgroundImage(new mxImage(b.src,b.width,b.height))):this.graph.setBackgroundImage(null);mxClient.NO_FO=this.graph.mathEnabled?!0:this.originalNoForeignObject;this.graph.setShadowVisible("1"==c.getAttribute("shadow"),!1)}a.apply(this,arguments)}else throw{message:mxResources.get("notADiagramFile")||
+"Invalid data",toString:function(){return this.message}};};var b=Editor.prototype.getGraphXml;Editor.prototype.getGraphXml=function(a){a=null!=a?a:!0;var c=b.apply(this,arguments);null!=this.graph.currentStyle&&"default-style2"!=this.graph.currentStyle&&c.setAttribute("style",this.graph.currentStyle);null!=this.graph.backgroundImage&&c.setAttribute("backgroundImage",JSON.stringify(this.graph.backgroundImage));c.setAttribute("math",this.graph.mathEnabled?"1":"0");c.setAttribute("shadow",this.graph.shadowVisible?
+"1":"0");return c};Editor.prototype.isDataSvg=function(a){try{var c=mxUtils.parseXml(a).documentElement.getAttribute("content");if(null!=c&&(null!=c&&"<"!=c.charAt(0)&&"%"!=c.charAt(0)&&(c=unescape(window.atob?atob(c):Base64.decode(cont,c))),null!=c&&"%"==c.charAt(0)&&(c=decodeURIComponent(c)),null!=c&&0<c.length)){var b=mxUtils.parseXml(c).documentElement;return"mxfile"==b.nodeName||"mxGraphModel"==b.nodeName}}catch(x){}return!1};Editor.prototype.extractGraphModel=function(a,c){if(null!=a&&"undefined"!==
+typeof pako){var b=a.ownerDocument.getElementsByTagName("div"),d=[];if(null!=b&&0<b.length)for(var f=0;f<b.length;f++)if("mxgraph"==b[f].getAttribute("class")){d.push(b[f]);break}0<d.length&&(b=d[0].getAttribute("data-mxgraph"),null!=b?(d=JSON.parse(b),null!=d&&null!=d.xml&&(d=mxUtils.parseXml(d.xml),a=d.documentElement)):(d=d[0].getElementsByTagName("div"),0<d.length&&(b=mxUtils.getTextContent(d[0]),b=this.graph.decompress(b),0<b.length&&(d=mxUtils.parseXml(b),a=d.documentElement))))}if(null!=a&&
+"svg"==a.nodeName)if(b=a.getAttribute("content"),null!=b&&"<"!=b.charAt(0)&&"%"!=b.charAt(0)&&(b=unescape(window.atob?atob(b):Base64.decode(cont,b))),null!=b&&"%"==b.charAt(0)&&(b=decodeURIComponent(b)),null!=b&&0<b.length)a=mxUtils.parseXml(b).documentElement;else throw{message:mxResources.get("notADiagramFile")};null==a||c||(d=null,"diagram"==a.nodeName?d=a:"mxfile"==a.nodeName&&(b=a.getElementsByTagName("diagram"),0<b.length&&(d=b[Math.max(0,Math.min(b.length-1,urlParams.page||0))])),null!=d&&
+(b=this.graph.decompress(mxUtils.getTextContent(d)),null!=b&&0<b.length&&(a=mxUtils.parseXml(b).documentElement)));null==a||"mxGraphModel"==a.nodeName||c&&"mxfile"==a.nodeName||(a=null);return a};var e=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?!0:this.originalNoForeignObject;e.apply(this,arguments)};Editor.prototype.originalNoForeignObject=mxClient.NO_FO;
+var d=Editor.prototype.updateGraphComponents;Editor.prototype.updateGraphComponents=function(){d.apply(this,arguments);mxClient.NO_FO=this.graph.mathEnabled&&null!=Editor.MathJaxRender?!0:this.originalNoForeignObject};Editor.initMath=function(a,c){a=null!=a?a:"https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.0/MathJax.js?config=TeX-MML-AM_HTMLorMML";Editor.mathJaxQueue=[];Editor.doMathJaxRender=function(a){MathJax.Hub.Queue(["Typeset",MathJax.Hub,a])};window.MathJax={skipStartupTypeset:!0,showMathMenu:!1,
+messageStyle:"none",AuthorInit:function(){MathJax.Hub.Config(c||{jax:["input/TeX","input/MathML","input/AsciiMath","output/HTML-CSS"],extensions:["tex2jax.js","mml2jax.js","asciimath2jax.js"],TeX:{extensions:["AMSmath.js","AMSsymbols.js","noErrors.js","noUndefined.js"]},tex2jax:{ignoreClass:"mxCellEditor"},asciimath2jax:{ignoreClass:"mxCellEditor"}});MathJax.Hub.Register.StartupHook("Begin",function(){for(var a=0;a<Editor.mathJaxQueue.length;a++)Editor.doMathJaxRender(Editor.mathJaxQueue[a])})}};
+Editor.MathJaxRender=function(a){"undefined"!==typeof MathJax&&"undefined"!==typeof MathJax.Hub?Editor.doMathJaxRender(a):Editor.mathJaxQueue.push(a)};Editor.MathJaxClear=function(){Editor.mathJaxQueue=[]};var b=Editor.prototype.init;Editor.prototype.init=function(){b.apply(this,arguments);this.graph.addListener(mxEvent.SIZE,mxUtils.bind(this,function(a,c){this.graph.mathEnabled&&Editor.MathJaxRender(this.graph.container)}))};var d=document.getElementsByTagName("script");if(null!=d&&0<d.length){var f=
+document.createElement("script");f.type="text/javascript";f.src=a;d[0].parentNode.appendChild(f)}};Editor.prototype.csvToArray=function(a){if(!/^\s*(?:'[^'\\]*(?:\\[\S\s][^'\\]*)*'|"[^"\\]*(?:\\[\S\s][^"\\]*)*"|[^,'"\s\\]*(?:\s+[^,'"\s\\]+)*)\s*(?:,\s*(?:'[^'\\]*(?:\\[\S\s][^'\\]*)*'|"[^"\\]*(?:\\[\S\s][^"\\]*)*"|[^,'"\s\\]*(?:\s+[^,'"\s\\]+)*)\s*)*$/.test(a))return null;var c=[];a.replace(/(?!\s*$)\s*(?:'([^'\\]*(?:\\[\S\s][^'\\]*)*)'|"([^"\\]*(?:\\[\S\s][^"\\]*)*)"|([^,'"\s\\]*(?:\s+[^,'"\s\\]+)*))\s*(?:,|$)/g,
+function(a,b,d,f){void 0!==b?c.push(b.replace(/\\'/g,"'")):void 0!==d?c.push(d.replace(/\\"/g,'"')):void 0!==f&&c.push(f);return""});/,\s*$/.test(a)&&c.push("");return c};if(window.ColorDialog){var h=ColorDialog.addRecentColor;ColorDialog.addRecentColor=function(a,c){h.apply(this,arguments);mxSettings.setRecentColors(ColorDialog.recentColors);mxSettings.save()};var l=ColorDialog.resetRecentColors;ColorDialog.resetRecentColors=function(){l.apply(this,arguments);mxSettings.setRecentColors(ColorDialog.recentColors);
+mxSettings.save()}}if(null!=window.StyleFormatPanel){var n=Format.prototype.init;Format.prototype.init=function(){n.apply(this,arguments);this.editorUi.editor.addListener("fileLoaded",this.update)};var q=Format.prototype.refresh;Format.prototype.refresh=function(){null!=this.editorUi.getCurrentFile()||"1"==urlParams.embed||this.editorUi.editor.chromeless?q.apply(this,arguments):this.clear()};var c=DiagramFormatPanel.prototype.addView;DiagramFormatPanel.prototype.addView=function(a){a=c.apply(this,
+arguments);if(mxClient.IS_SVG){var b=this.editorUi,d=b.editor.graph;a.appendChild(this.createOption(mxResources.get("shadow"),function(){return d.shadowVisible},function(a){d.setShadowVisible(!d.shadowVisible)},{install:function(a){this.listener=function(){a(d.shadowVisible)};b.addListener("shadowVisibleChanged",this.listener)},destroy:function(){b.removeListener(this.listener)}}))}return a};var f=DiagramFormatPanel.prototype.addOptions;DiagramFormatPanel.prototype.addOptions=function(a){a=f.apply(this,
+arguments);var c=this.editorUi;if(c.editor.graph.isEnabled()){var b=c.getCurrentFile();null!=b&&b.isAutosaveOptional()&&(b=this.createOption(mxResources.get("autosave"),function(){return c.editor.autosave},function(a){c.editor.setAutosave(a)},{install:function(a){this.listener=function(){a(c.editor.autosave)};c.editor.addListener("autosaveChanged",this.listener)},destroy:function(){c.editor.removeListener(this.listener)}}),a.appendChild(b))}return a};StyleFormatPanel.prototype.defaultColorSchemes=
+[[null,{fill:"#f5f5f5",stroke:"#666666"},{fill:"#dae8fc",stroke:"#6c8ebf"},{fill:"#d5e8d4",stroke:"#82b366"},{fill:"#ffe6cc",stroke:"#d79b00"},{fill:"#fff2cc",stroke:"#d6b656"},{fill:"#f8cecc",stroke:"#b85450"},{fill:"#e1d5e7",stroke:"#9673a6"}],[null,{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"}],[null,{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"}]];var g=StyleFormatPanel.prototype.init;StyleFormatPanel.prototype.init=function(){"image"!=this.format.createSelectionState().style.shape&&this.container.appendChild(this.addStyles(this.createPanel()));
+g.apply(this,arguments)};var p=StyleFormatPanel.prototype.addStyleOps;StyleFormatPanel.prototype.addStyleOps=function(a){var c=mxUtils.button(mxResources.get("copyStyle"),mxUtils.bind(this,function(a){this.editorUi.actions.get("copyStyle").funct()}));c.setAttribute("title",mxResources.get("copyStyle")+" ("+this.editorUi.actions.get("copyStyle").shortcut+")");c.style.marginBottom="2px";c.style.width="100px";c.style.marginRight="2px";a.appendChild(c);c=mxUtils.button(mxResources.get("pasteStyle"),mxUtils.bind(this,
+function(a){this.editorUi.actions.get("pasteStyle").funct()}));c.setAttribute("title",mxResources.get("pasteStyle")+" ("+this.editorUi.actions.get("pasteStyle").shortcut+")");c.style.marginBottom="2px";c.style.width="100px";a.appendChild(c);mxUtils.br(a);return p.apply(this,arguments)};StyleFormatPanel.prototype.addStyles=function(a){function c(a){function c(a){var c=mxUtils.button("",function(c){d.getModel().beginUpdate();try{var b=d.getSelectionCells();for(c=0;c<b.length;c++){for(var f=d.getModel().getStyle(b[c]),
+e=0;e<g.length;e++)f=mxUtils.removeStylename(f,g[e]);null!=a?(f=mxUtils.setStyle(f,mxConstants.STYLE_FILLCOLOR,a.fill),f=mxUtils.setStyle(f,mxConstants.STYLE_STROKECOLOR,a.stroke),f=mxUtils.setStyle(f,mxConstants.STYLE_GRADIENTCOLOR,a.gradient)):(f=mxUtils.setStyle(f,mxConstants.STYLE_FILLCOLOR,"#ffffff"),f=mxUtils.setStyle(f,mxConstants.STYLE_STROKECOLOR,"#000000"),f=mxUtils.setStyle(f,mxConstants.STYLE_GRADIENTCOLOR,null));d.getModel().setStyle(b[c],f)}}finally{d.getModel().endUpdate()}});c.className=
+"geStyleButton";c.style.width="36px";c.style.height="30px";c.style.margin="0px 6px 6px 0px";null!=a?(null!=a.gradient?mxClient.IS_IE&&(mxClient.IS_QUIRKS||10>document.documentMode)?c.style.filter="progid:DXImageTransform.Microsoft.Gradient(StartColorStr='"+a.fill+"', EndColorStr='"+a.gradient+"', GradientType=0)":c.style.backgroundImage="linear-gradient("+a.fill+" 0px,"+a.gradient+" 100%)":c.style.backgroundColor=a.fill,c.style.border="1px solid "+a.stroke):(c.style.backgroundColor="#ffffff",c.style.border=
+"1px solid #000000");f.appendChild(c)}f.innerHTML="";for(var b=0;b<a.length;b++)0<b&&0==mxUtils.mod(b,4)&&mxUtils.br(f),c(a[b])}function b(a){mxEvent.addListener(a,"mouseenter",function(){a.style.opacity="1"});mxEvent.addListener(a,"mouseleave",function(){a.style.opacity="0.5"})}var d=this.editorUi.editor.graph,f=document.createElement("div");f.style.whiteSpace="normal";f.style.paddingLeft="24px";f.style.paddingRight="20px";a.style.paddingLeft="16px";a.style.paddingBottom="6px";a.style.position="relative";
+a.appendChild(f);var g="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".split(" ");null==this.editorUi.currentScheme&&(this.editorUi.currentScheme=0);var e=document.createElement("div");e.style.cssText="position:absolute;left:10px;top:8px;bottom:8px;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(e,"click",mxUtils.bind(this,function(){this.editorUi.currentScheme=mxUtils.mod(this.editorUi.currentScheme-1,this.defaultColorSchemes.length);c(this.defaultColorSchemes[this.editorUi.currentScheme])}));var k=document.createElement("div");k.style.cssText="position:absolute;left:202px;top:8px;bottom:8px;width:20px;margin:4px;opacity:0.5;background-repeat:no-repeat;background-position:center center;background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAwAAAAQBAMAAADQT4M0AAAAIVBMVEUAAAB2dnZ2dnZ2dnZ2dnZ2dnZ2dnZ2dnZ2dnZ2dnZ2dnYBuwCcAAAACnRSTlMAfCTkhhvb7cQSPH2JPgAAADZJREFUCNdjQAOMAmBKaiGY8loF5rKswsZlrVo8AUiFrTICcbIWK8A5DF1gDoMymMPApIAwHwCS0Qx/U7qCBQAAAABJRU5ErkJggg==);";
+1<this.defaultColorSchemes.length&&(a.appendChild(e),a.appendChild(k));mxEvent.addListener(k,"click",mxUtils.bind(this,function(){this.editorUi.currentScheme=mxUtils.mod(this.editorUi.currentScheme+1,this.defaultColorSchemes.length);c(this.defaultColorSchemes[this.editorUi.currentScheme])}));b(e);b(k);c(this.defaultColorSchemes[this.editorUi.currentScheme]);return a};StyleFormatPanel.prototype.addEditOps=function(a){var c=this.format.getSelectionState(),b=null;1==this.editorUi.editor.graph.getSelectionCount()&&
+(b=mxUtils.button(mxResources.get("editStyle"),mxUtils.bind(this,function(a){this.editorUi.actions.get("editStyle").funct()})),b.setAttribute("title",mxResources.get("editStyle")+" ("+this.editorUi.actions.get("editStyle").shortcut+")"),b.style.width="202px",b.style.marginBottom="2px",a.appendChild(b));var d=this.editorUi.editor.graph,f=d.view.getState(d.getSelectionCell());1==d.getSelectionCount()&&null!=f&&null!=f.shape&&null!=f.shape.stencil?(c=mxUtils.button(mxResources.get("editShape"),mxUtils.bind(this,
 function(a){this.editorUi.actions.get("editShape").funct()})),c.setAttribute("title",mxResources.get("editShape")),c.style.marginBottom="2px",null==b?c.style.width="202px":(b.style.width="100px",c.style.width="100px",c.style.marginLeft="2px"),a.appendChild(c)):c.image&&(c=mxUtils.button(mxResources.get("editImage"),mxUtils.bind(this,function(a){this.editorUi.actions.get("image").funct()})),c.setAttribute("title",mxResources.get("editImage")),c.style.marginBottom="2px",null==b?c.style.width="202px":
-(b.style.width="100px",c.style.width="100px",c.style.marginLeft="2px"),a.appendChild(c));return a}}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.edgeMode="move"!=urlParams.edge;var n=Graph.prototype.init;Graph.prototype.init=function(){function a(a){c=a;if(mxClient.IS_QUIRKS||
-7==document.documentMode||8==document.documentMode)c=mxUtils.clone(a)}n.apply(this,arguments);var c=null;mxEvent.addListener(this.container,"mouseenter",a);mxEvent.addListener(this.container,"mousemove",a);mxEvent.addListener(this.container,"mouseleave",function(a){c=null});this.isMouseInsertPoint=function(){return null!=c};var b=this.getInsertPoint;this.getInsertPoint=function(){return null!=c?this.getPointForEvent(c):b.apply(this,arguments)};var f=this.layoutManager.getLayout;this.layoutManager.getLayout=
+(b.style.width="100px",c.style.width="100px",c.style.marginLeft="2px"),a.appendChild(c));return a}}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.edgeMode="move"!=urlParams.edge;var m=Graph.prototype.init;Graph.prototype.init=function(){function a(a){c=a;if(mxClient.IS_QUIRKS||
+7==document.documentMode||8==document.documentMode)c=mxUtils.clone(a)}m.apply(this,arguments);var c=null;mxEvent.addListener(this.container,"mouseenter",a);mxEvent.addListener(this.container,"mousemove",a);mxEvent.addListener(this.container,"mouseleave",function(a){c=null});this.isMouseInsertPoint=function(){return null!=c};var b=this.getInsertPoint;this.getInsertPoint=function(){return null!=c?this.getPointForEvent(c):b.apply(this,arguments)};var d=this.layoutManager.getLayout;this.layoutManager.getLayout=
 function(a){var c=this.graph.view.getState(a),c=null!=c?c.style:this.graph.getCellStyle(a);if("undefined"!=typeof mxRackContainer&&"rack"==c.childLayout){var b=new mxStackLayout(this.graph,!1);b.setChildGeometry=function(a,c){c.height=Math.max(c.height,20);if(1<c.height/20){var b=c.height%20;c.height+=10<b?20-b:-b}this.graph.getModel().setGeometry(a,c)};b.fill=!0;b.unitSize=mxRackContainer.unitSize|20;b.marginLeft=c.marginLeft||0;b.marginRight=c.marginRight||0;b.marginTop=c.marginTop||0;b.marginBottom=
-c.marginBottom||0;b.resizeParent=!1;return b}return f.apply(this,arguments)}};var u=Graph.prototype.loadStylesheet;Graph.prototype.loadStylesheet=function(){u.apply(this,arguments);this.currentStyle="default-style2"};Graph.prototype.isPageLink=function(a){return null!=a&&"data:page/"==a.substring(0,10)};Graph.prototype.addSvgShadow=function(a,c,b){b=null!=b?b:!1;var f=a.ownerDocument,d=null!=f.createElementNS?f.createElementNS(mxConstants.NS_SVG,"filter"):f.createElement("filter");d.setAttribute("id",
-this.shadowId);var e=null!=f.createElementNS?f.createElementNS(mxConstants.NS_SVG,"feGaussianBlur"):f.createElement("feGaussianBlur");e.setAttribute("in","SourceAlpha");e.setAttribute("stdDeviation","1.7");e.setAttribute("result","blur");d.appendChild(e);e=null!=f.createElementNS?f.createElementNS(mxConstants.NS_SVG,"feOffset"):f.createElement("feOffset");e.setAttribute("in","blur");e.setAttribute("dx","3");e.setAttribute("dy","3");e.setAttribute("result","offsetBlur");d.appendChild(e);e=null!=f.createElementNS?
-f.createElementNS(mxConstants.NS_SVG,"feFlood"):f.createElement("feFlood");e.setAttribute("flood-color","#3D4574");e.setAttribute("flood-opacity","0.4");e.setAttribute("result","offsetColor");d.appendChild(e);e=null!=f.createElementNS?f.createElementNS(mxConstants.NS_SVG,"feComposite"):f.createElement("feComposite");e.setAttribute("in","offsetColor");e.setAttribute("in2","offsetBlur");e.setAttribute("operator","in");e.setAttribute("result","offsetBlur");d.appendChild(e);e=null!=f.createElementNS?
-f.createElementNS(mxConstants.NS_SVG,"feBlend"):f.createElement("feBlend");e.setAttribute("in","SourceGraphic");e.setAttribute("in2","offsetBlur");d.appendChild(e);e=a.getElementsByTagName("defs");0==e.length?(f=null!=f.createElementNS?f.createElementNS(mxConstants.NS_SVG,"defs"):f.createElement("defs"),null!=a.firstChild?a.insertBefore(f,a.firstChild):a.appendChild(f)):f=e[0];f.appendChild(d);b||((c||a.getElementsByTagName("g")[0]).setAttribute("filter","url(#"+this.shadowId+")"),isNaN(parseInt(a.getAttribute("width")))||
-(a.setAttribute("width",parseInt(a.getAttribute("width"))+6),a.setAttribute("height",parseInt(a.getAttribute("height"))+6)));return d};Graph.prototype.setShadowVisible=function(a,c){mxClient.IS_SVG&&(c=null!=c?c:!0,(this.shadowVisible=a)?this.view.getDrawPane().setAttribute("filter","url(#"+this.shadowId+")"):this.view.getDrawPane().removeAttribute("filter"),c&&this.fireEvent(new mxEventObject("shadowVisibleChanged")))};Graph.prototype.selectUnlockedLayer=function(){if(null==this.defaultParent){var a=
+c.marginBottom||0;b.resizeParent=!1;return b}return d.apply(this,arguments)}};var u=Graph.prototype.loadStylesheet;Graph.prototype.loadStylesheet=function(){u.apply(this,arguments);this.currentStyle="default-style2"};Graph.prototype.isPageLink=function(a){return null!=a&&"data:page/"==a.substring(0,10)};Graph.prototype.addSvgShadow=function(a,c,b){b=null!=b?b:!1;var d=a.ownerDocument,f=null!=d.createElementNS?d.createElementNS(mxConstants.NS_SVG,"filter"):d.createElement("filter");f.setAttribute("id",
+this.shadowId);var g=null!=d.createElementNS?d.createElementNS(mxConstants.NS_SVG,"feGaussianBlur"):d.createElement("feGaussianBlur");g.setAttribute("in","SourceAlpha");g.setAttribute("stdDeviation","1.7");g.setAttribute("result","blur");f.appendChild(g);g=null!=d.createElementNS?d.createElementNS(mxConstants.NS_SVG,"feOffset"):d.createElement("feOffset");g.setAttribute("in","blur");g.setAttribute("dx","3");g.setAttribute("dy","3");g.setAttribute("result","offsetBlur");f.appendChild(g);g=null!=d.createElementNS?
+d.createElementNS(mxConstants.NS_SVG,"feFlood"):d.createElement("feFlood");g.setAttribute("flood-color","#3D4574");g.setAttribute("flood-opacity","0.4");g.setAttribute("result","offsetColor");f.appendChild(g);g=null!=d.createElementNS?d.createElementNS(mxConstants.NS_SVG,"feComposite"):d.createElement("feComposite");g.setAttribute("in","offsetColor");g.setAttribute("in2","offsetBlur");g.setAttribute("operator","in");g.setAttribute("result","offsetBlur");f.appendChild(g);g=null!=d.createElementNS?
+d.createElementNS(mxConstants.NS_SVG,"feBlend"):d.createElement("feBlend");g.setAttribute("in","SourceGraphic");g.setAttribute("in2","offsetBlur");f.appendChild(g);g=a.getElementsByTagName("defs");0==g.length?(d=null!=d.createElementNS?d.createElementNS(mxConstants.NS_SVG,"defs"):d.createElement("defs"),null!=a.firstChild?a.insertBefore(d,a.firstChild):a.appendChild(d)):d=g[0];d.appendChild(f);b||((c||a.getElementsByTagName("g")[0]).setAttribute("filter","url(#"+this.shadowId+")"),isNaN(parseInt(a.getAttribute("width")))||
+(a.setAttribute("width",parseInt(a.getAttribute("width"))+6),a.setAttribute("height",parseInt(a.getAttribute("height"))+6)));return f};Graph.prototype.setShadowVisible=function(a,c){mxClient.IS_SVG&&(c=null!=c?c:!0,(this.shadowVisible=a)?this.view.getDrawPane().setAttribute("filter","url(#"+this.shadowId+")"):this.view.getDrawPane().removeAttribute("filter"),c&&this.fireEvent(new mxEventObject("shadowVisibleChanged")))};Graph.prototype.selectUnlockedLayer=function(){if(null==this.defaultParent){var a=
 this.model.getChildCount(this.model.root),c,b=0;do c=this.model.getChildAt(this.model.root,b);while(b++<a&&"1"==mxUtils.getValue(this.getCellStyle(c),"locked","0"));null!=c&&this.setDefaultParent(c)}};mxStencilRegistry.libraries.mockup=[SHAPES_PATH+"/mockup/mxMockupButtons.js"];mxStencilRegistry.libraries.arrows2=[SHAPES_PATH+"/mxArrows.js"];mxStencilRegistry.libraries.atlassian=[STENCIL_PATH+"/atlassian.xml"];mxStencilRegistry.libraries.bpmn=[SHAPES_PATH+"/bpmn/mxBpmnShape2.js",STENCIL_PATH+"/bpmn.xml"];
 mxStencilRegistry.libraries.er=[SHAPES_PATH+"/er/mxER.js"];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/transmission"]=[SHAPES_PATH+"/mxElectrical.js",STENCIL_PATH+"/electrical/transmission.xml"];mxStencilRegistry.libraries["mockup/buttons"]=[SHAPES_PATH+"/mockup/mxMockupButtons.js"];mxStencilRegistry.libraries["mockup/containers"]=
@@ -2621,285 +2622,285 @@ mxStencilRegistry.libraries.er=[SHAPES_PATH+"/er/mxER.js"];mxStencilRegistry.lib
 [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",STENCIL_PATH+"/bootstrap.xml"];mxStencilRegistry.libraries.gmdl=[SHAPES_PATH+"/mxGmdl.js",STENCIL_PATH+"/gmdl.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.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(a){var c=null;null!=a&&0<a.length&&("ER"==a.substring(0,2)?c="mxgraph.er":"sysML"==a.substring(0,5)&&(c="mxgraph.sysml"));return c};
-var r=mxMarker.createMarker;mxMarker.createMarker=function(a,c,b,f,d,e,h,m,n,g){if(null!=b&&null==mxMarker.markers[b]){var k=this.getPackageForType(b);null!=k&&mxStencilRegistry.getStencil(k)}return r.apply(this,arguments)};PrintDialog.prototype.create=function(a,c){function b(){u.value=Math.max(1,Math.min(k,Math.max(parseInt(u.value),parseInt(t.value))));t.value=Math.max(1,Math.min(k,Math.min(parseInt(u.value),parseInt(t.value))))}function f(c){function b(c,b,d){var e=c.getGraphBounds(),h=0,k=0,
-m=Y.get(),n=1/c.pageScale,r=K.checked;if(r)var n=parseInt(P.value),g=parseInt(S.value),n=Math.min(m.height*g/(e.height/c.view.scale),m.width*n/(e.width/c.view.scale));else n=parseInt(q.value)/(100*c.pageScale),isNaN(n)&&(f=1/c.pageScale,q.value="100 %");m=mxRectangle.fromRectangle(m);m.width=Math.ceil(m.width*f);m.height=Math.ceil(m.height*f);n*=f;!r&&c.pageVisible?(e=c.getPageLayout(),h-=e.x*m.width,k-=e.y*m.height):r=!0;if(null==b){b=PrintDialog.createPrintPreview(c,n,m,0,h,k,r);b.pageSelector=
-!1;b.mathEnabled=!1;c=a.getCurrentFile();null!=c&&(b.title=c.getTitle());var t=b.writeHead;b.writeHead=function(c){t.apply(this,arguments);null!=a.editor.fontCss&&(c.writeln('<style type="text/css">'),c.writeln(a.editor.fontCss),c.writeln("</style>"))};if("undefined"!==typeof MathJax){var u=b.renderPage;b.renderPage=function(a,c,b,f,d,e){var h=u.apply(this,arguments);this.graph.mathEnabled?this.mathEnabled=!0:h.className="geDisableMathJax";return h}}b.open(null,null,d,!0)}else{m=c.background;if(null==
-m||""==m||m==mxConstants.NONE)m="#ffffff";b.backgroundColor=m;b.autoOrigin=r;b.appendGraph(c,n,h,k,d,!0)}return b}var f=parseInt(X.value)/100;isNaN(f)&&(f=1,X.value="100 %");var f=.75*f,e=t.value,h=u.value,k=!r.checked,n=null;k&&(k=e==m&&h==m);if(!k&&null!=a.pages&&a.pages.length){var g=0,k=a.pages.length-1;r.checked||(g=parseInt(e)-1,k=parseInt(h)-1);for(var l=g;l<=k;l++){var v=a.pages[l],e=v==a.currentPage?d:null;if(null==e){var e=a.createTemporaryGraph(d.getStylesheet()),h=!0,g=!1,p=null,z=null;
-null==v.viewState&&null==v.mapping&&null==v.root&&a.updatePageRoot(v);null!=v.viewState?(h=v.viewState.pageVisible,g=v.viewState.mathEnabled,p=v.viewState.background,z=v.viewState.backgroundImage):null!=v.mapping&&null!=v.mapping.diagramMap&&(g="0"!=v.mapping.diagramMap.get("mathEnabled"),p=v.mapping.diagramMap.get("background"),z=v.mapping.diagramMap.get("backgroundImage"),z=null!=z&&0<z.length?JSON.parse(z):null);e.background=p;e.backgroundImage=null!=z?new mxImage(z.src,z.width,z.height):null;
-e.pageVisible=h;e.mathEnabled=g;var J=e.getGlobalVariable;e.getGlobalVariable=function(a){return"page"==a?v.getName():"pagenumber"==a?l+1:J.apply(this,arguments)};document.body.appendChild(e.container);a.updatePageRoot(v);e.model.setRoot(v.root)}n=b(e,n,l!=k);e!=d&&e.container.parentNode.removeChild(e.container)}}else n=b(d);n.mathEnabled&&(k=n.wnd.document,k.writeln('<script type="text/x-mathjax-config">'),k.writeln("MathJax.Hub.Config({"),k.writeln('messageStyle: "none",'),k.writeln('jax: ["input/TeX", "input/MathML", "input/AsciiMath", "output/HTML-CSS"],'),
+var r=mxMarker.createMarker;mxMarker.createMarker=function(a,c,b,d,f,g,e,p,m,h){if(null!=b&&null==mxMarker.markers[b]){var k=this.getPackageForType(b);null!=k&&mxStencilRegistry.getStencil(k)}return r.apply(this,arguments)};PrintDialog.prototype.create=function(a,c){function b(){v.value=Math.max(1,Math.min(k,Math.max(parseInt(v.value),parseInt(u.value))));u.value=Math.max(1,Math.min(k,Math.min(parseInt(v.value),parseInt(u.value))))}function d(c){function b(c,b,f){var g=c.getGraphBounds(),e=0,k=0,
+p=W.get(),m=1/c.pageScale,r=I.checked;if(r)var m=parseInt(K.value),h=parseInt(U.value),m=Math.min(p.height*h/(g.height/c.view.scale),p.width*m/(g.width/c.view.scale));else m=parseInt(q.value)/(100*c.pageScale),isNaN(m)&&(d=1/c.pageScale,q.value="100 %");p=mxRectangle.fromRectangle(p);p.width=Math.ceil(p.width*d);p.height=Math.ceil(p.height*d);m*=d;!r&&c.pageVisible?(g=c.getPageLayout(),e-=g.x*p.width,k-=g.y*p.height):r=!0;if(null==b){b=PrintDialog.createPrintPreview(c,m,p,0,e,k,r);b.pageSelector=
+!1;b.mathEnabled=!1;c=a.getCurrentFile();null!=c&&(b.title=c.getTitle());var t=b.writeHead;b.writeHead=function(c){t.apply(this,arguments);null!=a.editor.fontCss&&(c.writeln('<style type="text/css">'),c.writeln(a.editor.fontCss),c.writeln("</style>"))};if("undefined"!==typeof MathJax){var u=b.renderPage;b.renderPage=function(a,c,b,d,f,g){var e=u.apply(this,arguments);this.graph.mathEnabled?this.mathEnabled=!0:e.className="geDisableMathJax";return e}}b.open(null,null,f,!0)}else{p=c.background;if(null==
+p||""==p||p==mxConstants.NONE)p="#ffffff";b.backgroundColor=p;b.autoOrigin=r;b.appendGraph(c,m,e,k,f,!0)}return b}var d=parseInt(X.value)/100;isNaN(d)&&(d=1,X.value="100 %");var d=.75*d,g=u.value,e=v.value,k=!h.checked,m=null;k&&(k=g==p&&e==p);if(!k&&null!=a.pages&&a.pages.length){var r=0,k=a.pages.length-1;h.checked||(r=parseInt(g)-1,k=parseInt(e)-1);for(var t=r;t<=k;t++){var l=a.pages[t],g=l==a.currentPage?f:null;if(null==g){var g=a.createTemporaryGraph(f.getStylesheet()),e=!0,r=!1,n=null,y=null;
+null==l.viewState&&null==l.mapping&&null==l.root&&a.updatePageRoot(l);null!=l.viewState?(e=l.viewState.pageVisible,r=l.viewState.mathEnabled,n=l.viewState.background,y=l.viewState.backgroundImage):null!=l.mapping&&null!=l.mapping.diagramMap&&(r="0"!=l.mapping.diagramMap.get("mathEnabled"),n=l.mapping.diagramMap.get("background"),y=l.mapping.diagramMap.get("backgroundImage"),y=null!=y&&0<y.length?JSON.parse(y):null);g.background=n;g.backgroundImage=null!=y?new mxImage(y.src,y.width,y.height):null;
+g.pageVisible=e;g.mathEnabled=r;var x=g.getGlobalVariable;g.getGlobalVariable=function(a){return"page"==a?l.getName():"pagenumber"==a?t+1:x.apply(this,arguments)};document.body.appendChild(g.container);a.updatePageRoot(l);g.model.setRoot(l.root)}m=b(g,m,t!=k);g!=f&&g.container.parentNode.removeChild(g.container)}}else m=b(f);m.mathEnabled&&(k=m.wnd.document,k.writeln('<script type="text/x-mathjax-config">'),k.writeln("MathJax.Hub.Config({"),k.writeln('messageStyle: "none",'),k.writeln('jax: ["input/TeX", "input/MathML", "input/AsciiMath", "output/HTML-CSS"],'),
 k.writeln('extensions: ["tex2jax.js", "mml2jax.js", "asciimath2jax.js"],'),k.writeln("TeX: {"),k.writeln('extensions: ["AMSmath.js", "AMSsymbols.js", "noErrors.js", "noUndefined.js"]'),k.writeln("},"),k.writeln("tex2jax: {"),k.writeln('\tignoreClass: "geDisableMathJax"'),k.writeln("},"),k.writeln("asciimath2jax: {"),k.writeln('\tignoreClass: "geDisableMathJax"'),k.writeln("}"),k.writeln("});"),c&&(k.writeln("MathJax.Hub.Queue(function () {"),k.writeln("window.print();"),k.writeln("});")),k.writeln("\x3c/script>"),
-k.writeln('<script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.0/MathJax.js">\x3c/script>'));n.closeDocument();!n.mathEnabled&&c&&PrintDialog.printPreview(n)}var d=a.editor.graph,e=document.createElement("div"),h=document.createElement("h3");h.style.width="100%";h.style.textAlign="center";h.style.marginTop="0px";mxUtils.write(h,c||mxResources.get("print"));e.appendChild(h);var k=1,m=1,n=document.createElement("div");n.style.cssText="border-bottom:1px solid lightGray;padding-bottom:12px;margin-bottom:12px;";
-var r=document.createElement("input");r.style.cssText="margin-right:8px;margin-bottom:8px;";r.setAttribute("value","all");r.setAttribute("type","radio");r.setAttribute("name","pages-printdialog");n.appendChild(r);h=document.createElement("span");mxUtils.write(h,mxResources.get("printAllPages"));n.appendChild(h);mxUtils.br(n);var g=r.cloneNode(!0);r.setAttribute("checked","checked");g.setAttribute("value","range");n.appendChild(g);h=document.createElement("span");mxUtils.write(h,mxResources.get("pages")+
-":");n.appendChild(h);var t=document.createElement("input");t.style.cssText="margin:0 8px 0 8px;";t.setAttribute("value","1");t.setAttribute("type","number");t.setAttribute("min","1");t.style.width="50px";n.appendChild(t);h=document.createElement("span");mxUtils.write(h,mxResources.get("to"));n.appendChild(h);var u=t.cloneNode(!0);n.appendChild(u);mxEvent.addListener(t,"focus",function(){g.checked=!0});mxEvent.addListener(u,"focus",function(){g.checked=!0});mxEvent.addListener(t,"change",b);mxEvent.addListener(u,
-"change",b);if(null!=a.pages&&(k=a.pages.length,null!=a.currentPage))for(h=0;h<a.pages.length;h++)if(a.currentPage==a.pages[h]){m=h+1;t.value=m;u.value=m;break}t.setAttribute("max",k);u.setAttribute("max",k);1<k&&e.appendChild(n);var l=document.createElement("div");l.style.marginBottom="10px";var p=document.createElement("input");p.style.marginRight="8px";p.setAttribute("value","adjust");p.setAttribute("type","radio");p.setAttribute("name","printZoom");l.appendChild(p);h=document.createElement("span");
-mxUtils.write(h,mxResources.get("adjustTo"));l.appendChild(h);var q=document.createElement("input");q.style.cssText="margin:0 8px 0 8px;";q.setAttribute("value","100 %");q.style.width="50px";l.appendChild(q);mxEvent.addListener(q,"focus",function(){p.checked=!0});e.appendChild(l);var n=n.cloneNode(!1),K=p.cloneNode(!0);K.setAttribute("value","fit");p.setAttribute("checked","checked");h=document.createElement("div");h.style.cssText="display:inline-block;height:100%;vertical-align:top;padding-top:2px;";
-h.appendChild(K);n.appendChild(h);l=document.createElement("table");l.style.display="inline-block";var U=document.createElement("tbody"),G=document.createElement("tr"),L=G.cloneNode(!0),Q=document.createElement("td"),E=Q.cloneNode(!0),V=Q.cloneNode(!0),O=Q.cloneNode(!0),W=Q.cloneNode(!0),R=Q.cloneNode(!0);Q.style.textAlign="right";O.style.textAlign="right";mxUtils.write(Q,mxResources.get("fitTo"));var P=document.createElement("input");P.style.cssText="margin:0 8px 0 8px;";P.setAttribute("value","1");
-P.setAttribute("min","1");P.setAttribute("type","number");P.style.width="40px";E.appendChild(P);h=document.createElement("span");mxUtils.write(h,mxResources.get("fitToSheetsAcross"));V.appendChild(h);mxUtils.write(O,mxResources.get("fitToBy"));var S=P.cloneNode(!0);W.appendChild(S);mxEvent.addListener(P,"focus",function(){K.checked=!0});mxEvent.addListener(S,"focus",function(){K.checked=!0});h=document.createElement("span");mxUtils.write(h,mxResources.get("fitToSheetsDown"));R.appendChild(h);G.appendChild(Q);
-G.appendChild(E);G.appendChild(V);L.appendChild(O);L.appendChild(W);L.appendChild(R);U.appendChild(G);U.appendChild(L);l.appendChild(U);n.appendChild(l);e.appendChild(n);n=document.createElement("div");h=document.createElement("div");h.style.fontWeight="bold";h.style.marginBottom="12px";mxUtils.write(h,mxResources.get("paperSize"));n.appendChild(h);h=document.createElement("div");h.style.marginBottom="12px";var Y=PageSetupDialog.addPageFormatPanel(h,"printdialog",a.editor.graph.pageFormat||mxConstants.PAGE_FORMAT_A4_PORTRAIT);
-n.appendChild(h);h=document.createElement("span");mxUtils.write(h,mxResources.get("pageScale"));n.appendChild(h);var X=document.createElement("input");X.style.cssText="margin:0 8px 0 8px;";X.setAttribute("value","100 %");X.style.width="60px";n.appendChild(X);e.appendChild(n);h=document.createElement("div");h.style.cssText="text-align:right;margin:62px 0 0 0;";n=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog()});n.className="geBtn";a.editor.cancelFirst&&h.appendChild(n);a.isOffline()||
-(l=mxUtils.button(mxResources.get("help"),function(){window.open("https://desk.draw.io/support/solutions/articles/16000048947")}),l.className="geBtn",h.appendChild(l));PrintDialog.previewEnabled&&(l=mxUtils.button(mxResources.get("preview"),function(){a.hideDialog();f(!1)}),l.className="geBtn",h.appendChild(l));l=mxUtils.button(mxResources.get(PrintDialog.previewEnabled?"print":"ok"),function(){a.hideDialog();f(!0)});l.className="geBtn gePrimaryBtn";h.appendChild(l);a.editor.cancelFirst||h.appendChild(n);
-e.appendChild(h);this.container=e}})();(function(){EditorUi.VERSION="@DRAWIO-VERSION@";EditorUi.compactUi="atlas"!=uiTheme;EditorUi.enableLogging=/.*\.draw\.io$/.test(window.location.hostname);EditorUi.enablePlantUml=EditorUi.enableLogging;EditorUi.isElectronApp=null!=window&&null!=window.process&&null!=window.process.versions&&null!=window.process.versions.electron;EditorUi.prototype.emptyDiagramXml='<mxGraphModel><root><mxCell id="0"/><mxCell id="1" parent="0"/></root></mxGraphModel>';EditorUi.prototype.emptyLibraryXml="<mxlibrary>[]</mxlibrary>";
+k.writeln('<script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.0/MathJax.js">\x3c/script>'));m.closeDocument();!m.mathEnabled&&c&&PrintDialog.printPreview(m)}var f=a.editor.graph,g=document.createElement("div"),e=document.createElement("h3");e.style.width="100%";e.style.textAlign="center";e.style.marginTop="0px";mxUtils.write(e,c||mxResources.get("print"));g.appendChild(e);var k=1,p=1,m=document.createElement("div");m.style.cssText="border-bottom:1px solid lightGray;padding-bottom:12px;margin-bottom:12px;";
+var h=document.createElement("input");h.style.cssText="margin-right:8px;margin-bottom:8px;";h.setAttribute("value","all");h.setAttribute("type","radio");h.setAttribute("name","pages-printdialog");m.appendChild(h);e=document.createElement("span");mxUtils.write(e,mxResources.get("printAllPages"));m.appendChild(e);mxUtils.br(m);var r=h.cloneNode(!0);h.setAttribute("checked","checked");r.setAttribute("value","range");m.appendChild(r);e=document.createElement("span");mxUtils.write(e,mxResources.get("pages")+
+":");m.appendChild(e);var u=document.createElement("input");u.style.cssText="margin:0 8px 0 8px;";u.setAttribute("value","1");u.setAttribute("type","number");u.setAttribute("min","1");u.style.width="50px";m.appendChild(u);e=document.createElement("span");mxUtils.write(e,mxResources.get("to"));m.appendChild(e);var v=u.cloneNode(!0);m.appendChild(v);mxEvent.addListener(u,"focus",function(){r.checked=!0});mxEvent.addListener(v,"focus",function(){r.checked=!0});mxEvent.addListener(u,"change",b);mxEvent.addListener(v,
+"change",b);if(null!=a.pages&&(k=a.pages.length,null!=a.currentPage))for(e=0;e<a.pages.length;e++)if(a.currentPage==a.pages[e]){p=e+1;u.value=p;v.value=p;break}u.setAttribute("max",k);v.setAttribute("max",k);1<k&&g.appendChild(m);var l=document.createElement("div");l.style.marginBottom="10px";var n=document.createElement("input");n.style.marginRight="8px";n.setAttribute("value","adjust");n.setAttribute("type","radio");n.setAttribute("name","printZoom");l.appendChild(n);e=document.createElement("span");
+mxUtils.write(e,mxResources.get("adjustTo"));l.appendChild(e);var q=document.createElement("input");q.style.cssText="margin:0 8px 0 8px;";q.setAttribute("value","100 %");q.style.width="50px";l.appendChild(q);mxEvent.addListener(q,"focus",function(){n.checked=!0});g.appendChild(l);var m=m.cloneNode(!1),I=n.cloneNode(!0);I.setAttribute("value","fit");n.setAttribute("checked","checked");e=document.createElement("div");e.style.cssText="display:inline-block;height:100%;vertical-align:top;padding-top:2px;";
+e.appendChild(I);m.appendChild(e);l=document.createElement("table");l.style.display="inline-block";var S=document.createElement("tbody"),H=document.createElement("tr"),L=H.cloneNode(!0),Q=document.createElement("td"),G=Q.cloneNode(!0),V=Q.cloneNode(!0),M=Q.cloneNode(!0),Y=Q.cloneNode(!0),T=Q.cloneNode(!0);Q.style.textAlign="right";M.style.textAlign="right";mxUtils.write(Q,mxResources.get("fitTo"));var K=document.createElement("input");K.style.cssText="margin:0 8px 0 8px;";K.setAttribute("value","1");
+K.setAttribute("min","1");K.setAttribute("type","number");K.style.width="40px";G.appendChild(K);e=document.createElement("span");mxUtils.write(e,mxResources.get("fitToSheetsAcross"));V.appendChild(e);mxUtils.write(M,mxResources.get("fitToBy"));var U=K.cloneNode(!0);Y.appendChild(U);mxEvent.addListener(K,"focus",function(){I.checked=!0});mxEvent.addListener(U,"focus",function(){I.checked=!0});e=document.createElement("span");mxUtils.write(e,mxResources.get("fitToSheetsDown"));T.appendChild(e);H.appendChild(Q);
+H.appendChild(G);H.appendChild(V);L.appendChild(M);L.appendChild(Y);L.appendChild(T);S.appendChild(H);S.appendChild(L);l.appendChild(S);m.appendChild(l);g.appendChild(m);m=document.createElement("div");e=document.createElement("div");e.style.fontWeight="bold";e.style.marginBottom="12px";mxUtils.write(e,mxResources.get("paperSize"));m.appendChild(e);e=document.createElement("div");e.style.marginBottom="12px";var W=PageSetupDialog.addPageFormatPanel(e,"printdialog",a.editor.graph.pageFormat||mxConstants.PAGE_FORMAT_A4_PORTRAIT);
+m.appendChild(e);e=document.createElement("span");mxUtils.write(e,mxResources.get("pageScale"));m.appendChild(e);var X=document.createElement("input");X.style.cssText="margin:0 8px 0 8px;";X.setAttribute("value","100 %");X.style.width="60px";m.appendChild(X);g.appendChild(m);e=document.createElement("div");e.style.cssText="text-align:right;margin:62px 0 0 0;";m=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog()});m.className="geBtn";a.editor.cancelFirst&&e.appendChild(m);a.isOffline()||
+(l=mxUtils.button(mxResources.get("help"),function(){window.open("https://desk.draw.io/support/solutions/articles/16000048947")}),l.className="geBtn",e.appendChild(l));PrintDialog.previewEnabled&&(l=mxUtils.button(mxResources.get("preview"),function(){a.hideDialog();d(!1)}),l.className="geBtn",e.appendChild(l));l=mxUtils.button(mxResources.get(PrintDialog.previewEnabled?"print":"ok"),function(){a.hideDialog();d(!0)});l.className="geBtn gePrimaryBtn";e.appendChild(l);a.editor.cancelFirst||e.appendChild(m);
+g.appendChild(e);this.container=g}})();(function(){EditorUi.VERSION="@DRAWIO-VERSION@";EditorUi.compactUi="atlas"!=uiTheme;EditorUi.enableLogging=/.*\.draw\.io$/.test(window.location.hostname);EditorUi.enablePlantUml=EditorUi.enableLogging;EditorUi.isElectronApp=null!=window&&null!=window.process&&null!=window.process.versions&&null!=window.process.versions.electron;EditorUi.prototype.emptyDiagramXml='<mxGraphModel><root><mxCell id="0"/><mxCell id="1" parent="0"/></root></mxGraphModel>';EditorUi.prototype.emptyLibraryXml="<mxlibrary>[]</mxlibrary>";
 EditorUi.prototype.mode=null;EditorUi.prototype.sidebarFooterHeight=36;EditorUi.prototype.defaultCustomShapeStyle="shape=stencil(tZRtTsQgEEBPw1+DJR7AoN6DbWftpAgE0Ortd/jYRGq72R+YNE2YgTePloEJGWblgA18ZuKFDcMj5/Sm8boZq+BgjCX4pTyqk6ZlKROitwusOMXKQDODx5iy4pXxZ5qTHiFHawxB0JrQZH7lCabQ0Fr+XWC1/E8zcsT/gAi+Subo2/3Mh6d/oJb5nU1b5tW7r2knautaa3T+U32o7f7vZwpJkaNDLORJjcu7t59m2jXxqX9un+tt022acsfmoKaQZ+vhhswZtS6Ne/ThQGt0IV0N3Yyv6P3CeT9/tHO0XFI5cAE=);whiteSpace=wrap;html=1;";EditorUi.prototype.maxBackgroundSize=1600;
 EditorUi.prototype.maxImageSize=520;EditorUi.prototype.resampleThreshold=1E5;EditorUi.prototype.maxImageBytes=1E6;EditorUi.prototype.maxBackgroundBytes=25E5;EditorUi.prototype.currentFile=null;EditorUi.prototype.printPdfExport=!1;EditorUi.prototype.pdfPageExport=!0;EditorUi.prototype.formatEnabled="0"!=urlParams.format;(function(){EditorUi.prototype.useCanvasForExport=!1;EditorUi.prototype.jpgSupported=!1;try{var a=document.createElement("canvas"),b=new Image;b.onload=function(){try{a.getContext("2d").drawImage(b,
-0,0);var c=a.toDataURL("image/png");EditorUi.prototype.useCanvasForExport=null!=c&&6<c.length}catch(n){}};b.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(m){}try{a=document.createElement("canvas");a.width=a.height=1;var d=
-a.toDataURL("image/jpeg");EditorUi.prototype.jpgSupported=null!==d.match("image/jpeg")}catch(m){}})();EditorUi.prototype.getLocalData=function(a,b){b(localStorage.getItem(a))};EditorUi.prototype.setLocalData=function(a,b,d){localStorage.setItem(a,b);d()};EditorUi.prototype.removeLocalData=function(a,b){localStorage.removeItem(a);b()};EditorUi.prototype.setMathEnabled=function(a){this.editor.graph.mathEnabled=a;this.editor.updateGraphComponents();this.editor.graph.refresh();this.fireEvent(new mxEventObject("mathEnabledChanged"))};
-EditorUi.prototype.isMathEnabled=function(a){return this.editor.graph.mathEnabled};EditorUi.prototype.movePickersToTop=function(){for(var a=document.getElementsByTagName("div"),b=0;b<a.length;b++)"picker modal-dialog picker-dialog"==a[b].className&&(a[b].style.zIndex=mxPopupMenu.prototype.zIndex+1)};EditorUi.prototype.isOfflineApp=function(){return"1"==urlParams.offline};EditorUi.prototype.isOffline=function(){return this.isOfflineApp()||!navigator.onLine||"1"==urlParams.stealth};EditorUi.prototype.createSpinner=
-function(a,b,d){d=null!=d?d:24;var c=new Spinner({lines:12,length:d,width:Math.round(d/3),radius:Math.round(d/2),rotate:0,color:"#000",speed:1.5,trail:60,shadow:!1,hwaccel:!1,zIndex:2E9}),f=c.spin;c.spin=function(d,e){var h=!1;this.active||(f.call(this,d),this.active=!0,null!=e&&(h=document.createElement("div"),h.style.position="absolute",h.style.whiteSpace="nowrap",h.style.background="#4B4243",h.style.color="white",h.style.fontFamily="Helvetica, Arial",h.style.fontSize="9pt",h.style.padding="6px",
-h.style.paddingLeft="10px",h.style.paddingRight="10px",h.style.zIndex=2E9,h.style.left=Math.max(0,a)+"px",h.style.top=Math.max(0,b+70)+"px",mxUtils.setPrefixedStyle(h.style,"borderRadius","6px"),mxUtils.setPrefixedStyle(h.style,"boxShadow","2px 2px 3px 0px #ddd"),mxUtils.setPrefixedStyle(h.style,"transform","translate(-50%,-50%)"),h.innerHTML=e+"...",d.appendChild(h),c.status=h,mxClient.IS_VML&&(null==document.documentMode||8>=document.documentMode)&&(h.style.left=Math.round(Math.max(0,a-h.offsetWidth/
-2))+"px",h.style.top=Math.round(Math.max(0,b+70-h.offsetHeight/2))+"px")),this.pause=mxUtils.bind(this,function(){var a=function(){};this.active&&(a=mxUtils.bind(this,function(){this.spin(d,e)}));this.stop();return a}),h=!0);return h};var e=c.stop;c.stop=function(){e.call(this);this.active=!1;null!=c.status&&(c.status.parentNode.removeChild(c.status),c.status=null)};c.pause=function(){return function(){}};return c};EditorUi.parsePng=function(a,b,d){function c(a,c){var b=e;e+=c;return a.substring(b,
-e)}function f(a){a=c(a,4);return a.charCodeAt(3)+(a.charCodeAt(2)<<8)+(a.charCodeAt(1)<<16)+(a.charCodeAt(0)<<24)}var e=0;if(c(a,8)!=String.fromCharCode(137)+"PNG"+String.fromCharCode(13,10,26,10))null!=d&&d();else if(c(a,4),"IHDR"!=c(a,4))null!=d&&d();else{c(a,17);do{d=f(a);var h=c(a,4);if(null!=b&&b(e-8,h,d))break;value=c(a,d);c(a,4);if("IEND"==h)break}while(d)}};EditorUi.prototype.isCompatibleString=function(a){try{var c=mxUtils.parseXml(a),b=this.editor.extractGraphModel(c.documentElement,!0);
-return null!=b&&0==b.getElementsByTagName("parsererror").length}catch(m){}return!1};var a=EditorUi.prototype.extractGraphModelFromHtml;EditorUi.prototype.extractGraphModelFromHtml=function(c){var b=a.apply(this,arguments);if(null==b)try{var d=c.indexOf("&lt;mxfile ");if(0<=d){var e=c.lastIndexOf("&lt;/mxfile&gt;");e>d&&(b=c.substring(d,e+15).replace(/&gt;/g,">").replace(/&lt;/g,"<").replace(/\\&quot;/g,'"').replace(/\n/g,""))}else var n=mxUtils.parseXml(c),g=this.editor.extractGraphModel(n.documentElement,
-null!=this.pages),b=null!=g?mxUtils.getXml(g):""}catch(r){}return b};EditorUi.prototype.validateFileData=function(a){if(null!=a&&0<a.length){var c=a.indexOf('<meta charset="utf-8">');0<=c&&(a=a.slice(0,c)+'<meta charset="utf-8"/>'+a.slice(c+23-1,a.length))}return a};EditorUi.prototype.replaceFileData=function(a){a=this.validateFileData(a);a=null!=a&&0<a.length?mxUtils.parseXml(a).documentElement:null;var c=null!=a?this.editor.extractGraphModel(a,!0):null;null!=c&&(a=c);if(null!=a){c=this.editor.graph;
-c.model.beginUpdate();try{var b=null!=this.pages?this.pages.slice():null,d=a.getElementsByTagName("diagram");if("0"!=urlParams.pages||1<d.length||1==d.length&&d[0].hasAttribute("name")){this.fileNode=a;this.pages=null!=this.pages?this.pages:[];for(var e=d.length-1;0<=e;e--){var g=this.updatePageRoot(new DiagramPage(d[e]));null==g.getName()&&g.setName(mxResources.get("pageWithNumber",[e+1]));c.model.execute(new ChangePage(this,g,0==e?g:null,0))}}else"0"!=urlParams.pages&&null==this.fileNode&&(this.fileNode=
+0,0);var c=a.toDataURL("image/png");EditorUi.prototype.useCanvasForExport=null!=c&&6<c.length}catch(m){}};b.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(p){}try{a=document.createElement("canvas");a.width=a.height=1;var d=
+a.toDataURL("image/jpeg");EditorUi.prototype.jpgSupported=null!==d.match("image/jpeg")}catch(p){}})();EditorUi.prototype.showSplash=function(a){};EditorUi.prototype.getLocalData=function(a,b){b(localStorage.getItem(a))};EditorUi.prototype.setLocalData=function(a,b,d){localStorage.setItem(a,b);d()};EditorUi.prototype.removeLocalData=function(a,b){localStorage.removeItem(a);b()};EditorUi.prototype.setMathEnabled=function(a){this.editor.graph.mathEnabled=a;this.editor.updateGraphComponents();this.editor.graph.refresh();
+this.fireEvent(new mxEventObject("mathEnabledChanged"))};EditorUi.prototype.isMathEnabled=function(a){return this.editor.graph.mathEnabled};EditorUi.prototype.movePickersToTop=function(){for(var a=document.getElementsByTagName("div"),b=0;b<a.length;b++)"picker modal-dialog picker-dialog"==a[b].className&&(a[b].style.zIndex=mxPopupMenu.prototype.zIndex+1)};EditorUi.prototype.isOfflineApp=function(){return"1"==urlParams.offline};EditorUi.prototype.isOffline=function(){return this.isOfflineApp()||!navigator.onLine||
+"1"==urlParams.stealth};EditorUi.prototype.createSpinner=function(a,b,d){d=null!=d?d:24;var c=new Spinner({lines:12,length:d,width:Math.round(d/3),radius:Math.round(d/2),rotate:0,color:"#000",speed:1.5,trail:60,shadow:!1,hwaccel:!1,zIndex:2E9}),f=c.spin;c.spin=function(d,g){var e=!1;this.active||(f.call(this,d),this.active=!0,null!=g&&(e=document.createElement("div"),e.style.position="absolute",e.style.whiteSpace="nowrap",e.style.background="#4B4243",e.style.color="white",e.style.fontFamily="Helvetica, Arial",
+e.style.fontSize="9pt",e.style.padding="6px",e.style.paddingLeft="10px",e.style.paddingRight="10px",e.style.zIndex=2E9,e.style.left=Math.max(0,a)+"px",e.style.top=Math.max(0,b+70)+"px",mxUtils.setPrefixedStyle(e.style,"borderRadius","6px"),mxUtils.setPrefixedStyle(e.style,"boxShadow","2px 2px 3px 0px #ddd"),mxUtils.setPrefixedStyle(e.style,"transform","translate(-50%,-50%)"),e.innerHTML=g+"...",d.appendChild(e),c.status=e,mxClient.IS_VML&&(null==document.documentMode||8>=document.documentMode)&&(e.style.left=
+Math.round(Math.max(0,a-e.offsetWidth/2))+"px",e.style.top=Math.round(Math.max(0,b+70-e.offsetHeight/2))+"px")),this.pause=mxUtils.bind(this,function(){var a=function(){};this.active&&(a=mxUtils.bind(this,function(){this.spin(d,g)}));this.stop();return a}),e=!0);return e};var g=c.stop;c.stop=function(){g.call(this);this.active=!1;null!=c.status&&(c.status.parentNode.removeChild(c.status),c.status=null)};c.pause=function(){return function(){}};return c};EditorUi.parsePng=function(a,b,d){function c(a,
+c){var b=g;g+=c;return a.substring(b,g)}function f(a){a=c(a,4);return a.charCodeAt(3)+(a.charCodeAt(2)<<8)+(a.charCodeAt(1)<<16)+(a.charCodeAt(0)<<24)}var g=0;if(c(a,8)!=String.fromCharCode(137)+"PNG"+String.fromCharCode(13,10,26,10))null!=d&&d();else if(c(a,4),"IHDR"!=c(a,4))null!=d&&d();else{c(a,17);do{d=f(a);var e=c(a,4);if(null!=b&&b(g-8,e,d))break;value=c(a,d);c(a,4);if("IEND"==e)break}while(d)}};EditorUi.prototype.isCompatibleString=function(a){try{var c=mxUtils.parseXml(a),b=this.editor.extractGraphModel(c.documentElement,
+!0);return null!=b&&0==b.getElementsByTagName("parsererror").length}catch(p){}return!1};var a=EditorUi.prototype.extractGraphModelFromHtml;EditorUi.prototype.extractGraphModelFromHtml=function(c){var b=a.apply(this,arguments);if(null==b)try{var d=c.indexOf("&lt;mxfile ");if(0<=d){var e=c.lastIndexOf("&lt;/mxfile&gt;");e>d&&(b=c.substring(d,e+15).replace(/&gt;/g,">").replace(/&lt;/g,"<").replace(/\\&quot;/g,'"').replace(/\n/g,""))}else var m=mxUtils.parseXml(c),h=this.editor.extractGraphModel(m.documentElement,
+null!=this.pages),b=null!=h?mxUtils.getXml(h):""}catch(r){}return b};EditorUi.prototype.validateFileData=function(a){if(null!=a&&0<a.length){var c=a.indexOf('<meta charset="utf-8">');0<=c&&(a=a.slice(0,c)+'<meta charset="utf-8"/>'+a.slice(c+23-1,a.length))}return a};EditorUi.prototype.replaceFileData=function(a){a=this.validateFileData(a);a=null!=a&&0<a.length?mxUtils.parseXml(a).documentElement:null;var c=null!=a?this.editor.extractGraphModel(a,!0):null;null!=c&&(a=c);if(null!=a){c=this.editor.graph;
+c.model.beginUpdate();try{var b=null!=this.pages?this.pages.slice():null,d=a.getElementsByTagName("diagram");if("0"!=urlParams.pages||1<d.length||1==d.length&&d[0].hasAttribute("name")){this.fileNode=a;this.pages=null!=this.pages?this.pages:[];for(var e=d.length-1;0<=e;e--){var h=this.updatePageRoot(new DiagramPage(d[e]));null==h.getName()&&h.setName(mxResources.get("pageWithNumber",[e+1]));c.model.execute(new ChangePage(this,h,0==e?h:null,0))}}else"0"!=urlParams.pages&&null==this.fileNode&&(this.fileNode=
 a.ownerDocument.createElement("mxfile"),this.currentPage=new DiagramPage(a.ownerDocument.createElement("diagram")),this.currentPage.setName(mxResources.get("pageWithNumber",[1])),c.model.execute(new ChangePage(this,this.currentPage,this.currentPage,0))),this.editor.setGraphXml(a),null!=this.currentPage&&(this.currentPage.root=this.editor.graph.model.root);if(null!=b)for(e=0;e<b.length;e++)c.model.execute(new ChangePage(this,b[e],null))}finally{c.model.endUpdate()}}};EditorUi.prototype.createFileData=
-function(a,b,d,e,n,g,r,k,t,v){b=null!=b?b:this.editor.graph;n=null!=n?n:!1;t=null!=t?t:!0;var c,f=null;null==d||d.getMode()==App.MODE_DEVICE||d.getMode()==App.MODE_BROWSER?c="_blank":f=c=e;if(null==a)return"";var h=a;if("mxfile"!=h.nodeName.toLowerCase()){var m=b.zapGremlins(mxUtils.getXml(a)),h=b.compress(m);if(b.decompress(h)!=m)return m;m=a.ownerDocument.createElement("diagram");mxUtils.setTextContent(m,h);h=a.ownerDocument.createElement("mxfile");h.appendChild(m)}v?(h=h.cloneNode(!0),h.removeAttribute("userAgent"),
-h.removeAttribute("version"),h.removeAttribute("editor"),h.removeAttribute("type")):(h.setAttribute("userAgent",navigator.userAgent),h.setAttribute("version",EditorUi.VERSION),h.setAttribute("editor","www.draw.io"),a=null!=d?d.getMode():this.mode,null!=a&&h.setAttribute("type",a));a=mxUtils.getXml(h);if(!g&&!n&&(r||null!=d&&/(\.html)$/i.test(d.getTitle())))a=this.getHtml2(mxUtils.getXml(h),b,null!=d?d.getTitle():null,c,f);else if(g||!n&&null!=d&&/(\.svg)$/i.test(d.getTitle()))null==d||d.getMode()!=
-App.MODE_DEVICE&&d.getMode()!=App.MODE_BROWSER||(e=null),a=this.getEmbeddedSvg(a,b,e,null,k,t,f);return a};EditorUi.prototype.getXmlFileData=function(a,b){a=null!=a?a:!0;b=null!=b?b:!1;var c=this.editor.getGraphXml(a);if(a&&null!=this.fileNode&&null!=this.currentPage){var f=this.editor.graph.compress(this.editor.graph.zapGremlins(mxUtils.getXml(c)));mxUtils.setTextContent(this.currentPage.node,f);c=this.fileNode.cloneNode(!1);if(b)c.appendChild(this.currentPage.node);else for(var d=0;d<this.pages.length;d++){var e=
-this.pages[d].mapping;this.currentPage!=this.pages[d]&&null!=e&&e.needsUpdate&&(f=(new mxCodec(mxUtils.createXmlDocument())).encode(e.graphModel),e.writeRealtimeToNode(f),f=this.editor.graph.compress(this.editor.graph.zapGremlins(mxUtils.getXml(f))),mxUtils.setTextContent(this.pages[d].node,f),e.needsUpdate=!1);c.appendChild(this.pages[d].node)}}return c};EditorUi.prototype.getFileData=function(a,b,d,e,n,g,r,k){n=null!=n?n:!0;r=null!=r?r:this.getXmlFileData(n,null!=g?g:!1);g=this.editor.graph;var c=
-this.getCurrentFile();if(null!=this.pages&&this.currentPage!=this.pages[0]&&(b||!a&&null!=c&&/(\.svg)$/i.test(c.getTitle()))){g=this.createTemporaryGraph(g.getStylesheet());var f=g.getGlobalVariable,h=this.pages[0];g.getGlobalVariable=function(a){return"page"==a?h.getName():"pagenumber"==a?1:f.apply(this,arguments)};document.body.appendChild(g.container);g.model.setRoot(h.root)}a=this.createFileData(r,g,c,window.location.href,a,b,d,e,n,k);g!=this.editor.graph&&g.container.parentNode.removeChild(g.container);
-return a};EditorUi.prototype.getHtml=function(a,b,d,e,n,g){g=null!=g?g:!0;var c=null,f="https://www.draw.io/js/embed-static.min.js";if(null!=b){var c=g?b.getGraphBounds():b.getBoundingBox(b.getSelectionCells()),h=b.view.scale;g=Math.floor(c.x/h-b.view.translate.x);h=Math.floor(c.y/h-b.view.translate.y);c=b.background;null==n&&(b=this.getBasenames().join(";"),0<b.length&&(f="https://www.draw.io/embed.js?s="+b));a.setAttribute("x0",g);a.setAttribute("y0",h)}null!=a&&(a.setAttribute("pan","1"),a.setAttribute("zoom",
-"1"),a.setAttribute("resize","0"),a.setAttribute("fit","0"),a.setAttribute("border","20"),a.setAttribute("links","1"),null!=e&&a.setAttribute("edit",e));null!=n&&(n=n.replace(/&/g,"&amp;"));a=null!=a?this.editor.graph.zapGremlins(mxUtils.getXml(a)):"";e=this.editor.graph.compress(a);this.editor.graph.decompress(e)!=a&&(e=encodeURIComponent(a));return(null==n?'\x3c!--[if IE]><meta http-equiv="X-UA-Compatible" content="IE=5,IE=9" ><![endif]--\x3e\n':"")+"<!DOCTYPE html>\n<html"+(null!=n?' xmlns="http://www.w3.org/1999/xhtml">':
-">")+"\n<head>\n"+(null==n?null!=d?"<title>"+mxUtils.htmlEntities(d)+"</title>\n":"":"<title>Draw.io Diagram</title>\n")+(null!=n?'<meta http-equiv="refresh" content="0;URL=\''+n+"'\"/>\n":"")+"</head>\n<body"+(null==n&&null!=c&&c!=mxConstants.NONE?' style="background-color:'+c+';">':">")+'\n<div class="mxgraph" style="position:relative;overflow:auto;width:100%;">\n<div style="width:1px;height:1px;overflow:hidden;">'+e+"</div>\n</div>\n"+(null==n?'<script type="text/javascript" src="'+f+'">\x3c/script>':
-'<a style="position:absolute;top:50%;left:50%;margin-top:-128px;margin-left:-64px;" href="'+n+'" target="_blank"><img border="0" src="https://www.draw.io/images/drawlogo128.png"/></a>')+"\n</body>\n</html>\n"};EditorUi.prototype.getHtml2=function(a,b,d,e,n){null!=n&&(n=n.replace(/&/g,"&amp;"));a={highlight:"#0000ff",nav:this.editor.graph.foldingEnabled,resize:!0,xml:this.editor.graph.zapGremlins(a),toolbar:"pages zoom layers lightbox"};null!=this.pages&&null!=this.currentPage&&(a.page=mxUtils.indexOf(this.pages,
-this.currentPage));return(null==n?'\x3c!--[if IE]><meta http-equiv="X-UA-Compatible" content="IE=5,IE=9" ><![endif]--\x3e\n':"")+"<!DOCTYPE html>\n<html"+(null!=n?' xmlns="http://www.w3.org/1999/xhtml">':">")+"\n<head>\n"+(null==n?null!=d?"<title>"+mxUtils.htmlEntities(d)+"</title>\n":"":"<title>Draw.io Diagram</title>\n")+(null!=n?'<meta http-equiv="refresh" content="0;URL=\''+n+"'\"/>\n":"")+'<meta charset="utf-8"/>\n</head>\n<body>\n<div class="mxgraph" style="max-width:100%;border:1px solid transparent;" data-mxgraph="'+
-mxUtils.htmlEntities(JSON.stringify(a))+'"></div>\n'+(null==n?'<script type="text/javascript" src="https://www.draw.io/js/viewer.min.js">\x3c/script>':'<a style="position:absolute;top:50%;left:50%;margin-top:-128px;margin-left:-64px;" href="'+n+'" target="_blank"><img border="0" src="https://www.draw.io/images/drawlogo128.png"/></a>')+"\n</body>\n</html>\n"};EditorUi.prototype.setFileData=function(a){a=this.validateFileData(a);this.pages=this.fileNode=this.currentPage=null;var c=null!=a&&0<a.length?
+function(a,b,d,e,m,h,r,k,l,t){b=null!=b?b:this.editor.graph;m=null!=m?m:!1;l=null!=l?l:!0;var c,f=null;null==d||d.getMode()==App.MODE_DEVICE||d.getMode()==App.MODE_BROWSER?c="_blank":f=c=e;if(null==a)return"";var g=a;if("mxfile"!=g.nodeName.toLowerCase()){var p=b.zapGremlins(mxUtils.getXml(a)),g=b.compress(p);if(b.decompress(g)!=p)return p;p=a.ownerDocument.createElement("diagram");mxUtils.setTextContent(p,g);g=a.ownerDocument.createElement("mxfile");g.appendChild(p)}t?(g=g.cloneNode(!0),g.removeAttribute("userAgent"),
+g.removeAttribute("version"),g.removeAttribute("editor"),g.removeAttribute("type")):(g.setAttribute("userAgent",navigator.userAgent),g.setAttribute("version",EditorUi.VERSION),g.setAttribute("editor","www.draw.io"),a=null!=d?d.getMode():this.mode,null!=a&&g.setAttribute("type",a));a=mxUtils.getXml(g);if(!h&&!m&&(r||null!=d&&/(\.html)$/i.test(d.getTitle())))a=this.getHtml2(mxUtils.getXml(g),b,null!=d?d.getTitle():null,c,f);else if(h||!m&&null!=d&&/(\.svg)$/i.test(d.getTitle()))null==d||d.getMode()!=
+App.MODE_DEVICE&&d.getMode()!=App.MODE_BROWSER||(e=null),a=this.getEmbeddedSvg(a,b,e,null,k,l,f);return a};EditorUi.prototype.getXmlFileData=function(a,b){a=null!=a?a:!0;b=null!=b?b:!1;var c=this.editor.getGraphXml(a);if(a&&null!=this.fileNode&&null!=this.currentPage){var d=this.editor.graph.compress(this.editor.graph.zapGremlins(mxUtils.getXml(c)));mxUtils.setTextContent(this.currentPage.node,d);c=this.fileNode.cloneNode(!1);if(b)c.appendChild(this.currentPage.node);else for(var f=0;f<this.pages.length;f++){var e=
+this.pages[f].mapping;this.currentPage!=this.pages[f]&&null!=e&&e.needsUpdate&&(d=(new mxCodec(mxUtils.createXmlDocument())).encode(e.graphModel),e.writeRealtimeToNode(d),d=this.editor.graph.compress(this.editor.graph.zapGremlins(mxUtils.getXml(d))),mxUtils.setTextContent(this.pages[f].node,d),e.needsUpdate=!1);c.appendChild(this.pages[f].node)}}return c};EditorUi.prototype.getFileData=function(a,b,d,e,m,h,r,k){m=null!=m?m:!0;r=null!=r?r:this.getXmlFileData(m,null!=h?h:!1);h=this.editor.graph;var c=
+this.getCurrentFile();if(null!=this.pages&&this.currentPage!=this.pages[0]&&(b||!a&&null!=c&&/(\.svg)$/i.test(c.getTitle()))){h=this.createTemporaryGraph(h.getStylesheet());var f=h.getGlobalVariable,g=this.pages[0];h.getGlobalVariable=function(a){return"page"==a?g.getName():"pagenumber"==a?1:f.apply(this,arguments)};document.body.appendChild(h.container);h.model.setRoot(g.root)}a=this.createFileData(r,h,c,window.location.href,a,b,d,e,m,k);h!=this.editor.graph&&h.container.parentNode.removeChild(h.container);
+return a};EditorUi.prototype.getHtml=function(a,b,d,e,m,h){h=null!=h?h:!0;var c=null,f="https://www.draw.io/js/embed-static.min.js";if(null!=b){var c=h?b.getGraphBounds():b.getBoundingBox(b.getSelectionCells()),g=b.view.scale;h=Math.floor(c.x/g-b.view.translate.x);g=Math.floor(c.y/g-b.view.translate.y);c=b.background;null==m&&(b=this.getBasenames().join(";"),0<b.length&&(f="https://www.draw.io/embed.js?s="+b));a.setAttribute("x0",h);a.setAttribute("y0",g)}null!=a&&(a.setAttribute("pan","1"),a.setAttribute("zoom",
+"1"),a.setAttribute("resize","0"),a.setAttribute("fit","0"),a.setAttribute("border","20"),a.setAttribute("links","1"),null!=e&&a.setAttribute("edit",e));null!=m&&(m=m.replace(/&/g,"&amp;"));a=null!=a?this.editor.graph.zapGremlins(mxUtils.getXml(a)):"";e=this.editor.graph.compress(a);this.editor.graph.decompress(e)!=a&&(e=encodeURIComponent(a));return(null==m?'\x3c!--[if IE]><meta http-equiv="X-UA-Compatible" content="IE=5,IE=9" ><![endif]--\x3e\n':"")+"<!DOCTYPE html>\n<html"+(null!=m?' xmlns="http://www.w3.org/1999/xhtml">':
+">")+"\n<head>\n"+(null==m?null!=d?"<title>"+mxUtils.htmlEntities(d)+"</title>\n":"":"<title>Draw.io Diagram</title>\n")+(null!=m?'<meta http-equiv="refresh" content="0;URL=\''+m+"'\"/>\n":"")+"</head>\n<body"+(null==m&&null!=c&&c!=mxConstants.NONE?' style="background-color:'+c+';">':">")+'\n<div class="mxgraph" style="position:relative;overflow:auto;width:100%;">\n<div style="width:1px;height:1px;overflow:hidden;">'+e+"</div>\n</div>\n"+(null==m?'<script type="text/javascript" src="'+f+'">\x3c/script>':
+'<a style="position:absolute;top:50%;left:50%;margin-top:-128px;margin-left:-64px;" href="'+m+'" target="_blank"><img border="0" src="https://www.draw.io/images/drawlogo128.png"/></a>')+"\n</body>\n</html>\n"};EditorUi.prototype.getHtml2=function(a,b,d,e,m){null!=m&&(m=m.replace(/&/g,"&amp;"));a={highlight:"#0000ff",nav:this.editor.graph.foldingEnabled,resize:!0,xml:this.editor.graph.zapGremlins(a),toolbar:"pages zoom layers lightbox"};null!=this.pages&&null!=this.currentPage&&(a.page=mxUtils.indexOf(this.pages,
+this.currentPage));return(null==m?'\x3c!--[if IE]><meta http-equiv="X-UA-Compatible" content="IE=5,IE=9" ><![endif]--\x3e\n':"")+"<!DOCTYPE html>\n<html"+(null!=m?' xmlns="http://www.w3.org/1999/xhtml">':">")+"\n<head>\n"+(null==m?null!=d?"<title>"+mxUtils.htmlEntities(d)+"</title>\n":"":"<title>Draw.io Diagram</title>\n")+(null!=m?'<meta http-equiv="refresh" content="0;URL=\''+m+"'\"/>\n":"")+'<meta charset="utf-8"/>\n</head>\n<body>\n<div class="mxgraph" style="max-width:100%;border:1px solid transparent;" data-mxgraph="'+
+mxUtils.htmlEntities(JSON.stringify(a))+'"></div>\n'+(null==m?'<script type="text/javascript" src="https://www.draw.io/js/viewer.min.js">\x3c/script>':'<a style="position:absolute;top:50%;left:50%;margin-top:-128px;margin-left:-64px;" href="'+m+'" target="_blank"><img border="0" src="https://www.draw.io/images/drawlogo128.png"/></a>')+"\n</body>\n</html>\n"};EditorUi.prototype.setFileData=function(a){a=this.validateFileData(a);this.pages=this.fileNode=this.currentPage=null;var c=null!=a&&0<a.length?
 mxUtils.parseXml(a).documentElement:null;a=null!=c?this.editor.extractGraphModel(c,!0):null;null!=a&&(c=a);if(null!=c&&"mxfile"==c.nodeName&&(a=c.getElementsByTagName("diagram"),"0"!=urlParams.pages||1<a.length||1==a.length&&a[0].hasAttribute("name"))){this.fileNode=c;this.pages=[];for(c=0;c<a.length;c++){var b=new DiagramPage(a[c]);null==b.getName()&&b.setName(mxResources.get("pageWithNumber",[c+1]));this.pages.push(b)}this.currentPage=this.pages[Math.max(0,Math.min(this.pages.length-1,urlParams.page||
 0))];c=this.currentPage.node}"0"!=urlParams.pages&&null==this.fileNode&&null!=c&&(this.fileNode=c.ownerDocument.createElement("mxfile"),this.currentPage=new DiagramPage(c.ownerDocument.createElement("diagram")),this.currentPage.setName(mxResources.get("pageWithNumber",[1])),this.pages=[this.currentPage]);this.editor.setGraphXml(c);null!=this.currentPage&&(this.currentPage.root=this.editor.graph.model.root)};EditorUi.prototype.getBaseFilename=function(){var a=this.getCurrentFile(),a=null!=a&&null!=
-a.getTitle()?a.getTitle():this.defaultFilename;if(/(\.xml)$/i.test(a)||/(\.html)$/i.test(a)||/(\.svg)$/i.test(a))a=a.substring(0,a.lastIndexOf("."));return a};EditorUi.prototype.downloadFile=function(a,b,d,e,n,g){try{e=null!=e?e:this.editor.graph.isSelectionEmpty();var c=this.getBaseFilename(),f=c+"."+a;if("xml"==a){var h='<?xml version="1.0" encoding="UTF-8"?>\n'+(b?mxUtils.getXml(this.editor.getGraphXml(e)):this.getFileData(!0,null,null,null,e,n));this.saveData(f,a,h,"text/xml")}else if("html"==
-a)h=this.getHtml2(this.getFileData(!0),this.editor.graph,c),this.saveData(f,a,h,"text/html");else if("svg"!=a&&"xmlsvg"!=a||!this.spinner.spin(document.body,mxResources.get("export")))"xmlpng"==a?f=c+".png":"jpeg"==a&&(f=c+".jpg"),this.saveRequest(f,a,mxUtils.bind(this,function(c,b){try{var d=this.editor.graph.pageVisible;null!=g&&(this.editor.graph.pageVisible=g);var f=this.createDownloadRequest(c,a,e,b);this.editor.graph.pageVisible=d;return f}catch(F){this.handleError(F)}}));else{var m=null,l=
-mxUtils.bind(this,function(a){a.length<=MAX_REQUEST_SIZE?this.saveData(f,"svg",a,"image/svg+xml"):this.handleError({message:mxResources.get("drawingTooLarge")},mxResources.get("error"),mxUtils.bind(this,function(){mxUtils.popup(m)}))});if("svg"==a){var u=this.editor.graph.background;u==mxConstants.NONE&&(u=null);var p=this.editor.graph.getSvg(u,null,null,null,null,e);d&&this.editor.graph.addSvgShadow(p);this.convertImages(p,mxUtils.bind(this,mxUtils.bind(this,function(a){this.spinner.stop();l('<?xml version="1.0" encoding="UTF-8"?>\n<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">\n'+
-mxUtils.getXml(a))})))}else f=c+".svg",m=this.getFileData(!1,!0,null,mxUtils.bind(this,function(a){this.spinner.stop();l(a)}),e)}}catch(B){this.handleError(B)}};EditorUi.prototype.createDownloadRequest=function(a,b,d,e){var c=this.editor.graph.getGraphBounds();d=this.getFileData(!0,null,null,null,d,"xmlpng"!=b);var f="";if(c.width*c.height>MAX_AREA||d.length>MAX_REQUEST_SIZE)throw{message:mxResources.get("drawingTooLarge")};c="0";if("xmlpng"==b&&(c="1",b="png",null!=this.pages&&null!=this.currentPage))for(var h=
-0;h<this.pages.length;h++)if(this.pages[h]==this.currentPage){f="&from="+h;break}return new mxXmlRequest(EXPORT_URL,"format="+b+f+"&base64="+e+"&embedXml="+c+"&xml="+encodeURIComponent(d)+(null!=a?"&filename="+encodeURIComponent(a):""))};EditorUi.prototype.setMode=function(a,b){this.mode=a};EditorUi.prototype.fileLoaded=function(a){var c=!1;this.hideDialog();var b=this.getCurrentFile();this.setCurrentFile(null);null!=b&&(b.removeListener(this.descriptorChangedListener),b.close());this.editor.graph.model.clear();
+a.getTitle()?a.getTitle():this.defaultFilename;if(/(\.xml)$/i.test(a)||/(\.html)$/i.test(a)||/(\.svg)$/i.test(a))a=a.substring(0,a.lastIndexOf("."));return a};EditorUi.prototype.downloadFile=function(a,b,d,e,m,h){try{e=null!=e?e:this.editor.graph.isSelectionEmpty();var c=this.getBaseFilename(),f=c+"."+a;if("xml"==a){var g='<?xml version="1.0" encoding="UTF-8"?>\n'+(b?mxUtils.getXml(this.editor.getGraphXml(e)):this.getFileData(!0,null,null,null,e,m));this.saveData(f,a,g,"text/xml")}else if("html"==
+a)g=this.getHtml2(this.getFileData(!0),this.editor.graph,c),this.saveData(f,a,g,"text/html");else if("svg"!=a&&"xmlsvg"!=a||!this.spinner.spin(document.body,mxResources.get("export")))"xmlpng"==a?f=c+".png":"jpeg"==a&&(f=c+".jpg"),this.saveRequest(f,a,mxUtils.bind(this,function(c,b){try{var d=this.editor.graph.pageVisible;null!=h&&(this.editor.graph.pageVisible=h);var f=this.createDownloadRequest(c,a,e,b);this.editor.graph.pageVisible=d;return f}catch(E){this.handleError(E)}}));else{var p=null,l=
+mxUtils.bind(this,function(a){a.length<=MAX_REQUEST_SIZE?this.saveData(f,"svg",a,"image/svg+xml"):this.handleError({message:mxResources.get("drawingTooLarge")},mxResources.get("error"),mxUtils.bind(this,function(){mxUtils.popup(p)}))});if("svg"==a){var u=this.editor.graph.background;u==mxConstants.NONE&&(u=null);var n=this.editor.graph.getSvg(u,null,null,null,null,e);d&&this.editor.graph.addSvgShadow(n);this.convertImages(n,mxUtils.bind(this,mxUtils.bind(this,function(a){this.spinner.stop();l('<?xml version="1.0" encoding="UTF-8"?>\n<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">\n'+
+mxUtils.getXml(a))})))}else f=c+".svg",p=this.getFileData(!1,!0,null,mxUtils.bind(this,function(a){this.spinner.stop();l(a)}),e)}}catch(A){this.handleError(A)}};EditorUi.prototype.createDownloadRequest=function(a,b,d,e){var c=this.editor.graph.getGraphBounds();d=this.getFileData(!0,null,null,null,d,"xmlpng"!=b);var f="";if(c.width*c.height>MAX_AREA||d.length>MAX_REQUEST_SIZE)throw{message:mxResources.get("drawingTooLarge")};c="0";if("xmlpng"==b&&(c="1",b="png",null!=this.pages&&null!=this.currentPage))for(var g=
+0;g<this.pages.length;g++)if(this.pages[g]==this.currentPage){f="&from="+g;break}return new mxXmlRequest(EXPORT_URL,"format="+b+f+"&base64="+e+"&embedXml="+c+"&xml="+encodeURIComponent(d)+(null!=a?"&filename="+encodeURIComponent(a):""))};EditorUi.prototype.setMode=function(a,b){this.mode=a};EditorUi.prototype.fileLoaded=function(a){var c=!1;this.hideDialog();var b=this.getCurrentFile();this.setCurrentFile(null);null!=b&&(b.removeListener(this.descriptorChangedListener),b.close());this.editor.graph.model.clear();
 this.editor.undoManager.clear();var d=mxUtils.bind(this,function(){this.setGraphEnabled(!1);this.setCurrentFile(null);null!=b&&this.updateDocumentTitle();this.editor.graph.model.clear();this.editor.undoManager.clear();null!=window.location.hash&&0<window.location.hash.length&&(window.location.hash="");null!=this.fname&&(this.fnameWrapper.style.display="none",this.fname.innerHTML="",this.fname.setAttribute("title",mxResources.get("rename")));this.updateUi();this.showSplash()});if(null!=a)try{this.setCurrentFile(a);
 a.addListener("descriptorChanged",this.descriptorChangedListener);a.addListener("contentChanged",this.descriptorChangedListener);a.open();this.setGraphEnabled(!0);this.setMode(a.getMode());this.editor.undoManager.clear();this.descriptorChanged();this.updateUi();null==a.realtime&&(a.isEditable()?this.editor.setStatus(""):this.editor.setStatus('<span class="geStatusAlert" style="margin-left:8px;">'+mxUtils.htmlEntities(mxResources.get("readOnly"))+"</span>"));!this.editor.chromeless||this.editor.editable?
-(this.editor.graph.selectUnlockedLayer(),this.showLayersDialog(),this.restoreLibraries(),window.self!==window.top&&window.focus()):this.editor.graph.lightbox&&this.lightboxFit();this.chromelessResize&&this.chromelessResize();this.editor.fireEvent(new mxEventObject("fileLoaded"));c=!0;if(EditorUi.enableLogging&&!this.isOffline()&&null!=a.getMode())try{"function"===typeof window.ga&&ga("send","event","File","open",a.getMode())}catch(n){}if(this.mode==a.getMode()&&a.getMode()!=App.MODE_DEVICE&&null!=
-a.getMode())try{this.addRecent({id:a.getHash(),title:a.getTitle(),mode:a.getMode()})}catch(n){}try{mxSettings.setOpenCounter(mxSettings.getOpenCounter()+1),mxSettings.save()}catch(n){}}catch(n){null!=window.console&&console.log("error in fileLoaded:",a,n);if(EditorUi.enableLogging&&!this.isOffline())try{(new Image).src=(null!=window.DRAWIO_LOG_URL?window.DRAWIO_LOG_URL:"")+"/log?v="+encodeURIComponent(EditorUi.VERSION)+"&msg=errorInFileLoaded:url:"+encodeURIComponent(window.location.href)+(null!=
-n&&null!=n.message?":err:"+encodeURIComponent(n.message):"")+(null!=n&&null!=n.stack?"&stack="+encodeURIComponent(n.stack):"")}catch(u){}this.handleError(n,mxResources.get("errorLoadingFile"),mxUtils.bind(this,function(){null!=urlParams.url&&this.spinner.spin(document.body,mxResources.get("reconnecting"))?window.location.search=this.getSearch(["url"]):null!=b?b.constructor==DriveFile?this.loadFile(b.getHash()):this.fileLoaded(b):d()}))}else d();return c};EditorUi.prototype.restoreLibraries=function(){};
-EditorUi.prototype.saveLibrary=function(a,b,d,e,n,g,r){};EditorUi.prototype.toggleScratchpad=function(){if(isLocalStorage||mxClient.IS_CHROMEAPP)null==this.scratchpad?this.getLocalData(".scratchpad",mxUtils.bind(this,function(a){null==a&&(a=this.emptyLibraryXml);this.loadLibrary(new StorageLibrary(this,a,".scratchpad"))})):this.closeLibrary(this.scratchpad)};EditorUi.prototype.createLibraryDataFromImages=function(a){var c=mxUtils.createXmlDocument(),b=c.createElement("mxlibrary");mxUtils.setTextContent(b,
-JSON.stringify(a));c.appendChild(b);return mxUtils.getXml(c)};EditorUi.prototype.closeLibrary=function(a){null!=a&&(this.removeLibrarySidebar(a.getHash()),a.constructor!=LocalLibrary&&mxSettings.removeCustomLibrary(a.getHash()),".scratchpad"==a.title&&(this.scratchpad=null))};EditorUi.prototype.removeLibrarySidebar=function(a){var c=this.sidebar.palettes[a];if(null!=c){for(var b=0;b<c.length;b++)c[b].parentNode.removeChild(c[b]);delete this.sidebar.palettes[a]}};EditorUi.prototype.repositionLibrary=
-function(a){var c=this.sidebar.container;if(null==a){var b=this.sidebar.palettes["L.scratchpad"];null==b&&(b=this.sidebar.palettes.search);null!=b&&(a=b[b.length-1].nextSibling)}a=null!=a?a:c.firstChild.nextSibling.nextSibling;var b=c.lastChild,d=b.previousSibling;c.insertBefore(b,a);c.insertBefore(d,b)};EditorUi.prototype.loadLibrary=function(a){var c=mxUtils.parseXml(a.getData());if("mxlibrary"==c.documentElement.nodeName){var b=JSON.parse(mxUtils.getTextContent(c.documentElement));this.libraryLoaded(a,
-b,c.documentElement.getAttribute("title"))}else throw{message:mxResources.get("notALibraryFile")};};EditorUi.prototype.getLibraryStorageHint=function(a){return""};EditorUi.prototype.libraryLoaded=function(a,b,d){a.constructor!=LocalLibrary&&mxSettings.addCustomLibrary(a.getHash());".scratchpad"==a.title&&(this.scratchpad=a);var c=this.sidebar.palettes[a.getHash()],c=null!=c?c[c.length-1].nextSibling:null;this.removeLibrarySidebar(a.getHash());var f=null,e=mxUtils.bind(this,function(c,b){if(0==c.length&&
-a.isEditable())null==f&&(f=document.createElement("div"),mxUtils.setPrefixedStyle(f.style,"borderRadius","6px"),f.style.border="3px dotted lightGray",f.style.textAlign="center",f.style.padding="8px",f.style.color="#B3B3B3",mxUtils.write(f,mxResources.get("dragElementsHere"))),b.appendChild(f);else for(var d=0;d<c.length;d++){var e=c[d],h=e.data;if(null!=h){var h=this.convertDataUri(h),k="shape=image;verticalLabelPosition=bottom;verticalAlign=top;imageAspect=0;";"fixed"==e.aspect&&(k+="aspect=fixed;");
-b.appendChild(this.sidebar.createVertexTemplate(k+"image="+h,e.w,e.h,"",e.title||"",!1,!1,!1))}else null!=e.xml&&(h=this.stringToCells(this.editor.graph.decompress(e.xml)),0<h.length&&b.appendChild(this.sidebar.createVertexTemplateFromCells(h,e.w,e.h,e.title||"",!0,!1,!1)))}});d=null!=d&&0<d.length?d:a.getTitle();var h=this.sidebar.addPalette(a.getHash(),d,!0,mxUtils.bind(this,function(a){e(b,a)}));this.repositionLibrary(c);var k=h.parentNode.previousSibling;d=k.getAttribute("title");null!=d&&0<d.length&&
-".scratchpad"!=a.title&&k.setAttribute("title",this.getLibraryStorageHint(a)+"\n"+d);var g=document.createElement("div");g.style.position="absolute";g.style.right="0px";g.style.top="5px";mxClient.IS_QUIRKS||8==document.documentMode||(g.style.backgroundColor="inherit");k.style.position="relative";var l=document.createElement("img");l.setAttribute("src",Dialog.prototype.closeImage);l.setAttribute("title",mxResources.get("close"));l.setAttribute("align","top");l.setAttribute("border","0");l.className=
-"geButton";l.style.marginRight="1px";l.style.marginTop="-1px";g.appendChild(l);var p=null;mxEvent.addListener(l,"click",mxUtils.bind(this,function(c){if(!mxEvent.isConsumed(c)){var b=mxUtils.bind(this,function(){this.closeLibrary(a)});null!=p?this.confirm(mxResources.get("allChangesLost"),null,b,mxResources.get("cancel"),mxResources.get("discardChanges")):b();mxEvent.consume(c)}}));mxEvent.addListener(h,"mousemove",mxUtils.bind(this,function(a){mxEvent.getSource(a)==h?h.setAttribute("title",mxResources.get("libraryTooltip")):
-h.removeAttribute("title")}));if(a.isEditable()){var q=this.editor.graph,D=mxUtils.bind(this,function(c){this.showLibraryDialog(a.getTitle(),h,b,a,a.getMode());mxEvent.consume(c)}),B=mxUtils.bind(this,function(c){a.setModified(!0);a.isAutosave()?(null!=A&&null!=A.parentNode&&A.parentNode.removeChild(A),A=l.cloneNode(!1),A.setAttribute("src",Editor.spinImage),A.setAttribute("title",mxResources.get("saving")),A.style.cursor="default",A.style.marginRight="2px",A.style.marginTop="-2px",g.insertBefore(A,
-g.firstChild),k.style.paddingRight=18*g.childNodes.length+"px",this.saveLibrary(a.getTitle(),b,a,a.getMode(),!0,!0,function(){null!=A&&null!=A.parentNode&&(A.parentNode.removeChild(A),k.style.paddingRight=18*g.childNodes.length+"px")})):null==p&&(p=l.cloneNode(!1),p.setAttribute("src",IMAGE_PATH+"/download.png"),p.setAttribute("title",mxResources.get("save")),g.insertBefore(p,g.firstChild),mxEvent.addListener(p,"click",mxUtils.bind(this,function(c){this.saveLibrary(a.getTitle(),b,a,a.getMode(),a.constructor==
-LocalLibrary,!0,function(){null==p||a.isModified()||(k.style.paddingRight=18*g.childNodes.length+"px",p.parentNode.removeChild(p),p=null)});mxEvent.consume(c)})),k.style.paddingRight=18*g.childNodes.length+"px")}),y=mxUtils.bind(this,function(a,c,d,e){a=q.cloneCells(mxUtils.sortCells(q.model.getTopmostCells(a)));for(var k=0;k<a.length;k++){var m=q.getCellGeometry(a[k]);null!=m&&m.translate(-c.x,-c.y)}h.appendChild(this.sidebar.createVertexTemplateFromCells(a,c.width,c.height,e||"",!0,!1,!1));a={xml:this.editor.graph.compress(mxUtils.getXml(this.editor.graph.encodeCells(a))),
-w:c.width,h:c.height};null!=e&&(a.title=e);b.push(a);B(d);null!=f&&null!=f.parentNode&&0<b.length&&(f.parentNode.removeChild(f),f=null)}),C=mxUtils.bind(this,function(a){if(q.isSelectionEmpty())q.getRubberband().isActive()?(q.getRubberband().execute(a),q.getRubberband().reset()):this.showError(mxResources.get("error"),mxResources.get("nothingIsSelected"),mxResources.get("ok"));else{var c=q.getSelectionCells(),b=q.view.getBounds(c),d=q.view.scale;b.x/=d;b.y/=d;b.width/=d;b.height/=d;b.x-=q.view.translate.x;
-b.y-=q.view.translate.y;y(c,b)}mxEvent.consume(a)});h.style.border="3px solid transparent";mxEvent.addGestureListeners(h,function(){},mxUtils.bind(this,function(a){q.isMouseDown&&null!=q.panningManager&&null!=q.graphHandler.shape&&(q.graphHandler.shape.node.style.visibility="hidden",null!=f?f.style.border="3px dotted rgb(254, 137, 12)":h.style.border="3px dotted rgb(254, 137, 12)",h.style.cursor="copy",q.panningManager.stop(),q.autoScroll=!1,null!=q.graphHandler.guide&&q.graphHandler.guide.setVisible(!1),
-null!=q.graphHandler.hint&&(q.graphHandler.hint.style.visibility="hidden"),mxEvent.consume(a))}),mxUtils.bind(this,function(a){q.isMouseDown&&null!=q.panningManager&&null!=q.graphHandler&&(h.style.border="3px solid transparent",null!=f&&(f.style.border="3px dotted lightGray"),h.style.cursor="default",this.sidebar.showTooltips=!0,q.panningManager.stop(),q.graphHandler.reset(),q.isMouseDown=!1,q.autoScroll=!0,C(a),mxEvent.consume(a))}));mxEvent.addListener(h,"mouseleave",mxUtils.bind(this,function(a){q.isMouseDown&&
-null!=q.graphHandler.shape&&(q.graphHandler.shape.node.style.visibility="visible",h.style.border="3px solid transparent",h.style.cursor="",q.autoScroll=!0,null!=q.graphHandler.guide&&q.graphHandler.guide.setVisible(!0),null!=q.graphHandler.hint&&(q.graphHandler.hint.style.visibility="visible"),null!=f&&(f.style.border="3px dotted lightGray"))}));Graph.fileSupport&&(mxEvent.addListener(h,"dragover",mxUtils.bind(this,function(a){null!=f?f.style.border="3px dotted rgb(254, 137, 12)":h.style.border="3px dotted rgb(254, 137, 12)";
-a.dataTransfer.dropEffect="copy";h.style.cursor="copy";this.sidebar.hideTooltip();a.stopPropagation();a.preventDefault()})),mxEvent.addListener(h,"drop",mxUtils.bind(this,function(a){h.style.border="3px solid transparent";h.style.cursor="";null!=f&&(f.style.border="3px dotted lightGray");0<a.dataTransfer.files.length&&this.importFiles(a.dataTransfer.files,0,0,this.maxImageSize,mxUtils.bind(this,function(c,d,k,m,n,g,r,l,u){if(null!=c&&"image/"==d.substring(0,6))c="shape=image;verticalLabelPosition=bottom;verticalAlign=top;aspect=fixed;image="+
-this.convertDataUri(c),c=[new mxCell("",new mxGeometry(0,0,n,g),c)],c[0].vertex=!0,y(c,new mxRectangle(0,0,n,g),a,mxEvent.isAltDown(a)?null:r.substring(0,r.lastIndexOf(".")).replace(/_/g," ")),null!=f&&null!=f.parentNode&&0<b.length&&(f.parentNode.removeChild(f),f=null);else{var t=!1,p=mxUtils.bind(this,function(c,d){if(null!=c&&"text/xml"==d){var k=mxUtils.parseXml(c);if("mxlibrary"==k.documentElement.nodeName)try{var m=JSON.parse(mxUtils.getTextContent(k.documentElement));e(m,h);b=b.concat(m);B(a);
-this.spinner.stop();t=!0}catch(Y){}else if("mxfile"==k.documentElement.nodeName)try{for(var n=k.documentElement.getElementsByTagName("diagram"),k=0;k<n.length;k++){var m=mxUtils.getTextContent(n[k]),g=this.stringToCells(this.editor.graph.decompress(m)),r=this.editor.graph.getBoundingBoxFromGeometry(g);y(g,new mxRectangle(0,0,r.width,r.height),a)}t=!0}catch(Y){null!=window.console&&console.log("error in drop handler:",Y)}}t||(this.spinner.stop(),this.handleError({message:mxResources.get("errorLoadingFile")}));
-null!=f&&null!=f.parentNode&&0<b.length&&(f.parentNode.removeChild(f),f=null)});!this.isOffline()&&(new XMLHttpRequest).upload&&this.isRemoteFileFormat(c,r)&&null!=u?this.parseFile(u,mxUtils.bind(this,function(a){4==a.readyState&&(this.spinner.stop(),200<=a.status&&299>=a.status?p(a.responseText,"text/xml"):this.handleError({message:mxResources.get(413==a.status?"drawingTooLarge":"invalidOrMissingFile")},mxResources.get("errorLoadingFile")))})):p(c,d)}}));a.stopPropagation();a.preventDefault()})),
-mxEvent.addListener(h,"dragleave",function(a){null!=f?f.style.border="3px dotted lightGray":(h.style.border="3px solid transparent",h.style.cursor="");a.stopPropagation();a.preventDefault()}));l=l.cloneNode(!1);l.setAttribute("src",IMAGE_PATH+"/edit.gif");l.setAttribute("title",mxResources.get("edit"));g.insertBefore(l,g.firstChild);mxEvent.addListener(l,"click",D);mxEvent.addListener(h,"dblclick",function(a){mxEvent.getSource(a)==h&&D(a)});l=l.cloneNode(!1);l.setAttribute("src",Editor.plusImage);
-l.setAttribute("title",mxResources.get("add"));g.insertBefore(l,g.firstChild);this.isOffline()||".scratchpad"!=a.title||(d=document.createElement("span"),d.setAttribute("title",mxResources.get("help")),d.style.cssText="color:gray;text-decoration:none;",d.className="geButton",mxUtils.write(d,"?"),mxEvent.addGestureListeners(d,mxUtils.bind(this,function(a){window.open("https://desk.draw.io/support/solutions/articles/16000042367");mxEvent.consume(a)})),g.insertBefore(d,g.firstChild));var A=null;mxEvent.addListener(l,
-"click",C)}k.appendChild(g);k.style.paddingRight=18*g.childNodes.length+"px"};"1"==urlParams.offline?EditorUi.prototype.footerHeight=4:("atlas"==uiTheme?("undefined"!==typeof Toolbar&&(Toolbar.prototype.unselectedBackground=mxClient.IS_QUIRKS?"none":"linear-gradient(rgb(255, 255, 255) 0px, rgb(242, 242, 242) 100%)",Toolbar.prototype.selectedBackground="rgb(242, 242, 242)"),Editor.prototype.initialTopSpacing=3,EditorUi.prototype.menubarHeight=41,EditorUi.prototype.toolbarHeight=38,EditorUi.prototype.hsplitPosition=
-188,Sidebar.prototype.thumbWidth=46,Sidebar.prototype.thumbHeight=46,Sidebar.prototype.thumbPadding=5<=document.documentMode?0:1,Sidebar.prototype.thumbBorder=2):"1"==urlParams.savesidebar&&(Sidebar.prototype.thumbWidth=64,Sidebar.prototype.thumbHeight=64),EditorUi.prototype.footerHeight=760<=screen.width&&240<=screen.height?46:0,EditorUi.prototype.createFooter=function(){var a=document.getElementById("geFooter");if(null!=a){a.style.visibility="visible";var b=document.createElement("img");b.setAttribute("border",
-"0");b.setAttribute("src",Dialog.prototype.closeImage);b.setAttribute("title",mxResources.get("hide"));a.appendChild(b);mxClient.IS_QUIRKS&&(b.style.position="relative",b.style.styleFloat="right",b.style.top="-30px",b.style.left="164px",b.style.cursor="pointer");mxEvent.addListener(b,"click",mxUtils.bind(this,function(){this.hideFooter()}))}return a});EditorUi.prototype.hideFooter=function(){var a=document.getElementById("geFooter");null!=a&&(this.footerHeight=0,a.style.display="none",this.refresh())};
-EditorUi.prototype.showImageDialog=function(a,b,d,e,n){a=new ImageDialog(this,a,b,d,e,n);this.showDialog(a.container,Graph.fileSupport?440:360,Graph.fileSupport?200:90,!0,!0);a.init()};EditorUi.prototype.showBackgroundImageDialog=function(a){a=null!=a?a:mxUtils.bind(this,function(a){a=new ChangePageSetup(this,null,a);a.ignoreColor=!0;this.editor.graph.model.execute(a)});var c=new BackgroundImageDialog(this,mxUtils.bind(this,function(c){a(c)}));this.showDialog(c.container,360,200,!0,!0);c.init()};
-EditorUi.prototype.showLibraryDialog=function(a,b,d,e,n){a=new LibraryDialog(this,a,b,d,e,n);this.showDialog(a.container,620,440,!0,!1,mxUtils.bind(this,function(a){a&&null==this.getCurrentFile()&&"1"!=urlParams.embed&&this.showSplash()}));a.init()};EditorUi.prototype.createSidebarFooterContainer=function(){var a=this.createDiv("geSidebarContainer");a.style.position="absolute";a.style.overflow="hidden";a.style.borderWidth="3px";var b=document.createElement("a");b.setAttribute("href","javascript:void(0);");
-b.className="geTitle";b.style.height="100%";b.style.paddingTop="9px";mxUtils.write(b,mxResources.get("moreShapes")+"...");mxEvent.addListener(b,"click",mxUtils.bind(this,function(a){this.actions.get("shapes").funct();mxEvent.consume(a)}));a.appendChild(b);return a};EditorUi.prototype.handleError=function(a,b,d){var c=null!=this.spinner&&null!=this.spinner.pause?this.spinner.pause():function(){},f=null!=a&&null!=a.error?a.error:a;if(null!=f||null!=b){a=mxUtils.htmlEntities(mxResources.get("unknownError"));
-var e=mxResources.get("ok"),h=null;b=null!=b?b:mxResources.get("error");if(null!=f)if(null!=f.retry&&(e=mxResources.get("cancel"),h=function(){c();f.retry()}),"undefined"!=typeof gapi&&"undefined"!=typeof gapi.drive&&"undefined"!=typeof gapi.drive.realtime&&f.type==gapi.drive.realtime.ErrorType.FORBIDDEN)a=mxUtils.htmlEntities(mxResources.get("forbidden"));else if(404==f.code||404==f.status||"undefined"!=typeof gapi&&"undefined"!=typeof gapi.drive&&"undefined"!=typeof gapi.drive.realtime&&f.type==
-gapi.drive.realtime.ErrorType.NOT_FOUND){a=mxUtils.htmlEntities(mxResources.get("fileNotFoundOrDenied"));var k=window.location.hash;null!=k&&"#G"==k.substring(0,2)&&(k=k.substring(2),a+=' <a href="https://drive.google.com/open?id='+k+'" target="_blank">'+mxUtils.htmlEntities(mxResources.get("tryOpeningViaThisPage"))+"</a>")}else f.code==App.ERROR_TIMEOUT?a=mxUtils.htmlEntities(mxResources.get("timeout")):f.code==App.ERROR_BUSY?a=mxUtils.htmlEntities(mxResources.get("busy")):null!=f.message?a=mxUtils.htmlEntities(f.message):
-null!=f.response&&null!=f.response.error&&(a=mxUtils.htmlEntities(f.response.error));this.showError(b,a,e,d,h)}else null!=d&&d()};EditorUi.prototype.showError=function(a,b,d,e,n,g,r){a=new ErrorDialog(this,a,b,d,e,n,g,r);this.showDialog(a.container,340,150,!0,!1);a.init()};EditorUi.prototype.alert=function(a,b){var c=new ErrorDialog(this,null,a,mxResources.get("ok"),b);this.showDialog(c.container,340,100,!0,!1);c.init()};EditorUi.prototype.confirm=function(a,b,d,e,n){var c=null!=this.spinner&&null!=
-this.spinner.pause?this.spinner.pause():function(){};this.showDialog((new ConfirmDialog(this,a,function(){c();null!=b&&b()},function(){c();null!=d&&d()},e,n)).container,340,90,!0,!1)};EditorUi.prototype.setCurrentFile=function(a){this.currentFile=a};EditorUi.prototype.getCurrentFile=function(){return this.currentFile};EditorUi.prototype.isExportToCanvas=function(){return mxClient.IS_CHROMEAPP||!this.editor.graph.mathEnabled&&this.useCanvasForExport};EditorUi.prototype.createSvgDataUri=function(a){return"data:image/svg+xml;base64,"+
-btoa(unescape(encodeURIComponent(a)))};EditorUi.prototype.createImageDataUri=function(a,b,d){var c=a.toDataURL("image/"+d);if(6>=c.length||c==a.cloneNode(!1).toDataURL("image/"+d))throw{message:"Invalid image"};null!=b&&(c=this.writeGraphModelToPng(c,"zTXt","mxGraphModel",atob(this.editor.graph.compress(b))));return c};EditorUi.prototype.saveCanvas=function(a,b,d){var c="jpeg"==d?"jpg":d,f=this.getBaseFilename()+"."+c;a=this.createImageDataUri(a,b,d);this.saveData(f,c,a.substring(a.lastIndexOf(",")+
-1),"image/"+d,!0)};EditorUi.prototype.isLocalFileSave=function(){return"remote"!=urlParams.save&&(mxClient.IS_IE||"undefined"!==typeof window.Blob&&"undefined"!==typeof window.URL)&&9!=document.documentMode&&8!=document.documentMode&&7!=document.documentMode&&!mxClient.IS_QUIRKS||this.isOfflineApp()||mxClient.IS_IOS};EditorUi.prototype.doSaveLocalFile=function(a,b,d,e,n){if(window.Blob&&navigator.msSaveOrOpenBlob)a=e?this.base64ToBlob(a,d):new Blob([a],{type:d}),navigator.msSaveOrOpenBlob(a,b);else if(mxClient.IS_IE)d=
-window.open("about:blank","_blank"),null==d?mxUtils.popup(a,!0):(d.document.write(a),d.document.close(),d.document.execCommand("SaveAs",!0,b),d.close());else if(mxClient.IS_IOS)b=new TextareaDialog(this,b+":",a,null,null,mxResources.get("close")),b.textarea.style.width="600px",b.textarea.style.height="380px",this.showDialog(b.container,620,460,!0,!0),b.init(),document.execCommand("selectall",!1,null);else{var c=document.createElement("a"),f=!mxClient.IS_SF&&"undefined"!==typeof c.download;if(f||this.isOffline()){c.href=
-URL.createObjectURL(e?this.base64ToBlob(a,d):new Blob([a],{type:d}));f?c.download=b:c.setAttribute("target","_blank");document.body.appendChild(c);try{window.setTimeout(function(){URL.revokeObjectURL(c.href)},0),c.click(),c.parentNode.removeChild(c)}catch(k){}}else this.createEchoRequest(a,b,d,e,n).simulate(document,"_blank")}};EditorUi.prototype.createEchoRequest=function(a,b,d,e,n,g){a="xml="+encodeURIComponent(a);return new mxXmlRequest(SAVE_URL,a+(null!=d?"&mime="+d:"")+(null!=n?"&format="+n:
-"")+(null!=g?"&base64="+g:"")+(null!=b?"&filename="+encodeURIComponent(b):"")+(e?"&binary=1":""))};EditorUi.prototype.base64ToBlob=function(a,b){b=b||"";for(var c=atob(a),d=c.length,f=Math.ceil(d/1024),e=Array(f),g=0;g<f;++g){for(var k=1024*g,l=Math.min(k+1024,d),p=Array(l-k),q=0;k<l;++q,++k)p[q]=c[k].charCodeAt(0);e[g]=new Uint8Array(p)}return new Blob(e,{type:b})};EditorUi.prototype.saveLocalFile=function(a,b,d,e,n,g){g=null!=g?g:!1;var c="vsdx"!=n&&(!mxClient.IS_IOS||!navigator.standalone);n=this.getServiceCount(g);
-b=new CreateDialog(this,b,mxUtils.bind(this,function(c,b){try{if("_blank"==b)if(null==d||"image/"!=d.substring(0,6)||"image/svg"==d.substring(0,9)&&!mxClient.IS_SVG){var f=window.open("about:blank");null==f?mxUtils.popup(a,!0):(f.document.write(mxUtils.htmlEntities(a,!1)),f.document.close())}else this.openInNewWindow(a,d,e);else b==App.MODE_DEVICE?this.doSaveLocalFile(a,c,d,e):null!=c&&0<c.length&&this.pickFolder(b,mxUtils.bind(this,function(f){try{this.exportFile(a,c,d,e,b,f)}catch(w){this.handleError(w)}}))}catch(x){this.handleError(x)}}),
-mxUtils.bind(this,function(){this.hideDialog()}),mxResources.get("saveAs"),mxResources.get("download"),!1,g,c,null,null,4<n?3:4,a,d,e);this.showDialog(b.container,380,4<n?390:270,!0,!0);b.init()};EditorUi.prototype.openInNewWindow=function(a,b,d){if(mxClient.IS_GC||mxClient.IS_EDGE||11==document.documentMode||10==document.documentMode){var c=window.open("about:blank");null==c?mxUtils.popup(a,!0):(c.document.write('<html><img src="data:'+b+(d?";base64,"+a:";charset=utf8,"+encodeURIComponent(a))+'"/></html>'),
-c.document.close())}else c=window.open("data:"+b+(d?";base64,"+a:";charset=utf8,"+encodeURIComponent(a))),null==c&&mxUtils.popup(a,!0)};var b=EditorUi.prototype.addChromelessToolbarItems;EditorUi.prototype.addChromelessToolbarItems=function(a){if(this.isExportToCanvas()){this.exportDialog=null;var c=a(mxUtils.bind(this,function(a){var b=mxUtils.bind(this,function(){mxEvent.removeListener(this.editor.graph.container,"click",b);null!=this.exportDialog&&(this.exportDialog.parentNode.removeChild(this.exportDialog),
-this.exportDialog=null)});if(null!=this.exportDialog)b.apply(this);else{this.exportDialog=document.createElement("div");var d=c.getBoundingClientRect();mxUtils.setPrefixedStyle(this.exportDialog.style,"borderRadius","5px");this.exportDialog.style.position="fixed";this.exportDialog.style.textAlign="center";this.exportDialog.style.fontFamily="Helvetica,Arial";this.exportDialog.style.backgroundColor="#000000";this.exportDialog.style.width="50px";this.exportDialog.style.height="50px";this.exportDialog.style.padding=
-"4px 2px 4px 2px";this.exportDialog.style.color="#ffffff";mxUtils.setOpacity(this.exportDialog,70);this.exportDialog.style.left=d.left+"px";this.exportDialog.style.bottom=parseInt(this.chromelessToolbar.style.bottom)+this.chromelessToolbar.offsetHeight+4+"px";d=mxUtils.getCurrentStyle(this.editor.graph.container);this.exportDialog.style.zIndex=d.zIndex;var f=new Spinner({lines:8,length:6,width:5,radius:6,rotate:0,color:"#fff",speed:1.5,trail:60,shadow:!1,hwaccel:!1,top:"28px",zIndex:2E9});f.spin(this.exportDialog);
-this.exportToCanvas(mxUtils.bind(this,function(a){f.stop();this.exportDialog.style.width="auto";this.exportDialog.style.height="auto";this.exportDialog.style.padding="10px";var c=this.createImageDataUri(a,null,"png");a=document.createElement("img");a.style.maxWidth="140px";a.style.maxHeight="140px";a.style.cursor="pointer";a.setAttribute("title",mxResources.get("openInNewWindow"));a.setAttribute("border","0");a.setAttribute("src",c);this.exportDialog.appendChild(a);mxEvent.addListener(a,"click",mxUtils.bind(this,
-function(){this.openInNewWindow(c.substring(c.indexOf(",")+1),"image/png",!0);b.apply(this,arguments)}))}),null,this.thumbImageCache,null,mxUtils.bind(this,function(a){this.spinner.stop();this.handleError(a)}));mxEvent.addListener(this.editor.graph.container,"click",b);document.body.appendChild(this.exportDialog)}mxEvent.consume(a)}),Editor.cameraLargeImage,mxResources.get("export"))}b.apply(this,arguments)};EditorUi.prototype.saveData=function(a,b,d,e,n){this.isLocalFileSave()?this.saveLocalFile(d,
-a,e,n,b):this.saveRequest(a,b,mxUtils.bind(this,function(a,c){return this.createEchoRequest(d,a,e,n,b,c)}),d,n,e)};EditorUi.prototype.saveRequest=function(a,b,d,e,n,g){var c=!mxClient.IS_IOS||!navigator.standalone,f=this.getServiceCount(!1);a=new CreateDialog(this,a,mxUtils.bind(this,function(a,c){if("_blank"==c||null!=a&&0<a.length){var f=d("_blank"==c?null:a,c==App.MODE_DEVICE||null==c||"_blank"==c?"0":"1");null!=f&&(c==App.MODE_DEVICE||"_blank"==c?f.simulate(document,"_blank"):this.pickFolder(c,
-mxUtils.bind(this,function(d){g=null!=g?g:"pdf"==b?"application/pdf":"image/"+b;if(null!=e)try{this.exportFile(e,a,g,!0,c,d)}catch(D){this.handleError(D)}else this.spinner.spin(document.body,mxResources.get("saving"))&&f.send(mxUtils.bind(this,function(){this.spinner.stop();if(200<=f.getStatus()&&299>=f.getStatus())try{this.exportFile(f.getText(),a,g,!0,c,d)}catch(D){this.handleError(D)}else this.handleError({message:mxResources.get("errorSavingFile")})}),function(a){this.spinner.stop();this.handleError(a)})})))}}),
-mxUtils.bind(this,function(){this.hideDialog()}),mxResources.get("saveAs"),mxResources.get("download"),!1,!1,c,null,null,4<f?3:4,e,g,n);this.showDialog(a.container,380,4<f?390:270,!0,!0);a.init()};EditorUi.prototype.exportFile=function(a,b,d,e,n,g){};EditorUi.prototype.pickFolder=function(a,b,d){b(null)};EditorUi.prototype.exportSvg=function(a,b,d,e,n,g,r,k,l){if(this.spinner.spin(document.body,mxResources.get("export"))){var c=this.editor.graph.isSelectionEmpty();d=null!=d?d:c;c=b?null:this.editor.graph.background;
-c==mxConstants.NONE&&(c=null);null==c&&0==b&&(c="#ffffff");var f=this.editor.graph.getSvg(c,a,r,k,null,d);e&&this.editor.graph.addSvgShadow(f);var h=this.getBaseFilename()+".svg",m=mxUtils.bind(this,function(a){this.spinner.stop();n&&a.setAttribute("content",this.getFileData(!0,null,null,null,d,l));var c='<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">\n'+mxUtils.getXml(a);this.isLocalFileSave()||c.length<=MAX_REQUEST_SIZE?this.saveData(h,"svg",c,
-"image/svg+xml"):this.handleError({message:mxResources.get("drawingTooLarge")},mxResources.get("error"),mxUtils.bind(this,function(){mxUtils.popup(c)}))});this.convertMath(this.editor.graph,f,!1,mxUtils.bind(this,function(){g?(null==this.thumbImageCache&&(this.thumbImageCache={}),this.convertImages(f,m,this.thumbImageCache)):m(f)}))}};EditorUi.prototype.addCheckbox=function(a,b,d,e,n,g){g=null!=g?g:!0;var c=document.createElement("input");c.style.marginRight="8px";c.style.marginTop="16px";c.setAttribute("type",
-"checkbox");d&&(c.setAttribute("checked","checked"),c.defaultChecked=!0);e&&c.setAttribute("disabled","disabled");g&&(a.appendChild(c),mxUtils.write(a,b),n||mxUtils.br(a));return c};EditorUi.prototype.addEditButton=function(a,b){var c=this.addCheckbox(a,mxResources.get("edit")+":",!0,null,!0);c.style.marginLeft="24px";var d=this.getCurrentFile(),f="";null!=d&&d.getMode()!=App.MODE_DEVICE&&d.getMode()!=App.MODE_BROWSER&&(f=window.location.href);var e=document.createElement("select");e.style.width=
-"120px";e.style.marginLeft="8px";e.style.marginRight="10px";e.className="geBtn";d=document.createElement("option");d.setAttribute("value","blank");mxUtils.write(d,mxResources.get("makeCopy"));e.appendChild(d);d=document.createElement("option");d.setAttribute("value","custom");mxUtils.write(d,mxResources.get("custom")+"...");e.appendChild(d);a.appendChild(e);mxEvent.addListener(e,"change",mxUtils.bind(this,function(){if("custom"==e.value){var a=new FilenameDialog(this,f,mxResources.get("ok"),function(a){null!=
-a?f=a:e.value="blank"},mxResources.get("url"),null,null,null,null,function(){e.value="blank"});this.showDialog(a.container,300,80,!0,!1);a.init()}}));mxEvent.addListener(c,"change",mxUtils.bind(this,function(){c.checked&&(null==b||b.checked)?e.removeAttribute("disabled"):e.setAttribute("disabled","disabled")}));mxUtils.br(a);return{getLink:function(){return c.checked?"blank"===e.value?"_blank":f:null},getEditInput:function(){return c},getEditSelect:function(){return e}}};EditorUi.prototype.addLinkSection=
-function(a,b){function c(){g.innerHTML='<div style="width:100%;height:100%;box-sizing:border-box;'+(null!=e&&e!=mxConstants.NONE?"border:1px solid black;background-color:"+e:"background-position:center center;background-repeat:no-repeat;background-image:url('"+Dialog.prototype.closeImage+"')")+';"></div>'}mxUtils.write(a,mxResources.get("links")+":");var d=document.createElement("select");d.style.width="100px";d.style.marginLeft="8px";d.style.marginRight="10px";d.className="geBtn";var f=document.createElement("option");
-f.setAttribute("value","auto");mxUtils.write(f,mxResources.get("automatic"));d.appendChild(f);f=document.createElement("option");f.setAttribute("value","blank");mxUtils.write(f,mxResources.get("openInNewWindow"));d.appendChild(f);f=document.createElement("option");f.setAttribute("value","self");mxUtils.write(f,mxResources.get("openInThisWindow"));d.appendChild(f);b&&(f=document.createElement("option"),f.setAttribute("value","frame"),mxUtils.write(f,mxResources.get("openInThisWindow")+" ("+mxResources.get("iframe")+
-")"),d.appendChild(f));a.appendChild(d);mxUtils.write(a,mxResources.get("borderColor")+":");var e="#0000ff",g=null,g=mxUtils.button("",mxUtils.bind(this,function(a){this.pickColor(e||"none",function(a){e=a;c()});mxEvent.consume(a)}));c();g.style.padding=mxClient.IS_FF?"4px 2px 4px 2px":"4px";g.style.marginLeft="4px";g.style.height="22px";g.style.width="22px";g.style.position="relative";g.style.top=mxClient.IS_IE||mxClient.IS_IE11||mxClient.IS_EDGE?"6px":"1px";g.className="geColorBtn";a.appendChild(g);
-mxUtils.br(a);return{getColor:function(){return e},getTarget:function(){return d.value},focus:function(){d.focus()}}};EditorUi.prototype.createLink=function(a,b,d,e,n,g,l,k){var c=this.getCurrentFile(),f=[];e&&(f.push("lightbox=1"),"auto"!=a&&f.push("target="+a),null!=b&&b!=mxConstants.NONE&&f.push("highlight="+("#"==b.charAt(0)?b.substring(1):b)),null!=n&&0<n.length&&f.push("edit="+encodeURIComponent(n)),g&&f.push("layers=1"),this.editor.graph.foldingEnabled&&f.push("nav=1"));if(d&&null!=this.pages&&
-null!=this.currentPage)for(a=0;a<this.pages.length;a++)if(this.pages[a]==this.currentPage){0<a&&f.push("page="+a);break}a=!0;null!=l?d="#U"+encodeURIComponent(l):(c=this.getCurrentFile(),k||null==c||c.constructor!=window.DriveFile?d="#R"+encodeURIComponent(d?this.getFileData(!0,null,null,null,null,null,null,!0):this.editor.graph.compress(mxUtils.getXml(this.editor.getGraphXml()))):(d="#"+c.getHash(),a=!1));a&&null!=c&&null!=c.getTitle()&&c.getTitle()!=this.defaultFilename&&f.push("title="+encodeURIComponent(c.getTitle()));
-return(mxClient.IS_CHROMEAPP||EditorUi.isElectronApp?"https://www.draw.io/":"https://"+location.host+"/")+(0<f.length?"?"+f.join("&"):"")+d};EditorUi.prototype.createHtml=function(a,b,d,e,n,g,l,k,p,v,q){this.getBasenames();var c={};""!=n&&n!=mxConstants.NONE&&(c.highlight=n);"auto"!==e&&(c.target=e);p||(c.lightbox=!1);c.nav=this.editor.graph.foldingEnabled;d=parseInt(d);isNaN(d)||100==d||(c.zoom=d/100);d=[];l&&(d.push("pages"),c.resize=!0,null!=this.pages&&null!=this.currentPage&&(c.page=mxUtils.indexOf(this.pages,
-this.currentPage)));b&&(d.push("zoom"),c.resize=!0);k&&d.push("layers");0<d.length&&(p&&d.push("lightbox"),c.toolbar=d.join(" "));null!=v&&0<v.length&&(c.edit=v);null!=a?c.url=a:c.xml=this.getFileData(!0,null,null,null,null,!l);b='<div class="mxgraph" style="'+(g?"max-width:100%;":"")+(""!=d?"border:1px solid transparent;":"")+'" data-mxgraph="'+mxUtils.htmlEntities(JSON.stringify(c))+'"></div>';a=null!=a?"&fetch="+encodeURIComponent(a):"";q(b,'<script type="text/javascript" src="'+(0<a.length?("1"==
-urlParams.dev?"https://test.draw.io/embed2.js?dev=1":"https://www.draw.io/embed2.js?")+a:"1"==urlParams.dev?"https://test.draw.io/js/viewer.min.js":"https://www.draw.io/js/viewer.min.js")+'">\x3c/script>')};EditorUi.prototype.showHtmlDialog=function(a,b,d,e){var c=document.createElement("div");c.style.whiteSpace="nowrap";var f=document.createElement("h3");mxUtils.write(f,mxResources.get("html"));f.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:12px";c.appendChild(f);var h=
-document.createElement("div");h.style.cssText="border-bottom:1px solid lightGray;padding-bottom:8px;margin-bottom:12px;";var k=document.createElement("input");k.style.cssText="margin-right:8px;margin-top:8px;margin-bottom:8px;";k.setAttribute("value","url");k.setAttribute("type","radio");k.setAttribute("name","type-embedhtmldialog");f=k.cloneNode(!0);f.setAttribute("value","copy");h.appendChild(f);var m=document.createElement("span");mxUtils.write(m,mxResources.get("includeCopyOfMyDiagram"));h.appendChild(m);
-mxUtils.br(h);h.appendChild(k);m=document.createElement("span");mxUtils.write(m,mxResources.get("publicDiagramUrl"));h.appendChild(m);var g=this.getCurrentFile();null==d&&null!=g&&g.constructor==window.DriveFile&&(m=document.createElement("a"),m.style.paddingLeft="12px",m.style.color="gray",m.setAttribute("href","javascript:void(0);"),mxUtils.write(m,mxResources.get("share")),h.appendChild(m),mxEvent.addListener(m,"click",mxUtils.bind(this,function(){this.hideDialog();this.drive.showPermissions(g.getId())})));
-f.setAttribute("checked","checked");null==d&&k.setAttribute("disabled","disabled");c.appendChild(h);var l=this.addLinkSection(c),p=this.addCheckbox(c,mxResources.get("zoom"),!0,null,!0);mxUtils.write(c,":");var q=document.createElement("input");q.setAttribute("type","text");q.style.marginRight="16px";q.style.width="60px";q.style.marginLeft="4px";q.style.marginRight="12px";q.value="100%";c.appendChild(q);var B=this.addCheckbox(c,mxResources.get("fit"),!0),h=null!=this.pages&&1<this.pages.length,y=
-y=this.addCheckbox(c,mxResources.get("allPages"),h,!h),C=this.addCheckbox(c,mxResources.get("layers"),!0),A=this.addCheckbox(c,mxResources.get("lightbox"),!0),F=this.addEditButton(c,A),z=F.getEditInput();z.style.marginBottom="16px";mxEvent.addListener(A,"change",function(){A.checked?z.removeAttribute("disabled"):z.setAttribute("disabled","disabled");z.checked&&A.checked?F.getEditSelect().removeAttribute("disabled"):F.getEditSelect().setAttribute("disabled","disabled")});a=new CustomDialog(this,c,
-mxUtils.bind(this,function(){e(k.checked?d:null,p.checked,q.value,l.getTarget(),l.getColor(),B.checked,y.checked,C.checked,A.checked,F.getLink())}),null,a,b);this.showDialog(a.container,340,360,!0,!0);f.focus()};EditorUi.prototype.showPublishLinkDialog=function(a,b,d,e,g,l){var c=document.createElement("div");c.style.whiteSpace="nowrap";var f=document.createElement("h3");mxUtils.write(f,a||mxResources.get("link"));f.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:12px";c.appendChild(f);
-var h=this.getCurrentFile(),f="https://desk.draw.io/support/solutions/articles/16000051941";a=0;if(null!=h&&h.constructor==window.DriveFile&&!b){a=80;var f="https://desk.draw.io/support/solutions/articles/16000039384",m=document.createElement("div");m.style.cssText="border-bottom:1px solid lightGray;padding-bottom:14px;padding-top:6px;margin-bottom:14px;text-align:center;";var n=document.createElement("div");n.style.whiteSpace="normal";mxUtils.write(n,mxResources.get("linkAccountRequired"));m.appendChild(n);
-n=mxUtils.button(mxResources.get("share"),mxUtils.bind(this,function(){this.drive.showPermissions(h.getId())}));n.style.marginTop="12px";n.className="geBtn";m.appendChild(n);c.appendChild(m);n=document.createElement("a");n.style.paddingLeft="12px";n.style.color="gray";n.style.fontSize="11px";n.setAttribute("href","javascript:void(0);");mxUtils.write(n,mxResources.get("check"));m.appendChild(n);mxEvent.addListener(n,"click",mxUtils.bind(this,function(){this.spinner.spin(document.body,mxResources.get("loading"))&&
-this.getPublicUrl(this.getCurrentFile(),mxUtils.bind(this,function(a){this.spinner.stop();a=new ErrorDialog(this,null,mxResources.get(null!=a?"diagramIsPublic":"diagramIsNotPublic"),mxResources.get("ok"));this.showDialog(a.container,300,80,!0,!1);a.init()}))}))}var p=null,q=null;if(null!=d||null!=e)a+=30,mxUtils.write(c,mxResources.get("width")+":"),p=document.createElement("input"),p.setAttribute("type","text"),p.style.marginRight="16px",p.style.width="50px",p.style.marginLeft="6px",p.style.marginRight=
-"16px",p.style.marginBottom="10px",p.value="100%",c.appendChild(p),mxUtils.write(c,mxResources.get("height")+":"),q=document.createElement("input"),q.setAttribute("type","text"),q.style.width="50px",q.style.marginLeft="6px",q.style.marginBottom="10px",q.value=e+"px",c.appendChild(q),mxUtils.br(c);var u=this.addLinkSection(c,l);d=null!=this.pages&&1<this.pages.length;var y=null;if(null==h||h.constructor!=window.DriveFile||b)y=this.addCheckbox(c,mxResources.get("allPages"),d,!d);var C=this.addCheckbox(c,
-mxResources.get("lightbox"),!0),A=this.addEditButton(c,C),F=A.getEditInput(),z=this.addCheckbox(c,mxResources.get("layers"),!0);z.style.marginLeft=F.style.marginLeft;z.style.marginBottom="16px";z.style.marginTop="8px";mxEvent.addListener(C,"change",function(){C.checked?(z.removeAttribute("disabled"),F.removeAttribute("disabled")):(z.setAttribute("disabled","disabled"),F.setAttribute("disabled","disabled"));F.checked&&C.checked?A.getEditSelect().removeAttribute("disabled"):A.getEditSelect().setAttribute("disabled",
-"disabled")});b=new CustomDialog(this,c,mxUtils.bind(this,function(){g(u.getTarget(),u.getColor(),null==y?!0:y.checked,C.checked,A.getLink(),z.checked,null!=p?p.value:null,null!=q?q.value:null)}),null,mxResources.get("create"),f);this.showDialog(b.container,340,246+a,!0,!0);null!=p?(p.focus(),mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode||mxClient.IS_QUIRKS?p.select():document.execCommand("selectAll",!1,null)):u.focus()};EditorUi.prototype.showRemoteExportDialog=function(a,b,d,e){var c=
-document.createElement("div");c.style.whiteSpace="nowrap";var f=document.createElement("h3");mxUtils.write(f,mxResources.get("image"));f.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:4px";c.appendChild(f);var h=this.addCheckbox(c,mxResources.get("selectionOnly"),!1,this.editor.graph.isSelectionEmpty()),k=e?null:this.addCheckbox(c,mxResources.get("includeCopyOfMyDiagram"),!0);null!=k&&(k.style.marginBottom="16px");a=new CustomDialog(this,c,mxUtils.bind(this,function(){d(!h.checked,
-null!=k?k.checked:!1)}),null,a,b);this.showDialog(a.container,300,e?100:146,!0,!0)};EditorUi.prototype.showExportDialog=function(a,b,d,e,g,l,p,k){p=null!=p?p:!0;var c=document.createElement("div");c.style.whiteSpace="nowrap";var f=this.editor.graph,h="jpeg"==k?170:280,m=document.createElement("h3");mxUtils.write(m,a);m.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:10px";c.appendChild(m);mxUtils.write(c,mxResources.get("zoom")+":");var n=document.createElement("input");n.setAttribute("type",
-"text");n.style.marginRight="16px";n.style.width="60px";n.style.marginLeft="4px";n.style.marginRight="12px";n.value=this.lastExportZoom||"100%";c.appendChild(n);mxUtils.write(c,mxResources.get("borderWidth")+":");var r=document.createElement("input");r.setAttribute("type","text");r.style.marginRight="16px";r.style.width="60px";r.style.marginLeft="4px";r.value=this.lastExportBorder||"0";c.appendChild(r);mxUtils.br(c);var q=this.addCheckbox(c,mxResources.get("transparentBackground"),f.background==mxConstants.NONE||
-null==f.background,null,null,"jpeg"!=k),u=this.addCheckbox(c,mxResources.get("selectionOnly"),!1,f.isSelectionEmpty()),A=document.createElement("input");A.style.marginTop="16px";A.style.marginRight="8px";A.style.marginLeft="24px";A.setAttribute("disabled","disabled");A.setAttribute("type","checkbox");l&&(c.appendChild(A),mxUtils.write(c,mxResources.get("crop")),mxUtils.br(c),h+=26,mxEvent.addListener(u,"change",function(){u.checked?A.removeAttribute("disabled"):A.setAttribute("disabled","disabled")}));
-f.isSelectionEmpty()||(A.setAttribute("checked","checked"),A.defaultChecked=!0);var F=this.addCheckbox(c,mxResources.get("shadow"),f.shadowVisible),z=document.createElement("input");z.style.marginTop="16px";z.style.marginRight="8px";z.setAttribute("type","checkbox");!this.isOffline()&&this.canvasSupported||z.setAttribute("disabled","disabled");b&&(c.appendChild(z),mxUtils.write(c,mxResources.get("embedImages")),mxUtils.br(c),h+=26);var J=this.addCheckbox(c,mxResources.get("includeCopyOfMyDiagram"),
-p,null,null,"jpeg"!=k),I=null!=this.pages&&1<this.pages.length,H=this.addCheckbox(c,I?mxResources.get("allPages"):"",I,!I,null,"jpeg"!=k);H.style.marginLeft="24px";H.style.marginBottom="16px";I||(H.style.visibility="hidden");mxEvent.addListener(J,"change",function(){J.checked&&I?H.removeAttribute("disabled"):H.setAttribute("disabled","disabled")});p&&I||H.setAttribute("disabled","disabled");a=new CustomDialog(this,c,mxUtils.bind(this,function(){this.lastExportBorder=r.value;this.lastExportZoom=n.value;
-g(n.value,q.checked,!u.checked,F.checked,J.checked,z.checked,r.value,A.checked,!H.checked)}),null,d,e);this.showDialog(a.container,320,h,!0,!0);n.focus();mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode||mxClient.IS_QUIRKS?n.select():document.execCommand("selectAll",!1,null)};EditorUi.prototype.showEmbedImageDialog=function(a,b,d,e,n){var c=document.createElement("div");c.style.whiteSpace="nowrap";var f=this.editor.graph;if(null!=b){var h=document.createElement("h3");mxUtils.write(h,b);h.style.cssText=
-"width:100%;text-align:center;margin-top:0px;margin-bottom:4px";c.appendChild(h)}var m=this.addCheckbox(c,mxResources.get("fit"),!0),g=this.addCheckbox(c,mxResources.get("shadow"),f.shadowVisible&&e,!e),l=this.addCheckbox(c,d),p=this.addCheckbox(c,mxResources.get("lightbox"),!0),q=this.addEditButton(c,p),B=q.getEditInput(),y=1<f.model.getChildCount(f.model.getRoot()),C=this.addCheckbox(c,mxResources.get("layers"),y,!y);C.style.marginLeft=B.style.marginLeft;C.style.marginBottom="12px";C.style.marginTop=
-"8px";mxEvent.addListener(p,"change",function(){p.checked?(y&&C.removeAttribute("disabled"),B.removeAttribute("disabled")):(C.setAttribute("disabled","disabled"),B.setAttribute("disabled","disabled"));B.checked&&p.checked?q.getEditSelect().removeAttribute("disabled"):q.getEditSelect().setAttribute("disabled","disabled")});b=new CustomDialog(this,c,mxUtils.bind(this,function(){a(m.checked,g.checked,l.checked,p.checked,q.getLink(),C.checked)}),null,mxResources.get("embed"),n);this.showDialog(b.container,
-280,280,!0,!0)};EditorUi.prototype.createEmbedImage=function(a,b,d,e,g,l,p,k){function c(c){var b=" ",h="";e&&(b=" onclick=\"(function(img){if(img.wnd!=null&&!img.wnd.closed){img.wnd.focus();}else{var r=function(evt){if(evt.data=='ready'&&evt.source==img.wnd){img.wnd.postMessage(decodeURIComponent(img.getAttribute('src')),'*');window.removeEventListener('message',r);}};window.addEventListener('message',r);img.wnd=window.open('https://www.draw.io/?client=1&lightbox=1"+(g?"&edit=_blank":"")+(l?"&layers=1":
-"")+"');}})(this);\"",h+="cursor:pointer;");a&&(h+="max-width:100%;");var k="";d&&(k=' width="'+Math.round(f.width)+'" height="'+Math.round(f.height)+'"');p('<img src="'+c+'"'+k+(""!=h?' style="'+h+'"':"")+b+"/>")}var f=this.editor.graph.getGraphBounds();if(this.isExportToCanvas())this.exportToCanvas(mxUtils.bind(this,function(a){var b=e?this.getFileData(!0):null;a=this.createImageDataUri(a,b,"png");c(a)}),null,null,null,mxUtils.bind(this,function(a){k({message:mxResources.get("unknownError")})}),
-null,!0,d?2:1,null,b);else if(b=this.getFileData(!0),f.width*f.height<=MAX_AREA&&b.length<=MAX_REQUEST_SIZE){var h="";d&&(h="&w="+Math.round(2*f.width)+"&h="+Math.round(2*f.height));var m=new mxXmlRequest(EXPORT_URL,"format=png&base64=1&embedXml="+(e?"1":"0")+h+"&xml="+encodeURIComponent(b));m.send(mxUtils.bind(this,function(){200<=m.getStatus()&&299>=m.getStatus()?c("data:image/png;base64,"+m.getText()):k({message:mxResources.get("unknownError")})}))}else k({message:mxResources.get("drawingTooLarge")})};
-EditorUi.prototype.createEmbedSvg=function(a,b,d,e,g,l,p){var c=this.editor.graph.getSvg(),f=c.getElementsByTagName("a");if(null!=f)for(var h=0;h<f.length;h++){var m=f[h].getAttribute("href");null!=m&&"#"==m.charAt(0)&&"_blank"==f[h].getAttribute("target")&&f[h].removeAttribute("target")}e&&c.setAttribute("content",this.getFileData(!0));b&&this.editor.graph.addSvgShadow(c);if(d){var n=" ",r="";e&&(n="onclick=\"(function(img){if(img.wnd!=null&&!img.wnd.closed){img.wnd.focus();}else{var r=function(evt){if(evt.data=='ready'&&evt.source==img.wnd){img.wnd.postMessage(decodeURIComponent(img.getAttribute('src')),'*');window.removeEventListener('message',r);}};window.addEventListener('message',r);img.wnd=window.open('https://www.draw.io/?client=1&lightbox=1"+
-(g?"&edit=_blank":"")+(l?"&layers=1":"")+"');}})(this);\"",r+="cursor:pointer;");a&&(r+="max-width:100%;");this.convertImages(c,mxUtils.bind(this,function(a){p('<img src="'+this.createSvgDataUri(mxUtils.getXml(a))+'"'+(""!=r?' style="'+r+'"':"")+n+"/>")}))}else r="",e&&(c.setAttribute("onclick","(function(svg){var src=window.event.target||window.event.srcElement;while (src!=null&&src.nodeName.toLowerCase()!='a'){src=src.parentNode;}if(src==null){if(svg.wnd!=null&&!svg.wnd.closed){svg.wnd.focus();}else{var r=function(evt){if(evt.data=='ready'&&evt.source==svg.wnd){svg.wnd.postMessage(decodeURIComponent(svg.getAttribute('content')),'*');window.removeEventListener('message',r);}};window.addEventListener('message',r);svg.wnd=window.open('https://www.draw.io/?client=1&lightbox=1"+
-(g?"&edit=_blank":"")+(l?"&layers=1":"")+"');}}})(this);"),r+="cursor:pointer;"),a&&(a=parseInt(c.getAttribute("width")),b=parseInt(c.getAttribute("height")),c.setAttribute("viewBox","0 0 "+a+" "+b),r+="max-width:100%;max-height:"+b+"px;",c.removeAttribute("height")),""!=r&&c.setAttribute("style",r),p(mxUtils.getXml(c))};EditorUi.prototype.timeSince=function(a){a=Math.floor((new Date-a)/1E3);var c=Math.floor(a/31536E3);if(1<c)return c+" "+mxResources.get("years");c=Math.floor(a/2592E3);if(1<c)return c+
+(this.editor.graph.selectUnlockedLayer(),this.showLayersDialog(),this.restoreLibraries(),window.self!==window.top&&window.focus()):this.editor.graph.lightbox&&this.lightboxFit();this.chromelessResize&&this.chromelessResize();this.editor.fireEvent(new mxEventObject("fileLoaded"));c=!0;if(EditorUi.enableLogging&&!this.isOffline()&&null!=a.getMode())try{"function"===typeof window.ga&&ga("send","event","File","open",a.getMode())}catch(m){}if(this.mode==a.getMode()&&a.getMode()!=App.MODE_DEVICE&&null!=
+a.getMode())try{this.addRecent({id:a.getHash(),title:a.getTitle(),mode:a.getMode()})}catch(m){}try{mxSettings.setOpenCounter(mxSettings.getOpenCounter()+1),mxSettings.save()}catch(m){}}catch(m){null!=window.console&&console.log("error in fileLoaded:",a,m);if(EditorUi.enableLogging&&!this.isOffline())try{(new Image).src=(null!=window.DRAWIO_LOG_URL?window.DRAWIO_LOG_URL:"")+"/log?v="+encodeURIComponent(EditorUi.VERSION)+"&msg=errorInFileLoaded:url:"+encodeURIComponent(window.location.href)+(null!=
+m&&null!=m.message?":err:"+encodeURIComponent(m.message):"")+(null!=m&&null!=m.stack?"&stack="+encodeURIComponent(m.stack):"")}catch(u){}this.handleError(m,mxResources.get("errorLoadingFile"),mxUtils.bind(this,function(){null!=urlParams.url&&this.spinner.spin(document.body,mxResources.get("reconnecting"))?window.location.search=this.getSearch(["url"]):null!=b?b.constructor==DriveFile?this.loadFile(b.getHash()):this.fileLoaded(b):d()}))}else d();return c};EditorUi.prototype.restoreLibraries=function(){};
+EditorUi.prototype.saveLibrary=function(a,b,d,e,m,h,r){};EditorUi.prototype.isScratchpadEnabled=function(){return isLocalStorage||mxClient.IS_CHROMEAPP};EditorUi.prototype.toggleScratchpad=function(){this.isScratchpadEnabled()&&(null==this.scratchpad?this.getLocalData(".scratchpad",mxUtils.bind(this,function(a){null==a&&(a=this.emptyLibraryXml);this.loadLibrary(new StorageLibrary(this,a,".scratchpad"))})):this.closeLibrary(this.scratchpad))};EditorUi.prototype.createLibraryDataFromImages=function(a){var c=
+mxUtils.createXmlDocument(),b=c.createElement("mxlibrary");mxUtils.setTextContent(b,JSON.stringify(a));c.appendChild(b);return mxUtils.getXml(c)};EditorUi.prototype.closeLibrary=function(a){null!=a&&(this.removeLibrarySidebar(a.getHash()),a.constructor!=LocalLibrary&&mxSettings.removeCustomLibrary(a.getHash()),".scratchpad"==a.title&&(this.scratchpad=null))};EditorUi.prototype.removeLibrarySidebar=function(a){var c=this.sidebar.palettes[a];if(null!=c){for(var b=0;b<c.length;b++)c[b].parentNode.removeChild(c[b]);
+delete this.sidebar.palettes[a]}};EditorUi.prototype.repositionLibrary=function(a){var c=this.sidebar.container;if(null==a){var b=this.sidebar.palettes["L.scratchpad"];null==b&&(b=this.sidebar.palettes.search);null!=b&&(a=b[b.length-1].nextSibling)}a=null!=a?a:c.firstChild.nextSibling.nextSibling;var b=c.lastChild,d=b.previousSibling;c.insertBefore(b,a);c.insertBefore(d,b)};EditorUi.prototype.loadLibrary=function(a){var c=mxUtils.parseXml(a.getData());if("mxlibrary"==c.documentElement.nodeName){var b=
+JSON.parse(mxUtils.getTextContent(c.documentElement));this.libraryLoaded(a,b,c.documentElement.getAttribute("title"))}else throw{message:mxResources.get("notALibraryFile")};};EditorUi.prototype.getLibraryStorageHint=function(a){return""};EditorUi.prototype.libraryLoaded=function(a,b,d){a.constructor!=LocalLibrary&&mxSettings.addCustomLibrary(a.getHash());".scratchpad"==a.title&&(this.scratchpad=a);var c=this.sidebar.palettes[a.getHash()],c=null!=c?c[c.length-1].nextSibling:null;this.removeLibrarySidebar(a.getHash());
+var f=null,e=mxUtils.bind(this,function(c,b){if(0==c.length&&a.isEditable())null==f&&(f=document.createElement("div"),mxUtils.setPrefixedStyle(f.style,"borderRadius","6px"),f.style.border="3px dotted lightGray",f.style.textAlign="center",f.style.padding="8px",f.style.color="#B3B3B3",mxUtils.write(f,mxResources.get("dragElementsHere"))),b.appendChild(f);else for(var d=0;d<c.length;d++){var e=c[d],g=e.data;if(null!=g){var g=this.convertDataUri(g),k="shape=image;verticalLabelPosition=bottom;verticalAlign=top;imageAspect=0;";
+"fixed"==e.aspect&&(k+="aspect=fixed;");b.appendChild(this.sidebar.createVertexTemplate(k+"image="+g,e.w,e.h,"",e.title||"",!1,!1,!1))}else null!=e.xml&&(g=this.stringToCells(this.editor.graph.decompress(e.xml)),0<g.length&&b.appendChild(this.sidebar.createVertexTemplateFromCells(g,e.w,e.h,e.title||"",!0,!1,!1)))}});d=null!=d&&0<d.length?d:a.getTitle();var g=this.sidebar.addPalette(a.getHash(),d,!0,mxUtils.bind(this,function(a){e(b,a)}));this.repositionLibrary(c);var k=g.parentNode.previousSibling;
+d=k.getAttribute("title");null!=d&&0<d.length&&".scratchpad"!=a.title&&k.setAttribute("title",this.getLibraryStorageHint(a)+"\n"+d);var h=document.createElement("div");h.style.position="absolute";h.style.right="0px";h.style.top="5px";mxClient.IS_QUIRKS||8==document.documentMode||(h.style.backgroundColor="inherit");k.style.position="relative";var t=document.createElement("img");t.setAttribute("src",Dialog.prototype.closeImage);t.setAttribute("title",mxResources.get("close"));t.setAttribute("align",
+"top");t.setAttribute("border","0");t.className="geButton";t.style.marginRight="1px";t.style.marginTop="-1px";h.appendChild(t);var l=null;mxEvent.addListener(t,"click",mxUtils.bind(this,function(c){if(!mxEvent.isConsumed(c)){var b=mxUtils.bind(this,function(){this.closeLibrary(a)});null!=l?this.confirm(mxResources.get("allChangesLost"),null,b,mxResources.get("cancel"),mxResources.get("discardChanges")):b();mxEvent.consume(c)}}));mxEvent.addListener(g,"mousemove",mxUtils.bind(this,function(a){mxEvent.getSource(a)==
+g?g.setAttribute("title",mxResources.get("libraryTooltip")):g.removeAttribute("title")}));if(a.isEditable()){var n=this.editor.graph,q=mxUtils.bind(this,function(c){this.showLibraryDialog(a.getTitle(),g,b,a,a.getMode());mxEvent.consume(c)}),A=mxUtils.bind(this,function(c){a.setModified(!0);a.isAutosave()?(null!=B&&null!=B.parentNode&&B.parentNode.removeChild(B),B=t.cloneNode(!1),B.setAttribute("src",Editor.spinImage),B.setAttribute("title",mxResources.get("saving")),B.style.cursor="default",B.style.marginRight=
+"2px",B.style.marginTop="-2px",h.insertBefore(B,h.firstChild),k.style.paddingRight=18*h.childNodes.length+"px",this.saveLibrary(a.getTitle(),b,a,a.getMode(),!0,!0,function(){null!=B&&null!=B.parentNode&&(B.parentNode.removeChild(B),k.style.paddingRight=18*h.childNodes.length+"px")})):null==l&&(l=t.cloneNode(!1),l.setAttribute("src",IMAGE_PATH+"/download.png"),l.setAttribute("title",mxResources.get("save")),h.insertBefore(l,h.firstChild),mxEvent.addListener(l,"click",mxUtils.bind(this,function(c){this.saveLibrary(a.getTitle(),
+b,a,a.getMode(),a.constructor==LocalLibrary,!0,function(){null==l||a.isModified()||(k.style.paddingRight=18*h.childNodes.length+"px",l.parentNode.removeChild(l),l=null)});mxEvent.consume(c)})),k.style.paddingRight=18*h.childNodes.length+"px")}),z=mxUtils.bind(this,function(a,c,d,e){a=n.cloneCells(mxUtils.sortCells(n.model.getTopmostCells(a)));for(var k=0;k<a.length;k++){var p=n.getCellGeometry(a[k]);null!=p&&p.translate(-c.x,-c.y)}g.appendChild(this.sidebar.createVertexTemplateFromCells(a,c.width,
+c.height,e||"",!0,!1,!1));a={xml:this.editor.graph.compress(mxUtils.getXml(this.editor.graph.encodeCells(a))),w:c.width,h:c.height};null!=e&&(a.title=e);b.push(a);A(d);null!=f&&null!=f.parentNode&&0<b.length&&(f.parentNode.removeChild(f),f=null)}),C=mxUtils.bind(this,function(a){if(n.isSelectionEmpty())n.getRubberband().isActive()?(n.getRubberband().execute(a),n.getRubberband().reset()):this.showError(mxResources.get("error"),mxResources.get("nothingIsSelected"),mxResources.get("ok"));else{var c=
+n.getSelectionCells(),b=n.view.getBounds(c),d=n.view.scale;b.x/=d;b.y/=d;b.width/=d;b.height/=d;b.x-=n.view.translate.x;b.y-=n.view.translate.y;z(c,b)}mxEvent.consume(a)});g.style.border="3px solid transparent";mxEvent.addGestureListeners(g,function(){},mxUtils.bind(this,function(a){n.isMouseDown&&null!=n.panningManager&&null!=n.graphHandler.shape&&(n.graphHandler.shape.node.style.visibility="hidden",null!=f?f.style.border="3px dotted rgb(254, 137, 12)":g.style.border="3px dotted rgb(254, 137, 12)",
+g.style.cursor="copy",n.panningManager.stop(),n.autoScroll=!1,null!=n.graphHandler.guide&&n.graphHandler.guide.setVisible(!1),null!=n.graphHandler.hint&&(n.graphHandler.hint.style.visibility="hidden"),mxEvent.consume(a))}),mxUtils.bind(this,function(a){n.isMouseDown&&null!=n.panningManager&&null!=n.graphHandler&&(g.style.border="3px solid transparent",null!=f&&(f.style.border="3px dotted lightGray"),g.style.cursor="default",this.sidebar.showTooltips=!0,n.panningManager.stop(),n.graphHandler.reset(),
+n.isMouseDown=!1,n.autoScroll=!0,C(a),mxEvent.consume(a))}));mxEvent.addListener(g,"mouseleave",mxUtils.bind(this,function(a){n.isMouseDown&&null!=n.graphHandler.shape&&(n.graphHandler.shape.node.style.visibility="visible",g.style.border="3px solid transparent",g.style.cursor="",n.autoScroll=!0,null!=n.graphHandler.guide&&n.graphHandler.guide.setVisible(!0),null!=n.graphHandler.hint&&(n.graphHandler.hint.style.visibility="visible"),null!=f&&(f.style.border="3px dotted lightGray"))}));Graph.fileSupport&&
+(mxEvent.addListener(g,"dragover",mxUtils.bind(this,function(a){null!=f?f.style.border="3px dotted rgb(254, 137, 12)":g.style.border="3px dotted rgb(254, 137, 12)";a.dataTransfer.dropEffect="copy";g.style.cursor="copy";this.sidebar.hideTooltip();a.stopPropagation();a.preventDefault()})),mxEvent.addListener(g,"drop",mxUtils.bind(this,function(a){g.style.border="3px solid transparent";g.style.cursor="";null!=f&&(f.style.border="3px dotted lightGray");0<a.dataTransfer.files.length&&this.importFiles(a.dataTransfer.files,
+0,0,this.maxImageSize,mxUtils.bind(this,function(c,d,k,p,m,h,t,r,l){if(null!=c&&"image/"==d.substring(0,6))c="shape=image;verticalLabelPosition=bottom;verticalAlign=top;aspect=fixed;image="+this.convertDataUri(c),c=[new mxCell("",new mxGeometry(0,0,m,h),c)],c[0].vertex=!0,z(c,new mxRectangle(0,0,m,h),a,mxEvent.isAltDown(a)?null:t.substring(0,t.lastIndexOf(".")).replace(/_/g," ")),null!=f&&null!=f.parentNode&&0<b.length&&(f.parentNode.removeChild(f),f=null);else{var n=!1,u=mxUtils.bind(this,function(c,
+d){if(null!=c&&"text/xml"==d){var k=mxUtils.parseXml(c);if("mxlibrary"==k.documentElement.nodeName)try{var p=JSON.parse(mxUtils.getTextContent(k.documentElement));e(p,g);b=b.concat(p);A(a);this.spinner.stop();n=!0}catch(W){}else if("mxfile"==k.documentElement.nodeName)try{for(var m=k.documentElement.getElementsByTagName("diagram"),k=0;k<m.length;k++){var p=mxUtils.getTextContent(m[k]),h=this.stringToCells(this.editor.graph.decompress(p)),t=this.editor.graph.getBoundingBoxFromGeometry(h);z(h,new mxRectangle(0,
+0,t.width,t.height),a)}n=!0}catch(W){null!=window.console&&console.log("error in drop handler:",W)}}n||(this.spinner.stop(),this.handleError({message:mxResources.get("errorLoadingFile")}));null!=f&&null!=f.parentNode&&0<b.length&&(f.parentNode.removeChild(f),f=null)});!this.isOffline()&&(new XMLHttpRequest).upload&&this.isRemoteFileFormat(c,t)&&null!=l?this.parseFile(l,mxUtils.bind(this,function(a){4==a.readyState&&(this.spinner.stop(),200<=a.status&&299>=a.status?u(a.responseText,"text/xml"):this.handleError({message:mxResources.get(413==
+a.status?"drawingTooLarge":"invalidOrMissingFile")},mxResources.get("errorLoadingFile")))})):u(c,d)}}));a.stopPropagation();a.preventDefault()})),mxEvent.addListener(g,"dragleave",function(a){null!=f?f.style.border="3px dotted lightGray":(g.style.border="3px solid transparent",g.style.cursor="");a.stopPropagation();a.preventDefault()}));t=t.cloneNode(!1);t.setAttribute("src",IMAGE_PATH+"/edit.gif");t.setAttribute("title",mxResources.get("edit"));h.insertBefore(t,h.firstChild);mxEvent.addListener(t,
+"click",q);mxEvent.addListener(g,"dblclick",function(a){mxEvent.getSource(a)==g&&q(a)});t=t.cloneNode(!1);t.setAttribute("src",Editor.plusImage);t.setAttribute("title",mxResources.get("add"));h.insertBefore(t,h.firstChild);this.isOffline()||".scratchpad"!=a.title||(d=document.createElement("span"),d.setAttribute("title",mxResources.get("help")),d.style.cssText="color:gray;text-decoration:none;",d.className="geButton",mxUtils.write(d,"?"),mxEvent.addGestureListeners(d,mxUtils.bind(this,function(a){window.open("https://desk.draw.io/support/solutions/articles/16000042367");
+mxEvent.consume(a)})),h.insertBefore(d,h.firstChild));var B=null;mxEvent.addListener(t,"click",C)}k.appendChild(h);k.style.paddingRight=18*h.childNodes.length+"px"};"1"==urlParams.offline?EditorUi.prototype.footerHeight=4:("atlas"==uiTheme?("undefined"!==typeof Toolbar&&(Toolbar.prototype.unselectedBackground=mxClient.IS_QUIRKS?"none":"linear-gradient(rgb(255, 255, 255) 0px, rgb(242, 242, 242) 100%)",Toolbar.prototype.selectedBackground="rgb(242, 242, 242)"),Editor.prototype.initialTopSpacing=3,EditorUi.prototype.menubarHeight=
+41,EditorUi.prototype.toolbarHeight=38,EditorUi.prototype.hsplitPosition=188,Sidebar.prototype.thumbWidth=46,Sidebar.prototype.thumbHeight=46,Sidebar.prototype.thumbPadding=5<=document.documentMode?0:1,Sidebar.prototype.thumbBorder=2):"1"==urlParams.savesidebar&&(Sidebar.prototype.thumbWidth=64,Sidebar.prototype.thumbHeight=64),EditorUi.prototype.footerHeight=760<=screen.width&&240<=screen.height?46:0,EditorUi.prototype.createFooter=function(){var a=document.getElementById("geFooter");if(null!=a){a.style.visibility=
+"visible";var b=document.createElement("img");b.setAttribute("border","0");b.setAttribute("src",Dialog.prototype.closeImage);b.setAttribute("title",mxResources.get("hide"));a.appendChild(b);mxClient.IS_QUIRKS&&(b.style.position="relative",b.style.styleFloat="right",b.style.top="-30px",b.style.left="164px",b.style.cursor="pointer");mxEvent.addListener(b,"click",mxUtils.bind(this,function(){this.hideFooter()}))}return a});EditorUi.prototype.hideFooter=function(){var a=document.getElementById("geFooter");
+null!=a&&(this.footerHeight=0,a.style.display="none",this.refresh())};EditorUi.prototype.showImageDialog=function(a,b,d,e,m){a=new ImageDialog(this,a,b,d,e,m);this.showDialog(a.container,Graph.fileSupport?440:360,Graph.fileSupport?200:90,!0,!0);a.init()};EditorUi.prototype.showBackgroundImageDialog=function(a){a=null!=a?a:mxUtils.bind(this,function(a){a=new ChangePageSetup(this,null,a);a.ignoreColor=!0;this.editor.graph.model.execute(a)});var c=new BackgroundImageDialog(this,mxUtils.bind(this,function(c){a(c)}));
+this.showDialog(c.container,360,200,!0,!0);c.init()};EditorUi.prototype.showLibraryDialog=function(a,b,d,e,m){a=new LibraryDialog(this,a,b,d,e,m);this.showDialog(a.container,620,440,!0,!1,mxUtils.bind(this,function(a){a&&null==this.getCurrentFile()&&"1"!=urlParams.embed&&this.showSplash()}));a.init()};EditorUi.prototype.createSidebarFooterContainer=function(){var a=this.createDiv("geSidebarContainer");a.style.position="absolute";a.style.overflow="hidden";a.style.borderWidth="3px";var b=document.createElement("a");
+b.setAttribute("href","javascript:void(0);");b.className="geTitle";b.style.height="100%";b.style.paddingTop="9px";mxUtils.write(b,mxResources.get("moreShapes")+"...");mxEvent.addListener(b,"click",mxUtils.bind(this,function(a){this.actions.get("shapes").funct();mxEvent.consume(a)}));a.appendChild(b);return a};EditorUi.prototype.handleError=function(a,b,d){var c=null!=this.spinner&&null!=this.spinner.pause?this.spinner.pause():function(){},f=null!=a&&null!=a.error?a.error:a;if(null!=f||null!=b){a=
+mxUtils.htmlEntities(mxResources.get("unknownError"));var e=mxResources.get("ok"),g=null;b=null!=b?b:mxResources.get("error");if(null!=f)if(null!=f.retry&&(e=mxResources.get("cancel"),g=function(){c();f.retry()}),"undefined"!=typeof gapi&&"undefined"!=typeof gapi.drive&&"undefined"!=typeof gapi.drive.realtime&&f.type==gapi.drive.realtime.ErrorType.FORBIDDEN)a=mxUtils.htmlEntities(mxResources.get("forbidden"));else if(404==f.code||404==f.status||"undefined"!=typeof gapi&&"undefined"!=typeof gapi.drive&&
+"undefined"!=typeof gapi.drive.realtime&&f.type==gapi.drive.realtime.ErrorType.NOT_FOUND){a=mxUtils.htmlEntities(mxResources.get("fileNotFoundOrDenied"));var k=window.location.hash;null!=k&&"#G"==k.substring(0,2)&&(k=k.substring(2),a+=' <a href="https://drive.google.com/open?id='+k+'" target="_blank">'+mxUtils.htmlEntities(mxResources.get("tryOpeningViaThisPage"))+"</a>")}else f.code==App.ERROR_TIMEOUT?a=mxUtils.htmlEntities(mxResources.get("timeout")):f.code==App.ERROR_BUSY?a=mxUtils.htmlEntities(mxResources.get("busy")):
+null!=f.message?a=mxUtils.htmlEntities(f.message):null!=f.response&&null!=f.response.error&&(a=mxUtils.htmlEntities(f.response.error));this.showError(b,a,e,d,g)}else null!=d&&d()};EditorUi.prototype.showError=function(a,b,d,e,m,h,r){a=new ErrorDialog(this,a,b,d,e,m,h,r);this.showDialog(a.container,340,150,!0,!1);a.init()};EditorUi.prototype.alert=function(a,b){var c=new ErrorDialog(this,null,a,mxResources.get("ok"),b);this.showDialog(c.container,340,100,!0,!1);c.init()};EditorUi.prototype.confirm=
+function(a,b,d,e,m){var c=null!=this.spinner&&null!=this.spinner.pause?this.spinner.pause():function(){};this.showDialog((new ConfirmDialog(this,a,function(){c();null!=b&&b()},function(){c();null!=d&&d()},e,m)).container,340,90,!0,!1)};EditorUi.prototype.setCurrentFile=function(a){this.currentFile=a};EditorUi.prototype.getCurrentFile=function(){return this.currentFile};EditorUi.prototype.isExportToCanvas=function(){return mxClient.IS_CHROMEAPP||!this.editor.graph.mathEnabled&&this.useCanvasForExport};
+EditorUi.prototype.createSvgDataUri=function(a){return"data:image/svg+xml;base64,"+btoa(unescape(encodeURIComponent(a)))};EditorUi.prototype.createImageDataUri=function(a,b,d){var c=a.toDataURL("image/"+d);if(6>=c.length||c==a.cloneNode(!1).toDataURL("image/"+d))throw{message:"Invalid image"};null!=b&&(c=this.writeGraphModelToPng(c,"zTXt","mxGraphModel",atob(this.editor.graph.compress(b))));return c};EditorUi.prototype.saveCanvas=function(a,b,d){var c="jpeg"==d?"jpg":d,f=this.getBaseFilename()+"."+
+c;a=this.createImageDataUri(a,b,d);this.saveData(f,c,a.substring(a.lastIndexOf(",")+1),"image/"+d,!0)};EditorUi.prototype.isLocalFileSave=function(){return"remote"!=urlParams.save&&(mxClient.IS_IE||"undefined"!==typeof window.Blob&&"undefined"!==typeof window.URL)&&9!=document.documentMode&&8!=document.documentMode&&7!=document.documentMode&&!mxClient.IS_QUIRKS||this.isOfflineApp()||mxClient.IS_IOS};EditorUi.prototype.doSaveLocalFile=function(a,b,d,e,m){if(window.Blob&&navigator.msSaveOrOpenBlob)a=
+e?this.base64ToBlob(a,d):new Blob([a],{type:d}),navigator.msSaveOrOpenBlob(a,b);else if(mxClient.IS_IE)d=window.open("about:blank","_blank"),null==d?mxUtils.popup(a,!0):(d.document.write(a),d.document.close(),d.document.execCommand("SaveAs",!0,b),d.close());else if(mxClient.IS_IOS)b=new TextareaDialog(this,b+":",a,null,null,mxResources.get("close")),b.textarea.style.width="600px",b.textarea.style.height="380px",this.showDialog(b.container,620,460,!0,!0),b.init(),document.execCommand("selectall",!1,
+null);else{var c=document.createElement("a"),f=!mxClient.IS_SF&&"undefined"!==typeof c.download;if(f||this.isOffline()){c.href=URL.createObjectURL(e?this.base64ToBlob(a,d):new Blob([a],{type:d}));f?c.download=b:c.setAttribute("target","_blank");document.body.appendChild(c);try{window.setTimeout(function(){URL.revokeObjectURL(c.href)},0),c.click(),c.parentNode.removeChild(c)}catch(k){}}else this.createEchoRequest(a,b,d,e,m).simulate(document,"_blank")}};EditorUi.prototype.createEchoRequest=function(a,
+b,d,e,m,h){a="xml="+encodeURIComponent(a);return new mxXmlRequest(SAVE_URL,a+(null!=d?"&mime="+d:"")+(null!=m?"&format="+m:"")+(null!=h?"&base64="+h:"")+(null!=b?"&filename="+encodeURIComponent(b):"")+(e?"&binary=1":""))};EditorUi.prototype.base64ToBlob=function(a,b){b=b||"";for(var c=atob(a),d=c.length,f=Math.ceil(d/1024),e=Array(f),h=0;h<f;++h){for(var k=1024*h,l=Math.min(k+1024,d),t=Array(l-k),n=0;k<l;++n,++k)t[n]=c[k].charCodeAt(0);e[h]=new Uint8Array(t)}return new Blob(e,{type:b})};EditorUi.prototype.saveLocalFile=
+function(a,b,d,e,m,h){h=null!=h?h:!1;var c="vsdx"!=m&&(!mxClient.IS_IOS||!navigator.standalone);m=this.getServiceCount(h);b=new CreateDialog(this,b,mxUtils.bind(this,function(c,b){try{if("_blank"==b)if(null==d||"image/"!=d.substring(0,6)||"image/svg"==d.substring(0,9)&&!mxClient.IS_SVG){var f=window.open("about:blank");null==f?mxUtils.popup(a,!0):(f.document.write(mxUtils.htmlEntities(a,!1)),f.document.close())}else this.openInNewWindow(a,d,e);else b==App.MODE_DEVICE?this.doSaveLocalFile(a,c,d,e):
+null!=c&&0<c.length&&this.pickFolder(b,mxUtils.bind(this,function(f){try{this.exportFile(a,c,d,e,b,f)}catch(w){this.handleError(w)}}))}catch(x){this.handleError(x)}}),mxUtils.bind(this,function(){this.hideDialog()}),mxResources.get("saveAs"),mxResources.get("download"),!1,h,c,null,null,4<m?3:4,a,d,e);this.showDialog(b.container,380,4<m?390:270,!0,!0);b.init()};EditorUi.prototype.openInNewWindow=function(a,b,d){if(mxClient.IS_GC||mxClient.IS_EDGE||11==document.documentMode||10==document.documentMode){var c=
+window.open("about:blank");null==c?mxUtils.popup(a,!0):(c.document.write('<html><img src="data:'+b+(d?";base64,"+a:";charset=utf8,"+encodeURIComponent(a))+'"/></html>'),c.document.close())}else c=window.open("data:"+b+(d?";base64,"+a:";charset=utf8,"+encodeURIComponent(a))),null==c&&mxUtils.popup(a,!0)};var b=EditorUi.prototype.addChromelessToolbarItems;EditorUi.prototype.addChromelessToolbarItems=function(a){if(this.isExportToCanvas()){this.exportDialog=null;var c=a(mxUtils.bind(this,function(a){var b=
+mxUtils.bind(this,function(){mxEvent.removeListener(this.editor.graph.container,"click",b);null!=this.exportDialog&&(this.exportDialog.parentNode.removeChild(this.exportDialog),this.exportDialog=null)});if(null!=this.exportDialog)b.apply(this);else{this.exportDialog=document.createElement("div");var d=c.getBoundingClientRect();mxUtils.setPrefixedStyle(this.exportDialog.style,"borderRadius","5px");this.exportDialog.style.position="fixed";this.exportDialog.style.textAlign="center";this.exportDialog.style.fontFamily=
+"Helvetica,Arial";this.exportDialog.style.backgroundColor="#000000";this.exportDialog.style.width="50px";this.exportDialog.style.height="50px";this.exportDialog.style.padding="4px 2px 4px 2px";this.exportDialog.style.color="#ffffff";mxUtils.setOpacity(this.exportDialog,70);this.exportDialog.style.left=d.left+"px";this.exportDialog.style.bottom=parseInt(this.chromelessToolbar.style.bottom)+this.chromelessToolbar.offsetHeight+4+"px";d=mxUtils.getCurrentStyle(this.editor.graph.container);this.exportDialog.style.zIndex=
+d.zIndex;var f=new Spinner({lines:8,length:6,width:5,radius:6,rotate:0,color:"#fff",speed:1.5,trail:60,shadow:!1,hwaccel:!1,top:"28px",zIndex:2E9});f.spin(this.exportDialog);this.exportToCanvas(mxUtils.bind(this,function(a){f.stop();this.exportDialog.style.width="auto";this.exportDialog.style.height="auto";this.exportDialog.style.padding="10px";var c=this.createImageDataUri(a,null,"png");a=document.createElement("img");a.style.maxWidth="140px";a.style.maxHeight="140px";a.style.cursor="pointer";a.setAttribute("title",
+mxResources.get("openInNewWindow"));a.setAttribute("border","0");a.setAttribute("src",c);this.exportDialog.appendChild(a);mxEvent.addListener(a,"click",mxUtils.bind(this,function(){this.openInNewWindow(c.substring(c.indexOf(",")+1),"image/png",!0);b.apply(this,arguments)}))}),null,this.thumbImageCache,null,mxUtils.bind(this,function(a){this.spinner.stop();this.handleError(a)}));mxEvent.addListener(this.editor.graph.container,"click",b);document.body.appendChild(this.exportDialog)}mxEvent.consume(a)}),
+Editor.cameraLargeImage,mxResources.get("export"))}b.apply(this,arguments)};EditorUi.prototype.saveData=function(a,b,d,e,m){this.isLocalFileSave()?this.saveLocalFile(d,a,e,m,b):this.saveRequest(a,b,mxUtils.bind(this,function(a,c){return this.createEchoRequest(d,a,e,m,b,c)}),d,m,e)};EditorUi.prototype.saveRequest=function(a,b,d,e,m,h){var c=!mxClient.IS_IOS||!navigator.standalone,f=this.getServiceCount(!1);a=new CreateDialog(this,a,mxUtils.bind(this,function(a,c){if("_blank"==c||null!=a&&0<a.length){var f=
+d("_blank"==c?null:a,c==App.MODE_DEVICE||null==c||"_blank"==c?"0":"1");null!=f&&(c==App.MODE_DEVICE||"_blank"==c?f.simulate(document,"_blank"):this.pickFolder(c,mxUtils.bind(this,function(d){h=null!=h?h:"pdf"==b?"application/pdf":"image/"+b;if(null!=e)try{this.exportFile(e,a,h,!0,c,d)}catch(D){this.handleError(D)}else this.spinner.spin(document.body,mxResources.get("saving"))&&f.send(mxUtils.bind(this,function(){this.spinner.stop();if(200<=f.getStatus()&&299>=f.getStatus())try{this.exportFile(f.getText(),
+a,h,!0,c,d)}catch(D){this.handleError(D)}else this.handleError({message:mxResources.get("errorSavingFile")})}),function(a){this.spinner.stop();this.handleError(a)})})))}}),mxUtils.bind(this,function(){this.hideDialog()}),mxResources.get("saveAs"),mxResources.get("download"),!1,!1,c,null,null,4<f?3:4,e,h,m);this.showDialog(a.container,380,4<f?390:270,!0,!0);a.init()};EditorUi.prototype.exportFile=function(a,b,d,e,m,h){};EditorUi.prototype.pickFolder=function(a,b,d){b(null)};EditorUi.prototype.exportSvg=
+function(a,b,d,e,m,h,l,k,n){if(this.spinner.spin(document.body,mxResources.get("export"))){var c=this.editor.graph.isSelectionEmpty();d=null!=d?d:c;c=b?null:this.editor.graph.background;c==mxConstants.NONE&&(c=null);null==c&&0==b&&(c="#ffffff");var f=this.editor.graph.getSvg(c,a,l,k,null,d);e&&this.editor.graph.addSvgShadow(f);var g=this.getBaseFilename()+".svg",p=mxUtils.bind(this,function(a){this.spinner.stop();m&&a.setAttribute("content",this.getFileData(!0,null,null,null,d,n));var c='<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">\n'+
+mxUtils.getXml(a);this.isLocalFileSave()||c.length<=MAX_REQUEST_SIZE?this.saveData(g,"svg",c,"image/svg+xml"):this.handleError({message:mxResources.get("drawingTooLarge")},mxResources.get("error"),mxUtils.bind(this,function(){mxUtils.popup(c)}))});this.convertMath(this.editor.graph,f,!1,mxUtils.bind(this,function(){h?(null==this.thumbImageCache&&(this.thumbImageCache={}),this.convertImages(f,p,this.thumbImageCache)):p(f)}))}};EditorUi.prototype.addCheckbox=function(a,b,d,e,m,h){h=null!=h?h:!0;var c=
+document.createElement("input");c.style.marginRight="8px";c.style.marginTop="16px";c.setAttribute("type","checkbox");d&&(c.setAttribute("checked","checked"),c.defaultChecked=!0);e&&c.setAttribute("disabled","disabled");h&&(a.appendChild(c),mxUtils.write(a,b),m||mxUtils.br(a));return c};EditorUi.prototype.addEditButton=function(a,b){var c=this.addCheckbox(a,mxResources.get("edit")+":",!0,null,!0);c.style.marginLeft="24px";var d=this.getCurrentFile(),f="";null!=d&&d.getMode()!=App.MODE_DEVICE&&d.getMode()!=
+App.MODE_BROWSER&&(f=window.location.href);var e=document.createElement("select");e.style.width="120px";e.style.marginLeft="8px";e.style.marginRight="10px";e.className="geBtn";d=document.createElement("option");d.setAttribute("value","blank");mxUtils.write(d,mxResources.get("makeCopy"));e.appendChild(d);d=document.createElement("option");d.setAttribute("value","custom");mxUtils.write(d,mxResources.get("custom")+"...");e.appendChild(d);a.appendChild(e);mxEvent.addListener(e,"change",mxUtils.bind(this,
+function(){if("custom"==e.value){var a=new FilenameDialog(this,f,mxResources.get("ok"),function(a){null!=a?f=a:e.value="blank"},mxResources.get("url"),null,null,null,null,function(){e.value="blank"});this.showDialog(a.container,300,80,!0,!1);a.init()}}));mxEvent.addListener(c,"change",mxUtils.bind(this,function(){c.checked&&(null==b||b.checked)?e.removeAttribute("disabled"):e.setAttribute("disabled","disabled")}));mxUtils.br(a);return{getLink:function(){return c.checked?"blank"===e.value?"_blank":
+f:null},getEditInput:function(){return c},getEditSelect:function(){return e}}};EditorUi.prototype.addLinkSection=function(a,b){function c(){h.innerHTML='<div style="width:100%;height:100%;box-sizing:border-box;'+(null!=e&&e!=mxConstants.NONE?"border:1px solid black;background-color:"+e:"background-position:center center;background-repeat:no-repeat;background-image:url('"+Dialog.prototype.closeImage+"')")+';"></div>'}mxUtils.write(a,mxResources.get("links")+":");var d=document.createElement("select");
+d.style.width="100px";d.style.marginLeft="8px";d.style.marginRight="10px";d.className="geBtn";var f=document.createElement("option");f.setAttribute("value","auto");mxUtils.write(f,mxResources.get("automatic"));d.appendChild(f);f=document.createElement("option");f.setAttribute("value","blank");mxUtils.write(f,mxResources.get("openInNewWindow"));d.appendChild(f);f=document.createElement("option");f.setAttribute("value","self");mxUtils.write(f,mxResources.get("openInThisWindow"));d.appendChild(f);b&&
+(f=document.createElement("option"),f.setAttribute("value","frame"),mxUtils.write(f,mxResources.get("openInThisWindow")+" ("+mxResources.get("iframe")+")"),d.appendChild(f));a.appendChild(d);mxUtils.write(a,mxResources.get("borderColor")+":");var e="#0000ff",h=null,h=mxUtils.button("",mxUtils.bind(this,function(a){this.pickColor(e||"none",function(a){e=a;c()});mxEvent.consume(a)}));c();h.style.padding=mxClient.IS_FF?"4px 2px 4px 2px":"4px";h.style.marginLeft="4px";h.style.height="22px";h.style.width=
+"22px";h.style.position="relative";h.style.top=mxClient.IS_IE||mxClient.IS_IE11||mxClient.IS_EDGE?"6px":"1px";h.className="geColorBtn";a.appendChild(h);mxUtils.br(a);return{getColor:function(){return e},getTarget:function(){return d.value},focus:function(){d.focus()}}};EditorUi.prototype.createLink=function(a,b,d,e,m,h,l,k){var c=this.getCurrentFile(),f=[];e&&(f.push("lightbox=1"),"auto"!=a&&f.push("target="+a),null!=b&&b!=mxConstants.NONE&&f.push("highlight="+("#"==b.charAt(0)?b.substring(1):b)),
+null!=m&&0<m.length&&f.push("edit="+encodeURIComponent(m)),h&&f.push("layers=1"),this.editor.graph.foldingEnabled&&f.push("nav=1"));if(d&&null!=this.pages&&null!=this.currentPage)for(a=0;a<this.pages.length;a++)if(this.pages[a]==this.currentPage){0<a&&f.push("page="+a);break}a=!0;null!=l?d="#U"+encodeURIComponent(l):(c=this.getCurrentFile(),k||null==c||c.constructor!=window.DriveFile?d="#R"+encodeURIComponent(d?this.getFileData(!0,null,null,null,null,null,null,!0):this.editor.graph.compress(mxUtils.getXml(this.editor.getGraphXml()))):
+(d="#"+c.getHash(),a=!1));a&&null!=c&&null!=c.getTitle()&&c.getTitle()!=this.defaultFilename&&f.push("title="+encodeURIComponent(c.getTitle()));return(mxClient.IS_CHROMEAPP||EditorUi.isElectronApp?"https://www.draw.io/":"https://"+location.host+"/")+(0<f.length?"?"+f.join("&"):"")+d};EditorUi.prototype.createHtml=function(a,b,d,e,m,h,l,k,n,t,q){this.getBasenames();var c={};""!=m&&m!=mxConstants.NONE&&(c.highlight=m);"auto"!==e&&(c.target=e);n||(c.lightbox=!1);c.nav=this.editor.graph.foldingEnabled;
+d=parseInt(d);isNaN(d)||100==d||(c.zoom=d/100);d=[];l&&(d.push("pages"),c.resize=!0,null!=this.pages&&null!=this.currentPage&&(c.page=mxUtils.indexOf(this.pages,this.currentPage)));b&&(d.push("zoom"),c.resize=!0);k&&d.push("layers");0<d.length&&(n&&d.push("lightbox"),c.toolbar=d.join(" "));null!=t&&0<t.length&&(c.edit=t);null!=a?c.url=a:c.xml=this.getFileData(!0,null,null,null,null,!l);b='<div class="mxgraph" style="'+(h?"max-width:100%;":"")+(""!=d?"border:1px solid transparent;":"")+'" data-mxgraph="'+
+mxUtils.htmlEntities(JSON.stringify(c))+'"></div>';a=null!=a?"&fetch="+encodeURIComponent(a):"";q(b,'<script type="text/javascript" src="'+(0<a.length?("1"==urlParams.dev?"https://test.draw.io/embed2.js?dev=1":"https://www.draw.io/embed2.js?")+a:"1"==urlParams.dev?"https://test.draw.io/js/viewer.min.js":"https://www.draw.io/js/viewer.min.js")+'">\x3c/script>')};EditorUi.prototype.showHtmlDialog=function(a,b,d,e){var c=document.createElement("div");c.style.whiteSpace="nowrap";var f=document.createElement("h3");
+mxUtils.write(f,mxResources.get("html"));f.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:12px";c.appendChild(f);var g=document.createElement("div");g.style.cssText="border-bottom:1px solid lightGray;padding-bottom:8px;margin-bottom:12px;";var k=document.createElement("input");k.style.cssText="margin-right:8px;margin-top:8px;margin-bottom:8px;";k.setAttribute("value","url");k.setAttribute("type","radio");k.setAttribute("name","type-embedhtmldialog");f=k.cloneNode(!0);f.setAttribute("value",
+"copy");g.appendChild(f);var p=document.createElement("span");mxUtils.write(p,mxResources.get("includeCopyOfMyDiagram"));g.appendChild(p);mxUtils.br(g);g.appendChild(k);p=document.createElement("span");mxUtils.write(p,mxResources.get("publicDiagramUrl"));g.appendChild(p);var h=this.getCurrentFile();null==d&&null!=h&&h.constructor==window.DriveFile&&(p=document.createElement("a"),p.style.paddingLeft="12px",p.style.color="gray",p.setAttribute("href","javascript:void(0);"),mxUtils.write(p,mxResources.get("share")),
+g.appendChild(p),mxEvent.addListener(p,"click",mxUtils.bind(this,function(){this.hideDialog();this.drive.showPermissions(h.getId())})));f.setAttribute("checked","checked");null==d&&k.setAttribute("disabled","disabled");c.appendChild(g);var l=this.addLinkSection(c),n=this.addCheckbox(c,mxResources.get("zoom"),!0,null,!0);mxUtils.write(c,":");var q=document.createElement("input");q.setAttribute("type","text");q.style.marginRight="16px";q.style.width="60px";q.style.marginLeft="4px";q.style.marginRight=
+"12px";q.value="100%";c.appendChild(q);var A=this.addCheckbox(c,mxResources.get("fit"),!0),g=null!=this.pages&&1<this.pages.length,z=z=this.addCheckbox(c,mxResources.get("allPages"),g,!g),C=this.addCheckbox(c,mxResources.get("layers"),!0),B=this.addCheckbox(c,mxResources.get("lightbox"),!0),E=this.addEditButton(c,B),y=E.getEditInput();y.style.marginBottom="16px";mxEvent.addListener(B,"change",function(){B.checked?y.removeAttribute("disabled"):y.setAttribute("disabled","disabled");y.checked&&B.checked?
+E.getEditSelect().removeAttribute("disabled"):E.getEditSelect().setAttribute("disabled","disabled")});a=new CustomDialog(this,c,mxUtils.bind(this,function(){e(k.checked?d:null,n.checked,q.value,l.getTarget(),l.getColor(),A.checked,z.checked,C.checked,B.checked,E.getLink())}),null,a,b);this.showDialog(a.container,340,360,!0,!0);f.focus()};EditorUi.prototype.showPublishLinkDialog=function(a,b,d,e,h,l){var c=document.createElement("div");c.style.whiteSpace="nowrap";var f=document.createElement("h3");
+mxUtils.write(f,a||mxResources.get("link"));f.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:12px";c.appendChild(f);var g=this.getCurrentFile(),f="https://desk.draw.io/support/solutions/articles/16000051941";a=0;if(null!=g&&g.constructor==window.DriveFile&&!b){a=80;var f="https://desk.draw.io/support/solutions/articles/16000039384",p=document.createElement("div");p.style.cssText="border-bottom:1px solid lightGray;padding-bottom:14px;padding-top:6px;margin-bottom:14px;text-align:center;";
+var m=document.createElement("div");m.style.whiteSpace="normal";mxUtils.write(m,mxResources.get("linkAccountRequired"));p.appendChild(m);m=mxUtils.button(mxResources.get("share"),mxUtils.bind(this,function(){this.drive.showPermissions(g.getId())}));m.style.marginTop="12px";m.className="geBtn";p.appendChild(m);c.appendChild(p);m=document.createElement("a");m.style.paddingLeft="12px";m.style.color="gray";m.style.fontSize="11px";m.setAttribute("href","javascript:void(0);");mxUtils.write(m,mxResources.get("check"));
+p.appendChild(m);mxEvent.addListener(m,"click",mxUtils.bind(this,function(){this.spinner.spin(document.body,mxResources.get("loading"))&&this.getPublicUrl(this.getCurrentFile(),mxUtils.bind(this,function(a){this.spinner.stop();a=new ErrorDialog(this,null,mxResources.get(null!=a?"diagramIsPublic":"diagramIsNotPublic"),mxResources.get("ok"));this.showDialog(a.container,300,80,!0,!1);a.init()}))}))}var n=null,u=null;if(null!=d||null!=e)a+=30,mxUtils.write(c,mxResources.get("width")+":"),n=document.createElement("input"),
+n.setAttribute("type","text"),n.style.marginRight="16px",n.style.width="50px",n.style.marginLeft="6px",n.style.marginRight="16px",n.style.marginBottom="10px",n.value="100%",c.appendChild(n),mxUtils.write(c,mxResources.get("height")+":"),u=document.createElement("input"),u.setAttribute("type","text"),u.style.width="50px",u.style.marginLeft="6px",u.style.marginBottom="10px",u.value=e+"px",c.appendChild(u),mxUtils.br(c);var q=this.addLinkSection(c,l);d=null!=this.pages&&1<this.pages.length;var z=null;
+if(null==g||g.constructor!=window.DriveFile||b)z=this.addCheckbox(c,mxResources.get("allPages"),d,!d);var C=this.addCheckbox(c,mxResources.get("lightbox"),!0),B=this.addEditButton(c,C),E=B.getEditInput(),y=this.addCheckbox(c,mxResources.get("layers"),!0);y.style.marginLeft=E.style.marginLeft;y.style.marginBottom="16px";y.style.marginTop="8px";mxEvent.addListener(C,"change",function(){C.checked?(y.removeAttribute("disabled"),E.removeAttribute("disabled")):(y.setAttribute("disabled","disabled"),E.setAttribute("disabled",
+"disabled"));E.checked&&C.checked?B.getEditSelect().removeAttribute("disabled"):B.getEditSelect().setAttribute("disabled","disabled")});b=new CustomDialog(this,c,mxUtils.bind(this,function(){h(q.getTarget(),q.getColor(),null==z?!0:z.checked,C.checked,B.getLink(),y.checked,null!=n?n.value:null,null!=u?u.value:null)}),null,mxResources.get("create"),f);this.showDialog(b.container,340,246+a,!0,!0);null!=n?(n.focus(),mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode||mxClient.IS_QUIRKS?n.select():
+document.execCommand("selectAll",!1,null)):q.focus()};EditorUi.prototype.showRemoteExportDialog=function(a,b,d,e){var c=document.createElement("div");c.style.whiteSpace="nowrap";var f=document.createElement("h3");mxUtils.write(f,mxResources.get("image"));f.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:4px";c.appendChild(f);var g=this.addCheckbox(c,mxResources.get("selectionOnly"),!1,this.editor.graph.isSelectionEmpty()),k=e?null:this.addCheckbox(c,mxResources.get("includeCopyOfMyDiagram"),
+!0);null!=k&&(k.style.marginBottom="16px");a=new CustomDialog(this,c,mxUtils.bind(this,function(){d(!g.checked,null!=k?k.checked:!1)}),null,a,b);this.showDialog(a.container,300,e?100:146,!0,!0)};EditorUi.prototype.showExportDialog=function(a,b,d,e,h,l,n,k){n=null!=n?n:!0;var c=document.createElement("div");c.style.whiteSpace="nowrap";var f=this.editor.graph,g="jpeg"==k?170:280,p=document.createElement("h3");mxUtils.write(p,a);p.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:10px";
+c.appendChild(p);mxUtils.write(c,mxResources.get("zoom")+":");var m=document.createElement("input");m.setAttribute("type","text");m.style.marginRight="16px";m.style.width="60px";m.style.marginLeft="4px";m.style.marginRight="12px";m.value=this.lastExportZoom||"100%";c.appendChild(m);mxUtils.write(c,mxResources.get("borderWidth")+":");var r=document.createElement("input");r.setAttribute("type","text");r.style.marginRight="16px";r.style.width="60px";r.style.marginLeft="4px";r.value=this.lastExportBorder||
+"0";c.appendChild(r);mxUtils.br(c);var u=this.addCheckbox(c,mxResources.get("transparentBackground"),f.background==mxConstants.NONE||null==f.background,null,null,"jpeg"!=k),q=this.addCheckbox(c,mxResources.get("selectionOnly"),!1,f.isSelectionEmpty()),B=document.createElement("input");B.style.marginTop="16px";B.style.marginRight="8px";B.style.marginLeft="24px";B.setAttribute("disabled","disabled");B.setAttribute("type","checkbox");l&&(c.appendChild(B),mxUtils.write(c,mxResources.get("crop")),mxUtils.br(c),
+g+=26,mxEvent.addListener(q,"change",function(){q.checked?B.removeAttribute("disabled"):B.setAttribute("disabled","disabled")}));f.isSelectionEmpty()||(B.setAttribute("checked","checked"),B.defaultChecked=!0);var E=this.addCheckbox(c,mxResources.get("shadow"),f.shadowVisible),y=document.createElement("input");y.style.marginTop="16px";y.style.marginRight="8px";y.setAttribute("type","checkbox");!this.isOffline()&&this.canvasSupported||y.setAttribute("disabled","disabled");b&&(c.appendChild(y),mxUtils.write(c,
+mxResources.get("embedImages")),mxUtils.br(c),g+=26);var O=this.addCheckbox(c,mxResources.get("includeCopyOfMyDiagram"),n,null,null,"jpeg"!=k),J=null!=this.pages&&1<this.pages.length,F=this.addCheckbox(c,J?mxResources.get("allPages"):"",J,!J,null,"jpeg"!=k);F.style.marginLeft="24px";F.style.marginBottom="16px";J||(F.style.visibility="hidden");mxEvent.addListener(O,"change",function(){O.checked&&J?F.removeAttribute("disabled"):F.setAttribute("disabled","disabled")});n&&J||F.setAttribute("disabled",
+"disabled");a=new CustomDialog(this,c,mxUtils.bind(this,function(){this.lastExportBorder=r.value;this.lastExportZoom=m.value;h(m.value,u.checked,!q.checked,E.checked,O.checked,y.checked,r.value,B.checked,!F.checked)}),null,d,e);this.showDialog(a.container,320,g,!0,!0);m.focus();mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode||mxClient.IS_QUIRKS?m.select():document.execCommand("selectAll",!1,null)};EditorUi.prototype.showEmbedImageDialog=function(a,b,d,e,m){var c=document.createElement("div");
+c.style.whiteSpace="nowrap";var f=this.editor.graph;if(null!=b){var g=document.createElement("h3");mxUtils.write(g,b);g.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:4px";c.appendChild(g)}var p=this.addCheckbox(c,mxResources.get("fit"),!0),h=this.addCheckbox(c,mxResources.get("shadow"),f.shadowVisible&&e,!e),l=this.addCheckbox(c,d),n=this.addCheckbox(c,mxResources.get("lightbox"),!0),q=this.addEditButton(c,n),A=q.getEditInput(),z=1<f.model.getChildCount(f.model.getRoot()),
+C=this.addCheckbox(c,mxResources.get("layers"),z,!z);C.style.marginLeft=A.style.marginLeft;C.style.marginBottom="12px";C.style.marginTop="8px";mxEvent.addListener(n,"change",function(){n.checked?(z&&C.removeAttribute("disabled"),A.removeAttribute("disabled")):(C.setAttribute("disabled","disabled"),A.setAttribute("disabled","disabled"));A.checked&&n.checked?q.getEditSelect().removeAttribute("disabled"):q.getEditSelect().setAttribute("disabled","disabled")});b=new CustomDialog(this,c,mxUtils.bind(this,
+function(){a(p.checked,h.checked,l.checked,n.checked,q.getLink(),C.checked)}),null,mxResources.get("embed"),m);this.showDialog(b.container,280,280,!0,!0)};EditorUi.prototype.createEmbedImage=function(a,b,d,e,m,h,l,k){function c(c){var b=" ",g="";e&&(b=" onclick=\"(function(img){if(img.wnd!=null&&!img.wnd.closed){img.wnd.focus();}else{var r=function(evt){if(evt.data=='ready'&&evt.source==img.wnd){img.wnd.postMessage(decodeURIComponent(img.getAttribute('src')),'*');window.removeEventListener('message',r);}};window.addEventListener('message',r);img.wnd=window.open('https://www.draw.io/?client=1&lightbox=1"+
+(m?"&edit=_blank":"")+(h?"&layers=1":"")+"');}})(this);\"",g+="cursor:pointer;");a&&(g+="max-width:100%;");var k="";d&&(k=' width="'+Math.round(f.width)+'" height="'+Math.round(f.height)+'"');l('<img src="'+c+'"'+k+(""!=g?' style="'+g+'"':"")+b+"/>")}var f=this.editor.graph.getGraphBounds();if(this.isExportToCanvas())this.exportToCanvas(mxUtils.bind(this,function(a){var b=e?this.getFileData(!0):null;a=this.createImageDataUri(a,b,"png");c(a)}),null,null,null,mxUtils.bind(this,function(a){k({message:mxResources.get("unknownError")})}),
+null,!0,d?2:1,null,b);else if(b=this.getFileData(!0),f.width*f.height<=MAX_AREA&&b.length<=MAX_REQUEST_SIZE){var g="";d&&(g="&w="+Math.round(2*f.width)+"&h="+Math.round(2*f.height));var p=new mxXmlRequest(EXPORT_URL,"format=png&base64=1&embedXml="+(e?"1":"0")+g+"&xml="+encodeURIComponent(b));p.send(mxUtils.bind(this,function(){200<=p.getStatus()&&299>=p.getStatus()?c("data:image/png;base64,"+p.getText()):k({message:mxResources.get("unknownError")})}))}else k({message:mxResources.get("drawingTooLarge")})};
+EditorUi.prototype.createEmbedSvg=function(a,b,d,e,m,h,l){var c=this.editor.graph.getSvg(),f=c.getElementsByTagName("a");if(null!=f)for(var g=0;g<f.length;g++){var p=f[g].getAttribute("href");null!=p&&"#"==p.charAt(0)&&"_blank"==f[g].getAttribute("target")&&f[g].removeAttribute("target")}e&&c.setAttribute("content",this.getFileData(!0));b&&this.editor.graph.addSvgShadow(c);if(d){var n=" ",r="";e&&(n="onclick=\"(function(img){if(img.wnd!=null&&!img.wnd.closed){img.wnd.focus();}else{var r=function(evt){if(evt.data=='ready'&&evt.source==img.wnd){img.wnd.postMessage(decodeURIComponent(img.getAttribute('src')),'*');window.removeEventListener('message',r);}};window.addEventListener('message',r);img.wnd=window.open('https://www.draw.io/?client=1&lightbox=1"+
+(m?"&edit=_blank":"")+(h?"&layers=1":"")+"');}})(this);\"",r+="cursor:pointer;");a&&(r+="max-width:100%;");this.convertImages(c,mxUtils.bind(this,function(a){l('<img src="'+this.createSvgDataUri(mxUtils.getXml(a))+'"'+(""!=r?' style="'+r+'"':"")+n+"/>")}))}else r="",e&&(c.setAttribute("onclick","(function(svg){var src=window.event.target||window.event.srcElement;while (src!=null&&src.nodeName.toLowerCase()!='a'){src=src.parentNode;}if(src==null){if(svg.wnd!=null&&!svg.wnd.closed){svg.wnd.focus();}else{var r=function(evt){if(evt.data=='ready'&&evt.source==svg.wnd){svg.wnd.postMessage(decodeURIComponent(svg.getAttribute('content')),'*');window.removeEventListener('message',r);}};window.addEventListener('message',r);svg.wnd=window.open('https://www.draw.io/?client=1&lightbox=1"+
+(m?"&edit=_blank":"")+(h?"&layers=1":"")+"');}}})(this);"),r+="cursor:pointer;"),a&&(a=parseInt(c.getAttribute("width")),b=parseInt(c.getAttribute("height")),c.setAttribute("viewBox","0 0 "+a+" "+b),r+="max-width:100%;max-height:"+b+"px;",c.removeAttribute("height")),""!=r&&c.setAttribute("style",r),l(mxUtils.getXml(c))};EditorUi.prototype.timeSince=function(a){a=Math.floor((new Date-a)/1E3);var c=Math.floor(a/31536E3);if(1<c)return c+" "+mxResources.get("years");c=Math.floor(a/2592E3);if(1<c)return c+
 " "+mxResources.get("months");c=Math.floor(a/86400);if(1<c)return c+" "+mxResources.get("days");c=Math.floor(a/3600);if(1<c)return c+" "+mxResources.get("hours");c=Math.floor(a/60);return 1<c?c+" "+mxResources.get("minutes"):1==c?c+" "+mxResources.get("minute"):null};EditorUi.prototype.convertMath=function(a,b,d,e){e()};EditorUi.prototype.decodeNodeIntoGraph=function(a,b){if(null!=a){var c=null;if("diagram"==a.nodeName)c=a;else if("mxfile"==a.nodeName){var d=a.getElementsByTagName("diagram");if(0<
 d.length){var c=d[0],f=b.getGlobalVariable;b.getGlobalVariable=function(a){return"page"==a?c.getAttribute("name")||mxResources.get("pageWithNumber",[1]):"pagenumber"==a?1:f.apply(this,arguments)}}}null!=c&&(d=b.decompress(mxUtils.getTextContent(c)),null!=d&&0<d.length&&(a=mxUtils.parseXml(d).documentElement))}d=this.editor.graph;try{this.editor.graph=b,this.editor.setGraphXml(a)}catch(u){}finally{this.editor.graph=d}return a};EditorUi.prototype.getEmbeddedPng=function(a,b,d){var c=this.editor.graph,
-f=null;if(null!=d&&0<d.length)c=this.createTemporaryGraph(this.editor.graph.getStylesheet()),document.body.appendChild(c.container),this.decodeNodeIntoGraph(this.editor.extractGraphModel(mxUtils.parseXml(d).documentElement,!0),c),f=d;else if(null!=this.pages&&this.currentPage!=this.pages[0]){var c=this.createTemporaryGraph(c.getStylesheet()),e=c.getGlobalVariable,h=this.pages[0];c.getGlobalVariable=function(a){return"page"==a?h.getName():"pagenumber"==a?1:e.apply(this,arguments)};document.body.appendChild(c.container);
-c.model.setRoot(h.root)}this.exportToCanvas(mxUtils.bind(this,function(d){try{null==f&&(f=this.getFileData(!0));var e=d.toDataURL("image/png"),e=this.writeGraphModelToPng(e,"zTXt","mxGraphModel",atob(this.editor.graph.compress(f)));a(e.substring(e.lastIndexOf(",")+1));c!=this.editor.graph&&c.container.parentNode.removeChild(c.container)}catch(v){null!=b&&b(v)}}),null,null,null,mxUtils.bind(this,function(a){null!=b&&b(a)}),null,null,null,null,c.shadowVisible,null,c)};EditorUi.prototype.getEmbeddedSvg=
-function(a,b,d,e,g,l,p){p=b.background;p==mxConstants.NONE&&(p=null);b=b.getSvg(p,null,null,null,null,l);null!=a&&b.setAttribute("content",a);null!=d&&b.setAttribute("resource",d);if(null!=g)this.convertImages(b,mxUtils.bind(this,function(a){g((e?"":'<?xml version="1.0" encoding="UTF-8"?>\n<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">\n')+mxUtils.getXml(a))}));else return(e?"":'<?xml version="1.0" encoding="UTF-8"?>\n<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">\n')+
-mxUtils.getXml(b)};EditorUi.prototype.exportImage=function(a,b,d,e,g,l,p,k,q){q=null!=q?q:"png";if(this.spinner.spin(document.body,mxResources.get("exporting"))){var c=this.editor.graph.isSelectionEmpty();d=null!=d?d:c;null==this.thumbImageCache&&(this.thumbImageCache={});try{this.exportToCanvas(mxUtils.bind(this,function(a){this.spinner.stop();try{this.saveCanvas(a,g?this.getFileData(!0,null,null,null,d,k):null,q)}catch(w){"Invalid image"==w.message?this.downloadFile(q):this.handleError(w)}}),null,
-this.thumbImageCache,null,mxUtils.bind(this,function(a){this.spinner.stop();this.handleError(a)}),null,d,a||1,b,e,null,null,l,p)}catch(x){this.spinner.stop(),this.handleError(x)}}};EditorUi.prototype.loadFonts=function(a){if(null!=this.editor.fontCss&&null==this.editor.resolvedFontCss){var c=this.editor.fontCss.split("url("),b=0,d={},e=mxUtils.bind(this,function(){if(0==b){for(var f=[c[0]],e=1;e<c.length;e++){var h=c[e].indexOf(")");f.push("url(");f.push(d[c[e].substring(0,h)]);f.push(c[e].substring(h))}this.editor.resolvedFontCss=
-f.join("");a()}});if(0<c.length)for(var g=1;g<c.length;g++){var l=c[g].indexOf(")");mxUtils.bind(this,function(a){if(null==d[a]){d[a]=a;b++;var c="application/x-font-ttf";/(\.svg)($|\?)/i.test(a)?c="image/svg+xml":/(\.otf)($|\?)/i.test(a)?c="application/x-font-opentype":/(\.woff)($|\?)/i.test(a)?c="application/font-woff":/(\.woff2)($|\?)/i.test(a)?c="application/font-woff2":/(\.eot)($|\?)/i.test(a)?c="application/vnd.ms-fontobject":/(\.sfnt)($|\?)/i.test(a)&&(c="application/font-sfnt");var f=a;/^https?:\/\//.test(f)&&
-!this.isCorsEnabledForUrl(f)&&(f=PROXY_URL+"?url="+encodeURIComponent(a));this.loadUrl(f,mxUtils.bind(this,function(c){d[a]=c;b--;e()}),mxUtils.bind(this,function(a){b--;e()}),!0,null,"data:"+c+";charset=utf-8;base64,")}})(c[g].substring(0,l))}}else a()};EditorUi.prototype.exportToCanvas=function(a,b,d,e,g,l,p,k,q,v,x,w,D,B){l=null!=l?l:!0;w=null!=w?w:this.editor.graph;D=null!=D?D:0;var c=q?null:w.background;c==mxConstants.NONE&&(c=null);null==c&&(c=e);null==c&&0==q&&(c="#ffffff");this.convertImages(w.getSvg(c,
-null,null,B,null,null!=p?p:!0),mxUtils.bind(this,function(d){var f=new Image;f.onload=mxUtils.bind(this,function(){try{var e=document.createElement("canvas"),h=parseInt(d.getAttribute("width")),m=parseInt(d.getAttribute("height"));k=null!=k?k:1;null!=b&&(k=l?Math.min(1,Math.min(3*b/(4*m),b/h)):b/h);h=Math.ceil(k*h)+2*D;m=Math.ceil(k*m)+2*D;e.setAttribute("width",h);e.setAttribute("height",m);var n=e.getContext("2d");null!=c&&(n.beginPath(),n.rect(0,0,h,m),n.fillStyle=c,n.fill());n.scale(k,k);n.drawImage(f,
-D/k,D/k);a(e)}catch(T){null!=g&&g(T)}});f.onerror=function(a){null!=g&&g(a)};try{v&&this.editor.graph.addSvgShadow(d);var e=mxUtils.bind(this,function(){if(null!=this.editor.resolvedFontCss){var a=document.createElement("style");a.setAttribute("type","text/css");a.innerHTML=this.editor.resolvedFontCss;d.getElementsByTagName("defs")[0].appendChild(a)}this.convertMath(w,d,!0,mxUtils.bind(this,function(){f.src=this.createSvgDataUri(mxUtils.getXml(d))}))});this.loadFonts(e)}catch(z){null!=g&&g(z)}}),
+f=null;if(null!=d&&0<d.length)c=this.createTemporaryGraph(this.editor.graph.getStylesheet()),document.body.appendChild(c.container),this.decodeNodeIntoGraph(this.editor.extractGraphModel(mxUtils.parseXml(d).documentElement,!0),c),f=d;else if(null!=this.pages&&this.currentPage!=this.pages[0]){var c=this.createTemporaryGraph(c.getStylesheet()),e=c.getGlobalVariable,g=this.pages[0];c.getGlobalVariable=function(a){return"page"==a?g.getName():"pagenumber"==a?1:e.apply(this,arguments)};document.body.appendChild(c.container);
+c.model.setRoot(g.root)}this.exportToCanvas(mxUtils.bind(this,function(d){try{null==f&&(f=this.getFileData(!0));var e=d.toDataURL("image/png"),e=this.writeGraphModelToPng(e,"zTXt","mxGraphModel",atob(this.editor.graph.compress(f)));a(e.substring(e.lastIndexOf(",")+1));c!=this.editor.graph&&c.container.parentNode.removeChild(c.container)}catch(t){null!=b&&b(t)}}),null,null,null,mxUtils.bind(this,function(a){null!=b&&b(a)}),null,null,null,null,c.shadowVisible,null,c)};EditorUi.prototype.getEmbeddedSvg=
+function(a,b,d,e,h,l,n){n=b.background;n==mxConstants.NONE&&(n=null);b=b.getSvg(n,null,null,null,null,l);null!=a&&b.setAttribute("content",a);null!=d&&b.setAttribute("resource",d);if(null!=h)this.convertImages(b,mxUtils.bind(this,function(a){h((e?"":'<?xml version="1.0" encoding="UTF-8"?>\n<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">\n')+mxUtils.getXml(a))}));else return(e?"":'<?xml version="1.0" encoding="UTF-8"?>\n<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">\n')+
+mxUtils.getXml(b)};EditorUi.prototype.exportImage=function(a,b,d,e,h,l,n,k,q){q=null!=q?q:"png";if(this.spinner.spin(document.body,mxResources.get("exporting"))){var c=this.editor.graph.isSelectionEmpty();d=null!=d?d:c;null==this.thumbImageCache&&(this.thumbImageCache={});try{this.exportToCanvas(mxUtils.bind(this,function(a){this.spinner.stop();try{this.saveCanvas(a,h?this.getFileData(!0,null,null,null,d,k):null,q)}catch(w){"Invalid image"==w.message?this.downloadFile(q):this.handleError(w)}}),null,
+this.thumbImageCache,null,mxUtils.bind(this,function(a){this.spinner.stop();this.handleError(a)}),null,d,a||1,b,e,null,null,l,n)}catch(x){this.spinner.stop(),this.handleError(x)}}};EditorUi.prototype.loadFonts=function(a){if(null!=this.editor.fontCss&&null==this.editor.resolvedFontCss){var c=this.editor.fontCss.split("url("),b=0,d={},e=mxUtils.bind(this,function(){if(0==b){for(var f=[c[0]],e=1;e<c.length;e++){var g=c[e].indexOf(")");f.push("url(");f.push(d[c[e].substring(0,g)]);f.push(c[e].substring(g))}this.editor.resolvedFontCss=
+f.join("");a()}});if(0<c.length)for(var h=1;h<c.length;h++){var l=c[h].indexOf(")");mxUtils.bind(this,function(a){if(null==d[a]){d[a]=a;b++;var c="application/x-font-ttf";/(\.svg)($|\?)/i.test(a)?c="image/svg+xml":/(\.otf)($|\?)/i.test(a)?c="application/x-font-opentype":/(\.woff)($|\?)/i.test(a)?c="application/font-woff":/(\.woff2)($|\?)/i.test(a)?c="application/font-woff2":/(\.eot)($|\?)/i.test(a)?c="application/vnd.ms-fontobject":/(\.sfnt)($|\?)/i.test(a)&&(c="application/font-sfnt");var f=a;/^https?:\/\//.test(f)&&
+!this.isCorsEnabledForUrl(f)&&(f=PROXY_URL+"?url="+encodeURIComponent(a));this.loadUrl(f,mxUtils.bind(this,function(c){d[a]=c;b--;e()}),mxUtils.bind(this,function(a){b--;e()}),!0,null,"data:"+c+";charset=utf-8;base64,")}})(c[h].substring(0,l))}}else a()};EditorUi.prototype.exportToCanvas=function(a,b,d,e,h,l,n,k,q,t,x,w,D,A){l=null!=l?l:!0;w=null!=w?w:this.editor.graph;D=null!=D?D:0;var c=q?null:w.background;c==mxConstants.NONE&&(c=null);null==c&&(c=e);null==c&&0==q&&(c="#ffffff");this.convertImages(w.getSvg(c,
+null,null,A,null,null!=n?n:!0),mxUtils.bind(this,function(d){var f=new Image;f.onload=mxUtils.bind(this,function(){try{var e=document.createElement("canvas"),g=parseInt(d.getAttribute("width")),p=parseInt(d.getAttribute("height"));k=null!=k?k:1;null!=b&&(k=l?Math.min(1,Math.min(3*b/(4*p),b/g)):b/g);g=Math.ceil(k*g)+2*D;p=Math.ceil(k*p)+2*D;e.setAttribute("width",g);e.setAttribute("height",p);var m=e.getContext("2d");null!=c&&(m.beginPath(),m.rect(0,0,g,p),m.fillStyle=c,m.fill());m.scale(k,k);m.drawImage(f,
+D/k,D/k);a(e)}catch(R){null!=h&&h(R)}});f.onerror=function(a){null!=h&&h(a)};try{t&&this.editor.graph.addSvgShadow(d);var e=mxUtils.bind(this,function(){if(null!=this.editor.resolvedFontCss){var a=document.createElement("style");a.setAttribute("type","text/css");a.innerHTML=this.editor.resolvedFontCss;d.getElementsByTagName("defs")[0].appendChild(a)}this.convertMath(w,d,!0,mxUtils.bind(this,function(){f.src=this.createSvgDataUri(mxUtils.getXml(d))}))});this.loadFonts(e)}catch(y){null!=h&&h(y)}}),
 d,x)};EditorUi.prototype.createImageUrlConverter=function(){var a=new mxUrlConverter;a.updateBaseUrl();var b=a.convert;a.convert=function(c){null!=c&&("http://"!=c.substring(0,7)&&"https://"!=c.substring(0,8)||c.substring(0,a.baseUrl.length)==a.baseUrl?"chrome-extension://"!=c.substring(0,19)&&(c=b.apply(this,arguments)):c=PROXY_URL+"?url="+encodeURIComponent(c));return c};return a};EditorUi.prototype.convertImages=function(a,b,d,e){null==e&&(e=this.createImageUrlConverter());var c=0,f=d||{};d=mxUtils.bind(this,
-function(d,h){for(var k=a.getElementsByTagName(d),g=0;g<k.length;g++)mxUtils.bind(this,function(d){var k=e.convert(d.getAttribute(h));if(null!=k&&"data:"!=k.substring(0,5)){var g=f[k];null==g?(c++,this.convertImageToDataUri(k,function(e){null!=e&&(f[k]=e,d.setAttribute(h,e));c--;0==c&&b(a)})):d.setAttribute(h,g)}})(k[g])});d("image","xlink:href");d("img","src");0==c&&b(a)};EditorUi.prototype.loadUrl=function(a,b,d,e,g,l){try{var c=e||/(\.png)($|\?)/i.test(a)||/(\.jpe?g)($|\?)/i.test(a)||/(\.gif)($|\?)/i.test(a);
-g=null!=g?g:!0;var f=mxUtils.bind(this,function(){mxUtils.get(a,mxUtils.bind(this,function(a){if(200<=a.getStatus()&&299>=a.getStatus()){if(null!=b){var f=a.getText();if(c){if((9==document.documentMode||10==document.documentMode)&&"undefined"!==typeof window.mxUtilsBinaryToArray){a=mxUtilsBinaryToArray(a.request.responseBody).toArray();for(var f=Array(a.length),e=0;e<a.length;e++)f[e]=String.fromCharCode(a[e]);f=f.join("")}l=null!=l?l:"data:image/png;base64,";f=l+this.base64Encode(f)}b(f)}}else null!=
-d&&d({code:App.ERROR_UNKNOWN})}),function(){null!=d&&d({code:App.ERROR_UNKNOWN})},c,this.timeout,function(){g&&null!=d&&d({code:App.ERROR_TIMEOUT,retry:f})})});f()}catch(t){null!=d&&d(t)}};EditorUi.prototype.isCorsEnabledForUrl=function(a){return"https?://raw.githubusercontent.com/"===a.substring(0,34)||/^https?:\/\/.*\.github\.io\//.test(a)||/^https?:\/\/(.*\.)?rawgit\.com\//.test(a)};EditorUi.prototype.convertImageToDataUri=function(a,b){if(/(\.svg)$/i.test(a))mxUtils.get(a,mxUtils.bind(this,function(a){b(this.createSvgDataUri(a.getText()))}),
-function(){b()});else{var c=new Image;c.onload=function(){var a=document.createElement("canvas"),d=a.getContext("2d");a.height=c.height;a.width=c.width;d.drawImage(c,0,0);b(a.toDataURL())};c.onerror=function(){b()};c.src=a}};EditorUi.prototype.importXml=function(a,b,d,e,g){b=null!=b?b:0;d=null!=d?d:0;var c=[];try{var f=this.editor.graph;if(null!=a&&0<a.length){var h=mxUtils.parseXml(a),m=this.editor.extractGraphModel(h.documentElement,null!=this.pages);if(null!=m&&"mxfile"==m.nodeName&&null!=this.pages){var n=
-m.getElementsByTagName("diagram");if(1==n.length)m=mxUtils.parseXml(f.decompress(mxUtils.getTextContent(n[0]))).documentElement;else if(1<n.length){f.model.beginUpdate();try{for(var l=0;l<n.length;l++){var p=this.updatePageRoot(new DiagramPage(n[l])),q=this.pages.length;null==p.getName()&&p.setName(mxResources.get("pageWithNumber",[q+1]));f.model.execute(new ChangePage(this,p,p,q))}}finally{f.model.endUpdate()}}}if(null!=m&&"mxGraphModel"===m.nodeName){var B=new mxGraphModel;(new mxCodec(m.ownerDocument)).decode(m,
-B);var y=B.getChildCount(B.getRoot());f.model.getChildCount(f.model.getRoot());f.model.beginUpdate();try{a={};for(l=0;l<y;l++){var C=B.getChildAt(B.getRoot(),l);if(1!=y||f.isCellLocked(f.getDefaultParent()))C=f.importCells([C],0,0,f.model.getRoot(),null,a)[0],A=f.model.getChildren(C),f.moveCells(A,b,d),c=c.concat(A);else var A=B.getChildren(C),c=c.concat(f.importCells(A,b,d,f.getDefaultParent(),null,a))}if(e){f.isGridEnabled()&&(b=f.snap(b),d=f.snap(d));var F=f.getBoundingBoxFromGeometry(c,!0);null!=
-F&&f.moveCells(c,b-F.x,d-F.y)}}finally{f.model.endUpdate()}}}}catch(z){throw g||this.handleError(z,mxResources.get("invalidOrMissingFile")),z;}return c};EditorUi.prototype.importLucidChart=function(a,b,d,e,g){var c=mxUtils.bind(this,function(){if(this.pasteLucidChart)try{this.insertLucidChart(a,b,d,e,g)}catch(r){this.handleError(r)}finally{null!=g&&g()}});this.pasteLucidChart||this.loadingExtensions||this.isOffline()?window.setTimeout(c,0):(this.loadingExtensions=!0,"1"==urlParams.dev?mxscript("js/diagramly/Extensions.js",
-c):mxscript("js/extensions.min.js",c))};EditorUi.prototype.insertLucidChart=function(a,b,d,e,g){g=JSON.parse(a);a=[];if(null!=g.state){g=JSON.parse(g.state);for(var c in g.Pages)a.push(g.Pages[c]);a.sort(function(a,c){return a.Properties.Order<c.Properties.Order?-1:a.Properties.Order>c.Properties.Order?1:0})}else a.push(g);if(0<a.length){this.editor.graph.getModel().beginUpdate();try{if(this.pasteLucidChart(a[0],b,d,e),null!=this.pages){var f=this.currentPage;for(b=1;b<a.length;b++)this.insertPage(),
-this.pasteLucidChart(a[b]);this.selectPage(f)}}finally{this.editor.graph.getModel().endUpdate()}}};EditorUi.prototype.insertTextAt=function(a,b,d,e,g,l,p){l=null!=l?l:!0;p=null!=p?p:!0;if(null!=a)if(Graph.fileSupport&&!this.isOffline()&&(new XMLHttpRequest).upload&&this.isRemoteFileFormat(a))this.parseFile(new Blob([a.replace(/\s+/g," ")],{type:"application/octet-stream"}),mxUtils.bind(this,function(a){4==a.readyState&&200<=a.status&&299>=a.status&&this.editor.graph.setSelectionCells(this.insertTextAt(a.responseText,
-b,d,!0))}));else if("data:"==a.substring(0,5)||!this.isOffline()&&(g||/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(a))){var c=this.editor.graph;if("data:image/png;base64,"==a.substring(0,22)){var f=this.extractGraphModelFromPng(a),h=this.importXml(f,b,d,l,!0);if(0<h.length)return h}if("data:image/svg+xml;"==a.substring(0,19))try{if(f=null,"data:image/svg+xml;base64,"==a.substring(0,26)?(f=a.substring(a.indexOf(",")+1),f=window.atob&&!mxClient.IS_SF?atob(f):Base64.decode(f,!0)):f=decodeURIComponent(a.substring(a.indexOf(",")+
-1)),h=this.importXml(f,b,d,l,!0),0<h.length)return h}catch(x){}this.loadImage(a,mxUtils.bind(this,function(f){if("data:"==a.substring(0,5))this.resizeImage(f,a,mxUtils.bind(this,function(a,f,e){c.setSelectionCell(c.insertVertex(null,null,"",c.snap(b),c.snap(d),f,e,"shape=image;verticalLabelPosition=bottom;labelBackgroundColor=#ffffff;verticalAlign=top;aspect=fixed;imageAspect=0;image="+this.convertDataUri(a)+";"))}),p,this.maxImageSize);else{var e=Math.min(1,Math.min(this.maxImageSize/f.width,this.maxImageSize/
-f.height)),h=Math.round(f.width*e);f=Math.round(f.height*e);c.setSelectionCell(c.insertVertex(null,null,"",c.snap(b),c.snap(d),h,f,"shape=image;verticalLabelPosition=bottom;labelBackgroundColor=#ffffff;verticalAlign=top;aspect=fixed;imageAspect=0;image="+a+";"))}}),mxUtils.bind(this,function(){var f=null;c.getModel().beginUpdate();try{f=c.insertVertex(c.getDefaultParent(),null,a,c.snap(b),c.snap(d),1,1,"text;"+(e?"html=1;":"")),c.updateCellSize(f),c.fireEvent(new mxEventObject("textInserted","cells",
-[f]))}finally{c.getModel().endUpdate()}c.setSelectionCell(f)}))}else{a=this.editor.graph.zapGremlins(mxUtils.trim(a));if(this.isCompatibleString(a))return this.importXml(a,b,d,l);if(0<a.length)if('{"state":"{\\"Properties\\":'==a.substring(0,26))this.importLucidChart(a,b,d,l);else{c=this.editor.graph;g=null;c.getModel().beginUpdate();try{g=c.insertVertex(c.getDefaultParent(),null,"",c.snap(b),c.snap(d),1,1,"text;"+(e?"html=1;":"")),c.fireEvent(new mxEventObject("textInserted","cells",[g])),g.value=
-a,c.updateCellSize(g),/\b((?:[a-z][\w-]+:(?:\/{1,3}|[a-z0-9%])|www\d{0,3}[.]|[a-z0-9.\-]+[.][a-z]{2,4}\/)(?:[^\s()<>]+|\(([^\s()<>]+|(\([^\s()<>]+\)))*\))+(?:\(([^\s()<>]+|(\([^\s()<>]+\)))*\)|[^\s`!()\[\]{};:'".,<>?«»“”‘’]))/i.test(g.value)&&c.setLinkForCell(g,g.value),g.geometry.width+=c.gridSize,g.geometry.height+=c.gridSize}finally{c.getModel().endUpdate()}return[g]}}return[]};EditorUi.prototype.formatFileSize=function(a){var c=-1;do a/=1024,c++;while(1024<a);return Math.max(a,.1).toFixed(1)+
-" kB; MB; GB; TB;PB;EB;ZB;YB".split(";")[c]};EditorUi.prototype.convertDataUri=function(a){if("data:"==a.substring(0,5)){var c=a.indexOf(";");0<c&&(a=a.substring(0,c)+a.substring(a.indexOf(",",c+1)))}return a};EditorUi.prototype.isRemoteFileFormat=function(a,b){return/(\.*<graphml xmlns=\".*)/.test(a)||/(\"contentType\":\s*\"application\/gliffy\+json\")/.test(a)||null!=b&&/(\.vsdx)($|\?)/i.test(b)||null!=b&&/(\.vssx)($|\?)/i.test(b)};EditorUi.prototype.importFile=function(a,b,d,e,g,l,p,k,q,v,x){v=
-null!=v?v:!0;var c=!1,f=null;"image"==b.substring(0,5)?(q=!1,"image/png"==b.substring(0,9)&&(b=x?null:this.extractGraphModelFromPng(a),null!=b&&0<b.length&&(f=this.importXml(b,d,e,v),q=!0)),q||(f=this.editor.graph,b=a.indexOf(";"),0<b&&(a=a.substring(0,b)+a.substring(a.indexOf(",",b+1))),v&&f.isGridEnabled()&&(d=f.snap(d),e=f.snap(e)),f=[f.insertVertex(null,null,"",d,e,g,l,"shape=image;verticalLabelPosition=bottom;labelBackgroundColor=#ffffff;verticalAlign=top;aspect=fixed;imageAspect=0;image="+a+
-";")])):!this.isOffline()&&(new XMLHttpRequest).upload&&this.isRemoteFileFormat(a,p)?(c=!0,this.parseFile(null!=q?q:new Blob([a],{type:"application/octet-stream"}),mxUtils.bind(this,function(a){if(4==a.readyState){var c=null;200<=a.status&&299>=a.status&&(a=a.responseText,null!=a&&"<mxlibrary"==a.substring(0,10)?(null!=p&&".vssx"==p.toLowerCase().substring(p.length-5)&&(p=p.substring(0,p.length-5)+".xml"),this.loadLibrary(new LocalLibrary(this,a,p))):c=this.importXml(a,d,e,v));null!=k&&k(c)}}),p)):
-/(\.vsd)($|\?)/i.test(p)||(f=this.insertTextAt(this.validateFileData(a),d,e,!0,null,v));c||null==k||k(f);return f};EditorUi.prototype.base64Encode=function(a){for(var c="",b=0,d=a.length,e,g,l;b<d;){e=a.charCodeAt(b++)&255;if(b==d){c+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(e>>2);c+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((e&3)<<4);c+="==";break}g=a.charCodeAt(b++);if(b==d){c+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(e>>
-2);c+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((e&3)<<4|(g&240)>>4);c+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((g&15)<<2);c+="=";break}l=a.charCodeAt(b++);c+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(e>>2);c+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((e&3)<<4|(g&240)>>4);c+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((g&15)<<2|(l&192)>>6);
-c+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(l&63)}return c};EditorUi.prototype.importFiles=function(a,b,d,e,g,l,p,k,q,v,x,w){b=null!=b?b:0;d=null!=d?d:0;e=null!=e?e:this.maxImageSize;v=null!=v?v:this.maxImageBytes;var c=null!=b&&null!=d,f=!0,h=!1;if(!mxClient.IS_CHROMEAPP&&null!=a)for(var m=x||this.resampleThreshold,n=0;n<a.length;n++)if("image/"==a[n].type.substring(0,6)&&a[n].size>m){h=!0;break}var r=mxUtils.bind(this,function(){var h=this.editor.graph,m=h.gridSize;
-g=null!=g?g:mxUtils.bind(this,function(a,b,d,f,e,h,k,g,m){return null!=a&&"<mxlibrary"==a.substring(0,10)?(this.spinner.stop(),this.loadLibrary(new LocalLibrary(this,a,k)),null):this.importFile(a,b,d,f,e,h,k,g,m,c,w)});l=null!=l?l:mxUtils.bind(this,function(a){h.setSelectionCells(a)});if(this.spinner.spin(document.body,mxResources.get("loading")))for(var n=a.length,q=n,r=[],t=mxUtils.bind(this,function(a,b){r[a]=b;if(0==--q){this.spinner.stop();if(null!=k)k(r);else{var c=[];h.getModel().beginUpdate();
-try{for(var d=0;d<r.length;d++){var f=r[d]();null!=f&&(c=c.concat(f))}}finally{h.getModel().endUpdate()}}l(c)}}),u=0;u<n;u++)mxUtils.bind(this,function(c){var h=a[c],k=new FileReader;k.onload=mxUtils.bind(this,function(a){if(null==p||p(h))if("image/"==h.type.substring(0,6))if("image/svg"==h.type.substring(0,9)){var k=a.target.result,n=k.indexOf(","),l=atob(k.substring(n+1)),q=mxUtils.parseXml(l),l=q.getElementsByTagName("svg");if(0<l.length){var l=l[0],r=w?null:l.getAttribute("content");null!=r&&
-"<"!=r.charAt(0)&&"%"!=r.charAt(0)&&(r=unescape(window.atob?atob(r):Base64.decode(r,!0)));null!=r&&"%"==r.charAt(0)&&(r=decodeURIComponent(r));null==r||"<mxfile "!==r.substring(0,8)&&"<mxGraphModel "!==r.substring(0,14)?t(c,mxUtils.bind(this,function(){try{if(k.substring(0,n+1),null!=q){var a=q.getElementsByTagName("svg");if(0<a.length){var f=a[0],l=parseFloat(f.getAttribute("width")),p=parseFloat(f.getAttribute("height")),r=f.getAttribute("viewBox");if(null==r||0==r.length)f.setAttribute("viewBox",
-"0 0 "+l+" "+p);else if(isNaN(l)||isNaN(p)){var z=r.split(" ");3<z.length&&(l=parseFloat(z[2]),p=parseFloat(z[3]))}k=this.createSvgDataUri(mxUtils.getXml(a[0]));var v=Math.min(1,Math.min(e/Math.max(1,l)),e/Math.max(1,p));return g(k,h.type,b+c*m,d+c*m,Math.max(1,Math.round(l*v)),Math.max(1,Math.round(p*v)),h.name)}}}catch(ca){}return null})):t(c,mxUtils.bind(this,function(){return g(r,"text/xml",b+c*m,d+c*m,0,0,h.name)}))}}else{l=!1;if("image/png"==h.type){var z=w?null:this.extractGraphModelFromPng(a.target.result);
-if(null!=z&&0<z.length){var u=new Image;u.src=a.target.result;t(c,mxUtils.bind(this,function(){return g(z,"text/xml",b+c*m,d+c*m,u.width,u.height,h.name)}));l=!0}}l||(mxClient.IS_CHROMEAPP?(this.spinner.stop(),this.showError(mxResources.get("error"),mxResources.get("dragAndDropNotSupported"),mxResources.get("cancel"),mxUtils.bind(this,function(){}),null,mxResources.get("ok"),mxUtils.bind(this,function(){this.actions.get("import").funct()}))):this.loadImage(a.target.result,mxUtils.bind(this,function(k){this.resizeImage(k,
-a.target.result,mxUtils.bind(this,function(k,n,l){t(c,mxUtils.bind(this,function(){if(null!=k&&k.length<v){var p=f&&this.isResampleImage(a.target.result,x)?Math.min(1,Math.min(e/n,e/l)):1;return g(k,h.type,b+c*m,d+c*m,Math.round(n*p),Math.round(l*p),h.name)}this.handleError({message:mxResources.get("imageTooBig")});return null}))}),f,e,x)})))}else g(a.target.result,h.type,b+c*m,d+c*m,240,160,h.name,function(a){t(c,function(){return a})})});/(\.vsdx)($|\?)/i.test(h.name)||/(\.vssx)($|\?)/i.test(h.name)?
-g(null,h.type,b+c*m,d+c*m,240,160,h.name,function(a){t(c,function(){return a})},h):"image"==h.type.substring(0,5)?k.readAsDataURL(h):k.readAsText(h)})(u)});h?this.confirmImageResize(function(a){f=a;r()},q):r()};EditorUi.prototype.confirmImageResize=function(a,b){b=null!=b?b:!1;var c=null!=this.spinner&&null!=this.spinner.pause?this.spinner.pause():function(){},d=isLocalStorage||mxClient.IS_CHROMEAPP?mxSettings.getResizeImages():null,f=function(d,f){if(d||b)mxSettings.setResizeImages(d?f:null),mxSettings.save();
+function(d,g){for(var k=a.getElementsByTagName(d),h=0;h<k.length;h++)mxUtils.bind(this,function(d){var k=e.convert(d.getAttribute(g));if(null!=k&&"data:"!=k.substring(0,5)){var h=f[k];null==h?(c++,this.convertImageToDataUri(k,function(e){null!=e&&(f[k]=e,d.setAttribute(g,e));c--;0==c&&b(a)})):d.setAttribute(g,h)}})(k[h])});d("image","xlink:href");d("img","src");0==c&&b(a)};EditorUi.prototype.loadUrl=function(a,b,d,e,h,l){try{var c=e||/(\.png)($|\?)/i.test(a)||/(\.jpe?g)($|\?)/i.test(a)||/(\.gif)($|\?)/i.test(a);
+h=null!=h?h:!0;var f=mxUtils.bind(this,function(){mxUtils.get(a,mxUtils.bind(this,function(a){if(200<=a.getStatus()&&299>=a.getStatus()){if(null!=b){var f=a.getText();if(c){if((9==document.documentMode||10==document.documentMode)&&"undefined"!==typeof window.mxUtilsBinaryToArray){a=mxUtilsBinaryToArray(a.request.responseBody).toArray();for(var f=Array(a.length),e=0;e<a.length;e++)f[e]=String.fromCharCode(a[e]);f=f.join("")}l=null!=l?l:"data:image/png;base64,";f=l+this.base64Encode(f)}b(f)}}else null!=
+d&&d({code:App.ERROR_UNKNOWN})}),function(){null!=d&&d({code:App.ERROR_UNKNOWN})},c,this.timeout,function(){h&&null!=d&&d({code:App.ERROR_TIMEOUT,retry:f})})});f()}catch(v){null!=d&&d(v)}};EditorUi.prototype.isCorsEnabledForUrl=function(a){return"https?://raw.githubusercontent.com/"===a.substring(0,34)||/^https?:\/\/.*\.github\.io\//.test(a)||/^https?:\/\/(.*\.)?rawgit\.com\//.test(a)};EditorUi.prototype.convertImageToDataUri=function(a,b){if(/(\.svg)$/i.test(a))mxUtils.get(a,mxUtils.bind(this,function(a){b(this.createSvgDataUri(a.getText()))}),
+function(){b()});else{var c=new Image;c.onload=function(){var a=document.createElement("canvas"),d=a.getContext("2d");a.height=c.height;a.width=c.width;d.drawImage(c,0,0);b(a.toDataURL())};c.onerror=function(){b()};c.src=a}};EditorUi.prototype.importXml=function(a,b,d,e,h){b=null!=b?b:0;d=null!=d?d:0;var c=[];try{var f=this.editor.graph;if(null!=a&&0<a.length){var g=mxUtils.parseXml(a),p=this.editor.extractGraphModel(g.documentElement,null!=this.pages);if(null!=p&&"mxfile"==p.nodeName&&null!=this.pages){var m=
+p.getElementsByTagName("diagram");if(1==m.length)p=mxUtils.parseXml(f.decompress(mxUtils.getTextContent(m[0]))).documentElement;else if(1<m.length){f.model.beginUpdate();try{for(var l=0;l<m.length;l++){var n=this.updatePageRoot(new DiagramPage(m[l])),q=this.pages.length;null==n.getName()&&n.setName(mxResources.get("pageWithNumber",[q+1]));f.model.execute(new ChangePage(this,n,n,q))}}finally{f.model.endUpdate()}}}if(null!=p&&"mxGraphModel"===p.nodeName){var A=new mxGraphModel;(new mxCodec(p.ownerDocument)).decode(p,
+A);var z=A.getChildCount(A.getRoot());f.model.getChildCount(f.model.getRoot());f.model.beginUpdate();try{a={};for(l=0;l<z;l++){var C=A.getChildAt(A.getRoot(),l);if(1!=z||f.isCellLocked(f.getDefaultParent()))C=f.importCells([C],0,0,f.model.getRoot(),null,a)[0],B=f.model.getChildren(C),f.moveCells(B,b,d),c=c.concat(B);else var B=A.getChildren(C),c=c.concat(f.importCells(B,b,d,f.getDefaultParent(),null,a))}if(e){f.isGridEnabled()&&(b=f.snap(b),d=f.snap(d));var E=f.getBoundingBoxFromGeometry(c,!0);null!=
+E&&f.moveCells(c,b-E.x,d-E.y)}}finally{f.model.endUpdate()}}}}catch(y){throw h||this.handleError(y,mxResources.get("invalidOrMissingFile")),y;}return c};EditorUi.prototype.importLucidChart=function(a,b,d,e,h){var c=mxUtils.bind(this,function(){if(this.pasteLucidChart)try{this.insertLucidChart(a,b,d,e,h)}catch(r){this.handleError(r)}finally{null!=h&&h()}});this.pasteLucidChart||this.loadingExtensions||this.isOffline()?window.setTimeout(c,0):(this.loadingExtensions=!0,"1"==urlParams.dev?mxscript("js/diagramly/Extensions.js",
+c):mxscript("js/extensions.min.js",c))};EditorUi.prototype.insertLucidChart=function(a,b,d,e,h){h=JSON.parse(a);a=[];if(null!=h.state){h=JSON.parse(h.state);for(var c in h.Pages)a.push(h.Pages[c]);a.sort(function(a,c){return a.Properties.Order<c.Properties.Order?-1:a.Properties.Order>c.Properties.Order?1:0})}else a.push(h);if(0<a.length){this.editor.graph.getModel().beginUpdate();try{if(this.pasteLucidChart(a[0],b,d,e),null!=this.pages){var f=this.currentPage;for(b=1;b<a.length;b++)this.insertPage(),
+this.pasteLucidChart(a[b]);this.selectPage(f)}}finally{this.editor.graph.getModel().endUpdate()}}};EditorUi.prototype.insertTextAt=function(a,b,d,e,h,l,n){l=null!=l?l:!0;n=null!=n?n:!0;if(null!=a)if(Graph.fileSupport&&!this.isOffline()&&(new XMLHttpRequest).upload&&this.isRemoteFileFormat(a))this.parseFile(new Blob([a.replace(/\s+/g," ")],{type:"application/octet-stream"}),mxUtils.bind(this,function(a){4==a.readyState&&200<=a.status&&299>=a.status&&this.editor.graph.setSelectionCells(this.insertTextAt(a.responseText,
+b,d,!0))}));else if("data:"==a.substring(0,5)||!this.isOffline()&&(h||/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(a))){var c=this.editor.graph;if("data:image/png;base64,"==a.substring(0,22)){var f=this.extractGraphModelFromPng(a),g=this.importXml(f,b,d,l,!0);if(0<g.length)return g}if("data:image/svg+xml;"==a.substring(0,19))try{if(f=null,"data:image/svg+xml;base64,"==a.substring(0,26)?(f=a.substring(a.indexOf(",")+1),f=window.atob&&!mxClient.IS_SF?atob(f):Base64.decode(f,!0)):f=decodeURIComponent(a.substring(a.indexOf(",")+
+1)),g=this.importXml(f,b,d,l,!0),0<g.length)return g}catch(x){}this.loadImage(a,mxUtils.bind(this,function(f){if("data:"==a.substring(0,5))this.resizeImage(f,a,mxUtils.bind(this,function(a,f,e){c.setSelectionCell(c.insertVertex(null,null,"",c.snap(b),c.snap(d),f,e,"shape=image;verticalLabelPosition=bottom;labelBackgroundColor=#ffffff;verticalAlign=top;aspect=fixed;imageAspect=0;image="+this.convertDataUri(a)+";"))}),n,this.maxImageSize);else{var e=Math.min(1,Math.min(this.maxImageSize/f.width,this.maxImageSize/
+f.height)),g=Math.round(f.width*e);f=Math.round(f.height*e);c.setSelectionCell(c.insertVertex(null,null,"",c.snap(b),c.snap(d),g,f,"shape=image;verticalLabelPosition=bottom;labelBackgroundColor=#ffffff;verticalAlign=top;aspect=fixed;imageAspect=0;image="+a+";"))}}),mxUtils.bind(this,function(){var f=null;c.getModel().beginUpdate();try{f=c.insertVertex(c.getDefaultParent(),null,a,c.snap(b),c.snap(d),1,1,"text;"+(e?"html=1;":"")),c.updateCellSize(f),c.fireEvent(new mxEventObject("textInserted","cells",
+[f]))}finally{c.getModel().endUpdate()}c.setSelectionCell(f)}))}else{a=this.editor.graph.zapGremlins(mxUtils.trim(a));if(this.isCompatibleString(a))return this.importXml(a,b,d,l);if(0<a.length)if('{"state":"{\\"Properties\\":'==a.substring(0,26))this.importLucidChart(a,b,d,l);else{c=this.editor.graph;h=null;c.getModel().beginUpdate();try{h=c.insertVertex(c.getDefaultParent(),null,"",c.snap(b),c.snap(d),1,1,"text;"+(e?"html=1;":"")),c.fireEvent(new mxEventObject("textInserted","cells",[h])),h.value=
+a,c.updateCellSize(h),/\b((?:[a-z][\w-]+:(?:\/{1,3}|[a-z0-9%])|www\d{0,3}[.]|[a-z0-9.\-]+[.][a-z]{2,4}\/)(?:[^\s()<>]+|\(([^\s()<>]+|(\([^\s()<>]+\)))*\))+(?:\(([^\s()<>]+|(\([^\s()<>]+\)))*\)|[^\s`!()\[\]{};:'".,<>?«»“”‘’]))/i.test(h.value)&&c.setLinkForCell(h,h.value),h.geometry.width+=c.gridSize,h.geometry.height+=c.gridSize}finally{c.getModel().endUpdate()}return[h]}}return[]};EditorUi.prototype.formatFileSize=function(a){var c=-1;do a/=1024,c++;while(1024<a);return Math.max(a,.1).toFixed(1)+
+" kB; MB; GB; TB;PB;EB;ZB;YB".split(";")[c]};EditorUi.prototype.convertDataUri=function(a){if("data:"==a.substring(0,5)){var c=a.indexOf(";");0<c&&(a=a.substring(0,c)+a.substring(a.indexOf(",",c+1)))}return a};EditorUi.prototype.isRemoteFileFormat=function(a,b){return/(\.*<graphml xmlns=\".*)/.test(a)||/(\"contentType\":\s*\"application\/gliffy\+json\")/.test(a)||null!=b&&/(\.vsdx)($|\?)/i.test(b)||null!=b&&/(\.vssx)($|\?)/i.test(b)};EditorUi.prototype.importFile=function(a,b,d,e,h,l,n,k,q,t,x){t=
+null!=t?t:!0;var c=!1,f=null;"image"==b.substring(0,5)?(q=!1,"image/png"==b.substring(0,9)&&(b=x?null:this.extractGraphModelFromPng(a),null!=b&&0<b.length&&(f=this.importXml(b,d,e,t),q=!0)),q||(f=this.editor.graph,b=a.indexOf(";"),0<b&&(a=a.substring(0,b)+a.substring(a.indexOf(",",b+1))),t&&f.isGridEnabled()&&(d=f.snap(d),e=f.snap(e)),f=[f.insertVertex(null,null,"",d,e,h,l,"shape=image;verticalLabelPosition=bottom;labelBackgroundColor=#ffffff;verticalAlign=top;aspect=fixed;imageAspect=0;image="+a+
+";")])):!this.isOffline()&&(new XMLHttpRequest).upload&&this.isRemoteFileFormat(a,n)?(c=!0,this.parseFile(null!=q?q:new Blob([a],{type:"application/octet-stream"}),mxUtils.bind(this,function(a){if(4==a.readyState){var c=null;200<=a.status&&299>=a.status&&(a=a.responseText,null!=a&&"<mxlibrary"==a.substring(0,10)?(null!=n&&".vssx"==n.toLowerCase().substring(n.length-5)&&(n=n.substring(0,n.length-5)+".xml"),this.loadLibrary(new LocalLibrary(this,a,n))):c=this.importXml(a,d,e,t));null!=k&&k(c)}}),n)):
+/(\.vsd)($|\?)/i.test(n)||(f=this.insertTextAt(this.validateFileData(a),d,e,!0,null,t));c||null==k||k(f);return f};EditorUi.prototype.base64Encode=function(a){for(var c="",b=0,d=a.length,e,h,l;b<d;){e=a.charCodeAt(b++)&255;if(b==d){c+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(e>>2);c+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((e&3)<<4);c+="==";break}h=a.charCodeAt(b++);if(b==d){c+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(e>>
+2);c+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((e&3)<<4|(h&240)>>4);c+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((h&15)<<2);c+="=";break}l=a.charCodeAt(b++);c+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(e>>2);c+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((e&3)<<4|(h&240)>>4);c+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((h&15)<<2|(l&192)>>6);
+c+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(l&63)}return c};EditorUi.prototype.importFiles=function(a,b,d,e,h,l,n,k,q,t,x,w){b=null!=b?b:0;d=null!=d?d:0;e=null!=e?e:this.maxImageSize;t=null!=t?t:this.maxImageBytes;var c=null!=b&&null!=d,f=!0,g=!1;if(!mxClient.IS_CHROMEAPP&&null!=a)for(var p=x||this.resampleThreshold,m=0;m<a.length;m++)if("image/"==a[m].type.substring(0,6)&&a[m].size>p){g=!0;break}var r=mxUtils.bind(this,function(){var g=this.editor.graph,p=g.gridSize;
+h=null!=h?h:mxUtils.bind(this,function(a,b,d,f,e,g,k,h,p){return null!=a&&"<mxlibrary"==a.substring(0,10)?(this.spinner.stop(),this.loadLibrary(new LocalLibrary(this,a,k)),null):this.importFile(a,b,d,f,e,g,k,h,p,c,w)});l=null!=l?l:mxUtils.bind(this,function(a){g.setSelectionCells(a)});if(this.spinner.spin(document.body,mxResources.get("loading")))for(var m=a.length,q=m,r=[],u=mxUtils.bind(this,function(a,b){r[a]=b;if(0==--q){this.spinner.stop();if(null!=k)k(r);else{var c=[];g.getModel().beginUpdate();
+try{for(var d=0;d<r.length;d++){var f=r[d]();null!=f&&(c=c.concat(f))}}finally{g.getModel().endUpdate()}}l(c)}}),v=0;v<m;v++)mxUtils.bind(this,function(c){var g=a[c],k=new FileReader;k.onload=mxUtils.bind(this,function(a){if(null==n||n(g))if("image/"==g.type.substring(0,6))if("image/svg"==g.type.substring(0,9)){var k=a.target.result,m=k.indexOf(","),l=atob(k.substring(m+1)),q=mxUtils.parseXml(l),l=q.getElementsByTagName("svg");if(0<l.length){var l=l[0],r=w?null:l.getAttribute("content");null!=r&&
+"<"!=r.charAt(0)&&"%"!=r.charAt(0)&&(r=unescape(window.atob?atob(r):Base64.decode(r,!0)));null!=r&&"%"==r.charAt(0)&&(r=decodeURIComponent(r));null==r||"<mxfile "!==r.substring(0,8)&&"<mxGraphModel "!==r.substring(0,14)?u(c,mxUtils.bind(this,function(){try{if(k.substring(0,m+1),null!=q){var a=q.getElementsByTagName("svg");if(0<a.length){var f=a[0],l=parseFloat(f.getAttribute("width")),n=parseFloat(f.getAttribute("height")),t=f.getAttribute("viewBox");if(null==t||0==t.length)f.setAttribute("viewBox",
+"0 0 "+l+" "+n);else if(isNaN(l)||isNaN(n)){var r=t.split(" ");3<r.length&&(l=parseFloat(r[2]),n=parseFloat(r[3]))}k=this.createSvgDataUri(mxUtils.getXml(a[0]));var y=Math.min(1,Math.min(e/Math.max(1,l)),e/Math.max(1,n));return h(k,g.type,b+c*p,d+c*p,Math.max(1,Math.round(l*y)),Math.max(1,Math.round(n*y)),g.name)}}}catch(aa){}return null})):u(c,mxUtils.bind(this,function(){return h(r,"text/xml",b+c*p,d+c*p,0,0,g.name)}))}}else{l=!1;if("image/png"==g.type){var y=w?null:this.extractGraphModelFromPng(a.target.result);
+if(null!=y&&0<y.length){var O=new Image;O.src=a.target.result;u(c,mxUtils.bind(this,function(){return h(y,"text/xml",b+c*p,d+c*p,O.width,O.height,g.name)}));l=!0}}l||(mxClient.IS_CHROMEAPP?(this.spinner.stop(),this.showError(mxResources.get("error"),mxResources.get("dragAndDropNotSupported"),mxResources.get("cancel"),mxUtils.bind(this,function(){}),null,mxResources.get("ok"),mxUtils.bind(this,function(){this.actions.get("import").funct()}))):this.loadImage(a.target.result,mxUtils.bind(this,function(k){this.resizeImage(k,
+a.target.result,mxUtils.bind(this,function(k,m,l){u(c,mxUtils.bind(this,function(){if(null!=k&&k.length<t){var n=f&&this.isResampleImage(a.target.result,x)?Math.min(1,Math.min(e/m,e/l)):1;return h(k,g.type,b+c*p,d+c*p,Math.round(m*n),Math.round(l*n),g.name)}this.handleError({message:mxResources.get("imageTooBig")});return null}))}),f,e,x)})))}else h(a.target.result,g.type,b+c*p,d+c*p,240,160,g.name,function(a){u(c,function(){return a})})});/(\.vsdx)($|\?)/i.test(g.name)||/(\.vssx)($|\?)/i.test(g.name)?
+h(null,g.type,b+c*p,d+c*p,240,160,g.name,function(a){u(c,function(){return a})},g):"image"==g.type.substring(0,5)?k.readAsDataURL(g):k.readAsText(g)})(v)});g?this.confirmImageResize(function(a){f=a;r()},q):r()};EditorUi.prototype.confirmImageResize=function(a,b){b=null!=b?b:!1;var c=null!=this.spinner&&null!=this.spinner.pause?this.spinner.pause():function(){},d=isLocalStorage||mxClient.IS_CHROMEAPP?mxSettings.getResizeImages():null,f=function(d,f){if(d||b)mxSettings.setResizeImages(d?f:null),mxSettings.save();
 c();a(f)};null==d||b?this.showDialog((new ConfirmDialog(this,mxResources.get("resizeLargeImages"),function(a){f(a,!0)},function(a){f(a,!1)},mxResources.get("resize"),mxResources.get("actualSize"),'<img style="margin-top:8px;" src="'+Editor.loResImage+'"/>','<img style="margin-top:8px;" src="'+Editor.hiResImage+'"/>',isLocalStorage||mxClient.IS_CHROMEAPP)).container,340,isLocalStorage||mxClient.IS_CHROMEAPP?220:200,!0,!0):f(!1,d)};EditorUi.prototype.parseFile=function(a,b,d){d=null!=d?d:a.name;var c=
-new FormData;c.append("format","xml");c.append("upfile",a,d);var f=new XMLHttpRequest;f.open("POST",OPEN_URL);f.onreadystatechange=function(){b(f)};f.send(c)};EditorUi.prototype.isResampleImage=function(a,b){b=null!=b?b:this.resampleThreshold;return a.length>b};EditorUi.prototype.resizeImage=function(a,b,d,e,g,l){g=null!=g?g:this.maxImageSize;var c=Math.max(1,a.width),f=Math.max(1,a.height);if(e&&this.isResampleImage(b,l))try{var h=Math.max(c/g,f/g);if(1<h){var m=Math.round(c/h),n=Math.round(f/h),
-p=document.createElement("canvas");p.width=m;p.height=n;p.getContext("2d").drawImage(a,0,0,m,n);var q=p.toDataURL();if(q.length<b.length){var u=document.createElement("canvas");u.width=m;u.height=n;var y=u.toDataURL();q!==y&&(b=q,c=m,f=n)}}}catch(C){}d(b,c,f)};EditorUi.prototype.crcTable=[];for(var e=0;256>e;e++)for(var d=e,g=0;8>g;g++)d=1==(d&1)?3988292384^d>>>1:d>>>1,EditorUi.prototype.crcTable[e]=d;EditorUi.prototype.updateCRC=function(a,b,d,e){for(var c=0;c<e;c++)a=EditorUi.prototype.crcTable[(a^
-b[d+c])&255]^a>>>8;return a};EditorUi.prototype.writeGraphModelToPng=function(a,b,d,e,g){function c(a,b){var c=m;m+=b;return a.substring(c,m)}function f(a){a=c(a,4);return a.charCodeAt(3)+(a.charCodeAt(2)<<8)+(a.charCodeAt(1)<<16)+(a.charCodeAt(0)<<24)}function h(a){return String.fromCharCode(a>>24&255,a>>16&255,a>>8&255,a&255)}a=a.substring(a.indexOf(",")+1);a=window.atob?atob(a):Base64.decode(a,!0);var m=0;if(c(a,8)!=String.fromCharCode(137)+"PNG"+String.fromCharCode(13,10,26,10))null!=g&&g();else if(c(a,
-4),"IHDR"!=c(a,4))null!=g&&g();else{c(a,17);g=a.substring(0,m);do{var n=f(a);if("IDAT"==c(a,4)){g=a.substring(0,m-8);d=d+String.fromCharCode(0)+("zTXt"==b?String.fromCharCode(0):"")+e;e=4294967295;e=this.updateCRC(e,b,0,4);e=this.updateCRC(e,d,0,d.length);g+=h(d.length)+b+d+h(e^4294967295);g+=a.substring(m-8,a.length);break}g+=a.substring(m-8,m-4+n);e=c(a,n);c(a,4)}while(n);return"data:image/png;base64,"+(window.btoa?btoa(g):Base64.encode(g,!0))}};EditorUi.prototype.extractGraphModelFromPng=function(a){var b=
-null;try{var c=a.substring(a.indexOf(",")+1),d=window.atob&&!mxClient.IS_SF?atob(c):Base64.decode(c,!0);EditorUi.parsePng(d,mxUtils.bind(this,function(a,c,f){a=d.substring(a+8,a+8+f);"zTXt"==c?(f=a.indexOf(String.fromCharCode(0)),"mxGraphModel"==a.substring(0,f)&&(a=this.editor.graph.bytesToString(pako.inflateRaw(a.substring(f+2))).replace(/\+/g," "),null!=a&&0<a.length&&(b=a))):"tEXt"==c&&(a=a.split(String.fromCharCode(0)),1<a.length&&"mxGraphModel"==a[0]&&(b=a[1]));if(null!=b||"IDAT"==c)return!0}))}catch(n){}null!=
+new FormData;c.append("format","xml");c.append("upfile",a,d);var f=new XMLHttpRequest;f.open("POST",OPEN_URL);f.onreadystatechange=function(){b(f)};f.send(c)};EditorUi.prototype.isResampleImage=function(a,b){b=null!=b?b:this.resampleThreshold;return a.length>b};EditorUi.prototype.resizeImage=function(a,b,d,e,h,l){h=null!=h?h:this.maxImageSize;var c=Math.max(1,a.width),f=Math.max(1,a.height);if(e&&this.isResampleImage(b,l))try{var g=Math.max(c/h,f/h);if(1<g){var p=Math.round(c/g),m=Math.round(f/g),
+n=document.createElement("canvas");n.width=p;n.height=m;n.getContext("2d").drawImage(a,0,0,p,m);var q=n.toDataURL();if(q.length<b.length){var u=document.createElement("canvas");u.width=p;u.height=m;var z=u.toDataURL();q!==z&&(b=q,c=p,f=m)}}}catch(C){}d(b,c,f)};EditorUi.prototype.crcTable=[];for(var e=0;256>e;e++)for(var d=e,h=0;8>h;h++)d=1==(d&1)?3988292384^d>>>1:d>>>1,EditorUi.prototype.crcTable[e]=d;EditorUi.prototype.updateCRC=function(a,b,d,e){for(var c=0;c<e;c++)a=EditorUi.prototype.crcTable[(a^
+b[d+c])&255]^a>>>8;return a};EditorUi.prototype.writeGraphModelToPng=function(a,b,d,e,h){function c(a,b){var c=p;p+=b;return a.substring(c,p)}function f(a){a=c(a,4);return a.charCodeAt(3)+(a.charCodeAt(2)<<8)+(a.charCodeAt(1)<<16)+(a.charCodeAt(0)<<24)}function g(a){return String.fromCharCode(a>>24&255,a>>16&255,a>>8&255,a&255)}a=a.substring(a.indexOf(",")+1);a=window.atob?atob(a):Base64.decode(a,!0);var p=0;if(c(a,8)!=String.fromCharCode(137)+"PNG"+String.fromCharCode(13,10,26,10))null!=h&&h();else if(c(a,
+4),"IHDR"!=c(a,4))null!=h&&h();else{c(a,17);h=a.substring(0,p);do{var m=f(a);if("IDAT"==c(a,4)){h=a.substring(0,p-8);d=d+String.fromCharCode(0)+("zTXt"==b?String.fromCharCode(0):"")+e;e=4294967295;e=this.updateCRC(e,b,0,4);e=this.updateCRC(e,d,0,d.length);h+=g(d.length)+b+d+g(e^4294967295);h+=a.substring(p-8,a.length);break}h+=a.substring(p-8,p-4+m);e=c(a,m);c(a,4)}while(m);return"data:image/png;base64,"+(window.btoa?btoa(h):Base64.encode(h,!0))}};EditorUi.prototype.extractGraphModelFromPng=function(a){var b=
+null;try{var c=a.substring(a.indexOf(",")+1),d=window.atob&&!mxClient.IS_SF?atob(c):Base64.decode(c,!0);EditorUi.parsePng(d,mxUtils.bind(this,function(a,c,f){a=d.substring(a+8,a+8+f);"zTXt"==c?(f=a.indexOf(String.fromCharCode(0)),"mxGraphModel"==a.substring(0,f)&&(a=this.editor.graph.bytesToString(pako.inflateRaw(a.substring(f+2))).replace(/\+/g," "),null!=a&&0<a.length&&(b=a))):"tEXt"==c&&(a=a.split(String.fromCharCode(0)),1<a.length&&"mxGraphModel"==a[0]&&(b=a[1]));if(null!=b||"IDAT"==c)return!0}))}catch(m){}null!=
 b&&"%"==b.charAt(0)&&(b=decodeURIComponent(b));null!=b&&"%"==b.charAt(0)&&(b=decodeURIComponent(b));return b};EditorUi.prototype.loadImage=function(a,b,d){var c=new Image;c.onload=function(){b(c)};null!=d&&(c.onerror=d);c.src=a};var l=EditorUi.prototype.init;EditorUi.prototype.init=function(){function a(a){var c=a.indexOf(",");0<c&&(a=b.getPageById(a.substring(c+1)))&&b.selectPage(a)}"undefined"!==typeof window.mxSettings&&(this.formatWidth=mxSettings.getFormatWidth());var b=this,d=this.editor.graph,
-e=b.editor.getEditBlankUrl;this.editor.getEditBlankUrl=function(a){a=null!=a?a:"";if(null!=b.pages&&null!=b.currentPage)for(var c=0;c<b.pages.length;c++)if(b.pages[c]==b.currentPage){0<c&&(a+=(0<a.length?"&":"?")+"page="+c);break}"1"==urlParams.dev&&(a+=(0<a.length?"&":"?")+"dev=1&drawdev=1");return e.apply(this,arguments)};var g=d.addClickHandler;d.addClickHandler=function(b,c,f){var e=c;c=function(b,c){if(null==c){var f=mxEvent.getSource(b);"a"==f.nodeName.toLowerCase()&&(c=f.getAttribute("href"))}null==
-c||!d.isPageLink(c)||!mxEvent.isTouchEvent(b)&&mxEvent.isPopupTrigger(b)||(a(c),mxEvent.consume(b));null!=e&&e(b,c)};g.call(this,b,c,f)};l.apply(this,arguments);mxClient.IS_SVG&&this.editor.graph.addSvgShadow(d.view.canvas.ownerSVGElement,null,!0);b.actions.get("print").funct=function(){b.showDialog((new PrintDialog(b)).container,360,null!=b.pages&&1<b.pages.length?420:360,!0,!0)};this.defaultFilename=mxResources.get("untitledDiagram");var p=d.getGlobalVariable;d.getGlobalVariable=function(a){return"page"==
-a&&null!=b.currentPage?b.currentPage.getName():"pagenumber"==a?null!=b.currentPage&&null!=b.pages?mxUtils.indexOf(b.pages,b.currentPage)+1:1:p.apply(this,arguments)};var q=d.createLinkForHint;d.createLinkForHint=function(c,f){var e=d.isPageLink(c);if(e){var h=c.indexOf(",");0<h&&(h=b.getPageById(c.substring(h+1)),f=null!=h?h.getName():mxResources.get("pageNotFound"))}h=q.call(this,c,f);e&&mxEvent.addListener(h,"click",function(b){a(c);mxEvent.consume(b)});return h};var k=d.labelLinkClicked;d.labelLinkClicked=
-function(b,c,f){var e=c.getAttribute("href");null==e||!d.isPageLink(e)||!mxEvent.isTouchEvent(f)&&mxEvent.isPopupTrigger(f)?k.apply(this,arguments):(d.isEnabled()||a(e),mxEvent.consume(f))};this.editor.getOrCreateFilename=function(){var a=b.defaultFilename,c=b.getCurrentFile();null!=c&&(a=null!=c.getTitle()?c.getTitle():a);return a};var t=this.actions.get("print");t.setEnabled(!mxClient.IS_IOS||!navigator.standalone);t.visible=t.isEnabled();if(!this.editor.chromeless||this.editor.editable){var v=
+e=b.editor.getEditBlankUrl;this.editor.getEditBlankUrl=function(a){a=null!=a?a:"";if(null!=b.pages&&null!=b.currentPage)for(var c=0;c<b.pages.length;c++)if(b.pages[c]==b.currentPage){0<c&&(a+=(0<a.length?"&":"?")+"page="+c);break}"1"==urlParams.dev&&(a+=(0<a.length?"&":"?")+"dev=1&drawdev=1");return e.apply(this,arguments)};var h=d.addClickHandler;d.addClickHandler=function(b,c,f){var e=c;c=function(b,c){if(null==c){var f=mxEvent.getSource(b);"a"==f.nodeName.toLowerCase()&&(c=f.getAttribute("href"))}null==
+c||!d.isPageLink(c)||!mxEvent.isTouchEvent(b)&&mxEvent.isPopupTrigger(b)||(a(c),mxEvent.consume(b));null!=e&&e(b,c)};h.call(this,b,c,f)};l.apply(this,arguments);mxClient.IS_SVG&&this.editor.graph.addSvgShadow(d.view.canvas.ownerSVGElement,null,!0);b.actions.get("print").funct=function(){b.showDialog((new PrintDialog(b)).container,360,null!=b.pages&&1<b.pages.length?420:360,!0,!0)};this.defaultFilename=mxResources.get("untitledDiagram");var n=d.getGlobalVariable;d.getGlobalVariable=function(a){return"page"==
+a&&null!=b.currentPage?b.currentPage.getName():"pagenumber"==a?null!=b.currentPage&&null!=b.pages?mxUtils.indexOf(b.pages,b.currentPage)+1:1:n.apply(this,arguments)};var q=d.createLinkForHint;d.createLinkForHint=function(c,f){var e=d.isPageLink(c);if(e){var g=c.indexOf(",");0<g&&(g=b.getPageById(c.substring(g+1)),f=null!=g?g.getName():mxResources.get("pageNotFound"))}g=q.call(this,c,f);e&&mxEvent.addListener(g,"click",function(b){a(c);mxEvent.consume(b)});return g};var k=d.labelLinkClicked;d.labelLinkClicked=
+function(b,c,f){var e=c.getAttribute("href");null==e||!d.isPageLink(e)||!mxEvent.isTouchEvent(f)&&mxEvent.isPopupTrigger(f)?k.apply(this,arguments):(d.isEnabled()||a(e),mxEvent.consume(f))};this.editor.getOrCreateFilename=function(){var a=b.defaultFilename,c=b.getCurrentFile();null!=c&&(a=null!=c.getTitle()?c.getTitle():a);return a};var v=this.actions.get("print");v.setEnabled(!mxClient.IS_IOS||!navigator.standalone);v.visible=v.isEnabled();if(!this.editor.chromeless||this.editor.editable){var t=
 function(){window.setTimeout(function(){x.innerHTML="&nbsp;";x.focus();document.execCommand("selectAll",!1,null)},0)};this.keyHandler.bindAction(70,!0,"find");this.keyHandler.bindAction(67,!0,"copyStyle",!0);this.keyHandler.bindAction(86,!0,"pasteStyle",!0);this.keyHandler.bindAction(77,!0,"editGeometry",!0);this.keyHandler.bindAction(88,!0,"insertText",!0);this.keyHandler.bindAction(75,!0,"insertRectangle");this.keyHandler.bindAction(75,!0,"insertEllipse",!0);mxClient.IS_IE||d.container.addEventListener("paste",
-mxUtils.bind(this,function(a){var b=this.editor.graph;if(!mxEvent.isConsumed(a))try{for(var c=a.clipboardData||a.originalEvent.clipboardData,d=!1,f=0;f<c.types.length;f++)if("text/"===c.types[f].substring(0,5)){d=!0;break}if(!d){var e=c.items;for(index in e){var h=e[index];if("file"===h.kind){if(b.isEditing())this.importFiles([h.getAsFile()],0,0,this.maxImageSize,function(a,c,d,f,e,h){b.insertImage(a,e,h)},function(){},function(a){return"image/"==a.type.substring(0,6)},function(a){for(var b=0;b<a.length;b++)a[b]()});
-else{var k=this.editor.graph.getInsertPoint();this.importFiles([h.getAsFile()],k.x,k.y,this.maxImageSize);mxEvent.consume(a)}break}}}}catch(U){}}),!1);var x=document.createElement("div");x.style.position="absolute";x.style.whiteSpace="nowrap";x.style.overflow="hidden";x.style.display="block";x.contentEditable=!0;mxUtils.setOpacity(x,0);x.style.width="1px";x.style.height="1px";x.innerHTML="&nbsp;";var w=!1;this.keyHandler.bindControlKey(88,null);this.keyHandler.bindControlKey(67,null);this.keyHandler.bindControlKey(86,
+mxUtils.bind(this,function(a){var b=this.editor.graph;if(!mxEvent.isConsumed(a))try{for(var c=a.clipboardData||a.originalEvent.clipboardData,d=!1,f=0;f<c.types.length;f++)if("text/"===c.types[f].substring(0,5)){d=!0;break}if(!d){var e=c.items;for(index in e){var g=e[index];if("file"===g.kind){if(b.isEditing())this.importFiles([g.getAsFile()],0,0,this.maxImageSize,function(a,c,d,f,e,g){b.insertImage(a,e,g)},function(){},function(a){return"image/"==a.type.substring(0,6)},function(a){for(var b=0;b<a.length;b++)a[b]()});
+else{var k=this.editor.graph.getInsertPoint();this.importFiles([g.getAsFile()],k.x,k.y,this.maxImageSize);mxEvent.consume(a)}break}}}}catch(S){}}),!1);var x=document.createElement("div");x.style.position="absolute";x.style.whiteSpace="nowrap";x.style.overflow="hidden";x.style.display="block";x.contentEditable=!0;mxUtils.setOpacity(x,0);x.style.width="1px";x.style.height="1px";x.innerHTML="&nbsp;";var w=!1;this.keyHandler.bindControlKey(88,null);this.keyHandler.bindControlKey(67,null);this.keyHandler.bindControlKey(86,
 null);mxEvent.addListener(document,"keydown",mxUtils.bind(this,function(a){var b=mxEvent.getSource(a);null==d.container||!d.isEnabled()||d.isMouseDown||d.isEditing()||null!=this.dialog||"INPUT"==b.nodeName||"TEXTAREA"==b.nodeName||!(224==a.keyCode||!mxClient.IS_MAC&&17==a.keyCode||mxClient.IS_MAC&&91==a.keyCode)||w||(x.style.left=d.container.scrollLeft+10+"px",x.style.top=d.container.scrollTop+10+"px",d.container.appendChild(x),w=!0,mxClient.IS_QUIRKS?window.setTimeout(function(){x.focus();document.execCommand("selectAll",
-!1,null)},0):(x.focus(),document.execCommand("selectAll",!1,null)))}));mxEvent.addListener(document,"keyup",mxUtils.bind(this,function(a){var b=a.keyCode;window.setTimeout(mxUtils.bind(this,function(){!w||224!=b&&17!=b&&91!=b||(w=!1,d.isEditing()||null!=this.dialog||null==d.container||d.container.focus(),x.parentNode.removeChild(x))}),0)}));mxEvent.addListener(x,"copy",mxUtils.bind(this,function(a){d.isEnabled()&&(mxClipboard.copy(d),this.copyCells(x),v())}));mxEvent.addListener(x,"cut",mxUtils.bind(this,
-function(a){d.isEnabled()&&(this.copyCells(x,!0),v())}));mxEvent.addListener(x,"paste",mxUtils.bind(this,function(a){d.isEnabled()&&!d.isCellLocked(d.getDefaultParent())&&(x.innerHTML="&nbsp;",x.focus(),window.setTimeout(mxUtils.bind(this,function(){this.pasteCells(a,x);x.innerHTML="&nbsp;"}),0))}),!0);var D=this.isSelectionAllowed;this.isSelectionAllowed=function(a){return mxEvent.getSource(a)==x?!0:D.apply(this,arguments)}}this.spinner=this.createSpinner(document.body.clientWidth/2-2,Math.max(document.body.clientHeight||
+!1,null)},0):(x.focus(),document.execCommand("selectAll",!1,null)))}));mxEvent.addListener(document,"keyup",mxUtils.bind(this,function(a){var b=a.keyCode;window.setTimeout(mxUtils.bind(this,function(){!w||224!=b&&17!=b&&91!=b||(w=!1,d.isEditing()||null!=this.dialog||null==d.container||d.container.focus(),x.parentNode.removeChild(x))}),0)}));mxEvent.addListener(x,"copy",mxUtils.bind(this,function(a){d.isEnabled()&&(mxClipboard.copy(d),this.copyCells(x),t())}));mxEvent.addListener(x,"cut",mxUtils.bind(this,
+function(a){d.isEnabled()&&(this.copyCells(x,!0),t())}));mxEvent.addListener(x,"paste",mxUtils.bind(this,function(a){d.isEnabled()&&!d.isCellLocked(d.getDefaultParent())&&(x.innerHTML="&nbsp;",x.focus(),window.setTimeout(mxUtils.bind(this,function(){this.pasteCells(a,x);x.innerHTML="&nbsp;"}),0))}),!0);var D=this.isSelectionAllowed;this.isSelectionAllowed=function(a){return mxEvent.getSource(a)==x?!0:D.apply(this,arguments)}}this.spinner=this.createSpinner(document.body.clientWidth/2-2,Math.max(document.body.clientHeight||
 0,document.documentElement.clientHeight||0)/2,24);Graph.fileSupport&&this.editor.graph.addListener(mxEvent.EDITING_STARTED,mxUtils.bind(this,function(a){var b=this.editor.graph,c=b.cellEditor.text2,d=null;null!=c&&(mxEvent.addListener(c,"dragleave",function(a){null!=d&&(d.parentNode.removeChild(d),d=null);a.stopPropagation();a.preventDefault()}),mxEvent.addListener(c,"dragover",mxUtils.bind(this,function(a){null==d&&(!mxClient.IS_IE||10<document.documentMode)&&(d=this.highlightElement(c));a.stopPropagation();
-a.preventDefault()})),mxEvent.addListener(c,"drop",mxUtils.bind(this,function(a){null!=d&&(d.parentNode.removeChild(d),d=null);if(0<a.dataTransfer.files.length)this.importFiles(a.dataTransfer.files,0,0,this.maxImageSize,function(a,c,d,f,e,h){b.insertImage(a,e,h)},function(){},function(a){return"image/"==a.type.substring(0,6)},function(a){for(var b=0;b<a.length;b++)a[b]()},mxEvent.isControlDown(a));else if(0<=mxUtils.indexOf(a.dataTransfer.types,"text/uri-list")){var c=a.dataTransfer.getData("text/uri-list");
+a.preventDefault()})),mxEvent.addListener(c,"drop",mxUtils.bind(this,function(a){null!=d&&(d.parentNode.removeChild(d),d=null);if(0<a.dataTransfer.files.length)this.importFiles(a.dataTransfer.files,0,0,this.maxImageSize,function(a,c,d,f,e,g){b.insertImage(a,e,g)},function(){},function(a){return"image/"==a.type.substring(0,6)},function(a){for(var b=0;b<a.length;b++)a[b]()},mxEvent.isControlDown(a));else if(0<=mxUtils.indexOf(a.dataTransfer.types,"text/uri-list")){var c=a.dataTransfer.getData("text/uri-list");
 /\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(c)?this.loadImage(decodeURIComponent(c),mxUtils.bind(this,function(a){var d=Math.max(1,a.width);a=Math.max(1,a.height);var f=this.maxImageSize,f=Math.min(1,Math.min(f/Math.max(1,d)),f/Math.max(1,a));b.insertImage(decodeURIComponent(c),d*f,a*f)})):document.execCommand("insertHTML",!1,a.dataTransfer.getData("text/plain"))}else 0<=mxUtils.indexOf(a.dataTransfer.types,"text/html")?document.execCommand("insertHTML",!1,a.dataTransfer.getData("text/html")):0<=mxUtils.indexOf(a.dataTransfer.types,
-"text/plain")&&document.execCommand("insertHTML",!1,a.dataTransfer.getData("text/plain"));a.stopPropagation();a.preventDefault()})))}));if("1"==urlParams.ruler&&"undefined"!==typeof mxRuler){t=document.createElement("div");t.style.position="absolute";t.style.top="95px";t.style.left="250px";t.style.width="2000px";t.style.height="30px";t.style.background="whiteSmoke";document.body.appendChild(t);var B=document.createElement("div");B.style.position="absolute";B.style.top="125px";B.style.left="220px";
-B.style.width="30px";B.style.height="1000px";B.style.background="whiteSmoke";document.body.appendChild(B);var y=document.createElement("div");y.style.position="absolute";y.style.top="95px";y.style.left="220px";y.style.width="30px";y.style.height="30px";y.style.background="whiteSmoke";document.body.appendChild(y);this.vRuler=new mxRuler(this.editor.graph,B,!0);this.hRuler=new mxRuler(this.editor.graph,t,!1)}if("1"==urlParams.test){t=document.getElementById("geFooter");null!=t&&(this.styleInput=document.createElement("input"),
-this.styleInput.setAttribute("type","text"),this.styleInput.style.position="absolute",this.styleInput.style.top="14px",this.styleInput.style.left="2px",this.styleInput.style.width="98%",this.styleInput.style.visibility="hidden",this.styleInput.style.opacity="0.9",mxEvent.addListener(this.styleInput,"change",mxUtils.bind(this,function(){this.editor.graph.getModel().setStyle(this.editor.graph.getSelectionCell(),this.styleInput.value)})),t.appendChild(this.styleInput),this.editor.graph.getSelectionModel().addListener(mxEvent.CHANGE,
-mxUtils.bind(this,function(a,b){if(0<this.editor.graph.getSelectionCount()){var c=this.editor.graph.getSelectionCell(),c=this.editor.graph.getModel().getStyle(c);this.styleInput.value=c||"";this.styleInput.style.visibility="visible"}else this.styleInput.style.visibility="hidden"})));var C=this.isSelectionAllowed;this.isSelectionAllowed=function(a){return mxEvent.getSource(a)==this.styleInput?!0:C.apply(this,arguments)}}t=document.getElementById("geInfo");null!=t&&t.parentNode.removeChild(t);if(Graph.fileSupport&&
-(!this.editor.chromeless||this.editor.editable)){var A=null;mxEvent.addListener(d.container,"dragleave",function(a){d.isEnabled()&&(null!=A&&(A.parentNode.removeChild(A),A=null),a.stopPropagation(),a.preventDefault())});mxEvent.addListener(d.container,"dragover",mxUtils.bind(this,function(a){null==A&&(!mxClient.IS_IE||10<document.documentMode)&&(A=this.highlightElement(d.container));null!=this.sidebar&&this.sidebar.hideTooltip();a.stopPropagation();a.preventDefault()}));mxEvent.addListener(d.container,
-"drop",mxUtils.bind(this,function(a){null!=A&&(A.parentNode.removeChild(A),A=null);if(d.isEnabled()){var b=mxUtils.convertPoint(d.container,mxEvent.getClientX(a),mxEvent.getClientY(a)),c=d.view.translate,f=d.view.scale,e=b.x/f-c.x,h=b.y/f-c.y;mxEvent.isAltDown(a)&&(h=e=0);if(0<a.dataTransfer.files.length)this.importFiles(a.dataTransfer.files,e,h,this.maxImageSize,null,null,null,null,mxEvent.isControlDown(a),null,null,mxEvent.isShiftDown(a));else{var k=0<=mxUtils.indexOf(a.dataTransfer.types,"text/uri-list")?
-a.dataTransfer.getData("text/uri-list"):null,b=this.extractGraphModelFromEvent(a,null!=this.pages);if(null!=b)d.setSelectionCells(this.importXml(b,e,h,!0));else if(0<=mxUtils.indexOf(a.dataTransfer.types,"text/html")){var g=a.dataTransfer.getData("text/html"),b=document.createElement("div");b.innerHTML=g;var m=null,c=b.getElementsByTagName("img");null!=c&&1==c.length?(g=c[0].getAttribute("src"),/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(g)||(m=!0)):(b=b.getElementsByTagName("a"),null!=b&&1==b.length&&
-(g=b[0].getAttribute("href")));var n=!0,l=mxUtils.bind(this,function(){d.setSelectionCells(this.insertTextAt(g,e,h,!0,m,null,n))});m&&g.length>this.resampleThreshold?this.confirmImageResize(function(a){n=a;l()},mxEvent.isControlDown(a)):l()}else null!=k&&/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(k)?this.loadImage(decodeURIComponent(k),mxUtils.bind(this,function(a){var b=Math.max(1,a.width);a=Math.max(1,a.height);var c=this.maxImageSize,c=Math.min(1,Math.min(c/Math.max(1,b)),c/Math.max(1,a));d.setSelectionCell(d.insertVertex(null,
-null,"",e,h,b*c,a*c,"shape=image;verticalLabelPosition=bottom;labelBackgroundColor=#ffffff;verticalAlign=top;aspect=fixed;imageAspect=0;image="+k+";"))}),mxUtils.bind(this,function(a){d.setSelectionCells(this.insertTextAt(k,e,h,!0))})):0<=mxUtils.indexOf(a.dataTransfer.types,"text/plain")&&d.setSelectionCells(this.insertTextAt(a.dataTransfer.getData("text/plain"),e,h,!0))}}a.stopPropagation();a.preventDefault()}),!1)}this.initPages();"1"==urlParams.embed&&this.initializeEmbedMode();"undefined"!==
-typeof window.mxSettings&&this.installSettings()};EditorUi.prototype.installSettings=function(){if(isLocalStorage||mxClient.IS_CHROMEAPP){ColorDialog.recentColors=mxSettings.getRecentColors();this.editor.graph.currentEdgeStyle=mxSettings.getCurrentEdgeStyle();this.editor.graph.currentVertexStyle=mxSettings.getCurrentVertexStyle();this.fireEvent(new mxEventObject("styleChanged","keys",[],"values",[],"cells",[]));this.addListener("styleChanged",mxUtils.bind(this,function(a,b){mxSettings.setCurrentEdgeStyle(this.editor.graph.currentEdgeStyle);
-mxSettings.setCurrentVertexStyle(this.editor.graph.currentVertexStyle);mxSettings.save()}));this.editor.graph.connectionHandler.setCreateTarget(mxSettings.isCreateTarget());this.fireEvent(new mxEventObject("copyConnectChanged"));this.addListener("copyConnectChanged",mxUtils.bind(this,function(a,b){mxSettings.setCreateTarget(this.editor.graph.connectionHandler.isCreateTarget());mxSettings.save()}));this.editor.graph.pageFormat=mxSettings.getPageFormat();this.addListener("pageFormatChanged",mxUtils.bind(this,
-function(a,b){mxSettings.setPageFormat(this.editor.graph.pageFormat);mxSettings.save()}));this.editor.graph.view.gridColor=mxSettings.getGridColor();this.addListener("gridColorChanged",mxUtils.bind(this,function(a,b){mxSettings.setGridColor(this.editor.graph.view.gridColor);mxSettings.save()}));if(mxClient.IS_CHROMEAPP||EditorUi.isElectronApp)this.editor.addListener("autosaveChanged",mxUtils.bind(this,function(a,b){mxSettings.setAutosave(this.editor.autosave);mxSettings.save()})),this.editor.autosave=
-mxSettings.getAutosave();null!=this.sidebar&&this.sidebar.showPalette("search",mxSettings.settings.search);this.editor.chromeless&&!this.editor.editable||null==this.sidebar||!(mxSettings.settings.isNew||8>=parseInt(mxSettings.settings.version||0))||(this.toggleScratchpad(),mxSettings.save());this.addListener("formatWidthChanged",function(){mxSettings.setFormatWidth(this.formatWidth);mxSettings.save()})}};EditorUi.prototype.copyCells=function(a,b){var c=this.editor.graph;if(c.isSelectionEmpty())a.innerHTML=
-"";else{var d=mxUtils.sortCells(c.model.getTopmostCells(c.getSelectionCells())),f=mxUtils.getXml(this.editor.graph.encodeCells(d));mxUtils.setTextContent(a,encodeURIComponent(f));b?(c.removeCells(d,!1),c.lastPasteXml=null):(c.lastPasteXml=f,c.pasteCounter=0);a.focus();document.execCommand("selectAll",!1,null)}};EditorUi.prototype.pasteCells=function(a,b){if(!mxEvent.isConsumed(a)){var c=b.getElementsByTagName("span");if(null!=c&&0<c.length&&"application/vnd.lucid.chart.objects"===c[0].getAttribute("data-lucid-type")){var d=
-c[0].getAttribute("data-lucid-content");null!=d&&0<d.length&&(this.importLucidChart(d,0,0),mxEvent.consume(a))}else{var d=this.editor.graph,f=mxUtils.trim(mxClient.IS_QUIRKS||8==document.documentMode?mxUtils.getTextContent(b):b.textContent),e=!1;try{var g=f.lastIndexOf("%3E");0<=g&&g<f.length-3&&(f=f.substring(0,g+3))}catch(t){}try{var c=b.getElementsByTagName("span"),k=null!=c&&0<c.length?mxUtils.trim(decodeURIComponent(c[0].textContent)):decodeURIComponent(f);this.isCompatibleString(k)&&(e=!0,f=
-k)}catch(t){}d.lastPasteXml==f?d.pasteCounter++:(d.lastPasteXml=f,d.pasteCounter=0);c=d.pasteCounter*d.gridSize;if(null!=f&&0<f.length&&(e||this.isCompatibleString(f)?d.setSelectionCells(this.importXml(f,c,c)):(e=d.getInsertPoint(),d.isMouseInsertPoint()&&(c=0,d.lastPasteXml==f&&0<d.pasteCounter&&d.pasteCounter--),d.setSelectionCells(this.insertTextAt(f,e.x+c,e.y+c,!0))),!d.isSelectionEmpty())){d.scrollCellToVisible(d.getSelectionCell());null!=this.hoverIcons&&this.hoverIcons.update(d.view.getState(d.getSelectionCell()));
-try{mxEvent.consume(a)}catch(t){}}}}};EditorUi.prototype.addFileDropHandler=function(a){if(Graph.fileSupport)for(var b=null,c=0;c<a.length;c++)mxEvent.addListener(a[c],"dragleave",function(a){null!=b&&(b.parentNode.removeChild(b),b=null);a.stopPropagation();a.preventDefault()}),mxEvent.addListener(a[c],"dragover",mxUtils.bind(this,function(a){(this.editor.graph.isEnabled()||"1"!=urlParams.embed)&&null==b&&(!mxClient.IS_IE||10<document.documentMode&&12>document.documentMode)&&(b=this.highlightElement());
-a.stopPropagation();a.preventDefault()})),mxEvent.addListener(a[c],"drop",mxUtils.bind(this,function(a){null!=b&&(b.parentNode.removeChild(b),b=null);if(this.editor.graph.isEnabled()||"1"!=urlParams.embed)if(0<a.dataTransfer.files.length)this.hideDialog(),"1"==urlParams.embed?this.importFiles(a.dataTransfer.files,0,0,this.maxImageSize,null,null,null,null,!mxEvent.isControlDown(a)&&!mxEvent.isShiftDown(a)):this.openFiles(a.dataTransfer.files,!0);else{var c=this.extractGraphModelFromEvent(a);if(null==
-c){var d=null!=a.dataTransfer?a.dataTransfer:a.clipboardData;null!=d&&(10==document.documentMode||11==document.documentMode?c=d.getData("Text"):(c=null,c=0<=mxUtils.indexOf(d.types,"text/uri-list")?a.dataTransfer.getData("text/uri-list"):0<=mxUtils.indexOf(d.types,"text/html")?d.getData("text/html"):null,null!=c&&0<c.length?(d=document.createElement("div"),d.innerHTML=c,d=d.getElementsByTagName("img"),0<d.length&&(c=d[0].getAttribute("src"))):0<=mxUtils.indexOf(d.types,"text/plain")&&(c=d.getData("text/plain"))),
-null!=c&&("data:image/png;base64,"==c.substring(0,22)?(c=this.extractGraphModelFromPng(c),null!=c&&0<c.length&&this.openLocalFile(c,null,!0)):!this.isOffline()&&this.isRemoteFileFormat(c)?(new mxXmlRequest(OPEN_URL,"format=xml&data="+encodeURIComponent(c))).send(mxUtils.bind(this,function(a){200<=a.getStatus()&&299>=a.getStatus()&&this.openLocalFile(a.getText(),null,!0)})):/^https?:\/\//.test(c)&&(null==this.getCurrentFile()?window.location.hash="#U"+encodeURIComponent(c):window.openWindow((mxClient.IS_CHROMEAPP?
-"https://www.draw.io/":"https://"+location.host+"/")+window.location.search+"#U"+encodeURIComponent(c)))))}else this.openLocalFile(c,null,!0)}a.stopPropagation();a.preventDefault()}))};EditorUi.prototype.highlightElement=function(a){var b=0,c=0,d,e;if(null==a){e=document.body;var g=document.documentElement;d=(e.clientWidth||g.clientWidth)-3;e=Math.max(e.clientHeight||0,g.clientHeight)-3}else b=a.offsetTop,c=a.offsetLeft,d=a.clientWidth,e=a.clientHeight;g=document.createElement("div");g.style.zIndex=
-mxPopupMenu.prototype.zIndex+2;g.style.border="3px dotted rgb(254, 137, 12)";g.style.pointerEvents="none";g.style.position="absolute";g.style.top=b+"px";g.style.left=c+"px";g.style.width=Math.max(0,d-3)+"px";g.style.height=Math.max(0,e-3)+"px";null!=a&&a.parentNode==this.editor.graph.container?this.editor.graph.container.appendChild(g):document.body.appendChild(g);return g};EditorUi.prototype.stringToCells=function(a){a=mxUtils.parseXml(a);var b=this.editor.extractGraphModel(a.documentElement);a=
-[];if(null!=b){var c=new mxCodec(b.ownerDocument),d=new mxGraphModel;c.decode(b,d);b=d.getChildAt(d.getRoot(),0);for(c=0;c<d.getChildCount(b);c++)a.push(d.getChildAt(b,c))}return a};EditorUi.prototype.openFiles=function(a,b){if(this.spinner.spin(document.body,mxResources.get("loading")))for(var c=0;c<a.length;c++)mxUtils.bind(this,function(a){var c=new FileReader;c.onload=mxUtils.bind(this,function(c){var d=c.target.result,f=a.name;if(null!=f&&0<f.length)if(!this.useCanvasForExport&&/(\.png)$/i.test(f)&&
-(f=f.substring(0,f.length-4)+".xml"),Graph.fileSupport&&!this.isOffline()&&(new XMLHttpRequest).upload&&this.isRemoteFileFormat(d,f))f=0<=f.lastIndexOf(".")?f.substring(0,f.lastIndexOf("."))+".xml":f+".xml",this.parseFile(a,mxUtils.bind(this,function(a){if(4==a.readyState)if(this.spinner.stop(),200<=a.status&&299>=a.status)if(a=a.responseText,"<mxlibrary"==a.substring(0,10)){null==this.getCurrentFile()&&"1"!=urlParams.embed&&this.openLocalFile(this.emptyDiagramXml,this.defaultFilename,b);null!=f&&
-".vssx"==f.toLowerCase().substring(f.length-5)&&(f=f.substring(0,filename.length-5)+".xml");try{this.loadLibrary(new LocalLibrary(this,a,f))}catch(v){this.handleError(v,mxResources.get("errorLoadingFile"))}}else this.openLocalFile(a,f,b);else this.handleError({message:mxResources.get(413==a.status?"drawingTooLarge":"invalidOrMissingFile")},mxResources.get("errorLoadingFile"))}));else if('{"state":"{\\"Properties\\":'==d.substring(0,26))/(\.json)$/i.test(f)&&(f=f.substring(0,f.length-5)+".xml"),this.openLocalFile(this.emptyDiagramXml,
-f,b),this.importLucidChart(d,0,0,null,mxUtils.bind(this,function(){this.editor.undoManager.clear();this.spinner.stop()}));else if("<mxlibrary"==c.target.result.substring(0,10)){this.spinner.stop();null==this.getCurrentFile()&&"1"!=urlParams.embed&&this.openLocalFile(this.emptyDiagramXml,this.defaultFilename,b);try{this.loadLibrary(new LocalLibrary(this,c.target.result,a.name))}catch(t){this.handleError(t,mxResources.get("errorLoadingFile"))}}else"image/png"==a.type.substring(0,9)&&(d=this.extractGraphModelFromPng(d)),
-this.spinner.stop(),this.openLocalFile(d,f,b)});c.onerror=mxUtils.bind(this,function(a){this.spinner.stop();this.handleError(a);window.openFile=null});"image"===a.type.substring(0,5)&&"image/svg"!==a.type.substring(0,9)?c.readAsDataURL(a):c.readAsText(a)})(a[c])};EditorUi.prototype.openLocalFile=function(a,b,d){var c=this.getCurrentFile(),f=mxUtils.bind(this,function(){window.openFile=null;if(null==b&&null!=this.getCurrentFile()&&this.isDiagramEmpty()){var c=mxUtils.parseXml(a);null!=c&&(this.editor.setGraphXml(c.documentElement),
-this.editor.graph.selectAll())}else this.fileLoaded(new LocalFile(this,a,b||this.defaultFilename,d))});null!=a&&0<a.length&&(null==c||!c.isModified()&&(mxClient.IS_CHROMEAPP||EditorUi.isElectronApp)?f():(mxClient.IS_CHROMEAPP||EditorUi.isElectronApp)&&null!=c&&c.isModified()?this.confirm(mxResources.get("allChangesLost"),null,f,mxResources.get("cancel"),mxResources.get("discardChanges")):(window.openFile=new OpenFile(function(){window.openFile=null}),window.openFile.setData(a,b),window.openWindow(this.getUrl(),
-null,mxUtils.bind(this,function(){this.confirm(mxResources.get("allChangesLost"),null,f,mxResources.get("cancel"),mxResources.get("discardChanges"))}))))};EditorUi.prototype.getBasenames=function(){var a={};if(null!=this.pages)for(var b=0;b<this.pages.length;b++)this.updatePageRoot(this.pages[b]),this.addBasenamesForCell(this.pages[b].root,a);else this.addBasenamesForCell(this.editor.graph.model.getRoot(),a);var b=[],d;for(d in a)b.push(d);return b};EditorUi.prototype.addBasenamesForCell=function(a,
-b){function c(a){if(null!=a){var c=a.lastIndexOf(".");0<c&&(a=a.substring(c+1,a.length));null==b[a]&&(b[a]=!0)}}var d=this.editor.graph,f=d.getCellStyle(a);c(mxStencilRegistry.getBasenameForStencil(f[mxConstants.STYLE_SHAPE]));d.model.isEdge(a)&&(c(mxMarker.getPackageForType(f[mxConstants.STYLE_STARTARROW])),c(mxMarker.getPackageForType(f[mxConstants.STYLE_ENDARROW])));for(var f=d.model.getChildCount(a),e=0;e<f;e++)this.addBasenamesForCell(d.model.getChildAt(a,e),b)};EditorUi.prototype.setGraphEnabled=
-function(a){this.diagramContainer.style.visibility=a?"":"hidden";this.formatContainer.style.visibility=a?"":"hidden";this.sidebarFooterContainer.style.display=a?"":"none";this.sidebarContainer.style.display=a?"":"none";this.hsplit.style.display=a?"":"none";this.editor.graph.setEnabled(a);null!=this.tabContainer&&(this.tabContainer.style.visibility=a?"":"hidden")};EditorUi.prototype.initializeEmbedMode=function(){this.setGraphEnabled(!1);(window.opener||window.parent)!=window&&("1"!=urlParams.spin||
-this.spinner.spin(document.body,mxResources.get("loading")))&&this.installMessageHandler(mxUtils.bind(this,function(a,b,d){this.spinner.stop();this.addEmbedButtons();this.setGraphEnabled(!0);null!=a&&0<a.length?(this.setFileData(a),this.editor.chromeless?this.editor.graph.lightbox&&this.lightboxFit():this.showLayersDialog(),this.chromelessResize&&this.chromelessResize()):(this.editor.graph.model.clear(),this.editor.fireEvent(new mxEventObject("resetGraphView")));this.editor.undoManager.clear();this.editor.modified=
-null!=d?d:!1;this.updateUi();window.self!==window.top&&window.focus();null!=this.format&&this.format.refresh()}))};EditorUi.prototype.showLayersDialog=function(){1<this.editor.graph.getModel().getChildCount(this.editor.graph.getModel().getRoot())&&(null==this.actions.layersWindow?this.actions.get("layers").funct():this.actions.layersWindow.window.setVisible(!0))};EditorUi.prototype.getPublicUrl=function(a,b){null!=a?a.getPublicUrl(b):b(null)};EditorUi.prototype.createLoadMessage=function(a){var b=
-this.editor.graph;return{event:a,pageVisible:b.pageVisible,translate:b.view.translate,scale:b.view.scale,page:b.view.getBackgroundPageBounds(),bounds:b.getGraphBounds()}};EditorUi.prototype.installMessageHandler=function(a){var b=null,c=!1,d=!1,e=null,g=mxUtils.bind(this,function(a,b){this.editor.modified&&"0"!=urlParams.modified?null!=urlParams.modified&&this.editor.setStatus(mxUtils.htmlEntities(mxResources.get(urlParams.modified))):this.editor.setStatus("")});this.editor.graph.model.addListener(mxEvent.CHANGE,
-g);mxEvent.addListener(window,"message",mxUtils.bind(this,function(f){function h(a){if(null!=a&&"function"===typeof a.charAt&&"<"!=a.charAt(0))try{"data:image/svg+xml;base64,"==a.substring(0,26)?a=atob(a.substring(26)):"data:image/svg+xml;utf8,"==a.substring(0,24)&&(a=a.substring(24)),null!=a&&("%"==a.charAt(0)?a=decodeURIComponent(a):"<"!=a.charAt(0)&&(a=this.editor.graph.decompress(a)))}catch(N){}return a}var g=f.data;if("json"==urlParams.proto){try{g=JSON.parse(g)}catch(T){g=null}if(null==g)return;
-if("dialog"==g.action){this.showError(null!=g.titleKey?mxResources.get(g.titleKey):g.title,null!=g.messageKey?mxResources.get(g.messageKey):g.message,null!=g.buttonKey?mxResources.get(g.buttonKey):g.button);null!=g.modified&&(this.editor.modified=g.modified);return}if("prompt"==g.action){this.spinner.stop();var k=new FilenameDialog(this,g.defaultValue||"",null!=g.okKey?mxResources.get(g.okKey):null,function(a){null!=a&&l.postMessage(JSON.stringify({event:"prompt",value:a,message:g}),"*")},null!=g.titleKey?
-mxResources.get(g.titleKey):g.title);this.showDialog(k.container,300,80,!0,!1);k.init();return}if("draft"==g.action){k=null;k="data:image/png;base64,"==g.xml.substring(0,22)?this.extractGraphModelFromPng(g.xml):h(g.xml);this.spinner.stop();k=new DraftDialog(this,mxResources.get("draftFound",[g.name||this.defaultFilename]),k,mxUtils.bind(this,function(){this.hideDialog();l.postMessage(JSON.stringify({event:"draft",result:"edit",message:g}),"*")}),mxUtils.bind(this,function(){this.hideDialog();l.postMessage(JSON.stringify({event:"draft",
-result:"discard",message:g}),"*")}),g.editKey?mxResources.get(g.editKey):null,g.discardKey?mxResources.get(g.discardKey):null,g.ignore?mxUtils.bind(this,function(){this.hideDialog();l.postMessage(JSON.stringify({event:"draft",result:"ignore",message:g}),"*")}):null);this.showDialog(k.container,640,480,!0,!1,mxUtils.bind(this,function(a){a&&this.actions.get("exit").funct()}));try{k.init()}catch(T){l.postMessage(JSON.stringify({event:"draft",error:T.toString(),message:g}),"*")}return}if("template"==
-g.action){this.spinner.stop();k=new NewDialog(this,!1,null!=g.callback,mxUtils.bind(this,function(b,c){b=b||this.emptyDiagramXml;null!=g.callback?l.postMessage(JSON.stringify({event:"template",xml:b,blank:b==this.emptyDiagramXml,name:c}),"*"):(a(b,f,b!=this.emptyDiagramXml),this.editor.modified||this.editor.setStatus(""))}));this.showDialog(k.container,620,440,!0,!1,mxUtils.bind(this,function(a){a&&this.actions.get("exit").funct()}));k.init();return}if("status"==g.action){null!=g.messageKey?this.editor.setStatus(mxUtils.htmlEntities(mxResources.get(g.messageKey))):
-null!=g.message&&this.editor.setStatus(mxUtils.htmlEntities(g.message));null!=g.modified&&(this.editor.modified=g.modified);return}if("spinner"==g.action){var m=null!=g.messageKey?mxResources.get(g.messageKey):g.message;null==g.show||g.show?this.spinner.spin(document.body,m):this.spinner.stop();return}if("export"==g.action){if("png"==g.format||"xmlpng"==g.format){if(null==g.spin&&null==g.spinKey||this.spinner.spin(document.body,null!=g.spinKey?mxResources.get(g.spinKey):g.spin)){var p=null!=g.xml?
-g.xml:this.getFileData(!0);this.editor.graph.setEnabled(!1);var n=this.editor.graph,q=mxUtils.bind(this,function(a){this.editor.graph.setEnabled(!0);this.spinner.stop();var b=this.createLoadMessage("export");b.format=g.format;b.message=g;b.data=a;b.xml=encodeURIComponent(p);l.postMessage(JSON.stringify(b),"*")}),r=mxUtils.bind(this,function(a){null==a&&(a=Editor.blankImage);"xmlpng"==g.format&&(a=this.writeGraphModelToPng(a,"zTXt","mxGraphModel",atob(this.editor.graph.compress(p))));n!=this.editor.graph&&
-n.container.parentNode.removeChild(n.container);q(a)});if(this.isExportToCanvas()){if(null!=this.pages&&this.currentPage!=this.pages[0]){var n=this.createTemporaryGraph(n.getStylesheet()),u=n.getGlobalVariable,F=this.pages[0];n.getGlobalVariable=function(a){return"page"==a?F.getName():"pagenumber"==a?1:u.apply(this,arguments)};document.body.appendChild(n.container);n.model.setRoot(F.root)}this.exportToCanvas(mxUtils.bind(this,function(a){r(a.toDataURL("image/png"))}),null,null,null,mxUtils.bind(this,
-function(){r(null)}),null,null,null,null,null,null,n)}else(new mxXmlRequest(EXPORT_URL,"format=png&embedXml="+("xmlpng"==g.format?"1":"0")+"&base64=1&xml="+encodeURIComponent(encodeURIComponent(p)))).send(mxUtils.bind(this,function(a){200<=a.getStatus()&&299>=a.getStatus()?q("data:image/png;base64,"+a.getText()):r(null)}),mxUtils.bind(this,function(){r(null)}))}}else{null!=g.xml&&0<g.xml.length&&this.setFileData(g.xml);m=this.createLoadMessage("export");if("html2"==g.format||"html"==g.format&&("0"!=
-urlParams.pages||null!=this.pages&&1<this.pages.length))k=this.getXmlFileData(),m.xml=mxUtils.getXml(k),m.data=this.getFileData(null,null,!0,null,null,null,k),m.format=g.format;else if("html"==g.format)p=this.editor.getGraphXml(),m.data=this.getHtml(p,this.editor.graph),m.xml=mxUtils.getXml(p),m.format=g.format;else{mxSvgCanvas2D.prototype.foAltText=null;k=this.editor.graph.background;k==mxConstants.NONE&&(k=null);m.xml=this.getFileData(!0);m.format="svg";if(g.embedImages||null==g.embedImages){if(null==
-g.spin&&null==g.spinKey||this.spinner.spin(document.body,null!=g.spinKey?mxResources.get(g.spinKey):g.spin))this.editor.graph.setEnabled(!1),"xmlsvg"==g.format?this.getEmbeddedSvg(m.xml,this.editor.graph,null,!0,mxUtils.bind(this,function(a){this.editor.graph.setEnabled(!0);this.spinner.stop();m.data=this.createSvgDataUri(a);l.postMessage(JSON.stringify(m),"*")})):this.convertImages(this.editor.graph.getSvg(k),mxUtils.bind(this,function(a){this.editor.graph.setEnabled(!0);this.spinner.stop();m.data=
-this.createSvgDataUri(mxUtils.getXml(a));l.postMessage(JSON.stringify(m),"*")}));return}k="xmlsvg"==g.format?this.getEmbeddedSvg(this.getFileData(!0),this.editor.graph,null,!0):mxUtils.getXml(this.editor.graph.getSvg(k));m.data=this.createSvgDataUri(k)}l.postMessage(JSON.stringify(m),"*")}return}if("create"==g.action&&this.createFile){if("trello"==g.mode){var z=mxUtils.bind(this,function(a){this.createFile(g.name,a||this.getFileData(/(\.xml)$/i.test(name)||0>name.indexOf("."),/(\.svg)$/i.test(name),
-/(\.html)$/i.test(name)),null,g.mode,null,!0,g.folder)}),J=mxUtils.bind(this,function(){null!=g.template?this.trello.getFile(g.folder+this.trello.SEPARATOR+g.template,function(a){z(a.getData())},function(){z()}):z()});if(null==this.trello){var I=function(){null!=this.trello&&(this.removeListener(I),J())};this.addListener("clientLoaded",I)}else J()}return}if("load"==g.action)d=1==g.autosave,this.hideDialog(),null!=g.modified&&null==urlParams.modified&&(urlParams.modified=g.modified),null!=g.saveAndExit&&
-null==urlParams.saveAndExit&&(urlParams.saveAndExit=g.saveAndExit),null!=g.title&&null!=this.buttonContainer&&(k=document.createElement("span"),mxUtils.write(k,g.title),"atlas"==uiTheme?(this.buttonContainer.style.paddingRight="12px",this.buttonContainer.style.paddingTop="12px"):(this.buttonContainer.style.paddingRight="38px",this.buttonContainer.style.paddingTop="6px"),null!=this.embedFilenameSpan&&this.embedFilenameSpan.parentNode.removeChild(this.embedFilenameSpan),this.buttonContainer.appendChild(k),
-this.embedFilenameSpan=k),g=null!=g.xmlpng?this.extractGraphModelFromPng(g.xmlpng):null!=g.xml&&"data:image/png;base64,"==g.xml.substring(0,22)?this.extractGraphModelFromPng(g.xml):g.xml;else{l.postMessage(JSON.stringify({error:"unknownMessage",data:JSON.stringify(g)}),"*");return}}g=h(g);c=!0;try{a(g,f)}catch(T){this.handleError(T)}c=!1;null!=urlParams.modified&&this.editor.setStatus("");var H=mxUtils.bind(this,function(){return"0"!=urlParams.pages||null!=this.pages&&1<this.pages.length?this.getFileData(!0):
-mxUtils.getXml(this.editor.getGraphXml())});e=H();d&&null==b&&(b=mxUtils.bind(this,function(a,b){var d=H();if(d!=e&&!c){var f=this.createLoadMessage("autosave");f.xml=d;d=JSON.stringify(f);(window.opener||window.parent).postMessage(d,"*")}e=d}),this.editor.graph.model.addListener(mxEvent.CHANGE,b),this.editor.graph.addListener("gridSizeChanged",b),this.editor.graph.addListener("shadowVisibleChanged",b),this.addListener("pageFormatChanged",b),this.addListener("pageScaleChanged",b),this.addListener("backgroundColorChanged",
-b),this.addListener("backgroundImageChanged",b),this.addListener("foldingEnabledChanged",b),this.addListener("mathEnabledChanged",b),this.addListener("gridEnabledChanged",b),this.addListener("guidesEnabledChanged",b),this.addListener("pageViewChanged",b));"1"!=urlParams.returnbounds&&"json"!=urlParams.proto||l.postMessage(JSON.stringify(this.createLoadMessage("load")),"*")}));var l=window.opener||window.parent,g="json"==urlParams.proto?JSON.stringify({event:"init"}):urlParams.ready||"ready";l.postMessage(g,
+"text/plain")&&document.execCommand("insertHTML",!1,a.dataTransfer.getData("text/plain"));a.stopPropagation();a.preventDefault()})))}));if("1"==urlParams.ruler&&"undefined"!==typeof mxRuler){v=document.createElement("div");v.style.position="absolute";v.style.top="95px";v.style.left="250px";v.style.width="2000px";v.style.height="30px";v.style.background="whiteSmoke";document.body.appendChild(v);var A=document.createElement("div");A.style.position="absolute";A.style.top="125px";A.style.left="220px";
+A.style.width="30px";A.style.height="1000px";A.style.background="whiteSmoke";document.body.appendChild(A);var z=document.createElement("div");z.style.position="absolute";z.style.top="95px";z.style.left="220px";z.style.width="30px";z.style.height="30px";z.style.background="whiteSmoke";document.body.appendChild(z);this.vRuler=new mxRuler(this.editor.graph,A,!0);this.hRuler=new mxRuler(this.editor.graph,v,!1)}if("1"==urlParams.test){v=document.getElementById("geFooter");null!=v&&(this.styleInput=document.createElement("input"),
+this.styleInput.setAttribute("type","text"),this.styleInput.style.position="absolute",this.styleInput.style.top="14px",this.styleInput.style.left="2px",this.styleInput.style.width="98%",this.styleInput.style.visibility="hidden",this.styleInput.style.opacity="0.9",mxEvent.addListener(this.styleInput,"change",mxUtils.bind(this,function(){this.editor.graph.getModel().setStyle(this.editor.graph.getSelectionCell(),this.styleInput.value)})),v.appendChild(this.styleInput),this.editor.graph.getSelectionModel().addListener(mxEvent.CHANGE,
+mxUtils.bind(this,function(a,b){if(0<this.editor.graph.getSelectionCount()){var c=this.editor.graph.getSelectionCell(),c=this.editor.graph.getModel().getStyle(c);this.styleInput.value=c||"";this.styleInput.style.visibility="visible"}else this.styleInput.style.visibility="hidden"})));var C=this.isSelectionAllowed;this.isSelectionAllowed=function(a){return mxEvent.getSource(a)==this.styleInput?!0:C.apply(this,arguments)}}v=document.getElementById("geInfo");null!=v&&v.parentNode.removeChild(v);if(Graph.fileSupport&&
+(!this.editor.chromeless||this.editor.editable)){var B=null;mxEvent.addListener(d.container,"dragleave",function(a){d.isEnabled()&&(null!=B&&(B.parentNode.removeChild(B),B=null),a.stopPropagation(),a.preventDefault())});mxEvent.addListener(d.container,"dragover",mxUtils.bind(this,function(a){null==B&&(!mxClient.IS_IE||10<document.documentMode)&&(B=this.highlightElement(d.container));null!=this.sidebar&&this.sidebar.hideTooltip();a.stopPropagation();a.preventDefault()}));mxEvent.addListener(d.container,
+"drop",mxUtils.bind(this,function(a){null!=B&&(B.parentNode.removeChild(B),B=null);if(d.isEnabled()){var b=mxUtils.convertPoint(d.container,mxEvent.getClientX(a),mxEvent.getClientY(a)),c=d.view.translate,f=d.view.scale,e=b.x/f-c.x,g=b.y/f-c.y;mxEvent.isAltDown(a)&&(g=e=0);if(0<a.dataTransfer.files.length)this.importFiles(a.dataTransfer.files,e,g,this.maxImageSize,null,null,null,null,mxEvent.isControlDown(a),null,null,mxEvent.isShiftDown(a));else{var k=0<=mxUtils.indexOf(a.dataTransfer.types,"text/uri-list")?
+a.dataTransfer.getData("text/uri-list"):null,b=this.extractGraphModelFromEvent(a,null!=this.pages);if(null!=b)d.setSelectionCells(this.importXml(b,e,g,!0));else if(0<=mxUtils.indexOf(a.dataTransfer.types,"text/html")){var h=a.dataTransfer.getData("text/html"),b=document.createElement("div");b.innerHTML=h;var p=null,c=b.getElementsByTagName("img");null!=c&&1==c.length?(h=c[0].getAttribute("src"),/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(h)||(p=!0)):(b=b.getElementsByTagName("a"),null!=b&&1==b.length&&
+(h=b[0].getAttribute("href")));var m=!0,l=mxUtils.bind(this,function(){d.setSelectionCells(this.insertTextAt(h,e,g,!0,p,null,m))});p&&h.length>this.resampleThreshold?this.confirmImageResize(function(a){m=a;l()},mxEvent.isControlDown(a)):l()}else null!=k&&/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(k)?this.loadImage(decodeURIComponent(k),mxUtils.bind(this,function(a){var b=Math.max(1,a.width);a=Math.max(1,a.height);var c=this.maxImageSize,c=Math.min(1,Math.min(c/Math.max(1,b)),c/Math.max(1,a));d.setSelectionCell(d.insertVertex(null,
+null,"",e,g,b*c,a*c,"shape=image;verticalLabelPosition=bottom;labelBackgroundColor=#ffffff;verticalAlign=top;aspect=fixed;imageAspect=0;image="+k+";"))}),mxUtils.bind(this,function(a){d.setSelectionCells(this.insertTextAt(k,e,g,!0))})):0<=mxUtils.indexOf(a.dataTransfer.types,"text/plain")&&d.setSelectionCells(this.insertTextAt(a.dataTransfer.getData("text/plain"),e,g,!0))}}a.stopPropagation();a.preventDefault()}),!1)}this.initPages();"1"==urlParams.embed&&this.initializeEmbedMode();this.installSettings()};
+EditorUi.prototype.isSettingsEnabled=function(){return"undefined"!==typeof window.mxSettings&&(isLocalStorage||mxClient.IS_CHROMEAPP)};EditorUi.prototype.installSettings=function(){if(this.isSettingsEnabled()){ColorDialog.recentColors=mxSettings.getRecentColors();this.editor.graph.currentEdgeStyle=mxSettings.getCurrentEdgeStyle();this.editor.graph.currentVertexStyle=mxSettings.getCurrentVertexStyle();this.fireEvent(new mxEventObject("styleChanged","keys",[],"values",[],"cells",[]));this.addListener("styleChanged",
+mxUtils.bind(this,function(a,b){mxSettings.setCurrentEdgeStyle(this.editor.graph.currentEdgeStyle);mxSettings.setCurrentVertexStyle(this.editor.graph.currentVertexStyle);mxSettings.save()}));this.editor.graph.connectionHandler.setCreateTarget(mxSettings.isCreateTarget());this.fireEvent(new mxEventObject("copyConnectChanged"));this.addListener("copyConnectChanged",mxUtils.bind(this,function(a,b){mxSettings.setCreateTarget(this.editor.graph.connectionHandler.isCreateTarget());mxSettings.save()}));this.editor.graph.pageFormat=
+mxSettings.getPageFormat();this.addListener("pageFormatChanged",mxUtils.bind(this,function(a,b){mxSettings.setPageFormat(this.editor.graph.pageFormat);mxSettings.save()}));this.editor.graph.view.gridColor=mxSettings.getGridColor();this.addListener("gridColorChanged",mxUtils.bind(this,function(a,b){mxSettings.setGridColor(this.editor.graph.view.gridColor);mxSettings.save()}));if(mxClient.IS_CHROMEAPP||EditorUi.isElectronApp)this.editor.addListener("autosaveChanged",mxUtils.bind(this,function(a,b){mxSettings.setAutosave(this.editor.autosave);
+mxSettings.save()})),this.editor.autosave=mxSettings.getAutosave();null!=this.sidebar&&this.sidebar.showPalette("search",mxSettings.settings.search);this.editor.chromeless&&!this.editor.editable||null==this.sidebar||!(mxSettings.settings.isNew||8>=parseInt(mxSettings.settings.version||0))||(this.toggleScratchpad(),mxSettings.save());this.addListener("formatWidthChanged",function(){mxSettings.setFormatWidth(this.formatWidth);mxSettings.save()})}};EditorUi.prototype.copyCells=function(a,b){var c=this.editor.graph;
+if(c.isSelectionEmpty())a.innerHTML="";else{var d=mxUtils.sortCells(c.model.getTopmostCells(c.getSelectionCells())),f=mxUtils.getXml(this.editor.graph.encodeCells(d));mxUtils.setTextContent(a,encodeURIComponent(f));b?(c.removeCells(d,!1),c.lastPasteXml=null):(c.lastPasteXml=f,c.pasteCounter=0);a.focus();document.execCommand("selectAll",!1,null)}};EditorUi.prototype.pasteCells=function(a,b){if(!mxEvent.isConsumed(a)){var c=b.getElementsByTagName("span");if(null!=c&&0<c.length&&"application/vnd.lucid.chart.objects"===
+c[0].getAttribute("data-lucid-type")){var d=c[0].getAttribute("data-lucid-content");null!=d&&0<d.length&&(this.importLucidChart(d,0,0),mxEvent.consume(a))}else{var d=this.editor.graph,f=mxUtils.trim(mxClient.IS_QUIRKS||8==document.documentMode?mxUtils.getTextContent(b):b.textContent),e=!1;try{var h=f.lastIndexOf("%3E");0<=h&&h<f.length-3&&(f=f.substring(0,h+3))}catch(v){}try{var c=b.getElementsByTagName("span"),k=null!=c&&0<c.length?mxUtils.trim(decodeURIComponent(c[0].textContent)):decodeURIComponent(f);
+this.isCompatibleString(k)&&(e=!0,f=k)}catch(v){}d.lastPasteXml==f?d.pasteCounter++:(d.lastPasteXml=f,d.pasteCounter=0);c=d.pasteCounter*d.gridSize;if(null!=f&&0<f.length&&(e||this.isCompatibleString(f)?d.setSelectionCells(this.importXml(f,c,c)):(e=d.getInsertPoint(),d.isMouseInsertPoint()&&(c=0,d.lastPasteXml==f&&0<d.pasteCounter&&d.pasteCounter--),d.setSelectionCells(this.insertTextAt(f,e.x+c,e.y+c,!0))),!d.isSelectionEmpty())){d.scrollCellToVisible(d.getSelectionCell());null!=this.hoverIcons&&
+this.hoverIcons.update(d.view.getState(d.getSelectionCell()));try{mxEvent.consume(a)}catch(v){}}}}};EditorUi.prototype.addFileDropHandler=function(a){if(Graph.fileSupport)for(var b=null,c=0;c<a.length;c++)mxEvent.addListener(a[c],"dragleave",function(a){null!=b&&(b.parentNode.removeChild(b),b=null);a.stopPropagation();a.preventDefault()}),mxEvent.addListener(a[c],"dragover",mxUtils.bind(this,function(a){(this.editor.graph.isEnabled()||"1"!=urlParams.embed)&&null==b&&(!mxClient.IS_IE||10<document.documentMode&&
+12>document.documentMode)&&(b=this.highlightElement());a.stopPropagation();a.preventDefault()})),mxEvent.addListener(a[c],"drop",mxUtils.bind(this,function(a){null!=b&&(b.parentNode.removeChild(b),b=null);if(this.editor.graph.isEnabled()||"1"!=urlParams.embed)if(0<a.dataTransfer.files.length)this.hideDialog(),"1"==urlParams.embed?this.importFiles(a.dataTransfer.files,0,0,this.maxImageSize,null,null,null,null,!mxEvent.isControlDown(a)&&!mxEvent.isShiftDown(a)):this.openFiles(a.dataTransfer.files,!0);
+else{var c=this.extractGraphModelFromEvent(a);if(null==c){var d=null!=a.dataTransfer?a.dataTransfer:a.clipboardData;null!=d&&(10==document.documentMode||11==document.documentMode?c=d.getData("Text"):(c=null,c=0<=mxUtils.indexOf(d.types,"text/uri-list")?a.dataTransfer.getData("text/uri-list"):0<=mxUtils.indexOf(d.types,"text/html")?d.getData("text/html"):null,null!=c&&0<c.length?(d=document.createElement("div"),d.innerHTML=c,d=d.getElementsByTagName("img"),0<d.length&&(c=d[0].getAttribute("src"))):
+0<=mxUtils.indexOf(d.types,"text/plain")&&(c=d.getData("text/plain"))),null!=c&&("data:image/png;base64,"==c.substring(0,22)?(c=this.extractGraphModelFromPng(c),null!=c&&0<c.length&&this.openLocalFile(c,null,!0)):!this.isOffline()&&this.isRemoteFileFormat(c)?(new mxXmlRequest(OPEN_URL,"format=xml&data="+encodeURIComponent(c))).send(mxUtils.bind(this,function(a){200<=a.getStatus()&&299>=a.getStatus()&&this.openLocalFile(a.getText(),null,!0)})):/^https?:\/\//.test(c)&&(null==this.getCurrentFile()?window.location.hash=
+"#U"+encodeURIComponent(c):window.openWindow((mxClient.IS_CHROMEAPP?"https://www.draw.io/":"https://"+location.host+"/")+window.location.search+"#U"+encodeURIComponent(c)))))}else this.openLocalFile(c,null,!0)}a.stopPropagation();a.preventDefault()}))};EditorUi.prototype.highlightElement=function(a){var b=0,c=0,d,e;if(null==a){e=document.body;var h=document.documentElement;d=(e.clientWidth||h.clientWidth)-3;e=Math.max(e.clientHeight||0,h.clientHeight)-3}else b=a.offsetTop,c=a.offsetLeft,d=a.clientWidth,
+e=a.clientHeight;h=document.createElement("div");h.style.zIndex=mxPopupMenu.prototype.zIndex+2;h.style.border="3px dotted rgb(254, 137, 12)";h.style.pointerEvents="none";h.style.position="absolute";h.style.top=b+"px";h.style.left=c+"px";h.style.width=Math.max(0,d-3)+"px";h.style.height=Math.max(0,e-3)+"px";null!=a&&a.parentNode==this.editor.graph.container?this.editor.graph.container.appendChild(h):document.body.appendChild(h);return h};EditorUi.prototype.stringToCells=function(a){a=mxUtils.parseXml(a);
+var b=this.editor.extractGraphModel(a.documentElement);a=[];if(null!=b){var c=new mxCodec(b.ownerDocument),d=new mxGraphModel;c.decode(b,d);b=d.getChildAt(d.getRoot(),0);for(c=0;c<d.getChildCount(b);c++)a.push(d.getChildAt(b,c))}return a};EditorUi.prototype.openFiles=function(a,b){if(this.spinner.spin(document.body,mxResources.get("loading")))for(var c=0;c<a.length;c++)mxUtils.bind(this,function(a){var c=new FileReader;c.onload=mxUtils.bind(this,function(c){var d=c.target.result,e=a.name;if(null!=
+e&&0<e.length)if(!this.useCanvasForExport&&/(\.png)$/i.test(e)&&(e=e.substring(0,e.length-4)+".xml"),Graph.fileSupport&&!this.isOffline()&&(new XMLHttpRequest).upload&&this.isRemoteFileFormat(d,e))e=0<=e.lastIndexOf(".")?e.substring(0,e.lastIndexOf("."))+".xml":e+".xml",this.parseFile(a,mxUtils.bind(this,function(a){if(4==a.readyState)if(this.spinner.stop(),200<=a.status&&299>=a.status)if(a=a.responseText,"<mxlibrary"==a.substring(0,10)){null==this.getCurrentFile()&&"1"!=urlParams.embed&&this.openLocalFile(this.emptyDiagramXml,
+this.defaultFilename,b);null!=e&&".vssx"==e.toLowerCase().substring(e.length-5)&&(e=e.substring(0,filename.length-5)+".xml");try{this.loadLibrary(new LocalLibrary(this,a,e))}catch(t){this.handleError(t,mxResources.get("errorLoadingFile"))}}else this.openLocalFile(a,e,b);else this.handleError({message:mxResources.get(413==a.status?"drawingTooLarge":"invalidOrMissingFile")},mxResources.get("errorLoadingFile"))}));else if('{"state":"{\\"Properties\\":'==d.substring(0,26))/(\.json)$/i.test(e)&&(e=e.substring(0,
+e.length-5)+".xml"),this.openLocalFile(this.emptyDiagramXml,e,b),this.importLucidChart(d,0,0,null,mxUtils.bind(this,function(){this.editor.undoManager.clear();this.spinner.stop()}));else if("<mxlibrary"==c.target.result.substring(0,10)){this.spinner.stop();null==this.getCurrentFile()&&"1"!=urlParams.embed&&this.openLocalFile(this.emptyDiagramXml,this.defaultFilename,b);try{this.loadLibrary(new LocalLibrary(this,c.target.result,a.name))}catch(v){this.handleError(v,mxResources.get("errorLoadingFile"))}}else"image/png"==
+a.type.substring(0,9)&&(d=this.extractGraphModelFromPng(d)),this.spinner.stop(),this.openLocalFile(d,e,b)});c.onerror=mxUtils.bind(this,function(a){this.spinner.stop();this.handleError(a);window.openFile=null});"image"===a.type.substring(0,5)&&"image/svg"!==a.type.substring(0,9)?c.readAsDataURL(a):c.readAsText(a)})(a[c])};EditorUi.prototype.openLocalFile=function(a,b,d){var c=this.getCurrentFile(),e=mxUtils.bind(this,function(){window.openFile=null;if(null==b&&null!=this.getCurrentFile()&&this.isDiagramEmpty()){var c=
+mxUtils.parseXml(a);null!=c&&(this.editor.setGraphXml(c.documentElement),this.editor.graph.selectAll())}else this.fileLoaded(new LocalFile(this,a,b||this.defaultFilename,d))});null!=a&&0<a.length&&(null==c||!c.isModified()&&(mxClient.IS_CHROMEAPP||EditorUi.isElectronApp)?e():(mxClient.IS_CHROMEAPP||EditorUi.isElectronApp)&&null!=c&&c.isModified()?this.confirm(mxResources.get("allChangesLost"),null,e,mxResources.get("cancel"),mxResources.get("discardChanges")):(window.openFile=new OpenFile(function(){window.openFile=
+null}),window.openFile.setData(a,b),window.openWindow(this.getUrl(),null,mxUtils.bind(this,function(){this.confirm(mxResources.get("allChangesLost"),null,e,mxResources.get("cancel"),mxResources.get("discardChanges"))}))))};EditorUi.prototype.getBasenames=function(){var a={};if(null!=this.pages)for(var b=0;b<this.pages.length;b++)this.updatePageRoot(this.pages[b]),this.addBasenamesForCell(this.pages[b].root,a);else this.addBasenamesForCell(this.editor.graph.model.getRoot(),a);var b=[],d;for(d in a)b.push(d);
+return b};EditorUi.prototype.addBasenamesForCell=function(a,b){function c(a){if(null!=a){var c=a.lastIndexOf(".");0<c&&(a=a.substring(c+1,a.length));null==b[a]&&(b[a]=!0)}}var d=this.editor.graph,e=d.getCellStyle(a);c(mxStencilRegistry.getBasenameForStencil(e[mxConstants.STYLE_SHAPE]));d.model.isEdge(a)&&(c(mxMarker.getPackageForType(e[mxConstants.STYLE_STARTARROW])),c(mxMarker.getPackageForType(e[mxConstants.STYLE_ENDARROW])));for(var e=d.model.getChildCount(a),f=0;f<e;f++)this.addBasenamesForCell(d.model.getChildAt(a,
+f),b)};EditorUi.prototype.setGraphEnabled=function(a){this.diagramContainer.style.visibility=a?"":"hidden";this.formatContainer.style.visibility=a?"":"hidden";this.sidebarFooterContainer.style.display=a?"":"none";this.sidebarContainer.style.display=a?"":"none";this.hsplit.style.display=a?"":"none";this.editor.graph.setEnabled(a);null!=this.tabContainer&&(this.tabContainer.style.visibility=a?"":"hidden")};EditorUi.prototype.initializeEmbedMode=function(){this.setGraphEnabled(!1);(window.opener||window.parent)!=
+window&&("1"!=urlParams.spin||this.spinner.spin(document.body,mxResources.get("loading")))&&this.installMessageHandler(mxUtils.bind(this,function(a,b,d){this.spinner.stop();this.addEmbedButtons();this.setGraphEnabled(!0);null!=a&&0<a.length?(this.setFileData(a),this.editor.chromeless?this.editor.graph.lightbox&&this.lightboxFit():this.showLayersDialog(),this.chromelessResize&&this.chromelessResize()):(this.editor.graph.model.clear(),this.editor.fireEvent(new mxEventObject("resetGraphView")));this.editor.undoManager.clear();
+this.editor.modified=null!=d?d:!1;this.updateUi();window.self!==window.top&&window.focus();null!=this.format&&this.format.refresh()}))};EditorUi.prototype.showLayersDialog=function(){1<this.editor.graph.getModel().getChildCount(this.editor.graph.getModel().getRoot())&&(null==this.actions.layersWindow?this.actions.get("layers").funct():this.actions.layersWindow.window.setVisible(!0))};EditorUi.prototype.getPublicUrl=function(a,b){null!=a?a.getPublicUrl(b):b(null)};EditorUi.prototype.createLoadMessage=
+function(a){var b=this.editor.graph;return{event:a,pageVisible:b.pageVisible,translate:b.view.translate,scale:b.view.scale,page:b.view.getBackgroundPageBounds(),bounds:b.getGraphBounds()}};EditorUi.prototype.installMessageHandler=function(a){var b=null,c=!1,d=!1,e=null,h=mxUtils.bind(this,function(a,b){this.editor.modified&&"0"!=urlParams.modified?null!=urlParams.modified&&this.editor.setStatus(mxUtils.htmlEntities(mxResources.get(urlParams.modified))):this.editor.setStatus("")});this.editor.graph.model.addListener(mxEvent.CHANGE,
+h);mxEvent.addListener(window,"message",mxUtils.bind(this,function(f){function g(a){if(null!=a&&"function"===typeof a.charAt&&"<"!=a.charAt(0))try{"data:image/svg+xml;base64,"==a.substring(0,26)?a=atob(a.substring(26)):"data:image/svg+xml;utf8,"==a.substring(0,24)&&(a=a.substring(24)),null!=a&&("%"==a.charAt(0)?a=decodeURIComponent(a):"<"!=a.charAt(0)&&(a=this.editor.graph.decompress(a)))}catch(P){}return a}var h=f.data;if("json"==urlParams.proto){try{h=JSON.parse(h)}catch(R){h=null}if(null==h)return;
+if("dialog"==h.action){this.showError(null!=h.titleKey?mxResources.get(h.titleKey):h.title,null!=h.messageKey?mxResources.get(h.messageKey):h.message,null!=h.buttonKey?mxResources.get(h.buttonKey):h.button);null!=h.modified&&(this.editor.modified=h.modified);return}if("prompt"==h.action){this.spinner.stop();var k=new FilenameDialog(this,h.defaultValue||"",null!=h.okKey?mxResources.get(h.okKey):null,function(a){null!=a&&l.postMessage(JSON.stringify({event:"prompt",value:a,message:h}),"*")},null!=h.titleKey?
+mxResources.get(h.titleKey):h.title);this.showDialog(k.container,300,80,!0,!1);k.init();return}if("draft"==h.action){k=null;k="data:image/png;base64,"==h.xml.substring(0,22)?this.extractGraphModelFromPng(h.xml):g(h.xml);this.spinner.stop();k=new DraftDialog(this,mxResources.get("draftFound",[h.name||this.defaultFilename]),k,mxUtils.bind(this,function(){this.hideDialog();l.postMessage(JSON.stringify({event:"draft",result:"edit",message:h}),"*")}),mxUtils.bind(this,function(){this.hideDialog();l.postMessage(JSON.stringify({event:"draft",
+result:"discard",message:h}),"*")}),h.editKey?mxResources.get(h.editKey):null,h.discardKey?mxResources.get(h.discardKey):null,h.ignore?mxUtils.bind(this,function(){this.hideDialog();l.postMessage(JSON.stringify({event:"draft",result:"ignore",message:h}),"*")}):null);this.showDialog(k.container,640,480,!0,!1,mxUtils.bind(this,function(a){a&&this.actions.get("exit").funct()}));try{k.init()}catch(R){l.postMessage(JSON.stringify({event:"draft",error:R.toString(),message:h}),"*")}return}if("template"==
+h.action){this.spinner.stop();k=new NewDialog(this,!1,null!=h.callback,mxUtils.bind(this,function(b,c){b=b||this.emptyDiagramXml;null!=h.callback?l.postMessage(JSON.stringify({event:"template",xml:b,blank:b==this.emptyDiagramXml,name:c}),"*"):(a(b,f,b!=this.emptyDiagramXml),this.editor.modified||this.editor.setStatus(""))}));this.showDialog(k.container,620,440,!0,!1,mxUtils.bind(this,function(a){a&&this.actions.get("exit").funct()}));k.init();return}if("status"==h.action){null!=h.messageKey?this.editor.setStatus(mxUtils.htmlEntities(mxResources.get(h.messageKey))):
+null!=h.message&&this.editor.setStatus(mxUtils.htmlEntities(h.message));null!=h.modified&&(this.editor.modified=h.modified);return}if("spinner"==h.action){var p=null!=h.messageKey?mxResources.get(h.messageKey):h.message;null==h.show||h.show?this.spinner.spin(document.body,p):this.spinner.stop();return}if("export"==h.action){if("png"==h.format||"xmlpng"==h.format){if(null==h.spin&&null==h.spinKey||this.spinner.spin(document.body,null!=h.spinKey?mxResources.get(h.spinKey):h.spin)){var n=null!=h.xml?
+h.xml:this.getFileData(!0);this.editor.graph.setEnabled(!1);var m=this.editor.graph,q=mxUtils.bind(this,function(a){this.editor.graph.setEnabled(!0);this.spinner.stop();var b=this.createLoadMessage("export");b.format=h.format;b.message=h;b.data=a;b.xml=encodeURIComponent(n);l.postMessage(JSON.stringify(b),"*")}),r=mxUtils.bind(this,function(a){null==a&&(a=Editor.blankImage);"xmlpng"==h.format&&(a=this.writeGraphModelToPng(a,"zTXt","mxGraphModel",atob(this.editor.graph.compress(n))));m!=this.editor.graph&&
+m.container.parentNode.removeChild(m.container);q(a)});if(this.isExportToCanvas()){if(null!=this.pages&&this.currentPage!=this.pages[0]){var m=this.createTemporaryGraph(m.getStylesheet()),u=m.getGlobalVariable,E=this.pages[0];m.getGlobalVariable=function(a){return"page"==a?E.getName():"pagenumber"==a?1:u.apply(this,arguments)};document.body.appendChild(m.container);m.model.setRoot(E.root)}this.exportToCanvas(mxUtils.bind(this,function(a){r(a.toDataURL("image/png"))}),null,null,null,mxUtils.bind(this,
+function(){r(null)}),null,null,null,null,null,null,m)}else(new mxXmlRequest(EXPORT_URL,"format=png&embedXml="+("xmlpng"==h.format?"1":"0")+"&base64=1&xml="+encodeURIComponent(encodeURIComponent(n)))).send(mxUtils.bind(this,function(a){200<=a.getStatus()&&299>=a.getStatus()?q("data:image/png;base64,"+a.getText()):r(null)}),mxUtils.bind(this,function(){r(null)}))}}else{null!=h.xml&&0<h.xml.length&&this.setFileData(h.xml);p=this.createLoadMessage("export");if("html2"==h.format||"html"==h.format&&("0"!=
+urlParams.pages||null!=this.pages&&1<this.pages.length))k=this.getXmlFileData(),p.xml=mxUtils.getXml(k),p.data=this.getFileData(null,null,!0,null,null,null,k),p.format=h.format;else if("html"==h.format)n=this.editor.getGraphXml(),p.data=this.getHtml(n,this.editor.graph),p.xml=mxUtils.getXml(n),p.format=h.format;else{mxSvgCanvas2D.prototype.foAltText=null;k=this.editor.graph.background;k==mxConstants.NONE&&(k=null);p.xml=this.getFileData(!0);p.format="svg";if(h.embedImages||null==h.embedImages){if(null==
+h.spin&&null==h.spinKey||this.spinner.spin(document.body,null!=h.spinKey?mxResources.get(h.spinKey):h.spin))this.editor.graph.setEnabled(!1),"xmlsvg"==h.format?this.getEmbeddedSvg(p.xml,this.editor.graph,null,!0,mxUtils.bind(this,function(a){this.editor.graph.setEnabled(!0);this.spinner.stop();p.data=this.createSvgDataUri(a);l.postMessage(JSON.stringify(p),"*")})):this.convertImages(this.editor.graph.getSvg(k),mxUtils.bind(this,function(a){this.editor.graph.setEnabled(!0);this.spinner.stop();p.data=
+this.createSvgDataUri(mxUtils.getXml(a));l.postMessage(JSON.stringify(p),"*")}));return}k="xmlsvg"==h.format?this.getEmbeddedSvg(this.getFileData(!0),this.editor.graph,null,!0):mxUtils.getXml(this.editor.graph.getSvg(k));p.data=this.createSvgDataUri(k)}l.postMessage(JSON.stringify(p),"*")}return}if("create"==h.action&&this.createFile){if("trello"==h.mode){var y=mxUtils.bind(this,function(a){this.createFile(h.name,a||this.getFileData(/(\.xml)$/i.test(name)||0>name.indexOf("."),/(\.svg)$/i.test(name),
+/(\.html)$/i.test(name)),null,h.mode,null,!0,h.folder)}),O=mxUtils.bind(this,function(){null!=h.template?this.trello.getFile(h.folder+this.trello.SEPARATOR+h.template,function(a){y(a.getData())},function(){y()}):y()});if(null==this.trello){var J=function(){null!=this.trello&&(this.removeListener(J),O())};this.addListener("clientLoaded",J)}else O()}return}if("load"==h.action)d=1==h.autosave,this.hideDialog(),null!=h.modified&&null==urlParams.modified&&(urlParams.modified=h.modified),null!=h.saveAndExit&&
+null==urlParams.saveAndExit&&(urlParams.saveAndExit=h.saveAndExit),null!=h.title&&null!=this.buttonContainer&&(k=document.createElement("span"),mxUtils.write(k,h.title),"atlas"==uiTheme?(this.buttonContainer.style.paddingRight="12px",this.buttonContainer.style.paddingTop="12px"):(this.buttonContainer.style.paddingRight="38px",this.buttonContainer.style.paddingTop="6px"),null!=this.embedFilenameSpan&&this.embedFilenameSpan.parentNode.removeChild(this.embedFilenameSpan),this.buttonContainer.appendChild(k),
+this.embedFilenameSpan=k),h=null!=h.xmlpng?this.extractGraphModelFromPng(h.xmlpng):null!=h.xml&&"data:image/png;base64,"==h.xml.substring(0,22)?this.extractGraphModelFromPng(h.xml):h.xml;else{l.postMessage(JSON.stringify({error:"unknownMessage",data:JSON.stringify(h)}),"*");return}}h=g(h);c=!0;try{a(h,f)}catch(R){this.handleError(R)}c=!1;null!=urlParams.modified&&this.editor.setStatus("");var F=mxUtils.bind(this,function(){return"0"!=urlParams.pages||null!=this.pages&&1<this.pages.length?this.getFileData(!0):
+mxUtils.getXml(this.editor.getGraphXml())});e=F();d&&null==b&&(b=mxUtils.bind(this,function(a,b){var d=F();if(d!=e&&!c){var f=this.createLoadMessage("autosave");f.xml=d;d=JSON.stringify(f);(window.opener||window.parent).postMessage(d,"*")}e=d}),this.editor.graph.model.addListener(mxEvent.CHANGE,b),this.editor.graph.addListener("gridSizeChanged",b),this.editor.graph.addListener("shadowVisibleChanged",b),this.addListener("pageFormatChanged",b),this.addListener("pageScaleChanged",b),this.addListener("backgroundColorChanged",
+b),this.addListener("backgroundImageChanged",b),this.addListener("foldingEnabledChanged",b),this.addListener("mathEnabledChanged",b),this.addListener("gridEnabledChanged",b),this.addListener("guidesEnabledChanged",b),this.addListener("pageViewChanged",b));"1"!=urlParams.returnbounds&&"json"!=urlParams.proto||l.postMessage(JSON.stringify(this.createLoadMessage("load")),"*")}));var l=window.opener||window.parent,h="json"==urlParams.proto?JSON.stringify({event:"init"}):urlParams.ready||"ready";l.postMessage(h,
 "*")};EditorUi.prototype.addEmbedButtons=function(){if(null!=this.menubar){var a=document.createElement("div");a.style.display="inline-block";a.style.position="absolute";a.style.paddingTop="atlas"==uiTheme?"2px":"3px";a.style.paddingLeft="8px";a.style.paddingBottom="2px";var b=document.createElement("button");mxUtils.write(b,mxResources.get("save"));b.setAttribute("title",mxResources.get("save")+" ("+Editor.ctrlKey+"+S)");b.className="geBigButton";b.style.fontSize="12px";b.style.padding="4px 6px 4px 6px";
 b.style.borderRadius="3px";mxEvent.addListener(b,"click",mxUtils.bind(this,function(){this.actions.get("save").funct()}));a.appendChild(b);"1"==urlParams.saveAndExit&&(b=document.createElement("a"),mxUtils.write(b,mxResources.get("saveAndExit")),b.setAttribute("title",mxResources.get("saveAndExit")),b.style.fontSize="12px",b.style.marginLeft="6px",b.style.padding="4px",b.style.cursor="pointer",mxEvent.addListener(b,"click",mxUtils.bind(this,function(){this.actions.get("saveAndExit").funct()})),a.appendChild(b));
 b=document.createElement("a");mxUtils.write(b,mxResources.get("exit"));b.setAttribute("title",mxResources.get("exit"));b.style.fontSize="12px";b.style.marginLeft="6px";b.style.marginRight="20px";b.style.padding="4px";b.style.cursor="pointer";mxEvent.addListener(b,"click",mxUtils.bind(this,function(){this.actions.get("exit").funct()}));a.appendChild(b);this.toolbar.container.appendChild(a);this.toolbar.staticElements.push(a);a.style.right="atlas"!=uiTheme?"52px":"42px"}};EditorUi.prototype.showImportCsvDialog=
-function(){null==this.importCsvDialog&&(this.importCsvDialog=new TextareaDialog(this,mxResources.get("csv")+":",Editor.defaultCsvValue,mxUtils.bind(this,function(a){this.importCsv(a)}),null,null,620,430,null,!0,!0,mxResources.get("import")));this.showDialog(this.importCsvDialog.container,640,520,!0,!0);this.importCsvDialog.init()};EditorUi.prototype.importCsv=function(a){try{var b=a.split("\n"),c=[];if(0<b.length){var d={},e=null,g=null,l="auto",k="auto",p=40,q=40,x=0,w=this.editor.graph;w.getGraphBounds();
-for(var D=function(){w.setSelectionCells(P);w.scrollCellToVisible(w.getSelectionCell())},B=w.getFreeInsertPoint(),y=B.x,C=B.y,B=C,A=null,F="auto",z=[],J=null,I=null,H=0;H<b.length&&"#"==b[H].charAt(0);){a=b[H];for(H++;H<b.length&&"\\"==a.charAt(a.length-1)&&"#"==b[H].charAt(0);)a=a.substring(0,a.length-1)+mxUtils.trim(b[H].substring(1)),H++;if("#"!=a.charAt(1)){var T=a.indexOf(":");if(0<T){var N=mxUtils.trim(a.substring(1,T)),K=mxUtils.trim(a.substring(T+1));"label"==N?A=w.sanitizeHtml(K):"style"==
-N?e=K:"identity"==N&&0<K.length&&"-"!=K?g=K:"width"==N?l=K:"height"==N?k=K:"ignore"==N?I=K.split(","):"connect"==N?z.push(JSON.parse(K)):"link"==N?J=K:"padding"==N?x=parseFloat(K):"edgespacing"==N?p=parseFloat(K):"nodespacing"==N?q=parseFloat(K):"layout"==N&&(F=K)}}}var U=this.editor.csvToArray(b[H]);a=null;if(null!=g)for(var G=0;G<U.length;G++)if(g==U[G]){a=G;break}null==A&&(A="%"+U[0]+"%");if(null!=z)for(var L=0;L<z.length;L++)null==d[z[L].to]&&(d[z[L].to]={});w.model.beginUpdate();try{for(G=H+
-1;G<b.length;G++){var Q=this.editor.csvToArray(b[G]);if(Q.length==U.length){var E=null,V=null!=a?Q[a]:null;null!=V&&(E=w.model.getCell(V));null==E&&(E=new mxCell(A,new mxGeometry(y,B,0,0),e||"whiteSpace=wrap;html=1;"),E.vertex=!0,E.id=V);for(var O=0;O<Q.length;O++)w.setAttributeForCell(E,U[O],Q[O]);w.setAttributeForCell(E,"placeholders","1");E.style=w.replacePlaceholders(E,E.style);for(L=0;L<z.length;L++)d[z[L].to][E.getAttribute(z[L].to)]=E;null!=J&&"link"!=J&&(w.setLinkForCell(E,E.getAttribute(J)),
-w.setAttributeForCell(E,J,null));var W=this.editor.graph.getPreferredSizeForCell(E);E.geometry.width="auto"==l?W.width+x:parseFloat(l);E.geometry.height="auto"==k?W.height+x:parseFloat(k);B+=E.geometry.height+q;c.push(w.addCell(E))}}null==e&&w.fireEvent(new mxEventObject("cellsInserted","cells",c));for(var R=c.slice(),P=c.slice(),L=0;L<z.length;L++)for(var S=z[L],G=0;G<c.length;G++){var E=c[G],Y=E.getAttribute(S.from);if(null!=Y){w.setAttributeForCell(E,S.from,null);for(var X=Y.split(","),O=0;O<X.length;O++){var Z=
-d[S.to][X[O]];null!=Z&&(P.push(w.insertEdge(null,null,S.label||"",S.invert?Z:E,S.invert?E:Z,S.style||w.createCurrentEdgeStyle())),mxUtils.remove(S.invert?E:Z,R))}}}if(null!=I)for(G=0;G<c.length;G++)for(E=c[G],O=0;O<I.length;O++)w.setAttributeForCell(E,mxUtils.trim(I[O]),null);var aa=new mxParallelEdgeLayout(w);aa.spacing=p;var ia=function(){aa.execute(w.getDefaultParent());for(var a=0;a<c.length;a++){var b=w.getCellGeometry(c[a]);b.x=Math.round(w.snap(b.x));b.y=Math.round(w.snap(b.y));"auto"==l&&
-(b.width=Math.round(w.snap(b.width)));"auto"==k&&(b.height=Math.round(w.snap(b.height)))}};if("circle"==F){var ba=new mxCircleLayout(w);ba.resetEdges=!1;var ma=ba.isVertexIgnored;ba.isVertexIgnored=function(a){return ma.apply(this,arguments)||0>mxUtils.indexOf(c,a)};this.executeLayout(function(){ba.execute(w.getDefaultParent());ia()},!0,D);D=null}else if("horizontaltree"==F||"verticaltree"==F||"auto"==F&&P.length==2*c.length-1&&1==R.length){w.view.validate();var ca=new mxCompactTreeLayout(w,"horizontaltree"==
-F);ca.levelDistance=q;ca.edgeRouting=!1;ca.resetEdges=!1;this.executeLayout(function(){ca.execute(w.getDefaultParent(),0<R.length?R[0]:null)},!0,D);D=null}else if("horizontalflow"==F||"verticalflow"==F||"auto"==F&&1==R.length){w.view.validate();var ja=new mxHierarchicalLayout(w,"horizontalflow"==F?mxConstants.DIRECTION_WEST:mxConstants.DIRECTION_NORTH);ja.intraCellSpacing=q;ja.disableEdgeStyle=!1;this.executeLayout(function(){ja.execute(w.getDefaultParent(),P);w.moveCells(P,y,C)},!0,D);D=null}else if("organic"==
-F||"auto"==F&&P.length>c.length){w.view.validate();var da=new mxFastOrganicLayout(w);da.forceConstant=3*q;da.resetEdges=!1;var qa=da.isVertexIgnored;da.isVertexIgnored=function(a){return qa.apply(this,arguments)||0>mxUtils.indexOf(c,a)};aa=new mxParallelEdgeLayout(w);aa.spacing=p;this.executeLayout(function(){da.execute(w.getDefaultParent());ia()},!0,D);D=null}this.hideDialog()}finally{w.model.endUpdate()}null!=D&&D()}}catch(na){this.handleError(na)}};EditorUi.prototype.getSearch=function(a){var b=
+function(){null==this.importCsvDialog&&(this.importCsvDialog=new TextareaDialog(this,mxResources.get("csv")+":",Editor.defaultCsvValue,mxUtils.bind(this,function(a){this.importCsv(a)}),null,null,620,430,null,!0,!0,mxResources.get("import")));this.showDialog(this.importCsvDialog.container,640,520,!0,!0);this.importCsvDialog.init()};EditorUi.prototype.importCsv=function(a){try{var b=a.split("\n"),c=[];if(0<b.length){var d={},e=null,h=null,l="auto",k="auto",n=40,q=40,x=0,w=this.editor.graph;w.getGraphBounds();
+for(var D=function(){w.setSelectionCells(K);w.scrollCellToVisible(w.getSelectionCell())},A=w.getFreeInsertPoint(),z=A.x,C=A.y,A=C,B=null,E="auto",y=[],O=null,J=null,F=0;F<b.length&&"#"==b[F].charAt(0);){a=b[F];for(F++;F<b.length&&"\\"==a.charAt(a.length-1)&&"#"==b[F].charAt(0);)a=a.substring(0,a.length-1)+mxUtils.trim(b[F].substring(1)),F++;if("#"!=a.charAt(1)){var R=a.indexOf(":");if(0<R){var P=mxUtils.trim(a.substring(1,R)),I=mxUtils.trim(a.substring(R+1));"label"==P?B=w.sanitizeHtml(I):"style"==
+P?e=I:"identity"==P&&0<I.length&&"-"!=I?h=I:"width"==P?l=I:"height"==P?k=I:"ignore"==P?J=I.split(","):"connect"==P?y.push(JSON.parse(I)):"link"==P?O=I:"padding"==P?x=parseFloat(I):"edgespacing"==P?n=parseFloat(I):"nodespacing"==P?q=parseFloat(I):"layout"==P&&(E=I)}}}var S=this.editor.csvToArray(b[F]);a=null;if(null!=h)for(var H=0;H<S.length;H++)if(h==S[H]){a=H;break}null==B&&(B="%"+S[0]+"%");if(null!=y)for(var L=0;L<y.length;L++)null==d[y[L].to]&&(d[y[L].to]={});w.model.beginUpdate();try{for(H=F+
+1;H<b.length;H++){var Q=this.editor.csvToArray(b[H]);if(Q.length==S.length){var G=null,V=null!=a?Q[a]:null;null!=V&&(G=w.model.getCell(V));null==G&&(G=new mxCell(B,new mxGeometry(z,A,0,0),e||"whiteSpace=wrap;html=1;"),G.vertex=!0,G.id=V);for(var M=0;M<Q.length;M++)w.setAttributeForCell(G,S[M],Q[M]);w.setAttributeForCell(G,"placeholders","1");G.style=w.replacePlaceholders(G,G.style);for(L=0;L<y.length;L++)d[y[L].to][G.getAttribute(y[L].to)]=G;null!=O&&"link"!=O&&(w.setLinkForCell(G,G.getAttribute(O)),
+w.setAttributeForCell(G,O,null));var Y=this.editor.graph.getPreferredSizeForCell(G);G.geometry.width="auto"==l?Y.width+x:parseFloat(l);G.geometry.height="auto"==k?Y.height+x:parseFloat(k);A+=G.geometry.height+q;c.push(w.addCell(G))}}null==e&&w.fireEvent(new mxEventObject("cellsInserted","cells",c));for(var T=c.slice(),K=c.slice(),L=0;L<y.length;L++)for(var U=y[L],H=0;H<c.length;H++){var G=c[H],W=G.getAttribute(U.from);if(null!=W){w.setAttributeForCell(G,U.from,null);for(var X=W.split(","),M=0;M<X.length;M++){var ba=
+d[U.to][X[M]];null!=ba&&(K.push(w.insertEdge(null,null,U.label||"",U.invert?ba:G,U.invert?G:ba,U.style||w.createCurrentEdgeStyle())),mxUtils.remove(U.invert?G:ba,T))}}}if(null!=J)for(H=0;H<c.length;H++)for(G=c[H],M=0;M<J.length;M++)w.setAttributeForCell(G,mxUtils.trim(J[M]),null);var Z=new mxParallelEdgeLayout(w);Z.spacing=n;var ca=function(){Z.execute(w.getDefaultParent());for(var a=0;a<c.length;a++){var b=w.getCellGeometry(c[a]);b.x=Math.round(w.snap(b.x));b.y=Math.round(w.snap(b.y));"auto"==l&&
+(b.width=Math.round(w.snap(b.width)));"auto"==k&&(b.height=Math.round(w.snap(b.height)))}};if("circle"==E){var da=new mxCircleLayout(w);da.resetEdges=!1;var ma=da.isVertexIgnored;da.isVertexIgnored=function(a){return ma.apply(this,arguments)||0>mxUtils.indexOf(c,a)};this.executeLayout(function(){da.execute(w.getDefaultParent());ca()},!0,D);D=null}else if("horizontaltree"==E||"verticaltree"==E||"auto"==E&&K.length==2*c.length-1&&1==T.length){w.view.validate();var aa=new mxCompactTreeLayout(w,"horizontaltree"==
+E);aa.levelDistance=q;aa.edgeRouting=!1;aa.resetEdges=!1;this.executeLayout(function(){aa.execute(w.getDefaultParent(),0<T.length?T[0]:null)},!0,D);D=null}else if("horizontalflow"==E||"verticalflow"==E||"auto"==E&&1==T.length){w.view.validate();var ja=new mxHierarchicalLayout(w,"horizontalflow"==E?mxConstants.DIRECTION_WEST:mxConstants.DIRECTION_NORTH);ja.intraCellSpacing=q;ja.disableEdgeStyle=!1;this.executeLayout(function(){ja.execute(w.getDefaultParent(),K);w.moveCells(K,z,C)},!0,D);D=null}else if("organic"==
+E||"auto"==E&&K.length>c.length){w.view.validate();var ea=new mxFastOrganicLayout(w);ea.forceConstant=3*q;ea.resetEdges=!1;var pa=ea.isVertexIgnored;ea.isVertexIgnored=function(a){return pa.apply(this,arguments)||0>mxUtils.indexOf(c,a)};Z=new mxParallelEdgeLayout(w);Z.spacing=n;this.executeLayout(function(){ea.execute(w.getDefaultParent());ca()},!0,D);D=null}this.hideDialog()}finally{w.model.endUpdate()}null!=D&&D()}}catch(qa){this.handleError(qa)}};EditorUi.prototype.getSearch=function(a){var b=
 "";if("1"!=urlParams.offline&&"1"!=urlParams.demo&&null!=a&&0<window.location.search.length){var c="?",d;for(d in urlParams)0>mxUtils.indexOf(a,d)&&null!=urlParams[d]&&(b+=c+d+"="+urlParams[d],c="&")}else b=window.location.search;return b};EditorUi.prototype.getUrl=function(a){a=null!=a?a:window.location.pathname;var b=0<a.indexOf("?")?1:0;if("1"==urlParams.offline)a+=window.location.search;else{var c="tmp libs clibs state fileId code share notitle data url embed client create title splash".split(" "),
-d;for(d in urlParams)0>mxUtils.indexOf(c,d)&&(a=0==b?a+"?":a+"&",null!=urlParams[d]&&(a+=d+"="+urlParams[d],b++))}return a};EditorUi.prototype.showLinkDialog=function(a,b,d){a=new LinkDialog(this,a,b,d,!0);this.showDialog(a.container,420,120,!0,!0);a.init()};var p=EditorUi.prototype.createOutline;EditorUi.prototype.createOutline=function(a){var b=p.apply(this,arguments),c=this.editor.graph,d=b.getSourceGraphBounds;b.getSourceGraphBounds=function(){if(mxUtils.hasScrollbars(c.container)&&c.pageVisible&&
+d;for(d in urlParams)0>mxUtils.indexOf(c,d)&&(a=0==b?a+"?":a+"&",null!=urlParams[d]&&(a+=d+"="+urlParams[d],b++))}return a};EditorUi.prototype.showLinkDialog=function(a,b,d){a=new LinkDialog(this,a,b,d,!0);this.showDialog(a.container,420,120,!0,!0);a.init()};var n=EditorUi.prototype.createOutline;EditorUi.prototype.createOutline=function(a){var b=n.apply(this,arguments),c=this.editor.graph,d=b.getSourceGraphBounds;b.getSourceGraphBounds=function(){if(mxUtils.hasScrollbars(c.container)&&c.pageVisible&&
 null!=this.source.minimumGraphSize){var a=this.source.getPagePadding(),b=this.source.view.scale;return new mxRectangle(0,0,Math.ceil(this.source.minimumGraphSize.width-2*a.x/b),Math.ceil(this.source.minimumGraphSize.height-2*a.y/b))}return d.apply(this,arguments)};var e=b.getSourceContainerSize;b.getSourceContainerSize=function(){if(mxUtils.hasScrollbars(c.container)&&null!=this.source.minimumGraphSize){var a=this.source.getPagePadding(),b=this.source.view.scale;return new mxRectangle(0,0,Math.ceil(this.source.minimumGraphSize.width*
 b-2*a.x),Math.ceil(this.source.minimumGraphSize.height*b-2*a.y))}return e.apply(this,arguments)};b.getOutlineOffset=function(a){if(mxUtils.hasScrollbars(c.container)&&null!=this.source.minimumGraphSize){var d=this.source.getPagePadding();return new mxPoint(Math.round(Math.max(0,(b.outline.container.clientWidth/a-(this.source.minimumGraphSize.width-2*d.x))/2)-d.x),Math.round(Math.max(0,(b.outline.container.clientHeight/a-(this.source.minimumGraphSize.height-2*d.y))/2)-d.y-5/a))}return new mxPoint(8/
-a,8/a)};var g=b.init;b.init=function(){g.apply(this,arguments);b.outline.view.getBackgroundPageBounds=function(){var a=c.getPageLayout(),b=c.getPageSize();return new mxRectangle(this.scale*(this.translate.x+a.x*b.width),this.scale*(this.translate.y+a.y*b.height),this.scale*a.width*b.width,this.scale*a.height*b.height)};b.outline.view.validateBackgroundPage()};this.editor.addListener("pageSelected",function(a,c){var d=c.getProperty("change"),e=b.source,f=b.outline;f.pageScale=e.pageScale;f.pageFormat=
-e.pageFormat;f.background=e.background;f.pageVisible=e.pageVisible;f.background=e.background;var h=mxUtils.getCurrentStyle(e.container);f.container.style.backgroundColor=h.backgroundColor;null!=e.view.backgroundPageShape&&null!=f.view.backgroundPageShape&&(f.view.backgroundPageShape.fill=e.view.backgroundPageShape.fill);b.outline.view.clear(d.previousPage.root,!0);b.outline.view.validate()});return b};EditorUi.prototype.getServiceCount=function(a){var b=0;null==this.drive&&"function"!==typeof window.DriveClient||
+a,8/a)};var h=b.init;b.init=function(){h.apply(this,arguments);b.outline.view.getBackgroundPageBounds=function(){var a=c.getPageLayout(),b=c.getPageSize();return new mxRectangle(this.scale*(this.translate.x+a.x*b.width),this.scale*(this.translate.y+a.y*b.height),this.scale*a.width*b.width,this.scale*a.height*b.height)};b.outline.view.validateBackgroundPage()};this.editor.addListener("pageSelected",function(a,c){var d=c.getProperty("change"),e=b.source,f=b.outline;f.pageScale=e.pageScale;f.pageFormat=
+e.pageFormat;f.background=e.background;f.pageVisible=e.pageVisible;f.background=e.background;var g=mxUtils.getCurrentStyle(e.container);f.container.style.backgroundColor=g.backgroundColor;null!=e.view.backgroundPageShape&&null!=f.view.backgroundPageShape&&(f.view.backgroundPageShape.fill=e.view.backgroundPageShape.fill);b.outline.view.clear(d.previousPage.root,!0);b.outline.view.validate()});return b};EditorUi.prototype.getServiceCount=function(a){var b=0;null==this.drive&&"function"!==typeof window.DriveClient||
 b++;null==this.dropbox&&"function"!==typeof window.DropboxClient||b++;null==this.oneDrive&&"function"!==typeof window.OneDriveClient||b++;null!=this.gitHub&&b++;null==this.trello&&"function"!==typeof window.TrelloClient||b++;a&&isLocalStorage&&("1"==urlParams.browser||mxClient.IS_IOS)&&b++;mxClient.IS_IOS||b++;return b};EditorUi.prototype.updateUi=function(){this.updateButtonContainer();this.updateActionStates();var a=this.getCurrentFile(),b=null!=a||"1"==urlParams.embed&&this.editor.graph.isEnabled();
 this.menus.get("viewPanels").setEnabled(b);this.menus.get("viewZoom").setEnabled(b);var d=("1"!=urlParams.embed||!this.editor.graph.isEnabled())&&(null==a||a.isRestricted());this.actions.get("makeCopy").setEnabled(!d);this.actions.get("print").setEnabled(!d);this.menus.get("exportAs").setEnabled(!d);this.menus.get("embed").setEnabled(!d);d="1"!=urlParams.embed||this.editor.graph.isEnabled();this.menus.get("openLibraryFrom").setEnabled(d);this.menus.get("newLibrary").setEnabled(d);this.menus.get("extras").setEnabled(d);
 a="1"==urlParams.embed&&this.editor.graph.isEnabled()||null!=a&&a.isEditable();this.actions.get("image").setEnabled(b);this.actions.get("zoomIn").setEnabled(b);this.actions.get("zoomOut").setEnabled(b);this.actions.get("resetView").setEnabled(b);this.menus.get("edit").setEnabled(b);this.menus.get("view").setEnabled(b);this.menus.get("importFrom").setEnabled(a);this.menus.get("arrange").setEnabled(a);null!=this.toolbar&&(null!=this.toolbar.edgeShapeMenu&&this.toolbar.edgeShapeMenu.setEnabled(a),null!=
 this.toolbar.edgeStyleMenu&&this.toolbar.edgeStyleMenu.setEnabled(a));if(this.isOfflineApp()){var e=applicationCache;if(null!=e&&null==this.offlineStatus){this.offlineStatus=document.createElement("div");this.offlineStatus.className="geItem";this.offlineStatus.style.position="absolute";this.offlineStatus.style.fontSize="8pt";this.offlineStatus.style.top="2px";this.offlineStatus.style.right="12px";this.offlineStatus.style.color="#666";this.offlineStatus.style.margin="4px";this.offlineStatus.style.padding=
-"2px";this.offlineStatus.style.verticalAlign="middle";this.offlineStatus.innerHTML="";this.menubarContainer.appendChild(this.offlineStatus);mxEvent.addListener(this.offlineStatus,"click",mxUtils.bind(this,function(){var a=this.offlineStatus.getElementsByTagName("img");null!=a&&0<a.length&&this.alert(a[0].getAttribute("title"))}));var e=window.applicationCache,g=null,b=mxUtils.bind(this,function(){var a=e.status,b;a==e.CHECKING&&(a=e.DOWNLOADING);switch(a){case e.UNCACHED:b="";break;case e.IDLE:b=
+"2px";this.offlineStatus.style.verticalAlign="middle";this.offlineStatus.innerHTML="";this.menubarContainer.appendChild(this.offlineStatus);mxEvent.addListener(this.offlineStatus,"click",mxUtils.bind(this,function(){var a=this.offlineStatus.getElementsByTagName("img");null!=a&&0<a.length&&this.alert(a[0].getAttribute("title"))}));var e=window.applicationCache,h=null,b=mxUtils.bind(this,function(){var a=e.status,b;a==e.CHECKING&&(a=e.DOWNLOADING);switch(a){case e.UNCACHED:b="";break;case e.IDLE:b=
 '<img title="draw.io is up to date." border="0" src="'+IMAGE_PATH+'/checkmark.gif"/>';break;case e.DOWNLOADING:b='<img title="Downloading new version..." border="0" src="'+IMAGE_PATH+'/spin.gif"/>';break;case e.UPDATEREADY:b='<img title="'+mxUtils.htmlEntities(mxResources.get("restartForChangeRequired"))+'" border="0" src="'+IMAGE_PATH+'/download.png"/>';break;case e.OBSOLETE:b='<img title="Obsolete" border="0" src="'+IMAGE_PATH+'/clear.gif"/>';break;default:b='<img title="Unknown" border="0" src="'+
-IMAGE_PATH+'/clear.gif"/>'}a!=g&&(this.offlineStatus.innerHTML=b,g=a)});mxEvent.addListener(e,"checking",b);mxEvent.addListener(e,"noupdate",b);mxEvent.addListener(e,"downloading",b);mxEvent.addListener(e,"progress",b);mxEvent.addListener(e,"cached",b);mxEvent.addListener(e,"updateready",b);mxEvent.addListener(e,"obsolete",b);mxEvent.addListener(e,"error",b);b()}}else this.updateUserElement()};EditorUi.prototype.updateButtonContainer=function(){};EditorUi.prototype.updateUserElement=function(){};
+IMAGE_PATH+'/clear.gif"/>'}a!=h&&(this.offlineStatus.innerHTML=b,h=a)});mxEvent.addListener(e,"checking",b);mxEvent.addListener(e,"noupdate",b);mxEvent.addListener(e,"downloading",b);mxEvent.addListener(e,"progress",b);mxEvent.addListener(e,"cached",b);mxEvent.addListener(e,"updateready",b);mxEvent.addListener(e,"obsolete",b);mxEvent.addListener(e,"error",b);b()}}else this.updateUserElement()};EditorUi.prototype.updateButtonContainer=function(){};EditorUi.prototype.updateUserElement=function(){};
 var q=EditorUi.prototype.updateActionStates;EditorUi.prototype.updateActionStates=function(){q.apply(this,arguments);var a=this.editor.graph,b=this.getCurrentFile(),d=null!=b&&b.isEditable()||"1"==urlParams.embed&&this.editor.graph.isEnabled();this.actions.get("pageSetup").setEnabled(d);this.actions.get("autosave").setEnabled(null!=b&&b.isEditable()&&b.isAutosaveOptional());this.actions.get("guides").setEnabled(d);this.actions.get("editData").setEnabled(d);this.actions.get("shadowVisible").setEnabled(d);
 this.actions.get("connectionArrows").setEnabled(d);this.actions.get("connectionPoints").setEnabled(d);this.actions.get("copyStyle").setEnabled(d&&!a.isSelectionEmpty());this.actions.get("pasteStyle").setEnabled(d&&!a.isSelectionEmpty());this.actions.get("editGeometry").setEnabled(a.getModel().isVertex(a.getSelectionCell()));this.actions.get("createShape").setEnabled(d);this.actions.get("createRevision").setEnabled(d);this.actions.get("moveToFolder").setEnabled(null!=b);this.actions.get("makeCopy").setEnabled(null!=
 b&&!b.isRestricted());this.actions.get("editDiagram").setEnabled("1"==urlParams.embed&&this.editor.graph.isEnabled()||null!=b&&!b.isRestricted());this.actions.get("publishLink").setEnabled(null!=b&&!b.isRestricted());this.actions.get("tags").setEnabled("1"==urlParams.embed&&this.editor.graph.isEnabled()||null!=b&&!b.isRestricted());this.actions.get("close").setEnabled(null!=b);this.menus.get("publish").setEnabled(null!=b&&!b.isRestricted());a=a.view.getState(a.getSelectionCell());this.actions.get("editShape").setEnabled(d&&
-null!=a&&null!=a.shape&&null!=a.shape.stencil)};null!=window.ExportDialog&&(ExportDialog.showXmlOption=!1,ExportDialog.showGifOption=!1,ExportDialog.exportFile=function(a,b,d,e,g,l){var c=a.editor.graph;if("xml"==d)a.hideDialog(),a.saveData(b,"xml",mxUtils.getXml(a.editor.getGraphXml()),"text/xml");else if("svg"==d)a.hideDialog(),a.saveData(b,"svg",mxUtils.getXml(c.getSvg(e,g,l)),"image/svg+xml");else{var f=a.getFileData(!0,null,null,null,null,!0),h=c.getGraphBounds(),m=Math.floor(h.width*g/c.view.scale),
-p=Math.floor(h.height*g/c.view.scale);f.length<=MAX_REQUEST_SIZE&&m*p<MAX_AREA?(a.hideDialog(),a.saveRequest(b,d,function(a,b){return new mxXmlRequest(EXPORT_URL,"format="+d+"&base64="+(b||"0")+(null!=a?"&filename="+encodeURIComponent(a):"")+"&bg="+(null!=e?e:"none")+"&w="+m+"&h="+p+"&border="+l+"&xml="+encodeURIComponent(f))})):mxUtils.alert(mxResources.get("drawingTooLarge"))}})})();function DiagramPage(a){this.node=a;(null==this.node.hasAttribute&&null==this.node.getAttribute("id")||null!=this.node.hasAttribute&&!this.node.hasAttribute("id"))&&this.node.setAttribute("id",function(){function a(){return Math.floor(65536*(1+Math.random())).toString(16).substring(1)}return a()+a()+"-"+a()+"-"+a()+"-"+a()+"-"+a()+a()+a()}())}DiagramPage.prototype.node=null;DiagramPage.prototype.root=null;DiagramPage.prototype.viewState=null;DiagramPage.prototype.getId=function(){return this.node.getAttribute("id")};
+null!=a&&null!=a.shape&&null!=a.shape.stencil)};null!=window.ExportDialog&&(ExportDialog.showXmlOption=!1,ExportDialog.showGifOption=!1,ExportDialog.exportFile=function(a,b,d,e,h,l){var c=a.editor.graph;if("xml"==d)a.hideDialog(),a.saveData(b,"xml",mxUtils.getXml(a.editor.getGraphXml()),"text/xml");else if("svg"==d)a.hideDialog(),a.saveData(b,"svg",mxUtils.getXml(c.getSvg(e,h,l)),"image/svg+xml");else{var f=a.getFileData(!0,null,null,null,null,!0),g=c.getGraphBounds(),n=Math.floor(g.width*h/c.view.scale),
+p=Math.floor(g.height*h/c.view.scale);f.length<=MAX_REQUEST_SIZE&&n*p<MAX_AREA?(a.hideDialog(),a.saveRequest(b,d,function(a,b){return new mxXmlRequest(EXPORT_URL,"format="+d+"&base64="+(b||"0")+(null!=a?"&filename="+encodeURIComponent(a):"")+"&bg="+(null!=e?e:"none")+"&w="+n+"&h="+p+"&border="+l+"&xml="+encodeURIComponent(f))})):mxUtils.alert(mxResources.get("drawingTooLarge"))}})})();function DiagramPage(a){this.node=a;(null==this.node.hasAttribute&&null==this.node.getAttribute("id")||null!=this.node.hasAttribute&&!this.node.hasAttribute("id"))&&this.node.setAttribute("id",function(){function a(){return Math.floor(65536*(1+Math.random())).toString(16).substring(1)}return a()+a()+"-"+a()+"-"+a()+"-"+a()+"-"+a()+a()+a()}())}DiagramPage.prototype.node=null;DiagramPage.prototype.root=null;DiagramPage.prototype.viewState=null;DiagramPage.prototype.getId=function(){return this.node.getAttribute("id")};
 DiagramPage.prototype.getName=function(){return this.node.getAttribute("name")};DiagramPage.prototype.setName=function(a){null==a?this.node.removeAttribute("name"):this.node.setAttribute("name",a)};function RenamePage(a,b,e){this.ui=a;this.page=b;this.previous=e}RenamePage.prototype.execute=function(){var a=this.page.getName();this.page.setName(this.previous);this.previous=a;this.ui.editor.graph.updatePlaceholders();this.ui.editor.fireEvent(new mxEventObject("pageRenamed"))};
 function MovePage(a,b,e){this.ui=a;this.oldIndex=b;this.newIndex=e}MovePage.prototype.execute=function(){this.ui.pages.splice(this.newIndex,0,this.ui.pages.splice(this.oldIndex,1)[0]);var a=this.oldIndex;this.oldIndex=this.newIndex;this.newIndex=a;this.ui.editor.graph.updatePlaceholders();this.ui.editor.fireEvent(new mxEventObject("pageMoved"))};
 function SelectPage(a,b){this.ui=a;this.previousPage=this.page=b;this.neverShown=!0;null!=b&&(this.neverShown=null==b.viewState,this.ui.updatePageRoot(b))}
@@ -2908,11 +2909,11 @@ b.fireEvent(new mxEventObject("setViewState","change",this));e.gridEnabled=e.gri
 mxUtils.extend(ChangePage,SelectPage);ChangePage.prototype.execute=function(){this.ui.editor.fireEvent(new mxEventObject("beforePageChange","change",this));this.previousIndex=this.index;if(null==this.index){var a=mxUtils.indexOf(this.ui.pages,this.relatedPage);this.ui.pages.splice(a,1);this.index=a}else this.ui.pages.splice(this.index,0,this.relatedPage),this.index=null;SelectPage.prototype.execute.apply(this,arguments)};
 EditorUi.prototype.getPageById=function(a){if(null!=this.pages)for(var b=0;b<this.pages.length;b++)if(this.pages[b].getId()==a)return this.pages[b];return null};
 EditorUi.prototype.initPages=function(){this.actions.addAction("previousPage",mxUtils.bind(this,function(){this.selectNextPage(!1)}));this.actions.addAction("nextPage",mxUtils.bind(this,function(){this.selectNextPage(!0)}));this.keyHandler.bindAction(33,!0,"previousPage",!0);this.keyHandler.bindAction(34,!0,"nextPage",!0);var a=this.editor.graph,b=a.view.validateBackground;a.view.validateBackground=mxUtils.bind(this,function(){if(null!=this.tabContainer){var d=this.tabContainer.style.height;this.tabContainer.style.height=
-null==this.fileNode||null==this.pages||1==this.pages.length&&"0"==urlParams.pages?"0px":"30px";d!=this.tabContainer.style.height&&this.refresh(!1)}b.apply(a.view,arguments)});var e=!1,d=null,g=mxUtils.bind(this,function(){this.updateTabContainer();var b=this.currentPage;null!=b&&b!=d&&(null==b.viewState||null==b.viewState.scrollLeft?(this.resetScrollbars(),a.lightbox&&this.lightboxFit(),null!=this.chromelessResize&&(a.container.scrollLeft=0,a.container.scrollTop=0,this.chromelessResize())):(a.container.scrollLeft=
+null==this.fileNode||null==this.pages||1==this.pages.length&&"0"==urlParams.pages?"0px":"30px";d!=this.tabContainer.style.height&&this.refresh(!1)}b.apply(a.view,arguments)});var e=!1,d=null,h=mxUtils.bind(this,function(){this.updateTabContainer();var b=this.currentPage;null!=b&&b!=d&&(null==b.viewState||null==b.viewState.scrollLeft?(this.resetScrollbars(),a.lightbox&&this.lightboxFit(),null!=this.chromelessResize&&(a.container.scrollLeft=0,a.container.scrollTop=0,this.chromelessResize())):(a.container.scrollLeft=
 a.view.translate.x*a.view.scale+b.viewState.scrollLeft,a.container.scrollTop=a.view.translate.y*a.view.scale+b.viewState.scrollTop),d=b);null!=this.actions.layersWindow&&this.actions.layersWindow.refreshLayers();"undefined"!==typeof MathJax&&"undefined"!==typeof MathJax.Hub?e||(1!=MathJax.Hub.queue.pending||this.editor.graph.mathEnabled||MathJax.Hub.Queue(mxUtils.bind(this,function(){this.editor.graph.refresh()})),MathJax.Hub.Queue(mxUtils.bind(this,function(){e=!0}))):"undefined"===typeof Editor.MathJaxClear||
-this.editor.graph.mathEnabled||(e=!0,Editor.MathJaxClear())});this.editor.graph.model.addListener(mxEvent.CHANGE,mxUtils.bind(this,function(a,b){for(var d=b.getProperty("edit").changes,c=0;c<d.length;c++)if(d[c]instanceof SelectPage||d[c]instanceof RenamePage||d[c]instanceof MovePage||d[c]instanceof mxRootChange){g();break}}));null!=this.toolbar&&this.editor.addListener("pageSelected",this.toolbar.updateZoom)};
-Graph.prototype.createViewState=function(a){var b=a.getAttribute("page"),e=a.getAttribute("pageScale"),d=a.getAttribute("pageWidth"),g=a.getAttribute("pageHeight"),l=a.getAttribute("background"),p=a.getAttribute("backgroundImage"),p=null!=p&&0<p.length?JSON.parse(p):null;return{gridEnabled:"0"!=a.getAttribute("grid"),gridSize:parseFloat(a.getAttribute("gridSize"))||mxGraph.prototype.gridSize,guidesEnabled:"0"!=a.getAttribute("guides"),foldingEnabled:"0"!=a.getAttribute("fold"),shadowVisible:"1"==
-a.getAttribute("shadow"),pageVisible:this.lightbox?!1:null!=b?"0"!=b:this.defaultPageVisible,background:null!=l&&0<l.length?l:this.defaultGraphBackground,backgroundImage:null!=p?new mxImage(p.src,p.width,p.height):null,pageScale:null!=e?e:mxGraph.prototype.pageScale,pageFormat:null!=d&&null!=g?new mxRectangle(0,0,parseFloat(d),parseFloat(g)):this.pageFormat,tooltips:"0"!=a.getAttribute("tooltips"),connect:"0"!=a.getAttribute("connect"),arrows:"0"!=a.getAttribute("arrows"),mathEnabled:"0"!=a.getAttribute("math"),
+this.editor.graph.mathEnabled||(e=!0,Editor.MathJaxClear())});this.editor.graph.model.addListener(mxEvent.CHANGE,mxUtils.bind(this,function(a,b){for(var d=b.getProperty("edit").changes,c=0;c<d.length;c++)if(d[c]instanceof SelectPage||d[c]instanceof RenamePage||d[c]instanceof MovePage||d[c]instanceof mxRootChange){h();break}}));null!=this.toolbar&&this.editor.addListener("pageSelected",this.toolbar.updateZoom)};
+Graph.prototype.createViewState=function(a){var b=a.getAttribute("page"),e=a.getAttribute("pageScale"),d=a.getAttribute("pageWidth"),h=a.getAttribute("pageHeight"),l=a.getAttribute("background"),n=a.getAttribute("backgroundImage"),n=null!=n&&0<n.length?JSON.parse(n):null;return{gridEnabled:"0"!=a.getAttribute("grid"),gridSize:parseFloat(a.getAttribute("gridSize"))||mxGraph.prototype.gridSize,guidesEnabled:"0"!=a.getAttribute("guides"),foldingEnabled:"0"!=a.getAttribute("fold"),shadowVisible:"1"==
+a.getAttribute("shadow"),pageVisible:this.lightbox?!1:null!=b?"0"!=b:this.defaultPageVisible,background:null!=l&&0<l.length?l:this.defaultGraphBackground,backgroundImage:null!=n?new mxImage(n.src,n.width,n.height):null,pageScale:null!=e?e:mxGraph.prototype.pageScale,pageFormat:null!=d&&null!=h?new mxRectangle(0,0,parseFloat(d),parseFloat(h)):this.pageFormat,tooltips:"0"!=a.getAttribute("tooltips"),connect:"0"!=a.getAttribute("connect"),arrows:"0"!=a.getAttribute("arrows"),mathEnabled:"0"!=a.getAttribute("math"),
 selectionCells:null,defaultParent:null,scrollbars:this.defaultScrollbars,scale:1}};
 Graph.prototype.getViewState=function(){return{defaultParent:this.defaultParent,currentRoot:this.view.currentRoot,gridEnabled:this.gridEnabled,gridSize:this.gridSize,guidesEnabled:this.graphHandler.guidesEnabled,foldingEnabled:this.foldingEnabled,shadowVisible:this.shadowVisible,scrollbars:this.scrollbars,pageVisible:this.pageVisible,background:this.background,backgroundImage:this.backgroundImage,pageScale:this.pageScale,pageFormat:this.pageFormat,tooltips:this.tooltipHandler.isEnabled(),connect:this.connectionHandler.isEnabled(),
 arrows:this.connectionArrowsEnabled,scale:this.view.scale,scrollLeft:this.container.scrollLeft-this.view.translate.x*this.view.scale,scrollTop:this.container.scrollTop-this.view.translate.y*this.view.scale,translate:this.view.translate.clone(),lastPasteXml:this.lastPasteXml,pasteCounter:this.pasteCounter,mathEnabled:this.mathEnabled}};
@@ -2928,72 +2929,72 @@ EditorUi.prototype.duplicatePage=function(a,b){var e=this.editor.graph,d=null;e.
 EditorUi.prototype.renamePage=function(a){if(this.editor.graph.isEnabled()){var b=new FilenameDialog(this,a.getName(),mxResources.get("rename"),mxUtils.bind(this,function(b){null!=b&&0<b.length&&this.editor.graph.model.execute(new RenamePage(this,a,b))}),mxResources.get("rename"));this.showDialog(b.container,300,80,!0,!0);b.init()}return a};EditorUi.prototype.movePage=function(a,b){this.editor.graph.model.execute(new MovePage(this,a,b))};
 EditorUi.prototype.createTabContainer=function(){var a=document.createElement("div");a.style.backgroundColor="#dcdcdc";a.style.position="absolute";a.style.whiteSpace="nowrap";a.style.overflow="hidden";a.style.height="0px";return a};
 EditorUi.prototype.updateTabContainer=function(){if(null!=this.tabContainer&&null!=this.pages){var a=this.editor.graph,b=document.createElement("div");b.style.position="relative";b.style.display=mxClient.IS_QUIRKS?"inline":"inline-block";b.style.verticalAlign="top";b.style.height=this.tabContainer.style.height;b.style.whiteSpace="nowrap";b.style.overflow="hidden";b.style.fontSize="12px";b.style.marginLeft="30px";for(var e=this.editor.chromeless?29:59,d=Math.min(140,Math.max(20,(this.tabContainer.clientWidth-
-e)/this.pages.length)+1),g=null,l=0;l<this.pages.length;l++)mxUtils.bind(this,function(c,d){this.pages[c]==this.currentPage&&(d.style.backgroundColor="#eeeeee",d.style.fontWeight="bold",d.style.borderTopStyle="none");d.setAttribute("draggable","true");mxEvent.addListener(d,"dragstart",mxUtils.bind(this,function(b){a.isEnabled()?(mxClient.IS_FF&&b.dataTransfer.setData("Text","<diagram/>"),g=c):mxEvent.consume(b)}));mxEvent.addListener(d,"dragend",mxUtils.bind(this,function(a){g=null;a.stopPropagation();
-a.preventDefault()}));mxEvent.addListener(d,"dragover",mxUtils.bind(this,function(a){null!=g&&(a.dataTransfer.dropEffect="move");a.stopPropagation();a.preventDefault()}));mxEvent.addListener(d,"drop",mxUtils.bind(this,function(a){null!=g&&c!=g&&this.movePage(g,c);a.stopPropagation();a.preventDefault()}));b.appendChild(d)})(l,this.createTabForPage(this.pages[l],d,this.pages[l]!=this.currentPage));this.tabContainer.innerHTML="";this.tabContainer.appendChild(b);d=this.createPageMenuTab();this.tabContainer.appendChild(d);
-d=null;if(1==urlParams.embed||null!=this.getCurrentFile()&&this.getCurrentFile().isEditable())d=this.createPageInsertTab(),this.tabContainer.appendChild(d);if(b.clientWidth>this.tabContainer.clientWidth-e){null!=d&&(d.style.position="absolute",d.style.right="0px",b.style.marginRight="30px");var p=this.createControlTab(4,"&nbsp;&#10094;&nbsp;");p.style.position="absolute";p.style.right=this.editor.chromeless?"29px":"55px";p.style.fontSize="13pt";this.tabContainer.appendChild(p);var q=this.createControlTab(4,
-"&nbsp;&#10095;");q.style.position="absolute";q.style.right=this.editor.chromeless?"0px":"29px";q.style.fontSize="13pt";this.tabContainer.appendChild(q);var c=Math.max(0,this.tabContainer.clientWidth-(this.editor.chromeless?86:116));b.style.width=c+"px";mxEvent.addListener(p,"click",mxUtils.bind(this,function(a){b.scrollLeft-=Math.max(20,c-20);mxUtils.setOpacity(p,0<b.scrollLeft?100:50);mxUtils.setOpacity(q,b.scrollLeft<b.scrollWidth-b.clientWidth?100:50);mxEvent.consume(a)}));mxUtils.setOpacity(p,
-0<b.scrollLeft?100:50);mxUtils.setOpacity(q,b.scrollLeft<b.scrollWidth-b.clientWidth?100:50);mxEvent.addListener(q,"click",mxUtils.bind(this,function(a){b.scrollLeft+=Math.max(20,c-20);mxUtils.setOpacity(p,0<b.scrollLeft?100:50);mxUtils.setOpacity(q,b.scrollLeft<b.scrollWidth-b.clientWidth?100:50);mxEvent.consume(a)}))}}};
+e)/this.pages.length)+1),h=null,l=0;l<this.pages.length;l++)mxUtils.bind(this,function(c,d){this.pages[c]==this.currentPage&&(d.style.backgroundColor="#eeeeee",d.style.fontWeight="bold",d.style.borderTopStyle="none");d.setAttribute("draggable","true");mxEvent.addListener(d,"dragstart",mxUtils.bind(this,function(b){a.isEnabled()?(mxClient.IS_FF&&b.dataTransfer.setData("Text","<diagram/>"),h=c):mxEvent.consume(b)}));mxEvent.addListener(d,"dragend",mxUtils.bind(this,function(a){h=null;a.stopPropagation();
+a.preventDefault()}));mxEvent.addListener(d,"dragover",mxUtils.bind(this,function(a){null!=h&&(a.dataTransfer.dropEffect="move");a.stopPropagation();a.preventDefault()}));mxEvent.addListener(d,"drop",mxUtils.bind(this,function(a){null!=h&&c!=h&&this.movePage(h,c);a.stopPropagation();a.preventDefault()}));b.appendChild(d)})(l,this.createTabForPage(this.pages[l],d,this.pages[l]!=this.currentPage));this.tabContainer.innerHTML="";this.tabContainer.appendChild(b);d=this.createPageMenuTab();this.tabContainer.appendChild(d);
+d=null;if(1==urlParams.embed||null!=this.getCurrentFile()&&this.getCurrentFile().isEditable())d=this.createPageInsertTab(),this.tabContainer.appendChild(d);if(b.clientWidth>this.tabContainer.clientWidth-e){null!=d&&(d.style.position="absolute",d.style.right="0px",b.style.marginRight="30px");var n=this.createControlTab(4,"&nbsp;&#10094;&nbsp;");n.style.position="absolute";n.style.right=this.editor.chromeless?"29px":"55px";n.style.fontSize="13pt";this.tabContainer.appendChild(n);var q=this.createControlTab(4,
+"&nbsp;&#10095;");q.style.position="absolute";q.style.right=this.editor.chromeless?"0px":"29px";q.style.fontSize="13pt";this.tabContainer.appendChild(q);var c=Math.max(0,this.tabContainer.clientWidth-(this.editor.chromeless?86:116));b.style.width=c+"px";mxEvent.addListener(n,"click",mxUtils.bind(this,function(a){b.scrollLeft-=Math.max(20,c-20);mxUtils.setOpacity(n,0<b.scrollLeft?100:50);mxUtils.setOpacity(q,b.scrollLeft<b.scrollWidth-b.clientWidth?100:50);mxEvent.consume(a)}));mxUtils.setOpacity(n,
+0<b.scrollLeft?100:50);mxUtils.setOpacity(q,b.scrollLeft<b.scrollWidth-b.clientWidth?100:50);mxEvent.addListener(q,"click",mxUtils.bind(this,function(a){b.scrollLeft+=Math.max(20,c-20);mxUtils.setOpacity(n,0<b.scrollLeft?100:50);mxUtils.setOpacity(q,b.scrollLeft<b.scrollWidth-b.clientWidth?100:50);mxEvent.consume(a)}))}}};
 EditorUi.prototype.createTab=function(a){var b=document.createElement("div");b.style.display=mxClient.IS_QUIRKS?"inline":"inline-block";b.style.whiteSpace="nowrap";b.style.boxSizing="border-box";b.style.position="relative";b.style.overflow="hidden";b.style.marginLeft="-1px";b.style.height=this.tabContainer.clientHeight+"px";b.style.padding="8px 4px 8px 4px";b.style.border="1px solid #c0c0c0";b.style.borderBottomStyle="solid";b.style.backgroundColor=this.tabContainer.style.backgroundColor;b.style.cursor=
 "default";b.style.color="gray";a&&(mxEvent.addListener(b,"mouseenter",mxUtils.bind(this,function(a){this.editor.graph.isMouseDown||(b.style.backgroundColor="#d3d3d3",mxEvent.consume(a))})),mxEvent.addListener(b,"mouseleave",mxUtils.bind(this,function(a){b.style.backgroundColor=this.tabContainer.style.backgroundColor;mxEvent.consume(a)})));return b};
 EditorUi.prototype.createControlTab=function(a,b){var e=this.createTab(!0);e.style.paddingTop=a+"px";e.style.cursor="pointer";e.style.width="30px";e.style.lineHeight="30px";e.innerHTML=b;null!=e.firstChild&&null!=e.firstChild.style&&mxUtils.setOpacity(e.firstChild,40);return e};
 EditorUi.prototype.createPageMenuTab=function(){var a=this.createControlTab(3,'<div class="geSprite geSprite-dots" style="display:inline-block;width:21px;height:21px;"></div>');a.setAttribute("title",mxResources.get("pages"));a.style.position="absolute";a.style.left="1px";mxEvent.addListener(a,"click",mxUtils.bind(this,function(a){this.editor.graph.popupMenuHandler.hideMenu();var b=new mxPopupMenu(mxUtils.bind(this,function(a,b){for(var d=0;d<this.pages.length;d++)mxUtils.bind(this,function(c){var d=
 a.addItem(this.pages[c].getName(),null,mxUtils.bind(this,function(){this.selectPage(this.pages[c])}),b);this.pages[c]==this.currentPage&&a.addCheckmark(d,Editor.checkmarkImage)})(d);if(this.editor.graph.isEnabled()){a.addSeparator(b);a.addItem(mxResources.get("insertPage"),null,mxUtils.bind(this,function(){this.insertPage()}),b);var c=this.currentPage;null!=c&&(a.addSeparator(b),a.addItem(mxResources.get("delete"),null,mxUtils.bind(this,function(){this.removePage(c)}),b),a.addItem(mxResources.get("rename"),
-null,mxUtils.bind(this,function(){this.renamePage(c,c.getName())}),b),a.addSeparator(b),a.addItem(mxResources.get("duplicate"),null,mxUtils.bind(this,function(){this.duplicatePage(c,mxResources.get("copyOf",[c.getName()]))}),b))}}));b.div.className+=" geMenubarMenu";b.smartSeparators=!0;b.showDisabled=!0;b.autoExpand=!0;b.hideMenu=mxUtils.bind(this,function(){mxPopupMenu.prototype.hideMenu.apply(b,arguments);b.destroy()});var d=mxEvent.getClientX(a),g=mxEvent.getClientY(a);b.popup(d,g,null,a);this.setCurrentMenu(b);
+null,mxUtils.bind(this,function(){this.renamePage(c,c.getName())}),b),a.addSeparator(b),a.addItem(mxResources.get("duplicate"),null,mxUtils.bind(this,function(){this.duplicatePage(c,mxResources.get("copyOf",[c.getName()]))}),b))}}));b.div.className+=" geMenubarMenu";b.smartSeparators=!0;b.showDisabled=!0;b.autoExpand=!0;b.hideMenu=mxUtils.bind(this,function(){mxPopupMenu.prototype.hideMenu.apply(b,arguments);b.destroy()});var d=mxEvent.getClientX(a),h=mxEvent.getClientY(a);b.popup(d,h,null,a);this.setCurrentMenu(b);
 mxEvent.consume(a)}));return a};EditorUi.prototype.createPageInsertTab=function(){var a=this.createControlTab(4,'<div class="geSprite geSprite-plus" style="display:inline-block;width:21px;height:21px;"></div>');a.setAttribute("title",mxResources.get("insertPage"));mxEvent.addListener(a,"click",mxUtils.bind(this,function(a){this.insertPage();mxEvent.consume(a)}));return a};
 EditorUi.prototype.createTabForPage=function(a,b,e){e=this.createTab(e);var d=a.getName();e.setAttribute("title",d);mxUtils.write(e,d);e.style.maxWidth=b+"px";e.style.width=b+"px";this.addTabListeners(a,e);42<b&&(e.style.textOverflow="ellipsis");return e};
-EditorUi.prototype.addTabListeners=function(a,b){mxEvent.disableContextMenu(b);var e=this.editor.graph;mxEvent.addListener(b,"dblclick",mxUtils.bind(this,function(b){this.renamePage(a);mxEvent.consume(b)}));var d=!1,g=!1;mxEvent.addGestureListeners(b,mxUtils.bind(this,function(b){d=null!=this.currentMenu;g=a==this.currentPage;e.isMouseDown||g||this.selectPage(a)}),null,mxUtils.bind(this,function(l){if(e.isEnabled()&&!e.isMouseDown&&(mxEvent.isTouchEvent(l)&&g||mxEvent.isPopupTrigger(l))){e.popupMenuHandler.hideMenu();
-this.hideCurrentMenu();if(!mxEvent.isTouchEvent(l)||!d){var p=new mxPopupMenu(this.createPageMenu(a));p.div.className+=" geMenubarMenu";p.smartSeparators=!0;p.showDisabled=!0;p.autoExpand=!0;p.hideMenu=mxUtils.bind(this,function(){mxPopupMenu.prototype.hideMenu.apply(p,arguments);this.resetCurrentMenu();p.destroy()});var q=mxEvent.getClientX(l),c=mxEvent.getClientY(l);p.popup(q,c,null,l);this.setCurrentMenu(p,b)}mxEvent.consume(l)}}))};
+EditorUi.prototype.addTabListeners=function(a,b){mxEvent.disableContextMenu(b);var e=this.editor.graph;mxEvent.addListener(b,"dblclick",mxUtils.bind(this,function(b){this.renamePage(a);mxEvent.consume(b)}));var d=!1,h=!1;mxEvent.addGestureListeners(b,mxUtils.bind(this,function(b){d=null!=this.currentMenu;h=a==this.currentPage;e.isMouseDown||h||this.selectPage(a)}),null,mxUtils.bind(this,function(l){if(e.isEnabled()&&!e.isMouseDown&&(mxEvent.isTouchEvent(l)&&h||mxEvent.isPopupTrigger(l))){e.popupMenuHandler.hideMenu();
+this.hideCurrentMenu();if(!mxEvent.isTouchEvent(l)||!d){var n=new mxPopupMenu(this.createPageMenu(a));n.div.className+=" geMenubarMenu";n.smartSeparators=!0;n.showDisabled=!0;n.autoExpand=!0;n.hideMenu=mxUtils.bind(this,function(){mxPopupMenu.prototype.hideMenu.apply(n,arguments);this.resetCurrentMenu();n.destroy()});var q=mxEvent.getClientX(l),c=mxEvent.getClientY(l);n.popup(q,c,null,l);this.setCurrentMenu(n,b)}mxEvent.consume(l)}}))};
 EditorUi.prototype.createPageMenu=function(a,b){return mxUtils.bind(this,function(e,d){e.addItem(mxResources.get("insert"),null,mxUtils.bind(this,function(){this.insertPage(null,mxUtils.indexOf(this.pages,a)+1)}),d);e.addItem(mxResources.get("delete"),null,mxUtils.bind(this,function(){this.removePage(a)}),d);e.addItem(mxResources.get("rename"),null,mxUtils.bind(this,function(){this.renamePage(a,b)}),d);e.addSeparator(d);e.addItem(mxResources.get("duplicate"),null,mxUtils.bind(this,function(){this.duplicatePage(a,
 mxResources.get("copyOf",[a.getName()]))}),d)})};(function(){var a=mxClient.IS_SVG?"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADQAAAA0CAMAAADypuvZAAAAhFBMVEUAAAD///8KCgpNTU24uLgBAQEBAQEMDAxFRUWEhIQBAQEBAQEBAQEAAAAVFRXAwMBYWFgBAQEBAQEAAAAAAAAAAAAAAAAAAAABAQEBAQEAAAAAAAAAAAABAQEBAQEAAAAAAAASEhLAwMC+vr4BAQEBAQEAAAAAAAAAAAABAQEAAAD///+vipwtAAAAKnRSTlMA/Prw9f7A+fHq1uvFOfPv7+TOmkUyCwb3kT9UT+yPLAL49PTbkmloKvYw/P7BAAABe0lEQVRIx52W63LCIBBGwRhUkFxNYtTEa9Xi+79fR9KxrgtY9/xjMmcIH5ddhmmqSylk3nW5FOWlath7dCsNQLY6bOzWwjgQ64CzmhsPYuVR6jY2XuK2djnbwgQptthZKPMGtXh1NkvzluXmZR7geC0w17YziNHIILrrU26FwzkeHVbxl+GXwxnfbmOH1T72NHY6Tiv+3eXd3Ol4rPnOSmv0YWIda03QxyF3NNE+5XxwOE/3aCp7F9CKkiyacevMoixBq9JDdJjpIE2NcQbYnIyDaJAi4+DUsCqGGSRYSmAaccXOMOs0w1KWwuTPrIT7w6dwTcMA7lfJBHDugd2x6T0NgCWYfDkH3GKdpwGwJMuB4wFaOVOP3A63IIdHhookkX6PFAQpctLmko4R6cCSrgbtEjJtCNed8LAQnjDSY0l4ljWhAPT0UmO5/rOoqSulfH5eqL83lJaA1nxg6j7U5vS1r6ESgYbKj7d1C6N7Cf9L9joogHZUKW87+gMYYTZWVGas2QAAAABJRU5ErkJggg==":
-IMAGE_PATH+"/move.png",b=Graph.prototype.foldCells;Graph.prototype.foldCells=function(a,d,e,q,c){d=null!=d?d:!1;null==e&&(e=this.getFoldableCells(this.getSelectionCells(),a));this.stopEditing();this.model.beginUpdate();try{for(var f=e.slice(),g=[],l=0;l<e.length;l++){var p=this.view.getState(e[l]),u=null!=p?p.style:this.getCellStyle(e[l]);"1"==mxUtils.getValue(u,"treeFolding","0")&&(this.traverse(e[l],!0,mxUtils.bind(this,function(a,b){null!=b&&g.push(b);a!=e[l]&&g.push(a);return a==e[l]||!this.model.isCollapsed(a)})),
-this.model.setCollapsed(e[l],a))}for(l=0;l<g.length;l++)this.model.setVisible(g[l],!a);e=f;e=b.apply(this,arguments)}finally{this.model.endUpdate()}return e};var e=EditorUi.prototype.init;EditorUi.prototype.init=function(){e.apply(this,arguments);this.editor.chromeless||this.addTrees()};EditorUi.prototype.addTrees=function(){function b(a){return t.isVertex(a)&&d(a)}function d(a){var b=!1;null!=a&&(a=t.getParent(a),b=k.view.getState(a),k.view.getState(a),b="tree"==(null!=b?b.style:k.getCellStyle(a)).containerType);
-return b}function e(a){var b=!1;null!=a&&(a=t.getParent(a),b=k.view.getState(a),k.view.getState(a),b=null!=(null!=b?b.style:k.getCellStyle(a)).childLayout);return b}function q(a){a=k.view.getState(a);if(null!=a){var b=k.getIncomingEdges(a.cell);if(0<b.length&&(b=k.view.getState(b[0]),null!=b&&(b=b.absolutePoints,null!=b&&0<b.length&&(b=b[b.length-1],null!=b)))){if(b.y==a.y&&Math.abs(b.x-a.getCenterX())<a.width/2)return mxConstants.DIRECTION_SOUTH;if(b.y==a.y+a.height&&Math.abs(b.x-a.getCenterX())<
-a.width/2)return mxConstants.DIRECTION_NORTH;if(b.x>a.getCenterX())return mxConstants.DIRECTION_WEST}}return mxConstants.DIRECTION_EAST}function c(a,b){b=null!=b?b:!0;k.model.beginUpdate();try{var c=k.model.getParent(a),d=k.getIncomingEdges(a),e=k.cloneCells([d[0],a]);k.model.setTerminal(e[0],k.model.getTerminal(d[0],!0),!0);var f=q(a),h=c.geometry;f==mxConstants.DIRECTION_SOUTH||f==mxConstants.DIRECTION_NORTH?e[1].geometry.x+=b?a.geometry.width+10:-e[1].geometry.width-10:e[1].geometry.y+=b?a.geometry.height+
-10:-e[1].geometry.height-10;f==mxConstants.DIRECTION_WEST&&(e[1].geometry.x=a.geometry.x+a.geometry.width-e[1].geometry.width);k.view.currentRoot!=c&&(e[1].geometry.x-=h.x,e[1].geometry.y-=h.y);var g=k.view.getState(a),l=k.view.scale;if(null!=g){var m=mxRectangle.fromRectangle(g);f==mxConstants.DIRECTION_SOUTH||f==mxConstants.DIRECTION_NORTH?m.x+=(b?a.geometry.width+10:-e[1].geometry.width-10)*l:m.y+=(b?a.geometry.height+10:-e[1].geometry.height-10)*l;var p=k.getOutgoingEdges(k.model.getTerminal(d[0],
-!0));if(null!=p){for(var n=f==mxConstants.DIRECTION_SOUTH||f==mxConstants.DIRECTION_NORTH,r=h=d=0;r<p.length;r++){var z=k.model.getTerminal(p[r],!1);if(f==q(z)){var t=k.view.getState(z);z!=a&&null!=t&&(n&&b!=t.getCenterX()<g.getCenterX()||!n&&b!=t.getCenterY()<g.getCenterY())&&mxUtils.intersects(m,t)&&(d=10+Math.max(d,(Math.min(m.x+m.width,t.x+t.width)-Math.max(m.x,t.x))/l),h=10+Math.max(h,(Math.min(m.y+m.height,t.y+t.height)-Math.max(m.y,t.y))/l))}}n?h=0:d=0;for(r=0;r<p.length;r++)if(z=k.model.getTerminal(p[r],
-!1),f==q(z)&&(t=k.view.getState(z),z!=a&&null!=t&&(n&&b!=t.getCenterX()<g.getCenterX()||!n&&b!=t.getCenterY()<g.getCenterY()))){var u=[];k.traverse(t.cell,!0,function(a,b){null!=b&&u.push(b);u.push(a);return!0});k.moveCells(u,(b?1:-1)*d,(b?1:-1)*h)}}}return k.addCells(e,c)}finally{k.model.endUpdate()}}function f(a){k.model.beginUpdate();try{var b=q(a),c=k.getIncomingEdges(a),d=k.cloneCells([c[0],a]);k.model.setTerminal(c[0],d[1],!1);k.model.setTerminal(d[0],d[1],!0);k.model.setTerminal(d[0],a,!1);
-var e=k.model.getParent(a),f=e.geometry,h=[];k.view.currentRoot!=e&&(d[1].geometry.x-=f.x,d[1].geometry.y-=f.y);k.traverse(a,!0,function(a,b){null!=b&&h.push(b);h.push(a);return!0});var g=a.geometry.width+40,l=a.geometry.height+40;b==mxConstants.DIRECTION_SOUTH?g=0:b==mxConstants.DIRECTION_NORTH?(g=0,l=-40):b==mxConstants.DIRECTION_WEST?(g=-40,l=0):b==mxConstants.DIRECTION_EAST&&(l=0);k.moveCells(h,g,l);return k.addCells(d,e)}finally{k.model.endUpdate()}}function h(a){k.model.beginUpdate();try{var b=
-k.model.getParent(a),c=k.getIncomingEdges(a),d=k.cloneCells([c[0],a]);k.model.setTerminal(d[0],a,!0);var c=k.getOutgoingEdges(a),e=b.geometry,f=[];k.view.currentRoot==b&&(e=new mxRectangle);for(var h=0;h<c.length;h++){var g=k.model.getTerminal(c[h],!1);null!=g&&f.push(g)}var l=k.view.getBounds(f),m=q(a),p=k.view.translate,n=k.view.scale;m==mxConstants.DIRECTION_SOUTH?(d[1].geometry.x=null==l?a.geometry.x+(a.geometry.width-d[1].geometry.width)/2:(l.x+l.width)/n-p.x-e.x+10,d[1].geometry.y+=a.geometry.height-
-e.y+40):m==mxConstants.DIRECTION_NORTH?(d[1].geometry.x=null==l?a.geometry.x+(a.geometry.width-d[1].geometry.width)/2:(l.x+l.width)/n-p.x+-e.x+10,d[1].geometry.y-=d[1].geometry.height-e.y+40):(d[1].geometry.x=m==mxConstants.DIRECTION_WEST?d[1].geometry.x-(d[1].geometry.width-e.x+40):d[1].geometry.x+(a.geometry.width-e.x+40),d[1].geometry.y=null==l?a.geometry.y+(a.geometry.height-d[1].geometry.height)/2:(l.y+l.height)/n-p.y+-e.y+10);return k.addCells(d,b)}finally{k.model.endUpdate()}}function m(a,
-b,c){a=k.getOutgoingEdges(a);c=k.view.getState(c);var d=[];if(null!=c&&null!=a){for(var e=0;e<a.length;e++){var f=k.view.getState(k.model.getTerminal(a[e],!1));null!=f&&(!b&&Math.min(f.x+f.width,c.x+c.width)>=Math.max(f.x,c.x)||b&&Math.min(f.y+f.height,c.y+c.height)>=Math.max(f.y,c.y))&&d.push(f)}d.sort(function(a,c){return b?a.x+a.width-c.x-c.width:a.y+a.height-c.y-c.height})}return d}function n(a,b){var c=q(a),d=b==mxConstants.DIRECTION_EAST||b==mxConstants.DIRECTION_WEST;(c==mxConstants.DIRECTION_EAST||
-c==mxConstants.DIRECTION_WEST)==d&&c!=b?r.actions.get("selectParent").funct():c==b?(d=k.getOutgoingEdges(a),null!=d&&0<d.length&&k.setSelectionCell(k.model.getTerminal(d[0],!1))):(c=k.getIncomingEdges(a),null!=c&&0<c.length&&(d=m(k.model.getTerminal(c[0],!0),d,a),c=k.view.getState(a),null!=c&&(c=mxUtils.indexOf(d,c),0<=c&&(c+=b==mxConstants.DIRECTION_NORTH||b==mxConstants.DIRECTION_WEST?-1:1,0<=c&&c<=d.length-1&&k.setSelectionCell(d[c].cell)))))}function u(b){this.images=[];var c=b.view.graph,d=mxUtils.createImage(a);
+IMAGE_PATH+"/move.png",b=Graph.prototype.foldCells;Graph.prototype.foldCells=function(a,d,e,q,c){d=null!=d?d:!1;null==e&&(e=this.getFoldableCells(this.getSelectionCells(),a));this.stopEditing();this.model.beginUpdate();try{for(var f=e.slice(),g=[],h=0;h<e.length;h++){var l=this.view.getState(e[h]),n=null!=l?l.style:this.getCellStyle(e[h]);"1"==mxUtils.getValue(n,"treeFolding","0")&&(this.traverse(e[h],!0,mxUtils.bind(this,function(a,b){null!=b&&g.push(b);a!=e[h]&&g.push(a);return a==e[h]||!this.model.isCollapsed(a)})),
+this.model.setCollapsed(e[h],a))}for(h=0;h<g.length;h++)this.model.setVisible(g[h],!a);e=f;e=b.apply(this,arguments)}finally{this.model.endUpdate()}return e};var e=EditorUi.prototype.init;EditorUi.prototype.init=function(){e.apply(this,arguments);this.editor.chromeless||this.addTrees()};EditorUi.prototype.addTrees=function(){function b(a){return v.isVertex(a)&&d(a)}function d(a){var b=!1;null!=a&&(a=v.getParent(a),b=k.view.getState(a),k.view.getState(a),b="tree"==(null!=b?b.style:k.getCellStyle(a)).containerType);
+return b}function e(a){var b=!1;null!=a&&(a=v.getParent(a),b=k.view.getState(a),k.view.getState(a),b=null!=(null!=b?b.style:k.getCellStyle(a)).childLayout);return b}function q(a){a=k.view.getState(a);if(null!=a){var b=k.getIncomingEdges(a.cell);if(0<b.length&&(b=k.view.getState(b[0]),null!=b&&(b=b.absolutePoints,null!=b&&0<b.length&&(b=b[b.length-1],null!=b)))){if(b.y==a.y&&Math.abs(b.x-a.getCenterX())<a.width/2)return mxConstants.DIRECTION_SOUTH;if(b.y==a.y+a.height&&Math.abs(b.x-a.getCenterX())<
+a.width/2)return mxConstants.DIRECTION_NORTH;if(b.x>a.getCenterX())return mxConstants.DIRECTION_WEST}}return mxConstants.DIRECTION_EAST}function c(a,b){b=null!=b?b:!0;k.model.beginUpdate();try{var c=k.model.getParent(a),d=k.getIncomingEdges(a),e=k.cloneCells([d[0],a]);k.model.setTerminal(e[0],k.model.getTerminal(d[0],!0),!0);var f=q(a),g=c.geometry;f==mxConstants.DIRECTION_SOUTH||f==mxConstants.DIRECTION_NORTH?e[1].geometry.x+=b?a.geometry.width+10:-e[1].geometry.width-10:e[1].geometry.y+=b?a.geometry.height+
+10:-e[1].geometry.height-10;f==mxConstants.DIRECTION_WEST&&(e[1].geometry.x=a.geometry.x+a.geometry.width-e[1].geometry.width);k.view.currentRoot!=c&&(e[1].geometry.x-=g.x,e[1].geometry.y-=g.y);var h=k.view.getState(a),l=k.view.scale;if(null!=h){var n=mxRectangle.fromRectangle(h);f==mxConstants.DIRECTION_SOUTH||f==mxConstants.DIRECTION_NORTH?n.x+=(b?a.geometry.width+10:-e[1].geometry.width-10)*l:n.y+=(b?a.geometry.height+10:-e[1].geometry.height-10)*l;var p=k.getOutgoingEdges(k.model.getTerminal(d[0],
+!0));if(null!=p){for(var m=f==mxConstants.DIRECTION_SOUTH||f==mxConstants.DIRECTION_NORTH,r=g=d=0;r<p.length;r++){var t=k.model.getTerminal(p[r],!1);if(f==q(t)){var y=k.view.getState(t);t!=a&&null!=y&&(m&&b!=y.getCenterX()<h.getCenterX()||!m&&b!=y.getCenterY()<h.getCenterY())&&mxUtils.intersects(n,y)&&(d=10+Math.max(d,(Math.min(n.x+n.width,y.x+y.width)-Math.max(n.x,y.x))/l),g=10+Math.max(g,(Math.min(n.y+n.height,y.y+y.height)-Math.max(n.y,y.y))/l))}}m?g=0:d=0;for(r=0;r<p.length;r++)if(t=k.model.getTerminal(p[r],
+!1),f==q(t)&&(y=k.view.getState(t),t!=a&&null!=y&&(m&&b!=y.getCenterX()<h.getCenterX()||!m&&b!=y.getCenterY()<h.getCenterY()))){var u=[];k.traverse(y.cell,!0,function(a,b){null!=b&&u.push(b);u.push(a);return!0});k.moveCells(u,(b?1:-1)*d,(b?1:-1)*g)}}}return k.addCells(e,c)}finally{k.model.endUpdate()}}function f(a){k.model.beginUpdate();try{var b=q(a),c=k.getIncomingEdges(a),d=k.cloneCells([c[0],a]);k.model.setTerminal(c[0],d[1],!1);k.model.setTerminal(d[0],d[1],!0);k.model.setTerminal(d[0],a,!1);
+var e=k.model.getParent(a),f=e.geometry,g=[];k.view.currentRoot!=e&&(d[1].geometry.x-=f.x,d[1].geometry.y-=f.y);k.traverse(a,!0,function(a,b){null!=b&&g.push(b);g.push(a);return!0});var h=a.geometry.width+40,l=a.geometry.height+40;b==mxConstants.DIRECTION_SOUTH?h=0:b==mxConstants.DIRECTION_NORTH?(h=0,l=-40):b==mxConstants.DIRECTION_WEST?(h=-40,l=0):b==mxConstants.DIRECTION_EAST&&(l=0);k.moveCells(g,h,l);return k.addCells(d,e)}finally{k.model.endUpdate()}}function g(a){k.model.beginUpdate();try{var b=
+k.model.getParent(a),c=k.getIncomingEdges(a),d=k.cloneCells([c[0],a]);k.model.setTerminal(d[0],a,!0);var c=k.getOutgoingEdges(a),e=b.geometry,f=[];k.view.currentRoot==b&&(e=new mxRectangle);for(var g=0;g<c.length;g++){var h=k.model.getTerminal(c[g],!1);null!=h&&f.push(h)}var l=k.view.getBounds(f),n=q(a),p=k.view.translate,m=k.view.scale;n==mxConstants.DIRECTION_SOUTH?(d[1].geometry.x=null==l?a.geometry.x+(a.geometry.width-d[1].geometry.width)/2:(l.x+l.width)/m-p.x-e.x+10,d[1].geometry.y+=a.geometry.height-
+e.y+40):n==mxConstants.DIRECTION_NORTH?(d[1].geometry.x=null==l?a.geometry.x+(a.geometry.width-d[1].geometry.width)/2:(l.x+l.width)/m-p.x+-e.x+10,d[1].geometry.y-=d[1].geometry.height-e.y+40):(d[1].geometry.x=n==mxConstants.DIRECTION_WEST?d[1].geometry.x-(d[1].geometry.width-e.x+40):d[1].geometry.x+(a.geometry.width-e.x+40),d[1].geometry.y=null==l?a.geometry.y+(a.geometry.height-d[1].geometry.height)/2:(l.y+l.height)/m-p.y+-e.y+10);return k.addCells(d,b)}finally{k.model.endUpdate()}}function p(a,
+b,c){a=k.getOutgoingEdges(a);c=k.view.getState(c);var d=[];if(null!=c&&null!=a){for(var e=0;e<a.length;e++){var f=k.view.getState(k.model.getTerminal(a[e],!1));null!=f&&(!b&&Math.min(f.x+f.width,c.x+c.width)>=Math.max(f.x,c.x)||b&&Math.min(f.y+f.height,c.y+c.height)>=Math.max(f.y,c.y))&&d.push(f)}d.sort(function(a,c){return b?a.x+a.width-c.x-c.width:a.y+a.height-c.y-c.height})}return d}function m(a,b){var c=q(a),d=b==mxConstants.DIRECTION_EAST||b==mxConstants.DIRECTION_WEST;(c==mxConstants.DIRECTION_EAST||
+c==mxConstants.DIRECTION_WEST)==d&&c!=b?r.actions.get("selectParent").funct():c==b?(d=k.getOutgoingEdges(a),null!=d&&0<d.length&&k.setSelectionCell(k.model.getTerminal(d[0],!1))):(c=k.getIncomingEdges(a),null!=c&&0<c.length&&(d=p(k.model.getTerminal(c[0],!0),d,a),c=k.view.getState(a),null!=c&&(c=mxUtils.indexOf(d,c),0<=c&&(c+=b==mxConstants.DIRECTION_NORTH||b==mxConstants.DIRECTION_WEST?-1:1,0<=c&&c<=d.length-1&&k.setSelectionCell(d[c].cell)))))}function u(b){this.images=[];var c=b.view.graph,d=mxUtils.createImage(a);
 d.setAttribute("title","Move Cell without Subtree");d.style.position="absolute";d.style.cursor="pointer";d.style.width="26px";d.style.height="26px";d.style.left=b.getCenterX()-13+"px";d.style.top=b.getCenterY()-13+"px";mxEvent.addGestureListeners(d,mxUtils.bind(this,function(a){c.stopEditing(!1);r.hoverIcons.reset();c.isCellSelected(b.cell)||c.setSelectionCell(b.cell);c.graphHandler.start(b.cell,mxEvent.getClientX(a),mxEvent.getClientY(a));c.graphHandler.cells=[b.cell];c.graphHandler.bounds=c.graphHandler.graph.getView().getBounds(c.graphHandler.cells);
-c.graphHandler.pBounds=c.graphHandler.getPreviewBounds(c.graphHandler.cells);c.graphHandler.cellWasClicked=!0;c.isMouseDown=!0;c.isMouseTrigger=mxEvent.isMouseEvent(a);mxEvent.consume(a);mxEvent.consume(a);this.destroy()}));b.view.graph.container.appendChild(d);this.images.push(d)}var r=this,k=r.editor.graph,t=k.getModel();mxResources.parse("selectChildren=Select Children");mxResources.parse("selectSiblings=Select Siblings");mxResources.parse("selectSubtree=Select Subtree");mxResources.parse("selectParent=Select Parent");
-var v=r.menus.createPopupMenu;r.menus.createPopupMenu=function(a,c,d){v.apply(this,arguments);if(b(k.getSelectionCell())&&1==k.getSelectionCount()){c=k.getSelectionCell();var e=k.getOutgoingEdges(c);a.addSeparator();null!=e&&0<e.length&&this.addMenuItems(a,["selectChildren","selectSubtree"],null,d);a.addSeparator();0<k.getIncomingEdges(c).length&&this.addMenuItems(a,["selectSiblings","selectParent"],null,d)}};r.actions.addAction("selectChildren",function(){if(k.isEnabled()&&1==k.getSelectionCount()){var a=
+c.graphHandler.pBounds=c.graphHandler.getPreviewBounds(c.graphHandler.cells);c.graphHandler.cellWasClicked=!0;c.isMouseDown=!0;c.isMouseTrigger=mxEvent.isMouseEvent(a);mxEvent.consume(a);mxEvent.consume(a);this.destroy()}));b.view.graph.container.appendChild(d);this.images.push(d)}var r=this,k=r.editor.graph,v=k.getModel();mxResources.parse("selectChildren=Select Children");mxResources.parse("selectSiblings=Select Siblings");mxResources.parse("selectSubtree=Select Subtree");mxResources.parse("selectParent=Select Parent");
+var t=r.menus.createPopupMenu;r.menus.createPopupMenu=function(a,c,d){t.apply(this,arguments);if(b(k.getSelectionCell())&&1==k.getSelectionCount()){c=k.getSelectionCell();var e=k.getOutgoingEdges(c);a.addSeparator();null!=e&&0<e.length&&this.addMenuItems(a,["selectChildren","selectSubtree"],null,d);a.addSeparator();0<k.getIncomingEdges(c).length&&this.addMenuItems(a,["selectSiblings","selectParent"],null,d)}};r.actions.addAction("selectChildren",function(){if(k.isEnabled()&&1==k.getSelectionCount()){var a=
 k.getSelectionCell(),a=k.getOutgoingEdges(a);if(null!=a){for(var b=[],c=0;c<a.length;c++)b.push(k.model.getTerminal(a[c],!1));k.setSelectionCells(b)}}},null,null,"Alt+Shift+X");r.actions.addAction("selectSiblings",function(){if(k.isEnabled()&&1==k.getSelectionCount()){var a=k.getSelectionCell(),a=k.getIncomingEdges(a);if(null!=a&&0<a.length&&(a=k.getOutgoingEdges(k.model.getTerminal(a[0],!0)),null!=a)){for(var b=[],c=0;c<a.length;c++)b.push(k.model.getTerminal(a[c],!1));k.setSelectionCells(b)}}},
 null,null,"Alt+Shift+S");r.actions.addAction("selectParent",function(){if(k.isEnabled()&&1==k.getSelectionCount()){var a=k.getSelectionCell(),a=k.getIncomingEdges(a);null!=a&&0<a.length&&k.setSelectionCell(k.model.getTerminal(a[0],!0))}},null,null,"Alt+Shift+P");r.actions.addAction("selectSubtree",function(){if(k.isEnabled()&&1==k.getSelectionCount()){var a=k.getSelectionCell(),b=[];k.traverse(a,!0,function(a,c){null!=c&&b.push(c);b.push(a);return!0});k.setSelectionCells(b)}},null,null,"Alt+Shift+T");
-var x=k.removeCells;k.removeCells=function(a,c){c=null!=c?c:!0;null==a&&(a=this.getDeletableCells(this.getSelectionCells()));c&&(a=this.getDeletableCells(this.addAllEdges(a)));for(var e=[],f=0;f<a.length;f++){var h=a[f];t.isEdge(h)&&d(h)&&(e.push(h),h=t.getTerminal(h,!1));b(h)?(k.traverse(h,!0,function(a,b){null!=b&&e.push(b);e.push(a);return!0}),h=k.getIncomingEdges(a[f]),a=a.concat(h)):e.push(a[f])}a=e;return x.apply(this,arguments)};r.hoverIcons.getStateAt=function(a,c,d){return b(a.cell)?null:
-this.graph.view.getState(this.graph.getCellAt(c,d))};var w=k.duplicateCells;k.duplicateCells=function(a,c){a=null!=a?a:this.getSelectionCells();for(var d=a.slice(0),e=0;e<d.length;e++){var f=k.view.getState(d[e]);if(null!=f&&b(f.cell))for(var h=k.getIncomingEdges(f.cell),f=0;f<h.length;f++)mxUtils.remove(h[f],a)}this.model.beginUpdate();try{var g=w.call(this,a,c);if(g.length==a.length)for(e=0;e<a.length;e++)if(b(a[e])){var l=k.getIncomingEdges(g[e]),h=k.getIncomingEdges(a[e]);if(0==l.length&&0<h.length){var m=
-this.cloneCells([h[0]])[0];this.addEdge(m,k.getDefaultParent(),this.model.getTerminal(h[0],!0),g[e])}}}finally{this.model.endUpdate()}return g};var D=k.moveCells;k.moveCells=function(a,c,d,e,f,h,g){var l=null;this.model.beginUpdate();try{var m=f,p=this.view.getState(f),n=null!=p?p.style:this.getCellStyle(f);if(null!=a&&b(f)&&"1"==mxUtils.getValue(n,"treeFolding","0")){for(var q=0;q<a.length;q++)if(b(a[q])||k.model.isEdge(a[q])&&null==k.model.getTerminal(a[q],!0)){f=k.model.getParent(a[q]);break}if(null!=
-m&&f!=m&&null!=this.view.getState(a[0])){var r=k.getIncomingEdges(a[0]);if(0<r.length){var t=k.view.getState(k.model.getTerminal(r[0],!0));if(null!=t){var u=k.view.getState(m);null!=u&&(c=(u.getCenterX()-t.getCenterX())/k.view.scale,d=(u.getCenterY()-t.getCenterY())/k.view.scale)}}}}l=D.apply(this,arguments);if(null!=l&&null!=a&&l.length==a.length)for(q=0;q<l.length;q++)if(this.model.isEdge(l[q]))b(m)&&0>mxUtils.indexOf(l,this.model.getTerminal(l[q],!0))&&this.model.setTerminal(l[q],m,!0);else if(b(a[q])&&
-(r=k.getIncomingEdges(a[q]),0<r.length))if(!e)b(m)&&0>mxUtils.indexOf(a,this.model.getTerminal(r[0],!0))&&this.model.setTerminal(r[0],m,!0);else if(0==k.getIncomingEdges(l[q]).length){p=m;if(null==p||p==k.model.getParent(a[q]))p=k.model.getTerminal(r[0],!0);e=this.cloneCells([r[0]])[0];this.addEdge(e,k.getDefaultParent(),p,l[q])}}finally{this.model.endUpdate()}return l};var B=r.sidebar.dropAndConnect;r.sidebar.dropAndConnect=function(a,c,d,e){var f=k.model,h=null;f.beginUpdate();try{if(h=B.apply(this,
-arguments),b(a))for(var g=0;g<h.length;g++)if(f.isEdge(h[g])&&null==f.getTerminal(h[g],!0)){f.setTerminal(h[g],a,!0);var l=k.getCellGeometry(h[g]);l.points=null;null!=l.getTerminalPoint(!0)&&l.setTerminalPoint(null,!0)}}finally{f.endUpdate()}return h};var y={88:r.actions.get("selectChildren"),84:r.actions.get("selectSubtree"),80:r.actions.get("selectParent"),83:r.actions.get("selectSiblings")},C=r.onKeyDown;r.onKeyDown=function(a){try{if(k.isEnabled()&&!k.isEditing()&&b(k.getSelectionCell())&&1==
-k.getSelectionCount()){var d=null;0<k.getIncomingEdges(k.getSelectionCell()).length&&(9==a.which?d=mxEvent.isShiftDown(a)?f(k.getSelectionCell()):h(k.getSelectionCell()):13==a.which&&(d=c(k.getSelectionCell(),!mxEvent.isShiftDown(a))));if(null!=d&&0<d.length)1==d.length&&k.model.isEdge(d[0])?k.setSelectionCell(k.model.getTerminal(d[0],!1)):k.setSelectionCell(d[d.length-1]),null!=r.hoverIcons&&r.hoverIcons.update(k.view.getState(k.getSelectionCell())),k.startEditingAtCell(k.getSelectionCell()),mxEvent.consume(a);
-else if(mxEvent.isAltDown(a)&&mxEvent.isShiftDown(a)){var e=y[a.keyCode];null!=e&&(e.funct(a),mxEvent.consume(a))}else 37==a.keyCode?(n(k.getSelectionCell(),mxConstants.DIRECTION_WEST),mxEvent.consume(a)):38==a.keyCode?(n(k.getSelectionCell(),mxConstants.DIRECTION_NORTH),mxEvent.consume(a)):39==a.keyCode?(n(k.getSelectionCell(),mxConstants.DIRECTION_EAST),mxEvent.consume(a)):40==a.keyCode&&(n(k.getSelectionCell(),mxConstants.DIRECTION_SOUTH),mxEvent.consume(a))}}catch(H){console.log("error",H)}mxEvent.isConsumed(a)||
-C.apply(this,arguments)};var A=k.connectVertex;k.connectVertex=function(a,d,e,g,l,m){var p=k.getIncomingEdges(a);if(b(a)&&0<p.length)return e=q(a),g=e==mxConstants.DIRECTION_EAST||e==mxConstants.DIRECTION_WEST,l=d==mxConstants.DIRECTION_EAST||d==mxConstants.DIRECTION_WEST,e==d?h(a):g==l?f(a):c(a,d!=mxConstants.DIRECTION_NORTH&&d!=mxConstants.DIRECTION_WEST);this.model.beginUpdate();try{var n=A.call(this,a,d,e,g,l,m||0==p.length)}finally{this.model.endUpdate()}return n};var F=k.graphHandler.getCells;
-k.graphHandler.getCells=function(a){for(var c=F.apply(this,arguments),d=c.slice(0),f=0;f<d.length;f++)if(b(d[f]))for(var h=k.getIncomingEdges(d[f]),g=0;g<h.length;g++)mxUtils.remove(h[g],c);for(f=0;f<d.length;f++)h=c[f],b(h)&&!e(h)&&k.traverse(h,!0,function(a,b){null!=b&&0>mxUtils.indexOf(c,b)&&c.push(b);0>mxUtils.indexOf(c,a)&&c.push(a);return!0});return c};u.prototype.destroy=function(){if(null!=this.images)for(var a=0;a<this.images.length;a++){var b=this.images[a];b.parentNode.removeChild(b)}this.images=
+var x=k.removeCells;k.removeCells=function(a,c){c=null!=c?c:!0;null==a&&(a=this.getDeletableCells(this.getSelectionCells()));c&&(a=this.getDeletableCells(this.addAllEdges(a)));for(var e=[],f=0;f<a.length;f++){var g=a[f];v.isEdge(g)&&d(g)&&(e.push(g),g=v.getTerminal(g,!1));b(g)?(k.traverse(g,!0,function(a,b){null!=b&&e.push(b);e.push(a);return!0}),g=k.getIncomingEdges(a[f]),a=a.concat(g)):e.push(a[f])}a=e;return x.apply(this,arguments)};r.hoverIcons.getStateAt=function(a,c,d){return b(a.cell)?null:
+this.graph.view.getState(this.graph.getCellAt(c,d))};var w=k.duplicateCells;k.duplicateCells=function(a,c){a=null!=a?a:this.getSelectionCells();for(var d=a.slice(0),e=0;e<d.length;e++){var f=k.view.getState(d[e]);if(null!=f&&b(f.cell))for(var g=k.getIncomingEdges(f.cell),f=0;f<g.length;f++)mxUtils.remove(g[f],a)}this.model.beginUpdate();try{var h=w.call(this,a,c);if(h.length==a.length)for(e=0;e<a.length;e++)if(b(a[e])){var l=k.getIncomingEdges(h[e]),g=k.getIncomingEdges(a[e]);if(0==l.length&&0<g.length){var n=
+this.cloneCells([g[0]])[0];this.addEdge(n,k.getDefaultParent(),this.model.getTerminal(g[0],!0),h[e])}}}finally{this.model.endUpdate()}return h};var D=k.moveCells;k.moveCells=function(a,c,d,e,f,g,h){var l=null;this.model.beginUpdate();try{var n=f,p=this.view.getState(f),m=null!=p?p.style:this.getCellStyle(f);if(null!=a&&b(f)&&"1"==mxUtils.getValue(m,"treeFolding","0")){for(var q=0;q<a.length;q++)if(b(a[q])||k.model.isEdge(a[q])&&null==k.model.getTerminal(a[q],!0)){f=k.model.getParent(a[q]);break}if(null!=
+n&&f!=n&&null!=this.view.getState(a[0])){var r=k.getIncomingEdges(a[0]);if(0<r.length){var t=k.view.getState(k.model.getTerminal(r[0],!0));if(null!=t){var u=k.view.getState(n);null!=u&&(c=(u.getCenterX()-t.getCenterX())/k.view.scale,d=(u.getCenterY()-t.getCenterY())/k.view.scale)}}}}l=D.apply(this,arguments);if(null!=l&&null!=a&&l.length==a.length)for(q=0;q<l.length;q++)if(this.model.isEdge(l[q]))b(n)&&0>mxUtils.indexOf(l,this.model.getTerminal(l[q],!0))&&this.model.setTerminal(l[q],n,!0);else if(b(a[q])&&
+(r=k.getIncomingEdges(a[q]),0<r.length))if(!e)b(n)&&0>mxUtils.indexOf(a,this.model.getTerminal(r[0],!0))&&this.model.setTerminal(r[0],n,!0);else if(0==k.getIncomingEdges(l[q]).length){p=n;if(null==p||p==k.model.getParent(a[q]))p=k.model.getTerminal(r[0],!0);e=this.cloneCells([r[0]])[0];this.addEdge(e,k.getDefaultParent(),p,l[q])}}finally{this.model.endUpdate()}return l};var A=r.sidebar.dropAndConnect;r.sidebar.dropAndConnect=function(a,c,d,e){var f=k.model,g=null;f.beginUpdate();try{if(g=A.apply(this,
+arguments),b(a))for(var h=0;h<g.length;h++)if(f.isEdge(g[h])&&null==f.getTerminal(g[h],!0)){f.setTerminal(g[h],a,!0);var l=k.getCellGeometry(g[h]);l.points=null;null!=l.getTerminalPoint(!0)&&l.setTerminalPoint(null,!0)}}finally{f.endUpdate()}return g};var z={88:r.actions.get("selectChildren"),84:r.actions.get("selectSubtree"),80:r.actions.get("selectParent"),83:r.actions.get("selectSiblings")},C=r.onKeyDown;r.onKeyDown=function(a){try{if(k.isEnabled()&&!k.isEditing()&&b(k.getSelectionCell())&&1==
+k.getSelectionCount()){var d=null;0<k.getIncomingEdges(k.getSelectionCell()).length&&(9==a.which?d=mxEvent.isShiftDown(a)?f(k.getSelectionCell()):g(k.getSelectionCell()):13==a.which&&(d=c(k.getSelectionCell(),!mxEvent.isShiftDown(a))));if(null!=d&&0<d.length)1==d.length&&k.model.isEdge(d[0])?k.setSelectionCell(k.model.getTerminal(d[0],!1)):k.setSelectionCell(d[d.length-1]),null!=r.hoverIcons&&r.hoverIcons.update(k.view.getState(k.getSelectionCell())),k.startEditingAtCell(k.getSelectionCell()),mxEvent.consume(a);
+else if(mxEvent.isAltDown(a)&&mxEvent.isShiftDown(a)){var e=z[a.keyCode];null!=e&&(e.funct(a),mxEvent.consume(a))}else 37==a.keyCode?(m(k.getSelectionCell(),mxConstants.DIRECTION_WEST),mxEvent.consume(a)):38==a.keyCode?(m(k.getSelectionCell(),mxConstants.DIRECTION_NORTH),mxEvent.consume(a)):39==a.keyCode?(m(k.getSelectionCell(),mxConstants.DIRECTION_EAST),mxEvent.consume(a)):40==a.keyCode&&(m(k.getSelectionCell(),mxConstants.DIRECTION_SOUTH),mxEvent.consume(a))}}catch(F){console.log("error",F)}mxEvent.isConsumed(a)||
+C.apply(this,arguments)};var B=k.connectVertex;k.connectVertex=function(a,d,e,h,l,n){var p=k.getIncomingEdges(a);if(b(a)&&0<p.length)return e=q(a),h=e==mxConstants.DIRECTION_EAST||e==mxConstants.DIRECTION_WEST,l=d==mxConstants.DIRECTION_EAST||d==mxConstants.DIRECTION_WEST,e==d?g(a):h==l?f(a):c(a,d!=mxConstants.DIRECTION_NORTH&&d!=mxConstants.DIRECTION_WEST);this.model.beginUpdate();try{var m=B.call(this,a,d,e,h,l,n||0==p.length)}finally{this.model.endUpdate()}return m};var E=k.graphHandler.getCells;
+k.graphHandler.getCells=function(a){for(var c=E.apply(this,arguments),d=c.slice(0),f=0;f<d.length;f++)if(b(d[f]))for(var g=k.getIncomingEdges(d[f]),h=0;h<g.length;h++)mxUtils.remove(g[h],c);for(f=0;f<d.length;f++)g=c[f],b(g)&&!e(g)&&k.traverse(g,!0,function(a,b){null!=b&&0>mxUtils.indexOf(c,b)&&c.push(b);0>mxUtils.indexOf(c,a)&&c.push(a);return!0});return c};u.prototype.destroy=function(){if(null!=this.images)for(var a=0;a<this.images.length;a++){var b=this.images[a];b.parentNode.removeChild(b)}this.images=
 null};k.addMouseListener({currentState:null,currentIconSet:null,mouseDown:function(a,b){null!=this.currentState&&(this.dragLeave(b.getEvent(),this.currentState),this.currentState=null)},mouseMove:function(a,c){if(null!=this.currentState&&(c.getState()==this.currentState||null==c.getState())){var d=new mxRectangle(c.getGraphX()-20,c.getGraphY()-20,40,40);if(mxUtils.intersects(d,this.currentState))return}d=c.getState();if(k.isMouseDown&&!mxEvent.isTouchEvent(c.getEvent())||k.isEditing()||null!=d&&(!k.getModel().isVertex(d.cell)||
 !b(c.getCell())||e(d.cell)))d=null;d!=this.currentState&&(null!=this.currentState&&this.dragLeave(c.getEvent(),this.currentState),this.currentState=d,null!=this.currentState&&this.dragEnter(c.getEvent(),this.currentState))},mouseUp:function(a,b){},dragEnter:function(a,b){null==this.currentIconSet&&(this.currentIconSet=new u(b))},dragLeave:function(a,b){null!=this.currentIconSet&&(this.currentIconSet.destroy(),this.currentIconSet=null)}})};if("undefined"!==typeof Sidebar){var d=Sidebar.prototype.createAdvancedShapes;
 Sidebar.prototype.createAdvancedShapes=function(){var a=d.apply(this,arguments),b=this.editorUi.editor.graph;return a.concat([this.addEntry("tree mindmap central idea branch topic",function(){var a=new mxCell("Mindmap",new mxGeometry(0,0,420,126),"swimlane;html=1;startSize=20;horizontal=1;containerType=tree;");a.vertex=!0;var b=new mxCell("Central Idea",new mxGeometry(160,60,100,40),"ellipse;whiteSpace=wrap;html=1;align=center;container=1;recursiveResize=0;treeFolding=1;");b.vertex=!0;var c=new mxCell("Topic",
 new mxGeometry(320,40,80,20),"whiteSpace=wrap;html=1;rounded=1;arcSize=50;align=center;verticalAlign=middle;container=1;recursiveResize=0;strokeWidth=1;autosize=1;spacing=4;treeFolding=1;");c.vertex=!0;var d=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=entityRelationEdgeStyle;startArrow=none;endArrow=none;segment=10;curved=1;");d.geometry.relative=!0;d.edge=!0;b.insertEdge(d,!0);c.insertEdge(d,!1);var e=new mxCell("Branch",new mxGeometry(320,80,72,26),"whiteSpace=wrap;html=1;shape=partialRectangle;top=0;left=0;bottom=1;right=0;points=[[0,1],[1,1]];strokeColor=#000000;fillColor=none;align=center;verticalAlign=bottom;routingCenterY=0.5;snapToPoint=1;container=1;recursiveResize=0;autosize=1;treeFolding=1;");
-e.vertex=!0;var g=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=entityRelationEdgeStyle;startArrow=none;endArrow=none;segment=10;curved=1;");g.geometry.relative=!0;g.edge=!0;b.insertEdge(g,!0);e.insertEdge(g,!1);var l=new mxCell("Topic",new mxGeometry(20,40,80,20),"whiteSpace=wrap;html=1;rounded=1;arcSize=50;align=center;verticalAlign=middle;container=1;recursiveResize=0;strokeWidth=1;autosize=1;spacing=4;treeFolding=1;");l.vertex=!0;var u=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=entityRelationEdgeStyle;startArrow=none;endArrow=none;segment=10;curved=1;");
+e.vertex=!0;var h=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=entityRelationEdgeStyle;startArrow=none;endArrow=none;segment=10;curved=1;");h.geometry.relative=!0;h.edge=!0;b.insertEdge(h,!0);e.insertEdge(h,!1);var l=new mxCell("Topic",new mxGeometry(20,40,80,20),"whiteSpace=wrap;html=1;rounded=1;arcSize=50;align=center;verticalAlign=middle;container=1;recursiveResize=0;strokeWidth=1;autosize=1;spacing=4;treeFolding=1;");l.vertex=!0;var u=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=entityRelationEdgeStyle;startArrow=none;endArrow=none;segment=10;curved=1;");
 u.geometry.relative=!0;u.edge=!0;b.insertEdge(u,!0);l.insertEdge(u,!1);var r=new mxCell("Branch",new mxGeometry(20,80,72,26),"whiteSpace=wrap;html=1;shape=partialRectangle;top=0;left=0;bottom=1;right=0;points=[[0,1],[1,1]];strokeColor=#000000;fillColor=none;align=center;verticalAlign=bottom;routingCenterY=0.5;snapToPoint=1;container=1;recursiveResize=0;autosize=1;treeFolding=1;");r.vertex=!0;var k=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=entityRelationEdgeStyle;startArrow=none;endArrow=none;segment=10;curved=1;");
-k.geometry.relative=!0;k.edge=!0;b.insertEdge(k,!0);r.insertEdge(k,!1);a.insert(d);a.insert(g);a.insert(u);a.insert(k);a.insert(b);a.insert(c);a.insert(e);a.insert(l);a.insert(r);return sb.createVertexTemplateFromCells([a],a.geometry.width,a.geometry.height,a.value)}),this.addEntry("tree mindmap central idea",function(){var a=new mxCell("Central Idea",new mxGeometry(0,0,100,40),"ellipse;whiteSpace=wrap;html=1;align=center;container=1;recursiveResize=0;treeFolding=1;");a.vertex=!0;return sb.createVertexTemplateFromCells([a],
+k.geometry.relative=!0;k.edge=!0;b.insertEdge(k,!0);r.insertEdge(k,!1);a.insert(d);a.insert(h);a.insert(u);a.insert(k);a.insert(b);a.insert(c);a.insert(e);a.insert(l);a.insert(r);return sb.createVertexTemplateFromCells([a],a.geometry.width,a.geometry.height,a.value)}),this.addEntry("tree mindmap central idea",function(){var a=new mxCell("Central Idea",new mxGeometry(0,0,100,40),"ellipse;whiteSpace=wrap;html=1;align=center;container=1;recursiveResize=0;treeFolding=1;");a.vertex=!0;return sb.createVertexTemplateFromCells([a],
 a.geometry.width,a.geometry.height,a.value)}),this.addEntry("tree mindmap branch",function(){var a=new mxCell("Branch",new mxGeometry(0,0,80,20),"whiteSpace=wrap;html=1;shape=partialRectangle;top=0;left=0;bottom=1;right=0;points=[[0,1],[1,1]];strokeColor=#000000;fillColor=none;align=center;verticalAlign=bottom;routingCenterY=0.5;snapToPoint=1;container=1;recursiveResize=0;autosize=1;treeFolding=1;");a.vertex=!0;var b=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=entityRelationEdgeStyle;startArrow=none;endArrow=none;segment=10;curved=1;");
 b.geometry.setTerminalPoint(new mxPoint(-40,40),!0);b.geometry.relative=!0;b.edge=!0;a.insertEdge(b,!1);return sb.createVertexTemplateFromCells([a,b],a.geometry.width,a.geometry.height,a.value)}),this.addEntry("tree mindmap sub topic",function(){var a=new mxCell("Sub Topic",new mxGeometry(0,0,72,26),"whiteSpace=wrap;html=1;rounded=1;arcSize=50;align=center;verticalAlign=middle;container=1;recursiveResize=0;strokeWidth=1;autosize=1;spacing=4;treeFolding=1;");a.vertex=!0;var b=new mxCell("",new mxGeometry(0,
 0,0,0),"edgeStyle=entityRelationEdgeStyle;startArrow=none;endArrow=none;segment=10;curved=1;");b.geometry.setTerminalPoint(new mxPoint(-40,40),!0);b.geometry.relative=!0;b.edge=!0;a.insertEdge(b,!1);return sb.createVertexTemplateFromCells([a,b],a.geometry.width,a.geometry.height,a.value)}),this.addEntry("tree orgchart organization division",function(){var a=new mxCell("Orgchart",new mxGeometry(0,0,280,220),"swimlane;html=1;startSize=20;horizontal=1;containerType=tree;");a.vertex=!0;var d=new mxCell("Organization",
 new mxGeometry(80,40,120,60),"whiteSpace=wrap;html=1;align=center;treeFolding=1;container=1;recursiveResize=0;");b.setAttributeForCell(d,"treeRoot","1");d.vertex=!0;var c=new mxCell("Division",new mxGeometry(20,140,100,60),"whiteSpace=wrap;html=1;align=center;verticalAlign=middle;container=1;recursiveResize=0;treeFolding=1;");c.vertex=!0;var e=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=elbowEdgeStyle;elbow=vertical;startArrow=none;endArrow=none;rounded=0;");e.geometry.relative=!0;e.edge=!0;
-d.insertEdge(e,!0);c.insertEdge(e,!1);var h=new mxCell("Division",new mxGeometry(160,140,100,60),"whiteSpace=wrap;html=1;align=center;verticalAlign=middle;container=1;recursiveResize=0;treeFolding=1;");h.vertex=!0;var g=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=elbowEdgeStyle;elbow=vertical;startArrow=none;endArrow=none;rounded=0;");g.geometry.relative=!0;g.edge=!0;d.insertEdge(g,!0);h.insertEdge(g,!1);a.insert(e);a.insert(g);a.insert(d);a.insert(c);a.insert(h);return sb.createVertexTemplateFromCells([a],
+d.insertEdge(e,!0);c.insertEdge(e,!1);var g=new mxCell("Division",new mxGeometry(160,140,100,60),"whiteSpace=wrap;html=1;align=center;verticalAlign=middle;container=1;recursiveResize=0;treeFolding=1;");g.vertex=!0;var h=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=elbowEdgeStyle;elbow=vertical;startArrow=none;endArrow=none;rounded=0;");h.geometry.relative=!0;h.edge=!0;d.insertEdge(h,!0);g.insertEdge(h,!1);a.insert(e);a.insert(h);a.insert(d);a.insert(c);a.insert(g);return sb.createVertexTemplateFromCells([a],
 a.geometry.width,a.geometry.height,a.value)}),this.addEntry("tree container",function(){var a=new mxCell("Tree Container",new mxGeometry(0,0,220,160),"swimlane;html=1;startSize=20;horizontal=1;containerType=tree;");a.vertex=!0;return sb.createVertexTemplateFromCells([a],a.geometry.width,a.geometry.height,a.value)}),this.addEntry("tree root",function(){var a=new mxCell("Organization",new mxGeometry(0,0,120,60),"whiteSpace=wrap;html=1;align=center;treeFolding=1;container=1;recursiveResize=0;");b.setAttributeForCell(a,
 "treeRoot","1");a.vertex=!0;return sb.createVertexTemplateFromCells([a],a.geometry.width,a.geometry.height,a.value)}),this.addEntry("tree sub sections",function(){var a=new mxCell("Sub Section",new mxGeometry(0,0,100,60),"whiteSpace=wrap;html=1;align=center;verticalAlign=middle;container=1;recursiveResize=0;treeFolding=1;");a.vertex=!0;var b=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=orthogonalEdgeStyle;startArrow=none;endArrow=none;rounded=0;targetPortConstraint=eastwest;sourcePortConstraint=northsouth;");
 b.geometry.setTerminalPoint(new mxPoint(110,-40),!0);b.geometry.relative=!0;b.edge=!0;a.insertEdge(b,!1);var c=new mxCell("Sub Section",new mxGeometry(120,0,100,60),"whiteSpace=wrap;html=1;align=center;verticalAlign=middle;container=1;recursiveResize=0;treeFolding=1;");c.vertex=!0;var d=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=orthogonalEdgeStyle;startArrow=none;endArrow=none;rounded=0;targetPortConstraint=eastwest;sourcePortConstraint=northsouth;");d.geometry.setTerminalPoint(new mxPoint(110,
--40),!0);d.geometry.relative=!0;d.edge=!0;c.insertEdge(d,!1);return sb.createVertexTemplateFromCells([b,d,a,c],220,60,"Sub Sections")})])}}})();mxResources.parse("# *DO NOT DIRECTLY EDIT THIS FILE, IT IS AUTOMATICALLY GENERATED AND IT IS BASED ON:*\n# https://docs.google.com/spreadsheet/ccc?key=0AmQEO36liL4FdDJLWVNMaVV2UmRKSnpXU09MYkdGbEE\naboutDrawio=About draw.io\naccessDenied=Access Denied\nactualSize=Actual Size\nadd=Add\naddedFile=Added {1}\naddImages=Add Images\naddImageUrl=Add Image URL\naddLayer=Add Layer\naddProperty=Add Property\naddress=Address\naddToExistingDrawing=Add to Existing Drawing\naddWaypoint=Add Waypoint\nadjustTo=Adjust to\nadvanced=Advanced\nalign=Align\nalignment=Alignment\nallChangesLost=All changes will be lost!\nallPages=All Pages\nallProjects=All Projects\nallSpaces=All Spaces\nallTags=All Tags\nanchor=Anchor\nandroid=Android\nangle=Angle\narc=Arc\nareYouSure=Are you sure?\nensureDataSaved=Please ensure your data is saved before closing.\nallChangesSaved=All changes saved\nallChangesSavedInDrive=All changes saved in Drive\nallowPopups=Allow pop-ups to avoid this dialog.\nallowRelativeUrl=Allow relative URL\nalreadyConnected=Nodes already connected\napply=Apply\narchiMate21=ArchiMate 2.1\narrange=Arrange\narrow=Arrow\narrows=Arrows\nasNew=As New\natlas=Atlas\nauthor=Author\nauthorizationRequired=Authorization required\nauthorizeThisAppIn=Authorize this app in {1}:\nauthorize=Authorize\nauthorizing=Authorizing\nautomatic=Automatic\nautosave=Autosave\nautosize=Autosize\nattachments=Attachments\naws=AWS\naws3d=AWS 3D\nazure=Azure\nbackground=Background\nbackgroundColor=Background Color\nbackgroundImage=Background Image\nbasic=Basic\nblankDrawing=Blank Drawing\nblankDiagram=Blank Diagram\nblock=Block\nblockquote=Blockquote\nblog=Blog\nbold=Bold\nbootstrap=Bootstrap\nborderColor=Border Color\nborderWidth=Borderwidth\nbottom=Bottom\nbottomAlign=Bottom Align\nbottomLeft=Bottom Left\nbottomRight=Bottom Right\nbpmn=BPMN\nbrowser=Browser\nbulletedList=Bulleted List\nbusiness=Business\nbusy=Operation in progress\ncabinets=Cabinets\ncancel=Cancel\ncenter=Center\ncannotLoad=Load attempts failed. Please try again later.\ncannotLogin=Log in attempts failed. Please try again later.\ncannotOpenFile=Cannot open file\ncardName=Card Name\nchange=Change\nchangeOrientation=Change Orientation\nchangeUser=Change user\nchangesNotSaved=Changes have not been saved\nchatJoined={1} has joined\nchatLeft={1} has left\nchatWindowTitle=Chat\nchooseAnOption=Choose an option\nchromeApp=Chrome App\ncompressed=Compressed\ncommitMessage=Commit Message\ncsv=CSV\ndraftFound=A draft for '{1}' has been found. Load it into the editor or discard it to continue.\ndragAndDropNotSupported=Drag and drop not supported for images. Would you like to import instead?\ndropboxCharsNotAllowed=The following characters are not allowed:  / : ? * \" |\ncheck=Check\ncircle=Circle\ncisco=Cisco\nclassic=Classic\nclearDefaultStyle=Clear Default Style\nclearFilter=Clear Filter\nclearWaypoints=Clear Waypoints\nclipart=Clipart\nclose=Close\ncollaborator=Collaborator\ncollaborators=Collaborators\ncollapse=Collapse\ncollapseExpand=Collapse/Expand\ncollapse-expand=Click to collapse/expand\nShift-click to move neighbors \nAlt-click to protect group size\ncollapsible=Collapsible\ncomic=Comic\ncomment=Comment\ncommentsNotes=Comments/Notes\nconnect=Connect\nconnecting=Connecting\nconnectWithDrive=Connect with Google Drive\nconnection=Connection\nconnectionArrows=Connection Arrows\nconnectionPoints=Connection Points\nconstrainProportions=Constrain Proportions\ncontainsValidationErrors=Contains validation errors\ncopiedToClipboard=Copied to clipboard\ncopy=Copy\ncopyConnect=Copy on connect\ncopyOf=Copy of {1}\ncopyOfDrawing=Copy of Drawing\ncopyStyle=Copy Style\ncreate=Create\ncreateNewDiagram=Create New Diagram\ncreateRevision=Create Revision\ncreateShape=Create Shape\ncrop=Crop\ncurved=Curved\ncustom=Custom\ncurrent=Current\ncut=Cut\ndashed=Dashed\ndecideLater=Decide later\ndefault=Default\ndelete=Delete\ndeleteColumn=Delete Column\ndeleteLibrary401=Insufficient permissions to delete this library\ndeleteLibrary404=Selected library could not be found\ndeleteLibrary500=Error deleting library\ndeleteLibraryConfirm=You are about to permanently delete this library. Are you sure you want to do this?\ndeleteRow=Delete Row\ndescription=Description\ndevice=Device\ndiagram=Diagram\ndiagramContent=Diagram Content\ndiagramLocked=Diagram has been locked to prevent further data loss.\ndiagramName=Diagram Name\ndiagramIsPublic=Diagram is public\ndiagramIsNotPublic=Diagram is not public\ndiamond=Diamond\ndiamondThin=Diamond (thin)\ndidYouKnow=Did you know...\ndirection=Direction\ndiscard=Discard\ndiscardChangesAndReconnect=Discard Changes and Reconnect\ngoogleDriveMissingClickHere=Google Drive missing? Click here!\ndiscardChanges=Discard Changes\ndisconnected=Disconnected\ndistribute=Distribute\ndone=Done\ndotted=Dotted\ndoubleClickOrientation=Doubleclick to change orientation\ndoubleClickTooltip=Doubleclick to insert text\ndoubleClickChangeProperty=Doubleclick to change property name\ndownload=Download\ndownloadAs=Download as\nclickHereToSave=Click here to save.\ndraftDiscarded=Draft discarded\ndraftSaved=Draft saved\ndragElementsHere=Drag elements here\ndragImagesHere=Drag images or URLs here\ndragUrlsHere=Drag URLs here\ndraw.io=draw.io\ndrawing=Drawing{1}\ndrawingEmpty=Drawing is empty\ndrawingTooLarge=Drawing is too large\ndrawioForWork=Draw.io for GSuite\ndropbox=Dropbox\nduplicate=Duplicate\nduplicateIt=Duplicate {1}\ndivider=Divider\neast=East\nedit=Edit\neditData=Edit Data\neditDiagram=Edit Diagram\neditGeometry=Edit Geometry\neditImage=Edit Image\neditImageUrl=Edit Image URL\neditLink=Edit Link\neditShape=Edit Shape\neditStyle=Edit Style\neditText=Edit Text\neditTooltip=Edit Tooltip\nglass=Glass\ngoogleImages=Google Images\nimageSearch=Image Search\neip=EIP\nembed=Embed\nembedImages=Embed Images\nmainEmbedNotice=Paste this into the page\nelectrical=Electrical\nembedNotice=Paste this once at the end of the page\nenterGroup=Enter Group\nenterName=Enter Name\nenterPropertyName=Enter Property Name\nenterValue=Enter Value\nentityRelation=Entity Relation\nerror=Error\nerrorDeletingFile=Error Deleting File\nerrorLoadingFile=Error loading file\nerrorRenamingFile=Error renaming file.\nerrorRenamingFileNotFound=Error renaming file. File was not found.\nerrorRenamingFileForbidden=Error renaming file. Insufficient access rights.\nerrorSavingDraft=Error saving draft\nerrorSavingFile=Error saving file\nerrorSavingFileUnknown=Error authorizing with Google's servers. Please refresh the page to re-attempt.\nerrorSavingFileForbidden=Error saving file. Insufficient access rights.\nerrorSavingFileNameConflict=Could not save diagram. Current page already contains file named '{1}'.\nerrorSavingFileNotFound=Error saving file. File was not found.\nerrorSavingFileSessionTimeout=Your session has ended. Please <a target='_blank' href='{1}'>{2}</a> and return to this tab to try to save again.\nerrorSendingFeedback=Error sending feedback.\nerrorUpdatingPreview=Error updating preview.\nexit=Exit\nexitGroup=Exit Group\nexpand=Expand\nexport=Export\nexporting=Exporting\nexportAs=Export as\nexportOptionsDisabled=Export options disabled\nexportOptionsDisabledDetails=The owner has disabled options to download, print or copy for commenters and viewers on this file.\nextras=Extras\nfacebook=Facebook\nfailedToSaveTryReconnect=Failed to save, trying to reconnect\nfeatureRequest=Feature Request\nfeedback=Feedback\nfeedbackSent=Feedback successfully sent.\nfloorplans=Floorplans\nfile=File\nfileChangedOverwrite=File was changed. Overwrite changes?\noverwrite=Overwrite\nfilename=Filename\nfileExists=File already exists\nfileNearlyFullSeeFaq=File nearly full, please see FAQ\nfileNotFound=File not found\nrepositoryNotFound=Repository not found\nfileNotFoundOrDenied=The file was not found. It does not exist or you do not have read access.\nfileNotLoaded=File not loaded\nfileNotSaved=File not saved\nfileOpenLocation=How would you like to open these file(s)?\nfileWillBeSavedInAppFolder={1} will be saved in the app folder.\nfill=Fill\nfillColor=Fill Color\nfilterCards=Filter Cards\nfind=Find\nfit=Fit\nfitContainer=Resize Container\nfitIntoContainer=Fit into Container\nfitPage=Fit Page\nfitPageWidth=Fit Page Width\nfitTo=Fit to\nfitToSheetsAcross=sheet(s) across\nfitToBy=by\nfitToSheetsDown=sheet(s) down\nfitTwoPages=Two Pages\nfitWindow=Fit Window\nflip=Flip\nflipH=Flip Horizontal\nflipV=Flip Vertical\nflowchart=Flowchart\nfolder=Folder\nfont=Font\nfontColor=Font Color\nfontFamily=Font Family\nfontSize=Font Size\nforbidden=You are not authorized to access this file\nformat=Format\nformatPanel=Format Panel\nformatted=Formatted\nformattedText=Formatted Text\nformatPng=PNG\nformatGif=GIF\nformatJpg=JPEG\nformatPdf=PDF\nformatSvg=SVG\nformatHtmlEmbedded=HTML\nformatSvgEmbedded=SVG (with XML)\nformatVsdx=VSDX\nformatVssx=VSSX\nformatXmlPlain=XML (Plain)\nformatXml=XML\nforum=Discussion/Help Forums\nfromTemplate=From Template\nfromTemplateUrl=From Template URL\nfromText=From Text\nfromUrl=From URL\nfromThisPage=From this page\nfullscreen=Fullscreen\ngap=Gap\ngeneral=General\ngithub=GitHub\ngliffy=Gliffy\nglobal=Global\ngoogleDocs=Google Docs\ngoogleDrive=Google Drive\ngoogleGadget=Google Gadget\ngooglePlus=Google+\ngoogleSites=Google Sites\ngradient=Gradient\ngradientColor=Color\ngrid=Grid\ngridColor=Grid Color\ngridSize=Grid Size\ngroup=Group\nguides=Guides\nhateApp=I hate draw.io\nheading=Heading\nheight=Height\nhelp=Help\nhelpTranslate=Help us translate this application\nhide=Hide\nhideIt=Hide {1}\nhidden=Hidden\nhome=Home\nhorizontal=Horizontal\nhorizontalFlow=Horizontal Flow\nhorizontalTree=Horizontal Tree\nhowTranslate=How good is the translation in your language?\nhtml=HTML\nhtmlText=HTML Text\niframe=IFrame\nignore=Ignore\nimage=Image\nimageUrl=Image URL\nimages=Images\nimagePreviewError=This image couldn't be loaded for preview. Please check the URL.\nimageTooBig=Image too big\nimgur=Imgur\nimport=Import\nimportFrom=Import from\nincludeCopyOfMyDiagram=Include a copy of my diagram\nincreaseIndent=Increase Indent\ndecreaseIndent=Decrease Indent\ninsert=Insert\ninsertColumnBefore=Insert Column Left\ninsertColumnAfter=Insert Column Right\ninsertEllipse=Insert Ellipse\ninsertImage=Insert Image\ninsertHorizontalRule=Insert Horizontal Rule\ninsertLink=Insert Link\ninsertPage=Insert Page\ninsertRectangle=Insert Rectangle\ninsertRowBefore=Insert Row Above\ninsertRowAfter=Insert Row After\ninsertText=Insert Text\ninserting=Inserting\ninvalidFilename=Diagram names must not contain the following characters:  / | : ; { } < > & + ? = \"\ninvalidLicenseSeeThisPage=Your license is invalid, please see this <a target=\"_blank\" href=\"https://support.draw.io/display/DFCS/Licensing+your+draw.io+plugin\">page</a>.\ninvalidName=Invalid name\ninvalidOrMissingFile=Invalid or missing file\ninvalidPublicUrl=Invalid public URL\nisometric=Isometric\nios=iOS\nitalic=Italic\nkennedy=Kennedy\nkeyboardShortcuts=Keyboard shortcuts\nlayers=Layers\nlandscape=Landscape\nlanguage=Language\nleanMapping=Lean Mapping\nlastChange=Last change {1} ago\nlessThanAMinute=less than a minute\nlicensingError=Licensing Error\nlicenseHasExpired=The license for {1} has expired on {2}. Click here.\nlicenseWillExpire=The license for {1} will expire on {2}. Click here.\nlineJumps=Line jumps\nlinkAccountRequired=If the diagram is not public a Google account is required to view the link.\nlinkText=Link Text\nlist=List\nminute=minute\nminutes=minutes\nhours=hours\ndays=days\nmonths=months\nyears=years\nrestartForChangeRequired=Changes will take effect after page refresh.\nlaneColor=Lanecolor\nlastModified=Last modified\nlayout=Layout\nleft=Left\nleftAlign=Left Align\nleftToRight=Left to right\nlibraryTooltip=Drag and drop shapes here or click + to insert. Double click to edit.\nlightbox=Lightbox\nline=Line\nlineend=Line end\nlineheight=Line Height\nlinestart=Line start\nlinewidth=Linewidth\nlink=Link\nlinks=Links\nloading=Loading\nlockUnlock=Lock/Unlock\nloggedOut=Logged Out\nlogIn=log in\nloveIt=I love {1}\nlucidchart=Lucidchart\nmathematicalTypesetting=Mathematical Typesetting\nmakeCopy=Make a Copy\nmanual=Manual\nmiddle=Middle\nmisc=Misc\nmockups=Mockups\nmodificationDate=Modification date\nmodifiedBy=Modified by\nmore=More\nmoreResults=More Results\nmoreShapes=More Shapes\nmove=Move\nmoveToFolder=Move to Folder\nmoving=Moving\nmoveSelectionTo=Move selection to {1}\nname=Name\nnavigation=Navigation\nnetworking=Networking\nnew=New\nnewLibrary=New Library\nnextPage=Next Page\nnoAttachments=No attachments found\nnoColor=No Color\nnoFiles=No Files\nnoFileSelected=No file selected\nnoLibraries=No libraries found\nnoMoreResults=No more results\nnone=None\nnoOtherViewers=No other viewers\nnoPlugins=No plugins\nnoPreview=No preview\nnoResponse=No response from server\nnoResultsFor=No results for '{1}'\nnoRevisions=No revisions\nnoSearchResults=No search results found\nnoPageContentOrNotSaved=No anchors found on this page or it hasn't been saved yet\nnormal=Normal\nnorth=North\nnotADiagramFile=Not a diagram file\nnotALibraryFile=Not a library file\nnotAvailable=Not available\nnotAUtf8File=Not a UTF-8 file\nnotConnected=Not connected\nnote=Note\nnotUsingService=Not using {1}?\nnumberedList=Numbered list\noffline=Offline\nok=OK\noneDrive=OneDrive\nonline=Online\nopacity=Opacity\nopen=Open\nopenArrow=Open Arrow\nopenExistingDiagram=Open Existing Diagram\nopenFile=Open File\nopenFrom=Open from\nopenLibrary=Open Library\nopenLibraryFrom=Open Library from\nopenLink=Open Link\nopenInNewWindow=Open in New Window\nopenInThisWindow=Open in This Window\nopenIt=Open {1}\nopenRecent=Open Recent\nopenSupported=Supported formats are files saved from this software (.xml), .vsdx and .gliffy\noptions=Options\norganic=Organic\northogonal=Orthogonal\notherViewer=other viewer\notherViewers=other viewers\noutline=Outline\noval=Oval\npage=Page\npageContent=Page Content\npageNotFound=Page not found\npageWithNumber=Page-{1}\npages=Pages\npageView=Page View\npageSetup=Page Setup\npageScale=Page Scale\npan=Pan\npanTooltip=Space+Drag to pan\npaperSize=Paper Size\npattern=Pattern\npaste=Paste\npasteHere=Paste here\npasteStyle=Paste Style\nperimeter=Perimeter\npermissionAnyone=Anyone can edit\npermissionAuthor=Only I can edit\npickFolder=Pick a folder\npickLibraryDialogTitle=Select Library\npublicDiagramUrl=Public URL of the diagram\nplaceholders=Placeholders\nplantUml=PlantUML\nplugins=Plugins\npluginUrl=Plugin URL\npluginWarning=The page has requested to load the following plugin(s):\n \n {1}\n \n Would you like to load these plugin(s) now?\n \n NOTE : Only allow plugins to run if you fully understand the security implications of doing so.\n\nplusTooltip=Click to connect and clone (ctrl+click to clone, shift+click to connect). Drag to connect (ctrl+drag to clone).\nportrait=Portrait\nposition=Position\nposterPrint=Poster Print\npreferences=Preferences\npreview=Preview\npreviousPage=Previous Page\nprint=Print\nprintAllPages=Print All Pages\nprocEng=Proc. Eng.\nproject=Project\npriority=Priority\nproperties=Properties\npublish=Publish\nquickStart=Quick Start Video\nrack=Rack\nradialTree=Radial Tree\nreadOnly=Read-only\nreconnecting=Reconnecting\nrecentlyUpdated=Recently Updated\nrecentlyViewed=Recently Viewed\nredirectToNewApp=This file was created or modified in a newer version of this app. You will be redirected now.\nrealtimeTimeout=It looks like you've made a few changes while offline. We're sorry, these changes cannot be saved.\nredo=Redo\nrefresh=Refresh\nregularExpression=Regular Expression\nrelativeUrlNotAllowed=Relative URL not allowed\nrememberMe=Remember me\nrememberThisSetting=Remember this setting\nremoveFormat=Clear Formatting\nremoveFromGroup=Remove from Group\nremoveIt=Remove {1}\nremoveWaypoint=Remove Waypoint\nrename=Rename\nrenamed=Renamed\nrenameIt=Rename {1}\nrenaming=Renaming\nreplace=Replace\nreplaceIt={1} already exists. Do you want to replace it?\nreplaceExistingDrawing=Replace existing drawing\nrequired=required\nreset=Reset\nresetView=Reset View\nresize=Resize\nresizeLargeImages=Do you want to resize large images to make the application run faster?\nretina=Retina\nresponsive=Responsive\nrestore=Restore\nrestoring=Restoring\nretryingIn=Retrying in {1} second(s)\nretryingLoad=Load failed. Retrying...\nretryingLogin=Login time out. Retrying...\nreverse=Reverse\nrevision=Revision\nrevisionHistory=Revision History\nright=Right\nrightAlign=Right Align\nrightToLeft=Right to left\nrotate=Rotate\nrotateTooltip=Click and drag to rotate, click to turn by 90 degrees\nrotation=Rotation\nrounded=Rounded\nsave=Save\nsaveAndExit=Save & Exit\nsaveAs=Save as\nsaveAsXmlFile=Save as XML file?\nsaved=Saved\nsaveDiagramsTo=Save diagrams to\nsaveLibrary403=Insufficient permissions to edit this library\nsaveLibrary500=There was an error while saving the library\nsaving=Saving\nscratchpad=Scratchpad\nscrollbars=Scrollbars\nsearch=Search\nsearchShapes=Search Shapes\nselectAll=Select All\nselectionOnly=Selection Only\nselectCard=Select Card\nselectEdges=Select Edges\nselectFile=Select File\nselectFolder=Select Folder\nselectFont=Select Font\nselectNone=Select None\nselectVertices=Select Vertices\nsendMessage=Send\nsendYourFeedbackToDrawIo=Send your feedback to draw.io\nserviceUnavailableOrBlocked=Service unavailable or blocked\nsessionExpired=Your session has expired. Please refresh the browser window.\nsessionTimeoutOnSave=Your session has timed out and you have been disconnected from the Google Drive. Press OK to login and save. \nsetAsDefaultStyle=Set as Default Style\nshadow=Shadow\nshape=Shape\nshapes=Shapes\nshare=Share\nshareLink=Link for shared editing\nsharp=Sharp\nshow=Show\nshowStartScreen=Show Start Screen\nsidebarTooltip=Click to expand. Drag and drop shapes into the diagram. Shift+click to change selection. Alt+click to insert and connect.\nsigns=Signs\nsignOut=Sign out\nsimple=Simple\nsimpleArrow=Simple Arrow\nsize=Size\nsolid=Solid\nsourceSpacing=Source Spacing\nsouth=South\nsoftware=Software\nspace=Space\nspacing=Spacing\nspecialLink=Special Link\nstandard=Standard\nstarting=Starting\nstraight=Straight\nstrokeColor=Line Color\nstyle=Style\nsubscript=Subscript\nsummary=Summary\nsuperscript=Superscript\nsupport=Support\nsysml=SysML\ntags=Tags\ntable=Table\ntargetSpacing=Target Spacing\ntemplate=Template\ntemplates=Templates\ntext=Text\ntextAlignment=Text Alignment\ntextOpacity=Text Opacity\ntheme=Theme\ntimeout=Timeout\ntitle=Title\nto=to\ntoBack=To Back\ntoFront=To Front\ntooltips=Tooltips\ntop=Top\ntopAlign=Top Align\ntopLeft=Top Left\ntopRight=Top Right\ntransparent=Transparent\ntransparentBackground=Transparent Background\ntrello=Trello\ntryAgain=Try again\ntryOpeningViaThisPage=Try opening via this page.\nturn=Rotate 90°\ntype=Type\ntwitter=Twitter\numl=UML\nunderline=Underline\nundo=Undo\nungroup=Ungroup\nunsavedChanges=Unsaved changes\nunsavedChangesClickHereToSave=Unsaved changes. Click here to save.\nuntitled=Untitled\nuntitledDiagram=Untitled Diagram\nuntitledLayer=Untitled Layer\nuntitledLibrary=Untitled Library\nunknownError=Unknown error\nupdateFile=Update {1}\nupdatingDocument=Updating Document. Please wait...\nupdatingPreview=Updating Preview. Please wait...\nupdatingSelection=Updating Selection. Please wait...\nupload=Upload\nurl=URL\nuserManual=User Manual\nvertical=Vertical\nverticalFlow=Vertical Flow\nverticalTree=Vertical Tree\nview=View\nviewUrl=Link to view: {1}\nvoiceAssistant=Voice Assistant (beta)\nwarning=Warning\nwaypoints=Waypoints\nwest=West\nwidth=Width\nwiki=Wiki\nwordWrap=Word Wrap\nwritingDirection=Writing Direction\nyourEmailAddress=Your email address\nzoom=Zoom\nzoomIn=Zoom In\nzoomOut=Zoom Out\nbasic=Basic\nbusinessprocess=Business Processes\ncharts=Charts\nengineering=Engineering\nflowcharts=Flowcharts\ngmdl=Material Design\nmindmaps=Mindmaps\nmockups=Mockups\nnetworkdiagrams=Network Diagrams\nnothingIsSelected=Nothing is selected\nother=Other\nsoftwaredesign=Software Design\nvenndiagrams=Venn Diagrams\nwebEmailOrOther=Web, email or any other internet address\nwebLink=Web Link\nwireframes=Wireframes\n");Graph.prototype.defaultThemes[Graph.prototype.defaultThemeName]=mxUtils.parseXml('<mxStylesheet><add as="defaultVertex"><add as="shape" value="label"/><add as="perimeter" value="rectanglePerimeter"/><add as="fontSize" value="12"/><add as="fontFamily" value="Helvetica"/><add as="align" value="center"/><add as="verticalAlign" value="middle"/><add as="fillColor" value="#ffffff"/><add as="strokeColor" value="#000000"/><add as="fontColor" value="#000000"/></add><add as="defaultEdge"><add as="shape" value="connector"/><add as="labelBackgroundColor" value="#ffffff"/><add as="endArrow" value="classic"/><add as="fontSize" value="11"/><add as="fontFamily" value="Helvetica"/><add as="align" value="center"/><add as="verticalAlign" value="middle"/><add as="rounded" value="1"/><add as="strokeColor" value="#000000"/><add as="fontColor" value="#000000"/></add><add as="fancy"><add as="shadow" value="1"/><add as="glass" value="1"/></add><add as="gray" extend="fancy"><add as="gradientColor" value="#B3B3B3"/><add as="fillColor" value="#F5F5F5"/><add as="strokeColor" value="#666666"/></add><add as="blue" extend="fancy"><add as="gradientColor" value="#7EA6E0"/><add as="fillColor" value="#DAE8FC"/><add as="strokeColor" value="#6C8EBF"/></add><add as="green" extend="fancy"><add as="gradientColor" value="#97D077"/><add as="fillColor" value="#D5E8D4"/><add as="strokeColor" value="#82B366"/></add><add as="turquoise" extend="fancy"><add as="gradientColor" value="#67AB9F"/><add as="fillColor" value="#D5E8D4"/><add as="strokeColor" value="#6A9153"/></add><add as="yellow" extend="fancy"><add as="gradientColor" value="#FFD966"/><add as="fillColor" value="#FFF2CC"/><add as="strokeColor" value="#D6B656"/></add><add as="orange" extend="fancy"><add as="gradientColor" value="#FFA500"/><add as="fillColor" value="#FFCD28"/><add as="strokeColor" value="#D79B00"/></add><add as="red" extend="fancy"><add as="gradientColor" value="#EA6B66"/><add as="fillColor" value="#F8CECC"/><add as="strokeColor" value="#B85450"/></add><add as="pink" extend="fancy"><add as="gradientColor" value="#B5739D"/><add as="fillColor" value="#E6D0DE"/><add as="strokeColor" value="#996185"/></add><add as="purple" extend="fancy"><add as="gradientColor" value="#8C6C9C"/><add as="fillColor" value="#E1D5E7"/><add as="strokeColor" value="#9673A6"/></add><add as="plain-gray"><add as="gradientColor" value="#B3B3B3"/><add as="fillColor" value="#F5F5F5"/><add as="strokeColor" value="#666666"/></add><add as="plain-blue"><add as="gradientColor" value="#7EA6E0"/><add as="fillColor" value="#DAE8FC"/><add as="strokeColor" value="#6C8EBF"/></add><add as="plain-green"><add as="gradientColor" value="#97D077"/><add as="fillColor" value="#D5E8D4"/><add as="strokeColor" value="#82B366"/></add><add as="plain-turquoise"><add as="gradientColor" value="#67AB9F"/><add as="fillColor" value="#D5E8D4"/><add as="strokeColor" value="#6A9153"/></add><add as="plain-yellow"><add as="gradientColor" value="#FFD966"/><add as="fillColor" value="#FFF2CC"/><add as="strokeColor" value="#D6B656"/></add><add as="plain-orange"><add as="gradientColor" value="#FFA500"/><add as="fillColor" value="#FFCD28"/><add as="strokeColor" value="#D79B00"/></add><add as="plain-red"><add as="gradientColor" value="#EA6B66"/><add as="fillColor" value="#F8CECC"/><add as="strokeColor" value="#B85450"/></add><add as="plain-pink"><add as="gradientColor" value="#B5739D"/><add as="fillColor" value="#E6D0DE"/><add as="strokeColor" value="#996185"/></add><add as="plain-purple"><add as="gradientColor" value="#8C6C9C"/><add as="fillColor" value="#E1D5E7"/><add as="strokeColor" value="#9673A6"/></add><add as="text"><add as="fillColor" value="none"/><add as="gradientColor" value="none"/><add as="strokeColor" value="none"/><add as="align" value="left"/><add as="verticalAlign" value="top"/></add><add as="label"><add as="fontStyle" value="1"/><add as="align" value="left"/><add as="verticalAlign" value="middle"/><add as="spacing" value="2"/><add as="spacingLeft" value="52"/><add as="imageWidth" value="42"/><add as="imageHeight" value="42"/><add as="rounded" value="1"/></add><add as="icon" extend="label"><add as="align" value="center"/><add as="imageAlign" value="center"/><add as="verticalLabelPosition" value="bottom"/><add as="verticalAlign" value="top"/><add as="spacingTop" value="4"/><add as="labelBackgroundColor" value="#ffffff"/><add as="spacing" value="0"/><add as="spacingLeft" value="0"/><add as="spacingTop" value="6"/><add as="fontStyle" value="0"/><add as="imageWidth" value="48"/><add as="imageHeight" value="48"/></add><add as="swimlane"><add as="shape" value="swimlane"/><add as="fontSize" value="12"/><add as="fontStyle" value="1"/><add as="startSize" value="23"/></add><add as="group"><add as="verticalAlign" value="top"/><add as="fillColor" value="none"/><add as="strokeColor" value="none"/><add as="gradientColor" value="none"/><add as="pointerEvents" value="0"/></add><add as="ellipse"><add as="shape" value="ellipse"/><add as="perimeter" value="ellipsePerimeter"/></add><add as="rhombus"><add as="shape" value="rhombus"/><add as="perimeter" value="rhombusPerimeter"/></add><add as="triangle"><add as="shape" value="triangle"/><add as="perimeter" value="trianglePerimeter"/></add><add as="line"><add as="shape" value="line"/><add as="strokeWidth" value="4"/><add as="labelBackgroundColor" value="#ffffff"/><add as="verticalAlign" value="top"/><add as="spacingTop" value="8"/></add><add as="image"><add as="shape" value="image"/><add as="labelBackgroundColor" value="white"/><add as="verticalAlign" value="top"/><add as="verticalLabelPosition" value="bottom"/></add><add as="roundImage" extend="image"><add as="perimeter" value="ellipsePerimeter"/></add><add as="rhombusImage" extend="image"><add as="perimeter" value="rhombusPerimeter"/></add><add as="arrow"><add as="shape" value="arrow"/><add as="edgeStyle" value="none"/><add as="fillColor" value="#ffffff"/></add></mxStylesheet>').documentElement;GraphViewer=function(a,b,e){this.init(a,b,e)};mxUtils.extend(GraphViewer,mxEventSource);GraphViewer.prototype.editBlankUrl="https://www.draw.io/";GraphViewer.prototype.imageBaseUrl="https://www.draw.io/";GraphViewer.prototype.toolbarHeight="BackCompat"==document.compatMode?28:30;GraphViewer.prototype.lightboxChrome=!0;GraphViewer.prototype.lightboxZIndex=999;GraphViewer.prototype.toolbarZIndex=999;GraphViewer.prototype.imageBaseUrl="https://www.draw.io/";GraphViewer.prototype.autoFit=!0;
+-40),!0);d.geometry.relative=!0;d.edge=!0;c.insertEdge(d,!1);return sb.createVertexTemplateFromCells([b,d,a,c],220,60,"Sub Sections")})])}}})();mxResources.parse("# *DO NOT DIRECTLY EDIT THIS FILE, IT IS AUTOMATICALLY GENERATED AND IT IS BASED ON:*\n# https://docs.google.com/spreadsheet/ccc?key=0AmQEO36liL4FdDJLWVNMaVV2UmRKSnpXU09MYkdGbEE\naboutDrawio=About draw.io\naccessDenied=Access Denied\nactualSize=Actual Size\nadd=Add\naddedFile=Added {1}\naddImages=Add Images\naddImageUrl=Add Image URL\naddLayer=Add Layer\naddProperty=Add Property\naddress=Address\naddToExistingDrawing=Add to Existing Drawing\naddWaypoint=Add Waypoint\nadjustTo=Adjust to\nadvanced=Advanced\nalign=Align\nalignment=Alignment\nallChangesLost=All changes will be lost!\nallPages=All Pages\nallProjects=All Projects\nallSpaces=All Spaces\nallTags=All Tags\nanchor=Anchor\nandroid=Android\nangle=Angle\narc=Arc\nareYouSure=Are you sure?\nensureDataSaved=Please ensure your data is saved before closing.\nallChangesSaved=All changes saved\nallChangesSavedInDrive=All changes saved in Drive\nallowPopups=Allow pop-ups to avoid this dialog.\nallowRelativeUrl=Allow relative URL\nalreadyConnected=Nodes already connected\napply=Apply\narchiMate21=ArchiMate 2.1\narrange=Arrange\narrow=Arrow\narrows=Arrows\nasNew=As New\natlas=Atlas\nauthor=Author\nauthorizationRequired=Authorization required\nauthorizeThisAppIn=Authorize this app in {1}:\nauthorize=Authorize\nauthorizing=Authorizing\nautomatic=Automatic\nautosave=Autosave\nautosize=Autosize\nattachments=Attachments\naws=AWS\naws3d=AWS 3D\nazure=Azure\nbackground=Background\nbackgroundColor=Background Color\nbackgroundImage=Background Image\nbasic=Basic\nblankDrawing=Blank Drawing\nblankDiagram=Blank Diagram\nblock=Block\nblockquote=Blockquote\nblog=Blog\nbold=Bold\nbootstrap=Bootstrap\nborderColor=Border Color\nborderWidth=Borderwidth\nbottom=Bottom\nbottomAlign=Bottom Align\nbottomLeft=Bottom Left\nbottomRight=Bottom Right\nbpmn=BPMN\nbrowser=Browser\nbulletedList=Bulleted List\nbusiness=Business\nbusy=Operation in progress\ncabinets=Cabinets\ncancel=Cancel\ncenter=Center\ncannotLoad=Load attempts failed. Please try again later.\ncannotLogin=Log in attempts failed. Please try again later.\ncannotOpenFile=Cannot open file\ncardName=Card Name\nchange=Change\nchangeOrientation=Change Orientation\nchangeUser=Change user\nchangesNotSaved=Changes have not been saved\nchatJoined={1} has joined\nchatLeft={1} has left\nchatWindowTitle=Chat\nchooseAnOption=Choose an option\nchromeApp=Chrome App\ncompressed=Compressed\ncommitMessage=Commit Message\ncsv=CSV\ndraftFound=A draft for '{1}' has been found. Load it into the editor or discard it to continue.\ndragAndDropNotSupported=Drag and drop not supported for images. Would you like to import instead?\ndropboxCharsNotAllowed=The following characters are not allowed:  / : ? * \" |\ncheck=Check\ncircle=Circle\ncisco=Cisco\nclassic=Classic\nclearDefaultStyle=Clear Default Style\nclearFilter=Clear Filter\nclearWaypoints=Clear Waypoints\nclipart=Clipart\nclose=Close\ncollaborator=Collaborator\ncollaborators=Collaborators\ncollapse=Collapse\ncollapseExpand=Collapse/Expand\ncollapse-expand=Click to collapse/expand\nShift-click to move neighbors \nAlt-click to protect group size\ncollapsible=Collapsible\ncomic=Comic\ncomment=Comment\ncommentsNotes=Comments/Notes\nconnect=Connect\nconnecting=Connecting\nconnectWithDrive=Connect with Google Drive\nconnection=Connection\nconnectionArrows=Connection Arrows\nconnectionPoints=Connection Points\nconstrainProportions=Constrain Proportions\ncontainsValidationErrors=Contains validation errors\ncopiedToClipboard=Copied to clipboard\ncopy=Copy\ncopyConnect=Copy on connect\ncopyOf=Copy of {1}\ncopyOfDrawing=Copy of Drawing\ncopyStyle=Copy Style\ncreate=Create\ncreateNewDiagram=Create New Diagram\ncreateRevision=Create Revision\ncreateShape=Create Shape\ncrop=Crop\ncurved=Curved\ncustom=Custom\ncurrent=Current\ncut=Cut\ndashed=Dashed\ndecideLater=Decide later\ndefault=Default\ndelete=Delete\ndeleteColumn=Delete Column\ndeleteLibrary401=Insufficient permissions to delete this library\ndeleteLibrary404=Selected library could not be found\ndeleteLibrary500=Error deleting library\ndeleteLibraryConfirm=You are about to permanently delete this library. Are you sure you want to do this?\ndeleteRow=Delete Row\ndescription=Description\ndevice=Device\ndiagram=Diagram\ndiagramContent=Diagram Content\ndiagramLocked=Diagram has been locked to prevent further data loss.\ndiagramName=Diagram Name\ndiagramIsPublic=Diagram is public\ndiagramIsNotPublic=Diagram is not public\ndiamond=Diamond\ndiamondThin=Diamond (thin)\ndidYouKnow=Did you know...\ndirection=Direction\ndiscard=Discard\ndiscardChangesAndReconnect=Discard Changes and Reconnect\ngoogleDriveMissingClickHere=Google Drive missing? Click here!\ndiscardChanges=Discard Changes\ndisconnected=Disconnected\ndistribute=Distribute\ndone=Done\ndotted=Dotted\ndoubleClickOrientation=Doubleclick to change orientation\ndoubleClickTooltip=Doubleclick to insert text\ndoubleClickChangeProperty=Doubleclick to change property name\ndownload=Download\ndownloadAs=Download as\nclickHereToSave=Click here to save.\ndraftDiscarded=Draft discarded\ndraftSaved=Draft saved\ndragElementsHere=Drag elements here\ndragImagesHere=Drag images or URLs here\ndragUrlsHere=Drag URLs here\ndraw.io=draw.io\ndrawing=Drawing{1}\ndrawingEmpty=Drawing is empty\ndrawingTooLarge=Drawing is too large\ndrawioForWork=Draw.io for GSuite\ndropbox=Dropbox\nduplicate=Duplicate\nduplicateIt=Duplicate {1}\ndivider=Divider\neast=East\nedit=Edit\neditData=Edit Data\neditDiagram=Edit Diagram\neditGeometry=Edit Geometry\neditImage=Edit Image\neditImageUrl=Edit Image URL\neditLink=Edit Link\neditShape=Edit Shape\neditStyle=Edit Style\neditText=Edit Text\neditTooltip=Edit Tooltip\nglass=Glass\ngoogleImages=Google Images\nimageSearch=Image Search\neip=EIP\nembed=Embed\nembedImages=Embed Images\nmainEmbedNotice=Paste this into the page\nelectrical=Electrical\nembedNotice=Paste this once at the end of the page\nenterGroup=Enter Group\nenterName=Enter Name\nenterPropertyName=Enter Property Name\nenterValue=Enter Value\nentityRelation=Entity Relation\nerror=Error\nerrorDeletingFile=Error Deleting File\nerrorLoadingFile=Error loading file\nerrorRenamingFile=Error renaming file.\nerrorRenamingFileNotFound=Error renaming file. File was not found.\nerrorRenamingFileForbidden=Error renaming file. Insufficient access rights.\nerrorSavingDraft=Error saving draft\nerrorSavingFile=Error saving file\nerrorSavingFileUnknown=Error authorizing with Google's servers. Please refresh the page to re-attempt.\nerrorSavingFileForbidden=Error saving file. Insufficient access rights.\nerrorSavingFileNameConflict=Could not save diagram. Current page already contains file named '{1}'.\nerrorSavingFileNotFound=Error saving file. File was not found.\nerrorSavingFileSessionTimeout=Your session has ended. Please <a target='_blank' href='{1}'>{2}</a> and return to this tab to try to save again.\nerrorSendingFeedback=Error sending feedback.\nerrorUpdatingPreview=Error updating preview.\nexit=Exit\nexitGroup=Exit Group\nexpand=Expand\nexport=Export\nexporting=Exporting\nexportAs=Export as\nexportOptionsDisabled=Export options disabled\nexportOptionsDisabledDetails=The owner has disabled options to download, print or copy for commenters and viewers on this file.\nextras=Extras\nfacebook=Facebook\nfailedToSaveTryReconnect=Failed to save, trying to reconnect\nfeatureRequest=Feature Request\nfeedback=Feedback\nfeedbackSent=Feedback successfully sent.\nfloorplans=Floorplans\nfile=File\nfileChangedOverwrite=File was changed. Overwrite changes?\noverwrite=Overwrite\nfilename=Filename\nfileExists=File already exists\nfileNearlyFullSeeFaq=File nearly full, please see FAQ\nfileNotFound=File not found\nrepositoryNotFound=Repository not found\nfileNotFoundOrDenied=The file was not found. It does not exist or you do not have read access.\nfileNotLoaded=File not loaded\nfileNotSaved=File not saved\nfileOpenLocation=How would you like to open these file(s)?\nfileWillBeSavedInAppFolder={1} will be saved in the app folder.\nfill=Fill\nfillColor=Fill Color\nfilterCards=Filter Cards\nfind=Find\nfit=Fit\nfitContainer=Resize Container\nfitIntoContainer=Fit into Container\nfitPage=Fit Page\nfitPageWidth=Fit Page Width\nfitTo=Fit to\nfitToSheetsAcross=sheet(s) across\nfitToBy=by\nfitToSheetsDown=sheet(s) down\nfitTwoPages=Two Pages\nfitWindow=Fit Window\nflip=Flip\nflipH=Flip Horizontal\nflipV=Flip Vertical\nflowchart=Flowchart\nfolder=Folder\nfont=Font\nfontColor=Font Color\nfontFamily=Font Family\nfontSize=Font Size\nforbidden=You are not authorized to access this file\nformat=Format\nformatPanel=Format Panel\nformatted=Formatted\nformattedText=Formatted Text\nformatPng=PNG\nformatGif=GIF\nformatJpg=JPEG\nformatPdf=PDF\nformatSvg=SVG\nformatHtmlEmbedded=HTML\nformatSvgEmbedded=SVG (with XML)\nformatVsdx=VSDX\nformatVssx=VSSX\nformatXmlPlain=XML (Plain)\nformatXml=XML\nforum=Discussion/Help Forums\nfromTemplate=From Template\nfromTemplateUrl=From Template URL\nfromText=From Text\nfromUrl=From URL\nfromThisPage=From this page\nfullscreen=Fullscreen\ngap=Gap\ngeneral=General\ngithub=GitHub\ngliffy=Gliffy\nglobal=Global\ngoogleDocs=Google Docs\ngoogleDrive=Google Drive\ngoogleGadget=Google Gadget\ngooglePlus=Google+\ngoogleSites=Google Sites\ngradient=Gradient\ngradientColor=Color\ngrid=Grid\ngridColor=Grid Color\ngridSize=Grid Size\ngroup=Group\nguides=Guides\nhateApp=I hate draw.io\nheading=Heading\nheight=Height\nhelp=Help\nhelpTranslate=Help us translate this application\nhide=Hide\nhideIt=Hide {1}\nhidden=Hidden\nhome=Home\nhorizontal=Horizontal\nhorizontalFlow=Horizontal Flow\nhorizontalTree=Horizontal Tree\nhowTranslate=How good is the translation in your language?\nhtml=HTML\nhtmlText=HTML Text\niframe=IFrame\nignore=Ignore\nimage=Image\nimageUrl=Image URL\nimages=Images\nimagePreviewError=This image couldn't be loaded for preview. Please check the URL.\nimageTooBig=Image too big\nimgur=Imgur\nimport=Import\nimportFrom=Import from\nincludeCopyOfMyDiagram=Include a copy of my diagram\nincreaseIndent=Increase Indent\ndecreaseIndent=Decrease Indent\ninsert=Insert\ninsertColumnBefore=Insert Column Left\ninsertColumnAfter=Insert Column Right\ninsertEllipse=Insert Ellipse\ninsertImage=Insert Image\ninsertHorizontalRule=Insert Horizontal Rule\ninsertLink=Insert Link\ninsertPage=Insert Page\ninsertRectangle=Insert Rectangle\ninsertRowBefore=Insert Row Above\ninsertRowAfter=Insert Row After\ninsertText=Insert Text\ninserting=Inserting\ninvalidFilename=Diagram names must not contain the following characters:  / | : ; { } < > & + ? = \"\ninvalidLicenseSeeThisPage=Your license is invalid, please see this <a target=\"_blank\" href=\"https://support.draw.io/display/DFCS/Licensing+your+draw.io+plugin\">page</a>.\ninvalidName=Invalid name\ninvalidOrMissingFile=Invalid or missing file\ninvalidPublicUrl=Invalid public URL\nisometric=Isometric\nios=iOS\nitalic=Italic\nkennedy=Kennedy\nkeyboardShortcuts=Keyboard Shortcuts\nlayers=Layers\nlandscape=Landscape\nlanguage=Language\nleanMapping=Lean Mapping\nlastChange=Last change {1} ago\nlessThanAMinute=less than a minute\nlicensingError=Licensing Error\nlicenseHasExpired=The license for {1} has expired on {2}. Click here.\nlicenseWillExpire=The license for {1} will expire on {2}. Click here.\nlineJumps=Line jumps\nlinkAccountRequired=If the diagram is not public a Google account is required to view the link.\nlinkText=Link Text\nlist=List\nminute=minute\nminutes=minutes\nhours=hours\ndays=days\nmonths=months\nyears=years\nrestartForChangeRequired=Changes will take effect after page refresh.\nlaneColor=Lanecolor\nlastModified=Last modified\nlayout=Layout\nleft=Left\nleftAlign=Left Align\nleftToRight=Left to right\nlibraryTooltip=Drag and drop shapes here or click + to insert. Double click to edit.\nlightbox=Lightbox\nline=Line\nlineend=Line end\nlineheight=Line Height\nlinestart=Line start\nlinewidth=Linewidth\nlink=Link\nlinks=Links\nloading=Loading\nlockUnlock=Lock/Unlock\nloggedOut=Logged Out\nlogIn=log in\nloveIt=I love {1}\nlucidchart=Lucidchart\nmathematicalTypesetting=Mathematical Typesetting\nmakeCopy=Make a Copy\nmanual=Manual\nmiddle=Middle\nmisc=Misc\nmockups=Mockups\nmodificationDate=Modification date\nmodifiedBy=Modified by\nmore=More\nmoreResults=More Results\nmoreShapes=More Shapes\nmove=Move\nmoveToFolder=Move to Folder\nmoving=Moving\nmoveSelectionTo=Move selection to {1}\nname=Name\nnavigation=Navigation\nnetworking=Networking\nnew=New\nnewLibrary=New Library\nnextPage=Next Page\nnoAttachments=No attachments found\nnoColor=No Color\nnoFiles=No Files\nnoFileSelected=No file selected\nnoLibraries=No libraries found\nnoMoreResults=No more results\nnone=None\nnoOtherViewers=No other viewers\nnoPlugins=No plugins\nnoPreview=No preview\nnoResponse=No response from server\nnoResultsFor=No results for '{1}'\nnoRevisions=No revisions\nnoSearchResults=No search results found\nnoPageContentOrNotSaved=No anchors found on this page or it hasn't been saved yet\nnormal=Normal\nnorth=North\nnotADiagramFile=Not a diagram file\nnotALibraryFile=Not a library file\nnotAvailable=Not available\nnotAUtf8File=Not a UTF-8 file\nnotConnected=Not connected\nnote=Note\nnotUsingService=Not using {1}?\nnumberedList=Numbered list\noffline=Offline\nok=OK\noneDrive=OneDrive\nonline=Online\nopacity=Opacity\nopen=Open\nopenArrow=Open Arrow\nopenExistingDiagram=Open Existing Diagram\nopenFile=Open File\nopenFrom=Open from\nopenLibrary=Open Library\nopenLibraryFrom=Open Library from\nopenLink=Open Link\nopenInNewWindow=Open in New Window\nopenInThisWindow=Open in This Window\nopenIt=Open {1}\nopenRecent=Open Recent\nopenSupported=Supported formats are files saved from this software (.xml), .vsdx and .gliffy\noptions=Options\norganic=Organic\northogonal=Orthogonal\notherViewer=other viewer\notherViewers=other viewers\noutline=Outline\noval=Oval\npage=Page\npageContent=Page Content\npageNotFound=Page not found\npageWithNumber=Page-{1}\npages=Pages\npageView=Page View\npageSetup=Page Setup\npageScale=Page Scale\npan=Pan\npanTooltip=Space+Drag to pan\npaperSize=Paper Size\npattern=Pattern\npaste=Paste\npasteHere=Paste here\npasteStyle=Paste Style\nperimeter=Perimeter\npermissionAnyone=Anyone can edit\npermissionAuthor=Only I can edit\npickFolder=Pick a folder\npickLibraryDialogTitle=Select Library\npublicDiagramUrl=Public URL of the diagram\nplaceholders=Placeholders\nplantUml=PlantUML\nplugins=Plugins\npluginUrl=Plugin URL\npluginWarning=The page has requested to load the following plugin(s):\n \n {1}\n \n Would you like to load these plugin(s) now?\n \n NOTE : Only allow plugins to run if you fully understand the security implications of doing so.\n\nplusTooltip=Click to connect and clone (ctrl+click to clone, shift+click to connect). Drag to connect (ctrl+drag to clone).\nportrait=Portrait\nposition=Position\nposterPrint=Poster Print\npreferences=Preferences\npreview=Preview\npreviousPage=Previous Page\nprint=Print\nprintAllPages=Print All Pages\nprocEng=Proc. Eng.\nproject=Project\npriority=Priority\nproperties=Properties\npublish=Publish\nquickStart=Quick Start Video\nrack=Rack\nradialTree=Radial Tree\nreadOnly=Read-only\nreconnecting=Reconnecting\nrecentlyUpdated=Recently Updated\nrecentlyViewed=Recently Viewed\nredirectToNewApp=This file was created or modified in a newer version of this app. You will be redirected now.\nrealtimeTimeout=It looks like you've made a few changes while offline. We're sorry, these changes cannot be saved.\nredo=Redo\nrefresh=Refresh\nregularExpression=Regular Expression\nrelativeUrlNotAllowed=Relative URL not allowed\nrememberMe=Remember me\nrememberThisSetting=Remember this setting\nremoveFormat=Clear Formatting\nremoveFromGroup=Remove from Group\nremoveIt=Remove {1}\nremoveWaypoint=Remove Waypoint\nrename=Rename\nrenamed=Renamed\nrenameIt=Rename {1}\nrenaming=Renaming\nreplace=Replace\nreplaceIt={1} already exists. Do you want to replace it?\nreplaceExistingDrawing=Replace existing drawing\nrequired=required\nreset=Reset\nresetView=Reset View\nresize=Resize\nresizeLargeImages=Do you want to resize large images to make the application run faster?\nretina=Retina\nresponsive=Responsive\nrestore=Restore\nrestoring=Restoring\nretryingIn=Retrying in {1} second(s)\nretryingLoad=Load failed. Retrying...\nretryingLogin=Login time out. Retrying...\nreverse=Reverse\nrevision=Revision\nrevisionHistory=Revision History\nright=Right\nrightAlign=Right Align\nrightToLeft=Right to left\nrotate=Rotate\nrotateTooltip=Click and drag to rotate, click to turn by 90 degrees\nrotation=Rotation\nrounded=Rounded\nsave=Save\nsaveAndExit=Save & Exit\nsaveAs=Save as\nsaveAsXmlFile=Save as XML file?\nsaved=Saved\nsaveDiagramsTo=Save diagrams to\nsaveLibrary403=Insufficient permissions to edit this library\nsaveLibrary500=There was an error while saving the library\nsaving=Saving\nscratchpad=Scratchpad\nscrollbars=Scrollbars\nsearch=Search\nsearchShapes=Search Shapes\nselectAll=Select All\nselectionOnly=Selection Only\nselectCard=Select Card\nselectEdges=Select Edges\nselectFile=Select File\nselectFolder=Select Folder\nselectFont=Select Font\nselectNone=Select None\nselectVertices=Select Vertices\nsendMessage=Send\nsendYourFeedbackToDrawIo=Send your feedback to draw.io\nserviceUnavailableOrBlocked=Service unavailable or blocked\nsessionExpired=Your session has expired. Please refresh the browser window.\nsessionTimeoutOnSave=Your session has timed out and you have been disconnected from the Google Drive. Press OK to login and save. \nsetAsDefaultStyle=Set as Default Style\nshadow=Shadow\nshape=Shape\nshapes=Shapes\nshare=Share\nshareLink=Link for shared editing\nsharp=Sharp\nshow=Show\nshowStartScreen=Show Start Screen\nsidebarTooltip=Click to expand. Drag and drop shapes into the diagram. Shift+click to change selection. Alt+click to insert and connect.\nsigns=Signs\nsignOut=Sign out\nsimple=Simple\nsimpleArrow=Simple Arrow\nsize=Size\nsolid=Solid\nsourceSpacing=Source Spacing\nsouth=South\nsoftware=Software\nspace=Space\nspacing=Spacing\nspecialLink=Special Link\nstandard=Standard\nstarting=Starting\nstraight=Straight\nstrokeColor=Line Color\nstyle=Style\nsubscript=Subscript\nsummary=Summary\nsuperscript=Superscript\nsupport=Support\nsysml=SysML\ntags=Tags\ntable=Table\ntargetSpacing=Target Spacing\ntemplate=Template\ntemplates=Templates\ntext=Text\ntextAlignment=Text Alignment\ntextOpacity=Text Opacity\ntheme=Theme\ntimeout=Timeout\ntitle=Title\nto=to\ntoBack=To Back\ntoFront=To Front\ntooltips=Tooltips\ntop=Top\ntopAlign=Top Align\ntopLeft=Top Left\ntopRight=Top Right\ntransparent=Transparent\ntransparentBackground=Transparent Background\ntrello=Trello\ntryAgain=Try again\ntryOpeningViaThisPage=Try opening via this page.\nturn=Rotate 90°\ntype=Type\ntwitter=Twitter\numl=UML\nunderline=Underline\nundo=Undo\nungroup=Ungroup\nunsavedChanges=Unsaved changes\nunsavedChangesClickHereToSave=Unsaved changes. Click here to save.\nuntitled=Untitled\nuntitledDiagram=Untitled Diagram\nuntitledLayer=Untitled Layer\nuntitledLibrary=Untitled Library\nunknownError=Unknown error\nupdateFile=Update {1}\nupdatingDocument=Updating Document. Please wait...\nupdatingPreview=Updating Preview. Please wait...\nupdatingSelection=Updating Selection. Please wait...\nupload=Upload\nurl=URL\nuserManual=User Manual\nvertical=Vertical\nverticalFlow=Vertical Flow\nverticalTree=Vertical Tree\nview=View\nviewUrl=Link to view: {1}\nvoiceAssistant=Voice Assistant (beta)\nwarning=Warning\nwaypoints=Waypoints\nwest=West\nwidth=Width\nwiki=Wiki\nwordWrap=Word Wrap\nwritingDirection=Writing Direction\nyourEmailAddress=Your email address\nzoom=Zoom\nzoomIn=Zoom In\nzoomOut=Zoom Out\nbasic=Basic\nbusinessprocess=Business Processes\ncharts=Charts\nengineering=Engineering\nflowcharts=Flowcharts\ngmdl=Material Design\nmindmaps=Mindmaps\nmockups=Mockups\nnetworkdiagrams=Network Diagrams\nnothingIsSelected=Nothing is selected\nother=Other\nsoftwaredesign=Software Design\nvenndiagrams=Venn Diagrams\nwebEmailOrOther=Web, email or any other internet address\nwebLink=Web Link\nwireframes=Wireframes\n");Graph.prototype.defaultThemes[Graph.prototype.defaultThemeName]=mxUtils.parseXml('<mxStylesheet><add as="defaultVertex"><add as="shape" value="label"/><add as="perimeter" value="rectanglePerimeter"/><add as="fontSize" value="12"/><add as="fontFamily" value="Helvetica"/><add as="align" value="center"/><add as="verticalAlign" value="middle"/><add as="fillColor" value="#ffffff"/><add as="strokeColor" value="#000000"/><add as="fontColor" value="#000000"/></add><add as="defaultEdge"><add as="shape" value="connector"/><add as="labelBackgroundColor" value="#ffffff"/><add as="endArrow" value="classic"/><add as="fontSize" value="11"/><add as="fontFamily" value="Helvetica"/><add as="align" value="center"/><add as="verticalAlign" value="middle"/><add as="rounded" value="1"/><add as="strokeColor" value="#000000"/><add as="fontColor" value="#000000"/></add><add as="fancy"><add as="shadow" value="1"/><add as="glass" value="1"/></add><add as="gray" extend="fancy"><add as="gradientColor" value="#B3B3B3"/><add as="fillColor" value="#F5F5F5"/><add as="strokeColor" value="#666666"/></add><add as="blue" extend="fancy"><add as="gradientColor" value="#7EA6E0"/><add as="fillColor" value="#DAE8FC"/><add as="strokeColor" value="#6C8EBF"/></add><add as="green" extend="fancy"><add as="gradientColor" value="#97D077"/><add as="fillColor" value="#D5E8D4"/><add as="strokeColor" value="#82B366"/></add><add as="turquoise" extend="fancy"><add as="gradientColor" value="#67AB9F"/><add as="fillColor" value="#D5E8D4"/><add as="strokeColor" value="#6A9153"/></add><add as="yellow" extend="fancy"><add as="gradientColor" value="#FFD966"/><add as="fillColor" value="#FFF2CC"/><add as="strokeColor" value="#D6B656"/></add><add as="orange" extend="fancy"><add as="gradientColor" value="#FFA500"/><add as="fillColor" value="#FFCD28"/><add as="strokeColor" value="#D79B00"/></add><add as="red" extend="fancy"><add as="gradientColor" value="#EA6B66"/><add as="fillColor" value="#F8CECC"/><add as="strokeColor" value="#B85450"/></add><add as="pink" extend="fancy"><add as="gradientColor" value="#B5739D"/><add as="fillColor" value="#E6D0DE"/><add as="strokeColor" value="#996185"/></add><add as="purple" extend="fancy"><add as="gradientColor" value="#8C6C9C"/><add as="fillColor" value="#E1D5E7"/><add as="strokeColor" value="#9673A6"/></add><add as="plain-gray"><add as="gradientColor" value="#B3B3B3"/><add as="fillColor" value="#F5F5F5"/><add as="strokeColor" value="#666666"/></add><add as="plain-blue"><add as="gradientColor" value="#7EA6E0"/><add as="fillColor" value="#DAE8FC"/><add as="strokeColor" value="#6C8EBF"/></add><add as="plain-green"><add as="gradientColor" value="#97D077"/><add as="fillColor" value="#D5E8D4"/><add as="strokeColor" value="#82B366"/></add><add as="plain-turquoise"><add as="gradientColor" value="#67AB9F"/><add as="fillColor" value="#D5E8D4"/><add as="strokeColor" value="#6A9153"/></add><add as="plain-yellow"><add as="gradientColor" value="#FFD966"/><add as="fillColor" value="#FFF2CC"/><add as="strokeColor" value="#D6B656"/></add><add as="plain-orange"><add as="gradientColor" value="#FFA500"/><add as="fillColor" value="#FFCD28"/><add as="strokeColor" value="#D79B00"/></add><add as="plain-red"><add as="gradientColor" value="#EA6B66"/><add as="fillColor" value="#F8CECC"/><add as="strokeColor" value="#B85450"/></add><add as="plain-pink"><add as="gradientColor" value="#B5739D"/><add as="fillColor" value="#E6D0DE"/><add as="strokeColor" value="#996185"/></add><add as="plain-purple"><add as="gradientColor" value="#8C6C9C"/><add as="fillColor" value="#E1D5E7"/><add as="strokeColor" value="#9673A6"/></add><add as="text"><add as="fillColor" value="none"/><add as="gradientColor" value="none"/><add as="strokeColor" value="none"/><add as="align" value="left"/><add as="verticalAlign" value="top"/></add><add as="label"><add as="fontStyle" value="1"/><add as="align" value="left"/><add as="verticalAlign" value="middle"/><add as="spacing" value="2"/><add as="spacingLeft" value="52"/><add as="imageWidth" value="42"/><add as="imageHeight" value="42"/><add as="rounded" value="1"/></add><add as="icon" extend="label"><add as="align" value="center"/><add as="imageAlign" value="center"/><add as="verticalLabelPosition" value="bottom"/><add as="verticalAlign" value="top"/><add as="spacingTop" value="4"/><add as="labelBackgroundColor" value="#ffffff"/><add as="spacing" value="0"/><add as="spacingLeft" value="0"/><add as="spacingTop" value="6"/><add as="fontStyle" value="0"/><add as="imageWidth" value="48"/><add as="imageHeight" value="48"/></add><add as="swimlane"><add as="shape" value="swimlane"/><add as="fontSize" value="12"/><add as="fontStyle" value="1"/><add as="startSize" value="23"/></add><add as="group"><add as="verticalAlign" value="top"/><add as="fillColor" value="none"/><add as="strokeColor" value="none"/><add as="gradientColor" value="none"/><add as="pointerEvents" value="0"/></add><add as="ellipse"><add as="shape" value="ellipse"/><add as="perimeter" value="ellipsePerimeter"/></add><add as="rhombus"><add as="shape" value="rhombus"/><add as="perimeter" value="rhombusPerimeter"/></add><add as="triangle"><add as="shape" value="triangle"/><add as="perimeter" value="trianglePerimeter"/></add><add as="line"><add as="shape" value="line"/><add as="strokeWidth" value="4"/><add as="labelBackgroundColor" value="#ffffff"/><add as="verticalAlign" value="top"/><add as="spacingTop" value="8"/></add><add as="image"><add as="shape" value="image"/><add as="labelBackgroundColor" value="white"/><add as="verticalAlign" value="top"/><add as="verticalLabelPosition" value="bottom"/></add><add as="roundImage" extend="image"><add as="perimeter" value="ellipsePerimeter"/></add><add as="rhombusImage" extend="image"><add as="perimeter" value="rhombusPerimeter"/></add><add as="arrow"><add as="shape" value="arrow"/><add as="edgeStyle" value="none"/><add as="fillColor" value="#ffffff"/></add></mxStylesheet>').documentElement;GraphViewer=function(a,b,e){this.init(a,b,e)};mxUtils.extend(GraphViewer,mxEventSource);GraphViewer.prototype.editBlankUrl="https://www.draw.io/";GraphViewer.prototype.imageBaseUrl="https://www.draw.io/";GraphViewer.prototype.toolbarHeight="BackCompat"==document.compatMode?28:30;GraphViewer.prototype.lightboxChrome=!0;GraphViewer.prototype.lightboxZIndex=999;GraphViewer.prototype.toolbarZIndex=999;GraphViewer.prototype.imageBaseUrl="https://www.draw.io/";GraphViewer.prototype.autoFit=!0;
 GraphViewer.prototype.allowZoomIn=!1;GraphViewer.prototype.showTitleAsTooltip=!1;GraphViewer.prototype.checkVisibleState=!0;
 GraphViewer.prototype.init=function(a,b,e){this.graphConfig=null!=e?e:{};this.autoFit=null!=this.graphConfig["auto-fit"]?this.graphConfig["auto-fit"]:this.autoFit;this.allowZoomIn=null!=this.graphConfig["allow-zoom-in"]?this.graphConfig["allow-zoom-in"]:this.allowZoomIn;this.checkVisibleState=null!=this.graphConfig["check-visible-state"]?this.graphConfig["check-visible-state"]:this.checkVisibleState;this.toolbarItems=null!=this.graphConfig.toolbar?this.graphConfig.toolbar.split(" "):[];this.zoomEnabled=
 0<=mxUtils.indexOf(this.toolbarItems,"zoom");this.layersEnabled=0<=mxUtils.indexOf(this.toolbarItems,"layers");this.lightboxEnabled=0<=mxUtils.indexOf(this.toolbarItems,"lightbox");this.lightboxClickEnabled=0!=this.graphConfig.lightbox;this.initialWidth=null!=a?a.style.width:null;this.widthIsEmpty=null!=this.initialWidth?""==this.initialWidth:!0;this.currentPage=parseInt(this.graphConfig.page)||0;this.editor=null;if(null!=b&&(this.xmlDocument=b.ownerDocument,this.xmlNode=b,this.xml=mxUtils.getXml(b),
 null!=a)){this.graph=new Graph(a);this.graph.transparentBackground=!1;this.graphConfig.move&&(this.graph.isMoveCellsEvent=function(a){return!0});this.lightboxClickEnabled&&(a.style.cursor="pointer");this.editor=new Editor(!0,null,null,this.graph);this.editor.editBlankUrl=this.editBlankUrl;this.graph.lightbox=!0;this.graph.centerZoom=!1;this.graph.autoExtend=!1;this.graph.autoScroll=!1;this.graph.setEnabled(!1);var d=this;this.graph.getImageFromBundles=function(a){return d.getImageUrl(a)};mxClient.IS_SVG&&
-this.editor.graph.addSvgShadow(this.graph.view.canvas.ownerSVGElement,null,!0);if("mxfile"==b.nodeName){var g=b.getElementsByTagName("diagram");if(0<g.length){var l=this.graph.getGlobalVariable,d=this;this.graph.getGlobalVariable=function(a){var b=g[d.currentPage];return"page"==a?b.getAttribute("name")||"Page-"+(d.currentPage+1):"pagenumber"==a?d.currentPage+1:l.apply(this,arguments)}}}this.diagrams=[];var p=null;this.selectPage=function(a){this.currentPage=mxUtils.mod(a,this.diagrams.length);this.updateGraphXml(mxUtils.parseXml(this.graph.decompress(mxUtils.getTextContent(this.diagrams[this.currentPage]))).documentElement)};
-this.selectPageById=function(a){for(var b=0;b<this.diagrams.length;b++)if(this.diagrams[b].getAttribute("id")==a){this.selectPage(b);break}};b=mxUtils.bind(this,function(){if(null==this.xmlNode||"mxfile"!=this.xmlNode.nodeName)this.diagrams=[];this.xmlNode!=p&&(this.diagrams=this.xmlNode.getElementsByTagName("diagram"),p=this.xmlNode)});this.addListener("xmlNodeChanged",b);b();urlParams.page=d.currentPage;var q=mxUtils.bind(this,function(){this.graph.getModel().beginUpdate();try{urlParams.nav=0!=
+this.editor.graph.addSvgShadow(this.graph.view.canvas.ownerSVGElement,null,!0);if("mxfile"==b.nodeName){var h=b.getElementsByTagName("diagram");if(0<h.length){var l=this.graph.getGlobalVariable,d=this;this.graph.getGlobalVariable=function(a){var b=h[d.currentPage];return"page"==a?b.getAttribute("name")||"Page-"+(d.currentPage+1):"pagenumber"==a?d.currentPage+1:l.apply(this,arguments)}}}this.diagrams=[];var n=null;this.selectPage=function(a){this.currentPage=mxUtils.mod(a,this.diagrams.length);this.updateGraphXml(mxUtils.parseXml(this.graph.decompress(mxUtils.getTextContent(this.diagrams[this.currentPage]))).documentElement)};
+this.selectPageById=function(a){for(var b=0;b<this.diagrams.length;b++)if(this.diagrams[b].getAttribute("id")==a){this.selectPage(b);break}};b=mxUtils.bind(this,function(){if(null==this.xmlNode||"mxfile"!=this.xmlNode.nodeName)this.diagrams=[];this.xmlNode!=n&&(this.diagrams=this.xmlNode.getElementsByTagName("diagram"),n=this.xmlNode)});this.addListener("xmlNodeChanged",b);b();urlParams.page=d.currentPage;var q=mxUtils.bind(this,function(){this.graph.getModel().beginUpdate();try{urlParams.nav=0!=
 this.graphConfig.nav?"1":"0",this.editor.setGraphXml(this.xmlNode),this.graph.border=null!=this.graphConfig.border?this.graphConfig.border:8,this.graph.view.scale=this.graphConfig.zoom||1}finally{this.graph.getModel().endUpdate()}this.graph.panningHandler.useLeftButtonForPanning=!0;this.graph.panningHandler.isForcePanningEvent=function(a){return!mxEvent.isPopupTrigger(a.getEvent())&&"auto"==this.graph.container.style.overflow};this.graph.panningHandler.usePopupTrigger=!1;this.graph.panningHandler.pinchEnabled=
 !1;this.graph.panningHandler.ignoreCell=!0;this.graph.setPanning(!1);this.addSizeHandler();this.showLayers(this.graph);this.addClickHandler(this.graph);this.graph.setTooltips(0!=this.graphConfig.tooltips);this.graph.initialViewState={translate:this.graph.view.translate.clone(),scale:this.graph.view.scale};null!=this.graphConfig.toolbar?this.addToolbar():null!=this.graphConfig.title&&this.showTitleAsTooltip&&a.setAttribute("title",this.graphConfig.title)});b=window.MutationObserver||window.WebKitMutationObserver||
 window.MozMutationObserver;if(this.checkVisibleState&&0==a.offsetWidth&&"undefined"!==typeof b){e=this.getObservableParent(a);var c=new b(mxUtils.bind(this,function(b){0<a.offsetWidth&&(c.disconnect(),q())}));c.observe(e,{attributes:!0})}else q()}};GraphViewer.prototype.getObservableParent=function(a){for(a=a.parentNode;a!=document.body&&null!=a.parentNode&&"none"!==mxUtils.getCurrentStyle(a).display;)a=a.parentNode;return a};
@@ -3001,47 +3002,47 @@ GraphViewer.prototype.getImageUrl=function(a){null!=a&&"http://"!=a.substring(0,
 GraphViewer.prototype.setFileNode=function(a){null==this.xmlNode&&(this.xmlDocument=a.ownerDocument,this.xml=mxUtils.getXml(a),this.xmlNode=a);this.setGraphXml(a)};GraphViewer.prototype.updateGraphXml=function(a){this.setGraphXml(a);this.fireEvent(new mxEventObject("graphChanged"))};
 GraphViewer.prototype.setGraphXml=function(a){null!=this.graph&&(this.graph.view.translate=new mxPoint,this.graph.view.scale=1,this.graph.getModel().clear(),this.editor.setGraphXml(a),this.widthIsEmpty?(this.graph.container.style.width="",this.graph.container.style.height=""):this.graph.container.style.width=this.initialWidth,this.positionGraph(),this.graph.initialViewState={translate:this.graph.view.translate.clone(),scale:this.graph.view.scale})};
 GraphViewer.prototype.addSizeHandler=function(){var a=this.graph.container,b=this.graph.getGraphBounds(),e=!1;a.style.overflow="hidden";var d=mxUtils.bind(this,function(){if(!e){e=!0;var b=this.graph.getGraphBounds();a.style.overflow=a.offsetWidth<b.width+this.graph.border?"auto":"hidden";if(null!=this.toolbar){var b=a.getBoundingClientRect(),d=mxUtils.getScrollOrigin(document.body),d="relative"===document.body.style.position?document.body.getBoundingClientRect():{left:-d.x,top:-d.y},b={left:b.left-
-d.left,top:b.top-d.top,bottom:b.bottom-d.top,right:b.right-d.left};this.toolbar.style.left=b.left+"px";"bottom"==this.graphConfig["toolbar-position"]?this.toolbar.style.top=b.bottom-1+"px":"inline"!=this.graphConfig["toolbar-position"]?(this.toolbar.style.width=Math.max(this.minToolbarWidth,a.offsetWidth)+"px",this.toolbar.style.top=b.top+1+"px"):this.toolbar.style.top=b.top+"px"}e=!1}}),g=null,l=!1;this.fitGraph=function(b){var c=a.offsetWidth;c==g||l||(l=!0,this.graph.maxFitScale=null!=b?b:this.graphConfig.zoom||
-(this.allowZoomIn?null:1),this.graph.fit(null,null,null,null,!1,!0),this.graph.maxFitScale=null,b=this.graph.getGraphBounds(),this.updateContainerHeight(a,b.height+2*this.graph.border+1),this.graph.initialViewState={translate:this.graph.view.translate.clone(),scale:this.graph.view.scale},g=c,window.setTimeout(function(){l=!1},0))};GraphViewer.useResizeSensor&&(mxClient.IS_QUIRKS||9>=document.documentMode?(mxEvent.addListener(window,"resize",d),this.graph.addListener("size",d)):new ResizeSensor(this.graph.container,
-d));if(this.graphConfig.resize||(this.zoomEnabled||!this.autoFit)&&0!=this.graphConfig.resize)this.graph.minimumContainerSize=new mxRectangle(0,0,100,this.toolbarHeight),this.graph.resizeContainer=!0;else if(this.widthIsEmpty&&this.updateContainerWidth(a,b.width+2*this.graph.border),this.updateContainerHeight(a,b.height+2*this.graph.border+1),!this.zoomEnabled&&this.autoFit){var p=g=null,d=mxUtils.bind(this,function(){window.clearTimeout(p);l||(p=window.setTimeout(mxUtils.bind(this,this.fitGraph),
+d.left,top:b.top-d.top,bottom:b.bottom-d.top,right:b.right-d.left};this.toolbar.style.left=b.left+"px";"bottom"==this.graphConfig["toolbar-position"]?this.toolbar.style.top=b.bottom-1+"px":"inline"!=this.graphConfig["toolbar-position"]?(this.toolbar.style.width=Math.max(this.minToolbarWidth,a.offsetWidth)+"px",this.toolbar.style.top=b.top+1+"px"):this.toolbar.style.top=b.top+"px"}e=!1}}),h=null,l=!1;this.fitGraph=function(b){var c=a.offsetWidth;c==h||l||(l=!0,this.graph.maxFitScale=null!=b?b:this.graphConfig.zoom||
+(this.allowZoomIn?null:1),this.graph.fit(null,null,null,null,!1,!0),this.graph.maxFitScale=null,b=this.graph.getGraphBounds(),this.updateContainerHeight(a,b.height+2*this.graph.border+1),this.graph.initialViewState={translate:this.graph.view.translate.clone(),scale:this.graph.view.scale},h=c,window.setTimeout(function(){l=!1},0))};GraphViewer.useResizeSensor&&(mxClient.IS_QUIRKS||9>=document.documentMode?(mxEvent.addListener(window,"resize",d),this.graph.addListener("size",d)):new ResizeSensor(this.graph.container,
+d));if(this.graphConfig.resize||(this.zoomEnabled||!this.autoFit)&&0!=this.graphConfig.resize)this.graph.minimumContainerSize=new mxRectangle(0,0,100,this.toolbarHeight),this.graph.resizeContainer=!0;else if(this.widthIsEmpty&&this.updateContainerWidth(a,b.width+2*this.graph.border),this.updateContainerHeight(a,b.height+2*this.graph.border+1),!this.zoomEnabled&&this.autoFit){var n=h=null,d=mxUtils.bind(this,function(){window.clearTimeout(n);l||(n=window.setTimeout(mxUtils.bind(this,this.fitGraph),
 100))});GraphViewer.useResizeSensor&&(mxClient.IS_QUIRKS||9>=document.documentMode?mxEvent.addListener(window,"resize",d):new ResizeSensor(this.graph.container,d))}else mxClient.IS_QUIRKS||9>=document.documentMode||this.graph.addListener("size",d);var q=mxUtils.bind(this,function(){var c=a.style.minWidth;this.widthIsEmpty&&(a.style.minWidth="100%");if(0<a.offsetWidth&&(this.allowZoomIn||b.width+2*this.graph.border>a.offsetWidth||b.height+2*this.graph.border>this.graphConfig["max-height"])){var d=
-null;null!=this.graphConfig["max-height"]&&(d=this.graphConfig["max-height"]/(b.height+2*this.graph.border));this.fitGraph(d)}else this.graph.view.setTranslate(Math.floor((this.graph.border-b.x)/this.graph.view.scale),Math.floor((this.graph.border-b.y)/this.graph.view.scale)),g=a.offsetWidth;a.style.minWidth=c});mxClient.IS_QUIRKS||8==document.documentMode?window.setTimeout(q,0):q();this.positionGraph=function(){b=this.graph.getGraphBounds();g=null;q()}};
+null;null!=this.graphConfig["max-height"]&&(d=this.graphConfig["max-height"]/(b.height+2*this.graph.border));this.fitGraph(d)}else this.graph.view.setTranslate(Math.floor((this.graph.border-b.x)/this.graph.view.scale),Math.floor((this.graph.border-b.y)/this.graph.view.scale)),h=a.offsetWidth;a.style.minWidth=c});mxClient.IS_QUIRKS||8==document.documentMode?window.setTimeout(q,0):q();this.positionGraph=function(){b=this.graph.getGraphBounds();h=null;q()}};
 GraphViewer.prototype.updateContainerWidth=function(a,b){a.style.width=b+"px"};GraphViewer.prototype.updateContainerHeight=function(a,b){if(this.zoomEnabled||!this.autoFit||"BackCompat"==document.compatMode||mxClient.IS_QUIRKS||8==document.documentMode)a.style.height=b+"px"};
-GraphViewer.prototype.showLayers=function(a,b){var e=this.graphConfig.layers;if(null!=e||null!=b)if(e=null!=e?e.split(" "):null,null!=b||0<e.length){var d=null!=b?b.getModel():null,g=a.getModel();g.beginUpdate();try{for(var l=g.getChildCount(g.root),p=0;p<l;p++)g.setVisible(g.getChildAt(g.root,p),null!=b?d.isVisible(d.getChildAt(d.root,p)):!1);if(null==d)for(p=0;p<e.length;p++)g.setVisible(g.getChildAt(g.root,parseInt(e[p])),!0)}finally{g.endUpdate()}}};
+GraphViewer.prototype.showLayers=function(a,b){var e=this.graphConfig.layers;if(null!=e||null!=b)if(e=null!=e?e.split(" "):null,null!=b||0<e.length){var d=null!=b?b.getModel():null,h=a.getModel();h.beginUpdate();try{for(var l=h.getChildCount(h.root),n=0;n<l;n++)h.setVisible(h.getChildAt(h.root,n),null!=b?d.isVisible(d.getChildAt(d.root,n)):!1);if(null==d)for(n=0;n<e.length;n++)h.setVisible(h.getChildAt(h.root,parseInt(e[n])),!0)}finally{h.endUpdate()}}};
 GraphViewer.prototype.addToolbar=function(){function a(a,b,c,d){var f=document.createElement("div");f.style.borderRight="1px solid #d0d0d0";f.style.padding="3px 6px 3px 6px";mxEvent.addListener(f,"click",a);null!=c&&f.setAttribute("title",c);f.style.display=mxClient.IS_QUIRKS?"inline":"inline-block";a=document.createElement("img");a.setAttribute("border","0");a.setAttribute("src",b);null==d||d?(mxEvent.addListener(f,"mouseenter",function(){f.style.backgroundColor="#ddd"}),mxEvent.addListener(f,"mouseleave",
-function(){f.style.backgroundColor="#eee"}),mxUtils.setOpacity(a,60),f.style.cursor="pointer"):mxUtils.setOpacity(f,30);f.appendChild(a);e.appendChild(f);h++;return f}var b=this.graph.container;"bottom"==this.graphConfig["toolbar-position"]?b.style.marginBottom=this.toolbarHeight+"px":"inline"!=this.graphConfig["toolbar-position"]&&(b.style.marginTop=this.toolbarHeight+"px");var e=b.ownerDocument.createElement("div");e.style.position="absolute";e.style.overflow="hidden";e.style.boxSizing="border-box";
-e.style.whiteSpace="nowrap";e.style.zIndex=this.toolbarZIndex;e.style.backgroundColor="#eee";e.style.height=this.toolbarHeight+"px";this.toolbar=e;if("inline"==this.graphConfig["toolbar-position"]){mxUtils.setPrefixedStyle(e.style,"transition","opacity 100ms ease-in-out");mxUtils.setOpacity(e,30);var d=null,g=null,l=mxUtils.bind(this,function(a){null!=d&&(window.clearTimeout(d),fadeThead=null);null!=g&&(window.clearTimeout(g),fadeThead2=null);d=window.setTimeout(mxUtils.bind(this,function(){mxUtils.setOpacity(e,
-0);d=null;g=window.setTimeout(mxUtils.bind(this,function(){e.style.display="none";g=null}),100)}),a||200)}),p=mxUtils.bind(this,function(a){null!=d&&(window.clearTimeout(d),fadeThead=null);null!=g&&(window.clearTimeout(g),fadeThead2=null);e.style.display="";mxUtils.setOpacity(e,a||30)});mxEvent.addListener(this.graph.container,mxClient.IS_POINTER?"pointermove":"mousemove",mxUtils.bind(this,function(a){mxEvent.isTouchEvent(a)||(p(30),l())}));mxEvent.addListener(e,mxClient.IS_POINTER?"pointermove":
-"mousemove",function(a){mxEvent.consume(a)});mxEvent.addListener(e,"mouseenter",mxUtils.bind(this,function(a){p(100)}));mxEvent.addListener(e,"mousemove",mxUtils.bind(this,function(a){p(100);mxEvent.consume(a)}));mxEvent.addListener(e,"mouseleave",mxUtils.bind(this,function(a){mxEvent.isTouchEvent(a)||p(30)}));var q=this.graph,c=q.getTolerance();q.addMouseListener({startX:0,startY:0,scrollLeft:0,scrollTop:0,mouseDown:function(a,b){this.startX=b.getGraphX();this.startY=b.getGraphY();this.scrollLeft=
-q.container.scrollLeft;this.scrollTop=q.container.scrollTop},mouseMove:function(a,b){},mouseUp:function(a,b){mxEvent.isTouchEvent(b.getEvent())&&Math.abs(this.scrollLeft-q.container.scrollLeft)<c&&Math.abs(this.scrollTop-q.container.scrollTop)<c&&Math.abs(this.startX-b.getGraphX())<c&&Math.abs(this.startY-b.getGraphY())<c&&(0<parseFloat(e.style.opacity||0)?l():p(30))}})}for(var f=this.toolbarItems,h=0,m=null,n=null,u=0;u<f.length;u++){var r=f[u];if("pages"==r){n=b.ownerDocument.createElement("div");
-n.style.cssText="display:inline-block;position:relative;padding:3px 4px 0 4px;vertical-align:top;font-family:Helvetica,Arial;font-size:12px;top:4px;cursor:default;";mxUtils.setOpacity(n,70);var k=a(mxUtils.bind(this,function(){this.selectPage(this.currentPage-1)}),Editor.previousImage,mxResources.get("previousPage")||"Previous Page");k.style.borderRightStyle="none";k.style.paddingLeft="0px";k.style.paddingRight="0px";e.appendChild(n);var t=a(mxUtils.bind(this,function(){this.selectPage(this.currentPage+
-1)}),Editor.nextImage,mxResources.get("nextPage")||"Next Page");t.style.paddingLeft="0px";t.style.paddingRight="0px";r=mxUtils.bind(this,function(){n.innerHTML="";mxUtils.write(n,this.currentPage+1+" / "+this.diagrams.length);n.style.display=1<this.diagrams.length?"inline-block":"none";k.style.display=n.style.display;t.style.display=n.style.display});this.addListener("graphChanged",r);r()}else if("zoom"==r)this.zoomEnabled&&(a(mxUtils.bind(this,function(){this.graph.zoomOut()}),Editor.zoomOutImage,
-mxResources.get("zoomOut")||"Zoom Out"),a(mxUtils.bind(this,function(){this.graph.zoomIn()}),Editor.zoomInImage,mxResources.get("zoomIn")||"Zoom In"),a(mxUtils.bind(this,function(){this.graph.view.scaleAndTranslate(this.graph.initialViewState.scale,this.graph.initialViewState.translate.x,this.graph.initialViewState.translate.y)}),Editor.zoomFitImage,mxResources.get("fit")||"Fit"));else if("layers"==r){if(this.layersEnabled){var v=this.graph.getModel(),x=a(mxUtils.bind(this,function(a){if(null!=m)m.parentNode.removeChild(m),
-m=null;else{m=this.graph.createLayersDialog();mxEvent.addListener(m,"mouseleave",function(){m.parentNode.removeChild(m);m=null});a=x.getBoundingClientRect();m.style.width="140px";m.style.padding="2px 0px 2px 0px";m.style.border="1px solid #d0d0d0";m.style.backgroundColor="#eee";m.style.fontFamily="Helvetica Neue,Helvetica,Arial Unicode MS,Arial";m.style.fontSize="11px";m.style.zIndex=this.toolbarZIndex+1;mxUtils.setOpacity(m,80);var b=mxUtils.getDocumentScrollOrigin(document);m.style.left=b.x+a.left+
-"px";m.style.top=b.y+a.bottom+"px";document.body.appendChild(m)}}),Editor.layersImage,mxResources.get("layers")||"Layers");v.addListener(mxEvent.CHANGE,function(){x.style.display=1<v.getChildCount(v.root)?"inline-block":"none"});x.style.display=1<v.getChildCount(v.root)?"inline-block":"none"}}else"lightbox"==r?this.lightboxEnabled&&a(mxUtils.bind(this,function(){this.showLightbox()}),Editor.maximizeImage,mxResources.get("show")||"Show"):null!=this.graphConfig["toolbar-buttons"]&&(r=this.graphConfig["toolbar-buttons"][r],
-null!=r&&a(null==r.enabled||r.enabled?r.handler:function(){},r.image,r.title,r.enabled))}null!=this.graph.minimumContainerSize&&(this.graph.minimumContainerSize.width=34*h);null!=this.graphConfig.title&&(f=b.ownerDocument.createElement("div"),f.style.cssText="display:inline-block;position:relative;padding:3px 6px 0 6px;vertical-align:top;font-family:Helvetica,Arial;font-size:12px;top:4px;cursor:default;",f.setAttribute("title",this.graphConfig.title),mxUtils.write(f,this.graphConfig.title),mxUtils.setOpacity(f,
-70),e.appendChild(f));this.minToolbarWidth=34*h;var w=b.style.border,f=mxUtils.bind(this,function(){var a=b.getBoundingClientRect(),c=mxUtils.getScrollOrigin(document.body),c="relative"===document.body.style.position?document.body.getBoundingClientRect():{left:-c.x,top:-c.y},a={left:a.left-c.left,top:a.top-c.top,bottom:a.bottom-c.top,right:a.right-c.left};e.style.left=a.left+"px";e.style.width="inline"==this.graphConfig["toolbar-position"]?"auto":Math.max(this.minToolbarWidth,b.offsetWidth)+"px";
-e.style.border="1px solid #d0d0d0";"bottom"==this.graphConfig["toolbar-position"]?e.style.top=a.bottom-1+"px":"inline"!=this.graphConfig["toolbar-position"]?(e.style.marginTop=-this.toolbarHeight+"px",e.style.top=a.top+1+"px"):e.style.top=a.top+"px";"1px solid transparent"==w&&(b.style.border="1px solid #d0d0d0");document.body.appendChild(e);var d=mxUtils.bind(this,function(){1!=this.graphConfig["toolbar-nohide"]&&(null!=e.parentNode&&e.parentNode.removeChild(e),null!=m&&(m.parentNode.removeChild(m),
-m=null),b.style.border=w)});mxEvent.addListener(document,"mousemove",function(a){for(a=mxEvent.getSource(a);null!=a;){if(a==b||a==e||a==m)return;a=a.parentNode}d()});mxEvent.addListener(document,"mouseleave",function(a){d()})});mxEvent.addListener(b,"mouseenter",f)};
-GraphViewer.prototype.addClickHandler=function(a,b){a.linkPolicy=this.graphConfig.target||a.linkPolicy;a.addClickHandler(this.graphConfig.highlight,mxUtils.bind(this,function(e,d){if(null==d){var g=mxEvent.getSource(e);"a"==g.nodeName.toLowerCase()&&(d=g.getAttribute("href"))}null!=b?null==d||a.isExternalProtocol(d)||a.isBlankLink(d)||window.setTimeout(function(){b.destroy()},0):null==d||!a.isPageLink(d)||!mxEvent.isTouchEvent(e)&&mxEvent.isPopupTrigger(e)||(g=d.indexOf(","),0<g&&(g=d.substring(g+
-1),this.selectPageById(g),mxEvent.consume(e)))}),mxUtils.bind(this,function(a){null!=b||!this.lightboxClickEnabled||mxEvent.isTouchEvent(a)&&0!=this.toolbarItems.length||this.showLightbox()}))};
+function(){f.style.backgroundColor="#eee"}),mxUtils.setOpacity(a,60),f.style.cursor="pointer"):mxUtils.setOpacity(f,30);f.appendChild(a);e.appendChild(f);g++;return f}var b=this.graph.container;"bottom"==this.graphConfig["toolbar-position"]?b.style.marginBottom=this.toolbarHeight+"px":"inline"!=this.graphConfig["toolbar-position"]&&(b.style.marginTop=this.toolbarHeight+"px");var e=b.ownerDocument.createElement("div");e.style.position="absolute";e.style.overflow="hidden";e.style.boxSizing="border-box";
+e.style.whiteSpace="nowrap";e.style.zIndex=this.toolbarZIndex;e.style.backgroundColor="#eee";e.style.height=this.toolbarHeight+"px";this.toolbar=e;if("inline"==this.graphConfig["toolbar-position"]){mxUtils.setPrefixedStyle(e.style,"transition","opacity 100ms ease-in-out");mxUtils.setOpacity(e,30);var d=null,h=null,l=mxUtils.bind(this,function(a){null!=d&&(window.clearTimeout(d),fadeThead=null);null!=h&&(window.clearTimeout(h),fadeThead2=null);d=window.setTimeout(mxUtils.bind(this,function(){mxUtils.setOpacity(e,
+0);d=null;h=window.setTimeout(mxUtils.bind(this,function(){e.style.display="none";h=null}),100)}),a||200)}),n=mxUtils.bind(this,function(a){null!=d&&(window.clearTimeout(d),fadeThead=null);null!=h&&(window.clearTimeout(h),fadeThead2=null);e.style.display="";mxUtils.setOpacity(e,a||30)});mxEvent.addListener(this.graph.container,mxClient.IS_POINTER?"pointermove":"mousemove",mxUtils.bind(this,function(a){mxEvent.isTouchEvent(a)||(n(30),l())}));mxEvent.addListener(e,mxClient.IS_POINTER?"pointermove":
+"mousemove",function(a){mxEvent.consume(a)});mxEvent.addListener(e,"mouseenter",mxUtils.bind(this,function(a){n(100)}));mxEvent.addListener(e,"mousemove",mxUtils.bind(this,function(a){n(100);mxEvent.consume(a)}));mxEvent.addListener(e,"mouseleave",mxUtils.bind(this,function(a){mxEvent.isTouchEvent(a)||n(30)}));var q=this.graph,c=q.getTolerance();q.addMouseListener({startX:0,startY:0,scrollLeft:0,scrollTop:0,mouseDown:function(a,b){this.startX=b.getGraphX();this.startY=b.getGraphY();this.scrollLeft=
+q.container.scrollLeft;this.scrollTop=q.container.scrollTop},mouseMove:function(a,b){},mouseUp:function(a,b){mxEvent.isTouchEvent(b.getEvent())&&Math.abs(this.scrollLeft-q.container.scrollLeft)<c&&Math.abs(this.scrollTop-q.container.scrollTop)<c&&Math.abs(this.startX-b.getGraphX())<c&&Math.abs(this.startY-b.getGraphY())<c&&(0<parseFloat(e.style.opacity||0)?l():n(30))}})}for(var f=this.toolbarItems,g=0,p=null,m=null,u=0;u<f.length;u++){var r=f[u];if("pages"==r){m=b.ownerDocument.createElement("div");
+m.style.cssText="display:inline-block;position:relative;padding:3px 4px 0 4px;vertical-align:top;font-family:Helvetica,Arial;font-size:12px;top:4px;cursor:default;";mxUtils.setOpacity(m,70);var k=a(mxUtils.bind(this,function(){this.selectPage(this.currentPage-1)}),Editor.previousImage,mxResources.get("previousPage")||"Previous Page");k.style.borderRightStyle="none";k.style.paddingLeft="0px";k.style.paddingRight="0px";e.appendChild(m);var v=a(mxUtils.bind(this,function(){this.selectPage(this.currentPage+
+1)}),Editor.nextImage,mxResources.get("nextPage")||"Next Page");v.style.paddingLeft="0px";v.style.paddingRight="0px";r=mxUtils.bind(this,function(){m.innerHTML="";mxUtils.write(m,this.currentPage+1+" / "+this.diagrams.length);m.style.display=1<this.diagrams.length?"inline-block":"none";k.style.display=m.style.display;v.style.display=m.style.display});this.addListener("graphChanged",r);r()}else if("zoom"==r)this.zoomEnabled&&(a(mxUtils.bind(this,function(){this.graph.zoomOut()}),Editor.zoomOutImage,
+mxResources.get("zoomOut")||"Zoom Out"),a(mxUtils.bind(this,function(){this.graph.zoomIn()}),Editor.zoomInImage,mxResources.get("zoomIn")||"Zoom In"),a(mxUtils.bind(this,function(){this.graph.view.scaleAndTranslate(this.graph.initialViewState.scale,this.graph.initialViewState.translate.x,this.graph.initialViewState.translate.y)}),Editor.zoomFitImage,mxResources.get("fit")||"Fit"));else if("layers"==r){if(this.layersEnabled){var t=this.graph.getModel(),x=a(mxUtils.bind(this,function(a){if(null!=p)p.parentNode.removeChild(p),
+p=null;else{p=this.graph.createLayersDialog();mxEvent.addListener(p,"mouseleave",function(){p.parentNode.removeChild(p);p=null});a=x.getBoundingClientRect();p.style.width="140px";p.style.padding="2px 0px 2px 0px";p.style.border="1px solid #d0d0d0";p.style.backgroundColor="#eee";p.style.fontFamily="Helvetica Neue,Helvetica,Arial Unicode MS,Arial";p.style.fontSize="11px";p.style.zIndex=this.toolbarZIndex+1;mxUtils.setOpacity(p,80);var b=mxUtils.getDocumentScrollOrigin(document);p.style.left=b.x+a.left+
+"px";p.style.top=b.y+a.bottom+"px";document.body.appendChild(p)}}),Editor.layersImage,mxResources.get("layers")||"Layers");t.addListener(mxEvent.CHANGE,function(){x.style.display=1<t.getChildCount(t.root)?"inline-block":"none"});x.style.display=1<t.getChildCount(t.root)?"inline-block":"none"}}else"lightbox"==r?this.lightboxEnabled&&a(mxUtils.bind(this,function(){this.showLightbox()}),Editor.maximizeImage,mxResources.get("show")||"Show"):null!=this.graphConfig["toolbar-buttons"]&&(r=this.graphConfig["toolbar-buttons"][r],
+null!=r&&a(null==r.enabled||r.enabled?r.handler:function(){},r.image,r.title,r.enabled))}null!=this.graph.minimumContainerSize&&(this.graph.minimumContainerSize.width=34*g);null!=this.graphConfig.title&&(f=b.ownerDocument.createElement("div"),f.style.cssText="display:inline-block;position:relative;padding:3px 6px 0 6px;vertical-align:top;font-family:Helvetica,Arial;font-size:12px;top:4px;cursor:default;",f.setAttribute("title",this.graphConfig.title),mxUtils.write(f,this.graphConfig.title),mxUtils.setOpacity(f,
+70),e.appendChild(f));this.minToolbarWidth=34*g;var w=b.style.border,f=mxUtils.bind(this,function(){var a=b.getBoundingClientRect(),c=mxUtils.getScrollOrigin(document.body),c="relative"===document.body.style.position?document.body.getBoundingClientRect():{left:-c.x,top:-c.y},a={left:a.left-c.left,top:a.top-c.top,bottom:a.bottom-c.top,right:a.right-c.left};e.style.left=a.left+"px";e.style.width="inline"==this.graphConfig["toolbar-position"]?"auto":Math.max(this.minToolbarWidth,b.offsetWidth)+"px";
+e.style.border="1px solid #d0d0d0";"bottom"==this.graphConfig["toolbar-position"]?e.style.top=a.bottom-1+"px":"inline"!=this.graphConfig["toolbar-position"]?(e.style.marginTop=-this.toolbarHeight+"px",e.style.top=a.top+1+"px"):e.style.top=a.top+"px";"1px solid transparent"==w&&(b.style.border="1px solid #d0d0d0");document.body.appendChild(e);var d=mxUtils.bind(this,function(){1!=this.graphConfig["toolbar-nohide"]&&(null!=e.parentNode&&e.parentNode.removeChild(e),null!=p&&(p.parentNode.removeChild(p),
+p=null),b.style.border=w)});mxEvent.addListener(document,"mousemove",function(a){for(a=mxEvent.getSource(a);null!=a;){if(a==b||a==e||a==p)return;a=a.parentNode}d()});mxEvent.addListener(document,"mouseleave",function(a){d()})});mxEvent.addListener(b,"mouseenter",f)};
+GraphViewer.prototype.addClickHandler=function(a,b){a.linkPolicy=this.graphConfig.target||a.linkPolicy;a.addClickHandler(this.graphConfig.highlight,mxUtils.bind(this,function(e,d){if(null==d){var h=mxEvent.getSource(e);"a"==h.nodeName.toLowerCase()&&(d=h.getAttribute("href"))}null!=b?null==d||a.isExternalProtocol(d)||a.isBlankLink(d)||window.setTimeout(function(){b.destroy()},0):null==d||!a.isPageLink(d)||!mxEvent.isTouchEvent(e)&&mxEvent.isPopupTrigger(e)||(h=d.indexOf(","),0<h&&(h=d.substring(h+
+1),this.selectPageById(h),mxEvent.consume(e)))}),mxUtils.bind(this,function(a){null!=b||!this.lightboxClickEnabled||mxEvent.isTouchEvent(a)&&0!=this.toolbarItems.length||this.showLightbox()}))};
 GraphViewer.prototype.showLightbox=function(a,b,e){if("open"==this.graphConfig.lightbox||window.self!==window.top)if(null==this.lightboxWindow||this.lightboxWindow.closed){a=null!=a?a:null!=this.graphConfig.editable?this.graphConfig.editable:!0;e={client:1,lightbox:1,target:null!=e?e:"blank"};a&&(e.edit=this.graphConfig.edit||"_blank");if(null!=b?b:1)e.close=1;this.layersEnabled&&(e.layers=1);null!=this.graphConfig&&0!=this.graphConfig.nav&&(e.nav=1);null!=this.graphConfig&&null!=this.graphConfig.highlight&&
 (e.highlight=this.graphConfig.highlight.substring(1));null!=this.currentPage&&0<this.currentPage&&(e.page=this.currentPage);"undefined"!==typeof window.postMessage&&(null==document.documentMode||10<=document.documentMode)?null==this.lightboxWindow&&mxEvent.addListener(window,"message",mxUtils.bind(this,function(a){"ready"==a.data&&a.source==this.lightboxWindow&&this.lightboxWindow.postMessage(this.xml,"*")})):e.data=encodeURIComponent(this.xml);a="www.draw.io";"1"==urlParams.dev&&(e.dev="1",e.drawdev=
 "1",a="test.draw.io");this.lightboxWindow=window.open("https://"+a+"/#P"+encodeURIComponent(JSON.stringify(e)))}else this.lightboxWindow.focus();else this.showLocalLightbox()};
 GraphViewer.prototype.showLocalLightbox=function(){var a=mxUtils.getDocumentScrollOrigin(document),b=document.createElement("div");mxClient.IS_QUIRKS?(b.style.position="absolute",b.style.left=a.x+"px",b.style.top=a.y+"px",b.style.width=document.body.offsetWidth+"px",b.style.height=document.body.offsetHeight+"px"):b.style.cssText="position:fixed;top:0;left:0;bottom:0;right:0;";b.style.zIndex=this.lightboxZIndex;b.style.backgroundColor="#000000";mxUtils.setOpacity(b,70);document.body.appendChild(b);
 var e=document.createElement("img");e.setAttribute("border","0");e.setAttribute("src",Editor.closeImage);mxClient.IS_QUIRKS?(e.style.position="absolute",e.style.right="32px",e.style.top=a.y+32+"px"):e.style.cssText="position:fixed;top:32px;right:32px;";e.style.cursor="pointer";mxEvent.addListener(e,"click",function(){d.destroy()});urlParams.pages="1";urlParams.page=this.currentPage;urlParams.nav=0!=this.graphConfig.nav?"1":"0";urlParams.layers=this.layersEnabled?"1":"0";if(null==document.documentMode||
 10<=document.documentMode)Editor.prototype.editButtonLink=this.graphConfig.edit;EditorUi.prototype.updateActionStates=function(){};EditorUi.prototype.addBeforeUnloadListener=function(){};EditorUi.prototype.addChromelessClickHandler=function(){};Graph.prototype.shadowId="lightboxDropShadow";var d=new EditorUi(new Editor(!0),document.createElement("div"),!0);d.editor.editBlankUrl=this.editBlankUrl;Graph.prototype.shadowId="dropShadow";d.refresh=function(){};mxEvent.addListener(b,"click",function(){d.destroy()});
-var g=mxUtils.bind(this,function(a){27==a.keyCode&&d.destroy()}),l=d.destroy;d.destroy=function(){mxEvent.removeListener(document.documentElement,"keydown",g);document.body.removeChild(b);document.body.removeChild(e);document.body.style.overflow="auto";GraphViewer.resizeSensorEnabled=!0;l.apply(this,arguments)};var p=d.editor.graph,q=p.container;q.style.overflow="hidden";this.lightboxChrome?(q.style.border="1px solid #c0c0c0",q.style.margin="40px",mxEvent.addListener(document.documentElement,"keydown",
-g)):(b.style.display="none",e.style.display="none");var c=this;p.getImageFromBundles=function(a){return c.getImageUrl(a)};var f=d.createTemporaryGraph;d.createTemporaryGraph=function(){var a=f.apply(this,arguments);a.getImageFromBundles=function(a){return c.getImageUrl(a)};return a};this.graphConfig.move&&(p.isMoveCellsEvent=function(a){return!0});mxClient.IS_QUIRKS||(mxUtils.setPrefixedStyle(q.style,"border-radius","4px"),q.style.position="fixed");GraphViewer.resizeSensorEnabled=!1;document.body.style.overflow=
-"hidden";mxClient.IS_SF||(mxUtils.setPrefixedStyle(q.style,"transform","rotateY(90deg)"),mxUtils.setPrefixedStyle(q.style,"transition","all .25s ease-in-out"));this.addClickHandler(p,d);window.setTimeout(mxUtils.bind(this,function(){q.style.outline="none";q.style.zIndex=this.lightboxZIndex;e.style.zIndex=this.lightboxZIndex;document.body.appendChild(q);document.body.appendChild(e);d.setFileData(this.xml);mxUtils.setPrefixedStyle(q.style,"transform","rotateY(0deg)");d.chromelessToolbar.style.bottom=
+var h=mxUtils.bind(this,function(a){27==a.keyCode&&d.destroy()}),l=d.destroy;d.destroy=function(){mxEvent.removeListener(document.documentElement,"keydown",h);document.body.removeChild(b);document.body.removeChild(e);document.body.style.overflow="auto";GraphViewer.resizeSensorEnabled=!0;l.apply(this,arguments)};var n=d.editor.graph,q=n.container;q.style.overflow="hidden";this.lightboxChrome?(q.style.border="1px solid #c0c0c0",q.style.margin="40px",mxEvent.addListener(document.documentElement,"keydown",
+h)):(b.style.display="none",e.style.display="none");var c=this;n.getImageFromBundles=function(a){return c.getImageUrl(a)};var f=d.createTemporaryGraph;d.createTemporaryGraph=function(){var a=f.apply(this,arguments);a.getImageFromBundles=function(a){return c.getImageUrl(a)};return a};this.graphConfig.move&&(n.isMoveCellsEvent=function(a){return!0});mxClient.IS_QUIRKS||(mxUtils.setPrefixedStyle(q.style,"border-radius","4px"),q.style.position="fixed");GraphViewer.resizeSensorEnabled=!1;document.body.style.overflow=
+"hidden";mxClient.IS_SF||(mxUtils.setPrefixedStyle(q.style,"transform","rotateY(90deg)"),mxUtils.setPrefixedStyle(q.style,"transition","all .25s ease-in-out"));this.addClickHandler(n,d);window.setTimeout(mxUtils.bind(this,function(){q.style.outline="none";q.style.zIndex=this.lightboxZIndex;e.style.zIndex=this.lightboxZIndex;document.body.appendChild(q);document.body.appendChild(e);d.setFileData(this.xml);mxUtils.setPrefixedStyle(q.style,"transform","rotateY(0deg)");d.chromelessToolbar.style.bottom=
 "60px";d.chromelessToolbar.style.zIndex=this.lightboxZIndex;document.body.appendChild(d.chromelessToolbar);d.getEditBlankXml=mxUtils.bind(this,function(){return this.xml});mxClient.IS_QUIRKS&&(q.style.position="absolute",q.style.display="block",q.style.left=a.x+"px",q.style.top=a.y+"px",q.style.width=document.body.clientWidth-80+"px",q.style.height=document.body.clientHeight-80+"px",q.style.backgroundColor="white",d.chromelessToolbar.style.display="block",d.chromelessToolbar.style.position="absolute",
-d.chromelessToolbar.style.bottom="",d.chromelessToolbar.style.top=a.y+document.body.clientHeight-100+"px");d.lightboxFit();d.chromelessResize();this.showLayers(p,this.graph)}),0);return d};GraphViewer.processElements=function(a){mxUtils.forEach(GraphViewer.getElementsByClassName(a||"mxgraph"),function(a){try{a.innerHTML="",GraphViewer.createViewerForElement(a)}catch(e){throw a.innerHTML=e.message,e;}})};
-GraphViewer.getElementsByClassName=function(a){if(document.getElementsByClassName){var b=document.getElementsByClassName(a);a=[];for(var e=0;e<b.length;e++)a.push(b[e]);return a}for(var d=document.getElementsByTagName("*"),b=[],e=0;e<d.length;e++){var g=d[e].className;null!=g&&0<g.length&&(g=g.split(" "),0<=mxUtils.indexOf(g,a)&&b.push(d[e]))}return b};
-GraphViewer.createViewerForElement=function(a,b){var e=a.getAttribute("data-mxgraph");if(null!=e){var d=JSON.parse(e),g=function(e){e=mxUtils.parseXml(e);e=new GraphViewer(a,e.documentElement,d);null!=b&&b(e)};null!=d.url?GraphViewer.getUrl(d.url,function(a){g(a)}):g(d.xml)}};
+d.chromelessToolbar.style.bottom="",d.chromelessToolbar.style.top=a.y+document.body.clientHeight-100+"px");d.lightboxFit();d.chromelessResize();this.showLayers(n,this.graph)}),0);return d};GraphViewer.processElements=function(a){mxUtils.forEach(GraphViewer.getElementsByClassName(a||"mxgraph"),function(a){try{a.innerHTML="",GraphViewer.createViewerForElement(a)}catch(e){throw a.innerHTML=e.message,e;}})};
+GraphViewer.getElementsByClassName=function(a){if(document.getElementsByClassName){var b=document.getElementsByClassName(a);a=[];for(var e=0;e<b.length;e++)a.push(b[e]);return a}for(var d=document.getElementsByTagName("*"),b=[],e=0;e<d.length;e++){var h=d[e].className;null!=h&&0<h.length&&(h=h.split(" "),0<=mxUtils.indexOf(h,a)&&b.push(d[e]))}return b};
+GraphViewer.createViewerForElement=function(a,b){var e=a.getAttribute("data-mxgraph");if(null!=e){var d=JSON.parse(e),h=function(e){e=mxUtils.parseXml(e);e=new GraphViewer(a,e.documentElement,d);null!=b&&b(e)};null!=d.url?GraphViewer.getUrl(d.url,function(a){h(a)}):h(d.xml)}};
 GraphViewer.initCss=function(){try{var a=document.createElement("style");a.type="text/css";a.innerHTML="div.mxTooltip {\n-webkit-box-shadow: 3px 3px 12px #C0C0C0;\n-moz-box-shadow: 3px 3px 12px #C0C0C0;\nbox-shadow: 3px 3px 12px #C0C0C0;\nbackground: #FFFFCC;\nborder-style: solid;\nborder-width: 1px;\nborder-color: black;\nfont-family: Arial;\nfont-size: 8pt;\nposition: absolute;\ncursor: default;\npadding: 4px;\ncolor: black;}\ntd.mxPopupMenuIcon div {\nwidth:16px;\nheight:16px;}\nhtml div.mxPopupMenu {\n-webkit-box-shadow:2px 2px 3px #d5d5d5;\n-moz-box-shadow:2px 2px 3px #d5d5d5;\nbox-shadow:2px 2px 3px #d5d5d5;\n_filter:progid:DXImageTransform.Microsoft.DropShadow(OffX=2, OffY=2, Color='#d0d0d0',Positive='true');\nbackground:white;\nposition:absolute;\nborder:3px solid #e7e7e7;\npadding:3px;}\nhtml table.mxPopupMenu {\nborder-collapse:collapse;\nmargin:0px;}\nhtml td.mxPopupMenuItem {\npadding:7px 30px 7px 30px;\nfont-family:Helvetica Neue,Helvetica,Arial Unicode MS,Arial;\nfont-size:10pt;}\nhtml td.mxPopupMenuIcon {\nbackground-color:white;\npadding:0px;}\ntd.mxPopupMenuIcon .geIcon {\npadding:2px;\npadding-bottom:4px;\nmargin:2px;\nborder:1px solid transparent;\nopacity:0.5;\n_width:26px;\n_height:26px;}\ntd.mxPopupMenuIcon .geIcon:hover {\nborder:1px solid gray;\nborder-radius:2px;\nopacity:1;}\nhtml tr.mxPopupMenuItemHover {\nbackground-color: #eeeeee;\ncolor: black;}\ntable.mxPopupMenu hr {\ncolor:#cccccc;\nbackground-color:#cccccc;\nborder:none;\nheight:1px;}\ntable.mxPopupMenu tr {\tfont-size:4pt;}\n.geDialog { font-family:Helvetica Neue,Helvetica,Arial Unicode MS,Arial;\nfont-size:10pt;\nborder:none;\nmargin:0px;}\n.geDialog {\tposition:absolute;\tbackground:white;\toverflow:hidden;\tpadding:30px;\tborder:1px solid #acacac;\t-webkit-box-shadow:0px 0px 2px 2px #d5d5d5;\t-moz-box-shadow:0px 0px 2px 2px #d5d5d5;\tbox-shadow:0px 0px 2px 2px #d5d5d5;\t_filter:progid:DXImageTransform.Microsoft.DropShadow(OffX=2, OffY=2, Color='#d5d5d5', Positive='true');\tz-index: 2;}.geDialogClose {\tposition:absolute;\twidth:9px;\theight:9px;\topacity:0.5;\tcursor:pointer;\t_filter:alpha(opacity=50);}.geDialogClose:hover {\topacity:1;}.geDialogTitle {\tbox-sizing:border-box;\twhite-space:nowrap;\tbackground:rgb(229, 229, 229);\tborder-bottom:1px solid rgb(192, 192, 192);\tfont-size:15px;\tfont-weight:bold;\ttext-align:center;\tcolor:rgb(35, 86, 149);}.geDialogFooter {\tbackground:whiteSmoke;\twhite-space:nowrap;\ttext-align:right;\tbox-sizing:border-box;\tborder-top:1px solid #e5e5e5;\tcolor:darkGray;}\n.geBtn {\tbackground-color: #f5f5f5;\tborder-radius: 2px;\tborder: 1px solid #d8d8d8;\tcolor: #333;\tcursor: default;\tfont-size: 11px;\tfont-weight: bold;\theight: 29px;\tline-height: 27px;\tmargin: 0 0 0 8px;\tmin-width: 72px;\toutline: 0;\tpadding: 0 8px;\tcursor: pointer;}.geBtn:hover, .geBtn:focus {\t-webkit-box-shadow: 0px 1px 1px rgba(0,0,0,0.1);\t-moz-box-shadow: 0px 1px 1px rgba(0,0,0,0.1);\tbox-shadow: 0px 1px 1px rgba(0,0,0,0.1);\tborder: 1px solid #c6c6c6;\tbackground-color: #f8f8f8;\tbackground-image: linear-gradient(#f8f8f8 0px,#f1f1f1 100%);\tcolor: #111;}.geBtn:disabled {\topacity: .5;}.gePrimaryBtn {\tbackground-color: #4d90fe;\tbackground-image: linear-gradient(#4d90fe 0px,#4787ed 100%);\tborder: 1px solid #3079ed;\tcolor: #fff;}.gePrimaryBtn:hover, .gePrimaryBtn:focus {\tbackground-color: #357ae8;\tbackground-image: linear-gradient(#4d90fe 0px,#357ae8 100%);\tborder: 1px solid #2f5bb7;\tcolor: #fff;}.gePrimaryBtn:disabled {\topacity: .5;}";document.getElementsByTagName("head")[0].appendChild(a)}catch(b){}};
 GraphViewer.cachedUrls={};GraphViewer.getUrl=function(a,b,e){if(null!=GraphViewer.cachedUrls[a])b(GraphViewer.cachedUrls[a]);else{var d=0<navigator.userAgent.indexOf("MSIE 9")?new XDomainRequest:new XMLHttpRequest;d.open("GET",a);d.onload=function(){b(null!=d.getText?d.getText():d.responseText)};d.onerror=e;d.send()}};GraphViewer.resizeSensorEnabled=!0;GraphViewer.useResizeSensor=!0;
-(function(){var a=window.requestAnimationFrame||window.mozRequestAnimationFrame||window.webkitRequestAnimationFrame||function(a){return window.setTimeout(a,20)},b=function(e,d){function g(){this.q=[];this.add=function(a){this.q.push(a)};var a,b;this.call=function(){a=0;for(b=this.q.length;a<b;a++)this.q[a].call()}}function l(a,b){return a.currentStyle?a.currentStyle[b]:window.getComputedStyle?window.getComputedStyle(a,null).getPropertyValue(b):a.style[b]}function p(b,c){if(!b.resizedAttached)b.resizedAttached=
-new g,b.resizedAttached.add(c);else if(b.resizedAttached){b.resizedAttached.add(c);return}b.resizeSensor=document.createElement("div");b.resizeSensor.className="resize-sensor";b.resizeSensor.style.cssText="position: absolute; left: 0; top: 0; right: 0; bottom: 0; overflow: hidden; z-index: -1; visibility: hidden;";b.resizeSensor.innerHTML='<div class="resize-sensor-expand" style="position: absolute; left: 0; top: 0; right: 0; bottom: 0; overflow: hidden; z-index: -1; visibility: hidden;"><div style="position: absolute; left: 0; top: 0; transition: 0s;"></div></div><div class="resize-sensor-shrink" style="position: absolute; left: 0; top: 0; right: 0; bottom: 0; overflow: hidden; z-index: -1; visibility: hidden;"><div style="position: absolute; left: 0; top: 0; transition: 0s; width: 200%; height: 200%"></div></div>';
-b.appendChild(b.resizeSensor);"static"==l(b,"position")&&(b.style.position="relative");var d=b.resizeSensor.childNodes[0],e=d.childNodes[0],f=b.resizeSensor.childNodes[1],h=function(){e.style.width="100000px";e.style.height="100000px";d.scrollLeft=1E5;d.scrollTop=1E5;f.scrollLeft=1E5;f.scrollTop=1E5};h();var m=!1,n=function(){b.resizedAttached&&(m&&(b.resizedAttached.call(),m=!1),a(n))};a(n);var p,q,B,y,C=function(){if((B=b.offsetWidth)!=p||(y=b.offsetHeight)!=q)m=!0,p=B,q=y;h()},A=function(a,b,c){a.attachEvent?
-a.attachEvent("on"+b,c):a.addEventListener(b,c)};A(d,"scroll",C);A(f,"scroll",C)}var q=function(){GraphViewer.resizeSensorEnabled&&d()},c=Object.prototype.toString.call(e),f="[object Array]"===c||"[object NodeList]"===c||"[object HTMLCollection]"===c||"undefined"!==typeof jQuery&&e instanceof jQuery||"undefined"!==typeof Elements&&e instanceof Elements;if(f)for(var c=0,h=e.length;c<h;c++)p(e[c],q);else p(e,q);this.detach=function(){if(f)for(var a=0,c=e.length;a<c;a++)b.detach(e[a]);else b.detach(e)}};
+(function(){var a=window.requestAnimationFrame||window.mozRequestAnimationFrame||window.webkitRequestAnimationFrame||function(a){return window.setTimeout(a,20)},b=function(e,d){function h(){this.q=[];this.add=function(a){this.q.push(a)};var a,b;this.call=function(){a=0;for(b=this.q.length;a<b;a++)this.q[a].call()}}function l(a,b){return a.currentStyle?a.currentStyle[b]:window.getComputedStyle?window.getComputedStyle(a,null).getPropertyValue(b):a.style[b]}function n(b,c){if(!b.resizedAttached)b.resizedAttached=
+new h,b.resizedAttached.add(c);else if(b.resizedAttached){b.resizedAttached.add(c);return}b.resizeSensor=document.createElement("div");b.resizeSensor.className="resize-sensor";b.resizeSensor.style.cssText="position: absolute; left: 0; top: 0; right: 0; bottom: 0; overflow: hidden; z-index: -1; visibility: hidden;";b.resizeSensor.innerHTML='<div class="resize-sensor-expand" style="position: absolute; left: 0; top: 0; right: 0; bottom: 0; overflow: hidden; z-index: -1; visibility: hidden;"><div style="position: absolute; left: 0; top: 0; transition: 0s;"></div></div><div class="resize-sensor-shrink" style="position: absolute; left: 0; top: 0; right: 0; bottom: 0; overflow: hidden; z-index: -1; visibility: hidden;"><div style="position: absolute; left: 0; top: 0; transition: 0s; width: 200%; height: 200%"></div></div>';
+b.appendChild(b.resizeSensor);"static"==l(b,"position")&&(b.style.position="relative");var d=b.resizeSensor.childNodes[0],e=d.childNodes[0],f=b.resizeSensor.childNodes[1],g=function(){e.style.width="100000px";e.style.height="100000px";d.scrollLeft=1E5;d.scrollTop=1E5;f.scrollLeft=1E5;f.scrollTop=1E5};g();var m=!1,n=function(){b.resizedAttached&&(m&&(b.resizedAttached.call(),m=!1),a(n))};a(n);var p,q,A,z,C=function(){if((A=b.offsetWidth)!=p||(z=b.offsetHeight)!=q)m=!0,p=A,q=z;g()},B=function(a,b,c){a.attachEvent?
+a.attachEvent("on"+b,c):a.addEventListener(b,c)};B(d,"scroll",C);B(f,"scroll",C)}var q=function(){GraphViewer.resizeSensorEnabled&&d()},c=Object.prototype.toString.call(e),f="[object Array]"===c||"[object NodeList]"===c||"[object HTMLCollection]"===c||"undefined"!==typeof jQuery&&e instanceof jQuery||"undefined"!==typeof Elements&&e instanceof Elements;if(f)for(var c=0,g=e.length;c<g;c++)n(e[c],q);else n(e,q);this.detach=function(){if(f)for(var a=0,c=e.length;a<c;a++)b.detach(e[a]);else b.detach(e)}};
 b.detach=function(a){a.resizeSensor&&(a.removeChild(a.resizeSensor),delete a.resizeSensor,delete a.resizedAttached)};window.ResizeSensor=b})();
diff --git a/war/js/atlas.min.js b/war/js/atlas.min.js
index 34c5f7dce986b3212d501c1447e24da79a73f19a..c5a27b53c74bbde266cc2bab69953b587f230817 100644
--- a/war/js/atlas.min.js
+++ b/war/js/atlas.min.js
@@ -1567,8 +1567,8 @@ g=this.getAlignmentTolerance();if(0<g){var k=this.graph.view.getState(b);if(null
 mxConnectionHandler.prototype.createEdge=function(a,b,c,d){var e=null;null!=this.factoryMethod&&(e=this.factoryMethod(b,c,d));null==e&&(e=new mxCell(a||""),e.setEdge(!0),e.setStyle(d),a=new mxGeometry,a.relative=!0,e.setGeometry(a));return e};
 mxConnectionHandler.prototype.destroy=function(){this.graph.removeMouseListener(this);null!=this.shape&&(this.shape.destroy(),this.shape=null);null!=this.marker&&(this.marker.destroy(),this.marker=null);null!=this.constraintHandler&&(this.constraintHandler.destroy(),this.constraintHandler=null);null!=this.changeHandler&&(this.graph.getModel().removeListener(this.changeHandler),this.graph.getView().removeListener(this.changeHandler),this.changeHandler=null);null!=this.drillHandler&&(this.graph.removeListener(this.drillHandler),
 this.graph.getView().removeListener(this.drillHandler),this.drillHandler=null);null!=this.escapeHandler&&(this.graph.removeListener(this.escapeHandler),this.escapeHandler=null)};
-function mxConstraintHandler(a){this.graph=a;this.resetHandler=mxUtils.bind(this,function(a,c){null!=this.currentFocus&&null==this.graph.view.getState(this.currentFocus.cell)?this.reset():this.redraw()});this.graph.model.addListener(mxEvent.CHANGE,this.resetHandler);this.graph.view.addListener(mxEvent.SCALE,this.resetHandler);this.graph.addListener(mxEvent.ROOT,this.resetHandler)}mxConstraintHandler.prototype.pointImage=new mxImage(mxClient.imageBasePath+"/point.gif",5,5);
-mxConstraintHandler.prototype.graph=null;mxConstraintHandler.prototype.enabled=!0;mxConstraintHandler.prototype.highlightColor=mxConstants.DEFAULT_VALID_COLOR;mxConstraintHandler.prototype.isEnabled=function(){return this.enabled};mxConstraintHandler.prototype.setEnabled=function(a){this.enabled=a};
+function mxConstraintHandler(a){this.graph=a;this.resetHandler=mxUtils.bind(this,function(a,c){null!=this.currentFocus&&null==this.graph.view.getState(this.currentFocus.cell)?this.reset():this.redraw()});this.graph.model.addListener(mxEvent.CHANGE,this.resetHandler);this.graph.view.addListener(mxEvent.SCALE_AND_TRANSLATE,this.resetHandler);this.graph.view.addListener(mxEvent.TRANSLATE,this.resetHandler);this.graph.view.addListener(mxEvent.SCALE,this.resetHandler);this.graph.addListener(mxEvent.ROOT,
+this.resetHandler)}mxConstraintHandler.prototype.pointImage=new mxImage(mxClient.imageBasePath+"/point.gif",5,5);mxConstraintHandler.prototype.graph=null;mxConstraintHandler.prototype.enabled=!0;mxConstraintHandler.prototype.highlightColor=mxConstants.DEFAULT_VALID_COLOR;mxConstraintHandler.prototype.isEnabled=function(){return this.enabled};mxConstraintHandler.prototype.setEnabled=function(a){this.enabled=a};
 mxConstraintHandler.prototype.reset=function(){if(null!=this.focusIcons){for(var a=0;a<this.focusIcons.length;a++)this.focusIcons[a].destroy();this.focusIcons=null}null!=this.focusHighlight&&(this.focusHighlight.destroy(),this.focusHighlight=null);this.focusPoints=this.currentFocus=this.currentPoint=this.currentFocusArea=this.currentConstraint=null};mxConstraintHandler.prototype.getTolerance=function(a){return this.graph.getTolerance()};
 mxConstraintHandler.prototype.getImageForConstraint=function(a,b,c){return this.pointImage};mxConstraintHandler.prototype.isEventIgnored=function(a,b){return!1};mxConstraintHandler.prototype.isStateIgnored=function(a,b){return!1};mxConstraintHandler.prototype.destroyIcons=function(){if(null!=this.focusIcons){for(var a=0;a<this.focusIcons.length;a++)this.focusIcons[a].destroy();this.focusPoints=this.focusIcons=null}};
 mxConstraintHandler.prototype.destroyFocusHighlight=function(){null!=this.focusHighlight&&(this.focusHighlight.destroy(),this.focusHighlight=null)};mxConstraintHandler.prototype.isKeepFocusEvent=function(a){return mxEvent.isShiftDown(a.getEvent())};
@@ -1967,11 +1967,11 @@ f.appendChild(l);mxUtils.write(f,mxResources.get("gridSize")+":");var n=document
 mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog()});r.className="geBtn";a.editor.cancelFirst&&f.appendChild(r);var t=mxUtils.button(mxResources.get("apply"),function(){a.hideDialog();b.gridSize!==n.value&&b.setGridSize(parseInt(n.value));var c=new ChangePageSetup(a,m,q,k.get());c.ignoreColor=b.background==m;c.ignoreImage=(null!=b.backgroundImage?b.backgroundImage.src:null)===(null!=q?q.src:null);b.pageFormat.width==c.previousFormat.width&&b.pageFormat.height==c.previousFormat.height&&
 c.ignoreColor&&c.ignoreImage||b.model.execute(c)});t.className="geBtn gePrimaryBtn";f.appendChild(t);a.editor.cancelFirst||f.appendChild(r);e.appendChild(f);g.appendChild(e);h.appendChild(g);this.container=h};
 PageSetupDialog.addPageFormatPanel=function(a,c,d,b){function e(a,b,c){if(c||n!=document.activeElement&&p!=document.activeElement){a=!1;for(b=0;b<r.length;b++)c=r[b],v?"custom"==c.key&&(g.value=c.key,v=!1):null!=c.format&&("a4"==c.key?826==d.width?(d=mxRectangle.fromRectangle(d),d.width=827):826==d.height&&(d=mxRectangle.fromRectangle(d),d.height=827):"a5"==c.key&&(584==d.width?(d=mxRectangle.fromRectangle(d),d.width=583):584==d.height&&(d=mxRectangle.fromRectangle(d),d.height=583)),d.width==c.format.width&&
-d.height==c.format.height?(g.value=c.key,f.setAttribute("checked","checked"),f.defaultChecked=!0,f.checked=!0,h.removeAttribute("checked"),h.defaultChecked=!1,h.checked=!1,a=!0):d.width==c.format.height&&d.height==c.format.width&&(g.value=c.key,f.removeAttribute("checked"),f.defaultChecked=!1,f.checked=!1,h.setAttribute("checked","checked"),h.defaultChecked=!0,a=h.checked=!0));a?(k.style.display="",m.style.display="none"):(n.value=d.width/100,p.value=d.height/100,w.setAttribute("selected","selected"),
+d.height==c.format.height?(g.value=c.key,f.setAttribute("checked","checked"),f.defaultChecked=!0,f.checked=!0,h.removeAttribute("checked"),h.defaultChecked=!1,h.checked=!1,a=!0):d.width==c.format.height&&d.height==c.format.width&&(g.value=c.key,f.removeAttribute("checked"),f.defaultChecked=!1,f.checked=!1,h.setAttribute("checked","checked"),h.defaultChecked=!0,a=h.checked=!0));a?(k.style.display="",m.style.display="none"):(n.value=d.width/100,p.value=d.height/100,u.setAttribute("selected","selected"),
 f.setAttribute("checked","checked"),f.defaultChecked=!0,k.style.display="none",m.style.display="")}}c="format-"+c;var f=document.createElement("input");f.setAttribute("name",c);f.setAttribute("type","radio");f.setAttribute("value","portrait");var h=document.createElement("input");h.setAttribute("name",c);h.setAttribute("type","radio");h.setAttribute("value","landscape");var g=document.createElement("select");g.style.marginBottom="8px";g.style.width="202px";var k=document.createElement("div");k.style.marginLeft=
 "4px";k.style.width="210px";k.style.height="24px";f.style.marginRight="6px";k.appendChild(f);c=document.createElement("span");c.style.maxWidth="100px";mxUtils.write(c,mxResources.get("portrait"));k.appendChild(c);h.style.marginLeft="10px";h.style.marginRight="6px";k.appendChild(h);var l=document.createElement("span");l.style.width="100px";mxUtils.write(l,mxResources.get("landscape"));k.appendChild(l);var m=document.createElement("div");m.style.marginLeft="4px";m.style.width="210px";m.style.height=
-"24px";var n=document.createElement("input");n.setAttribute("size","7");n.setAttribute("value",d.width);n.style.textAlign="right";m.appendChild(n);mxUtils.write(m," in x ");var p=document.createElement("input");p.setAttribute("size","7");p.setAttribute("value",d.height);p.style.textAlign="right";m.appendChild(p);mxUtils.write(m," in");k.style.display="none";m.style.display="none";for(var q={},r=PageSetupDialog.getFormats(),t=0;t<r.length;t++){var u=r[t];q[u.key]=u;var w=document.createElement("option");
-w.setAttribute("value",u.key);mxUtils.write(w,u.title);g.appendChild(w)}var v=!1;e();a.appendChild(g);mxUtils.br(a);a.appendChild(k);a.appendChild(m);var A=d,x=function(){var a=q[g.value];null!=a.format?(n.value=a.format.width/100,p.value=a.format.height/100,m.style.display="none",k.style.display=""):(k.style.display="none",m.style.display="");a=new mxRectangle(0,0,Math.floor(100*parseFloat(n.value)),Math.floor(100*parseFloat(p.value)));"custom"!=g.value&&h.checked&&(a=new mxRectangle(0,0,a.height,
+"24px";var n=document.createElement("input");n.setAttribute("size","7");n.setAttribute("value",d.width);n.style.textAlign="right";m.appendChild(n);mxUtils.write(m," in x ");var p=document.createElement("input");p.setAttribute("size","7");p.setAttribute("value",d.height);p.style.textAlign="right";m.appendChild(p);mxUtils.write(m," in");k.style.display="none";m.style.display="none";for(var q={},r=PageSetupDialog.getFormats(),t=0;t<r.length;t++){var w=r[t];q[w.key]=w;var u=document.createElement("option");
+u.setAttribute("value",w.key);mxUtils.write(u,w.title);g.appendChild(u)}var v=!1;e();a.appendChild(g);mxUtils.br(a);a.appendChild(k);a.appendChild(m);var A=d,x=function(){var a=q[g.value];null!=a.format?(n.value=a.format.width/100,p.value=a.format.height/100,m.style.display="none",k.style.display=""):(k.style.display="none",m.style.display="");a=new mxRectangle(0,0,Math.floor(100*parseFloat(n.value)),Math.floor(100*parseFloat(p.value)));"custom"!=g.value&&h.checked&&(a=new mxRectangle(0,0,a.height,
 a.width));if(a.width!=A.width||a.height!=A.height)A=a,null!=b&&b(A)};mxEvent.addListener(c,"click",function(a){f.checked=!0;x();mxEvent.consume(a)});mxEvent.addListener(l,"click",function(a){h.checked=!0;x();mxEvent.consume(a)});mxEvent.addListener(n,"blur",x);mxEvent.addListener(n,"click",x);mxEvent.addListener(p,"blur",x);mxEvent.addListener(p,"click",x);mxEvent.addListener(h,"change",x);mxEvent.addListener(f,"change",x);mxEvent.addListener(g,"change",function(){v="custom"==g.value;x()});x();return{set:function(a){d=
 a;e(null,null,!0)},get:function(){return A},widthInput:n,heightInput:p}};
 PageSetupDialog.getFormats=function(){return[{key:"letter",title:'US-Letter (8,5" x 11")',format:mxConstants.PAGE_FORMAT_LETTER_PORTRAIT},{key:"legal",title:'US-Legal (8,5" x 14")',format:new mxRectangle(0,0,850,1400)},{key:"tabloid",title:"US-Tabloid (279 mm x 432 mm)",format:new mxRectangle(0,0,1100,1700)},{key:"a0",title:"A0 (841 mm x 1189 mm)",format:new mxRectangle(0,0,3300,4681)},{key:"a1",title:"A1 (594 mm x 841 mm)",format:new mxRectangle(0,0,2339,3300)},{key:"a2",title:"A2 (420 mm x 594 mm)",
@@ -1984,7 +1984,7 @@ null);this.validateBackgroundStyles()}};mxGraphView.prototype.validateBackground
 "geDiagramContainer geDiagramBackdrop",c.style.backgroundImage="none",c.style.backgroundColor=""):(a.container.className="geDiagramContainer",c.style.backgroundPosition=f,c.style.backgroundColor=b,c.style.backgroundImage=d)};mxGraphView.prototype.createSvgGrid=function(a){for(var b=this.graph.gridSize*this.scale;b<this.minGridSize;)b*=2;for(var c=this.gridSteps*b,d=[],f=1;f<this.gridSteps;f++){var e=f*b;d.push("M 0 "+e+" L "+c+" "+e+" M "+e+" 0 L "+e+" "+c)}return'<svg width="'+c+'" height="'+c+'" xmlns="'+
 mxConstants.NS_SVG+'"><defs><pattern id="grid" width="'+c+'" height="'+c+'" patternUnits="userSpaceOnUse"><path d="'+d.join(" ")+'" fill="none" stroke="'+a+'" opacity="0.2" stroke-width="1"/><path d="M '+c+" 0 L 0 0 0 "+c+'" fill="none" stroke="'+a+'" stroke-width="1"/></pattern></defs><rect width="100%" height="100%" fill="url(#grid)"/></svg>'};var a=mxGraph.prototype.panGraph;mxGraph.prototype.panGraph=function(b,c){a.apply(this,arguments);if(null!=this.shiftPreview1){var d=this.view.canvas;null!=
 d.ownerSVGElement&&(d=d.ownerSVGElement);var f=this.gridSize*this.view.scale*this.view.gridSteps,f=-Math.round(f-mxUtils.mod(this.view.translate.x*this.view.scale+b,f))+"px "+-Math.round(f-mxUtils.mod(this.view.translate.y*this.view.scale+c,f))+"px";d.style.backgroundPosition=f}};mxGraph.prototype.updatePageBreaks=function(a,b,c){var d=this.view.scale,f=this.view.translate,e=this.pageFormat,g=d*this.pageScale,h=this.view.getBackgroundPageBounds();b=h.width;c=h.height;var k=new mxRectangle(d*f.x,d*
-f.y,e.width*g,e.height*g),l=(a=a&&Math.min(k.width,k.height)>this.minPageBreakDist)?Math.ceil(c/k.height)-1:0,w=a?Math.ceil(b/k.width)-1:0,v=h.x+b,A=h.y+c;null==this.horizontalPageBreaks&&0<l&&(this.horizontalPageBreaks=[]);null==this.verticalPageBreaks&&0<w&&(this.verticalPageBreaks=[]);a=mxUtils.bind(this,function(a){if(null!=a){for(var b=a==this.horizontalPageBreaks?l:w,c=0;c<=b;c++){var d=a==this.horizontalPageBreaks?[new mxPoint(Math.round(h.x),Math.round(h.y+(c+1)*k.height)),new mxPoint(Math.round(v),
+f.y,e.width*g,e.height*g),l=(a=a&&Math.min(k.width,k.height)>this.minPageBreakDist)?Math.ceil(c/k.height)-1:0,u=a?Math.ceil(b/k.width)-1:0,v=h.x+b,A=h.y+c;null==this.horizontalPageBreaks&&0<l&&(this.horizontalPageBreaks=[]);null==this.verticalPageBreaks&&0<u&&(this.verticalPageBreaks=[]);a=mxUtils.bind(this,function(a){if(null!=a){for(var b=a==this.horizontalPageBreaks?l:u,c=0;c<=b;c++){var d=a==this.horizontalPageBreaks?[new mxPoint(Math.round(h.x),Math.round(h.y+(c+1)*k.height)),new mxPoint(Math.round(v),
 Math.round(h.y+(c+1)*k.height))]:[new mxPoint(Math.round(h.x+(c+1)*k.width),Math.round(h.y)),new mxPoint(Math.round(h.x+(c+1)*k.width),Math.round(A))];null!=a[c]?(a[c].points=d,a[c].redraw()):(d=new mxPolyline(d,this.pageBreakColor),d.dialect=this.dialect,d.isDashed=this.pageBreakDashed,d.pointerEvents=!1,d.init(this.view.backgroundPane),d.redraw(),a[c]=d)}for(c=b;c<a.length;c++)a[c].destroy();a.splice(b,a.length-b)}});a(this.horizontalPageBreaks);a(this.verticalPageBreaks)};var c=mxGraphHandler.prototype.shouldRemoveCellsFromParent;
 mxGraphHandler.prototype.shouldRemoveCellsFromParent=function(a,b,d){for(var f=0;f<b.length;f++)if(this.graph.getModel().isVertex(b[f])){var e=this.graph.getCellGeometry(b[f]);if(null!=e&&e.relative)return!1}return c.apply(this,arguments)};var d=mxConnectionHandler.prototype.createMarker;mxConnectionHandler.prototype.createMarker=function(){var a=d.apply(this,arguments);a.intersects=mxUtils.bind(this,function(b,c){return this.isConnecting()?!0:mxCellMarker.prototype.intersects.apply(a,arguments)});
 return a};mxGraphView.prototype.createBackgroundPageShape=function(a){return new mxRectangleShape(a,"#ffffff","#cacaca")};mxGraphView.prototype.getBackgroundPageBounds=function(){var a=this.getGraphBounds(),b=0<a.width?a.x/this.scale-this.translate.x:0,c=0<a.height?a.y/this.scale-this.translate.y:0,d=this.graph.pageFormat,f=this.graph.pageScale,e=d.width*f,d=d.height*f,f=Math.floor(Math.min(0,b)/e),h=Math.floor(Math.min(0,c)/d);return new mxRectangle(this.scale*(this.translate.x+f*e),this.scale*(this.translate.y+
@@ -2000,14 +2000,14 @@ this.diagramContainer.setAttribute("title",mxResources.get("panTooltip")):this.d
 var g=b.cellEditor.isStopEditingEvent;b.cellEditor.isStopEditingEvent=function(a){return g.apply(this,arguments)||13==a.keyCode&&(!mxClient.IS_SF&&mxEvent.isControlDown(a)||mxClient.IS_MAC&&mxEvent.isMetaDown(a)||mxClient.IS_SF&&mxEvent.isShiftDown(a))};var k=!1,l=null,m=null,n=null,p=mxUtils.bind(this,function(){if(null!=this.toolbar&&k!=b.cellEditor.isContentEditing()){for(var a=this.toolbar.container.firstChild,c=[];null!=a;){var d=a.nextSibling;0>mxUtils.indexOf(this.toolbar.staticElements,a)&&
 (a.parentNode.removeChild(a),c.push(a));a=d}a=this.toolbar.fontMenu;d=this.toolbar.sizeMenu;if(null==n)this.toolbar.createTextToolbar();else{for(var f=0;f<n.length;f++)this.toolbar.container.appendChild(n[f]);this.toolbar.fontMenu=l;this.toolbar.sizeMenu=m}k=b.cellEditor.isContentEditing();l=a;m=d;n=c}}),q=this,r=b.cellEditor.startEditing;b.cellEditor.startEditing=function(){r.apply(this,arguments);p();if(b.cellEditor.isContentEditing()){var a=!1,c=function(){a||(a=!0,window.setTimeout(function(){for(var c=
 b.getSelectedElement();null!=c&&c.nodeType!=mxConstants.NODETYPE_ELEMENT;)c=c.parentNode;if(null!=c&&(c=mxUtils.getCurrentStyle(c),null!=c&&null!=q.toolbar)){var d=c.fontFamily;"'"==d.charAt(0)&&(d=d.substring(1));"'"==d.charAt(d.length-1)&&(d=d.substring(0,d.length-1));q.toolbar.setFontName(d);q.toolbar.setFontSize(parseInt(c.fontSize))}a=!1},0))};mxEvent.addListener(b.cellEditor.textarea,"input",c);mxEvent.addListener(b.cellEditor.textarea,"touchend",c);mxEvent.addListener(b.cellEditor.textarea,
-"mouseup",c);mxEvent.addListener(b.cellEditor.textarea,"keyup",c);c()}};var t=b.cellEditor.stopEditing;b.cellEditor.stopEditing=function(a,b){t.apply(this,arguments);p()};b.container.setAttribute("tabindex","0");b.container.style.cursor="default";if(window.self===window.top&&null!=b.container.parentNode)try{b.container.focus()}catch(y){}var u=b.fireMouseEvent;b.fireMouseEvent=function(a,b,c){a==mxEvent.MOUSE_DOWN&&this.container.focus();u.apply(this,arguments)};b.popupMenuHandler.autoExpand=!0;null!=
-this.menus&&(b.popupMenuHandler.factoryMethod=mxUtils.bind(this,function(a,b,c){this.menus.createPopupMenu(a,b,c)}));mxEvent.addGestureListeners(document,mxUtils.bind(this,function(a){b.popupMenuHandler.hideMenu()}));this.keyHandler=this.createKeyHandler(a);this.getKeyHandler=function(){return keyHandler};var w="rounded shadow glass dashed dashPattern comic labelBackgroundColor".split(" "),v="shape edgeStyle curved rounded elbow comic jumpStyle jumpSize".split(" ");this.setDefaultStyle=function(a){var c=
+"mouseup",c);mxEvent.addListener(b.cellEditor.textarea,"keyup",c);c()}};var t=b.cellEditor.stopEditing;b.cellEditor.stopEditing=function(a,b){t.apply(this,arguments);p()};b.container.setAttribute("tabindex","0");b.container.style.cursor="default";if(window.self===window.top&&null!=b.container.parentNode)try{b.container.focus()}catch(y){}var w=b.fireMouseEvent;b.fireMouseEvent=function(a,b,c){a==mxEvent.MOUSE_DOWN&&this.container.focus();w.apply(this,arguments)};b.popupMenuHandler.autoExpand=!0;null!=
+this.menus&&(b.popupMenuHandler.factoryMethod=mxUtils.bind(this,function(a,b,c){this.menus.createPopupMenu(a,b,c)}));mxEvent.addGestureListeners(document,mxUtils.bind(this,function(a){b.popupMenuHandler.hideMenu()}));this.keyHandler=this.createKeyHandler(a);this.getKeyHandler=function(){return keyHandler};var u="rounded shadow glass dashed dashPattern comic labelBackgroundColor".split(" "),v="shape edgeStyle curved rounded elbow comic jumpStyle jumpSize".split(" ");this.setDefaultStyle=function(a){var c=
 b.view.getState(a);if(null!=c){a=a.clone();a.style="";a=b.getCellStyle(a);var d=[],f=[],e;for(e in c.style)a[e]!=c.style[e]&&(d.push(c.style[e]),f.push(e));e=b.getModel().getStyle(c.cell);for(var g=null!=e?e.split(";"):[],h=0;h<g.length;h++){var k=g[h],l=k.indexOf("=");0<=l&&(e=k.substring(0,l),k=k.substring(l+1),null!=a[e]&&"none"==k&&(d.push(k),f.push(e)))}b.getModel().isEdge(c.cell)?b.currentEdgeStyle={}:b.currentVertexStyle={};this.fireEvent(new mxEventObject("styleChanged","keys",f,"values",
-d,"cells",[c.cell]))}};this.clearDefaultStyle=function(){b.currentEdgeStyle=mxUtils.clone(b.defaultEdgeStyle);b.currentVertexStyle=mxUtils.clone(b.defaultVertexStyle);this.fireEvent(new mxEventObject("styleChanged","keys",[],"values",[],"cells",[]))};var A=["fontFamily","fontSize","fontColor"],x="edgeStyle startArrow startFill startSize endArrow endFill endSize jettySize orthogonalLoop".split(" "),C=["startArrow startFill startSize endArrow endFill endSize jettySize orthogonalLoop".split(" "),["strokeColor",
-"strokeWidth"],["fillColor","gradientColor"],A,["align"],["html"]];for(a=0;a<C.length;a++)for(c=0;c<C[a].length;c++)w.push(C[a][c]);for(a=0;a<v.length;a++)0>mxUtils.indexOf(w,v[a])&&w.push(v[a]);var B=function(a,c){b.getModel().beginUpdate();try{if(c)for(var d=b.getModel().isEdge(h),f=d?b.currentEdgeStyle:b.currentVertexStyle,d=["fontSize","fontFamily","fontColor"],e=0;e<d.length;e++){var g=f[d[e]];null!=g&&b.setCellStyles(d[e],g,a)}else for(g=0;g<a.length;g++){for(var h=a[g],k=b.getModel().getStyle(h),
-l=null!=k?k.split(";"):[],m=w.slice(),e=0;e<l.length;e++){var n=l[e],D=n.indexOf("=");if(0<=D){var p=n.substring(0,D),z=mxUtils.indexOf(m,p);0<=z&&m.splice(z,1);for(var P=0;P<C.length;P++){var r=C[P];if(0<=mxUtils.indexOf(r,p))for(var q=0;q<r.length;q++){var t=mxUtils.indexOf(m,r[q]);0<=t&&m.splice(t,1)}}}}f=(d=b.getModel().isEdge(h))?b.currentEdgeStyle:b.currentVertexStyle;for(e=0;e<m.length;e++){var p=m[e],u=f[p];null==u||"shape"==p&&!d||(!d||0>mxUtils.indexOf(v,p))&&b.setCellStyles(p,u,[h])}}}finally{b.getModel().endUpdate()}};
-b.addListener("cellsInserted",function(a,b){B(b.getProperty("cells"))});b.addListener("textInserted",function(a,b){B(b.getProperty("cells"),!0)});b.connectionHandler.addListener(mxEvent.CONNECT,function(a,b){var c=[b.getProperty("cell")];b.getProperty("terminalInserted")&&c.push(b.getProperty("terminal"));B(c)});this.addListener("styleChanged",mxUtils.bind(this,function(a,c){var d=c.getProperty("cells"),f=!1,e=!1;if(0<d.length)for(var g=0;g<d.length&&(f=b.getModel().isVertex(d[g])||f,!(e=b.getModel().isEdge(d[g])||
-e)||!f);g++);else e=f=!0;for(var d=c.getProperty("keys"),h=c.getProperty("values"),g=0;g<d.length;g++){var k=0<=mxUtils.indexOf(A,d[g]);if("strokeColor"!=d[g]||null!=h[g]&&"none"!=h[g])if(0<=mxUtils.indexOf(v,d[g]))e||0<=mxUtils.indexOf(x,d[g])?null==h[g]?delete b.currentEdgeStyle[d[g]]:b.currentEdgeStyle[d[g]]=h[g]:f&&0<=mxUtils.indexOf(w,d[g])&&(null==h[g]?delete b.currentVertexStyle[d[g]]:b.currentVertexStyle[d[g]]=h[g]);else if(0<=mxUtils.indexOf(w,d[g])){if(f||k)null==h[g]?delete b.currentVertexStyle[d[g]]:
+d,"cells",[c.cell]))}};this.clearDefaultStyle=function(){b.currentEdgeStyle=mxUtils.clone(b.defaultEdgeStyle);b.currentVertexStyle=mxUtils.clone(b.defaultVertexStyle);this.fireEvent(new mxEventObject("styleChanged","keys",[],"values",[],"cells",[]))};var A=["fontFamily","fontSize","fontColor"],x="edgeStyle startArrow startFill startSize endArrow endFill endSize jettySize orthogonalLoop".split(" "),B=["startArrow startFill startSize endArrow endFill endSize jettySize orthogonalLoop".split(" "),["strokeColor",
+"strokeWidth"],["fillColor","gradientColor"],A,["align"],["html"]];for(a=0;a<B.length;a++)for(c=0;c<B[a].length;c++)u.push(B[a][c]);for(a=0;a<v.length;a++)0>mxUtils.indexOf(u,v[a])&&u.push(v[a]);var C=function(a,c){b.getModel().beginUpdate();try{if(c)for(var d=b.getModel().isEdge(h),f=d?b.currentEdgeStyle:b.currentVertexStyle,d=["fontSize","fontFamily","fontColor"],e=0;e<d.length;e++){var g=f[d[e]];null!=g&&b.setCellStyles(d[e],g,a)}else for(g=0;g<a.length;g++){for(var h=a[g],k=b.getModel().getStyle(h),
+l=null!=k?k.split(";"):[],m=u.slice(),e=0;e<l.length;e++){var n=l[e],E=n.indexOf("=");if(0<=E){var p=n.substring(0,E),z=mxUtils.indexOf(m,p);0<=z&&m.splice(z,1);for(var Q=0;Q<B.length;Q++){var r=B[Q];if(0<=mxUtils.indexOf(r,p))for(var q=0;q<r.length;q++){var t=mxUtils.indexOf(m,r[q]);0<=t&&m.splice(t,1)}}}}f=(d=b.getModel().isEdge(h))?b.currentEdgeStyle:b.currentVertexStyle;for(e=0;e<m.length;e++){var p=m[e],w=f[p];null==w||"shape"==p&&!d||(!d||0>mxUtils.indexOf(v,p))&&b.setCellStyles(p,w,[h])}}}finally{b.getModel().endUpdate()}};
+b.addListener("cellsInserted",function(a,b){C(b.getProperty("cells"))});b.addListener("textInserted",function(a,b){C(b.getProperty("cells"),!0)});b.connectionHandler.addListener(mxEvent.CONNECT,function(a,b){var c=[b.getProperty("cell")];b.getProperty("terminalInserted")&&c.push(b.getProperty("terminal"));C(c)});this.addListener("styleChanged",mxUtils.bind(this,function(a,c){var d=c.getProperty("cells"),f=!1,e=!1;if(0<d.length)for(var g=0;g<d.length&&(f=b.getModel().isVertex(d[g])||f,!(e=b.getModel().isEdge(d[g])||
+e)||!f);g++);else e=f=!0;for(var d=c.getProperty("keys"),h=c.getProperty("values"),g=0;g<d.length;g++){var k=0<=mxUtils.indexOf(A,d[g]);if("strokeColor"!=d[g]||null!=h[g]&&"none"!=h[g])if(0<=mxUtils.indexOf(v,d[g]))e||0<=mxUtils.indexOf(x,d[g])?null==h[g]?delete b.currentEdgeStyle[d[g]]:b.currentEdgeStyle[d[g]]=h[g]:f&&0<=mxUtils.indexOf(u,d[g])&&(null==h[g]?delete b.currentVertexStyle[d[g]]:b.currentVertexStyle[d[g]]=h[g]);else if(0<=mxUtils.indexOf(u,d[g])){if(f||k)null==h[g]?delete b.currentVertexStyle[d[g]]:
 b.currentVertexStyle[d[g]]=h[g];if(e||k||0<=mxUtils.indexOf(x,d[g]))null==h[g]?delete b.currentEdgeStyle[d[g]]:b.currentEdgeStyle[d[g]]=h[g]}}null!=this.toolbar&&(this.toolbar.setFontName(b.currentVertexStyle.fontFamily||Menus.prototype.defaultFont),this.toolbar.setFontSize(b.currentVertexStyle.fontSize||Menus.prototype.defaultFontSize),null!=this.toolbar.edgeStyleMenu&&(this.toolbar.edgeStyleMenu.getElementsByTagName("div")[0].className="orthogonalEdgeStyle"==b.currentEdgeStyle.edgeStyle&&"1"==b.currentEdgeStyle.curved?
 "geSprite geSprite-curved":"straight"==b.currentEdgeStyle.edgeStyle||"none"==b.currentEdgeStyle.edgeStyle||null==b.currentEdgeStyle.edgeStyle?"geSprite geSprite-straight":"entityRelationEdgeStyle"==b.currentEdgeStyle.edgeStyle?"geSprite geSprite-entity":"elbowEdgeStyle"==b.currentEdgeStyle.edgeStyle?"geSprite geSprite-"+("vertical"==b.currentEdgeStyle.elbow?"verticalelbow":"horizontalelbow"):"isometricEdgeStyle"==b.currentEdgeStyle.edgeStyle?"geSprite geSprite-"+("vertical"==b.currentEdgeStyle.elbow?
 "verticalisometric":"horizontalisometric"):"geSprite geSprite-orthogonal"),null!=this.toolbar.edgeShapeMenu&&(this.toolbar.edgeShapeMenu.getElementsByTagName("div")[0].className="link"==b.currentEdgeStyle.shape?"geSprite geSprite-linkedge":"flexArrow"==b.currentEdgeStyle.shape?"geSprite geSprite-arrow":"arrow"==b.currentEdgeStyle.shape?"geSprite geSprite-simplearrow":"geSprite geSprite-connection"),null!=this.toolbar.lineStartMenu&&(this.toolbar.lineStartMenu.getElementsByTagName("div")[0].className=
@@ -2029,28 +2029,29 @@ EditorUi.prototype.updatePasteActionStates=function(){var a=this.editor.graph,c=
 EditorUi.prototype.initClipboard=function(){var a=this,c=mxClipboard.cut;mxClipboard.cut=function(b){b.cellEditor.isContentEditing()?document.execCommand("cut",!1,null):c.apply(this,arguments);a.updatePasteActionStates()};var d=mxClipboard.copy;mxClipboard.copy=function(b){b.cellEditor.isContentEditing()?document.execCommand("copy",!1,null):d.apply(this,arguments);a.updatePasteActionStates()};var b=mxClipboard.paste;mxClipboard.paste=function(c){var d=null;c.cellEditor.isContentEditing()?document.execCommand("paste",
 !1,null):d=b.apply(this,arguments);a.updatePasteActionStates();return d};var e=this.editor.graph.cellEditor.startEditing;this.editor.graph.cellEditor.startEditing=function(){e.apply(this,arguments);a.updatePasteActionStates()};var f=this.editor.graph.cellEditor.stopEditing;this.editor.graph.cellEditor.stopEditing=function(b,c){f.apply(this,arguments);a.updatePasteActionStates()};this.updatePasteActionStates()};
 EditorUi.prototype.initCanvas=function(){var a=this.editor.graph,a=this.editor.graph;a.timerAutoScroll=!0;a.getPagePadding=function(){return new mxPoint(Math.max(0,Math.round((a.container.offsetWidth-34)/a.view.scale)),Math.max(0,Math.round((a.container.offsetHeight-34)/a.view.scale)))};a.view.getBackgroundPageBounds=function(){var a=this.graph.getPageLayout(),b=this.graph.getPageSize();return new mxRectangle(this.scale*(this.translate.x+a.x*b.width),this.scale*(this.translate.y+a.y*b.height),this.scale*
-a.width*b.width,this.scale*a.height*b.height)};a.getPreferredPageSize=function(a,b,c){a=this.getPageLayout();b=this.getPageSize();return new mxRectangle(0,0,a.width*b.width,a.height*b.height)};var c=null;if(this.editor.chromeless){this.chromelessResize=c=mxUtils.bind(this,function(b,c){if(null!=a.container){var d=a.pageVisible?a.view.getBackgroundPageBounds():a.getGraphBounds(),f=a.view.translate,e=a.view.scale,d=mxRectangle.fromRectangle(d);d.x=d.x/e-f.x;d.y=d.y/e-f.y;d.width/=e;d.height/=e;var f=
-a.container.scrollTop,g=a.container.scrollLeft,h=mxClient.IS_QUIRKS||8<=document.documentMode?20:14;if(8==document.documentMode||9==document.documentMode)h+=3;var k=a.container.offsetWidth-h,l=b?Math.max(.3,Math.min(c||1,k/d.width)):e;a.view.scaleAndTranslate(l,Math.floor(Math.max((k-l*d.width)/2,0)/l-d.x),Math.floor(Math.max((a.container.offsetHeight-h-l*d.height)/this.lightboxVerticalDivider,0)/l-d.y));a.container.scrollTop=f*l/e;a.container.scrollLeft=g*l/e}});var d=mxUtils.bind(this,function(){c(!1)});
-mxEvent.addListener(window,"resize",d);this.destroyFunctions.push(function(){mxEvent.removeListener(window,"resize",d)});this.editor.addListener("resetGraphView",mxUtils.bind(this,function(){c(!0)}));this.actions.get("zoomIn").funct=function(b){a.zoomIn();c(!1)};this.actions.get("zoomOut").funct=function(b){a.zoomOut();c(!1)};if("0"!=urlParams.toolbar){this.chromelessToolbar=document.createElement("div");this.chromelessToolbar.style.position="fixed";this.chromelessToolbar.style.overflow="hidden";
-this.chromelessToolbar.style.boxSizing="border-box";this.chromelessToolbar.style.whiteSpace="nowrap";this.chromelessToolbar.style.backgroundColor="#000000";this.chromelessToolbar.style.padding="10px 10px 8px 10px";this.chromelessToolbar.style.left="50%";mxClient.IS_VML||(mxUtils.setPrefixedStyle(this.chromelessToolbar.style,"borderRadius","20px"),mxUtils.setPrefixedStyle(this.chromelessToolbar.style,"transition","opacity 600ms ease-in-out"));var b=mxUtils.bind(this,function(){var b=mxUtils.getCurrentStyle(a.container);
-this.chromelessToolbar.style.bottom=(null!=b?parseInt(b["margin-bottom"]||0):0)+(null!=this.tabContainer?20+parseInt(this.tabContainer.style.height):20)+"px"});this.editor.addListener("resetGraphView",b);b();var e=0,b=mxUtils.bind(this,function(a,b,c){e++;var d=document.createElement("span");d.style.paddingLeft="8px";d.style.paddingRight="8px";d.style.cursor="pointer";mxEvent.addListener(d,"click",a);null!=c&&d.setAttribute("title",c);a=document.createElement("img");a.setAttribute("border","0");a.setAttribute("src",
-b);d.appendChild(a);this.chromelessToolbar.appendChild(d);return d}),f=b(mxUtils.bind(this,function(a){this.actions.get("previousPage").funct();mxEvent.consume(a)}),Editor.previousLargeImage,mxResources.get("previousPage")),h=document.createElement("div");h.style.display="inline-block";h.style.verticalAlign="top";h.style.fontFamily="Helvetica,Arial";h.style.marginTop="8px";h.style.color="#ffffff";this.chromelessToolbar.appendChild(h);var g=b(mxUtils.bind(this,function(a){this.actions.get("nextPage").funct();
-mxEvent.consume(a)}),Editor.nextLargeImage,mxResources.get("nextPage")),k=mxUtils.bind(this,function(){null!=this.pages&&1<this.pages.length&&null!=this.currentPage&&(h.innerHTML="",mxUtils.write(h,mxUtils.indexOf(this.pages,this.currentPage)+1+" / "+this.pages.length))});f.style.paddingLeft="0px";f.style.paddingRight="4px";g.style.paddingLeft="4px";g.style.paddingRight="0px";var l=mxUtils.bind(this,function(){null!=this.pages&&1<this.pages.length&&null!=this.currentPage?(g.style.display="",f.style.display=
-"",h.style.display="inline-block"):(g.style.display="none",f.style.display="none",h.style.display="none");k()});this.editor.addListener("resetGraphView",l);this.editor.addListener("pageSelected",k);b(mxUtils.bind(this,function(a){this.actions.get("zoomOut").funct();mxEvent.consume(a)}),Editor.zoomOutLargeImage,mxResources.get("zoomOut")+" (Alt+Mousewheel)");b(mxUtils.bind(this,function(a){this.actions.get("zoomIn").funct();mxEvent.consume(a)}),Editor.zoomInLargeImage,mxResources.get("zoomIn")+" (Alt+Mousewheel)");
-b(mxUtils.bind(this,function(b){a.lightbox?(1==a.view.scale?this.lightboxFit():a.zoomTo(1),c(!1)):c(!0);mxEvent.consume(b)}),Editor.actualSizeLargeImage,mxResources.get("fit"));var m=null,n=null,p=mxUtils.bind(this,function(a){null!=m&&(window.clearTimeout(m),fadeThead=null);null!=n&&(window.clearTimeout(n),fadeThead2=null);m=window.setTimeout(mxUtils.bind(this,function(){mxUtils.setOpacity(this.chromelessToolbar,0);m=null;n=window.setTimeout(mxUtils.bind(this,function(){this.chromelessToolbar.style.display=
-"none";n=null}),600)}),a||200)}),q=mxUtils.bind(this,function(a){null!=m&&(window.clearTimeout(m),fadeThead=null);null!=n&&(window.clearTimeout(n),fadeThead2=null);this.chromelessToolbar.style.display="";mxUtils.setOpacity(this.chromelessToolbar,a||30)});if("1"==urlParams.layers){this.layersDialog=null;var r=b(mxUtils.bind(this,function(b){if(null!=this.layersDialog)this.layersDialog.parentNode.removeChild(this.layersDialog),this.layersDialog=null;else{this.layersDialog=a.createLayersDialog();mxEvent.addListener(this.layersDialog,
-"mouseleave",mxUtils.bind(this,function(){this.layersDialog.parentNode.removeChild(this.layersDialog);this.layersDialog=null}));var c=r.getBoundingClientRect();mxUtils.setPrefixedStyle(this.layersDialog.style,"borderRadius","5px");this.layersDialog.style.position="fixed";this.layersDialog.style.fontFamily="Helvetica,Arial";this.layersDialog.style.backgroundColor="#000000";this.layersDialog.style.width="160px";this.layersDialog.style.padding="4px 2px 4px 2px";this.layersDialog.style.color="#ffffff";
-mxUtils.setOpacity(this.layersDialog,70);this.layersDialog.style.left=c.left+"px";this.layersDialog.style.bottom=parseInt(this.chromelessToolbar.style.bottom)+this.chromelessToolbar.offsetHeight+4+"px";c=mxUtils.getCurrentStyle(this.editor.graph.container);this.layersDialog.style.zIndex=c.zIndex;document.body.appendChild(this.layersDialog)}mxEvent.consume(b)}),Editor.layersLargeImage,mxResources.get("layers")),t=a.getModel();t.addListener(mxEvent.CHANGE,function(){r.style.display=1<t.getChildCount(t.root)?
-"":"none"})}this.addChromelessToolbarItems(b);null!=this.editor.editButtonLink&&b(mxUtils.bind(this,function(a){"_blank"==this.editor.editButtonLink?this.editor.editAsNew(this.getEditBlankXml(),null,!0):window.open(this.editor.editButtonLink,"editWindow");mxEvent.consume(a)}),Editor.editLargeImage,mxResources.get("openInNewWindow"));!a.lightbox||"1"!=urlParams.close&&this.container==document.body||b(mxUtils.bind(this,function(a){"1"==urlParams.close?window.close():(this.destroy(),mxEvent.consume(a))}),
-Editor.closeLargeImage,mxResources.get("close")+" (Escape)");this.chromelessToolbar.style.display="none";mxUtils.setPrefixedStyle(this.chromelessToolbar.style,"transform","translate(-50%,0)");a.container.appendChild(this.chromelessToolbar);mxEvent.addListener(a.container,mxClient.IS_POINTER?"pointermove":"mousemove",mxUtils.bind(this,function(a){mxEvent.isTouchEvent(a)||(mxEvent.isShiftDown(a)||q(30),p())}));mxEvent.addListener(this.chromelessToolbar,mxClient.IS_POINTER?"pointermove":"mousemove",
-function(a){mxEvent.consume(a)});mxEvent.addListener(this.chromelessToolbar,"mouseenter",mxUtils.bind(this,function(a){mxEvent.isShiftDown(a)?p():q(100)}));mxEvent.addListener(this.chromelessToolbar,"mousemove",mxUtils.bind(this,function(a){mxEvent.isShiftDown(a)?p():q(100);mxEvent.consume(a)}));mxEvent.addListener(this.chromelessToolbar,"mouseleave",mxUtils.bind(this,function(a){mxEvent.isTouchEvent(a)||q(30)}));var u=a.getTolerance(),w=this;a.addMouseListener({startX:0,startY:0,scrollLeft:0,scrollTop:0,
-mouseDown:function(b,c){this.startX=c.getGraphX();this.startY=c.getGraphY();this.scrollLeft=a.container.scrollLeft;this.scrollTop=a.container.scrollTop},mouseMove:function(a,b){},mouseUp:function(b,c){mxEvent.isTouchEvent(c.getEvent())&&Math.abs(this.scrollLeft-a.container.scrollLeft)<u&&Math.abs(this.scrollTop-a.container.scrollTop)<u&&Math.abs(this.startX-c.getGraphX())<u&&Math.abs(this.startY-c.getGraphY())<u&&(0<parseFloat(w.chromelessToolbar.style.opacity||0)?p():q(30))}})}this.editor.editable||
-this.addChromelessClickHandler()}else if(this.editor.extendCanvas){var v=a.view.validate;a.view.validate=function(){if(null!=this.graph.container&&mxUtils.hasScrollbars(this.graph.container)){var a=this.graph.getPagePadding(),b=this.graph.getPageSize();this.translate.x=a.x-(this.x0||0)*b.width;this.translate.y=a.y-(this.y0||0)*b.height}v.apply(this,arguments)};var A=a.sizeDidChange;a.sizeDidChange=function(){if(null!=this.container&&mxUtils.hasScrollbars(this.container)){var b=this.getPageLayout(),
-c=this.getPagePadding(),d=this.getPageSize(),f=Math.ceil(2*c.x+b.width*d.width),e=Math.ceil(2*c.y+b.height*d.height),g=a.minimumGraphSize;if(null==g||g.width!=f||g.height!=e)a.minimumGraphSize=new mxRectangle(0,0,f,e);f=c.x-b.x*d.width;c=c.y-b.y*d.height;this.autoTranslate||this.view.translate.x==f&&this.view.translate.y==c?A.apply(this,arguments):(this.autoTranslate=!0,this.view.x0=b.x,this.view.y0=b.y,b=a.view.translate.x,d=a.view.translate.y,a.view.setTranslate(f,c),a.container.scrollLeft+=Math.round((f-
-b)*a.view.scale),a.container.scrollTop+=Math.round((c-d)*a.view.scale),this.autoTranslate=!1)}}}a.updateZoomTimeout=null;a.cumulativeZoomFactor=1;var x=null;a.lazyZoom=function(b){null!=this.updateZoomTimeout&&window.clearTimeout(this.updateZoomTimeout);b?.15>this.view.scale*this.cumulativeZoomFactor?this.cumulativeZoomFactor=(this.view.scale+.01)/this.view.scale:(this.cumulativeZoomFactor*=this.zoomFactor,this.cumulativeZoomFactor=Math.round(this.view.scale*this.cumulativeZoomFactor*20)/20/this.view.scale):
-.15>=this.view.scale*this.cumulativeZoomFactor?this.cumulativeZoomFactor=(this.view.scale-.01)/this.view.scale:(this.cumulativeZoomFactor/=this.zoomFactor,this.cumulativeZoomFactor=Math.round(this.view.scale*this.cumulativeZoomFactor*20)/20/this.view.scale);this.cumulativeZoomFactor=Math.max(.01,Math.min(this.view.scale*this.cumulativeZoomFactor,160)/this.view.scale);this.updateZoomTimeout=window.setTimeout(mxUtils.bind(this,function(){this.zoom(this.cumulativeZoomFactor);null!=c&&c(!1);if(null!=
-x&&mxUtils.hasScrollbars(a.container)){var b=mxUtils.getOffset(a.container),d=a.container.offsetHeight/2-x.y+b.y;a.container.scrollLeft-=(a.container.offsetWidth/2-x.x+b.x)*(this.cumulativeZoomFactor-1);a.container.scrollTop-=d*(this.cumulativeZoomFactor-1)}this.cumulativeZoomFactor=1;this.updateZoomTimeout=null}),20)};mxEvent.addMouseWheelListener(mxUtils.bind(this,function(b,c){if((mxEvent.isAltDown(b)||mxEvent.isControlDown(b)&&!mxClient.IS_MAC||a.panningHandler.isActive())&&(null==this.dialogs||
-0==this.dialogs.length))for(var d=mxEvent.getSource(b);null!=d;){if(d==a.container){x=new mxPoint(mxEvent.getClientX(b),mxEvent.getClientY(b));a.lazyZoom(c);mxEvent.consume(b);break}d=d.parentNode}}))};EditorUi.prototype.addChromelessToolbarItems=function(a){a(mxUtils.bind(this,function(a){this.actions.get("print").funct();mxEvent.consume(a)}),Editor.printLargeImage,mxResources.get("print"))};
+a.width*b.width,this.scale*a.height*b.height)};a.getPreferredPageSize=function(a,b,c){a=this.getPageLayout();b=this.getPageSize();return new mxRectangle(0,0,a.width*b.width,a.height*b.height)};var c=null;if(this.editor.chromeless){this.chromelessResize=c=mxUtils.bind(this,function(b,c,d,f){if(null!=a.container){d=null!=d?d:0;f=null!=f?f:0;var e=a.pageVisible?a.view.getBackgroundPageBounds():a.getGraphBounds(),g=mxUtils.hasScrollbars(a.container),h=a.view.translate,k=a.view.scale,l=mxRectangle.fromRectangle(e);
+l.x=l.x/k-h.x;l.y=l.y/k-h.y;l.width/=k;l.height/=k;var h=a.container.scrollTop,m=a.container.scrollLeft,n=mxClient.IS_QUIRKS||8<=document.documentMode?20:14;if(8==document.documentMode||9==document.documentMode)n+=3;var p=a.container.offsetWidth-n,n=a.container.offsetHeight-n;b=b?Math.max(.3,Math.min(c||1,p/l.width)):k;c=(p-b*l.width)/2/b;var r=(n-b*l.height)/this.lightboxVerticalDivider/b;g&&(c=Math.max(c,0),r=Math.max(r,0));if(g||e.width<p||e.height<n)a.view.scaleAndTranslate(b,Math.floor(c-l.x),
+Math.floor(r-l.y)),a.container.scrollTop=h*b/k,a.container.scrollLeft=m*b/k;else if(0!=d||0!=f)e=a.view.translate,a.view.setTranslate(Math.floor(e.x+d/k),Math.floor(e.y+f/k))}});var d=mxUtils.bind(this,function(){c(!1)});mxEvent.addListener(window,"resize",d);this.destroyFunctions.push(function(){mxEvent.removeListener(window,"resize",d)});this.editor.addListener("resetGraphView",mxUtils.bind(this,function(){c(!0)}));this.actions.get("zoomIn").funct=function(b){a.zoomIn();c(!1)};this.actions.get("zoomOut").funct=
+function(b){a.zoomOut();c(!1)};if("0"!=urlParams.toolbar){this.chromelessToolbar=document.createElement("div");this.chromelessToolbar.style.position="fixed";this.chromelessToolbar.style.overflow="hidden";this.chromelessToolbar.style.boxSizing="border-box";this.chromelessToolbar.style.whiteSpace="nowrap";this.chromelessToolbar.style.backgroundColor="#000000";this.chromelessToolbar.style.padding="10px 10px 8px 10px";this.chromelessToolbar.style.left="50%";mxClient.IS_VML||(mxUtils.setPrefixedStyle(this.chromelessToolbar.style,
+"borderRadius","20px"),mxUtils.setPrefixedStyle(this.chromelessToolbar.style,"transition","opacity 600ms ease-in-out"));var b=mxUtils.bind(this,function(){var b=mxUtils.getCurrentStyle(a.container);this.chromelessToolbar.style.bottom=(null!=b?parseInt(b["margin-bottom"]||0):0)+(null!=this.tabContainer?20+parseInt(this.tabContainer.style.height):20)+"px"});this.editor.addListener("resetGraphView",b);b();var e=0,b=mxUtils.bind(this,function(a,b,c){e++;var d=document.createElement("span");d.style.paddingLeft=
+"8px";d.style.paddingRight="8px";d.style.cursor="pointer";mxEvent.addListener(d,"click",a);null!=c&&d.setAttribute("title",c);a=document.createElement("img");a.setAttribute("border","0");a.setAttribute("src",b);d.appendChild(a);this.chromelessToolbar.appendChild(d);return d}),f=b(mxUtils.bind(this,function(a){this.actions.get("previousPage").funct();mxEvent.consume(a)}),Editor.previousLargeImage,mxResources.get("previousPage")),h=document.createElement("div");h.style.display="inline-block";h.style.verticalAlign=
+"top";h.style.fontFamily="Helvetica,Arial";h.style.marginTop="8px";h.style.color="#ffffff";this.chromelessToolbar.appendChild(h);var g=b(mxUtils.bind(this,function(a){this.actions.get("nextPage").funct();mxEvent.consume(a)}),Editor.nextLargeImage,mxResources.get("nextPage")),k=mxUtils.bind(this,function(){null!=this.pages&&1<this.pages.length&&null!=this.currentPage&&(h.innerHTML="",mxUtils.write(h,mxUtils.indexOf(this.pages,this.currentPage)+1+" / "+this.pages.length))});f.style.paddingLeft="0px";
+f.style.paddingRight="4px";g.style.paddingLeft="4px";g.style.paddingRight="0px";var l=mxUtils.bind(this,function(){null!=this.pages&&1<this.pages.length&&null!=this.currentPage?(g.style.display="",f.style.display="",h.style.display="inline-block"):(g.style.display="none",f.style.display="none",h.style.display="none");k()});this.editor.addListener("resetGraphView",l);this.editor.addListener("pageSelected",k);b(mxUtils.bind(this,function(a){this.actions.get("zoomOut").funct();mxEvent.consume(a)}),Editor.zoomOutLargeImage,
+mxResources.get("zoomOut")+" (Alt+Mousewheel)");b(mxUtils.bind(this,function(a){this.actions.get("zoomIn").funct();mxEvent.consume(a)}),Editor.zoomInLargeImage,mxResources.get("zoomIn")+" (Alt+Mousewheel)");b(mxUtils.bind(this,function(b){a.lightbox?(1==a.view.scale?this.lightboxFit():a.zoomTo(1),c(!1)):c(!0);mxEvent.consume(b)}),Editor.actualSizeLargeImage,mxResources.get("fit"));var m=null,n=null,p=mxUtils.bind(this,function(a){null!=m&&(window.clearTimeout(m),fadeThead=null);null!=n&&(window.clearTimeout(n),
+fadeThead2=null);m=window.setTimeout(mxUtils.bind(this,function(){mxUtils.setOpacity(this.chromelessToolbar,0);m=null;n=window.setTimeout(mxUtils.bind(this,function(){this.chromelessToolbar.style.display="none";n=null}),600)}),a||200)}),q=mxUtils.bind(this,function(a){null!=m&&(window.clearTimeout(m),fadeThead=null);null!=n&&(window.clearTimeout(n),fadeThead2=null);this.chromelessToolbar.style.display="";mxUtils.setOpacity(this.chromelessToolbar,a||30)});if("1"==urlParams.layers){this.layersDialog=
+null;var r=b(mxUtils.bind(this,function(b){if(null!=this.layersDialog)this.layersDialog.parentNode.removeChild(this.layersDialog),this.layersDialog=null;else{this.layersDialog=a.createLayersDialog();mxEvent.addListener(this.layersDialog,"mouseleave",mxUtils.bind(this,function(){this.layersDialog.parentNode.removeChild(this.layersDialog);this.layersDialog=null}));var c=r.getBoundingClientRect();mxUtils.setPrefixedStyle(this.layersDialog.style,"borderRadius","5px");this.layersDialog.style.position=
+"fixed";this.layersDialog.style.fontFamily="Helvetica,Arial";this.layersDialog.style.backgroundColor="#000000";this.layersDialog.style.width="160px";this.layersDialog.style.padding="4px 2px 4px 2px";this.layersDialog.style.color="#ffffff";mxUtils.setOpacity(this.layersDialog,70);this.layersDialog.style.left=c.left+"px";this.layersDialog.style.bottom=parseInt(this.chromelessToolbar.style.bottom)+this.chromelessToolbar.offsetHeight+4+"px";c=mxUtils.getCurrentStyle(this.editor.graph.container);this.layersDialog.style.zIndex=
+c.zIndex;document.body.appendChild(this.layersDialog)}mxEvent.consume(b)}),Editor.layersLargeImage,mxResources.get("layers")),t=a.getModel();t.addListener(mxEvent.CHANGE,function(){r.style.display=1<t.getChildCount(t.root)?"":"none"})}this.addChromelessToolbarItems(b);null!=this.editor.editButtonLink&&b(mxUtils.bind(this,function(a){"_blank"==this.editor.editButtonLink?this.editor.editAsNew(this.getEditBlankXml(),null,!0):window.open(this.editor.editButtonLink,"editWindow");mxEvent.consume(a)}),Editor.editLargeImage,
+mxResources.get("openInNewWindow"));!a.lightbox||"1"!=urlParams.close&&this.container==document.body||b(mxUtils.bind(this,function(a){"1"==urlParams.close?window.close():(this.destroy(),mxEvent.consume(a))}),Editor.closeLargeImage,mxResources.get("close")+" (Escape)");this.chromelessToolbar.style.display="none";mxUtils.setPrefixedStyle(this.chromelessToolbar.style,"transform","translate(-50%,0)");a.container.appendChild(this.chromelessToolbar);mxEvent.addListener(a.container,mxClient.IS_POINTER?"pointermove":
+"mousemove",mxUtils.bind(this,function(a){mxEvent.isTouchEvent(a)||(mxEvent.isShiftDown(a)||q(30),p())}));mxEvent.addListener(this.chromelessToolbar,mxClient.IS_POINTER?"pointermove":"mousemove",function(a){mxEvent.consume(a)});mxEvent.addListener(this.chromelessToolbar,"mouseenter",mxUtils.bind(this,function(a){mxEvent.isShiftDown(a)?p():q(100)}));mxEvent.addListener(this.chromelessToolbar,"mousemove",mxUtils.bind(this,function(a){mxEvent.isShiftDown(a)?p():q(100);mxEvent.consume(a)}));mxEvent.addListener(this.chromelessToolbar,
+"mouseleave",mxUtils.bind(this,function(a){mxEvent.isTouchEvent(a)||q(30)}));var w=a.getTolerance(),u=this;a.addMouseListener({startX:0,startY:0,scrollLeft:0,scrollTop:0,mouseDown:function(b,c){this.startX=c.getGraphX();this.startY=c.getGraphY();this.scrollLeft=a.container.scrollLeft;this.scrollTop=a.container.scrollTop},mouseMove:function(a,b){},mouseUp:function(b,c){mxEvent.isTouchEvent(c.getEvent())&&Math.abs(this.scrollLeft-a.container.scrollLeft)<w&&Math.abs(this.scrollTop-a.container.scrollTop)<
+w&&Math.abs(this.startX-c.getGraphX())<w&&Math.abs(this.startY-c.getGraphY())<w&&(0<parseFloat(u.chromelessToolbar.style.opacity||0)?p():q(30))}})}this.editor.editable||this.addChromelessClickHandler()}else if(this.editor.extendCanvas){var v=a.view.validate;a.view.validate=function(){if(null!=this.graph.container&&mxUtils.hasScrollbars(this.graph.container)){var a=this.graph.getPagePadding(),b=this.graph.getPageSize();this.translate.x=a.x-(this.x0||0)*b.width;this.translate.y=a.y-(this.y0||0)*b.height}v.apply(this,
+arguments)};var A=a.sizeDidChange;a.sizeDidChange=function(){if(null!=this.container&&mxUtils.hasScrollbars(this.container)){var b=this.getPageLayout(),c=this.getPagePadding(),d=this.getPageSize(),f=Math.ceil(2*c.x+b.width*d.width),e=Math.ceil(2*c.y+b.height*d.height),g=a.minimumGraphSize;if(null==g||g.width!=f||g.height!=e)a.minimumGraphSize=new mxRectangle(0,0,f,e);f=c.x-b.x*d.width;c=c.y-b.y*d.height;this.autoTranslate||this.view.translate.x==f&&this.view.translate.y==c?A.apply(this,arguments):
+(this.autoTranslate=!0,this.view.x0=b.x,this.view.y0=b.y,b=a.view.translate.x,d=a.view.translate.y,a.view.setTranslate(f,c),a.container.scrollLeft+=Math.round((f-b)*a.view.scale),a.container.scrollTop+=Math.round((c-d)*a.view.scale),this.autoTranslate=!1)}}}a.updateZoomTimeout=null;a.cumulativeZoomFactor=1;var x=null;a.lazyZoom=function(b){null!=this.updateZoomTimeout&&window.clearTimeout(this.updateZoomTimeout);b?.15>this.view.scale*this.cumulativeZoomFactor?this.cumulativeZoomFactor=(this.view.scale+
+.01)/this.view.scale:(this.cumulativeZoomFactor*=this.zoomFactor,this.cumulativeZoomFactor=Math.round(this.view.scale*this.cumulativeZoomFactor*20)/20/this.view.scale):.15>=this.view.scale*this.cumulativeZoomFactor?this.cumulativeZoomFactor=(this.view.scale-.01)/this.view.scale:(this.cumulativeZoomFactor/=this.zoomFactor,this.cumulativeZoomFactor=Math.round(this.view.scale*this.cumulativeZoomFactor*20)/20/this.view.scale);this.cumulativeZoomFactor=Math.max(.01,Math.min(this.view.scale*this.cumulativeZoomFactor,
+160)/this.view.scale);this.updateZoomTimeout=window.setTimeout(mxUtils.bind(this,function(){var b=mxUtils.getOffset(a.container),d=0,f=0;null!=x&&(d=a.container.offsetWidth/2-x.x+b.x,f=a.container.offsetHeight/2-x.y+b.y);b=this.view.scale;this.zoom(this.cumulativeZoomFactor);this.view.scale!=b&&(null!=c&&c(!1,null,d*(this.cumulativeZoomFactor-1),f*(this.cumulativeZoomFactor-1)),!mxUtils.hasScrollbars(a.container)||0==d&&0==f||(a.container.scrollLeft-=d*(this.cumulativeZoomFactor-1),a.container.scrollTop-=
+f*(this.cumulativeZoomFactor-1)));this.cumulativeZoomFactor=1;this.updateZoomTimeout=null}),20)};mxEvent.addMouseWheelListener(mxUtils.bind(this,function(b,c){if((mxEvent.isAltDown(b)||mxEvent.isControlDown(b)&&!mxClient.IS_MAC||a.panningHandler.isActive())&&(null==this.dialogs||0==this.dialogs.length))for(var d=mxEvent.getSource(b);null!=d;){if(d==a.container){x=new mxPoint(mxEvent.getClientX(b),mxEvent.getClientY(b));a.lazyZoom(c);mxEvent.consume(b);break}d=d.parentNode}}))};
+EditorUi.prototype.addChromelessToolbarItems=function(a){a(mxUtils.bind(this,function(a){this.actions.get("print").funct();mxEvent.consume(a)}),Editor.printLargeImage,mxResources.get("print"))};
 EditorUi.prototype.createTemporaryGraph=function(a){a=new Graph(document.createElement("div"),null,null,a);a.resetViewOnRootChange=!1;a.setConnectable(!1);a.gridEnabled=!1;a.autoScroll=!1;a.setTooltips(!1);a.setEnabled(!1);a.container.style.visibility="hidden";a.container.style.position="absolute";a.container.style.overflow="hidden";a.container.style.height="1px";a.container.style.width="1px";return a};
 EditorUi.prototype.addChromelessClickHandler=function(){var a=urlParams.highlight;null!=a&&0<a.length&&(a="#"+a);this.editor.graph.addClickHandler(a)};EditorUi.prototype.toggleFormatPanel=function(a){this.formatWidth=a||0<this.formatWidth?0:240;this.formatContainer.style.display=a||0<this.formatWidth?"":"none";this.refresh();this.format.refresh();this.fireEvent(new mxEventObject("formatWidthChanged"))};
 EditorUi.prototype.lightboxFit=function(){if(this.isDiagramEmpty())this.editor.graph.view.setScale(1);else{var a=urlParams.border,c=60;null!=a&&(c=parseInt(a));this.editor.graph.maxFitScale=this.lightboxMaxFitScale;this.editor.graph.fit(c);this.editor.graph.maxFitScale=null}};EditorUi.prototype.isDiagramEmpty=function(){var a=this.editor.graph.getModel();return 1==a.getChildCount(a.root)&&0==a.getChildCount(a.getChildAt(a.root,0))};
@@ -2134,15 +2135,15 @@ Sidebar.prototype.expandedImage=mxClient.IS_SVG?"data:image/gif;base64,R0lGODlhD
 "/expanded.gif";Sidebar.prototype.tooltipImage=mxClient.IS_SVG?"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAA4AAAAbCAMAAAB7jU7LAAAACVBMVEX///+ZmZn///9Y2COLAAAAA3RSTlP//wDXyg1BAAAAOElEQVR42mXQMQ4AMAgDsWv//+iutcJmIQSk+9dJpVKpVCqVSqVSqZTdncWzF8/NeP7FkxWenPEDOnUBiL3jWx0AAAAASUVORK5CYII=":IMAGE_PATH+"/tooltip.png";
 Sidebar.prototype.searchImage=mxClient.IS_SVG?"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAwAAAAMCAYAAABWdVznAAAACXBIWXMAAAsTAAALEwEAmpwYAAAAIGNIUk0AAHolAACAgwAA+f8AAIDpAAB1MAAA6mAAADqYAAAXb5JfxUYAAAEaSURBVHjabNGxS5VxFIfxz71XaWuQUJCG/gCHhgTD9VpEETg4aMOlQRp0EoezObgcd220KQiXmpretTAHQRBdojlQEJyukPdt+b1ywfvAGc7wnHP4nlZd1yKijQW8xzNc4Su+ZOYfQ3T6/f4YNvEJYzjELXp4VVXVz263+7cR2niBxAFeZ2YPi3iHR/gYERPDwhpOsd6sz8x/mfkNG3iOlWFhFj8y89J9KvzGXER0GuEaD42mgwHqUtoljbcRsTBCeINpfM/MgZLKPpaxFxGbOCqDXmILN7hoJrTKH+axhxmcYRxP0MIDnOBDZv5q1XUNIuJxifJp+UNV7t7BFM6xeic0RMQ4Bpl5W/ol7GISx/eEUUTECrbx+f8A8xhiZht9zsgAAAAASUVORK5CYII=":IMAGE_PATH+
 "/search.png";Sidebar.prototype.enableTooltips=!0;Sidebar.prototype.tooltipBorder=16;Sidebar.prototype.tooltipDelay=300;Sidebar.prototype.dropTargetDelay=200;Sidebar.prototype.gearImage=STENCIL_PATH+"/clipart/Gear_128x128.png";Sidebar.prototype.thumbWidth=36;Sidebar.prototype.thumbHeight=36;Sidebar.prototype.thumbPadding=5<=document.documentMode?0:1;Sidebar.prototype.thumbBorder=2;Sidebar.prototype.sidebarTitleSize=9;Sidebar.prototype.sidebarTitles=!1;Sidebar.prototype.tooltipTitles=!0;
-Sidebar.prototype.maxTooltipWidth=400;Sidebar.prototype.maxTooltipHeight=400;Sidebar.prototype.addStencilsToIndex=!0;Sidebar.prototype.defaultImageWidth=80;Sidebar.prototype.defaultImageHeight=80;
+Sidebar.prototype.maxTooltipWidth=400;Sidebar.prototype.maxTooltipHeight=400;Sidebar.prototype.addStencilsToIndex=!0;Sidebar.prototype.defaultImageWidth=80;Sidebar.prototype.defaultImageHeight=80;Sidebar.prototype.getTooltipOffset=function(){return new mxPoint(0,0)};
 Sidebar.prototype.showTooltip=function(a,c,d,b,e,f){if(this.enableTooltips&&this.showTooltips&&this.currentElt!=a){null!=this.thread&&(window.clearTimeout(this.thread),this.thread=null);var h=mxUtils.bind(this,function(){null==this.tooltip&&(this.tooltip=document.createElement("div"),this.tooltip.className="geSidebarTooltip",this.tooltip.style.zIndex=mxPopupMenu.prototype.zIndex-1,document.body.appendChild(this.tooltip),this.graph2=new Graph(this.tooltip,null,null,this.editorUi.editor.graph.getStylesheet()),
 this.graph2.resetViewOnRootChange=!1,this.graph2.foldingEnabled=!1,this.graph2.gridEnabled=!1,this.graph2.autoScroll=!1,this.graph2.setTooltips(!1),this.graph2.setConnectable(!1),this.graph2.setEnabled(!1),mxClient.IS_SVG||(this.graph2.view.canvas.style.position="relative"),this.tooltipImage=mxUtils.createImage(this.tooltipImage),this.tooltipImage.className="geSidebarTooltipImage",this.tooltipImage.style.zIndex=mxPopupMenu.prototype.zIndex-1,this.tooltipImage.style.position="absolute",this.tooltipImage.style.width=
 "14px",this.tooltipImage.style.height="27px",document.body.appendChild(this.tooltipImage));this.graph2.model.clear();this.graph2.view.setTranslate(this.tooltipBorder,this.tooltipBorder);this.graph2.view.scale=d>this.maxTooltipWidth||b>this.maxTooltipHeight?Math.round(100*Math.min(this.maxTooltipWidth/d,this.maxTooltipHeight/b))/100:1;this.tooltip.style.display="block";this.graph2.labelsVisible=null==f||f;var g=mxClient.NO_FO;mxClient.NO_FO=Editor.prototype.originalNoForeignObject;this.graph2.addCells(c);
 mxClient.NO_FO=g;var h=this.graph2.getGraphBounds(),l=h.width+2*this.tooltipBorder+4,g=h.height+2*this.tooltipBorder;mxClient.IS_QUIRKS?(g+=4,this.tooltip.style.overflow="hidden"):this.tooltip.style.overflow="visible";this.tooltipImage.style.visibility="visible";this.tooltip.style.width=l+"px";this.tooltipTitles&&null!=e&&0<e.length?(null==this.tooltipTitle?(this.tooltipTitle=document.createElement("div"),this.tooltipTitle.style.borderTop="1px solid gray",this.tooltipTitle.style.textAlign="center",
 this.tooltipTitle.style.width="100%",this.tooltipTitle.style.overflow="hidden",mxClient.IS_SVG||(this.tooltipTitle.style.position="absolute"),this.tooltipTitle.style.paddingTop="6px",this.tooltip.appendChild(this.tooltipTitle)):this.tooltipTitle.innerHTML="",this.tooltipTitle.style.display="",mxUtils.write(this.tooltipTitle,e),l=this.tooltipTitle.offsetHeight+10,g+=l,mxClient.IS_SVG?this.tooltipTitle.style.marginTop=2-l+"px":(g-=6,this.tooltipTitle.style.top=g-l+"px")):null!=this.tooltipTitle&&null!=
-this.tooltipTitle.parentNode&&(this.tooltipTitle.style.display="none");this.tooltip.style.height=g+"px";var l=-Math.round(h.x-this.tooltipBorder),h=-Math.round(h.y-this.tooltipBorder),m=this.container.clientWidth+this.editorUi.splitSize+3+this.editorUi.container.offsetLeft,n=Math.min(Math.max(document.body.clientHeight||0,document.documentElement.clientHeight)-g-20,Math.max(0,this.editorUi.container.offsetTop+this.container.offsetTop+a.offsetTop-this.container.scrollTop-g/2+16));mxClient.IS_SVG?0!=
-l||0!=h?this.graph2.view.canvas.setAttribute("transform","translate("+l+","+h+")"):this.graph2.view.canvas.removeAttribute("transform"):(this.graph2.view.drawPane.style.left=l+"px",this.graph2.view.drawPane.style.top=h+"px");this.tooltip.style.position="absolute";this.tooltip.style.left=m+"px";this.tooltip.style.top=n+"px";this.tooltipImage.style.left=m-13+"px";this.tooltipImage.style.top=n+g/2-13+"px"});null!=this.tooltip&&"none"!=this.tooltip.style.display?h():this.thread=window.setTimeout(h,this.tooltipDelay);
-this.currentElt=a}};Sidebar.prototype.hideTooltip=function(){null!=this.thread&&(window.clearTimeout(this.thread),this.thread=null);null!=this.tooltip&&(this.tooltip.style.display="none",this.tooltipImage.style.visibility="hidden",this.currentElt=null)};Sidebar.prototype.addDataEntry=function(a,c,d,b,e){return this.addEntry(a,mxUtils.bind(this,function(){return this.createVertexTemplateFromData(e,c,d,b)}))};
+this.tooltipTitle.parentNode&&(this.tooltipTitle.style.display="none");this.tooltip.style.height=g+"px";var l=-Math.round(h.x-this.tooltipBorder),h=-Math.round(h.y-this.tooltipBorder),m=document.body,n=document.documentElement,p=this.getTooltipOffset(),q=this.container.clientWidth+this.editorUi.splitSize+3+this.editorUi.container.offsetLeft+p.x,m=Math.min(Math.max(m.clientHeight||0,n.clientHeight)-g-20,Math.max(0,this.editorUi.container.offsetTop+this.container.offsetTop+a.offsetTop-this.container.scrollTop-
+g/2+16))+p.y;mxClient.IS_SVG?0!=l||0!=h?this.graph2.view.canvas.setAttribute("transform","translate("+l+","+h+")"):this.graph2.view.canvas.removeAttribute("transform"):(this.graph2.view.drawPane.style.left=l+"px",this.graph2.view.drawPane.style.top=h+"px");this.tooltip.style.position="absolute";this.tooltip.style.left=q+"px";this.tooltip.style.top=m+"px";this.tooltipImage.style.left=q-13+"px";this.tooltipImage.style.top=m+g/2-13+"px"});null!=this.tooltip&&"none"!=this.tooltip.style.display?h():this.thread=
+window.setTimeout(h,this.tooltipDelay);this.currentElt=a}};Sidebar.prototype.hideTooltip=function(){null!=this.thread&&(window.clearTimeout(this.thread),this.thread=null);null!=this.tooltip&&(this.tooltip.style.display="none",this.tooltipImage.style.visibility="hidden",this.currentElt=null)};Sidebar.prototype.addDataEntry=function(a,c,d,b,e){return this.addEntry(a,mxUtils.bind(this,function(){return this.createVertexTemplateFromData(e,c,d,b)}))};
 Sidebar.prototype.addEntry=function(a,c){if(null!=this.taglist&&null!=a&&0<a.length)for(var d=a.toLowerCase().replace(/[\/\,\(\)]/g," ").split(" "),b=mxUtils.bind(this,function(a){if(1<a.length){var b=this.taglist[a];"object"!==typeof b&&(b={entries:[],dict:new mxDictionary},this.taglist[a]=b);null==b.dict.get(c)&&(b.dict.put(c,c),b.entries.push(c))}}),e=0;e<d.length;e++){b(d[e]);var f=d[e].replace(/\.*\d*$/,"");f!=d[e]&&b(f)}return c};
 Sidebar.prototype.searchEntries=function(a,c,d,b,e){if(null!=this.taglist&&null!=a){var f=a.toLowerCase().split(" ");e=new mxDictionary;var h=(d+1)*c;a=[];for(var g=0,k=0;k<f.length;k++)if(0<f[k].length){var l=this.taglist[f[k]],m=new mxDictionary;if(null!=l){var n=l.entries;a=[];for(var p=0;p<n.length;p++)if(l=n[p],0==g==(null==e.get(l))&&(m.put(l,l),a.push(l),k==f.length-1&&a.length==h)){b(a.slice(d*c,h),h,!0,f);return}}else a=[];e=m;g++}e=a.length;b(a.slice(d*c,(d+1)*c),e,!1,f)}else b([],null,
 null,f)};Sidebar.prototype.filterTags=function(a){if(null!=a){a=a.split(" ");for(var c=[],d={},b=0;b<a.length;b++)null==d[a[b]]&&(d[a[b]]="1",c.push(a[b]));return c.join(" ")}return null};Sidebar.prototype.cloneCell=function(a,c){var d=a.clone();null!=c&&(d.value=c);return d};
@@ -2263,10 +2264,10 @@ Sidebar.prototype.updateShapes=function(a,c){var d=this.editorUi.editor.graph,b=
 d.view.getState(k),m=null!=l?l.style:d.getCellStyle(c[g]);d.getModel().setStyle(k,f);if(null!=l&&"1"==mxUtils.getValue(l.style,"composite","0"))for(var n=d.model.getChildCount(k);0<=n;n--)d.model.remove(d.model.getChildAt(k,n));if(null!=m)for("umlLifeline"==m[mxConstants.STYLE_SHAPE]&&"umlLifeline"!=b[mxConstants.STYLE_SHAPE]&&(d.setCellStyles(mxConstants.STYLE_SHAPE,"umlLifeline",[k]),d.setCellStyles("participant",b[mxConstants.STYLE_SHAPE],[k])),n=0;n<h.length;n++){var p=m[h[n]];null!=p&&d.setCellStyles(h[n],
 p,[k])}e.push(k)}}}finally{d.model.endUpdate()}return e};
 Sidebar.prototype.createDropHandler=function(a,c,d,b){d=null!=d?d:!0;return mxUtils.bind(this,function(e,f,h,g,k){if(e.isEnabled()){a=e.getImportableCells(a);if(0<a.length){e.stopEditing();var l=null==h||mxEvent.isAltDown(f)?!1:e.isValidDropTarget(h,a,f),m=null;null==h||l||(h=null);if(!e.isCellLocked(h||e.getDefaultParent())){e.model.beginUpdate();try{g=Math.round(g);k=Math.round(k);if(c&&e.isSplitTarget(h,a,f)){var n=e.cloneCells(a);e.splitEdge(h,n,null,g-b.width/2,k-b.height/2);m=n}else 0<a.length&&
-(m=e.importCells(a,g,k,h));if(null!=e.layoutManager){var p=e.layoutManager.getLayout(h);if(null!=p){var q=e.view.scale,r=e.view.translate,t=(g+r.x)*q,u=(k+r.y)*q;for(h=0;h<m.length;h++)p.moveCell(m[h],t,u)}}d&&e.fireEvent(new mxEventObject("cellsInserted","cells",m))}finally{e.model.endUpdate()}null!=m&&0<m.length&&(e.scrollCellToVisible(m[0]),e.setSelectionCells(m))}}mxEvent.consume(f)}})};
+(m=e.importCells(a,g,k,h));if(null!=e.layoutManager){var p=e.layoutManager.getLayout(h);if(null!=p){var q=e.view.scale,r=e.view.translate,t=(g+r.x)*q,w=(k+r.y)*q;for(h=0;h<m.length;h++)p.moveCell(m[h],t,w)}}d&&e.fireEvent(new mxEventObject("cellsInserted","cells",m))}finally{e.model.endUpdate()}null!=m&&0<m.length&&(e.scrollCellToVisible(m[0]),e.setSelectionCells(m))}}mxEvent.consume(f)}})};
 Sidebar.prototype.createDragPreview=function(a,c){var d=document.createElement("div");d.style.border="1px dashed black";d.style.width=a+"px";d.style.height=c+"px";return d};
 Sidebar.prototype.dropAndConnect=function(a,c,d,b){var e=this.getDropAndConnectGeometry(a,c[b],d,c),f=[];if(null!=e){var h=this.editorUi.editor.graph;h.model.beginUpdate();try{var g=h.getCellGeometry(a),k=h.getCellGeometry(c[b]),l=h.model.getParent(a),m=!0;if(null!=h.layoutManager){var n=h.layoutManager.getLayout(l);if(null!=n&&n.constructor==mxStackLayout&&(m=!1,f=h.view.getState(l),null!=f)){var p=new mxPoint(f.x/h.view.scale-h.view.translate.x,f.y/h.view.scale-h.view.translate.y);e.x+=p.x;e.y+=
-p.y;var q=e.getTerminalPoint(!1);null!=q&&(q.x+=p.x,q.y+=p.y)}}var r=k.x,t=k.y;h.model.isEdge(c[b])&&(t=r=0);var u=h.model.isEdge(a)||null!=g&&!g.relative&&m,f=c=h.importCells(c,e.x-(u?r:0),e.y-(u?t:0),u?l:null);if(h.model.isEdge(a))h.model.setTerminal(a,c[b],d==mxConstants.DIRECTION_NORTH);else if(h.model.isEdge(c[b])){h.model.setTerminal(c[b],a,!0);var w=h.getCellGeometry(c[b]);w.points=null;if(null!=w.getTerminalPoint(!1))w.setTerminalPoint(e.getTerminalPoint(!1),!1);else if(u&&h.model.isVertex(l)){var v=
+p.y;var q=e.getTerminalPoint(!1);null!=q&&(q.x+=p.x,q.y+=p.y)}}var r=k.x,t=k.y;h.model.isEdge(c[b])&&(t=r=0);var w=h.model.isEdge(a)||null!=g&&!g.relative&&m,f=c=h.importCells(c,e.x-(w?r:0),e.y-(w?t:0),w?l:null);if(h.model.isEdge(a))h.model.setTerminal(a,c[b],d==mxConstants.DIRECTION_NORTH);else if(h.model.isEdge(c[b])){h.model.setTerminal(c[b],a,!0);var u=h.getCellGeometry(c[b]);u.points=null;if(null!=u.getTerminalPoint(!1))u.setTerminalPoint(e.getTerminalPoint(!1),!1);else if(w&&h.model.isVertex(l)){var v=
 h.view.getState(l),p=v.cell!=h.view.currentRoot?new mxPoint(v.x/h.view.scale-h.view.translate.x,v.y/h.view.scale-h.view.translate.y):new mxPoint(0,0);h.cellsMoved(c,p.x,p.y,null,null,!0)}}else k=h.getCellGeometry(c[b]),r=e.x-Math.round(k.x),t=e.y-Math.round(k.y),e.x=Math.round(k.x),e.y=Math.round(k.y),h.model.setGeometry(c[b],e),h.cellsMoved(c,r,t,null,null,!0),f=c.slice(),c.push(h.insertEdge(null,null,"",a,c[b],h.createCurrentEdgeStyle()));h.fireEvent(new mxEventObject("cellsInserted","cells",c))}finally{h.model.endUpdate()}}return f};
 Sidebar.prototype.getDropAndConnectGeometry=function(a,c,d,b){var e=this.editorUi.editor.graph,f=e.view,h=1<b.length,g=e.getCellGeometry(a);b=e.getCellGeometry(c);null!=g&&null!=b&&(b=b.clone(),e.model.isEdge(a)?(a=e.view.getState(a),g=a.absolutePoints,c=g[0],e=g[g.length-1],d==mxConstants.DIRECTION_NORTH?(b.x=c.x/f.scale-f.translate.x-b.width/2,b.y=c.y/f.scale-f.translate.y-b.height/2):(b.x=e.x/f.scale-f.translate.x-b.width/2,b.y=e.y/f.scale-f.translate.y-b.height/2)):(g.relative&&(a=e.view.getState(a),
 g=g.clone(),g.x=(a.x-f.translate.x)/f.scale,g.y=(a.y-f.translate.y)/f.scale),f=e.defaultEdgeLength,e.model.isEdge(c)&&null!=b.getTerminalPoint(!0)&&null!=b.getTerminalPoint(!1)?(c=b.getTerminalPoint(!0),e=b.getTerminalPoint(!1),f=e.x-c.x,c=e.y-c.y,f=Math.sqrt(f*f+c*c),b.x=g.getCenterX(),b.y=g.getCenterY(),b.width=1,b.height=1,d==mxConstants.DIRECTION_NORTH?(b.height=f,b.y=g.y-f,b.setTerminalPoint(new mxPoint(b.x,b.y),!1)):d==mxConstants.DIRECTION_EAST?(b.width=f,b.x=g.x+g.width,b.setTerminalPoint(new mxPoint(b.x+
@@ -2274,27 +2275,27 @@ b.width,b.y),!1)):d==mxConstants.DIRECTION_SOUTH?(b.height=f,b.y=g.y+g.height,b.
 b.width/2+f:d==mxConstants.DIRECTION_SOUTH?b.y=b.y+g.height/2+b.height/2+f:d==mxConstants.DIRECTION_WEST&&(b.x=b.x-g.width/2-b.width/2-f),e.model.isEdge(c)&&null!=b.getTerminalPoint(!0)&&null!=c.getTerminal(!1)&&(g=e.getCellGeometry(c.getTerminal(!1)),null!=g&&(d==mxConstants.DIRECTION_NORTH?(b.x-=g.getCenterX(),b.y-=g.getCenterY()+g.height/2):d==mxConstants.DIRECTION_EAST?(b.x-=g.getCenterX()-g.width/2,b.y-=g.getCenterY()):d==mxConstants.DIRECTION_SOUTH?(b.x-=g.getCenterX(),b.y-=g.getCenterY()-g.height/
 2):d==mxConstants.DIRECTION_WEST&&(b.x-=g.getCenterX()+g.width/2,b.y-=g.getCenterY()))))));return b};
 Sidebar.prototype.createDragSource=function(a,c,d,b,e){function f(a,b){var c;mxClient.IS_IE&&!mxClient.IS_SVG?(mxClient.IS_IE6&&"CSS1Compat"!=document.compatMode?(c=document.createElement(mxClient.VML_PREFIX+":image"),c.setAttribute("src",a.src),c.style.borderStyle="none"):(c=document.createElement("div"),c.style.backgroundImage="url("+a.src+")",c.style.backgroundPosition="center",c.style.backgroundRepeat="no-repeat"),c.style.width=a.width+4+"px",c.style.height=a.height+4+"px",c.style.display=mxClient.IS_QUIRKS?
-"inline":"inline-block"):(c=mxUtils.createImage(a.src),c.style.width=a.width+"px",c.style.height=a.height+"px");null!=b&&c.setAttribute("title",b);mxUtils.setOpacity(c,a==this.refreshTarget?30:20);c.style.position="absolute";c.style.cursor="crosshair";return c}function h(a,b,c,d){null!=d.parentNode&&(mxUtils.contains(c,a,b)?(mxUtils.setOpacity(d,100),E=d):mxUtils.setOpacity(d,d==y?30:20));return c}for(var g=this.editorUi,k=g.editor.graph,l=null,m=null,n=this,p=0;p<b.length&&(null==m&&this.editorUi.editor.graph.model.isVertex(b[p])?
-m=p:null==l&&this.editorUi.editor.graph.model.isEdge(b[p])&&null==this.editorUi.editor.graph.model.getTerminal(b[p],!0)&&(l=p),null==m||null==l);p++);var q=mxUtils.makeDraggable(a,this.editorUi.editor.graph,mxUtils.bind(this,function(a,d,f,e,g){null!=this.updateThread&&window.clearTimeout(this.updateThread);if(null!=b&&null!=w&&E==y){var h=a.isCellSelected(w.cell)?a.getSelectionCells():[w.cell],h=this.updateShapes(a.model.isEdge(w.cell)?b[0]:b[m],h);a.setSelectionCells(h)}else null!=b&&null!=E&&null!=
-t&&E!=y?(h=a.model.isEdge(t.cell)||null==l?m:l,a.setSelectionCells(this.dropAndConnect(t.cell,b,F,h))):c.apply(this,arguments);null!=this.editorUi.hoverIcons&&this.editorUi.hoverIcons.update(a.view.getState(a.getSelectionCell()))}),d,0,0,this.editorUi.editor.graph.autoscroll,!0,!0);this.editorUi.editor.graph.addListener(mxEvent.ESCAPE,function(a,b){q.isActive()&&q.reset()});var r=q.mouseDown;q.mouseDown=function(a){mxEvent.isPopupTrigger(a)||mxEvent.isMultiTouchEvent(a)||(k.stopEditing(),r.apply(this,
-arguments))};var t=null,u=null,w=null,v=!1,A=f(this.triangleUp,mxResources.get("connect")),x=f(this.triangleRight,mxResources.get("connect")),C=f(this.triangleDown,mxResources.get("connect")),B=f(this.triangleLeft,mxResources.get("connect")),y=f(this.refreshTarget,mxResources.get("replace")),J=null,K=f(this.roundDrop),I=f(this.roundDrop),F=mxConstants.DIRECTION_NORTH,E=null,N=q.createPreviewElement;q.createPreviewElement=function(a){var b=N.apply(this,arguments);mxClient.IS_SVG&&(b.style.pointerEvents=
-"none");this.previewElementWidth=b.style.width;this.previewElementHeight=b.style.height;return b};var M=q.dragEnter;q.dragEnter=function(a,b){null!=g.hoverIcons&&g.hoverIcons.setDisplay("none");M.apply(this,arguments)};var Q=q.dragExit;q.dragExit=function(a,b){null!=g.hoverIcons&&g.hoverIcons.setDisplay("");Q.apply(this,arguments)};q.dragOver=function(a,c){mxDragSource.prototype.dragOver.apply(this,arguments);null!=this.currentGuide&&null!=E&&this.currentGuide.hide();if(null!=this.previewElement){var d=
-a.view;if(null!=w&&E==y)this.previewElement.style.display=a.model.isEdge(w.cell)?"none":"",this.previewElement.style.left=w.x+"px",this.previewElement.style.top=w.y+"px",this.previewElement.style.width=w.width+"px",this.previewElement.style.height=w.height+"px";else if(null!=t&&null!=E){var f=a.model.isEdge(t.cell)||null==l?m:l,g=n.getDropAndConnectGeometry(t.cell,b[f],F,b),h=a.model.isEdge(t.cell)?null:a.getCellGeometry(t.cell),k=a.getCellGeometry(b[f]),z=a.model.getParent(t.cell),D=d.translate.x*
-d.scale,H=d.translate.y*d.scale;null!=h&&!h.relative&&a.model.isVertex(z)&&z!=d.currentRoot&&(H=d.getState(z),D=H.x,H=H.y);h=k.x;k=k.y;a.model.isEdge(b[f])&&(k=h=0);this.previewElement.style.left=(g.x-h)*d.scale+D+"px";this.previewElement.style.top=(g.y-k)*d.scale+H+"px";1==b.length&&(this.previewElement.style.width=g.width*d.scale+"px",this.previewElement.style.height=g.height*d.scale+"px");this.previewElement.style.display=""}else null!=q.currentHighlight.state&&a.model.isEdge(q.currentHighlight.state.cell)?
-(this.previewElement.style.left=Math.round(parseInt(this.previewElement.style.left)-e.width*d.scale/2)+"px",this.previewElement.style.top=Math.round(parseInt(this.previewElement.style.top)-e.height*d.scale/2)+"px"):(this.previewElement.style.width=this.previewElementWidth,this.previewElement.style.height=this.previewElementHeight,this.previewElement.style.display="")}};var O=(new Date).getTime(),G=0,D=null,H=this.editorUi.editor.graph.getCellStyle(b[0]);q.getDropTarget=mxUtils.bind(this,function(a,
-c,d,f){var e=mxEvent.isAltDown(f)||null==b?null:a.getCellAt(c,d);if(null!=e&&!this.graph.isCellConnectable(e)){var g=this.graph.getModel().getParent(e);this.graph.getModel().isVertex(g)&&this.graph.isCellConnectable(g)&&(e=g)}a.isCellLocked(e)&&(e=null);var k=a.view.getState(e),g=E=null;D!=k?(D=k,O=(new Date).getTime(),G=0,null!=this.updateThread&&window.clearTimeout(this.updateThread),null!=k&&(this.updateThread=window.setTimeout(function(){null==E&&(D=k,q.getDropTarget(a,c,d,f))},this.dropTargetDelay+
-10))):G=(new Date).getTime()-O;if(2500>G&&null!=k&&!mxEvent.isShiftDown(f)&&(mxUtils.getValue(k.style,mxConstants.STYLE_SHAPE)!=mxUtils.getValue(H,mxConstants.STYLE_SHAPE)&&mxUtils.getValue(k.style,mxConstants.STYLE_STROKECOLOR,mxConstants.NONE)!=mxConstants.NONE||"image"==mxUtils.getValue(H,mxConstants.STYLE_SHAPE)||1500<G||a.model.isEdge(k.cell))&&G>this.dropTargetDelay&&(a.model.isVertex(k.cell)&&null!=m||a.model.isEdge(k.cell)&&a.model.isEdge(b[0]))){w=k;var l=a.model.isEdge(k.cell)?a.view.getPoint(k):
-new mxPoint(k.getCenterX(),k.getCenterY()),l=new mxRectangle(l.x-this.refreshTarget.width/2,l.y-this.refreshTarget.height/2,this.refreshTarget.width,this.refreshTarget.height);y.style.left=Math.floor(l.x)+"px";y.style.top=Math.floor(l.y)+"px";null==J&&(a.container.appendChild(y),J=y.parentNode);h(c,d,l,y)}else null==w||!mxUtils.contains(w,c,d)||1500<G&&!mxEvent.isShiftDown(f)?(w=null,null!=J&&(y.parentNode.removeChild(y),J=null)):null!=w&&null!=J&&(l=a.model.isEdge(w.cell)?a.view.getPoint(w):new mxPoint(w.getCenterX(),
-w.getCenterY()),l=new mxRectangle(l.x-this.refreshTarget.width/2,l.y-this.refreshTarget.height/2,this.refreshTarget.width,this.refreshTarget.height),h(c,d,l,y));if(v&&null!=t&&!mxEvent.isAltDown(f)&&null==E){g=mxRectangle.fromRectangle(t);if(a.model.isEdge(t.cell)){var z=t.absolutePoints;null!=K.parentNode&&(l=z[0],g.add(h(c,d,new mxRectangle(l.x-this.roundDrop.width/2,l.y-this.roundDrop.height/2,this.roundDrop.width,this.roundDrop.height),K)));null!=I.parentNode&&(z=z[z.length-1],g.add(h(c,d,new mxRectangle(z.x-
-this.roundDrop.width/2,z.y-this.roundDrop.height/2,this.roundDrop.width,this.roundDrop.height),I)))}else l=mxRectangle.fromRectangle(t),null!=t.shape&&null!=t.shape.boundingBox&&(l=mxRectangle.fromRectangle(t.shape.boundingBox)),l.grow(this.graph.tolerance),l.grow(HoverIcons.prototype.arrowSpacing),z=this.graph.selectionCellsHandler.getHandler(t.cell),null!=z&&(l.x-=z.horizontalOffset/2,l.y-=z.verticalOffset/2,l.width+=z.horizontalOffset,l.height+=z.verticalOffset,null!=z.rotationShape&&null!=z.rotationShape.node&&
+"inline":"inline-block"):(c=mxUtils.createImage(a.src),c.style.width=a.width+"px",c.style.height=a.height+"px");null!=b&&c.setAttribute("title",b);mxUtils.setOpacity(c,a==this.refreshTarget?30:20);c.style.position="absolute";c.style.cursor="crosshair";return c}function h(a,b,c,d){null!=d.parentNode&&(mxUtils.contains(c,a,b)?(mxUtils.setOpacity(d,100),D=d):mxUtils.setOpacity(d,d==y?30:20));return c}for(var g=this.editorUi,k=g.editor.graph,l=null,m=null,n=this,p=0;p<b.length&&(null==m&&this.editorUi.editor.graph.model.isVertex(b[p])?
+m=p:null==l&&this.editorUi.editor.graph.model.isEdge(b[p])&&null==this.editorUi.editor.graph.model.getTerminal(b[p],!0)&&(l=p),null==m||null==l);p++);var q=mxUtils.makeDraggable(a,this.editorUi.editor.graph,mxUtils.bind(this,function(a,d,f,e,g){null!=this.updateThread&&window.clearTimeout(this.updateThread);if(null!=b&&null!=u&&D==y){var h=a.isCellSelected(u.cell)?a.getSelectionCells():[u.cell],h=this.updateShapes(a.model.isEdge(u.cell)?b[0]:b[m],h);a.setSelectionCells(h)}else null!=b&&null!=D&&null!=
+t&&D!=y?(h=a.model.isEdge(t.cell)||null==l?m:l,a.setSelectionCells(this.dropAndConnect(t.cell,b,G,h))):c.apply(this,arguments);null!=this.editorUi.hoverIcons&&this.editorUi.hoverIcons.update(a.view.getState(a.getSelectionCell()))}),d,0,0,this.editorUi.editor.graph.autoscroll,!0,!0);this.editorUi.editor.graph.addListener(mxEvent.ESCAPE,function(a,b){q.isActive()&&q.reset()});var r=q.mouseDown;q.mouseDown=function(a){mxEvent.isPopupTrigger(a)||mxEvent.isMultiTouchEvent(a)||(k.stopEditing(),r.apply(this,
+arguments))};var t=null,w=null,u=null,v=!1,A=f(this.triangleUp,mxResources.get("connect")),x=f(this.triangleRight,mxResources.get("connect")),B=f(this.triangleDown,mxResources.get("connect")),C=f(this.triangleLeft,mxResources.get("connect")),y=f(this.refreshTarget,mxResources.get("replace")),I=null,L=f(this.roundDrop),J=f(this.roundDrop),G=mxConstants.DIRECTION_NORTH,D=null,K=q.createPreviewElement;q.createPreviewElement=function(a){var b=K.apply(this,arguments);mxClient.IS_SVG&&(b.style.pointerEvents=
+"none");this.previewElementWidth=b.style.width;this.previewElementHeight=b.style.height;return b};var N=q.dragEnter;q.dragEnter=function(a,b){null!=g.hoverIcons&&g.hoverIcons.setDisplay("none");N.apply(this,arguments)};var P=q.dragExit;q.dragExit=function(a,b){null!=g.hoverIcons&&g.hoverIcons.setDisplay("");P.apply(this,arguments)};q.dragOver=function(a,c){mxDragSource.prototype.dragOver.apply(this,arguments);null!=this.currentGuide&&null!=D&&this.currentGuide.hide();if(null!=this.previewElement){var d=
+a.view;if(null!=u&&D==y)this.previewElement.style.display=a.model.isEdge(u.cell)?"none":"",this.previewElement.style.left=u.x+"px",this.previewElement.style.top=u.y+"px",this.previewElement.style.width=u.width+"px",this.previewElement.style.height=u.height+"px";else if(null!=t&&null!=D){var f=a.model.isEdge(t.cell)||null==l?m:l,g=n.getDropAndConnectGeometry(t.cell,b[f],G,b),h=a.model.isEdge(t.cell)?null:a.getCellGeometry(t.cell),k=a.getCellGeometry(b[f]),z=a.model.getParent(t.cell),E=d.translate.x*
+d.scale,H=d.translate.y*d.scale;null!=h&&!h.relative&&a.model.isVertex(z)&&z!=d.currentRoot&&(H=d.getState(z),E=H.x,H=H.y);h=k.x;k=k.y;a.model.isEdge(b[f])&&(k=h=0);this.previewElement.style.left=(g.x-h)*d.scale+E+"px";this.previewElement.style.top=(g.y-k)*d.scale+H+"px";1==b.length&&(this.previewElement.style.width=g.width*d.scale+"px",this.previewElement.style.height=g.height*d.scale+"px");this.previewElement.style.display=""}else null!=q.currentHighlight.state&&a.model.isEdge(q.currentHighlight.state.cell)?
+(this.previewElement.style.left=Math.round(parseInt(this.previewElement.style.left)-e.width*d.scale/2)+"px",this.previewElement.style.top=Math.round(parseInt(this.previewElement.style.top)-e.height*d.scale/2)+"px"):(this.previewElement.style.width=this.previewElementWidth,this.previewElement.style.height=this.previewElementHeight,this.previewElement.style.display="")}};var O=(new Date).getTime(),F=0,E=null,H=this.editorUi.editor.graph.getCellStyle(b[0]);q.getDropTarget=mxUtils.bind(this,function(a,
+c,d,f){var e=mxEvent.isAltDown(f)||null==b?null:a.getCellAt(c,d);if(null!=e&&!this.graph.isCellConnectable(e)){var g=this.graph.getModel().getParent(e);this.graph.getModel().isVertex(g)&&this.graph.isCellConnectable(g)&&(e=g)}a.isCellLocked(e)&&(e=null);var k=a.view.getState(e),g=D=null;E!=k?(E=k,O=(new Date).getTime(),F=0,null!=this.updateThread&&window.clearTimeout(this.updateThread),null!=k&&(this.updateThread=window.setTimeout(function(){null==D&&(E=k,q.getDropTarget(a,c,d,f))},this.dropTargetDelay+
+10))):F=(new Date).getTime()-O;if(2500>F&&null!=k&&!mxEvent.isShiftDown(f)&&(mxUtils.getValue(k.style,mxConstants.STYLE_SHAPE)!=mxUtils.getValue(H,mxConstants.STYLE_SHAPE)&&mxUtils.getValue(k.style,mxConstants.STYLE_STROKECOLOR,mxConstants.NONE)!=mxConstants.NONE||"image"==mxUtils.getValue(H,mxConstants.STYLE_SHAPE)||1500<F||a.model.isEdge(k.cell))&&F>this.dropTargetDelay&&(a.model.isVertex(k.cell)&&null!=m||a.model.isEdge(k.cell)&&a.model.isEdge(b[0]))){u=k;var l=a.model.isEdge(k.cell)?a.view.getPoint(k):
+new mxPoint(k.getCenterX(),k.getCenterY()),l=new mxRectangle(l.x-this.refreshTarget.width/2,l.y-this.refreshTarget.height/2,this.refreshTarget.width,this.refreshTarget.height);y.style.left=Math.floor(l.x)+"px";y.style.top=Math.floor(l.y)+"px";null==I&&(a.container.appendChild(y),I=y.parentNode);h(c,d,l,y)}else null==u||!mxUtils.contains(u,c,d)||1500<F&&!mxEvent.isShiftDown(f)?(u=null,null!=I&&(y.parentNode.removeChild(y),I=null)):null!=u&&null!=I&&(l=a.model.isEdge(u.cell)?a.view.getPoint(u):new mxPoint(u.getCenterX(),
+u.getCenterY()),l=new mxRectangle(l.x-this.refreshTarget.width/2,l.y-this.refreshTarget.height/2,this.refreshTarget.width,this.refreshTarget.height),h(c,d,l,y));if(v&&null!=t&&!mxEvent.isAltDown(f)&&null==D){g=mxRectangle.fromRectangle(t);if(a.model.isEdge(t.cell)){var z=t.absolutePoints;null!=L.parentNode&&(l=z[0],g.add(h(c,d,new mxRectangle(l.x-this.roundDrop.width/2,l.y-this.roundDrop.height/2,this.roundDrop.width,this.roundDrop.height),L)));null!=J.parentNode&&(z=z[z.length-1],g.add(h(c,d,new mxRectangle(z.x-
+this.roundDrop.width/2,z.y-this.roundDrop.height/2,this.roundDrop.width,this.roundDrop.height),J)))}else l=mxRectangle.fromRectangle(t),null!=t.shape&&null!=t.shape.boundingBox&&(l=mxRectangle.fromRectangle(t.shape.boundingBox)),l.grow(this.graph.tolerance),l.grow(HoverIcons.prototype.arrowSpacing),z=this.graph.selectionCellsHandler.getHandler(t.cell),null!=z&&(l.x-=z.horizontalOffset/2,l.y-=z.verticalOffset/2,l.width+=z.horizontalOffset,l.height+=z.verticalOffset,null!=z.rotationShape&&null!=z.rotationShape.node&&
 "hidden"!=z.rotationShape.node.style.visibility&&"none"!=z.rotationShape.node.style.display&&null!=z.rotationShape.boundingBox&&l.add(z.rotationShape.boundingBox)),g.add(h(c,d,new mxRectangle(t.getCenterX()-this.triangleUp.width/2,l.y-this.triangleUp.height,this.triangleUp.width,this.triangleUp.height),A)),g.add(h(c,d,new mxRectangle(l.x+l.width,t.getCenterY()-this.triangleRight.height/2,this.triangleRight.width,this.triangleRight.height),x)),g.add(h(c,d,new mxRectangle(t.getCenterX()-this.triangleDown.width/
-2,l.y+l.height,this.triangleDown.width,this.triangleDown.height),C)),g.add(h(c,d,new mxRectangle(l.x-this.triangleLeft.width,t.getCenterY()-this.triangleLeft.height/2,this.triangleLeft.width,this.triangleLeft.height),B));null!=g&&g.grow(10)}F=mxConstants.DIRECTION_NORTH;E==x?F=mxConstants.DIRECTION_EAST:E==C||E==I?F=mxConstants.DIRECTION_SOUTH:E==B&&(F=mxConstants.DIRECTION_WEST);null!=w&&E==y&&(k=w);l=(null==m||a.isCellConnectable(b[m]))&&(a.model.isEdge(e)&&null!=m||a.model.isVertex(e)&&a.isCellConnectable(e));
-if(null!=t&&5E3<=G||t!=k&&(null==g||!mxUtils.contains(g,c,d)||500<G&&null==E&&l))if(v=!1,t=5E3>G&&G>this.dropTargetDelay||a.model.isEdge(e)?k:null,null!=t&&l){g=[K,I,A,x,C,B];for(l=0;l<g.length;l++)null!=g[l].parentNode&&g[l].parentNode.removeChild(g[l]);a.model.isEdge(e)?(z=k.absolutePoints,null!=z&&(l=z[0],z=z[z.length-1],g=a.tolerance,new mxRectangle(c-g,d-g,2*g,2*g),K.style.left=Math.floor(l.x-this.roundDrop.width/2)+"px",K.style.top=Math.floor(l.y-this.roundDrop.height/2)+"px",I.style.left=Math.floor(z.x-
-this.roundDrop.width/2)+"px",I.style.top=Math.floor(z.y-this.roundDrop.height/2)+"px",null==a.model.getTerminal(e,!0)&&a.container.appendChild(K),null==a.model.getTerminal(e,!1)&&a.container.appendChild(I))):(l=mxRectangle.fromRectangle(k),null!=k.shape&&null!=k.shape.boundingBox&&(l=mxRectangle.fromRectangle(k.shape.boundingBox)),l.grow(this.graph.tolerance),l.grow(HoverIcons.prototype.arrowSpacing),z=this.graph.selectionCellsHandler.getHandler(k.cell),null!=z&&(l.x-=z.horizontalOffset/2,l.y-=z.verticalOffset/
+2,l.y+l.height,this.triangleDown.width,this.triangleDown.height),B)),g.add(h(c,d,new mxRectangle(l.x-this.triangleLeft.width,t.getCenterY()-this.triangleLeft.height/2,this.triangleLeft.width,this.triangleLeft.height),C));null!=g&&g.grow(10)}G=mxConstants.DIRECTION_NORTH;D==x?G=mxConstants.DIRECTION_EAST:D==B||D==J?G=mxConstants.DIRECTION_SOUTH:D==C&&(G=mxConstants.DIRECTION_WEST);null!=u&&D==y&&(k=u);l=(null==m||a.isCellConnectable(b[m]))&&(a.model.isEdge(e)&&null!=m||a.model.isVertex(e)&&a.isCellConnectable(e));
+if(null!=t&&5E3<=F||t!=k&&(null==g||!mxUtils.contains(g,c,d)||500<F&&null==D&&l))if(v=!1,t=5E3>F&&F>this.dropTargetDelay||a.model.isEdge(e)?k:null,null!=t&&l){g=[L,J,A,x,B,C];for(l=0;l<g.length;l++)null!=g[l].parentNode&&g[l].parentNode.removeChild(g[l]);a.model.isEdge(e)?(z=k.absolutePoints,null!=z&&(l=z[0],z=z[z.length-1],g=a.tolerance,new mxRectangle(c-g,d-g,2*g,2*g),L.style.left=Math.floor(l.x-this.roundDrop.width/2)+"px",L.style.top=Math.floor(l.y-this.roundDrop.height/2)+"px",J.style.left=Math.floor(z.x-
+this.roundDrop.width/2)+"px",J.style.top=Math.floor(z.y-this.roundDrop.height/2)+"px",null==a.model.getTerminal(e,!0)&&a.container.appendChild(L),null==a.model.getTerminal(e,!1)&&a.container.appendChild(J))):(l=mxRectangle.fromRectangle(k),null!=k.shape&&null!=k.shape.boundingBox&&(l=mxRectangle.fromRectangle(k.shape.boundingBox)),l.grow(this.graph.tolerance),l.grow(HoverIcons.prototype.arrowSpacing),z=this.graph.selectionCellsHandler.getHandler(k.cell),null!=z&&(l.x-=z.horizontalOffset/2,l.y-=z.verticalOffset/
 2,l.width+=z.horizontalOffset,l.height+=z.verticalOffset,null!=z.rotationShape&&null!=z.rotationShape.node&&"hidden"!=z.rotationShape.node.style.visibility&&"none"!=z.rotationShape.node.style.display&&null!=z.rotationShape.boundingBox&&l.add(z.rotationShape.boundingBox)),A.style.left=Math.floor(k.getCenterX()-this.triangleUp.width/2)+"px",A.style.top=Math.floor(l.y-this.triangleUp.height)+"px",x.style.left=Math.floor(l.x+l.width)+"px",x.style.top=Math.floor(k.getCenterY()-this.triangleRight.height/
-2)+"px",C.style.left=A.style.left,C.style.top=Math.floor(l.y+l.height)+"px",B.style.left=Math.floor(l.x-this.triangleLeft.width)+"px",B.style.top=x.style.top,"eastwest"!=k.style.portConstraint&&(a.container.appendChild(A),a.container.appendChild(C)),a.container.appendChild(x),a.container.appendChild(B));null!=k&&(u=a.selectionCellsHandler.getHandler(k.cell),null!=u&&null!=u.setHandlesVisible&&u.setHandlesVisible(!1));v=!0}else for(g=[K,I,A,x,C,B],l=0;l<g.length;l++)null!=g[l].parentNode&&g[l].parentNode.removeChild(g[l]);
-v||null==u||u.setHandlesVisible(!0);e=mxEvent.isAltDown(f)&&!mxEvent.isShiftDown(f)||null!=w&&E==y?null:mxDragSource.prototype.getDropTarget.apply(this,arguments);g=a.getModel();if(null!=e&&(null!=E||!a.isSplitTarget(e,b,f))){for(;null!=e&&!a.isValidDropTarget(e,b,f)&&g.isVertex(g.getParent(e));)e=g.getParent(e);if(a.view.currentRoot==e||!a.isValidRoot(e)&&0==a.getModel().getChildCount(e)||a.isCellLocked(e)||g.isEdge(e))e=null}return e});q.stopDrag=function(){mxDragSource.prototype.stopDrag.apply(this,
-arguments);for(var a=[K,I,y,A,x,C,B],b=0;b<a.length;b++)null!=a[b].parentNode&&a[b].parentNode.removeChild(a[b]);null!=t&&null!=u&&u.reset();E=J=w=t=u=null};return q};
+2)+"px",B.style.left=A.style.left,B.style.top=Math.floor(l.y+l.height)+"px",C.style.left=Math.floor(l.x-this.triangleLeft.width)+"px",C.style.top=x.style.top,"eastwest"!=k.style.portConstraint&&(a.container.appendChild(A),a.container.appendChild(B)),a.container.appendChild(x),a.container.appendChild(C));null!=k&&(w=a.selectionCellsHandler.getHandler(k.cell),null!=w&&null!=w.setHandlesVisible&&w.setHandlesVisible(!1));v=!0}else for(g=[L,J,A,x,B,C],l=0;l<g.length;l++)null!=g[l].parentNode&&g[l].parentNode.removeChild(g[l]);
+v||null==w||w.setHandlesVisible(!0);e=mxEvent.isAltDown(f)&&!mxEvent.isShiftDown(f)||null!=u&&D==y?null:mxDragSource.prototype.getDropTarget.apply(this,arguments);g=a.getModel();if(null!=e&&(null!=D||!a.isSplitTarget(e,b,f))){for(;null!=e&&!a.isValidDropTarget(e,b,f)&&g.isVertex(g.getParent(e));)e=g.getParent(e);if(a.view.currentRoot==e||!a.isValidRoot(e)&&0==a.getModel().getChildCount(e)||a.isCellLocked(e)||g.isEdge(e))e=null}return e});q.stopDrag=function(){mxDragSource.prototype.stopDrag.apply(this,
+arguments);for(var a=[L,J,y,A,x,B,C],b=0;b<a.length;b++)null!=a[b].parentNode&&a[b].parentNode.removeChild(a[b]);null!=t&&null!=w&&w.reset();D=I=u=t=w=null};return q};
 Sidebar.prototype.itemClicked=function(a,c,d,b){b=this.editorUi.editor.graph;if(mxEvent.isAltDown(d)){if(1==b.getSelectionCount()&&b.model.isVertex(b.getSelectionCell())){c=null;for(var e=0;e<a.length&&null==c;e++)b.model.isVertex(a[e])&&(c=e);null!=c&&(b.setSelectionCells(this.dropAndConnect(b.getSelectionCell(),a,mxEvent.isMetaDown(d)||mxEvent.isControlDown(d)?mxEvent.isShiftDown(d)?mxConstants.DIRECTION_WEST:mxConstants.DIRECTION_NORTH:mxEvent.isShiftDown(d)?mxConstants.DIRECTION_EAST:mxConstants.DIRECTION_SOUTH,
 c)),b.scrollCellToVisible(b.getSelectionCell()))}}else mxEvent.isShiftDown(d)?b.isSelectionEmpty()||(this.updateShapes(a[0],b.getSelectionCells()),b.scrollCellToVisible(b.getSelectionCell())):(a=b.getFreeInsertPoint(),c.drop(b,d,null,a.x,a.y),null!=this.editorUi.hoverIcons&&(mxEvent.isTouchEvent(d)||mxEvent.isPenEvent(d))&&this.editorUi.hoverIcons.update(b.view.getState(b.getSelectionCell())))};
 Sidebar.prototype.addClickHandler=function(a,c,d){var b=this.editorUi.editor.graph,e=c.mouseUp,f=null;mxEvent.addGestureListeners(a,function(a){f=new mxPoint(mxEvent.getClientX(a),mxEvent.getClientY(a))});c.mouseUp=mxUtils.bind(this,function(h){if(!mxEvent.isPopupTrigger(h)&&null==this.currentGraph&&null!=f){var g=b.tolerance;Math.abs(f.x-mxEvent.getClientX(h))<=g&&Math.abs(f.y-mxEvent.getClientY(h))<=g&&this.itemClicked(d,c,h,a)}e.apply(c,arguments);f=null;this.currentElt=a})};
@@ -2329,12 +2330,12 @@ function(){var a=m.apply(this,arguments);if(this.graph.pageVisible){for(var b=[]
 function(a,b){return null==a.cell?"#ffa500":mxConstants.GUIDE_COLOR};this.graphHandler.createPreviewShape=function(a){this.previewColor="#000000"==this.graph.background?"#ffffff":mxGraphHandler.prototype.previewColor;return mxGraphHandler.prototype.createPreviewShape.apply(this,arguments)};this.graphHandler.getCells=function(a){for(var b=mxGraphHandler.prototype.getCells.apply(this,arguments),c=[],d=0;d<b.length;d++){var e=this.graph.view.getState(b[d]),e=null!=e?e.style:this.graph.getCellStyle(b[d]);
 "1"==mxUtils.getValue(e,"part","0")?(e=this.graph.model.getParent(b[d]),this.graph.model.isVertex(e)&&0>mxUtils.indexOf(b,e)&&c.push(e)):c.push(b[d])}return c};this.connectionHandler.createTargetVertex=function(a,b){var c=this.graph.view.getState(b),c=null!=c?c.style:this.graph.getCellStyle(b);mxUtils.getValue(c,"part",!1)&&(c=this.graph.model.getParent(b),this.graph.model.isVertex(c)&&(b=c));return mxConnectionHandler.prototype.createTargetVertex.apply(this,arguments)};var n=new mxRubberband(this);
 this.getRubberband=function(){return n};var p=(new Date).getTime(),q=0,r=this.connectionHandler.mouseMove;this.connectionHandler.mouseMove=function(){var a=this.currentState;r.apply(this,arguments);a!=this.currentState?(p=(new Date).getTime(),q=0):q=(new Date).getTime()-p};var t=this.connectionHandler.isOutlineConnectEvent;this.connectionHandler.isOutlineConnectEvent=function(a){return null!=this.currentState&&a.getState()==this.currentState&&2E3<q||(null==this.currentState||"0"!=mxUtils.getValue(this.currentState.style,
-"outlineConnect","1"))&&t.apply(this,arguments)};var u=this.isToggleEvent;this.isToggleEvent=function(a){return u.apply(this,arguments)||mxEvent.isShiftDown(a)};var w=n.isForceRubberbandEvent;n.isForceRubberbandEvent=function(a){return w.apply(this,arguments)||mxUtils.hasScrollbars(this.graph.container)&&mxClient.IS_FF&&mxClient.IS_WIN&&null==a.getState()&&mxEvent.isTouchEvent(a.getEvent())};var v=null;this.panningHandler.addListener(mxEvent.PAN_START,mxUtils.bind(this,function(){this.isEnabled()&&
+"outlineConnect","1"))&&t.apply(this,arguments)};var w=this.isToggleEvent;this.isToggleEvent=function(a){return w.apply(this,arguments)||mxEvent.isShiftDown(a)};var u=n.isForceRubberbandEvent;n.isForceRubberbandEvent=function(a){return u.apply(this,arguments)||mxUtils.hasScrollbars(this.graph.container)&&mxClient.IS_FF&&mxClient.IS_WIN&&null==a.getState()&&mxEvent.isTouchEvent(a.getEvent())};var v=null;this.panningHandler.addListener(mxEvent.PAN_START,mxUtils.bind(this,function(){this.isEnabled()&&
 (v=this.container.style.cursor,this.container.style.cursor="move")}));this.panningHandler.addListener(mxEvent.PAN_END,mxUtils.bind(this,function(){this.isEnabled()&&(this.container.style.cursor=v)}));this.popupMenuHandler.autoExpand=!0;this.popupMenuHandler.isSelectOnPopup=function(a){return mxEvent.isMouseEvent(a.getEvent())};var A=this.click;this.click=function(a){if(this.isEnabled()||a.isConsumed())return A.apply(this,arguments);var b=a.getCell();null!=b&&(b=this.getLinkForCell(b),null!=b&&window.open(b))};
 var x=this.getCursorForCell;this.getCursorForCell=function(a){if(this.isEnabled())return x.apply(this,arguments);if(null!=this.getLinkForCell(a))return"pointer"};this.selectRegion=function(a,b){var c=this.getAllCells(a.x,a.y,a.width,a.height);this.selectCellsForEvent(c,b);return c};this.getAllCells=function(a,b,c,d,e,f){f=null!=f?f:[];if(0<c||0<d){var g=this.getModel(),h=a+c,k=b+d;null==e&&(e=this.getCurrentRoot(),null==e&&(e=g.getRoot()));if(null!=e)for(var l=g.getChildCount(e),m=0;m<l;m++){var n=
-g.getChildAt(e,m),z=this.view.getState(n);if(null!=z&&this.isCellVisible(n)&&"1"!=mxUtils.getValue(z.style,"locked","0")){var p=mxUtils.getValue(z.style,mxConstants.STYLE_ROTATION)||0;0!=p&&(z=mxUtils.getBoundingBox(z,p));(g.isEdge(n)||g.isVertex(n))&&z.x>=a&&z.y+z.height<=k&&z.y>=b&&z.x+z.width<=h&&f.push(n);this.getAllCells(a,b,c,d,n,f)}}}return f};var C=this.graphHandler.shouldRemoveCellsFromParent;this.graphHandler.shouldRemoveCellsFromParent=function(a,b,c){return this.graph.isCellSelected(a)?
-!1:C.apply(this,arguments)};this.isCellLocked=function(a){for(a=this.view.getState(a);null!=a;){if("1"==mxUtils.getValue(a.style,"locked","0"))return!0;a=this.view.getState(this.model.getParent(a.cell))}return!1};var B=null;this.addListener(mxEvent.FIRE_MOUSE_EVENT,mxUtils.bind(this,function(a,b){if("mouseDown"==b.getProperty("eventName")){var c=b.getProperty("event").getState();B=null==c||this.isSelectionEmpty()||this.isCellSelected(c.cell)?null:this.getSelectionCells()}}));this.addListener(mxEvent.TAP_AND_HOLD,
-mxUtils.bind(this,function(a,b){if(!mxEvent.isMultiTouchEvent(b)){var c=b.getProperty("event"),d=b.getProperty("cell");null==d?(c=mxUtils.convertPoint(this.container,mxEvent.getClientX(c),mxEvent.getClientY(c)),n.start(c.x,c.y)):null!=B?this.addSelectionCells(B):1<this.getSelectionCount()&&this.isCellSelected(d)&&this.removeSelectionCell(d);B=null;b.consume()}}));this.connectionHandler.selectCells=function(a,b){this.graph.setSelectionCell(b||a)};this.connectionHandler.constraintHandler.isStateIgnored=
+g.getChildAt(e,m),z=this.view.getState(n);if(null!=z&&this.isCellVisible(n)&&"1"!=mxUtils.getValue(z.style,"locked","0")){var p=mxUtils.getValue(z.style,mxConstants.STYLE_ROTATION)||0;0!=p&&(z=mxUtils.getBoundingBox(z,p));(g.isEdge(n)||g.isVertex(n))&&z.x>=a&&z.y+z.height<=k&&z.y>=b&&z.x+z.width<=h&&f.push(n);this.getAllCells(a,b,c,d,n,f)}}}return f};var B=this.graphHandler.shouldRemoveCellsFromParent;this.graphHandler.shouldRemoveCellsFromParent=function(a,b,c){return this.graph.isCellSelected(a)?
+!1:B.apply(this,arguments)};this.isCellLocked=function(a){for(a=this.view.getState(a);null!=a;){if("1"==mxUtils.getValue(a.style,"locked","0"))return!0;a=this.view.getState(this.model.getParent(a.cell))}return!1};var C=null;this.addListener(mxEvent.FIRE_MOUSE_EVENT,mxUtils.bind(this,function(a,b){if("mouseDown"==b.getProperty("eventName")){var c=b.getProperty("event").getState();C=null==c||this.isSelectionEmpty()||this.isCellSelected(c.cell)?null:this.getSelectionCells()}}));this.addListener(mxEvent.TAP_AND_HOLD,
+mxUtils.bind(this,function(a,b){if(!mxEvent.isMultiTouchEvent(b)){var c=b.getProperty("event"),d=b.getProperty("cell");null==d?(c=mxUtils.convertPoint(this.container,mxEvent.getClientX(c),mxEvent.getClientY(c)),n.start(c.x,c.y)):null!=C?this.addSelectionCells(C):1<this.getSelectionCount()&&this.isCellSelected(d)&&this.removeSelectionCell(d);C=null;b.consume()}}));this.connectionHandler.selectCells=function(a,b){this.graph.setSelectionCell(b||a)};this.connectionHandler.constraintHandler.isStateIgnored=
 function(a,b){return b&&a.view.graph.isCellSelected(a.cell)};this.selectionModel.addListener(mxEvent.CHANGE,mxUtils.bind(this,function(){var a=this.connectionHandler.constraintHandler;null!=a.currentFocus&&a.isStateIgnored(a.currentFocus,!0)&&(a.currentFocus=null,a.constraints=null,a.destroyIcons());a.destroyFocusHighlight()}));Graph.touchStyle&&this.initTouch();var y=this.updateMouseEvent;this.updateMouseEvent=function(a){a=y.apply(this,arguments);this.isCellLocked(a.getCell())&&(a.state=null);return a}}};
 Graph.touchStyle=mxClient.IS_TOUCH||mxClient.IS_FF&&mxClient.IS_WIN||0<navigator.maxTouchPoints||0<navigator.msMaxTouchPoints||null==window.urlParams||"1"==urlParams.touch;Graph.fileSupport=null!=window.File&&null!=window.FileReader&&null!=window.FileList&&(null==window.urlParams||"0"!=urlParams.filesupport);Graph.lineJumpsEnabled=!0;Graph.defaultJumpSize=6;mxUtils.extend(Graph,mxGraph);Graph.prototype.minFitScale=null;Graph.prototype.maxFitScale=null;
 Graph.prototype.linkPolicy="frame"==urlParams.target?"blank":urlParams.target||"auto";Graph.prototype.linkTarget="frame"==urlParams.target?"_self":"_blank";Graph.prototype.defaultScrollbars=!mxClient.IS_IOS;Graph.prototype.defaultPageVisible=!0;Graph.prototype.lightbox=!1;Graph.prototype.defaultGraphBackground="#ffffff";Graph.prototype.scrollTileSize=new mxRectangle(0,0,400,400);Graph.prototype.transparentBackground=!0;Graph.prototype.defaultEdgeLength=80;Graph.prototype.edgeMode=!1;
@@ -2354,8 +2355,8 @@ Graph.prototype.getLabel=function(a){var c=mxGraph.prototype.getLabel.apply(this
 Graph.prototype.setGridSize=function(a){this.gridSize=a;this.fireEvent(new mxEventObject("gridSizeChanged"))};Graph.prototype.getGlobalVariable=function(a){var c=null;"date"==a?c=(new Date).toLocaleDateString():"time"==a?c=(new Date).toLocaleTimeString():"timestamp"==a?c=(new Date).toLocaleString():"date{"==a.substring(0,5)&&(a=a.substring(5,a.length-1),c=this.formatDate(new Date,a));return c};
 Graph.prototype.formatDate=function(a,c,d){null==this.dateFormatCache&&(this.dateFormatCache={i18n:{dayNames:"Sun Mon Tue Wed Thu Fri Sat Sunday Monday Tuesday Wednesday Thursday Friday Saturday".split(" "),monthNames:"Jan Feb Mar Apr May Jun Jul Aug Sep Oct Nov Dec January February March April May June July August September October November December".split(" ")},masks:{"default":"ddd mmm dd yyyy HH:MM:ss",shortDate:"m/d/yy",mediumDate:"mmm d, yyyy",longDate:"mmmm d, yyyy",fullDate:"dddd, mmmm d, yyyy",
 shortTime:"h:MM TT",mediumTime:"h:MM:ss TT",longTime:"h:MM:ss TT Z",isoDate:"yyyy-mm-dd",isoTime:"HH:MM:ss",isoDateTime:"yyyy-mm-dd'T'HH:MM:ss",isoUtcDateTime:"UTC:yyyy-mm-dd'T'HH:MM:ss'Z'"}});var b=this.dateFormatCache,e=/\b(?:[PMCEA][SDP]T|(?:Pacific|Mountain|Central|Eastern|Atlantic) (?:Standard|Daylight|Prevailing) Time|(?:GMT|UTC)(?:[-+]\d{4})?)\b/g,f=/[^-+\dA-Z]/g,h=function(a,b){a=String(a);for(b=b||2;a.length<b;)a="0"+a;return a};1!=arguments.length||"[object String]"!=Object.prototype.toString.call(a)||
-/\d/.test(a)||(c=a,a=void 0);a=a?new Date(a):new Date;if(isNaN(a))throw SyntaxError("invalid date");c=String(b.masks[c]||c||b.masks["default"]);"UTC:"==c.slice(0,4)&&(c=c.slice(4),d=!0);var g=d?"getUTC":"get",k=a[g+"Date"](),l=a[g+"Day"](),m=a[g+"Month"](),n=a[g+"FullYear"](),p=a[g+"Hours"](),q=a[g+"Minutes"](),r=a[g+"Seconds"](),g=a[g+"Milliseconds"](),t=d?0:a.getTimezoneOffset(),u={d:k,dd:h(k),ddd:b.i18n.dayNames[l],dddd:b.i18n.dayNames[l+7],m:m+1,mm:h(m+1),mmm:b.i18n.monthNames[m],mmmm:b.i18n.monthNames[m+
-12],yy:String(n).slice(2),yyyy:n,h:p%12||12,hh:h(p%12||12),H:p,HH:h(p),M:q,MM:h(q),s:r,ss:h(r),l:h(g,3),L:h(99<g?Math.round(g/10):g),t:12>p?"a":"p",tt:12>p?"am":"pm",T:12>p?"A":"P",TT:12>p?"AM":"PM",Z:d?"UTC":(String(a).match(e)||[""]).pop().replace(f,""),o:(0<t?"-":"+")+h(100*Math.floor(Math.abs(t)/60)+Math.abs(t)%60,4),S:["th","st","nd","rd"][3<k%10?0:(10!=k%100-k%10)*k%10]};return c.replace(/d{1,4}|m{1,4}|yy(?:yy)?|([HhMsTt])\1?|[LloSZ]|"[^"]*"|'[^']*'/g,function(a){return a in u?u[a]:a.slice(1,
+/\d/.test(a)||(c=a,a=void 0);a=a?new Date(a):new Date;if(isNaN(a))throw SyntaxError("invalid date");c=String(b.masks[c]||c||b.masks["default"]);"UTC:"==c.slice(0,4)&&(c=c.slice(4),d=!0);var g=d?"getUTC":"get",k=a[g+"Date"](),l=a[g+"Day"](),m=a[g+"Month"](),n=a[g+"FullYear"](),p=a[g+"Hours"](),q=a[g+"Minutes"](),r=a[g+"Seconds"](),g=a[g+"Milliseconds"](),t=d?0:a.getTimezoneOffset(),w={d:k,dd:h(k),ddd:b.i18n.dayNames[l],dddd:b.i18n.dayNames[l+7],m:m+1,mm:h(m+1),mmm:b.i18n.monthNames[m],mmmm:b.i18n.monthNames[m+
+12],yy:String(n).slice(2),yyyy:n,h:p%12||12,hh:h(p%12||12),H:p,HH:h(p),M:q,MM:h(q),s:r,ss:h(r),l:h(g,3),L:h(99<g?Math.round(g/10):g),t:12>p?"a":"p",tt:12>p?"am":"pm",T:12>p?"A":"P",TT:12>p?"AM":"PM",Z:d?"UTC":(String(a).match(e)||[""]).pop().replace(f,""),o:(0<t?"-":"+")+h(100*Math.floor(Math.abs(t)/60)+Math.abs(t)%60,4),S:["th","st","nd","rd"][3<k%10?0:(10!=k%100-k%10)*k%10]};return c.replace(/d{1,4}|m{1,4}|yy(?:yy)?|([HhMsTt])\1?|[LloSZ]|"[^"]*"|'[^']*'/g,function(a){return a in w?w[a]:a.slice(1,
 a.length-1)})};
 Graph.prototype.createLayersDialog=function(){var a=document.createElement("div");a.style.position="absolute";for(var c=this.getModel(),d=c.getChildCount(c.root),b=0;b<d;b++)(function(b){var d=document.createElement("div");d.style.overflow="hidden";d.style.textOverflow="ellipsis";d.style.padding="2px";d.style.whiteSpace="nowrap";var e=document.createElement("input");e.style.display="inline-block";e.setAttribute("type","checkbox");c.isVisible(b)&&(e.setAttribute("checked","checked"),e.defaultChecked=
 !0);d.appendChild(e);var g=b.value||mxResources.get("background")||"Background";d.setAttribute("title",g);mxUtils.write(d,g);a.appendChild(d);mxEvent.addListener(e,"click",function(){null!=e.getAttribute("checked")?e.removeAttribute("checked"):e.setAttribute("checked","checked");c.setVisible(b,e.checked)})})(c.getChildAt(c.root,b));return a};
@@ -2381,7 +2382,7 @@ Graph.prototype.selectAll=function(a){a=a||this.getDefaultParent();this.isCellLo
 Graph.prototype.isCellFoldable=function(a){var c=this.view.getState(a),c=null!=c?c.style:this.getCellStyle(a);return this.foldingEnabled&&!this.isCellLocked(a)&&(this.isContainer(a)&&"0"!=c.collapsible||!this.isContainer(a)&&"1"==c.collapsible)};Graph.prototype.reset=function(){this.isEditing()&&this.stopEditing(!0);this.escape();this.isSelectionEmpty()||this.clearSelection()};
 Graph.prototype.zoom=function(a,c){a=Math.max(.01,Math.min(this.view.scale*a,160))/this.view.scale;mxGraph.prototype.zoom.apply(this,arguments)};Graph.prototype.zoomIn=function(){.15>this.view.scale?this.zoom((this.view.scale+.01)/this.view.scale):this.zoom(Math.round(this.view.scale*this.zoomFactor*20)/20/this.view.scale)};Graph.prototype.zoomOut=function(){.15>=this.view.scale?this.zoom((this.view.scale-.01)/this.view.scale):this.zoom(Math.round(1/this.zoomFactor*this.view.scale*20)/20/this.view.scale)};
 Graph.prototype.getTooltipForCell=function(a){var c="";if(mxUtils.isNode(a.value)){var d=a.value.getAttribute("tooltip");if(null!=d)null!=d&&this.isReplacePlaceholders(a)&&(d=this.replacePlaceholders(a,d)),c=this.sanitizeHtml(d);else{d=["label","tooltip","placeholders","placeholder"];a=a.value.attributes;var b=[];this.isEnabled()&&d.push("link");for(var e=0;e<a.length;e++)0>mxUtils.indexOf(d,a[e].nodeName)&&0<a[e].nodeValue.length&&b.push({name:a[e].nodeName,value:a[e].nodeValue});b.sort(function(a,
-b){return a.name<b.name?-1:a.name>b.name?1:0});for(e=0;e<b.length;e++)c+=("link"!=b[e].name?b[e].name+":":"")+mxUtils.htmlEntities(b[e].value)+"\n";0<c.length&&(c=c.substring(0,c.length-1))}}return c};Graph.prototype.stringToBytes=function(a){for(var c=Array(a.length),d=0;d<a.length;d++)c[d]=a.charCodeAt(d);return c};Graph.prototype.bytesToString=function(a){for(var c=Array(a.length),d=0;d<a.length;d++)c[d]=String.fromCharCode(a[d]);return c.join("")};
+b){return a.name<b.name?-1:a.name>b.name?1:0});for(e=0;e<b.length;e++)"link"==b[e].name&&this.isPageLink(b[e].value)||(c+=("link"!=b[e].name?b[e].name+":":"")+mxUtils.htmlEntities(b[e].value)+"\n");0<c.length&&(c=c.substring(0,c.length-1))}}return c};Graph.prototype.stringToBytes=function(a){for(var c=Array(a.length),d=0;d<a.length;d++)c[d]=a.charCodeAt(d);return c};Graph.prototype.bytesToString=function(a){for(var c=Array(a.length),d=0;d<a.length;d++)c[d]=String.fromCharCode(a[d]);return c.join("")};
 Graph.prototype.compress=function(a){if(null==a||0==a.length||"undefined"===typeof pako)return a;a=this.bytesToString(pako.deflateRaw(encodeURIComponent(a)));return window.btoa?btoa(a):Base64.encode(a,!0)};Graph.prototype.decompress=function(a){if(null==a||0==a.length||"undefined"===typeof pako)return a;a=window.atob?atob(a):Base64.decode(a,!0);return this.zapGremlins(decodeURIComponent(this.bytesToString(pako.inflateRaw(a))))};
 Graph.prototype.zapGremlins=function(a){for(var c=[],d=0;d<a.length;d++){var b=a.charCodeAt(d);(32<=b||9==b||10==b||13==b)&&c.push(a.charAt(d))}return c.join("")};HoverIcons=function(a){this.graph=a;this.init()};HoverIcons.prototype.arrowSpacing=6;HoverIcons.prototype.updateDelay=500;HoverIcons.prototype.activationDelay=140;HoverIcons.prototype.currentState=null;HoverIcons.prototype.activeArrow=null;HoverIcons.prototype.inactiveOpacity=15;HoverIcons.prototype.checkCollisions=!0;
 HoverIcons.prototype.triangleUp=new mxImage(mxClient.IS_SVG?"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABoAAAAOCAYAAAAxDQxDAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAyJpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuMC1jMDYwIDYxLjEzNDc3NywgMjAxMC8wMi8xMi0xNzozMjowMCAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvIiB4bWxuczp4bXBNTT0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL21tLyIgeG1sbnM6c3RSZWY9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9zVHlwZS9SZXNvdXJjZVJlZiMiIHhtcDpDcmVhdG9yVG9vbD0iQWRvYmUgUGhvdG9zaG9wIENTNSBNYWNpbnRvc2giIHhtcE1NOkluc3RhbmNlSUQ9InhtcC5paWQ6N0ZBN0E3M0U5NjZGMTFFNTg5NTRDNzQwMTgwNDlEQzQiIHhtcE1NOkRvY3VtZW50SUQ9InhtcC5kaWQ6N0ZBN0E3M0Y5NjZGMTFFNTg5NTRDNzQwMTgwNDlEQzQiPiA8eG1wTU06RGVyaXZlZEZyb20gc3RSZWY6aW5zdGFuY2VJRD0ieG1wLmlpZDo3RkE3QTczQzk2NkYxMUU1ODk1NEM3NDAxODA0OURDNCIgc3RSZWY6ZG9jdW1lbnRJRD0ieG1wLmRpZDo3RkE3QTczRDk2NkYxMUU1ODk1NEM3NDAxODA0OURDNCIvPiA8L3JkZjpEZXNjcmlwdGlvbj4gPC9yZGY6UkRGPiA8L3g6eG1wbWV0YT4gPD94cGFja2V0IGVuZD0iciI/Pj625P8AAACySURBVHjaYmRY956BROABxF+A+AgpmpjIsGQjEO8CYidaWeQHtYQNiDmBeAspljGRYMlqqCUwALPMg1oWhWCxBNmyjVCHUGQRyJKlOCyBATaoQ/zItSgciFcQsATdshBSLYqC+oSZhMTCBnVYFLEWgRQuItESGGCG6o0iZFECBZagW5aAyyKQxBwKLUG2bD4Qp6FblAyVoIYlyGAmzDIWKGMmA+0AyGw2RjIKVbIAQIABAFJRHSSk2rPoAAAAAElFTkSuQmCC":
@@ -2424,12 +2425,12 @@ this.setDisplay("");null!=this.currentState&&this.currentState!=a&&b<this.activa
 this.reset())}else this.reset()};HoverIcons.prototype.setCurrentState=function(a){"eastwest"!=a.style.portConstraint&&(this.graph.container.appendChild(this.arrowUp),this.graph.container.appendChild(this.arrowDown));this.graph.container.appendChild(this.arrowRight);this.graph.container.appendChild(this.arrowLeft);this.currentState=a};
 (function(){var a=mxGraphView.prototype.resetValidationState;mxGraphView.prototype.resetValidationState=function(){a.apply(this,arguments);this.validEdges=[]};var c=mxGraphView.prototype.validateCellState;mxGraphView.prototype.validateCellState=function(a,b){var d=this.getState(a);null!=d&&this.graph.model.isEdge(d.cell)&&null!=d.style&&1!=d.style[mxConstants.STYLE_CURVED]&&!d.invalid&&this.updateLineJumps(d)&&this.graph.cellRenderer.redraw(d,!1,this.isRendering());d=c.apply(this,arguments);null!=
 d&&this.graph.model.isEdge(d.cell)&&1!=d.style[mxConstants.STYLE_CURVED]&&this.validEdges.push(d);return d};var d=mxCellRenderer.prototype.isShapeInvalid;mxCellRenderer.prototype.isShapeInvalid=function(a,b){return d.apply(this,arguments)||null!=a.routedPoints&&null!=b.routedPoints&&!mxUtils.equalPoints(b.routedPoints,a.routedPoints)};var b=mxGraphView.prototype.updateCellState;mxGraphView.prototype.updateCellState=function(a){b.apply(this,arguments);this.graph.model.isEdge(a.cell)&&1!=a.style[mxConstants.STYLE_CURVED]&&
-this.updateLineJumps(a)};mxGraphView.prototype.updateLineJumps=function(a){var b=a.absolutePoints;if(Graph.lineJumpsEnabled){var c=null!=a.routedPoints,d=null;if(null!=b&&null!=this.validEdges&&"none"!==mxUtils.getValue(a.style,"jumpStyle","none")){for(var e=function(b,c,e){var f=new mxPoint(c,e);f.type=b;d.push(f);f=null!=a.routedPoints?a.routedPoints[d.length-1]:null;return null==f||f.type!=b||f.x!=c||f.y!=e},f=.5*this.scale,c=!1,d=[],g=0;g<b.length-1;g++){for(var h=b[g+1],k=b[g],w=[],v=b[g+2];g<
-b.length-2&&mxUtils.ptSegDistSq(k.x,k.y,v.x,v.y,h.x,h.y)<1*this.scale*this.scale;)h=v,g++,v=b[g+2];for(var c=e(0,k.x,k.y)||c,A=0;A<this.validEdges.length;A++){var x=this.validEdges[A],C=x.absolutePoints;if(null!=C&&mxUtils.intersects(a,x))for(x=0;x<C.length-1;x++){for(var B=C[x+1],y=C[x],v=C[x+2];x<C.length-2&&mxUtils.ptSegDistSq(y.x,y.y,v.x,v.y,B.x,B.y)<1*this.scale*this.scale;)B=v,x++,v=C[x+2];v=mxUtils.intersection(k.x,k.y,h.x,h.y,y.x,y.y,B.x,B.y);if(null!=v&&(Math.abs(v.x-y.x)>f||Math.abs(v.y-
-y.y)>f)&&(Math.abs(v.x-B.x)>f||Math.abs(v.y-B.y)>f)){B=v.x-k.x;y=v.y-k.y;v={distSq:B*B+y*y,x:v.x,y:v.y};for(B=0;B<w.length;B++)if(w[B].distSq>v.distSq){w.splice(B,0,v);v=null;break}null==v||0!=w.length&&w[w.length-1].x===v.x&&w[w.length-1].y===v.y||w.push(v)}}}for(x=0;x<w.length;x++)c=e(1,w[x].x,w[x].y)||c}v=b[b.length-1];c=e(0,v.x,v.y)||c}a.routedPoints=d;return c}return!1};var e=mxConnector.prototype.paintLine;mxConnector.prototype.paintLine=function(a,b,c){this.routedPoints=null!=this.state?this.state.routedPoints:
+this.updateLineJumps(a)};mxGraphView.prototype.updateLineJumps=function(a){var b=a.absolutePoints;if(Graph.lineJumpsEnabled){var c=null!=a.routedPoints,d=null;if(null!=b&&null!=this.validEdges&&"none"!==mxUtils.getValue(a.style,"jumpStyle","none")){for(var e=function(b,c,e){var f=new mxPoint(c,e);f.type=b;d.push(f);f=null!=a.routedPoints?a.routedPoints[d.length-1]:null;return null==f||f.type!=b||f.x!=c||f.y!=e},f=.5*this.scale,c=!1,d=[],g=0;g<b.length-1;g++){for(var h=b[g+1],k=b[g],u=[],v=b[g+2];g<
+b.length-2&&mxUtils.ptSegDistSq(k.x,k.y,v.x,v.y,h.x,h.y)<1*this.scale*this.scale;)h=v,g++,v=b[g+2];for(var c=e(0,k.x,k.y)||c,A=0;A<this.validEdges.length;A++){var x=this.validEdges[A],B=x.absolutePoints;if(null!=B&&mxUtils.intersects(a,x))for(x=0;x<B.length-1;x++){for(var C=B[x+1],y=B[x],v=B[x+2];x<B.length-2&&mxUtils.ptSegDistSq(y.x,y.y,v.x,v.y,C.x,C.y)<1*this.scale*this.scale;)C=v,x++,v=B[x+2];v=mxUtils.intersection(k.x,k.y,h.x,h.y,y.x,y.y,C.x,C.y);if(null!=v&&(Math.abs(v.x-y.x)>f||Math.abs(v.y-
+y.y)>f)&&(Math.abs(v.x-C.x)>f||Math.abs(v.y-C.y)>f)){C=v.x-k.x;y=v.y-k.y;v={distSq:C*C+y*y,x:v.x,y:v.y};for(C=0;C<u.length;C++)if(u[C].distSq>v.distSq){u.splice(C,0,v);v=null;break}null==v||0!=u.length&&u[u.length-1].x===v.x&&u[u.length-1].y===v.y||u.push(v)}}}for(x=0;x<u.length;x++)c=e(1,u[x].x,u[x].y)||c}v=b[b.length-1];c=e(0,v.x,v.y)||c}a.routedPoints=d;return c}return!1};var e=mxConnector.prototype.paintLine;mxConnector.prototype.paintLine=function(a,b,c){this.routedPoints=null!=this.state?this.state.routedPoints:
 null;if(this.outline||null==this.state||null==this.style||null==this.state.routedPoints||0==this.state.routedPoints.length)e.apply(this,arguments);else{var d=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2,f=(parseInt(mxUtils.getValue(this.style,"jumpSize",Graph.defaultJumpSize))-2)/2+this.strokewidth,g=mxUtils.getValue(this.style,"jumpStyle","none"),h,k=!0,l=null,m=null;h=[];var v=null;a.begin();for(var A=0;A<this.state.routedPoints.length;A++){var x=this.state.routedPoints[A],
-C=new mxPoint(x.x/this.scale,x.y/this.scale);0==A?C=b[0]:A==this.state.routedPoints.length-1&&(C=b[b.length-1]);var B=!1;if(null!=l&&1==x.type){var y=this.state.routedPoints[A+1],x=y.x/this.scale-C.x,y=y.y/this.scale-C.y,x=x*x+y*y;null==v&&(v=new mxPoint(C.x-l.x,C.y-l.y),m=Math.sqrt(v.x*v.x+v.y*v.y),v.x=v.x*f/m,v.y=v.y*f/m);x>f*f&&0<m&&(x=l.x-C.x,y=l.y-C.y,x=x*x+y*y,x>f*f&&(B=new mxPoint(C.x-v.x,C.y-v.y),x=new mxPoint(C.x+v.x,C.y+v.y),h.push(B),this.addPoints(a,h,c,d,!1,null,k),h=0>Math.round(v.x)||
-0==Math.round(v.x)&&0>=Math.round(v.y)?1:-1,k=!1,"sharp"==g?(a.lineTo(B.x-v.y*h,B.y+v.x*h),a.lineTo(x.x-v.y*h,x.y+v.x*h),a.lineTo(x.x,x.y)):"arc"==g?(h*=1.3,a.curveTo(B.x-v.y*h,B.y+v.x*h,x.x-v.y*h,x.y+v.x*h,x.x,x.y)):(a.moveTo(x.x,x.y),k=!0),h=[x],B=!0))}else v=null;B||(h.push(C),l=C)}this.addPoints(a,h,c,d,!1,null,k);a.stroke()}};var f=mxGraphView.prototype.updateFloatingTerminalPoint;mxGraphView.prototype.updateFloatingTerminalPoint=function(a,b,c,d){if(null==b||null==a||"1"!=b.style.snapToPoint&&
+B=new mxPoint(x.x/this.scale,x.y/this.scale);0==A?B=b[0]:A==this.state.routedPoints.length-1&&(B=b[b.length-1]);var C=!1;if(null!=l&&1==x.type){var y=this.state.routedPoints[A+1],x=y.x/this.scale-B.x,y=y.y/this.scale-B.y,x=x*x+y*y;null==v&&(v=new mxPoint(B.x-l.x,B.y-l.y),m=Math.sqrt(v.x*v.x+v.y*v.y),v.x=v.x*f/m,v.y=v.y*f/m);x>f*f&&0<m&&(x=l.x-B.x,y=l.y-B.y,x=x*x+y*y,x>f*f&&(C=new mxPoint(B.x-v.x,B.y-v.y),x=new mxPoint(B.x+v.x,B.y+v.y),h.push(C),this.addPoints(a,h,c,d,!1,null,k),h=0>Math.round(v.x)||
+0==Math.round(v.x)&&0>=Math.round(v.y)?1:-1,k=!1,"sharp"==g?(a.lineTo(C.x-v.y*h,C.y+v.x*h),a.lineTo(x.x-v.y*h,x.y+v.x*h),a.lineTo(x.x,x.y)):"arc"==g?(h*=1.3,a.curveTo(C.x-v.y*h,C.y+v.x*h,x.x-v.y*h,x.y+v.x*h,x.x,x.y)):(a.moveTo(x.x,x.y),k=!0),h=[x],C=!0))}else v=null;C||(h.push(B),l=B)}this.addPoints(a,h,c,d,!1,null,k);a.stroke()}};var f=mxGraphView.prototype.updateFloatingTerminalPoint;mxGraphView.prototype.updateFloatingTerminalPoint=function(a,b,c,d){if(null==b||null==a||"1"!=b.style.snapToPoint&&
 "1"!=a.style.snapToPoint)f.apply(this,arguments);else{b=this.getTerminalPort(a,b,d);var e=this.getNextPoint(a,c,d),g=this.graph.isOrthogonal(a),h=mxUtils.toRadians(Number(b.style[mxConstants.STYLE_ROTATION]||"0")),k=new mxPoint(b.getCenterX(),b.getCenterY());if(0!=h)var l=Math.cos(-h),m=Math.sin(-h),e=mxUtils.getRotatedPoint(e,l,m,k);l=parseFloat(a.style[mxConstants.STYLE_PERIMETER_SPACING]||0);l+=parseFloat(a.style[d?mxConstants.STYLE_SOURCE_PERIMETER_SPACING:mxConstants.STYLE_TARGET_PERIMETER_SPACING]||
 0);e=this.getPerimeterPoint(b,e,0==h&&g,l);0!=h&&(l=Math.cos(h),m=Math.sin(h),e=mxUtils.getRotatedPoint(e,l,m,k));a.setAbsoluteTerminalPoint(this.snapToAnchorPoint(a,b,c,d,e),d)}};mxGraphView.prototype.snapToAnchorPoint=function(a,b,c,d,e){if(null!=b&&null!=a){a=this.graph.getAllConnectionConstraints(b);d=c=null;for(var f=0;f<a.length;f++){var g=this.graph.getConnectionPoint(b,a[f]);if(null!=g){var h=(g.x-e.x)*(g.x-e.x)+(g.y-e.y)*(g.y-e.y);if(null==d||h<d)c=g,d=h}}null!=c&&(e=c)}return e};var h=mxStencil.prototype.evaluateTextAttribute;
 mxStencil.prototype.evaluateTextAttribute=function(a,b,c){var d=h.apply(this,arguments);"1"==a.getAttribute("placeholders")&&null!=c.state&&(d=c.state.view.graph.replacePlaceholders(c.state.cell,d));return d};var g=mxCellRenderer.prototype.createShape;mxCellRenderer.prototype.createShape=function(a){if(null!=a.style&&"undefined"!==typeof pako){var b=mxUtils.getValue(a.style,mxConstants.STYLE_SHAPE,null);if(null!=b&&"stencil("==b.substring(0,8))try{var c=b.substring(8,b.length-1),d=mxUtils.parseXml(a.view.graph.decompress(c));
@@ -2448,11 +2449,11 @@ this.graph.currentEdgeStyle[b];return a};var d=mxConnectionHandler.prototype.cre
 c.apply(this,arguments);this.error=null;return b});return a};Graph.prototype.defaultVertexStyle={};Graph.prototype.defaultEdgeStyle={edgeStyle:"orthogonalEdgeStyle",rounded:"0",jettySize:"auto",orthogonalLoop:"1"};Graph.prototype.createCurrentEdgeStyle=function(){var a="edgeStyle="+(this.currentEdgeStyle.edgeStyle||"none")+";";null!=this.currentEdgeStyle.shape&&(a+="shape="+this.currentEdgeStyle.shape+";");null!=this.currentEdgeStyle.curved&&(a+="curved="+this.currentEdgeStyle.curved+";");null!=this.currentEdgeStyle.rounded&&
 (a+="rounded="+this.currentEdgeStyle.rounded+";");null!=this.currentEdgeStyle.comic&&(a+="comic="+this.currentEdgeStyle.comic+";");null!=this.currentEdgeStyle.jumpStyle&&(a+="jumpStyle="+this.currentEdgeStyle.jumpStyle+";");null!=this.currentEdgeStyle.jumpSize&&(a+="jumpSize="+this.currentEdgeStyle.jumpSize+";");"elbowEdgeStyle"==this.currentEdgeStyle.edgeStyle&&null!=this.currentEdgeStyle.elbow&&(a+="elbow="+this.currentEdgeStyle.elbow+";");return a=null!=this.currentEdgeStyle.html?a+("html="+this.currentEdgeStyle.html+
 ";"):a+"html=1;"};Graph.prototype.getPagePadding=function(){return new mxPoint(0,0)};Graph.prototype.loadStylesheet=function(){var a=null!=this.themes?this.themes[this.defaultThemeName]:mxStyleRegistry.dynamicLoading?mxUtils.load(STYLE_PATH+"/default.xml").getDocumentElement():null;null!=a&&(new mxCodec(a.ownerDocument)).decode(a,this.getStylesheet())};Graph.prototype.getAllConnectionConstraints=function(a,b){if(null!=a){var c=mxUtils.getValue(a.style,"points",null);if(null!=c){var d=[];try{for(var e=
-JSON.parse(c),c=0;c<e.length;c++){var f=e[c];d.push(new mxConnectionConstraint(new mxPoint(f[0],f[1]),2<f.length?"0"!=f[2]:!0))}}catch(S){}return d}if(null!=a.shape)if(null!=a.shape.stencil){if(null!=a.shape.stencil)return a.shape.stencil.constraints}else if(null!=a.shape.constraints)return a.shape.constraints}return null};Graph.prototype.flipEdge=function(a){if(null!=a){var b=this.view.getState(a),b=null!=b?b.style:this.getCellStyle(a);null!=b&&(b=mxUtils.getValue(b,mxConstants.STYLE_ELBOW,mxConstants.ELBOW_HORIZONTAL)==
+JSON.parse(c),c=0;c<e.length;c++){var f=e[c];d.push(new mxConnectionConstraint(new mxPoint(f[0],f[1]),2<f.length?"0"!=f[2]:!0))}}catch(aa){}return d}if(null!=a.shape)if(null!=a.shape.stencil){if(null!=a.shape.stencil)return a.shape.stencil.constraints}else if(null!=a.shape.constraints)return a.shape.constraints}return null};Graph.prototype.flipEdge=function(a){if(null!=a){var b=this.view.getState(a),b=null!=b?b.style:this.getCellStyle(a);null!=b&&(b=mxUtils.getValue(b,mxConstants.STYLE_ELBOW,mxConstants.ELBOW_HORIZONTAL)==
 mxConstants.ELBOW_HORIZONTAL?mxConstants.ELBOW_VERTICAL:mxConstants.ELBOW_HORIZONTAL,this.setCellStyles(mxConstants.STYLE_ELBOW,b,[a]))}};Graph.prototype.isValidRoot=function(a){for(var b=this.model.getChildCount(a),c=0,d=0;d<b;d++){var e=this.model.getChildAt(a,d);this.model.isVertex(e)&&(e=this.getCellGeometry(e),null==e||e.relative||c++)}return 0<c||this.isContainer(a)};Graph.prototype.isValidDropTarget=function(a){var b=this.view.getState(a),b=null!=b?b.style:this.getCellStyle(a);return"1"!=mxUtils.getValue(b,
 "part","0")&&(this.isContainer(a)||mxGraph.prototype.isValidDropTarget.apply(this,arguments)&&"0"!=mxUtils.getValue(b,"dropTarget","1"))};Graph.prototype.createGroupCell=function(){var a=mxGraph.prototype.createGroupCell.apply(this,arguments);a.setStyle("group");return a};Graph.prototype.isExtendParentsOnAdd=function(a){var b=mxGraph.prototype.isExtendParentsOnAdd.apply(this,arguments);if(b&&null!=a&&null!=this.layoutManager){var c=this.model.getParent(a);null!=c&&(c=this.layoutManager.getLayout(c),
 null!=c&&c.constructor==mxStackLayout&&(b=!1))}return b};Graph.prototype.getPreferredSizeForCell=function(a){var b=mxGraph.prototype.getPreferredSizeForCell.apply(this,arguments);null!=b&&(b.width+=10,b.height+=4,this.gridEnabled&&(b.width=this.snap(b.width),b.height=this.snap(b.height)));return b};Graph.prototype.turnShapes=function(a){var b=this.getModel(),c=[];b.beginUpdate();try{for(var d=0;d<a.length;d++){var e=a[d];if(b.isEdge(e)){var f=b.getTerminal(e,!0),g=b.getTerminal(e,!1);b.setTerminal(e,
-g,!0);b.setTerminal(e,f,!1);var h=b.getGeometry(e);if(null!=h){h=h.clone();null!=h.points&&h.points.reverse();var k=h.getTerminalPoint(!0),l=h.getTerminalPoint(!1);h.setTerminalPoint(k,!1);h.setTerminalPoint(l,!0);b.setGeometry(e,h);var m=this.view.getState(e),D=this.view.getState(f),n=this.view.getState(g);if(null!=m){var p=null!=D?this.getConnectionConstraint(m,D,!0):null,q=null!=n?this.getConnectionConstraint(m,n,!1):null;this.setConnectionConstraint(e,f,!0,q);this.setConnectionConstraint(e,g,
+g,!0);b.setTerminal(e,f,!1);var h=b.getGeometry(e);if(null!=h){h=h.clone();null!=h.points&&h.points.reverse();var k=h.getTerminalPoint(!0),l=h.getTerminalPoint(!1);h.setTerminalPoint(k,!1);h.setTerminalPoint(l,!0);b.setGeometry(e,h);var m=this.view.getState(e),E=this.view.getState(f),n=this.view.getState(g);if(null!=m){var p=null!=E?this.getConnectionConstraint(m,E,!0):null,q=null!=n?this.getConnectionConstraint(m,n,!1):null;this.setConnectionConstraint(e,f,!0,q);this.setConnectionConstraint(e,g,
 !1,p)}c.push(e)}}else if(b.isVertex(e)&&(h=this.getCellGeometry(e),null!=h)){h=h.clone();h.x+=h.width/2-h.height/2;h.y+=h.height/2-h.width/2;var r=h.width;h.width=h.height;h.height=r;b.setGeometry(e,h);var t=this.view.getState(e);if(null!=t){var x=t.style[mxConstants.STYLE_DIRECTION]||"east";"east"==x?x="south":"south"==x?x="west":"west"==x?x="north":"north"==x&&(x="east");this.setCellStyles(mxConstants.STYLE_DIRECTION,x,[e])}c.push(e)}}}finally{b.endUpdate()}return c};Graph.prototype.processChange=
 function(a){mxGraph.prototype.processChange.apply(this,arguments);if(a instanceof mxValueChange&&null!=a.cell.value&&"object"==typeof a.cell.value){var b=this.model.getDescendants(a.cell);if(0<b.length)for(var c=0;c<b.length;c++)this.isReplacePlaceholders(b[c])&&this.view.invalidate(b[c],!1,!1)}};Graph.prototype.cellLabelChanged=function(a,b,c){b=this.zapGremlins(b);this.model.beginUpdate();try{if(null!=a.value&&"object"==typeof a.value){if(this.isReplacePlaceholders(a)&&null!=a.getAttribute("placeholder"))for(var d=
 a.getAttribute("placeholder"),e=a;null!=e;){if(e==this.model.getRoot()||null!=e.value&&"object"==typeof e.value&&e.hasAttribute(d)){this.setAttributeForCell(e,d,b);break}e=this.model.getParent(e)}var f=a.value.cloneNode(!0);f.setAttribute("label",b);b=f}mxGraph.prototype.cellLabelChanged.apply(this,arguments)}finally{this.model.endUpdate()}};Graph.prototype.removeCellsAfterUngroup=function(a){for(var b=[],c=0;c<a.length;c++)if(this.isCellDeletable(a[c])){var d=this.view.getState(a[c]);if(null!=d){var e=
@@ -2478,8 +2479,8 @@ d=d+k;null!=m&&null!=l&&(m=m.clone(),a?m.x=Math.round(d-m.width/2)-l.origin.x:m.
 e){var f=this.getCellGeometry(b[d]);null==f||!f.relative||this.model.isEdge(a[d])||c.get(this.model.getParent(a[d]))||(f.relative=!1,f.x=e.x/e.view.scale-e.view.translate.x,f.y=e.y/e.view.scale-e.view.translate.y)}}c=new mxCodec;e=new mxGraphModel;f=e.getChildAt(e.getRoot(),0);for(d=0;d<a.length;d++)e.add(f,b[d]);return c.encode(e)};Graph.prototype.createSvgImageExport=function(){var a=new mxImageExport;a.getLinkForCellState=mxUtils.bind(this,function(a,b){return this.getLinkForCell(a.cell)});return a};
 Graph.prototype.getSvg=function(a,b,c,d,e,f,g){b=null!=b?b:1;c=null!=c?c:0;e=null!=e?e:!0;f=null!=f?f:!0;g=null!=g?g:!0;var h=f||d?this.getGraphBounds():this.getBoundingBox(this.getSelectionCells());if(null==h)throw Error(mxResources.get("drawingEmpty"));var k=this.view.scale,l=mxUtils.createXmlDocument();d=null!=l.createElementNS?l.createElementNS(mxConstants.NS_SVG,"svg"):l.createElement("svg");null!=a&&(null!=d.style?d.style.backgroundColor=a:d.setAttribute("style","background-color:"+a));null==
 l.createElementNS?(d.setAttribute("xmlns",mxConstants.NS_SVG),d.setAttribute("xmlns:xlink",mxConstants.NS_XLINK)):d.setAttributeNS("http://www.w3.org/2000/xmlns/","xmlns:xlink",mxConstants.NS_XLINK);a=b/k;d.setAttribute("width",Math.max(1,Math.ceil(h.width*a)+2*c)+"px");d.setAttribute("height",Math.max(1,Math.ceil(h.height*a)+2*c)+"px");d.setAttribute("version","1.1");var m=d;e&&(m=null!=l.createElementNS?l.createElementNS(mxConstants.NS_SVG,"g"):l.createElement("g"),m.setAttribute("transform","translate(0.5,0.5)"),
-d.appendChild(m));l.appendChild(d);l=this.createSvgCanvas(m);l.foOffset=e?-.5:0;l.textOffset=e?-.5:0;l.imageOffset=e?-.5:0;l.translate(Math.floor((c/b-h.x)/k),Math.floor((c/b-h.y)/k));var n=l.createAlternateContent;l.createAlternateContent=function(a,b,c,d,e,f,g,h,k,l,m,z,p){var D=this.state;if(null!=this.foAltText&&(0==d||0!=D.fontSize&&f.length<5*d/D.fontSize)){var q=this.createElement("text");q.setAttribute("x",Math.round(d/2));q.setAttribute("y",Math.round((e+D.fontSize)/2));q.setAttribute("fill",
-D.fontColor||"black");q.setAttribute("text-anchor","middle");q.setAttribute("font-size",Math.round(D.fontSize)+"px");q.setAttribute("font-family",D.fontFamily);(D.fontStyle&mxConstants.FONT_BOLD)==mxConstants.FONT_BOLD&&q.setAttribute("font-weight","bold");(D.fontStyle&mxConstants.FONT_ITALIC)==mxConstants.FONT_ITALIC&&q.setAttribute("font-style","italic");(D.fontStyle&mxConstants.FONT_UNDERLINE)==mxConstants.FONT_UNDERLINE&&q.setAttribute("text-decoration","underline");mxUtils.write(q,f);return q}return n.apply(this,
+d.appendChild(m));l.appendChild(d);l=this.createSvgCanvas(m);l.foOffset=e?-.5:0;l.textOffset=e?-.5:0;l.imageOffset=e?-.5:0;l.translate(Math.floor((c/b-h.x)/k),Math.floor((c/b-h.y)/k));var n=l.createAlternateContent;l.createAlternateContent=function(a,b,c,d,e,f,g,h,k,l,m,z,p){var E=this.state;if(null!=this.foAltText&&(0==d||0!=E.fontSize&&f.length<5*d/E.fontSize)){var q=this.createElement("text");q.setAttribute("x",Math.round(d/2));q.setAttribute("y",Math.round((e+E.fontSize)/2));q.setAttribute("fill",
+E.fontColor||"black");q.setAttribute("text-anchor","middle");q.setAttribute("font-size",Math.round(E.fontSize)+"px");q.setAttribute("font-family",E.fontFamily);(E.fontStyle&mxConstants.FONT_BOLD)==mxConstants.FONT_BOLD&&q.setAttribute("font-weight","bold");(E.fontStyle&mxConstants.FONT_ITALIC)==mxConstants.FONT_ITALIC&&q.setAttribute("font-style","italic");(E.fontStyle&mxConstants.FONT_UNDERLINE)==mxConstants.FONT_UNDERLINE&&q.setAttribute("text-decoration","underline");mxUtils.write(q,f);return q}return n.apply(this,
 arguments)};c=this.backgroundImage;null!=c&&(e=k/b,b=this.view.translate,e=new mxRectangle(b.x*e,b.y*e,c.width*e,c.height*e),mxUtils.intersects(h,e)&&l.image(b.x,b.y,c.width,c.height,c.src,!0));l.scale(a);l.textEnabled=g;g=this.createSvgImageExport();var z=g.drawCellState;g.drawCellState=function(a,b){(f||a.view.graph.isCellSelected(a.cell))&&z.apply(this,arguments)};g.drawState(this.getView().getState(this.model.root),l);return d};Graph.prototype.createSvgCanvas=function(a){return new mxSvgCanvas2D(a)};
 Graph.prototype.getSelectedElement=function(){var a=null;if(window.getSelection){var b=window.getSelection();b.getRangeAt&&b.rangeCount&&(a=b.getRangeAt(0).commonAncestorContainer)}else document.selection&&(a=document.selection.createRange().parentElement());return a};Graph.prototype.getParentByName=function(a,b,c){for(;null!=a&&a.nodeName!=b;){if(a==c)return null;a=a.parentNode}return a};Graph.prototype.selectNode=function(a){var b=null;if(window.getSelection){if(b=window.getSelection(),b.getRangeAt&&
 b.rangeCount){var c=document.createRange();c.selectNode(a);b.removeAllRanges();b.addRange(c)}}else(b=document.selection)&&"Control"!=b.type&&(a=b.createRange(),a.collapse(!0),c=b.createRange(),c.setEndPoint("StartToStart",a),c.select())};Graph.prototype.insertRow=function(a,b){for(var c=a.tBodies[0],d=0<c.rows.length?c.rows[0].cells.length:1,c=c.insertRow(b),e=0;e<d;e++)mxUtils.br(c.insertCell(-1));return c.cells[0]};Graph.prototype.deleteRow=function(a,b){a.tBodies[0].deleteRow(b)};Graph.prototype.insertColumn=
@@ -2489,7 +2490,7 @@ c.setAttribute("target",this.linkTarget);60<b.length&&(b=b.substring(0,36)+"..."
 this.getCellAt(b.graphX,b.graphY);null!=c&&this.isSwimlane(c)&&this.hitsSwimlaneContent(c,b.graphX,b.graphY)||(b.state=this.view.getState(c),null!=b.state&&null!=b.state.shape&&(this.container.style.cursor=b.state.shape.node.style.cursor))}null==b.getState()&&this.isEnabled()&&(this.container.style.cursor="default");return b};var b=!1,c=!1,d=!1,e=this.fireMouseEvent;this.fireMouseEvent=function(a,f,g){a==mxEvent.MOUSE_DOWN&&(f=this.updateMouseEvent(f),b=this.isCellSelected(f.getCell()),c=this.isSelectionEmpty(),
 d=this.popupMenuHandler.isMenuShowing());e.apply(this,arguments)};this.popupMenuHandler.mouseUp=mxUtils.bind(this,function(a,e){this.popupMenuHandler.popupTrigger=!this.isEditing()&&this.isEnabled()&&(null==e.getState()||!e.isSource(e.getState().control))&&(this.popupMenuHandler.popupTrigger||!d&&!mxEvent.isMouseEvent(e.getEvent())&&(c&&null==e.getCell()&&this.isSelectionEmpty()||b&&this.isCellSelected(e.getCell())));mxPopupMenuHandler.prototype.mouseUp.apply(this.popupMenuHandler,arguments)})};mxCellEditor.prototype.isContentEditing=
 function(){var a=this.graph.view.getState(this.editingCell);return null!=a&&1==a.style.html};mxCellEditor.prototype.saveSelection=function(){if(window.getSelection){if(sel=window.getSelection(),sel.getRangeAt&&sel.rangeCount){for(var a=[],b=0,c=sel.rangeCount;b<c;++b)a.push(sel.getRangeAt(b));return a}}else if(document.selection&&document.selection.createRange)return document.selection.createRange();return null};mxCellEditor.prototype.restoreSelection=function(a){try{if(a)if(window.getSelection){sel=
-window.getSelection();sel.removeAllRanges();for(var b=0,c=a.length;b<c;++b)sel.addRange(a[b])}else document.selection&&a.select&&a.select()}catch(P){}};var e=mxCellRenderer.prototype.initializeLabel;mxCellRenderer.prototype.initializeLabel=function(a){null!=a.text&&(a.text.replaceLinefeeds="0"!=mxUtils.getValue(a.style,"nl2Br","1"));e.apply(this,arguments)};var f=mxConstraintHandler.prototype.update;mxConstraintHandler.prototype.update=function(a,b){this.isKeepFocusEvent(a)||!mxEvent.isAltDown(a.getEvent())?
+window.getSelection();sel.removeAllRanges();for(var b=0,c=a.length;b<c;++b)sel.addRange(a[b])}else document.selection&&a.select&&a.select()}catch(Q){}};var e=mxCellRenderer.prototype.initializeLabel;mxCellRenderer.prototype.initializeLabel=function(a){null!=a.text&&(a.text.replaceLinefeeds="0"!=mxUtils.getValue(a.style,"nl2Br","1"));e.apply(this,arguments)};var f=mxConstraintHandler.prototype.update;mxConstraintHandler.prototype.update=function(a,b){this.isKeepFocusEvent(a)||!mxEvent.isAltDown(a.getEvent())?
 f.apply(this,arguments):this.reset()};mxGuide.prototype.createGuideShape=function(a){return new mxPolyline([],mxConstants.GUIDE_COLOR,mxConstants.GUIDE_STROKEWIDTH)};mxCellEditor.prototype.escapeCancelsEditing=!1;var h=mxCellEditor.prototype.startEditing;mxCellEditor.prototype.startEditing=function(a,b){h.apply(this,arguments);var c=this.graph.view.getState(a);this.textarea.className=null!=c&&1==c.style.html?"mxCellEditor geContentEditable":"mxCellEditor mxPlainTextEditor";this.codeViewMode=!1;this.switchSelectionState=
 null;this.graph.setSelectionCell(a);var c=this.graph.getModel().getParent(a),d=this.graph.getCellGeometry(a);this.graph.getModel().isEdge(c)&&null!=d&&d.relative||this.graph.getModel().isEdge(a)?mxClient.IS_QUIRKS?this.textarea.style.border="gray dotted 1px":this.textarea.style.outline=mxClient.IS_IE||mxClient.IS_IE11||mxClient.IS_FF&&mxClient.IS_WIN?"gray dotted 1px":"":mxClient.IS_QUIRKS&&(this.textarea.style.outline="none",this.textarea.style.border="")};var g=mxCellEditor.prototype.installListeners;
 mxCellEditor.prototype.installListeners=function(a){function b(a,c){c.originalNode=a;a=a.firstChild;for(var d=c.firstChild;null!=a&&null!=d;)b(a,d),a=a.nextSibling,d=d.nextSibling;return c}function c(a,b){if(null!=a)if(b.originalNode!=a)d(a);else for(a=a.firstChild,b=b.firstChild;null!=a;){var e=a.nextSibling;null==b?d(a):(c(a,b),b=b.nextSibling);a=e}}function d(a){for(var b=a.firstChild;null!=b;){var c=b.nextSibling;d(b);b=c}1==a.nodeType&&("BR"===a.nodeName||null!=a.firstChild)||3==a.nodeType&&
@@ -2504,7 +2505,7 @@ null!=a){var c=a.view.scale;this.bounds=mxRectangle.fromRectangle(a);if(0==this.
 Math.round((this.bounds.width-4)/c)+"px";this.textarea.style.height=Math.round((this.bounds.height-4)/c)+"px";this.textarea.style.overflow="auto";this.textarea.clientHeight<this.textarea.offsetHeight&&(this.textarea.style.height=Math.round(this.bounds.height/c)+(this.textarea.offsetHeight-this.textarea.clientHeight)+"px",this.bounds.height=parseInt(this.textarea.style.height)*c);this.textarea.clientWidth<this.textarea.offsetWidth&&(this.textarea.style.width=Math.round(this.bounds.width/c)+(this.textarea.offsetWidth-
 this.textarea.clientWidth)+"px",this.bounds.width=parseInt(this.textarea.style.width)*c);this.textarea.style.left=Math.round(this.bounds.x)+"px";this.textarea.style.top=Math.round(this.bounds.y)+"px";mxClient.IS_VML?this.textarea.style.zoom=c:mxUtils.setPrefixedStyle(this.textarea.style,"transform","scale("+c+","+c+")")}else this.textarea.style.height="",this.textarea.style.overflow="",k.apply(this,arguments)};mxCellEditorGetInitialValue=mxCellEditor.prototype.getInitialValue;mxCellEditor.prototype.getInitialValue=
 function(a,b){if("0"==mxUtils.getValue(a.style,"html","0"))return mxCellEditorGetInitialValue.apply(this,arguments);var c=this.graph.getEditingValue(a.cell,b);"1"==mxUtils.getValue(a.style,"nl2Br","1")&&(c=c.replace(/\n/g,"<br/>"));return c=this.graph.sanitizeHtml(c,!0)};mxCellEditorGetCurrentValue=mxCellEditor.prototype.getCurrentValue;mxCellEditor.prototype.getCurrentValue=function(a){if("0"==mxUtils.getValue(a.style,"html","0"))return mxCellEditorGetCurrentValue.apply(this,arguments);var b=this.graph.sanitizeHtml(this.textarea.innerHTML,
-!0);return b="1"==mxUtils.getValue(a.style,"nl2Br","1")?b.replace(/\r\n/g,"<br/>").replace(/\n/g,"<br/>"):b.replace(/\r\n/g,"").replace(/\n/g,"")};var l=mxCellEditor.prototype.stopEditing;mxCellEditor.prototype.stopEditing=function(a){this.codeViewMode&&this.toggleViewMode();l.apply(this,arguments);this.focusContainer()};mxCellEditor.prototype.focusContainer=function(){try{this.graph.container.focus()}catch(D){}};var m=mxCellEditor.prototype.applyValue;mxCellEditor.prototype.applyValue=function(a,
+!0);return b="1"==mxUtils.getValue(a.style,"nl2Br","1")?b.replace(/\r\n/g,"<br/>").replace(/\n/g,"<br/>"):b.replace(/\r\n/g,"").replace(/\n/g,"")};var l=mxCellEditor.prototype.stopEditing;mxCellEditor.prototype.stopEditing=function(a){this.codeViewMode&&this.toggleViewMode();l.apply(this,arguments);this.focusContainer()};mxCellEditor.prototype.focusContainer=function(){try{this.graph.container.focus()}catch(E){}};var m=mxCellEditor.prototype.applyValue;mxCellEditor.prototype.applyValue=function(a,
 b){this.graph.getModel().beginUpdate();try{if(m.apply(this,arguments),this.graph.isCellDeletable(a.cell)&&0==this.graph.model.getChildCount(a.cell)){var c=mxUtils.getValue(a.style,mxConstants.STYLE_STROKECOLOR,mxConstants.NONE),d=mxUtils.getValue(a.style,mxConstants.STYLE_FILLCOLOR,mxConstants.NONE);""==b&&c==mxConstants.NONE&&d==mxConstants.NONE&&this.graph.removeCells([a.cell],!1)}}finally{this.graph.getModel().endUpdate()}};mxCellEditor.prototype.getBackgroundColor=function(a){var b=null;if(this.graph.getModel().isEdge(a.cell)||
 this.graph.getModel().isEdge(this.graph.getModel().getParent(a.cell)))b=mxUtils.getValue(a.style,mxConstants.STYLE_LABEL_BACKGROUNDCOLOR,null),b==mxConstants.NONE&&(b=null);return b};mxCellEditor.prototype.getMinimumSize=function(a){var b=this.graph.getView().scale;return new mxRectangle(0,0,null==a.text?30:a.text.size*b+20,30)};var n=mxGraphHandler.prototype.moveCells;mxGraphHandler.prototype.moveCells=function(a,b,c,d,e,f){mxEvent.isAltDown(f)&&(e=null);n.apply(this,arguments)};mxGraphHandler.prototype.updateHint=
 function(b){if(null!=this.shape){null==this.hint&&(this.hint=a(),this.graph.container.appendChild(this.hint));var c=this.graph.view.translate,d=this.graph.view.scale;b=this.roundLength((this.bounds.x+this.currentDx)/d-c.x);c=this.roundLength((this.bounds.y+this.currentDy)/d-c.y);this.hint.innerHTML=b+", "+c;this.hint.style.left=this.shape.bounds.x+Math.round((this.shape.bounds.width-this.hint.clientWidth)/2)+"px";this.hint.style.top=this.shape.bounds.y+this.shape.bounds.height+12+"px"}};mxGraphHandler.prototype.removeHint=
@@ -2531,35 +2532,35 @@ e,this.graph.getDefaultParent(),!0,!0),c=0;c<h.length;c++)if(this.graph.isCellMo
 d=mxUtils.getOffset(this.graph.container);c.x-=d.x;c.y-=d.y;var d=b.getX()+c.x,c=b.getY()+c.y,e=this.first.x-d,f=this.first.y-c,g=this.graph.tolerance;if(null!=this.div||Math.abs(e)>g||Math.abs(f)>g)null==this.div&&(this.div=this.createShape()),mxUtils.clearSelection(),this.update(d,c),this.isSpaceEvent(b)?(d=this.x+this.width,c=this.y+this.height,e=this.graph.view.scale,mxEvent.isAltDown(b.getEvent())||(this.width=this.graph.snap(this.width/e)*e,this.height=this.graph.snap(this.height/e)*e,this.graph.isGridEnabled()||
 (this.width<this.graph.tolerance&&(this.width=0),this.height<this.graph.tolerance&&(this.height=0)),this.x<this.first.x&&(this.x=d-this.width),this.y<this.first.y&&(this.y=c-this.height)),this.div.style.borderStyle="dashed",this.div.style.backgroundColor="white",this.div.style.left=this.x+"px",this.div.style.top=this.y+"px",this.div.style.width=Math.max(0,this.width)+"px",this.div.style.height=this.graph.container.clientHeight+"px",this.div.style.borderWidth=0>=this.width?"0px 1px 0px 0px":"0px 1px 0px 1px",
 null==this.secondDiv&&(this.secondDiv=this.div.cloneNode(!0),this.div.parentNode.appendChild(this.secondDiv)),this.secondDiv.style.left=this.x+"px",this.secondDiv.style.top=this.y+"px",this.secondDiv.style.width=this.graph.container.clientWidth+"px",this.secondDiv.style.height=Math.max(0,this.height)+"px",this.secondDiv.style.borderWidth=0>=this.height?"1px 0px 0px 0px":"1px 0px 1px 0px"):(this.div.style.backgroundColor="",this.div.style.borderWidth="",this.div.style.borderStyle="",null!=this.secondDiv&&
-(this.secondDiv.parentNode.removeChild(this.secondDiv),this.secondDiv=null)),b.consume()}};var r=mxRubberband.prototype.reset;mxRubberband.prototype.reset=function(){null!=this.secondDiv&&(this.secondDiv.parentNode.removeChild(this.secondDiv),this.secondDiv=null);r.apply(this,arguments)};var t=(new Date).getTime(),u=0,w=mxEdgeHandler.prototype.updatePreviewState;mxEdgeHandler.prototype.updatePreviewState=function(a,b,c,d){w.apply(this,arguments);c!=this.currentTerminalState?(t=(new Date).getTime(),
-u=0):u=(new Date).getTime()-t;this.currentTerminalState=c};var v=mxEdgeHandler.prototype.isOutlineConnectEvent;mxEdgeHandler.prototype.isOutlineConnectEvent=function(a){return null!=this.currentTerminalState&&a.getState()==this.currentTerminalState&&2E3<u||(null==this.currentTerminalState||"0"!=mxUtils.getValue(this.currentTerminalState.style,"outlineConnect","1"))&&v.apply(this,arguments)};mxVertexHandler.prototype.isCustomHandleEvent=function(a){return!mxEvent.isShiftDown(a.getEvent())};mxEdgeHandler.prototype.createHandleShape=
+(this.secondDiv.parentNode.removeChild(this.secondDiv),this.secondDiv=null)),b.consume()}};var r=mxRubberband.prototype.reset;mxRubberband.prototype.reset=function(){null!=this.secondDiv&&(this.secondDiv.parentNode.removeChild(this.secondDiv),this.secondDiv=null);r.apply(this,arguments)};var t=(new Date).getTime(),w=0,u=mxEdgeHandler.prototype.updatePreviewState;mxEdgeHandler.prototype.updatePreviewState=function(a,b,c,d){u.apply(this,arguments);c!=this.currentTerminalState?(t=(new Date).getTime(),
+w=0):w=(new Date).getTime()-t;this.currentTerminalState=c};var v=mxEdgeHandler.prototype.isOutlineConnectEvent;mxEdgeHandler.prototype.isOutlineConnectEvent=function(a){return null!=this.currentTerminalState&&a.getState()==this.currentTerminalState&&2E3<w||(null==this.currentTerminalState||"0"!=mxUtils.getValue(this.currentTerminalState.style,"outlineConnect","1"))&&v.apply(this,arguments)};mxVertexHandler.prototype.isCustomHandleEvent=function(a){return!mxEvent.isShiftDown(a.getEvent())};mxEdgeHandler.prototype.createHandleShape=
 function(a,b){var c=null!=a&&0==a,d=this.state.getVisibleTerminalState(c),e=null!=a&&(0==a||a>=this.state.absolutePoints.length-1||this.constructor==mxElbowEdgeHandler&&2==a)?this.graph.getConnectionConstraint(this.state,d,c):null,c=null!=(null!=e?this.graph.getConnectionPoint(this.state.getVisibleTerminalState(c),e):null)?this.fixedHandleImage:null!=e&&null!=d?this.terminalHandleImage:this.handleImage;if(null!=c)return c=new mxImageShape(new mxRectangle(0,0,c.width,c.height),c.src),c.preserveImageAspect=
 !1,c;c=mxConstants.HANDLE_SIZE;this.preferHtml&&--c;return new mxRectangleShape(new mxRectangle(0,0,c,c),mxConstants.HANDLE_FILLCOLOR,mxConstants.HANDLE_STROKECOLOR)};var A=mxVertexHandler.prototype.createSizerShape;mxVertexHandler.prototype.createSizerShape=function(a,b,c){this.handleImage=b==mxEvent.ROTATION_HANDLE?HoverIcons.prototype.rotationHandle:b==mxEvent.LABEL_HANDLE?this.secondaryHandleImage:this.handleImage;return A.apply(this,arguments)};var x=mxGraphHandler.prototype.getBoundingBox;mxGraphHandler.prototype.getBoundingBox=
-function(a){if(null!=a&&1==a.length){var b=this.graph.getModel(),c=b.getParent(a[0]),d=this.graph.getCellGeometry(a[0]);if(b.isEdge(c)&&null!=d&&d.relative&&(b=this.graph.view.getState(a[0]),null!=b&&2>b.width&&2>b.height&&null!=b.text&&null!=b.text.boundingBox))return mxRectangle.fromRectangle(b.text.boundingBox)}return x.apply(this,arguments)};var C=mxVertexHandler.prototype.getSelectionBounds;mxVertexHandler.prototype.getSelectionBounds=function(a){var b=this.graph.getModel(),c=b.getParent(a.cell),
-d=this.graph.getCellGeometry(a.cell);return b.isEdge(c)&&null!=d&&d.relative&&2>a.width&&2>a.height&&null!=a.text&&null!=a.text.boundingBox?(b=a.text.unrotatedBoundingBox||a.text.boundingBox,new mxRectangle(Math.round(b.x),Math.round(b.y),Math.round(b.width),Math.round(b.height))):C.apply(this,arguments)};var B=mxVertexHandler.prototype.mouseDown;mxVertexHandler.prototype.mouseDown=function(a,b){var c=this.graph.getModel(),d=c.getParent(this.state.cell),e=this.graph.getCellGeometry(this.state.cell);
-(this.getHandleForEvent(b)==mxEvent.ROTATION_HANDLE||!c.isEdge(d)||null==e||!e.relative||null==this.state||2<=this.state.width||2<=this.state.height)&&B.apply(this,arguments)};mxVertexHandler.prototype.isRotationHandleVisible=function(){return this.graph.isEnabled()&&this.rotationEnabled&&this.graph.isCellRotatable(this.state.cell)&&(0>=mxGraphHandler.prototype.maxCells||this.graph.getSelectionCount()<mxGraphHandler.prototype.maxCells)};mxVertexHandler.prototype.rotateClick=function(){this.state.view.graph.turnShapes([this.state.cell])};
-var y=mxVertexHandler.prototype.mouseMove;mxVertexHandler.prototype.mouseMove=function(a,b){y.apply(this,arguments);null!=this.graph.graphHandler.first&&null!=this.rotationShape&&null!=this.rotationShape.node&&(this.rotationShape.node.style.display="none")};var J=mxVertexHandler.prototype.mouseUp;mxVertexHandler.prototype.mouseUp=function(a,b){J.apply(this,arguments);null!=this.rotationShape&&null!=this.rotationShape.node&&(this.rotationShape.node.style.display=1==this.graph.getSelectionCount()?"":
-"none")};var K=mxVertexHandler.prototype.init;mxVertexHandler.prototype.init=function(){K.apply(this,arguments);var a=!1;null!=this.rotationShape&&this.rotationShape.node.setAttribute("title",mxResources.get("rotateTooltip"));var b=mxUtils.bind(this,function(){null!=this.rotationShape&&null!=this.rotationShape.node&&(this.rotationShape.node.style.display=1==this.graph.getSelectionCount()?"":"none");null!=this.specialHandle&&(this.specialHandle.node.style.display=this.graph.isEnabled()&&this.graph.getSelectionCount()<
+function(a){if(null!=a&&1==a.length){var b=this.graph.getModel(),c=b.getParent(a[0]),d=this.graph.getCellGeometry(a[0]);if(b.isEdge(c)&&null!=d&&d.relative&&(b=this.graph.view.getState(a[0]),null!=b&&2>b.width&&2>b.height&&null!=b.text&&null!=b.text.boundingBox))return mxRectangle.fromRectangle(b.text.boundingBox)}return x.apply(this,arguments)};var B=mxVertexHandler.prototype.getSelectionBounds;mxVertexHandler.prototype.getSelectionBounds=function(a){var b=this.graph.getModel(),c=b.getParent(a.cell),
+d=this.graph.getCellGeometry(a.cell);return b.isEdge(c)&&null!=d&&d.relative&&2>a.width&&2>a.height&&null!=a.text&&null!=a.text.boundingBox?(b=a.text.unrotatedBoundingBox||a.text.boundingBox,new mxRectangle(Math.round(b.x),Math.round(b.y),Math.round(b.width),Math.round(b.height))):B.apply(this,arguments)};var C=mxVertexHandler.prototype.mouseDown;mxVertexHandler.prototype.mouseDown=function(a,b){var c=this.graph.getModel(),d=c.getParent(this.state.cell),e=this.graph.getCellGeometry(this.state.cell);
+(this.getHandleForEvent(b)==mxEvent.ROTATION_HANDLE||!c.isEdge(d)||null==e||!e.relative||null==this.state||2<=this.state.width||2<=this.state.height)&&C.apply(this,arguments)};mxVertexHandler.prototype.isRotationHandleVisible=function(){return this.graph.isEnabled()&&this.rotationEnabled&&this.graph.isCellRotatable(this.state.cell)&&(0>=mxGraphHandler.prototype.maxCells||this.graph.getSelectionCount()<mxGraphHandler.prototype.maxCells)};mxVertexHandler.prototype.rotateClick=function(){this.state.view.graph.turnShapes([this.state.cell])};
+var y=mxVertexHandler.prototype.mouseMove;mxVertexHandler.prototype.mouseMove=function(a,b){y.apply(this,arguments);null!=this.graph.graphHandler.first&&null!=this.rotationShape&&null!=this.rotationShape.node&&(this.rotationShape.node.style.display="none")};var I=mxVertexHandler.prototype.mouseUp;mxVertexHandler.prototype.mouseUp=function(a,b){I.apply(this,arguments);null!=this.rotationShape&&null!=this.rotationShape.node&&(this.rotationShape.node.style.display=1==this.graph.getSelectionCount()?"":
+"none")};var L=mxVertexHandler.prototype.init;mxVertexHandler.prototype.init=function(){L.apply(this,arguments);var a=!1;null!=this.rotationShape&&this.rotationShape.node.setAttribute("title",mxResources.get("rotateTooltip"));var b=mxUtils.bind(this,function(){null!=this.rotationShape&&null!=this.rotationShape.node&&(this.rotationShape.node.style.display=1==this.graph.getSelectionCount()?"":"none");null!=this.specialHandle&&(this.specialHandle.node.style.display=this.graph.isEnabled()&&this.graph.getSelectionCount()<
 this.graph.graphHandler.maxCells?"":"none");this.redrawHandles()});this.selectionHandler=mxUtils.bind(this,function(a,c){b()});this.graph.getSelectionModel().addListener(mxEvent.CHANGE,this.selectionHandler);this.changeHandler=mxUtils.bind(this,function(a,c){this.updateLinkHint(this.graph.getLinkForCell(this.state.cell),this.graph.getLinksForState(this.state));b()});this.graph.getModel().addListener(mxEvent.CHANGE,this.changeHandler);this.editingHandler=mxUtils.bind(this,function(a,b){this.redrawHandles()});
 this.graph.addListener(mxEvent.EDITING_STOPPED,this.editingHandler);var c=this.graph.getLinkForCell(this.state.cell),d=this.graph.getLinksForState(this.state);this.updateLinkHint(c,d);if(null!=c||null!=d&&0<d.length)a=!0;a&&this.redrawHandles()};mxVertexHandler.prototype.updateLinkHint=function(b,c){if(null==b&&(null==c||0==c.length)||1<this.graph.getSelectionCount())null!=this.linkHint&&(this.linkHint.parentNode.removeChild(this.linkHint),this.linkHint=null);else if(null!=b||null!=c&&0<c.length){null==
 this.linkHint&&(this.linkHint=a(),this.linkHint.style.padding="6px 8px 6px 8px",this.linkHint.style.fontSize="90%",this.linkHint.style.opacity="1",this.linkHint.style.filter="",this.graph.container.appendChild(this.linkHint));this.linkHint.innerHTML="";if(null!=b&&(this.linkHint.appendChild(this.graph.createLinkForHint(b)),this.graph.isEnabled()&&"function"===typeof this.graph.editLink)){var d=document.createElement("img");d.setAttribute("src",IMAGE_PATH+"/edit.gif");d.setAttribute("title",mxResources.get("editLink"));
 d.setAttribute("width","11");d.setAttribute("height","11");d.style.marginLeft="10px";d.style.marginBottom="-1px";d.style.cursor="pointer";this.linkHint.appendChild(d);mxEvent.addListener(d,"click",mxUtils.bind(this,function(a){this.graph.setSelectionCell(this.state.cell);this.graph.editLink();mxEvent.consume(a)}))}if(null!=c)for(d=0;d<c.length;d++){var e=document.createElement("div");e.style.marginTop=null!=b||0<d?"6px":"0px";e.appendChild(this.graph.createLinkForHint(c[d].getAttribute("href"),mxUtils.getTextContent(c[d])));
-this.linkHint.appendChild(e)}}};mxEdgeHandler.prototype.updateLinkHint=mxVertexHandler.prototype.updateLinkHint;var I=mxEdgeHandler.prototype.init;mxEdgeHandler.prototype.init=function(){I.apply(this,arguments);this.constraintHandler.isEnabled=mxUtils.bind(this,function(){return this.state.view.graph.connectionHandler.isEnabled()});var a=mxUtils.bind(this,function(){null!=this.linkHint&&(this.linkHint.style.display=1==this.graph.getSelectionCount()?"":"none");null!=this.labelShape&&(this.labelShape.node.style.display=
+this.linkHint.appendChild(e)}}};mxEdgeHandler.prototype.updateLinkHint=mxVertexHandler.prototype.updateLinkHint;var J=mxEdgeHandler.prototype.init;mxEdgeHandler.prototype.init=function(){J.apply(this,arguments);this.constraintHandler.isEnabled=mxUtils.bind(this,function(){return this.state.view.graph.connectionHandler.isEnabled()});var a=mxUtils.bind(this,function(){null!=this.linkHint&&(this.linkHint.style.display=1==this.graph.getSelectionCount()?"":"none");null!=this.labelShape&&(this.labelShape.node.style.display=
 this.graph.isEnabled()&&this.graph.getSelectionCount()<this.graph.graphHandler.maxCells?"":"none")});this.selectionHandler=mxUtils.bind(this,function(b,c){a()});this.graph.getSelectionModel().addListener(mxEvent.CHANGE,this.selectionHandler);this.changeHandler=mxUtils.bind(this,function(b,c){this.updateLinkHint(this.graph.getLinkForCell(this.state.cell),this.graph.getLinksForState(this.state));a();this.redrawHandles()});this.graph.getModel().addListener(mxEvent.CHANGE,this.changeHandler);var b=this.graph.getLinkForCell(this.state.cell),
-c=this.graph.getLinksForState(this.state);if(null!=b||null!=c&&0<c.length)this.updateLinkHint(b,c),this.redrawHandles()};var F=mxConnectionHandler.prototype.init;mxConnectionHandler.prototype.init=function(){F.apply(this,arguments);this.constraintHandler.isEnabled=mxUtils.bind(this,function(){return this.graph.connectionHandler.isEnabled()})};var E=mxVertexHandler.prototype.redrawHandles;mxVertexHandler.prototype.redrawHandles=function(){E.apply(this);if(null!=this.state&&null!=this.linkHint){var a=
+c=this.graph.getLinksForState(this.state);if(null!=b||null!=c&&0<c.length)this.updateLinkHint(b,c),this.redrawHandles()};var G=mxConnectionHandler.prototype.init;mxConnectionHandler.prototype.init=function(){G.apply(this,arguments);this.constraintHandler.isEnabled=mxUtils.bind(this,function(){return this.graph.connectionHandler.isEnabled()})};var D=mxVertexHandler.prototype.redrawHandles;mxVertexHandler.prototype.redrawHandles=function(){D.apply(this);if(null!=this.state&&null!=this.linkHint){var a=
 new mxPoint(this.state.getCenterX(),this.state.getCenterY()),b=new mxRectangle(this.state.x,this.state.y-22,this.state.width+24,this.state.height+22),c=mxUtils.getBoundingBox(b,this.state.style[mxConstants.STYLE_ROTATION]||"0",a),a=null!=c?mxUtils.getBoundingBox(this.state,this.state.style[mxConstants.STYLE_ROTATION]||"0"):this.state,b=null!=this.state.text?this.state.text.boundingBox:null;null==c&&(c=this.state);c=c.y+c.height;null!=b&&(c=Math.max(c,b.y+b.height));this.linkHint.style.left=Math.round(a.x+
-(a.width-this.linkHint.clientWidth)/2)+"px";this.linkHint.style.top=Math.round(c+this.verticalOffset/2+6+this.state.view.graph.tolerance)+"px"}};var N=mxVertexHandler.prototype.reset;mxVertexHandler.prototype.reset=function(){N.apply(this,arguments);null!=this.rotationShape&&null!=this.rotationShape.node&&(this.rotationShape.node.style.display=1==this.graph.getSelectionCount()?"":"none")};var M=mxVertexHandler.prototype.destroy;mxVertexHandler.prototype.destroy=function(){M.apply(this,arguments);
-null!=this.linkHint&&(this.linkHint.parentNode.removeChild(this.linkHint),this.linkHint=null);null!=this.selectionHandler&&(this.graph.getSelectionModel().removeListener(this.selectionHandler),this.selectionHandler=null);null!=this.changeHandler&&(this.graph.getModel().removeListener(this.changeHandler),this.changeHandler=null);null!=this.editingHandler&&(this.graph.removeListener(this.editingHandler),this.editingHandler=null)};var Q=mxEdgeHandler.prototype.redrawHandles;mxEdgeHandler.prototype.redrawHandles=
-function(){if(null!=this.marker&&(Q.apply(this),null!=this.state&&null!=this.linkHint)){var a=this.state;null!=this.state.text&&null!=this.state.text.bounds&&(a=new mxRectangle(a.x,a.y,a.width,a.height),a.add(this.state.text.bounds));this.linkHint.style.left=Math.round(a.x+(a.width-this.linkHint.clientWidth)/2)+"px";this.linkHint.style.top=Math.round(a.y+a.height+6+this.state.view.graph.tolerance)+"px"}};var O=mxEdgeHandler.prototype.reset;mxEdgeHandler.prototype.reset=function(){O.apply(this,arguments);
-null!=this.linkHint&&(this.linkHint.style.visibility="")};var G=mxEdgeHandler.prototype.destroy;mxEdgeHandler.prototype.destroy=function(){G.apply(this,arguments);null!=this.linkHint&&(this.linkHint.parentNode.removeChild(this.linkHint),this.linkHint=null);null!=this.selectionHandler&&(this.graph.getSelectionModel().removeListener(this.selectionHandler),this.selectionHandler=null);null!=this.changeHandler&&(this.graph.getModel().removeListener(this.changeHandler),this.changeHandler=null)}}();(function(){function a(){mxCylinder.call(this)}function c(){mxActor.call(this)}function d(){mxCylinder.call(this)}function b(){mxCylinder.call(this)}function e(){mxCylinder.call(this)}function f(){mxActor.call(this)}function h(){mxCylinder.call(this)}function g(){mxActor.call(this)}function k(){mxActor.call(this)}function l(){mxActor.call(this)}function m(){mxActor.call(this)}function n(){mxActor.call(this)}function p(){mxActor.call(this)}function q(){mxActor.call(this)}function r(a,b){this.canvas=
+(a.width-this.linkHint.clientWidth)/2)+"px";this.linkHint.style.top=Math.round(c+this.verticalOffset/2+6+this.state.view.graph.tolerance)+"px"}};var K=mxVertexHandler.prototype.reset;mxVertexHandler.prototype.reset=function(){K.apply(this,arguments);null!=this.rotationShape&&null!=this.rotationShape.node&&(this.rotationShape.node.style.display=1==this.graph.getSelectionCount()?"":"none")};var N=mxVertexHandler.prototype.destroy;mxVertexHandler.prototype.destroy=function(){N.apply(this,arguments);
+null!=this.linkHint&&(this.linkHint.parentNode.removeChild(this.linkHint),this.linkHint=null);null!=this.selectionHandler&&(this.graph.getSelectionModel().removeListener(this.selectionHandler),this.selectionHandler=null);null!=this.changeHandler&&(this.graph.getModel().removeListener(this.changeHandler),this.changeHandler=null);null!=this.editingHandler&&(this.graph.removeListener(this.editingHandler),this.editingHandler=null)};var P=mxEdgeHandler.prototype.redrawHandles;mxEdgeHandler.prototype.redrawHandles=
+function(){if(null!=this.marker&&(P.apply(this),null!=this.state&&null!=this.linkHint)){var a=this.state;null!=this.state.text&&null!=this.state.text.bounds&&(a=new mxRectangle(a.x,a.y,a.width,a.height),a.add(this.state.text.bounds));this.linkHint.style.left=Math.round(a.x+(a.width-this.linkHint.clientWidth)/2)+"px";this.linkHint.style.top=Math.round(a.y+a.height+6+this.state.view.graph.tolerance)+"px"}};var O=mxEdgeHandler.prototype.reset;mxEdgeHandler.prototype.reset=function(){O.apply(this,arguments);
+null!=this.linkHint&&(this.linkHint.style.visibility="")};var F=mxEdgeHandler.prototype.destroy;mxEdgeHandler.prototype.destroy=function(){F.apply(this,arguments);null!=this.linkHint&&(this.linkHint.parentNode.removeChild(this.linkHint),this.linkHint=null);null!=this.selectionHandler&&(this.graph.getSelectionModel().removeListener(this.selectionHandler),this.selectionHandler=null);null!=this.changeHandler&&(this.graph.getModel().removeListener(this.changeHandler),this.changeHandler=null)}}();(function(){function a(){mxCylinder.call(this)}function c(){mxActor.call(this)}function d(){mxCylinder.call(this)}function b(){mxCylinder.call(this)}function e(){mxCylinder.call(this)}function f(){mxActor.call(this)}function h(){mxCylinder.call(this)}function g(){mxActor.call(this)}function k(){mxActor.call(this)}function l(){mxActor.call(this)}function m(){mxActor.call(this)}function n(){mxActor.call(this)}function p(){mxActor.call(this)}function q(){mxActor.call(this)}function r(a,b){this.canvas=
 a;this.canvas.setLineJoin("round");this.canvas.setLineCap("round");this.defaultVariation=b;this.originalLineTo=this.canvas.lineTo;this.canvas.lineTo=mxUtils.bind(this,r.prototype.lineTo);this.originalMoveTo=this.canvas.moveTo;this.canvas.moveTo=mxUtils.bind(this,r.prototype.moveTo);this.originalClose=this.canvas.close;this.canvas.close=mxUtils.bind(this,r.prototype.close);this.originalQuadTo=this.canvas.quadTo;this.canvas.quadTo=mxUtils.bind(this,r.prototype.quadTo);this.originalCurveTo=this.canvas.curveTo;
-this.canvas.curveTo=mxUtils.bind(this,r.prototype.curveTo);this.originalArcTo=this.canvas.arcTo;this.canvas.arcTo=mxUtils.bind(this,r.prototype.arcTo)}function t(){mxRectangleShape.call(this)}function u(){mxActor.call(this)}function w(){mxActor.call(this)}function v(){mxActor.call(this)}function A(){mxRectangleShape.call(this)}function x(){mxRectangleShape.call(this)}function C(){mxCylinder.call(this)}function B(){mxShape.call(this)}function y(){mxShape.call(this)}function J(){mxEllipse.call(this)}
-function K(){mxShape.call(this)}function I(){mxShape.call(this)}function F(){mxRectangleShape.call(this)}function E(){mxShape.call(this)}function N(){mxShape.call(this)}function M(){mxShape.call(this)}function Q(){mxCylinder.call(this)}function O(){mxDoubleEllipse.call(this)}function G(){mxDoubleEllipse.call(this)}function D(){mxArrowConnector.call(this);this.spacing=0}function H(){mxArrowConnector.call(this);this.spacing=0}function z(){mxActor.call(this)}function P(){mxRectangleShape.call(this)}
-function V(){mxActor.call(this)}function Z(){mxActor.call(this)}function S(){mxActor.call(this)}function T(){mxActor.call(this)}function ia(){mxActor.call(this)}function aa(){mxActor.call(this)}function ja(){mxActor.call(this)}function ka(){mxActor.call(this)}function W(){mxActor.call(this)}function X(){mxActor.call(this)}function ba(){mxEllipse.call(this)}function ca(){mxEllipse.call(this)}function da(){mxEllipse.call(this)}function ea(){mxRhombus.call(this)}function oa(){mxEllipse.call(this)}function U(){mxEllipse.call(this)}
-function la(){mxEllipse.call(this)}function R(){mxEllipse.call(this)}function ta(){mxActor.call(this)}function pa(){mxActor.call(this)}function qa(){mxActor.call(this)}function ma(){mxConnector.call(this)}function Ba(a,b,c,d,e,f,g,h,k,l){g+=k;var ga=d.clone();d.x-=e*(2*g+k);d.y-=f*(2*g+k);e*=g+k;f*=g+k;return function(){a.ellipse(ga.x-e-g,ga.y-f-g,2*g,2*g);l?a.fillAndStroke():a.stroke()}}mxUtils.extend(a,mxCylinder);a.prototype.size=20;a.prototype.redrawPath=function(a,b,c,d,e,f){b=Math.max(0,Math.min(d,
+this.canvas.curveTo=mxUtils.bind(this,r.prototype.curveTo);this.originalArcTo=this.canvas.arcTo;this.canvas.arcTo=mxUtils.bind(this,r.prototype.arcTo)}function t(){mxRectangleShape.call(this)}function w(){mxRectangleShape.call(this)}function u(){mxActor.call(this)}function v(){mxActor.call(this)}function A(){mxActor.call(this)}function x(){mxRectangleShape.call(this)}function B(){mxRectangleShape.call(this)}function C(){mxCylinder.call(this)}function y(){mxShape.call(this)}function I(){mxShape.call(this)}
+function L(){mxEllipse.call(this)}function J(){mxShape.call(this)}function G(){mxShape.call(this)}function D(){mxRectangleShape.call(this)}function K(){mxShape.call(this)}function N(){mxShape.call(this)}function P(){mxShape.call(this)}function O(){mxCylinder.call(this)}function F(){mxDoubleEllipse.call(this)}function E(){mxDoubleEllipse.call(this)}function H(){mxArrowConnector.call(this);this.spacing=0}function z(){mxArrowConnector.call(this);this.spacing=0}function Q(){mxActor.call(this)}function S(){mxRectangleShape.call(this)}
+function T(){mxActor.call(this)}function aa(){mxActor.call(this)}function W(){mxActor.call(this)}function U(){mxActor.call(this)}function ia(){mxActor.call(this)}function ba(){mxActor.call(this)}function ja(){mxActor.call(this)}function ca(){mxActor.call(this)}function X(){mxActor.call(this)}function Y(){mxActor.call(this)}function da(){mxEllipse.call(this)}function ea(){mxEllipse.call(this)}function Z(){mxEllipse.call(this)}function na(){mxRhombus.call(this)}function V(){mxEllipse.call(this)}function ka(){mxEllipse.call(this)}
+function R(){mxEllipse.call(this)}function ta(){mxEllipse.call(this)}function ua(){mxActor.call(this)}function oa(){mxActor.call(this)}function pa(){mxActor.call(this)}function la(){mxConnector.call(this)}function Ca(a,b,c,d,e,f,g,h,k,l){g+=k;var ga=d.clone();d.x-=e*(2*g+k);d.y-=f*(2*g+k);e*=g+k;f*=g+k;return function(){a.ellipse(ga.x-e-g,ga.y-f-g,2*g,2*g);l?a.fillAndStroke():a.stroke()}}mxUtils.extend(a,mxCylinder);a.prototype.size=20;a.prototype.redrawPath=function(a,b,c,d,e,f){b=Math.max(0,Math.min(d,
 Math.min(e,parseFloat(mxUtils.getValue(this.style,"size",this.size)))));f?(a.moveTo(b,e),a.lineTo(b,b),a.lineTo(0,0),a.moveTo(b,b),a.lineTo(d,b)):(a.moveTo(0,0),a.lineTo(d-b,0),a.lineTo(d,b),a.lineTo(d,e),a.lineTo(b,e),a.lineTo(0,e-b),a.lineTo(0,0),a.close());a.end()};a.prototype.getLabelMargins=function(a){return mxUtils.getValue(this.style,"boundedLbl",!1)?(a=parseFloat(mxUtils.getValue(this.style,"size",this.size))*this.scale,new mxRectangle(a,a,0,0)):null};mxCellRenderer.prototype.defaultShapes.cube=
-a;var xa=Math.tan(mxUtils.toRadians(30)),na=(.5-xa)/2;mxUtils.extend(c,mxActor);c.prototype.size=20;c.prototype.redrawPath=function(a,b,c,d,e){b=Math.min(d,e/xa);a.translate((d-b)/2,(e-b)/2+b/4);a.moveTo(0,.25*b);a.lineTo(.5*b,b*na);a.lineTo(b,.25*b);a.lineTo(.5*b,(.5-na)*b);a.lineTo(0,.25*b);a.close();a.end()};mxCellRenderer.prototype.defaultShapes.isoRectangle=c;mxUtils.extend(d,mxCylinder);d.prototype.size=20;d.prototype.redrawPath=function(a,b,c,d,e,f){b=Math.min(d,e/(.5+xa));f?(a.moveTo(0,.25*
-b),a.lineTo(.5*b,(.5-na)*b),a.lineTo(b,.25*b),a.moveTo(.5*b,(.5-na)*b),a.lineTo(.5*b,(1-na)*b)):(a.translate((d-b)/2,(e-b)/2),a.moveTo(0,.25*b),a.lineTo(.5*b,b*na),a.lineTo(b,.25*b),a.lineTo(b,.75*b),a.lineTo(.5*b,(1-na)*b),a.lineTo(0,.75*b),a.close());a.end()};mxCellRenderer.prototype.defaultShapes.isoCube=d;mxUtils.extend(b,mxCylinder);b.prototype.redrawPath=function(a,b,c,d,e,f){b=Math.min(e/2,Math.round(e/8)+this.strokewidth-1);if(f&&null!=this.fill||!f&&null==this.fill)a.moveTo(0,b),a.curveTo(0,
+a;var za=Math.tan(mxUtils.toRadians(30)),ma=(.5-za)/2;mxUtils.extend(c,mxActor);c.prototype.size=20;c.prototype.redrawPath=function(a,b,c,d,e){b=Math.min(d,e/za);a.translate((d-b)/2,(e-b)/2+b/4);a.moveTo(0,.25*b);a.lineTo(.5*b,b*ma);a.lineTo(b,.25*b);a.lineTo(.5*b,(.5-ma)*b);a.lineTo(0,.25*b);a.close();a.end()};mxCellRenderer.prototype.defaultShapes.isoRectangle=c;mxUtils.extend(d,mxCylinder);d.prototype.size=20;d.prototype.redrawPath=function(a,b,c,d,e,f){b=Math.min(d,e/(.5+za));f?(a.moveTo(0,.25*
+b),a.lineTo(.5*b,(.5-ma)*b),a.lineTo(b,.25*b),a.moveTo(.5*b,(.5-ma)*b),a.lineTo(.5*b,(1-ma)*b)):(a.translate((d-b)/2,(e-b)/2),a.moveTo(0,.25*b),a.lineTo(.5*b,b*ma),a.lineTo(b,.25*b),a.lineTo(b,.75*b),a.lineTo(.5*b,(1-ma)*b),a.lineTo(0,.75*b),a.close());a.end()};mxCellRenderer.prototype.defaultShapes.isoCube=d;mxUtils.extend(b,mxCylinder);b.prototype.redrawPath=function(a,b,c,d,e,f){b=Math.min(e/2,Math.round(e/8)+this.strokewidth-1);if(f&&null!=this.fill||!f&&null==this.fill)a.moveTo(0,b),a.curveTo(0,
 2*b,d,2*b,d,b),f||(a.stroke(),a.begin()),a.translate(0,b/2),a.moveTo(0,b),a.curveTo(0,2*b,d,2*b,d,b),f||(a.stroke(),a.begin()),a.translate(0,b/2),a.moveTo(0,b),a.curveTo(0,2*b,d,2*b,d,b),f||(a.stroke(),a.begin()),a.translate(0,-b);f||(a.moveTo(0,b),a.curveTo(0,-b/3,d,-b/3,d,b),a.lineTo(d,e-b),a.curveTo(d,e+b/3,0,e+b/3,0,e-b),a.close())};b.prototype.getLabelMargins=function(a){return new mxRectangle(0,2.5*Math.min(a.height/2,Math.round(a.height/8)+this.strokewidth-1)*this.scale,0,0)};mxCellRenderer.prototype.defaultShapes.datastore=
 b;mxUtils.extend(e,mxCylinder);e.prototype.size=30;e.prototype.redrawPath=function(a,b,c,d,e,f){b=Math.max(0,Math.min(d,Math.min(e,parseFloat(mxUtils.getValue(this.style,"size",this.size)))));f?(a.moveTo(d-b,0),a.lineTo(d-b,b),a.lineTo(d,b)):(a.moveTo(0,0),a.lineTo(d-b,0),a.lineTo(d,b),a.lineTo(d,e),a.lineTo(0,e),a.lineTo(0,0),a.close());a.end()};mxCellRenderer.prototype.defaultShapes.note=e;mxUtils.extend(f,mxActor);f.prototype.redrawPath=function(a,b,c,d,e){a.moveTo(0,0);a.quadTo(d/2,.5*e,d,0);
 a.quadTo(.5*d,e/2,d,e);a.quadTo(d/2,.5*e,0,e);a.quadTo(.5*d,e/2,0,0);a.end()};mxCellRenderer.prototype.defaultShapes["switch"]=f;mxUtils.extend(h,mxCylinder);h.prototype.tabWidth=60;h.prototype.tabHeight=20;h.prototype.tabPosition="right";h.prototype.redrawPath=function(a,b,c,d,e,f){b=Math.max(0,Math.min(d,parseFloat(mxUtils.getValue(this.style,"tabWidth",this.tabWidth))));c=Math.max(0,Math.min(e,parseFloat(mxUtils.getValue(this.style,"tabHeight",this.tabHeight))));var g=mxUtils.getValue(this.style,
@@ -2574,125 +2575,126 @@ e/2),new mxPoint(b,e/2),new mxPoint(b,e),new mxPoint(d,e)],this.isRounded,c,!1);
 this.lastX=a;this.lastY=b;this.firstX=a;this.firstY=b};r.prototype.close=function(){null!=this.firstX&&null!=this.firstY&&(this.lineTo(this.firstX,this.firstY),this.originalClose.apply(this.canvas,arguments));this.originalClose.apply(this.canvas,arguments)};r.prototype.quadTo=function(a,b,c,d){this.originalQuadTo.apply(this.canvas,arguments);this.lastX=c;this.lastY=d};r.prototype.curveTo=function(a,b,c,d,e,f){this.originalCurveTo.apply(this.canvas,arguments);this.lastX=e;this.lastY=f};r.prototype.arcTo=
 function(a,b,c,d,e,f,g){this.originalArcTo.apply(this.canvas,arguments);this.lastX=f;this.lastY=g};r.prototype.lineTo=function(a,b){if(null!=this.lastX&&null!=this.lastY){var c=function(a){return"number"===typeof a?a?0>a?-1:1:a===a?0:NaN:NaN},d=Math.abs(a-this.lastX),e=Math.abs(b-this.lastY),f=Math.sqrt(d*d+e*e);if(2>f){this.originalLineTo.apply(this.canvas,arguments);this.lastX=a;this.lastY=b;return}var g=Math.round(f/10),h=this.defaultVariation;5>g&&(g=5,h/=3);for(var ga=c(a-this.lastX)*d/g,c=c(b-
 this.lastY)*e/g,d=d/f,e=e/f,f=0;f<g;f++){var k=(Math.random()-.5)*h;this.originalLineTo.call(this.canvas,ga*f+this.lastX-k*e,c*f+this.lastY-k*d)}this.originalLineTo.call(this.canvas,a,b)}else this.originalLineTo.apply(this.canvas,arguments);this.lastX=a;this.lastY=b};r.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};var Fa=mxShape.prototype.paint;mxShape.prototype.defaultJiggle=1.5;mxShape.prototype.paint=function(a){null!=this.style&&"0"!=mxUtils.getValue(this.style,"comic","0")&&null==a.handHiggle&&(a.handJiggle=new r(a,mxUtils.getValue(this.style,"jiggle",this.defaultJiggle)));Fa.apply(this,arguments);null!=a.handJiggle&&(a.handJiggle.destroy(),delete a.handJiggle)};mxRhombus.prototype.defaultJiggle=2;var Ga=mxRectangleShape.prototype.isHtmlAllowed;mxRectangleShape.prototype.isHtmlAllowed=
-function(){return(null==this.style||"0"==mxUtils.getValue(this.style,"comic","0"))&&Ga.apply(this,arguments)};var Ha=mxRectangleShape.prototype.paintBackground;mxRectangleShape.prototype.paintBackground=function(a,b,c,d,e){if(null==a.handJiggle)Ha.apply(this,arguments);else{var f=!0;null!=this.style&&(f="1"==mxUtils.getValue(this.style,mxConstants.STYLE_POINTER_EVENTS,"1"));if(f||null!=this.fill&&this.fill!=mxConstants.NONE||null!=this.stroke&&this.stroke!=mxConstants.NONE)f||null!=this.fill&&this.fill!=
+this.originalArcTo};var Ga=mxShape.prototype.paint;mxShape.prototype.defaultJiggle=1.5;mxShape.prototype.paint=function(a){null!=this.style&&"0"!=mxUtils.getValue(this.style,"comic","0")&&null==a.handHiggle&&(a.handJiggle=new r(a,mxUtils.getValue(this.style,"jiggle",this.defaultJiggle)));Ga.apply(this,arguments);null!=a.handJiggle&&(a.handJiggle.destroy(),delete a.handJiggle)};mxRhombus.prototype.defaultJiggle=2;var Ha=mxRectangleShape.prototype.isHtmlAllowed;mxRectangleShape.prototype.isHtmlAllowed=
+function(){return(null==this.style||"0"==mxUtils.getValue(this.style,"comic","0"))&&Ha.apply(this,arguments)};var Ia=mxRectangleShape.prototype.paintBackground;mxRectangleShape.prototype.paintBackground=function(a,b,c,d,e){if(null==a.handJiggle)Ia.apply(this,arguments);else{var f=!0;null!=this.style&&(f="1"==mxUtils.getValue(this.style,mxConstants.STYLE_POINTER_EVENTS,"1"));if(f||null!=this.fill&&this.fill!=mxConstants.NONE||null!=this.stroke&&this.stroke!=mxConstants.NONE)f||null!=this.fill&&this.fill!=
 mxConstants.NONE||(a.pointerEvents=!1),a.begin(),this.isRounded?("1"==mxUtils.getValue(this.style,mxConstants.STYLE_ABSOLUTE_ARCSIZE,0)?f=Math.min(d/2,Math.min(e/2,mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2)):(f=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,100*mxConstants.RECTANGLE_ROUNDING_FACTOR)/100,f=Math.min(d*f,e*f)),a.moveTo(b+f,c),a.lineTo(b+d-f,c),a.quadTo(b+d,c,b+d,c+f),a.lineTo(b+d,c+e-f),a.quadTo(b+d,c+e,b+d-f,c+e),a.lineTo(b+f,c+e),a.quadTo(b,
-c+e,b,c+e-f),a.lineTo(b,c+f),a.quadTo(b,c,b+f,c)):(a.moveTo(b,c),a.lineTo(b+d,c),a.lineTo(b+d,c+e),a.lineTo(b,c+e),a.lineTo(b,c)),a.close(),a.end(),a.fillAndStroke()}};var Ia=mxRectangleShape.prototype.paintForeground;mxRectangleShape.prototype.paintForeground=function(a,b,c,d,e){null==a.handJiggle&&Ia.apply(this,arguments)};mxUtils.extend(t,mxRectangleShape);t.prototype.size=.1;t.prototype.isHtmlAllowed=function(){return!1};t.prototype.getLabelBounds=function(a){if(mxUtils.getValue(this.state.style,
+c+e,b,c+e-f),a.lineTo(b,c+f),a.quadTo(b,c,b+f,c)):(a.moveTo(b,c),a.lineTo(b+d,c),a.lineTo(b+d,c+e),a.lineTo(b,c+e),a.lineTo(b,c)),a.close(),a.end(),a.fillAndStroke()}};var Ja=mxRectangleShape.prototype.paintForeground;mxRectangleShape.prototype.paintForeground=function(a,b,c,d,e){null==a.handJiggle&&Ja.apply(this,arguments)};mxUtils.extend(t,mxRectangleShape);t.prototype.size=.1;t.prototype.isHtmlAllowed=function(){return!1};t.prototype.getLabelBounds=function(a){if(mxUtils.getValue(this.state.style,
 mxConstants.STYLE_HORIZONTAL,!0)==(null==this.direction||this.direction==mxConstants.DIRECTION_EAST||this.direction==mxConstants.DIRECTION_WEST)){var b=a.width,c=a.height;a=new mxRectangle(a.x,a.y,b,c);var d=b*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));if(this.isRounded)var e=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,100*mxConstants.RECTANGLE_ROUNDING_FACTOR)/100,d=Math.max(d,Math.min(b*e,c*e));a.x+=d;a.width-=2*d}return a};t.prototype.paintForeground=
-function(a,b,c,d,e){var f=d*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));if(this.isRounded)var g=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,100*mxConstants.RECTANGLE_ROUNDING_FACTOR)/100,f=Math.max(f,Math.min(d*g,e*g));a.begin();a.moveTo(b+f,c);a.lineTo(b+f,c+e);a.moveTo(b+d-f,c);a.lineTo(b+d-f,c+e);a.end();a.stroke();mxRectangleShape.prototype.paintForeground.apply(this,arguments)};mxCellRenderer.prototype.defaultShapes.process=t;mxUtils.extend(u,mxHexagon);
-u.prototype.size=30;u.prototype.position=.5;u.prototype.position2=.5;u.prototype.base=20;u.prototype.getLabelMargins=function(){return new mxRectangle(0,0,0,parseFloat(mxUtils.getValue(this.style,"size",this.size))*this.scale)};u.prototype.redrawPath=function(a,b,c,d,e){b=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;c=Math.max(0,Math.min(e,parseFloat(mxUtils.getValue(this.style,"size",this.size))));var f=d*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,
-"position",this.position)))),g=d*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"position2",this.position2)))),h=Math.max(0,Math.min(d,parseFloat(mxUtils.getValue(this.style,"base",this.base))));this.addPoints(a,[new mxPoint(0,0),new mxPoint(d,0),new mxPoint(d,e-c),new mxPoint(Math.min(d,f+h),e-c),new mxPoint(g,e),new mxPoint(Math.max(0,f),e-c),new mxPoint(0,e-c)],this.isRounded,b,!0,[4])};mxCellRenderer.prototype.defaultShapes.callout=u;mxUtils.extend(w,mxActor);w.prototype.size=.2;
-w.prototype.redrawPath=function(a,b,c,d,e){b=d*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));c=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(a,[new mxPoint(0,0),new mxPoint(d-b,0),new mxPoint(d,e/2),new mxPoint(d-b,e),new mxPoint(0,e),new mxPoint(b,e/2)],this.isRounded,c,!0);a.end()};mxCellRenderer.prototype.defaultShapes.step=w;mxUtils.extend(v,mxHexagon);v.prototype.size=.25;v.prototype.redrawPath=function(a,
-b,c,d,e){b=d*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));c=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(a,[new mxPoint(b,0),new mxPoint(d-b,0),new mxPoint(d,.5*e),new mxPoint(d-b,e),new mxPoint(b,e),new mxPoint(0,.5*e)],this.isRounded,c,!0)};mxCellRenderer.prototype.defaultShapes.hexagon=v;mxUtils.extend(A,mxRectangleShape);A.prototype.isHtmlAllowed=function(){return!1};A.prototype.paintForeground=function(a,
-b,c,d,e){var f=Math.min(d/5,e/5)+1;a.begin();a.moveTo(b+d/2,c+f);a.lineTo(b+d/2,c+e-f);a.moveTo(b+f,c+e/2);a.lineTo(b+d-f,c+e/2);a.end();a.stroke();mxRectangleShape.prototype.paintForeground.apply(this,arguments)};mxCellRenderer.prototype.defaultShapes.plus=A;var Ca=mxRhombus.prototype.paintVertexShape;mxRhombus.prototype.getLabelBounds=function(a){if(1==this.style["double"]){var b=(2*Math.max(2,this.strokewidth+1)+parseFloat(this.style[mxConstants.STYLE_MARGIN]||0))*this.scale;return new mxRectangle(a.x+
-b,a.y+b,a.width-2*b,a.height-2*b)}return a};mxRhombus.prototype.paintVertexShape=function(a,b,c,d,e){Ca.apply(this,arguments);if(!this.outline&&1==this.style["double"]){var f=2*Math.max(2,this.strokewidth+1)+parseFloat(this.style[mxConstants.STYLE_MARGIN]||0);b+=f;c+=f;d-=2*f;e-=2*f;0<d&&0<e&&(a.setShadow(!1),Ca.apply(this,[a,b,c,d,e]))}};mxUtils.extend(x,mxRectangleShape);x.prototype.isHtmlAllowed=function(){return!1};x.prototype.getLabelBounds=function(a){if(1==this.style["double"]){var b=(Math.max(2,
-this.strokewidth+1)+parseFloat(this.style[mxConstants.STYLE_MARGIN]||0))*this.scale;return new mxRectangle(a.x+b,a.y+b,a.width-2*b,a.height-2*b)}return a};x.prototype.paintForeground=function(a,b,c,d,e){if(null!=this.style){if(!this.outline&&1==this.style["double"]){var f=Math.max(2,this.strokewidth+1)+parseFloat(this.style[mxConstants.STYLE_MARGIN]||0);b+=f;c+=f;d-=2*f;e-=2*f;0<d&&0<e&&mxRectangleShape.prototype.paintBackground.apply(this,arguments)}a.setDashed(!1);var f=0,g;do{g=mxCellRenderer.prototype.defaultShapes[this.style["symbol"+
-f]];if(null!=g){var h=this.style["symbol"+f+"Align"],k=this.style["symbol"+f+"VerticalAlign"],ga=this.style["symbol"+f+"Width"],l=this.style["symbol"+f+"Height"],m=this.style["symbol"+f+"Spacing"]||0,ya=this.style["symbol"+f+"VSpacing"]||m,Y=this.style["symbol"+f+"ArcSpacing"];null!=Y&&(Y*=this.getArcSize(d+this.strokewidth,e+this.strokewidth),m+=Y,ya+=Y);var Y=b,n=c,Y=h==mxConstants.ALIGN_CENTER?Y+(d-ga)/2:h==mxConstants.ALIGN_RIGHT?Y+(d-ga-m):Y+m,n=k==mxConstants.ALIGN_MIDDLE?n+(e-l)/2:k==mxConstants.ALIGN_BOTTOM?
-n+(e-l-ya):n+ya;a.save();h=new g;h.style=this.style;g.prototype.paintVertexShape.call(h,a,Y,n,ga,l);a.restore()}f++}while(null!=g)}mxRectangleShape.prototype.paintForeground.apply(this,arguments)};mxCellRenderer.prototype.defaultShapes.ext=x;mxUtils.extend(C,mxCylinder);C.prototype.redrawPath=function(a,b,c,d,e,f){f?(a.moveTo(0,0),a.lineTo(d/2,e/2),a.lineTo(d,0),a.end()):(a.moveTo(0,0),a.lineTo(d,0),a.lineTo(d,e),a.lineTo(0,e),a.close())};mxCellRenderer.prototype.defaultShapes.message=C;mxUtils.extend(B,
-mxShape);B.prototype.paintBackground=function(a,b,c,d,e){a.translate(b,c);a.ellipse(d/4,0,d/2,e/4);a.fillAndStroke();a.begin();a.moveTo(d/2,e/4);a.lineTo(d/2,2*e/3);a.moveTo(d/2,e/3);a.lineTo(0,e/3);a.moveTo(d/2,e/3);a.lineTo(d,e/3);a.moveTo(d/2,2*e/3);a.lineTo(0,e);a.moveTo(d/2,2*e/3);a.lineTo(d,e);a.end();a.stroke()};mxCellRenderer.prototype.defaultShapes.umlActor=B;mxUtils.extend(y,mxShape);y.prototype.getLabelMargins=function(a){return new mxRectangle(a.width/6,0,0,0)};y.prototype.paintBackground=
-function(a,b,c,d,e){a.translate(b,c);a.begin();a.moveTo(0,e/4);a.lineTo(0,3*e/4);a.end();a.stroke();a.begin();a.moveTo(0,e/2);a.lineTo(d/6,e/2);a.end();a.stroke();a.ellipse(d/6,0,5*d/6,e);a.fillAndStroke()};mxCellRenderer.prototype.defaultShapes.umlBoundary=y;mxUtils.extend(J,mxEllipse);J.prototype.paintVertexShape=function(a,b,c,d,e){mxEllipse.prototype.paintVertexShape.apply(this,arguments);a.begin();a.moveTo(b+d/8,c+e);a.lineTo(b+7*d/8,c+e);a.end();a.stroke()};mxCellRenderer.prototype.defaultShapes.umlEntity=
-J;mxUtils.extend(K,mxShape);K.prototype.paintVertexShape=function(a,b,c,d,e){a.translate(b,c);a.begin();a.moveTo(d,0);a.lineTo(0,e);a.moveTo(0,0);a.lineTo(d,e);a.end();a.stroke()};mxCellRenderer.prototype.defaultShapes.umlDestroy=K;mxUtils.extend(I,mxShape);I.prototype.getLabelBounds=function(a){return new mxRectangle(a.x,a.y+a.height/8,a.width,7*a.height/8)};I.prototype.paintBackground=function(a,b,c,d,e){a.translate(b,c);a.begin();a.moveTo(3*d/8,e/8*1.1);a.lineTo(5*d/8,0);a.end();a.stroke();a.ellipse(0,
-e/8,d,7*e/8);a.fillAndStroke()};I.prototype.paintForeground=function(a,b,c,d,e){a.begin();a.moveTo(3*d/8,e/8*1.1);a.lineTo(5*d/8,e/4);a.end();a.stroke()};mxCellRenderer.prototype.defaultShapes.umlControl=I;mxUtils.extend(F,mxRectangleShape);F.prototype.size=40;F.prototype.isHtmlAllowed=function(){return!1};F.prototype.getLabelBounds=function(a){var b=Math.max(0,Math.min(a.height,parseFloat(mxUtils.getValue(this.style,"size",this.size))*this.scale));return new mxRectangle(a.x,a.y,a.width,b)};F.prototype.paintBackground=
-function(a,b,c,d,e){var f=Math.max(0,Math.min(e,parseFloat(mxUtils.getValue(this.style,"size",this.size)))),g=mxUtils.getValue(this.style,"participant");null==g||null==this.state?mxRectangleShape.prototype.paintBackground.call(this,a,b,c,d,f):(g=this.state.view.graph.cellRenderer.getShape(g),null!=g&&g!=F&&(g=new g,g.apply(this.state),a.save(),g.paintVertexShape(a,b,c,d,f),a.restore()));f<e&&(a.setDashed(!0),a.begin(),a.moveTo(b+d/2,c+f),a.lineTo(b+d/2,c+e),a.end(),a.stroke())};F.prototype.paintForeground=
-function(a,b,c,d,e){var f=Math.max(0,Math.min(e,parseFloat(mxUtils.getValue(this.style,"size",this.size))));mxRectangleShape.prototype.paintForeground.call(this,a,b,c,d,Math.min(e,f))};mxCellRenderer.prototype.defaultShapes.umlLifeline=F;mxUtils.extend(E,mxShape);E.prototype.width=60;E.prototype.height=30;E.prototype.corner=10;E.prototype.getLabelMargins=function(a){return new mxRectangle(0,0,a.width-parseFloat(mxUtils.getValue(this.style,"width",this.width)*this.scale),a.height-parseFloat(mxUtils.getValue(this.style,
-"height",this.height)*this.scale))};E.prototype.paintBackground=function(a,b,c,d,e){var f=this.corner,g=Math.min(d,Math.max(f,parseFloat(mxUtils.getValue(this.style,"width",this.width)))),h=Math.min(e,Math.max(1.5*f,parseFloat(mxUtils.getValue(this.style,"height",this.height))));a.begin();a.moveTo(b,c);a.lineTo(b+g,c);a.lineTo(b+g,c+Math.max(0,h-1.5*f));a.lineTo(b+Math.max(0,g-f),c+h);a.lineTo(b,c+h);a.close();a.fillAndStroke();a.begin();a.moveTo(b+g,c);a.lineTo(b+d,c);a.lineTo(b+d,c+e);a.lineTo(b,
-c+e);a.lineTo(b,c+h);a.stroke()};mxCellRenderer.prototype.defaultShapes.umlFrame=E;mxPerimeter.LifelinePerimeter=function(a,b,c,d){d=F.prototype.size;null!=b&&(d=mxUtils.getValue(b.style,"size",d)*b.view.scale);b=parseFloat(b.style[mxConstants.STYLE_STROKEWIDTH]||1)*b.view.scale/2-1;c.x<a.getCenterX()&&(b=-1*(b+1));return new mxPoint(a.getCenterX()+b,Math.min(a.y+a.height,Math.max(a.y+d,c.y)))};mxStyleRegistry.putValue("lifelinePerimeter",mxPerimeter.LifelinePerimeter);mxPerimeter.OrthogonalPerimeter=
-function(a,b,c,d){d=!0;return mxPerimeter.RectanglePerimeter.apply(this,arguments)};mxStyleRegistry.putValue("orthogonalPerimeter",mxPerimeter.OrthogonalPerimeter);mxPerimeter.BackbonePerimeter=function(a,b,c,d){d=parseFloat(b.style[mxConstants.STYLE_STROKEWIDTH]||1)*b.view.scale/2-1;null!=b.style.backboneSize&&(d+=parseFloat(b.style.backboneSize)*b.view.scale/2-1);if("south"==b.style[mxConstants.STYLE_DIRECTION]||"north"==b.style[mxConstants.STYLE_DIRECTION])return c.x<a.getCenterX()&&(d=-1*(d+1)),
-new mxPoint(a.getCenterX()+d,Math.min(a.y+a.height,Math.max(a.y,c.y)));c.y<a.getCenterY()&&(d=-1*(d+1));return new mxPoint(Math.min(a.x+a.width,Math.max(a.x,c.x)),a.getCenterY()+d)};mxStyleRegistry.putValue("backbonePerimeter",mxPerimeter.BackbonePerimeter);mxPerimeter.CalloutPerimeter=function(a,b,c,d){return mxPerimeter.RectanglePerimeter(mxUtils.getDirectedBounds(a,new mxRectangle(0,0,0,Math.max(0,Math.min(a.height,parseFloat(mxUtils.getValue(b.style,"size",u.prototype.size))*b.view.scale))),b.style),
-b,c,d)};mxStyleRegistry.putValue("calloutPerimeter",mxPerimeter.CalloutPerimeter);mxPerimeter.ParallelogramPerimeter=function(a,b,c,d){var e=m.prototype.size;null!=b&&(e=mxUtils.getValue(b.style,"size",e));var f=a.x,g=a.y,h=a.width,k=a.height;b=null!=b?mxUtils.getValue(b.style,mxConstants.STYLE_DIRECTION,mxConstants.DIRECTION_EAST):mxConstants.DIRECTION_EAST;b==mxConstants.DIRECTION_NORTH||b==mxConstants.DIRECTION_SOUTH?(e=k*Math.max(0,Math.min(1,e)),g=[new mxPoint(f,g),new mxPoint(f+h,g+e),new mxPoint(f+
-h,g+k),new mxPoint(f,g+k-e),new mxPoint(f,g)]):(e=h*Math.max(0,Math.min(1,e)),g=[new mxPoint(f+e,g),new mxPoint(f+h,g),new mxPoint(f+h-e,g+k),new mxPoint(f,g+k),new mxPoint(f+e,g)]);k=a.getCenterX();a=a.getCenterY();a=new mxPoint(k,a);d&&(c.x<f||c.x>f+h?a.y=c.y:a.x=c.x);return mxUtils.getPerimeterPoint(g,a,c)};mxStyleRegistry.putValue("parallelogramPerimeter",mxPerimeter.ParallelogramPerimeter);mxPerimeter.TrapezoidPerimeter=function(a,b,c,d){var e=n.prototype.size;null!=b&&(e=mxUtils.getValue(b.style,
-"size",e));var f=a.x,g=a.y,h=a.width,k=a.height;b=null!=b?mxUtils.getValue(b.style,mxConstants.STYLE_DIRECTION,mxConstants.DIRECTION_EAST):mxConstants.DIRECTION_EAST;b==mxConstants.DIRECTION_EAST?(e=h*Math.max(0,Math.min(1,e)),g=[new mxPoint(f+e,g),new mxPoint(f+h-e,g),new mxPoint(f+h,g+k),new mxPoint(f,g+k),new mxPoint(f+e,g)]):b==mxConstants.DIRECTION_WEST?(e=h*Math.max(0,Math.min(1,e)),g=[new mxPoint(f,g),new mxPoint(f+h,g),new mxPoint(f+h-e,g+k),new mxPoint(f+e,g+k),new mxPoint(f,g)]):b==mxConstants.DIRECTION_NORTH?
-(e=k*Math.max(0,Math.min(1,e)),g=[new mxPoint(f,g+e),new mxPoint(f+h,g),new mxPoint(f+h,g+k),new mxPoint(f,g+k-e),new mxPoint(f,g+e)]):(e=k*Math.max(0,Math.min(1,e)),g=[new mxPoint(f,g),new mxPoint(f+h,g+e),new mxPoint(f+h,g+k-e),new mxPoint(f,g+k),new mxPoint(f,g)]);k=a.getCenterX();a=a.getCenterY();a=new mxPoint(k,a);d&&(c.x<f||c.x>f+h?a.y=c.y:a.x=c.x);return mxUtils.getPerimeterPoint(g,a,c)};mxStyleRegistry.putValue("trapezoidPerimeter",mxPerimeter.TrapezoidPerimeter);mxPerimeter.StepPerimeter=
-function(a,b,c,d){var e=w.prototype.size;null!=b&&(e=mxUtils.getValue(b.style,"size",e));var f=a.x,g=a.y,h=a.width,k=a.height,l=a.getCenterX();a=a.getCenterY();b=null!=b?mxUtils.getValue(b.style,mxConstants.STYLE_DIRECTION,mxConstants.DIRECTION_EAST):mxConstants.DIRECTION_EAST;b==mxConstants.DIRECTION_EAST?(e=h*Math.max(0,Math.min(1,e)),g=[new mxPoint(f,g),new mxPoint(f+h-e,g),new mxPoint(f+h,a),new mxPoint(f+h-e,g+k),new mxPoint(f,g+k),new mxPoint(f+e,a),new mxPoint(f,g)]):b==mxConstants.DIRECTION_WEST?
-(e=h*Math.max(0,Math.min(1,e)),g=[new mxPoint(f+e,g),new mxPoint(f+h,g),new mxPoint(f+h-e,a),new mxPoint(f+h,g+k),new mxPoint(f+e,g+k),new mxPoint(f,a),new mxPoint(f+e,g)]):b==mxConstants.DIRECTION_NORTH?(e=k*Math.max(0,Math.min(1,e)),g=[new mxPoint(f,g+e),new mxPoint(l,g),new mxPoint(f+h,g+e),new mxPoint(f+h,g+k),new mxPoint(l,g+k-e),new mxPoint(f,g+k),new mxPoint(f,g+e)]):(e=k*Math.max(0,Math.min(1,e)),g=[new mxPoint(f,g),new mxPoint(l,g+e),new mxPoint(f+h,g),new mxPoint(f+h,g+k-e),new mxPoint(l,
-g+k),new mxPoint(f,g+k-e),new mxPoint(f,g)]);l=new mxPoint(l,a);d&&(c.x<f||c.x>f+h?l.y=c.y:l.x=c.x);return mxUtils.getPerimeterPoint(g,l,c)};mxStyleRegistry.putValue("stepPerimeter",mxPerimeter.StepPerimeter);mxPerimeter.HexagonPerimeter2=function(a,b,c,d){var e=v.prototype.size;null!=b&&(e=mxUtils.getValue(b.style,"size",e));var f=a.x,g=a.y,h=a.width,k=a.height,l=a.getCenterX();a=a.getCenterY();b=null!=b?mxUtils.getValue(b.style,mxConstants.STYLE_DIRECTION,mxConstants.DIRECTION_EAST):mxConstants.DIRECTION_EAST;
-b==mxConstants.DIRECTION_NORTH||b==mxConstants.DIRECTION_SOUTH?(e=k*Math.max(0,Math.min(1,e)),g=[new mxPoint(l,g),new mxPoint(f+h,g+e),new mxPoint(f+h,g+k-e),new mxPoint(l,g+k),new mxPoint(f,g+k-e),new mxPoint(f,g+e),new mxPoint(l,g)]):(e=h*Math.max(0,Math.min(1,e)),g=[new mxPoint(f+e,g),new mxPoint(f+h-e,g),new mxPoint(f+h,a),new mxPoint(f+h-e,g+k),new mxPoint(f+e,g+k),new mxPoint(f,a),new mxPoint(f+e,g)]);l=new mxPoint(l,a);d&&(c.x<f||c.x>f+h?l.y=c.y:l.x=c.x);return mxUtils.getPerimeterPoint(g,
-l,c)};mxStyleRegistry.putValue("hexagonPerimeter2",mxPerimeter.HexagonPerimeter2);mxUtils.extend(N,mxShape);N.prototype.size=10;N.prototype.paintBackground=function(a,b,c,d,e){var f=parseFloat(mxUtils.getValue(this.style,"size",this.size));a.translate(b,c);a.ellipse((d-f)/2,0,f,f);a.fillAndStroke();a.begin();a.moveTo(d/2,f);a.lineTo(d/2,e);a.end();a.stroke()};mxCellRenderer.prototype.defaultShapes.lollipop=N;mxUtils.extend(M,mxShape);M.prototype.size=10;M.prototype.inset=2;M.prototype.paintBackground=
-function(a,b,c,d,e){var f=parseFloat(mxUtils.getValue(this.style,"size",this.size)),g=parseFloat(mxUtils.getValue(this.style,"inset",this.inset))+this.strokewidth;a.translate(b,c);a.begin();a.moveTo(d/2,f+g);a.lineTo(d/2,e);a.end();a.stroke();a.begin();a.moveTo((d-f)/2-g,f/2);a.quadTo((d-f)/2-g,f+g,d/2,f+g);a.quadTo((d+f)/2+g,f+g,(d+f)/2+g,f/2);a.end();a.stroke()};mxCellRenderer.prototype.defaultShapes.requires=M;mxUtils.extend(Q,mxCylinder);Q.prototype.jettyWidth=32;Q.prototype.jettyHeight=12;Q.prototype.redrawPath=
-function(a,b,c,d,e,f){var g=parseFloat(mxUtils.getValue(this.style,"jettyWidth",this.jettyWidth));b=parseFloat(mxUtils.getValue(this.style,"jettyHeight",this.jettyHeight));c=g/2;var g=c+g/2,h=.3*e-b/2,k=.7*e-b/2;f?(a.moveTo(c,h),a.lineTo(g,h),a.lineTo(g,h+b),a.lineTo(c,h+b),a.moveTo(c,k),a.lineTo(g,k),a.lineTo(g,k+b),a.lineTo(c,k+b)):(a.moveTo(c,0),a.lineTo(d,0),a.lineTo(d,e),a.lineTo(c,e),a.lineTo(c,k+b),a.lineTo(0,k+b),a.lineTo(0,k),a.lineTo(c,k),a.lineTo(c,h+b),a.lineTo(0,h+b),a.lineTo(0,h),a.lineTo(c,
-h),a.close());a.end()};mxCellRenderer.prototype.defaultShapes.component=Q;mxUtils.extend(O,mxDoubleEllipse);O.prototype.outerStroke=!0;O.prototype.paintVertexShape=function(a,b,c,d,e){var f=Math.min(4,Math.min(d/5,e/5));0<d&&0<e&&(a.ellipse(b+f,c+f,d-2*f,e-2*f),a.fillAndStroke());a.setShadow(!1);this.outerStroke&&(a.ellipse(b,c,d,e),a.stroke())};mxCellRenderer.prototype.defaultShapes.endState=O;mxUtils.extend(G,O);G.prototype.outerStroke=!1;mxCellRenderer.prototype.defaultShapes.startState=G;mxUtils.extend(D,
-mxArrowConnector);D.prototype.defaultWidth=4;D.prototype.isOpenEnded=function(){return!0};D.prototype.getEdgeWidth=function(){return mxUtils.getNumber(this.style,"width",this.defaultWidth)+Math.max(0,this.strokewidth-1)};D.prototype.isArrowRounded=function(){return this.isRounded};mxCellRenderer.prototype.defaultShapes.link=D;mxUtils.extend(H,mxArrowConnector);H.prototype.defaultWidth=10;H.prototype.defaultArrowWidth=20;H.prototype.getStartArrowWidth=function(){return this.getEdgeWidth()+mxUtils.getNumber(this.style,
-"startWidth",this.defaultArrowWidth)};H.prototype.getEndArrowWidth=function(){return this.getEdgeWidth()+mxUtils.getNumber(this.style,"endWidth",this.defaultArrowWidth)};H.prototype.getEdgeWidth=function(){return mxUtils.getNumber(this.style,"width",this.defaultWidth)+Math.max(0,this.strokewidth-1)};mxCellRenderer.prototype.defaultShapes.flexArrow=H;mxUtils.extend(z,mxActor);z.prototype.size=30;z.prototype.redrawPath=function(a,b,c,d,e){b=Math.min(e,parseFloat(mxUtils.getValue(this.style,"size",this.size)));
-c=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(a,[new mxPoint(0,e),new mxPoint(0,b),new mxPoint(d,0),new mxPoint(d,e)],this.isRounded,c,!0);a.end()};mxCellRenderer.prototype.defaultShapes.manualInput=z;mxUtils.extend(P,mxRectangleShape);P.prototype.dx=20;P.prototype.dy=20;P.prototype.isHtmlAllowed=function(){return!1};P.prototype.paintForeground=function(a,b,c,d,e){mxRectangleShape.prototype.paintForeground.apply(this,arguments);var f=0;if(this.isRounded)var g=
-mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,100*mxConstants.RECTANGLE_ROUNDING_FACTOR)/100,f=Math.max(f,Math.min(d*g,e*g));g=Math.max(f,Math.min(d,parseFloat(mxUtils.getValue(this.style,"dx",this.dx))));f=Math.max(f,Math.min(e,parseFloat(mxUtils.getValue(this.style,"dy",this.dy))));a.begin();a.moveTo(b,c+f);a.lineTo(b+d,c+f);a.end();a.stroke();a.begin();a.moveTo(b+g,c);a.lineTo(b+g,c+e);a.end();a.stroke()};mxCellRenderer.prototype.defaultShapes.internalStorage=P;mxUtils.extend(V,mxActor);
-V.prototype.dx=20;V.prototype.dy=20;V.prototype.redrawPath=function(a,b,c,d,e){b=Math.max(0,Math.min(d,parseFloat(mxUtils.getValue(this.style,"dx",this.dx))));c=Math.max(0,Math.min(e,parseFloat(mxUtils.getValue(this.style,"dy",this.dy))));parseFloat(mxUtils.getValue(this.style,"size",this.size));var f=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(a,[new mxPoint(0,0),new mxPoint(d,0),new mxPoint(d,c),new mxPoint(b,c),new mxPoint(b,e),new mxPoint(0,
-e)],this.isRounded,f,!0);a.end()};mxCellRenderer.prototype.defaultShapes.corner=V;mxUtils.extend(Z,mxActor);Z.prototype.redrawPath=function(a,b,c,d,e){a.moveTo(0,0);a.lineTo(0,e);a.end();a.moveTo(d,0);a.lineTo(d,e);a.end();a.moveTo(0,e/2);a.lineTo(d,e/2);a.end()};mxCellRenderer.prototype.defaultShapes.crossbar=Z;mxUtils.extend(S,mxActor);S.prototype.dx=20;S.prototype.dy=20;S.prototype.redrawPath=function(a,b,c,d,e){b=Math.max(0,Math.min(d,parseFloat(mxUtils.getValue(this.style,"dx",this.dx))));c=
-Math.max(0,Math.min(e,parseFloat(mxUtils.getValue(this.style,"dy",this.dy))));parseFloat(mxUtils.getValue(this.style,"size",this.size));var f=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(a,[new mxPoint(0,0),new mxPoint(d,0),new mxPoint(d,c),new mxPoint((d+b)/2,c),new mxPoint((d+b)/2,e),new mxPoint((d-b)/2,e),new mxPoint((d-b)/2,c),new mxPoint(0,c)],this.isRounded,f,!0);a.end()};mxCellRenderer.prototype.defaultShapes.tee=S;mxUtils.extend(T,mxActor);
-T.prototype.arrowWidth=.3;T.prototype.arrowSize=.2;T.prototype.redrawPath=function(a,b,c,d,e){var f=e*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"arrowWidth",this.arrowWidth))));b=d*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"arrowSize",this.arrowSize))));c=(e-f)/2;var f=c+f,g=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(a,[new mxPoint(0,c),new mxPoint(d-b,c),new mxPoint(d-b,0),new mxPoint(d,e/2),new mxPoint(d-
-b,e),new mxPoint(d-b,f),new mxPoint(0,f)],this.isRounded,g,!0);a.end()};mxCellRenderer.prototype.defaultShapes.singleArrow=T;mxUtils.extend(ia,mxActor);ia.prototype.redrawPath=function(a,b,c,d,e){var f=e*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"arrowWidth",T.prototype.arrowWidth))));b=d*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"arrowSize",T.prototype.arrowSize))));c=(e-f)/2;var f=c+f,g=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/
-2;this.addPoints(a,[new mxPoint(0,e/2),new mxPoint(b,0),new mxPoint(b,c),new mxPoint(d-b,c),new mxPoint(d-b,0),new mxPoint(d,e/2),new mxPoint(d-b,e),new mxPoint(d-b,f),new mxPoint(b,f),new mxPoint(b,e)],this.isRounded,g,!0);a.end()};mxCellRenderer.prototype.defaultShapes.doubleArrow=ia;mxUtils.extend(aa,mxActor);aa.prototype.size=.1;aa.prototype.redrawPath=function(a,b,c,d,e){b=d*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));a.moveTo(b,0);a.lineTo(d,0);a.quadTo(d-
-2*b,e/2,d,e);a.lineTo(b,e);a.quadTo(b-2*b,e/2,b,0);a.close();a.end()};mxCellRenderer.prototype.defaultShapes.dataStorage=aa;mxUtils.extend(ja,mxActor);ja.prototype.redrawPath=function(a,b,c,d,e){a.moveTo(0,0);a.quadTo(d,0,d,e/2);a.quadTo(d,e,0,e);a.close();a.end()};mxCellRenderer.prototype.defaultShapes.or=ja;mxUtils.extend(ka,mxActor);ka.prototype.redrawPath=function(a,b,c,d,e){a.moveTo(0,0);a.quadTo(d,0,d,e/2);a.quadTo(d,e,0,e);a.quadTo(d/2,e/2,0,0);a.close();a.end()};mxCellRenderer.prototype.defaultShapes.xor=
-ka;mxUtils.extend(W,mxActor);W.prototype.size=20;W.prototype.redrawPath=function(a,b,c,d,e){b=Math.min(d/2,Math.min(e,parseFloat(mxUtils.getValue(this.style,"size",this.size))));c=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(a,[new mxPoint(b,0),new mxPoint(d-b,0),new mxPoint(d,.8*b),new mxPoint(d,e),new mxPoint(0,e),new mxPoint(0,.8*b)],this.isRounded,c,!0);a.end()};mxCellRenderer.prototype.defaultShapes.loopLimit=W;mxUtils.extend(X,mxActor);X.prototype.size=
-.375;X.prototype.redrawPath=function(a,b,c,d,e){b=e*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));c=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(a,[new mxPoint(0,0),new mxPoint(d,0),new mxPoint(d,e-b),new mxPoint(d/2,e),new mxPoint(0,e-b)],this.isRounded,c,!0);a.end()};mxCellRenderer.prototype.defaultShapes.offPageConnector=X;mxUtils.extend(ba,mxEllipse);ba.prototype.paintVertexShape=function(a,b,c,d,e){mxEllipse.prototype.paintVertexShape.apply(this,
-arguments);a.begin();a.moveTo(b+d/2,c+e);a.lineTo(b+d,c+e);a.end();a.stroke()};mxCellRenderer.prototype.defaultShapes.tapeData=ba;mxUtils.extend(ca,mxEllipse);ca.prototype.paintVertexShape=function(a,b,c,d,e){mxEllipse.prototype.paintVertexShape.apply(this,arguments);a.setShadow(!1);a.begin();a.moveTo(b,c+e/2);a.lineTo(b+d,c+e/2);a.end();a.stroke();a.begin();a.moveTo(b+d/2,c);a.lineTo(b+d/2,c+e);a.end();a.stroke()};mxCellRenderer.prototype.defaultShapes.orEllipse=ca;mxUtils.extend(da,mxEllipse);da.prototype.paintVertexShape=
-function(a,b,c,d,e){mxEllipse.prototype.paintVertexShape.apply(this,arguments);a.setShadow(!1);a.begin();a.moveTo(b+.145*d,c+.145*e);a.lineTo(b+.855*d,c+.855*e);a.end();a.stroke();a.begin();a.moveTo(b+.855*d,c+.145*e);a.lineTo(b+.145*d,c+.855*e);a.end();a.stroke()};mxCellRenderer.prototype.defaultShapes.sumEllipse=da;mxUtils.extend(ea,mxRhombus);ea.prototype.paintVertexShape=function(a,b,c,d,e){mxRhombus.prototype.paintVertexShape.apply(this,arguments);a.setShadow(!1);a.begin();a.moveTo(b,c+e/2);
-a.lineTo(b+d,c+e/2);a.end();a.stroke()};mxCellRenderer.prototype.defaultShapes.sortShape=ea;mxUtils.extend(oa,mxEllipse);oa.prototype.paintVertexShape=function(a,b,c,d,e){a.begin();a.moveTo(b,c);a.lineTo(b+d,c);a.lineTo(b+d/2,c+e/2);a.close();a.fillAndStroke();a.begin();a.moveTo(b,c+e);a.lineTo(b+d,c+e);a.lineTo(b+d/2,c+e/2);a.close();a.fillAndStroke()};mxCellRenderer.prototype.defaultShapes.collate=oa;mxUtils.extend(U,mxEllipse);U.prototype.paintVertexShape=function(a,b,c,d,e){var f=c+e-5;a.begin();
-a.moveTo(b,c);a.lineTo(b,c+e);a.moveTo(b,f);a.lineTo(b+10,f-5);a.moveTo(b,f);a.lineTo(b+10,f+5);a.moveTo(b,f);a.lineTo(b+d,f);a.moveTo(b+d,c);a.lineTo(b+d,c+e);a.moveTo(b+d,f);a.lineTo(b+d-10,f-5);a.moveTo(b+d,f);a.lineTo(b+d-10,f+5);a.end();a.stroke()};mxCellRenderer.prototype.defaultShapes.dimension=U;mxUtils.extend(la,mxEllipse);la.prototype.paintVertexShape=function(a,b,c,d,e){this.outline||a.setStrokeColor(null);mxRectangleShape.prototype.paintBackground.apply(this,arguments);null!=this.style&&
-(a.setStrokeColor(this.stroke),a.rect(b,c,d,e),a.fill(),a.begin(),a.moveTo(b,c),"1"==mxUtils.getValue(this.style,"top","1")?a.lineTo(b+d,c):a.moveTo(b+d,c),"1"==mxUtils.getValue(this.style,"right","1")?a.lineTo(b+d,c+e):a.moveTo(b+d,c+e),"1"==mxUtils.getValue(this.style,"bottom","1")?a.lineTo(b,c+e):a.moveTo(b,c+e),"1"==mxUtils.getValue(this.style,"left","1")&&a.lineTo(b,c-this.strokewidth/2),a.end(),a.stroke())};mxCellRenderer.prototype.defaultShapes.partialRectangle=la;mxUtils.extend(R,mxEllipse);
-R.prototype.paintVertexShape=function(a,b,c,d,e){mxEllipse.prototype.paintVertexShape.apply(this,arguments);a.setShadow(!1);a.begin();"vertical"==mxUtils.getValue(this.style,"line")?(a.moveTo(b+d/2,c),a.lineTo(b+d/2,c+e)):(a.moveTo(b,c+e/2),a.lineTo(b+d,c+e/2));a.end();a.stroke()};mxCellRenderer.prototype.defaultShapes.lineEllipse=R;mxUtils.extend(ta,mxActor);ta.prototype.redrawPath=function(a,b,c,d,e){b=Math.min(d,e/2);a.moveTo(0,0);a.lineTo(d-b,0);a.quadTo(d,0,d,e/2);a.quadTo(d,e,d-b,e);a.lineTo(0,
-e);a.close();a.end()};mxCellRenderer.prototype.defaultShapes.delay=ta;mxUtils.extend(pa,mxActor);pa.prototype.size=.2;pa.prototype.redrawPath=function(a,b,c,d,e){b=Math.min(e,d);var f=Math.max(0,Math.min(b,b*parseFloat(mxUtils.getValue(this.style,"size",this.size))));b=(e-f)/2;c=b+f;var g=(d-f)/2,f=g+f;a.moveTo(0,b);a.lineTo(g,b);a.lineTo(g,0);a.lineTo(f,0);a.lineTo(f,b);a.lineTo(d,b);a.lineTo(d,c);a.lineTo(f,c);a.lineTo(f,e);a.lineTo(g,e);a.lineTo(g,c);a.lineTo(0,c);a.close();a.end()};mxCellRenderer.prototype.defaultShapes.cross=
-pa;mxUtils.extend(qa,mxActor);qa.prototype.size=.25;qa.prototype.redrawPath=function(a,b,c,d,e){b=Math.min(d,e/2);c=Math.min(d-b,Math.max(0,parseFloat(mxUtils.getValue(this.style,"size",this.size)))*d);a.moveTo(0,e/2);a.lineTo(c,0);a.lineTo(d-b,0);a.quadTo(d,0,d,e/2);a.quadTo(d,e,d-b,e);a.lineTo(c,e);a.close();a.end()};mxCellRenderer.prototype.defaultShapes.display=qa;mxUtils.extend(ma,mxConnector);ma.prototype.origPaintEdgeShape=ma.prototype.paintEdgeShape;ma.prototype.paintEdgeShape=function(a,
-b,c){var d=a.state.dashed,e=a.state.fixDash;ma.prototype.origPaintEdgeShape.apply(this,arguments);if(3<=a.state.strokeWidth){var f=mxUtils.getValue(this.style,"fillColor",null);null!=f&&(a.setStrokeColor(f),a.setStrokeWidth(a.state.strokeWidth-2),a.setDashed(d,e),ma.prototype.origPaintEdgeShape.apply(this,arguments))}};mxCellRenderer.prototype.defaultShapes.filledEdge=ma;mxMarker.addMarker("dash",function(a,b,c,d,e,f,g,h,k,l){var m=e*(g+k+1),n=f*(g+k+1);return function(){a.begin();a.moveTo(d.x-m/
-2-n/2,d.y-n/2+m/2);a.lineTo(d.x+n/2-3*m/2,d.y-3*n/2-m/2);a.stroke()}});mxMarker.addMarker("cross",function(a,b,c,d,e,f,g,h,k,l){var m=e*(g+k+1),n=f*(g+k+1);return function(){a.begin();a.moveTo(d.x-m/2-n/2,d.y-n/2+m/2);a.lineTo(d.x+n/2-3*m/2,d.y-3*n/2-m/2);a.moveTo(d.x-m/2+n/2,d.y-n/2-m/2);a.lineTo(d.x-n/2-3*m/2,d.y-3*n/2+m/2);a.stroke()}});mxMarker.addMarker("circle",Ba);mxMarker.addMarker("circlePlus",function(a,b,c,d,e,f,g,h,k,l){var m=d.clone(),n=Ba.apply(this,arguments),p=e*(g+2*k),q=f*(g+2*k);
-return function(){n.apply(this,arguments);a.begin();a.moveTo(m.x-e*k,m.y-f*k);a.lineTo(m.x-2*p+e*k,m.y-2*q+f*k);a.moveTo(m.x-p-q+f*k,m.y-q+p-e*k);a.lineTo(m.x+q-p-f*k,m.y-q-p+e*k);a.stroke()}});mxMarker.addMarker("async",function(a,b,c,d,e,f,g,h,k,l){b=e*k*1.118;c=f*k*1.118;e*=g+k;f*=g+k;var m=d.clone();m.x-=b;m.y-=c;d.x+=1*-e-b;d.y+=1*-f-c;return function(){a.begin();a.moveTo(m.x,m.y);h?a.lineTo(m.x-e-f/2,m.y-f+e/2):a.lineTo(m.x+f/2-e,m.y-f-e/2);a.lineTo(m.x-e,m.y-f);a.close();l?a.fillAndStroke():
-a.stroke()}});mxMarker.addMarker("openAsync",function(a){a=null!=a?a:2;return function(b,c,d,e,f,g,h,k,l,m){f*=h+l;g*=h+l;var n=e.clone();return function(){b.begin();b.moveTo(n.x,n.y);k?b.lineTo(n.x-f-g/a,n.y-g+f/a):b.lineTo(n.x+g/a-f,n.y-g-f/a);b.stroke()}}}(2));if("undefined"!==typeof mxVertexHandler){var Da=function(a,b,c){return ra(a,["width"],b,function(b,d,e,f,g){g=a.shape.getEdgeWidth()*a.view.scale+c;return new mxPoint(f.x+d*b/4+e*g/2,f.y+e*b/4-d*g/2)},function(b,d,e,f,g,h){b=Math.sqrt(mxUtils.ptSegDistSq(f.x,
-f.y,g.x,g.y,h.x,h.y));a.style.width=Math.round(2*b)/a.view.scale-c})},ra=function(a,b,c,d,e){var f=a.absolutePoints,g=f.length-1,h=a.view.translate,k=a.view.scale,l=c?f[0]:f[g],m=c?f[1]:f[g-1],n=m.x-l.x,p=m.y-l.y,q=Math.sqrt(n*n+p*p);return L(a,b,function(a){a=d.call(this,q,n/q,p/q,l,m);return new mxPoint(a.x/k-h.x,a.y/k-h.y)},function(a,b,c){a=Math.sqrt(n*n+p*p);b.x=(b.x+h.x)*k;b.y=(b.y+h.y)*k;e.call(this,a,n/a,p/a,l,m,b,c)})},ha=function(a){return function(b){return[L(b,["arrowWidth","arrowSize"],
-function(b){var c=Math.max(0,Math.min(1,mxUtils.getValue(this.state.style,"arrowWidth",T.prototype.arrowWidth))),d=Math.max(0,Math.min(a,mxUtils.getValue(this.state.style,"arrowSize",T.prototype.arrowSize)));return new mxPoint(b.x+(1-d)*b.width,b.y+(1-c)*b.height/2)},function(b,c){this.state.style.arrowWidth=Math.max(0,Math.min(1,Math.abs(b.y+b.height/2-c.y)/b.height*2));this.state.style.arrowSize=Math.max(0,Math.min(a,(b.x+b.width-c.x)/b.width))})]}},za=function(a,b,c){return function(d){var e=[L(d,
-["size"],function(c){var d=Math.max(0,Math.min(c.width,Math.min(c.height,parseFloat(mxUtils.getValue(this.state.style,"size",b)))))*a;return new mxPoint(c.x+d,c.y+d)},function(b,c){this.state.style.size=Math.round(Math.max(0,Math.min(Math.min(b.width,c.x-b.x),Math.min(b.height,c.y-b.y)))/a)})];c&&mxUtils.getValue(d.style,mxConstants.STYLE_ROUNDED,!1)&&e.push(fa(d));return e}},ua=function(a,b,c,d){c=null!=c?c:1;return function(e){var f=[L(e,["size"],function(b){var c=parseFloat(mxUtils.getValue(this.state.style,
-"size",a));return new mxPoint(b.x+c*b.width,b.getCenterY())},function(a,b){this.state.style.size=Math.max(0,Math.min(c,(b.x-a.x)/a.width))},null,d)];b&&mxUtils.getValue(e.style,mxConstants.STYLE_ROUNDED,!1)&&f.push(fa(e));return f}},Ea=function(a){return function(b){var c=[L(b,["size"],function(b){var c=Math.max(0,Math.min(a,parseFloat(mxUtils.getValue(this.state.style,"size",n.prototype.size))));return new mxPoint(b.x+c*b.width*.75,b.y+b.height/4)},function(b,c){this.state.style.size=Math.max(0,
-Math.min(a,(c.x-b.x)/(.75*b.width)))},null,!0)];mxUtils.getValue(b.style,mxConstants.STYLE_ROUNDED,!1)&&c.push(fa(b));return c}},sa=function(){return function(a){var b=[];mxUtils.getValue(a.style,mxConstants.STYLE_ROUNDED,!1)&&b.push(fa(a));return b}},fa=function(a,b){return L(a,[mxConstants.STYLE_ARCSIZE],function(c){var d=null!=b?b:c.height/8;if("1"==mxUtils.getValue(a.style,mxConstants.STYLE_ABSOLUTE_ARCSIZE,0)){var e=mxUtils.getValue(a.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/
-2;return new mxPoint(c.x+c.width-Math.min(c.width/2,e),c.y+d)}e=Math.max(0,parseFloat(mxUtils.getValue(a.style,mxConstants.STYLE_ARCSIZE,100*mxConstants.RECTANGLE_ROUNDING_FACTOR)))/100;return new mxPoint(c.x+c.width-Math.min(Math.max(c.width/2,c.height/2),Math.min(c.width,c.height)*e),c.y+d)},function(b,c,d){"1"==mxUtils.getValue(a.style,mxConstants.STYLE_ABSOLUTE_ARCSIZE,0)?this.state.style[mxConstants.STYLE_ARCSIZE]=Math.round(Math.max(0,Math.min(b.width,2*(b.x+b.width-c.x)))):this.state.style[mxConstants.STYLE_ARCSIZE]=
-Math.round(Math.min(50,Math.max(0,100*(b.width-c.x+b.x)/Math.min(b.width,b.height))))})},L=function(a,b,c,d,e,f){var g=new mxHandle(a,null,mxVertexHandler.prototype.secondaryHandleImage);g.execute=function(){for(var a=0;a<b.length;a++)this.copyStyle(b[a])};g.getPosition=c;g.setPosition=d;g.ignoreGrid=null!=e?e:!0;if(f){var h=g.positionChanged;g.positionChanged=function(){h.apply(this,arguments);a.view.invalidate(this.state.cell);a.view.validate()}}return g},Aa={link:function(a){return[Da(a,!0,10),
-Da(a,!1,10)]},flexArrow:function(a){var b=a.view.graph.gridSize/a.view.scale,c=[];mxUtils.getValue(a.style,mxConstants.STYLE_STARTARROW,mxConstants.NONE)!=mxConstants.NONE&&(c.push(ra(a,["width",mxConstants.STYLE_STARTSIZE,mxConstants.STYLE_ENDSIZE],!0,function(b,c,d,e,f){b=(a.shape.getEdgeWidth()-a.shape.strokewidth)*a.view.scale;f=3*mxUtils.getNumber(a.style,mxConstants.STYLE_STARTSIZE,mxConstants.ARROW_SIZE/5)*a.view.scale;return new mxPoint(e.x+c*(f+a.shape.strokewidth*a.view.scale)+d*b/2,e.y+
-d*(f+a.shape.strokewidth*a.view.scale)-c*b/2)},function(c,d,e,f,g,h,k){c=Math.sqrt(mxUtils.ptSegDistSq(f.x,f.y,g.x,g.y,h.x,h.y));d=mxUtils.ptLineDist(f.x,f.y,f.x+e,f.y-d,h.x,h.y);a.style[mxConstants.STYLE_STARTSIZE]=Math.round(100*(d-a.shape.strokewidth)/3)/100/a.view.scale;a.style.width=Math.round(2*c)/a.view.scale;mxEvent.isControlDown(k.getEvent())&&(a.style[mxConstants.STYLE_ENDSIZE]=a.style[mxConstants.STYLE_STARTSIZE]);mxEvent.isAltDown(k.getEvent())||Math.abs(parseFloat(a.style[mxConstants.STYLE_STARTSIZE])-
-parseFloat(a.style[mxConstants.STYLE_ENDSIZE]))<b/6&&(a.style[mxConstants.STYLE_STARTSIZE]=a.style[mxConstants.STYLE_ENDSIZE])})),c.push(ra(a,["startWidth","endWidth",mxConstants.STYLE_STARTSIZE,mxConstants.STYLE_ENDSIZE],!0,function(b,c,d,e,f){b=(a.shape.getStartArrowWidth()-a.shape.strokewidth)*a.view.scale;f=3*mxUtils.getNumber(a.style,mxConstants.STYLE_STARTSIZE,mxConstants.ARROW_SIZE/5)*a.view.scale;return new mxPoint(e.x+c*(f+a.shape.strokewidth*a.view.scale)+d*b/2,e.y+d*(f+a.shape.strokewidth*
-a.view.scale)-c*b/2)},function(c,d,e,f,g,h,k){c=Math.sqrt(mxUtils.ptSegDistSq(f.x,f.y,g.x,g.y,h.x,h.y));d=mxUtils.ptLineDist(f.x,f.y,f.x+e,f.y-d,h.x,h.y);a.style[mxConstants.STYLE_STARTSIZE]=Math.round(100*(d-a.shape.strokewidth)/3)/100/a.view.scale;a.style.startWidth=Math.max(0,Math.round(2*c)-a.shape.getEdgeWidth())/a.view.scale;mxEvent.isControlDown(k.getEvent())&&(a.style[mxConstants.STYLE_ENDSIZE]=a.style[mxConstants.STYLE_STARTSIZE],a.style.endWidth=a.style.startWidth);mxEvent.isAltDown(k.getEvent())||
-(Math.abs(parseFloat(a.style[mxConstants.STYLE_STARTSIZE])-parseFloat(a.style[mxConstants.STYLE_ENDSIZE]))<b/6&&(a.style[mxConstants.STYLE_STARTSIZE]=a.style[mxConstants.STYLE_ENDSIZE]),Math.abs(parseFloat(a.style.startWidth)-parseFloat(a.style.endWidth))<b&&(a.style.startWidth=a.style.endWidth))})));mxUtils.getValue(a.style,mxConstants.STYLE_ENDARROW,mxConstants.NONE)!=mxConstants.NONE&&(c.push(ra(a,["width",mxConstants.STYLE_STARTSIZE,mxConstants.STYLE_ENDSIZE],!1,function(b,c,d,e,f){b=(a.shape.getEdgeWidth()-
-a.shape.strokewidth)*a.view.scale;f=3*mxUtils.getNumber(a.style,mxConstants.STYLE_ENDSIZE,mxConstants.ARROW_SIZE/5)*a.view.scale;return new mxPoint(e.x+c*(f+a.shape.strokewidth*a.view.scale)-d*b/2,e.y+d*(f+a.shape.strokewidth*a.view.scale)+c*b/2)},function(c,d,e,f,g,h,k){c=Math.sqrt(mxUtils.ptSegDistSq(f.x,f.y,g.x,g.y,h.x,h.y));d=mxUtils.ptLineDist(f.x,f.y,f.x+e,f.y-d,h.x,h.y);a.style[mxConstants.STYLE_ENDSIZE]=Math.round(100*(d-a.shape.strokewidth)/3)/100/a.view.scale;a.style.width=Math.round(2*
-c)/a.view.scale;mxEvent.isControlDown(k.getEvent())&&(a.style[mxConstants.STYLE_STARTSIZE]=a.style[mxConstants.STYLE_ENDSIZE]);mxEvent.isAltDown(k.getEvent())||Math.abs(parseFloat(a.style[mxConstants.STYLE_ENDSIZE])-parseFloat(a.style[mxConstants.STYLE_STARTSIZE]))<b/6&&(a.style[mxConstants.STYLE_ENDSIZE]=a.style[mxConstants.STYLE_STARTSIZE])})),c.push(ra(a,["startWidth","endWidth",mxConstants.STYLE_STARTSIZE,mxConstants.STYLE_ENDSIZE],!1,function(b,c,d,e,f){b=(a.shape.getEndArrowWidth()-a.shape.strokewidth)*
-a.view.scale;f=3*mxUtils.getNumber(a.style,mxConstants.STYLE_ENDSIZE,mxConstants.ARROW_SIZE/5)*a.view.scale;return new mxPoint(e.x+c*(f+a.shape.strokewidth*a.view.scale)-d*b/2,e.y+d*(f+a.shape.strokewidth*a.view.scale)+c*b/2)},function(c,d,e,f,g,h,k){c=Math.sqrt(mxUtils.ptSegDistSq(f.x,f.y,g.x,g.y,h.x,h.y));d=mxUtils.ptLineDist(f.x,f.y,f.x+e,f.y-d,h.x,h.y);a.style[mxConstants.STYLE_ENDSIZE]=Math.round(100*(d-a.shape.strokewidth)/3)/100/a.view.scale;a.style.endWidth=Math.max(0,Math.round(2*c)-a.shape.getEdgeWidth())/
-a.view.scale;mxEvent.isControlDown(k.getEvent())&&(a.style[mxConstants.STYLE_STARTSIZE]=a.style[mxConstants.STYLE_ENDSIZE],a.style.startWidth=a.style.endWidth);mxEvent.isAltDown(k.getEvent())||(Math.abs(parseFloat(a.style[mxConstants.STYLE_ENDSIZE])-parseFloat(a.style[mxConstants.STYLE_STARTSIZE]))<b/6&&(a.style[mxConstants.STYLE_ENDSIZE]=a.style[mxConstants.STYLE_STARTSIZE]),Math.abs(parseFloat(a.style.endWidth)-parseFloat(a.style.startWidth))<b&&(a.style.endWidth=a.style.startWidth))})));return c},
-swimlane:function(a){var b=[L(a,[mxConstants.STYLE_STARTSIZE],function(b){var c=parseFloat(mxUtils.getValue(a.style,mxConstants.STYLE_STARTSIZE,mxConstants.DEFAULT_STARTSIZE));return 1==mxUtils.getValue(a.style,mxConstants.STYLE_HORIZONTAL,1)?new mxPoint(b.getCenterX(),b.y+Math.max(0,Math.min(b.height,c))):new mxPoint(b.x+Math.max(0,Math.min(b.width,c)),b.getCenterY())},function(b,c){a.style[mxConstants.STYLE_STARTSIZE]=1==mxUtils.getValue(this.state.style,mxConstants.STYLE_HORIZONTAL,1)?Math.round(Math.max(0,
-Math.min(b.height,c.y-b.y))):Math.round(Math.max(0,Math.min(b.width,c.x-b.x)))})];if(mxUtils.getValue(a.style,mxConstants.STYLE_ROUNDED)){var c=parseFloat(mxUtils.getValue(a.style,mxConstants.STYLE_STARTSIZE,mxConstants.DEFAULT_STARTSIZE));b.push(fa(a,c/2))}return b},label:sa(),ext:sa(),rectangle:sa(),triangle:sa(),rhombus:sa(),umlLifeline:function(a){return[L(a,["size"],function(a){var b=Math.max(0,Math.min(a.height,parseFloat(mxUtils.getValue(this.state.style,"size",F.prototype.size))));return new mxPoint(a.getCenterX(),
-a.y+b)},function(a,b){this.state.style.size=Math.round(Math.max(0,Math.min(a.height,b.y-a.y)))},!1)]},umlFrame:function(a){return[L(a,["width","height"],function(a){var b=Math.max(E.prototype.corner,Math.min(a.width,mxUtils.getValue(this.state.style,"width",E.prototype.width))),c=Math.max(1.5*E.prototype.corner,Math.min(a.height,mxUtils.getValue(this.state.style,"height",E.prototype.height)));return new mxPoint(a.x+b,a.y+c)},function(a,b){this.state.style.width=Math.round(Math.max(E.prototype.corner,
-Math.min(a.width,b.x-a.x)));this.state.style.height=Math.round(Math.max(1.5*E.prototype.corner,Math.min(a.height,b.y-a.y)))},!1)]},process:function(a){var b=[L(a,["size"],function(a){var b=Math.max(0,Math.min(.5,parseFloat(mxUtils.getValue(this.state.style,"size",t.prototype.size))));return new mxPoint(a.x+a.width*b,a.y+a.height/4)},function(a,b){this.state.style.size=Math.max(0,Math.min(.5,(b.x-a.x)/a.width))})];mxUtils.getValue(a.style,mxConstants.STYLE_ROUNDED,!1)&&b.push(fa(a));return b},cross:function(a){return[L(a,
-["size"],function(a){var b=Math.min(a.width,a.height),b=Math.max(0,Math.min(1,mxUtils.getValue(this.state.style,"size",pa.prototype.size)))*b/2;return new mxPoint(a.getCenterX()-b,a.getCenterY()-b)},function(a,b){var c=Math.min(a.width,a.height);this.state.style.size=Math.max(0,Math.min(1,Math.min(Math.max(0,a.getCenterY()-b.y)/c*2,Math.max(0,a.getCenterX()-b.x)/c*2)))})]},note:function(a){return[L(a,["size"],function(a){var b=Math.max(0,Math.min(a.width,Math.min(a.height,parseFloat(mxUtils.getValue(this.state.style,
-"size",e.prototype.size)))));return new mxPoint(a.x+a.width-b,a.y+b)},function(a,b){this.state.style.size=Math.round(Math.max(0,Math.min(Math.min(a.width,a.x+a.width-b.x),Math.min(a.height,b.y-a.y))))})]},manualInput:function(a){var b=[L(a,["size"],function(a){var b=Math.max(0,Math.min(a.height,mxUtils.getValue(this.state.style,"size",z.prototype.size)));return new mxPoint(a.x+a.width/4,a.y+3*b/4)},function(a,b){this.state.style.size=Math.round(Math.max(0,Math.min(a.height,4*(b.y-a.y)/3)))})];mxUtils.getValue(a.style,
-mxConstants.STYLE_ROUNDED,!1)&&b.push(fa(a));return b},dataStorage:function(a){return[L(a,["size"],function(a){var b=Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.state.style,"size",aa.prototype.size))));return new mxPoint(a.x+(1-b)*a.width,a.getCenterY())},function(a,b){this.state.style.size=Math.max(0,Math.min(1,(a.x+a.width-b.x)/a.width))})]},callout:function(a){var b=[L(a,["size","position"],function(a){var b=Math.max(0,Math.min(a.height,mxUtils.getValue(this.state.style,"size",u.prototype.size))),
-c=Math.max(0,Math.min(1,mxUtils.getValue(this.state.style,"position",u.prototype.position)));mxUtils.getValue(this.state.style,"base",u.prototype.base);return new mxPoint(a.x+c*a.width,a.y+a.height-b)},function(a,b){mxUtils.getValue(this.state.style,"base",u.prototype.base);this.state.style.size=Math.round(Math.max(0,Math.min(a.height,a.y+a.height-b.y)));this.state.style.position=Math.round(100*Math.max(0,Math.min(1,(b.x-a.x)/a.width)))/100}),L(a,["position2"],function(a){var b=Math.max(0,Math.min(1,
-mxUtils.getValue(this.state.style,"position2",u.prototype.position2)));return new mxPoint(a.x+b*a.width,a.y+a.height)},function(a,b){this.state.style.position2=Math.round(100*Math.max(0,Math.min(1,(b.x-a.x)/a.width)))/100}),L(a,["base"],function(a){var b=Math.max(0,Math.min(a.height,mxUtils.getValue(this.state.style,"size",u.prototype.size))),c=Math.max(0,Math.min(1,mxUtils.getValue(this.state.style,"position",u.prototype.position))),d=Math.max(0,Math.min(a.width,mxUtils.getValue(this.state.style,
-"base",u.prototype.base)));return new mxPoint(a.x+Math.min(a.width,c*a.width+d),a.y+a.height-b)},function(a,b){var c=Math.max(0,Math.min(1,mxUtils.getValue(this.state.style,"position",u.prototype.position)));this.state.style.base=Math.round(Math.max(0,Math.min(a.width,b.x-a.x-c*a.width)))})];mxUtils.getValue(a.style,mxConstants.STYLE_ROUNDED,!1)&&b.push(fa(a));return b},internalStorage:function(a){var b=[L(a,["dx","dy"],function(a){var b=Math.max(0,Math.min(a.width,mxUtils.getValue(this.state.style,
-"dx",P.prototype.dx))),c=Math.max(0,Math.min(a.height,mxUtils.getValue(this.state.style,"dy",P.prototype.dy)));return new mxPoint(a.x+b,a.y+c)},function(a,b){this.state.style.dx=Math.round(Math.max(0,Math.min(a.width,b.x-a.x)));this.state.style.dy=Math.round(Math.max(0,Math.min(a.height,b.y-a.y)))})];mxUtils.getValue(a.style,mxConstants.STYLE_ROUNDED,!1)&&b.push(fa(a));return b},corner:function(a){return[L(a,["dx","dy"],function(a){var b=Math.max(0,Math.min(a.width,mxUtils.getValue(this.state.style,
-"dx",V.prototype.dx))),c=Math.max(0,Math.min(a.height,mxUtils.getValue(this.state.style,"dy",V.prototype.dy)));return new mxPoint(a.x+b,a.y+c)},function(a,b){this.state.style.dx=Math.round(Math.max(0,Math.min(a.width,b.x-a.x)));this.state.style.dy=Math.round(Math.max(0,Math.min(a.height,b.y-a.y)))})]},tee:function(a){return[L(a,["dx","dy"],function(a){var b=Math.max(0,Math.min(a.width,mxUtils.getValue(this.state.style,"dx",S.prototype.dx))),c=Math.max(0,Math.min(a.height,mxUtils.getValue(this.state.style,
-"dy",S.prototype.dy)));return new mxPoint(a.x+(a.width+b)/2,a.y+c)},function(a,b){this.state.style.dx=Math.round(Math.max(0,2*Math.min(a.width/2,b.x-a.x-a.width/2)));this.state.style.dy=Math.round(Math.max(0,Math.min(a.height,b.y-a.y)))})]},singleArrow:ha(1),doubleArrow:ha(.5),folder:function(a){return[L(a,["tabWidth","tabHeight"],function(a){var b=Math.max(0,Math.min(a.width,mxUtils.getValue(this.state.style,"tabWidth",h.prototype.tabWidth))),c=Math.max(0,Math.min(a.height,mxUtils.getValue(this.state.style,
-"tabHeight",h.prototype.tabHeight)));mxUtils.getValue(this.state.style,"tabPosition",h.prototype.tabPosition)==mxConstants.ALIGN_RIGHT&&(b=a.width-b);return new mxPoint(a.x+b,a.y+c)},function(a,b){var c=Math.max(0,Math.min(a.width,b.x-a.x));mxUtils.getValue(this.state.style,"tabPosition",h.prototype.tabPosition)==mxConstants.ALIGN_RIGHT&&(c=a.width-c);this.state.style.tabWidth=Math.round(c);this.state.style.tabHeight=Math.round(Math.max(0,Math.min(a.height,b.y-a.y)))})]},document:function(a){return[L(a,
-["size"],function(a){var b=Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.state.style,"size",l.prototype.size))));return new mxPoint(a.x+3*a.width/4,a.y+(1-b)*a.height)},function(a,b){this.state.style.size=Math.max(0,Math.min(1,(a.y+a.height-b.y)/a.height))})]},tape:function(a){return[L(a,["size"],function(a){var b=Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.state.style,"size",k.prototype.size))));return new mxPoint(a.getCenterX(),a.y+b*a.height/2)},function(a,b){this.state.style.size=
-Math.max(0,Math.min(1,(b.y-a.y)/a.height*2))})]},offPageConnector:function(a){return[L(a,["size"],function(a){var b=Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.state.style,"size",X.prototype.size))));return new mxPoint(a.getCenterX(),a.y+(1-b)*a.height)},function(a,b){this.state.style.size=Math.max(0,Math.min(1,(a.y+a.height-b.y)/a.height))})]},step:ua(w.prototype.size,!0,null,!0),hexagon:ua(v.prototype.size,!0,.5,!0),curlyBracket:ua(p.prototype.size,!1),display:ua(qa.prototype.size,!1),
-cube:za(1,a.prototype.size,!1),card:za(.5,g.prototype.size,!0),loopLimit:za(.5,W.prototype.size,!0),trapezoid:Ea(.5),parallelogram:Ea(1)};Graph.createHandle=L;Graph.handleFactory=Aa;mxVertexHandler.prototype.createCustomHandles=function(){if(1==this.state.view.graph.getSelectionCount()&&this.graph.isCellRotatable(this.state.cell)){var a=this.state.style.shape;null==this.state.view.graph.cellRenderer.defaultShapes[a]&&null==mxStencilRegistry.getStencil(a)&&(a=mxConstants.SHAPE_RECTANGLE);a=Aa[a];if(null!=
-a)return a(this.state)}return null};mxEdgeHandler.prototype.createCustomHandles=function(){if(1==this.state.view.graph.getSelectionCount()){var a=this.state.style.shape;null==this.state.view.graph.cellRenderer.defaultShapes[a]&&null==mxStencilRegistry.getStencil(a)&&(a=mxConstants.SHAPE_CONNECTOR);a=Aa[a];if(null!=a)return a(this.state)}return null}}else Graph.createHandle=function(){},Graph.handleFactory={};var va=new mxPoint(1,0),wa=new mxPoint(1,0),ha=mxUtils.toRadians(-30),va=mxUtils.getRotatedPoint(va,
-Math.cos(ha),Math.sin(ha)),ha=mxUtils.toRadians(-150),wa=mxUtils.getRotatedPoint(wa,Math.cos(ha),Math.sin(ha));mxEdgeStyle.IsometricConnector=function(a,b,c,d,e){var f=a.view;d=null!=d&&0<d.length?d[0]:null;var g=a.absolutePoints,h=g[0],g=g[g.length-1];null!=d&&(d=f.transformControlPoint(a,d));null==h&&null!=b&&(h=new mxPoint(b.getCenterX(),b.getCenterY()));null==g&&null!=c&&(g=new mxPoint(c.getCenterX(),c.getCenterY()));var k=va.x,l=va.y,m=wa.x,n=wa.y,p="horizontal"==mxUtils.getValue(a.style,"elbow",
-"horizontal");if(null!=g&&null!=h){a=function(a,b,c){a-=q.x;var d=b-q.y;b=(n*a-m*d)/(k*n-l*m);a=(l*a-k*d)/(l*m-k*n);p?(c&&(q=new mxPoint(q.x+k*b,q.y+l*b),e.push(q)),q=new mxPoint(q.x+m*a,q.y+n*a)):(c&&(q=new mxPoint(q.x+m*a,q.y+n*a),e.push(q)),q=new mxPoint(q.x+k*b,q.y+l*b));e.push(q)};var q=h;null==d&&(d=new mxPoint(h.x+(g.x-h.x)/2,h.y+(g.y-h.y)/2));a(d.x,d.y,!0);a(g.x,g.y,!1)}};mxStyleRegistry.putValue("isometricEdgeStyle",mxEdgeStyle.IsometricConnector);var Ja=Graph.prototype.createEdgeHandler;
-Graph.prototype.createEdgeHandler=function(a,b){if(b==mxEdgeStyle.IsometricConnector){var c=new mxElbowEdgeHandler(a);c.snapToTerminals=!1;return c}return Ja.apply(this,arguments)};c.prototype.constraints=[];d.prototype.constraints=[];u.prototype.constraints=[];mxRectangleShape.prototype.constraints=[new mxConnectionConstraint(new mxPoint(.25,0),!0),new mxConnectionConstraint(new mxPoint(.5,0),!0),new mxConnectionConstraint(new mxPoint(.75,0),!0),new mxConnectionConstraint(new mxPoint(0,.25),!0),
-new mxConnectionConstraint(new mxPoint(0,.5),!0),new mxConnectionConstraint(new mxPoint(0,.75),!0),new mxConnectionConstraint(new mxPoint(1,.25),!0),new mxConnectionConstraint(new mxPoint(1,.5),!0),new mxConnectionConstraint(new mxPoint(1,.75),!0),new mxConnectionConstraint(new mxPoint(.25,1),!0),new mxConnectionConstraint(new mxPoint(.5,1),!0),new mxConnectionConstraint(new mxPoint(.75,1),!0)];mxEllipse.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,0),!0),new mxConnectionConstraint(new mxPoint(1,
-0),!0),new mxConnectionConstraint(new mxPoint(0,1),!0),new mxConnectionConstraint(new mxPoint(1,1),!0),new mxConnectionConstraint(new mxPoint(.5,0),!0),new mxConnectionConstraint(new mxPoint(.5,1),!0),new mxConnectionConstraint(new mxPoint(0,.5),!0),new mxConnectionConstraint(new mxPoint(1,.5))];mxLabel.prototype.constraints=mxRectangleShape.prototype.constraints;mxImageShape.prototype.constraints=mxRectangleShape.prototype.constraints;mxSwimlane.prototype.constraints=mxRectangleShape.prototype.constraints;
-A.prototype.constraints=mxRectangleShape.prototype.constraints;e.prototype.constraints=mxRectangleShape.prototype.constraints;g.prototype.constraints=mxRectangleShape.prototype.constraints;a.prototype.constraints=mxRectangleShape.prototype.constraints;h.prototype.constraints=mxRectangleShape.prototype.constraints;P.prototype.constraints=mxRectangleShape.prototype.constraints;aa.prototype.constraints=mxRectangleShape.prototype.constraints;ba.prototype.constraints=mxEllipse.prototype.constraints;ca.prototype.constraints=
-mxEllipse.prototype.constraints;da.prototype.constraints=mxEllipse.prototype.constraints;R.prototype.constraints=mxEllipse.prototype.constraints;z.prototype.constraints=mxRectangleShape.prototype.constraints;ta.prototype.constraints=mxRectangleShape.prototype.constraints;qa.prototype.constraints=mxRectangleShape.prototype.constraints;W.prototype.constraints=mxRectangleShape.prototype.constraints;X.prototype.constraints=mxRectangleShape.prototype.constraints;mxCylinder.prototype.constraints=[new mxConnectionConstraint(new mxPoint(.15,
-.05),!1),new mxConnectionConstraint(new mxPoint(.5,0),!0),new mxConnectionConstraint(new mxPoint(.85,.05),!1),new mxConnectionConstraint(new mxPoint(0,.3),!0),new mxConnectionConstraint(new mxPoint(0,.5),!0),new mxConnectionConstraint(new mxPoint(0,.7),!0),new mxConnectionConstraint(new mxPoint(1,.3),!0),new mxConnectionConstraint(new mxPoint(1,.5),!0),new mxConnectionConstraint(new mxPoint(1,.7),!0),new mxConnectionConstraint(new mxPoint(.15,.95),!1),new mxConnectionConstraint(new mxPoint(.5,1),
-!0),new mxConnectionConstraint(new mxPoint(.85,.95),!1)];B.prototype.constraints=[new mxConnectionConstraint(new mxPoint(.25,.1),!1),new mxConnectionConstraint(new mxPoint(.5,0),!1),new mxConnectionConstraint(new mxPoint(.75,.1),!1),new mxConnectionConstraint(new mxPoint(0,1/3),!1),new mxConnectionConstraint(new mxPoint(0,1),!1),new mxConnectionConstraint(new mxPoint(1,1/3),!1),new mxConnectionConstraint(new mxPoint(1,1),!1),new mxConnectionConstraint(new mxPoint(.5,.5),!1)];Q.prototype.constraints=
-[new mxConnectionConstraint(new mxPoint(.25,0),!0),new mxConnectionConstraint(new mxPoint(.5,0),!0),new mxConnectionConstraint(new mxPoint(.75,0),!0),new mxConnectionConstraint(new mxPoint(0,.3),!0),new mxConnectionConstraint(new mxPoint(0,.7),!0),new mxConnectionConstraint(new mxPoint(1,.25),!0),new mxConnectionConstraint(new mxPoint(1,.5),!0),new mxConnectionConstraint(new mxPoint(1,.75),!0),new mxConnectionConstraint(new mxPoint(.25,1),!0),new mxConnectionConstraint(new mxPoint(.5,1),!0),new mxConnectionConstraint(new mxPoint(.75,
-1),!0)];mxActor.prototype.constraints=[new mxConnectionConstraint(new mxPoint(.5,0),!0),new mxConnectionConstraint(new mxPoint(.25,.2),!1),new mxConnectionConstraint(new mxPoint(.1,.5),!1),new mxConnectionConstraint(new mxPoint(0,.75),!0),new mxConnectionConstraint(new mxPoint(.75,.25),!1),new mxConnectionConstraint(new mxPoint(.9,.5),!1),new mxConnectionConstraint(new mxPoint(1,.75),!0),new mxConnectionConstraint(new mxPoint(.25,1),!0),new mxConnectionConstraint(new mxPoint(.5,1),!0),new mxConnectionConstraint(new mxPoint(.75,
-1),!0)];f.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,0),!1),new mxConnectionConstraint(new mxPoint(.5,.25),!1),new mxConnectionConstraint(new mxPoint(1,0),!1),new mxConnectionConstraint(new mxPoint(.25,.5),!1),new mxConnectionConstraint(new mxPoint(.75,.5),!1),new mxConnectionConstraint(new mxPoint(0,1),!1),new mxConnectionConstraint(new mxPoint(.5,.75),!1),new mxConnectionConstraint(new mxPoint(1,1),!1)];k.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,.35),
-!1),new mxConnectionConstraint(new mxPoint(0,.5),!1),new mxConnectionConstraint(new mxPoint(0,.65),!1),new mxConnectionConstraint(new mxPoint(1,.35),!1),new mxConnectionConstraint(new mxPoint(1,.5),!1),new mxConnectionConstraint(new mxPoint(1,.65),!1),new mxConnectionConstraint(new mxPoint(.25,1),!1),new mxConnectionConstraint(new mxPoint(.75,0),!1)];w.prototype.constraints=[new mxConnectionConstraint(new mxPoint(.25,0),!0),new mxConnectionConstraint(new mxPoint(.5,0),!0),new mxConnectionConstraint(new mxPoint(.75,
-0),!0),new mxConnectionConstraint(new mxPoint(.25,1),!0),new mxConnectionConstraint(new mxPoint(.5,1),!0),new mxConnectionConstraint(new mxPoint(.75,1),!0),new mxConnectionConstraint(new mxPoint(.1,.25),!0),new mxConnectionConstraint(new mxPoint(.2,.5),!0),new mxConnectionConstraint(new mxPoint(.1,.75),!0),new mxConnectionConstraint(new mxPoint(.9,.25),!0),new mxConnectionConstraint(new mxPoint(1,.5),!0),new mxConnectionConstraint(new mxPoint(.9,.75),!0)];mxLine.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,
-.5),!1),new mxConnectionConstraint(new mxPoint(.25,.5),!1),new mxConnectionConstraint(new mxPoint(.75,.5),!1),new mxConnectionConstraint(new mxPoint(1,.5),!1)];N.prototype.constraints=[new mxConnectionConstraint(new mxPoint(.5,0),!1),new mxConnectionConstraint(new mxPoint(.5,1),!1)];mxDoubleEllipse.prototype.constraints=mxEllipse.prototype.constraints;mxRhombus.prototype.constraints=mxEllipse.prototype.constraints;mxTriangle.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,.25),!0),
-new mxConnectionConstraint(new mxPoint(0,.5),!0),new mxConnectionConstraint(new mxPoint(0,.75),!0),new mxConnectionConstraint(new mxPoint(.5,0),!0),new mxConnectionConstraint(new mxPoint(.5,1),!0),new mxConnectionConstraint(new mxPoint(1,.5),!0)];mxHexagon.prototype.constraints=[new mxConnectionConstraint(new mxPoint(.375,0),!0),new mxConnectionConstraint(new mxPoint(.5,0),!0),new mxConnectionConstraint(new mxPoint(.625,0),!0),new mxConnectionConstraint(new mxPoint(.125,.25),!0),new mxConnectionConstraint(new mxPoint(0,
-.5),!0),new mxConnectionConstraint(new mxPoint(.125,.75),!0),new mxConnectionConstraint(new mxPoint(.875,.25),!0),new mxConnectionConstraint(new mxPoint(0,.5),!0),new mxConnectionConstraint(new mxPoint(1,.5),!0),new mxConnectionConstraint(new mxPoint(.875,.75),!0),new mxConnectionConstraint(new mxPoint(.375,1),!0),new mxConnectionConstraint(new mxPoint(.5,1),!0),new mxConnectionConstraint(new mxPoint(.625,1),!0)];mxCloud.prototype.constraints=[new mxConnectionConstraint(new mxPoint(.25,.25),!1),new mxConnectionConstraint(new mxPoint(.4,
-.1),!1),new mxConnectionConstraint(new mxPoint(.16,.55),!1),new mxConnectionConstraint(new mxPoint(.07,.4),!1),new mxConnectionConstraint(new mxPoint(.31,.8),!1),new mxConnectionConstraint(new mxPoint(.13,.77),!1),new mxConnectionConstraint(new mxPoint(.8,.8),!1),new mxConnectionConstraint(new mxPoint(.55,.95),!1),new mxConnectionConstraint(new mxPoint(.875,.5),!1),new mxConnectionConstraint(new mxPoint(.96,.7),!1),new mxConnectionConstraint(new mxPoint(.625,.2),!1),new mxConnectionConstraint(new mxPoint(.88,
-.25),!1)];m.prototype.constraints=mxRectangleShape.prototype.constraints;n.prototype.constraints=mxRectangleShape.prototype.constraints;l.prototype.constraints=[new mxConnectionConstraint(new mxPoint(.25,0),!0),new mxConnectionConstraint(new mxPoint(.5,0),!0),new mxConnectionConstraint(new mxPoint(.75,0),!0),new mxConnectionConstraint(new mxPoint(0,.25),!0),new mxConnectionConstraint(new mxPoint(0,.5),!0),new mxConnectionConstraint(new mxPoint(0,.75),!0),new mxConnectionConstraint(new mxPoint(1,.25),
-!0),new mxConnectionConstraint(new mxPoint(1,.5),!0),new mxConnectionConstraint(new mxPoint(1,.75),!0)];mxArrow.prototype.constraints=null;S.prototype.constraints=null;V.prototype.constraints=null;Z.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,0),!1),new mxConnectionConstraint(new mxPoint(0,.5),!1),new mxConnectionConstraint(new mxPoint(0,1),!1),new mxConnectionConstraint(new mxPoint(.25,.5),!1),new mxConnectionConstraint(new mxPoint(.5,.5),!1),new mxConnectionConstraint(new mxPoint(.75,
-.5),!1),new mxConnectionConstraint(new mxPoint(1,0),!1),new mxConnectionConstraint(new mxPoint(1,.5),!1),new mxConnectionConstraint(new mxPoint(1,1),!1)];T.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,.5),!1),new mxConnectionConstraint(new mxPoint(1,.5),!1)];ia.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,.5),!1),new mxConnectionConstraint(new mxPoint(1,.5),!1)];pa.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,.5),!1),new mxConnectionConstraint(new mxPoint(1,
-.5),!1),new mxConnectionConstraint(new mxPoint(.5,0),!1),new mxConnectionConstraint(new mxPoint(.5,1),!1)];F.prototype.constraints=null;ja.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,.25),!1),new mxConnectionConstraint(new mxPoint(0,.5),!1),new mxConnectionConstraint(new mxPoint(0,.75),!1),new mxConnectionConstraint(new mxPoint(1,.5),!1),new mxConnectionConstraint(new mxPoint(.7,.1),!1),new mxConnectionConstraint(new mxPoint(.7,.9),!1)];ka.prototype.constraints=[new mxConnectionConstraint(new mxPoint(.175,
-.25),!1),new mxConnectionConstraint(new mxPoint(.25,.5),!1),new mxConnectionConstraint(new mxPoint(.175,.75),!1),new mxConnectionConstraint(new mxPoint(1,.5),!1),new mxConnectionConstraint(new mxPoint(.7,.1),!1),new mxConnectionConstraint(new mxPoint(.7,.9),!1)]})();function Actions(a){this.editorUi=a;this.actions={};this.init()}
+function(a,b,c,d,e){var f=d*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));if(this.isRounded)var g=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,100*mxConstants.RECTANGLE_ROUNDING_FACTOR)/100,f=Math.max(f,Math.min(d*g,e*g));a.begin();a.moveTo(b+f,c);a.lineTo(b+f,c+e);a.moveTo(b+d-f,c);a.lineTo(b+d-f,c+e);a.end();a.stroke();mxRectangleShape.prototype.paintForeground.apply(this,arguments)};mxCellRenderer.prototype.defaultShapes.process=t;mxUtils.extend(w,mxRectangleShape);
+w.prototype.paintBackground=function(a,b,c,d,e){a.setFillColor(mxConstants.NONE);a.rect(b,c,d,e);a.fill()};w.prototype.paintForeground=function(a,b,c,d,e){};mxCellRenderer.prototype.defaultShapes.transparent=w;mxUtils.extend(u,mxHexagon);u.prototype.size=30;u.prototype.position=.5;u.prototype.position2=.5;u.prototype.base=20;u.prototype.getLabelMargins=function(){return new mxRectangle(0,0,0,parseFloat(mxUtils.getValue(this.style,"size",this.size))*this.scale)};u.prototype.redrawPath=function(a,b,
+c,d,e){b=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;c=Math.max(0,Math.min(e,parseFloat(mxUtils.getValue(this.style,"size",this.size))));var f=d*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"position",this.position)))),g=d*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"position2",this.position2)))),h=Math.max(0,Math.min(d,parseFloat(mxUtils.getValue(this.style,"base",this.base))));this.addPoints(a,[new mxPoint(0,0),new mxPoint(d,
+0),new mxPoint(d,e-c),new mxPoint(Math.min(d,f+h),e-c),new mxPoint(g,e),new mxPoint(Math.max(0,f),e-c),new mxPoint(0,e-c)],this.isRounded,b,!0,[4])};mxCellRenderer.prototype.defaultShapes.callout=u;mxUtils.extend(v,mxActor);v.prototype.size=.2;v.prototype.redrawPath=function(a,b,c,d,e){b=d*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));c=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(a,[new mxPoint(0,0),new mxPoint(d-
+b,0),new mxPoint(d,e/2),new mxPoint(d-b,e),new mxPoint(0,e),new mxPoint(b,e/2)],this.isRounded,c,!0);a.end()};mxCellRenderer.prototype.defaultShapes.step=v;mxUtils.extend(A,mxHexagon);A.prototype.size=.25;A.prototype.redrawPath=function(a,b,c,d,e){b=d*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));c=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(a,[new mxPoint(b,0),new mxPoint(d-b,0),new mxPoint(d,.5*e),new mxPoint(d-
+b,e),new mxPoint(b,e),new mxPoint(0,.5*e)],this.isRounded,c,!0)};mxCellRenderer.prototype.defaultShapes.hexagon=A;mxUtils.extend(x,mxRectangleShape);x.prototype.isHtmlAllowed=function(){return!1};x.prototype.paintForeground=function(a,b,c,d,e){var f=Math.min(d/5,e/5)+1;a.begin();a.moveTo(b+d/2,c+f);a.lineTo(b+d/2,c+e-f);a.moveTo(b+f,c+e/2);a.lineTo(b+d-f,c+e/2);a.end();a.stroke();mxRectangleShape.prototype.paintForeground.apply(this,arguments)};mxCellRenderer.prototype.defaultShapes.plus=x;var Da=
+mxRhombus.prototype.paintVertexShape;mxRhombus.prototype.getLabelBounds=function(a){if(1==this.style["double"]){var b=(2*Math.max(2,this.strokewidth+1)+parseFloat(this.style[mxConstants.STYLE_MARGIN]||0))*this.scale;return new mxRectangle(a.x+b,a.y+b,a.width-2*b,a.height-2*b)}return a};mxRhombus.prototype.paintVertexShape=function(a,b,c,d,e){Da.apply(this,arguments);if(!this.outline&&1==this.style["double"]){var f=2*Math.max(2,this.strokewidth+1)+parseFloat(this.style[mxConstants.STYLE_MARGIN]||0);
+b+=f;c+=f;d-=2*f;e-=2*f;0<d&&0<e&&(a.setShadow(!1),Da.apply(this,[a,b,c,d,e]))}};mxUtils.extend(B,mxRectangleShape);B.prototype.isHtmlAllowed=function(){return!1};B.prototype.getLabelBounds=function(a){if(1==this.style["double"]){var b=(Math.max(2,this.strokewidth+1)+parseFloat(this.style[mxConstants.STYLE_MARGIN]||0))*this.scale;return new mxRectangle(a.x+b,a.y+b,a.width-2*b,a.height-2*b)}return a};B.prototype.paintForeground=function(a,b,c,d,e){if(null!=this.style){if(!this.outline&&1==this.style["double"]){var f=
+Math.max(2,this.strokewidth+1)+parseFloat(this.style[mxConstants.STYLE_MARGIN]||0);b+=f;c+=f;d-=2*f;e-=2*f;0<d&&0<e&&mxRectangleShape.prototype.paintBackground.apply(this,arguments)}a.setDashed(!1);var f=0,g;do{g=mxCellRenderer.prototype.defaultShapes[this.style["symbol"+f]];if(null!=g){var h=this.style["symbol"+f+"Align"],k=this.style["symbol"+f+"VerticalAlign"],ga=this.style["symbol"+f+"Width"],l=this.style["symbol"+f+"Height"],m=this.style["symbol"+f+"Spacing"]||0,ya=this.style["symbol"+f+"VSpacing"]||
+m,n=this.style["symbol"+f+"ArcSpacing"];null!=n&&(n*=this.getArcSize(d+this.strokewidth,e+this.strokewidth),m+=n,ya+=n);var n=b,qa=c,n=h==mxConstants.ALIGN_CENTER?n+(d-ga)/2:h==mxConstants.ALIGN_RIGHT?n+(d-ga-m):n+m,qa=k==mxConstants.ALIGN_MIDDLE?qa+(e-l)/2:k==mxConstants.ALIGN_BOTTOM?qa+(e-l-ya):qa+ya;a.save();h=new g;h.style=this.style;g.prototype.paintVertexShape.call(h,a,n,qa,ga,l);a.restore()}f++}while(null!=g)}mxRectangleShape.prototype.paintForeground.apply(this,arguments)};mxCellRenderer.prototype.defaultShapes.ext=
+B;mxUtils.extend(C,mxCylinder);C.prototype.redrawPath=function(a,b,c,d,e,f){f?(a.moveTo(0,0),a.lineTo(d/2,e/2),a.lineTo(d,0),a.end()):(a.moveTo(0,0),a.lineTo(d,0),a.lineTo(d,e),a.lineTo(0,e),a.close())};mxCellRenderer.prototype.defaultShapes.message=C;mxUtils.extend(y,mxShape);y.prototype.paintBackground=function(a,b,c,d,e){a.translate(b,c);a.ellipse(d/4,0,d/2,e/4);a.fillAndStroke();a.begin();a.moveTo(d/2,e/4);a.lineTo(d/2,2*e/3);a.moveTo(d/2,e/3);a.lineTo(0,e/3);a.moveTo(d/2,e/3);a.lineTo(d,e/3);
+a.moveTo(d/2,2*e/3);a.lineTo(0,e);a.moveTo(d/2,2*e/3);a.lineTo(d,e);a.end();a.stroke()};mxCellRenderer.prototype.defaultShapes.umlActor=y;mxUtils.extend(I,mxShape);I.prototype.getLabelMargins=function(a){return new mxRectangle(a.width/6,0,0,0)};I.prototype.paintBackground=function(a,b,c,d,e){a.translate(b,c);a.begin();a.moveTo(0,e/4);a.lineTo(0,3*e/4);a.end();a.stroke();a.begin();a.moveTo(0,e/2);a.lineTo(d/6,e/2);a.end();a.stroke();a.ellipse(d/6,0,5*d/6,e);a.fillAndStroke()};mxCellRenderer.prototype.defaultShapes.umlBoundary=
+I;mxUtils.extend(L,mxEllipse);L.prototype.paintVertexShape=function(a,b,c,d,e){mxEllipse.prototype.paintVertexShape.apply(this,arguments);a.begin();a.moveTo(b+d/8,c+e);a.lineTo(b+7*d/8,c+e);a.end();a.stroke()};mxCellRenderer.prototype.defaultShapes.umlEntity=L;mxUtils.extend(J,mxShape);J.prototype.paintVertexShape=function(a,b,c,d,e){a.translate(b,c);a.begin();a.moveTo(d,0);a.lineTo(0,e);a.moveTo(0,0);a.lineTo(d,e);a.end();a.stroke()};mxCellRenderer.prototype.defaultShapes.umlDestroy=J;mxUtils.extend(G,
+mxShape);G.prototype.getLabelBounds=function(a){return new mxRectangle(a.x,a.y+a.height/8,a.width,7*a.height/8)};G.prototype.paintBackground=function(a,b,c,d,e){a.translate(b,c);a.begin();a.moveTo(3*d/8,e/8*1.1);a.lineTo(5*d/8,0);a.end();a.stroke();a.ellipse(0,e/8,d,7*e/8);a.fillAndStroke()};G.prototype.paintForeground=function(a,b,c,d,e){a.begin();a.moveTo(3*d/8,e/8*1.1);a.lineTo(5*d/8,e/4);a.end();a.stroke()};mxCellRenderer.prototype.defaultShapes.umlControl=G;mxUtils.extend(D,mxRectangleShape);
+D.prototype.size=40;D.prototype.isHtmlAllowed=function(){return!1};D.prototype.getLabelBounds=function(a){var b=Math.max(0,Math.min(a.height,parseFloat(mxUtils.getValue(this.style,"size",this.size))*this.scale));return new mxRectangle(a.x,a.y,a.width,b)};D.prototype.paintBackground=function(a,b,c,d,e){var f=Math.max(0,Math.min(e,parseFloat(mxUtils.getValue(this.style,"size",this.size)))),g=mxUtils.getValue(this.style,"participant");null==g||null==this.state?mxRectangleShape.prototype.paintBackground.call(this,
+a,b,c,d,f):(g=this.state.view.graph.cellRenderer.getShape(g),null!=g&&g!=D&&(g=new g,g.apply(this.state),a.save(),g.paintVertexShape(a,b,c,d,f),a.restore()));f<e&&(a.setDashed(!0),a.begin(),a.moveTo(b+d/2,c+f),a.lineTo(b+d/2,c+e),a.end(),a.stroke())};D.prototype.paintForeground=function(a,b,c,d,e){var f=Math.max(0,Math.min(e,parseFloat(mxUtils.getValue(this.style,"size",this.size))));mxRectangleShape.prototype.paintForeground.call(this,a,b,c,d,Math.min(e,f))};mxCellRenderer.prototype.defaultShapes.umlLifeline=
+D;mxUtils.extend(K,mxShape);K.prototype.width=60;K.prototype.height=30;K.prototype.corner=10;K.prototype.getLabelMargins=function(a){return new mxRectangle(0,0,a.width-parseFloat(mxUtils.getValue(this.style,"width",this.width)*this.scale),a.height-parseFloat(mxUtils.getValue(this.style,"height",this.height)*this.scale))};K.prototype.paintBackground=function(a,b,c,d,e){var f=this.corner,g=Math.min(d,Math.max(f,parseFloat(mxUtils.getValue(this.style,"width",this.width)))),h=Math.min(e,Math.max(1.5*
+f,parseFloat(mxUtils.getValue(this.style,"height",this.height))));a.begin();a.moveTo(b,c);a.lineTo(b+g,c);a.lineTo(b+g,c+Math.max(0,h-1.5*f));a.lineTo(b+Math.max(0,g-f),c+h);a.lineTo(b,c+h);a.close();a.fillAndStroke();a.begin();a.moveTo(b+g,c);a.lineTo(b+d,c);a.lineTo(b+d,c+e);a.lineTo(b,c+e);a.lineTo(b,c+h);a.stroke()};mxCellRenderer.prototype.defaultShapes.umlFrame=K;mxPerimeter.LifelinePerimeter=function(a,b,c,d){d=D.prototype.size;null!=b&&(d=mxUtils.getValue(b.style,"size",d)*b.view.scale);b=
+parseFloat(b.style[mxConstants.STYLE_STROKEWIDTH]||1)*b.view.scale/2-1;c.x<a.getCenterX()&&(b=-1*(b+1));return new mxPoint(a.getCenterX()+b,Math.min(a.y+a.height,Math.max(a.y+d,c.y)))};mxStyleRegistry.putValue("lifelinePerimeter",mxPerimeter.LifelinePerimeter);mxPerimeter.OrthogonalPerimeter=function(a,b,c,d){d=!0;return mxPerimeter.RectanglePerimeter.apply(this,arguments)};mxStyleRegistry.putValue("orthogonalPerimeter",mxPerimeter.OrthogonalPerimeter);mxPerimeter.BackbonePerimeter=function(a,b,c,
+d){d=parseFloat(b.style[mxConstants.STYLE_STROKEWIDTH]||1)*b.view.scale/2-1;null!=b.style.backboneSize&&(d+=parseFloat(b.style.backboneSize)*b.view.scale/2-1);if("south"==b.style[mxConstants.STYLE_DIRECTION]||"north"==b.style[mxConstants.STYLE_DIRECTION])return c.x<a.getCenterX()&&(d=-1*(d+1)),new mxPoint(a.getCenterX()+d,Math.min(a.y+a.height,Math.max(a.y,c.y)));c.y<a.getCenterY()&&(d=-1*(d+1));return new mxPoint(Math.min(a.x+a.width,Math.max(a.x,c.x)),a.getCenterY()+d)};mxStyleRegistry.putValue("backbonePerimeter",
+mxPerimeter.BackbonePerimeter);mxPerimeter.CalloutPerimeter=function(a,b,c,d){return mxPerimeter.RectanglePerimeter(mxUtils.getDirectedBounds(a,new mxRectangle(0,0,0,Math.max(0,Math.min(a.height,parseFloat(mxUtils.getValue(b.style,"size",u.prototype.size))*b.view.scale))),b.style),b,c,d)};mxStyleRegistry.putValue("calloutPerimeter",mxPerimeter.CalloutPerimeter);mxPerimeter.ParallelogramPerimeter=function(a,b,c,d){var e=m.prototype.size;null!=b&&(e=mxUtils.getValue(b.style,"size",e));var f=a.x,g=a.y,
+h=a.width,k=a.height;b=null!=b?mxUtils.getValue(b.style,mxConstants.STYLE_DIRECTION,mxConstants.DIRECTION_EAST):mxConstants.DIRECTION_EAST;b==mxConstants.DIRECTION_NORTH||b==mxConstants.DIRECTION_SOUTH?(e=k*Math.max(0,Math.min(1,e)),g=[new mxPoint(f,g),new mxPoint(f+h,g+e),new mxPoint(f+h,g+k),new mxPoint(f,g+k-e),new mxPoint(f,g)]):(e=h*Math.max(0,Math.min(1,e)),g=[new mxPoint(f+e,g),new mxPoint(f+h,g),new mxPoint(f+h-e,g+k),new mxPoint(f,g+k),new mxPoint(f+e,g)]);k=a.getCenterX();a=a.getCenterY();
+a=new mxPoint(k,a);d&&(c.x<f||c.x>f+h?a.y=c.y:a.x=c.x);return mxUtils.getPerimeterPoint(g,a,c)};mxStyleRegistry.putValue("parallelogramPerimeter",mxPerimeter.ParallelogramPerimeter);mxPerimeter.TrapezoidPerimeter=function(a,b,c,d){var e=n.prototype.size;null!=b&&(e=mxUtils.getValue(b.style,"size",e));var f=a.x,g=a.y,h=a.width,k=a.height;b=null!=b?mxUtils.getValue(b.style,mxConstants.STYLE_DIRECTION,mxConstants.DIRECTION_EAST):mxConstants.DIRECTION_EAST;b==mxConstants.DIRECTION_EAST?(e=h*Math.max(0,
+Math.min(1,e)),g=[new mxPoint(f+e,g),new mxPoint(f+h-e,g),new mxPoint(f+h,g+k),new mxPoint(f,g+k),new mxPoint(f+e,g)]):b==mxConstants.DIRECTION_WEST?(e=h*Math.max(0,Math.min(1,e)),g=[new mxPoint(f,g),new mxPoint(f+h,g),new mxPoint(f+h-e,g+k),new mxPoint(f+e,g+k),new mxPoint(f,g)]):b==mxConstants.DIRECTION_NORTH?(e=k*Math.max(0,Math.min(1,e)),g=[new mxPoint(f,g+e),new mxPoint(f+h,g),new mxPoint(f+h,g+k),new mxPoint(f,g+k-e),new mxPoint(f,g+e)]):(e=k*Math.max(0,Math.min(1,e)),g=[new mxPoint(f,g),new mxPoint(f+
+h,g+e),new mxPoint(f+h,g+k-e),new mxPoint(f,g+k),new mxPoint(f,g)]);k=a.getCenterX();a=a.getCenterY();a=new mxPoint(k,a);d&&(c.x<f||c.x>f+h?a.y=c.y:a.x=c.x);return mxUtils.getPerimeterPoint(g,a,c)};mxStyleRegistry.putValue("trapezoidPerimeter",mxPerimeter.TrapezoidPerimeter);mxPerimeter.StepPerimeter=function(a,b,c,d){var e=v.prototype.size;null!=b&&(e=mxUtils.getValue(b.style,"size",e));var f=a.x,g=a.y,h=a.width,k=a.height,l=a.getCenterX();a=a.getCenterY();b=null!=b?mxUtils.getValue(b.style,mxConstants.STYLE_DIRECTION,
+mxConstants.DIRECTION_EAST):mxConstants.DIRECTION_EAST;b==mxConstants.DIRECTION_EAST?(e=h*Math.max(0,Math.min(1,e)),g=[new mxPoint(f,g),new mxPoint(f+h-e,g),new mxPoint(f+h,a),new mxPoint(f+h-e,g+k),new mxPoint(f,g+k),new mxPoint(f+e,a),new mxPoint(f,g)]):b==mxConstants.DIRECTION_WEST?(e=h*Math.max(0,Math.min(1,e)),g=[new mxPoint(f+e,g),new mxPoint(f+h,g),new mxPoint(f+h-e,a),new mxPoint(f+h,g+k),new mxPoint(f+e,g+k),new mxPoint(f,a),new mxPoint(f+e,g)]):b==mxConstants.DIRECTION_NORTH?(e=k*Math.max(0,
+Math.min(1,e)),g=[new mxPoint(f,g+e),new mxPoint(l,g),new mxPoint(f+h,g+e),new mxPoint(f+h,g+k),new mxPoint(l,g+k-e),new mxPoint(f,g+k),new mxPoint(f,g+e)]):(e=k*Math.max(0,Math.min(1,e)),g=[new mxPoint(f,g),new mxPoint(l,g+e),new mxPoint(f+h,g),new mxPoint(f+h,g+k-e),new mxPoint(l,g+k),new mxPoint(f,g+k-e),new mxPoint(f,g)]);l=new mxPoint(l,a);d&&(c.x<f||c.x>f+h?l.y=c.y:l.x=c.x);return mxUtils.getPerimeterPoint(g,l,c)};mxStyleRegistry.putValue("stepPerimeter",mxPerimeter.StepPerimeter);mxPerimeter.HexagonPerimeter2=
+function(a,b,c,d){var e=A.prototype.size;null!=b&&(e=mxUtils.getValue(b.style,"size",e));var f=a.x,g=a.y,h=a.width,k=a.height,l=a.getCenterX();a=a.getCenterY();b=null!=b?mxUtils.getValue(b.style,mxConstants.STYLE_DIRECTION,mxConstants.DIRECTION_EAST):mxConstants.DIRECTION_EAST;b==mxConstants.DIRECTION_NORTH||b==mxConstants.DIRECTION_SOUTH?(e=k*Math.max(0,Math.min(1,e)),g=[new mxPoint(l,g),new mxPoint(f+h,g+e),new mxPoint(f+h,g+k-e),new mxPoint(l,g+k),new mxPoint(f,g+k-e),new mxPoint(f,g+e),new mxPoint(l,
+g)]):(e=h*Math.max(0,Math.min(1,e)),g=[new mxPoint(f+e,g),new mxPoint(f+h-e,g),new mxPoint(f+h,a),new mxPoint(f+h-e,g+k),new mxPoint(f+e,g+k),new mxPoint(f,a),new mxPoint(f+e,g)]);l=new mxPoint(l,a);d&&(c.x<f||c.x>f+h?l.y=c.y:l.x=c.x);return mxUtils.getPerimeterPoint(g,l,c)};mxStyleRegistry.putValue("hexagonPerimeter2",mxPerimeter.HexagonPerimeter2);mxUtils.extend(N,mxShape);N.prototype.size=10;N.prototype.paintBackground=function(a,b,c,d,e){var f=parseFloat(mxUtils.getValue(this.style,"size",this.size));
+a.translate(b,c);a.ellipse((d-f)/2,0,f,f);a.fillAndStroke();a.begin();a.moveTo(d/2,f);a.lineTo(d/2,e);a.end();a.stroke()};mxCellRenderer.prototype.defaultShapes.lollipop=N;mxUtils.extend(P,mxShape);P.prototype.size=10;P.prototype.inset=2;P.prototype.paintBackground=function(a,b,c,d,e){var f=parseFloat(mxUtils.getValue(this.style,"size",this.size)),g=parseFloat(mxUtils.getValue(this.style,"inset",this.inset))+this.strokewidth;a.translate(b,c);a.begin();a.moveTo(d/2,f+g);a.lineTo(d/2,e);a.end();a.stroke();
+a.begin();a.moveTo((d-f)/2-g,f/2);a.quadTo((d-f)/2-g,f+g,d/2,f+g);a.quadTo((d+f)/2+g,f+g,(d+f)/2+g,f/2);a.end();a.stroke()};mxCellRenderer.prototype.defaultShapes.requires=P;mxUtils.extend(O,mxCylinder);O.prototype.jettyWidth=32;O.prototype.jettyHeight=12;O.prototype.redrawPath=function(a,b,c,d,e,f){var g=parseFloat(mxUtils.getValue(this.style,"jettyWidth",this.jettyWidth));b=parseFloat(mxUtils.getValue(this.style,"jettyHeight",this.jettyHeight));c=g/2;var g=c+g/2,h=.3*e-b/2,k=.7*e-b/2;f?(a.moveTo(c,
+h),a.lineTo(g,h),a.lineTo(g,h+b),a.lineTo(c,h+b),a.moveTo(c,k),a.lineTo(g,k),a.lineTo(g,k+b),a.lineTo(c,k+b)):(a.moveTo(c,0),a.lineTo(d,0),a.lineTo(d,e),a.lineTo(c,e),a.lineTo(c,k+b),a.lineTo(0,k+b),a.lineTo(0,k),a.lineTo(c,k),a.lineTo(c,h+b),a.lineTo(0,h+b),a.lineTo(0,h),a.lineTo(c,h),a.close());a.end()};mxCellRenderer.prototype.defaultShapes.component=O;mxUtils.extend(F,mxDoubleEllipse);F.prototype.outerStroke=!0;F.prototype.paintVertexShape=function(a,b,c,d,e){var f=Math.min(4,Math.min(d/5,e/5));
+0<d&&0<e&&(a.ellipse(b+f,c+f,d-2*f,e-2*f),a.fillAndStroke());a.setShadow(!1);this.outerStroke&&(a.ellipse(b,c,d,e),a.stroke())};mxCellRenderer.prototype.defaultShapes.endState=F;mxUtils.extend(E,F);E.prototype.outerStroke=!1;mxCellRenderer.prototype.defaultShapes.startState=E;mxUtils.extend(H,mxArrowConnector);H.prototype.defaultWidth=4;H.prototype.isOpenEnded=function(){return!0};H.prototype.getEdgeWidth=function(){return mxUtils.getNumber(this.style,"width",this.defaultWidth)+Math.max(0,this.strokewidth-
+1)};H.prototype.isArrowRounded=function(){return this.isRounded};mxCellRenderer.prototype.defaultShapes.link=H;mxUtils.extend(z,mxArrowConnector);z.prototype.defaultWidth=10;z.prototype.defaultArrowWidth=20;z.prototype.getStartArrowWidth=function(){return this.getEdgeWidth()+mxUtils.getNumber(this.style,"startWidth",this.defaultArrowWidth)};z.prototype.getEndArrowWidth=function(){return this.getEdgeWidth()+mxUtils.getNumber(this.style,"endWidth",this.defaultArrowWidth)};z.prototype.getEdgeWidth=function(){return mxUtils.getNumber(this.style,
+"width",this.defaultWidth)+Math.max(0,this.strokewidth-1)};mxCellRenderer.prototype.defaultShapes.flexArrow=z;mxUtils.extend(Q,mxActor);Q.prototype.size=30;Q.prototype.redrawPath=function(a,b,c,d,e){b=Math.min(e,parseFloat(mxUtils.getValue(this.style,"size",this.size)));c=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(a,[new mxPoint(0,e),new mxPoint(0,b),new mxPoint(d,0),new mxPoint(d,e)],this.isRounded,c,!0);a.end()};mxCellRenderer.prototype.defaultShapes.manualInput=
+Q;mxUtils.extend(S,mxRectangleShape);S.prototype.dx=20;S.prototype.dy=20;S.prototype.isHtmlAllowed=function(){return!1};S.prototype.paintForeground=function(a,b,c,d,e){mxRectangleShape.prototype.paintForeground.apply(this,arguments);var f=0;if(this.isRounded)var g=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,100*mxConstants.RECTANGLE_ROUNDING_FACTOR)/100,f=Math.max(f,Math.min(d*g,e*g));g=Math.max(f,Math.min(d,parseFloat(mxUtils.getValue(this.style,"dx",this.dx))));f=Math.max(f,Math.min(e,
+parseFloat(mxUtils.getValue(this.style,"dy",this.dy))));a.begin();a.moveTo(b,c+f);a.lineTo(b+d,c+f);a.end();a.stroke();a.begin();a.moveTo(b+g,c);a.lineTo(b+g,c+e);a.end();a.stroke()};mxCellRenderer.prototype.defaultShapes.internalStorage=S;mxUtils.extend(T,mxActor);T.prototype.dx=20;T.prototype.dy=20;T.prototype.redrawPath=function(a,b,c,d,e){b=Math.max(0,Math.min(d,parseFloat(mxUtils.getValue(this.style,"dx",this.dx))));c=Math.max(0,Math.min(e,parseFloat(mxUtils.getValue(this.style,"dy",this.dy))));
+parseFloat(mxUtils.getValue(this.style,"size",this.size));var f=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(a,[new mxPoint(0,0),new mxPoint(d,0),new mxPoint(d,c),new mxPoint(b,c),new mxPoint(b,e),new mxPoint(0,e)],this.isRounded,f,!0);a.end()};mxCellRenderer.prototype.defaultShapes.corner=T;mxUtils.extend(aa,mxActor);aa.prototype.redrawPath=function(a,b,c,d,e){a.moveTo(0,0);a.lineTo(0,e);a.end();a.moveTo(d,0);a.lineTo(d,e);a.end();a.moveTo(0,e/
+2);a.lineTo(d,e/2);a.end()};mxCellRenderer.prototype.defaultShapes.crossbar=aa;mxUtils.extend(W,mxActor);W.prototype.dx=20;W.prototype.dy=20;W.prototype.redrawPath=function(a,b,c,d,e){b=Math.max(0,Math.min(d,parseFloat(mxUtils.getValue(this.style,"dx",this.dx))));c=Math.max(0,Math.min(e,parseFloat(mxUtils.getValue(this.style,"dy",this.dy))));parseFloat(mxUtils.getValue(this.style,"size",this.size));var f=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(a,
+[new mxPoint(0,0),new mxPoint(d,0),new mxPoint(d,c),new mxPoint((d+b)/2,c),new mxPoint((d+b)/2,e),new mxPoint((d-b)/2,e),new mxPoint((d-b)/2,c),new mxPoint(0,c)],this.isRounded,f,!0);a.end()};mxCellRenderer.prototype.defaultShapes.tee=W;mxUtils.extend(U,mxActor);U.prototype.arrowWidth=.3;U.prototype.arrowSize=.2;U.prototype.redrawPath=function(a,b,c,d,e){var f=e*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"arrowWidth",this.arrowWidth))));b=d*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,
+"arrowSize",this.arrowSize))));c=(e-f)/2;var f=c+f,g=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(a,[new mxPoint(0,c),new mxPoint(d-b,c),new mxPoint(d-b,0),new mxPoint(d,e/2),new mxPoint(d-b,e),new mxPoint(d-b,f),new mxPoint(0,f)],this.isRounded,g,!0);a.end()};mxCellRenderer.prototype.defaultShapes.singleArrow=U;mxUtils.extend(ia,mxActor);ia.prototype.redrawPath=function(a,b,c,d,e){var f=e*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,
+"arrowWidth",U.prototype.arrowWidth))));b=d*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"arrowSize",U.prototype.arrowSize))));c=(e-f)/2;var f=c+f,g=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(a,[new mxPoint(0,e/2),new mxPoint(b,0),new mxPoint(b,c),new mxPoint(d-b,c),new mxPoint(d-b,0),new mxPoint(d,e/2),new mxPoint(d-b,e),new mxPoint(d-b,f),new mxPoint(b,f),new mxPoint(b,e)],this.isRounded,g,!0);a.end()};mxCellRenderer.prototype.defaultShapes.doubleArrow=
+ia;mxUtils.extend(ba,mxActor);ba.prototype.size=.1;ba.prototype.redrawPath=function(a,b,c,d,e){b=d*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));a.moveTo(b,0);a.lineTo(d,0);a.quadTo(d-2*b,e/2,d,e);a.lineTo(b,e);a.quadTo(b-2*b,e/2,b,0);a.close();a.end()};mxCellRenderer.prototype.defaultShapes.dataStorage=ba;mxUtils.extend(ja,mxActor);ja.prototype.redrawPath=function(a,b,c,d,e){a.moveTo(0,0);a.quadTo(d,0,d,e/2);a.quadTo(d,e,0,e);a.close();a.end()};mxCellRenderer.prototype.defaultShapes.or=
+ja;mxUtils.extend(ca,mxActor);ca.prototype.redrawPath=function(a,b,c,d,e){a.moveTo(0,0);a.quadTo(d,0,d,e/2);a.quadTo(d,e,0,e);a.quadTo(d/2,e/2,0,0);a.close();a.end()};mxCellRenderer.prototype.defaultShapes.xor=ca;mxUtils.extend(X,mxActor);X.prototype.size=20;X.prototype.redrawPath=function(a,b,c,d,e){b=Math.min(d/2,Math.min(e,parseFloat(mxUtils.getValue(this.style,"size",this.size))));c=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(a,[new mxPoint(b,
+0),new mxPoint(d-b,0),new mxPoint(d,.8*b),new mxPoint(d,e),new mxPoint(0,e),new mxPoint(0,.8*b)],this.isRounded,c,!0);a.end()};mxCellRenderer.prototype.defaultShapes.loopLimit=X;mxUtils.extend(Y,mxActor);Y.prototype.size=.375;Y.prototype.redrawPath=function(a,b,c,d,e){b=e*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));c=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(a,[new mxPoint(0,0),new mxPoint(d,0),new mxPoint(d,
+e-b),new mxPoint(d/2,e),new mxPoint(0,e-b)],this.isRounded,c,!0);a.end()};mxCellRenderer.prototype.defaultShapes.offPageConnector=Y;mxUtils.extend(da,mxEllipse);da.prototype.paintVertexShape=function(a,b,c,d,e){mxEllipse.prototype.paintVertexShape.apply(this,arguments);a.begin();a.moveTo(b+d/2,c+e);a.lineTo(b+d,c+e);a.end();a.stroke()};mxCellRenderer.prototype.defaultShapes.tapeData=da;mxUtils.extend(ea,mxEllipse);ea.prototype.paintVertexShape=function(a,b,c,d,e){mxEllipse.prototype.paintVertexShape.apply(this,
+arguments);a.setShadow(!1);a.begin();a.moveTo(b,c+e/2);a.lineTo(b+d,c+e/2);a.end();a.stroke();a.begin();a.moveTo(b+d/2,c);a.lineTo(b+d/2,c+e);a.end();a.stroke()};mxCellRenderer.prototype.defaultShapes.orEllipse=ea;mxUtils.extend(Z,mxEllipse);Z.prototype.paintVertexShape=function(a,b,c,d,e){mxEllipse.prototype.paintVertexShape.apply(this,arguments);a.setShadow(!1);a.begin();a.moveTo(b+.145*d,c+.145*e);a.lineTo(b+.855*d,c+.855*e);a.end();a.stroke();a.begin();a.moveTo(b+.855*d,c+.145*e);a.lineTo(b+.145*
+d,c+.855*e);a.end();a.stroke()};mxCellRenderer.prototype.defaultShapes.sumEllipse=Z;mxUtils.extend(na,mxRhombus);na.prototype.paintVertexShape=function(a,b,c,d,e){mxRhombus.prototype.paintVertexShape.apply(this,arguments);a.setShadow(!1);a.begin();a.moveTo(b,c+e/2);a.lineTo(b+d,c+e/2);a.end();a.stroke()};mxCellRenderer.prototype.defaultShapes.sortShape=na;mxUtils.extend(V,mxEllipse);V.prototype.paintVertexShape=function(a,b,c,d,e){a.begin();a.moveTo(b,c);a.lineTo(b+d,c);a.lineTo(b+d/2,c+e/2);a.close();
+a.fillAndStroke();a.begin();a.moveTo(b,c+e);a.lineTo(b+d,c+e);a.lineTo(b+d/2,c+e/2);a.close();a.fillAndStroke()};mxCellRenderer.prototype.defaultShapes.collate=V;mxUtils.extend(ka,mxEllipse);ka.prototype.paintVertexShape=function(a,b,c,d,e){var f=c+e-5;a.begin();a.moveTo(b,c);a.lineTo(b,c+e);a.moveTo(b,f);a.lineTo(b+10,f-5);a.moveTo(b,f);a.lineTo(b+10,f+5);a.moveTo(b,f);a.lineTo(b+d,f);a.moveTo(b+d,c);a.lineTo(b+d,c+e);a.moveTo(b+d,f);a.lineTo(b+d-10,f-5);a.moveTo(b+d,f);a.lineTo(b+d-10,f+5);a.end();
+a.stroke()};mxCellRenderer.prototype.defaultShapes.dimension=ka;mxUtils.extend(R,mxEllipse);R.prototype.paintVertexShape=function(a,b,c,d,e){this.outline||a.setStrokeColor(null);mxRectangleShape.prototype.paintBackground.apply(this,arguments);null!=this.style&&(a.setStrokeColor(this.stroke),a.rect(b,c,d,e),a.fill(),a.begin(),a.moveTo(b,c),"1"==mxUtils.getValue(this.style,"top","1")?a.lineTo(b+d,c):a.moveTo(b+d,c),"1"==mxUtils.getValue(this.style,"right","1")?a.lineTo(b+d,c+e):a.moveTo(b+d,c+e),"1"==
+mxUtils.getValue(this.style,"bottom","1")?a.lineTo(b,c+e):a.moveTo(b,c+e),"1"==mxUtils.getValue(this.style,"left","1")&&a.lineTo(b,c-this.strokewidth/2),a.end(),a.stroke())};mxCellRenderer.prototype.defaultShapes.partialRectangle=R;mxUtils.extend(ta,mxEllipse);ta.prototype.paintVertexShape=function(a,b,c,d,e){mxEllipse.prototype.paintVertexShape.apply(this,arguments);a.setShadow(!1);a.begin();"vertical"==mxUtils.getValue(this.style,"line")?(a.moveTo(b+d/2,c),a.lineTo(b+d/2,c+e)):(a.moveTo(b,c+e/2),
+a.lineTo(b+d,c+e/2));a.end();a.stroke()};mxCellRenderer.prototype.defaultShapes.lineEllipse=ta;mxUtils.extend(ua,mxActor);ua.prototype.redrawPath=function(a,b,c,d,e){b=Math.min(d,e/2);a.moveTo(0,0);a.lineTo(d-b,0);a.quadTo(d,0,d,e/2);a.quadTo(d,e,d-b,e);a.lineTo(0,e);a.close();a.end()};mxCellRenderer.prototype.defaultShapes.delay=ua;mxUtils.extend(oa,mxActor);oa.prototype.size=.2;oa.prototype.redrawPath=function(a,b,c,d,e){b=Math.min(e,d);var f=Math.max(0,Math.min(b,b*parseFloat(mxUtils.getValue(this.style,
+"size",this.size))));b=(e-f)/2;c=b+f;var g=(d-f)/2,f=g+f;a.moveTo(0,b);a.lineTo(g,b);a.lineTo(g,0);a.lineTo(f,0);a.lineTo(f,b);a.lineTo(d,b);a.lineTo(d,c);a.lineTo(f,c);a.lineTo(f,e);a.lineTo(g,e);a.lineTo(g,c);a.lineTo(0,c);a.close();a.end()};mxCellRenderer.prototype.defaultShapes.cross=oa;mxUtils.extend(pa,mxActor);pa.prototype.size=.25;pa.prototype.redrawPath=function(a,b,c,d,e){b=Math.min(d,e/2);c=Math.min(d-b,Math.max(0,parseFloat(mxUtils.getValue(this.style,"size",this.size)))*d);a.moveTo(0,
+e/2);a.lineTo(c,0);a.lineTo(d-b,0);a.quadTo(d,0,d,e/2);a.quadTo(d,e,d-b,e);a.lineTo(c,e);a.close();a.end()};mxCellRenderer.prototype.defaultShapes.display=pa;mxUtils.extend(la,mxConnector);la.prototype.origPaintEdgeShape=la.prototype.paintEdgeShape;la.prototype.paintEdgeShape=function(a,b,c){var d=a.state.dashed,e=a.state.fixDash;la.prototype.origPaintEdgeShape.apply(this,arguments);if(3<=a.state.strokeWidth){var f=mxUtils.getValue(this.style,"fillColor",null);null!=f&&(a.setStrokeColor(f),a.setStrokeWidth(a.state.strokeWidth-
+2),a.setDashed(d,e),la.prototype.origPaintEdgeShape.apply(this,arguments))}};mxCellRenderer.prototype.defaultShapes.filledEdge=la;mxMarker.addMarker("dash",function(a,b,c,d,e,f,g,h,k,l){var m=e*(g+k+1),n=f*(g+k+1);return function(){a.begin();a.moveTo(d.x-m/2-n/2,d.y-n/2+m/2);a.lineTo(d.x+n/2-3*m/2,d.y-3*n/2-m/2);a.stroke()}});mxMarker.addMarker("cross",function(a,b,c,d,e,f,g,h,k,l){var m=e*(g+k+1),n=f*(g+k+1);return function(){a.begin();a.moveTo(d.x-m/2-n/2,d.y-n/2+m/2);a.lineTo(d.x+n/2-3*m/2,d.y-
+3*n/2-m/2);a.moveTo(d.x-m/2+n/2,d.y-n/2-m/2);a.lineTo(d.x-n/2-3*m/2,d.y-3*n/2+m/2);a.stroke()}});mxMarker.addMarker("circle",Ca);mxMarker.addMarker("circlePlus",function(a,b,c,d,e,f,g,h,k,l){var m=d.clone(),n=Ca.apply(this,arguments),p=e*(g+2*k),q=f*(g+2*k);return function(){n.apply(this,arguments);a.begin();a.moveTo(m.x-e*k,m.y-f*k);a.lineTo(m.x-2*p+e*k,m.y-2*q+f*k);a.moveTo(m.x-p-q+f*k,m.y-q+p-e*k);a.lineTo(m.x+q-p-f*k,m.y-q-p+e*k);a.stroke()}});mxMarker.addMarker("async",function(a,b,c,d,e,f,g,
+h,k,l){b=e*k*1.118;c=f*k*1.118;e*=g+k;f*=g+k;var m=d.clone();m.x-=b;m.y-=c;d.x+=1*-e-b;d.y+=1*-f-c;return function(){a.begin();a.moveTo(m.x,m.y);h?a.lineTo(m.x-e-f/2,m.y-f+e/2):a.lineTo(m.x+f/2-e,m.y-f-e/2);a.lineTo(m.x-e,m.y-f);a.close();l?a.fillAndStroke():a.stroke()}});mxMarker.addMarker("openAsync",function(a){a=null!=a?a:2;return function(b,c,d,e,f,g,h,k,l,m){f*=h+l;g*=h+l;var n=e.clone();return function(){b.begin();b.moveTo(n.x,n.y);k?b.lineTo(n.x-f-g/a,n.y-g+f/a):b.lineTo(n.x+g/a-f,n.y-g-f/
+a);b.stroke()}}}(2));if("undefined"!==typeof mxVertexHandler){var Ea=function(a,b,c){return ra(a,["width"],b,function(b,d,e,f,g){g=a.shape.getEdgeWidth()*a.view.scale+c;return new mxPoint(f.x+d*b/4+e*g/2,f.y+e*b/4-d*g/2)},function(b,d,e,f,g,h){b=Math.sqrt(mxUtils.ptSegDistSq(f.x,f.y,g.x,g.y,h.x,h.y));a.style.width=Math.round(2*b)/a.view.scale-c})},ra=function(a,b,c,d,e){var f=a.absolutePoints,g=f.length-1,h=a.view.translate,k=a.view.scale,l=c?f[0]:f[g],m=c?f[1]:f[g-1],n=m.x-l.x,p=m.y-l.y,q=Math.sqrt(n*
+n+p*p);return M(a,b,function(a){a=d.call(this,q,n/q,p/q,l,m);return new mxPoint(a.x/k-h.x,a.y/k-h.y)},function(a,b,c){a=Math.sqrt(n*n+p*p);b.x=(b.x+h.x)*k;b.y=(b.y+h.y)*k;e.call(this,a,n/a,p/a,l,m,b,c)})},ha=function(a){return function(b){return[M(b,["arrowWidth","arrowSize"],function(b){var c=Math.max(0,Math.min(1,mxUtils.getValue(this.state.style,"arrowWidth",U.prototype.arrowWidth))),d=Math.max(0,Math.min(a,mxUtils.getValue(this.state.style,"arrowSize",U.prototype.arrowSize)));return new mxPoint(b.x+
+(1-d)*b.width,b.y+(1-c)*b.height/2)},function(b,c){this.state.style.arrowWidth=Math.max(0,Math.min(1,Math.abs(b.y+b.height/2-c.y)/b.height*2));this.state.style.arrowSize=Math.max(0,Math.min(a,(b.x+b.width-c.x)/b.width))})]}},Aa=function(a,b,c){return function(d){var e=[M(d,["size"],function(c){var d=Math.max(0,Math.min(c.width,Math.min(c.height,parseFloat(mxUtils.getValue(this.state.style,"size",b)))))*a;return new mxPoint(c.x+d,c.y+d)},function(b,c){this.state.style.size=Math.round(Math.max(0,Math.min(Math.min(b.width,
+c.x-b.x),Math.min(b.height,c.y-b.y)))/a)})];c&&mxUtils.getValue(d.style,mxConstants.STYLE_ROUNDED,!1)&&e.push(fa(d));return e}},va=function(a,b,c,d){c=null!=c?c:1;return function(e){var f=[M(e,["size"],function(b){var c=parseFloat(mxUtils.getValue(this.state.style,"size",a));return new mxPoint(b.x+c*b.width,b.getCenterY())},function(a,b){this.state.style.size=Math.max(0,Math.min(c,(b.x-a.x)/a.width))},null,d)];b&&mxUtils.getValue(e.style,mxConstants.STYLE_ROUNDED,!1)&&f.push(fa(e));return f}},Fa=
+function(a){return function(b){var c=[M(b,["size"],function(b){var c=Math.max(0,Math.min(a,parseFloat(mxUtils.getValue(this.state.style,"size",n.prototype.size))));return new mxPoint(b.x+c*b.width*.75,b.y+b.height/4)},function(b,c){this.state.style.size=Math.max(0,Math.min(a,(c.x-b.x)/(.75*b.width)))},null,!0)];mxUtils.getValue(b.style,mxConstants.STYLE_ROUNDED,!1)&&c.push(fa(b));return c}},sa=function(){return function(a){var b=[];mxUtils.getValue(a.style,mxConstants.STYLE_ROUNDED,!1)&&b.push(fa(a));
+return b}},fa=function(a,b){return M(a,[mxConstants.STYLE_ARCSIZE],function(c){var d=null!=b?b:c.height/8;if("1"==mxUtils.getValue(a.style,mxConstants.STYLE_ABSOLUTE_ARCSIZE,0)){var e=mxUtils.getValue(a.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;return new mxPoint(c.x+c.width-Math.min(c.width/2,e),c.y+d)}e=Math.max(0,parseFloat(mxUtils.getValue(a.style,mxConstants.STYLE_ARCSIZE,100*mxConstants.RECTANGLE_ROUNDING_FACTOR)))/100;return new mxPoint(c.x+c.width-Math.min(Math.max(c.width/
+2,c.height/2),Math.min(c.width,c.height)*e),c.y+d)},function(b,c,d){"1"==mxUtils.getValue(a.style,mxConstants.STYLE_ABSOLUTE_ARCSIZE,0)?this.state.style[mxConstants.STYLE_ARCSIZE]=Math.round(Math.max(0,Math.min(b.width,2*(b.x+b.width-c.x)))):this.state.style[mxConstants.STYLE_ARCSIZE]=Math.round(Math.min(50,Math.max(0,100*(b.width-c.x+b.x)/Math.min(b.width,b.height))))})},M=function(a,b,c,d,e,f){var g=new mxHandle(a,null,mxVertexHandler.prototype.secondaryHandleImage);g.execute=function(){for(var a=
+0;a<b.length;a++)this.copyStyle(b[a])};g.getPosition=c;g.setPosition=d;g.ignoreGrid=null!=e?e:!0;if(f){var h=g.positionChanged;g.positionChanged=function(){h.apply(this,arguments);a.view.invalidate(this.state.cell);a.view.validate()}}return g},Ba={link:function(a){return[Ea(a,!0,10),Ea(a,!1,10)]},flexArrow:function(a){var b=a.view.graph.gridSize/a.view.scale,c=[];mxUtils.getValue(a.style,mxConstants.STYLE_STARTARROW,mxConstants.NONE)!=mxConstants.NONE&&(c.push(ra(a,["width",mxConstants.STYLE_STARTSIZE,
+mxConstants.STYLE_ENDSIZE],!0,function(b,c,d,e,f){b=(a.shape.getEdgeWidth()-a.shape.strokewidth)*a.view.scale;f=3*mxUtils.getNumber(a.style,mxConstants.STYLE_STARTSIZE,mxConstants.ARROW_SIZE/5)*a.view.scale;return new mxPoint(e.x+c*(f+a.shape.strokewidth*a.view.scale)+d*b/2,e.y+d*(f+a.shape.strokewidth*a.view.scale)-c*b/2)},function(c,d,e,f,g,h,k){c=Math.sqrt(mxUtils.ptSegDistSq(f.x,f.y,g.x,g.y,h.x,h.y));d=mxUtils.ptLineDist(f.x,f.y,f.x+e,f.y-d,h.x,h.y);a.style[mxConstants.STYLE_STARTSIZE]=Math.round(100*
+(d-a.shape.strokewidth)/3)/100/a.view.scale;a.style.width=Math.round(2*c)/a.view.scale;mxEvent.isControlDown(k.getEvent())&&(a.style[mxConstants.STYLE_ENDSIZE]=a.style[mxConstants.STYLE_STARTSIZE]);mxEvent.isAltDown(k.getEvent())||Math.abs(parseFloat(a.style[mxConstants.STYLE_STARTSIZE])-parseFloat(a.style[mxConstants.STYLE_ENDSIZE]))<b/6&&(a.style[mxConstants.STYLE_STARTSIZE]=a.style[mxConstants.STYLE_ENDSIZE])})),c.push(ra(a,["startWidth","endWidth",mxConstants.STYLE_STARTSIZE,mxConstants.STYLE_ENDSIZE],
+!0,function(b,c,d,e,f){b=(a.shape.getStartArrowWidth()-a.shape.strokewidth)*a.view.scale;f=3*mxUtils.getNumber(a.style,mxConstants.STYLE_STARTSIZE,mxConstants.ARROW_SIZE/5)*a.view.scale;return new mxPoint(e.x+c*(f+a.shape.strokewidth*a.view.scale)+d*b/2,e.y+d*(f+a.shape.strokewidth*a.view.scale)-c*b/2)},function(c,d,e,f,g,h,k){c=Math.sqrt(mxUtils.ptSegDistSq(f.x,f.y,g.x,g.y,h.x,h.y));d=mxUtils.ptLineDist(f.x,f.y,f.x+e,f.y-d,h.x,h.y);a.style[mxConstants.STYLE_STARTSIZE]=Math.round(100*(d-a.shape.strokewidth)/
+3)/100/a.view.scale;a.style.startWidth=Math.max(0,Math.round(2*c)-a.shape.getEdgeWidth())/a.view.scale;mxEvent.isControlDown(k.getEvent())&&(a.style[mxConstants.STYLE_ENDSIZE]=a.style[mxConstants.STYLE_STARTSIZE],a.style.endWidth=a.style.startWidth);mxEvent.isAltDown(k.getEvent())||(Math.abs(parseFloat(a.style[mxConstants.STYLE_STARTSIZE])-parseFloat(a.style[mxConstants.STYLE_ENDSIZE]))<b/6&&(a.style[mxConstants.STYLE_STARTSIZE]=a.style[mxConstants.STYLE_ENDSIZE]),Math.abs(parseFloat(a.style.startWidth)-
+parseFloat(a.style.endWidth))<b&&(a.style.startWidth=a.style.endWidth))})));mxUtils.getValue(a.style,mxConstants.STYLE_ENDARROW,mxConstants.NONE)!=mxConstants.NONE&&(c.push(ra(a,["width",mxConstants.STYLE_STARTSIZE,mxConstants.STYLE_ENDSIZE],!1,function(b,c,d,e,f){b=(a.shape.getEdgeWidth()-a.shape.strokewidth)*a.view.scale;f=3*mxUtils.getNumber(a.style,mxConstants.STYLE_ENDSIZE,mxConstants.ARROW_SIZE/5)*a.view.scale;return new mxPoint(e.x+c*(f+a.shape.strokewidth*a.view.scale)-d*b/2,e.y+d*(f+a.shape.strokewidth*
+a.view.scale)+c*b/2)},function(c,d,e,f,g,h,k){c=Math.sqrt(mxUtils.ptSegDistSq(f.x,f.y,g.x,g.y,h.x,h.y));d=mxUtils.ptLineDist(f.x,f.y,f.x+e,f.y-d,h.x,h.y);a.style[mxConstants.STYLE_ENDSIZE]=Math.round(100*(d-a.shape.strokewidth)/3)/100/a.view.scale;a.style.width=Math.round(2*c)/a.view.scale;mxEvent.isControlDown(k.getEvent())&&(a.style[mxConstants.STYLE_STARTSIZE]=a.style[mxConstants.STYLE_ENDSIZE]);mxEvent.isAltDown(k.getEvent())||Math.abs(parseFloat(a.style[mxConstants.STYLE_ENDSIZE])-parseFloat(a.style[mxConstants.STYLE_STARTSIZE]))<
+b/6&&(a.style[mxConstants.STYLE_ENDSIZE]=a.style[mxConstants.STYLE_STARTSIZE])})),c.push(ra(a,["startWidth","endWidth",mxConstants.STYLE_STARTSIZE,mxConstants.STYLE_ENDSIZE],!1,function(b,c,d,e,f){b=(a.shape.getEndArrowWidth()-a.shape.strokewidth)*a.view.scale;f=3*mxUtils.getNumber(a.style,mxConstants.STYLE_ENDSIZE,mxConstants.ARROW_SIZE/5)*a.view.scale;return new mxPoint(e.x+c*(f+a.shape.strokewidth*a.view.scale)-d*b/2,e.y+d*(f+a.shape.strokewidth*a.view.scale)+c*b/2)},function(c,d,e,f,g,h,k){c=
+Math.sqrt(mxUtils.ptSegDistSq(f.x,f.y,g.x,g.y,h.x,h.y));d=mxUtils.ptLineDist(f.x,f.y,f.x+e,f.y-d,h.x,h.y);a.style[mxConstants.STYLE_ENDSIZE]=Math.round(100*(d-a.shape.strokewidth)/3)/100/a.view.scale;a.style.endWidth=Math.max(0,Math.round(2*c)-a.shape.getEdgeWidth())/a.view.scale;mxEvent.isControlDown(k.getEvent())&&(a.style[mxConstants.STYLE_STARTSIZE]=a.style[mxConstants.STYLE_ENDSIZE],a.style.startWidth=a.style.endWidth);mxEvent.isAltDown(k.getEvent())||(Math.abs(parseFloat(a.style[mxConstants.STYLE_ENDSIZE])-
+parseFloat(a.style[mxConstants.STYLE_STARTSIZE]))<b/6&&(a.style[mxConstants.STYLE_ENDSIZE]=a.style[mxConstants.STYLE_STARTSIZE]),Math.abs(parseFloat(a.style.endWidth)-parseFloat(a.style.startWidth))<b&&(a.style.endWidth=a.style.startWidth))})));return c},swimlane:function(a){var b=[M(a,[mxConstants.STYLE_STARTSIZE],function(b){var c=parseFloat(mxUtils.getValue(a.style,mxConstants.STYLE_STARTSIZE,mxConstants.DEFAULT_STARTSIZE));return 1==mxUtils.getValue(a.style,mxConstants.STYLE_HORIZONTAL,1)?new mxPoint(b.getCenterX(),
+b.y+Math.max(0,Math.min(b.height,c))):new mxPoint(b.x+Math.max(0,Math.min(b.width,c)),b.getCenterY())},function(b,c){a.style[mxConstants.STYLE_STARTSIZE]=1==mxUtils.getValue(this.state.style,mxConstants.STYLE_HORIZONTAL,1)?Math.round(Math.max(0,Math.min(b.height,c.y-b.y))):Math.round(Math.max(0,Math.min(b.width,c.x-b.x)))})];if(mxUtils.getValue(a.style,mxConstants.STYLE_ROUNDED)){var c=parseFloat(mxUtils.getValue(a.style,mxConstants.STYLE_STARTSIZE,mxConstants.DEFAULT_STARTSIZE));b.push(fa(a,c/2))}return b},
+label:sa(),ext:sa(),rectangle:sa(),triangle:sa(),rhombus:sa(),umlLifeline:function(a){return[M(a,["size"],function(a){var b=Math.max(0,Math.min(a.height,parseFloat(mxUtils.getValue(this.state.style,"size",D.prototype.size))));return new mxPoint(a.getCenterX(),a.y+b)},function(a,b){this.state.style.size=Math.round(Math.max(0,Math.min(a.height,b.y-a.y)))},!1)]},umlFrame:function(a){return[M(a,["width","height"],function(a){var b=Math.max(K.prototype.corner,Math.min(a.width,mxUtils.getValue(this.state.style,
+"width",K.prototype.width))),c=Math.max(1.5*K.prototype.corner,Math.min(a.height,mxUtils.getValue(this.state.style,"height",K.prototype.height)));return new mxPoint(a.x+b,a.y+c)},function(a,b){this.state.style.width=Math.round(Math.max(K.prototype.corner,Math.min(a.width,b.x-a.x)));this.state.style.height=Math.round(Math.max(1.5*K.prototype.corner,Math.min(a.height,b.y-a.y)))},!1)]},process:function(a){var b=[M(a,["size"],function(a){var b=Math.max(0,Math.min(.5,parseFloat(mxUtils.getValue(this.state.style,
+"size",t.prototype.size))));return new mxPoint(a.x+a.width*b,a.y+a.height/4)},function(a,b){this.state.style.size=Math.max(0,Math.min(.5,(b.x-a.x)/a.width))})];mxUtils.getValue(a.style,mxConstants.STYLE_ROUNDED,!1)&&b.push(fa(a));return b},cross:function(a){return[M(a,["size"],function(a){var b=Math.min(a.width,a.height),b=Math.max(0,Math.min(1,mxUtils.getValue(this.state.style,"size",oa.prototype.size)))*b/2;return new mxPoint(a.getCenterX()-b,a.getCenterY()-b)},function(a,b){var c=Math.min(a.width,
+a.height);this.state.style.size=Math.max(0,Math.min(1,Math.min(Math.max(0,a.getCenterY()-b.y)/c*2,Math.max(0,a.getCenterX()-b.x)/c*2)))})]},note:function(a){return[M(a,["size"],function(a){var b=Math.max(0,Math.min(a.width,Math.min(a.height,parseFloat(mxUtils.getValue(this.state.style,"size",e.prototype.size)))));return new mxPoint(a.x+a.width-b,a.y+b)},function(a,b){this.state.style.size=Math.round(Math.max(0,Math.min(Math.min(a.width,a.x+a.width-b.x),Math.min(a.height,b.y-a.y))))})]},manualInput:function(a){var b=
+[M(a,["size"],function(a){var b=Math.max(0,Math.min(a.height,mxUtils.getValue(this.state.style,"size",Q.prototype.size)));return new mxPoint(a.x+a.width/4,a.y+3*b/4)},function(a,b){this.state.style.size=Math.round(Math.max(0,Math.min(a.height,4*(b.y-a.y)/3)))})];mxUtils.getValue(a.style,mxConstants.STYLE_ROUNDED,!1)&&b.push(fa(a));return b},dataStorage:function(a){return[M(a,["size"],function(a){var b=Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.state.style,"size",ba.prototype.size))));
+return new mxPoint(a.x+(1-b)*a.width,a.getCenterY())},function(a,b){this.state.style.size=Math.max(0,Math.min(1,(a.x+a.width-b.x)/a.width))})]},callout:function(a){var b=[M(a,["size","position"],function(a){var b=Math.max(0,Math.min(a.height,mxUtils.getValue(this.state.style,"size",u.prototype.size))),c=Math.max(0,Math.min(1,mxUtils.getValue(this.state.style,"position",u.prototype.position)));mxUtils.getValue(this.state.style,"base",u.prototype.base);return new mxPoint(a.x+c*a.width,a.y+a.height-
+b)},function(a,b){mxUtils.getValue(this.state.style,"base",u.prototype.base);this.state.style.size=Math.round(Math.max(0,Math.min(a.height,a.y+a.height-b.y)));this.state.style.position=Math.round(100*Math.max(0,Math.min(1,(b.x-a.x)/a.width)))/100}),M(a,["position2"],function(a){var b=Math.max(0,Math.min(1,mxUtils.getValue(this.state.style,"position2",u.prototype.position2)));return new mxPoint(a.x+b*a.width,a.y+a.height)},function(a,b){this.state.style.position2=Math.round(100*Math.max(0,Math.min(1,
+(b.x-a.x)/a.width)))/100}),M(a,["base"],function(a){var b=Math.max(0,Math.min(a.height,mxUtils.getValue(this.state.style,"size",u.prototype.size))),c=Math.max(0,Math.min(1,mxUtils.getValue(this.state.style,"position",u.prototype.position))),d=Math.max(0,Math.min(a.width,mxUtils.getValue(this.state.style,"base",u.prototype.base)));return new mxPoint(a.x+Math.min(a.width,c*a.width+d),a.y+a.height-b)},function(a,b){var c=Math.max(0,Math.min(1,mxUtils.getValue(this.state.style,"position",u.prototype.position)));
+this.state.style.base=Math.round(Math.max(0,Math.min(a.width,b.x-a.x-c*a.width)))})];mxUtils.getValue(a.style,mxConstants.STYLE_ROUNDED,!1)&&b.push(fa(a));return b},internalStorage:function(a){var b=[M(a,["dx","dy"],function(a){var b=Math.max(0,Math.min(a.width,mxUtils.getValue(this.state.style,"dx",S.prototype.dx))),c=Math.max(0,Math.min(a.height,mxUtils.getValue(this.state.style,"dy",S.prototype.dy)));return new mxPoint(a.x+b,a.y+c)},function(a,b){this.state.style.dx=Math.round(Math.max(0,Math.min(a.width,
+b.x-a.x)));this.state.style.dy=Math.round(Math.max(0,Math.min(a.height,b.y-a.y)))})];mxUtils.getValue(a.style,mxConstants.STYLE_ROUNDED,!1)&&b.push(fa(a));return b},corner:function(a){return[M(a,["dx","dy"],function(a){var b=Math.max(0,Math.min(a.width,mxUtils.getValue(this.state.style,"dx",T.prototype.dx))),c=Math.max(0,Math.min(a.height,mxUtils.getValue(this.state.style,"dy",T.prototype.dy)));return new mxPoint(a.x+b,a.y+c)},function(a,b){this.state.style.dx=Math.round(Math.max(0,Math.min(a.width,
+b.x-a.x)));this.state.style.dy=Math.round(Math.max(0,Math.min(a.height,b.y-a.y)))})]},tee:function(a){return[M(a,["dx","dy"],function(a){var b=Math.max(0,Math.min(a.width,mxUtils.getValue(this.state.style,"dx",W.prototype.dx))),c=Math.max(0,Math.min(a.height,mxUtils.getValue(this.state.style,"dy",W.prototype.dy)));return new mxPoint(a.x+(a.width+b)/2,a.y+c)},function(a,b){this.state.style.dx=Math.round(Math.max(0,2*Math.min(a.width/2,b.x-a.x-a.width/2)));this.state.style.dy=Math.round(Math.max(0,
+Math.min(a.height,b.y-a.y)))})]},singleArrow:ha(1),doubleArrow:ha(.5),folder:function(a){return[M(a,["tabWidth","tabHeight"],function(a){var b=Math.max(0,Math.min(a.width,mxUtils.getValue(this.state.style,"tabWidth",h.prototype.tabWidth))),c=Math.max(0,Math.min(a.height,mxUtils.getValue(this.state.style,"tabHeight",h.prototype.tabHeight)));mxUtils.getValue(this.state.style,"tabPosition",h.prototype.tabPosition)==mxConstants.ALIGN_RIGHT&&(b=a.width-b);return new mxPoint(a.x+b,a.y+c)},function(a,b){var c=
+Math.max(0,Math.min(a.width,b.x-a.x));mxUtils.getValue(this.state.style,"tabPosition",h.prototype.tabPosition)==mxConstants.ALIGN_RIGHT&&(c=a.width-c);this.state.style.tabWidth=Math.round(c);this.state.style.tabHeight=Math.round(Math.max(0,Math.min(a.height,b.y-a.y)))})]},document:function(a){return[M(a,["size"],function(a){var b=Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.state.style,"size",l.prototype.size))));return new mxPoint(a.x+3*a.width/4,a.y+(1-b)*a.height)},function(a,b){this.state.style.size=
+Math.max(0,Math.min(1,(a.y+a.height-b.y)/a.height))})]},tape:function(a){return[M(a,["size"],function(a){var b=Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.state.style,"size",k.prototype.size))));return new mxPoint(a.getCenterX(),a.y+b*a.height/2)},function(a,b){this.state.style.size=Math.max(0,Math.min(1,(b.y-a.y)/a.height*2))})]},offPageConnector:function(a){return[M(a,["size"],function(a){var b=Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.state.style,"size",Y.prototype.size))));
+return new mxPoint(a.getCenterX(),a.y+(1-b)*a.height)},function(a,b){this.state.style.size=Math.max(0,Math.min(1,(a.y+a.height-b.y)/a.height))})]},step:va(v.prototype.size,!0,null,!0),hexagon:va(A.prototype.size,!0,.5,!0),curlyBracket:va(p.prototype.size,!1),display:va(pa.prototype.size,!1),cube:Aa(1,a.prototype.size,!1),card:Aa(.5,g.prototype.size,!0),loopLimit:Aa(.5,X.prototype.size,!0),trapezoid:Fa(.5),parallelogram:Fa(1)};Graph.createHandle=M;Graph.handleFactory=Ba;mxVertexHandler.prototype.createCustomHandles=
+function(){if(1==this.state.view.graph.getSelectionCount()&&this.graph.isCellRotatable(this.state.cell)){var a=this.state.style.shape;null==this.state.view.graph.cellRenderer.defaultShapes[a]&&null==mxStencilRegistry.getStencil(a)&&(a=mxConstants.SHAPE_RECTANGLE);a=Ba[a];if(null!=a)return a(this.state)}return null};mxEdgeHandler.prototype.createCustomHandles=function(){if(1==this.state.view.graph.getSelectionCount()){var a=this.state.style.shape;null==this.state.view.graph.cellRenderer.defaultShapes[a]&&
+null==mxStencilRegistry.getStencil(a)&&(a=mxConstants.SHAPE_CONNECTOR);a=Ba[a];if(null!=a)return a(this.state)}return null}}else Graph.createHandle=function(){},Graph.handleFactory={};var wa=new mxPoint(1,0),xa=new mxPoint(1,0),ha=mxUtils.toRadians(-30),wa=mxUtils.getRotatedPoint(wa,Math.cos(ha),Math.sin(ha)),ha=mxUtils.toRadians(-150),xa=mxUtils.getRotatedPoint(xa,Math.cos(ha),Math.sin(ha));mxEdgeStyle.IsometricConnector=function(a,b,c,d,e){var f=a.view;d=null!=d&&0<d.length?d[0]:null;var g=a.absolutePoints,
+h=g[0],g=g[g.length-1];null!=d&&(d=f.transformControlPoint(a,d));null==h&&null!=b&&(h=new mxPoint(b.getCenterX(),b.getCenterY()));null==g&&null!=c&&(g=new mxPoint(c.getCenterX(),c.getCenterY()));var k=wa.x,l=wa.y,m=xa.x,n=xa.y,p="horizontal"==mxUtils.getValue(a.style,"elbow","horizontal");if(null!=g&&null!=h){a=function(a,b,c){a-=q.x;var d=b-q.y;b=(n*a-m*d)/(k*n-l*m);a=(l*a-k*d)/(l*m-k*n);p?(c&&(q=new mxPoint(q.x+k*b,q.y+l*b),e.push(q)),q=new mxPoint(q.x+m*a,q.y+n*a)):(c&&(q=new mxPoint(q.x+m*a,q.y+
+n*a),e.push(q)),q=new mxPoint(q.x+k*b,q.y+l*b));e.push(q)};var q=h;null==d&&(d=new mxPoint(h.x+(g.x-h.x)/2,h.y+(g.y-h.y)/2));a(d.x,d.y,!0);a(g.x,g.y,!1)}};mxStyleRegistry.putValue("isometricEdgeStyle",mxEdgeStyle.IsometricConnector);var Ka=Graph.prototype.createEdgeHandler;Graph.prototype.createEdgeHandler=function(a,b){if(b==mxEdgeStyle.IsometricConnector){var c=new mxElbowEdgeHandler(a);c.snapToTerminals=!1;return c}return Ka.apply(this,arguments)};c.prototype.constraints=[];d.prototype.constraints=
+[];u.prototype.constraints=[];mxRectangleShape.prototype.constraints=[new mxConnectionConstraint(new mxPoint(.25,0),!0),new mxConnectionConstraint(new mxPoint(.5,0),!0),new mxConnectionConstraint(new mxPoint(.75,0),!0),new mxConnectionConstraint(new mxPoint(0,.25),!0),new mxConnectionConstraint(new mxPoint(0,.5),!0),new mxConnectionConstraint(new mxPoint(0,.75),!0),new mxConnectionConstraint(new mxPoint(1,.25),!0),new mxConnectionConstraint(new mxPoint(1,.5),!0),new mxConnectionConstraint(new mxPoint(1,
+.75),!0),new mxConnectionConstraint(new mxPoint(.25,1),!0),new mxConnectionConstraint(new mxPoint(.5,1),!0),new mxConnectionConstraint(new mxPoint(.75,1),!0)];mxEllipse.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,0),!0),new mxConnectionConstraint(new mxPoint(1,0),!0),new mxConnectionConstraint(new mxPoint(0,1),!0),new mxConnectionConstraint(new mxPoint(1,1),!0),new mxConnectionConstraint(new mxPoint(.5,0),!0),new mxConnectionConstraint(new mxPoint(.5,1),!0),new mxConnectionConstraint(new mxPoint(0,
+.5),!0),new mxConnectionConstraint(new mxPoint(1,.5))];mxLabel.prototype.constraints=mxRectangleShape.prototype.constraints;mxImageShape.prototype.constraints=mxRectangleShape.prototype.constraints;mxSwimlane.prototype.constraints=mxRectangleShape.prototype.constraints;x.prototype.constraints=mxRectangleShape.prototype.constraints;e.prototype.constraints=mxRectangleShape.prototype.constraints;g.prototype.constraints=mxRectangleShape.prototype.constraints;a.prototype.constraints=mxRectangleShape.prototype.constraints;
+h.prototype.constraints=mxRectangleShape.prototype.constraints;S.prototype.constraints=mxRectangleShape.prototype.constraints;ba.prototype.constraints=mxRectangleShape.prototype.constraints;da.prototype.constraints=mxEllipse.prototype.constraints;ea.prototype.constraints=mxEllipse.prototype.constraints;Z.prototype.constraints=mxEllipse.prototype.constraints;ta.prototype.constraints=mxEllipse.prototype.constraints;Q.prototype.constraints=mxRectangleShape.prototype.constraints;ua.prototype.constraints=
+mxRectangleShape.prototype.constraints;pa.prototype.constraints=mxRectangleShape.prototype.constraints;X.prototype.constraints=mxRectangleShape.prototype.constraints;Y.prototype.constraints=mxRectangleShape.prototype.constraints;mxCylinder.prototype.constraints=[new mxConnectionConstraint(new mxPoint(.15,.05),!1),new mxConnectionConstraint(new mxPoint(.5,0),!0),new mxConnectionConstraint(new mxPoint(.85,.05),!1),new mxConnectionConstraint(new mxPoint(0,.3),!0),new mxConnectionConstraint(new mxPoint(0,
+.5),!0),new mxConnectionConstraint(new mxPoint(0,.7),!0),new mxConnectionConstraint(new mxPoint(1,.3),!0),new mxConnectionConstraint(new mxPoint(1,.5),!0),new mxConnectionConstraint(new mxPoint(1,.7),!0),new mxConnectionConstraint(new mxPoint(.15,.95),!1),new mxConnectionConstraint(new mxPoint(.5,1),!0),new mxConnectionConstraint(new mxPoint(.85,.95),!1)];y.prototype.constraints=[new mxConnectionConstraint(new mxPoint(.25,.1),!1),new mxConnectionConstraint(new mxPoint(.5,0),!1),new mxConnectionConstraint(new mxPoint(.75,
+.1),!1),new mxConnectionConstraint(new mxPoint(0,1/3),!1),new mxConnectionConstraint(new mxPoint(0,1),!1),new mxConnectionConstraint(new mxPoint(1,1/3),!1),new mxConnectionConstraint(new mxPoint(1,1),!1),new mxConnectionConstraint(new mxPoint(.5,.5),!1)];O.prototype.constraints=[new mxConnectionConstraint(new mxPoint(.25,0),!0),new mxConnectionConstraint(new mxPoint(.5,0),!0),new mxConnectionConstraint(new mxPoint(.75,0),!0),new mxConnectionConstraint(new mxPoint(0,.3),!0),new mxConnectionConstraint(new mxPoint(0,
+.7),!0),new mxConnectionConstraint(new mxPoint(1,.25),!0),new mxConnectionConstraint(new mxPoint(1,.5),!0),new mxConnectionConstraint(new mxPoint(1,.75),!0),new mxConnectionConstraint(new mxPoint(.25,1),!0),new mxConnectionConstraint(new mxPoint(.5,1),!0),new mxConnectionConstraint(new mxPoint(.75,1),!0)];mxActor.prototype.constraints=[new mxConnectionConstraint(new mxPoint(.5,0),!0),new mxConnectionConstraint(new mxPoint(.25,.2),!1),new mxConnectionConstraint(new mxPoint(.1,.5),!1),new mxConnectionConstraint(new mxPoint(0,
+.75),!0),new mxConnectionConstraint(new mxPoint(.75,.25),!1),new mxConnectionConstraint(new mxPoint(.9,.5),!1),new mxConnectionConstraint(new mxPoint(1,.75),!0),new mxConnectionConstraint(new mxPoint(.25,1),!0),new mxConnectionConstraint(new mxPoint(.5,1),!0),new mxConnectionConstraint(new mxPoint(.75,1),!0)];f.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,0),!1),new mxConnectionConstraint(new mxPoint(.5,.25),!1),new mxConnectionConstraint(new mxPoint(1,0),!1),new mxConnectionConstraint(new mxPoint(.25,
+.5),!1),new mxConnectionConstraint(new mxPoint(.75,.5),!1),new mxConnectionConstraint(new mxPoint(0,1),!1),new mxConnectionConstraint(new mxPoint(.5,.75),!1),new mxConnectionConstraint(new mxPoint(1,1),!1)];k.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,.35),!1),new mxConnectionConstraint(new mxPoint(0,.5),!1),new mxConnectionConstraint(new mxPoint(0,.65),!1),new mxConnectionConstraint(new mxPoint(1,.35),!1),new mxConnectionConstraint(new mxPoint(1,.5),!1),new mxConnectionConstraint(new mxPoint(1,
+.65),!1),new mxConnectionConstraint(new mxPoint(.25,1),!1),new mxConnectionConstraint(new mxPoint(.75,0),!1)];v.prototype.constraints=[new mxConnectionConstraint(new mxPoint(.25,0),!0),new mxConnectionConstraint(new mxPoint(.5,0),!0),new mxConnectionConstraint(new mxPoint(.75,0),!0),new mxConnectionConstraint(new mxPoint(.25,1),!0),new mxConnectionConstraint(new mxPoint(.5,1),!0),new mxConnectionConstraint(new mxPoint(.75,1),!0),new mxConnectionConstraint(new mxPoint(.1,.25),!0),new mxConnectionConstraint(new mxPoint(.2,
+.5),!0),new mxConnectionConstraint(new mxPoint(.1,.75),!0),new mxConnectionConstraint(new mxPoint(.9,.25),!0),new mxConnectionConstraint(new mxPoint(1,.5),!0),new mxConnectionConstraint(new mxPoint(.9,.75),!0)];mxLine.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,.5),!1),new mxConnectionConstraint(new mxPoint(.25,.5),!1),new mxConnectionConstraint(new mxPoint(.75,.5),!1),new mxConnectionConstraint(new mxPoint(1,.5),!1)];N.prototype.constraints=[new mxConnectionConstraint(new mxPoint(.5,
+0),!1),new mxConnectionConstraint(new mxPoint(.5,1),!1)];mxDoubleEllipse.prototype.constraints=mxEllipse.prototype.constraints;mxRhombus.prototype.constraints=mxEllipse.prototype.constraints;mxTriangle.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,.25),!0),new mxConnectionConstraint(new mxPoint(0,.5),!0),new mxConnectionConstraint(new mxPoint(0,.75),!0),new mxConnectionConstraint(new mxPoint(.5,0),!0),new mxConnectionConstraint(new mxPoint(.5,1),!0),new mxConnectionConstraint(new mxPoint(1,
+.5),!0)];mxHexagon.prototype.constraints=[new mxConnectionConstraint(new mxPoint(.375,0),!0),new mxConnectionConstraint(new mxPoint(.5,0),!0),new mxConnectionConstraint(new mxPoint(.625,0),!0),new mxConnectionConstraint(new mxPoint(.125,.25),!0),new mxConnectionConstraint(new mxPoint(0,.5),!0),new mxConnectionConstraint(new mxPoint(.125,.75),!0),new mxConnectionConstraint(new mxPoint(.875,.25),!0),new mxConnectionConstraint(new mxPoint(0,.5),!0),new mxConnectionConstraint(new mxPoint(1,.5),!0),new mxConnectionConstraint(new mxPoint(.875,
+.75),!0),new mxConnectionConstraint(new mxPoint(.375,1),!0),new mxConnectionConstraint(new mxPoint(.5,1),!0),new mxConnectionConstraint(new mxPoint(.625,1),!0)];mxCloud.prototype.constraints=[new mxConnectionConstraint(new mxPoint(.25,.25),!1),new mxConnectionConstraint(new mxPoint(.4,.1),!1),new mxConnectionConstraint(new mxPoint(.16,.55),!1),new mxConnectionConstraint(new mxPoint(.07,.4),!1),new mxConnectionConstraint(new mxPoint(.31,.8),!1),new mxConnectionConstraint(new mxPoint(.13,.77),!1),new mxConnectionConstraint(new mxPoint(.8,
+.8),!1),new mxConnectionConstraint(new mxPoint(.55,.95),!1),new mxConnectionConstraint(new mxPoint(.875,.5),!1),new mxConnectionConstraint(new mxPoint(.96,.7),!1),new mxConnectionConstraint(new mxPoint(.625,.2),!1),new mxConnectionConstraint(new mxPoint(.88,.25),!1)];m.prototype.constraints=mxRectangleShape.prototype.constraints;n.prototype.constraints=mxRectangleShape.prototype.constraints;l.prototype.constraints=[new mxConnectionConstraint(new mxPoint(.25,0),!0),new mxConnectionConstraint(new mxPoint(.5,
+0),!0),new mxConnectionConstraint(new mxPoint(.75,0),!0),new mxConnectionConstraint(new mxPoint(0,.25),!0),new mxConnectionConstraint(new mxPoint(0,.5),!0),new mxConnectionConstraint(new mxPoint(0,.75),!0),new mxConnectionConstraint(new mxPoint(1,.25),!0),new mxConnectionConstraint(new mxPoint(1,.5),!0),new mxConnectionConstraint(new mxPoint(1,.75),!0)];mxArrow.prototype.constraints=null;W.prototype.constraints=null;T.prototype.constraints=null;aa.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,
+0),!1),new mxConnectionConstraint(new mxPoint(0,.5),!1),new mxConnectionConstraint(new mxPoint(0,1),!1),new mxConnectionConstraint(new mxPoint(.25,.5),!1),new mxConnectionConstraint(new mxPoint(.5,.5),!1),new mxConnectionConstraint(new mxPoint(.75,.5),!1),new mxConnectionConstraint(new mxPoint(1,0),!1),new mxConnectionConstraint(new mxPoint(1,.5),!1),new mxConnectionConstraint(new mxPoint(1,1),!1)];U.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,.5),!1),new mxConnectionConstraint(new mxPoint(1,
+.5),!1)];ia.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,.5),!1),new mxConnectionConstraint(new mxPoint(1,.5),!1)];oa.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,.5),!1),new mxConnectionConstraint(new mxPoint(1,.5),!1),new mxConnectionConstraint(new mxPoint(.5,0),!1),new mxConnectionConstraint(new mxPoint(.5,1),!1)];D.prototype.constraints=null;ja.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,.25),!1),new mxConnectionConstraint(new mxPoint(0,
+.5),!1),new mxConnectionConstraint(new mxPoint(0,.75),!1),new mxConnectionConstraint(new mxPoint(1,.5),!1),new mxConnectionConstraint(new mxPoint(.7,.1),!1),new mxConnectionConstraint(new mxPoint(.7,.9),!1)];ca.prototype.constraints=[new mxConnectionConstraint(new mxPoint(.175,.25),!1),new mxConnectionConstraint(new mxPoint(.25,.5),!1),new mxConnectionConstraint(new mxPoint(.175,.75),!1),new mxConnectionConstraint(new mxPoint(1,.5),!1),new mxConnectionConstraint(new mxPoint(.7,.1),!1),new mxConnectionConstraint(new mxPoint(.7,
+.9),!1)]})();function Actions(a){this.editorUi=a;this.actions={};this.init()}
 Actions.prototype.init=function(){function a(a){b.escape();var c=b.getDeletableCells(b.getSelectionCells());if(null!=c&&0<c.length){var d=b.model.getParents(c);b.removeCells(c,a);if(null!=d){a=[];for(c=0;c<d.length;c++)b.model.contains(d[c])&&(b.model.isVertex(d[c])||b.model.isEdge(d[c]))&&a.push(d[c]);b.setSelectionCells(a)}}}var c=this.editorUi,d=c.editor,b=d.graph,e=function(){return Action.prototype.isEnabled.apply(this,arguments)&&b.isEnabled()};this.addAction("new...",function(){window.open(c.getUrl())});
 this.addAction("open...",function(){window.openNew=!0;window.openKey="open";c.openFile()});this.addAction("import...",function(){window.openNew=!1;window.openKey="import";window.openFile=new OpenFile(mxUtils.bind(this,function(){c.hideDialog()}));window.openFile.setConsumer(mxUtils.bind(this,function(a,b){try{var c=mxUtils.parseXml(a),e=new mxGraphModel;(new mxCodec(c)).decode(c.documentElement,e);var f=e.getChildren(e.getChildAt(e.getRoot(),0));d.graph.setSelectionCells(d.graph.importCells(f))}catch(p){mxUtils.alert(mxResources.get("invalidOrMissingFile")+
 ": "+p.message)}}));c.showDialog((new OpenDialog(this)).container,320,220,!0,!0,function(){window.openFile=null})}).isEnabled=e;this.addAction("save",function(){c.saveFile(!1)},null,null,Editor.ctrlKey+"+S").isEnabled=e;this.addAction("saveAs...",function(){c.saveFile(!0)},null,null,Editor.ctrlKey+"+Shift+S").isEnabled=e;this.addAction("export...",function(){c.showDialog((new ExportDialog(c)).container,300,230,!0,!0)});this.addAction("editDiagram...",function(){var a=new EditDiagramDialog(c);c.showDialog(a.container,
@@ -2808,7 +2810,7 @@ l=k.cloneNode(!1);k.style.backgroundColor="#d7d7d7";l.style.backgroundColor="#d7
 mxUtils.write(l,mxResources.get("arrange"));d.appendChild(l);d=d.cloneNode(!1);d.style.display="none";this.panels.push(new ArrangePanel(this,a,d));this.container.appendChild(d);c(k,b,g++);c(l,d,g++)}}};BaseFormatPanel=function(a,c,d){this.format=a;this.editorUi=c;this.container=d;this.listeners=[]};
 BaseFormatPanel.prototype.getSelectionState=function(){for(var a=this.editorUi.editor.graph,c=a.getSelectionCells(),d=null,b=0;b<c.length;b++){var e=a.view.getState(c[b]);if(null!=e&&(e=mxUtils.getValue(e.style,mxConstants.STYLE_SHAPE,null),null!=e))if(null==d)d=e;else if(d!=e)return null}return d};
 BaseFormatPanel.prototype.installInputHandler=function(a,c,d,b,e,f,h,g){f=null!=f?f:"";g=null!=g?g:!1;var k=this.editorUi,l=k.editor.graph;b=null!=b?b:1;e=null!=e?e:999;var m=null,n=!1,p=mxUtils.bind(this,function(p){var q=g?parseFloat(a.value):parseInt(a.value);isNaN(q)||c!=mxConstants.STYLE_ROTATION||(q=mxUtils.mod(Math.round(100*q),36E3)/100);q=Math.min(e,Math.max(b,isNaN(q)?d:q));if(l.cellEditor.isContentEditing()&&h)n||(n=!0,null!=m&&(l.cellEditor.restoreSelection(m),m=null),h(q),a.value=q+f,
-n=!1);else if(q!=mxUtils.getValue(this.format.getSelectionState().style,c,d)){l.isEditing()&&l.stopEditing(!0);l.getModel().beginUpdate();try{if(l.setCellStyles(c,q,l.getSelectionCells()),c==mxConstants.STYLE_FONTSIZE)for(var t=l.getSelectionCells(),u=0;u<t.length;u++){var w=t[u];if(l.isHtmlLabel(w)){var v=document.createElement("div");v.innerHTML=l.convertValueToString(w);for(var A=v.getElementsByTagName("font"),x=0;x<A.length;x++)A[x].removeAttribute("size"),A[x].style.fontSize=q+"px";l.cellLabelChanged(w,
+n=!1);else if(q!=mxUtils.getValue(this.format.getSelectionState().style,c,d)){l.isEditing()&&l.stopEditing(!0);l.getModel().beginUpdate();try{if(l.setCellStyles(c,q,l.getSelectionCells()),c==mxConstants.STYLE_FONTSIZE)for(var t=l.getSelectionCells(),w=0;w<t.length;w++){var u=t[w];if(l.isHtmlLabel(u)){var v=document.createElement("div");v.innerHTML=l.convertValueToString(u);for(var A=v.getElementsByTagName("font"),x=0;x<A.length;x++)A[x].removeAttribute("size"),A[x].style.fontSize=q+"px";l.cellLabelChanged(u,
 v.innerHTML)}}}finally{l.getModel().endUpdate()}k.fireEvent(new mxEventObject("styleChanged","keys",[c],"values",[q],"cells",l.getSelectionCells()))}a.value=q+f;mxEvent.consume(p)});h&&l.cellEditor.isContentEditing()&&(mxEvent.addListener(a,"mousedown",function(){m=l.cellEditor.saveSelection()}),mxEvent.addListener(a,"touchstart",function(){m=l.cellEditor.saveSelection()}));mxEvent.addListener(a,"change",p);mxEvent.addListener(a,"blur",p);return p};
 BaseFormatPanel.prototype.createPanel=function(){var a=document.createElement("div");a.style.padding="12px 0px 12px 18px";a.style.borderBottom="1px solid #c0c0c0";return a};BaseFormatPanel.prototype.createTitle=function(a){var c=document.createElement("div");c.style.padding="0px 0px 6px 0px";c.style.whiteSpace="nowrap";c.style.overflow="hidden";c.style.width="200px";c.style.fontWeight="bold";mxUtils.write(c,a);return c};
 BaseFormatPanel.prototype.createStepper=function(a,c,d,b,e,f){d=null!=d?d:1;b=null!=b?b:8;if(mxClient.IS_QUIRKS)b-=2;else if(mxClient.IS_MT||8<=document.documentMode)b+=1;var h=document.createElement("div");mxUtils.setPrefixedStyle(h.style,"borderRadius","3px");h.style.border="1px solid rgb(192, 192, 192)";h.style.position="absolute";var g=document.createElement("div");g.style.borderBottom="1px solid rgb(192, 192, 192)";g.style.position="relative";g.style.height=b+"px";g.style.width="10px";g.className=
@@ -2854,10 +2856,10 @@ ArrangePanel.prototype.addAngle=function(a){var c=this.editorUi,d=c.editor.graph
 a=parseFloat(mxUtils.getValue(b.style,mxConstants.STYLE_ROTATION,0)),f.value=isNaN(a)?"":a+"°"}),h=this.installInputHandler(f,mxConstants.STYLE_ROTATION,0,0,360,"°",null,!0);this.addKeyHandler(f,k);d.getModel().addListener(mxEvent.CHANGE,k);this.listeners.push({destroy:function(){d.getModel().removeListener(k)}});k()}return a};
 ArrangePanel.prototype.addGeometry=function(a){var c=this.editorUi,d=c.editor.graph,b=this.format.getSelectionState(),e=this.createPanel();e.style.paddingBottom="8px";var f=document.createElement("div");f.style.position="absolute";f.style.width="50px";f.style.marginTop="0px";f.style.fontWeight="bold";mxUtils.write(f,mxResources.get("size"));e.appendChild(f);var h,g,k,l,m=this.addUnitInput(e,"pt",84,44,function(){h.apply(this,arguments)}),n=this.addUnitInput(e,"pt",20,44,function(){g.apply(this,arguments)}),
 p=document.createElement("div");p.className="geSprite geSprite-fit";p.setAttribute("title",mxResources.get("autosize")+" ("+this.editorUi.actions.get("autosize").shortcut+")");p.style.position="relative";p.style.cursor="pointer";p.style.marginTop="-3px";p.style.border="0px";p.style.left="52px";mxUtils.setOpacity(p,50);mxEvent.addListener(p,"mouseenter",function(){mxUtils.setOpacity(p,100)});mxEvent.addListener(p,"mouseleave",function(){mxUtils.setOpacity(p,50)});mxEvent.addListener(p,"click",function(){c.actions.get("autosize").funct()});
-e.appendChild(p);this.addLabel(e,mxResources.get("width"),84);this.addLabel(e,mxResources.get("height"),20);mxUtils.br(e);f=document.createElement("div");f.style.paddingTop="8px";f.style.paddingRight="20px";f.style.whiteSpace="nowrap";f.style.textAlign="right";var q=this.createCellOption(mxResources.get("constrainProportions"),mxConstants.STYLE_ASPECT,null,"fixed","null");q.style.width="100%";f.appendChild(q);e.appendChild(f);this.addKeyHandler(m,w);this.addKeyHandler(n,w);h=this.addGeometryHandler(m,
-function(a,b){0<a.width&&(a.width=Math.max(1,b))});g=this.addGeometryHandler(n,function(a,b){0<a.height&&(a.height=Math.max(1,b))});a.appendChild(e);var r=this.createPanel();r.style.paddingBottom="30px";f=document.createElement("div");f.style.position="absolute";f.style.width="70px";f.style.marginTop="0px";f.style.fontWeight="bold";mxUtils.write(f,mxResources.get("position"));r.appendChild(f);var t=this.addUnitInput(r,"pt",84,44,function(){k.apply(this,arguments)}),u=this.addUnitInput(r,"pt",20,44,
-function(){l.apply(this,arguments)});mxUtils.br(r);this.addLabel(r,mxResources.get("left"),84);this.addLabel(r,mxResources.get("top"),20);var w=mxUtils.bind(this,function(a,c,f){b=this.format.getSelectionState();if(b.containsLabel||b.vertices.length!=d.getSelectionCount()||null==b.width||null==b.height)e.style.display="none";else{e.style.display="";if(f||document.activeElement!=m)m.value=b.width+(""==b.width?"":" pt");if(f||document.activeElement!=n)n.value=b.height+(""==b.height?"":" pt")}if(b.vertices.length==
-d.getSelectionCount()&&null!=b.x&&null!=b.y){r.style.display="";if(f||document.activeElement!=t)t.value=b.x+(""==b.x?"":" pt");if(f||document.activeElement!=u)u.value=b.y+(""==b.y?"":" pt")}else r.style.display="none"});this.addKeyHandler(t,w);this.addKeyHandler(u,w);d.getModel().addListener(mxEvent.CHANGE,w);this.listeners.push({destroy:function(){d.getModel().removeListener(w)}});w();k=this.addGeometryHandler(t,function(a,b){a.relative?a.offset.x=b:a.x=b});l=this.addGeometryHandler(u,function(a,
+e.appendChild(p);this.addLabel(e,mxResources.get("width"),84);this.addLabel(e,mxResources.get("height"),20);mxUtils.br(e);f=document.createElement("div");f.style.paddingTop="8px";f.style.paddingRight="20px";f.style.whiteSpace="nowrap";f.style.textAlign="right";var q=this.createCellOption(mxResources.get("constrainProportions"),mxConstants.STYLE_ASPECT,null,"fixed","null");q.style.width="100%";f.appendChild(q);e.appendChild(f);this.addKeyHandler(m,u);this.addKeyHandler(n,u);h=this.addGeometryHandler(m,
+function(a,b){0<a.width&&(a.width=Math.max(1,b))});g=this.addGeometryHandler(n,function(a,b){0<a.height&&(a.height=Math.max(1,b))});a.appendChild(e);var r=this.createPanel();r.style.paddingBottom="30px";f=document.createElement("div");f.style.position="absolute";f.style.width="70px";f.style.marginTop="0px";f.style.fontWeight="bold";mxUtils.write(f,mxResources.get("position"));r.appendChild(f);var t=this.addUnitInput(r,"pt",84,44,function(){k.apply(this,arguments)}),w=this.addUnitInput(r,"pt",20,44,
+function(){l.apply(this,arguments)});mxUtils.br(r);this.addLabel(r,mxResources.get("left"),84);this.addLabel(r,mxResources.get("top"),20);var u=mxUtils.bind(this,function(a,c,f){b=this.format.getSelectionState();if(b.containsLabel||b.vertices.length!=d.getSelectionCount()||null==b.width||null==b.height)e.style.display="none";else{e.style.display="";if(f||document.activeElement!=m)m.value=b.width+(""==b.width?"":" pt");if(f||document.activeElement!=n)n.value=b.height+(""==b.height?"":" pt")}if(b.vertices.length==
+d.getSelectionCount()&&null!=b.x&&null!=b.y){r.style.display="";if(f||document.activeElement!=t)t.value=b.x+(""==b.x?"":" pt");if(f||document.activeElement!=w)w.value=b.y+(""==b.y?"":" pt")}else r.style.display="none"});this.addKeyHandler(t,u);this.addKeyHandler(w,u);d.getModel().addListener(mxEvent.CHANGE,u);this.listeners.push({destroy:function(){d.getModel().removeListener(u)}});u();k=this.addGeometryHandler(t,function(a,b){a.relative?a.offset.x=b:a.x=b});l=this.addGeometryHandler(w,function(a,
 b){a.relative?a.offset.y=b:a.y=b});a.appendChild(r)};
 ArrangePanel.prototype.addGeometryHandler=function(a,c){function d(d){if(""!=a.value){var f=parseFloat(a.value);if(f!=e){b.getModel().beginUpdate();try{for(var g=b.getSelectionCells(),k=0;k<g.length;k++)if(b.getModel().isVertex(g[k])){var l=b.getCellGeometry(g[k]);null!=l&&(l=l.clone(),c(l,f),b.getModel().setGeometry(g[k],l))}}finally{b.getModel().endUpdate()}e=f;a.value=f+" pt"}else isNaN(f)&&(a.value=e+" pt")}mxEvent.consume(d)}var b=this.editorUi.editor.graph,e=null;mxEvent.addListener(a,"blur",
 d);mxEvent.addListener(a,"change",d);mxEvent.addListener(a,"focus",function(){e=a.value});return d};
@@ -2871,45 +2873,45 @@ g.style.margin="0px";this.addArrow(g);g.style.width="192px";g.style.height="15px
 "0px";this.addArrow(k);k.style.width="192px";k.style.height="15px";mxClient.IS_FF&&(k.getElementsByTagName("div")[0].style.marginTop="-18px");g=f.cloneNode(!1);g.style.marginLeft="-3px";var l=this.editorUi.toolbar.addItems(["bold","italic","underline"],g,!0);l[0].setAttribute("title",mxResources.get("bold")+" ("+this.editorUi.actions.get("bold").shortcut+")");l[1].setAttribute("title",mxResources.get("italic")+" ("+this.editorUi.actions.get("italic").shortcut+")");l[2].setAttribute("title",mxResources.get("underline")+
 " ("+this.editorUi.actions.get("underline").shortcut+")");var m=this.editorUi.toolbar.addItems(["vertical"],g,!0)[0];mxClient.IS_QUIRKS&&mxUtils.br(a);a.appendChild(g);this.styleButtons(l);this.styleButtons([m]);var n=f.cloneNode(!1);n.style.marginLeft="-3px";n.style.paddingBottom="0px";var p=this.editorUi.toolbar.addButton("geSprite-left",mxResources.get("left"),b.cellEditor.isContentEditing()?function(){document.execCommand("justifyleft",!1,null)}:this.editorUi.menus.createStyleChangeFunction([mxConstants.STYLE_ALIGN],
 [mxConstants.ALIGN_LEFT]),n),q=this.editorUi.toolbar.addButton("geSprite-center",mxResources.get("center"),b.cellEditor.isContentEditing()?function(){document.execCommand("justifycenter",!1,null)}:this.editorUi.menus.createStyleChangeFunction([mxConstants.STYLE_ALIGN],[mxConstants.ALIGN_CENTER]),n),r=this.editorUi.toolbar.addButton("geSprite-right",mxResources.get("right"),b.cellEditor.isContentEditing()?function(){document.execCommand("justifyright",!1,null)}:this.editorUi.menus.createStyleChangeFunction([mxConstants.STYLE_ALIGN],
-[mxConstants.ALIGN_RIGHT]),n);this.styleButtons([p,q,r]);if(b.cellEditor.isContentEditing()){var t=this.editorUi.toolbar.addButton("geSprite-removeformat",mxResources.get("removeFormat"),function(){document.execCommand("removeformat",!1,null)},g);this.styleButtons([t])}var u=this.editorUi.toolbar.addButton("geSprite-top",mxResources.get("top"),this.editorUi.menus.createStyleChangeFunction([mxConstants.STYLE_VERTICAL_ALIGN],[mxConstants.ALIGN_TOP]),n),w=this.editorUi.toolbar.addButton("geSprite-middle",
-mxResources.get("middle"),this.editorUi.menus.createStyleChangeFunction([mxConstants.STYLE_VERTICAL_ALIGN],[mxConstants.ALIGN_MIDDLE]),n),v=this.editorUi.toolbar.addButton("geSprite-bottom",mxResources.get("bottom"),this.editorUi.menus.createStyleChangeFunction([mxConstants.STYLE_VERTICAL_ALIGN],[mxConstants.ALIGN_BOTTOM]),n);this.styleButtons([u,w,v]);mxClient.IS_QUIRKS&&mxUtils.br(a);a.appendChild(n);var A,x,C,B,y,J,K;b.cellEditor.isContentEditing()?(u.style.display="none",w.style.display="none",
-v.style.display="none",m.style.display="none",C=this.editorUi.toolbar.addButton("geSprite-justifyfull",null,function(){document.execCommand("justifyfull",!1,null)},n),this.styleButtons([C,A=this.editorUi.toolbar.addButton("geSprite-subscript",mxResources.get("subscript")+" ("+Editor.ctrlKey+"+,)",function(){document.execCommand("subscript",!1,null)},n),x=this.editorUi.toolbar.addButton("geSprite-superscript",mxResources.get("superscript")+" ("+Editor.ctrlKey+"+.)",function(){document.execCommand("superscript",
-!1,null)},n)]),C.style.marginRight="9px",t=n.cloneNode(!1),t.style.paddingTop="4px",n=[this.editorUi.toolbar.addButton("geSprite-orderedlist",mxResources.get("numberedList"),function(){document.execCommand("insertorderedlist",!1,null)},t),this.editorUi.toolbar.addButton("geSprite-unorderedlist",mxResources.get("bulletedList"),function(){document.execCommand("insertunorderedlist",!1,null)},t),this.editorUi.toolbar.addButton("geSprite-outdent",mxResources.get("decreaseIndent"),function(){document.execCommand("outdent",
+[mxConstants.ALIGN_RIGHT]),n);this.styleButtons([p,q,r]);if(b.cellEditor.isContentEditing()){var t=this.editorUi.toolbar.addButton("geSprite-removeformat",mxResources.get("removeFormat"),function(){document.execCommand("removeformat",!1,null)},g);this.styleButtons([t])}var w=this.editorUi.toolbar.addButton("geSprite-top",mxResources.get("top"),this.editorUi.menus.createStyleChangeFunction([mxConstants.STYLE_VERTICAL_ALIGN],[mxConstants.ALIGN_TOP]),n),u=this.editorUi.toolbar.addButton("geSprite-middle",
+mxResources.get("middle"),this.editorUi.menus.createStyleChangeFunction([mxConstants.STYLE_VERTICAL_ALIGN],[mxConstants.ALIGN_MIDDLE]),n),v=this.editorUi.toolbar.addButton("geSprite-bottom",mxResources.get("bottom"),this.editorUi.menus.createStyleChangeFunction([mxConstants.STYLE_VERTICAL_ALIGN],[mxConstants.ALIGN_BOTTOM]),n);this.styleButtons([w,u,v]);mxClient.IS_QUIRKS&&mxUtils.br(a);a.appendChild(n);var A,x,B,C,y,I,L;b.cellEditor.isContentEditing()?(w.style.display="none",u.style.display="none",
+v.style.display="none",m.style.display="none",B=this.editorUi.toolbar.addButton("geSprite-justifyfull",null,function(){document.execCommand("justifyfull",!1,null)},n),this.styleButtons([B,A=this.editorUi.toolbar.addButton("geSprite-subscript",mxResources.get("subscript")+" ("+Editor.ctrlKey+"+,)",function(){document.execCommand("subscript",!1,null)},n),x=this.editorUi.toolbar.addButton("geSprite-superscript",mxResources.get("superscript")+" ("+Editor.ctrlKey+"+.)",function(){document.execCommand("superscript",
+!1,null)},n)]),B.style.marginRight="9px",t=n.cloneNode(!1),t.style.paddingTop="4px",n=[this.editorUi.toolbar.addButton("geSprite-orderedlist",mxResources.get("numberedList"),function(){document.execCommand("insertorderedlist",!1,null)},t),this.editorUi.toolbar.addButton("geSprite-unorderedlist",mxResources.get("bulletedList"),function(){document.execCommand("insertunorderedlist",!1,null)},t),this.editorUi.toolbar.addButton("geSprite-outdent",mxResources.get("decreaseIndent"),function(){document.execCommand("outdent",
 !1,null)},t),this.editorUi.toolbar.addButton("geSprite-indent",mxResources.get("increaseIndent"),function(){document.execCommand("indent",!1,null)},t),this.editorUi.toolbar.addButton("geSprite-code",mxResources.get("html"),function(){b.cellEditor.toggleViewMode()},t)],this.styleButtons(n),n[n.length-1].style.marginLeft="9px",mxClient.IS_QUIRKS&&(mxUtils.br(a),t.style.height="40"),a.appendChild(t)):(l[2].style.marginRight="9px",r.style.marginRight="9px");n=f.cloneNode(!1);n.style.marginLeft="0px";
-n.style.paddingTop="8px";n.style.paddingBottom="4px";n.style.fontWeight="normal";mxUtils.write(n,mxResources.get("position"));var I=document.createElement("select");I.style.position="absolute";I.style.right="20px";I.style.width="97px";I.style.marginTop="-2px";for(var F="topLeft top topRight left center right bottomLeft bottom bottomRight".split(" "),E={topLeft:[mxConstants.ALIGN_LEFT,mxConstants.ALIGN_TOP,mxConstants.ALIGN_RIGHT,mxConstants.ALIGN_BOTTOM],top:[mxConstants.ALIGN_CENTER,mxConstants.ALIGN_TOP,
+n.style.paddingTop="8px";n.style.paddingBottom="4px";n.style.fontWeight="normal";mxUtils.write(n,mxResources.get("position"));var J=document.createElement("select");J.style.position="absolute";J.style.right="20px";J.style.width="97px";J.style.marginTop="-2px";for(var G="topLeft top topRight left center right bottomLeft bottom bottomRight".split(" "),D={topLeft:[mxConstants.ALIGN_LEFT,mxConstants.ALIGN_TOP,mxConstants.ALIGN_RIGHT,mxConstants.ALIGN_BOTTOM],top:[mxConstants.ALIGN_CENTER,mxConstants.ALIGN_TOP,
 mxConstants.ALIGN_CENTER,mxConstants.ALIGN_BOTTOM],topRight:[mxConstants.ALIGN_RIGHT,mxConstants.ALIGN_TOP,mxConstants.ALIGN_LEFT,mxConstants.ALIGN_BOTTOM],left:[mxConstants.ALIGN_LEFT,mxConstants.ALIGN_MIDDLE,mxConstants.ALIGN_RIGHT,mxConstants.ALIGN_MIDDLE],center:[mxConstants.ALIGN_CENTER,mxConstants.ALIGN_MIDDLE,mxConstants.ALIGN_CENTER,mxConstants.ALIGN_MIDDLE],right:[mxConstants.ALIGN_RIGHT,mxConstants.ALIGN_MIDDLE,mxConstants.ALIGN_LEFT,mxConstants.ALIGN_MIDDLE],bottomLeft:[mxConstants.ALIGN_LEFT,
-mxConstants.ALIGN_BOTTOM,mxConstants.ALIGN_RIGHT,mxConstants.ALIGN_TOP],bottom:[mxConstants.ALIGN_CENTER,mxConstants.ALIGN_BOTTOM,mxConstants.ALIGN_CENTER,mxConstants.ALIGN_TOP],bottomRight:[mxConstants.ALIGN_RIGHT,mxConstants.ALIGN_BOTTOM,mxConstants.ALIGN_LEFT,mxConstants.ALIGN_TOP]},t=0;t<F.length;t++){var N=document.createElement("option");N.setAttribute("value",F[t]);mxUtils.write(N,mxResources.get(F[t]));I.appendChild(N)}n.appendChild(I);F=f.cloneNode(!1);F.style.marginLeft="0px";F.style.paddingTop=
-"4px";F.style.paddingBottom="4px";F.style.fontWeight="normal";mxUtils.write(F,mxResources.get("writingDirection"));var M=document.createElement("select");M.style.position="absolute";M.style.right="20px";M.style.width="97px";M.style.marginTop="-2px";for(var N=["automatic","leftToRight","rightToLeft"],Q={automatic:null,leftToRight:mxConstants.TEXT_DIRECTION_LTR,rightToLeft:mxConstants.TEXT_DIRECTION_RTL},t=0;t<N.length;t++){var O=document.createElement("option");O.setAttribute("value",N[t]);mxUtils.write(O,
-mxResources.get(N[t]));M.appendChild(O)}F.appendChild(M);b.isEditing()||(a.appendChild(n),mxEvent.addListener(I,"change",function(a){b.getModel().beginUpdate();try{var c=E[I.value];null!=c&&(b.setCellStyles(mxConstants.STYLE_LABEL_POSITION,c[0],b.getSelectionCells()),b.setCellStyles(mxConstants.STYLE_VERTICAL_LABEL_POSITION,c[1],b.getSelectionCells()),b.setCellStyles(mxConstants.STYLE_ALIGN,c[2],b.getSelectionCells()),b.setCellStyles(mxConstants.STYLE_VERTICAL_ALIGN,c[3],b.getSelectionCells()))}finally{b.getModel().endUpdate()}mxEvent.consume(a)}),
-a.appendChild(F),mxEvent.addListener(M,"change",function(a){b.setCellStyles(mxConstants.STYLE_TEXT_DIRECTION,Q[M.value],b.getSelectionCells());mxEvent.consume(a)}));var G=document.createElement("input");G.style.textAlign="right";G.style.marginTop="4px";mxClient.IS_QUIRKS||(G.style.position="absolute",G.style.right="32px");G.style.width="46px";G.style.height=mxClient.IS_QUIRKS?"21px":"17px";g.appendChild(G);var D=null,n=this.installInputHandler(G,mxConstants.STYLE_FONTSIZE,Menus.prototype.defaultFontSize,
-1,999," pt",function(a){D=a;document.execCommand("fontSize",!1,"4");a=b.cellEditor.textarea.getElementsByTagName("font");for(var c=0;c<a.length;c++)if("4"==a[c].getAttribute("size")){a[c].removeAttribute("size");a[c].style.fontSize=D+"px";window.setTimeout(function(){G.value=D+" pt";D=null},0);break}},!0),n=this.createStepper(G,n,1,10,!0,Menus.prototype.defaultFontSize);n.style.display=G.style.display;n.style.marginTop="4px";mxClient.IS_QUIRKS||(n.style.right="20px");g.appendChild(n);g=k.getElementsByTagName("div")[0];
-g.style.cssFloat="right";var H=null,z="#ffffff",P=null,V="#000000",Z=b.cellEditor.isContentEditing()?this.createColorOption(mxResources.get("backgroundColor"),function(){return z},function(a){document.execCommand("backcolor",!1,a!=mxConstants.NONE?a:"transparent")},"#ffffff",{install:function(a){H=a},destroy:function(){H=null}},null,!0):this.createCellColorOption(mxResources.get("backgroundColor"),mxConstants.STYLE_LABEL_BACKGROUNDCOLOR,"#ffffff");Z.style.fontWeight="bold";var S=this.createCellColorOption(mxResources.get("borderColor"),
-mxConstants.STYLE_LABEL_BORDERCOLOR,"#000000");S.style.fontWeight="bold";g=b.cellEditor.isContentEditing()?this.createColorOption(mxResources.get("fontColor"),function(){return V},function(a){document.execCommand("forecolor",!1,a!=mxConstants.NONE?a:"transparent")},"#000000",{install:function(a){P=a},destroy:function(){P=null}},null,!0):this.createCellColorOption(mxResources.get("fontColor"),mxConstants.STYLE_FONTCOLOR,"#000000",function(a){Z.style.display=null==a||a==mxConstants.NONE?"none":"";S.style.display=
-Z.style.display},function(a){null==a||a==mxConstants.NONE?b.setCellStyles(mxConstants.STYLE_NOLABEL,"1",b.getSelectionCells()):b.setCellStyles(mxConstants.STYLE_NOLABEL,null,b.getSelectionCells())});g.style.fontWeight="bold";h.appendChild(g);h.appendChild(Z);b.cellEditor.isContentEditing()||h.appendChild(S);a.appendChild(h);h=this.createPanel();h.style.paddingTop="2px";h.style.paddingBottom="4px";g=this.createCellOption(mxResources.get("wordWrap"),mxConstants.STYLE_WHITE_SPACE,null,"wrap","null",
-null,null,!0);g.style.fontWeight="bold";e.containsLabel||e.autoSize||0!=e.edges.length||h.appendChild(g);g=this.createCellOption(mxResources.get("formattedText"),"html","0",null,null,null,d.actions.get("formattedText"));g.style.fontWeight="bold";h.appendChild(g);g=this.createPanel();g.style.paddingTop="10px";g.style.paddingBottom="28px";g.style.fontWeight="normal";n=document.createElement("div");n.style.position="absolute";n.style.width="70px";n.style.marginTop="0px";n.style.fontWeight="bold";mxUtils.write(n,
-mxResources.get("spacing"));g.appendChild(n);var T,ia,aa,ja,ka,W=this.addUnitInput(g,"pt",91,44,function(){T.apply(this,arguments)}),X=this.addUnitInput(g,"pt",20,44,function(){ia.apply(this,arguments)});mxUtils.br(g);this.addLabel(g,mxResources.get("top"),91);this.addLabel(g,mxResources.get("global"),20);mxUtils.br(g);mxUtils.br(g);var ba=this.addUnitInput(g,"pt",162,44,function(){aa.apply(this,arguments)}),ca=this.addUnitInput(g,"pt",91,44,function(){ja.apply(this,arguments)}),da=this.addUnitInput(g,
-"pt",20,44,function(){ka.apply(this,arguments)});mxUtils.br(g);this.addLabel(g,mxResources.get("left"),162);this.addLabel(g,mxResources.get("bottom"),91);this.addLabel(g,mxResources.get("right"),20);if(b.cellEditor.isContentEditing()){var ea=null,oa=null;a.appendChild(this.createRelativeOption(mxResources.get("lineheight"),null,null,function(a){var c=""==a.value?120:parseInt(a.value),c=Math.max(0,isNaN(c)?120:c);null!=ea&&(b.cellEditor.restoreSelection(ea),ea=null);for(var d=b.getSelectedElement();null!=
-d&&d.nodeType!=mxConstants.NODETYPE_ELEMENT;)d=d.parentNode;null!=d&&d==b.cellEditor.textarea&&null!=b.cellEditor.textarea.firstChild&&("P"!=b.cellEditor.textarea.firstChild.nodeName&&(b.cellEditor.textarea.innerHTML="<p>"+b.cellEditor.textarea.innerHTML+"</p>"),d=b.cellEditor.textarea.firstChild);null!=d&&d!=b.cellEditor.textarea&&(d.style.lineHeight=c+"%");a.value=c+" %"},function(a){oa=a;mxEvent.addListener(a,"mousedown",function(){ea=b.cellEditor.saveSelection()});mxEvent.addListener(a,"touchstart",
-function(){ea=b.cellEditor.saveSelection()});a.value="120 %"}));h=f.cloneNode(!1);h.style.paddingLeft="0px";g=this.editorUi.toolbar.addItems(["link","image"],h,!0);n=[this.editorUi.toolbar.addButton("geSprite-horizontalrule",mxResources.get("insertHorizontalRule"),function(){document.execCommand("inserthorizontalrule",!1,null)},h),this.editorUi.toolbar.addMenuFunctionInContainer(h,"geSprite-table",mxResources.get("table"),!1,mxUtils.bind(this,function(a){this.editorUi.menus.addInsertTableItem(a)}))];
-this.styleButtons(g);this.styleButtons(n);g=this.createPanel();g.style.paddingTop="10px";g.style.paddingBottom="10px";g.appendChild(this.createTitle(mxResources.get("insert")));g.appendChild(h);a.appendChild(g);mxClient.IS_QUIRKS&&(g.style.height="70");g=f.cloneNode(!1);g.style.paddingLeft="0px";n=[this.editorUi.toolbar.addButton("geSprite-insertcolumnbefore",mxResources.get("insertColumnBefore"),function(){try{null!=y&&b.selectNode(b.insertColumn(y,null!=J?J.cellIndex:0))}catch(R){alert(R)}},g),
-this.editorUi.toolbar.addButton("geSprite-insertcolumnafter",mxResources.get("insertColumnAfter"),function(){try{null!=y&&b.selectNode(b.insertColumn(y,null!=J?J.cellIndex+1:-1))}catch(R){alert(R)}},g),this.editorUi.toolbar.addButton("geSprite-deletecolumn",mxResources.get("deleteColumn"),function(){try{null!=y&&null!=J&&b.deleteColumn(y,J.cellIndex)}catch(R){alert(R)}},g),this.editorUi.toolbar.addButton("geSprite-insertrowbefore",mxResources.get("insertRowBefore"),function(){try{null!=y&&null!=K&&
-b.selectNode(b.insertRow(y,K.sectionRowIndex))}catch(R){alert(R)}},g),this.editorUi.toolbar.addButton("geSprite-insertrowafter",mxResources.get("insertRowAfter"),function(){try{null!=y&&null!=K&&b.selectNode(b.insertRow(y,K.sectionRowIndex+1))}catch(R){alert(R)}},g),this.editorUi.toolbar.addButton("geSprite-deleterow",mxResources.get("deleteRow"),function(){try{null!=y&&null!=K&&b.deleteRow(y,K.sectionRowIndex)}catch(R){alert(R)}},g)];this.styleButtons(n);n[2].style.marginRight="9px";h=this.createPanel();
+mxConstants.ALIGN_BOTTOM,mxConstants.ALIGN_RIGHT,mxConstants.ALIGN_TOP],bottom:[mxConstants.ALIGN_CENTER,mxConstants.ALIGN_BOTTOM,mxConstants.ALIGN_CENTER,mxConstants.ALIGN_TOP],bottomRight:[mxConstants.ALIGN_RIGHT,mxConstants.ALIGN_BOTTOM,mxConstants.ALIGN_LEFT,mxConstants.ALIGN_TOP]},t=0;t<G.length;t++){var K=document.createElement("option");K.setAttribute("value",G[t]);mxUtils.write(K,mxResources.get(G[t]));J.appendChild(K)}n.appendChild(J);G=f.cloneNode(!1);G.style.marginLeft="0px";G.style.paddingTop=
+"4px";G.style.paddingBottom="4px";G.style.fontWeight="normal";mxUtils.write(G,mxResources.get("writingDirection"));var N=document.createElement("select");N.style.position="absolute";N.style.right="20px";N.style.width="97px";N.style.marginTop="-2px";for(var K=["automatic","leftToRight","rightToLeft"],P={automatic:null,leftToRight:mxConstants.TEXT_DIRECTION_LTR,rightToLeft:mxConstants.TEXT_DIRECTION_RTL},t=0;t<K.length;t++){var O=document.createElement("option");O.setAttribute("value",K[t]);mxUtils.write(O,
+mxResources.get(K[t]));N.appendChild(O)}G.appendChild(N);b.isEditing()||(a.appendChild(n),mxEvent.addListener(J,"change",function(a){b.getModel().beginUpdate();try{var c=D[J.value];null!=c&&(b.setCellStyles(mxConstants.STYLE_LABEL_POSITION,c[0],b.getSelectionCells()),b.setCellStyles(mxConstants.STYLE_VERTICAL_LABEL_POSITION,c[1],b.getSelectionCells()),b.setCellStyles(mxConstants.STYLE_ALIGN,c[2],b.getSelectionCells()),b.setCellStyles(mxConstants.STYLE_VERTICAL_ALIGN,c[3],b.getSelectionCells()))}finally{b.getModel().endUpdate()}mxEvent.consume(a)}),
+a.appendChild(G),mxEvent.addListener(N,"change",function(a){b.setCellStyles(mxConstants.STYLE_TEXT_DIRECTION,P[N.value],b.getSelectionCells());mxEvent.consume(a)}));var F=document.createElement("input");F.style.textAlign="right";F.style.marginTop="4px";mxClient.IS_QUIRKS||(F.style.position="absolute",F.style.right="32px");F.style.width="46px";F.style.height=mxClient.IS_QUIRKS?"21px":"17px";g.appendChild(F);var E=null,n=this.installInputHandler(F,mxConstants.STYLE_FONTSIZE,Menus.prototype.defaultFontSize,
+1,999," pt",function(a){E=a;document.execCommand("fontSize",!1,"4");a=b.cellEditor.textarea.getElementsByTagName("font");for(var c=0;c<a.length;c++)if("4"==a[c].getAttribute("size")){a[c].removeAttribute("size");a[c].style.fontSize=E+"px";window.setTimeout(function(){F.value=E+" pt";E=null},0);break}},!0),n=this.createStepper(F,n,1,10,!0,Menus.prototype.defaultFontSize);n.style.display=F.style.display;n.style.marginTop="4px";mxClient.IS_QUIRKS||(n.style.right="20px");g.appendChild(n);g=k.getElementsByTagName("div")[0];
+g.style.cssFloat="right";var H=null,z="#ffffff",Q=null,S="#000000",T=b.cellEditor.isContentEditing()?this.createColorOption(mxResources.get("backgroundColor"),function(){return z},function(a){document.execCommand("backcolor",!1,a!=mxConstants.NONE?a:"transparent")},"#ffffff",{install:function(a){H=a},destroy:function(){H=null}},null,!0):this.createCellColorOption(mxResources.get("backgroundColor"),mxConstants.STYLE_LABEL_BACKGROUNDCOLOR,"#ffffff");T.style.fontWeight="bold";var aa=this.createCellColorOption(mxResources.get("borderColor"),
+mxConstants.STYLE_LABEL_BORDERCOLOR,"#000000");aa.style.fontWeight="bold";g=b.cellEditor.isContentEditing()?this.createColorOption(mxResources.get("fontColor"),function(){return S},function(a){document.execCommand("forecolor",!1,a!=mxConstants.NONE?a:"transparent")},"#000000",{install:function(a){Q=a},destroy:function(){Q=null}},null,!0):this.createCellColorOption(mxResources.get("fontColor"),mxConstants.STYLE_FONTCOLOR,"#000000",function(a){T.style.display=null==a||a==mxConstants.NONE?"none":"";
+aa.style.display=T.style.display},function(a){null==a||a==mxConstants.NONE?b.setCellStyles(mxConstants.STYLE_NOLABEL,"1",b.getSelectionCells()):b.setCellStyles(mxConstants.STYLE_NOLABEL,null,b.getSelectionCells())});g.style.fontWeight="bold";h.appendChild(g);h.appendChild(T);b.cellEditor.isContentEditing()||h.appendChild(aa);a.appendChild(h);h=this.createPanel();h.style.paddingTop="2px";h.style.paddingBottom="4px";g=this.createCellOption(mxResources.get("wordWrap"),mxConstants.STYLE_WHITE_SPACE,null,
+"wrap","null",null,null,!0);g.style.fontWeight="bold";e.containsLabel||e.autoSize||0!=e.edges.length||h.appendChild(g);g=this.createCellOption(mxResources.get("formattedText"),"html","0",null,null,null,d.actions.get("formattedText"));g.style.fontWeight="bold";h.appendChild(g);g=this.createPanel();g.style.paddingTop="10px";g.style.paddingBottom="28px";g.style.fontWeight="normal";n=document.createElement("div");n.style.position="absolute";n.style.width="70px";n.style.marginTop="0px";n.style.fontWeight=
+"bold";mxUtils.write(n,mxResources.get("spacing"));g.appendChild(n);var W,U,ia,ba,ja,ca=this.addUnitInput(g,"pt",91,44,function(){W.apply(this,arguments)}),X=this.addUnitInput(g,"pt",20,44,function(){U.apply(this,arguments)});mxUtils.br(g);this.addLabel(g,mxResources.get("top"),91);this.addLabel(g,mxResources.get("global"),20);mxUtils.br(g);mxUtils.br(g);var Y=this.addUnitInput(g,"pt",162,44,function(){ia.apply(this,arguments)}),da=this.addUnitInput(g,"pt",91,44,function(){ba.apply(this,arguments)}),
+ea=this.addUnitInput(g,"pt",20,44,function(){ja.apply(this,arguments)});mxUtils.br(g);this.addLabel(g,mxResources.get("left"),162);this.addLabel(g,mxResources.get("bottom"),91);this.addLabel(g,mxResources.get("right"),20);if(b.cellEditor.isContentEditing()){var Z=null,na=null;a.appendChild(this.createRelativeOption(mxResources.get("lineheight"),null,null,function(a){var c=""==a.value?120:parseInt(a.value),c=Math.max(0,isNaN(c)?120:c);null!=Z&&(b.cellEditor.restoreSelection(Z),Z=null);for(var d=b.getSelectedElement();null!=
+d&&d.nodeType!=mxConstants.NODETYPE_ELEMENT;)d=d.parentNode;null!=d&&d==b.cellEditor.textarea&&null!=b.cellEditor.textarea.firstChild&&("P"!=b.cellEditor.textarea.firstChild.nodeName&&(b.cellEditor.textarea.innerHTML="<p>"+b.cellEditor.textarea.innerHTML+"</p>"),d=b.cellEditor.textarea.firstChild);null!=d&&d!=b.cellEditor.textarea&&(d.style.lineHeight=c+"%");a.value=c+" %"},function(a){na=a;mxEvent.addListener(a,"mousedown",function(){Z=b.cellEditor.saveSelection()});mxEvent.addListener(a,"touchstart",
+function(){Z=b.cellEditor.saveSelection()});a.value="120 %"}));h=f.cloneNode(!1);h.style.paddingLeft="0px";g=this.editorUi.toolbar.addItems(["link","image"],h,!0);n=[this.editorUi.toolbar.addButton("geSprite-horizontalrule",mxResources.get("insertHorizontalRule"),function(){document.execCommand("inserthorizontalrule",!1,null)},h),this.editorUi.toolbar.addMenuFunctionInContainer(h,"geSprite-table",mxResources.get("table"),!1,mxUtils.bind(this,function(a){this.editorUi.menus.addInsertTableItem(a)}))];
+this.styleButtons(g);this.styleButtons(n);g=this.createPanel();g.style.paddingTop="10px";g.style.paddingBottom="10px";g.appendChild(this.createTitle(mxResources.get("insert")));g.appendChild(h);a.appendChild(g);mxClient.IS_QUIRKS&&(g.style.height="70");g=f.cloneNode(!1);g.style.paddingLeft="0px";n=[this.editorUi.toolbar.addButton("geSprite-insertcolumnbefore",mxResources.get("insertColumnBefore"),function(){try{null!=y&&b.selectNode(b.insertColumn(y,null!=I?I.cellIndex:0))}catch(R){alert(R)}},g),
+this.editorUi.toolbar.addButton("geSprite-insertcolumnafter",mxResources.get("insertColumnAfter"),function(){try{null!=y&&b.selectNode(b.insertColumn(y,null!=I?I.cellIndex+1:-1))}catch(R){alert(R)}},g),this.editorUi.toolbar.addButton("geSprite-deletecolumn",mxResources.get("deleteColumn"),function(){try{null!=y&&null!=I&&b.deleteColumn(y,I.cellIndex)}catch(R){alert(R)}},g),this.editorUi.toolbar.addButton("geSprite-insertrowbefore",mxResources.get("insertRowBefore"),function(){try{null!=y&&null!=L&&
+b.selectNode(b.insertRow(y,L.sectionRowIndex))}catch(R){alert(R)}},g),this.editorUi.toolbar.addButton("geSprite-insertrowafter",mxResources.get("insertRowAfter"),function(){try{null!=y&&null!=L&&b.selectNode(b.insertRow(y,L.sectionRowIndex+1))}catch(R){alert(R)}},g),this.editorUi.toolbar.addButton("geSprite-deleterow",mxResources.get("deleteRow"),function(){try{null!=y&&null!=L&&b.deleteRow(y,L.sectionRowIndex)}catch(R){alert(R)}},g)];this.styleButtons(n);n[2].style.marginRight="9px";h=this.createPanel();
 h.style.paddingTop="10px";h.style.paddingBottom="10px";h.appendChild(this.createTitle(mxResources.get("table")));h.appendChild(g);mxClient.IS_QUIRKS&&(mxUtils.br(a),h.style.height="70");f=f.cloneNode(!1);f.style.paddingLeft="0px";n=[this.editorUi.toolbar.addButton("geSprite-strokecolor",mxResources.get("borderColor"),mxUtils.bind(this,function(){if(null!=y){var a=y.style.borderColor.replace(/\brgb\s*\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*\)/g,function(a,b,c,d){return"#"+("0"+Number(b).toString(16)).substr(-2)+
 ("0"+Number(c).toString(16)).substr(-2)+("0"+Number(d).toString(16)).substr(-2)});this.editorUi.pickColor(a,function(a){null==a||a==mxConstants.NONE?(y.removeAttribute("border"),y.style.border="",y.style.borderCollapse=""):(y.setAttribute("border","1"),y.style.border="1px solid "+a,y.style.borderCollapse="collapse")})}}),f),this.editorUi.toolbar.addButton("geSprite-fillcolor",mxResources.get("backgroundColor"),mxUtils.bind(this,function(){if(null!=y){var a=y.style.backgroundColor.replace(/\brgb\s*\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*\)/g,
 function(a,b,c,d){return"#"+("0"+Number(b).toString(16)).substr(-2)+("0"+Number(c).toString(16)).substr(-2)+("0"+Number(d).toString(16)).substr(-2)});this.editorUi.pickColor(a,function(a){y.style.backgroundColor=null==a||a==mxConstants.NONE?"":a})}}),f),this.editorUi.toolbar.addButton("geSprite-fit",mxResources.get("spacing"),function(){if(null!=y){var a=y.getAttribute("cellPadding")||0,a=new FilenameDialog(d,a,mxResources.get("apply"),mxUtils.bind(this,function(a){null!=a&&0<a.length?y.setAttribute("cellPadding",
 a):y.removeAttribute("cellPadding")}),mxResources.get("spacing"));d.showDialog(a.container,300,80,!0,!0);a.init()}},f),this.editorUi.toolbar.addButton("geSprite-left",mxResources.get("left"),function(){null!=y&&y.setAttribute("align","left")},f),this.editorUi.toolbar.addButton("geSprite-center",mxResources.get("center"),function(){null!=y&&y.setAttribute("align","center")},f),this.editorUi.toolbar.addButton("geSprite-right",mxResources.get("right"),function(){null!=y&&y.setAttribute("align","right")},
-f)];this.styleButtons(n);n[2].style.marginRight="9px";mxClient.IS_QUIRKS&&(mxUtils.br(h),mxUtils.br(h));h.appendChild(f);a.appendChild(h);B=h}else a.appendChild(h),a.appendChild(this.createRelativeOption(mxResources.get("opacity"),mxConstants.STYLE_TEXT_OPACITY)),a.appendChild(g);var U=mxUtils.bind(this,function(a,b,d){e=this.format.getSelectionState();a=mxUtils.getValue(e.style,mxConstants.STYLE_FONTSTYLE,0);c(l[0],(a&mxConstants.FONT_BOLD)==mxConstants.FONT_BOLD);c(l[1],(a&mxConstants.FONT_ITALIC)==
-mxConstants.FONT_ITALIC);c(l[2],(a&mxConstants.FONT_UNDERLINE)==mxConstants.FONT_UNDERLINE);k.firstChild.nodeValue=mxUtils.htmlEntities(mxUtils.getValue(e.style,mxConstants.STYLE_FONTFAMILY,Menus.prototype.defaultFont));c(m,"0"==mxUtils.getValue(e.style,mxConstants.STYLE_HORIZONTAL,"1"));if(d||document.activeElement!=G)a=parseFloat(mxUtils.getValue(e.style,mxConstants.STYLE_FONTSIZE,Menus.prototype.defaultFontSize)),G.value=isNaN(a)?"":a+" pt";a=mxUtils.getValue(e.style,mxConstants.STYLE_ALIGN,mxConstants.ALIGN_CENTER);
-c(p,a==mxConstants.ALIGN_LEFT);c(q,a==mxConstants.ALIGN_CENTER);c(r,a==mxConstants.ALIGN_RIGHT);a=mxUtils.getValue(e.style,mxConstants.STYLE_VERTICAL_ALIGN,mxConstants.ALIGN_MIDDLE);c(u,a==mxConstants.ALIGN_TOP);c(w,a==mxConstants.ALIGN_MIDDLE);c(v,a==mxConstants.ALIGN_BOTTOM);a=mxUtils.getValue(e.style,mxConstants.STYLE_LABEL_POSITION,mxConstants.ALIGN_CENTER);b=mxUtils.getValue(e.style,mxConstants.STYLE_VERTICAL_LABEL_POSITION,mxConstants.ALIGN_MIDDLE);I.value=a==mxConstants.ALIGN_LEFT&&b==mxConstants.ALIGN_TOP?
+f)];this.styleButtons(n);n[2].style.marginRight="9px";mxClient.IS_QUIRKS&&(mxUtils.br(h),mxUtils.br(h));h.appendChild(f);a.appendChild(h);C=h}else a.appendChild(h),a.appendChild(this.createRelativeOption(mxResources.get("opacity"),mxConstants.STYLE_TEXT_OPACITY)),a.appendChild(g);var V=mxUtils.bind(this,function(a,b,d){e=this.format.getSelectionState();a=mxUtils.getValue(e.style,mxConstants.STYLE_FONTSTYLE,0);c(l[0],(a&mxConstants.FONT_BOLD)==mxConstants.FONT_BOLD);c(l[1],(a&mxConstants.FONT_ITALIC)==
+mxConstants.FONT_ITALIC);c(l[2],(a&mxConstants.FONT_UNDERLINE)==mxConstants.FONT_UNDERLINE);k.firstChild.nodeValue=mxUtils.htmlEntities(mxUtils.getValue(e.style,mxConstants.STYLE_FONTFAMILY,Menus.prototype.defaultFont));c(m,"0"==mxUtils.getValue(e.style,mxConstants.STYLE_HORIZONTAL,"1"));if(d||document.activeElement!=F)a=parseFloat(mxUtils.getValue(e.style,mxConstants.STYLE_FONTSIZE,Menus.prototype.defaultFontSize)),F.value=isNaN(a)?"":a+" pt";a=mxUtils.getValue(e.style,mxConstants.STYLE_ALIGN,mxConstants.ALIGN_CENTER);
+c(p,a==mxConstants.ALIGN_LEFT);c(q,a==mxConstants.ALIGN_CENTER);c(r,a==mxConstants.ALIGN_RIGHT);a=mxUtils.getValue(e.style,mxConstants.STYLE_VERTICAL_ALIGN,mxConstants.ALIGN_MIDDLE);c(w,a==mxConstants.ALIGN_TOP);c(u,a==mxConstants.ALIGN_MIDDLE);c(v,a==mxConstants.ALIGN_BOTTOM);a=mxUtils.getValue(e.style,mxConstants.STYLE_LABEL_POSITION,mxConstants.ALIGN_CENTER);b=mxUtils.getValue(e.style,mxConstants.STYLE_VERTICAL_LABEL_POSITION,mxConstants.ALIGN_MIDDLE);J.value=a==mxConstants.ALIGN_LEFT&&b==mxConstants.ALIGN_TOP?
 "topLeft":a==mxConstants.ALIGN_CENTER&&b==mxConstants.ALIGN_TOP?"top":a==mxConstants.ALIGN_RIGHT&&b==mxConstants.ALIGN_TOP?"topRight":a==mxConstants.ALIGN_LEFT&&b==mxConstants.ALIGN_BOTTOM?"bottomLeft":a==mxConstants.ALIGN_CENTER&&b==mxConstants.ALIGN_BOTTOM?"bottom":a==mxConstants.ALIGN_RIGHT&&b==mxConstants.ALIGN_BOTTOM?"bottomRight":a==mxConstants.ALIGN_LEFT?"left":a==mxConstants.ALIGN_RIGHT?"right":"center";a=mxUtils.getValue(e.style,mxConstants.STYLE_TEXT_DIRECTION,mxConstants.DEFAULT_TEXT_DIRECTION);
-a==mxConstants.TEXT_DIRECTION_RTL?M.value="rightToLeft":a==mxConstants.TEXT_DIRECTION_LTR?M.value="leftToRight":a==mxConstants.TEXT_DIRECTION_AUTO&&(M.value="automatic");if(d||document.activeElement!=X)a=parseFloat(mxUtils.getValue(e.style,mxConstants.STYLE_SPACING,2)),X.value=isNaN(a)?"":a+" pt";if(d||document.activeElement!=W)a=parseFloat(mxUtils.getValue(e.style,mxConstants.STYLE_SPACING_TOP,0)),W.value=isNaN(a)?"":a+" pt";if(d||document.activeElement!=da)a=parseFloat(mxUtils.getValue(e.style,
-mxConstants.STYLE_SPACING_RIGHT,0)),da.value=isNaN(a)?"":a+" pt";if(d||document.activeElement!=ca)a=parseFloat(mxUtils.getValue(e.style,mxConstants.STYLE_SPACING_BOTTOM,0)),ca.value=isNaN(a)?"":a+" pt";if(d||document.activeElement!=ba)a=parseFloat(mxUtils.getValue(e.style,mxConstants.STYLE_SPACING_LEFT,0)),ba.value=isNaN(a)?"":a+" pt"});ia=this.installInputHandler(X,mxConstants.STYLE_SPACING,2,-999,999," pt");T=this.installInputHandler(W,mxConstants.STYLE_SPACING_TOP,0,-999,999," pt");ka=this.installInputHandler(da,
-mxConstants.STYLE_SPACING_RIGHT,0,-999,999," pt");ja=this.installInputHandler(ca,mxConstants.STYLE_SPACING_BOTTOM,0,-999,999," pt");aa=this.installInputHandler(ba,mxConstants.STYLE_SPACING_LEFT,0,-999,999," pt");this.addKeyHandler(G,U);this.addKeyHandler(X,U);this.addKeyHandler(W,U);this.addKeyHandler(da,U);this.addKeyHandler(ca,U);this.addKeyHandler(ba,U);b.getModel().addListener(mxEvent.CHANGE,U);this.listeners.push({destroy:function(){b.getModel().removeListener(U)}});U();if(b.cellEditor.isContentEditing()){var la=
-!1,f=function(){la||(la=!0,window.setTimeout(function(){for(var a=b.getSelectedElement();null!=a&&a.nodeType!=mxConstants.NODETYPE_ELEMENT;)a=a.parentNode;if(null!=a){a==b.cellEditor.textarea&&1==b.cellEditor.textarea.children.length&&b.cellEditor.textarea.firstChild.nodeType==mxConstants.NODETYPE_ELEMENT&&(a=b.cellEditor.textarea.firstChild);var d=mxUtils.getCurrentStyle(a);if(null!=d){c(l[0],"bold"==d.fontWeight||null!=b.getParentByName(a,"B",b.cellEditor.textarea));c(l[1],"italic"==d.fontStyle||
-null!=b.getParentByName(a,"I",b.cellEditor.textarea));c(l[2],null!=b.getParentByName(a,"U",b.cellEditor.textarea));c(p,"left"==d.textAlign);c(q,"center"==d.textAlign);c(r,"right"==d.textAlign);c(C,"justify"==d.textAlign);c(x,null!=b.getParentByName(a,"SUP",b.cellEditor.textarea));c(A,null!=b.getParentByName(a,"SUB",b.cellEditor.textarea));y=b.getParentByName(a,"TABLE",b.cellEditor.textarea);K=null==y?null:b.getParentByName(a,"TR",y);J=null==y?null:b.getParentByName(a,"TD",y);B.style.display=null!=
-y?"":"none";if(document.activeElement!=G){"FONT"==a.nodeName&&"4"==a.getAttribute("size")&&null!=D?(a.removeAttribute("size"),a.style.fontSize=D+"px",D=null):G.value=parseFloat(d.fontSize)+" pt";var a=a.style.lineHeight||d.lineHeight,e=parseFloat(a);"px"==a.substring(a.length-2)&&(e/=parseFloat(d.fontSize));"%"!=a.substring(a.length-1)&&(e*=100);oa.value=e+" %"}a=d.color.replace(/\brgb\s*\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*\)/g,function(a,b,c,d){return"#"+("0"+Number(b).toString(16)).substr(-2)+
-("0"+Number(c).toString(16)).substr(-2)+("0"+Number(d).toString(16)).substr(-2)});e=d.backgroundColor.replace(/\brgb\s*\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*\)/g,function(a,b,c,d){return"#"+("0"+Number(b).toString(16)).substr(-2)+("0"+Number(c).toString(16)).substr(-2)+("0"+Number(d).toString(16)).substr(-2)});null!=P&&(V="#"==a.charAt(0)?a:"#000000",P(V,!0));null!=H&&(z="#"==e.charAt(0)?e:null,H(z,!0));null!=k.firstChild&&(d=d.fontFamily,"'"==d.charAt(0)&&(d=d.substring(1)),"'"==d.charAt(d.length-
-1)&&(d=d.substring(0,d.length-1)),'"'==d.charAt(0)&&(d=d.substring(1)),'"'==d.charAt(d.length-1)&&(d=d.substring(0,d.length-1)),k.firstChild.nodeValue=d)}}la=!1},0))};mxEvent.addListener(b.cellEditor.textarea,"input",f);mxEvent.addListener(b.cellEditor.textarea,"touchend",f);mxEvent.addListener(b.cellEditor.textarea,"mouseup",f);mxEvent.addListener(b.cellEditor.textarea,"keyup",f);this.listeners.push({destroy:function(){}});f()}return a};
+a==mxConstants.TEXT_DIRECTION_RTL?N.value="rightToLeft":a==mxConstants.TEXT_DIRECTION_LTR?N.value="leftToRight":a==mxConstants.TEXT_DIRECTION_AUTO&&(N.value="automatic");if(d||document.activeElement!=X)a=parseFloat(mxUtils.getValue(e.style,mxConstants.STYLE_SPACING,2)),X.value=isNaN(a)?"":a+" pt";if(d||document.activeElement!=ca)a=parseFloat(mxUtils.getValue(e.style,mxConstants.STYLE_SPACING_TOP,0)),ca.value=isNaN(a)?"":a+" pt";if(d||document.activeElement!=ea)a=parseFloat(mxUtils.getValue(e.style,
+mxConstants.STYLE_SPACING_RIGHT,0)),ea.value=isNaN(a)?"":a+" pt";if(d||document.activeElement!=da)a=parseFloat(mxUtils.getValue(e.style,mxConstants.STYLE_SPACING_BOTTOM,0)),da.value=isNaN(a)?"":a+" pt";if(d||document.activeElement!=Y)a=parseFloat(mxUtils.getValue(e.style,mxConstants.STYLE_SPACING_LEFT,0)),Y.value=isNaN(a)?"":a+" pt"});U=this.installInputHandler(X,mxConstants.STYLE_SPACING,2,-999,999," pt");W=this.installInputHandler(ca,mxConstants.STYLE_SPACING_TOP,0,-999,999," pt");ja=this.installInputHandler(ea,
+mxConstants.STYLE_SPACING_RIGHT,0,-999,999," pt");ba=this.installInputHandler(da,mxConstants.STYLE_SPACING_BOTTOM,0,-999,999," pt");ia=this.installInputHandler(Y,mxConstants.STYLE_SPACING_LEFT,0,-999,999," pt");this.addKeyHandler(F,V);this.addKeyHandler(X,V);this.addKeyHandler(ca,V);this.addKeyHandler(ea,V);this.addKeyHandler(da,V);this.addKeyHandler(Y,V);b.getModel().addListener(mxEvent.CHANGE,V);this.listeners.push({destroy:function(){b.getModel().removeListener(V)}});V();if(b.cellEditor.isContentEditing()){var ka=
+!1,f=function(){ka||(ka=!0,window.setTimeout(function(){for(var a=b.getSelectedElement();null!=a&&a.nodeType!=mxConstants.NODETYPE_ELEMENT;)a=a.parentNode;if(null!=a){a==b.cellEditor.textarea&&1==b.cellEditor.textarea.children.length&&b.cellEditor.textarea.firstChild.nodeType==mxConstants.NODETYPE_ELEMENT&&(a=b.cellEditor.textarea.firstChild);var d=mxUtils.getCurrentStyle(a);if(null!=d){c(l[0],"bold"==d.fontWeight||null!=b.getParentByName(a,"B",b.cellEditor.textarea));c(l[1],"italic"==d.fontStyle||
+null!=b.getParentByName(a,"I",b.cellEditor.textarea));c(l[2],null!=b.getParentByName(a,"U",b.cellEditor.textarea));c(p,"left"==d.textAlign);c(q,"center"==d.textAlign);c(r,"right"==d.textAlign);c(B,"justify"==d.textAlign);c(x,null!=b.getParentByName(a,"SUP",b.cellEditor.textarea));c(A,null!=b.getParentByName(a,"SUB",b.cellEditor.textarea));y=b.getParentByName(a,"TABLE",b.cellEditor.textarea);L=null==y?null:b.getParentByName(a,"TR",y);I=null==y?null:b.getParentByName(a,"TD",y);C.style.display=null!=
+y?"":"none";if(document.activeElement!=F){"FONT"==a.nodeName&&"4"==a.getAttribute("size")&&null!=E?(a.removeAttribute("size"),a.style.fontSize=E+"px",E=null):F.value=parseFloat(d.fontSize)+" pt";var a=a.style.lineHeight||d.lineHeight,e=parseFloat(a);"px"==a.substring(a.length-2)&&(e/=parseFloat(d.fontSize));"%"!=a.substring(a.length-1)&&(e*=100);na.value=e+" %"}a=d.color.replace(/\brgb\s*\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*\)/g,function(a,b,c,d){return"#"+("0"+Number(b).toString(16)).substr(-2)+
+("0"+Number(c).toString(16)).substr(-2)+("0"+Number(d).toString(16)).substr(-2)});e=d.backgroundColor.replace(/\brgb\s*\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*\)/g,function(a,b,c,d){return"#"+("0"+Number(b).toString(16)).substr(-2)+("0"+Number(c).toString(16)).substr(-2)+("0"+Number(d).toString(16)).substr(-2)});null!=Q&&(S="#"==a.charAt(0)?a:"#000000",Q(S,!0));null!=H&&(z="#"==e.charAt(0)?e:null,H(z,!0));null!=k.firstChild&&(d=d.fontFamily,"'"==d.charAt(0)&&(d=d.substring(1)),"'"==d.charAt(d.length-
+1)&&(d=d.substring(0,d.length-1)),'"'==d.charAt(0)&&(d=d.substring(1)),'"'==d.charAt(d.length-1)&&(d=d.substring(0,d.length-1)),k.firstChild.nodeValue=d)}}ka=!1},0))};mxEvent.addListener(b.cellEditor.textarea,"input",f);mxEvent.addListener(b.cellEditor.textarea,"touchend",f);mxEvent.addListener(b.cellEditor.textarea,"mouseup",f);mxEvent.addListener(b.cellEditor.textarea,"keyup",f);this.listeners.push({destroy:function(){}});f()}return a};
 StyleFormatPanel=function(a,c,d){BaseFormatPanel.call(this,a,c,d);this.init()};mxUtils.extend(StyleFormatPanel,BaseFormatPanel);
 StyleFormatPanel.prototype.init=function(){var a=this.format.getSelectionState();a.containsImage&&"image"!=a.style.shape||this.container.appendChild(this.addFill(this.createPanel()));this.container.appendChild(this.addStroke(this.createPanel()));this.container.appendChild(this.addLineJumps(this.createPanel()));a=this.createRelativeOption(mxResources.get("opacity"),mxConstants.STYLE_OPACITY,41);a.style.paddingTop="8px";a.style.paddingBottom="8px";this.container.appendChild(a);this.container.appendChild(this.addEffects(this.createPanel()));
 a=this.addEditOps(this.createPanel());null!=a.firstChild&&mxUtils.br(a);this.container.appendChild(this.addStyleOps(a))};
@@ -2919,8 +2921,8 @@ StyleFormatPanel.prototype.addFill=function(a){var c=this.editorUi.editor.graph,
 null==a||a==mxConstants.NONE?"none":""}),f="image"==d.style.shape?mxConstants.STYLE_IMAGE_BACKGROUND:mxConstants.STYLE_FILLCOLOR,h=this.createCellColorOption(mxResources.get("fill"),f,"#ffffff");h.style.fontWeight="bold";f=mxUtils.getValue(d.style,f,null);e.style.display=null!=f&&f!=mxConstants.NONE&&d.fill&&"image"!=d.style.shape?"":"none";for(var f=[mxConstants.DIRECTION_NORTH,mxConstants.DIRECTION_EAST,mxConstants.DIRECTION_SOUTH,mxConstants.DIRECTION_WEST],g=0;g<f.length;g++){var k=document.createElement("option");
 k.setAttribute("value",f[g]);mxUtils.write(k,mxResources.get(f[g]));b.appendChild(k)}e.appendChild(b);var l=mxUtils.bind(this,function(){d=this.format.getSelectionState();var c=mxUtils.getValue(d.style,mxConstants.STYLE_GRADIENT_DIRECTION,mxConstants.DIRECTION_SOUTH);""==c&&(c=mxConstants.DIRECTION_SOUTH);b.value=c;a.style.display=d.fill?"":"none";c=mxUtils.getValue(d.style,mxConstants.STYLE_FILLCOLOR,null);e.style.display=!d.fill||d.containsImage||null==c||c==mxConstants.NONE||"filledEdge"==d.style.shape?
 "none":""});c.getModel().addListener(mxEvent.CHANGE,l);this.listeners.push({destroy:function(){c.getModel().removeListener(l)}});l();mxEvent.addListener(b,"change",function(a){c.setCellStyles(mxConstants.STYLE_GRADIENT_DIRECTION,b.value,c.getSelectionCells());mxEvent.consume(a)});a.appendChild(h);a.appendChild(e);"swimlane"==d.style.shape&&a.appendChild(this.createCellColorOption(mxResources.get("laneColor"),"swimlaneFillColor","#ffffff"));return a};
-StyleFormatPanel.prototype.addStroke=function(a){function c(a){var c=parseInt(u.value),c=Math.min(999,Math.max(1,isNaN(c)?1:c));c!=mxUtils.getValue(f.style,mxConstants.STYLE_STROKEWIDTH,1)&&(e.setCellStyles(mxConstants.STYLE_STROKEWIDTH,c,e.getSelectionCells()),b.fireEvent(new mxEventObject("styleChanged","keys",[mxConstants.STYLE_STROKEWIDTH],"values",[c],"cells",e.getSelectionCells())));u.value=c+" pt";mxEvent.consume(a)}function d(a){var c=parseInt(w.value),c=Math.min(999,Math.max(1,isNaN(c)?1:
-c));c!=mxUtils.getValue(f.style,mxConstants.STYLE_STROKEWIDTH,1)&&(e.setCellStyles(mxConstants.STYLE_STROKEWIDTH,c,e.getSelectionCells()),b.fireEvent(new mxEventObject("styleChanged","keys",[mxConstants.STYLE_STROKEWIDTH],"values",[c],"cells",e.getSelectionCells())));w.value=c+" pt";mxEvent.consume(a)}var b=this.editorUi,e=b.editor.graph,f=this.format.getSelectionState();a.style.paddingTop="4px";a.style.paddingBottom="4px";a.style.whiteSpace="normal";var h=document.createElement("div");h.style.fontWeight=
+StyleFormatPanel.prototype.addStroke=function(a){function c(a){var c=parseInt(w.value),c=Math.min(999,Math.max(1,isNaN(c)?1:c));c!=mxUtils.getValue(f.style,mxConstants.STYLE_STROKEWIDTH,1)&&(e.setCellStyles(mxConstants.STYLE_STROKEWIDTH,c,e.getSelectionCells()),b.fireEvent(new mxEventObject("styleChanged","keys",[mxConstants.STYLE_STROKEWIDTH],"values",[c],"cells",e.getSelectionCells())));w.value=c+" pt";mxEvent.consume(a)}function d(a){var c=parseInt(u.value),c=Math.min(999,Math.max(1,isNaN(c)?1:
+c));c!=mxUtils.getValue(f.style,mxConstants.STYLE_STROKEWIDTH,1)&&(e.setCellStyles(mxConstants.STYLE_STROKEWIDTH,c,e.getSelectionCells()),b.fireEvent(new mxEventObject("styleChanged","keys",[mxConstants.STYLE_STROKEWIDTH],"values",[c],"cells",e.getSelectionCells())));u.value=c+" pt";mxEvent.consume(a)}var b=this.editorUi,e=b.editor.graph,f=this.format.getSelectionState();a.style.paddingTop="4px";a.style.paddingBottom="4px";a.style.whiteSpace="normal";var h=document.createElement("div");h.style.fontWeight=
 "bold";var g=document.createElement("select");g.style.position="absolute";g.style.marginTop="-2px";g.style.right="72px";g.style.width="80px";for(var k=["sharp","rounded","curved"],l=0;l<k.length;l++){var m=document.createElement("option");m.setAttribute("value",k[l]);mxUtils.write(m,mxResources.get(k[l]));g.appendChild(m)}mxEvent.addListener(g,"change",function(a){e.getModel().beginUpdate();try{var c=[mxConstants.STYLE_ROUNDED,mxConstants.STYLE_CURVED],d=["0",null];"rounded"==g.value?d=["1",null]:
 "curved"==g.value&&(d=[null,"1"]);for(var f=0;f<c.length;f++)e.setCellStyles(c[f],d[f],e.getSelectionCells());b.fireEvent(new mxEventObject("styleChanged","keys",c,"values",d,"cells",e.getSelectionCells()))}finally{e.getModel().endUpdate()}mxEvent.consume(a)});mxEvent.addListener(g,"click",function(a){mxEvent.consume(a)});var n="image"==f.style.shape?mxConstants.STYLE_IMAGE_BORDER:mxConstants.STYLE_STROKECOLOR,k=this.createCellColorOption(mxResources.get("line"),n,"#000000");k.appendChild(g);h.appendChild(k);
 var p=h.cloneNode(!1);p.style.fontWeight="normal";p.style.whiteSpace="nowrap";p.style.position="relative";p.style.paddingLeft="16px";p.style.marginBottom="2px";p.style.marginTop="2px";p.className="geToolbarContainer";var q=mxUtils.bind(this,function(a,b,c,d,e){a=this.editorUi.menus.styleChange(a,"",d,e,"geIcon",null);d=document.createElement("div");d.style.width=b+"px";d.style.height="1px";d.style.borderBottom="1px "+c+" black";d.style.paddingTop="6px";a.firstChild.firstChild.style.padding="0px 4px 0px 4px";
@@ -2929,13 +2931,13 @@ a.firstChild.firstChild.style.width=b+"px";a.firstChild.firstChild.appendChild(d
 mxResources.get("connection"),!1,mxUtils.bind(this,function(a){this.editorUi.menus.styleChange(a,"",[mxConstants.STYLE_SHAPE,mxConstants.STYLE_STARTSIZE,mxConstants.STYLE_ENDSIZE,"width"],[null,null,null,null],"geIcon geSprite geSprite-connection",null,!0).setAttribute("title",mxResources.get("line"));this.editorUi.menus.styleChange(a,"",[mxConstants.STYLE_SHAPE,mxConstants.STYLE_STARTSIZE,mxConstants.STYLE_ENDSIZE,"width"],["link",null,null,null],"geIcon geSprite geSprite-linkedge",null,!0).setAttribute("title",
 mxResources.get("link"));this.editorUi.menus.styleChange(a,"",[mxConstants.STYLE_SHAPE,mxConstants.STYLE_STARTSIZE,mxConstants.STYLE_ENDSIZE,"width"],["flexArrow",null,null,null],"geIcon geSprite geSprite-arrow",null,!0).setAttribute("title",mxResources.get("arrow"));this.editorUi.menus.styleChange(a,"",[mxConstants.STYLE_SHAPE,mxConstants.STYLE_STARTSIZE,mxConstants.STYLE_ENDSIZE,"width"],["arrow",null,null,null],"geIcon geSprite geSprite-simplearrow",null,!0).setAttribute("title",mxResources.get("simpleArrow"))})),
 m=this.editorUi.toolbar.addMenuFunctionInContainer(r,"geSprite-orthogonal",mxResources.get("pattern"),!1,mxUtils.bind(this,function(a){q(a,33,"solid",[mxConstants.STYLE_DASHED,mxConstants.STYLE_DASH_PATTERN],[null,null]).setAttribute("title",mxResources.get("solid"));q(a,33,"dashed",[mxConstants.STYLE_DASHED,mxConstants.STYLE_DASH_PATTERN],["1",null]).setAttribute("title",mxResources.get("dashed"));q(a,33,"dotted",[mxConstants.STYLE_DASHED,mxConstants.STYLE_DASH_PATTERN],["1","1 1"]).setAttribute("title",
-mxResources.get("dotted")+" (1)");q(a,33,"dotted",[mxConstants.STYLE_DASHED,mxConstants.STYLE_DASH_PATTERN],["1","1 2"]).setAttribute("title",mxResources.get("dotted")+" (2)");q(a,33,"dotted",[mxConstants.STYLE_DASHED,mxConstants.STYLE_DASH_PATTERN],["1","1 4"]).setAttribute("title",mxResources.get("dotted")+" (3)")})),k=p.cloneNode(!1),u=document.createElement("input");u.style.textAlign="right";u.style.marginTop="2px";u.style.width="41px";u.setAttribute("title",mxResources.get("linewidth"));p.appendChild(u);
-var w=u.cloneNode(!0);r.appendChild(w);var v=this.createStepper(u,c,1,9);v.style.display=u.style.display;v.style.marginTop="2px";p.appendChild(v);var A=this.createStepper(w,d,1,9);A.style.display=w.style.display;A.style.marginTop="2px";r.appendChild(A);mxClient.IS_QUIRKS?(u.style.height="17px",w.style.height="17px"):(u.style.position="absolute",u.style.right="32px",u.style.height="15px",v.style.right="20px",w.style.position="absolute",w.style.right="32px",w.style.height="15px",A.style.right="20px");
-mxEvent.addListener(u,"blur",c);mxEvent.addListener(u,"change",c);mxEvent.addListener(w,"blur",d);mxEvent.addListener(w,"change",d);mxClient.IS_QUIRKS&&(mxUtils.br(k),mxUtils.br(k));var x=this.editorUi.toolbar.addMenuFunctionInContainer(k,"geSprite-orthogonal",mxResources.get("waypoints"),!1,mxUtils.bind(this,function(a){"arrow"!=f.style.shape&&(this.editorUi.menus.edgeStyleChange(a,"",[mxConstants.STYLE_EDGE,mxConstants.STYLE_CURVED,mxConstants.STYLE_NOEDGESTYLE],[null,null,null],"geIcon geSprite geSprite-straight",
+mxResources.get("dotted")+" (1)");q(a,33,"dotted",[mxConstants.STYLE_DASHED,mxConstants.STYLE_DASH_PATTERN],["1","1 2"]).setAttribute("title",mxResources.get("dotted")+" (2)");q(a,33,"dotted",[mxConstants.STYLE_DASHED,mxConstants.STYLE_DASH_PATTERN],["1","1 4"]).setAttribute("title",mxResources.get("dotted")+" (3)")})),k=p.cloneNode(!1),w=document.createElement("input");w.style.textAlign="right";w.style.marginTop="2px";w.style.width="41px";w.setAttribute("title",mxResources.get("linewidth"));p.appendChild(w);
+var u=w.cloneNode(!0);r.appendChild(u);var v=this.createStepper(w,c,1,9);v.style.display=w.style.display;v.style.marginTop="2px";p.appendChild(v);var A=this.createStepper(u,d,1,9);A.style.display=u.style.display;A.style.marginTop="2px";r.appendChild(A);mxClient.IS_QUIRKS?(w.style.height="17px",u.style.height="17px"):(w.style.position="absolute",w.style.right="32px",w.style.height="15px",v.style.right="20px",u.style.position="absolute",u.style.right="32px",u.style.height="15px",A.style.right="20px");
+mxEvent.addListener(w,"blur",c);mxEvent.addListener(w,"change",c);mxEvent.addListener(u,"blur",d);mxEvent.addListener(u,"change",d);mxClient.IS_QUIRKS&&(mxUtils.br(k),mxUtils.br(k));var x=this.editorUi.toolbar.addMenuFunctionInContainer(k,"geSprite-orthogonal",mxResources.get("waypoints"),!1,mxUtils.bind(this,function(a){"arrow"!=f.style.shape&&(this.editorUi.menus.edgeStyleChange(a,"",[mxConstants.STYLE_EDGE,mxConstants.STYLE_CURVED,mxConstants.STYLE_NOEDGESTYLE],[null,null,null],"geIcon geSprite geSprite-straight",
 null,!0).setAttribute("title",mxResources.get("straight")),this.editorUi.menus.edgeStyleChange(a,"",[mxConstants.STYLE_EDGE,mxConstants.STYLE_CURVED,mxConstants.STYLE_NOEDGESTYLE],["orthogonalEdgeStyle",null,null],"geIcon geSprite geSprite-orthogonal",null,!0).setAttribute("title",mxResources.get("orthogonal")),this.editorUi.menus.edgeStyleChange(a,"",[mxConstants.STYLE_EDGE,mxConstants.STYLE_ELBOW,mxConstants.STYLE_CURVED,mxConstants.STYLE_NOEDGESTYLE],["elbowEdgeStyle",null,null,null],"geIcon geSprite geSprite-horizontalelbow",
 null,!0).setAttribute("title",mxResources.get("simple")),this.editorUi.menus.edgeStyleChange(a,"",[mxConstants.STYLE_EDGE,mxConstants.STYLE_ELBOW,mxConstants.STYLE_CURVED,mxConstants.STYLE_NOEDGESTYLE],["elbowEdgeStyle","vertical",null,null],"geIcon geSprite geSprite-verticalelbow",null,!0).setAttribute("title",mxResources.get("simple")),this.editorUi.menus.edgeStyleChange(a,"",[mxConstants.STYLE_EDGE,mxConstants.STYLE_ELBOW,mxConstants.STYLE_CURVED,mxConstants.STYLE_NOEDGESTYLE],["isometricEdgeStyle",
 null,null,null],"geIcon geSprite geSprite-horizontalisometric",null,!0).setAttribute("title",mxResources.get("isometric")),this.editorUi.menus.edgeStyleChange(a,"",[mxConstants.STYLE_EDGE,mxConstants.STYLE_ELBOW,mxConstants.STYLE_CURVED,mxConstants.STYLE_NOEDGESTYLE],["isometricEdgeStyle","vertical",null,null],"geIcon geSprite geSprite-verticalisometric",null,!0).setAttribute("title",mxResources.get("isometric")),"connector"==f.style.shape&&this.editorUi.menus.edgeStyleChange(a,"",[mxConstants.STYLE_EDGE,
-mxConstants.STYLE_CURVED,mxConstants.STYLE_NOEDGESTYLE],["orthogonalEdgeStyle","1",null],"geIcon geSprite geSprite-curved",null,!0).setAttribute("title",mxResources.get("curved")),this.editorUi.menus.edgeStyleChange(a,"",[mxConstants.STYLE_EDGE,mxConstants.STYLE_CURVED,mxConstants.STYLE_NOEDGESTYLE],["entityRelationEdgeStyle",null,null],"geIcon geSprite geSprite-entity",null,!0).setAttribute("title",mxResources.get("entityRelation")))})),C=this.editorUi.toolbar.addMenuFunctionInContainer(k,"geSprite-startclassic",
+mxConstants.STYLE_CURVED,mxConstants.STYLE_NOEDGESTYLE],["orthogonalEdgeStyle","1",null],"geIcon geSprite geSprite-curved",null,!0).setAttribute("title",mxResources.get("curved")),this.editorUi.menus.edgeStyleChange(a,"",[mxConstants.STYLE_EDGE,mxConstants.STYLE_CURVED,mxConstants.STYLE_NOEDGESTYLE],["entityRelationEdgeStyle",null,null],"geIcon geSprite geSprite-entity",null,!0).setAttribute("title",mxResources.get("entityRelation")))})),B=this.editorUi.toolbar.addMenuFunctionInContainer(k,"geSprite-startclassic",
 mxResources.get("linestart"),!1,mxUtils.bind(this,function(a){if("connector"==f.style.shape||"flexArrow"==f.style.shape){var b=this.editorUi.menus.edgeStyleChange(a,"",[mxConstants.STYLE_STARTARROW,"startFill"],[mxConstants.NONE,0],"geIcon",null,!1);b.setAttribute("title",mxResources.get("none"));b.firstChild.firstChild.innerHTML='<font style="font-size:10px;">'+mxUtils.htmlEntities(mxResources.get("none"))+"</font>";"connector"==f.style.shape?(this.editorUi.menus.edgeStyleChange(a,"",[mxConstants.STYLE_STARTARROW,
 "startFill"],[mxConstants.ARROW_CLASSIC,1],"geIcon geSprite geSprite-startclassic",null,!1).setAttribute("title",mxResources.get("classic")),this.editorUi.menus.edgeStyleChange(a,"",[mxConstants.STYLE_STARTARROW,"startFill"],[mxConstants.ARROW_CLASSIC_THIN,1],"geIcon geSprite geSprite-startclassicthin",null,!1),this.editorUi.menus.edgeStyleChange(a,"",[mxConstants.STYLE_STARTARROW,"startFill"],[mxConstants.ARROW_OPEN,0],"geIcon geSprite geSprite-startopen",null,!1).setAttribute("title",mxResources.get("openArrow")),
 this.editorUi.menus.edgeStyleChange(a,"",[mxConstants.STYLE_STARTARROW,"startFill"],[mxConstants.ARROW_OPEN_THIN,0],"geIcon geSprite geSprite-startopenthin",null,!1),this.editorUi.menus.edgeStyleChange(a,"",[mxConstants.STYLE_STARTARROW,"startFill"],["openAsync",0],"geIcon geSprite geSprite-startopenasync",null,!1),this.editorUi.menus.edgeStyleChange(a,"",[mxConstants.STYLE_STARTARROW,"startFill"],[mxConstants.ARROW_BLOCK,1],"geIcon geSprite geSprite-startblock",null,!1).setAttribute("title",mxResources.get("block")),
@@ -2947,7 +2949,7 @@ mxResources.get("block")),this.editorUi.menus.edgeStyleChange(a,"",[mxConstants.
 "",[mxConstants.STYLE_STARTARROW,"startFill"],["dash",0],"geIcon geSprite geSprite-startdash",null,!1),this.editorUi.menus.edgeStyleChange(a,"",[mxConstants.STYLE_STARTARROW,"startFill"],["cross",0],"geIcon geSprite geSprite-startcross",null,!1),this.editorUi.menus.edgeStyleChange(a,"",[mxConstants.STYLE_STARTARROW,"startFill"],["circlePlus",0],"geIcon geSprite geSprite-startcircleplus",null,!1),this.editorUi.menus.edgeStyleChange(a,"",[mxConstants.STYLE_STARTARROW,"startFill"],["circle",1],"geIcon geSprite geSprite-startcircle",
 null,!1),this.editorUi.menus.edgeStyleChange(a,"",[mxConstants.STYLE_STARTARROW,"startFill"],["ERone",0],"geIcon geSprite geSprite-starterone",null,!1),this.editorUi.menus.edgeStyleChange(a,"",[mxConstants.STYLE_STARTARROW,"startFill"],["ERmandOne",0],"geIcon geSprite geSprite-starteronetoone",null,!1),this.editorUi.menus.edgeStyleChange(a,"",[mxConstants.STYLE_STARTARROW,"startFill"],["ERmany",0],"geIcon geSprite geSprite-startermany",null,!1),this.editorUi.menus.edgeStyleChange(a,"",[mxConstants.STYLE_STARTARROW,
 "startFill"],["ERoneToMany",0],"geIcon geSprite geSprite-starteronetomany",null,!1),this.editorUi.menus.edgeStyleChange(a,"",[mxConstants.STYLE_STARTARROW,"startFill"],["ERzeroToOne",1],"geIcon geSprite geSprite-starteroneopt",null,!1),this.editorUi.menus.edgeStyleChange(a,"",[mxConstants.STYLE_STARTARROW,"startFill"],["ERzeroToMany",1],"geIcon geSprite geSprite-startermanyopt",null,!1)):this.editorUi.menus.edgeStyleChange(a,"",[mxConstants.STYLE_STARTARROW],[mxConstants.ARROW_BLOCK],"geIcon geSprite geSprite-startblocktrans",
-null,!1).setAttribute("title",mxResources.get("block"))}})),B=this.editorUi.toolbar.addMenuFunctionInContainer(k,"geSprite-endclassic",mxResources.get("lineend"),!1,mxUtils.bind(this,function(a){if("connector"==f.style.shape||"flexArrow"==f.style.shape){var b=this.editorUi.menus.edgeStyleChange(a,"",[mxConstants.STYLE_ENDARROW,"endFill"],[mxConstants.NONE,0],"geIcon",null,!1);b.setAttribute("title",mxResources.get("none"));b.firstChild.firstChild.innerHTML='<font style="font-size:10px;">'+mxUtils.htmlEntities(mxResources.get("none"))+
+null,!1).setAttribute("title",mxResources.get("block"))}})),C=this.editorUi.toolbar.addMenuFunctionInContainer(k,"geSprite-endclassic",mxResources.get("lineend"),!1,mxUtils.bind(this,function(a){if("connector"==f.style.shape||"flexArrow"==f.style.shape){var b=this.editorUi.menus.edgeStyleChange(a,"",[mxConstants.STYLE_ENDARROW,"endFill"],[mxConstants.NONE,0],"geIcon",null,!1);b.setAttribute("title",mxResources.get("none"));b.firstChild.firstChild.innerHTML='<font style="font-size:10px;">'+mxUtils.htmlEntities(mxResources.get("none"))+
 "</font>";"connector"==f.style.shape?(this.editorUi.menus.edgeStyleChange(a,"",[mxConstants.STYLE_ENDARROW,"endFill"],[mxConstants.ARROW_CLASSIC,1],"geIcon geSprite geSprite-endclassic",null,!1).setAttribute("title",mxResources.get("classic")),this.editorUi.menus.edgeStyleChange(a,"",[mxConstants.STYLE_ENDARROW,"endFill"],[mxConstants.ARROW_CLASSIC_THIN,1],"geIcon geSprite geSprite-endclassicthin",null,!1),this.editorUi.menus.edgeStyleChange(a,"",[mxConstants.STYLE_ENDARROW,"endFill"],[mxConstants.ARROW_OPEN,
 0],"geIcon geSprite geSprite-endopen",null,!1).setAttribute("title",mxResources.get("openArrow")),this.editorUi.menus.edgeStyleChange(a,"",[mxConstants.STYLE_ENDARROW,"endFill"],[mxConstants.ARROW_OPEN_THIN,0],"geIcon geSprite geSprite-endopenthin",null,!1),this.editorUi.menus.edgeStyleChange(a,"",[mxConstants.STYLE_ENDARROW,"endFill"],["openAsync",0],"geIcon geSprite geSprite-endopenasync",null,!1),this.editorUi.menus.edgeStyleChange(a,"",[mxConstants.STYLE_ENDARROW,"endFill"],[mxConstants.ARROW_BLOCK,
 1],"geIcon geSprite geSprite-endblock",null,!1).setAttribute("title",mxResources.get("block")),this.editorUi.menus.edgeStyleChange(a,"",[mxConstants.STYLE_ENDARROW,"endFill"],[mxConstants.ARROW_BLOCK_THIN,1],"geIcon geSprite geSprite-endblockthin",null,!1),this.editorUi.menus.edgeStyleChange(a,"",[mxConstants.STYLE_ENDARROW,"endFill"],["async",1],"geIcon geSprite geSprite-endasync",null,!1),this.editorUi.menus.edgeStyleChange(a,"",[mxConstants.STYLE_ENDARROW,"endFill"],[mxConstants.ARROW_OVAL,1],
@@ -2958,20 +2960,20 @@ null,!1).setAttribute("title",mxResources.get("oval")),this.editorUi.menus.edgeS
 "",[mxConstants.STYLE_ENDARROW,"endFill"],["dash",0],"geIcon geSprite geSprite-enddash",null,!1),this.editorUi.menus.edgeStyleChange(a,"",[mxConstants.STYLE_ENDARROW,"endFill"],["cross",0],"geIcon geSprite geSprite-endcross",null,!1),this.editorUi.menus.edgeStyleChange(a,"",[mxConstants.STYLE_ENDARROW,"endFill"],["circlePlus",0],"geIcon geSprite geSprite-endcircleplus",null,!1),this.editorUi.menus.edgeStyleChange(a,"",[mxConstants.STYLE_ENDARROW,"endFill"],["circle",1],"geIcon geSprite geSprite-endcircle",
 null,!1),this.editorUi.menus.edgeStyleChange(a,"",[mxConstants.STYLE_ENDARROW,"endFill"],["ERone",0],"geIcon geSprite geSprite-enderone",null,!1),this.editorUi.menus.edgeStyleChange(a,"",[mxConstants.STYLE_ENDARROW,"endFill"],["ERmandOne",0],"geIcon geSprite geSprite-enderonetoone",null,!1),this.editorUi.menus.edgeStyleChange(a,"",[mxConstants.STYLE_ENDARROW,"endFill"],["ERmany",0],"geIcon geSprite geSprite-endermany",null,!1),this.editorUi.menus.edgeStyleChange(a,"",[mxConstants.STYLE_ENDARROW,"endFill"],
 ["ERoneToMany",0],"geIcon geSprite geSprite-enderonetomany",null,!1),this.editorUi.menus.edgeStyleChange(a,"",[mxConstants.STYLE_ENDARROW,"endFill"],["ERzeroToOne",1],"geIcon geSprite geSprite-enderoneopt",null,!1),this.editorUi.menus.edgeStyleChange(a,"",[mxConstants.STYLE_ENDARROW,"endFill"],["ERzeroToMany",1],"geIcon geSprite geSprite-endermanyopt",null,!1)):this.editorUi.menus.edgeStyleChange(a,"",[mxConstants.STYLE_ENDARROW],[mxConstants.ARROW_BLOCK],"geIcon geSprite geSprite-endblocktrans",
-null,!1).setAttribute("title",mxResources.get("block"))}}));this.addArrow(t,8);this.addArrow(x);this.addArrow(C);this.addArrow(B);v=this.addArrow(l,9);v.className="geIcon";v.style.width="84px";A=this.addArrow(m,9);A.className="geIcon";A.style.width="22px";var y=document.createElement("div");y.style.width="85px";y.style.height="1px";y.style.borderBottom="1px solid black";y.style.marginBottom="9px";v.appendChild(y);var J=document.createElement("div");J.style.width="23px";J.style.height="1px";J.style.borderBottom=
-"1px solid black";J.style.marginBottom="9px";A.appendChild(J);l.style.height="15px";m.style.height="15px";t.style.height="15px";x.style.height="17px";C.style.marginLeft="3px";C.style.height="17px";B.style.marginLeft="3px";B.style.height="17px";a.appendChild(h);a.appendChild(r);a.appendChild(p);l=p.cloneNode(!1);l.style.paddingBottom="6px";l.style.paddingTop="4px";l.style.fontWeight="normal";m=document.createElement("div");m.style.position="absolute";m.style.marginLeft="3px";m.style.marginBottom="12px";
-m.style.marginTop="2px";m.style.fontWeight="normal";m.style.width="76px";mxUtils.write(m,mxResources.get("lineend"));l.appendChild(m);var K,I,F=this.addUnitInput(l,"pt",74,33,function(){K.apply(this,arguments)}),E=this.addUnitInput(l,"pt",20,33,function(){I.apply(this,arguments)});mxUtils.br(l);v=document.createElement("div");v.style.height="8px";l.appendChild(v);m=m.cloneNode(!1);mxUtils.write(m,mxResources.get("linestart"));l.appendChild(m);var N,M,Q=this.addUnitInput(l,"pt",74,33,function(){N.apply(this,
-arguments)}),O=this.addUnitInput(l,"pt",20,33,function(){M.apply(this,arguments)});mxUtils.br(l);this.addLabel(l,mxResources.get("spacing"),74,50);this.addLabel(l,mxResources.get("size"),20,50);mxUtils.br(l);h=h.cloneNode(!1);h.style.fontWeight="normal";h.style.position="relative";h.style.paddingLeft="16px";h.style.marginBottom="2px";h.style.marginTop="6px";h.style.borderWidth="0px";h.style.paddingBottom="18px";m=document.createElement("div");m.style.position="absolute";m.style.marginLeft="3px";m.style.marginBottom=
-"12px";m.style.marginTop="1px";m.style.fontWeight="normal";m.style.width="120px";mxUtils.write(m,mxResources.get("perimeter"));h.appendChild(m);var G,D=this.addUnitInput(h,"pt",20,41,function(){G.apply(this,arguments)});f.edges.length==e.getSelectionCount()?(a.appendChild(k),mxClient.IS_QUIRKS&&(mxUtils.br(a),mxUtils.br(a)),a.appendChild(l)):f.vertices.length==e.getSelectionCount()&&(mxClient.IS_QUIRKS&&mxUtils.br(a),a.appendChild(h));var H=mxUtils.bind(this,function(a,c,d){function h(a,c,d,e){d=
-d.getElementsByTagName("div")[0];d.className=b.getCssClassForMarker(e,f.style.shape,a,c);"geSprite geSprite-noarrow"==d.className&&(d.innerHTML=mxUtils.htmlEntities(mxResources.get("none")),d.style.backgroundImage="none",d.style.verticalAlign="top",d.style.marginTop="5px",d.style.fontSize="10px",d.nextSibling.style.marginTop="0px");return d}f=this.format.getSelectionState();mxUtils.getValue(f.style,n,null);if(d||document.activeElement!=u)a=parseInt(mxUtils.getValue(f.style,mxConstants.STYLE_STROKEWIDTH,
-1)),u.value=isNaN(a)?"":a+" pt";if(d||document.activeElement!=w)a=parseInt(mxUtils.getValue(f.style,mxConstants.STYLE_STROKEWIDTH,1)),w.value=isNaN(a)?"":a+" pt";g.style.visibility="connector"==f.style.shape||"filledEdge"==f.style.shape?"":"hidden";"1"==mxUtils.getValue(f.style,mxConstants.STYLE_CURVED,null)?g.value="curved":"1"==mxUtils.getValue(f.style,mxConstants.STYLE_ROUNDED,null)&&(g.value="rounded");"1"==mxUtils.getValue(f.style,mxConstants.STYLE_DASHED,null)?null==mxUtils.getValue(f.style,
-mxConstants.STYLE_DASH_PATTERN,null)?y.style.borderBottom="1px dashed black":y.style.borderBottom="1px dotted black":y.style.borderBottom="1px solid black";J.style.borderBottom=y.style.borderBottom;a=x.getElementsByTagName("div")[0];c=mxUtils.getValue(f.style,mxConstants.STYLE_EDGE,null);"1"==mxUtils.getValue(f.style,mxConstants.STYLE_NOEDGESTYLE,null)&&(c=null);"orthogonalEdgeStyle"==c&&"1"==mxUtils.getValue(f.style,mxConstants.STYLE_CURVED,null)?a.className="geSprite geSprite-curved":a.className=
+null,!1).setAttribute("title",mxResources.get("block"))}}));this.addArrow(t,8);this.addArrow(x);this.addArrow(B);this.addArrow(C);v=this.addArrow(l,9);v.className="geIcon";v.style.width="84px";A=this.addArrow(m,9);A.className="geIcon";A.style.width="22px";var y=document.createElement("div");y.style.width="85px";y.style.height="1px";y.style.borderBottom="1px solid black";y.style.marginBottom="9px";v.appendChild(y);var I=document.createElement("div");I.style.width="23px";I.style.height="1px";I.style.borderBottom=
+"1px solid black";I.style.marginBottom="9px";A.appendChild(I);l.style.height="15px";m.style.height="15px";t.style.height="15px";x.style.height="17px";B.style.marginLeft="3px";B.style.height="17px";C.style.marginLeft="3px";C.style.height="17px";a.appendChild(h);a.appendChild(r);a.appendChild(p);l=p.cloneNode(!1);l.style.paddingBottom="6px";l.style.paddingTop="4px";l.style.fontWeight="normal";m=document.createElement("div");m.style.position="absolute";m.style.marginLeft="3px";m.style.marginBottom="12px";
+m.style.marginTop="2px";m.style.fontWeight="normal";m.style.width="76px";mxUtils.write(m,mxResources.get("lineend"));l.appendChild(m);var L,J,G=this.addUnitInput(l,"pt",74,33,function(){L.apply(this,arguments)}),D=this.addUnitInput(l,"pt",20,33,function(){J.apply(this,arguments)});mxUtils.br(l);v=document.createElement("div");v.style.height="8px";l.appendChild(v);m=m.cloneNode(!1);mxUtils.write(m,mxResources.get("linestart"));l.appendChild(m);var K,N,P=this.addUnitInput(l,"pt",74,33,function(){K.apply(this,
+arguments)}),O=this.addUnitInput(l,"pt",20,33,function(){N.apply(this,arguments)});mxUtils.br(l);this.addLabel(l,mxResources.get("spacing"),74,50);this.addLabel(l,mxResources.get("size"),20,50);mxUtils.br(l);h=h.cloneNode(!1);h.style.fontWeight="normal";h.style.position="relative";h.style.paddingLeft="16px";h.style.marginBottom="2px";h.style.marginTop="6px";h.style.borderWidth="0px";h.style.paddingBottom="18px";m=document.createElement("div");m.style.position="absolute";m.style.marginLeft="3px";m.style.marginBottom=
+"12px";m.style.marginTop="1px";m.style.fontWeight="normal";m.style.width="120px";mxUtils.write(m,mxResources.get("perimeter"));h.appendChild(m);var F,E=this.addUnitInput(h,"pt",20,41,function(){F.apply(this,arguments)});f.edges.length==e.getSelectionCount()?(a.appendChild(k),mxClient.IS_QUIRKS&&(mxUtils.br(a),mxUtils.br(a)),a.appendChild(l)):f.vertices.length==e.getSelectionCount()&&(mxClient.IS_QUIRKS&&mxUtils.br(a),a.appendChild(h));var H=mxUtils.bind(this,function(a,c,d){function h(a,c,d,e){d=
+d.getElementsByTagName("div")[0];d.className=b.getCssClassForMarker(e,f.style.shape,a,c);"geSprite geSprite-noarrow"==d.className&&(d.innerHTML=mxUtils.htmlEntities(mxResources.get("none")),d.style.backgroundImage="none",d.style.verticalAlign="top",d.style.marginTop="5px",d.style.fontSize="10px",d.nextSibling.style.marginTop="0px");return d}f=this.format.getSelectionState();mxUtils.getValue(f.style,n,null);if(d||document.activeElement!=w)a=parseInt(mxUtils.getValue(f.style,mxConstants.STYLE_STROKEWIDTH,
+1)),w.value=isNaN(a)?"":a+" pt";if(d||document.activeElement!=u)a=parseInt(mxUtils.getValue(f.style,mxConstants.STYLE_STROKEWIDTH,1)),u.value=isNaN(a)?"":a+" pt";g.style.visibility="connector"==f.style.shape||"filledEdge"==f.style.shape?"":"hidden";"1"==mxUtils.getValue(f.style,mxConstants.STYLE_CURVED,null)?g.value="curved":"1"==mxUtils.getValue(f.style,mxConstants.STYLE_ROUNDED,null)&&(g.value="rounded");"1"==mxUtils.getValue(f.style,mxConstants.STYLE_DASHED,null)?null==mxUtils.getValue(f.style,
+mxConstants.STYLE_DASH_PATTERN,null)?y.style.borderBottom="1px dashed black":y.style.borderBottom="1px dotted black":y.style.borderBottom="1px solid black";I.style.borderBottom=y.style.borderBottom;a=x.getElementsByTagName("div")[0];c=mxUtils.getValue(f.style,mxConstants.STYLE_EDGE,null);"1"==mxUtils.getValue(f.style,mxConstants.STYLE_NOEDGESTYLE,null)&&(c=null);"orthogonalEdgeStyle"==c&&"1"==mxUtils.getValue(f.style,mxConstants.STYLE_CURVED,null)?a.className="geSprite geSprite-curved":a.className=
 "straight"==c||"none"==c||null==c?"geSprite geSprite-straight":"entityRelationEdgeStyle"==c?"geSprite geSprite-entity":"elbowEdgeStyle"==c?"geSprite "+("vertical"==mxUtils.getValue(f.style,mxConstants.STYLE_ELBOW,null)?"geSprite-verticalelbow":"geSprite-horizontalelbow"):"isometricEdgeStyle"==c?"geSprite "+("vertical"==mxUtils.getValue(f.style,mxConstants.STYLE_ELBOW,null)?"geSprite-verticalisometric":"geSprite-horizontalisometric"):"geSprite geSprite-orthogonal";t.getElementsByTagName("div")[0].className=
-"link"==f.style.shape?"geSprite geSprite-linkedge":"flexArrow"==f.style.shape?"geSprite geSprite-arrow":"arrow"==f.style.shape?"geSprite geSprite-simplearrow":"geSprite geSprite-connection";f.edges.length==e.getSelectionCount()?(r.style.display="",p.style.display="none"):(r.style.display="none",p.style.display="");a=h(mxUtils.getValue(f.style,mxConstants.STYLE_STARTARROW,null),mxUtils.getValue(f.style,"startFill","1"),C,"start");c=h(mxUtils.getValue(f.style,mxConstants.STYLE_ENDARROW,null),mxUtils.getValue(f.style,
-"endFill","1"),B,"end");"arrow"==f.style.shape?(a.className="geSprite geSprite-noarrow",c.className="geSprite geSprite-endblocktrans"):"link"==f.style.shape&&(a.className="geSprite geSprite-noarrow",c.className="geSprite geSprite-noarrow");mxUtils.setOpacity(x,"arrow"==f.style.shape?30:100);"connector"!=f.style.shape&&"flexArrow"!=f.style.shape?(mxUtils.setOpacity(C,30),mxUtils.setOpacity(B,30)):(mxUtils.setOpacity(C,100),mxUtils.setOpacity(B,100));if(d||document.activeElement!=O)a=parseInt(mxUtils.getValue(f.style,
-mxConstants.STYLE_STARTSIZE,mxConstants.DEFAULT_MARKERSIZE)),O.value=isNaN(a)?"":a+" pt";if(d||document.activeElement!=Q)a=parseInt(mxUtils.getValue(f.style,mxConstants.STYLE_SOURCE_PERIMETER_SPACING,0)),Q.value=isNaN(a)?"":a+" pt";if(d||document.activeElement!=E)a=parseInt(mxUtils.getValue(f.style,mxConstants.STYLE_ENDSIZE,mxConstants.DEFAULT_MARKERSIZE)),E.value=isNaN(a)?"":a+" pt";if(d||document.activeElement!=Q)a=parseInt(mxUtils.getValue(f.style,mxConstants.STYLE_TARGET_PERIMETER_SPACING,0)),
-F.value=isNaN(a)?"":a+" pt";if(d||document.activeElement!=D)a=parseInt(mxUtils.getValue(f.style,mxConstants.STYLE_PERIMETER_SPACING,0)),D.value=isNaN(a)?"":a+" pt"});M=this.installInputHandler(O,mxConstants.STYLE_STARTSIZE,mxConstants.DEFAULT_MARKERSIZE,0,999," pt");N=this.installInputHandler(Q,mxConstants.STYLE_SOURCE_PERIMETER_SPACING,0,-999,999," pt");I=this.installInputHandler(E,mxConstants.STYLE_ENDSIZE,mxConstants.DEFAULT_MARKERSIZE,0,999," pt");K=this.installInputHandler(F,mxConstants.STYLE_TARGET_PERIMETER_SPACING,
-0,-999,999," pt");G=this.installInputHandler(D,mxConstants.STYLE_PERIMETER_SPACING,0,0,999," pt");this.addKeyHandler(u,H);this.addKeyHandler(O,H);this.addKeyHandler(Q,H);this.addKeyHandler(E,H);this.addKeyHandler(F,H);this.addKeyHandler(D,H);e.getModel().addListener(mxEvent.CHANGE,H);this.listeners.push({destroy:function(){e.getModel().removeListener(H)}});H();return a};
+"link"==f.style.shape?"geSprite geSprite-linkedge":"flexArrow"==f.style.shape?"geSprite geSprite-arrow":"arrow"==f.style.shape?"geSprite geSprite-simplearrow":"geSprite geSprite-connection";f.edges.length==e.getSelectionCount()?(r.style.display="",p.style.display="none"):(r.style.display="none",p.style.display="");a=h(mxUtils.getValue(f.style,mxConstants.STYLE_STARTARROW,null),mxUtils.getValue(f.style,"startFill","1"),B,"start");c=h(mxUtils.getValue(f.style,mxConstants.STYLE_ENDARROW,null),mxUtils.getValue(f.style,
+"endFill","1"),C,"end");"arrow"==f.style.shape?(a.className="geSprite geSprite-noarrow",c.className="geSprite geSprite-endblocktrans"):"link"==f.style.shape&&(a.className="geSprite geSprite-noarrow",c.className="geSprite geSprite-noarrow");mxUtils.setOpacity(x,"arrow"==f.style.shape?30:100);"connector"!=f.style.shape&&"flexArrow"!=f.style.shape?(mxUtils.setOpacity(B,30),mxUtils.setOpacity(C,30)):(mxUtils.setOpacity(B,100),mxUtils.setOpacity(C,100));if(d||document.activeElement!=O)a=parseInt(mxUtils.getValue(f.style,
+mxConstants.STYLE_STARTSIZE,mxConstants.DEFAULT_MARKERSIZE)),O.value=isNaN(a)?"":a+" pt";if(d||document.activeElement!=P)a=parseInt(mxUtils.getValue(f.style,mxConstants.STYLE_SOURCE_PERIMETER_SPACING,0)),P.value=isNaN(a)?"":a+" pt";if(d||document.activeElement!=D)a=parseInt(mxUtils.getValue(f.style,mxConstants.STYLE_ENDSIZE,mxConstants.DEFAULT_MARKERSIZE)),D.value=isNaN(a)?"":a+" pt";if(d||document.activeElement!=P)a=parseInt(mxUtils.getValue(f.style,mxConstants.STYLE_TARGET_PERIMETER_SPACING,0)),
+G.value=isNaN(a)?"":a+" pt";if(d||document.activeElement!=E)a=parseInt(mxUtils.getValue(f.style,mxConstants.STYLE_PERIMETER_SPACING,0)),E.value=isNaN(a)?"":a+" pt"});N=this.installInputHandler(O,mxConstants.STYLE_STARTSIZE,mxConstants.DEFAULT_MARKERSIZE,0,999," pt");K=this.installInputHandler(P,mxConstants.STYLE_SOURCE_PERIMETER_SPACING,0,-999,999," pt");J=this.installInputHandler(D,mxConstants.STYLE_ENDSIZE,mxConstants.DEFAULT_MARKERSIZE,0,999," pt");L=this.installInputHandler(G,mxConstants.STYLE_TARGET_PERIMETER_SPACING,
+0,-999,999," pt");F=this.installInputHandler(E,mxConstants.STYLE_PERIMETER_SPACING,0,0,999," pt");this.addKeyHandler(w,H);this.addKeyHandler(O,H);this.addKeyHandler(P,H);this.addKeyHandler(D,H);this.addKeyHandler(G,H);this.addKeyHandler(E,H);e.getModel().addListener(mxEvent.CHANGE,H);this.listeners.push({destroy:function(){e.getModel().removeListener(H)}});H();return a};
 StyleFormatPanel.prototype.addLineJumps=function(a){var c=this.format.getSelectionState();if(Graph.lineJumpsEnabled&&0<c.edges.length&&0==c.vertices.length&&c.lineJumps){a.style.padding="8px 0px 24px 18px";var d=this.editorUi,b=d.editor.graph,e=document.createElement("div");e.style.position="absolute";e.style.fontWeight="bold";e.style.width="80px";mxUtils.write(e,mxResources.get("lineJumps"));a.appendChild(e);var f=document.createElement("select");f.style.position="absolute";f.style.marginTop="-2px";
 f.style.right="76px";f.style.width="62px";for(var e=["none","arc","gap","sharp"],h=0;h<e.length;h++){var g=document.createElement("option");g.setAttribute("value",e[h]);mxUtils.write(g,mxResources.get(e[h]));f.appendChild(g)}mxEvent.addListener(f,"change",function(a){b.getModel().beginUpdate();try{b.setCellStyles("jumpStyle",f.value,b.getSelectionCells()),d.fireEvent(new mxEventObject("styleChanged","keys",["jumpStyle"],"values",[f.value],"cells",b.getSelectionCells()))}finally{b.getModel().endUpdate()}mxEvent.consume(a)});
 mxEvent.addListener(f,"click",function(a){mxEvent.consume(a)});a.appendChild(f);var k,l=this.addUnitInput(a,"pt",22,33,function(){k.apply(this,arguments)});k=this.installInputHandler(l,"jumpSize",Graph.defaultJumpSize,0,999," pt");var m=mxUtils.bind(this,function(a,b,d){c=this.format.getSelectionState();f.value=mxUtils.getValue(c.style,"jumpStyle","none");if(d||document.activeElement!=l)a=parseInt(mxUtils.getValue(c.style,"jumpSize",Graph.defaultJumpSize)),l.value=isNaN(a)?"":a+" pt"});this.addKeyHandler(l,
@@ -3056,38 +3058,38 @@ var AboutDialog=function(a){var c=document.createElement("div");c.setAttribute("
 document.execCommand("selectAll",!1,null),Graph.fileSupport){var a=p.parentNode,b=null;mxEvent.addListener(a,"dragleave",function(a){null!=b&&(b.style.backgroundColor="",b=null);a.stopPropagation();a.preventDefault()});mxEvent.addListener(a,"dragover",mxUtils.bind(this,function(a){null==b&&(!mxClient.IS_IE||10<document.documentMode)&&(b=r,b.style.backgroundColor="#ebf2f9");a.stopPropagation();a.preventDefault()}));mxEvent.addListener(a,"drop",mxUtils.bind(this,function(a){null!=b&&(b.style.backgroundColor=
 "",b=null);0<=mxUtils.indexOf(a.dataTransfer.types,"text/uri-list")&&(r.value=decodeURIComponent(a.dataTransfer.getData("text/uri-list")),t.click());a.stopPropagation();a.preventDefault()}))}};n=document.createElement("td");n.appendChild(r);m.appendChild(n);null==e&&null!=h||q.appendChild(m);null!=h&&(m=document.createElement("tr"),n=document.createElement("td"),n.colSpan=2,n.appendChild(h),m.appendChild(n),q.appendChild(m));m=document.createElement("tr");n=document.createElement("td");n.colSpan=
 2;n.style.paddingTop="20px";n.style.whiteSpace="nowrap";n.setAttribute("align","right");c=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog();null!=l&&l()});c.className="geBtn";a.editor.cancelFirst&&n.appendChild(c);null!=g&&(d=mxUtils.button(mxResources.get("help"),function(){window.open(g)}),d.className="geBtn",n.appendChild(d));mxEvent.addListener(r,"keypress",function(a){13==a.keyCode&&t.click()});n.appendChild(t);a.editor.cancelFirst||n.appendChild(c);m.appendChild(n);q.appendChild(m);
-p.appendChild(q);this.container=p},TextareaDialog=function(a,c,d,b,e,f,h,g,k,l,m,n){h=null!=h?h:300;g=null!=g?g:120;l=null!=l?l:!1;var p,q,r=document.createElement("table"),t=document.createElement("tbody");p=document.createElement("tr");q=document.createElement("td");q.style.fontSize="10pt";q.style.width="100px";mxUtils.write(q,c);p.appendChild(q);t.appendChild(p);p=document.createElement("tr");q=document.createElement("td");var u=document.createElement("textarea");m&&u.setAttribute("wrap","off");
-u.setAttribute("spellcheck","false");u.setAttribute("autocorrect","off");u.setAttribute("autocomplete","off");u.setAttribute("autocapitalize","off");mxUtils.write(u,d||"");u.style.resize="none";u.style.width=h+"px";u.style.height=g+"px";this.textarea=u;this.init=function(){u.focus();u.scrollTop=0};q.appendChild(u);p.appendChild(q);t.appendChild(p);p=document.createElement("tr");q=document.createElement("td");q.style.paddingTop="14px";q.style.whiteSpace="nowrap";q.setAttribute("align","right");c=mxUtils.button(f||
-mxResources.get("cancel"),function(){a.hideDialog();null!=e&&e()});c.className="geBtn";a.editor.cancelFirst&&q.appendChild(c);null!=k&&k(q);null!=b&&(k=mxUtils.button(n||mxResources.get("apply"),function(){l||a.hideDialog();b(u.value)}),k.className="geBtn gePrimaryBtn",q.appendChild(k));a.editor.cancelFirst||q.appendChild(c);p.appendChild(q);t.appendChild(p);r.appendChild(t);this.container=r},EditDiagramDialog=function(a){var c=document.createElement("div");c.style.textAlign="right";var d=document.createElement("textarea");
+p.appendChild(q);this.container=p},TextareaDialog=function(a,c,d,b,e,f,h,g,k,l,m,n){h=null!=h?h:300;g=null!=g?g:120;l=null!=l?l:!1;var p,q,r=document.createElement("table"),t=document.createElement("tbody");p=document.createElement("tr");q=document.createElement("td");q.style.fontSize="10pt";q.style.width="100px";mxUtils.write(q,c);p.appendChild(q);t.appendChild(p);p=document.createElement("tr");q=document.createElement("td");var w=document.createElement("textarea");m&&w.setAttribute("wrap","off");
+w.setAttribute("spellcheck","false");w.setAttribute("autocorrect","off");w.setAttribute("autocomplete","off");w.setAttribute("autocapitalize","off");mxUtils.write(w,d||"");w.style.resize="none";w.style.width=h+"px";w.style.height=g+"px";this.textarea=w;this.init=function(){w.focus();w.scrollTop=0};q.appendChild(w);p.appendChild(q);t.appendChild(p);p=document.createElement("tr");q=document.createElement("td");q.style.paddingTop="14px";q.style.whiteSpace="nowrap";q.setAttribute("align","right");c=mxUtils.button(f||
+mxResources.get("cancel"),function(){a.hideDialog();null!=e&&e()});c.className="geBtn";a.editor.cancelFirst&&q.appendChild(c);null!=k&&k(q);null!=b&&(k=mxUtils.button(n||mxResources.get("apply"),function(){l||a.hideDialog();b(w.value)}),k.className="geBtn gePrimaryBtn",q.appendChild(k));a.editor.cancelFirst||q.appendChild(c);p.appendChild(q);t.appendChild(p);r.appendChild(t);this.container=r},EditDiagramDialog=function(a){var c=document.createElement("div");c.style.textAlign="right";var d=document.createElement("textarea");
 d.setAttribute("wrap","off");d.setAttribute("spellcheck","false");d.setAttribute("autocorrect","off");d.setAttribute("autocomplete","off");d.setAttribute("autocapitalize","off");d.style.overflow="auto";d.style.resize="none";d.style.width="600px";d.style.height="370px";d.style.marginBottom="16px";d.value=mxUtils.getPrettyXml(a.editor.getGraphXml());c.appendChild(d);this.init=function(){d.focus()};Graph.fileSupport&&(d.addEventListener("dragover",function(a){a.stopPropagation();a.preventDefault()},
 !1),d.addEventListener("drop",function(b){b.stopPropagation();b.preventDefault();if(0<b.dataTransfer.files.length){b=b.dataTransfer.files[0];var c=new FileReader;c.onload=function(a){d.value=a.target.result};c.readAsText(b)}else d.value=a.extractGraphModelFromEvent(b)},!1));var b=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog()});b.className="geBtn";a.editor.cancelFirst&&c.appendChild(b);var e=document.createElement("select");e.style.width="180px";e.className="geBtn";if(a.editor.graph.isEnabled()){var f=
 document.createElement("option");f.setAttribute("value","replace");mxUtils.write(f,mxResources.get("replaceExistingDrawing"));e.appendChild(f)}f=document.createElement("option");f.setAttribute("value","new");mxUtils.write(f,mxResources.get("openInNewWindow"));EditDiagramDialog.showNewWindowOption&&e.appendChild(f);a.editor.graph.isEnabled()&&(f=document.createElement("option"),f.setAttribute("value","import"),mxUtils.write(f,mxResources.get("addToExistingDrawing")),e.appendChild(f));c.appendChild(e);
 f=mxUtils.button(mxResources.get("ok"),function(){var b=a.editor.graph.zapGremlins(mxUtils.trim(d.value)),c=null;if("new"==e.value)window.openFile=new OpenFile(function(){a.hideDialog();window.openFile=null}),window.openFile.setData(b,null),window.open(a.getUrl());else if("replace"==e.value){a.editor.graph.model.beginUpdate();try{a.editor.setGraphXml(mxUtils.parseXml(b).documentElement),a.hideDialog()}catch(n){c=n}finally{a.editor.graph.model.endUpdate()}}else if("import"==e.value){a.editor.graph.model.beginUpdate();
 try{var f=mxUtils.parseXml(b),l=new mxGraphModel;(new mxCodec(f)).decode(f.documentElement,l);var m=l.getChildren(l.getChildAt(l.getRoot(),0));a.editor.graph.setSelectionCells(a.editor.graph.importCells(m));a.hideDialog()}catch(n){c=n}finally{a.editor.graph.model.endUpdate()}}null!=c&&mxUtils.alert(c.message)});f.className="geBtn gePrimaryBtn";c.appendChild(f);a.editor.cancelFirst||c.appendChild(b);this.container=c};EditDiagramDialog.showNewWindowOption=!0;
-var ExportDialog=function(a){function c(){var a=m.value,b=a.lastIndexOf(".");m.value=0<b?a.substring(0,b+1)+n.value:a+"."+n.value;"xml"===n.value?(p.setAttribute("disabled","true"),q.setAttribute("disabled","true"),r.setAttribute("disabled","true"),u.setAttribute("disabled","true")):(p.removeAttribute("disabled"),q.removeAttribute("disabled"),r.removeAttribute("disabled"),u.removeAttribute("disabled"));"png"===n.value||"svg"===n.value?t.removeAttribute("disabled"):t.setAttribute("disabled","disabled")}
+var ExportDialog=function(a){function c(){var a=m.value,b=a.lastIndexOf(".");m.value=0<b?a.substring(0,b+1)+n.value:a+"."+n.value;"xml"===n.value?(p.setAttribute("disabled","true"),q.setAttribute("disabled","true"),r.setAttribute("disabled","true"),w.setAttribute("disabled","true")):(p.removeAttribute("disabled"),q.removeAttribute("disabled"),r.removeAttribute("disabled"),w.removeAttribute("disabled"));"png"===n.value||"svg"===n.value?t.removeAttribute("disabled"):t.setAttribute("disabled","disabled")}
 function d(){q.style.backgroundColor=q.value*r.value>MAX_AREA||0>=q.value?"red":"";r.style.backgroundColor=q.value*r.value>MAX_AREA||0>=r.value?"red":""}var b=a.editor.graph,e=b.getGraphBounds(),f=b.view.scale,h=Math.ceil(e.width/f),g=Math.ceil(e.height/f),k,f=document.createElement("table"),l=document.createElement("tbody");f.setAttribute("cellpadding",mxClient.IS_SF?"0":"2");e=document.createElement("tr");k=document.createElement("td");k.style.fontSize="10pt";k.style.width="100px";mxUtils.write(k,
 mxResources.get("filename")+":");e.appendChild(k);var m=document.createElement("input");m.setAttribute("value",a.editor.getOrCreateFilename());m.style.width="180px";k=document.createElement("td");k.appendChild(m);e.appendChild(k);l.appendChild(e);e=document.createElement("tr");k=document.createElement("td");k.style.fontSize="10pt";mxUtils.write(k,mxResources.get("format")+":");e.appendChild(k);var n=document.createElement("select");n.style.width="180px";k=document.createElement("option");k.setAttribute("value",
 "png");mxUtils.write(k,mxResources.get("formatPng"));n.appendChild(k);k=document.createElement("option");ExportDialog.showGifOption&&(k.setAttribute("value","gif"),mxUtils.write(k,mxResources.get("formatGif")),n.appendChild(k));k=document.createElement("option");k.setAttribute("value","jpg");mxUtils.write(k,mxResources.get("formatJpg"));n.appendChild(k);k=document.createElement("option");k.setAttribute("value","pdf");mxUtils.write(k,mxResources.get("formatPdf"));n.appendChild(k);k=document.createElement("option");
 k.setAttribute("value","svg");mxUtils.write(k,mxResources.get("formatSvg"));n.appendChild(k);ExportDialog.showXmlOption&&(k=document.createElement("option"),k.setAttribute("value","xml"),mxUtils.write(k,mxResources.get("formatXml")),n.appendChild(k));k=document.createElement("td");k.appendChild(n);e.appendChild(k);l.appendChild(e);e=document.createElement("tr");k=document.createElement("td");k.style.fontSize="10pt";mxUtils.write(k,mxResources.get("zoom")+" (%):");e.appendChild(k);var p=document.createElement("input");
 p.setAttribute("type","number");p.setAttribute("value","100");p.style.width="180px";k=document.createElement("td");k.appendChild(p);e.appendChild(k);l.appendChild(e);e=document.createElement("tr");k=document.createElement("td");k.style.fontSize="10pt";mxUtils.write(k,mxResources.get("width")+":");e.appendChild(k);var q=document.createElement("input");q.setAttribute("value",h);q.style.width="180px";k=document.createElement("td");k.appendChild(q);e.appendChild(k);l.appendChild(e);e=document.createElement("tr");
 k=document.createElement("td");k.style.fontSize="10pt";mxUtils.write(k,mxResources.get("height")+":");e.appendChild(k);var r=document.createElement("input");r.setAttribute("value",g);r.style.width="180px";k=document.createElement("td");k.appendChild(r);e.appendChild(k);l.appendChild(e);e=document.createElement("tr");k=document.createElement("td");k.style.fontSize="10pt";mxUtils.write(k,mxResources.get("background")+":");e.appendChild(k);var t=document.createElement("input");t.setAttribute("type",
-"checkbox");t.checked=null==b.background||b.background==mxConstants.NONE;k=document.createElement("td");k.appendChild(t);mxUtils.write(k,mxResources.get("transparent"));e.appendChild(k);l.appendChild(e);e=document.createElement("tr");k=document.createElement("td");k.style.fontSize="10pt";mxUtils.write(k,mxResources.get("borderWidth")+":");e.appendChild(k);var u=document.createElement("input");u.setAttribute("type","number");u.setAttribute("value",ExportDialog.lastBorderValue);u.style.width="180px";
-k=document.createElement("td");k.appendChild(u);e.appendChild(k);l.appendChild(e);f.appendChild(l);mxEvent.addListener(n,"change",c);c();mxEvent.addListener(p,"change",function(){var a=Math.max(0,parseFloat(p.value)||100)/100;p.value=parseFloat((100*a).toFixed(2));0<h?(q.value=Math.floor(h*a),r.value=Math.floor(g*a)):(p.value="100",q.value=h,r.value=g);d()});mxEvent.addListener(q,"change",function(){var a=parseInt(q.value)/h;0<a?(p.value=parseFloat((100*a).toFixed(2)),r.value=Math.floor(g*a)):(p.value=
-"100",q.value=h,r.value=g);d()});mxEvent.addListener(r,"change",function(){var a=parseInt(r.value)/g;0<a?(p.value=parseFloat((100*a).toFixed(2)),q.value=Math.floor(h*a)):(p.value="100",q.value=h,r.value=g);d()});e=document.createElement("tr");k=document.createElement("td");k.setAttribute("align","right");k.style.paddingTop="22px";k.colSpan=2;var w=mxUtils.button(mxResources.get("export"),mxUtils.bind(this,function(){if(0>=parseInt(p.value))mxUtils.alert(mxResources.get("drawingEmpty"));else{var c=
-m.value,d=n.value,e=Math.max(0,parseFloat(p.value)||100)/100,f=Math.max(0,parseInt(u.value)),g=b.background;if(("svg"==d||"png"==d)&&t.checked)g=null;else if(null==g||g==mxConstants.NONE)g="#ffffff";ExportDialog.lastBorderValue=f;ExportDialog.exportFile(a,c,d,g,e,f)}}));w.className="geBtn gePrimaryBtn";var v=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog()});v.className="geBtn";a.editor.cancelFirst?(k.appendChild(v),k.appendChild(w)):(k.appendChild(w),k.appendChild(v));e.appendChild(k);
+"checkbox");t.checked=null==b.background||b.background==mxConstants.NONE;k=document.createElement("td");k.appendChild(t);mxUtils.write(k,mxResources.get("transparent"));e.appendChild(k);l.appendChild(e);e=document.createElement("tr");k=document.createElement("td");k.style.fontSize="10pt";mxUtils.write(k,mxResources.get("borderWidth")+":");e.appendChild(k);var w=document.createElement("input");w.setAttribute("type","number");w.setAttribute("value",ExportDialog.lastBorderValue);w.style.width="180px";
+k=document.createElement("td");k.appendChild(w);e.appendChild(k);l.appendChild(e);f.appendChild(l);mxEvent.addListener(n,"change",c);c();mxEvent.addListener(p,"change",function(){var a=Math.max(0,parseFloat(p.value)||100)/100;p.value=parseFloat((100*a).toFixed(2));0<h?(q.value=Math.floor(h*a),r.value=Math.floor(g*a)):(p.value="100",q.value=h,r.value=g);d()});mxEvent.addListener(q,"change",function(){var a=parseInt(q.value)/h;0<a?(p.value=parseFloat((100*a).toFixed(2)),r.value=Math.floor(g*a)):(p.value=
+"100",q.value=h,r.value=g);d()});mxEvent.addListener(r,"change",function(){var a=parseInt(r.value)/g;0<a?(p.value=parseFloat((100*a).toFixed(2)),q.value=Math.floor(h*a)):(p.value="100",q.value=h,r.value=g);d()});e=document.createElement("tr");k=document.createElement("td");k.setAttribute("align","right");k.style.paddingTop="22px";k.colSpan=2;var u=mxUtils.button(mxResources.get("export"),mxUtils.bind(this,function(){if(0>=parseInt(p.value))mxUtils.alert(mxResources.get("drawingEmpty"));else{var c=
+m.value,d=n.value,e=Math.max(0,parseFloat(p.value)||100)/100,f=Math.max(0,parseInt(w.value)),g=b.background;if(("svg"==d||"png"==d)&&t.checked)g=null;else if(null==g||g==mxConstants.NONE)g="#ffffff";ExportDialog.lastBorderValue=f;ExportDialog.exportFile(a,c,d,g,e,f)}}));u.className="geBtn gePrimaryBtn";var v=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog()});v.className="geBtn";a.editor.cancelFirst?(k.appendChild(v),k.appendChild(u)):(k.appendChild(u),k.appendChild(v));e.appendChild(k);
 l.appendChild(e);f.appendChild(l);this.container=f};ExportDialog.lastBorderValue=0;ExportDialog.showGifOption=!0;ExportDialog.showXmlOption=!0;
 ExportDialog.exportFile=function(a,c,d,b,e,f){var h=a.editor.graph;if("xml"==d)ExportDialog.saveLocalFile(a,mxUtils.getXml(a.editor.getGraphXml()),c,d);else if("svg"==d)ExportDialog.saveLocalFile(a,mxUtils.getXml(h.getSvg(b,e,f)),c,d);else{var g=h.getGraphBounds(),k=mxUtils.createXmlDocument(),l=k.createElement("output");k.appendChild(l);k=new mxXmlCanvas2D(l);k.translate(Math.floor((f/e-g.x)/h.view.scale),Math.floor((f/e-g.y)/h.view.scale));k.scale(e/h.view.scale);(new mxImageExport).drawState(h.getView().getState(h.model.root),
 k);l="xml="+encodeURIComponent(mxUtils.getXml(l));k=Math.ceil(g.width*e/h.view.scale+2*f);e=Math.ceil(g.height*e/h.view.scale+2*f);l.length<=MAX_REQUEST_SIZE&&k*e<MAX_AREA?(a.hideDialog(),(new mxXmlRequest(EXPORT_URL,"format="+d+"&filename="+encodeURIComponent(c)+"&bg="+(null!=b?b:"none")+"&w="+k+"&h="+e+"&"+l)).simulate(document,"_blank")):mxUtils.alert(mxResources.get("drawingTooLarge"))}};
 ExportDialog.saveLocalFile=function(a,c,d,b){c.length<MAX_REQUEST_SIZE?(a.hideDialog(),(new mxXmlRequest(SAVE_URL,"xml="+encodeURIComponent(c)+"&filename="+encodeURIComponent(d)+"&format="+b)).simulate(document,"_blank")):(mxUtils.alert(mxResources.get("drawingTooLarge")),mxUtils.popup(xml))};
-var EditDataDialog=function(a,c){function d(){0<t.value.length?u.removeAttribute("disabled"):u.setAttribute("disabled","disabled")}var b=document.createElement("div"),e=a.editor.graph;b.style.height="310px";b.style.overflow="auto";var f=e.getModel().getValue(c);if(!mxUtils.isNode(f)){var h=mxUtils.createXmlDocument().createElement("object");h.setAttribute("label",f||"");f=h}var g=new mxForm("properties");g.table.style.width="100%";g.table.style.paddingRight="20px";for(var h=f.attributes,k=[],l=[],
+var EditDataDialog=function(a,c){function d(){0<t.value.length?w.removeAttribute("disabled"):w.setAttribute("disabled","disabled")}var b=document.createElement("div"),e=a.editor.graph;b.style.height="310px";b.style.overflow="auto";var f=e.getModel().getValue(c);if(!mxUtils.isNode(f)){var h=mxUtils.createXmlDocument().createElement("object");h.setAttribute("label",f||"");f=h}var g=new mxForm("properties");g.table.style.width="100%";g.table.style.paddingRight="20px";for(var h=f.attributes,k=[],l=[],
 m=0,n=function(a,b){a.parentNode.style.marginRight="12px";var c=document.createElement("a"),d=mxUtils.createImage(Dialog.prototype.closeImage);d.style.height="9px";d.style.fontSize="9px";d.style.marginBottom=mxClient.IS_IE11?"-1px":"5px";c.className="geButton";c.setAttribute("title",mxResources.get("delete"));c.style.margin="0px";c.style.width="14px";c.style.height="14px";c.style.fontSize="14px";c.style.cursor="pointer";c.style.marginLeft="6px";c.appendChild(d);d=function(a){return function(){for(var b=
 0,c=0;c<k.length;c++){if(k[c]==a){l[c]=null;g.table.deleteRow(b);break}null!=l[c]&&b++}}}(b);mxEvent.addListener(c,"click",d);a.parentNode.style.whiteSpace="nowrap";a.parentNode.appendChild(c)},p=function(a,b,c){k[a]=b;l[a]=g.addTextarea(k[m]+":",c,2);l[a].style.width="100%";n(l[a],b)},q=[],r=0;r<h.length;r++)"label"!=h[r].nodeName&&"placeholders"!=h[r].nodeName&&q.push({name:h[r].nodeName,value:h[r].nodeValue});q.sort(function(a,b){return a.name<b.name?-1:a.name>b.name?1:0});for(r=0;r<q.length;r++)p(m,
-q[r].name,q[r].value),m++;b.appendChild(g.table);h=document.createElement("div");h.style.whiteSpace="nowrap";h.style.marginTop="6px";var t=document.createElement("input");t.setAttribute("placeholder",mxResources.get("enterPropertyName"));t.setAttribute("type","text");t.setAttribute("size",mxClient.IS_IE||mxClient.IS_IE11?"18":"22");t.style.marginLeft="2px";h.appendChild(t);b.appendChild(h);var u=mxUtils.button(mxResources.get("addProperty"),function(){var a=t.value;if(0<a.length&&"label"!=a&&"placeholders"!=
-a&&0>a.indexOf(":"))try{var b=mxUtils.indexOf(k,a);if(0<=b&&null!=l[b])l[b].focus();else{f.cloneNode(!1).setAttribute(a,"");0<=b&&(k.splice(b,1),l.splice(b,1));k.push(a);var c=g.addTextarea(a+":","",2);c.style.width="100%";l.push(c);n(c,a);c.focus()}t.value=""}catch(B){mxUtils.alert(B)}else mxUtils.alert(mxResources.get("invalidName"))});this.init=function(){0<l.length?l[0].focus():t.focus()};u.setAttribute("disabled","disabled");u.style.marginLeft="10px";u.style.width="144px";h.appendChild(u);h=
-mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog.apply(a,arguments)});h.className="geBtn";p=mxUtils.button(mxResources.get("apply"),function(){try{a.hideDialog.apply(a,arguments);f=f.cloneNode(!0);for(var b=!1,d=0;d<k.length;d++)null==l[d]?f.removeAttribute(k[d]):(f.setAttribute(k[d],l[d].value),b=b||"placeholder"==k[d]&&"1"==f.getAttribute("placeholders"));b&&f.removeAttribute("label");e.getModel().setValue(c,f)}catch(C){mxUtils.alert(C)}});p.className="geBtn gePrimaryBtn";mxEvent.addListener(t,
-"keyup",d);mxEvent.addListener(t,"change",d);q=document.createElement("div");q.style.marginTop="18px";q.style.textAlign="right";if(a.editor.graph.getModel().isVertex(c)||a.editor.graph.getModel().isEdge(c)){r=document.createElement("span");r.style.marginRight="10px";var w=document.createElement("input");w.setAttribute("type","checkbox");w.style.marginRight="6px";"1"==f.getAttribute("placeholders")&&(w.setAttribute("checked","checked"),w.defaultChecked=!0);mxEvent.addListener(w,"click",function(){"1"==
-f.getAttribute("placeholders")?f.removeAttribute("placeholders"):f.setAttribute("placeholders","1")});r.appendChild(w);mxUtils.write(r,mxResources.get("placeholders"));if(null!=EditDataDialog.placeholderHelpLink){w=document.createElement("a");w.setAttribute("href",EditDataDialog.placeholderHelpLink);w.setAttribute("title",mxResources.get("help"));w.setAttribute("target","_blank");w.style.marginLeft="10px";w.style.cursor="help";var v=document.createElement("img");v.setAttribute("border","0");v.setAttribute("valign",
-"middle");v.style.marginTop=mxClient.IS_IE11?"0px":"-4px";v.setAttribute("src",Editor.helpImage);w.appendChild(v);r.appendChild(w)}q.appendChild(r)}a.editor.cancelFirst?(q.appendChild(h),q.appendChild(p)):(q.appendChild(p),q.appendChild(h));b.appendChild(q);this.container=b};EditDataDialog.placeholderHelpLink=null;
+q[r].name,q[r].value),m++;b.appendChild(g.table);h=document.createElement("div");h.style.whiteSpace="nowrap";h.style.marginTop="6px";var t=document.createElement("input");t.setAttribute("placeholder",mxResources.get("enterPropertyName"));t.setAttribute("type","text");t.setAttribute("size",mxClient.IS_IE||mxClient.IS_IE11?"18":"22");t.style.marginLeft="2px";h.appendChild(t);b.appendChild(h);var w=mxUtils.button(mxResources.get("addProperty"),function(){var a=t.value;if(0<a.length&&"label"!=a&&"placeholders"!=
+a&&0>a.indexOf(":"))try{var b=mxUtils.indexOf(k,a);if(0<=b&&null!=l[b])l[b].focus();else{f.cloneNode(!1).setAttribute(a,"");0<=b&&(k.splice(b,1),l.splice(b,1));k.push(a);var c=g.addTextarea(a+":","",2);c.style.width="100%";l.push(c);n(c,a);c.focus()}t.value=""}catch(C){mxUtils.alert(C)}else mxUtils.alert(mxResources.get("invalidName"))});this.init=function(){0<l.length?l[0].focus():t.focus()};w.setAttribute("disabled","disabled");w.style.marginLeft="10px";w.style.width="144px";h.appendChild(w);h=
+mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog.apply(a,arguments)});h.className="geBtn";p=mxUtils.button(mxResources.get("apply"),function(){try{a.hideDialog.apply(a,arguments);f=f.cloneNode(!0);for(var b=!1,d=0;d<k.length;d++)null==l[d]?f.removeAttribute(k[d]):(f.setAttribute(k[d],l[d].value),b=b||"placeholder"==k[d]&&"1"==f.getAttribute("placeholders"));b&&f.removeAttribute("label");e.getModel().setValue(c,f)}catch(B){mxUtils.alert(B)}});p.className="geBtn gePrimaryBtn";mxEvent.addListener(t,
+"keyup",d);mxEvent.addListener(t,"change",d);q=document.createElement("div");q.style.marginTop="18px";q.style.textAlign="right";if(a.editor.graph.getModel().isVertex(c)||a.editor.graph.getModel().isEdge(c)){r=document.createElement("span");r.style.marginRight="10px";var u=document.createElement("input");u.setAttribute("type","checkbox");u.style.marginRight="6px";"1"==f.getAttribute("placeholders")&&(u.setAttribute("checked","checked"),u.defaultChecked=!0);mxEvent.addListener(u,"click",function(){"1"==
+f.getAttribute("placeholders")?f.removeAttribute("placeholders"):f.setAttribute("placeholders","1")});r.appendChild(u);mxUtils.write(r,mxResources.get("placeholders"));if(null!=EditDataDialog.placeholderHelpLink){u=document.createElement("a");u.setAttribute("href",EditDataDialog.placeholderHelpLink);u.setAttribute("title",mxResources.get("help"));u.setAttribute("target","_blank");u.style.marginLeft="10px";u.style.cursor="help";var v=document.createElement("img");v.setAttribute("border","0");v.setAttribute("valign",
+"middle");v.style.marginTop=mxClient.IS_IE11?"0px":"-4px";v.setAttribute("src",Editor.helpImage);u.appendChild(v);r.appendChild(u)}q.appendChild(r)}a.editor.cancelFirst?(q.appendChild(h),q.appendChild(p)):(q.appendChild(p),q.appendChild(h));b.appendChild(q);this.container=b};EditDataDialog.placeholderHelpLink=null;
 var LinkDialog=function(a,c,d,b){var e=document.createElement("div");mxUtils.write(e,mxResources.get("editLink")+":");var f=document.createElement("div");f.className="geTitle";f.style.backgroundColor="transparent";f.style.borderColor="transparent";f.style.whiteSpace="nowrap";f.style.textOverflow="clip";f.style.cursor="default";mxClient.IS_VML||(f.style.paddingRight="20px");var h=document.createElement("input");h.setAttribute("value",c);h.setAttribute("placeholder","http://www.example.com/");h.setAttribute("type",
 "text");h.style.marginTop="6px";h.style.width="400px";h.style.backgroundImage="url('"+Dialog.prototype.clearImage+"')";h.style.backgroundRepeat="no-repeat";h.style.backgroundPosition="100% 50%";h.style.paddingRight="14px";c=document.createElement("div");c.setAttribute("title",mxResources.get("reset"));c.style.position="relative";c.style.left="-16px";c.style.width="12px";c.style.height="14px";c.style.cursor="pointer";c.style.display=mxClient.IS_VML?"inline":"inline-block";c.style.top=(mxClient.IS_VML?
 0:3)+"px";c.style.background="url("+IMAGE_PATH+"/transparent.gif)";mxEvent.addListener(c,"click",function(){h.value="";h.focus()});f.appendChild(h);f.appendChild(c);e.appendChild(f);this.init=function(){h.focus();mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode||mxClient.IS_QUIRKS?h.select():document.execCommand("selectAll",!1,null)};f=document.createElement("div");f.style.marginTop="18px";f.style.textAlign="right";mxEvent.addListener(h,"keypress",function(c){13==c.keyCode&&(a.hideDialog(),
@@ -3099,21 +3101,21 @@ function(){k.suspended=!0}));this.window.addListener(mxEvent.NORMALIZE,mxUtils.b
 k.init(g);a.editor.addListener("resetGraphView",f);a.addListener("pageFormatChanged",f);a.addListener("backgroundColorChanged",f);a.addListener("backgroundImageChanged",f);a.addListener("pageViewChanged",function(){f();k.update(!0)});if(k.outline.dialect==mxConstants.DIALECT_SVG){var m=a.actions.get("zoomIn"),n=a.actions.get("zoomOut");mxEvent.addMouseWheelListener(function(a,b){for(var c=!1,d=mxEvent.getSource(a);null!=d;){if(d==k.outline.view.canvas.ownerSVGElement){c=!0;break}d=d.parentNode}c&&
 (b?m.funct():n.funct(),mxEvent.consume(a))})}},LayersWindow=function(a,c,d,b,e){function f(b){if(g.isEnabled()&&null!=b){var c=new FilenameDialog(a,b.value||mxResources.get("background"),mxResources.get("rename"),mxUtils.bind(this,function(a){null!=a&&g.getModel().setValue(b,a)}),mxResources.get("enterName"));a.showDialog(c.container,300,100,!0,!0);c.init()}}function h(){function a(a,b,c,d){var e=document.createElement("div");e.className="geToolbarContainer";e.style.overflow="hidden";e.style.position=
 "relative";e.style.padding="4px";e.style.height="22px";e.style.display="block";e.style.backgroundColor="whiteSmoke";e.style.borderWidth="0px 0px 1px 0px";e.style.borderColor="#c3c3c3";e.style.borderStyle="solid";e.style.whiteSpace="nowrap";var k=document.createElement("div");k.style.display="inline-block";k.style.width="100%";k.style.textOverflow="ellipsis";k.style.overflow="hidden";mxEvent.addListener(e,"dragover",function(b){b.dataTransfer.dropEffect="move";p=a;b.stopPropagation();b.preventDefault()});
-mxEvent.addListener(e,"dragstart",function(a){n=e;mxClient.IS_FF&&a.dataTransfer.setData("Text","<layer/>")});mxEvent.addListener(e,"dragend",function(a){null!=n&&null!=p&&g.addCell(c,g.model.root,p);p=n=null;a.stopPropagation();a.preventDefault()});var l=document.createElement("img");l.setAttribute("draggable","false");l.setAttribute("align","top");l.setAttribute("border","0");l.style.padding="4px";l.setAttribute("title",mxResources.get("lockUnlock"));var t=g.view.getState(c),x=null!=t?t.style:g.getCellStyle(c);
-"1"==mxUtils.getValue(x,"locked","0")?l.setAttribute("src",Dialog.prototype.lockedImage):l.setAttribute("src",Dialog.prototype.unlockedImage);g.isEnabled()&&(l.style.cursor="pointer");mxEvent.addListener(l,"click",function(a){if(g.isEnabled()){var b=null;g.getModel().beginUpdate();try{b="1"==mxUtils.getValue(x,"locked","0")?null:"1",g.setCellStyles("locked",b,[c])}finally{g.getModel().endUpdate()}"1"==b&&g.removeSelectionCells(g.getModel().getDescendants(c));mxEvent.consume(a)}});k.appendChild(l);
+mxEvent.addListener(e,"dragstart",function(a){n=e;mxClient.IS_FF&&a.dataTransfer.setData("Text","<layer/>")});mxEvent.addListener(e,"dragend",function(a){null!=n&&null!=p&&g.addCell(c,g.model.root,p);p=n=null;a.stopPropagation();a.preventDefault()});var l=document.createElement("img");l.setAttribute("draggable","false");l.setAttribute("align","top");l.setAttribute("border","0");l.style.padding="4px";l.setAttribute("title",mxResources.get("lockUnlock"));var t=g.view.getState(c),u=null!=t?t.style:g.getCellStyle(c);
+"1"==mxUtils.getValue(u,"locked","0")?l.setAttribute("src",Dialog.prototype.lockedImage):l.setAttribute("src",Dialog.prototype.unlockedImage);g.isEnabled()&&(l.style.cursor="pointer");mxEvent.addListener(l,"click",function(a){if(g.isEnabled()){var b=null;g.getModel().beginUpdate();try{b="1"==mxUtils.getValue(u,"locked","0")?null:"1",g.setCellStyles("locked",b,[c])}finally{g.getModel().endUpdate()}"1"==b&&g.removeSelectionCells(g.getModel().getDescendants(c));mxEvent.consume(a)}});k.appendChild(l);
 l=document.createElement("input");l.setAttribute("type","checkbox");l.setAttribute("title",mxResources.get("hideIt",[c.value||mxResources.get("background")]));l.style.marginLeft="4px";l.style.marginRight="6px";l.style.marginTop="4px";k.appendChild(l);g.model.isVisible(c)&&(l.setAttribute("checked","checked"),l.defaultChecked=!0);mxEvent.addListener(l,"click",function(a){g.model.setVisible(c,!g.model.isVisible(c));mxEvent.consume(a)});mxUtils.write(k,b);e.appendChild(k);if(g.isEnabled()){if(mxClient.IS_TOUCH||
 mxClient.IS_POINTER||mxClient.IS_VML||mxClient.IS_IE&&10>document.documentMode)b=document.createElement("div"),b.style.display="block",b.style.textAlign="right",b.style.whiteSpace="nowrap",b.style.position="absolute",b.style.right="6px",b.style.top="6px",0<a&&(k=document.createElement("a"),k.setAttribute("title",mxResources.get("toBack")),k.className="geButton",k.style.cssFloat="none",k.innerHTML="&#9660;",k.style.width="14px",k.style.height="14px",k.style.fontSize="14px",k.style.margin="0px",k.style.marginTop=
 "-1px",b.appendChild(k),mxEvent.addListener(k,"click",function(b){g.isEnabled()&&g.addCell(c,g.model.root,a-1);mxEvent.consume(b)})),0<=a&&a<q-1&&(k=document.createElement("a"),k.setAttribute("title",mxResources.get("toFront")),k.className="geButton",k.style.cssFloat="none",k.innerHTML="&#9650;",k.style.width="14px",k.style.height="14px",k.style.fontSize="14px",k.style.margin="0px",k.style.marginTop="-1px",b.appendChild(k),mxEvent.addListener(k,"click",function(b){g.isEnabled()&&g.addCell(c,g.model.root,
 a+1);mxEvent.consume(b)})),e.appendChild(b);mxClient.IS_SVG&&(!mxClient.IS_IE||10<=document.documentMode)&&(e.setAttribute("draggable","true"),e.style.cursor="move")}mxEvent.addListener(e,"dblclick",function(a){var b=mxEvent.getSource(a).nodeName;"INPUT"!=b&&"IMG"!=b&&(f(c),mxEvent.consume(a))});g.getDefaultParent()==c?(e.style.background="#e6eff8",e.style.fontWeight=g.isEnabled()?"bold":"",r=c):mxEvent.addListener(e,"click",function(a){g.isEnabled()&&(g.setDefaultParent(d),g.view.setCurrentRoot(null),
-h())});m.appendChild(e)}q=g.model.getChildCount(g.model.root);m.innerHTML="";for(var b=q-1;0<=b;b--)mxUtils.bind(this,function(c){a(b,c.value||mxResources.get("background"),c,c)})(g.model.getChildAt(g.model.root,b));u.setAttribute("title",mxResources.get("removeIt",[r.value||mxResources.get("background")]));w.setAttribute("title",mxResources.get("moveSelectionTo",[r.value||mxResources.get("background")]));A.setAttribute("title",mxResources.get("duplicateIt",[r.value||mxResources.get("background")]));
-v.setAttribute("title",mxResources.get("renameIt",[r.value||mxResources.get("background")]));g.isSelectionEmpty()&&(w.className="geButton mxDisabled")}var g=a.editor.graph,k=document.createElement("div");k.style.userSelect="none";k.style.background="whiteSmoke";k.style.border="1px solid whiteSmoke";k.style.height="100%";k.style.marginBottom="10px";k.style.overflow="auto";var l=EditorUi.compactUi?"26px":"30px",m=document.createElement("div");m.style.backgroundColor="#e5e5e5";m.style.position="absolute";
+h())});m.appendChild(e)}q=g.model.getChildCount(g.model.root);m.innerHTML="";for(var b=q-1;0<=b;b--)mxUtils.bind(this,function(c){a(b,c.value||mxResources.get("background"),c,c)})(g.model.getChildAt(g.model.root,b));w.setAttribute("title",mxResources.get("removeIt",[r.value||mxResources.get("background")]));u.setAttribute("title",mxResources.get("moveSelectionTo",[r.value||mxResources.get("background")]));A.setAttribute("title",mxResources.get("duplicateIt",[r.value||mxResources.get("background")]));
+v.setAttribute("title",mxResources.get("renameIt",[r.value||mxResources.get("background")]));g.isSelectionEmpty()&&(u.className="geButton mxDisabled")}var g=a.editor.graph,k=document.createElement("div");k.style.userSelect="none";k.style.background="whiteSmoke";k.style.border="1px solid whiteSmoke";k.style.height="100%";k.style.marginBottom="10px";k.style.overflow="auto";var l=EditorUi.compactUi?"26px":"30px",m=document.createElement("div");m.style.backgroundColor="#e5e5e5";m.style.position="absolute";
 m.style.overflow="auto";m.style.left="0px";m.style.right="0px";m.style.top="0px";m.style.bottom=parseInt(l)+7+"px";k.appendChild(m);var n=null,p=null;mxEvent.addListener(k,"dragover",function(a){a.dataTransfer.dropEffect="move";p=0;a.stopPropagation();a.preventDefault()});mxEvent.addListener(k,"drop",function(a){a.stopPropagation();a.preventDefault()});var q=null,r=null,t=document.createElement("div");t.className="geToolbarContainer";t.style.position="absolute";t.style.bottom="0px";t.style.left="0px";
-t.style.right="0px";t.style.height=l;t.style.overflow="hidden";t.style.padding=EditorUi.compactUi?"4px 0px 3px 0px":"1px";t.style.backgroundColor="whiteSmoke";t.style.borderWidth="1px 0px 0px 0px";t.style.borderColor="#c3c3c3";t.style.borderStyle="solid";t.style.display="block";t.style.whiteSpace="nowrap";mxClient.IS_QUIRKS&&(t.style.filter="none");l=document.createElement("a");l.className="geButton";mxClient.IS_QUIRKS&&(l.style.filter="none");var u=l.cloneNode();u.innerHTML='<div class="geSprite geSprite-delete" style="display:inline-block;"></div>';
-mxEvent.addListener(u,"click",function(a){if(g.isEnabled()){g.model.beginUpdate();try{var b=g.model.root.getIndex(r);g.removeCells([r],!1);0==g.model.getChildCount(g.model.root)?(g.model.add(g.model.root,new mxCell),g.setDefaultParent(null)):0<b&&b<=g.model.getChildCount(g.model.root)?g.setDefaultParent(g.model.getChildAt(g.model.root,b-1)):g.setDefaultParent(null)}finally{g.model.endUpdate()}}mxEvent.consume(a)});g.isEnabled()||(u.className="geButton mxDisabled");t.appendChild(u);var w=l.cloneNode();
-w.innerHTML='<div class="geSprite geSprite-insert" style="display:inline-block;"></div>';mxEvent.addListener(w,"click",function(a){g.isEnabled()&&!g.isSelectionEmpty()&&g.moveCells(g.getSelectionCells(),0,0,!1,r)});t.appendChild(w);var v=l.cloneNode();v.innerHTML='<div class="geSprite geSprite-dots" style="display:inline-block;"></div>';v.setAttribute("title",mxResources.get("rename"));mxEvent.addListener(v,"click",function(a){g.isEnabled()&&f(r);mxEvent.consume(a)});g.isEnabled()||(v.className="geButton mxDisabled");
+t.style.right="0px";t.style.height=l;t.style.overflow="hidden";t.style.padding=EditorUi.compactUi?"4px 0px 3px 0px":"1px";t.style.backgroundColor="whiteSmoke";t.style.borderWidth="1px 0px 0px 0px";t.style.borderColor="#c3c3c3";t.style.borderStyle="solid";t.style.display="block";t.style.whiteSpace="nowrap";mxClient.IS_QUIRKS&&(t.style.filter="none");l=document.createElement("a");l.className="geButton";mxClient.IS_QUIRKS&&(l.style.filter="none");var w=l.cloneNode();w.innerHTML='<div class="geSprite geSprite-delete" style="display:inline-block;"></div>';
+mxEvent.addListener(w,"click",function(a){if(g.isEnabled()){g.model.beginUpdate();try{var b=g.model.root.getIndex(r);g.removeCells([r],!1);0==g.model.getChildCount(g.model.root)?(g.model.add(g.model.root,new mxCell),g.setDefaultParent(null)):0<b&&b<=g.model.getChildCount(g.model.root)?g.setDefaultParent(g.model.getChildAt(g.model.root,b-1)):g.setDefaultParent(null)}finally{g.model.endUpdate()}}mxEvent.consume(a)});g.isEnabled()||(w.className="geButton mxDisabled");t.appendChild(w);var u=l.cloneNode();
+u.innerHTML='<div class="geSprite geSprite-insert" style="display:inline-block;"></div>';mxEvent.addListener(u,"click",function(a){g.isEnabled()&&!g.isSelectionEmpty()&&g.moveCells(g.getSelectionCells(),0,0,!1,r)});t.appendChild(u);var v=l.cloneNode();v.innerHTML='<div class="geSprite geSprite-dots" style="display:inline-block;"></div>';v.setAttribute("title",mxResources.get("rename"));mxEvent.addListener(v,"click",function(a){g.isEnabled()&&f(r);mxEvent.consume(a)});g.isEnabled()||(v.className="geButton mxDisabled");
 t.appendChild(v);var A=l.cloneNode();A.innerHTML='<div class="geSprite geSprite-duplicate" style="display:inline-block;"></div>';mxEvent.addListener(A,"click",function(a){if(g.isEnabled()){a=null;g.model.beginUpdate();try{a=g.cloneCells([r])[0],a.value=mxResources.get("untitledLayer"),a.setVisible(!0),a=g.addCell(a,g.model.root),g.setDefaultParent(a)}finally{g.model.endUpdate()}null==a||g.isCellLocked(a)||g.selectAll(a)}});g.isEnabled()||(A.className="geButton mxDisabled");t.appendChild(A);l=l.cloneNode();
 l.innerHTML='<div class="geSprite geSprite-plus" style="display:inline-block;"></div>';l.setAttribute("title",mxResources.get("addLayer"));mxEvent.addListener(l,"click",function(a){if(g.isEnabled()){g.model.beginUpdate();try{var b=g.addCell(new mxCell(mxResources.get("untitledLayer")),g.model.root);g.setDefaultParent(b)}finally{g.model.endUpdate()}}mxEvent.consume(a)});g.isEnabled()||(l.className="geButton mxDisabled");t.appendChild(l);k.appendChild(t);h();g.model.addListener(mxEvent.CHANGE,function(){h()});
-g.selectionModel.addListener(mxEvent.CHANGE,function(){g.isSelectionEmpty()?w.className="geButton mxDisabled":w.className="geButton"});this.window=new mxWindow(mxResources.get("layers"),k,c,d,b,e,!0,!0);this.window.destroyOnClose=!1;this.window.setMaximizable(!1);this.window.setResizable(!0);this.window.setClosable(!0);this.window.setVisible(!0);this.refreshLayers=h;this.window.setLocation=function(a,b){var c=window.innerHeight||document.documentElement.clientHeight||document.body.clientHeight;a=
+g.selectionModel.addListener(mxEvent.CHANGE,function(){g.isSelectionEmpty()?u.className="geButton mxDisabled":u.className="geButton"});this.window=new mxWindow(mxResources.get("layers"),k,c,d,b,e,!0,!0);this.window.destroyOnClose=!1;this.window.setMaximizable(!1);this.window.setResizable(!0);this.window.setClosable(!0);this.window.setVisible(!0);this.refreshLayers=h;this.window.setLocation=function(a,b){var c=window.innerHeight||document.documentElement.clientHeight||document.body.clientHeight;a=
 Math.max(0,Math.min(a,(window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth)-this.table.clientWidth));b=Math.max(0,Math.min(b,c-this.table.clientHeight-48));this.getX()==a&&this.getY()==b||mxWindow.prototype.setLocation.apply(this,arguments)};mxEvent.addListener(window,"resize",mxUtils.bind(this,function(){var a=this.window.getX(),b=this.window.getY();this.window.setLocation(a,b)}))};
 (function(){Sidebar.prototype.tagIndex="5V1dV+M6sv01rDvngax0oLvveYQEaGaAziE0PW8sxVYSDbblI9uk6V9/VVWS7ST+kB0zL3etbmIn3ltlfZRKUqkU/rpRLN6MmFJym5yM/8QL/Xnw7yLceXQ03fA3JaOTyfjCQCKZehvu66tErCMW6J9E1M4jlJcFTJWIPP1VIKK1ixj/zML4VBRiTMaf9HOKx8G7/lwy71V/ZJEv8Vv8cKea9KW646tU41nk678/4tK7SZVu5FpC9oz/TDPVnkEPJlsn4wVma1lEnVemGByy6q+M+SXkSmaQ6Vv27gJeBDzyOQDMu1ma5FVEEVBEtuokgQhdyZ62Uv/9qWWoYPRltgx4A3U970/hc6BnIuD+kdI+KbGTcelGce6ec4evOBl/k0r8llGKtWBTvulF98xVKjzEvxWXDVS/M8VHF57Hk0TDpzpxJQGScC9TIoX3euXvVV/UcWWpDFkqsCYyfaM/1ly36vGfgVhv0oiasyfh7ypgyaaBaKHl5/nThqb5VeAvZEigXx8k0AolJJUkVjo7jGBOHFOm29Se3FZin6VsyRL42V+2U90z9crTOGAeIEK8Q1UCnMlGxk4CLWb/gsflKt0y/MLnbzyQccgjaIivAjgTT/Gtr4Quf9cXXWRLjRKxyRwvkBko75hHnjisPzUkP/kyESnHtwoAtQ7kkrehL7UyzUAtLrh6E5g7Nnn9iYo2SWW8ZVr1QYsTIW8gE+ll5kHWQlXGdr/Qug1Zl/RDe2O4FL+fWPBaiJSUZGoDT6HRYT3DN9Gdgy4agY3Q59gj+iIOdAOB/MmYYlHKqYp5PMLaFHMVirSSG2XYySnnZrGHNW19JdaZoiYxGV8LbGq+9DKsT0APT3Sk1ldzXaZszQvOpfzlkndUYodytAPDOEuxuocyEqlUmM+Jbm6HevkAq0sAW8+MB9BmQJs+8HQr1Wup3G2zL6uCetJZjXKofV7J+FLnUUWtxZyLTYa20FzpV1GxEgnVdxH4JOgyS0QECr4F3z3nEUHWUQfUjUi/ZUv7tjqTGaCkl0q6Wou0Ef9tdhslUBAn9Xq4GshZkG6gTmx0m8EqvuGoYzb4iwMYdDnVMcpbS2QM3TYB3mM0Sp71/0fuSVPf7lmki1d10DN3LE6x0/CKut+GuddVgGpRyFCtc/sZYS/Cm9FySdUj3sgIPlOZeZvWNAm1o0uTXH81UO3zZEEqQDkwD5q37t+zdAOqNe/RS/aJ6Tdi5purBt73xV930PiLapT8HTTXqz2Kh7JloQ26bIlVOtAl6dIY9uBPMhbeCdgtu/ZLJeEe1XdduTSPrpc6v9+TlIf64jakMpeQ9RumQFVr3YiV3vcb+eZyy9Viw4Ogl1p+nM2xmofSyNSdYgHjnSzA6m26fu+wTKtwYM30S1LXTkxPsYp0qp+nbu8yg271r4xnWM3/hoseBI+8qttygmLlSfLhZtmsS7CZUd1Kds295iT2m4dTh7aH0qLgF2QqGo5qVVdLtHiPvIp2mdDXinvvXtBgGhLRI4/1sJs09z5TqY6sRCNVqlU+2qxPDNuRuxm20MqLmqNOO3CqHRqxEGEclC3jNtATkMOLhFZpOynrH5FAc3UlcKRsbJHvy/9wD8iylUSFJHhrrfmRYBPaZCGDZ2Mu6QXolr3prFf16OdvsxOjqyqUVPXzVEngw+g2Qrur8WehCxWnqu71sE9gv/QWnrSalK00WglxllLFX+VXVaxv1TMae7yFcRrlV2059PNiNr2+wdxh60gmKamJ7trRDvIm4xsecYXqxI7z6sQ5pICWKDHp6jFiEyjpgtLioL1lU6MmSu3VHZm0QtcI1RVNeKNzGAFJgWOKBdVznGCrFreM/HKITETdyKkM/N9DIDf2cRv0kkURtlU9wqmbZi0/PyWLbc1lyFPVML+0A1ISRx9xkOHMcnWTLiNmB8o4kjikjlm8b+zuQa+bh2qVmG/Gis+HAYE2zZHj9dAqLgPvJXahkWNuP0g0zcIlzrGtpFoK369Qp4fI78Vsse53lGDRGrMlOTTcK/GLUGcjKBk0xzyUesPi+L0VaKqwwAyJsZa1QTJg91Gn6b9BZebsYZ4EWlt2PIafME3WhvvJUC5Te5e2Njdi/n1Ck0qQDos8HmD1qimQAitlmqT6ctQuZDXuvnbYFeZDs2aGrHO/ahjiEB4oTQTESnp0FepuPqhLWeNGFz7OU3sdshlglzYxrUSzgBfmUpPpU8LfSSohuypUtyJVgTLzrapCYpy/3+DL1HLo4Th1tUbgDZjTrfLmYw6DMgpLG2I0PG/UXEiQW/NOdmUJieZWIW7X2uGxpS6pFOc56RJq59+ZiCutggPcaHoJq215aQnIhaXijIqAeoxY7hd6Pc9k/OvTeBi2SZ1U2lbpyNMkVUe2s1qpcEWpG5OW6/NQdOd1ghkTpgtRg1wd2O6nlP+f9Z8vZxfwynOo0yIS1pbu8OYu/Ocu/NVvUEv/5QzTGH+Y/OUEhn0BCXOdv2nZeStgGca+Qv6L7k7ply5yV/GeD8QLo1fUJVis52OdLdW54KDcdgnh5SdDsZ1NSMYB+OZKdzeemUTU5L0JH3kifOr+pplSdm3E9EwTKCDlNXeHjlznnbgWmcIlpZ0X/QQUdT2COw2+VZ0Kd6fBVlGvct2JMGdqdWQlzxMsG9Lo4HwchpO8t1pWzpe2cgxAAVrpeJrPA7zNF9SNx/N87cjBBXSnvLwsp4dPfK3sokXMwDiMauCrQEoVB2i9Bey9fj1h7/HRJWrVmXWaWeIi7ipTkTAdgiPDQphRZj22Bi7lq0fTbl2h0w0Tqg9OxgJ1nM/N6pIbiuZFE7liXfNo+vgERvfzSXkOrzSvVyFHBcuMJ6842apogGJHR51E2SWhBdl+REqP2OxKZIIDgS1TvqL5thqqCp6rgOvhBuYDTzwWmGsXEa71wwPk6zVcaZ47FkIjrJ6EqIZWLa7GMGIMmfmrW7EkNyArDMx8JmnhXlRB+321oo7PVnGvtapXsMwFw7kK/T2OSkWUpKp6+rYKrf/QRJeC6XD9w7ZpIF8CKtBcndvXI4uwewNXTBbHgYD5lo7YSR8sXymxhuVQrDNd4QtSB57RDp0K6Mm0O58nzb3DPoRyycB6JGn8MI7Anx2JPz8S/7kvXgpa79KqQ9HSTcBQ/4Dq0CotVVIe+nbu0/xkKWrPqZS05LyFLzx75yLJzx01EPRQJJW0vr5Ab1tYrMEaHdBdYnvoZrEA9Gg9ZohAmVtHhi359DlmAzyd92ievajkqEH/qHu+GnJYvo0JiMiv9m2vyT6h9WtStVreDrmUaYqylUmW9stWHl2ZhEr0QArLCm8gZwSuUij6ur3sc1PQFH7uT92evohejWaqqiltuElXXLmm/j+A3FjIVhsDuAQF1ydoG5BfGf87K1xIBdNpVK4S5xSjiyiSqXUn+oTtLzTmgdat7X4fNUyTY5imMgjIJXajR7XrgFU4I1Yj9z1PktyDoh1a69DRhEJPs9MSNoQvnJbIC5I5i82MfOy0OrWPXxSlbhwbwJ6vXeg7gIOHiil9HgQiTuwsYHWjr8NPeuOloiEoiV5XaDXoLAyNw1gWeda9L4NqX7NyvM/wpG3jZMXLa0aqbhGSsAFn0UuozURaL35jQQYGiTYcOKvsWCqRo2sRiYS26NxI6cPaVypx9ktnQdhXoNENLhtzM0/kZ3aeyLjHkczYqnhzu9ph/Z6liSi5G+P6TyFokoHR3FRfd9ie9YiCNrGY5SezVumCvRCoMEGUr5BFNCpS1oeBfqvWtnoQpKSAWhFK3EnQpJrNw+T0/cv401zY3LzE1TG/bT23nQQGnZGvh73YYAcmnIx/bsw2i+oq1JX6WLqFriXpUPlYSTZEfrYSf1BG9KKdg180DntLtdt48jVOf1iCvzLhveoeWqIBnV8syacIb5f7q8qNJMaS60e0sM8le6A9vkYOrShobmsmEhgugo691r1yQrtqXCtFI4+uD6aMOhRWwTjHybOe4lhwLxn0ANpM+Z2Yib+G2aAcpGvuSvAABIZafAJ2Et22IcEVW4us6wfq+C6S7kDBQsCcas+wbYINImS/0R7YcrQGi10FbJvU4Ua6m3mxj9J+pQVnCqd2rEttYr9oSL+eB7bmXeu/IU+ZTzZPf+Ir4x9kPrpAF1cLSNL6C1tPo2LHhSPNww7N3t7JPmyTMb3VZPywRzZoIt+enuYfnYbdoTEY6187mW23DfShmYyLPT4DEf5l0UfT/bwu08B8uRnq9mGCZWRP+GSoDsZpvH57U5ppvhet7F6MNzSYt1dTGkgx8LsuqYaeVNrCuL+tIwxz53URloZcHchRr/00+20P07A7cftJPgO3BzSObqMkNTPyh4nQhoxi6C+Kh7umeGXIdYrzyrTE4d5rV+7GdziaNakWdy8rutDfP+5Q6uGXHqZnFasiznRQXfSQERvNwMTfZtcLB/4N88lR1Bd6tC6Wmg837JK1nNA2OOekn+dT/fCb2WwBbrLizezlPixWZ8bSBMBkfKP5KGDE8MncwhpdhPvfPzKZR2kWM4anfp4/4AqMtort1M9HJXJkDjXvPK59fDR7j1goZ+Ci5eNlH6zuA1JT24fiScpErMTelfGWWtwxQgHFjjzCtuJuPPlabFdZTK9hI4CU1LD5pjsLmKV+V7LRWsksxg1IcNHhDR5nYFYqnRg0I1Y7DGhmMD12qaM7njEng/2Y6I//yONAG9BDsy/0hb98H4T2Hv7QJtJBMyPfgD54Nn9XzMNV9SGpaSsqKq/cRu6MBdc0PRqMupDoGiLfYQUGNXqIARPglobh11LlMYfykB2l7wahxgrlvX5sEk9cZ8huDzRQKtakbzDk+1FCsCUTpGAQ6tuLe/08bUXGeA7Ms1uV8of6M2tpff8UM/Pjklg8LY7ij2R0alrmSxLrke4KNjZKlWGvuIKL9jaT+K844epjECUbNApnkPOgUeM/X3eCrRwyjB44eY2kUW34pDKElvowWzyKrfPim8g6prYrSdGFbPU290OwgmbZRoHEXmVmBwR7emHQ9K589FG7k96B/hk0nQWuRNKy6Ee92NUl1NrCPFkWAbhqXT7dWLX8EYuTjUw/LIFnGWQh/wD6BXjF5f1UsZTtMB/UxgtxO0xUsg9OYDJGlyEbzSFpS1HaoA990z06HU8knhzZKFZAVIpoVV/L92CjS6WtHnxx8r5FZ4xmPbZPYSMdQGbmEnRmuZ+BSxs5k2zBqQJpskiklWy1PIuQ4XrcZbGXdyOzpNmGIhLrhZhgucX6peINVyxIRreX0Gvda5tspRiF2Sk8FlPjIwyemeTOGHtHJCIiCOR0sTgfj3fTib1jX+DJSDoQaa0feE+++5K/Z4mSnEGL3N11JS8SdE9HeEra2FrFD0fVEJwXKwldJ25PbrDKdG6T+y2FbhlOcDth5Q1LnHvED0S48Kx/2FCEsd33NxRhFplVkqLAB2obiywGV+ucayDaPBLSTg7QOnlfSrsfbDAhf+w3rmPInvWoA13OtB5XbLiypwg8lxB5eMgqVVuZanqbKm6MWRxY9lBCxLhk9Gl8cwW+HVN5dYJRLrKWiYZmurNPX2FH4z9mJNcfpaWJPG5yYKpu6aZ3cv+m5HAb00cnVgRBzXdi39v8OjrjroXiW7JZiggXhh5ecLu4/2OIdA7Ih+C0URSHz/MioFee56VEdMY8L6Zn4/H4j64J+jq/IUgmzp+b6y6wEYxlgxIykG1Rnohhky3pFde0sAJNcHzJEg7bJCks5iZrXimpI5rC90ezHIe2hvdxLPtLT+vGRajDkGp7CYT67+hf/B0KezcseyPicb7Q//TPKq5zGD7AVEZwdULma3qeVjJ2S57b61YwSp+Hph8BE1dXDgpQOjcGb+4p2SrbAdM3KdPcbjaf3VnymLd5WP3beUk+j7fsaqrn9TkFJPQrFsNcGBZy1fn98ihC1q+7DaDQ1oZqouwycRukFLu3dNmOgkittj46JoQQiBge6qE3zdklpmeydmfxSwdGCKWYi9Gw3aQOW5ZhVeZyJcFB35Yvc2AIX5xYT8lmDuyBqGnbgCttmK3uIAKaf9iKlahB3CBCP+hRsMARW0IkMy8dzS7A6PXFWtBxF0yb1JJOhojg6IqKWFkNZDzMIFCirvAwwaIr7K+WkNhVLLocKNmlbjNx2x6lKob77NeplWVXkmbJ2kgP6LoxmMDQJnrgRQixmXBHdhgHEO11GMbJcYxPF0YqWeLWYzXYy6PrBOx6MQuYNYk40E8+lv7so+hhS5RdIZybEIxJ7RrQAY/HYuYJYxPmN93Ro2mOpaLKnJtIDclkCBLIdnpKBu809V/B2YEQ9rFnzXF120k+DyHVvWn16MhY4oLxfZEUdGfgX8JJf4YhBSXl2riksJ0fl+Yc48rnacYyEc5p+kJbKDRMIc8YJ5TJ09OQexsW4VeTUzoFaZFHC9vWOfu40N3JzE/yubPiqi/fPEs25XHeA/R8EazqB3igGIZaadjY2JH9+y67VkgNe3SbuSkWPY1MtR4aXPYK/r7SC+6df/o6upieXkyJMbcictOiI9GslqgwW9z5ZkOSYUybzp1tCT0ZXwoa49uuqi/bZWEsrawB1RVvovH2ws8u9jK2wqZ0J6uoPkfyHdSigq/G1G2hFKsVV/nu8OOqwlXkqfcYV+Ujr4MSNvBv4piSv5N90S+6GISHsyroG8kqHFXr0GiLkSlkrztjR7cWaQxpYQKduHV8lTxnA/F8PoaHds5r9cvtqwllZuaP5Jr04rKxrai0aiNdteNB6XEtitG9YVy6dGx/u3UO7+rqXgt8BIeZbHRmSDrxBfxX7ozPnDnQxIkSZtd4ALvjNdHoOktsECndRI7iwMLi3LlRVZLgaGiZyIC7t85KovOjpLkNggwW7MwhRJdZAPMhwn4LrDY4HH4u6YFOaWCQOcp6yyXKyXaX2jBOBmREmsMMILbD/OiTDw8ch6gm5l5rEsfQm0o6QBIyWfE0gbKjyxM4p6UhNEcFdjSjpRyY14cFqO+L6ytY9Xg42RmGgd0b7Qfb70kNm9lKo61e1DnZ7XQgYXcZB5UR1hDw/AxdgV+HFHW+R3ysxA+nFlYqrk8nDQPyXoyTwRnPBmc8H5zx8+CMX45hnNeVde1ESC/GyeCMZ4Mzng/O+Hlwxi/9GaEI+vYPk8F1Qg3jETqhhvEInVDDeIROqGE8QifUMB6hEyaD64QaxiN0Qg3jETqhhvEInVDDeIROqGHsoxNknMoXM58ZCS8ZfcX127U5iH2Wh61O+Fvt8V59WXNf/tm8lILPPRGSP8XhGV1Oqf1Z8w6RqHUU6Eu6+womgePf4O5qtjcK46FI7Xmfh4sMHUgnA5MC1SnzUnR9wVj7UwjOkHgUfiQwR7Tlnl8wxY6ztXuTfE6pfddfnHoyi8mDDH4v7vqVK1Li6qZIaAYNHtn5oh/xfCNTabM1hpvqbK7le9GjQwwIhWPQ3eXYDmuvceC9BMz3uYIjmnUBfc/SOLNRNdvOdnYimvQmGkCW3lLAHouXRLcBs6wtjQtO6YtjuEY3T9+L5tDeEMz8W5rhMRpytYKbzbsytdA52dubqe2n7RkdmJbhR7+g1HxX4u/+fiahyYcn9IBud7c3l8V7JVmwm9pSxJIO16tsuv3SmvwX0zr7L6Z1/rFpzR/m/7Xy2knrg8trJ60PLq+dtD64vEBF2cjozv119wQmH5jArfXCwy1oVdqmnlFxyjr09OTdev1ErHWH/JLkcYfpqh98hCu2C8vAYC3RTAF75tSxHqSzEqk5mQOXy4dknXwI69lArM8YbPtNBmlb7O4GDlzfPZpj0p0k3cA+LbApXyhkLjoaNZ1d40BB1qnx4LbGaaVDdyVfrm6SOuXjit+Ztvhn5XTSf1wnqVpoJwPQzqul7TrsbqHsMyOyZW8c1qjRj9lcN2KFTL6OQInikrRX6yS+//ToApuTp3ibs0IZg4FVMCYjRjJIRUgRfEIR+U3L1iWOS4pZo3iMDlXOmK3ZLat01ZcZaXk4OMWRAEbHyQbdepby8BD7ShA1JGaiyXR7SylfMSnZdCJ3BQxEKyITQKzeRvfFMlYJvjKn3KVSBlWvWQOdsoBHvomT7l4dphsME+CLxMuSuvNoKoG79cfmsANQhrpFYVgNXzSPEXdQaKTQuBCnSsyR43ownoqKMwoqSTDc2X/YG3NN1pw20RyYrxLIjY+CrnKyRXeUYcWhIJ6MnRuXhWGHVFDELGnyJNkh2OKMnw11g4Ygd622V/bY+cn4H1dhnL7j7ss8brDizK2Jl3lM2GFgyqJKhjqSd7TIMX64iWZRLOk3nS1T4rgOWLLZceFwTf1aBqRfpFqzSPx2LnkCGte1ljM3dmDKaNXIxFtn+wc41SBvWIalAw242V4ogwI6tnGtP2t3cB6gvnE6eWjDtSVdtxPoECVRszSFIjnA3JXcTA6dXOigrHLNaKWLMDhbOXaomxw2eFN+ylHr5p9d9CuOxmLmGzVbeTBsNVa+klvSjTkTqSZcfA3+3kSKz1svt42yCP7eRpFjPepdikOenMHJjgyGxwFdjlPyJskyh+TpZEut1OQ6EnkQdyXa+IozQvPFCzdBJG2YyE/Ii/6HPnXBRNJ0uWmmlq08CcyoPgu+5XRoBzo61vWBMqbth22kb6Bj8RyhXGExPDHH+QUfJHYtekSFORtmCfouAkUgKs6QOyD4rm2dKD8L7M7E1dLGLK49KZlHcKjM+SpG3MZEGyx4hVFZh1IcnZ+9vQx0MDOq6cQb80Ba44HuJMQjz7vdleIJncQXc6z1iqfK4e0fi+cLipzVkYIe6y/Eopxp1fm6n58eur+vuTmvpZJ1Q2EGs9i8j1OeLvRQISZVOKX+Z5k5V++F7oTNWW0p6RITC84nS6kNrkcM+b7oxu3jh9AUc0JVO2XWgmS8LaJxtljmNQwHAxZfsZqzfA/hGTZVbKaOtlcVjTndDjV3w2Elhzh5MDZwwylt6Hm4CV33De8U3XYpnPv5H3HnavmDgt3AYbLMhv5gnlv3lkckbNf/u83PgdQsSMuMuoOKyNBV4J8soGhI1LbM8NwBJ66h7y1t+W6BYdiHqT0vsDhC0AlmZix3gmrStI6LSYccnQd0hCJtYU/oc4Fc/YrJWLGg1pJAmDnLt0tKd7rWGv1o8zUxh0e5ETzarPB5q0d+CWVsoi6iLuyZYf/4JpX4DU0mgKFhzXlhDjzP0Ga8niw42wdtd8MrzPIaUDe9jhhUL035tEYAnVM4Yj5s/RIJ8dccDVqB88zUEW3lzqeRHHAKxmbB6EEPPU+1HfV2sjO5507QBwvHclIoEjydTFtegtsjbu1nO0sxrWQuXVAwowseJnbKxVy6QPVzGUm9zNIUp160/j6hKMPgQ6Z/hwalvzSWRkjftNAaNZfgfq0LU2Pi3CDuSPCNNFBX/A03PRrO1PIUNZfpqk5aOqdKQjMYtaZAMSBsFkZXCFwOYUtYqG2JVRXjYYixMOe0Fhu88o5CSRNpm0drEXGudhtwmWkyHNWIwZ5Os7JjryE/U6F7s0qrrAI7urBIrfOmSibJ6SVnIYYAgztQFFXn0TqwXcMi+OllwPDA1znz/QCn6xri2N4UlHHMtCrUbcG5HRVgDPokVhlNExR37UAZxnAooglbkd91AdLa8IUwEQsKhk6rxPukU/sSuDOnxDsZn+r/T5laCjzNdqbHl+SdqdrWpPbSeDl9EYns+N4qSzYQZ26ta6qJU4zfnZTPBcMf7SfFPCKcG+doCt+gJQJZe2OTgvDBNok9wlqBda7QLCpe4Od70xAGMNQWi1YJ7yYbfRZKqNGVWfkDcaVpGhfTP/pUiCbKGVK6L8KX+TDcNBtGth2uPkKtOLcT3XjVWqS0ldtxU3cJMLoTf2cCD2MlnBb4UkjcNEt231I0x/Qgsnyktcp9dFsggdy+JDxKrB9j5NLUNpylL/wXLEGv6XXzmxOcOk/zC3eW0bX4Rb7AqWJmt+ZTtuSwR/gbME3GV6VU0mzZrlL2kzjggZ5G4smcmNQfQxJfw/jEL94CFMY1iwZNYz+vepP/gIzfsLgscO9s77VzHYChrgJYn/DC8fHRbXR6Rz3Oo9QjF3Cwvzd4EQVt/vuVRAuwg7zuRGRQlYiOxePknteJIiMPcPh0e1j3tj7OIxmIXzGptINKOFpEVmeYm9bEEl2/9Nu9mN6YDoSxvWYz9A2Oh8axD125AkYzmS1xpgwCcCqOu4ifmF0qS5mggacnILxwy2tbTsRjc362whzHdbQsureQMv1jCKJSPkH02qE4oR8DSqlHkuHApI9Srj6AUn/A2HJgod/0YNIfkotq4mDlPxPaePWHzNUdRpL2QyrENQswYMaQlIG0kTMGy449ziOKTzHv1cQjtSGipyxlwTuuw9rRbh4a7Ww8GeuPFU2bwNazDd8GPCX3G++VfDMGSuvTsWl1BYHbLB24s8bTzSIaNOQn/b2HS5wxM79X40csgk14OI0Rme14qcwUrRLTVVj+sZlmhIEVZnJtzi1bCt9v2RBJ+JWUfk3SrbjRlGFQ30J3kY8OLR0t8d6J55ph2V6TLCFvcaIpIR95krJMschu0lo1cLQSTLoRkOeOR8uwuRtPyH3hkaWxkUl8GHKulkXnJ27WvMNjMzx9A7GTxO+mGMk1TLcYXfk3s3OLonTfjWkhPQqA5hyXvIboaTaD6gWrBHuxn3NvcZ+zlXlmP2z2Hq9ub5nmvGIK8zyGyDUYrFW33tY6Z8D/zHTh0BkbFr7Gste1UcGI+L2CsJrqnlEczzt6Ad0AmN/sTrkHR/v2eDG48jL1PggVueokeoAdBKJlGWsH+cDjNKPQ58cKMQ8y9Pw/mmjBzL7F45kiuV0F7BWe3DYtBFRh8Vgf3MiUtiyrVeAmPXFnPXHnnXE/tBrNBqnIz/xYIqdw+oeA0TXX3SkWruyEuydUR4ytDybNTrhJZ9xPfCXTT/J+2EkXbMJWHI8Y2LDfVSZVHQKsmW5mTIHTHVVIzp5g165p7Q0+tXXX2jMknoA5kJHugSXONIDwQcUpVhXQWCo6hxEuSp8OKAgrKdGA1WZtGJLwsaxdd61g+Bd7Z7j9RG7NSrckL1MWybrACTsEj3juzTJgZkEjPwdH5T+0Z5+l2prU96VxQj+foN8RbOAh++CNb4TXbkoa/IIJGu5hiom+a5ue3oNHwkztQRQNmZDxk69WFodopeAmBZricENBDbXHI5zqA8dVG3vjTZvdLqaC5XjVPbLOTWWKKcnvO3BEWECK1hkSe1e+bgx9uEtma6zdatal1pbAE3dwyr1N7Wk0VcZjA8veYXB0RmRYOkBy99jFtDiUrpbTfX3+APq4gMOCYAkI2oCgQKVkfSVwNAHqoyaCp/ztTXE0nD7TCJ4cAz47Bnx+DPhzFzDscoR6WGrQb9ycJgGn2HYjGF2gr3iR9XjdVYwyy2QQlrNBWM4HYfk8CMuXQVi+9me5xHDCWMjZMsCKkj/Ri2oyHNXZcFTnQ1BNWR68Ww/mHLy+G1gmg7CcDcJyfiQLHNeYqgw9JVcCp5DsbReaG4V7TSbjpwptVlNgraQLWo295AGaUPpuSZcdecySE1Mh+QLBJ87PO1p0+3SKiWiohmfJBml6lmyQxqfJwgHfMhzuJaF6kmBHVC5LMxmG5mwYmvNhaD4PQ/NlGJqv3WmMAVSzCFAHGZFz7WT8cHWCx8qkm1NOe27xhjfuv61m+pkzbXnBZK67MC1ApkRmhUx400Omxc+cyciBNx1kumTrNQ0GgsxeOUPVEl1xFrSdZMOE8lriye0SQOiGyfgCu4uFzN70aLTEByEdktJl2nh6xA4zbSXx3ksePCcYI85tkcCwXAX8zXh3BGLV4cVwZzB5AdvtWo5InC+aM2Xmi7rMOBmGudnq6dksqDzRrBoLGY8zRpTrXXL8R6zHpIK8YuzF3r//Aw==";
 Sidebar.prototype.searchFileUrl="search.xml";Sidebar.prototype.gearImage=GRAPH_IMAGE_PATH+"/clipart/Gear_128x128.png";Sidebar.prototype.libAliases={aws2:"aws3"};Sidebar.prototype.defaultEntries="general;images;uml;er;bpmn;flowchart;basic;arrows2";Sidebar.prototype.signs="Animals Food Healthcare Nature People Safety Science Sports Tech Transportation Travel".split(" ");Sidebar.prototype.gcp="Cards;Big Data;Compute;Developer Tools;Extras;Identity and Security;Machine Learning;Management Tools;Networking;Storage Databases".split(";");
@@ -5910,7 +5912,7 @@ this.createVertexTemplateEntry(a+"vimeo;fillColor=#1AB7EA;strokeColor=none",62.6
 DrawioFile=function(a,d){mxEventSource.call(this);this.ui=a;this.data=d||""};mxUtils.extend(DrawioFile,mxEventSource);DrawioFile.prototype.autosaveDelay=1500;DrawioFile.prototype.maxAutosaveDelay=3E4;DrawioFile.prototype.autosaveThread=null;DrawioFile.prototype.lastAutosave=null;DrawioFile.prototype.modified=!1;DrawioFile.prototype.changeListenerEnabled=!0;DrawioFile.prototype.lastAutosaveRevision=null;DrawioFile.prototype.maxAutosaveRevisionDelay=18E5;DrawioFile.prototype.descriptorChanged=function(){this.fireEvent(new mxEventObject("descriptorChanged"))};
 DrawioFile.prototype.contentChanged=function(){this.fireEvent(new mxEventObject("contentChanged"))};DrawioFile.prototype.save=function(a,d,f,c){this.updateFileData();this.clearAutosave()};DrawioFile.prototype.updateFileData=function(){this.setData(this.ui.getFileData())};DrawioFile.prototype.saveAs=function(a,d,f){};DrawioFile.prototype.saveFile=function(a,d,f,c){};DrawioFile.prototype.getPublicUrl=function(a){a(null)};DrawioFile.prototype.isRestricted=function(){return!1};
 DrawioFile.prototype.isModified=function(){return this.modified};DrawioFile.prototype.setModified=function(a){this.modified=a};DrawioFile.prototype.isAutosaveOptional=function(){return!1};DrawioFile.prototype.isAutosave=function(){return this.ui.editor.autosave};DrawioFile.prototype.isRenamable=function(){return!1};DrawioFile.prototype.rename=function(a,d,f){};DrawioFile.prototype.isMovable=function(){return!1};DrawioFile.prototype.move=function(a,d,f){};DrawioFile.prototype.getHash=function(){return""};
-DrawioFile.prototype.getId=function(){return""};DrawioFile.prototype.isEditable=function(){return!this.ui.editor.chromeless};DrawioFile.prototype.getUi=function(){return this.ui};DrawioFile.prototype.getTitle=function(){return""};DrawioFile.prototype.setData=function(a){this.data=a};DrawioFile.prototype.getData=function(){return this.data};
+DrawioFile.prototype.getId=function(){return""};DrawioFile.prototype.isEditable=function(){return!this.ui.editor.chromeless||this.ui.editor.editable};DrawioFile.prototype.getUi=function(){return this.ui};DrawioFile.prototype.getTitle=function(){return""};DrawioFile.prototype.setData=function(a){this.data=a};DrawioFile.prototype.getData=function(){return this.data};
 DrawioFile.prototype.open=function(){this.ui.setFileData(this.getData());this.changeListener=mxUtils.bind(this,function(a,d){var f=null!=d?d.getProperty("edit"):null;!this.changeListenerEnabled||!this.isEditable()||null!=f&&f.ignoreEdit||(this.setModified(!0),this.isAutosave()?(this.ui.editor.setStatus(mxUtils.htmlEntities(mxResources.get("saving"))+"..."),this.autosave(this.autosaveDelay,this.maxAutosaveDelay,mxUtils.bind(this,function(a){null!=this.autosaveThread||this.ui.getCurrentFile()!=this||
 this.isModified()||this.ui.editor.setStatus(mxUtils.htmlEntities(mxResources.get("allChangesSaved")))}),mxUtils.bind(this,function(a){this.ui.getCurrentFile()==this&&this.addUnsavedStatus(a)}))):this.addUnsavedStatus())});this.ui.editor.graph.model.addListener(mxEvent.CHANGE,this.changeListener);this.ui.editor.graph.addListener("gridSizeChanged",this.changeListener);this.ui.editor.graph.addListener("shadowVisibleChanged",this.changeListener);this.ui.addListener("pageFormatChanged",this.changeListener);
 this.ui.addListener("pageScaleChanged",this.changeListener);this.ui.addListener("backgroundColorChanged",this.changeListener);this.ui.addListener("backgroundImageChanged",this.changeListener);this.ui.addListener("foldingEnabledChanged",this.changeListener);this.ui.addListener("mathEnabledChanged",this.changeListener);this.ui.addListener("gridEnabledChanged",this.changeListener);this.ui.addListener("guidesEnabledChanged",this.changeListener);this.ui.addListener("pageViewChanged",this.changeListener)};
@@ -5927,20 +5929,20 @@ StorageFile.prototype.isRenamable=function(){return!0};StorageFile.prototype.sav
 StorageFile.prototype.saveFile=function(a,d,f,c){if(this.isEditable()){var h=mxUtils.bind(this,function(){this.isRenamable()&&(this.title=a);try{this.ui.setLocalData(this.title,this.getData(),mxUtils.bind(this,function(){this.setModified(!1);this.contentChanged();null!=f&&f()}))}catch(k){null!=c&&c(k)}});this.isRenamable()&&"."==a.charAt(0)&&null!=c?c({message:mxResources.get("invalidName")}):this.ui.getLocalData(a,mxUtils.bind(this,function(f){this.isRenamable()&&this.getTitle()!=a&&null!=f?this.ui.confirm(mxResources.get("replaceIt",
 [a]),h,c):h()}))}else null!=f&&f()};StorageFile.prototype.rename=function(a,d,f){var c=this.getTitle();c!=a?this.ui.getLocalData(a,mxUtils.bind(this,function(h){this.ui.confirm(mxResources.get("replaceIt",[a]),mxUtils.bind(this,function(){this.title=a;this.hasSameExtension(c,a)||this.setData(this.ui.getFileData());this.saveFile(a,!1,mxUtils.bind(this,function(){this.ui.removeLocalData(c,d)}),f)}),f)})):d()};StorageFile.prototype.open=function(){DrawioFile.prototype.open.apply(this,arguments);this.saveFile(this.getTitle())};
 StorageFile.prototype.destroy=function(){DrawioFile.prototype.destroy.apply(this,arguments);null!=this.storageListener&&(mxEvent.removeListener(window,"storage",this.storageListener),this.storageListener=null)};StorageLibrary=function(a,d,f){StorageFile.call(this,a,d,f)};mxUtils.extend(StorageLibrary,StorageFile);StorageLibrary.prototype.isAutosave=function(){return!0};StorageLibrary.prototype.saveAs=function(a,d,f){this.saveFile(a,!1,d,f)};StorageLibrary.prototype.getHash=function(){return"L"+encodeURIComponent(this.title)};StorageLibrary.prototype.getTitle=function(){return".scratchpad"==this.title?mxResources.get("scratchpad"):this.title};
-StorageLibrary.prototype.isRenamable=function(a,d,f){return".scratchpad"!=this.title};StorageLibrary.prototype.open=function(){};UrlLibrary=function(a,d,f){StorageFile.call(this,a,d,f);a=f;d=a.lastIndexOf("/");0<=d&&(a=a.substring(d+1));this.fname=a};mxUtils.extend(UrlLibrary,StorageFile);UrlLibrary.prototype.getHash=function(){return"U"+encodeURIComponent(this.title)};UrlLibrary.prototype.getTitle=function(){return this.fname};UrlLibrary.prototype.isAutosave=function(){return!1};UrlLibrary.prototype.isEditable=function(a,d,f){return!1};UrlLibrary.prototype.saveAs=function(a,d,f){};UrlLibrary.prototype.open=function(){};var StorageDialog=function(a,d,f){function c(c,q,x,p,w,h){function t(){mxEvent.addListener(v,"click",null!=h?h:function(){x!=App.MODE_GOOGLE||a.isDriveDomain()?x==App.MODE_GOOGLE&&a.spinner.spin(document.body,mxResources.get("authorizing"))?a.drive.checkToken(mxUtils.bind(this,function(){a.spinner.stop();a.setMode(x,e.checked);d()})):(a.setMode(x,e.checked),d()):window.location.hostname=DriveClient.prototype.newAppHostname})}var v=document.createElement("a");v.style.overflow="hidden";v.style.display=
-mxClient.IS_QUIRKS?"inline":"inline-block";v.className="geBaseButton";v.style.fontSize="11px";v.style.position="relative";v.style.margin="4px";v.style.padding="8px 10px 12px 10px";v.style.width="68px";v.style.height="80px";v.style.whiteSpace="nowrap";v.setAttribute("title",q);mxClient.IS_QUIRKS&&(v.style.cssFloat="left",v.style.zoom="1");var y=document.createElement("div");y.style.textOverflow="ellipsis";y.style.overflow="hidden";if(null!=c){var u=document.createElement("img");u.setAttribute("src",
-c);u.setAttribute("border","0");u.setAttribute("align","absmiddle");u.style.width="60px";u.style.height="60px";u.style.paddingBottom="6px";v.appendChild(u)}else y.style.paddingTop="5px",y.style.whiteSpace="normal",mxClient.IS_IOS?(v.style.padding="0px 10px 20px 10px",v.style.top="6px"):mxClient.IS_FF&&(y.style.paddingTop="0px",y.style.marginTop="-2px");v.appendChild(y);mxUtils.write(y,q);if(null!=w)for(c=0;c<w.length;c++)mxUtils.br(y),mxUtils.write(y,w[c]);if(null!=p&&null==a[p]){u.style.visibility=
-"hidden";mxUtils.setOpacity(y,10);var k=new Spinner({lines:12,length:12,width:5,radius:10,rotate:0,color:"#000",speed:1.5,trail:60,shadow:!1,hwaccel:!1,top:"40%",zIndex:2E9});k.spin(v);var m=window.setTimeout(function(){null==a[p]&&(k.stop(),v.style.display="none")},3E4);a.addListener("clientLoaded",mxUtils.bind(this,function(){null!=a[p]&&(window.clearTimeout(m),mxUtils.setOpacity(y,100),u.style.visibility="",k.stop(),t(),"drive"==p&&null!=l.parentNode&&l.parentNode.removeChild(l))}))}else t();b.appendChild(v);
+StorageLibrary.prototype.isRenamable=function(a,d,f){return".scratchpad"!=this.title};StorageLibrary.prototype.open=function(){};UrlLibrary=function(a,d,f){StorageFile.call(this,a,d,f);a=f;d=a.lastIndexOf("/");0<=d&&(a=a.substring(d+1));this.fname=a};mxUtils.extend(UrlLibrary,StorageFile);UrlLibrary.prototype.getHash=function(){return"U"+encodeURIComponent(this.title)};UrlLibrary.prototype.getTitle=function(){return this.fname};UrlLibrary.prototype.isAutosave=function(){return!1};UrlLibrary.prototype.isEditable=function(a,d,f){return!1};UrlLibrary.prototype.saveAs=function(a,d,f){};UrlLibrary.prototype.open=function(){};var StorageDialog=function(a,d,f){function c(c,p,y,t,w,u){function q(){mxEvent.addListener(h,"click",null!=u?u:function(){y!=App.MODE_GOOGLE||a.isDriveDomain()?y==App.MODE_GOOGLE&&a.spinner.spin(document.body,mxResources.get("authorizing"))?a.drive.checkToken(mxUtils.bind(this,function(){a.spinner.stop();a.setMode(y,e.checked);d()})):(a.setMode(y,e.checked),d()):window.location.hostname=DriveClient.prototype.newAppHostname})}var h=document.createElement("a");h.style.overflow="hidden";h.style.display=
+mxClient.IS_QUIRKS?"inline":"inline-block";h.className="geBaseButton";h.style.fontSize="11px";h.style.position="relative";h.style.margin="4px";h.style.padding="8px 10px 12px 10px";h.style.width="68px";h.style.height="80px";h.style.whiteSpace="nowrap";h.setAttribute("title",p);mxClient.IS_QUIRKS&&(h.style.cssFloat="left",h.style.zoom="1");var x=document.createElement("div");x.style.textOverflow="ellipsis";x.style.overflow="hidden";if(null!=c){var v=document.createElement("img");v.setAttribute("src",
+c);v.setAttribute("border","0");v.setAttribute("align","absmiddle");v.style.width="60px";v.style.height="60px";v.style.paddingBottom="6px";h.appendChild(v)}else x.style.paddingTop="5px",x.style.whiteSpace="normal",mxClient.IS_IOS?(h.style.padding="0px 10px 20px 10px",h.style.top="6px"):mxClient.IS_FF&&(x.style.paddingTop="0px",x.style.marginTop="-2px");h.appendChild(x);mxUtils.write(x,p);if(null!=w)for(c=0;c<w.length;c++)mxUtils.br(x),mxUtils.write(x,w[c]);if(null!=t&&null==a[t]){v.style.visibility=
+"hidden";mxUtils.setOpacity(x,10);var k=new Spinner({lines:12,length:12,width:5,radius:10,rotate:0,color:"#000",speed:1.5,trail:60,shadow:!1,hwaccel:!1,top:"40%",zIndex:2E9});k.spin(h);var m=window.setTimeout(function(){null==a[t]&&(k.stop(),h.style.display="none")},3E4);a.addListener("clientLoaded",mxUtils.bind(this,function(){null!=a[t]&&(window.clearTimeout(m),mxUtils.setOpacity(x,100),v.style.visibility="",k.stop(),q(),"drive"==t&&null!=l.parentNode&&l.parentNode.removeChild(l))}))}else q();b.appendChild(h);
 ++g>=f&&(mxUtils.br(b),g=0)}f=null!=f?f:3;var h=document.createElement("div");h.style.textAlign="center";h.style.whiteSpace="nowrap";h.style.paddingTop="0px";h.style.paddingBottom="20px";var k=a.addLanguageMenu(h,!0);null!=k&&(k.style.bottom=parseInt("28px")-2+"px");if(!a.isOffline()&&1<a.getServiceCount()){k=document.createElement("a");k.setAttribute("href","https://support.draw.io/display/DO/Selecting+Storage");k.setAttribute("title",mxResources.get("help"));k.setAttribute("target","_blank");k.style.position=
 "absolute";k.style.textDecoration="none";k.style.cursor="pointer";k.style.fontSize="12px";k.style.bottom="28px";k.style.left="26px";k.style.color="gray";var m=document.createElement("img");m.setAttribute("border","0");m.setAttribute("valign","bottom");m.setAttribute("src",Editor.helpImage);m.style.marginRight="2px";k.appendChild(m);mxUtils.write(k,mxResources.get("help"));h.appendChild(k)}var n=document.createElement("div");n.style.position="absolute";n.style.cursor="pointer";n.style.fontSize="12px";
 n.style.bottom="28px";n.style.color="gray";mxUtils.write(n,mxResources.get("decideLater"));a.isOfflineApp()?n.style.right="20px":(mxUtils.setPrefixedStyle(n.style,"transform","translate(-50%,0)"),n.style.left="50%");this.init=function(){if(mxClient.IS_QUIRKS||8==document.documentMode)n.style.marginLeft=-Math.round(n.clientWidth/2)+"px"};h.appendChild(n);mxEvent.addListener(n,"click",function(){a.hideDialog();var b=Editor.useLocalStorage;a.createFile(a.defaultFilename,null,null,null,null,null,null,
 !0);Editor.useLocalStorage=b});var b=document.createElement("div");mxClient.IS_QUIRKS&&(b.style.whiteSpace="nowrap",b.style.cssFloat="left");b.style.border="1px solid #d3d3d3";b.style.borderWidth="1px 0px 1px 0px";b.style.padding="12px 0px 12px 0px";var e=document.createElement("input");e.setAttribute("type","checkbox");e.setAttribute("checked","checked");e.defaultChecked=!0;var g=0,l=document.createElement("p"),k=document.createElement("p");k.style.fontSize="16pt";k.style.padding="0px";k.style.paddingTop=
 "4px";k.style.paddingBottom="16px";k.style.margin="0px";k.style.color="gray";mxUtils.write(k,mxResources.get("saveDiagramsTo")+":");h.appendChild(k);"function"===typeof window.DriveClient&&c(IMAGE_PATH+"/google-drive-logo.svg",mxResources.get("googleDrive"),App.MODE_GOOGLE,"drive");null!=a.gitHub&&c(IMAGE_PATH+"/github-logo.svg",mxResources.get("github"),App.MODE_GITHUB,"gitHub");"function"===typeof window.DropboxClient&&c(IMAGE_PATH+"/dropbox-logo.svg",mxResources.get("dropbox"),App.MODE_DROPBOX,
 "dropbox");"function"===typeof window.OneDriveClient&&c(IMAGE_PATH+"/onedrive-logo.svg",mxResources.get("oneDrive"),App.MODE_ONEDRIVE,"oneDrive");"function"===typeof window.TrelloClient&&c(IMAGE_PATH+"/trello-logo.svg",mxResources.get("trello"),App.MODE_TRELLO,"trello");mxClient.IS_IOS&&"device"!=urlParams.storage||c(IMAGE_PATH+"/osa_drive-harddisk.png",mxResources.get("device"),App.MODE_DEVICE);!isLocalStorage||"1"!=urlParams.browser&&"1"!=urlParams.offline||c(IMAGE_PATH+"/osa_database.png",mxResources.get("browser"),
-App.MODE_BROWSER);h.appendChild(b);k=document.createElement("p");k.style.marginTop="12px";k.style.marginBottom="6px";k.appendChild(e);m=document.createElement("span");m.style.color="gray";m.style.fontSize="12px";mxUtils.write(m," "+mxResources.get("rememberThisSetting"));k.appendChild(m);mxUtils.br(k);var q=a.getRecent();if(null!=q&&0<q.length){var v=document.createElement("select");v.style.marginTop="8px";v.style.width="140px";var u=document.createElement("option");u.setAttribute("value","");u.setAttribute("selected",
-"selected");u.style.textAlign="center";mxUtils.write(u,mxResources.get("openRecent")+"...");v.appendChild(u);for(u=0;u<q.length;u++)(function(b){var a=b.mode;a==App.MODE_GOOGLE?a="googleDrive":a==App.MODE_ONEDRIVE&&(a="oneDrive");var e=document.createElement("option");e.setAttribute("value",b.id);mxUtils.write(e,b.title+" ("+mxResources.get(a)+")");v.appendChild(e)})(q[u]);k.appendChild(v);mxEvent.addListener(v,"change",function(b){""!=v.value&&a.loadFile(v.value)})}else k.style.marginTop="20px",
-b.style.padding="30px 0px 26px 0px";!Graph.fileSupport||mxClient.IS_IE||mxClient.IS_IE11||(q=document.createElement("div"),q.style.cursor="pointer",q.style.padding="18px 0px 6px 0px",q.style.fontSize="12px",q.style.color="gray",mxUtils.write(q,mxResources.get("import")+" "+mxResources.get("gliffy")+", "+mxResources.get("formatVssx")+", "+mxResources.get("formatVsdx")+", "+mxResources.get("lucidchart")+"..."),mxEvent.addListener(q,"click",function(){var b=document.createElement("input");b.setAttribute("type",
-"file");mxEvent.addListener(b,"change",function(){null!=b.files&&(a.hideDialog(),a.openFiles(b.files,!0))});b.click()}),k.appendChild(q),b.style.paddingBottom="4px");b.appendChild(k);mxEvent.addListener(m,"click",function(b){e.checked=!e.checked;mxEvent.consume(b)});mxClient.IS_SVG&&isLocalStorage&&"0"!=urlParams.gapi&&(null==document.documentMode||10<=document.documentMode)&&window.setTimeout(function(){null==a.drive&&(l.style.padding="8px",l.style.fontSize="9pt",l.style.marginTop="-14px",l.innerHTML=
+App.MODE_BROWSER);h.appendChild(b);k=document.createElement("p");k.style.marginTop="12px";k.style.marginBottom="6px";k.appendChild(e);m=document.createElement("span");m.style.color="gray";m.style.fontSize="12px";mxUtils.write(m," "+mxResources.get("rememberThisSetting"));k.appendChild(m);mxUtils.br(k);var p=a.getRecent();if(null!=p&&0<p.length){var u=document.createElement("select");u.style.marginTop="8px";u.style.width="140px";var v=document.createElement("option");v.setAttribute("value","");v.setAttribute("selected",
+"selected");v.style.textAlign="center";mxUtils.write(v,mxResources.get("openRecent")+"...");u.appendChild(v);for(v=0;v<p.length;v++)(function(b){var a=b.mode;a==App.MODE_GOOGLE?a="googleDrive":a==App.MODE_ONEDRIVE&&(a="oneDrive");var e=document.createElement("option");e.setAttribute("value",b.id);mxUtils.write(e,b.title+" ("+mxResources.get(a)+")");u.appendChild(e)})(p[v]);k.appendChild(u);mxEvent.addListener(u,"change",function(b){""!=u.value&&a.loadFile(u.value)})}else k.style.marginTop="20px",
+b.style.padding="30px 0px 26px 0px";!Graph.fileSupport||mxClient.IS_IE||mxClient.IS_IE11||(p=document.createElement("div"),p.style.cursor="pointer",p.style.padding="18px 0px 6px 0px",p.style.fontSize="12px",p.style.color="gray",mxUtils.write(p,mxResources.get("import")+" "+mxResources.get("gliffy")+", "+mxResources.get("formatVssx")+", "+mxResources.get("formatVsdx")+", "+mxResources.get("lucidchart")+"..."),mxEvent.addListener(p,"click",function(){var b=document.createElement("input");b.setAttribute("type",
+"file");mxEvent.addListener(b,"change",function(){null!=b.files&&(a.hideDialog(),a.openFiles(b.files,!0))});b.click()}),k.appendChild(p),b.style.paddingBottom="4px");b.appendChild(k);mxEvent.addListener(m,"click",function(b){e.checked=!e.checked;mxEvent.consume(b)});mxClient.IS_SVG&&isLocalStorage&&"0"!=urlParams.gapi&&(null==document.documentMode||10<=document.documentMode)&&window.setTimeout(function(){null==a.drive&&(l.style.padding="8px",l.style.fontSize="9pt",l.style.marginTop="-14px",l.innerHTML=
 '<a style="background-color:#dcdcdc;padding:5px;color:black;text-decoration:none;" href="https://plus.google.com/u/0/+DrawIo1/posts/1HTrfsb5wDN" target="_blank"><img border="0" src="'+mxGraph.prototype.warningImage.src+'" align="top"> '+mxResources.get("googleDriveMissingClickHere")+"</a>",h.appendChild(l))},5E3);this.container=h},SplashDialog=function(a){var d=document.createElement("div");d.style.textAlign="center";a.addLanguageMenu(d,!0);var f=null,c=a.getServiceCount();!a.isOffline()&&1<c&&(f=
 document.createElement("a"),f.setAttribute("href","https://support.draw.io/display/DO/Selecting+Storage"),f.setAttribute("title",mxResources.get("help")),f.setAttribute("target","_blank"),f.style.position="absolute",f.style.fontSize="12px",f.style.textDecoration="none",f.style.cursor="pointer",f.style.bottom="22px",f.style.left="26px",f.style.color="gray",c=document.createElement("img"),c.setAttribute("border","0"),c.setAttribute("valign","bottom"),c.setAttribute("src",Editor.helpImage),c.style.marginRight=
 "2px",f.appendChild(c),mxUtils.write(f,mxResources.get("help")),d.appendChild(f));c=document.createElement("p");c.style.fontSize="16pt";c.style.padding="0px";c.style.paddingTop="2px";c.style.margin="0px";c.style.color="gray";var h=document.createElement("img");h.setAttribute("border","0");h.setAttribute("align","absmiddle");h.style.width="40px";h.style.height="40px";h.style.marginRight="12px";h.style.paddingBottom="4px";var k="";a.mode==App.MODE_GOOGLE?(h.src=IMAGE_PATH+"/google-drive-logo.svg",k=
@@ -5960,30 +5962,30 @@ d);e.appendChild(g)}d=document.createElement("div");d.style.padding="6px";d.inne
 null!=n&&n()}),c.className="geBtn gePrimaryBtn",f.appendChild(c));this.init=function(){l.focus()};e.appendChild(f);this.container=e},EmbedDialog=function(a,d,f,c,h){c=document.createElement("div");var k=/^https?:\/\//.test(d)||/^mailto:\/\//.test(d);mxUtils.write(c,mxResources.get(5E5>d.length?k?"link":"mainEmbedNotice":"preview")+":");mxUtils.br(c);var m=document.createElement("div");m.style.position="absolute";m.style.top="30px";m.style.right="30px";m.style.color="gray";mxUtils.write(m,a.formatFileSize(d.length));
 c.appendChild(m);var n=document.createElement("textarea");n.setAttribute("autocomplete","off");n.setAttribute("autocorrect","off");n.setAttribute("autocapitalize","off");n.setAttribute("spellcheck","false");n.style.marginTop="10px";n.style.resize="none";n.style.height="150px";n.style.width="440px";n.style.border="1px solid gray";n.value=mxResources.get("updatingDocument");c.appendChild(n);mxUtils.br(c);this.init=function(){window.setTimeout(function(){5E5>d.length?(n.value=d,n.focus(),mxClient.IS_GC||
 mxClient.IS_FF||5<=document.documentMode||mxClient.IS_QUIRKS?n.select():document.execCommand("selectAll",!1,null)):(n.setAttribute("readonly","true"),n.value=d.substring(0,340)+"... ("+mxResources.get("drawingTooLarge")+")")},0)};m=document.createElement("div");m.style.position="absolute";m.style.bottom="36px";m.style.right="32px";var b=null;mxClient.IS_CHROMEAPP&&!k||navigator.standalone||!(k||mxClient.IS_SVG&&(null==document.documentMode||9<document.documentMode))||(b=mxUtils.button(mxResources.get(5E5>
-d.length?"preview":"openInNewWindow"),function(){var b=5E5>d.length?n.value:d;if(null!=h)h(b);else if(k)try{var e=window.open(b);(null==f||0<f)&&window.setTimeout(mxUtils.bind(this,function(){null!=e&&null!=e.location.href&&e.location.href.substring(0,8)!=b.substring(0,8)&&(e.close(),a.handleError({message:mxResources.get("drawingTooLarge")}))}),f||500)}catch(u){a.handleError({message:u.message||mxResources.get("drawingTooLarge")})}else{var c=window.open().document;c.writeln("<html><head><title>"+
+d.length?"preview":"openInNewWindow"),function(){var b=5E5>d.length?n.value:d;if(null!=h)h(b);else if(k)try{var e=window.open(b);(null==f||0<f)&&window.setTimeout(mxUtils.bind(this,function(){null!=e&&null!=e.location.href&&e.location.href.substring(0,8)!=b.substring(0,8)&&(e.close(),a.handleError({message:mxResources.get("drawingTooLarge")}))}),f||500)}catch(v){a.handleError({message:v.message||mxResources.get("drawingTooLarge")})}else{var c=window.open().document;c.writeln("<html><head><title>"+
 encodeURIComponent(mxResources.get("preview"))+'</title><meta charset="utf-8"></head><body>'+d+"</body></html>");c.close()}}),b.className="geBtn",m.appendChild(b));if(!k||7500<d.length){var e=mxUtils.button(mxResources.get("download"),function(){a.saveData("embed.txt","txt",d,"text/plain")});e.className="geBtn";m.appendChild(e)}if(k&&(!a.isOffline()||mxClient.IS_CHROMEAPP)){if(51200>d.length){var g=mxUtils.button("",function(){try{var b="https://www.facebook.com/sharer.php?p[url]="+encodeURIComponent(n.value);
-window.open(b)}catch(q){a.handleError({message:q.message||mxResources.get("drawingTooLarge")})}}),e=document.createElement("img");e.setAttribute("src",Editor.facebookImage);e.setAttribute("width","18");e.setAttribute("height","18");e.setAttribute("border","0");g.appendChild(e);g.setAttribute("title",mxResources.get("facebook")+" ("+a.formatFileSize(51200)+" max)");g.style.verticalAlign="bottom";g.style.paddingTop="4px";g.style.minWidth="46px";g.className="geBtn";m.appendChild(g)}7168>d.length&&(g=
-mxUtils.button("",function(){try{var b="https://twitter.com/intent/tweet?text="+encodeURIComponent("Check out the diagram I made using @drawio")+"&url="+encodeURIComponent(n.value);window.open(b)}catch(q){a.handleError({message:q.message||mxResources.get("drawingTooLarge")})}}),e=document.createElement("img"),e.setAttribute("src",Editor.tweetImage),e.setAttribute("width","18"),e.setAttribute("height","18"),e.setAttribute("border","0"),e.style.marginBottom="5px",g.appendChild(e),g.setAttribute("title",
+window.open(b)}catch(p){a.handleError({message:p.message||mxResources.get("drawingTooLarge")})}}),e=document.createElement("img");e.setAttribute("src",Editor.facebookImage);e.setAttribute("width","18");e.setAttribute("height","18");e.setAttribute("border","0");g.appendChild(e);g.setAttribute("title",mxResources.get("facebook")+" ("+a.formatFileSize(51200)+" max)");g.style.verticalAlign="bottom";g.style.paddingTop="4px";g.style.minWidth="46px";g.className="geBtn";m.appendChild(g)}7168>d.length&&(g=
+mxUtils.button("",function(){try{var b="https://twitter.com/intent/tweet?text="+encodeURIComponent("Check out the diagram I made using @drawio")+"&url="+encodeURIComponent(n.value);window.open(b)}catch(p){a.handleError({message:p.message||mxResources.get("drawingTooLarge")})}}),e=document.createElement("img"),e.setAttribute("src",Editor.tweetImage),e.setAttribute("width","18"),e.setAttribute("height","18"),e.setAttribute("border","0"),e.style.marginBottom="5px",g.appendChild(e),g.setAttribute("title",
 mxResources.get("twitter")+" ("+a.formatFileSize(7168)+" max)"),g.style.verticalAlign="bottom",g.style.paddingTop="4px",g.style.minWidth="46px",g.className="geBtn",m.appendChild(g))}e=mxUtils.button(mxResources.get("close"),function(){a.hideDialog()});m.appendChild(e);g=mxUtils.button(mxResources.get("copy"),function(){n.focus();mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode||mxClient.IS_QUIRKS?n.select():document.execCommand("selectAll",!1,null);document.execCommand("copy");a.alert(mxResources.get("copiedToClipboard"))});
-5E5>d.length?mxClient.IS_SF||null!=document.documentMode?e.className="geBtn gePrimaryBtn":(m.appendChild(g),g.className="geBtn gePrimaryBtn",e.className="geBtn"):(m.appendChild(b),e.className="geBtn",b.className="geBtn gePrimaryBtn");c.appendChild(m);this.container=c},GoogleSitesDialog=function(a,d){function f(){var a=null!=B.getTitle()?B.getTitle():this.defaultFilename;if(C.checked&&""!=q.value){var c="https://www.draw.io/gadget.xml?type=4&diagram="+encodeURIComponent(mxUtils.htmlEntities(q.value));
-null!=a&&(c+="&title="+encodeURIComponent(a));0<F.length&&(c+="&s="+F);""!=v.value&&"0"!=v.value&&(c+="&border="+v.value);""!=l.value&&(c+="&height="+l.value);c+="&pan="+(u.checked?"1":"0");c+="&zoom="+(t.checked?"1":"0");c+="&fit="+(w.checked?"1":"0");c+="&resize="+(p.checked?"1":"0");c+="&x0="+Number(g.value);c+="&y0="+b;h.mathEnabled&&(c+="&math=1");x.checked?c+="&edit=_blank":y.checked&&(c+="&edit="+encodeURIComponent(mxUtils.htmlEntities(window.location.href)));e.value=c}else B.constructor==
-DriveFile||B.constructor==DropboxFile?(c="https://www.draw.io/gadget.xml?embed=0&diagram=",""!=q.value?c+=encodeURIComponent(mxUtils.htmlEntities(q.value))+"&type=3":(c+=B.getHash().substring(1),c=B.constructor==DropboxFile?c+"&type=2":c+"&type=1"),null!=a&&(c+="&title="+encodeURIComponent(a)),""!=l.value&&(a=parseInt(l.value)+parseInt(g.value),c+="&height="+a),e.value=c):e.value=""}var c=document.createElement("div"),h=a.editor.graph,k=h.getGraphBounds(),m=h.view.scale,n=Math.floor(k.x/m-h.view.translate.x),
+5E5>d.length?mxClient.IS_SF||null!=document.documentMode?e.className="geBtn gePrimaryBtn":(m.appendChild(g),g.className="geBtn gePrimaryBtn",e.className="geBtn"):(m.appendChild(b),e.className="geBtn",b.className="geBtn gePrimaryBtn");c.appendChild(m);this.container=c},GoogleSitesDialog=function(a,d){function f(){var a=null!=B.getTitle()?B.getTitle():this.defaultFilename;if(C.checked&&""!=p.value){var c="https://www.draw.io/gadget.xml?type=4&diagram="+encodeURIComponent(mxUtils.htmlEntities(p.value));
+null!=a&&(c+="&title="+encodeURIComponent(a));0<F.length&&(c+="&s="+F);""!=u.value&&"0"!=u.value&&(c+="&border="+u.value);""!=l.value&&(c+="&height="+l.value);c+="&pan="+(v.checked?"1":"0");c+="&zoom="+(q.checked?"1":"0");c+="&fit="+(w.checked?"1":"0");c+="&resize="+(t.checked?"1":"0");c+="&x0="+Number(g.value);c+="&y0="+b;h.mathEnabled&&(c+="&math=1");y.checked?c+="&edit=_blank":x.checked&&(c+="&edit="+encodeURIComponent(mxUtils.htmlEntities(window.location.href)));e.value=c}else B.constructor==
+DriveFile||B.constructor==DropboxFile?(c="https://www.draw.io/gadget.xml?embed=0&diagram=",""!=p.value?c+=encodeURIComponent(mxUtils.htmlEntities(p.value))+"&type=3":(c+=B.getHash().substring(1),c=B.constructor==DropboxFile?c+"&type=2":c+"&type=1"),null!=a&&(c+="&title="+encodeURIComponent(a)),""!=l.value&&(a=parseInt(l.value)+parseInt(g.value),c+="&height="+a),e.value=c):e.value=""}var c=document.createElement("div"),h=a.editor.graph,k=h.getGraphBounds(),m=h.view.scale,n=Math.floor(k.x/m-h.view.translate.x),
 b=Math.floor(k.y/m-h.view.translate.y);mxUtils.write(c,mxResources.get("googleGadget")+":");mxUtils.br(c);var e=document.createElement("input");e.setAttribute("type","text");e.style.marginBottom="8px";e.style.marginTop="2px";e.style.width="410px";c.appendChild(e);mxUtils.br(c);this.init=function(){e.focus();mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode||mxClient.IS_QUIRKS?e.select():document.execCommand("selectAll",!1,null)};mxUtils.write(c,mxResources.get("top")+":");var g=document.createElement("input");
 g.setAttribute("type","text");g.setAttribute("size","4");g.style.marginRight="16px";g.style.marginLeft="4px";g.value=n;c.appendChild(g);mxUtils.write(c,mxResources.get("height")+":");var l=document.createElement("input");l.setAttribute("type","text");l.setAttribute("size","4");l.style.marginLeft="4px";l.value=Math.ceil(k.height/m);c.appendChild(l);mxUtils.br(c);k=document.createElement("hr");k.setAttribute("size","1");k.style.marginBottom="16px";k.style.marginTop="16px";c.appendChild(k);mxUtils.write(c,
-mxResources.get("publicDiagramUrl")+":");mxUtils.br(c);var q=document.createElement("input");q.setAttribute("type","text");q.setAttribute("size","28");q.style.marginBottom="8px";q.style.marginTop="2px";q.style.width="410px";q.value=d||"";c.appendChild(q);mxUtils.br(c);mxUtils.write(c,mxResources.get("borderWidth")+":");var v=document.createElement("input");v.setAttribute("type","text");v.setAttribute("size","3");v.style.marginBottom="8px";v.style.marginLeft="4px";v.value="0";c.appendChild(v);mxUtils.br(c);
-var u=document.createElement("input");u.setAttribute("type","checkbox");u.setAttribute("checked","checked");u.defaultChecked=!0;u.style.marginLeft="16px";c.appendChild(u);mxUtils.write(c,mxResources.get("pan")+" ");var t=document.createElement("input");t.setAttribute("type","checkbox");t.setAttribute("checked","checked");t.defaultChecked=!0;t.style.marginLeft="8px";c.appendChild(t);mxUtils.write(c,mxResources.get("zoom")+" ");var y=document.createElement("input");y.setAttribute("type","checkbox");
-y.style.marginLeft="8px";y.setAttribute("title",window.location.href);c.appendChild(y);mxUtils.write(c,mxResources.get("edit")+" ");var x=document.createElement("input");x.setAttribute("type","checkbox");x.style.marginLeft="8px";c.appendChild(x);mxUtils.write(c,mxResources.get("asNew")+" ");mxUtils.br(c);var p=document.createElement("input");p.setAttribute("type","checkbox");p.setAttribute("checked","checked");p.defaultChecked=!0;p.style.marginLeft="16px";c.appendChild(p);mxUtils.write(c,mxResources.get("resize")+
-" ");var w=document.createElement("input");w.setAttribute("type","checkbox");w.style.marginLeft="8px";c.appendChild(w);mxUtils.write(c,mxResources.get("fit")+" ");var C=document.createElement("input");C.setAttribute("type","checkbox");C.style.marginLeft="8px";c.appendChild(C);mxUtils.write(c,mxResources.get("embed")+" ");var F=a.getBasenames().join(";"),B=a.getCurrentFile();mxEvent.addListener(u,"change",f);mxEvent.addListener(t,"change",f);mxEvent.addListener(p,"change",f);mxEvent.addListener(w,
-"change",f);mxEvent.addListener(y,"change",f);mxEvent.addListener(x,"change",f);mxEvent.addListener(C,"change",f);mxEvent.addListener(l,"change",f);mxEvent.addListener(g,"change",f);mxEvent.addListener(v,"change",f);mxEvent.addListener(q,"change",f);f();mxEvent.addListener(e,"click",function(){e.focus();mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode||mxClient.IS_QUIRKS?e.select():document.execCommand("selectAll",!1,null)});k=document.createElement("div");k.style.paddingTop="12px";k.style.textAlign=
+mxResources.get("publicDiagramUrl")+":");mxUtils.br(c);var p=document.createElement("input");p.setAttribute("type","text");p.setAttribute("size","28");p.style.marginBottom="8px";p.style.marginTop="2px";p.style.width="410px";p.value=d||"";c.appendChild(p);mxUtils.br(c);mxUtils.write(c,mxResources.get("borderWidth")+":");var u=document.createElement("input");u.setAttribute("type","text");u.setAttribute("size","3");u.style.marginBottom="8px";u.style.marginLeft="4px";u.value="0";c.appendChild(u);mxUtils.br(c);
+var v=document.createElement("input");v.setAttribute("type","checkbox");v.setAttribute("checked","checked");v.defaultChecked=!0;v.style.marginLeft="16px";c.appendChild(v);mxUtils.write(c,mxResources.get("pan")+" ");var q=document.createElement("input");q.setAttribute("type","checkbox");q.setAttribute("checked","checked");q.defaultChecked=!0;q.style.marginLeft="8px";c.appendChild(q);mxUtils.write(c,mxResources.get("zoom")+" ");var x=document.createElement("input");x.setAttribute("type","checkbox");
+x.style.marginLeft="8px";x.setAttribute("title",window.location.href);c.appendChild(x);mxUtils.write(c,mxResources.get("edit")+" ");var y=document.createElement("input");y.setAttribute("type","checkbox");y.style.marginLeft="8px";c.appendChild(y);mxUtils.write(c,mxResources.get("asNew")+" ");mxUtils.br(c);var t=document.createElement("input");t.setAttribute("type","checkbox");t.setAttribute("checked","checked");t.defaultChecked=!0;t.style.marginLeft="16px";c.appendChild(t);mxUtils.write(c,mxResources.get("resize")+
+" ");var w=document.createElement("input");w.setAttribute("type","checkbox");w.style.marginLeft="8px";c.appendChild(w);mxUtils.write(c,mxResources.get("fit")+" ");var C=document.createElement("input");C.setAttribute("type","checkbox");C.style.marginLeft="8px";c.appendChild(C);mxUtils.write(c,mxResources.get("embed")+" ");var F=a.getBasenames().join(";"),B=a.getCurrentFile();mxEvent.addListener(v,"change",f);mxEvent.addListener(q,"change",f);mxEvent.addListener(t,"change",f);mxEvent.addListener(w,
+"change",f);mxEvent.addListener(x,"change",f);mxEvent.addListener(y,"change",f);mxEvent.addListener(C,"change",f);mxEvent.addListener(l,"change",f);mxEvent.addListener(g,"change",f);mxEvent.addListener(u,"change",f);mxEvent.addListener(p,"change",f);f();mxEvent.addListener(e,"click",function(){e.focus();mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode||mxClient.IS_QUIRKS?e.select():document.execCommand("selectAll",!1,null)});k=document.createElement("div");k.style.paddingTop="12px";k.style.textAlign=
 "right";m=mxUtils.button(mxResources.get("close"),function(){a.hideDialog()});m.className="geBtn gePrimaryBtn";k.appendChild(m);c.appendChild(k);this.container=c},CreateGraphDialog=function(a,d,f){var c=document.createElement("div");c.style.textAlign="right";this.init=function(){var d=document.createElement("div");d.style.position="relative";d.style.border="1px solid gray";d.style.width="100%";d.style.height="360px";d.style.overflow="hidden";d.style.marginBottom="16px";mxEvent.disableContextMenu(d);
 c.appendChild(d);var k=new Graph(d);k.setCellsCloneable(!0);k.setPanning(!0);k.setAllowDanglingEdges(!1);k.connectionHandler.select=!1;k.view.setTranslate(20,20);k.border=20;k.panningHandler.useLeftButtonForPanning=!0;var m="curved=1;";k.cellRenderer.installCellOverlayListeners=function(b,a,e){mxCellRenderer.prototype.installCellOverlayListeners.apply(this,arguments);mxEvent.addListener(e.node,mxClient.IS_POINTER?"pointerdown":"mousedown",function(e){a.fireEvent(new mxEventObject("pointerdown","event",
 e,"state",b))});!mxClient.IS_POINTER&&mxClient.IS_TOUCH&&mxEvent.addListener(e.node,"touchstart",function(e){a.fireEvent(new mxEventObject("pointerdown","event",e,"state",b))})};k.getAllConnectionConstraints=function(){return null};k.connectionHandler.marker.highlight.keepOnTop=!1;k.connectionHandler.createEdgeState=function(b){b=k.createEdge(null,null,null,null,null,m);return new mxCellState(this.graph.view,b,this.graph.getCellStyle(b))};var n=k.getDefaultParent(),b=mxUtils.bind(this,function(a){var e=
-new mxCellOverlay(this.connectImage,"Add outgoing");e.cursor="hand";e.addListener(mxEvent.CLICK,function(e,c){k.connectionHandler.reset();k.clearSelection();var g=k.getCellGeometry(a),p;l(function(){p=k.insertVertex(n,null,"Entry",g.x,g.y,80,30,"rounded=1;");b(p);k.view.refresh(p);k.insertEdge(n,null,"",a,p,m)},function(){k.scrollCellToVisible(p)})});e.addListener("pointerdown",function(b,a){var e=a.getProperty("event"),c=a.getProperty("state");k.popupMenuHandler.hideMenu();k.stopEditing(!1);var g=
+new mxCellOverlay(this.connectImage,"Add outgoing");e.cursor="hand";e.addListener(mxEvent.CLICK,function(e,c){k.connectionHandler.reset();k.clearSelection();var g=k.getCellGeometry(a),t;l(function(){t=k.insertVertex(n,null,"Entry",g.x,g.y,80,30,"rounded=1;");b(t);k.view.refresh(t);k.insertEdge(n,null,"",a,t,m)},function(){k.scrollCellToVisible(t)})});e.addListener("pointerdown",function(b,a){var e=a.getProperty("event"),c=a.getProperty("state");k.popupMenuHandler.hideMenu();k.stopEditing(!1);var g=
 mxUtils.convertPoint(k.container,mxEvent.getClientX(e),mxEvent.getClientY(e));k.connectionHandler.start(c,g.x,g.y);k.isMouseDown=!0;k.isMouseTrigger=mxEvent.isMouseEvent(e);mxEvent.consume(e)});k.addCellOverlay(a,e)});k.getModel().beginUpdate();var e;try{e=k.insertVertex(n,null,"Start",0,0,80,30,"ellipse"),b(e)}finally{k.getModel().endUpdate()}var g;"horizontalTree"==f?(g=new mxCompactTreeLayout(k),g.edgeRouting=!1,g.levelDistance=30,m="edgeStyle=elbowEdgeStyle;elbow=horizontal;"):"verticalTree"==
-f?(g=new mxCompactTreeLayout(k,!1),g.edgeRouting=!1,g.levelDistance=30,m="edgeStyle=elbowEdgeStyle;elbow=vertical;"):"verticalFlow"==f?g=new mxHierarchicalLayout(k,mxConstants.DIRECTION_NORTH):"horizontalFlow"==f?g=new mxHierarchicalLayout(k,mxConstants.DIRECTION_WEST):"organic"==f?(g=new mxFastOrganicLayout(k,!1),g.forceConstant=80):"circle"==f&&(g=new mxCircleLayout(k));if(null!=g){var l=function(b,a){k.getModel().beginUpdate();try{null!=b&&b(),g.execute(k.getDefaultParent(),e)}catch(p){throw p;
-}finally{var c=new mxMorphing(k);c.addListener(mxEvent.DONE,mxUtils.bind(this,function(){k.getModel().endUpdate();null!=a&&a()}));c.startAnimation()}},q=mxEdgeHandler.prototype.connect;mxEdgeHandler.prototype.connect=function(b,a,e,c,g){q.apply(this,arguments);l()};k.resizeCell=function(){mxGraph.prototype.resizeCell.apply(this,arguments);l()};k.connectionHandler.addListener(mxEvent.CONNECT,function(){l()})}var v=mxUtils.button(mxResources.get("close"),function(){a.confirm(mxResources.get("areYouSure"),
-function(){null!=d.parentNode&&(k.destroy(),d.parentNode.removeChild(d));a.hideDialog()})});v.className="geBtn";a.editor.cancelFirst&&c.appendChild(v);var u=mxUtils.button(mxResources.get("insert"),function(){k.clearCellOverlays();var b=a.editor.graph.getFreeInsertPoint(),b=a.editor.graph.importCells(k.getModel().getChildren(k.getDefaultParent()),b.x,b.y),e=a.editor.graph.view,c=e.getBounds(b);c.x-=e.translate.x;c.y-=e.translate.y;a.editor.graph.scrollRectToVisible(c);a.editor.graph.setSelectionCells(b);
-null!=d.parentNode&&(k.destroy(),d.parentNode.removeChild(d));a.hideDialog()});c.appendChild(u);u.className="geBtn gePrimaryBtn";a.editor.cancelFirst||c.appendChild(v)};this.container=c};
+f?(g=new mxCompactTreeLayout(k,!1),g.edgeRouting=!1,g.levelDistance=30,m="edgeStyle=elbowEdgeStyle;elbow=vertical;"):"verticalFlow"==f?g=new mxHierarchicalLayout(k,mxConstants.DIRECTION_NORTH):"horizontalFlow"==f?g=new mxHierarchicalLayout(k,mxConstants.DIRECTION_WEST):"organic"==f?(g=new mxFastOrganicLayout(k,!1),g.forceConstant=80):"circle"==f&&(g=new mxCircleLayout(k));if(null!=g){var l=function(b,a){k.getModel().beginUpdate();try{null!=b&&b(),g.execute(k.getDefaultParent(),e)}catch(t){throw t;
+}finally{var c=new mxMorphing(k);c.addListener(mxEvent.DONE,mxUtils.bind(this,function(){k.getModel().endUpdate();null!=a&&a()}));c.startAnimation()}},p=mxEdgeHandler.prototype.connect;mxEdgeHandler.prototype.connect=function(b,a,e,c,g){p.apply(this,arguments);l()};k.resizeCell=function(){mxGraph.prototype.resizeCell.apply(this,arguments);l()};k.connectionHandler.addListener(mxEvent.CONNECT,function(){l()})}var u=mxUtils.button(mxResources.get("close"),function(){a.confirm(mxResources.get("areYouSure"),
+function(){null!=d.parentNode&&(k.destroy(),d.parentNode.removeChild(d));a.hideDialog()})});u.className="geBtn";a.editor.cancelFirst&&c.appendChild(u);var v=mxUtils.button(mxResources.get("insert"),function(){k.clearCellOverlays();var b=a.editor.graph.getFreeInsertPoint(),b=a.editor.graph.importCells(k.getModel().getChildren(k.getDefaultParent()),b.x,b.y),e=a.editor.graph.view,c=e.getBounds(b);c.x-=e.translate.x;c.y-=e.translate.y;a.editor.graph.scrollRectToVisible(c);a.editor.graph.setSelectionCells(b);
+null!=d.parentNode&&(k.destroy(),d.parentNode.removeChild(d));a.hideDialog()});c.appendChild(v);v.className="geBtn gePrimaryBtn";a.editor.cancelFirst||c.appendChild(u)};this.container=c};
 CreateGraphDialog.prototype.connectImage=new mxImage(mxClient.IS_SVG?"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABoAAAAaCAYAAACpSkzOAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAyJpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuMC1jMDYwIDYxLjEzNDc3NywgMjAxMC8wMi8xMi0xNzozMjowMCAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvIiB4bWxuczp4bXBNTT0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL21tLyIgeG1sbnM6c3RSZWY9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9zVHlwZS9SZXNvdXJjZVJlZiMiIHhtcDpDcmVhdG9yVG9vbD0iQWRvYmUgUGhvdG9zaG9wIENTNSBNYWNpbnRvc2giIHhtcE1NOkluc3RhbmNlSUQ9InhtcC5paWQ6RjQ3OTk0QjMyRDcyMTFFNThGQThGNDVBMjNBMjFDMzkiIHhtcE1NOkRvY3VtZW50SUQ9InhtcC5kaWQ6RjQ3OTk0QjQyRDcyMTFFNThGQThGNDVBMjNBMjFDMzkiPiA8eG1wTU06RGVyaXZlZEZyb20gc3RSZWY6aW5zdGFuY2VJRD0ieG1wLmlpZDoyRjA0N0I2MjJENzExMUU1OEZBOEY0NUEyM0EyMUMzOSIgc3RSZWY6ZG9jdW1lbnRJRD0ieG1wLmRpZDpGNDc5OTRCMjJENzIxMUU1OEZBOEY0NUEyM0EyMUMzOSIvPiA8L3JkZjpEZXNjcmlwdGlvbj4gPC9yZGY6UkRGPiA8L3g6eG1wbWV0YT4gPD94cGFja2V0IGVuZD0iciI/PjIf+MgAAATlSURBVHjanFZraFxFFD735u4ru3ls0yZG26ShgmJoKK1J2vhIYzBgRdtIURHyw1hQUH9IxIgI2h8iCEUF/1RRlNQYCsYfCTHVhiTtNolpZCEStqSC22xIsrs1bDfu7t37Gs/cO3Ozxs1DBw73zpk555vzmHNGgJ0NYatFgmNLYUHYUoHASMz5ijmgVLmxgfKCUiBxC4ACJAeSG8nb1dVVOTc3dyoSibwWDofPBIPBJzo7O8vpGtvjpDICGztxkciECpF2LS0tvZtOpwNkk5FKpcYXFxffwL1+JuPgllPj8nk1F6RoaGjoKCqZ5ApljZDZO4SMRA0SuG2QUJIQRV8HxMOM9vf3H0ZZH9Nhg20MMl2QkFwjIyNHWlpahtADnuUMwLcRHX5aNSBjCJYEsSSLUeLEbhGe3ytCmQtA1/XY+Pj46dbW1iDuyCJp9BC5ycBj4hoeHq5ra2sbw0Xn1ZgBZ+dVkA1Lc+6p0Ck2p0QS4Ox9EhwpEylYcmBg4LH29vYQLilIOt0u5FhDfevNZDI/u93uw6PLOrwTUtjxrbPYbhD42WgMrF8JmR894ICmCgnQjVe8Xu8pXEkzMJKbuo5oNPomBbm1ZsD7s2kwFA1JZ6QBUXWT1nmGNc/qoMgavDcrQzxjQGFh4aOYIJ0sFAXcEtui4uLiVjr5KpSBVFYDDZVrWUaKRRWSAYeK0fmKykgDXbVoNaPChRuyqdDv97czL5nXxQbq6empQmsaklkDBiNpSwFVrmr2P6UyicD5piI4f8wHh0oEm8/p4h8pyGiEWvVQd3e3nxtjAzU1NR2jP7NRBWQ8GbdEzzJAmc0V3RR4cI8Dvmwuhc8fKUFA0d6/ltHg5p+Kuaejo6OeY0jcNJ/PV00ZS0nFUoZRvvFS1bZFsKHCCQ2Pl8H0chY+C96B6ZUsrCQ1qKtwQVFRURW/QhIXMAzDPAZ6BgOr8tTa8dDxCmiYGApaJbJMxSzV+brE8pdgWkcpY5dbMF1AR9XH8/xu2ilef48bvn92n82ZwHh+8ssqTEXS9p7dHisiiURikd8PbpExNTU1UVNTA3V3Y7lC16n0gpB/NwpNcZjfa7dScC4Qh0kOQCwnlEgi3F/hMVl9fX0zvKrzSk2lfXjRhj0eT/2rvWG4+Pta3oJY7XfC3hInXAv/ldeFLx8shQ+eqQL0UAAz7ylkpej5eNZRVBWL6BU6ef14OYiY1oqyTtmsavr/5koaRucT1pzx+ZpL1+GV5nLutksUgIcmtwTRiuuVZXnU5XId7A2swJkfFsymRWC91hHg1Viw6x23+7vn9sPJ+j20BE1hCXqSWaNSQ8ScbknRZWxub1PGCw/fBV+c3AeijlUbY5bBjEqr9GuYZP4jP41WudGSC6erTRCqdGZm5i1WvXWeDHnbBCZGc2Nj4wBl/hZOwrmBBfgmlID1HmGJutHaF+tKoevp/XCgstDkjo2NtWKLuc6AVN4mNjY+s1XQxoenOoFuDPHGtnRbJj9ej5GvL0dI7+giuRyMk1giazc+DP6vgUDgOJVlOv7R+PJ12QIeL6SyeDz+Kfp8ZrNWjgDTsVjsQ7qXyTjztXJhm9ePxFLfMTg4eG9tbe1RTP9KFFYQfHliYmIS69kCC7jKYmKwxxD5P88tkVkqbPPcIps9t4T/+HjcuJ/s5BFJgf4WYABCtxGuxIZ90gAAAABJRU5ErkJggg==":IMAGE_PATH+
 "/handle-connect.png",26,26);
 var BackgroundImageDialog=function(a,d){var f=document.createElement("div");f.style.whiteSpace="nowrap";var c=document.createElement("h2");mxUtils.write(c,mxResources.get("backgroundImage"));c.style.marginTop="0px";f.appendChild(c);mxUtils.write(f,mxResources.get("image")+" "+mxResources.get("url")+":");mxUtils.br(f);var c=a.editor.graph.backgroundImage,h=document.createElement("input");h.setAttribute("type","text");h.style.marginTop="4px";h.style.marginBottom="4px";h.style.width="350px";h.value=
@@ -5996,70 +5998,70 @@ e.className="geBtn";a.editor.cancelFirst&&c.appendChild(e);if(!a.isOffline()&&"u
 a.movePickersToTop()});g.className="geBtn";c.appendChild(g);null!=a.drive&&"1"==urlParams.photos&&(g=mxUtils.button(mxResources.get("googlePlus"),function(){a.spinner.spin(document.body,mxResources.get("authorizing"))&&a.drive.checkToken(mxUtils.bind(this,function(){a.spinner.stop();if(null==a.photoPicker){var b=gapi.auth.getToken().access_token,b=(new google.picker.PickerBuilder).setAppId(a.drive.appId).setLocale(mxLanguage).setOAuthToken(b).addView(google.picker.ViewId.PHOTOS).addView(google.picker.ViewId.PHOTO_ALBUMS).addView(google.picker.ViewId.PHOTO_UPLOAD);
 a.photoPicker=b.setCallback(function(b){ImageDialog.filePicked(b)}).build()}a.photoPicker.setVisible(!0);a.movePickersToTop()}))}),g.className="geBtn",c.appendChild(g))}g=mxUtils.button(mxResources.get("apply"),function(){a.hideDialog();d(""!=h.value?new mxImage(mxUtils.trim(h.value),n.value,b.value):null)});g.className="geBtn gePrimaryBtn";c.appendChild(g);a.editor.cancelFirst||c.appendChild(e);f.appendChild(c);this.container=f},ParseDialog=function(a,d){function f(b,e){var c=b.split("\n");if("plantUmlPng"==
 e||"plantUmlSvg"==e){var c="plantUmlPng"==e?"https://exp.draw.io/plantuml2/png/":"https://exp.draw.io/plantuml2/svg/",g=a.editor.graph;if(a.spinner.spin(document.body,mxResources.get("inserting"))){var l=function(b){if(10>b)return String.fromCharCode(48+b);b-=10;if(26>b)return String.fromCharCode(65+b);b-=26;if(26>b)return String.fromCharCode(97+b);b-=26;return 0==b?"-":1==b?"_":"?"},f=function(b,a,e){c1=b>>2;c2=(b&3)<<4|a>>4;c3=(a&15)<<2|e>>6;c4=e&63;r="";r+=l(c1&63);r+=l(c2&63);r+=l(c3&63);return r+=
-l(c4&63)},d=new XMLHttpRequest;d.open("GET",c+function(b){r="";for(q=0;q<b.length;q+=3)r=q+2==b.length?r+f(b.charCodeAt(q),b.charCodeAt(q+1),0):q+1==b.length?r+f(b.charCodeAt(q),0,0):r+f(b.charCodeAt(q),b.charCodeAt(q+1),b.charCodeAt(q+2));return r}(g.bytesToString(pako.deflateRaw(unescape(encodeURIComponent(b))))),!0);d.responseType="blob";d.onload=function(e){200<=this.status&&300>this.status?(e=new FileReader,e.readAsDataURL(this.response),e.onload=function(e){var c=new Image;c.onload=function(){a.spinner.stop();
+l(c4&63)},d=new XMLHttpRequest;d.open("GET",c+function(b){r="";for(p=0;p<b.length;p+=3)r=p+2==b.length?r+f(b.charCodeAt(p),b.charCodeAt(p+1),0):p+1==b.length?r+f(b.charCodeAt(p),0,0):r+f(b.charCodeAt(p),b.charCodeAt(p+1),b.charCodeAt(p+2));return r}(g.bytesToString(pako.deflateRaw(unescape(encodeURIComponent(b))))),!0);d.responseType="blob";d.onload=function(e){200<=this.status&&300>this.status?(e=new FileReader,e.readAsDataURL(this.response),e.onload=function(e){var c=new Image;c.onload=function(){a.spinner.stop();
 g.getModel().beginUpdate();try{cell=g.insertVertex(null,null,b,h.x,h.y,c.width,c.height,"shape=image;noLabel=1;verticalAlign=top;aspect=fixed;imageAspect=0;image="+a.convertDataUri(e.target.result)+";")}finally{g.getModel().endUpdate()}g.setSelectionCell(cell);g.scrollCellToVisible(g.getSelectionCell())};c.src=e.target.result},e.onerror=function(b){a.handleError(b)}):(a.spinner.stop(),a.handleError(e))};d.onerror=function(b){a.handleError(b)};d.send()}}else if("list"==e){if(0<c.length){var g=a.editor.graph,
-p=new mxCell(c[0],new mxGeometry(0,0,160,30),"swimlane;fontStyle=1;childLayout=stackLayout;horizontal=1;startSize=26;fillColor=none;horizontalStack=0;resizeParent=1;resizeLast=0;collapsible=1;marginBottom=0;swimlaneFillColor=#ffffff;");p.vertex=!0;d=g.getPreferredSizeForCell(p);null!=d&&p.geometry.width<d.width+10&&(p.geometry.width=d.width+10);if(1<c.length)for(var q=1;q<c.length;q++)if("--"==c[q])d=new mxCell("",new mxGeometry(0,0,40,8),"line;strokeWidth=1;fillColor=none;align=left;verticalAlign=middle;spacingTop=-1;spacingLeft=3;spacingRight=3;rotatable=0;labelPosition=right;points=[];portConstraint=eastwest;"),
-d.vertex=!0,p.geometry.height+=d.geometry.height,p.insert(d);else if(0<c[q].length&&";"!=c[q].charAt(0)){var k=new mxCell(c[q],new mxGeometry(0,0,60,26),"text;strokeColor=none;fillColor=none;align=left;verticalAlign=top;spacingLeft=4;spacingRight=4;overflow=hidden;rotatable=0;points=[[0,0.5],[1,0.5]];portConstraint=eastwest;");k.vertex=!0;d=g.getPreferredSizeForCell(k);null!=d&&k.geometry.width<d.width&&(k.geometry.width=d.width);p.geometry.width=Math.max(p.geometry.width,k.geometry.width);p.geometry.height+=
-k.geometry.height;p.insert(k)}g.setSelectionCells(g.importCells([p],h.x,h.y));g.scrollCellToVisible(g.getSelectionCell())}}else{for(var k=function(b){var a=m[b];null==a&&(a=new mxCell(b,new mxGeometry(0,0,80,30)),a.vertex=!0,m[b]=a,n.push(a));return a},m={},n=[],q=0;q<c.length;q++)if(";"!=c[q].charAt(0)){var G=c[q].split("->");if(2==G.length){var z=k(G[0]),G=k(G[1]),D=new mxCell("",new mxGeometry);D.edge=!0;z.insertEdge(D,!0);G.insertEdge(D,!1);n.push(D)}}if(0<n.length){c=document.createElement("div");
-c.style.visibility="hidden";document.body.appendChild(c);g=new Graph(c);g.getModel().beginUpdate();try{n=g.importCells(n);for(q=0;q<n.length;q++)g.getModel().isVertex(n[q])&&(d=g.getPreferredSizeForCell(n[q]),n[q].geometry.width=Math.max(n[q].geometry.width,d.width),n[q].geometry.height=Math.max(n[q].geometry.height,d.height));p=new mxFastOrganicLayout(g);p.disableEdgeStyle=!1;p.forceConstant=120;p.execute(g.getDefaultParent())}finally{g.getModel().endUpdate()}g.clearCellOverlays();a.editor.graph.setSelectionCells(a.editor.graph.importCells(g.getModel().getChildren(g.getDefaultParent()),
+t=new mxCell(c[0],new mxGeometry(0,0,160,30),"swimlane;fontStyle=1;childLayout=stackLayout;horizontal=1;startSize=26;fillColor=none;horizontalStack=0;resizeParent=1;resizeLast=0;collapsible=1;marginBottom=0;swimlaneFillColor=#ffffff;");t.vertex=!0;d=g.getPreferredSizeForCell(t);null!=d&&t.geometry.width<d.width+10&&(t.geometry.width=d.width+10);if(1<c.length)for(var p=1;p<c.length;p++)if("--"==c[p])d=new mxCell("",new mxGeometry(0,0,40,8),"line;strokeWidth=1;fillColor=none;align=left;verticalAlign=middle;spacingTop=-1;spacingLeft=3;spacingRight=3;rotatable=0;labelPosition=right;points=[];portConstraint=eastwest;"),
+d.vertex=!0,t.geometry.height+=d.geometry.height,t.insert(d);else if(0<c[p].length&&";"!=c[p].charAt(0)){var k=new mxCell(c[p],new mxGeometry(0,0,60,26),"text;strokeColor=none;fillColor=none;align=left;verticalAlign=top;spacingLeft=4;spacingRight=4;overflow=hidden;rotatable=0;points=[[0,0.5],[1,0.5]];portConstraint=eastwest;");k.vertex=!0;d=g.getPreferredSizeForCell(k);null!=d&&k.geometry.width<d.width&&(k.geometry.width=d.width);t.geometry.width=Math.max(t.geometry.width,k.geometry.width);t.geometry.height+=
+k.geometry.height;t.insert(k)}g.setSelectionCells(g.importCells([t],h.x,h.y));g.scrollCellToVisible(g.getSelectionCell())}}else{for(var k=function(b){var a=m[b];null==a&&(a=new mxCell(b,new mxGeometry(0,0,80,30)),a.vertex=!0,m[b]=a,n.push(a));return a},m={},n=[],p=0;p<c.length;p++)if(";"!=c[p].charAt(0)){var G=c[p].split("->");if(2==G.length){var z=k(G[0]),G=k(G[1]),D=new mxCell("",new mxGeometry);D.edge=!0;z.insertEdge(D,!0);G.insertEdge(D,!1);n.push(D)}}if(0<n.length){c=document.createElement("div");
+c.style.visibility="hidden";document.body.appendChild(c);g=new Graph(c);g.getModel().beginUpdate();try{n=g.importCells(n);for(p=0;p<n.length;p++)g.getModel().isVertex(n[p])&&(d=g.getPreferredSizeForCell(n[p]),n[p].geometry.width=Math.max(n[p].geometry.width,d.width),n[p].geometry.height=Math.max(n[p].geometry.height,d.height));t=new mxFastOrganicLayout(g);t.disableEdgeStyle=!1;t.forceConstant=120;t.execute(g.getDefaultParent())}finally{g.getModel().endUpdate()}g.clearCellOverlays();a.editor.graph.setSelectionCells(a.editor.graph.importCells(g.getModel().getChildren(g.getDefaultParent()),
 h.x,h.y));a.editor.graph.scrollCellToVisible(a.editor.graph.getSelectionCell());g.destroy();c.parentNode.removeChild(c)}}}function c(){return"list"==n.value?"Person\n-name: String\n-birthDate: Date\n--\n+getName(): String\n+setName(String): void\n+isBirthday(): boolean":"plantUmlPng"==n.value?"@startuml\nskinparam backgroundcolor transparent\nskinparam shadowing false\nAlice -> Bob: Authentication Request\nBob --\x3e Alice: Authentication Response\n\nAlice -> Bob: Another authentication Request\nAlice <-- Bob: another authentication Response\n@enduml":
 "plantUmlSvg"==n.value?"@startuml\nskinparam shadowing false\nAlice -> Bob: Authentication Request\nBob --\x3e Alice: Authentication Response\n\nAlice -> Bob: Another authentication Request\nAlice <-- Bob: another authentication Response\n@enduml":";Example:\na->b\nb->c\nc->a\n"}var h=a.editor.graph.getFreeInsertPoint(),k=document.createElement("div");k.style.textAlign="right";var m=document.createElement("textarea");m.style.resize="none";m.style.width="100%";m.style.height="354px";m.style.marginBottom=
 "16px";var n=document.createElement("select"),b=document.createElement("option");b.setAttribute("value","list");b.setAttribute("selected","selected");mxUtils.write(b,mxResources.get("list"));n.appendChild(b);b=document.createElement("option");b.setAttribute("value","diagram");mxUtils.write(b,mxResources.get("diagram"));n.appendChild(b);b=document.createElement("option");b.setAttribute("value","plantUmlSvg");mxUtils.write(b,mxResources.get("plantUml")+" ("+mxResources.get("formatSvg")+")");var e=document.createElement("option");
 e.setAttribute("value","plantUmlPng");mxUtils.write(e,mxResources.get("plantUml")+" ("+mxResources.get("formatPng")+")");EditorUi.enablePlantUml&&Graph.fileSupport&&!a.isOffline()&&(n.appendChild(b),n.appendChild(e));var g=c();m.value=g;k.appendChild(m);this.init=function(){m.focus()};Graph.fileSupport&&(m.addEventListener("dragover",function(b){b.stopPropagation();b.preventDefault()},!1),m.addEventListener("drop",function(b){b.stopPropagation();b.preventDefault();if(0<b.dataTransfer.files.length){b=
 b.dataTransfer.files[0];var a=new FileReader;a.onload=function(b){m.value=b.target.result};a.readAsText(b)}},!1));k.appendChild(n);mxEvent.addListener(n,"change",function(){var b=c();if(0==m.value.length||m.value==g)g=b,m.value=g});b=mxUtils.button(mxResources.get("close"),function(){m.value==g?a.hideDialog():a.confirm(mxResources.get("areYouSure"),function(){a.hideDialog()})});b.className="geBtn";a.editor.cancelFirst&&k.appendChild(b);e=mxUtils.button(mxResources.get("insert"),function(){a.hideDialog();
-f(m.value,n.value)});k.appendChild(e);e.className="geBtn gePrimaryBtn";a.editor.cancelFirst||k.appendChild(b);this.container=k},NewDialog=function(a,d,f,c,h){function k(){if(c)f||a.hideDialog(),c(u,q.value);else{var b=q.value;null!=b&&0<b.length&&a.pickFolder(a.mode==App.MODE_ONEDRIVE||a.mode==App.MODE_TRELLO||a.mode==App.MODE_GOOGLE&&(null==a.stateArg||null==a.stateArg.folderId)?a.mode:null,function(e){a.createFile(b,u,null!=v&&0<v.length?v:null,null,function(){a.hideDialog()},null,e)})}}function m(b,
-a,e){null!=t&&(t.style.backgroundColor="transparent",t.style.border="1px solid transparent");u=a;v=e;t=b;t.style.backgroundColor="#e6eff8";t.style.border="1px solid #ccd9ea"}function n(b,a,e,c,g){var p=document.createElement("div");p.className="geTemplate";p.style.height="140px";p.style.width="140px";null!=c&&0<c.length&&p.setAttribute("title",c);if(null!=b&&0<b.length){b.substring(0,b.length-4);p.style.backgroundImage="url("+TEMPLATE_PATH+"/"+b.substring(0,b.length-4)+".png)";p.style.backgroundPosition=
-"center center";p.style.backgroundRepeat="no-repeat";var l=!1;mxEvent.addListener(p,"click",function(e){y.setAttribute("disabled","disabled");p.style.backgroundColor="transparent";p.style.border="1px solid transparent";mxUtils.get(TEMPLATE_PATH+"/"+b,mxUtils.bind(this,function(b){200<=b.getStatus()&&299>=b.getStatus()&&(y.removeAttribute("disabled"),m(p,b.getText(),a),l&&k())}))});mxEvent.addListener(p,"dblclick",function(b){l=!0})}else p.innerHTML='<table width="100%" height="100%"><tr><td align="center" valign="middle">'+
-mxResources.get(e)+"</td></tr></table>",g&&m(p),mxEvent.addListener(p,"click",function(b){m(p)}),mxEvent.addListener(p,"dblclick",function(b){k()});x.appendChild(p)}function b(){function b(){for(var b=!0;a<F.length&&(b||0!=mxUtils.mod(a,30));)b=F[a++],n(b.url,b.libs,b.title,b.tooltip,b.select),b=!1}var a=0;mxEvent.addListener(x,"scroll",function(a){x.scrollTop+x.clientHeight>=x.scrollHeight&&(b(),mxEvent.consume(a))});var e=null,c;for(c in w){var g=document.createElement("div"),l=mxResources.get(c),
-t=w[c];null==l&&(l=c.substring(0,1).toUpperCase()+c.substring(1));18<l.length&&(l=l.substring(0,18)+"&hellip;");g.style.cssText="display:block;cursor:pointer;padding:6px;white-space:nowrap;margin-bottom:-1px;overflow:hidden;text-overflow:ellipsis;";g.setAttribute("title",l+" ("+t.length+")");mxUtils.write(g,g.getAttribute("title"));p.appendChild(g);null==e&&(e=g,e.style.backgroundColor="#ebf2f9");(function(c,p){mxEvent.addListener(g,"click",function(){e!=p&&(e.style.backgroundColor="",e=p,e.style.backgroundColor=
-"#ebf2f9",x.scrollTop=0,x.innerHTML="",a=0,F=w[c],b())})})(c,g)}b()}f=null!=f?f:!0;h=null!=h?h:!1;var e=document.createElement("div");e.style.height="100%";var g=document.createElement("div");g.style.whiteSpace="nowrap";g.style.height="46px";e.appendChild(g);var l=document.createElement("img");l.setAttribute("border","0");l.setAttribute("align","absmiddle");l.style.width="40px";l.style.height="40px";l.style.marginRight="10px";l.style.paddingBottom="4px";l.src=a.mode==App.MODE_GOOGLE?IMAGE_PATH+"/google-drive-logo.svg":
-a.mode==App.MODE_DROPBOX?IMAGE_PATH+"/dropbox-logo.svg":a.mode==App.MODE_ONEDRIVE?IMAGE_PATH+"/onedrive-logo.svg":a.mode==App.MODE_GITHUB?IMAGE_PATH+"/github-logo.svg":a.mode==App.MODE_TRELLO?IMAGE_PATH+"/trello-logo.svg":a.mode==App.MODE_BROWSER?IMAGE_PATH+"/osa_database.png":IMAGE_PATH+"/osa_drive-harddisk.png";!d&&f&&g.appendChild(l);f&&mxUtils.write(g,(null==a.mode||a.mode==App.MODE_GOOGLE||a.mode==App.MODE_BROWSER?mxResources.get("diagramName"):mxResources.get("filename"))+":");l=".xml";a.mode==
-App.MODE_GOOGLE&&null!=a.drive?l=a.drive.extension:a.mode==App.MODE_DROPBOX&&null!=a.dropbox?l=a.dropbox.extension:a.mode==App.MODE_ONEDRIVE&&null!=a.oneDrive?l=a.oneDrive.extension:a.mode==App.MODE_GITHUB&&null!=a.gitHub?l=a.gitHub.extension:a.mode==App.MODE_TRELLO&&null!=a.trello&&(l=a.trello.extension);var q=document.createElement("input");q.setAttribute("value",a.defaultFilename+l);q.style.marginRight="20px";q.style.marginLeft="10px";q.style.width=d?"220px":"450px";this.init=function(){f&&(q.focus(),
-mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode||mxClient.IS_QUIRKS?q.select():document.execCommand("selectAll",!1,null))};f&&g.appendChild(q);var v=null,u=null,t=null,y=mxUtils.button(mxResources.get("create"),function(){k()});y.className="geBtn gePrimaryBtn";var x=document.createElement("div");x.style.border="1px solid #d3d3d3";x.style.position="absolute";x.style.left="160px";x.style.right="34px";x.style.top=f?"72px":"40px";x.style.bottom="76px";x.style.margin="6px 0 0 -1px";x.style.padding=
-"6px";x.style.overflow="auto";var p=document.createElement("div");p.style.cssText="position:absolute;left:30px;width:128px;top:72px;bottom:76px;margin-top:6px;overflow:auto;border:1px solid #d3d3d3;";f||(p.style.top="40px");var w={},C=1;w.basic=[{title:"blankDiagram",select:!0}];var F=w.basic;if(!d){e.appendChild(p);e.appendChild(x);var B=!1;mxUtils.get(TEMPLATE_PATH+"/index.xml",function(a){if(!B){B=!0;for(a=a.getXml().documentElement.firstChild;null!=a;){if("undefined"!==typeof a.getAttribute){var e=
-a.getAttribute("url");if(null!=e){var c=e.indexOf("/"),e=e.substring(0,c),c=w[e];null==c&&(C++,c=[],w[e]=c);c.push({url:a.getAttribute("url"),libs:a.getAttribute("libs"),title:a.getAttribute("title"),tooltip:a.getAttribute("url")})}}a=a.nextSibling}b()}})}mxEvent.addListener(q,"keypress",function(b){13==b.keyCode&&k()});g=document.createElement("div");g.style.marginTop=d?"4px":"16px";g.style.textAlign="right";g.style.position="absolute";g.style.left="40px";g.style.bottom="30px";g.style.right="40px";
-l=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog(!0)});l.className="geBtn";a.editor.cancelFirst&&!h&&g.appendChild(l);if(!d&&!a.isOffline()&&f&&null==c&&!h){var G=mxUtils.button(mxResources.get("help"),function(){window.open("https://support.draw.io/display/DO/Creating+and+Opening+Files")});G.className="geBtn";g.appendChild(G)}d||"1"==urlParams.embed||h||(d=mxUtils.button(mxResources.get("fromTemplateUrl"),function(){var b=new FilenameDialog(a,"",mxResources.get("create"),function(b){null!=
-b&&0<b.length&&(b=a.getUrl(window.location.pathname+"?mode="+a.mode+"&title="+encodeURIComponent(q.value)+"&create="+encodeURIComponent(b)),null==a.getCurrentFile()?window.location.href=b:window.openWindow(b))},mxResources.get("url"));a.showDialog(b.container,300,80,!0,!0);b.init()}),d.className="geBtn",g.appendChild(d));g.appendChild(y);a.editor.cancelFirst||null!=c||h||g.appendChild(l);e.appendChild(g);this.container=e},CreateDialog=function(a,d,f,c,h,k,m,n,b,e,g,l,q,v,u){function t(b,e,c,g){function p(){mxEvent.addListener(t,
-"click",function(){var b=c;if(m){var e=w.value,g=e.lastIndexOf(".");if(0>d.lastIndexOf(".")&&0>g){var b=null!=b?b:B.value,p="";b==App.MODE_GOOGLE?p=a.drive.extension:b==App.MODE_GITHUB?p=a.gitHub.extension:b==App.MODE_TRELLO?p=a.trello.extension:b==App.MODE_DROPBOX?p=a.dropbox.extension:b==App.MODE_ONEDRIVE?p=a.oneDrive.extension:b==App.MODE_DEVICE&&(p=".xml");0<=g&&(e=e.substring(0,g));w.value=e+p}}y(c)})}var t=document.createElement("a");t.style.overflow="hidden";var f=document.createElement("img");
-f.src=b;f.setAttribute("border","0");f.setAttribute("align","absmiddle");f.style.width="60px";f.style.height="60px";f.style.paddingBottom="6px";t.style.display=mxClient.IS_QUIRKS?"inline":"inline-block";t.className="geBaseButton";t.style.position="relative";t.style.margin="4px";t.style.padding="8px 8px 10px 8px";t.style.whiteSpace="nowrap";t.appendChild(f);mxClient.IS_QUIRKS&&(t.style.cssFloat="left",t.style.zoom="1");t.style.color="gray";t.style.fontSize="11px";var q=document.createElement("div");
-t.appendChild(q);mxUtils.write(q,e);if(null!=g&&null==a[g]){f.style.visibility="hidden";mxUtils.setOpacity(q,10);var x=new Spinner({lines:12,length:12,width:5,radius:10,rotate:0,color:"#000",speed:1.5,trail:60,shadow:!1,hwaccel:!1,top:"40%",zIndex:2E9});x.spin(t);var h=window.setTimeout(function(){null==a[g]&&(x.stop(),t.style.display="none")},3E4);a.addListener("clientLoaded",mxUtils.bind(this,function(){null!=a[g]&&(window.clearTimeout(h),mxUtils.setOpacity(q,100),f.style.visibility="",x.stop(),
-p())}))}else p();C.appendChild(t);++F==l&&(mxUtils.br(C),F=0)}function y(b){var e=w.value;if(null==b||null!=e&&0<e.length)a.hideDialog(),f(e,b)}m=null!=m?m:!0;n=null!=n?n:!0;l=null!=l?l:3;var x=document.createElement("div");null==c&&a.addLanguageMenu(x);var p=document.createElement("h2");mxUtils.write(p,h||mxResources.get("create"));p.style.marginTop="0px";p.style.marginBottom="24px";x.appendChild(p);mxUtils.write(x,mxResources.get("filename")+":");var w=document.createElement("input");w.setAttribute("value",
-d);w.style.width="280px";w.style.marginLeft="10px";w.style.marginBottom="20px";this.init=function(){w.focus();mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode||mxClient.IS_QUIRKS?w.select():document.execCommand("selectAll",!1,null)};x.appendChild(w);null!=q&&null!=v&&"image/"==v.substring(0,6)&&(w.style.width="160px",h=document.createElement("img"),h.setAttribute("src","data:"+v+(u?";base64,":";utf8,")+q),h.style.position="absolute",h.style.top="70px",h.style.right="100px",h.style.maxWidth=
-"120px",h.style.maxHeight="80px",mxUtils.setPrefixedStyle(h.style,"transform","translate(50%,-50%)"),x.appendChild(h));mxUtils.br(x);var C=document.createElement("div");C.style.textAlign="center";var F=0;C.style.marginTop="6px";x.appendChild(C);var B=document.createElement("select");B.style.marginLeft="10px";a.isOfflineApp()||a.isOffline()||("function"===typeof window.DriveClient&&(q=document.createElement("option"),q.setAttribute("value",App.MODE_GOOGLE),mxUtils.write(q,mxResources.get("googleDrive")),
-B.appendChild(q),t(IMAGE_PATH+"/google-drive-logo.svg",mxResources.get("googleDrive"),App.MODE_GOOGLE,"drive")),null!=a.gitHub&&(q=document.createElement("option"),q.setAttribute("value",App.MODE_GITHUB),mxUtils.write(q,mxResources.get("github")),B.appendChild(q),t(IMAGE_PATH+"/github-logo.svg",mxResources.get("github"),App.MODE_GITHUB,"gitHub")),"function"===typeof window.DropboxClient&&(q=document.createElement("option"),q.setAttribute("value",App.MODE_DROPBOX),mxUtils.write(q,mxResources.get("dropbox")),
-B.appendChild(q),a.mode==App.MODE_DROPBOX&&q.setAttribute("selected","selected"),t(IMAGE_PATH+"/dropbox-logo.svg",mxResources.get("dropbox"),App.MODE_DROPBOX,"dropbox")),"function"===typeof window.OneDriveClient&&(q=document.createElement("option"),q.setAttribute("value",App.MODE_ONEDRIVE),mxUtils.write(q,mxResources.get("oneDrive")),B.appendChild(q),a.mode==App.MODE_ONEDRIVE&&q.setAttribute("selected","selected"),t(IMAGE_PATH+"/onedrive-logo.svg",mxResources.get("oneDrive"),App.MODE_ONEDRIVE,"oneDrive")),
-null!=a.trello&&(q=document.createElement("option"),q.setAttribute("value",App.MODE_TRELLO),mxUtils.write(q,mxResources.get("trello")),B.appendChild(q),t(IMAGE_PATH+"/trello-logo.svg",mxResources.get("trello"),App.MODE_TRELLO,"trello")));if(!Editor.useLocalStorage||"device"==urlParams.storage||null!=a.getCurrentFile()&&!mxClient.IS_IOS)q=document.createElement("option"),q.setAttribute("value",App.MODE_DEVICE),mxUtils.write(q,mxResources.get("device")),B.appendChild(q),a.mode!=App.MODE_DEVICE&&n||
-q.setAttribute("selected","selected"),g&&t(IMAGE_PATH+"/osa_drive-harddisk.png",mxResources.get("device"),App.MODE_DEVICE);n&&isLocalStorage&&"0"!=urlParams.browser&&(n=document.createElement("option"),n.setAttribute("value",App.MODE_BROWSER),mxUtils.write(n,mxResources.get("browser")),B.appendChild(n),a.mode==App.MODE_BROWSER&&n.setAttribute("selected","selected"),t(IMAGE_PATH+"/osa_database.png",mxResources.get("browser"),App.MODE_BROWSER));n=document.createElement("div");n.style.marginTop="26px";
-n.style.textAlign="center";null!=e&&(q=mxUtils.button(mxResources.get("help"),function(){window.open(e)}),q.className="geBtn",n.appendChild(q));q=mxUtils.button(mxResources.get("cancel"),function(){null!=c?c():(a.fileLoaded(null),a.hideDialog(),window.close(),window.location.href=a.getUrl())});q.className="geBtn";a.editor.cancelFirst&&n.appendChild(q);null==c&&(v=mxUtils.button(mxResources.get("decideLater"),function(){y(null)}),v.className="geBtn",n.appendChild(v));b&&(b=mxUtils.button(mxResources.get("openInNewWindow"),
-function(){y("_blank")}),b.className="geBtn",n.appendChild(b));mxClient.IS_IOS||(k=mxUtils.button(k||mxResources.get("create"),function(){y(g?"download":App.MODE_DEVICE)}),k.className="geBtn gePrimaryBtn",n.appendChild(k));a.editor.cancelFirst||n.appendChild(q);mxEvent.addListener(w,"keypress",function(b){13==b.keyCode?y(App.MODE_DEVICE):27==b.keyCode&&(a.fileLoaded(null),a.hideDialog(),window.close())});x.appendChild(n);this.container=x},PopupDialog=function(a,d,f,c,h){h=null!=h?h:!0;var k=document.createElement("div");
-k.style.textAlign="left";mxUtils.write(k,mxResources.get("fileOpenLocation"));mxUtils.br(k);mxUtils.br(k);var m=mxUtils.button(mxResources.get("openInThisWindow"),function(){h&&a.hideDialog();null!=c&&c()});m.className="geBtn";m.style.marginBottom="8px";m.style.width="280px";k.appendChild(m);mxUtils.br(k);var n=mxUtils.button(mxResources.get("openInNewWindow"),function(){h&&a.hideDialog();null!=f&&f();window.open(d)});n.className="geBtn gePrimaryBtn";n.style.width=m.style.width;k.appendChild(n);mxUtils.br(k);
-mxUtils.br(k);mxUtils.write(k,mxResources.get("allowPopups"));this.container=k},ImageDialog=function(a,d,f,c,h,k){k=null!=k?k:!0;var m=a.editor.graph,n=document.createElement("div");mxUtils.write(n,d);d=document.createElement("div");d.className="geTitle";d.style.backgroundColor="transparent";d.style.borderColor="transparent";d.style.whiteSpace="nowrap";d.style.textOverflow="clip";d.style.cursor="default";mxClient.IS_VML||(d.style.paddingRight="20px");var b=document.createElement("input");b.setAttribute("value",
-f);b.setAttribute("type","text");b.setAttribute("spellcheck","false");b.setAttribute("autocorrect","off");b.setAttribute("autocomplete","off");b.setAttribute("autocapitalize","off");b.style.marginTop="6px";b.style.width=(Graph.fileSupport?420:340)+(mxClient.IS_QUIRKS?20:-20)+"px";b.style.backgroundImage="url('"+Dialog.prototype.clearImage+"')";b.style.backgroundRepeat="no-repeat";b.style.backgroundPosition="100% 50%";b.style.paddingRight="14px";f=document.createElement("div");f.setAttribute("title",
-mxResources.get("reset"));f.style.position="relative";f.style.left="-16px";f.style.width="12px";f.style.height="14px";f.style.cursor="pointer";f.style.display=mxClient.IS_VML?"inline":"inline-block";f.style.top=(mxClient.IS_VML?0:3)+"px";f.style.background="url('"+a.editor.transparentImage+"')";mxEvent.addListener(f,"click",function(){b.value="";b.focus()});d.appendChild(b);d.appendChild(f);n.appendChild(d);var e=function(b,e,g){var l="data:"==b.substring(0,5);(!a.isOffline()||l&&"undefined"===typeof chrome)&&
-a.spinner.spin(document.body,mxResources.get("inserting"))?a.loadImage(b,function(l){a.spinner.stop();a.hideDialog();var p=null!=e&&null!=g?Math.max(e/l.width,g/l.height):Math.min(1,Math.min(520/l.width,520/l.height));k&&(b=a.convertDataUri(b));c(b,Math.round(Number(l.width)*p),Math.round(Number(l.height)*p))},function(){a.spinner.stop();c(null);a.showError(mxResources.get("error"),mxResources.get("fileNotFound"),mxResources.get("ok"))}):(b=a.convertDataUri(b),e=null==e?120:e,g=null==g?100:g,a.hideDialog(),
-c(b,e,g))},g=function(b){if(null!=b&&0<b.length){var g=h?null:m.getModel().getGeometry(m.getSelectionCell());null!=g?e(b,g.width,g.height):e(b)}else a.hideDialog(),c(null)};this.init=function(){b.focus();if(Graph.fileSupport){b.setAttribute("placeholder",mxResources.get("dragImagesHere"));var e=n.parentNode,c=null;mxEvent.addListener(e,"dragleave",function(b){null!=c&&(c.parentNode.removeChild(c),c=null);b.stopPropagation();b.preventDefault()});mxEvent.addListener(e,"dragover",mxUtils.bind(this,function(b){null==
-c&&(!mxClient.IS_IE||10<document.documentMode)&&(c=a.highlightElement(e));b.stopPropagation();b.preventDefault()}));mxEvent.addListener(e,"drop",mxUtils.bind(this,function(b){null!=c&&(c.parentNode.removeChild(c),c=null);if(0<b.dataTransfer.files.length)a.importFiles(b.dataTransfer.files,0,0,a.maxImageSize,function(b,a,e,c,l,t){g(b)},function(){},function(b){return"image/"==b.type.substring(0,6)},function(b){for(var a=0;a<b.length;a++)b[a]()},!mxEvent.isControlDown(b));else if(0<=mxUtils.indexOf(b.dataTransfer.types,
-"text/uri-list")){var e=b.dataTransfer.getData("text/uri-list");/\.(gif|jpg|jpeg|tiff|png|svg)($|\?)/i.test(e)&&g(decodeURIComponent(e))}b.stopPropagation();b.preventDefault()}),!1)}};f=document.createElement("div");f.style.marginTop=mxClient.IS_QUIRKS?"22px":"14px";f.style.textAlign="right";d=mxUtils.button(mxResources.get("cancel"),function(){a.spinner.stop();a.hideDialog()});d.className="geBtn";a.editor.cancelFirst&&f.appendChild(d);ImageDialog.filePicked=function(a){a.action==google.picker.Action.PICKED&&
-null!=a.docs[0].thumbnails&&(a=a.docs[0].thumbnails[a.docs[0].thumbnails.length-1],null!=a&&(b.value=a.url));b.focus()};if(Graph.fileSupport){var l=document.createElement("input");l.setAttribute("multiple","multiple");l.setAttribute("type","file");if(null==document.documentMode){mxEvent.addListener(l,"change",function(b){a.importFiles(l.files,0,0,a.maxImageSize,function(b,a,e,c,p,l){g(b)},function(){},function(b){return"image/"==b.type.substring(0,6)},function(b){for(var a=0;a<b.length;a++)b[a]()},
-!0)});var q=mxUtils.button(mxResources.get("open"),function(){l.click()});q.className="geBtn";f.appendChild(q)}}document.createElement("canvas").getContext&&"data:image/"==b.value.substring(0,11)&&"data:image/svg"!=b.value.substring(0,14)&&(q=mxUtils.button(mxResources.get("crop"),function(){var e=new CropImageDialog(a,b.value,function(a){b.value=a});a.showDialog(e.container,200,180,!0,!0);e.init()}),q.className="geBtn",f.appendChild(q));"undefined"!=typeof google&&"undefined"!=typeof google.picker&&
-window.self===window.top&&(q=mxUtils.button(mxResources.get("search"),function(){if(null==a.imageSearchPicker){var b=(new google.picker.PickerBuilder).setLocale(mxLanguage).addView(google.picker.ViewId.IMAGE_SEARCH).enableFeature(google.picker.Feature.NAV_HIDDEN);a.imageSearchPicker=b.setCallback(function(b){ImageDialog.filePicked(b)}).build()}a.imageSearchPicker.setVisible(!0);a.movePickersToTop()}),q.className="geBtn",f.appendChild(q),null!=a.drive&&"1"==urlParams.photos&&(q=mxUtils.button(mxResources.get("googlePlus"),
-function(){a.spinner.spin(document.body,mxResources.get("authorizing"))&&a.drive.checkToken(mxUtils.bind(this,function(){a.spinner.stop();if(null==a.photoPicker){var b=gapi.auth.getToken().access_token,b=(new google.picker.PickerBuilder).setAppId(a.drive.appId).setLocale(mxLanguage).setOAuthToken(b).addView(google.picker.ViewId.PHOTOS).addView(google.picker.ViewId.PHOTO_ALBUMS).addView(google.picker.ViewId.PHOTO_UPLOAD);a.photoPicker=b.setCallback(function(b){ImageDialog.filePicked(b)}).build()}a.photoPicker.setVisible(!0);
-a.movePickersToTop()}))}),q.className="geBtn",f.appendChild(q)));mxEvent.addListener(b,"keypress",function(a){13==a.keyCode&&g(b.value)});q=mxUtils.button(mxResources.get("apply"),function(){g(b.value)});q.className="geBtn gePrimaryBtn";f.appendChild(q);a.editor.cancelFirst||f.appendChild(d);Graph.fileSupport&&(f.style.marginTop="120px",n.style.backgroundImage="url('"+IMAGE_PATH+"/droptarget.png')",n.style.backgroundPosition="center 65%",n.style.backgroundRepeat="no-repeat",d=document.createElement("div"),
-d.style.position="absolute",d.style.width="420px",d.style.top="58%",d.style.textAlign="center",d.style.fontSize="18px",d.style.color="#a0c3ff",mxUtils.write(d,mxResources.get("dragImagesHere")),n.appendChild(d));n.appendChild(f);this.container=n},LinkDialog=function(a,d,f,c,h){function k(b,a,e){e=mxUtils.button("",e);e.className="geBtn";e.setAttribute("title",a);a=document.createElement("img");a.style.height="26px";a.style.width="26px";a.setAttribute("src",b);e.style.minWidth="42px";e.style.verticalAlign=
-"middle";e.appendChild(a);y.appendChild(e)}var m=document.createElement("div");mxUtils.write(m,mxResources.get("editLink")+":");var n=document.createElement("div");n.className="geTitle";n.style.backgroundColor="transparent";n.style.borderColor="transparent";n.style.whiteSpace="nowrap";n.style.textOverflow="clip";n.style.cursor="default";mxClient.IS_VML||(n.style.paddingRight="20px");var b=document.createElement("input");b.setAttribute("placeholder",mxResources.get("dragUrlsHere"));b.setAttribute("type",
-"text");b.style.marginTop="6px";b.style.width="400px";b.style.backgroundImage="url('"+Dialog.prototype.clearImage+"')";b.style.backgroundRepeat="no-repeat";b.style.backgroundPosition="100% 50%";b.style.paddingRight="14px";var e=document.createElement("div");e.setAttribute("title",mxResources.get("reset"));e.style.position="relative";e.style.left="-16px";e.style.width="12px";e.style.height="14px";e.style.cursor="pointer";e.style.display=mxClient.IS_VML?"inline":"inline-block";e.style.top=(mxClient.IS_VML?
-0:3)+"px";e.style.background="url('"+a.editor.transparentImage+"')";mxEvent.addListener(e,"click",function(){b.value="";b.focus()});var g=document.createElement("input");g.style.cssText="margin-right:8px;margin-bottom:8px;";g.setAttribute("value","url");g.setAttribute("type","radio");g.setAttribute("name","current-linkdialog");var l=document.createElement("input");l.style.cssText="margin-right:8px;margin-bottom:8px;";l.setAttribute("value","url");l.setAttribute("type","radio");l.setAttribute("name",
-"current-linkdialog");var q=document.createElement("select");q.style.width="380px";if(h&&null!=a.pages){null!=d&&a.editor.graph.isPageLink(d)?(l.setAttribute("checked","checked"),l.defaultChecked=!0):(b.setAttribute("value",d),g.setAttribute("checked","checked"),g.defaultChecked=!0);b.style.width="380px";n.appendChild(g);n.appendChild(b);n.appendChild(e);mxUtils.br(n);n.appendChild(l);h=!1;for(e=0;e<a.pages.length;e++){var v=document.createElement("option");mxUtils.write(v,a.pages[e].getName()||mxResources.get("pageWithNumber",
-[e+1]));v.setAttribute("value","data:page/id,"+a.pages[e].getId());d==v.getAttribute("value")&&(v.setAttribute("selected","selected"),h=!0);q.appendChild(v)}if(!h&&l.checked){var u=document.createElement("option");mxUtils.write(u,mxResources.get("pageNotFound"));u.setAttribute("disabled","disabled");u.setAttribute("selected","selected");u.setAttribute("value","pageNotFound");q.appendChild(u);mxEvent.addListener(q,"change",function(){null==u.parentNode||u.selected||u.parentNode.removeChild(u)})}n.appendChild(q)}else b.setAttribute("value",
-d),n.appendChild(b),n.appendChild(e);m.appendChild(n);var t=mxUtils.button(f,function(){a.hideDialog();c(l.checked?"pageNotFound"!==q.value?q.value:d:b.value,LinkDialog.selectedDocs)});t.style.verticalAlign="middle";t.className="geBtn gePrimaryBtn";this.init=function(){l.checked?q.focus():(b.focus(),mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode||mxClient.IS_QUIRKS?b.select():document.execCommand("selectAll",!1,null));mxEvent.addListener(q,"focus",function(){g.removeAttribute("checked");
-l.setAttribute("checked","checked");l.checked=!0});mxEvent.addListener(b,"focus",function(){l.removeAttribute("checked");g.setAttribute("checked","checked");g.checked=!0});if(Graph.fileSupport){var e=m.parentNode,c=null;mxEvent.addListener(e,"dragleave",function(b){null!=c&&(c.parentNode.removeChild(c),c=null);b.stopPropagation();b.preventDefault()});mxEvent.addListener(e,"dragover",mxUtils.bind(this,function(b){null==c&&(!mxClient.IS_IE||10<document.documentMode)&&(c=a.highlightElement(e));b.stopPropagation();
-b.preventDefault()}));mxEvent.addListener(e,"drop",mxUtils.bind(this,function(a){null!=c&&(c.parentNode.removeChild(c),c=null);0<=mxUtils.indexOf(a.dataTransfer.types,"text/uri-list")&&(b.value=decodeURIComponent(a.dataTransfer.getData("text/uri-list")),g.setAttribute("checked","checked"),g.checked=!0,t.click());a.stopPropagation();a.preventDefault()}),!1)}};var y=document.createElement("div");y.style.marginTop="20px";y.style.textAlign="right";f=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog()});
-f.style.verticalAlign="middle";f.className="geBtn";a.editor.cancelFirst&&y.appendChild(f);LinkDialog.selectedDocs=null;LinkDialog.filePicked=function(a){if(a.action==google.picker.Action.PICKED){LinkDialog.selectedDocs=a.docs;var e=a.docs[0].url;"application/mxe"==a.docs[0].mimeType||"application/vnd.jgraph.mxfile"==a.docs[0].mimeType?(e=DriveClient.prototype.oldAppHostname,e="https://"+e+"/#G"+a.docs[0].id):"application/mxr"==a.docs[0].mimeType||"application/vnd.jgraph.mxfile.realtime"==a.docs[0].mimeType?
-(e=DriveClient.prototype.newAppHostname,e="https://"+e+"/#G"+a.docs[0].id):"application/vnd.google-apps.folder"==a.docs[0].mimeType&&(e="https://drive.google.com/#folders/"+a.docs[0].id);b.value=e;b.focus()}else LinkDialog.selectedDocs=null;b.focus()};"undefined"!=typeof google&&"undefined"!=typeof google.picker&&null!=a.drive&&k(IMAGE_PATH+"/google-drive-logo.svg",mxResources.get("googlePlus"),function(){a.spinner.spin(document.body,mxResources.get("authorizing"))&&a.drive.checkToken(mxUtils.bind(this,
-function(){a.spinner.stop();if(null==a.linkPicker){var b=gapi.auth.getToken().access_token,e=(new google.picker.DocsView(google.picker.ViewId.FOLDERS)).setParent("root").setIncludeFolders(!0).setSelectFolderEnabled(!0),c=(new google.picker.DocsView).setIncludeFolders(!0).setSelectFolderEnabled(!0),b=(new google.picker.PickerBuilder).setAppId(a.drive.appId).setLocale(mxLanguage).setOAuthToken(b).addView(e).addView(c).addView(google.picker.ViewId.RECENTLY_PICKED).addView(google.picker.ViewId.IMAGE_SEARCH).addView(google.picker.ViewId.VIDEO_SEARCH).addView(google.picker.ViewId.MAPS);
+f(m.value,n.value)});k.appendChild(e);e.className="geBtn gePrimaryBtn";a.editor.cancelFirst||k.appendChild(b);this.container=k},NewDialog=function(a,d,f,c,h,k){function m(){if(c)f||a.hideDialog(),c(q,u.value);else{var b=u.value;null!=b&&0<b.length&&a.pickFolder(a.mode==App.MODE_ONEDRIVE||a.mode==App.MODE_TRELLO||a.mode==App.MODE_GOOGLE&&(null==a.stateArg||null==a.stateArg.folderId)?a.mode:null,function(e){a.createFile(b,q,null!=v&&0<v.length?v:null,null,function(){a.hideDialog()},null,e)})}}function n(b,
+a,e){null!=x&&(x.style.backgroundColor="transparent",x.style.border="1px solid transparent");q=a;v=e;x=b;x.style.backgroundColor="#e6eff8";x.style.border="1px solid #ccd9ea"}function b(b,a,e,c,g){var l=document.createElement("div");l.className="geTemplate";l.style.height="140px";l.style.width="140px";null!=c&&0<c.length&&l.setAttribute("title",c);if(null!=b&&0<b.length){b.substring(0,b.length-4);l.style.backgroundImage="url("+TEMPLATE_PATH+"/"+b.substring(0,b.length-4)+".png)";l.style.backgroundPosition=
+"center center";l.style.backgroundRepeat="no-repeat";var q=!1;mxEvent.addListener(l,"click",function(e){y.setAttribute("disabled","disabled");l.style.backgroundColor="transparent";l.style.border="1px solid transparent";mxUtils.get(TEMPLATE_PATH+"/"+b,mxUtils.bind(this,function(b){200<=b.getStatus()&&299>=b.getStatus()&&(y.removeAttribute("disabled"),n(l,b.getText(),a),q&&m())}))});mxEvent.addListener(l,"dblclick",function(b){q=!0})}else l.innerHTML='<table width="100%" height="100%"><tr><td align="center" valign="middle">'+
+mxResources.get(e)+"</td></tr></table>",g&&n(l),mxEvent.addListener(l,"click",function(b){n(l)}),mxEvent.addListener(l,"dblclick",function(b){m()});t.appendChild(l)}function e(){function a(){for(var a=!0;e<B.length&&(a||0!=mxUtils.mod(e,30));)a=B[e++],b(a.url,a.libs,a.title,a.tooltip,a.select),a=!1}var e=0;mxEvent.addListener(t,"scroll",function(b){t.scrollTop+t.clientHeight>=t.scrollHeight&&(a(),mxEvent.consume(b))});var c=null,g;for(g in C){var l=document.createElement("div"),q=mxResources.get(g),
+d=C[g];null==q&&(q=g.substring(0,1).toUpperCase()+g.substring(1));18<q.length&&(q=q.substring(0,18)+"&hellip;");l.style.cssText="display:block;cursor:pointer;padding:6px;white-space:nowrap;margin-bottom:-1px;overflow:hidden;text-overflow:ellipsis;";l.setAttribute("title",q+" ("+d.length+")");mxUtils.write(l,l.getAttribute("title"));w.appendChild(l);null==c&&(c=l,c.style.backgroundColor="#ebf2f9");(function(b,g){mxEvent.addListener(l,"click",function(){c!=g&&(c.style.backgroundColor="",c=g,c.style.backgroundColor=
+"#ebf2f9",t.scrollTop=0,t.innerHTML="",e=0,B=C[b],a())})})(g,l)}a()}f=null!=f?f:!0;h=null!=h?h:!1;var g=document.createElement("div");g.style.height="100%";var l=document.createElement("div");l.style.whiteSpace="nowrap";l.style.height="46px";g.appendChild(l);var p=document.createElement("img");p.setAttribute("border","0");p.setAttribute("align","absmiddle");p.style.width="40px";p.style.height="40px";p.style.marginRight="10px";p.style.paddingBottom="4px";p.src=a.mode==App.MODE_GOOGLE?IMAGE_PATH+"/google-drive-logo.svg":
+a.mode==App.MODE_DROPBOX?IMAGE_PATH+"/dropbox-logo.svg":a.mode==App.MODE_ONEDRIVE?IMAGE_PATH+"/onedrive-logo.svg":a.mode==App.MODE_GITHUB?IMAGE_PATH+"/github-logo.svg":a.mode==App.MODE_TRELLO?IMAGE_PATH+"/trello-logo.svg":a.mode==App.MODE_BROWSER?IMAGE_PATH+"/osa_database.png":IMAGE_PATH+"/osa_drive-harddisk.png";!d&&f&&l.appendChild(p);f&&mxUtils.write(l,(null==a.mode||a.mode==App.MODE_GOOGLE||a.mode==App.MODE_BROWSER?mxResources.get("diagramName"):mxResources.get("filename"))+":");p=".xml";a.mode==
+App.MODE_GOOGLE&&null!=a.drive?p=a.drive.extension:a.mode==App.MODE_DROPBOX&&null!=a.dropbox?p=a.dropbox.extension:a.mode==App.MODE_ONEDRIVE&&null!=a.oneDrive?p=a.oneDrive.extension:a.mode==App.MODE_GITHUB&&null!=a.gitHub?p=a.gitHub.extension:a.mode==App.MODE_TRELLO&&null!=a.trello&&(p=a.trello.extension);var u=document.createElement("input");u.setAttribute("value",a.defaultFilename+p);u.style.marginRight="20px";u.style.marginLeft="10px";u.style.width=d?"220px":"450px";this.init=function(){f&&(u.focus(),
+mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode||mxClient.IS_QUIRKS?u.select():document.execCommand("selectAll",!1,null))};f&&l.appendChild(u);var v=null,q=null,x=null,y=mxUtils.button(mxResources.get("create"),function(){m()});y.className="geBtn gePrimaryBtn";var t=document.createElement("div");t.style.border="1px solid #d3d3d3";t.style.position="absolute";t.style.left="160px";t.style.right="34px";t.style.top=f?"72px":"40px";t.style.bottom="76px";t.style.margin="6px 0 0 -1px";t.style.padding=
+"6px";t.style.overflow="auto";var w=document.createElement("div");w.style.cssText="position:absolute;left:30px;width:128px;top:72px;bottom:76px;margin-top:6px;overflow:auto;border:1px solid #d3d3d3;";f||(w.style.top="40px");var C={},F=1;C.basic=[{title:"blankDiagram",select:!0}];var B=C.basic;if(!d){g.appendChild(w);g.appendChild(t);var G=!1;mxUtils.get(TEMPLATE_PATH+"/index.xml",function(b){if(!G){G=!0;for(b=b.getXml().documentElement.firstChild;null!=b;){if("undefined"!==typeof b.getAttribute){var a=
+b.getAttribute("url");if(null!=a){var c=a.indexOf("/"),a=a.substring(0,c),c=C[a];null==c&&(F++,c=[],C[a]=c);c.push({url:b.getAttribute("url"),libs:b.getAttribute("libs"),title:b.getAttribute("title"),tooltip:b.getAttribute("url")})}}b=b.nextSibling}e()}})}mxEvent.addListener(u,"keypress",function(b){13==b.keyCode&&m()});l=document.createElement("div");l.style.marginTop=d?"4px":"16px";l.style.textAlign="right";l.style.position="absolute";l.style.left="40px";l.style.bottom="30px";l.style.right="40px";
+p=mxUtils.button(mxResources.get("cancel"),function(){null!=k&&k();a.hideDialog(!0)});p.className="geBtn";!a.editor.cancelFirst||h&&null==k||l.appendChild(p);if(!d&&!a.isOffline()&&f&&null==c&&!h){var z=mxUtils.button(mxResources.get("help"),function(){window.open("https://support.draw.io/display/DO/Creating+and+Opening+Files")});z.className="geBtn";l.appendChild(z)}d||"1"==urlParams.embed||h||(d=mxUtils.button(mxResources.get("fromTemplateUrl"),function(){var b=new FilenameDialog(a,"",mxResources.get("create"),
+function(b){null!=b&&0<b.length&&(b=a.getUrl(window.location.pathname+"?mode="+a.mode+"&title="+encodeURIComponent(u.value)+"&create="+encodeURIComponent(b)),null==a.getCurrentFile()?window.location.href=b:window.openWindow(b))},mxResources.get("url"));a.showDialog(b.container,300,80,!0,!0);b.init()}),d.className="geBtn",l.appendChild(d));l.appendChild(y);a.editor.cancelFirst||null!=c||h&&null==k||l.appendChild(p);g.appendChild(l);this.container=g},CreateDialog=function(a,d,f,c,h,k,m,n,b,e,g,l,p,
+u,v){function q(b,e,c,g){function t(){mxEvent.addListener(q,"click",function(){var b=c;if(m){var e=w.value,g=e.lastIndexOf(".");if(0>d.lastIndexOf(".")&&0>g){var b=null!=b?b:B.value,t="";b==App.MODE_GOOGLE?t=a.drive.extension:b==App.MODE_GITHUB?t=a.gitHub.extension:b==App.MODE_TRELLO?t=a.trello.extension:b==App.MODE_DROPBOX?t=a.dropbox.extension:b==App.MODE_ONEDRIVE?t=a.oneDrive.extension:b==App.MODE_DEVICE&&(t=".xml");0<=g&&(e=e.substring(0,g));w.value=e+t}}x(c)})}var q=document.createElement("a");
+q.style.overflow="hidden";var p=document.createElement("img");p.src=b;p.setAttribute("border","0");p.setAttribute("align","absmiddle");p.style.width="60px";p.style.height="60px";p.style.paddingBottom="6px";q.style.display=mxClient.IS_QUIRKS?"inline":"inline-block";q.className="geBaseButton";q.style.position="relative";q.style.margin="4px";q.style.padding="8px 8px 10px 8px";q.style.whiteSpace="nowrap";q.appendChild(p);mxClient.IS_QUIRKS&&(q.style.cssFloat="left",q.style.zoom="1");q.style.color="gray";
+q.style.fontSize="11px";var f=document.createElement("div");q.appendChild(f);mxUtils.write(f,e);if(null!=g&&null==a[g]){p.style.visibility="hidden";mxUtils.setOpacity(f,10);var h=new Spinner({lines:12,length:12,width:5,radius:10,rotate:0,color:"#000",speed:1.5,trail:60,shadow:!1,hwaccel:!1,top:"40%",zIndex:2E9});h.spin(q);var y=window.setTimeout(function(){null==a[g]&&(h.stop(),q.style.display="none")},3E4);a.addListener("clientLoaded",mxUtils.bind(this,function(){null!=a[g]&&(window.clearTimeout(y),
+mxUtils.setOpacity(f,100),p.style.visibility="",h.stop(),t())}))}else t();C.appendChild(q);++F==l&&(mxUtils.br(C),F=0)}function x(b){var e=w.value;if(null==b||null!=e&&0<e.length)a.hideDialog(),f(e,b)}m=null!=m?m:!0;n=null!=n?n:!0;l=null!=l?l:3;var y=document.createElement("div");null==c&&a.addLanguageMenu(y);var t=document.createElement("h2");mxUtils.write(t,h||mxResources.get("create"));t.style.marginTop="0px";t.style.marginBottom="24px";y.appendChild(t);mxUtils.write(y,mxResources.get("filename")+
+":");var w=document.createElement("input");w.setAttribute("value",d);w.style.width="280px";w.style.marginLeft="10px";w.style.marginBottom="20px";this.init=function(){w.focus();mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode||mxClient.IS_QUIRKS?w.select():document.execCommand("selectAll",!1,null)};y.appendChild(w);null!=p&&null!=u&&"image/"==u.substring(0,6)&&(w.style.width="160px",h=document.createElement("img"),h.setAttribute("src","data:"+u+(v?";base64,":";utf8,")+p),h.style.position="absolute",
+h.style.top="70px",h.style.right="100px",h.style.maxWidth="120px",h.style.maxHeight="80px",mxUtils.setPrefixedStyle(h.style,"transform","translate(50%,-50%)"),y.appendChild(h));mxUtils.br(y);var C=document.createElement("div");C.style.textAlign="center";var F=0;C.style.marginTop="6px";y.appendChild(C);var B=document.createElement("select");B.style.marginLeft="10px";a.isOfflineApp()||a.isOffline()||("function"===typeof window.DriveClient&&(p=document.createElement("option"),p.setAttribute("value",
+App.MODE_GOOGLE),mxUtils.write(p,mxResources.get("googleDrive")),B.appendChild(p),q(IMAGE_PATH+"/google-drive-logo.svg",mxResources.get("googleDrive"),App.MODE_GOOGLE,"drive")),null!=a.gitHub&&(p=document.createElement("option"),p.setAttribute("value",App.MODE_GITHUB),mxUtils.write(p,mxResources.get("github")),B.appendChild(p),q(IMAGE_PATH+"/github-logo.svg",mxResources.get("github"),App.MODE_GITHUB,"gitHub")),"function"===typeof window.DropboxClient&&(p=document.createElement("option"),p.setAttribute("value",
+App.MODE_DROPBOX),mxUtils.write(p,mxResources.get("dropbox")),B.appendChild(p),a.mode==App.MODE_DROPBOX&&p.setAttribute("selected","selected"),q(IMAGE_PATH+"/dropbox-logo.svg",mxResources.get("dropbox"),App.MODE_DROPBOX,"dropbox")),"function"===typeof window.OneDriveClient&&(p=document.createElement("option"),p.setAttribute("value",App.MODE_ONEDRIVE),mxUtils.write(p,mxResources.get("oneDrive")),B.appendChild(p),a.mode==App.MODE_ONEDRIVE&&p.setAttribute("selected","selected"),q(IMAGE_PATH+"/onedrive-logo.svg",
+mxResources.get("oneDrive"),App.MODE_ONEDRIVE,"oneDrive")),null!=a.trello&&(p=document.createElement("option"),p.setAttribute("value",App.MODE_TRELLO),mxUtils.write(p,mxResources.get("trello")),B.appendChild(p),q(IMAGE_PATH+"/trello-logo.svg",mxResources.get("trello"),App.MODE_TRELLO,"trello")));if(!Editor.useLocalStorage||"device"==urlParams.storage||null!=a.getCurrentFile()&&!mxClient.IS_IOS)p=document.createElement("option"),p.setAttribute("value",App.MODE_DEVICE),mxUtils.write(p,mxResources.get("device")),
+B.appendChild(p),a.mode!=App.MODE_DEVICE&&n||p.setAttribute("selected","selected"),g&&q(IMAGE_PATH+"/osa_drive-harddisk.png",mxResources.get("device"),App.MODE_DEVICE);n&&isLocalStorage&&"0"!=urlParams.browser&&(n=document.createElement("option"),n.setAttribute("value",App.MODE_BROWSER),mxUtils.write(n,mxResources.get("browser")),B.appendChild(n),a.mode==App.MODE_BROWSER&&n.setAttribute("selected","selected"),q(IMAGE_PATH+"/osa_database.png",mxResources.get("browser"),App.MODE_BROWSER));n=document.createElement("div");
+n.style.marginTop="26px";n.style.textAlign="center";null!=e&&(p=mxUtils.button(mxResources.get("help"),function(){window.open(e)}),p.className="geBtn",n.appendChild(p));p=mxUtils.button(mxResources.get("cancel"),function(){null!=c?c():(a.fileLoaded(null),a.hideDialog(),window.close(),window.location.href=a.getUrl())});p.className="geBtn";a.editor.cancelFirst&&n.appendChild(p);null==c&&(u=mxUtils.button(mxResources.get("decideLater"),function(){x(null)}),u.className="geBtn",n.appendChild(u));b&&(b=
+mxUtils.button(mxResources.get("openInNewWindow"),function(){x("_blank")}),b.className="geBtn",n.appendChild(b));mxClient.IS_IOS||(k=mxUtils.button(k||mxResources.get("create"),function(){x(g?"download":App.MODE_DEVICE)}),k.className="geBtn gePrimaryBtn",n.appendChild(k));a.editor.cancelFirst||n.appendChild(p);mxEvent.addListener(w,"keypress",function(b){13==b.keyCode?x(App.MODE_DEVICE):27==b.keyCode&&(a.fileLoaded(null),a.hideDialog(),window.close())});y.appendChild(n);this.container=y},PopupDialog=
+function(a,d,f,c,h){h=null!=h?h:!0;var k=document.createElement("div");k.style.textAlign="left";mxUtils.write(k,mxResources.get("fileOpenLocation"));mxUtils.br(k);mxUtils.br(k);var m=mxUtils.button(mxResources.get("openInThisWindow"),function(){h&&a.hideDialog();null!=c&&c()});m.className="geBtn";m.style.marginBottom="8px";m.style.width="280px";k.appendChild(m);mxUtils.br(k);var n=mxUtils.button(mxResources.get("openInNewWindow"),function(){h&&a.hideDialog();null!=f&&f();window.open(d)});n.className=
+"geBtn gePrimaryBtn";n.style.width=m.style.width;k.appendChild(n);mxUtils.br(k);mxUtils.br(k);mxUtils.write(k,mxResources.get("allowPopups"));this.container=k},ImageDialog=function(a,d,f,c,h,k){k=null!=k?k:!0;var m=a.editor.graph,n=document.createElement("div");mxUtils.write(n,d);d=document.createElement("div");d.className="geTitle";d.style.backgroundColor="transparent";d.style.borderColor="transparent";d.style.whiteSpace="nowrap";d.style.textOverflow="clip";d.style.cursor="default";mxClient.IS_VML||
+(d.style.paddingRight="20px");var b=document.createElement("input");b.setAttribute("value",f);b.setAttribute("type","text");b.setAttribute("spellcheck","false");b.setAttribute("autocorrect","off");b.setAttribute("autocomplete","off");b.setAttribute("autocapitalize","off");b.style.marginTop="6px";b.style.width=(Graph.fileSupport?420:340)+(mxClient.IS_QUIRKS?20:-20)+"px";b.style.backgroundImage="url('"+Dialog.prototype.clearImage+"')";b.style.backgroundRepeat="no-repeat";b.style.backgroundPosition=
+"100% 50%";b.style.paddingRight="14px";f=document.createElement("div");f.setAttribute("title",mxResources.get("reset"));f.style.position="relative";f.style.left="-16px";f.style.width="12px";f.style.height="14px";f.style.cursor="pointer";f.style.display=mxClient.IS_VML?"inline":"inline-block";f.style.top=(mxClient.IS_VML?0:3)+"px";f.style.background="url('"+a.editor.transparentImage+"')";mxEvent.addListener(f,"click",function(){b.value="";b.focus()});d.appendChild(b);d.appendChild(f);n.appendChild(d);
+var e=function(b,e,g){var l="data:"==b.substring(0,5);(!a.isOffline()||l&&"undefined"===typeof chrome)&&a.spinner.spin(document.body,mxResources.get("inserting"))?a.loadImage(b,function(l){a.spinner.stop();a.hideDialog();var t=null!=e&&null!=g?Math.max(e/l.width,g/l.height):Math.min(1,Math.min(520/l.width,520/l.height));k&&(b=a.convertDataUri(b));c(b,Math.round(Number(l.width)*t),Math.round(Number(l.height)*t))},function(){a.spinner.stop();c(null);a.showError(mxResources.get("error"),mxResources.get("fileNotFound"),
+mxResources.get("ok"))}):(b=a.convertDataUri(b),e=null==e?120:e,g=null==g?100:g,a.hideDialog(),c(b,e,g))},g=function(b){if(null!=b&&0<b.length){var g=h?null:m.getModel().getGeometry(m.getSelectionCell());null!=g?e(b,g.width,g.height):e(b)}else a.hideDialog(),c(null)};this.init=function(){b.focus();if(Graph.fileSupport){b.setAttribute("placeholder",mxResources.get("dragImagesHere"));var e=n.parentNode,c=null;mxEvent.addListener(e,"dragleave",function(b){null!=c&&(c.parentNode.removeChild(c),c=null);
+b.stopPropagation();b.preventDefault()});mxEvent.addListener(e,"dragover",mxUtils.bind(this,function(b){null==c&&(!mxClient.IS_IE||10<document.documentMode)&&(c=a.highlightElement(e));b.stopPropagation();b.preventDefault()}));mxEvent.addListener(e,"drop",mxUtils.bind(this,function(b){null!=c&&(c.parentNode.removeChild(c),c=null);if(0<b.dataTransfer.files.length)a.importFiles(b.dataTransfer.files,0,0,a.maxImageSize,function(b,a,e,c,l,q){g(b)},function(){},function(b){return"image/"==b.type.substring(0,
+6)},function(b){for(var a=0;a<b.length;a++)b[a]()},!mxEvent.isControlDown(b));else if(0<=mxUtils.indexOf(b.dataTransfer.types,"text/uri-list")){var e=b.dataTransfer.getData("text/uri-list");/\.(gif|jpg|jpeg|tiff|png|svg)($|\?)/i.test(e)&&g(decodeURIComponent(e))}b.stopPropagation();b.preventDefault()}),!1)}};f=document.createElement("div");f.style.marginTop=mxClient.IS_QUIRKS?"22px":"14px";f.style.textAlign="right";d=mxUtils.button(mxResources.get("cancel"),function(){a.spinner.stop();a.hideDialog()});
+d.className="geBtn";a.editor.cancelFirst&&f.appendChild(d);ImageDialog.filePicked=function(a){a.action==google.picker.Action.PICKED&&null!=a.docs[0].thumbnails&&(a=a.docs[0].thumbnails[a.docs[0].thumbnails.length-1],null!=a&&(b.value=a.url));b.focus()};if(Graph.fileSupport){var l=document.createElement("input");l.setAttribute("multiple","multiple");l.setAttribute("type","file");if(null==document.documentMode){mxEvent.addListener(l,"change",function(b){a.importFiles(l.files,0,0,a.maxImageSize,function(b,
+a,e,c,t,l){g(b)},function(){},function(b){return"image/"==b.type.substring(0,6)},function(b){for(var a=0;a<b.length;a++)b[a]()},!0)});var p=mxUtils.button(mxResources.get("open"),function(){l.click()});p.className="geBtn";f.appendChild(p)}}document.createElement("canvas").getContext&&"data:image/"==b.value.substring(0,11)&&"data:image/svg"!=b.value.substring(0,14)&&(p=mxUtils.button(mxResources.get("crop"),function(){var e=new CropImageDialog(a,b.value,function(a){b.value=a});a.showDialog(e.container,
+200,180,!0,!0);e.init()}),p.className="geBtn",f.appendChild(p));"undefined"!=typeof google&&"undefined"!=typeof google.picker&&window.self===window.top&&(p=mxUtils.button(mxResources.get("search"),function(){if(null==a.imageSearchPicker){var b=(new google.picker.PickerBuilder).setLocale(mxLanguage).addView(google.picker.ViewId.IMAGE_SEARCH).enableFeature(google.picker.Feature.NAV_HIDDEN);a.imageSearchPicker=b.setCallback(function(b){ImageDialog.filePicked(b)}).build()}a.imageSearchPicker.setVisible(!0);
+a.movePickersToTop()}),p.className="geBtn",f.appendChild(p),null!=a.drive&&"1"==urlParams.photos&&(p=mxUtils.button(mxResources.get("googlePlus"),function(){a.spinner.spin(document.body,mxResources.get("authorizing"))&&a.drive.checkToken(mxUtils.bind(this,function(){a.spinner.stop();if(null==a.photoPicker){var b=gapi.auth.getToken().access_token,b=(new google.picker.PickerBuilder).setAppId(a.drive.appId).setLocale(mxLanguage).setOAuthToken(b).addView(google.picker.ViewId.PHOTOS).addView(google.picker.ViewId.PHOTO_ALBUMS).addView(google.picker.ViewId.PHOTO_UPLOAD);
+a.photoPicker=b.setCallback(function(b){ImageDialog.filePicked(b)}).build()}a.photoPicker.setVisible(!0);a.movePickersToTop()}))}),p.className="geBtn",f.appendChild(p)));mxEvent.addListener(b,"keypress",function(a){13==a.keyCode&&g(b.value)});p=mxUtils.button(mxResources.get("apply"),function(){g(b.value)});p.className="geBtn gePrimaryBtn";f.appendChild(p);a.editor.cancelFirst||f.appendChild(d);Graph.fileSupport&&(f.style.marginTop="120px",n.style.backgroundImage="url('"+IMAGE_PATH+"/droptarget.png')",
+n.style.backgroundPosition="center 65%",n.style.backgroundRepeat="no-repeat",d=document.createElement("div"),d.style.position="absolute",d.style.width="420px",d.style.top="58%",d.style.textAlign="center",d.style.fontSize="18px",d.style.color="#a0c3ff",mxUtils.write(d,mxResources.get("dragImagesHere")),n.appendChild(d));n.appendChild(f);this.container=n},LinkDialog=function(a,d,f,c,h){function k(b,a,e){e=mxUtils.button("",e);e.className="geBtn";e.setAttribute("title",a);a=document.createElement("img");
+a.style.height="26px";a.style.width="26px";a.setAttribute("src",b);e.style.minWidth="42px";e.style.verticalAlign="middle";e.appendChild(a);x.appendChild(e)}var m=document.createElement("div");mxUtils.write(m,mxResources.get("editLink")+":");var n=document.createElement("div");n.className="geTitle";n.style.backgroundColor="transparent";n.style.borderColor="transparent";n.style.whiteSpace="nowrap";n.style.textOverflow="clip";n.style.cursor="default";mxClient.IS_VML||(n.style.paddingRight="20px");var b=
+document.createElement("input");b.setAttribute("placeholder",mxResources.get("dragUrlsHere"));b.setAttribute("type","text");b.style.marginTop="6px";b.style.width="400px";b.style.backgroundImage="url('"+Dialog.prototype.clearImage+"')";b.style.backgroundRepeat="no-repeat";b.style.backgroundPosition="100% 50%";b.style.paddingRight="14px";var e=document.createElement("div");e.setAttribute("title",mxResources.get("reset"));e.style.position="relative";e.style.left="-16px";e.style.width="12px";e.style.height=
+"14px";e.style.cursor="pointer";e.style.display=mxClient.IS_VML?"inline":"inline-block";e.style.top=(mxClient.IS_VML?0:3)+"px";e.style.background="url('"+a.editor.transparentImage+"')";mxEvent.addListener(e,"click",function(){b.value="";b.focus()});var g=document.createElement("input");g.style.cssText="margin-right:8px;margin-bottom:8px;";g.setAttribute("value","url");g.setAttribute("type","radio");g.setAttribute("name","current-linkdialog");var l=document.createElement("input");l.style.cssText="margin-right:8px;margin-bottom:8px;";
+l.setAttribute("value","url");l.setAttribute("type","radio");l.setAttribute("name","current-linkdialog");var p=document.createElement("select");p.style.width="380px";if(h&&null!=a.pages){null!=d&&a.editor.graph.isPageLink(d)?(l.setAttribute("checked","checked"),l.defaultChecked=!0):(b.setAttribute("value",d),g.setAttribute("checked","checked"),g.defaultChecked=!0);b.style.width="380px";n.appendChild(g);n.appendChild(b);n.appendChild(e);mxUtils.br(n);n.appendChild(l);h=!1;for(e=0;e<a.pages.length;e++){var u=
+document.createElement("option");mxUtils.write(u,a.pages[e].getName()||mxResources.get("pageWithNumber",[e+1]));u.setAttribute("value","data:page/id,"+a.pages[e].getId());d==u.getAttribute("value")&&(u.setAttribute("selected","selected"),h=!0);p.appendChild(u)}if(!h&&l.checked){var v=document.createElement("option");mxUtils.write(v,mxResources.get("pageNotFound"));v.setAttribute("disabled","disabled");v.setAttribute("selected","selected");v.setAttribute("value","pageNotFound");p.appendChild(v);mxEvent.addListener(p,
+"change",function(){null==v.parentNode||v.selected||v.parentNode.removeChild(v)})}n.appendChild(p)}else b.setAttribute("value",d),n.appendChild(b),n.appendChild(e);m.appendChild(n);var q=mxUtils.button(f,function(){a.hideDialog();c(l.checked?"pageNotFound"!==p.value?p.value:d:b.value,LinkDialog.selectedDocs)});q.style.verticalAlign="middle";q.className="geBtn gePrimaryBtn";this.init=function(){l.checked?p.focus():(b.focus(),mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode||mxClient.IS_QUIRKS?
+b.select():document.execCommand("selectAll",!1,null));mxEvent.addListener(p,"focus",function(){g.removeAttribute("checked");l.setAttribute("checked","checked");l.checked=!0});mxEvent.addListener(b,"focus",function(){l.removeAttribute("checked");g.setAttribute("checked","checked");g.checked=!0});if(Graph.fileSupport){var e=m.parentNode,c=null;mxEvent.addListener(e,"dragleave",function(b){null!=c&&(c.parentNode.removeChild(c),c=null);b.stopPropagation();b.preventDefault()});mxEvent.addListener(e,"dragover",
+mxUtils.bind(this,function(b){null==c&&(!mxClient.IS_IE||10<document.documentMode)&&(c=a.highlightElement(e));b.stopPropagation();b.preventDefault()}));mxEvent.addListener(e,"drop",mxUtils.bind(this,function(a){null!=c&&(c.parentNode.removeChild(c),c=null);0<=mxUtils.indexOf(a.dataTransfer.types,"text/uri-list")&&(b.value=decodeURIComponent(a.dataTransfer.getData("text/uri-list")),g.setAttribute("checked","checked"),g.checked=!0,q.click());a.stopPropagation();a.preventDefault()}),!1)}};var x=document.createElement("div");
+x.style.marginTop="20px";x.style.textAlign="right";f=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog()});f.style.verticalAlign="middle";f.className="geBtn";a.editor.cancelFirst&&x.appendChild(f);LinkDialog.selectedDocs=null;LinkDialog.filePicked=function(a){if(a.action==google.picker.Action.PICKED){LinkDialog.selectedDocs=a.docs;var e=a.docs[0].url;"application/mxe"==a.docs[0].mimeType||"application/vnd.jgraph.mxfile"==a.docs[0].mimeType?(e=DriveClient.prototype.oldAppHostname,e=
+"https://"+e+"/#G"+a.docs[0].id):"application/mxr"==a.docs[0].mimeType||"application/vnd.jgraph.mxfile.realtime"==a.docs[0].mimeType?(e=DriveClient.prototype.newAppHostname,e="https://"+e+"/#G"+a.docs[0].id):"application/vnd.google-apps.folder"==a.docs[0].mimeType&&(e="https://drive.google.com/#folders/"+a.docs[0].id);b.value=e;b.focus()}else LinkDialog.selectedDocs=null;b.focus()};"undefined"!=typeof google&&"undefined"!=typeof google.picker&&null!=a.drive&&k(IMAGE_PATH+"/google-drive-logo.svg",
+mxResources.get("googlePlus"),function(){a.spinner.spin(document.body,mxResources.get("authorizing"))&&a.drive.checkToken(mxUtils.bind(this,function(){a.spinner.stop();if(null==a.linkPicker){var b=gapi.auth.getToken().access_token,e=(new google.picker.DocsView(google.picker.ViewId.FOLDERS)).setParent("root").setIncludeFolders(!0).setSelectFolderEnabled(!0),c=(new google.picker.DocsView).setIncludeFolders(!0).setSelectFolderEnabled(!0),b=(new google.picker.PickerBuilder).setAppId(a.drive.appId).setLocale(mxLanguage).setOAuthToken(b).addView(e).addView(c).addView(google.picker.ViewId.RECENTLY_PICKED).addView(google.picker.ViewId.IMAGE_SEARCH).addView(google.picker.ViewId.VIDEO_SEARCH).addView(google.picker.ViewId.MAPS);
 "1"==urlParams.photos&&b.addView(google.picker.ViewId.PHOTOS).addView(google.picker.ViewId.PHOTO_ALBUMS).addView(google.picker.ViewId.PHOTO_UPLOAD);a.linkPicker=b.setCallback(function(b){LinkDialog.filePicked(b)}).build()}a.linkPicker.setVisible(!0);a.movePickersToTop()}))});"undefined"!=typeof Dropbox&&"undefined"!=typeof Dropbox.choose&&k(IMAGE_PATH+"/dropbox-logo.svg",mxResources.get("dropbox"),function(){Dropbox.choose({linkType:"direct",cancel:function(){},success:function(a){b.value=a[0].link;
 b.focus()}})});null!=a.oneDrive&&k(IMAGE_PATH+"/onedrive-logo.svg",mxResources.get("oneDrive"),function(){a.oneDrive.pickFile(function(a,e){b.value=e.value[0].webUrl;b.focus()})});null!=a.gitHub&&k(IMAGE_PATH+"/github-logo.svg",mxResources.get("github"),function(){a.gitHub.pickFile(function(a){if(null!=a){a=a.split("/");var e=a[0],c=a[1],g=a[2];a=a.slice(3,a.length).join("/");b.value="https://github.com/"+e+"/"+c+"/blob/"+g+"/"+a;b.focus()}})});mxEvent.addListener(b,"keypress",function(e){13==e.keyCode&&
-(a.hideDialog(),c(l.checked?q.value:b.value,LinkDialog.selectedDocs))});y.appendChild(t);a.editor.cancelFirst||y.appendChild(f);m.appendChild(y);this.container=m},AboutDialog=function(a){var d=document.createElement("div");d.style.marginTop="6px";d.setAttribute("align","center");var f=document.createElement("img");f.style.border="0px";f.setAttribute("width","176");f.setAttribute("width","151");f.style.width="170px";f.style.height="219px";f.setAttribute("src",IMAGE_PATH+"/logo-flat.png");d.appendChild(f);
+(a.hideDialog(),c(l.checked?p.value:b.value,LinkDialog.selectedDocs))});x.appendChild(q);a.editor.cancelFirst||x.appendChild(f);m.appendChild(x);this.container=m},AboutDialog=function(a){var d=document.createElement("div");d.style.marginTop="6px";d.setAttribute("align","center");var f=document.createElement("img");f.style.border="0px";f.setAttribute("width","176");f.setAttribute("width","151");f.style.width="170px";f.style.height="219px";f.setAttribute("src",IMAGE_PATH+"/logo-flat.png");d.appendChild(f);
 mxUtils.br(d);f=document.createElement("small");f.innerHTML="v "+EditorUi.VERSION;f.style.color="#505050";d.appendChild(f);mxUtils.br(d);mxUtils.br(d);f=document.createElement("small");f.style.color="#505050";f.innerHTML='&copy; 2005-2017 <a href="https://about.draw.io/" style="color:inherit;" target="_blank">JGraph Ltd</a>.<br>All Rights Reserved.';d.appendChild(f);mxEvent.addListener(d,"click",function(c){"A"!=mxEvent.getSource(c).nodeName&&a.hideDialog()});this.container=d},FeedbackDialog=function(a){var d=
 document.createElement("div"),f=document.createElement("div");mxUtils.write(f,mxResources.get("sendYourFeedbackToDrawIo"));f.style.fontSize="18px";f.style.marginBottom="18px";d.appendChild(f);f=document.createElement("div");mxUtils.write(f,mxResources.get("yourEmailAddress")+" ("+mxResources.get("required")+")");d.appendChild(f);var c=document.createElement("input");c.setAttribute("type","text");c.style.marginTop="6px";c.style.width="600px";var h=mxUtils.button(mxResources.get("sendMessage"),function(){var e=
 (m.checked?"\nDiagram:\n"+a.getFileData():"")+"\nBrowser:\n"+navigator.userAgent;e.length>FeedbackDialog.maxAttachmentSize?a.alert(mxResources.get("drawingTooLarge")):(a.hideDialog(),a.spinner.spin(document.body)&&mxUtils.post(null!=FeedbackDialog.feedbackUrl?FeedbackDialog.feedbackUrl:"/email","email="+encodeURIComponent(c.value)+"&version="+encodeURIComponent(EditorUi.VERSION)+"&url="+encodeURIComponent(window.location.href)+"&body="+encodeURIComponent("Feedback:\n"+b.value+e),function(b){a.spinner.stop();
@@ -6069,54 +6071,54 @@ mxUtils.write(n," "+mxResources.get("includeCopyOfMyDiagram"));f.appendChild(n);
 f.style.marginTop="26px";f.style.textAlign="right";n=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog()});n.className="geBtn";a.editor.cancelFirst?(f.appendChild(n),f.appendChild(h)):(f.appendChild(h),f.appendChild(n));d.appendChild(f);this.container=d};FeedbackDialog.maxAttachmentSize=1E6;
 var RevisionDialog=function(a,d){var f=document.createElement("div"),c=document.createElement("h3");c.style.marginTop="0px";mxUtils.write(c,mxResources.get("revisionHistory"));f.appendChild(c);var h=document.createElement("div");h.style.position="absolute";h.style.overflow="auto";h.style.width="170px";h.style.height="378px";f.appendChild(h);var k=document.createElement("div");k.style.position="absolute";k.style.border="1px solid lightGray";k.style.left="199px";k.style.width="470px";k.style.height=
 "376px";k.style.overflow="hidden";mxEvent.disableContextMenu(k);f.appendChild(k);var m=new Graph(k);m.setEnabled(!1);m.setPanning(!0);m.panningHandler.ignoreCell=!0;m.panningHandler.useLeftButtonForPanning=!0;m.minFitScale=null;m.maxFitScale=null;m.centerZoom=!0;var n=0,b=null,e=0,g=m.getGlobalVariable;m.getGlobalVariable=function(a){return"page"==a&&null!=b&&null!=b[e]?b[e].getAttribute("name"):"pagenumber"==a?e+1:g.apply(this,arguments)};m.getLinkForCell=function(){return null};Editor.MathJaxRender&&
-m.addListener(mxEvent.SIZE,mxUtils.bind(this,function(b,e){a.editor.graph.mathEnabled&&Editor.MathJaxRender(m.container)}));var l=new Spinner({lines:11,length:15,width:6,radius:10,corners:1,rotate:0,direction:1,color:"#000",speed:1.4,trail:60,shadow:!1,hwaccel:!1,className:"spinner",zIndex:2E9,top:"50%",left:"50%"}),q=a.getCurrentFile(),v=null,u=null,t=null,y=null,x=mxUtils.button("",function(){null!=t&&m.zoomIn()});x.className="geSprite geSprite-zoomin";x.setAttribute("title",mxResources.get("zoomIn"));
-x.style.outline="none";x.style.border="none";x.style.margin="2px";x.setAttribute("disabled","disabled");mxUtils.setOpacity(x,20);var p=mxUtils.button("",function(){null!=t&&m.zoomOut()});p.className="geSprite geSprite-zoomout";p.setAttribute("title",mxResources.get("zoomOut"));p.style.outline="none";p.style.border="none";p.style.margin="2px";p.setAttribute("disabled","disabled");mxUtils.setOpacity(p,20);var w=mxUtils.button("",function(){null!=t&&(m.maxFitScale=8,m.fit(8),m.center())});w.className=
-"geSprite geSprite-fit";w.setAttribute("title",mxResources.get("fit"));w.style.outline="none";w.style.border="none";w.style.margin="2px";w.setAttribute("disabled","disabled");mxUtils.setOpacity(w,20);var C=mxUtils.button("",function(){null!=t&&(m.zoomActual(),m.center())});C.className="geSprite geSprite-actualsize";C.setAttribute("title",mxResources.get("actualSize"));C.style.outline="none";C.style.border="none";C.style.margin="2px";C.setAttribute("disabled","disabled");mxUtils.setOpacity(C,20);var F=
-document.createElement("div");F.style.position="absolute";F.style.textAlign="right";F.style.color="gray";F.style.marginTop="10px";F.style.backgroundColor="transparent";F.style.top="440px";F.style.right="32px";F.style.maxWidth="380px";F.style.cursor="default";var B=mxUtils.button(mxResources.get("download"),function(){if(null!=t){var b=a.getCurrentFile(),b=null!=b&&null!=b.getTitle()?b.getTitle():a.defaultFilename,e=mxUtils.getXml(t.documentElement);a.isLocalFileSave()?a.saveLocalFile(e,b,"text/xml"):
-(e="undefined"===typeof pako?"&xml="+encodeURIComponent(e):"&data="+encodeURIComponent(a.editor.graph.compress(e)),(new mxXmlRequest(SAVE_URL,"filename="+encodeURIComponent(b)+"&format=xml"+e)).simulate(document,"_blank"))}});B.className="geBtn";B.setAttribute("disabled","disabled");var G=mxUtils.button(mxResources.get("restore"),function(){null!=t&&null!=y&&a.confirm(mxResources.get("areYouSure"),function(){a.spinner.spin(document.body,mxResources.get("restoring"))&&q.save(!0,function(b){a.spinner.stop();
-a.replaceFileData(y);a.hideDialog()},function(b){a.spinner.stop();a.editor.setStatus("");a.handleError(b,null!=b?mxResources.get("errorSavingFile"):null)})})});G.className="geBtn";G.setAttribute("disabled","disabled");var z=document.createElement("select");z.setAttribute("disabled","disabled");z.style.maxWidth="80px";z.style.position="relative";z.style.top="-2px";z.style.verticalAlign="bottom";z.style.marginRight="6px";z.style.display="none";var D=null;mxEvent.addListener(z,"change",function(b){null!=
-D&&(D(b),mxEvent.consume(b))});var A=mxUtils.button(mxResources.get("openInNewWindow"),function(){null!=t&&(window.openFile=new OpenFile(function(){window.openFile=null}),window.openFile.setData(mxUtils.getXml(t.documentElement)),window.openWindow(a.getUrl()))});A.className="geBtn";A.setAttribute("disabled","disabled");var H=mxUtils.button(mxResources.get("show"),function(){null!=u&&window.open(u.getUrl())});H.className="geBtn gePrimaryBtn";H.setAttribute("disabled","disabled");c=document.createElement("div");
-c.style.position="absolute";c.style.top="482px";c.style.width="640px";c.style.textAlign="right";var E=document.createElement("div");E.className="geToolbarContainer";E.style.backgroundColor="transparent";E.style.padding="2px";E.style.border="none";E.style.left="199px";E.style.top="442px";var I=null;if(null==q||null==a.drive&&q.constructor==window.DriveFile||null==a.dropbox&&q.constructor==window.DropboxFile)k.style.display="none",E.style.display="none",mxUtils.write(h,mxResources.get("notAvailable"));
+m.addListener(mxEvent.SIZE,mxUtils.bind(this,function(b,e){a.editor.graph.mathEnabled&&Editor.MathJaxRender(m.container)}));var l=new Spinner({lines:11,length:15,width:6,radius:10,corners:1,rotate:0,direction:1,color:"#000",speed:1.4,trail:60,shadow:!1,hwaccel:!1,className:"spinner",zIndex:2E9,top:"50%",left:"50%"}),p=a.getCurrentFile(),u=null,v=null,q=null,x=null,y=mxUtils.button("",function(){null!=q&&m.zoomIn()});y.className="geSprite geSprite-zoomin";y.setAttribute("title",mxResources.get("zoomIn"));
+y.style.outline="none";y.style.border="none";y.style.margin="2px";y.setAttribute("disabled","disabled");mxUtils.setOpacity(y,20);var t=mxUtils.button("",function(){null!=q&&m.zoomOut()});t.className="geSprite geSprite-zoomout";t.setAttribute("title",mxResources.get("zoomOut"));t.style.outline="none";t.style.border="none";t.style.margin="2px";t.setAttribute("disabled","disabled");mxUtils.setOpacity(t,20);var w=mxUtils.button("",function(){null!=q&&(m.maxFitScale=8,m.fit(8),m.center())});w.className=
+"geSprite geSprite-fit";w.setAttribute("title",mxResources.get("fit"));w.style.outline="none";w.style.border="none";w.style.margin="2px";w.setAttribute("disabled","disabled");mxUtils.setOpacity(w,20);var C=mxUtils.button("",function(){null!=q&&(m.zoomActual(),m.center())});C.className="geSprite geSprite-actualsize";C.setAttribute("title",mxResources.get("actualSize"));C.style.outline="none";C.style.border="none";C.style.margin="2px";C.setAttribute("disabled","disabled");mxUtils.setOpacity(C,20);var F=
+document.createElement("div");F.style.position="absolute";F.style.textAlign="right";F.style.color="gray";F.style.marginTop="10px";F.style.backgroundColor="transparent";F.style.top="440px";F.style.right="32px";F.style.maxWidth="380px";F.style.cursor="default";var B=mxUtils.button(mxResources.get("download"),function(){if(null!=q){var b=a.getCurrentFile(),b=null!=b&&null!=b.getTitle()?b.getTitle():a.defaultFilename,e=mxUtils.getXml(q.documentElement);a.isLocalFileSave()?a.saveLocalFile(e,b,"text/xml"):
+(e="undefined"===typeof pako?"&xml="+encodeURIComponent(e):"&data="+encodeURIComponent(a.editor.graph.compress(e)),(new mxXmlRequest(SAVE_URL,"filename="+encodeURIComponent(b)+"&format=xml"+e)).simulate(document,"_blank"))}});B.className="geBtn";B.setAttribute("disabled","disabled");var G=mxUtils.button(mxResources.get("restore"),function(){null!=q&&null!=x&&a.confirm(mxResources.get("areYouSure"),function(){a.spinner.spin(document.body,mxResources.get("restoring"))&&p.save(!0,function(b){a.spinner.stop();
+a.replaceFileData(x);a.hideDialog()},function(b){a.spinner.stop();a.editor.setStatus("");a.handleError(b,null!=b?mxResources.get("errorSavingFile"):null)})})});G.className="geBtn";G.setAttribute("disabled","disabled");var z=document.createElement("select");z.setAttribute("disabled","disabled");z.style.maxWidth="80px";z.style.position="relative";z.style.top="-2px";z.style.verticalAlign="bottom";z.style.marginRight="6px";z.style.display="none";var D=null;mxEvent.addListener(z,"change",function(b){null!=
+D&&(D(b),mxEvent.consume(b))});var A=mxUtils.button(mxResources.get("openInNewWindow"),function(){null!=q&&(window.openFile=new OpenFile(function(){window.openFile=null}),window.openFile.setData(mxUtils.getXml(q.documentElement)),window.openWindow(a.getUrl()))});A.className="geBtn";A.setAttribute("disabled","disabled");var H=mxUtils.button(mxResources.get("show"),function(){null!=v&&window.open(v.getUrl())});H.className="geBtn gePrimaryBtn";H.setAttribute("disabled","disabled");c=document.createElement("div");
+c.style.position="absolute";c.style.top="482px";c.style.width="640px";c.style.textAlign="right";var E=document.createElement("div");E.className="geToolbarContainer";E.style.backgroundColor="transparent";E.style.padding="2px";E.style.border="none";E.style.left="199px";E.style.top="442px";var I=null;if(null==p||null==a.drive&&p.constructor==window.DriveFile||null==a.dropbox&&p.constructor==window.DropboxFile)k.style.display="none",E.style.display="none",mxUtils.write(h,mxResources.get("notAvailable"));
 else if(null!=d&&0<d.length){k.style.cursor="move";var J=document.createElement("table");J.style.border="1px solid lightGray";J.style.borderCollapse="collapse";J.style.borderSpacing="0px";J.style.width="100%";var N=document.createElement("tbody"),M=(new Date).toDateString();null!=a.currentPage&&null!=a.pages&&(n=mxUtils.indexOf(a.pages,a.currentPage));for(var R=d.length-1;0<=R;R--){var L=function(c){var g=new Date(c.modifiedDate),f=null;if(0<=g.getTime()){var h=function(c){l.stop();var d=mxUtils.parseXml(c),
-h=a.editor.extractGraphModel(d.documentElement,!0);if(null!=h){var v=function(b){null!=b&&(b=u(mxUtils.parseXml(a.editor.graph.decompress(mxUtils.getTextContent(b))).documentElement));return b},u=function(b){var a=b.getAttribute("background");if(null==a||""==a||a==mxConstants.NONE)a="#ffffff";k.style.backgroundColor=a;(new mxCodec(b.ownerDocument)).decode(b,m.getModel());m.maxFitScale=1;m.fit(8);m.center();return b};z.style.display="none";z.innerHTML="";t=d;y=c;b=parseSelectFunction=null;e=0;if("mxfile"==
-h.nodeName){d=h.getElementsByTagName("diagram");b=[];for(c=0;c<d.length;c++)b.push(d[c]);e=Math.min(n,b.length-1);0<b.length&&v(b[e]);if(1<b.length)for(z.removeAttribute("disabled"),z.style.display="",c=0;c<b.length;c++)d=document.createElement("option"),mxUtils.write(d,b[c].getAttribute("name")||mxResources.get("pageWithNumber",[c+1])),d.setAttribute("value",c),c==e&&d.setAttribute("selected","selected"),z.appendChild(d);D=function(){e=n=parseInt(z.value);v(b[n])}}else u(h);F.innerHTML="";mxUtils.write(F,
-g.toLocaleDateString()+" "+g.toLocaleTimeString());F.setAttribute("title",f.getAttribute("title"));x.removeAttribute("disabled");p.removeAttribute("disabled");w.removeAttribute("disabled");C.removeAttribute("disabled");null!=q&&q.isRestricted()||(a.editor.graph.isEnabled()&&G.removeAttribute("disabled"),B.removeAttribute("disabled"),H.removeAttribute("disabled"),A.removeAttribute("disabled"));mxUtils.setOpacity(x,60);mxUtils.setOpacity(p,60);mxUtils.setOpacity(w,60);mxUtils.setOpacity(C,60)}else z.style.display=
+h=a.editor.extractGraphModel(d.documentElement,!0);if(null!=h){var u=function(b){null!=b&&(b=v(mxUtils.parseXml(a.editor.graph.decompress(mxUtils.getTextContent(b))).documentElement));return b},v=function(b){var a=b.getAttribute("background");if(null==a||""==a||a==mxConstants.NONE)a="#ffffff";k.style.backgroundColor=a;(new mxCodec(b.ownerDocument)).decode(b,m.getModel());m.maxFitScale=1;m.fit(8);m.center();return b};z.style.display="none";z.innerHTML="";q=d;x=c;b=parseSelectFunction=null;e=0;if("mxfile"==
+h.nodeName){d=h.getElementsByTagName("diagram");b=[];for(c=0;c<d.length;c++)b.push(d[c]);e=Math.min(n,b.length-1);0<b.length&&u(b[e]);if(1<b.length)for(z.removeAttribute("disabled"),z.style.display="",c=0;c<b.length;c++)d=document.createElement("option"),mxUtils.write(d,b[c].getAttribute("name")||mxResources.get("pageWithNumber",[c+1])),d.setAttribute("value",c),c==e&&d.setAttribute("selected","selected"),z.appendChild(d);D=function(){e=n=parseInt(z.value);u(b[n])}}else v(h);F.innerHTML="";mxUtils.write(F,
+g.toLocaleDateString()+" "+g.toLocaleTimeString());F.setAttribute("title",f.getAttribute("title"));y.removeAttribute("disabled");t.removeAttribute("disabled");w.removeAttribute("disabled");C.removeAttribute("disabled");null!=p&&p.isRestricted()||(a.editor.graph.isEnabled()&&G.removeAttribute("disabled"),B.removeAttribute("disabled"),H.removeAttribute("disabled"),A.removeAttribute("disabled"));mxUtils.setOpacity(y,60);mxUtils.setOpacity(t,60);mxUtils.setOpacity(w,60);mxUtils.setOpacity(C,60)}else z.style.display=
 "none",z.innerHTML="",F.innerHTML="",mxUtils.write(F,mxResources.get("errorLoadingFile"))},f=document.createElement("tr");f.style.borderBottom="1px solid lightGray";f.style.fontSize="12px";f.style.cursor="pointer";var I=document.createElement("td");I.style.padding="6px";I.style.whiteSpace="nowrap";c==d[d.length-1]?mxUtils.write(I,mxResources.get("current")):g.toDateString()===M?mxUtils.write(I,g.toLocaleTimeString()):mxUtils.write(I,g.toLocaleDateString()+" "+g.toLocaleTimeString());f.appendChild(I);
-f.setAttribute("title",g.toLocaleDateString()+" "+g.toLocaleTimeString()+" "+a.formatFileSize(parseInt(c.fileSize))+(null!=c.lastModifyingUserName?" "+c.lastModifyingUserName:""));mxEvent.addListener(f,"click",function(b){u!=c&&(l.stop(),null!=v&&(v.style.backgroundColor=""),u=c,v=f,v.style.backgroundColor="#ebf2f9",y=t=null,F.removeAttribute("title"),F.innerHTML=mxResources.get("loading")+"...",k.style.backgroundColor="#ffffff",m.getModel().clear(),G.setAttribute("disabled","disabled"),B.setAttribute("disabled",
-"disabled"),x.setAttribute("disabled","disabled"),p.setAttribute("disabled","disabled"),C.setAttribute("disabled","disabled"),w.setAttribute("disabled","disabled"),A.setAttribute("disabled","disabled"),H.setAttribute("disabled","disabled"),z.setAttribute("disabled","disabled"),mxUtils.setOpacity(x,20),mxUtils.setOpacity(p,20),mxUtils.setOpacity(w,20),mxUtils.setOpacity(C,20),l.spin(k),c.getXml(function(b){u==c&&h(b)},function(b){l.stop();z.style.display="none";z.innerHTML="";F.innerHTML="";mxUtils.write(F,
+f.setAttribute("title",g.toLocaleDateString()+" "+g.toLocaleTimeString()+" "+a.formatFileSize(parseInt(c.fileSize))+(null!=c.lastModifyingUserName?" "+c.lastModifyingUserName:""));mxEvent.addListener(f,"click",function(b){v!=c&&(l.stop(),null!=u&&(u.style.backgroundColor=""),v=c,u=f,u.style.backgroundColor="#ebf2f9",x=q=null,F.removeAttribute("title"),F.innerHTML=mxResources.get("loading")+"...",k.style.backgroundColor="#ffffff",m.getModel().clear(),G.setAttribute("disabled","disabled"),B.setAttribute("disabled",
+"disabled"),y.setAttribute("disabled","disabled"),t.setAttribute("disabled","disabled"),C.setAttribute("disabled","disabled"),w.setAttribute("disabled","disabled"),A.setAttribute("disabled","disabled"),H.setAttribute("disabled","disabled"),z.setAttribute("disabled","disabled"),mxUtils.setOpacity(y,20),mxUtils.setOpacity(t,20),mxUtils.setOpacity(w,20),mxUtils.setOpacity(C,20),l.spin(k),c.getXml(function(b){v==c&&h(b)},function(b){l.stop();z.style.display="none";z.innerHTML="";F.innerHTML="";mxUtils.write(F,
 mxResources.get("errorLoadingFile"))}),mxEvent.consume(b))});mxEvent.addListener(f,"dblclick",function(b){H.click();window.getSelection?window.getSelection().removeAllRanges():document.selection&&document.selection.empty();mxEvent.consume(b)},!1);N.appendChild(f)}return f}(d[R]);null!=L&&R==d.length-1&&(I=L)}J.appendChild(N);h.appendChild(J)}else k.style.display="none",E.style.display="none",mxUtils.write(h,mxResources.get("noRevisions"));this.init=function(){null!=I&&I.click()};h=mxUtils.button(mxResources.get("close"),
-function(){a.hideDialog()});h.className="geBtn";E.appendChild(z);E.appendChild(x);E.appendChild(p);E.appendChild(C);E.appendChild(w);a.editor.cancelFirst?(c.appendChild(h),c.appendChild(B),c.appendChild(A),c.appendChild(G),c.appendChild(H)):(c.appendChild(B),c.appendChild(A),c.appendChild(G),c.appendChild(H),c.appendChild(h));f.appendChild(c);f.appendChild(E);f.appendChild(F);this.container=f},DraftDialog=function(a,d,f,c,h,k,m,n){var b=document.createElement("div"),e=document.createElement("div");
+function(){a.hideDialog()});h.className="geBtn";E.appendChild(z);E.appendChild(y);E.appendChild(t);E.appendChild(C);E.appendChild(w);a.editor.cancelFirst?(c.appendChild(h),c.appendChild(B),c.appendChild(A),c.appendChild(G),c.appendChild(H)):(c.appendChild(B),c.appendChild(A),c.appendChild(G),c.appendChild(H),c.appendChild(h));f.appendChild(c);f.appendChild(E);f.appendChild(F);this.container=f},DraftDialog=function(a,d,f,c,h,k,m,n){var b=document.createElement("div"),e=document.createElement("div");
 e.style.marginTop="0px";e.style.whiteSpace="nowrap";e.style.overflow="auto";mxUtils.write(e,d);b.appendChild(e);var g=document.createElement("div");g.style.position="absolute";g.style.border="1px solid lightGray";g.style.marginTop="10px";g.style.width="640px";g.style.top="46px";g.style.bottom="74px";g.style.overflow="hidden";mxEvent.disableContextMenu(g);b.appendChild(g);var l=new Graph(g);l.setEnabled(!1);l.setPanning(!0);l.panningHandler.ignoreCell=!0;l.panningHandler.useLeftButtonForPanning=!0;
-l.minFitScale=null;l.maxFitScale=null;l.centerZoom=!0;d=mxUtils.parseXml(f);var q=a.editor.extractGraphModel(d.documentElement,!0),v=0,u=null,t=l.getGlobalVariable;l.getGlobalVariable=function(b){return"page"==b&&null!=u&&null!=u[v]?u[v].getAttribute("name"):"pagenumber"==b?v+1:t.apply(this,arguments)};l.getLinkForCell=function(){return null};d=mxUtils.button("",function(){l.zoomIn()});d.className="geSprite geSprite-zoomin";d.setAttribute("title",mxResources.get("zoomIn"));d.style.outline="none";
+l.minFitScale=null;l.maxFitScale=null;l.centerZoom=!0;d=mxUtils.parseXml(f);var p=a.editor.extractGraphModel(d.documentElement,!0),u=0,v=null,q=l.getGlobalVariable;l.getGlobalVariable=function(b){return"page"==b&&null!=v&&null!=v[u]?v[u].getAttribute("name"):"pagenumber"==b?u+1:q.apply(this,arguments)};l.getLinkForCell=function(){return null};d=mxUtils.button("",function(){l.zoomIn()});d.className="geSprite geSprite-zoomin";d.setAttribute("title",mxResources.get("zoomIn"));d.style.outline="none";
 d.style.border="none";d.style.margin="2px";mxUtils.setOpacity(d,60);f=mxUtils.button("",function(){l.zoomOut()});f.className="geSprite geSprite-zoomout";f.setAttribute("title",mxResources.get("zoomOut"));f.style.outline="none";f.style.border="none";f.style.margin="2px";mxUtils.setOpacity(f,60);e=mxUtils.button("",function(){l.maxFitScale=8;l.fit(8);l.center()});e.className="geSprite geSprite-fit";e.setAttribute("title",mxResources.get("fit"));e.style.outline="none";e.style.border="none";e.style.margin=
-"2px";mxUtils.setOpacity(e,60);var y=mxUtils.button("",function(){l.zoomActual();l.center()});y.className="geSprite geSprite-actualsize";y.setAttribute("title",mxResources.get("actualSize"));y.style.outline="none";y.style.border="none";y.style.margin="2px";mxUtils.setOpacity(y,60);h=mxUtils.button(m||mxResources.get("discard"),h);h.className="geBtn";var x=document.createElement("select");x.style.maxWidth="80px";x.style.position="relative";x.style.top="-2px";x.style.verticalAlign="bottom";x.style.marginRight=
-"6px";x.style.display="none";c=mxUtils.button(k||mxResources.get("edit"),c);c.className="geBtn gePrimaryBtn";k=document.createElement("div");k.style.position="absolute";k.style.bottom="30px";k.style.width="640px";k.style.textAlign="right";m=document.createElement("div");m.className="geToolbarContainer";m.style.cssText="box-shadow:none !important;background-color:transparent;padding:2px;border-style:none !important;bottom:30px;";this.init=function(){function b(b){if(null!=b){var a=b.getAttribute("background");
-if(null==a||""==a||a==mxConstants.NONE)a="#ffffff";g.style.backgroundColor=a;(new mxCodec(b.ownerDocument)).decode(b,l.getModel());l.maxFitScale=1;l.fit(8);l.center()}}function e(e){null!=e&&(e=b(mxUtils.parseXml(a.editor.graph.decompress(mxUtils.getTextContent(e))).documentElement));return e}mxEvent.addListener(x,"change",function(b){v=parseInt(x.value);e(u[v]);mxEvent.consume(b)});if("mxfile"==q.nodeName){var c=q.getElementsByTagName("diagram");u=[];for(var t=0;t<c.length;t++)u.push(c[t]);0<u.length&&
-e(u[v]);if(1<u.length)for(x.style.display="",t=0;t<u.length;t++)c=document.createElement("option"),mxUtils.write(c,u[t].getAttribute("name")||mxResources.get("pageWithNumber",[t+1])),c.setAttribute("value",t),t==v&&c.setAttribute("selected","selected"),x.appendChild(c)}else b(q)};m.appendChild(x);m.appendChild(d);m.appendChild(f);m.appendChild(y);m.appendChild(e);d=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog(!0)});d.className="geBtn";n=null!=n?mxUtils.button(mxResources.get("ignore"),
-n):null;null!=n&&(n.className="geBtn");a.editor.cancelFirst?(k.appendChild(d),null!=n&&k.appendChild(n),k.appendChild(h),k.appendChild(c)):(k.appendChild(c),k.appendChild(h),null!=n&&k.appendChild(n),k.appendChild(d));b.appendChild(k);b.appendChild(m);this.container=b},FindWindow=function(a,d,f,c,h){function k(){var a=n.model.getDescendants(n.model.getRoot()),c=l.value.toLowerCase(),g=q.checked?new RegExp(c):null,p=null;b!=c&&(b=c,e=null);var d=null==e;if(n.isEnabled()&&0<c.length)for(var f=0;f<a.length;f++){var h=
-n.view.getState(a[f]);if(null!=h&&null!=h.cell.value&&(d||null==p)&&(n.model.isVertex(h.cell)||n.model.isEdge(h.cell))){n.isHtmlLabel(h.cell)?(v.innerHTML=n.getLabel(h.cell),label=mxUtils.extractTextWithWhitespace([v])):label=n.getLabel(h.cell);label=mxUtils.trim(label.replace(/[\x00-\x1F\x7F-\x9F]|\s+/g," ")).toLowerCase();var k;if(!(k=null==g&&label.substring(0,c.length)===c)&&(k=null!=g)&&!(k=g.test(label)))a:{k=g;var m=h.cell;if("object"===typeof m.value&&null!=m.value.attributes)for(var m=m.value.attributes,
-u=0;u<m.length;u++)if("label"!=m[u].nodeName&&k.test(m[u].nodeValue.toLowerCase())){k=!0;break a}k=!1}if(k)if(d){p=h;break}else null==p&&(p=h)}d=d||h==e}null!=p?(e=p,n.setSelectionCell(e.cell),n.scrollCellToVisible(e.cell)):n.clearSelection();return!n.isEnabled()||0==c.length||null!=p}var m=a.actions.get("find"),n=a.editor.graph,b=null,e=null,g=document.createElement("div");g.style.userSelect="none";g.style.overflow="hidden";g.style.padding="10px";g.style.height="100%";var l=document.createElement("input");
-l.setAttribute("placeholder",mxResources.get("find"));l.setAttribute("type","text");l.style.marginTop="4px";l.style.marginBottom="6px";l.style.width="170px";l.style.fontSize="12px";l.style.borderRadius="4px";l.style.padding="6px";g.appendChild(l);var q=document.createElement("input");q.setAttribute("type","checkbox");g.appendChild(q);mxUtils.write(g,mxResources.get("regularExpression"));var v=document.createElement("div");mxUtils.br(g);var u=mxUtils.button(mxResources.get("reset"),function(){l.value=
-"";l.style.backgroundColor="";b=e=null;l.focus()});u.setAttribute("title",mxResources.get("reset"));u.style.marginTop="6px";u.style.marginRight="4px";u.style.backgroundColor="#f5f5f5";u.style.backgroundImage="none";u.className="geBtn";g.appendChild(u);u=mxUtils.button(mxResources.get("find"),function(){try{l.style.backgroundColor=k()?"":"#ffcfcf"}catch(t){a.handleError(t)}});u.setAttribute("title",mxResources.get("find")+" (Enter)");u.style.marginTop="6px";u.style.backgroundColor="#4d90fe";u.style.backgroundImage=
-"none";u.className="geBtn gePrimaryBtn";g.appendChild(u);mxEvent.addListener(l,"keyup",function(a){if(91==a.keyCode||17==a.keyCode)mxEvent.consume(a);else if(27==a.keyCode)m.funct();else if(b!=l.value.toLowerCase()||13==a.keyCode)try{l.style.backgroundColor=k()?"":"#ffcfcf"}catch(y){l.style.backgroundColor="#ffcfcf"}});mxEvent.addListener(g,"keydown",function(b){70==b.keyCode&&a.keyHandler.isControlDown(b)&&!mxEvent.isShiftDown(b)&&(m.funct(),mxEvent.consume(b))});this.window=new mxWindow(mxResources.get("find"),
+"2px";mxUtils.setOpacity(e,60);var x=mxUtils.button("",function(){l.zoomActual();l.center()});x.className="geSprite geSprite-actualsize";x.setAttribute("title",mxResources.get("actualSize"));x.style.outline="none";x.style.border="none";x.style.margin="2px";mxUtils.setOpacity(x,60);h=mxUtils.button(m||mxResources.get("discard"),h);h.className="geBtn";var y=document.createElement("select");y.style.maxWidth="80px";y.style.position="relative";y.style.top="-2px";y.style.verticalAlign="bottom";y.style.marginRight=
+"6px";y.style.display="none";c=mxUtils.button(k||mxResources.get("edit"),c);c.className="geBtn gePrimaryBtn";k=document.createElement("div");k.style.position="absolute";k.style.bottom="30px";k.style.width="640px";k.style.textAlign="right";m=document.createElement("div");m.className="geToolbarContainer";m.style.cssText="box-shadow:none !important;background-color:transparent;padding:2px;border-style:none !important;bottom:30px;";this.init=function(){function b(b){if(null!=b){var a=b.getAttribute("background");
+if(null==a||""==a||a==mxConstants.NONE)a="#ffffff";g.style.backgroundColor=a;(new mxCodec(b.ownerDocument)).decode(b,l.getModel());l.maxFitScale=1;l.fit(8);l.center()}}function e(e){null!=e&&(e=b(mxUtils.parseXml(a.editor.graph.decompress(mxUtils.getTextContent(e))).documentElement));return e}mxEvent.addListener(y,"change",function(b){u=parseInt(y.value);e(v[u]);mxEvent.consume(b)});if("mxfile"==p.nodeName){var c=p.getElementsByTagName("diagram");v=[];for(var q=0;q<c.length;q++)v.push(c[q]);0<v.length&&
+e(v[u]);if(1<v.length)for(y.style.display="",q=0;q<v.length;q++)c=document.createElement("option"),mxUtils.write(c,v[q].getAttribute("name")||mxResources.get("pageWithNumber",[q+1])),c.setAttribute("value",q),q==u&&c.setAttribute("selected","selected"),y.appendChild(c)}else b(p)};m.appendChild(y);m.appendChild(d);m.appendChild(f);m.appendChild(x);m.appendChild(e);d=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog(!0)});d.className="geBtn";n=null!=n?mxUtils.button(mxResources.get("ignore"),
+n):null;null!=n&&(n.className="geBtn");a.editor.cancelFirst?(k.appendChild(d),null!=n&&k.appendChild(n),k.appendChild(h),k.appendChild(c)):(k.appendChild(c),k.appendChild(h),null!=n&&k.appendChild(n),k.appendChild(d));b.appendChild(k);b.appendChild(m);this.container=b},FindWindow=function(a,d,f,c,h){function k(){var a=n.model.getDescendants(n.model.getRoot()),c=l.value.toLowerCase(),g=p.checked?new RegExp(c):null,t=null;b!=c&&(b=c,e=null);var d=null==e;if(n.isEnabled()&&0<c.length)for(var f=0;f<a.length;f++){var h=
+n.view.getState(a[f]);if(null!=h&&null!=h.cell.value&&(d||null==t)&&(n.model.isVertex(h.cell)||n.model.isEdge(h.cell))){n.isHtmlLabel(h.cell)?(u.innerHTML=n.getLabel(h.cell),label=mxUtils.extractTextWithWhitespace([u])):label=n.getLabel(h.cell);label=mxUtils.trim(label.replace(/[\x00-\x1F\x7F-\x9F]|\s+/g," ")).toLowerCase();var k;if(!(k=null==g&&label.substring(0,c.length)===c)&&(k=null!=g)&&!(k=g.test(label)))a:{k=g;var m=h.cell;if("object"===typeof m.value&&null!=m.value.attributes)for(var m=m.value.attributes,
+v=0;v<m.length;v++)if("label"!=m[v].nodeName&&k.test(m[v].nodeValue.toLowerCase())){k=!0;break a}k=!1}if(k)if(d){t=h;break}else null==t&&(t=h)}d=d||h==e}null!=t?(e=t,n.setSelectionCell(e.cell),n.scrollCellToVisible(e.cell)):n.clearSelection();return!n.isEnabled()||0==c.length||null!=t}var m=a.actions.get("find"),n=a.editor.graph,b=null,e=null,g=document.createElement("div");g.style.userSelect="none";g.style.overflow="hidden";g.style.padding="10px";g.style.height="100%";var l=document.createElement("input");
+l.setAttribute("placeholder",mxResources.get("find"));l.setAttribute("type","text");l.style.marginTop="4px";l.style.marginBottom="6px";l.style.width="170px";l.style.fontSize="12px";l.style.borderRadius="4px";l.style.padding="6px";g.appendChild(l);var p=document.createElement("input");p.setAttribute("type","checkbox");g.appendChild(p);mxUtils.write(g,mxResources.get("regularExpression"));var u=document.createElement("div");mxUtils.br(g);var v=mxUtils.button(mxResources.get("reset"),function(){l.value=
+"";l.style.backgroundColor="";b=e=null;l.focus()});v.setAttribute("title",mxResources.get("reset"));v.style.marginTop="6px";v.style.marginRight="4px";v.style.backgroundColor="#f5f5f5";v.style.backgroundImage="none";v.className="geBtn";g.appendChild(v);v=mxUtils.button(mxResources.get("find"),function(){try{l.style.backgroundColor=k()?"":"#ffcfcf"}catch(q){a.handleError(q)}});v.setAttribute("title",mxResources.get("find")+" (Enter)");v.style.marginTop="6px";v.style.backgroundColor="#4d90fe";v.style.backgroundImage=
+"none";v.className="geBtn gePrimaryBtn";g.appendChild(v);mxEvent.addListener(l,"keyup",function(a){if(91==a.keyCode||17==a.keyCode)mxEvent.consume(a);else if(27==a.keyCode)m.funct();else if(b!=l.value.toLowerCase()||13==a.keyCode)try{l.style.backgroundColor=k()?"":"#ffcfcf"}catch(x){l.style.backgroundColor="#ffcfcf"}});mxEvent.addListener(g,"keydown",function(b){70==b.keyCode&&a.keyHandler.isControlDown(b)&&!mxEvent.isShiftDown(b)&&(m.funct(),mxEvent.consume(b))});this.window=new mxWindow(mxResources.get("find"),
 g,d,f,c,h,!0,!0);this.window.destroyOnClose=!1;this.window.setMaximizable(!1);this.window.setResizable(!1);this.window.setClosable(!0);this.window.addListener("show",mxUtils.bind(this,function(){this.window.isVisible()?(l.focus(),mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode||mxClient.IS_QUIRKS?l.select():document.execCommand("selectAll",!1,null)):n.container.focus()}))},TagsWindow=function(a,d,f,c,h){function k(a){a=null!=a?a:n.model.getDescendants(n.model.getRoot());for(var e=g.value.split(" "),
-c=[],l=0;l<a.length;l++)if(n.model.isVertex(a[l])||n.model.isEdge(a[l])){var d=null!=a[l].value&&"object"==typeof a[l].value?mxUtils.trim(a[l].value.getAttribute(b)||""):"",p=!0;if(0<d.length)for(var d=d.toLowerCase().split(" "),f=0;f<e.length&&p;f++)var q=mxUtils.trim(e[f]).toLowerCase(),p=p&&(0==q.length||0<=mxUtils.indexOf(d,q));else p=0==mxUtils.trim(g.value).length;p&&c.push(a[l])}return c}function m(b,a){n.model.beginUpdate();try{for(var e=0;e<b.length;e++)n.model.setVisible(b[e],a)}finally{n.model.endUpdate()}}
+c=[],l=0;l<a.length;l++)if(n.model.isVertex(a[l])||n.model.isEdge(a[l])){var d=null!=a[l].value&&"object"==typeof a[l].value?mxUtils.trim(a[l].value.getAttribute(b)||""):"",t=!0;if(0<d.length)for(var d=d.toLowerCase().split(" "),f=0;f<e.length&&t;f++)var p=mxUtils.trim(e[f]).toLowerCase(),t=t&&(0==p.length||0<=mxUtils.indexOf(d,p));else t=0==mxUtils.trim(g.value).length;t&&c.push(a[l])}return c}function m(b,a){n.model.beginUpdate();try{for(var e=0;e<b.length;e++)n.model.setVisible(b[e],a)}finally{n.model.endUpdate()}}
 var n=a.editor.graph,b="tags",e=document.createElement("div");e.style.userSelect="none";e.style.overflow="hidden";e.style.padding="10px";e.style.height="100%";var g=document.createElement("input");g.setAttribute("placeholder",mxResources.get("allTags"));g.setAttribute("type","text");g.style.marginTop="4px";g.style.width="240px";g.style.fontSize="12px";g.style.borderRadius="4px";g.style.padding="6px";e.appendChild(g);mxEvent.addListener(g,"dblclick",function(){var e=new FilenameDialog(a,b,mxResources.get("ok"),
 mxUtils.bind(this,function(a){null!=a&&0<a.length&&(b=a)}),mxResources.get("enterPropertyName"));a.showDialog(e.container,300,80,!0,!0);e.init()});g.setAttribute("title",mxResources.get("doubleClickChangeProperty"));mxUtils.br(e);var l=mxUtils.button(mxResources.get("hide"),function(){m(k(),!1)});l.setAttribute("title",mxResources.get("hide"));l.style.marginTop="8px";l.style.marginRight="4px";l.style.backgroundColor="#f5f5f5";l.style.backgroundImage="none";l.className="geBtn";e.appendChild(l);l=mxUtils.button(mxResources.get("show"),
-function(){var b=k();m(b,!0);n.isEnabled()&&n.setSelectionCells(b)});l.setAttribute("title",mxResources.get("show"));l.style.marginTop="8px";l.style.marginRight="4px";l.style.backgroundColor="#f5f5f5";l.style.backgroundImage="none";l.className="geBtn";e.appendChild(l);var q=a.actions.get("tags"),l=mxUtils.button(mxResources.get("close"),function(){q.funct()});l.setAttribute("title",mxResources.get("close")+" (Enter/Esc)");l.style.marginTop="8px";l.style.backgroundColor="#4d90fe";l.style.backgroundImage=
-"none";l.className="geBtn gePrimaryBtn";e.appendChild(l);mxEvent.addListener(g,"keyup",function(b){13!=b.keyCode&&27!=b.keyCode||q.funct()});this.window=new mxWindow(mxResources.get("tags"),e,d,f,c,h,!0,!0);this.window.destroyOnClose=!1;this.window.setMaximizable(!1);this.window.setResizable(!1);this.window.setClosable(!0);this.window.addListener("show",mxUtils.bind(this,function(){this.window.isVisible()?(g.focus(),mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode||mxClient.IS_QUIRKS?g.select():
+function(){var b=k();m(b,!0);n.isEnabled()&&n.setSelectionCells(b)});l.setAttribute("title",mxResources.get("show"));l.style.marginTop="8px";l.style.marginRight="4px";l.style.backgroundColor="#f5f5f5";l.style.backgroundImage="none";l.className="geBtn";e.appendChild(l);var p=a.actions.get("tags"),l=mxUtils.button(mxResources.get("close"),function(){p.funct()});l.setAttribute("title",mxResources.get("close")+" (Enter/Esc)");l.style.marginTop="8px";l.style.backgroundColor="#4d90fe";l.style.backgroundImage=
+"none";l.className="geBtn gePrimaryBtn";e.appendChild(l);mxEvent.addListener(g,"keyup",function(b){13!=b.keyCode&&27!=b.keyCode||p.funct()});this.window=new mxWindow(mxResources.get("tags"),e,d,f,c,h,!0,!0);this.window.destroyOnClose=!1;this.window.setMaximizable(!1);this.window.setResizable(!1);this.window.setClosable(!0);this.window.addListener("show",mxUtils.bind(this,function(){this.window.isVisible()?(g.focus(),mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode||mxClient.IS_QUIRKS?g.select():
 document.execCommand("selectAll",!1,null)):n.container.focus()}))},AuthDialog=function(a,d,f,c){var h=document.createElement("div");h.style.textAlign="center";var k=document.createElement("p");k.style.fontSize="16pt";k.style.padding="0px";k.style.margin="0px";k.style.color="gray";mxUtils.write(k,mxResources.get("authorizationRequired"));var m="Unknown",n=document.createElement("img");n.setAttribute("border","0");n.setAttribute("align","absmiddle");n.style.marginRight="10px";d==a.drive?(m=mxResources.get("googleDrive"),
 n.src=IMAGE_PATH+"/google-drive-logo-white.svg"):d==a.dropbox?(m=mxResources.get("dropbox"),n.src=IMAGE_PATH+"/dropbox-logo-white.svg"):d==a.oneDrive?(m=mxResources.get("oneDrive"),n.src=IMAGE_PATH+"/onedrive-logo-white.svg"):d==a.gitHub?(m=mxResources.get("github"),n.src=IMAGE_PATH+"/github-logo-white.svg"):d==a.trello&&(m=mxResources.get("trello"),n.src=IMAGE_PATH+"/trello-logo-white.svg");a=document.createElement("p");mxUtils.write(a,mxResources.get("authorizeThisAppIn",[m]));var b=document.createElement("input");
 b.setAttribute("type","checkbox");m=mxUtils.button(mxResources.get("authorize"),function(){c(b.checked)});m.insertBefore(n,m.firstChild);m.style.marginTop="6px";m.className="geBigButton";h.appendChild(k);h.appendChild(a);h.appendChild(m);f&&(f=document.createElement("p"),f.style.marginTop="20px",f.appendChild(b),k=document.createElement("span"),mxUtils.write(k," "+mxResources.get("rememberMe")),f.appendChild(k),h.appendChild(f),b.checked=!0,b.defaultChecked=!0,mxEvent.addListener(k,"click",function(a){b.checked=
 !b.checked;mxEvent.consume(a)}));this.container=h},MoreShapesDialog=function(a,d,f){f=null!=f?f:a.sidebar.entries;var c=document.createElement("div");if(d){d=document.createElement("div");d.className="geDialogTitle";mxUtils.write(d,mxResources.get("shapes"));d.style.position="absolute";d.style.top="0px";d.style.left="0px";d.style.lineHeight="40px";d.style.height="40px";d.style.right="0px";mxClient.IS_QUIRKS&&(d.style.width="718px");var h=document.createElement("div"),k=document.createElement("div");
 h.style.position="absolute";h.style.top="40px";h.style.left="0px";h.style.width="202px";h.style.bottom="60px";h.style.overflow="auto";mxClient.IS_QUIRKS&&(h.style.height="437px",h.style.marginTop="1px");k.style.position="absolute";k.style.left="202px";k.style.right="0px";k.style.top="40px";k.style.bottom="60px";k.style.overflow="auto";k.style.borderLeft="1px solid rgb(211, 211, 211)";k.style.textAlign="center";mxClient.IS_QUIRKS&&(k.style.width=parseInt(d.style.width)-202+"px",k.style.height=h.style.height,
-k.style.marginTop=h.style.marginTop);var m=null,n=[],b=document.createElement("div");b.style.position="relative";b.style.left="0px";b.style.right="0px";for(var e=0;e<f.length;e++)(function(c){var g=b.cloneNode(!1);g.style.fontWeight="bold";g.style.backgroundColor="#e5e5e5";g.style.padding="6px 0px 6px 20px";mxUtils.write(g,c.title);h.appendChild(g);for(var l=0;l<c.entries.length;l++)(function(c){var g=b.cloneNode(!1);g.style.cursor="pointer";g.style.padding="4px 0px 4px 20px";var p=document.createElement("input");
-p.setAttribute("type","checkbox");p.checked=a.sidebar.isEntryVisible(c.id);p.defaultChecked=p.checked;g.appendChild(p);mxUtils.write(g," "+c.title);h.appendChild(g);var d=function(b){if(null==b||"INPUT"!=mxEvent.getSource(b).nodeName)null!=c.imageCallback?c.imageCallback(k):null!=c.image?k.innerHTML='<img border="0" src="'+c.image+'"/>':(k.innerHTML="<br>",mxUtils.write(k,mxResources.get("noPreview"))),null!=m&&(m.style.backgroundColor=""),m=g,m.style.backgroundColor="#ebf2f9",null!=b&&mxEvent.consume(b)};
-mxEvent.addListener(g,"click",d);mxEvent.addListener(g,"dblclick",function(b){p.checked=!p.checked;mxEvent.consume(b)});n.push(function(){return p.checked?c.id:null});0==e&&0==l&&d()})(c.entries[l])})(f[e]);c.style.padding="30px";c.appendChild(d);c.appendChild(h);c.appendChild(k);f=document.createElement("div");f.className="geDialogFooter";f.style.position="absolute";f.style.paddingRight="16px";f.style.color="gray";f.style.left="0px";f.style.right="0px";f.style.bottom="0px";f.style.height="60px";
+k.style.marginTop=h.style.marginTop);var m=null,n=[],b=document.createElement("div");b.style.position="relative";b.style.left="0px";b.style.right="0px";for(var e=0;e<f.length;e++)(function(c){var g=b.cloneNode(!1);g.style.fontWeight="bold";g.style.backgroundColor="#e5e5e5";g.style.padding="6px 0px 6px 20px";mxUtils.write(g,c.title);h.appendChild(g);for(var l=0;l<c.entries.length;l++)(function(c){var g=b.cloneNode(!1);g.style.cursor="pointer";g.style.padding="4px 0px 4px 20px";var t=document.createElement("input");
+t.setAttribute("type","checkbox");t.checked=a.sidebar.isEntryVisible(c.id);t.defaultChecked=t.checked;g.appendChild(t);mxUtils.write(g," "+c.title);h.appendChild(g);var q=function(b){if(null==b||"INPUT"!=mxEvent.getSource(b).nodeName)null!=c.imageCallback?c.imageCallback(k):null!=c.image?k.innerHTML='<img border="0" src="'+c.image+'"/>':(k.innerHTML="<br>",mxUtils.write(k,mxResources.get("noPreview"))),null!=m&&(m.style.backgroundColor=""),m=g,m.style.backgroundColor="#ebf2f9",null!=b&&mxEvent.consume(b)};
+mxEvent.addListener(g,"click",q);mxEvent.addListener(g,"dblclick",function(b){t.checked=!t.checked;mxEvent.consume(b)});n.push(function(){return t.checked?c.id:null});0==e&&0==l&&q()})(c.entries[l])})(f[e]);c.style.padding="30px";c.appendChild(d);c.appendChild(h);c.appendChild(k);f=document.createElement("div");f.className="geDialogFooter";f.style.position="absolute";f.style.paddingRight="16px";f.style.color="gray";f.style.left="0px";f.style.right="0px";f.style.bottom="0px";f.style.height="60px";
 f.style.lineHeight="52px";mxClient.IS_QUIRKS&&(f.style.width=d.style.width,f.style.paddingTop="12px");var g=document.createElement("input");g.setAttribute("type","checkbox");if(isLocalStorage||mxClient.IS_CHROMEAPP)d=document.createElement("span"),d.style.paddingRight="20px",d.appendChild(g),mxUtils.write(d," "+mxResources.get("rememberThisSetting")),g.checked=!0,g.defaultChecked=!0,mxEvent.addListener(d,"click",function(b){mxEvent.getSource(b)!=g&&(g.checked=!g.checked,mxEvent.consume(b))}),mxClient.IS_QUIRKS&&
-(d.style.position="relative",d.style.top="-6px"),f.appendChild(d);d=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog()});d.className="geBtn";var l=mxUtils.button(mxResources.get("apply"),function(){a.hideDialog();for(var b=[],e=0;e<n.length;e++){var c=n[e].apply(this,arguments);null!=c&&b.push(c)}a.sidebar.showEntries(b.join(";"),g.checked,!0)});l.className="geBtn gePrimaryBtn"}else{var q=document.createElement("table"),v=document.createElement("tbody");c.style.height="100%";c.style.overflow=
-"auto";var u=document.createElement("tr");q.style.width="100%";d=document.createElement("td");var l=document.createElement("td"),t=document.createElement("td"),y=mxUtils.bind(this,function(b,e,c){var g=document.createElement("input");g.type="checkbox";q.appendChild(g);g.checked=a.sidebar.isEntryVisible(c);var p=document.createElement("span");mxUtils.write(p,e);e=document.createElement("div");e.style.display="block";e.appendChild(g);e.appendChild(p);mxEvent.addListener(p,"click",function(b){g.checked=
-!g.checked;mxEvent.consume(b)});b.appendChild(e);return function(){return g.checked?c:null}});u.appendChild(d);u.appendChild(l);u.appendChild(t);v.appendChild(u);q.appendChild(v);for(var n=[],x=0,e=0;e<f.length;e++)for(v=0;v<f[e].entries.length;v++)x++;for(var p=[d,l,t],w=0,e=0;e<f.length;e++)(function(b){for(var a=0;a<b.entries.length;a++){var e=b.entries[a];n.push(y(p[Math.floor(w/(x/3))],e.title,e.id));w++}})(f[e]);c.appendChild(q);f=document.createElement("div");f.style.marginTop="18px";f.style.textAlign=
+(d.style.position="relative",d.style.top="-6px"),f.appendChild(d);d=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog()});d.className="geBtn";var l=mxUtils.button(mxResources.get("apply"),function(){a.hideDialog();for(var b=[],e=0;e<n.length;e++){var c=n[e].apply(this,arguments);null!=c&&b.push(c)}a.sidebar.showEntries(b.join(";"),g.checked,!0)});l.className="geBtn gePrimaryBtn"}else{var p=document.createElement("table"),u=document.createElement("tbody");c.style.height="100%";c.style.overflow=
+"auto";var v=document.createElement("tr");p.style.width="100%";d=document.createElement("td");var l=document.createElement("td"),q=document.createElement("td"),x=mxUtils.bind(this,function(b,e,c){var g=document.createElement("input");g.type="checkbox";p.appendChild(g);g.checked=a.sidebar.isEntryVisible(c);var l=document.createElement("span");mxUtils.write(l,e);e=document.createElement("div");e.style.display="block";e.appendChild(g);e.appendChild(l);mxEvent.addListener(l,"click",function(b){g.checked=
+!g.checked;mxEvent.consume(b)});b.appendChild(e);return function(){return g.checked?c:null}});v.appendChild(d);v.appendChild(l);v.appendChild(q);u.appendChild(v);p.appendChild(u);for(var n=[],y=0,e=0;e<f.length;e++)for(u=0;u<f[e].entries.length;u++)y++;for(var t=[d,l,q],w=0,e=0;e<f.length;e++)(function(b){for(var a=0;a<b.entries.length;a++){var e=b.entries[a];n.push(x(t[Math.floor(w/(y/3))],e.title,e.id));w++}})(f[e]);c.appendChild(p);f=document.createElement("div");f.style.marginTop="18px";f.style.textAlign=
 "center";g=document.createElement("input");isLocalStorage&&(g.setAttribute("type","checkbox"),g.checked=!0,g.defaultChecked=!0,f.appendChild(g),d=document.createElement("span"),mxUtils.write(d," "+mxResources.get("rememberThisSetting")),f.appendChild(d),mxEvent.addListener(d,"click",function(b){g.checked=!g.checked;mxEvent.consume(b)}));c.appendChild(f);d=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog()});d.className="geBtn";l=mxUtils.button(mxResources.get("apply"),function(){for(var b=
 ["search"],e=0;e<n.length;e++){var c=n[e].apply(this,arguments);null!=c&&b.push(c)}a.sidebar.showEntries(0<b.length?b.join(";"):"",g.checked);a.hideDialog()});l.className="geBtn gePrimaryBtn";f=document.createElement("div");f.style.marginTop="26px";f.style.textAlign="right"}a.editor.cancelFirst?(f.appendChild(d),f.appendChild(l)):(f.appendChild(l),f.appendChild(d));c.appendChild(f);this.container=c},PluginsDialog=function(a){function d(){if(0==h.length)c.innerHTML=mxResources.get("noPlugins");else{c.innerHTML=
 "";for(var b=0;b<h.length;b++){var g=document.createElement("span");g.style.whiteSpace="nowrap";var l=document.createElement("span");l.className="geSprite geSprite-delete";l.style.position="relative";l.style.cursor="pointer";l.style.top="5px";l.style.marginRight="4px";l.style.display="inline-block";g.appendChild(l);mxUtils.write(g,h[b]);c.appendChild(g);mxUtils.br(c);mxEvent.addListener(l,"click",function(b){return function(){a.confirm(window.parent.mxResources.get("delete")+' "'+h[b]+'"?',function(){h.splice(b,
@@ -6124,43 +6126,43 @@ f.style.lineHeight="52px";mxClient.IS_QUIRKS&&(f.style.width=d.style.width,f.sty
 b&&0<b.length){l=b.split(";");for(b=0;b<l.length;b++)0<l[b].length&&0>mxUtils.indexOf(h,l[b])&&h.push(l[b]);d()}},mxResources.get("enterValue")+" ("+mxResources.get("url")+")");a.showDialog(b.container,300,80,!0,!0);b.init()});k.className="geBtn";var m=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog()});m.className="geBtn";var n=mxUtils.button(mxResources.get("apply"),function(){mxSettings.setPlugins(h);mxSettings.save();a.hideDialog();a.alert(mxResources.get("restartForChangeRequired"))});
 n.className="geBtn gePrimaryBtn";var b=document.createElement("div");b.style.marginTop="14px";b.style.textAlign="right";a.editor.cancelFirst?(b.appendChild(m),b.appendChild(k),b.appendChild(n)):(b.appendChild(k),b.appendChild(n),b.appendChild(m));f.appendChild(b);this.container=f},CropImageDialog=function(a,d,f){var c=document.createElement("div"),h=document.createElement("table"),k=document.createElement("tbody"),m=document.createElement("tr"),n=document.createElement("td");n.style.whiteSpace="nowrap";
 n.setAttribute("colspan","2");mxUtils.write(n,mxResources.get("loading")+"...");m.appendChild(n);k.appendChild(m);var m=document.createElement("tr"),b=document.createElement("td"),e=document.createElement("td");h.style.paddingLeft="6px";mxUtils.write(b,mxResources.get("left")+":");var g=document.createElement("input");g.setAttribute("type","text");g.style.width="100px";g.value="0";this.init=function(){g.focus();g.select()};e.appendChild(g);m.appendChild(b);m.appendChild(e);k.appendChild(m);m=document.createElement("tr");
-b=document.createElement("td");e=document.createElement("td");mxUtils.write(b,mxResources.get("top")+":");var l=document.createElement("input");l.setAttribute("type","text");l.style.width="100px";l.value="0";e.appendChild(l);m.appendChild(b);m.appendChild(e);k.appendChild(m);m=document.createElement("tr");b=document.createElement("td");e=document.createElement("td");mxUtils.write(b,mxResources.get("right")+":");var q=document.createElement("input");q.setAttribute("type","text");q.style.width="100px";
-q.value="0";e.appendChild(q);m.appendChild(b);m.appendChild(e);k.appendChild(m);m=document.createElement("tr");b=document.createElement("td");e=document.createElement("td");mxUtils.write(b,mxResources.get("bottom")+":");var v=document.createElement("input");v.setAttribute("type","text");v.style.width="100px";v.value="0";e.appendChild(v);m.appendChild(b);m.appendChild(e);k.appendChild(m);m=document.createElement("tr");b=document.createElement("td");e=document.createElement("td");mxUtils.write(b,mxResources.get("circle")+
-":");m.appendChild(b);var u=document.createElement("input");u.setAttribute("type","checkbox");e.appendChild(u);m.appendChild(e);k.appendChild(m);h.appendChild(k);c.appendChild(h);var h=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog()}),t=new Image,y=mxUtils.button(mxResources.get("apply"),function(){a.hideDialog();var b=document.createElement("canvas"),e=b.getContext("2d"),c=t.width,d=t.height,h=parseInt(g.value),k=parseInt(l.value),c=Math.max(1,c-h-parseInt(q.value)),d=Math.max(1,
-d-k-parseInt(v.value));b.width=c;b.height=d;u.checked&&(e.fillStyle="#000000",e.arc(c/2,d/2,Math.min(c/2,d/2),0,2*Math.PI),e.fill(),e.globalCompositeOperation="source-in");e.drawImage(t,h,k,c,d,0,0,c,d);f(b.toDataURL())});y.setAttribute("disabled","disabled");t.onload=function(){y.removeAttribute("disabled");n.innerHTML="";mxUtils.write(n,mxResources.get("width")+": "+t.width+" "+mxResources.get("height")+": "+t.height)};t.src=d;mxEvent.addListener(c,"keypress",function(b){13==b.keyCode&&y.click()});
-d=document.createElement("div");d.style.marginTop="20px";d.style.textAlign="right";a.editor.cancelFirst?(d.appendChild(h),d.appendChild(y)):(d.appendChild(y),d.appendChild(h));c.appendChild(d);this.container=c},EditGeometryDialog=function(a,d){var f=a.editor.graph,c=1==d.length?f.getCellGeometry(d[0]):null,h=document.createElement("div"),k=document.createElement("table"),m=document.createElement("tbody"),n=document.createElement("tr"),b=document.createElement("td"),e=document.createElement("td");
+b=document.createElement("td");e=document.createElement("td");mxUtils.write(b,mxResources.get("top")+":");var l=document.createElement("input");l.setAttribute("type","text");l.style.width="100px";l.value="0";e.appendChild(l);m.appendChild(b);m.appendChild(e);k.appendChild(m);m=document.createElement("tr");b=document.createElement("td");e=document.createElement("td");mxUtils.write(b,mxResources.get("right")+":");var p=document.createElement("input");p.setAttribute("type","text");p.style.width="100px";
+p.value="0";e.appendChild(p);m.appendChild(b);m.appendChild(e);k.appendChild(m);m=document.createElement("tr");b=document.createElement("td");e=document.createElement("td");mxUtils.write(b,mxResources.get("bottom")+":");var u=document.createElement("input");u.setAttribute("type","text");u.style.width="100px";u.value="0";e.appendChild(u);m.appendChild(b);m.appendChild(e);k.appendChild(m);m=document.createElement("tr");b=document.createElement("td");e=document.createElement("td");mxUtils.write(b,mxResources.get("circle")+
+":");m.appendChild(b);var v=document.createElement("input");v.setAttribute("type","checkbox");e.appendChild(v);m.appendChild(e);k.appendChild(m);h.appendChild(k);c.appendChild(h);var h=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog()}),q=new Image,x=mxUtils.button(mxResources.get("apply"),function(){a.hideDialog();var b=document.createElement("canvas"),c=b.getContext("2d"),e=q.width,d=q.height,h=parseInt(g.value),k=parseInt(l.value),e=Math.max(1,e-h-parseInt(p.value)),d=Math.max(1,
+d-k-parseInt(u.value));b.width=e;b.height=d;v.checked&&(c.fillStyle="#000000",c.arc(e/2,d/2,Math.min(e/2,d/2),0,2*Math.PI),c.fill(),c.globalCompositeOperation="source-in");c.drawImage(q,h,k,e,d,0,0,e,d);f(b.toDataURL())});x.setAttribute("disabled","disabled");q.onload=function(){x.removeAttribute("disabled");n.innerHTML="";mxUtils.write(n,mxResources.get("width")+": "+q.width+" "+mxResources.get("height")+": "+q.height)};q.src=d;mxEvent.addListener(c,"keypress",function(b){13==b.keyCode&&x.click()});
+d=document.createElement("div");d.style.marginTop="20px";d.style.textAlign="right";a.editor.cancelFirst?(d.appendChild(h),d.appendChild(x)):(d.appendChild(x),d.appendChild(h));c.appendChild(d);this.container=c},EditGeometryDialog=function(a,d){var f=a.editor.graph,c=1==d.length?f.getCellGeometry(d[0]):null,h=document.createElement("div"),k=document.createElement("table"),m=document.createElement("tbody"),n=document.createElement("tr"),b=document.createElement("td"),e=document.createElement("td");
 k.style.paddingLeft="6px";mxUtils.write(b,mxResources.get("left")+":");var g=document.createElement("input");g.setAttribute("type","text");g.style.width="100px";g.value=null!=c?c.x:"";this.init=function(){g.focus();g.select()};e.appendChild(g);n.appendChild(b);n.appendChild(e);m.appendChild(n);n=document.createElement("tr");b=document.createElement("td");e=document.createElement("td");mxUtils.write(b,mxResources.get("top")+":");var l=document.createElement("input");l.setAttribute("type","text");l.style.width=
-"100px";l.value=null!=c?c.y:"";e.appendChild(l);n.appendChild(b);n.appendChild(e);m.appendChild(n);n=document.createElement("tr");b=document.createElement("td");e=document.createElement("td");mxUtils.write(b,mxResources.get("width")+":");var q=document.createElement("input");q.setAttribute("type","text");q.style.width="100px";q.value=null!=c?c.width:"";e.appendChild(q);n.appendChild(b);n.appendChild(e);m.appendChild(n);n=document.createElement("tr");b=document.createElement("td");e=document.createElement("td");
-mxUtils.write(b,mxResources.get("height")+":");var v=document.createElement("input");v.setAttribute("type","text");v.style.width="100px";v.value=null!=c?c.height:"";e.appendChild(v);n.appendChild(b);n.appendChild(e);m.appendChild(n);n=document.createElement("tr");b=document.createElement("td");e=document.createElement("td");mxUtils.write(b,mxResources.get("rotation")+":");var u=document.createElement("input");u.setAttribute("type","text");u.style.width="100px";u.value=1==d.length?mxUtils.getValue(f.getCellStyle(d[0]),
-mxConstants.STYLE_ROTATION,0):"";e.appendChild(u);n.appendChild(b);n.appendChild(e);m.appendChild(n);k.appendChild(m);h.appendChild(k);var c=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog()}),t=mxUtils.button(mxResources.get("apply"),function(){a.hideDialog();f.getModel().beginUpdate();try{for(var b=0;b<d.length;b++){var e=f.getCellGeometry(d[b]);null!=e&&(e=e.clone(),f.isCellMovable(d[b])&&(0<mxUtils.trim(g.value).length&&(e.x=Number(g.value)),0<mxUtils.trim(l.value).length&&(e.y=
-Number(l.value))),f.isCellResizable(d[b])&&(0<mxUtils.trim(q.value).length&&(e.width=Number(q.value)),0<mxUtils.trim(v.value).length&&(e.height=Number(v.value))),f.getModel().setGeometry(d[b],e));0<mxUtils.trim(u.value).length&&f.setCellStyles(mxConstants.STYLE_ROTATION,Number(u.value),[d[b]])}}finally{f.getModel().endUpdate()}});mxEvent.addListener(h,"keypress",function(b){13==b.keyCode&&t.click()});k=document.createElement("div");k.style.marginTop="20px";k.style.textAlign="right";a.editor.cancelFirst?
-(k.appendChild(c),k.appendChild(t)):(k.appendChild(t),k.appendChild(c));h.appendChild(k);this.container=h},LibraryDialog=function(a,d,f,c,h,k){function m(b){for(b=document.elementFromPoint(b.clientX,b.clientY);null!=b&&b.parentNode!=v;)b=b.parentNode;var a=null;if(null!=b)for(var e=v.firstChild,a=0;null!=e&&e!=b;)e=e.nextSibling,a++;return a}function n(b,e,c,l,d,f,q,h,k){try{if(null==e||"image/"==e.substring(0,6))if(null==b&&null!=q||null==t[b]){var x=function(){E.innerHTML="";E.style.cursor="pointer";
-E.style.whiteSpace="nowrap";E.style.textOverflow="ellipsis";mxUtils.write(E,null!=B.title&&0<B.title.length?B.title:mxResources.get("untitled"));E.style.color=null==B.title||0==B.title.length?"#d0d0d0":""};v.style.backgroundImage="";u.style.display="none";var A=d,H=f;if(d>a.maxImageSize||f>a.maxImageSize){var F=Math.min(1,Math.min(a.maxImageSize/Math.max(1,d)),a.maxImageSize/Math.max(1,f));d*=F;f*=F}A>H?(H=Math.round(100*H/A),A=100):(A=Math.round(100*A/H),H=100);var D=document.createElement("div");
-D.setAttribute("draggable","true");D.style.display=mxClient.IS_QUIRKS?"inline":"inline-block";D.style.position="relative";D.style.cursor="move";mxUtils.setPrefixedStyle(D.style,"transition","transform .1s ease-in-out");if(null!=b){var z=document.createElement("img");z.setAttribute("src",w.convert(b));z.style.width=A+"px";z.style.height=H+"px";z.style.margin="10px";z.style.paddingBottom=Math.floor((100-H)/2)+"px";z.style.paddingLeft=Math.floor((100-A)/2)+"px";D.appendChild(z)}else if(null!=q){var I=
-a.stringToCells(a.editor.graph.decompress(q.xml));0<I.length&&(a.sidebar.createThumb(I,100,100,D,null,!0,!1),D.firstChild.style.display=mxClient.IS_QUIRKS?"inline":"inline-block",D.firstChild.style.cursor="")}var J=document.createElement("img");J.setAttribute("src",Editor.closeImage);J.setAttribute("border","0");J.setAttribute("title",mxResources.get("delete"));J.setAttribute("align","top");J.style.paddingTop="4px";J.style.marginLeft="-22px";J.style.cursor="pointer";mxEvent.addListener(J,"dragstart",
-function(b){mxEvent.consume(b)});null==b&&null!=q&&(J.style.position="relative");(function(b,a,e){mxEvent.addListener(J,"click",function(c){t[a]=null;for(var l=0;l<g.length;l++)if(null!=g[l].data&&g[l].data==a||null!=g[l].xml&&null!=e&&g[l].xml==e.xml){g.splice(l,1);break}D.parentNode.removeChild(b);0==g.length&&(v.style.backgroundImage="url('"+IMAGE_PATH+"/droptarget.png')",u.style.display="");mxEvent.consume(c)});mxEvent.addListener(J,"dblclick",function(b){mxEvent.consume(b)})})(D,b,q);D.appendChild(J);
-D.style.marginBottom="30px";var E=document.createElement("div");E.style.position="absolute";E.style.boxSizing="border-box";E.style.bottom="-18px";E.style.left="10px";E.style.right="10px";E.style.backgroundColor="#ffffff";E.style.overflow="hidden";E.style.textAlign="center";var B=null;null!=b?(B={data:b,w:d,h:f,title:k},null!=h&&(B.aspect=h),t[b]=z,g.push(B)):null!=q&&(q.aspect="fixed",g.push(q),B=q);mxEvent.addListener(E,"keydown",function(b){13==b.keyCode&&null!=p&&(p(),p=null,mxEvent.consume(b))});
-x();D.appendChild(E);mxEvent.addListener(E,"mousedown",function(b){"true"!=E.getAttribute("contentEditable")&&mxEvent.consume(b)});I=function(b){if(mxClient.IS_IOS||mxClient.IS_QUIRKS||mxClient.IS_FF||!(null==document.documentMode||9<document.documentMode)){var e=new FilenameDialog(a,B.title||"",mxResources.get("ok"),function(b){null!=b&&(B.title=b,x())},mxResources.get("enterValue"));a.showDialog(e.container,300,80,!0,!0);e.init();mxEvent.consume(b)}else if("true"!=E.getAttribute("contentEditable")){null!=
-p&&(p(),p=null);if(null==B.title||0==B.title.length)E.innerHTML="";E.style.textOverflow="";E.style.whiteSpace="";E.style.cursor="text";E.style.color="";E.setAttribute("contentEditable","true");E.focus();document.execCommand("selectAll",!1,null);p=function(){E.removeAttribute("contentEditable");E.style.cursor="pointer";B.title=E.innerHTML;x()};mxEvent.consume(b)}};mxEvent.addListener(E,"click",I);mxEvent.addListener(D,"dblclick",I);v.appendChild(D);mxEvent.addListener(D,"dragstart",function(a){null==
-b&&null!=q&&(J.style.visibility="hidden",E.style.visibility="hidden");mxClient.IS_FF&&null!=q.xml&&a.dataTransfer.setData("Text",q.xml);y=m(a);mxClient.IS_GC&&(D.style.opacity="0.9");window.setTimeout(function(){mxUtils.setPrefixedStyle(D.style,"transform","scale(0.5,0.5)");mxUtils.setOpacity(D,30);J.style.visibility="";E.style.visibility=""},0)});mxEvent.addListener(D,"dragend",function(b){"hidden"==J.style.visibility&&(J.style.visibility="",E.style.visibility="");y=null;mxUtils.setOpacity(D,100);
+"100px";l.value=null!=c?c.y:"";e.appendChild(l);n.appendChild(b);n.appendChild(e);m.appendChild(n);n=document.createElement("tr");b=document.createElement("td");e=document.createElement("td");mxUtils.write(b,mxResources.get("width")+":");var p=document.createElement("input");p.setAttribute("type","text");p.style.width="100px";p.value=null!=c?c.width:"";e.appendChild(p);n.appendChild(b);n.appendChild(e);m.appendChild(n);n=document.createElement("tr");b=document.createElement("td");e=document.createElement("td");
+mxUtils.write(b,mxResources.get("height")+":");var u=document.createElement("input");u.setAttribute("type","text");u.style.width="100px";u.value=null!=c?c.height:"";e.appendChild(u);n.appendChild(b);n.appendChild(e);m.appendChild(n);n=document.createElement("tr");b=document.createElement("td");e=document.createElement("td");mxUtils.write(b,mxResources.get("rotation")+":");var v=document.createElement("input");v.setAttribute("type","text");v.style.width="100px";v.value=1==d.length?mxUtils.getValue(f.getCellStyle(d[0]),
+mxConstants.STYLE_ROTATION,0):"";e.appendChild(v);n.appendChild(b);n.appendChild(e);m.appendChild(n);k.appendChild(m);h.appendChild(k);var c=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog()}),q=mxUtils.button(mxResources.get("apply"),function(){a.hideDialog();f.getModel().beginUpdate();try{for(var b=0;b<d.length;b++){var c=f.getCellGeometry(d[b]);null!=c&&(c=c.clone(),f.isCellMovable(d[b])&&(0<mxUtils.trim(g.value).length&&(c.x=Number(g.value)),0<mxUtils.trim(l.value).length&&(c.y=
+Number(l.value))),f.isCellResizable(d[b])&&(0<mxUtils.trim(p.value).length&&(c.width=Number(p.value)),0<mxUtils.trim(u.value).length&&(c.height=Number(u.value))),f.getModel().setGeometry(d[b],c));0<mxUtils.trim(v.value).length&&f.setCellStyles(mxConstants.STYLE_ROTATION,Number(v.value),[d[b]])}}finally{f.getModel().endUpdate()}});mxEvent.addListener(h,"keypress",function(b){13==b.keyCode&&q.click()});k=document.createElement("div");k.style.marginTop="20px";k.style.textAlign="right";a.editor.cancelFirst?
+(k.appendChild(c),k.appendChild(q)):(k.appendChild(q),k.appendChild(c));h.appendChild(k);this.container=h},LibraryDialog=function(a,d,f,c,h,k){function m(b){for(b=document.elementFromPoint(b.clientX,b.clientY);null!=b&&b.parentNode!=u;)b=b.parentNode;var a=null;if(null!=b)for(var c=u.firstChild,a=0;null!=c&&c!=b;)c=c.nextSibling,a++;return a}function n(b,c,e,l,d,f,p,h,k){try{if(null==c||"image/"==c.substring(0,6))if(null==b&&null!=p||null==q[b]){var y=function(){E.innerHTML="";E.style.cursor="pointer";
+E.style.whiteSpace="nowrap";E.style.textOverflow="ellipsis";mxUtils.write(E,null!=B.title&&0<B.title.length?B.title:mxResources.get("untitled"));E.style.color=null==B.title||0==B.title.length?"#d0d0d0":""};u.style.backgroundImage="";v.style.display="none";var A=d,H=f;if(d>a.maxImageSize||f>a.maxImageSize){var F=Math.min(1,Math.min(a.maxImageSize/Math.max(1,d)),a.maxImageSize/Math.max(1,f));d*=F;f*=F}A>H?(H=Math.round(100*H/A),A=100):(A=Math.round(100*A/H),H=100);var D=document.createElement("div");
+D.setAttribute("draggable","true");D.style.display=mxClient.IS_QUIRKS?"inline":"inline-block";D.style.position="relative";D.style.cursor="move";mxUtils.setPrefixedStyle(D.style,"transition","transform .1s ease-in-out");if(null!=b){var z=document.createElement("img");z.setAttribute("src",w.convert(b));z.style.width=A+"px";z.style.height=H+"px";z.style.margin="10px";z.style.paddingBottom=Math.floor((100-H)/2)+"px";z.style.paddingLeft=Math.floor((100-A)/2)+"px";D.appendChild(z)}else if(null!=p){var I=
+a.stringToCells(a.editor.graph.decompress(p.xml));0<I.length&&(a.sidebar.createThumb(I,100,100,D,null,!0,!1),D.firstChild.style.display=mxClient.IS_QUIRKS?"inline":"inline-block",D.firstChild.style.cursor="")}var J=document.createElement("img");J.setAttribute("src",Editor.closeImage);J.setAttribute("border","0");J.setAttribute("title",mxResources.get("delete"));J.setAttribute("align","top");J.style.paddingTop="4px";J.style.marginLeft="-22px";J.style.cursor="pointer";mxEvent.addListener(J,"dragstart",
+function(b){mxEvent.consume(b)});null==b&&null!=p&&(J.style.position="relative");(function(b,a,c){mxEvent.addListener(J,"click",function(e){q[a]=null;for(var l=0;l<g.length;l++)if(null!=g[l].data&&g[l].data==a||null!=g[l].xml&&null!=c&&g[l].xml==c.xml){g.splice(l,1);break}D.parentNode.removeChild(b);0==g.length&&(u.style.backgroundImage="url('"+IMAGE_PATH+"/droptarget.png')",v.style.display="");mxEvent.consume(e)});mxEvent.addListener(J,"dblclick",function(b){mxEvent.consume(b)})})(D,b,p);D.appendChild(J);
+D.style.marginBottom="30px";var E=document.createElement("div");E.style.position="absolute";E.style.boxSizing="border-box";E.style.bottom="-18px";E.style.left="10px";E.style.right="10px";E.style.backgroundColor="#ffffff";E.style.overflow="hidden";E.style.textAlign="center";var B=null;null!=b?(B={data:b,w:d,h:f,title:k},null!=h&&(B.aspect=h),q[b]=z,g.push(B)):null!=p&&(p.aspect="fixed",g.push(p),B=p);mxEvent.addListener(E,"keydown",function(b){13==b.keyCode&&null!=t&&(t(),t=null,mxEvent.consume(b))});
+y();D.appendChild(E);mxEvent.addListener(E,"mousedown",function(b){"true"!=E.getAttribute("contentEditable")&&mxEvent.consume(b)});I=function(b){if(mxClient.IS_IOS||mxClient.IS_QUIRKS||mxClient.IS_FF||!(null==document.documentMode||9<document.documentMode)){var c=new FilenameDialog(a,B.title||"",mxResources.get("ok"),function(b){null!=b&&(B.title=b,y())},mxResources.get("enterValue"));a.showDialog(c.container,300,80,!0,!0);c.init();mxEvent.consume(b)}else if("true"!=E.getAttribute("contentEditable")){null!=
+t&&(t(),t=null);if(null==B.title||0==B.title.length)E.innerHTML="";E.style.textOverflow="";E.style.whiteSpace="";E.style.cursor="text";E.style.color="";E.setAttribute("contentEditable","true");E.focus();document.execCommand("selectAll",!1,null);t=function(){E.removeAttribute("contentEditable");E.style.cursor="pointer";B.title=E.innerHTML;y()};mxEvent.consume(b)}};mxEvent.addListener(E,"click",I);mxEvent.addListener(D,"dblclick",I);u.appendChild(D);mxEvent.addListener(D,"dragstart",function(a){null==
+b&&null!=p&&(J.style.visibility="hidden",E.style.visibility="hidden");mxClient.IS_FF&&null!=p.xml&&a.dataTransfer.setData("Text",p.xml);x=m(a);mxClient.IS_GC&&(D.style.opacity="0.9");window.setTimeout(function(){mxUtils.setPrefixedStyle(D.style,"transform","scale(0.5,0.5)");mxUtils.setOpacity(D,30);J.style.visibility="";E.style.visibility=""},0)});mxEvent.addListener(D,"dragend",function(b){"hidden"==J.style.visibility&&(J.style.visibility="",E.style.visibility="");x=null;mxUtils.setOpacity(D,100);
 mxUtils.setPrefixedStyle(D.style,"transform",null)})}else C||(C=!0,a.handleError({message:mxResources.get("fileExists")}));else{d=!1;try{if(a.spinner.stop(),A=mxUtils.parseXml(b),"mxlibrary"==A.documentElement.nodeName){H=JSON.parse(mxUtils.getTextContent(A.documentElement));if(null!=H&&0<H.length)for(var G=0;G<H.length;G++)null!=H[G].xml?n(null,null,0,0,0,0,H[G]):n(H[G].data,null,0,0,H[G].w,H[G].h,null,"fixed",H[G].title);d=!0}else if("mxfile"==A.documentElement.nodeName){for(var N=A.documentElement.getElementsByTagName("diagram"),
-G=0;G<N.length;G++){var H=mxUtils.getTextContent(N[G]),I=a.stringToCells(a.editor.graph.decompress(H)),V=a.editor.graph.getBoundingBoxFromGeometry(I);n(null,null,0,0,0,0,{xml:H,w:V.width,h:V.height})}d=!0}}catch(U){}d||(a.spinner.stop(),a.handleError({message:mxResources.get("errorLoadingFile")}))}}catch(U){}return null}function b(b){b.dataTransfer.dropEffect=null!=y?"move":"copy";b.stopPropagation();b.preventDefault()}function e(b){b.stopPropagation();b.preventDefault();C=!1;x=m(b);if(null!=y)null!=
-x&&x<v.children.length?(g.splice(x>y?x-1:x,0,g.splice(y,1)[0]),v.insertBefore(v.children[y],v.children[x])):(g.push(g.splice(y,1)[0]),v.appendChild(v.children[y]));else if(0<b.dataTransfer.files.length)a.importFiles(b.dataTransfer.files,0,0,a.maxImageSize,F(b));else if(0<=mxUtils.indexOf(b.dataTransfer.types,"text/uri-list")){var e=decodeURIComponent(b.dataTransfer.getData("text/uri-list"));(/(\.jpg)($|\?)/i.test(e)||/(\.png)($|\?)/i.test(e)||/(\.gif)($|\?)/i.test(e)||/(\.svg)($|\?)/i.test(e))&&a.loadImage(e,
-function(b){n(e,null,0,0,b.width,b.height);v.scrollTop=v.scrollHeight})}b.stopPropagation();b.preventDefault()}var g=[];f=document.createElement("div");f.style.height="100%";var l=document.createElement("div");l.style.whiteSpace="nowrap";l.style.height="40px";f.appendChild(l);mxUtils.write(l,mxResources.get("filename")+":");null==d&&(d=a.defaultLibraryName+".xml");var q=document.createElement("input");q.setAttribute("value",d);q.style.marginRight="20px";q.style.marginLeft="10px";q.style.width="500px";
-null==h||h.isRenamable()||q.setAttribute("disabled","true");this.init=function(){if(null==h||h.isRenamable())q.focus(),mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode||mxClient.IS_QUIRKS?q.select():document.execCommand("selectAll",!1,null)};l.appendChild(q);var v=document.createElement("div");v.style.borderWidth="1px 0px 1px 0px";v.style.borderColor="#d3d3d3";v.style.borderStyle="solid";v.style.marginTop="6px";v.style.overflow="auto";v.style.height="340px";v.style.backgroundPosition="center center";
-v.style.backgroundRepeat="no-repeat";0==g.length&&Graph.fileSupport&&(v.style.backgroundImage="url('"+IMAGE_PATH+"/droptarget.png')");var u=document.createElement("div");u.style.position="absolute";u.style.width="640px";u.style.top="260px";u.style.textAlign="center";u.style.fontSize="22px";u.style.color="#a0c3ff";mxUtils.write(u,mxResources.get("dragImagesHere"));f.appendChild(u);var t={},y=null,x=null,p=null;d=function(b){"true"!=mxEvent.getSource(b).getAttribute("contentEditable")&&null!=p&&(p(),
-p=null,mxEvent.consume(b))};mxEvent.addListener(v,"mousedown",d);mxEvent.addListener(v,"pointerdown",d);mxEvent.addListener(v,"touchstart",d);var w=new mxUrlConverter,C=!1;if(null!=c)for(d=0;d<c.length;d++)l=c[d],n(l.data,null,0,0,l.w,l.h,l,l.aspect,l.title);mxEvent.addListener(v,"dragleave",function(b){u.style.cursor="";for(var a=mxEvent.getSource(b);null!=a;){if(a==v||a==u){b.stopPropagation();b.preventDefault();break}a=a.parentNode}});var F=function(b){return function(e,c,g,l,p,d,f,t,q){null!=
-q&&!a.isOffline()&&(new XMLHttpRequest).upload&&a.isRemoteFileFormat(e,q.name)?a.parseFile(q,mxUtils.bind(this,function(e){4==e.readyState&&(a.spinner.stop(),200<=e.status&&299>=e.status&&(n(e.responseText,c,g,l,p,d,f,"fixed",mxEvent.isAltDown(b)?null:f.substring(0,f.lastIndexOf(".")).replace(/_/g," ")),v.scrollTop=v.scrollHeight))})):(n(e,c,g,l,p,d,f,"fixed",mxEvent.isAltDown(b)?null:f.substring(0,f.lastIndexOf(".")).replace(/_/g," ")),v.scrollTop=v.scrollHeight)}};mxEvent.addListener(v,"dragover",
-b);mxEvent.addListener(v,"drop",e);mxEvent.addListener(u,"dragover",b);mxEvent.addListener(u,"drop",e);f.appendChild(v);c=document.createElement("div");c.style.textAlign="right";c.style.marginTop="20px";d=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog(!0)});d.setAttribute("id","btnCancel");d.className="geBtn";a.editor.cancelFirst&&c.appendChild(d);l=mxUtils.button(mxResources.get("export"),function(){var b=a.createLibraryDataFromImages(g),e=q.value;/(\.xml)$/i.test(e)||(e+=".xml");
-a.isLocalFileSave()?a.saveLocalFile(b,e,"text/xml",null,null,!0):(new mxXmlRequest(SAVE_URL,"filename="+encodeURIComponent(e)+"&format=xml&xml="+encodeURIComponent(b))).simulate(document,"_blank")});l.setAttribute("id","btnDownload");l.className="geBtn";c.appendChild(l);var B=document.createElement("input");B.setAttribute("multiple","multiple");B.setAttribute("type","file");null==document.documentMode&&(mxEvent.addListener(B,"change",function(b){C=!1;a.importFiles(B.files,0,0,a.maxImageSize,function(a,
-e,c,g,l,p,d,f,t){F(b)(a,e,c,g,l,p,d,f,t);B.value=""});v.scrollTop=v.scrollHeight}),l=mxUtils.button(mxResources.get("import"),function(){null!=p&&(p(),p=null);B.click()}),l.setAttribute("id","btnAddImage"),l.className="geBtn",c.appendChild(l));l=mxUtils.button(mxResources.get("addImageUrl"),function(){null!=p&&(p(),p=null);a.showImageDialog(mxResources.get("addImageUrl"),"",function(b,a,e){C=!1;if(null!=b){if("data:image/"==b.substring(0,11)){var c=b.indexOf(",");0<c&&(b=b.substring(0,c)+";base64,"+
-b.substring(c+1))}n(b,null,0,0,a,e);v.scrollTop=v.scrollHeight}})});l.setAttribute("id","btnAddImageUrl");l.className="geBtn";c.appendChild(l);this.saveBtnClickHandler=function(b,e,c,g){a.saveLibrary(b,e,c,g)};l=mxUtils.button(mxResources.get("save"),mxUtils.bind(this,function(){null!=p&&(p(),p=null);this.saveBtnClickHandler(q.value,g,h,k)}));l.setAttribute("id","btnSave");l.className="geBtn gePrimaryBtn";c.appendChild(l);a.editor.cancelFirst||c.appendChild(d);f.appendChild(c);this.container=f},EditShapeDialog=
+G=0;G<N.length;G++){var H=mxUtils.getTextContent(N[G]),I=a.stringToCells(a.editor.graph.decompress(H)),V=a.editor.graph.getBoundingBoxFromGeometry(I);n(null,null,0,0,0,0,{xml:H,w:V.width,h:V.height})}d=!0}}catch(U){}d||(a.spinner.stop(),a.handleError({message:mxResources.get("errorLoadingFile")}))}}catch(U){}return null}function b(b){b.dataTransfer.dropEffect=null!=x?"move":"copy";b.stopPropagation();b.preventDefault()}function e(b){b.stopPropagation();b.preventDefault();C=!1;y=m(b);if(null!=x)null!=
+y&&y<u.children.length?(g.splice(y>x?y-1:y,0,g.splice(x,1)[0]),u.insertBefore(u.children[x],u.children[y])):(g.push(g.splice(x,1)[0]),u.appendChild(u.children[x]));else if(0<b.dataTransfer.files.length)a.importFiles(b.dataTransfer.files,0,0,a.maxImageSize,F(b));else if(0<=mxUtils.indexOf(b.dataTransfer.types,"text/uri-list")){var c=decodeURIComponent(b.dataTransfer.getData("text/uri-list"));(/(\.jpg)($|\?)/i.test(c)||/(\.png)($|\?)/i.test(c)||/(\.gif)($|\?)/i.test(c)||/(\.svg)($|\?)/i.test(c))&&a.loadImage(c,
+function(b){n(c,null,0,0,b.width,b.height);u.scrollTop=u.scrollHeight})}b.stopPropagation();b.preventDefault()}var g=[];f=document.createElement("div");f.style.height="100%";var l=document.createElement("div");l.style.whiteSpace="nowrap";l.style.height="40px";f.appendChild(l);mxUtils.write(l,mxResources.get("filename")+":");null==d&&(d=a.defaultLibraryName+".xml");var p=document.createElement("input");p.setAttribute("value",d);p.style.marginRight="20px";p.style.marginLeft="10px";p.style.width="500px";
+null==h||h.isRenamable()||p.setAttribute("disabled","true");this.init=function(){if(null==h||h.isRenamable())p.focus(),mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode||mxClient.IS_QUIRKS?p.select():document.execCommand("selectAll",!1,null)};l.appendChild(p);var u=document.createElement("div");u.style.borderWidth="1px 0px 1px 0px";u.style.borderColor="#d3d3d3";u.style.borderStyle="solid";u.style.marginTop="6px";u.style.overflow="auto";u.style.height="340px";u.style.backgroundPosition="center center";
+u.style.backgroundRepeat="no-repeat";0==g.length&&Graph.fileSupport&&(u.style.backgroundImage="url('"+IMAGE_PATH+"/droptarget.png')");var v=document.createElement("div");v.style.position="absolute";v.style.width="640px";v.style.top="260px";v.style.textAlign="center";v.style.fontSize="22px";v.style.color="#a0c3ff";mxUtils.write(v,mxResources.get("dragImagesHere"));f.appendChild(v);var q={},x=null,y=null,t=null;d=function(b){"true"!=mxEvent.getSource(b).getAttribute("contentEditable")&&null!=t&&(t(),
+t=null,mxEvent.consume(b))};mxEvent.addListener(u,"mousedown",d);mxEvent.addListener(u,"pointerdown",d);mxEvent.addListener(u,"touchstart",d);var w=new mxUrlConverter,C=!1;if(null!=c)for(d=0;d<c.length;d++)l=c[d],n(l.data,null,0,0,l.w,l.h,l,l.aspect,l.title);mxEvent.addListener(u,"dragleave",function(b){v.style.cursor="";for(var a=mxEvent.getSource(b);null!=a;){if(a==u||a==v){b.stopPropagation();b.preventDefault();break}a=a.parentNode}});var F=function(b){return function(c,e,g,l,t,d,q,f,p){null!=
+p&&!a.isOffline()&&(new XMLHttpRequest).upload&&a.isRemoteFileFormat(c,p.name)?a.parseFile(p,mxUtils.bind(this,function(c){4==c.readyState&&(a.spinner.stop(),200<=c.status&&299>=c.status&&(n(c.responseText,e,g,l,t,d,q,"fixed",mxEvent.isAltDown(b)?null:q.substring(0,q.lastIndexOf(".")).replace(/_/g," ")),u.scrollTop=u.scrollHeight))})):(n(c,e,g,l,t,d,q,"fixed",mxEvent.isAltDown(b)?null:q.substring(0,q.lastIndexOf(".")).replace(/_/g," ")),u.scrollTop=u.scrollHeight)}};mxEvent.addListener(u,"dragover",
+b);mxEvent.addListener(u,"drop",e);mxEvent.addListener(v,"dragover",b);mxEvent.addListener(v,"drop",e);f.appendChild(u);c=document.createElement("div");c.style.textAlign="right";c.style.marginTop="20px";d=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog(!0)});d.setAttribute("id","btnCancel");d.className="geBtn";a.editor.cancelFirst&&c.appendChild(d);l=mxUtils.button(mxResources.get("export"),function(){var b=a.createLibraryDataFromImages(g),c=p.value;/(\.xml)$/i.test(c)||(c+=".xml");
+a.isLocalFileSave()?a.saveLocalFile(b,c,"text/xml",null,null,!0):(new mxXmlRequest(SAVE_URL,"filename="+encodeURIComponent(c)+"&format=xml&xml="+encodeURIComponent(b))).simulate(document,"_blank")});l.setAttribute("id","btnDownload");l.className="geBtn";c.appendChild(l);var B=document.createElement("input");B.setAttribute("multiple","multiple");B.setAttribute("type","file");null==document.documentMode&&(mxEvent.addListener(B,"change",function(b){C=!1;a.importFiles(B.files,0,0,a.maxImageSize,function(a,
+c,e,g,l,t,d,q,f){F(b)(a,c,e,g,l,t,d,q,f);B.value=""});u.scrollTop=u.scrollHeight}),l=mxUtils.button(mxResources.get("import"),function(){null!=t&&(t(),t=null);B.click()}),l.setAttribute("id","btnAddImage"),l.className="geBtn",c.appendChild(l));l=mxUtils.button(mxResources.get("addImageUrl"),function(){null!=t&&(t(),t=null);a.showImageDialog(mxResources.get("addImageUrl"),"",function(b,a,c){C=!1;if(null!=b){if("data:image/"==b.substring(0,11)){var e=b.indexOf(",");0<e&&(b=b.substring(0,e)+";base64,"+
+b.substring(e+1))}n(b,null,0,0,a,c);u.scrollTop=u.scrollHeight}})});l.setAttribute("id","btnAddImageUrl");l.className="geBtn";c.appendChild(l);this.saveBtnClickHandler=function(b,c,e,g){a.saveLibrary(b,c,e,g)};l=mxUtils.button(mxResources.get("save"),mxUtils.bind(this,function(){null!=t&&(t(),t=null);this.saveBtnClickHandler(p.value,g,h,k)}));l.setAttribute("id","btnSave");l.className="geBtn gePrimaryBtn";c.appendChild(l);a.editor.cancelFirst||c.appendChild(d);f.appendChild(c);this.container=f},EditShapeDialog=
 function(a,d,f,c,h){c=null!=c?c:300;h=null!=h?h:120;var k,m,n=document.createElement("table"),b=document.createElement("tbody");n.style.cellPadding="4px";k=document.createElement("tr");m=document.createElement("td");m.setAttribute("colspan","2");m.style.fontSize="10pt";mxUtils.write(m,f);k.appendChild(m);b.appendChild(k);k=document.createElement("tr");m=document.createElement("td");var e=document.createElement("textarea");e.style.outline="none";e.style.resize="none";e.style.width=c-200+"px";e.style.height=
 h+"px";this.textarea=e;this.init=function(){e.focus();e.scrollTop=0};m.appendChild(e);k.appendChild(m);m=document.createElement("td");f=document.createElement("div");f.style.position="relative";f.style.border="1px solid gray";f.style.top="6px";f.style.width="200px";f.style.height=h+4+"px";f.style.overflow="hidden";f.style.marginBottom="16px";mxEvent.disableContextMenu(f);m.appendChild(f);var g=new Graph(f);g.setEnabled(!1);var l=a.editor.graph.cloneCells([d])[0];g.addCells([l]);f=g.view.getState(l);
-var q="";null!=f.shape&&null!=f.shape.stencil&&(q=mxUtils.getPrettyXml(f.shape.stencil.desc));mxUtils.write(e,q||"");f=g.getGraphBounds();h=Math.min(160/f.width,(h-40)/f.height);g.view.scaleAndTranslate(h,20/h-f.x,20/h-f.y);k.appendChild(m);b.appendChild(k);k=document.createElement("tr");m=document.createElement("td");m.setAttribute("colspan","2");m.style.paddingTop="2px";m.style.whiteSpace="nowrap";m.setAttribute("align","right");h=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog()});
-h.className="geBtn";a.editor.cancelFirst&&m.appendChild(h);a.isOffline()||(f=mxUtils.button(mxResources.get("help"),function(){window.open("https://desk.draw.io/support/solutions/articles/16000052874")}),f.className="geBtn",m.appendChild(f));var v=function(b,c,g){var l=e.value,p=mxUtils.parseXml(l),l=mxUtils.getPrettyXml(p.documentElement),p=p.documentElement.getElementsByTagName("parsererror");if(null!=p&&0<p.length)a.showError(mxResources.get("error"),mxResources.get("containsValidationErrors"),
-mxResources.get("ok"));else if(g&&a.hideDialog(),p=!b.model.contains(c),!g||p||l!=q){l=a.editor.graph.compress(l);b.getModel().beginUpdate();try{if(p){var d=a.editor.graph.getInsertPoint();c.geometry.x=d.x;c.geometry.y=d.y;b.addCell(c)}b.setCellStyles(mxConstants.STYLE_SHAPE,"stencil("+l+")",[c])}catch(C){throw C;}finally{b.getModel().endUpdate()}p&&b.setSelectionCell(c)}};f=mxUtils.button(mxResources.get("preview"),function(){v(g,l,!1)});f.className="geBtn";m.appendChild(f);f=mxUtils.button(mxResources.get("apply"),
-function(){v(a.editor.graph,d,!0)});f.className="geBtn gePrimaryBtn";m.appendChild(f);a.editor.cancelFirst||m.appendChild(h);k.appendChild(m);b.appendChild(k);n.appendChild(b);this.container=n},CustomDialog=function(a,d,f,c,h,k){var m=document.createElement("div");m.appendChild(d);d=document.createElement("div");d.style.marginTop="16px";d.style.textAlign="right";var n=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog();null!=c&&c()});n.className="geBtn";a.editor.cancelFirst&&d.appendChild(n);
+var p="";null!=f.shape&&null!=f.shape.stencil&&(p=mxUtils.getPrettyXml(f.shape.stencil.desc));mxUtils.write(e,p||"");f=g.getGraphBounds();h=Math.min(160/f.width,(h-40)/f.height);g.view.scaleAndTranslate(h,20/h-f.x,20/h-f.y);k.appendChild(m);b.appendChild(k);k=document.createElement("tr");m=document.createElement("td");m.setAttribute("colspan","2");m.style.paddingTop="2px";m.style.whiteSpace="nowrap";m.setAttribute("align","right");h=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog()});
+h.className="geBtn";a.editor.cancelFirst&&m.appendChild(h);a.isOffline()||(f=mxUtils.button(mxResources.get("help"),function(){window.open("https://desk.draw.io/support/solutions/articles/16000052874")}),f.className="geBtn",m.appendChild(f));var u=function(b,c,g){var l=e.value,t=mxUtils.parseXml(l),l=mxUtils.getPrettyXml(t.documentElement),t=t.documentElement.getElementsByTagName("parsererror");if(null!=t&&0<t.length)a.showError(mxResources.get("error"),mxResources.get("containsValidationErrors"),
+mxResources.get("ok"));else if(g&&a.hideDialog(),t=!b.model.contains(c),!g||t||l!=p){l=a.editor.graph.compress(l);b.getModel().beginUpdate();try{if(t){var d=a.editor.graph.getInsertPoint();c.geometry.x=d.x;c.geometry.y=d.y;b.addCell(c)}b.setCellStyles(mxConstants.STYLE_SHAPE,"stencil("+l+")",[c])}catch(C){throw C;}finally{b.getModel().endUpdate()}t&&b.setSelectionCell(c)}};f=mxUtils.button(mxResources.get("preview"),function(){u(g,l,!1)});f.className="geBtn";m.appendChild(f);f=mxUtils.button(mxResources.get("apply"),
+function(){u(a.editor.graph,d,!0)});f.className="geBtn gePrimaryBtn";m.appendChild(f);a.editor.cancelFirst||m.appendChild(h);k.appendChild(m);b.appendChild(k);n.appendChild(b);this.container=n},CustomDialog=function(a,d,f,c,h,k){var m=document.createElement("div");m.appendChild(d);d=document.createElement("div");d.style.marginTop="16px";d.style.textAlign="right";var n=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog();null!=c&&c()});n.className="geBtn";a.editor.cancelFirst&&d.appendChild(n);
 if(!a.isOffline()&&null!=k){var b=mxUtils.button(mxResources.get("help"),function(){window.open(k)});b.className="geBtn";d.appendChild(b)}h=mxUtils.button(h||mxResources.get("ok"),function(){a.hideDialog();null!=f&&f()});d.appendChild(h);h.className="geBtn gePrimaryBtn";a.editor.cancelFirst||d.appendChild(n);m.appendChild(d);this.cancelBtn=n;this.okButton=h;this.container=m};(function(){Editor.prototype.appName="draw.io";Editor.closeImage=mxClient.IS_SVG?"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABkAAAAZCAMAAADzN3VRAAAApVBMVEUAAAD////k5OT///8AAAB1dXXMzMz9/f39/f37+/v5+fn+/v7///9iYmJaWlqFhYWnp6ejo6OHh4f////////////////7+/v5+fnx8fH///8AAAD///8bGxv7+/v5+fkoKCghISFDQ0MYGBjh4eHY2Njb29tQUFBvb29HR0c/Pz82NjYrKyu/v78SEhLu7u7s7OzV1dVVVVU7OzsVFRXAv78QEBBzqehMAAAAG3RSTlMAA/7p/vz5xZlrTiPL/v78+/v7+OXd2TYQDs8L70ZbAAABKUlEQVQoz3VS13LCMBBUXHChd8iukDslQChJ/v/TchaG4cXS+OSb1c7trU7V60OpdRz2ZtNZL4zXNlcN8BEtSG6+NxIXkeRPoBuQ1cjvZ31/VJFB10ISli6diYfH8iYO3WUNCcNlB0gTrXOtkxTo0O1aKKiBBMhhv2MNBQKoiA5wxlZo0JDzD3AYKbWacyj3fs01wxey0pyEP+R8pWKWXoqtIZ0DDg5pbki9krEKOa6LVDQsdoXEsi46Zqh69KFz7B1u7Hb2yDV8firXDKBlZ4UFiswKGRhXTS93/ECK7yxnJ3+S3y/ThpO+cfSD017nqa18aasabU0/t7d+tk0/1oMEJ1NaD67iwdF68OabFSLn+eHb0+vjy+uk8br9fdrftH0O2menfd7+AQfYM/lNjoDHAAAAAElFTkSuQmCC":
 IMAGE_PATH+"/delete.png";Editor.plusImage=mxClient.IS_SVG?"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAoAAAAKCAYAAACNMs+9AAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAyJpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuMC1jMDYwIDYxLjEzNDc3NywgMjAxMC8wMi8xMi0xNzozMjowMCAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvIiB4bWxuczp4bXBNTT0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL21tLyIgeG1sbnM6c3RSZWY9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9zVHlwZS9SZXNvdXJjZVJlZiMiIHhtcDpDcmVhdG9yVG9vbD0iQWRvYmUgUGhvdG9zaG9wIENTNSBNYWNpbnRvc2giIHhtcE1NOkluc3RhbmNlSUQ9InhtcC5paWQ6MDdCMTdENjVCOEM4MTFFNDlCRjVBNDdCODU5NjNBNUMiIHhtcE1NOkRvY3VtZW50SUQ9InhtcC5kaWQ6MDdCMTdENjZCOEM4MTFFNDlCRjVBNDdCODU5NjNBNUMiPiA8eG1wTU06RGVyaXZlZEZyb20gc3RSZWY6aW5zdGFuY2VJRD0ieG1wLmlpZDowN0IxN0Q2M0I4QzgxMUU0OUJGNUE0N0I4NTk2M0E1QyIgc3RSZWY6ZG9jdW1lbnRJRD0ieG1wLmRpZDowN0IxN0Q2NEI4QzgxMUU0OUJGNUE0N0I4NTk2M0E1QyIvPiA8L3JkZjpEZXNjcmlwdGlvbj4gPC9yZGY6UkRGPiA8L3g6eG1wbWV0YT4gPD94cGFja2V0IGVuZD0iciI/PtjrjmgAAAAtSURBVHjaYvz//z8DMigvLwcLdHZ2MiKLMzEQCaivkLGsrOw/dU0cAr4GCDAARQsQbTFrv10AAAAASUVORK5CYII=":
 IMAGE_PATH+"/plus.png";Editor.spinImage=mxClient.IS_SVG?"data:image/gif;base64,R0lGODlhDAAMAPUxAEVriVp7lmCAmmGBm2OCnGmHn3OPpneSqYKbr4OcsIScsI2kto6kt46lt5KnuZmtvpquvpuvv56ywaCzwqK1xKu7yay9yq+/zLHAzbfF0bjG0bzJ1LzK1MDN18jT28nT3M3X3tHa4dTc49Xd5Njf5dng5t3k6d/l6uDm6uru8e7x8/Dz9fT29/b4+Pj5+fj5+vr6+v///wAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACH5BAkKADEAIf8LTkVUU0NBUEUyLjADAQAAACwAAAAADAAMAAAGR8CYcEgsOgYAIax4CCQuQldrCBEsiK8VS2hoFGOrlJDA+cZQwkLnqyoJFZKviSS0ICrE0ec0jDAwIiUeGyBFGhMPFBkhZo1BACH5BAkKAC4ALAAAAAAMAAwAhVB0kFR3k1V4k2CAmmWEnW6Lo3KOpXeSqH2XrIOcsISdsImhtIqhtJCmuJGnuZuwv52wwJ+ywZ+ywqm6yLHBzbLCzrXEz7fF0LnH0rrI0r7L1b/M1sXR2cfT28rV3czW3s/Z4Nfe5Nvi6ODm6uLn6+Ln7OLo7OXq7efs7+zw8u/y9PDy9PX3+Pr7+////wAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAZDQJdwSCxGDAIAoVFkFBwYSyIwGE4OkCJxIdG6WkJEx8sSKj7elfBB0a5SQg1EQ0SVVMPKhDM6iUIkRR4ZFxsgJl6JQQAh+QQJCgAxACwAAAAADAAMAIVGa4lcfZdjgpxkg51nhp5ui6N3kqh5lKqFnbGHn7KIoLOQp7iRp7mSqLmTqbqarr6br7+fssGitcOitcSuvsuuv8uwwMyzw861xNC5x9K6x9K/zNbDztjE0NnG0drJ1NzQ2eDS2+LT2+LV3ePZ4Oba4ebb4ufc4+jm6+7t8PLt8PPt8fPx8/Xx9PX09vf19/j3+Pn///8AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAGQ8CYcEgsUhQFggFSjCQmnE1jcBhqGBXiIuAQSi7FGEIgfIzCFoCXFCZiPO0hKBMiwl7ET6eUYqlWLkUnISImKC1xbUEAIfkECQoAMgAsAAAAAAwADACFTnKPT3KPVHaTYoKcb4yjcY6leZSpf5mtgZuvh5+yiqG0i6K1jqW3kae5nrHBnrLBn7LCoLPCobTDqbrIqrvIs8LOtMPPtcPPtcTPuMbRucfSvcrUvsvVwMzWxdHaydTcytXdzNbezdff0drh2ODl2+Ln3eTp4Obq4ujs5Ont5uvu6O3w6u7w6u7x7/L09vj5+vr7+vv7////AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABkdAmXBILHIcicOCUqxELKKPxKAYgiYd4oMAEWo8RVmjIMScwhmBcJMKXwLCECmMGAhPI1QRwBiaSixCMDFhLSorLi8wYYxCQQAh+QQJCgAxACwAAAAADAAMAIVZepVggJphgZtnhp5vjKN2kah3kqmBmq+KobSLorWNpLaRp7mWq7ybr7+gs8KitcSktsWnuManucexwM2ywc63xtG6yNO9ytS+ytW/zNbDz9jH0tvL1d3N197S2+LU3OPU3ePV3eTX3+Xa4efb4ufd5Onl6u7r7vHs7/Lt8PLw8/Xy9Pby9fb09ff2+Pn3+Pn6+vr///8AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAGSMCYcEgseiwSR+RS7GA4JFGF8RiWNiEiJTERgkjFGAQh/KTCGoJwpApnBkITKrwoCFWnFlEhaAxXLC9CBwAGRS4wQgELYY1CQQAh+QQJCgAzACwAAAAADAAMAIVMcI5SdZFhgZtti6JwjaR4k6mAma6Cm6+KobSLorWLo7WNo7aPpredsMCescGitMOitcSmuMaqu8ixwc2zws63xdC4xtG5x9K9ytXAzdfCztjF0NnF0drK1d3M1t7P2N/P2eDT2+LX3+Xe5Onh5+vi5+vj6Ozk6e3n7O/o7O/q7vHs7/Lt8PPu8fPx8/X3+Pn6+vv7+/v8/Pz///8AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAGRcCZcEgsmkIbTOZTLIlGqZNnchm2SCgiJ6IRqljFmQUiXIVnoITQde4chC9Y+LEQxmTFRkFSNFAqDAMIRQoCAAEEDmeLQQAh+QQJCgAwACwAAAAADAAMAIVXeZRefplff5lhgZtph59yjqV2kaeAmq6FnbGFnrGLorWNpLaQp7mRqLmYrb2essGgs8Klt8apusitvcquv8u2xNC7yNO8ydS8ytTAzdfBzdfM1t7N197Q2eDU3OPX3+XZ4ObZ4ebc4+jf5erg5erg5uvp7fDu8fPv8vTz9fb09vf19/j3+Pn4+fn5+vr6+/v///8AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAGRUCYcEgspkwjEKhUVJ1QsBNp0xm2VixiSOMRvlxFGAcTJook5eEHIhQcwpWIkAFQECkNy9AQWFwyEAkPRQ4FAwQIE2llQQAh+QQJCgAvACwAAAAADAAMAIVNcY5SdZFigptph6BvjKN0kKd8lquAmq+EnbGGn7KHn7ONpLaOpbearr+csMCdscCescGhtMOnuMauvsuzws60w862xdC9ytW/y9a/zNbCztjG0drH0tvK1N3M1t7N19/U3ePb4uff5urj6Ozk6e3l6u7m6u7o7PDq7vDt8PPv8vTw8vTw8/X19vf6+vv///8AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAGQ8CXcEgsvlytVUplJLJIpSEDUESFTELBwSgCCQEV42kjDFiMo4uQsDB2MkLHoEHUTD7DRAHC8VAiZ0QSCgYIDxhNiUEAOw==":
@@ -6168,88 +6170,88 @@ IMAGE_PATH+"/spin.gif";Editor.tweetImage=IMAGE_PATH+"/tweet.png";Editor.facebook
 IMAGE_PATH+"/img-hi-res.png";Editor.loResImage=mxClient.IS_SVG?"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAFAAAAA+CAMAAACLMWy1AAAAS1BMVEVAQEAAAAA1NTVBQUFDQ0NDQ0NFRUVERERBQUFBQUFBQUFAQEBBQUFBQUFCQkJCQkJCQkJBQUFCQkJDQ0NDQ0NCQkJCQkJCQkJGRkb5/XqTAAAAGXRSTlP+AAWODlASCsesX+Lc2LyWe3pwa1tCPjohjSJfoAAAAI1JREFUWMPt1MkKhTAMRuG0anvneXr/J71nUypKcdqI/N8yhLMKMZE1CahnClDQzMPB44ED3EgeCubgDWnWQMHpwTtKwTe+UHD4sJ94wbUEHHFGhILlYDeSnsQeabeCgsPBgB0MOZZ9oGA5GJFiJSfUULAfjLjARrhCwX7wh2YCDwVbwZkUBKqFFJRN+wOcwSgR2sREcgAAAABJRU5ErkJggg==":
 IMAGE_PATH+"/img-lo-res.png";Editor.cameraLargeImage="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAYAAABzenr0AAAAAXNSR0IArs4c6QAAAAlwSFlzAAALEwAACxMBAJqcGAAAAVlpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IlhNUCBDb3JlIDUuNC4wIj4KICAgPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4KICAgICAgPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIKICAgICAgICAgICAgeG1sbnM6dGlmZj0iaHR0cDovL25zLmFkb2JlLmNvbS90aWZmLzEuMC8iPgogICAgICAgICA8dGlmZjpPcmllbnRhdGlvbj4xPC90aWZmOk9yaWVudGF0aW9uPgogICAgICA8L3JkZjpEZXNjcmlwdGlvbj4KICAgPC9yZGY6UkRGPgo8L3g6eG1wbWV0YT4KTMInWQAAA/BJREFUWAnFl0uIjWEYx885buPSuGwmSYwtwsY1ikKSNYNclmQnadgrZSPlsnBLSlaGBdNYKY0Vdi4L4zYzIqxGxmXG//d+7//0+uY7nWMiT/2/53mf+3v7vnNKpf9M5UbrDw8Pj4m+wzmeT1FBUS6Xf+YNox6reMONukijMXUTM3NmI75PyXcJPwRWg5kS7xysDLNmfEUxpx2rceNE50IlYjyRklcLf0prY+x4BTqfmx3ZUHQaO9ISGngYq38V/1EH+ECPa+QaK1u1kVBQirDMChiS3CTeIkwWvghtwhKBpZ8g1CO2B99FynVU/KowSRgQ3mlrBsVZ1awmQlS0SGbfXglfBPbdRGMm5O8RXg2P835pDCvzWjghTHETcLpZLHwS8kTCtBEK1SN83Egam8YxyVZqc+Do5qkwS+gT9grNwkUBG6cbsG/gs3BTuC/0ChCxq4QtwgzBMdwUZBPyN4Ftfi4sYPZHktbOSRlIuutRP5jYj0ueZp88xyYcS/zZoiLyQT1IA/cTj7eSlwnrhI+JnkQbCwo2Sx/2M7VJt17wdhVtgxvrpoFnAuSAbJQ97biZAlKxBfD9wgOhV+BgIR/AZtJ4kwD5PGSj7OmmekjWEy0oAQHAS3+KpBpzXqYK3UItopHpSRMno2N+cm7gDYnfRCcr3QBqriMHLJDkeyhFfiG5aVbK+8rhtP9M6QcIEJHX5Fp9NMAyQlYiu+OOJNlODCIXyka/P23bncTdiC7OydC1+v1Bsb+5r84DK8S3Rdmf5cRUFW3bXtWUSt1Rdk6G4SyJV2o1YId+vNUxr+x5yCJiapFtcxQzLjrxboGcMxvFJwEOKnLwjIbkx/sdSmeSaUY++SwTAxV+4DJT7RVwkbk46gNCsifIItuy0e9PF33Cb4homhN5YRyzL5q5V2VNkv98kqgoGTo3YF9CnMM5Y5rItFfvBSi9JulVXOgI+VwIntkt+SaZ6weQfcovJf7zpTfl86P/wAF7Fz18NeKwmvAWCaX0Z/uMHQr42ZxvR/Rxcw5xM+9J/CJq8w2gduDhmDgso/QrBH47dEXQ1IqczyHpIOfIRtnTtV7SwO1oKXKkU3fbToFGSDHtMWcaH1WBuVYnDbRFi99iqSMySdzxXckrazUh23KBVYGIcfNBkTxca0e4ATJ0KukGYVBgr/MnlhPOtQq/ksUfCbzh+EFCjtnCUoHfjhA/OsiTv2HcEvJMELp0VakZDliTmriTdPivxU4VmEhtPrGV+KJhO7ZKt0doFZh1fgZSBWIW2AGEHwg3BUWOnKtH+suqdw07tYMfglCrWPD5mw9qVYuniaXkT0OtWaSuo5LJTY1RBf+roF9X5+y/5qU+DAAAAABJRU5ErkJggg==";
 Editor.defaultCustomLibraries=[];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## 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## Connections between rows ("from": source colum, "to": target column).\n## Label, style and invert are optional. Defaults are \'\', current style and false.\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 width. Possible value are px or auto. Default is auto.\n#\n# width: auto\n#\n## Node height. Possible value are px or auto. Default is auto.\n#\n# height: auto\n#\n## Padding for autosize. Default is 0.\n#\n# padding: -26\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\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 parallel edges. Default is 40.\n#\n# edgespacing: 40\n#\n## Name of layout. Possible values are auto, none, verticaltree, horizontaltree,\n## verticalflow, horizontalflow, organic, circle. 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\nEvan 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-9-2-128.png\nEdward Morrison,Brand Manager,emo,Office 2,Evan 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\nRon Donovan,System Admin,rdo,Office 3,Evan 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\nTessa Valet,HR Director,tva,Office 4,Evan Miller,me@example.com,#d5e8d4,#82b366,,https://www.draw.io,https://cdn3.iconfinder.com/data/icons/user-avatars-1/512/users-3-128.png\n';
-Editor.configure=function(b){if(null!=b){Menus.prototype.defaultFonts=b.defaultFonts||Menus.prototype.defaultFonts;ColorDialog.prototype.presetColors=b.presetColors||ColorDialog.prototype.presetColors;ColorDialog.prototype.defaultColors=b.defaultColors||ColorDialog.prototype.defaultColors;StyleFormatPanel.prototype.defaultColorSchemes=b.defaultColorSchemes||StyleFormatPanel.prototype.defaultColorSchemes;if(null!=b.css){var a=document.createElement("style");a.setAttribute("type","text/css");a.appendChild(document.createTextNode(b.css));
-var e=document.getElementsByTagName("script")[0];e.parentNode.insertBefore(a,e)}null!=b.defaultLibraries&&(Sidebar.prototype.defaultEntries=b.defaultLibraries);null!=b.defaultCustomLibraries&&(Editor.defaultCustomLibraries=b.defaultCustomLibraries);null!=b.defaultVertexStyle&&(Graph.prototype.defaultVertexStyle=b.defaultVertexStyle);null!=b.defaultEdgeStyle&&(Graph.prototype.defaultEdgeStyle=b.defaultEdgeStyle);b.emptyDiagramXml&&(EditorUi.prototype.emptyDiagramXml=b.emptyDiagramXml);b.thumbWidth&&
-(Sidebar.prototype.thumbWidth=b.thumbWidth);b.thumbHeight&&(Sidebar.prototype.thumbHeight=b.thumbHeight);b.emptyLibraryXml&&(EditorUi.prototype.emptyLibraryXml=b.emptyLibraryXml);b.sidebarWidth&&(EditorUi.prototype.hsplitPosition=b.sidebarWidth);b.fontCss&&(a=document.createElement("style"),a.setAttribute("type","text/css"),a.appendChild(document.createTextNode(b.fontCss)),e=document.getElementsByTagName("script")[0],e.parentNode.insertBefore(a,e),Editor.prototype.fontCss=b.fontCss);if(null!=b.plugins)for(App.initPluginCallback(),
-a=0;a<b.plugins.length;a++)mxscript(b.plugins[a])}};Editor.prototype.editButtonLink=null!=urlParams.edit?decodeURIComponent(urlParams.edit):null;var a=Editor.prototype.setGraphXml;Editor.prototype.setGraphXml=function(b){b=null!=b&&"mxlibrary"!=b.nodeName?this.extractGraphModel(b):null;if(null!=b){var e=b.getElementsByTagName("parsererror");if(null!=e&&0<e.length){var e=e[0],c=e.getElementsByTagName("div");null!=c&&0<c.length&&(e=c[0]);throw{message:mxUtils.getTextContent(e)};}if("mxGraphModel"==
-b.nodeName){e=b.getAttribute("style")||"default-style2";if("1"==urlParams.embed||null!=e&&""!=e)e!=this.graph.currentStyle&&(c=null!=this.graph.themes?this.graph.themes[e]:mxUtils.load(STYLE_PATH+"/"+e+".xml").getDocumentElement(),null!=c&&(g=new mxCodec(c.ownerDocument),g.decode(c,this.graph.getStylesheet())));else if(c=null!=this.graph.themes?this.graph.themes["default-old"]:mxUtils.load(STYLE_PATH+"/default-old.xml").getDocumentElement(),null!=c){var g=new mxCodec(c.ownerDocument);g.decode(c,this.graph.getStylesheet())}this.graph.currentStyle=
-e;this.graph.mathEnabled="1"==urlParams.math||"1"==b.getAttribute("math");e=b.getAttribute("backgroundImage");null!=e?(e=JSON.parse(e),this.graph.setBackgroundImage(new mxImage(e.src,e.width,e.height))):this.graph.setBackgroundImage(null);mxClient.NO_FO=this.graph.mathEnabled?!0:this.originalNoForeignObject;this.graph.setShadowVisible("1"==b.getAttribute("shadow"),!1)}a.apply(this,arguments)}else throw{message:mxResources.get("notADiagramFile")||"Invalid data",toString:function(){return this.message}};
-};var d=Editor.prototype.getGraphXml;Editor.prototype.getGraphXml=function(b){b=null!=b?b:!0;var a=d.apply(this,arguments);null!=this.graph.currentStyle&&"default-style2"!=this.graph.currentStyle&&a.setAttribute("style",this.graph.currentStyle);null!=this.graph.backgroundImage&&a.setAttribute("backgroundImage",JSON.stringify(this.graph.backgroundImage));a.setAttribute("math",this.graph.mathEnabled?"1":"0");a.setAttribute("shadow",this.graph.shadowVisible?"1":"0");return a};Editor.prototype.isDataSvg=
-function(b){try{var a=mxUtils.parseXml(b).documentElement.getAttribute("content");if(null!=a&&(null!=a&&"<"!=a.charAt(0)&&"%"!=a.charAt(0)&&(a=unescape(window.atob?atob(a):Base64.decode(cont,a))),null!=a&&"%"==a.charAt(0)&&(a=decodeURIComponent(a)),null!=a&&0<a.length)){var e=mxUtils.parseXml(a).documentElement;return"mxfile"==e.nodeName||"mxGraphModel"==e.nodeName}}catch(p){}return!1};Editor.prototype.extractGraphModel=function(b,a){if(null!=b&&"undefined"!==typeof pako){var e=b.ownerDocument.getElementsByTagName("div"),
-c=[];if(null!=e&&0<e.length)for(var g=0;g<e.length;g++)if("mxgraph"==e[g].getAttribute("class")){c.push(e[g]);break}0<c.length&&(e=c[0].getAttribute("data-mxgraph"),null!=e?(c=JSON.parse(e),null!=c&&null!=c.xml&&(c=mxUtils.parseXml(c.xml),b=c.documentElement)):(c=c[0].getElementsByTagName("div"),0<c.length&&(e=mxUtils.getTextContent(c[0]),e=this.graph.decompress(e),0<e.length&&(c=mxUtils.parseXml(e),b=c.documentElement))))}if(null!=b&&"svg"==b.nodeName)if(e=b.getAttribute("content"),null!=e&&"<"!=
-e.charAt(0)&&"%"!=e.charAt(0)&&(e=unescape(window.atob?atob(e):Base64.decode(cont,e))),null!=e&&"%"==e.charAt(0)&&(e=decodeURIComponent(e)),null!=e&&0<e.length)b=mxUtils.parseXml(e).documentElement;else throw{message:mxResources.get("notADiagramFile")};null==b||a||(c=null,"diagram"==b.nodeName?c=b:"mxfile"==b.nodeName&&(e=b.getElementsByTagName("diagram"),0<e.length&&(c=e[Math.max(0,Math.min(e.length-1,urlParams.page||0))])),null!=c&&(e=this.graph.decompress(mxUtils.getTextContent(c)),null!=e&&0<
-e.length&&(b=mxUtils.parseXml(e).documentElement)));null==b||"mxGraphModel"==b.nodeName||a&&"mxfile"==b.nodeName||(b=null);return b};var f=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?!0:this.originalNoForeignObject;f.apply(this,arguments)};Editor.prototype.originalNoForeignObject=mxClient.NO_FO;var c=Editor.prototype.updateGraphComponents;Editor.prototype.updateGraphComponents=
-function(){c.apply(this,arguments);mxClient.NO_FO=this.graph.mathEnabled&&null!=Editor.MathJaxRender?!0:this.originalNoForeignObject};Editor.initMath=function(b,a){b=null!=b?b:"https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.0/MathJax.js?config=TeX-MML-AM_HTMLorMML";Editor.mathJaxQueue=[];Editor.doMathJaxRender=function(b){MathJax.Hub.Queue(["Typeset",MathJax.Hub,b])};window.MathJax={skipStartupTypeset:!0,showMathMenu:!1,messageStyle:"none",AuthorInit:function(){MathJax.Hub.Config(a||{jax:["input/TeX",
-"input/MathML","input/AsciiMath","output/HTML-CSS"],extensions:["tex2jax.js","mml2jax.js","asciimath2jax.js"],TeX:{extensions:["AMSmath.js","AMSsymbols.js","noErrors.js","noUndefined.js"]},tex2jax:{ignoreClass:"mxCellEditor"},asciimath2jax:{ignoreClass:"mxCellEditor"}});MathJax.Hub.Register.StartupHook("Begin",function(){for(var b=0;b<Editor.mathJaxQueue.length;b++)Editor.doMathJaxRender(Editor.mathJaxQueue[b])})}};Editor.MathJaxRender=function(b){"undefined"!==typeof MathJax&&"undefined"!==typeof MathJax.Hub?
-Editor.doMathJaxRender(b):Editor.mathJaxQueue.push(b)};Editor.MathJaxClear=function(){Editor.mathJaxQueue=[]};var e=Editor.prototype.init;Editor.prototype.init=function(){e.apply(this,arguments);this.graph.addListener(mxEvent.SIZE,mxUtils.bind(this,function(b,a){this.graph.mathEnabled&&Editor.MathJaxRender(this.graph.container)}))};var c=document.getElementsByTagName("script");if(null!=c&&0<c.length){var g=document.createElement("script");g.type="text/javascript";g.src=b;c[0].parentNode.appendChild(g)}};
-Editor.prototype.csvToArray=function(b){if(!/^\s*(?:'[^'\\]*(?:\\[\S\s][^'\\]*)*'|"[^"\\]*(?:\\[\S\s][^"\\]*)*"|[^,'"\s\\]*(?:\s+[^,'"\s\\]+)*)\s*(?:,\s*(?:'[^'\\]*(?:\\[\S\s][^'\\]*)*'|"[^"\\]*(?:\\[\S\s][^"\\]*)*"|[^,'"\s\\]*(?:\s+[^,'"\s\\]+)*)\s*)*$/.test(b))return null;var a=[];b.replace(/(?!\s*$)\s*(?:'([^'\\]*(?:\\[\S\s][^'\\]*)*)'|"([^"\\]*(?:\\[\S\s][^"\\]*)*)"|([^,'"\s\\]*(?:\s+[^,'"\s\\]+)*))\s*(?:,|$)/g,function(b,e,c,g){void 0!==e?a.push(e.replace(/\\'/g,"'")):void 0!==c?a.push(c.replace(/\\"/g,
-'"')):void 0!==g&&a.push(g);return""});/,\s*$/.test(b)&&a.push("");return a};if(window.ColorDialog){var h=ColorDialog.addRecentColor;ColorDialog.addRecentColor=function(b,a){h.apply(this,arguments);mxSettings.setRecentColors(ColorDialog.recentColors);mxSettings.save()};var k=ColorDialog.resetRecentColors;ColorDialog.resetRecentColors=function(){k.apply(this,arguments);mxSettings.setRecentColors(ColorDialog.recentColors);mxSettings.save()}}if(null!=window.StyleFormatPanel){var m=Format.prototype.init;
-Format.prototype.init=function(){m.apply(this,arguments);this.editorUi.editor.addListener("fileLoaded",this.update)};var n=Format.prototype.refresh;Format.prototype.refresh=function(){null!=this.editorUi.getCurrentFile()||"1"==urlParams.embed||this.editorUi.editor.chromeless?n.apply(this,arguments):this.clear()};var b=DiagramFormatPanel.prototype.addView;DiagramFormatPanel.prototype.addView=function(a){a=b.apply(this,arguments);if(mxClient.IS_SVG){var e=this.editorUi,c=e.editor.graph;a.appendChild(this.createOption(mxResources.get("shadow"),
-function(){return c.shadowVisible},function(b){c.setShadowVisible(!c.shadowVisible)},{install:function(b){this.listener=function(){b(c.shadowVisible)};e.addListener("shadowVisibleChanged",this.listener)},destroy:function(){e.removeListener(this.listener)}}))}return a};var e=DiagramFormatPanel.prototype.addOptions;DiagramFormatPanel.prototype.addOptions=function(b){b=e.apply(this,arguments);var a=this.editorUi;if(a.editor.graph.isEnabled()){var c=a.getCurrentFile();null!=c&&c.isAutosaveOptional()&&
-(c=this.createOption(mxResources.get("autosave"),function(){return a.editor.autosave},function(b){a.editor.setAutosave(b)},{install:function(b){this.listener=function(){b(a.editor.autosave)};a.editor.addListener("autosaveChanged",this.listener)},destroy:function(){a.editor.removeListener(this.listener)}}),b.appendChild(c))}return b};StyleFormatPanel.prototype.defaultColorSchemes=[[null,{fill:"#f5f5f5",stroke:"#666666"},{fill:"#dae8fc",stroke:"#6c8ebf"},{fill:"#d5e8d4",stroke:"#82b366"},{fill:"#ffe6cc",
-stroke:"#d79b00"},{fill:"#fff2cc",stroke:"#d6b656"},{fill:"#f8cecc",stroke:"#b85450"},{fill:"#e1d5e7",stroke:"#9673a6"}],[null,{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"}],[null,
-{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"}]];var g=StyleFormatPanel.prototype.init;StyleFormatPanel.prototype.init=function(){"image"!=this.format.createSelectionState().style.shape&&this.container.appendChild(this.addStyles(this.createPanel()));g.apply(this,arguments)};var l=StyleFormatPanel.prototype.addStyleOps;
-StyleFormatPanel.prototype.addStyleOps=function(b){var a=mxUtils.button(mxResources.get("copyStyle"),mxUtils.bind(this,function(b){this.editorUi.actions.get("copyStyle").funct()}));a.setAttribute("title",mxResources.get("copyStyle")+" ("+this.editorUi.actions.get("copyStyle").shortcut+")");a.style.marginBottom="2px";a.style.width="100px";a.style.marginRight="2px";b.appendChild(a);a=mxUtils.button(mxResources.get("pasteStyle"),mxUtils.bind(this,function(b){this.editorUi.actions.get("pasteStyle").funct()}));
-a.setAttribute("title",mxResources.get("pasteStyle")+" ("+this.editorUi.actions.get("pasteStyle").shortcut+")");a.style.marginBottom="2px";a.style.width="100px";b.appendChild(a);mxUtils.br(b);return l.apply(this,arguments)};StyleFormatPanel.prototype.addStyles=function(b){function a(b){function a(b){var a=mxUtils.button("",function(a){c.getModel().beginUpdate();try{var e=c.getSelectionCells();for(a=0;a<e.length;a++){for(var g=c.getModel().getStyle(e[a]),d=0;d<l.length;d++)g=mxUtils.removeStylename(g,
-l[d]);null!=b?(g=mxUtils.setStyle(g,mxConstants.STYLE_FILLCOLOR,b.fill),g=mxUtils.setStyle(g,mxConstants.STYLE_STROKECOLOR,b.stroke),g=mxUtils.setStyle(g,mxConstants.STYLE_GRADIENTCOLOR,b.gradient)):(g=mxUtils.setStyle(g,mxConstants.STYLE_FILLCOLOR,"#ffffff"),g=mxUtils.setStyle(g,mxConstants.STYLE_STROKECOLOR,"#000000"),g=mxUtils.setStyle(g,mxConstants.STYLE_GRADIENTCOLOR,null));c.getModel().setStyle(e[a],g)}}finally{c.getModel().endUpdate()}});a.className="geStyleButton";a.style.width="36px";a.style.height=
-"30px";a.style.margin="0px 6px 6px 0px";null!=b?(null!=b.gradient?mxClient.IS_IE&&(mxClient.IS_QUIRKS||10>document.documentMode)?a.style.filter="progid:DXImageTransform.Microsoft.Gradient(StartColorStr='"+b.fill+"', EndColorStr='"+b.gradient+"', GradientType=0)":a.style.backgroundImage="linear-gradient("+b.fill+" 0px,"+b.gradient+" 100%)":a.style.backgroundColor=b.fill,a.style.border="1px solid "+b.stroke):(a.style.backgroundColor="#ffffff",a.style.border="1px solid #000000");g.appendChild(a)}g.innerHTML=
-"";for(var e=0;e<b.length;e++)0<e&&0==mxUtils.mod(e,4)&&mxUtils.br(g),a(b[e])}function e(b){mxEvent.addListener(b,"mouseenter",function(){b.style.opacity="1"});mxEvent.addListener(b,"mouseleave",function(){b.style.opacity="0.5"})}var c=this.editorUi.editor.graph,g=document.createElement("div");g.style.whiteSpace="normal";g.style.paddingLeft="24px";g.style.paddingRight="20px";b.style.paddingLeft="16px";b.style.paddingBottom="6px";b.style.position="relative";b.appendChild(g);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".split(" ");
-null==this.editorUi.currentScheme&&(this.editorUi.currentScheme=0);var d=document.createElement("div");d.style.cssText="position:absolute;left:10px;top:8px;bottom:8px;width:20px;margin:4px;opacity:0.5;background-repeat:no-repeat;background-position:center center;background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAwAAAAQBAMAAADQT4M0AAAAIVBMVEUAAAB2dnZ4eHh3d3d1dXVxcXF2dnZ2dnZ2dnZxcXF2dnYmb3w1AAAACnRSTlMAfCTkhhvb7cQSPH2JPgAAADRJREFUCNdjwACMAmBKaiGYs2oJmLPKAZ3DabU8AMRTXpUKopislqFyVzCAuUZgikkBZjoAcMYLnp53P/UAAAAASUVORK5CYII=);";
+Editor.configure=function(b){if(null!=b){Menus.prototype.defaultFonts=b.defaultFonts||Menus.prototype.defaultFonts;ColorDialog.prototype.presetColors=b.presetColors||ColorDialog.prototype.presetColors;ColorDialog.prototype.defaultColors=b.defaultColors||ColorDialog.prototype.defaultColors;StyleFormatPanel.prototype.defaultColorSchemes=b.defaultColorSchemes||StyleFormatPanel.prototype.defaultColorSchemes;Graph.prototype.defaultEdgeLength=b.defaultEdgeLength||Graph.prototype.defaultEdgeLength;if(null!=
+b.css){var a=document.createElement("style");a.setAttribute("type","text/css");a.appendChild(document.createTextNode(b.css));var c=document.getElementsByTagName("script")[0];c.parentNode.insertBefore(a,c)}null!=b.defaultLibraries&&(Sidebar.prototype.defaultEntries=b.defaultLibraries);null!=b.defaultCustomLibraries&&(Editor.defaultCustomLibraries=b.defaultCustomLibraries);null!=b.defaultVertexStyle&&(Graph.prototype.defaultVertexStyle=b.defaultVertexStyle);null!=b.defaultEdgeStyle&&(Graph.prototype.defaultEdgeStyle=
+b.defaultEdgeStyle);b.emptyDiagramXml&&(EditorUi.prototype.emptyDiagramXml=b.emptyDiagramXml);b.thumbWidth&&(Sidebar.prototype.thumbWidth=b.thumbWidth);b.thumbHeight&&(Sidebar.prototype.thumbHeight=b.thumbHeight);b.emptyLibraryXml&&(EditorUi.prototype.emptyLibraryXml=b.emptyLibraryXml);b.sidebarWidth&&(EditorUi.prototype.hsplitPosition=b.sidebarWidth);b.fontCss&&(a=document.createElement("style"),a.setAttribute("type","text/css"),a.appendChild(document.createTextNode(b.fontCss)),c=document.getElementsByTagName("script")[0],
+c.parentNode.insertBefore(a,c),Editor.prototype.fontCss=b.fontCss);if(null!=b.plugins)for(App.initPluginCallback(),a=0;a<b.plugins.length;a++)mxscript(b.plugins[a])}};Editor.prototype.editButtonLink=null!=urlParams.edit?decodeURIComponent(urlParams.edit):null;var a=Editor.prototype.setGraphXml;Editor.prototype.setGraphXml=function(b){b=null!=b&&"mxlibrary"!=b.nodeName?this.extractGraphModel(b):null;if(null!=b){var c=b.getElementsByTagName("parsererror");if(null!=c&&0<c.length){var c=c[0],e=c.getElementsByTagName("div");
+null!=e&&0<e.length&&(c=e[0]);throw{message:mxUtils.getTextContent(c)};}if("mxGraphModel"==b.nodeName){c=b.getAttribute("style")||"default-style2";if("1"==urlParams.embed||null!=c&&""!=c)c!=this.graph.currentStyle&&(e=null!=this.graph.themes?this.graph.themes[c]:mxUtils.load(STYLE_PATH+"/"+c+".xml").getDocumentElement(),null!=e&&(g=new mxCodec(e.ownerDocument),g.decode(e,this.graph.getStylesheet())));else if(e=null!=this.graph.themes?this.graph.themes["default-old"]:mxUtils.load(STYLE_PATH+"/default-old.xml").getDocumentElement(),
+null!=e){var g=new mxCodec(e.ownerDocument);g.decode(e,this.graph.getStylesheet())}this.graph.currentStyle=c;this.graph.mathEnabled="1"==urlParams.math||"1"==b.getAttribute("math");c=b.getAttribute("backgroundImage");null!=c?(c=JSON.parse(c),this.graph.setBackgroundImage(new mxImage(c.src,c.width,c.height))):this.graph.setBackgroundImage(null);mxClient.NO_FO=this.graph.mathEnabled?!0:this.originalNoForeignObject;this.graph.setShadowVisible("1"==b.getAttribute("shadow"),!1)}a.apply(this,arguments)}else throw{message:mxResources.get("notADiagramFile")||
+"Invalid data",toString:function(){return this.message}};};var d=Editor.prototype.getGraphXml;Editor.prototype.getGraphXml=function(b){b=null!=b?b:!0;var a=d.apply(this,arguments);null!=this.graph.currentStyle&&"default-style2"!=this.graph.currentStyle&&a.setAttribute("style",this.graph.currentStyle);null!=this.graph.backgroundImage&&a.setAttribute("backgroundImage",JSON.stringify(this.graph.backgroundImage));a.setAttribute("math",this.graph.mathEnabled?"1":"0");a.setAttribute("shadow",this.graph.shadowVisible?
+"1":"0");return a};Editor.prototype.isDataSvg=function(b){try{var a=mxUtils.parseXml(b).documentElement.getAttribute("content");if(null!=a&&(null!=a&&"<"!=a.charAt(0)&&"%"!=a.charAt(0)&&(a=unescape(window.atob?atob(a):Base64.decode(cont,a))),null!=a&&"%"==a.charAt(0)&&(a=decodeURIComponent(a)),null!=a&&0<a.length)){var c=mxUtils.parseXml(a).documentElement;return"mxfile"==c.nodeName||"mxGraphModel"==c.nodeName}}catch(t){}return!1};Editor.prototype.extractGraphModel=function(b,a){if(null!=b&&"undefined"!==
+typeof pako){var c=b.ownerDocument.getElementsByTagName("div"),e=[];if(null!=c&&0<c.length)for(var g=0;g<c.length;g++)if("mxgraph"==c[g].getAttribute("class")){e.push(c[g]);break}0<e.length&&(c=e[0].getAttribute("data-mxgraph"),null!=c?(e=JSON.parse(c),null!=e&&null!=e.xml&&(e=mxUtils.parseXml(e.xml),b=e.documentElement)):(e=e[0].getElementsByTagName("div"),0<e.length&&(c=mxUtils.getTextContent(e[0]),c=this.graph.decompress(c),0<c.length&&(e=mxUtils.parseXml(c),b=e.documentElement))))}if(null!=b&&
+"svg"==b.nodeName)if(c=b.getAttribute("content"),null!=c&&"<"!=c.charAt(0)&&"%"!=c.charAt(0)&&(c=unescape(window.atob?atob(c):Base64.decode(cont,c))),null!=c&&"%"==c.charAt(0)&&(c=decodeURIComponent(c)),null!=c&&0<c.length)b=mxUtils.parseXml(c).documentElement;else throw{message:mxResources.get("notADiagramFile")};null==b||a||(e=null,"diagram"==b.nodeName?e=b:"mxfile"==b.nodeName&&(c=b.getElementsByTagName("diagram"),0<c.length&&(e=c[Math.max(0,Math.min(c.length-1,urlParams.page||0))])),null!=e&&
+(c=this.graph.decompress(mxUtils.getTextContent(e)),null!=c&&0<c.length&&(b=mxUtils.parseXml(c).documentElement)));null==b||"mxGraphModel"==b.nodeName||a&&"mxfile"==b.nodeName||(b=null);return b};var f=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?!0:this.originalNoForeignObject;f.apply(this,arguments)};Editor.prototype.originalNoForeignObject=mxClient.NO_FO;
+var c=Editor.prototype.updateGraphComponents;Editor.prototype.updateGraphComponents=function(){c.apply(this,arguments);mxClient.NO_FO=this.graph.mathEnabled&&null!=Editor.MathJaxRender?!0:this.originalNoForeignObject};Editor.initMath=function(b,a){b=null!=b?b:"https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.0/MathJax.js?config=TeX-MML-AM_HTMLorMML";Editor.mathJaxQueue=[];Editor.doMathJaxRender=function(b){MathJax.Hub.Queue(["Typeset",MathJax.Hub,b])};window.MathJax={skipStartupTypeset:!0,showMathMenu:!1,
+messageStyle:"none",AuthorInit:function(){MathJax.Hub.Config(a||{jax:["input/TeX","input/MathML","input/AsciiMath","output/HTML-CSS"],extensions:["tex2jax.js","mml2jax.js","asciimath2jax.js"],TeX:{extensions:["AMSmath.js","AMSsymbols.js","noErrors.js","noUndefined.js"]},tex2jax:{ignoreClass:"mxCellEditor"},asciimath2jax:{ignoreClass:"mxCellEditor"}});MathJax.Hub.Register.StartupHook("Begin",function(){for(var b=0;b<Editor.mathJaxQueue.length;b++)Editor.doMathJaxRender(Editor.mathJaxQueue[b])})}};
+Editor.MathJaxRender=function(b){"undefined"!==typeof MathJax&&"undefined"!==typeof MathJax.Hub?Editor.doMathJaxRender(b):Editor.mathJaxQueue.push(b)};Editor.MathJaxClear=function(){Editor.mathJaxQueue=[]};var c=Editor.prototype.init;Editor.prototype.init=function(){c.apply(this,arguments);this.graph.addListener(mxEvent.SIZE,mxUtils.bind(this,function(b,a){this.graph.mathEnabled&&Editor.MathJaxRender(this.graph.container)}))};var e=document.getElementsByTagName("script");if(null!=e&&0<e.length){var g=
+document.createElement("script");g.type="text/javascript";g.src=b;e[0].parentNode.appendChild(g)}};Editor.prototype.csvToArray=function(b){if(!/^\s*(?:'[^'\\]*(?:\\[\S\s][^'\\]*)*'|"[^"\\]*(?:\\[\S\s][^"\\]*)*"|[^,'"\s\\]*(?:\s+[^,'"\s\\]+)*)\s*(?:,\s*(?:'[^'\\]*(?:\\[\S\s][^'\\]*)*'|"[^"\\]*(?:\\[\S\s][^"\\]*)*"|[^,'"\s\\]*(?:\s+[^,'"\s\\]+)*)\s*)*$/.test(b))return null;var a=[];b.replace(/(?!\s*$)\s*(?:'([^'\\]*(?:\\[\S\s][^'\\]*)*)'|"([^"\\]*(?:\\[\S\s][^"\\]*)*)"|([^,'"\s\\]*(?:\s+[^,'"\s\\]+)*))\s*(?:,|$)/g,
+function(b,c,e,g){void 0!==c?a.push(c.replace(/\\'/g,"'")):void 0!==e?a.push(e.replace(/\\"/g,'"')):void 0!==g&&a.push(g);return""});/,\s*$/.test(b)&&a.push("");return a};if(window.ColorDialog){var h=ColorDialog.addRecentColor;ColorDialog.addRecentColor=function(b,a){h.apply(this,arguments);mxSettings.setRecentColors(ColorDialog.recentColors);mxSettings.save()};var k=ColorDialog.resetRecentColors;ColorDialog.resetRecentColors=function(){k.apply(this,arguments);mxSettings.setRecentColors(ColorDialog.recentColors);
+mxSettings.save()}}if(null!=window.StyleFormatPanel){var m=Format.prototype.init;Format.prototype.init=function(){m.apply(this,arguments);this.editorUi.editor.addListener("fileLoaded",this.update)};var n=Format.prototype.refresh;Format.prototype.refresh=function(){null!=this.editorUi.getCurrentFile()||"1"==urlParams.embed||this.editorUi.editor.chromeless?n.apply(this,arguments):this.clear()};var b=DiagramFormatPanel.prototype.addView;DiagramFormatPanel.prototype.addView=function(a){a=b.apply(this,
+arguments);if(mxClient.IS_SVG){var c=this.editorUi,e=c.editor.graph;a.appendChild(this.createOption(mxResources.get("shadow"),function(){return e.shadowVisible},function(b){e.setShadowVisible(!e.shadowVisible)},{install:function(b){this.listener=function(){b(e.shadowVisible)};c.addListener("shadowVisibleChanged",this.listener)},destroy:function(){c.removeListener(this.listener)}}))}return a};var e=DiagramFormatPanel.prototype.addOptions;DiagramFormatPanel.prototype.addOptions=function(b){b=e.apply(this,
+arguments);var a=this.editorUi;if(a.editor.graph.isEnabled()){var c=a.getCurrentFile();null!=c&&c.isAutosaveOptional()&&(c=this.createOption(mxResources.get("autosave"),function(){return a.editor.autosave},function(b){a.editor.setAutosave(b)},{install:function(b){this.listener=function(){b(a.editor.autosave)};a.editor.addListener("autosaveChanged",this.listener)},destroy:function(){a.editor.removeListener(this.listener)}}),b.appendChild(c))}return b};StyleFormatPanel.prototype.defaultColorSchemes=
+[[null,{fill:"#f5f5f5",stroke:"#666666"},{fill:"#dae8fc",stroke:"#6c8ebf"},{fill:"#d5e8d4",stroke:"#82b366"},{fill:"#ffe6cc",stroke:"#d79b00"},{fill:"#fff2cc",stroke:"#d6b656"},{fill:"#f8cecc",stroke:"#b85450"},{fill:"#e1d5e7",stroke:"#9673a6"}],[null,{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"}],[null,{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"}]];var g=StyleFormatPanel.prototype.init;StyleFormatPanel.prototype.init=function(){"image"!=this.format.createSelectionState().style.shape&&this.container.appendChild(this.addStyles(this.createPanel()));
+g.apply(this,arguments)};var l=StyleFormatPanel.prototype.addStyleOps;StyleFormatPanel.prototype.addStyleOps=function(b){var a=mxUtils.button(mxResources.get("copyStyle"),mxUtils.bind(this,function(b){this.editorUi.actions.get("copyStyle").funct()}));a.setAttribute("title",mxResources.get("copyStyle")+" ("+this.editorUi.actions.get("copyStyle").shortcut+")");a.style.marginBottom="2px";a.style.width="100px";a.style.marginRight="2px";b.appendChild(a);a=mxUtils.button(mxResources.get("pasteStyle"),mxUtils.bind(this,
+function(b){this.editorUi.actions.get("pasteStyle").funct()}));a.setAttribute("title",mxResources.get("pasteStyle")+" ("+this.editorUi.actions.get("pasteStyle").shortcut+")");a.style.marginBottom="2px";a.style.width="100px";b.appendChild(a);mxUtils.br(b);return l.apply(this,arguments)};StyleFormatPanel.prototype.addStyles=function(b){function a(b){function a(b){var a=mxUtils.button("",function(a){e.getModel().beginUpdate();try{var c=e.getSelectionCells();for(a=0;a<c.length;a++){for(var g=e.getModel().getStyle(c[a]),
+d=0;d<l.length;d++)g=mxUtils.removeStylename(g,l[d]);null!=b?(g=mxUtils.setStyle(g,mxConstants.STYLE_FILLCOLOR,b.fill),g=mxUtils.setStyle(g,mxConstants.STYLE_STROKECOLOR,b.stroke),g=mxUtils.setStyle(g,mxConstants.STYLE_GRADIENTCOLOR,b.gradient)):(g=mxUtils.setStyle(g,mxConstants.STYLE_FILLCOLOR,"#ffffff"),g=mxUtils.setStyle(g,mxConstants.STYLE_STROKECOLOR,"#000000"),g=mxUtils.setStyle(g,mxConstants.STYLE_GRADIENTCOLOR,null));e.getModel().setStyle(c[a],g)}}finally{e.getModel().endUpdate()}});a.className=
+"geStyleButton";a.style.width="36px";a.style.height="30px";a.style.margin="0px 6px 6px 0px";null!=b?(null!=b.gradient?mxClient.IS_IE&&(mxClient.IS_QUIRKS||10>document.documentMode)?a.style.filter="progid:DXImageTransform.Microsoft.Gradient(StartColorStr='"+b.fill+"', EndColorStr='"+b.gradient+"', GradientType=0)":a.style.backgroundImage="linear-gradient("+b.fill+" 0px,"+b.gradient+" 100%)":a.style.backgroundColor=b.fill,a.style.border="1px solid "+b.stroke):(a.style.backgroundColor="#ffffff",a.style.border=
+"1px solid #000000");g.appendChild(a)}g.innerHTML="";for(var c=0;c<b.length;c++)0<c&&0==mxUtils.mod(c,4)&&mxUtils.br(g),a(b[c])}function c(b){mxEvent.addListener(b,"mouseenter",function(){b.style.opacity="1"});mxEvent.addListener(b,"mouseleave",function(){b.style.opacity="0.5"})}var e=this.editorUi.editor.graph,g=document.createElement("div");g.style.whiteSpace="normal";g.style.paddingLeft="24px";g.style.paddingRight="20px";b.style.paddingLeft="16px";b.style.paddingBottom="6px";b.style.position="relative";
+b.appendChild(g);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".split(" ");null==this.editorUi.currentScheme&&(this.editorUi.currentScheme=0);var d=document.createElement("div");d.style.cssText="position:absolute;left:10px;top:8px;bottom:8px;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(d,"click",mxUtils.bind(this,function(){this.editorUi.currentScheme=mxUtils.mod(this.editorUi.currentScheme-1,this.defaultColorSchemes.length);a(this.defaultColorSchemes[this.editorUi.currentScheme])}));var f=document.createElement("div");f.style.cssText="position:absolute;left:202px;top:8px;bottom:8px;width:20px;margin:4px;opacity:0.5;background-repeat:no-repeat;background-position:center center;background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAwAAAAQBAMAAADQT4M0AAAAIVBMVEUAAAB2dnZ2dnZ2dnZ2dnZ2dnZ2dnZ2dnZ2dnZ2dnZ2dnYBuwCcAAAACnRSTlMAfCTkhhvb7cQSPH2JPgAAADZJREFUCNdjQAOMAmBKaiGY8loF5rKswsZlrVo8AUiFrTICcbIWK8A5DF1gDoMymMPApIAwHwCS0Qx/U7qCBQAAAABJRU5ErkJggg==);";
-1<this.defaultColorSchemes.length&&(b.appendChild(d),b.appendChild(f));mxEvent.addListener(f,"click",mxUtils.bind(this,function(){this.editorUi.currentScheme=mxUtils.mod(this.editorUi.currentScheme+1,this.defaultColorSchemes.length);a(this.defaultColorSchemes[this.editorUi.currentScheme])}));e(d);e(f);a(this.defaultColorSchemes[this.editorUi.currentScheme]);return b};StyleFormatPanel.prototype.addEditOps=function(b){var a=this.format.getSelectionState(),e=null;1==this.editorUi.editor.graph.getSelectionCount()&&
-(e=mxUtils.button(mxResources.get("editStyle"),mxUtils.bind(this,function(b){this.editorUi.actions.get("editStyle").funct()})),e.setAttribute("title",mxResources.get("editStyle")+" ("+this.editorUi.actions.get("editStyle").shortcut+")"),e.style.width="202px",e.style.marginBottom="2px",b.appendChild(e));var c=this.editorUi.editor.graph,g=c.view.getState(c.getSelectionCell());1==c.getSelectionCount()&&null!=g&&null!=g.shape&&null!=g.shape.stencil?(a=mxUtils.button(mxResources.get("editShape"),mxUtils.bind(this,
-function(b){this.editorUi.actions.get("editShape").funct()})),a.setAttribute("title",mxResources.get("editShape")),a.style.marginBottom="2px",null==e?a.style.width="202px":(e.style.width="100px",a.style.width="100px",a.style.marginLeft="2px"),b.appendChild(a)):a.image&&(a=mxUtils.button(mxResources.get("editImage"),mxUtils.bind(this,function(b){this.editorUi.actions.get("image").funct()})),a.setAttribute("title",mxResources.get("editImage")),a.style.marginBottom="2px",null==e?a.style.width="202px":
-(e.style.width="100px",a.style.width="100px",a.style.marginLeft="2px"),b.appendChild(a));return b}}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.edgeMode="move"!=urlParams.edge;var q=Graph.prototype.init;Graph.prototype.init=function(){function b(b){a=b;if(mxClient.IS_QUIRKS||
-7==document.documentMode||8==document.documentMode)a=mxUtils.clone(b)}q.apply(this,arguments);var a=null;mxEvent.addListener(this.container,"mouseenter",b);mxEvent.addListener(this.container,"mousemove",b);mxEvent.addListener(this.container,"mouseleave",function(b){a=null});this.isMouseInsertPoint=function(){return null!=a};var e=this.getInsertPoint;this.getInsertPoint=function(){return null!=a?this.getPointForEvent(a):e.apply(this,arguments)};var c=this.layoutManager.getLayout;this.layoutManager.getLayout=
-function(b){var a=this.graph.view.getState(b),a=null!=a?a.style:this.graph.getCellStyle(b);if("undefined"!=typeof mxRackContainer&&"rack"==a.childLayout){var e=new mxStackLayout(this.graph,!1);e.setChildGeometry=function(b,a){a.height=Math.max(a.height,20);if(1<a.height/20){var e=a.height%20;a.height+=10<e?20-e:-e}this.graph.getModel().setGeometry(b,a)};e.fill=!0;e.unitSize=mxRackContainer.unitSize|20;e.marginLeft=a.marginLeft||0;e.marginRight=a.marginRight||0;e.marginTop=a.marginTop||0;e.marginBottom=
-a.marginBottom||0;e.resizeParent=!1;return e}return c.apply(this,arguments)}};var v=Graph.prototype.loadStylesheet;Graph.prototype.loadStylesheet=function(){v.apply(this,arguments);this.currentStyle="default-style2"};Graph.prototype.isPageLink=function(b){return null!=b&&"data:page/"==b.substring(0,10)};Graph.prototype.addSvgShadow=function(b,a,e){e=null!=e?e:!1;var c=b.ownerDocument,g=null!=c.createElementNS?c.createElementNS(mxConstants.NS_SVG,"filter"):c.createElement("filter");g.setAttribute("id",
-this.shadowId);var l=null!=c.createElementNS?c.createElementNS(mxConstants.NS_SVG,"feGaussianBlur"):c.createElement("feGaussianBlur");l.setAttribute("in","SourceAlpha");l.setAttribute("stdDeviation","1.7");l.setAttribute("result","blur");g.appendChild(l);l=null!=c.createElementNS?c.createElementNS(mxConstants.NS_SVG,"feOffset"):c.createElement("feOffset");l.setAttribute("in","blur");l.setAttribute("dx","3");l.setAttribute("dy","3");l.setAttribute("result","offsetBlur");g.appendChild(l);l=null!=c.createElementNS?
-c.createElementNS(mxConstants.NS_SVG,"feFlood"):c.createElement("feFlood");l.setAttribute("flood-color","#3D4574");l.setAttribute("flood-opacity","0.4");l.setAttribute("result","offsetColor");g.appendChild(l);l=null!=c.createElementNS?c.createElementNS(mxConstants.NS_SVG,"feComposite"):c.createElement("feComposite");l.setAttribute("in","offsetColor");l.setAttribute("in2","offsetBlur");l.setAttribute("operator","in");l.setAttribute("result","offsetBlur");g.appendChild(l);l=null!=c.createElementNS?
-c.createElementNS(mxConstants.NS_SVG,"feBlend"):c.createElement("feBlend");l.setAttribute("in","SourceGraphic");l.setAttribute("in2","offsetBlur");g.appendChild(l);l=b.getElementsByTagName("defs");0==l.length?(c=null!=c.createElementNS?c.createElementNS(mxConstants.NS_SVG,"defs"):c.createElement("defs"),null!=b.firstChild?b.insertBefore(c,b.firstChild):b.appendChild(c)):c=l[0];c.appendChild(g);e||((a||b.getElementsByTagName("g")[0]).setAttribute("filter","url(#"+this.shadowId+")"),isNaN(parseInt(b.getAttribute("width")))||
+1<this.defaultColorSchemes.length&&(b.appendChild(d),b.appendChild(f));mxEvent.addListener(f,"click",mxUtils.bind(this,function(){this.editorUi.currentScheme=mxUtils.mod(this.editorUi.currentScheme+1,this.defaultColorSchemes.length);a(this.defaultColorSchemes[this.editorUi.currentScheme])}));c(d);c(f);a(this.defaultColorSchemes[this.editorUi.currentScheme]);return b};StyleFormatPanel.prototype.addEditOps=function(b){var a=this.format.getSelectionState(),c=null;1==this.editorUi.editor.graph.getSelectionCount()&&
+(c=mxUtils.button(mxResources.get("editStyle"),mxUtils.bind(this,function(b){this.editorUi.actions.get("editStyle").funct()})),c.setAttribute("title",mxResources.get("editStyle")+" ("+this.editorUi.actions.get("editStyle").shortcut+")"),c.style.width="202px",c.style.marginBottom="2px",b.appendChild(c));var e=this.editorUi.editor.graph,g=e.view.getState(e.getSelectionCell());1==e.getSelectionCount()&&null!=g&&null!=g.shape&&null!=g.shape.stencil?(a=mxUtils.button(mxResources.get("editShape"),mxUtils.bind(this,
+function(b){this.editorUi.actions.get("editShape").funct()})),a.setAttribute("title",mxResources.get("editShape")),a.style.marginBottom="2px",null==c?a.style.width="202px":(c.style.width="100px",a.style.width="100px",a.style.marginLeft="2px"),b.appendChild(a)):a.image&&(a=mxUtils.button(mxResources.get("editImage"),mxUtils.bind(this,function(b){this.editorUi.actions.get("image").funct()})),a.setAttribute("title",mxResources.get("editImage")),a.style.marginBottom="2px",null==c?a.style.width="202px":
+(c.style.width="100px",a.style.width="100px",a.style.marginLeft="2px"),b.appendChild(a));return b}}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.edgeMode="move"!=urlParams.edge;var p=Graph.prototype.init;Graph.prototype.init=function(){function b(b){a=b;if(mxClient.IS_QUIRKS||
+7==document.documentMode||8==document.documentMode)a=mxUtils.clone(b)}p.apply(this,arguments);var a=null;mxEvent.addListener(this.container,"mouseenter",b);mxEvent.addListener(this.container,"mousemove",b);mxEvent.addListener(this.container,"mouseleave",function(b){a=null});this.isMouseInsertPoint=function(){return null!=a};var c=this.getInsertPoint;this.getInsertPoint=function(){return null!=a?this.getPointForEvent(a):c.apply(this,arguments)};var e=this.layoutManager.getLayout;this.layoutManager.getLayout=
+function(b){var a=this.graph.view.getState(b),a=null!=a?a.style:this.graph.getCellStyle(b);if("undefined"!=typeof mxRackContainer&&"rack"==a.childLayout){var c=new mxStackLayout(this.graph,!1);c.setChildGeometry=function(b,a){a.height=Math.max(a.height,20);if(1<a.height/20){var c=a.height%20;a.height+=10<c?20-c:-c}this.graph.getModel().setGeometry(b,a)};c.fill=!0;c.unitSize=mxRackContainer.unitSize|20;c.marginLeft=a.marginLeft||0;c.marginRight=a.marginRight||0;c.marginTop=a.marginTop||0;c.marginBottom=
+a.marginBottom||0;c.resizeParent=!1;return c}return e.apply(this,arguments)}};var u=Graph.prototype.loadStylesheet;Graph.prototype.loadStylesheet=function(){u.apply(this,arguments);this.currentStyle="default-style2"};Graph.prototype.isPageLink=function(b){return null!=b&&"data:page/"==b.substring(0,10)};Graph.prototype.addSvgShadow=function(b,a,c){c=null!=c?c:!1;var e=b.ownerDocument,g=null!=e.createElementNS?e.createElementNS(mxConstants.NS_SVG,"filter"):e.createElement("filter");g.setAttribute("id",
+this.shadowId);var l=null!=e.createElementNS?e.createElementNS(mxConstants.NS_SVG,"feGaussianBlur"):e.createElement("feGaussianBlur");l.setAttribute("in","SourceAlpha");l.setAttribute("stdDeviation","1.7");l.setAttribute("result","blur");g.appendChild(l);l=null!=e.createElementNS?e.createElementNS(mxConstants.NS_SVG,"feOffset"):e.createElement("feOffset");l.setAttribute("in","blur");l.setAttribute("dx","3");l.setAttribute("dy","3");l.setAttribute("result","offsetBlur");g.appendChild(l);l=null!=e.createElementNS?
+e.createElementNS(mxConstants.NS_SVG,"feFlood"):e.createElement("feFlood");l.setAttribute("flood-color","#3D4574");l.setAttribute("flood-opacity","0.4");l.setAttribute("result","offsetColor");g.appendChild(l);l=null!=e.createElementNS?e.createElementNS(mxConstants.NS_SVG,"feComposite"):e.createElement("feComposite");l.setAttribute("in","offsetColor");l.setAttribute("in2","offsetBlur");l.setAttribute("operator","in");l.setAttribute("result","offsetBlur");g.appendChild(l);l=null!=e.createElementNS?
+e.createElementNS(mxConstants.NS_SVG,"feBlend"):e.createElement("feBlend");l.setAttribute("in","SourceGraphic");l.setAttribute("in2","offsetBlur");g.appendChild(l);l=b.getElementsByTagName("defs");0==l.length?(e=null!=e.createElementNS?e.createElementNS(mxConstants.NS_SVG,"defs"):e.createElement("defs"),null!=b.firstChild?b.insertBefore(e,b.firstChild):b.appendChild(e)):e=l[0];e.appendChild(g);c||((a||b.getElementsByTagName("g")[0]).setAttribute("filter","url(#"+this.shadowId+")"),isNaN(parseInt(b.getAttribute("width")))||
 (b.setAttribute("width",parseInt(b.getAttribute("width"))+6),b.setAttribute("height",parseInt(b.getAttribute("height"))+6)));return g};Graph.prototype.setShadowVisible=function(b,a){mxClient.IS_SVG&&(a=null!=a?a:!0,(this.shadowVisible=b)?this.view.getDrawPane().setAttribute("filter","url(#"+this.shadowId+")"):this.view.getDrawPane().removeAttribute("filter"),a&&this.fireEvent(new mxEventObject("shadowVisibleChanged")))};Graph.prototype.selectUnlockedLayer=function(){if(null==this.defaultParent){var b=
-this.model.getChildCount(this.model.root),a,e=0;do a=this.model.getChildAt(this.model.root,e);while(e++<b&&"1"==mxUtils.getValue(this.getCellStyle(a),"locked","0"));null!=a&&this.setDefaultParent(a)}};mxStencilRegistry.libraries.mockup=[SHAPES_PATH+"/mockup/mxMockupButtons.js"];mxStencilRegistry.libraries.arrows2=[SHAPES_PATH+"/mxArrows.js"];mxStencilRegistry.libraries.atlassian=[STENCIL_PATH+"/atlassian.xml"];mxStencilRegistry.libraries.bpmn=[SHAPES_PATH+"/bpmn/mxBpmnShape2.js",STENCIL_PATH+"/bpmn.xml"];
+this.model.getChildCount(this.model.root),a,c=0;do a=this.model.getChildAt(this.model.root,c);while(c++<b&&"1"==mxUtils.getValue(this.getCellStyle(a),"locked","0"));null!=a&&this.setDefaultParent(a)}};mxStencilRegistry.libraries.mockup=[SHAPES_PATH+"/mockup/mxMockupButtons.js"];mxStencilRegistry.libraries.arrows2=[SHAPES_PATH+"/mxArrows.js"];mxStencilRegistry.libraries.atlassian=[STENCIL_PATH+"/atlassian.xml"];mxStencilRegistry.libraries.bpmn=[SHAPES_PATH+"/bpmn/mxBpmnShape2.js",STENCIL_PATH+"/bpmn.xml"];
 mxStencilRegistry.libraries.er=[SHAPES_PATH+"/er/mxER.js"];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/transmission"]=[SHAPES_PATH+"/mxElectrical.js",STENCIL_PATH+"/electrical/transmission.xml"];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",STENCIL_PATH+"/bootstrap.xml"];mxStencilRegistry.libraries.gmdl=[SHAPES_PATH+"/mxGmdl.js",STENCIL_PATH+"/gmdl.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.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(b){var a=null;null!=b&&0<b.length&&("ER"==b.substring(0,2)?a="mxgraph.er":"sysML"==b.substring(0,5)&&(a="mxgraph.sysml"));return a};
-var u=mxMarker.createMarker;mxMarker.createMarker=function(b,a,e,c,g,l,d,f,q,h){if(null!=e&&null==mxMarker.markers[e]){var p=this.getPackageForType(e);null!=p&&mxStencilRegistry.getStencil(p)}return u.apply(this,arguments)};PrintDialog.prototype.create=function(b,a){function e(){v.value=Math.max(1,Math.min(f,Math.max(parseInt(v.value),parseInt(m.value))));m.value=Math.max(1,Math.min(f,Math.min(parseInt(v.value),parseInt(m.value))))}function c(a){function e(a,e,g){var l=a.getGraphBounds(),d=0,f=0,
-p=V.get(),q=1/a.pageScale,h=M.checked;if(h)var q=parseInt(P.value),k=parseInt(T.value),q=Math.min(p.height*k/(l.height/a.view.scale),p.width*q/(l.width/a.view.scale));else q=parseInt(y.value)/(100*a.pageScale),isNaN(q)&&(c=1/a.pageScale,y.value="100 %");p=mxRectangle.fromRectangle(p);p.width=Math.ceil(p.width*c);p.height=Math.ceil(p.height*c);q*=c;!h&&a.pageVisible?(l=a.getPageLayout(),d-=l.x*p.width,f-=l.y*p.height):h=!0;if(null==e){e=PrintDialog.createPrintPreview(a,q,p,0,d,f,h);e.pageSelector=
-!1;e.mathEnabled=!1;a=b.getCurrentFile();null!=a&&(e.title=a.getTitle());var t=e.writeHead;e.writeHead=function(a){t.apply(this,arguments);null!=b.editor.fontCss&&(a.writeln('<style type="text/css">'),a.writeln(b.editor.fontCss),a.writeln("</style>"))};if("undefined"!==typeof MathJax){var m=e.renderPage;e.renderPage=function(b,a,e,c,g,l){var d=m.apply(this,arguments);this.graph.mathEnabled?this.mathEnabled=!0:d.className="geDisableMathJax";return d}}e.open(null,null,g,!0)}else{p=a.background;if(null==
-p||""==p||p==mxConstants.NONE)p="#ffffff";e.backgroundColor=p;e.autoOrigin=h;e.appendGraph(a,q,d,f,g,!0)}return e}var c=parseInt(U.value)/100;isNaN(c)&&(c=1,U.value="100 %");var c=.75*c,l=m.value,d=v.value,f=!t.checked,p=null;f&&(f=l==q&&d==q);if(!f&&null!=b.pages&&b.pages.length){var h=0,f=b.pages.length-1;t.checked||(h=parseInt(l)-1,f=parseInt(d)-1);for(var k=h;k<=f;k++){var u=b.pages[k],l=u==b.currentPage?g:null;if(null==l){var l=b.createTemporaryGraph(g.getStylesheet()),d=!0,h=!1,w=null,n=null;
-null==u.viewState&&null==u.mapping&&null==u.root&&b.updatePageRoot(u);null!=u.viewState?(d=u.viewState.pageVisible,h=u.viewState.mathEnabled,w=u.viewState.background,n=u.viewState.backgroundImage):null!=u.mapping&&null!=u.mapping.diagramMap&&(h="0"!=u.mapping.diagramMap.get("mathEnabled"),w=u.mapping.diagramMap.get("background"),n=u.mapping.diagramMap.get("backgroundImage"),n=null!=n&&0<n.length?JSON.parse(n):null);l.background=w;l.backgroundImage=null!=n?new mxImage(n.src,n.width,n.height):null;
-l.pageVisible=d;l.mathEnabled=h;var A=l.getGlobalVariable;l.getGlobalVariable=function(b){return"page"==b?u.getName():"pagenumber"==b?k+1:A.apply(this,arguments)};document.body.appendChild(l.container);b.updatePageRoot(u);l.model.setRoot(u.root)}p=e(l,p,k!=f);l!=g&&l.container.parentNode.removeChild(l.container)}}else p=e(g);p.mathEnabled&&(f=p.wnd.document,f.writeln('<script type="text/x-mathjax-config">'),f.writeln("MathJax.Hub.Config({"),f.writeln('messageStyle: "none",'),f.writeln('jax: ["input/TeX", "input/MathML", "input/AsciiMath", "output/HTML-CSS"],'),
+var v=mxMarker.createMarker;mxMarker.createMarker=function(b,a,c,e,g,l,d,f,p,h){if(null!=c&&null==mxMarker.markers[c]){var t=this.getPackageForType(c);null!=t&&mxStencilRegistry.getStencil(t)}return v.apply(this,arguments)};PrintDialog.prototype.create=function(b,a){function c(){v.value=Math.max(1,Math.min(f,Math.max(parseInt(v.value),parseInt(m.value))));m.value=Math.max(1,Math.min(f,Math.min(parseInt(v.value),parseInt(m.value))))}function e(a){function c(a,c,g){var l=a.getGraphBounds(),d=0,f=0,
+p=V.get(),t=1/a.pageScale,h=M.checked;if(h)var t=parseInt(P.value),q=parseInt(T.value),t=Math.min(p.height*q/(l.height/a.view.scale),p.width*t/(l.width/a.view.scale));else t=parseInt(x.value)/(100*a.pageScale),isNaN(t)&&(e=1/a.pageScale,x.value="100 %");p=mxRectangle.fromRectangle(p);p.width=Math.ceil(p.width*e);p.height=Math.ceil(p.height*e);t*=e;!h&&a.pageVisible?(l=a.getPageLayout(),d-=l.x*p.width,f-=l.y*p.height):h=!0;if(null==c){c=PrintDialog.createPrintPreview(a,t,p,0,d,f,h);c.pageSelector=
+!1;c.mathEnabled=!1;a=b.getCurrentFile();null!=a&&(c.title=a.getTitle());var k=c.writeHead;c.writeHead=function(a){k.apply(this,arguments);null!=b.editor.fontCss&&(a.writeln('<style type="text/css">'),a.writeln(b.editor.fontCss),a.writeln("</style>"))};if("undefined"!==typeof MathJax){var m=c.renderPage;c.renderPage=function(b,a,c,e,g,l){var d=m.apply(this,arguments);this.graph.mathEnabled?this.mathEnabled=!0:d.className="geDisableMathJax";return d}}c.open(null,null,g,!0)}else{p=a.background;if(null==
+p||""==p||p==mxConstants.NONE)p="#ffffff";c.backgroundColor=p;c.autoOrigin=h;c.appendGraph(a,t,d,f,g,!0)}return c}var e=parseInt(U.value)/100;isNaN(e)&&(e=1,U.value="100 %");var e=.75*e,l=m.value,d=v.value,f=!q.checked,t=null;f&&(f=l==p&&d==p);if(!f&&null!=b.pages&&b.pages.length){var h=0,f=b.pages.length-1;q.checked||(h=parseInt(l)-1,f=parseInt(d)-1);for(var k=h;k<=f;k++){var w=b.pages[k],l=w==b.currentPage?g:null;if(null==l){var l=b.createTemporaryGraph(g.getStylesheet()),d=!0,h=!1,u=null,n=null;
+null==w.viewState&&null==w.mapping&&null==w.root&&b.updatePageRoot(w);null!=w.viewState?(d=w.viewState.pageVisible,h=w.viewState.mathEnabled,u=w.viewState.background,n=w.viewState.backgroundImage):null!=w.mapping&&null!=w.mapping.diagramMap&&(h="0"!=w.mapping.diagramMap.get("mathEnabled"),u=w.mapping.diagramMap.get("background"),n=w.mapping.diagramMap.get("backgroundImage"),n=null!=n&&0<n.length?JSON.parse(n):null);l.background=u;l.backgroundImage=null!=n?new mxImage(n.src,n.width,n.height):null;
+l.pageVisible=d;l.mathEnabled=h;var A=l.getGlobalVariable;l.getGlobalVariable=function(b){return"page"==b?w.getName():"pagenumber"==b?k+1:A.apply(this,arguments)};document.body.appendChild(l.container);b.updatePageRoot(w);l.model.setRoot(w.root)}t=c(l,t,k!=f);l!=g&&l.container.parentNode.removeChild(l.container)}}else t=c(g);t.mathEnabled&&(f=t.wnd.document,f.writeln('<script type="text/x-mathjax-config">'),f.writeln("MathJax.Hub.Config({"),f.writeln('messageStyle: "none",'),f.writeln('jax: ["input/TeX", "input/MathML", "input/AsciiMath", "output/HTML-CSS"],'),
 f.writeln('extensions: ["tex2jax.js", "mml2jax.js", "asciimath2jax.js"],'),f.writeln("TeX: {"),f.writeln('extensions: ["AMSmath.js", "AMSsymbols.js", "noErrors.js", "noUndefined.js"]'),f.writeln("},"),f.writeln("tex2jax: {"),f.writeln('\tignoreClass: "geDisableMathJax"'),f.writeln("},"),f.writeln("asciimath2jax: {"),f.writeln('\tignoreClass: "geDisableMathJax"'),f.writeln("}"),f.writeln("});"),a&&(f.writeln("MathJax.Hub.Queue(function () {"),f.writeln("window.print();"),f.writeln("});")),f.writeln("\x3c/script>"),
-f.writeln('<script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.0/MathJax.js">\x3c/script>'));p.closeDocument();!p.mathEnabled&&a&&PrintDialog.printPreview(p)}var g=b.editor.graph,l=document.createElement("div"),d=document.createElement("h3");d.style.width="100%";d.style.textAlign="center";d.style.marginTop="0px";mxUtils.write(d,a||mxResources.get("print"));l.appendChild(d);var f=1,q=1,h=document.createElement("div");h.style.cssText="border-bottom:1px solid lightGray;padding-bottom:12px;margin-bottom:12px;";
-var t=document.createElement("input");t.style.cssText="margin-right:8px;margin-bottom:8px;";t.setAttribute("value","all");t.setAttribute("type","radio");t.setAttribute("name","pages-printdialog");h.appendChild(t);d=document.createElement("span");mxUtils.write(d,mxResources.get("printAllPages"));h.appendChild(d);mxUtils.br(h);var k=t.cloneNode(!0);t.setAttribute("checked","checked");k.setAttribute("value","range");h.appendChild(k);d=document.createElement("span");mxUtils.write(d,mxResources.get("pages")+
-":");h.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";h.appendChild(m);d=document.createElement("span");mxUtils.write(d,mxResources.get("to"));h.appendChild(d);var v=m.cloneNode(!0);h.appendChild(v);mxEvent.addListener(m,"focus",function(){k.checked=!0});mxEvent.addListener(v,"focus",function(){k.checked=!0});mxEvent.addListener(m,"change",e);mxEvent.addListener(v,
-"change",e);if(null!=b.pages&&(f=b.pages.length,null!=b.currentPage))for(d=0;d<b.pages.length;d++)if(b.currentPage==b.pages[d]){q=d+1;m.value=q;v.value=q;break}m.setAttribute("max",f);v.setAttribute("max",f);1<f&&l.appendChild(h);var u=document.createElement("div");u.style.marginBottom="10px";var n=document.createElement("input");n.style.marginRight="8px";n.setAttribute("value","adjust");n.setAttribute("type","radio");n.setAttribute("name","printZoom");u.appendChild(n);d=document.createElement("span");
-mxUtils.write(d,mxResources.get("adjustTo"));u.appendChild(d);var y=document.createElement("input");y.style.cssText="margin:0 8px 0 8px;";y.setAttribute("value","100 %");y.style.width="50px";u.appendChild(y);mxEvent.addListener(y,"focus",function(){n.checked=!0});l.appendChild(u);var h=h.cloneNode(!1),M=n.cloneNode(!0);M.setAttribute("value","fit");n.setAttribute("checked","checked");d=document.createElement("div");d.style.cssText="display:inline-block;height:100%;vertical-align:top;padding-top:2px;";
+f.writeln('<script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.0/MathJax.js">\x3c/script>'));t.closeDocument();!t.mathEnabled&&a&&PrintDialog.printPreview(t)}var g=b.editor.graph,l=document.createElement("div"),d=document.createElement("h3");d.style.width="100%";d.style.textAlign="center";d.style.marginTop="0px";mxUtils.write(d,a||mxResources.get("print"));l.appendChild(d);var f=1,p=1,h=document.createElement("div");h.style.cssText="border-bottom:1px solid lightGray;padding-bottom:12px;margin-bottom:12px;";
+var q=document.createElement("input");q.style.cssText="margin-right:8px;margin-bottom:8px;";q.setAttribute("value","all");q.setAttribute("type","radio");q.setAttribute("name","pages-printdialog");h.appendChild(q);d=document.createElement("span");mxUtils.write(d,mxResources.get("printAllPages"));h.appendChild(d);mxUtils.br(h);var k=q.cloneNode(!0);q.setAttribute("checked","checked");k.setAttribute("value","range");h.appendChild(k);d=document.createElement("span");mxUtils.write(d,mxResources.get("pages")+
+":");h.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";h.appendChild(m);d=document.createElement("span");mxUtils.write(d,mxResources.get("to"));h.appendChild(d);var v=m.cloneNode(!0);h.appendChild(v);mxEvent.addListener(m,"focus",function(){k.checked=!0});mxEvent.addListener(v,"focus",function(){k.checked=!0});mxEvent.addListener(m,"change",c);mxEvent.addListener(v,
+"change",c);if(null!=b.pages&&(f=b.pages.length,null!=b.currentPage))for(d=0;d<b.pages.length;d++)if(b.currentPage==b.pages[d]){p=d+1;m.value=p;v.value=p;break}m.setAttribute("max",f);v.setAttribute("max",f);1<f&&l.appendChild(h);var u=document.createElement("div");u.style.marginBottom="10px";var n=document.createElement("input");n.style.marginRight="8px";n.setAttribute("value","adjust");n.setAttribute("type","radio");n.setAttribute("name","printZoom");u.appendChild(n);d=document.createElement("span");
+mxUtils.write(d,mxResources.get("adjustTo"));u.appendChild(d);var x=document.createElement("input");x.style.cssText="margin:0 8px 0 8px;";x.setAttribute("value","100 %");x.style.width="50px";u.appendChild(x);mxEvent.addListener(x,"focus",function(){n.checked=!0});l.appendChild(u);var h=h.cloneNode(!1),M=n.cloneNode(!0);M.setAttribute("value","fit");n.setAttribute("checked","checked");d=document.createElement("div");d.style.cssText="display:inline-block;height:100%;vertical-align:top;padding-top:2px;";
 d.appendChild(M);h.appendChild(d);u=document.createElement("table");u.style.display="inline-block";var R=document.createElement("tbody"),L=document.createElement("tr"),O=L.cloneNode(!0),S=document.createElement("td"),K=S.cloneNode(!0),X=S.cloneNode(!0),Q=S.cloneNode(!0),Y=S.cloneNode(!0),W=S.cloneNode(!0);S.style.textAlign="right";Q.style.textAlign="right";mxUtils.write(S,mxResources.get("fitTo"));var P=document.createElement("input");P.style.cssText="margin:0 8px 0 8px;";P.setAttribute("value","1");
 P.setAttribute("min","1");P.setAttribute("type","number");P.style.width="40px";K.appendChild(P);d=document.createElement("span");mxUtils.write(d,mxResources.get("fitToSheetsAcross"));X.appendChild(d);mxUtils.write(Q,mxResources.get("fitToBy"));var T=P.cloneNode(!0);Y.appendChild(T);mxEvent.addListener(P,"focus",function(){M.checked=!0});mxEvent.addListener(T,"focus",function(){M.checked=!0});d=document.createElement("span");mxUtils.write(d,mxResources.get("fitToSheetsDown"));W.appendChild(d);L.appendChild(S);
 L.appendChild(K);L.appendChild(X);O.appendChild(Q);O.appendChild(Y);O.appendChild(W);R.appendChild(L);R.appendChild(O);u.appendChild(R);h.appendChild(u);l.appendChild(h);h=document.createElement("div");d=document.createElement("div");d.style.fontWeight="bold";d.style.marginBottom="12px";mxUtils.write(d,mxResources.get("paperSize"));h.appendChild(d);d=document.createElement("div");d.style.marginBottom="12px";var V=PageSetupDialog.addPageFormatPanel(d,"printdialog",b.editor.graph.pageFormat||mxConstants.PAGE_FORMAT_A4_PORTRAIT);
 h.appendChild(d);d=document.createElement("span");mxUtils.write(d,mxResources.get("pageScale"));h.appendChild(d);var U=document.createElement("input");U.style.cssText="margin:0 8px 0 8px;";U.setAttribute("value","100 %");U.style.width="60px";h.appendChild(U);l.appendChild(h);d=document.createElement("div");d.style.cssText="text-align:right;margin:62px 0 0 0;";h=mxUtils.button(mxResources.get("cancel"),function(){b.hideDialog()});h.className="geBtn";b.editor.cancelFirst&&d.appendChild(h);b.isOffline()||
-(u=mxUtils.button(mxResources.get("help"),function(){window.open("https://desk.draw.io/support/solutions/articles/16000048947")}),u.className="geBtn",d.appendChild(u));PrintDialog.previewEnabled&&(u=mxUtils.button(mxResources.get("preview"),function(){b.hideDialog();c(!1)}),u.className="geBtn",d.appendChild(u));u=mxUtils.button(mxResources.get(PrintDialog.previewEnabled?"print":"ok"),function(){b.hideDialog();c(!0)});u.className="geBtn gePrimaryBtn";d.appendChild(u);b.editor.cancelFirst||d.appendChild(h);
-l.appendChild(d);this.container=l}})();(function(){EditorUi.VERSION="7.5.4";EditorUi.compactUi="atlas"!=uiTheme;EditorUi.enableLogging=/.*\.draw\.io$/.test(window.location.hostname);EditorUi.enablePlantUml=EditorUi.enableLogging;EditorUi.isElectronApp=null!=window&&null!=window.process&&null!=window.process.versions&&null!=window.process.versions.electron;EditorUi.prototype.emptyDiagramXml='<mxGraphModel><root><mxCell id="0"/><mxCell id="1" parent="0"/></root></mxGraphModel>';EditorUi.prototype.emptyLibraryXml="<mxlibrary>[]</mxlibrary>";
+(u=mxUtils.button(mxResources.get("help"),function(){window.open("https://desk.draw.io/support/solutions/articles/16000048947")}),u.className="geBtn",d.appendChild(u));PrintDialog.previewEnabled&&(u=mxUtils.button(mxResources.get("preview"),function(){b.hideDialog();e(!1)}),u.className="geBtn",d.appendChild(u));u=mxUtils.button(mxResources.get(PrintDialog.previewEnabled?"print":"ok"),function(){b.hideDialog();e(!0)});u.className="geBtn gePrimaryBtn";d.appendChild(u);b.editor.cancelFirst||d.appendChild(h);
+l.appendChild(d);this.container=l}})();(function(){EditorUi.VERSION="7.5.5";EditorUi.compactUi="atlas"!=uiTheme;EditorUi.enableLogging=/.*\.draw\.io$/.test(window.location.hostname);EditorUi.enablePlantUml=EditorUi.enableLogging;EditorUi.isElectronApp=null!=window&&null!=window.process&&null!=window.process.versions&&null!=window.process.versions.electron;EditorUi.prototype.emptyDiagramXml='<mxGraphModel><root><mxCell id="0"/><mxCell id="1" parent="0"/></root></mxGraphModel>';EditorUi.prototype.emptyLibraryXml="<mxlibrary>[]</mxlibrary>";
 EditorUi.prototype.mode=null;EditorUi.prototype.sidebarFooterHeight=36;EditorUi.prototype.defaultCustomShapeStyle="shape=stencil(tZRtTsQgEEBPw1+DJR7AoN6DbWftpAgE0Ortd/jYRGq72R+YNE2YgTePloEJGWblgA18ZuKFDcMj5/Sm8boZq+BgjCX4pTyqk6ZlKROitwusOMXKQDODx5iy4pXxZ5qTHiFHawxB0JrQZH7lCabQ0Fr+XWC1/E8zcsT/gAi+Subo2/3Mh6d/oJb5nU1b5tW7r2knautaa3T+U32o7f7vZwpJkaNDLORJjcu7t59m2jXxqX9un+tt022acsfmoKaQZ+vhhswZtS6Ne/ThQGt0IV0N3Yyv6P3CeT9/tHO0XFI5cAE=);whiteSpace=wrap;html=1;";EditorUi.prototype.maxBackgroundSize=1600;
 EditorUi.prototype.maxImageSize=520;EditorUi.prototype.resampleThreshold=1E5;EditorUi.prototype.maxImageBytes=1E6;EditorUi.prototype.maxBackgroundBytes=25E5;EditorUi.prototype.currentFile=null;EditorUi.prototype.printPdfExport=!1;EditorUi.prototype.pdfPageExport=!0;EditorUi.prototype.formatEnabled="0"!=urlParams.format;(function(){EditorUi.prototype.useCanvasForExport=!1;EditorUi.prototype.jpgSupported=!1;try{var b=document.createElement("canvas"),a=new Image;a.onload=function(){try{b.getContext("2d").drawImage(a,
-0,0);var e=b.toDataURL("image/png");EditorUi.prototype.useCanvasForExport=null!=e&&6<e.length}catch(q){}};a.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(l){}try{b=document.createElement("canvas");b.width=b.height=1;var c=
-b.toDataURL("image/jpeg");EditorUi.prototype.jpgSupported=null!==c.match("image/jpeg")}catch(l){}})();EditorUi.prototype.getLocalData=function(b,a){a(localStorage.getItem(b))};EditorUi.prototype.setLocalData=function(b,a,c){localStorage.setItem(b,a);c()};EditorUi.prototype.removeLocalData=function(b,a){localStorage.removeItem(b);a()};EditorUi.prototype.setMathEnabled=function(b){this.editor.graph.mathEnabled=b;this.editor.updateGraphComponents();this.editor.graph.refresh();this.fireEvent(new mxEventObject("mathEnabledChanged"))};
-EditorUi.prototype.isMathEnabled=function(b){return this.editor.graph.mathEnabled};EditorUi.prototype.movePickersToTop=function(){for(var b=document.getElementsByTagName("div"),a=0;a<b.length;a++)"picker modal-dialog picker-dialog"==b[a].className&&(b[a].style.zIndex=mxPopupMenu.prototype.zIndex+1)};EditorUi.prototype.isOfflineApp=function(){return"1"==urlParams.offline};EditorUi.prototype.isOffline=function(){return this.isOfflineApp()||!navigator.onLine||"1"==urlParams.stealth};EditorUi.prototype.createSpinner=
-function(b,a,c){c=null!=c?c:24;var e=new Spinner({lines:12,length:c,width:Math.round(c/3),radius:Math.round(c/2),rotate:0,color:"#000",speed:1.5,trail:60,shadow:!1,hwaccel:!1,zIndex:2E9}),g=e.spin;e.spin=function(c,l){var d=!1;this.active||(g.call(this,c),this.active=!0,null!=l&&(d=document.createElement("div"),d.style.position="absolute",d.style.whiteSpace="nowrap",d.style.background="#4B4243",d.style.color="white",d.style.fontFamily="Helvetica, Arial",d.style.fontSize="9pt",d.style.padding="6px",
-d.style.paddingLeft="10px",d.style.paddingRight="10px",d.style.zIndex=2E9,d.style.left=Math.max(0,b)+"px",d.style.top=Math.max(0,a+70)+"px",mxUtils.setPrefixedStyle(d.style,"borderRadius","6px"),mxUtils.setPrefixedStyle(d.style,"boxShadow","2px 2px 3px 0px #ddd"),mxUtils.setPrefixedStyle(d.style,"transform","translate(-50%,-50%)"),d.innerHTML=l+"...",c.appendChild(d),e.status=d,mxClient.IS_VML&&(null==document.documentMode||8>=document.documentMode)&&(d.style.left=Math.round(Math.max(0,b-d.offsetWidth/
-2))+"px",d.style.top=Math.round(Math.max(0,a+70-d.offsetHeight/2))+"px")),this.pause=mxUtils.bind(this,function(){var b=function(){};this.active&&(b=mxUtils.bind(this,function(){this.spin(c,l)}));this.stop();return b}),d=!0);return d};var d=e.stop;e.stop=function(){d.call(this);this.active=!1;null!=e.status&&(e.status.parentNode.removeChild(e.status),e.status=null)};e.pause=function(){return function(){}};return e};EditorUi.parsePng=function(b,a,c){function e(b,a){var e=d;d+=a;return b.substring(e,
-d)}function g(b){b=e(b,4);return b.charCodeAt(3)+(b.charCodeAt(2)<<8)+(b.charCodeAt(1)<<16)+(b.charCodeAt(0)<<24)}var d=0;if(e(b,8)!=String.fromCharCode(137)+"PNG"+String.fromCharCode(13,10,26,10))null!=c&&c();else if(e(b,4),"IHDR"!=e(b,4))null!=c&&c();else{e(b,17);do{c=g(b);var f=e(b,4);if(null!=a&&a(d-8,f,c))break;value=e(b,c);e(b,4);if("IEND"==f)break}while(c)}};EditorUi.prototype.isCompatibleString=function(b){try{var a=mxUtils.parseXml(b),c=this.editor.extractGraphModel(a.documentElement,!0);
-return null!=c&&0==c.getElementsByTagName("parsererror").length}catch(l){}return!1};var a=EditorUi.prototype.extractGraphModelFromHtml;EditorUi.prototype.extractGraphModelFromHtml=function(b){var e=a.apply(this,arguments);if(null==e)try{var c=b.indexOf("&lt;mxfile ");if(0<=c){var d=b.lastIndexOf("&lt;/mxfile&gt;");d>c&&(e=b.substring(c,d+15).replace(/&gt;/g,">").replace(/&lt;/g,"<").replace(/\\&quot;/g,'"').replace(/\n/g,""))}else var f=mxUtils.parseXml(b),h=this.editor.extractGraphModel(f.documentElement,
-null!=this.pages),e=null!=h?mxUtils.getXml(h):""}catch(u){}return e};EditorUi.prototype.validateFileData=function(b){if(null!=b&&0<b.length){var a=b.indexOf('<meta charset="utf-8">');0<=a&&(b=b.slice(0,a)+'<meta charset="utf-8"/>'+b.slice(a+23-1,b.length))}return b};EditorUi.prototype.replaceFileData=function(b){b=this.validateFileData(b);b=null!=b&&0<b.length?mxUtils.parseXml(b).documentElement:null;var a=null!=b?this.editor.extractGraphModel(b,!0):null;null!=a&&(b=a);if(null!=b){a=this.editor.graph;
-a.model.beginUpdate();try{var c=null!=this.pages?this.pages.slice():null,d=b.getElementsByTagName("diagram");if("0"!=urlParams.pages||1<d.length||1==d.length&&d[0].hasAttribute("name")){this.fileNode=b;this.pages=null!=this.pages?this.pages:[];for(var f=d.length-1;0<=f;f--){var h=this.updatePageRoot(new DiagramPage(d[f]));null==h.getName()&&h.setName(mxResources.get("pageWithNumber",[f+1]));a.model.execute(new ChangePage(this,h,0==f?h:null,0))}}else"0"!=urlParams.pages&&null==this.fileNode&&(this.fileNode=
-b.ownerDocument.createElement("mxfile"),this.currentPage=new DiagramPage(b.ownerDocument.createElement("diagram")),this.currentPage.setName(mxResources.get("pageWithNumber",[1])),a.model.execute(new ChangePage(this,this.currentPage,this.currentPage,0))),this.editor.setGraphXml(b),null!=this.currentPage&&(this.currentPage.root=this.editor.graph.model.root);if(null!=c)for(f=0;f<c.length;f++)a.model.execute(new ChangePage(this,c[f],null))}finally{a.model.endUpdate()}}};EditorUi.prototype.createFileData=
-function(b,a,c,d,f,h,k,t,m,n){a=null!=a?a:this.editor.graph;f=null!=f?f:!1;m=null!=m?m:!0;var e,g=null;null==c||c.getMode()==App.MODE_DEVICE||c.getMode()==App.MODE_BROWSER?e="_blank":g=e=d;if(null==b)return"";var l=b;if("mxfile"!=l.nodeName.toLowerCase()){var q=a.zapGremlins(mxUtils.getXml(b)),l=a.compress(q);if(a.decompress(l)!=q)return q;q=b.ownerDocument.createElement("diagram");mxUtils.setTextContent(q,l);l=b.ownerDocument.createElement("mxfile");l.appendChild(q)}n?(l=l.cloneNode(!0),l.removeAttribute("userAgent"),
-l.removeAttribute("version"),l.removeAttribute("editor"),l.removeAttribute("type")):(l.setAttribute("userAgent",navigator.userAgent),l.setAttribute("version",EditorUi.VERSION),l.setAttribute("editor","www.draw.io"),b=null!=c?c.getMode():this.mode,null!=b&&l.setAttribute("type",b));b=mxUtils.getXml(l);if(!h&&!f&&(k||null!=c&&/(\.html)$/i.test(c.getTitle())))b=this.getHtml2(mxUtils.getXml(l),a,null!=c?c.getTitle():null,e,g);else if(h||!f&&null!=c&&/(\.svg)$/i.test(c.getTitle()))null==c||c.getMode()!=
-App.MODE_DEVICE&&c.getMode()!=App.MODE_BROWSER||(d=null),b=this.getEmbeddedSvg(b,a,d,null,t,m,g);return b};EditorUi.prototype.getXmlFileData=function(b,a){b=null!=b?b:!0;a=null!=a?a:!1;var e=this.editor.getGraphXml(b);if(b&&null!=this.fileNode&&null!=this.currentPage){var c=this.editor.graph.compress(this.editor.graph.zapGremlins(mxUtils.getXml(e)));mxUtils.setTextContent(this.currentPage.node,c);e=this.fileNode.cloneNode(!1);if(a)e.appendChild(this.currentPage.node);else for(var d=0;d<this.pages.length;d++){var f=
-this.pages[d].mapping;this.currentPage!=this.pages[d]&&null!=f&&f.needsUpdate&&(c=(new mxCodec(mxUtils.createXmlDocument())).encode(f.graphModel),f.writeRealtimeToNode(c),c=this.editor.graph.compress(this.editor.graph.zapGremlins(mxUtils.getXml(c))),mxUtils.setTextContent(this.pages[d].node,c),f.needsUpdate=!1);e.appendChild(this.pages[d].node)}}return e};EditorUi.prototype.getFileData=function(b,a,c,d,f,h,k,t){f=null!=f?f:!0;k=null!=k?k:this.getXmlFileData(f,null!=h?h:!1);h=this.editor.graph;var e=
-this.getCurrentFile();if(null!=this.pages&&this.currentPage!=this.pages[0]&&(a||!b&&null!=e&&/(\.svg)$/i.test(e.getTitle()))){h=this.createTemporaryGraph(h.getStylesheet());var g=h.getGlobalVariable,l=this.pages[0];h.getGlobalVariable=function(b){return"page"==b?l.getName():"pagenumber"==b?1:g.apply(this,arguments)};document.body.appendChild(h.container);h.model.setRoot(l.root)}b=this.createFileData(k,h,e,window.location.href,b,a,c,d,f,t);h!=this.editor.graph&&h.container.parentNode.removeChild(h.container);
+0,0);var c=b.toDataURL("image/png");EditorUi.prototype.useCanvasForExport=null!=c&&6<c.length}catch(p){}};a.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(l){}try{b=document.createElement("canvas");b.width=b.height=1;var c=
+b.toDataURL("image/jpeg");EditorUi.prototype.jpgSupported=null!==c.match("image/jpeg")}catch(l){}})();EditorUi.prototype.showSplash=function(b){};EditorUi.prototype.getLocalData=function(b,a){a(localStorage.getItem(b))};EditorUi.prototype.setLocalData=function(b,a,c){localStorage.setItem(b,a);c()};EditorUi.prototype.removeLocalData=function(b,a){localStorage.removeItem(b);a()};EditorUi.prototype.setMathEnabled=function(b){this.editor.graph.mathEnabled=b;this.editor.updateGraphComponents();this.editor.graph.refresh();
+this.fireEvent(new mxEventObject("mathEnabledChanged"))};EditorUi.prototype.isMathEnabled=function(b){return this.editor.graph.mathEnabled};EditorUi.prototype.movePickersToTop=function(){for(var b=document.getElementsByTagName("div"),a=0;a<b.length;a++)"picker modal-dialog picker-dialog"==b[a].className&&(b[a].style.zIndex=mxPopupMenu.prototype.zIndex+1)};EditorUi.prototype.isOfflineApp=function(){return"1"==urlParams.offline};EditorUi.prototype.isOffline=function(){return this.isOfflineApp()||!navigator.onLine||
+"1"==urlParams.stealth};EditorUi.prototype.createSpinner=function(b,a,c){c=null!=c?c:24;var e=new Spinner({lines:12,length:c,width:Math.round(c/3),radius:Math.round(c/2),rotate:0,color:"#000",speed:1.5,trail:60,shadow:!1,hwaccel:!1,zIndex:2E9}),g=e.spin;e.spin=function(c,l){var d=!1;this.active||(g.call(this,c),this.active=!0,null!=l&&(d=document.createElement("div"),d.style.position="absolute",d.style.whiteSpace="nowrap",d.style.background="#4B4243",d.style.color="white",d.style.fontFamily="Helvetica, Arial",
+d.style.fontSize="9pt",d.style.padding="6px",d.style.paddingLeft="10px",d.style.paddingRight="10px",d.style.zIndex=2E9,d.style.left=Math.max(0,b)+"px",d.style.top=Math.max(0,a+70)+"px",mxUtils.setPrefixedStyle(d.style,"borderRadius","6px"),mxUtils.setPrefixedStyle(d.style,"boxShadow","2px 2px 3px 0px #ddd"),mxUtils.setPrefixedStyle(d.style,"transform","translate(-50%,-50%)"),d.innerHTML=l+"...",c.appendChild(d),e.status=d,mxClient.IS_VML&&(null==document.documentMode||8>=document.documentMode)&&(d.style.left=
+Math.round(Math.max(0,b-d.offsetWidth/2))+"px",d.style.top=Math.round(Math.max(0,a+70-d.offsetHeight/2))+"px")),this.pause=mxUtils.bind(this,function(){var b=function(){};this.active&&(b=mxUtils.bind(this,function(){this.spin(c,l)}));this.stop();return b}),d=!0);return d};var d=e.stop;e.stop=function(){d.call(this);this.active=!1;null!=e.status&&(e.status.parentNode.removeChild(e.status),e.status=null)};e.pause=function(){return function(){}};return e};EditorUi.parsePng=function(b,a,c){function e(b,
+a){var c=d;d+=a;return b.substring(c,d)}function g(b){b=e(b,4);return b.charCodeAt(3)+(b.charCodeAt(2)<<8)+(b.charCodeAt(1)<<16)+(b.charCodeAt(0)<<24)}var d=0;if(e(b,8)!=String.fromCharCode(137)+"PNG"+String.fromCharCode(13,10,26,10))null!=c&&c();else if(e(b,4),"IHDR"!=e(b,4))null!=c&&c();else{e(b,17);do{c=g(b);var f=e(b,4);if(null!=a&&a(d-8,f,c))break;value=e(b,c);e(b,4);if("IEND"==f)break}while(c)}};EditorUi.prototype.isCompatibleString=function(b){try{var a=mxUtils.parseXml(b),c=this.editor.extractGraphModel(a.documentElement,
+!0);return null!=c&&0==c.getElementsByTagName("parsererror").length}catch(l){}return!1};var a=EditorUi.prototype.extractGraphModelFromHtml;EditorUi.prototype.extractGraphModelFromHtml=function(b){var c=a.apply(this,arguments);if(null==c)try{var g=b.indexOf("&lt;mxfile ");if(0<=g){var l=b.lastIndexOf("&lt;/mxfile&gt;");l>g&&(c=b.substring(g,l+15).replace(/&gt;/g,">").replace(/&lt;/g,"<").replace(/\\&quot;/g,'"').replace(/\n/g,""))}else var d=mxUtils.parseXml(b),f=this.editor.extractGraphModel(d.documentElement,
+null!=this.pages),c=null!=f?mxUtils.getXml(f):""}catch(v){}return c};EditorUi.prototype.validateFileData=function(b){if(null!=b&&0<b.length){var a=b.indexOf('<meta charset="utf-8">');0<=a&&(b=b.slice(0,a)+'<meta charset="utf-8"/>'+b.slice(a+23-1,b.length))}return b};EditorUi.prototype.replaceFileData=function(b){b=this.validateFileData(b);b=null!=b&&0<b.length?mxUtils.parseXml(b).documentElement:null;var a=null!=b?this.editor.extractGraphModel(b,!0):null;null!=a&&(b=a);if(null!=b){a=this.editor.graph;
+a.model.beginUpdate();try{var c=null!=this.pages?this.pages.slice():null,l=b.getElementsByTagName("diagram");if("0"!=urlParams.pages||1<l.length||1==l.length&&l[0].hasAttribute("name")){this.fileNode=b;this.pages=null!=this.pages?this.pages:[];for(var d=l.length-1;0<=d;d--){var f=this.updatePageRoot(new DiagramPage(l[d]));null==f.getName()&&f.setName(mxResources.get("pageWithNumber",[d+1]));a.model.execute(new ChangePage(this,f,0==d?f:null,0))}}else"0"!=urlParams.pages&&null==this.fileNode&&(this.fileNode=
+b.ownerDocument.createElement("mxfile"),this.currentPage=new DiagramPage(b.ownerDocument.createElement("diagram")),this.currentPage.setName(mxResources.get("pageWithNumber",[1])),a.model.execute(new ChangePage(this,this.currentPage,this.currentPage,0))),this.editor.setGraphXml(b),null!=this.currentPage&&(this.currentPage.root=this.editor.graph.model.root);if(null!=c)for(d=0;d<c.length;d++)a.model.execute(new ChangePage(this,c[d],null))}finally{a.model.endUpdate()}}};EditorUi.prototype.createFileData=
+function(b,a,c,l,d,f,h,q,k,m){a=null!=a?a:this.editor.graph;d=null!=d?d:!1;k=null!=k?k:!0;var e,g=null;null==c||c.getMode()==App.MODE_DEVICE||c.getMode()==App.MODE_BROWSER?e="_blank":g=e=l;if(null==b)return"";var p=b;if("mxfile"!=p.nodeName.toLowerCase()){var v=a.zapGremlins(mxUtils.getXml(b)),p=a.compress(v);if(a.decompress(p)!=v)return v;v=b.ownerDocument.createElement("diagram");mxUtils.setTextContent(v,p);p=b.ownerDocument.createElement("mxfile");p.appendChild(v)}m?(p=p.cloneNode(!0),p.removeAttribute("userAgent"),
+p.removeAttribute("version"),p.removeAttribute("editor"),p.removeAttribute("type")):(p.setAttribute("userAgent",navigator.userAgent),p.setAttribute("version",EditorUi.VERSION),p.setAttribute("editor","www.draw.io"),b=null!=c?c.getMode():this.mode,null!=b&&p.setAttribute("type",b));b=mxUtils.getXml(p);if(!f&&!d&&(h||null!=c&&/(\.html)$/i.test(c.getTitle())))b=this.getHtml2(mxUtils.getXml(p),a,null!=c?c.getTitle():null,e,g);else if(f||!d&&null!=c&&/(\.svg)$/i.test(c.getTitle()))null==c||c.getMode()!=
+App.MODE_DEVICE&&c.getMode()!=App.MODE_BROWSER||(l=null),b=this.getEmbeddedSvg(b,a,l,null,q,k,g);return b};EditorUi.prototype.getXmlFileData=function(b,a){b=null!=b?b:!0;a=null!=a?a:!1;var c=this.editor.getGraphXml(b);if(b&&null!=this.fileNode&&null!=this.currentPage){var e=this.editor.graph.compress(this.editor.graph.zapGremlins(mxUtils.getXml(c)));mxUtils.setTextContent(this.currentPage.node,e);c=this.fileNode.cloneNode(!1);if(a)c.appendChild(this.currentPage.node);else for(var d=0;d<this.pages.length;d++){var f=
+this.pages[d].mapping;this.currentPage!=this.pages[d]&&null!=f&&f.needsUpdate&&(e=(new mxCodec(mxUtils.createXmlDocument())).encode(f.graphModel),f.writeRealtimeToNode(e),e=this.editor.graph.compress(this.editor.graph.zapGremlins(mxUtils.getXml(e))),mxUtils.setTextContent(this.pages[d].node,e),f.needsUpdate=!1);c.appendChild(this.pages[d].node)}}return c};EditorUi.prototype.getFileData=function(b,a,c,d,f,h,k,q){f=null!=f?f:!0;k=null!=k?k:this.getXmlFileData(f,null!=h?h:!1);h=this.editor.graph;var e=
+this.getCurrentFile();if(null!=this.pages&&this.currentPage!=this.pages[0]&&(a||!b&&null!=e&&/(\.svg)$/i.test(e.getTitle()))){h=this.createTemporaryGraph(h.getStylesheet());var g=h.getGlobalVariable,l=this.pages[0];h.getGlobalVariable=function(b){return"page"==b?l.getName():"pagenumber"==b?1:g.apply(this,arguments)};document.body.appendChild(h.container);h.model.setRoot(l.root)}b=this.createFileData(k,h,e,window.location.href,b,a,c,d,f,q);h!=this.editor.graph&&h.container.parentNode.removeChild(h.container);
 return b};EditorUi.prototype.getHtml=function(b,a,c,d,f,h){h=null!=h?h:!0;var e=null,g="https://www.draw.io/js/embed-static.min.js";if(null!=a){var e=h?a.getGraphBounds():a.getBoundingBox(a.getSelectionCells()),l=a.view.scale;h=Math.floor(e.x/l-a.view.translate.x);l=Math.floor(e.y/l-a.view.translate.y);e=a.background;null==f&&(a=this.getBasenames().join(";"),0<a.length&&(g="https://www.draw.io/embed.js?s="+a));b.setAttribute("x0",h);b.setAttribute("y0",l)}null!=b&&(b.setAttribute("pan","1"),b.setAttribute("zoom",
 "1"),b.setAttribute("resize","0"),b.setAttribute("fit","0"),b.setAttribute("border","20"),b.setAttribute("links","1"),null!=d&&b.setAttribute("edit",d));null!=f&&(f=f.replace(/&/g,"&amp;"));b=null!=b?this.editor.graph.zapGremlins(mxUtils.getXml(b)):"";d=this.editor.graph.compress(b);this.editor.graph.decompress(d)!=b&&(d=encodeURIComponent(b));return(null==f?'\x3c!--[if IE]><meta http-equiv="X-UA-Compatible" content="IE=5,IE=9" ><![endif]--\x3e\n':"")+"<!DOCTYPE html>\n<html"+(null!=f?' xmlns="http://www.w3.org/1999/xhtml">':
 ">")+"\n<head>\n"+(null==f?null!=c?"<title>"+mxUtils.htmlEntities(c)+"</title>\n":"":"<title>Draw.io Diagram</title>\n")+(null!=f?'<meta http-equiv="refresh" content="0;URL=\''+f+"'\"/>\n":"")+"</head>\n<body"+(null==f&&null!=e&&e!=mxConstants.NONE?' style="background-color:'+e+';">':">")+'\n<div class="mxgraph" style="position:relative;overflow:auto;width:100%;">\n<div style="width:1px;height:1px;overflow:hidden;">'+d+"</div>\n</div>\n"+(null==f?'<script type="text/javascript" src="'+g+'">\x3c/script>':
@@ -6259,228 +6261,228 @@ mxUtils.htmlEntities(JSON.stringify(b))+'"></div>\n'+(null==f?'<script type="tex
 mxUtils.parseXml(b).documentElement:null;b=null!=a?this.editor.extractGraphModel(a,!0):null;null!=b&&(a=b);if(null!=a&&"mxfile"==a.nodeName&&(b=a.getElementsByTagName("diagram"),"0"!=urlParams.pages||1<b.length||1==b.length&&b[0].hasAttribute("name"))){this.fileNode=a;this.pages=[];for(a=0;a<b.length;a++){var c=new DiagramPage(b[a]);null==c.getName()&&c.setName(mxResources.get("pageWithNumber",[a+1]));this.pages.push(c)}this.currentPage=this.pages[Math.max(0,Math.min(this.pages.length-1,urlParams.page||
 0))];a=this.currentPage.node}"0"!=urlParams.pages&&null==this.fileNode&&null!=a&&(this.fileNode=a.ownerDocument.createElement("mxfile"),this.currentPage=new DiagramPage(a.ownerDocument.createElement("diagram")),this.currentPage.setName(mxResources.get("pageWithNumber",[1])),this.pages=[this.currentPage]);this.editor.setGraphXml(a);null!=this.currentPage&&(this.currentPage.root=this.editor.graph.model.root)};EditorUi.prototype.getBaseFilename=function(){var b=this.getCurrentFile(),b=null!=b&&null!=
 b.getTitle()?b.getTitle():this.defaultFilename;if(/(\.xml)$/i.test(b)||/(\.html)$/i.test(b)||/(\.svg)$/i.test(b))b=b.substring(0,b.lastIndexOf("."));return b};EditorUi.prototype.downloadFile=function(b,a,c,d,f,h){try{d=null!=d?d:this.editor.graph.isSelectionEmpty();var e=this.getBaseFilename(),g=e+"."+b;if("xml"==b){var l='<?xml version="1.0" encoding="UTF-8"?>\n'+(a?mxUtils.getXml(this.editor.getGraphXml(d)):this.getFileData(!0,null,null,null,d,f));this.saveData(g,b,l,"text/xml")}else if("html"==
-b)l=this.getHtml2(this.getFileData(!0),this.editor.graph,e),this.saveData(g,b,l,"text/html");else if("svg"!=b&&"xmlsvg"!=b||!this.spinner.spin(document.body,mxResources.get("export")))"xmlpng"==b?g=e+".png":"jpeg"==b&&(g=e+".jpg"),this.saveRequest(g,b,mxUtils.bind(this,function(a,c){try{var e=this.editor.graph.pageVisible;null!=h&&(this.editor.graph.pageVisible=h);var g=this.createDownloadRequest(a,b,d,c);this.editor.graph.pageVisible=e;return g}catch(D){this.handleError(D)}}));else{var q=null,p=
-mxUtils.bind(this,function(b){b.length<=MAX_REQUEST_SIZE?this.saveData(g,"svg",b,"image/svg+xml"):this.handleError({message:mxResources.get("drawingTooLarge")},mxResources.get("error"),mxUtils.bind(this,function(){mxUtils.popup(q)}))});if("svg"==b){var k=this.editor.graph.background;k==mxConstants.NONE&&(k=null);var m=this.editor.graph.getSvg(k,null,null,null,null,d);c&&this.editor.graph.addSvgShadow(m);this.convertImages(m,mxUtils.bind(this,mxUtils.bind(this,function(b){this.spinner.stop();p('<?xml version="1.0" encoding="UTF-8"?>\n<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">\n'+
-mxUtils.getXml(b))})))}else g=e+".svg",q=this.getFileData(!1,!0,null,mxUtils.bind(this,function(b){this.spinner.stop();p(b)}),d)}}catch(F){this.handleError(F)}};EditorUi.prototype.createDownloadRequest=function(b,a,c,d){var e=this.editor.graph.getGraphBounds();c=this.getFileData(!0,null,null,null,c,"xmlpng"!=a);var g="";if(e.width*e.height>MAX_AREA||c.length>MAX_REQUEST_SIZE)throw{message:mxResources.get("drawingTooLarge")};e="0";if("xmlpng"==a&&(e="1",a="png",null!=this.pages&&null!=this.currentPage))for(var l=
+b)l=this.getHtml2(this.getFileData(!0),this.editor.graph,e),this.saveData(g,b,l,"text/html");else if("svg"!=b&&"xmlsvg"!=b||!this.spinner.spin(document.body,mxResources.get("export")))"xmlpng"==b?g=e+".png":"jpeg"==b&&(g=e+".jpg"),this.saveRequest(g,b,mxUtils.bind(this,function(a,c){try{var e=this.editor.graph.pageVisible;null!=h&&(this.editor.graph.pageVisible=h);var g=this.createDownloadRequest(a,b,d,c);this.editor.graph.pageVisible=e;return g}catch(D){this.handleError(D)}}));else{var p=null,t=
+mxUtils.bind(this,function(b){b.length<=MAX_REQUEST_SIZE?this.saveData(g,"svg",b,"image/svg+xml"):this.handleError({message:mxResources.get("drawingTooLarge")},mxResources.get("error"),mxUtils.bind(this,function(){mxUtils.popup(p)}))});if("svg"==b){var k=this.editor.graph.background;k==mxConstants.NONE&&(k=null);var m=this.editor.graph.getSvg(k,null,null,null,null,d);c&&this.editor.graph.addSvgShadow(m);this.convertImages(m,mxUtils.bind(this,mxUtils.bind(this,function(b){this.spinner.stop();t('<?xml version="1.0" encoding="UTF-8"?>\n<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">\n'+
+mxUtils.getXml(b))})))}else g=e+".svg",p=this.getFileData(!1,!0,null,mxUtils.bind(this,function(b){this.spinner.stop();t(b)}),d)}}catch(F){this.handleError(F)}};EditorUi.prototype.createDownloadRequest=function(b,a,c,d){var e=this.editor.graph.getGraphBounds();c=this.getFileData(!0,null,null,null,c,"xmlpng"!=a);var g="";if(e.width*e.height>MAX_AREA||c.length>MAX_REQUEST_SIZE)throw{message:mxResources.get("drawingTooLarge")};e="0";if("xmlpng"==a&&(e="1",a="png",null!=this.pages&&null!=this.currentPage))for(var l=
 0;l<this.pages.length;l++)if(this.pages[l]==this.currentPage){g="&from="+l;break}return new mxXmlRequest(EXPORT_URL,"format="+a+g+"&base64="+d+"&embedXml="+e+"&xml="+encodeURIComponent(c)+(null!=b?"&filename="+encodeURIComponent(b):""))};EditorUi.prototype.setMode=function(b,a){this.mode=b};EditorUi.prototype.fileLoaded=function(b){var a=!1;this.hideDialog();var c=this.getCurrentFile();this.setCurrentFile(null);null!=c&&(c.removeListener(this.descriptorChangedListener),c.close());this.editor.graph.model.clear();
 this.editor.undoManager.clear();var d=mxUtils.bind(this,function(){this.setGraphEnabled(!1);this.setCurrentFile(null);null!=c&&this.updateDocumentTitle();this.editor.graph.model.clear();this.editor.undoManager.clear();null!=window.location.hash&&0<window.location.hash.length&&(window.location.hash="");null!=this.fname&&(this.fnameWrapper.style.display="none",this.fname.innerHTML="",this.fname.setAttribute("title",mxResources.get("rename")));this.updateUi();this.showSplash()});if(null!=b)try{this.setCurrentFile(b);
 b.addListener("descriptorChanged",this.descriptorChangedListener);b.addListener("contentChanged",this.descriptorChangedListener);b.open();this.setGraphEnabled(!0);this.setMode(b.getMode());this.editor.undoManager.clear();this.descriptorChanged();this.updateUi();null==b.realtime&&(b.isEditable()?this.editor.setStatus(""):this.editor.setStatus('<span class="geStatusAlert" style="margin-left:8px;">'+mxUtils.htmlEntities(mxResources.get("readOnly"))+"</span>"));!this.editor.chromeless||this.editor.editable?
-(this.editor.graph.selectUnlockedLayer(),this.showLayersDialog(),this.restoreLibraries(),window.self!==window.top&&window.focus()):this.editor.graph.lightbox&&this.lightboxFit();this.chromelessResize&&this.chromelessResize();this.editor.fireEvent(new mxEventObject("fileLoaded"));a=!0;if(EditorUi.enableLogging&&!this.isOffline()&&null!=b.getMode())try{"function"===typeof window.ga&&ga("send","event","File","open",b.getMode())}catch(q){}if(this.mode==b.getMode()&&b.getMode()!=App.MODE_DEVICE&&null!=
-b.getMode())try{this.addRecent({id:b.getHash(),title:b.getTitle(),mode:b.getMode()})}catch(q){}try{mxSettings.setOpenCounter(mxSettings.getOpenCounter()+1),mxSettings.save()}catch(q){}}catch(q){null!=window.console&&console.log("error in fileLoaded:",b,q);if(EditorUi.enableLogging&&!this.isOffline())try{(new Image).src=(null!=window.DRAWIO_LOG_URL?window.DRAWIO_LOG_URL:"")+"/log?v="+encodeURIComponent(EditorUi.VERSION)+"&msg=errorInFileLoaded:url:"+encodeURIComponent(window.location.href)+(null!=
-q&&null!=q.message?":err:"+encodeURIComponent(q.message):"")+(null!=q&&null!=q.stack?"&stack="+encodeURIComponent(q.stack):"")}catch(v){}this.handleError(q,mxResources.get("errorLoadingFile"),mxUtils.bind(this,function(){null!=urlParams.url&&this.spinner.spin(document.body,mxResources.get("reconnecting"))?window.location.search=this.getSearch(["url"]):null!=c?c.constructor==DriveFile?this.loadFile(c.getHash()):this.fileLoaded(c):d()}))}else d();return a};EditorUi.prototype.restoreLibraries=function(){};
-EditorUi.prototype.saveLibrary=function(b,a,c,d,f,h,k){};EditorUi.prototype.toggleScratchpad=function(){if(isLocalStorage||mxClient.IS_CHROMEAPP)null==this.scratchpad?this.getLocalData(".scratchpad",mxUtils.bind(this,function(b){null==b&&(b=this.emptyLibraryXml);this.loadLibrary(new StorageLibrary(this,b,".scratchpad"))})):this.closeLibrary(this.scratchpad)};EditorUi.prototype.createLibraryDataFromImages=function(b){var a=mxUtils.createXmlDocument(),c=a.createElement("mxlibrary");mxUtils.setTextContent(c,
-JSON.stringify(b));a.appendChild(c);return mxUtils.getXml(a)};EditorUi.prototype.closeLibrary=function(b){null!=b&&(this.removeLibrarySidebar(b.getHash()),b.constructor!=LocalLibrary&&mxSettings.removeCustomLibrary(b.getHash()),".scratchpad"==b.title&&(this.scratchpad=null))};EditorUi.prototype.removeLibrarySidebar=function(b){var a=this.sidebar.palettes[b];if(null!=a){for(var c=0;c<a.length;c++)a[c].parentNode.removeChild(a[c]);delete this.sidebar.palettes[b]}};EditorUi.prototype.repositionLibrary=
-function(b){var a=this.sidebar.container;if(null==b){var c=this.sidebar.palettes["L.scratchpad"];null==c&&(c=this.sidebar.palettes.search);null!=c&&(b=c[c.length-1].nextSibling)}b=null!=b?b:a.firstChild.nextSibling.nextSibling;var c=a.lastChild,d=c.previousSibling;a.insertBefore(c,b);a.insertBefore(d,c)};EditorUi.prototype.loadLibrary=function(b){var a=mxUtils.parseXml(b.getData());if("mxlibrary"==a.documentElement.nodeName){var c=JSON.parse(mxUtils.getTextContent(a.documentElement));this.libraryLoaded(b,
-c,a.documentElement.getAttribute("title"))}else throw{message:mxResources.get("notALibraryFile")};};EditorUi.prototype.getLibraryStorageHint=function(b){return""};EditorUi.prototype.libraryLoaded=function(b,a,c){b.constructor!=LocalLibrary&&mxSettings.addCustomLibrary(b.getHash());".scratchpad"==b.title&&(this.scratchpad=b);var e=this.sidebar.palettes[b.getHash()],e=null!=e?e[e.length-1].nextSibling:null;this.removeLibrarySidebar(b.getHash());var g=null,d=mxUtils.bind(this,function(a,c){if(0==a.length&&
-b.isEditable())null==g&&(g=document.createElement("div"),mxUtils.setPrefixedStyle(g.style,"borderRadius","6px"),g.style.border="3px dotted lightGray",g.style.textAlign="center",g.style.padding="8px",g.style.color="#B3B3B3",mxUtils.write(g,mxResources.get("dragElementsHere"))),c.appendChild(g);else for(var e=0;e<a.length;e++){var d=a[e],f=d.data;if(null!=f){var f=this.convertDataUri(f),l="shape=image;verticalLabelPosition=bottom;verticalAlign=top;imageAspect=0;";"fixed"==d.aspect&&(l+="aspect=fixed;");
-c.appendChild(this.sidebar.createVertexTemplate(l+"image="+f,d.w,d.h,"",d.title||"",!1,!1,!1))}else null!=d.xml&&(f=this.stringToCells(this.editor.graph.decompress(d.xml)),0<f.length&&c.appendChild(this.sidebar.createVertexTemplateFromCells(f,d.w,d.h,d.title||"",!0,!1,!1)))}});c=null!=c&&0<c.length?c:b.getTitle();var f=this.sidebar.addPalette(b.getHash(),c,!0,mxUtils.bind(this,function(b){d(a,b)}));this.repositionLibrary(e);var h=f.parentNode.previousSibling;c=h.getAttribute("title");null!=c&&0<c.length&&
-".scratchpad"!=b.title&&h.setAttribute("title",this.getLibraryStorageHint(b)+"\n"+c);var k=document.createElement("div");k.style.position="absolute";k.style.right="0px";k.style.top="5px";mxClient.IS_QUIRKS||8==document.documentMode||(k.style.backgroundColor="inherit");h.style.position="relative";var m=document.createElement("img");m.setAttribute("src",Dialog.prototype.closeImage);m.setAttribute("title",mxResources.get("close"));m.setAttribute("align","top");m.setAttribute("border","0");m.className=
-"geButton";m.style.marginRight="1px";m.style.marginTop="-1px";k.appendChild(m);var p=null;mxEvent.addListener(m,"click",mxUtils.bind(this,function(a){if(!mxEvent.isConsumed(a)){var c=mxUtils.bind(this,function(){this.closeLibrary(b)});null!=p?this.confirm(mxResources.get("allChangesLost"),null,c,mxResources.get("cancel"),mxResources.get("discardChanges")):c();mxEvent.consume(a)}}));mxEvent.addListener(f,"mousemove",mxUtils.bind(this,function(b){mxEvent.getSource(b)==f?f.setAttribute("title",mxResources.get("libraryTooltip")):
-f.removeAttribute("title")}));if(b.isEditable()){var w=this.editor.graph,n=mxUtils.bind(this,function(c){this.showLibraryDialog(b.getTitle(),f,a,b,b.getMode());mxEvent.consume(c)}),F=mxUtils.bind(this,function(c){b.setModified(!0);b.isAutosave()?(null!=z&&null!=z.parentNode&&z.parentNode.removeChild(z),z=m.cloneNode(!1),z.setAttribute("src",Editor.spinImage),z.setAttribute("title",mxResources.get("saving")),z.style.cursor="default",z.style.marginRight="2px",z.style.marginTop="-2px",k.insertBefore(z,
-k.firstChild),h.style.paddingRight=18*k.childNodes.length+"px",this.saveLibrary(b.getTitle(),a,b,b.getMode(),!0,!0,function(){null!=z&&null!=z.parentNode&&(z.parentNode.removeChild(z),h.style.paddingRight=18*k.childNodes.length+"px")})):null==p&&(p=m.cloneNode(!1),p.setAttribute("src",IMAGE_PATH+"/download.png"),p.setAttribute("title",mxResources.get("save")),k.insertBefore(p,k.firstChild),mxEvent.addListener(p,"click",mxUtils.bind(this,function(c){this.saveLibrary(b.getTitle(),a,b,b.getMode(),b.constructor==
-LocalLibrary,!0,function(){null==p||b.isModified()||(h.style.paddingRight=18*k.childNodes.length+"px",p.parentNode.removeChild(p),p=null)});mxEvent.consume(c)})),h.style.paddingRight=18*k.childNodes.length+"px")}),B=mxUtils.bind(this,function(b,c,e,d){b=w.cloneCells(mxUtils.sortCells(w.model.getTopmostCells(b)));for(var l=0;l<b.length;l++){var p=w.getCellGeometry(b[l]);null!=p&&p.translate(-c.x,-c.y)}f.appendChild(this.sidebar.createVertexTemplateFromCells(b,c.width,c.height,d||"",!0,!1,!1));b={xml:this.editor.graph.compress(mxUtils.getXml(this.editor.graph.encodeCells(b))),
-w:c.width,h:c.height};null!=d&&(b.title=d);a.push(b);F(e);null!=g&&null!=g.parentNode&&0<a.length&&(g.parentNode.removeChild(g),g=null)}),G=mxUtils.bind(this,function(b){if(w.isSelectionEmpty())w.getRubberband().isActive()?(w.getRubberband().execute(b),w.getRubberband().reset()):this.showError(mxResources.get("error"),mxResources.get("nothingIsSelected"),mxResources.get("ok"));else{var a=w.getSelectionCells(),c=w.view.getBounds(a),e=w.view.scale;c.x/=e;c.y/=e;c.width/=e;c.height/=e;c.x-=w.view.translate.x;
-c.y-=w.view.translate.y;B(a,c)}mxEvent.consume(b)});f.style.border="3px solid transparent";mxEvent.addGestureListeners(f,function(){},mxUtils.bind(this,function(b){w.isMouseDown&&null!=w.panningManager&&null!=w.graphHandler.shape&&(w.graphHandler.shape.node.style.visibility="hidden",null!=g?g.style.border="3px dotted rgb(254, 137, 12)":f.style.border="3px dotted rgb(254, 137, 12)",f.style.cursor="copy",w.panningManager.stop(),w.autoScroll=!1,null!=w.graphHandler.guide&&w.graphHandler.guide.setVisible(!1),
-null!=w.graphHandler.hint&&(w.graphHandler.hint.style.visibility="hidden"),mxEvent.consume(b))}),mxUtils.bind(this,function(b){w.isMouseDown&&null!=w.panningManager&&null!=w.graphHandler&&(f.style.border="3px solid transparent",null!=g&&(g.style.border="3px dotted lightGray"),f.style.cursor="default",this.sidebar.showTooltips=!0,w.panningManager.stop(),w.graphHandler.reset(),w.isMouseDown=!1,w.autoScroll=!0,G(b),mxEvent.consume(b))}));mxEvent.addListener(f,"mouseleave",mxUtils.bind(this,function(b){w.isMouseDown&&
-null!=w.graphHandler.shape&&(w.graphHandler.shape.node.style.visibility="visible",f.style.border="3px solid transparent",f.style.cursor="",w.autoScroll=!0,null!=w.graphHandler.guide&&w.graphHandler.guide.setVisible(!0),null!=w.graphHandler.hint&&(w.graphHandler.hint.style.visibility="visible"),null!=g&&(g.style.border="3px dotted lightGray"))}));Graph.fileSupport&&(mxEvent.addListener(f,"dragover",mxUtils.bind(this,function(b){null!=g?g.style.border="3px dotted rgb(254, 137, 12)":f.style.border="3px dotted rgb(254, 137, 12)";
-b.dataTransfer.dropEffect="copy";f.style.cursor="copy";this.sidebar.hideTooltip();b.stopPropagation();b.preventDefault()})),mxEvent.addListener(f,"drop",mxUtils.bind(this,function(b){f.style.border="3px solid transparent";f.style.cursor="";null!=g&&(g.style.border="3px dotted lightGray");0<b.dataTransfer.files.length&&this.importFiles(b.dataTransfer.files,0,0,this.maxImageSize,mxUtils.bind(this,function(c,e,l,p,h,q,k,m,t){if(null!=c&&"image/"==e.substring(0,6))c="shape=image;verticalLabelPosition=bottom;verticalAlign=top;aspect=fixed;image="+
-this.convertDataUri(c),c=[new mxCell("",new mxGeometry(0,0,h,q),c)],c[0].vertex=!0,B(c,new mxRectangle(0,0,h,q),b,mxEvent.isAltDown(b)?null:k.substring(0,k.lastIndexOf(".")).replace(/_/g," ")),null!=g&&null!=g.parentNode&&0<a.length&&(g.parentNode.removeChild(g),g=null);else{var w=!1,u=mxUtils.bind(this,function(c,e){if(null!=c&&"text/xml"==e){var l=mxUtils.parseXml(c);if("mxlibrary"==l.documentElement.nodeName)try{var p=JSON.parse(mxUtils.getTextContent(l.documentElement));d(p,f);a=a.concat(p);F(b);
-this.spinner.stop();w=!0}catch(V){}else if("mxfile"==l.documentElement.nodeName)try{for(var h=l.documentElement.getElementsByTagName("diagram"),l=0;l<h.length;l++){var p=mxUtils.getTextContent(h[l]),q=this.stringToCells(this.editor.graph.decompress(p)),k=this.editor.graph.getBoundingBoxFromGeometry(q);B(q,new mxRectangle(0,0,k.width,k.height),b)}w=!0}catch(V){null!=window.console&&console.log("error in drop handler:",V)}}w||(this.spinner.stop(),this.handleError({message:mxResources.get("errorLoadingFile")}));
-null!=g&&null!=g.parentNode&&0<a.length&&(g.parentNode.removeChild(g),g=null)});!this.isOffline()&&(new XMLHttpRequest).upload&&this.isRemoteFileFormat(c,k)&&null!=t?this.parseFile(t,mxUtils.bind(this,function(b){4==b.readyState&&(this.spinner.stop(),200<=b.status&&299>=b.status?u(b.responseText,"text/xml"):this.handleError({message:mxResources.get(413==b.status?"drawingTooLarge":"invalidOrMissingFile")},mxResources.get("errorLoadingFile")))})):u(c,e)}}));b.stopPropagation();b.preventDefault()})),
-mxEvent.addListener(f,"dragleave",function(b){null!=g?g.style.border="3px dotted lightGray":(f.style.border="3px solid transparent",f.style.cursor="");b.stopPropagation();b.preventDefault()}));m=m.cloneNode(!1);m.setAttribute("src",IMAGE_PATH+"/edit.gif");m.setAttribute("title",mxResources.get("edit"));k.insertBefore(m,k.firstChild);mxEvent.addListener(m,"click",n);mxEvent.addListener(f,"dblclick",function(b){mxEvent.getSource(b)==f&&n(b)});m=m.cloneNode(!1);m.setAttribute("src",Editor.plusImage);
-m.setAttribute("title",mxResources.get("add"));k.insertBefore(m,k.firstChild);this.isOffline()||".scratchpad"!=b.title||(c=document.createElement("span"),c.setAttribute("title",mxResources.get("help")),c.style.cssText="color:gray;text-decoration:none;",c.className="geButton",mxUtils.write(c,"?"),mxEvent.addGestureListeners(c,mxUtils.bind(this,function(b){window.open("https://desk.draw.io/support/solutions/articles/16000042367");mxEvent.consume(b)})),k.insertBefore(c,k.firstChild));var z=null;mxEvent.addListener(m,
-"click",G)}h.appendChild(k);h.style.paddingRight=18*k.childNodes.length+"px"};"1"==urlParams.offline?EditorUi.prototype.footerHeight=4:("atlas"==uiTheme?("undefined"!==typeof Toolbar&&(Toolbar.prototype.unselectedBackground=mxClient.IS_QUIRKS?"none":"linear-gradient(rgb(255, 255, 255) 0px, rgb(242, 242, 242) 100%)",Toolbar.prototype.selectedBackground="rgb(242, 242, 242)"),Editor.prototype.initialTopSpacing=3,EditorUi.prototype.menubarHeight=41,EditorUi.prototype.toolbarHeight=38,EditorUi.prototype.hsplitPosition=
-188,Sidebar.prototype.thumbWidth=46,Sidebar.prototype.thumbHeight=46,Sidebar.prototype.thumbPadding=5<=document.documentMode?0:1,Sidebar.prototype.thumbBorder=2):"1"==urlParams.savesidebar&&(Sidebar.prototype.thumbWidth=64,Sidebar.prototype.thumbHeight=64),EditorUi.prototype.footerHeight=760<=screen.width&&240<=screen.height?46:0,EditorUi.prototype.createFooter=function(){var b=document.getElementById("geFooter");if(null!=b){b.style.visibility="visible";var a=document.createElement("img");a.setAttribute("border",
-"0");a.setAttribute("src",Dialog.prototype.closeImage);a.setAttribute("title",mxResources.get("hide"));b.appendChild(a);mxClient.IS_QUIRKS&&(a.style.position="relative",a.style.styleFloat="right",a.style.top="-30px",a.style.left="164px",a.style.cursor="pointer");mxEvent.addListener(a,"click",mxUtils.bind(this,function(){this.hideFooter()}))}return b});EditorUi.prototype.hideFooter=function(){var b=document.getElementById("geFooter");null!=b&&(this.footerHeight=0,b.style.display="none",this.refresh())};
-EditorUi.prototype.showImageDialog=function(b,a,c,d,f){b=new ImageDialog(this,b,a,c,d,f);this.showDialog(b.container,Graph.fileSupport?440:360,Graph.fileSupport?200:90,!0,!0);b.init()};EditorUi.prototype.showBackgroundImageDialog=function(b){b=null!=b?b:mxUtils.bind(this,function(b){b=new ChangePageSetup(this,null,b);b.ignoreColor=!0;this.editor.graph.model.execute(b)});var a=new BackgroundImageDialog(this,mxUtils.bind(this,function(a){b(a)}));this.showDialog(a.container,360,200,!0,!0);a.init()};
-EditorUi.prototype.showLibraryDialog=function(b,a,c,d,f){b=new LibraryDialog(this,b,a,c,d,f);this.showDialog(b.container,620,440,!0,!1,mxUtils.bind(this,function(b){b&&null==this.getCurrentFile()&&"1"!=urlParams.embed&&this.showSplash()}));b.init()};EditorUi.prototype.createSidebarFooterContainer=function(){var b=this.createDiv("geSidebarContainer");b.style.position="absolute";b.style.overflow="hidden";b.style.borderWidth="3px";var a=document.createElement("a");a.setAttribute("href","javascript:void(0);");
-a.className="geTitle";a.style.height="100%";a.style.paddingTop="9px";mxUtils.write(a,mxResources.get("moreShapes")+"...");mxEvent.addListener(a,"click",mxUtils.bind(this,function(b){this.actions.get("shapes").funct();mxEvent.consume(b)}));b.appendChild(a);return b};EditorUi.prototype.handleError=function(b,a,c){var e=null!=this.spinner&&null!=this.spinner.pause?this.spinner.pause():function(){},g=null!=b&&null!=b.error?b.error:b;if(null!=g||null!=a){b=mxUtils.htmlEntities(mxResources.get("unknownError"));
-var d=mxResources.get("ok"),f=null;a=null!=a?a:mxResources.get("error");if(null!=g)if(null!=g.retry&&(d=mxResources.get("cancel"),f=function(){e();g.retry()}),"undefined"!=typeof gapi&&"undefined"!=typeof gapi.drive&&"undefined"!=typeof gapi.drive.realtime&&g.type==gapi.drive.realtime.ErrorType.FORBIDDEN)b=mxUtils.htmlEntities(mxResources.get("forbidden"));else if(404==g.code||404==g.status||"undefined"!=typeof gapi&&"undefined"!=typeof gapi.drive&&"undefined"!=typeof gapi.drive.realtime&&g.type==
-gapi.drive.realtime.ErrorType.NOT_FOUND){b=mxUtils.htmlEntities(mxResources.get("fileNotFoundOrDenied"));var h=window.location.hash;null!=h&&"#G"==h.substring(0,2)&&(h=h.substring(2),b+=' <a href="https://drive.google.com/open?id='+h+'" target="_blank">'+mxUtils.htmlEntities(mxResources.get("tryOpeningViaThisPage"))+"</a>")}else g.code==App.ERROR_TIMEOUT?b=mxUtils.htmlEntities(mxResources.get("timeout")):g.code==App.ERROR_BUSY?b=mxUtils.htmlEntities(mxResources.get("busy")):null!=g.message?b=mxUtils.htmlEntities(g.message):
-null!=g.response&&null!=g.response.error&&(b=mxUtils.htmlEntities(g.response.error));this.showError(a,b,d,c,f)}else null!=c&&c()};EditorUi.prototype.showError=function(b,a,c,d,f,h,k){b=new ErrorDialog(this,b,a,c,d,f,h,k);this.showDialog(b.container,340,150,!0,!1);b.init()};EditorUi.prototype.alert=function(b,a){var c=new ErrorDialog(this,null,b,mxResources.get("ok"),a);this.showDialog(c.container,340,100,!0,!1);c.init()};EditorUi.prototype.confirm=function(b,a,c,d,f){var e=null!=this.spinner&&null!=
-this.spinner.pause?this.spinner.pause():function(){};this.showDialog((new ConfirmDialog(this,b,function(){e();null!=a&&a()},function(){e();null!=c&&c()},d,f)).container,340,90,!0,!1)};EditorUi.prototype.setCurrentFile=function(b){this.currentFile=b};EditorUi.prototype.getCurrentFile=function(){return this.currentFile};EditorUi.prototype.isExportToCanvas=function(){return mxClient.IS_CHROMEAPP||!this.editor.graph.mathEnabled&&this.useCanvasForExport};EditorUi.prototype.createSvgDataUri=function(b){return"data:image/svg+xml;base64,"+
-btoa(unescape(encodeURIComponent(b)))};EditorUi.prototype.createImageDataUri=function(b,a,c){var e=b.toDataURL("image/"+c);if(6>=e.length||e==b.cloneNode(!1).toDataURL("image/"+c))throw{message:"Invalid image"};null!=a&&(e=this.writeGraphModelToPng(e,"zTXt","mxGraphModel",atob(this.editor.graph.compress(a))));return e};EditorUi.prototype.saveCanvas=function(b,a,c){var e="jpeg"==c?"jpg":c,g=this.getBaseFilename()+"."+e;b=this.createImageDataUri(b,a,c);this.saveData(g,e,b.substring(b.lastIndexOf(",")+
-1),"image/"+c,!0)};EditorUi.prototype.isLocalFileSave=function(){return"remote"!=urlParams.save&&(mxClient.IS_IE||"undefined"!==typeof window.Blob&&"undefined"!==typeof window.URL)&&9!=document.documentMode&&8!=document.documentMode&&7!=document.documentMode&&!mxClient.IS_QUIRKS||this.isOfflineApp()||mxClient.IS_IOS};EditorUi.prototype.doSaveLocalFile=function(b,a,c,d,f){if(window.Blob&&navigator.msSaveOrOpenBlob)b=d?this.base64ToBlob(b,c):new Blob([b],{type:c}),navigator.msSaveOrOpenBlob(b,a);else if(mxClient.IS_IE)c=
-window.open("about:blank","_blank"),null==c?mxUtils.popup(b,!0):(c.document.write(b),c.document.close(),c.document.execCommand("SaveAs",!0,a),c.close());else if(mxClient.IS_IOS)a=new TextareaDialog(this,a+":",b,null,null,mxResources.get("close")),a.textarea.style.width="600px",a.textarea.style.height="380px",this.showDialog(a.container,620,460,!0,!0),a.init(),document.execCommand("selectall",!1,null);else{var e=document.createElement("a"),g=!mxClient.IS_SF&&"undefined"!==typeof e.download;if(g||this.isOffline()){e.href=
-URL.createObjectURL(d?this.base64ToBlob(b,c):new Blob([b],{type:c}));g?e.download=a:e.setAttribute("target","_blank");document.body.appendChild(e);try{window.setTimeout(function(){URL.revokeObjectURL(e.href)},0),e.click(),e.parentNode.removeChild(e)}catch(t){}}else this.createEchoRequest(b,a,c,d,f).simulate(document,"_blank")}};EditorUi.prototype.createEchoRequest=function(b,a,c,d,f,h){b="xml="+encodeURIComponent(b);return new mxXmlRequest(SAVE_URL,b+(null!=c?"&mime="+c:"")+(null!=f?"&format="+f:
-"")+(null!=h?"&base64="+h:"")+(null!=a?"&filename="+encodeURIComponent(a):"")+(d?"&binary=1":""))};EditorUi.prototype.base64ToBlob=function(b,a){a=a||"";for(var c=atob(b),e=c.length,d=Math.ceil(e/1024),f=Array(d),h=0;h<d;++h){for(var k=1024*h,m=Math.min(k+1024,e),n=Array(m-k),p=0;k<m;++p,++k)n[p]=c[k].charCodeAt(0);f[h]=new Uint8Array(n)}return new Blob(f,{type:a})};EditorUi.prototype.saveLocalFile=function(b,a,c,d,f,h){h=null!=h?h:!1;var e="vsdx"!=f&&(!mxClient.IS_IOS||!navigator.standalone);f=this.getServiceCount(h);
-a=new CreateDialog(this,a,mxUtils.bind(this,function(a,e){try{if("_blank"==e)if(null==c||"image/"!=c.substring(0,6)||"image/svg"==c.substring(0,9)&&!mxClient.IS_SVG){var g=window.open("about:blank");null==g?mxUtils.popup(b,!0):(g.document.write(mxUtils.htmlEntities(b,!1)),g.document.close())}else this.openInNewWindow(b,c,d);else e==App.MODE_DEVICE?this.doSaveLocalFile(b,a,c,d):null!=a&&0<a.length&&this.pickFolder(e,mxUtils.bind(this,function(g){try{this.exportFile(b,a,c,d,e,g)}catch(w){this.handleError(w)}}))}catch(p){this.handleError(p)}}),
-mxUtils.bind(this,function(){this.hideDialog()}),mxResources.get("saveAs"),mxResources.get("download"),!1,h,e,null,null,4<f?3:4,b,c,d);this.showDialog(a.container,380,4<f?390:270,!0,!0);a.init()};EditorUi.prototype.openInNewWindow=function(b,a,c){if(mxClient.IS_GC||mxClient.IS_EDGE||11==document.documentMode||10==document.documentMode){var e=window.open("about:blank");null==e?mxUtils.popup(b,!0):(e.document.write('<html><img src="data:'+a+(c?";base64,"+b:";charset=utf8,"+encodeURIComponent(b))+'"/></html>'),
-e.document.close())}else e=window.open("data:"+a+(c?";base64,"+b:";charset=utf8,"+encodeURIComponent(b))),null==e&&mxUtils.popup(b,!0)};var d=EditorUi.prototype.addChromelessToolbarItems;EditorUi.prototype.addChromelessToolbarItems=function(b){if(this.isExportToCanvas()){this.exportDialog=null;var a=b(mxUtils.bind(this,function(b){var c=mxUtils.bind(this,function(){mxEvent.removeListener(this.editor.graph.container,"click",c);null!=this.exportDialog&&(this.exportDialog.parentNode.removeChild(this.exportDialog),
-this.exportDialog=null)});if(null!=this.exportDialog)c.apply(this);else{this.exportDialog=document.createElement("div");var e=a.getBoundingClientRect();mxUtils.setPrefixedStyle(this.exportDialog.style,"borderRadius","5px");this.exportDialog.style.position="fixed";this.exportDialog.style.textAlign="center";this.exportDialog.style.fontFamily="Helvetica,Arial";this.exportDialog.style.backgroundColor="#000000";this.exportDialog.style.width="50px";this.exportDialog.style.height="50px";this.exportDialog.style.padding=
-"4px 2px 4px 2px";this.exportDialog.style.color="#ffffff";mxUtils.setOpacity(this.exportDialog,70);this.exportDialog.style.left=e.left+"px";this.exportDialog.style.bottom=parseInt(this.chromelessToolbar.style.bottom)+this.chromelessToolbar.offsetHeight+4+"px";e=mxUtils.getCurrentStyle(this.editor.graph.container);this.exportDialog.style.zIndex=e.zIndex;var g=new Spinner({lines:8,length:6,width:5,radius:6,rotate:0,color:"#fff",speed:1.5,trail:60,shadow:!1,hwaccel:!1,top:"28px",zIndex:2E9});g.spin(this.exportDialog);
-this.exportToCanvas(mxUtils.bind(this,function(b){g.stop();this.exportDialog.style.width="auto";this.exportDialog.style.height="auto";this.exportDialog.style.padding="10px";var a=this.createImageDataUri(b,null,"png");b=document.createElement("img");b.style.maxWidth="140px";b.style.maxHeight="140px";b.style.cursor="pointer";b.setAttribute("title",mxResources.get("openInNewWindow"));b.setAttribute("border","0");b.setAttribute("src",a);this.exportDialog.appendChild(b);mxEvent.addListener(b,"click",mxUtils.bind(this,
-function(){this.openInNewWindow(a.substring(a.indexOf(",")+1),"image/png",!0);c.apply(this,arguments)}))}),null,this.thumbImageCache,null,mxUtils.bind(this,function(b){this.spinner.stop();this.handleError(b)}));mxEvent.addListener(this.editor.graph.container,"click",c);document.body.appendChild(this.exportDialog)}mxEvent.consume(b)}),Editor.cameraLargeImage,mxResources.get("export"))}d.apply(this,arguments)};EditorUi.prototype.saveData=function(b,a,c,d,f){this.isLocalFileSave()?this.saveLocalFile(c,
-b,d,f,a):this.saveRequest(b,a,mxUtils.bind(this,function(b,e){return this.createEchoRequest(c,b,d,f,a,e)}),c,f,d)};EditorUi.prototype.saveRequest=function(b,a,c,d,f,h){var e=!mxClient.IS_IOS||!navigator.standalone,g=this.getServiceCount(!1);b=new CreateDialog(this,b,mxUtils.bind(this,function(b,e){if("_blank"==e||null!=b&&0<b.length){var g=c("_blank"==e?null:b,e==App.MODE_DEVICE||null==e||"_blank"==e?"0":"1");null!=g&&(e==App.MODE_DEVICE||"_blank"==e?g.simulate(document,"_blank"):this.pickFolder(e,
-mxUtils.bind(this,function(c){h=null!=h?h:"pdf"==a?"application/pdf":"image/"+a;if(null!=d)try{this.exportFile(d,b,h,!0,e,c)}catch(C){this.handleError(C)}else this.spinner.spin(document.body,mxResources.get("saving"))&&g.send(mxUtils.bind(this,function(){this.spinner.stop();if(200<=g.getStatus()&&299>=g.getStatus())try{this.exportFile(g.getText(),b,h,!0,e,c)}catch(C){this.handleError(C)}else this.handleError({message:mxResources.get("errorSavingFile")})}),function(b){this.spinner.stop();this.handleError(b)})})))}}),
-mxUtils.bind(this,function(){this.hideDialog()}),mxResources.get("saveAs"),mxResources.get("download"),!1,!1,e,null,null,4<g?3:4,d,h,f);this.showDialog(b.container,380,4<g?390:270,!0,!0);b.init()};EditorUi.prototype.exportFile=function(b,a,c,d,f,h){};EditorUi.prototype.pickFolder=function(b,a,c){a(null)};EditorUi.prototype.exportSvg=function(b,a,c,d,f,h,k,m,n){if(this.spinner.spin(document.body,mxResources.get("export"))){var e=this.editor.graph.isSelectionEmpty();c=null!=c?c:e;e=a?null:this.editor.graph.background;
-e==mxConstants.NONE&&(e=null);null==e&&0==a&&(e="#ffffff");var g=this.editor.graph.getSvg(e,b,k,m,null,c);d&&this.editor.graph.addSvgShadow(g);var l=this.getBaseFilename()+".svg",q=mxUtils.bind(this,function(b){this.spinner.stop();f&&b.setAttribute("content",this.getFileData(!0,null,null,null,c,n));var a='<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">\n'+mxUtils.getXml(b);this.isLocalFileSave()||a.length<=MAX_REQUEST_SIZE?this.saveData(l,"svg",a,
-"image/svg+xml"):this.handleError({message:mxResources.get("drawingTooLarge")},mxResources.get("error"),mxUtils.bind(this,function(){mxUtils.popup(a)}))});this.convertMath(this.editor.graph,g,!1,mxUtils.bind(this,function(){h?(null==this.thumbImageCache&&(this.thumbImageCache={}),this.convertImages(g,q,this.thumbImageCache)):q(g)}))}};EditorUi.prototype.addCheckbox=function(b,a,c,d,f,h){h=null!=h?h:!0;var e=document.createElement("input");e.style.marginRight="8px";e.style.marginTop="16px";e.setAttribute("type",
-"checkbox");c&&(e.setAttribute("checked","checked"),e.defaultChecked=!0);d&&e.setAttribute("disabled","disabled");h&&(b.appendChild(e),mxUtils.write(b,a),f||mxUtils.br(b));return e};EditorUi.prototype.addEditButton=function(b,a){var c=this.addCheckbox(b,mxResources.get("edit")+":",!0,null,!0);c.style.marginLeft="24px";var e=this.getCurrentFile(),d="";null!=e&&e.getMode()!=App.MODE_DEVICE&&e.getMode()!=App.MODE_BROWSER&&(d=window.location.href);var f=document.createElement("select");f.style.width=
-"120px";f.style.marginLeft="8px";f.style.marginRight="10px";f.className="geBtn";e=document.createElement("option");e.setAttribute("value","blank");mxUtils.write(e,mxResources.get("makeCopy"));f.appendChild(e);e=document.createElement("option");e.setAttribute("value","custom");mxUtils.write(e,mxResources.get("custom")+"...");f.appendChild(e);b.appendChild(f);mxEvent.addListener(f,"change",mxUtils.bind(this,function(){if("custom"==f.value){var b=new FilenameDialog(this,d,mxResources.get("ok"),function(b){null!=
-b?d=b:f.value="blank"},mxResources.get("url"),null,null,null,null,function(){f.value="blank"});this.showDialog(b.container,300,80,!0,!1);b.init()}}));mxEvent.addListener(c,"change",mxUtils.bind(this,function(){c.checked&&(null==a||a.checked)?f.removeAttribute("disabled"):f.setAttribute("disabled","disabled")}));mxUtils.br(b);return{getLink:function(){return c.checked?"blank"===f.value?"_blank":d:null},getEditInput:function(){return c},getEditSelect:function(){return f}}};EditorUi.prototype.addLinkSection=
-function(b,a){function c(){h.innerHTML='<div style="width:100%;height:100%;box-sizing:border-box;'+(null!=f&&f!=mxConstants.NONE?"border:1px solid black;background-color:"+f:"background-position:center center;background-repeat:no-repeat;background-image:url('"+Dialog.prototype.closeImage+"')")+';"></div>'}mxUtils.write(b,mxResources.get("links")+":");var e=document.createElement("select");e.style.width="100px";e.style.marginLeft="8px";e.style.marginRight="10px";e.className="geBtn";var d=document.createElement("option");
-d.setAttribute("value","auto");mxUtils.write(d,mxResources.get("automatic"));e.appendChild(d);d=document.createElement("option");d.setAttribute("value","blank");mxUtils.write(d,mxResources.get("openInNewWindow"));e.appendChild(d);d=document.createElement("option");d.setAttribute("value","self");mxUtils.write(d,mxResources.get("openInThisWindow"));e.appendChild(d);a&&(d=document.createElement("option"),d.setAttribute("value","frame"),mxUtils.write(d,mxResources.get("openInThisWindow")+" ("+mxResources.get("iframe")+
-")"),e.appendChild(d));b.appendChild(e);mxUtils.write(b,mxResources.get("borderColor")+":");var f="#0000ff",h=null,h=mxUtils.button("",mxUtils.bind(this,function(b){this.pickColor(f||"none",function(b){f=b;c()});mxEvent.consume(b)}));c();h.style.padding=mxClient.IS_FF?"4px 2px 4px 2px":"4px";h.style.marginLeft="4px";h.style.height="22px";h.style.width="22px";h.style.position="relative";h.style.top=mxClient.IS_IE||mxClient.IS_IE11||mxClient.IS_EDGE?"6px":"1px";h.className="geColorBtn";b.appendChild(h);
-mxUtils.br(b);return{getColor:function(){return f},getTarget:function(){return e.value},focus:function(){e.focus()}}};EditorUi.prototype.createLink=function(b,a,c,d,f,h,k,m){var e=this.getCurrentFile(),g=[];d&&(g.push("lightbox=1"),"auto"!=b&&g.push("target="+b),null!=a&&a!=mxConstants.NONE&&g.push("highlight="+("#"==a.charAt(0)?a.substring(1):a)),null!=f&&0<f.length&&g.push("edit="+encodeURIComponent(f)),h&&g.push("layers=1"),this.editor.graph.foldingEnabled&&g.push("nav=1"));if(c&&null!=this.pages&&
-null!=this.currentPage)for(b=0;b<this.pages.length;b++)if(this.pages[b]==this.currentPage){0<b&&g.push("page="+b);break}b=!0;null!=k?c="#U"+encodeURIComponent(k):(e=this.getCurrentFile(),m||null==e||e.constructor!=window.DriveFile?c="#R"+encodeURIComponent(c?this.getFileData(!0,null,null,null,null,null,null,!0):this.editor.graph.compress(mxUtils.getXml(this.editor.getGraphXml()))):(c="#"+e.getHash(),b=!1));b&&null!=e&&null!=e.getTitle()&&e.getTitle()!=this.defaultFilename&&g.push("title="+encodeURIComponent(e.getTitle()));
-return(mxClient.IS_CHROMEAPP||EditorUi.isElectronApp?"https://www.draw.io/":"https://"+location.host+"/")+(0<g.length?"?"+g.join("&"):"")+c};EditorUi.prototype.createHtml=function(b,a,c,d,f,h,k,m,n,x,p){this.getBasenames();var e={};""!=f&&f!=mxConstants.NONE&&(e.highlight=f);"auto"!==d&&(e.target=d);n||(e.lightbox=!1);e.nav=this.editor.graph.foldingEnabled;c=parseInt(c);isNaN(c)||100==c||(e.zoom=c/100);c=[];k&&(c.push("pages"),e.resize=!0,null!=this.pages&&null!=this.currentPage&&(e.page=mxUtils.indexOf(this.pages,
-this.currentPage)));a&&(c.push("zoom"),e.resize=!0);m&&c.push("layers");0<c.length&&(n&&c.push("lightbox"),e.toolbar=c.join(" "));null!=x&&0<x.length&&(e.edit=x);null!=b?e.url=b:e.xml=this.getFileData(!0,null,null,null,null,!k);a='<div class="mxgraph" style="'+(h?"max-width:100%;":"")+(""!=c?"border:1px solid transparent;":"")+'" data-mxgraph="'+mxUtils.htmlEntities(JSON.stringify(e))+'"></div>';b=null!=b?"&fetch="+encodeURIComponent(b):"";p(a,'<script type="text/javascript" src="'+(0<b.length?("1"==
-urlParams.dev?"https://test.draw.io/embed2.js?dev=1":"https://www.draw.io/embed2.js?")+b:"1"==urlParams.dev?"https://test.draw.io/js/viewer.min.js":"https://www.draw.io/js/viewer.min.js")+'">\x3c/script>')};EditorUi.prototype.showHtmlDialog=function(b,a,c,d){var e=document.createElement("div");e.style.whiteSpace="nowrap";var g=document.createElement("h3");mxUtils.write(g,mxResources.get("html"));g.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:12px";e.appendChild(g);var f=
-document.createElement("div");f.style.cssText="border-bottom:1px solid lightGray;padding-bottom:8px;margin-bottom:12px;";var l=document.createElement("input");l.style.cssText="margin-right:8px;margin-top:8px;margin-bottom:8px;";l.setAttribute("value","url");l.setAttribute("type","radio");l.setAttribute("name","type-embedhtmldialog");g=l.cloneNode(!0);g.setAttribute("value","copy");f.appendChild(g);var h=document.createElement("span");mxUtils.write(h,mxResources.get("includeCopyOfMyDiagram"));f.appendChild(h);
-mxUtils.br(f);f.appendChild(l);h=document.createElement("span");mxUtils.write(h,mxResources.get("publicDiagramUrl"));f.appendChild(h);var k=this.getCurrentFile();null==c&&null!=k&&k.constructor==window.DriveFile&&(h=document.createElement("a"),h.style.paddingLeft="12px",h.style.color="gray",h.setAttribute("href","javascript:void(0);"),mxUtils.write(h,mxResources.get("share")),f.appendChild(h),mxEvent.addListener(h,"click",mxUtils.bind(this,function(){this.hideDialog();this.drive.showPermissions(k.getId())})));
-g.setAttribute("checked","checked");null==c&&l.setAttribute("disabled","disabled");e.appendChild(f);var p=this.addLinkSection(e),m=this.addCheckbox(e,mxResources.get("zoom"),!0,null,!0);mxUtils.write(e,":");var n=document.createElement("input");n.setAttribute("type","text");n.style.marginRight="16px";n.style.width="60px";n.style.marginLeft="4px";n.style.marginRight="12px";n.value="100%";e.appendChild(n);var F=this.addCheckbox(e,mxResources.get("fit"),!0),f=null!=this.pages&&1<this.pages.length,B=
-B=this.addCheckbox(e,mxResources.get("allPages"),f,!f),G=this.addCheckbox(e,mxResources.get("layers"),!0),z=this.addCheckbox(e,mxResources.get("lightbox"),!0),D=this.addEditButton(e,z),A=D.getEditInput();A.style.marginBottom="16px";mxEvent.addListener(z,"change",function(){z.checked?A.removeAttribute("disabled"):A.setAttribute("disabled","disabled");A.checked&&z.checked?D.getEditSelect().removeAttribute("disabled"):D.getEditSelect().setAttribute("disabled","disabled")});b=new CustomDialog(this,e,
-mxUtils.bind(this,function(){d(l.checked?c:null,m.checked,n.value,p.getTarget(),p.getColor(),F.checked,B.checked,G.checked,z.checked,D.getLink())}),null,b,a);this.showDialog(b.container,340,360,!0,!0);g.focus()};EditorUi.prototype.showPublishLinkDialog=function(b,a,c,d,f,h){var e=document.createElement("div");e.style.whiteSpace="nowrap";var g=document.createElement("h3");mxUtils.write(g,b||mxResources.get("link"));g.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:12px";e.appendChild(g);
-var l=this.getCurrentFile(),g="https://desk.draw.io/support/solutions/articles/16000051941";b=0;if(null!=l&&l.constructor==window.DriveFile&&!a){b=80;var g="https://desk.draw.io/support/solutions/articles/16000039384",k=document.createElement("div");k.style.cssText="border-bottom:1px solid lightGray;padding-bottom:14px;padding-top:6px;margin-bottom:14px;text-align:center;";var p=document.createElement("div");p.style.whiteSpace="normal";mxUtils.write(p,mxResources.get("linkAccountRequired"));k.appendChild(p);
-p=mxUtils.button(mxResources.get("share"),mxUtils.bind(this,function(){this.drive.showPermissions(l.getId())}));p.style.marginTop="12px";p.className="geBtn";k.appendChild(p);e.appendChild(k);p=document.createElement("a");p.style.paddingLeft="12px";p.style.color="gray";p.style.fontSize="11px";p.setAttribute("href","javascript:void(0);");mxUtils.write(p,mxResources.get("check"));k.appendChild(p);mxEvent.addListener(p,"click",mxUtils.bind(this,function(){this.spinner.spin(document.body,mxResources.get("loading"))&&
-this.getPublicUrl(this.getCurrentFile(),mxUtils.bind(this,function(b){this.spinner.stop();b=new ErrorDialog(this,null,mxResources.get(null!=b?"diagramIsPublic":"diagramIsNotPublic"),mxResources.get("ok"));this.showDialog(b.container,300,80,!0,!1);b.init()}))}))}var m=null,q=null;if(null!=c||null!=d)b+=30,mxUtils.write(e,mxResources.get("width")+":"),m=document.createElement("input"),m.setAttribute("type","text"),m.style.marginRight="16px",m.style.width="50px",m.style.marginLeft="6px",m.style.marginRight=
-"16px",m.style.marginBottom="10px",m.value="100%",e.appendChild(m),mxUtils.write(e,mxResources.get("height")+":"),q=document.createElement("input"),q.setAttribute("type","text"),q.style.width="50px",q.style.marginLeft="6px",q.style.marginBottom="10px",q.value=d+"px",e.appendChild(q),mxUtils.br(e);var n=this.addLinkSection(e,h);c=null!=this.pages&&1<this.pages.length;var v=null;if(null==l||l.constructor!=window.DriveFile||a)v=this.addCheckbox(e,mxResources.get("allPages"),c,!c);var G=this.addCheckbox(e,
-mxResources.get("lightbox"),!0),z=this.addEditButton(e,G),D=z.getEditInput(),A=this.addCheckbox(e,mxResources.get("layers"),!0);A.style.marginLeft=D.style.marginLeft;A.style.marginBottom="16px";A.style.marginTop="8px";mxEvent.addListener(G,"change",function(){G.checked?(A.removeAttribute("disabled"),D.removeAttribute("disabled")):(A.setAttribute("disabled","disabled"),D.setAttribute("disabled","disabled"));D.checked&&G.checked?z.getEditSelect().removeAttribute("disabled"):z.getEditSelect().setAttribute("disabled",
-"disabled")});a=new CustomDialog(this,e,mxUtils.bind(this,function(){f(n.getTarget(),n.getColor(),null==v?!0:v.checked,G.checked,z.getLink(),A.checked,null!=m?m.value:null,null!=q?q.value:null)}),null,mxResources.get("create"),g);this.showDialog(a.container,340,246+b,!0,!0);null!=m?(m.focus(),mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode||mxClient.IS_QUIRKS?m.select():document.execCommand("selectAll",!1,null)):n.focus()};EditorUi.prototype.showRemoteExportDialog=function(b,a,c,d){var e=
-document.createElement("div");e.style.whiteSpace="nowrap";var g=document.createElement("h3");mxUtils.write(g,mxResources.get("image"));g.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:4px";e.appendChild(g);var f=this.addCheckbox(e,mxResources.get("selectionOnly"),!1,this.editor.graph.isSelectionEmpty()),l=d?null:this.addCheckbox(e,mxResources.get("includeCopyOfMyDiagram"),!0);null!=l&&(l.style.marginBottom="16px");b=new CustomDialog(this,e,mxUtils.bind(this,function(){c(!f.checked,
-null!=l?l.checked:!1)}),null,b,a);this.showDialog(b.container,300,d?100:146,!0,!0)};EditorUi.prototype.showExportDialog=function(b,a,c,d,f,h,k,m){k=null!=k?k:!0;var e=document.createElement("div");e.style.whiteSpace="nowrap";var g=this.editor.graph,l="jpeg"==m?170:280,q=document.createElement("h3");mxUtils.write(q,b);q.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:10px";e.appendChild(q);mxUtils.write(e,mxResources.get("zoom")+":");var t=document.createElement("input");t.setAttribute("type",
-"text");t.style.marginRight="16px";t.style.width="60px";t.style.marginLeft="4px";t.style.marginRight="12px";t.value=this.lastExportZoom||"100%";e.appendChild(t);mxUtils.write(e,mxResources.get("borderWidth")+":");var n=document.createElement("input");n.setAttribute("type","text");n.style.marginRight="16px";n.style.width="60px";n.style.marginLeft="4px";n.value=this.lastExportBorder||"0";e.appendChild(n);mxUtils.br(e);var u=this.addCheckbox(e,mxResources.get("transparentBackground"),g.background==mxConstants.NONE||
-null==g.background,null,null,"jpeg"!=m),v=this.addCheckbox(e,mxResources.get("selectionOnly"),!1,g.isSelectionEmpty()),z=document.createElement("input");z.style.marginTop="16px";z.style.marginRight="8px";z.style.marginLeft="24px";z.setAttribute("disabled","disabled");z.setAttribute("type","checkbox");h&&(e.appendChild(z),mxUtils.write(e,mxResources.get("crop")),mxUtils.br(e),l+=26,mxEvent.addListener(v,"change",function(){v.checked?z.removeAttribute("disabled"):z.setAttribute("disabled","disabled")}));
-g.isSelectionEmpty()||(z.setAttribute("checked","checked"),z.defaultChecked=!0);var D=this.addCheckbox(e,mxResources.get("shadow"),g.shadowVisible),A=document.createElement("input");A.style.marginTop="16px";A.style.marginRight="8px";A.setAttribute("type","checkbox");!this.isOffline()&&this.canvasSupported||A.setAttribute("disabled","disabled");a&&(e.appendChild(A),mxUtils.write(e,mxResources.get("embedImages")),mxUtils.br(e),l+=26);var H=this.addCheckbox(e,mxResources.get("includeCopyOfMyDiagram"),
-k,null,null,"jpeg"!=m),E=null!=this.pages&&1<this.pages.length,I=this.addCheckbox(e,E?mxResources.get("allPages"):"",E,!E,null,"jpeg"!=m);I.style.marginLeft="24px";I.style.marginBottom="16px";E||(I.style.visibility="hidden");mxEvent.addListener(H,"change",function(){H.checked&&E?I.removeAttribute("disabled"):I.setAttribute("disabled","disabled")});k&&E||I.setAttribute("disabled","disabled");b=new CustomDialog(this,e,mxUtils.bind(this,function(){this.lastExportBorder=n.value;this.lastExportZoom=t.value;
-f(t.value,u.checked,!v.checked,D.checked,H.checked,A.checked,n.value,z.checked,!I.checked)}),null,c,d);this.showDialog(b.container,320,l,!0,!0);t.focus();mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode||mxClient.IS_QUIRKS?t.select():document.execCommand("selectAll",!1,null)};EditorUi.prototype.showEmbedImageDialog=function(b,a,c,d,f){var e=document.createElement("div");e.style.whiteSpace="nowrap";var g=this.editor.graph;if(null!=a){var l=document.createElement("h3");mxUtils.write(l,a);l.style.cssText=
-"width:100%;text-align:center;margin-top:0px;margin-bottom:4px";e.appendChild(l)}var h=this.addCheckbox(e,mxResources.get("fit"),!0),k=this.addCheckbox(e,mxResources.get("shadow"),g.shadowVisible&&d,!d),p=this.addCheckbox(e,c),m=this.addCheckbox(e,mxResources.get("lightbox"),!0),q=this.addEditButton(e,m),n=q.getEditInput(),B=1<g.model.getChildCount(g.model.getRoot()),G=this.addCheckbox(e,mxResources.get("layers"),B,!B);G.style.marginLeft=n.style.marginLeft;G.style.marginBottom="12px";G.style.marginTop=
-"8px";mxEvent.addListener(m,"change",function(){m.checked?(B&&G.removeAttribute("disabled"),n.removeAttribute("disabled")):(G.setAttribute("disabled","disabled"),n.setAttribute("disabled","disabled"));n.checked&&m.checked?q.getEditSelect().removeAttribute("disabled"):q.getEditSelect().setAttribute("disabled","disabled")});a=new CustomDialog(this,e,mxUtils.bind(this,function(){b(h.checked,k.checked,p.checked,m.checked,q.getLink(),G.checked)}),null,mxResources.get("embed"),f);this.showDialog(a.container,
-280,280,!0,!0)};EditorUi.prototype.createEmbedImage=function(b,a,c,d,f,h,k,m){function e(a){var e=" ",l="";d&&(e=" onclick=\"(function(img){if(img.wnd!=null&&!img.wnd.closed){img.wnd.focus();}else{var r=function(evt){if(evt.data=='ready'&&evt.source==img.wnd){img.wnd.postMessage(decodeURIComponent(img.getAttribute('src')),'*');window.removeEventListener('message',r);}};window.addEventListener('message',r);img.wnd=window.open('https://www.draw.io/?client=1&lightbox=1"+(f?"&edit=_blank":"")+(h?"&layers=1":
-"")+"');}})(this);\"",l+="cursor:pointer;");b&&(l+="max-width:100%;");var p="";c&&(p=' width="'+Math.round(g.width)+'" height="'+Math.round(g.height)+'"');k('<img src="'+a+'"'+p+(""!=l?' style="'+l+'"':"")+e+"/>")}var g=this.editor.graph.getGraphBounds();if(this.isExportToCanvas())this.exportToCanvas(mxUtils.bind(this,function(b){var a=d?this.getFileData(!0):null;b=this.createImageDataUri(b,a,"png");e(b)}),null,null,null,mxUtils.bind(this,function(b){m({message:mxResources.get("unknownError")})}),
-null,!0,c?2:1,null,a);else if(a=this.getFileData(!0),g.width*g.height<=MAX_AREA&&a.length<=MAX_REQUEST_SIZE){var l="";c&&(l="&w="+Math.round(2*g.width)+"&h="+Math.round(2*g.height));var q=new mxXmlRequest(EXPORT_URL,"format=png&base64=1&embedXml="+(d?"1":"0")+l+"&xml="+encodeURIComponent(a));q.send(mxUtils.bind(this,function(){200<=q.getStatus()&&299>=q.getStatus()?e("data:image/png;base64,"+q.getText()):m({message:mxResources.get("unknownError")})}))}else m({message:mxResources.get("drawingTooLarge")})};
-EditorUi.prototype.createEmbedSvg=function(b,a,c,d,f,h,k){var e=this.editor.graph.getSvg(),g=e.getElementsByTagName("a");if(null!=g)for(var l=0;l<g.length;l++){var p=g[l].getAttribute("href");null!=p&&"#"==p.charAt(0)&&"_blank"==g[l].getAttribute("target")&&g[l].removeAttribute("target")}d&&e.setAttribute("content",this.getFileData(!0));a&&this.editor.graph.addSvgShadow(e);if(c){var m=" ",q="";d&&(m="onclick=\"(function(img){if(img.wnd!=null&&!img.wnd.closed){img.wnd.focus();}else{var r=function(evt){if(evt.data=='ready'&&evt.source==img.wnd){img.wnd.postMessage(decodeURIComponent(img.getAttribute('src')),'*');window.removeEventListener('message',r);}};window.addEventListener('message',r);img.wnd=window.open('https://www.draw.io/?client=1&lightbox=1"+
-(f?"&edit=_blank":"")+(h?"&layers=1":"")+"');}})(this);\"",q+="cursor:pointer;");b&&(q+="max-width:100%;");this.convertImages(e,mxUtils.bind(this,function(b){k('<img src="'+this.createSvgDataUri(mxUtils.getXml(b))+'"'+(""!=q?' style="'+q+'"':"")+m+"/>")}))}else q="",d&&(e.setAttribute("onclick","(function(svg){var src=window.event.target||window.event.srcElement;while (src!=null&&src.nodeName.toLowerCase()!='a'){src=src.parentNode;}if(src==null){if(svg.wnd!=null&&!svg.wnd.closed){svg.wnd.focus();}else{var r=function(evt){if(evt.data=='ready'&&evt.source==svg.wnd){svg.wnd.postMessage(decodeURIComponent(svg.getAttribute('content')),'*');window.removeEventListener('message',r);}};window.addEventListener('message',r);svg.wnd=window.open('https://www.draw.io/?client=1&lightbox=1"+
-(f?"&edit=_blank":"")+(h?"&layers=1":"")+"');}}})(this);"),q+="cursor:pointer;"),b&&(b=parseInt(e.getAttribute("width")),a=parseInt(e.getAttribute("height")),e.setAttribute("viewBox","0 0 "+b+" "+a),q+="max-width:100%;max-height:"+a+"px;",e.removeAttribute("height")),""!=q&&e.setAttribute("style",q),k(mxUtils.getXml(e))};EditorUi.prototype.timeSince=function(b){b=Math.floor((new Date-b)/1E3);var a=Math.floor(b/31536E3);if(1<a)return a+" "+mxResources.get("years");a=Math.floor(b/2592E3);if(1<a)return a+
+(this.editor.graph.selectUnlockedLayer(),this.showLayersDialog(),this.restoreLibraries(),window.self!==window.top&&window.focus()):this.editor.graph.lightbox&&this.lightboxFit();this.chromelessResize&&this.chromelessResize();this.editor.fireEvent(new mxEventObject("fileLoaded"));a=!0;if(EditorUi.enableLogging&&!this.isOffline()&&null!=b.getMode())try{"function"===typeof window.ga&&ga("send","event","File","open",b.getMode())}catch(p){}if(this.mode==b.getMode()&&b.getMode()!=App.MODE_DEVICE&&null!=
+b.getMode())try{this.addRecent({id:b.getHash(),title:b.getTitle(),mode:b.getMode()})}catch(p){}try{mxSettings.setOpenCounter(mxSettings.getOpenCounter()+1),mxSettings.save()}catch(p){}}catch(p){null!=window.console&&console.log("error in fileLoaded:",b,p);if(EditorUi.enableLogging&&!this.isOffline())try{(new Image).src=(null!=window.DRAWIO_LOG_URL?window.DRAWIO_LOG_URL:"")+"/log?v="+encodeURIComponent(EditorUi.VERSION)+"&msg=errorInFileLoaded:url:"+encodeURIComponent(window.location.href)+(null!=
+p&&null!=p.message?":err:"+encodeURIComponent(p.message):"")+(null!=p&&null!=p.stack?"&stack="+encodeURIComponent(p.stack):"")}catch(u){}this.handleError(p,mxResources.get("errorLoadingFile"),mxUtils.bind(this,function(){null!=urlParams.url&&this.spinner.spin(document.body,mxResources.get("reconnecting"))?window.location.search=this.getSearch(["url"]):null!=c?c.constructor==DriveFile?this.loadFile(c.getHash()):this.fileLoaded(c):d()}))}else d();return a};EditorUi.prototype.restoreLibraries=function(){};
+EditorUi.prototype.saveLibrary=function(b,a,c,d,f,h,k){};EditorUi.prototype.isScratchpadEnabled=function(){return isLocalStorage||mxClient.IS_CHROMEAPP};EditorUi.prototype.toggleScratchpad=function(){this.isScratchpadEnabled()&&(null==this.scratchpad?this.getLocalData(".scratchpad",mxUtils.bind(this,function(b){null==b&&(b=this.emptyLibraryXml);this.loadLibrary(new StorageLibrary(this,b,".scratchpad"))})):this.closeLibrary(this.scratchpad))};EditorUi.prototype.createLibraryDataFromImages=function(b){var a=
+mxUtils.createXmlDocument(),c=a.createElement("mxlibrary");mxUtils.setTextContent(c,JSON.stringify(b));a.appendChild(c);return mxUtils.getXml(a)};EditorUi.prototype.closeLibrary=function(b){null!=b&&(this.removeLibrarySidebar(b.getHash()),b.constructor!=LocalLibrary&&mxSettings.removeCustomLibrary(b.getHash()),".scratchpad"==b.title&&(this.scratchpad=null))};EditorUi.prototype.removeLibrarySidebar=function(b){var a=this.sidebar.palettes[b];if(null!=a){for(var c=0;c<a.length;c++)a[c].parentNode.removeChild(a[c]);
+delete this.sidebar.palettes[b]}};EditorUi.prototype.repositionLibrary=function(b){var a=this.sidebar.container;if(null==b){var c=this.sidebar.palettes["L.scratchpad"];null==c&&(c=this.sidebar.palettes.search);null!=c&&(b=c[c.length-1].nextSibling)}b=null!=b?b:a.firstChild.nextSibling.nextSibling;var c=a.lastChild,d=c.previousSibling;a.insertBefore(c,b);a.insertBefore(d,c)};EditorUi.prototype.loadLibrary=function(b){var a=mxUtils.parseXml(b.getData());if("mxlibrary"==a.documentElement.nodeName){var c=
+JSON.parse(mxUtils.getTextContent(a.documentElement));this.libraryLoaded(b,c,a.documentElement.getAttribute("title"))}else throw{message:mxResources.get("notALibraryFile")};};EditorUi.prototype.getLibraryStorageHint=function(b){return""};EditorUi.prototype.libraryLoaded=function(b,a,c){b.constructor!=LocalLibrary&&mxSettings.addCustomLibrary(b.getHash());".scratchpad"==b.title&&(this.scratchpad=b);var e=this.sidebar.palettes[b.getHash()],e=null!=e?e[e.length-1].nextSibling:null;this.removeLibrarySidebar(b.getHash());
+var g=null,d=mxUtils.bind(this,function(a,c){if(0==a.length&&b.isEditable())null==g&&(g=document.createElement("div"),mxUtils.setPrefixedStyle(g.style,"borderRadius","6px"),g.style.border="3px dotted lightGray",g.style.textAlign="center",g.style.padding="8px",g.style.color="#B3B3B3",mxUtils.write(g,mxResources.get("dragElementsHere"))),c.appendChild(g);else for(var e=0;e<a.length;e++){var d=a[e],l=d.data;if(null!=l){var l=this.convertDataUri(l),f="shape=image;verticalLabelPosition=bottom;verticalAlign=top;imageAspect=0;";
+"fixed"==d.aspect&&(f+="aspect=fixed;");c.appendChild(this.sidebar.createVertexTemplate(f+"image="+l,d.w,d.h,"",d.title||"",!1,!1,!1))}else null!=d.xml&&(l=this.stringToCells(this.editor.graph.decompress(d.xml)),0<l.length&&c.appendChild(this.sidebar.createVertexTemplateFromCells(l,d.w,d.h,d.title||"",!0,!1,!1)))}});c=null!=c&&0<c.length?c:b.getTitle();var f=this.sidebar.addPalette(b.getHash(),c,!0,mxUtils.bind(this,function(b){d(a,b)}));this.repositionLibrary(e);var h=f.parentNode.previousSibling;
+c=h.getAttribute("title");null!=c&&0<c.length&&".scratchpad"!=b.title&&h.setAttribute("title",this.getLibraryStorageHint(b)+"\n"+c);var k=document.createElement("div");k.style.position="absolute";k.style.right="0px";k.style.top="5px";mxClient.IS_QUIRKS||8==document.documentMode||(k.style.backgroundColor="inherit");h.style.position="relative";var m=document.createElement("img");m.setAttribute("src",Dialog.prototype.closeImage);m.setAttribute("title",mxResources.get("close"));m.setAttribute("align",
+"top");m.setAttribute("border","0");m.className="geButton";m.style.marginRight="1px";m.style.marginTop="-1px";k.appendChild(m);var t=null;mxEvent.addListener(m,"click",mxUtils.bind(this,function(a){if(!mxEvent.isConsumed(a)){var c=mxUtils.bind(this,function(){this.closeLibrary(b)});null!=t?this.confirm(mxResources.get("allChangesLost"),null,c,mxResources.get("cancel"),mxResources.get("discardChanges")):c();mxEvent.consume(a)}}));mxEvent.addListener(f,"mousemove",mxUtils.bind(this,function(b){mxEvent.getSource(b)==
+f?f.setAttribute("title",mxResources.get("libraryTooltip")):f.removeAttribute("title")}));if(b.isEditable()){var w=this.editor.graph,n=mxUtils.bind(this,function(c){this.showLibraryDialog(b.getTitle(),f,a,b,b.getMode());mxEvent.consume(c)}),F=mxUtils.bind(this,function(c){b.setModified(!0);b.isAutosave()?(null!=z&&null!=z.parentNode&&z.parentNode.removeChild(z),z=m.cloneNode(!1),z.setAttribute("src",Editor.spinImage),z.setAttribute("title",mxResources.get("saving")),z.style.cursor="default",z.style.marginRight=
+"2px",z.style.marginTop="-2px",k.insertBefore(z,k.firstChild),h.style.paddingRight=18*k.childNodes.length+"px",this.saveLibrary(b.getTitle(),a,b,b.getMode(),!0,!0,function(){null!=z&&null!=z.parentNode&&(z.parentNode.removeChild(z),h.style.paddingRight=18*k.childNodes.length+"px")})):null==t&&(t=m.cloneNode(!1),t.setAttribute("src",IMAGE_PATH+"/download.png"),t.setAttribute("title",mxResources.get("save")),k.insertBefore(t,k.firstChild),mxEvent.addListener(t,"click",mxUtils.bind(this,function(c){this.saveLibrary(b.getTitle(),
+a,b,b.getMode(),b.constructor==LocalLibrary,!0,function(){null==t||b.isModified()||(h.style.paddingRight=18*k.childNodes.length+"px",t.parentNode.removeChild(t),t=null)});mxEvent.consume(c)})),h.style.paddingRight=18*k.childNodes.length+"px")}),B=mxUtils.bind(this,function(b,c,e,d){b=w.cloneCells(mxUtils.sortCells(w.model.getTopmostCells(b)));for(var l=0;l<b.length;l++){var t=w.getCellGeometry(b[l]);null!=t&&t.translate(-c.x,-c.y)}f.appendChild(this.sidebar.createVertexTemplateFromCells(b,c.width,
+c.height,d||"",!0,!1,!1));b={xml:this.editor.graph.compress(mxUtils.getXml(this.editor.graph.encodeCells(b))),w:c.width,h:c.height};null!=d&&(b.title=d);a.push(b);F(e);null!=g&&null!=g.parentNode&&0<a.length&&(g.parentNode.removeChild(g),g=null)}),G=mxUtils.bind(this,function(b){if(w.isSelectionEmpty())w.getRubberband().isActive()?(w.getRubberband().execute(b),w.getRubberband().reset()):this.showError(mxResources.get("error"),mxResources.get("nothingIsSelected"),mxResources.get("ok"));else{var a=
+w.getSelectionCells(),c=w.view.getBounds(a),e=w.view.scale;c.x/=e;c.y/=e;c.width/=e;c.height/=e;c.x-=w.view.translate.x;c.y-=w.view.translate.y;B(a,c)}mxEvent.consume(b)});f.style.border="3px solid transparent";mxEvent.addGestureListeners(f,function(){},mxUtils.bind(this,function(b){w.isMouseDown&&null!=w.panningManager&&null!=w.graphHandler.shape&&(w.graphHandler.shape.node.style.visibility="hidden",null!=g?g.style.border="3px dotted rgb(254, 137, 12)":f.style.border="3px dotted rgb(254, 137, 12)",
+f.style.cursor="copy",w.panningManager.stop(),w.autoScroll=!1,null!=w.graphHandler.guide&&w.graphHandler.guide.setVisible(!1),null!=w.graphHandler.hint&&(w.graphHandler.hint.style.visibility="hidden"),mxEvent.consume(b))}),mxUtils.bind(this,function(b){w.isMouseDown&&null!=w.panningManager&&null!=w.graphHandler&&(f.style.border="3px solid transparent",null!=g&&(g.style.border="3px dotted lightGray"),f.style.cursor="default",this.sidebar.showTooltips=!0,w.panningManager.stop(),w.graphHandler.reset(),
+w.isMouseDown=!1,w.autoScroll=!0,G(b),mxEvent.consume(b))}));mxEvent.addListener(f,"mouseleave",mxUtils.bind(this,function(b){w.isMouseDown&&null!=w.graphHandler.shape&&(w.graphHandler.shape.node.style.visibility="visible",f.style.border="3px solid transparent",f.style.cursor="",w.autoScroll=!0,null!=w.graphHandler.guide&&w.graphHandler.guide.setVisible(!0),null!=w.graphHandler.hint&&(w.graphHandler.hint.style.visibility="visible"),null!=g&&(g.style.border="3px dotted lightGray"))}));Graph.fileSupport&&
+(mxEvent.addListener(f,"dragover",mxUtils.bind(this,function(b){null!=g?g.style.border="3px dotted rgb(254, 137, 12)":f.style.border="3px dotted rgb(254, 137, 12)";b.dataTransfer.dropEffect="copy";f.style.cursor="copy";this.sidebar.hideTooltip();b.stopPropagation();b.preventDefault()})),mxEvent.addListener(f,"drop",mxUtils.bind(this,function(b){f.style.border="3px solid transparent";f.style.cursor="";null!=g&&(g.style.border="3px dotted lightGray");0<b.dataTransfer.files.length&&this.importFiles(b.dataTransfer.files,
+0,0,this.maxImageSize,mxUtils.bind(this,function(c,e,l,t,h,p,k,m,q){if(null!=c&&"image/"==e.substring(0,6))c="shape=image;verticalLabelPosition=bottom;verticalAlign=top;aspect=fixed;image="+this.convertDataUri(c),c=[new mxCell("",new mxGeometry(0,0,h,p),c)],c[0].vertex=!0,B(c,new mxRectangle(0,0,h,p),b,mxEvent.isAltDown(b)?null:k.substring(0,k.lastIndexOf(".")).replace(/_/g," ")),null!=g&&null!=g.parentNode&&0<a.length&&(g.parentNode.removeChild(g),g=null);else{var w=!1,n=mxUtils.bind(this,function(c,
+e){if(null!=c&&"text/xml"==e){var l=mxUtils.parseXml(c);if("mxlibrary"==l.documentElement.nodeName)try{var t=JSON.parse(mxUtils.getTextContent(l.documentElement));d(t,f);a=a.concat(t);F(b);this.spinner.stop();w=!0}catch(V){}else if("mxfile"==l.documentElement.nodeName)try{for(var h=l.documentElement.getElementsByTagName("diagram"),l=0;l<h.length;l++){var t=mxUtils.getTextContent(h[l]),p=this.stringToCells(this.editor.graph.decompress(t)),k=this.editor.graph.getBoundingBoxFromGeometry(p);B(p,new mxRectangle(0,
+0,k.width,k.height),b)}w=!0}catch(V){null!=window.console&&console.log("error in drop handler:",V)}}w||(this.spinner.stop(),this.handleError({message:mxResources.get("errorLoadingFile")}));null!=g&&null!=g.parentNode&&0<a.length&&(g.parentNode.removeChild(g),g=null)});!this.isOffline()&&(new XMLHttpRequest).upload&&this.isRemoteFileFormat(c,k)&&null!=q?this.parseFile(q,mxUtils.bind(this,function(b){4==b.readyState&&(this.spinner.stop(),200<=b.status&&299>=b.status?n(b.responseText,"text/xml"):this.handleError({message:mxResources.get(413==
+b.status?"drawingTooLarge":"invalidOrMissingFile")},mxResources.get("errorLoadingFile")))})):n(c,e)}}));b.stopPropagation();b.preventDefault()})),mxEvent.addListener(f,"dragleave",function(b){null!=g?g.style.border="3px dotted lightGray":(f.style.border="3px solid transparent",f.style.cursor="");b.stopPropagation();b.preventDefault()}));m=m.cloneNode(!1);m.setAttribute("src",IMAGE_PATH+"/edit.gif");m.setAttribute("title",mxResources.get("edit"));k.insertBefore(m,k.firstChild);mxEvent.addListener(m,
+"click",n);mxEvent.addListener(f,"dblclick",function(b){mxEvent.getSource(b)==f&&n(b)});m=m.cloneNode(!1);m.setAttribute("src",Editor.plusImage);m.setAttribute("title",mxResources.get("add"));k.insertBefore(m,k.firstChild);this.isOffline()||".scratchpad"!=b.title||(c=document.createElement("span"),c.setAttribute("title",mxResources.get("help")),c.style.cssText="color:gray;text-decoration:none;",c.className="geButton",mxUtils.write(c,"?"),mxEvent.addGestureListeners(c,mxUtils.bind(this,function(b){window.open("https://desk.draw.io/support/solutions/articles/16000042367");
+mxEvent.consume(b)})),k.insertBefore(c,k.firstChild));var z=null;mxEvent.addListener(m,"click",G)}h.appendChild(k);h.style.paddingRight=18*k.childNodes.length+"px"};"1"==urlParams.offline?EditorUi.prototype.footerHeight=4:("atlas"==uiTheme?("undefined"!==typeof Toolbar&&(Toolbar.prototype.unselectedBackground=mxClient.IS_QUIRKS?"none":"linear-gradient(rgb(255, 255, 255) 0px, rgb(242, 242, 242) 100%)",Toolbar.prototype.selectedBackground="rgb(242, 242, 242)"),Editor.prototype.initialTopSpacing=3,EditorUi.prototype.menubarHeight=
+41,EditorUi.prototype.toolbarHeight=38,EditorUi.prototype.hsplitPosition=188,Sidebar.prototype.thumbWidth=46,Sidebar.prototype.thumbHeight=46,Sidebar.prototype.thumbPadding=5<=document.documentMode?0:1,Sidebar.prototype.thumbBorder=2):"1"==urlParams.savesidebar&&(Sidebar.prototype.thumbWidth=64,Sidebar.prototype.thumbHeight=64),EditorUi.prototype.footerHeight=760<=screen.width&&240<=screen.height?46:0,EditorUi.prototype.createFooter=function(){var b=document.getElementById("geFooter");if(null!=b){b.style.visibility=
+"visible";var a=document.createElement("img");a.setAttribute("border","0");a.setAttribute("src",Dialog.prototype.closeImage);a.setAttribute("title",mxResources.get("hide"));b.appendChild(a);mxClient.IS_QUIRKS&&(a.style.position="relative",a.style.styleFloat="right",a.style.top="-30px",a.style.left="164px",a.style.cursor="pointer");mxEvent.addListener(a,"click",mxUtils.bind(this,function(){this.hideFooter()}))}return b});EditorUi.prototype.hideFooter=function(){var b=document.getElementById("geFooter");
+null!=b&&(this.footerHeight=0,b.style.display="none",this.refresh())};EditorUi.prototype.showImageDialog=function(b,a,c,d,f){b=new ImageDialog(this,b,a,c,d,f);this.showDialog(b.container,Graph.fileSupport?440:360,Graph.fileSupport?200:90,!0,!0);b.init()};EditorUi.prototype.showBackgroundImageDialog=function(b){b=null!=b?b:mxUtils.bind(this,function(b){b=new ChangePageSetup(this,null,b);b.ignoreColor=!0;this.editor.graph.model.execute(b)});var a=new BackgroundImageDialog(this,mxUtils.bind(this,function(a){b(a)}));
+this.showDialog(a.container,360,200,!0,!0);a.init()};EditorUi.prototype.showLibraryDialog=function(b,a,c,d,f){b=new LibraryDialog(this,b,a,c,d,f);this.showDialog(b.container,620,440,!0,!1,mxUtils.bind(this,function(b){b&&null==this.getCurrentFile()&&"1"!=urlParams.embed&&this.showSplash()}));b.init()};EditorUi.prototype.createSidebarFooterContainer=function(){var b=this.createDiv("geSidebarContainer");b.style.position="absolute";b.style.overflow="hidden";b.style.borderWidth="3px";var a=document.createElement("a");
+a.setAttribute("href","javascript:void(0);");a.className="geTitle";a.style.height="100%";a.style.paddingTop="9px";mxUtils.write(a,mxResources.get("moreShapes")+"...");mxEvent.addListener(a,"click",mxUtils.bind(this,function(b){this.actions.get("shapes").funct();mxEvent.consume(b)}));b.appendChild(a);return b};EditorUi.prototype.handleError=function(b,a,c){var e=null!=this.spinner&&null!=this.spinner.pause?this.spinner.pause():function(){},g=null!=b&&null!=b.error?b.error:b;if(null!=g||null!=a){b=
+mxUtils.htmlEntities(mxResources.get("unknownError"));var d=mxResources.get("ok"),f=null;a=null!=a?a:mxResources.get("error");if(null!=g)if(null!=g.retry&&(d=mxResources.get("cancel"),f=function(){e();g.retry()}),"undefined"!=typeof gapi&&"undefined"!=typeof gapi.drive&&"undefined"!=typeof gapi.drive.realtime&&g.type==gapi.drive.realtime.ErrorType.FORBIDDEN)b=mxUtils.htmlEntities(mxResources.get("forbidden"));else if(404==g.code||404==g.status||"undefined"!=typeof gapi&&"undefined"!=typeof gapi.drive&&
+"undefined"!=typeof gapi.drive.realtime&&g.type==gapi.drive.realtime.ErrorType.NOT_FOUND){b=mxUtils.htmlEntities(mxResources.get("fileNotFoundOrDenied"));var h=window.location.hash;null!=h&&"#G"==h.substring(0,2)&&(h=h.substring(2),b+=' <a href="https://drive.google.com/open?id='+h+'" target="_blank">'+mxUtils.htmlEntities(mxResources.get("tryOpeningViaThisPage"))+"</a>")}else g.code==App.ERROR_TIMEOUT?b=mxUtils.htmlEntities(mxResources.get("timeout")):g.code==App.ERROR_BUSY?b=mxUtils.htmlEntities(mxResources.get("busy")):
+null!=g.message?b=mxUtils.htmlEntities(g.message):null!=g.response&&null!=g.response.error&&(b=mxUtils.htmlEntities(g.response.error));this.showError(a,b,d,c,f)}else null!=c&&c()};EditorUi.prototype.showError=function(b,a,c,d,f,h,k){b=new ErrorDialog(this,b,a,c,d,f,h,k);this.showDialog(b.container,340,150,!0,!1);b.init()};EditorUi.prototype.alert=function(b,a){var c=new ErrorDialog(this,null,b,mxResources.get("ok"),a);this.showDialog(c.container,340,100,!0,!1);c.init()};EditorUi.prototype.confirm=
+function(b,a,c,d,f){var e=null!=this.spinner&&null!=this.spinner.pause?this.spinner.pause():function(){};this.showDialog((new ConfirmDialog(this,b,function(){e();null!=a&&a()},function(){e();null!=c&&c()},d,f)).container,340,90,!0,!1)};EditorUi.prototype.setCurrentFile=function(b){this.currentFile=b};EditorUi.prototype.getCurrentFile=function(){return this.currentFile};EditorUi.prototype.isExportToCanvas=function(){return mxClient.IS_CHROMEAPP||!this.editor.graph.mathEnabled&&this.useCanvasForExport};
+EditorUi.prototype.createSvgDataUri=function(b){return"data:image/svg+xml;base64,"+btoa(unescape(encodeURIComponent(b)))};EditorUi.prototype.createImageDataUri=function(b,a,c){var e=b.toDataURL("image/"+c);if(6>=e.length||e==b.cloneNode(!1).toDataURL("image/"+c))throw{message:"Invalid image"};null!=a&&(e=this.writeGraphModelToPng(e,"zTXt","mxGraphModel",atob(this.editor.graph.compress(a))));return e};EditorUi.prototype.saveCanvas=function(b,a,c){var e="jpeg"==c?"jpg":c,g=this.getBaseFilename()+"."+
+e;b=this.createImageDataUri(b,a,c);this.saveData(g,e,b.substring(b.lastIndexOf(",")+1),"image/"+c,!0)};EditorUi.prototype.isLocalFileSave=function(){return"remote"!=urlParams.save&&(mxClient.IS_IE||"undefined"!==typeof window.Blob&&"undefined"!==typeof window.URL)&&9!=document.documentMode&&8!=document.documentMode&&7!=document.documentMode&&!mxClient.IS_QUIRKS||this.isOfflineApp()||mxClient.IS_IOS};EditorUi.prototype.doSaveLocalFile=function(b,a,c,d,f){if(window.Blob&&navigator.msSaveOrOpenBlob)b=
+d?this.base64ToBlob(b,c):new Blob([b],{type:c}),navigator.msSaveOrOpenBlob(b,a);else if(mxClient.IS_IE)c=window.open("about:blank","_blank"),null==c?mxUtils.popup(b,!0):(c.document.write(b),c.document.close(),c.document.execCommand("SaveAs",!0,a),c.close());else if(mxClient.IS_IOS)a=new TextareaDialog(this,a+":",b,null,null,mxResources.get("close")),a.textarea.style.width="600px",a.textarea.style.height="380px",this.showDialog(a.container,620,460,!0,!0),a.init(),document.execCommand("selectall",!1,
+null);else{var e=document.createElement("a"),g=!mxClient.IS_SF&&"undefined"!==typeof e.download;if(g||this.isOffline()){e.href=URL.createObjectURL(d?this.base64ToBlob(b,c):new Blob([b],{type:c}));g?e.download=a:e.setAttribute("target","_blank");document.body.appendChild(e);try{window.setTimeout(function(){URL.revokeObjectURL(e.href)},0),e.click(),e.parentNode.removeChild(e)}catch(q){}}else this.createEchoRequest(b,a,c,d,f).simulate(document,"_blank")}};EditorUi.prototype.createEchoRequest=function(b,
+a,c,d,f,h){b="xml="+encodeURIComponent(b);return new mxXmlRequest(SAVE_URL,b+(null!=c?"&mime="+c:"")+(null!=f?"&format="+f:"")+(null!=h?"&base64="+h:"")+(null!=a?"&filename="+encodeURIComponent(a):"")+(d?"&binary=1":""))};EditorUi.prototype.base64ToBlob=function(b,a){a=a||"";for(var c=atob(b),e=c.length,d=Math.ceil(e/1024),f=Array(d),h=0;h<d;++h){for(var k=1024*h,m=Math.min(k+1024,e),n=Array(m-k),t=0;k<m;++t,++k)n[t]=c[k].charCodeAt(0);f[h]=new Uint8Array(n)}return new Blob(f,{type:a})};EditorUi.prototype.saveLocalFile=
+function(b,a,c,d,f,h){h=null!=h?h:!1;var e="vsdx"!=f&&(!mxClient.IS_IOS||!navigator.standalone);f=this.getServiceCount(h);a=new CreateDialog(this,a,mxUtils.bind(this,function(a,e){try{if("_blank"==e)if(null==c||"image/"!=c.substring(0,6)||"image/svg"==c.substring(0,9)&&!mxClient.IS_SVG){var g=window.open("about:blank");null==g?mxUtils.popup(b,!0):(g.document.write(mxUtils.htmlEntities(b,!1)),g.document.close())}else this.openInNewWindow(b,c,d);else e==App.MODE_DEVICE?this.doSaveLocalFile(b,a,c,d):
+null!=a&&0<a.length&&this.pickFolder(e,mxUtils.bind(this,function(g){try{this.exportFile(b,a,c,d,e,g)}catch(w){this.handleError(w)}}))}catch(t){this.handleError(t)}}),mxUtils.bind(this,function(){this.hideDialog()}),mxResources.get("saveAs"),mxResources.get("download"),!1,h,e,null,null,4<f?3:4,b,c,d);this.showDialog(a.container,380,4<f?390:270,!0,!0);a.init()};EditorUi.prototype.openInNewWindow=function(b,a,c){if(mxClient.IS_GC||mxClient.IS_EDGE||11==document.documentMode||10==document.documentMode){var e=
+window.open("about:blank");null==e?mxUtils.popup(b,!0):(e.document.write('<html><img src="data:'+a+(c?";base64,"+b:";charset=utf8,"+encodeURIComponent(b))+'"/></html>'),e.document.close())}else e=window.open("data:"+a+(c?";base64,"+b:";charset=utf8,"+encodeURIComponent(b))),null==e&&mxUtils.popup(b,!0)};var d=EditorUi.prototype.addChromelessToolbarItems;EditorUi.prototype.addChromelessToolbarItems=function(b){if(this.isExportToCanvas()){this.exportDialog=null;var a=b(mxUtils.bind(this,function(b){var c=
+mxUtils.bind(this,function(){mxEvent.removeListener(this.editor.graph.container,"click",c);null!=this.exportDialog&&(this.exportDialog.parentNode.removeChild(this.exportDialog),this.exportDialog=null)});if(null!=this.exportDialog)c.apply(this);else{this.exportDialog=document.createElement("div");var e=a.getBoundingClientRect();mxUtils.setPrefixedStyle(this.exportDialog.style,"borderRadius","5px");this.exportDialog.style.position="fixed";this.exportDialog.style.textAlign="center";this.exportDialog.style.fontFamily=
+"Helvetica,Arial";this.exportDialog.style.backgroundColor="#000000";this.exportDialog.style.width="50px";this.exportDialog.style.height="50px";this.exportDialog.style.padding="4px 2px 4px 2px";this.exportDialog.style.color="#ffffff";mxUtils.setOpacity(this.exportDialog,70);this.exportDialog.style.left=e.left+"px";this.exportDialog.style.bottom=parseInt(this.chromelessToolbar.style.bottom)+this.chromelessToolbar.offsetHeight+4+"px";e=mxUtils.getCurrentStyle(this.editor.graph.container);this.exportDialog.style.zIndex=
+e.zIndex;var g=new Spinner({lines:8,length:6,width:5,radius:6,rotate:0,color:"#fff",speed:1.5,trail:60,shadow:!1,hwaccel:!1,top:"28px",zIndex:2E9});g.spin(this.exportDialog);this.exportToCanvas(mxUtils.bind(this,function(b){g.stop();this.exportDialog.style.width="auto";this.exportDialog.style.height="auto";this.exportDialog.style.padding="10px";var a=this.createImageDataUri(b,null,"png");b=document.createElement("img");b.style.maxWidth="140px";b.style.maxHeight="140px";b.style.cursor="pointer";b.setAttribute("title",
+mxResources.get("openInNewWindow"));b.setAttribute("border","0");b.setAttribute("src",a);this.exportDialog.appendChild(b);mxEvent.addListener(b,"click",mxUtils.bind(this,function(){this.openInNewWindow(a.substring(a.indexOf(",")+1),"image/png",!0);c.apply(this,arguments)}))}),null,this.thumbImageCache,null,mxUtils.bind(this,function(b){this.spinner.stop();this.handleError(b)}));mxEvent.addListener(this.editor.graph.container,"click",c);document.body.appendChild(this.exportDialog)}mxEvent.consume(b)}),
+Editor.cameraLargeImage,mxResources.get("export"))}d.apply(this,arguments)};EditorUi.prototype.saveData=function(b,a,c,d,f){this.isLocalFileSave()?this.saveLocalFile(c,b,d,f,a):this.saveRequest(b,a,mxUtils.bind(this,function(b,e){return this.createEchoRequest(c,b,d,f,a,e)}),c,f,d)};EditorUi.prototype.saveRequest=function(b,a,c,d,f,h){var e=!mxClient.IS_IOS||!navigator.standalone,g=this.getServiceCount(!1);b=new CreateDialog(this,b,mxUtils.bind(this,function(b,e){if("_blank"==e||null!=b&&0<b.length){var g=
+c("_blank"==e?null:b,e==App.MODE_DEVICE||null==e||"_blank"==e?"0":"1");null!=g&&(e==App.MODE_DEVICE||"_blank"==e?g.simulate(document,"_blank"):this.pickFolder(e,mxUtils.bind(this,function(c){h=null!=h?h:"pdf"==a?"application/pdf":"image/"+a;if(null!=d)try{this.exportFile(d,b,h,!0,e,c)}catch(C){this.handleError(C)}else this.spinner.spin(document.body,mxResources.get("saving"))&&g.send(mxUtils.bind(this,function(){this.spinner.stop();if(200<=g.getStatus()&&299>=g.getStatus())try{this.exportFile(g.getText(),
+b,h,!0,e,c)}catch(C){this.handleError(C)}else this.handleError({message:mxResources.get("errorSavingFile")})}),function(b){this.spinner.stop();this.handleError(b)})})))}}),mxUtils.bind(this,function(){this.hideDialog()}),mxResources.get("saveAs"),mxResources.get("download"),!1,!1,e,null,null,4<g?3:4,d,h,f);this.showDialog(b.container,380,4<g?390:270,!0,!0);b.init()};EditorUi.prototype.exportFile=function(b,a,c,d,f,h){};EditorUi.prototype.pickFolder=function(b,a,c){a(null)};EditorUi.prototype.exportSvg=
+function(b,a,c,d,f,h,k,m,n){if(this.spinner.spin(document.body,mxResources.get("export"))){var e=this.editor.graph.isSelectionEmpty();c=null!=c?c:e;e=a?null:this.editor.graph.background;e==mxConstants.NONE&&(e=null);null==e&&0==a&&(e="#ffffff");var g=this.editor.graph.getSvg(e,b,k,m,null,c);d&&this.editor.graph.addSvgShadow(g);var l=this.getBaseFilename()+".svg",p=mxUtils.bind(this,function(b){this.spinner.stop();f&&b.setAttribute("content",this.getFileData(!0,null,null,null,c,n));var a='<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">\n'+
+mxUtils.getXml(b);this.isLocalFileSave()||a.length<=MAX_REQUEST_SIZE?this.saveData(l,"svg",a,"image/svg+xml"):this.handleError({message:mxResources.get("drawingTooLarge")},mxResources.get("error"),mxUtils.bind(this,function(){mxUtils.popup(a)}))});this.convertMath(this.editor.graph,g,!1,mxUtils.bind(this,function(){h?(null==this.thumbImageCache&&(this.thumbImageCache={}),this.convertImages(g,p,this.thumbImageCache)):p(g)}))}};EditorUi.prototype.addCheckbox=function(b,a,c,d,f,h){h=null!=h?h:!0;var e=
+document.createElement("input");e.style.marginRight="8px";e.style.marginTop="16px";e.setAttribute("type","checkbox");c&&(e.setAttribute("checked","checked"),e.defaultChecked=!0);d&&e.setAttribute("disabled","disabled");h&&(b.appendChild(e),mxUtils.write(b,a),f||mxUtils.br(b));return e};EditorUi.prototype.addEditButton=function(b,a){var c=this.addCheckbox(b,mxResources.get("edit")+":",!0,null,!0);c.style.marginLeft="24px";var e=this.getCurrentFile(),d="";null!=e&&e.getMode()!=App.MODE_DEVICE&&e.getMode()!=
+App.MODE_BROWSER&&(d=window.location.href);var f=document.createElement("select");f.style.width="120px";f.style.marginLeft="8px";f.style.marginRight="10px";f.className="geBtn";e=document.createElement("option");e.setAttribute("value","blank");mxUtils.write(e,mxResources.get("makeCopy"));f.appendChild(e);e=document.createElement("option");e.setAttribute("value","custom");mxUtils.write(e,mxResources.get("custom")+"...");f.appendChild(e);b.appendChild(f);mxEvent.addListener(f,"change",mxUtils.bind(this,
+function(){if("custom"==f.value){var b=new FilenameDialog(this,d,mxResources.get("ok"),function(b){null!=b?d=b:f.value="blank"},mxResources.get("url"),null,null,null,null,function(){f.value="blank"});this.showDialog(b.container,300,80,!0,!1);b.init()}}));mxEvent.addListener(c,"change",mxUtils.bind(this,function(){c.checked&&(null==a||a.checked)?f.removeAttribute("disabled"):f.setAttribute("disabled","disabled")}));mxUtils.br(b);return{getLink:function(){return c.checked?"blank"===f.value?"_blank":
+d:null},getEditInput:function(){return c},getEditSelect:function(){return f}}};EditorUi.prototype.addLinkSection=function(b,a){function c(){h.innerHTML='<div style="width:100%;height:100%;box-sizing:border-box;'+(null!=f&&f!=mxConstants.NONE?"border:1px solid black;background-color:"+f:"background-position:center center;background-repeat:no-repeat;background-image:url('"+Dialog.prototype.closeImage+"')")+';"></div>'}mxUtils.write(b,mxResources.get("links")+":");var e=document.createElement("select");
+e.style.width="100px";e.style.marginLeft="8px";e.style.marginRight="10px";e.className="geBtn";var d=document.createElement("option");d.setAttribute("value","auto");mxUtils.write(d,mxResources.get("automatic"));e.appendChild(d);d=document.createElement("option");d.setAttribute("value","blank");mxUtils.write(d,mxResources.get("openInNewWindow"));e.appendChild(d);d=document.createElement("option");d.setAttribute("value","self");mxUtils.write(d,mxResources.get("openInThisWindow"));e.appendChild(d);a&&
+(d=document.createElement("option"),d.setAttribute("value","frame"),mxUtils.write(d,mxResources.get("openInThisWindow")+" ("+mxResources.get("iframe")+")"),e.appendChild(d));b.appendChild(e);mxUtils.write(b,mxResources.get("borderColor")+":");var f="#0000ff",h=null,h=mxUtils.button("",mxUtils.bind(this,function(b){this.pickColor(f||"none",function(b){f=b;c()});mxEvent.consume(b)}));c();h.style.padding=mxClient.IS_FF?"4px 2px 4px 2px":"4px";h.style.marginLeft="4px";h.style.height="22px";h.style.width=
+"22px";h.style.position="relative";h.style.top=mxClient.IS_IE||mxClient.IS_IE11||mxClient.IS_EDGE?"6px":"1px";h.className="geColorBtn";b.appendChild(h);mxUtils.br(b);return{getColor:function(){return f},getTarget:function(){return e.value},focus:function(){e.focus()}}};EditorUi.prototype.createLink=function(b,a,c,d,f,h,k,m){var e=this.getCurrentFile(),g=[];d&&(g.push("lightbox=1"),"auto"!=b&&g.push("target="+b),null!=a&&a!=mxConstants.NONE&&g.push("highlight="+("#"==a.charAt(0)?a.substring(1):a)),
+null!=f&&0<f.length&&g.push("edit="+encodeURIComponent(f)),h&&g.push("layers=1"),this.editor.graph.foldingEnabled&&g.push("nav=1"));if(c&&null!=this.pages&&null!=this.currentPage)for(b=0;b<this.pages.length;b++)if(this.pages[b]==this.currentPage){0<b&&g.push("page="+b);break}b=!0;null!=k?c="#U"+encodeURIComponent(k):(e=this.getCurrentFile(),m||null==e||e.constructor!=window.DriveFile?c="#R"+encodeURIComponent(c?this.getFileData(!0,null,null,null,null,null,null,!0):this.editor.graph.compress(mxUtils.getXml(this.editor.getGraphXml()))):
+(c="#"+e.getHash(),b=!1));b&&null!=e&&null!=e.getTitle()&&e.getTitle()!=this.defaultFilename&&g.push("title="+encodeURIComponent(e.getTitle()));return(mxClient.IS_CHROMEAPP||EditorUi.isElectronApp?"https://www.draw.io/":"https://"+location.host+"/")+(0<g.length?"?"+g.join("&"):"")+c};EditorUi.prototype.createHtml=function(b,a,c,d,f,h,k,m,n,y,t){this.getBasenames();var e={};""!=f&&f!=mxConstants.NONE&&(e.highlight=f);"auto"!==d&&(e.target=d);n||(e.lightbox=!1);e.nav=this.editor.graph.foldingEnabled;
+c=parseInt(c);isNaN(c)||100==c||(e.zoom=c/100);c=[];k&&(c.push("pages"),e.resize=!0,null!=this.pages&&null!=this.currentPage&&(e.page=mxUtils.indexOf(this.pages,this.currentPage)));a&&(c.push("zoom"),e.resize=!0);m&&c.push("layers");0<c.length&&(n&&c.push("lightbox"),e.toolbar=c.join(" "));null!=y&&0<y.length&&(e.edit=y);null!=b?e.url=b:e.xml=this.getFileData(!0,null,null,null,null,!k);a='<div class="mxgraph" style="'+(h?"max-width:100%;":"")+(""!=c?"border:1px solid transparent;":"")+'" data-mxgraph="'+
+mxUtils.htmlEntities(JSON.stringify(e))+'"></div>';b=null!=b?"&fetch="+encodeURIComponent(b):"";t(a,'<script type="text/javascript" src="'+(0<b.length?("1"==urlParams.dev?"https://test.draw.io/embed2.js?dev=1":"https://www.draw.io/embed2.js?")+b:"1"==urlParams.dev?"https://test.draw.io/js/viewer.min.js":"https://www.draw.io/js/viewer.min.js")+'">\x3c/script>')};EditorUi.prototype.showHtmlDialog=function(b,a,c,d){var e=document.createElement("div");e.style.whiteSpace="nowrap";var g=document.createElement("h3");
+mxUtils.write(g,mxResources.get("html"));g.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:12px";e.appendChild(g);var f=document.createElement("div");f.style.cssText="border-bottom:1px solid lightGray;padding-bottom:8px;margin-bottom:12px;";var l=document.createElement("input");l.style.cssText="margin-right:8px;margin-top:8px;margin-bottom:8px;";l.setAttribute("value","url");l.setAttribute("type","radio");l.setAttribute("name","type-embedhtmldialog");g=l.cloneNode(!0);g.setAttribute("value",
+"copy");f.appendChild(g);var h=document.createElement("span");mxUtils.write(h,mxResources.get("includeCopyOfMyDiagram"));f.appendChild(h);mxUtils.br(f);f.appendChild(l);h=document.createElement("span");mxUtils.write(h,mxResources.get("publicDiagramUrl"));f.appendChild(h);var k=this.getCurrentFile();null==c&&null!=k&&k.constructor==window.DriveFile&&(h=document.createElement("a"),h.style.paddingLeft="12px",h.style.color="gray",h.setAttribute("href","javascript:void(0);"),mxUtils.write(h,mxResources.get("share")),
+f.appendChild(h),mxEvent.addListener(h,"click",mxUtils.bind(this,function(){this.hideDialog();this.drive.showPermissions(k.getId())})));g.setAttribute("checked","checked");null==c&&l.setAttribute("disabled","disabled");e.appendChild(f);var t=this.addLinkSection(e),m=this.addCheckbox(e,mxResources.get("zoom"),!0,null,!0);mxUtils.write(e,":");var n=document.createElement("input");n.setAttribute("type","text");n.style.marginRight="16px";n.style.width="60px";n.style.marginLeft="4px";n.style.marginRight=
+"12px";n.value="100%";e.appendChild(n);var F=this.addCheckbox(e,mxResources.get("fit"),!0),f=null!=this.pages&&1<this.pages.length,B=B=this.addCheckbox(e,mxResources.get("allPages"),f,!f),G=this.addCheckbox(e,mxResources.get("layers"),!0),z=this.addCheckbox(e,mxResources.get("lightbox"),!0),D=this.addEditButton(e,z),A=D.getEditInput();A.style.marginBottom="16px";mxEvent.addListener(z,"change",function(){z.checked?A.removeAttribute("disabled"):A.setAttribute("disabled","disabled");A.checked&&z.checked?
+D.getEditSelect().removeAttribute("disabled"):D.getEditSelect().setAttribute("disabled","disabled")});b=new CustomDialog(this,e,mxUtils.bind(this,function(){d(l.checked?c:null,m.checked,n.value,t.getTarget(),t.getColor(),F.checked,B.checked,G.checked,z.checked,D.getLink())}),null,b,a);this.showDialog(b.container,340,360,!0,!0);g.focus()};EditorUi.prototype.showPublishLinkDialog=function(b,a,c,d,f,h){var e=document.createElement("div");e.style.whiteSpace="nowrap";var g=document.createElement("h3");
+mxUtils.write(g,b||mxResources.get("link"));g.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:12px";e.appendChild(g);var l=this.getCurrentFile(),g="https://desk.draw.io/support/solutions/articles/16000051941";b=0;if(null!=l&&l.constructor==window.DriveFile&&!a){b=80;var g="https://desk.draw.io/support/solutions/articles/16000039384",k=document.createElement("div");k.style.cssText="border-bottom:1px solid lightGray;padding-bottom:14px;padding-top:6px;margin-bottom:14px;text-align:center;";
+var t=document.createElement("div");t.style.whiteSpace="normal";mxUtils.write(t,mxResources.get("linkAccountRequired"));k.appendChild(t);t=mxUtils.button(mxResources.get("share"),mxUtils.bind(this,function(){this.drive.showPermissions(l.getId())}));t.style.marginTop="12px";t.className="geBtn";k.appendChild(t);e.appendChild(k);t=document.createElement("a");t.style.paddingLeft="12px";t.style.color="gray";t.style.fontSize="11px";t.setAttribute("href","javascript:void(0);");mxUtils.write(t,mxResources.get("check"));
+k.appendChild(t);mxEvent.addListener(t,"click",mxUtils.bind(this,function(){this.spinner.spin(document.body,mxResources.get("loading"))&&this.getPublicUrl(this.getCurrentFile(),mxUtils.bind(this,function(b){this.spinner.stop();b=new ErrorDialog(this,null,mxResources.get(null!=b?"diagramIsPublic":"diagramIsNotPublic"),mxResources.get("ok"));this.showDialog(b.container,300,80,!0,!1);b.init()}))}))}var m=null,p=null;if(null!=c||null!=d)b+=30,mxUtils.write(e,mxResources.get("width")+":"),m=document.createElement("input"),
+m.setAttribute("type","text"),m.style.marginRight="16px",m.style.width="50px",m.style.marginLeft="6px",m.style.marginRight="16px",m.style.marginBottom="10px",m.value="100%",e.appendChild(m),mxUtils.write(e,mxResources.get("height")+":"),p=document.createElement("input"),p.setAttribute("type","text"),p.style.width="50px",p.style.marginLeft="6px",p.style.marginBottom="10px",p.value=d+"px",e.appendChild(p),mxUtils.br(e);var n=this.addLinkSection(e,h);c=null!=this.pages&&1<this.pages.length;var u=null;
+if(null==l||l.constructor!=window.DriveFile||a)u=this.addCheckbox(e,mxResources.get("allPages"),c,!c);var G=this.addCheckbox(e,mxResources.get("lightbox"),!0),z=this.addEditButton(e,G),D=z.getEditInput(),A=this.addCheckbox(e,mxResources.get("layers"),!0);A.style.marginLeft=D.style.marginLeft;A.style.marginBottom="16px";A.style.marginTop="8px";mxEvent.addListener(G,"change",function(){G.checked?(A.removeAttribute("disabled"),D.removeAttribute("disabled")):(A.setAttribute("disabled","disabled"),D.setAttribute("disabled",
+"disabled"));D.checked&&G.checked?z.getEditSelect().removeAttribute("disabled"):z.getEditSelect().setAttribute("disabled","disabled")});a=new CustomDialog(this,e,mxUtils.bind(this,function(){f(n.getTarget(),n.getColor(),null==u?!0:u.checked,G.checked,z.getLink(),A.checked,null!=m?m.value:null,null!=p?p.value:null)}),null,mxResources.get("create"),g);this.showDialog(a.container,340,246+b,!0,!0);null!=m?(m.focus(),mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode||mxClient.IS_QUIRKS?m.select():
+document.execCommand("selectAll",!1,null)):n.focus()};EditorUi.prototype.showRemoteExportDialog=function(b,a,c,d){var e=document.createElement("div");e.style.whiteSpace="nowrap";var g=document.createElement("h3");mxUtils.write(g,mxResources.get("image"));g.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:4px";e.appendChild(g);var f=this.addCheckbox(e,mxResources.get("selectionOnly"),!1,this.editor.graph.isSelectionEmpty()),l=d?null:this.addCheckbox(e,mxResources.get("includeCopyOfMyDiagram"),
+!0);null!=l&&(l.style.marginBottom="16px");b=new CustomDialog(this,e,mxUtils.bind(this,function(){c(!f.checked,null!=l?l.checked:!1)}),null,b,a);this.showDialog(b.container,300,d?100:146,!0,!0)};EditorUi.prototype.showExportDialog=function(b,a,c,d,f,h,k,m){k=null!=k?k:!0;var e=document.createElement("div");e.style.whiteSpace="nowrap";var g=this.editor.graph,l="jpeg"==m?170:280,p=document.createElement("h3");mxUtils.write(p,b);p.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:10px";
+e.appendChild(p);mxUtils.write(e,mxResources.get("zoom")+":");var q=document.createElement("input");q.setAttribute("type","text");q.style.marginRight="16px";q.style.width="60px";q.style.marginLeft="4px";q.style.marginRight="12px";q.value=this.lastExportZoom||"100%";e.appendChild(q);mxUtils.write(e,mxResources.get("borderWidth")+":");var n=document.createElement("input");n.setAttribute("type","text");n.style.marginRight="16px";n.style.width="60px";n.style.marginLeft="4px";n.value=this.lastExportBorder||
+"0";e.appendChild(n);mxUtils.br(e);var u=this.addCheckbox(e,mxResources.get("transparentBackground"),g.background==mxConstants.NONE||null==g.background,null,null,"jpeg"!=m),v=this.addCheckbox(e,mxResources.get("selectionOnly"),!1,g.isSelectionEmpty()),z=document.createElement("input");z.style.marginTop="16px";z.style.marginRight="8px";z.style.marginLeft="24px";z.setAttribute("disabled","disabled");z.setAttribute("type","checkbox");h&&(e.appendChild(z),mxUtils.write(e,mxResources.get("crop")),mxUtils.br(e),
+l+=26,mxEvent.addListener(v,"change",function(){v.checked?z.removeAttribute("disabled"):z.setAttribute("disabled","disabled")}));g.isSelectionEmpty()||(z.setAttribute("checked","checked"),z.defaultChecked=!0);var D=this.addCheckbox(e,mxResources.get("shadow"),g.shadowVisible),A=document.createElement("input");A.style.marginTop="16px";A.style.marginRight="8px";A.setAttribute("type","checkbox");!this.isOffline()&&this.canvasSupported||A.setAttribute("disabled","disabled");a&&(e.appendChild(A),mxUtils.write(e,
+mxResources.get("embedImages")),mxUtils.br(e),l+=26);var H=this.addCheckbox(e,mxResources.get("includeCopyOfMyDiagram"),k,null,null,"jpeg"!=m),E=null!=this.pages&&1<this.pages.length,I=this.addCheckbox(e,E?mxResources.get("allPages"):"",E,!E,null,"jpeg"!=m);I.style.marginLeft="24px";I.style.marginBottom="16px";E||(I.style.visibility="hidden");mxEvent.addListener(H,"change",function(){H.checked&&E?I.removeAttribute("disabled"):I.setAttribute("disabled","disabled")});k&&E||I.setAttribute("disabled",
+"disabled");b=new CustomDialog(this,e,mxUtils.bind(this,function(){this.lastExportBorder=n.value;this.lastExportZoom=q.value;f(q.value,u.checked,!v.checked,D.checked,H.checked,A.checked,n.value,z.checked,!I.checked)}),null,c,d);this.showDialog(b.container,320,l,!0,!0);q.focus();mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode||mxClient.IS_QUIRKS?q.select():document.execCommand("selectAll",!1,null)};EditorUi.prototype.showEmbedImageDialog=function(b,a,c,d,f){var e=document.createElement("div");
+e.style.whiteSpace="nowrap";var g=this.editor.graph;if(null!=a){var l=document.createElement("h3");mxUtils.write(l,a);l.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:4px";e.appendChild(l)}var h=this.addCheckbox(e,mxResources.get("fit"),!0),k=this.addCheckbox(e,mxResources.get("shadow"),g.shadowVisible&&d,!d),t=this.addCheckbox(e,c),m=this.addCheckbox(e,mxResources.get("lightbox"),!0),p=this.addEditButton(e,m),n=p.getEditInput(),B=1<g.model.getChildCount(g.model.getRoot()),
+G=this.addCheckbox(e,mxResources.get("layers"),B,!B);G.style.marginLeft=n.style.marginLeft;G.style.marginBottom="12px";G.style.marginTop="8px";mxEvent.addListener(m,"change",function(){m.checked?(B&&G.removeAttribute("disabled"),n.removeAttribute("disabled")):(G.setAttribute("disabled","disabled"),n.setAttribute("disabled","disabled"));n.checked&&m.checked?p.getEditSelect().removeAttribute("disabled"):p.getEditSelect().setAttribute("disabled","disabled")});a=new CustomDialog(this,e,mxUtils.bind(this,
+function(){b(h.checked,k.checked,t.checked,m.checked,p.getLink(),G.checked)}),null,mxResources.get("embed"),f);this.showDialog(a.container,280,280,!0,!0)};EditorUi.prototype.createEmbedImage=function(b,a,c,d,f,h,k,m){function e(a){var e=" ",l="";d&&(e=" onclick=\"(function(img){if(img.wnd!=null&&!img.wnd.closed){img.wnd.focus();}else{var r=function(evt){if(evt.data=='ready'&&evt.source==img.wnd){img.wnd.postMessage(decodeURIComponent(img.getAttribute('src')),'*');window.removeEventListener('message',r);}};window.addEventListener('message',r);img.wnd=window.open('https://www.draw.io/?client=1&lightbox=1"+
+(f?"&edit=_blank":"")+(h?"&layers=1":"")+"');}})(this);\"",l+="cursor:pointer;");b&&(l+="max-width:100%;");var t="";c&&(t=' width="'+Math.round(g.width)+'" height="'+Math.round(g.height)+'"');k('<img src="'+a+'"'+t+(""!=l?' style="'+l+'"':"")+e+"/>")}var g=this.editor.graph.getGraphBounds();if(this.isExportToCanvas())this.exportToCanvas(mxUtils.bind(this,function(b){var a=d?this.getFileData(!0):null;b=this.createImageDataUri(b,a,"png");e(b)}),null,null,null,mxUtils.bind(this,function(b){m({message:mxResources.get("unknownError")})}),
+null,!0,c?2:1,null,a);else if(a=this.getFileData(!0),g.width*g.height<=MAX_AREA&&a.length<=MAX_REQUEST_SIZE){var l="";c&&(l="&w="+Math.round(2*g.width)+"&h="+Math.round(2*g.height));var p=new mxXmlRequest(EXPORT_URL,"format=png&base64=1&embedXml="+(d?"1":"0")+l+"&xml="+encodeURIComponent(a));p.send(mxUtils.bind(this,function(){200<=p.getStatus()&&299>=p.getStatus()?e("data:image/png;base64,"+p.getText()):m({message:mxResources.get("unknownError")})}))}else m({message:mxResources.get("drawingTooLarge")})};
+EditorUi.prototype.createEmbedSvg=function(b,a,c,d,f,h,k){var e=this.editor.graph.getSvg(),g=e.getElementsByTagName("a");if(null!=g)for(var l=0;l<g.length;l++){var t=g[l].getAttribute("href");null!=t&&"#"==t.charAt(0)&&"_blank"==g[l].getAttribute("target")&&g[l].removeAttribute("target")}d&&e.setAttribute("content",this.getFileData(!0));a&&this.editor.graph.addSvgShadow(e);if(c){var m=" ",p="";d&&(m="onclick=\"(function(img){if(img.wnd!=null&&!img.wnd.closed){img.wnd.focus();}else{var r=function(evt){if(evt.data=='ready'&&evt.source==img.wnd){img.wnd.postMessage(decodeURIComponent(img.getAttribute('src')),'*');window.removeEventListener('message',r);}};window.addEventListener('message',r);img.wnd=window.open('https://www.draw.io/?client=1&lightbox=1"+
+(f?"&edit=_blank":"")+(h?"&layers=1":"")+"');}})(this);\"",p+="cursor:pointer;");b&&(p+="max-width:100%;");this.convertImages(e,mxUtils.bind(this,function(b){k('<img src="'+this.createSvgDataUri(mxUtils.getXml(b))+'"'+(""!=p?' style="'+p+'"':"")+m+"/>")}))}else p="",d&&(e.setAttribute("onclick","(function(svg){var src=window.event.target||window.event.srcElement;while (src!=null&&src.nodeName.toLowerCase()!='a'){src=src.parentNode;}if(src==null){if(svg.wnd!=null&&!svg.wnd.closed){svg.wnd.focus();}else{var r=function(evt){if(evt.data=='ready'&&evt.source==svg.wnd){svg.wnd.postMessage(decodeURIComponent(svg.getAttribute('content')),'*');window.removeEventListener('message',r);}};window.addEventListener('message',r);svg.wnd=window.open('https://www.draw.io/?client=1&lightbox=1"+
+(f?"&edit=_blank":"")+(h?"&layers=1":"")+"');}}})(this);"),p+="cursor:pointer;"),b&&(b=parseInt(e.getAttribute("width")),a=parseInt(e.getAttribute("height")),e.setAttribute("viewBox","0 0 "+b+" "+a),p+="max-width:100%;max-height:"+a+"px;",e.removeAttribute("height")),""!=p&&e.setAttribute("style",p),k(mxUtils.getXml(e))};EditorUi.prototype.timeSince=function(b){b=Math.floor((new Date-b)/1E3);var a=Math.floor(b/31536E3);if(1<a)return a+" "+mxResources.get("years");a=Math.floor(b/2592E3);if(1<a)return a+
 " "+mxResources.get("months");a=Math.floor(b/86400);if(1<a)return a+" "+mxResources.get("days");a=Math.floor(b/3600);if(1<a)return a+" "+mxResources.get("hours");a=Math.floor(b/60);return 1<a?a+" "+mxResources.get("minutes"):1==a?a+" "+mxResources.get("minute"):null};EditorUi.prototype.convertMath=function(b,a,c,d){d()};EditorUi.prototype.decodeNodeIntoGraph=function(b,a){if(null!=b){var c=null;if("diagram"==b.nodeName)c=b;else if("mxfile"==b.nodeName){var e=b.getElementsByTagName("diagram");if(0<
-e.length){var c=e[0],d=a.getGlobalVariable;a.getGlobalVariable=function(b){return"page"==b?c.getAttribute("name")||mxResources.get("pageWithNumber",[1]):"pagenumber"==b?1:d.apply(this,arguments)}}}null!=c&&(e=a.decompress(mxUtils.getTextContent(c)),null!=e&&0<e.length&&(b=mxUtils.parseXml(e).documentElement))}e=this.editor.graph;try{this.editor.graph=a,this.editor.setGraphXml(b)}catch(v){}finally{this.editor.graph=e}return b};EditorUi.prototype.getEmbeddedPng=function(b,a,c){var e=this.editor.graph,
+e.length){var c=e[0],d=a.getGlobalVariable;a.getGlobalVariable=function(b){return"page"==b?c.getAttribute("name")||mxResources.get("pageWithNumber",[1]):"pagenumber"==b?1:d.apply(this,arguments)}}}null!=c&&(e=a.decompress(mxUtils.getTextContent(c)),null!=e&&0<e.length&&(b=mxUtils.parseXml(e).documentElement))}e=this.editor.graph;try{this.editor.graph=a,this.editor.setGraphXml(b)}catch(u){}finally{this.editor.graph=e}return b};EditorUi.prototype.getEmbeddedPng=function(b,a,c){var e=this.editor.graph,
 d=null;if(null!=c&&0<c.length)e=this.createTemporaryGraph(this.editor.graph.getStylesheet()),document.body.appendChild(e.container),this.decodeNodeIntoGraph(this.editor.extractGraphModel(mxUtils.parseXml(c).documentElement,!0),e),d=c;else if(null!=this.pages&&this.currentPage!=this.pages[0]){var e=this.createTemporaryGraph(e.getStylesheet()),g=e.getGlobalVariable,f=this.pages[0];e.getGlobalVariable=function(b){return"page"==b?f.getName():"pagenumber"==b?1:g.apply(this,arguments)};document.body.appendChild(e.container);
-e.model.setRoot(f.root)}this.exportToCanvas(mxUtils.bind(this,function(c){try{null==d&&(d=this.getFileData(!0));var g=c.toDataURL("image/png"),g=this.writeGraphModelToPng(g,"zTXt","mxGraphModel",atob(this.editor.graph.compress(d)));b(g.substring(g.lastIndexOf(",")+1));e!=this.editor.graph&&e.container.parentNode.removeChild(e.container)}catch(x){null!=a&&a(x)}}),null,null,null,mxUtils.bind(this,function(b){null!=a&&a(b)}),null,null,null,null,e.shadowVisible,null,e)};EditorUi.prototype.getEmbeddedSvg=
+e.model.setRoot(f.root)}this.exportToCanvas(mxUtils.bind(this,function(c){try{null==d&&(d=this.getFileData(!0));var g=c.toDataURL("image/png"),g=this.writeGraphModelToPng(g,"zTXt","mxGraphModel",atob(this.editor.graph.compress(d)));b(g.substring(g.lastIndexOf(",")+1));e!=this.editor.graph&&e.container.parentNode.removeChild(e.container)}catch(y){null!=a&&a(y)}}),null,null,null,mxUtils.bind(this,function(b){null!=a&&a(b)}),null,null,null,null,e.shadowVisible,null,e)};EditorUi.prototype.getEmbeddedSvg=
 function(b,a,c,d,f,h,k){k=a.background;k==mxConstants.NONE&&(k=null);a=a.getSvg(k,null,null,null,null,h);null!=b&&a.setAttribute("content",b);null!=c&&a.setAttribute("resource",c);if(null!=f)this.convertImages(a,mxUtils.bind(this,function(b){f((d?"":'<?xml version="1.0" encoding="UTF-8"?>\n<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">\n')+mxUtils.getXml(b))}));else return(d?"":'<?xml version="1.0" encoding="UTF-8"?>\n<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">\n')+
 mxUtils.getXml(a)};EditorUi.prototype.exportImage=function(b,a,c,d,f,h,k,m,n){n=null!=n?n:"png";if(this.spinner.spin(document.body,mxResources.get("exporting"))){var e=this.editor.graph.isSelectionEmpty();c=null!=c?c:e;null==this.thumbImageCache&&(this.thumbImageCache={});try{this.exportToCanvas(mxUtils.bind(this,function(b){this.spinner.stop();try{this.saveCanvas(b,f?this.getFileData(!0,null,null,null,c,m):null,n)}catch(w){"Invalid image"==w.message?this.downloadFile(n):this.handleError(w)}}),null,
-this.thumbImageCache,null,mxUtils.bind(this,function(b){this.spinner.stop();this.handleError(b)}),null,c,b||1,a,d,null,null,h,k)}catch(p){this.spinner.stop(),this.handleError(p)}}};EditorUi.prototype.loadFonts=function(b){if(null!=this.editor.fontCss&&null==this.editor.resolvedFontCss){var a=this.editor.fontCss.split("url("),c=0,d={},f=mxUtils.bind(this,function(){if(0==c){for(var e=[a[0]],f=1;f<a.length;f++){var g=a[f].indexOf(")");e.push("url(");e.push(d[a[f].substring(0,g)]);e.push(a[f].substring(g))}this.editor.resolvedFontCss=
+this.thumbImageCache,null,mxUtils.bind(this,function(b){this.spinner.stop();this.handleError(b)}),null,c,b||1,a,d,null,null,h,k)}catch(t){this.spinner.stop(),this.handleError(t)}}};EditorUi.prototype.loadFonts=function(b){if(null!=this.editor.fontCss&&null==this.editor.resolvedFontCss){var a=this.editor.fontCss.split("url("),c=0,d={},f=mxUtils.bind(this,function(){if(0==c){for(var e=[a[0]],g=1;g<a.length;g++){var f=a[g].indexOf(")");e.push("url(");e.push(d[a[g].substring(0,f)]);e.push(a[g].substring(f))}this.editor.resolvedFontCss=
 e.join("");b()}});if(0<a.length)for(var h=1;h<a.length;h++){var k=a[h].indexOf(")");mxUtils.bind(this,function(b){if(null==d[b]){d[b]=b;c++;var a="application/x-font-ttf";/(\.svg)($|\?)/i.test(b)?a="image/svg+xml":/(\.otf)($|\?)/i.test(b)?a="application/x-font-opentype":/(\.woff)($|\?)/i.test(b)?a="application/font-woff":/(\.woff2)($|\?)/i.test(b)?a="application/font-woff2":/(\.eot)($|\?)/i.test(b)?a="application/vnd.ms-fontobject":/(\.sfnt)($|\?)/i.test(b)&&(a="application/font-sfnt");var e=b;/^https?:\/\//.test(e)&&
-!this.isCorsEnabledForUrl(e)&&(e=PROXY_URL+"?url="+encodeURIComponent(b));this.loadUrl(e,mxUtils.bind(this,function(a){d[b]=a;c--;f()}),mxUtils.bind(this,function(b){c--;f()}),!0,null,"data:"+a+";charset=utf-8;base64,")}})(a[h].substring(0,k))}}else b()};EditorUi.prototype.exportToCanvas=function(b,a,c,d,f,h,k,m,n,x,p,w,C,F){h=null!=h?h:!0;w=null!=w?w:this.editor.graph;C=null!=C?C:0;var e=n?null:w.background;e==mxConstants.NONE&&(e=null);null==e&&(e=d);null==e&&0==n&&(e="#ffffff");this.convertImages(w.getSvg(e,
-null,null,F,null,null!=k?k:!0),mxUtils.bind(this,function(c){var d=new Image;d.onload=mxUtils.bind(this,function(){try{var g=document.createElement("canvas"),l=parseInt(c.getAttribute("width")),p=parseInt(c.getAttribute("height"));m=null!=m?m:1;null!=a&&(m=h?Math.min(1,Math.min(3*a/(4*p),a/l)):a/l);l=Math.ceil(m*l)+2*C;p=Math.ceil(m*p)+2*C;g.setAttribute("width",l);g.setAttribute("height",p);var k=g.getContext("2d");null!=e&&(k.beginPath(),k.rect(0,0,l,p),k.fillStyle=e,k.fill());k.scale(m,m);k.drawImage(d,
-C/m,C/m);b(g)}catch(J){null!=f&&f(J)}});d.onerror=function(b){null!=f&&f(b)};try{x&&this.editor.graph.addSvgShadow(c);var g=mxUtils.bind(this,function(){if(null!=this.editor.resolvedFontCss){var b=document.createElement("style");b.setAttribute("type","text/css");b.innerHTML=this.editor.resolvedFontCss;c.getElementsByTagName("defs")[0].appendChild(b)}this.convertMath(w,c,!0,mxUtils.bind(this,function(){d.src=this.createSvgDataUri(mxUtils.getXml(c))}))});this.loadFonts(g)}catch(A){null!=f&&f(A)}}),
-c,p)};EditorUi.prototype.createImageUrlConverter=function(){var b=new mxUrlConverter;b.updateBaseUrl();var a=b.convert;b.convert=function(c){null!=c&&("http://"!=c.substring(0,7)&&"https://"!=c.substring(0,8)||c.substring(0,b.baseUrl.length)==b.baseUrl?"chrome-extension://"!=c.substring(0,19)&&(c=a.apply(this,arguments)):c=PROXY_URL+"?url="+encodeURIComponent(c));return c};return b};EditorUi.prototype.convertImages=function(b,a,c,d){null==d&&(d=this.createImageUrlConverter());var e=0,f=c||{};c=mxUtils.bind(this,
+!this.isCorsEnabledForUrl(e)&&(e=PROXY_URL+"?url="+encodeURIComponent(b));this.loadUrl(e,mxUtils.bind(this,function(a){d[b]=a;c--;f()}),mxUtils.bind(this,function(b){c--;f()}),!0,null,"data:"+a+";charset=utf-8;base64,")}})(a[h].substring(0,k))}}else b()};EditorUi.prototype.exportToCanvas=function(b,a,c,d,f,h,k,m,n,y,t,w,C,F){h=null!=h?h:!0;w=null!=w?w:this.editor.graph;C=null!=C?C:0;var e=n?null:w.background;e==mxConstants.NONE&&(e=null);null==e&&(e=d);null==e&&0==n&&(e="#ffffff");this.convertImages(w.getSvg(e,
+null,null,F,null,null!=k?k:!0),mxUtils.bind(this,function(c){var d=new Image;d.onload=mxUtils.bind(this,function(){try{var g=document.createElement("canvas"),l=parseInt(c.getAttribute("width")),t=parseInt(c.getAttribute("height"));m=null!=m?m:1;null!=a&&(m=h?Math.min(1,Math.min(3*a/(4*t),a/l)):a/l);l=Math.ceil(m*l)+2*C;t=Math.ceil(m*t)+2*C;g.setAttribute("width",l);g.setAttribute("height",t);var k=g.getContext("2d");null!=e&&(k.beginPath(),k.rect(0,0,l,t),k.fillStyle=e,k.fill());k.scale(m,m);k.drawImage(d,
+C/m,C/m);b(g)}catch(J){null!=f&&f(J)}});d.onerror=function(b){null!=f&&f(b)};try{y&&this.editor.graph.addSvgShadow(c);var g=mxUtils.bind(this,function(){if(null!=this.editor.resolvedFontCss){var b=document.createElement("style");b.setAttribute("type","text/css");b.innerHTML=this.editor.resolvedFontCss;c.getElementsByTagName("defs")[0].appendChild(b)}this.convertMath(w,c,!0,mxUtils.bind(this,function(){d.src=this.createSvgDataUri(mxUtils.getXml(c))}))});this.loadFonts(g)}catch(A){null!=f&&f(A)}}),
+c,t)};EditorUi.prototype.createImageUrlConverter=function(){var b=new mxUrlConverter;b.updateBaseUrl();var a=b.convert;b.convert=function(c){null!=c&&("http://"!=c.substring(0,7)&&"https://"!=c.substring(0,8)||c.substring(0,b.baseUrl.length)==b.baseUrl?"chrome-extension://"!=c.substring(0,19)&&(c=a.apply(this,arguments)):c=PROXY_URL+"?url="+encodeURIComponent(c));return c};return b};EditorUi.prototype.convertImages=function(b,a,c,d){null==d&&(d=this.createImageUrlConverter());var e=0,f=c||{};c=mxUtils.bind(this,
 function(c,g){for(var h=b.getElementsByTagName(c),l=0;l<h.length;l++)mxUtils.bind(this,function(c){var h=d.convert(c.getAttribute(g));if(null!=h&&"data:"!=h.substring(0,5)){var l=f[h];null==l?(e++,this.convertImageToDataUri(h,function(d){null!=d&&(f[h]=d,c.setAttribute(g,d));e--;0==e&&a(b)})):c.setAttribute(g,l)}})(h[l])});c("image","xlink:href");c("img","src");0==e&&a(b)};EditorUi.prototype.loadUrl=function(b,a,c,d,f,h){try{var e=d||/(\.png)($|\?)/i.test(b)||/(\.jpe?g)($|\?)/i.test(b)||/(\.gif)($|\?)/i.test(b);
 f=null!=f?f:!0;var g=mxUtils.bind(this,function(){mxUtils.get(b,mxUtils.bind(this,function(b){if(200<=b.getStatus()&&299>=b.getStatus()){if(null!=a){var d=b.getText();if(e){if((9==document.documentMode||10==document.documentMode)&&"undefined"!==typeof window.mxUtilsBinaryToArray){b=mxUtilsBinaryToArray(b.request.responseBody).toArray();for(var d=Array(b.length),f=0;f<b.length;f++)d[f]=String.fromCharCode(b[f]);d=d.join("")}h=null!=h?h:"data:image/png;base64,";d=h+this.base64Encode(d)}a(d)}}else null!=
-c&&c({code:App.ERROR_UNKNOWN})}),function(){null!=c&&c({code:App.ERROR_UNKNOWN})},e,this.timeout,function(){f&&null!=c&&c({code:App.ERROR_TIMEOUT,retry:g})})});g()}catch(y){null!=c&&c(y)}};EditorUi.prototype.isCorsEnabledForUrl=function(b){return"https?://raw.githubusercontent.com/"===b.substring(0,34)||/^https?:\/\/.*\.github\.io\//.test(b)||/^https?:\/\/(.*\.)?rawgit\.com\//.test(b)};EditorUi.prototype.convertImageToDataUri=function(b,a){if(/(\.svg)$/i.test(b))mxUtils.get(b,mxUtils.bind(this,function(b){a(this.createSvgDataUri(b.getText()))}),
+c&&c({code:App.ERROR_UNKNOWN})}),function(){null!=c&&c({code:App.ERROR_UNKNOWN})},e,this.timeout,function(){f&&null!=c&&c({code:App.ERROR_TIMEOUT,retry:g})})});g()}catch(x){null!=c&&c(x)}};EditorUi.prototype.isCorsEnabledForUrl=function(b){return"https?://raw.githubusercontent.com/"===b.substring(0,34)||/^https?:\/\/.*\.github\.io\//.test(b)||/^https?:\/\/(.*\.)?rawgit\.com\//.test(b)};EditorUi.prototype.convertImageToDataUri=function(b,a){if(/(\.svg)$/i.test(b))mxUtils.get(b,mxUtils.bind(this,function(b){a(this.createSvgDataUri(b.getText()))}),
 function(){a()});else{var c=new Image;c.onload=function(){var b=document.createElement("canvas"),e=b.getContext("2d");b.height=c.height;b.width=c.width;e.drawImage(c,0,0);a(b.toDataURL())};c.onerror=function(){a()};c.src=b}};EditorUi.prototype.importXml=function(b,a,c,d,f){a=null!=a?a:0;c=null!=c?c:0;var e=[];try{var g=this.editor.graph;if(null!=b&&0<b.length){var h=mxUtils.parseXml(b),l=this.editor.extractGraphModel(h.documentElement,null!=this.pages);if(null!=l&&"mxfile"==l.nodeName&&null!=this.pages){var k=
-l.getElementsByTagName("diagram");if(1==k.length)l=mxUtils.parseXml(g.decompress(mxUtils.getTextContent(k[0]))).documentElement;else if(1<k.length){g.model.beginUpdate();try{for(var p=0;p<k.length;p++){var m=this.updatePageRoot(new DiagramPage(k[p])),q=this.pages.length;null==m.getName()&&m.setName(mxResources.get("pageWithNumber",[q+1]));g.model.execute(new ChangePage(this,m,m,q))}}finally{g.model.endUpdate()}}}if(null!=l&&"mxGraphModel"===l.nodeName){var n=new mxGraphModel;(new mxCodec(l.ownerDocument)).decode(l,
-n);var B=n.getChildCount(n.getRoot());g.model.getChildCount(g.model.getRoot());g.model.beginUpdate();try{b={};for(p=0;p<B;p++){var G=n.getChildAt(n.getRoot(),p);if(1!=B||g.isCellLocked(g.getDefaultParent()))G=g.importCells([G],0,0,g.model.getRoot(),null,b)[0],z=g.model.getChildren(G),g.moveCells(z,a,c),e=e.concat(z);else var z=n.getChildren(G),e=e.concat(g.importCells(z,a,c,g.getDefaultParent(),null,b))}if(d){g.isGridEnabled()&&(a=g.snap(a),c=g.snap(c));var D=g.getBoundingBoxFromGeometry(e,!0);null!=
-D&&g.moveCells(e,a-D.x,c-D.y)}}finally{g.model.endUpdate()}}}}catch(A){throw f||this.handleError(A,mxResources.get("invalidOrMissingFile")),A;}return e};EditorUi.prototype.importLucidChart=function(b,a,c,d,f){var e=mxUtils.bind(this,function(){if(this.pasteLucidChart)try{this.insertLucidChart(b,a,c,d,f)}catch(u){this.handleError(u)}finally{null!=f&&f()}});this.pasteLucidChart||this.loadingExtensions||this.isOffline()?window.setTimeout(e,0):(this.loadingExtensions=!0,"1"==urlParams.dev?mxscript("js/diagramly/Extensions.js",
+l.getElementsByTagName("diagram");if(1==k.length)l=mxUtils.parseXml(g.decompress(mxUtils.getTextContent(k[0]))).documentElement;else if(1<k.length){g.model.beginUpdate();try{for(var t=0;t<k.length;t++){var m=this.updatePageRoot(new DiagramPage(k[t])),p=this.pages.length;null==m.getName()&&m.setName(mxResources.get("pageWithNumber",[p+1]));g.model.execute(new ChangePage(this,m,m,p))}}finally{g.model.endUpdate()}}}if(null!=l&&"mxGraphModel"===l.nodeName){var n=new mxGraphModel;(new mxCodec(l.ownerDocument)).decode(l,
+n);var B=n.getChildCount(n.getRoot());g.model.getChildCount(g.model.getRoot());g.model.beginUpdate();try{b={};for(t=0;t<B;t++){var G=n.getChildAt(n.getRoot(),t);if(1!=B||g.isCellLocked(g.getDefaultParent()))G=g.importCells([G],0,0,g.model.getRoot(),null,b)[0],z=g.model.getChildren(G),g.moveCells(z,a,c),e=e.concat(z);else var z=n.getChildren(G),e=e.concat(g.importCells(z,a,c,g.getDefaultParent(),null,b))}if(d){g.isGridEnabled()&&(a=g.snap(a),c=g.snap(c));var D=g.getBoundingBoxFromGeometry(e,!0);null!=
+D&&g.moveCells(e,a-D.x,c-D.y)}}finally{g.model.endUpdate()}}}}catch(A){throw f||this.handleError(A,mxResources.get("invalidOrMissingFile")),A;}return e};EditorUi.prototype.importLucidChart=function(b,a,c,d,f){var e=mxUtils.bind(this,function(){if(this.pasteLucidChart)try{this.insertLucidChart(b,a,c,d,f)}catch(v){this.handleError(v)}finally{null!=f&&f()}});this.pasteLucidChart||this.loadingExtensions||this.isOffline()?window.setTimeout(e,0):(this.loadingExtensions=!0,"1"==urlParams.dev?mxscript("js/diagramly/Extensions.js",
 e):mxscript("js/extensions.min.js",e))};EditorUi.prototype.insertLucidChart=function(b,a,c,d,f){f=JSON.parse(b);b=[];if(null!=f.state){f=JSON.parse(f.state);for(var e in f.Pages)b.push(f.Pages[e]);b.sort(function(b,a){return b.Properties.Order<a.Properties.Order?-1:b.Properties.Order>a.Properties.Order?1:0})}else b.push(f);if(0<b.length){this.editor.graph.getModel().beginUpdate();try{if(this.pasteLucidChart(b[0],a,c,d),null!=this.pages){var g=this.currentPage;for(a=1;a<b.length;a++)this.insertPage(),
 this.pasteLucidChart(b[a]);this.selectPage(g)}}finally{this.editor.graph.getModel().endUpdate()}}};EditorUi.prototype.insertTextAt=function(b,a,c,d,f,h,k){h=null!=h?h:!0;k=null!=k?k:!0;if(null!=b)if(Graph.fileSupport&&!this.isOffline()&&(new XMLHttpRequest).upload&&this.isRemoteFileFormat(b))this.parseFile(new Blob([b.replace(/\s+/g," ")],{type:"application/octet-stream"}),mxUtils.bind(this,function(b){4==b.readyState&&200<=b.status&&299>=b.status&&this.editor.graph.setSelectionCells(this.insertTextAt(b.responseText,
 a,c,!0))}));else if("data:"==b.substring(0,5)||!this.isOffline()&&(f||/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(b))){var e=this.editor.graph;if("data:image/png;base64,"==b.substring(0,22)){var g=this.extractGraphModelFromPng(b),l=this.importXml(g,a,c,h,!0);if(0<l.length)return l}if("data:image/svg+xml;"==b.substring(0,19))try{if(g=null,"data:image/svg+xml;base64,"==b.substring(0,26)?(g=b.substring(b.indexOf(",")+1),g=window.atob&&!mxClient.IS_SF?atob(g):Base64.decode(g,!0)):g=decodeURIComponent(b.substring(b.indexOf(",")+
-1)),l=this.importXml(g,a,c,h,!0),0<l.length)return l}catch(p){}this.loadImage(b,mxUtils.bind(this,function(d){if("data:"==b.substring(0,5))this.resizeImage(d,b,mxUtils.bind(this,function(b,d,f){e.setSelectionCell(e.insertVertex(null,null,"",e.snap(a),e.snap(c),d,f,"shape=image;verticalLabelPosition=bottom;labelBackgroundColor=#ffffff;verticalAlign=top;aspect=fixed;imageAspect=0;image="+this.convertDataUri(b)+";"))}),k,this.maxImageSize);else{var f=Math.min(1,Math.min(this.maxImageSize/d.width,this.maxImageSize/
+1)),l=this.importXml(g,a,c,h,!0),0<l.length)return l}catch(t){}this.loadImage(b,mxUtils.bind(this,function(d){if("data:"==b.substring(0,5))this.resizeImage(d,b,mxUtils.bind(this,function(b,d,f){e.setSelectionCell(e.insertVertex(null,null,"",e.snap(a),e.snap(c),d,f,"shape=image;verticalLabelPosition=bottom;labelBackgroundColor=#ffffff;verticalAlign=top;aspect=fixed;imageAspect=0;image="+this.convertDataUri(b)+";"))}),k,this.maxImageSize);else{var f=Math.min(1,Math.min(this.maxImageSize/d.width,this.maxImageSize/
 d.height)),g=Math.round(d.width*f);d=Math.round(d.height*f);e.setSelectionCell(e.insertVertex(null,null,"",e.snap(a),e.snap(c),g,d,"shape=image;verticalLabelPosition=bottom;labelBackgroundColor=#ffffff;verticalAlign=top;aspect=fixed;imageAspect=0;image="+b+";"))}}),mxUtils.bind(this,function(){var f=null;e.getModel().beginUpdate();try{f=e.insertVertex(e.getDefaultParent(),null,b,e.snap(a),e.snap(c),1,1,"text;"+(d?"html=1;":"")),e.updateCellSize(f),e.fireEvent(new mxEventObject("textInserted","cells",
 [f]))}finally{e.getModel().endUpdate()}e.setSelectionCell(f)}))}else{b=this.editor.graph.zapGremlins(mxUtils.trim(b));if(this.isCompatibleString(b))return this.importXml(b,a,c,h);if(0<b.length)if('{"state":"{\\"Properties\\":'==b.substring(0,26))this.importLucidChart(b,a,c,h);else{e=this.editor.graph;f=null;e.getModel().beginUpdate();try{f=e.insertVertex(e.getDefaultParent(),null,"",e.snap(a),e.snap(c),1,1,"text;"+(d?"html=1;":"")),e.fireEvent(new mxEventObject("textInserted","cells",[f])),f.value=
 b,e.updateCellSize(f),/\b((?:[a-z][\w-]+:(?:\/{1,3}|[a-z0-9%])|www\d{0,3}[.]|[a-z0-9.\-]+[.][a-z]{2,4}\/)(?:[^\s()<>]+|\(([^\s()<>]+|(\([^\s()<>]+\)))*\))+(?:\(([^\s()<>]+|(\([^\s()<>]+\)))*\)|[^\s`!()\[\]{};:'".,<>?«»“”‘’]))/i.test(f.value)&&e.setLinkForCell(f,f.value),f.geometry.width+=e.gridSize,f.geometry.height+=e.gridSize}finally{e.getModel().endUpdate()}return[f]}}return[]};EditorUi.prototype.formatFileSize=function(b){var a=-1;do b/=1024,a++;while(1024<b);return Math.max(b,.1).toFixed(1)+
-" kB; MB; GB; TB;PB;EB;ZB;YB".split(";")[a]};EditorUi.prototype.convertDataUri=function(b){if("data:"==b.substring(0,5)){var a=b.indexOf(";");0<a&&(b=b.substring(0,a)+b.substring(b.indexOf(",",a+1)))}return b};EditorUi.prototype.isRemoteFileFormat=function(b,a){return/(\.*<graphml xmlns=\".*)/.test(b)||/(\"contentType\":\s*\"application\/gliffy\+json\")/.test(b)||null!=a&&/(\.vsdx)($|\?)/i.test(a)||null!=a&&/(\.vssx)($|\?)/i.test(a)};EditorUi.prototype.importFile=function(b,a,c,d,f,h,k,m,n,x,p){x=
-null!=x?x:!0;var e=!1,g=null;"image"==a.substring(0,5)?(n=!1,"image/png"==a.substring(0,9)&&(a=p?null:this.extractGraphModelFromPng(b),null!=a&&0<a.length&&(g=this.importXml(a,c,d,x),n=!0)),n||(g=this.editor.graph,a=b.indexOf(";"),0<a&&(b=b.substring(0,a)+b.substring(b.indexOf(",",a+1))),x&&g.isGridEnabled()&&(c=g.snap(c),d=g.snap(d)),g=[g.insertVertex(null,null,"",c,d,f,h,"shape=image;verticalLabelPosition=bottom;labelBackgroundColor=#ffffff;verticalAlign=top;aspect=fixed;imageAspect=0;image="+b+
-";")])):!this.isOffline()&&(new XMLHttpRequest).upload&&this.isRemoteFileFormat(b,k)?(e=!0,this.parseFile(null!=n?n:new Blob([b],{type:"application/octet-stream"}),mxUtils.bind(this,function(b){if(4==b.readyState){var a=null;200<=b.status&&299>=b.status&&(b=b.responseText,null!=b&&"<mxlibrary"==b.substring(0,10)?(null!=k&&".vssx"==k.toLowerCase().substring(k.length-5)&&(k=k.substring(0,k.length-5)+".xml"),this.loadLibrary(new LocalLibrary(this,b,k))):a=this.importXml(b,c,d,x));null!=m&&m(a)}}),k)):
-/(\.vsd)($|\?)/i.test(k)||(g=this.insertTextAt(this.validateFileData(b),c,d,!0,null,x));e||null==m||m(g);return g};EditorUi.prototype.base64Encode=function(b){for(var a="",c=0,d=b.length,f,h,k;c<d;){f=b.charCodeAt(c++)&255;if(c==d){a+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(f>>2);a+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((f&3)<<4);a+="==";break}h=b.charCodeAt(c++);if(c==d){a+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(f>>
+" kB; MB; GB; TB;PB;EB;ZB;YB".split(";")[a]};EditorUi.prototype.convertDataUri=function(b){if("data:"==b.substring(0,5)){var a=b.indexOf(";");0<a&&(b=b.substring(0,a)+b.substring(b.indexOf(",",a+1)))}return b};EditorUi.prototype.isRemoteFileFormat=function(b,a){return/(\.*<graphml xmlns=\".*)/.test(b)||/(\"contentType\":\s*\"application\/gliffy\+json\")/.test(b)||null!=a&&/(\.vsdx)($|\?)/i.test(a)||null!=a&&/(\.vssx)($|\?)/i.test(a)};EditorUi.prototype.importFile=function(b,a,c,d,f,h,k,m,n,y,t){y=
+null!=y?y:!0;var e=!1,g=null;"image"==a.substring(0,5)?(n=!1,"image/png"==a.substring(0,9)&&(a=t?null:this.extractGraphModelFromPng(b),null!=a&&0<a.length&&(g=this.importXml(a,c,d,y),n=!0)),n||(g=this.editor.graph,a=b.indexOf(";"),0<a&&(b=b.substring(0,a)+b.substring(b.indexOf(",",a+1))),y&&g.isGridEnabled()&&(c=g.snap(c),d=g.snap(d)),g=[g.insertVertex(null,null,"",c,d,f,h,"shape=image;verticalLabelPosition=bottom;labelBackgroundColor=#ffffff;verticalAlign=top;aspect=fixed;imageAspect=0;image="+b+
+";")])):!this.isOffline()&&(new XMLHttpRequest).upload&&this.isRemoteFileFormat(b,k)?(e=!0,this.parseFile(null!=n?n:new Blob([b],{type:"application/octet-stream"}),mxUtils.bind(this,function(b){if(4==b.readyState){var a=null;200<=b.status&&299>=b.status&&(b=b.responseText,null!=b&&"<mxlibrary"==b.substring(0,10)?(null!=k&&".vssx"==k.toLowerCase().substring(k.length-5)&&(k=k.substring(0,k.length-5)+".xml"),this.loadLibrary(new LocalLibrary(this,b,k))):a=this.importXml(b,c,d,y));null!=m&&m(a)}}),k)):
+/(\.vsd)($|\?)/i.test(k)||(g=this.insertTextAt(this.validateFileData(b),c,d,!0,null,y));e||null==m||m(g);return g};EditorUi.prototype.base64Encode=function(b){for(var a="",c=0,d=b.length,f,h,k;c<d;){f=b.charCodeAt(c++)&255;if(c==d){a+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(f>>2);a+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((f&3)<<4);a+="==";break}h=b.charCodeAt(c++);if(c==d){a+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(f>>
 2);a+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((f&3)<<4|(h&240)>>4);a+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((h&15)<<2);a+="=";break}k=b.charCodeAt(c++);a+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(f>>2);a+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((f&3)<<4|(h&240)>>4);a+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((h&15)<<2|(k&192)>>6);
-a+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(k&63)}return a};EditorUi.prototype.importFiles=function(b,a,c,d,f,h,k,m,n,x,p,w){a=null!=a?a:0;c=null!=c?c:0;d=null!=d?d:this.maxImageSize;x=null!=x?x:this.maxImageBytes;var e=null!=a&&null!=c,g=!0,l=!1;if(!mxClient.IS_CHROMEAPP&&null!=b)for(var q=p||this.resampleThreshold,t=0;t<b.length;t++)if("image/"==b[t].type.substring(0,6)&&b[t].size>q){l=!0;break}var u=mxUtils.bind(this,function(){var l=this.editor.graph,n=l.gridSize;
-f=null!=f?f:mxUtils.bind(this,function(b,a,c,d,f,g,h,l,p){return null!=b&&"<mxlibrary"==b.substring(0,10)?(this.spinner.stop(),this.loadLibrary(new LocalLibrary(this,b,h)),null):this.importFile(b,a,c,d,f,g,h,l,p,e,w)});h=null!=h?h:mxUtils.bind(this,function(b){l.setSelectionCells(b)});if(this.spinner.spin(document.body,mxResources.get("loading")))for(var q=b.length,t=q,u=[],v=mxUtils.bind(this,function(b,a){u[b]=a;if(0==--t){this.spinner.stop();if(null!=m)m(u);else{var c=[];l.getModel().beginUpdate();
-try{for(var e=0;e<u.length;e++){var d=u[e]();null!=d&&(c=c.concat(d))}}finally{l.getModel().endUpdate()}}h(c)}}),C=0;C<q;C++)mxUtils.bind(this,function(e){var h=b[e],l=new FileReader;l.onload=mxUtils.bind(this,function(b){if(null==k||k(h))if("image/"==h.type.substring(0,6))if("image/svg"==h.type.substring(0,9)){var l=b.target.result,m=l.indexOf(","),q=atob(l.substring(m+1)),t=mxUtils.parseXml(q),q=t.getElementsByTagName("svg");if(0<q.length){var q=q[0],A=w?null:q.getAttribute("content");null!=A&&
-"<"!=A.charAt(0)&&"%"!=A.charAt(0)&&(A=unescape(window.atob?atob(A):Base64.decode(A,!0)));null!=A&&"%"==A.charAt(0)&&(A=decodeURIComponent(A));null==A||"<mxfile "!==A.substring(0,8)&&"<mxGraphModel "!==A.substring(0,14)?v(e,mxUtils.bind(this,function(){try{if(l.substring(0,m+1),null!=t){var b=t.getElementsByTagName("svg");if(0<b.length){var g=b[0],p=parseFloat(g.getAttribute("width")),k=parseFloat(g.getAttribute("height")),q=g.getAttribute("viewBox");if(null==q||0==q.length)g.setAttribute("viewBox",
-"0 0 "+p+" "+k);else if(isNaN(p)||isNaN(k)){var w=q.split(" ");3<w.length&&(p=parseFloat(w[2]),k=parseFloat(w[3]))}l=this.createSvgDataUri(mxUtils.getXml(b[0]));var A=Math.min(1,Math.min(d/Math.max(1,p)),d/Math.max(1,k));return f(l,h.type,a+e*n,c+e*n,Math.max(1,Math.round(p*A)),Math.max(1,Math.round(k*A)),h.name)}}}catch(Z){}return null})):v(e,mxUtils.bind(this,function(){return f(A,"text/xml",a+e*n,c+e*n,0,0,h.name)}))}}else{q=!1;if("image/png"==h.type){var u=w?null:this.extractGraphModelFromPng(b.target.result);
-if(null!=u&&0<u.length){var H=new Image;H.src=b.target.result;v(e,mxUtils.bind(this,function(){return f(u,"text/xml",a+e*n,c+e*n,H.width,H.height,h.name)}));q=!0}}q||(mxClient.IS_CHROMEAPP?(this.spinner.stop(),this.showError(mxResources.get("error"),mxResources.get("dragAndDropNotSupported"),mxResources.get("cancel"),mxUtils.bind(this,function(){}),null,mxResources.get("ok"),mxUtils.bind(this,function(){this.actions.get("import").funct()}))):this.loadImage(b.target.result,mxUtils.bind(this,function(l){this.resizeImage(l,
-b.target.result,mxUtils.bind(this,function(l,k,m){v(e,mxUtils.bind(this,function(){if(null!=l&&l.length<x){var q=g&&this.isResampleImage(b.target.result,p)?Math.min(1,Math.min(d/k,d/m)):1;return f(l,h.type,a+e*n,c+e*n,Math.round(k*q),Math.round(m*q),h.name)}this.handleError({message:mxResources.get("imageTooBig")});return null}))}),g,d,p)})))}else f(b.target.result,h.type,a+e*n,c+e*n,240,160,h.name,function(b){v(e,function(){return b})})});/(\.vsdx)($|\?)/i.test(h.name)||/(\.vssx)($|\?)/i.test(h.name)?
-f(null,h.type,a+e*n,c+e*n,240,160,h.name,function(b){v(e,function(){return b})},h):"image"==h.type.substring(0,5)?l.readAsDataURL(h):l.readAsText(h)})(C)});l?this.confirmImageResize(function(b){g=b;u()},n):u()};EditorUi.prototype.confirmImageResize=function(b,a){a=null!=a?a:!1;var c=null!=this.spinner&&null!=this.spinner.pause?this.spinner.pause():function(){},e=isLocalStorage||mxClient.IS_CHROMEAPP?mxSettings.getResizeImages():null,d=function(e,d){if(e||a)mxSettings.setResizeImages(e?d:null),mxSettings.save();
+a+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(k&63)}return a};EditorUi.prototype.importFiles=function(b,a,c,d,f,h,k,m,n,y,t,w){a=null!=a?a:0;c=null!=c?c:0;d=null!=d?d:this.maxImageSize;y=null!=y?y:this.maxImageBytes;var e=null!=a&&null!=c,g=!0,l=!1;if(!mxClient.IS_CHROMEAPP&&null!=b)for(var p=t||this.resampleThreshold,q=0;q<b.length;q++)if("image/"==b[q].type.substring(0,6)&&b[q].size>p){l=!0;break}var u=mxUtils.bind(this,function(){var l=this.editor.graph,p=l.gridSize;
+f=null!=f?f:mxUtils.bind(this,function(b,a,c,d,f,g,h,l,k){return null!=b&&"<mxlibrary"==b.substring(0,10)?(this.spinner.stop(),this.loadLibrary(new LocalLibrary(this,b,h)),null):this.importFile(b,a,c,d,f,g,h,l,k,e,w)});h=null!=h?h:mxUtils.bind(this,function(b){l.setSelectionCells(b)});if(this.spinner.spin(document.body,mxResources.get("loading")))for(var n=b.length,q=n,u=[],v=mxUtils.bind(this,function(b,a){u[b]=a;if(0==--q){this.spinner.stop();if(null!=m)m(u);else{var c=[];l.getModel().beginUpdate();
+try{for(var e=0;e<u.length;e++){var d=u[e]();null!=d&&(c=c.concat(d))}}finally{l.getModel().endUpdate()}}h(c)}}),C=0;C<n;C++)mxUtils.bind(this,function(e){var h=b[e],l=new FileReader;l.onload=mxUtils.bind(this,function(b){if(null==k||k(h))if("image/"==h.type.substring(0,6))if("image/svg"==h.type.substring(0,9)){var l=b.target.result,m=l.indexOf(","),n=atob(l.substring(m+1)),q=mxUtils.parseXml(n),n=q.getElementsByTagName("svg");if(0<n.length){var n=n[0],A=w?null:n.getAttribute("content");null!=A&&
+"<"!=A.charAt(0)&&"%"!=A.charAt(0)&&(A=unescape(window.atob?atob(A):Base64.decode(A,!0)));null!=A&&"%"==A.charAt(0)&&(A=decodeURIComponent(A));null==A||"<mxfile "!==A.substring(0,8)&&"<mxGraphModel "!==A.substring(0,14)?v(e,mxUtils.bind(this,function(){try{if(l.substring(0,m+1),null!=q){var b=q.getElementsByTagName("svg");if(0<b.length){var g=b[0],k=parseFloat(g.getAttribute("width")),t=parseFloat(g.getAttribute("height")),n=g.getAttribute("viewBox");if(null==n||0==n.length)g.setAttribute("viewBox",
+"0 0 "+k+" "+t);else if(isNaN(k)||isNaN(t)){var w=n.split(" ");3<w.length&&(k=parseFloat(w[2]),t=parseFloat(w[3]))}l=this.createSvgDataUri(mxUtils.getXml(b[0]));var A=Math.min(1,Math.min(d/Math.max(1,k)),d/Math.max(1,t));return f(l,h.type,a+e*p,c+e*p,Math.max(1,Math.round(k*A)),Math.max(1,Math.round(t*A)),h.name)}}}catch(Z){}return null})):v(e,mxUtils.bind(this,function(){return f(A,"text/xml",a+e*p,c+e*p,0,0,h.name)}))}}else{n=!1;if("image/png"==h.type){var u=w?null:this.extractGraphModelFromPng(b.target.result);
+if(null!=u&&0<u.length){var H=new Image;H.src=b.target.result;v(e,mxUtils.bind(this,function(){return f(u,"text/xml",a+e*p,c+e*p,H.width,H.height,h.name)}));n=!0}}n||(mxClient.IS_CHROMEAPP?(this.spinner.stop(),this.showError(mxResources.get("error"),mxResources.get("dragAndDropNotSupported"),mxResources.get("cancel"),mxUtils.bind(this,function(){}),null,mxResources.get("ok"),mxUtils.bind(this,function(){this.actions.get("import").funct()}))):this.loadImage(b.target.result,mxUtils.bind(this,function(l){this.resizeImage(l,
+b.target.result,mxUtils.bind(this,function(l,k,m){v(e,mxUtils.bind(this,function(){if(null!=l&&l.length<y){var n=g&&this.isResampleImage(b.target.result,t)?Math.min(1,Math.min(d/k,d/m)):1;return f(l,h.type,a+e*p,c+e*p,Math.round(k*n),Math.round(m*n),h.name)}this.handleError({message:mxResources.get("imageTooBig")});return null}))}),g,d,t)})))}else f(b.target.result,h.type,a+e*p,c+e*p,240,160,h.name,function(b){v(e,function(){return b})})});/(\.vsdx)($|\?)/i.test(h.name)||/(\.vssx)($|\?)/i.test(h.name)?
+f(null,h.type,a+e*p,c+e*p,240,160,h.name,function(b){v(e,function(){return b})},h):"image"==h.type.substring(0,5)?l.readAsDataURL(h):l.readAsText(h)})(C)});l?this.confirmImageResize(function(b){g=b;u()},n):u()};EditorUi.prototype.confirmImageResize=function(b,a){a=null!=a?a:!1;var c=null!=this.spinner&&null!=this.spinner.pause?this.spinner.pause():function(){},e=isLocalStorage||mxClient.IS_CHROMEAPP?mxSettings.getResizeImages():null,d=function(e,d){if(e||a)mxSettings.setResizeImages(e?d:null),mxSettings.save();
 c();b(d)};null==e||a?this.showDialog((new ConfirmDialog(this,mxResources.get("resizeLargeImages"),function(b){d(b,!0)},function(b){d(b,!1)},mxResources.get("resize"),mxResources.get("actualSize"),'<img style="margin-top:8px;" src="'+Editor.loResImage+'"/>','<img style="margin-top:8px;" src="'+Editor.hiResImage+'"/>',isLocalStorage||mxClient.IS_CHROMEAPP)).container,340,isLocalStorage||mxClient.IS_CHROMEAPP?220:200,!0,!0):d(!1,e)};EditorUi.prototype.parseFile=function(b,a,c){c=null!=c?c:b.name;var e=
-new FormData;e.append("format","xml");e.append("upfile",b,c);var d=new XMLHttpRequest;d.open("POST",OPEN_URL);d.onreadystatechange=function(){a(d)};d.send(e)};EditorUi.prototype.isResampleImage=function(b,a){a=null!=a?a:this.resampleThreshold;return b.length>a};EditorUi.prototype.resizeImage=function(b,a,c,d,f,h){f=null!=f?f:this.maxImageSize;var e=Math.max(1,b.width),g=Math.max(1,b.height);if(d&&this.isResampleImage(a,h))try{var l=Math.max(e/f,g/f);if(1<l){var k=Math.round(e/l),p=Math.round(g/l),
-m=document.createElement("canvas");m.width=k;m.height=p;m.getContext("2d").drawImage(b,0,0,k,p);var n=m.toDataURL();if(n.length<a.length){var q=document.createElement("canvas");q.width=k;q.height=p;var v=q.toDataURL();n!==v&&(a=n,e=k,g=p)}}}catch(G){}c(a,e,g)};EditorUi.prototype.crcTable=[];for(var f=0;256>f;f++)for(var c=f,h=0;8>h;h++)c=1==(c&1)?3988292384^c>>>1:c>>>1,EditorUi.prototype.crcTable[f]=c;EditorUi.prototype.updateCRC=function(b,a,c,d){for(var e=0;e<d;e++)b=EditorUi.prototype.crcTable[(b^
+new FormData;e.append("format","xml");e.append("upfile",b,c);var d=new XMLHttpRequest;d.open("POST",OPEN_URL);d.onreadystatechange=function(){a(d)};d.send(e)};EditorUi.prototype.isResampleImage=function(b,a){a=null!=a?a:this.resampleThreshold;return b.length>a};EditorUi.prototype.resizeImage=function(b,a,c,d,f,h){f=null!=f?f:this.maxImageSize;var e=Math.max(1,b.width),g=Math.max(1,b.height);if(d&&this.isResampleImage(a,h))try{var l=Math.max(e/f,g/f);if(1<l){var k=Math.round(e/l),t=Math.round(g/l),
+m=document.createElement("canvas");m.width=k;m.height=t;m.getContext("2d").drawImage(b,0,0,k,t);var n=m.toDataURL();if(n.length<a.length){var p=document.createElement("canvas");p.width=k;p.height=t;var u=p.toDataURL();n!==u&&(a=n,e=k,g=t)}}}catch(G){}c(a,e,g)};EditorUi.prototype.crcTable=[];for(var f=0;256>f;f++)for(var c=f,h=0;8>h;h++)c=1==(c&1)?3988292384^c>>>1:c>>>1,EditorUi.prototype.crcTable[f]=c;EditorUi.prototype.updateCRC=function(b,a,c,d){for(var e=0;e<d;e++)b=EditorUi.prototype.crcTable[(b^
 a[c+e])&255]^b>>>8;return b};EditorUi.prototype.writeGraphModelToPng=function(b,a,c,d,f){function e(b,a){var c=l;l+=a;return b.substring(c,l)}function g(b){b=e(b,4);return b.charCodeAt(3)+(b.charCodeAt(2)<<8)+(b.charCodeAt(1)<<16)+(b.charCodeAt(0)<<24)}function h(b){return String.fromCharCode(b>>24&255,b>>16&255,b>>8&255,b&255)}b=b.substring(b.indexOf(",")+1);b=window.atob?atob(b):Base64.decode(b,!0);var l=0;if(e(b,8)!=String.fromCharCode(137)+"PNG"+String.fromCharCode(13,10,26,10))null!=f&&f();else if(e(b,
 4),"IHDR"!=e(b,4))null!=f&&f();else{e(b,17);f=b.substring(0,l);do{var k=g(b);if("IDAT"==e(b,4)){f=b.substring(0,l-8);c=c+String.fromCharCode(0)+("zTXt"==a?String.fromCharCode(0):"")+d;d=4294967295;d=this.updateCRC(d,a,0,4);d=this.updateCRC(d,c,0,c.length);f+=h(c.length)+a+c+h(d^4294967295);f+=b.substring(l-8,b.length);break}f+=b.substring(l-8,l-4+k);d=e(b,k);e(b,4)}while(k);return"data:image/png;base64,"+(window.btoa?btoa(f):Base64.encode(f,!0))}};EditorUi.prototype.extractGraphModelFromPng=function(b){var a=
-null;try{var c=b.substring(b.indexOf(",")+1),d=window.atob&&!mxClient.IS_SF?atob(c):Base64.decode(c,!0);EditorUi.parsePng(d,mxUtils.bind(this,function(b,c,e){b=d.substring(b+8,b+8+e);"zTXt"==c?(e=b.indexOf(String.fromCharCode(0)),"mxGraphModel"==b.substring(0,e)&&(b=this.editor.graph.bytesToString(pako.inflateRaw(b.substring(e+2))).replace(/\+/g," "),null!=b&&0<b.length&&(a=b))):"tEXt"==c&&(b=b.split(String.fromCharCode(0)),1<b.length&&"mxGraphModel"==b[0]&&(a=b[1]));if(null!=a||"IDAT"==c)return!0}))}catch(q){}null!=
+null;try{var c=b.substring(b.indexOf(",")+1),d=window.atob&&!mxClient.IS_SF?atob(c):Base64.decode(c,!0);EditorUi.parsePng(d,mxUtils.bind(this,function(b,c,e){b=d.substring(b+8,b+8+e);"zTXt"==c?(e=b.indexOf(String.fromCharCode(0)),"mxGraphModel"==b.substring(0,e)&&(b=this.editor.graph.bytesToString(pako.inflateRaw(b.substring(e+2))).replace(/\+/g," "),null!=b&&0<b.length&&(a=b))):"tEXt"==c&&(b=b.split(String.fromCharCode(0)),1<b.length&&"mxGraphModel"==b[0]&&(a=b[1]));if(null!=a||"IDAT"==c)return!0}))}catch(p){}null!=
 a&&"%"==a.charAt(0)&&(a=decodeURIComponent(a));null!=a&&"%"==a.charAt(0)&&(a=decodeURIComponent(a));return a};EditorUi.prototype.loadImage=function(b,a,c){var e=new Image;e.onload=function(){a(e)};null!=c&&(e.onerror=c);e.src=b};var k=EditorUi.prototype.init;EditorUi.prototype.init=function(){function b(b){var c=b.indexOf(",");0<c&&(b=a.getPageById(b.substring(c+1)))&&a.selectPage(b)}"undefined"!==typeof window.mxSettings&&(this.formatWidth=mxSettings.getFormatWidth());var a=this,c=this.editor.graph,
 d=a.editor.getEditBlankUrl;this.editor.getEditBlankUrl=function(b){b=null!=b?b:"";if(null!=a.pages&&null!=a.currentPage)for(var c=0;c<a.pages.length;c++)if(a.pages[c]==a.currentPage){0<c&&(b+=(0<b.length?"&":"?")+"page="+c);break}"1"==urlParams.dev&&(b+=(0<b.length?"&":"?")+"dev=1&drawdev=1");return d.apply(this,arguments)};var f=c.addClickHandler;c.addClickHandler=function(a,e,d){var g=e;e=function(a,e){if(null==e){var d=mxEvent.getSource(a);"a"==d.nodeName.toLowerCase()&&(e=d.getAttribute("href"))}null==
 e||!c.isPageLink(e)||!mxEvent.isTouchEvent(a)&&mxEvent.isPopupTrigger(a)||(b(e),mxEvent.consume(a));null!=g&&g(a,e)};f.call(this,a,e,d)};k.apply(this,arguments);mxClient.IS_SVG&&this.editor.graph.addSvgShadow(c.view.canvas.ownerSVGElement,null,!0);a.actions.get("print").funct=function(){a.showDialog((new PrintDialog(a)).container,360,null!=a.pages&&1<a.pages.length?420:360,!0,!0)};this.defaultFilename=mxResources.get("untitledDiagram");var h=c.getGlobalVariable;c.getGlobalVariable=function(b){return"page"==
 b&&null!=a.currentPage?a.currentPage.getName():"pagenumber"==b?null!=a.currentPage&&null!=a.pages?mxUtils.indexOf(a.pages,a.currentPage)+1:1:h.apply(this,arguments)};var m=c.createLinkForHint;c.createLinkForHint=function(e,d){var f=c.isPageLink(e);if(f){var g=e.indexOf(",");0<g&&(g=a.getPageById(e.substring(g+1)),d=null!=g?g.getName():mxResources.get("pageNotFound"))}g=m.call(this,e,d);f&&mxEvent.addListener(g,"click",function(a){b(e);mxEvent.consume(a)});return g};var n=c.labelLinkClicked;c.labelLinkClicked=
-function(a,e,d){var f=e.getAttribute("href");null==f||!c.isPageLink(f)||!mxEvent.isTouchEvent(d)&&mxEvent.isPopupTrigger(d)?n.apply(this,arguments):(c.isEnabled()||b(f),mxEvent.consume(d))};this.editor.getOrCreateFilename=function(){var b=a.defaultFilename,c=a.getCurrentFile();null!=c&&(b=null!=c.getTitle()?c.getTitle():b);return b};var y=this.actions.get("print");y.setEnabled(!mxClient.IS_IOS||!navigator.standalone);y.visible=y.isEnabled();if(!this.editor.chromeless||this.editor.editable){var x=
-function(){window.setTimeout(function(){p.innerHTML="&nbsp;";p.focus();document.execCommand("selectAll",!1,null)},0)};this.keyHandler.bindAction(70,!0,"find");this.keyHandler.bindAction(67,!0,"copyStyle",!0);this.keyHandler.bindAction(86,!0,"pasteStyle",!0);this.keyHandler.bindAction(77,!0,"editGeometry",!0);this.keyHandler.bindAction(88,!0,"insertText",!0);this.keyHandler.bindAction(75,!0,"insertRectangle");this.keyHandler.bindAction(75,!0,"insertEllipse",!0);mxClient.IS_IE||c.container.addEventListener("paste",
+function(a,e,d){var f=e.getAttribute("href");null==f||!c.isPageLink(f)||!mxEvent.isTouchEvent(d)&&mxEvent.isPopupTrigger(d)?n.apply(this,arguments):(c.isEnabled()||b(f),mxEvent.consume(d))};this.editor.getOrCreateFilename=function(){var b=a.defaultFilename,c=a.getCurrentFile();null!=c&&(b=null!=c.getTitle()?c.getTitle():b);return b};var x=this.actions.get("print");x.setEnabled(!mxClient.IS_IOS||!navigator.standalone);x.visible=x.isEnabled();if(!this.editor.chromeless||this.editor.editable){var y=
+function(){window.setTimeout(function(){t.innerHTML="&nbsp;";t.focus();document.execCommand("selectAll",!1,null)},0)};this.keyHandler.bindAction(70,!0,"find");this.keyHandler.bindAction(67,!0,"copyStyle",!0);this.keyHandler.bindAction(86,!0,"pasteStyle",!0);this.keyHandler.bindAction(77,!0,"editGeometry",!0);this.keyHandler.bindAction(88,!0,"insertText",!0);this.keyHandler.bindAction(75,!0,"insertRectangle");this.keyHandler.bindAction(75,!0,"insertEllipse",!0);mxClient.IS_IE||c.container.addEventListener("paste",
 mxUtils.bind(this,function(b){var a=this.editor.graph;if(!mxEvent.isConsumed(b))try{for(var c=b.clipboardData||b.originalEvent.clipboardData,e=!1,d=0;d<c.types.length;d++)if("text/"===c.types[d].substring(0,5)){e=!0;break}if(!e){var f=c.items;for(index in f){var g=f[index];if("file"===g.kind){if(a.isEditing())this.importFiles([g.getAsFile()],0,0,this.maxImageSize,function(b,c,e,d,f,g){a.insertImage(b,f,g)},function(){},function(b){return"image/"==b.type.substring(0,6)},function(b){for(var a=0;a<b.length;a++)b[a]()});
-else{var h=this.editor.graph.getInsertPoint();this.importFiles([g.getAsFile()],h.x,h.y,this.maxImageSize);mxEvent.consume(b)}break}}}}catch(R){}}),!1);var p=document.createElement("div");p.style.position="absolute";p.style.whiteSpace="nowrap";p.style.overflow="hidden";p.style.display="block";p.contentEditable=!0;mxUtils.setOpacity(p,0);p.style.width="1px";p.style.height="1px";p.innerHTML="&nbsp;";var w=!1;this.keyHandler.bindControlKey(88,null);this.keyHandler.bindControlKey(67,null);this.keyHandler.bindControlKey(86,
-null);mxEvent.addListener(document,"keydown",mxUtils.bind(this,function(b){var a=mxEvent.getSource(b);null==c.container||!c.isEnabled()||c.isMouseDown||c.isEditing()||null!=this.dialog||"INPUT"==a.nodeName||"TEXTAREA"==a.nodeName||!(224==b.keyCode||!mxClient.IS_MAC&&17==b.keyCode||mxClient.IS_MAC&&91==b.keyCode)||w||(p.style.left=c.container.scrollLeft+10+"px",p.style.top=c.container.scrollTop+10+"px",c.container.appendChild(p),w=!0,mxClient.IS_QUIRKS?window.setTimeout(function(){p.focus();document.execCommand("selectAll",
-!1,null)},0):(p.focus(),document.execCommand("selectAll",!1,null)))}));mxEvent.addListener(document,"keyup",mxUtils.bind(this,function(b){var a=b.keyCode;window.setTimeout(mxUtils.bind(this,function(){!w||224!=a&&17!=a&&91!=a||(w=!1,c.isEditing()||null!=this.dialog||null==c.container||c.container.focus(),p.parentNode.removeChild(p))}),0)}));mxEvent.addListener(p,"copy",mxUtils.bind(this,function(b){c.isEnabled()&&(mxClipboard.copy(c),this.copyCells(p),x())}));mxEvent.addListener(p,"cut",mxUtils.bind(this,
-function(b){c.isEnabled()&&(this.copyCells(p,!0),x())}));mxEvent.addListener(p,"paste",mxUtils.bind(this,function(b){c.isEnabled()&&!c.isCellLocked(c.getDefaultParent())&&(p.innerHTML="&nbsp;",p.focus(),window.setTimeout(mxUtils.bind(this,function(){this.pasteCells(b,p);p.innerHTML="&nbsp;"}),0))}),!0);var C=this.isSelectionAllowed;this.isSelectionAllowed=function(b){return mxEvent.getSource(b)==p?!0:C.apply(this,arguments)}}this.spinner=this.createSpinner(document.body.clientWidth/2-2,Math.max(document.body.clientHeight||
+else{var h=this.editor.graph.getInsertPoint();this.importFiles([g.getAsFile()],h.x,h.y,this.maxImageSize);mxEvent.consume(b)}break}}}}catch(R){}}),!1);var t=document.createElement("div");t.style.position="absolute";t.style.whiteSpace="nowrap";t.style.overflow="hidden";t.style.display="block";t.contentEditable=!0;mxUtils.setOpacity(t,0);t.style.width="1px";t.style.height="1px";t.innerHTML="&nbsp;";var w=!1;this.keyHandler.bindControlKey(88,null);this.keyHandler.bindControlKey(67,null);this.keyHandler.bindControlKey(86,
+null);mxEvent.addListener(document,"keydown",mxUtils.bind(this,function(b){var a=mxEvent.getSource(b);null==c.container||!c.isEnabled()||c.isMouseDown||c.isEditing()||null!=this.dialog||"INPUT"==a.nodeName||"TEXTAREA"==a.nodeName||!(224==b.keyCode||!mxClient.IS_MAC&&17==b.keyCode||mxClient.IS_MAC&&91==b.keyCode)||w||(t.style.left=c.container.scrollLeft+10+"px",t.style.top=c.container.scrollTop+10+"px",c.container.appendChild(t),w=!0,mxClient.IS_QUIRKS?window.setTimeout(function(){t.focus();document.execCommand("selectAll",
+!1,null)},0):(t.focus(),document.execCommand("selectAll",!1,null)))}));mxEvent.addListener(document,"keyup",mxUtils.bind(this,function(b){var a=b.keyCode;window.setTimeout(mxUtils.bind(this,function(){!w||224!=a&&17!=a&&91!=a||(w=!1,c.isEditing()||null!=this.dialog||null==c.container||c.container.focus(),t.parentNode.removeChild(t))}),0)}));mxEvent.addListener(t,"copy",mxUtils.bind(this,function(b){c.isEnabled()&&(mxClipboard.copy(c),this.copyCells(t),y())}));mxEvent.addListener(t,"cut",mxUtils.bind(this,
+function(b){c.isEnabled()&&(this.copyCells(t,!0),y())}));mxEvent.addListener(t,"paste",mxUtils.bind(this,function(b){c.isEnabled()&&!c.isCellLocked(c.getDefaultParent())&&(t.innerHTML="&nbsp;",t.focus(),window.setTimeout(mxUtils.bind(this,function(){this.pasteCells(b,t);t.innerHTML="&nbsp;"}),0))}),!0);var C=this.isSelectionAllowed;this.isSelectionAllowed=function(b){return mxEvent.getSource(b)==t?!0:C.apply(this,arguments)}}this.spinner=this.createSpinner(document.body.clientWidth/2-2,Math.max(document.body.clientHeight||
 0,document.documentElement.clientHeight||0)/2,24);Graph.fileSupport&&this.editor.graph.addListener(mxEvent.EDITING_STARTED,mxUtils.bind(this,function(b){var a=this.editor.graph,c=a.cellEditor.text2,e=null;null!=c&&(mxEvent.addListener(c,"dragleave",function(b){null!=e&&(e.parentNode.removeChild(e),e=null);b.stopPropagation();b.preventDefault()}),mxEvent.addListener(c,"dragover",mxUtils.bind(this,function(b){null==e&&(!mxClient.IS_IE||10<document.documentMode)&&(e=this.highlightElement(c));b.stopPropagation();
 b.preventDefault()})),mxEvent.addListener(c,"drop",mxUtils.bind(this,function(b){null!=e&&(e.parentNode.removeChild(e),e=null);if(0<b.dataTransfer.files.length)this.importFiles(b.dataTransfer.files,0,0,this.maxImageSize,function(b,c,e,d,f,g){a.insertImage(b,f,g)},function(){},function(b){return"image/"==b.type.substring(0,6)},function(b){for(var a=0;a<b.length;a++)b[a]()},mxEvent.isControlDown(b));else if(0<=mxUtils.indexOf(b.dataTransfer.types,"text/uri-list")){var c=b.dataTransfer.getData("text/uri-list");
 /\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(c)?this.loadImage(decodeURIComponent(c),mxUtils.bind(this,function(b){var e=Math.max(1,b.width);b=Math.max(1,b.height);var d=this.maxImageSize,d=Math.min(1,Math.min(d/Math.max(1,e)),d/Math.max(1,b));a.insertImage(decodeURIComponent(c),e*d,b*d)})):document.execCommand("insertHTML",!1,b.dataTransfer.getData("text/plain"))}else 0<=mxUtils.indexOf(b.dataTransfer.types,"text/html")?document.execCommand("insertHTML",!1,b.dataTransfer.getData("text/html")):0<=mxUtils.indexOf(b.dataTransfer.types,
-"text/plain")&&document.execCommand("insertHTML",!1,b.dataTransfer.getData("text/plain"));b.stopPropagation();b.preventDefault()})))}));if("1"==urlParams.ruler&&"undefined"!==typeof mxRuler){y=document.createElement("div");y.style.position="absolute";y.style.top="95px";y.style.left="250px";y.style.width="2000px";y.style.height="30px";y.style.background="whiteSmoke";document.body.appendChild(y);var F=document.createElement("div");F.style.position="absolute";F.style.top="125px";F.style.left="220px";
-F.style.width="30px";F.style.height="1000px";F.style.background="whiteSmoke";document.body.appendChild(F);var B=document.createElement("div");B.style.position="absolute";B.style.top="95px";B.style.left="220px";B.style.width="30px";B.style.height="30px";B.style.background="whiteSmoke";document.body.appendChild(B);this.vRuler=new mxRuler(this.editor.graph,F,!0);this.hRuler=new mxRuler(this.editor.graph,y,!1)}if("1"==urlParams.test){y=document.getElementById("geFooter");null!=y&&(this.styleInput=document.createElement("input"),
-this.styleInput.setAttribute("type","text"),this.styleInput.style.position="absolute",this.styleInput.style.top="14px",this.styleInput.style.left="2px",this.styleInput.style.width="98%",this.styleInput.style.visibility="hidden",this.styleInput.style.opacity="0.9",mxEvent.addListener(this.styleInput,"change",mxUtils.bind(this,function(){this.editor.graph.getModel().setStyle(this.editor.graph.getSelectionCell(),this.styleInput.value)})),y.appendChild(this.styleInput),this.editor.graph.getSelectionModel().addListener(mxEvent.CHANGE,
-mxUtils.bind(this,function(b,a){if(0<this.editor.graph.getSelectionCount()){var c=this.editor.graph.getSelectionCell(),c=this.editor.graph.getModel().getStyle(c);this.styleInput.value=c||"";this.styleInput.style.visibility="visible"}else this.styleInput.style.visibility="hidden"})));var G=this.isSelectionAllowed;this.isSelectionAllowed=function(b){return mxEvent.getSource(b)==this.styleInput?!0:G.apply(this,arguments)}}y=document.getElementById("geInfo");null!=y&&y.parentNode.removeChild(y);if(Graph.fileSupport&&
+"text/plain")&&document.execCommand("insertHTML",!1,b.dataTransfer.getData("text/plain"));b.stopPropagation();b.preventDefault()})))}));if("1"==urlParams.ruler&&"undefined"!==typeof mxRuler){x=document.createElement("div");x.style.position="absolute";x.style.top="95px";x.style.left="250px";x.style.width="2000px";x.style.height="30px";x.style.background="whiteSmoke";document.body.appendChild(x);var F=document.createElement("div");F.style.position="absolute";F.style.top="125px";F.style.left="220px";
+F.style.width="30px";F.style.height="1000px";F.style.background="whiteSmoke";document.body.appendChild(F);var B=document.createElement("div");B.style.position="absolute";B.style.top="95px";B.style.left="220px";B.style.width="30px";B.style.height="30px";B.style.background="whiteSmoke";document.body.appendChild(B);this.vRuler=new mxRuler(this.editor.graph,F,!0);this.hRuler=new mxRuler(this.editor.graph,x,!1)}if("1"==urlParams.test){x=document.getElementById("geFooter");null!=x&&(this.styleInput=document.createElement("input"),
+this.styleInput.setAttribute("type","text"),this.styleInput.style.position="absolute",this.styleInput.style.top="14px",this.styleInput.style.left="2px",this.styleInput.style.width="98%",this.styleInput.style.visibility="hidden",this.styleInput.style.opacity="0.9",mxEvent.addListener(this.styleInput,"change",mxUtils.bind(this,function(){this.editor.graph.getModel().setStyle(this.editor.graph.getSelectionCell(),this.styleInput.value)})),x.appendChild(this.styleInput),this.editor.graph.getSelectionModel().addListener(mxEvent.CHANGE,
+mxUtils.bind(this,function(b,a){if(0<this.editor.graph.getSelectionCount()){var c=this.editor.graph.getSelectionCell(),c=this.editor.graph.getModel().getStyle(c);this.styleInput.value=c||"";this.styleInput.style.visibility="visible"}else this.styleInput.style.visibility="hidden"})));var G=this.isSelectionAllowed;this.isSelectionAllowed=function(b){return mxEvent.getSource(b)==this.styleInput?!0:G.apply(this,arguments)}}x=document.getElementById("geInfo");null!=x&&x.parentNode.removeChild(x);if(Graph.fileSupport&&
 (!this.editor.chromeless||this.editor.editable)){var z=null;mxEvent.addListener(c.container,"dragleave",function(b){c.isEnabled()&&(null!=z&&(z.parentNode.removeChild(z),z=null),b.stopPropagation(),b.preventDefault())});mxEvent.addListener(c.container,"dragover",mxUtils.bind(this,function(b){null==z&&(!mxClient.IS_IE||10<document.documentMode)&&(z=this.highlightElement(c.container));null!=this.sidebar&&this.sidebar.hideTooltip();b.stopPropagation();b.preventDefault()}));mxEvent.addListener(c.container,
 "drop",mxUtils.bind(this,function(b){null!=z&&(z.parentNode.removeChild(z),z=null);if(c.isEnabled()){var a=mxUtils.convertPoint(c.container,mxEvent.getClientX(b),mxEvent.getClientY(b)),e=c.view.translate,d=c.view.scale,f=a.x/d-e.x,g=a.y/d-e.y;mxEvent.isAltDown(b)&&(g=f=0);if(0<b.dataTransfer.files.length)this.importFiles(b.dataTransfer.files,f,g,this.maxImageSize,null,null,null,null,mxEvent.isControlDown(b),null,null,mxEvent.isShiftDown(b));else{var h=0<=mxUtils.indexOf(b.dataTransfer.types,"text/uri-list")?
 b.dataTransfer.getData("text/uri-list"):null,a=this.extractGraphModelFromEvent(b,null!=this.pages);if(null!=a)c.setSelectionCells(this.importXml(a,f,g,!0));else if(0<=mxUtils.indexOf(b.dataTransfer.types,"text/html")){var l=b.dataTransfer.getData("text/html"),a=document.createElement("div");a.innerHTML=l;var k=null,e=a.getElementsByTagName("img");null!=e&&1==e.length?(l=e[0].getAttribute("src"),/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(l)||(k=!0)):(a=a.getElementsByTagName("a"),null!=a&&1==a.length&&
-(l=a[0].getAttribute("href")));var p=!0,m=mxUtils.bind(this,function(){c.setSelectionCells(this.insertTextAt(l,f,g,!0,k,null,p))});k&&l.length>this.resampleThreshold?this.confirmImageResize(function(b){p=b;m()},mxEvent.isControlDown(b)):m()}else null!=h&&/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(h)?this.loadImage(decodeURIComponent(h),mxUtils.bind(this,function(b){var a=Math.max(1,b.width);b=Math.max(1,b.height);var e=this.maxImageSize,e=Math.min(1,Math.min(e/Math.max(1,a)),e/Math.max(1,b));c.setSelectionCell(c.insertVertex(null,
-null,"",f,g,a*e,b*e,"shape=image;verticalLabelPosition=bottom;labelBackgroundColor=#ffffff;verticalAlign=top;aspect=fixed;imageAspect=0;image="+h+";"))}),mxUtils.bind(this,function(b){c.setSelectionCells(this.insertTextAt(h,f,g,!0))})):0<=mxUtils.indexOf(b.dataTransfer.types,"text/plain")&&c.setSelectionCells(this.insertTextAt(b.dataTransfer.getData("text/plain"),f,g,!0))}}b.stopPropagation();b.preventDefault()}),!1)}this.initPages();"1"==urlParams.embed&&this.initializeEmbedMode();"undefined"!==
-typeof window.mxSettings&&this.installSettings()};EditorUi.prototype.installSettings=function(){if(isLocalStorage||mxClient.IS_CHROMEAPP){ColorDialog.recentColors=mxSettings.getRecentColors();this.editor.graph.currentEdgeStyle=mxSettings.getCurrentEdgeStyle();this.editor.graph.currentVertexStyle=mxSettings.getCurrentVertexStyle();this.fireEvent(new mxEventObject("styleChanged","keys",[],"values",[],"cells",[]));this.addListener("styleChanged",mxUtils.bind(this,function(b,a){mxSettings.setCurrentEdgeStyle(this.editor.graph.currentEdgeStyle);
-mxSettings.setCurrentVertexStyle(this.editor.graph.currentVertexStyle);mxSettings.save()}));this.editor.graph.connectionHandler.setCreateTarget(mxSettings.isCreateTarget());this.fireEvent(new mxEventObject("copyConnectChanged"));this.addListener("copyConnectChanged",mxUtils.bind(this,function(b,a){mxSettings.setCreateTarget(this.editor.graph.connectionHandler.isCreateTarget());mxSettings.save()}));this.editor.graph.pageFormat=mxSettings.getPageFormat();this.addListener("pageFormatChanged",mxUtils.bind(this,
-function(b,a){mxSettings.setPageFormat(this.editor.graph.pageFormat);mxSettings.save()}));this.editor.graph.view.gridColor=mxSettings.getGridColor();this.addListener("gridColorChanged",mxUtils.bind(this,function(b,a){mxSettings.setGridColor(this.editor.graph.view.gridColor);mxSettings.save()}));if(mxClient.IS_CHROMEAPP||EditorUi.isElectronApp)this.editor.addListener("autosaveChanged",mxUtils.bind(this,function(b,a){mxSettings.setAutosave(this.editor.autosave);mxSettings.save()})),this.editor.autosave=
-mxSettings.getAutosave();null!=this.sidebar&&this.sidebar.showPalette("search",mxSettings.settings.search);this.editor.chromeless&&!this.editor.editable||null==this.sidebar||!(mxSettings.settings.isNew||8>=parseInt(mxSettings.settings.version||0))||(this.toggleScratchpad(),mxSettings.save());this.addListener("formatWidthChanged",function(){mxSettings.setFormatWidth(this.formatWidth);mxSettings.save()})}};EditorUi.prototype.copyCells=function(b,a){var c=this.editor.graph;if(c.isSelectionEmpty())b.innerHTML=
-"";else{var e=mxUtils.sortCells(c.model.getTopmostCells(c.getSelectionCells())),d=mxUtils.getXml(this.editor.graph.encodeCells(e));mxUtils.setTextContent(b,encodeURIComponent(d));a?(c.removeCells(e,!1),c.lastPasteXml=null):(c.lastPasteXml=d,c.pasteCounter=0);b.focus();document.execCommand("selectAll",!1,null)}};EditorUi.prototype.pasteCells=function(b,a){if(!mxEvent.isConsumed(b)){var c=a.getElementsByTagName("span");if(null!=c&&0<c.length&&"application/vnd.lucid.chart.objects"===c[0].getAttribute("data-lucid-type")){var e=
-c[0].getAttribute("data-lucid-content");null!=e&&0<e.length&&(this.importLucidChart(e,0,0),mxEvent.consume(b))}else{var e=this.editor.graph,d=mxUtils.trim(mxClient.IS_QUIRKS||8==document.documentMode?mxUtils.getTextContent(a):a.textContent),f=!1;try{var h=d.lastIndexOf("%3E");0<=h&&h<d.length-3&&(d=d.substring(0,h+3))}catch(y){}try{var c=a.getElementsByTagName("span"),k=null!=c&&0<c.length?mxUtils.trim(decodeURIComponent(c[0].textContent)):decodeURIComponent(d);this.isCompatibleString(k)&&(f=!0,d=
-k)}catch(y){}e.lastPasteXml==d?e.pasteCounter++:(e.lastPasteXml=d,e.pasteCounter=0);c=e.pasteCounter*e.gridSize;if(null!=d&&0<d.length&&(f||this.isCompatibleString(d)?e.setSelectionCells(this.importXml(d,c,c)):(f=e.getInsertPoint(),e.isMouseInsertPoint()&&(c=0,e.lastPasteXml==d&&0<e.pasteCounter&&e.pasteCounter--),e.setSelectionCells(this.insertTextAt(d,f.x+c,f.y+c,!0))),!e.isSelectionEmpty())){e.scrollCellToVisible(e.getSelectionCell());null!=this.hoverIcons&&this.hoverIcons.update(e.view.getState(e.getSelectionCell()));
-try{mxEvent.consume(b)}catch(y){}}}}};EditorUi.prototype.addFileDropHandler=function(b){if(Graph.fileSupport)for(var a=null,c=0;c<b.length;c++)mxEvent.addListener(b[c],"dragleave",function(b){null!=a&&(a.parentNode.removeChild(a),a=null);b.stopPropagation();b.preventDefault()}),mxEvent.addListener(b[c],"dragover",mxUtils.bind(this,function(b){(this.editor.graph.isEnabled()||"1"!=urlParams.embed)&&null==a&&(!mxClient.IS_IE||10<document.documentMode&&12>document.documentMode)&&(a=this.highlightElement());
-b.stopPropagation();b.preventDefault()})),mxEvent.addListener(b[c],"drop",mxUtils.bind(this,function(b){null!=a&&(a.parentNode.removeChild(a),a=null);if(this.editor.graph.isEnabled()||"1"!=urlParams.embed)if(0<b.dataTransfer.files.length)this.hideDialog(),"1"==urlParams.embed?this.importFiles(b.dataTransfer.files,0,0,this.maxImageSize,null,null,null,null,!mxEvent.isControlDown(b)&&!mxEvent.isShiftDown(b)):this.openFiles(b.dataTransfer.files,!0);else{var c=this.extractGraphModelFromEvent(b);if(null==
-c){var e=null!=b.dataTransfer?b.dataTransfer:b.clipboardData;null!=e&&(10==document.documentMode||11==document.documentMode?c=e.getData("Text"):(c=null,c=0<=mxUtils.indexOf(e.types,"text/uri-list")?b.dataTransfer.getData("text/uri-list"):0<=mxUtils.indexOf(e.types,"text/html")?e.getData("text/html"):null,null!=c&&0<c.length?(e=document.createElement("div"),e.innerHTML=c,e=e.getElementsByTagName("img"),0<e.length&&(c=e[0].getAttribute("src"))):0<=mxUtils.indexOf(e.types,"text/plain")&&(c=e.getData("text/plain"))),
-null!=c&&("data:image/png;base64,"==c.substring(0,22)?(c=this.extractGraphModelFromPng(c),null!=c&&0<c.length&&this.openLocalFile(c,null,!0)):!this.isOffline()&&this.isRemoteFileFormat(c)?(new mxXmlRequest(OPEN_URL,"format=xml&data="+encodeURIComponent(c))).send(mxUtils.bind(this,function(b){200<=b.getStatus()&&299>=b.getStatus()&&this.openLocalFile(b.getText(),null,!0)})):/^https?:\/\//.test(c)&&(null==this.getCurrentFile()?window.location.hash="#U"+encodeURIComponent(c):window.openWindow((mxClient.IS_CHROMEAPP?
-"https://www.draw.io/":"https://"+location.host+"/")+window.location.search+"#U"+encodeURIComponent(c)))))}else this.openLocalFile(c,null,!0)}b.stopPropagation();b.preventDefault()}))};EditorUi.prototype.highlightElement=function(b){var a=0,c=0,d,f;if(null==b){f=document.body;var h=document.documentElement;d=(f.clientWidth||h.clientWidth)-3;f=Math.max(f.clientHeight||0,h.clientHeight)-3}else a=b.offsetTop,c=b.offsetLeft,d=b.clientWidth,f=b.clientHeight;h=document.createElement("div");h.style.zIndex=
-mxPopupMenu.prototype.zIndex+2;h.style.border="3px dotted rgb(254, 137, 12)";h.style.pointerEvents="none";h.style.position="absolute";h.style.top=a+"px";h.style.left=c+"px";h.style.width=Math.max(0,d-3)+"px";h.style.height=Math.max(0,f-3)+"px";null!=b&&b.parentNode==this.editor.graph.container?this.editor.graph.container.appendChild(h):document.body.appendChild(h);return h};EditorUi.prototype.stringToCells=function(b){b=mxUtils.parseXml(b);var a=this.editor.extractGraphModel(b.documentElement);b=
-[];if(null!=a){var c=new mxCodec(a.ownerDocument),d=new mxGraphModel;c.decode(a,d);a=d.getChildAt(d.getRoot(),0);for(c=0;c<d.getChildCount(a);c++)b.push(d.getChildAt(a,c))}return b};EditorUi.prototype.openFiles=function(b,a){if(this.spinner.spin(document.body,mxResources.get("loading")))for(var c=0;c<b.length;c++)mxUtils.bind(this,function(b){var c=new FileReader;c.onload=mxUtils.bind(this,function(c){var e=c.target.result,d=b.name;if(null!=d&&0<d.length)if(!this.useCanvasForExport&&/(\.png)$/i.test(d)&&
-(d=d.substring(0,d.length-4)+".xml"),Graph.fileSupport&&!this.isOffline()&&(new XMLHttpRequest).upload&&this.isRemoteFileFormat(e,d))d=0<=d.lastIndexOf(".")?d.substring(0,d.lastIndexOf("."))+".xml":d+".xml",this.parseFile(b,mxUtils.bind(this,function(b){if(4==b.readyState)if(this.spinner.stop(),200<=b.status&&299>=b.status)if(b=b.responseText,"<mxlibrary"==b.substring(0,10)){null==this.getCurrentFile()&&"1"!=urlParams.embed&&this.openLocalFile(this.emptyDiagramXml,this.defaultFilename,a);null!=d&&
-".vssx"==d.toLowerCase().substring(d.length-5)&&(d=d.substring(0,filename.length-5)+".xml");try{this.loadLibrary(new LocalLibrary(this,b,d))}catch(x){this.handleError(x,mxResources.get("errorLoadingFile"))}}else this.openLocalFile(b,d,a);else this.handleError({message:mxResources.get(413==b.status?"drawingTooLarge":"invalidOrMissingFile")},mxResources.get("errorLoadingFile"))}));else if('{"state":"{\\"Properties\\":'==e.substring(0,26))/(\.json)$/i.test(d)&&(d=d.substring(0,d.length-5)+".xml"),this.openLocalFile(this.emptyDiagramXml,
-d,a),this.importLucidChart(e,0,0,null,mxUtils.bind(this,function(){this.editor.undoManager.clear();this.spinner.stop()}));else if("<mxlibrary"==c.target.result.substring(0,10)){this.spinner.stop();null==this.getCurrentFile()&&"1"!=urlParams.embed&&this.openLocalFile(this.emptyDiagramXml,this.defaultFilename,a);try{this.loadLibrary(new LocalLibrary(this,c.target.result,b.name))}catch(y){this.handleError(y,mxResources.get("errorLoadingFile"))}}else"image/png"==b.type.substring(0,9)&&(e=this.extractGraphModelFromPng(e)),
-this.spinner.stop(),this.openLocalFile(e,d,a)});c.onerror=mxUtils.bind(this,function(b){this.spinner.stop();this.handleError(b);window.openFile=null});"image"===b.type.substring(0,5)&&"image/svg"!==b.type.substring(0,9)?c.readAsDataURL(b):c.readAsText(b)})(b[c])};EditorUi.prototype.openLocalFile=function(b,a,c){var e=this.getCurrentFile(),d=mxUtils.bind(this,function(){window.openFile=null;if(null==a&&null!=this.getCurrentFile()&&this.isDiagramEmpty()){var e=mxUtils.parseXml(b);null!=e&&(this.editor.setGraphXml(e.documentElement),
-this.editor.graph.selectAll())}else this.fileLoaded(new LocalFile(this,b,a||this.defaultFilename,c))});null!=b&&0<b.length&&(null==e||!e.isModified()&&(mxClient.IS_CHROMEAPP||EditorUi.isElectronApp)?d():(mxClient.IS_CHROMEAPP||EditorUi.isElectronApp)&&null!=e&&e.isModified()?this.confirm(mxResources.get("allChangesLost"),null,d,mxResources.get("cancel"),mxResources.get("discardChanges")):(window.openFile=new OpenFile(function(){window.openFile=null}),window.openFile.setData(b,a),window.openWindow(this.getUrl(),
-null,mxUtils.bind(this,function(){this.confirm(mxResources.get("allChangesLost"),null,d,mxResources.get("cancel"),mxResources.get("discardChanges"))}))))};EditorUi.prototype.getBasenames=function(){var b={};if(null!=this.pages)for(var a=0;a<this.pages.length;a++)this.updatePageRoot(this.pages[a]),this.addBasenamesForCell(this.pages[a].root,b);else this.addBasenamesForCell(this.editor.graph.model.getRoot(),b);var a=[],c;for(c in b)a.push(c);return a};EditorUi.prototype.addBasenamesForCell=function(b,
-a){function c(b){if(null!=b){var c=b.lastIndexOf(".");0<c&&(b=b.substring(c+1,b.length));null==a[b]&&(a[b]=!0)}}var e=this.editor.graph,d=e.getCellStyle(b);c(mxStencilRegistry.getBasenameForStencil(d[mxConstants.STYLE_SHAPE]));e.model.isEdge(b)&&(c(mxMarker.getPackageForType(d[mxConstants.STYLE_STARTARROW])),c(mxMarker.getPackageForType(d[mxConstants.STYLE_ENDARROW])));for(var d=e.model.getChildCount(b),f=0;f<d;f++)this.addBasenamesForCell(e.model.getChildAt(b,f),a)};EditorUi.prototype.setGraphEnabled=
-function(b){this.diagramContainer.style.visibility=b?"":"hidden";this.formatContainer.style.visibility=b?"":"hidden";this.sidebarFooterContainer.style.display=b?"":"none";this.sidebarContainer.style.display=b?"":"none";this.hsplit.style.display=b?"":"none";this.editor.graph.setEnabled(b);null!=this.tabContainer&&(this.tabContainer.style.visibility=b?"":"hidden")};EditorUi.prototype.initializeEmbedMode=function(){this.setGraphEnabled(!1);(window.opener||window.parent)!=window&&("1"!=urlParams.spin||
-this.spinner.spin(document.body,mxResources.get("loading")))&&this.installMessageHandler(mxUtils.bind(this,function(b,a,c){this.spinner.stop();this.addEmbedButtons();this.setGraphEnabled(!0);null!=b&&0<b.length?(this.setFileData(b),this.editor.chromeless?this.editor.graph.lightbox&&this.lightboxFit():this.showLayersDialog(),this.chromelessResize&&this.chromelessResize()):(this.editor.graph.model.clear(),this.editor.fireEvent(new mxEventObject("resetGraphView")));this.editor.undoManager.clear();this.editor.modified=
-null!=c?c:!1;this.updateUi();window.self!==window.top&&window.focus();null!=this.format&&this.format.refresh()}))};EditorUi.prototype.showLayersDialog=function(){1<this.editor.graph.getModel().getChildCount(this.editor.graph.getModel().getRoot())&&(null==this.actions.layersWindow?this.actions.get("layers").funct():this.actions.layersWindow.window.setVisible(!0))};EditorUi.prototype.getPublicUrl=function(b,a){null!=b?b.getPublicUrl(a):a(null)};EditorUi.prototype.createLoadMessage=function(b){var a=
-this.editor.graph;return{event:b,pageVisible:a.pageVisible,translate:a.view.translate,scale:a.view.scale,page:a.view.getBackgroundPageBounds(),bounds:a.getGraphBounds()}};EditorUi.prototype.installMessageHandler=function(b){var a=null,c=!1,d=!1,f=null,h=mxUtils.bind(this,function(b,a){this.editor.modified&&"0"!=urlParams.modified?null!=urlParams.modified&&this.editor.setStatus(mxUtils.htmlEntities(mxResources.get(urlParams.modified))):this.editor.setStatus("")});this.editor.graph.model.addListener(mxEvent.CHANGE,
+(l=a[0].getAttribute("href")));var t=!0,m=mxUtils.bind(this,function(){c.setSelectionCells(this.insertTextAt(l,f,g,!0,k,null,t))});k&&l.length>this.resampleThreshold?this.confirmImageResize(function(b){t=b;m()},mxEvent.isControlDown(b)):m()}else null!=h&&/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(h)?this.loadImage(decodeURIComponent(h),mxUtils.bind(this,function(b){var a=Math.max(1,b.width);b=Math.max(1,b.height);var e=this.maxImageSize,e=Math.min(1,Math.min(e/Math.max(1,a)),e/Math.max(1,b));c.setSelectionCell(c.insertVertex(null,
+null,"",f,g,a*e,b*e,"shape=image;verticalLabelPosition=bottom;labelBackgroundColor=#ffffff;verticalAlign=top;aspect=fixed;imageAspect=0;image="+h+";"))}),mxUtils.bind(this,function(b){c.setSelectionCells(this.insertTextAt(h,f,g,!0))})):0<=mxUtils.indexOf(b.dataTransfer.types,"text/plain")&&c.setSelectionCells(this.insertTextAt(b.dataTransfer.getData("text/plain"),f,g,!0))}}b.stopPropagation();b.preventDefault()}),!1)}this.initPages();"1"==urlParams.embed&&this.initializeEmbedMode();this.installSettings()};
+EditorUi.prototype.isSettingsEnabled=function(){return"undefined"!==typeof window.mxSettings&&(isLocalStorage||mxClient.IS_CHROMEAPP)};EditorUi.prototype.installSettings=function(){if(this.isSettingsEnabled()){ColorDialog.recentColors=mxSettings.getRecentColors();this.editor.graph.currentEdgeStyle=mxSettings.getCurrentEdgeStyle();this.editor.graph.currentVertexStyle=mxSettings.getCurrentVertexStyle();this.fireEvent(new mxEventObject("styleChanged","keys",[],"values",[],"cells",[]));this.addListener("styleChanged",
+mxUtils.bind(this,function(b,a){mxSettings.setCurrentEdgeStyle(this.editor.graph.currentEdgeStyle);mxSettings.setCurrentVertexStyle(this.editor.graph.currentVertexStyle);mxSettings.save()}));this.editor.graph.connectionHandler.setCreateTarget(mxSettings.isCreateTarget());this.fireEvent(new mxEventObject("copyConnectChanged"));this.addListener("copyConnectChanged",mxUtils.bind(this,function(b,a){mxSettings.setCreateTarget(this.editor.graph.connectionHandler.isCreateTarget());mxSettings.save()}));this.editor.graph.pageFormat=
+mxSettings.getPageFormat();this.addListener("pageFormatChanged",mxUtils.bind(this,function(b,a){mxSettings.setPageFormat(this.editor.graph.pageFormat);mxSettings.save()}));this.editor.graph.view.gridColor=mxSettings.getGridColor();this.addListener("gridColorChanged",mxUtils.bind(this,function(b,a){mxSettings.setGridColor(this.editor.graph.view.gridColor);mxSettings.save()}));if(mxClient.IS_CHROMEAPP||EditorUi.isElectronApp)this.editor.addListener("autosaveChanged",mxUtils.bind(this,function(b,a){mxSettings.setAutosave(this.editor.autosave);
+mxSettings.save()})),this.editor.autosave=mxSettings.getAutosave();null!=this.sidebar&&this.sidebar.showPalette("search",mxSettings.settings.search);this.editor.chromeless&&!this.editor.editable||null==this.sidebar||!(mxSettings.settings.isNew||8>=parseInt(mxSettings.settings.version||0))||(this.toggleScratchpad(),mxSettings.save());this.addListener("formatWidthChanged",function(){mxSettings.setFormatWidth(this.formatWidth);mxSettings.save()})}};EditorUi.prototype.copyCells=function(b,a){var c=this.editor.graph;
+if(c.isSelectionEmpty())b.innerHTML="";else{var e=mxUtils.sortCells(c.model.getTopmostCells(c.getSelectionCells())),d=mxUtils.getXml(this.editor.graph.encodeCells(e));mxUtils.setTextContent(b,encodeURIComponent(d));a?(c.removeCells(e,!1),c.lastPasteXml=null):(c.lastPasteXml=d,c.pasteCounter=0);b.focus();document.execCommand("selectAll",!1,null)}};EditorUi.prototype.pasteCells=function(b,a){if(!mxEvent.isConsumed(b)){var c=a.getElementsByTagName("span");if(null!=c&&0<c.length&&"application/vnd.lucid.chart.objects"===
+c[0].getAttribute("data-lucid-type")){var e=c[0].getAttribute("data-lucid-content");null!=e&&0<e.length&&(this.importLucidChart(e,0,0),mxEvent.consume(b))}else{var e=this.editor.graph,d=mxUtils.trim(mxClient.IS_QUIRKS||8==document.documentMode?mxUtils.getTextContent(a):a.textContent),f=!1;try{var h=d.lastIndexOf("%3E");0<=h&&h<d.length-3&&(d=d.substring(0,h+3))}catch(x){}try{var c=a.getElementsByTagName("span"),k=null!=c&&0<c.length?mxUtils.trim(decodeURIComponent(c[0].textContent)):decodeURIComponent(d);
+this.isCompatibleString(k)&&(f=!0,d=k)}catch(x){}e.lastPasteXml==d?e.pasteCounter++:(e.lastPasteXml=d,e.pasteCounter=0);c=e.pasteCounter*e.gridSize;if(null!=d&&0<d.length&&(f||this.isCompatibleString(d)?e.setSelectionCells(this.importXml(d,c,c)):(f=e.getInsertPoint(),e.isMouseInsertPoint()&&(c=0,e.lastPasteXml==d&&0<e.pasteCounter&&e.pasteCounter--),e.setSelectionCells(this.insertTextAt(d,f.x+c,f.y+c,!0))),!e.isSelectionEmpty())){e.scrollCellToVisible(e.getSelectionCell());null!=this.hoverIcons&&
+this.hoverIcons.update(e.view.getState(e.getSelectionCell()));try{mxEvent.consume(b)}catch(x){}}}}};EditorUi.prototype.addFileDropHandler=function(b){if(Graph.fileSupport)for(var a=null,c=0;c<b.length;c++)mxEvent.addListener(b[c],"dragleave",function(b){null!=a&&(a.parentNode.removeChild(a),a=null);b.stopPropagation();b.preventDefault()}),mxEvent.addListener(b[c],"dragover",mxUtils.bind(this,function(b){(this.editor.graph.isEnabled()||"1"!=urlParams.embed)&&null==a&&(!mxClient.IS_IE||10<document.documentMode&&
+12>document.documentMode)&&(a=this.highlightElement());b.stopPropagation();b.preventDefault()})),mxEvent.addListener(b[c],"drop",mxUtils.bind(this,function(b){null!=a&&(a.parentNode.removeChild(a),a=null);if(this.editor.graph.isEnabled()||"1"!=urlParams.embed)if(0<b.dataTransfer.files.length)this.hideDialog(),"1"==urlParams.embed?this.importFiles(b.dataTransfer.files,0,0,this.maxImageSize,null,null,null,null,!mxEvent.isControlDown(b)&&!mxEvent.isShiftDown(b)):this.openFiles(b.dataTransfer.files,!0);
+else{var c=this.extractGraphModelFromEvent(b);if(null==c){var e=null!=b.dataTransfer?b.dataTransfer:b.clipboardData;null!=e&&(10==document.documentMode||11==document.documentMode?c=e.getData("Text"):(c=null,c=0<=mxUtils.indexOf(e.types,"text/uri-list")?b.dataTransfer.getData("text/uri-list"):0<=mxUtils.indexOf(e.types,"text/html")?e.getData("text/html"):null,null!=c&&0<c.length?(e=document.createElement("div"),e.innerHTML=c,e=e.getElementsByTagName("img"),0<e.length&&(c=e[0].getAttribute("src"))):
+0<=mxUtils.indexOf(e.types,"text/plain")&&(c=e.getData("text/plain"))),null!=c&&("data:image/png;base64,"==c.substring(0,22)?(c=this.extractGraphModelFromPng(c),null!=c&&0<c.length&&this.openLocalFile(c,null,!0)):!this.isOffline()&&this.isRemoteFileFormat(c)?(new mxXmlRequest(OPEN_URL,"format=xml&data="+encodeURIComponent(c))).send(mxUtils.bind(this,function(b){200<=b.getStatus()&&299>=b.getStatus()&&this.openLocalFile(b.getText(),null,!0)})):/^https?:\/\//.test(c)&&(null==this.getCurrentFile()?window.location.hash=
+"#U"+encodeURIComponent(c):window.openWindow((mxClient.IS_CHROMEAPP?"https://www.draw.io/":"https://"+location.host+"/")+window.location.search+"#U"+encodeURIComponent(c)))))}else this.openLocalFile(c,null,!0)}b.stopPropagation();b.preventDefault()}))};EditorUi.prototype.highlightElement=function(b){var a=0,c=0,d,f;if(null==b){f=document.body;var h=document.documentElement;d=(f.clientWidth||h.clientWidth)-3;f=Math.max(f.clientHeight||0,h.clientHeight)-3}else a=b.offsetTop,c=b.offsetLeft,d=b.clientWidth,
+f=b.clientHeight;h=document.createElement("div");h.style.zIndex=mxPopupMenu.prototype.zIndex+2;h.style.border="3px dotted rgb(254, 137, 12)";h.style.pointerEvents="none";h.style.position="absolute";h.style.top=a+"px";h.style.left=c+"px";h.style.width=Math.max(0,d-3)+"px";h.style.height=Math.max(0,f-3)+"px";null!=b&&b.parentNode==this.editor.graph.container?this.editor.graph.container.appendChild(h):document.body.appendChild(h);return h};EditorUi.prototype.stringToCells=function(b){b=mxUtils.parseXml(b);
+var a=this.editor.extractGraphModel(b.documentElement);b=[];if(null!=a){var c=new mxCodec(a.ownerDocument),d=new mxGraphModel;c.decode(a,d);a=d.getChildAt(d.getRoot(),0);for(c=0;c<d.getChildCount(a);c++)b.push(d.getChildAt(a,c))}return b};EditorUi.prototype.openFiles=function(b,a){if(this.spinner.spin(document.body,mxResources.get("loading")))for(var c=0;c<b.length;c++)mxUtils.bind(this,function(b){var c=new FileReader;c.onload=mxUtils.bind(this,function(c){var e=c.target.result,d=b.name;if(null!=
+d&&0<d.length)if(!this.useCanvasForExport&&/(\.png)$/i.test(d)&&(d=d.substring(0,d.length-4)+".xml"),Graph.fileSupport&&!this.isOffline()&&(new XMLHttpRequest).upload&&this.isRemoteFileFormat(e,d))d=0<=d.lastIndexOf(".")?d.substring(0,d.lastIndexOf("."))+".xml":d+".xml",this.parseFile(b,mxUtils.bind(this,function(b){if(4==b.readyState)if(this.spinner.stop(),200<=b.status&&299>=b.status)if(b=b.responseText,"<mxlibrary"==b.substring(0,10)){null==this.getCurrentFile()&&"1"!=urlParams.embed&&this.openLocalFile(this.emptyDiagramXml,
+this.defaultFilename,a);null!=d&&".vssx"==d.toLowerCase().substring(d.length-5)&&(d=d.substring(0,filename.length-5)+".xml");try{this.loadLibrary(new LocalLibrary(this,b,d))}catch(y){this.handleError(y,mxResources.get("errorLoadingFile"))}}else this.openLocalFile(b,d,a);else this.handleError({message:mxResources.get(413==b.status?"drawingTooLarge":"invalidOrMissingFile")},mxResources.get("errorLoadingFile"))}));else if('{"state":"{\\"Properties\\":'==e.substring(0,26))/(\.json)$/i.test(d)&&(d=d.substring(0,
+d.length-5)+".xml"),this.openLocalFile(this.emptyDiagramXml,d,a),this.importLucidChart(e,0,0,null,mxUtils.bind(this,function(){this.editor.undoManager.clear();this.spinner.stop()}));else if("<mxlibrary"==c.target.result.substring(0,10)){this.spinner.stop();null==this.getCurrentFile()&&"1"!=urlParams.embed&&this.openLocalFile(this.emptyDiagramXml,this.defaultFilename,a);try{this.loadLibrary(new LocalLibrary(this,c.target.result,b.name))}catch(x){this.handleError(x,mxResources.get("errorLoadingFile"))}}else"image/png"==
+b.type.substring(0,9)&&(e=this.extractGraphModelFromPng(e)),this.spinner.stop(),this.openLocalFile(e,d,a)});c.onerror=mxUtils.bind(this,function(b){this.spinner.stop();this.handleError(b);window.openFile=null});"image"===b.type.substring(0,5)&&"image/svg"!==b.type.substring(0,9)?c.readAsDataURL(b):c.readAsText(b)})(b[c])};EditorUi.prototype.openLocalFile=function(b,a,c){var e=this.getCurrentFile(),d=mxUtils.bind(this,function(){window.openFile=null;if(null==a&&null!=this.getCurrentFile()&&this.isDiagramEmpty()){var e=
+mxUtils.parseXml(b);null!=e&&(this.editor.setGraphXml(e.documentElement),this.editor.graph.selectAll())}else this.fileLoaded(new LocalFile(this,b,a||this.defaultFilename,c))});null!=b&&0<b.length&&(null==e||!e.isModified()&&(mxClient.IS_CHROMEAPP||EditorUi.isElectronApp)?d():(mxClient.IS_CHROMEAPP||EditorUi.isElectronApp)&&null!=e&&e.isModified()?this.confirm(mxResources.get("allChangesLost"),null,d,mxResources.get("cancel"),mxResources.get("discardChanges")):(window.openFile=new OpenFile(function(){window.openFile=
+null}),window.openFile.setData(b,a),window.openWindow(this.getUrl(),null,mxUtils.bind(this,function(){this.confirm(mxResources.get("allChangesLost"),null,d,mxResources.get("cancel"),mxResources.get("discardChanges"))}))))};EditorUi.prototype.getBasenames=function(){var b={};if(null!=this.pages)for(var a=0;a<this.pages.length;a++)this.updatePageRoot(this.pages[a]),this.addBasenamesForCell(this.pages[a].root,b);else this.addBasenamesForCell(this.editor.graph.model.getRoot(),b);var a=[],c;for(c in b)a.push(c);
+return a};EditorUi.prototype.addBasenamesForCell=function(b,a){function c(b){if(null!=b){var c=b.lastIndexOf(".");0<c&&(b=b.substring(c+1,b.length));null==a[b]&&(a[b]=!0)}}var e=this.editor.graph,d=e.getCellStyle(b);c(mxStencilRegistry.getBasenameForStencil(d[mxConstants.STYLE_SHAPE]));e.model.isEdge(b)&&(c(mxMarker.getPackageForType(d[mxConstants.STYLE_STARTARROW])),c(mxMarker.getPackageForType(d[mxConstants.STYLE_ENDARROW])));for(var d=e.model.getChildCount(b),f=0;f<d;f++)this.addBasenamesForCell(e.model.getChildAt(b,
+f),a)};EditorUi.prototype.setGraphEnabled=function(b){this.diagramContainer.style.visibility=b?"":"hidden";this.formatContainer.style.visibility=b?"":"hidden";this.sidebarFooterContainer.style.display=b?"":"none";this.sidebarContainer.style.display=b?"":"none";this.hsplit.style.display=b?"":"none";this.editor.graph.setEnabled(b);null!=this.tabContainer&&(this.tabContainer.style.visibility=b?"":"hidden")};EditorUi.prototype.initializeEmbedMode=function(){this.setGraphEnabled(!1);(window.opener||window.parent)!=
+window&&("1"!=urlParams.spin||this.spinner.spin(document.body,mxResources.get("loading")))&&this.installMessageHandler(mxUtils.bind(this,function(b,a,c){this.spinner.stop();this.addEmbedButtons();this.setGraphEnabled(!0);null!=b&&0<b.length?(this.setFileData(b),this.editor.chromeless?this.editor.graph.lightbox&&this.lightboxFit():this.showLayersDialog(),this.chromelessResize&&this.chromelessResize()):(this.editor.graph.model.clear(),this.editor.fireEvent(new mxEventObject("resetGraphView")));this.editor.undoManager.clear();
+this.editor.modified=null!=c?c:!1;this.updateUi();window.self!==window.top&&window.focus();null!=this.format&&this.format.refresh()}))};EditorUi.prototype.showLayersDialog=function(){1<this.editor.graph.getModel().getChildCount(this.editor.graph.getModel().getRoot())&&(null==this.actions.layersWindow?this.actions.get("layers").funct():this.actions.layersWindow.window.setVisible(!0))};EditorUi.prototype.getPublicUrl=function(b,a){null!=b?b.getPublicUrl(a):a(null)};EditorUi.prototype.createLoadMessage=
+function(b){var a=this.editor.graph;return{event:b,pageVisible:a.pageVisible,translate:a.view.translate,scale:a.view.scale,page:a.view.getBackgroundPageBounds(),bounds:a.getGraphBounds()}};EditorUi.prototype.installMessageHandler=function(b){var a=null,c=!1,d=!1,f=null,h=mxUtils.bind(this,function(b,a){this.editor.modified&&"0"!=urlParams.modified?null!=urlParams.modified&&this.editor.setStatus(mxUtils.htmlEntities(mxResources.get(urlParams.modified))):this.editor.setStatus("")});this.editor.graph.model.addListener(mxEvent.CHANGE,
 h);mxEvent.addListener(window,"message",mxUtils.bind(this,function(e){function h(b){if(null!=b&&"function"===typeof b.charAt&&"<"!=b.charAt(0))try{"data:image/svg+xml;base64,"==b.substring(0,26)?b=atob(b.substring(26)):"data:image/svg+xml;utf8,"==b.substring(0,24)&&(b=b.substring(24)),null!=b&&("%"==b.charAt(0)?b=decodeURIComponent(b):"<"!=b.charAt(0)&&(b=this.editor.graph.decompress(b)))}catch(N){}return b}var g=e.data;if("json"==urlParams.proto){try{g=JSON.parse(g)}catch(J){g=null}if(null==g)return;
-if("dialog"==g.action){this.showError(null!=g.titleKey?mxResources.get(g.titleKey):g.title,null!=g.messageKey?mxResources.get(g.messageKey):g.message,null!=g.buttonKey?mxResources.get(g.buttonKey):g.button);null!=g.modified&&(this.editor.modified=g.modified);return}if("prompt"==g.action){this.spinner.stop();var p=new FilenameDialog(this,g.defaultValue||"",null!=g.okKey?mxResources.get(g.okKey):null,function(b){null!=b&&k.postMessage(JSON.stringify({event:"prompt",value:b,message:g}),"*")},null!=g.titleKey?
-mxResources.get(g.titleKey):g.title);this.showDialog(p.container,300,80,!0,!1);p.init();return}if("draft"==g.action){p=null;p="data:image/png;base64,"==g.xml.substring(0,22)?this.extractGraphModelFromPng(g.xml):h(g.xml);this.spinner.stop();p=new DraftDialog(this,mxResources.get("draftFound",[g.name||this.defaultFilename]),p,mxUtils.bind(this,function(){this.hideDialog();k.postMessage(JSON.stringify({event:"draft",result:"edit",message:g}),"*")}),mxUtils.bind(this,function(){this.hideDialog();k.postMessage(JSON.stringify({event:"draft",
-result:"discard",message:g}),"*")}),g.editKey?mxResources.get(g.editKey):null,g.discardKey?mxResources.get(g.discardKey):null,g.ignore?mxUtils.bind(this,function(){this.hideDialog();k.postMessage(JSON.stringify({event:"draft",result:"ignore",message:g}),"*")}):null);this.showDialog(p.container,640,480,!0,!1,mxUtils.bind(this,function(b){b&&this.actions.get("exit").funct()}));try{p.init()}catch(J){k.postMessage(JSON.stringify({event:"draft",error:J.toString(),message:g}),"*")}return}if("template"==
-g.action){this.spinner.stop();p=new NewDialog(this,!1,null!=g.callback,mxUtils.bind(this,function(a,c){a=a||this.emptyDiagramXml;null!=g.callback?k.postMessage(JSON.stringify({event:"template",xml:a,blank:a==this.emptyDiagramXml,name:c}),"*"):(b(a,e,a!=this.emptyDiagramXml),this.editor.modified||this.editor.setStatus(""))}));this.showDialog(p.container,620,440,!0,!1,mxUtils.bind(this,function(b){b&&this.actions.get("exit").funct()}));p.init();return}if("status"==g.action){null!=g.messageKey?this.editor.setStatus(mxUtils.htmlEntities(mxResources.get(g.messageKey))):
-null!=g.message&&this.editor.setStatus(mxUtils.htmlEntities(g.message));null!=g.modified&&(this.editor.modified=g.modified);return}if("spinner"==g.action){var l=null!=g.messageKey?mxResources.get(g.messageKey):g.message;null==g.show||g.show?this.spinner.spin(document.body,l):this.spinner.stop();return}if("export"==g.action){if("png"==g.format||"xmlpng"==g.format){if(null==g.spin&&null==g.spinKey||this.spinner.spin(document.body,null!=g.spinKey?mxResources.get(g.spinKey):g.spin)){var m=null!=g.xml?
-g.xml:this.getFileData(!0);this.editor.graph.setEnabled(!1);var n=this.editor.graph,q=mxUtils.bind(this,function(b){this.editor.graph.setEnabled(!0);this.spinner.stop();var a=this.createLoadMessage("export");a.format=g.format;a.message=g;a.data=b;a.xml=encodeURIComponent(m);k.postMessage(JSON.stringify(a),"*")}),t=mxUtils.bind(this,function(b){null==b&&(b=Editor.blankImage);"xmlpng"==g.format&&(b=this.writeGraphModelToPng(b,"zTXt","mxGraphModel",atob(this.editor.graph.compress(m))));n!=this.editor.graph&&
-n.container.parentNode.removeChild(n.container);q(b)});if(this.isExportToCanvas()){if(null!=this.pages&&this.currentPage!=this.pages[0]){var n=this.createTemporaryGraph(n.getStylesheet()),u=n.getGlobalVariable,v=this.pages[0];n.getGlobalVariable=function(b){return"page"==b?v.getName():"pagenumber"==b?1:u.apply(this,arguments)};document.body.appendChild(n.container);n.model.setRoot(v.root)}this.exportToCanvas(mxUtils.bind(this,function(b){t(b.toDataURL("image/png"))}),null,null,null,mxUtils.bind(this,
-function(){t(null)}),null,null,null,null,null,null,n)}else(new mxXmlRequest(EXPORT_URL,"format=png&embedXml="+("xmlpng"==g.format?"1":"0")+"&base64=1&xml="+encodeURIComponent(encodeURIComponent(m)))).send(mxUtils.bind(this,function(b){200<=b.getStatus()&&299>=b.getStatus()?q("data:image/png;base64,"+b.getText()):t(null)}),mxUtils.bind(this,function(){t(null)}))}}else{null!=g.xml&&0<g.xml.length&&this.setFileData(g.xml);l=this.createLoadMessage("export");if("html2"==g.format||"html"==g.format&&("0"!=
-urlParams.pages||null!=this.pages&&1<this.pages.length))p=this.getXmlFileData(),l.xml=mxUtils.getXml(p),l.data=this.getFileData(null,null,!0,null,null,null,p),l.format=g.format;else if("html"==g.format)m=this.editor.getGraphXml(),l.data=this.getHtml(m,this.editor.graph),l.xml=mxUtils.getXml(m),l.format=g.format;else{mxSvgCanvas2D.prototype.foAltText=null;p=this.editor.graph.background;p==mxConstants.NONE&&(p=null);l.xml=this.getFileData(!0);l.format="svg";if(g.embedImages||null==g.embedImages){if(null==
-g.spin&&null==g.spinKey||this.spinner.spin(document.body,null!=g.spinKey?mxResources.get(g.spinKey):g.spin))this.editor.graph.setEnabled(!1),"xmlsvg"==g.format?this.getEmbeddedSvg(l.xml,this.editor.graph,null,!0,mxUtils.bind(this,function(b){this.editor.graph.setEnabled(!0);this.spinner.stop();l.data=this.createSvgDataUri(b);k.postMessage(JSON.stringify(l),"*")})):this.convertImages(this.editor.graph.getSvg(p),mxUtils.bind(this,function(b){this.editor.graph.setEnabled(!0);this.spinner.stop();l.data=
-this.createSvgDataUri(mxUtils.getXml(b));k.postMessage(JSON.stringify(l),"*")}));return}p="xmlsvg"==g.format?this.getEmbeddedSvg(this.getFileData(!0),this.editor.graph,null,!0):mxUtils.getXml(this.editor.graph.getSvg(p));l.data=this.createSvgDataUri(p)}k.postMessage(JSON.stringify(l),"*")}return}if("create"==g.action&&this.createFile){if("trello"==g.mode){var A=mxUtils.bind(this,function(b){this.createFile(g.name,b||this.getFileData(/(\.xml)$/i.test(name)||0>name.indexOf("."),/(\.svg)$/i.test(name),
+if("dialog"==g.action){this.showError(null!=g.titleKey?mxResources.get(g.titleKey):g.title,null!=g.messageKey?mxResources.get(g.messageKey):g.message,null!=g.buttonKey?mxResources.get(g.buttonKey):g.button);null!=g.modified&&(this.editor.modified=g.modified);return}if("prompt"==g.action){this.spinner.stop();var l=new FilenameDialog(this,g.defaultValue||"",null!=g.okKey?mxResources.get(g.okKey):null,function(b){null!=b&&k.postMessage(JSON.stringify({event:"prompt",value:b,message:g}),"*")},null!=g.titleKey?
+mxResources.get(g.titleKey):g.title);this.showDialog(l.container,300,80,!0,!1);l.init();return}if("draft"==g.action){l=null;l="data:image/png;base64,"==g.xml.substring(0,22)?this.extractGraphModelFromPng(g.xml):h(g.xml);this.spinner.stop();l=new DraftDialog(this,mxResources.get("draftFound",[g.name||this.defaultFilename]),l,mxUtils.bind(this,function(){this.hideDialog();k.postMessage(JSON.stringify({event:"draft",result:"edit",message:g}),"*")}),mxUtils.bind(this,function(){this.hideDialog();k.postMessage(JSON.stringify({event:"draft",
+result:"discard",message:g}),"*")}),g.editKey?mxResources.get(g.editKey):null,g.discardKey?mxResources.get(g.discardKey):null,g.ignore?mxUtils.bind(this,function(){this.hideDialog();k.postMessage(JSON.stringify({event:"draft",result:"ignore",message:g}),"*")}):null);this.showDialog(l.container,640,480,!0,!1,mxUtils.bind(this,function(b){b&&this.actions.get("exit").funct()}));try{l.init()}catch(J){k.postMessage(JSON.stringify({event:"draft",error:J.toString(),message:g}),"*")}return}if("template"==
+g.action){this.spinner.stop();l=new NewDialog(this,!1,null!=g.callback,mxUtils.bind(this,function(a,c){a=a||this.emptyDiagramXml;null!=g.callback?k.postMessage(JSON.stringify({event:"template",xml:a,blank:a==this.emptyDiagramXml,name:c}),"*"):(b(a,e,a!=this.emptyDiagramXml),this.editor.modified||this.editor.setStatus(""))}));this.showDialog(l.container,620,440,!0,!1,mxUtils.bind(this,function(b){b&&this.actions.get("exit").funct()}));l.init();return}if("status"==g.action){null!=g.messageKey?this.editor.setStatus(mxUtils.htmlEntities(mxResources.get(g.messageKey))):
+null!=g.message&&this.editor.setStatus(mxUtils.htmlEntities(g.message));null!=g.modified&&(this.editor.modified=g.modified);return}if("spinner"==g.action){var m=null!=g.messageKey?mxResources.get(g.messageKey):g.message;null==g.show||g.show?this.spinner.spin(document.body,m):this.spinner.stop();return}if("export"==g.action){if("png"==g.format||"xmlpng"==g.format){if(null==g.spin&&null==g.spinKey||this.spinner.spin(document.body,null!=g.spinKey?mxResources.get(g.spinKey):g.spin)){var n=null!=g.xml?
+g.xml:this.getFileData(!0);this.editor.graph.setEnabled(!1);var p=this.editor.graph,q=mxUtils.bind(this,function(b){this.editor.graph.setEnabled(!0);this.spinner.stop();var a=this.createLoadMessage("export");a.format=g.format;a.message=g;a.data=b;a.xml=encodeURIComponent(n);k.postMessage(JSON.stringify(a),"*")}),v=mxUtils.bind(this,function(b){null==b&&(b=Editor.blankImage);"xmlpng"==g.format&&(b=this.writeGraphModelToPng(b,"zTXt","mxGraphModel",atob(this.editor.graph.compress(n))));p!=this.editor.graph&&
+p.container.parentNode.removeChild(p.container);q(b)});if(this.isExportToCanvas()){if(null!=this.pages&&this.currentPage!=this.pages[0]){var p=this.createTemporaryGraph(p.getStylesheet()),u=p.getGlobalVariable,D=this.pages[0];p.getGlobalVariable=function(b){return"page"==b?D.getName():"pagenumber"==b?1:u.apply(this,arguments)};document.body.appendChild(p.container);p.model.setRoot(D.root)}this.exportToCanvas(mxUtils.bind(this,function(b){v(b.toDataURL("image/png"))}),null,null,null,mxUtils.bind(this,
+function(){v(null)}),null,null,null,null,null,null,p)}else(new mxXmlRequest(EXPORT_URL,"format=png&embedXml="+("xmlpng"==g.format?"1":"0")+"&base64=1&xml="+encodeURIComponent(encodeURIComponent(n)))).send(mxUtils.bind(this,function(b){200<=b.getStatus()&&299>=b.getStatus()?q("data:image/png;base64,"+b.getText()):v(null)}),mxUtils.bind(this,function(){v(null)}))}}else{null!=g.xml&&0<g.xml.length&&this.setFileData(g.xml);m=this.createLoadMessage("export");if("html2"==g.format||"html"==g.format&&("0"!=
+urlParams.pages||null!=this.pages&&1<this.pages.length))l=this.getXmlFileData(),m.xml=mxUtils.getXml(l),m.data=this.getFileData(null,null,!0,null,null,null,l),m.format=g.format;else if("html"==g.format)n=this.editor.getGraphXml(),m.data=this.getHtml(n,this.editor.graph),m.xml=mxUtils.getXml(n),m.format=g.format;else{mxSvgCanvas2D.prototype.foAltText=null;l=this.editor.graph.background;l==mxConstants.NONE&&(l=null);m.xml=this.getFileData(!0);m.format="svg";if(g.embedImages||null==g.embedImages){if(null==
+g.spin&&null==g.spinKey||this.spinner.spin(document.body,null!=g.spinKey?mxResources.get(g.spinKey):g.spin))this.editor.graph.setEnabled(!1),"xmlsvg"==g.format?this.getEmbeddedSvg(m.xml,this.editor.graph,null,!0,mxUtils.bind(this,function(b){this.editor.graph.setEnabled(!0);this.spinner.stop();m.data=this.createSvgDataUri(b);k.postMessage(JSON.stringify(m),"*")})):this.convertImages(this.editor.graph.getSvg(l),mxUtils.bind(this,function(b){this.editor.graph.setEnabled(!0);this.spinner.stop();m.data=
+this.createSvgDataUri(mxUtils.getXml(b));k.postMessage(JSON.stringify(m),"*")}));return}l="xmlsvg"==g.format?this.getEmbeddedSvg(this.getFileData(!0),this.editor.graph,null,!0):mxUtils.getXml(this.editor.graph.getSvg(l));m.data=this.createSvgDataUri(l)}k.postMessage(JSON.stringify(m),"*")}return}if("create"==g.action&&this.createFile){if("trello"==g.mode){var A=mxUtils.bind(this,function(b){this.createFile(g.name,b||this.getFileData(/(\.xml)$/i.test(name)||0>name.indexOf("."),/(\.svg)$/i.test(name),
 /(\.html)$/i.test(name)),null,g.mode,null,!0,g.folder)}),H=mxUtils.bind(this,function(){null!=g.template?this.trello.getFile(g.folder+this.trello.SEPARATOR+g.template,function(b){A(b.getData())},function(){A()}):A()});if(null==this.trello){var E=function(){null!=this.trello&&(this.removeListener(E),H())};this.addListener("clientLoaded",E)}else H()}return}if("load"==g.action)d=1==g.autosave,this.hideDialog(),null!=g.modified&&null==urlParams.modified&&(urlParams.modified=g.modified),null!=g.saveAndExit&&
-null==urlParams.saveAndExit&&(urlParams.saveAndExit=g.saveAndExit),null!=g.title&&null!=this.buttonContainer&&(p=document.createElement("span"),mxUtils.write(p,g.title),"atlas"==uiTheme?(this.buttonContainer.style.paddingRight="12px",this.buttonContainer.style.paddingTop="12px"):(this.buttonContainer.style.paddingRight="38px",this.buttonContainer.style.paddingTop="6px"),null!=this.embedFilenameSpan&&this.embedFilenameSpan.parentNode.removeChild(this.embedFilenameSpan),this.buttonContainer.appendChild(p),
-this.embedFilenameSpan=p),g=null!=g.xmlpng?this.extractGraphModelFromPng(g.xmlpng):null!=g.xml&&"data:image/png;base64,"==g.xml.substring(0,22)?this.extractGraphModelFromPng(g.xml):g.xml;else{k.postMessage(JSON.stringify({error:"unknownMessage",data:JSON.stringify(g)}),"*");return}}g=h(g);c=!0;try{b(g,e)}catch(J){this.handleError(J)}c=!1;null!=urlParams.modified&&this.editor.setStatus("");var I=mxUtils.bind(this,function(){return"0"!=urlParams.pages||null!=this.pages&&1<this.pages.length?this.getFileData(!0):
+null==urlParams.saveAndExit&&(urlParams.saveAndExit=g.saveAndExit),null!=g.title&&null!=this.buttonContainer&&(l=document.createElement("span"),mxUtils.write(l,g.title),"atlas"==uiTheme?(this.buttonContainer.style.paddingRight="12px",this.buttonContainer.style.paddingTop="12px"):(this.buttonContainer.style.paddingRight="38px",this.buttonContainer.style.paddingTop="6px"),null!=this.embedFilenameSpan&&this.embedFilenameSpan.parentNode.removeChild(this.embedFilenameSpan),this.buttonContainer.appendChild(l),
+this.embedFilenameSpan=l),g=null!=g.xmlpng?this.extractGraphModelFromPng(g.xmlpng):null!=g.xml&&"data:image/png;base64,"==g.xml.substring(0,22)?this.extractGraphModelFromPng(g.xml):g.xml;else{k.postMessage(JSON.stringify({error:"unknownMessage",data:JSON.stringify(g)}),"*");return}}g=h(g);c=!0;try{b(g,e)}catch(J){this.handleError(J)}c=!1;null!=urlParams.modified&&this.editor.setStatus("");var I=mxUtils.bind(this,function(){return"0"!=urlParams.pages||null!=this.pages&&1<this.pages.length?this.getFileData(!0):
 mxUtils.getXml(this.editor.getGraphXml())});f=I();d&&null==a&&(a=mxUtils.bind(this,function(b,a){var e=I();if(e!=f&&!c){var d=this.createLoadMessage("autosave");d.xml=e;e=JSON.stringify(d);(window.opener||window.parent).postMessage(e,"*")}f=e}),this.editor.graph.model.addListener(mxEvent.CHANGE,a),this.editor.graph.addListener("gridSizeChanged",a),this.editor.graph.addListener("shadowVisibleChanged",a),this.addListener("pageFormatChanged",a),this.addListener("pageScaleChanged",a),this.addListener("backgroundColorChanged",
 a),this.addListener("backgroundImageChanged",a),this.addListener("foldingEnabledChanged",a),this.addListener("mathEnabledChanged",a),this.addListener("gridEnabledChanged",a),this.addListener("guidesEnabledChanged",a),this.addListener("pageViewChanged",a));"1"!=urlParams.returnbounds&&"json"!=urlParams.proto||k.postMessage(JSON.stringify(this.createLoadMessage("load")),"*")}));var k=window.opener||window.parent,h="json"==urlParams.proto?JSON.stringify({event:"init"}):urlParams.ready||"ready";k.postMessage(h,
 "*")};EditorUi.prototype.addEmbedButtons=function(){if(null!=this.menubar){var b=document.createElement("div");b.style.display="inline-block";b.style.position="absolute";b.style.paddingTop="atlas"==uiTheme?"2px":"3px";b.style.paddingLeft="8px";b.style.paddingBottom="2px";var a=document.createElement("button");mxUtils.write(a,mxResources.get("save"));a.setAttribute("title",mxResources.get("save")+" ("+Editor.ctrlKey+"+S)");a.className="geBigButton";a.style.fontSize="12px";a.style.padding="4px 6px 4px 6px";
 a.style.borderRadius="3px";mxEvent.addListener(a,"click",mxUtils.bind(this,function(){this.actions.get("save").funct()}));b.appendChild(a);"1"==urlParams.saveAndExit&&(a=document.createElement("a"),mxUtils.write(a,mxResources.get("saveAndExit")),a.setAttribute("title",mxResources.get("saveAndExit")),a.style.fontSize="12px",a.style.marginLeft="6px",a.style.padding="4px",a.style.cursor="pointer",mxEvent.addListener(a,"click",mxUtils.bind(this,function(){this.actions.get("saveAndExit").funct()})),b.appendChild(a));
 a=document.createElement("a");mxUtils.write(a,mxResources.get("exit"));a.setAttribute("title",mxResources.get("exit"));a.style.fontSize="12px";a.style.marginLeft="6px";a.style.marginRight="20px";a.style.padding="4px";a.style.cursor="pointer";mxEvent.addListener(a,"click",mxUtils.bind(this,function(){this.actions.get("exit").funct()}));b.appendChild(a);this.toolbar.container.appendChild(b);this.toolbar.staticElements.push(b);b.style.right="atlas"!=uiTheme?"52px":"42px"}};EditorUi.prototype.showImportCsvDialog=
-function(){null==this.importCsvDialog&&(this.importCsvDialog=new TextareaDialog(this,mxResources.get("csv")+":",Editor.defaultCsvValue,mxUtils.bind(this,function(b){this.importCsv(b)}),null,null,620,430,null,!0,!0,mxResources.get("import")));this.showDialog(this.importCsvDialog.container,640,520,!0,!0);this.importCsvDialog.init()};EditorUi.prototype.importCsv=function(b){try{var a=b.split("\n"),c=[];if(0<a.length){var d={},f=null,h=null,k="auto",m="auto",n=40,x=40,p=0,w=this.editor.graph;w.getGraphBounds();
+function(){null==this.importCsvDialog&&(this.importCsvDialog=new TextareaDialog(this,mxResources.get("csv")+":",Editor.defaultCsvValue,mxUtils.bind(this,function(b){this.importCsv(b)}),null,null,620,430,null,!0,!0,mxResources.get("import")));this.showDialog(this.importCsvDialog.container,640,520,!0,!0);this.importCsvDialog.init()};EditorUi.prototype.importCsv=function(b){try{var a=b.split("\n"),c=[];if(0<a.length){var d={},f=null,h=null,k="auto",m="auto",n=40,y=40,t=0,w=this.editor.graph;w.getGraphBounds();
 for(var C=function(){w.setSelectionCells(P);w.scrollCellToVisible(w.getSelectionCell())},F=w.getFreeInsertPoint(),B=F.x,G=F.y,F=G,z=null,D="auto",A=[],H=null,E=null,I=0;I<a.length&&"#"==a[I].charAt(0);){b=a[I];for(I++;I<a.length&&"\\"==b.charAt(b.length-1)&&"#"==a[I].charAt(0);)b=b.substring(0,b.length-1)+mxUtils.trim(a[I].substring(1)),I++;if("#"!=b.charAt(1)){var J=b.indexOf(":");if(0<J){var N=mxUtils.trim(b.substring(1,J)),M=mxUtils.trim(b.substring(J+1));"label"==N?z=w.sanitizeHtml(M):"style"==
-N?f=M:"identity"==N&&0<M.length&&"-"!=M?h=M:"width"==N?k=M:"height"==N?m=M:"ignore"==N?E=M.split(","):"connect"==N?A.push(JSON.parse(M)):"link"==N?H=M:"padding"==N?p=parseFloat(M):"edgespacing"==N?n=parseFloat(M):"nodespacing"==N?x=parseFloat(M):"layout"==N&&(D=M)}}}var R=this.editor.csvToArray(a[I]);b=null;if(null!=h)for(var L=0;L<R.length;L++)if(h==R[L]){b=L;break}null==z&&(z="%"+R[0]+"%");if(null!=A)for(var O=0;O<A.length;O++)null==d[A[O].to]&&(d[A[O].to]={});w.model.beginUpdate();try{for(L=I+
+N?f=M:"identity"==N&&0<M.length&&"-"!=M?h=M:"width"==N?k=M:"height"==N?m=M:"ignore"==N?E=M.split(","):"connect"==N?A.push(JSON.parse(M)):"link"==N?H=M:"padding"==N?t=parseFloat(M):"edgespacing"==N?n=parseFloat(M):"nodespacing"==N?y=parseFloat(M):"layout"==N&&(D=M)}}}var R=this.editor.csvToArray(a[I]);b=null;if(null!=h)for(var L=0;L<R.length;L++)if(h==R[L]){b=L;break}null==z&&(z="%"+R[0]+"%");if(null!=A)for(var O=0;O<A.length;O++)null==d[A[O].to]&&(d[A[O].to]={});w.model.beginUpdate();try{for(L=I+
 1;L<a.length;L++){var S=this.editor.csvToArray(a[L]);if(S.length==R.length){var K=null,X=null!=b?S[b]:null;null!=X&&(K=w.model.getCell(X));null==K&&(K=new mxCell(z,new mxGeometry(B,F,0,0),f||"whiteSpace=wrap;html=1;"),K.vertex=!0,K.id=X);for(var Q=0;Q<S.length;Q++)w.setAttributeForCell(K,R[Q],S[Q]);w.setAttributeForCell(K,"placeholders","1");K.style=w.replacePlaceholders(K,K.style);for(O=0;O<A.length;O++)d[A[O].to][K.getAttribute(A[O].to)]=K;null!=H&&"link"!=H&&(w.setLinkForCell(K,K.getAttribute(H)),
-w.setAttributeForCell(K,H,null));var Y=this.editor.graph.getPreferredSizeForCell(K);K.geometry.width="auto"==k?Y.width+p:parseFloat(k);K.geometry.height="auto"==m?Y.height+p:parseFloat(m);F+=K.geometry.height+x;c.push(w.addCell(K))}}null==f&&w.fireEvent(new mxEventObject("cellsInserted","cells",c));for(var W=c.slice(),P=c.slice(),O=0;O<A.length;O++)for(var T=A[O],L=0;L<c.length;L++){var K=c[L],V=K.getAttribute(T.from);if(null!=V){w.setAttributeForCell(K,T.from,null);for(var U=V.split(","),Q=0;Q<U.length;Q++){var ba=
+w.setAttributeForCell(K,H,null));var Y=this.editor.graph.getPreferredSizeForCell(K);K.geometry.width="auto"==k?Y.width+t:parseFloat(k);K.geometry.height="auto"==m?Y.height+t:parseFloat(m);F+=K.geometry.height+y;c.push(w.addCell(K))}}null==f&&w.fireEvent(new mxEventObject("cellsInserted","cells",c));for(var W=c.slice(),P=c.slice(),O=0;O<A.length;O++)for(var T=A[O],L=0;L<c.length;L++){var K=c[L],V=K.getAttribute(T.from);if(null!=V){w.setAttributeForCell(K,T.from,null);for(var U=V.split(","),Q=0;Q<U.length;Q++){var ba=
 d[T.to][U[Q]];null!=ba&&(P.push(w.insertEdge(null,null,T.label||"",T.invert?ba:K,T.invert?K:ba,T.style||w.createCurrentEdgeStyle())),mxUtils.remove(T.invert?K:ba,W))}}}if(null!=E)for(L=0;L<c.length;L++)for(K=c[L],Q=0;Q<E.length;Q++)w.setAttributeForCell(K,mxUtils.trim(E[Q]),null);var ca=new mxParallelEdgeLayout(w);ca.spacing=n;var fa=function(){ca.execute(w.getDefaultParent());for(var b=0;b<c.length;b++){var a=w.getCellGeometry(c[b]);a.x=Math.round(w.snap(a.x));a.y=Math.round(w.snap(a.y));"auto"==
 k&&(a.width=Math.round(w.snap(a.width)));"auto"==m&&(a.height=Math.round(w.snap(a.height)))}};if("circle"==D){var da=new mxCircleLayout(w);da.resetEdges=!1;var ha=da.isVertexIgnored;da.isVertexIgnored=function(b){return ha.apply(this,arguments)||0>mxUtils.indexOf(c,b)};this.executeLayout(function(){da.execute(w.getDefaultParent());fa()},!0,C);C=null}else if("horizontaltree"==D||"verticaltree"==D||"auto"==D&&P.length==2*c.length-1&&1==W.length){w.view.validate();var Z=new mxCompactTreeLayout(w,"horizontaltree"==
-D);Z.levelDistance=x;Z.edgeRouting=!1;Z.resetEdges=!1;this.executeLayout(function(){Z.execute(w.getDefaultParent(),0<W.length?W[0]:null)},!0,C);C=null}else if("horizontalflow"==D||"verticalflow"==D||"auto"==D&&1==W.length){w.view.validate();var ea=new mxHierarchicalLayout(w,"horizontalflow"==D?mxConstants.DIRECTION_WEST:mxConstants.DIRECTION_NORTH);ea.intraCellSpacing=x;ea.disableEdgeStyle=!1;this.executeLayout(function(){ea.execute(w.getDefaultParent(),P);w.moveCells(P,B,G)},!0,C);C=null}else if("organic"==
-D||"auto"==D&&P.length>c.length){w.view.validate();var aa=new mxFastOrganicLayout(w);aa.forceConstant=3*x;aa.resetEdges=!1;var ia=aa.isVertexIgnored;aa.isVertexIgnored=function(b){return ia.apply(this,arguments)||0>mxUtils.indexOf(c,b)};ca=new mxParallelEdgeLayout(w);ca.spacing=n;this.executeLayout(function(){aa.execute(w.getDefaultParent());fa()},!0,C);C=null}this.hideDialog()}finally{w.model.endUpdate()}null!=C&&C()}}catch(ja){this.handleError(ja)}};EditorUi.prototype.getSearch=function(b){var a=
+D);Z.levelDistance=y;Z.edgeRouting=!1;Z.resetEdges=!1;this.executeLayout(function(){Z.execute(w.getDefaultParent(),0<W.length?W[0]:null)},!0,C);C=null}else if("horizontalflow"==D||"verticalflow"==D||"auto"==D&&1==W.length){w.view.validate();var ea=new mxHierarchicalLayout(w,"horizontalflow"==D?mxConstants.DIRECTION_WEST:mxConstants.DIRECTION_NORTH);ea.intraCellSpacing=y;ea.disableEdgeStyle=!1;this.executeLayout(function(){ea.execute(w.getDefaultParent(),P);w.moveCells(P,B,G)},!0,C);C=null}else if("organic"==
+D||"auto"==D&&P.length>c.length){w.view.validate();var aa=new mxFastOrganicLayout(w);aa.forceConstant=3*y;aa.resetEdges=!1;var ia=aa.isVertexIgnored;aa.isVertexIgnored=function(b){return ia.apply(this,arguments)||0>mxUtils.indexOf(c,b)};ca=new mxParallelEdgeLayout(w);ca.spacing=n;this.executeLayout(function(){aa.execute(w.getDefaultParent());fa()},!0,C);C=null}this.hideDialog()}finally{w.model.endUpdate()}null!=C&&C()}}catch(ja){this.handleError(ja)}};EditorUi.prototype.getSearch=function(b){var a=
 "";if("1"!=urlParams.offline&&"1"!=urlParams.demo&&null!=b&&0<window.location.search.length){var c="?",d;for(d in urlParams)0>mxUtils.indexOf(b,d)&&null!=urlParams[d]&&(a+=c+d+"="+urlParams[d],c="&")}else a=window.location.search;return a};EditorUi.prototype.getUrl=function(b){b=null!=b?b:window.location.pathname;var a=0<b.indexOf("?")?1:0;if("1"==urlParams.offline)b+=window.location.search;else{var c="tmp libs clibs state fileId code share notitle data url embed client create title splash".split(" "),
 d;for(d in urlParams)0>mxUtils.indexOf(c,d)&&(b=0==a?b+"?":b+"&",null!=urlParams[d]&&(b+=d+"="+urlParams[d],a++))}return b};EditorUi.prototype.showLinkDialog=function(b,a,c){b=new LinkDialog(this,b,a,c,!0);this.showDialog(b.container,420,120,!0,!0);b.init()};var m=EditorUi.prototype.createOutline;EditorUi.prototype.createOutline=function(b){var a=m.apply(this,arguments),c=this.editor.graph,d=a.getSourceGraphBounds;a.getSourceGraphBounds=function(){if(mxUtils.hasScrollbars(c.container)&&c.pageVisible&&
 null!=this.source.minimumGraphSize){var b=this.source.getPagePadding(),a=this.source.view.scale;return new mxRectangle(0,0,Math.ceil(this.source.minimumGraphSize.width-2*b.x/a),Math.ceil(this.source.minimumGraphSize.height-2*b.y/a))}return d.apply(this,arguments)};var f=a.getSourceContainerSize;a.getSourceContainerSize=function(){if(mxUtils.hasScrollbars(c.container)&&null!=this.source.minimumGraphSize){var b=this.source.getPagePadding(),a=this.source.view.scale;return new mxRectangle(0,0,Math.ceil(this.source.minimumGraphSize.width*
-a-2*b.x),Math.ceil(this.source.minimumGraphSize.height*a-2*b.y))}return f.apply(this,arguments)};a.getOutlineOffset=function(b){if(mxUtils.hasScrollbars(c.container)&&null!=this.source.minimumGraphSize){var e=this.source.getPagePadding();return new mxPoint(Math.round(Math.max(0,(a.outline.container.clientWidth/b-(this.source.minimumGraphSize.width-2*e.x))/2)-e.x),Math.round(Math.max(0,(a.outline.container.clientHeight/b-(this.source.minimumGraphSize.height-2*e.y))/2)-e.y-5/b))}return new mxPoint(8/
-b,8/b)};var h=a.init;a.init=function(){h.apply(this,arguments);a.outline.view.getBackgroundPageBounds=function(){var b=c.getPageLayout(),a=c.getPageSize();return new mxRectangle(this.scale*(this.translate.x+b.x*a.width),this.scale*(this.translate.y+b.y*a.height),this.scale*b.width*a.width,this.scale*b.height*a.height)};a.outline.view.validateBackgroundPage()};this.editor.addListener("pageSelected",function(b,c){var e=c.getProperty("change"),d=a.source,f=a.outline;f.pageScale=d.pageScale;f.pageFormat=
-d.pageFormat;f.background=d.background;f.pageVisible=d.pageVisible;f.background=d.background;var g=mxUtils.getCurrentStyle(d.container);f.container.style.backgroundColor=g.backgroundColor;null!=d.view.backgroundPageShape&&null!=f.view.backgroundPageShape&&(f.view.backgroundPageShape.fill=d.view.backgroundPageShape.fill);a.outline.view.clear(e.previousPage.root,!0);a.outline.view.validate()});return a};EditorUi.prototype.getServiceCount=function(b){var a=0;null==this.drive&&"function"!==typeof window.DriveClient||
+a-2*b.x),Math.ceil(this.source.minimumGraphSize.height*a-2*b.y))}return f.apply(this,arguments)};a.getOutlineOffset=function(b){if(mxUtils.hasScrollbars(c.container)&&null!=this.source.minimumGraphSize){var d=this.source.getPagePadding();return new mxPoint(Math.round(Math.max(0,(a.outline.container.clientWidth/b-(this.source.minimumGraphSize.width-2*d.x))/2)-d.x),Math.round(Math.max(0,(a.outline.container.clientHeight/b-(this.source.minimumGraphSize.height-2*d.y))/2)-d.y-5/b))}return new mxPoint(8/
+b,8/b)};var h=a.init;a.init=function(){h.apply(this,arguments);a.outline.view.getBackgroundPageBounds=function(){var b=c.getPageLayout(),a=c.getPageSize();return new mxRectangle(this.scale*(this.translate.x+b.x*a.width),this.scale*(this.translate.y+b.y*a.height),this.scale*b.width*a.width,this.scale*b.height*a.height)};a.outline.view.validateBackgroundPage()};this.editor.addListener("pageSelected",function(b,c){var d=c.getProperty("change"),e=a.source,f=a.outline;f.pageScale=e.pageScale;f.pageFormat=
+e.pageFormat;f.background=e.background;f.pageVisible=e.pageVisible;f.background=e.background;var g=mxUtils.getCurrentStyle(e.container);f.container.style.backgroundColor=g.backgroundColor;null!=e.view.backgroundPageShape&&null!=f.view.backgroundPageShape&&(f.view.backgroundPageShape.fill=e.view.backgroundPageShape.fill);a.outline.view.clear(d.previousPage.root,!0);a.outline.view.validate()});return a};EditorUi.prototype.getServiceCount=function(b){var a=0;null==this.drive&&"function"!==typeof window.DriveClient||
 a++;null==this.dropbox&&"function"!==typeof window.DropboxClient||a++;null==this.oneDrive&&"function"!==typeof window.OneDriveClient||a++;null!=this.gitHub&&a++;null==this.trello&&"function"!==typeof window.TrelloClient||a++;b&&isLocalStorage&&("1"==urlParams.browser||mxClient.IS_IOS)&&a++;mxClient.IS_IOS||a++;return a};EditorUi.prototype.updateUi=function(){this.updateButtonContainer();this.updateActionStates();var b=this.getCurrentFile(),a=null!=b||"1"==urlParams.embed&&this.editor.graph.isEnabled();
 this.menus.get("viewPanels").setEnabled(a);this.menus.get("viewZoom").setEnabled(a);var c=("1"!=urlParams.embed||!this.editor.graph.isEnabled())&&(null==b||b.isRestricted());this.actions.get("makeCopy").setEnabled(!c);this.actions.get("print").setEnabled(!c);this.menus.get("exportAs").setEnabled(!c);this.menus.get("embed").setEnabled(!c);c="1"!=urlParams.embed||this.editor.graph.isEnabled();this.menus.get("openLibraryFrom").setEnabled(c);this.menus.get("newLibrary").setEnabled(c);this.menus.get("extras").setEnabled(c);
 b="1"==urlParams.embed&&this.editor.graph.isEnabled()||null!=b&&b.isEditable();this.actions.get("image").setEnabled(a);this.actions.get("zoomIn").setEnabled(a);this.actions.get("zoomOut").setEnabled(a);this.actions.get("resetView").setEnabled(a);this.menus.get("edit").setEnabled(a);this.menus.get("view").setEnabled(a);this.menus.get("importFrom").setEnabled(b);this.menus.get("arrange").setEnabled(b);null!=this.toolbar&&(null!=this.toolbar.edgeShapeMenu&&this.toolbar.edgeShapeMenu.setEnabled(b),null!=
@@ -6491,8 +6493,8 @@ IMAGE_PATH+'/clear.gif"/>'}b!=f&&(this.offlineStatus.innerHTML=a,f=b)});mxEvent.
 var n=EditorUi.prototype.updateActionStates;EditorUi.prototype.updateActionStates=function(){n.apply(this,arguments);var b=this.editor.graph,a=this.getCurrentFile(),c=null!=a&&a.isEditable()||"1"==urlParams.embed&&this.editor.graph.isEnabled();this.actions.get("pageSetup").setEnabled(c);this.actions.get("autosave").setEnabled(null!=a&&a.isEditable()&&a.isAutosaveOptional());this.actions.get("guides").setEnabled(c);this.actions.get("editData").setEnabled(c);this.actions.get("shadowVisible").setEnabled(c);
 this.actions.get("connectionArrows").setEnabled(c);this.actions.get("connectionPoints").setEnabled(c);this.actions.get("copyStyle").setEnabled(c&&!b.isSelectionEmpty());this.actions.get("pasteStyle").setEnabled(c&&!b.isSelectionEmpty());this.actions.get("editGeometry").setEnabled(b.getModel().isVertex(b.getSelectionCell()));this.actions.get("createShape").setEnabled(c);this.actions.get("createRevision").setEnabled(c);this.actions.get("moveToFolder").setEnabled(null!=a);this.actions.get("makeCopy").setEnabled(null!=
 a&&!a.isRestricted());this.actions.get("editDiagram").setEnabled("1"==urlParams.embed&&this.editor.graph.isEnabled()||null!=a&&!a.isRestricted());this.actions.get("publishLink").setEnabled(null!=a&&!a.isRestricted());this.actions.get("tags").setEnabled("1"==urlParams.embed&&this.editor.graph.isEnabled()||null!=a&&!a.isRestricted());this.actions.get("close").setEnabled(null!=a);this.menus.get("publish").setEnabled(null!=a&&!a.isRestricted());b=b.view.getState(b.getSelectionCell());this.actions.get("editShape").setEnabled(c&&
-null!=b&&null!=b.shape&&null!=b.shape.stencil)};null!=window.ExportDialog&&(ExportDialog.showXmlOption=!1,ExportDialog.showGifOption=!1,ExportDialog.exportFile=function(b,a,c,d,f,h){var e=b.editor.graph;if("xml"==c)b.hideDialog(),b.saveData(a,"xml",mxUtils.getXml(b.editor.getGraphXml()),"text/xml");else if("svg"==c)b.hideDialog(),b.saveData(a,"svg",mxUtils.getXml(e.getSvg(d,f,h)),"image/svg+xml");else{var g=b.getFileData(!0,null,null,null,null,!0),k=e.getGraphBounds(),m=Math.floor(k.width*f/e.view.scale),
-p=Math.floor(k.height*f/e.view.scale);g.length<=MAX_REQUEST_SIZE&&m*p<MAX_AREA?(b.hideDialog(),b.saveRequest(a,c,function(b,a){return new mxXmlRequest(EXPORT_URL,"format="+c+"&base64="+(a||"0")+(null!=b?"&filename="+encodeURIComponent(b):"")+"&bg="+(null!=d?d:"none")+"&w="+m+"&h="+p+"&border="+h+"&xml="+encodeURIComponent(g))})):mxUtils.alert(mxResources.get("drawingTooLarge"))}})})();var mxSettings={currentVersion:16,defaultFormatWidth:600>screen.width?"0":"240",key:".drawio-config",getLanguage:function(){return mxSettings.settings.language},setLanguage:function(a){mxSettings.settings.language=a},getUi:function(){return mxSettings.settings.ui},setUi:function(a){mxSettings.settings.ui=a},getShowStartScreen:function(){return mxSettings.settings.showStartScreen},setShowStartScreen:function(a){mxSettings.settings.showStartScreen=a},getGridColor:function(){return mxSettings.settings.gridColor},
+null!=b&&null!=b.shape&&null!=b.shape.stencil)};null!=window.ExportDialog&&(ExportDialog.showXmlOption=!1,ExportDialog.showGifOption=!1,ExportDialog.exportFile=function(b,a,c,d,f,h){var e=b.editor.graph;if("xml"==c)b.hideDialog(),b.saveData(a,"xml",mxUtils.getXml(b.editor.getGraphXml()),"text/xml");else if("svg"==c)b.hideDialog(),b.saveData(a,"svg",mxUtils.getXml(e.getSvg(d,f,h)),"image/svg+xml");else{var g=b.getFileData(!0,null,null,null,null,!0),k=e.getGraphBounds(),l=Math.floor(k.width*f/e.view.scale),
+m=Math.floor(k.height*f/e.view.scale);g.length<=MAX_REQUEST_SIZE&&l*m<MAX_AREA?(b.hideDialog(),b.saveRequest(a,c,function(b,a){return new mxXmlRequest(EXPORT_URL,"format="+c+"&base64="+(a||"0")+(null!=b?"&filename="+encodeURIComponent(b):"")+"&bg="+(null!=d?d:"none")+"&w="+l+"&h="+m+"&border="+h+"&xml="+encodeURIComponent(g))})):mxUtils.alert(mxResources.get("drawingTooLarge"))}})})();var mxSettings={currentVersion:16,defaultFormatWidth:600>screen.width?"0":"240",key:".drawio-config",getLanguage:function(){return mxSettings.settings.language},setLanguage:function(a){mxSettings.settings.language=a},getUi:function(){return mxSettings.settings.ui},setUi:function(a){mxSettings.settings.ui=a},getShowStartScreen:function(){return mxSettings.settings.showStartScreen},setShowStartScreen:function(a){mxSettings.settings.showStartScreen=a},getGridColor:function(){return mxSettings.settings.gridColor},
 setGridColor:function(a){mxSettings.settings.gridColor=a},getAutosave:function(){return mxSettings.settings.autosave},setAutosave:function(a){mxSettings.settings.autosave=a},getResizeImages:function(){return mxSettings.settings.resizeImages},setResizeImages:function(a){mxSettings.settings.resizeImages=a},getOpenCounter:function(){return mxSettings.settings.openCounter},setOpenCounter:function(a){mxSettings.settings.openCounter=a},getLibraries:function(){return mxSettings.settings.libraries},setLibraries:function(a){mxSettings.settings.libraries=
 a},addCustomLibrary:function(a){mxSettings.load();0>mxUtils.indexOf(mxSettings.settings.customLibraries,a)&&("L.scratchpad"===a?mxSettings.settings.customLibraries.splice(0,0,a):mxSettings.settings.customLibraries.push(a));mxSettings.save()},removeCustomLibrary:function(a){mxSettings.load();mxUtils.remove(a,mxSettings.settings.customLibraries);mxSettings.save()},getCustomLibraries:function(){return mxSettings.settings.customLibraries},getPlugins:function(){return mxSettings.settings.plugins},setPlugins:function(a){mxSettings.settings.plugins=
 a},getRecentColors:function(){return mxSettings.settings.recentColors},setRecentColors:function(a){mxSettings.settings.recentColors=a},getFormatWidth:function(){return parseInt(mxSettings.settings.formatWidth)},setFormatWidth:function(a){mxSettings.settings.formatWidth=a},getCurrentEdgeStyle:function(){return mxSettings.settings.currentEdgeStyle},setCurrentEdgeStyle:function(a){mxSettings.settings.currentEdgeStyle=a},getCurrentVertexStyle:function(){return mxSettings.settings.currentVertexStyle},
@@ -6513,7 +6515,7 @@ replay:"/plugins/replay.js",anon:"/plugins/anonymize.js"};App.getStoredMode=func
 2)?(mxscript(App.DROPBOX_URL),mxscript(App.DROPINS_URL,null,"dropboxjs",App.DROPBOX_APPKEY)):"0"==urlParams.chrome&&(window.DropboxClient=null):window.DropboxClient=null),"function"===typeof window.OneDriveClient&&("0"!=urlParams.od&&(0>navigator.userAgent.indexOf("MSIE")||10<=document.documentMode)?App.mode==App.MODE_ONEDRIVE||null!=window.location.hash&&"#W"==window.location.hash.substring(0,2)?mxscript(App.ONEDRIVE_URL):"0"==urlParams.chrome&&(window.OneDriveClient=null):window.OneDriveClient=
 null),"function"===typeof window.TrelloClient&&("0"!=urlParams.tr&&isSvgBrowser&&(null==document.documentMode||10<=document.documentMode)?App.mode==App.MODE_TRELLO||null!=window.location.hash&&"#T"==window.location.hash.substring(0,2)?(mxscript(App.TRELLO_JQUERY_URL),mxscript(App.TRELLO_URL)):"0"==urlParams.chrome&&(window.TrelloClient=null):window.TrelloClient=null)),"undefined"==typeof JSON&&mxscript("js/json/json2.min.js")))})();
 App.main=function(a,d){var f=null;EditorUi.enableLogging&&(window.onerror=function(b,a,c,d,h){try{if(b!=f&&(null==b||null==a||-1==b.indexOf("Script error")&&-1==b.indexOf("extension"))&&null!=b&&0>b.indexOf("DocumentClosedError")){f=b;var e=new Image,g=0<=b.indexOf("NetworkError")||0<=b.indexOf("SecurityError")||0<=b.indexOf("NS_ERROR_FAILURE")||0<=b.indexOf("out of memory")?"CONFIG":"SEVERE";e.src=(null!=window.DRAWIO_LOG_URL?window.DRAWIO_LOG_URL:"")+"/log?severity="+g+"&v="+encodeURIComponent(EditorUi.VERSION)+
-"&msg=clientError:"+encodeURIComponent(b)+":url:"+encodeURIComponent(window.location.href)+":lnum:"+encodeURIComponent(c)+(null!=d?":colno:"+encodeURIComponent(d):"")+(null!=h&&null!=h.stack?"&stack="+encodeURIComponent(h.stack):"")}}catch(t){}});"atlas"==uiTheme&&mxClient.link("stylesheet","styles/atlas.css");if(null!=window.mxscript){"0"!=urlParams.chrome&&mxscript("js/jscolor/jscolor.js");if("1"==urlParams.offline){mxscript("js/shapes.min.js");var c=document.createElement("iframe");c.setAttribute("width",
+"&msg=clientError:"+encodeURIComponent(b)+":url:"+encodeURIComponent(window.location.href)+":lnum:"+encodeURIComponent(c)+(null!=d?":colno:"+encodeURIComponent(d):"")+(null!=h&&null!=h.stack?"&stack="+encodeURIComponent(h.stack):"")}}catch(q){}});"atlas"==uiTheme&&mxClient.link("stylesheet","styles/atlas.css");if(null!=window.mxscript){"0"!=urlParams.chrome&&mxscript("js/jscolor/jscolor.js");if("1"==urlParams.offline){mxscript("js/shapes.min.js");var c=document.createElement("iframe");c.setAttribute("width",
 "0");c.setAttribute("height","0");c.setAttribute("src","offline.html");document.body.appendChild(c);mxStencilRegistry.stencilSet={};mxStencilRegistry.getStencil=function(b){return mxStencilRegistry.stencils[b]};mxStencilRegistry.loadStencilSet=function(b,a,c){b=b.substring(b.indexOf("/")+1);b="mxgraph."+b.substring(0,b.length-4).replace(/\//g,".");b=mxStencilRegistry.stencilSet[b];null!=b&&mxStencilRegistry.parseStencilSet(b,a,!1)};for(c=mxUtils.load("stencils.xml").getXml().documentElement.firstChild;null!=
 c;)"shapes"==c.nodeName&&null!=c.getAttribute("name")&&(mxStencilRegistry.stencilSet[c.getAttribute("name").toLowerCase()]=c,mxStencilRegistry.parseStencilSet(c)),c=c.nextSibling}"0"==urlParams.picker||mxClient.IS_QUIRKS||8==document.documentMode||mxscript(document.location.protocol+"//www.google.com/jsapi?autoload=%7B%22modules%22%3A%5B%7B%22name%22%3A%22picker%22%2C%22version%22%3A%221%22%2C%22language%22%3A%22"+mxClient.language+"%22%7D%5D%7D");if("0"!=urlParams.plugins&&"1"!=urlParams.offline){var c=
 mxSettings.getPlugins(),h=urlParams.p;App.initPluginCallback();"0"!=urlParams.chrome&&mxscript(App.FOOTER_PLUGIN_URL);if(null!=h){var k="";"1"==urlParams.drawdev&&(k=document.location.protocol+"//drawhost.jgraph.com/");for(var m=h.split(";"),h=0;h<m.length;h++){var n=App.pluginRegistry[m[h]];null!=n?mxscript(k+n):null!=window.console&&console.log("Unknown plugin:",m[h])}}if(null!=c&&0<c.length&&"0"!=urlParams.plugins){k=window.location.protocol+"//"+window.location.host;m=!0;for(h=0;h<c.length&&m;h++)"/"!=
@@ -6555,8 +6557,8 @@ App.prototype.updateDocumentTitle=function(){if(!this.editor.graph.lightbox){var
 App.prototype.crc32=function(a){this.crcTable=this.crcTable||this.createCrcTable();for(var d=-1,f=0;f<a.length;f++)d=d>>>8^this.crcTable[(d^a.charCodeAt(f))&255];return(d^-1)>>>0};
 App.prototype.getThumbnail=function(a,d){var f=!1;try{null==this.thumbImageCache&&(this.thumbImageCache={});var c=this.editor.graph;if(null!=this.pages&&this.currentPage!=this.pages[0]){var c=this.createTemporaryGraph(c.getStylesheet()),h=c.getGlobalVariable,k=this.pages[0];c.getGlobalVariable=function(b){return"page"==b?k.getName():"pagenumber"==b?1:h.apply(this,arguments)};document.body.appendChild(c.container);c.model.setRoot(k.root)}if(mxClient.IS_CHROMEAPP||!c.mathEnabled&&this.useCanvasForExport)this.exportToCanvas(mxUtils.bind(this,
 function(b){c!=this.editor.graph&&c.container.parentNode.removeChild(c.container);d(b)}),a,this.thumbImageCache,"#ffffff",function(){d()},null,null,null,null,null,null,c),f=!0;else if(this.canvasSupported&&null!=this.getCurrentFile()){var m=document.createElement("canvas"),n=c.getGraphBounds(),b=a/n.width,b=Math.min(1,Math.min(3*a/(4*n.height),b)),e=Math.floor(n.x),g=Math.floor(n.y);m.setAttribute("width",Math.ceil(b*(n.width+4)));m.setAttribute("height",Math.ceil(b*(n.height+4)));var l=m.getContext("2d");
-l.scale(b,b);l.translate(-e,-g);var q=c.background;if(null==q||""==q||q==mxConstants.NONE)q="#ffffff";l.save();l.fillStyle=q;l.fillRect(e,g,Math.ceil(n.width+4),Math.ceil(n.height+4));l.restore();var v=new mxJsCanvas(m),u=new mxAsyncCanvas(this.thumbImageCache);v.images=this.thumbImageCache.images;var t=new mxImageExport;t.drawShape=function(b,a){b.shape instanceof mxShape&&b.shape.checkBounds()&&(a.save(),a.translate(.5,.5),b.shape.paint(a),a.translate(-.5,-.5),a.restore())};t.drawText=function(b,
-a){};t.drawState(c.getView().getState(c.model.root),u);u.finish(mxUtils.bind(this,function(){t.drawState(c.getView().getState(c.model.root),v);c!=this.editor.graph&&c.container.parentNode.removeChild(c.container);d(m)}));f=!0}}catch(y){c!=this.editor.graph&&c.container.parentNode.removeChild(c.container)}return f};
+l.scale(b,b);l.translate(-e,-g);var p=c.background;if(null==p||""==p||p==mxConstants.NONE)p="#ffffff";l.save();l.fillStyle=p;l.fillRect(e,g,Math.ceil(n.width+4),Math.ceil(n.height+4));l.restore();var u=new mxJsCanvas(m),v=new mxAsyncCanvas(this.thumbImageCache);u.images=this.thumbImageCache.images;var q=new mxImageExport;q.drawShape=function(b,a){b.shape instanceof mxShape&&b.shape.checkBounds()&&(a.save(),a.translate(.5,.5),b.shape.paint(a),a.translate(-.5,-.5),a.restore())};q.drawText=function(b,
+a){};q.drawState(c.getView().getState(c.model.root),v);v.finish(mxUtils.bind(this,function(){q.drawState(c.getView().getState(c.model.root),u);c!=this.editor.graph&&c.container.parentNode.removeChild(c.container);d(m)}));f=!0}}catch(x){c!=this.editor.graph&&c.container.parentNode.removeChild(c.container)}return f};
 App.prototype.createBackground=function(){var a=this.createDiv("background");a.style.position="absolute";a.style.background="white";a.style.left="0px";a.style.top="0px";a.style.bottom="0px";a.style.right="0px";mxUtils.setOpacity(a,100);mxClient.IS_QUIRKS&&new mxDivResizer(a);return a};
 (function(){var a=EditorUi.prototype.setMode;App.prototype.setMode=function(d,f){a.apply(this,arguments);null!=this.mode&&(Editor.useLocalStorage=this.mode==App.MODE_BROWSER);if(f)if(isLocalStorage)localStorage.setItem(".mode",d);else if("undefined"!=typeof Storage){var c=new Date;c.setYear(c.getFullYear()+1);document.cookie="MODE="+d+"; expires="+c.toUTCString()}null!=this.appIcon&&(c=this.getCurrentFile(),d=null!=c?c.getMode():null,d==App.MODE_GOOGLE?(this.appIcon.setAttribute("title",mxResources.get("openIt",
 [mxResources.get("googleDrive")])),this.appIcon.style.cursor="pointer"):d==App.MODE_DROPBOX?(this.appIcon.setAttribute("title",mxResources.get("openIt",[mxResources.get("dropbox")])),this.appIcon.style.cursor="pointer"):d==App.MODE_ONEDRIVE?(this.appIcon.setAttribute("title",mxResources.get("openIt",[mxResources.get("oneDrive")])),this.appIcon.style.cursor="pointer"):(this.appIcon.removeAttribute("title"),this.appIcon.style.cursor="default"))}})();
@@ -6675,10 +6677,10 @@ null!=a?(this.userElement.innerHTML="",560<screen.width&&(mxUtils.write(this.use
 var d=document.createElement("img");d.setAttribute("border","0");d.setAttribute("valign","bottom");d.setAttribute("src",Editor.helpImage);c.appendChild(d);mxEvent.addGestureListeners(c,mxUtils.bind(this,function(c){null!=this.editorUi.menubar&&this.editorUi.menubar.hideMenu();window.open(a);mxEvent.consume(c)}));return c};Menus.prototype.addLinkToItem=function(a,d){null!=a&&a.firstChild.nextSibling.appendChild(this.createHelpLink(d))};var d=Menus.prototype.init;Menus.prototype.init=function(){d.apply(this,
 arguments);var a=this.editorUi,f=a.editor.graph,k=mxUtils.bind(f,f.isEnabled),m=("1"!=urlParams.embed&&"0"!=urlParams.gapi||"1"==urlParams.embed&&"1"==urlParams.gapi)&&mxClient.IS_SVG&&isLocalStorage&&(null==document.documentMode||10<=document.documentMode),n=("1"!=urlParams.embed&&"0"!=urlParams.db||"1"==urlParams.embed&&"1"==urlParams.db)&&mxClient.IS_SVG&&(null==document.documentMode||9<document.documentMode),b=("www.draw.io"==window.location.hostname||"test.draw.io"==window.location.hostname||
 "drive.draw.io"==window.location.hostname||"legacy.draw.io"==window.location.hostname)&&("1"!=urlParams.embed&&"0"!=urlParams.od||"1"==urlParams.embed&&"1"==urlParams.od)&&!navigator.userAgent.match(/(iPad|iPhone|iPod)/g)&&(0>navigator.userAgent.indexOf("MSIE")||10<=document.documentMode),e=("1"!=urlParams.embed&&"0"!=urlParams.tr||"1"==urlParams.embed&&"1"==urlParams.tr)&&mxClient.IS_SVG&&(null==document.documentMode||9<document.documentMode);a.isOffline()||((new Image).src=IMAGE_PATH+"/help.png");
-a.actions.addAction("new...",function(){var b=a.isOffline(),c=new NewDialog(a,b);a.showDialog(c.container,b?350:620,b?70:440,!0,!0,function(b){b&&null==a.getCurrentFile()&&a.showSplash()});c.init()});a.actions.put("exportSvg",new Action(mxResources.get("formatSvg")+"...",function(){a.showExportDialog(mxResources.get("formatSvg"),!0,mxResources.get("export"),"https://support.draw.io/display/DO/Exporting+Files",mxUtils.bind(this,function(b,c,d,e,f,g,h,k,l){b=parseInt(b);!isNaN(b)&&0<b&&a.exportSvg(b/
-100,c,d,e,f,g,h,!k,l)}),!0,null,"svg")}));a.actions.put("exportXml",new Action(mxResources.get("formatXml")+"...",function(){var b=document.createElement("div");b.style.whiteSpace="nowrap";var c=null==a.pages||1>=a.pages.length,d=document.createElement("h3");mxUtils.write(d,mxResources.get("formatXml"));d.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:4px";b.appendChild(d);var e=a.addCheckbox(b,mxResources.get("selectionOnly"),!1,f.isSelectionEmpty()),g=a.addCheckbox(b,mxResources.get(c?
+a.actions.addAction("new...",function(){var b=a.isOffline(),c=new NewDialog(a,b);a.showDialog(c.container,b?350:620,b?70:440,!0,!0,function(b){b&&null==a.getCurrentFile()&&a.showSplash()});c.init()});a.actions.put("exportSvg",new Action(mxResources.get("formatSvg")+"...",function(){a.showExportDialog(mxResources.get("formatSvg"),!0,mxResources.get("export"),"https://support.draw.io/display/DO/Exporting+Files",mxUtils.bind(this,function(b,c,d,f,e,g,h,k,l){b=parseInt(b);!isNaN(b)&&0<b&&a.exportSvg(b/
+100,c,d,f,e,g,h,!k,l)}),!0,null,"svg")}));a.actions.put("exportXml",new Action(mxResources.get("formatXml")+"...",function(){var b=document.createElement("div");b.style.whiteSpace="nowrap";var c=null==a.pages||1>=a.pages.length,d=document.createElement("h3");mxUtils.write(d,mxResources.get("formatXml"));d.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:4px";b.appendChild(d);var e=a.addCheckbox(b,mxResources.get("selectionOnly"),!1,f.isSelectionEmpty()),g=a.addCheckbox(b,mxResources.get(c?
 "compressed":"allPages"),!0);g.style.marginBottom="16px";mxEvent.addListener(e,"change",function(){e.checked?g.setAttribute("disabled","disabled"):g.removeAttribute("disabled")});b=new CustomDialog(a,b,mxUtils.bind(this,function(){a.downloadFile("xml",c?!g.checked:null,null,!e.checked,c?null:!g.checked)}),null,mxResources.get("export"));a.showDialog(b.container,300,146,!0,!0)}));a.actions.put("exportHtml",new Action(mxResources.get("formatHtmlEmbedded")+"...",function(){a.spinner.spin(document.body,
-mxResources.get("loading"))&&a.getPublicUrl(a.getCurrentFile(),function(b){a.spinner.stop();a.showHtmlDialog(mxResources.get("export"),null,b,function(b,c,d,e,f,g,h,p,k,l){a.createHtml(b,c,d,e,f,g,h,p,k,l,mxUtils.bind(this,function(b,c){var d=a.getBaseFilename(),e='\x3c!--[if IE]><meta http-equiv="X-UA-Compatible" content="IE=5,IE=9" ><![endif]--\x3e\n<!DOCTYPE html>\n<html>\n<head>\n<title>'+mxUtils.htmlEntities(d)+'</title>\n<meta charset="utf-8"/>\n</head>\n<body>'+b+"\n"+c+"\n</body>\n</html>";
+mxResources.get("loading"))&&a.getPublicUrl(a.getCurrentFile(),function(b){a.spinner.stop();a.showHtmlDialog(mxResources.get("export"),null,b,function(b,c,d,e,f,g,h,k,l,t){a.createHtml(b,c,d,e,f,g,h,k,l,t,mxUtils.bind(this,function(b,c){var d=a.getBaseFilename(),e='\x3c!--[if IE]><meta http-equiv="X-UA-Compatible" content="IE=5,IE=9" ><![endif]--\x3e\n<!DOCTYPE html>\n<html>\n<head>\n<title>'+mxUtils.htmlEntities(d)+'</title>\n<meta charset="utf-8"/>\n</head>\n<body>'+b+"\n"+c+"\n</body>\n</html>";
 a.saveData(d+".html","html",e,"text/html")}))})})}));a.actions.put("exportPdf",new Action(mxResources.get("formatPdf")+"...",function(){if(a.isOffline()||a.printPdfExport)a.showDialog((new PrintDialog(a,mxResources.get("formatPdf"))).container,360,null!=a.pages&&1<a.pages.length?420:360,!0,!0);else{var b=document.createElement("div");b.style.whiteSpace="nowrap";var c=document.createElement("h3");mxUtils.write(c,mxResources.get("formatPdf"));c.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:4px";
 b.appendChild(c);var d=a.addCheckbox(b,mxResources.get("selectionOnly"),!1,f.isSelectionEmpty()),e=a.addCheckbox(b,mxResources.get("crop"),!f.pageVisible||!a.pdfPageExport,!a.pdfPageExport);e.style.marginBottom="16px";a.pdfPageExport||mxEvent.addListener(d,"change",function(){d.checked?e.removeAttribute("disabled"):e.setAttribute("disabled","disabled")});b=new CustomDialog(a,b,mxUtils.bind(this,function(){a.downloadFile("pdf",null,null,!d.checked,null,!e.checked)}),null,mxResources.get("export"));
 a.showDialog(b.container,300,146,!0,!0)}}));a.actions.addAction("open...",function(){a.pickFile()});a.actions.addAction("close",function(){a.fileLoaded(null)});a.actions.addAction("editShape...",mxUtils.bind(this,function(){f.getSelectionCells();if(1==f.getSelectionCount()){var b=f.getSelectionCell(),c=f.view.getState(b);null!=c&&null!=c.shape&&null!=c.shape.stencil&&(b=new EditShapeDialog(a,b,mxResources.get("editShape")+":",630,400),a.showDialog(b.container,640,480,!0,!1),b.init())}}));a.actions.addAction("revisionHistory...",
@@ -6687,18 +6689,18 @@ try{for(var d=[],e=c.entries.length-1;0<=e;e--)(function(c){d.push({modifiedDate
 function(c){a.spinner.stop();for(var d=0;d<c.items.length;d++)(function(d){d.getXml=function(e,f){a.drive.executeRequest(gapi.client.drive.revisions.get({fileId:b.getId(),revisionId:c.items[c.items.length-1]===d?b.desc.headRevisionId:d.id}),function(b){a.drive.getXmlFile(b,null,function(a){e(a.getData())},function(a){f(a)})},function(a){f(a)})};d.getUrl=function(){return a.getUrl(window.location.pathname+"?rev="+d.id+"&chrome=0&edit=_blank")+window.location.hash}})(c.items[d]);d=new RevisionDialog(a,
 c.items);a.showDialog(d.container,640,480,!0,!0);d.init()},function(b){a.spinner.stop();a.handleError(b)})});a.actions.addAction("createRevision",function(){a.actions.get("save").funct()},null,null,Editor.ctrlKey+"+S");a.actions.addAction("upload...",function(){var b=a.getCurrentFile();null!=b&&(window.drawdata=a.getFileData(),b=null!=b.getTitle()?b.getTitle():a.defaultFilename,window.open(window.location.protocol+"//"+window.location.host+"/?create=drawdata&"+(a.mode==App.MODE_DROPBOX?"mode=dropbox&":
 "")+"title="+encodeURIComponent(b)))});if("undefined"!==typeof MathJax){var g=a.actions.addAction("mathematicalTypesetting",function(){a.setMathEnabled(!a.isMathEnabled())});g.setToggleAction(!0);g.setSelectedCallback(function(){return a.isMathEnabled()});g.isEnabled=k}isLocalStorage&&(g=a.actions.addAction("showStartScreen",function(){mxSettings.setShowStartScreen(!mxSettings.getShowStartScreen());mxSettings.save()}),g.setToggleAction(!0),g.setSelectedCallback(function(){return mxSettings.getShowStartScreen()}));
-var l=a.actions.addAction("autosave",function(){a.editor.setAutosave(!a.editor.autosave)});l.setToggleAction(!0);l.setSelectedCallback(function(){return l.isEnabled()&&a.editor.autosave});a.actions.addAction("editGeometry...",function(){for(var b=f.getSelectionCells(),c=[],d=0;d<b.length;d++)f.getModel().isVertex(b[d])&&c.push(b[d]);0<c.length&&(b=new EditGeometryDialog(a,c),a.showDialog(b.container,180,180,!0,!0),b.init())},null,null,Editor.ctrlKey+"+Shift+M");var q="rounded shadow dashed dashPattern fontFamily fontSize fontColor fontStyle align verticalAlign strokeColor strokeWidth fillColor gradientColor swimlaneFillColor textOpacity gradientDirection glass labelBackgroundColor labelBorderColor opacity spacing spacingTop spacingLeft spacingBottom spacingRight endFill endArrow endSize startStill startArrow startSize arcSize".split(" ");
+var l=a.actions.addAction("autosave",function(){a.editor.setAutosave(!a.editor.autosave)});l.setToggleAction(!0);l.setSelectedCallback(function(){return l.isEnabled()&&a.editor.autosave});a.actions.addAction("editGeometry...",function(){for(var b=f.getSelectionCells(),c=[],d=0;d<b.length;d++)f.getModel().isVertex(b[d])&&c.push(b[d]);0<c.length&&(b=new EditGeometryDialog(a,c),a.showDialog(b.container,180,180,!0,!0),b.init())},null,null,Editor.ctrlKey+"+Shift+M");var p="rounded shadow dashed dashPattern fontFamily fontSize fontColor fontStyle align verticalAlign strokeColor strokeWidth fillColor gradientColor swimlaneFillColor textOpacity gradientDirection glass labelBackgroundColor labelBorderColor opacity spacing spacingTop spacingLeft spacingBottom spacingRight endFill endArrow endSize startStill startArrow startSize arcSize".split(" ");
 a.actions.addAction("copyStyle",function(){var b=f.view.getState(f.getSelectionCell());if(f.isEnabled()&&null!=b){a.copiedStyle=mxUtils.clone(b.style);for(var b=f.getModel().getStyle(b.cell),b=null!=b?b.split(";"):[],c=0;c<b.length;c++){var d=b[c],e=d.indexOf("=");if(0<=e){var g=d.substring(0,e),d=d.substring(e+1);null==a.copiedStyle[g]&&"none"==d&&(a.copiedStyle[g]="none")}}}},null,null,Editor.ctrlKey+"+Shift+C");a.actions.addAction("pasteStyle",function(){if(f.isEnabled()&&!f.isSelectionEmpty()&&
-null!=a.copiedStyle){f.getModel().beginUpdate();try{for(var b=f.getSelectionCells(),c=0;c<b.length;c++)for(var d=f.view.getState(b[c]),e=0;e<q.length;e++){var g=q[e],h=a.copiedStyle[g];d.style[g]!=h&&f.setCellStyles(g,h,[b[c]])}}finally{f.getModel().endUpdate()}}},null,null,Editor.ctrlKey+"+Shift+V");a.actions.put("pageBackgroundImage",new Action(mxResources.get("backgroundImage")+"...",function(){if(!a.isOffline()){var b=new BackgroundImageDialog(a,function(b){a.setBackgroundImage(b)});a.showDialog(b.container,
+null!=a.copiedStyle){f.getModel().beginUpdate();try{for(var b=f.getSelectionCells(),c=0;c<b.length;c++)for(var d=f.view.getState(b[c]),e=0;e<p.length;e++){var g=p[e],h=a.copiedStyle[g];d.style[g]!=h&&f.setCellStyles(g,h,[b[c]])}}finally{f.getModel().endUpdate()}}},null,null,Editor.ctrlKey+"+Shift+V");a.actions.put("pageBackgroundImage",new Action(mxResources.get("backgroundImage")+"...",function(){if(!a.isOffline()){var b=new BackgroundImageDialog(a,function(b){a.setBackgroundImage(b)});a.showDialog(b.container,
 320,170,!0,!0);b.init()}}));a.actions.put("exportPng",new Action(mxResources.get("formatPng")+"...",function(){a.isExportToCanvas()?a.showExportDialog(mxResources.get("image"),!1,mxResources.get("export"),"https://support.draw.io/display/DO/Exporting+Files",mxUtils.bind(this,function(b,c,d,e,f,g,h,k,l){b=parseInt(b);!isNaN(b)&&0<b&&a.exportImage(b/100,c,d,e,f,h,!k,l)}),!0,!1,"png"):a.showRemoteExportDialog(mxResources.get("export"),null,mxUtils.bind(this,function(b,c){a.downloadFile(c?"xmlpng":"png",
-null,null,b)}))}));g=a.actions.put("shadowVisible",new Action(mxResources.get("shadow"),function(){f.setShadowVisible(!f.shadowVisible)}));g.setToggleAction(!0);g.setSelectedCallback(function(){return f.shadowVisible});var v=!1;a.actions.put("about",new Action(mxResources.get("aboutDrawio")+"...",function(){v||(a.showDialog((new AboutDialog(a)).container,220,300,!0,!0,function(){v=!1}),v=!0)},null,null,"F1"));a.actions.addAction("userManual...",function(){window.open("https://support.draw.io/display/DO/Draw.io+Online+User+Manual")});
+null,null,b)}))}));g=a.actions.put("shadowVisible",new Action(mxResources.get("shadow"),function(){f.setShadowVisible(!f.shadowVisible)}));g.setToggleAction(!0);g.setSelectedCallback(function(){return f.shadowVisible});var u=!1;a.actions.put("about",new Action(mxResources.get("aboutDrawio")+"...",function(){u||(a.showDialog((new AboutDialog(a)).container,220,300,!0,!0,function(){u=!1}),u=!0)},null,null,"F1"));a.actions.addAction("userManual...",function(){window.open("https://support.draw.io/display/DO/Draw.io+Online+User+Manual")});
 a.actions.addAction("support...",function(){window.open("https://about.draw.io/support/")});a.actions.addAction("exportOptionsDisabled...",function(){a.handleError({message:mxResources.get("exportOptionsDisabledDetails")},mxResources.get("exportOptionsDisabled"))});a.actions.addAction("keyboardShortcuts...",function(){mxClient.IS_CHROMEAPP?window.open("https://www.draw.io/shortcuts.svg"):mxClient.IS_SVG?window.open("shortcuts.svg"):window.open("https://www.draw.io/?lightbox=1#Uhttps%3A%2F%2Fwww.draw.io%2Fshortcuts.svg")});
 a.actions.addAction("feedback...",function(){var b=new FeedbackDialog(a);a.showDialog(b.container,610,360,!0,!0);b.init()});a.actions.addAction("quickStart...",function(){window.open("https://www.youtube.com/watch?v=Z0D96ZikMkc")});g=a.actions.addAction("tags...",mxUtils.bind(this,function(){null==this.tagsWindow?(this.tagsWindow=new TagsWindow(a,document.body.offsetWidth-380,230,280,120),this.tagsWindow.window.addListener("show",function(){a.fireEvent(new mxEventObject("tags"))}),this.tagsWindow.window.addListener("hide",
 function(){a.fireEvent(new mxEventObject("tags"))}),this.tagsWindow.window.setVisible(!0),a.fireEvent(new mxEventObject("tags"))):this.tagsWindow.window.setVisible(!this.tagsWindow.window.isVisible())}));g.setToggleAction(!0);g.setSelectedCallback(mxUtils.bind(this,function(){return null!=this.tagsWindow&&this.tagsWindow.window.isVisible()}));g=a.actions.addAction("find...",mxUtils.bind(this,function(){null==this.findWindow?(this.findWindow=new FindWindow(a,document.body.offsetWidth-300,110,204,140),
 this.findWindow.window.addListener("show",function(){a.fireEvent(new mxEventObject("find"))}),this.findWindow.window.addListener("hide",function(){a.fireEvent(new mxEventObject("find"))}),this.findWindow.window.setVisible(!0),a.fireEvent(new mxEventObject("find"))):this.findWindow.window.setVisible(!this.findWindow.window.isVisible())}));g.setToggleAction(!0);g.setSelectedCallback(mxUtils.bind(this,function(){return null!=this.findWindow&&this.findWindow.window.isVisible()}));a.actions.put("exportVsdx",
 new Action(mxResources.get("formatVsdx")+" (beta)...",function(){var b=mxUtils.bind(this,function(){if("undefined"!==typeof VsdxExport)try{(new VsdxExport(a)).exportCurrentDiagrams()}catch(w){}});"undefined"!==typeof VsdxExport||this.loadingVsdx||a.isOffline()?window.setTimeout(b,0):(this.loadingVsdx=!0,mxscript("js/vsdx.min.js",b))}));if(mxClient.IS_CHROMEAPP||isLocalStorage&&"1"!=urlParams.offline)if(this.put("language",new Menu(mxUtils.bind(this,function(b,c){var d=mxUtils.bind(this,function(d){var e=
-""==d?mxResources.get("automatic"):mxLanguageMap[d],f=null;""!=e&&(f=b.addItem(e,null,mxUtils.bind(this,function(){mxSettings.setLanguage(d);mxSettings.save();mxClient.language=d;mxResources.loadDefaultBundle=!1;mxResources.add(RESOURCE_BASE);a.alert(mxResources.get("restartForChangeRequired"))}),c),(d==mxLanguage||""==d&&null==mxLanguage)&&b.addCheckmark(f,Editor.checkmarkImage));return f});d("");b.addSeparator(c);for(var e in mxLanguageMap)d(e)}))),"atlas"!=uiTheme){var u=Menus.prototype.createMenubar;
-Menus.prototype.createMenubar=function(a){var b=u.apply(this,arguments);if(null!=b){var c=this.get("language");null!=c&&(c=b.addMenu("",c.funct),c.setAttribute("title",mxResources.get("language")),c.style.width="16px",c.style.paddingTop="2px",c.style.paddingLeft="4px",c.innerHTML='<div class="geIcon geSprite geSprite-globe"/>',c.style.zIndex="1",c.style.position="absolute",c.style.top="2px",c.style.right="17px",c.style.display="block",mxClient.IS_VML||mxUtils.setOpacity(c,60),document.body.appendChild(c))}return b}}this.put("help",
+""==d?mxResources.get("automatic"):mxLanguageMap[d],f=null;""!=e&&(f=b.addItem(e,null,mxUtils.bind(this,function(){mxSettings.setLanguage(d);mxSettings.save();mxClient.language=d;mxResources.loadDefaultBundle=!1;mxResources.add(RESOURCE_BASE);a.alert(mxResources.get("restartForChangeRequired"))}),c),(d==mxLanguage||""==d&&null==mxLanguage)&&b.addCheckmark(f,Editor.checkmarkImage));return f});d("");b.addSeparator(c);for(var e in mxLanguageMap)d(e)}))),"atlas"!=uiTheme){var v=Menus.prototype.createMenubar;
+Menus.prototype.createMenubar=function(a){var b=v.apply(this,arguments);if(null!=b){var c=this.get("language");null!=c&&(c=b.addMenu("",c.funct),c.setAttribute("title",mxResources.get("language")),c.style.width="16px",c.style.paddingTop="2px",c.style.paddingLeft="4px",c.innerHTML='<div class="geIcon geSprite geSprite-globe"/>',c.style.zIndex="1",c.style.position="absolute",c.style.top="2px",c.style.right="17px",c.style.display="block",mxClient.IS_VML||mxUtils.setOpacity(c,60),document.body.appendChild(c))}return b}}this.put("help",
 new Menu(mxUtils.bind(this,function(b,c){if(!mxClient.IS_CHROMEAPP&&a.isOffline())this.addMenuItems(b,["about"]);else{var d=b.addItem("Search",null,null,c,null,null,!1),e=document.createElement("div");e.style.display="inline";e.innerHTML=':<form style="display:inline;margin-left:8px;"target="_blank" method="get" action="https://desk.draw.io/support/search/solutions"><input type="text" name="term" size="25"></form>';d.firstChild.nextSibling.appendChild(e);d.style.backgroundColor="whiteSmoke";d.style.cursor=
 "default";var g=e.getElementsByTagName("form")[0],h=e.getElementsByTagName("input")[0];null!=h&&null!=g&&(mxEvent.addListener(g,"submit",function(){if(EditorUi.enableLogging)try{(new Image).src=(null!=window.DRAWIO_LOG_URL?window.DRAWIO_LOG_URL:"")+"/log?severity=CONFIG&msg=helpsearch:"+encodeURIComponent(h.value)+"&v="+encodeURIComponent(EditorUi.VERSION)}catch(z){}window.setTimeout(function(){a.menubar.hideMenu()},0)}),mxEvent.addGestureListeners(d,function(a){document.activeElement!=h&&h.focus();
 mxEvent.consume(a)},function(a){mxEvent.consume(a)},function(a){mxEvent.consume(a)}),window.setTimeout(function(){h.focus()},0));this.addMenuItems(b,["-","quickStart","userManual","keyboardShortcuts","-"]);mxClient.IS_CHROMEAPP||this.addMenuItems(b,["feedback"]);this.addMenuItems(b,["support","-","about"])}"1"==urlParams.ruler&&(mxResources.parse("rulerInch=Ruler unit: Inches"),this.editorUi.actions.addAction("rulerInch",mxUtils.bind(this,function(){this.editorUi.vRuler.setUnit(mxRuler.prototype.INCHES);
@@ -6739,11 +6741,11 @@ b&&0<b.length)return!0;a.showError(mxResources.get("error"),mxResources.get("inv
 c,mxUtils.bind(this,function(c,d){"download"==d&&(d=App.MODE_GOOGLE);null!=c&&0<c.length&&(d==App.MODE_GOOGLE?a.spinner.spin(document.body,mxResources.get("saving"))&&b.save(!1,mxUtils.bind(this,function(){b.saveAs(c,mxUtils.bind(this,function(b){a.spinner.stop();var c=a.getUrl();window.openWindow(c+"#G"+b.id,null,mxUtils.bind(this,function(){window.location.hash="G"+b.id}))}),mxUtils.bind(this,function(b){a.handleError(b)}))}),mxUtils.bind(this,function(b){a.handleError(b)})):this.editorUi.createFile(c,
 this.editorUi.getFileData(!0),null,d))}),mxUtils.bind(this,function(){a.hideDialog()}),mxResources.get("makeCopy"),mxResources.get("create"),null,null,null,null,!0),a.showDialog(c.container,420,380,!0,!0),c.init()):a.editor.editAsNew(a.getEditBlankXml(),c)}}));a.actions.addAction("moveToFolder...",mxUtils.bind(this,function(){var b=a.getCurrentFile();b.getMode()!=App.MODE_GOOGLE&&b.getMode()!=App.MODE_ONEDRIVE||a.pickFolder(b.getMode(),mxUtils.bind(this,function(c){a.spinner.spin(document.body,mxResources.get("moving"))&&
 b.move(c,mxUtils.bind(this,function(b){a.spinner.stop()}),mxUtils.bind(this,function(b){a.handleError(b)}))}))}));this.put("publish",new Menu(mxUtils.bind(this,function(a,b){this.addMenuItems(a,["publishLink"],b)})));a.actions.put("offline",new Action(mxResources.get("offline")+"...",function(){window.open("https://www.draw.io/app")}));a.actions.put("download",new Action(mxResources.get("download")+"...",function(){window.open("https://download.draw.io")}));this.editorUi.actions.addAction("share...",
-mxUtils.bind(this,function(){var a=this.editorUi.getCurrentFile();null!=a&&this.editorUi.drive.showPermissions(a.getId())}));this.put("embed",new Menu(mxUtils.bind(this,function(b,c){"1"==urlParams.test&&this.addMenuItems(b,["liveImage","-"],c);this.addMenuItems(b,["embedImage","embedSvg","-","embedHtml"],c);navigator.standalone||a.isOffline()||this.addMenuItems(b,["embedIframe"],c);a.isOffline()||this.addMenuItems(b,["-","googleSites","googleDocs"],c)})));var t="horizontalFlow verticalFlow - horizontalTree verticalTree - organic circle - fromText".split(" "),
-y=function(b,c,d,e){b.addItem(d,null,mxUtils.bind(this,function(){if("fromText"==e){var b=new ParseDialog(a,d);a.showDialog(b.container,620,420,!0,!1);a.dialog.container.style.overflow="auto"}else b=new CreateGraphDialog(a,d,e),a.showDialog(b.container,620,420,!0,!1);b.init()}),c)},x=function(a,b,c,d){var e=f.isMouseInsertPoint()?f.getInsertPoint():f.getFreeInsertPoint();a=new mxCell(a,new mxGeometry(e.x,e.y,b,c),d);a.vertex=!0;f.getModel().beginUpdate();try{a=f.addCell(a),f.fireEvent(new mxEventObject("cellsInserted",
-"cells",[a]))}finally{f.getModel().endUpdate()}f.setSelectionCell(a);f.scrollCellToVisible(a);return a};a.actions.addAction("insertText",function(){f.isEnabled()&&!f.isCellLocked(f.getDefaultParent())&&f.startEditingAtCell(x("Text",40,20,"text;html=1;resizable=0;autosize=1;align=left;verticalAlign=top;spacingTop=-4;points=[];"))},null,null,Editor.ctrlKey+"+Shift+X").isEnabled=k;a.actions.addAction("insertRectangle",function(){f.isEnabled()&&!f.isCellLocked(f.getDefaultParent())&&x("",120,60,"whiteSpace=wrap;html=1;")},
-null,null,Editor.ctrlKey+"+K").isEnabled=k;a.actions.addAction("insertEllipse",function(){f.isEnabled()&&!f.isCellLocked(f.getDefaultParent())&&x("",80,80,"ellipse;whiteSpace=wrap;html=1;")},null,null,Editor.ctrlKey+"+Shift+K").isEnabled=k;this.put("insert",new Menu(mxUtils.bind(this,function(a,b){this.addMenuItems(a,"insertText insertRectangle insertEllipse - insertLink insertImage".split(" "),b);a.addSeparator(b);for(var c=0;c<t.length;c++)"-"==t[c]?a.addSeparator(b):y(a,b,mxResources.get(t[c])+
-"...",t[c])})));this.put("openRecent",new Menu(function(b,c){var d=a.getRecent();if(null!=d){for(var e=0;e<d.length;e++)(function(d){var e=d.mode;e==App.MODE_GOOGLE?e="googleDrive":e==App.MODE_ONEDRIVE&&(e="oneDrive");b.addItem(d.title+" ("+mxResources.get(e)+")",null,function(){a.loadFile(d.id)},c)})(d[e]);b.addSeparator(c)}b.addItem(mxResources.get("reset"),null,function(){a.resetRecent()},c)}));this.put("openFrom",new Menu(function(c,d){null!=a.drive?c.addItem(mxResources.get("googleDrive")+"...",
+mxUtils.bind(this,function(){var a=this.editorUi.getCurrentFile();null!=a&&this.editorUi.drive.showPermissions(a.getId())}));this.put("embed",new Menu(mxUtils.bind(this,function(b,c){"1"==urlParams.test&&this.addMenuItems(b,["liveImage","-"],c);this.addMenuItems(b,["embedImage","embedSvg","-","embedHtml"],c);navigator.standalone||a.isOffline()||this.addMenuItems(b,["embedIframe"],c);a.isOffline()||this.addMenuItems(b,["-","googleSites","googleDocs"],c)})));var q="horizontalFlow verticalFlow - horizontalTree verticalTree - organic circle - fromText".split(" "),
+x=function(b,c,d,e){b.addItem(d,null,mxUtils.bind(this,function(){if("fromText"==e){var b=new ParseDialog(a,d);a.showDialog(b.container,620,420,!0,!1);a.dialog.container.style.overflow="auto"}else b=new CreateGraphDialog(a,d,e),a.showDialog(b.container,620,420,!0,!1);b.init()}),c)},y=function(a,b,c,d){var e=f.isMouseInsertPoint()?f.getInsertPoint():f.getFreeInsertPoint();a=new mxCell(a,new mxGeometry(e.x,e.y,b,c),d);a.vertex=!0;f.getModel().beginUpdate();try{a=f.addCell(a),f.fireEvent(new mxEventObject("cellsInserted",
+"cells",[a]))}finally{f.getModel().endUpdate()}f.setSelectionCell(a);f.scrollCellToVisible(a);return a};a.actions.addAction("insertText",function(){f.isEnabled()&&!f.isCellLocked(f.getDefaultParent())&&f.startEditingAtCell(y("Text",40,20,"text;html=1;resizable=0;autosize=1;align=left;verticalAlign=top;spacingTop=-4;points=[];"))},null,null,Editor.ctrlKey+"+Shift+X").isEnabled=k;a.actions.addAction("insertRectangle",function(){f.isEnabled()&&!f.isCellLocked(f.getDefaultParent())&&y("",120,60,"whiteSpace=wrap;html=1;")},
+null,null,Editor.ctrlKey+"+K").isEnabled=k;a.actions.addAction("insertEllipse",function(){f.isEnabled()&&!f.isCellLocked(f.getDefaultParent())&&y("",80,80,"ellipse;whiteSpace=wrap;html=1;")},null,null,Editor.ctrlKey+"+Shift+K").isEnabled=k;this.put("insert",new Menu(mxUtils.bind(this,function(a,b){this.addMenuItems(a,"insertText insertRectangle insertEllipse - insertLink insertImage".split(" "),b);a.addSeparator(b);for(var c=0;c<q.length;c++)"-"==q[c]?a.addSeparator(b):x(a,b,mxResources.get(q[c])+
+"...",q[c])})));this.put("openRecent",new Menu(function(b,c){var d=a.getRecent();if(null!=d){for(var e=0;e<d.length;e++)(function(d){var e=d.mode;e==App.MODE_GOOGLE?e="googleDrive":e==App.MODE_ONEDRIVE&&(e="oneDrive");b.addItem(d.title+" ("+mxResources.get(e)+")",null,function(){a.loadFile(d.id)},c)})(d[e]);b.addSeparator(c)}b.addItem(mxResources.get("reset"),null,function(){a.resetRecent()},c)}));this.put("openFrom",new Menu(function(c,d){null!=a.drive?c.addItem(mxResources.get("googleDrive")+"...",
 null,function(){a.pickFile(App.MODE_GOOGLE)},d):m&&c.addItem(mxResources.get("googleDrive")+" ("+mxResources.get("loading")+"...)",null,function(){},d,null,!1);null!=a.gitHub&&c.addItem(mxResources.get("github")+"...",null,function(){a.pickFile(App.MODE_GITHUB)},d);null!=a.dropbox?c.addItem(mxResources.get("dropbox")+"...",null,function(){a.pickFile(App.MODE_DROPBOX)},d):n&&c.addItem(mxResources.get("dropbox")+" ("+mxResources.get("loading")+"...)",null,function(){},d,null,!1);null!=a.oneDrive?c.addItem(mxResources.get("oneDrive")+
 "...",null,function(){a.pickFile(App.MODE_ONEDRIVE)},d):b&&c.addItem(mxResources.get("oneDrive")+" ("+mxResources.get("loading")+"...)",null,function(){},d,null,!1);null!=a.trello?c.addItem(mxResources.get("trello")+"...",null,function(){a.pickFile(App.MODE_TRELLO)},d):e&&c.addItem(mxResources.get("trello")+" ("+mxResources.get("loading")+"...)",null,function(){},d,null,!1);c.addSeparator(d);isLocalStorage&&"0"!=urlParams.browser&&c.addItem(mxResources.get("browser")+"...",null,function(){a.pickFile(App.MODE_BROWSER)},
 d);mxClient.IS_IOS||c.addItem(mxResources.get("device")+"...",null,function(){a.pickFile(App.MODE_DEVICE)},d);a.isOffline()||(c.addSeparator(d),c.addItem(mxResources.get("url")+"...",null,function(){var b=new FilenameDialog(a,"",mxResources.get("open"),function(b){null!=b&&0<b.length&&(null==a.getCurrentFile()?window.location.hash="#U"+encodeURIComponent(b):window.openWindow((mxClient.IS_CHROMEAPP?"https://www.draw.io/":"https://"+location.host+"/")+window.location.search+"#U"+encodeURIComponent(b)))},
@@ -6809,39 +6811,39 @@ this.hideCurrentMenu();if(!mxEvent.isTouchEvent(k)||!c){var m=new mxPopupMenu(th
 EditorUi.prototype.createPageMenu=function(a,d){return mxUtils.bind(this,function(f,c){f.addItem(mxResources.get("insert"),null,mxUtils.bind(this,function(){this.insertPage(null,mxUtils.indexOf(this.pages,a)+1)}),c);f.addItem(mxResources.get("delete"),null,mxUtils.bind(this,function(){this.removePage(a)}),c);f.addItem(mxResources.get("rename"),null,mxUtils.bind(this,function(){this.renamePage(a,d)}),c);f.addSeparator(c);f.addItem(mxResources.get("duplicate"),null,mxUtils.bind(this,function(){this.duplicatePage(a,
 mxResources.get("copyOf",[a.getName()]))}),c)})};(function(){var a=mxClient.IS_SVG?"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADQAAAA0CAMAAADypuvZAAAAhFBMVEUAAAD///8KCgpNTU24uLgBAQEBAQEMDAxFRUWEhIQBAQEBAQEBAQEAAAAVFRXAwMBYWFgBAQEBAQEAAAAAAAAAAAAAAAAAAAABAQEBAQEAAAAAAAAAAAABAQEBAQEAAAAAAAASEhLAwMC+vr4BAQEBAQEAAAAAAAAAAAABAQEAAAD///+vipwtAAAAKnRSTlMA/Prw9f7A+fHq1uvFOfPv7+TOmkUyCwb3kT9UT+yPLAL49PTbkmloKvYw/P7BAAABe0lEQVRIx52W63LCIBBGwRhUkFxNYtTEa9Xi+79fR9KxrgtY9/xjMmcIH5ddhmmqSylk3nW5FOWlath7dCsNQLY6bOzWwjgQ64CzmhsPYuVR6jY2XuK2djnbwgQptthZKPMGtXh1NkvzluXmZR7geC0w17YziNHIILrrU26FwzkeHVbxl+GXwxnfbmOH1T72NHY6Tiv+3eXd3Ol4rPnOSmv0YWIda03QxyF3NNE+5XxwOE/3aCp7F9CKkiyacevMoixBq9JDdJjpIE2NcQbYnIyDaJAi4+DUsCqGGSRYSmAaccXOMOs0w1KWwuTPrIT7w6dwTcMA7lfJBHDugd2x6T0NgCWYfDkH3GKdpwGwJMuB4wFaOVOP3A63IIdHhookkX6PFAQpctLmko4R6cCSrgbtEjJtCNed8LAQnjDSY0l4ljWhAPT0UmO5/rOoqSulfH5eqL83lJaA1nxg6j7U5vS1r6ESgYbKj7d1C6N7Cf9L9joogHZUKW87+gMYYTZWVGas2QAAAABJRU5ErkJggg==":
 IMAGE_PATH+"/move.png",d=Graph.prototype.foldCells;Graph.prototype.foldCells=function(a,c,f,n,b){c=null!=c?c:!1;null==f&&(f=this.getFoldableCells(this.getSelectionCells(),a));this.stopEditing();this.model.beginUpdate();try{for(var e=f.slice(),g=[],h=0;h<f.length;h++){var k=this.view.getState(f[h]),m=null!=k?k.style:this.getCellStyle(f[h]);"1"==mxUtils.getValue(m,"treeFolding","0")&&(this.traverse(f[h],!0,mxUtils.bind(this,function(a,b){null!=b&&g.push(b);a!=f[h]&&g.push(a);return a==f[h]||!this.model.isCollapsed(a)})),
-this.model.setCollapsed(f[h],a))}for(h=0;h<g.length;h++)this.model.setVisible(g[h],!a);f=e;f=d.apply(this,arguments)}finally{this.model.endUpdate()}return f};var f=EditorUi.prototype.init;EditorUi.prototype.init=function(){f.apply(this,arguments);this.editor.chromeless||this.addTrees()};EditorUi.prototype.addTrees=function(){function c(a){return y.isVertex(a)&&d(a)}function d(a){var b=!1;null!=a&&(a=y.getParent(a),b=t.view.getState(a),t.view.getState(a),b="tree"==(null!=b?b.style:t.getCellStyle(a)).containerType);
-return b}function f(a){var b=!1;null!=a&&(a=y.getParent(a),b=t.view.getState(a),t.view.getState(a),b=null!=(null!=b?b.style:t.getCellStyle(a)).childLayout);return b}function n(a){a=t.view.getState(a);if(null!=a){var b=t.getIncomingEdges(a.cell);if(0<b.length&&(b=t.view.getState(b[0]),null!=b&&(b=b.absolutePoints,null!=b&&0<b.length&&(b=b[b.length-1],null!=b)))){if(b.y==a.y&&Math.abs(b.x-a.getCenterX())<a.width/2)return mxConstants.DIRECTION_SOUTH;if(b.y==a.y+a.height&&Math.abs(b.x-a.getCenterX())<
-a.width/2)return mxConstants.DIRECTION_NORTH;if(b.x>a.getCenterX())return mxConstants.DIRECTION_WEST}}return mxConstants.DIRECTION_EAST}function b(a,b){b=null!=b?b:!0;t.model.beginUpdate();try{var c=t.model.getParent(a),d=t.getIncomingEdges(a),e=t.cloneCells([d[0],a]);t.model.setTerminal(e[0],t.model.getTerminal(d[0],!0),!0);var f=n(a),g=c.geometry;f==mxConstants.DIRECTION_SOUTH||f==mxConstants.DIRECTION_NORTH?e[1].geometry.x+=b?a.geometry.width+10:-e[1].geometry.width-10:e[1].geometry.y+=b?a.geometry.height+
-10:-e[1].geometry.height-10;f==mxConstants.DIRECTION_WEST&&(e[1].geometry.x=a.geometry.x+a.geometry.width-e[1].geometry.width);t.view.currentRoot!=c&&(e[1].geometry.x-=g.x,e[1].geometry.y-=g.y);var h=t.view.getState(a),k=t.view.scale;if(null!=h){var l=mxRectangle.fromRectangle(h);f==mxConstants.DIRECTION_SOUTH||f==mxConstants.DIRECTION_NORTH?l.x+=(b?a.geometry.width+10:-e[1].geometry.width-10)*k:l.y+=(b?a.geometry.height+10:-e[1].geometry.height-10)*k;var m=t.getOutgoingEdges(t.model.getTerminal(d[0],
-!0));if(null!=m){for(var p=f==mxConstants.DIRECTION_SOUTH||f==mxConstants.DIRECTION_NORTH,q=g=d=0;q<m.length;q++){var A=t.model.getTerminal(m[q],!1);if(f==n(A)){var u=t.view.getState(A);A!=a&&null!=u&&(p&&b!=u.getCenterX()<h.getCenterX()||!p&&b!=u.getCenterY()<h.getCenterY())&&mxUtils.intersects(l,u)&&(d=10+Math.max(d,(Math.min(l.x+l.width,u.x+u.width)-Math.max(l.x,u.x))/k),g=10+Math.max(g,(Math.min(l.y+l.height,u.y+u.height)-Math.max(l.y,u.y))/k))}}p?g=0:d=0;for(q=0;q<m.length;q++)if(A=t.model.getTerminal(m[q],
-!1),f==n(A)&&(u=t.view.getState(A),A!=a&&null!=u&&(p&&b!=u.getCenterX()<h.getCenterX()||!p&&b!=u.getCenterY()<h.getCenterY()))){var v=[];t.traverse(u.cell,!0,function(a,b){null!=b&&v.push(b);v.push(a);return!0});t.moveCells(v,(b?1:-1)*d,(b?1:-1)*g)}}}return t.addCells(e,c)}finally{t.model.endUpdate()}}function e(a){t.model.beginUpdate();try{var b=n(a),c=t.getIncomingEdges(a),d=t.cloneCells([c[0],a]);t.model.setTerminal(c[0],d[1],!1);t.model.setTerminal(d[0],d[1],!0);t.model.setTerminal(d[0],a,!1);
-var e=t.model.getParent(a),f=e.geometry,g=[];t.view.currentRoot!=e&&(d[1].geometry.x-=f.x,d[1].geometry.y-=f.y);t.traverse(a,!0,function(a,b){null!=b&&g.push(b);g.push(a);return!0});var h=a.geometry.width+40,k=a.geometry.height+40;b==mxConstants.DIRECTION_SOUTH?h=0:b==mxConstants.DIRECTION_NORTH?(h=0,k=-40):b==mxConstants.DIRECTION_WEST?(h=-40,k=0):b==mxConstants.DIRECTION_EAST&&(k=0);t.moveCells(g,h,k);return t.addCells(d,e)}finally{t.model.endUpdate()}}function g(a){t.model.beginUpdate();try{var b=
-t.model.getParent(a),c=t.getIncomingEdges(a),d=t.cloneCells([c[0],a]);t.model.setTerminal(d[0],a,!0);var c=t.getOutgoingEdges(a),e=b.geometry,f=[];t.view.currentRoot==b&&(e=new mxRectangle);for(var g=0;g<c.length;g++){var h=t.model.getTerminal(c[g],!1);null!=h&&f.push(h)}var k=t.view.getBounds(f),l=n(a),m=t.view.translate,p=t.view.scale;l==mxConstants.DIRECTION_SOUTH?(d[1].geometry.x=null==k?a.geometry.x+(a.geometry.width-d[1].geometry.width)/2:(k.x+k.width)/p-m.x-e.x+10,d[1].geometry.y+=a.geometry.height-
-e.y+40):l==mxConstants.DIRECTION_NORTH?(d[1].geometry.x=null==k?a.geometry.x+(a.geometry.width-d[1].geometry.width)/2:(k.x+k.width)/p-m.x+-e.x+10,d[1].geometry.y-=d[1].geometry.height-e.y+40):(d[1].geometry.x=l==mxConstants.DIRECTION_WEST?d[1].geometry.x-(d[1].geometry.width-e.x+40):d[1].geometry.x+(a.geometry.width-e.x+40),d[1].geometry.y=null==k?a.geometry.y+(a.geometry.height-d[1].geometry.height)/2:(k.y+k.height)/p-m.y+-e.y+10);return t.addCells(d,b)}finally{t.model.endUpdate()}}function l(a,
-b,c){a=t.getOutgoingEdges(a);c=t.view.getState(c);var d=[];if(null!=c&&null!=a){for(var e=0;e<a.length;e++){var f=t.view.getState(t.model.getTerminal(a[e],!1));null!=f&&(!b&&Math.min(f.x+f.width,c.x+c.width)>=Math.max(f.x,c.x)||b&&Math.min(f.y+f.height,c.y+c.height)>=Math.max(f.y,c.y))&&d.push(f)}d.sort(function(a,c){return b?a.x+a.width-c.x-c.width:a.y+a.height-c.y-c.height})}return d}function q(a,b){var c=n(a),d=b==mxConstants.DIRECTION_EAST||b==mxConstants.DIRECTION_WEST;(c==mxConstants.DIRECTION_EAST||
-c==mxConstants.DIRECTION_WEST)==d&&c!=b?u.actions.get("selectParent").funct():c==b?(d=t.getOutgoingEdges(a),null!=d&&0<d.length&&t.setSelectionCell(t.model.getTerminal(d[0],!1))):(c=t.getIncomingEdges(a),null!=c&&0<c.length&&(d=l(t.model.getTerminal(c[0],!0),d,a),c=t.view.getState(a),null!=c&&(c=mxUtils.indexOf(d,c),0<=c&&(c+=b==mxConstants.DIRECTION_NORTH||b==mxConstants.DIRECTION_WEST?-1:1,0<=c&&c<=d.length-1&&t.setSelectionCell(d[c].cell)))))}function v(b){this.images=[];var c=b.view.graph,d=mxUtils.createImage(a);
-d.setAttribute("title","Move Cell without Subtree");d.style.position="absolute";d.style.cursor="pointer";d.style.width="26px";d.style.height="26px";d.style.left=b.getCenterX()-13+"px";d.style.top=b.getCenterY()-13+"px";mxEvent.addGestureListeners(d,mxUtils.bind(this,function(a){c.stopEditing(!1);u.hoverIcons.reset();c.isCellSelected(b.cell)||c.setSelectionCell(b.cell);c.graphHandler.start(b.cell,mxEvent.getClientX(a),mxEvent.getClientY(a));c.graphHandler.cells=[b.cell];c.graphHandler.bounds=c.graphHandler.graph.getView().getBounds(c.graphHandler.cells);
-c.graphHandler.pBounds=c.graphHandler.getPreviewBounds(c.graphHandler.cells);c.graphHandler.cellWasClicked=!0;c.isMouseDown=!0;c.isMouseTrigger=mxEvent.isMouseEvent(a);mxEvent.consume(a);mxEvent.consume(a);this.destroy()}));b.view.graph.container.appendChild(d);this.images.push(d)}var u=this,t=u.editor.graph,y=t.getModel();mxResources.parse("selectChildren=Select Children");mxResources.parse("selectSiblings=Select Siblings");mxResources.parse("selectSubtree=Select Subtree");mxResources.parse("selectParent=Select Parent");
-var x=u.menus.createPopupMenu;u.menus.createPopupMenu=function(a,b,d){x.apply(this,arguments);if(c(t.getSelectionCell())&&1==t.getSelectionCount()){b=t.getSelectionCell();var e=t.getOutgoingEdges(b);a.addSeparator();null!=e&&0<e.length&&this.addMenuItems(a,["selectChildren","selectSubtree"],null,d);a.addSeparator();0<t.getIncomingEdges(b).length&&this.addMenuItems(a,["selectSiblings","selectParent"],null,d)}};u.actions.addAction("selectChildren",function(){if(t.isEnabled()&&1==t.getSelectionCount()){var a=
-t.getSelectionCell(),a=t.getOutgoingEdges(a);if(null!=a){for(var b=[],c=0;c<a.length;c++)b.push(t.model.getTerminal(a[c],!1));t.setSelectionCells(b)}}},null,null,"Alt+Shift+X");u.actions.addAction("selectSiblings",function(){if(t.isEnabled()&&1==t.getSelectionCount()){var a=t.getSelectionCell(),a=t.getIncomingEdges(a);if(null!=a&&0<a.length&&(a=t.getOutgoingEdges(t.model.getTerminal(a[0],!0)),null!=a)){for(var b=[],c=0;c<a.length;c++)b.push(t.model.getTerminal(a[c],!1));t.setSelectionCells(b)}}},
-null,null,"Alt+Shift+S");u.actions.addAction("selectParent",function(){if(t.isEnabled()&&1==t.getSelectionCount()){var a=t.getSelectionCell(),a=t.getIncomingEdges(a);null!=a&&0<a.length&&t.setSelectionCell(t.model.getTerminal(a[0],!0))}},null,null,"Alt+Shift+P");u.actions.addAction("selectSubtree",function(){if(t.isEnabled()&&1==t.getSelectionCount()){var a=t.getSelectionCell(),b=[];t.traverse(a,!0,function(a,c){null!=c&&b.push(c);b.push(a);return!0});t.setSelectionCells(b)}},null,null,"Alt+Shift+T");
-var p=t.removeCells;t.removeCells=function(a,b){b=null!=b?b:!0;null==a&&(a=this.getDeletableCells(this.getSelectionCells()));b&&(a=this.getDeletableCells(this.addAllEdges(a)));for(var e=[],f=0;f<a.length;f++){var g=a[f];y.isEdge(g)&&d(g)&&(e.push(g),g=y.getTerminal(g,!1));c(g)?(t.traverse(g,!0,function(a,b){null!=b&&e.push(b);e.push(a);return!0}),g=t.getIncomingEdges(a[f]),a=a.concat(g)):e.push(a[f])}a=e;return p.apply(this,arguments)};u.hoverIcons.getStateAt=function(a,b,d){return c(a.cell)?null:
-this.graph.view.getState(this.graph.getCellAt(b,d))};var w=t.duplicateCells;t.duplicateCells=function(a,b){a=null!=a?a:this.getSelectionCells();for(var d=a.slice(0),e=0;e<d.length;e++){var f=t.view.getState(d[e]);if(null!=f&&c(f.cell))for(var g=t.getIncomingEdges(f.cell),f=0;f<g.length;f++)mxUtils.remove(g[f],a)}this.model.beginUpdate();try{var h=w.call(this,a,b);if(h.length==a.length)for(e=0;e<a.length;e++)if(c(a[e])){var k=t.getIncomingEdges(h[e]),g=t.getIncomingEdges(a[e]);if(0==k.length&&0<g.length){var l=
-this.cloneCells([g[0]])[0];this.addEdge(l,t.getDefaultParent(),this.model.getTerminal(g[0],!0),h[e])}}}finally{this.model.endUpdate()}return h};var C=t.moveCells;t.moveCells=function(a,b,d,e,f,g,h){var k=null;this.model.beginUpdate();try{var l=f,m=this.view.getState(f),n=null!=m?m.style:this.getCellStyle(f);if(null!=a&&c(f)&&"1"==mxUtils.getValue(n,"treeFolding","0")){for(var p=0;p<a.length;p++)if(c(a[p])||t.model.isEdge(a[p])&&null==t.model.getTerminal(a[p],!0)){f=t.model.getParent(a[p]);break}if(null!=
-l&&f!=l&&null!=this.view.getState(a[0])){var q=t.getIncomingEdges(a[0]);if(0<q.length){var u=t.view.getState(t.model.getTerminal(q[0],!0));if(null!=u){var v=t.view.getState(l);null!=v&&(b=(v.getCenterX()-u.getCenterX())/t.view.scale,d=(v.getCenterY()-u.getCenterY())/t.view.scale)}}}}k=C.apply(this,arguments);if(null!=k&&null!=a&&k.length==a.length)for(p=0;p<k.length;p++)if(this.model.isEdge(k[p]))c(l)&&0>mxUtils.indexOf(k,this.model.getTerminal(k[p],!0))&&this.model.setTerminal(k[p],l,!0);else if(c(a[p])&&
-(q=t.getIncomingEdges(a[p]),0<q.length))if(!e)c(l)&&0>mxUtils.indexOf(a,this.model.getTerminal(q[0],!0))&&this.model.setTerminal(q[0],l,!0);else if(0==t.getIncomingEdges(k[p]).length){m=l;if(null==m||m==t.model.getParent(a[p]))m=t.model.getTerminal(q[0],!0);e=this.cloneCells([q[0]])[0];this.addEdge(e,t.getDefaultParent(),m,k[p])}}finally{this.model.endUpdate()}return k};var F=u.sidebar.dropAndConnect;u.sidebar.dropAndConnect=function(a,b,d,e){var f=t.model,g=null;f.beginUpdate();try{if(g=F.apply(this,
-arguments),c(a))for(var h=0;h<g.length;h++)if(f.isEdge(g[h])&&null==f.getTerminal(g[h],!0)){f.setTerminal(g[h],a,!0);var k=t.getCellGeometry(g[h]);k.points=null;null!=k.getTerminalPoint(!0)&&k.setTerminalPoint(null,!0)}}finally{f.endUpdate()}return g};var B={88:u.actions.get("selectChildren"),84:u.actions.get("selectSubtree"),80:u.actions.get("selectParent"),83:u.actions.get("selectSiblings")},G=u.onKeyDown;u.onKeyDown=function(a){try{if(t.isEnabled()&&!t.isEditing()&&c(t.getSelectionCell())&&1==
-t.getSelectionCount()){var d=null;0<t.getIncomingEdges(t.getSelectionCell()).length&&(9==a.which?d=mxEvent.isShiftDown(a)?e(t.getSelectionCell()):g(t.getSelectionCell()):13==a.which&&(d=b(t.getSelectionCell(),!mxEvent.isShiftDown(a))));if(null!=d&&0<d.length)1==d.length&&t.model.isEdge(d[0])?t.setSelectionCell(t.model.getTerminal(d[0],!1)):t.setSelectionCell(d[d.length-1]),null!=u.hoverIcons&&u.hoverIcons.update(t.view.getState(t.getSelectionCell())),t.startEditingAtCell(t.getSelectionCell()),mxEvent.consume(a);
-else if(mxEvent.isAltDown(a)&&mxEvent.isShiftDown(a)){var f=B[a.keyCode];null!=f&&(f.funct(a),mxEvent.consume(a))}else 37==a.keyCode?(q(t.getSelectionCell(),mxConstants.DIRECTION_WEST),mxEvent.consume(a)):38==a.keyCode?(q(t.getSelectionCell(),mxConstants.DIRECTION_NORTH),mxEvent.consume(a)):39==a.keyCode?(q(t.getSelectionCell(),mxConstants.DIRECTION_EAST),mxEvent.consume(a)):40==a.keyCode&&(q(t.getSelectionCell(),mxConstants.DIRECTION_SOUTH),mxEvent.consume(a))}}catch(I){console.log("error",I)}mxEvent.isConsumed(a)||
-G.apply(this,arguments)};var z=t.connectVertex;t.connectVertex=function(a,d,f,h,k,l){var m=t.getIncomingEdges(a);if(c(a)&&0<m.length)return f=n(a),h=f==mxConstants.DIRECTION_EAST||f==mxConstants.DIRECTION_WEST,k=d==mxConstants.DIRECTION_EAST||d==mxConstants.DIRECTION_WEST,f==d?g(a):h==k?e(a):b(a,d!=mxConstants.DIRECTION_NORTH&&d!=mxConstants.DIRECTION_WEST);this.model.beginUpdate();try{var p=z.call(this,a,d,f,h,k,l||0==m.length)}finally{this.model.endUpdate()}return p};var D=t.graphHandler.getCells;
-t.graphHandler.getCells=function(a){for(var b=D.apply(this,arguments),d=b.slice(0),e=0;e<d.length;e++)if(c(d[e]))for(var g=t.getIncomingEdges(d[e]),h=0;h<g.length;h++)mxUtils.remove(g[h],b);for(e=0;e<d.length;e++)g=b[e],c(g)&&!f(g)&&t.traverse(g,!0,function(a,c){null!=c&&0>mxUtils.indexOf(b,c)&&b.push(c);0>mxUtils.indexOf(b,a)&&b.push(a);return!0});return b};v.prototype.destroy=function(){if(null!=this.images)for(var a=0;a<this.images.length;a++){var b=this.images[a];b.parentNode.removeChild(b)}this.images=
-null};t.addMouseListener({currentState:null,currentIconSet:null,mouseDown:function(a,b){null!=this.currentState&&(this.dragLeave(b.getEvent(),this.currentState),this.currentState=null)},mouseMove:function(a,b){if(null!=this.currentState&&(b.getState()==this.currentState||null==b.getState())){var d=new mxRectangle(b.getGraphX()-20,b.getGraphY()-20,40,40);if(mxUtils.intersects(d,this.currentState))return}d=b.getState();if(t.isMouseDown&&!mxEvent.isTouchEvent(b.getEvent())||t.isEditing()||null!=d&&(!t.getModel().isVertex(d.cell)||
-!c(b.getCell())||f(d.cell)))d=null;d!=this.currentState&&(null!=this.currentState&&this.dragLeave(b.getEvent(),this.currentState),this.currentState=d,null!=this.currentState&&this.dragEnter(b.getEvent(),this.currentState))},mouseUp:function(a,b){},dragEnter:function(a,b){null==this.currentIconSet&&(this.currentIconSet=new v(b))},dragLeave:function(a,b){null!=this.currentIconSet&&(this.currentIconSet.destroy(),this.currentIconSet=null)}})};if("undefined"!==typeof Sidebar){var c=Sidebar.prototype.createAdvancedShapes;
+this.model.setCollapsed(f[h],a))}for(h=0;h<g.length;h++)this.model.setVisible(g[h],!a);f=e;f=d.apply(this,arguments)}finally{this.model.endUpdate()}return f};var f=EditorUi.prototype.init;EditorUi.prototype.init=function(){f.apply(this,arguments);this.editor.chromeless||this.addTrees()};EditorUi.prototype.addTrees=function(){function c(a){return x.isVertex(a)&&d(a)}function d(a){var b=!1;null!=a&&(a=x.getParent(a),b=q.view.getState(a),q.view.getState(a),b="tree"==(null!=b?b.style:q.getCellStyle(a)).containerType);
+return b}function f(a){var b=!1;null!=a&&(a=x.getParent(a),b=q.view.getState(a),q.view.getState(a),b=null!=(null!=b?b.style:q.getCellStyle(a)).childLayout);return b}function n(a){a=q.view.getState(a);if(null!=a){var b=q.getIncomingEdges(a.cell);if(0<b.length&&(b=q.view.getState(b[0]),null!=b&&(b=b.absolutePoints,null!=b&&0<b.length&&(b=b[b.length-1],null!=b)))){if(b.y==a.y&&Math.abs(b.x-a.getCenterX())<a.width/2)return mxConstants.DIRECTION_SOUTH;if(b.y==a.y+a.height&&Math.abs(b.x-a.getCenterX())<
+a.width/2)return mxConstants.DIRECTION_NORTH;if(b.x>a.getCenterX())return mxConstants.DIRECTION_WEST}}return mxConstants.DIRECTION_EAST}function b(a,b){b=null!=b?b:!0;q.model.beginUpdate();try{var c=q.model.getParent(a),d=q.getIncomingEdges(a),e=q.cloneCells([d[0],a]);q.model.setTerminal(e[0],q.model.getTerminal(d[0],!0),!0);var f=n(a),g=c.geometry;f==mxConstants.DIRECTION_SOUTH||f==mxConstants.DIRECTION_NORTH?e[1].geometry.x+=b?a.geometry.width+10:-e[1].geometry.width-10:e[1].geometry.y+=b?a.geometry.height+
+10:-e[1].geometry.height-10;f==mxConstants.DIRECTION_WEST&&(e[1].geometry.x=a.geometry.x+a.geometry.width-e[1].geometry.width);q.view.currentRoot!=c&&(e[1].geometry.x-=g.x,e[1].geometry.y-=g.y);var h=q.view.getState(a),k=q.view.scale;if(null!=h){var l=mxRectangle.fromRectangle(h);f==mxConstants.DIRECTION_SOUTH||f==mxConstants.DIRECTION_NORTH?l.x+=(b?a.geometry.width+10:-e[1].geometry.width-10)*k:l.y+=(b?a.geometry.height+10:-e[1].geometry.height-10)*k;var m=q.getOutgoingEdges(q.model.getTerminal(d[0],
+!0));if(null!=m){for(var p=f==mxConstants.DIRECTION_SOUTH||f==mxConstants.DIRECTION_NORTH,t=g=d=0;t<m.length;t++){var A=q.model.getTerminal(m[t],!1);if(f==n(A)){var u=q.view.getState(A);A!=a&&null!=u&&(p&&b!=u.getCenterX()<h.getCenterX()||!p&&b!=u.getCenterY()<h.getCenterY())&&mxUtils.intersects(l,u)&&(d=10+Math.max(d,(Math.min(l.x+l.width,u.x+u.width)-Math.max(l.x,u.x))/k),g=10+Math.max(g,(Math.min(l.y+l.height,u.y+u.height)-Math.max(l.y,u.y))/k))}}p?g=0:d=0;for(t=0;t<m.length;t++)if(A=q.model.getTerminal(m[t],
+!1),f==n(A)&&(u=q.view.getState(A),A!=a&&null!=u&&(p&&b!=u.getCenterX()<h.getCenterX()||!p&&b!=u.getCenterY()<h.getCenterY()))){var v=[];q.traverse(u.cell,!0,function(a,b){null!=b&&v.push(b);v.push(a);return!0});q.moveCells(v,(b?1:-1)*d,(b?1:-1)*g)}}}return q.addCells(e,c)}finally{q.model.endUpdate()}}function e(a){q.model.beginUpdate();try{var b=n(a),c=q.getIncomingEdges(a),d=q.cloneCells([c[0],a]);q.model.setTerminal(c[0],d[1],!1);q.model.setTerminal(d[0],d[1],!0);q.model.setTerminal(d[0],a,!1);
+var e=q.model.getParent(a),f=e.geometry,g=[];q.view.currentRoot!=e&&(d[1].geometry.x-=f.x,d[1].geometry.y-=f.y);q.traverse(a,!0,function(a,b){null!=b&&g.push(b);g.push(a);return!0});var h=a.geometry.width+40,k=a.geometry.height+40;b==mxConstants.DIRECTION_SOUTH?h=0:b==mxConstants.DIRECTION_NORTH?(h=0,k=-40):b==mxConstants.DIRECTION_WEST?(h=-40,k=0):b==mxConstants.DIRECTION_EAST&&(k=0);q.moveCells(g,h,k);return q.addCells(d,e)}finally{q.model.endUpdate()}}function g(a){q.model.beginUpdate();try{var b=
+q.model.getParent(a),c=q.getIncomingEdges(a),d=q.cloneCells([c[0],a]);q.model.setTerminal(d[0],a,!0);var c=q.getOutgoingEdges(a),e=b.geometry,f=[];q.view.currentRoot==b&&(e=new mxRectangle);for(var g=0;g<c.length;g++){var h=q.model.getTerminal(c[g],!1);null!=h&&f.push(h)}var k=q.view.getBounds(f),l=n(a),m=q.view.translate,p=q.view.scale;l==mxConstants.DIRECTION_SOUTH?(d[1].geometry.x=null==k?a.geometry.x+(a.geometry.width-d[1].geometry.width)/2:(k.x+k.width)/p-m.x-e.x+10,d[1].geometry.y+=a.geometry.height-
+e.y+40):l==mxConstants.DIRECTION_NORTH?(d[1].geometry.x=null==k?a.geometry.x+(a.geometry.width-d[1].geometry.width)/2:(k.x+k.width)/p-m.x+-e.x+10,d[1].geometry.y-=d[1].geometry.height-e.y+40):(d[1].geometry.x=l==mxConstants.DIRECTION_WEST?d[1].geometry.x-(d[1].geometry.width-e.x+40):d[1].geometry.x+(a.geometry.width-e.x+40),d[1].geometry.y=null==k?a.geometry.y+(a.geometry.height-d[1].geometry.height)/2:(k.y+k.height)/p-m.y+-e.y+10);return q.addCells(d,b)}finally{q.model.endUpdate()}}function l(a,
+b,c){a=q.getOutgoingEdges(a);c=q.view.getState(c);var d=[];if(null!=c&&null!=a){for(var e=0;e<a.length;e++){var f=q.view.getState(q.model.getTerminal(a[e],!1));null!=f&&(!b&&Math.min(f.x+f.width,c.x+c.width)>=Math.max(f.x,c.x)||b&&Math.min(f.y+f.height,c.y+c.height)>=Math.max(f.y,c.y))&&d.push(f)}d.sort(function(a,c){return b?a.x+a.width-c.x-c.width:a.y+a.height-c.y-c.height})}return d}function p(a,b){var c=n(a),d=b==mxConstants.DIRECTION_EAST||b==mxConstants.DIRECTION_WEST;(c==mxConstants.DIRECTION_EAST||
+c==mxConstants.DIRECTION_WEST)==d&&c!=b?v.actions.get("selectParent").funct():c==b?(d=q.getOutgoingEdges(a),null!=d&&0<d.length&&q.setSelectionCell(q.model.getTerminal(d[0],!1))):(c=q.getIncomingEdges(a),null!=c&&0<c.length&&(d=l(q.model.getTerminal(c[0],!0),d,a),c=q.view.getState(a),null!=c&&(c=mxUtils.indexOf(d,c),0<=c&&(c+=b==mxConstants.DIRECTION_NORTH||b==mxConstants.DIRECTION_WEST?-1:1,0<=c&&c<=d.length-1&&q.setSelectionCell(d[c].cell)))))}function u(b){this.images=[];var c=b.view.graph,d=mxUtils.createImage(a);
+d.setAttribute("title","Move Cell without Subtree");d.style.position="absolute";d.style.cursor="pointer";d.style.width="26px";d.style.height="26px";d.style.left=b.getCenterX()-13+"px";d.style.top=b.getCenterY()-13+"px";mxEvent.addGestureListeners(d,mxUtils.bind(this,function(a){c.stopEditing(!1);v.hoverIcons.reset();c.isCellSelected(b.cell)||c.setSelectionCell(b.cell);c.graphHandler.start(b.cell,mxEvent.getClientX(a),mxEvent.getClientY(a));c.graphHandler.cells=[b.cell];c.graphHandler.bounds=c.graphHandler.graph.getView().getBounds(c.graphHandler.cells);
+c.graphHandler.pBounds=c.graphHandler.getPreviewBounds(c.graphHandler.cells);c.graphHandler.cellWasClicked=!0;c.isMouseDown=!0;c.isMouseTrigger=mxEvent.isMouseEvent(a);mxEvent.consume(a);mxEvent.consume(a);this.destroy()}));b.view.graph.container.appendChild(d);this.images.push(d)}var v=this,q=v.editor.graph,x=q.getModel();mxResources.parse("selectChildren=Select Children");mxResources.parse("selectSiblings=Select Siblings");mxResources.parse("selectSubtree=Select Subtree");mxResources.parse("selectParent=Select Parent");
+var y=v.menus.createPopupMenu;v.menus.createPopupMenu=function(a,b,d){y.apply(this,arguments);if(c(q.getSelectionCell())&&1==q.getSelectionCount()){b=q.getSelectionCell();var e=q.getOutgoingEdges(b);a.addSeparator();null!=e&&0<e.length&&this.addMenuItems(a,["selectChildren","selectSubtree"],null,d);a.addSeparator();0<q.getIncomingEdges(b).length&&this.addMenuItems(a,["selectSiblings","selectParent"],null,d)}};v.actions.addAction("selectChildren",function(){if(q.isEnabled()&&1==q.getSelectionCount()){var a=
+q.getSelectionCell(),a=q.getOutgoingEdges(a);if(null!=a){for(var b=[],c=0;c<a.length;c++)b.push(q.model.getTerminal(a[c],!1));q.setSelectionCells(b)}}},null,null,"Alt+Shift+X");v.actions.addAction("selectSiblings",function(){if(q.isEnabled()&&1==q.getSelectionCount()){var a=q.getSelectionCell(),a=q.getIncomingEdges(a);if(null!=a&&0<a.length&&(a=q.getOutgoingEdges(q.model.getTerminal(a[0],!0)),null!=a)){for(var b=[],c=0;c<a.length;c++)b.push(q.model.getTerminal(a[c],!1));q.setSelectionCells(b)}}},
+null,null,"Alt+Shift+S");v.actions.addAction("selectParent",function(){if(q.isEnabled()&&1==q.getSelectionCount()){var a=q.getSelectionCell(),a=q.getIncomingEdges(a);null!=a&&0<a.length&&q.setSelectionCell(q.model.getTerminal(a[0],!0))}},null,null,"Alt+Shift+P");v.actions.addAction("selectSubtree",function(){if(q.isEnabled()&&1==q.getSelectionCount()){var a=q.getSelectionCell(),b=[];q.traverse(a,!0,function(a,c){null!=c&&b.push(c);b.push(a);return!0});q.setSelectionCells(b)}},null,null,"Alt+Shift+T");
+var t=q.removeCells;q.removeCells=function(a,b){b=null!=b?b:!0;null==a&&(a=this.getDeletableCells(this.getSelectionCells()));b&&(a=this.getDeletableCells(this.addAllEdges(a)));for(var e=[],f=0;f<a.length;f++){var g=a[f];x.isEdge(g)&&d(g)&&(e.push(g),g=x.getTerminal(g,!1));c(g)?(q.traverse(g,!0,function(a,b){null!=b&&e.push(b);e.push(a);return!0}),g=q.getIncomingEdges(a[f]),a=a.concat(g)):e.push(a[f])}a=e;return t.apply(this,arguments)};v.hoverIcons.getStateAt=function(a,b,d){return c(a.cell)?null:
+this.graph.view.getState(this.graph.getCellAt(b,d))};var w=q.duplicateCells;q.duplicateCells=function(a,b){a=null!=a?a:this.getSelectionCells();for(var d=a.slice(0),e=0;e<d.length;e++){var f=q.view.getState(d[e]);if(null!=f&&c(f.cell))for(var g=q.getIncomingEdges(f.cell),f=0;f<g.length;f++)mxUtils.remove(g[f],a)}this.model.beginUpdate();try{var h=w.call(this,a,b);if(h.length==a.length)for(e=0;e<a.length;e++)if(c(a[e])){var k=q.getIncomingEdges(h[e]),g=q.getIncomingEdges(a[e]);if(0==k.length&&0<g.length){var l=
+this.cloneCells([g[0]])[0];this.addEdge(l,q.getDefaultParent(),this.model.getTerminal(g[0],!0),h[e])}}}finally{this.model.endUpdate()}return h};var C=q.moveCells;q.moveCells=function(a,b,d,e,f,g,h){var k=null;this.model.beginUpdate();try{var l=f,m=this.view.getState(f),n=null!=m?m.style:this.getCellStyle(f);if(null!=a&&c(f)&&"1"==mxUtils.getValue(n,"treeFolding","0")){for(var p=0;p<a.length;p++)if(c(a[p])||q.model.isEdge(a[p])&&null==q.model.getTerminal(a[p],!0)){f=q.model.getParent(a[p]);break}if(null!=
+l&&f!=l&&null!=this.view.getState(a[0])){var t=q.getIncomingEdges(a[0]);if(0<t.length){var u=q.view.getState(q.model.getTerminal(t[0],!0));if(null!=u){var v=q.view.getState(l);null!=v&&(b=(v.getCenterX()-u.getCenterX())/q.view.scale,d=(v.getCenterY()-u.getCenterY())/q.view.scale)}}}}k=C.apply(this,arguments);if(null!=k&&null!=a&&k.length==a.length)for(p=0;p<k.length;p++)if(this.model.isEdge(k[p]))c(l)&&0>mxUtils.indexOf(k,this.model.getTerminal(k[p],!0))&&this.model.setTerminal(k[p],l,!0);else if(c(a[p])&&
+(t=q.getIncomingEdges(a[p]),0<t.length))if(!e)c(l)&&0>mxUtils.indexOf(a,this.model.getTerminal(t[0],!0))&&this.model.setTerminal(t[0],l,!0);else if(0==q.getIncomingEdges(k[p]).length){m=l;if(null==m||m==q.model.getParent(a[p]))m=q.model.getTerminal(t[0],!0);e=this.cloneCells([t[0]])[0];this.addEdge(e,q.getDefaultParent(),m,k[p])}}finally{this.model.endUpdate()}return k};var F=v.sidebar.dropAndConnect;v.sidebar.dropAndConnect=function(a,b,d,e){var f=q.model,g=null;f.beginUpdate();try{if(g=F.apply(this,
+arguments),c(a))for(var h=0;h<g.length;h++)if(f.isEdge(g[h])&&null==f.getTerminal(g[h],!0)){f.setTerminal(g[h],a,!0);var k=q.getCellGeometry(g[h]);k.points=null;null!=k.getTerminalPoint(!0)&&k.setTerminalPoint(null,!0)}}finally{f.endUpdate()}return g};var B={88:v.actions.get("selectChildren"),84:v.actions.get("selectSubtree"),80:v.actions.get("selectParent"),83:v.actions.get("selectSiblings")},G=v.onKeyDown;v.onKeyDown=function(a){try{if(q.isEnabled()&&!q.isEditing()&&c(q.getSelectionCell())&&1==
+q.getSelectionCount()){var d=null;0<q.getIncomingEdges(q.getSelectionCell()).length&&(9==a.which?d=mxEvent.isShiftDown(a)?e(q.getSelectionCell()):g(q.getSelectionCell()):13==a.which&&(d=b(q.getSelectionCell(),!mxEvent.isShiftDown(a))));if(null!=d&&0<d.length)1==d.length&&q.model.isEdge(d[0])?q.setSelectionCell(q.model.getTerminal(d[0],!1)):q.setSelectionCell(d[d.length-1]),null!=v.hoverIcons&&v.hoverIcons.update(q.view.getState(q.getSelectionCell())),q.startEditingAtCell(q.getSelectionCell()),mxEvent.consume(a);
+else if(mxEvent.isAltDown(a)&&mxEvent.isShiftDown(a)){var f=B[a.keyCode];null!=f&&(f.funct(a),mxEvent.consume(a))}else 37==a.keyCode?(p(q.getSelectionCell(),mxConstants.DIRECTION_WEST),mxEvent.consume(a)):38==a.keyCode?(p(q.getSelectionCell(),mxConstants.DIRECTION_NORTH),mxEvent.consume(a)):39==a.keyCode?(p(q.getSelectionCell(),mxConstants.DIRECTION_EAST),mxEvent.consume(a)):40==a.keyCode&&(p(q.getSelectionCell(),mxConstants.DIRECTION_SOUTH),mxEvent.consume(a))}}catch(I){console.log("error",I)}mxEvent.isConsumed(a)||
+G.apply(this,arguments)};var z=q.connectVertex;q.connectVertex=function(a,d,f,h,k,l){var m=q.getIncomingEdges(a);if(c(a)&&0<m.length)return f=n(a),h=f==mxConstants.DIRECTION_EAST||f==mxConstants.DIRECTION_WEST,k=d==mxConstants.DIRECTION_EAST||d==mxConstants.DIRECTION_WEST,f==d?g(a):h==k?e(a):b(a,d!=mxConstants.DIRECTION_NORTH&&d!=mxConstants.DIRECTION_WEST);this.model.beginUpdate();try{var p=z.call(this,a,d,f,h,k,l||0==m.length)}finally{this.model.endUpdate()}return p};var D=q.graphHandler.getCells;
+q.graphHandler.getCells=function(a){for(var b=D.apply(this,arguments),d=b.slice(0),e=0;e<d.length;e++)if(c(d[e]))for(var g=q.getIncomingEdges(d[e]),h=0;h<g.length;h++)mxUtils.remove(g[h],b);for(e=0;e<d.length;e++)g=b[e],c(g)&&!f(g)&&q.traverse(g,!0,function(a,c){null!=c&&0>mxUtils.indexOf(b,c)&&b.push(c);0>mxUtils.indexOf(b,a)&&b.push(a);return!0});return b};u.prototype.destroy=function(){if(null!=this.images)for(var a=0;a<this.images.length;a++){var b=this.images[a];b.parentNode.removeChild(b)}this.images=
+null};q.addMouseListener({currentState:null,currentIconSet:null,mouseDown:function(a,b){null!=this.currentState&&(this.dragLeave(b.getEvent(),this.currentState),this.currentState=null)},mouseMove:function(a,b){if(null!=this.currentState&&(b.getState()==this.currentState||null==b.getState())){var d=new mxRectangle(b.getGraphX()-20,b.getGraphY()-20,40,40);if(mxUtils.intersects(d,this.currentState))return}d=b.getState();if(q.isMouseDown&&!mxEvent.isTouchEvent(b.getEvent())||q.isEditing()||null!=d&&(!q.getModel().isVertex(d.cell)||
+!c(b.getCell())||f(d.cell)))d=null;d!=this.currentState&&(null!=this.currentState&&this.dragLeave(b.getEvent(),this.currentState),this.currentState=d,null!=this.currentState&&this.dragEnter(b.getEvent(),this.currentState))},mouseUp:function(a,b){},dragEnter:function(a,b){null==this.currentIconSet&&(this.currentIconSet=new u(b))},dragLeave:function(a,b){null!=this.currentIconSet&&(this.currentIconSet.destroy(),this.currentIconSet=null)}})};if("undefined"!==typeof Sidebar){var c=Sidebar.prototype.createAdvancedShapes;
 Sidebar.prototype.createAdvancedShapes=function(){var a=c.apply(this,arguments),d=this.editorUi.editor.graph;return a.concat([this.addEntry("tree mindmap central idea branch topic",function(){var a=new mxCell("Mindmap",new mxGeometry(0,0,420,126),"swimlane;html=1;startSize=20;horizontal=1;containerType=tree;");a.vertex=!0;var c=new mxCell("Central Idea",new mxGeometry(160,60,100,40),"ellipse;whiteSpace=wrap;html=1;align=center;container=1;recursiveResize=0;treeFolding=1;");c.vertex=!0;var b=new mxCell("Topic",
 new mxGeometry(320,40,80,20),"whiteSpace=wrap;html=1;rounded=1;arcSize=50;align=center;verticalAlign=middle;container=1;recursiveResize=0;strokeWidth=1;autosize=1;spacing=4;treeFolding=1;");b.vertex=!0;var d=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=entityRelationEdgeStyle;startArrow=none;endArrow=none;segment=10;curved=1;");d.geometry.relative=!0;d.edge=!0;c.insertEdge(d,!0);b.insertEdge(d,!1);var f=new mxCell("Branch",new mxGeometry(320,80,72,26),"whiteSpace=wrap;html=1;shape=partialRectangle;top=0;left=0;bottom=1;right=0;points=[[0,1],[1,1]];strokeColor=#000000;fillColor=none;align=center;verticalAlign=bottom;routingCenterY=0.5;snapToPoint=1;container=1;recursiveResize=0;autosize=1;treeFolding=1;");
-f.vertex=!0;var h=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=entityRelationEdgeStyle;startArrow=none;endArrow=none;segment=10;curved=1;");h.geometry.relative=!0;h.edge=!0;c.insertEdge(h,!0);f.insertEdge(h,!1);var k=new mxCell("Topic",new mxGeometry(20,40,80,20),"whiteSpace=wrap;html=1;rounded=1;arcSize=50;align=center;verticalAlign=middle;container=1;recursiveResize=0;strokeWidth=1;autosize=1;spacing=4;treeFolding=1;");k.vertex=!0;var v=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=entityRelationEdgeStyle;startArrow=none;endArrow=none;segment=10;curved=1;");
-v.geometry.relative=!0;v.edge=!0;c.insertEdge(v,!0);k.insertEdge(v,!1);var u=new mxCell("Branch",new mxGeometry(20,80,72,26),"whiteSpace=wrap;html=1;shape=partialRectangle;top=0;left=0;bottom=1;right=0;points=[[0,1],[1,1]];strokeColor=#000000;fillColor=none;align=center;verticalAlign=bottom;routingCenterY=0.5;snapToPoint=1;container=1;recursiveResize=0;autosize=1;treeFolding=1;");u.vertex=!0;var t=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=entityRelationEdgeStyle;startArrow=none;endArrow=none;segment=10;curved=1;");
-t.geometry.relative=!0;t.edge=!0;c.insertEdge(t,!0);u.insertEdge(t,!1);a.insert(d);a.insert(h);a.insert(v);a.insert(t);a.insert(c);a.insert(b);a.insert(f);a.insert(k);a.insert(u);return sb.createVertexTemplateFromCells([a],a.geometry.width,a.geometry.height,a.value)}),this.addEntry("tree mindmap central idea",function(){var a=new mxCell("Central Idea",new mxGeometry(0,0,100,40),"ellipse;whiteSpace=wrap;html=1;align=center;container=1;recursiveResize=0;treeFolding=1;");a.vertex=!0;return sb.createVertexTemplateFromCells([a],
+f.vertex=!0;var h=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=entityRelationEdgeStyle;startArrow=none;endArrow=none;segment=10;curved=1;");h.geometry.relative=!0;h.edge=!0;c.insertEdge(h,!0);f.insertEdge(h,!1);var k=new mxCell("Topic",new mxGeometry(20,40,80,20),"whiteSpace=wrap;html=1;rounded=1;arcSize=50;align=center;verticalAlign=middle;container=1;recursiveResize=0;strokeWidth=1;autosize=1;spacing=4;treeFolding=1;");k.vertex=!0;var u=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=entityRelationEdgeStyle;startArrow=none;endArrow=none;segment=10;curved=1;");
+u.geometry.relative=!0;u.edge=!0;c.insertEdge(u,!0);k.insertEdge(u,!1);var v=new mxCell("Branch",new mxGeometry(20,80,72,26),"whiteSpace=wrap;html=1;shape=partialRectangle;top=0;left=0;bottom=1;right=0;points=[[0,1],[1,1]];strokeColor=#000000;fillColor=none;align=center;verticalAlign=bottom;routingCenterY=0.5;snapToPoint=1;container=1;recursiveResize=0;autosize=1;treeFolding=1;");v.vertex=!0;var q=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=entityRelationEdgeStyle;startArrow=none;endArrow=none;segment=10;curved=1;");
+q.geometry.relative=!0;q.edge=!0;c.insertEdge(q,!0);v.insertEdge(q,!1);a.insert(d);a.insert(h);a.insert(u);a.insert(q);a.insert(c);a.insert(b);a.insert(f);a.insert(k);a.insert(v);return sb.createVertexTemplateFromCells([a],a.geometry.width,a.geometry.height,a.value)}),this.addEntry("tree mindmap central idea",function(){var a=new mxCell("Central Idea",new mxGeometry(0,0,100,40),"ellipse;whiteSpace=wrap;html=1;align=center;container=1;recursiveResize=0;treeFolding=1;");a.vertex=!0;return sb.createVertexTemplateFromCells([a],
 a.geometry.width,a.geometry.height,a.value)}),this.addEntry("tree mindmap branch",function(){var a=new mxCell("Branch",new mxGeometry(0,0,80,20),"whiteSpace=wrap;html=1;shape=partialRectangle;top=0;left=0;bottom=1;right=0;points=[[0,1],[1,1]];strokeColor=#000000;fillColor=none;align=center;verticalAlign=bottom;routingCenterY=0.5;snapToPoint=1;container=1;recursiveResize=0;autosize=1;treeFolding=1;");a.vertex=!0;var c=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=entityRelationEdgeStyle;startArrow=none;endArrow=none;segment=10;curved=1;");
 c.geometry.setTerminalPoint(new mxPoint(-40,40),!0);c.geometry.relative=!0;c.edge=!0;a.insertEdge(c,!1);return sb.createVertexTemplateFromCells([a,c],a.geometry.width,a.geometry.height,a.value)}),this.addEntry("tree mindmap sub topic",function(){var a=new mxCell("Sub Topic",new mxGeometry(0,0,72,26),"whiteSpace=wrap;html=1;rounded=1;arcSize=50;align=center;verticalAlign=middle;container=1;recursiveResize=0;strokeWidth=1;autosize=1;spacing=4;treeFolding=1;");a.vertex=!0;var c=new mxCell("",new mxGeometry(0,
 0,0,0),"edgeStyle=entityRelationEdgeStyle;startArrow=none;endArrow=none;segment=10;curved=1;");c.geometry.setTerminalPoint(new mxPoint(-40,40),!0);c.geometry.relative=!0;c.edge=!0;a.insertEdge(c,!1);return sb.createVertexTemplateFromCells([a,c],a.geometry.width,a.geometry.height,a.value)}),this.addEntry("tree orgchart organization division",function(){var a=new mxCell("Orgchart",new mxGeometry(0,0,280,220),"swimlane;html=1;startSize=20;horizontal=1;containerType=tree;");a.vertex=!0;var c=new mxCell("Organization",
diff --git a/war/js/diagramly/Devel.js b/war/js/diagramly/Devel.js
index 5075b07b46e4e55f5961706ddab11ef3ca0ba19f..45e1fe8f74bee3b9dc4dec54bb6739b63afcf8bd 100644
--- a/war/js/diagramly/Devel.js
+++ b/war/js/diagramly/Devel.js
@@ -112,7 +112,7 @@ mxscript(drawDevUrl + 'js/jszip/jszip.min.js');
 mxscript(drawDevUrl + 'js/diagramly/ruler/mxRuler.js');
 
 //EquiSpaced Guides
-if (urlParams['equiGuides'] == '1')
+if (urlParams['distanceGuides'] == '1')
 {
-	mxscript(drawDevUrl + 'js/diagramly/mxEquiSpacedGuides.js');
+	mxscript(drawDevUrl + 'js/diagramly/DistanceGuides.js');
 }
\ No newline at end of file
diff --git a/war/js/diagramly/Dialogs.js b/war/js/diagramly/Dialogs.js
index eaa7d726291b52ddcc29d2ed1831bda26487b9b2..209860c8e169458e4357b86187d3fed6cd0287cf 100644
--- a/war/js/diagramly/Dialogs.js
+++ b/war/js/diagramly/Dialogs.js
@@ -2508,7 +2508,7 @@ var ParseDialog = function(editorUi, title)
 /**
  * Constructs a new dialog for creating files from templates.
  */
-var NewDialog = function(editorUi, compact, showName, callback, createOnly)
+var NewDialog = function(editorUi, compact, showName, callback, createOnly, cancelCallback)
 {
 	showName = (showName != null) ? showName : true;
 	createOnly = (createOnly != null) ? createOnly : false;
@@ -2926,12 +2926,17 @@ var NewDialog = function(editorUi, compact, showName, callback, createOnly)
 
 	var cancelBtn = mxUtils.button(mxResources.get('cancel'), function()
 	{
+		if (cancelCallback != null)
+		{
+			cancelCallback();
+		}
+		
 		editorUi.hideDialog(true);
 	});
 	
 	cancelBtn.className = 'geBtn';
 	
-	if (editorUi.editor.cancelFirst && !createOnly)
+	if (editorUi.editor.cancelFirst && (!createOnly || cancelCallback != null))
 	{
 		btns.appendChild(cancelBtn);
 	}
@@ -2978,7 +2983,7 @@ var NewDialog = function(editorUi, compact, showName, callback, createOnly)
 	
 	btns.appendChild(createButton);
 	
-	if (!editorUi.editor.cancelFirst && callback == null && !createOnly)
+	if (!editorUi.editor.cancelFirst && callback == null && (!createOnly || cancelCallback != null))
 	{
 		btns.appendChild(cancelBtn);
 	}
diff --git a/war/js/diagramly/mxEquiSpacedGuides.js b/war/js/diagramly/DistanceGuides.js
similarity index 100%
rename from war/js/diagramly/mxEquiSpacedGuides.js
rename to war/js/diagramly/DistanceGuides.js
diff --git a/war/js/diagramly/DrawioFile.js b/war/js/diagramly/DrawioFile.js
index a22c4430fa4e2389a1f9466aac0bd1383e897f15..041a7a39160399ea7af154d037f8324278fd9481 100644
--- a/war/js/diagramly/DrawioFile.js
+++ b/war/js/diagramly/DrawioFile.js
@@ -248,7 +248,7 @@ DrawioFile.prototype.getId = function()
  */
 DrawioFile.prototype.isEditable = function()
 {
-	return !this.ui.editor.chromeless;
+	return !this.ui.editor.chromeless || this.ui.editor.editable;
 };
 
 /**
diff --git a/war/js/diagramly/Editor.js b/war/js/diagramly/Editor.js
index 6912d3381484e70a073313dc850916070692fa12..a60b74dad2c06e2e77c116996515a5d6b9b84ccf 100644
--- a/war/js/diagramly/Editor.js
+++ b/war/js/diagramly/Editor.js
@@ -148,7 +148,8 @@
 			ColorDialog.prototype.presetColors = config.presetColors || ColorDialog.prototype.presetColors;
 			ColorDialog.prototype.defaultColors = config.defaultColors || ColorDialog.prototype.defaultColors;
 			StyleFormatPanel.prototype.defaultColorSchemes = config.defaultColorSchemes || StyleFormatPanel.prototype.defaultColorSchemes;
-
+			Graph.prototype.defaultEdgeLength = config.defaultEdgeLength || Graph.prototype.defaultEdgeLength;
+			
 			// Custom CSS injected directly into the page
 			if (config.css != null)
 			{
diff --git a/war/js/diagramly/EditorUi.js b/war/js/diagramly/EditorUi.js
index 7a64bfeaf56bf1ca7f186d15d672f4835db475c8..23735023840f38faa3201448937ff8b36e5ba779 100644
--- a/war/js/diagramly/EditorUi.js
+++ b/war/js/diagramly/EditorUi.js
@@ -158,6 +158,11 @@
 		}
 	})();
 
+	/**
+	 * Hook for subclassers.
+	 */
+	EditorUi.prototype.showSplash = function(force) { };
+
 	/**
 	 * Abstraction for local storage access.
 	 */
@@ -1419,12 +1424,20 @@
 		// hook for subclassers
 	};
 	
+	/**
+	 * 
+	 */
+	EditorUi.prototype.isScratchpadEnabled = function()
+	{
+		return isLocalStorage || mxClient.IS_CHROMEAPP;
+	};
+
 	/**
 	 * Shows or hides the scratchpad library.
 	 */
 	EditorUi.prototype.toggleScratchpad = function()
 	{
-		if (isLocalStorage || mxClient.IS_CHROMEAPP)
+		if (this.isScratchpadEnabled())
 		{
 			if (this.scratchpad == null)
 			{
@@ -7207,10 +7220,15 @@
 			this.initializeEmbedMode();
 		}
 		
-		if (typeof window.mxSettings !== 'undefined')
-		{
-			this.installSettings();
-		}
+		this.installSettings();
+	};
+	
+	/**
+	 * 
+	 */
+	EditorUi.prototype.isSettingsEnabled = function()
+	{
+		return typeof window.mxSettings !== 'undefined' && (isLocalStorage || mxClient.IS_CHROMEAPP);
 	};
 
 	/**
@@ -7218,7 +7236,7 @@
 	 */
 	EditorUi.prototype.installSettings = function()
 	{
-		if (isLocalStorage || mxClient.IS_CHROMEAPP)
+		if (this.isSettingsEnabled())
 		{
 			// Gets recent colors from settings
 			ColorDialog.recentColors = mxSettings.getRecentColors();
diff --git a/war/js/embed-static.min.js b/war/js/embed-static.min.js
index d78bb11c2cd29e8fa4b1e354ae004389c0663cc8..f5f87f6fdb2a4ba78f6f66db30c0f4c0f284f686 100644
--- a/war/js/embed-static.min.js
+++ b/war/js/embed-static.min.js
@@ -35,15 +35,15 @@ this.l&&a.push("?",this.l);null!==this.o&&a.push("#",this.o);return a.join("")};
 function(){return null!==this.k};f.prototype.V=function(){return this.h&&decodeURIComponent(this.h)};f.prototype.ca=function(a){if(a){a=Number(a);if(a!==(a&65535))throw Error("Bad port number "+a);this.h=""+a}else this.h=null};f.prototype.$=function(){return null!==this.h};f.prototype.U=function(){return this.g&&decodeURIComponent(this.g)};f.prototype.G=function(a){a?(a=""+a,this.g=!this.k||/^\//.test(a)?a:"/"+a):this.g=null};f.prototype.O=function(a){this.l=a?a:null};f.prototype.aa=function(){return null!==
 this.l};f.prototype.ba=function(a){if("object"===typeof a&&!(a instanceof Array)&&(a instanceof Object||"[object Array]"!==Object.prototype.toString.call(a))){var b=[],c=-1,d;for(d in a){var e=a[d];"string"===typeof e&&(b[++c]=d,b[++c]=e)}a=b}for(var b=[],c="",f=0;f<a.length;)d=a[f++],e=a[f++],b.push(c,encodeURIComponent(d.toString())),c="&",e&&b.push("=",encodeURIComponent(e.toString()));this.l=b.join("")};f.prototype.fa=function(a){this.o=a?a:null};f.prototype.Z=function(){return null!==this.o};
 var l=/^(?:([^:/?#]+):)?(?:\/\/(?:([^/?#]*)@)?([^/?#:@]*)(?::([0-9]+))?)?([^?#]+)?(?:\?([^#]*))?(?:#(.*))?$/,m=/[#\/\?@]/g,n=/[\#\?]/g;f.parse=a;f.create=function(a,d,e,g,h,k,l){a=new f(b(a,m),b(d,m),"string"==typeof e?encodeURIComponent(e):null,0<g?g.toString():null,b(h,n),null,"string"==typeof l?encodeURIComponent(l):null);k&&("string"===typeof k?a.O(k.replace(/[^?&=0-9A-Za-z_\-~.%]/g,c)):a.ba(k));return a};f.N=e;f.ma=d;f.ha={ua:function(b){return/\.html$/.test(a(b).U())?"text/html":"application/javascript"},
-N:function(b,c){return b?e(a(b),a(c)).toString():""+c}};return f}();"undefined"!==typeof window&&(window.URI=f);var g=void 0,h=void 0,k=void 0,l=void 0;(function(){function a(a){return"string"===typeof a?'url("'+a.replace(w,c)+'")':'url("about:blank")'}function c(a){return z[a]}function d(a,b){return a?f.ha.N(a,b):b}function n(a,b,c){if(!c)return null;var d=(""+a).match(u);return!d||d[1]&&!F.test(d[1])?null:c(a,b)}function x(a){return a.replace(/^-(?:apple|css|epub|khtml|moz|mso?|o|rim|wap|webkit|xv)-(?=[a-z])/,
-"")}var w=/[\n\f\r\"\'()*<>]/g,z={"\n":"%0a","\f":"%0c","\r":"%0d",'"':"%22","'":"%27","(":"%28",")":"%29","*":"%2a","<":"%3c",">":"%3e"},u=/^(?:([^:/?# ]+):)?/,F=/^(?:https?|mailto|data)$/i;g=function(){var c={};return function B(f,g,h,k,l){f=x(f);var m=b[f];if(m&&"object"===typeof m){for(var p=m.cssPropBits,v=p&80,q=p&1536,r=NaN,C=0,u=0;C<g.length;++C){var t=g[C].toLowerCase(),y=t.charCodeAt(0),w,M,z,F,L,D;if(32===y)t="";else if(34===y)t=16===v?h?a(n(d(k,e(g[C].substring(1,t.length-1))),f,h)):"":
-p&8&&!(v&v-1)?t:"";else if("inherit"!==t){if(L=m.cssLitGroup){var E;if(!(E=m.cssLitMap)){E={};for(var K=L.length;0<=--K;)for(var Q=L[K],fa=Q.length;0<=--fa;)E[Q[fa]]=c;E=m.cssLitMap=E}L=E}else L=c;if(D=L,D[x(t)]!==c)if(35===y&&/^#(?:[0-9a-f]{3}){1,2}$/.test(t))t=p&2?t:"";else if(48<=y&&57>=y)t=p&1?t:"";else if(w=t.charCodeAt(1),M=t.charCodeAt(2),z=48<=w&&57>=w,F=48<=M&&57>=M,43===y&&(z||46===w&&F))t=p&1?(z?"":"0")+t.substring(1):"";else if(45===y&&(z||46===w&&F))t=p&4?(z?"-":"-0")+t.substring(1):
-p&1?"0":"";else if(46===y&&z)t=p&1?"0"+t:"";else if('url("'===t.substring(0,5))t=h&&p&16?a(n(d(k,g[C].substring(5,t.length-2)),f,h)):"";else if("("===t.charAt(t.length-1))a:{L=g;E=C;t=1;K=E+1;for(y=L.length;K<y&&t;)Q=L[K++],t+=")"===Q?-1:/^[^"']*\($/.test(Q);if(!t)for(t=L[E].toLowerCase(),y=x(t),L=L.splice(E,K-E,""),E=m.cssFns,K=0,Q=E.length;K<Q;++K)if(E[K].substring(0,y.length)==y){L[0]=L[L.length-1]="";B(E[K],L,h,k);t=t+L.join(" ")+")";break a}t=""}else t=q&&/^-?[a-z_][\w\-]*$/.test(t)&&!/__$/.test(t)?
-l&&512===q?g[C]+l:1024===q&&b[t]&&"number"===typeof b[t].oa?t:"":/^\w+$/.test(t)&&64===v&&p&8?r+1===u?(g[r]=g[r].substring(0,g[r].length-1)+" "+t+'"',""):(r=u,'"'+t+'"'):""}t&&(g[u++]=t)}1===u&&'url("about:blank")'===g[0]&&(u=0);g.length=u}else g.length=0}}();var E=/^(active|after|before|blank|checked|default|disabled|drop|empty|enabled|first|first-child|first-letter|first-line|first-of-type|fullscreen|focus|hover|in-range|indeterminate|invalid|last-child|last-of-type|left|link|only-child|only-of-type|optional|out-of-range|placeholder-shown|read-only|read-write|required|right|root|scope|user-error|valid|visited)$/,
-D={};D[">"]=D["+"]=D["~"]=D;h=function(a,b,c){function d(d,k){function l(c,d,e){var h,k,l,n,v,Y=!0;h="";c<d&&((v=a[c],"*"===v)?(++c,h=v):/^[a-zA-Z]/.test(v)&&(k=g(v.toLowerCase(),[]))&&("tagName"in k&&(v=k.tagName),++c,h=v));for(n=l=k="";Y&&c<d;++c)if(v=a[c],"#"===v.charAt(0))/^#_|__$|[^\w#:\-]/.test(v)?Y=!1:k+=v+f;else if("."===v)++c<d&&/^[0-9A-Za-z:_\-]+$/.test(v=a[c])&&!/^_|__$/.test(v)?k+="."+v:Y=!1;else if(c+1<d&&"["===a[c]){++c;var B=a[c++].toLowerCase();v=p.m[h+"::"+B];v!==+v&&(v=p.m["*::"+
-B]);var q;b.ia?(q=b.ia(h,B),"string"!==typeof q&&(Y=!1,q=B),Y&&v!==+v&&(v=p.d.NONE)):(q=B,v!==+v&&(Y=!1));var r=B="",C=!1;/^[~^$*|]?=$/.test(a[c])&&(B=a[c++],r=a[c++],/^[0-9A-Za-z:_\-]+$/.test(r)?r='"'+r+'"':"]"===r&&(r='""',--c),/^"([^\"\\]|\\.)*"$/.test(r)||(Y=!1),(C="i"===a[c])&&++c);"]"!==a[c]&&(++c,Y=!1);switch(v){case p.d.CLASSES:case p.d.LOCAL_NAME:case p.d.NONE:break;case p.d.GLOBAL_NAME:case p.d.ID:case p.d.IDREF:"="!==B&&"~="!==B&&"$="!==B||'""'==r||C?"|="===B||""===B||(Y=!1):r='"'+r.substring(1,
-r.length-1)+f+'"';break;case p.d.URI:case p.d.URI_FRAGMENT:""!==B&&(Y=!1);break;default:Y=!1}Y&&(l+="["+q.replace(/[^\w-]/g,"\\$&")+B+r+(C?" i]":"]"))}else if(c<d&&":"===a[c])if(v=a[++c],E.test(v))n+=":"+v;else break;else break;c!==d&&(Y=!1);Y&&(c=(h+k).replace(/[^ .*#\w-]/g,"\\$&")+l+n+e)&&m.push(c);return Y}" "===a[d]&&++d;k-1!==d&&" "===a[k]&&--k;for(var m=[],n=d,v=!0,B=d;v&&B<k;++B){var q=a[B];if(D[q]===D||" "===q)l(n,B,q)?n=B+1:v=!1}l(n,k,"")||(v=!1);return v?(m.length&&(n=m.join(""),null!==
-e&&(n="."+e+" "+n),h.push(n)),!0):!c||c(a.slice(d,k))}var e=b.na,f=b.L,g=b.Aa,h=[],k=0,l,m=0,n;for(l=0;l<a.length;++l)(n=a[l],"("==n||"["==n?(++m,0):")"==n||"]"==n?(m&&--m,0):" "==a[l]&&(m||D[a[l-1]]===D||D[a[l+1]]===D))||(a[k++]=a[l]);a.length=k;k=a.length;for(l=m=0;l<k;++l)if(","===a[l]){if(!d(m,l))return null;m=l+1}return d(m,k)?h:null};(function(){var a=/^\w/,b=/^(?:(?:(?:(?:only|not) )?(?:all|aural|braille|embossed|handheld|print|projection|screen|speech|tty|tv)|\( (?:(?:min-|max-)?(?:(?:device-)?(?:aspect-ratio|height|width)|color(?:-index)?|monochrome|orientation|resolution)|grid|hover|luminosity|pointer|scan|script) (?:: -?(?:[a-z]\w+(?:-\w+)*|\d+(?: \/ \d+|(?:\.\d+)?(?:p[cxt]|[cem]m|in|dpi|dppx|dpcm|%)?)) )?\))(?: and ?\( (?:(?:min-|max-)?(?:(?:device-)?(?:aspect-ratio|height|width)|color(?:-index)?|monochrome|orientation|resolution)|grid|hover|luminosity|pointer|scan|script) (?:: -?(?:[a-z]\w+(?:-\w+)*|\d+(?: \/ \d+|(?:\.\d+)?(?:p[cxt]|[cem]m|in|dpi|dppx|dpcm|%)?)) )?\))*)(?: , (?:(?:(?:(?:only|not) )?(?:all|aural|braille|embossed|handheld|print|projection|screen|speech|tty|tv)|\( (?:(?:min-|max-)?(?:(?:device-)?(?:aspect-ratio|height|width)|color(?:-index)?|monochrome|orientation|resolution)|grid|hover|luminosity|pointer|scan|script) (?:: -?(?:[a-z]\w+(?:-\w+)*|\d+(?: \/ \d+|(?:\.\d+)?(?:p[cxt]|[cem]m|in|dpi|dppx|dpcm|%)?)) )?\))(?: and ?\( (?:(?:min-|max-)?(?:(?:device-)?(?:aspect-ratio|height|width)|color(?:-index)?|monochrome|orientation|resolution)|grid|hover|luminosity|pointer|scan|script) (?:: -?(?:[a-z]\w+(?:-\w+)*|\d+(?: \/ \d+|(?:\.\d+)?(?:p[cxt]|[cem]m|in|dpi|dppx|dpcm|%)?)) )?\))*))*$/i;
+N:function(b,c){return b?e(a(b),a(c)).toString():""+c}};return f}();"undefined"!==typeof window&&(window.URI=f);var g=void 0,h=void 0,k=void 0,l=void 0;(function(){function a(a){return"string"===typeof a?'url("'+a.replace(x,c)+'")':'url("about:blank")'}function c(a){return y[a]}function d(a,b){return a?f.ha.N(a,b):b}function n(a,b,c){if(!c)return null;var d=(""+a).match(u);return!d||d[1]&&!D.test(d[1])?null:c(a,b)}function w(a){return a.replace(/^-(?:apple|css|epub|khtml|moz|mso?|o|rim|wap|webkit|xv)-(?=[a-z])/,
+"")}var x=/[\n\f\r\"\'()*<>]/g,y={"\n":"%0a","\f":"%0c","\r":"%0d",'"':"%22","'":"%27","(":"%28",")":"%29","*":"%2a","<":"%3c",">":"%3e"},u=/^(?:([^:/?# ]+):)?/,D=/^(?:https?|mailto|data)$/i;g=function(){var c={};return function B(f,g,h,k,l){f=w(f);var m=b[f];if(m&&"object"===typeof m){for(var p=m.cssPropBits,v=p&80,q=p&1536,r=NaN,C=0,u=0;C<g.length;++C){var t=g[C].toLowerCase(),z=t.charCodeAt(0),x,M,y,D,H,E;if(32===z)t="";else if(34===z)t=16===v?h?a(n(d(k,e(g[C].substring(1,t.length-1))),f,h)):"":
+p&8&&!(v&v-1)?t:"";else if("inherit"!==t){if(H=m.cssLitGroup){var F;if(!(F=m.cssLitMap)){F={};for(var L=H.length;0<=--L;)for(var Q=H[L],fa=Q.length;0<=--fa;)F[Q[fa]]=c;F=m.cssLitMap=F}H=F}else H=c;if(E=H,E[w(t)]!==c)if(35===z&&/^#(?:[0-9a-f]{3}){1,2}$/.test(t))t=p&2?t:"";else if(48<=z&&57>=z)t=p&1?t:"";else if(x=t.charCodeAt(1),M=t.charCodeAt(2),y=48<=x&&57>=x,D=48<=M&&57>=M,43===z&&(y||46===x&&D))t=p&1?(y?"":"0")+t.substring(1):"";else if(45===z&&(y||46===x&&D))t=p&4?(y?"-":"-0")+t.substring(1):
+p&1?"0":"";else if(46===z&&y)t=p&1?"0"+t:"";else if('url("'===t.substring(0,5))t=h&&p&16?a(n(d(k,g[C].substring(5,t.length-2)),f,h)):"";else if("("===t.charAt(t.length-1))a:{H=g;F=C;t=1;L=F+1;for(z=H.length;L<z&&t;)Q=H[L++],t+=")"===Q?-1:/^[^"']*\($/.test(Q);if(!t)for(t=H[F].toLowerCase(),z=w(t),H=H.splice(F,L-F,""),F=m.cssFns,L=0,Q=F.length;L<Q;++L)if(F[L].substring(0,z.length)==z){H[0]=H[H.length-1]="";B(F[L],H,h,k);t=t+H.join(" ")+")";break a}t=""}else t=q&&/^-?[a-z_][\w\-]*$/.test(t)&&!/__$/.test(t)?
+l&&512===q?g[C]+l:1024===q&&b[t]&&"number"===typeof b[t].oa?t:"":/^\w+$/.test(t)&&64===v&&p&8?r+1===u?(g[r]=g[r].substring(0,g[r].length-1)+" "+t+'"',""):(r=u,'"'+t+'"'):""}t&&(g[u++]=t)}1===u&&'url("about:blank")'===g[0]&&(u=0);g.length=u}else g.length=0}}();var F=/^(active|after|before|blank|checked|default|disabled|drop|empty|enabled|first|first-child|first-letter|first-line|first-of-type|fullscreen|focus|hover|in-range|indeterminate|invalid|last-child|last-of-type|left|link|only-child|only-of-type|optional|out-of-range|placeholder-shown|read-only|read-write|required|right|root|scope|user-error|valid|visited)$/,
+E={};E[">"]=E["+"]=E["~"]=E;h=function(a,b,c){function d(d,k){function l(c,d,e){var h,k,l,n,v,Z=!0;h="";c<d&&((v=a[c],"*"===v)?(++c,h=v):/^[a-zA-Z]/.test(v)&&(k=g(v.toLowerCase(),[]))&&("tagName"in k&&(v=k.tagName),++c,h=v));for(n=l=k="";Z&&c<d;++c)if(v=a[c],"#"===v.charAt(0))/^#_|__$|[^\w#:\-]/.test(v)?Z=!1:k+=v+f;else if("."===v)++c<d&&/^[0-9A-Za-z:_\-]+$/.test(v=a[c])&&!/^_|__$/.test(v)?k+="."+v:Z=!1;else if(c+1<d&&"["===a[c]){++c;var B=a[c++].toLowerCase();v=p.m[h+"::"+B];v!==+v&&(v=p.m["*::"+
+B]);var q;b.ia?(q=b.ia(h,B),"string"!==typeof q&&(Z=!1,q=B),Z&&v!==+v&&(v=p.d.NONE)):(q=B,v!==+v&&(Z=!1));var r=B="",C=!1;/^[~^$*|]?=$/.test(a[c])&&(B=a[c++],r=a[c++],/^[0-9A-Za-z:_\-]+$/.test(r)?r='"'+r+'"':"]"===r&&(r='""',--c),/^"([^\"\\]|\\.)*"$/.test(r)||(Z=!1),(C="i"===a[c])&&++c);"]"!==a[c]&&(++c,Z=!1);switch(v){case p.d.CLASSES:case p.d.LOCAL_NAME:case p.d.NONE:break;case p.d.GLOBAL_NAME:case p.d.ID:case p.d.IDREF:"="!==B&&"~="!==B&&"$="!==B||'""'==r||C?"|="===B||""===B||(Z=!1):r='"'+r.substring(1,
+r.length-1)+f+'"';break;case p.d.URI:case p.d.URI_FRAGMENT:""!==B&&(Z=!1);break;default:Z=!1}Z&&(l+="["+q.replace(/[^\w-]/g,"\\$&")+B+r+(C?" i]":"]"))}else if(c<d&&":"===a[c])if(v=a[++c],F.test(v))n+=":"+v;else break;else break;c!==d&&(Z=!1);Z&&(c=(h+k).replace(/[^ .*#\w-]/g,"\\$&")+l+n+e)&&m.push(c);return Z}" "===a[d]&&++d;k-1!==d&&" "===a[k]&&--k;for(var m=[],n=d,v=!0,B=d;v&&B<k;++B){var q=a[B];if(E[q]===E||" "===q)l(n,B,q)?n=B+1:v=!1}l(n,k,"")||(v=!1);return v?(m.length&&(n=m.join(""),null!==
+e&&(n="."+e+" "+n),h.push(n)),!0):!c||c(a.slice(d,k))}var e=b.na,f=b.L,g=b.Aa,h=[],k=0,l,m=0,n;for(l=0;l<a.length;++l)(n=a[l],"("==n||"["==n?(++m,0):")"==n||"]"==n?(m&&--m,0):" "==a[l]&&(m||E[a[l-1]]===E||E[a[l+1]]===E))||(a[k++]=a[l]);a.length=k;k=a.length;for(l=m=0;l<k;++l)if(","===a[l]){if(!d(m,l))return null;m=l+1}return d(m,k)?h:null};(function(){var a=/^\w/,b=/^(?:(?:(?:(?:only|not) )?(?:all|aural|braille|embossed|handheld|print|projection|screen|speech|tty|tv)|\( (?:(?:min-|max-)?(?:(?:device-)?(?:aspect-ratio|height|width)|color(?:-index)?|monochrome|orientation|resolution)|grid|hover|luminosity|pointer|scan|script) (?:: -?(?:[a-z]\w+(?:-\w+)*|\d+(?: \/ \d+|(?:\.\d+)?(?:p[cxt]|[cem]m|in|dpi|dppx|dpcm|%)?)) )?\))(?: and ?\( (?:(?:min-|max-)?(?:(?:device-)?(?:aspect-ratio|height|width)|color(?:-index)?|monochrome|orientation|resolution)|grid|hover|luminosity|pointer|scan|script) (?:: -?(?:[a-z]\w+(?:-\w+)*|\d+(?: \/ \d+|(?:\.\d+)?(?:p[cxt]|[cem]m|in|dpi|dppx|dpcm|%)?)) )?\))*)(?: , (?:(?:(?:(?:only|not) )?(?:all|aural|braille|embossed|handheld|print|projection|screen|speech|tty|tv)|\( (?:(?:min-|max-)?(?:(?:device-)?(?:aspect-ratio|height|width)|color(?:-index)?|monochrome|orientation|resolution)|grid|hover|luminosity|pointer|scan|script) (?:: -?(?:[a-z]\w+(?:-\w+)*|\d+(?: \/ \d+|(?:\.\d+)?(?:p[cxt]|[cem]m|in|dpi|dppx|dpcm|%)?)) )?\))(?: and ?\( (?:(?:min-|max-)?(?:(?:device-)?(?:aspect-ratio|height|width)|color(?:-index)?|monochrome|orientation|resolution)|grid|hover|luminosity|pointer|scan|script) (?:: -?(?:[a-z]\w+(?:-\w+)*|\d+(?: \/ \d+|(?:\.\d+)?(?:p[cxt]|[cem]m|in|dpi|dppx|dpcm|%)?)) )?\))*))*$/i;
 l=function(c){c=c.slice();for(var d=c.length,e=0,f=0;f<d;++f){var g=c[f];" "!=g&&(c[e++]=g)}c.length=e;c=c.join(" ");return c.length?b.test(c)?a.test(c)?c:"not all , "+c:"not all":""}})();(function(){function a(a){var b=/^\s*[']([^']*)[']\s*$/,c=/^\s*url\s*[(]["]([^"]*)["][)]\s*$/,d=/^\s*url\s*[(][']([^']*)['][)]\s*$/,e=/^\s*url\s*[(]([^)]*)[)]\s*$/,f;return(f=/^\s*["]([^"]*)["]\s*$/.exec(a))||(f=b.exec(a))||(f=c.exec(a))||(f=d.exec(a))||(f=e.exec(a))?f[1]:null}function b(c,e,f,k,p,q,r){function B(){u=
 t.length&&null===t[t.length-1]}var v=void 0,C=r||[0],t=[],u=!1;m(e,{startStylesheet:function(){v=[]},endStylesheet:function(){},startAtrule:function(e,g){if(u)e=null;else if("@media"===e)v.push("@media"," ",l(g));else if("@keyframes"===e||"@-webkit-keyframes"===e){var h=g[0];1!==g.length||/__$|[^\w\-]/.test(h)?e=null:(v.push(e," ",h+f.L),e="@keyframes")}else if("@import"===e&&0<g.length)if(e=null,"function"===typeof q){var m=l(g.slice(1));if("not all"!==m){++C[0];var B=[];v.push(B);var r=n(d(c,a(g[0])),
 function(a){var c=b(r,a.qa,f,k,p,q,C);--C[0];a=m?{toString:function(){return"@media "+m+" {"+c.result+"}"}}:c.result;B[0]=a;q(a,!!C[0])},p)}}else window.console&&window.console.log("@import "+g.join(" ")+" elided");u=!e;t.push(e)},endAtrule:function(){t.pop();u||v.push(";");B()},startBlock:function(){u||v.push("{")},endBlock:function(){u||(v.push("}"),u=!0)},startRuleset:function(a){if(!u){var b=void 0;"@keyframes"===t[t.length-1]?(b=a.join(" ").match(/^ *(?:from|to|\d+(?:\.\d+)?%) *(?:, *(?:from|to|\d+(?:\.\d+)?%) *)*$/i),
@@ -71,21 +71,21 @@ frameset:"HTMLFrameSetElement",h1:"HTMLHeadingElement",h2:"HTMLHeadingElement",h
 li:"HTMLLIElement",link:"HTMLLinkElement",map:"HTMLMapElement",mark:"HTMLElement",menu:"HTMLMenuElement",meta:"HTMLMetaElement",meter:"HTMLMeterElement",nav:"HTMLElement",nobr:"HTMLElement",noembed:"HTMLElement",noframes:"HTMLElement",noscript:"HTMLElement",object:"HTMLObjectElement",ol:"HTMLOListElement",optgroup:"HTMLOptGroupElement",option:"HTMLOptionElement",output:"HTMLOutputElement",p:"HTMLParagraphElement",param:"HTMLParamElement",pre:"HTMLPreElement",progress:"HTMLProgressElement",q:"HTMLQuoteElement",
 s:"HTMLElement",samp:"HTMLElement",script:"HTMLScriptElement",section:"HTMLElement",select:"HTMLSelectElement",small:"HTMLElement",source:"HTMLSourceElement",span:"HTMLSpanElement",strike:"HTMLElement",strong:"HTMLElement",style:"HTMLStyleElement",sub:"HTMLElement",summary:"HTMLElement",sup:"HTMLElement",table:"HTMLTableElement",tbody:"HTMLTableSectionElement",td:"HTMLTableDataCellElement",textarea:"HTMLTextAreaElement",tfoot:"HTMLTableSectionElement",th:"HTMLTableHeaderCellElement",thead:"HTMLTableSectionElement",
 time:"HTMLTimeElement",title:"HTMLTitleElement",tr:"HTMLTableRowElement",track:"HTMLTrackElement",tt:"HTMLElement",u:"HTMLElement",ul:"HTMLUListElement","var":"HTMLElement",video:"HTMLVideoElement",wbr:"HTMLElement"};p.ELEMENT_DOM_INTERFACES=p.Q;p.P={NOT_LOADED:0,SAME_DOCUMENT:1,NEW_DOCUMENT:2};p.ueffects=p.P;p.J={"a::href":2,"area::href":2,"audio::src":1,"blockquote::cite":0,"command::icon":1,"del::cite":0,"form::action":2,"img::src":1,"input::src":1,"ins::cite":0,"q::cite":0,"video::poster":1,"video::src":1};
-p.URIEFFECTS=p.J;p.M={UNSANDBOXED:2,SANDBOXED:1,DATA:0};p.ltypes=p.M;p.I={"a::href":2,"area::href":2,"audio::src":2,"blockquote::cite":2,"command::icon":1,"del::cite":2,"form::action":2,"img::src":1,"input::src":1,"ins::cite":2,"q::cite":2,"video::poster":1,"video::src":2};p.LOADERTYPES=p.I;"undefined"!==typeof window&&(window.html4=p);a=function(a){function b(a,b){var c;if(Z.hasOwnProperty(b))c=Z[b];else{var d=b.match(A);c=d?String.fromCharCode(parseInt(d[1],10)):(d=b.match(v))?String.fromCharCode(parseInt(d[1],
-16)):J&&R.test(b)?(J.innerHTML="&"+b+";",d=J.textContent,Z[b]=d):"&"+b+";"}return c}function c(a){return a.replace(aa,b)}function d(a){return(""+a).replace(H,"&amp;").replace(ba,"&lt;").replace(ea,"&gt;").replace(ca,"&#34;")}function e(a){return a.replace(U,"&amp;$1").replace(ba,"&lt;").replace(ea,"&gt;")}function g(a){var b={z:a.z||a.cdata,A:a.A||a.comment,B:a.B||a.endDoc,t:a.t||a.endTag,e:a.e||a.pcdata,F:a.F||a.rcdata,H:a.H||a.startDoc,w:a.w||a.startTag};return function(a,c){var d,e=/(<\/|<\!--|<[!?]|[&<>])/g;
-d=a+"";if(T)d=d.split(e);else{for(var f=[],g=0,h;null!==(h=e.exec(d));)f.push(d.substring(g,h.index)),f.push(h[0]),g=h.index+h[0].length;f.push(d.substring(g));d=f}k(b,d,0,{r:!1,C:!1},c)}}function h(a,b,c,d,e){return function(){k(a,b,c,d,e)}}function k(b,c,d,e,f){try{b.H&&0==d&&b.H(f);for(var g,k,n,v=c.length;d<v;){var p=c[d++],B=c[d];switch(p){case "&":N.test(B)?(b.e&&b.e("&"+B,f,O,h(b,c,d,e,f)),d++):b.e&&b.e("&amp;",f,O,h(b,c,d,e,f));break;case "</":if(g=/^([-\w:]+)[^\'\"]*/.exec(B))if(g[0].length===
-B.length&&">"===c[d+1])d+=2,n=g[1].toLowerCase(),b.t&&b.t(n,f,O,h(b,c,d,e,f));else{var Y=c,Q=d,q=b,r=f,X=O,t=e,R=m(Y,Q);R?(q.t&&q.t(R.name,r,X,h(q,Y,Q,t,r)),d=R.next):d=Y.length}else b.e&&b.e("&lt;/",f,O,h(b,c,d,e,f));break;case "<":if(g=/^([-\w:]+)\s*\/?/.exec(B))if(g[0].length===B.length&&">"===c[d+1]){d+=2;n=g[1].toLowerCase();b.w&&b.w(n,[],f,O,h(b,c,d,e,f));var C=a.f[n];C&W&&(d=l(c,{name:n,next:d,c:C},b,f,O,e))}else{var Y=c,Q=b,q=f,r=O,X=e,J=m(Y,d);J?(Q.w&&Q.w(J.name,J.R,q,r,h(Q,Y,J.next,X,q)),
-d=J.c&W?l(Y,J,Q,q,r,X):J.next):d=Y.length}else b.e&&b.e("&lt;",f,O,h(b,c,d,e,f));break;case "\x3c!--":if(!e.C){for(k=d+1;k<v&&(">"!==c[k]||!/--$/.test(c[k-1]));k++);if(k<v){if(b.A){var u=c.slice(d,k).join("");b.A(u.substr(0,u.length-2),f,O,h(b,c,k+1,e,f))}d=k+1}else e.C=!0}e.C&&b.e&&b.e("&lt;!--",f,O,h(b,c,d,e,f));break;case "<!":if(/^\w/.test(B)){if(!e.r){for(k=d+1;k<v&&">"!==c[k];k++);k<v?d=k+1:e.r=!0}e.r&&b.e&&b.e("&lt;!",f,O,h(b,c,d,e,f))}else b.e&&b.e("&lt;!",f,O,h(b,c,d,e,f));break;case "<?":if(!e.r){for(k=
-d+1;k<v&&">"!==c[k];k++);k<v?d=k+1:e.r=!0}e.r&&b.e&&b.e("&lt;?",f,O,h(b,c,d,e,f));break;case ">":b.e&&b.e("&gt;",f,O,h(b,c,d,e,f));break;case "":break;default:b.e&&b.e(p,f,O,h(b,c,d,e,f))}}b.B&&b.B(f)}catch(na){if(na!==O)throw na;}}function l(b,c,d,f,g,k){var l=b.length;Q.hasOwnProperty(c.name)||(Q[c.name]=RegExp("^"+c.name+"(?:[\\s\\/]|$)","i"));for(var m=Q[c.name],n=c.next,v=c.next+1;v<l&&("</"!==b[v-1]||!m.test(b[v]));v++);v<l&&--v;l=b.slice(n,v).join("");if(c.c&a.c.CDATA)d.z&&d.z(l,f,g,h(d,b,
+p.URIEFFECTS=p.J;p.M={UNSANDBOXED:2,SANDBOXED:1,DATA:0};p.ltypes=p.M;p.I={"a::href":2,"area::href":2,"audio::src":2,"blockquote::cite":2,"command::icon":1,"del::cite":2,"form::action":2,"img::src":1,"input::src":1,"ins::cite":2,"q::cite":2,"video::poster":1,"video::src":2};p.LOADERTYPES=p.I;"undefined"!==typeof window&&(window.html4=p);a=function(a){function b(a,b){var c;if(ba.hasOwnProperty(b))c=ba[b];else{var d=b.match(A);c=d?String.fromCharCode(parseInt(d[1],10)):(d=b.match(v))?String.fromCharCode(parseInt(d[1],
+16)):I&&R.test(b)?(I.innerHTML="&"+b+";",d=I.textContent,ba[b]=d):"&"+b+";"}return c}function c(a){return a.replace(ca,b)}function d(a){return(""+a).replace(K,"&amp;").replace(T,"&lt;").replace(ea,"&gt;").replace(aa,"&#34;")}function e(a){return a.replace(X,"&amp;$1").replace(T,"&lt;").replace(ea,"&gt;")}function g(a){var b={z:a.z||a.cdata,A:a.A||a.comment,B:a.B||a.endDoc,t:a.t||a.endTag,e:a.e||a.pcdata,F:a.F||a.rcdata,H:a.H||a.startDoc,w:a.w||a.startTag};return function(a,c){var d,e=/(<\/|<\!--|<[!?]|[&<>])/g;
+d=a+"";if(V)d=d.split(e);else{for(var f=[],g=0,h;null!==(h=e.exec(d));)f.push(d.substring(g,h.index)),f.push(h[0]),g=h.index+h[0].length;f.push(d.substring(g));d=f}k(b,d,0,{r:!1,C:!1},c)}}function h(a,b,c,d,e){return function(){k(a,b,c,d,e)}}function k(b,c,d,e,f){try{b.H&&0==d&&b.H(f);for(var g,k,n,v=c.length;d<v;){var p=c[d++],B=c[d];switch(p){case "&":N.test(B)?(b.e&&b.e("&"+B,f,O,h(b,c,d,e,f)),d++):b.e&&b.e("&amp;",f,O,h(b,c,d,e,f));break;case "</":if(g=/^([-\w:]+)[^\'\"]*/.exec(B))if(g[0].length===
+B.length&&">"===c[d+1])d+=2,n=g[1].toLowerCase(),b.t&&b.t(n,f,O,h(b,c,d,e,f));else{var Z=c,Q=d,q=b,r=f,Y=O,t=e,R=m(Z,Q);R?(q.t&&q.t(R.name,r,Y,h(q,Z,Q,t,r)),d=R.next):d=Z.length}else b.e&&b.e("&lt;/",f,O,h(b,c,d,e,f));break;case "<":if(g=/^([-\w:]+)\s*\/?/.exec(B))if(g[0].length===B.length&&">"===c[d+1]){d+=2;n=g[1].toLowerCase();b.w&&b.w(n,[],f,O,h(b,c,d,e,f));var C=a.f[n];C&W&&(d=l(c,{name:n,next:d,c:C},b,f,O,e))}else{var Z=c,Q=b,q=f,r=O,Y=e,I=m(Z,d);I?(Q.w&&Q.w(I.name,I.R,q,r,h(Q,Z,I.next,Y,q)),
+d=I.c&W?l(Z,I,Q,q,r,Y):I.next):d=Z.length}else b.e&&b.e("&lt;",f,O,h(b,c,d,e,f));break;case "\x3c!--":if(!e.C){for(k=d+1;k<v&&(">"!==c[k]||!/--$/.test(c[k-1]));k++);if(k<v){if(b.A){var u=c.slice(d,k).join("");b.A(u.substr(0,u.length-2),f,O,h(b,c,k+1,e,f))}d=k+1}else e.C=!0}e.C&&b.e&&b.e("&lt;!--",f,O,h(b,c,d,e,f));break;case "<!":if(/^\w/.test(B)){if(!e.r){for(k=d+1;k<v&&">"!==c[k];k++);k<v?d=k+1:e.r=!0}e.r&&b.e&&b.e("&lt;!",f,O,h(b,c,d,e,f))}else b.e&&b.e("&lt;!",f,O,h(b,c,d,e,f));break;case "<?":if(!e.r){for(k=
+d+1;k<v&&">"!==c[k];k++);k<v?d=k+1:e.r=!0}e.r&&b.e&&b.e("&lt;?",f,O,h(b,c,d,e,f));break;case ">":b.e&&b.e("&gt;",f,O,h(b,c,d,e,f));break;case "":break;default:b.e&&b.e(p,f,O,h(b,c,d,e,f))}}b.B&&b.B(f)}catch(la){if(la!==O)throw la;}}function l(b,c,d,f,g,k){var l=b.length;Q.hasOwnProperty(c.name)||(Q[c.name]=RegExp("^"+c.name+"(?:[\\s\\/]|$)","i"));for(var m=Q[c.name],n=c.next,v=c.next+1;v<l&&("</"!==b[v-1]||!m.test(b[v]));v++);v<l&&--v;l=b.slice(n,v).join("");if(c.c&a.c.CDATA)d.z&&d.z(l,f,g,h(d,b,
 v,k,f));else if(c.c&a.c.RCDATA)d.F&&d.F(e(l),f,g,h(d,b,v,k,f));else throw Error("bug");return v}function m(b,d){var e=/^([-\w:]+)/.exec(b[d]),f={};f.name=e[1].toLowerCase();f.c=a.f[f.name];for(var g=b[d].substr(e[0].length),h=d+1,k=b.length;h<k&&">"!==b[h];h++)g+=b[h];if(!(k<=h)){for(var l=[];""!==g;)if(e=P.exec(g))if(e[4]&&!e[5]||e[6]&&!e[7]){for(var e=e[4]||e[6],m=!1,g=[g,b[h++]];h<k;h++){if(m){if(">"===b[h])break}else 0<=b[h].indexOf(e)&&(m=!0);g.push(b[h])}if(k<=h)break;g=g.join("")}else{var m=
-e[1].toLowerCase(),n;if(e[2]){n=e[3];var v=n.charCodeAt(0);if(34===v||39===v)n=n.substr(1,n.length-2);n=c(n.replace(I,""))}else n="";l.push(m,n);g=g.substr(e[0].length)}else g=g.replace(/^[\s\S][^a-z\s]*/,"");f.R=l;f.next=h+1;return f}}function n(b){function c(a,b){f||b.push(a)}var e,f;return g({startDoc:function(){e=[];f=!1},startTag:function(c,g,h){if(!f&&a.f.hasOwnProperty(c)){var k=a.f[c];if(!(k&a.c.FOLDABLE)){var l=b(c,g);if(l){if("object"!==typeof l)throw Error("tagPolicy did not return object (old API?)");
+e[1].toLowerCase(),n;if(e[2]){n=e[3];var v=n.charCodeAt(0);if(34===v||39===v)n=n.substr(1,n.length-2);n=c(n.replace(J,""))}else n="";l.push(m,n);g=g.substr(e[0].length)}else g=g.replace(/^[\s\S][^a-z\s]*/,"");f.R=l;f.next=h+1;return f}}function n(b){function c(a,b){f||b.push(a)}var e,f;return g({startDoc:function(){e=[];f=!1},startTag:function(c,g,h){if(!f&&a.f.hasOwnProperty(c)){var k=a.f[c];if(!(k&a.c.FOLDABLE)){var l=b(c,g);if(l){if("object"!==typeof l)throw Error("tagPolicy did not return object (old API?)");
 if("attribs"in l)g=l.attribs;else throw Error("tagPolicy gave no attribs");var m;"tagName"in l?(m=l.tagName,l=a.f[m]):(m=c,l=k);if(k&a.c.OPTIONAL_ENDTAG){var n=e[e.length-1];n&&n.D===c&&(n.v!==m||c!==m)&&h.push("</",n.v,">")}k&a.c.EMPTY||e.push({D:c,v:m});h.push("<",m);c=0;for(n=g.length;c<n;c+=2){var v=g[c],B=g[c+1];null!==B&&void 0!==B&&h.push(" ",v,'="',d(B),'"')}h.push(">");k&a.c.EMPTY&&!(l&a.c.EMPTY)&&h.push("</",m,">")}else f=!(k&a.c.EMPTY)}}},endTag:function(b,c){if(f)f=!1;else if(a.f.hasOwnProperty(b)){var d=
 a.f[b];if(!(d&(a.c.EMPTY|a.c.FOLDABLE))){if(d&a.c.OPTIONAL_ENDTAG)for(d=e.length;0<=--d;){var g=e[d].D;if(g===b)break;if(!(a.f[g]&a.c.OPTIONAL_ENDTAG))return}else for(d=e.length;0<=--d&&e[d].D!==b;);if(!(0>d)){for(g=e.length;--g>d;){var h=e[g].v;a.f[h]&a.c.OPTIONAL_ENDTAG||c.push("</",h,">")}d<e.length&&(b=e[d].v);e.length=d;c.push("</",b,">")}}}},pcdata:c,rcdata:c,cdata:c,endDoc:function(a){for(;e.length;e.length--)a.push("</",e[e.length-1].v,">")}})}function p(a,b,c,d,e){if(!e)return null;try{var g=
-f.parse(""+a);if(g&&(!g.K()||fa.test(g.W()))){var h=e(g,b,c,d);return h?h.toString():null}}catch(ha){}return null}function r(a,b,c,d,e){c||a(b+" removed",{S:"removed",tagName:b});if(d!==e){var f="changed";d&&!e?f="removed":!d&&e&&(f="added");a(b+"."+c+" "+f,{S:f,tagName:b,la:c,oldValue:d,newValue:e})}}function B(a,b,c){b=b+"::"+c;if(a.hasOwnProperty(b))return a[b];b="*::"+c;if(a.hasOwnProperty(b))return a[b]}function M(b,c,d,e,f){for(var g=0;g<c.length;g+=2){var h=c[g],k=c[g+1],l=k,m=null,n;if((n=
-b+"::"+h,a.m.hasOwnProperty(n))||(n="*::"+h,a.m.hasOwnProperty(n)))m=a.m[n];if(null!==m)switch(m){case a.d.NONE:break;case a.d.SCRIPT:k=null;f&&r(f,b,h,l,k);break;case a.d.STYLE:if("undefined"===typeof V){k=null;f&&r(f,b,h,l,k);break}var v=[];V(k,{declaration:function(b,c){var e=b.toLowerCase();S(e,c,d?function(b){return p(b,a.P.ja,a.M.ka,{TYPE:"CSS",CSS_PROP:e},d)}:null);c.length&&v.push(e+": "+c.join(" "))}});k=0<v.length?v.join(" ; "):null;f&&r(f,b,h,l,k);break;case a.d.ID:case a.d.IDREF:case a.d.IDREFS:case a.d.GLOBAL_NAME:case a.d.LOCAL_NAME:case a.d.CLASSES:k=
-e?e(k):k;f&&r(f,b,h,l,k);break;case a.d.URI:k=p(k,B(a.J,b,h),B(a.I,b,h),{TYPE:"MARKUP",XML_ATTR:h,XML_TAG:b},d);f&&r(f,b,h,l,k);break;case a.d.URI_FRAGMENT:k&&"#"===k.charAt(0)?(k=k.substring(1),k=e?e(k):k,null!==k&&void 0!==k&&(k="#"+k)):k=null;f&&r(f,b,h,l,k);break;default:k=null,f&&r(f,b,h,l,k)}else k=null,f&&r(f,b,h,l,k);c[g+1]=k}return c}function K(b,c,d){return function(e,f){if(a.f[e]&a.c.UNSAFE)d&&r(d,e,void 0,void 0,void 0);else return{attribs:M(e,f,b,c,d)}}}function L(a,b){var c=[];n(b)(a,
-c);return c.join("")}var V,S;"undefined"!==typeof window&&(V=window.parseCssDeclarations,S=window.sanitizeCssProperty);var Z={lt:"<",LT:"<",gt:">",GT:">",amp:"&",AMP:"&",quot:'"',apos:"'",nbsp:" "},A=/^#(\d+)$/,v=/^#x([0-9A-Fa-f]+)$/,R=/^[A-Za-z][A-za-z0-9]+$/,J="undefined"!==typeof window&&window.document?window.document.createElement("textarea"):null,I=/\0/g,aa=/&(#[0-9]+|#[xX][0-9A-Fa-f]+|\w+);/g,N=/^(#[0-9]+|#[xX][0-9A-Fa-f]+|\w+);/,H=/&/g,U=/&([^a-z#]|#(?:[^0-9x]|x(?:[^0-9a-f]|$)|$)|$)/gi,ba=
-/[<]/g,ea=/>/g,ca=/\"/g,P=/^\s*([-.:\w]+)(?:\s*(=)\s*((")[^"]*("|$)|(')[^']*('|$)|(?=[a-z][-\w]*\s*=)|[^"'\s]*))?/i,T=3==="a,b".split(/(,)/).length,W=a.c.CDATA|a.c.RCDATA,O={},Q={},fa=/^(?:https?|mailto|data)$/i,X={};X.pa=X.escapeAttrib=d;X.ra=X.makeHtmlSanitizer=n;X.sa=X.makeSaxParser=g;X.ta=X.makeTagPolicy=K;X.wa=X.normalizeRCData=e;X.xa=X.sanitize=function(a,b,c,d){return L(a,K(b,c,d))};X.ya=X.sanitizeAttribs=M;X.za=X.sanitizeWithPolicy=L;X.Ba=X.unescapeEntities=c;return X}(p);c=a.sanitize;"undefined"!==
+f.parse(""+a);if(g&&(!g.K()||fa.test(g.W()))){var h=e(g,b,c,d);return h?h.toString():null}}catch(ia){}return null}function r(a,b,c,d,e){c||a(b+" removed",{S:"removed",tagName:b});if(d!==e){var f="changed";d&&!e?f="removed":!d&&e&&(f="added");a(b+"."+c+" "+f,{S:f,tagName:b,la:c,oldValue:d,newValue:e})}}function B(a,b,c){b=b+"::"+c;if(a.hasOwnProperty(b))return a[b];b="*::"+c;if(a.hasOwnProperty(b))return a[b]}function M(b,c,d,e,f){for(var g=0;g<c.length;g+=2){var h=c[g],k=c[g+1],l=k,m=null,n;if((n=
+b+"::"+h,a.m.hasOwnProperty(n))||(n="*::"+h,a.m.hasOwnProperty(n)))m=a.m[n];if(null!==m)switch(m){case a.d.NONE:break;case a.d.SCRIPT:k=null;f&&r(f,b,h,l,k);break;case a.d.STYLE:if("undefined"===typeof U){k=null;f&&r(f,b,h,l,k);break}var v=[];U(k,{declaration:function(b,c){var e=b.toLowerCase();S(e,c,d?function(b){return p(b,a.P.ja,a.M.ka,{TYPE:"CSS",CSS_PROP:e},d)}:null);c.length&&v.push(e+": "+c.join(" "))}});k=0<v.length?v.join(" ; "):null;f&&r(f,b,h,l,k);break;case a.d.ID:case a.d.IDREF:case a.d.IDREFS:case a.d.GLOBAL_NAME:case a.d.LOCAL_NAME:case a.d.CLASSES:k=
+e?e(k):k;f&&r(f,b,h,l,k);break;case a.d.URI:k=p(k,B(a.J,b,h),B(a.I,b,h),{TYPE:"MARKUP",XML_ATTR:h,XML_TAG:b},d);f&&r(f,b,h,l,k);break;case a.d.URI_FRAGMENT:k&&"#"===k.charAt(0)?(k=k.substring(1),k=e?e(k):k,null!==k&&void 0!==k&&(k="#"+k)):k=null;f&&r(f,b,h,l,k);break;default:k=null,f&&r(f,b,h,l,k)}else k=null,f&&r(f,b,h,l,k);c[g+1]=k}return c}function L(b,c,d){return function(e,f){if(a.f[e]&a.c.UNSAFE)d&&r(d,e,void 0,void 0,void 0);else return{attribs:M(e,f,b,c,d)}}}function H(a,b){var c=[];n(b)(a,
+c);return c.join("")}var U,S;"undefined"!==typeof window&&(U=window.parseCssDeclarations,S=window.sanitizeCssProperty);var ba={lt:"<",LT:"<",gt:">",GT:">",amp:"&",AMP:"&",quot:'"',apos:"'",nbsp:" "},A=/^#(\d+)$/,v=/^#x([0-9A-Fa-f]+)$/,R=/^[A-Za-z][A-za-z0-9]+$/,I="undefined"!==typeof window&&window.document?window.document.createElement("textarea"):null,J=/\0/g,ca=/&(#[0-9]+|#[xX][0-9A-Fa-f]+|\w+);/g,N=/^(#[0-9]+|#[xX][0-9A-Fa-f]+|\w+);/,K=/&/g,X=/&([^a-z#]|#(?:[^0-9x]|x(?:[^0-9a-f]|$)|$)|$)/gi,T=
+/[<]/g,ea=/>/g,aa=/\"/g,P=/^\s*([-.:\w]+)(?:\s*(=)\s*((")[^"]*("|$)|(')[^']*('|$)|(?=[a-z][-\w]*\s*=)|[^"'\s]*))?/i,V=3==="a,b".split(/(,)/).length,W=a.c.CDATA|a.c.RCDATA,O={},Q={},fa=/^(?:https?|mailto|data)$/i,Y={};Y.pa=Y.escapeAttrib=d;Y.ra=Y.makeHtmlSanitizer=n;Y.sa=Y.makeSaxParser=g;Y.ta=Y.makeTagPolicy=L;Y.wa=Y.normalizeRCData=e;Y.xa=Y.sanitize=function(a,b,c,d){return H(a,L(b,c,d))};Y.ya=Y.sanitizeAttribs=M;Y.za=Y.sanitizeWithPolicy=H;Y.Ba=Y.unescapeEntities=c;return Y}(p);c=a.sanitize;"undefined"!==
 typeof window&&(window.html=a,window.html_sanitize=c)})();var Base64={_keyStr:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",encode:function(a,b){var c="",d,e,f,g,h,k,l=0;for(null!=b&&b||(a=Base64._utf8_encode(a));l<a.length;)d=a.charCodeAt(l++),e=a.charCodeAt(l++),f=a.charCodeAt(l++),g=d>>2,d=(d&3)<<4|e>>4,h=(e&15)<<2|f>>6,k=f&63,isNaN(e)?h=k=64:isNaN(f)&&(k=64),c=c+this._keyStr.charAt(g)+this._keyStr.charAt(d)+this._keyStr.charAt(h)+this._keyStr.charAt(k);return c},decode:function(a,b){b=null!=b?b:!1;var c="",d,e,f,g,h,k=0;for(a=a.replace(/[^A-Za-z0-9\+\/\=]/g,
 "");k<a.length;)d=this._keyStr.indexOf(a.charAt(k++)),e=this._keyStr.indexOf(a.charAt(k++)),g=this._keyStr.indexOf(a.charAt(k++)),h=this._keyStr.indexOf(a.charAt(k++)),d=d<<2|e>>4,e=(e&15)<<4|g>>2,f=(g&3)<<6|h,c+=String.fromCharCode(d),64!=g&&(c+=String.fromCharCode(e)),64!=h&&(c+=String.fromCharCode(f));b||(c=Base64._utf8_decode(c));return c},_utf8_encode:function(a){a=a.replace(/\r\n/g,"\n");for(var b="",c=0;c<a.length;c++){var d=a.charCodeAt(c);128>d?b+=String.fromCharCode(d):(127<d&&2048>d?b+=
 String.fromCharCode(d>>6|192):(b+=String.fromCharCode(d>>12|224),b+=String.fromCharCode(d>>6&63|128)),b+=String.fromCharCode(d&63|128))}return b},_utf8_decode:function(a){var b="",c=0,d;for(c1=c2=0;c<a.length;)d=a.charCodeAt(c),128>d?(b+=String.fromCharCode(d),c++):191<d&&224>d?(c2=a.charCodeAt(c+1),b+=String.fromCharCode((d&31)<<6|c2&63),c+=2):(c2=a.charCodeAt(c+1),c3=a.charCodeAt(c+2),b+=String.fromCharCode((d&15)<<12|(c2&63)<<6|c3&63),c+=3);return b}};!function(a){"object"==typeof exports&&"undefined"!=typeof module?module.exports=a():"function"==typeof define&&define.amd?define([],a):("undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:this).pako=a()}(function(){return function b(c,d,e){function f(h,l){if(!d[h]){if(!c[h]){var k="function"==typeof require&&require;if(!l&&k)return k(h,!0);if(g)return g(h,!0);k=Error("Cannot find module '"+h+"'");throw k.code="MODULE_NOT_FOUND",k;}k=d[h]={exports:{}};
@@ -107,84 +107,84 @@ d?(c[h++]=192|d>>>6,c[h++]=128|63&d):65536>d?(c[h++]=224|d>>>12,c[h++]=128|d>>>6
 2===h?31:3===h?15:7;1<h&&d<l;)g=g<<6|63&b[d++],h--;1<h?m[f++]=65533:65536>g?m[f++]=g:(g-=65536,m[f++]=55296|g>>10&1023,m[f++]=56320|1023&g)}return e(m,f)};d.utf8border=function(b,c){var d;c=c||b.length;c>b.length&&(c=b.length);for(d=c-1;0<=d&&128===(192&b[d]);)d--;return 0>d?c:0===d?c:d+k[b[d]]>c?d:c}},{"./common":3}],5:[function(b,c,d){c.exports=function(b,c,d,h){var e=65535&b|0;b=b>>>16&65535|0;for(var f;0!==d;){f=2E3<d?2E3:d;d-=f;do e=e+c[h++]|0,b=b+e|0;while(--f);e%=65521;b%=65521}return e|b<<
 16|0}},{}],6:[function(b,c,d){c.exports={Z_NO_FLUSH:0,Z_PARTIAL_FLUSH:1,Z_SYNC_FLUSH:2,Z_FULL_FLUSH:3,Z_FINISH:4,Z_BLOCK:5,Z_TREES:6,Z_OK:0,Z_STREAM_END:1,Z_NEED_DICT:2,Z_ERRNO:-1,Z_STREAM_ERROR:-2,Z_DATA_ERROR:-3,Z_BUF_ERROR:-5,Z_NO_COMPRESSION:0,Z_BEST_SPEED:1,Z_BEST_COMPRESSION:9,Z_DEFAULT_COMPRESSION:-1,Z_FILTERED:1,Z_HUFFMAN_ONLY:2,Z_RLE:3,Z_FIXED:4,Z_DEFAULT_STRATEGY:0,Z_BINARY:0,Z_TEXT:1,Z_UNKNOWN:2,Z_DEFLATED:8}},{}],7:[function(b,c,d){var e=function(){for(var b,c=[],d=0;256>d;d++){b=d;for(var e=
 0;8>e;e++)b=1&b?3988292384^b>>>1:b>>>1;c[d]=b}return c}();c.exports=function(b,c,d,k){d=k+d;for(b^=-1;k<d;k++)b=b>>>8^e[255&(b^c[k])];return b^-1}},{}],8:[function(b,c,d){function e(b,c){return b.msg=C[c],c}function f(b){for(var c=b.length;0<=--c;)b[c]=0}function g(b){var c=b.state,d=c.pending;d>b.avail_out&&(d=b.avail_out);0!==d&&(u.arraySet(b.output,c.pending_buf,c.pending_out,d,b.next_out),b.next_out+=d,c.pending_out+=d,b.total_out+=d,b.avail_out-=d,c.pending-=d,0===c.pending&&(c.pending_out=0))}
-function h(b,c){F._tr_flush_block(b,0<=b.block_start?b.block_start:-1,b.strstart-b.block_start,c);b.block_start=b.strstart;g(b.strm)}function k(b,c){b.pending_buf[b.pending++]=c}function l(b,c){b.pending_buf[b.pending++]=c>>>8&255;b.pending_buf[b.pending++]=255&c}function m(b,c){var d,e,f=b.max_chain_length,g=b.strstart,h=b.prev_length,k=b.nice_match,l=b.strstart>b.w_size-ba?b.strstart-(b.w_size-ba):0,m=b.window,n=b.w_mask,v=b.prev,B=b.strstart+U,p=m[g+h-1],q=m[g+h];b.prev_length>=b.good_match&&(f>>=
-2);k>b.lookahead&&(k=b.lookahead);do if(d=c,m[d+h]===q&&m[d+h-1]===p&&m[d]===m[g]&&m[++d]===m[g+1]){g+=2;for(d++;m[++g]===m[++d]&&m[++g]===m[++d]&&m[++g]===m[++d]&&m[++g]===m[++d]&&m[++g]===m[++d]&&m[++g]===m[++d]&&m[++g]===m[++d]&&m[++g]===m[++d]&&g<B;);if(e=U-(B-g),g=B-U,e>h){if(b.match_start=c,h=e,e>=k)break;p=m[g+h-1];q=m[g+h]}}while((c=v[c&n])>l&&0!==--f);return h<=b.lookahead?h:b.lookahead}function n(b){var c,d,e,f,g=b.w_size;do{if(f=b.window_size-b.lookahead-b.strstart,b.strstart>=g+(g-ba)){u.arraySet(b.window,
-b.window,g,g,0);b.match_start-=g;b.strstart-=g;b.block_start-=g;c=d=b.hash_size;do e=b.head[--c],b.head[c]=e>=g?e-g:0;while(--d);c=d=g;do e=b.prev[--c],b.prev[c]=e>=g?e-g:0;while(--d);f+=g}if(0===b.strm.avail_in)break;c=b.strm;e=b.window;var h=b.strstart+b.lookahead,k=c.avail_in;if(d=(k>f&&(k=f),0===k?0:(c.avail_in-=k,u.arraySet(e,c.input,c.next_in,k,h),1===c.state.wrap?c.adler=E(c.adler,e,k,h):2===c.state.wrap&&(c.adler=D(c.adler,e,k,h)),c.next_in+=k,c.total_in+=k,k)),b.lookahead+=d,b.lookahead+
-b.insert>=H)for(f=b.strstart-b.insert,b.ins_h=b.window[f],b.ins_h=(b.ins_h<<b.hash_shift^b.window[f+1])&b.hash_mask;b.insert&&(b.ins_h=(b.ins_h<<b.hash_shift^b.window[f+H-1])&b.hash_mask,b.prev[f&b.w_mask]=b.head[b.ins_h],b.head[b.ins_h]=f,f++,b.insert--,!(b.lookahead+b.insert<H)););}while(b.lookahead<ba&&0!==b.strm.avail_in)}function p(b,c){for(var d,e;;){if(b.lookahead<ba){if(n(b),b.lookahead<ba&&c===G)return P;if(0===b.lookahead)break}if(d=0,b.lookahead>=H&&(b.ins_h=(b.ins_h<<b.hash_shift^b.window[b.strstart+
-H-1])&b.hash_mask,d=b.prev[b.strstart&b.w_mask]=b.head[b.ins_h],b.head[b.ins_h]=b.strstart),0!==d&&b.strstart-d<=b.w_size-ba&&(b.match_length=m(b,d)),b.match_length>=H)if(e=F._tr_tally(b,b.strstart-b.match_start,b.match_length-H),b.lookahead-=b.match_length,b.match_length<=b.max_lazy_match&&b.lookahead>=H){b.match_length--;do b.strstart++,b.ins_h=(b.ins_h<<b.hash_shift^b.window[b.strstart+H-1])&b.hash_mask,d=b.prev[b.strstart&b.w_mask]=b.head[b.ins_h],b.head[b.ins_h]=b.strstart;while(0!==--b.match_length);
-b.strstart++}else b.strstart+=b.match_length,b.match_length=0,b.ins_h=b.window[b.strstart],b.ins_h=(b.ins_h<<b.hash_shift^b.window[b.strstart+1])&b.hash_mask;else e=F._tr_tally(b,0,b.window[b.strstart]),b.lookahead--,b.strstart++;if(e&&(h(b,!1),0===b.strm.avail_out))return P}return b.insert=b.strstart<H-1?b.strstart:H-1,c===B?(h(b,!0),0===b.strm.avail_out?W:O):b.last_lit&&(h(b,!1),0===b.strm.avail_out)?P:T}function r(b,c){for(var d,e,f;;){if(b.lookahead<ba){if(n(b),b.lookahead<ba&&c===G)return P;
-if(0===b.lookahead)break}if(d=0,b.lookahead>=H&&(b.ins_h=(b.ins_h<<b.hash_shift^b.window[b.strstart+H-1])&b.hash_mask,d=b.prev[b.strstart&b.w_mask]=b.head[b.ins_h],b.head[b.ins_h]=b.strstart),b.prev_length=b.match_length,b.prev_match=b.match_start,b.match_length=H-1,0!==d&&b.prev_length<b.max_lazy_match&&b.strstart-d<=b.w_size-ba&&(b.match_length=m(b,d),5>=b.match_length&&(b.strategy===V||b.match_length===H&&4096<b.strstart-b.match_start)&&(b.match_length=H-1)),b.prev_length>=H&&b.match_length<=b.prev_length){f=
-b.strstart+b.lookahead-H;e=F._tr_tally(b,b.strstart-1-b.prev_match,b.prev_length-H);b.lookahead-=b.prev_length-1;b.prev_length-=2;do++b.strstart<=f&&(b.ins_h=(b.ins_h<<b.hash_shift^b.window[b.strstart+H-1])&b.hash_mask,d=b.prev[b.strstart&b.w_mask]=b.head[b.ins_h],b.head[b.ins_h]=b.strstart);while(0!==--b.prev_length);if(b.match_available=0,b.match_length=H-1,b.strstart++,e&&(h(b,!1),0===b.strm.avail_out))return P}else if(b.match_available){if(e=F._tr_tally(b,0,b.window[b.strstart-1]),e&&h(b,!1),
-b.strstart++,b.lookahead--,0===b.strm.avail_out)return P}else b.match_available=1,b.strstart++,b.lookahead--}return b.match_available&&(F._tr_tally(b,0,b.window[b.strstart-1]),b.match_available=0),b.insert=b.strstart<H-1?b.strstart:H-1,c===B?(h(b,!0),0===b.strm.avail_out?W:O):b.last_lit&&(h(b,!1),0===b.strm.avail_out)?P:T}function q(b,c,d,e,f){this.good_length=b;this.max_lazy=c;this.nice_length=d;this.max_chain=e;this.func=f}function t(){this.strm=null;this.status=0;this.pending_buf=null;this.wrap=
+function h(b,c){D._tr_flush_block(b,0<=b.block_start?b.block_start:-1,b.strstart-b.block_start,c);b.block_start=b.strstart;g(b.strm)}function k(b,c){b.pending_buf[b.pending++]=c}function l(b,c){b.pending_buf[b.pending++]=c>>>8&255;b.pending_buf[b.pending++]=255&c}function m(b,c){var d,e,f=b.max_chain_length,g=b.strstart,h=b.prev_length,k=b.nice_match,l=b.strstart>b.w_size-T?b.strstart-(b.w_size-T):0,m=b.window,n=b.w_mask,v=b.prev,B=b.strstart+X,p=m[g+h-1],q=m[g+h];b.prev_length>=b.good_match&&(f>>=
+2);k>b.lookahead&&(k=b.lookahead);do if(d=c,m[d+h]===q&&m[d+h-1]===p&&m[d]===m[g]&&m[++d]===m[g+1]){g+=2;for(d++;m[++g]===m[++d]&&m[++g]===m[++d]&&m[++g]===m[++d]&&m[++g]===m[++d]&&m[++g]===m[++d]&&m[++g]===m[++d]&&m[++g]===m[++d]&&m[++g]===m[++d]&&g<B;);if(e=X-(B-g),g=B-X,e>h){if(b.match_start=c,h=e,e>=k)break;p=m[g+h-1];q=m[g+h]}}while((c=v[c&n])>l&&0!==--f);return h<=b.lookahead?h:b.lookahead}function n(b){var c,d,e,f,g=b.w_size;do{if(f=b.window_size-b.lookahead-b.strstart,b.strstart>=g+(g-T)){u.arraySet(b.window,
+b.window,g,g,0);b.match_start-=g;b.strstart-=g;b.block_start-=g;c=d=b.hash_size;do e=b.head[--c],b.head[c]=e>=g?e-g:0;while(--d);c=d=g;do e=b.prev[--c],b.prev[c]=e>=g?e-g:0;while(--d);f+=g}if(0===b.strm.avail_in)break;c=b.strm;e=b.window;var h=b.strstart+b.lookahead,k=c.avail_in;if(d=(k>f&&(k=f),0===k?0:(c.avail_in-=k,u.arraySet(e,c.input,c.next_in,k,h),1===c.state.wrap?c.adler=F(c.adler,e,k,h):2===c.state.wrap&&(c.adler=E(c.adler,e,k,h)),c.next_in+=k,c.total_in+=k,k)),b.lookahead+=d,b.lookahead+
+b.insert>=K)for(f=b.strstart-b.insert,b.ins_h=b.window[f],b.ins_h=(b.ins_h<<b.hash_shift^b.window[f+1])&b.hash_mask;b.insert&&(b.ins_h=(b.ins_h<<b.hash_shift^b.window[f+K-1])&b.hash_mask,b.prev[f&b.w_mask]=b.head[b.ins_h],b.head[b.ins_h]=f,f++,b.insert--,!(b.lookahead+b.insert<K)););}while(b.lookahead<T&&0!==b.strm.avail_in)}function p(b,c){for(var d,e;;){if(b.lookahead<T){if(n(b),b.lookahead<T&&c===G)return P;if(0===b.lookahead)break}if(d=0,b.lookahead>=K&&(b.ins_h=(b.ins_h<<b.hash_shift^b.window[b.strstart+
+K-1])&b.hash_mask,d=b.prev[b.strstart&b.w_mask]=b.head[b.ins_h],b.head[b.ins_h]=b.strstart),0!==d&&b.strstart-d<=b.w_size-T&&(b.match_length=m(b,d)),b.match_length>=K)if(e=D._tr_tally(b,b.strstart-b.match_start,b.match_length-K),b.lookahead-=b.match_length,b.match_length<=b.max_lazy_match&&b.lookahead>=K){b.match_length--;do b.strstart++,b.ins_h=(b.ins_h<<b.hash_shift^b.window[b.strstart+K-1])&b.hash_mask,d=b.prev[b.strstart&b.w_mask]=b.head[b.ins_h],b.head[b.ins_h]=b.strstart;while(0!==--b.match_length);
+b.strstart++}else b.strstart+=b.match_length,b.match_length=0,b.ins_h=b.window[b.strstart],b.ins_h=(b.ins_h<<b.hash_shift^b.window[b.strstart+1])&b.hash_mask;else e=D._tr_tally(b,0,b.window[b.strstart]),b.lookahead--,b.strstart++;if(e&&(h(b,!1),0===b.strm.avail_out))return P}return b.insert=b.strstart<K-1?b.strstart:K-1,c===B?(h(b,!0),0===b.strm.avail_out?W:O):b.last_lit&&(h(b,!1),0===b.strm.avail_out)?P:V}function r(b,c){for(var d,e,f;;){if(b.lookahead<T){if(n(b),b.lookahead<T&&c===G)return P;if(0===
+b.lookahead)break}if(d=0,b.lookahead>=K&&(b.ins_h=(b.ins_h<<b.hash_shift^b.window[b.strstart+K-1])&b.hash_mask,d=b.prev[b.strstart&b.w_mask]=b.head[b.ins_h],b.head[b.ins_h]=b.strstart),b.prev_length=b.match_length,b.prev_match=b.match_start,b.match_length=K-1,0!==d&&b.prev_length<b.max_lazy_match&&b.strstart-d<=b.w_size-T&&(b.match_length=m(b,d),5>=b.match_length&&(b.strategy===U||b.match_length===K&&4096<b.strstart-b.match_start)&&(b.match_length=K-1)),b.prev_length>=K&&b.match_length<=b.prev_length){f=
+b.strstart+b.lookahead-K;e=D._tr_tally(b,b.strstart-1-b.prev_match,b.prev_length-K);b.lookahead-=b.prev_length-1;b.prev_length-=2;do++b.strstart<=f&&(b.ins_h=(b.ins_h<<b.hash_shift^b.window[b.strstart+K-1])&b.hash_mask,d=b.prev[b.strstart&b.w_mask]=b.head[b.ins_h],b.head[b.ins_h]=b.strstart);while(0!==--b.prev_length);if(b.match_available=0,b.match_length=K-1,b.strstart++,e&&(h(b,!1),0===b.strm.avail_out))return P}else if(b.match_available){if(e=D._tr_tally(b,0,b.window[b.strstart-1]),e&&h(b,!1),
+b.strstart++,b.lookahead--,0===b.strm.avail_out)return P}else b.match_available=1,b.strstart++,b.lookahead--}return b.match_available&&(D._tr_tally(b,0,b.window[b.strstart-1]),b.match_available=0),b.insert=b.strstart<K-1?b.strstart:K-1,c===B?(h(b,!0),0===b.strm.avail_out?W:O):b.last_lit&&(h(b,!1),0===b.strm.avail_out)?P:V}function q(b,c,d,e,f){this.good_length=b;this.max_lazy=c;this.nice_length=d;this.max_chain=e;this.func=f}function t(){this.strm=null;this.status=0;this.pending_buf=null;this.wrap=
 this.pending=this.pending_out=this.pending_buf_size=0;this.gzhead=null;this.gzindex=0;this.method=A;this.last_flush=-1;this.w_mask=this.w_bits=this.w_size=0;this.window=null;this.window_size=0;this.head=this.prev=null;this.nice_match=this.good_match=this.strategy=this.level=this.max_lazy_match=this.max_chain_length=this.prev_length=this.lookahead=this.match_start=this.strstart=this.match_available=this.prev_match=this.match_length=this.block_start=this.hash_shift=this.hash_mask=this.hash_bits=this.hash_size=
-this.ins_h=0;this.dyn_ltree=new u.Buf16(2*aa);this.dyn_dtree=new u.Buf16(2*(2*J+1));this.bl_tree=new u.Buf16(2*(2*I+1));f(this.dyn_ltree);f(this.dyn_dtree);f(this.bl_tree);this.bl_desc=this.d_desc=this.l_desc=null;this.bl_count=new u.Buf16(N+1);this.heap=new u.Buf16(2*R+1);f(this.heap);this.heap_max=this.heap_len=0;this.depth=new u.Buf16(2*R+1);f(this.depth);this.bi_valid=this.bi_buf=this.insert=this.matches=this.static_len=this.opt_len=this.d_buf=this.last_lit=this.lit_bufsize=this.l_buf=0}function y(b){var c;
-return b&&b.state?(b.total_in=b.total_out=0,b.data_type=Z,c=b.state,c.pending=0,c.pending_out=0,0>c.wrap&&(c.wrap=-c.wrap),c.status=c.wrap?ea:ca,b.adler=2===c.wrap?0:1,c.last_flush=G,F._tr_init(c),M):e(b,K)}function x(b){var c=y(b);c===M&&(b=b.state,b.window_size=2*b.w_size,f(b.head),b.max_lazy_match=z[b.level].max_lazy,b.good_match=z[b.level].good_length,b.nice_match=z[b.level].nice_length,b.max_chain_length=z[b.level].max_chain,b.strstart=0,b.block_start=0,b.lookahead=0,b.insert=0,b.match_length=
-b.prev_length=H-1,b.match_available=0,b.ins_h=0);return c}function w(b,c,d,f,g,h){if(!b)return K;var k=1;if(c===L&&(c=6),0>f?(k=0,f=-f):15<f&&(k=2,f-=16),1>g||g>v||d!==A||8>f||15<f||0>c||9<c||0>h||h>S)return e(b,K);8===f&&(f=9);var l=new t;return b.state=l,l.strm=b,l.wrap=k,l.gzhead=null,l.w_bits=f,l.w_size=1<<l.w_bits,l.w_mask=l.w_size-1,l.hash_bits=g+7,l.hash_size=1<<l.hash_bits,l.hash_mask=l.hash_size-1,l.hash_shift=~~((l.hash_bits+H-1)/H),l.window=new u.Buf8(2*l.w_size),l.head=new u.Buf16(l.hash_size),
-l.prev=new u.Buf16(l.w_size),l.lit_bufsize=1<<g+6,l.pending_buf_size=4*l.lit_bufsize,l.pending_buf=new u.Buf8(l.pending_buf_size),l.d_buf=1*l.lit_bufsize,l.l_buf=3*l.lit_bufsize,l.level=c,l.strategy=h,l.method=d,x(b)}var z,u=b("../utils/common"),F=b("./trees"),E=b("./adler32"),D=b("./crc32"),C=b("./messages"),G=0,B=4,M=0,K=-2,L=-1,V=1,S=4,Z=2,A=8,v=9,R=286,J=30,I=19,aa=2*R+1,N=15,H=3,U=258,ba=U+H+1,ea=42,ca=113,P=1,T=2,W=3,O=4;z=[new q(0,0,0,0,function(b,c){var d=65535;for(d>b.pending_buf_size-5&&
-(d=b.pending_buf_size-5);;){if(1>=b.lookahead){if(n(b),0===b.lookahead&&c===G)return P;if(0===b.lookahead)break}b.strstart+=b.lookahead;b.lookahead=0;var e=b.block_start+d;if((0===b.strstart||b.strstart>=e)&&(b.lookahead=b.strstart-e,b.strstart=e,h(b,!1),0===b.strm.avail_out)||b.strstart-b.block_start>=b.w_size-ba&&(h(b,!1),0===b.strm.avail_out))return P}return b.insert=0,c===B?(h(b,!0),0===b.strm.avail_out?W:O):(b.strstart>b.block_start&&h(b,!1),P)}),new q(4,4,8,4,p),new q(4,5,16,8,p),new q(4,6,
-32,32,p),new q(4,4,16,16,r),new q(8,16,32,32,r),new q(8,16,128,128,r),new q(8,32,128,256,r),new q(32,128,258,1024,r),new q(32,258,258,4096,r)];d.deflateInit=function(b,c){return w(b,c,A,15,8,0)};d.deflateInit2=w;d.deflateReset=x;d.deflateResetKeep=y;d.deflateSetHeader=function(b,c){return b&&b.state?2!==b.state.wrap?K:(b.state.gzhead=c,M):K};d.deflate=function(b,c){var d,m,v,p;if(!b||!b.state||5<c||0>c)return b?e(b,K):K;if(m=b.state,!b.output||!b.input&&0!==b.avail_in||666===m.status&&c!==B)return e(b,
-0===b.avail_out?-5:K);if(m.strm=b,d=m.last_flush,m.last_flush=c,m.status===ea)2===m.wrap?(b.adler=0,k(m,31),k(m,139),k(m,8),m.gzhead?(k(m,(m.gzhead.text?1:0)+(m.gzhead.hcrc?2:0)+(m.gzhead.extra?4:0)+(m.gzhead.name?8:0)+(m.gzhead.comment?16:0)),k(m,255&m.gzhead.time),k(m,m.gzhead.time>>8&255),k(m,m.gzhead.time>>16&255),k(m,m.gzhead.time>>24&255),k(m,9===m.level?2:2<=m.strategy||2>m.level?4:0),k(m,255&m.gzhead.os),m.gzhead.extra&&m.gzhead.extra.length&&(k(m,255&m.gzhead.extra.length),k(m,m.gzhead.extra.length>>
-8&255)),m.gzhead.hcrc&&(b.adler=D(b.adler,m.pending_buf,m.pending,0)),m.gzindex=0,m.status=69):(k(m,0),k(m,0),k(m,0),k(m,0),k(m,0),k(m,9===m.level?2:2<=m.strategy||2>m.level?4:0),k(m,3),m.status=ca)):(v=A+(m.w_bits-8<<4)<<8,v|=(2<=m.strategy||2>m.level?0:6>m.level?1:6===m.level?2:3)<<6,0!==m.strstart&&(v|=32),m.status=ca,l(m,v+(31-v%31)),0!==m.strstart&&(l(m,b.adler>>>16),l(m,65535&b.adler)),b.adler=1);if(69===m.status)if(m.gzhead.extra){for(v=m.pending;m.gzindex<(65535&m.gzhead.extra.length)&&(m.pending!==
-m.pending_buf_size||(m.gzhead.hcrc&&m.pending>v&&(b.adler=D(b.adler,m.pending_buf,m.pending-v,v)),g(b),v=m.pending,m.pending!==m.pending_buf_size));)k(m,255&m.gzhead.extra[m.gzindex]),m.gzindex++;m.gzhead.hcrc&&m.pending>v&&(b.adler=D(b.adler,m.pending_buf,m.pending-v,v));m.gzindex===m.gzhead.extra.length&&(m.gzindex=0,m.status=73)}else m.status=73;if(73===m.status)if(m.gzhead.name){v=m.pending;do{if(m.pending===m.pending_buf_size&&(m.gzhead.hcrc&&m.pending>v&&(b.adler=D(b.adler,m.pending_buf,m.pending-
-v,v)),g(b),v=m.pending,m.pending===m.pending_buf_size)){p=1;break}p=m.gzindex<m.gzhead.name.length?255&m.gzhead.name.charCodeAt(m.gzindex++):0;k(m,p)}while(0!==p);m.gzhead.hcrc&&m.pending>v&&(b.adler=D(b.adler,m.pending_buf,m.pending-v,v));0===p&&(m.gzindex=0,m.status=91)}else m.status=91;if(91===m.status)if(m.gzhead.comment){v=m.pending;do{if(m.pending===m.pending_buf_size&&(m.gzhead.hcrc&&m.pending>v&&(b.adler=D(b.adler,m.pending_buf,m.pending-v,v)),g(b),v=m.pending,m.pending===m.pending_buf_size)){p=
-1;break}p=m.gzindex<m.gzhead.comment.length?255&m.gzhead.comment.charCodeAt(m.gzindex++):0;k(m,p)}while(0!==p);m.gzhead.hcrc&&m.pending>v&&(b.adler=D(b.adler,m.pending_buf,m.pending-v,v));0===p&&(m.status=103)}else m.status=103;if(103===m.status&&(m.gzhead.hcrc?(m.pending+2>m.pending_buf_size&&g(b),m.pending+2<=m.pending_buf_size&&(k(m,255&b.adler),k(m,b.adler>>8&255),b.adler=0,m.status=ca)):m.status=ca),0!==m.pending){if(g(b),0===b.avail_out)return m.last_flush=-1,M}else if(0===b.avail_in&&(c<<1)-
-(4<c?9:0)<=(d<<1)-(4<d?9:0)&&c!==B)return e(b,-5);if(666===m.status&&0!==b.avail_in)return e(b,-5);if(0!==b.avail_in||0!==m.lookahead||c!==G&&666!==m.status){var q;if(2===m.strategy)a:{for(var r;;){if(0===m.lookahead&&(n(m),0===m.lookahead)){if(c===G){q=P;break a}break}if(m.match_length=0,r=F._tr_tally(m,0,m.window[m.strstart]),m.lookahead--,m.strstart++,r&&(h(m,!1),0===m.strm.avail_out)){q=P;break a}}q=(m.insert=0,c===B?(h(m,!0),0===m.strm.avail_out?W:O):m.last_lit&&(h(m,!1),0===m.strm.avail_out)?
-P:T)}else if(3===m.strategy)a:{var R,J;for(r=m.window;;){if(m.lookahead<=U){if(n(m),m.lookahead<=U&&c===G){q=P;break a}if(0===m.lookahead)break}if(m.match_length=0,m.lookahead>=H&&0<m.strstart&&(J=m.strstart-1,R=r[J],R===r[++J]&&R===r[++J]&&R===r[++J])){for(d=m.strstart+U;R===r[++J]&&R===r[++J]&&R===r[++J]&&R===r[++J]&&R===r[++J]&&R===r[++J]&&R===r[++J]&&R===r[++J]&&J<d;);m.match_length=U-(d-J);m.match_length>m.lookahead&&(m.match_length=m.lookahead)}if(m.match_length>=H?(q=F._tr_tally(m,1,m.match_length-
-H),m.lookahead-=m.match_length,m.strstart+=m.match_length,m.match_length=0):(q=F._tr_tally(m,0,m.window[m.strstart]),m.lookahead--,m.strstart++),q&&(h(m,!1),0===m.strm.avail_out)){q=P;break a}}q=(m.insert=0,c===B?(h(m,!0),0===m.strm.avail_out?W:O):m.last_lit&&(h(m,!1),0===m.strm.avail_out)?P:T)}else q=z[m.level].func(m,c);if(q!==W&&q!==O||(m.status=666),q===P||q===W)return 0===b.avail_out&&(m.last_flush=-1),M;if(q===T&&(1===c?F._tr_align(m):5!==c&&(F._tr_stored_block(m,0,0,!1),3===c&&(f(m.head),0===
+this.ins_h=0;this.dyn_ltree=new u.Buf16(2*ca);this.dyn_dtree=new u.Buf16(2*(2*I+1));this.bl_tree=new u.Buf16(2*(2*J+1));f(this.dyn_ltree);f(this.dyn_dtree);f(this.bl_tree);this.bl_desc=this.d_desc=this.l_desc=null;this.bl_count=new u.Buf16(N+1);this.heap=new u.Buf16(2*R+1);f(this.heap);this.heap_max=this.heap_len=0;this.depth=new u.Buf16(2*R+1);f(this.depth);this.bi_valid=this.bi_buf=this.insert=this.matches=this.static_len=this.opt_len=this.d_buf=this.last_lit=this.lit_bufsize=this.l_buf=0}function z(b){var c;
+return b&&b.state?(b.total_in=b.total_out=0,b.data_type=ba,c=b.state,c.pending=0,c.pending_out=0,0>c.wrap&&(c.wrap=-c.wrap),c.status=c.wrap?ea:aa,b.adler=2===c.wrap?0:1,c.last_flush=G,D._tr_init(c),M):e(b,L)}function w(b){var c=z(b);c===M&&(b=b.state,b.window_size=2*b.w_size,f(b.head),b.max_lazy_match=y[b.level].max_lazy,b.good_match=y[b.level].good_length,b.nice_match=y[b.level].nice_length,b.max_chain_length=y[b.level].max_chain,b.strstart=0,b.block_start=0,b.lookahead=0,b.insert=0,b.match_length=
+b.prev_length=K-1,b.match_available=0,b.ins_h=0);return c}function x(b,c,d,f,g,h){if(!b)return L;var k=1;if(c===H&&(c=6),0>f?(k=0,f=-f):15<f&&(k=2,f-=16),1>g||g>v||d!==A||8>f||15<f||0>c||9<c||0>h||h>S)return e(b,L);8===f&&(f=9);var l=new t;return b.state=l,l.strm=b,l.wrap=k,l.gzhead=null,l.w_bits=f,l.w_size=1<<l.w_bits,l.w_mask=l.w_size-1,l.hash_bits=g+7,l.hash_size=1<<l.hash_bits,l.hash_mask=l.hash_size-1,l.hash_shift=~~((l.hash_bits+K-1)/K),l.window=new u.Buf8(2*l.w_size),l.head=new u.Buf16(l.hash_size),
+l.prev=new u.Buf16(l.w_size),l.lit_bufsize=1<<g+6,l.pending_buf_size=4*l.lit_bufsize,l.pending_buf=new u.Buf8(l.pending_buf_size),l.d_buf=1*l.lit_bufsize,l.l_buf=3*l.lit_bufsize,l.level=c,l.strategy=h,l.method=d,w(b)}var y,u=b("../utils/common"),D=b("./trees"),F=b("./adler32"),E=b("./crc32"),C=b("./messages"),G=0,B=4,M=0,L=-2,H=-1,U=1,S=4,ba=2,A=8,v=9,R=286,I=30,J=19,ca=2*R+1,N=15,K=3,X=258,T=X+K+1,ea=42,aa=113,P=1,V=2,W=3,O=4;y=[new q(0,0,0,0,function(b,c){var d=65535;for(d>b.pending_buf_size-5&&
+(d=b.pending_buf_size-5);;){if(1>=b.lookahead){if(n(b),0===b.lookahead&&c===G)return P;if(0===b.lookahead)break}b.strstart+=b.lookahead;b.lookahead=0;var e=b.block_start+d;if((0===b.strstart||b.strstart>=e)&&(b.lookahead=b.strstart-e,b.strstart=e,h(b,!1),0===b.strm.avail_out)||b.strstart-b.block_start>=b.w_size-T&&(h(b,!1),0===b.strm.avail_out))return P}return b.insert=0,c===B?(h(b,!0),0===b.strm.avail_out?W:O):(b.strstart>b.block_start&&h(b,!1),P)}),new q(4,4,8,4,p),new q(4,5,16,8,p),new q(4,6,32,
+32,p),new q(4,4,16,16,r),new q(8,16,32,32,r),new q(8,16,128,128,r),new q(8,32,128,256,r),new q(32,128,258,1024,r),new q(32,258,258,4096,r)];d.deflateInit=function(b,c){return x(b,c,A,15,8,0)};d.deflateInit2=x;d.deflateReset=w;d.deflateResetKeep=z;d.deflateSetHeader=function(b,c){return b&&b.state?2!==b.state.wrap?L:(b.state.gzhead=c,M):L};d.deflate=function(b,c){var d,m,v,p;if(!b||!b.state||5<c||0>c)return b?e(b,L):L;if(m=b.state,!b.output||!b.input&&0!==b.avail_in||666===m.status&&c!==B)return e(b,
+0===b.avail_out?-5:L);if(m.strm=b,d=m.last_flush,m.last_flush=c,m.status===ea)2===m.wrap?(b.adler=0,k(m,31),k(m,139),k(m,8),m.gzhead?(k(m,(m.gzhead.text?1:0)+(m.gzhead.hcrc?2:0)+(m.gzhead.extra?4:0)+(m.gzhead.name?8:0)+(m.gzhead.comment?16:0)),k(m,255&m.gzhead.time),k(m,m.gzhead.time>>8&255),k(m,m.gzhead.time>>16&255),k(m,m.gzhead.time>>24&255),k(m,9===m.level?2:2<=m.strategy||2>m.level?4:0),k(m,255&m.gzhead.os),m.gzhead.extra&&m.gzhead.extra.length&&(k(m,255&m.gzhead.extra.length),k(m,m.gzhead.extra.length>>
+8&255)),m.gzhead.hcrc&&(b.adler=E(b.adler,m.pending_buf,m.pending,0)),m.gzindex=0,m.status=69):(k(m,0),k(m,0),k(m,0),k(m,0),k(m,0),k(m,9===m.level?2:2<=m.strategy||2>m.level?4:0),k(m,3),m.status=aa)):(v=A+(m.w_bits-8<<4)<<8,v|=(2<=m.strategy||2>m.level?0:6>m.level?1:6===m.level?2:3)<<6,0!==m.strstart&&(v|=32),m.status=aa,l(m,v+(31-v%31)),0!==m.strstart&&(l(m,b.adler>>>16),l(m,65535&b.adler)),b.adler=1);if(69===m.status)if(m.gzhead.extra){for(v=m.pending;m.gzindex<(65535&m.gzhead.extra.length)&&(m.pending!==
+m.pending_buf_size||(m.gzhead.hcrc&&m.pending>v&&(b.adler=E(b.adler,m.pending_buf,m.pending-v,v)),g(b),v=m.pending,m.pending!==m.pending_buf_size));)k(m,255&m.gzhead.extra[m.gzindex]),m.gzindex++;m.gzhead.hcrc&&m.pending>v&&(b.adler=E(b.adler,m.pending_buf,m.pending-v,v));m.gzindex===m.gzhead.extra.length&&(m.gzindex=0,m.status=73)}else m.status=73;if(73===m.status)if(m.gzhead.name){v=m.pending;do{if(m.pending===m.pending_buf_size&&(m.gzhead.hcrc&&m.pending>v&&(b.adler=E(b.adler,m.pending_buf,m.pending-
+v,v)),g(b),v=m.pending,m.pending===m.pending_buf_size)){p=1;break}p=m.gzindex<m.gzhead.name.length?255&m.gzhead.name.charCodeAt(m.gzindex++):0;k(m,p)}while(0!==p);m.gzhead.hcrc&&m.pending>v&&(b.adler=E(b.adler,m.pending_buf,m.pending-v,v));0===p&&(m.gzindex=0,m.status=91)}else m.status=91;if(91===m.status)if(m.gzhead.comment){v=m.pending;do{if(m.pending===m.pending_buf_size&&(m.gzhead.hcrc&&m.pending>v&&(b.adler=E(b.adler,m.pending_buf,m.pending-v,v)),g(b),v=m.pending,m.pending===m.pending_buf_size)){p=
+1;break}p=m.gzindex<m.gzhead.comment.length?255&m.gzhead.comment.charCodeAt(m.gzindex++):0;k(m,p)}while(0!==p);m.gzhead.hcrc&&m.pending>v&&(b.adler=E(b.adler,m.pending_buf,m.pending-v,v));0===p&&(m.status=103)}else m.status=103;if(103===m.status&&(m.gzhead.hcrc?(m.pending+2>m.pending_buf_size&&g(b),m.pending+2<=m.pending_buf_size&&(k(m,255&b.adler),k(m,b.adler>>8&255),b.adler=0,m.status=aa)):m.status=aa),0!==m.pending){if(g(b),0===b.avail_out)return m.last_flush=-1,M}else if(0===b.avail_in&&(c<<1)-
+(4<c?9:0)<=(d<<1)-(4<d?9:0)&&c!==B)return e(b,-5);if(666===m.status&&0!==b.avail_in)return e(b,-5);if(0!==b.avail_in||0!==m.lookahead||c!==G&&666!==m.status){var q;if(2===m.strategy)a:{for(var r;;){if(0===m.lookahead&&(n(m),0===m.lookahead)){if(c===G){q=P;break a}break}if(m.match_length=0,r=D._tr_tally(m,0,m.window[m.strstart]),m.lookahead--,m.strstart++,r&&(h(m,!1),0===m.strm.avail_out)){q=P;break a}}q=(m.insert=0,c===B?(h(m,!0),0===m.strm.avail_out?W:O):m.last_lit&&(h(m,!1),0===m.strm.avail_out)?
+P:V)}else if(3===m.strategy)a:{var R,I;for(r=m.window;;){if(m.lookahead<=X){if(n(m),m.lookahead<=X&&c===G){q=P;break a}if(0===m.lookahead)break}if(m.match_length=0,m.lookahead>=K&&0<m.strstart&&(I=m.strstart-1,R=r[I],R===r[++I]&&R===r[++I]&&R===r[++I])){for(d=m.strstart+X;R===r[++I]&&R===r[++I]&&R===r[++I]&&R===r[++I]&&R===r[++I]&&R===r[++I]&&R===r[++I]&&R===r[++I]&&I<d;);m.match_length=X-(d-I);m.match_length>m.lookahead&&(m.match_length=m.lookahead)}if(m.match_length>=K?(q=D._tr_tally(m,1,m.match_length-
+K),m.lookahead-=m.match_length,m.strstart+=m.match_length,m.match_length=0):(q=D._tr_tally(m,0,m.window[m.strstart]),m.lookahead--,m.strstart++),q&&(h(m,!1),0===m.strm.avail_out)){q=P;break a}}q=(m.insert=0,c===B?(h(m,!0),0===m.strm.avail_out?W:O):m.last_lit&&(h(m,!1),0===m.strm.avail_out)?P:V)}else q=y[m.level].func(m,c);if(q!==W&&q!==O||(m.status=666),q===P||q===W)return 0===b.avail_out&&(m.last_flush=-1),M;if(q===V&&(1===c?D._tr_align(m):5!==c&&(D._tr_stored_block(m,0,0,!1),3===c&&(f(m.head),0===
 m.lookahead&&(m.strstart=0,m.block_start=0,m.insert=0))),g(b),0===b.avail_out))return m.last_flush=-1,M}return c!==B?M:0>=m.wrap?1:(2===m.wrap?(k(m,255&b.adler),k(m,b.adler>>8&255),k(m,b.adler>>16&255),k(m,b.adler>>24&255),k(m,255&b.total_in),k(m,b.total_in>>8&255),k(m,b.total_in>>16&255),k(m,b.total_in>>24&255)):(l(m,b.adler>>>16),l(m,65535&b.adler)),g(b),0<m.wrap&&(m.wrap=-m.wrap),0!==m.pending?M:1)};d.deflateEnd=function(b){var c;return b&&b.state?(c=b.state.status,c!==ea&&69!==c&&73!==c&&91!==
-c&&103!==c&&c!==ca&&666!==c?e(b,K):(b.state=null,c===ca?e(b,-3):M)):K};d.deflateSetDictionary=function(b,c){var d,e,g,h,k,l,m;e=c.length;if(!b||!b.state||(d=b.state,h=d.wrap,2===h||1===h&&d.status!==ea||d.lookahead))return K;1===h&&(b.adler=E(b.adler,c,e,0));d.wrap=0;e>=d.w_size&&(0===h&&(f(d.head),d.strstart=0,d.block_start=0,d.insert=0),k=new u.Buf8(d.w_size),u.arraySet(k,c,e-d.w_size,d.w_size,0),c=k,e=d.w_size);k=b.avail_in;l=b.next_in;m=b.input;b.avail_in=e;b.next_in=0;b.input=c;for(n(d);d.lookahead>=
-H;){e=d.strstart;g=d.lookahead-(H-1);do d.ins_h=(d.ins_h<<d.hash_shift^d.window[e+H-1])&d.hash_mask,d.prev[e&d.w_mask]=d.head[d.ins_h],d.head[d.ins_h]=e,e++;while(--g);d.strstart=e;d.lookahead=H-1;n(d)}return d.strstart+=d.lookahead,d.block_start=d.strstart,d.insert=d.lookahead,d.lookahead=0,d.match_length=d.prev_length=H-1,d.match_available=0,b.next_in=l,b.input=m,b.avail_in=k,d.wrap=h,M};d.deflateInfo="pako deflate (from Nodeca project)"},{"../utils/common":3,"./adler32":5,"./crc32":7,"./messages":13,
-"./trees":14}],9:[function(b,c,d){c.exports=function(){this.os=this.xflags=this.time=this.text=0;this.extra=null;this.extra_len=0;this.comment=this.name="";this.hcrc=0;this.done=!1}},{}],10:[function(b,c,d){c.exports=function(b,c){var d,e,f,l,m,n,p,r,q,t,y,x,w,z,u,F,E,D,C,G,B,M,K,L;d=b.state;e=b.next_in;K=b.input;f=e+(b.avail_in-5);l=b.next_out;L=b.output;m=l-(c-b.avail_out);n=l+(b.avail_out-257);p=d.dmax;r=d.wsize;q=d.whave;t=d.wnext;y=d.window;x=d.hold;w=d.bits;z=d.lencode;u=d.distcode;F=(1<<d.lenbits)-
-1;E=(1<<d.distbits)-1;a:do b:for(15>w&&(x+=K[e++]<<w,w+=8,x+=K[e++]<<w,w+=8),D=z[x&F];;){if(C=D>>>24,x>>>=C,w-=C,C=D>>>16&255,0===C)L[l++]=65535&D;else{if(!(16&C)){if(0===(64&C)){D=z[(65535&D)+(x&(1<<C)-1)];continue b}if(32&C){d.mode=12;break a}b.msg="invalid literal/length code";d.mode=30;break a}G=65535&D;(C&=15)&&(w<C&&(x+=K[e++]<<w,w+=8),G+=x&(1<<C)-1,x>>>=C,w-=C);15>w&&(x+=K[e++]<<w,w+=8,x+=K[e++]<<w,w+=8);D=u[x&E];c:for(;;){if(C=D>>>24,x>>>=C,w-=C,C=D>>>16&255,!(16&C)){if(0===(64&C)){D=u[(65535&
-D)+(x&(1<<C)-1)];continue c}b.msg="invalid distance code";d.mode=30;break a}if(B=65535&D,C&=15,w<C&&(x+=K[e++]<<w,w+=8,w<C&&(x+=K[e++]<<w,w+=8)),B+=x&(1<<C)-1,B>p){b.msg="invalid distance too far back";d.mode=30;break a}if(x>>>=C,w-=C,C=l-m,B>C){if(C=B-C,C>q&&d.sane){b.msg="invalid distance too far back";d.mode=30;break a}if(D=0,M=y,0===t){if(D+=r-C,C<G){G-=C;do L[l++]=y[D++];while(--C);D=l-B;M=L}}else if(t<C){if(D+=r+t-C,C-=t,C<G){G-=C;do L[l++]=y[D++];while(--C);if(D=0,t<G){C=t;G-=C;do L[l++]=y[D++];
-while(--C);D=l-B;M=L}}}else if(D+=t-C,C<G){G-=C;do L[l++]=y[D++];while(--C);D=l-B;M=L}for(;2<G;)L[l++]=M[D++],L[l++]=M[D++],L[l++]=M[D++],G-=3;G&&(L[l++]=M[D++],1<G&&(L[l++]=M[D++]))}else{D=l-B;do L[l++]=L[D++],L[l++]=L[D++],L[l++]=L[D++],G-=3;while(2<G);G&&(L[l++]=L[D++],1<G&&(L[l++]=L[D++]))}break}}break}while(e<f&&l<n);G=w>>3;e-=G;w-=G<<3;b.next_in=e;b.next_out=l;b.avail_in=e<f?5+(f-e):5-(e-f);b.avail_out=l<n?257+(n-l):257-(l-n);d.hold=x&(1<<w)-1;d.bits=w}},{}],11:[function(b,c,d){function e(b){return(b>>>
+c&&103!==c&&c!==aa&&666!==c?e(b,L):(b.state=null,c===aa?e(b,-3):M)):L};d.deflateSetDictionary=function(b,c){var d,e,g,h,k,l,m;e=c.length;if(!b||!b.state||(d=b.state,h=d.wrap,2===h||1===h&&d.status!==ea||d.lookahead))return L;1===h&&(b.adler=F(b.adler,c,e,0));d.wrap=0;e>=d.w_size&&(0===h&&(f(d.head),d.strstart=0,d.block_start=0,d.insert=0),k=new u.Buf8(d.w_size),u.arraySet(k,c,e-d.w_size,d.w_size,0),c=k,e=d.w_size);k=b.avail_in;l=b.next_in;m=b.input;b.avail_in=e;b.next_in=0;b.input=c;for(n(d);d.lookahead>=
+K;){e=d.strstart;g=d.lookahead-(K-1);do d.ins_h=(d.ins_h<<d.hash_shift^d.window[e+K-1])&d.hash_mask,d.prev[e&d.w_mask]=d.head[d.ins_h],d.head[d.ins_h]=e,e++;while(--g);d.strstart=e;d.lookahead=K-1;n(d)}return d.strstart+=d.lookahead,d.block_start=d.strstart,d.insert=d.lookahead,d.lookahead=0,d.match_length=d.prev_length=K-1,d.match_available=0,b.next_in=l,b.input=m,b.avail_in=k,d.wrap=h,M};d.deflateInfo="pako deflate (from Nodeca project)"},{"../utils/common":3,"./adler32":5,"./crc32":7,"./messages":13,
+"./trees":14}],9:[function(b,c,d){c.exports=function(){this.os=this.xflags=this.time=this.text=0;this.extra=null;this.extra_len=0;this.comment=this.name="";this.hcrc=0;this.done=!1}},{}],10:[function(b,c,d){c.exports=function(b,c){var d,e,f,l,m,n,p,r,q,t,z,w,x,y,u,D,F,E,C,G,B,M,L,H;d=b.state;e=b.next_in;L=b.input;f=e+(b.avail_in-5);l=b.next_out;H=b.output;m=l-(c-b.avail_out);n=l+(b.avail_out-257);p=d.dmax;r=d.wsize;q=d.whave;t=d.wnext;z=d.window;w=d.hold;x=d.bits;y=d.lencode;u=d.distcode;D=(1<<d.lenbits)-
+1;F=(1<<d.distbits)-1;a:do b:for(15>x&&(w+=L[e++]<<x,x+=8,w+=L[e++]<<x,x+=8),E=y[w&D];;){if(C=E>>>24,w>>>=C,x-=C,C=E>>>16&255,0===C)H[l++]=65535&E;else{if(!(16&C)){if(0===(64&C)){E=y[(65535&E)+(w&(1<<C)-1)];continue b}if(32&C){d.mode=12;break a}b.msg="invalid literal/length code";d.mode=30;break a}G=65535&E;(C&=15)&&(x<C&&(w+=L[e++]<<x,x+=8),G+=w&(1<<C)-1,w>>>=C,x-=C);15>x&&(w+=L[e++]<<x,x+=8,w+=L[e++]<<x,x+=8);E=u[w&F];c:for(;;){if(C=E>>>24,w>>>=C,x-=C,C=E>>>16&255,!(16&C)){if(0===(64&C)){E=u[(65535&
+E)+(w&(1<<C)-1)];continue c}b.msg="invalid distance code";d.mode=30;break a}if(B=65535&E,C&=15,x<C&&(w+=L[e++]<<x,x+=8,x<C&&(w+=L[e++]<<x,x+=8)),B+=w&(1<<C)-1,B>p){b.msg="invalid distance too far back";d.mode=30;break a}if(w>>>=C,x-=C,C=l-m,B>C){if(C=B-C,C>q&&d.sane){b.msg="invalid distance too far back";d.mode=30;break a}if(E=0,M=z,0===t){if(E+=r-C,C<G){G-=C;do H[l++]=z[E++];while(--C);E=l-B;M=H}}else if(t<C){if(E+=r+t-C,C-=t,C<G){G-=C;do H[l++]=z[E++];while(--C);if(E=0,t<G){C=t;G-=C;do H[l++]=z[E++];
+while(--C);E=l-B;M=H}}}else if(E+=t-C,C<G){G-=C;do H[l++]=z[E++];while(--C);E=l-B;M=H}for(;2<G;)H[l++]=M[E++],H[l++]=M[E++],H[l++]=M[E++],G-=3;G&&(H[l++]=M[E++],1<G&&(H[l++]=M[E++]))}else{E=l-B;do H[l++]=H[E++],H[l++]=H[E++],H[l++]=H[E++],G-=3;while(2<G);G&&(H[l++]=H[E++],1<G&&(H[l++]=H[E++]))}break}}break}while(e<f&&l<n);G=x>>3;e-=G;x-=G<<3;b.next_in=e;b.next_out=l;b.avail_in=e<f?5+(f-e):5-(e-f);b.avail_out=l<n?257+(n-l):257-(l-n);d.hold=w&(1<<x)-1;d.bits=x}},{}],11:[function(b,c,d){function e(b){return(b>>>
 24&255)+(b>>>8&65280)+((65280&b)<<8)+((255&b)<<24)}function f(){this.mode=0;this.last=!1;this.wrap=0;this.havedict=!1;this.total=this.check=this.dmax=this.flags=0;this.head=null;this.wnext=this.whave=this.wsize=this.wbits=0;this.window=null;this.extra=this.offset=this.length=this.bits=this.hold=0;this.distcode=this.lencode=null;this.have=this.ndist=this.nlen=this.ncode=this.distbits=this.lenbits=0;this.next=null;this.lens=new r.Buf16(320);this.work=new r.Buf16(288);this.distdyn=this.lendyn=null;this.was=
-this.back=this.sane=0}function g(b){var c;return b&&b.state?(c=b.state,b.total_in=b.total_out=c.total=0,b.msg="",c.wrap&&(b.adler=1&c.wrap),c.mode=u,c.last=0,c.havedict=0,c.dmax=32768,c.head=null,c.hold=0,c.bits=0,c.lencode=c.lendyn=new r.Buf32(F),c.distcode=c.distdyn=new r.Buf32(E),c.sane=1,c.back=-1,w):z}function h(b){var c;return b&&b.state?(c=b.state,c.wsize=0,c.whave=0,c.wnext=0,g(b)):z}function k(b,c){var d,e;return b&&b.state?(e=b.state,0>c?(d=0,c=-c):(d=(c>>4)+1,48>c&&(c&=15)),c&&(8>c||15<
-c)?z:(null!==e.window&&e.wbits!==c&&(e.window=null),e.wrap=d,e.wbits=c,h(b))):z}function l(b,c){var d,e;return b?(e=new f,b.state=e,e.window=null,d=k(b,c),d!==w&&(b.state=null),d):z}function m(b,c,d,e){var f;b=b.state;return null===b.window&&(b.wsize=1<<b.wbits,b.wnext=0,b.whave=0,b.window=new r.Buf8(b.wsize)),e>=b.wsize?(r.arraySet(b.window,c,d-b.wsize,b.wsize,0),b.wnext=0,b.whave=b.wsize):(f=b.wsize-b.wnext,f>e&&(f=e),r.arraySet(b.window,c,d-e,f,b.wnext),e-=f,e?(r.arraySet(b.window,c,d-e,e,0),b.wnext=
-e,b.whave=b.wsize):(b.wnext+=f,b.wnext===b.wsize&&(b.wnext=0),b.whave<b.wsize&&(b.whave+=f))),0}var n,p,r=b("../utils/common"),q=b("./adler32"),t=b("./crc32"),y=b("./inffast"),x=b("./inftrees"),w=0,z=-2,u=1,F=852,E=592,D=!0;d.inflateReset=h;d.inflateReset2=k;d.inflateResetKeep=g;d.inflateInit=function(b){return l(b,15)};d.inflateInit2=l;d.inflate=function(b,c){var d,f,g,h,k,l,C,A,v,R,J,I,aa,N,H,G,E,F,ca,P,T,W,O=0,Q=new r.Buf8(4),fa=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15];if(!b||!b.state||
-!b.output||!b.input&&0!==b.avail_in)return z;d=b.state;12===d.mode&&(d.mode=13);k=b.next_out;g=b.output;C=b.avail_out;h=b.next_in;f=b.input;l=b.avail_in;A=d.hold;v=d.bits;R=l;J=C;T=w;a:for(;;)switch(d.mode){case u:if(0===d.wrap){d.mode=13;break}for(;16>v;){if(0===l)break a;l--;A+=f[h++]<<v;v+=8}if(2&d.wrap&&35615===A){d.check=0;Q[0]=255&A;Q[1]=A>>>8&255;d.check=t(d.check,Q,2,0);v=A=0;d.mode=2;break}if(d.flags=0,d.head&&(d.head.done=!1),!(1&d.wrap)||(((255&A)<<8)+(A>>8))%31){b.msg="incorrect header check";
+this.back=this.sane=0}function g(b){var c;return b&&b.state?(c=b.state,b.total_in=b.total_out=c.total=0,b.msg="",c.wrap&&(b.adler=1&c.wrap),c.mode=u,c.last=0,c.havedict=0,c.dmax=32768,c.head=null,c.hold=0,c.bits=0,c.lencode=c.lendyn=new r.Buf32(D),c.distcode=c.distdyn=new r.Buf32(F),c.sane=1,c.back=-1,x):y}function h(b){var c;return b&&b.state?(c=b.state,c.wsize=0,c.whave=0,c.wnext=0,g(b)):y}function k(b,c){var d,e;return b&&b.state?(e=b.state,0>c?(d=0,c=-c):(d=(c>>4)+1,48>c&&(c&=15)),c&&(8>c||15<
+c)?y:(null!==e.window&&e.wbits!==c&&(e.window=null),e.wrap=d,e.wbits=c,h(b))):y}function l(b,c){var d,e;return b?(e=new f,b.state=e,e.window=null,d=k(b,c),d!==x&&(b.state=null),d):y}function m(b,c,d,e){var f;b=b.state;return null===b.window&&(b.wsize=1<<b.wbits,b.wnext=0,b.whave=0,b.window=new r.Buf8(b.wsize)),e>=b.wsize?(r.arraySet(b.window,c,d-b.wsize,b.wsize,0),b.wnext=0,b.whave=b.wsize):(f=b.wsize-b.wnext,f>e&&(f=e),r.arraySet(b.window,c,d-e,f,b.wnext),e-=f,e?(r.arraySet(b.window,c,d-e,e,0),b.wnext=
+e,b.whave=b.wsize):(b.wnext+=f,b.wnext===b.wsize&&(b.wnext=0),b.whave<b.wsize&&(b.whave+=f))),0}var n,p,r=b("../utils/common"),q=b("./adler32"),t=b("./crc32"),z=b("./inffast"),w=b("./inftrees"),x=0,y=-2,u=1,D=852,F=592,E=!0;d.inflateReset=h;d.inflateReset2=k;d.inflateResetKeep=g;d.inflateInit=function(b){return l(b,15)};d.inflateInit2=l;d.inflate=function(b,c){var d,f,g,h,k,l,C,A,v,R,I,J,ca,N,K,G,D,F,aa,P,V,W,O=0,Q=new r.Buf8(4),fa=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15];if(!b||!b.state||
+!b.output||!b.input&&0!==b.avail_in)return y;d=b.state;12===d.mode&&(d.mode=13);k=b.next_out;g=b.output;C=b.avail_out;h=b.next_in;f=b.input;l=b.avail_in;A=d.hold;v=d.bits;R=l;I=C;V=x;a:for(;;)switch(d.mode){case u:if(0===d.wrap){d.mode=13;break}for(;16>v;){if(0===l)break a;l--;A+=f[h++]<<v;v+=8}if(2&d.wrap&&35615===A){d.check=0;Q[0]=255&A;Q[1]=A>>>8&255;d.check=t(d.check,Q,2,0);v=A=0;d.mode=2;break}if(d.flags=0,d.head&&(d.head.done=!1),!(1&d.wrap)||(((255&A)<<8)+(A>>8))%31){b.msg="incorrect header check";
 d.mode=30;break}if(8!==(15&A)){b.msg="unknown compression method";d.mode=30;break}if(A>>>=4,v-=4,P=(15&A)+8,0===d.wbits)d.wbits=P;else if(P>d.wbits){b.msg="invalid window size";d.mode=30;break}d.dmax=1<<P;b.adler=d.check=1;d.mode=512&A?10:12;v=A=0;break;case 2:for(;16>v;){if(0===l)break a;l--;A+=f[h++]<<v;v+=8}if(d.flags=A,8!==(255&d.flags)){b.msg="unknown compression method";d.mode=30;break}if(57344&d.flags){b.msg="unknown header flags set";d.mode=30;break}d.head&&(d.head.text=A>>8&1);512&d.flags&&
 (Q[0]=255&A,Q[1]=A>>>8&255,d.check=t(d.check,Q,2,0));v=A=0;d.mode=3;case 3:for(;32>v;){if(0===l)break a;l--;A+=f[h++]<<v;v+=8}d.head&&(d.head.time=A);512&d.flags&&(Q[0]=255&A,Q[1]=A>>>8&255,Q[2]=A>>>16&255,Q[3]=A>>>24&255,d.check=t(d.check,Q,4,0));v=A=0;d.mode=4;case 4:for(;16>v;){if(0===l)break a;l--;A+=f[h++]<<v;v+=8}d.head&&(d.head.xflags=255&A,d.head.os=A>>8);512&d.flags&&(Q[0]=255&A,Q[1]=A>>>8&255,d.check=t(d.check,Q,2,0));v=A=0;d.mode=5;case 5:if(1024&d.flags){for(;16>v;){if(0===l)break a;l--;
-A+=f[h++]<<v;v+=8}d.length=A;d.head&&(d.head.extra_len=A);512&d.flags&&(Q[0]=255&A,Q[1]=A>>>8&255,d.check=t(d.check,Q,2,0));v=A=0}else d.head&&(d.head.extra=null);d.mode=6;case 6:if(1024&d.flags&&(I=d.length,I>l&&(I=l),I&&(d.head&&(P=d.head.extra_len-d.length,d.head.extra||(d.head.extra=Array(d.head.extra_len)),r.arraySet(d.head.extra,f,h,I,P)),512&d.flags&&(d.check=t(d.check,f,I,h)),l-=I,h+=I,d.length-=I),d.length))break a;d.length=0;d.mode=7;case 7:if(2048&d.flags){if(0===l)break a;I=0;do P=f[h+
-I++],d.head&&P&&65536>d.length&&(d.head.name+=String.fromCharCode(P));while(P&&I<l);if(512&d.flags&&(d.check=t(d.check,f,I,h)),l-=I,h+=I,P)break a}else d.head&&(d.head.name=null);d.length=0;d.mode=8;case 8:if(4096&d.flags){if(0===l)break a;I=0;do P=f[h+I++],d.head&&P&&65536>d.length&&(d.head.comment+=String.fromCharCode(P));while(P&&I<l);if(512&d.flags&&(d.check=t(d.check,f,I,h)),l-=I,h+=I,P)break a}else d.head&&(d.head.comment=null);d.mode=9;case 9:if(512&d.flags){for(;16>v;){if(0===l)break a;l--;
+A+=f[h++]<<v;v+=8}d.length=A;d.head&&(d.head.extra_len=A);512&d.flags&&(Q[0]=255&A,Q[1]=A>>>8&255,d.check=t(d.check,Q,2,0));v=A=0}else d.head&&(d.head.extra=null);d.mode=6;case 6:if(1024&d.flags&&(J=d.length,J>l&&(J=l),J&&(d.head&&(P=d.head.extra_len-d.length,d.head.extra||(d.head.extra=Array(d.head.extra_len)),r.arraySet(d.head.extra,f,h,J,P)),512&d.flags&&(d.check=t(d.check,f,J,h)),l-=J,h+=J,d.length-=J),d.length))break a;d.length=0;d.mode=7;case 7:if(2048&d.flags){if(0===l)break a;J=0;do P=f[h+
+J++],d.head&&P&&65536>d.length&&(d.head.name+=String.fromCharCode(P));while(P&&J<l);if(512&d.flags&&(d.check=t(d.check,f,J,h)),l-=J,h+=J,P)break a}else d.head&&(d.head.name=null);d.length=0;d.mode=8;case 8:if(4096&d.flags){if(0===l)break a;J=0;do P=f[h+J++],d.head&&P&&65536>d.length&&(d.head.comment+=String.fromCharCode(P));while(P&&J<l);if(512&d.flags&&(d.check=t(d.check,f,J,h)),l-=J,h+=J,P)break a}else d.head&&(d.head.comment=null);d.mode=9;case 9:if(512&d.flags){for(;16>v;){if(0===l)break a;l--;
 A+=f[h++]<<v;v+=8}if(A!==(65535&d.check)){b.msg="header crc mismatch";d.mode=30;break}v=A=0}d.head&&(d.head.hcrc=d.flags>>9&1,d.head.done=!0);b.adler=d.check=0;d.mode=12;break;case 10:for(;32>v;){if(0===l)break a;l--;A+=f[h++]<<v;v+=8}b.adler=d.check=e(A);v=A=0;d.mode=11;case 11:if(0===d.havedict)return b.next_out=k,b.avail_out=C,b.next_in=h,b.avail_in=l,d.hold=A,d.bits=v,2;b.adler=d.check=1;d.mode=12;case 12:if(5===c||6===c)break a;case 13:if(d.last){A>>>=7&v;v-=7&v;d.mode=27;break}for(;3>v;){if(0===
-l)break a;l--;A+=f[h++]<<v;v+=8}switch(d.last=1&A,A>>>=1,--v,3&A){case 0:d.mode=14;break;case 1:G=d;if(D){n=new r.Buf32(512);p=new r.Buf32(32);for(N=0;144>N;)G.lens[N++]=8;for(;256>N;)G.lens[N++]=9;for(;280>N;)G.lens[N++]=7;for(;288>N;)G.lens[N++]=8;x(1,G.lens,0,288,n,0,G.work,{bits:9});for(N=0;32>N;)G.lens[N++]=5;x(2,G.lens,0,32,p,0,G.work,{bits:5});D=!1}G.lencode=n;G.lenbits=9;G.distcode=p;G.distbits=5;if(d.mode=20,6===c){A>>>=2;v-=2;break a}break;case 2:d.mode=17;break;case 3:b.msg="invalid block type",
-d.mode=30}A>>>=2;v-=2;break;case 14:A>>>=7&v;for(v-=7&v;32>v;){if(0===l)break a;l--;A+=f[h++]<<v;v+=8}if((65535&A)!==(A>>>16^65535)){b.msg="invalid stored block lengths";d.mode=30;break}if(d.length=65535&A,A=0,v=0,d.mode=15,6===c)break a;case 15:d.mode=16;case 16:if(I=d.length){if(I>l&&(I=l),I>C&&(I=C),0===I)break a;r.arraySet(g,f,h,I,k);l-=I;h+=I;C-=I;k+=I;d.length-=I;break}d.mode=12;break;case 17:for(;14>v;){if(0===l)break a;l--;A+=f[h++]<<v;v+=8}if(d.nlen=(31&A)+257,A>>>=5,v-=5,d.ndist=(31&A)+
-1,A>>>=5,v-=5,d.ncode=(15&A)+4,A>>>=4,v-=4,286<d.nlen||30<d.ndist){b.msg="too many length or distance symbols";d.mode=30;break}d.have=0;d.mode=18;case 18:for(;d.have<d.ncode;){for(;3>v;){if(0===l)break a;l--;A+=f[h++]<<v;v+=8}d.lens[fa[d.have++]]=7&A;A>>>=3;v-=3}for(;19>d.have;)d.lens[fa[d.have++]]=0;if(d.lencode=d.lendyn,d.lenbits=7,W={bits:d.lenbits},T=x(0,d.lens,0,19,d.lencode,0,d.work,W),d.lenbits=W.bits,T){b.msg="invalid code lengths set";d.mode=30;break}d.have=0;d.mode=19;case 19:for(;d.have<
-d.nlen+d.ndist;){for(;O=d.lencode[A&(1<<d.lenbits)-1],H=O>>>24,G=65535&O,!(H<=v);){if(0===l)break a;l--;A+=f[h++]<<v;v+=8}if(16>G)A>>>=H,v-=H,d.lens[d.have++]=G;else{if(16===G){for(N=H+2;v<N;){if(0===l)break a;l--;A+=f[h++]<<v;v+=8}if(A>>>=H,v-=H,0===d.have){b.msg="invalid bit length repeat";d.mode=30;break}P=d.lens[d.have-1];I=3+(3&A);A>>>=2;v-=2}else if(17===G){for(N=H+3;v<N;){if(0===l)break a;l--;A+=f[h++]<<v;v+=8}A>>>=H;v-=H;P=0;I=3+(7&A);A>>>=3;v-=3}else{for(N=H+7;v<N;){if(0===l)break a;l--;
-A+=f[h++]<<v;v+=8}A>>>=H;v-=H;P=0;I=11+(127&A);A>>>=7;v-=7}if(d.have+I>d.nlen+d.ndist){b.msg="invalid bit length repeat";d.mode=30;break}for(;I--;)d.lens[d.have++]=P}}if(30===d.mode)break;if(0===d.lens[256]){b.msg="invalid code -- missing end-of-block";d.mode=30;break}if(d.lenbits=9,W={bits:d.lenbits},T=x(1,d.lens,0,d.nlen,d.lencode,0,d.work,W),d.lenbits=W.bits,T){b.msg="invalid literal/lengths set";d.mode=30;break}if(d.distbits=6,d.distcode=d.distdyn,W={bits:d.distbits},T=x(2,d.lens,d.nlen,d.ndist,
-d.distcode,0,d.work,W),d.distbits=W.bits,T){b.msg="invalid distances set";d.mode=30;break}if(d.mode=20,6===c)break a;case 20:d.mode=21;case 21:if(6<=l&&258<=C){b.next_out=k;b.avail_out=C;b.next_in=h;b.avail_in=l;d.hold=A;d.bits=v;y(b,J);k=b.next_out;g=b.output;C=b.avail_out;h=b.next_in;f=b.input;l=b.avail_in;A=d.hold;v=d.bits;12===d.mode&&(d.back=-1);break}for(d.back=0;O=d.lencode[A&(1<<d.lenbits)-1],H=O>>>24,N=O>>>16&255,G=65535&O,!(H<=v);){if(0===l)break a;l--;A+=f[h++]<<v;v+=8}if(N&&0===(240&N)){E=
-H;F=N;for(ca=G;O=d.lencode[ca+((A&(1<<E+F)-1)>>E)],H=O>>>24,N=O>>>16&255,G=65535&O,!(E+H<=v);){if(0===l)break a;l--;A+=f[h++]<<v;v+=8}A>>>=E;v-=E;d.back+=E}if(A>>>=H,v-=H,d.back+=H,d.length=G,0===N){d.mode=26;break}if(32&N){d.back=-1;d.mode=12;break}if(64&N){b.msg="invalid literal/length code";d.mode=30;break}d.extra=15&N;d.mode=22;case 22:if(d.extra){for(N=d.extra;v<N;){if(0===l)break a;l--;A+=f[h++]<<v;v+=8}d.length+=A&(1<<d.extra)-1;A>>>=d.extra;v-=d.extra;d.back+=d.extra}d.was=d.length;d.mode=
-23;case 23:for(;O=d.distcode[A&(1<<d.distbits)-1],H=O>>>24,N=O>>>16&255,G=65535&O,!(H<=v);){if(0===l)break a;l--;A+=f[h++]<<v;v+=8}if(0===(240&N)){E=H;F=N;for(ca=G;O=d.distcode[ca+((A&(1<<E+F)-1)>>E)],H=O>>>24,N=O>>>16&255,G=65535&O,!(E+H<=v);){if(0===l)break a;l--;A+=f[h++]<<v;v+=8}A>>>=E;v-=E;d.back+=E}if(A>>>=H,v-=H,d.back+=H,64&N){b.msg="invalid distance code";d.mode=30;break}d.offset=G;d.extra=15&N;d.mode=24;case 24:if(d.extra){for(N=d.extra;v<N;){if(0===l)break a;l--;A+=f[h++]<<v;v+=8}d.offset+=
-A&(1<<d.extra)-1;A>>>=d.extra;v-=d.extra;d.back+=d.extra}if(d.offset>d.dmax){b.msg="invalid distance too far back";d.mode=30;break}d.mode=25;case 25:if(0===C)break a;if(I=J-C,d.offset>I){if(I=d.offset-I,I>d.whave&&d.sane){b.msg="invalid distance too far back";d.mode=30;break}I>d.wnext?(I-=d.wnext,aa=d.wsize-I):aa=d.wnext-I;I>d.length&&(I=d.length);N=d.window}else N=g,aa=k-d.offset,I=d.length;I>C&&(I=C);C-=I;d.length-=I;do g[k++]=N[aa++];while(--I);0===d.length&&(d.mode=21);break;case 26:if(0===C)break a;
-g[k++]=d.length;C--;d.mode=21;break;case 27:if(d.wrap){for(;32>v;){if(0===l)break a;l--;A|=f[h++]<<v;v+=8}if(J-=C,b.total_out+=J,d.total+=J,J&&(b.adler=d.check=d.flags?t(d.check,g,J,k-J):q(d.check,g,J,k-J)),J=C,(d.flags?A:e(A))!==d.check){b.msg="incorrect data check";d.mode=30;break}v=A=0}d.mode=28;case 28:if(d.wrap&&d.flags){for(;32>v;){if(0===l)break a;l--;A+=f[h++]<<v;v+=8}if(A!==(4294967295&d.total)){b.msg="incorrect length check";d.mode=30;break}v=A=0}d.mode=29;case 29:T=1;break a;case 30:T=
--3;break a;case 31:return-4;default:return z}return b.next_out=k,b.avail_out=C,b.next_in=h,b.avail_in=l,d.hold=A,d.bits=v,(d.wsize||J!==b.avail_out&&30>d.mode&&(27>d.mode||4!==c))&&m(b,b.output,b.next_out,J-b.avail_out)?(d.mode=31,-4):(R-=b.avail_in,J-=b.avail_out,b.total_in+=R,b.total_out+=J,d.total+=J,d.wrap&&J&&(b.adler=d.check=d.flags?t(d.check,g,J,b.next_out-J):q(d.check,g,J,b.next_out-J)),b.data_type=d.bits+(d.last?64:0)+(12===d.mode?128:0)+(20===d.mode||15===d.mode?256:0),(0===R&&0===J||4===
-c)&&T===w&&(T=-5),T)};d.inflateEnd=function(b){if(!b||!b.state)return z;var c=b.state;return c.window&&(c.window=null),b.state=null,w};d.inflateGetHeader=function(b,c){var d;return b&&b.state?(d=b.state,0===(2&d.wrap)?z:(d.head=c,c.done=!1,w)):z};d.inflateSetDictionary=function(b,c){var d,e,f=c.length;return b&&b.state?(d=b.state,0!==d.wrap&&11!==d.mode?z:11===d.mode&&(e=1,e=q(e,c,f,0),e!==d.check)?-3:m(b,c,f,f)?(d.mode=31,-4):(d.havedict=1,w)):z};d.inflateInfo="pako inflate (from Nodeca project)"},
+l)break a;l--;A+=f[h++]<<v;v+=8}switch(d.last=1&A,A>>>=1,--v,3&A){case 0:d.mode=14;break;case 1:G=d;if(E){n=new r.Buf32(512);p=new r.Buf32(32);for(N=0;144>N;)G.lens[N++]=8;for(;256>N;)G.lens[N++]=9;for(;280>N;)G.lens[N++]=7;for(;288>N;)G.lens[N++]=8;w(1,G.lens,0,288,n,0,G.work,{bits:9});for(N=0;32>N;)G.lens[N++]=5;w(2,G.lens,0,32,p,0,G.work,{bits:5});E=!1}G.lencode=n;G.lenbits=9;G.distcode=p;G.distbits=5;if(d.mode=20,6===c){A>>>=2;v-=2;break a}break;case 2:d.mode=17;break;case 3:b.msg="invalid block type",
+d.mode=30}A>>>=2;v-=2;break;case 14:A>>>=7&v;for(v-=7&v;32>v;){if(0===l)break a;l--;A+=f[h++]<<v;v+=8}if((65535&A)!==(A>>>16^65535)){b.msg="invalid stored block lengths";d.mode=30;break}if(d.length=65535&A,A=0,v=0,d.mode=15,6===c)break a;case 15:d.mode=16;case 16:if(J=d.length){if(J>l&&(J=l),J>C&&(J=C),0===J)break a;r.arraySet(g,f,h,J,k);l-=J;h+=J;C-=J;k+=J;d.length-=J;break}d.mode=12;break;case 17:for(;14>v;){if(0===l)break a;l--;A+=f[h++]<<v;v+=8}if(d.nlen=(31&A)+257,A>>>=5,v-=5,d.ndist=(31&A)+
+1,A>>>=5,v-=5,d.ncode=(15&A)+4,A>>>=4,v-=4,286<d.nlen||30<d.ndist){b.msg="too many length or distance symbols";d.mode=30;break}d.have=0;d.mode=18;case 18:for(;d.have<d.ncode;){for(;3>v;){if(0===l)break a;l--;A+=f[h++]<<v;v+=8}d.lens[fa[d.have++]]=7&A;A>>>=3;v-=3}for(;19>d.have;)d.lens[fa[d.have++]]=0;if(d.lencode=d.lendyn,d.lenbits=7,W={bits:d.lenbits},V=w(0,d.lens,0,19,d.lencode,0,d.work,W),d.lenbits=W.bits,V){b.msg="invalid code lengths set";d.mode=30;break}d.have=0;d.mode=19;case 19:for(;d.have<
+d.nlen+d.ndist;){for(;O=d.lencode[A&(1<<d.lenbits)-1],K=O>>>24,G=65535&O,!(K<=v);){if(0===l)break a;l--;A+=f[h++]<<v;v+=8}if(16>G)A>>>=K,v-=K,d.lens[d.have++]=G;else{if(16===G){for(N=K+2;v<N;){if(0===l)break a;l--;A+=f[h++]<<v;v+=8}if(A>>>=K,v-=K,0===d.have){b.msg="invalid bit length repeat";d.mode=30;break}P=d.lens[d.have-1];J=3+(3&A);A>>>=2;v-=2}else if(17===G){for(N=K+3;v<N;){if(0===l)break a;l--;A+=f[h++]<<v;v+=8}A>>>=K;v-=K;P=0;J=3+(7&A);A>>>=3;v-=3}else{for(N=K+7;v<N;){if(0===l)break a;l--;
+A+=f[h++]<<v;v+=8}A>>>=K;v-=K;P=0;J=11+(127&A);A>>>=7;v-=7}if(d.have+J>d.nlen+d.ndist){b.msg="invalid bit length repeat";d.mode=30;break}for(;J--;)d.lens[d.have++]=P}}if(30===d.mode)break;if(0===d.lens[256]){b.msg="invalid code -- missing end-of-block";d.mode=30;break}if(d.lenbits=9,W={bits:d.lenbits},V=w(1,d.lens,0,d.nlen,d.lencode,0,d.work,W),d.lenbits=W.bits,V){b.msg="invalid literal/lengths set";d.mode=30;break}if(d.distbits=6,d.distcode=d.distdyn,W={bits:d.distbits},V=w(2,d.lens,d.nlen,d.ndist,
+d.distcode,0,d.work,W),d.distbits=W.bits,V){b.msg="invalid distances set";d.mode=30;break}if(d.mode=20,6===c)break a;case 20:d.mode=21;case 21:if(6<=l&&258<=C){b.next_out=k;b.avail_out=C;b.next_in=h;b.avail_in=l;d.hold=A;d.bits=v;z(b,I);k=b.next_out;g=b.output;C=b.avail_out;h=b.next_in;f=b.input;l=b.avail_in;A=d.hold;v=d.bits;12===d.mode&&(d.back=-1);break}for(d.back=0;O=d.lencode[A&(1<<d.lenbits)-1],K=O>>>24,N=O>>>16&255,G=65535&O,!(K<=v);){if(0===l)break a;l--;A+=f[h++]<<v;v+=8}if(N&&0===(240&N)){D=
+K;F=N;for(aa=G;O=d.lencode[aa+((A&(1<<D+F)-1)>>D)],K=O>>>24,N=O>>>16&255,G=65535&O,!(D+K<=v);){if(0===l)break a;l--;A+=f[h++]<<v;v+=8}A>>>=D;v-=D;d.back+=D}if(A>>>=K,v-=K,d.back+=K,d.length=G,0===N){d.mode=26;break}if(32&N){d.back=-1;d.mode=12;break}if(64&N){b.msg="invalid literal/length code";d.mode=30;break}d.extra=15&N;d.mode=22;case 22:if(d.extra){for(N=d.extra;v<N;){if(0===l)break a;l--;A+=f[h++]<<v;v+=8}d.length+=A&(1<<d.extra)-1;A>>>=d.extra;v-=d.extra;d.back+=d.extra}d.was=d.length;d.mode=
+23;case 23:for(;O=d.distcode[A&(1<<d.distbits)-1],K=O>>>24,N=O>>>16&255,G=65535&O,!(K<=v);){if(0===l)break a;l--;A+=f[h++]<<v;v+=8}if(0===(240&N)){D=K;F=N;for(aa=G;O=d.distcode[aa+((A&(1<<D+F)-1)>>D)],K=O>>>24,N=O>>>16&255,G=65535&O,!(D+K<=v);){if(0===l)break a;l--;A+=f[h++]<<v;v+=8}A>>>=D;v-=D;d.back+=D}if(A>>>=K,v-=K,d.back+=K,64&N){b.msg="invalid distance code";d.mode=30;break}d.offset=G;d.extra=15&N;d.mode=24;case 24:if(d.extra){for(N=d.extra;v<N;){if(0===l)break a;l--;A+=f[h++]<<v;v+=8}d.offset+=
+A&(1<<d.extra)-1;A>>>=d.extra;v-=d.extra;d.back+=d.extra}if(d.offset>d.dmax){b.msg="invalid distance too far back";d.mode=30;break}d.mode=25;case 25:if(0===C)break a;if(J=I-C,d.offset>J){if(J=d.offset-J,J>d.whave&&d.sane){b.msg="invalid distance too far back";d.mode=30;break}J>d.wnext?(J-=d.wnext,ca=d.wsize-J):ca=d.wnext-J;J>d.length&&(J=d.length);N=d.window}else N=g,ca=k-d.offset,J=d.length;J>C&&(J=C);C-=J;d.length-=J;do g[k++]=N[ca++];while(--J);0===d.length&&(d.mode=21);break;case 26:if(0===C)break a;
+g[k++]=d.length;C--;d.mode=21;break;case 27:if(d.wrap){for(;32>v;){if(0===l)break a;l--;A|=f[h++]<<v;v+=8}if(I-=C,b.total_out+=I,d.total+=I,I&&(b.adler=d.check=d.flags?t(d.check,g,I,k-I):q(d.check,g,I,k-I)),I=C,(d.flags?A:e(A))!==d.check){b.msg="incorrect data check";d.mode=30;break}v=A=0}d.mode=28;case 28:if(d.wrap&&d.flags){for(;32>v;){if(0===l)break a;l--;A+=f[h++]<<v;v+=8}if(A!==(4294967295&d.total)){b.msg="incorrect length check";d.mode=30;break}v=A=0}d.mode=29;case 29:V=1;break a;case 30:V=
+-3;break a;case 31:return-4;default:return y}return b.next_out=k,b.avail_out=C,b.next_in=h,b.avail_in=l,d.hold=A,d.bits=v,(d.wsize||I!==b.avail_out&&30>d.mode&&(27>d.mode||4!==c))&&m(b,b.output,b.next_out,I-b.avail_out)?(d.mode=31,-4):(R-=b.avail_in,I-=b.avail_out,b.total_in+=R,b.total_out+=I,d.total+=I,d.wrap&&I&&(b.adler=d.check=d.flags?t(d.check,g,I,b.next_out-I):q(d.check,g,I,b.next_out-I)),b.data_type=d.bits+(d.last?64:0)+(12===d.mode?128:0)+(20===d.mode||15===d.mode?256:0),(0===R&&0===I||4===
+c)&&V===x&&(V=-5),V)};d.inflateEnd=function(b){if(!b||!b.state)return y;var c=b.state;return c.window&&(c.window=null),b.state=null,x};d.inflateGetHeader=function(b,c){var d;return b&&b.state?(d=b.state,0===(2&d.wrap)?y:(d.head=c,c.done=!1,x)):y};d.inflateSetDictionary=function(b,c){var d,e,f=c.length;return b&&b.state?(d=b.state,0!==d.wrap&&11!==d.mode?y:11===d.mode&&(e=1,e=q(e,c,f,0),e!==d.check)?-3:m(b,c,f,f)?(d.mode=31,-4):(d.havedict=1,x)):y};d.inflateInfo="pako inflate (from Nodeca project)"},
 {"../utils/common":3,"./adler32":5,"./crc32":7,"./inffast":10,"./inftrees":12}],12:[function(b,c,d){var e=b("../utils/common"),f=[3,4,5,6,7,8,9,10,11,13,15,17,19,23,27,31,35,43,51,59,67,83,99,115,131,163,195,227,258,0,0],g=[16,16,16,16,16,16,16,16,17,17,17,17,18,18,18,18,19,19,19,19,20,20,20,20,21,21,21,21,16,72,78],h=[1,2,3,4,5,7,9,13,17,25,33,49,65,97,129,193,257,385,513,769,1025,1537,2049,3073,4097,6145,8193,12289,16385,24577,0,0],k=[16,16,16,16,17,17,18,18,19,19,20,20,21,21,22,22,23,23,24,24,
-25,25,26,26,27,27,28,28,29,29,64,64];c.exports=function(b,c,d,p,r,q,t,y){var l,m,n,u,F,E,D,C,G=y.bits,B,M,K,L,V,S,Z=0,A,v=null,R=0,J=new e.Buf16(16);u=new e.Buf16(16);var I=null,aa=0;for(B=0;15>=B;B++)J[B]=0;for(M=0;M<p;M++)J[c[d+M]]++;L=G;for(K=15;1<=K&&0===J[K];K--);if(L>K&&(L=K),0===K)return r[q++]=20971520,r[q++]=20971520,y.bits=1,0;for(G=1;G<K&&0===J[G];G++);L<G&&(L=G);for(B=l=1;15>=B;B++)if(l<<=1,l-=J[B],0>l)return-1;if(0<l&&(0===b||1!==K))return-1;u[1]=0;for(B=1;15>B;B++)u[B+1]=u[B]+J[B];for(M=
-0;M<p;M++)0!==c[d+M]&&(t[u[c[d+M]]++]=M);if(0===b?(v=I=t,F=19):1===b?(v=f,R-=257,I=g,aa-=257,F=256):(v=h,I=k,F=-1),A=0,M=0,B=G,u=q,V=L,S=0,n=-1,Z=1<<L,p=Z-1,1===b&&852<Z||2===b&&592<Z)return 1;for(var N=0;;){N++;E=B-S;t[M]<F?(D=0,C=t[M]):t[M]>F?(D=I[aa+t[M]],C=v[R+t[M]]):(D=96,C=0);l=1<<B-S;G=m=1<<V;do m-=l,r[u+(A>>S)+m]=E<<24|D<<16|C|0;while(0!==m);for(l=1<<B-1;A&l;)l>>=1;if(0!==l?(A&=l-1,A+=l):A=0,M++,0===--J[B]){if(B===K)break;B=c[d+t[M]]}if(B>L&&(A&p)!==n){0===S&&(S=L);u+=G;V=B-S;for(l=1<<V;V+
-S<K&&(l-=J[V+S],!(0>=l));)V++,l<<=1;if(Z+=1<<V,1===b&&852<Z||2===b&&592<Z)return 1;n=A&p;r[n]=L<<24|V<<16|u-q|0}}return 0!==A&&(r[u+A]=B-S<<24|4194304),y.bits=L,0}},{"../utils/common":3}],13:[function(b,c,d){c.exports={2:"need dictionary",1:"stream end",0:"","-1":"file error","-2":"stream error","-3":"data error","-4":"insufficient memory","-5":"buffer error","-6":"incompatible version"}},{}],14:[function(b,c,d){function e(b){for(var c=b.length;0<=--c;)b[c]=0}function f(b,c,d,e,f){this.static_tree=
-b;this.extra_bits=c;this.extra_base=d;this.elems=e;this.max_length=f;this.has_stree=b&&b.length}function g(b,c){this.dyn_tree=b;this.max_code=0;this.stat_desc=c}function h(b,c){b.pending_buf[b.pending++]=255&c;b.pending_buf[b.pending++]=c>>>8&255}function k(b,c,d){b.bi_valid>Z-d?(b.bi_buf|=c<<b.bi_valid&65535,h(b,b.bi_buf),b.bi_buf=c>>Z-b.bi_valid,b.bi_valid+=d-Z):(b.bi_buf|=c<<b.bi_valid&65535,b.bi_valid+=d)}function l(b,c,d){k(b,d[2*c],d[2*c+1])}function m(b,c){var d=0;do d|=1&b,b>>>=1,d<<=1;while(0<
---c);return d>>>1}function n(b,c,d){var e,f=Array(S+1),g=0;for(e=1;e<=S;e++)f[e]=g=g+d[e-1]<<1;for(d=0;d<=c;d++)e=b[2*d+1],0!==e&&(b[2*d]=m(f[e]++,e))}function p(b){var c;for(c=0;c<M;c++)b.dyn_ltree[2*c]=0;for(c=0;c<K;c++)b.dyn_dtree[2*c]=0;for(c=0;c<L;c++)b.bl_tree[2*c]=0;b.dyn_ltree[2*A]=1;b.opt_len=b.static_len=0;b.last_lit=b.matches=0}function r(b){8<b.bi_valid?h(b,b.bi_buf):0<b.bi_valid&&(b.pending_buf[b.pending++]=b.bi_buf);b.bi_buf=0;b.bi_valid=0}function q(b,c,d,e){var f=2*c,g=2*d;return b[f]<
-b[g]||b[f]===b[g]&&e[c]<=e[d]}function t(b,c,d){for(var e=b.heap[d],f=d<<1;f<=b.heap_len&&(f<b.heap_len&&q(c,b.heap[f+1],b.heap[f],b.depth)&&f++,!q(c,e,b.heap[f],b.depth));)b.heap[d]=b.heap[f],d=f,f<<=1;b.heap[d]=e}function y(b,c,d){var e,f,g,h,m=0;if(0!==b.last_lit){do e=b.pending_buf[b.d_buf+2*m]<<8|b.pending_buf[b.d_buf+2*m+1],f=b.pending_buf[b.l_buf+m],m++,0===e?l(b,f,c):(g=ca[f],l(b,g+B+1,c),h=I[g],0!==h&&(f-=P[g],k(b,f,h)),e--,g=256>e?ea[e]:ea[256+(e>>>7)],l(b,g,d),h=aa[g],0!==h&&(e-=T[g],k(b,
-e,h)));while(m<b.last_lit)}l(b,A,c)}function x(b,c){var d,e,f,g=c.dyn_tree;e=c.stat_desc.static_tree;var h=c.stat_desc.has_stree,k=c.stat_desc.elems,l=-1;b.heap_len=0;b.heap_max=V;for(d=0;d<k;d++)0!==g[2*d]?(b.heap[++b.heap_len]=l=d,b.depth[d]=0):g[2*d+1]=0;for(;2>b.heap_len;)f=b.heap[++b.heap_len]=2>l?++l:0,g[2*f]=1,b.depth[f]=0,b.opt_len--,h&&(b.static_len-=e[2*f+1]);c.max_code=l;for(d=b.heap_len>>1;1<=d;d--)t(b,g,d);f=k;do d=b.heap[1],b.heap[1]=b.heap[b.heap_len--],t(b,g,1),e=b.heap[1],b.heap[--b.heap_max]=
-d,b.heap[--b.heap_max]=e,g[2*f]=g[2*d]+g[2*e],b.depth[f]=(b.depth[d]>=b.depth[e]?b.depth[d]:b.depth[e])+1,g[2*d+1]=g[2*e+1]=f,b.heap[1]=f++,t(b,g,1);while(2<=b.heap_len);b.heap[--b.heap_max]=b.heap[1];var m,v,h=c.dyn_tree,k=c.max_code,p=c.stat_desc.static_tree,q=c.stat_desc.has_stree,r=c.stat_desc.extra_bits,R=c.stat_desc.extra_base,J=c.stat_desc.max_length,u=0;for(e=0;e<=S;e++)b.bl_count[e]=0;h[2*b.heap[b.heap_max]+1]=0;for(d=b.heap_max+1;d<V;d++)f=b.heap[d],e=h[2*h[2*f+1]+1]+1,e>J&&(e=J,u++),h[2*
-f+1]=e,f>k||(b.bl_count[e]++,m=0,f>=R&&(m=r[f-R]),v=h[2*f],b.opt_len+=v*(e+m),q&&(b.static_len+=v*(p[2*f+1]+m)));if(0!==u){do{for(e=J-1;0===b.bl_count[e];)e--;b.bl_count[e]--;b.bl_count[e+1]+=2;b.bl_count[J]--;u-=2}while(0<u);for(e=J;0!==e;e--)for(f=b.bl_count[e];0!==f;)m=b.heap[--d],m>k||(h[2*m+1]!==e&&(b.opt_len+=(e-h[2*m+1])*h[2*m],h[2*m+1]=e),f--)}n(g,l,b.bl_count)}function w(b,c,d){var e,f,g=-1,h=c[1],k=0,l=7,m=4;0===h&&(l=138,m=3);c[2*(d+1)+1]=65535;for(e=0;e<=d;e++)f=h,h=c[2*(e+1)+1],++k<l&&
-f===h||(k<m?b.bl_tree[2*f]+=k:0!==f?(f!==g&&b.bl_tree[2*f]++,b.bl_tree[2*v]++):10>=k?b.bl_tree[2*R]++:b.bl_tree[2*J]++,k=0,g=f,0===h?(l=138,m=3):f===h?(l=6,m=3):(l=7,m=4))}function z(b,c,d){var e,f,g=-1,h=c[1],m=0,n=7,p=4;0===h&&(n=138,p=3);for(e=0;e<=d;e++)if(f=h,h=c[2*(e+1)+1],!(++m<n&&f===h)){if(m<p){do l(b,f,b.bl_tree);while(0!==--m)}else 0!==f?(f!==g&&(l(b,f,b.bl_tree),m--),l(b,v,b.bl_tree),k(b,m-3,2)):10>=m?(l(b,R,b.bl_tree),k(b,m-3,3)):(l(b,J,b.bl_tree),k(b,m-11,7));m=0;g=f;0===h?(n=138,p=
-3):f===h?(n=6,p=3):(n=7,p=4)}}function u(b){var c,d=4093624447;for(c=0;31>=c;c++,d>>>=1)if(1&d&&0!==b.dyn_ltree[2*c])return D;if(0!==b.dyn_ltree[18]||0!==b.dyn_ltree[20]||0!==b.dyn_ltree[26])return C;for(c=32;c<B;c++)if(0!==b.dyn_ltree[2*c])return C;return D}function F(b,c,d,e){k(b,(G<<1)+(e?1:0),3);r(b);h(b,d);h(b,~d);E.arraySet(b.pending_buf,b.window,c,d,b.pending);b.pending+=d}var E=b("../utils/common"),D=0,C=1,G=0,B=256,M=B+1+29,K=30,L=19,V=2*M+1,S=15,Z=16,A=256,v=16,R=17,J=18,I=[0,0,0,0,0,0,
-0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0],aa=[0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13],N=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,7],H=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15],U=Array(2*(M+2));e(U);var ba=Array(2*K);e(ba);var ea=Array(512);e(ea);var ca=Array(256);e(ca);var P=Array(29);e(P);var T=Array(K);e(T);var W,O,Q,fa=!1;d._tr_init=function(b){if(!fa){var c,d,e,h=Array(S+1);for(e=d=0;28>e;e++)for(P[e]=d,c=0;c<1<<I[e];c++)ca[d++]=e;ca[d-1]=e;for(e=d=0;16>e;e++)for(T[e]=
-d,c=0;c<1<<aa[e];c++)ea[d++]=e;for(d>>=7;e<K;e++)for(T[e]=d<<7,c=0;c<1<<aa[e]-7;c++)ea[256+d++]=e;for(c=0;c<=S;c++)h[c]=0;for(c=0;143>=c;)U[2*c+1]=8,c++,h[8]++;for(;255>=c;)U[2*c+1]=9,c++,h[9]++;for(;279>=c;)U[2*c+1]=7,c++,h[7]++;for(;287>=c;)U[2*c+1]=8,c++,h[8]++;n(U,M+1,h);for(c=0;c<K;c++)ba[2*c+1]=5,ba[2*c]=m(c,5);W=new f(U,I,B+1,M,S);O=new f(ba,aa,0,K,S);Q=new f([],N,0,L,7);fa=!0}b.l_desc=new g(b.dyn_ltree,W);b.d_desc=new g(b.dyn_dtree,O);b.bl_desc=new g(b.bl_tree,Q);b.bi_buf=0;b.bi_valid=0;p(b)};
-d._tr_stored_block=F;d._tr_flush_block=function(b,c,d,e){var f,g,h=0;if(0<b.level){2===b.strm.data_type&&(b.strm.data_type=u(b));x(b,b.l_desc);x(b,b.d_desc);w(b,b.dyn_ltree,b.l_desc.max_code);w(b,b.dyn_dtree,b.d_desc.max_code);x(b,b.bl_desc);for(h=L-1;3<=h&&0===b.bl_tree[2*H[h]+1];h--);h=(b.opt_len+=3*(h+1)+14,h);f=b.opt_len+3+7>>>3;g=b.static_len+3+7>>>3;g<=f&&(f=g)}else f=g=d+5;if(d+4<=f&&-1!==c)F(b,c,d,e);else if(4===b.strategy||g===f)k(b,2+(e?1:0),3),y(b,U,ba);else{k(b,4+(e?1:0),3);c=b.l_desc.max_code+
-1;d=b.d_desc.max_code+1;h+=1;k(b,c-257,5);k(b,d-1,5);k(b,h-4,4);for(f=0;f<h;f++)k(b,b.bl_tree[2*H[f]+1],3);z(b,b.dyn_ltree,c-1);z(b,b.dyn_dtree,d-1);y(b,b.dyn_ltree,b.dyn_dtree)}p(b);e&&r(b)};d._tr_tally=function(b,c,d){return b.pending_buf[b.d_buf+2*b.last_lit]=c>>>8&255,b.pending_buf[b.d_buf+2*b.last_lit+1]=255&c,b.pending_buf[b.l_buf+b.last_lit]=255&d,b.last_lit++,0===c?b.dyn_ltree[2*d]++:(b.matches++,c--,b.dyn_ltree[2*(ca[d]+B+1)]++,b.dyn_dtree[2*(256>c?ea[c]:ea[256+(c>>>7)])]++),b.last_lit===
-b.lit_bufsize-1};d._tr_align=function(b){k(b,2,3);l(b,A,U);16===b.bi_valid?(h(b,b.bi_buf),b.bi_buf=0,b.bi_valid=0):8<=b.bi_valid&&(b.pending_buf[b.pending++]=255&b.bi_buf,b.bi_buf>>=8,b.bi_valid-=8)}},{"../utils/common":3}],15:[function(b,c,d){c.exports=function(){this.input=null;this.total_in=this.avail_in=this.next_in=0;this.output=null;this.total_out=this.avail_out=this.next_out=0;this.msg="";this.state=null;this.data_type=2;this.adler=0}},{}],"/":[function(b,c,d){d=b("./lib/utils/common").assign;
-var e=b("./lib/deflate"),f=b("./lib/inflate");b=b("./lib/zlib/constants");var g={};d(g,e,f,b);c.exports=g},{"./lib/deflate":1,"./lib/inflate":2,"./lib/utils/common":3,"./lib/zlib/constants":6}]},{},[])("/")});var JSON;JSON||(JSON={});
-(function(){function a(a){return 10>a?"0"+a:a}function b(a){e.lastIndex=0;return e.test(a)?'"'+a.replace(e,function(a){var b=h[a];return"string"===typeof b?b:"\\u"+("0000"+a.charCodeAt(0).toString(16)).slice(-4)})+'"':'"'+a+'"'}function c(a,d){var e,h,l,m,t=f,y,x=d[a];x&&"object"===typeof x&&"function"===typeof x.toJSON&&(x=x.toJSON(a));"function"===typeof k&&(x=k.call(d,a,x));switch(typeof x){case "string":return b(x);case "number":return isFinite(x)?""+x:"null";case "boolean":case "null":return""+x;
-case "object":if(!x)return"null";f+=g;y=[];if("[object Array]"===Object.prototype.toString.apply(x)){m=x.length;for(e=0;e<m;e+=1)y[e]=c(e,x)||"null";l=0===y.length?"[]":f?"[\n"+f+y.join(",\n"+f)+"\n"+t+"]":"["+y.join(",")+"]";f=t;return l}if(k&&"object"===typeof k)for(m=k.length,e=0;e<m;e+=1)"string"===typeof k[e]&&(h=k[e],(l=c(h,x))&&y.push(b(h)+(f?": ":":")+l));else for(h in x)Object.prototype.hasOwnProperty.call(x,h)&&(l=c(h,x))&&y.push(b(h)+(f?": ":":")+l);l=0===y.length?"{}":f?"{\n"+f+y.join(",\n"+
-f)+"\n"+t+"}":"{"+y.join(",")+"}";f=t;return l}}"function"!==typeof Date.prototype.toJSON&&(Date.prototype.toJSON=function(){return isFinite(this.valueOf())?this.getUTCFullYear()+"-"+a(this.getUTCMonth()+1)+"-"+a(this.getUTCDate())+"T"+a(this.getUTCHours())+":"+a(this.getUTCMinutes())+":"+a(this.getUTCSeconds())+"Z":null},String.prototype.toJSON=Number.prototype.toJSON=Boolean.prototype.toJSON=function(){return this.valueOf()});var d=/[\u0000\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g,
+25,25,26,26,27,27,28,28,29,29,64,64];c.exports=function(b,c,d,p,r,q,t,z){var l,m,n,u,D,F,E,C,G=z.bits,B,M,L,H,U,S,ba=0,A,v=null,R=0,I=new e.Buf16(16);u=new e.Buf16(16);var J=null,ca=0;for(B=0;15>=B;B++)I[B]=0;for(M=0;M<p;M++)I[c[d+M]]++;H=G;for(L=15;1<=L&&0===I[L];L--);if(H>L&&(H=L),0===L)return r[q++]=20971520,r[q++]=20971520,z.bits=1,0;for(G=1;G<L&&0===I[G];G++);H<G&&(H=G);for(B=l=1;15>=B;B++)if(l<<=1,l-=I[B],0>l)return-1;if(0<l&&(0===b||1!==L))return-1;u[1]=0;for(B=1;15>B;B++)u[B+1]=u[B]+I[B];
+for(M=0;M<p;M++)0!==c[d+M]&&(t[u[c[d+M]]++]=M);if(0===b?(v=J=t,D=19):1===b?(v=f,R-=257,J=g,ca-=257,D=256):(v=h,J=k,D=-1),A=0,M=0,B=G,u=q,U=H,S=0,n=-1,ba=1<<H,p=ba-1,1===b&&852<ba||2===b&&592<ba)return 1;for(var N=0;;){N++;F=B-S;t[M]<D?(E=0,C=t[M]):t[M]>D?(E=J[ca+t[M]],C=v[R+t[M]]):(E=96,C=0);l=1<<B-S;G=m=1<<U;do m-=l,r[u+(A>>S)+m]=F<<24|E<<16|C|0;while(0!==m);for(l=1<<B-1;A&l;)l>>=1;if(0!==l?(A&=l-1,A+=l):A=0,M++,0===--I[B]){if(B===L)break;B=c[d+t[M]]}if(B>H&&(A&p)!==n){0===S&&(S=H);u+=G;U=B-S;for(l=
+1<<U;U+S<L&&(l-=I[U+S],!(0>=l));)U++,l<<=1;if(ba+=1<<U,1===b&&852<ba||2===b&&592<ba)return 1;n=A&p;r[n]=H<<24|U<<16|u-q|0}}return 0!==A&&(r[u+A]=B-S<<24|4194304),z.bits=H,0}},{"../utils/common":3}],13:[function(b,c,d){c.exports={2:"need dictionary",1:"stream end",0:"","-1":"file error","-2":"stream error","-3":"data error","-4":"insufficient memory","-5":"buffer error","-6":"incompatible version"}},{}],14:[function(b,c,d){function e(b){for(var c=b.length;0<=--c;)b[c]=0}function f(b,c,d,e,f){this.static_tree=
+b;this.extra_bits=c;this.extra_base=d;this.elems=e;this.max_length=f;this.has_stree=b&&b.length}function g(b,c){this.dyn_tree=b;this.max_code=0;this.stat_desc=c}function h(b,c){b.pending_buf[b.pending++]=255&c;b.pending_buf[b.pending++]=c>>>8&255}function k(b,c,d){b.bi_valid>ba-d?(b.bi_buf|=c<<b.bi_valid&65535,h(b,b.bi_buf),b.bi_buf=c>>ba-b.bi_valid,b.bi_valid+=d-ba):(b.bi_buf|=c<<b.bi_valid&65535,b.bi_valid+=d)}function l(b,c,d){k(b,d[2*c],d[2*c+1])}function m(b,c){var d=0;do d|=1&b,b>>>=1,d<<=1;
+while(0<--c);return d>>>1}function n(b,c,d){var e,f=Array(S+1),g=0;for(e=1;e<=S;e++)f[e]=g=g+d[e-1]<<1;for(d=0;d<=c;d++)e=b[2*d+1],0!==e&&(b[2*d]=m(f[e]++,e))}function p(b){var c;for(c=0;c<M;c++)b.dyn_ltree[2*c]=0;for(c=0;c<L;c++)b.dyn_dtree[2*c]=0;for(c=0;c<H;c++)b.bl_tree[2*c]=0;b.dyn_ltree[2*A]=1;b.opt_len=b.static_len=0;b.last_lit=b.matches=0}function r(b){8<b.bi_valid?h(b,b.bi_buf):0<b.bi_valid&&(b.pending_buf[b.pending++]=b.bi_buf);b.bi_buf=0;b.bi_valid=0}function q(b,c,d,e){var f=2*c,g=2*d;
+return b[f]<b[g]||b[f]===b[g]&&e[c]<=e[d]}function t(b,c,d){for(var e=b.heap[d],f=d<<1;f<=b.heap_len&&(f<b.heap_len&&q(c,b.heap[f+1],b.heap[f],b.depth)&&f++,!q(c,e,b.heap[f],b.depth));)b.heap[d]=b.heap[f],d=f,f<<=1;b.heap[d]=e}function z(b,c,d){var e,f,g,h,m=0;if(0!==b.last_lit){do e=b.pending_buf[b.d_buf+2*m]<<8|b.pending_buf[b.d_buf+2*m+1],f=b.pending_buf[b.l_buf+m],m++,0===e?l(b,f,c):(g=aa[f],l(b,g+B+1,c),h=J[g],0!==h&&(f-=P[g],k(b,f,h)),e--,g=256>e?ea[e]:ea[256+(e>>>7)],l(b,g,d),h=ca[g],0!==h&&
+(e-=V[g],k(b,e,h)));while(m<b.last_lit)}l(b,A,c)}function w(b,c){var d,e,f,g=c.dyn_tree;e=c.stat_desc.static_tree;var h=c.stat_desc.has_stree,k=c.stat_desc.elems,l=-1;b.heap_len=0;b.heap_max=U;for(d=0;d<k;d++)0!==g[2*d]?(b.heap[++b.heap_len]=l=d,b.depth[d]=0):g[2*d+1]=0;for(;2>b.heap_len;)f=b.heap[++b.heap_len]=2>l?++l:0,g[2*f]=1,b.depth[f]=0,b.opt_len--,h&&(b.static_len-=e[2*f+1]);c.max_code=l;for(d=b.heap_len>>1;1<=d;d--)t(b,g,d);f=k;do d=b.heap[1],b.heap[1]=b.heap[b.heap_len--],t(b,g,1),e=b.heap[1],
+b.heap[--b.heap_max]=d,b.heap[--b.heap_max]=e,g[2*f]=g[2*d]+g[2*e],b.depth[f]=(b.depth[d]>=b.depth[e]?b.depth[d]:b.depth[e])+1,g[2*d+1]=g[2*e+1]=f,b.heap[1]=f++,t(b,g,1);while(2<=b.heap_len);b.heap[--b.heap_max]=b.heap[1];var m,v,h=c.dyn_tree,k=c.max_code,p=c.stat_desc.static_tree,q=c.stat_desc.has_stree,r=c.stat_desc.extra_bits,R=c.stat_desc.extra_base,I=c.stat_desc.max_length,u=0;for(e=0;e<=S;e++)b.bl_count[e]=0;h[2*b.heap[b.heap_max]+1]=0;for(d=b.heap_max+1;d<U;d++)f=b.heap[d],e=h[2*h[2*f+1]+1]+
+1,e>I&&(e=I,u++),h[2*f+1]=e,f>k||(b.bl_count[e]++,m=0,f>=R&&(m=r[f-R]),v=h[2*f],b.opt_len+=v*(e+m),q&&(b.static_len+=v*(p[2*f+1]+m)));if(0!==u){do{for(e=I-1;0===b.bl_count[e];)e--;b.bl_count[e]--;b.bl_count[e+1]+=2;b.bl_count[I]--;u-=2}while(0<u);for(e=I;0!==e;e--)for(f=b.bl_count[e];0!==f;)m=b.heap[--d],m>k||(h[2*m+1]!==e&&(b.opt_len+=(e-h[2*m+1])*h[2*m],h[2*m+1]=e),f--)}n(g,l,b.bl_count)}function x(b,c,d){var e,f,g=-1,h=c[1],k=0,l=7,m=4;0===h&&(l=138,m=3);c[2*(d+1)+1]=65535;for(e=0;e<=d;e++)f=h,
+h=c[2*(e+1)+1],++k<l&&f===h||(k<m?b.bl_tree[2*f]+=k:0!==f?(f!==g&&b.bl_tree[2*f]++,b.bl_tree[2*v]++):10>=k?b.bl_tree[2*R]++:b.bl_tree[2*I]++,k=0,g=f,0===h?(l=138,m=3):f===h?(l=6,m=3):(l=7,m=4))}function y(b,c,d){var e,f,g=-1,h=c[1],m=0,n=7,p=4;0===h&&(n=138,p=3);for(e=0;e<=d;e++)if(f=h,h=c[2*(e+1)+1],!(++m<n&&f===h)){if(m<p){do l(b,f,b.bl_tree);while(0!==--m)}else 0!==f?(f!==g&&(l(b,f,b.bl_tree),m--),l(b,v,b.bl_tree),k(b,m-3,2)):10>=m?(l(b,R,b.bl_tree),k(b,m-3,3)):(l(b,I,b.bl_tree),k(b,m-11,7));m=
+0;g=f;0===h?(n=138,p=3):f===h?(n=6,p=3):(n=7,p=4)}}function u(b){var c,d=4093624447;for(c=0;31>=c;c++,d>>>=1)if(1&d&&0!==b.dyn_ltree[2*c])return E;if(0!==b.dyn_ltree[18]||0!==b.dyn_ltree[20]||0!==b.dyn_ltree[26])return C;for(c=32;c<B;c++)if(0!==b.dyn_ltree[2*c])return C;return E}function D(b,c,d,e){k(b,(G<<1)+(e?1:0),3);r(b);h(b,d);h(b,~d);F.arraySet(b.pending_buf,b.window,c,d,b.pending);b.pending+=d}var F=b("../utils/common"),E=0,C=1,G=0,B=256,M=B+1+29,L=30,H=19,U=2*M+1,S=15,ba=16,A=256,v=16,R=17,
+I=18,J=[0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0],ca=[0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13],N=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,7],K=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15],X=Array(2*(M+2));e(X);var T=Array(2*L);e(T);var ea=Array(512);e(ea);var aa=Array(256);e(aa);var P=Array(29);e(P);var V=Array(L);e(V);var W,O,Q,fa=!1;d._tr_init=function(b){if(!fa){var c,d,e,h=Array(S+1);for(e=d=0;28>e;e++)for(P[e]=d,c=0;c<1<<J[e];c++)aa[d++]=e;aa[d-1]=
+e;for(e=d=0;16>e;e++)for(V[e]=d,c=0;c<1<<ca[e];c++)ea[d++]=e;for(d>>=7;e<L;e++)for(V[e]=d<<7,c=0;c<1<<ca[e]-7;c++)ea[256+d++]=e;for(c=0;c<=S;c++)h[c]=0;for(c=0;143>=c;)X[2*c+1]=8,c++,h[8]++;for(;255>=c;)X[2*c+1]=9,c++,h[9]++;for(;279>=c;)X[2*c+1]=7,c++,h[7]++;for(;287>=c;)X[2*c+1]=8,c++,h[8]++;n(X,M+1,h);for(c=0;c<L;c++)T[2*c+1]=5,T[2*c]=m(c,5);W=new f(X,J,B+1,M,S);O=new f(T,ca,0,L,S);Q=new f([],N,0,H,7);fa=!0}b.l_desc=new g(b.dyn_ltree,W);b.d_desc=new g(b.dyn_dtree,O);b.bl_desc=new g(b.bl_tree,Q);
+b.bi_buf=0;b.bi_valid=0;p(b)};d._tr_stored_block=D;d._tr_flush_block=function(b,c,d,e){var f,g,h=0;if(0<b.level){2===b.strm.data_type&&(b.strm.data_type=u(b));w(b,b.l_desc);w(b,b.d_desc);x(b,b.dyn_ltree,b.l_desc.max_code);x(b,b.dyn_dtree,b.d_desc.max_code);w(b,b.bl_desc);for(h=H-1;3<=h&&0===b.bl_tree[2*K[h]+1];h--);h=(b.opt_len+=3*(h+1)+14,h);f=b.opt_len+3+7>>>3;g=b.static_len+3+7>>>3;g<=f&&(f=g)}else f=g=d+5;if(d+4<=f&&-1!==c)D(b,c,d,e);else if(4===b.strategy||g===f)k(b,2+(e?1:0),3),z(b,X,T);else{k(b,
+4+(e?1:0),3);c=b.l_desc.max_code+1;d=b.d_desc.max_code+1;h+=1;k(b,c-257,5);k(b,d-1,5);k(b,h-4,4);for(f=0;f<h;f++)k(b,b.bl_tree[2*K[f]+1],3);y(b,b.dyn_ltree,c-1);y(b,b.dyn_dtree,d-1);z(b,b.dyn_ltree,b.dyn_dtree)}p(b);e&&r(b)};d._tr_tally=function(b,c,d){return b.pending_buf[b.d_buf+2*b.last_lit]=c>>>8&255,b.pending_buf[b.d_buf+2*b.last_lit+1]=255&c,b.pending_buf[b.l_buf+b.last_lit]=255&d,b.last_lit++,0===c?b.dyn_ltree[2*d]++:(b.matches++,c--,b.dyn_ltree[2*(aa[d]+B+1)]++,b.dyn_dtree[2*(256>c?ea[c]:
+ea[256+(c>>>7)])]++),b.last_lit===b.lit_bufsize-1};d._tr_align=function(b){k(b,2,3);l(b,A,X);16===b.bi_valid?(h(b,b.bi_buf),b.bi_buf=0,b.bi_valid=0):8<=b.bi_valid&&(b.pending_buf[b.pending++]=255&b.bi_buf,b.bi_buf>>=8,b.bi_valid-=8)}},{"../utils/common":3}],15:[function(b,c,d){c.exports=function(){this.input=null;this.total_in=this.avail_in=this.next_in=0;this.output=null;this.total_out=this.avail_out=this.next_out=0;this.msg="";this.state=null;this.data_type=2;this.adler=0}},{}],"/":[function(b,
+c,d){d=b("./lib/utils/common").assign;var e=b("./lib/deflate"),f=b("./lib/inflate");b=b("./lib/zlib/constants");var g={};d(g,e,f,b);c.exports=g},{"./lib/deflate":1,"./lib/inflate":2,"./lib/utils/common":3,"./lib/zlib/constants":6}]},{},[])("/")});var JSON;JSON||(JSON={});
+(function(){function a(a){return 10>a?"0"+a:a}function b(a){e.lastIndex=0;return e.test(a)?'"'+a.replace(e,function(a){var b=h[a];return"string"===typeof b?b:"\\u"+("0000"+a.charCodeAt(0).toString(16)).slice(-4)})+'"':'"'+a+'"'}function c(a,d){var e,h,l,m,t=f,z,w=d[a];w&&"object"===typeof w&&"function"===typeof w.toJSON&&(w=w.toJSON(a));"function"===typeof k&&(w=k.call(d,a,w));switch(typeof w){case "string":return b(w);case "number":return isFinite(w)?""+w:"null";case "boolean":case "null":return""+w;
+case "object":if(!w)return"null";f+=g;z=[];if("[object Array]"===Object.prototype.toString.apply(w)){m=w.length;for(e=0;e<m;e+=1)z[e]=c(e,w)||"null";l=0===z.length?"[]":f?"[\n"+f+z.join(",\n"+f)+"\n"+t+"]":"["+z.join(",")+"]";f=t;return l}if(k&&"object"===typeof k)for(m=k.length,e=0;e<m;e+=1)"string"===typeof k[e]&&(h=k[e],(l=c(h,w))&&z.push(b(h)+(f?": ":":")+l));else for(h in w)Object.prototype.hasOwnProperty.call(w,h)&&(l=c(h,w))&&z.push(b(h)+(f?": ":":")+l);l=0===z.length?"{}":f?"{\n"+f+z.join(",\n"+
+f)+"\n"+t+"}":"{"+z.join(",")+"}";f=t;return l}}"function"!==typeof Date.prototype.toJSON&&(Date.prototype.toJSON=function(){return isFinite(this.valueOf())?this.getUTCFullYear()+"-"+a(this.getUTCMonth()+1)+"-"+a(this.getUTCDate())+"T"+a(this.getUTCHours())+":"+a(this.getUTCMinutes())+":"+a(this.getUTCSeconds())+"Z":null},String.prototype.toJSON=Number.prototype.toJSON=Boolean.prototype.toJSON=function(){return this.valueOf()});var d=/[\u0000\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g,
 e=/[\\\"\x00-\x1f\x7f-\x9f\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g,f,g,h={"\b":"\\b","\t":"\\t","\n":"\\n","\f":"\\f","\r":"\\r",'"':'\\"',"\\":"\\\\"},k;"function"!==typeof JSON.stringify&&(JSON.stringify=function(a,b,d){var e;g=f="";if("number"===typeof d)for(e=0;e<d;e+=1)g+=" ";else"string"===typeof d&&(g=d);if((k=b)&&"function"!==typeof b&&("object"!==typeof b||"number"!==typeof b.length))throw Error("JSON.stringify");return c("",{"":a})});
 "function"!==typeof JSON.parse&&(JSON.parse=function(a,b){function c(a,d){var e,f,g=a[d];if(g&&"object"===typeof g)for(e in g)Object.prototype.hasOwnProperty.call(g,e)&&(f=c(g,e),void 0!==f?g[e]=f:delete g[e]);return b.call(a,d,g)}var e;a=""+a;d.lastIndex=0;d.test(a)&&(a=a.replace(d,function(a){return"\\u"+("0000"+a.charCodeAt(0).toString(16)).slice(-4)}));if(/^[\],:{}\s]*$/.test(a.replace(/\\(?:["\\\/bfnrt]|u[0-9a-fA-F]{4})/g,"@").replace(/"[^"\\\n\r]*"|true|false|null|-?\d+(?:\.\d*)?(?:[eE][+\-]?\d+)?/g,
 "]").replace(/(?:^|:|,)(?:\s*\[)+/g,"")))return e=eval("("+a+")"),"function"===typeof b?c({"":e},""):e;throw new SyntaxError("JSON.parse");})})();"undefined"===typeof window.mxBasePath&&(window.mxBasePath="https://www.draw.io/mxgraph/");window.mxLoadStylesheets=window.mxLoadStylesheets||!1;window.mxLoadResources=window.mxLoadResources||!1;window.mxLanguage=window.mxLanguage||"en";window.urlParams=window.urlParams||{};window.MAX_REQUEST_SIZE=window.MAX_REQUEST_SIZE||10485760;window.MAX_AREA=window.MAX_AREA||225E6;window.EXPORT_URL=window.EXPORT_URL||"/export";window.SAVE_URL=window.SAVE_URL||"/save";window.OPEN_URL=window.OPEN_URL||"/open";window.RESOURCES_PATH=window.RESOURCES_PATH||"resources";window.RESOURCE_BASE=window.RESOURCE_BASE||window.RESOURCES_PATH+"/grapheditor";window.STENCIL_PATH=window.STENCIL_PATH||"stencils";window.IMAGE_PATH=window.IMAGE_PATH||"images";
-window.STYLE_PATH=window.STYLE_PATH||"styles";window.CSS_PATH=window.CSS_PATH||"styles";window.OPEN_FORM=window.OPEN_FORM||"open.html";window.mxBasePath=window.mxBasePath||"../../../src";window.mxLanguage=window.mxLanguage||urlParams.lang;window.mxLanguages=window.mxLanguages||["de"];var mxClient={VERSION:"7.5.4",IS_IE:0<=navigator.userAgent.indexOf("MSIE"),IS_IE6:0<=navigator.userAgent.indexOf("MSIE 6"),IS_IE11:!!navigator.userAgent.match(/Trident\/7\./),IS_EDGE:!!navigator.userAgent.match(/Edge\//),IS_QUIRKS:0<=navigator.userAgent.indexOf("MSIE")&&(null==document.documentMode||5==document.documentMode),IS_EM:"spellcheck"in document.createElement("textarea")&&8==document.documentMode,VML_PREFIX:"v",OFFICE_PREFIX:"o",IS_NS:0<=navigator.userAgent.indexOf("Mozilla/")&&0>navigator.userAgent.indexOf("MSIE")&&
+window.STYLE_PATH=window.STYLE_PATH||"styles";window.CSS_PATH=window.CSS_PATH||"styles";window.OPEN_FORM=window.OPEN_FORM||"open.html";window.mxBasePath=window.mxBasePath||"../../../src";window.mxLanguage=window.mxLanguage||urlParams.lang;window.mxLanguages=window.mxLanguages||["de"];var mxClient={VERSION:"7.5.5",IS_IE:0<=navigator.userAgent.indexOf("MSIE"),IS_IE6:0<=navigator.userAgent.indexOf("MSIE 6"),IS_IE11:!!navigator.userAgent.match(/Trident\/7\./),IS_EDGE:!!navigator.userAgent.match(/Edge\//),IS_QUIRKS:0<=navigator.userAgent.indexOf("MSIE")&&(null==document.documentMode||5==document.documentMode),IS_EM:"spellcheck"in document.createElement("textarea")&&8==document.documentMode,VML_PREFIX:"v",OFFICE_PREFIX:"o",IS_NS:0<=navigator.userAgent.indexOf("Mozilla/")&&0>navigator.userAgent.indexOf("MSIE")&&
 0>navigator.userAgent.indexOf("Edge/"),IS_OP:0<=navigator.userAgent.indexOf("Opera/")||0<=navigator.userAgent.indexOf("OPR/"),IS_OT:0<=navigator.userAgent.indexOf("Presto/")&&0>navigator.userAgent.indexOf("Presto/2.4.")&&0>navigator.userAgent.indexOf("Presto/2.3.")&&0>navigator.userAgent.indexOf("Presto/2.2.")&&0>navigator.userAgent.indexOf("Presto/2.1.")&&0>navigator.userAgent.indexOf("Presto/2.0.")&&0>navigator.userAgent.indexOf("Presto/1."),IS_SF:0<=navigator.userAgent.indexOf("AppleWebKit/")&&
 0>navigator.userAgent.indexOf("Chrome/")&&0>navigator.userAgent.indexOf("Edge/"),IS_IOS:navigator.userAgent.match(/(iPad|iPhone|iPod)/g)?!0:!1,IS_GC:0<=navigator.userAgent.indexOf("Chrome/")&&0>navigator.userAgent.indexOf("Edge/"),IS_CHROMEAPP:null!=window.chrome&&null!=chrome.app&&null!=chrome.app.runtime,IS_FF:0<=navigator.userAgent.indexOf("Firefox/"),IS_MT:0<=navigator.userAgent.indexOf("Firefox/")&&0>navigator.userAgent.indexOf("Firefox/1.")&&0>navigator.userAgent.indexOf("Firefox/2.")||0<=navigator.userAgent.indexOf("Iceweasel/")&&
 0>navigator.userAgent.indexOf("Iceweasel/1.")&&0>navigator.userAgent.indexOf("Iceweasel/2.")||0<=navigator.userAgent.indexOf("SeaMonkey/")&&0>navigator.userAgent.indexOf("SeaMonkey/1.")||0<=navigator.userAgent.indexOf("Iceape/")&&0>navigator.userAgent.indexOf("Iceape/1."),IS_SVG:0<=navigator.userAgent.indexOf("Firefox/")||0<=navigator.userAgent.indexOf("Iceweasel/")||0<=navigator.userAgent.indexOf("Seamonkey/")||0<=navigator.userAgent.indexOf("Iceape/")||0<=navigator.userAgent.indexOf("Galeon/")||
@@ -237,8 +237,8 @@ post:function(a,b,c,d){return(new mxXmlRequest(a,b)).send(c,d)},submit:function(
 (a=null);return a},clone:function(a,b,c){c=null!=c?c:!1;var d=null;if(null!=a&&"function"==typeof a.constructor){var d=new a.constructor,e;for(e in a)e!=mxObjectIdentity.FIELD_NAME&&(null==b||0>mxUtils.indexOf(b,e))&&(d[e]=c||"object"!=typeof a[e]?a[e]:mxUtils.clone(a[e]))}return d},equalPoints:function(a,b){if(null==a&&null!=b||null!=a&&null==b||null!=a&&null!=b&&a.length!=b.length)return!1;if(null!=a&&null!=b)for(var c=0;c<a.length;c++)if(a[c]==b[c]||null!=a[c]&&!a[c].equals(b[c]))return!1;return!0},
 equalEntries:function(a,b){if(null==a&&null!=b||null!=a&&null==b||null!=a&&null!=b&&a.length!=b.length)return!1;if(null!=a&&null!=b){var c=0,d;for(d in b)c++;for(d in a)if(c--,!(mxUtils.isNaN(a[d])&&mxUtils.isNaN(b[d])||a[d]==b[d]))return!1}return 0==c},removeDuplicates:function(a){for(var b=new mxDictionary,c=[],d=0;d<a.length;d++)b.get(a[d])||(c.push(a[d]),b.put(a[d],!0));return c},isNaN:function(a){return"number"==typeof a&&isNaN(a)},extend:function(a,b){var c=function(){};c.prototype=b.prototype;
 a.prototype=new c;a.prototype.constructor=a},toString:function(a){var b="",c;for(c in a)try{if(null==a[c])b+=c+" = [null]\n";else if("function"==typeof a[c])b+=c+" => [Function]\n";else if("object"==typeof a[c])var d=mxUtils.getFunctionName(a[c].constructor),b=b+(c+" => ["+d+"]\n");else b+=c+" = "+a[c]+"\n"}catch(e){b+=c+"="+e.message}return b},toRadians:function(a){return Math.PI*a/180},toDegree:function(a){return 180*a/Math.PI},arcToCurves:function(a,b,c,d,e,f,g,h,k){h-=a;k-=b;if(0===c||0===d)return p;
-c=Math.abs(c);d=Math.abs(d);var l=-h/2,m=-k/2,n=Math.cos(e*Math.PI/180),p=Math.sin(e*Math.PI/180);e=n*l+p*m;var l=-1*p*l+n*m,m=e*e,r=l*l,q=c*c,t=d*d,y=m/q+r/t;1<y?(c*=Math.sqrt(y),d*=Math.sqrt(y),f=0):(y=1,f===g&&(y=-1),f=y*Math.sqrt((q*t-q*r-t*m)/(q*r+t*m)));m=f*c*l/d;r=-1*f*d*e/c;h=n*m-p*r+h/2;k=p*m+n*r+k/2;q=Math.atan2((l-r)/d,(e-m)/c)-Math.atan2(0,1);f=0<=q?q:2*Math.PI+q;q=Math.atan2((-l-r)/d,(-e-m)/c)-Math.atan2((l-r)/d,(e-m)/c);e=0<=q?q:2*Math.PI+q;0==g&&0<e?e-=2*Math.PI:0!=g&&0>e&&(e+=2*Math.PI);
-g=2*e/Math.PI;g=Math.ceil(0>g?-1*g:g);e/=g;l=8/3*Math.sin(e/4)*Math.sin(e/4)/Math.sin(e/2);m=n*c;n*=d;c*=p;d*=p;for(var x=Math.cos(f),w=Math.sin(f),r=-l*(m*w+d*x),q=-l*(c*w-n*x),p=[],z=0;z<g;++z){f+=e;var x=Math.cos(f),w=Math.sin(f),t=m*x-d*w+h,y=c*x+n*w+k,u=-l*(m*w+d*x),x=-l*(c*w-n*x),w=6*z;p[w]=Number(r+a);p[w+1]=Number(q+b);p[w+2]=Number(t-u+a);p[w+3]=Number(y-x+b);p[w+4]=Number(t+a);p[w+5]=Number(y+b);r=t+u;q=y+x}return p},getBoundingBox:function(a,b,c){var d=null;if(null!=a&&null!=b&&0!=b){b=
+c=Math.abs(c);d=Math.abs(d);var l=-h/2,m=-k/2,n=Math.cos(e*Math.PI/180),p=Math.sin(e*Math.PI/180);e=n*l+p*m;var l=-1*p*l+n*m,m=e*e,r=l*l,q=c*c,t=d*d,z=m/q+r/t;1<z?(c*=Math.sqrt(z),d*=Math.sqrt(z),f=0):(z=1,f===g&&(z=-1),f=z*Math.sqrt((q*t-q*r-t*m)/(q*r+t*m)));m=f*c*l/d;r=-1*f*d*e/c;h=n*m-p*r+h/2;k=p*m+n*r+k/2;q=Math.atan2((l-r)/d,(e-m)/c)-Math.atan2(0,1);f=0<=q?q:2*Math.PI+q;q=Math.atan2((-l-r)/d,(-e-m)/c)-Math.atan2((l-r)/d,(e-m)/c);e=0<=q?q:2*Math.PI+q;0==g&&0<e?e-=2*Math.PI:0!=g&&0>e&&(e+=2*Math.PI);
+g=2*e/Math.PI;g=Math.ceil(0>g?-1*g:g);e/=g;l=8/3*Math.sin(e/4)*Math.sin(e/4)/Math.sin(e/2);m=n*c;n*=d;c*=p;d*=p;for(var w=Math.cos(f),x=Math.sin(f),r=-l*(m*x+d*w),q=-l*(c*x-n*w),p=[],y=0;y<g;++y){f+=e;var w=Math.cos(f),x=Math.sin(f),t=m*w-d*x+h,z=c*w+n*x+k,u=-l*(m*x+d*w),w=-l*(c*x-n*w),x=6*y;p[x]=Number(r+a);p[x+1]=Number(q+b);p[x+2]=Number(t-u+a);p[x+3]=Number(z-w+b);p[x+4]=Number(t+a);p[x+5]=Number(z+b);r=t+u;q=z+w}return p},getBoundingBox:function(a,b,c){var d=null;if(null!=a&&null!=b&&0!=b){b=
 mxUtils.toRadians(b);var d=Math.cos(b),e=Math.sin(b);c=null!=c?c:new mxPoint(a.x+a.width/2,a.y+a.height/2);var f=new mxPoint(a.x,a.y);b=new mxPoint(a.x+a.width,a.y);var g=new mxPoint(b.x,a.y+a.height);a=new mxPoint(a.x,g.y);f=mxUtils.getRotatedPoint(f,d,e,c);b=mxUtils.getRotatedPoint(b,d,e,c);g=mxUtils.getRotatedPoint(g,d,e,c);a=mxUtils.getRotatedPoint(a,d,e,c);d=new mxRectangle(f.x,f.y,0,0);d.add(new mxRectangle(b.x,b.y,0,0));d.add(new mxRectangle(g.x,g.y,0,0));d.add(new mxRectangle(a.x,a.y,0,0))}return d},
 getRotatedPoint:function(a,b,c,d){d=null!=d?d:new mxPoint;var e=a.x-d.x;a=a.y-d.y;return new mxPoint(e*b-a*c+d.x,a*b+e*c+d.y)},getPortConstraints:function(a,b,c,d){b=mxUtils.getValue(a.style,mxConstants.STYLE_PORT_CONSTRAINT,mxUtils.getValue(b.style,c?mxConstants.STYLE_SOURCE_PORT_CONSTRAINT:mxConstants.STYLE_TARGET_PORT_CONSTRAINT,null));if(null==b)return d;d=b.toString();b=mxConstants.DIRECTION_MASK_NONE;c=0;1==mxUtils.getValue(a.style,mxConstants.STYLE_PORT_CONSTRAINT_ROTATION,0)&&(c=mxUtils.getValue(a.style,
 mxConstants.STYLE_ROTATION,0));a=0;45<c?(a=1,135<=c&&(a=2)):-45>c&&(a=3,-135>=c&&(a=2));if(0<=d.indexOf(mxConstants.DIRECTION_NORTH))switch(a){case 0:b|=mxConstants.DIRECTION_MASK_NORTH;break;case 1:b|=mxConstants.DIRECTION_MASK_EAST;break;case 2:b|=mxConstants.DIRECTION_MASK_SOUTH;break;case 3:b|=mxConstants.DIRECTION_MASK_WEST}if(0<=d.indexOf(mxConstants.DIRECTION_WEST))switch(a){case 0:b|=mxConstants.DIRECTION_MASK_WEST;break;case 1:b|=mxConstants.DIRECTION_MASK_NORTH;break;case 2:b|=mxConstants.DIRECTION_MASK_EAST;
@@ -400,13 +400,13 @@ mxSvgCanvas2D.prototype.updateText=function(a,b,c,d,e,f,g,h,k,l,m){if(null!=m&&n
 mxConstants.ALIGN_CENTER?k-=c/2:e==mxConstants.ALIGN_RIGHT&&(k-=c);a+=k;f==mxConstants.ALIGN_MIDDLE?g-=d/2:f==mxConstants.ALIGN_BOTTOM&&(g-=d);"fill"!=h&&mxClient.IS_FF&&mxClient.IS_WIN&&(g-=2);b+=g;e=1!=r.scale?"scale("+r.scale+")":"";0!=r.rotation&&this.rotateHtml?(e+="rotate("+r.rotation+","+c/2+","+d/2+")",b=this.rotatePoint((a+c/2)*r.scale,(b+d/2)*r.scale,r.rotation,r.rotationCx,r.rotationCy),a=b.x-c*r.scale/2,b=b.y-d*r.scale/2):(a*=r.scale,b*=r.scale);0!=l&&(e+="rotate("+l+","+-k+","+-g+")");
 m.setAttribute("transform","translate("+Math.round(a)+","+Math.round(b)+")"+e);n.setAttribute("width",Math.round(Math.max(1,c)));n.setAttribute("height",Math.round(Math.max(1,d)))}};
 mxSvgCanvas2D.prototype.text=function(a,b,c,d,e,f,g,h,k,l,m,n,p){if(this.textEnabled&&null!=e){n=null!=n?n:0;var r=this.state;a+=r.dx;b+=r.dy;if(this.foEnabled&&"html"==k){var q="vertical-align:top;";m?q+="overflow:hidden;max-height:"+Math.round(d)+"px;max-width:"+Math.round(c)+"px;":"fill"==l?q+="width:"+Math.round(c+1)+"px;height:"+Math.round(d+1)+"px;overflow:hidden;":"width"==l&&(q+="width:"+Math.round(c+1)+"px;",0<d&&(q+="max-height:"+Math.round(d)+"px;overflow:hidden;"));var q=h&&0<c?q+("width:"+
-Math.round(c+1)+"px;white-space:normal;word-wrap:"+mxConstants.WORD_WRAP+";"):q+"white-space:nowrap;",t=this.createElement("g");1>r.alpha&&t.setAttribute("opacity",r.alpha);var y=this.createElement("foreignObject");y.setAttribute("style","overflow:visible;");y.setAttribute("pointer-events","all");q=this.createDiv(e,f,g,q,l);if(null!=q){null!=p&&q.setAttribute("dir",p);t.appendChild(y);this.root.appendChild(t);var x,w;p=x=2;if(!mxClient.IS_IE||9!=document.documentMode&&mxClient.IS_SVG){this.root.ownerDocument!=
-document?(q.style.visibility="hidden",document.body.appendChild(q)):y.appendChild(q);var z=q;null!=z.firstChild&&"DIV"==z.firstChild.nodeName&&(z=z.firstChild,h&&"break-word"==q.style.wordWrap&&(z.style.width="100%"));u=z.offsetWidth;0==u&&q.parentNode==y&&(q.style.visibility="hidden",document.body.appendChild(q),u=z.offsetWidth);this.cacheOffsetSize&&(t.mxCachedOffsetWidth=u);!m&&h&&0<c&&this.root.ownerDocument!=document&&"fill"!=l&&"width"!=l&&(F=q.style.whiteSpace,q.style.whiteSpace="nowrap",u<
-z.offsetWidth&&(q.style.whiteSpace=F));x=u+x-1;h&&"fill"!=l&&"width"!=l&&(m&&(x=Math.min(x,c)),q.style.width=x+"px");x=z.offsetWidth;w=z.offsetHeight;this.cacheOffsetSize&&(t.mxCachedFinalOffsetWidth=x,t.mxCachedFinalOffsetHeight=w);w-=p;q.parentNode!=y&&(y.appendChild(q),q.style.visibility="")}else{z=document.createElement("div");z.style.cssText=q.getAttribute("style");z.style.display=mxClient.IS_QUIRKS?"inline":"inline-block";z.style.position="absolute";z.style.visibility="hidden";w=document.createElement("div");
-w.style.display=mxClient.IS_QUIRKS?"inline":"inline-block";w.style.wordWrap=mxConstants.WORD_WRAP;w.innerHTML=mxUtils.isNode(e)?e.outerHTML:e;z.appendChild(w);document.body.appendChild(z);8!=document.documentMode&&9!=document.documentMode&&null!=r.fontBorderColor&&(x+=2,p+=2);if(h&&0<c){var u=w.offsetWidth;if(!m&&h&&0<c&&this.root.ownerDocument!=document&&"fill"!=l){var F=z.style.whiteSpace;w.style.whiteSpace="nowrap";u<w.offsetWidth&&(z.style.whiteSpace=F)}m&&(u=Math.min(u,c));z.style.width=u+"px";
-x=w.offsetWidth+x+0;w=w.offsetHeight+p;z.style.display="inline-block";z.style.position="";z.style.visibility="";z.style.width=x+"px";q.setAttribute("style",z.style.cssText)}else x=w.offsetWidth+x,w=w.offsetHeight+p;z.parentNode.removeChild(z);y.appendChild(q)}m&&(w=Math.min(w,d),x=Math.min(x,c));"width"==l?d=w:"fill"!=l&&(c=x,d=w);1>r.alpha&&t.setAttribute("opacity",r.alpha);p=q=0;f==mxConstants.ALIGN_CENTER?q-=c/2:f==mxConstants.ALIGN_RIGHT&&(q-=c);a+=q;g==mxConstants.ALIGN_MIDDLE?p-=d/2:g==mxConstants.ALIGN_BOTTOM&&
-(p-=d);"fill"!=l&&mxClient.IS_FF&&mxClient.IS_WIN&&(p-=2);b+=p;z=1!=r.scale?"scale("+r.scale+")":"";0!=r.rotation&&this.rotateHtml?(z+="rotate("+r.rotation+","+c/2+","+d/2+")",b=this.rotatePoint((a+c/2)*r.scale,(b+d/2)*r.scale,r.rotation,r.rotationCx,r.rotationCy),a=b.x-c*r.scale/2,b=b.y-d*r.scale/2):(a*=r.scale,b*=r.scale);0!=n&&(z+="rotate("+n+","+-q+","+-p+")");t.setAttribute("transform","translate("+(Math.round(a)+this.foOffset)+","+(Math.round(b)+this.foOffset)+")"+z);y.setAttribute("width",
-Math.round(Math.max(1,c)));y.setAttribute("height",Math.round(Math.max(1,d)));this.root.ownerDocument!=document&&(a=this.createAlternateContent(y,a,b,c,d,e,f,g,h,k,l,m,n),null!=a&&(y.setAttribute("requiredFeatures","http://www.w3.org/TR/SVG11/feature#Extensibility"),c=this.createElement("switch"),c.appendChild(y),c.appendChild(a),t.appendChild(c)))}}else this.plainText(a,b,c,d,e,f,g,h,l,m,n,p)}};
+Math.round(c+1)+"px;white-space:normal;word-wrap:"+mxConstants.WORD_WRAP+";"):q+"white-space:nowrap;",t=this.createElement("g");1>r.alpha&&t.setAttribute("opacity",r.alpha);var z=this.createElement("foreignObject");z.setAttribute("style","overflow:visible;");z.setAttribute("pointer-events","all");q=this.createDiv(e,f,g,q,l);if(null!=q){null!=p&&q.setAttribute("dir",p);t.appendChild(z);this.root.appendChild(t);var w,x;p=w=2;if(!mxClient.IS_IE||9!=document.documentMode&&mxClient.IS_SVG){this.root.ownerDocument!=
+document?(q.style.visibility="hidden",document.body.appendChild(q)):z.appendChild(q);var y=q;null!=y.firstChild&&"DIV"==y.firstChild.nodeName&&(y=y.firstChild,h&&"break-word"==q.style.wordWrap&&(y.style.width="100%"));u=y.offsetWidth;0==u&&q.parentNode==z&&(q.style.visibility="hidden",document.body.appendChild(q),u=y.offsetWidth);this.cacheOffsetSize&&(t.mxCachedOffsetWidth=u);!m&&h&&0<c&&this.root.ownerDocument!=document&&"fill"!=l&&"width"!=l&&(D=q.style.whiteSpace,q.style.whiteSpace="nowrap",u<
+y.offsetWidth&&(q.style.whiteSpace=D));w=u+w-1;h&&"fill"!=l&&"width"!=l&&(m&&(w=Math.min(w,c)),q.style.width=w+"px");w=y.offsetWidth;x=y.offsetHeight;this.cacheOffsetSize&&(t.mxCachedFinalOffsetWidth=w,t.mxCachedFinalOffsetHeight=x);x-=p;q.parentNode!=z&&(z.appendChild(q),q.style.visibility="")}else{y=document.createElement("div");y.style.cssText=q.getAttribute("style");y.style.display=mxClient.IS_QUIRKS?"inline":"inline-block";y.style.position="absolute";y.style.visibility="hidden";x=document.createElement("div");
+x.style.display=mxClient.IS_QUIRKS?"inline":"inline-block";x.style.wordWrap=mxConstants.WORD_WRAP;x.innerHTML=mxUtils.isNode(e)?e.outerHTML:e;y.appendChild(x);document.body.appendChild(y);8!=document.documentMode&&9!=document.documentMode&&null!=r.fontBorderColor&&(w+=2,p+=2);if(h&&0<c){var u=x.offsetWidth;if(!m&&h&&0<c&&this.root.ownerDocument!=document&&"fill"!=l){var D=y.style.whiteSpace;x.style.whiteSpace="nowrap";u<x.offsetWidth&&(y.style.whiteSpace=D)}m&&(u=Math.min(u,c));y.style.width=u+"px";
+w=x.offsetWidth+w+0;x=x.offsetHeight+p;y.style.display="inline-block";y.style.position="";y.style.visibility="";y.style.width=w+"px";q.setAttribute("style",y.style.cssText)}else w=x.offsetWidth+w,x=x.offsetHeight+p;y.parentNode.removeChild(y);z.appendChild(q)}m&&(x=Math.min(x,d),w=Math.min(w,c));"width"==l?d=x:"fill"!=l&&(c=w,d=x);1>r.alpha&&t.setAttribute("opacity",r.alpha);p=q=0;f==mxConstants.ALIGN_CENTER?q-=c/2:f==mxConstants.ALIGN_RIGHT&&(q-=c);a+=q;g==mxConstants.ALIGN_MIDDLE?p-=d/2:g==mxConstants.ALIGN_BOTTOM&&
+(p-=d);"fill"!=l&&mxClient.IS_FF&&mxClient.IS_WIN&&(p-=2);b+=p;y=1!=r.scale?"scale("+r.scale+")":"";0!=r.rotation&&this.rotateHtml?(y+="rotate("+r.rotation+","+c/2+","+d/2+")",b=this.rotatePoint((a+c/2)*r.scale,(b+d/2)*r.scale,r.rotation,r.rotationCx,r.rotationCy),a=b.x-c*r.scale/2,b=b.y-d*r.scale/2):(a*=r.scale,b*=r.scale);0!=n&&(y+="rotate("+n+","+-q+","+-p+")");t.setAttribute("transform","translate("+(Math.round(a)+this.foOffset)+","+(Math.round(b)+this.foOffset)+")"+y);z.setAttribute("width",
+Math.round(Math.max(1,c)));z.setAttribute("height",Math.round(Math.max(1,d)));this.root.ownerDocument!=document&&(a=this.createAlternateContent(z,a,b,c,d,e,f,g,h,k,l,m,n),null!=a&&(z.setAttribute("requiredFeatures","http://www.w3.org/TR/SVG11/feature#Extensibility"),c=this.createElement("switch"),c.appendChild(z),c.appendChild(a),t.appendChild(c)))}}else this.plainText(a,b,c,d,e,f,g,h,l,m,n,p)}};
 mxSvgCanvas2D.prototype.createClip=function(a,b,c,d){a=Math.round(a);b=Math.round(b);c=Math.round(c);d=Math.round(d);for(var e="mx-clip-"+a+"-"+b+"-"+c+"-"+d,f=0,g=e+"-"+f;null!=document.getElementById(g);)g=e+"-"+ ++f;clip=this.createElement("clipPath");clip.setAttribute("id",g);e=this.createElement("rect");e.setAttribute("x",a);e.setAttribute("y",b);e.setAttribute("width",c);e.setAttribute("height",d);clip.appendChild(e);return clip};
 mxSvgCanvas2D.prototype.plainText=function(a,b,c,d,e,f,g,h,k,l,m,n){m=null!=m?m:0;h=this.state;var p=h.fontSize,r=this.createElement("g"),q=h.transform||"";this.updateFont(r);0!=m&&(q+="rotate("+m+","+this.format(a*h.scale)+","+this.format(b*h.scale)+")");null!=n&&r.setAttribute("direction",n);l&&0<c&&0<d&&(n=a,m=b,f==mxConstants.ALIGN_CENTER?n-=c/2:f==mxConstants.ALIGN_RIGHT&&(n-=c),"fill"!=k&&(g==mxConstants.ALIGN_MIDDLE?m-=d/2:g==mxConstants.ALIGN_BOTTOM&&(m-=d)),m=this.createClip(n*h.scale-2,
 m*h.scale-2,c*h.scale+4,d*h.scale+4),null!=this.defs?this.defs.appendChild(m):this.root.appendChild(m),mxClient.IS_CHROME_APP||mxClient.IS_IE||mxClient.IS_IE11||mxClient.IS_EDGE||this.root.ownerDocument!=document?r.setAttribute("clip-path","url(#"+m.getAttribute("id")+")"):(n=this.getBaseUrl().replace(/([\(\)])/g,"\\$1"),r.setAttribute("clip-path","url("+n+"#"+m.getAttribute("id")+")")));m=f==mxConstants.ALIGN_RIGHT?"end":f==mxConstants.ALIGN_CENTER?"middle":"start";"start"!=m&&r.setAttribute("text-anchor",
@@ -438,13 +438,13 @@ mxVmlCanvas2D.prototype.createDiv=function(a,b,c,d){c=this.createElement("div");
 f,c.innerHTML=a);a=c.style;a.fontSize=e.fontSize/this.vmlScale+"px";a.fontFamily=e.fontFamily;a.color=e.fontColor;a.verticalAlign="top";a.textAlign=b||"left";a.lineHeight=mxConstants.ABSOLUTE_LINE_HEIGHT?e.fontSize*mxConstants.LINE_HEIGHT/this.vmlScale+"px":mxConstants.LINE_HEIGHT;(e.fontStyle&mxConstants.FONT_BOLD)==mxConstants.FONT_BOLD&&(a.fontWeight="bold");(e.fontStyle&mxConstants.FONT_ITALIC)==mxConstants.FONT_ITALIC&&(a.fontStyle="italic");(e.fontStyle&mxConstants.FONT_UNDERLINE)==mxConstants.FONT_UNDERLINE&&
 (a.textDecoration="underline");return c};
 mxVmlCanvas2D.prototype.text=function(a,b,c,d,e,f,g,h,k,l,m,n,p){if(this.textEnabled&&null!=e){var r=this.state;if("html"==k){null!=r.rotation&&(b=this.rotatePoint(a,b,r.rotation,r.rotationCx,r.rotationCy),a=b.x,b=b.y);8!=document.documentMode||mxClient.IS_EM?(a*=r.scale,b*=r.scale):(a+=r.dx,b+=r.dy,"fill"!=l&&g==mxConstants.ALIGN_TOP&&--b);k=8!=document.documentMode||mxClient.IS_EM?this.createElement("div"):this.createVmlElement("group");k.style.position="absolute";k.style.display="inline";k.style.left=
-this.format(a)+"px";k.style.top=this.format(b)+"px";k.style.zoom=r.scale;var q=this.createElement("div");q.style.position="relative";q.style.display="inline";var t=mxUtils.getAlignmentAsPoint(f,g),y=t.x,t=t.y;e=this.createDiv(e,f,g,l);f=this.createElement("div");null!=p&&e.setAttribute("dir",p);if(h&&0<c){if(m||(e.style.width=Math.round(c)+"px"),e.style.wordWrap=mxConstants.WORD_WRAP,e.style.whiteSpace="normal","break-word"==e.style.wordWrap){var x=e;null!=x.firstChild&&"DIV"==x.firstChild.nodeName&&
-(x.firstChild.style.width="100%")}}else e.style.whiteSpace="nowrap";n=r.rotation+(n||0);this.rotateHtml&&0!=n?(f.style.display="inline",f.style.zoom="1",f.appendChild(e),8!=document.documentMode||mxClient.IS_EM||"DIV"==this.root.nodeName?k.appendChild(f):(q.appendChild(f),k.appendChild(q))):8!=document.documentMode||mxClient.IS_EM?(e.style.display="inline",k.appendChild(e)):(q.appendChild(e),k.appendChild(q));"DIV"!=this.root.nodeName?(p=this.createVmlElement("rect"),p.stroked="false",p.filled="false",
-p.appendChild(k),this.root.appendChild(p)):this.root.appendChild(k);m?(e.style.overflow="hidden",e.style.width=Math.round(c)+"px",mxClient.IS_QUIRKS||(e.style.maxHeight=Math.round(d)+"px")):"fill"==l?(e.style.overflow="hidden",e.style.width=Math.max(0,c)+1+"px",e.style.height=Math.max(0,d)+1+"px"):"width"==l&&(e.style.overflow="hidden",e.style.width=Math.max(0,c)+1+"px",e.style.maxHeight=Math.max(0,d)+1+"px");if(this.rotateHtml&&0!=n){x=Math.PI/180*n;n=parseFloat(parseFloat(Math.cos(x)).toFixed(8));
-p=parseFloat(parseFloat(Math.sin(-x)).toFixed(8));x%=2*Math.PI;0>x&&(x+=2*Math.PI);x%=Math.PI;x>Math.PI/2&&(x=Math.PI-x);g=Math.cos(x);var w=Math.sin(x);8!=document.documentMode||mxClient.IS_EM||(e.style.display="inline-block",f.style.display="inline-block",q.style.display="inline-block");e.style.visibility="hidden";e.style.position="absolute";document.body.appendChild(e);q=e;null!=q.firstChild&&"DIV"==q.firstChild.nodeName&&(q=q.firstChild);x=q.offsetWidth+3;q=q.offsetHeight;m?(c=Math.min(c,x),q=
-Math.min(q,d)):c=x;h&&(e.style.width=c+"px");mxClient.IS_QUIRKS&&(m||"width"==l)&&q>d&&(q=d,e.style.height=q+"px");d=q;m=(d-d*g+c*-w)/2-p*c*(y+.5)+n*d*(t+.5);h=(c-c*g+d*-w)/2+n*c*(y+.5)+p*d*(t+.5);"group"==k.nodeName&&"DIV"==this.root.nodeName?(l=this.createElement("div"),l.style.display="inline-block",l.style.position="absolute",l.style.left=this.format(a+(h-c/2)*r.scale)+"px",l.style.top=this.format(b+(m-d/2)*r.scale)+"px",k.parentNode.appendChild(l),l.appendChild(k)):(r=8!=document.documentMode||
+this.format(a)+"px";k.style.top=this.format(b)+"px";k.style.zoom=r.scale;var q=this.createElement("div");q.style.position="relative";q.style.display="inline";var t=mxUtils.getAlignmentAsPoint(f,g),z=t.x,t=t.y;e=this.createDiv(e,f,g,l);f=this.createElement("div");null!=p&&e.setAttribute("dir",p);if(h&&0<c){if(m||(e.style.width=Math.round(c)+"px"),e.style.wordWrap=mxConstants.WORD_WRAP,e.style.whiteSpace="normal","break-word"==e.style.wordWrap){var w=e;null!=w.firstChild&&"DIV"==w.firstChild.nodeName&&
+(w.firstChild.style.width="100%")}}else e.style.whiteSpace="nowrap";n=r.rotation+(n||0);this.rotateHtml&&0!=n?(f.style.display="inline",f.style.zoom="1",f.appendChild(e),8!=document.documentMode||mxClient.IS_EM||"DIV"==this.root.nodeName?k.appendChild(f):(q.appendChild(f),k.appendChild(q))):8!=document.documentMode||mxClient.IS_EM?(e.style.display="inline",k.appendChild(e)):(q.appendChild(e),k.appendChild(q));"DIV"!=this.root.nodeName?(p=this.createVmlElement("rect"),p.stroked="false",p.filled="false",
+p.appendChild(k),this.root.appendChild(p)):this.root.appendChild(k);m?(e.style.overflow="hidden",e.style.width=Math.round(c)+"px",mxClient.IS_QUIRKS||(e.style.maxHeight=Math.round(d)+"px")):"fill"==l?(e.style.overflow="hidden",e.style.width=Math.max(0,c)+1+"px",e.style.height=Math.max(0,d)+1+"px"):"width"==l&&(e.style.overflow="hidden",e.style.width=Math.max(0,c)+1+"px",e.style.maxHeight=Math.max(0,d)+1+"px");if(this.rotateHtml&&0!=n){w=Math.PI/180*n;n=parseFloat(parseFloat(Math.cos(w)).toFixed(8));
+p=parseFloat(parseFloat(Math.sin(-w)).toFixed(8));w%=2*Math.PI;0>w&&(w+=2*Math.PI);w%=Math.PI;w>Math.PI/2&&(w=Math.PI-w);g=Math.cos(w);var x=Math.sin(w);8!=document.documentMode||mxClient.IS_EM||(e.style.display="inline-block",f.style.display="inline-block",q.style.display="inline-block");e.style.visibility="hidden";e.style.position="absolute";document.body.appendChild(e);q=e;null!=q.firstChild&&"DIV"==q.firstChild.nodeName&&(q=q.firstChild);w=q.offsetWidth+3;q=q.offsetHeight;m?(c=Math.min(c,w),q=
+Math.min(q,d)):c=w;h&&(e.style.width=c+"px");mxClient.IS_QUIRKS&&(m||"width"==l)&&q>d&&(q=d,e.style.height=q+"px");d=q;m=(d-d*g+c*-x)/2-p*c*(z+.5)+n*d*(t+.5);h=(c-c*g+d*-x)/2+n*c*(z+.5)+p*d*(t+.5);"group"==k.nodeName&&"DIV"==this.root.nodeName?(l=this.createElement("div"),l.style.display="inline-block",l.style.position="absolute",l.style.left=this.format(a+(h-c/2)*r.scale)+"px",l.style.top=this.format(b+(m-d/2)*r.scale)+"px",k.parentNode.appendChild(l),l.appendChild(k)):(r=8!=document.documentMode||
 mxClient.IS_EM?r.scale:1,k.style.left=this.format(a+(h-c/2)*r)+"px",k.style.top=this.format(b+(m-d/2)*r)+"px");f.style.filter="progid:DXImageTransform.Microsoft.Matrix(M11="+n+", M12="+p+", M21="+-p+", M22="+n+", sizingMethod='auto expand')";f.style.backgroundColor=this.rotatedHtmlBackground;1>this.state.alpha&&(f.style.filter+="alpha(opacity="+100*this.state.alpha+")");f.appendChild(e);e.style.position="";e.style.visibility=""}else 8!=document.documentMode||mxClient.IS_EM?(e.style.verticalAlign=
-"top",1>this.state.alpha&&(k.style.filter="alpha(opacity="+100*this.state.alpha+")"),r=e.parentNode,e.style.visibility="hidden",document.body.appendChild(e),c=e.offsetWidth,q=e.offsetHeight,mxClient.IS_QUIRKS&&m&&q>d&&(q=d,e.style.height=q+"px"),d=q,e.style.visibility="",r.appendChild(e),k.style.left=this.format(a+c*y*this.state.scale)+"px",k.style.top=this.format(b+d*t*this.state.scale)+"px"):(1>this.state.alpha&&(e.style.filter="alpha(opacity="+100*this.state.alpha+")"),q.style.left=100*y+"%",q.style.top=
+"top",1>this.state.alpha&&(k.style.filter="alpha(opacity="+100*this.state.alpha+")"),r=e.parentNode,e.style.visibility="hidden",document.body.appendChild(e),c=e.offsetWidth,q=e.offsetHeight,mxClient.IS_QUIRKS&&m&&q>d&&(q=d,e.style.height=q+"px"),d=q,e.style.visibility="",r.appendChild(e),k.style.left=this.format(a+c*z*this.state.scale)+"px",k.style.top=this.format(b+d*t*this.state.scale)+"px"):(1>this.state.alpha&&(e.style.filter="alpha(opacity="+100*this.state.alpha+")"),q.style.left=100*z+"%",q.style.top=
 100*t+"%")}else this.plainText(a,b,c,d,mxUtils.htmlEntities(e,!1),f,g,h,k,l,m,n,p)}};
 mxVmlCanvas2D.prototype.plainText=function(a,b,c,d,e,f,g,h,k,l,m,n,p){h=this.state;a=(a+h.dx)*h.scale;b=(b+h.dy)*h.scale;c=this.createVmlElement("shape");c.style.width="1px";c.style.height="1px";c.stroked="false";d=this.createVmlElement("fill");d.color=h.fontColor;d.opacity=100*h.alpha+"%";c.appendChild(d);d=this.createVmlElement("path");d.textpathok="true";d.v="m "+this.format(0)+" "+this.format(0)+" l "+this.format(1)+" "+this.format(0);c.appendChild(d);d=this.createVmlElement("textpath");d.style.cssText=
 "v-text-align:"+f;d.style.align=f;d.style.fontFamily=h.fontFamily;d.string=e;d.on="true";f=h.fontSize*h.scale/this.vmlScale;d.style.fontSize=f+"px";(h.fontStyle&mxConstants.FONT_BOLD)==mxConstants.FONT_BOLD&&(d.style.fontWeight="bold");(h.fontStyle&mxConstants.FONT_ITALIC)==mxConstants.FONT_ITALIC&&(d.style.fontStyle="italic");(h.fontStyle&mxConstants.FONT_UNDERLINE)==mxConstants.FONT_UNDERLINE&&(d.style.textDecoration="underline");e=e.split("\n");h=f+(e.length-1)*f*mxConstants.LINE_HEIGHT;f=e=0;
@@ -524,19 +524,19 @@ mxRhombus.prototype.paintVertexShape=function(a,b,c,d,e){var f=d/2,g=e/2,h=mxUti
 mxPolyline.prototype.getShapeRotation=function(){return 0};mxPolyline.prototype.isPaintBoundsInverted=function(){return!1};mxPolyline.prototype.paintEdgeShape=function(a,b){null==this.style||1!=this.style[mxConstants.STYLE_CURVED]?this.paintLine(a,b,this.isRounded):this.paintCurvedLine(a,b)};mxPolyline.prototype.paintLine=function(a,b,c){var d=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;a.begin();this.addPoints(a,b,c,d,!1);a.stroke()};
 mxPolyline.prototype.paintCurvedLine=function(a,b){a.begin();var c=b[0],d=b.length;a.moveTo(c.x,c.y);for(c=1;c<d-2;c++){var e=b[c],f=b[c+1];a.quadTo(e.x,e.y,(e.x+f.x)/2,(e.y+f.y)/2)}e=b[d-2];f=b[d-1];a.quadTo(e.x,e.y,f.x,f.y);a.stroke()};
 function mxArrow(a,b,c,d,e,f,g){mxShape.call(this);this.points=a;this.fill=b;this.stroke=c;this.strokewidth=null!=d?d:1;this.arrowWidth=null!=e?e:mxConstants.ARROW_WIDTH;this.spacing=null!=f?f:mxConstants.ARROW_SPACING;this.endSize=null!=g?g:mxConstants.ARROW_SIZE}mxUtils.extend(mxArrow,mxShape);mxArrow.prototype.augmentBoundingBox=function(a){mxShape.prototype.augmentBoundingBox.apply(this,arguments);a.grow((Math.max(this.arrowWidth,this.endSize)/2+this.strokewidth)*this.scale)};
-mxArrow.prototype.paintEdgeShape=function(a,b){var c=mxConstants.ARROW_SPACING,d=mxConstants.ARROW_WIDTH,e=b[0],f=b[b.length-1],g=f.x-e.x,h=f.y-e.y,k=Math.sqrt(g*g+h*h),l=k-2*c-mxConstants.ARROW_SIZE,g=g/k,h=h/k,k=d*h/3,d=-d*g/3,m=e.x-k/2+c*g,e=e.y-d/2+c*h,n=m+k,p=e+d,r=n+l*g,l=p+l*h,q=r+k,t=l+d,y=q-3*k,x=t-3*d;a.begin();a.moveTo(m,e);a.lineTo(n,p);a.lineTo(r,l);a.lineTo(q,t);a.lineTo(f.x-c*g,f.y-c*h);a.lineTo(y,x);a.lineTo(y+k,x+d);a.close();a.fillAndStroke()};
+mxArrow.prototype.paintEdgeShape=function(a,b){var c=mxConstants.ARROW_SPACING,d=mxConstants.ARROW_WIDTH,e=b[0],f=b[b.length-1],g=f.x-e.x,h=f.y-e.y,k=Math.sqrt(g*g+h*h),l=k-2*c-mxConstants.ARROW_SIZE,g=g/k,h=h/k,k=d*h/3,d=-d*g/3,m=e.x-k/2+c*g,e=e.y-d/2+c*h,n=m+k,p=e+d,r=n+l*g,l=p+l*h,q=r+k,t=l+d,z=q-3*k,w=t-3*d;a.begin();a.moveTo(m,e);a.lineTo(n,p);a.lineTo(r,l);a.lineTo(q,t);a.lineTo(f.x-c*g,f.y-c*h);a.lineTo(z,w);a.lineTo(z+k,w+d);a.close();a.fillAndStroke()};
 function mxArrowConnector(a,b,c,d,e,f,g){mxShape.call(this);this.points=a;this.fill=b;this.stroke=c;this.strokewidth=null!=d?d:1;this.arrowWidth=null!=e?e:mxConstants.ARROW_WIDTH;this.arrowSpacing=null!=f?f:mxConstants.ARROW_SPACING;this.startSize=mxConstants.ARROW_SIZE/5;this.endSize=mxConstants.ARROW_SIZE/5}mxUtils.extend(mxArrowConnector,mxShape);mxArrowConnector.prototype.useSvgBoundingBox=!0;
 mxArrowConnector.prototype.resetStyles=function(){mxShape.prototype.resetStyles.apply(this,arguments);this.arrowSpacing=mxConstants.ARROW_SPACING};mxArrowConnector.prototype.apply=function(a){mxShape.prototype.apply.apply(this,arguments);null!=this.style&&(this.startSize=3*mxUtils.getNumber(this.style,mxConstants.STYLE_STARTSIZE,mxConstants.ARROW_SIZE/5),this.endSize=3*mxUtils.getNumber(this.style,mxConstants.STYLE_ENDSIZE,mxConstants.ARROW_SIZE/5))};
 mxArrowConnector.prototype.augmentBoundingBox=function(a){mxShape.prototype.augmentBoundingBox.apply(this,arguments);var b=this.getEdgeWidth();this.isMarkerStart()&&(b=Math.max(b,this.getStartArrowWidth()));this.isMarkerEnd()&&(b=Math.max(b,this.getEndArrowWidth()));a.grow((b/2+this.strokewidth)*this.scale)};
 mxArrowConnector.prototype.paintEdgeShape=function(a,b){var c=this.strokewidth;this.outline&&(c=Math.max(1,mxUtils.getNumber(this.style,mxConstants.STYLE_STROKEWIDTH,this.strokewidth)));for(var d=this.getStartArrowWidth()+c,e=this.getEndArrowWidth()+c,f=this.outline?this.getEdgeWidth()+c:this.getEdgeWidth(),g=this.isOpenEnded(),h=this.isMarkerStart(),k=this.isMarkerEnd(),l=g?0:this.arrowSpacing+c/2,m=this.startSize+c,c=this.endSize+c,n=this.isArrowRounded(),p=b[b.length-1],r=1;r<b.length-1&&b[r].x==
-b[0].x&&b[r].y==b[0].y;)r++;var q=b[r].x-b[0].x,r=b[r].y-b[0].y,t=Math.sqrt(q*q+r*r);if(0!=t){var y=q/t,x,w=y,z=r/t,u,F=z,t=f*z,E=-f*y,D=[];n?a.setLineJoin("round"):2<b.length&&a.setMiterLimit(1.42);a.begin();q=y;r=z;if(h&&!g)this.paintMarker(a,b[0].x,b[0].y,y,z,m,d,f,l,!0);else{x=b[0].x+t/2+l*y;u=b[0].y+E/2+l*z;var C=b[0].x-t/2+l*y,G=b[0].y-E/2+l*z;g?(a.moveTo(x,u),D.push(function(){a.lineTo(C,G)})):(a.moveTo(C,G),a.lineTo(x,u))}for(var B=u=x=0,t=0;t<b.length-2;t++)if(E=mxUtils.relativeCcw(b[t].x,
-b[t].y,b[t+1].x,b[t+1].y,b[t+2].x,b[t+2].y),x=b[t+2].x-b[t+1].x,u=b[t+2].y-b[t+1].y,B=Math.sqrt(x*x+u*u),0!=B&&(w=x/B,F=u/B,tmp=Math.max(Math.sqrt((y*w+z*F+1)/2),.04),x=y+w,u=z+F,B=Math.sqrt(x*x+u*u),0!=B)){x/=B;u/=B;var B=Math.max(tmp,Math.min(this.strokewidth/200+.04,.35)),B=0!=E&&n?Math.max(.1,B):Math.max(tmp,.06),M=b[t+1].x+u*f/2/B,K=b[t+1].y-x*f/2/B;u=b[t+1].x-u*f/2/B;x=b[t+1].y+x*f/2/B;0!=E&&n?-1==E?(E=u+F*f,B=x-w*f,a.lineTo(u+z*f,x-y*f),a.quadTo(M,K,E,B),function(b,c){D.push(function(){a.lineTo(b,
-c)})}(u,x)):(a.lineTo(M,K),function(b,c){var d=M-z*f,e=K+y*f,g=M-F*f,h=K+w*f;D.push(function(){a.quadTo(b,c,d,e)});D.push(function(){a.lineTo(g,h)})}(u,x)):(a.lineTo(M,K),function(b,c){D.push(function(){a.lineTo(b,c)})}(u,x));y=w;z=F}t=f*F;E=-f*w;if(k&&!g)this.paintMarker(a,p.x,p.y,-y,-z,c,e,f,l,!1);else{a.lineTo(p.x-l*w+t/2,p.y-l*F+E/2);var L=p.x-l*w-t/2,V=p.y-l*F-E/2;g?(a.moveTo(L,V),D.splice(0,0,function(){a.moveTo(L,V)})):a.lineTo(L,V)}for(t=D.length-1;0<=t;t--)D[t]();g?(a.end(),a.stroke()):(a.close(),
-a.fillAndStroke());a.setShadow(!1);a.setMiterLimit(4);n&&a.setLineJoin("flat");2<b.length&&(a.setMiterLimit(4),h&&!g&&(a.begin(),this.paintMarker(a,b[0].x,b[0].y,q,r,m,d,f,l,!0),a.stroke(),a.end()),k&&!g&&(a.begin(),this.paintMarker(a,p.x,p.y,-y,-z,c,e,f,l,!0),a.stroke(),a.end()))}};
+b[0].x&&b[r].y==b[0].y;)r++;var q=b[r].x-b[0].x,r=b[r].y-b[0].y,t=Math.sqrt(q*q+r*r);if(0!=t){var z=q/t,w,x=z,y=r/t,u,D=y,t=f*y,F=-f*z,E=[];n?a.setLineJoin("round"):2<b.length&&a.setMiterLimit(1.42);a.begin();q=z;r=y;if(h&&!g)this.paintMarker(a,b[0].x,b[0].y,z,y,m,d,f,l,!0);else{w=b[0].x+t/2+l*z;u=b[0].y+F/2+l*y;var C=b[0].x-t/2+l*z,G=b[0].y-F/2+l*y;g?(a.moveTo(w,u),E.push(function(){a.lineTo(C,G)})):(a.moveTo(C,G),a.lineTo(w,u))}for(var B=u=w=0,t=0;t<b.length-2;t++)if(F=mxUtils.relativeCcw(b[t].x,
+b[t].y,b[t+1].x,b[t+1].y,b[t+2].x,b[t+2].y),w=b[t+2].x-b[t+1].x,u=b[t+2].y-b[t+1].y,B=Math.sqrt(w*w+u*u),0!=B&&(x=w/B,D=u/B,tmp=Math.max(Math.sqrt((z*x+y*D+1)/2),.04),w=z+x,u=y+D,B=Math.sqrt(w*w+u*u),0!=B)){w/=B;u/=B;var B=Math.max(tmp,Math.min(this.strokewidth/200+.04,.35)),B=0!=F&&n?Math.max(.1,B):Math.max(tmp,.06),M=b[t+1].x+u*f/2/B,L=b[t+1].y-w*f/2/B;u=b[t+1].x-u*f/2/B;w=b[t+1].y+w*f/2/B;0!=F&&n?-1==F?(F=u+D*f,B=w-x*f,a.lineTo(u+y*f,w-z*f),a.quadTo(M,L,F,B),function(b,c){E.push(function(){a.lineTo(b,
+c)})}(u,w)):(a.lineTo(M,L),function(b,c){var d=M-y*f,e=L+z*f,g=M-D*f,h=L+x*f;E.push(function(){a.quadTo(b,c,d,e)});E.push(function(){a.lineTo(g,h)})}(u,w)):(a.lineTo(M,L),function(b,c){E.push(function(){a.lineTo(b,c)})}(u,w));z=x;y=D}t=f*D;F=-f*x;if(k&&!g)this.paintMarker(a,p.x,p.y,-z,-y,c,e,f,l,!1);else{a.lineTo(p.x-l*x+t/2,p.y-l*D+F/2);var H=p.x-l*x-t/2,U=p.y-l*D-F/2;g?(a.moveTo(H,U),E.splice(0,0,function(){a.moveTo(H,U)})):a.lineTo(H,U)}for(t=E.length-1;0<=t;t--)E[t]();g?(a.end(),a.stroke()):(a.close(),
+a.fillAndStroke());a.setShadow(!1);a.setMiterLimit(4);n&&a.setLineJoin("flat");2<b.length&&(a.setMiterLimit(4),h&&!g&&(a.begin(),this.paintMarker(a,b[0].x,b[0].y,q,r,m,d,f,l,!0),a.stroke(),a.end()),k&&!g&&(a.begin(),this.paintMarker(a,p.x,p.y,-z,-y,c,e,f,l,!0),a.stroke(),a.end()))}};
 mxArrowConnector.prototype.paintMarker=function(a,b,c,d,e,f,g,h,k,l){g=h/g;var m=h*e/2;h=-h*d/2;var n=(k+f)*d;f=(k+f)*e;l?a.moveTo(b-m+n,c-h+f):a.lineTo(b-m+n,c-h+f);a.lineTo(b-m/g+n,c-h/g+f);a.lineTo(b+k*d,c+k*e);a.lineTo(b+m/g+n,c+h/g+f);a.lineTo(b+m+n,c+h+f)};mxArrowConnector.prototype.isArrowRounded=function(){return this.isRounded};mxArrowConnector.prototype.getStartArrowWidth=function(){return mxConstants.ARROW_WIDTH};mxArrowConnector.prototype.getEndArrowWidth=function(){return mxConstants.ARROW_WIDTH};
 mxArrowConnector.prototype.getEdgeWidth=function(){return mxConstants.ARROW_WIDTH/3};mxArrowConnector.prototype.isOpenEnded=function(){return!1};mxArrowConnector.prototype.isMarkerStart=function(){return mxUtils.getValue(this.style,mxConstants.STYLE_STARTARROW,mxConstants.NONE)!=mxConstants.NONE};mxArrowConnector.prototype.isMarkerEnd=function(){return mxUtils.getValue(this.style,mxConstants.STYLE_ENDARROW,mxConstants.NONE)!=mxConstants.NONE};
-function mxText(a,b,c,d,e,f,g,h,k,l,m,n,p,r,q,t,y,x,w,z,u){mxShape.call(this);this.value=a;this.bounds=b;this.color=null!=e?e:"black";this.align=null!=c?c:mxConstants.ALIGN_CENTER;this.valign=null!=d?d:mxConstants.ALIGN_MIDDLE;this.family=null!=f?f:mxConstants.DEFAULT_FONTFAMILY;this.size=null!=g?g:mxConstants.DEFAULT_FONTSIZE;this.fontStyle=null!=h?h:mxConstants.DEFAULT_FONTSTYLE;this.spacing=parseInt(k||2);this.spacingTop=this.spacing+parseInt(l||0);this.spacingRight=this.spacing+parseInt(m||0);
-this.spacingBottom=this.spacing+parseInt(n||0);this.spacingLeft=this.spacing+parseInt(p||0);this.horizontal=null!=r?r:!0;this.background=q;this.border=t;this.wrap=null!=y?y:!1;this.clipped=null!=x?x:!1;this.overflow=null!=w?w:"visible";this.labelPadding=null!=z?z:0;this.textDirection=u;this.rotation=0;this.updateMargin()}mxUtils.extend(mxText,mxShape);mxText.prototype.baseSpacingTop=0;mxText.prototype.baseSpacingBottom=0;mxText.prototype.baseSpacingLeft=0;mxText.prototype.baseSpacingRight=0;
+function mxText(a,b,c,d,e,f,g,h,k,l,m,n,p,r,q,t,z,w,x,y,u){mxShape.call(this);this.value=a;this.bounds=b;this.color=null!=e?e:"black";this.align=null!=c?c:mxConstants.ALIGN_CENTER;this.valign=null!=d?d:mxConstants.ALIGN_MIDDLE;this.family=null!=f?f:mxConstants.DEFAULT_FONTFAMILY;this.size=null!=g?g:mxConstants.DEFAULT_FONTSIZE;this.fontStyle=null!=h?h:mxConstants.DEFAULT_FONTSTYLE;this.spacing=parseInt(k||2);this.spacingTop=this.spacing+parseInt(l||0);this.spacingRight=this.spacing+parseInt(m||0);
+this.spacingBottom=this.spacing+parseInt(n||0);this.spacingLeft=this.spacing+parseInt(p||0);this.horizontal=null!=r?r:!0;this.background=q;this.border=t;this.wrap=null!=z?z:!1;this.clipped=null!=w?w:!1;this.overflow=null!=x?x:"visible";this.labelPadding=null!=y?y:0;this.textDirection=u;this.rotation=0;this.updateMargin()}mxUtils.extend(mxText,mxShape);mxText.prototype.baseSpacingTop=0;mxText.prototype.baseSpacingBottom=0;mxText.prototype.baseSpacingLeft=0;mxText.prototype.baseSpacingRight=0;
 mxText.prototype.replaceLinefeeds=!0;mxText.prototype.verticalTextRotation=-90;mxText.prototype.ignoreClippedStringSize=!0;mxText.prototype.ignoreStringSize=!1;mxText.prototype.textWidthPadding=8!=document.documentMode||mxClient.IS_EM?3:4;mxText.prototype.lastValue=null;mxText.prototype.cacheEnabled=!0;mxText.prototype.isParseVml=function(){return!1};mxText.prototype.isHtmlAllowed=function(){return 8!=document.documentMode||mxClient.IS_EM};mxText.prototype.getSvgScreenOffset=function(){return 0};
 mxText.prototype.checkBounds=function(){return!isNaN(this.scale)&&isFinite(this.scale)&&0<this.scale&&null!=this.bounds&&!isNaN(this.bounds.x)&&!isNaN(this.bounds.y)&&!isNaN(this.bounds.width)&&!isNaN(this.bounds.height)};
 mxText.prototype.paint=function(a,b){var c=this.scale,d=this.bounds.x/c,e=this.bounds.y/c,f=this.bounds.width/c,c=this.bounds.height/c;this.updateTransform(a,d,e,f,c);this.configureCanvas(a,d,e,f,c);var g=null!=this.state?this.state.unscaledWidth:null;if(b)null==this.node.firstChild||null!=g&&this.lastUnscaledWidth==g||a.invalidateCachedOffsetSize(this.node),a.updateText(d,e,f,c,this.align,this.valign,this.wrap,this.overflow,this.clipped,this.getTextRotation(),this.node);else{var h=mxUtils.isNode(this.value)||
@@ -627,7 +627,7 @@ mxStackLayout.prototype.moveCell=function(a,b,c){var d=this.graph.getModel(),e=d
 mxStackLayout.prototype.getParentSize=function(a){var b=this.graph.getModel(),c=b.getGeometry(a);null!=this.graph.container&&(null==c&&b.isLayer(a)||a==this.graph.getView().currentRoot)&&(c=new mxRectangle(0,0,this.graph.container.offsetWidth-1,this.graph.container.offsetHeight-1));return c};
 mxStackLayout.prototype.execute=function(a){if(null!=a){var b=this.getParentSize(a),c=this.isHorizontal(),d=this.graph.getModel(),e=null;null!=b&&(e=c?b.height-this.marginTop-this.marginBottom:b.width-this.marginLeft-this.marginRight);var e=e-(2*this.spacing+2*this.border),f=this.x0+this.border+this.marginLeft,g=this.y0+this.border+this.marginTop;if(this.graph.isSwimlane(a)){var h=this.graph.getCellStyle(a),k=mxUtils.getNumber(h,mxConstants.STYLE_STARTSIZE,mxConstants.DEFAULT_STARTSIZE),h=1==mxUtils.getValue(h,
 mxConstants.STYLE_HORIZONTAL,!0);null!=b&&(k=h?Math.min(k,b.height):Math.min(k,b.width));c==h&&(e-=k);h?g+=k:f+=k}d.beginUpdate();try{for(var k=0,h=null,l=0,m=null,n=d.getChildCount(a),p=0;p<n;p++){var r=d.getChildAt(a,p);if(!this.isVertexIgnored(r)&&this.isVertexMovable(r)){var q=d.getGeometry(r);if(null!=q){q=q.clone();null!=this.wrap&&null!=h&&(c&&h.x+h.width+q.width+2*this.spacing>this.wrap||!c&&h.y+h.height+q.height+2*this.spacing>this.wrap)&&(h=null,c?g+=k+this.spacing:f+=k+this.spacing,k=0);
-var k=Math.max(k,c?q.height:q.width),t=0;if(!this.borderCollapse)var y=this.graph.getCellStyle(r),t=mxUtils.getNumber(y,mxConstants.STYLE_STROKEWIDTH,1);null!=h?c?q.x=l+this.spacing+Math.floor(t/2):q.y=l+this.spacing+Math.floor(t/2):this.keepFirstLocation||(c?q.x=f:q.y=g);c?q.y=g:q.x=f;this.fill&&null!=e&&(c?q.height=e:q.width=e);this.setChildGeometry(r,q);m=r;h=q;l=c?h.x+h.width+Math.floor(t/2):h.y+h.height+Math.floor(t/2)}}}this.resizeParent&&null!=b&&null!=h&&!this.graph.isCellCollapsed(a)?this.updateParentGeometry(a,
+var k=Math.max(k,c?q.height:q.width),t=0;if(!this.borderCollapse)var z=this.graph.getCellStyle(r),t=mxUtils.getNumber(z,mxConstants.STYLE_STROKEWIDTH,1);null!=h?c?q.x=l+this.spacing+Math.floor(t/2):q.y=l+this.spacing+Math.floor(t/2):this.keepFirstLocation||(c?q.x=f:q.y=g);c?q.y=g:q.x=f;this.fill&&null!=e&&(c?q.height=e:q.width=e);this.setChildGeometry(r,q);m=r;h=q;l=c?h.x+h.width+Math.floor(t/2):h.y+h.height+Math.floor(t/2)}}}this.resizeParent&&null!=b&&null!=h&&!this.graph.isCellCollapsed(a)?this.updateParentGeometry(a,
 b,h):this.resizeLast&&null!=b&&null!=h&&null!=m&&(c?h.width=b.width-h.x-this.spacing-this.marginRight-this.marginLeft:h.height=b.height-h.y-this.spacing-this.marginBottom,this.setChildGeometry(m,h))}finally{d.endUpdate()}}};mxStackLayout.prototype.setChildGeometry=function(a,b){var c=this.graph.getCellGeometry(a);null!=c&&b.x==c.x&&b.y==c.y&&b.width==c.width&&b.height==c.height||this.graph.getModel().setGeometry(a,b)};
 mxStackLayout.prototype.updateParentGeometry=function(a,b,c){var d=this.isHorizontal(),e=this.graph.getModel(),f=b.clone();d?(c=c.x+c.width+this.spacing+this.marginRight,f.width=this.resizeParentMax?Math.max(f.width,c):c):(c=c.y+c.height+this.spacing+this.marginBottom,f.height=this.resizeParentMax?Math.max(f.height,c):c);b.x==f.x&&b.y==f.y&&b.width==f.width&&b.height==f.height||e.setGeometry(a,f)};
 function mxPartitionLayout(a,b,c,d){mxGraphLayout.call(this,a);this.horizontal=null!=b?b:!0;this.spacing=c||0;this.border=d||0}mxPartitionLayout.prototype=new mxGraphLayout;mxPartitionLayout.prototype.constructor=mxPartitionLayout;mxPartitionLayout.prototype.horizontal=null;mxPartitionLayout.prototype.spacing=null;mxPartitionLayout.prototype.border=null;mxPartitionLayout.prototype.resizeVertices=!0;mxPartitionLayout.prototype.isHorizontal=function(){return this.horizontal};
@@ -730,9 +730,9 @@ mxMedianHybridCrossingReduction.prototype.execute=function(a){a=this.layout.getM
 h}else for(c++,e=0;e<this.nestedBestRanks.length;e++)for(f=a.ranks[e],g=0;g<f.length;g++)h=f[g],h.setGeneralPurposeVariable(e,g);if(0==d)break}c=[];d=[];for(b=0;b<a.maxRank+1;b++)d[b]=[],c[b]=d[b];for(b=0;b<this.nestedBestRanks.length;b++)for(e=0;e<this.nestedBestRanks[b].length;e++)d[b].push(this.nestedBestRanks[b][e]);a.ranks=c};mxMedianHybridCrossingReduction.prototype.calculateCrossings=function(a){for(var b=a.ranks.length,c=0,d=1;d<b;d++)c+=this.calculateRankCrossing(d,a);return c};
 mxMedianHybridCrossingReduction.prototype.calculateRankCrossing=function(a,b){for(var c=0,d=b.ranks[a],e=b.ranks[a-1],f=[],g=0;g<d.length;g++){for(var h=d[g],k=h.getGeneralPurposeVariable(a),h=h.getPreviousLayerConnectedCells(a),l=[],m=0;m<h.length;m++){var n=h[m].getGeneralPurposeVariable(a-1);l.push(n)}l.sort(function(a,b){return a-b});f[k]=l}d=[];for(g=0;g<f.length;g++)d=d.concat(f[g]);for(f=1;f<e.length;)f<<=1;k=2*f-1;--f;e=[];for(g=0;g<k;++g)e[g]=0;for(g=0;g<d.length;g++)for(k=d[g]+f,++e[k];0<
 k;)k%2&&(c+=e[k+1]),k=k-1>>1,++e[k];return c};
-mxMedianHybridCrossingReduction.prototype.transpose=function(a,b){for(var c=!0,d=0;c&&10>d++;)for(var e=1==a%2&&1==d%2,c=!1,f=0;f<b.ranks.length;f++){for(var g=b.ranks[f],h=[],k=0;k<g.length;k++){var l=g[k],m=l.getGeneralPurposeVariable(f);0>m&&(m=k);h[m]=l}for(var n=null,p=null,r,q,t=null,y=null,x,w=null,k=0;k<g.length-1;k++){if(0==k){x=h[k];l=x.getNextLayerConnectedCells(f);m=x.getPreviousLayerConnectedCells(f);r=[];q=[];for(var z=0;z<l.length;z++)r[z]=l[z].getGeneralPurposeVariable(f+1);for(z=
-0;z<m.length;z++)q[z]=m[z].getGeneralPurposeVariable(f-1)}else l=n,m=p,r=t,q=y,x=w;w=h[k+1];n=w.getNextLayerConnectedCells(f);p=w.getPreviousLayerConnectedCells(f);t=[];y=[];for(z=0;z<n.length;z++)t[z]=n[z].getGeneralPurposeVariable(f+1);for(z=0;z<p.length;z++)y[z]=p[z].getGeneralPurposeVariable(f-1);for(var u=0,F=0,z=0;z<r.length;z++)for(var E=0;E<t.length;E++)r[z]>t[E]&&u++,r[z]<t[E]&&F++;for(z=0;z<q.length;z++)for(E=0;E<y.length;E++)q[z]>y[E]&&u++,q[z]<y[E]&&F++;if(F<u||F==u&&e)n=x.getGeneralPurposeVariable(f),
-x.setGeneralPurposeVariable(f,w.getGeneralPurposeVariable(f)),w.setGeneralPurposeVariable(f,n),n=l,p=m,t=r,y=q,w=x,e||(c=!0)}}};mxMedianHybridCrossingReduction.prototype.weightedMedian=function(a,b){var c=0==a%2;if(c)for(var d=b.maxRank-1;0<=d;d--)this.medianRank(d,c);else for(d=1;d<b.maxRank;d++)this.medianRank(d,c)};
+mxMedianHybridCrossingReduction.prototype.transpose=function(a,b){for(var c=!0,d=0;c&&10>d++;)for(var e=1==a%2&&1==d%2,c=!1,f=0;f<b.ranks.length;f++){for(var g=b.ranks[f],h=[],k=0;k<g.length;k++){var l=g[k],m=l.getGeneralPurposeVariable(f);0>m&&(m=k);h[m]=l}for(var n=null,p=null,r,q,t=null,z=null,w,x=null,k=0;k<g.length-1;k++){if(0==k){w=h[k];l=w.getNextLayerConnectedCells(f);m=w.getPreviousLayerConnectedCells(f);r=[];q=[];for(var y=0;y<l.length;y++)r[y]=l[y].getGeneralPurposeVariable(f+1);for(y=
+0;y<m.length;y++)q[y]=m[y].getGeneralPurposeVariable(f-1)}else l=n,m=p,r=t,q=z,w=x;x=h[k+1];n=x.getNextLayerConnectedCells(f);p=x.getPreviousLayerConnectedCells(f);t=[];z=[];for(y=0;y<n.length;y++)t[y]=n[y].getGeneralPurposeVariable(f+1);for(y=0;y<p.length;y++)z[y]=p[y].getGeneralPurposeVariable(f-1);for(var u=0,D=0,y=0;y<r.length;y++)for(var F=0;F<t.length;F++)r[y]>t[F]&&u++,r[y]<t[F]&&D++;for(y=0;y<q.length;y++)for(F=0;F<z.length;F++)q[y]>z[F]&&u++,q[y]<z[F]&&D++;if(D<u||D==u&&e)n=w.getGeneralPurposeVariable(f),
+w.setGeneralPurposeVariable(f,x.getGeneralPurposeVariable(f)),x.setGeneralPurposeVariable(f,n),n=l,p=m,t=r,z=q,x=w,e||(c=!0)}}};mxMedianHybridCrossingReduction.prototype.weightedMedian=function(a,b){var c=0==a%2;if(c)for(var d=b.maxRank-1;0<=d;d--)this.medianRank(d,c);else for(d=1;d<b.maxRank;d++)this.medianRank(d,c)};
 mxMedianHybridCrossingReduction.prototype.medianRank=function(a,b){for(var c=this.nestedBestRanks[a].length,d=[],e=[],f=0;f<c;f++){var g=this.nestedBestRanks[a][f],h=new MedianCellSorter;h.cell=g;var k;k=b?g.getNextLayerConnectedCells(a):g.getPreviousLayerConnectedCells(a);var l;l=b?a+1:a-1;null!=k&&0!=k.length?(h.medianValue=this.medianValue(k,l),d.push(h)):e[g.getGeneralPurposeVariable(a)]=!0}d.sort(MedianCellSorter.prototype.compare);for(f=0;f<c;f++)null==e[f]&&(g=d.shift().cell,g.setGeneralPurposeVariable(a,
 f))};mxMedianHybridCrossingReduction.prototype.medianValue=function(a,b){for(var c=[],d=0,e=0;e<a.length;e++){var f=a[e];c[d++]=f.getGeneralPurposeVariable(b)}c.sort(function(a,b){return a-b});if(1==d%2)return c[Math.floor(d/2)];if(2==d)return(c[0]+c[1])/2;e=d/2;f=c[e-1]-c[0];d=c[d-1]-c[e];return(c[e-1]*d+c[e]*f)/(f+d)};function MedianCellSorter(){}MedianCellSorter.prototype.medianValue=0;MedianCellSorter.prototype.cell=!1;
 MedianCellSorter.prototype.compare=function(a,b){return null!=a&&null!=b?b.medianValue>a.medianValue?-1:b.medianValue<a.medianValue?1:0:0};function mxMinimumCycleRemover(a){this.layout=a}mxMinimumCycleRemover.prototype=new mxHierarchicalLayoutStage;mxMinimumCycleRemover.prototype.constructor=mxMinimumCycleRemover;mxMinimumCycleRemover.prototype.layout=null;
@@ -745,8 +745,8 @@ mxCoordinateAssignment.prototype.printStatus=function(){var a=this.layout.getMod
 mxCoordinateAssignment.prototype.execute=function(a){this.jettyPositions={};a=this.layout.getModel();this.currentXDelta=0;this.initialCoords(this.layout.getGraph(),a);this.fineTuning&&this.minNode(a);var b=1E8;if(this.fineTuning)for(var c=0;c<this.maxIterations;c++){0!=c&&(this.medianPos(c,a),this.minNode(a));if(this.currentXDelta<b){for(var d=0;d<a.ranks.length;d++)for(var e=a.ranks[d],f=0;f<e.length;f++){var g=e[f];g.setX(d,g.getGeneralPurposeVariable(d))}b=this.currentXDelta}else for(d=0;d<a.ranks.length;d++)for(e=
 a.ranks[d],f=0;f<e.length;f++)g=e[f],g.setGeneralPurposeVariable(d,g.getX(d));this.minPath(this.layout.getGraph(),a);this.currentXDelta=0}this.setCellLocations(this.layout.getGraph(),a)};
 mxCoordinateAssignment.prototype.minNode=function(a){for(var b=[],c=new mxDictionary,d=[],e=0;e<=a.maxRank;e++){d[e]=a.ranks[e];for(var f=0;f<d[e].length;f++){var g=d[e][f],h=new WeightedCellSorter(g,e);h.rankIndex=f;h.visited=!0;b.push(h);c.put(g,h)}}a=10*b.length;for(f=0;0<b.length&&f<=a;){var g=b.shift(),e=g.cell,k=g.weightedValue,l=parseInt(g.rankIndex),h=e.getNextLayerConnectedCells(k),m=e.getPreviousLayerConnectedCells(k),n=h.length,p=m.length,r=this.medianXValue(h,k+1),q=this.medianXValue(m,
-k-1),t=n+p,y=e.getGeneralPurposeVariable(k),x=y;0<t&&(x=(r*n+q*p)/t);n=!1;x<y-1?0==l?(e.setGeneralPurposeVariable(k,x),n=!0):(l=d[k][l-1],y=l.getGeneralPurposeVariable(k),y=y+l.width/2+this.intraCellSpacing+e.width/2,y<x?(e.setGeneralPurposeVariable(k,x),n=!0):y<e.getGeneralPurposeVariable(k)-1&&(e.setGeneralPurposeVariable(k,y),n=!0)):x>y+1&&(l==d[k].length-1?(e.setGeneralPurposeVariable(k,x),n=!0):(l=d[k][l+1],y=l.getGeneralPurposeVariable(k),y=y-l.width/2-this.intraCellSpacing-e.width/2,y>x?(e.setGeneralPurposeVariable(k,
-x),n=!0):y>e.getGeneralPurposeVariable(k)+1&&(e.setGeneralPurposeVariable(k,y),n=!0)));if(n){for(e=0;e<h.length;e++)k=h[e],k=c.get(k),null!=k&&0==k.visited&&(k.visited=!0,b.push(k));for(e=0;e<m.length;e++)k=m[e],k=c.get(k),null!=k&&0==k.visited&&(k.visited=!0,b.push(k))}g.visited=!1;f++}};mxCoordinateAssignment.prototype.medianPos=function(a,b){if(0==a%2)for(var c=b.maxRank;0<c;c--)this.rankMedianPosition(c-1,b,c);else for(c=0;c<b.maxRank-1;c++)this.rankMedianPosition(c+1,b,c)};
+k-1),t=n+p,z=e.getGeneralPurposeVariable(k),w=z;0<t&&(w=(r*n+q*p)/t);n=!1;w<z-1?0==l?(e.setGeneralPurposeVariable(k,w),n=!0):(l=d[k][l-1],z=l.getGeneralPurposeVariable(k),z=z+l.width/2+this.intraCellSpacing+e.width/2,z<w?(e.setGeneralPurposeVariable(k,w),n=!0):z<e.getGeneralPurposeVariable(k)-1&&(e.setGeneralPurposeVariable(k,z),n=!0)):w>z+1&&(l==d[k].length-1?(e.setGeneralPurposeVariable(k,w),n=!0):(l=d[k][l+1],z=l.getGeneralPurposeVariable(k),z=z-l.width/2-this.intraCellSpacing-e.width/2,z>w?(e.setGeneralPurposeVariable(k,
+w),n=!0):z>e.getGeneralPurposeVariable(k)+1&&(e.setGeneralPurposeVariable(k,z),n=!0)));if(n){for(e=0;e<h.length;e++)k=h[e],k=c.get(k),null!=k&&0==k.visited&&(k.visited=!0,b.push(k));for(e=0;e<m.length;e++)k=m[e],k=c.get(k),null!=k&&0==k.visited&&(k.visited=!0,b.push(k))}g.visited=!1;f++}};mxCoordinateAssignment.prototype.medianPos=function(a,b){if(0==a%2)for(var c=b.maxRank;0<c;c--)this.rankMedianPosition(c-1,b,c);else for(c=0;c<b.maxRank-1;c++)this.rankMedianPosition(c+1,b,c)};
 mxCoordinateAssignment.prototype.rankMedianPosition=function(a,b,c){b=b.ranks[a];for(var d=[],e={},f=0;f<b.length;f++){var g=b[f];d[f]=new WeightedCellSorter;d[f].cell=g;d[f].rankIndex=f;e[g.id]=d[f];var h;h=c<a?g.getPreviousLayerConnectedCells(a):g.getNextLayerConnectedCells(a);d[f].weightedValue=this.calculatedWeightedValue(g,h)}d.sort(WeightedCellSorter.prototype.compare);for(f=0;f<d.length;f++){var k,g=d[f].cell;k=0;h=c<a?g.getPreviousLayerConnectedCells(a).slice():g.getNextLayerConnectedCells(a).slice();
 null!=h&&(k=h.length,k=0<k?this.medianXValue(h,c):g.getGeneralPurposeVariable(a));var l=0;h=-1E8;for(var m=d[f].rankIndex-1;0<=m;){var n=e[b[m].id];if(null!=n){var p=n.cell;n.visited?(h=p.getGeneralPurposeVariable(a)+p.width/2+this.intraCellSpacing+l+g.width/2,m=-1):(l+=p.width+this.intraCellSpacing,m--)}}l=0;p=1E8;for(m=d[f].rankIndex+1;m<d.length;)if(n=e[b[m].id],null!=n){var r=n.cell;n.visited?(p=r.getGeneralPurposeVariable(a)-r.width/2-this.intraCellSpacing-l-g.width/2,m=d.length):(l+=r.width+
 this.intraCellSpacing,m++)}k>=h&&k<=p?g.setGeneralPurposeVariable(a,k):k<h?(g.setGeneralPurposeVariable(a,h),this.currentXDelta+=h-k):k>p&&(g.setGeneralPurposeVariable(a,p),this.currentXDelta+=k-p);d[f].visited=!0}};mxCoordinateAssignment.prototype.calculatedWeightedValue=function(a,b){for(var c=0,d=0;d<b.length;d++){var e=b[d];a.isVertex()&&e.isVertex()?c++:c=a.isEdge()&&e.isEdge()?c+8:c+2}return c};
@@ -766,10 +766,10 @@ mxCoordinateAssignment.prototype.localEdgeProcessing=function(a){for(var b=0;b<a
 q;if(r.isVertex()){q=0==h?e.connectsAsSource:e.connectsAsTarget;for(var t=0;t<q.length;t++)if(q[t].source==r||q[t].target==r)f+=q[t].edges.length,p++,g.push(q[t])}else f+=r.edges.length,p++,g.push(r)}e.width>(f+1)*this.prefHozEdgeSep+2*this.prefHozEdgeSep&&(m+=this.prefHozEdgeSep,n-=this.prefHozEdgeSep);k=(n-m)/f;m+=k/2;n=this.minEdgeJetty-this.prefVertEdgeOff;for(l=0;l<g.length;l++)for(p=g[l].edges.length,r=this.jettyPositions[g[l].ids[0]],null==r&&(r=[],this.jettyPositions[g[l].ids[0]]=r),l<f/2?
 n+=this.prefVertEdgeOff:l>f/2&&(n-=this.prefVertEdgeOff),q=0;q<p;q++)r[4*q+2*h]=m,m+=k,r[4*q+2*h+1]=n}f=e.getNextLayerConnectedCells(b);g=b+1}}};
 mxCoordinateAssignment.prototype.setEdgePosition=function(a){var b=0;if(101207!=a.temp[0]){var c=a.maxRank,d=a.minRank;c==d&&(c=a.source.maxRank,d=a.target.minRank);for(var e=0,f=this.jettyPositions[a.ids[0]],g=a.isReversed?a.target.cell:a.source.cell,h=this.layout.graph,k=this.orientation==mxConstants.DIRECTION_EAST||this.orientation==mxConstants.DIRECTION_SOUTH,l=0;l<a.edges.length;l++){var m=a.edges[l],n=this.layout.getVisibleTerminal(m,!0),p=[],r=a.isReversed;n!=g&&(r=!r);if(null!=f){var q=r?
-2:0,t=r?k?this.rankBottomY[d]:this.rankTopY[d]:k?this.rankTopY[c]:this.rankBottomY[c],y=f[4*e+1+q];r!=k&&(y=-y);var t=t+y,q=f[4*e+q],x=h.model.getTerminal(m,!0);this.layout.isPort(x)&&h.model.getParent(x)==n&&(q=h.view.getState(x),q=null!=q?q.x:n.geometry.x+a.source.width*x.geometry.x);this.orientation==mxConstants.DIRECTION_NORTH||this.orientation==mxConstants.DIRECTION_SOUTH?(p.push(new mxPoint(q,t)),this.layout.edgeStyle==mxHierarchicalEdgeStyle.CURVE&&p.push(new mxPoint(q,t+y))):(p.push(new mxPoint(t,
-q)),this.layout.edgeStyle==mxHierarchicalEdgeStyle.CURVE&&p.push(new mxPoint(t+y,q)))}q=a.x.length-1;t=y=-1;n=a.maxRank-1;r&&(q=0,y=a.x.length,t=1,n=a.minRank+1);for(;a.maxRank!=a.minRank&&q!=y;q+=t){var x=a.x[q]+b,w=(this.rankTopY[n]+this.rankBottomY[n+1])/2,z=(this.rankTopY[n-1]+this.rankBottomY[n])/2;if(r)var u=w,w=z,z=u;this.orientation==mxConstants.DIRECTION_NORTH||this.orientation==mxConstants.DIRECTION_SOUTH?(p.push(new mxPoint(x,w)),p.push(new mxPoint(x,z))):(p.push(new mxPoint(w,x)),p.push(new mxPoint(z,
-x)));this.limitX=Math.max(this.limitX,x);n+=t}null!=f&&(q=r?2:0,t=r?k?this.rankTopY[c]:this.rankBottomY[c]:k?this.rankBottomY[d]:this.rankTopY[d],y=f[4*e+3-q],r!=k&&(y=-y),t-=y,q=f[4*e+2-q],r=h.model.getTerminal(m,!1),n=this.layout.getVisibleTerminal(m,!1),this.layout.isPort(r)&&h.model.getParent(r)==n&&(q=h.view.getState(r),q=null!=q?q.x:n.geometry.x+a.target.width*r.geometry.x),this.orientation==mxConstants.DIRECTION_NORTH||this.orientation==mxConstants.DIRECTION_SOUTH?(this.layout.edgeStyle==mxHierarchicalEdgeStyle.CURVE&&
-p.push(new mxPoint(q,t-y)),p.push(new mxPoint(q,t))):(this.layout.edgeStyle==mxHierarchicalEdgeStyle.CURVE&&p.push(new mxPoint(t-y,q)),p.push(new mxPoint(t,q))));a.isReversed&&this.processReversedEdge(a,m);this.layout.setEdgePoints(m,p);b=0==b?this.parallelEdgeSpacing:0<b?-b:-b+this.parallelEdgeSpacing;e++}a.temp[0]=101207}};
+2:0,t=r?k?this.rankBottomY[d]:this.rankTopY[d]:k?this.rankTopY[c]:this.rankBottomY[c],z=f[4*e+1+q];r!=k&&(z=-z);var t=t+z,q=f[4*e+q],w=h.model.getTerminal(m,!0);this.layout.isPort(w)&&h.model.getParent(w)==n&&(q=h.view.getState(w),q=null!=q?q.x:n.geometry.x+a.source.width*w.geometry.x);this.orientation==mxConstants.DIRECTION_NORTH||this.orientation==mxConstants.DIRECTION_SOUTH?(p.push(new mxPoint(q,t)),this.layout.edgeStyle==mxHierarchicalEdgeStyle.CURVE&&p.push(new mxPoint(q,t+z))):(p.push(new mxPoint(t,
+q)),this.layout.edgeStyle==mxHierarchicalEdgeStyle.CURVE&&p.push(new mxPoint(t+z,q)))}q=a.x.length-1;t=z=-1;n=a.maxRank-1;r&&(q=0,z=a.x.length,t=1,n=a.minRank+1);for(;a.maxRank!=a.minRank&&q!=z;q+=t){var w=a.x[q]+b,x=(this.rankTopY[n]+this.rankBottomY[n+1])/2,y=(this.rankTopY[n-1]+this.rankBottomY[n])/2;if(r)var u=x,x=y,y=u;this.orientation==mxConstants.DIRECTION_NORTH||this.orientation==mxConstants.DIRECTION_SOUTH?(p.push(new mxPoint(w,x)),p.push(new mxPoint(w,y))):(p.push(new mxPoint(x,w)),p.push(new mxPoint(y,
+w)));this.limitX=Math.max(this.limitX,w);n+=t}null!=f&&(q=r?2:0,t=r?k?this.rankTopY[c]:this.rankBottomY[c]:k?this.rankBottomY[d]:this.rankTopY[d],z=f[4*e+3-q],r!=k&&(z=-z),t-=z,q=f[4*e+2-q],r=h.model.getTerminal(m,!1),n=this.layout.getVisibleTerminal(m,!1),this.layout.isPort(r)&&h.model.getParent(r)==n&&(q=h.view.getState(r),q=null!=q?q.x:n.geometry.x+a.target.width*r.geometry.x),this.orientation==mxConstants.DIRECTION_NORTH||this.orientation==mxConstants.DIRECTION_SOUTH?(this.layout.edgeStyle==mxHierarchicalEdgeStyle.CURVE&&
+p.push(new mxPoint(q,t-z)),p.push(new mxPoint(q,t))):(this.layout.edgeStyle==mxHierarchicalEdgeStyle.CURVE&&p.push(new mxPoint(t-z,q)),p.push(new mxPoint(t,q))));a.isReversed&&this.processReversedEdge(a,m);this.layout.setEdgePoints(m,p);b=0==b?this.parallelEdgeSpacing:0<b?-b:-b+this.parallelEdgeSpacing;e++}a.temp[0]=101207}};
 mxCoordinateAssignment.prototype.setVertexLocation=function(a){var b=a.cell,c=a.x[0]-a.width/2,d=a.y[0]-a.height/2;this.rankTopY[a.minRank]=Math.min(this.rankTopY[a.minRank],d);this.rankBottomY[a.minRank]=Math.max(this.rankBottomY[a.minRank],d+a.height);this.orientation==mxConstants.DIRECTION_NORTH||this.orientation==mxConstants.DIRECTION_SOUTH?this.layout.setVertexLocation(b,c,d):this.layout.setVertexLocation(b,d,c);this.limitX=Math.max(this.limitX,c+a.width)};
 mxCoordinateAssignment.prototype.processReversedEdge=function(a,b){};function WeightedCellSorter(a,b){this.cell=a;this.weightedValue=b}WeightedCellSorter.prototype.weightedValue=0;WeightedCellSorter.prototype.nudge=!1;WeightedCellSorter.prototype.visited=!1;WeightedCellSorter.prototype.rankIndex=null;WeightedCellSorter.prototype.cell=null;WeightedCellSorter.prototype.compare=function(a,b){return null!=a&&null!=b?b.weightedValue>a.weightedValue?-1:b.weightedValue<a.weightedValue?1:b.nudge?-1:1:0};
 function mxSwimlaneOrdering(a){this.layout=a}mxSwimlaneOrdering.prototype=new mxHierarchicalLayoutStage;mxSwimlaneOrdering.prototype.constructor=mxSwimlaneOrdering;mxSwimlaneOrdering.prototype.layout=null;
@@ -998,24 +998,24 @@ b.x=h.x,b.y=h.y);null!=g&&(c=new mxCellState,c.x=g.x,c.y=g.y);null!=b&&null!=c&&
 d.y)||mxUtils.contains(b,a,d.y)||e.push(new mxPoint(a,d.y)):(f=Math.max(b.y,c.y),e.push(new mxPoint(a,f+(Math.min(b.y+b.height,c.y+c.height)-f)/2)))))},TopToBottom:function(a,b,c,d,e){var f=a.view;d=null!=d&&0<d.length?d[0]:null;var g=a.absolutePoints,h=g[0],g=g[g.length-1];null!=d&&(d=f.transformControlPoint(a,d));null!=h&&(b=new mxCellState,b.x=h.x,b.y=h.y);null!=g&&(c=new mxCellState,c.x=g.x,c.y=g.y);null!=b&&null!=c&&(h=Math.max(b.y,c.y),g=Math.min(b.y+b.height,c.y+c.height),a=f.getRoutingCenterX(b),
 null!=d&&d.x>=b.x&&d.x<=b.x+b.width&&(a=d.x),h=null!=d?d.y:Math.round(g+(h-g)/2),mxUtils.contains(c,a,h)||mxUtils.contains(b,a,h)||e.push(new mxPoint(a,h)),a=null!=d&&d.x>=c.x&&d.x<=c.x+c.width?d.x:f.getRoutingCenterX(c),mxUtils.contains(c,a,h)||mxUtils.contains(b,a,h)||e.push(new mxPoint(a,h)),1==e.length&&(null!=d&&1==e.length?mxUtils.contains(c,d.x,h)||mxUtils.contains(b,d.x,h)||e.push(new mxPoint(d.x,h)):(f=Math.max(b.x,c.x),e.push(new mxPoint(f+(Math.min(b.x+b.width,c.x+c.width)-f)/2,h)))))},
 SegmentConnector:function(a,b,c,d,e){function f(a){if(null==k||Math.abs(k.x-a.x)>=h||Math.abs(k.y-a.y)>=h)e.push(a),k=a;return k}var g=a.absolutePoints,h=Math.max(1,a.view.scale),k=0<e.length?e[0]:null,l=!0,m=null,n=g[0];null==n&&null!=b?n=new mxPoint(a.view.getRoutingCenterX(b),a.view.getRoutingCenterY(b)):null!=n&&(n=n.clone());n.x=Math.round(n.x);n.y=Math.round(n.y);var p=g.length-1;if(null!=d&&0<d.length){for(var m=[],r=0;r<d.length;r++){var q=a.view.transformControlPoint(a,d[r]);null!=q&&(q.x=
-Math.round(q.x),q.y=Math.round(q.y),m.push(q))}if(0==m.length)return;d=m;null!=n&&null!=d[0]&&(Math.abs(d[0].x-n.x)<h&&(d[0].x=n.x),Math.abs(d[0].y-n.y)<h&&(d[0].y=n.y));q=g[p];null!=q&&null!=d[d.length-1]&&(Math.abs(d[d.length-1].x-q.x)<h&&(d[d.length-1].x=q.x),Math.abs(d[d.length-1].y-q.y)<h&&(d[d.length-1].y=q.y));var m=d[0],t=b,y=g[0],x=!1,w=!1,x=m;null!=y&&(y.x=Math.round(y.x),y.y=Math.round(y.y),t=null);for(r=0;2>r;r++){var z=null!=y&&y.x==x.x,u=null!=y&&y.y==x.y,F=null!=t&&x.y>=t.y&&x.y<=t.y+
-t.height,t=null!=t&&x.x>=t.x&&x.x<=t.x+t.width,x=u||null==y&&F,w=z||null==y&&t;if(0!=r||!(x&&w||z&&u)){if(null!=y&&!u&&!z&&(F||t)){l=F?!1:!0;break}if(w||x){l=x;1==r&&(l=0==d.length%2?x:w);break}}t=c;y=g[p];null!=y&&(y.x=Math.round(y.x),y.y=Math.round(y.y),t=null);x=d[d.length-1];z&&u&&(d=d.slice(1))}l&&(null!=g[0]&&g[0].y!=m.y||null==g[0]&&null!=b&&(m.y<b.y||m.y>b.y+b.height))?f(new mxPoint(n.x,m.y)):!l&&(null!=g[0]&&g[0].x!=m.x||null==g[0]&&null!=b&&(m.x<b.x||m.x>b.x+b.width))&&f(new mxPoint(m.x,
+Math.round(q.x),q.y=Math.round(q.y),m.push(q))}if(0==m.length)return;d=m;null!=n&&null!=d[0]&&(Math.abs(d[0].x-n.x)<h&&(d[0].x=n.x),Math.abs(d[0].y-n.y)<h&&(d[0].y=n.y));q=g[p];null!=q&&null!=d[d.length-1]&&(Math.abs(d[d.length-1].x-q.x)<h&&(d[d.length-1].x=q.x),Math.abs(d[d.length-1].y-q.y)<h&&(d[d.length-1].y=q.y));var m=d[0],t=b,z=g[0],w=!1,x=!1,w=m;null!=z&&(z.x=Math.round(z.x),z.y=Math.round(z.y),t=null);for(r=0;2>r;r++){var y=null!=z&&z.x==w.x,u=null!=z&&z.y==w.y,D=null!=t&&w.y>=t.y&&w.y<=t.y+
+t.height,t=null!=t&&w.x>=t.x&&w.x<=t.x+t.width,w=u||null==z&&D,x=y||null==z&&t;if(0!=r||!(w&&x||y&&u)){if(null!=z&&!u&&!y&&(D||t)){l=D?!1:!0;break}if(x||w){l=w;1==r&&(l=0==d.length%2?w:x);break}}t=c;z=g[p];null!=z&&(z.x=Math.round(z.x),z.y=Math.round(z.y),t=null);w=d[d.length-1];y&&u&&(d=d.slice(1))}l&&(null!=g[0]&&g[0].y!=m.y||null==g[0]&&null!=b&&(m.y<b.y||m.y>b.y+b.height))?f(new mxPoint(n.x,m.y)):!l&&(null!=g[0]&&g[0].x!=m.x||null==g[0]&&null!=b&&(m.x<b.x||m.x>b.x+b.width))&&f(new mxPoint(m.x,
 n.y));l?n.y=m.y:n.x=m.x;for(r=0;r<d.length;r++)l=!l,m=d[r],l?n.y=m.y:n.x=m.x,f(n.clone())}else m=n,l=!0;n=g[p];null==n&&null!=c&&(n=new mxPoint(a.view.getRoutingCenterX(c),a.view.getRoutingCenterY(c)));null!=n&&(n.x=Math.round(n.x),n.y=Math.round(n.y),null!=m&&(l&&(null!=g[p]&&g[p].y!=m.y||null==g[p]&&null!=c&&(m.y<c.y||m.y>c.y+c.height))?f(new mxPoint(n.x,m.y)):!l&&(null!=g[p]&&g[p].x!=m.x||null==g[p]&&null!=c&&(m.x<c.x||m.x>c.x+c.width))&&f(new mxPoint(m.x,n.y))));if(null==g[0]&&null!=b)for(;1<
 e.length&&null!=e[1]&&mxUtils.contains(b,e[1].x,e[1].y);)e.splice(1,1);if(null==g[p]&&null!=c)for(;1<e.length&&null!=e[e.length-1]&&mxUtils.contains(c,e[e.length-1].x,e[e.length-1].y);)e.splice(e.length-1,1);null!=q&&null!=e[e.length-1]&&Math.abs(q.x-e[e.length-1].x)<h&&Math.abs(q.y-e[e.length-1].y)<h&&(e.splice(e.length-1,1),null!=e[e.length-1]&&(Math.abs(e[e.length-1].x-q.x)<h&&(e[e.length-1].x=q.x),Math.abs(e[e.length-1].y-q.y)<h&&(e[e.length-1].y=q.y)))},orthBuffer:10,orthPointsFallback:!0,dirVectors:[[-1,
 0],[0,-1],[1,0],[0,1],[-1,0],[0,-1],[1,0]],wayPoints1:[[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0]],routePatterns:[[[513,2308,2081,2562],[513,1090,514,2184,2114,2561],[513,1090,514,2564,2184,2562],[513,2308,2561,1090,514,2568,2308]],[[514,1057,513,2308,2081,2562],[514,2184,2114,2561],[514,2184,2562,1057,513,2564,2184],[514,1057,513,2568,2308,2561]],[[1090,514,1057,513,2308,2081,2562],[2114,2561],[1090,2562,1057,513,2564,2184],[1090,514,1057,513,2308,2561,2568]],[[2081,
 2562],[1057,513,1090,514,2184,2114,2561],[1057,513,1090,514,2184,2562,2564],[1057,2561,1090,514,2568,2308]]],inlineRoutePatterns:[[null,[2114,2568],null,null],[null,[514,2081,2114,2568],null,null],[null,[2114,2561],null,null],[[2081,2562],[1057,2114,2568],[2184,2562],null]],vertexSeperations:[],limits:[[0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0]],LEFT_MASK:32,TOP_MASK:64,RIGHT_MASK:128,BOTTOM_MASK:256,LEFT:1,TOP:2,RIGHT:4,BOTTOM:8,SIDE_MASK:480,CENTER_MASK:512,SOURCE_MASK:1024,TARGET_MASK:2048,VERTEX_MASK:3072,
 getJettySize:function(a,b,c,d,e){b=mxUtils.getValue(a.style,e?mxConstants.STYLE_SOURCE_JETTY_SIZE:mxConstants.STYLE_TARGET_JETTY_SIZE,mxUtils.getValue(a.style,mxConstants.STYLE_JETTY_SIZE,mxEdgeStyle.orthBuffer));"auto"==b&&(mxUtils.getValue(a.style,e?mxConstants.STYLE_STARTARROW:mxConstants.STYLE_ENDARROW,mxConstants.NONE)!=mxConstants.NONE?(a=mxUtils.getNumber(a.style,e?mxConstants.STYLE_STARTSIZE:mxConstants.STYLE_ENDSIZE,mxConstants.DEFAULT_MARKERSIZE),b=Math.max(2,Math.ceil((a+mxEdgeStyle.orthBuffer)/
-mxEdgeStyle.orthBuffer))*mxEdgeStyle.orthBuffer):b=2*mxEdgeStyle.orthBuffer);return b},OrthConnector:function(a,b,c,d,e){var f=a.view.graph,g=null==b?!1:f.getModel().isEdge(b.cell),h=null==c?!1:f.getModel().isEdge(c.cell),f=a.absolutePoints,k=f[0],l=f[f.length-1],m=null!=b?b.x:k.x,n=null!=b?b.y:k.y,p=null!=b?b.width:0,r=null!=b?b.height:0,q=null!=c?c.x:l.x,t=null!=c?c.y:l.y,y=null!=c?c.width:0,x=null!=c?c.height:0,f=a.view.scale*mxEdgeStyle.getJettySize(a,b,c,d,!0),w=a.view.scale*mxEdgeStyle.getJettySize(a,
-b,c,d,!1);null!=b&&c==b&&(f=w=Math.max(f,w));var z=w+f,u=!1;if(null!=k&&null!=l)var u=l.x-k.x,F=l.y-k.y,u=u*u+F*F<z*z;if(u||mxEdgeStyle.orthPointsFallback&&null!=d&&0<d.length||g||h)mxEdgeStyle.SegmentConnector(a,b,c,d,e);else{d=[mxConstants.DIRECTION_MASK_ALL,mxConstants.DIRECTION_MASK_ALL];null!=b&&(d[0]=mxUtils.getPortConstraints(b,a,!0,mxConstants.DIRECTION_MASK_ALL),u=mxUtils.getValue(b.style,mxConstants.STYLE_ROTATION,0),0!=u&&(u=mxUtils.getBoundingBox(new mxRectangle(m,n,p,r),u),m=u.x,n=u.y,
-p=u.width,r=u.height));null!=c&&(d[1]=mxUtils.getPortConstraints(c,a,!1,mxConstants.DIRECTION_MASK_ALL),u=mxUtils.getValue(c.style,mxConstants.STYLE_ROTATION,0),0!=u&&(u=mxUtils.getBoundingBox(new mxRectangle(q,t,y,x),u),q=u.x,t=u.y,y=u.width,x=u.height));m=Math.round(10*m)/10;n=Math.round(10*n)/10;p=Math.round(10*p)/10;r=Math.round(10*r)/10;q=Math.round(10*q)/10;t=Math.round(10*t)/10;y=Math.round(10*y)/10;x=Math.round(10*x)/10;a=[0,0];m=[[m,n,p,r],[q,t,y,x]];w=[f,w];for(u=0;2>u;u++)mxEdgeStyle.limits[u][1]=
-m[u][0]-w[u],mxEdgeStyle.limits[u][2]=m[u][1]-w[u],mxEdgeStyle.limits[u][4]=m[u][0]+m[u][2]+w[u],mxEdgeStyle.limits[u][8]=m[u][1]+m[u][3]+w[u];w=m[0][1]+m[0][3]/2;n=m[1][1]+m[1][3]/2;u=m[0][0]+m[0][2]/2-(m[1][0]+m[1][2]/2);F=w-n;w=0;0>u?w=0>F?2:1:0>=F&&(w=3,0==u&&(w=2));n=null;null!=b&&(n=k);b=[[.5,.5],[.5,.5]];for(u=0;2>u;u++)null!=n&&(b[u][0]=(n.x-m[u][0])/m[u][2],1>=Math.abs(n.x-m[u][0])?a[u]=mxConstants.DIRECTION_MASK_WEST:1>=Math.abs(n.x-m[u][0]-m[u][2])&&(a[u]=mxConstants.DIRECTION_MASK_EAST),
-b[u][1]=(n.y-m[u][1])/m[u][3],1>=Math.abs(n.y-m[u][1])?a[u]=mxConstants.DIRECTION_MASK_NORTH:1>=Math.abs(n.y-m[u][1]-m[u][3])&&(a[u]=mxConstants.DIRECTION_MASK_SOUTH)),n=null,null!=c&&(n=l);u=m[0][1]-(m[1][1]+m[1][3]);l=m[0][0]-(m[1][0]+m[1][2]);n=m[1][1]-(m[0][1]+m[0][3]);p=m[1][0]-(m[0][0]+m[0][2]);mxEdgeStyle.vertexSeperations[1]=Math.max(l-z,0);mxEdgeStyle.vertexSeperations[2]=Math.max(u-z,0);mxEdgeStyle.vertexSeperations[4]=Math.max(n-z,0);mxEdgeStyle.vertexSeperations[3]=Math.max(p-z,0);z=[];
+mxEdgeStyle.orthBuffer))*mxEdgeStyle.orthBuffer):b=2*mxEdgeStyle.orthBuffer);return b},OrthConnector:function(a,b,c,d,e){var f=a.view.graph,g=null==b?!1:f.getModel().isEdge(b.cell),h=null==c?!1:f.getModel().isEdge(c.cell),f=a.absolutePoints,k=f[0],l=f[f.length-1],m=null!=b?b.x:k.x,n=null!=b?b.y:k.y,p=null!=b?b.width:0,r=null!=b?b.height:0,q=null!=c?c.x:l.x,t=null!=c?c.y:l.y,z=null!=c?c.width:0,w=null!=c?c.height:0,f=a.view.scale*mxEdgeStyle.getJettySize(a,b,c,d,!0),x=a.view.scale*mxEdgeStyle.getJettySize(a,
+b,c,d,!1);null!=b&&c==b&&(f=x=Math.max(f,x));var y=x+f,u=!1;if(null!=k&&null!=l)var u=l.x-k.x,D=l.y-k.y,u=u*u+D*D<y*y;if(u||mxEdgeStyle.orthPointsFallback&&null!=d&&0<d.length||g||h)mxEdgeStyle.SegmentConnector(a,b,c,d,e);else{d=[mxConstants.DIRECTION_MASK_ALL,mxConstants.DIRECTION_MASK_ALL];null!=b&&(d[0]=mxUtils.getPortConstraints(b,a,!0,mxConstants.DIRECTION_MASK_ALL),u=mxUtils.getValue(b.style,mxConstants.STYLE_ROTATION,0),0!=u&&(u=mxUtils.getBoundingBox(new mxRectangle(m,n,p,r),u),m=u.x,n=u.y,
+p=u.width,r=u.height));null!=c&&(d[1]=mxUtils.getPortConstraints(c,a,!1,mxConstants.DIRECTION_MASK_ALL),u=mxUtils.getValue(c.style,mxConstants.STYLE_ROTATION,0),0!=u&&(u=mxUtils.getBoundingBox(new mxRectangle(q,t,z,w),u),q=u.x,t=u.y,z=u.width,w=u.height));m=Math.round(10*m)/10;n=Math.round(10*n)/10;p=Math.round(10*p)/10;r=Math.round(10*r)/10;q=Math.round(10*q)/10;t=Math.round(10*t)/10;z=Math.round(10*z)/10;w=Math.round(10*w)/10;a=[0,0];m=[[m,n,p,r],[q,t,z,w]];x=[f,x];for(u=0;2>u;u++)mxEdgeStyle.limits[u][1]=
+m[u][0]-x[u],mxEdgeStyle.limits[u][2]=m[u][1]-x[u],mxEdgeStyle.limits[u][4]=m[u][0]+m[u][2]+x[u],mxEdgeStyle.limits[u][8]=m[u][1]+m[u][3]+x[u];x=m[0][1]+m[0][3]/2;n=m[1][1]+m[1][3]/2;u=m[0][0]+m[0][2]/2-(m[1][0]+m[1][2]/2);D=x-n;x=0;0>u?x=0>D?2:1:0>=D&&(x=3,0==u&&(x=2));n=null;null!=b&&(n=k);b=[[.5,.5],[.5,.5]];for(u=0;2>u;u++)null!=n&&(b[u][0]=(n.x-m[u][0])/m[u][2],1>=Math.abs(n.x-m[u][0])?a[u]=mxConstants.DIRECTION_MASK_WEST:1>=Math.abs(n.x-m[u][0]-m[u][2])&&(a[u]=mxConstants.DIRECTION_MASK_EAST),
+b[u][1]=(n.y-m[u][1])/m[u][3],1>=Math.abs(n.y-m[u][1])?a[u]=mxConstants.DIRECTION_MASK_NORTH:1>=Math.abs(n.y-m[u][1]-m[u][3])&&(a[u]=mxConstants.DIRECTION_MASK_SOUTH)),n=null,null!=c&&(n=l);u=m[0][1]-(m[1][1]+m[1][3]);l=m[0][0]-(m[1][0]+m[1][2]);n=m[1][1]-(m[0][1]+m[0][3]);p=m[1][0]-(m[0][0]+m[0][2]);mxEdgeStyle.vertexSeperations[1]=Math.max(l-y,0);mxEdgeStyle.vertexSeperations[2]=Math.max(u-y,0);mxEdgeStyle.vertexSeperations[4]=Math.max(n-y,0);mxEdgeStyle.vertexSeperations[3]=Math.max(p-y,0);y=[];
 c=[];k=[];c[0]=l>=p?mxConstants.DIRECTION_MASK_WEST:mxConstants.DIRECTION_MASK_EAST;k[0]=u>=n?mxConstants.DIRECTION_MASK_NORTH:mxConstants.DIRECTION_MASK_SOUTH;c[1]=mxUtils.reversePortConstraints(c[0]);k[1]=mxUtils.reversePortConstraints(k[0]);l=l>=p?l:p;n=u>=n?u:n;p=[[0,0],[0,0]];r=!1;for(u=0;2>u;u++)0==a[u]&&(0==(c[u]&d[u])&&(c[u]=mxUtils.reversePortConstraints(c[u])),0==(k[u]&d[u])&&(k[u]=mxUtils.reversePortConstraints(k[u])),p[u][0]=k[u],p[u][1]=c[u]);0<n&&0<l&&(0<(c[0]&d[0])&&0<(k[1]&d[1])?(p[0][0]=
-c[0],p[0][1]=k[0],p[1][0]=k[1],p[1][1]=c[1],r=!0):0<(k[0]&d[0])&&0<(c[1]&d[1])&&(p[0][0]=k[0],p[0][1]=c[0],p[1][0]=c[1],p[1][1]=k[1],r=!0));0<n&&!r&&(p[0][0]=k[0],p[0][1]=c[0],p[1][0]=k[1],p[1][1]=c[1],r=!0);0<l&&!r&&(p[0][0]=c[0],p[0][1]=k[0],p[1][0]=c[1],p[1][1]=k[1]);for(u=0;2>u;u++)0==a[u]&&(0==(p[u][0]&d[u])&&(p[u][0]=p[u][1]),z[u]=p[u][0]&d[u],z[u]|=(p[u][1]&d[u])<<8,z[u]|=(p[1-u][u]&d[u])<<16,z[u]|=(p[1-u][1-u]&d[u])<<24,0==(z[u]&15)&&(z[u]<<=8),0==(z[u]&3840)&&(z[u]=z[u]&15|z[u]>>8),0==(z[u]&
-983040)&&(z[u]=z[u]&65535|(z[u]&251658240)>>8),a[u]=z[u]&15,d[u]==mxConstants.DIRECTION_MASK_WEST||d[u]==mxConstants.DIRECTION_MASK_NORTH||d[u]==mxConstants.DIRECTION_MASK_EAST||d[u]==mxConstants.DIRECTION_MASK_SOUTH)&&(a[u]=d[u]);d=a[0]==mxConstants.DIRECTION_MASK_EAST?3:a[0];z=a[1]==mxConstants.DIRECTION_MASK_EAST?3:a[1];d-=w;z-=w;1>d&&(d+=4);1>z&&(z+=4);d=mxEdgeStyle.routePatterns[d-1][z-1];mxEdgeStyle.wayPoints1[0][0]=m[0][0];mxEdgeStyle.wayPoints1[0][1]=m[0][1];switch(a[0]){case mxConstants.DIRECTION_MASK_WEST:mxEdgeStyle.wayPoints1[0][0]-=
-f;mxEdgeStyle.wayPoints1[0][1]+=b[0][1]*m[0][3];break;case mxConstants.DIRECTION_MASK_SOUTH:mxEdgeStyle.wayPoints1[0][0]+=b[0][0]*m[0][2];mxEdgeStyle.wayPoints1[0][1]+=m[0][3]+f;break;case mxConstants.DIRECTION_MASK_EAST:mxEdgeStyle.wayPoints1[0][0]+=m[0][2]+f;mxEdgeStyle.wayPoints1[0][1]+=b[0][1]*m[0][3];break;case mxConstants.DIRECTION_MASK_NORTH:mxEdgeStyle.wayPoints1[0][0]+=b[0][0]*m[0][2],mxEdgeStyle.wayPoints1[0][1]-=f}f=0;c=z=0<(a[0]&(mxConstants.DIRECTION_MASK_EAST|mxConstants.DIRECTION_MASK_WEST))?
-0:1;for(u=0;u<d.length;u++)k=d[u]&15,r=k==mxConstants.DIRECTION_MASK_EAST?3:k,r+=w,4<r&&(r-=4),l=mxEdgeStyle.dirVectors[r-1],k=0<r%2?0:1,k!=z&&(f++,mxEdgeStyle.wayPoints1[f][0]=mxEdgeStyle.wayPoints1[f-1][0],mxEdgeStyle.wayPoints1[f][1]=mxEdgeStyle.wayPoints1[f-1][1]),q=0<(d[u]&mxEdgeStyle.TARGET_MASK),t=0<(d[u]&mxEdgeStyle.SOURCE_MASK),n=(d[u]&mxEdgeStyle.SIDE_MASK)>>5,n<<=w,15<n&&(n>>=4),p=0<(d[u]&mxEdgeStyle.CENTER_MASK),(t||q)&&9>n?(r=t?0:1,n=p&&0==k?m[r][0]+b[r][0]*m[r][2]:p?m[r][1]+b[r][1]*
-m[r][3]:mxEdgeStyle.limits[r][n],0==k?(n=(n-mxEdgeStyle.wayPoints1[f][0])*l[0],0<n&&(mxEdgeStyle.wayPoints1[f][0]+=l[0]*n)):(n=(n-mxEdgeStyle.wayPoints1[f][1])*l[1],0<n&&(mxEdgeStyle.wayPoints1[f][1]+=l[1]*n))):p&&(mxEdgeStyle.wayPoints1[f][0]+=l[0]*Math.abs(mxEdgeStyle.vertexSeperations[r]/2),mxEdgeStyle.wayPoints1[f][1]+=l[1]*Math.abs(mxEdgeStyle.vertexSeperations[r]/2)),0<f&&mxEdgeStyle.wayPoints1[f][k]==mxEdgeStyle.wayPoints1[f-1][k]?f--:z=k;for(u=0;u<=f&&(u!=f||((0<(a[1]&(mxConstants.DIRECTION_MASK_EAST|
+c[0],p[0][1]=k[0],p[1][0]=k[1],p[1][1]=c[1],r=!0):0<(k[0]&d[0])&&0<(c[1]&d[1])&&(p[0][0]=k[0],p[0][1]=c[0],p[1][0]=c[1],p[1][1]=k[1],r=!0));0<n&&!r&&(p[0][0]=k[0],p[0][1]=c[0],p[1][0]=k[1],p[1][1]=c[1],r=!0);0<l&&!r&&(p[0][0]=c[0],p[0][1]=k[0],p[1][0]=c[1],p[1][1]=k[1]);for(u=0;2>u;u++)0==a[u]&&(0==(p[u][0]&d[u])&&(p[u][0]=p[u][1]),y[u]=p[u][0]&d[u],y[u]|=(p[u][1]&d[u])<<8,y[u]|=(p[1-u][u]&d[u])<<16,y[u]|=(p[1-u][1-u]&d[u])<<24,0==(y[u]&15)&&(y[u]<<=8),0==(y[u]&3840)&&(y[u]=y[u]&15|y[u]>>8),0==(y[u]&
+983040)&&(y[u]=y[u]&65535|(y[u]&251658240)>>8),a[u]=y[u]&15,d[u]==mxConstants.DIRECTION_MASK_WEST||d[u]==mxConstants.DIRECTION_MASK_NORTH||d[u]==mxConstants.DIRECTION_MASK_EAST||d[u]==mxConstants.DIRECTION_MASK_SOUTH)&&(a[u]=d[u]);d=a[0]==mxConstants.DIRECTION_MASK_EAST?3:a[0];y=a[1]==mxConstants.DIRECTION_MASK_EAST?3:a[1];d-=x;y-=x;1>d&&(d+=4);1>y&&(y+=4);d=mxEdgeStyle.routePatterns[d-1][y-1];mxEdgeStyle.wayPoints1[0][0]=m[0][0];mxEdgeStyle.wayPoints1[0][1]=m[0][1];switch(a[0]){case mxConstants.DIRECTION_MASK_WEST:mxEdgeStyle.wayPoints1[0][0]-=
+f;mxEdgeStyle.wayPoints1[0][1]+=b[0][1]*m[0][3];break;case mxConstants.DIRECTION_MASK_SOUTH:mxEdgeStyle.wayPoints1[0][0]+=b[0][0]*m[0][2];mxEdgeStyle.wayPoints1[0][1]+=m[0][3]+f;break;case mxConstants.DIRECTION_MASK_EAST:mxEdgeStyle.wayPoints1[0][0]+=m[0][2]+f;mxEdgeStyle.wayPoints1[0][1]+=b[0][1]*m[0][3];break;case mxConstants.DIRECTION_MASK_NORTH:mxEdgeStyle.wayPoints1[0][0]+=b[0][0]*m[0][2],mxEdgeStyle.wayPoints1[0][1]-=f}f=0;c=y=0<(a[0]&(mxConstants.DIRECTION_MASK_EAST|mxConstants.DIRECTION_MASK_WEST))?
+0:1;for(u=0;u<d.length;u++)k=d[u]&15,r=k==mxConstants.DIRECTION_MASK_EAST?3:k,r+=x,4<r&&(r-=4),l=mxEdgeStyle.dirVectors[r-1],k=0<r%2?0:1,k!=y&&(f++,mxEdgeStyle.wayPoints1[f][0]=mxEdgeStyle.wayPoints1[f-1][0],mxEdgeStyle.wayPoints1[f][1]=mxEdgeStyle.wayPoints1[f-1][1]),q=0<(d[u]&mxEdgeStyle.TARGET_MASK),t=0<(d[u]&mxEdgeStyle.SOURCE_MASK),n=(d[u]&mxEdgeStyle.SIDE_MASK)>>5,n<<=x,15<n&&(n>>=4),p=0<(d[u]&mxEdgeStyle.CENTER_MASK),(t||q)&&9>n?(r=t?0:1,n=p&&0==k?m[r][0]+b[r][0]*m[r][2]:p?m[r][1]+b[r][1]*
+m[r][3]:mxEdgeStyle.limits[r][n],0==k?(n=(n-mxEdgeStyle.wayPoints1[f][0])*l[0],0<n&&(mxEdgeStyle.wayPoints1[f][0]+=l[0]*n)):(n=(n-mxEdgeStyle.wayPoints1[f][1])*l[1],0<n&&(mxEdgeStyle.wayPoints1[f][1]+=l[1]*n))):p&&(mxEdgeStyle.wayPoints1[f][0]+=l[0]*Math.abs(mxEdgeStyle.vertexSeperations[r]/2),mxEdgeStyle.wayPoints1[f][1]+=l[1]*Math.abs(mxEdgeStyle.vertexSeperations[r]/2)),0<f&&mxEdgeStyle.wayPoints1[f][k]==mxEdgeStyle.wayPoints1[f-1][k]?f--:y=k;for(u=0;u<=f&&(u!=f||((0<(a[1]&(mxConstants.DIRECTION_MASK_EAST|
 mxConstants.DIRECTION_MASK_WEST))?0:1)==c?0:1)==(f+1)%2);u++)e.push(new mxPoint(Math.round(mxEdgeStyle.wayPoints1[u][0]),Math.round(mxEdgeStyle.wayPoints1[u][1])));for(a=1;a<e.length;)null==e[a-1]||null==e[a]||e[a-1].x!=e[a].x||e[a-1].y!=e[a].y?a++:e.splice(a,1)}},getRoutePattern:function(a,b,c,d){var e=a[0]==mxConstants.DIRECTION_MASK_EAST?3:a[0];a=a[1]==mxConstants.DIRECTION_MASK_EAST?3:a[1];e-=b;a-=b;1>e&&(e+=4);1>a&&(a+=4);b=routePatterns[e-1][a-1];0!=c&&0!=d||null==inlineRoutePatterns[e-1][a-
 1]||(b=inlineRoutePatterns[e-1][a-1]);return b}},mxStyleRegistry={values:[],putValue:function(a,b){mxStyleRegistry.values[a]=b},getValue:function(a){return mxStyleRegistry.values[a]},getName:function(a){for(var b in mxStyleRegistry.values)if(mxStyleRegistry.values[b]==a)return b;return null}};mxStyleRegistry.putValue(mxConstants.EDGESTYLE_ELBOW,mxEdgeStyle.ElbowConnector);mxStyleRegistry.putValue(mxConstants.EDGESTYLE_ENTITY_RELATION,mxEdgeStyle.EntityRelation);
 mxStyleRegistry.putValue(mxConstants.EDGESTYLE_LOOP,mxEdgeStyle.Loop);mxStyleRegistry.putValue(mxConstants.EDGESTYLE_SIDETOSIDE,mxEdgeStyle.SideToSide);mxStyleRegistry.putValue(mxConstants.EDGESTYLE_TOPTOBOTTOM,mxEdgeStyle.TopToBottom);mxStyleRegistry.putValue(mxConstants.EDGESTYLE_ORTHOGONAL,mxEdgeStyle.OrthConnector);mxStyleRegistry.putValue(mxConstants.EDGESTYLE_SEGMENT,mxEdgeStyle.SegmentConnector);mxStyleRegistry.putValue(mxConstants.PERIMETER_ELLIPSE,mxPerimeter.EllipsePerimeter);
@@ -1168,7 +1168,7 @@ m=this.view.getState(this.model.getParent(a[f]));if(null!=l&&null!=m)if(c=m.orig
 k.length;l++)k[l].x+=c,k[l].y+=m}else k.translate(c,m)}}else d=[]}return d};mxGraph.prototype.insertVertex=function(a,b,c,d,e,f,g,h,k){b=this.createVertex(a,b,c,d,e,f,g,h,k);return this.addCell(b,a)};mxGraph.prototype.createVertex=function(a,b,c,d,e,f,g,h,k){a=new mxGeometry(d,e,f,g);a.relative=null!=k?k:!1;c=new mxCell(c,a,h);c.setId(b);c.setVertex(!0);c.setConnectable(!0);return c};mxGraph.prototype.insertEdge=function(a,b,c,d,e,f){b=this.createEdge(a,b,c,d,e,f);return this.addEdge(b,a,d,e)};
 mxGraph.prototype.createEdge=function(a,b,c,d,e,f){a=new mxCell(c,new mxGeometry,f);a.setId(b);a.setEdge(!0);a.geometry.relative=!0;return a};mxGraph.prototype.addEdge=function(a,b,c,d,e){return this.addCell(a,b,e,c,d)};mxGraph.prototype.addCell=function(a,b,c,d,e){return this.addCells([a],b,c,d,e)[0]};
 mxGraph.prototype.addCells=function(a,b,c,d,e){null==b&&(b=this.getDefaultParent());null==c&&(c=this.model.getChildCount(b));this.model.beginUpdate();try{this.cellsAdded(a,b,c,d,e,!1,!0),this.fireEvent(new mxEventObject(mxEvent.ADD_CELLS,"cells",a,"parent",b,"index",c,"source",d,"target",e))}finally{this.model.endUpdate()}return a};
-mxGraph.prototype.cellsAdded=function(a,b,c,d,e,f,g,h){if(null!=a&&null!=b&&null!=c){this.model.beginUpdate();try{for(var k=f?this.view.getState(b):null,l=null!=k?k.origin:null,m=new mxPoint(0,0),k=0;k<a.length;k++)if(null==a[k])c--;else{var n=this.model.getParent(a[k]);if(null!=l&&a[k]!=b&&b!=n){var p=this.view.getState(n),r=null!=p?p.origin:m,q=this.model.getGeometry(a[k]);if(null!=q){var t=r.x-l.x,y=r.y-l.y,q=q.clone();q.translate(t,y);q.relative||!this.model.isVertex(a[k])||this.isAllowNegativeCoordinates()||
+mxGraph.prototype.cellsAdded=function(a,b,c,d,e,f,g,h){if(null!=a&&null!=b&&null!=c){this.model.beginUpdate();try{for(var k=f?this.view.getState(b):null,l=null!=k?k.origin:null,m=new mxPoint(0,0),k=0;k<a.length;k++)if(null==a[k])c--;else{var n=this.model.getParent(a[k]);if(null!=l&&a[k]!=b&&b!=n){var p=this.view.getState(n),r=null!=p?p.origin:m,q=this.model.getGeometry(a[k]);if(null!=q){var t=r.x-l.x,z=r.y-l.y,q=q.clone();q.translate(t,z);q.relative||!this.model.isVertex(a[k])||this.isAllowNegativeCoordinates()||
 (q.x=Math.max(0,q.x),q.y=Math.max(0,q.y));this.model.setGeometry(a[k],q)}}b==n&&c+k>this.model.getChildCount(b)&&c--;this.model.add(b,a[k],c+k);this.autoSizeCellsOnAdd&&this.autoSizeCell(a[k],!0);(null==h||h)&&this.isExtendParentsOnAdd(a[k])&&this.isExtendParent(a[k])&&this.extendParent(a[k]);(null==g||g)&&this.constrainChild(a[k]);null!=d&&this.cellConnected(a[k],d,!0);null!=e&&this.cellConnected(a[k],e,!1)}this.fireEvent(new mxEventObject(mxEvent.CELLS_ADDED,"cells",a,"parent",b,"index",c,"source",
 d,"target",e,"absolute",f))}finally{this.model.endUpdate()}}};mxGraph.prototype.autoSizeCell=function(a,b){if(null!=b?b:1)for(var c=this.model.getChildCount(a),d=0;d<c;d++)this.autoSizeCell(this.model.getChildAt(a,d));this.getModel().isVertex(a)&&this.isAutoSizeCell(a)&&this.updateCellSize(a)};
 mxGraph.prototype.removeCells=function(a,b){b=null!=b?b:!0;null==a&&(a=this.getDeletableCells(this.getSelectionCells()));b&&(a=this.getDeletableCells(this.addAllEdges(a)));this.model.beginUpdate();try{this.cellsRemoved(a),this.fireEvent(new mxEventObject(mxEvent.REMOVE_CELLS,"cells",a,"includeEdges",b))}finally{this.model.endUpdate()}return a};
@@ -1444,15 +1444,15 @@ mxConnectionHandler.prototype.connect=function(a,b,c,d){if(null!=b||this.isCreat
 k.x-=h.origin.x;k.y-=h.origin.y}}this.graph.addCell(b,d)}var l=this.graph.getDefaultParent();null!=a&&null!=b&&e.getParent(a)==e.getParent(b)&&e.getParent(e.getParent(a))!=e.getRoot()&&(l=e.getParent(a),null!=a.geometry&&a.geometry.relative&&null!=b.geometry&&b.geometry.relative&&(l=e.getParent(l)));var m=h=null;null!=this.edgeState&&(h=this.edgeState.cell.value,m=this.edgeState.cell.style);g=this.insertEdge(l,null,h,a,b,m);if(null!=g){this.graph.setConnectionConstraint(g,a,!0,this.sourceConstraint);
 this.graph.setConnectionConstraint(g,b,!1,this.constraintHandler.currentConstraint);null!=this.edgeState&&e.setGeometry(g,this.edgeState.cell.geometry);e.getParent(a);if(this.isInsertBefore(g,a,b,c,d)){l=null;for(k=a;null!=k.parent&&null!=k.geometry&&k.geometry.relative&&k.parent!=g.parent;)k=this.graph.model.getParent(k);null!=k&&null!=k.parent&&k.parent==g.parent&&(l=k.parent.getIndex(k),k.parent.insert(g,l))}var n=e.getGeometry(g);null==n&&(n=new mxGeometry,n.relative=!0,e.setGeometry(g,n));if(null!=
 this.waypoints&&0<this.waypoints.length){var p=this.graph.view.scale,r=this.graph.view.translate;n.points=[];for(a=0;a<this.waypoints.length;a++){var q=this.waypoints[a];n.points.push(new mxPoint(q.x/p-r.x,q.y/p-r.y))}}if(null==b){var t=this.graph.view.translate,p=this.graph.view.scale,q=null!=this.originalPoint?new mxPoint(this.originalPoint.x/p-t.x,this.originalPoint.y/p-t.y):new mxPoint(this.currentPoint.x/p-t.x,this.currentPoint.y/p-t.y);q.x-=this.graph.panDx/this.graph.view.scale;q.y-=this.graph.panDy/
-this.graph.view.scale;n.setTerminalPoint(q,!1)}this.fireEvent(new mxEventObject(mxEvent.CONNECT,"cell",g,"terminal",b,"event",c,"target",d,"terminalInserted",f))}}catch(y){mxLog.show(),mxLog.debug(y.message)}finally{e.endUpdate()}this.select&&this.selectCells(g,f?b:null)}};mxConnectionHandler.prototype.selectCells=function(a,b){this.graph.setSelectionCell(a)};
+this.graph.view.scale;n.setTerminalPoint(q,!1)}this.fireEvent(new mxEventObject(mxEvent.CONNECT,"cell",g,"terminal",b,"event",c,"target",d,"terminalInserted",f))}}catch(z){mxLog.show(),mxLog.debug(z.message)}finally{e.endUpdate()}this.select&&this.selectCells(g,f?b:null)}};mxConnectionHandler.prototype.selectCells=function(a,b){this.graph.setSelectionCell(a)};
 mxConnectionHandler.prototype.insertEdge=function(a,b,c,d,e,f){if(null==this.factoryMethod)return this.graph.insertEdge(a,b,c,d,e,f);b=this.createEdge(c,d,e,f);return b=this.graph.addEdge(b,a,d,e)};
 mxConnectionHandler.prototype.createTargetVertex=function(a,b){for(var c=this.graph.getCellGeometry(b);null!=c&&c.relative;)b=this.graph.getModel().getParent(b),c=this.graph.getCellGeometry(b);var d=this.graph.cloneCells([b])[0],c=this.graph.getModel().getGeometry(d);if(null!=c){var e=this.graph.view.translate,f=this.graph.view.scale,g=new mxPoint(this.currentPoint.x/f-e.x,this.currentPoint.y/f-e.y);c.x=Math.round(g.x-c.width/2-this.graph.panDx/f);c.y=Math.round(g.y-c.height/2-this.graph.panDy/f);
 g=this.getAlignmentTolerance();if(0<g){var h=this.graph.view.getState(b);if(null!=h){var k=h.x/f-e.x,e=h.y/f-e.y;Math.abs(k-c.x)<=g&&(c.x=Math.round(k));Math.abs(e-c.y)<=g&&(c.y=Math.round(e))}}}return d};mxConnectionHandler.prototype.getAlignmentTolerance=function(a){return this.graph.isGridEnabled()?this.graph.gridSize/2:this.graph.tolerance};
 mxConnectionHandler.prototype.createEdge=function(a,b,c,d){var e=null;null!=this.factoryMethod&&(e=this.factoryMethod(b,c,d));null==e&&(e=new mxCell(a||""),e.setEdge(!0),e.setStyle(d),a=new mxGeometry,a.relative=!0,e.setGeometry(a));return e};
 mxConnectionHandler.prototype.destroy=function(){this.graph.removeMouseListener(this);null!=this.shape&&(this.shape.destroy(),this.shape=null);null!=this.marker&&(this.marker.destroy(),this.marker=null);null!=this.constraintHandler&&(this.constraintHandler.destroy(),this.constraintHandler=null);null!=this.changeHandler&&(this.graph.getModel().removeListener(this.changeHandler),this.graph.getView().removeListener(this.changeHandler),this.changeHandler=null);null!=this.drillHandler&&(this.graph.removeListener(this.drillHandler),
 this.graph.getView().removeListener(this.drillHandler),this.drillHandler=null);null!=this.escapeHandler&&(this.graph.removeListener(this.escapeHandler),this.escapeHandler=null)};
-function mxConstraintHandler(a){this.graph=a;this.resetHandler=mxUtils.bind(this,function(a,c){null!=this.currentFocus&&null==this.graph.view.getState(this.currentFocus.cell)?this.reset():this.redraw()});this.graph.model.addListener(mxEvent.CHANGE,this.resetHandler);this.graph.view.addListener(mxEvent.SCALE,this.resetHandler);this.graph.addListener(mxEvent.ROOT,this.resetHandler)}mxConstraintHandler.prototype.pointImage=new mxImage(mxClient.imageBasePath+"/point.gif",5,5);
-mxConstraintHandler.prototype.graph=null;mxConstraintHandler.prototype.enabled=!0;mxConstraintHandler.prototype.highlightColor=mxConstants.DEFAULT_VALID_COLOR;mxConstraintHandler.prototype.isEnabled=function(){return this.enabled};mxConstraintHandler.prototype.setEnabled=function(a){this.enabled=a};
+function mxConstraintHandler(a){this.graph=a;this.resetHandler=mxUtils.bind(this,function(a,c){null!=this.currentFocus&&null==this.graph.view.getState(this.currentFocus.cell)?this.reset():this.redraw()});this.graph.model.addListener(mxEvent.CHANGE,this.resetHandler);this.graph.view.addListener(mxEvent.SCALE_AND_TRANSLATE,this.resetHandler);this.graph.view.addListener(mxEvent.TRANSLATE,this.resetHandler);this.graph.view.addListener(mxEvent.SCALE,this.resetHandler);this.graph.addListener(mxEvent.ROOT,
+this.resetHandler)}mxConstraintHandler.prototype.pointImage=new mxImage(mxClient.imageBasePath+"/point.gif",5,5);mxConstraintHandler.prototype.graph=null;mxConstraintHandler.prototype.enabled=!0;mxConstraintHandler.prototype.highlightColor=mxConstants.DEFAULT_VALID_COLOR;mxConstraintHandler.prototype.isEnabled=function(){return this.enabled};mxConstraintHandler.prototype.setEnabled=function(a){this.enabled=a};
 mxConstraintHandler.prototype.reset=function(){if(null!=this.focusIcons){for(var a=0;a<this.focusIcons.length;a++)this.focusIcons[a].destroy();this.focusIcons=null}null!=this.focusHighlight&&(this.focusHighlight.destroy(),this.focusHighlight=null);this.focusPoints=this.currentFocus=this.currentPoint=this.currentFocusArea=this.currentConstraint=null};mxConstraintHandler.prototype.getTolerance=function(a){return this.graph.getTolerance()};
 mxConstraintHandler.prototype.getImageForConstraint=function(a,b,c){return this.pointImage};mxConstraintHandler.prototype.isEventIgnored=function(a,b){return!1};mxConstraintHandler.prototype.isStateIgnored=function(a,b){return!1};mxConstraintHandler.prototype.destroyIcons=function(){if(null!=this.focusIcons){for(var a=0;a<this.focusIcons.length;a++)this.focusIcons[a].destroy();this.focusPoints=this.focusIcons=null}};
 mxConstraintHandler.prototype.destroyFocusHighlight=function(){null!=this.focusHighlight&&(this.focusHighlight.destroy(),this.focusHighlight=null)};mxConstraintHandler.prototype.isKeepFocusEvent=function(a){return mxEvent.isShiftDown(a.getEvent())};
@@ -1536,13 +1536,13 @@ function(){var a=m.apply(this,arguments);if(this.graph.pageVisible){for(var b=[]
 function(a,b){return null==a.cell?"#ffa500":mxConstants.GUIDE_COLOR};this.graphHandler.createPreviewShape=function(a){this.previewColor="#000000"==this.graph.background?"#ffffff":mxGraphHandler.prototype.previewColor;return mxGraphHandler.prototype.createPreviewShape.apply(this,arguments)};this.graphHandler.getCells=function(a){for(var b=mxGraphHandler.prototype.getCells.apply(this,arguments),c=[],d=0;d<b.length;d++){var e=this.graph.view.getState(b[d]),e=null!=e?e.style:this.graph.getCellStyle(b[d]);
 "1"==mxUtils.getValue(e,"part","0")?(e=this.graph.model.getParent(b[d]),this.graph.model.isVertex(e)&&0>mxUtils.indexOf(b,e)&&c.push(e)):c.push(b[d])}return c};this.connectionHandler.createTargetVertex=function(a,b){var c=this.graph.view.getState(b),c=null!=c?c.style:this.graph.getCellStyle(b);mxUtils.getValue(c,"part",!1)&&(c=this.graph.model.getParent(b),this.graph.model.isVertex(c)&&(b=c));return mxConnectionHandler.prototype.createTargetVertex.apply(this,arguments)};var n=new mxRubberband(this);
 this.getRubberband=function(){return n};var p=(new Date).getTime(),r=0,q=this.connectionHandler.mouseMove;this.connectionHandler.mouseMove=function(){var a=this.currentState;q.apply(this,arguments);a!=this.currentState?(p=(new Date).getTime(),r=0):r=(new Date).getTime()-p};var t=this.connectionHandler.isOutlineConnectEvent;this.connectionHandler.isOutlineConnectEvent=function(a){return null!=this.currentState&&a.getState()==this.currentState&&2E3<r||(null==this.currentState||"0"!=mxUtils.getValue(this.currentState.style,
-"outlineConnect","1"))&&t.apply(this,arguments)};var y=this.isToggleEvent;this.isToggleEvent=function(a){return y.apply(this,arguments)||mxEvent.isShiftDown(a)};var x=n.isForceRubberbandEvent;n.isForceRubberbandEvent=function(a){return x.apply(this,arguments)||mxUtils.hasScrollbars(this.graph.container)&&mxClient.IS_FF&&mxClient.IS_WIN&&null==a.getState()&&mxEvent.isTouchEvent(a.getEvent())};var w=null;this.panningHandler.addListener(mxEvent.PAN_START,mxUtils.bind(this,function(){this.isEnabled()&&
-(w=this.container.style.cursor,this.container.style.cursor="move")}));this.panningHandler.addListener(mxEvent.PAN_END,mxUtils.bind(this,function(){this.isEnabled()&&(this.container.style.cursor=w)}));this.popupMenuHandler.autoExpand=!0;this.popupMenuHandler.isSelectOnPopup=function(a){return mxEvent.isMouseEvent(a.getEvent())};var z=this.click;this.click=function(a){if(this.isEnabled()||a.isConsumed())return z.apply(this,arguments);var b=a.getCell();null!=b&&(b=this.getLinkForCell(b),null!=b&&window.open(b))};
+"outlineConnect","1"))&&t.apply(this,arguments)};var z=this.isToggleEvent;this.isToggleEvent=function(a){return z.apply(this,arguments)||mxEvent.isShiftDown(a)};var w=n.isForceRubberbandEvent;n.isForceRubberbandEvent=function(a){return w.apply(this,arguments)||mxUtils.hasScrollbars(this.graph.container)&&mxClient.IS_FF&&mxClient.IS_WIN&&null==a.getState()&&mxEvent.isTouchEvent(a.getEvent())};var x=null;this.panningHandler.addListener(mxEvent.PAN_START,mxUtils.bind(this,function(){this.isEnabled()&&
+(x=this.container.style.cursor,this.container.style.cursor="move")}));this.panningHandler.addListener(mxEvent.PAN_END,mxUtils.bind(this,function(){this.isEnabled()&&(this.container.style.cursor=x)}));this.popupMenuHandler.autoExpand=!0;this.popupMenuHandler.isSelectOnPopup=function(a){return mxEvent.isMouseEvent(a.getEvent())};var y=this.click;this.click=function(a){if(this.isEnabled()||a.isConsumed())return y.apply(this,arguments);var b=a.getCell();null!=b&&(b=this.getLinkForCell(b),null!=b&&window.open(b))};
 var u=this.getCursorForCell;this.getCursorForCell=function(a){if(this.isEnabled())return u.apply(this,arguments);if(null!=this.getLinkForCell(a))return"pointer"};this.selectRegion=function(a,b){var c=this.getAllCells(a.x,a.y,a.width,a.height);this.selectCellsForEvent(c,b);return c};this.getAllCells=function(a,b,c,d,e,f){f=null!=f?f:[];if(0<c||0<d){var g=this.getModel(),h=a+c,k=b+d;null==e&&(e=this.getCurrentRoot(),null==e&&(e=g.getRoot()));if(null!=e)for(var l=g.getChildCount(e),m=0;m<l;m++){var n=
-g.getChildAt(e,m),p=this.view.getState(n);if(null!=p&&this.isCellVisible(n)&&"1"!=mxUtils.getValue(p.style,"locked","0")){var q=mxUtils.getValue(p.style,mxConstants.STYLE_ROTATION)||0;0!=q&&(p=mxUtils.getBoundingBox(p,q));(g.isEdge(n)||g.isVertex(n))&&p.x>=a&&p.y+p.height<=k&&p.y>=b&&p.x+p.width<=h&&f.push(n);this.getAllCells(a,b,c,d,n,f)}}}return f};var F=this.graphHandler.shouldRemoveCellsFromParent;this.graphHandler.shouldRemoveCellsFromParent=function(a,b,c){return this.graph.isCellSelected(a)?
-!1:F.apply(this,arguments)};this.isCellLocked=function(a){for(a=this.view.getState(a);null!=a;){if("1"==mxUtils.getValue(a.style,"locked","0"))return!0;a=this.view.getState(this.model.getParent(a.cell))}return!1};var E=null;this.addListener(mxEvent.FIRE_MOUSE_EVENT,mxUtils.bind(this,function(a,b){if("mouseDown"==b.getProperty("eventName")){var c=b.getProperty("event").getState();E=null==c||this.isSelectionEmpty()||this.isCellSelected(c.cell)?null:this.getSelectionCells()}}));this.addListener(mxEvent.TAP_AND_HOLD,
-mxUtils.bind(this,function(a,b){if(!mxEvent.isMultiTouchEvent(b)){var c=b.getProperty("event"),d=b.getProperty("cell");null==d?(c=mxUtils.convertPoint(this.container,mxEvent.getClientX(c),mxEvent.getClientY(c)),n.start(c.x,c.y)):null!=E?this.addSelectionCells(E):1<this.getSelectionCount()&&this.isCellSelected(d)&&this.removeSelectionCell(d);E=null;b.consume()}}));this.connectionHandler.selectCells=function(a,b){this.graph.setSelectionCell(b||a)};this.connectionHandler.constraintHandler.isStateIgnored=
-function(a,b){return b&&a.view.graph.isCellSelected(a.cell)};this.selectionModel.addListener(mxEvent.CHANGE,mxUtils.bind(this,function(){var a=this.connectionHandler.constraintHandler;null!=a.currentFocus&&a.isStateIgnored(a.currentFocus,!0)&&(a.currentFocus=null,a.constraints=null,a.destroyIcons());a.destroyFocusHighlight()}));Graph.touchStyle&&this.initTouch();var D=this.updateMouseEvent;this.updateMouseEvent=function(a){a=D.apply(this,arguments);this.isCellLocked(a.getCell())&&(a.state=null);return a}}};
+g.getChildAt(e,m),p=this.view.getState(n);if(null!=p&&this.isCellVisible(n)&&"1"!=mxUtils.getValue(p.style,"locked","0")){var q=mxUtils.getValue(p.style,mxConstants.STYLE_ROTATION)||0;0!=q&&(p=mxUtils.getBoundingBox(p,q));(g.isEdge(n)||g.isVertex(n))&&p.x>=a&&p.y+p.height<=k&&p.y>=b&&p.x+p.width<=h&&f.push(n);this.getAllCells(a,b,c,d,n,f)}}}return f};var D=this.graphHandler.shouldRemoveCellsFromParent;this.graphHandler.shouldRemoveCellsFromParent=function(a,b,c){return this.graph.isCellSelected(a)?
+!1:D.apply(this,arguments)};this.isCellLocked=function(a){for(a=this.view.getState(a);null!=a;){if("1"==mxUtils.getValue(a.style,"locked","0"))return!0;a=this.view.getState(this.model.getParent(a.cell))}return!1};var F=null;this.addListener(mxEvent.FIRE_MOUSE_EVENT,mxUtils.bind(this,function(a,b){if("mouseDown"==b.getProperty("eventName")){var c=b.getProperty("event").getState();F=null==c||this.isSelectionEmpty()||this.isCellSelected(c.cell)?null:this.getSelectionCells()}}));this.addListener(mxEvent.TAP_AND_HOLD,
+mxUtils.bind(this,function(a,b){if(!mxEvent.isMultiTouchEvent(b)){var c=b.getProperty("event"),d=b.getProperty("cell");null==d?(c=mxUtils.convertPoint(this.container,mxEvent.getClientX(c),mxEvent.getClientY(c)),n.start(c.x,c.y)):null!=F?this.addSelectionCells(F):1<this.getSelectionCount()&&this.isCellSelected(d)&&this.removeSelectionCell(d);F=null;b.consume()}}));this.connectionHandler.selectCells=function(a,b){this.graph.setSelectionCell(b||a)};this.connectionHandler.constraintHandler.isStateIgnored=
+function(a,b){return b&&a.view.graph.isCellSelected(a.cell)};this.selectionModel.addListener(mxEvent.CHANGE,mxUtils.bind(this,function(){var a=this.connectionHandler.constraintHandler;null!=a.currentFocus&&a.isStateIgnored(a.currentFocus,!0)&&(a.currentFocus=null,a.constraints=null,a.destroyIcons());a.destroyFocusHighlight()}));Graph.touchStyle&&this.initTouch();var E=this.updateMouseEvent;this.updateMouseEvent=function(a){a=E.apply(this,arguments);this.isCellLocked(a.getCell())&&(a.state=null);return a}}};
 Graph.touchStyle=mxClient.IS_TOUCH||mxClient.IS_FF&&mxClient.IS_WIN||0<navigator.maxTouchPoints||0<navigator.msMaxTouchPoints||null==window.urlParams||"1"==urlParams.touch;Graph.fileSupport=null!=window.File&&null!=window.FileReader&&null!=window.FileList&&(null==window.urlParams||"0"!=urlParams.filesupport);Graph.lineJumpsEnabled=!0;Graph.defaultJumpSize=6;mxUtils.extend(Graph,mxGraph);Graph.prototype.minFitScale=null;Graph.prototype.maxFitScale=null;
 Graph.prototype.linkPolicy="frame"==urlParams.target?"blank":urlParams.target||"auto";Graph.prototype.linkTarget="frame"==urlParams.target?"_self":"_blank";Graph.prototype.defaultScrollbars=!mxClient.IS_IOS;Graph.prototype.defaultPageVisible=!0;Graph.prototype.lightbox=!1;Graph.prototype.defaultGraphBackground="#ffffff";Graph.prototype.scrollTileSize=new mxRectangle(0,0,400,400);Graph.prototype.transparentBackground=!0;Graph.prototype.defaultEdgeLength=80;Graph.prototype.edgeMode=!1;
 Graph.prototype.connectionArrowsEnabled=!0;Graph.prototype.placeholderPattern=RegExp("%(date{.*}|[^%^{^}]+)%","g");Graph.prototype.absoluteUrlPattern=/^(?:[a-z]+:)?\/\//i;Graph.prototype.defaultThemeName="default";Graph.prototype.defaultThemes={};Graph.prototype.baseUrl=(window!=window.top?document.referrer:document.location.toString()).split("#")[0];
@@ -1561,8 +1561,8 @@ Graph.prototype.getLabel=function(a){var b=mxGraph.prototype.getLabel.apply(this
 Graph.prototype.setGridSize=function(a){this.gridSize=a;this.fireEvent(new mxEventObject("gridSizeChanged"))};Graph.prototype.getGlobalVariable=function(a){var b=null;"date"==a?b=(new Date).toLocaleDateString():"time"==a?b=(new Date).toLocaleTimeString():"timestamp"==a?b=(new Date).toLocaleString():"date{"==a.substring(0,5)&&(a=a.substring(5,a.length-1),b=this.formatDate(new Date,a));return b};
 Graph.prototype.formatDate=function(a,b,c){null==this.dateFormatCache&&(this.dateFormatCache={i18n:{dayNames:"Sun Mon Tue Wed Thu Fri Sat Sunday Monday Tuesday Wednesday Thursday Friday Saturday".split(" "),monthNames:"Jan Feb Mar Apr May Jun Jul Aug Sep Oct Nov Dec January February March April May June July August September October November December".split(" ")},masks:{"default":"ddd mmm dd yyyy HH:MM:ss",shortDate:"m/d/yy",mediumDate:"mmm d, yyyy",longDate:"mmmm d, yyyy",fullDate:"dddd, mmmm d, yyyy",
 shortTime:"h:MM TT",mediumTime:"h:MM:ss TT",longTime:"h:MM:ss TT Z",isoDate:"yyyy-mm-dd",isoTime:"HH:MM:ss",isoDateTime:"yyyy-mm-dd'T'HH:MM:ss",isoUtcDateTime:"UTC:yyyy-mm-dd'T'HH:MM:ss'Z'"}});var d=this.dateFormatCache,e=/\b(?:[PMCEA][SDP]T|(?:Pacific|Mountain|Central|Eastern|Atlantic) (?:Standard|Daylight|Prevailing) Time|(?:GMT|UTC)(?:[-+]\d{4})?)\b/g,f=/[^-+\dA-Z]/g,g=function(a,b){a=String(a);for(b=b||2;a.length<b;)a="0"+a;return a};1!=arguments.length||"[object String]"!=Object.prototype.toString.call(a)||
-/\d/.test(a)||(b=a,a=void 0);a=a?new Date(a):new Date;if(isNaN(a))throw SyntaxError("invalid date");b=String(d.masks[b]||b||d.masks["default"]);"UTC:"==b.slice(0,4)&&(b=b.slice(4),c=!0);var h=c?"getUTC":"get",k=a[h+"Date"](),l=a[h+"Day"](),m=a[h+"Month"](),n=a[h+"FullYear"](),p=a[h+"Hours"](),r=a[h+"Minutes"](),q=a[h+"Seconds"](),h=a[h+"Milliseconds"](),t=c?0:a.getTimezoneOffset(),y={d:k,dd:g(k),ddd:d.i18n.dayNames[l],dddd:d.i18n.dayNames[l+7],m:m+1,mm:g(m+1),mmm:d.i18n.monthNames[m],mmmm:d.i18n.monthNames[m+
-12],yy:String(n).slice(2),yyyy:n,h:p%12||12,hh:g(p%12||12),H:p,HH:g(p),M:r,MM:g(r),s:q,ss:g(q),l:g(h,3),L:g(99<h?Math.round(h/10):h),t:12>p?"a":"p",tt:12>p?"am":"pm",T:12>p?"A":"P",TT:12>p?"AM":"PM",Z:c?"UTC":(String(a).match(e)||[""]).pop().replace(f,""),o:(0<t?"-":"+")+g(100*Math.floor(Math.abs(t)/60)+Math.abs(t)%60,4),S:["th","st","nd","rd"][3<k%10?0:(10!=k%100-k%10)*k%10]};return b.replace(/d{1,4}|m{1,4}|yy(?:yy)?|([HhMsTt])\1?|[LloSZ]|"[^"]*"|'[^']*'/g,function(a){return a in y?y[a]:a.slice(1,
+/\d/.test(a)||(b=a,a=void 0);a=a?new Date(a):new Date;if(isNaN(a))throw SyntaxError("invalid date");b=String(d.masks[b]||b||d.masks["default"]);"UTC:"==b.slice(0,4)&&(b=b.slice(4),c=!0);var h=c?"getUTC":"get",k=a[h+"Date"](),l=a[h+"Day"](),m=a[h+"Month"](),n=a[h+"FullYear"](),p=a[h+"Hours"](),r=a[h+"Minutes"](),q=a[h+"Seconds"](),h=a[h+"Milliseconds"](),t=c?0:a.getTimezoneOffset(),z={d:k,dd:g(k),ddd:d.i18n.dayNames[l],dddd:d.i18n.dayNames[l+7],m:m+1,mm:g(m+1),mmm:d.i18n.monthNames[m],mmmm:d.i18n.monthNames[m+
+12],yy:String(n).slice(2),yyyy:n,h:p%12||12,hh:g(p%12||12),H:p,HH:g(p),M:r,MM:g(r),s:q,ss:g(q),l:g(h,3),L:g(99<h?Math.round(h/10):h),t:12>p?"a":"p",tt:12>p?"am":"pm",T:12>p?"A":"P",TT:12>p?"AM":"PM",Z:c?"UTC":(String(a).match(e)||[""]).pop().replace(f,""),o:(0<t?"-":"+")+g(100*Math.floor(Math.abs(t)/60)+Math.abs(t)%60,4),S:["th","st","nd","rd"][3<k%10?0:(10!=k%100-k%10)*k%10]};return b.replace(/d{1,4}|m{1,4}|yy(?:yy)?|([HhMsTt])\1?|[LloSZ]|"[^"]*"|'[^']*'/g,function(a){return a in z?z[a]:a.slice(1,
 a.length-1)})};
 Graph.prototype.createLayersDialog=function(){var a=document.createElement("div");a.style.position="absolute";for(var b=this.getModel(),c=b.getChildCount(b.root),d=0;d<c;d++)(function(c){var d=document.createElement("div");d.style.overflow="hidden";d.style.textOverflow="ellipsis";d.style.padding="2px";d.style.whiteSpace="nowrap";var e=document.createElement("input");e.style.display="inline-block";e.setAttribute("type","checkbox");b.isVisible(c)&&(e.setAttribute("checked","checked"),e.defaultChecked=
 !0);d.appendChild(e);var h=c.value||mxResources.get("background")||"Background";d.setAttribute("title",h);mxUtils.write(d,h);a.appendChild(d);mxEvent.addListener(e,"click",function(){null!=e.getAttribute("checked")?e.removeAttribute("checked"):e.setAttribute("checked","checked");b.setVisible(c,e.checked)})})(b.getChildAt(b.root,d));return a};
@@ -1588,7 +1588,7 @@ Graph.prototype.selectAll=function(a){a=a||this.getDefaultParent();this.isCellLo
 Graph.prototype.isCellFoldable=function(a){var b=this.view.getState(a),b=null!=b?b.style:this.getCellStyle(a);return this.foldingEnabled&&!this.isCellLocked(a)&&(this.isContainer(a)&&"0"!=b.collapsible||!this.isContainer(a)&&"1"==b.collapsible)};Graph.prototype.reset=function(){this.isEditing()&&this.stopEditing(!0);this.escape();this.isSelectionEmpty()||this.clearSelection()};
 Graph.prototype.zoom=function(a,b){a=Math.max(.01,Math.min(this.view.scale*a,160))/this.view.scale;mxGraph.prototype.zoom.apply(this,arguments)};Graph.prototype.zoomIn=function(){.15>this.view.scale?this.zoom((this.view.scale+.01)/this.view.scale):this.zoom(Math.round(this.view.scale*this.zoomFactor*20)/20/this.view.scale)};Graph.prototype.zoomOut=function(){.15>=this.view.scale?this.zoom((this.view.scale-.01)/this.view.scale):this.zoom(Math.round(1/this.zoomFactor*this.view.scale*20)/20/this.view.scale)};
 Graph.prototype.getTooltipForCell=function(a){var b="";if(mxUtils.isNode(a.value)){var c=a.value.getAttribute("tooltip");if(null!=c)null!=c&&this.isReplacePlaceholders(a)&&(c=this.replacePlaceholders(a,c)),b=this.sanitizeHtml(c);else{c=["label","tooltip","placeholders","placeholder"];a=a.value.attributes;var d=[];this.isEnabled()&&c.push("link");for(var e=0;e<a.length;e++)0>mxUtils.indexOf(c,a[e].nodeName)&&0<a[e].nodeValue.length&&d.push({name:a[e].nodeName,value:a[e].nodeValue});d.sort(function(a,
-b){return a.name<b.name?-1:a.name>b.name?1:0});for(e=0;e<d.length;e++)b+=("link"!=d[e].name?d[e].name+":":"")+mxUtils.htmlEntities(d[e].value)+"\n";0<b.length&&(b=b.substring(0,b.length-1))}}return b};Graph.prototype.stringToBytes=function(a){for(var b=Array(a.length),c=0;c<a.length;c++)b[c]=a.charCodeAt(c);return b};Graph.prototype.bytesToString=function(a){for(var b=Array(a.length),c=0;c<a.length;c++)b[c]=String.fromCharCode(a[c]);return b.join("")};
+b){return a.name<b.name?-1:a.name>b.name?1:0});for(e=0;e<d.length;e++)"link"==d[e].name&&this.isPageLink(d[e].value)||(b+=("link"!=d[e].name?d[e].name+":":"")+mxUtils.htmlEntities(d[e].value)+"\n");0<b.length&&(b=b.substring(0,b.length-1))}}return b};Graph.prototype.stringToBytes=function(a){for(var b=Array(a.length),c=0;c<a.length;c++)b[c]=a.charCodeAt(c);return b};Graph.prototype.bytesToString=function(a){for(var b=Array(a.length),c=0;c<a.length;c++)b[c]=String.fromCharCode(a[c]);return b.join("")};
 Graph.prototype.compress=function(a){if(null==a||0==a.length||"undefined"===typeof pako)return a;a=this.bytesToString(pako.deflateRaw(encodeURIComponent(a)));return window.btoa?btoa(a):Base64.encode(a,!0)};Graph.prototype.decompress=function(a){if(null==a||0==a.length||"undefined"===typeof pako)return a;a=window.atob?atob(a):Base64.decode(a,!0);return this.zapGremlins(decodeURIComponent(this.bytesToString(pako.inflateRaw(a))))};
 Graph.prototype.zapGremlins=function(a){for(var b=[],c=0;c<a.length;c++){var d=a.charCodeAt(c);(32<=d||9==d||10==d||13==d)&&b.push(a.charAt(c))}return b.join("")};HoverIcons=function(a){this.graph=a;this.init()};HoverIcons.prototype.arrowSpacing=6;HoverIcons.prototype.updateDelay=500;HoverIcons.prototype.activationDelay=140;HoverIcons.prototype.currentState=null;HoverIcons.prototype.activeArrow=null;HoverIcons.prototype.inactiveOpacity=15;HoverIcons.prototype.checkCollisions=!0;
 HoverIcons.prototype.triangleUp=new mxImage(mxClient.IS_SVG?"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABoAAAAOCAYAAAAxDQxDAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAyJpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuMC1jMDYwIDYxLjEzNDc3NywgMjAxMC8wMi8xMi0xNzozMjowMCAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvIiB4bWxuczp4bXBNTT0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL21tLyIgeG1sbnM6c3RSZWY9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9zVHlwZS9SZXNvdXJjZVJlZiMiIHhtcDpDcmVhdG9yVG9vbD0iQWRvYmUgUGhvdG9zaG9wIENTNSBNYWNpbnRvc2giIHhtcE1NOkluc3RhbmNlSUQ9InhtcC5paWQ6N0ZBN0E3M0U5NjZGMTFFNTg5NTRDNzQwMTgwNDlEQzQiIHhtcE1NOkRvY3VtZW50SUQ9InhtcC5kaWQ6N0ZBN0E3M0Y5NjZGMTFFNTg5NTRDNzQwMTgwNDlEQzQiPiA8eG1wTU06RGVyaXZlZEZyb20gc3RSZWY6aW5zdGFuY2VJRD0ieG1wLmlpZDo3RkE3QTczQzk2NkYxMUU1ODk1NEM3NDAxODA0OURDNCIgc3RSZWY6ZG9jdW1lbnRJRD0ieG1wLmRpZDo3RkE3QTczRDk2NkYxMUU1ODk1NEM3NDAxODA0OURDNCIvPiA8L3JkZjpEZXNjcmlwdGlvbj4gPC9yZGY6UkRGPiA8L3g6eG1wbWV0YT4gPD94cGFja2V0IGVuZD0iciI/Pj625P8AAACySURBVHjaYmRY956BROABxF+A+AgpmpjIsGQjEO8CYidaWeQHtYQNiDmBeAspljGRYMlqqCUwALPMg1oWhWCxBNmyjVCHUGQRyJKlOCyBATaoQ/zItSgciFcQsATdshBSLYqC+oSZhMTCBnVYFLEWgRQuItESGGCG6o0iZFECBZagW5aAyyKQxBwKLUG2bD4Qp6FblAyVoIYlyGAmzDIWKGMmA+0AyGw2RjIKVbIAQIABAFJRHSSk2rPoAAAAAElFTkSuQmCC":
@@ -1631,12 +1631,12 @@ this.setDisplay("");null!=this.currentState&&this.currentState!=a&&d<this.activa
 this.reset())}else this.reset()};HoverIcons.prototype.setCurrentState=function(a){"eastwest"!=a.style.portConstraint&&(this.graph.container.appendChild(this.arrowUp),this.graph.container.appendChild(this.arrowDown));this.graph.container.appendChild(this.arrowRight);this.graph.container.appendChild(this.arrowLeft);this.currentState=a};
 (function(){var a=mxGraphView.prototype.resetValidationState;mxGraphView.prototype.resetValidationState=function(){a.apply(this,arguments);this.validEdges=[]};var b=mxGraphView.prototype.validateCellState;mxGraphView.prototype.validateCellState=function(a,c){var d=this.getState(a);null!=d&&this.graph.model.isEdge(d.cell)&&null!=d.style&&1!=d.style[mxConstants.STYLE_CURVED]&&!d.invalid&&this.updateLineJumps(d)&&this.graph.cellRenderer.redraw(d,!1,this.isRendering());d=b.apply(this,arguments);null!=
 d&&this.graph.model.isEdge(d.cell)&&1!=d.style[mxConstants.STYLE_CURVED]&&this.validEdges.push(d);return d};var c=mxCellRenderer.prototype.isShapeInvalid;mxCellRenderer.prototype.isShapeInvalid=function(a,b){return c.apply(this,arguments)||null!=a.routedPoints&&null!=b.routedPoints&&!mxUtils.equalPoints(b.routedPoints,a.routedPoints)};var d=mxGraphView.prototype.updateCellState;mxGraphView.prototype.updateCellState=function(a){d.apply(this,arguments);this.graph.model.isEdge(a.cell)&&1!=a.style[mxConstants.STYLE_CURVED]&&
-this.updateLineJumps(a)};mxGraphView.prototype.updateLineJumps=function(a){var b=a.absolutePoints;if(Graph.lineJumpsEnabled){var c=null!=a.routedPoints,d=null;if(null!=b&&null!=this.validEdges&&"none"!==mxUtils.getValue(a.style,"jumpStyle","none")){for(var e=function(b,c,e){var f=new mxPoint(c,e);f.type=b;d.push(f);f=null!=a.routedPoints?a.routedPoints[d.length-1]:null;return null==f||f.type!=b||f.x!=c||f.y!=e},f=.5*this.scale,c=!1,d=[],g=0;g<b.length-1;g++){for(var h=b[g+1],k=b[g],x=[],w=b[g+2];g<
-b.length-2&&mxUtils.ptSegDistSq(k.x,k.y,w.x,w.y,h.x,h.y)<1*this.scale*this.scale;)h=w,g++,w=b[g+2];for(var c=e(0,k.x,k.y)||c,z=0;z<this.validEdges.length;z++){var u=this.validEdges[z],F=u.absolutePoints;if(null!=F&&mxUtils.intersects(a,u))for(u=0;u<F.length-1;u++){for(var E=F[u+1],D=F[u],w=F[u+2];u<F.length-2&&mxUtils.ptSegDistSq(D.x,D.y,w.x,w.y,E.x,E.y)<1*this.scale*this.scale;)E=w,u++,w=F[u+2];w=mxUtils.intersection(k.x,k.y,h.x,h.y,D.x,D.y,E.x,E.y);if(null!=w&&(Math.abs(w.x-D.x)>f||Math.abs(w.y-
-D.y)>f)&&(Math.abs(w.x-E.x)>f||Math.abs(w.y-E.y)>f)){E=w.x-k.x;D=w.y-k.y;w={distSq:E*E+D*D,x:w.x,y:w.y};for(E=0;E<x.length;E++)if(x[E].distSq>w.distSq){x.splice(E,0,w);w=null;break}null==w||0!=x.length&&x[x.length-1].x===w.x&&x[x.length-1].y===w.y||x.push(w)}}}for(u=0;u<x.length;u++)c=e(1,x[u].x,x[u].y)||c}w=b[b.length-1];c=e(0,w.x,w.y)||c}a.routedPoints=d;return c}return!1};var e=mxConnector.prototype.paintLine;mxConnector.prototype.paintLine=function(a,b,c){this.routedPoints=null!=this.state?this.state.routedPoints:
-null;if(this.outline||null==this.state||null==this.style||null==this.state.routedPoints||0==this.state.routedPoints.length)e.apply(this,arguments);else{var d=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2,f=(parseInt(mxUtils.getValue(this.style,"jumpSize",Graph.defaultJumpSize))-2)/2+this.strokewidth,g=mxUtils.getValue(this.style,"jumpStyle","none"),h,k=!0,l=null,m=null;h=[];var w=null;a.begin();for(var z=0;z<this.state.routedPoints.length;z++){var u=this.state.routedPoints[z],
-F=new mxPoint(u.x/this.scale,u.y/this.scale);0==z?F=b[0]:z==this.state.routedPoints.length-1&&(F=b[b.length-1]);var E=!1;if(null!=l&&1==u.type){var D=this.state.routedPoints[z+1],u=D.x/this.scale-F.x,D=D.y/this.scale-F.y,u=u*u+D*D;null==w&&(w=new mxPoint(F.x-l.x,F.y-l.y),m=Math.sqrt(w.x*w.x+w.y*w.y),w.x=w.x*f/m,w.y=w.y*f/m);u>f*f&&0<m&&(u=l.x-F.x,D=l.y-F.y,u=u*u+D*D,u>f*f&&(E=new mxPoint(F.x-w.x,F.y-w.y),u=new mxPoint(F.x+w.x,F.y+w.y),h.push(E),this.addPoints(a,h,c,d,!1,null,k),h=0>Math.round(w.x)||
-0==Math.round(w.x)&&0>=Math.round(w.y)?1:-1,k=!1,"sharp"==g?(a.lineTo(E.x-w.y*h,E.y+w.x*h),a.lineTo(u.x-w.y*h,u.y+w.x*h),a.lineTo(u.x,u.y)):"arc"==g?(h*=1.3,a.curveTo(E.x-w.y*h,E.y+w.x*h,u.x-w.y*h,u.y+w.x*h,u.x,u.y)):(a.moveTo(u.x,u.y),k=!0),h=[u],E=!0))}else w=null;E||(h.push(F),l=F)}this.addPoints(a,h,c,d,!1,null,k);a.stroke()}};var f=mxGraphView.prototype.updateFloatingTerminalPoint;mxGraphView.prototype.updateFloatingTerminalPoint=function(a,b,c,d){if(null==b||null==a||"1"!=b.style.snapToPoint&&
+this.updateLineJumps(a)};mxGraphView.prototype.updateLineJumps=function(a){var b=a.absolutePoints;if(Graph.lineJumpsEnabled){var c=null!=a.routedPoints,d=null;if(null!=b&&null!=this.validEdges&&"none"!==mxUtils.getValue(a.style,"jumpStyle","none")){for(var e=function(b,c,e){var f=new mxPoint(c,e);f.type=b;d.push(f);f=null!=a.routedPoints?a.routedPoints[d.length-1]:null;return null==f||f.type!=b||f.x!=c||f.y!=e},f=.5*this.scale,c=!1,d=[],g=0;g<b.length-1;g++){for(var h=b[g+1],k=b[g],w=[],x=b[g+2];g<
+b.length-2&&mxUtils.ptSegDistSq(k.x,k.y,x.x,x.y,h.x,h.y)<1*this.scale*this.scale;)h=x,g++,x=b[g+2];for(var c=e(0,k.x,k.y)||c,y=0;y<this.validEdges.length;y++){var u=this.validEdges[y],D=u.absolutePoints;if(null!=D&&mxUtils.intersects(a,u))for(u=0;u<D.length-1;u++){for(var F=D[u+1],E=D[u],x=D[u+2];u<D.length-2&&mxUtils.ptSegDistSq(E.x,E.y,x.x,x.y,F.x,F.y)<1*this.scale*this.scale;)F=x,u++,x=D[u+2];x=mxUtils.intersection(k.x,k.y,h.x,h.y,E.x,E.y,F.x,F.y);if(null!=x&&(Math.abs(x.x-E.x)>f||Math.abs(x.y-
+E.y)>f)&&(Math.abs(x.x-F.x)>f||Math.abs(x.y-F.y)>f)){F=x.x-k.x;E=x.y-k.y;x={distSq:F*F+E*E,x:x.x,y:x.y};for(F=0;F<w.length;F++)if(w[F].distSq>x.distSq){w.splice(F,0,x);x=null;break}null==x||0!=w.length&&w[w.length-1].x===x.x&&w[w.length-1].y===x.y||w.push(x)}}}for(u=0;u<w.length;u++)c=e(1,w[u].x,w[u].y)||c}x=b[b.length-1];c=e(0,x.x,x.y)||c}a.routedPoints=d;return c}return!1};var e=mxConnector.prototype.paintLine;mxConnector.prototype.paintLine=function(a,b,c){this.routedPoints=null!=this.state?this.state.routedPoints:
+null;if(this.outline||null==this.state||null==this.style||null==this.state.routedPoints||0==this.state.routedPoints.length)e.apply(this,arguments);else{var d=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2,f=(parseInt(mxUtils.getValue(this.style,"jumpSize",Graph.defaultJumpSize))-2)/2+this.strokewidth,g=mxUtils.getValue(this.style,"jumpStyle","none"),h,k=!0,l=null,m=null;h=[];var x=null;a.begin();for(var y=0;y<this.state.routedPoints.length;y++){var u=this.state.routedPoints[y],
+D=new mxPoint(u.x/this.scale,u.y/this.scale);0==y?D=b[0]:y==this.state.routedPoints.length-1&&(D=b[b.length-1]);var F=!1;if(null!=l&&1==u.type){var E=this.state.routedPoints[y+1],u=E.x/this.scale-D.x,E=E.y/this.scale-D.y,u=u*u+E*E;null==x&&(x=new mxPoint(D.x-l.x,D.y-l.y),m=Math.sqrt(x.x*x.x+x.y*x.y),x.x=x.x*f/m,x.y=x.y*f/m);u>f*f&&0<m&&(u=l.x-D.x,E=l.y-D.y,u=u*u+E*E,u>f*f&&(F=new mxPoint(D.x-x.x,D.y-x.y),u=new mxPoint(D.x+x.x,D.y+x.y),h.push(F),this.addPoints(a,h,c,d,!1,null,k),h=0>Math.round(x.x)||
+0==Math.round(x.x)&&0>=Math.round(x.y)?1:-1,k=!1,"sharp"==g?(a.lineTo(F.x-x.y*h,F.y+x.x*h),a.lineTo(u.x-x.y*h,u.y+x.x*h),a.lineTo(u.x,u.y)):"arc"==g?(h*=1.3,a.curveTo(F.x-x.y*h,F.y+x.x*h,u.x-x.y*h,u.y+x.x*h,u.x,u.y)):(a.moveTo(u.x,u.y),k=!0),h=[u],F=!0))}else x=null;F||(h.push(D),l=D)}this.addPoints(a,h,c,d,!1,null,k);a.stroke()}};var f=mxGraphView.prototype.updateFloatingTerminalPoint;mxGraphView.prototype.updateFloatingTerminalPoint=function(a,b,c,d){if(null==b||null==a||"1"!=b.style.snapToPoint&&
 "1"!=a.style.snapToPoint)f.apply(this,arguments);else{b=this.getTerminalPort(a,b,d);var e=this.getNextPoint(a,c,d),g=this.graph.isOrthogonal(a),h=mxUtils.toRadians(Number(b.style[mxConstants.STYLE_ROTATION]||"0")),k=new mxPoint(b.getCenterX(),b.getCenterY());if(0!=h)var l=Math.cos(-h),m=Math.sin(-h),e=mxUtils.getRotatedPoint(e,l,m,k);l=parseFloat(a.style[mxConstants.STYLE_PERIMETER_SPACING]||0);l+=parseFloat(a.style[d?mxConstants.STYLE_SOURCE_PERIMETER_SPACING:mxConstants.STYLE_TARGET_PERIMETER_SPACING]||
 0);e=this.getPerimeterPoint(b,e,0==h&&g,l);0!=h&&(l=Math.cos(h),m=Math.sin(h),e=mxUtils.getRotatedPoint(e,l,m,k));a.setAbsoluteTerminalPoint(this.snapToAnchorPoint(a,b,c,d,e),d)}};mxGraphView.prototype.snapToAnchorPoint=function(a,b,c,d,e){if(null!=b&&null!=a){a=this.graph.getAllConnectionConstraints(b);d=c=null;for(var f=0;f<a.length;f++){var g=this.graph.getConnectionPoint(b,a[f]);if(null!=g){var h=(g.x-e.x)*(g.x-e.x)+(g.y-e.y)*(g.y-e.y);if(null==d||h<d)c=g,d=h}}null!=c&&(e=c)}return e};var g=mxStencil.prototype.evaluateTextAttribute;
 mxStencil.prototype.evaluateTextAttribute=function(a,b,c){var d=g.apply(this,arguments);"1"==a.getAttribute("placeholders")&&null!=c.state&&(d=c.state.view.graph.replacePlaceholders(c.state.cell,d));return d};var h=mxCellRenderer.prototype.createShape;mxCellRenderer.prototype.createShape=function(a){if(null!=a.style&&"undefined"!==typeof pako){var b=mxUtils.getValue(a.style,mxConstants.STYLE_SHAPE,null);if(null!=b&&"stencil("==b.substring(0,8))try{var c=b.substring(8,b.length-1),d=mxUtils.parseXml(a.view.graph.decompress(c));
@@ -1655,7 +1655,7 @@ this.graph.currentEdgeStyle[b];return a};var c=mxConnectionHandler.prototype.cre
 b.apply(this,arguments);this.error=null;return c});return a};Graph.prototype.defaultVertexStyle={};Graph.prototype.defaultEdgeStyle={edgeStyle:"orthogonalEdgeStyle",rounded:"0",jettySize:"auto",orthogonalLoop:"1"};Graph.prototype.createCurrentEdgeStyle=function(){var a="edgeStyle="+(this.currentEdgeStyle.edgeStyle||"none")+";";null!=this.currentEdgeStyle.shape&&(a+="shape="+this.currentEdgeStyle.shape+";");null!=this.currentEdgeStyle.curved&&(a+="curved="+this.currentEdgeStyle.curved+";");null!=this.currentEdgeStyle.rounded&&
 (a+="rounded="+this.currentEdgeStyle.rounded+";");null!=this.currentEdgeStyle.comic&&(a+="comic="+this.currentEdgeStyle.comic+";");null!=this.currentEdgeStyle.jumpStyle&&(a+="jumpStyle="+this.currentEdgeStyle.jumpStyle+";");null!=this.currentEdgeStyle.jumpSize&&(a+="jumpSize="+this.currentEdgeStyle.jumpSize+";");"elbowEdgeStyle"==this.currentEdgeStyle.edgeStyle&&null!=this.currentEdgeStyle.elbow&&(a+="elbow="+this.currentEdgeStyle.elbow+";");return a=null!=this.currentEdgeStyle.html?a+("html="+this.currentEdgeStyle.html+
 ";"):a+"html=1;"};Graph.prototype.getPagePadding=function(){return new mxPoint(0,0)};Graph.prototype.loadStylesheet=function(){var a=null!=this.themes?this.themes[this.defaultThemeName]:mxStyleRegistry.dynamicLoading?mxUtils.load(STYLE_PATH+"/default.xml").getDocumentElement():null;null!=a&&(new mxCodec(a.ownerDocument)).decode(a,this.getStylesheet())};Graph.prototype.getAllConnectionConstraints=function(a,b){if(null!=a){var c=mxUtils.getValue(a.style,"points",null);if(null!=c){var d=[];try{for(var e=
-JSON.parse(c),c=0;c<e.length;c++){var f=e[c];d.push(new mxConnectionConstraint(new mxPoint(f[0],f[1]),2<f.length?"0"!=f[2]:!0))}}catch(H){}return d}if(null!=a.shape)if(null!=a.shape.stencil){if(null!=a.shape.stencil)return a.shape.stencil.constraints}else if(null!=a.shape.constraints)return a.shape.constraints}return null};Graph.prototype.flipEdge=function(a){if(null!=a){var b=this.view.getState(a),b=null!=b?b.style:this.getCellStyle(a);null!=b&&(b=mxUtils.getValue(b,mxConstants.STYLE_ELBOW,mxConstants.ELBOW_HORIZONTAL)==
+JSON.parse(c),c=0;c<e.length;c++){var f=e[c];d.push(new mxConnectionConstraint(new mxPoint(f[0],f[1]),2<f.length?"0"!=f[2]:!0))}}catch(K){}return d}if(null!=a.shape)if(null!=a.shape.stencil){if(null!=a.shape.stencil)return a.shape.stencil.constraints}else if(null!=a.shape.constraints)return a.shape.constraints}return null};Graph.prototype.flipEdge=function(a){if(null!=a){var b=this.view.getState(a),b=null!=b?b.style:this.getCellStyle(a);null!=b&&(b=mxUtils.getValue(b,mxConstants.STYLE_ELBOW,mxConstants.ELBOW_HORIZONTAL)==
 mxConstants.ELBOW_HORIZONTAL?mxConstants.ELBOW_VERTICAL:mxConstants.ELBOW_HORIZONTAL,this.setCellStyles(mxConstants.STYLE_ELBOW,b,[a]))}};Graph.prototype.isValidRoot=function(a){for(var b=this.model.getChildCount(a),c=0,d=0;d<b;d++){var e=this.model.getChildAt(a,d);this.model.isVertex(e)&&(e=this.getCellGeometry(e),null==e||e.relative||c++)}return 0<c||this.isContainer(a)};Graph.prototype.isValidDropTarget=function(a){var b=this.view.getState(a),b=null!=b?b.style:this.getCellStyle(a);return"1"!=mxUtils.getValue(b,
 "part","0")&&(this.isContainer(a)||mxGraph.prototype.isValidDropTarget.apply(this,arguments)&&"0"!=mxUtils.getValue(b,"dropTarget","1"))};Graph.prototype.createGroupCell=function(){var a=mxGraph.prototype.createGroupCell.apply(this,arguments);a.setStyle("group");return a};Graph.prototype.isExtendParentsOnAdd=function(a){var b=mxGraph.prototype.isExtendParentsOnAdd.apply(this,arguments);if(b&&null!=a&&null!=this.layoutManager){var c=this.model.getParent(a);null!=c&&(c=this.layoutManager.getLayout(c),
 null!=c&&c.constructor==mxStackLayout&&(b=!1))}return b};Graph.prototype.getPreferredSizeForCell=function(a){var b=mxGraph.prototype.getPreferredSizeForCell.apply(this,arguments);null!=b&&(b.width+=10,b.height+=4,this.gridEnabled&&(b.width=this.snap(b.width),b.height=this.snap(b.height)));return b};Graph.prototype.turnShapes=function(a){var b=this.getModel(),c=[];b.beginUpdate();try{for(var d=0;d<a.length;d++){var e=a[d];if(b.isEdge(e)){var f=b.getTerminal(e,!0),g=b.getTerminal(e,!1);b.setTerminal(e,
@@ -1696,7 +1696,7 @@ c.setAttribute("target",this.linkTarget);60<b.length&&(b=b.substring(0,36)+"..."
 this.getCellAt(b.graphX,b.graphY);null!=c&&this.isSwimlane(c)&&this.hitsSwimlaneContent(c,b.graphX,b.graphY)||(b.state=this.view.getState(c),null!=b.state&&null!=b.state.shape&&(this.container.style.cursor=b.state.shape.node.style.cursor))}null==b.getState()&&this.isEnabled()&&(this.container.style.cursor="default");return b};var b=!1,c=!1,d=!1,e=this.fireMouseEvent;this.fireMouseEvent=function(a,f,g){a==mxEvent.MOUSE_DOWN&&(f=this.updateMouseEvent(f),b=this.isCellSelected(f.getCell()),c=this.isSelectionEmpty(),
 d=this.popupMenuHandler.isMenuShowing());e.apply(this,arguments)};this.popupMenuHandler.mouseUp=mxUtils.bind(this,function(a,e){this.popupMenuHandler.popupTrigger=!this.isEditing()&&this.isEnabled()&&(null==e.getState()||!e.isSource(e.getState().control))&&(this.popupMenuHandler.popupTrigger||!d&&!mxEvent.isMouseEvent(e.getEvent())&&(c&&null==e.getCell()&&this.isSelectionEmpty()||b&&this.isCellSelected(e.getCell())));mxPopupMenuHandler.prototype.mouseUp.apply(this.popupMenuHandler,arguments)})};mxCellEditor.prototype.isContentEditing=
 function(){var a=this.graph.view.getState(this.editingCell);return null!=a&&1==a.style.html};mxCellEditor.prototype.saveSelection=function(){if(window.getSelection){if(sel=window.getSelection(),sel.getRangeAt&&sel.rangeCount){for(var a=[],b=0,c=sel.rangeCount;b<c;++b)a.push(sel.getRangeAt(b));return a}}else if(document.selection&&document.selection.createRange)return document.selection.createRange();return null};mxCellEditor.prototype.restoreSelection=function(a){try{if(a)if(window.getSelection){sel=
-window.getSelection();sel.removeAllRanges();for(var b=0,c=a.length;b<c;++b)sel.addRange(a[b])}else document.selection&&a.select&&a.select()}catch(I){}};var e=mxCellRenderer.prototype.initializeLabel;mxCellRenderer.prototype.initializeLabel=function(a){null!=a.text&&(a.text.replaceLinefeeds="0"!=mxUtils.getValue(a.style,"nl2Br","1"));e.apply(this,arguments)};var f=mxConstraintHandler.prototype.update;mxConstraintHandler.prototype.update=function(a,b){this.isKeepFocusEvent(a)||!mxEvent.isAltDown(a.getEvent())?
+window.getSelection();sel.removeAllRanges();for(var b=0,c=a.length;b<c;++b)sel.addRange(a[b])}else document.selection&&a.select&&a.select()}catch(J){}};var e=mxCellRenderer.prototype.initializeLabel;mxCellRenderer.prototype.initializeLabel=function(a){null!=a.text&&(a.text.replaceLinefeeds="0"!=mxUtils.getValue(a.style,"nl2Br","1"));e.apply(this,arguments)};var f=mxConstraintHandler.prototype.update;mxConstraintHandler.prototype.update=function(a,b){this.isKeepFocusEvent(a)||!mxEvent.isAltDown(a.getEvent())?
 f.apply(this,arguments):this.reset()};mxGuide.prototype.createGuideShape=function(a){return new mxPolyline([],mxConstants.GUIDE_COLOR,mxConstants.GUIDE_STROKEWIDTH)};mxCellEditor.prototype.escapeCancelsEditing=!1;var g=mxCellEditor.prototype.startEditing;mxCellEditor.prototype.startEditing=function(a,b){g.apply(this,arguments);var c=this.graph.view.getState(a);this.textarea.className=null!=c&&1==c.style.html?"mxCellEditor geContentEditable":"mxCellEditor mxPlainTextEditor";this.codeViewMode=!1;this.switchSelectionState=
 null;this.graph.setSelectionCell(a);var c=this.graph.getModel().getParent(a),d=this.graph.getCellGeometry(a);this.graph.getModel().isEdge(c)&&null!=d&&d.relative||this.graph.getModel().isEdge(a)?mxClient.IS_QUIRKS?this.textarea.style.border="gray dotted 1px":this.textarea.style.outline=mxClient.IS_IE||mxClient.IS_IE11||mxClient.IS_FF&&mxClient.IS_WIN?"gray dotted 1px":"":mxClient.IS_QUIRKS&&(this.textarea.style.outline="none",this.textarea.style.border="")};var h=mxCellEditor.prototype.installListeners;
 mxCellEditor.prototype.installListeners=function(a){function b(a,c){c.originalNode=a;a=a.firstChild;for(var d=c.firstChild;null!=a&&null!=d;)b(a,d),a=a.nextSibling,d=d.nextSibling;return c}function c(a,b){if(null!=a)if(b.originalNode!=a)d(a);else for(a=a.firstChild,b=b.firstChild;null!=a;){var e=a.nextSibling;null==b?d(a):(c(a,b),b=b.nextSibling);a=e}}function d(a){for(var b=a.firstChild;null!=b;){var c=b.nextSibling;d(b);b=c}1==a.nodeType&&("BR"===a.nodeName||null!=a.firstChild)||3==a.nodeType&&
@@ -1738,14 +1738,14 @@ e,this.graph.getDefaultParent(),!0,!0),c=0;c<h.length;c++)if(this.graph.isCellMo
 d=mxUtils.getOffset(this.graph.container);c.x-=d.x;c.y-=d.y;var d=b.getX()+c.x,c=b.getY()+c.y,e=this.first.x-d,f=this.first.y-c,g=this.graph.tolerance;if(null!=this.div||Math.abs(e)>g||Math.abs(f)>g)null==this.div&&(this.div=this.createShape()),mxUtils.clearSelection(),this.update(d,c),this.isSpaceEvent(b)?(d=this.x+this.width,c=this.y+this.height,e=this.graph.view.scale,mxEvent.isAltDown(b.getEvent())||(this.width=this.graph.snap(this.width/e)*e,this.height=this.graph.snap(this.height/e)*e,this.graph.isGridEnabled()||
 (this.width<this.graph.tolerance&&(this.width=0),this.height<this.graph.tolerance&&(this.height=0)),this.x<this.first.x&&(this.x=d-this.width),this.y<this.first.y&&(this.y=c-this.height)),this.div.style.borderStyle="dashed",this.div.style.backgroundColor="white",this.div.style.left=this.x+"px",this.div.style.top=this.y+"px",this.div.style.width=Math.max(0,this.width)+"px",this.div.style.height=this.graph.container.clientHeight+"px",this.div.style.borderWidth=0>=this.width?"0px 1px 0px 0px":"0px 1px 0px 1px",
 null==this.secondDiv&&(this.secondDiv=this.div.cloneNode(!0),this.div.parentNode.appendChild(this.secondDiv)),this.secondDiv.style.left=this.x+"px",this.secondDiv.style.top=this.y+"px",this.secondDiv.style.width=this.graph.container.clientWidth+"px",this.secondDiv.style.height=Math.max(0,this.height)+"px",this.secondDiv.style.borderWidth=0>=this.height?"1px 0px 0px 0px":"1px 0px 1px 0px"):(this.div.style.backgroundColor="",this.div.style.borderWidth="",this.div.style.borderStyle="",null!=this.secondDiv&&
-(this.secondDiv.parentNode.removeChild(this.secondDiv),this.secondDiv=null)),b.consume()}};var q=mxRubberband.prototype.reset;mxRubberband.prototype.reset=function(){null!=this.secondDiv&&(this.secondDiv.parentNode.removeChild(this.secondDiv),this.secondDiv=null);q.apply(this,arguments)};var t=(new Date).getTime(),y=0,x=mxEdgeHandler.prototype.updatePreviewState;mxEdgeHandler.prototype.updatePreviewState=function(a,b,c,d){x.apply(this,arguments);c!=this.currentTerminalState?(t=(new Date).getTime(),
-y=0):y=(new Date).getTime()-t;this.currentTerminalState=c};var w=mxEdgeHandler.prototype.isOutlineConnectEvent;mxEdgeHandler.prototype.isOutlineConnectEvent=function(a){return null!=this.currentTerminalState&&a.getState()==this.currentTerminalState&&2E3<y||(null==this.currentTerminalState||"0"!=mxUtils.getValue(this.currentTerminalState.style,"outlineConnect","1"))&&w.apply(this,arguments)};mxVertexHandler.prototype.isCustomHandleEvent=function(a){return!mxEvent.isShiftDown(a.getEvent())};mxEdgeHandler.prototype.createHandleShape=
+(this.secondDiv.parentNode.removeChild(this.secondDiv),this.secondDiv=null)),b.consume()}};var q=mxRubberband.prototype.reset;mxRubberband.prototype.reset=function(){null!=this.secondDiv&&(this.secondDiv.parentNode.removeChild(this.secondDiv),this.secondDiv=null);q.apply(this,arguments)};var t=(new Date).getTime(),z=0,w=mxEdgeHandler.prototype.updatePreviewState;mxEdgeHandler.prototype.updatePreviewState=function(a,b,c,d){w.apply(this,arguments);c!=this.currentTerminalState?(t=(new Date).getTime(),
+z=0):z=(new Date).getTime()-t;this.currentTerminalState=c};var x=mxEdgeHandler.prototype.isOutlineConnectEvent;mxEdgeHandler.prototype.isOutlineConnectEvent=function(a){return null!=this.currentTerminalState&&a.getState()==this.currentTerminalState&&2E3<z||(null==this.currentTerminalState||"0"!=mxUtils.getValue(this.currentTerminalState.style,"outlineConnect","1"))&&x.apply(this,arguments)};mxVertexHandler.prototype.isCustomHandleEvent=function(a){return!mxEvent.isShiftDown(a.getEvent())};mxEdgeHandler.prototype.createHandleShape=
 function(a,b){var c=null!=a&&0==a,d=this.state.getVisibleTerminalState(c),e=null!=a&&(0==a||a>=this.state.absolutePoints.length-1||this.constructor==mxElbowEdgeHandler&&2==a)?this.graph.getConnectionConstraint(this.state,d,c):null,c=null!=(null!=e?this.graph.getConnectionPoint(this.state.getVisibleTerminalState(c),e):null)?this.fixedHandleImage:null!=e&&null!=d?this.terminalHandleImage:this.handleImage;if(null!=c)return c=new mxImageShape(new mxRectangle(0,0,c.width,c.height),c.src),c.preserveImageAspect=
-!1,c;c=mxConstants.HANDLE_SIZE;this.preferHtml&&--c;return new mxRectangleShape(new mxRectangle(0,0,c,c),mxConstants.HANDLE_FILLCOLOR,mxConstants.HANDLE_STROKECOLOR)};var z=mxVertexHandler.prototype.createSizerShape;mxVertexHandler.prototype.createSizerShape=function(a,b,c){this.handleImage=b==mxEvent.ROTATION_HANDLE?HoverIcons.prototype.rotationHandle:b==mxEvent.LABEL_HANDLE?this.secondaryHandleImage:this.handleImage;return z.apply(this,arguments)};var u=mxGraphHandler.prototype.getBoundingBox;mxGraphHandler.prototype.getBoundingBox=
-function(a){if(null!=a&&1==a.length){var b=this.graph.getModel(),c=b.getParent(a[0]),d=this.graph.getCellGeometry(a[0]);if(b.isEdge(c)&&null!=d&&d.relative&&(b=this.graph.view.getState(a[0]),null!=b&&2>b.width&&2>b.height&&null!=b.text&&null!=b.text.boundingBox))return mxRectangle.fromRectangle(b.text.boundingBox)}return u.apply(this,arguments)};var F=mxVertexHandler.prototype.getSelectionBounds;mxVertexHandler.prototype.getSelectionBounds=function(a){var b=this.graph.getModel(),c=b.getParent(a.cell),
-d=this.graph.getCellGeometry(a.cell);return b.isEdge(c)&&null!=d&&d.relative&&2>a.width&&2>a.height&&null!=a.text&&null!=a.text.boundingBox?(b=a.text.unrotatedBoundingBox||a.text.boundingBox,new mxRectangle(Math.round(b.x),Math.round(b.y),Math.round(b.width),Math.round(b.height))):F.apply(this,arguments)};var E=mxVertexHandler.prototype.mouseDown;mxVertexHandler.prototype.mouseDown=function(a,b){var c=this.graph.getModel(),d=c.getParent(this.state.cell),e=this.graph.getCellGeometry(this.state.cell);
-(this.getHandleForEvent(b)==mxEvent.ROTATION_HANDLE||!c.isEdge(d)||null==e||!e.relative||null==this.state||2<=this.state.width||2<=this.state.height)&&E.apply(this,arguments)};mxVertexHandler.prototype.isRotationHandleVisible=function(){return this.graph.isEnabled()&&this.rotationEnabled&&this.graph.isCellRotatable(this.state.cell)&&(0>=mxGraphHandler.prototype.maxCells||this.graph.getSelectionCount()<mxGraphHandler.prototype.maxCells)};mxVertexHandler.prototype.rotateClick=function(){this.state.view.graph.turnShapes([this.state.cell])};
-var D=mxVertexHandler.prototype.mouseMove;mxVertexHandler.prototype.mouseMove=function(a,b){D.apply(this,arguments);null!=this.graph.graphHandler.first&&null!=this.rotationShape&&null!=this.rotationShape.node&&(this.rotationShape.node.style.display="none")};var C=mxVertexHandler.prototype.mouseUp;mxVertexHandler.prototype.mouseUp=function(a,b){C.apply(this,arguments);null!=this.rotationShape&&null!=this.rotationShape.node&&(this.rotationShape.node.style.display=1==this.graph.getSelectionCount()?"":
+!1,c;c=mxConstants.HANDLE_SIZE;this.preferHtml&&--c;return new mxRectangleShape(new mxRectangle(0,0,c,c),mxConstants.HANDLE_FILLCOLOR,mxConstants.HANDLE_STROKECOLOR)};var y=mxVertexHandler.prototype.createSizerShape;mxVertexHandler.prototype.createSizerShape=function(a,b,c){this.handleImage=b==mxEvent.ROTATION_HANDLE?HoverIcons.prototype.rotationHandle:b==mxEvent.LABEL_HANDLE?this.secondaryHandleImage:this.handleImage;return y.apply(this,arguments)};var u=mxGraphHandler.prototype.getBoundingBox;mxGraphHandler.prototype.getBoundingBox=
+function(a){if(null!=a&&1==a.length){var b=this.graph.getModel(),c=b.getParent(a[0]),d=this.graph.getCellGeometry(a[0]);if(b.isEdge(c)&&null!=d&&d.relative&&(b=this.graph.view.getState(a[0]),null!=b&&2>b.width&&2>b.height&&null!=b.text&&null!=b.text.boundingBox))return mxRectangle.fromRectangle(b.text.boundingBox)}return u.apply(this,arguments)};var D=mxVertexHandler.prototype.getSelectionBounds;mxVertexHandler.prototype.getSelectionBounds=function(a){var b=this.graph.getModel(),c=b.getParent(a.cell),
+d=this.graph.getCellGeometry(a.cell);return b.isEdge(c)&&null!=d&&d.relative&&2>a.width&&2>a.height&&null!=a.text&&null!=a.text.boundingBox?(b=a.text.unrotatedBoundingBox||a.text.boundingBox,new mxRectangle(Math.round(b.x),Math.round(b.y),Math.round(b.width),Math.round(b.height))):D.apply(this,arguments)};var F=mxVertexHandler.prototype.mouseDown;mxVertexHandler.prototype.mouseDown=function(a,b){var c=this.graph.getModel(),d=c.getParent(this.state.cell),e=this.graph.getCellGeometry(this.state.cell);
+(this.getHandleForEvent(b)==mxEvent.ROTATION_HANDLE||!c.isEdge(d)||null==e||!e.relative||null==this.state||2<=this.state.width||2<=this.state.height)&&F.apply(this,arguments)};mxVertexHandler.prototype.isRotationHandleVisible=function(){return this.graph.isEnabled()&&this.rotationEnabled&&this.graph.isCellRotatable(this.state.cell)&&(0>=mxGraphHandler.prototype.maxCells||this.graph.getSelectionCount()<mxGraphHandler.prototype.maxCells)};mxVertexHandler.prototype.rotateClick=function(){this.state.view.graph.turnShapes([this.state.cell])};
+var E=mxVertexHandler.prototype.mouseMove;mxVertexHandler.prototype.mouseMove=function(a,b){E.apply(this,arguments);null!=this.graph.graphHandler.first&&null!=this.rotationShape&&null!=this.rotationShape.node&&(this.rotationShape.node.style.display="none")};var C=mxVertexHandler.prototype.mouseUp;mxVertexHandler.prototype.mouseUp=function(a,b){C.apply(this,arguments);null!=this.rotationShape&&null!=this.rotationShape.node&&(this.rotationShape.node.style.display=1==this.graph.getSelectionCount()?"":
 "none")};var G=mxVertexHandler.prototype.init;mxVertexHandler.prototype.init=function(){G.apply(this,arguments);var a=!1;null!=this.rotationShape&&this.rotationShape.node.setAttribute("title",mxResources.get("rotateTooltip"));var b=mxUtils.bind(this,function(){null!=this.rotationShape&&null!=this.rotationShape.node&&(this.rotationShape.node.style.display=1==this.graph.getSelectionCount()?"":"none");null!=this.specialHandle&&(this.specialHandle.node.style.display=this.graph.isEnabled()&&this.graph.getSelectionCount()<
 this.graph.graphHandler.maxCells?"":"none");this.redrawHandles()});this.selectionHandler=mxUtils.bind(this,function(a,c){b()});this.graph.getSelectionModel().addListener(mxEvent.CHANGE,this.selectionHandler);this.changeHandler=mxUtils.bind(this,function(a,c){this.updateLinkHint(this.graph.getLinkForCell(this.state.cell),this.graph.getLinksForState(this.state));b()});this.graph.getModel().addListener(mxEvent.CHANGE,this.changeHandler);this.editingHandler=mxUtils.bind(this,function(a,b){this.redrawHandles()});
 this.graph.addListener(mxEvent.EDITING_STOPPED,this.editingHandler);var c=this.graph.getLinkForCell(this.state.cell),d=this.graph.getLinksForState(this.state);this.updateLinkHint(c,d);if(null!=c||null!=d&&0<d.length)a=!0;a&&this.redrawHandles()};mxVertexHandler.prototype.updateLinkHint=function(b,c){if(null==b&&(null==c||0==c.length)||1<this.graph.getSelectionCount())null!=this.linkHint&&(this.linkHint.parentNode.removeChild(this.linkHint),this.linkHint=null);else if(null!=b||null!=c&&0<c.length){null==
@@ -1753,20 +1753,20 @@ this.linkHint&&(this.linkHint=a(),this.linkHint.style.padding="6px 8px 6px 8px",
 d.setAttribute("width","11");d.setAttribute("height","11");d.style.marginLeft="10px";d.style.marginBottom="-1px";d.style.cursor="pointer";this.linkHint.appendChild(d);mxEvent.addListener(d,"click",mxUtils.bind(this,function(a){this.graph.setSelectionCell(this.state.cell);this.graph.editLink();mxEvent.consume(a)}))}if(null!=c)for(d=0;d<c.length;d++){var e=document.createElement("div");e.style.marginTop=null!=b||0<d?"6px":"0px";e.appendChild(this.graph.createLinkForHint(c[d].getAttribute("href"),mxUtils.getTextContent(c[d])));
 this.linkHint.appendChild(e)}}};mxEdgeHandler.prototype.updateLinkHint=mxVertexHandler.prototype.updateLinkHint;var B=mxEdgeHandler.prototype.init;mxEdgeHandler.prototype.init=function(){B.apply(this,arguments);this.constraintHandler.isEnabled=mxUtils.bind(this,function(){return this.state.view.graph.connectionHandler.isEnabled()});var a=mxUtils.bind(this,function(){null!=this.linkHint&&(this.linkHint.style.display=1==this.graph.getSelectionCount()?"":"none");null!=this.labelShape&&(this.labelShape.node.style.display=
 this.graph.isEnabled()&&this.graph.getSelectionCount()<this.graph.graphHandler.maxCells?"":"none")});this.selectionHandler=mxUtils.bind(this,function(b,c){a()});this.graph.getSelectionModel().addListener(mxEvent.CHANGE,this.selectionHandler);this.changeHandler=mxUtils.bind(this,function(b,c){this.updateLinkHint(this.graph.getLinkForCell(this.state.cell),this.graph.getLinksForState(this.state));a();this.redrawHandles()});this.graph.getModel().addListener(mxEvent.CHANGE,this.changeHandler);var b=this.graph.getLinkForCell(this.state.cell),
-c=this.graph.getLinksForState(this.state);if(null!=b||null!=c&&0<c.length)this.updateLinkHint(b,c),this.redrawHandles()};var M=mxConnectionHandler.prototype.init;mxConnectionHandler.prototype.init=function(){M.apply(this,arguments);this.constraintHandler.isEnabled=mxUtils.bind(this,function(){return this.graph.connectionHandler.isEnabled()})};var K=mxVertexHandler.prototype.redrawHandles;mxVertexHandler.prototype.redrawHandles=function(){K.apply(this);if(null!=this.state&&null!=this.linkHint){var a=
+c=this.graph.getLinksForState(this.state);if(null!=b||null!=c&&0<c.length)this.updateLinkHint(b,c),this.redrawHandles()};var M=mxConnectionHandler.prototype.init;mxConnectionHandler.prototype.init=function(){M.apply(this,arguments);this.constraintHandler.isEnabled=mxUtils.bind(this,function(){return this.graph.connectionHandler.isEnabled()})};var L=mxVertexHandler.prototype.redrawHandles;mxVertexHandler.prototype.redrawHandles=function(){L.apply(this);if(null!=this.state&&null!=this.linkHint){var a=
 new mxPoint(this.state.getCenterX(),this.state.getCenterY()),b=new mxRectangle(this.state.x,this.state.y-22,this.state.width+24,this.state.height+22),c=mxUtils.getBoundingBox(b,this.state.style[mxConstants.STYLE_ROTATION]||"0",a),a=null!=c?mxUtils.getBoundingBox(this.state,this.state.style[mxConstants.STYLE_ROTATION]||"0"):this.state,b=null!=this.state.text?this.state.text.boundingBox:null;null==c&&(c=this.state);c=c.y+c.height;null!=b&&(c=Math.max(c,b.y+b.height));this.linkHint.style.left=Math.round(a.x+
-(a.width-this.linkHint.clientWidth)/2)+"px";this.linkHint.style.top=Math.round(c+this.verticalOffset/2+6+this.state.view.graph.tolerance)+"px"}};var L=mxVertexHandler.prototype.reset;mxVertexHandler.prototype.reset=function(){L.apply(this,arguments);null!=this.rotationShape&&null!=this.rotationShape.node&&(this.rotationShape.node.style.display=1==this.graph.getSelectionCount()?"":"none")};var V=mxVertexHandler.prototype.destroy;mxVertexHandler.prototype.destroy=function(){V.apply(this,arguments);
+(a.width-this.linkHint.clientWidth)/2)+"px";this.linkHint.style.top=Math.round(c+this.verticalOffset/2+6+this.state.view.graph.tolerance)+"px"}};var H=mxVertexHandler.prototype.reset;mxVertexHandler.prototype.reset=function(){H.apply(this,arguments);null!=this.rotationShape&&null!=this.rotationShape.node&&(this.rotationShape.node.style.display=1==this.graph.getSelectionCount()?"":"none")};var U=mxVertexHandler.prototype.destroy;mxVertexHandler.prototype.destroy=function(){U.apply(this,arguments);
 null!=this.linkHint&&(this.linkHint.parentNode.removeChild(this.linkHint),this.linkHint=null);null!=this.selectionHandler&&(this.graph.getSelectionModel().removeListener(this.selectionHandler),this.selectionHandler=null);null!=this.changeHandler&&(this.graph.getModel().removeListener(this.changeHandler),this.changeHandler=null);null!=this.editingHandler&&(this.graph.removeListener(this.editingHandler),this.editingHandler=null)};var S=mxEdgeHandler.prototype.redrawHandles;mxEdgeHandler.prototype.redrawHandles=
-function(){if(null!=this.marker&&(S.apply(this),null!=this.state&&null!=this.linkHint)){var a=this.state;null!=this.state.text&&null!=this.state.text.bounds&&(a=new mxRectangle(a.x,a.y,a.width,a.height),a.add(this.state.text.bounds));this.linkHint.style.left=Math.round(a.x+(a.width-this.linkHint.clientWidth)/2)+"px";this.linkHint.style.top=Math.round(a.y+a.height+6+this.state.view.graph.tolerance)+"px"}};var Z=mxEdgeHandler.prototype.reset;mxEdgeHandler.prototype.reset=function(){Z.apply(this,arguments);
+function(){if(null!=this.marker&&(S.apply(this),null!=this.state&&null!=this.linkHint)){var a=this.state;null!=this.state.text&&null!=this.state.text.bounds&&(a=new mxRectangle(a.x,a.y,a.width,a.height),a.add(this.state.text.bounds));this.linkHint.style.left=Math.round(a.x+(a.width-this.linkHint.clientWidth)/2)+"px";this.linkHint.style.top=Math.round(a.y+a.height+6+this.state.view.graph.tolerance)+"px"}};var ba=mxEdgeHandler.prototype.reset;mxEdgeHandler.prototype.reset=function(){ba.apply(this,arguments);
 null!=this.linkHint&&(this.linkHint.style.visibility="")};var A=mxEdgeHandler.prototype.destroy;mxEdgeHandler.prototype.destroy=function(){A.apply(this,arguments);null!=this.linkHint&&(this.linkHint.parentNode.removeChild(this.linkHint),this.linkHint=null);null!=this.selectionHandler&&(this.graph.getSelectionModel().removeListener(this.selectionHandler),this.selectionHandler=null);null!=this.changeHandler&&(this.graph.getModel().removeListener(this.changeHandler),this.changeHandler=null)}}();(function(){function a(){mxCylinder.call(this)}function b(){mxActor.call(this)}function c(){mxCylinder.call(this)}function d(){mxCylinder.call(this)}function e(){mxCylinder.call(this)}function f(){mxActor.call(this)}function g(){mxCylinder.call(this)}function h(){mxActor.call(this)}function k(){mxActor.call(this)}function l(){mxActor.call(this)}function m(){mxActor.call(this)}function n(){mxActor.call(this)}function p(){mxActor.call(this)}function r(){mxActor.call(this)}function q(a,b){this.canvas=
 a;this.canvas.setLineJoin("round");this.canvas.setLineCap("round");this.defaultVariation=b;this.originalLineTo=this.canvas.lineTo;this.canvas.lineTo=mxUtils.bind(this,q.prototype.lineTo);this.originalMoveTo=this.canvas.moveTo;this.canvas.moveTo=mxUtils.bind(this,q.prototype.moveTo);this.originalClose=this.canvas.close;this.canvas.close=mxUtils.bind(this,q.prototype.close);this.originalQuadTo=this.canvas.quadTo;this.canvas.quadTo=mxUtils.bind(this,q.prototype.quadTo);this.originalCurveTo=this.canvas.curveTo;
-this.canvas.curveTo=mxUtils.bind(this,q.prototype.curveTo);this.originalArcTo=this.canvas.arcTo;this.canvas.arcTo=mxUtils.bind(this,q.prototype.arcTo)}function t(){mxRectangleShape.call(this)}function y(){mxActor.call(this)}function x(){mxActor.call(this)}function w(){mxActor.call(this)}function z(){mxRectangleShape.call(this)}function u(){mxRectangleShape.call(this)}function F(){mxCylinder.call(this)}function E(){mxShape.call(this)}function D(){mxShape.call(this)}function C(){mxEllipse.call(this)}
-function G(){mxShape.call(this)}function B(){mxShape.call(this)}function M(){mxRectangleShape.call(this)}function K(){mxShape.call(this)}function L(){mxShape.call(this)}function V(){mxShape.call(this)}function S(){mxCylinder.call(this)}function Z(){mxDoubleEllipse.call(this)}function A(){mxDoubleEllipse.call(this)}function v(){mxArrowConnector.call(this);this.spacing=0}function R(){mxArrowConnector.call(this);this.spacing=0}function J(){mxActor.call(this)}function I(){mxRectangleShape.call(this)}
-function aa(){mxActor.call(this)}function N(){mxActor.call(this)}function H(){mxActor.call(this)}function U(){mxActor.call(this)}function ba(){mxActor.call(this)}function ea(){mxActor.call(this)}function ca(){mxActor.call(this)}function P(){mxActor.call(this)}function T(){mxActor.call(this)}function W(){mxActor.call(this)}function O(){mxEllipse.call(this)}function Q(){mxEllipse.call(this)}function fa(){mxEllipse.call(this)}function X(){mxRhombus.call(this)}function Y(){mxEllipse.call(this)}function va(){mxEllipse.call(this)}
-function wa(){mxEllipse.call(this)}function pa(){mxEllipse.call(this)}function qa(){mxActor.call(this)}function ka(){mxActor.call(this)}function la(){mxActor.call(this)}function ha(){mxConnector.call(this)}function Aa(a,b,c,d,e,f,g,h,k,l){g+=k;var m=d.clone();d.x-=e*(2*g+k);d.y-=f*(2*g+k);e*=g+k;f*=g+k;return function(){a.ellipse(m.x-e-g,m.y-f-g,2*g,2*g);l?a.fillAndStroke():a.stroke()}}mxUtils.extend(a,mxCylinder);a.prototype.size=20;a.prototype.redrawPath=function(a,b,c,d,e,f){b=Math.max(0,Math.min(d,
+this.canvas.curveTo=mxUtils.bind(this,q.prototype.curveTo);this.originalArcTo=this.canvas.arcTo;this.canvas.arcTo=mxUtils.bind(this,q.prototype.arcTo)}function t(){mxRectangleShape.call(this)}function z(){mxRectangleShape.call(this)}function w(){mxActor.call(this)}function x(){mxActor.call(this)}function y(){mxActor.call(this)}function u(){mxRectangleShape.call(this)}function D(){mxRectangleShape.call(this)}function F(){mxCylinder.call(this)}function E(){mxShape.call(this)}function C(){mxShape.call(this)}
+function G(){mxEllipse.call(this)}function B(){mxShape.call(this)}function M(){mxShape.call(this)}function L(){mxRectangleShape.call(this)}function H(){mxShape.call(this)}function U(){mxShape.call(this)}function S(){mxShape.call(this)}function ba(){mxCylinder.call(this)}function A(){mxDoubleEllipse.call(this)}function v(){mxDoubleEllipse.call(this)}function R(){mxArrowConnector.call(this);this.spacing=0}function I(){mxArrowConnector.call(this);this.spacing=0}function J(){mxActor.call(this)}function ca(){mxRectangleShape.call(this)}
+function N(){mxActor.call(this)}function K(){mxActor.call(this)}function X(){mxActor.call(this)}function T(){mxActor.call(this)}function ea(){mxActor.call(this)}function aa(){mxActor.call(this)}function P(){mxActor.call(this)}function V(){mxActor.call(this)}function W(){mxActor.call(this)}function O(){mxActor.call(this)}function Q(){mxEllipse.call(this)}function fa(){mxEllipse.call(this)}function Y(){mxEllipse.call(this)}function Z(){mxRhombus.call(this)}function ua(){mxEllipse.call(this)}function va(){mxEllipse.call(this)}
+function wa(){mxEllipse.call(this)}function pa(){mxEllipse.call(this)}function qa(){mxActor.call(this)}function ma(){mxActor.call(this)}function ia(){mxActor.call(this)}function ja(){mxConnector.call(this)}function Aa(a,b,c,d,e,f,g,h,k,l){g+=k;var m=d.clone();d.x-=e*(2*g+k);d.y-=f*(2*g+k);e*=g+k;f*=g+k;return function(){a.ellipse(m.x-e-g,m.y-f-g,2*g,2*g);l?a.fillAndStroke():a.stroke()}}mxUtils.extend(a,mxCylinder);a.prototype.size=20;a.prototype.redrawPath=function(a,b,c,d,e,f){b=Math.max(0,Math.min(d,
 Math.min(e,parseFloat(mxUtils.getValue(this.style,"size",this.size)))));f?(a.moveTo(b,e),a.lineTo(b,b),a.lineTo(0,0),a.moveTo(b,b),a.lineTo(d,b)):(a.moveTo(0,0),a.lineTo(d-b,0),a.lineTo(d,b),a.lineTo(d,e),a.lineTo(b,e),a.lineTo(0,e-b),a.lineTo(0,0),a.close());a.end()};a.prototype.getLabelMargins=function(a){return mxUtils.getValue(this.style,"boundedLbl",!1)?(a=parseFloat(mxUtils.getValue(this.style,"size",this.size))*this.scale,new mxRectangle(a,a,0,0)):null};mxCellRenderer.prototype.defaultShapes.cube=
-a;var xa=Math.tan(mxUtils.toRadians(30)),ja=(.5-xa)/2;mxUtils.extend(b,mxActor);b.prototype.size=20;b.prototype.redrawPath=function(a,b,c,d,e){b=Math.min(d,e/xa);a.translate((d-b)/2,(e-b)/2+b/4);a.moveTo(0,.25*b);a.lineTo(.5*b,b*ja);a.lineTo(b,.25*b);a.lineTo(.5*b,(.5-ja)*b);a.lineTo(0,.25*b);a.close();a.end()};mxCellRenderer.prototype.defaultShapes.isoRectangle=b;mxUtils.extend(c,mxCylinder);c.prototype.size=20;c.prototype.redrawPath=function(a,b,c,d,e,f){b=Math.min(d,e/(.5+xa));f?(a.moveTo(0,.25*
-b),a.lineTo(.5*b,(.5-ja)*b),a.lineTo(b,.25*b),a.moveTo(.5*b,(.5-ja)*b),a.lineTo(.5*b,(1-ja)*b)):(a.translate((d-b)/2,(e-b)/2),a.moveTo(0,.25*b),a.lineTo(.5*b,b*ja),a.lineTo(b,.25*b),a.lineTo(b,.75*b),a.lineTo(.5*b,(1-ja)*b),a.lineTo(0,.75*b),a.close());a.end()};mxCellRenderer.prototype.defaultShapes.isoCube=c;mxUtils.extend(d,mxCylinder);d.prototype.redrawPath=function(a,b,c,d,e,f){b=Math.min(e/2,Math.round(e/8)+this.strokewidth-1);if(f&&null!=this.fill||!f&&null==this.fill)a.moveTo(0,b),a.curveTo(0,
+a;var xa=Math.tan(mxUtils.toRadians(30)),ka=(.5-xa)/2;mxUtils.extend(b,mxActor);b.prototype.size=20;b.prototype.redrawPath=function(a,b,c,d,e){b=Math.min(d,e/xa);a.translate((d-b)/2,(e-b)/2+b/4);a.moveTo(0,.25*b);a.lineTo(.5*b,b*ka);a.lineTo(b,.25*b);a.lineTo(.5*b,(.5-ka)*b);a.lineTo(0,.25*b);a.close();a.end()};mxCellRenderer.prototype.defaultShapes.isoRectangle=b;mxUtils.extend(c,mxCylinder);c.prototype.size=20;c.prototype.redrawPath=function(a,b,c,d,e,f){b=Math.min(d,e/(.5+xa));f?(a.moveTo(0,.25*
+b),a.lineTo(.5*b,(.5-ka)*b),a.lineTo(b,.25*b),a.moveTo(.5*b,(.5-ka)*b),a.lineTo(.5*b,(1-ka)*b)):(a.translate((d-b)/2,(e-b)/2),a.moveTo(0,.25*b),a.lineTo(.5*b,b*ka),a.lineTo(b,.25*b),a.lineTo(b,.75*b),a.lineTo(.5*b,(1-ka)*b),a.lineTo(0,.75*b),a.close());a.end()};mxCellRenderer.prototype.defaultShapes.isoCube=c;mxUtils.extend(d,mxCylinder);d.prototype.redrawPath=function(a,b,c,d,e,f){b=Math.min(e/2,Math.round(e/8)+this.strokewidth-1);if(f&&null!=this.fill||!f&&null==this.fill)a.moveTo(0,b),a.curveTo(0,
 2*b,d,2*b,d,b),f||(a.stroke(),a.begin()),a.translate(0,b/2),a.moveTo(0,b),a.curveTo(0,2*b,d,2*b,d,b),f||(a.stroke(),a.begin()),a.translate(0,b/2),a.moveTo(0,b),a.curveTo(0,2*b,d,2*b,d,b),f||(a.stroke(),a.begin()),a.translate(0,-b);f||(a.moveTo(0,b),a.curveTo(0,-b/3,d,-b/3,d,b),a.lineTo(d,e-b),a.curveTo(d,e+b/3,0,e+b/3,0,e-b),a.close())};d.prototype.getLabelMargins=function(a){return new mxRectangle(0,2.5*Math.min(a.height/2,Math.round(a.height/8)+this.strokewidth-1)*this.scale,0,0)};mxCellRenderer.prototype.defaultShapes.datastore=
 d;mxUtils.extend(e,mxCylinder);e.prototype.size=30;e.prototype.redrawPath=function(a,b,c,d,e,f){b=Math.max(0,Math.min(d,Math.min(e,parseFloat(mxUtils.getValue(this.style,"size",this.size)))));f?(a.moveTo(d-b,0),a.lineTo(d-b,b),a.lineTo(d,b)):(a.moveTo(0,0),a.lineTo(d-b,0),a.lineTo(d,b),a.lineTo(d,e),a.lineTo(0,e),a.lineTo(0,0),a.close());a.end()};mxCellRenderer.prototype.defaultShapes.note=e;mxUtils.extend(f,mxActor);f.prototype.redrawPath=function(a,b,c,d,e){a.moveTo(0,0);a.quadTo(d/2,.5*e,d,0);
 a.quadTo(.5*d,e/2,d,e);a.quadTo(d/2,.5*e,0,e);a.quadTo(.5*d,e/2,0,0);a.end()};mxCellRenderer.prototype.defaultShapes["switch"]=f;mxUtils.extend(g,mxCylinder);g.prototype.tabWidth=60;g.prototype.tabHeight=20;g.prototype.tabPosition="right";g.prototype.redrawPath=function(a,b,c,d,e,f){b=Math.max(0,Math.min(d,parseFloat(mxUtils.getValue(this.style,"tabWidth",this.tabWidth))));c=Math.max(0,Math.min(e,parseFloat(mxUtils.getValue(this.style,"tabHeight",this.tabHeight))));var g=mxUtils.getValue(this.style,
@@ -1781,125 +1781,126 @@ e/2),new mxPoint(b,e/2),new mxPoint(b,e),new mxPoint(d,e)],this.isRounded,c,!1);
 this.lastX=a;this.lastY=b;this.firstX=a;this.firstY=b};q.prototype.close=function(){null!=this.firstX&&null!=this.firstY&&(this.lineTo(this.firstX,this.firstY),this.originalClose.apply(this.canvas,arguments));this.originalClose.apply(this.canvas,arguments)};q.prototype.quadTo=function(a,b,c,d){this.originalQuadTo.apply(this.canvas,arguments);this.lastX=c;this.lastY=d};q.prototype.curveTo=function(a,b,c,d,e,f){this.originalCurveTo.apply(this.canvas,arguments);this.lastX=e;this.lastY=f};q.prototype.arcTo=
 function(a,b,c,d,e,f,g){this.originalArcTo.apply(this.canvas,arguments);this.lastX=f;this.lastY=g};q.prototype.lineTo=function(a,b){if(null!=this.lastX&&null!=this.lastY){var c=function(a){return"number"===typeof a?a?0>a?-1:1:a===a?0:NaN:NaN},d=Math.abs(a-this.lastX),e=Math.abs(b-this.lastY),f=Math.sqrt(d*d+e*e);if(2>f){this.originalLineTo.apply(this.canvas,arguments);this.lastX=a;this.lastY=b;return}var g=Math.round(f/10),h=this.defaultVariation;5>g&&(g=5,h/=3);for(var k=c(a-this.lastX)*d/g,c=c(b-
 this.lastY)*e/g,d=d/f,e=e/f,f=0;f<g;f++){var l=(Math.random()-.5)*h;this.originalLineTo.call(this.canvas,k*f+this.lastX-l*e,c*f+this.lastY-l*d)}this.originalLineTo.call(this.canvas,a,b)}else this.originalLineTo.apply(this.canvas,arguments);this.lastX=a;this.lastY=b};q.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};var Da=mxShape.prototype.paint;mxShape.prototype.defaultJiggle=1.5;mxShape.prototype.paint=function(a){null!=this.style&&"0"!=mxUtils.getValue(this.style,"comic","0")&&null==a.handHiggle&&(a.handJiggle=new q(a,mxUtils.getValue(this.style,"jiggle",this.defaultJiggle)));Da.apply(this,arguments);null!=a.handJiggle&&(a.handJiggle.destroy(),delete a.handJiggle)};mxRhombus.prototype.defaultJiggle=2;var Ea=mxRectangleShape.prototype.isHtmlAllowed;mxRectangleShape.prototype.isHtmlAllowed=
-function(){return(null==this.style||"0"==mxUtils.getValue(this.style,"comic","0"))&&Ea.apply(this,arguments)};var Fa=mxRectangleShape.prototype.paintBackground;mxRectangleShape.prototype.paintBackground=function(a,b,c,d,e){if(null==a.handJiggle)Fa.apply(this,arguments);else{var f=!0;null!=this.style&&(f="1"==mxUtils.getValue(this.style,mxConstants.STYLE_POINTER_EVENTS,"1"));if(f||null!=this.fill&&this.fill!=mxConstants.NONE||null!=this.stroke&&this.stroke!=mxConstants.NONE)f||null!=this.fill&&this.fill!=
+this.originalArcTo};var Ea=mxShape.prototype.paint;mxShape.prototype.defaultJiggle=1.5;mxShape.prototype.paint=function(a){null!=this.style&&"0"!=mxUtils.getValue(this.style,"comic","0")&&null==a.handHiggle&&(a.handJiggle=new q(a,mxUtils.getValue(this.style,"jiggle",this.defaultJiggle)));Ea.apply(this,arguments);null!=a.handJiggle&&(a.handJiggle.destroy(),delete a.handJiggle)};mxRhombus.prototype.defaultJiggle=2;var Fa=mxRectangleShape.prototype.isHtmlAllowed;mxRectangleShape.prototype.isHtmlAllowed=
+function(){return(null==this.style||"0"==mxUtils.getValue(this.style,"comic","0"))&&Fa.apply(this,arguments)};var Ga=mxRectangleShape.prototype.paintBackground;mxRectangleShape.prototype.paintBackground=function(a,b,c,d,e){if(null==a.handJiggle)Ga.apply(this,arguments);else{var f=!0;null!=this.style&&(f="1"==mxUtils.getValue(this.style,mxConstants.STYLE_POINTER_EVENTS,"1"));if(f||null!=this.fill&&this.fill!=mxConstants.NONE||null!=this.stroke&&this.stroke!=mxConstants.NONE)f||null!=this.fill&&this.fill!=
 mxConstants.NONE||(a.pointerEvents=!1),a.begin(),this.isRounded?("1"==mxUtils.getValue(this.style,mxConstants.STYLE_ABSOLUTE_ARCSIZE,0)?f=Math.min(d/2,Math.min(e/2,mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2)):(f=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,100*mxConstants.RECTANGLE_ROUNDING_FACTOR)/100,f=Math.min(d*f,e*f)),a.moveTo(b+f,c),a.lineTo(b+d-f,c),a.quadTo(b+d,c,b+d,c+f),a.lineTo(b+d,c+e-f),a.quadTo(b+d,c+e,b+d-f,c+e),a.lineTo(b+f,c+e),a.quadTo(b,
-c+e,b,c+e-f),a.lineTo(b,c+f),a.quadTo(b,c,b+f,c)):(a.moveTo(b,c),a.lineTo(b+d,c),a.lineTo(b+d,c+e),a.lineTo(b,c+e),a.lineTo(b,c)),a.close(),a.end(),a.fillAndStroke()}};var Ga=mxRectangleShape.prototype.paintForeground;mxRectangleShape.prototype.paintForeground=function(a,b,c,d,e){null==a.handJiggle&&Ga.apply(this,arguments)};mxUtils.extend(t,mxRectangleShape);t.prototype.size=.1;t.prototype.isHtmlAllowed=function(){return!1};t.prototype.getLabelBounds=function(a){if(mxUtils.getValue(this.state.style,
+c+e,b,c+e-f),a.lineTo(b,c+f),a.quadTo(b,c,b+f,c)):(a.moveTo(b,c),a.lineTo(b+d,c),a.lineTo(b+d,c+e),a.lineTo(b,c+e),a.lineTo(b,c)),a.close(),a.end(),a.fillAndStroke()}};var Ha=mxRectangleShape.prototype.paintForeground;mxRectangleShape.prototype.paintForeground=function(a,b,c,d,e){null==a.handJiggle&&Ha.apply(this,arguments)};mxUtils.extend(t,mxRectangleShape);t.prototype.size=.1;t.prototype.isHtmlAllowed=function(){return!1};t.prototype.getLabelBounds=function(a){if(mxUtils.getValue(this.state.style,
 mxConstants.STYLE_HORIZONTAL,!0)==(null==this.direction||this.direction==mxConstants.DIRECTION_EAST||this.direction==mxConstants.DIRECTION_WEST)){var b=a.width,c=a.height;a=new mxRectangle(a.x,a.y,b,c);var d=b*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));if(this.isRounded)var e=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,100*mxConstants.RECTANGLE_ROUNDING_FACTOR)/100,d=Math.max(d,Math.min(b*e,c*e));a.x+=d;a.width-=2*d}return a};t.prototype.paintForeground=
-function(a,b,c,d,e){var f=d*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));if(this.isRounded)var g=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,100*mxConstants.RECTANGLE_ROUNDING_FACTOR)/100,f=Math.max(f,Math.min(d*g,e*g));a.begin();a.moveTo(b+f,c);a.lineTo(b+f,c+e);a.moveTo(b+d-f,c);a.lineTo(b+d-f,c+e);a.end();a.stroke();mxRectangleShape.prototype.paintForeground.apply(this,arguments)};mxCellRenderer.prototype.defaultShapes.process=t;mxUtils.extend(y,mxHexagon);
-y.prototype.size=30;y.prototype.position=.5;y.prototype.position2=.5;y.prototype.base=20;y.prototype.getLabelMargins=function(){return new mxRectangle(0,0,0,parseFloat(mxUtils.getValue(this.style,"size",this.size))*this.scale)};y.prototype.redrawPath=function(a,b,c,d,e){b=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;c=Math.max(0,Math.min(e,parseFloat(mxUtils.getValue(this.style,"size",this.size))));var f=d*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,
-"position",this.position)))),g=d*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"position2",this.position2)))),h=Math.max(0,Math.min(d,parseFloat(mxUtils.getValue(this.style,"base",this.base))));this.addPoints(a,[new mxPoint(0,0),new mxPoint(d,0),new mxPoint(d,e-c),new mxPoint(Math.min(d,f+h),e-c),new mxPoint(g,e),new mxPoint(Math.max(0,f),e-c),new mxPoint(0,e-c)],this.isRounded,b,!0,[4])};mxCellRenderer.prototype.defaultShapes.callout=y;mxUtils.extend(x,mxActor);x.prototype.size=.2;
-x.prototype.redrawPath=function(a,b,c,d,e){b=d*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));c=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(a,[new mxPoint(0,0),new mxPoint(d-b,0),new mxPoint(d,e/2),new mxPoint(d-b,e),new mxPoint(0,e),new mxPoint(b,e/2)],this.isRounded,c,!0);a.end()};mxCellRenderer.prototype.defaultShapes.step=x;mxUtils.extend(w,mxHexagon);w.prototype.size=.25;w.prototype.redrawPath=function(a,
-b,c,d,e){b=d*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));c=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(a,[new mxPoint(b,0),new mxPoint(d-b,0),new mxPoint(d,.5*e),new mxPoint(d-b,e),new mxPoint(b,e),new mxPoint(0,.5*e)],this.isRounded,c,!0)};mxCellRenderer.prototype.defaultShapes.hexagon=w;mxUtils.extend(z,mxRectangleShape);z.prototype.isHtmlAllowed=function(){return!1};z.prototype.paintForeground=function(a,
-b,c,d,e){var f=Math.min(d/5,e/5)+1;a.begin();a.moveTo(b+d/2,c+f);a.lineTo(b+d/2,c+e-f);a.moveTo(b+f,c+e/2);a.lineTo(b+d-f,c+e/2);a.end();a.stroke();mxRectangleShape.prototype.paintForeground.apply(this,arguments)};mxCellRenderer.prototype.defaultShapes.plus=z;var Ba=mxRhombus.prototype.paintVertexShape;mxRhombus.prototype.getLabelBounds=function(a){if(1==this.style["double"]){var b=(2*Math.max(2,this.strokewidth+1)+parseFloat(this.style[mxConstants.STYLE_MARGIN]||0))*this.scale;return new mxRectangle(a.x+
-b,a.y+b,a.width-2*b,a.height-2*b)}return a};mxRhombus.prototype.paintVertexShape=function(a,b,c,d,e){Ba.apply(this,arguments);if(!this.outline&&1==this.style["double"]){var f=2*Math.max(2,this.strokewidth+1)+parseFloat(this.style[mxConstants.STYLE_MARGIN]||0);b+=f;c+=f;d-=2*f;e-=2*f;0<d&&0<e&&(a.setShadow(!1),Ba.apply(this,[a,b,c,d,e]))}};mxUtils.extend(u,mxRectangleShape);u.prototype.isHtmlAllowed=function(){return!1};u.prototype.getLabelBounds=function(a){if(1==this.style["double"]){var b=(Math.max(2,
-this.strokewidth+1)+parseFloat(this.style[mxConstants.STYLE_MARGIN]||0))*this.scale;return new mxRectangle(a.x+b,a.y+b,a.width-2*b,a.height-2*b)}return a};u.prototype.paintForeground=function(a,b,c,d,e){if(null!=this.style){if(!this.outline&&1==this.style["double"]){var f=Math.max(2,this.strokewidth+1)+parseFloat(this.style[mxConstants.STYLE_MARGIN]||0);b+=f;c+=f;d-=2*f;e-=2*f;0<d&&0<e&&mxRectangleShape.prototype.paintBackground.apply(this,arguments)}a.setDashed(!1);var f=0,g;do{g=mxCellRenderer.prototype.defaultShapes[this.style["symbol"+
-f]];if(null!=g){var h=this.style["symbol"+f+"Align"],k=this.style["symbol"+f+"VerticalAlign"],l=this.style["symbol"+f+"Width"],m=this.style["symbol"+f+"Height"],sa=this.style["symbol"+f+"Spacing"]||0,n=this.style["symbol"+f+"VSpacing"]||sa,p=this.style["symbol"+f+"ArcSpacing"];null!=p&&(p*=this.getArcSize(d+this.strokewidth,e+this.strokewidth),sa+=p,n+=p);var p=b,q=c,p=h==mxConstants.ALIGN_CENTER?p+(d-l)/2:h==mxConstants.ALIGN_RIGHT?p+(d-l-sa):p+sa,q=k==mxConstants.ALIGN_MIDDLE?q+(e-m)/2:k==mxConstants.ALIGN_BOTTOM?
-q+(e-m-n):q+n;a.save();h=new g;h.style=this.style;g.prototype.paintVertexShape.call(h,a,p,q,l,m);a.restore()}f++}while(null!=g)}mxRectangleShape.prototype.paintForeground.apply(this,arguments)};mxCellRenderer.prototype.defaultShapes.ext=u;mxUtils.extend(F,mxCylinder);F.prototype.redrawPath=function(a,b,c,d,e,f){f?(a.moveTo(0,0),a.lineTo(d/2,e/2),a.lineTo(d,0),a.end()):(a.moveTo(0,0),a.lineTo(d,0),a.lineTo(d,e),a.lineTo(0,e),a.close())};mxCellRenderer.prototype.defaultShapes.message=F;mxUtils.extend(E,
-mxShape);E.prototype.paintBackground=function(a,b,c,d,e){a.translate(b,c);a.ellipse(d/4,0,d/2,e/4);a.fillAndStroke();a.begin();a.moveTo(d/2,e/4);a.lineTo(d/2,2*e/3);a.moveTo(d/2,e/3);a.lineTo(0,e/3);a.moveTo(d/2,e/3);a.lineTo(d,e/3);a.moveTo(d/2,2*e/3);a.lineTo(0,e);a.moveTo(d/2,2*e/3);a.lineTo(d,e);a.end();a.stroke()};mxCellRenderer.prototype.defaultShapes.umlActor=E;mxUtils.extend(D,mxShape);D.prototype.getLabelMargins=function(a){return new mxRectangle(a.width/6,0,0,0)};D.prototype.paintBackground=
-function(a,b,c,d,e){a.translate(b,c);a.begin();a.moveTo(0,e/4);a.lineTo(0,3*e/4);a.end();a.stroke();a.begin();a.moveTo(0,e/2);a.lineTo(d/6,e/2);a.end();a.stroke();a.ellipse(d/6,0,5*d/6,e);a.fillAndStroke()};mxCellRenderer.prototype.defaultShapes.umlBoundary=D;mxUtils.extend(C,mxEllipse);C.prototype.paintVertexShape=function(a,b,c,d,e){mxEllipse.prototype.paintVertexShape.apply(this,arguments);a.begin();a.moveTo(b+d/8,c+e);a.lineTo(b+7*d/8,c+e);a.end();a.stroke()};mxCellRenderer.prototype.defaultShapes.umlEntity=
-C;mxUtils.extend(G,mxShape);G.prototype.paintVertexShape=function(a,b,c,d,e){a.translate(b,c);a.begin();a.moveTo(d,0);a.lineTo(0,e);a.moveTo(0,0);a.lineTo(d,e);a.end();a.stroke()};mxCellRenderer.prototype.defaultShapes.umlDestroy=G;mxUtils.extend(B,mxShape);B.prototype.getLabelBounds=function(a){return new mxRectangle(a.x,a.y+a.height/8,a.width,7*a.height/8)};B.prototype.paintBackground=function(a,b,c,d,e){a.translate(b,c);a.begin();a.moveTo(3*d/8,e/8*1.1);a.lineTo(5*d/8,0);a.end();a.stroke();a.ellipse(0,
-e/8,d,7*e/8);a.fillAndStroke()};B.prototype.paintForeground=function(a,b,c,d,e){a.begin();a.moveTo(3*d/8,e/8*1.1);a.lineTo(5*d/8,e/4);a.end();a.stroke()};mxCellRenderer.prototype.defaultShapes.umlControl=B;mxUtils.extend(M,mxRectangleShape);M.prototype.size=40;M.prototype.isHtmlAllowed=function(){return!1};M.prototype.getLabelBounds=function(a){var b=Math.max(0,Math.min(a.height,parseFloat(mxUtils.getValue(this.style,"size",this.size))*this.scale));return new mxRectangle(a.x,a.y,a.width,b)};M.prototype.paintBackground=
-function(a,b,c,d,e){var f=Math.max(0,Math.min(e,parseFloat(mxUtils.getValue(this.style,"size",this.size)))),g=mxUtils.getValue(this.style,"participant");null==g||null==this.state?mxRectangleShape.prototype.paintBackground.call(this,a,b,c,d,f):(g=this.state.view.graph.cellRenderer.getShape(g),null!=g&&g!=M&&(g=new g,g.apply(this.state),a.save(),g.paintVertexShape(a,b,c,d,f),a.restore()));f<e&&(a.setDashed(!0),a.begin(),a.moveTo(b+d/2,c+f),a.lineTo(b+d/2,c+e),a.end(),a.stroke())};M.prototype.paintForeground=
-function(a,b,c,d,e){var f=Math.max(0,Math.min(e,parseFloat(mxUtils.getValue(this.style,"size",this.size))));mxRectangleShape.prototype.paintForeground.call(this,a,b,c,d,Math.min(e,f))};mxCellRenderer.prototype.defaultShapes.umlLifeline=M;mxUtils.extend(K,mxShape);K.prototype.width=60;K.prototype.height=30;K.prototype.corner=10;K.prototype.getLabelMargins=function(a){return new mxRectangle(0,0,a.width-parseFloat(mxUtils.getValue(this.style,"width",this.width)*this.scale),a.height-parseFloat(mxUtils.getValue(this.style,
-"height",this.height)*this.scale))};K.prototype.paintBackground=function(a,b,c,d,e){var f=this.corner,g=Math.min(d,Math.max(f,parseFloat(mxUtils.getValue(this.style,"width",this.width)))),h=Math.min(e,Math.max(1.5*f,parseFloat(mxUtils.getValue(this.style,"height",this.height))));a.begin();a.moveTo(b,c);a.lineTo(b+g,c);a.lineTo(b+g,c+Math.max(0,h-1.5*f));a.lineTo(b+Math.max(0,g-f),c+h);a.lineTo(b,c+h);a.close();a.fillAndStroke();a.begin();a.moveTo(b+g,c);a.lineTo(b+d,c);a.lineTo(b+d,c+e);a.lineTo(b,
-c+e);a.lineTo(b,c+h);a.stroke()};mxCellRenderer.prototype.defaultShapes.umlFrame=K;mxPerimeter.LifelinePerimeter=function(a,b,c,d){d=M.prototype.size;null!=b&&(d=mxUtils.getValue(b.style,"size",d)*b.view.scale);b=parseFloat(b.style[mxConstants.STYLE_STROKEWIDTH]||1)*b.view.scale/2-1;c.x<a.getCenterX()&&(b=-1*(b+1));return new mxPoint(a.getCenterX()+b,Math.min(a.y+a.height,Math.max(a.y+d,c.y)))};mxStyleRegistry.putValue("lifelinePerimeter",mxPerimeter.LifelinePerimeter);mxPerimeter.OrthogonalPerimeter=
-function(a,b,c,d){d=!0;return mxPerimeter.RectanglePerimeter.apply(this,arguments)};mxStyleRegistry.putValue("orthogonalPerimeter",mxPerimeter.OrthogonalPerimeter);mxPerimeter.BackbonePerimeter=function(a,b,c,d){d=parseFloat(b.style[mxConstants.STYLE_STROKEWIDTH]||1)*b.view.scale/2-1;null!=b.style.backboneSize&&(d+=parseFloat(b.style.backboneSize)*b.view.scale/2-1);if("south"==b.style[mxConstants.STYLE_DIRECTION]||"north"==b.style[mxConstants.STYLE_DIRECTION])return c.x<a.getCenterX()&&(d=-1*(d+1)),
-new mxPoint(a.getCenterX()+d,Math.min(a.y+a.height,Math.max(a.y,c.y)));c.y<a.getCenterY()&&(d=-1*(d+1));return new mxPoint(Math.min(a.x+a.width,Math.max(a.x,c.x)),a.getCenterY()+d)};mxStyleRegistry.putValue("backbonePerimeter",mxPerimeter.BackbonePerimeter);mxPerimeter.CalloutPerimeter=function(a,b,c,d){return mxPerimeter.RectanglePerimeter(mxUtils.getDirectedBounds(a,new mxRectangle(0,0,0,Math.max(0,Math.min(a.height,parseFloat(mxUtils.getValue(b.style,"size",y.prototype.size))*b.view.scale))),b.style),
-b,c,d)};mxStyleRegistry.putValue("calloutPerimeter",mxPerimeter.CalloutPerimeter);mxPerimeter.ParallelogramPerimeter=function(a,b,c,d){var e=m.prototype.size;null!=b&&(e=mxUtils.getValue(b.style,"size",e));var f=a.x,g=a.y,h=a.width,k=a.height;b=null!=b?mxUtils.getValue(b.style,mxConstants.STYLE_DIRECTION,mxConstants.DIRECTION_EAST):mxConstants.DIRECTION_EAST;b==mxConstants.DIRECTION_NORTH||b==mxConstants.DIRECTION_SOUTH?(e=k*Math.max(0,Math.min(1,e)),g=[new mxPoint(f,g),new mxPoint(f+h,g+e),new mxPoint(f+
-h,g+k),new mxPoint(f,g+k-e),new mxPoint(f,g)]):(e=h*Math.max(0,Math.min(1,e)),g=[new mxPoint(f+e,g),new mxPoint(f+h,g),new mxPoint(f+h-e,g+k),new mxPoint(f,g+k),new mxPoint(f+e,g)]);k=a.getCenterX();a=a.getCenterY();a=new mxPoint(k,a);d&&(c.x<f||c.x>f+h?a.y=c.y:a.x=c.x);return mxUtils.getPerimeterPoint(g,a,c)};mxStyleRegistry.putValue("parallelogramPerimeter",mxPerimeter.ParallelogramPerimeter);mxPerimeter.TrapezoidPerimeter=function(a,b,c,d){var e=n.prototype.size;null!=b&&(e=mxUtils.getValue(b.style,
-"size",e));var f=a.x,g=a.y,h=a.width,k=a.height;b=null!=b?mxUtils.getValue(b.style,mxConstants.STYLE_DIRECTION,mxConstants.DIRECTION_EAST):mxConstants.DIRECTION_EAST;b==mxConstants.DIRECTION_EAST?(e=h*Math.max(0,Math.min(1,e)),g=[new mxPoint(f+e,g),new mxPoint(f+h-e,g),new mxPoint(f+h,g+k),new mxPoint(f,g+k),new mxPoint(f+e,g)]):b==mxConstants.DIRECTION_WEST?(e=h*Math.max(0,Math.min(1,e)),g=[new mxPoint(f,g),new mxPoint(f+h,g),new mxPoint(f+h-e,g+k),new mxPoint(f+e,g+k),new mxPoint(f,g)]):b==mxConstants.DIRECTION_NORTH?
-(e=k*Math.max(0,Math.min(1,e)),g=[new mxPoint(f,g+e),new mxPoint(f+h,g),new mxPoint(f+h,g+k),new mxPoint(f,g+k-e),new mxPoint(f,g+e)]):(e=k*Math.max(0,Math.min(1,e)),g=[new mxPoint(f,g),new mxPoint(f+h,g+e),new mxPoint(f+h,g+k-e),new mxPoint(f,g+k),new mxPoint(f,g)]);k=a.getCenterX();a=a.getCenterY();a=new mxPoint(k,a);d&&(c.x<f||c.x>f+h?a.y=c.y:a.x=c.x);return mxUtils.getPerimeterPoint(g,a,c)};mxStyleRegistry.putValue("trapezoidPerimeter",mxPerimeter.TrapezoidPerimeter);mxPerimeter.StepPerimeter=
-function(a,b,c,d){var e=x.prototype.size;null!=b&&(e=mxUtils.getValue(b.style,"size",e));var f=a.x,g=a.y,h=a.width,k=a.height,l=a.getCenterX();a=a.getCenterY();b=null!=b?mxUtils.getValue(b.style,mxConstants.STYLE_DIRECTION,mxConstants.DIRECTION_EAST):mxConstants.DIRECTION_EAST;b==mxConstants.DIRECTION_EAST?(e=h*Math.max(0,Math.min(1,e)),g=[new mxPoint(f,g),new mxPoint(f+h-e,g),new mxPoint(f+h,a),new mxPoint(f+h-e,g+k),new mxPoint(f,g+k),new mxPoint(f+e,a),new mxPoint(f,g)]):b==mxConstants.DIRECTION_WEST?
-(e=h*Math.max(0,Math.min(1,e)),g=[new mxPoint(f+e,g),new mxPoint(f+h,g),new mxPoint(f+h-e,a),new mxPoint(f+h,g+k),new mxPoint(f+e,g+k),new mxPoint(f,a),new mxPoint(f+e,g)]):b==mxConstants.DIRECTION_NORTH?(e=k*Math.max(0,Math.min(1,e)),g=[new mxPoint(f,g+e),new mxPoint(l,g),new mxPoint(f+h,g+e),new mxPoint(f+h,g+k),new mxPoint(l,g+k-e),new mxPoint(f,g+k),new mxPoint(f,g+e)]):(e=k*Math.max(0,Math.min(1,e)),g=[new mxPoint(f,g),new mxPoint(l,g+e),new mxPoint(f+h,g),new mxPoint(f+h,g+k-e),new mxPoint(l,
-g+k),new mxPoint(f,g+k-e),new mxPoint(f,g)]);l=new mxPoint(l,a);d&&(c.x<f||c.x>f+h?l.y=c.y:l.x=c.x);return mxUtils.getPerimeterPoint(g,l,c)};mxStyleRegistry.putValue("stepPerimeter",mxPerimeter.StepPerimeter);mxPerimeter.HexagonPerimeter2=function(a,b,c,d){var e=w.prototype.size;null!=b&&(e=mxUtils.getValue(b.style,"size",e));var f=a.x,g=a.y,h=a.width,k=a.height,l=a.getCenterX();a=a.getCenterY();b=null!=b?mxUtils.getValue(b.style,mxConstants.STYLE_DIRECTION,mxConstants.DIRECTION_EAST):mxConstants.DIRECTION_EAST;
-b==mxConstants.DIRECTION_NORTH||b==mxConstants.DIRECTION_SOUTH?(e=k*Math.max(0,Math.min(1,e)),g=[new mxPoint(l,g),new mxPoint(f+h,g+e),new mxPoint(f+h,g+k-e),new mxPoint(l,g+k),new mxPoint(f,g+k-e),new mxPoint(f,g+e),new mxPoint(l,g)]):(e=h*Math.max(0,Math.min(1,e)),g=[new mxPoint(f+e,g),new mxPoint(f+h-e,g),new mxPoint(f+h,a),new mxPoint(f+h-e,g+k),new mxPoint(f+e,g+k),new mxPoint(f,a),new mxPoint(f+e,g)]);l=new mxPoint(l,a);d&&(c.x<f||c.x>f+h?l.y=c.y:l.x=c.x);return mxUtils.getPerimeterPoint(g,
-l,c)};mxStyleRegistry.putValue("hexagonPerimeter2",mxPerimeter.HexagonPerimeter2);mxUtils.extend(L,mxShape);L.prototype.size=10;L.prototype.paintBackground=function(a,b,c,d,e){var f=parseFloat(mxUtils.getValue(this.style,"size",this.size));a.translate(b,c);a.ellipse((d-f)/2,0,f,f);a.fillAndStroke();a.begin();a.moveTo(d/2,f);a.lineTo(d/2,e);a.end();a.stroke()};mxCellRenderer.prototype.defaultShapes.lollipop=L;mxUtils.extend(V,mxShape);V.prototype.size=10;V.prototype.inset=2;V.prototype.paintBackground=
-function(a,b,c,d,e){var f=parseFloat(mxUtils.getValue(this.style,"size",this.size)),g=parseFloat(mxUtils.getValue(this.style,"inset",this.inset))+this.strokewidth;a.translate(b,c);a.begin();a.moveTo(d/2,f+g);a.lineTo(d/2,e);a.end();a.stroke();a.begin();a.moveTo((d-f)/2-g,f/2);a.quadTo((d-f)/2-g,f+g,d/2,f+g);a.quadTo((d+f)/2+g,f+g,(d+f)/2+g,f/2);a.end();a.stroke()};mxCellRenderer.prototype.defaultShapes.requires=V;mxUtils.extend(S,mxCylinder);S.prototype.jettyWidth=32;S.prototype.jettyHeight=12;S.prototype.redrawPath=
-function(a,b,c,d,e,f){var g=parseFloat(mxUtils.getValue(this.style,"jettyWidth",this.jettyWidth));b=parseFloat(mxUtils.getValue(this.style,"jettyHeight",this.jettyHeight));c=g/2;var g=c+g/2,h=.3*e-b/2,k=.7*e-b/2;f?(a.moveTo(c,h),a.lineTo(g,h),a.lineTo(g,h+b),a.lineTo(c,h+b),a.moveTo(c,k),a.lineTo(g,k),a.lineTo(g,k+b),a.lineTo(c,k+b)):(a.moveTo(c,0),a.lineTo(d,0),a.lineTo(d,e),a.lineTo(c,e),a.lineTo(c,k+b),a.lineTo(0,k+b),a.lineTo(0,k),a.lineTo(c,k),a.lineTo(c,h+b),a.lineTo(0,h+b),a.lineTo(0,h),a.lineTo(c,
-h),a.close());a.end()};mxCellRenderer.prototype.defaultShapes.component=S;mxUtils.extend(Z,mxDoubleEllipse);Z.prototype.outerStroke=!0;Z.prototype.paintVertexShape=function(a,b,c,d,e){var f=Math.min(4,Math.min(d/5,e/5));0<d&&0<e&&(a.ellipse(b+f,c+f,d-2*f,e-2*f),a.fillAndStroke());a.setShadow(!1);this.outerStroke&&(a.ellipse(b,c,d,e),a.stroke())};mxCellRenderer.prototype.defaultShapes.endState=Z;mxUtils.extend(A,Z);A.prototype.outerStroke=!1;mxCellRenderer.prototype.defaultShapes.startState=A;mxUtils.extend(v,
-mxArrowConnector);v.prototype.defaultWidth=4;v.prototype.isOpenEnded=function(){return!0};v.prototype.getEdgeWidth=function(){return mxUtils.getNumber(this.style,"width",this.defaultWidth)+Math.max(0,this.strokewidth-1)};v.prototype.isArrowRounded=function(){return this.isRounded};mxCellRenderer.prototype.defaultShapes.link=v;mxUtils.extend(R,mxArrowConnector);R.prototype.defaultWidth=10;R.prototype.defaultArrowWidth=20;R.prototype.getStartArrowWidth=function(){return this.getEdgeWidth()+mxUtils.getNumber(this.style,
-"startWidth",this.defaultArrowWidth)};R.prototype.getEndArrowWidth=function(){return this.getEdgeWidth()+mxUtils.getNumber(this.style,"endWidth",this.defaultArrowWidth)};R.prototype.getEdgeWidth=function(){return mxUtils.getNumber(this.style,"width",this.defaultWidth)+Math.max(0,this.strokewidth-1)};mxCellRenderer.prototype.defaultShapes.flexArrow=R;mxUtils.extend(J,mxActor);J.prototype.size=30;J.prototype.redrawPath=function(a,b,c,d,e){b=Math.min(e,parseFloat(mxUtils.getValue(this.style,"size",this.size)));
-c=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(a,[new mxPoint(0,e),new mxPoint(0,b),new mxPoint(d,0),new mxPoint(d,e)],this.isRounded,c,!0);a.end()};mxCellRenderer.prototype.defaultShapes.manualInput=J;mxUtils.extend(I,mxRectangleShape);I.prototype.dx=20;I.prototype.dy=20;I.prototype.isHtmlAllowed=function(){return!1};I.prototype.paintForeground=function(a,b,c,d,e){mxRectangleShape.prototype.paintForeground.apply(this,arguments);var f=0;if(this.isRounded)var g=
-mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,100*mxConstants.RECTANGLE_ROUNDING_FACTOR)/100,f=Math.max(f,Math.min(d*g,e*g));g=Math.max(f,Math.min(d,parseFloat(mxUtils.getValue(this.style,"dx",this.dx))));f=Math.max(f,Math.min(e,parseFloat(mxUtils.getValue(this.style,"dy",this.dy))));a.begin();a.moveTo(b,c+f);a.lineTo(b+d,c+f);a.end();a.stroke();a.begin();a.moveTo(b+g,c);a.lineTo(b+g,c+e);a.end();a.stroke()};mxCellRenderer.prototype.defaultShapes.internalStorage=I;mxUtils.extend(aa,mxActor);
-aa.prototype.dx=20;aa.prototype.dy=20;aa.prototype.redrawPath=function(a,b,c,d,e){b=Math.max(0,Math.min(d,parseFloat(mxUtils.getValue(this.style,"dx",this.dx))));c=Math.max(0,Math.min(e,parseFloat(mxUtils.getValue(this.style,"dy",this.dy))));parseFloat(mxUtils.getValue(this.style,"size",this.size));var f=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(a,[new mxPoint(0,0),new mxPoint(d,0),new mxPoint(d,c),new mxPoint(b,c),new mxPoint(b,e),new mxPoint(0,
-e)],this.isRounded,f,!0);a.end()};mxCellRenderer.prototype.defaultShapes.corner=aa;mxUtils.extend(N,mxActor);N.prototype.redrawPath=function(a,b,c,d,e){a.moveTo(0,0);a.lineTo(0,e);a.end();a.moveTo(d,0);a.lineTo(d,e);a.end();a.moveTo(0,e/2);a.lineTo(d,e/2);a.end()};mxCellRenderer.prototype.defaultShapes.crossbar=N;mxUtils.extend(H,mxActor);H.prototype.dx=20;H.prototype.dy=20;H.prototype.redrawPath=function(a,b,c,d,e){b=Math.max(0,Math.min(d,parseFloat(mxUtils.getValue(this.style,"dx",this.dx))));c=
-Math.max(0,Math.min(e,parseFloat(mxUtils.getValue(this.style,"dy",this.dy))));parseFloat(mxUtils.getValue(this.style,"size",this.size));var f=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(a,[new mxPoint(0,0),new mxPoint(d,0),new mxPoint(d,c),new mxPoint((d+b)/2,c),new mxPoint((d+b)/2,e),new mxPoint((d-b)/2,e),new mxPoint((d-b)/2,c),new mxPoint(0,c)],this.isRounded,f,!0);a.end()};mxCellRenderer.prototype.defaultShapes.tee=H;mxUtils.extend(U,mxActor);
-U.prototype.arrowWidth=.3;U.prototype.arrowSize=.2;U.prototype.redrawPath=function(a,b,c,d,e){var f=e*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"arrowWidth",this.arrowWidth))));b=d*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"arrowSize",this.arrowSize))));c=(e-f)/2;var f=c+f,g=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(a,[new mxPoint(0,c),new mxPoint(d-b,c),new mxPoint(d-b,0),new mxPoint(d,e/2),new mxPoint(d-
-b,e),new mxPoint(d-b,f),new mxPoint(0,f)],this.isRounded,g,!0);a.end()};mxCellRenderer.prototype.defaultShapes.singleArrow=U;mxUtils.extend(ba,mxActor);ba.prototype.redrawPath=function(a,b,c,d,e){var f=e*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"arrowWidth",U.prototype.arrowWidth))));b=d*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"arrowSize",U.prototype.arrowSize))));c=(e-f)/2;var f=c+f,g=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/
-2;this.addPoints(a,[new mxPoint(0,e/2),new mxPoint(b,0),new mxPoint(b,c),new mxPoint(d-b,c),new mxPoint(d-b,0),new mxPoint(d,e/2),new mxPoint(d-b,e),new mxPoint(d-b,f),new mxPoint(b,f),new mxPoint(b,e)],this.isRounded,g,!0);a.end()};mxCellRenderer.prototype.defaultShapes.doubleArrow=ba;mxUtils.extend(ea,mxActor);ea.prototype.size=.1;ea.prototype.redrawPath=function(a,b,c,d,e){b=d*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));a.moveTo(b,0);a.lineTo(d,0);a.quadTo(d-
-2*b,e/2,d,e);a.lineTo(b,e);a.quadTo(b-2*b,e/2,b,0);a.close();a.end()};mxCellRenderer.prototype.defaultShapes.dataStorage=ea;mxUtils.extend(ca,mxActor);ca.prototype.redrawPath=function(a,b,c,d,e){a.moveTo(0,0);a.quadTo(d,0,d,e/2);a.quadTo(d,e,0,e);a.close();a.end()};mxCellRenderer.prototype.defaultShapes.or=ca;mxUtils.extend(P,mxActor);P.prototype.redrawPath=function(a,b,c,d,e){a.moveTo(0,0);a.quadTo(d,0,d,e/2);a.quadTo(d,e,0,e);a.quadTo(d/2,e/2,0,0);a.close();a.end()};mxCellRenderer.prototype.defaultShapes.xor=
-P;mxUtils.extend(T,mxActor);T.prototype.size=20;T.prototype.redrawPath=function(a,b,c,d,e){b=Math.min(d/2,Math.min(e,parseFloat(mxUtils.getValue(this.style,"size",this.size))));c=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(a,[new mxPoint(b,0),new mxPoint(d-b,0),new mxPoint(d,.8*b),new mxPoint(d,e),new mxPoint(0,e),new mxPoint(0,.8*b)],this.isRounded,c,!0);a.end()};mxCellRenderer.prototype.defaultShapes.loopLimit=T;mxUtils.extend(W,mxActor);W.prototype.size=
-.375;W.prototype.redrawPath=function(a,b,c,d,e){b=e*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));c=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(a,[new mxPoint(0,0),new mxPoint(d,0),new mxPoint(d,e-b),new mxPoint(d/2,e),new mxPoint(0,e-b)],this.isRounded,c,!0);a.end()};mxCellRenderer.prototype.defaultShapes.offPageConnector=W;mxUtils.extend(O,mxEllipse);O.prototype.paintVertexShape=function(a,b,c,d,e){mxEllipse.prototype.paintVertexShape.apply(this,
-arguments);a.begin();a.moveTo(b+d/2,c+e);a.lineTo(b+d,c+e);a.end();a.stroke()};mxCellRenderer.prototype.defaultShapes.tapeData=O;mxUtils.extend(Q,mxEllipse);Q.prototype.paintVertexShape=function(a,b,c,d,e){mxEllipse.prototype.paintVertexShape.apply(this,arguments);a.setShadow(!1);a.begin();a.moveTo(b,c+e/2);a.lineTo(b+d,c+e/2);a.end();a.stroke();a.begin();a.moveTo(b+d/2,c);a.lineTo(b+d/2,c+e);a.end();a.stroke()};mxCellRenderer.prototype.defaultShapes.orEllipse=Q;mxUtils.extend(fa,mxEllipse);fa.prototype.paintVertexShape=
-function(a,b,c,d,e){mxEllipse.prototype.paintVertexShape.apply(this,arguments);a.setShadow(!1);a.begin();a.moveTo(b+.145*d,c+.145*e);a.lineTo(b+.855*d,c+.855*e);a.end();a.stroke();a.begin();a.moveTo(b+.855*d,c+.145*e);a.lineTo(b+.145*d,c+.855*e);a.end();a.stroke()};mxCellRenderer.prototype.defaultShapes.sumEllipse=fa;mxUtils.extend(X,mxRhombus);X.prototype.paintVertexShape=function(a,b,c,d,e){mxRhombus.prototype.paintVertexShape.apply(this,arguments);a.setShadow(!1);a.begin();a.moveTo(b,c+e/2);a.lineTo(b+
-d,c+e/2);a.end();a.stroke()};mxCellRenderer.prototype.defaultShapes.sortShape=X;mxUtils.extend(Y,mxEllipse);Y.prototype.paintVertexShape=function(a,b,c,d,e){a.begin();a.moveTo(b,c);a.lineTo(b+d,c);a.lineTo(b+d/2,c+e/2);a.close();a.fillAndStroke();a.begin();a.moveTo(b,c+e);a.lineTo(b+d,c+e);a.lineTo(b+d/2,c+e/2);a.close();a.fillAndStroke()};mxCellRenderer.prototype.defaultShapes.collate=Y;mxUtils.extend(va,mxEllipse);va.prototype.paintVertexShape=function(a,b,c,d,e){var f=c+e-5;a.begin();a.moveTo(b,
-c);a.lineTo(b,c+e);a.moveTo(b,f);a.lineTo(b+10,f-5);a.moveTo(b,f);a.lineTo(b+10,f+5);a.moveTo(b,f);a.lineTo(b+d,f);a.moveTo(b+d,c);a.lineTo(b+d,c+e);a.moveTo(b+d,f);a.lineTo(b+d-10,f-5);a.moveTo(b+d,f);a.lineTo(b+d-10,f+5);a.end();a.stroke()};mxCellRenderer.prototype.defaultShapes.dimension=va;mxUtils.extend(wa,mxEllipse);wa.prototype.paintVertexShape=function(a,b,c,d,e){this.outline||a.setStrokeColor(null);mxRectangleShape.prototype.paintBackground.apply(this,arguments);null!=this.style&&(a.setStrokeColor(this.stroke),
-a.rect(b,c,d,e),a.fill(),a.begin(),a.moveTo(b,c),"1"==mxUtils.getValue(this.style,"top","1")?a.lineTo(b+d,c):a.moveTo(b+d,c),"1"==mxUtils.getValue(this.style,"right","1")?a.lineTo(b+d,c+e):a.moveTo(b+d,c+e),"1"==mxUtils.getValue(this.style,"bottom","1")?a.lineTo(b,c+e):a.moveTo(b,c+e),"1"==mxUtils.getValue(this.style,"left","1")&&a.lineTo(b,c-this.strokewidth/2),a.end(),a.stroke())};mxCellRenderer.prototype.defaultShapes.partialRectangle=wa;mxUtils.extend(pa,mxEllipse);pa.prototype.paintVertexShape=
-function(a,b,c,d,e){mxEllipse.prototype.paintVertexShape.apply(this,arguments);a.setShadow(!1);a.begin();"vertical"==mxUtils.getValue(this.style,"line")?(a.moveTo(b+d/2,c),a.lineTo(b+d/2,c+e)):(a.moveTo(b,c+e/2),a.lineTo(b+d,c+e/2));a.end();a.stroke()};mxCellRenderer.prototype.defaultShapes.lineEllipse=pa;mxUtils.extend(qa,mxActor);qa.prototype.redrawPath=function(a,b,c,d,e){b=Math.min(d,e/2);a.moveTo(0,0);a.lineTo(d-b,0);a.quadTo(d,0,d,e/2);a.quadTo(d,e,d-b,e);a.lineTo(0,e);a.close();a.end()};mxCellRenderer.prototype.defaultShapes.delay=
-qa;mxUtils.extend(ka,mxActor);ka.prototype.size=.2;ka.prototype.redrawPath=function(a,b,c,d,e){b=Math.min(e,d);var f=Math.max(0,Math.min(b,b*parseFloat(mxUtils.getValue(this.style,"size",this.size))));b=(e-f)/2;c=b+f;var g=(d-f)/2,f=g+f;a.moveTo(0,b);a.lineTo(g,b);a.lineTo(g,0);a.lineTo(f,0);a.lineTo(f,b);a.lineTo(d,b);a.lineTo(d,c);a.lineTo(f,c);a.lineTo(f,e);a.lineTo(g,e);a.lineTo(g,c);a.lineTo(0,c);a.close();a.end()};mxCellRenderer.prototype.defaultShapes.cross=ka;mxUtils.extend(la,mxActor);la.prototype.size=
-.25;la.prototype.redrawPath=function(a,b,c,d,e){b=Math.min(d,e/2);c=Math.min(d-b,Math.max(0,parseFloat(mxUtils.getValue(this.style,"size",this.size)))*d);a.moveTo(0,e/2);a.lineTo(c,0);a.lineTo(d-b,0);a.quadTo(d,0,d,e/2);a.quadTo(d,e,d-b,e);a.lineTo(c,e);a.close();a.end()};mxCellRenderer.prototype.defaultShapes.display=la;mxUtils.extend(ha,mxConnector);ha.prototype.origPaintEdgeShape=ha.prototype.paintEdgeShape;ha.prototype.paintEdgeShape=function(a,b,c){var d=a.state.dashed,e=a.state.fixDash;ha.prototype.origPaintEdgeShape.apply(this,
-arguments);if(3<=a.state.strokeWidth){var f=mxUtils.getValue(this.style,"fillColor",null);null!=f&&(a.setStrokeColor(f),a.setStrokeWidth(a.state.strokeWidth-2),a.setDashed(d,e),ha.prototype.origPaintEdgeShape.apply(this,arguments))}};mxCellRenderer.prototype.defaultShapes.filledEdge=ha;mxMarker.addMarker("dash",function(a,b,c,d,e,f,g,h,k,l){var m=e*(g+k+1),n=f*(g+k+1);return function(){a.begin();a.moveTo(d.x-m/2-n/2,d.y-n/2+m/2);a.lineTo(d.x+n/2-3*m/2,d.y-3*n/2-m/2);a.stroke()}});mxMarker.addMarker("cross",
-function(a,b,c,d,e,f,g,h,k,l){var m=e*(g+k+1),n=f*(g+k+1);return function(){a.begin();a.moveTo(d.x-m/2-n/2,d.y-n/2+m/2);a.lineTo(d.x+n/2-3*m/2,d.y-3*n/2-m/2);a.moveTo(d.x-m/2+n/2,d.y-n/2-m/2);a.lineTo(d.x-n/2-3*m/2,d.y-3*n/2+m/2);a.stroke()}});mxMarker.addMarker("circle",Aa);mxMarker.addMarker("circlePlus",function(a,b,c,d,e,f,g,h,k,l){var m=d.clone(),n=Aa.apply(this,arguments),p=e*(g+2*k),q=f*(g+2*k);return function(){n.apply(this,arguments);a.begin();a.moveTo(m.x-e*k,m.y-f*k);a.lineTo(m.x-2*p+e*
-k,m.y-2*q+f*k);a.moveTo(m.x-p-q+f*k,m.y-q+p-e*k);a.lineTo(m.x+q-p-f*k,m.y-q-p+e*k);a.stroke()}});mxMarker.addMarker("async",function(a,b,c,d,e,f,g,h,k,l){b=e*k*1.118;c=f*k*1.118;e*=g+k;f*=g+k;var m=d.clone();m.x-=b;m.y-=c;d.x+=1*-e-b;d.y+=1*-f-c;return function(){a.begin();a.moveTo(m.x,m.y);h?a.lineTo(m.x-e-f/2,m.y-f+e/2):a.lineTo(m.x+f/2-e,m.y-f-e/2);a.lineTo(m.x-e,m.y-f);a.close();l?a.fillAndStroke():a.stroke()}});mxMarker.addMarker("openAsync",function(a){a=null!=a?a:2;return function(b,c,d,e,
-f,g,h,k,l,m){f*=h+l;g*=h+l;var n=e.clone();return function(){b.begin();b.moveTo(n.x,n.y);k?b.lineTo(n.x-f-g/a,n.y-g+f/a):b.lineTo(n.x+g/a-f,n.y-g-f/a);b.stroke()}}}(2));if("undefined"!==typeof mxVertexHandler){var Ca=function(a,b,c){return ma(a,["width"],b,function(b,d,e,f,g){g=a.shape.getEdgeWidth()*a.view.scale+c;return new mxPoint(f.x+d*b/4+e*g/2,f.y+e*b/4-d*g/2)},function(b,d,e,f,g,h){b=Math.sqrt(mxUtils.ptSegDistSq(f.x,f.y,g.x,g.y,h.x,h.y));a.style.width=Math.round(2*b)/a.view.scale-c})},ma=
-function(a,b,c,d,e){var f=a.absolutePoints,g=f.length-1,h=a.view.translate,k=a.view.scale,l=c?f[0]:f[g],m=c?f[1]:f[g-1],n=m.x-l.x,p=m.y-l.y,q=Math.sqrt(n*n+p*p);return da(a,b,function(a){a=d.call(this,q,n/q,p/q,l,m);return new mxPoint(a.x/k-h.x,a.y/k-h.y)},function(a,b,c){a=Math.sqrt(n*n+p*p);b.x=(b.x+h.x)*k;b.y=(b.y+h.y)*k;e.call(this,a,n/a,p/a,l,m,b,c)})},ia=function(a){return function(b){return[da(b,["arrowWidth","arrowSize"],function(b){var c=Math.max(0,Math.min(1,mxUtils.getValue(this.state.style,
-"arrowWidth",U.prototype.arrowWidth))),d=Math.max(0,Math.min(a,mxUtils.getValue(this.state.style,"arrowSize",U.prototype.arrowSize)));return new mxPoint(b.x+(1-d)*b.width,b.y+(1-c)*b.height/2)},function(b,c){this.state.style.arrowWidth=Math.max(0,Math.min(1,Math.abs(b.y+b.height/2-c.y)/b.height*2));this.state.style.arrowSize=Math.max(0,Math.min(a,(b.x+b.width-c.x)/b.width))})]}},ya=function(a,b,c){return function(d){var e=[da(d,["size"],function(c){var d=Math.max(0,Math.min(c.width,Math.min(c.height,
-parseFloat(mxUtils.getValue(this.state.style,"size",b)))))*a;return new mxPoint(c.x+d,c.y+d)},function(b,c){this.state.style.size=Math.round(Math.max(0,Math.min(Math.min(b.width,c.x-b.x),Math.min(b.height,c.y-b.y)))/a)})];c&&mxUtils.getValue(d.style,mxConstants.STYLE_ROUNDED,!1)&&e.push(ga(d));return e}},ra=function(a,b,c,d){c=null!=c?c:1;return function(e){var f=[da(e,["size"],function(b){var c=parseFloat(mxUtils.getValue(this.state.style,"size",a));return new mxPoint(b.x+c*b.width,b.getCenterY())},
-function(a,b){this.state.style.size=Math.max(0,Math.min(c,(b.x-a.x)/a.width))},null,d)];b&&mxUtils.getValue(e.style,mxConstants.STYLE_ROUNDED,!1)&&f.push(ga(e));return f}},na=function(a){return function(b){var c=[da(b,["size"],function(b){var c=Math.max(0,Math.min(a,parseFloat(mxUtils.getValue(this.state.style,"size",n.prototype.size))));return new mxPoint(b.x+c*b.width*.75,b.y+b.height/4)},function(b,c){this.state.style.size=Math.max(0,Math.min(a,(c.x-b.x)/(.75*b.width)))},null,!0)];mxUtils.getValue(b.style,
-mxConstants.STYLE_ROUNDED,!1)&&c.push(ga(b));return c}},oa=function(){return function(a){var b=[];mxUtils.getValue(a.style,mxConstants.STYLE_ROUNDED,!1)&&b.push(ga(a));return b}},ga=function(a,b){return da(a,[mxConstants.STYLE_ARCSIZE],function(c){var d=null!=b?b:c.height/8;if("1"==mxUtils.getValue(a.style,mxConstants.STYLE_ABSOLUTE_ARCSIZE,0)){var e=mxUtils.getValue(a.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;return new mxPoint(c.x+c.width-Math.min(c.width/2,e),c.y+d)}e=Math.max(0,
-parseFloat(mxUtils.getValue(a.style,mxConstants.STYLE_ARCSIZE,100*mxConstants.RECTANGLE_ROUNDING_FACTOR)))/100;return new mxPoint(c.x+c.width-Math.min(Math.max(c.width/2,c.height/2),Math.min(c.width,c.height)*e),c.y+d)},function(b,c,d){"1"==mxUtils.getValue(a.style,mxConstants.STYLE_ABSOLUTE_ARCSIZE,0)?this.state.style[mxConstants.STYLE_ARCSIZE]=Math.round(Math.max(0,Math.min(b.width,2*(b.x+b.width-c.x)))):this.state.style[mxConstants.STYLE_ARCSIZE]=Math.round(Math.min(50,Math.max(0,100*(b.width-
-c.x+b.x)/Math.min(b.width,b.height))))})},da=function(a,b,c,d,e,f){var g=new mxHandle(a,null,mxVertexHandler.prototype.secondaryHandleImage);g.execute=function(){for(var a=0;a<b.length;a++)this.copyStyle(b[a])};g.getPosition=c;g.setPosition=d;g.ignoreGrid=null!=e?e:!0;if(f){var h=g.positionChanged;g.positionChanged=function(){h.apply(this,arguments);a.view.invalidate(this.state.cell);a.view.validate()}}return g},za={link:function(a){return[Ca(a,!0,10),Ca(a,!1,10)]},flexArrow:function(a){var b=a.view.graph.gridSize/
-a.view.scale,c=[];mxUtils.getValue(a.style,mxConstants.STYLE_STARTARROW,mxConstants.NONE)!=mxConstants.NONE&&(c.push(ma(a,["width",mxConstants.STYLE_STARTSIZE,mxConstants.STYLE_ENDSIZE],!0,function(b,c,d,e,f){b=(a.shape.getEdgeWidth()-a.shape.strokewidth)*a.view.scale;f=3*mxUtils.getNumber(a.style,mxConstants.STYLE_STARTSIZE,mxConstants.ARROW_SIZE/5)*a.view.scale;return new mxPoint(e.x+c*(f+a.shape.strokewidth*a.view.scale)+d*b/2,e.y+d*(f+a.shape.strokewidth*a.view.scale)-c*b/2)},function(c,d,e,f,
-g,h,k){c=Math.sqrt(mxUtils.ptSegDistSq(f.x,f.y,g.x,g.y,h.x,h.y));d=mxUtils.ptLineDist(f.x,f.y,f.x+e,f.y-d,h.x,h.y);a.style[mxConstants.STYLE_STARTSIZE]=Math.round(100*(d-a.shape.strokewidth)/3)/100/a.view.scale;a.style.width=Math.round(2*c)/a.view.scale;mxEvent.isControlDown(k.getEvent())&&(a.style[mxConstants.STYLE_ENDSIZE]=a.style[mxConstants.STYLE_STARTSIZE]);mxEvent.isAltDown(k.getEvent())||Math.abs(parseFloat(a.style[mxConstants.STYLE_STARTSIZE])-parseFloat(a.style[mxConstants.STYLE_ENDSIZE]))<
-b/6&&(a.style[mxConstants.STYLE_STARTSIZE]=a.style[mxConstants.STYLE_ENDSIZE])})),c.push(ma(a,["startWidth","endWidth",mxConstants.STYLE_STARTSIZE,mxConstants.STYLE_ENDSIZE],!0,function(b,c,d,e,f){b=(a.shape.getStartArrowWidth()-a.shape.strokewidth)*a.view.scale;f=3*mxUtils.getNumber(a.style,mxConstants.STYLE_STARTSIZE,mxConstants.ARROW_SIZE/5)*a.view.scale;return new mxPoint(e.x+c*(f+a.shape.strokewidth*a.view.scale)+d*b/2,e.y+d*(f+a.shape.strokewidth*a.view.scale)-c*b/2)},function(c,d,e,f,g,h,k){c=
-Math.sqrt(mxUtils.ptSegDistSq(f.x,f.y,g.x,g.y,h.x,h.y));d=mxUtils.ptLineDist(f.x,f.y,f.x+e,f.y-d,h.x,h.y);a.style[mxConstants.STYLE_STARTSIZE]=Math.round(100*(d-a.shape.strokewidth)/3)/100/a.view.scale;a.style.startWidth=Math.max(0,Math.round(2*c)-a.shape.getEdgeWidth())/a.view.scale;mxEvent.isControlDown(k.getEvent())&&(a.style[mxConstants.STYLE_ENDSIZE]=a.style[mxConstants.STYLE_STARTSIZE],a.style.endWidth=a.style.startWidth);mxEvent.isAltDown(k.getEvent())||(Math.abs(parseFloat(a.style[mxConstants.STYLE_STARTSIZE])-
-parseFloat(a.style[mxConstants.STYLE_ENDSIZE]))<b/6&&(a.style[mxConstants.STYLE_STARTSIZE]=a.style[mxConstants.STYLE_ENDSIZE]),Math.abs(parseFloat(a.style.startWidth)-parseFloat(a.style.endWidth))<b&&(a.style.startWidth=a.style.endWidth))})));mxUtils.getValue(a.style,mxConstants.STYLE_ENDARROW,mxConstants.NONE)!=mxConstants.NONE&&(c.push(ma(a,["width",mxConstants.STYLE_STARTSIZE,mxConstants.STYLE_ENDSIZE],!1,function(b,c,d,e,f){b=(a.shape.getEdgeWidth()-a.shape.strokewidth)*a.view.scale;f=3*mxUtils.getNumber(a.style,
-mxConstants.STYLE_ENDSIZE,mxConstants.ARROW_SIZE/5)*a.view.scale;return new mxPoint(e.x+c*(f+a.shape.strokewidth*a.view.scale)-d*b/2,e.y+d*(f+a.shape.strokewidth*a.view.scale)+c*b/2)},function(c,d,e,f,g,h,k){c=Math.sqrt(mxUtils.ptSegDistSq(f.x,f.y,g.x,g.y,h.x,h.y));d=mxUtils.ptLineDist(f.x,f.y,f.x+e,f.y-d,h.x,h.y);a.style[mxConstants.STYLE_ENDSIZE]=Math.round(100*(d-a.shape.strokewidth)/3)/100/a.view.scale;a.style.width=Math.round(2*c)/a.view.scale;mxEvent.isControlDown(k.getEvent())&&(a.style[mxConstants.STYLE_STARTSIZE]=
-a.style[mxConstants.STYLE_ENDSIZE]);mxEvent.isAltDown(k.getEvent())||Math.abs(parseFloat(a.style[mxConstants.STYLE_ENDSIZE])-parseFloat(a.style[mxConstants.STYLE_STARTSIZE]))<b/6&&(a.style[mxConstants.STYLE_ENDSIZE]=a.style[mxConstants.STYLE_STARTSIZE])})),c.push(ma(a,["startWidth","endWidth",mxConstants.STYLE_STARTSIZE,mxConstants.STYLE_ENDSIZE],!1,function(b,c,d,e,f){b=(a.shape.getEndArrowWidth()-a.shape.strokewidth)*a.view.scale;f=3*mxUtils.getNumber(a.style,mxConstants.STYLE_ENDSIZE,mxConstants.ARROW_SIZE/
-5)*a.view.scale;return new mxPoint(e.x+c*(f+a.shape.strokewidth*a.view.scale)-d*b/2,e.y+d*(f+a.shape.strokewidth*a.view.scale)+c*b/2)},function(c,d,e,f,g,h,k){c=Math.sqrt(mxUtils.ptSegDistSq(f.x,f.y,g.x,g.y,h.x,h.y));d=mxUtils.ptLineDist(f.x,f.y,f.x+e,f.y-d,h.x,h.y);a.style[mxConstants.STYLE_ENDSIZE]=Math.round(100*(d-a.shape.strokewidth)/3)/100/a.view.scale;a.style.endWidth=Math.max(0,Math.round(2*c)-a.shape.getEdgeWidth())/a.view.scale;mxEvent.isControlDown(k.getEvent())&&(a.style[mxConstants.STYLE_STARTSIZE]=
-a.style[mxConstants.STYLE_ENDSIZE],a.style.startWidth=a.style.endWidth);mxEvent.isAltDown(k.getEvent())||(Math.abs(parseFloat(a.style[mxConstants.STYLE_ENDSIZE])-parseFloat(a.style[mxConstants.STYLE_STARTSIZE]))<b/6&&(a.style[mxConstants.STYLE_ENDSIZE]=a.style[mxConstants.STYLE_STARTSIZE]),Math.abs(parseFloat(a.style.endWidth)-parseFloat(a.style.startWidth))<b&&(a.style.endWidth=a.style.startWidth))})));return c},swimlane:function(a){var b=[da(a,[mxConstants.STYLE_STARTSIZE],function(b){var c=parseFloat(mxUtils.getValue(a.style,
-mxConstants.STYLE_STARTSIZE,mxConstants.DEFAULT_STARTSIZE));return 1==mxUtils.getValue(a.style,mxConstants.STYLE_HORIZONTAL,1)?new mxPoint(b.getCenterX(),b.y+Math.max(0,Math.min(b.height,c))):new mxPoint(b.x+Math.max(0,Math.min(b.width,c)),b.getCenterY())},function(b,c){a.style[mxConstants.STYLE_STARTSIZE]=1==mxUtils.getValue(this.state.style,mxConstants.STYLE_HORIZONTAL,1)?Math.round(Math.max(0,Math.min(b.height,c.y-b.y))):Math.round(Math.max(0,Math.min(b.width,c.x-b.x)))})];if(mxUtils.getValue(a.style,
-mxConstants.STYLE_ROUNDED)){var c=parseFloat(mxUtils.getValue(a.style,mxConstants.STYLE_STARTSIZE,mxConstants.DEFAULT_STARTSIZE));b.push(ga(a,c/2))}return b},label:oa(),ext:oa(),rectangle:oa(),triangle:oa(),rhombus:oa(),umlLifeline:function(a){return[da(a,["size"],function(a){var b=Math.max(0,Math.min(a.height,parseFloat(mxUtils.getValue(this.state.style,"size",M.prototype.size))));return new mxPoint(a.getCenterX(),a.y+b)},function(a,b){this.state.style.size=Math.round(Math.max(0,Math.min(a.height,
-b.y-a.y)))},!1)]},umlFrame:function(a){return[da(a,["width","height"],function(a){var b=Math.max(K.prototype.corner,Math.min(a.width,mxUtils.getValue(this.state.style,"width",K.prototype.width))),c=Math.max(1.5*K.prototype.corner,Math.min(a.height,mxUtils.getValue(this.state.style,"height",K.prototype.height)));return new mxPoint(a.x+b,a.y+c)},function(a,b){this.state.style.width=Math.round(Math.max(K.prototype.corner,Math.min(a.width,b.x-a.x)));this.state.style.height=Math.round(Math.max(1.5*K.prototype.corner,
-Math.min(a.height,b.y-a.y)))},!1)]},process:function(a){var b=[da(a,["size"],function(a){var b=Math.max(0,Math.min(.5,parseFloat(mxUtils.getValue(this.state.style,"size",t.prototype.size))));return new mxPoint(a.x+a.width*b,a.y+a.height/4)},function(a,b){this.state.style.size=Math.max(0,Math.min(.5,(b.x-a.x)/a.width))})];mxUtils.getValue(a.style,mxConstants.STYLE_ROUNDED,!1)&&b.push(ga(a));return b},cross:function(a){return[da(a,["size"],function(a){var b=Math.min(a.width,a.height),b=Math.max(0,Math.min(1,
-mxUtils.getValue(this.state.style,"size",ka.prototype.size)))*b/2;return new mxPoint(a.getCenterX()-b,a.getCenterY()-b)},function(a,b){var c=Math.min(a.width,a.height);this.state.style.size=Math.max(0,Math.min(1,Math.min(Math.max(0,a.getCenterY()-b.y)/c*2,Math.max(0,a.getCenterX()-b.x)/c*2)))})]},note:function(a){return[da(a,["size"],function(a){var b=Math.max(0,Math.min(a.width,Math.min(a.height,parseFloat(mxUtils.getValue(this.state.style,"size",e.prototype.size)))));return new mxPoint(a.x+a.width-
-b,a.y+b)},function(a,b){this.state.style.size=Math.round(Math.max(0,Math.min(Math.min(a.width,a.x+a.width-b.x),Math.min(a.height,b.y-a.y))))})]},manualInput:function(a){var b=[da(a,["size"],function(a){var b=Math.max(0,Math.min(a.height,mxUtils.getValue(this.state.style,"size",J.prototype.size)));return new mxPoint(a.x+a.width/4,a.y+3*b/4)},function(a,b){this.state.style.size=Math.round(Math.max(0,Math.min(a.height,4*(b.y-a.y)/3)))})];mxUtils.getValue(a.style,mxConstants.STYLE_ROUNDED,!1)&&b.push(ga(a));
-return b},dataStorage:function(a){return[da(a,["size"],function(a){var b=Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.state.style,"size",ea.prototype.size))));return new mxPoint(a.x+(1-b)*a.width,a.getCenterY())},function(a,b){this.state.style.size=Math.max(0,Math.min(1,(a.x+a.width-b.x)/a.width))})]},callout:function(a){var b=[da(a,["size","position"],function(a){var b=Math.max(0,Math.min(a.height,mxUtils.getValue(this.state.style,"size",y.prototype.size))),c=Math.max(0,Math.min(1,mxUtils.getValue(this.state.style,
-"position",y.prototype.position)));mxUtils.getValue(this.state.style,"base",y.prototype.base);return new mxPoint(a.x+c*a.width,a.y+a.height-b)},function(a,b){mxUtils.getValue(this.state.style,"base",y.prototype.base);this.state.style.size=Math.round(Math.max(0,Math.min(a.height,a.y+a.height-b.y)));this.state.style.position=Math.round(100*Math.max(0,Math.min(1,(b.x-a.x)/a.width)))/100}),da(a,["position2"],function(a){var b=Math.max(0,Math.min(1,mxUtils.getValue(this.state.style,"position2",y.prototype.position2)));
-return new mxPoint(a.x+b*a.width,a.y+a.height)},function(a,b){this.state.style.position2=Math.round(100*Math.max(0,Math.min(1,(b.x-a.x)/a.width)))/100}),da(a,["base"],function(a){var b=Math.max(0,Math.min(a.height,mxUtils.getValue(this.state.style,"size",y.prototype.size))),c=Math.max(0,Math.min(1,mxUtils.getValue(this.state.style,"position",y.prototype.position))),d=Math.max(0,Math.min(a.width,mxUtils.getValue(this.state.style,"base",y.prototype.base)));return new mxPoint(a.x+Math.min(a.width,c*
-a.width+d),a.y+a.height-b)},function(a,b){var c=Math.max(0,Math.min(1,mxUtils.getValue(this.state.style,"position",y.prototype.position)));this.state.style.base=Math.round(Math.max(0,Math.min(a.width,b.x-a.x-c*a.width)))})];mxUtils.getValue(a.style,mxConstants.STYLE_ROUNDED,!1)&&b.push(ga(a));return b},internalStorage:function(a){var b=[da(a,["dx","dy"],function(a){var b=Math.max(0,Math.min(a.width,mxUtils.getValue(this.state.style,"dx",I.prototype.dx))),c=Math.max(0,Math.min(a.height,mxUtils.getValue(this.state.style,
-"dy",I.prototype.dy)));return new mxPoint(a.x+b,a.y+c)},function(a,b){this.state.style.dx=Math.round(Math.max(0,Math.min(a.width,b.x-a.x)));this.state.style.dy=Math.round(Math.max(0,Math.min(a.height,b.y-a.y)))})];mxUtils.getValue(a.style,mxConstants.STYLE_ROUNDED,!1)&&b.push(ga(a));return b},corner:function(a){return[da(a,["dx","dy"],function(a){var b=Math.max(0,Math.min(a.width,mxUtils.getValue(this.state.style,"dx",aa.prototype.dx))),c=Math.max(0,Math.min(a.height,mxUtils.getValue(this.state.style,
-"dy",aa.prototype.dy)));return new mxPoint(a.x+b,a.y+c)},function(a,b){this.state.style.dx=Math.round(Math.max(0,Math.min(a.width,b.x-a.x)));this.state.style.dy=Math.round(Math.max(0,Math.min(a.height,b.y-a.y)))})]},tee:function(a){return[da(a,["dx","dy"],function(a){var b=Math.max(0,Math.min(a.width,mxUtils.getValue(this.state.style,"dx",H.prototype.dx))),c=Math.max(0,Math.min(a.height,mxUtils.getValue(this.state.style,"dy",H.prototype.dy)));return new mxPoint(a.x+(a.width+b)/2,a.y+c)},function(a,
-b){this.state.style.dx=Math.round(Math.max(0,2*Math.min(a.width/2,b.x-a.x-a.width/2)));this.state.style.dy=Math.round(Math.max(0,Math.min(a.height,b.y-a.y)))})]},singleArrow:ia(1),doubleArrow:ia(.5),folder:function(a){return[da(a,["tabWidth","tabHeight"],function(a){var b=Math.max(0,Math.min(a.width,mxUtils.getValue(this.state.style,"tabWidth",g.prototype.tabWidth))),c=Math.max(0,Math.min(a.height,mxUtils.getValue(this.state.style,"tabHeight",g.prototype.tabHeight)));mxUtils.getValue(this.state.style,
-"tabPosition",g.prototype.tabPosition)==mxConstants.ALIGN_RIGHT&&(b=a.width-b);return new mxPoint(a.x+b,a.y+c)},function(a,b){var c=Math.max(0,Math.min(a.width,b.x-a.x));mxUtils.getValue(this.state.style,"tabPosition",g.prototype.tabPosition)==mxConstants.ALIGN_RIGHT&&(c=a.width-c);this.state.style.tabWidth=Math.round(c);this.state.style.tabHeight=Math.round(Math.max(0,Math.min(a.height,b.y-a.y)))})]},document:function(a){return[da(a,["size"],function(a){var b=Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.state.style,
-"size",l.prototype.size))));return new mxPoint(a.x+3*a.width/4,a.y+(1-b)*a.height)},function(a,b){this.state.style.size=Math.max(0,Math.min(1,(a.y+a.height-b.y)/a.height))})]},tape:function(a){return[da(a,["size"],function(a){var b=Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.state.style,"size",k.prototype.size))));return new mxPoint(a.getCenterX(),a.y+b*a.height/2)},function(a,b){this.state.style.size=Math.max(0,Math.min(1,(b.y-a.y)/a.height*2))})]},offPageConnector:function(a){return[da(a,
-["size"],function(a){var b=Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.state.style,"size",W.prototype.size))));return new mxPoint(a.getCenterX(),a.y+(1-b)*a.height)},function(a,b){this.state.style.size=Math.max(0,Math.min(1,(a.y+a.height-b.y)/a.height))})]},step:ra(x.prototype.size,!0,null,!0),hexagon:ra(w.prototype.size,!0,.5,!0),curlyBracket:ra(p.prototype.size,!1),display:ra(la.prototype.size,!1),cube:ya(1,a.prototype.size,!1),card:ya(.5,h.prototype.size,!0),loopLimit:ya(.5,T.prototype.size,
-!0),trapezoid:na(.5),parallelogram:na(1)};Graph.createHandle=da;Graph.handleFactory=za;mxVertexHandler.prototype.createCustomHandles=function(){if(1==this.state.view.graph.getSelectionCount()&&this.graph.isCellRotatable(this.state.cell)){var a=this.state.style.shape;null==this.state.view.graph.cellRenderer.defaultShapes[a]&&null==mxStencilRegistry.getStencil(a)&&(a=mxConstants.SHAPE_RECTANGLE);a=za[a];if(null!=a)return a(this.state)}return null};mxEdgeHandler.prototype.createCustomHandles=function(){if(1==
-this.state.view.graph.getSelectionCount()){var a=this.state.style.shape;null==this.state.view.graph.cellRenderer.defaultShapes[a]&&null==mxStencilRegistry.getStencil(a)&&(a=mxConstants.SHAPE_CONNECTOR);a=za[a];if(null!=a)return a(this.state)}return null}}else Graph.createHandle=function(){},Graph.handleFactory={};var ta=new mxPoint(1,0),ua=new mxPoint(1,0),ia=mxUtils.toRadians(-30),ta=mxUtils.getRotatedPoint(ta,Math.cos(ia),Math.sin(ia)),ia=mxUtils.toRadians(-150),ua=mxUtils.getRotatedPoint(ua,Math.cos(ia),
-Math.sin(ia));mxEdgeStyle.IsometricConnector=function(a,b,c,d,e){var f=a.view;d=null!=d&&0<d.length?d[0]:null;var g=a.absolutePoints,h=g[0],g=g[g.length-1];null!=d&&(d=f.transformControlPoint(a,d));null==h&&null!=b&&(h=new mxPoint(b.getCenterX(),b.getCenterY()));null==g&&null!=c&&(g=new mxPoint(c.getCenterX(),c.getCenterY()));var k=ta.x,l=ta.y,m=ua.x,n=ua.y,p="horizontal"==mxUtils.getValue(a.style,"elbow","horizontal");if(null!=g&&null!=h){a=function(a,b,c){a-=q.x;var d=b-q.y;b=(n*a-m*d)/(k*n-l*m);
-a=(l*a-k*d)/(l*m-k*n);p?(c&&(q=new mxPoint(q.x+k*b,q.y+l*b),e.push(q)),q=new mxPoint(q.x+m*a,q.y+n*a)):(c&&(q=new mxPoint(q.x+m*a,q.y+n*a),e.push(q)),q=new mxPoint(q.x+k*b,q.y+l*b));e.push(q)};var q=h;null==d&&(d=new mxPoint(h.x+(g.x-h.x)/2,h.y+(g.y-h.y)/2));a(d.x,d.y,!0);a(g.x,g.y,!1)}};mxStyleRegistry.putValue("isometricEdgeStyle",mxEdgeStyle.IsometricConnector);var Ha=Graph.prototype.createEdgeHandler;Graph.prototype.createEdgeHandler=function(a,b){if(b==mxEdgeStyle.IsometricConnector){var c=new mxElbowEdgeHandler(a);
-c.snapToTerminals=!1;return c}return Ha.apply(this,arguments)};b.prototype.constraints=[];c.prototype.constraints=[];y.prototype.constraints=[];mxRectangleShape.prototype.constraints=[new mxConnectionConstraint(new mxPoint(.25,0),!0),new mxConnectionConstraint(new mxPoint(.5,0),!0),new mxConnectionConstraint(new mxPoint(.75,0),!0),new mxConnectionConstraint(new mxPoint(0,.25),!0),new mxConnectionConstraint(new mxPoint(0,.5),!0),new mxConnectionConstraint(new mxPoint(0,.75),!0),new mxConnectionConstraint(new mxPoint(1,
-.25),!0),new mxConnectionConstraint(new mxPoint(1,.5),!0),new mxConnectionConstraint(new mxPoint(1,.75),!0),new mxConnectionConstraint(new mxPoint(.25,1),!0),new mxConnectionConstraint(new mxPoint(.5,1),!0),new mxConnectionConstraint(new mxPoint(.75,1),!0)];mxEllipse.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,0),!0),new mxConnectionConstraint(new mxPoint(1,0),!0),new mxConnectionConstraint(new mxPoint(0,1),!0),new mxConnectionConstraint(new mxPoint(1,1),!0),new mxConnectionConstraint(new mxPoint(.5,
-0),!0),new mxConnectionConstraint(new mxPoint(.5,1),!0),new mxConnectionConstraint(new mxPoint(0,.5),!0),new mxConnectionConstraint(new mxPoint(1,.5))];mxLabel.prototype.constraints=mxRectangleShape.prototype.constraints;mxImageShape.prototype.constraints=mxRectangleShape.prototype.constraints;mxSwimlane.prototype.constraints=mxRectangleShape.prototype.constraints;z.prototype.constraints=mxRectangleShape.prototype.constraints;e.prototype.constraints=mxRectangleShape.prototype.constraints;h.prototype.constraints=
-mxRectangleShape.prototype.constraints;a.prototype.constraints=mxRectangleShape.prototype.constraints;g.prototype.constraints=mxRectangleShape.prototype.constraints;I.prototype.constraints=mxRectangleShape.prototype.constraints;ea.prototype.constraints=mxRectangleShape.prototype.constraints;O.prototype.constraints=mxEllipse.prototype.constraints;Q.prototype.constraints=mxEllipse.prototype.constraints;fa.prototype.constraints=mxEllipse.prototype.constraints;pa.prototype.constraints=mxEllipse.prototype.constraints;
-J.prototype.constraints=mxRectangleShape.prototype.constraints;qa.prototype.constraints=mxRectangleShape.prototype.constraints;la.prototype.constraints=mxRectangleShape.prototype.constraints;T.prototype.constraints=mxRectangleShape.prototype.constraints;W.prototype.constraints=mxRectangleShape.prototype.constraints;mxCylinder.prototype.constraints=[new mxConnectionConstraint(new mxPoint(.15,.05),!1),new mxConnectionConstraint(new mxPoint(.5,0),!0),new mxConnectionConstraint(new mxPoint(.85,.05),!1),
-new mxConnectionConstraint(new mxPoint(0,.3),!0),new mxConnectionConstraint(new mxPoint(0,.5),!0),new mxConnectionConstraint(new mxPoint(0,.7),!0),new mxConnectionConstraint(new mxPoint(1,.3),!0),new mxConnectionConstraint(new mxPoint(1,.5),!0),new mxConnectionConstraint(new mxPoint(1,.7),!0),new mxConnectionConstraint(new mxPoint(.15,.95),!1),new mxConnectionConstraint(new mxPoint(.5,1),!0),new mxConnectionConstraint(new mxPoint(.85,.95),!1)];E.prototype.constraints=[new mxConnectionConstraint(new mxPoint(.25,
-.1),!1),new mxConnectionConstraint(new mxPoint(.5,0),!1),new mxConnectionConstraint(new mxPoint(.75,.1),!1),new mxConnectionConstraint(new mxPoint(0,1/3),!1),new mxConnectionConstraint(new mxPoint(0,1),!1),new mxConnectionConstraint(new mxPoint(1,1/3),!1),new mxConnectionConstraint(new mxPoint(1,1),!1),new mxConnectionConstraint(new mxPoint(.5,.5),!1)];S.prototype.constraints=[new mxConnectionConstraint(new mxPoint(.25,0),!0),new mxConnectionConstraint(new mxPoint(.5,0),!0),new mxConnectionConstraint(new mxPoint(.75,
-0),!0),new mxConnectionConstraint(new mxPoint(0,.3),!0),new mxConnectionConstraint(new mxPoint(0,.7),!0),new mxConnectionConstraint(new mxPoint(1,.25),!0),new mxConnectionConstraint(new mxPoint(1,.5),!0),new mxConnectionConstraint(new mxPoint(1,.75),!0),new mxConnectionConstraint(new mxPoint(.25,1),!0),new mxConnectionConstraint(new mxPoint(.5,1),!0),new mxConnectionConstraint(new mxPoint(.75,1),!0)];mxActor.prototype.constraints=[new mxConnectionConstraint(new mxPoint(.5,0),!0),new mxConnectionConstraint(new mxPoint(.25,
-.2),!1),new mxConnectionConstraint(new mxPoint(.1,.5),!1),new mxConnectionConstraint(new mxPoint(0,.75),!0),new mxConnectionConstraint(new mxPoint(.75,.25),!1),new mxConnectionConstraint(new mxPoint(.9,.5),!1),new mxConnectionConstraint(new mxPoint(1,.75),!0),new mxConnectionConstraint(new mxPoint(.25,1),!0),new mxConnectionConstraint(new mxPoint(.5,1),!0),new mxConnectionConstraint(new mxPoint(.75,1),!0)];f.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,0),!1),new mxConnectionConstraint(new mxPoint(.5,
-.25),!1),new mxConnectionConstraint(new mxPoint(1,0),!1),new mxConnectionConstraint(new mxPoint(.25,.5),!1),new mxConnectionConstraint(new mxPoint(.75,.5),!1),new mxConnectionConstraint(new mxPoint(0,1),!1),new mxConnectionConstraint(new mxPoint(.5,.75),!1),new mxConnectionConstraint(new mxPoint(1,1),!1)];k.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,.35),!1),new mxConnectionConstraint(new mxPoint(0,.5),!1),new mxConnectionConstraint(new mxPoint(0,.65),!1),new mxConnectionConstraint(new mxPoint(1,
-.35),!1),new mxConnectionConstraint(new mxPoint(1,.5),!1),new mxConnectionConstraint(new mxPoint(1,.65),!1),new mxConnectionConstraint(new mxPoint(.25,1),!1),new mxConnectionConstraint(new mxPoint(.75,0),!1)];x.prototype.constraints=[new mxConnectionConstraint(new mxPoint(.25,0),!0),new mxConnectionConstraint(new mxPoint(.5,0),!0),new mxConnectionConstraint(new mxPoint(.75,0),!0),new mxConnectionConstraint(new mxPoint(.25,1),!0),new mxConnectionConstraint(new mxPoint(.5,1),!0),new mxConnectionConstraint(new mxPoint(.75,
-1),!0),new mxConnectionConstraint(new mxPoint(.1,.25),!0),new mxConnectionConstraint(new mxPoint(.2,.5),!0),new mxConnectionConstraint(new mxPoint(.1,.75),!0),new mxConnectionConstraint(new mxPoint(.9,.25),!0),new mxConnectionConstraint(new mxPoint(1,.5),!0),new mxConnectionConstraint(new mxPoint(.9,.75),!0)];mxLine.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,.5),!1),new mxConnectionConstraint(new mxPoint(.25,.5),!1),new mxConnectionConstraint(new mxPoint(.75,.5),!1),new mxConnectionConstraint(new mxPoint(1,
-.5),!1)];L.prototype.constraints=[new mxConnectionConstraint(new mxPoint(.5,0),!1),new mxConnectionConstraint(new mxPoint(.5,1),!1)];mxDoubleEllipse.prototype.constraints=mxEllipse.prototype.constraints;mxRhombus.prototype.constraints=mxEllipse.prototype.constraints;mxTriangle.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,.25),!0),new mxConnectionConstraint(new mxPoint(0,.5),!0),new mxConnectionConstraint(new mxPoint(0,.75),!0),new mxConnectionConstraint(new mxPoint(.5,0),!0),new mxConnectionConstraint(new mxPoint(.5,
-1),!0),new mxConnectionConstraint(new mxPoint(1,.5),!0)];mxHexagon.prototype.constraints=[new mxConnectionConstraint(new mxPoint(.375,0),!0),new mxConnectionConstraint(new mxPoint(.5,0),!0),new mxConnectionConstraint(new mxPoint(.625,0),!0),new mxConnectionConstraint(new mxPoint(.125,.25),!0),new mxConnectionConstraint(new mxPoint(0,.5),!0),new mxConnectionConstraint(new mxPoint(.125,.75),!0),new mxConnectionConstraint(new mxPoint(.875,.25),!0),new mxConnectionConstraint(new mxPoint(0,.5),!0),new mxConnectionConstraint(new mxPoint(1,
-.5),!0),new mxConnectionConstraint(new mxPoint(.875,.75),!0),new mxConnectionConstraint(new mxPoint(.375,1),!0),new mxConnectionConstraint(new mxPoint(.5,1),!0),new mxConnectionConstraint(new mxPoint(.625,1),!0)];mxCloud.prototype.constraints=[new mxConnectionConstraint(new mxPoint(.25,.25),!1),new mxConnectionConstraint(new mxPoint(.4,.1),!1),new mxConnectionConstraint(new mxPoint(.16,.55),!1),new mxConnectionConstraint(new mxPoint(.07,.4),!1),new mxConnectionConstraint(new mxPoint(.31,.8),!1),new mxConnectionConstraint(new mxPoint(.13,
-.77),!1),new mxConnectionConstraint(new mxPoint(.8,.8),!1),new mxConnectionConstraint(new mxPoint(.55,.95),!1),new mxConnectionConstraint(new mxPoint(.875,.5),!1),new mxConnectionConstraint(new mxPoint(.96,.7),!1),new mxConnectionConstraint(new mxPoint(.625,.2),!1),new mxConnectionConstraint(new mxPoint(.88,.25),!1)];m.prototype.constraints=mxRectangleShape.prototype.constraints;n.prototype.constraints=mxRectangleShape.prototype.constraints;l.prototype.constraints=[new mxConnectionConstraint(new mxPoint(.25,
-0),!0),new mxConnectionConstraint(new mxPoint(.5,0),!0),new mxConnectionConstraint(new mxPoint(.75,0),!0),new mxConnectionConstraint(new mxPoint(0,.25),!0),new mxConnectionConstraint(new mxPoint(0,.5),!0),new mxConnectionConstraint(new mxPoint(0,.75),!0),new mxConnectionConstraint(new mxPoint(1,.25),!0),new mxConnectionConstraint(new mxPoint(1,.5),!0),new mxConnectionConstraint(new mxPoint(1,.75),!0)];mxArrow.prototype.constraints=null;H.prototype.constraints=null;aa.prototype.constraints=null;N.prototype.constraints=
-[new mxConnectionConstraint(new mxPoint(0,0),!1),new mxConnectionConstraint(new mxPoint(0,.5),!1),new mxConnectionConstraint(new mxPoint(0,1),!1),new mxConnectionConstraint(new mxPoint(.25,.5),!1),new mxConnectionConstraint(new mxPoint(.5,.5),!1),new mxConnectionConstraint(new mxPoint(.75,.5),!1),new mxConnectionConstraint(new mxPoint(1,0),!1),new mxConnectionConstraint(new mxPoint(1,.5),!1),new mxConnectionConstraint(new mxPoint(1,1),!1)];U.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,
-.5),!1),new mxConnectionConstraint(new mxPoint(1,.5),!1)];ba.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,.5),!1),new mxConnectionConstraint(new mxPoint(1,.5),!1)];ka.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,.5),!1),new mxConnectionConstraint(new mxPoint(1,.5),!1),new mxConnectionConstraint(new mxPoint(.5,0),!1),new mxConnectionConstraint(new mxPoint(.5,1),!1)];M.prototype.constraints=null;ca.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,
-.25),!1),new mxConnectionConstraint(new mxPoint(0,.5),!1),new mxConnectionConstraint(new mxPoint(0,.75),!1),new mxConnectionConstraint(new mxPoint(1,.5),!1),new mxConnectionConstraint(new mxPoint(.7,.1),!1),new mxConnectionConstraint(new mxPoint(.7,.9),!1)];P.prototype.constraints=[new mxConnectionConstraint(new mxPoint(.175,.25),!1),new mxConnectionConstraint(new mxPoint(.25,.5),!1),new mxConnectionConstraint(new mxPoint(.175,.75),!1),new mxConnectionConstraint(new mxPoint(1,.5),!1),new mxConnectionConstraint(new mxPoint(.7,
-.1),!1),new mxConnectionConstraint(new mxPoint(.7,.9),!1)]})();
+function(a,b,c,d,e){var f=d*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));if(this.isRounded)var g=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,100*mxConstants.RECTANGLE_ROUNDING_FACTOR)/100,f=Math.max(f,Math.min(d*g,e*g));a.begin();a.moveTo(b+f,c);a.lineTo(b+f,c+e);a.moveTo(b+d-f,c);a.lineTo(b+d-f,c+e);a.end();a.stroke();mxRectangleShape.prototype.paintForeground.apply(this,arguments)};mxCellRenderer.prototype.defaultShapes.process=t;mxUtils.extend(z,mxRectangleShape);
+z.prototype.paintBackground=function(a,b,c,d,e){a.setFillColor(mxConstants.NONE);a.rect(b,c,d,e);a.fill()};z.prototype.paintForeground=function(a,b,c,d,e){};mxCellRenderer.prototype.defaultShapes.transparent=z;mxUtils.extend(w,mxHexagon);w.prototype.size=30;w.prototype.position=.5;w.prototype.position2=.5;w.prototype.base=20;w.prototype.getLabelMargins=function(){return new mxRectangle(0,0,0,parseFloat(mxUtils.getValue(this.style,"size",this.size))*this.scale)};w.prototype.redrawPath=function(a,b,
+c,d,e){b=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;c=Math.max(0,Math.min(e,parseFloat(mxUtils.getValue(this.style,"size",this.size))));var f=d*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"position",this.position)))),g=d*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"position2",this.position2)))),h=Math.max(0,Math.min(d,parseFloat(mxUtils.getValue(this.style,"base",this.base))));this.addPoints(a,[new mxPoint(0,0),new mxPoint(d,
+0),new mxPoint(d,e-c),new mxPoint(Math.min(d,f+h),e-c),new mxPoint(g,e),new mxPoint(Math.max(0,f),e-c),new mxPoint(0,e-c)],this.isRounded,b,!0,[4])};mxCellRenderer.prototype.defaultShapes.callout=w;mxUtils.extend(x,mxActor);x.prototype.size=.2;x.prototype.redrawPath=function(a,b,c,d,e){b=d*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));c=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(a,[new mxPoint(0,0),new mxPoint(d-
+b,0),new mxPoint(d,e/2),new mxPoint(d-b,e),new mxPoint(0,e),new mxPoint(b,e/2)],this.isRounded,c,!0);a.end()};mxCellRenderer.prototype.defaultShapes.step=x;mxUtils.extend(y,mxHexagon);y.prototype.size=.25;y.prototype.redrawPath=function(a,b,c,d,e){b=d*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));c=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(a,[new mxPoint(b,0),new mxPoint(d-b,0),new mxPoint(d,.5*e),new mxPoint(d-
+b,e),new mxPoint(b,e),new mxPoint(0,.5*e)],this.isRounded,c,!0)};mxCellRenderer.prototype.defaultShapes.hexagon=y;mxUtils.extend(u,mxRectangleShape);u.prototype.isHtmlAllowed=function(){return!1};u.prototype.paintForeground=function(a,b,c,d,e){var f=Math.min(d/5,e/5)+1;a.begin();a.moveTo(b+d/2,c+f);a.lineTo(b+d/2,c+e-f);a.moveTo(b+f,c+e/2);a.lineTo(b+d-f,c+e/2);a.end();a.stroke();mxRectangleShape.prototype.paintForeground.apply(this,arguments)};mxCellRenderer.prototype.defaultShapes.plus=u;var Ba=
+mxRhombus.prototype.paintVertexShape;mxRhombus.prototype.getLabelBounds=function(a){if(1==this.style["double"]){var b=(2*Math.max(2,this.strokewidth+1)+parseFloat(this.style[mxConstants.STYLE_MARGIN]||0))*this.scale;return new mxRectangle(a.x+b,a.y+b,a.width-2*b,a.height-2*b)}return a};mxRhombus.prototype.paintVertexShape=function(a,b,c,d,e){Ba.apply(this,arguments);if(!this.outline&&1==this.style["double"]){var f=2*Math.max(2,this.strokewidth+1)+parseFloat(this.style[mxConstants.STYLE_MARGIN]||0);
+b+=f;c+=f;d-=2*f;e-=2*f;0<d&&0<e&&(a.setShadow(!1),Ba.apply(this,[a,b,c,d,e]))}};mxUtils.extend(D,mxRectangleShape);D.prototype.isHtmlAllowed=function(){return!1};D.prototype.getLabelBounds=function(a){if(1==this.style["double"]){var b=(Math.max(2,this.strokewidth+1)+parseFloat(this.style[mxConstants.STYLE_MARGIN]||0))*this.scale;return new mxRectangle(a.x+b,a.y+b,a.width-2*b,a.height-2*b)}return a};D.prototype.paintForeground=function(a,b,c,d,e){if(null!=this.style){if(!this.outline&&1==this.style["double"]){var f=
+Math.max(2,this.strokewidth+1)+parseFloat(this.style[mxConstants.STYLE_MARGIN]||0);b+=f;c+=f;d-=2*f;e-=2*f;0<d&&0<e&&mxRectangleShape.prototype.paintBackground.apply(this,arguments)}a.setDashed(!1);var f=0,g;do{g=mxCellRenderer.prototype.defaultShapes[this.style["symbol"+f]];if(null!=g){var h=this.style["symbol"+f+"Align"],k=this.style["symbol"+f+"VerticalAlign"],l=this.style["symbol"+f+"Width"],m=this.style["symbol"+f+"Height"],ra=this.style["symbol"+f+"Spacing"]||0,n=this.style["symbol"+f+"VSpacing"]||
+ra,p=this.style["symbol"+f+"ArcSpacing"];null!=p&&(p*=this.getArcSize(d+this.strokewidth,e+this.strokewidth),ra+=p,n+=p);var p=b,q=c,p=h==mxConstants.ALIGN_CENTER?p+(d-l)/2:h==mxConstants.ALIGN_RIGHT?p+(d-l-ra):p+ra,q=k==mxConstants.ALIGN_MIDDLE?q+(e-m)/2:k==mxConstants.ALIGN_BOTTOM?q+(e-m-n):q+n;a.save();h=new g;h.style=this.style;g.prototype.paintVertexShape.call(h,a,p,q,l,m);a.restore()}f++}while(null!=g)}mxRectangleShape.prototype.paintForeground.apply(this,arguments)};mxCellRenderer.prototype.defaultShapes.ext=
+D;mxUtils.extend(F,mxCylinder);F.prototype.redrawPath=function(a,b,c,d,e,f){f?(a.moveTo(0,0),a.lineTo(d/2,e/2),a.lineTo(d,0),a.end()):(a.moveTo(0,0),a.lineTo(d,0),a.lineTo(d,e),a.lineTo(0,e),a.close())};mxCellRenderer.prototype.defaultShapes.message=F;mxUtils.extend(E,mxShape);E.prototype.paintBackground=function(a,b,c,d,e){a.translate(b,c);a.ellipse(d/4,0,d/2,e/4);a.fillAndStroke();a.begin();a.moveTo(d/2,e/4);a.lineTo(d/2,2*e/3);a.moveTo(d/2,e/3);a.lineTo(0,e/3);a.moveTo(d/2,e/3);a.lineTo(d,e/3);
+a.moveTo(d/2,2*e/3);a.lineTo(0,e);a.moveTo(d/2,2*e/3);a.lineTo(d,e);a.end();a.stroke()};mxCellRenderer.prototype.defaultShapes.umlActor=E;mxUtils.extend(C,mxShape);C.prototype.getLabelMargins=function(a){return new mxRectangle(a.width/6,0,0,0)};C.prototype.paintBackground=function(a,b,c,d,e){a.translate(b,c);a.begin();a.moveTo(0,e/4);a.lineTo(0,3*e/4);a.end();a.stroke();a.begin();a.moveTo(0,e/2);a.lineTo(d/6,e/2);a.end();a.stroke();a.ellipse(d/6,0,5*d/6,e);a.fillAndStroke()};mxCellRenderer.prototype.defaultShapes.umlBoundary=
+C;mxUtils.extend(G,mxEllipse);G.prototype.paintVertexShape=function(a,b,c,d,e){mxEllipse.prototype.paintVertexShape.apply(this,arguments);a.begin();a.moveTo(b+d/8,c+e);a.lineTo(b+7*d/8,c+e);a.end();a.stroke()};mxCellRenderer.prototype.defaultShapes.umlEntity=G;mxUtils.extend(B,mxShape);B.prototype.paintVertexShape=function(a,b,c,d,e){a.translate(b,c);a.begin();a.moveTo(d,0);a.lineTo(0,e);a.moveTo(0,0);a.lineTo(d,e);a.end();a.stroke()};mxCellRenderer.prototype.defaultShapes.umlDestroy=B;mxUtils.extend(M,
+mxShape);M.prototype.getLabelBounds=function(a){return new mxRectangle(a.x,a.y+a.height/8,a.width,7*a.height/8)};M.prototype.paintBackground=function(a,b,c,d,e){a.translate(b,c);a.begin();a.moveTo(3*d/8,e/8*1.1);a.lineTo(5*d/8,0);a.end();a.stroke();a.ellipse(0,e/8,d,7*e/8);a.fillAndStroke()};M.prototype.paintForeground=function(a,b,c,d,e){a.begin();a.moveTo(3*d/8,e/8*1.1);a.lineTo(5*d/8,e/4);a.end();a.stroke()};mxCellRenderer.prototype.defaultShapes.umlControl=M;mxUtils.extend(L,mxRectangleShape);
+L.prototype.size=40;L.prototype.isHtmlAllowed=function(){return!1};L.prototype.getLabelBounds=function(a){var b=Math.max(0,Math.min(a.height,parseFloat(mxUtils.getValue(this.style,"size",this.size))*this.scale));return new mxRectangle(a.x,a.y,a.width,b)};L.prototype.paintBackground=function(a,b,c,d,e){var f=Math.max(0,Math.min(e,parseFloat(mxUtils.getValue(this.style,"size",this.size)))),g=mxUtils.getValue(this.style,"participant");null==g||null==this.state?mxRectangleShape.prototype.paintBackground.call(this,
+a,b,c,d,f):(g=this.state.view.graph.cellRenderer.getShape(g),null!=g&&g!=L&&(g=new g,g.apply(this.state),a.save(),g.paintVertexShape(a,b,c,d,f),a.restore()));f<e&&(a.setDashed(!0),a.begin(),a.moveTo(b+d/2,c+f),a.lineTo(b+d/2,c+e),a.end(),a.stroke())};L.prototype.paintForeground=function(a,b,c,d,e){var f=Math.max(0,Math.min(e,parseFloat(mxUtils.getValue(this.style,"size",this.size))));mxRectangleShape.prototype.paintForeground.call(this,a,b,c,d,Math.min(e,f))};mxCellRenderer.prototype.defaultShapes.umlLifeline=
+L;mxUtils.extend(H,mxShape);H.prototype.width=60;H.prototype.height=30;H.prototype.corner=10;H.prototype.getLabelMargins=function(a){return new mxRectangle(0,0,a.width-parseFloat(mxUtils.getValue(this.style,"width",this.width)*this.scale),a.height-parseFloat(mxUtils.getValue(this.style,"height",this.height)*this.scale))};H.prototype.paintBackground=function(a,b,c,d,e){var f=this.corner,g=Math.min(d,Math.max(f,parseFloat(mxUtils.getValue(this.style,"width",this.width)))),h=Math.min(e,Math.max(1.5*
+f,parseFloat(mxUtils.getValue(this.style,"height",this.height))));a.begin();a.moveTo(b,c);a.lineTo(b+g,c);a.lineTo(b+g,c+Math.max(0,h-1.5*f));a.lineTo(b+Math.max(0,g-f),c+h);a.lineTo(b,c+h);a.close();a.fillAndStroke();a.begin();a.moveTo(b+g,c);a.lineTo(b+d,c);a.lineTo(b+d,c+e);a.lineTo(b,c+e);a.lineTo(b,c+h);a.stroke()};mxCellRenderer.prototype.defaultShapes.umlFrame=H;mxPerimeter.LifelinePerimeter=function(a,b,c,d){d=L.prototype.size;null!=b&&(d=mxUtils.getValue(b.style,"size",d)*b.view.scale);b=
+parseFloat(b.style[mxConstants.STYLE_STROKEWIDTH]||1)*b.view.scale/2-1;c.x<a.getCenterX()&&(b=-1*(b+1));return new mxPoint(a.getCenterX()+b,Math.min(a.y+a.height,Math.max(a.y+d,c.y)))};mxStyleRegistry.putValue("lifelinePerimeter",mxPerimeter.LifelinePerimeter);mxPerimeter.OrthogonalPerimeter=function(a,b,c,d){d=!0;return mxPerimeter.RectanglePerimeter.apply(this,arguments)};mxStyleRegistry.putValue("orthogonalPerimeter",mxPerimeter.OrthogonalPerimeter);mxPerimeter.BackbonePerimeter=function(a,b,c,
+d){d=parseFloat(b.style[mxConstants.STYLE_STROKEWIDTH]||1)*b.view.scale/2-1;null!=b.style.backboneSize&&(d+=parseFloat(b.style.backboneSize)*b.view.scale/2-1);if("south"==b.style[mxConstants.STYLE_DIRECTION]||"north"==b.style[mxConstants.STYLE_DIRECTION])return c.x<a.getCenterX()&&(d=-1*(d+1)),new mxPoint(a.getCenterX()+d,Math.min(a.y+a.height,Math.max(a.y,c.y)));c.y<a.getCenterY()&&(d=-1*(d+1));return new mxPoint(Math.min(a.x+a.width,Math.max(a.x,c.x)),a.getCenterY()+d)};mxStyleRegistry.putValue("backbonePerimeter",
+mxPerimeter.BackbonePerimeter);mxPerimeter.CalloutPerimeter=function(a,b,c,d){return mxPerimeter.RectanglePerimeter(mxUtils.getDirectedBounds(a,new mxRectangle(0,0,0,Math.max(0,Math.min(a.height,parseFloat(mxUtils.getValue(b.style,"size",w.prototype.size))*b.view.scale))),b.style),b,c,d)};mxStyleRegistry.putValue("calloutPerimeter",mxPerimeter.CalloutPerimeter);mxPerimeter.ParallelogramPerimeter=function(a,b,c,d){var e=m.prototype.size;null!=b&&(e=mxUtils.getValue(b.style,"size",e));var f=a.x,g=a.y,
+h=a.width,k=a.height;b=null!=b?mxUtils.getValue(b.style,mxConstants.STYLE_DIRECTION,mxConstants.DIRECTION_EAST):mxConstants.DIRECTION_EAST;b==mxConstants.DIRECTION_NORTH||b==mxConstants.DIRECTION_SOUTH?(e=k*Math.max(0,Math.min(1,e)),g=[new mxPoint(f,g),new mxPoint(f+h,g+e),new mxPoint(f+h,g+k),new mxPoint(f,g+k-e),new mxPoint(f,g)]):(e=h*Math.max(0,Math.min(1,e)),g=[new mxPoint(f+e,g),new mxPoint(f+h,g),new mxPoint(f+h-e,g+k),new mxPoint(f,g+k),new mxPoint(f+e,g)]);k=a.getCenterX();a=a.getCenterY();
+a=new mxPoint(k,a);d&&(c.x<f||c.x>f+h?a.y=c.y:a.x=c.x);return mxUtils.getPerimeterPoint(g,a,c)};mxStyleRegistry.putValue("parallelogramPerimeter",mxPerimeter.ParallelogramPerimeter);mxPerimeter.TrapezoidPerimeter=function(a,b,c,d){var e=n.prototype.size;null!=b&&(e=mxUtils.getValue(b.style,"size",e));var f=a.x,g=a.y,h=a.width,k=a.height;b=null!=b?mxUtils.getValue(b.style,mxConstants.STYLE_DIRECTION,mxConstants.DIRECTION_EAST):mxConstants.DIRECTION_EAST;b==mxConstants.DIRECTION_EAST?(e=h*Math.max(0,
+Math.min(1,e)),g=[new mxPoint(f+e,g),new mxPoint(f+h-e,g),new mxPoint(f+h,g+k),new mxPoint(f,g+k),new mxPoint(f+e,g)]):b==mxConstants.DIRECTION_WEST?(e=h*Math.max(0,Math.min(1,e)),g=[new mxPoint(f,g),new mxPoint(f+h,g),new mxPoint(f+h-e,g+k),new mxPoint(f+e,g+k),new mxPoint(f,g)]):b==mxConstants.DIRECTION_NORTH?(e=k*Math.max(0,Math.min(1,e)),g=[new mxPoint(f,g+e),new mxPoint(f+h,g),new mxPoint(f+h,g+k),new mxPoint(f,g+k-e),new mxPoint(f,g+e)]):(e=k*Math.max(0,Math.min(1,e)),g=[new mxPoint(f,g),new mxPoint(f+
+h,g+e),new mxPoint(f+h,g+k-e),new mxPoint(f,g+k),new mxPoint(f,g)]);k=a.getCenterX();a=a.getCenterY();a=new mxPoint(k,a);d&&(c.x<f||c.x>f+h?a.y=c.y:a.x=c.x);return mxUtils.getPerimeterPoint(g,a,c)};mxStyleRegistry.putValue("trapezoidPerimeter",mxPerimeter.TrapezoidPerimeter);mxPerimeter.StepPerimeter=function(a,b,c,d){var e=x.prototype.size;null!=b&&(e=mxUtils.getValue(b.style,"size",e));var f=a.x,g=a.y,h=a.width,k=a.height,l=a.getCenterX();a=a.getCenterY();b=null!=b?mxUtils.getValue(b.style,mxConstants.STYLE_DIRECTION,
+mxConstants.DIRECTION_EAST):mxConstants.DIRECTION_EAST;b==mxConstants.DIRECTION_EAST?(e=h*Math.max(0,Math.min(1,e)),g=[new mxPoint(f,g),new mxPoint(f+h-e,g),new mxPoint(f+h,a),new mxPoint(f+h-e,g+k),new mxPoint(f,g+k),new mxPoint(f+e,a),new mxPoint(f,g)]):b==mxConstants.DIRECTION_WEST?(e=h*Math.max(0,Math.min(1,e)),g=[new mxPoint(f+e,g),new mxPoint(f+h,g),new mxPoint(f+h-e,a),new mxPoint(f+h,g+k),new mxPoint(f+e,g+k),new mxPoint(f,a),new mxPoint(f+e,g)]):b==mxConstants.DIRECTION_NORTH?(e=k*Math.max(0,
+Math.min(1,e)),g=[new mxPoint(f,g+e),new mxPoint(l,g),new mxPoint(f+h,g+e),new mxPoint(f+h,g+k),new mxPoint(l,g+k-e),new mxPoint(f,g+k),new mxPoint(f,g+e)]):(e=k*Math.max(0,Math.min(1,e)),g=[new mxPoint(f,g),new mxPoint(l,g+e),new mxPoint(f+h,g),new mxPoint(f+h,g+k-e),new mxPoint(l,g+k),new mxPoint(f,g+k-e),new mxPoint(f,g)]);l=new mxPoint(l,a);d&&(c.x<f||c.x>f+h?l.y=c.y:l.x=c.x);return mxUtils.getPerimeterPoint(g,l,c)};mxStyleRegistry.putValue("stepPerimeter",mxPerimeter.StepPerimeter);mxPerimeter.HexagonPerimeter2=
+function(a,b,c,d){var e=y.prototype.size;null!=b&&(e=mxUtils.getValue(b.style,"size",e));var f=a.x,g=a.y,h=a.width,k=a.height,l=a.getCenterX();a=a.getCenterY();b=null!=b?mxUtils.getValue(b.style,mxConstants.STYLE_DIRECTION,mxConstants.DIRECTION_EAST):mxConstants.DIRECTION_EAST;b==mxConstants.DIRECTION_NORTH||b==mxConstants.DIRECTION_SOUTH?(e=k*Math.max(0,Math.min(1,e)),g=[new mxPoint(l,g),new mxPoint(f+h,g+e),new mxPoint(f+h,g+k-e),new mxPoint(l,g+k),new mxPoint(f,g+k-e),new mxPoint(f,g+e),new mxPoint(l,
+g)]):(e=h*Math.max(0,Math.min(1,e)),g=[new mxPoint(f+e,g),new mxPoint(f+h-e,g),new mxPoint(f+h,a),new mxPoint(f+h-e,g+k),new mxPoint(f+e,g+k),new mxPoint(f,a),new mxPoint(f+e,g)]);l=new mxPoint(l,a);d&&(c.x<f||c.x>f+h?l.y=c.y:l.x=c.x);return mxUtils.getPerimeterPoint(g,l,c)};mxStyleRegistry.putValue("hexagonPerimeter2",mxPerimeter.HexagonPerimeter2);mxUtils.extend(U,mxShape);U.prototype.size=10;U.prototype.paintBackground=function(a,b,c,d,e){var f=parseFloat(mxUtils.getValue(this.style,"size",this.size));
+a.translate(b,c);a.ellipse((d-f)/2,0,f,f);a.fillAndStroke();a.begin();a.moveTo(d/2,f);a.lineTo(d/2,e);a.end();a.stroke()};mxCellRenderer.prototype.defaultShapes.lollipop=U;mxUtils.extend(S,mxShape);S.prototype.size=10;S.prototype.inset=2;S.prototype.paintBackground=function(a,b,c,d,e){var f=parseFloat(mxUtils.getValue(this.style,"size",this.size)),g=parseFloat(mxUtils.getValue(this.style,"inset",this.inset))+this.strokewidth;a.translate(b,c);a.begin();a.moveTo(d/2,f+g);a.lineTo(d/2,e);a.end();a.stroke();
+a.begin();a.moveTo((d-f)/2-g,f/2);a.quadTo((d-f)/2-g,f+g,d/2,f+g);a.quadTo((d+f)/2+g,f+g,(d+f)/2+g,f/2);a.end();a.stroke()};mxCellRenderer.prototype.defaultShapes.requires=S;mxUtils.extend(ba,mxCylinder);ba.prototype.jettyWidth=32;ba.prototype.jettyHeight=12;ba.prototype.redrawPath=function(a,b,c,d,e,f){var g=parseFloat(mxUtils.getValue(this.style,"jettyWidth",this.jettyWidth));b=parseFloat(mxUtils.getValue(this.style,"jettyHeight",this.jettyHeight));c=g/2;var g=c+g/2,h=.3*e-b/2,k=.7*e-b/2;f?(a.moveTo(c,
+h),a.lineTo(g,h),a.lineTo(g,h+b),a.lineTo(c,h+b),a.moveTo(c,k),a.lineTo(g,k),a.lineTo(g,k+b),a.lineTo(c,k+b)):(a.moveTo(c,0),a.lineTo(d,0),a.lineTo(d,e),a.lineTo(c,e),a.lineTo(c,k+b),a.lineTo(0,k+b),a.lineTo(0,k),a.lineTo(c,k),a.lineTo(c,h+b),a.lineTo(0,h+b),a.lineTo(0,h),a.lineTo(c,h),a.close());a.end()};mxCellRenderer.prototype.defaultShapes.component=ba;mxUtils.extend(A,mxDoubleEllipse);A.prototype.outerStroke=!0;A.prototype.paintVertexShape=function(a,b,c,d,e){var f=Math.min(4,Math.min(d/5,e/
+5));0<d&&0<e&&(a.ellipse(b+f,c+f,d-2*f,e-2*f),a.fillAndStroke());a.setShadow(!1);this.outerStroke&&(a.ellipse(b,c,d,e),a.stroke())};mxCellRenderer.prototype.defaultShapes.endState=A;mxUtils.extend(v,A);v.prototype.outerStroke=!1;mxCellRenderer.prototype.defaultShapes.startState=v;mxUtils.extend(R,mxArrowConnector);R.prototype.defaultWidth=4;R.prototype.isOpenEnded=function(){return!0};R.prototype.getEdgeWidth=function(){return mxUtils.getNumber(this.style,"width",this.defaultWidth)+Math.max(0,this.strokewidth-
+1)};R.prototype.isArrowRounded=function(){return this.isRounded};mxCellRenderer.prototype.defaultShapes.link=R;mxUtils.extend(I,mxArrowConnector);I.prototype.defaultWidth=10;I.prototype.defaultArrowWidth=20;I.prototype.getStartArrowWidth=function(){return this.getEdgeWidth()+mxUtils.getNumber(this.style,"startWidth",this.defaultArrowWidth)};I.prototype.getEndArrowWidth=function(){return this.getEdgeWidth()+mxUtils.getNumber(this.style,"endWidth",this.defaultArrowWidth)};I.prototype.getEdgeWidth=function(){return mxUtils.getNumber(this.style,
+"width",this.defaultWidth)+Math.max(0,this.strokewidth-1)};mxCellRenderer.prototype.defaultShapes.flexArrow=I;mxUtils.extend(J,mxActor);J.prototype.size=30;J.prototype.redrawPath=function(a,b,c,d,e){b=Math.min(e,parseFloat(mxUtils.getValue(this.style,"size",this.size)));c=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(a,[new mxPoint(0,e),new mxPoint(0,b),new mxPoint(d,0),new mxPoint(d,e)],this.isRounded,c,!0);a.end()};mxCellRenderer.prototype.defaultShapes.manualInput=
+J;mxUtils.extend(ca,mxRectangleShape);ca.prototype.dx=20;ca.prototype.dy=20;ca.prototype.isHtmlAllowed=function(){return!1};ca.prototype.paintForeground=function(a,b,c,d,e){mxRectangleShape.prototype.paintForeground.apply(this,arguments);var f=0;if(this.isRounded)var g=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,100*mxConstants.RECTANGLE_ROUNDING_FACTOR)/100,f=Math.max(f,Math.min(d*g,e*g));g=Math.max(f,Math.min(d,parseFloat(mxUtils.getValue(this.style,"dx",this.dx))));f=Math.max(f,Math.min(e,
+parseFloat(mxUtils.getValue(this.style,"dy",this.dy))));a.begin();a.moveTo(b,c+f);a.lineTo(b+d,c+f);a.end();a.stroke();a.begin();a.moveTo(b+g,c);a.lineTo(b+g,c+e);a.end();a.stroke()};mxCellRenderer.prototype.defaultShapes.internalStorage=ca;mxUtils.extend(N,mxActor);N.prototype.dx=20;N.prototype.dy=20;N.prototype.redrawPath=function(a,b,c,d,e){b=Math.max(0,Math.min(d,parseFloat(mxUtils.getValue(this.style,"dx",this.dx))));c=Math.max(0,Math.min(e,parseFloat(mxUtils.getValue(this.style,"dy",this.dy))));
+parseFloat(mxUtils.getValue(this.style,"size",this.size));var f=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(a,[new mxPoint(0,0),new mxPoint(d,0),new mxPoint(d,c),new mxPoint(b,c),new mxPoint(b,e),new mxPoint(0,e)],this.isRounded,f,!0);a.end()};mxCellRenderer.prototype.defaultShapes.corner=N;mxUtils.extend(K,mxActor);K.prototype.redrawPath=function(a,b,c,d,e){a.moveTo(0,0);a.lineTo(0,e);a.end();a.moveTo(d,0);a.lineTo(d,e);a.end();a.moveTo(0,e/2);
+a.lineTo(d,e/2);a.end()};mxCellRenderer.prototype.defaultShapes.crossbar=K;mxUtils.extend(X,mxActor);X.prototype.dx=20;X.prototype.dy=20;X.prototype.redrawPath=function(a,b,c,d,e){b=Math.max(0,Math.min(d,parseFloat(mxUtils.getValue(this.style,"dx",this.dx))));c=Math.max(0,Math.min(e,parseFloat(mxUtils.getValue(this.style,"dy",this.dy))));parseFloat(mxUtils.getValue(this.style,"size",this.size));var f=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(a,
+[new mxPoint(0,0),new mxPoint(d,0),new mxPoint(d,c),new mxPoint((d+b)/2,c),new mxPoint((d+b)/2,e),new mxPoint((d-b)/2,e),new mxPoint((d-b)/2,c),new mxPoint(0,c)],this.isRounded,f,!0);a.end()};mxCellRenderer.prototype.defaultShapes.tee=X;mxUtils.extend(T,mxActor);T.prototype.arrowWidth=.3;T.prototype.arrowSize=.2;T.prototype.redrawPath=function(a,b,c,d,e){var f=e*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"arrowWidth",this.arrowWidth))));b=d*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,
+"arrowSize",this.arrowSize))));c=(e-f)/2;var f=c+f,g=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(a,[new mxPoint(0,c),new mxPoint(d-b,c),new mxPoint(d-b,0),new mxPoint(d,e/2),new mxPoint(d-b,e),new mxPoint(d-b,f),new mxPoint(0,f)],this.isRounded,g,!0);a.end()};mxCellRenderer.prototype.defaultShapes.singleArrow=T;mxUtils.extend(ea,mxActor);ea.prototype.redrawPath=function(a,b,c,d,e){var f=e*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,
+"arrowWidth",T.prototype.arrowWidth))));b=d*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"arrowSize",T.prototype.arrowSize))));c=(e-f)/2;var f=c+f,g=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(a,[new mxPoint(0,e/2),new mxPoint(b,0),new mxPoint(b,c),new mxPoint(d-b,c),new mxPoint(d-b,0),new mxPoint(d,e/2),new mxPoint(d-b,e),new mxPoint(d-b,f),new mxPoint(b,f),new mxPoint(b,e)],this.isRounded,g,!0);a.end()};mxCellRenderer.prototype.defaultShapes.doubleArrow=
+ea;mxUtils.extend(aa,mxActor);aa.prototype.size=.1;aa.prototype.redrawPath=function(a,b,c,d,e){b=d*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));a.moveTo(b,0);a.lineTo(d,0);a.quadTo(d-2*b,e/2,d,e);a.lineTo(b,e);a.quadTo(b-2*b,e/2,b,0);a.close();a.end()};mxCellRenderer.prototype.defaultShapes.dataStorage=aa;mxUtils.extend(P,mxActor);P.prototype.redrawPath=function(a,b,c,d,e){a.moveTo(0,0);a.quadTo(d,0,d,e/2);a.quadTo(d,e,0,e);a.close();a.end()};mxCellRenderer.prototype.defaultShapes.or=
+P;mxUtils.extend(V,mxActor);V.prototype.redrawPath=function(a,b,c,d,e){a.moveTo(0,0);a.quadTo(d,0,d,e/2);a.quadTo(d,e,0,e);a.quadTo(d/2,e/2,0,0);a.close();a.end()};mxCellRenderer.prototype.defaultShapes.xor=V;mxUtils.extend(W,mxActor);W.prototype.size=20;W.prototype.redrawPath=function(a,b,c,d,e){b=Math.min(d/2,Math.min(e,parseFloat(mxUtils.getValue(this.style,"size",this.size))));c=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(a,[new mxPoint(b,0),
+new mxPoint(d-b,0),new mxPoint(d,.8*b),new mxPoint(d,e),new mxPoint(0,e),new mxPoint(0,.8*b)],this.isRounded,c,!0);a.end()};mxCellRenderer.prototype.defaultShapes.loopLimit=W;mxUtils.extend(O,mxActor);O.prototype.size=.375;O.prototype.redrawPath=function(a,b,c,d,e){b=e*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));c=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(a,[new mxPoint(0,0),new mxPoint(d,0),new mxPoint(d,
+e-b),new mxPoint(d/2,e),new mxPoint(0,e-b)],this.isRounded,c,!0);a.end()};mxCellRenderer.prototype.defaultShapes.offPageConnector=O;mxUtils.extend(Q,mxEllipse);Q.prototype.paintVertexShape=function(a,b,c,d,e){mxEllipse.prototype.paintVertexShape.apply(this,arguments);a.begin();a.moveTo(b+d/2,c+e);a.lineTo(b+d,c+e);a.end();a.stroke()};mxCellRenderer.prototype.defaultShapes.tapeData=Q;mxUtils.extend(fa,mxEllipse);fa.prototype.paintVertexShape=function(a,b,c,d,e){mxEllipse.prototype.paintVertexShape.apply(this,
+arguments);a.setShadow(!1);a.begin();a.moveTo(b,c+e/2);a.lineTo(b+d,c+e/2);a.end();a.stroke();a.begin();a.moveTo(b+d/2,c);a.lineTo(b+d/2,c+e);a.end();a.stroke()};mxCellRenderer.prototype.defaultShapes.orEllipse=fa;mxUtils.extend(Y,mxEllipse);Y.prototype.paintVertexShape=function(a,b,c,d,e){mxEllipse.prototype.paintVertexShape.apply(this,arguments);a.setShadow(!1);a.begin();a.moveTo(b+.145*d,c+.145*e);a.lineTo(b+.855*d,c+.855*e);a.end();a.stroke();a.begin();a.moveTo(b+.855*d,c+.145*e);a.lineTo(b+.145*
+d,c+.855*e);a.end();a.stroke()};mxCellRenderer.prototype.defaultShapes.sumEllipse=Y;mxUtils.extend(Z,mxRhombus);Z.prototype.paintVertexShape=function(a,b,c,d,e){mxRhombus.prototype.paintVertexShape.apply(this,arguments);a.setShadow(!1);a.begin();a.moveTo(b,c+e/2);a.lineTo(b+d,c+e/2);a.end();a.stroke()};mxCellRenderer.prototype.defaultShapes.sortShape=Z;mxUtils.extend(ua,mxEllipse);ua.prototype.paintVertexShape=function(a,b,c,d,e){a.begin();a.moveTo(b,c);a.lineTo(b+d,c);a.lineTo(b+d/2,c+e/2);a.close();
+a.fillAndStroke();a.begin();a.moveTo(b,c+e);a.lineTo(b+d,c+e);a.lineTo(b+d/2,c+e/2);a.close();a.fillAndStroke()};mxCellRenderer.prototype.defaultShapes.collate=ua;mxUtils.extend(va,mxEllipse);va.prototype.paintVertexShape=function(a,b,c,d,e){var f=c+e-5;a.begin();a.moveTo(b,c);a.lineTo(b,c+e);a.moveTo(b,f);a.lineTo(b+10,f-5);a.moveTo(b,f);a.lineTo(b+10,f+5);a.moveTo(b,f);a.lineTo(b+d,f);a.moveTo(b+d,c);a.lineTo(b+d,c+e);a.moveTo(b+d,f);a.lineTo(b+d-10,f-5);a.moveTo(b+d,f);a.lineTo(b+d-10,f+5);a.end();
+a.stroke()};mxCellRenderer.prototype.defaultShapes.dimension=va;mxUtils.extend(wa,mxEllipse);wa.prototype.paintVertexShape=function(a,b,c,d,e){this.outline||a.setStrokeColor(null);mxRectangleShape.prototype.paintBackground.apply(this,arguments);null!=this.style&&(a.setStrokeColor(this.stroke),a.rect(b,c,d,e),a.fill(),a.begin(),a.moveTo(b,c),"1"==mxUtils.getValue(this.style,"top","1")?a.lineTo(b+d,c):a.moveTo(b+d,c),"1"==mxUtils.getValue(this.style,"right","1")?a.lineTo(b+d,c+e):a.moveTo(b+d,c+e),
+"1"==mxUtils.getValue(this.style,"bottom","1")?a.lineTo(b,c+e):a.moveTo(b,c+e),"1"==mxUtils.getValue(this.style,"left","1")&&a.lineTo(b,c-this.strokewidth/2),a.end(),a.stroke())};mxCellRenderer.prototype.defaultShapes.partialRectangle=wa;mxUtils.extend(pa,mxEllipse);pa.prototype.paintVertexShape=function(a,b,c,d,e){mxEllipse.prototype.paintVertexShape.apply(this,arguments);a.setShadow(!1);a.begin();"vertical"==mxUtils.getValue(this.style,"line")?(a.moveTo(b+d/2,c),a.lineTo(b+d/2,c+e)):(a.moveTo(b,
+c+e/2),a.lineTo(b+d,c+e/2));a.end();a.stroke()};mxCellRenderer.prototype.defaultShapes.lineEllipse=pa;mxUtils.extend(qa,mxActor);qa.prototype.redrawPath=function(a,b,c,d,e){b=Math.min(d,e/2);a.moveTo(0,0);a.lineTo(d-b,0);a.quadTo(d,0,d,e/2);a.quadTo(d,e,d-b,e);a.lineTo(0,e);a.close();a.end()};mxCellRenderer.prototype.defaultShapes.delay=qa;mxUtils.extend(ma,mxActor);ma.prototype.size=.2;ma.prototype.redrawPath=function(a,b,c,d,e){b=Math.min(e,d);var f=Math.max(0,Math.min(b,b*parseFloat(mxUtils.getValue(this.style,
+"size",this.size))));b=(e-f)/2;c=b+f;var g=(d-f)/2,f=g+f;a.moveTo(0,b);a.lineTo(g,b);a.lineTo(g,0);a.lineTo(f,0);a.lineTo(f,b);a.lineTo(d,b);a.lineTo(d,c);a.lineTo(f,c);a.lineTo(f,e);a.lineTo(g,e);a.lineTo(g,c);a.lineTo(0,c);a.close();a.end()};mxCellRenderer.prototype.defaultShapes.cross=ma;mxUtils.extend(ia,mxActor);ia.prototype.size=.25;ia.prototype.redrawPath=function(a,b,c,d,e){b=Math.min(d,e/2);c=Math.min(d-b,Math.max(0,parseFloat(mxUtils.getValue(this.style,"size",this.size)))*d);a.moveTo(0,
+e/2);a.lineTo(c,0);a.lineTo(d-b,0);a.quadTo(d,0,d,e/2);a.quadTo(d,e,d-b,e);a.lineTo(c,e);a.close();a.end()};mxCellRenderer.prototype.defaultShapes.display=ia;mxUtils.extend(ja,mxConnector);ja.prototype.origPaintEdgeShape=ja.prototype.paintEdgeShape;ja.prototype.paintEdgeShape=function(a,b,c){var d=a.state.dashed,e=a.state.fixDash;ja.prototype.origPaintEdgeShape.apply(this,arguments);if(3<=a.state.strokeWidth){var f=mxUtils.getValue(this.style,"fillColor",null);null!=f&&(a.setStrokeColor(f),a.setStrokeWidth(a.state.strokeWidth-
+2),a.setDashed(d,e),ja.prototype.origPaintEdgeShape.apply(this,arguments))}};mxCellRenderer.prototype.defaultShapes.filledEdge=ja;mxMarker.addMarker("dash",function(a,b,c,d,e,f,g,h,k,l){var m=e*(g+k+1),n=f*(g+k+1);return function(){a.begin();a.moveTo(d.x-m/2-n/2,d.y-n/2+m/2);a.lineTo(d.x+n/2-3*m/2,d.y-3*n/2-m/2);a.stroke()}});mxMarker.addMarker("cross",function(a,b,c,d,e,f,g,h,k,l){var m=e*(g+k+1),n=f*(g+k+1);return function(){a.begin();a.moveTo(d.x-m/2-n/2,d.y-n/2+m/2);a.lineTo(d.x+n/2-3*m/2,d.y-
+3*n/2-m/2);a.moveTo(d.x-m/2+n/2,d.y-n/2-m/2);a.lineTo(d.x-n/2-3*m/2,d.y-3*n/2+m/2);a.stroke()}});mxMarker.addMarker("circle",Aa);mxMarker.addMarker("circlePlus",function(a,b,c,d,e,f,g,h,k,l){var m=d.clone(),n=Aa.apply(this,arguments),p=e*(g+2*k),q=f*(g+2*k);return function(){n.apply(this,arguments);a.begin();a.moveTo(m.x-e*k,m.y-f*k);a.lineTo(m.x-2*p+e*k,m.y-2*q+f*k);a.moveTo(m.x-p-q+f*k,m.y-q+p-e*k);a.lineTo(m.x+q-p-f*k,m.y-q-p+e*k);a.stroke()}});mxMarker.addMarker("async",function(a,b,c,d,e,f,g,
+h,k,l){b=e*k*1.118;c=f*k*1.118;e*=g+k;f*=g+k;var m=d.clone();m.x-=b;m.y-=c;d.x+=1*-e-b;d.y+=1*-f-c;return function(){a.begin();a.moveTo(m.x,m.y);h?a.lineTo(m.x-e-f/2,m.y-f+e/2):a.lineTo(m.x+f/2-e,m.y-f-e/2);a.lineTo(m.x-e,m.y-f);a.close();l?a.fillAndStroke():a.stroke()}});mxMarker.addMarker("openAsync",function(a){a=null!=a?a:2;return function(b,c,d,e,f,g,h,k,l,m){f*=h+l;g*=h+l;var n=e.clone();return function(){b.begin();b.moveTo(n.x,n.y);k?b.lineTo(n.x-f-g/a,n.y-g+f/a):b.lineTo(n.x+g/a-f,n.y-g-f/
+a);b.stroke()}}}(2));if("undefined"!==typeof mxVertexHandler){var Ca=function(a,b,c){return na(a,["width"],b,function(b,d,e,f,g){g=a.shape.getEdgeWidth()*a.view.scale+c;return new mxPoint(f.x+d*b/4+e*g/2,f.y+e*b/4-d*g/2)},function(b,d,e,f,g,h){b=Math.sqrt(mxUtils.ptSegDistSq(f.x,f.y,g.x,g.y,h.x,h.y));a.style.width=Math.round(2*b)/a.view.scale-c})},na=function(a,b,c,d,e){var f=a.absolutePoints,g=f.length-1,h=a.view.translate,k=a.view.scale,l=c?f[0]:f[g],m=c?f[1]:f[g-1],n=m.x-l.x,p=m.y-l.y,q=Math.sqrt(n*
+n+p*p);return da(a,b,function(a){a=d.call(this,q,n/q,p/q,l,m);return new mxPoint(a.x/k-h.x,a.y/k-h.y)},function(a,b,c){a=Math.sqrt(n*n+p*p);b.x=(b.x+h.x)*k;b.y=(b.y+h.y)*k;e.call(this,a,n/a,p/a,l,m,b,c)})},ha=function(a){return function(b){return[da(b,["arrowWidth","arrowSize"],function(b){var c=Math.max(0,Math.min(1,mxUtils.getValue(this.state.style,"arrowWidth",T.prototype.arrowWidth))),d=Math.max(0,Math.min(a,mxUtils.getValue(this.state.style,"arrowSize",T.prototype.arrowSize)));return new mxPoint(b.x+
+(1-d)*b.width,b.y+(1-c)*b.height/2)},function(b,c){this.state.style.arrowWidth=Math.max(0,Math.min(1,Math.abs(b.y+b.height/2-c.y)/b.height*2));this.state.style.arrowSize=Math.max(0,Math.min(a,(b.x+b.width-c.x)/b.width))})]}},ya=function(a,b,c){return function(d){var e=[da(d,["size"],function(c){var d=Math.max(0,Math.min(c.width,Math.min(c.height,parseFloat(mxUtils.getValue(this.state.style,"size",b)))))*a;return new mxPoint(c.x+d,c.y+d)},function(b,c){this.state.style.size=Math.round(Math.max(0,Math.min(Math.min(b.width,
+c.x-b.x),Math.min(b.height,c.y-b.y)))/a)})];c&&mxUtils.getValue(d.style,mxConstants.STYLE_ROUNDED,!1)&&e.push(ga(d));return e}},la=function(a,b,c,d){c=null!=c?c:1;return function(e){var f=[da(e,["size"],function(b){var c=parseFloat(mxUtils.getValue(this.state.style,"size",a));return new mxPoint(b.x+c*b.width,b.getCenterY())},function(a,b){this.state.style.size=Math.max(0,Math.min(c,(b.x-a.x)/a.width))},null,d)];b&&mxUtils.getValue(e.style,mxConstants.STYLE_ROUNDED,!1)&&f.push(ga(e));return f}},Da=
+function(a){return function(b){var c=[da(b,["size"],function(b){var c=Math.max(0,Math.min(a,parseFloat(mxUtils.getValue(this.state.style,"size",n.prototype.size))));return new mxPoint(b.x+c*b.width*.75,b.y+b.height/4)},function(b,c){this.state.style.size=Math.max(0,Math.min(a,(c.x-b.x)/(.75*b.width)))},null,!0)];mxUtils.getValue(b.style,mxConstants.STYLE_ROUNDED,!1)&&c.push(ga(b));return c}},oa=function(){return function(a){var b=[];mxUtils.getValue(a.style,mxConstants.STYLE_ROUNDED,!1)&&b.push(ga(a));
+return b}},ga=function(a,b){return da(a,[mxConstants.STYLE_ARCSIZE],function(c){var d=null!=b?b:c.height/8;if("1"==mxUtils.getValue(a.style,mxConstants.STYLE_ABSOLUTE_ARCSIZE,0)){var e=mxUtils.getValue(a.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;return new mxPoint(c.x+c.width-Math.min(c.width/2,e),c.y+d)}e=Math.max(0,parseFloat(mxUtils.getValue(a.style,mxConstants.STYLE_ARCSIZE,100*mxConstants.RECTANGLE_ROUNDING_FACTOR)))/100;return new mxPoint(c.x+c.width-Math.min(Math.max(c.width/
+2,c.height/2),Math.min(c.width,c.height)*e),c.y+d)},function(b,c,d){"1"==mxUtils.getValue(a.style,mxConstants.STYLE_ABSOLUTE_ARCSIZE,0)?this.state.style[mxConstants.STYLE_ARCSIZE]=Math.round(Math.max(0,Math.min(b.width,2*(b.x+b.width-c.x)))):this.state.style[mxConstants.STYLE_ARCSIZE]=Math.round(Math.min(50,Math.max(0,100*(b.width-c.x+b.x)/Math.min(b.width,b.height))))})},da=function(a,b,c,d,e,f){var g=new mxHandle(a,null,mxVertexHandler.prototype.secondaryHandleImage);g.execute=function(){for(var a=
+0;a<b.length;a++)this.copyStyle(b[a])};g.getPosition=c;g.setPosition=d;g.ignoreGrid=null!=e?e:!0;if(f){var h=g.positionChanged;g.positionChanged=function(){h.apply(this,arguments);a.view.invalidate(this.state.cell);a.view.validate()}}return g},za={link:function(a){return[Ca(a,!0,10),Ca(a,!1,10)]},flexArrow:function(a){var b=a.view.graph.gridSize/a.view.scale,c=[];mxUtils.getValue(a.style,mxConstants.STYLE_STARTARROW,mxConstants.NONE)!=mxConstants.NONE&&(c.push(na(a,["width",mxConstants.STYLE_STARTSIZE,
+mxConstants.STYLE_ENDSIZE],!0,function(b,c,d,e,f){b=(a.shape.getEdgeWidth()-a.shape.strokewidth)*a.view.scale;f=3*mxUtils.getNumber(a.style,mxConstants.STYLE_STARTSIZE,mxConstants.ARROW_SIZE/5)*a.view.scale;return new mxPoint(e.x+c*(f+a.shape.strokewidth*a.view.scale)+d*b/2,e.y+d*(f+a.shape.strokewidth*a.view.scale)-c*b/2)},function(c,d,e,f,g,h,k){c=Math.sqrt(mxUtils.ptSegDistSq(f.x,f.y,g.x,g.y,h.x,h.y));d=mxUtils.ptLineDist(f.x,f.y,f.x+e,f.y-d,h.x,h.y);a.style[mxConstants.STYLE_STARTSIZE]=Math.round(100*
+(d-a.shape.strokewidth)/3)/100/a.view.scale;a.style.width=Math.round(2*c)/a.view.scale;mxEvent.isControlDown(k.getEvent())&&(a.style[mxConstants.STYLE_ENDSIZE]=a.style[mxConstants.STYLE_STARTSIZE]);mxEvent.isAltDown(k.getEvent())||Math.abs(parseFloat(a.style[mxConstants.STYLE_STARTSIZE])-parseFloat(a.style[mxConstants.STYLE_ENDSIZE]))<b/6&&(a.style[mxConstants.STYLE_STARTSIZE]=a.style[mxConstants.STYLE_ENDSIZE])})),c.push(na(a,["startWidth","endWidth",mxConstants.STYLE_STARTSIZE,mxConstants.STYLE_ENDSIZE],
+!0,function(b,c,d,e,f){b=(a.shape.getStartArrowWidth()-a.shape.strokewidth)*a.view.scale;f=3*mxUtils.getNumber(a.style,mxConstants.STYLE_STARTSIZE,mxConstants.ARROW_SIZE/5)*a.view.scale;return new mxPoint(e.x+c*(f+a.shape.strokewidth*a.view.scale)+d*b/2,e.y+d*(f+a.shape.strokewidth*a.view.scale)-c*b/2)},function(c,d,e,f,g,h,k){c=Math.sqrt(mxUtils.ptSegDistSq(f.x,f.y,g.x,g.y,h.x,h.y));d=mxUtils.ptLineDist(f.x,f.y,f.x+e,f.y-d,h.x,h.y);a.style[mxConstants.STYLE_STARTSIZE]=Math.round(100*(d-a.shape.strokewidth)/
+3)/100/a.view.scale;a.style.startWidth=Math.max(0,Math.round(2*c)-a.shape.getEdgeWidth())/a.view.scale;mxEvent.isControlDown(k.getEvent())&&(a.style[mxConstants.STYLE_ENDSIZE]=a.style[mxConstants.STYLE_STARTSIZE],a.style.endWidth=a.style.startWidth);mxEvent.isAltDown(k.getEvent())||(Math.abs(parseFloat(a.style[mxConstants.STYLE_STARTSIZE])-parseFloat(a.style[mxConstants.STYLE_ENDSIZE]))<b/6&&(a.style[mxConstants.STYLE_STARTSIZE]=a.style[mxConstants.STYLE_ENDSIZE]),Math.abs(parseFloat(a.style.startWidth)-
+parseFloat(a.style.endWidth))<b&&(a.style.startWidth=a.style.endWidth))})));mxUtils.getValue(a.style,mxConstants.STYLE_ENDARROW,mxConstants.NONE)!=mxConstants.NONE&&(c.push(na(a,["width",mxConstants.STYLE_STARTSIZE,mxConstants.STYLE_ENDSIZE],!1,function(b,c,d,e,f){b=(a.shape.getEdgeWidth()-a.shape.strokewidth)*a.view.scale;f=3*mxUtils.getNumber(a.style,mxConstants.STYLE_ENDSIZE,mxConstants.ARROW_SIZE/5)*a.view.scale;return new mxPoint(e.x+c*(f+a.shape.strokewidth*a.view.scale)-d*b/2,e.y+d*(f+a.shape.strokewidth*
+a.view.scale)+c*b/2)},function(c,d,e,f,g,h,k){c=Math.sqrt(mxUtils.ptSegDistSq(f.x,f.y,g.x,g.y,h.x,h.y));d=mxUtils.ptLineDist(f.x,f.y,f.x+e,f.y-d,h.x,h.y);a.style[mxConstants.STYLE_ENDSIZE]=Math.round(100*(d-a.shape.strokewidth)/3)/100/a.view.scale;a.style.width=Math.round(2*c)/a.view.scale;mxEvent.isControlDown(k.getEvent())&&(a.style[mxConstants.STYLE_STARTSIZE]=a.style[mxConstants.STYLE_ENDSIZE]);mxEvent.isAltDown(k.getEvent())||Math.abs(parseFloat(a.style[mxConstants.STYLE_ENDSIZE])-parseFloat(a.style[mxConstants.STYLE_STARTSIZE]))<
+b/6&&(a.style[mxConstants.STYLE_ENDSIZE]=a.style[mxConstants.STYLE_STARTSIZE])})),c.push(na(a,["startWidth","endWidth",mxConstants.STYLE_STARTSIZE,mxConstants.STYLE_ENDSIZE],!1,function(b,c,d,e,f){b=(a.shape.getEndArrowWidth()-a.shape.strokewidth)*a.view.scale;f=3*mxUtils.getNumber(a.style,mxConstants.STYLE_ENDSIZE,mxConstants.ARROW_SIZE/5)*a.view.scale;return new mxPoint(e.x+c*(f+a.shape.strokewidth*a.view.scale)-d*b/2,e.y+d*(f+a.shape.strokewidth*a.view.scale)+c*b/2)},function(c,d,e,f,g,h,k){c=
+Math.sqrt(mxUtils.ptSegDistSq(f.x,f.y,g.x,g.y,h.x,h.y));d=mxUtils.ptLineDist(f.x,f.y,f.x+e,f.y-d,h.x,h.y);a.style[mxConstants.STYLE_ENDSIZE]=Math.round(100*(d-a.shape.strokewidth)/3)/100/a.view.scale;a.style.endWidth=Math.max(0,Math.round(2*c)-a.shape.getEdgeWidth())/a.view.scale;mxEvent.isControlDown(k.getEvent())&&(a.style[mxConstants.STYLE_STARTSIZE]=a.style[mxConstants.STYLE_ENDSIZE],a.style.startWidth=a.style.endWidth);mxEvent.isAltDown(k.getEvent())||(Math.abs(parseFloat(a.style[mxConstants.STYLE_ENDSIZE])-
+parseFloat(a.style[mxConstants.STYLE_STARTSIZE]))<b/6&&(a.style[mxConstants.STYLE_ENDSIZE]=a.style[mxConstants.STYLE_STARTSIZE]),Math.abs(parseFloat(a.style.endWidth)-parseFloat(a.style.startWidth))<b&&(a.style.endWidth=a.style.startWidth))})));return c},swimlane:function(a){var b=[da(a,[mxConstants.STYLE_STARTSIZE],function(b){var c=parseFloat(mxUtils.getValue(a.style,mxConstants.STYLE_STARTSIZE,mxConstants.DEFAULT_STARTSIZE));return 1==mxUtils.getValue(a.style,mxConstants.STYLE_HORIZONTAL,1)?new mxPoint(b.getCenterX(),
+b.y+Math.max(0,Math.min(b.height,c))):new mxPoint(b.x+Math.max(0,Math.min(b.width,c)),b.getCenterY())},function(b,c){a.style[mxConstants.STYLE_STARTSIZE]=1==mxUtils.getValue(this.state.style,mxConstants.STYLE_HORIZONTAL,1)?Math.round(Math.max(0,Math.min(b.height,c.y-b.y))):Math.round(Math.max(0,Math.min(b.width,c.x-b.x)))})];if(mxUtils.getValue(a.style,mxConstants.STYLE_ROUNDED)){var c=parseFloat(mxUtils.getValue(a.style,mxConstants.STYLE_STARTSIZE,mxConstants.DEFAULT_STARTSIZE));b.push(ga(a,c/2))}return b},
+label:oa(),ext:oa(),rectangle:oa(),triangle:oa(),rhombus:oa(),umlLifeline:function(a){return[da(a,["size"],function(a){var b=Math.max(0,Math.min(a.height,parseFloat(mxUtils.getValue(this.state.style,"size",L.prototype.size))));return new mxPoint(a.getCenterX(),a.y+b)},function(a,b){this.state.style.size=Math.round(Math.max(0,Math.min(a.height,b.y-a.y)))},!1)]},umlFrame:function(a){return[da(a,["width","height"],function(a){var b=Math.max(H.prototype.corner,Math.min(a.width,mxUtils.getValue(this.state.style,
+"width",H.prototype.width))),c=Math.max(1.5*H.prototype.corner,Math.min(a.height,mxUtils.getValue(this.state.style,"height",H.prototype.height)));return new mxPoint(a.x+b,a.y+c)},function(a,b){this.state.style.width=Math.round(Math.max(H.prototype.corner,Math.min(a.width,b.x-a.x)));this.state.style.height=Math.round(Math.max(1.5*H.prototype.corner,Math.min(a.height,b.y-a.y)))},!1)]},process:function(a){var b=[da(a,["size"],function(a){var b=Math.max(0,Math.min(.5,parseFloat(mxUtils.getValue(this.state.style,
+"size",t.prototype.size))));return new mxPoint(a.x+a.width*b,a.y+a.height/4)},function(a,b){this.state.style.size=Math.max(0,Math.min(.5,(b.x-a.x)/a.width))})];mxUtils.getValue(a.style,mxConstants.STYLE_ROUNDED,!1)&&b.push(ga(a));return b},cross:function(a){return[da(a,["size"],function(a){var b=Math.min(a.width,a.height),b=Math.max(0,Math.min(1,mxUtils.getValue(this.state.style,"size",ma.prototype.size)))*b/2;return new mxPoint(a.getCenterX()-b,a.getCenterY()-b)},function(a,b){var c=Math.min(a.width,
+a.height);this.state.style.size=Math.max(0,Math.min(1,Math.min(Math.max(0,a.getCenterY()-b.y)/c*2,Math.max(0,a.getCenterX()-b.x)/c*2)))})]},note:function(a){return[da(a,["size"],function(a){var b=Math.max(0,Math.min(a.width,Math.min(a.height,parseFloat(mxUtils.getValue(this.state.style,"size",e.prototype.size)))));return new mxPoint(a.x+a.width-b,a.y+b)},function(a,b){this.state.style.size=Math.round(Math.max(0,Math.min(Math.min(a.width,a.x+a.width-b.x),Math.min(a.height,b.y-a.y))))})]},manualInput:function(a){var b=
+[da(a,["size"],function(a){var b=Math.max(0,Math.min(a.height,mxUtils.getValue(this.state.style,"size",J.prototype.size)));return new mxPoint(a.x+a.width/4,a.y+3*b/4)},function(a,b){this.state.style.size=Math.round(Math.max(0,Math.min(a.height,4*(b.y-a.y)/3)))})];mxUtils.getValue(a.style,mxConstants.STYLE_ROUNDED,!1)&&b.push(ga(a));return b},dataStorage:function(a){return[da(a,["size"],function(a){var b=Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.state.style,"size",aa.prototype.size))));
+return new mxPoint(a.x+(1-b)*a.width,a.getCenterY())},function(a,b){this.state.style.size=Math.max(0,Math.min(1,(a.x+a.width-b.x)/a.width))})]},callout:function(a){var b=[da(a,["size","position"],function(a){var b=Math.max(0,Math.min(a.height,mxUtils.getValue(this.state.style,"size",w.prototype.size))),c=Math.max(0,Math.min(1,mxUtils.getValue(this.state.style,"position",w.prototype.position)));mxUtils.getValue(this.state.style,"base",w.prototype.base);return new mxPoint(a.x+c*a.width,a.y+a.height-
+b)},function(a,b){mxUtils.getValue(this.state.style,"base",w.prototype.base);this.state.style.size=Math.round(Math.max(0,Math.min(a.height,a.y+a.height-b.y)));this.state.style.position=Math.round(100*Math.max(0,Math.min(1,(b.x-a.x)/a.width)))/100}),da(a,["position2"],function(a){var b=Math.max(0,Math.min(1,mxUtils.getValue(this.state.style,"position2",w.prototype.position2)));return new mxPoint(a.x+b*a.width,a.y+a.height)},function(a,b){this.state.style.position2=Math.round(100*Math.max(0,Math.min(1,
+(b.x-a.x)/a.width)))/100}),da(a,["base"],function(a){var b=Math.max(0,Math.min(a.height,mxUtils.getValue(this.state.style,"size",w.prototype.size))),c=Math.max(0,Math.min(1,mxUtils.getValue(this.state.style,"position",w.prototype.position))),d=Math.max(0,Math.min(a.width,mxUtils.getValue(this.state.style,"base",w.prototype.base)));return new mxPoint(a.x+Math.min(a.width,c*a.width+d),a.y+a.height-b)},function(a,b){var c=Math.max(0,Math.min(1,mxUtils.getValue(this.state.style,"position",w.prototype.position)));
+this.state.style.base=Math.round(Math.max(0,Math.min(a.width,b.x-a.x-c*a.width)))})];mxUtils.getValue(a.style,mxConstants.STYLE_ROUNDED,!1)&&b.push(ga(a));return b},internalStorage:function(a){var b=[da(a,["dx","dy"],function(a){var b=Math.max(0,Math.min(a.width,mxUtils.getValue(this.state.style,"dx",ca.prototype.dx))),c=Math.max(0,Math.min(a.height,mxUtils.getValue(this.state.style,"dy",ca.prototype.dy)));return new mxPoint(a.x+b,a.y+c)},function(a,b){this.state.style.dx=Math.round(Math.max(0,Math.min(a.width,
+b.x-a.x)));this.state.style.dy=Math.round(Math.max(0,Math.min(a.height,b.y-a.y)))})];mxUtils.getValue(a.style,mxConstants.STYLE_ROUNDED,!1)&&b.push(ga(a));return b},corner:function(a){return[da(a,["dx","dy"],function(a){var b=Math.max(0,Math.min(a.width,mxUtils.getValue(this.state.style,"dx",N.prototype.dx))),c=Math.max(0,Math.min(a.height,mxUtils.getValue(this.state.style,"dy",N.prototype.dy)));return new mxPoint(a.x+b,a.y+c)},function(a,b){this.state.style.dx=Math.round(Math.max(0,Math.min(a.width,
+b.x-a.x)));this.state.style.dy=Math.round(Math.max(0,Math.min(a.height,b.y-a.y)))})]},tee:function(a){return[da(a,["dx","dy"],function(a){var b=Math.max(0,Math.min(a.width,mxUtils.getValue(this.state.style,"dx",X.prototype.dx))),c=Math.max(0,Math.min(a.height,mxUtils.getValue(this.state.style,"dy",X.prototype.dy)));return new mxPoint(a.x+(a.width+b)/2,a.y+c)},function(a,b){this.state.style.dx=Math.round(Math.max(0,2*Math.min(a.width/2,b.x-a.x-a.width/2)));this.state.style.dy=Math.round(Math.max(0,
+Math.min(a.height,b.y-a.y)))})]},singleArrow:ha(1),doubleArrow:ha(.5),folder:function(a){return[da(a,["tabWidth","tabHeight"],function(a){var b=Math.max(0,Math.min(a.width,mxUtils.getValue(this.state.style,"tabWidth",g.prototype.tabWidth))),c=Math.max(0,Math.min(a.height,mxUtils.getValue(this.state.style,"tabHeight",g.prototype.tabHeight)));mxUtils.getValue(this.state.style,"tabPosition",g.prototype.tabPosition)==mxConstants.ALIGN_RIGHT&&(b=a.width-b);return new mxPoint(a.x+b,a.y+c)},function(a,b){var c=
+Math.max(0,Math.min(a.width,b.x-a.x));mxUtils.getValue(this.state.style,"tabPosition",g.prototype.tabPosition)==mxConstants.ALIGN_RIGHT&&(c=a.width-c);this.state.style.tabWidth=Math.round(c);this.state.style.tabHeight=Math.round(Math.max(0,Math.min(a.height,b.y-a.y)))})]},document:function(a){return[da(a,["size"],function(a){var b=Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.state.style,"size",l.prototype.size))));return new mxPoint(a.x+3*a.width/4,a.y+(1-b)*a.height)},function(a,b){this.state.style.size=
+Math.max(0,Math.min(1,(a.y+a.height-b.y)/a.height))})]},tape:function(a){return[da(a,["size"],function(a){var b=Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.state.style,"size",k.prototype.size))));return new mxPoint(a.getCenterX(),a.y+b*a.height/2)},function(a,b){this.state.style.size=Math.max(0,Math.min(1,(b.y-a.y)/a.height*2))})]},offPageConnector:function(a){return[da(a,["size"],function(a){var b=Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.state.style,"size",O.prototype.size))));
+return new mxPoint(a.getCenterX(),a.y+(1-b)*a.height)},function(a,b){this.state.style.size=Math.max(0,Math.min(1,(a.y+a.height-b.y)/a.height))})]},step:la(x.prototype.size,!0,null,!0),hexagon:la(y.prototype.size,!0,.5,!0),curlyBracket:la(p.prototype.size,!1),display:la(ia.prototype.size,!1),cube:ya(1,a.prototype.size,!1),card:ya(.5,h.prototype.size,!0),loopLimit:ya(.5,W.prototype.size,!0),trapezoid:Da(.5),parallelogram:Da(1)};Graph.createHandle=da;Graph.handleFactory=za;mxVertexHandler.prototype.createCustomHandles=
+function(){if(1==this.state.view.graph.getSelectionCount()&&this.graph.isCellRotatable(this.state.cell)){var a=this.state.style.shape;null==this.state.view.graph.cellRenderer.defaultShapes[a]&&null==mxStencilRegistry.getStencil(a)&&(a=mxConstants.SHAPE_RECTANGLE);a=za[a];if(null!=a)return a(this.state)}return null};mxEdgeHandler.prototype.createCustomHandles=function(){if(1==this.state.view.graph.getSelectionCount()){var a=this.state.style.shape;null==this.state.view.graph.cellRenderer.defaultShapes[a]&&
+null==mxStencilRegistry.getStencil(a)&&(a=mxConstants.SHAPE_CONNECTOR);a=za[a];if(null!=a)return a(this.state)}return null}}else Graph.createHandle=function(){},Graph.handleFactory={};var sa=new mxPoint(1,0),ta=new mxPoint(1,0),ha=mxUtils.toRadians(-30),sa=mxUtils.getRotatedPoint(sa,Math.cos(ha),Math.sin(ha)),ha=mxUtils.toRadians(-150),ta=mxUtils.getRotatedPoint(ta,Math.cos(ha),Math.sin(ha));mxEdgeStyle.IsometricConnector=function(a,b,c,d,e){var f=a.view;d=null!=d&&0<d.length?d[0]:null;var g=a.absolutePoints,
+h=g[0],g=g[g.length-1];null!=d&&(d=f.transformControlPoint(a,d));null==h&&null!=b&&(h=new mxPoint(b.getCenterX(),b.getCenterY()));null==g&&null!=c&&(g=new mxPoint(c.getCenterX(),c.getCenterY()));var k=sa.x,l=sa.y,m=ta.x,n=ta.y,p="horizontal"==mxUtils.getValue(a.style,"elbow","horizontal");if(null!=g&&null!=h){a=function(a,b,c){a-=q.x;var d=b-q.y;b=(n*a-m*d)/(k*n-l*m);a=(l*a-k*d)/(l*m-k*n);p?(c&&(q=new mxPoint(q.x+k*b,q.y+l*b),e.push(q)),q=new mxPoint(q.x+m*a,q.y+n*a)):(c&&(q=new mxPoint(q.x+m*a,q.y+
+n*a),e.push(q)),q=new mxPoint(q.x+k*b,q.y+l*b));e.push(q)};var q=h;null==d&&(d=new mxPoint(h.x+(g.x-h.x)/2,h.y+(g.y-h.y)/2));a(d.x,d.y,!0);a(g.x,g.y,!1)}};mxStyleRegistry.putValue("isometricEdgeStyle",mxEdgeStyle.IsometricConnector);var Ia=Graph.prototype.createEdgeHandler;Graph.prototype.createEdgeHandler=function(a,b){if(b==mxEdgeStyle.IsometricConnector){var c=new mxElbowEdgeHandler(a);c.snapToTerminals=!1;return c}return Ia.apply(this,arguments)};b.prototype.constraints=[];c.prototype.constraints=
+[];w.prototype.constraints=[];mxRectangleShape.prototype.constraints=[new mxConnectionConstraint(new mxPoint(.25,0),!0),new mxConnectionConstraint(new mxPoint(.5,0),!0),new mxConnectionConstraint(new mxPoint(.75,0),!0),new mxConnectionConstraint(new mxPoint(0,.25),!0),new mxConnectionConstraint(new mxPoint(0,.5),!0),new mxConnectionConstraint(new mxPoint(0,.75),!0),new mxConnectionConstraint(new mxPoint(1,.25),!0),new mxConnectionConstraint(new mxPoint(1,.5),!0),new mxConnectionConstraint(new mxPoint(1,
+.75),!0),new mxConnectionConstraint(new mxPoint(.25,1),!0),new mxConnectionConstraint(new mxPoint(.5,1),!0),new mxConnectionConstraint(new mxPoint(.75,1),!0)];mxEllipse.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,0),!0),new mxConnectionConstraint(new mxPoint(1,0),!0),new mxConnectionConstraint(new mxPoint(0,1),!0),new mxConnectionConstraint(new mxPoint(1,1),!0),new mxConnectionConstraint(new mxPoint(.5,0),!0),new mxConnectionConstraint(new mxPoint(.5,1),!0),new mxConnectionConstraint(new mxPoint(0,
+.5),!0),new mxConnectionConstraint(new mxPoint(1,.5))];mxLabel.prototype.constraints=mxRectangleShape.prototype.constraints;mxImageShape.prototype.constraints=mxRectangleShape.prototype.constraints;mxSwimlane.prototype.constraints=mxRectangleShape.prototype.constraints;u.prototype.constraints=mxRectangleShape.prototype.constraints;e.prototype.constraints=mxRectangleShape.prototype.constraints;h.prototype.constraints=mxRectangleShape.prototype.constraints;a.prototype.constraints=mxRectangleShape.prototype.constraints;
+g.prototype.constraints=mxRectangleShape.prototype.constraints;ca.prototype.constraints=mxRectangleShape.prototype.constraints;aa.prototype.constraints=mxRectangleShape.prototype.constraints;Q.prototype.constraints=mxEllipse.prototype.constraints;fa.prototype.constraints=mxEllipse.prototype.constraints;Y.prototype.constraints=mxEllipse.prototype.constraints;pa.prototype.constraints=mxEllipse.prototype.constraints;J.prototype.constraints=mxRectangleShape.prototype.constraints;qa.prototype.constraints=
+mxRectangleShape.prototype.constraints;ia.prototype.constraints=mxRectangleShape.prototype.constraints;W.prototype.constraints=mxRectangleShape.prototype.constraints;O.prototype.constraints=mxRectangleShape.prototype.constraints;mxCylinder.prototype.constraints=[new mxConnectionConstraint(new mxPoint(.15,.05),!1),new mxConnectionConstraint(new mxPoint(.5,0),!0),new mxConnectionConstraint(new mxPoint(.85,.05),!1),new mxConnectionConstraint(new mxPoint(0,.3),!0),new mxConnectionConstraint(new mxPoint(0,
+.5),!0),new mxConnectionConstraint(new mxPoint(0,.7),!0),new mxConnectionConstraint(new mxPoint(1,.3),!0),new mxConnectionConstraint(new mxPoint(1,.5),!0),new mxConnectionConstraint(new mxPoint(1,.7),!0),new mxConnectionConstraint(new mxPoint(.15,.95),!1),new mxConnectionConstraint(new mxPoint(.5,1),!0),new mxConnectionConstraint(new mxPoint(.85,.95),!1)];E.prototype.constraints=[new mxConnectionConstraint(new mxPoint(.25,.1),!1),new mxConnectionConstraint(new mxPoint(.5,0),!1),new mxConnectionConstraint(new mxPoint(.75,
+.1),!1),new mxConnectionConstraint(new mxPoint(0,1/3),!1),new mxConnectionConstraint(new mxPoint(0,1),!1),new mxConnectionConstraint(new mxPoint(1,1/3),!1),new mxConnectionConstraint(new mxPoint(1,1),!1),new mxConnectionConstraint(new mxPoint(.5,.5),!1)];ba.prototype.constraints=[new mxConnectionConstraint(new mxPoint(.25,0),!0),new mxConnectionConstraint(new mxPoint(.5,0),!0),new mxConnectionConstraint(new mxPoint(.75,0),!0),new mxConnectionConstraint(new mxPoint(0,.3),!0),new mxConnectionConstraint(new mxPoint(0,
+.7),!0),new mxConnectionConstraint(new mxPoint(1,.25),!0),new mxConnectionConstraint(new mxPoint(1,.5),!0),new mxConnectionConstraint(new mxPoint(1,.75),!0),new mxConnectionConstraint(new mxPoint(.25,1),!0),new mxConnectionConstraint(new mxPoint(.5,1),!0),new mxConnectionConstraint(new mxPoint(.75,1),!0)];mxActor.prototype.constraints=[new mxConnectionConstraint(new mxPoint(.5,0),!0),new mxConnectionConstraint(new mxPoint(.25,.2),!1),new mxConnectionConstraint(new mxPoint(.1,.5),!1),new mxConnectionConstraint(new mxPoint(0,
+.75),!0),new mxConnectionConstraint(new mxPoint(.75,.25),!1),new mxConnectionConstraint(new mxPoint(.9,.5),!1),new mxConnectionConstraint(new mxPoint(1,.75),!0),new mxConnectionConstraint(new mxPoint(.25,1),!0),new mxConnectionConstraint(new mxPoint(.5,1),!0),new mxConnectionConstraint(new mxPoint(.75,1),!0)];f.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,0),!1),new mxConnectionConstraint(new mxPoint(.5,.25),!1),new mxConnectionConstraint(new mxPoint(1,0),!1),new mxConnectionConstraint(new mxPoint(.25,
+.5),!1),new mxConnectionConstraint(new mxPoint(.75,.5),!1),new mxConnectionConstraint(new mxPoint(0,1),!1),new mxConnectionConstraint(new mxPoint(.5,.75),!1),new mxConnectionConstraint(new mxPoint(1,1),!1)];k.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,.35),!1),new mxConnectionConstraint(new mxPoint(0,.5),!1),new mxConnectionConstraint(new mxPoint(0,.65),!1),new mxConnectionConstraint(new mxPoint(1,.35),!1),new mxConnectionConstraint(new mxPoint(1,.5),!1),new mxConnectionConstraint(new mxPoint(1,
+.65),!1),new mxConnectionConstraint(new mxPoint(.25,1),!1),new mxConnectionConstraint(new mxPoint(.75,0),!1)];x.prototype.constraints=[new mxConnectionConstraint(new mxPoint(.25,0),!0),new mxConnectionConstraint(new mxPoint(.5,0),!0),new mxConnectionConstraint(new mxPoint(.75,0),!0),new mxConnectionConstraint(new mxPoint(.25,1),!0),new mxConnectionConstraint(new mxPoint(.5,1),!0),new mxConnectionConstraint(new mxPoint(.75,1),!0),new mxConnectionConstraint(new mxPoint(.1,.25),!0),new mxConnectionConstraint(new mxPoint(.2,
+.5),!0),new mxConnectionConstraint(new mxPoint(.1,.75),!0),new mxConnectionConstraint(new mxPoint(.9,.25),!0),new mxConnectionConstraint(new mxPoint(1,.5),!0),new mxConnectionConstraint(new mxPoint(.9,.75),!0)];mxLine.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,.5),!1),new mxConnectionConstraint(new mxPoint(.25,.5),!1),new mxConnectionConstraint(new mxPoint(.75,.5),!1),new mxConnectionConstraint(new mxPoint(1,.5),!1)];U.prototype.constraints=[new mxConnectionConstraint(new mxPoint(.5,
+0),!1),new mxConnectionConstraint(new mxPoint(.5,1),!1)];mxDoubleEllipse.prototype.constraints=mxEllipse.prototype.constraints;mxRhombus.prototype.constraints=mxEllipse.prototype.constraints;mxTriangle.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,.25),!0),new mxConnectionConstraint(new mxPoint(0,.5),!0),new mxConnectionConstraint(new mxPoint(0,.75),!0),new mxConnectionConstraint(new mxPoint(.5,0),!0),new mxConnectionConstraint(new mxPoint(.5,1),!0),new mxConnectionConstraint(new mxPoint(1,
+.5),!0)];mxHexagon.prototype.constraints=[new mxConnectionConstraint(new mxPoint(.375,0),!0),new mxConnectionConstraint(new mxPoint(.5,0),!0),new mxConnectionConstraint(new mxPoint(.625,0),!0),new mxConnectionConstraint(new mxPoint(.125,.25),!0),new mxConnectionConstraint(new mxPoint(0,.5),!0),new mxConnectionConstraint(new mxPoint(.125,.75),!0),new mxConnectionConstraint(new mxPoint(.875,.25),!0),new mxConnectionConstraint(new mxPoint(0,.5),!0),new mxConnectionConstraint(new mxPoint(1,.5),!0),new mxConnectionConstraint(new mxPoint(.875,
+.75),!0),new mxConnectionConstraint(new mxPoint(.375,1),!0),new mxConnectionConstraint(new mxPoint(.5,1),!0),new mxConnectionConstraint(new mxPoint(.625,1),!0)];mxCloud.prototype.constraints=[new mxConnectionConstraint(new mxPoint(.25,.25),!1),new mxConnectionConstraint(new mxPoint(.4,.1),!1),new mxConnectionConstraint(new mxPoint(.16,.55),!1),new mxConnectionConstraint(new mxPoint(.07,.4),!1),new mxConnectionConstraint(new mxPoint(.31,.8),!1),new mxConnectionConstraint(new mxPoint(.13,.77),!1),new mxConnectionConstraint(new mxPoint(.8,
+.8),!1),new mxConnectionConstraint(new mxPoint(.55,.95),!1),new mxConnectionConstraint(new mxPoint(.875,.5),!1),new mxConnectionConstraint(new mxPoint(.96,.7),!1),new mxConnectionConstraint(new mxPoint(.625,.2),!1),new mxConnectionConstraint(new mxPoint(.88,.25),!1)];m.prototype.constraints=mxRectangleShape.prototype.constraints;n.prototype.constraints=mxRectangleShape.prototype.constraints;l.prototype.constraints=[new mxConnectionConstraint(new mxPoint(.25,0),!0),new mxConnectionConstraint(new mxPoint(.5,
+0),!0),new mxConnectionConstraint(new mxPoint(.75,0),!0),new mxConnectionConstraint(new mxPoint(0,.25),!0),new mxConnectionConstraint(new mxPoint(0,.5),!0),new mxConnectionConstraint(new mxPoint(0,.75),!0),new mxConnectionConstraint(new mxPoint(1,.25),!0),new mxConnectionConstraint(new mxPoint(1,.5),!0),new mxConnectionConstraint(new mxPoint(1,.75),!0)];mxArrow.prototype.constraints=null;X.prototype.constraints=null;N.prototype.constraints=null;K.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,
+0),!1),new mxConnectionConstraint(new mxPoint(0,.5),!1),new mxConnectionConstraint(new mxPoint(0,1),!1),new mxConnectionConstraint(new mxPoint(.25,.5),!1),new mxConnectionConstraint(new mxPoint(.5,.5),!1),new mxConnectionConstraint(new mxPoint(.75,.5),!1),new mxConnectionConstraint(new mxPoint(1,0),!1),new mxConnectionConstraint(new mxPoint(1,.5),!1),new mxConnectionConstraint(new mxPoint(1,1),!1)];T.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,.5),!1),new mxConnectionConstraint(new mxPoint(1,
+.5),!1)];ea.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,.5),!1),new mxConnectionConstraint(new mxPoint(1,.5),!1)];ma.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,.5),!1),new mxConnectionConstraint(new mxPoint(1,.5),!1),new mxConnectionConstraint(new mxPoint(.5,0),!1),new mxConnectionConstraint(new mxPoint(.5,1),!1)];L.prototype.constraints=null;P.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,.25),!1),new mxConnectionConstraint(new mxPoint(0,
+.5),!1),new mxConnectionConstraint(new mxPoint(0,.75),!1),new mxConnectionConstraint(new mxPoint(1,.5),!1),new mxConnectionConstraint(new mxPoint(.7,.1),!1),new mxConnectionConstraint(new mxPoint(.7,.9),!1)];V.prototype.constraints=[new mxConnectionConstraint(new mxPoint(.175,.25),!1),new mxConnectionConstraint(new mxPoint(.25,.5),!1),new mxConnectionConstraint(new mxPoint(.175,.75),!1),new mxConnectionConstraint(new mxPoint(1,.5),!1),new mxConnectionConstraint(new mxPoint(.7,.1),!1),new mxConnectionConstraint(new mxPoint(.7,
+.9),!1)]})();
 (function(x,r){function N(){if(!t){t=!0;window.MathJax={skipStartupTypeset:!0,showMathMenu:!1,messageStyle:"none",AuthorInit:function(){MathJax.Hub.Config({"HTML-CSS":{availableFonts:[],webFont:"STIX-Web",imageFont:null}});MathJax.Hub.Register.StartupHook("Begin",function(){for(var a=0;a<p.length;a++)MathJax.Hub.Queue(["Typeset",MathJax.Hub,p[a]])})}};var a=document.createElement("script");a.type="text/javascript";a.src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.0/MathJax.js?config=TeX-MML-AM_HTMLorMML";
 document.getElementsByTagName("head")[0].appendChild(a)}}function O(a){"undefined"!==typeof MathJax&&"undefined"!==typeof MathJax.Hub?MathJax.Hub.Queue(["Typeset",MathJax.Hub,a.container]):p.push(a.container);a.addListener(mxEvent.SIZE,function(e,m){"undefined"!==typeof MathJax&&"undefined"!==typeof MathJax.Hub&&MathJax.Hub.Queue(["Typeset",MathJax.Hub,a.container])})}mxStencilRegistry.dynamicLoading=!1;try{var e=document.createElement("style");e.type="text/css";e.innerHTML="div.mxTooltip {\n-webkit-box-shadow: 3px 3px 12px #C0C0C0;\n-moz-box-shadow: 3px 3px 12px #C0C0C0;\nbox-shadow: 3px 3px 12px #C0C0C0;\nbackground: #FFFFCC;\nborder-style: solid;\nborder-width: 1px;\nborder-color: black;\nfont-family: Arial;\nfont-size: 8pt;\nposition: absolute;\ncursor: default;\npadding: 4px;\ncolor: black;}";
 document.getElementsByTagName("head")[0].appendChild(e)}catch(a){}var G=mxClient.NO_FO,t="undefined"!==typeof MathJax&&"undefined"!==typeof MathJax.Hub,p=[];mxGraph.prototype.getImageFromBundles=function(a){return null!=a?("http://"!=a.substring(0,7)&&"https://"!=a.substring(0,8)&&"data:image"!=a.substring(0,10)&&("/"==a.charAt(0)&&(a=a.substring(1,a.length)),a="https://www.draw.io/"+a),a):null};if(null!=r)for(e=0;e<r.length;e++){var y=mxUtils.parseXml(r[e]);mxStencilRegistry.parseStencilSet(y.documentElement)}mxClient.IS_TOUCH&&
diff --git a/war/js/mxgraph/EditorUi.js b/war/js/mxgraph/EditorUi.js
index 356d237b983bccac40fce3fd900993e4681c1af9..303f519681824ec4b4cd23af0d37eafc31f7daec 100644
--- a/war/js/mxgraph/EditorUi.js
+++ b/war/js/mxgraph/EditorUi.js
@@ -1324,43 +1324,60 @@ EditorUi.prototype.initCanvas = function()
 	
 	if (this.editor.chromeless)
 	{
-		resize = mxUtils.bind(this, function(autoscale, maxScale)
-	   	{
-			if (graph.container != null)
-			{
-				var b = (graph.pageVisible) ? graph.view.getBackgroundPageBounds() : graph.getGraphBounds();
-				var tr = graph.view.translate;
-				var s = graph.view.scale;
-				
-				// Normalizes the bounds
-				b = mxRectangle.fromRectangle(b);
-				b.x = b.x / s - tr.x;
-				b.y = b.y / s - tr.y;
-				b.width /= s;
-				b.height /= s;
-				
-				var st = graph.container.scrollTop;
-				var sl = graph.container.scrollLeft;
-				var sb = (mxClient.IS_QUIRKS || document.documentMode >= 8) ? 20 : 14;
-				
-				if (document.documentMode == 8 || document.documentMode == 9)
-				{
-					sb += 3;
-				}
-				
-				var cw = graph.container.offsetWidth - sb;
-				var ch = graph.container.offsetHeight - sb;
-				
-				var ns = (autoscale) ? Math.max(0.3, Math.min(maxScale || 1, cw / b.width)) : s;
-				var dx = Math.max((cw - ns * b.width) / 2, 0) / ns;
-				var dy = Math.max((ch - ns * b.height) / this.lightboxVerticalDivider, 0) / ns;
-				
-				graph.view.scaleAndTranslate(ns, Math.floor(dx - b.x), Math.floor(dy - b.y));
-
-				graph.container.scrollTop = st * ns / s;
-				graph.container.scrollLeft = sl * ns / s;
-			}
-	   	});
+        resize = mxUtils.bind(this, function(autoscale, maxScale, cx, cy)
+        {
+            if (graph.container != null)
+            {
+                cx = (cx != null) ? cx : 0;
+                cy = (cy != null) ? cy : 0;
+                
+                var bds = (graph.pageVisible) ? graph.view.getBackgroundPageBounds() : graph.getGraphBounds();
+                var scroll = mxUtils.hasScrollbars(graph.container);
+                var tr = graph.view.translate;
+                var s = graph.view.scale;
+                
+                // Normalizes the bounds
+                var b = mxRectangle.fromRectangle(bds);
+                b.x = b.x / s - tr.x;
+                b.y = b.y / s - tr.y;
+                b.width /= s;
+                b.height /= s;
+                
+                var st = graph.container.scrollTop;
+                var sl = graph.container.scrollLeft;
+                var sb = (mxClient.IS_QUIRKS || document.documentMode >= 8) ? 20 : 14;
+                
+                if (document.documentMode == 8 || document.documentMode == 9)
+                {
+                    sb += 3;
+                }
+                
+                var cw = graph.container.offsetWidth - sb;
+                var ch = graph.container.offsetHeight - sb;
+                
+                var ns = (autoscale) ? Math.max(0.3, Math.min(maxScale || 1, cw / b.width)) : s;
+                var dx = ((cw - ns * b.width) / 2) / ns;
+                var dy = ((ch - ns * b.height) / this.lightboxVerticalDivider) / ns;
+                
+                if (scroll)
+                {
+                    dx = Math.max(dx, 0);
+                    dy = Math.max(dy, 0);
+                }
+
+                if (scroll || bds.width < cw || bds.height < ch)
+                {
+                    graph.view.scaleAndTranslate(ns, Math.floor(dx - b.x), Math.floor(dy - b.y));
+                    graph.container.scrollTop = st * ns / s;
+                    graph.container.scrollLeft = sl * ns / s;
+                }
+                else if (cx != 0 || cy != 0)
+                {
+                    var t = graph.view.translate;
+                    graph.view.setTranslate(Math.floor(t.x + cx / s), Math.floor(t.y + cy / s));
+                }
+            }
+        });
 		
 		// Hack to make function available to subclassers
 		this.chromelessResize = resize;
@@ -1901,29 +1918,40 @@ EditorUi.prototype.initCanvas = function()
 		
 		this.cumulativeZoomFactor = Math.max(0.01, Math.min(this.view.scale * this.cumulativeZoomFactor, 160) / this.view.scale);
 		
-		this.updateZoomTimeout = window.setTimeout(mxUtils.bind(this, function()
-		{
-			this.zoom(this.cumulativeZoomFactor);					
-			
-			if (resize != null)
-			{
-				resize(false);
-			}
-			
-			// Zooms to mouse position if scrollbars enabled
-			if (cursorPosition != null && mxUtils.hasScrollbars(graph.container))
-			{
-				var offset = mxUtils.getOffset(graph.container);
-				var dx = graph.container.offsetWidth / 2 - cursorPosition.x + offset.x;
-				var dy = graph.container.offsetHeight / 2 - cursorPosition.y + offset.y;
-				
-				graph.container.scrollLeft -= dx * (this.cumulativeZoomFactor - 1);
-				graph.container.scrollTop -= dy * (this.cumulativeZoomFactor - 1);
-			}
-			
-			this.cumulativeZoomFactor = 1;
-			this.updateZoomTimeout = null;
-		}), 20);
+        this.updateZoomTimeout = window.setTimeout(mxUtils.bind(this, function()
+        {
+            var offset = mxUtils.getOffset(graph.container);
+            var dx = 0;
+            var dy = 0;
+            
+            if (cursorPosition != null)
+            {
+                dx = graph.container.offsetWidth / 2 - cursorPosition.x + offset.x;
+                dy = graph.container.offsetHeight / 2 - cursorPosition.y + offset.y;
+            }
+
+            var prev = this.view.scale;
+            this.zoom(this.cumulativeZoomFactor);
+            var s = this.view.scale;
+            
+            if (s != prev)
+            {
+                if (resize != null)
+                {
+                    resize(false, null, dx * (this.cumulativeZoomFactor - 1),
+                           dy * (this.cumulativeZoomFactor - 1));
+                }
+                
+                if (mxUtils.hasScrollbars(graph.container) && (dx != 0 || dy != 0))
+                {
+                    graph.container.scrollLeft -= dx * (this.cumulativeZoomFactor - 1);
+                    graph.container.scrollTop -= dy * (this.cumulativeZoomFactor - 1);
+                }
+            }
+            
+            this.cumulativeZoomFactor = 1;
+            this.updateZoomTimeout = null;
+        }), 20);
 	};
 	
 	mxEvent.addMouseWheelListener(mxUtils.bind(this, function(evt, up)
diff --git a/war/js/mxgraph/Graph.js b/war/js/mxgraph/Graph.js
index 91701ef2e5dbbe83d962bb0c7e8e4367202e5f0a..48a71414dea16da2417b389b9146a02f207b0f49 100644
--- a/war/js/mxgraph/Graph.js
+++ b/war/js/mxgraph/Graph.js
@@ -1204,7 +1204,7 @@ Graph.prototype.sanitizeHtml = function(value, editing)
 {
 	// Uses https://code.google.com/p/google-caja/wiki/JsHtmlSanitizer
 	// NOTE: Original minimized sanitizer was modified to support
-	// data URIs for images, and mailto and special data:-links.
+	// data URIs for images, mailto and special data:-links.
 	// LATER: Add MathML to whitelisted tags
 	function urlX(link)
 	{
@@ -2395,8 +2395,11 @@ Graph.prototype.getTooltipForCell = function(cell)
 
 			for (var i = 0; i < temp.length; i++)
 			{
-				tip += ((temp[i].name != 'link') ? temp[i].name + ':' : '') +
-					mxUtils.htmlEntities(temp[i].value) + '\n';
+				if (temp[i].name != 'link' || !this.isPageLink(temp[i].value))
+				{
+					tip += ((temp[i].name != 'link') ? temp[i].name + ':' : '') +
+						mxUtils.htmlEntities(temp[i].value) + '\n';
+				}
 			}
 			
 			if (tip.length > 0)
diff --git a/war/js/mxgraph/Shapes.js b/war/js/mxgraph/Shapes.js
index 479e7b05cbceab983db49e78b6b1bea3967c8f8d..7f5800a20306e31dd8902530e697493a738dabaf 100644
--- a/war/js/mxgraph/Shapes.js
+++ b/war/js/mxgraph/Shapes.js
@@ -803,6 +803,22 @@
 	};
 
 	mxCellRenderer.prototype.defaultShapes['process'] = ProcessShape;
+	
+	// Transparent Shape
+	function TransparentShape()
+	{
+		mxRectangleShape.call(this);
+	};
+	mxUtils.extend(TransparentShape, mxRectangleShape);
+	TransparentShape.prototype.paintBackground = function(c, x, y, w, h)
+	{
+		c.setFillColor(mxConstants.NONE);
+		c.rect(x, y, w, h);
+		c.fill();
+	};
+	TransparentShape.prototype.paintForeground = function(c, x, y, w, h) 	{ };
+
+	mxCellRenderer.prototype.defaultShapes['transparent'] = TransparentShape;
 
 	// Callout shape
 	function CalloutShape()
diff --git a/war/js/mxgraph/Sidebar.js b/war/js/mxgraph/Sidebar.js
index 00351fd20bda1bd41477f592f5682e5e9f2b16b1..7cd2a8932f3b4b7aacc313e488918f8f3f680575 100644
--- a/war/js/mxgraph/Sidebar.js
+++ b/war/js/mxgraph/Sidebar.js
@@ -218,6 +218,14 @@ Sidebar.prototype.defaultImageWidth = 80;
  */
 Sidebar.prototype.defaultImageHeight = 80;
 
+/**
+ * Adds all palettes to the sidebar.
+ */
+Sidebar.prototype.getTooltipOffset = function()
+{
+	return new mxPoint(0, 0);
+};
+
 /**
  * Adds all palettes to the sidebar.
  */
@@ -360,11 +368,11 @@ Sidebar.prototype.showTooltip = function(elt, cells, w, h, title, showLabel)
 				
 				var b = document.body;
 				var d = document.documentElement;
+				var off = this.getTooltipOffset();
 				var bottom = Math.max(b.clientHeight || 0, d.clientHeight);
-
-				var left = this.container.clientWidth + this.editorUi.splitSize + 3 + this.editorUi.container.offsetLeft;
+				var left = this.container.clientWidth + this.editorUi.splitSize + 3 + this.editorUi.container.offsetLeft + off.x;
 				var top = Math.min(bottom - height - 20 /*status bar*/, Math.max(0, (this.editorUi.container.offsetTop +
-					this.container.offsetTop + elt.offsetTop - this.container.scrollTop - height / 2 + 16)));
+					this.container.offsetTop + elt.offsetTop - this.container.scrollTop - height / 2 + 16))) + off.y;
 
 				if (mxClient.IS_SVG)
 				{
diff --git a/war/js/reader.min.js b/war/js/reader.min.js
index 5878965af6bba21aeef46e1a2f94f42a249f298d..bf5da377d455d5cbe8e4df46fc04f44b2bfa89f7 100644
--- a/war/js/reader.min.js
+++ b/war/js/reader.min.js
@@ -35,15 +35,15 @@ this.l&&a.push("?",this.l);null!==this.o&&a.push("#",this.o);return a.join("")};
 function(){return null!==this.k};f.prototype.V=function(){return this.h&&decodeURIComponent(this.h)};f.prototype.ca=function(a){if(a){a=Number(a);if(a!==(a&65535))throw Error("Bad port number "+a);this.h=""+a}else this.h=null};f.prototype.$=function(){return null!==this.h};f.prototype.U=function(){return this.g&&decodeURIComponent(this.g)};f.prototype.G=function(a){a?(a=""+a,this.g=!this.k||/^\//.test(a)?a:"/"+a):this.g=null};f.prototype.O=function(a){this.l=a?a:null};f.prototype.aa=function(){return null!==
 this.l};f.prototype.ba=function(a){if("object"===typeof a&&!(a instanceof Array)&&(a instanceof Object||"[object Array]"!==Object.prototype.toString.call(a))){var b=[],c=-1,d;for(d in a){var e=a[d];"string"===typeof e&&(b[++c]=d,b[++c]=e)}a=b}for(var b=[],c="",f=0;f<a.length;)d=a[f++],e=a[f++],b.push(c,encodeURIComponent(d.toString())),c="&",e&&b.push("=",encodeURIComponent(e.toString()));this.l=b.join("")};f.prototype.fa=function(a){this.o=a?a:null};f.prototype.Z=function(){return null!==this.o};
 var l=/^(?:([^:/?#]+):)?(?:\/\/(?:([^/?#]*)@)?([^/?#:@]*)(?::([0-9]+))?)?([^?#]+)?(?:\?([^#]*))?(?:#(.*))?$/,m=/[#\/\?@]/g,n=/[\#\?]/g;f.parse=a;f.create=function(a,d,e,g,h,k,l){a=new f(b(a,m),b(d,m),"string"==typeof e?encodeURIComponent(e):null,0<g?g.toString():null,b(h,n),null,"string"==typeof l?encodeURIComponent(l):null);k&&("string"===typeof k?a.O(k.replace(/[^?&=0-9A-Za-z_\-~.%]/g,c)):a.ba(k));return a};f.N=e;f.ma=d;f.ha={ua:function(b){return/\.html$/.test(a(b).U())?"text/html":"application/javascript"},
-N:function(b,c){return b?e(a(b),a(c)).toString():""+c}};return f}();"undefined"!==typeof window&&(window.URI=f);var g=void 0,h=void 0,k=void 0,l=void 0;(function(){function a(a){return"string"===typeof a?'url("'+a.replace(w,c)+'")':'url("about:blank")'}function c(a){return z[a]}function d(a,b){return a?f.ha.N(a,b):b}function n(a,b,c){if(!c)return null;var d=(""+a).match(u);return!d||d[1]&&!F.test(d[1])?null:c(a,b)}function x(a){return a.replace(/^-(?:apple|css|epub|khtml|moz|mso?|o|rim|wap|webkit|xv)-(?=[a-z])/,
-"")}var w=/[\n\f\r\"\'()*<>]/g,z={"\n":"%0a","\f":"%0c","\r":"%0d",'"':"%22","'":"%27","(":"%28",")":"%29","*":"%2a","<":"%3c",">":"%3e"},u=/^(?:([^:/?# ]+):)?/,F=/^(?:https?|mailto|data)$/i;g=function(){var c={};return function B(f,g,h,k,l){f=x(f);var m=b[f];if(m&&"object"===typeof m){for(var p=m.cssPropBits,v=p&80,q=p&1536,r=NaN,C=0,u=0;C<g.length;++C){var t=g[C].toLowerCase(),y=t.charCodeAt(0),w,M,z,F,L,D;if(32===y)t="";else if(34===y)t=16===v?h?a(n(d(k,e(g[C].substring(1,t.length-1))),f,h)):"":
-p&8&&!(v&v-1)?t:"";else if("inherit"!==t){if(L=m.cssLitGroup){var E;if(!(E=m.cssLitMap)){E={};for(var K=L.length;0<=--K;)for(var Q=L[K],fa=Q.length;0<=--fa;)E[Q[fa]]=c;E=m.cssLitMap=E}L=E}else L=c;if(D=L,D[x(t)]!==c)if(35===y&&/^#(?:[0-9a-f]{3}){1,2}$/.test(t))t=p&2?t:"";else if(48<=y&&57>=y)t=p&1?t:"";else if(w=t.charCodeAt(1),M=t.charCodeAt(2),z=48<=w&&57>=w,F=48<=M&&57>=M,43===y&&(z||46===w&&F))t=p&1?(z?"":"0")+t.substring(1):"";else if(45===y&&(z||46===w&&F))t=p&4?(z?"-":"-0")+t.substring(1):
-p&1?"0":"";else if(46===y&&z)t=p&1?"0"+t:"";else if('url("'===t.substring(0,5))t=h&&p&16?a(n(d(k,g[C].substring(5,t.length-2)),f,h)):"";else if("("===t.charAt(t.length-1))a:{L=g;E=C;t=1;K=E+1;for(y=L.length;K<y&&t;)Q=L[K++],t+=")"===Q?-1:/^[^"']*\($/.test(Q);if(!t)for(t=L[E].toLowerCase(),y=x(t),L=L.splice(E,K-E,""),E=m.cssFns,K=0,Q=E.length;K<Q;++K)if(E[K].substring(0,y.length)==y){L[0]=L[L.length-1]="";B(E[K],L,h,k);t=t+L.join(" ")+")";break a}t=""}else t=q&&/^-?[a-z_][\w\-]*$/.test(t)&&!/__$/.test(t)?
-l&&512===q?g[C]+l:1024===q&&b[t]&&"number"===typeof b[t].oa?t:"":/^\w+$/.test(t)&&64===v&&p&8?r+1===u?(g[r]=g[r].substring(0,g[r].length-1)+" "+t+'"',""):(r=u,'"'+t+'"'):""}t&&(g[u++]=t)}1===u&&'url("about:blank")'===g[0]&&(u=0);g.length=u}else g.length=0}}();var E=/^(active|after|before|blank|checked|default|disabled|drop|empty|enabled|first|first-child|first-letter|first-line|first-of-type|fullscreen|focus|hover|in-range|indeterminate|invalid|last-child|last-of-type|left|link|only-child|only-of-type|optional|out-of-range|placeholder-shown|read-only|read-write|required|right|root|scope|user-error|valid|visited)$/,
-D={};D[">"]=D["+"]=D["~"]=D;h=function(a,b,c){function d(d,k){function l(c,d,e){var h,k,l,n,v,Y=!0;h="";c<d&&((v=a[c],"*"===v)?(++c,h=v):/^[a-zA-Z]/.test(v)&&(k=g(v.toLowerCase(),[]))&&("tagName"in k&&(v=k.tagName),++c,h=v));for(n=l=k="";Y&&c<d;++c)if(v=a[c],"#"===v.charAt(0))/^#_|__$|[^\w#:\-]/.test(v)?Y=!1:k+=v+f;else if("."===v)++c<d&&/^[0-9A-Za-z:_\-]+$/.test(v=a[c])&&!/^_|__$/.test(v)?k+="."+v:Y=!1;else if(c+1<d&&"["===a[c]){++c;var B=a[c++].toLowerCase();v=p.m[h+"::"+B];v!==+v&&(v=p.m["*::"+
-B]);var q;b.ia?(q=b.ia(h,B),"string"!==typeof q&&(Y=!1,q=B),Y&&v!==+v&&(v=p.d.NONE)):(q=B,v!==+v&&(Y=!1));var r=B="",C=!1;/^[~^$*|]?=$/.test(a[c])&&(B=a[c++],r=a[c++],/^[0-9A-Za-z:_\-]+$/.test(r)?r='"'+r+'"':"]"===r&&(r='""',--c),/^"([^\"\\]|\\.)*"$/.test(r)||(Y=!1),(C="i"===a[c])&&++c);"]"!==a[c]&&(++c,Y=!1);switch(v){case p.d.CLASSES:case p.d.LOCAL_NAME:case p.d.NONE:break;case p.d.GLOBAL_NAME:case p.d.ID:case p.d.IDREF:"="!==B&&"~="!==B&&"$="!==B||'""'==r||C?"|="===B||""===B||(Y=!1):r='"'+r.substring(1,
-r.length-1)+f+'"';break;case p.d.URI:case p.d.URI_FRAGMENT:""!==B&&(Y=!1);break;default:Y=!1}Y&&(l+="["+q.replace(/[^\w-]/g,"\\$&")+B+r+(C?" i]":"]"))}else if(c<d&&":"===a[c])if(v=a[++c],E.test(v))n+=":"+v;else break;else break;c!==d&&(Y=!1);Y&&(c=(h+k).replace(/[^ .*#\w-]/g,"\\$&")+l+n+e)&&m.push(c);return Y}" "===a[d]&&++d;k-1!==d&&" "===a[k]&&--k;for(var m=[],n=d,v=!0,B=d;v&&B<k;++B){var q=a[B];if(D[q]===D||" "===q)l(n,B,q)?n=B+1:v=!1}l(n,k,"")||(v=!1);return v?(m.length&&(n=m.join(""),null!==
-e&&(n="."+e+" "+n),h.push(n)),!0):!c||c(a.slice(d,k))}var e=b.na,f=b.L,g=b.Aa,h=[],k=0,l,m=0,n;for(l=0;l<a.length;++l)(n=a[l],"("==n||"["==n?(++m,0):")"==n||"]"==n?(m&&--m,0):" "==a[l]&&(m||D[a[l-1]]===D||D[a[l+1]]===D))||(a[k++]=a[l]);a.length=k;k=a.length;for(l=m=0;l<k;++l)if(","===a[l]){if(!d(m,l))return null;m=l+1}return d(m,k)?h:null};(function(){var a=/^\w/,b=/^(?:(?:(?:(?:only|not) )?(?:all|aural|braille|embossed|handheld|print|projection|screen|speech|tty|tv)|\( (?:(?:min-|max-)?(?:(?:device-)?(?:aspect-ratio|height|width)|color(?:-index)?|monochrome|orientation|resolution)|grid|hover|luminosity|pointer|scan|script) (?:: -?(?:[a-z]\w+(?:-\w+)*|\d+(?: \/ \d+|(?:\.\d+)?(?:p[cxt]|[cem]m|in|dpi|dppx|dpcm|%)?)) )?\))(?: and ?\( (?:(?:min-|max-)?(?:(?:device-)?(?:aspect-ratio|height|width)|color(?:-index)?|monochrome|orientation|resolution)|grid|hover|luminosity|pointer|scan|script) (?:: -?(?:[a-z]\w+(?:-\w+)*|\d+(?: \/ \d+|(?:\.\d+)?(?:p[cxt]|[cem]m|in|dpi|dppx|dpcm|%)?)) )?\))*)(?: , (?:(?:(?:(?:only|not) )?(?:all|aural|braille|embossed|handheld|print|projection|screen|speech|tty|tv)|\( (?:(?:min-|max-)?(?:(?:device-)?(?:aspect-ratio|height|width)|color(?:-index)?|monochrome|orientation|resolution)|grid|hover|luminosity|pointer|scan|script) (?:: -?(?:[a-z]\w+(?:-\w+)*|\d+(?: \/ \d+|(?:\.\d+)?(?:p[cxt]|[cem]m|in|dpi|dppx|dpcm|%)?)) )?\))(?: and ?\( (?:(?:min-|max-)?(?:(?:device-)?(?:aspect-ratio|height|width)|color(?:-index)?|monochrome|orientation|resolution)|grid|hover|luminosity|pointer|scan|script) (?:: -?(?:[a-z]\w+(?:-\w+)*|\d+(?: \/ \d+|(?:\.\d+)?(?:p[cxt]|[cem]m|in|dpi|dppx|dpcm|%)?)) )?\))*))*$/i;
+N:function(b,c){return b?e(a(b),a(c)).toString():""+c}};return f}();"undefined"!==typeof window&&(window.URI=f);var g=void 0,h=void 0,k=void 0,l=void 0;(function(){function a(a){return"string"===typeof a?'url("'+a.replace(x,c)+'")':'url("about:blank")'}function c(a){return y[a]}function d(a,b){return a?f.ha.N(a,b):b}function n(a,b,c){if(!c)return null;var d=(""+a).match(u);return!d||d[1]&&!D.test(d[1])?null:c(a,b)}function w(a){return a.replace(/^-(?:apple|css|epub|khtml|moz|mso?|o|rim|wap|webkit|xv)-(?=[a-z])/,
+"")}var x=/[\n\f\r\"\'()*<>]/g,y={"\n":"%0a","\f":"%0c","\r":"%0d",'"':"%22","'":"%27","(":"%28",")":"%29","*":"%2a","<":"%3c",">":"%3e"},u=/^(?:([^:/?# ]+):)?/,D=/^(?:https?|mailto|data)$/i;g=function(){var c={};return function B(f,g,h,k,l){f=w(f);var m=b[f];if(m&&"object"===typeof m){for(var p=m.cssPropBits,v=p&80,q=p&1536,r=NaN,C=0,u=0;C<g.length;++C){var t=g[C].toLowerCase(),z=t.charCodeAt(0),x,M,y,D,H,E;if(32===z)t="";else if(34===z)t=16===v?h?a(n(d(k,e(g[C].substring(1,t.length-1))),f,h)):"":
+p&8&&!(v&v-1)?t:"";else if("inherit"!==t){if(H=m.cssLitGroup){var F;if(!(F=m.cssLitMap)){F={};for(var L=H.length;0<=--L;)for(var Q=H[L],fa=Q.length;0<=--fa;)F[Q[fa]]=c;F=m.cssLitMap=F}H=F}else H=c;if(E=H,E[w(t)]!==c)if(35===z&&/^#(?:[0-9a-f]{3}){1,2}$/.test(t))t=p&2?t:"";else if(48<=z&&57>=z)t=p&1?t:"";else if(x=t.charCodeAt(1),M=t.charCodeAt(2),y=48<=x&&57>=x,D=48<=M&&57>=M,43===z&&(y||46===x&&D))t=p&1?(y?"":"0")+t.substring(1):"";else if(45===z&&(y||46===x&&D))t=p&4?(y?"-":"-0")+t.substring(1):
+p&1?"0":"";else if(46===z&&y)t=p&1?"0"+t:"";else if('url("'===t.substring(0,5))t=h&&p&16?a(n(d(k,g[C].substring(5,t.length-2)),f,h)):"";else if("("===t.charAt(t.length-1))a:{H=g;F=C;t=1;L=F+1;for(z=H.length;L<z&&t;)Q=H[L++],t+=")"===Q?-1:/^[^"']*\($/.test(Q);if(!t)for(t=H[F].toLowerCase(),z=w(t),H=H.splice(F,L-F,""),F=m.cssFns,L=0,Q=F.length;L<Q;++L)if(F[L].substring(0,z.length)==z){H[0]=H[H.length-1]="";B(F[L],H,h,k);t=t+H.join(" ")+")";break a}t=""}else t=q&&/^-?[a-z_][\w\-]*$/.test(t)&&!/__$/.test(t)?
+l&&512===q?g[C]+l:1024===q&&b[t]&&"number"===typeof b[t].oa?t:"":/^\w+$/.test(t)&&64===v&&p&8?r+1===u?(g[r]=g[r].substring(0,g[r].length-1)+" "+t+'"',""):(r=u,'"'+t+'"'):""}t&&(g[u++]=t)}1===u&&'url("about:blank")'===g[0]&&(u=0);g.length=u}else g.length=0}}();var F=/^(active|after|before|blank|checked|default|disabled|drop|empty|enabled|first|first-child|first-letter|first-line|first-of-type|fullscreen|focus|hover|in-range|indeterminate|invalid|last-child|last-of-type|left|link|only-child|only-of-type|optional|out-of-range|placeholder-shown|read-only|read-write|required|right|root|scope|user-error|valid|visited)$/,
+E={};E[">"]=E["+"]=E["~"]=E;h=function(a,b,c){function d(d,k){function l(c,d,e){var h,k,l,n,v,Z=!0;h="";c<d&&((v=a[c],"*"===v)?(++c,h=v):/^[a-zA-Z]/.test(v)&&(k=g(v.toLowerCase(),[]))&&("tagName"in k&&(v=k.tagName),++c,h=v));for(n=l=k="";Z&&c<d;++c)if(v=a[c],"#"===v.charAt(0))/^#_|__$|[^\w#:\-]/.test(v)?Z=!1:k+=v+f;else if("."===v)++c<d&&/^[0-9A-Za-z:_\-]+$/.test(v=a[c])&&!/^_|__$/.test(v)?k+="."+v:Z=!1;else if(c+1<d&&"["===a[c]){++c;var B=a[c++].toLowerCase();v=p.m[h+"::"+B];v!==+v&&(v=p.m["*::"+
+B]);var q;b.ia?(q=b.ia(h,B),"string"!==typeof q&&(Z=!1,q=B),Z&&v!==+v&&(v=p.d.NONE)):(q=B,v!==+v&&(Z=!1));var r=B="",C=!1;/^[~^$*|]?=$/.test(a[c])&&(B=a[c++],r=a[c++],/^[0-9A-Za-z:_\-]+$/.test(r)?r='"'+r+'"':"]"===r&&(r='""',--c),/^"([^\"\\]|\\.)*"$/.test(r)||(Z=!1),(C="i"===a[c])&&++c);"]"!==a[c]&&(++c,Z=!1);switch(v){case p.d.CLASSES:case p.d.LOCAL_NAME:case p.d.NONE:break;case p.d.GLOBAL_NAME:case p.d.ID:case p.d.IDREF:"="!==B&&"~="!==B&&"$="!==B||'""'==r||C?"|="===B||""===B||(Z=!1):r='"'+r.substring(1,
+r.length-1)+f+'"';break;case p.d.URI:case p.d.URI_FRAGMENT:""!==B&&(Z=!1);break;default:Z=!1}Z&&(l+="["+q.replace(/[^\w-]/g,"\\$&")+B+r+(C?" i]":"]"))}else if(c<d&&":"===a[c])if(v=a[++c],F.test(v))n+=":"+v;else break;else break;c!==d&&(Z=!1);Z&&(c=(h+k).replace(/[^ .*#\w-]/g,"\\$&")+l+n+e)&&m.push(c);return Z}" "===a[d]&&++d;k-1!==d&&" "===a[k]&&--k;for(var m=[],n=d,v=!0,B=d;v&&B<k;++B){var q=a[B];if(E[q]===E||" "===q)l(n,B,q)?n=B+1:v=!1}l(n,k,"")||(v=!1);return v?(m.length&&(n=m.join(""),null!==
+e&&(n="."+e+" "+n),h.push(n)),!0):!c||c(a.slice(d,k))}var e=b.na,f=b.L,g=b.Aa,h=[],k=0,l,m=0,n;for(l=0;l<a.length;++l)(n=a[l],"("==n||"["==n?(++m,0):")"==n||"]"==n?(m&&--m,0):" "==a[l]&&(m||E[a[l-1]]===E||E[a[l+1]]===E))||(a[k++]=a[l]);a.length=k;k=a.length;for(l=m=0;l<k;++l)if(","===a[l]){if(!d(m,l))return null;m=l+1}return d(m,k)?h:null};(function(){var a=/^\w/,b=/^(?:(?:(?:(?:only|not) )?(?:all|aural|braille|embossed|handheld|print|projection|screen|speech|tty|tv)|\( (?:(?:min-|max-)?(?:(?:device-)?(?:aspect-ratio|height|width)|color(?:-index)?|monochrome|orientation|resolution)|grid|hover|luminosity|pointer|scan|script) (?:: -?(?:[a-z]\w+(?:-\w+)*|\d+(?: \/ \d+|(?:\.\d+)?(?:p[cxt]|[cem]m|in|dpi|dppx|dpcm|%)?)) )?\))(?: and ?\( (?:(?:min-|max-)?(?:(?:device-)?(?:aspect-ratio|height|width)|color(?:-index)?|monochrome|orientation|resolution)|grid|hover|luminosity|pointer|scan|script) (?:: -?(?:[a-z]\w+(?:-\w+)*|\d+(?: \/ \d+|(?:\.\d+)?(?:p[cxt]|[cem]m|in|dpi|dppx|dpcm|%)?)) )?\))*)(?: , (?:(?:(?:(?:only|not) )?(?:all|aural|braille|embossed|handheld|print|projection|screen|speech|tty|tv)|\( (?:(?:min-|max-)?(?:(?:device-)?(?:aspect-ratio|height|width)|color(?:-index)?|monochrome|orientation|resolution)|grid|hover|luminosity|pointer|scan|script) (?:: -?(?:[a-z]\w+(?:-\w+)*|\d+(?: \/ \d+|(?:\.\d+)?(?:p[cxt]|[cem]m|in|dpi|dppx|dpcm|%)?)) )?\))(?: and ?\( (?:(?:min-|max-)?(?:(?:device-)?(?:aspect-ratio|height|width)|color(?:-index)?|monochrome|orientation|resolution)|grid|hover|luminosity|pointer|scan|script) (?:: -?(?:[a-z]\w+(?:-\w+)*|\d+(?: \/ \d+|(?:\.\d+)?(?:p[cxt]|[cem]m|in|dpi|dppx|dpcm|%)?)) )?\))*))*$/i;
 l=function(c){c=c.slice();for(var d=c.length,e=0,f=0;f<d;++f){var g=c[f];" "!=g&&(c[e++]=g)}c.length=e;c=c.join(" ");return c.length?b.test(c)?a.test(c)?c:"not all , "+c:"not all":""}})();(function(){function a(a){var b=/^\s*[']([^']*)[']\s*$/,c=/^\s*url\s*[(]["]([^"]*)["][)]\s*$/,d=/^\s*url\s*[(][']([^']*)['][)]\s*$/,e=/^\s*url\s*[(]([^)]*)[)]\s*$/,f;return(f=/^\s*["]([^"]*)["]\s*$/.exec(a))||(f=b.exec(a))||(f=c.exec(a))||(f=d.exec(a))||(f=e.exec(a))?f[1]:null}function b(c,e,f,k,p,q,r){function B(){u=
 t.length&&null===t[t.length-1]}var v=void 0,C=r||[0],t=[],u=!1;m(e,{startStylesheet:function(){v=[]},endStylesheet:function(){},startAtrule:function(e,g){if(u)e=null;else if("@media"===e)v.push("@media"," ",l(g));else if("@keyframes"===e||"@-webkit-keyframes"===e){var h=g[0];1!==g.length||/__$|[^\w\-]/.test(h)?e=null:(v.push(e," ",h+f.L),e="@keyframes")}else if("@import"===e&&0<g.length)if(e=null,"function"===typeof q){var m=l(g.slice(1));if("not all"!==m){++C[0];var B=[];v.push(B);var r=n(d(c,a(g[0])),
 function(a){var c=b(r,a.qa,f,k,p,q,C);--C[0];a=m?{toString:function(){return"@media "+m+" {"+c.result+"}"}}:c.result;B[0]=a;q(a,!!C[0])},p)}}else window.console&&window.console.log("@import "+g.join(" ")+" elided");u=!e;t.push(e)},endAtrule:function(){t.pop();u||v.push(";");B()},startBlock:function(){u||v.push("{")},endBlock:function(){u||(v.push("}"),u=!0)},startRuleset:function(a){if(!u){var b=void 0;"@keyframes"===t[t.length-1]?(b=a.join(" ").match(/^ *(?:from|to|\d+(?:\.\d+)?%) *(?:, *(?:from|to|\d+(?:\.\d+)?%) *)*$/i),
@@ -71,21 +71,21 @@ frameset:"HTMLFrameSetElement",h1:"HTMLHeadingElement",h2:"HTMLHeadingElement",h
 li:"HTMLLIElement",link:"HTMLLinkElement",map:"HTMLMapElement",mark:"HTMLElement",menu:"HTMLMenuElement",meta:"HTMLMetaElement",meter:"HTMLMeterElement",nav:"HTMLElement",nobr:"HTMLElement",noembed:"HTMLElement",noframes:"HTMLElement",noscript:"HTMLElement",object:"HTMLObjectElement",ol:"HTMLOListElement",optgroup:"HTMLOptGroupElement",option:"HTMLOptionElement",output:"HTMLOutputElement",p:"HTMLParagraphElement",param:"HTMLParamElement",pre:"HTMLPreElement",progress:"HTMLProgressElement",q:"HTMLQuoteElement",
 s:"HTMLElement",samp:"HTMLElement",script:"HTMLScriptElement",section:"HTMLElement",select:"HTMLSelectElement",small:"HTMLElement",source:"HTMLSourceElement",span:"HTMLSpanElement",strike:"HTMLElement",strong:"HTMLElement",style:"HTMLStyleElement",sub:"HTMLElement",summary:"HTMLElement",sup:"HTMLElement",table:"HTMLTableElement",tbody:"HTMLTableSectionElement",td:"HTMLTableDataCellElement",textarea:"HTMLTextAreaElement",tfoot:"HTMLTableSectionElement",th:"HTMLTableHeaderCellElement",thead:"HTMLTableSectionElement",
 time:"HTMLTimeElement",title:"HTMLTitleElement",tr:"HTMLTableRowElement",track:"HTMLTrackElement",tt:"HTMLElement",u:"HTMLElement",ul:"HTMLUListElement","var":"HTMLElement",video:"HTMLVideoElement",wbr:"HTMLElement"};p.ELEMENT_DOM_INTERFACES=p.Q;p.P={NOT_LOADED:0,SAME_DOCUMENT:1,NEW_DOCUMENT:2};p.ueffects=p.P;p.J={"a::href":2,"area::href":2,"audio::src":1,"blockquote::cite":0,"command::icon":1,"del::cite":0,"form::action":2,"img::src":1,"input::src":1,"ins::cite":0,"q::cite":0,"video::poster":1,"video::src":1};
-p.URIEFFECTS=p.J;p.M={UNSANDBOXED:2,SANDBOXED:1,DATA:0};p.ltypes=p.M;p.I={"a::href":2,"area::href":2,"audio::src":2,"blockquote::cite":2,"command::icon":1,"del::cite":2,"form::action":2,"img::src":1,"input::src":1,"ins::cite":2,"q::cite":2,"video::poster":1,"video::src":2};p.LOADERTYPES=p.I;"undefined"!==typeof window&&(window.html4=p);a=function(a){function b(a,b){var c;if(Z.hasOwnProperty(b))c=Z[b];else{var d=b.match(A);c=d?String.fromCharCode(parseInt(d[1],10)):(d=b.match(v))?String.fromCharCode(parseInt(d[1],
-16)):J&&R.test(b)?(J.innerHTML="&"+b+";",d=J.textContent,Z[b]=d):"&"+b+";"}return c}function c(a){return a.replace(aa,b)}function d(a){return(""+a).replace(H,"&amp;").replace(ba,"&lt;").replace(ea,"&gt;").replace(ca,"&#34;")}function e(a){return a.replace(U,"&amp;$1").replace(ba,"&lt;").replace(ea,"&gt;")}function g(a){var b={z:a.z||a.cdata,A:a.A||a.comment,B:a.B||a.endDoc,t:a.t||a.endTag,e:a.e||a.pcdata,F:a.F||a.rcdata,H:a.H||a.startDoc,w:a.w||a.startTag};return function(a,c){var d,e=/(<\/|<\!--|<[!?]|[&<>])/g;
-d=a+"";if(T)d=d.split(e);else{for(var f=[],g=0,h;null!==(h=e.exec(d));)f.push(d.substring(g,h.index)),f.push(h[0]),g=h.index+h[0].length;f.push(d.substring(g));d=f}k(b,d,0,{r:!1,C:!1},c)}}function h(a,b,c,d,e){return function(){k(a,b,c,d,e)}}function k(b,c,d,e,f){try{b.H&&0==d&&b.H(f);for(var g,k,n,v=c.length;d<v;){var p=c[d++],B=c[d];switch(p){case "&":N.test(B)?(b.e&&b.e("&"+B,f,O,h(b,c,d,e,f)),d++):b.e&&b.e("&amp;",f,O,h(b,c,d,e,f));break;case "</":if(g=/^([-\w:]+)[^\'\"]*/.exec(B))if(g[0].length===
-B.length&&">"===c[d+1])d+=2,n=g[1].toLowerCase(),b.t&&b.t(n,f,O,h(b,c,d,e,f));else{var Y=c,Q=d,q=b,r=f,X=O,t=e,R=m(Y,Q);R?(q.t&&q.t(R.name,r,X,h(q,Y,Q,t,r)),d=R.next):d=Y.length}else b.e&&b.e("&lt;/",f,O,h(b,c,d,e,f));break;case "<":if(g=/^([-\w:]+)\s*\/?/.exec(B))if(g[0].length===B.length&&">"===c[d+1]){d+=2;n=g[1].toLowerCase();b.w&&b.w(n,[],f,O,h(b,c,d,e,f));var C=a.f[n];C&W&&(d=l(c,{name:n,next:d,c:C},b,f,O,e))}else{var Y=c,Q=b,q=f,r=O,X=e,J=m(Y,d);J?(Q.w&&Q.w(J.name,J.R,q,r,h(Q,Y,J.next,X,q)),
-d=J.c&W?l(Y,J,Q,q,r,X):J.next):d=Y.length}else b.e&&b.e("&lt;",f,O,h(b,c,d,e,f));break;case "\x3c!--":if(!e.C){for(k=d+1;k<v&&(">"!==c[k]||!/--$/.test(c[k-1]));k++);if(k<v){if(b.A){var u=c.slice(d,k).join("");b.A(u.substr(0,u.length-2),f,O,h(b,c,k+1,e,f))}d=k+1}else e.C=!0}e.C&&b.e&&b.e("&lt;!--",f,O,h(b,c,d,e,f));break;case "<!":if(/^\w/.test(B)){if(!e.r){for(k=d+1;k<v&&">"!==c[k];k++);k<v?d=k+1:e.r=!0}e.r&&b.e&&b.e("&lt;!",f,O,h(b,c,d,e,f))}else b.e&&b.e("&lt;!",f,O,h(b,c,d,e,f));break;case "<?":if(!e.r){for(k=
-d+1;k<v&&">"!==c[k];k++);k<v?d=k+1:e.r=!0}e.r&&b.e&&b.e("&lt;?",f,O,h(b,c,d,e,f));break;case ">":b.e&&b.e("&gt;",f,O,h(b,c,d,e,f));break;case "":break;default:b.e&&b.e(p,f,O,h(b,c,d,e,f))}}b.B&&b.B(f)}catch(na){if(na!==O)throw na;}}function l(b,c,d,f,g,k){var l=b.length;Q.hasOwnProperty(c.name)||(Q[c.name]=RegExp("^"+c.name+"(?:[\\s\\/]|$)","i"));for(var m=Q[c.name],n=c.next,v=c.next+1;v<l&&("</"!==b[v-1]||!m.test(b[v]));v++);v<l&&--v;l=b.slice(n,v).join("");if(c.c&a.c.CDATA)d.z&&d.z(l,f,g,h(d,b,
+p.URIEFFECTS=p.J;p.M={UNSANDBOXED:2,SANDBOXED:1,DATA:0};p.ltypes=p.M;p.I={"a::href":2,"area::href":2,"audio::src":2,"blockquote::cite":2,"command::icon":1,"del::cite":2,"form::action":2,"img::src":1,"input::src":1,"ins::cite":2,"q::cite":2,"video::poster":1,"video::src":2};p.LOADERTYPES=p.I;"undefined"!==typeof window&&(window.html4=p);a=function(a){function b(a,b){var c;if(ba.hasOwnProperty(b))c=ba[b];else{var d=b.match(A);c=d?String.fromCharCode(parseInt(d[1],10)):(d=b.match(v))?String.fromCharCode(parseInt(d[1],
+16)):I&&R.test(b)?(I.innerHTML="&"+b+";",d=I.textContent,ba[b]=d):"&"+b+";"}return c}function c(a){return a.replace(ca,b)}function d(a){return(""+a).replace(K,"&amp;").replace(T,"&lt;").replace(ea,"&gt;").replace(aa,"&#34;")}function e(a){return a.replace(X,"&amp;$1").replace(T,"&lt;").replace(ea,"&gt;")}function g(a){var b={z:a.z||a.cdata,A:a.A||a.comment,B:a.B||a.endDoc,t:a.t||a.endTag,e:a.e||a.pcdata,F:a.F||a.rcdata,H:a.H||a.startDoc,w:a.w||a.startTag};return function(a,c){var d,e=/(<\/|<\!--|<[!?]|[&<>])/g;
+d=a+"";if(V)d=d.split(e);else{for(var f=[],g=0,h;null!==(h=e.exec(d));)f.push(d.substring(g,h.index)),f.push(h[0]),g=h.index+h[0].length;f.push(d.substring(g));d=f}k(b,d,0,{r:!1,C:!1},c)}}function h(a,b,c,d,e){return function(){k(a,b,c,d,e)}}function k(b,c,d,e,f){try{b.H&&0==d&&b.H(f);for(var g,k,n,v=c.length;d<v;){var p=c[d++],B=c[d];switch(p){case "&":N.test(B)?(b.e&&b.e("&"+B,f,O,h(b,c,d,e,f)),d++):b.e&&b.e("&amp;",f,O,h(b,c,d,e,f));break;case "</":if(g=/^([-\w:]+)[^\'\"]*/.exec(B))if(g[0].length===
+B.length&&">"===c[d+1])d+=2,n=g[1].toLowerCase(),b.t&&b.t(n,f,O,h(b,c,d,e,f));else{var Z=c,Q=d,q=b,r=f,Y=O,t=e,R=m(Z,Q);R?(q.t&&q.t(R.name,r,Y,h(q,Z,Q,t,r)),d=R.next):d=Z.length}else b.e&&b.e("&lt;/",f,O,h(b,c,d,e,f));break;case "<":if(g=/^([-\w:]+)\s*\/?/.exec(B))if(g[0].length===B.length&&">"===c[d+1]){d+=2;n=g[1].toLowerCase();b.w&&b.w(n,[],f,O,h(b,c,d,e,f));var C=a.f[n];C&W&&(d=l(c,{name:n,next:d,c:C},b,f,O,e))}else{var Z=c,Q=b,q=f,r=O,Y=e,I=m(Z,d);I?(Q.w&&Q.w(I.name,I.R,q,r,h(Q,Z,I.next,Y,q)),
+d=I.c&W?l(Z,I,Q,q,r,Y):I.next):d=Z.length}else b.e&&b.e("&lt;",f,O,h(b,c,d,e,f));break;case "\x3c!--":if(!e.C){for(k=d+1;k<v&&(">"!==c[k]||!/--$/.test(c[k-1]));k++);if(k<v){if(b.A){var u=c.slice(d,k).join("");b.A(u.substr(0,u.length-2),f,O,h(b,c,k+1,e,f))}d=k+1}else e.C=!0}e.C&&b.e&&b.e("&lt;!--",f,O,h(b,c,d,e,f));break;case "<!":if(/^\w/.test(B)){if(!e.r){for(k=d+1;k<v&&">"!==c[k];k++);k<v?d=k+1:e.r=!0}e.r&&b.e&&b.e("&lt;!",f,O,h(b,c,d,e,f))}else b.e&&b.e("&lt;!",f,O,h(b,c,d,e,f));break;case "<?":if(!e.r){for(k=
+d+1;k<v&&">"!==c[k];k++);k<v?d=k+1:e.r=!0}e.r&&b.e&&b.e("&lt;?",f,O,h(b,c,d,e,f));break;case ">":b.e&&b.e("&gt;",f,O,h(b,c,d,e,f));break;case "":break;default:b.e&&b.e(p,f,O,h(b,c,d,e,f))}}b.B&&b.B(f)}catch(la){if(la!==O)throw la;}}function l(b,c,d,f,g,k){var l=b.length;Q.hasOwnProperty(c.name)||(Q[c.name]=RegExp("^"+c.name+"(?:[\\s\\/]|$)","i"));for(var m=Q[c.name],n=c.next,v=c.next+1;v<l&&("</"!==b[v-1]||!m.test(b[v]));v++);v<l&&--v;l=b.slice(n,v).join("");if(c.c&a.c.CDATA)d.z&&d.z(l,f,g,h(d,b,
 v,k,f));else if(c.c&a.c.RCDATA)d.F&&d.F(e(l),f,g,h(d,b,v,k,f));else throw Error("bug");return v}function m(b,d){var e=/^([-\w:]+)/.exec(b[d]),f={};f.name=e[1].toLowerCase();f.c=a.f[f.name];for(var g=b[d].substr(e[0].length),h=d+1,k=b.length;h<k&&">"!==b[h];h++)g+=b[h];if(!(k<=h)){for(var l=[];""!==g;)if(e=P.exec(g))if(e[4]&&!e[5]||e[6]&&!e[7]){for(var e=e[4]||e[6],m=!1,g=[g,b[h++]];h<k;h++){if(m){if(">"===b[h])break}else 0<=b[h].indexOf(e)&&(m=!0);g.push(b[h])}if(k<=h)break;g=g.join("")}else{var m=
-e[1].toLowerCase(),n;if(e[2]){n=e[3];var v=n.charCodeAt(0);if(34===v||39===v)n=n.substr(1,n.length-2);n=c(n.replace(I,""))}else n="";l.push(m,n);g=g.substr(e[0].length)}else g=g.replace(/^[\s\S][^a-z\s]*/,"");f.R=l;f.next=h+1;return f}}function n(b){function c(a,b){f||b.push(a)}var e,f;return g({startDoc:function(){e=[];f=!1},startTag:function(c,g,h){if(!f&&a.f.hasOwnProperty(c)){var k=a.f[c];if(!(k&a.c.FOLDABLE)){var l=b(c,g);if(l){if("object"!==typeof l)throw Error("tagPolicy did not return object (old API?)");
+e[1].toLowerCase(),n;if(e[2]){n=e[3];var v=n.charCodeAt(0);if(34===v||39===v)n=n.substr(1,n.length-2);n=c(n.replace(J,""))}else n="";l.push(m,n);g=g.substr(e[0].length)}else g=g.replace(/^[\s\S][^a-z\s]*/,"");f.R=l;f.next=h+1;return f}}function n(b){function c(a,b){f||b.push(a)}var e,f;return g({startDoc:function(){e=[];f=!1},startTag:function(c,g,h){if(!f&&a.f.hasOwnProperty(c)){var k=a.f[c];if(!(k&a.c.FOLDABLE)){var l=b(c,g);if(l){if("object"!==typeof l)throw Error("tagPolicy did not return object (old API?)");
 if("attribs"in l)g=l.attribs;else throw Error("tagPolicy gave no attribs");var m;"tagName"in l?(m=l.tagName,l=a.f[m]):(m=c,l=k);if(k&a.c.OPTIONAL_ENDTAG){var n=e[e.length-1];n&&n.D===c&&(n.v!==m||c!==m)&&h.push("</",n.v,">")}k&a.c.EMPTY||e.push({D:c,v:m});h.push("<",m);c=0;for(n=g.length;c<n;c+=2){var v=g[c],B=g[c+1];null!==B&&void 0!==B&&h.push(" ",v,'="',d(B),'"')}h.push(">");k&a.c.EMPTY&&!(l&a.c.EMPTY)&&h.push("</",m,">")}else f=!(k&a.c.EMPTY)}}},endTag:function(b,c){if(f)f=!1;else if(a.f.hasOwnProperty(b)){var d=
 a.f[b];if(!(d&(a.c.EMPTY|a.c.FOLDABLE))){if(d&a.c.OPTIONAL_ENDTAG)for(d=e.length;0<=--d;){var g=e[d].D;if(g===b)break;if(!(a.f[g]&a.c.OPTIONAL_ENDTAG))return}else for(d=e.length;0<=--d&&e[d].D!==b;);if(!(0>d)){for(g=e.length;--g>d;){var h=e[g].v;a.f[h]&a.c.OPTIONAL_ENDTAG||c.push("</",h,">")}d<e.length&&(b=e[d].v);e.length=d;c.push("</",b,">")}}}},pcdata:c,rcdata:c,cdata:c,endDoc:function(a){for(;e.length;e.length--)a.push("</",e[e.length-1].v,">")}})}function p(a,b,c,d,e){if(!e)return null;try{var g=
-f.parse(""+a);if(g&&(!g.K()||fa.test(g.W()))){var h=e(g,b,c,d);return h?h.toString():null}}catch(ha){}return null}function r(a,b,c,d,e){c||a(b+" removed",{S:"removed",tagName:b});if(d!==e){var f="changed";d&&!e?f="removed":!d&&e&&(f="added");a(b+"."+c+" "+f,{S:f,tagName:b,la:c,oldValue:d,newValue:e})}}function B(a,b,c){b=b+"::"+c;if(a.hasOwnProperty(b))return a[b];b="*::"+c;if(a.hasOwnProperty(b))return a[b]}function M(b,c,d,e,f){for(var g=0;g<c.length;g+=2){var h=c[g],k=c[g+1],l=k,m=null,n;if((n=
-b+"::"+h,a.m.hasOwnProperty(n))||(n="*::"+h,a.m.hasOwnProperty(n)))m=a.m[n];if(null!==m)switch(m){case a.d.NONE:break;case a.d.SCRIPT:k=null;f&&r(f,b,h,l,k);break;case a.d.STYLE:if("undefined"===typeof V){k=null;f&&r(f,b,h,l,k);break}var v=[];V(k,{declaration:function(b,c){var e=b.toLowerCase();S(e,c,d?function(b){return p(b,a.P.ja,a.M.ka,{TYPE:"CSS",CSS_PROP:e},d)}:null);c.length&&v.push(e+": "+c.join(" "))}});k=0<v.length?v.join(" ; "):null;f&&r(f,b,h,l,k);break;case a.d.ID:case a.d.IDREF:case a.d.IDREFS:case a.d.GLOBAL_NAME:case a.d.LOCAL_NAME:case a.d.CLASSES:k=
-e?e(k):k;f&&r(f,b,h,l,k);break;case a.d.URI:k=p(k,B(a.J,b,h),B(a.I,b,h),{TYPE:"MARKUP",XML_ATTR:h,XML_TAG:b},d);f&&r(f,b,h,l,k);break;case a.d.URI_FRAGMENT:k&&"#"===k.charAt(0)?(k=k.substring(1),k=e?e(k):k,null!==k&&void 0!==k&&(k="#"+k)):k=null;f&&r(f,b,h,l,k);break;default:k=null,f&&r(f,b,h,l,k)}else k=null,f&&r(f,b,h,l,k);c[g+1]=k}return c}function K(b,c,d){return function(e,f){if(a.f[e]&a.c.UNSAFE)d&&r(d,e,void 0,void 0,void 0);else return{attribs:M(e,f,b,c,d)}}}function L(a,b){var c=[];n(b)(a,
-c);return c.join("")}var V,S;"undefined"!==typeof window&&(V=window.parseCssDeclarations,S=window.sanitizeCssProperty);var Z={lt:"<",LT:"<",gt:">",GT:">",amp:"&",AMP:"&",quot:'"',apos:"'",nbsp:" "},A=/^#(\d+)$/,v=/^#x([0-9A-Fa-f]+)$/,R=/^[A-Za-z][A-za-z0-9]+$/,J="undefined"!==typeof window&&window.document?window.document.createElement("textarea"):null,I=/\0/g,aa=/&(#[0-9]+|#[xX][0-9A-Fa-f]+|\w+);/g,N=/^(#[0-9]+|#[xX][0-9A-Fa-f]+|\w+);/,H=/&/g,U=/&([^a-z#]|#(?:[^0-9x]|x(?:[^0-9a-f]|$)|$)|$)/gi,ba=
-/[<]/g,ea=/>/g,ca=/\"/g,P=/^\s*([-.:\w]+)(?:\s*(=)\s*((")[^"]*("|$)|(')[^']*('|$)|(?=[a-z][-\w]*\s*=)|[^"'\s]*))?/i,T=3==="a,b".split(/(,)/).length,W=a.c.CDATA|a.c.RCDATA,O={},Q={},fa=/^(?:https?|mailto|data)$/i,X={};X.pa=X.escapeAttrib=d;X.ra=X.makeHtmlSanitizer=n;X.sa=X.makeSaxParser=g;X.ta=X.makeTagPolicy=K;X.wa=X.normalizeRCData=e;X.xa=X.sanitize=function(a,b,c,d){return L(a,K(b,c,d))};X.ya=X.sanitizeAttribs=M;X.za=X.sanitizeWithPolicy=L;X.Ba=X.unescapeEntities=c;return X}(p);c=a.sanitize;"undefined"!==
+f.parse(""+a);if(g&&(!g.K()||fa.test(g.W()))){var h=e(g,b,c,d);return h?h.toString():null}}catch(ia){}return null}function r(a,b,c,d,e){c||a(b+" removed",{S:"removed",tagName:b});if(d!==e){var f="changed";d&&!e?f="removed":!d&&e&&(f="added");a(b+"."+c+" "+f,{S:f,tagName:b,la:c,oldValue:d,newValue:e})}}function B(a,b,c){b=b+"::"+c;if(a.hasOwnProperty(b))return a[b];b="*::"+c;if(a.hasOwnProperty(b))return a[b]}function M(b,c,d,e,f){for(var g=0;g<c.length;g+=2){var h=c[g],k=c[g+1],l=k,m=null,n;if((n=
+b+"::"+h,a.m.hasOwnProperty(n))||(n="*::"+h,a.m.hasOwnProperty(n)))m=a.m[n];if(null!==m)switch(m){case a.d.NONE:break;case a.d.SCRIPT:k=null;f&&r(f,b,h,l,k);break;case a.d.STYLE:if("undefined"===typeof U){k=null;f&&r(f,b,h,l,k);break}var v=[];U(k,{declaration:function(b,c){var e=b.toLowerCase();S(e,c,d?function(b){return p(b,a.P.ja,a.M.ka,{TYPE:"CSS",CSS_PROP:e},d)}:null);c.length&&v.push(e+": "+c.join(" "))}});k=0<v.length?v.join(" ; "):null;f&&r(f,b,h,l,k);break;case a.d.ID:case a.d.IDREF:case a.d.IDREFS:case a.d.GLOBAL_NAME:case a.d.LOCAL_NAME:case a.d.CLASSES:k=
+e?e(k):k;f&&r(f,b,h,l,k);break;case a.d.URI:k=p(k,B(a.J,b,h),B(a.I,b,h),{TYPE:"MARKUP",XML_ATTR:h,XML_TAG:b},d);f&&r(f,b,h,l,k);break;case a.d.URI_FRAGMENT:k&&"#"===k.charAt(0)?(k=k.substring(1),k=e?e(k):k,null!==k&&void 0!==k&&(k="#"+k)):k=null;f&&r(f,b,h,l,k);break;default:k=null,f&&r(f,b,h,l,k)}else k=null,f&&r(f,b,h,l,k);c[g+1]=k}return c}function L(b,c,d){return function(e,f){if(a.f[e]&a.c.UNSAFE)d&&r(d,e,void 0,void 0,void 0);else return{attribs:M(e,f,b,c,d)}}}function H(a,b){var c=[];n(b)(a,
+c);return c.join("")}var U,S;"undefined"!==typeof window&&(U=window.parseCssDeclarations,S=window.sanitizeCssProperty);var ba={lt:"<",LT:"<",gt:">",GT:">",amp:"&",AMP:"&",quot:'"',apos:"'",nbsp:" "},A=/^#(\d+)$/,v=/^#x([0-9A-Fa-f]+)$/,R=/^[A-Za-z][A-za-z0-9]+$/,I="undefined"!==typeof window&&window.document?window.document.createElement("textarea"):null,J=/\0/g,ca=/&(#[0-9]+|#[xX][0-9A-Fa-f]+|\w+);/g,N=/^(#[0-9]+|#[xX][0-9A-Fa-f]+|\w+);/,K=/&/g,X=/&([^a-z#]|#(?:[^0-9x]|x(?:[^0-9a-f]|$)|$)|$)/gi,T=
+/[<]/g,ea=/>/g,aa=/\"/g,P=/^\s*([-.:\w]+)(?:\s*(=)\s*((")[^"]*("|$)|(')[^']*('|$)|(?=[a-z][-\w]*\s*=)|[^"'\s]*))?/i,V=3==="a,b".split(/(,)/).length,W=a.c.CDATA|a.c.RCDATA,O={},Q={},fa=/^(?:https?|mailto|data)$/i,Y={};Y.pa=Y.escapeAttrib=d;Y.ra=Y.makeHtmlSanitizer=n;Y.sa=Y.makeSaxParser=g;Y.ta=Y.makeTagPolicy=L;Y.wa=Y.normalizeRCData=e;Y.xa=Y.sanitize=function(a,b,c,d){return H(a,L(b,c,d))};Y.ya=Y.sanitizeAttribs=M;Y.za=Y.sanitizeWithPolicy=H;Y.Ba=Y.unescapeEntities=c;return Y}(p);c=a.sanitize;"undefined"!==
 typeof window&&(window.html=a,window.html_sanitize=c)})();var Base64={_keyStr:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",encode:function(a,b){var c="",d,e,f,g,h,k,l=0;for(null!=b&&b||(a=Base64._utf8_encode(a));l<a.length;)d=a.charCodeAt(l++),e=a.charCodeAt(l++),f=a.charCodeAt(l++),g=d>>2,d=(d&3)<<4|e>>4,h=(e&15)<<2|f>>6,k=f&63,isNaN(e)?h=k=64:isNaN(f)&&(k=64),c=c+this._keyStr.charAt(g)+this._keyStr.charAt(d)+this._keyStr.charAt(h)+this._keyStr.charAt(k);return c},decode:function(a,b){b=null!=b?b:!1;var c="",d,e,f,g,h,k=0;for(a=a.replace(/[^A-Za-z0-9\+\/\=]/g,
 "");k<a.length;)d=this._keyStr.indexOf(a.charAt(k++)),e=this._keyStr.indexOf(a.charAt(k++)),g=this._keyStr.indexOf(a.charAt(k++)),h=this._keyStr.indexOf(a.charAt(k++)),d=d<<2|e>>4,e=(e&15)<<4|g>>2,f=(g&3)<<6|h,c+=String.fromCharCode(d),64!=g&&(c+=String.fromCharCode(e)),64!=h&&(c+=String.fromCharCode(f));b||(c=Base64._utf8_decode(c));return c},_utf8_encode:function(a){a=a.replace(/\r\n/g,"\n");for(var b="",c=0;c<a.length;c++){var d=a.charCodeAt(c);128>d?b+=String.fromCharCode(d):(127<d&&2048>d?b+=
 String.fromCharCode(d>>6|192):(b+=String.fromCharCode(d>>12|224),b+=String.fromCharCode(d>>6&63|128)),b+=String.fromCharCode(d&63|128))}return b},_utf8_decode:function(a){var b="",c=0,d;for(c1=c2=0;c<a.length;)d=a.charCodeAt(c),128>d?(b+=String.fromCharCode(d),c++):191<d&&224>d?(c2=a.charCodeAt(c+1),b+=String.fromCharCode((d&31)<<6|c2&63),c+=2):(c2=a.charCodeAt(c+1),c3=a.charCodeAt(c+2),b+=String.fromCharCode((d&15)<<12|(c2&63)<<6|c3&63),c+=3);return b}};!function(a){"object"==typeof exports&&"undefined"!=typeof module?module.exports=a():"function"==typeof define&&define.amd?define([],a):("undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:this).pako=a()}(function(){return function b(c,d,e){function f(h,l){if(!d[h]){if(!c[h]){var k="function"==typeof require&&require;if(!l&&k)return k(h,!0);if(g)return g(h,!0);k=Error("Cannot find module '"+h+"'");throw k.code="MODULE_NOT_FOUND",k;}k=d[h]={exports:{}};
@@ -107,84 +107,84 @@ d?(c[h++]=192|d>>>6,c[h++]=128|63&d):65536>d?(c[h++]=224|d>>>12,c[h++]=128|d>>>6
 2===h?31:3===h?15:7;1<h&&d<l;)g=g<<6|63&b[d++],h--;1<h?m[f++]=65533:65536>g?m[f++]=g:(g-=65536,m[f++]=55296|g>>10&1023,m[f++]=56320|1023&g)}return e(m,f)};d.utf8border=function(b,c){var d;c=c||b.length;c>b.length&&(c=b.length);for(d=c-1;0<=d&&128===(192&b[d]);)d--;return 0>d?c:0===d?c:d+k[b[d]]>c?d:c}},{"./common":3}],5:[function(b,c,d){c.exports=function(b,c,d,h){var e=65535&b|0;b=b>>>16&65535|0;for(var f;0!==d;){f=2E3<d?2E3:d;d-=f;do e=e+c[h++]|0,b=b+e|0;while(--f);e%=65521;b%=65521}return e|b<<
 16|0}},{}],6:[function(b,c,d){c.exports={Z_NO_FLUSH:0,Z_PARTIAL_FLUSH:1,Z_SYNC_FLUSH:2,Z_FULL_FLUSH:3,Z_FINISH:4,Z_BLOCK:5,Z_TREES:6,Z_OK:0,Z_STREAM_END:1,Z_NEED_DICT:2,Z_ERRNO:-1,Z_STREAM_ERROR:-2,Z_DATA_ERROR:-3,Z_BUF_ERROR:-5,Z_NO_COMPRESSION:0,Z_BEST_SPEED:1,Z_BEST_COMPRESSION:9,Z_DEFAULT_COMPRESSION:-1,Z_FILTERED:1,Z_HUFFMAN_ONLY:2,Z_RLE:3,Z_FIXED:4,Z_DEFAULT_STRATEGY:0,Z_BINARY:0,Z_TEXT:1,Z_UNKNOWN:2,Z_DEFLATED:8}},{}],7:[function(b,c,d){var e=function(){for(var b,c=[],d=0;256>d;d++){b=d;for(var e=
 0;8>e;e++)b=1&b?3988292384^b>>>1:b>>>1;c[d]=b}return c}();c.exports=function(b,c,d,k){d=k+d;for(b^=-1;k<d;k++)b=b>>>8^e[255&(b^c[k])];return b^-1}},{}],8:[function(b,c,d){function e(b,c){return b.msg=C[c],c}function f(b){for(var c=b.length;0<=--c;)b[c]=0}function g(b){var c=b.state,d=c.pending;d>b.avail_out&&(d=b.avail_out);0!==d&&(u.arraySet(b.output,c.pending_buf,c.pending_out,d,b.next_out),b.next_out+=d,c.pending_out+=d,b.total_out+=d,b.avail_out-=d,c.pending-=d,0===c.pending&&(c.pending_out=0))}
-function h(b,c){F._tr_flush_block(b,0<=b.block_start?b.block_start:-1,b.strstart-b.block_start,c);b.block_start=b.strstart;g(b.strm)}function k(b,c){b.pending_buf[b.pending++]=c}function l(b,c){b.pending_buf[b.pending++]=c>>>8&255;b.pending_buf[b.pending++]=255&c}function m(b,c){var d,e,f=b.max_chain_length,g=b.strstart,h=b.prev_length,k=b.nice_match,l=b.strstart>b.w_size-ba?b.strstart-(b.w_size-ba):0,m=b.window,n=b.w_mask,v=b.prev,B=b.strstart+U,p=m[g+h-1],q=m[g+h];b.prev_length>=b.good_match&&(f>>=
-2);k>b.lookahead&&(k=b.lookahead);do if(d=c,m[d+h]===q&&m[d+h-1]===p&&m[d]===m[g]&&m[++d]===m[g+1]){g+=2;for(d++;m[++g]===m[++d]&&m[++g]===m[++d]&&m[++g]===m[++d]&&m[++g]===m[++d]&&m[++g]===m[++d]&&m[++g]===m[++d]&&m[++g]===m[++d]&&m[++g]===m[++d]&&g<B;);if(e=U-(B-g),g=B-U,e>h){if(b.match_start=c,h=e,e>=k)break;p=m[g+h-1];q=m[g+h]}}while((c=v[c&n])>l&&0!==--f);return h<=b.lookahead?h:b.lookahead}function n(b){var c,d,e,f,g=b.w_size;do{if(f=b.window_size-b.lookahead-b.strstart,b.strstart>=g+(g-ba)){u.arraySet(b.window,
-b.window,g,g,0);b.match_start-=g;b.strstart-=g;b.block_start-=g;c=d=b.hash_size;do e=b.head[--c],b.head[c]=e>=g?e-g:0;while(--d);c=d=g;do e=b.prev[--c],b.prev[c]=e>=g?e-g:0;while(--d);f+=g}if(0===b.strm.avail_in)break;c=b.strm;e=b.window;var h=b.strstart+b.lookahead,k=c.avail_in;if(d=(k>f&&(k=f),0===k?0:(c.avail_in-=k,u.arraySet(e,c.input,c.next_in,k,h),1===c.state.wrap?c.adler=E(c.adler,e,k,h):2===c.state.wrap&&(c.adler=D(c.adler,e,k,h)),c.next_in+=k,c.total_in+=k,k)),b.lookahead+=d,b.lookahead+
-b.insert>=H)for(f=b.strstart-b.insert,b.ins_h=b.window[f],b.ins_h=(b.ins_h<<b.hash_shift^b.window[f+1])&b.hash_mask;b.insert&&(b.ins_h=(b.ins_h<<b.hash_shift^b.window[f+H-1])&b.hash_mask,b.prev[f&b.w_mask]=b.head[b.ins_h],b.head[b.ins_h]=f,f++,b.insert--,!(b.lookahead+b.insert<H)););}while(b.lookahead<ba&&0!==b.strm.avail_in)}function p(b,c){for(var d,e;;){if(b.lookahead<ba){if(n(b),b.lookahead<ba&&c===G)return P;if(0===b.lookahead)break}if(d=0,b.lookahead>=H&&(b.ins_h=(b.ins_h<<b.hash_shift^b.window[b.strstart+
-H-1])&b.hash_mask,d=b.prev[b.strstart&b.w_mask]=b.head[b.ins_h],b.head[b.ins_h]=b.strstart),0!==d&&b.strstart-d<=b.w_size-ba&&(b.match_length=m(b,d)),b.match_length>=H)if(e=F._tr_tally(b,b.strstart-b.match_start,b.match_length-H),b.lookahead-=b.match_length,b.match_length<=b.max_lazy_match&&b.lookahead>=H){b.match_length--;do b.strstart++,b.ins_h=(b.ins_h<<b.hash_shift^b.window[b.strstart+H-1])&b.hash_mask,d=b.prev[b.strstart&b.w_mask]=b.head[b.ins_h],b.head[b.ins_h]=b.strstart;while(0!==--b.match_length);
-b.strstart++}else b.strstart+=b.match_length,b.match_length=0,b.ins_h=b.window[b.strstart],b.ins_h=(b.ins_h<<b.hash_shift^b.window[b.strstart+1])&b.hash_mask;else e=F._tr_tally(b,0,b.window[b.strstart]),b.lookahead--,b.strstart++;if(e&&(h(b,!1),0===b.strm.avail_out))return P}return b.insert=b.strstart<H-1?b.strstart:H-1,c===B?(h(b,!0),0===b.strm.avail_out?W:O):b.last_lit&&(h(b,!1),0===b.strm.avail_out)?P:T}function r(b,c){for(var d,e,f;;){if(b.lookahead<ba){if(n(b),b.lookahead<ba&&c===G)return P;
-if(0===b.lookahead)break}if(d=0,b.lookahead>=H&&(b.ins_h=(b.ins_h<<b.hash_shift^b.window[b.strstart+H-1])&b.hash_mask,d=b.prev[b.strstart&b.w_mask]=b.head[b.ins_h],b.head[b.ins_h]=b.strstart),b.prev_length=b.match_length,b.prev_match=b.match_start,b.match_length=H-1,0!==d&&b.prev_length<b.max_lazy_match&&b.strstart-d<=b.w_size-ba&&(b.match_length=m(b,d),5>=b.match_length&&(b.strategy===V||b.match_length===H&&4096<b.strstart-b.match_start)&&(b.match_length=H-1)),b.prev_length>=H&&b.match_length<=b.prev_length){f=
-b.strstart+b.lookahead-H;e=F._tr_tally(b,b.strstart-1-b.prev_match,b.prev_length-H);b.lookahead-=b.prev_length-1;b.prev_length-=2;do++b.strstart<=f&&(b.ins_h=(b.ins_h<<b.hash_shift^b.window[b.strstart+H-1])&b.hash_mask,d=b.prev[b.strstart&b.w_mask]=b.head[b.ins_h],b.head[b.ins_h]=b.strstart);while(0!==--b.prev_length);if(b.match_available=0,b.match_length=H-1,b.strstart++,e&&(h(b,!1),0===b.strm.avail_out))return P}else if(b.match_available){if(e=F._tr_tally(b,0,b.window[b.strstart-1]),e&&h(b,!1),
-b.strstart++,b.lookahead--,0===b.strm.avail_out)return P}else b.match_available=1,b.strstart++,b.lookahead--}return b.match_available&&(F._tr_tally(b,0,b.window[b.strstart-1]),b.match_available=0),b.insert=b.strstart<H-1?b.strstart:H-1,c===B?(h(b,!0),0===b.strm.avail_out?W:O):b.last_lit&&(h(b,!1),0===b.strm.avail_out)?P:T}function q(b,c,d,e,f){this.good_length=b;this.max_lazy=c;this.nice_length=d;this.max_chain=e;this.func=f}function t(){this.strm=null;this.status=0;this.pending_buf=null;this.wrap=
+function h(b,c){D._tr_flush_block(b,0<=b.block_start?b.block_start:-1,b.strstart-b.block_start,c);b.block_start=b.strstart;g(b.strm)}function k(b,c){b.pending_buf[b.pending++]=c}function l(b,c){b.pending_buf[b.pending++]=c>>>8&255;b.pending_buf[b.pending++]=255&c}function m(b,c){var d,e,f=b.max_chain_length,g=b.strstart,h=b.prev_length,k=b.nice_match,l=b.strstart>b.w_size-T?b.strstart-(b.w_size-T):0,m=b.window,n=b.w_mask,v=b.prev,B=b.strstart+X,p=m[g+h-1],q=m[g+h];b.prev_length>=b.good_match&&(f>>=
+2);k>b.lookahead&&(k=b.lookahead);do if(d=c,m[d+h]===q&&m[d+h-1]===p&&m[d]===m[g]&&m[++d]===m[g+1]){g+=2;for(d++;m[++g]===m[++d]&&m[++g]===m[++d]&&m[++g]===m[++d]&&m[++g]===m[++d]&&m[++g]===m[++d]&&m[++g]===m[++d]&&m[++g]===m[++d]&&m[++g]===m[++d]&&g<B;);if(e=X-(B-g),g=B-X,e>h){if(b.match_start=c,h=e,e>=k)break;p=m[g+h-1];q=m[g+h]}}while((c=v[c&n])>l&&0!==--f);return h<=b.lookahead?h:b.lookahead}function n(b){var c,d,e,f,g=b.w_size;do{if(f=b.window_size-b.lookahead-b.strstart,b.strstart>=g+(g-T)){u.arraySet(b.window,
+b.window,g,g,0);b.match_start-=g;b.strstart-=g;b.block_start-=g;c=d=b.hash_size;do e=b.head[--c],b.head[c]=e>=g?e-g:0;while(--d);c=d=g;do e=b.prev[--c],b.prev[c]=e>=g?e-g:0;while(--d);f+=g}if(0===b.strm.avail_in)break;c=b.strm;e=b.window;var h=b.strstart+b.lookahead,k=c.avail_in;if(d=(k>f&&(k=f),0===k?0:(c.avail_in-=k,u.arraySet(e,c.input,c.next_in,k,h),1===c.state.wrap?c.adler=F(c.adler,e,k,h):2===c.state.wrap&&(c.adler=E(c.adler,e,k,h)),c.next_in+=k,c.total_in+=k,k)),b.lookahead+=d,b.lookahead+
+b.insert>=K)for(f=b.strstart-b.insert,b.ins_h=b.window[f],b.ins_h=(b.ins_h<<b.hash_shift^b.window[f+1])&b.hash_mask;b.insert&&(b.ins_h=(b.ins_h<<b.hash_shift^b.window[f+K-1])&b.hash_mask,b.prev[f&b.w_mask]=b.head[b.ins_h],b.head[b.ins_h]=f,f++,b.insert--,!(b.lookahead+b.insert<K)););}while(b.lookahead<T&&0!==b.strm.avail_in)}function p(b,c){for(var d,e;;){if(b.lookahead<T){if(n(b),b.lookahead<T&&c===G)return P;if(0===b.lookahead)break}if(d=0,b.lookahead>=K&&(b.ins_h=(b.ins_h<<b.hash_shift^b.window[b.strstart+
+K-1])&b.hash_mask,d=b.prev[b.strstart&b.w_mask]=b.head[b.ins_h],b.head[b.ins_h]=b.strstart),0!==d&&b.strstart-d<=b.w_size-T&&(b.match_length=m(b,d)),b.match_length>=K)if(e=D._tr_tally(b,b.strstart-b.match_start,b.match_length-K),b.lookahead-=b.match_length,b.match_length<=b.max_lazy_match&&b.lookahead>=K){b.match_length--;do b.strstart++,b.ins_h=(b.ins_h<<b.hash_shift^b.window[b.strstart+K-1])&b.hash_mask,d=b.prev[b.strstart&b.w_mask]=b.head[b.ins_h],b.head[b.ins_h]=b.strstart;while(0!==--b.match_length);
+b.strstart++}else b.strstart+=b.match_length,b.match_length=0,b.ins_h=b.window[b.strstart],b.ins_h=(b.ins_h<<b.hash_shift^b.window[b.strstart+1])&b.hash_mask;else e=D._tr_tally(b,0,b.window[b.strstart]),b.lookahead--,b.strstart++;if(e&&(h(b,!1),0===b.strm.avail_out))return P}return b.insert=b.strstart<K-1?b.strstart:K-1,c===B?(h(b,!0),0===b.strm.avail_out?W:O):b.last_lit&&(h(b,!1),0===b.strm.avail_out)?P:V}function r(b,c){for(var d,e,f;;){if(b.lookahead<T){if(n(b),b.lookahead<T&&c===G)return P;if(0===
+b.lookahead)break}if(d=0,b.lookahead>=K&&(b.ins_h=(b.ins_h<<b.hash_shift^b.window[b.strstart+K-1])&b.hash_mask,d=b.prev[b.strstart&b.w_mask]=b.head[b.ins_h],b.head[b.ins_h]=b.strstart),b.prev_length=b.match_length,b.prev_match=b.match_start,b.match_length=K-1,0!==d&&b.prev_length<b.max_lazy_match&&b.strstart-d<=b.w_size-T&&(b.match_length=m(b,d),5>=b.match_length&&(b.strategy===U||b.match_length===K&&4096<b.strstart-b.match_start)&&(b.match_length=K-1)),b.prev_length>=K&&b.match_length<=b.prev_length){f=
+b.strstart+b.lookahead-K;e=D._tr_tally(b,b.strstart-1-b.prev_match,b.prev_length-K);b.lookahead-=b.prev_length-1;b.prev_length-=2;do++b.strstart<=f&&(b.ins_h=(b.ins_h<<b.hash_shift^b.window[b.strstart+K-1])&b.hash_mask,d=b.prev[b.strstart&b.w_mask]=b.head[b.ins_h],b.head[b.ins_h]=b.strstart);while(0!==--b.prev_length);if(b.match_available=0,b.match_length=K-1,b.strstart++,e&&(h(b,!1),0===b.strm.avail_out))return P}else if(b.match_available){if(e=D._tr_tally(b,0,b.window[b.strstart-1]),e&&h(b,!1),
+b.strstart++,b.lookahead--,0===b.strm.avail_out)return P}else b.match_available=1,b.strstart++,b.lookahead--}return b.match_available&&(D._tr_tally(b,0,b.window[b.strstart-1]),b.match_available=0),b.insert=b.strstart<K-1?b.strstart:K-1,c===B?(h(b,!0),0===b.strm.avail_out?W:O):b.last_lit&&(h(b,!1),0===b.strm.avail_out)?P:V}function q(b,c,d,e,f){this.good_length=b;this.max_lazy=c;this.nice_length=d;this.max_chain=e;this.func=f}function t(){this.strm=null;this.status=0;this.pending_buf=null;this.wrap=
 this.pending=this.pending_out=this.pending_buf_size=0;this.gzhead=null;this.gzindex=0;this.method=A;this.last_flush=-1;this.w_mask=this.w_bits=this.w_size=0;this.window=null;this.window_size=0;this.head=this.prev=null;this.nice_match=this.good_match=this.strategy=this.level=this.max_lazy_match=this.max_chain_length=this.prev_length=this.lookahead=this.match_start=this.strstart=this.match_available=this.prev_match=this.match_length=this.block_start=this.hash_shift=this.hash_mask=this.hash_bits=this.hash_size=
-this.ins_h=0;this.dyn_ltree=new u.Buf16(2*aa);this.dyn_dtree=new u.Buf16(2*(2*J+1));this.bl_tree=new u.Buf16(2*(2*I+1));f(this.dyn_ltree);f(this.dyn_dtree);f(this.bl_tree);this.bl_desc=this.d_desc=this.l_desc=null;this.bl_count=new u.Buf16(N+1);this.heap=new u.Buf16(2*R+1);f(this.heap);this.heap_max=this.heap_len=0;this.depth=new u.Buf16(2*R+1);f(this.depth);this.bi_valid=this.bi_buf=this.insert=this.matches=this.static_len=this.opt_len=this.d_buf=this.last_lit=this.lit_bufsize=this.l_buf=0}function y(b){var c;
-return b&&b.state?(b.total_in=b.total_out=0,b.data_type=Z,c=b.state,c.pending=0,c.pending_out=0,0>c.wrap&&(c.wrap=-c.wrap),c.status=c.wrap?ea:ca,b.adler=2===c.wrap?0:1,c.last_flush=G,F._tr_init(c),M):e(b,K)}function x(b){var c=y(b);c===M&&(b=b.state,b.window_size=2*b.w_size,f(b.head),b.max_lazy_match=z[b.level].max_lazy,b.good_match=z[b.level].good_length,b.nice_match=z[b.level].nice_length,b.max_chain_length=z[b.level].max_chain,b.strstart=0,b.block_start=0,b.lookahead=0,b.insert=0,b.match_length=
-b.prev_length=H-1,b.match_available=0,b.ins_h=0);return c}function w(b,c,d,f,g,h){if(!b)return K;var k=1;if(c===L&&(c=6),0>f?(k=0,f=-f):15<f&&(k=2,f-=16),1>g||g>v||d!==A||8>f||15<f||0>c||9<c||0>h||h>S)return e(b,K);8===f&&(f=9);var l=new t;return b.state=l,l.strm=b,l.wrap=k,l.gzhead=null,l.w_bits=f,l.w_size=1<<l.w_bits,l.w_mask=l.w_size-1,l.hash_bits=g+7,l.hash_size=1<<l.hash_bits,l.hash_mask=l.hash_size-1,l.hash_shift=~~((l.hash_bits+H-1)/H),l.window=new u.Buf8(2*l.w_size),l.head=new u.Buf16(l.hash_size),
-l.prev=new u.Buf16(l.w_size),l.lit_bufsize=1<<g+6,l.pending_buf_size=4*l.lit_bufsize,l.pending_buf=new u.Buf8(l.pending_buf_size),l.d_buf=1*l.lit_bufsize,l.l_buf=3*l.lit_bufsize,l.level=c,l.strategy=h,l.method=d,x(b)}var z,u=b("../utils/common"),F=b("./trees"),E=b("./adler32"),D=b("./crc32"),C=b("./messages"),G=0,B=4,M=0,K=-2,L=-1,V=1,S=4,Z=2,A=8,v=9,R=286,J=30,I=19,aa=2*R+1,N=15,H=3,U=258,ba=U+H+1,ea=42,ca=113,P=1,T=2,W=3,O=4;z=[new q(0,0,0,0,function(b,c){var d=65535;for(d>b.pending_buf_size-5&&
-(d=b.pending_buf_size-5);;){if(1>=b.lookahead){if(n(b),0===b.lookahead&&c===G)return P;if(0===b.lookahead)break}b.strstart+=b.lookahead;b.lookahead=0;var e=b.block_start+d;if((0===b.strstart||b.strstart>=e)&&(b.lookahead=b.strstart-e,b.strstart=e,h(b,!1),0===b.strm.avail_out)||b.strstart-b.block_start>=b.w_size-ba&&(h(b,!1),0===b.strm.avail_out))return P}return b.insert=0,c===B?(h(b,!0),0===b.strm.avail_out?W:O):(b.strstart>b.block_start&&h(b,!1),P)}),new q(4,4,8,4,p),new q(4,5,16,8,p),new q(4,6,
-32,32,p),new q(4,4,16,16,r),new q(8,16,32,32,r),new q(8,16,128,128,r),new q(8,32,128,256,r),new q(32,128,258,1024,r),new q(32,258,258,4096,r)];d.deflateInit=function(b,c){return w(b,c,A,15,8,0)};d.deflateInit2=w;d.deflateReset=x;d.deflateResetKeep=y;d.deflateSetHeader=function(b,c){return b&&b.state?2!==b.state.wrap?K:(b.state.gzhead=c,M):K};d.deflate=function(b,c){var d,m,v,p;if(!b||!b.state||5<c||0>c)return b?e(b,K):K;if(m=b.state,!b.output||!b.input&&0!==b.avail_in||666===m.status&&c!==B)return e(b,
-0===b.avail_out?-5:K);if(m.strm=b,d=m.last_flush,m.last_flush=c,m.status===ea)2===m.wrap?(b.adler=0,k(m,31),k(m,139),k(m,8),m.gzhead?(k(m,(m.gzhead.text?1:0)+(m.gzhead.hcrc?2:0)+(m.gzhead.extra?4:0)+(m.gzhead.name?8:0)+(m.gzhead.comment?16:0)),k(m,255&m.gzhead.time),k(m,m.gzhead.time>>8&255),k(m,m.gzhead.time>>16&255),k(m,m.gzhead.time>>24&255),k(m,9===m.level?2:2<=m.strategy||2>m.level?4:0),k(m,255&m.gzhead.os),m.gzhead.extra&&m.gzhead.extra.length&&(k(m,255&m.gzhead.extra.length),k(m,m.gzhead.extra.length>>
-8&255)),m.gzhead.hcrc&&(b.adler=D(b.adler,m.pending_buf,m.pending,0)),m.gzindex=0,m.status=69):(k(m,0),k(m,0),k(m,0),k(m,0),k(m,0),k(m,9===m.level?2:2<=m.strategy||2>m.level?4:0),k(m,3),m.status=ca)):(v=A+(m.w_bits-8<<4)<<8,v|=(2<=m.strategy||2>m.level?0:6>m.level?1:6===m.level?2:3)<<6,0!==m.strstart&&(v|=32),m.status=ca,l(m,v+(31-v%31)),0!==m.strstart&&(l(m,b.adler>>>16),l(m,65535&b.adler)),b.adler=1);if(69===m.status)if(m.gzhead.extra){for(v=m.pending;m.gzindex<(65535&m.gzhead.extra.length)&&(m.pending!==
-m.pending_buf_size||(m.gzhead.hcrc&&m.pending>v&&(b.adler=D(b.adler,m.pending_buf,m.pending-v,v)),g(b),v=m.pending,m.pending!==m.pending_buf_size));)k(m,255&m.gzhead.extra[m.gzindex]),m.gzindex++;m.gzhead.hcrc&&m.pending>v&&(b.adler=D(b.adler,m.pending_buf,m.pending-v,v));m.gzindex===m.gzhead.extra.length&&(m.gzindex=0,m.status=73)}else m.status=73;if(73===m.status)if(m.gzhead.name){v=m.pending;do{if(m.pending===m.pending_buf_size&&(m.gzhead.hcrc&&m.pending>v&&(b.adler=D(b.adler,m.pending_buf,m.pending-
-v,v)),g(b),v=m.pending,m.pending===m.pending_buf_size)){p=1;break}p=m.gzindex<m.gzhead.name.length?255&m.gzhead.name.charCodeAt(m.gzindex++):0;k(m,p)}while(0!==p);m.gzhead.hcrc&&m.pending>v&&(b.adler=D(b.adler,m.pending_buf,m.pending-v,v));0===p&&(m.gzindex=0,m.status=91)}else m.status=91;if(91===m.status)if(m.gzhead.comment){v=m.pending;do{if(m.pending===m.pending_buf_size&&(m.gzhead.hcrc&&m.pending>v&&(b.adler=D(b.adler,m.pending_buf,m.pending-v,v)),g(b),v=m.pending,m.pending===m.pending_buf_size)){p=
-1;break}p=m.gzindex<m.gzhead.comment.length?255&m.gzhead.comment.charCodeAt(m.gzindex++):0;k(m,p)}while(0!==p);m.gzhead.hcrc&&m.pending>v&&(b.adler=D(b.adler,m.pending_buf,m.pending-v,v));0===p&&(m.status=103)}else m.status=103;if(103===m.status&&(m.gzhead.hcrc?(m.pending+2>m.pending_buf_size&&g(b),m.pending+2<=m.pending_buf_size&&(k(m,255&b.adler),k(m,b.adler>>8&255),b.adler=0,m.status=ca)):m.status=ca),0!==m.pending){if(g(b),0===b.avail_out)return m.last_flush=-1,M}else if(0===b.avail_in&&(c<<1)-
-(4<c?9:0)<=(d<<1)-(4<d?9:0)&&c!==B)return e(b,-5);if(666===m.status&&0!==b.avail_in)return e(b,-5);if(0!==b.avail_in||0!==m.lookahead||c!==G&&666!==m.status){var q;if(2===m.strategy)a:{for(var r;;){if(0===m.lookahead&&(n(m),0===m.lookahead)){if(c===G){q=P;break a}break}if(m.match_length=0,r=F._tr_tally(m,0,m.window[m.strstart]),m.lookahead--,m.strstart++,r&&(h(m,!1),0===m.strm.avail_out)){q=P;break a}}q=(m.insert=0,c===B?(h(m,!0),0===m.strm.avail_out?W:O):m.last_lit&&(h(m,!1),0===m.strm.avail_out)?
-P:T)}else if(3===m.strategy)a:{var R,J;for(r=m.window;;){if(m.lookahead<=U){if(n(m),m.lookahead<=U&&c===G){q=P;break a}if(0===m.lookahead)break}if(m.match_length=0,m.lookahead>=H&&0<m.strstart&&(J=m.strstart-1,R=r[J],R===r[++J]&&R===r[++J]&&R===r[++J])){for(d=m.strstart+U;R===r[++J]&&R===r[++J]&&R===r[++J]&&R===r[++J]&&R===r[++J]&&R===r[++J]&&R===r[++J]&&R===r[++J]&&J<d;);m.match_length=U-(d-J);m.match_length>m.lookahead&&(m.match_length=m.lookahead)}if(m.match_length>=H?(q=F._tr_tally(m,1,m.match_length-
-H),m.lookahead-=m.match_length,m.strstart+=m.match_length,m.match_length=0):(q=F._tr_tally(m,0,m.window[m.strstart]),m.lookahead--,m.strstart++),q&&(h(m,!1),0===m.strm.avail_out)){q=P;break a}}q=(m.insert=0,c===B?(h(m,!0),0===m.strm.avail_out?W:O):m.last_lit&&(h(m,!1),0===m.strm.avail_out)?P:T)}else q=z[m.level].func(m,c);if(q!==W&&q!==O||(m.status=666),q===P||q===W)return 0===b.avail_out&&(m.last_flush=-1),M;if(q===T&&(1===c?F._tr_align(m):5!==c&&(F._tr_stored_block(m,0,0,!1),3===c&&(f(m.head),0===
+this.ins_h=0;this.dyn_ltree=new u.Buf16(2*ca);this.dyn_dtree=new u.Buf16(2*(2*I+1));this.bl_tree=new u.Buf16(2*(2*J+1));f(this.dyn_ltree);f(this.dyn_dtree);f(this.bl_tree);this.bl_desc=this.d_desc=this.l_desc=null;this.bl_count=new u.Buf16(N+1);this.heap=new u.Buf16(2*R+1);f(this.heap);this.heap_max=this.heap_len=0;this.depth=new u.Buf16(2*R+1);f(this.depth);this.bi_valid=this.bi_buf=this.insert=this.matches=this.static_len=this.opt_len=this.d_buf=this.last_lit=this.lit_bufsize=this.l_buf=0}function z(b){var c;
+return b&&b.state?(b.total_in=b.total_out=0,b.data_type=ba,c=b.state,c.pending=0,c.pending_out=0,0>c.wrap&&(c.wrap=-c.wrap),c.status=c.wrap?ea:aa,b.adler=2===c.wrap?0:1,c.last_flush=G,D._tr_init(c),M):e(b,L)}function w(b){var c=z(b);c===M&&(b=b.state,b.window_size=2*b.w_size,f(b.head),b.max_lazy_match=y[b.level].max_lazy,b.good_match=y[b.level].good_length,b.nice_match=y[b.level].nice_length,b.max_chain_length=y[b.level].max_chain,b.strstart=0,b.block_start=0,b.lookahead=0,b.insert=0,b.match_length=
+b.prev_length=K-1,b.match_available=0,b.ins_h=0);return c}function x(b,c,d,f,g,h){if(!b)return L;var k=1;if(c===H&&(c=6),0>f?(k=0,f=-f):15<f&&(k=2,f-=16),1>g||g>v||d!==A||8>f||15<f||0>c||9<c||0>h||h>S)return e(b,L);8===f&&(f=9);var l=new t;return b.state=l,l.strm=b,l.wrap=k,l.gzhead=null,l.w_bits=f,l.w_size=1<<l.w_bits,l.w_mask=l.w_size-1,l.hash_bits=g+7,l.hash_size=1<<l.hash_bits,l.hash_mask=l.hash_size-1,l.hash_shift=~~((l.hash_bits+K-1)/K),l.window=new u.Buf8(2*l.w_size),l.head=new u.Buf16(l.hash_size),
+l.prev=new u.Buf16(l.w_size),l.lit_bufsize=1<<g+6,l.pending_buf_size=4*l.lit_bufsize,l.pending_buf=new u.Buf8(l.pending_buf_size),l.d_buf=1*l.lit_bufsize,l.l_buf=3*l.lit_bufsize,l.level=c,l.strategy=h,l.method=d,w(b)}var y,u=b("../utils/common"),D=b("./trees"),F=b("./adler32"),E=b("./crc32"),C=b("./messages"),G=0,B=4,M=0,L=-2,H=-1,U=1,S=4,ba=2,A=8,v=9,R=286,I=30,J=19,ca=2*R+1,N=15,K=3,X=258,T=X+K+1,ea=42,aa=113,P=1,V=2,W=3,O=4;y=[new q(0,0,0,0,function(b,c){var d=65535;for(d>b.pending_buf_size-5&&
+(d=b.pending_buf_size-5);;){if(1>=b.lookahead){if(n(b),0===b.lookahead&&c===G)return P;if(0===b.lookahead)break}b.strstart+=b.lookahead;b.lookahead=0;var e=b.block_start+d;if((0===b.strstart||b.strstart>=e)&&(b.lookahead=b.strstart-e,b.strstart=e,h(b,!1),0===b.strm.avail_out)||b.strstart-b.block_start>=b.w_size-T&&(h(b,!1),0===b.strm.avail_out))return P}return b.insert=0,c===B?(h(b,!0),0===b.strm.avail_out?W:O):(b.strstart>b.block_start&&h(b,!1),P)}),new q(4,4,8,4,p),new q(4,5,16,8,p),new q(4,6,32,
+32,p),new q(4,4,16,16,r),new q(8,16,32,32,r),new q(8,16,128,128,r),new q(8,32,128,256,r),new q(32,128,258,1024,r),new q(32,258,258,4096,r)];d.deflateInit=function(b,c){return x(b,c,A,15,8,0)};d.deflateInit2=x;d.deflateReset=w;d.deflateResetKeep=z;d.deflateSetHeader=function(b,c){return b&&b.state?2!==b.state.wrap?L:(b.state.gzhead=c,M):L};d.deflate=function(b,c){var d,m,v,p;if(!b||!b.state||5<c||0>c)return b?e(b,L):L;if(m=b.state,!b.output||!b.input&&0!==b.avail_in||666===m.status&&c!==B)return e(b,
+0===b.avail_out?-5:L);if(m.strm=b,d=m.last_flush,m.last_flush=c,m.status===ea)2===m.wrap?(b.adler=0,k(m,31),k(m,139),k(m,8),m.gzhead?(k(m,(m.gzhead.text?1:0)+(m.gzhead.hcrc?2:0)+(m.gzhead.extra?4:0)+(m.gzhead.name?8:0)+(m.gzhead.comment?16:0)),k(m,255&m.gzhead.time),k(m,m.gzhead.time>>8&255),k(m,m.gzhead.time>>16&255),k(m,m.gzhead.time>>24&255),k(m,9===m.level?2:2<=m.strategy||2>m.level?4:0),k(m,255&m.gzhead.os),m.gzhead.extra&&m.gzhead.extra.length&&(k(m,255&m.gzhead.extra.length),k(m,m.gzhead.extra.length>>
+8&255)),m.gzhead.hcrc&&(b.adler=E(b.adler,m.pending_buf,m.pending,0)),m.gzindex=0,m.status=69):(k(m,0),k(m,0),k(m,0),k(m,0),k(m,0),k(m,9===m.level?2:2<=m.strategy||2>m.level?4:0),k(m,3),m.status=aa)):(v=A+(m.w_bits-8<<4)<<8,v|=(2<=m.strategy||2>m.level?0:6>m.level?1:6===m.level?2:3)<<6,0!==m.strstart&&(v|=32),m.status=aa,l(m,v+(31-v%31)),0!==m.strstart&&(l(m,b.adler>>>16),l(m,65535&b.adler)),b.adler=1);if(69===m.status)if(m.gzhead.extra){for(v=m.pending;m.gzindex<(65535&m.gzhead.extra.length)&&(m.pending!==
+m.pending_buf_size||(m.gzhead.hcrc&&m.pending>v&&(b.adler=E(b.adler,m.pending_buf,m.pending-v,v)),g(b),v=m.pending,m.pending!==m.pending_buf_size));)k(m,255&m.gzhead.extra[m.gzindex]),m.gzindex++;m.gzhead.hcrc&&m.pending>v&&(b.adler=E(b.adler,m.pending_buf,m.pending-v,v));m.gzindex===m.gzhead.extra.length&&(m.gzindex=0,m.status=73)}else m.status=73;if(73===m.status)if(m.gzhead.name){v=m.pending;do{if(m.pending===m.pending_buf_size&&(m.gzhead.hcrc&&m.pending>v&&(b.adler=E(b.adler,m.pending_buf,m.pending-
+v,v)),g(b),v=m.pending,m.pending===m.pending_buf_size)){p=1;break}p=m.gzindex<m.gzhead.name.length?255&m.gzhead.name.charCodeAt(m.gzindex++):0;k(m,p)}while(0!==p);m.gzhead.hcrc&&m.pending>v&&(b.adler=E(b.adler,m.pending_buf,m.pending-v,v));0===p&&(m.gzindex=0,m.status=91)}else m.status=91;if(91===m.status)if(m.gzhead.comment){v=m.pending;do{if(m.pending===m.pending_buf_size&&(m.gzhead.hcrc&&m.pending>v&&(b.adler=E(b.adler,m.pending_buf,m.pending-v,v)),g(b),v=m.pending,m.pending===m.pending_buf_size)){p=
+1;break}p=m.gzindex<m.gzhead.comment.length?255&m.gzhead.comment.charCodeAt(m.gzindex++):0;k(m,p)}while(0!==p);m.gzhead.hcrc&&m.pending>v&&(b.adler=E(b.adler,m.pending_buf,m.pending-v,v));0===p&&(m.status=103)}else m.status=103;if(103===m.status&&(m.gzhead.hcrc?(m.pending+2>m.pending_buf_size&&g(b),m.pending+2<=m.pending_buf_size&&(k(m,255&b.adler),k(m,b.adler>>8&255),b.adler=0,m.status=aa)):m.status=aa),0!==m.pending){if(g(b),0===b.avail_out)return m.last_flush=-1,M}else if(0===b.avail_in&&(c<<1)-
+(4<c?9:0)<=(d<<1)-(4<d?9:0)&&c!==B)return e(b,-5);if(666===m.status&&0!==b.avail_in)return e(b,-5);if(0!==b.avail_in||0!==m.lookahead||c!==G&&666!==m.status){var q;if(2===m.strategy)a:{for(var r;;){if(0===m.lookahead&&(n(m),0===m.lookahead)){if(c===G){q=P;break a}break}if(m.match_length=0,r=D._tr_tally(m,0,m.window[m.strstart]),m.lookahead--,m.strstart++,r&&(h(m,!1),0===m.strm.avail_out)){q=P;break a}}q=(m.insert=0,c===B?(h(m,!0),0===m.strm.avail_out?W:O):m.last_lit&&(h(m,!1),0===m.strm.avail_out)?
+P:V)}else if(3===m.strategy)a:{var R,I;for(r=m.window;;){if(m.lookahead<=X){if(n(m),m.lookahead<=X&&c===G){q=P;break a}if(0===m.lookahead)break}if(m.match_length=0,m.lookahead>=K&&0<m.strstart&&(I=m.strstart-1,R=r[I],R===r[++I]&&R===r[++I]&&R===r[++I])){for(d=m.strstart+X;R===r[++I]&&R===r[++I]&&R===r[++I]&&R===r[++I]&&R===r[++I]&&R===r[++I]&&R===r[++I]&&R===r[++I]&&I<d;);m.match_length=X-(d-I);m.match_length>m.lookahead&&(m.match_length=m.lookahead)}if(m.match_length>=K?(q=D._tr_tally(m,1,m.match_length-
+K),m.lookahead-=m.match_length,m.strstart+=m.match_length,m.match_length=0):(q=D._tr_tally(m,0,m.window[m.strstart]),m.lookahead--,m.strstart++),q&&(h(m,!1),0===m.strm.avail_out)){q=P;break a}}q=(m.insert=0,c===B?(h(m,!0),0===m.strm.avail_out?W:O):m.last_lit&&(h(m,!1),0===m.strm.avail_out)?P:V)}else q=y[m.level].func(m,c);if(q!==W&&q!==O||(m.status=666),q===P||q===W)return 0===b.avail_out&&(m.last_flush=-1),M;if(q===V&&(1===c?D._tr_align(m):5!==c&&(D._tr_stored_block(m,0,0,!1),3===c&&(f(m.head),0===
 m.lookahead&&(m.strstart=0,m.block_start=0,m.insert=0))),g(b),0===b.avail_out))return m.last_flush=-1,M}return c!==B?M:0>=m.wrap?1:(2===m.wrap?(k(m,255&b.adler),k(m,b.adler>>8&255),k(m,b.adler>>16&255),k(m,b.adler>>24&255),k(m,255&b.total_in),k(m,b.total_in>>8&255),k(m,b.total_in>>16&255),k(m,b.total_in>>24&255)):(l(m,b.adler>>>16),l(m,65535&b.adler)),g(b),0<m.wrap&&(m.wrap=-m.wrap),0!==m.pending?M:1)};d.deflateEnd=function(b){var c;return b&&b.state?(c=b.state.status,c!==ea&&69!==c&&73!==c&&91!==
-c&&103!==c&&c!==ca&&666!==c?e(b,K):(b.state=null,c===ca?e(b,-3):M)):K};d.deflateSetDictionary=function(b,c){var d,e,g,h,k,l,m;e=c.length;if(!b||!b.state||(d=b.state,h=d.wrap,2===h||1===h&&d.status!==ea||d.lookahead))return K;1===h&&(b.adler=E(b.adler,c,e,0));d.wrap=0;e>=d.w_size&&(0===h&&(f(d.head),d.strstart=0,d.block_start=0,d.insert=0),k=new u.Buf8(d.w_size),u.arraySet(k,c,e-d.w_size,d.w_size,0),c=k,e=d.w_size);k=b.avail_in;l=b.next_in;m=b.input;b.avail_in=e;b.next_in=0;b.input=c;for(n(d);d.lookahead>=
-H;){e=d.strstart;g=d.lookahead-(H-1);do d.ins_h=(d.ins_h<<d.hash_shift^d.window[e+H-1])&d.hash_mask,d.prev[e&d.w_mask]=d.head[d.ins_h],d.head[d.ins_h]=e,e++;while(--g);d.strstart=e;d.lookahead=H-1;n(d)}return d.strstart+=d.lookahead,d.block_start=d.strstart,d.insert=d.lookahead,d.lookahead=0,d.match_length=d.prev_length=H-1,d.match_available=0,b.next_in=l,b.input=m,b.avail_in=k,d.wrap=h,M};d.deflateInfo="pako deflate (from Nodeca project)"},{"../utils/common":3,"./adler32":5,"./crc32":7,"./messages":13,
-"./trees":14}],9:[function(b,c,d){c.exports=function(){this.os=this.xflags=this.time=this.text=0;this.extra=null;this.extra_len=0;this.comment=this.name="";this.hcrc=0;this.done=!1}},{}],10:[function(b,c,d){c.exports=function(b,c){var d,e,f,l,m,n,p,r,q,t,y,x,w,z,u,F,E,D,C,G,B,M,K,L;d=b.state;e=b.next_in;K=b.input;f=e+(b.avail_in-5);l=b.next_out;L=b.output;m=l-(c-b.avail_out);n=l+(b.avail_out-257);p=d.dmax;r=d.wsize;q=d.whave;t=d.wnext;y=d.window;x=d.hold;w=d.bits;z=d.lencode;u=d.distcode;F=(1<<d.lenbits)-
-1;E=(1<<d.distbits)-1;a:do b:for(15>w&&(x+=K[e++]<<w,w+=8,x+=K[e++]<<w,w+=8),D=z[x&F];;){if(C=D>>>24,x>>>=C,w-=C,C=D>>>16&255,0===C)L[l++]=65535&D;else{if(!(16&C)){if(0===(64&C)){D=z[(65535&D)+(x&(1<<C)-1)];continue b}if(32&C){d.mode=12;break a}b.msg="invalid literal/length code";d.mode=30;break a}G=65535&D;(C&=15)&&(w<C&&(x+=K[e++]<<w,w+=8),G+=x&(1<<C)-1,x>>>=C,w-=C);15>w&&(x+=K[e++]<<w,w+=8,x+=K[e++]<<w,w+=8);D=u[x&E];c:for(;;){if(C=D>>>24,x>>>=C,w-=C,C=D>>>16&255,!(16&C)){if(0===(64&C)){D=u[(65535&
-D)+(x&(1<<C)-1)];continue c}b.msg="invalid distance code";d.mode=30;break a}if(B=65535&D,C&=15,w<C&&(x+=K[e++]<<w,w+=8,w<C&&(x+=K[e++]<<w,w+=8)),B+=x&(1<<C)-1,B>p){b.msg="invalid distance too far back";d.mode=30;break a}if(x>>>=C,w-=C,C=l-m,B>C){if(C=B-C,C>q&&d.sane){b.msg="invalid distance too far back";d.mode=30;break a}if(D=0,M=y,0===t){if(D+=r-C,C<G){G-=C;do L[l++]=y[D++];while(--C);D=l-B;M=L}}else if(t<C){if(D+=r+t-C,C-=t,C<G){G-=C;do L[l++]=y[D++];while(--C);if(D=0,t<G){C=t;G-=C;do L[l++]=y[D++];
-while(--C);D=l-B;M=L}}}else if(D+=t-C,C<G){G-=C;do L[l++]=y[D++];while(--C);D=l-B;M=L}for(;2<G;)L[l++]=M[D++],L[l++]=M[D++],L[l++]=M[D++],G-=3;G&&(L[l++]=M[D++],1<G&&(L[l++]=M[D++]))}else{D=l-B;do L[l++]=L[D++],L[l++]=L[D++],L[l++]=L[D++],G-=3;while(2<G);G&&(L[l++]=L[D++],1<G&&(L[l++]=L[D++]))}break}}break}while(e<f&&l<n);G=w>>3;e-=G;w-=G<<3;b.next_in=e;b.next_out=l;b.avail_in=e<f?5+(f-e):5-(e-f);b.avail_out=l<n?257+(n-l):257-(l-n);d.hold=x&(1<<w)-1;d.bits=w}},{}],11:[function(b,c,d){function e(b){return(b>>>
+c&&103!==c&&c!==aa&&666!==c?e(b,L):(b.state=null,c===aa?e(b,-3):M)):L};d.deflateSetDictionary=function(b,c){var d,e,g,h,k,l,m;e=c.length;if(!b||!b.state||(d=b.state,h=d.wrap,2===h||1===h&&d.status!==ea||d.lookahead))return L;1===h&&(b.adler=F(b.adler,c,e,0));d.wrap=0;e>=d.w_size&&(0===h&&(f(d.head),d.strstart=0,d.block_start=0,d.insert=0),k=new u.Buf8(d.w_size),u.arraySet(k,c,e-d.w_size,d.w_size,0),c=k,e=d.w_size);k=b.avail_in;l=b.next_in;m=b.input;b.avail_in=e;b.next_in=0;b.input=c;for(n(d);d.lookahead>=
+K;){e=d.strstart;g=d.lookahead-(K-1);do d.ins_h=(d.ins_h<<d.hash_shift^d.window[e+K-1])&d.hash_mask,d.prev[e&d.w_mask]=d.head[d.ins_h],d.head[d.ins_h]=e,e++;while(--g);d.strstart=e;d.lookahead=K-1;n(d)}return d.strstart+=d.lookahead,d.block_start=d.strstart,d.insert=d.lookahead,d.lookahead=0,d.match_length=d.prev_length=K-1,d.match_available=0,b.next_in=l,b.input=m,b.avail_in=k,d.wrap=h,M};d.deflateInfo="pako deflate (from Nodeca project)"},{"../utils/common":3,"./adler32":5,"./crc32":7,"./messages":13,
+"./trees":14}],9:[function(b,c,d){c.exports=function(){this.os=this.xflags=this.time=this.text=0;this.extra=null;this.extra_len=0;this.comment=this.name="";this.hcrc=0;this.done=!1}},{}],10:[function(b,c,d){c.exports=function(b,c){var d,e,f,l,m,n,p,r,q,t,z,w,x,y,u,D,F,E,C,G,B,M,L,H;d=b.state;e=b.next_in;L=b.input;f=e+(b.avail_in-5);l=b.next_out;H=b.output;m=l-(c-b.avail_out);n=l+(b.avail_out-257);p=d.dmax;r=d.wsize;q=d.whave;t=d.wnext;z=d.window;w=d.hold;x=d.bits;y=d.lencode;u=d.distcode;D=(1<<d.lenbits)-
+1;F=(1<<d.distbits)-1;a:do b:for(15>x&&(w+=L[e++]<<x,x+=8,w+=L[e++]<<x,x+=8),E=y[w&D];;){if(C=E>>>24,w>>>=C,x-=C,C=E>>>16&255,0===C)H[l++]=65535&E;else{if(!(16&C)){if(0===(64&C)){E=y[(65535&E)+(w&(1<<C)-1)];continue b}if(32&C){d.mode=12;break a}b.msg="invalid literal/length code";d.mode=30;break a}G=65535&E;(C&=15)&&(x<C&&(w+=L[e++]<<x,x+=8),G+=w&(1<<C)-1,w>>>=C,x-=C);15>x&&(w+=L[e++]<<x,x+=8,w+=L[e++]<<x,x+=8);E=u[w&F];c:for(;;){if(C=E>>>24,w>>>=C,x-=C,C=E>>>16&255,!(16&C)){if(0===(64&C)){E=u[(65535&
+E)+(w&(1<<C)-1)];continue c}b.msg="invalid distance code";d.mode=30;break a}if(B=65535&E,C&=15,x<C&&(w+=L[e++]<<x,x+=8,x<C&&(w+=L[e++]<<x,x+=8)),B+=w&(1<<C)-1,B>p){b.msg="invalid distance too far back";d.mode=30;break a}if(w>>>=C,x-=C,C=l-m,B>C){if(C=B-C,C>q&&d.sane){b.msg="invalid distance too far back";d.mode=30;break a}if(E=0,M=z,0===t){if(E+=r-C,C<G){G-=C;do H[l++]=z[E++];while(--C);E=l-B;M=H}}else if(t<C){if(E+=r+t-C,C-=t,C<G){G-=C;do H[l++]=z[E++];while(--C);if(E=0,t<G){C=t;G-=C;do H[l++]=z[E++];
+while(--C);E=l-B;M=H}}}else if(E+=t-C,C<G){G-=C;do H[l++]=z[E++];while(--C);E=l-B;M=H}for(;2<G;)H[l++]=M[E++],H[l++]=M[E++],H[l++]=M[E++],G-=3;G&&(H[l++]=M[E++],1<G&&(H[l++]=M[E++]))}else{E=l-B;do H[l++]=H[E++],H[l++]=H[E++],H[l++]=H[E++],G-=3;while(2<G);G&&(H[l++]=H[E++],1<G&&(H[l++]=H[E++]))}break}}break}while(e<f&&l<n);G=x>>3;e-=G;x-=G<<3;b.next_in=e;b.next_out=l;b.avail_in=e<f?5+(f-e):5-(e-f);b.avail_out=l<n?257+(n-l):257-(l-n);d.hold=w&(1<<x)-1;d.bits=x}},{}],11:[function(b,c,d){function e(b){return(b>>>
 24&255)+(b>>>8&65280)+((65280&b)<<8)+((255&b)<<24)}function f(){this.mode=0;this.last=!1;this.wrap=0;this.havedict=!1;this.total=this.check=this.dmax=this.flags=0;this.head=null;this.wnext=this.whave=this.wsize=this.wbits=0;this.window=null;this.extra=this.offset=this.length=this.bits=this.hold=0;this.distcode=this.lencode=null;this.have=this.ndist=this.nlen=this.ncode=this.distbits=this.lenbits=0;this.next=null;this.lens=new r.Buf16(320);this.work=new r.Buf16(288);this.distdyn=this.lendyn=null;this.was=
-this.back=this.sane=0}function g(b){var c;return b&&b.state?(c=b.state,b.total_in=b.total_out=c.total=0,b.msg="",c.wrap&&(b.adler=1&c.wrap),c.mode=u,c.last=0,c.havedict=0,c.dmax=32768,c.head=null,c.hold=0,c.bits=0,c.lencode=c.lendyn=new r.Buf32(F),c.distcode=c.distdyn=new r.Buf32(E),c.sane=1,c.back=-1,w):z}function h(b){var c;return b&&b.state?(c=b.state,c.wsize=0,c.whave=0,c.wnext=0,g(b)):z}function k(b,c){var d,e;return b&&b.state?(e=b.state,0>c?(d=0,c=-c):(d=(c>>4)+1,48>c&&(c&=15)),c&&(8>c||15<
-c)?z:(null!==e.window&&e.wbits!==c&&(e.window=null),e.wrap=d,e.wbits=c,h(b))):z}function l(b,c){var d,e;return b?(e=new f,b.state=e,e.window=null,d=k(b,c),d!==w&&(b.state=null),d):z}function m(b,c,d,e){var f;b=b.state;return null===b.window&&(b.wsize=1<<b.wbits,b.wnext=0,b.whave=0,b.window=new r.Buf8(b.wsize)),e>=b.wsize?(r.arraySet(b.window,c,d-b.wsize,b.wsize,0),b.wnext=0,b.whave=b.wsize):(f=b.wsize-b.wnext,f>e&&(f=e),r.arraySet(b.window,c,d-e,f,b.wnext),e-=f,e?(r.arraySet(b.window,c,d-e,e,0),b.wnext=
-e,b.whave=b.wsize):(b.wnext+=f,b.wnext===b.wsize&&(b.wnext=0),b.whave<b.wsize&&(b.whave+=f))),0}var n,p,r=b("../utils/common"),q=b("./adler32"),t=b("./crc32"),y=b("./inffast"),x=b("./inftrees"),w=0,z=-2,u=1,F=852,E=592,D=!0;d.inflateReset=h;d.inflateReset2=k;d.inflateResetKeep=g;d.inflateInit=function(b){return l(b,15)};d.inflateInit2=l;d.inflate=function(b,c){var d,f,g,h,k,l,C,A,v,R,J,I,aa,N,H,G,E,F,ca,P,T,W,O=0,Q=new r.Buf8(4),fa=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15];if(!b||!b.state||
-!b.output||!b.input&&0!==b.avail_in)return z;d=b.state;12===d.mode&&(d.mode=13);k=b.next_out;g=b.output;C=b.avail_out;h=b.next_in;f=b.input;l=b.avail_in;A=d.hold;v=d.bits;R=l;J=C;T=w;a:for(;;)switch(d.mode){case u:if(0===d.wrap){d.mode=13;break}for(;16>v;){if(0===l)break a;l--;A+=f[h++]<<v;v+=8}if(2&d.wrap&&35615===A){d.check=0;Q[0]=255&A;Q[1]=A>>>8&255;d.check=t(d.check,Q,2,0);v=A=0;d.mode=2;break}if(d.flags=0,d.head&&(d.head.done=!1),!(1&d.wrap)||(((255&A)<<8)+(A>>8))%31){b.msg="incorrect header check";
+this.back=this.sane=0}function g(b){var c;return b&&b.state?(c=b.state,b.total_in=b.total_out=c.total=0,b.msg="",c.wrap&&(b.adler=1&c.wrap),c.mode=u,c.last=0,c.havedict=0,c.dmax=32768,c.head=null,c.hold=0,c.bits=0,c.lencode=c.lendyn=new r.Buf32(D),c.distcode=c.distdyn=new r.Buf32(F),c.sane=1,c.back=-1,x):y}function h(b){var c;return b&&b.state?(c=b.state,c.wsize=0,c.whave=0,c.wnext=0,g(b)):y}function k(b,c){var d,e;return b&&b.state?(e=b.state,0>c?(d=0,c=-c):(d=(c>>4)+1,48>c&&(c&=15)),c&&(8>c||15<
+c)?y:(null!==e.window&&e.wbits!==c&&(e.window=null),e.wrap=d,e.wbits=c,h(b))):y}function l(b,c){var d,e;return b?(e=new f,b.state=e,e.window=null,d=k(b,c),d!==x&&(b.state=null),d):y}function m(b,c,d,e){var f;b=b.state;return null===b.window&&(b.wsize=1<<b.wbits,b.wnext=0,b.whave=0,b.window=new r.Buf8(b.wsize)),e>=b.wsize?(r.arraySet(b.window,c,d-b.wsize,b.wsize,0),b.wnext=0,b.whave=b.wsize):(f=b.wsize-b.wnext,f>e&&(f=e),r.arraySet(b.window,c,d-e,f,b.wnext),e-=f,e?(r.arraySet(b.window,c,d-e,e,0),b.wnext=
+e,b.whave=b.wsize):(b.wnext+=f,b.wnext===b.wsize&&(b.wnext=0),b.whave<b.wsize&&(b.whave+=f))),0}var n,p,r=b("../utils/common"),q=b("./adler32"),t=b("./crc32"),z=b("./inffast"),w=b("./inftrees"),x=0,y=-2,u=1,D=852,F=592,E=!0;d.inflateReset=h;d.inflateReset2=k;d.inflateResetKeep=g;d.inflateInit=function(b){return l(b,15)};d.inflateInit2=l;d.inflate=function(b,c){var d,f,g,h,k,l,C,A,v,R,I,J,ca,N,K,G,D,F,aa,P,V,W,O=0,Q=new r.Buf8(4),fa=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15];if(!b||!b.state||
+!b.output||!b.input&&0!==b.avail_in)return y;d=b.state;12===d.mode&&(d.mode=13);k=b.next_out;g=b.output;C=b.avail_out;h=b.next_in;f=b.input;l=b.avail_in;A=d.hold;v=d.bits;R=l;I=C;V=x;a:for(;;)switch(d.mode){case u:if(0===d.wrap){d.mode=13;break}for(;16>v;){if(0===l)break a;l--;A+=f[h++]<<v;v+=8}if(2&d.wrap&&35615===A){d.check=0;Q[0]=255&A;Q[1]=A>>>8&255;d.check=t(d.check,Q,2,0);v=A=0;d.mode=2;break}if(d.flags=0,d.head&&(d.head.done=!1),!(1&d.wrap)||(((255&A)<<8)+(A>>8))%31){b.msg="incorrect header check";
 d.mode=30;break}if(8!==(15&A)){b.msg="unknown compression method";d.mode=30;break}if(A>>>=4,v-=4,P=(15&A)+8,0===d.wbits)d.wbits=P;else if(P>d.wbits){b.msg="invalid window size";d.mode=30;break}d.dmax=1<<P;b.adler=d.check=1;d.mode=512&A?10:12;v=A=0;break;case 2:for(;16>v;){if(0===l)break a;l--;A+=f[h++]<<v;v+=8}if(d.flags=A,8!==(255&d.flags)){b.msg="unknown compression method";d.mode=30;break}if(57344&d.flags){b.msg="unknown header flags set";d.mode=30;break}d.head&&(d.head.text=A>>8&1);512&d.flags&&
 (Q[0]=255&A,Q[1]=A>>>8&255,d.check=t(d.check,Q,2,0));v=A=0;d.mode=3;case 3:for(;32>v;){if(0===l)break a;l--;A+=f[h++]<<v;v+=8}d.head&&(d.head.time=A);512&d.flags&&(Q[0]=255&A,Q[1]=A>>>8&255,Q[2]=A>>>16&255,Q[3]=A>>>24&255,d.check=t(d.check,Q,4,0));v=A=0;d.mode=4;case 4:for(;16>v;){if(0===l)break a;l--;A+=f[h++]<<v;v+=8}d.head&&(d.head.xflags=255&A,d.head.os=A>>8);512&d.flags&&(Q[0]=255&A,Q[1]=A>>>8&255,d.check=t(d.check,Q,2,0));v=A=0;d.mode=5;case 5:if(1024&d.flags){for(;16>v;){if(0===l)break a;l--;
-A+=f[h++]<<v;v+=8}d.length=A;d.head&&(d.head.extra_len=A);512&d.flags&&(Q[0]=255&A,Q[1]=A>>>8&255,d.check=t(d.check,Q,2,0));v=A=0}else d.head&&(d.head.extra=null);d.mode=6;case 6:if(1024&d.flags&&(I=d.length,I>l&&(I=l),I&&(d.head&&(P=d.head.extra_len-d.length,d.head.extra||(d.head.extra=Array(d.head.extra_len)),r.arraySet(d.head.extra,f,h,I,P)),512&d.flags&&(d.check=t(d.check,f,I,h)),l-=I,h+=I,d.length-=I),d.length))break a;d.length=0;d.mode=7;case 7:if(2048&d.flags){if(0===l)break a;I=0;do P=f[h+
-I++],d.head&&P&&65536>d.length&&(d.head.name+=String.fromCharCode(P));while(P&&I<l);if(512&d.flags&&(d.check=t(d.check,f,I,h)),l-=I,h+=I,P)break a}else d.head&&(d.head.name=null);d.length=0;d.mode=8;case 8:if(4096&d.flags){if(0===l)break a;I=0;do P=f[h+I++],d.head&&P&&65536>d.length&&(d.head.comment+=String.fromCharCode(P));while(P&&I<l);if(512&d.flags&&(d.check=t(d.check,f,I,h)),l-=I,h+=I,P)break a}else d.head&&(d.head.comment=null);d.mode=9;case 9:if(512&d.flags){for(;16>v;){if(0===l)break a;l--;
+A+=f[h++]<<v;v+=8}d.length=A;d.head&&(d.head.extra_len=A);512&d.flags&&(Q[0]=255&A,Q[1]=A>>>8&255,d.check=t(d.check,Q,2,0));v=A=0}else d.head&&(d.head.extra=null);d.mode=6;case 6:if(1024&d.flags&&(J=d.length,J>l&&(J=l),J&&(d.head&&(P=d.head.extra_len-d.length,d.head.extra||(d.head.extra=Array(d.head.extra_len)),r.arraySet(d.head.extra,f,h,J,P)),512&d.flags&&(d.check=t(d.check,f,J,h)),l-=J,h+=J,d.length-=J),d.length))break a;d.length=0;d.mode=7;case 7:if(2048&d.flags){if(0===l)break a;J=0;do P=f[h+
+J++],d.head&&P&&65536>d.length&&(d.head.name+=String.fromCharCode(P));while(P&&J<l);if(512&d.flags&&(d.check=t(d.check,f,J,h)),l-=J,h+=J,P)break a}else d.head&&(d.head.name=null);d.length=0;d.mode=8;case 8:if(4096&d.flags){if(0===l)break a;J=0;do P=f[h+J++],d.head&&P&&65536>d.length&&(d.head.comment+=String.fromCharCode(P));while(P&&J<l);if(512&d.flags&&(d.check=t(d.check,f,J,h)),l-=J,h+=J,P)break a}else d.head&&(d.head.comment=null);d.mode=9;case 9:if(512&d.flags){for(;16>v;){if(0===l)break a;l--;
 A+=f[h++]<<v;v+=8}if(A!==(65535&d.check)){b.msg="header crc mismatch";d.mode=30;break}v=A=0}d.head&&(d.head.hcrc=d.flags>>9&1,d.head.done=!0);b.adler=d.check=0;d.mode=12;break;case 10:for(;32>v;){if(0===l)break a;l--;A+=f[h++]<<v;v+=8}b.adler=d.check=e(A);v=A=0;d.mode=11;case 11:if(0===d.havedict)return b.next_out=k,b.avail_out=C,b.next_in=h,b.avail_in=l,d.hold=A,d.bits=v,2;b.adler=d.check=1;d.mode=12;case 12:if(5===c||6===c)break a;case 13:if(d.last){A>>>=7&v;v-=7&v;d.mode=27;break}for(;3>v;){if(0===
-l)break a;l--;A+=f[h++]<<v;v+=8}switch(d.last=1&A,A>>>=1,--v,3&A){case 0:d.mode=14;break;case 1:G=d;if(D){n=new r.Buf32(512);p=new r.Buf32(32);for(N=0;144>N;)G.lens[N++]=8;for(;256>N;)G.lens[N++]=9;for(;280>N;)G.lens[N++]=7;for(;288>N;)G.lens[N++]=8;x(1,G.lens,0,288,n,0,G.work,{bits:9});for(N=0;32>N;)G.lens[N++]=5;x(2,G.lens,0,32,p,0,G.work,{bits:5});D=!1}G.lencode=n;G.lenbits=9;G.distcode=p;G.distbits=5;if(d.mode=20,6===c){A>>>=2;v-=2;break a}break;case 2:d.mode=17;break;case 3:b.msg="invalid block type",
-d.mode=30}A>>>=2;v-=2;break;case 14:A>>>=7&v;for(v-=7&v;32>v;){if(0===l)break a;l--;A+=f[h++]<<v;v+=8}if((65535&A)!==(A>>>16^65535)){b.msg="invalid stored block lengths";d.mode=30;break}if(d.length=65535&A,A=0,v=0,d.mode=15,6===c)break a;case 15:d.mode=16;case 16:if(I=d.length){if(I>l&&(I=l),I>C&&(I=C),0===I)break a;r.arraySet(g,f,h,I,k);l-=I;h+=I;C-=I;k+=I;d.length-=I;break}d.mode=12;break;case 17:for(;14>v;){if(0===l)break a;l--;A+=f[h++]<<v;v+=8}if(d.nlen=(31&A)+257,A>>>=5,v-=5,d.ndist=(31&A)+
-1,A>>>=5,v-=5,d.ncode=(15&A)+4,A>>>=4,v-=4,286<d.nlen||30<d.ndist){b.msg="too many length or distance symbols";d.mode=30;break}d.have=0;d.mode=18;case 18:for(;d.have<d.ncode;){for(;3>v;){if(0===l)break a;l--;A+=f[h++]<<v;v+=8}d.lens[fa[d.have++]]=7&A;A>>>=3;v-=3}for(;19>d.have;)d.lens[fa[d.have++]]=0;if(d.lencode=d.lendyn,d.lenbits=7,W={bits:d.lenbits},T=x(0,d.lens,0,19,d.lencode,0,d.work,W),d.lenbits=W.bits,T){b.msg="invalid code lengths set";d.mode=30;break}d.have=0;d.mode=19;case 19:for(;d.have<
-d.nlen+d.ndist;){for(;O=d.lencode[A&(1<<d.lenbits)-1],H=O>>>24,G=65535&O,!(H<=v);){if(0===l)break a;l--;A+=f[h++]<<v;v+=8}if(16>G)A>>>=H,v-=H,d.lens[d.have++]=G;else{if(16===G){for(N=H+2;v<N;){if(0===l)break a;l--;A+=f[h++]<<v;v+=8}if(A>>>=H,v-=H,0===d.have){b.msg="invalid bit length repeat";d.mode=30;break}P=d.lens[d.have-1];I=3+(3&A);A>>>=2;v-=2}else if(17===G){for(N=H+3;v<N;){if(0===l)break a;l--;A+=f[h++]<<v;v+=8}A>>>=H;v-=H;P=0;I=3+(7&A);A>>>=3;v-=3}else{for(N=H+7;v<N;){if(0===l)break a;l--;
-A+=f[h++]<<v;v+=8}A>>>=H;v-=H;P=0;I=11+(127&A);A>>>=7;v-=7}if(d.have+I>d.nlen+d.ndist){b.msg="invalid bit length repeat";d.mode=30;break}for(;I--;)d.lens[d.have++]=P}}if(30===d.mode)break;if(0===d.lens[256]){b.msg="invalid code -- missing end-of-block";d.mode=30;break}if(d.lenbits=9,W={bits:d.lenbits},T=x(1,d.lens,0,d.nlen,d.lencode,0,d.work,W),d.lenbits=W.bits,T){b.msg="invalid literal/lengths set";d.mode=30;break}if(d.distbits=6,d.distcode=d.distdyn,W={bits:d.distbits},T=x(2,d.lens,d.nlen,d.ndist,
-d.distcode,0,d.work,W),d.distbits=W.bits,T){b.msg="invalid distances set";d.mode=30;break}if(d.mode=20,6===c)break a;case 20:d.mode=21;case 21:if(6<=l&&258<=C){b.next_out=k;b.avail_out=C;b.next_in=h;b.avail_in=l;d.hold=A;d.bits=v;y(b,J);k=b.next_out;g=b.output;C=b.avail_out;h=b.next_in;f=b.input;l=b.avail_in;A=d.hold;v=d.bits;12===d.mode&&(d.back=-1);break}for(d.back=0;O=d.lencode[A&(1<<d.lenbits)-1],H=O>>>24,N=O>>>16&255,G=65535&O,!(H<=v);){if(0===l)break a;l--;A+=f[h++]<<v;v+=8}if(N&&0===(240&N)){E=
-H;F=N;for(ca=G;O=d.lencode[ca+((A&(1<<E+F)-1)>>E)],H=O>>>24,N=O>>>16&255,G=65535&O,!(E+H<=v);){if(0===l)break a;l--;A+=f[h++]<<v;v+=8}A>>>=E;v-=E;d.back+=E}if(A>>>=H,v-=H,d.back+=H,d.length=G,0===N){d.mode=26;break}if(32&N){d.back=-1;d.mode=12;break}if(64&N){b.msg="invalid literal/length code";d.mode=30;break}d.extra=15&N;d.mode=22;case 22:if(d.extra){for(N=d.extra;v<N;){if(0===l)break a;l--;A+=f[h++]<<v;v+=8}d.length+=A&(1<<d.extra)-1;A>>>=d.extra;v-=d.extra;d.back+=d.extra}d.was=d.length;d.mode=
-23;case 23:for(;O=d.distcode[A&(1<<d.distbits)-1],H=O>>>24,N=O>>>16&255,G=65535&O,!(H<=v);){if(0===l)break a;l--;A+=f[h++]<<v;v+=8}if(0===(240&N)){E=H;F=N;for(ca=G;O=d.distcode[ca+((A&(1<<E+F)-1)>>E)],H=O>>>24,N=O>>>16&255,G=65535&O,!(E+H<=v);){if(0===l)break a;l--;A+=f[h++]<<v;v+=8}A>>>=E;v-=E;d.back+=E}if(A>>>=H,v-=H,d.back+=H,64&N){b.msg="invalid distance code";d.mode=30;break}d.offset=G;d.extra=15&N;d.mode=24;case 24:if(d.extra){for(N=d.extra;v<N;){if(0===l)break a;l--;A+=f[h++]<<v;v+=8}d.offset+=
-A&(1<<d.extra)-1;A>>>=d.extra;v-=d.extra;d.back+=d.extra}if(d.offset>d.dmax){b.msg="invalid distance too far back";d.mode=30;break}d.mode=25;case 25:if(0===C)break a;if(I=J-C,d.offset>I){if(I=d.offset-I,I>d.whave&&d.sane){b.msg="invalid distance too far back";d.mode=30;break}I>d.wnext?(I-=d.wnext,aa=d.wsize-I):aa=d.wnext-I;I>d.length&&(I=d.length);N=d.window}else N=g,aa=k-d.offset,I=d.length;I>C&&(I=C);C-=I;d.length-=I;do g[k++]=N[aa++];while(--I);0===d.length&&(d.mode=21);break;case 26:if(0===C)break a;
-g[k++]=d.length;C--;d.mode=21;break;case 27:if(d.wrap){for(;32>v;){if(0===l)break a;l--;A|=f[h++]<<v;v+=8}if(J-=C,b.total_out+=J,d.total+=J,J&&(b.adler=d.check=d.flags?t(d.check,g,J,k-J):q(d.check,g,J,k-J)),J=C,(d.flags?A:e(A))!==d.check){b.msg="incorrect data check";d.mode=30;break}v=A=0}d.mode=28;case 28:if(d.wrap&&d.flags){for(;32>v;){if(0===l)break a;l--;A+=f[h++]<<v;v+=8}if(A!==(4294967295&d.total)){b.msg="incorrect length check";d.mode=30;break}v=A=0}d.mode=29;case 29:T=1;break a;case 30:T=
--3;break a;case 31:return-4;default:return z}return b.next_out=k,b.avail_out=C,b.next_in=h,b.avail_in=l,d.hold=A,d.bits=v,(d.wsize||J!==b.avail_out&&30>d.mode&&(27>d.mode||4!==c))&&m(b,b.output,b.next_out,J-b.avail_out)?(d.mode=31,-4):(R-=b.avail_in,J-=b.avail_out,b.total_in+=R,b.total_out+=J,d.total+=J,d.wrap&&J&&(b.adler=d.check=d.flags?t(d.check,g,J,b.next_out-J):q(d.check,g,J,b.next_out-J)),b.data_type=d.bits+(d.last?64:0)+(12===d.mode?128:0)+(20===d.mode||15===d.mode?256:0),(0===R&&0===J||4===
-c)&&T===w&&(T=-5),T)};d.inflateEnd=function(b){if(!b||!b.state)return z;var c=b.state;return c.window&&(c.window=null),b.state=null,w};d.inflateGetHeader=function(b,c){var d;return b&&b.state?(d=b.state,0===(2&d.wrap)?z:(d.head=c,c.done=!1,w)):z};d.inflateSetDictionary=function(b,c){var d,e,f=c.length;return b&&b.state?(d=b.state,0!==d.wrap&&11!==d.mode?z:11===d.mode&&(e=1,e=q(e,c,f,0),e!==d.check)?-3:m(b,c,f,f)?(d.mode=31,-4):(d.havedict=1,w)):z};d.inflateInfo="pako inflate (from Nodeca project)"},
+l)break a;l--;A+=f[h++]<<v;v+=8}switch(d.last=1&A,A>>>=1,--v,3&A){case 0:d.mode=14;break;case 1:G=d;if(E){n=new r.Buf32(512);p=new r.Buf32(32);for(N=0;144>N;)G.lens[N++]=8;for(;256>N;)G.lens[N++]=9;for(;280>N;)G.lens[N++]=7;for(;288>N;)G.lens[N++]=8;w(1,G.lens,0,288,n,0,G.work,{bits:9});for(N=0;32>N;)G.lens[N++]=5;w(2,G.lens,0,32,p,0,G.work,{bits:5});E=!1}G.lencode=n;G.lenbits=9;G.distcode=p;G.distbits=5;if(d.mode=20,6===c){A>>>=2;v-=2;break a}break;case 2:d.mode=17;break;case 3:b.msg="invalid block type",
+d.mode=30}A>>>=2;v-=2;break;case 14:A>>>=7&v;for(v-=7&v;32>v;){if(0===l)break a;l--;A+=f[h++]<<v;v+=8}if((65535&A)!==(A>>>16^65535)){b.msg="invalid stored block lengths";d.mode=30;break}if(d.length=65535&A,A=0,v=0,d.mode=15,6===c)break a;case 15:d.mode=16;case 16:if(J=d.length){if(J>l&&(J=l),J>C&&(J=C),0===J)break a;r.arraySet(g,f,h,J,k);l-=J;h+=J;C-=J;k+=J;d.length-=J;break}d.mode=12;break;case 17:for(;14>v;){if(0===l)break a;l--;A+=f[h++]<<v;v+=8}if(d.nlen=(31&A)+257,A>>>=5,v-=5,d.ndist=(31&A)+
+1,A>>>=5,v-=5,d.ncode=(15&A)+4,A>>>=4,v-=4,286<d.nlen||30<d.ndist){b.msg="too many length or distance symbols";d.mode=30;break}d.have=0;d.mode=18;case 18:for(;d.have<d.ncode;){for(;3>v;){if(0===l)break a;l--;A+=f[h++]<<v;v+=8}d.lens[fa[d.have++]]=7&A;A>>>=3;v-=3}for(;19>d.have;)d.lens[fa[d.have++]]=0;if(d.lencode=d.lendyn,d.lenbits=7,W={bits:d.lenbits},V=w(0,d.lens,0,19,d.lencode,0,d.work,W),d.lenbits=W.bits,V){b.msg="invalid code lengths set";d.mode=30;break}d.have=0;d.mode=19;case 19:for(;d.have<
+d.nlen+d.ndist;){for(;O=d.lencode[A&(1<<d.lenbits)-1],K=O>>>24,G=65535&O,!(K<=v);){if(0===l)break a;l--;A+=f[h++]<<v;v+=8}if(16>G)A>>>=K,v-=K,d.lens[d.have++]=G;else{if(16===G){for(N=K+2;v<N;){if(0===l)break a;l--;A+=f[h++]<<v;v+=8}if(A>>>=K,v-=K,0===d.have){b.msg="invalid bit length repeat";d.mode=30;break}P=d.lens[d.have-1];J=3+(3&A);A>>>=2;v-=2}else if(17===G){for(N=K+3;v<N;){if(0===l)break a;l--;A+=f[h++]<<v;v+=8}A>>>=K;v-=K;P=0;J=3+(7&A);A>>>=3;v-=3}else{for(N=K+7;v<N;){if(0===l)break a;l--;
+A+=f[h++]<<v;v+=8}A>>>=K;v-=K;P=0;J=11+(127&A);A>>>=7;v-=7}if(d.have+J>d.nlen+d.ndist){b.msg="invalid bit length repeat";d.mode=30;break}for(;J--;)d.lens[d.have++]=P}}if(30===d.mode)break;if(0===d.lens[256]){b.msg="invalid code -- missing end-of-block";d.mode=30;break}if(d.lenbits=9,W={bits:d.lenbits},V=w(1,d.lens,0,d.nlen,d.lencode,0,d.work,W),d.lenbits=W.bits,V){b.msg="invalid literal/lengths set";d.mode=30;break}if(d.distbits=6,d.distcode=d.distdyn,W={bits:d.distbits},V=w(2,d.lens,d.nlen,d.ndist,
+d.distcode,0,d.work,W),d.distbits=W.bits,V){b.msg="invalid distances set";d.mode=30;break}if(d.mode=20,6===c)break a;case 20:d.mode=21;case 21:if(6<=l&&258<=C){b.next_out=k;b.avail_out=C;b.next_in=h;b.avail_in=l;d.hold=A;d.bits=v;z(b,I);k=b.next_out;g=b.output;C=b.avail_out;h=b.next_in;f=b.input;l=b.avail_in;A=d.hold;v=d.bits;12===d.mode&&(d.back=-1);break}for(d.back=0;O=d.lencode[A&(1<<d.lenbits)-1],K=O>>>24,N=O>>>16&255,G=65535&O,!(K<=v);){if(0===l)break a;l--;A+=f[h++]<<v;v+=8}if(N&&0===(240&N)){D=
+K;F=N;for(aa=G;O=d.lencode[aa+((A&(1<<D+F)-1)>>D)],K=O>>>24,N=O>>>16&255,G=65535&O,!(D+K<=v);){if(0===l)break a;l--;A+=f[h++]<<v;v+=8}A>>>=D;v-=D;d.back+=D}if(A>>>=K,v-=K,d.back+=K,d.length=G,0===N){d.mode=26;break}if(32&N){d.back=-1;d.mode=12;break}if(64&N){b.msg="invalid literal/length code";d.mode=30;break}d.extra=15&N;d.mode=22;case 22:if(d.extra){for(N=d.extra;v<N;){if(0===l)break a;l--;A+=f[h++]<<v;v+=8}d.length+=A&(1<<d.extra)-1;A>>>=d.extra;v-=d.extra;d.back+=d.extra}d.was=d.length;d.mode=
+23;case 23:for(;O=d.distcode[A&(1<<d.distbits)-1],K=O>>>24,N=O>>>16&255,G=65535&O,!(K<=v);){if(0===l)break a;l--;A+=f[h++]<<v;v+=8}if(0===(240&N)){D=K;F=N;for(aa=G;O=d.distcode[aa+((A&(1<<D+F)-1)>>D)],K=O>>>24,N=O>>>16&255,G=65535&O,!(D+K<=v);){if(0===l)break a;l--;A+=f[h++]<<v;v+=8}A>>>=D;v-=D;d.back+=D}if(A>>>=K,v-=K,d.back+=K,64&N){b.msg="invalid distance code";d.mode=30;break}d.offset=G;d.extra=15&N;d.mode=24;case 24:if(d.extra){for(N=d.extra;v<N;){if(0===l)break a;l--;A+=f[h++]<<v;v+=8}d.offset+=
+A&(1<<d.extra)-1;A>>>=d.extra;v-=d.extra;d.back+=d.extra}if(d.offset>d.dmax){b.msg="invalid distance too far back";d.mode=30;break}d.mode=25;case 25:if(0===C)break a;if(J=I-C,d.offset>J){if(J=d.offset-J,J>d.whave&&d.sane){b.msg="invalid distance too far back";d.mode=30;break}J>d.wnext?(J-=d.wnext,ca=d.wsize-J):ca=d.wnext-J;J>d.length&&(J=d.length);N=d.window}else N=g,ca=k-d.offset,J=d.length;J>C&&(J=C);C-=J;d.length-=J;do g[k++]=N[ca++];while(--J);0===d.length&&(d.mode=21);break;case 26:if(0===C)break a;
+g[k++]=d.length;C--;d.mode=21;break;case 27:if(d.wrap){for(;32>v;){if(0===l)break a;l--;A|=f[h++]<<v;v+=8}if(I-=C,b.total_out+=I,d.total+=I,I&&(b.adler=d.check=d.flags?t(d.check,g,I,k-I):q(d.check,g,I,k-I)),I=C,(d.flags?A:e(A))!==d.check){b.msg="incorrect data check";d.mode=30;break}v=A=0}d.mode=28;case 28:if(d.wrap&&d.flags){for(;32>v;){if(0===l)break a;l--;A+=f[h++]<<v;v+=8}if(A!==(4294967295&d.total)){b.msg="incorrect length check";d.mode=30;break}v=A=0}d.mode=29;case 29:V=1;break a;case 30:V=
+-3;break a;case 31:return-4;default:return y}return b.next_out=k,b.avail_out=C,b.next_in=h,b.avail_in=l,d.hold=A,d.bits=v,(d.wsize||I!==b.avail_out&&30>d.mode&&(27>d.mode||4!==c))&&m(b,b.output,b.next_out,I-b.avail_out)?(d.mode=31,-4):(R-=b.avail_in,I-=b.avail_out,b.total_in+=R,b.total_out+=I,d.total+=I,d.wrap&&I&&(b.adler=d.check=d.flags?t(d.check,g,I,b.next_out-I):q(d.check,g,I,b.next_out-I)),b.data_type=d.bits+(d.last?64:0)+(12===d.mode?128:0)+(20===d.mode||15===d.mode?256:0),(0===R&&0===I||4===
+c)&&V===x&&(V=-5),V)};d.inflateEnd=function(b){if(!b||!b.state)return y;var c=b.state;return c.window&&(c.window=null),b.state=null,x};d.inflateGetHeader=function(b,c){var d;return b&&b.state?(d=b.state,0===(2&d.wrap)?y:(d.head=c,c.done=!1,x)):y};d.inflateSetDictionary=function(b,c){var d,e,f=c.length;return b&&b.state?(d=b.state,0!==d.wrap&&11!==d.mode?y:11===d.mode&&(e=1,e=q(e,c,f,0),e!==d.check)?-3:m(b,c,f,f)?(d.mode=31,-4):(d.havedict=1,x)):y};d.inflateInfo="pako inflate (from Nodeca project)"},
 {"../utils/common":3,"./adler32":5,"./crc32":7,"./inffast":10,"./inftrees":12}],12:[function(b,c,d){var e=b("../utils/common"),f=[3,4,5,6,7,8,9,10,11,13,15,17,19,23,27,31,35,43,51,59,67,83,99,115,131,163,195,227,258,0,0],g=[16,16,16,16,16,16,16,16,17,17,17,17,18,18,18,18,19,19,19,19,20,20,20,20,21,21,21,21,16,72,78],h=[1,2,3,4,5,7,9,13,17,25,33,49,65,97,129,193,257,385,513,769,1025,1537,2049,3073,4097,6145,8193,12289,16385,24577,0,0],k=[16,16,16,16,17,17,18,18,19,19,20,20,21,21,22,22,23,23,24,24,
-25,25,26,26,27,27,28,28,29,29,64,64];c.exports=function(b,c,d,p,r,q,t,y){var l,m,n,u,F,E,D,C,G=y.bits,B,M,K,L,V,S,Z=0,A,v=null,R=0,J=new e.Buf16(16);u=new e.Buf16(16);var I=null,aa=0;for(B=0;15>=B;B++)J[B]=0;for(M=0;M<p;M++)J[c[d+M]]++;L=G;for(K=15;1<=K&&0===J[K];K--);if(L>K&&(L=K),0===K)return r[q++]=20971520,r[q++]=20971520,y.bits=1,0;for(G=1;G<K&&0===J[G];G++);L<G&&(L=G);for(B=l=1;15>=B;B++)if(l<<=1,l-=J[B],0>l)return-1;if(0<l&&(0===b||1!==K))return-1;u[1]=0;for(B=1;15>B;B++)u[B+1]=u[B]+J[B];for(M=
-0;M<p;M++)0!==c[d+M]&&(t[u[c[d+M]]++]=M);if(0===b?(v=I=t,F=19):1===b?(v=f,R-=257,I=g,aa-=257,F=256):(v=h,I=k,F=-1),A=0,M=0,B=G,u=q,V=L,S=0,n=-1,Z=1<<L,p=Z-1,1===b&&852<Z||2===b&&592<Z)return 1;for(var N=0;;){N++;E=B-S;t[M]<F?(D=0,C=t[M]):t[M]>F?(D=I[aa+t[M]],C=v[R+t[M]]):(D=96,C=0);l=1<<B-S;G=m=1<<V;do m-=l,r[u+(A>>S)+m]=E<<24|D<<16|C|0;while(0!==m);for(l=1<<B-1;A&l;)l>>=1;if(0!==l?(A&=l-1,A+=l):A=0,M++,0===--J[B]){if(B===K)break;B=c[d+t[M]]}if(B>L&&(A&p)!==n){0===S&&(S=L);u+=G;V=B-S;for(l=1<<V;V+
-S<K&&(l-=J[V+S],!(0>=l));)V++,l<<=1;if(Z+=1<<V,1===b&&852<Z||2===b&&592<Z)return 1;n=A&p;r[n]=L<<24|V<<16|u-q|0}}return 0!==A&&(r[u+A]=B-S<<24|4194304),y.bits=L,0}},{"../utils/common":3}],13:[function(b,c,d){c.exports={2:"need dictionary",1:"stream end",0:"","-1":"file error","-2":"stream error","-3":"data error","-4":"insufficient memory","-5":"buffer error","-6":"incompatible version"}},{}],14:[function(b,c,d){function e(b){for(var c=b.length;0<=--c;)b[c]=0}function f(b,c,d,e,f){this.static_tree=
-b;this.extra_bits=c;this.extra_base=d;this.elems=e;this.max_length=f;this.has_stree=b&&b.length}function g(b,c){this.dyn_tree=b;this.max_code=0;this.stat_desc=c}function h(b,c){b.pending_buf[b.pending++]=255&c;b.pending_buf[b.pending++]=c>>>8&255}function k(b,c,d){b.bi_valid>Z-d?(b.bi_buf|=c<<b.bi_valid&65535,h(b,b.bi_buf),b.bi_buf=c>>Z-b.bi_valid,b.bi_valid+=d-Z):(b.bi_buf|=c<<b.bi_valid&65535,b.bi_valid+=d)}function l(b,c,d){k(b,d[2*c],d[2*c+1])}function m(b,c){var d=0;do d|=1&b,b>>>=1,d<<=1;while(0<
---c);return d>>>1}function n(b,c,d){var e,f=Array(S+1),g=0;for(e=1;e<=S;e++)f[e]=g=g+d[e-1]<<1;for(d=0;d<=c;d++)e=b[2*d+1],0!==e&&(b[2*d]=m(f[e]++,e))}function p(b){var c;for(c=0;c<M;c++)b.dyn_ltree[2*c]=0;for(c=0;c<K;c++)b.dyn_dtree[2*c]=0;for(c=0;c<L;c++)b.bl_tree[2*c]=0;b.dyn_ltree[2*A]=1;b.opt_len=b.static_len=0;b.last_lit=b.matches=0}function r(b){8<b.bi_valid?h(b,b.bi_buf):0<b.bi_valid&&(b.pending_buf[b.pending++]=b.bi_buf);b.bi_buf=0;b.bi_valid=0}function q(b,c,d,e){var f=2*c,g=2*d;return b[f]<
-b[g]||b[f]===b[g]&&e[c]<=e[d]}function t(b,c,d){for(var e=b.heap[d],f=d<<1;f<=b.heap_len&&(f<b.heap_len&&q(c,b.heap[f+1],b.heap[f],b.depth)&&f++,!q(c,e,b.heap[f],b.depth));)b.heap[d]=b.heap[f],d=f,f<<=1;b.heap[d]=e}function y(b,c,d){var e,f,g,h,m=0;if(0!==b.last_lit){do e=b.pending_buf[b.d_buf+2*m]<<8|b.pending_buf[b.d_buf+2*m+1],f=b.pending_buf[b.l_buf+m],m++,0===e?l(b,f,c):(g=ca[f],l(b,g+B+1,c),h=I[g],0!==h&&(f-=P[g],k(b,f,h)),e--,g=256>e?ea[e]:ea[256+(e>>>7)],l(b,g,d),h=aa[g],0!==h&&(e-=T[g],k(b,
-e,h)));while(m<b.last_lit)}l(b,A,c)}function x(b,c){var d,e,f,g=c.dyn_tree;e=c.stat_desc.static_tree;var h=c.stat_desc.has_stree,k=c.stat_desc.elems,l=-1;b.heap_len=0;b.heap_max=V;for(d=0;d<k;d++)0!==g[2*d]?(b.heap[++b.heap_len]=l=d,b.depth[d]=0):g[2*d+1]=0;for(;2>b.heap_len;)f=b.heap[++b.heap_len]=2>l?++l:0,g[2*f]=1,b.depth[f]=0,b.opt_len--,h&&(b.static_len-=e[2*f+1]);c.max_code=l;for(d=b.heap_len>>1;1<=d;d--)t(b,g,d);f=k;do d=b.heap[1],b.heap[1]=b.heap[b.heap_len--],t(b,g,1),e=b.heap[1],b.heap[--b.heap_max]=
-d,b.heap[--b.heap_max]=e,g[2*f]=g[2*d]+g[2*e],b.depth[f]=(b.depth[d]>=b.depth[e]?b.depth[d]:b.depth[e])+1,g[2*d+1]=g[2*e+1]=f,b.heap[1]=f++,t(b,g,1);while(2<=b.heap_len);b.heap[--b.heap_max]=b.heap[1];var m,v,h=c.dyn_tree,k=c.max_code,p=c.stat_desc.static_tree,q=c.stat_desc.has_stree,r=c.stat_desc.extra_bits,R=c.stat_desc.extra_base,J=c.stat_desc.max_length,u=0;for(e=0;e<=S;e++)b.bl_count[e]=0;h[2*b.heap[b.heap_max]+1]=0;for(d=b.heap_max+1;d<V;d++)f=b.heap[d],e=h[2*h[2*f+1]+1]+1,e>J&&(e=J,u++),h[2*
-f+1]=e,f>k||(b.bl_count[e]++,m=0,f>=R&&(m=r[f-R]),v=h[2*f],b.opt_len+=v*(e+m),q&&(b.static_len+=v*(p[2*f+1]+m)));if(0!==u){do{for(e=J-1;0===b.bl_count[e];)e--;b.bl_count[e]--;b.bl_count[e+1]+=2;b.bl_count[J]--;u-=2}while(0<u);for(e=J;0!==e;e--)for(f=b.bl_count[e];0!==f;)m=b.heap[--d],m>k||(h[2*m+1]!==e&&(b.opt_len+=(e-h[2*m+1])*h[2*m],h[2*m+1]=e),f--)}n(g,l,b.bl_count)}function w(b,c,d){var e,f,g=-1,h=c[1],k=0,l=7,m=4;0===h&&(l=138,m=3);c[2*(d+1)+1]=65535;for(e=0;e<=d;e++)f=h,h=c[2*(e+1)+1],++k<l&&
-f===h||(k<m?b.bl_tree[2*f]+=k:0!==f?(f!==g&&b.bl_tree[2*f]++,b.bl_tree[2*v]++):10>=k?b.bl_tree[2*R]++:b.bl_tree[2*J]++,k=0,g=f,0===h?(l=138,m=3):f===h?(l=6,m=3):(l=7,m=4))}function z(b,c,d){var e,f,g=-1,h=c[1],m=0,n=7,p=4;0===h&&(n=138,p=3);for(e=0;e<=d;e++)if(f=h,h=c[2*(e+1)+1],!(++m<n&&f===h)){if(m<p){do l(b,f,b.bl_tree);while(0!==--m)}else 0!==f?(f!==g&&(l(b,f,b.bl_tree),m--),l(b,v,b.bl_tree),k(b,m-3,2)):10>=m?(l(b,R,b.bl_tree),k(b,m-3,3)):(l(b,J,b.bl_tree),k(b,m-11,7));m=0;g=f;0===h?(n=138,p=
-3):f===h?(n=6,p=3):(n=7,p=4)}}function u(b){var c,d=4093624447;for(c=0;31>=c;c++,d>>>=1)if(1&d&&0!==b.dyn_ltree[2*c])return D;if(0!==b.dyn_ltree[18]||0!==b.dyn_ltree[20]||0!==b.dyn_ltree[26])return C;for(c=32;c<B;c++)if(0!==b.dyn_ltree[2*c])return C;return D}function F(b,c,d,e){k(b,(G<<1)+(e?1:0),3);r(b);h(b,d);h(b,~d);E.arraySet(b.pending_buf,b.window,c,d,b.pending);b.pending+=d}var E=b("../utils/common"),D=0,C=1,G=0,B=256,M=B+1+29,K=30,L=19,V=2*M+1,S=15,Z=16,A=256,v=16,R=17,J=18,I=[0,0,0,0,0,0,
-0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0],aa=[0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13],N=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,7],H=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15],U=Array(2*(M+2));e(U);var ba=Array(2*K);e(ba);var ea=Array(512);e(ea);var ca=Array(256);e(ca);var P=Array(29);e(P);var T=Array(K);e(T);var W,O,Q,fa=!1;d._tr_init=function(b){if(!fa){var c,d,e,h=Array(S+1);for(e=d=0;28>e;e++)for(P[e]=d,c=0;c<1<<I[e];c++)ca[d++]=e;ca[d-1]=e;for(e=d=0;16>e;e++)for(T[e]=
-d,c=0;c<1<<aa[e];c++)ea[d++]=e;for(d>>=7;e<K;e++)for(T[e]=d<<7,c=0;c<1<<aa[e]-7;c++)ea[256+d++]=e;for(c=0;c<=S;c++)h[c]=0;for(c=0;143>=c;)U[2*c+1]=8,c++,h[8]++;for(;255>=c;)U[2*c+1]=9,c++,h[9]++;for(;279>=c;)U[2*c+1]=7,c++,h[7]++;for(;287>=c;)U[2*c+1]=8,c++,h[8]++;n(U,M+1,h);for(c=0;c<K;c++)ba[2*c+1]=5,ba[2*c]=m(c,5);W=new f(U,I,B+1,M,S);O=new f(ba,aa,0,K,S);Q=new f([],N,0,L,7);fa=!0}b.l_desc=new g(b.dyn_ltree,W);b.d_desc=new g(b.dyn_dtree,O);b.bl_desc=new g(b.bl_tree,Q);b.bi_buf=0;b.bi_valid=0;p(b)};
-d._tr_stored_block=F;d._tr_flush_block=function(b,c,d,e){var f,g,h=0;if(0<b.level){2===b.strm.data_type&&(b.strm.data_type=u(b));x(b,b.l_desc);x(b,b.d_desc);w(b,b.dyn_ltree,b.l_desc.max_code);w(b,b.dyn_dtree,b.d_desc.max_code);x(b,b.bl_desc);for(h=L-1;3<=h&&0===b.bl_tree[2*H[h]+1];h--);h=(b.opt_len+=3*(h+1)+14,h);f=b.opt_len+3+7>>>3;g=b.static_len+3+7>>>3;g<=f&&(f=g)}else f=g=d+5;if(d+4<=f&&-1!==c)F(b,c,d,e);else if(4===b.strategy||g===f)k(b,2+(e?1:0),3),y(b,U,ba);else{k(b,4+(e?1:0),3);c=b.l_desc.max_code+
-1;d=b.d_desc.max_code+1;h+=1;k(b,c-257,5);k(b,d-1,5);k(b,h-4,4);for(f=0;f<h;f++)k(b,b.bl_tree[2*H[f]+1],3);z(b,b.dyn_ltree,c-1);z(b,b.dyn_dtree,d-1);y(b,b.dyn_ltree,b.dyn_dtree)}p(b);e&&r(b)};d._tr_tally=function(b,c,d){return b.pending_buf[b.d_buf+2*b.last_lit]=c>>>8&255,b.pending_buf[b.d_buf+2*b.last_lit+1]=255&c,b.pending_buf[b.l_buf+b.last_lit]=255&d,b.last_lit++,0===c?b.dyn_ltree[2*d]++:(b.matches++,c--,b.dyn_ltree[2*(ca[d]+B+1)]++,b.dyn_dtree[2*(256>c?ea[c]:ea[256+(c>>>7)])]++),b.last_lit===
-b.lit_bufsize-1};d._tr_align=function(b){k(b,2,3);l(b,A,U);16===b.bi_valid?(h(b,b.bi_buf),b.bi_buf=0,b.bi_valid=0):8<=b.bi_valid&&(b.pending_buf[b.pending++]=255&b.bi_buf,b.bi_buf>>=8,b.bi_valid-=8)}},{"../utils/common":3}],15:[function(b,c,d){c.exports=function(){this.input=null;this.total_in=this.avail_in=this.next_in=0;this.output=null;this.total_out=this.avail_out=this.next_out=0;this.msg="";this.state=null;this.data_type=2;this.adler=0}},{}],"/":[function(b,c,d){d=b("./lib/utils/common").assign;
-var e=b("./lib/deflate"),f=b("./lib/inflate");b=b("./lib/zlib/constants");var g={};d(g,e,f,b);c.exports=g},{"./lib/deflate":1,"./lib/inflate":2,"./lib/utils/common":3,"./lib/zlib/constants":6}]},{},[])("/")});var JSON;JSON||(JSON={});
-(function(){function a(a){return 10>a?"0"+a:a}function b(a){e.lastIndex=0;return e.test(a)?'"'+a.replace(e,function(a){var b=h[a];return"string"===typeof b?b:"\\u"+("0000"+a.charCodeAt(0).toString(16)).slice(-4)})+'"':'"'+a+'"'}function c(a,d){var e,h,l,m,t=f,y,x=d[a];x&&"object"===typeof x&&"function"===typeof x.toJSON&&(x=x.toJSON(a));"function"===typeof k&&(x=k.call(d,a,x));switch(typeof x){case "string":return b(x);case "number":return isFinite(x)?""+x:"null";case "boolean":case "null":return""+x;
-case "object":if(!x)return"null";f+=g;y=[];if("[object Array]"===Object.prototype.toString.apply(x)){m=x.length;for(e=0;e<m;e+=1)y[e]=c(e,x)||"null";l=0===y.length?"[]":f?"[\n"+f+y.join(",\n"+f)+"\n"+t+"]":"["+y.join(",")+"]";f=t;return l}if(k&&"object"===typeof k)for(m=k.length,e=0;e<m;e+=1)"string"===typeof k[e]&&(h=k[e],(l=c(h,x))&&y.push(b(h)+(f?": ":":")+l));else for(h in x)Object.prototype.hasOwnProperty.call(x,h)&&(l=c(h,x))&&y.push(b(h)+(f?": ":":")+l);l=0===y.length?"{}":f?"{\n"+f+y.join(",\n"+
-f)+"\n"+t+"}":"{"+y.join(",")+"}";f=t;return l}}"function"!==typeof Date.prototype.toJSON&&(Date.prototype.toJSON=function(){return isFinite(this.valueOf())?this.getUTCFullYear()+"-"+a(this.getUTCMonth()+1)+"-"+a(this.getUTCDate())+"T"+a(this.getUTCHours())+":"+a(this.getUTCMinutes())+":"+a(this.getUTCSeconds())+"Z":null},String.prototype.toJSON=Number.prototype.toJSON=Boolean.prototype.toJSON=function(){return this.valueOf()});var d=/[\u0000\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g,
+25,25,26,26,27,27,28,28,29,29,64,64];c.exports=function(b,c,d,p,r,q,t,z){var l,m,n,u,D,F,E,C,G=z.bits,B,M,L,H,U,S,ba=0,A,v=null,R=0,I=new e.Buf16(16);u=new e.Buf16(16);var J=null,ca=0;for(B=0;15>=B;B++)I[B]=0;for(M=0;M<p;M++)I[c[d+M]]++;H=G;for(L=15;1<=L&&0===I[L];L--);if(H>L&&(H=L),0===L)return r[q++]=20971520,r[q++]=20971520,z.bits=1,0;for(G=1;G<L&&0===I[G];G++);H<G&&(H=G);for(B=l=1;15>=B;B++)if(l<<=1,l-=I[B],0>l)return-1;if(0<l&&(0===b||1!==L))return-1;u[1]=0;for(B=1;15>B;B++)u[B+1]=u[B]+I[B];
+for(M=0;M<p;M++)0!==c[d+M]&&(t[u[c[d+M]]++]=M);if(0===b?(v=J=t,D=19):1===b?(v=f,R-=257,J=g,ca-=257,D=256):(v=h,J=k,D=-1),A=0,M=0,B=G,u=q,U=H,S=0,n=-1,ba=1<<H,p=ba-1,1===b&&852<ba||2===b&&592<ba)return 1;for(var N=0;;){N++;F=B-S;t[M]<D?(E=0,C=t[M]):t[M]>D?(E=J[ca+t[M]],C=v[R+t[M]]):(E=96,C=0);l=1<<B-S;G=m=1<<U;do m-=l,r[u+(A>>S)+m]=F<<24|E<<16|C|0;while(0!==m);for(l=1<<B-1;A&l;)l>>=1;if(0!==l?(A&=l-1,A+=l):A=0,M++,0===--I[B]){if(B===L)break;B=c[d+t[M]]}if(B>H&&(A&p)!==n){0===S&&(S=H);u+=G;U=B-S;for(l=
+1<<U;U+S<L&&(l-=I[U+S],!(0>=l));)U++,l<<=1;if(ba+=1<<U,1===b&&852<ba||2===b&&592<ba)return 1;n=A&p;r[n]=H<<24|U<<16|u-q|0}}return 0!==A&&(r[u+A]=B-S<<24|4194304),z.bits=H,0}},{"../utils/common":3}],13:[function(b,c,d){c.exports={2:"need dictionary",1:"stream end",0:"","-1":"file error","-2":"stream error","-3":"data error","-4":"insufficient memory","-5":"buffer error","-6":"incompatible version"}},{}],14:[function(b,c,d){function e(b){for(var c=b.length;0<=--c;)b[c]=0}function f(b,c,d,e,f){this.static_tree=
+b;this.extra_bits=c;this.extra_base=d;this.elems=e;this.max_length=f;this.has_stree=b&&b.length}function g(b,c){this.dyn_tree=b;this.max_code=0;this.stat_desc=c}function h(b,c){b.pending_buf[b.pending++]=255&c;b.pending_buf[b.pending++]=c>>>8&255}function k(b,c,d){b.bi_valid>ba-d?(b.bi_buf|=c<<b.bi_valid&65535,h(b,b.bi_buf),b.bi_buf=c>>ba-b.bi_valid,b.bi_valid+=d-ba):(b.bi_buf|=c<<b.bi_valid&65535,b.bi_valid+=d)}function l(b,c,d){k(b,d[2*c],d[2*c+1])}function m(b,c){var d=0;do d|=1&b,b>>>=1,d<<=1;
+while(0<--c);return d>>>1}function n(b,c,d){var e,f=Array(S+1),g=0;for(e=1;e<=S;e++)f[e]=g=g+d[e-1]<<1;for(d=0;d<=c;d++)e=b[2*d+1],0!==e&&(b[2*d]=m(f[e]++,e))}function p(b){var c;for(c=0;c<M;c++)b.dyn_ltree[2*c]=0;for(c=0;c<L;c++)b.dyn_dtree[2*c]=0;for(c=0;c<H;c++)b.bl_tree[2*c]=0;b.dyn_ltree[2*A]=1;b.opt_len=b.static_len=0;b.last_lit=b.matches=0}function r(b){8<b.bi_valid?h(b,b.bi_buf):0<b.bi_valid&&(b.pending_buf[b.pending++]=b.bi_buf);b.bi_buf=0;b.bi_valid=0}function q(b,c,d,e){var f=2*c,g=2*d;
+return b[f]<b[g]||b[f]===b[g]&&e[c]<=e[d]}function t(b,c,d){for(var e=b.heap[d],f=d<<1;f<=b.heap_len&&(f<b.heap_len&&q(c,b.heap[f+1],b.heap[f],b.depth)&&f++,!q(c,e,b.heap[f],b.depth));)b.heap[d]=b.heap[f],d=f,f<<=1;b.heap[d]=e}function z(b,c,d){var e,f,g,h,m=0;if(0!==b.last_lit){do e=b.pending_buf[b.d_buf+2*m]<<8|b.pending_buf[b.d_buf+2*m+1],f=b.pending_buf[b.l_buf+m],m++,0===e?l(b,f,c):(g=aa[f],l(b,g+B+1,c),h=J[g],0!==h&&(f-=P[g],k(b,f,h)),e--,g=256>e?ea[e]:ea[256+(e>>>7)],l(b,g,d),h=ca[g],0!==h&&
+(e-=V[g],k(b,e,h)));while(m<b.last_lit)}l(b,A,c)}function w(b,c){var d,e,f,g=c.dyn_tree;e=c.stat_desc.static_tree;var h=c.stat_desc.has_stree,k=c.stat_desc.elems,l=-1;b.heap_len=0;b.heap_max=U;for(d=0;d<k;d++)0!==g[2*d]?(b.heap[++b.heap_len]=l=d,b.depth[d]=0):g[2*d+1]=0;for(;2>b.heap_len;)f=b.heap[++b.heap_len]=2>l?++l:0,g[2*f]=1,b.depth[f]=0,b.opt_len--,h&&(b.static_len-=e[2*f+1]);c.max_code=l;for(d=b.heap_len>>1;1<=d;d--)t(b,g,d);f=k;do d=b.heap[1],b.heap[1]=b.heap[b.heap_len--],t(b,g,1),e=b.heap[1],
+b.heap[--b.heap_max]=d,b.heap[--b.heap_max]=e,g[2*f]=g[2*d]+g[2*e],b.depth[f]=(b.depth[d]>=b.depth[e]?b.depth[d]:b.depth[e])+1,g[2*d+1]=g[2*e+1]=f,b.heap[1]=f++,t(b,g,1);while(2<=b.heap_len);b.heap[--b.heap_max]=b.heap[1];var m,v,h=c.dyn_tree,k=c.max_code,p=c.stat_desc.static_tree,q=c.stat_desc.has_stree,r=c.stat_desc.extra_bits,R=c.stat_desc.extra_base,I=c.stat_desc.max_length,u=0;for(e=0;e<=S;e++)b.bl_count[e]=0;h[2*b.heap[b.heap_max]+1]=0;for(d=b.heap_max+1;d<U;d++)f=b.heap[d],e=h[2*h[2*f+1]+1]+
+1,e>I&&(e=I,u++),h[2*f+1]=e,f>k||(b.bl_count[e]++,m=0,f>=R&&(m=r[f-R]),v=h[2*f],b.opt_len+=v*(e+m),q&&(b.static_len+=v*(p[2*f+1]+m)));if(0!==u){do{for(e=I-1;0===b.bl_count[e];)e--;b.bl_count[e]--;b.bl_count[e+1]+=2;b.bl_count[I]--;u-=2}while(0<u);for(e=I;0!==e;e--)for(f=b.bl_count[e];0!==f;)m=b.heap[--d],m>k||(h[2*m+1]!==e&&(b.opt_len+=(e-h[2*m+1])*h[2*m],h[2*m+1]=e),f--)}n(g,l,b.bl_count)}function x(b,c,d){var e,f,g=-1,h=c[1],k=0,l=7,m=4;0===h&&(l=138,m=3);c[2*(d+1)+1]=65535;for(e=0;e<=d;e++)f=h,
+h=c[2*(e+1)+1],++k<l&&f===h||(k<m?b.bl_tree[2*f]+=k:0!==f?(f!==g&&b.bl_tree[2*f]++,b.bl_tree[2*v]++):10>=k?b.bl_tree[2*R]++:b.bl_tree[2*I]++,k=0,g=f,0===h?(l=138,m=3):f===h?(l=6,m=3):(l=7,m=4))}function y(b,c,d){var e,f,g=-1,h=c[1],m=0,n=7,p=4;0===h&&(n=138,p=3);for(e=0;e<=d;e++)if(f=h,h=c[2*(e+1)+1],!(++m<n&&f===h)){if(m<p){do l(b,f,b.bl_tree);while(0!==--m)}else 0!==f?(f!==g&&(l(b,f,b.bl_tree),m--),l(b,v,b.bl_tree),k(b,m-3,2)):10>=m?(l(b,R,b.bl_tree),k(b,m-3,3)):(l(b,I,b.bl_tree),k(b,m-11,7));m=
+0;g=f;0===h?(n=138,p=3):f===h?(n=6,p=3):(n=7,p=4)}}function u(b){var c,d=4093624447;for(c=0;31>=c;c++,d>>>=1)if(1&d&&0!==b.dyn_ltree[2*c])return E;if(0!==b.dyn_ltree[18]||0!==b.dyn_ltree[20]||0!==b.dyn_ltree[26])return C;for(c=32;c<B;c++)if(0!==b.dyn_ltree[2*c])return C;return E}function D(b,c,d,e){k(b,(G<<1)+(e?1:0),3);r(b);h(b,d);h(b,~d);F.arraySet(b.pending_buf,b.window,c,d,b.pending);b.pending+=d}var F=b("../utils/common"),E=0,C=1,G=0,B=256,M=B+1+29,L=30,H=19,U=2*M+1,S=15,ba=16,A=256,v=16,R=17,
+I=18,J=[0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0],ca=[0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13],N=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,7],K=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15],X=Array(2*(M+2));e(X);var T=Array(2*L);e(T);var ea=Array(512);e(ea);var aa=Array(256);e(aa);var P=Array(29);e(P);var V=Array(L);e(V);var W,O,Q,fa=!1;d._tr_init=function(b){if(!fa){var c,d,e,h=Array(S+1);for(e=d=0;28>e;e++)for(P[e]=d,c=0;c<1<<J[e];c++)aa[d++]=e;aa[d-1]=
+e;for(e=d=0;16>e;e++)for(V[e]=d,c=0;c<1<<ca[e];c++)ea[d++]=e;for(d>>=7;e<L;e++)for(V[e]=d<<7,c=0;c<1<<ca[e]-7;c++)ea[256+d++]=e;for(c=0;c<=S;c++)h[c]=0;for(c=0;143>=c;)X[2*c+1]=8,c++,h[8]++;for(;255>=c;)X[2*c+1]=9,c++,h[9]++;for(;279>=c;)X[2*c+1]=7,c++,h[7]++;for(;287>=c;)X[2*c+1]=8,c++,h[8]++;n(X,M+1,h);for(c=0;c<L;c++)T[2*c+1]=5,T[2*c]=m(c,5);W=new f(X,J,B+1,M,S);O=new f(T,ca,0,L,S);Q=new f([],N,0,H,7);fa=!0}b.l_desc=new g(b.dyn_ltree,W);b.d_desc=new g(b.dyn_dtree,O);b.bl_desc=new g(b.bl_tree,Q);
+b.bi_buf=0;b.bi_valid=0;p(b)};d._tr_stored_block=D;d._tr_flush_block=function(b,c,d,e){var f,g,h=0;if(0<b.level){2===b.strm.data_type&&(b.strm.data_type=u(b));w(b,b.l_desc);w(b,b.d_desc);x(b,b.dyn_ltree,b.l_desc.max_code);x(b,b.dyn_dtree,b.d_desc.max_code);w(b,b.bl_desc);for(h=H-1;3<=h&&0===b.bl_tree[2*K[h]+1];h--);h=(b.opt_len+=3*(h+1)+14,h);f=b.opt_len+3+7>>>3;g=b.static_len+3+7>>>3;g<=f&&(f=g)}else f=g=d+5;if(d+4<=f&&-1!==c)D(b,c,d,e);else if(4===b.strategy||g===f)k(b,2+(e?1:0),3),z(b,X,T);else{k(b,
+4+(e?1:0),3);c=b.l_desc.max_code+1;d=b.d_desc.max_code+1;h+=1;k(b,c-257,5);k(b,d-1,5);k(b,h-4,4);for(f=0;f<h;f++)k(b,b.bl_tree[2*K[f]+1],3);y(b,b.dyn_ltree,c-1);y(b,b.dyn_dtree,d-1);z(b,b.dyn_ltree,b.dyn_dtree)}p(b);e&&r(b)};d._tr_tally=function(b,c,d){return b.pending_buf[b.d_buf+2*b.last_lit]=c>>>8&255,b.pending_buf[b.d_buf+2*b.last_lit+1]=255&c,b.pending_buf[b.l_buf+b.last_lit]=255&d,b.last_lit++,0===c?b.dyn_ltree[2*d]++:(b.matches++,c--,b.dyn_ltree[2*(aa[d]+B+1)]++,b.dyn_dtree[2*(256>c?ea[c]:
+ea[256+(c>>>7)])]++),b.last_lit===b.lit_bufsize-1};d._tr_align=function(b){k(b,2,3);l(b,A,X);16===b.bi_valid?(h(b,b.bi_buf),b.bi_buf=0,b.bi_valid=0):8<=b.bi_valid&&(b.pending_buf[b.pending++]=255&b.bi_buf,b.bi_buf>>=8,b.bi_valid-=8)}},{"../utils/common":3}],15:[function(b,c,d){c.exports=function(){this.input=null;this.total_in=this.avail_in=this.next_in=0;this.output=null;this.total_out=this.avail_out=this.next_out=0;this.msg="";this.state=null;this.data_type=2;this.adler=0}},{}],"/":[function(b,
+c,d){d=b("./lib/utils/common").assign;var e=b("./lib/deflate"),f=b("./lib/inflate");b=b("./lib/zlib/constants");var g={};d(g,e,f,b);c.exports=g},{"./lib/deflate":1,"./lib/inflate":2,"./lib/utils/common":3,"./lib/zlib/constants":6}]},{},[])("/")});var JSON;JSON||(JSON={});
+(function(){function a(a){return 10>a?"0"+a:a}function b(a){e.lastIndex=0;return e.test(a)?'"'+a.replace(e,function(a){var b=h[a];return"string"===typeof b?b:"\\u"+("0000"+a.charCodeAt(0).toString(16)).slice(-4)})+'"':'"'+a+'"'}function c(a,d){var e,h,l,m,t=f,z,w=d[a];w&&"object"===typeof w&&"function"===typeof w.toJSON&&(w=w.toJSON(a));"function"===typeof k&&(w=k.call(d,a,w));switch(typeof w){case "string":return b(w);case "number":return isFinite(w)?""+w:"null";case "boolean":case "null":return""+w;
+case "object":if(!w)return"null";f+=g;z=[];if("[object Array]"===Object.prototype.toString.apply(w)){m=w.length;for(e=0;e<m;e+=1)z[e]=c(e,w)||"null";l=0===z.length?"[]":f?"[\n"+f+z.join(",\n"+f)+"\n"+t+"]":"["+z.join(",")+"]";f=t;return l}if(k&&"object"===typeof k)for(m=k.length,e=0;e<m;e+=1)"string"===typeof k[e]&&(h=k[e],(l=c(h,w))&&z.push(b(h)+(f?": ":":")+l));else for(h in w)Object.prototype.hasOwnProperty.call(w,h)&&(l=c(h,w))&&z.push(b(h)+(f?": ":":")+l);l=0===z.length?"{}":f?"{\n"+f+z.join(",\n"+
+f)+"\n"+t+"}":"{"+z.join(",")+"}";f=t;return l}}"function"!==typeof Date.prototype.toJSON&&(Date.prototype.toJSON=function(){return isFinite(this.valueOf())?this.getUTCFullYear()+"-"+a(this.getUTCMonth()+1)+"-"+a(this.getUTCDate())+"T"+a(this.getUTCHours())+":"+a(this.getUTCMinutes())+":"+a(this.getUTCSeconds())+"Z":null},String.prototype.toJSON=Number.prototype.toJSON=Boolean.prototype.toJSON=function(){return this.valueOf()});var d=/[\u0000\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g,
 e=/[\\\"\x00-\x1f\x7f-\x9f\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g,f,g,h={"\b":"\\b","\t":"\\t","\n":"\\n","\f":"\\f","\r":"\\r",'"':'\\"',"\\":"\\\\"},k;"function"!==typeof JSON.stringify&&(JSON.stringify=function(a,b,d){var e;g=f="";if("number"===typeof d)for(e=0;e<d;e+=1)g+=" ";else"string"===typeof d&&(g=d);if((k=b)&&"function"!==typeof b&&("object"!==typeof b||"number"!==typeof b.length))throw Error("JSON.stringify");return c("",{"":a})});
 "function"!==typeof JSON.parse&&(JSON.parse=function(a,b){function c(a,d){var e,f,g=a[d];if(g&&"object"===typeof g)for(e in g)Object.prototype.hasOwnProperty.call(g,e)&&(f=c(g,e),void 0!==f?g[e]=f:delete g[e]);return b.call(a,d,g)}var e;a=""+a;d.lastIndex=0;d.test(a)&&(a=a.replace(d,function(a){return"\\u"+("0000"+a.charCodeAt(0).toString(16)).slice(-4)}));if(/^[\],:{}\s]*$/.test(a.replace(/\\(?:["\\\/bfnrt]|u[0-9a-fA-F]{4})/g,"@").replace(/"[^"\\\n\r]*"|true|false|null|-?\d+(?:\.\d*)?(?:[eE][+\-]?\d+)?/g,
 "]").replace(/(?:^|:|,)(?:\s*\[)+/g,"")))return e=eval("("+a+")"),"function"===typeof b?c({"":e},""):e;throw new SyntaxError("JSON.parse");})})();"undefined"===typeof window.mxBasePath&&(window.mxBasePath="https://www.draw.io/mxgraph/");window.mxLoadStylesheets=window.mxLoadStylesheets||!1;window.mxLoadResources=window.mxLoadResources||!1;window.mxLanguage=window.mxLanguage||"en";window.urlParams=window.urlParams||{};window.MAX_REQUEST_SIZE=window.MAX_REQUEST_SIZE||10485760;window.MAX_AREA=window.MAX_AREA||225E6;window.EXPORT_URL=window.EXPORT_URL||"/export";window.SAVE_URL=window.SAVE_URL||"/save";window.OPEN_URL=window.OPEN_URL||"/open";window.RESOURCES_PATH=window.RESOURCES_PATH||"resources";window.RESOURCE_BASE=window.RESOURCE_BASE||window.RESOURCES_PATH+"/grapheditor";window.STENCIL_PATH=window.STENCIL_PATH||"stencils";window.IMAGE_PATH=window.IMAGE_PATH||"images";
-window.STYLE_PATH=window.STYLE_PATH||"styles";window.CSS_PATH=window.CSS_PATH||"styles";window.OPEN_FORM=window.OPEN_FORM||"open.html";window.mxBasePath=window.mxBasePath||"../../../src";window.mxLanguage=window.mxLanguage||urlParams.lang;window.mxLanguages=window.mxLanguages||["de"];var mxClient={VERSION:"7.5.4",IS_IE:0<=navigator.userAgent.indexOf("MSIE"),IS_IE6:0<=navigator.userAgent.indexOf("MSIE 6"),IS_IE11:!!navigator.userAgent.match(/Trident\/7\./),IS_EDGE:!!navigator.userAgent.match(/Edge\//),IS_QUIRKS:0<=navigator.userAgent.indexOf("MSIE")&&(null==document.documentMode||5==document.documentMode),IS_EM:"spellcheck"in document.createElement("textarea")&&8==document.documentMode,VML_PREFIX:"v",OFFICE_PREFIX:"o",IS_NS:0<=navigator.userAgent.indexOf("Mozilla/")&&0>navigator.userAgent.indexOf("MSIE")&&
+window.STYLE_PATH=window.STYLE_PATH||"styles";window.CSS_PATH=window.CSS_PATH||"styles";window.OPEN_FORM=window.OPEN_FORM||"open.html";window.mxBasePath=window.mxBasePath||"../../../src";window.mxLanguage=window.mxLanguage||urlParams.lang;window.mxLanguages=window.mxLanguages||["de"];var mxClient={VERSION:"7.5.5",IS_IE:0<=navigator.userAgent.indexOf("MSIE"),IS_IE6:0<=navigator.userAgent.indexOf("MSIE 6"),IS_IE11:!!navigator.userAgent.match(/Trident\/7\./),IS_EDGE:!!navigator.userAgent.match(/Edge\//),IS_QUIRKS:0<=navigator.userAgent.indexOf("MSIE")&&(null==document.documentMode||5==document.documentMode),IS_EM:"spellcheck"in document.createElement("textarea")&&8==document.documentMode,VML_PREFIX:"v",OFFICE_PREFIX:"o",IS_NS:0<=navigator.userAgent.indexOf("Mozilla/")&&0>navigator.userAgent.indexOf("MSIE")&&
 0>navigator.userAgent.indexOf("Edge/"),IS_OP:0<=navigator.userAgent.indexOf("Opera/")||0<=navigator.userAgent.indexOf("OPR/"),IS_OT:0<=navigator.userAgent.indexOf("Presto/")&&0>navigator.userAgent.indexOf("Presto/2.4.")&&0>navigator.userAgent.indexOf("Presto/2.3.")&&0>navigator.userAgent.indexOf("Presto/2.2.")&&0>navigator.userAgent.indexOf("Presto/2.1.")&&0>navigator.userAgent.indexOf("Presto/2.0.")&&0>navigator.userAgent.indexOf("Presto/1."),IS_SF:0<=navigator.userAgent.indexOf("AppleWebKit/")&&
 0>navigator.userAgent.indexOf("Chrome/")&&0>navigator.userAgent.indexOf("Edge/"),IS_IOS:navigator.userAgent.match(/(iPad|iPhone|iPod)/g)?!0:!1,IS_GC:0<=navigator.userAgent.indexOf("Chrome/")&&0>navigator.userAgent.indexOf("Edge/"),IS_CHROMEAPP:null!=window.chrome&&null!=chrome.app&&null!=chrome.app.runtime,IS_FF:0<=navigator.userAgent.indexOf("Firefox/"),IS_MT:0<=navigator.userAgent.indexOf("Firefox/")&&0>navigator.userAgent.indexOf("Firefox/1.")&&0>navigator.userAgent.indexOf("Firefox/2.")||0<=navigator.userAgent.indexOf("Iceweasel/")&&
 0>navigator.userAgent.indexOf("Iceweasel/1.")&&0>navigator.userAgent.indexOf("Iceweasel/2.")||0<=navigator.userAgent.indexOf("SeaMonkey/")&&0>navigator.userAgent.indexOf("SeaMonkey/1.")||0<=navigator.userAgent.indexOf("Iceape/")&&0>navigator.userAgent.indexOf("Iceape/1."),IS_SVG:0<=navigator.userAgent.indexOf("Firefox/")||0<=navigator.userAgent.indexOf("Iceweasel/")||0<=navigator.userAgent.indexOf("Seamonkey/")||0<=navigator.userAgent.indexOf("Iceape/")||0<=navigator.userAgent.indexOf("Galeon/")||
@@ -237,8 +237,8 @@ post:function(a,b,c,d){return(new mxXmlRequest(a,b)).send(c,d)},submit:function(
 (a=null);return a},clone:function(a,b,c){c=null!=c?c:!1;var d=null;if(null!=a&&"function"==typeof a.constructor){var d=new a.constructor,e;for(e in a)e!=mxObjectIdentity.FIELD_NAME&&(null==b||0>mxUtils.indexOf(b,e))&&(d[e]=c||"object"!=typeof a[e]?a[e]:mxUtils.clone(a[e]))}return d},equalPoints:function(a,b){if(null==a&&null!=b||null!=a&&null==b||null!=a&&null!=b&&a.length!=b.length)return!1;if(null!=a&&null!=b)for(var c=0;c<a.length;c++)if(a[c]==b[c]||null!=a[c]&&!a[c].equals(b[c]))return!1;return!0},
 equalEntries:function(a,b){if(null==a&&null!=b||null!=a&&null==b||null!=a&&null!=b&&a.length!=b.length)return!1;if(null!=a&&null!=b){var c=0,d;for(d in b)c++;for(d in a)if(c--,!(mxUtils.isNaN(a[d])&&mxUtils.isNaN(b[d])||a[d]==b[d]))return!1}return 0==c},removeDuplicates:function(a){for(var b=new mxDictionary,c=[],d=0;d<a.length;d++)b.get(a[d])||(c.push(a[d]),b.put(a[d],!0));return c},isNaN:function(a){return"number"==typeof a&&isNaN(a)},extend:function(a,b){var c=function(){};c.prototype=b.prototype;
 a.prototype=new c;a.prototype.constructor=a},toString:function(a){var b="",c;for(c in a)try{if(null==a[c])b+=c+" = [null]\n";else if("function"==typeof a[c])b+=c+" => [Function]\n";else if("object"==typeof a[c])var d=mxUtils.getFunctionName(a[c].constructor),b=b+(c+" => ["+d+"]\n");else b+=c+" = "+a[c]+"\n"}catch(e){b+=c+"="+e.message}return b},toRadians:function(a){return Math.PI*a/180},toDegree:function(a){return 180*a/Math.PI},arcToCurves:function(a,b,c,d,e,f,g,h,k){h-=a;k-=b;if(0===c||0===d)return p;
-c=Math.abs(c);d=Math.abs(d);var l=-h/2,m=-k/2,n=Math.cos(e*Math.PI/180),p=Math.sin(e*Math.PI/180);e=n*l+p*m;var l=-1*p*l+n*m,m=e*e,r=l*l,q=c*c,t=d*d,y=m/q+r/t;1<y?(c*=Math.sqrt(y),d*=Math.sqrt(y),f=0):(y=1,f===g&&(y=-1),f=y*Math.sqrt((q*t-q*r-t*m)/(q*r+t*m)));m=f*c*l/d;r=-1*f*d*e/c;h=n*m-p*r+h/2;k=p*m+n*r+k/2;q=Math.atan2((l-r)/d,(e-m)/c)-Math.atan2(0,1);f=0<=q?q:2*Math.PI+q;q=Math.atan2((-l-r)/d,(-e-m)/c)-Math.atan2((l-r)/d,(e-m)/c);e=0<=q?q:2*Math.PI+q;0==g&&0<e?e-=2*Math.PI:0!=g&&0>e&&(e+=2*Math.PI);
-g=2*e/Math.PI;g=Math.ceil(0>g?-1*g:g);e/=g;l=8/3*Math.sin(e/4)*Math.sin(e/4)/Math.sin(e/2);m=n*c;n*=d;c*=p;d*=p;for(var x=Math.cos(f),w=Math.sin(f),r=-l*(m*w+d*x),q=-l*(c*w-n*x),p=[],z=0;z<g;++z){f+=e;var x=Math.cos(f),w=Math.sin(f),t=m*x-d*w+h,y=c*x+n*w+k,u=-l*(m*w+d*x),x=-l*(c*w-n*x),w=6*z;p[w]=Number(r+a);p[w+1]=Number(q+b);p[w+2]=Number(t-u+a);p[w+3]=Number(y-x+b);p[w+4]=Number(t+a);p[w+5]=Number(y+b);r=t+u;q=y+x}return p},getBoundingBox:function(a,b,c){var d=null;if(null!=a&&null!=b&&0!=b){b=
+c=Math.abs(c);d=Math.abs(d);var l=-h/2,m=-k/2,n=Math.cos(e*Math.PI/180),p=Math.sin(e*Math.PI/180);e=n*l+p*m;var l=-1*p*l+n*m,m=e*e,r=l*l,q=c*c,t=d*d,z=m/q+r/t;1<z?(c*=Math.sqrt(z),d*=Math.sqrt(z),f=0):(z=1,f===g&&(z=-1),f=z*Math.sqrt((q*t-q*r-t*m)/(q*r+t*m)));m=f*c*l/d;r=-1*f*d*e/c;h=n*m-p*r+h/2;k=p*m+n*r+k/2;q=Math.atan2((l-r)/d,(e-m)/c)-Math.atan2(0,1);f=0<=q?q:2*Math.PI+q;q=Math.atan2((-l-r)/d,(-e-m)/c)-Math.atan2((l-r)/d,(e-m)/c);e=0<=q?q:2*Math.PI+q;0==g&&0<e?e-=2*Math.PI:0!=g&&0>e&&(e+=2*Math.PI);
+g=2*e/Math.PI;g=Math.ceil(0>g?-1*g:g);e/=g;l=8/3*Math.sin(e/4)*Math.sin(e/4)/Math.sin(e/2);m=n*c;n*=d;c*=p;d*=p;for(var w=Math.cos(f),x=Math.sin(f),r=-l*(m*x+d*w),q=-l*(c*x-n*w),p=[],y=0;y<g;++y){f+=e;var w=Math.cos(f),x=Math.sin(f),t=m*w-d*x+h,z=c*w+n*x+k,u=-l*(m*x+d*w),w=-l*(c*x-n*w),x=6*y;p[x]=Number(r+a);p[x+1]=Number(q+b);p[x+2]=Number(t-u+a);p[x+3]=Number(z-w+b);p[x+4]=Number(t+a);p[x+5]=Number(z+b);r=t+u;q=z+w}return p},getBoundingBox:function(a,b,c){var d=null;if(null!=a&&null!=b&&0!=b){b=
 mxUtils.toRadians(b);var d=Math.cos(b),e=Math.sin(b);c=null!=c?c:new mxPoint(a.x+a.width/2,a.y+a.height/2);var f=new mxPoint(a.x,a.y);b=new mxPoint(a.x+a.width,a.y);var g=new mxPoint(b.x,a.y+a.height);a=new mxPoint(a.x,g.y);f=mxUtils.getRotatedPoint(f,d,e,c);b=mxUtils.getRotatedPoint(b,d,e,c);g=mxUtils.getRotatedPoint(g,d,e,c);a=mxUtils.getRotatedPoint(a,d,e,c);d=new mxRectangle(f.x,f.y,0,0);d.add(new mxRectangle(b.x,b.y,0,0));d.add(new mxRectangle(g.x,g.y,0,0));d.add(new mxRectangle(a.x,a.y,0,0))}return d},
 getRotatedPoint:function(a,b,c,d){d=null!=d?d:new mxPoint;var e=a.x-d.x;a=a.y-d.y;return new mxPoint(e*b-a*c+d.x,a*b+e*c+d.y)},getPortConstraints:function(a,b,c,d){b=mxUtils.getValue(a.style,mxConstants.STYLE_PORT_CONSTRAINT,mxUtils.getValue(b.style,c?mxConstants.STYLE_SOURCE_PORT_CONSTRAINT:mxConstants.STYLE_TARGET_PORT_CONSTRAINT,null));if(null==b)return d;d=b.toString();b=mxConstants.DIRECTION_MASK_NONE;c=0;1==mxUtils.getValue(a.style,mxConstants.STYLE_PORT_CONSTRAINT_ROTATION,0)&&(c=mxUtils.getValue(a.style,
 mxConstants.STYLE_ROTATION,0));a=0;45<c?(a=1,135<=c&&(a=2)):-45>c&&(a=3,-135>=c&&(a=2));if(0<=d.indexOf(mxConstants.DIRECTION_NORTH))switch(a){case 0:b|=mxConstants.DIRECTION_MASK_NORTH;break;case 1:b|=mxConstants.DIRECTION_MASK_EAST;break;case 2:b|=mxConstants.DIRECTION_MASK_SOUTH;break;case 3:b|=mxConstants.DIRECTION_MASK_WEST}if(0<=d.indexOf(mxConstants.DIRECTION_WEST))switch(a){case 0:b|=mxConstants.DIRECTION_MASK_WEST;break;case 1:b|=mxConstants.DIRECTION_MASK_NORTH;break;case 2:b|=mxConstants.DIRECTION_MASK_EAST;
@@ -400,13 +400,13 @@ mxSvgCanvas2D.prototype.updateText=function(a,b,c,d,e,f,g,h,k,l,m){if(null!=m&&n
 mxConstants.ALIGN_CENTER?k-=c/2:e==mxConstants.ALIGN_RIGHT&&(k-=c);a+=k;f==mxConstants.ALIGN_MIDDLE?g-=d/2:f==mxConstants.ALIGN_BOTTOM&&(g-=d);"fill"!=h&&mxClient.IS_FF&&mxClient.IS_WIN&&(g-=2);b+=g;e=1!=r.scale?"scale("+r.scale+")":"";0!=r.rotation&&this.rotateHtml?(e+="rotate("+r.rotation+","+c/2+","+d/2+")",b=this.rotatePoint((a+c/2)*r.scale,(b+d/2)*r.scale,r.rotation,r.rotationCx,r.rotationCy),a=b.x-c*r.scale/2,b=b.y-d*r.scale/2):(a*=r.scale,b*=r.scale);0!=l&&(e+="rotate("+l+","+-k+","+-g+")");
 m.setAttribute("transform","translate("+Math.round(a)+","+Math.round(b)+")"+e);n.setAttribute("width",Math.round(Math.max(1,c)));n.setAttribute("height",Math.round(Math.max(1,d)))}};
 mxSvgCanvas2D.prototype.text=function(a,b,c,d,e,f,g,h,k,l,m,n,p){if(this.textEnabled&&null!=e){n=null!=n?n:0;var r=this.state;a+=r.dx;b+=r.dy;if(this.foEnabled&&"html"==k){var q="vertical-align:top;";m?q+="overflow:hidden;max-height:"+Math.round(d)+"px;max-width:"+Math.round(c)+"px;":"fill"==l?q+="width:"+Math.round(c+1)+"px;height:"+Math.round(d+1)+"px;overflow:hidden;":"width"==l&&(q+="width:"+Math.round(c+1)+"px;",0<d&&(q+="max-height:"+Math.round(d)+"px;overflow:hidden;"));var q=h&&0<c?q+("width:"+
-Math.round(c+1)+"px;white-space:normal;word-wrap:"+mxConstants.WORD_WRAP+";"):q+"white-space:nowrap;",t=this.createElement("g");1>r.alpha&&t.setAttribute("opacity",r.alpha);var y=this.createElement("foreignObject");y.setAttribute("style","overflow:visible;");y.setAttribute("pointer-events","all");q=this.createDiv(e,f,g,q,l);if(null!=q){null!=p&&q.setAttribute("dir",p);t.appendChild(y);this.root.appendChild(t);var x,w;p=x=2;if(!mxClient.IS_IE||9!=document.documentMode&&mxClient.IS_SVG){this.root.ownerDocument!=
-document?(q.style.visibility="hidden",document.body.appendChild(q)):y.appendChild(q);var z=q;null!=z.firstChild&&"DIV"==z.firstChild.nodeName&&(z=z.firstChild,h&&"break-word"==q.style.wordWrap&&(z.style.width="100%"));u=z.offsetWidth;0==u&&q.parentNode==y&&(q.style.visibility="hidden",document.body.appendChild(q),u=z.offsetWidth);this.cacheOffsetSize&&(t.mxCachedOffsetWidth=u);!m&&h&&0<c&&this.root.ownerDocument!=document&&"fill"!=l&&"width"!=l&&(F=q.style.whiteSpace,q.style.whiteSpace="nowrap",u<
-z.offsetWidth&&(q.style.whiteSpace=F));x=u+x-1;h&&"fill"!=l&&"width"!=l&&(m&&(x=Math.min(x,c)),q.style.width=x+"px");x=z.offsetWidth;w=z.offsetHeight;this.cacheOffsetSize&&(t.mxCachedFinalOffsetWidth=x,t.mxCachedFinalOffsetHeight=w);w-=p;q.parentNode!=y&&(y.appendChild(q),q.style.visibility="")}else{z=document.createElement("div");z.style.cssText=q.getAttribute("style");z.style.display=mxClient.IS_QUIRKS?"inline":"inline-block";z.style.position="absolute";z.style.visibility="hidden";w=document.createElement("div");
-w.style.display=mxClient.IS_QUIRKS?"inline":"inline-block";w.style.wordWrap=mxConstants.WORD_WRAP;w.innerHTML=mxUtils.isNode(e)?e.outerHTML:e;z.appendChild(w);document.body.appendChild(z);8!=document.documentMode&&9!=document.documentMode&&null!=r.fontBorderColor&&(x+=2,p+=2);if(h&&0<c){var u=w.offsetWidth;if(!m&&h&&0<c&&this.root.ownerDocument!=document&&"fill"!=l){var F=z.style.whiteSpace;w.style.whiteSpace="nowrap";u<w.offsetWidth&&(z.style.whiteSpace=F)}m&&(u=Math.min(u,c));z.style.width=u+"px";
-x=w.offsetWidth+x+0;w=w.offsetHeight+p;z.style.display="inline-block";z.style.position="";z.style.visibility="";z.style.width=x+"px";q.setAttribute("style",z.style.cssText)}else x=w.offsetWidth+x,w=w.offsetHeight+p;z.parentNode.removeChild(z);y.appendChild(q)}m&&(w=Math.min(w,d),x=Math.min(x,c));"width"==l?d=w:"fill"!=l&&(c=x,d=w);1>r.alpha&&t.setAttribute("opacity",r.alpha);p=q=0;f==mxConstants.ALIGN_CENTER?q-=c/2:f==mxConstants.ALIGN_RIGHT&&(q-=c);a+=q;g==mxConstants.ALIGN_MIDDLE?p-=d/2:g==mxConstants.ALIGN_BOTTOM&&
-(p-=d);"fill"!=l&&mxClient.IS_FF&&mxClient.IS_WIN&&(p-=2);b+=p;z=1!=r.scale?"scale("+r.scale+")":"";0!=r.rotation&&this.rotateHtml?(z+="rotate("+r.rotation+","+c/2+","+d/2+")",b=this.rotatePoint((a+c/2)*r.scale,(b+d/2)*r.scale,r.rotation,r.rotationCx,r.rotationCy),a=b.x-c*r.scale/2,b=b.y-d*r.scale/2):(a*=r.scale,b*=r.scale);0!=n&&(z+="rotate("+n+","+-q+","+-p+")");t.setAttribute("transform","translate("+(Math.round(a)+this.foOffset)+","+(Math.round(b)+this.foOffset)+")"+z);y.setAttribute("width",
-Math.round(Math.max(1,c)));y.setAttribute("height",Math.round(Math.max(1,d)));this.root.ownerDocument!=document&&(a=this.createAlternateContent(y,a,b,c,d,e,f,g,h,k,l,m,n),null!=a&&(y.setAttribute("requiredFeatures","http://www.w3.org/TR/SVG11/feature#Extensibility"),c=this.createElement("switch"),c.appendChild(y),c.appendChild(a),t.appendChild(c)))}}else this.plainText(a,b,c,d,e,f,g,h,l,m,n,p)}};
+Math.round(c+1)+"px;white-space:normal;word-wrap:"+mxConstants.WORD_WRAP+";"):q+"white-space:nowrap;",t=this.createElement("g");1>r.alpha&&t.setAttribute("opacity",r.alpha);var z=this.createElement("foreignObject");z.setAttribute("style","overflow:visible;");z.setAttribute("pointer-events","all");q=this.createDiv(e,f,g,q,l);if(null!=q){null!=p&&q.setAttribute("dir",p);t.appendChild(z);this.root.appendChild(t);var w,x;p=w=2;if(!mxClient.IS_IE||9!=document.documentMode&&mxClient.IS_SVG){this.root.ownerDocument!=
+document?(q.style.visibility="hidden",document.body.appendChild(q)):z.appendChild(q);var y=q;null!=y.firstChild&&"DIV"==y.firstChild.nodeName&&(y=y.firstChild,h&&"break-word"==q.style.wordWrap&&(y.style.width="100%"));u=y.offsetWidth;0==u&&q.parentNode==z&&(q.style.visibility="hidden",document.body.appendChild(q),u=y.offsetWidth);this.cacheOffsetSize&&(t.mxCachedOffsetWidth=u);!m&&h&&0<c&&this.root.ownerDocument!=document&&"fill"!=l&&"width"!=l&&(D=q.style.whiteSpace,q.style.whiteSpace="nowrap",u<
+y.offsetWidth&&(q.style.whiteSpace=D));w=u+w-1;h&&"fill"!=l&&"width"!=l&&(m&&(w=Math.min(w,c)),q.style.width=w+"px");w=y.offsetWidth;x=y.offsetHeight;this.cacheOffsetSize&&(t.mxCachedFinalOffsetWidth=w,t.mxCachedFinalOffsetHeight=x);x-=p;q.parentNode!=z&&(z.appendChild(q),q.style.visibility="")}else{y=document.createElement("div");y.style.cssText=q.getAttribute("style");y.style.display=mxClient.IS_QUIRKS?"inline":"inline-block";y.style.position="absolute";y.style.visibility="hidden";x=document.createElement("div");
+x.style.display=mxClient.IS_QUIRKS?"inline":"inline-block";x.style.wordWrap=mxConstants.WORD_WRAP;x.innerHTML=mxUtils.isNode(e)?e.outerHTML:e;y.appendChild(x);document.body.appendChild(y);8!=document.documentMode&&9!=document.documentMode&&null!=r.fontBorderColor&&(w+=2,p+=2);if(h&&0<c){var u=x.offsetWidth;if(!m&&h&&0<c&&this.root.ownerDocument!=document&&"fill"!=l){var D=y.style.whiteSpace;x.style.whiteSpace="nowrap";u<x.offsetWidth&&(y.style.whiteSpace=D)}m&&(u=Math.min(u,c));y.style.width=u+"px";
+w=x.offsetWidth+w+0;x=x.offsetHeight+p;y.style.display="inline-block";y.style.position="";y.style.visibility="";y.style.width=w+"px";q.setAttribute("style",y.style.cssText)}else w=x.offsetWidth+w,x=x.offsetHeight+p;y.parentNode.removeChild(y);z.appendChild(q)}m&&(x=Math.min(x,d),w=Math.min(w,c));"width"==l?d=x:"fill"!=l&&(c=w,d=x);1>r.alpha&&t.setAttribute("opacity",r.alpha);p=q=0;f==mxConstants.ALIGN_CENTER?q-=c/2:f==mxConstants.ALIGN_RIGHT&&(q-=c);a+=q;g==mxConstants.ALIGN_MIDDLE?p-=d/2:g==mxConstants.ALIGN_BOTTOM&&
+(p-=d);"fill"!=l&&mxClient.IS_FF&&mxClient.IS_WIN&&(p-=2);b+=p;y=1!=r.scale?"scale("+r.scale+")":"";0!=r.rotation&&this.rotateHtml?(y+="rotate("+r.rotation+","+c/2+","+d/2+")",b=this.rotatePoint((a+c/2)*r.scale,(b+d/2)*r.scale,r.rotation,r.rotationCx,r.rotationCy),a=b.x-c*r.scale/2,b=b.y-d*r.scale/2):(a*=r.scale,b*=r.scale);0!=n&&(y+="rotate("+n+","+-q+","+-p+")");t.setAttribute("transform","translate("+(Math.round(a)+this.foOffset)+","+(Math.round(b)+this.foOffset)+")"+y);z.setAttribute("width",
+Math.round(Math.max(1,c)));z.setAttribute("height",Math.round(Math.max(1,d)));this.root.ownerDocument!=document&&(a=this.createAlternateContent(z,a,b,c,d,e,f,g,h,k,l,m,n),null!=a&&(z.setAttribute("requiredFeatures","http://www.w3.org/TR/SVG11/feature#Extensibility"),c=this.createElement("switch"),c.appendChild(z),c.appendChild(a),t.appendChild(c)))}}else this.plainText(a,b,c,d,e,f,g,h,l,m,n,p)}};
 mxSvgCanvas2D.prototype.createClip=function(a,b,c,d){a=Math.round(a);b=Math.round(b);c=Math.round(c);d=Math.round(d);for(var e="mx-clip-"+a+"-"+b+"-"+c+"-"+d,f=0,g=e+"-"+f;null!=document.getElementById(g);)g=e+"-"+ ++f;clip=this.createElement("clipPath");clip.setAttribute("id",g);e=this.createElement("rect");e.setAttribute("x",a);e.setAttribute("y",b);e.setAttribute("width",c);e.setAttribute("height",d);clip.appendChild(e);return clip};
 mxSvgCanvas2D.prototype.plainText=function(a,b,c,d,e,f,g,h,k,l,m,n){m=null!=m?m:0;h=this.state;var p=h.fontSize,r=this.createElement("g"),q=h.transform||"";this.updateFont(r);0!=m&&(q+="rotate("+m+","+this.format(a*h.scale)+","+this.format(b*h.scale)+")");null!=n&&r.setAttribute("direction",n);l&&0<c&&0<d&&(n=a,m=b,f==mxConstants.ALIGN_CENTER?n-=c/2:f==mxConstants.ALIGN_RIGHT&&(n-=c),"fill"!=k&&(g==mxConstants.ALIGN_MIDDLE?m-=d/2:g==mxConstants.ALIGN_BOTTOM&&(m-=d)),m=this.createClip(n*h.scale-2,
 m*h.scale-2,c*h.scale+4,d*h.scale+4),null!=this.defs?this.defs.appendChild(m):this.root.appendChild(m),mxClient.IS_CHROME_APP||mxClient.IS_IE||mxClient.IS_IE11||mxClient.IS_EDGE||this.root.ownerDocument!=document?r.setAttribute("clip-path","url(#"+m.getAttribute("id")+")"):(n=this.getBaseUrl().replace(/([\(\)])/g,"\\$1"),r.setAttribute("clip-path","url("+n+"#"+m.getAttribute("id")+")")));m=f==mxConstants.ALIGN_RIGHT?"end":f==mxConstants.ALIGN_CENTER?"middle":"start";"start"!=m&&r.setAttribute("text-anchor",
@@ -438,13 +438,13 @@ mxVmlCanvas2D.prototype.createDiv=function(a,b,c,d){c=this.createElement("div");
 f,c.innerHTML=a);a=c.style;a.fontSize=e.fontSize/this.vmlScale+"px";a.fontFamily=e.fontFamily;a.color=e.fontColor;a.verticalAlign="top";a.textAlign=b||"left";a.lineHeight=mxConstants.ABSOLUTE_LINE_HEIGHT?e.fontSize*mxConstants.LINE_HEIGHT/this.vmlScale+"px":mxConstants.LINE_HEIGHT;(e.fontStyle&mxConstants.FONT_BOLD)==mxConstants.FONT_BOLD&&(a.fontWeight="bold");(e.fontStyle&mxConstants.FONT_ITALIC)==mxConstants.FONT_ITALIC&&(a.fontStyle="italic");(e.fontStyle&mxConstants.FONT_UNDERLINE)==mxConstants.FONT_UNDERLINE&&
 (a.textDecoration="underline");return c};
 mxVmlCanvas2D.prototype.text=function(a,b,c,d,e,f,g,h,k,l,m,n,p){if(this.textEnabled&&null!=e){var r=this.state;if("html"==k){null!=r.rotation&&(b=this.rotatePoint(a,b,r.rotation,r.rotationCx,r.rotationCy),a=b.x,b=b.y);8!=document.documentMode||mxClient.IS_EM?(a*=r.scale,b*=r.scale):(a+=r.dx,b+=r.dy,"fill"!=l&&g==mxConstants.ALIGN_TOP&&--b);k=8!=document.documentMode||mxClient.IS_EM?this.createElement("div"):this.createVmlElement("group");k.style.position="absolute";k.style.display="inline";k.style.left=
-this.format(a)+"px";k.style.top=this.format(b)+"px";k.style.zoom=r.scale;var q=this.createElement("div");q.style.position="relative";q.style.display="inline";var t=mxUtils.getAlignmentAsPoint(f,g),y=t.x,t=t.y;e=this.createDiv(e,f,g,l);f=this.createElement("div");null!=p&&e.setAttribute("dir",p);if(h&&0<c){if(m||(e.style.width=Math.round(c)+"px"),e.style.wordWrap=mxConstants.WORD_WRAP,e.style.whiteSpace="normal","break-word"==e.style.wordWrap){var x=e;null!=x.firstChild&&"DIV"==x.firstChild.nodeName&&
-(x.firstChild.style.width="100%")}}else e.style.whiteSpace="nowrap";n=r.rotation+(n||0);this.rotateHtml&&0!=n?(f.style.display="inline",f.style.zoom="1",f.appendChild(e),8!=document.documentMode||mxClient.IS_EM||"DIV"==this.root.nodeName?k.appendChild(f):(q.appendChild(f),k.appendChild(q))):8!=document.documentMode||mxClient.IS_EM?(e.style.display="inline",k.appendChild(e)):(q.appendChild(e),k.appendChild(q));"DIV"!=this.root.nodeName?(p=this.createVmlElement("rect"),p.stroked="false",p.filled="false",
-p.appendChild(k),this.root.appendChild(p)):this.root.appendChild(k);m?(e.style.overflow="hidden",e.style.width=Math.round(c)+"px",mxClient.IS_QUIRKS||(e.style.maxHeight=Math.round(d)+"px")):"fill"==l?(e.style.overflow="hidden",e.style.width=Math.max(0,c)+1+"px",e.style.height=Math.max(0,d)+1+"px"):"width"==l&&(e.style.overflow="hidden",e.style.width=Math.max(0,c)+1+"px",e.style.maxHeight=Math.max(0,d)+1+"px");if(this.rotateHtml&&0!=n){x=Math.PI/180*n;n=parseFloat(parseFloat(Math.cos(x)).toFixed(8));
-p=parseFloat(parseFloat(Math.sin(-x)).toFixed(8));x%=2*Math.PI;0>x&&(x+=2*Math.PI);x%=Math.PI;x>Math.PI/2&&(x=Math.PI-x);g=Math.cos(x);var w=Math.sin(x);8!=document.documentMode||mxClient.IS_EM||(e.style.display="inline-block",f.style.display="inline-block",q.style.display="inline-block");e.style.visibility="hidden";e.style.position="absolute";document.body.appendChild(e);q=e;null!=q.firstChild&&"DIV"==q.firstChild.nodeName&&(q=q.firstChild);x=q.offsetWidth+3;q=q.offsetHeight;m?(c=Math.min(c,x),q=
-Math.min(q,d)):c=x;h&&(e.style.width=c+"px");mxClient.IS_QUIRKS&&(m||"width"==l)&&q>d&&(q=d,e.style.height=q+"px");d=q;m=(d-d*g+c*-w)/2-p*c*(y+.5)+n*d*(t+.5);h=(c-c*g+d*-w)/2+n*c*(y+.5)+p*d*(t+.5);"group"==k.nodeName&&"DIV"==this.root.nodeName?(l=this.createElement("div"),l.style.display="inline-block",l.style.position="absolute",l.style.left=this.format(a+(h-c/2)*r.scale)+"px",l.style.top=this.format(b+(m-d/2)*r.scale)+"px",k.parentNode.appendChild(l),l.appendChild(k)):(r=8!=document.documentMode||
+this.format(a)+"px";k.style.top=this.format(b)+"px";k.style.zoom=r.scale;var q=this.createElement("div");q.style.position="relative";q.style.display="inline";var t=mxUtils.getAlignmentAsPoint(f,g),z=t.x,t=t.y;e=this.createDiv(e,f,g,l);f=this.createElement("div");null!=p&&e.setAttribute("dir",p);if(h&&0<c){if(m||(e.style.width=Math.round(c)+"px"),e.style.wordWrap=mxConstants.WORD_WRAP,e.style.whiteSpace="normal","break-word"==e.style.wordWrap){var w=e;null!=w.firstChild&&"DIV"==w.firstChild.nodeName&&
+(w.firstChild.style.width="100%")}}else e.style.whiteSpace="nowrap";n=r.rotation+(n||0);this.rotateHtml&&0!=n?(f.style.display="inline",f.style.zoom="1",f.appendChild(e),8!=document.documentMode||mxClient.IS_EM||"DIV"==this.root.nodeName?k.appendChild(f):(q.appendChild(f),k.appendChild(q))):8!=document.documentMode||mxClient.IS_EM?(e.style.display="inline",k.appendChild(e)):(q.appendChild(e),k.appendChild(q));"DIV"!=this.root.nodeName?(p=this.createVmlElement("rect"),p.stroked="false",p.filled="false",
+p.appendChild(k),this.root.appendChild(p)):this.root.appendChild(k);m?(e.style.overflow="hidden",e.style.width=Math.round(c)+"px",mxClient.IS_QUIRKS||(e.style.maxHeight=Math.round(d)+"px")):"fill"==l?(e.style.overflow="hidden",e.style.width=Math.max(0,c)+1+"px",e.style.height=Math.max(0,d)+1+"px"):"width"==l&&(e.style.overflow="hidden",e.style.width=Math.max(0,c)+1+"px",e.style.maxHeight=Math.max(0,d)+1+"px");if(this.rotateHtml&&0!=n){w=Math.PI/180*n;n=parseFloat(parseFloat(Math.cos(w)).toFixed(8));
+p=parseFloat(parseFloat(Math.sin(-w)).toFixed(8));w%=2*Math.PI;0>w&&(w+=2*Math.PI);w%=Math.PI;w>Math.PI/2&&(w=Math.PI-w);g=Math.cos(w);var x=Math.sin(w);8!=document.documentMode||mxClient.IS_EM||(e.style.display="inline-block",f.style.display="inline-block",q.style.display="inline-block");e.style.visibility="hidden";e.style.position="absolute";document.body.appendChild(e);q=e;null!=q.firstChild&&"DIV"==q.firstChild.nodeName&&(q=q.firstChild);w=q.offsetWidth+3;q=q.offsetHeight;m?(c=Math.min(c,w),q=
+Math.min(q,d)):c=w;h&&(e.style.width=c+"px");mxClient.IS_QUIRKS&&(m||"width"==l)&&q>d&&(q=d,e.style.height=q+"px");d=q;m=(d-d*g+c*-x)/2-p*c*(z+.5)+n*d*(t+.5);h=(c-c*g+d*-x)/2+n*c*(z+.5)+p*d*(t+.5);"group"==k.nodeName&&"DIV"==this.root.nodeName?(l=this.createElement("div"),l.style.display="inline-block",l.style.position="absolute",l.style.left=this.format(a+(h-c/2)*r.scale)+"px",l.style.top=this.format(b+(m-d/2)*r.scale)+"px",k.parentNode.appendChild(l),l.appendChild(k)):(r=8!=document.documentMode||
 mxClient.IS_EM?r.scale:1,k.style.left=this.format(a+(h-c/2)*r)+"px",k.style.top=this.format(b+(m-d/2)*r)+"px");f.style.filter="progid:DXImageTransform.Microsoft.Matrix(M11="+n+", M12="+p+", M21="+-p+", M22="+n+", sizingMethod='auto expand')";f.style.backgroundColor=this.rotatedHtmlBackground;1>this.state.alpha&&(f.style.filter+="alpha(opacity="+100*this.state.alpha+")");f.appendChild(e);e.style.position="";e.style.visibility=""}else 8!=document.documentMode||mxClient.IS_EM?(e.style.verticalAlign=
-"top",1>this.state.alpha&&(k.style.filter="alpha(opacity="+100*this.state.alpha+")"),r=e.parentNode,e.style.visibility="hidden",document.body.appendChild(e),c=e.offsetWidth,q=e.offsetHeight,mxClient.IS_QUIRKS&&m&&q>d&&(q=d,e.style.height=q+"px"),d=q,e.style.visibility="",r.appendChild(e),k.style.left=this.format(a+c*y*this.state.scale)+"px",k.style.top=this.format(b+d*t*this.state.scale)+"px"):(1>this.state.alpha&&(e.style.filter="alpha(opacity="+100*this.state.alpha+")"),q.style.left=100*y+"%",q.style.top=
+"top",1>this.state.alpha&&(k.style.filter="alpha(opacity="+100*this.state.alpha+")"),r=e.parentNode,e.style.visibility="hidden",document.body.appendChild(e),c=e.offsetWidth,q=e.offsetHeight,mxClient.IS_QUIRKS&&m&&q>d&&(q=d,e.style.height=q+"px"),d=q,e.style.visibility="",r.appendChild(e),k.style.left=this.format(a+c*z*this.state.scale)+"px",k.style.top=this.format(b+d*t*this.state.scale)+"px"):(1>this.state.alpha&&(e.style.filter="alpha(opacity="+100*this.state.alpha+")"),q.style.left=100*z+"%",q.style.top=
 100*t+"%")}else this.plainText(a,b,c,d,mxUtils.htmlEntities(e,!1),f,g,h,k,l,m,n,p)}};
 mxVmlCanvas2D.prototype.plainText=function(a,b,c,d,e,f,g,h,k,l,m,n,p){h=this.state;a=(a+h.dx)*h.scale;b=(b+h.dy)*h.scale;c=this.createVmlElement("shape");c.style.width="1px";c.style.height="1px";c.stroked="false";d=this.createVmlElement("fill");d.color=h.fontColor;d.opacity=100*h.alpha+"%";c.appendChild(d);d=this.createVmlElement("path");d.textpathok="true";d.v="m "+this.format(0)+" "+this.format(0)+" l "+this.format(1)+" "+this.format(0);c.appendChild(d);d=this.createVmlElement("textpath");d.style.cssText=
 "v-text-align:"+f;d.style.align=f;d.style.fontFamily=h.fontFamily;d.string=e;d.on="true";f=h.fontSize*h.scale/this.vmlScale;d.style.fontSize=f+"px";(h.fontStyle&mxConstants.FONT_BOLD)==mxConstants.FONT_BOLD&&(d.style.fontWeight="bold");(h.fontStyle&mxConstants.FONT_ITALIC)==mxConstants.FONT_ITALIC&&(d.style.fontStyle="italic");(h.fontStyle&mxConstants.FONT_UNDERLINE)==mxConstants.FONT_UNDERLINE&&(d.style.textDecoration="underline");e=e.split("\n");h=f+(e.length-1)*f*mxConstants.LINE_HEIGHT;f=e=0;
@@ -524,19 +524,19 @@ mxRhombus.prototype.paintVertexShape=function(a,b,c,d,e){var f=d/2,g=e/2,h=mxUti
 mxPolyline.prototype.getShapeRotation=function(){return 0};mxPolyline.prototype.isPaintBoundsInverted=function(){return!1};mxPolyline.prototype.paintEdgeShape=function(a,b){null==this.style||1!=this.style[mxConstants.STYLE_CURVED]?this.paintLine(a,b,this.isRounded):this.paintCurvedLine(a,b)};mxPolyline.prototype.paintLine=function(a,b,c){var d=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;a.begin();this.addPoints(a,b,c,d,!1);a.stroke()};
 mxPolyline.prototype.paintCurvedLine=function(a,b){a.begin();var c=b[0],d=b.length;a.moveTo(c.x,c.y);for(c=1;c<d-2;c++){var e=b[c],f=b[c+1];a.quadTo(e.x,e.y,(e.x+f.x)/2,(e.y+f.y)/2)}e=b[d-2];f=b[d-1];a.quadTo(e.x,e.y,f.x,f.y);a.stroke()};
 function mxArrow(a,b,c,d,e,f,g){mxShape.call(this);this.points=a;this.fill=b;this.stroke=c;this.strokewidth=null!=d?d:1;this.arrowWidth=null!=e?e:mxConstants.ARROW_WIDTH;this.spacing=null!=f?f:mxConstants.ARROW_SPACING;this.endSize=null!=g?g:mxConstants.ARROW_SIZE}mxUtils.extend(mxArrow,mxShape);mxArrow.prototype.augmentBoundingBox=function(a){mxShape.prototype.augmentBoundingBox.apply(this,arguments);a.grow((Math.max(this.arrowWidth,this.endSize)/2+this.strokewidth)*this.scale)};
-mxArrow.prototype.paintEdgeShape=function(a,b){var c=mxConstants.ARROW_SPACING,d=mxConstants.ARROW_WIDTH,e=b[0],f=b[b.length-1],g=f.x-e.x,h=f.y-e.y,k=Math.sqrt(g*g+h*h),l=k-2*c-mxConstants.ARROW_SIZE,g=g/k,h=h/k,k=d*h/3,d=-d*g/3,m=e.x-k/2+c*g,e=e.y-d/2+c*h,n=m+k,p=e+d,r=n+l*g,l=p+l*h,q=r+k,t=l+d,y=q-3*k,x=t-3*d;a.begin();a.moveTo(m,e);a.lineTo(n,p);a.lineTo(r,l);a.lineTo(q,t);a.lineTo(f.x-c*g,f.y-c*h);a.lineTo(y,x);a.lineTo(y+k,x+d);a.close();a.fillAndStroke()};
+mxArrow.prototype.paintEdgeShape=function(a,b){var c=mxConstants.ARROW_SPACING,d=mxConstants.ARROW_WIDTH,e=b[0],f=b[b.length-1],g=f.x-e.x,h=f.y-e.y,k=Math.sqrt(g*g+h*h),l=k-2*c-mxConstants.ARROW_SIZE,g=g/k,h=h/k,k=d*h/3,d=-d*g/3,m=e.x-k/2+c*g,e=e.y-d/2+c*h,n=m+k,p=e+d,r=n+l*g,l=p+l*h,q=r+k,t=l+d,z=q-3*k,w=t-3*d;a.begin();a.moveTo(m,e);a.lineTo(n,p);a.lineTo(r,l);a.lineTo(q,t);a.lineTo(f.x-c*g,f.y-c*h);a.lineTo(z,w);a.lineTo(z+k,w+d);a.close();a.fillAndStroke()};
 function mxArrowConnector(a,b,c,d,e,f,g){mxShape.call(this);this.points=a;this.fill=b;this.stroke=c;this.strokewidth=null!=d?d:1;this.arrowWidth=null!=e?e:mxConstants.ARROW_WIDTH;this.arrowSpacing=null!=f?f:mxConstants.ARROW_SPACING;this.startSize=mxConstants.ARROW_SIZE/5;this.endSize=mxConstants.ARROW_SIZE/5}mxUtils.extend(mxArrowConnector,mxShape);mxArrowConnector.prototype.useSvgBoundingBox=!0;
 mxArrowConnector.prototype.resetStyles=function(){mxShape.prototype.resetStyles.apply(this,arguments);this.arrowSpacing=mxConstants.ARROW_SPACING};mxArrowConnector.prototype.apply=function(a){mxShape.prototype.apply.apply(this,arguments);null!=this.style&&(this.startSize=3*mxUtils.getNumber(this.style,mxConstants.STYLE_STARTSIZE,mxConstants.ARROW_SIZE/5),this.endSize=3*mxUtils.getNumber(this.style,mxConstants.STYLE_ENDSIZE,mxConstants.ARROW_SIZE/5))};
 mxArrowConnector.prototype.augmentBoundingBox=function(a){mxShape.prototype.augmentBoundingBox.apply(this,arguments);var b=this.getEdgeWidth();this.isMarkerStart()&&(b=Math.max(b,this.getStartArrowWidth()));this.isMarkerEnd()&&(b=Math.max(b,this.getEndArrowWidth()));a.grow((b/2+this.strokewidth)*this.scale)};
 mxArrowConnector.prototype.paintEdgeShape=function(a,b){var c=this.strokewidth;this.outline&&(c=Math.max(1,mxUtils.getNumber(this.style,mxConstants.STYLE_STROKEWIDTH,this.strokewidth)));for(var d=this.getStartArrowWidth()+c,e=this.getEndArrowWidth()+c,f=this.outline?this.getEdgeWidth()+c:this.getEdgeWidth(),g=this.isOpenEnded(),h=this.isMarkerStart(),k=this.isMarkerEnd(),l=g?0:this.arrowSpacing+c/2,m=this.startSize+c,c=this.endSize+c,n=this.isArrowRounded(),p=b[b.length-1],r=1;r<b.length-1&&b[r].x==
-b[0].x&&b[r].y==b[0].y;)r++;var q=b[r].x-b[0].x,r=b[r].y-b[0].y,t=Math.sqrt(q*q+r*r);if(0!=t){var y=q/t,x,w=y,z=r/t,u,F=z,t=f*z,E=-f*y,D=[];n?a.setLineJoin("round"):2<b.length&&a.setMiterLimit(1.42);a.begin();q=y;r=z;if(h&&!g)this.paintMarker(a,b[0].x,b[0].y,y,z,m,d,f,l,!0);else{x=b[0].x+t/2+l*y;u=b[0].y+E/2+l*z;var C=b[0].x-t/2+l*y,G=b[0].y-E/2+l*z;g?(a.moveTo(x,u),D.push(function(){a.lineTo(C,G)})):(a.moveTo(C,G),a.lineTo(x,u))}for(var B=u=x=0,t=0;t<b.length-2;t++)if(E=mxUtils.relativeCcw(b[t].x,
-b[t].y,b[t+1].x,b[t+1].y,b[t+2].x,b[t+2].y),x=b[t+2].x-b[t+1].x,u=b[t+2].y-b[t+1].y,B=Math.sqrt(x*x+u*u),0!=B&&(w=x/B,F=u/B,tmp=Math.max(Math.sqrt((y*w+z*F+1)/2),.04),x=y+w,u=z+F,B=Math.sqrt(x*x+u*u),0!=B)){x/=B;u/=B;var B=Math.max(tmp,Math.min(this.strokewidth/200+.04,.35)),B=0!=E&&n?Math.max(.1,B):Math.max(tmp,.06),M=b[t+1].x+u*f/2/B,K=b[t+1].y-x*f/2/B;u=b[t+1].x-u*f/2/B;x=b[t+1].y+x*f/2/B;0!=E&&n?-1==E?(E=u+F*f,B=x-w*f,a.lineTo(u+z*f,x-y*f),a.quadTo(M,K,E,B),function(b,c){D.push(function(){a.lineTo(b,
-c)})}(u,x)):(a.lineTo(M,K),function(b,c){var d=M-z*f,e=K+y*f,g=M-F*f,h=K+w*f;D.push(function(){a.quadTo(b,c,d,e)});D.push(function(){a.lineTo(g,h)})}(u,x)):(a.lineTo(M,K),function(b,c){D.push(function(){a.lineTo(b,c)})}(u,x));y=w;z=F}t=f*F;E=-f*w;if(k&&!g)this.paintMarker(a,p.x,p.y,-y,-z,c,e,f,l,!1);else{a.lineTo(p.x-l*w+t/2,p.y-l*F+E/2);var L=p.x-l*w-t/2,V=p.y-l*F-E/2;g?(a.moveTo(L,V),D.splice(0,0,function(){a.moveTo(L,V)})):a.lineTo(L,V)}for(t=D.length-1;0<=t;t--)D[t]();g?(a.end(),a.stroke()):(a.close(),
-a.fillAndStroke());a.setShadow(!1);a.setMiterLimit(4);n&&a.setLineJoin("flat");2<b.length&&(a.setMiterLimit(4),h&&!g&&(a.begin(),this.paintMarker(a,b[0].x,b[0].y,q,r,m,d,f,l,!0),a.stroke(),a.end()),k&&!g&&(a.begin(),this.paintMarker(a,p.x,p.y,-y,-z,c,e,f,l,!0),a.stroke(),a.end()))}};
+b[0].x&&b[r].y==b[0].y;)r++;var q=b[r].x-b[0].x,r=b[r].y-b[0].y,t=Math.sqrt(q*q+r*r);if(0!=t){var z=q/t,w,x=z,y=r/t,u,D=y,t=f*y,F=-f*z,E=[];n?a.setLineJoin("round"):2<b.length&&a.setMiterLimit(1.42);a.begin();q=z;r=y;if(h&&!g)this.paintMarker(a,b[0].x,b[0].y,z,y,m,d,f,l,!0);else{w=b[0].x+t/2+l*z;u=b[0].y+F/2+l*y;var C=b[0].x-t/2+l*z,G=b[0].y-F/2+l*y;g?(a.moveTo(w,u),E.push(function(){a.lineTo(C,G)})):(a.moveTo(C,G),a.lineTo(w,u))}for(var B=u=w=0,t=0;t<b.length-2;t++)if(F=mxUtils.relativeCcw(b[t].x,
+b[t].y,b[t+1].x,b[t+1].y,b[t+2].x,b[t+2].y),w=b[t+2].x-b[t+1].x,u=b[t+2].y-b[t+1].y,B=Math.sqrt(w*w+u*u),0!=B&&(x=w/B,D=u/B,tmp=Math.max(Math.sqrt((z*x+y*D+1)/2),.04),w=z+x,u=y+D,B=Math.sqrt(w*w+u*u),0!=B)){w/=B;u/=B;var B=Math.max(tmp,Math.min(this.strokewidth/200+.04,.35)),B=0!=F&&n?Math.max(.1,B):Math.max(tmp,.06),M=b[t+1].x+u*f/2/B,L=b[t+1].y-w*f/2/B;u=b[t+1].x-u*f/2/B;w=b[t+1].y+w*f/2/B;0!=F&&n?-1==F?(F=u+D*f,B=w-x*f,a.lineTo(u+y*f,w-z*f),a.quadTo(M,L,F,B),function(b,c){E.push(function(){a.lineTo(b,
+c)})}(u,w)):(a.lineTo(M,L),function(b,c){var d=M-y*f,e=L+z*f,g=M-D*f,h=L+x*f;E.push(function(){a.quadTo(b,c,d,e)});E.push(function(){a.lineTo(g,h)})}(u,w)):(a.lineTo(M,L),function(b,c){E.push(function(){a.lineTo(b,c)})}(u,w));z=x;y=D}t=f*D;F=-f*x;if(k&&!g)this.paintMarker(a,p.x,p.y,-z,-y,c,e,f,l,!1);else{a.lineTo(p.x-l*x+t/2,p.y-l*D+F/2);var H=p.x-l*x-t/2,U=p.y-l*D-F/2;g?(a.moveTo(H,U),E.splice(0,0,function(){a.moveTo(H,U)})):a.lineTo(H,U)}for(t=E.length-1;0<=t;t--)E[t]();g?(a.end(),a.stroke()):(a.close(),
+a.fillAndStroke());a.setShadow(!1);a.setMiterLimit(4);n&&a.setLineJoin("flat");2<b.length&&(a.setMiterLimit(4),h&&!g&&(a.begin(),this.paintMarker(a,b[0].x,b[0].y,q,r,m,d,f,l,!0),a.stroke(),a.end()),k&&!g&&(a.begin(),this.paintMarker(a,p.x,p.y,-z,-y,c,e,f,l,!0),a.stroke(),a.end()))}};
 mxArrowConnector.prototype.paintMarker=function(a,b,c,d,e,f,g,h,k,l){g=h/g;var m=h*e/2;h=-h*d/2;var n=(k+f)*d;f=(k+f)*e;l?a.moveTo(b-m+n,c-h+f):a.lineTo(b-m+n,c-h+f);a.lineTo(b-m/g+n,c-h/g+f);a.lineTo(b+k*d,c+k*e);a.lineTo(b+m/g+n,c+h/g+f);a.lineTo(b+m+n,c+h+f)};mxArrowConnector.prototype.isArrowRounded=function(){return this.isRounded};mxArrowConnector.prototype.getStartArrowWidth=function(){return mxConstants.ARROW_WIDTH};mxArrowConnector.prototype.getEndArrowWidth=function(){return mxConstants.ARROW_WIDTH};
 mxArrowConnector.prototype.getEdgeWidth=function(){return mxConstants.ARROW_WIDTH/3};mxArrowConnector.prototype.isOpenEnded=function(){return!1};mxArrowConnector.prototype.isMarkerStart=function(){return mxUtils.getValue(this.style,mxConstants.STYLE_STARTARROW,mxConstants.NONE)!=mxConstants.NONE};mxArrowConnector.prototype.isMarkerEnd=function(){return mxUtils.getValue(this.style,mxConstants.STYLE_ENDARROW,mxConstants.NONE)!=mxConstants.NONE};
-function mxText(a,b,c,d,e,f,g,h,k,l,m,n,p,r,q,t,y,x,w,z,u){mxShape.call(this);this.value=a;this.bounds=b;this.color=null!=e?e:"black";this.align=null!=c?c:mxConstants.ALIGN_CENTER;this.valign=null!=d?d:mxConstants.ALIGN_MIDDLE;this.family=null!=f?f:mxConstants.DEFAULT_FONTFAMILY;this.size=null!=g?g:mxConstants.DEFAULT_FONTSIZE;this.fontStyle=null!=h?h:mxConstants.DEFAULT_FONTSTYLE;this.spacing=parseInt(k||2);this.spacingTop=this.spacing+parseInt(l||0);this.spacingRight=this.spacing+parseInt(m||0);
-this.spacingBottom=this.spacing+parseInt(n||0);this.spacingLeft=this.spacing+parseInt(p||0);this.horizontal=null!=r?r:!0;this.background=q;this.border=t;this.wrap=null!=y?y:!1;this.clipped=null!=x?x:!1;this.overflow=null!=w?w:"visible";this.labelPadding=null!=z?z:0;this.textDirection=u;this.rotation=0;this.updateMargin()}mxUtils.extend(mxText,mxShape);mxText.prototype.baseSpacingTop=0;mxText.prototype.baseSpacingBottom=0;mxText.prototype.baseSpacingLeft=0;mxText.prototype.baseSpacingRight=0;
+function mxText(a,b,c,d,e,f,g,h,k,l,m,n,p,r,q,t,z,w,x,y,u){mxShape.call(this);this.value=a;this.bounds=b;this.color=null!=e?e:"black";this.align=null!=c?c:mxConstants.ALIGN_CENTER;this.valign=null!=d?d:mxConstants.ALIGN_MIDDLE;this.family=null!=f?f:mxConstants.DEFAULT_FONTFAMILY;this.size=null!=g?g:mxConstants.DEFAULT_FONTSIZE;this.fontStyle=null!=h?h:mxConstants.DEFAULT_FONTSTYLE;this.spacing=parseInt(k||2);this.spacingTop=this.spacing+parseInt(l||0);this.spacingRight=this.spacing+parseInt(m||0);
+this.spacingBottom=this.spacing+parseInt(n||0);this.spacingLeft=this.spacing+parseInt(p||0);this.horizontal=null!=r?r:!0;this.background=q;this.border=t;this.wrap=null!=z?z:!1;this.clipped=null!=w?w:!1;this.overflow=null!=x?x:"visible";this.labelPadding=null!=y?y:0;this.textDirection=u;this.rotation=0;this.updateMargin()}mxUtils.extend(mxText,mxShape);mxText.prototype.baseSpacingTop=0;mxText.prototype.baseSpacingBottom=0;mxText.prototype.baseSpacingLeft=0;mxText.prototype.baseSpacingRight=0;
 mxText.prototype.replaceLinefeeds=!0;mxText.prototype.verticalTextRotation=-90;mxText.prototype.ignoreClippedStringSize=!0;mxText.prototype.ignoreStringSize=!1;mxText.prototype.textWidthPadding=8!=document.documentMode||mxClient.IS_EM?3:4;mxText.prototype.lastValue=null;mxText.prototype.cacheEnabled=!0;mxText.prototype.isParseVml=function(){return!1};mxText.prototype.isHtmlAllowed=function(){return 8!=document.documentMode||mxClient.IS_EM};mxText.prototype.getSvgScreenOffset=function(){return 0};
 mxText.prototype.checkBounds=function(){return!isNaN(this.scale)&&isFinite(this.scale)&&0<this.scale&&null!=this.bounds&&!isNaN(this.bounds.x)&&!isNaN(this.bounds.y)&&!isNaN(this.bounds.width)&&!isNaN(this.bounds.height)};
 mxText.prototype.paint=function(a,b){var c=this.scale,d=this.bounds.x/c,e=this.bounds.y/c,f=this.bounds.width/c,c=this.bounds.height/c;this.updateTransform(a,d,e,f,c);this.configureCanvas(a,d,e,f,c);var g=null!=this.state?this.state.unscaledWidth:null;if(b)null==this.node.firstChild||null!=g&&this.lastUnscaledWidth==g||a.invalidateCachedOffsetSize(this.node),a.updateText(d,e,f,c,this.align,this.valign,this.wrap,this.overflow,this.clipped,this.getTextRotation(),this.node);else{var h=mxUtils.isNode(this.value)||
@@ -627,7 +627,7 @@ mxStackLayout.prototype.moveCell=function(a,b,c){var d=this.graph.getModel(),e=d
 mxStackLayout.prototype.getParentSize=function(a){var b=this.graph.getModel(),c=b.getGeometry(a);null!=this.graph.container&&(null==c&&b.isLayer(a)||a==this.graph.getView().currentRoot)&&(c=new mxRectangle(0,0,this.graph.container.offsetWidth-1,this.graph.container.offsetHeight-1));return c};
 mxStackLayout.prototype.execute=function(a){if(null!=a){var b=this.getParentSize(a),c=this.isHorizontal(),d=this.graph.getModel(),e=null;null!=b&&(e=c?b.height-this.marginTop-this.marginBottom:b.width-this.marginLeft-this.marginRight);var e=e-(2*this.spacing+2*this.border),f=this.x0+this.border+this.marginLeft,g=this.y0+this.border+this.marginTop;if(this.graph.isSwimlane(a)){var h=this.graph.getCellStyle(a),k=mxUtils.getNumber(h,mxConstants.STYLE_STARTSIZE,mxConstants.DEFAULT_STARTSIZE),h=1==mxUtils.getValue(h,
 mxConstants.STYLE_HORIZONTAL,!0);null!=b&&(k=h?Math.min(k,b.height):Math.min(k,b.width));c==h&&(e-=k);h?g+=k:f+=k}d.beginUpdate();try{for(var k=0,h=null,l=0,m=null,n=d.getChildCount(a),p=0;p<n;p++){var r=d.getChildAt(a,p);if(!this.isVertexIgnored(r)&&this.isVertexMovable(r)){var q=d.getGeometry(r);if(null!=q){q=q.clone();null!=this.wrap&&null!=h&&(c&&h.x+h.width+q.width+2*this.spacing>this.wrap||!c&&h.y+h.height+q.height+2*this.spacing>this.wrap)&&(h=null,c?g+=k+this.spacing:f+=k+this.spacing,k=0);
-var k=Math.max(k,c?q.height:q.width),t=0;if(!this.borderCollapse)var y=this.graph.getCellStyle(r),t=mxUtils.getNumber(y,mxConstants.STYLE_STROKEWIDTH,1);null!=h?c?q.x=l+this.spacing+Math.floor(t/2):q.y=l+this.spacing+Math.floor(t/2):this.keepFirstLocation||(c?q.x=f:q.y=g);c?q.y=g:q.x=f;this.fill&&null!=e&&(c?q.height=e:q.width=e);this.setChildGeometry(r,q);m=r;h=q;l=c?h.x+h.width+Math.floor(t/2):h.y+h.height+Math.floor(t/2)}}}this.resizeParent&&null!=b&&null!=h&&!this.graph.isCellCollapsed(a)?this.updateParentGeometry(a,
+var k=Math.max(k,c?q.height:q.width),t=0;if(!this.borderCollapse)var z=this.graph.getCellStyle(r),t=mxUtils.getNumber(z,mxConstants.STYLE_STROKEWIDTH,1);null!=h?c?q.x=l+this.spacing+Math.floor(t/2):q.y=l+this.spacing+Math.floor(t/2):this.keepFirstLocation||(c?q.x=f:q.y=g);c?q.y=g:q.x=f;this.fill&&null!=e&&(c?q.height=e:q.width=e);this.setChildGeometry(r,q);m=r;h=q;l=c?h.x+h.width+Math.floor(t/2):h.y+h.height+Math.floor(t/2)}}}this.resizeParent&&null!=b&&null!=h&&!this.graph.isCellCollapsed(a)?this.updateParentGeometry(a,
 b,h):this.resizeLast&&null!=b&&null!=h&&null!=m&&(c?h.width=b.width-h.x-this.spacing-this.marginRight-this.marginLeft:h.height=b.height-h.y-this.spacing-this.marginBottom,this.setChildGeometry(m,h))}finally{d.endUpdate()}}};mxStackLayout.prototype.setChildGeometry=function(a,b){var c=this.graph.getCellGeometry(a);null!=c&&b.x==c.x&&b.y==c.y&&b.width==c.width&&b.height==c.height||this.graph.getModel().setGeometry(a,b)};
 mxStackLayout.prototype.updateParentGeometry=function(a,b,c){var d=this.isHorizontal(),e=this.graph.getModel(),f=b.clone();d?(c=c.x+c.width+this.spacing+this.marginRight,f.width=this.resizeParentMax?Math.max(f.width,c):c):(c=c.y+c.height+this.spacing+this.marginBottom,f.height=this.resizeParentMax?Math.max(f.height,c):c);b.x==f.x&&b.y==f.y&&b.width==f.width&&b.height==f.height||e.setGeometry(a,f)};
 function mxPartitionLayout(a,b,c,d){mxGraphLayout.call(this,a);this.horizontal=null!=b?b:!0;this.spacing=c||0;this.border=d||0}mxPartitionLayout.prototype=new mxGraphLayout;mxPartitionLayout.prototype.constructor=mxPartitionLayout;mxPartitionLayout.prototype.horizontal=null;mxPartitionLayout.prototype.spacing=null;mxPartitionLayout.prototype.border=null;mxPartitionLayout.prototype.resizeVertices=!0;mxPartitionLayout.prototype.isHorizontal=function(){return this.horizontal};
@@ -730,9 +730,9 @@ mxMedianHybridCrossingReduction.prototype.execute=function(a){a=this.layout.getM
 h}else for(c++,e=0;e<this.nestedBestRanks.length;e++)for(f=a.ranks[e],g=0;g<f.length;g++)h=f[g],h.setGeneralPurposeVariable(e,g);if(0==d)break}c=[];d=[];for(b=0;b<a.maxRank+1;b++)d[b]=[],c[b]=d[b];for(b=0;b<this.nestedBestRanks.length;b++)for(e=0;e<this.nestedBestRanks[b].length;e++)d[b].push(this.nestedBestRanks[b][e]);a.ranks=c};mxMedianHybridCrossingReduction.prototype.calculateCrossings=function(a){for(var b=a.ranks.length,c=0,d=1;d<b;d++)c+=this.calculateRankCrossing(d,a);return c};
 mxMedianHybridCrossingReduction.prototype.calculateRankCrossing=function(a,b){for(var c=0,d=b.ranks[a],e=b.ranks[a-1],f=[],g=0;g<d.length;g++){for(var h=d[g],k=h.getGeneralPurposeVariable(a),h=h.getPreviousLayerConnectedCells(a),l=[],m=0;m<h.length;m++){var n=h[m].getGeneralPurposeVariable(a-1);l.push(n)}l.sort(function(a,b){return a-b});f[k]=l}d=[];for(g=0;g<f.length;g++)d=d.concat(f[g]);for(f=1;f<e.length;)f<<=1;k=2*f-1;--f;e=[];for(g=0;g<k;++g)e[g]=0;for(g=0;g<d.length;g++)for(k=d[g]+f,++e[k];0<
 k;)k%2&&(c+=e[k+1]),k=k-1>>1,++e[k];return c};
-mxMedianHybridCrossingReduction.prototype.transpose=function(a,b){for(var c=!0,d=0;c&&10>d++;)for(var e=1==a%2&&1==d%2,c=!1,f=0;f<b.ranks.length;f++){for(var g=b.ranks[f],h=[],k=0;k<g.length;k++){var l=g[k],m=l.getGeneralPurposeVariable(f);0>m&&(m=k);h[m]=l}for(var n=null,p=null,r,q,t=null,y=null,x,w=null,k=0;k<g.length-1;k++){if(0==k){x=h[k];l=x.getNextLayerConnectedCells(f);m=x.getPreviousLayerConnectedCells(f);r=[];q=[];for(var z=0;z<l.length;z++)r[z]=l[z].getGeneralPurposeVariable(f+1);for(z=
-0;z<m.length;z++)q[z]=m[z].getGeneralPurposeVariable(f-1)}else l=n,m=p,r=t,q=y,x=w;w=h[k+1];n=w.getNextLayerConnectedCells(f);p=w.getPreviousLayerConnectedCells(f);t=[];y=[];for(z=0;z<n.length;z++)t[z]=n[z].getGeneralPurposeVariable(f+1);for(z=0;z<p.length;z++)y[z]=p[z].getGeneralPurposeVariable(f-1);for(var u=0,F=0,z=0;z<r.length;z++)for(var E=0;E<t.length;E++)r[z]>t[E]&&u++,r[z]<t[E]&&F++;for(z=0;z<q.length;z++)for(E=0;E<y.length;E++)q[z]>y[E]&&u++,q[z]<y[E]&&F++;if(F<u||F==u&&e)n=x.getGeneralPurposeVariable(f),
-x.setGeneralPurposeVariable(f,w.getGeneralPurposeVariable(f)),w.setGeneralPurposeVariable(f,n),n=l,p=m,t=r,y=q,w=x,e||(c=!0)}}};mxMedianHybridCrossingReduction.prototype.weightedMedian=function(a,b){var c=0==a%2;if(c)for(var d=b.maxRank-1;0<=d;d--)this.medianRank(d,c);else for(d=1;d<b.maxRank;d++)this.medianRank(d,c)};
+mxMedianHybridCrossingReduction.prototype.transpose=function(a,b){for(var c=!0,d=0;c&&10>d++;)for(var e=1==a%2&&1==d%2,c=!1,f=0;f<b.ranks.length;f++){for(var g=b.ranks[f],h=[],k=0;k<g.length;k++){var l=g[k],m=l.getGeneralPurposeVariable(f);0>m&&(m=k);h[m]=l}for(var n=null,p=null,r,q,t=null,z=null,w,x=null,k=0;k<g.length-1;k++){if(0==k){w=h[k];l=w.getNextLayerConnectedCells(f);m=w.getPreviousLayerConnectedCells(f);r=[];q=[];for(var y=0;y<l.length;y++)r[y]=l[y].getGeneralPurposeVariable(f+1);for(y=
+0;y<m.length;y++)q[y]=m[y].getGeneralPurposeVariable(f-1)}else l=n,m=p,r=t,q=z,w=x;x=h[k+1];n=x.getNextLayerConnectedCells(f);p=x.getPreviousLayerConnectedCells(f);t=[];z=[];for(y=0;y<n.length;y++)t[y]=n[y].getGeneralPurposeVariable(f+1);for(y=0;y<p.length;y++)z[y]=p[y].getGeneralPurposeVariable(f-1);for(var u=0,D=0,y=0;y<r.length;y++)for(var F=0;F<t.length;F++)r[y]>t[F]&&u++,r[y]<t[F]&&D++;for(y=0;y<q.length;y++)for(F=0;F<z.length;F++)q[y]>z[F]&&u++,q[y]<z[F]&&D++;if(D<u||D==u&&e)n=w.getGeneralPurposeVariable(f),
+w.setGeneralPurposeVariable(f,x.getGeneralPurposeVariable(f)),x.setGeneralPurposeVariable(f,n),n=l,p=m,t=r,z=q,x=w,e||(c=!0)}}};mxMedianHybridCrossingReduction.prototype.weightedMedian=function(a,b){var c=0==a%2;if(c)for(var d=b.maxRank-1;0<=d;d--)this.medianRank(d,c);else for(d=1;d<b.maxRank;d++)this.medianRank(d,c)};
 mxMedianHybridCrossingReduction.prototype.medianRank=function(a,b){for(var c=this.nestedBestRanks[a].length,d=[],e=[],f=0;f<c;f++){var g=this.nestedBestRanks[a][f],h=new MedianCellSorter;h.cell=g;var k;k=b?g.getNextLayerConnectedCells(a):g.getPreviousLayerConnectedCells(a);var l;l=b?a+1:a-1;null!=k&&0!=k.length?(h.medianValue=this.medianValue(k,l),d.push(h)):e[g.getGeneralPurposeVariable(a)]=!0}d.sort(MedianCellSorter.prototype.compare);for(f=0;f<c;f++)null==e[f]&&(g=d.shift().cell,g.setGeneralPurposeVariable(a,
 f))};mxMedianHybridCrossingReduction.prototype.medianValue=function(a,b){for(var c=[],d=0,e=0;e<a.length;e++){var f=a[e];c[d++]=f.getGeneralPurposeVariable(b)}c.sort(function(a,b){return a-b});if(1==d%2)return c[Math.floor(d/2)];if(2==d)return(c[0]+c[1])/2;e=d/2;f=c[e-1]-c[0];d=c[d-1]-c[e];return(c[e-1]*d+c[e]*f)/(f+d)};function MedianCellSorter(){}MedianCellSorter.prototype.medianValue=0;MedianCellSorter.prototype.cell=!1;
 MedianCellSorter.prototype.compare=function(a,b){return null!=a&&null!=b?b.medianValue>a.medianValue?-1:b.medianValue<a.medianValue?1:0:0};function mxMinimumCycleRemover(a){this.layout=a}mxMinimumCycleRemover.prototype=new mxHierarchicalLayoutStage;mxMinimumCycleRemover.prototype.constructor=mxMinimumCycleRemover;mxMinimumCycleRemover.prototype.layout=null;
@@ -745,8 +745,8 @@ mxCoordinateAssignment.prototype.printStatus=function(){var a=this.layout.getMod
 mxCoordinateAssignment.prototype.execute=function(a){this.jettyPositions={};a=this.layout.getModel();this.currentXDelta=0;this.initialCoords(this.layout.getGraph(),a);this.fineTuning&&this.minNode(a);var b=1E8;if(this.fineTuning)for(var c=0;c<this.maxIterations;c++){0!=c&&(this.medianPos(c,a),this.minNode(a));if(this.currentXDelta<b){for(var d=0;d<a.ranks.length;d++)for(var e=a.ranks[d],f=0;f<e.length;f++){var g=e[f];g.setX(d,g.getGeneralPurposeVariable(d))}b=this.currentXDelta}else for(d=0;d<a.ranks.length;d++)for(e=
 a.ranks[d],f=0;f<e.length;f++)g=e[f],g.setGeneralPurposeVariable(d,g.getX(d));this.minPath(this.layout.getGraph(),a);this.currentXDelta=0}this.setCellLocations(this.layout.getGraph(),a)};
 mxCoordinateAssignment.prototype.minNode=function(a){for(var b=[],c=new mxDictionary,d=[],e=0;e<=a.maxRank;e++){d[e]=a.ranks[e];for(var f=0;f<d[e].length;f++){var g=d[e][f],h=new WeightedCellSorter(g,e);h.rankIndex=f;h.visited=!0;b.push(h);c.put(g,h)}}a=10*b.length;for(f=0;0<b.length&&f<=a;){var g=b.shift(),e=g.cell,k=g.weightedValue,l=parseInt(g.rankIndex),h=e.getNextLayerConnectedCells(k),m=e.getPreviousLayerConnectedCells(k),n=h.length,p=m.length,r=this.medianXValue(h,k+1),q=this.medianXValue(m,
-k-1),t=n+p,y=e.getGeneralPurposeVariable(k),x=y;0<t&&(x=(r*n+q*p)/t);n=!1;x<y-1?0==l?(e.setGeneralPurposeVariable(k,x),n=!0):(l=d[k][l-1],y=l.getGeneralPurposeVariable(k),y=y+l.width/2+this.intraCellSpacing+e.width/2,y<x?(e.setGeneralPurposeVariable(k,x),n=!0):y<e.getGeneralPurposeVariable(k)-1&&(e.setGeneralPurposeVariable(k,y),n=!0)):x>y+1&&(l==d[k].length-1?(e.setGeneralPurposeVariable(k,x),n=!0):(l=d[k][l+1],y=l.getGeneralPurposeVariable(k),y=y-l.width/2-this.intraCellSpacing-e.width/2,y>x?(e.setGeneralPurposeVariable(k,
-x),n=!0):y>e.getGeneralPurposeVariable(k)+1&&(e.setGeneralPurposeVariable(k,y),n=!0)));if(n){for(e=0;e<h.length;e++)k=h[e],k=c.get(k),null!=k&&0==k.visited&&(k.visited=!0,b.push(k));for(e=0;e<m.length;e++)k=m[e],k=c.get(k),null!=k&&0==k.visited&&(k.visited=!0,b.push(k))}g.visited=!1;f++}};mxCoordinateAssignment.prototype.medianPos=function(a,b){if(0==a%2)for(var c=b.maxRank;0<c;c--)this.rankMedianPosition(c-1,b,c);else for(c=0;c<b.maxRank-1;c++)this.rankMedianPosition(c+1,b,c)};
+k-1),t=n+p,z=e.getGeneralPurposeVariable(k),w=z;0<t&&(w=(r*n+q*p)/t);n=!1;w<z-1?0==l?(e.setGeneralPurposeVariable(k,w),n=!0):(l=d[k][l-1],z=l.getGeneralPurposeVariable(k),z=z+l.width/2+this.intraCellSpacing+e.width/2,z<w?(e.setGeneralPurposeVariable(k,w),n=!0):z<e.getGeneralPurposeVariable(k)-1&&(e.setGeneralPurposeVariable(k,z),n=!0)):w>z+1&&(l==d[k].length-1?(e.setGeneralPurposeVariable(k,w),n=!0):(l=d[k][l+1],z=l.getGeneralPurposeVariable(k),z=z-l.width/2-this.intraCellSpacing-e.width/2,z>w?(e.setGeneralPurposeVariable(k,
+w),n=!0):z>e.getGeneralPurposeVariable(k)+1&&(e.setGeneralPurposeVariable(k,z),n=!0)));if(n){for(e=0;e<h.length;e++)k=h[e],k=c.get(k),null!=k&&0==k.visited&&(k.visited=!0,b.push(k));for(e=0;e<m.length;e++)k=m[e],k=c.get(k),null!=k&&0==k.visited&&(k.visited=!0,b.push(k))}g.visited=!1;f++}};mxCoordinateAssignment.prototype.medianPos=function(a,b){if(0==a%2)for(var c=b.maxRank;0<c;c--)this.rankMedianPosition(c-1,b,c);else for(c=0;c<b.maxRank-1;c++)this.rankMedianPosition(c+1,b,c)};
 mxCoordinateAssignment.prototype.rankMedianPosition=function(a,b,c){b=b.ranks[a];for(var d=[],e={},f=0;f<b.length;f++){var g=b[f];d[f]=new WeightedCellSorter;d[f].cell=g;d[f].rankIndex=f;e[g.id]=d[f];var h;h=c<a?g.getPreviousLayerConnectedCells(a):g.getNextLayerConnectedCells(a);d[f].weightedValue=this.calculatedWeightedValue(g,h)}d.sort(WeightedCellSorter.prototype.compare);for(f=0;f<d.length;f++){var k,g=d[f].cell;k=0;h=c<a?g.getPreviousLayerConnectedCells(a).slice():g.getNextLayerConnectedCells(a).slice();
 null!=h&&(k=h.length,k=0<k?this.medianXValue(h,c):g.getGeneralPurposeVariable(a));var l=0;h=-1E8;for(var m=d[f].rankIndex-1;0<=m;){var n=e[b[m].id];if(null!=n){var p=n.cell;n.visited?(h=p.getGeneralPurposeVariable(a)+p.width/2+this.intraCellSpacing+l+g.width/2,m=-1):(l+=p.width+this.intraCellSpacing,m--)}}l=0;p=1E8;for(m=d[f].rankIndex+1;m<d.length;)if(n=e[b[m].id],null!=n){var r=n.cell;n.visited?(p=r.getGeneralPurposeVariable(a)-r.width/2-this.intraCellSpacing-l-g.width/2,m=d.length):(l+=r.width+
 this.intraCellSpacing,m++)}k>=h&&k<=p?g.setGeneralPurposeVariable(a,k):k<h?(g.setGeneralPurposeVariable(a,h),this.currentXDelta+=h-k):k>p&&(g.setGeneralPurposeVariable(a,p),this.currentXDelta+=k-p);d[f].visited=!0}};mxCoordinateAssignment.prototype.calculatedWeightedValue=function(a,b){for(var c=0,d=0;d<b.length;d++){var e=b[d];a.isVertex()&&e.isVertex()?c++:c=a.isEdge()&&e.isEdge()?c+8:c+2}return c};
@@ -766,10 +766,10 @@ mxCoordinateAssignment.prototype.localEdgeProcessing=function(a){for(var b=0;b<a
 q;if(r.isVertex()){q=0==h?e.connectsAsSource:e.connectsAsTarget;for(var t=0;t<q.length;t++)if(q[t].source==r||q[t].target==r)f+=q[t].edges.length,p++,g.push(q[t])}else f+=r.edges.length,p++,g.push(r)}e.width>(f+1)*this.prefHozEdgeSep+2*this.prefHozEdgeSep&&(m+=this.prefHozEdgeSep,n-=this.prefHozEdgeSep);k=(n-m)/f;m+=k/2;n=this.minEdgeJetty-this.prefVertEdgeOff;for(l=0;l<g.length;l++)for(p=g[l].edges.length,r=this.jettyPositions[g[l].ids[0]],null==r&&(r=[],this.jettyPositions[g[l].ids[0]]=r),l<f/2?
 n+=this.prefVertEdgeOff:l>f/2&&(n-=this.prefVertEdgeOff),q=0;q<p;q++)r[4*q+2*h]=m,m+=k,r[4*q+2*h+1]=n}f=e.getNextLayerConnectedCells(b);g=b+1}}};
 mxCoordinateAssignment.prototype.setEdgePosition=function(a){var b=0;if(101207!=a.temp[0]){var c=a.maxRank,d=a.minRank;c==d&&(c=a.source.maxRank,d=a.target.minRank);for(var e=0,f=this.jettyPositions[a.ids[0]],g=a.isReversed?a.target.cell:a.source.cell,h=this.layout.graph,k=this.orientation==mxConstants.DIRECTION_EAST||this.orientation==mxConstants.DIRECTION_SOUTH,l=0;l<a.edges.length;l++){var m=a.edges[l],n=this.layout.getVisibleTerminal(m,!0),p=[],r=a.isReversed;n!=g&&(r=!r);if(null!=f){var q=r?
-2:0,t=r?k?this.rankBottomY[d]:this.rankTopY[d]:k?this.rankTopY[c]:this.rankBottomY[c],y=f[4*e+1+q];r!=k&&(y=-y);var t=t+y,q=f[4*e+q],x=h.model.getTerminal(m,!0);this.layout.isPort(x)&&h.model.getParent(x)==n&&(q=h.view.getState(x),q=null!=q?q.x:n.geometry.x+a.source.width*x.geometry.x);this.orientation==mxConstants.DIRECTION_NORTH||this.orientation==mxConstants.DIRECTION_SOUTH?(p.push(new mxPoint(q,t)),this.layout.edgeStyle==mxHierarchicalEdgeStyle.CURVE&&p.push(new mxPoint(q,t+y))):(p.push(new mxPoint(t,
-q)),this.layout.edgeStyle==mxHierarchicalEdgeStyle.CURVE&&p.push(new mxPoint(t+y,q)))}q=a.x.length-1;t=y=-1;n=a.maxRank-1;r&&(q=0,y=a.x.length,t=1,n=a.minRank+1);for(;a.maxRank!=a.minRank&&q!=y;q+=t){var x=a.x[q]+b,w=(this.rankTopY[n]+this.rankBottomY[n+1])/2,z=(this.rankTopY[n-1]+this.rankBottomY[n])/2;if(r)var u=w,w=z,z=u;this.orientation==mxConstants.DIRECTION_NORTH||this.orientation==mxConstants.DIRECTION_SOUTH?(p.push(new mxPoint(x,w)),p.push(new mxPoint(x,z))):(p.push(new mxPoint(w,x)),p.push(new mxPoint(z,
-x)));this.limitX=Math.max(this.limitX,x);n+=t}null!=f&&(q=r?2:0,t=r?k?this.rankTopY[c]:this.rankBottomY[c]:k?this.rankBottomY[d]:this.rankTopY[d],y=f[4*e+3-q],r!=k&&(y=-y),t-=y,q=f[4*e+2-q],r=h.model.getTerminal(m,!1),n=this.layout.getVisibleTerminal(m,!1),this.layout.isPort(r)&&h.model.getParent(r)==n&&(q=h.view.getState(r),q=null!=q?q.x:n.geometry.x+a.target.width*r.geometry.x),this.orientation==mxConstants.DIRECTION_NORTH||this.orientation==mxConstants.DIRECTION_SOUTH?(this.layout.edgeStyle==mxHierarchicalEdgeStyle.CURVE&&
-p.push(new mxPoint(q,t-y)),p.push(new mxPoint(q,t))):(this.layout.edgeStyle==mxHierarchicalEdgeStyle.CURVE&&p.push(new mxPoint(t-y,q)),p.push(new mxPoint(t,q))));a.isReversed&&this.processReversedEdge(a,m);this.layout.setEdgePoints(m,p);b=0==b?this.parallelEdgeSpacing:0<b?-b:-b+this.parallelEdgeSpacing;e++}a.temp[0]=101207}};
+2:0,t=r?k?this.rankBottomY[d]:this.rankTopY[d]:k?this.rankTopY[c]:this.rankBottomY[c],z=f[4*e+1+q];r!=k&&(z=-z);var t=t+z,q=f[4*e+q],w=h.model.getTerminal(m,!0);this.layout.isPort(w)&&h.model.getParent(w)==n&&(q=h.view.getState(w),q=null!=q?q.x:n.geometry.x+a.source.width*w.geometry.x);this.orientation==mxConstants.DIRECTION_NORTH||this.orientation==mxConstants.DIRECTION_SOUTH?(p.push(new mxPoint(q,t)),this.layout.edgeStyle==mxHierarchicalEdgeStyle.CURVE&&p.push(new mxPoint(q,t+z))):(p.push(new mxPoint(t,
+q)),this.layout.edgeStyle==mxHierarchicalEdgeStyle.CURVE&&p.push(new mxPoint(t+z,q)))}q=a.x.length-1;t=z=-1;n=a.maxRank-1;r&&(q=0,z=a.x.length,t=1,n=a.minRank+1);for(;a.maxRank!=a.minRank&&q!=z;q+=t){var w=a.x[q]+b,x=(this.rankTopY[n]+this.rankBottomY[n+1])/2,y=(this.rankTopY[n-1]+this.rankBottomY[n])/2;if(r)var u=x,x=y,y=u;this.orientation==mxConstants.DIRECTION_NORTH||this.orientation==mxConstants.DIRECTION_SOUTH?(p.push(new mxPoint(w,x)),p.push(new mxPoint(w,y))):(p.push(new mxPoint(x,w)),p.push(new mxPoint(y,
+w)));this.limitX=Math.max(this.limitX,w);n+=t}null!=f&&(q=r?2:0,t=r?k?this.rankTopY[c]:this.rankBottomY[c]:k?this.rankBottomY[d]:this.rankTopY[d],z=f[4*e+3-q],r!=k&&(z=-z),t-=z,q=f[4*e+2-q],r=h.model.getTerminal(m,!1),n=this.layout.getVisibleTerminal(m,!1),this.layout.isPort(r)&&h.model.getParent(r)==n&&(q=h.view.getState(r),q=null!=q?q.x:n.geometry.x+a.target.width*r.geometry.x),this.orientation==mxConstants.DIRECTION_NORTH||this.orientation==mxConstants.DIRECTION_SOUTH?(this.layout.edgeStyle==mxHierarchicalEdgeStyle.CURVE&&
+p.push(new mxPoint(q,t-z)),p.push(new mxPoint(q,t))):(this.layout.edgeStyle==mxHierarchicalEdgeStyle.CURVE&&p.push(new mxPoint(t-z,q)),p.push(new mxPoint(t,q))));a.isReversed&&this.processReversedEdge(a,m);this.layout.setEdgePoints(m,p);b=0==b?this.parallelEdgeSpacing:0<b?-b:-b+this.parallelEdgeSpacing;e++}a.temp[0]=101207}};
 mxCoordinateAssignment.prototype.setVertexLocation=function(a){var b=a.cell,c=a.x[0]-a.width/2,d=a.y[0]-a.height/2;this.rankTopY[a.minRank]=Math.min(this.rankTopY[a.minRank],d);this.rankBottomY[a.minRank]=Math.max(this.rankBottomY[a.minRank],d+a.height);this.orientation==mxConstants.DIRECTION_NORTH||this.orientation==mxConstants.DIRECTION_SOUTH?this.layout.setVertexLocation(b,c,d):this.layout.setVertexLocation(b,d,c);this.limitX=Math.max(this.limitX,c+a.width)};
 mxCoordinateAssignment.prototype.processReversedEdge=function(a,b){};function WeightedCellSorter(a,b){this.cell=a;this.weightedValue=b}WeightedCellSorter.prototype.weightedValue=0;WeightedCellSorter.prototype.nudge=!1;WeightedCellSorter.prototype.visited=!1;WeightedCellSorter.prototype.rankIndex=null;WeightedCellSorter.prototype.cell=null;WeightedCellSorter.prototype.compare=function(a,b){return null!=a&&null!=b?b.weightedValue>a.weightedValue?-1:b.weightedValue<a.weightedValue?1:b.nudge?-1:1:0};
 function mxSwimlaneOrdering(a){this.layout=a}mxSwimlaneOrdering.prototype=new mxHierarchicalLayoutStage;mxSwimlaneOrdering.prototype.constructor=mxSwimlaneOrdering;mxSwimlaneOrdering.prototype.layout=null;
@@ -998,24 +998,24 @@ b.x=h.x,b.y=h.y);null!=g&&(c=new mxCellState,c.x=g.x,c.y=g.y);null!=b&&null!=c&&
 d.y)||mxUtils.contains(b,a,d.y)||e.push(new mxPoint(a,d.y)):(f=Math.max(b.y,c.y),e.push(new mxPoint(a,f+(Math.min(b.y+b.height,c.y+c.height)-f)/2)))))},TopToBottom:function(a,b,c,d,e){var f=a.view;d=null!=d&&0<d.length?d[0]:null;var g=a.absolutePoints,h=g[0],g=g[g.length-1];null!=d&&(d=f.transformControlPoint(a,d));null!=h&&(b=new mxCellState,b.x=h.x,b.y=h.y);null!=g&&(c=new mxCellState,c.x=g.x,c.y=g.y);null!=b&&null!=c&&(h=Math.max(b.y,c.y),g=Math.min(b.y+b.height,c.y+c.height),a=f.getRoutingCenterX(b),
 null!=d&&d.x>=b.x&&d.x<=b.x+b.width&&(a=d.x),h=null!=d?d.y:Math.round(g+(h-g)/2),mxUtils.contains(c,a,h)||mxUtils.contains(b,a,h)||e.push(new mxPoint(a,h)),a=null!=d&&d.x>=c.x&&d.x<=c.x+c.width?d.x:f.getRoutingCenterX(c),mxUtils.contains(c,a,h)||mxUtils.contains(b,a,h)||e.push(new mxPoint(a,h)),1==e.length&&(null!=d&&1==e.length?mxUtils.contains(c,d.x,h)||mxUtils.contains(b,d.x,h)||e.push(new mxPoint(d.x,h)):(f=Math.max(b.x,c.x),e.push(new mxPoint(f+(Math.min(b.x+b.width,c.x+c.width)-f)/2,h)))))},
 SegmentConnector:function(a,b,c,d,e){function f(a){if(null==k||Math.abs(k.x-a.x)>=h||Math.abs(k.y-a.y)>=h)e.push(a),k=a;return k}var g=a.absolutePoints,h=Math.max(1,a.view.scale),k=0<e.length?e[0]:null,l=!0,m=null,n=g[0];null==n&&null!=b?n=new mxPoint(a.view.getRoutingCenterX(b),a.view.getRoutingCenterY(b)):null!=n&&(n=n.clone());n.x=Math.round(n.x);n.y=Math.round(n.y);var p=g.length-1;if(null!=d&&0<d.length){for(var m=[],r=0;r<d.length;r++){var q=a.view.transformControlPoint(a,d[r]);null!=q&&(q.x=
-Math.round(q.x),q.y=Math.round(q.y),m.push(q))}if(0==m.length)return;d=m;null!=n&&null!=d[0]&&(Math.abs(d[0].x-n.x)<h&&(d[0].x=n.x),Math.abs(d[0].y-n.y)<h&&(d[0].y=n.y));q=g[p];null!=q&&null!=d[d.length-1]&&(Math.abs(d[d.length-1].x-q.x)<h&&(d[d.length-1].x=q.x),Math.abs(d[d.length-1].y-q.y)<h&&(d[d.length-1].y=q.y));var m=d[0],t=b,y=g[0],x=!1,w=!1,x=m;null!=y&&(y.x=Math.round(y.x),y.y=Math.round(y.y),t=null);for(r=0;2>r;r++){var z=null!=y&&y.x==x.x,u=null!=y&&y.y==x.y,F=null!=t&&x.y>=t.y&&x.y<=t.y+
-t.height,t=null!=t&&x.x>=t.x&&x.x<=t.x+t.width,x=u||null==y&&F,w=z||null==y&&t;if(0!=r||!(x&&w||z&&u)){if(null!=y&&!u&&!z&&(F||t)){l=F?!1:!0;break}if(w||x){l=x;1==r&&(l=0==d.length%2?x:w);break}}t=c;y=g[p];null!=y&&(y.x=Math.round(y.x),y.y=Math.round(y.y),t=null);x=d[d.length-1];z&&u&&(d=d.slice(1))}l&&(null!=g[0]&&g[0].y!=m.y||null==g[0]&&null!=b&&(m.y<b.y||m.y>b.y+b.height))?f(new mxPoint(n.x,m.y)):!l&&(null!=g[0]&&g[0].x!=m.x||null==g[0]&&null!=b&&(m.x<b.x||m.x>b.x+b.width))&&f(new mxPoint(m.x,
+Math.round(q.x),q.y=Math.round(q.y),m.push(q))}if(0==m.length)return;d=m;null!=n&&null!=d[0]&&(Math.abs(d[0].x-n.x)<h&&(d[0].x=n.x),Math.abs(d[0].y-n.y)<h&&(d[0].y=n.y));q=g[p];null!=q&&null!=d[d.length-1]&&(Math.abs(d[d.length-1].x-q.x)<h&&(d[d.length-1].x=q.x),Math.abs(d[d.length-1].y-q.y)<h&&(d[d.length-1].y=q.y));var m=d[0],t=b,z=g[0],w=!1,x=!1,w=m;null!=z&&(z.x=Math.round(z.x),z.y=Math.round(z.y),t=null);for(r=0;2>r;r++){var y=null!=z&&z.x==w.x,u=null!=z&&z.y==w.y,D=null!=t&&w.y>=t.y&&w.y<=t.y+
+t.height,t=null!=t&&w.x>=t.x&&w.x<=t.x+t.width,w=u||null==z&&D,x=y||null==z&&t;if(0!=r||!(w&&x||y&&u)){if(null!=z&&!u&&!y&&(D||t)){l=D?!1:!0;break}if(x||w){l=w;1==r&&(l=0==d.length%2?w:x);break}}t=c;z=g[p];null!=z&&(z.x=Math.round(z.x),z.y=Math.round(z.y),t=null);w=d[d.length-1];y&&u&&(d=d.slice(1))}l&&(null!=g[0]&&g[0].y!=m.y||null==g[0]&&null!=b&&(m.y<b.y||m.y>b.y+b.height))?f(new mxPoint(n.x,m.y)):!l&&(null!=g[0]&&g[0].x!=m.x||null==g[0]&&null!=b&&(m.x<b.x||m.x>b.x+b.width))&&f(new mxPoint(m.x,
 n.y));l?n.y=m.y:n.x=m.x;for(r=0;r<d.length;r++)l=!l,m=d[r],l?n.y=m.y:n.x=m.x,f(n.clone())}else m=n,l=!0;n=g[p];null==n&&null!=c&&(n=new mxPoint(a.view.getRoutingCenterX(c),a.view.getRoutingCenterY(c)));null!=n&&(n.x=Math.round(n.x),n.y=Math.round(n.y),null!=m&&(l&&(null!=g[p]&&g[p].y!=m.y||null==g[p]&&null!=c&&(m.y<c.y||m.y>c.y+c.height))?f(new mxPoint(n.x,m.y)):!l&&(null!=g[p]&&g[p].x!=m.x||null==g[p]&&null!=c&&(m.x<c.x||m.x>c.x+c.width))&&f(new mxPoint(m.x,n.y))));if(null==g[0]&&null!=b)for(;1<
 e.length&&null!=e[1]&&mxUtils.contains(b,e[1].x,e[1].y);)e.splice(1,1);if(null==g[p]&&null!=c)for(;1<e.length&&null!=e[e.length-1]&&mxUtils.contains(c,e[e.length-1].x,e[e.length-1].y);)e.splice(e.length-1,1);null!=q&&null!=e[e.length-1]&&Math.abs(q.x-e[e.length-1].x)<h&&Math.abs(q.y-e[e.length-1].y)<h&&(e.splice(e.length-1,1),null!=e[e.length-1]&&(Math.abs(e[e.length-1].x-q.x)<h&&(e[e.length-1].x=q.x),Math.abs(e[e.length-1].y-q.y)<h&&(e[e.length-1].y=q.y)))},orthBuffer:10,orthPointsFallback:!0,dirVectors:[[-1,
 0],[0,-1],[1,0],[0,1],[-1,0],[0,-1],[1,0]],wayPoints1:[[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0]],routePatterns:[[[513,2308,2081,2562],[513,1090,514,2184,2114,2561],[513,1090,514,2564,2184,2562],[513,2308,2561,1090,514,2568,2308]],[[514,1057,513,2308,2081,2562],[514,2184,2114,2561],[514,2184,2562,1057,513,2564,2184],[514,1057,513,2568,2308,2561]],[[1090,514,1057,513,2308,2081,2562],[2114,2561],[1090,2562,1057,513,2564,2184],[1090,514,1057,513,2308,2561,2568]],[[2081,
 2562],[1057,513,1090,514,2184,2114,2561],[1057,513,1090,514,2184,2562,2564],[1057,2561,1090,514,2568,2308]]],inlineRoutePatterns:[[null,[2114,2568],null,null],[null,[514,2081,2114,2568],null,null],[null,[2114,2561],null,null],[[2081,2562],[1057,2114,2568],[2184,2562],null]],vertexSeperations:[],limits:[[0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0]],LEFT_MASK:32,TOP_MASK:64,RIGHT_MASK:128,BOTTOM_MASK:256,LEFT:1,TOP:2,RIGHT:4,BOTTOM:8,SIDE_MASK:480,CENTER_MASK:512,SOURCE_MASK:1024,TARGET_MASK:2048,VERTEX_MASK:3072,
 getJettySize:function(a,b,c,d,e){b=mxUtils.getValue(a.style,e?mxConstants.STYLE_SOURCE_JETTY_SIZE:mxConstants.STYLE_TARGET_JETTY_SIZE,mxUtils.getValue(a.style,mxConstants.STYLE_JETTY_SIZE,mxEdgeStyle.orthBuffer));"auto"==b&&(mxUtils.getValue(a.style,e?mxConstants.STYLE_STARTARROW:mxConstants.STYLE_ENDARROW,mxConstants.NONE)!=mxConstants.NONE?(a=mxUtils.getNumber(a.style,e?mxConstants.STYLE_STARTSIZE:mxConstants.STYLE_ENDSIZE,mxConstants.DEFAULT_MARKERSIZE),b=Math.max(2,Math.ceil((a+mxEdgeStyle.orthBuffer)/
-mxEdgeStyle.orthBuffer))*mxEdgeStyle.orthBuffer):b=2*mxEdgeStyle.orthBuffer);return b},OrthConnector:function(a,b,c,d,e){var f=a.view.graph,g=null==b?!1:f.getModel().isEdge(b.cell),h=null==c?!1:f.getModel().isEdge(c.cell),f=a.absolutePoints,k=f[0],l=f[f.length-1],m=null!=b?b.x:k.x,n=null!=b?b.y:k.y,p=null!=b?b.width:0,r=null!=b?b.height:0,q=null!=c?c.x:l.x,t=null!=c?c.y:l.y,y=null!=c?c.width:0,x=null!=c?c.height:0,f=a.view.scale*mxEdgeStyle.getJettySize(a,b,c,d,!0),w=a.view.scale*mxEdgeStyle.getJettySize(a,
-b,c,d,!1);null!=b&&c==b&&(f=w=Math.max(f,w));var z=w+f,u=!1;if(null!=k&&null!=l)var u=l.x-k.x,F=l.y-k.y,u=u*u+F*F<z*z;if(u||mxEdgeStyle.orthPointsFallback&&null!=d&&0<d.length||g||h)mxEdgeStyle.SegmentConnector(a,b,c,d,e);else{d=[mxConstants.DIRECTION_MASK_ALL,mxConstants.DIRECTION_MASK_ALL];null!=b&&(d[0]=mxUtils.getPortConstraints(b,a,!0,mxConstants.DIRECTION_MASK_ALL),u=mxUtils.getValue(b.style,mxConstants.STYLE_ROTATION,0),0!=u&&(u=mxUtils.getBoundingBox(new mxRectangle(m,n,p,r),u),m=u.x,n=u.y,
-p=u.width,r=u.height));null!=c&&(d[1]=mxUtils.getPortConstraints(c,a,!1,mxConstants.DIRECTION_MASK_ALL),u=mxUtils.getValue(c.style,mxConstants.STYLE_ROTATION,0),0!=u&&(u=mxUtils.getBoundingBox(new mxRectangle(q,t,y,x),u),q=u.x,t=u.y,y=u.width,x=u.height));m=Math.round(10*m)/10;n=Math.round(10*n)/10;p=Math.round(10*p)/10;r=Math.round(10*r)/10;q=Math.round(10*q)/10;t=Math.round(10*t)/10;y=Math.round(10*y)/10;x=Math.round(10*x)/10;a=[0,0];m=[[m,n,p,r],[q,t,y,x]];w=[f,w];for(u=0;2>u;u++)mxEdgeStyle.limits[u][1]=
-m[u][0]-w[u],mxEdgeStyle.limits[u][2]=m[u][1]-w[u],mxEdgeStyle.limits[u][4]=m[u][0]+m[u][2]+w[u],mxEdgeStyle.limits[u][8]=m[u][1]+m[u][3]+w[u];w=m[0][1]+m[0][3]/2;n=m[1][1]+m[1][3]/2;u=m[0][0]+m[0][2]/2-(m[1][0]+m[1][2]/2);F=w-n;w=0;0>u?w=0>F?2:1:0>=F&&(w=3,0==u&&(w=2));n=null;null!=b&&(n=k);b=[[.5,.5],[.5,.5]];for(u=0;2>u;u++)null!=n&&(b[u][0]=(n.x-m[u][0])/m[u][2],1>=Math.abs(n.x-m[u][0])?a[u]=mxConstants.DIRECTION_MASK_WEST:1>=Math.abs(n.x-m[u][0]-m[u][2])&&(a[u]=mxConstants.DIRECTION_MASK_EAST),
-b[u][1]=(n.y-m[u][1])/m[u][3],1>=Math.abs(n.y-m[u][1])?a[u]=mxConstants.DIRECTION_MASK_NORTH:1>=Math.abs(n.y-m[u][1]-m[u][3])&&(a[u]=mxConstants.DIRECTION_MASK_SOUTH)),n=null,null!=c&&(n=l);u=m[0][1]-(m[1][1]+m[1][3]);l=m[0][0]-(m[1][0]+m[1][2]);n=m[1][1]-(m[0][1]+m[0][3]);p=m[1][0]-(m[0][0]+m[0][2]);mxEdgeStyle.vertexSeperations[1]=Math.max(l-z,0);mxEdgeStyle.vertexSeperations[2]=Math.max(u-z,0);mxEdgeStyle.vertexSeperations[4]=Math.max(n-z,0);mxEdgeStyle.vertexSeperations[3]=Math.max(p-z,0);z=[];
+mxEdgeStyle.orthBuffer))*mxEdgeStyle.orthBuffer):b=2*mxEdgeStyle.orthBuffer);return b},OrthConnector:function(a,b,c,d,e){var f=a.view.graph,g=null==b?!1:f.getModel().isEdge(b.cell),h=null==c?!1:f.getModel().isEdge(c.cell),f=a.absolutePoints,k=f[0],l=f[f.length-1],m=null!=b?b.x:k.x,n=null!=b?b.y:k.y,p=null!=b?b.width:0,r=null!=b?b.height:0,q=null!=c?c.x:l.x,t=null!=c?c.y:l.y,z=null!=c?c.width:0,w=null!=c?c.height:0,f=a.view.scale*mxEdgeStyle.getJettySize(a,b,c,d,!0),x=a.view.scale*mxEdgeStyle.getJettySize(a,
+b,c,d,!1);null!=b&&c==b&&(f=x=Math.max(f,x));var y=x+f,u=!1;if(null!=k&&null!=l)var u=l.x-k.x,D=l.y-k.y,u=u*u+D*D<y*y;if(u||mxEdgeStyle.orthPointsFallback&&null!=d&&0<d.length||g||h)mxEdgeStyle.SegmentConnector(a,b,c,d,e);else{d=[mxConstants.DIRECTION_MASK_ALL,mxConstants.DIRECTION_MASK_ALL];null!=b&&(d[0]=mxUtils.getPortConstraints(b,a,!0,mxConstants.DIRECTION_MASK_ALL),u=mxUtils.getValue(b.style,mxConstants.STYLE_ROTATION,0),0!=u&&(u=mxUtils.getBoundingBox(new mxRectangle(m,n,p,r),u),m=u.x,n=u.y,
+p=u.width,r=u.height));null!=c&&(d[1]=mxUtils.getPortConstraints(c,a,!1,mxConstants.DIRECTION_MASK_ALL),u=mxUtils.getValue(c.style,mxConstants.STYLE_ROTATION,0),0!=u&&(u=mxUtils.getBoundingBox(new mxRectangle(q,t,z,w),u),q=u.x,t=u.y,z=u.width,w=u.height));m=Math.round(10*m)/10;n=Math.round(10*n)/10;p=Math.round(10*p)/10;r=Math.round(10*r)/10;q=Math.round(10*q)/10;t=Math.round(10*t)/10;z=Math.round(10*z)/10;w=Math.round(10*w)/10;a=[0,0];m=[[m,n,p,r],[q,t,z,w]];x=[f,x];for(u=0;2>u;u++)mxEdgeStyle.limits[u][1]=
+m[u][0]-x[u],mxEdgeStyle.limits[u][2]=m[u][1]-x[u],mxEdgeStyle.limits[u][4]=m[u][0]+m[u][2]+x[u],mxEdgeStyle.limits[u][8]=m[u][1]+m[u][3]+x[u];x=m[0][1]+m[0][3]/2;n=m[1][1]+m[1][3]/2;u=m[0][0]+m[0][2]/2-(m[1][0]+m[1][2]/2);D=x-n;x=0;0>u?x=0>D?2:1:0>=D&&(x=3,0==u&&(x=2));n=null;null!=b&&(n=k);b=[[.5,.5],[.5,.5]];for(u=0;2>u;u++)null!=n&&(b[u][0]=(n.x-m[u][0])/m[u][2],1>=Math.abs(n.x-m[u][0])?a[u]=mxConstants.DIRECTION_MASK_WEST:1>=Math.abs(n.x-m[u][0]-m[u][2])&&(a[u]=mxConstants.DIRECTION_MASK_EAST),
+b[u][1]=(n.y-m[u][1])/m[u][3],1>=Math.abs(n.y-m[u][1])?a[u]=mxConstants.DIRECTION_MASK_NORTH:1>=Math.abs(n.y-m[u][1]-m[u][3])&&(a[u]=mxConstants.DIRECTION_MASK_SOUTH)),n=null,null!=c&&(n=l);u=m[0][1]-(m[1][1]+m[1][3]);l=m[0][0]-(m[1][0]+m[1][2]);n=m[1][1]-(m[0][1]+m[0][3]);p=m[1][0]-(m[0][0]+m[0][2]);mxEdgeStyle.vertexSeperations[1]=Math.max(l-y,0);mxEdgeStyle.vertexSeperations[2]=Math.max(u-y,0);mxEdgeStyle.vertexSeperations[4]=Math.max(n-y,0);mxEdgeStyle.vertexSeperations[3]=Math.max(p-y,0);y=[];
 c=[];k=[];c[0]=l>=p?mxConstants.DIRECTION_MASK_WEST:mxConstants.DIRECTION_MASK_EAST;k[0]=u>=n?mxConstants.DIRECTION_MASK_NORTH:mxConstants.DIRECTION_MASK_SOUTH;c[1]=mxUtils.reversePortConstraints(c[0]);k[1]=mxUtils.reversePortConstraints(k[0]);l=l>=p?l:p;n=u>=n?u:n;p=[[0,0],[0,0]];r=!1;for(u=0;2>u;u++)0==a[u]&&(0==(c[u]&d[u])&&(c[u]=mxUtils.reversePortConstraints(c[u])),0==(k[u]&d[u])&&(k[u]=mxUtils.reversePortConstraints(k[u])),p[u][0]=k[u],p[u][1]=c[u]);0<n&&0<l&&(0<(c[0]&d[0])&&0<(k[1]&d[1])?(p[0][0]=
-c[0],p[0][1]=k[0],p[1][0]=k[1],p[1][1]=c[1],r=!0):0<(k[0]&d[0])&&0<(c[1]&d[1])&&(p[0][0]=k[0],p[0][1]=c[0],p[1][0]=c[1],p[1][1]=k[1],r=!0));0<n&&!r&&(p[0][0]=k[0],p[0][1]=c[0],p[1][0]=k[1],p[1][1]=c[1],r=!0);0<l&&!r&&(p[0][0]=c[0],p[0][1]=k[0],p[1][0]=c[1],p[1][1]=k[1]);for(u=0;2>u;u++)0==a[u]&&(0==(p[u][0]&d[u])&&(p[u][0]=p[u][1]),z[u]=p[u][0]&d[u],z[u]|=(p[u][1]&d[u])<<8,z[u]|=(p[1-u][u]&d[u])<<16,z[u]|=(p[1-u][1-u]&d[u])<<24,0==(z[u]&15)&&(z[u]<<=8),0==(z[u]&3840)&&(z[u]=z[u]&15|z[u]>>8),0==(z[u]&
-983040)&&(z[u]=z[u]&65535|(z[u]&251658240)>>8),a[u]=z[u]&15,d[u]==mxConstants.DIRECTION_MASK_WEST||d[u]==mxConstants.DIRECTION_MASK_NORTH||d[u]==mxConstants.DIRECTION_MASK_EAST||d[u]==mxConstants.DIRECTION_MASK_SOUTH)&&(a[u]=d[u]);d=a[0]==mxConstants.DIRECTION_MASK_EAST?3:a[0];z=a[1]==mxConstants.DIRECTION_MASK_EAST?3:a[1];d-=w;z-=w;1>d&&(d+=4);1>z&&(z+=4);d=mxEdgeStyle.routePatterns[d-1][z-1];mxEdgeStyle.wayPoints1[0][0]=m[0][0];mxEdgeStyle.wayPoints1[0][1]=m[0][1];switch(a[0]){case mxConstants.DIRECTION_MASK_WEST:mxEdgeStyle.wayPoints1[0][0]-=
-f;mxEdgeStyle.wayPoints1[0][1]+=b[0][1]*m[0][3];break;case mxConstants.DIRECTION_MASK_SOUTH:mxEdgeStyle.wayPoints1[0][0]+=b[0][0]*m[0][2];mxEdgeStyle.wayPoints1[0][1]+=m[0][3]+f;break;case mxConstants.DIRECTION_MASK_EAST:mxEdgeStyle.wayPoints1[0][0]+=m[0][2]+f;mxEdgeStyle.wayPoints1[0][1]+=b[0][1]*m[0][3];break;case mxConstants.DIRECTION_MASK_NORTH:mxEdgeStyle.wayPoints1[0][0]+=b[0][0]*m[0][2],mxEdgeStyle.wayPoints1[0][1]-=f}f=0;c=z=0<(a[0]&(mxConstants.DIRECTION_MASK_EAST|mxConstants.DIRECTION_MASK_WEST))?
-0:1;for(u=0;u<d.length;u++)k=d[u]&15,r=k==mxConstants.DIRECTION_MASK_EAST?3:k,r+=w,4<r&&(r-=4),l=mxEdgeStyle.dirVectors[r-1],k=0<r%2?0:1,k!=z&&(f++,mxEdgeStyle.wayPoints1[f][0]=mxEdgeStyle.wayPoints1[f-1][0],mxEdgeStyle.wayPoints1[f][1]=mxEdgeStyle.wayPoints1[f-1][1]),q=0<(d[u]&mxEdgeStyle.TARGET_MASK),t=0<(d[u]&mxEdgeStyle.SOURCE_MASK),n=(d[u]&mxEdgeStyle.SIDE_MASK)>>5,n<<=w,15<n&&(n>>=4),p=0<(d[u]&mxEdgeStyle.CENTER_MASK),(t||q)&&9>n?(r=t?0:1,n=p&&0==k?m[r][0]+b[r][0]*m[r][2]:p?m[r][1]+b[r][1]*
-m[r][3]:mxEdgeStyle.limits[r][n],0==k?(n=(n-mxEdgeStyle.wayPoints1[f][0])*l[0],0<n&&(mxEdgeStyle.wayPoints1[f][0]+=l[0]*n)):(n=(n-mxEdgeStyle.wayPoints1[f][1])*l[1],0<n&&(mxEdgeStyle.wayPoints1[f][1]+=l[1]*n))):p&&(mxEdgeStyle.wayPoints1[f][0]+=l[0]*Math.abs(mxEdgeStyle.vertexSeperations[r]/2),mxEdgeStyle.wayPoints1[f][1]+=l[1]*Math.abs(mxEdgeStyle.vertexSeperations[r]/2)),0<f&&mxEdgeStyle.wayPoints1[f][k]==mxEdgeStyle.wayPoints1[f-1][k]?f--:z=k;for(u=0;u<=f&&(u!=f||((0<(a[1]&(mxConstants.DIRECTION_MASK_EAST|
+c[0],p[0][1]=k[0],p[1][0]=k[1],p[1][1]=c[1],r=!0):0<(k[0]&d[0])&&0<(c[1]&d[1])&&(p[0][0]=k[0],p[0][1]=c[0],p[1][0]=c[1],p[1][1]=k[1],r=!0));0<n&&!r&&(p[0][0]=k[0],p[0][1]=c[0],p[1][0]=k[1],p[1][1]=c[1],r=!0);0<l&&!r&&(p[0][0]=c[0],p[0][1]=k[0],p[1][0]=c[1],p[1][1]=k[1]);for(u=0;2>u;u++)0==a[u]&&(0==(p[u][0]&d[u])&&(p[u][0]=p[u][1]),y[u]=p[u][0]&d[u],y[u]|=(p[u][1]&d[u])<<8,y[u]|=(p[1-u][u]&d[u])<<16,y[u]|=(p[1-u][1-u]&d[u])<<24,0==(y[u]&15)&&(y[u]<<=8),0==(y[u]&3840)&&(y[u]=y[u]&15|y[u]>>8),0==(y[u]&
+983040)&&(y[u]=y[u]&65535|(y[u]&251658240)>>8),a[u]=y[u]&15,d[u]==mxConstants.DIRECTION_MASK_WEST||d[u]==mxConstants.DIRECTION_MASK_NORTH||d[u]==mxConstants.DIRECTION_MASK_EAST||d[u]==mxConstants.DIRECTION_MASK_SOUTH)&&(a[u]=d[u]);d=a[0]==mxConstants.DIRECTION_MASK_EAST?3:a[0];y=a[1]==mxConstants.DIRECTION_MASK_EAST?3:a[1];d-=x;y-=x;1>d&&(d+=4);1>y&&(y+=4);d=mxEdgeStyle.routePatterns[d-1][y-1];mxEdgeStyle.wayPoints1[0][0]=m[0][0];mxEdgeStyle.wayPoints1[0][1]=m[0][1];switch(a[0]){case mxConstants.DIRECTION_MASK_WEST:mxEdgeStyle.wayPoints1[0][0]-=
+f;mxEdgeStyle.wayPoints1[0][1]+=b[0][1]*m[0][3];break;case mxConstants.DIRECTION_MASK_SOUTH:mxEdgeStyle.wayPoints1[0][0]+=b[0][0]*m[0][2];mxEdgeStyle.wayPoints1[0][1]+=m[0][3]+f;break;case mxConstants.DIRECTION_MASK_EAST:mxEdgeStyle.wayPoints1[0][0]+=m[0][2]+f;mxEdgeStyle.wayPoints1[0][1]+=b[0][1]*m[0][3];break;case mxConstants.DIRECTION_MASK_NORTH:mxEdgeStyle.wayPoints1[0][0]+=b[0][0]*m[0][2],mxEdgeStyle.wayPoints1[0][1]-=f}f=0;c=y=0<(a[0]&(mxConstants.DIRECTION_MASK_EAST|mxConstants.DIRECTION_MASK_WEST))?
+0:1;for(u=0;u<d.length;u++)k=d[u]&15,r=k==mxConstants.DIRECTION_MASK_EAST?3:k,r+=x,4<r&&(r-=4),l=mxEdgeStyle.dirVectors[r-1],k=0<r%2?0:1,k!=y&&(f++,mxEdgeStyle.wayPoints1[f][0]=mxEdgeStyle.wayPoints1[f-1][0],mxEdgeStyle.wayPoints1[f][1]=mxEdgeStyle.wayPoints1[f-1][1]),q=0<(d[u]&mxEdgeStyle.TARGET_MASK),t=0<(d[u]&mxEdgeStyle.SOURCE_MASK),n=(d[u]&mxEdgeStyle.SIDE_MASK)>>5,n<<=x,15<n&&(n>>=4),p=0<(d[u]&mxEdgeStyle.CENTER_MASK),(t||q)&&9>n?(r=t?0:1,n=p&&0==k?m[r][0]+b[r][0]*m[r][2]:p?m[r][1]+b[r][1]*
+m[r][3]:mxEdgeStyle.limits[r][n],0==k?(n=(n-mxEdgeStyle.wayPoints1[f][0])*l[0],0<n&&(mxEdgeStyle.wayPoints1[f][0]+=l[0]*n)):(n=(n-mxEdgeStyle.wayPoints1[f][1])*l[1],0<n&&(mxEdgeStyle.wayPoints1[f][1]+=l[1]*n))):p&&(mxEdgeStyle.wayPoints1[f][0]+=l[0]*Math.abs(mxEdgeStyle.vertexSeperations[r]/2),mxEdgeStyle.wayPoints1[f][1]+=l[1]*Math.abs(mxEdgeStyle.vertexSeperations[r]/2)),0<f&&mxEdgeStyle.wayPoints1[f][k]==mxEdgeStyle.wayPoints1[f-1][k]?f--:y=k;for(u=0;u<=f&&(u!=f||((0<(a[1]&(mxConstants.DIRECTION_MASK_EAST|
 mxConstants.DIRECTION_MASK_WEST))?0:1)==c?0:1)==(f+1)%2);u++)e.push(new mxPoint(Math.round(mxEdgeStyle.wayPoints1[u][0]),Math.round(mxEdgeStyle.wayPoints1[u][1])));for(a=1;a<e.length;)null==e[a-1]||null==e[a]||e[a-1].x!=e[a].x||e[a-1].y!=e[a].y?a++:e.splice(a,1)}},getRoutePattern:function(a,b,c,d){var e=a[0]==mxConstants.DIRECTION_MASK_EAST?3:a[0];a=a[1]==mxConstants.DIRECTION_MASK_EAST?3:a[1];e-=b;a-=b;1>e&&(e+=4);1>a&&(a+=4);b=routePatterns[e-1][a-1];0!=c&&0!=d||null==inlineRoutePatterns[e-1][a-
 1]||(b=inlineRoutePatterns[e-1][a-1]);return b}},mxStyleRegistry={values:[],putValue:function(a,b){mxStyleRegistry.values[a]=b},getValue:function(a){return mxStyleRegistry.values[a]},getName:function(a){for(var b in mxStyleRegistry.values)if(mxStyleRegistry.values[b]==a)return b;return null}};mxStyleRegistry.putValue(mxConstants.EDGESTYLE_ELBOW,mxEdgeStyle.ElbowConnector);mxStyleRegistry.putValue(mxConstants.EDGESTYLE_ENTITY_RELATION,mxEdgeStyle.EntityRelation);
 mxStyleRegistry.putValue(mxConstants.EDGESTYLE_LOOP,mxEdgeStyle.Loop);mxStyleRegistry.putValue(mxConstants.EDGESTYLE_SIDETOSIDE,mxEdgeStyle.SideToSide);mxStyleRegistry.putValue(mxConstants.EDGESTYLE_TOPTOBOTTOM,mxEdgeStyle.TopToBottom);mxStyleRegistry.putValue(mxConstants.EDGESTYLE_ORTHOGONAL,mxEdgeStyle.OrthConnector);mxStyleRegistry.putValue(mxConstants.EDGESTYLE_SEGMENT,mxEdgeStyle.SegmentConnector);mxStyleRegistry.putValue(mxConstants.PERIMETER_ELLIPSE,mxPerimeter.EllipsePerimeter);
@@ -1168,7 +1168,7 @@ m=this.view.getState(this.model.getParent(a[f]));if(null!=l&&null!=m)if(c=m.orig
 k.length;l++)k[l].x+=c,k[l].y+=m}else k.translate(c,m)}}else d=[]}return d};mxGraph.prototype.insertVertex=function(a,b,c,d,e,f,g,h,k){b=this.createVertex(a,b,c,d,e,f,g,h,k);return this.addCell(b,a)};mxGraph.prototype.createVertex=function(a,b,c,d,e,f,g,h,k){a=new mxGeometry(d,e,f,g);a.relative=null!=k?k:!1;c=new mxCell(c,a,h);c.setId(b);c.setVertex(!0);c.setConnectable(!0);return c};mxGraph.prototype.insertEdge=function(a,b,c,d,e,f){b=this.createEdge(a,b,c,d,e,f);return this.addEdge(b,a,d,e)};
 mxGraph.prototype.createEdge=function(a,b,c,d,e,f){a=new mxCell(c,new mxGeometry,f);a.setId(b);a.setEdge(!0);a.geometry.relative=!0;return a};mxGraph.prototype.addEdge=function(a,b,c,d,e){return this.addCell(a,b,e,c,d)};mxGraph.prototype.addCell=function(a,b,c,d,e){return this.addCells([a],b,c,d,e)[0]};
 mxGraph.prototype.addCells=function(a,b,c,d,e){null==b&&(b=this.getDefaultParent());null==c&&(c=this.model.getChildCount(b));this.model.beginUpdate();try{this.cellsAdded(a,b,c,d,e,!1,!0),this.fireEvent(new mxEventObject(mxEvent.ADD_CELLS,"cells",a,"parent",b,"index",c,"source",d,"target",e))}finally{this.model.endUpdate()}return a};
-mxGraph.prototype.cellsAdded=function(a,b,c,d,e,f,g,h){if(null!=a&&null!=b&&null!=c){this.model.beginUpdate();try{for(var k=f?this.view.getState(b):null,l=null!=k?k.origin:null,m=new mxPoint(0,0),k=0;k<a.length;k++)if(null==a[k])c--;else{var n=this.model.getParent(a[k]);if(null!=l&&a[k]!=b&&b!=n){var p=this.view.getState(n),r=null!=p?p.origin:m,q=this.model.getGeometry(a[k]);if(null!=q){var t=r.x-l.x,y=r.y-l.y,q=q.clone();q.translate(t,y);q.relative||!this.model.isVertex(a[k])||this.isAllowNegativeCoordinates()||
+mxGraph.prototype.cellsAdded=function(a,b,c,d,e,f,g,h){if(null!=a&&null!=b&&null!=c){this.model.beginUpdate();try{for(var k=f?this.view.getState(b):null,l=null!=k?k.origin:null,m=new mxPoint(0,0),k=0;k<a.length;k++)if(null==a[k])c--;else{var n=this.model.getParent(a[k]);if(null!=l&&a[k]!=b&&b!=n){var p=this.view.getState(n),r=null!=p?p.origin:m,q=this.model.getGeometry(a[k]);if(null!=q){var t=r.x-l.x,z=r.y-l.y,q=q.clone();q.translate(t,z);q.relative||!this.model.isVertex(a[k])||this.isAllowNegativeCoordinates()||
 (q.x=Math.max(0,q.x),q.y=Math.max(0,q.y));this.model.setGeometry(a[k],q)}}b==n&&c+k>this.model.getChildCount(b)&&c--;this.model.add(b,a[k],c+k);this.autoSizeCellsOnAdd&&this.autoSizeCell(a[k],!0);(null==h||h)&&this.isExtendParentsOnAdd(a[k])&&this.isExtendParent(a[k])&&this.extendParent(a[k]);(null==g||g)&&this.constrainChild(a[k]);null!=d&&this.cellConnected(a[k],d,!0);null!=e&&this.cellConnected(a[k],e,!1)}this.fireEvent(new mxEventObject(mxEvent.CELLS_ADDED,"cells",a,"parent",b,"index",c,"source",
 d,"target",e,"absolute",f))}finally{this.model.endUpdate()}}};mxGraph.prototype.autoSizeCell=function(a,b){if(null!=b?b:1)for(var c=this.model.getChildCount(a),d=0;d<c;d++)this.autoSizeCell(this.model.getChildAt(a,d));this.getModel().isVertex(a)&&this.isAutoSizeCell(a)&&this.updateCellSize(a)};
 mxGraph.prototype.removeCells=function(a,b){b=null!=b?b:!0;null==a&&(a=this.getDeletableCells(this.getSelectionCells()));b&&(a=this.getDeletableCells(this.addAllEdges(a)));this.model.beginUpdate();try{this.cellsRemoved(a),this.fireEvent(new mxEventObject(mxEvent.REMOVE_CELLS,"cells",a,"includeEdges",b))}finally{this.model.endUpdate()}return a};
@@ -1444,15 +1444,15 @@ mxConnectionHandler.prototype.connect=function(a,b,c,d){if(null!=b||this.isCreat
 k.x-=h.origin.x;k.y-=h.origin.y}}this.graph.addCell(b,d)}var l=this.graph.getDefaultParent();null!=a&&null!=b&&e.getParent(a)==e.getParent(b)&&e.getParent(e.getParent(a))!=e.getRoot()&&(l=e.getParent(a),null!=a.geometry&&a.geometry.relative&&null!=b.geometry&&b.geometry.relative&&(l=e.getParent(l)));var m=h=null;null!=this.edgeState&&(h=this.edgeState.cell.value,m=this.edgeState.cell.style);g=this.insertEdge(l,null,h,a,b,m);if(null!=g){this.graph.setConnectionConstraint(g,a,!0,this.sourceConstraint);
 this.graph.setConnectionConstraint(g,b,!1,this.constraintHandler.currentConstraint);null!=this.edgeState&&e.setGeometry(g,this.edgeState.cell.geometry);e.getParent(a);if(this.isInsertBefore(g,a,b,c,d)){l=null;for(k=a;null!=k.parent&&null!=k.geometry&&k.geometry.relative&&k.parent!=g.parent;)k=this.graph.model.getParent(k);null!=k&&null!=k.parent&&k.parent==g.parent&&(l=k.parent.getIndex(k),k.parent.insert(g,l))}var n=e.getGeometry(g);null==n&&(n=new mxGeometry,n.relative=!0,e.setGeometry(g,n));if(null!=
 this.waypoints&&0<this.waypoints.length){var p=this.graph.view.scale,r=this.graph.view.translate;n.points=[];for(a=0;a<this.waypoints.length;a++){var q=this.waypoints[a];n.points.push(new mxPoint(q.x/p-r.x,q.y/p-r.y))}}if(null==b){var t=this.graph.view.translate,p=this.graph.view.scale,q=null!=this.originalPoint?new mxPoint(this.originalPoint.x/p-t.x,this.originalPoint.y/p-t.y):new mxPoint(this.currentPoint.x/p-t.x,this.currentPoint.y/p-t.y);q.x-=this.graph.panDx/this.graph.view.scale;q.y-=this.graph.panDy/
-this.graph.view.scale;n.setTerminalPoint(q,!1)}this.fireEvent(new mxEventObject(mxEvent.CONNECT,"cell",g,"terminal",b,"event",c,"target",d,"terminalInserted",f))}}catch(y){mxLog.show(),mxLog.debug(y.message)}finally{e.endUpdate()}this.select&&this.selectCells(g,f?b:null)}};mxConnectionHandler.prototype.selectCells=function(a,b){this.graph.setSelectionCell(a)};
+this.graph.view.scale;n.setTerminalPoint(q,!1)}this.fireEvent(new mxEventObject(mxEvent.CONNECT,"cell",g,"terminal",b,"event",c,"target",d,"terminalInserted",f))}}catch(z){mxLog.show(),mxLog.debug(z.message)}finally{e.endUpdate()}this.select&&this.selectCells(g,f?b:null)}};mxConnectionHandler.prototype.selectCells=function(a,b){this.graph.setSelectionCell(a)};
 mxConnectionHandler.prototype.insertEdge=function(a,b,c,d,e,f){if(null==this.factoryMethod)return this.graph.insertEdge(a,b,c,d,e,f);b=this.createEdge(c,d,e,f);return b=this.graph.addEdge(b,a,d,e)};
 mxConnectionHandler.prototype.createTargetVertex=function(a,b){for(var c=this.graph.getCellGeometry(b);null!=c&&c.relative;)b=this.graph.getModel().getParent(b),c=this.graph.getCellGeometry(b);var d=this.graph.cloneCells([b])[0],c=this.graph.getModel().getGeometry(d);if(null!=c){var e=this.graph.view.translate,f=this.graph.view.scale,g=new mxPoint(this.currentPoint.x/f-e.x,this.currentPoint.y/f-e.y);c.x=Math.round(g.x-c.width/2-this.graph.panDx/f);c.y=Math.round(g.y-c.height/2-this.graph.panDy/f);
 g=this.getAlignmentTolerance();if(0<g){var h=this.graph.view.getState(b);if(null!=h){var k=h.x/f-e.x,e=h.y/f-e.y;Math.abs(k-c.x)<=g&&(c.x=Math.round(k));Math.abs(e-c.y)<=g&&(c.y=Math.round(e))}}}return d};mxConnectionHandler.prototype.getAlignmentTolerance=function(a){return this.graph.isGridEnabled()?this.graph.gridSize/2:this.graph.tolerance};
 mxConnectionHandler.prototype.createEdge=function(a,b,c,d){var e=null;null!=this.factoryMethod&&(e=this.factoryMethod(b,c,d));null==e&&(e=new mxCell(a||""),e.setEdge(!0),e.setStyle(d),a=new mxGeometry,a.relative=!0,e.setGeometry(a));return e};
 mxConnectionHandler.prototype.destroy=function(){this.graph.removeMouseListener(this);null!=this.shape&&(this.shape.destroy(),this.shape=null);null!=this.marker&&(this.marker.destroy(),this.marker=null);null!=this.constraintHandler&&(this.constraintHandler.destroy(),this.constraintHandler=null);null!=this.changeHandler&&(this.graph.getModel().removeListener(this.changeHandler),this.graph.getView().removeListener(this.changeHandler),this.changeHandler=null);null!=this.drillHandler&&(this.graph.removeListener(this.drillHandler),
 this.graph.getView().removeListener(this.drillHandler),this.drillHandler=null);null!=this.escapeHandler&&(this.graph.removeListener(this.escapeHandler),this.escapeHandler=null)};
-function mxConstraintHandler(a){this.graph=a;this.resetHandler=mxUtils.bind(this,function(a,c){null!=this.currentFocus&&null==this.graph.view.getState(this.currentFocus.cell)?this.reset():this.redraw()});this.graph.model.addListener(mxEvent.CHANGE,this.resetHandler);this.graph.view.addListener(mxEvent.SCALE,this.resetHandler);this.graph.addListener(mxEvent.ROOT,this.resetHandler)}mxConstraintHandler.prototype.pointImage=new mxImage(mxClient.imageBasePath+"/point.gif",5,5);
-mxConstraintHandler.prototype.graph=null;mxConstraintHandler.prototype.enabled=!0;mxConstraintHandler.prototype.highlightColor=mxConstants.DEFAULT_VALID_COLOR;mxConstraintHandler.prototype.isEnabled=function(){return this.enabled};mxConstraintHandler.prototype.setEnabled=function(a){this.enabled=a};
+function mxConstraintHandler(a){this.graph=a;this.resetHandler=mxUtils.bind(this,function(a,c){null!=this.currentFocus&&null==this.graph.view.getState(this.currentFocus.cell)?this.reset():this.redraw()});this.graph.model.addListener(mxEvent.CHANGE,this.resetHandler);this.graph.view.addListener(mxEvent.SCALE_AND_TRANSLATE,this.resetHandler);this.graph.view.addListener(mxEvent.TRANSLATE,this.resetHandler);this.graph.view.addListener(mxEvent.SCALE,this.resetHandler);this.graph.addListener(mxEvent.ROOT,
+this.resetHandler)}mxConstraintHandler.prototype.pointImage=new mxImage(mxClient.imageBasePath+"/point.gif",5,5);mxConstraintHandler.prototype.graph=null;mxConstraintHandler.prototype.enabled=!0;mxConstraintHandler.prototype.highlightColor=mxConstants.DEFAULT_VALID_COLOR;mxConstraintHandler.prototype.isEnabled=function(){return this.enabled};mxConstraintHandler.prototype.setEnabled=function(a){this.enabled=a};
 mxConstraintHandler.prototype.reset=function(){if(null!=this.focusIcons){for(var a=0;a<this.focusIcons.length;a++)this.focusIcons[a].destroy();this.focusIcons=null}null!=this.focusHighlight&&(this.focusHighlight.destroy(),this.focusHighlight=null);this.focusPoints=this.currentFocus=this.currentPoint=this.currentFocusArea=this.currentConstraint=null};mxConstraintHandler.prototype.getTolerance=function(a){return this.graph.getTolerance()};
 mxConstraintHandler.prototype.getImageForConstraint=function(a,b,c){return this.pointImage};mxConstraintHandler.prototype.isEventIgnored=function(a,b){return!1};mxConstraintHandler.prototype.isStateIgnored=function(a,b){return!1};mxConstraintHandler.prototype.destroyIcons=function(){if(null!=this.focusIcons){for(var a=0;a<this.focusIcons.length;a++)this.focusIcons[a].destroy();this.focusPoints=this.focusIcons=null}};
 mxConstraintHandler.prototype.destroyFocusHighlight=function(){null!=this.focusHighlight&&(this.focusHighlight.destroy(),this.focusHighlight=null)};mxConstraintHandler.prototype.isKeepFocusEvent=function(a){return mxEvent.isShiftDown(a.getEvent())};
@@ -1536,13 +1536,13 @@ function(){var a=m.apply(this,arguments);if(this.graph.pageVisible){for(var b=[]
 function(a,b){return null==a.cell?"#ffa500":mxConstants.GUIDE_COLOR};this.graphHandler.createPreviewShape=function(a){this.previewColor="#000000"==this.graph.background?"#ffffff":mxGraphHandler.prototype.previewColor;return mxGraphHandler.prototype.createPreviewShape.apply(this,arguments)};this.graphHandler.getCells=function(a){for(var b=mxGraphHandler.prototype.getCells.apply(this,arguments),c=[],d=0;d<b.length;d++){var e=this.graph.view.getState(b[d]),e=null!=e?e.style:this.graph.getCellStyle(b[d]);
 "1"==mxUtils.getValue(e,"part","0")?(e=this.graph.model.getParent(b[d]),this.graph.model.isVertex(e)&&0>mxUtils.indexOf(b,e)&&c.push(e)):c.push(b[d])}return c};this.connectionHandler.createTargetVertex=function(a,b){var c=this.graph.view.getState(b),c=null!=c?c.style:this.graph.getCellStyle(b);mxUtils.getValue(c,"part",!1)&&(c=this.graph.model.getParent(b),this.graph.model.isVertex(c)&&(b=c));return mxConnectionHandler.prototype.createTargetVertex.apply(this,arguments)};var n=new mxRubberband(this);
 this.getRubberband=function(){return n};var p=(new Date).getTime(),r=0,q=this.connectionHandler.mouseMove;this.connectionHandler.mouseMove=function(){var a=this.currentState;q.apply(this,arguments);a!=this.currentState?(p=(new Date).getTime(),r=0):r=(new Date).getTime()-p};var t=this.connectionHandler.isOutlineConnectEvent;this.connectionHandler.isOutlineConnectEvent=function(a){return null!=this.currentState&&a.getState()==this.currentState&&2E3<r||(null==this.currentState||"0"!=mxUtils.getValue(this.currentState.style,
-"outlineConnect","1"))&&t.apply(this,arguments)};var y=this.isToggleEvent;this.isToggleEvent=function(a){return y.apply(this,arguments)||mxEvent.isShiftDown(a)};var x=n.isForceRubberbandEvent;n.isForceRubberbandEvent=function(a){return x.apply(this,arguments)||mxUtils.hasScrollbars(this.graph.container)&&mxClient.IS_FF&&mxClient.IS_WIN&&null==a.getState()&&mxEvent.isTouchEvent(a.getEvent())};var w=null;this.panningHandler.addListener(mxEvent.PAN_START,mxUtils.bind(this,function(){this.isEnabled()&&
-(w=this.container.style.cursor,this.container.style.cursor="move")}));this.panningHandler.addListener(mxEvent.PAN_END,mxUtils.bind(this,function(){this.isEnabled()&&(this.container.style.cursor=w)}));this.popupMenuHandler.autoExpand=!0;this.popupMenuHandler.isSelectOnPopup=function(a){return mxEvent.isMouseEvent(a.getEvent())};var z=this.click;this.click=function(a){if(this.isEnabled()||a.isConsumed())return z.apply(this,arguments);var b=a.getCell();null!=b&&(b=this.getLinkForCell(b),null!=b&&window.open(b))};
+"outlineConnect","1"))&&t.apply(this,arguments)};var z=this.isToggleEvent;this.isToggleEvent=function(a){return z.apply(this,arguments)||mxEvent.isShiftDown(a)};var w=n.isForceRubberbandEvent;n.isForceRubberbandEvent=function(a){return w.apply(this,arguments)||mxUtils.hasScrollbars(this.graph.container)&&mxClient.IS_FF&&mxClient.IS_WIN&&null==a.getState()&&mxEvent.isTouchEvent(a.getEvent())};var x=null;this.panningHandler.addListener(mxEvent.PAN_START,mxUtils.bind(this,function(){this.isEnabled()&&
+(x=this.container.style.cursor,this.container.style.cursor="move")}));this.panningHandler.addListener(mxEvent.PAN_END,mxUtils.bind(this,function(){this.isEnabled()&&(this.container.style.cursor=x)}));this.popupMenuHandler.autoExpand=!0;this.popupMenuHandler.isSelectOnPopup=function(a){return mxEvent.isMouseEvent(a.getEvent())};var y=this.click;this.click=function(a){if(this.isEnabled()||a.isConsumed())return y.apply(this,arguments);var b=a.getCell();null!=b&&(b=this.getLinkForCell(b),null!=b&&window.open(b))};
 var u=this.getCursorForCell;this.getCursorForCell=function(a){if(this.isEnabled())return u.apply(this,arguments);if(null!=this.getLinkForCell(a))return"pointer"};this.selectRegion=function(a,b){var c=this.getAllCells(a.x,a.y,a.width,a.height);this.selectCellsForEvent(c,b);return c};this.getAllCells=function(a,b,c,d,e,f){f=null!=f?f:[];if(0<c||0<d){var g=this.getModel(),h=a+c,k=b+d;null==e&&(e=this.getCurrentRoot(),null==e&&(e=g.getRoot()));if(null!=e)for(var l=g.getChildCount(e),m=0;m<l;m++){var n=
-g.getChildAt(e,m),p=this.view.getState(n);if(null!=p&&this.isCellVisible(n)&&"1"!=mxUtils.getValue(p.style,"locked","0")){var q=mxUtils.getValue(p.style,mxConstants.STYLE_ROTATION)||0;0!=q&&(p=mxUtils.getBoundingBox(p,q));(g.isEdge(n)||g.isVertex(n))&&p.x>=a&&p.y+p.height<=k&&p.y>=b&&p.x+p.width<=h&&f.push(n);this.getAllCells(a,b,c,d,n,f)}}}return f};var F=this.graphHandler.shouldRemoveCellsFromParent;this.graphHandler.shouldRemoveCellsFromParent=function(a,b,c){return this.graph.isCellSelected(a)?
-!1:F.apply(this,arguments)};this.isCellLocked=function(a){for(a=this.view.getState(a);null!=a;){if("1"==mxUtils.getValue(a.style,"locked","0"))return!0;a=this.view.getState(this.model.getParent(a.cell))}return!1};var E=null;this.addListener(mxEvent.FIRE_MOUSE_EVENT,mxUtils.bind(this,function(a,b){if("mouseDown"==b.getProperty("eventName")){var c=b.getProperty("event").getState();E=null==c||this.isSelectionEmpty()||this.isCellSelected(c.cell)?null:this.getSelectionCells()}}));this.addListener(mxEvent.TAP_AND_HOLD,
-mxUtils.bind(this,function(a,b){if(!mxEvent.isMultiTouchEvent(b)){var c=b.getProperty("event"),d=b.getProperty("cell");null==d?(c=mxUtils.convertPoint(this.container,mxEvent.getClientX(c),mxEvent.getClientY(c)),n.start(c.x,c.y)):null!=E?this.addSelectionCells(E):1<this.getSelectionCount()&&this.isCellSelected(d)&&this.removeSelectionCell(d);E=null;b.consume()}}));this.connectionHandler.selectCells=function(a,b){this.graph.setSelectionCell(b||a)};this.connectionHandler.constraintHandler.isStateIgnored=
-function(a,b){return b&&a.view.graph.isCellSelected(a.cell)};this.selectionModel.addListener(mxEvent.CHANGE,mxUtils.bind(this,function(){var a=this.connectionHandler.constraintHandler;null!=a.currentFocus&&a.isStateIgnored(a.currentFocus,!0)&&(a.currentFocus=null,a.constraints=null,a.destroyIcons());a.destroyFocusHighlight()}));Graph.touchStyle&&this.initTouch();var D=this.updateMouseEvent;this.updateMouseEvent=function(a){a=D.apply(this,arguments);this.isCellLocked(a.getCell())&&(a.state=null);return a}}};
+g.getChildAt(e,m),p=this.view.getState(n);if(null!=p&&this.isCellVisible(n)&&"1"!=mxUtils.getValue(p.style,"locked","0")){var q=mxUtils.getValue(p.style,mxConstants.STYLE_ROTATION)||0;0!=q&&(p=mxUtils.getBoundingBox(p,q));(g.isEdge(n)||g.isVertex(n))&&p.x>=a&&p.y+p.height<=k&&p.y>=b&&p.x+p.width<=h&&f.push(n);this.getAllCells(a,b,c,d,n,f)}}}return f};var D=this.graphHandler.shouldRemoveCellsFromParent;this.graphHandler.shouldRemoveCellsFromParent=function(a,b,c){return this.graph.isCellSelected(a)?
+!1:D.apply(this,arguments)};this.isCellLocked=function(a){for(a=this.view.getState(a);null!=a;){if("1"==mxUtils.getValue(a.style,"locked","0"))return!0;a=this.view.getState(this.model.getParent(a.cell))}return!1};var F=null;this.addListener(mxEvent.FIRE_MOUSE_EVENT,mxUtils.bind(this,function(a,b){if("mouseDown"==b.getProperty("eventName")){var c=b.getProperty("event").getState();F=null==c||this.isSelectionEmpty()||this.isCellSelected(c.cell)?null:this.getSelectionCells()}}));this.addListener(mxEvent.TAP_AND_HOLD,
+mxUtils.bind(this,function(a,b){if(!mxEvent.isMultiTouchEvent(b)){var c=b.getProperty("event"),d=b.getProperty("cell");null==d?(c=mxUtils.convertPoint(this.container,mxEvent.getClientX(c),mxEvent.getClientY(c)),n.start(c.x,c.y)):null!=F?this.addSelectionCells(F):1<this.getSelectionCount()&&this.isCellSelected(d)&&this.removeSelectionCell(d);F=null;b.consume()}}));this.connectionHandler.selectCells=function(a,b){this.graph.setSelectionCell(b||a)};this.connectionHandler.constraintHandler.isStateIgnored=
+function(a,b){return b&&a.view.graph.isCellSelected(a.cell)};this.selectionModel.addListener(mxEvent.CHANGE,mxUtils.bind(this,function(){var a=this.connectionHandler.constraintHandler;null!=a.currentFocus&&a.isStateIgnored(a.currentFocus,!0)&&(a.currentFocus=null,a.constraints=null,a.destroyIcons());a.destroyFocusHighlight()}));Graph.touchStyle&&this.initTouch();var E=this.updateMouseEvent;this.updateMouseEvent=function(a){a=E.apply(this,arguments);this.isCellLocked(a.getCell())&&(a.state=null);return a}}};
 Graph.touchStyle=mxClient.IS_TOUCH||mxClient.IS_FF&&mxClient.IS_WIN||0<navigator.maxTouchPoints||0<navigator.msMaxTouchPoints||null==window.urlParams||"1"==urlParams.touch;Graph.fileSupport=null!=window.File&&null!=window.FileReader&&null!=window.FileList&&(null==window.urlParams||"0"!=urlParams.filesupport);Graph.lineJumpsEnabled=!0;Graph.defaultJumpSize=6;mxUtils.extend(Graph,mxGraph);Graph.prototype.minFitScale=null;Graph.prototype.maxFitScale=null;
 Graph.prototype.linkPolicy="frame"==urlParams.target?"blank":urlParams.target||"auto";Graph.prototype.linkTarget="frame"==urlParams.target?"_self":"_blank";Graph.prototype.defaultScrollbars=!mxClient.IS_IOS;Graph.prototype.defaultPageVisible=!0;Graph.prototype.lightbox=!1;Graph.prototype.defaultGraphBackground="#ffffff";Graph.prototype.scrollTileSize=new mxRectangle(0,0,400,400);Graph.prototype.transparentBackground=!0;Graph.prototype.defaultEdgeLength=80;Graph.prototype.edgeMode=!1;
 Graph.prototype.connectionArrowsEnabled=!0;Graph.prototype.placeholderPattern=RegExp("%(date{.*}|[^%^{^}]+)%","g");Graph.prototype.absoluteUrlPattern=/^(?:[a-z]+:)?\/\//i;Graph.prototype.defaultThemeName="default";Graph.prototype.defaultThemes={};Graph.prototype.baseUrl=(window!=window.top?document.referrer:document.location.toString()).split("#")[0];
@@ -1561,8 +1561,8 @@ Graph.prototype.getLabel=function(a){var b=mxGraph.prototype.getLabel.apply(this
 Graph.prototype.setGridSize=function(a){this.gridSize=a;this.fireEvent(new mxEventObject("gridSizeChanged"))};Graph.prototype.getGlobalVariable=function(a){var b=null;"date"==a?b=(new Date).toLocaleDateString():"time"==a?b=(new Date).toLocaleTimeString():"timestamp"==a?b=(new Date).toLocaleString():"date{"==a.substring(0,5)&&(a=a.substring(5,a.length-1),b=this.formatDate(new Date,a));return b};
 Graph.prototype.formatDate=function(a,b,c){null==this.dateFormatCache&&(this.dateFormatCache={i18n:{dayNames:"Sun Mon Tue Wed Thu Fri Sat Sunday Monday Tuesday Wednesday Thursday Friday Saturday".split(" "),monthNames:"Jan Feb Mar Apr May Jun Jul Aug Sep Oct Nov Dec January February March April May June July August September October November December".split(" ")},masks:{"default":"ddd mmm dd yyyy HH:MM:ss",shortDate:"m/d/yy",mediumDate:"mmm d, yyyy",longDate:"mmmm d, yyyy",fullDate:"dddd, mmmm d, yyyy",
 shortTime:"h:MM TT",mediumTime:"h:MM:ss TT",longTime:"h:MM:ss TT Z",isoDate:"yyyy-mm-dd",isoTime:"HH:MM:ss",isoDateTime:"yyyy-mm-dd'T'HH:MM:ss",isoUtcDateTime:"UTC:yyyy-mm-dd'T'HH:MM:ss'Z'"}});var d=this.dateFormatCache,e=/\b(?:[PMCEA][SDP]T|(?:Pacific|Mountain|Central|Eastern|Atlantic) (?:Standard|Daylight|Prevailing) Time|(?:GMT|UTC)(?:[-+]\d{4})?)\b/g,f=/[^-+\dA-Z]/g,g=function(a,b){a=String(a);for(b=b||2;a.length<b;)a="0"+a;return a};1!=arguments.length||"[object String]"!=Object.prototype.toString.call(a)||
-/\d/.test(a)||(b=a,a=void 0);a=a?new Date(a):new Date;if(isNaN(a))throw SyntaxError("invalid date");b=String(d.masks[b]||b||d.masks["default"]);"UTC:"==b.slice(0,4)&&(b=b.slice(4),c=!0);var h=c?"getUTC":"get",k=a[h+"Date"](),l=a[h+"Day"](),m=a[h+"Month"](),n=a[h+"FullYear"](),p=a[h+"Hours"](),r=a[h+"Minutes"](),q=a[h+"Seconds"](),h=a[h+"Milliseconds"](),t=c?0:a.getTimezoneOffset(),y={d:k,dd:g(k),ddd:d.i18n.dayNames[l],dddd:d.i18n.dayNames[l+7],m:m+1,mm:g(m+1),mmm:d.i18n.monthNames[m],mmmm:d.i18n.monthNames[m+
-12],yy:String(n).slice(2),yyyy:n,h:p%12||12,hh:g(p%12||12),H:p,HH:g(p),M:r,MM:g(r),s:q,ss:g(q),l:g(h,3),L:g(99<h?Math.round(h/10):h),t:12>p?"a":"p",tt:12>p?"am":"pm",T:12>p?"A":"P",TT:12>p?"AM":"PM",Z:c?"UTC":(String(a).match(e)||[""]).pop().replace(f,""),o:(0<t?"-":"+")+g(100*Math.floor(Math.abs(t)/60)+Math.abs(t)%60,4),S:["th","st","nd","rd"][3<k%10?0:(10!=k%100-k%10)*k%10]};return b.replace(/d{1,4}|m{1,4}|yy(?:yy)?|([HhMsTt])\1?|[LloSZ]|"[^"]*"|'[^']*'/g,function(a){return a in y?y[a]:a.slice(1,
+/\d/.test(a)||(b=a,a=void 0);a=a?new Date(a):new Date;if(isNaN(a))throw SyntaxError("invalid date");b=String(d.masks[b]||b||d.masks["default"]);"UTC:"==b.slice(0,4)&&(b=b.slice(4),c=!0);var h=c?"getUTC":"get",k=a[h+"Date"](),l=a[h+"Day"](),m=a[h+"Month"](),n=a[h+"FullYear"](),p=a[h+"Hours"](),r=a[h+"Minutes"](),q=a[h+"Seconds"](),h=a[h+"Milliseconds"](),t=c?0:a.getTimezoneOffset(),z={d:k,dd:g(k),ddd:d.i18n.dayNames[l],dddd:d.i18n.dayNames[l+7],m:m+1,mm:g(m+1),mmm:d.i18n.monthNames[m],mmmm:d.i18n.monthNames[m+
+12],yy:String(n).slice(2),yyyy:n,h:p%12||12,hh:g(p%12||12),H:p,HH:g(p),M:r,MM:g(r),s:q,ss:g(q),l:g(h,3),L:g(99<h?Math.round(h/10):h),t:12>p?"a":"p",tt:12>p?"am":"pm",T:12>p?"A":"P",TT:12>p?"AM":"PM",Z:c?"UTC":(String(a).match(e)||[""]).pop().replace(f,""),o:(0<t?"-":"+")+g(100*Math.floor(Math.abs(t)/60)+Math.abs(t)%60,4),S:["th","st","nd","rd"][3<k%10?0:(10!=k%100-k%10)*k%10]};return b.replace(/d{1,4}|m{1,4}|yy(?:yy)?|([HhMsTt])\1?|[LloSZ]|"[^"]*"|'[^']*'/g,function(a){return a in z?z[a]:a.slice(1,
 a.length-1)})};
 Graph.prototype.createLayersDialog=function(){var a=document.createElement("div");a.style.position="absolute";for(var b=this.getModel(),c=b.getChildCount(b.root),d=0;d<c;d++)(function(c){var d=document.createElement("div");d.style.overflow="hidden";d.style.textOverflow="ellipsis";d.style.padding="2px";d.style.whiteSpace="nowrap";var e=document.createElement("input");e.style.display="inline-block";e.setAttribute("type","checkbox");b.isVisible(c)&&(e.setAttribute("checked","checked"),e.defaultChecked=
 !0);d.appendChild(e);var h=c.value||mxResources.get("background")||"Background";d.setAttribute("title",h);mxUtils.write(d,h);a.appendChild(d);mxEvent.addListener(e,"click",function(){null!=e.getAttribute("checked")?e.removeAttribute("checked"):e.setAttribute("checked","checked");b.setVisible(c,e.checked)})})(b.getChildAt(b.root,d));return a};
@@ -1588,7 +1588,7 @@ Graph.prototype.selectAll=function(a){a=a||this.getDefaultParent();this.isCellLo
 Graph.prototype.isCellFoldable=function(a){var b=this.view.getState(a),b=null!=b?b.style:this.getCellStyle(a);return this.foldingEnabled&&!this.isCellLocked(a)&&(this.isContainer(a)&&"0"!=b.collapsible||!this.isContainer(a)&&"1"==b.collapsible)};Graph.prototype.reset=function(){this.isEditing()&&this.stopEditing(!0);this.escape();this.isSelectionEmpty()||this.clearSelection()};
 Graph.prototype.zoom=function(a,b){a=Math.max(.01,Math.min(this.view.scale*a,160))/this.view.scale;mxGraph.prototype.zoom.apply(this,arguments)};Graph.prototype.zoomIn=function(){.15>this.view.scale?this.zoom((this.view.scale+.01)/this.view.scale):this.zoom(Math.round(this.view.scale*this.zoomFactor*20)/20/this.view.scale)};Graph.prototype.zoomOut=function(){.15>=this.view.scale?this.zoom((this.view.scale-.01)/this.view.scale):this.zoom(Math.round(1/this.zoomFactor*this.view.scale*20)/20/this.view.scale)};
 Graph.prototype.getTooltipForCell=function(a){var b="";if(mxUtils.isNode(a.value)){var c=a.value.getAttribute("tooltip");if(null!=c)null!=c&&this.isReplacePlaceholders(a)&&(c=this.replacePlaceholders(a,c)),b=this.sanitizeHtml(c);else{c=["label","tooltip","placeholders","placeholder"];a=a.value.attributes;var d=[];this.isEnabled()&&c.push("link");for(var e=0;e<a.length;e++)0>mxUtils.indexOf(c,a[e].nodeName)&&0<a[e].nodeValue.length&&d.push({name:a[e].nodeName,value:a[e].nodeValue});d.sort(function(a,
-b){return a.name<b.name?-1:a.name>b.name?1:0});for(e=0;e<d.length;e++)b+=("link"!=d[e].name?d[e].name+":":"")+mxUtils.htmlEntities(d[e].value)+"\n";0<b.length&&(b=b.substring(0,b.length-1))}}return b};Graph.prototype.stringToBytes=function(a){for(var b=Array(a.length),c=0;c<a.length;c++)b[c]=a.charCodeAt(c);return b};Graph.prototype.bytesToString=function(a){for(var b=Array(a.length),c=0;c<a.length;c++)b[c]=String.fromCharCode(a[c]);return b.join("")};
+b){return a.name<b.name?-1:a.name>b.name?1:0});for(e=0;e<d.length;e++)"link"==d[e].name&&this.isPageLink(d[e].value)||(b+=("link"!=d[e].name?d[e].name+":":"")+mxUtils.htmlEntities(d[e].value)+"\n");0<b.length&&(b=b.substring(0,b.length-1))}}return b};Graph.prototype.stringToBytes=function(a){for(var b=Array(a.length),c=0;c<a.length;c++)b[c]=a.charCodeAt(c);return b};Graph.prototype.bytesToString=function(a){for(var b=Array(a.length),c=0;c<a.length;c++)b[c]=String.fromCharCode(a[c]);return b.join("")};
 Graph.prototype.compress=function(a){if(null==a||0==a.length||"undefined"===typeof pako)return a;a=this.bytesToString(pako.deflateRaw(encodeURIComponent(a)));return window.btoa?btoa(a):Base64.encode(a,!0)};Graph.prototype.decompress=function(a){if(null==a||0==a.length||"undefined"===typeof pako)return a;a=window.atob?atob(a):Base64.decode(a,!0);return this.zapGremlins(decodeURIComponent(this.bytesToString(pako.inflateRaw(a))))};
 Graph.prototype.zapGremlins=function(a){for(var b=[],c=0;c<a.length;c++){var d=a.charCodeAt(c);(32<=d||9==d||10==d||13==d)&&b.push(a.charAt(c))}return b.join("")};HoverIcons=function(a){this.graph=a;this.init()};HoverIcons.prototype.arrowSpacing=6;HoverIcons.prototype.updateDelay=500;HoverIcons.prototype.activationDelay=140;HoverIcons.prototype.currentState=null;HoverIcons.prototype.activeArrow=null;HoverIcons.prototype.inactiveOpacity=15;HoverIcons.prototype.checkCollisions=!0;
 HoverIcons.prototype.triangleUp=new mxImage(mxClient.IS_SVG?"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABoAAAAOCAYAAAAxDQxDAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAyJpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuMC1jMDYwIDYxLjEzNDc3NywgMjAxMC8wMi8xMi0xNzozMjowMCAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvIiB4bWxuczp4bXBNTT0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL21tLyIgeG1sbnM6c3RSZWY9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9zVHlwZS9SZXNvdXJjZVJlZiMiIHhtcDpDcmVhdG9yVG9vbD0iQWRvYmUgUGhvdG9zaG9wIENTNSBNYWNpbnRvc2giIHhtcE1NOkluc3RhbmNlSUQ9InhtcC5paWQ6N0ZBN0E3M0U5NjZGMTFFNTg5NTRDNzQwMTgwNDlEQzQiIHhtcE1NOkRvY3VtZW50SUQ9InhtcC5kaWQ6N0ZBN0E3M0Y5NjZGMTFFNTg5NTRDNzQwMTgwNDlEQzQiPiA8eG1wTU06RGVyaXZlZEZyb20gc3RSZWY6aW5zdGFuY2VJRD0ieG1wLmlpZDo3RkE3QTczQzk2NkYxMUU1ODk1NEM3NDAxODA0OURDNCIgc3RSZWY6ZG9jdW1lbnRJRD0ieG1wLmRpZDo3RkE3QTczRDk2NkYxMUU1ODk1NEM3NDAxODA0OURDNCIvPiA8L3JkZjpEZXNjcmlwdGlvbj4gPC9yZGY6UkRGPiA8L3g6eG1wbWV0YT4gPD94cGFja2V0IGVuZD0iciI/Pj625P8AAACySURBVHjaYmRY956BROABxF+A+AgpmpjIsGQjEO8CYidaWeQHtYQNiDmBeAspljGRYMlqqCUwALPMg1oWhWCxBNmyjVCHUGQRyJKlOCyBATaoQ/zItSgciFcQsATdshBSLYqC+oSZhMTCBnVYFLEWgRQuItESGGCG6o0iZFECBZagW5aAyyKQxBwKLUG2bD4Qp6FblAyVoIYlyGAmzDIWKGMmA+0AyGw2RjIKVbIAQIABAFJRHSSk2rPoAAAAAElFTkSuQmCC":
@@ -1631,12 +1631,12 @@ this.setDisplay("");null!=this.currentState&&this.currentState!=a&&d<this.activa
 this.reset())}else this.reset()};HoverIcons.prototype.setCurrentState=function(a){"eastwest"!=a.style.portConstraint&&(this.graph.container.appendChild(this.arrowUp),this.graph.container.appendChild(this.arrowDown));this.graph.container.appendChild(this.arrowRight);this.graph.container.appendChild(this.arrowLeft);this.currentState=a};
 (function(){var a=mxGraphView.prototype.resetValidationState;mxGraphView.prototype.resetValidationState=function(){a.apply(this,arguments);this.validEdges=[]};var b=mxGraphView.prototype.validateCellState;mxGraphView.prototype.validateCellState=function(a,c){var d=this.getState(a);null!=d&&this.graph.model.isEdge(d.cell)&&null!=d.style&&1!=d.style[mxConstants.STYLE_CURVED]&&!d.invalid&&this.updateLineJumps(d)&&this.graph.cellRenderer.redraw(d,!1,this.isRendering());d=b.apply(this,arguments);null!=
 d&&this.graph.model.isEdge(d.cell)&&1!=d.style[mxConstants.STYLE_CURVED]&&this.validEdges.push(d);return d};var c=mxCellRenderer.prototype.isShapeInvalid;mxCellRenderer.prototype.isShapeInvalid=function(a,b){return c.apply(this,arguments)||null!=a.routedPoints&&null!=b.routedPoints&&!mxUtils.equalPoints(b.routedPoints,a.routedPoints)};var d=mxGraphView.prototype.updateCellState;mxGraphView.prototype.updateCellState=function(a){d.apply(this,arguments);this.graph.model.isEdge(a.cell)&&1!=a.style[mxConstants.STYLE_CURVED]&&
-this.updateLineJumps(a)};mxGraphView.prototype.updateLineJumps=function(a){var b=a.absolutePoints;if(Graph.lineJumpsEnabled){var c=null!=a.routedPoints,d=null;if(null!=b&&null!=this.validEdges&&"none"!==mxUtils.getValue(a.style,"jumpStyle","none")){for(var e=function(b,c,e){var f=new mxPoint(c,e);f.type=b;d.push(f);f=null!=a.routedPoints?a.routedPoints[d.length-1]:null;return null==f||f.type!=b||f.x!=c||f.y!=e},f=.5*this.scale,c=!1,d=[],g=0;g<b.length-1;g++){for(var h=b[g+1],k=b[g],x=[],w=b[g+2];g<
-b.length-2&&mxUtils.ptSegDistSq(k.x,k.y,w.x,w.y,h.x,h.y)<1*this.scale*this.scale;)h=w,g++,w=b[g+2];for(var c=e(0,k.x,k.y)||c,z=0;z<this.validEdges.length;z++){var u=this.validEdges[z],F=u.absolutePoints;if(null!=F&&mxUtils.intersects(a,u))for(u=0;u<F.length-1;u++){for(var E=F[u+1],D=F[u],w=F[u+2];u<F.length-2&&mxUtils.ptSegDistSq(D.x,D.y,w.x,w.y,E.x,E.y)<1*this.scale*this.scale;)E=w,u++,w=F[u+2];w=mxUtils.intersection(k.x,k.y,h.x,h.y,D.x,D.y,E.x,E.y);if(null!=w&&(Math.abs(w.x-D.x)>f||Math.abs(w.y-
-D.y)>f)&&(Math.abs(w.x-E.x)>f||Math.abs(w.y-E.y)>f)){E=w.x-k.x;D=w.y-k.y;w={distSq:E*E+D*D,x:w.x,y:w.y};for(E=0;E<x.length;E++)if(x[E].distSq>w.distSq){x.splice(E,0,w);w=null;break}null==w||0!=x.length&&x[x.length-1].x===w.x&&x[x.length-1].y===w.y||x.push(w)}}}for(u=0;u<x.length;u++)c=e(1,x[u].x,x[u].y)||c}w=b[b.length-1];c=e(0,w.x,w.y)||c}a.routedPoints=d;return c}return!1};var e=mxConnector.prototype.paintLine;mxConnector.prototype.paintLine=function(a,b,c){this.routedPoints=null!=this.state?this.state.routedPoints:
-null;if(this.outline||null==this.state||null==this.style||null==this.state.routedPoints||0==this.state.routedPoints.length)e.apply(this,arguments);else{var d=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2,f=(parseInt(mxUtils.getValue(this.style,"jumpSize",Graph.defaultJumpSize))-2)/2+this.strokewidth,g=mxUtils.getValue(this.style,"jumpStyle","none"),h,k=!0,l=null,m=null;h=[];var w=null;a.begin();for(var z=0;z<this.state.routedPoints.length;z++){var u=this.state.routedPoints[z],
-F=new mxPoint(u.x/this.scale,u.y/this.scale);0==z?F=b[0]:z==this.state.routedPoints.length-1&&(F=b[b.length-1]);var E=!1;if(null!=l&&1==u.type){var D=this.state.routedPoints[z+1],u=D.x/this.scale-F.x,D=D.y/this.scale-F.y,u=u*u+D*D;null==w&&(w=new mxPoint(F.x-l.x,F.y-l.y),m=Math.sqrt(w.x*w.x+w.y*w.y),w.x=w.x*f/m,w.y=w.y*f/m);u>f*f&&0<m&&(u=l.x-F.x,D=l.y-F.y,u=u*u+D*D,u>f*f&&(E=new mxPoint(F.x-w.x,F.y-w.y),u=new mxPoint(F.x+w.x,F.y+w.y),h.push(E),this.addPoints(a,h,c,d,!1,null,k),h=0>Math.round(w.x)||
-0==Math.round(w.x)&&0>=Math.round(w.y)?1:-1,k=!1,"sharp"==g?(a.lineTo(E.x-w.y*h,E.y+w.x*h),a.lineTo(u.x-w.y*h,u.y+w.x*h),a.lineTo(u.x,u.y)):"arc"==g?(h*=1.3,a.curveTo(E.x-w.y*h,E.y+w.x*h,u.x-w.y*h,u.y+w.x*h,u.x,u.y)):(a.moveTo(u.x,u.y),k=!0),h=[u],E=!0))}else w=null;E||(h.push(F),l=F)}this.addPoints(a,h,c,d,!1,null,k);a.stroke()}};var f=mxGraphView.prototype.updateFloatingTerminalPoint;mxGraphView.prototype.updateFloatingTerminalPoint=function(a,b,c,d){if(null==b||null==a||"1"!=b.style.snapToPoint&&
+this.updateLineJumps(a)};mxGraphView.prototype.updateLineJumps=function(a){var b=a.absolutePoints;if(Graph.lineJumpsEnabled){var c=null!=a.routedPoints,d=null;if(null!=b&&null!=this.validEdges&&"none"!==mxUtils.getValue(a.style,"jumpStyle","none")){for(var e=function(b,c,e){var f=new mxPoint(c,e);f.type=b;d.push(f);f=null!=a.routedPoints?a.routedPoints[d.length-1]:null;return null==f||f.type!=b||f.x!=c||f.y!=e},f=.5*this.scale,c=!1,d=[],g=0;g<b.length-1;g++){for(var h=b[g+1],k=b[g],w=[],x=b[g+2];g<
+b.length-2&&mxUtils.ptSegDistSq(k.x,k.y,x.x,x.y,h.x,h.y)<1*this.scale*this.scale;)h=x,g++,x=b[g+2];for(var c=e(0,k.x,k.y)||c,y=0;y<this.validEdges.length;y++){var u=this.validEdges[y],D=u.absolutePoints;if(null!=D&&mxUtils.intersects(a,u))for(u=0;u<D.length-1;u++){for(var F=D[u+1],E=D[u],x=D[u+2];u<D.length-2&&mxUtils.ptSegDistSq(E.x,E.y,x.x,x.y,F.x,F.y)<1*this.scale*this.scale;)F=x,u++,x=D[u+2];x=mxUtils.intersection(k.x,k.y,h.x,h.y,E.x,E.y,F.x,F.y);if(null!=x&&(Math.abs(x.x-E.x)>f||Math.abs(x.y-
+E.y)>f)&&(Math.abs(x.x-F.x)>f||Math.abs(x.y-F.y)>f)){F=x.x-k.x;E=x.y-k.y;x={distSq:F*F+E*E,x:x.x,y:x.y};for(F=0;F<w.length;F++)if(w[F].distSq>x.distSq){w.splice(F,0,x);x=null;break}null==x||0!=w.length&&w[w.length-1].x===x.x&&w[w.length-1].y===x.y||w.push(x)}}}for(u=0;u<w.length;u++)c=e(1,w[u].x,w[u].y)||c}x=b[b.length-1];c=e(0,x.x,x.y)||c}a.routedPoints=d;return c}return!1};var e=mxConnector.prototype.paintLine;mxConnector.prototype.paintLine=function(a,b,c){this.routedPoints=null!=this.state?this.state.routedPoints:
+null;if(this.outline||null==this.state||null==this.style||null==this.state.routedPoints||0==this.state.routedPoints.length)e.apply(this,arguments);else{var d=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2,f=(parseInt(mxUtils.getValue(this.style,"jumpSize",Graph.defaultJumpSize))-2)/2+this.strokewidth,g=mxUtils.getValue(this.style,"jumpStyle","none"),h,k=!0,l=null,m=null;h=[];var x=null;a.begin();for(var y=0;y<this.state.routedPoints.length;y++){var u=this.state.routedPoints[y],
+D=new mxPoint(u.x/this.scale,u.y/this.scale);0==y?D=b[0]:y==this.state.routedPoints.length-1&&(D=b[b.length-1]);var F=!1;if(null!=l&&1==u.type){var E=this.state.routedPoints[y+1],u=E.x/this.scale-D.x,E=E.y/this.scale-D.y,u=u*u+E*E;null==x&&(x=new mxPoint(D.x-l.x,D.y-l.y),m=Math.sqrt(x.x*x.x+x.y*x.y),x.x=x.x*f/m,x.y=x.y*f/m);u>f*f&&0<m&&(u=l.x-D.x,E=l.y-D.y,u=u*u+E*E,u>f*f&&(F=new mxPoint(D.x-x.x,D.y-x.y),u=new mxPoint(D.x+x.x,D.y+x.y),h.push(F),this.addPoints(a,h,c,d,!1,null,k),h=0>Math.round(x.x)||
+0==Math.round(x.x)&&0>=Math.round(x.y)?1:-1,k=!1,"sharp"==g?(a.lineTo(F.x-x.y*h,F.y+x.x*h),a.lineTo(u.x-x.y*h,u.y+x.x*h),a.lineTo(u.x,u.y)):"arc"==g?(h*=1.3,a.curveTo(F.x-x.y*h,F.y+x.x*h,u.x-x.y*h,u.y+x.x*h,u.x,u.y)):(a.moveTo(u.x,u.y),k=!0),h=[u],F=!0))}else x=null;F||(h.push(D),l=D)}this.addPoints(a,h,c,d,!1,null,k);a.stroke()}};var f=mxGraphView.prototype.updateFloatingTerminalPoint;mxGraphView.prototype.updateFloatingTerminalPoint=function(a,b,c,d){if(null==b||null==a||"1"!=b.style.snapToPoint&&
 "1"!=a.style.snapToPoint)f.apply(this,arguments);else{b=this.getTerminalPort(a,b,d);var e=this.getNextPoint(a,c,d),g=this.graph.isOrthogonal(a),h=mxUtils.toRadians(Number(b.style[mxConstants.STYLE_ROTATION]||"0")),k=new mxPoint(b.getCenterX(),b.getCenterY());if(0!=h)var l=Math.cos(-h),m=Math.sin(-h),e=mxUtils.getRotatedPoint(e,l,m,k);l=parseFloat(a.style[mxConstants.STYLE_PERIMETER_SPACING]||0);l+=parseFloat(a.style[d?mxConstants.STYLE_SOURCE_PERIMETER_SPACING:mxConstants.STYLE_TARGET_PERIMETER_SPACING]||
 0);e=this.getPerimeterPoint(b,e,0==h&&g,l);0!=h&&(l=Math.cos(h),m=Math.sin(h),e=mxUtils.getRotatedPoint(e,l,m,k));a.setAbsoluteTerminalPoint(this.snapToAnchorPoint(a,b,c,d,e),d)}};mxGraphView.prototype.snapToAnchorPoint=function(a,b,c,d,e){if(null!=b&&null!=a){a=this.graph.getAllConnectionConstraints(b);d=c=null;for(var f=0;f<a.length;f++){var g=this.graph.getConnectionPoint(b,a[f]);if(null!=g){var h=(g.x-e.x)*(g.x-e.x)+(g.y-e.y)*(g.y-e.y);if(null==d||h<d)c=g,d=h}}null!=c&&(e=c)}return e};var g=mxStencil.prototype.evaluateTextAttribute;
 mxStencil.prototype.evaluateTextAttribute=function(a,b,c){var d=g.apply(this,arguments);"1"==a.getAttribute("placeholders")&&null!=c.state&&(d=c.state.view.graph.replacePlaceholders(c.state.cell,d));return d};var h=mxCellRenderer.prototype.createShape;mxCellRenderer.prototype.createShape=function(a){if(null!=a.style&&"undefined"!==typeof pako){var b=mxUtils.getValue(a.style,mxConstants.STYLE_SHAPE,null);if(null!=b&&"stencil("==b.substring(0,8))try{var c=b.substring(8,b.length-1),d=mxUtils.parseXml(a.view.graph.decompress(c));
@@ -1655,7 +1655,7 @@ this.graph.currentEdgeStyle[b];return a};var c=mxConnectionHandler.prototype.cre
 b.apply(this,arguments);this.error=null;return c});return a};Graph.prototype.defaultVertexStyle={};Graph.prototype.defaultEdgeStyle={edgeStyle:"orthogonalEdgeStyle",rounded:"0",jettySize:"auto",orthogonalLoop:"1"};Graph.prototype.createCurrentEdgeStyle=function(){var a="edgeStyle="+(this.currentEdgeStyle.edgeStyle||"none")+";";null!=this.currentEdgeStyle.shape&&(a+="shape="+this.currentEdgeStyle.shape+";");null!=this.currentEdgeStyle.curved&&(a+="curved="+this.currentEdgeStyle.curved+";");null!=this.currentEdgeStyle.rounded&&
 (a+="rounded="+this.currentEdgeStyle.rounded+";");null!=this.currentEdgeStyle.comic&&(a+="comic="+this.currentEdgeStyle.comic+";");null!=this.currentEdgeStyle.jumpStyle&&(a+="jumpStyle="+this.currentEdgeStyle.jumpStyle+";");null!=this.currentEdgeStyle.jumpSize&&(a+="jumpSize="+this.currentEdgeStyle.jumpSize+";");"elbowEdgeStyle"==this.currentEdgeStyle.edgeStyle&&null!=this.currentEdgeStyle.elbow&&(a+="elbow="+this.currentEdgeStyle.elbow+";");return a=null!=this.currentEdgeStyle.html?a+("html="+this.currentEdgeStyle.html+
 ";"):a+"html=1;"};Graph.prototype.getPagePadding=function(){return new mxPoint(0,0)};Graph.prototype.loadStylesheet=function(){var a=null!=this.themes?this.themes[this.defaultThemeName]:mxStyleRegistry.dynamicLoading?mxUtils.load(STYLE_PATH+"/default.xml").getDocumentElement():null;null!=a&&(new mxCodec(a.ownerDocument)).decode(a,this.getStylesheet())};Graph.prototype.getAllConnectionConstraints=function(a,b){if(null!=a){var c=mxUtils.getValue(a.style,"points",null);if(null!=c){var d=[];try{for(var e=
-JSON.parse(c),c=0;c<e.length;c++){var f=e[c];d.push(new mxConnectionConstraint(new mxPoint(f[0],f[1]),2<f.length?"0"!=f[2]:!0))}}catch(H){}return d}if(null!=a.shape)if(null!=a.shape.stencil){if(null!=a.shape.stencil)return a.shape.stencil.constraints}else if(null!=a.shape.constraints)return a.shape.constraints}return null};Graph.prototype.flipEdge=function(a){if(null!=a){var b=this.view.getState(a),b=null!=b?b.style:this.getCellStyle(a);null!=b&&(b=mxUtils.getValue(b,mxConstants.STYLE_ELBOW,mxConstants.ELBOW_HORIZONTAL)==
+JSON.parse(c),c=0;c<e.length;c++){var f=e[c];d.push(new mxConnectionConstraint(new mxPoint(f[0],f[1]),2<f.length?"0"!=f[2]:!0))}}catch(K){}return d}if(null!=a.shape)if(null!=a.shape.stencil){if(null!=a.shape.stencil)return a.shape.stencil.constraints}else if(null!=a.shape.constraints)return a.shape.constraints}return null};Graph.prototype.flipEdge=function(a){if(null!=a){var b=this.view.getState(a),b=null!=b?b.style:this.getCellStyle(a);null!=b&&(b=mxUtils.getValue(b,mxConstants.STYLE_ELBOW,mxConstants.ELBOW_HORIZONTAL)==
 mxConstants.ELBOW_HORIZONTAL?mxConstants.ELBOW_VERTICAL:mxConstants.ELBOW_HORIZONTAL,this.setCellStyles(mxConstants.STYLE_ELBOW,b,[a]))}};Graph.prototype.isValidRoot=function(a){for(var b=this.model.getChildCount(a),c=0,d=0;d<b;d++){var e=this.model.getChildAt(a,d);this.model.isVertex(e)&&(e=this.getCellGeometry(e),null==e||e.relative||c++)}return 0<c||this.isContainer(a)};Graph.prototype.isValidDropTarget=function(a){var b=this.view.getState(a),b=null!=b?b.style:this.getCellStyle(a);return"1"!=mxUtils.getValue(b,
 "part","0")&&(this.isContainer(a)||mxGraph.prototype.isValidDropTarget.apply(this,arguments)&&"0"!=mxUtils.getValue(b,"dropTarget","1"))};Graph.prototype.createGroupCell=function(){var a=mxGraph.prototype.createGroupCell.apply(this,arguments);a.setStyle("group");return a};Graph.prototype.isExtendParentsOnAdd=function(a){var b=mxGraph.prototype.isExtendParentsOnAdd.apply(this,arguments);if(b&&null!=a&&null!=this.layoutManager){var c=this.model.getParent(a);null!=c&&(c=this.layoutManager.getLayout(c),
 null!=c&&c.constructor==mxStackLayout&&(b=!1))}return b};Graph.prototype.getPreferredSizeForCell=function(a){var b=mxGraph.prototype.getPreferredSizeForCell.apply(this,arguments);null!=b&&(b.width+=10,b.height+=4,this.gridEnabled&&(b.width=this.snap(b.width),b.height=this.snap(b.height)));return b};Graph.prototype.turnShapes=function(a){var b=this.getModel(),c=[];b.beginUpdate();try{for(var d=0;d<a.length;d++){var e=a[d];if(b.isEdge(e)){var f=b.getTerminal(e,!0),g=b.getTerminal(e,!1);b.setTerminal(e,
@@ -1696,7 +1696,7 @@ c.setAttribute("target",this.linkTarget);60<b.length&&(b=b.substring(0,36)+"..."
 this.getCellAt(b.graphX,b.graphY);null!=c&&this.isSwimlane(c)&&this.hitsSwimlaneContent(c,b.graphX,b.graphY)||(b.state=this.view.getState(c),null!=b.state&&null!=b.state.shape&&(this.container.style.cursor=b.state.shape.node.style.cursor))}null==b.getState()&&this.isEnabled()&&(this.container.style.cursor="default");return b};var b=!1,c=!1,d=!1,e=this.fireMouseEvent;this.fireMouseEvent=function(a,f,g){a==mxEvent.MOUSE_DOWN&&(f=this.updateMouseEvent(f),b=this.isCellSelected(f.getCell()),c=this.isSelectionEmpty(),
 d=this.popupMenuHandler.isMenuShowing());e.apply(this,arguments)};this.popupMenuHandler.mouseUp=mxUtils.bind(this,function(a,e){this.popupMenuHandler.popupTrigger=!this.isEditing()&&this.isEnabled()&&(null==e.getState()||!e.isSource(e.getState().control))&&(this.popupMenuHandler.popupTrigger||!d&&!mxEvent.isMouseEvent(e.getEvent())&&(c&&null==e.getCell()&&this.isSelectionEmpty()||b&&this.isCellSelected(e.getCell())));mxPopupMenuHandler.prototype.mouseUp.apply(this.popupMenuHandler,arguments)})};mxCellEditor.prototype.isContentEditing=
 function(){var a=this.graph.view.getState(this.editingCell);return null!=a&&1==a.style.html};mxCellEditor.prototype.saveSelection=function(){if(window.getSelection){if(sel=window.getSelection(),sel.getRangeAt&&sel.rangeCount){for(var a=[],b=0,c=sel.rangeCount;b<c;++b)a.push(sel.getRangeAt(b));return a}}else if(document.selection&&document.selection.createRange)return document.selection.createRange();return null};mxCellEditor.prototype.restoreSelection=function(a){try{if(a)if(window.getSelection){sel=
-window.getSelection();sel.removeAllRanges();for(var b=0,c=a.length;b<c;++b)sel.addRange(a[b])}else document.selection&&a.select&&a.select()}catch(I){}};var e=mxCellRenderer.prototype.initializeLabel;mxCellRenderer.prototype.initializeLabel=function(a){null!=a.text&&(a.text.replaceLinefeeds="0"!=mxUtils.getValue(a.style,"nl2Br","1"));e.apply(this,arguments)};var f=mxConstraintHandler.prototype.update;mxConstraintHandler.prototype.update=function(a,b){this.isKeepFocusEvent(a)||!mxEvent.isAltDown(a.getEvent())?
+window.getSelection();sel.removeAllRanges();for(var b=0,c=a.length;b<c;++b)sel.addRange(a[b])}else document.selection&&a.select&&a.select()}catch(J){}};var e=mxCellRenderer.prototype.initializeLabel;mxCellRenderer.prototype.initializeLabel=function(a){null!=a.text&&(a.text.replaceLinefeeds="0"!=mxUtils.getValue(a.style,"nl2Br","1"));e.apply(this,arguments)};var f=mxConstraintHandler.prototype.update;mxConstraintHandler.prototype.update=function(a,b){this.isKeepFocusEvent(a)||!mxEvent.isAltDown(a.getEvent())?
 f.apply(this,arguments):this.reset()};mxGuide.prototype.createGuideShape=function(a){return new mxPolyline([],mxConstants.GUIDE_COLOR,mxConstants.GUIDE_STROKEWIDTH)};mxCellEditor.prototype.escapeCancelsEditing=!1;var g=mxCellEditor.prototype.startEditing;mxCellEditor.prototype.startEditing=function(a,b){g.apply(this,arguments);var c=this.graph.view.getState(a);this.textarea.className=null!=c&&1==c.style.html?"mxCellEditor geContentEditable":"mxCellEditor mxPlainTextEditor";this.codeViewMode=!1;this.switchSelectionState=
 null;this.graph.setSelectionCell(a);var c=this.graph.getModel().getParent(a),d=this.graph.getCellGeometry(a);this.graph.getModel().isEdge(c)&&null!=d&&d.relative||this.graph.getModel().isEdge(a)?mxClient.IS_QUIRKS?this.textarea.style.border="gray dotted 1px":this.textarea.style.outline=mxClient.IS_IE||mxClient.IS_IE11||mxClient.IS_FF&&mxClient.IS_WIN?"gray dotted 1px":"":mxClient.IS_QUIRKS&&(this.textarea.style.outline="none",this.textarea.style.border="")};var h=mxCellEditor.prototype.installListeners;
 mxCellEditor.prototype.installListeners=function(a){function b(a,c){c.originalNode=a;a=a.firstChild;for(var d=c.firstChild;null!=a&&null!=d;)b(a,d),a=a.nextSibling,d=d.nextSibling;return c}function c(a,b){if(null!=a)if(b.originalNode!=a)d(a);else for(a=a.firstChild,b=b.firstChild;null!=a;){var e=a.nextSibling;null==b?d(a):(c(a,b),b=b.nextSibling);a=e}}function d(a){for(var b=a.firstChild;null!=b;){var c=b.nextSibling;d(b);b=c}1==a.nodeType&&("BR"===a.nodeName||null!=a.firstChild)||3==a.nodeType&&
@@ -1738,14 +1738,14 @@ e,this.graph.getDefaultParent(),!0,!0),c=0;c<h.length;c++)if(this.graph.isCellMo
 d=mxUtils.getOffset(this.graph.container);c.x-=d.x;c.y-=d.y;var d=b.getX()+c.x,c=b.getY()+c.y,e=this.first.x-d,f=this.first.y-c,g=this.graph.tolerance;if(null!=this.div||Math.abs(e)>g||Math.abs(f)>g)null==this.div&&(this.div=this.createShape()),mxUtils.clearSelection(),this.update(d,c),this.isSpaceEvent(b)?(d=this.x+this.width,c=this.y+this.height,e=this.graph.view.scale,mxEvent.isAltDown(b.getEvent())||(this.width=this.graph.snap(this.width/e)*e,this.height=this.graph.snap(this.height/e)*e,this.graph.isGridEnabled()||
 (this.width<this.graph.tolerance&&(this.width=0),this.height<this.graph.tolerance&&(this.height=0)),this.x<this.first.x&&(this.x=d-this.width),this.y<this.first.y&&(this.y=c-this.height)),this.div.style.borderStyle="dashed",this.div.style.backgroundColor="white",this.div.style.left=this.x+"px",this.div.style.top=this.y+"px",this.div.style.width=Math.max(0,this.width)+"px",this.div.style.height=this.graph.container.clientHeight+"px",this.div.style.borderWidth=0>=this.width?"0px 1px 0px 0px":"0px 1px 0px 1px",
 null==this.secondDiv&&(this.secondDiv=this.div.cloneNode(!0),this.div.parentNode.appendChild(this.secondDiv)),this.secondDiv.style.left=this.x+"px",this.secondDiv.style.top=this.y+"px",this.secondDiv.style.width=this.graph.container.clientWidth+"px",this.secondDiv.style.height=Math.max(0,this.height)+"px",this.secondDiv.style.borderWidth=0>=this.height?"1px 0px 0px 0px":"1px 0px 1px 0px"):(this.div.style.backgroundColor="",this.div.style.borderWidth="",this.div.style.borderStyle="",null!=this.secondDiv&&
-(this.secondDiv.parentNode.removeChild(this.secondDiv),this.secondDiv=null)),b.consume()}};var q=mxRubberband.prototype.reset;mxRubberband.prototype.reset=function(){null!=this.secondDiv&&(this.secondDiv.parentNode.removeChild(this.secondDiv),this.secondDiv=null);q.apply(this,arguments)};var t=(new Date).getTime(),y=0,x=mxEdgeHandler.prototype.updatePreviewState;mxEdgeHandler.prototype.updatePreviewState=function(a,b,c,d){x.apply(this,arguments);c!=this.currentTerminalState?(t=(new Date).getTime(),
-y=0):y=(new Date).getTime()-t;this.currentTerminalState=c};var w=mxEdgeHandler.prototype.isOutlineConnectEvent;mxEdgeHandler.prototype.isOutlineConnectEvent=function(a){return null!=this.currentTerminalState&&a.getState()==this.currentTerminalState&&2E3<y||(null==this.currentTerminalState||"0"!=mxUtils.getValue(this.currentTerminalState.style,"outlineConnect","1"))&&w.apply(this,arguments)};mxVertexHandler.prototype.isCustomHandleEvent=function(a){return!mxEvent.isShiftDown(a.getEvent())};mxEdgeHandler.prototype.createHandleShape=
+(this.secondDiv.parentNode.removeChild(this.secondDiv),this.secondDiv=null)),b.consume()}};var q=mxRubberband.prototype.reset;mxRubberband.prototype.reset=function(){null!=this.secondDiv&&(this.secondDiv.parentNode.removeChild(this.secondDiv),this.secondDiv=null);q.apply(this,arguments)};var t=(new Date).getTime(),z=0,w=mxEdgeHandler.prototype.updatePreviewState;mxEdgeHandler.prototype.updatePreviewState=function(a,b,c,d){w.apply(this,arguments);c!=this.currentTerminalState?(t=(new Date).getTime(),
+z=0):z=(new Date).getTime()-t;this.currentTerminalState=c};var x=mxEdgeHandler.prototype.isOutlineConnectEvent;mxEdgeHandler.prototype.isOutlineConnectEvent=function(a){return null!=this.currentTerminalState&&a.getState()==this.currentTerminalState&&2E3<z||(null==this.currentTerminalState||"0"!=mxUtils.getValue(this.currentTerminalState.style,"outlineConnect","1"))&&x.apply(this,arguments)};mxVertexHandler.prototype.isCustomHandleEvent=function(a){return!mxEvent.isShiftDown(a.getEvent())};mxEdgeHandler.prototype.createHandleShape=
 function(a,b){var c=null!=a&&0==a,d=this.state.getVisibleTerminalState(c),e=null!=a&&(0==a||a>=this.state.absolutePoints.length-1||this.constructor==mxElbowEdgeHandler&&2==a)?this.graph.getConnectionConstraint(this.state,d,c):null,c=null!=(null!=e?this.graph.getConnectionPoint(this.state.getVisibleTerminalState(c),e):null)?this.fixedHandleImage:null!=e&&null!=d?this.terminalHandleImage:this.handleImage;if(null!=c)return c=new mxImageShape(new mxRectangle(0,0,c.width,c.height),c.src),c.preserveImageAspect=
-!1,c;c=mxConstants.HANDLE_SIZE;this.preferHtml&&--c;return new mxRectangleShape(new mxRectangle(0,0,c,c),mxConstants.HANDLE_FILLCOLOR,mxConstants.HANDLE_STROKECOLOR)};var z=mxVertexHandler.prototype.createSizerShape;mxVertexHandler.prototype.createSizerShape=function(a,b,c){this.handleImage=b==mxEvent.ROTATION_HANDLE?HoverIcons.prototype.rotationHandle:b==mxEvent.LABEL_HANDLE?this.secondaryHandleImage:this.handleImage;return z.apply(this,arguments)};var u=mxGraphHandler.prototype.getBoundingBox;mxGraphHandler.prototype.getBoundingBox=
-function(a){if(null!=a&&1==a.length){var b=this.graph.getModel(),c=b.getParent(a[0]),d=this.graph.getCellGeometry(a[0]);if(b.isEdge(c)&&null!=d&&d.relative&&(b=this.graph.view.getState(a[0]),null!=b&&2>b.width&&2>b.height&&null!=b.text&&null!=b.text.boundingBox))return mxRectangle.fromRectangle(b.text.boundingBox)}return u.apply(this,arguments)};var F=mxVertexHandler.prototype.getSelectionBounds;mxVertexHandler.prototype.getSelectionBounds=function(a){var b=this.graph.getModel(),c=b.getParent(a.cell),
-d=this.graph.getCellGeometry(a.cell);return b.isEdge(c)&&null!=d&&d.relative&&2>a.width&&2>a.height&&null!=a.text&&null!=a.text.boundingBox?(b=a.text.unrotatedBoundingBox||a.text.boundingBox,new mxRectangle(Math.round(b.x),Math.round(b.y),Math.round(b.width),Math.round(b.height))):F.apply(this,arguments)};var E=mxVertexHandler.prototype.mouseDown;mxVertexHandler.prototype.mouseDown=function(a,b){var c=this.graph.getModel(),d=c.getParent(this.state.cell),e=this.graph.getCellGeometry(this.state.cell);
-(this.getHandleForEvent(b)==mxEvent.ROTATION_HANDLE||!c.isEdge(d)||null==e||!e.relative||null==this.state||2<=this.state.width||2<=this.state.height)&&E.apply(this,arguments)};mxVertexHandler.prototype.isRotationHandleVisible=function(){return this.graph.isEnabled()&&this.rotationEnabled&&this.graph.isCellRotatable(this.state.cell)&&(0>=mxGraphHandler.prototype.maxCells||this.graph.getSelectionCount()<mxGraphHandler.prototype.maxCells)};mxVertexHandler.prototype.rotateClick=function(){this.state.view.graph.turnShapes([this.state.cell])};
-var D=mxVertexHandler.prototype.mouseMove;mxVertexHandler.prototype.mouseMove=function(a,b){D.apply(this,arguments);null!=this.graph.graphHandler.first&&null!=this.rotationShape&&null!=this.rotationShape.node&&(this.rotationShape.node.style.display="none")};var C=mxVertexHandler.prototype.mouseUp;mxVertexHandler.prototype.mouseUp=function(a,b){C.apply(this,arguments);null!=this.rotationShape&&null!=this.rotationShape.node&&(this.rotationShape.node.style.display=1==this.graph.getSelectionCount()?"":
+!1,c;c=mxConstants.HANDLE_SIZE;this.preferHtml&&--c;return new mxRectangleShape(new mxRectangle(0,0,c,c),mxConstants.HANDLE_FILLCOLOR,mxConstants.HANDLE_STROKECOLOR)};var y=mxVertexHandler.prototype.createSizerShape;mxVertexHandler.prototype.createSizerShape=function(a,b,c){this.handleImage=b==mxEvent.ROTATION_HANDLE?HoverIcons.prototype.rotationHandle:b==mxEvent.LABEL_HANDLE?this.secondaryHandleImage:this.handleImage;return y.apply(this,arguments)};var u=mxGraphHandler.prototype.getBoundingBox;mxGraphHandler.prototype.getBoundingBox=
+function(a){if(null!=a&&1==a.length){var b=this.graph.getModel(),c=b.getParent(a[0]),d=this.graph.getCellGeometry(a[0]);if(b.isEdge(c)&&null!=d&&d.relative&&(b=this.graph.view.getState(a[0]),null!=b&&2>b.width&&2>b.height&&null!=b.text&&null!=b.text.boundingBox))return mxRectangle.fromRectangle(b.text.boundingBox)}return u.apply(this,arguments)};var D=mxVertexHandler.prototype.getSelectionBounds;mxVertexHandler.prototype.getSelectionBounds=function(a){var b=this.graph.getModel(),c=b.getParent(a.cell),
+d=this.graph.getCellGeometry(a.cell);return b.isEdge(c)&&null!=d&&d.relative&&2>a.width&&2>a.height&&null!=a.text&&null!=a.text.boundingBox?(b=a.text.unrotatedBoundingBox||a.text.boundingBox,new mxRectangle(Math.round(b.x),Math.round(b.y),Math.round(b.width),Math.round(b.height))):D.apply(this,arguments)};var F=mxVertexHandler.prototype.mouseDown;mxVertexHandler.prototype.mouseDown=function(a,b){var c=this.graph.getModel(),d=c.getParent(this.state.cell),e=this.graph.getCellGeometry(this.state.cell);
+(this.getHandleForEvent(b)==mxEvent.ROTATION_HANDLE||!c.isEdge(d)||null==e||!e.relative||null==this.state||2<=this.state.width||2<=this.state.height)&&F.apply(this,arguments)};mxVertexHandler.prototype.isRotationHandleVisible=function(){return this.graph.isEnabled()&&this.rotationEnabled&&this.graph.isCellRotatable(this.state.cell)&&(0>=mxGraphHandler.prototype.maxCells||this.graph.getSelectionCount()<mxGraphHandler.prototype.maxCells)};mxVertexHandler.prototype.rotateClick=function(){this.state.view.graph.turnShapes([this.state.cell])};
+var E=mxVertexHandler.prototype.mouseMove;mxVertexHandler.prototype.mouseMove=function(a,b){E.apply(this,arguments);null!=this.graph.graphHandler.first&&null!=this.rotationShape&&null!=this.rotationShape.node&&(this.rotationShape.node.style.display="none")};var C=mxVertexHandler.prototype.mouseUp;mxVertexHandler.prototype.mouseUp=function(a,b){C.apply(this,arguments);null!=this.rotationShape&&null!=this.rotationShape.node&&(this.rotationShape.node.style.display=1==this.graph.getSelectionCount()?"":
 "none")};var G=mxVertexHandler.prototype.init;mxVertexHandler.prototype.init=function(){G.apply(this,arguments);var a=!1;null!=this.rotationShape&&this.rotationShape.node.setAttribute("title",mxResources.get("rotateTooltip"));var b=mxUtils.bind(this,function(){null!=this.rotationShape&&null!=this.rotationShape.node&&(this.rotationShape.node.style.display=1==this.graph.getSelectionCount()?"":"none");null!=this.specialHandle&&(this.specialHandle.node.style.display=this.graph.isEnabled()&&this.graph.getSelectionCount()<
 this.graph.graphHandler.maxCells?"":"none");this.redrawHandles()});this.selectionHandler=mxUtils.bind(this,function(a,c){b()});this.graph.getSelectionModel().addListener(mxEvent.CHANGE,this.selectionHandler);this.changeHandler=mxUtils.bind(this,function(a,c){this.updateLinkHint(this.graph.getLinkForCell(this.state.cell),this.graph.getLinksForState(this.state));b()});this.graph.getModel().addListener(mxEvent.CHANGE,this.changeHandler);this.editingHandler=mxUtils.bind(this,function(a,b){this.redrawHandles()});
 this.graph.addListener(mxEvent.EDITING_STOPPED,this.editingHandler);var c=this.graph.getLinkForCell(this.state.cell),d=this.graph.getLinksForState(this.state);this.updateLinkHint(c,d);if(null!=c||null!=d&&0<d.length)a=!0;a&&this.redrawHandles()};mxVertexHandler.prototype.updateLinkHint=function(b,c){if(null==b&&(null==c||0==c.length)||1<this.graph.getSelectionCount())null!=this.linkHint&&(this.linkHint.parentNode.removeChild(this.linkHint),this.linkHint=null);else if(null!=b||null!=c&&0<c.length){null==
@@ -1753,20 +1753,20 @@ this.linkHint&&(this.linkHint=a(),this.linkHint.style.padding="6px 8px 6px 8px",
 d.setAttribute("width","11");d.setAttribute("height","11");d.style.marginLeft="10px";d.style.marginBottom="-1px";d.style.cursor="pointer";this.linkHint.appendChild(d);mxEvent.addListener(d,"click",mxUtils.bind(this,function(a){this.graph.setSelectionCell(this.state.cell);this.graph.editLink();mxEvent.consume(a)}))}if(null!=c)for(d=0;d<c.length;d++){var e=document.createElement("div");e.style.marginTop=null!=b||0<d?"6px":"0px";e.appendChild(this.graph.createLinkForHint(c[d].getAttribute("href"),mxUtils.getTextContent(c[d])));
 this.linkHint.appendChild(e)}}};mxEdgeHandler.prototype.updateLinkHint=mxVertexHandler.prototype.updateLinkHint;var B=mxEdgeHandler.prototype.init;mxEdgeHandler.prototype.init=function(){B.apply(this,arguments);this.constraintHandler.isEnabled=mxUtils.bind(this,function(){return this.state.view.graph.connectionHandler.isEnabled()});var a=mxUtils.bind(this,function(){null!=this.linkHint&&(this.linkHint.style.display=1==this.graph.getSelectionCount()?"":"none");null!=this.labelShape&&(this.labelShape.node.style.display=
 this.graph.isEnabled()&&this.graph.getSelectionCount()<this.graph.graphHandler.maxCells?"":"none")});this.selectionHandler=mxUtils.bind(this,function(b,c){a()});this.graph.getSelectionModel().addListener(mxEvent.CHANGE,this.selectionHandler);this.changeHandler=mxUtils.bind(this,function(b,c){this.updateLinkHint(this.graph.getLinkForCell(this.state.cell),this.graph.getLinksForState(this.state));a();this.redrawHandles()});this.graph.getModel().addListener(mxEvent.CHANGE,this.changeHandler);var b=this.graph.getLinkForCell(this.state.cell),
-c=this.graph.getLinksForState(this.state);if(null!=b||null!=c&&0<c.length)this.updateLinkHint(b,c),this.redrawHandles()};var M=mxConnectionHandler.prototype.init;mxConnectionHandler.prototype.init=function(){M.apply(this,arguments);this.constraintHandler.isEnabled=mxUtils.bind(this,function(){return this.graph.connectionHandler.isEnabled()})};var K=mxVertexHandler.prototype.redrawHandles;mxVertexHandler.prototype.redrawHandles=function(){K.apply(this);if(null!=this.state&&null!=this.linkHint){var a=
+c=this.graph.getLinksForState(this.state);if(null!=b||null!=c&&0<c.length)this.updateLinkHint(b,c),this.redrawHandles()};var M=mxConnectionHandler.prototype.init;mxConnectionHandler.prototype.init=function(){M.apply(this,arguments);this.constraintHandler.isEnabled=mxUtils.bind(this,function(){return this.graph.connectionHandler.isEnabled()})};var L=mxVertexHandler.prototype.redrawHandles;mxVertexHandler.prototype.redrawHandles=function(){L.apply(this);if(null!=this.state&&null!=this.linkHint){var a=
 new mxPoint(this.state.getCenterX(),this.state.getCenterY()),b=new mxRectangle(this.state.x,this.state.y-22,this.state.width+24,this.state.height+22),c=mxUtils.getBoundingBox(b,this.state.style[mxConstants.STYLE_ROTATION]||"0",a),a=null!=c?mxUtils.getBoundingBox(this.state,this.state.style[mxConstants.STYLE_ROTATION]||"0"):this.state,b=null!=this.state.text?this.state.text.boundingBox:null;null==c&&(c=this.state);c=c.y+c.height;null!=b&&(c=Math.max(c,b.y+b.height));this.linkHint.style.left=Math.round(a.x+
-(a.width-this.linkHint.clientWidth)/2)+"px";this.linkHint.style.top=Math.round(c+this.verticalOffset/2+6+this.state.view.graph.tolerance)+"px"}};var L=mxVertexHandler.prototype.reset;mxVertexHandler.prototype.reset=function(){L.apply(this,arguments);null!=this.rotationShape&&null!=this.rotationShape.node&&(this.rotationShape.node.style.display=1==this.graph.getSelectionCount()?"":"none")};var V=mxVertexHandler.prototype.destroy;mxVertexHandler.prototype.destroy=function(){V.apply(this,arguments);
+(a.width-this.linkHint.clientWidth)/2)+"px";this.linkHint.style.top=Math.round(c+this.verticalOffset/2+6+this.state.view.graph.tolerance)+"px"}};var H=mxVertexHandler.prototype.reset;mxVertexHandler.prototype.reset=function(){H.apply(this,arguments);null!=this.rotationShape&&null!=this.rotationShape.node&&(this.rotationShape.node.style.display=1==this.graph.getSelectionCount()?"":"none")};var U=mxVertexHandler.prototype.destroy;mxVertexHandler.prototype.destroy=function(){U.apply(this,arguments);
 null!=this.linkHint&&(this.linkHint.parentNode.removeChild(this.linkHint),this.linkHint=null);null!=this.selectionHandler&&(this.graph.getSelectionModel().removeListener(this.selectionHandler),this.selectionHandler=null);null!=this.changeHandler&&(this.graph.getModel().removeListener(this.changeHandler),this.changeHandler=null);null!=this.editingHandler&&(this.graph.removeListener(this.editingHandler),this.editingHandler=null)};var S=mxEdgeHandler.prototype.redrawHandles;mxEdgeHandler.prototype.redrawHandles=
-function(){if(null!=this.marker&&(S.apply(this),null!=this.state&&null!=this.linkHint)){var a=this.state;null!=this.state.text&&null!=this.state.text.bounds&&(a=new mxRectangle(a.x,a.y,a.width,a.height),a.add(this.state.text.bounds));this.linkHint.style.left=Math.round(a.x+(a.width-this.linkHint.clientWidth)/2)+"px";this.linkHint.style.top=Math.round(a.y+a.height+6+this.state.view.graph.tolerance)+"px"}};var Z=mxEdgeHandler.prototype.reset;mxEdgeHandler.prototype.reset=function(){Z.apply(this,arguments);
+function(){if(null!=this.marker&&(S.apply(this),null!=this.state&&null!=this.linkHint)){var a=this.state;null!=this.state.text&&null!=this.state.text.bounds&&(a=new mxRectangle(a.x,a.y,a.width,a.height),a.add(this.state.text.bounds));this.linkHint.style.left=Math.round(a.x+(a.width-this.linkHint.clientWidth)/2)+"px";this.linkHint.style.top=Math.round(a.y+a.height+6+this.state.view.graph.tolerance)+"px"}};var ba=mxEdgeHandler.prototype.reset;mxEdgeHandler.prototype.reset=function(){ba.apply(this,arguments);
 null!=this.linkHint&&(this.linkHint.style.visibility="")};var A=mxEdgeHandler.prototype.destroy;mxEdgeHandler.prototype.destroy=function(){A.apply(this,arguments);null!=this.linkHint&&(this.linkHint.parentNode.removeChild(this.linkHint),this.linkHint=null);null!=this.selectionHandler&&(this.graph.getSelectionModel().removeListener(this.selectionHandler),this.selectionHandler=null);null!=this.changeHandler&&(this.graph.getModel().removeListener(this.changeHandler),this.changeHandler=null)}}();(function(){function a(){mxCylinder.call(this)}function b(){mxActor.call(this)}function c(){mxCylinder.call(this)}function d(){mxCylinder.call(this)}function e(){mxCylinder.call(this)}function f(){mxActor.call(this)}function g(){mxCylinder.call(this)}function h(){mxActor.call(this)}function k(){mxActor.call(this)}function l(){mxActor.call(this)}function m(){mxActor.call(this)}function n(){mxActor.call(this)}function p(){mxActor.call(this)}function r(){mxActor.call(this)}function q(a,b){this.canvas=
 a;this.canvas.setLineJoin("round");this.canvas.setLineCap("round");this.defaultVariation=b;this.originalLineTo=this.canvas.lineTo;this.canvas.lineTo=mxUtils.bind(this,q.prototype.lineTo);this.originalMoveTo=this.canvas.moveTo;this.canvas.moveTo=mxUtils.bind(this,q.prototype.moveTo);this.originalClose=this.canvas.close;this.canvas.close=mxUtils.bind(this,q.prototype.close);this.originalQuadTo=this.canvas.quadTo;this.canvas.quadTo=mxUtils.bind(this,q.prototype.quadTo);this.originalCurveTo=this.canvas.curveTo;
-this.canvas.curveTo=mxUtils.bind(this,q.prototype.curveTo);this.originalArcTo=this.canvas.arcTo;this.canvas.arcTo=mxUtils.bind(this,q.prototype.arcTo)}function t(){mxRectangleShape.call(this)}function y(){mxActor.call(this)}function x(){mxActor.call(this)}function w(){mxActor.call(this)}function z(){mxRectangleShape.call(this)}function u(){mxRectangleShape.call(this)}function F(){mxCylinder.call(this)}function E(){mxShape.call(this)}function D(){mxShape.call(this)}function C(){mxEllipse.call(this)}
-function G(){mxShape.call(this)}function B(){mxShape.call(this)}function M(){mxRectangleShape.call(this)}function K(){mxShape.call(this)}function L(){mxShape.call(this)}function V(){mxShape.call(this)}function S(){mxCylinder.call(this)}function Z(){mxDoubleEllipse.call(this)}function A(){mxDoubleEllipse.call(this)}function v(){mxArrowConnector.call(this);this.spacing=0}function R(){mxArrowConnector.call(this);this.spacing=0}function J(){mxActor.call(this)}function I(){mxRectangleShape.call(this)}
-function aa(){mxActor.call(this)}function N(){mxActor.call(this)}function H(){mxActor.call(this)}function U(){mxActor.call(this)}function ba(){mxActor.call(this)}function ea(){mxActor.call(this)}function ca(){mxActor.call(this)}function P(){mxActor.call(this)}function T(){mxActor.call(this)}function W(){mxActor.call(this)}function O(){mxEllipse.call(this)}function Q(){mxEllipse.call(this)}function fa(){mxEllipse.call(this)}function X(){mxRhombus.call(this)}function Y(){mxEllipse.call(this)}function va(){mxEllipse.call(this)}
-function wa(){mxEllipse.call(this)}function pa(){mxEllipse.call(this)}function qa(){mxActor.call(this)}function ka(){mxActor.call(this)}function la(){mxActor.call(this)}function ha(){mxConnector.call(this)}function Aa(a,b,c,d,e,f,g,h,k,l){g+=k;var m=d.clone();d.x-=e*(2*g+k);d.y-=f*(2*g+k);e*=g+k;f*=g+k;return function(){a.ellipse(m.x-e-g,m.y-f-g,2*g,2*g);l?a.fillAndStroke():a.stroke()}}mxUtils.extend(a,mxCylinder);a.prototype.size=20;a.prototype.redrawPath=function(a,b,c,d,e,f){b=Math.max(0,Math.min(d,
+this.canvas.curveTo=mxUtils.bind(this,q.prototype.curveTo);this.originalArcTo=this.canvas.arcTo;this.canvas.arcTo=mxUtils.bind(this,q.prototype.arcTo)}function t(){mxRectangleShape.call(this)}function z(){mxRectangleShape.call(this)}function w(){mxActor.call(this)}function x(){mxActor.call(this)}function y(){mxActor.call(this)}function u(){mxRectangleShape.call(this)}function D(){mxRectangleShape.call(this)}function F(){mxCylinder.call(this)}function E(){mxShape.call(this)}function C(){mxShape.call(this)}
+function G(){mxEllipse.call(this)}function B(){mxShape.call(this)}function M(){mxShape.call(this)}function L(){mxRectangleShape.call(this)}function H(){mxShape.call(this)}function U(){mxShape.call(this)}function S(){mxShape.call(this)}function ba(){mxCylinder.call(this)}function A(){mxDoubleEllipse.call(this)}function v(){mxDoubleEllipse.call(this)}function R(){mxArrowConnector.call(this);this.spacing=0}function I(){mxArrowConnector.call(this);this.spacing=0}function J(){mxActor.call(this)}function ca(){mxRectangleShape.call(this)}
+function N(){mxActor.call(this)}function K(){mxActor.call(this)}function X(){mxActor.call(this)}function T(){mxActor.call(this)}function ea(){mxActor.call(this)}function aa(){mxActor.call(this)}function P(){mxActor.call(this)}function V(){mxActor.call(this)}function W(){mxActor.call(this)}function O(){mxActor.call(this)}function Q(){mxEllipse.call(this)}function fa(){mxEllipse.call(this)}function Y(){mxEllipse.call(this)}function Z(){mxRhombus.call(this)}function ua(){mxEllipse.call(this)}function va(){mxEllipse.call(this)}
+function wa(){mxEllipse.call(this)}function pa(){mxEllipse.call(this)}function qa(){mxActor.call(this)}function ma(){mxActor.call(this)}function ia(){mxActor.call(this)}function ja(){mxConnector.call(this)}function Aa(a,b,c,d,e,f,g,h,k,l){g+=k;var m=d.clone();d.x-=e*(2*g+k);d.y-=f*(2*g+k);e*=g+k;f*=g+k;return function(){a.ellipse(m.x-e-g,m.y-f-g,2*g,2*g);l?a.fillAndStroke():a.stroke()}}mxUtils.extend(a,mxCylinder);a.prototype.size=20;a.prototype.redrawPath=function(a,b,c,d,e,f){b=Math.max(0,Math.min(d,
 Math.min(e,parseFloat(mxUtils.getValue(this.style,"size",this.size)))));f?(a.moveTo(b,e),a.lineTo(b,b),a.lineTo(0,0),a.moveTo(b,b),a.lineTo(d,b)):(a.moveTo(0,0),a.lineTo(d-b,0),a.lineTo(d,b),a.lineTo(d,e),a.lineTo(b,e),a.lineTo(0,e-b),a.lineTo(0,0),a.close());a.end()};a.prototype.getLabelMargins=function(a){return mxUtils.getValue(this.style,"boundedLbl",!1)?(a=parseFloat(mxUtils.getValue(this.style,"size",this.size))*this.scale,new mxRectangle(a,a,0,0)):null};mxCellRenderer.prototype.defaultShapes.cube=
-a;var xa=Math.tan(mxUtils.toRadians(30)),ja=(.5-xa)/2;mxUtils.extend(b,mxActor);b.prototype.size=20;b.prototype.redrawPath=function(a,b,c,d,e){b=Math.min(d,e/xa);a.translate((d-b)/2,(e-b)/2+b/4);a.moveTo(0,.25*b);a.lineTo(.5*b,b*ja);a.lineTo(b,.25*b);a.lineTo(.5*b,(.5-ja)*b);a.lineTo(0,.25*b);a.close();a.end()};mxCellRenderer.prototype.defaultShapes.isoRectangle=b;mxUtils.extend(c,mxCylinder);c.prototype.size=20;c.prototype.redrawPath=function(a,b,c,d,e,f){b=Math.min(d,e/(.5+xa));f?(a.moveTo(0,.25*
-b),a.lineTo(.5*b,(.5-ja)*b),a.lineTo(b,.25*b),a.moveTo(.5*b,(.5-ja)*b),a.lineTo(.5*b,(1-ja)*b)):(a.translate((d-b)/2,(e-b)/2),a.moveTo(0,.25*b),a.lineTo(.5*b,b*ja),a.lineTo(b,.25*b),a.lineTo(b,.75*b),a.lineTo(.5*b,(1-ja)*b),a.lineTo(0,.75*b),a.close());a.end()};mxCellRenderer.prototype.defaultShapes.isoCube=c;mxUtils.extend(d,mxCylinder);d.prototype.redrawPath=function(a,b,c,d,e,f){b=Math.min(e/2,Math.round(e/8)+this.strokewidth-1);if(f&&null!=this.fill||!f&&null==this.fill)a.moveTo(0,b),a.curveTo(0,
+a;var xa=Math.tan(mxUtils.toRadians(30)),ka=(.5-xa)/2;mxUtils.extend(b,mxActor);b.prototype.size=20;b.prototype.redrawPath=function(a,b,c,d,e){b=Math.min(d,e/xa);a.translate((d-b)/2,(e-b)/2+b/4);a.moveTo(0,.25*b);a.lineTo(.5*b,b*ka);a.lineTo(b,.25*b);a.lineTo(.5*b,(.5-ka)*b);a.lineTo(0,.25*b);a.close();a.end()};mxCellRenderer.prototype.defaultShapes.isoRectangle=b;mxUtils.extend(c,mxCylinder);c.prototype.size=20;c.prototype.redrawPath=function(a,b,c,d,e,f){b=Math.min(d,e/(.5+xa));f?(a.moveTo(0,.25*
+b),a.lineTo(.5*b,(.5-ka)*b),a.lineTo(b,.25*b),a.moveTo(.5*b,(.5-ka)*b),a.lineTo(.5*b,(1-ka)*b)):(a.translate((d-b)/2,(e-b)/2),a.moveTo(0,.25*b),a.lineTo(.5*b,b*ka),a.lineTo(b,.25*b),a.lineTo(b,.75*b),a.lineTo(.5*b,(1-ka)*b),a.lineTo(0,.75*b),a.close());a.end()};mxCellRenderer.prototype.defaultShapes.isoCube=c;mxUtils.extend(d,mxCylinder);d.prototype.redrawPath=function(a,b,c,d,e,f){b=Math.min(e/2,Math.round(e/8)+this.strokewidth-1);if(f&&null!=this.fill||!f&&null==this.fill)a.moveTo(0,b),a.curveTo(0,
 2*b,d,2*b,d,b),f||(a.stroke(),a.begin()),a.translate(0,b/2),a.moveTo(0,b),a.curveTo(0,2*b,d,2*b,d,b),f||(a.stroke(),a.begin()),a.translate(0,b/2),a.moveTo(0,b),a.curveTo(0,2*b,d,2*b,d,b),f||(a.stroke(),a.begin()),a.translate(0,-b);f||(a.moveTo(0,b),a.curveTo(0,-b/3,d,-b/3,d,b),a.lineTo(d,e-b),a.curveTo(d,e+b/3,0,e+b/3,0,e-b),a.close())};d.prototype.getLabelMargins=function(a){return new mxRectangle(0,2.5*Math.min(a.height/2,Math.round(a.height/8)+this.strokewidth-1)*this.scale,0,0)};mxCellRenderer.prototype.defaultShapes.datastore=
 d;mxUtils.extend(e,mxCylinder);e.prototype.size=30;e.prototype.redrawPath=function(a,b,c,d,e,f){b=Math.max(0,Math.min(d,Math.min(e,parseFloat(mxUtils.getValue(this.style,"size",this.size)))));f?(a.moveTo(d-b,0),a.lineTo(d-b,b),a.lineTo(d,b)):(a.moveTo(0,0),a.lineTo(d-b,0),a.lineTo(d,b),a.lineTo(d,e),a.lineTo(0,e),a.lineTo(0,0),a.close());a.end()};mxCellRenderer.prototype.defaultShapes.note=e;mxUtils.extend(f,mxActor);f.prototype.redrawPath=function(a,b,c,d,e){a.moveTo(0,0);a.quadTo(d/2,.5*e,d,0);
 a.quadTo(.5*d,e/2,d,e);a.quadTo(d/2,.5*e,0,e);a.quadTo(.5*d,e/2,0,0);a.end()};mxCellRenderer.prototype.defaultShapes["switch"]=f;mxUtils.extend(g,mxCylinder);g.prototype.tabWidth=60;g.prototype.tabHeight=20;g.prototype.tabPosition="right";g.prototype.redrawPath=function(a,b,c,d,e,f){b=Math.max(0,Math.min(d,parseFloat(mxUtils.getValue(this.style,"tabWidth",this.tabWidth))));c=Math.max(0,Math.min(e,parseFloat(mxUtils.getValue(this.style,"tabHeight",this.tabHeight))));var g=mxUtils.getValue(this.style,
@@ -1781,122 +1781,123 @@ e/2),new mxPoint(b,e/2),new mxPoint(b,e),new mxPoint(d,e)],this.isRounded,c,!1);
 this.lastX=a;this.lastY=b;this.firstX=a;this.firstY=b};q.prototype.close=function(){null!=this.firstX&&null!=this.firstY&&(this.lineTo(this.firstX,this.firstY),this.originalClose.apply(this.canvas,arguments));this.originalClose.apply(this.canvas,arguments)};q.prototype.quadTo=function(a,b,c,d){this.originalQuadTo.apply(this.canvas,arguments);this.lastX=c;this.lastY=d};q.prototype.curveTo=function(a,b,c,d,e,f){this.originalCurveTo.apply(this.canvas,arguments);this.lastX=e;this.lastY=f};q.prototype.arcTo=
 function(a,b,c,d,e,f,g){this.originalArcTo.apply(this.canvas,arguments);this.lastX=f;this.lastY=g};q.prototype.lineTo=function(a,b){if(null!=this.lastX&&null!=this.lastY){var c=function(a){return"number"===typeof a?a?0>a?-1:1:a===a?0:NaN:NaN},d=Math.abs(a-this.lastX),e=Math.abs(b-this.lastY),f=Math.sqrt(d*d+e*e);if(2>f){this.originalLineTo.apply(this.canvas,arguments);this.lastX=a;this.lastY=b;return}var g=Math.round(f/10),h=this.defaultVariation;5>g&&(g=5,h/=3);for(var k=c(a-this.lastX)*d/g,c=c(b-
 this.lastY)*e/g,d=d/f,e=e/f,f=0;f<g;f++){var l=(Math.random()-.5)*h;this.originalLineTo.call(this.canvas,k*f+this.lastX-l*e,c*f+this.lastY-l*d)}this.originalLineTo.call(this.canvas,a,b)}else this.originalLineTo.apply(this.canvas,arguments);this.lastX=a;this.lastY=b};q.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};var Da=mxShape.prototype.paint;mxShape.prototype.defaultJiggle=1.5;mxShape.prototype.paint=function(a){null!=this.style&&"0"!=mxUtils.getValue(this.style,"comic","0")&&null==a.handHiggle&&(a.handJiggle=new q(a,mxUtils.getValue(this.style,"jiggle",this.defaultJiggle)));Da.apply(this,arguments);null!=a.handJiggle&&(a.handJiggle.destroy(),delete a.handJiggle)};mxRhombus.prototype.defaultJiggle=2;var Ea=mxRectangleShape.prototype.isHtmlAllowed;mxRectangleShape.prototype.isHtmlAllowed=
-function(){return(null==this.style||"0"==mxUtils.getValue(this.style,"comic","0"))&&Ea.apply(this,arguments)};var Fa=mxRectangleShape.prototype.paintBackground;mxRectangleShape.prototype.paintBackground=function(a,b,c,d,e){if(null==a.handJiggle)Fa.apply(this,arguments);else{var f=!0;null!=this.style&&(f="1"==mxUtils.getValue(this.style,mxConstants.STYLE_POINTER_EVENTS,"1"));if(f||null!=this.fill&&this.fill!=mxConstants.NONE||null!=this.stroke&&this.stroke!=mxConstants.NONE)f||null!=this.fill&&this.fill!=
+this.originalArcTo};var Ea=mxShape.prototype.paint;mxShape.prototype.defaultJiggle=1.5;mxShape.prototype.paint=function(a){null!=this.style&&"0"!=mxUtils.getValue(this.style,"comic","0")&&null==a.handHiggle&&(a.handJiggle=new q(a,mxUtils.getValue(this.style,"jiggle",this.defaultJiggle)));Ea.apply(this,arguments);null!=a.handJiggle&&(a.handJiggle.destroy(),delete a.handJiggle)};mxRhombus.prototype.defaultJiggle=2;var Fa=mxRectangleShape.prototype.isHtmlAllowed;mxRectangleShape.prototype.isHtmlAllowed=
+function(){return(null==this.style||"0"==mxUtils.getValue(this.style,"comic","0"))&&Fa.apply(this,arguments)};var Ga=mxRectangleShape.prototype.paintBackground;mxRectangleShape.prototype.paintBackground=function(a,b,c,d,e){if(null==a.handJiggle)Ga.apply(this,arguments);else{var f=!0;null!=this.style&&(f="1"==mxUtils.getValue(this.style,mxConstants.STYLE_POINTER_EVENTS,"1"));if(f||null!=this.fill&&this.fill!=mxConstants.NONE||null!=this.stroke&&this.stroke!=mxConstants.NONE)f||null!=this.fill&&this.fill!=
 mxConstants.NONE||(a.pointerEvents=!1),a.begin(),this.isRounded?("1"==mxUtils.getValue(this.style,mxConstants.STYLE_ABSOLUTE_ARCSIZE,0)?f=Math.min(d/2,Math.min(e/2,mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2)):(f=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,100*mxConstants.RECTANGLE_ROUNDING_FACTOR)/100,f=Math.min(d*f,e*f)),a.moveTo(b+f,c),a.lineTo(b+d-f,c),a.quadTo(b+d,c,b+d,c+f),a.lineTo(b+d,c+e-f),a.quadTo(b+d,c+e,b+d-f,c+e),a.lineTo(b+f,c+e),a.quadTo(b,
-c+e,b,c+e-f),a.lineTo(b,c+f),a.quadTo(b,c,b+f,c)):(a.moveTo(b,c),a.lineTo(b+d,c),a.lineTo(b+d,c+e),a.lineTo(b,c+e),a.lineTo(b,c)),a.close(),a.end(),a.fillAndStroke()}};var Ga=mxRectangleShape.prototype.paintForeground;mxRectangleShape.prototype.paintForeground=function(a,b,c,d,e){null==a.handJiggle&&Ga.apply(this,arguments)};mxUtils.extend(t,mxRectangleShape);t.prototype.size=.1;t.prototype.isHtmlAllowed=function(){return!1};t.prototype.getLabelBounds=function(a){if(mxUtils.getValue(this.state.style,
+c+e,b,c+e-f),a.lineTo(b,c+f),a.quadTo(b,c,b+f,c)):(a.moveTo(b,c),a.lineTo(b+d,c),a.lineTo(b+d,c+e),a.lineTo(b,c+e),a.lineTo(b,c)),a.close(),a.end(),a.fillAndStroke()}};var Ha=mxRectangleShape.prototype.paintForeground;mxRectangleShape.prototype.paintForeground=function(a,b,c,d,e){null==a.handJiggle&&Ha.apply(this,arguments)};mxUtils.extend(t,mxRectangleShape);t.prototype.size=.1;t.prototype.isHtmlAllowed=function(){return!1};t.prototype.getLabelBounds=function(a){if(mxUtils.getValue(this.state.style,
 mxConstants.STYLE_HORIZONTAL,!0)==(null==this.direction||this.direction==mxConstants.DIRECTION_EAST||this.direction==mxConstants.DIRECTION_WEST)){var b=a.width,c=a.height;a=new mxRectangle(a.x,a.y,b,c);var d=b*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));if(this.isRounded)var e=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,100*mxConstants.RECTANGLE_ROUNDING_FACTOR)/100,d=Math.max(d,Math.min(b*e,c*e));a.x+=d;a.width-=2*d}return a};t.prototype.paintForeground=
-function(a,b,c,d,e){var f=d*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));if(this.isRounded)var g=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,100*mxConstants.RECTANGLE_ROUNDING_FACTOR)/100,f=Math.max(f,Math.min(d*g,e*g));a.begin();a.moveTo(b+f,c);a.lineTo(b+f,c+e);a.moveTo(b+d-f,c);a.lineTo(b+d-f,c+e);a.end();a.stroke();mxRectangleShape.prototype.paintForeground.apply(this,arguments)};mxCellRenderer.prototype.defaultShapes.process=t;mxUtils.extend(y,mxHexagon);
-y.prototype.size=30;y.prototype.position=.5;y.prototype.position2=.5;y.prototype.base=20;y.prototype.getLabelMargins=function(){return new mxRectangle(0,0,0,parseFloat(mxUtils.getValue(this.style,"size",this.size))*this.scale)};y.prototype.redrawPath=function(a,b,c,d,e){b=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;c=Math.max(0,Math.min(e,parseFloat(mxUtils.getValue(this.style,"size",this.size))));var f=d*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,
-"position",this.position)))),g=d*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"position2",this.position2)))),h=Math.max(0,Math.min(d,parseFloat(mxUtils.getValue(this.style,"base",this.base))));this.addPoints(a,[new mxPoint(0,0),new mxPoint(d,0),new mxPoint(d,e-c),new mxPoint(Math.min(d,f+h),e-c),new mxPoint(g,e),new mxPoint(Math.max(0,f),e-c),new mxPoint(0,e-c)],this.isRounded,b,!0,[4])};mxCellRenderer.prototype.defaultShapes.callout=y;mxUtils.extend(x,mxActor);x.prototype.size=.2;
-x.prototype.redrawPath=function(a,b,c,d,e){b=d*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));c=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(a,[new mxPoint(0,0),new mxPoint(d-b,0),new mxPoint(d,e/2),new mxPoint(d-b,e),new mxPoint(0,e),new mxPoint(b,e/2)],this.isRounded,c,!0);a.end()};mxCellRenderer.prototype.defaultShapes.step=x;mxUtils.extend(w,mxHexagon);w.prototype.size=.25;w.prototype.redrawPath=function(a,
-b,c,d,e){b=d*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));c=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(a,[new mxPoint(b,0),new mxPoint(d-b,0),new mxPoint(d,.5*e),new mxPoint(d-b,e),new mxPoint(b,e),new mxPoint(0,.5*e)],this.isRounded,c,!0)};mxCellRenderer.prototype.defaultShapes.hexagon=w;mxUtils.extend(z,mxRectangleShape);z.prototype.isHtmlAllowed=function(){return!1};z.prototype.paintForeground=function(a,
-b,c,d,e){var f=Math.min(d/5,e/5)+1;a.begin();a.moveTo(b+d/2,c+f);a.lineTo(b+d/2,c+e-f);a.moveTo(b+f,c+e/2);a.lineTo(b+d-f,c+e/2);a.end();a.stroke();mxRectangleShape.prototype.paintForeground.apply(this,arguments)};mxCellRenderer.prototype.defaultShapes.plus=z;var Ba=mxRhombus.prototype.paintVertexShape;mxRhombus.prototype.getLabelBounds=function(a){if(1==this.style["double"]){var b=(2*Math.max(2,this.strokewidth+1)+parseFloat(this.style[mxConstants.STYLE_MARGIN]||0))*this.scale;return new mxRectangle(a.x+
-b,a.y+b,a.width-2*b,a.height-2*b)}return a};mxRhombus.prototype.paintVertexShape=function(a,b,c,d,e){Ba.apply(this,arguments);if(!this.outline&&1==this.style["double"]){var f=2*Math.max(2,this.strokewidth+1)+parseFloat(this.style[mxConstants.STYLE_MARGIN]||0);b+=f;c+=f;d-=2*f;e-=2*f;0<d&&0<e&&(a.setShadow(!1),Ba.apply(this,[a,b,c,d,e]))}};mxUtils.extend(u,mxRectangleShape);u.prototype.isHtmlAllowed=function(){return!1};u.prototype.getLabelBounds=function(a){if(1==this.style["double"]){var b=(Math.max(2,
-this.strokewidth+1)+parseFloat(this.style[mxConstants.STYLE_MARGIN]||0))*this.scale;return new mxRectangle(a.x+b,a.y+b,a.width-2*b,a.height-2*b)}return a};u.prototype.paintForeground=function(a,b,c,d,e){if(null!=this.style){if(!this.outline&&1==this.style["double"]){var f=Math.max(2,this.strokewidth+1)+parseFloat(this.style[mxConstants.STYLE_MARGIN]||0);b+=f;c+=f;d-=2*f;e-=2*f;0<d&&0<e&&mxRectangleShape.prototype.paintBackground.apply(this,arguments)}a.setDashed(!1);var f=0,g;do{g=mxCellRenderer.prototype.defaultShapes[this.style["symbol"+
-f]];if(null!=g){var h=this.style["symbol"+f+"Align"],k=this.style["symbol"+f+"VerticalAlign"],l=this.style["symbol"+f+"Width"],m=this.style["symbol"+f+"Height"],sa=this.style["symbol"+f+"Spacing"]||0,n=this.style["symbol"+f+"VSpacing"]||sa,p=this.style["symbol"+f+"ArcSpacing"];null!=p&&(p*=this.getArcSize(d+this.strokewidth,e+this.strokewidth),sa+=p,n+=p);var p=b,q=c,p=h==mxConstants.ALIGN_CENTER?p+(d-l)/2:h==mxConstants.ALIGN_RIGHT?p+(d-l-sa):p+sa,q=k==mxConstants.ALIGN_MIDDLE?q+(e-m)/2:k==mxConstants.ALIGN_BOTTOM?
-q+(e-m-n):q+n;a.save();h=new g;h.style=this.style;g.prototype.paintVertexShape.call(h,a,p,q,l,m);a.restore()}f++}while(null!=g)}mxRectangleShape.prototype.paintForeground.apply(this,arguments)};mxCellRenderer.prototype.defaultShapes.ext=u;mxUtils.extend(F,mxCylinder);F.prototype.redrawPath=function(a,b,c,d,e,f){f?(a.moveTo(0,0),a.lineTo(d/2,e/2),a.lineTo(d,0),a.end()):(a.moveTo(0,0),a.lineTo(d,0),a.lineTo(d,e),a.lineTo(0,e),a.close())};mxCellRenderer.prototype.defaultShapes.message=F;mxUtils.extend(E,
-mxShape);E.prototype.paintBackground=function(a,b,c,d,e){a.translate(b,c);a.ellipse(d/4,0,d/2,e/4);a.fillAndStroke();a.begin();a.moveTo(d/2,e/4);a.lineTo(d/2,2*e/3);a.moveTo(d/2,e/3);a.lineTo(0,e/3);a.moveTo(d/2,e/3);a.lineTo(d,e/3);a.moveTo(d/2,2*e/3);a.lineTo(0,e);a.moveTo(d/2,2*e/3);a.lineTo(d,e);a.end();a.stroke()};mxCellRenderer.prototype.defaultShapes.umlActor=E;mxUtils.extend(D,mxShape);D.prototype.getLabelMargins=function(a){return new mxRectangle(a.width/6,0,0,0)};D.prototype.paintBackground=
-function(a,b,c,d,e){a.translate(b,c);a.begin();a.moveTo(0,e/4);a.lineTo(0,3*e/4);a.end();a.stroke();a.begin();a.moveTo(0,e/2);a.lineTo(d/6,e/2);a.end();a.stroke();a.ellipse(d/6,0,5*d/6,e);a.fillAndStroke()};mxCellRenderer.prototype.defaultShapes.umlBoundary=D;mxUtils.extend(C,mxEllipse);C.prototype.paintVertexShape=function(a,b,c,d,e){mxEllipse.prototype.paintVertexShape.apply(this,arguments);a.begin();a.moveTo(b+d/8,c+e);a.lineTo(b+7*d/8,c+e);a.end();a.stroke()};mxCellRenderer.prototype.defaultShapes.umlEntity=
-C;mxUtils.extend(G,mxShape);G.prototype.paintVertexShape=function(a,b,c,d,e){a.translate(b,c);a.begin();a.moveTo(d,0);a.lineTo(0,e);a.moveTo(0,0);a.lineTo(d,e);a.end();a.stroke()};mxCellRenderer.prototype.defaultShapes.umlDestroy=G;mxUtils.extend(B,mxShape);B.prototype.getLabelBounds=function(a){return new mxRectangle(a.x,a.y+a.height/8,a.width,7*a.height/8)};B.prototype.paintBackground=function(a,b,c,d,e){a.translate(b,c);a.begin();a.moveTo(3*d/8,e/8*1.1);a.lineTo(5*d/8,0);a.end();a.stroke();a.ellipse(0,
-e/8,d,7*e/8);a.fillAndStroke()};B.prototype.paintForeground=function(a,b,c,d,e){a.begin();a.moveTo(3*d/8,e/8*1.1);a.lineTo(5*d/8,e/4);a.end();a.stroke()};mxCellRenderer.prototype.defaultShapes.umlControl=B;mxUtils.extend(M,mxRectangleShape);M.prototype.size=40;M.prototype.isHtmlAllowed=function(){return!1};M.prototype.getLabelBounds=function(a){var b=Math.max(0,Math.min(a.height,parseFloat(mxUtils.getValue(this.style,"size",this.size))*this.scale));return new mxRectangle(a.x,a.y,a.width,b)};M.prototype.paintBackground=
-function(a,b,c,d,e){var f=Math.max(0,Math.min(e,parseFloat(mxUtils.getValue(this.style,"size",this.size)))),g=mxUtils.getValue(this.style,"participant");null==g||null==this.state?mxRectangleShape.prototype.paintBackground.call(this,a,b,c,d,f):(g=this.state.view.graph.cellRenderer.getShape(g),null!=g&&g!=M&&(g=new g,g.apply(this.state),a.save(),g.paintVertexShape(a,b,c,d,f),a.restore()));f<e&&(a.setDashed(!0),a.begin(),a.moveTo(b+d/2,c+f),a.lineTo(b+d/2,c+e),a.end(),a.stroke())};M.prototype.paintForeground=
-function(a,b,c,d,e){var f=Math.max(0,Math.min(e,parseFloat(mxUtils.getValue(this.style,"size",this.size))));mxRectangleShape.prototype.paintForeground.call(this,a,b,c,d,Math.min(e,f))};mxCellRenderer.prototype.defaultShapes.umlLifeline=M;mxUtils.extend(K,mxShape);K.prototype.width=60;K.prototype.height=30;K.prototype.corner=10;K.prototype.getLabelMargins=function(a){return new mxRectangle(0,0,a.width-parseFloat(mxUtils.getValue(this.style,"width",this.width)*this.scale),a.height-parseFloat(mxUtils.getValue(this.style,
-"height",this.height)*this.scale))};K.prototype.paintBackground=function(a,b,c,d,e){var f=this.corner,g=Math.min(d,Math.max(f,parseFloat(mxUtils.getValue(this.style,"width",this.width)))),h=Math.min(e,Math.max(1.5*f,parseFloat(mxUtils.getValue(this.style,"height",this.height))));a.begin();a.moveTo(b,c);a.lineTo(b+g,c);a.lineTo(b+g,c+Math.max(0,h-1.5*f));a.lineTo(b+Math.max(0,g-f),c+h);a.lineTo(b,c+h);a.close();a.fillAndStroke();a.begin();a.moveTo(b+g,c);a.lineTo(b+d,c);a.lineTo(b+d,c+e);a.lineTo(b,
-c+e);a.lineTo(b,c+h);a.stroke()};mxCellRenderer.prototype.defaultShapes.umlFrame=K;mxPerimeter.LifelinePerimeter=function(a,b,c,d){d=M.prototype.size;null!=b&&(d=mxUtils.getValue(b.style,"size",d)*b.view.scale);b=parseFloat(b.style[mxConstants.STYLE_STROKEWIDTH]||1)*b.view.scale/2-1;c.x<a.getCenterX()&&(b=-1*(b+1));return new mxPoint(a.getCenterX()+b,Math.min(a.y+a.height,Math.max(a.y+d,c.y)))};mxStyleRegistry.putValue("lifelinePerimeter",mxPerimeter.LifelinePerimeter);mxPerimeter.OrthogonalPerimeter=
-function(a,b,c,d){d=!0;return mxPerimeter.RectanglePerimeter.apply(this,arguments)};mxStyleRegistry.putValue("orthogonalPerimeter",mxPerimeter.OrthogonalPerimeter);mxPerimeter.BackbonePerimeter=function(a,b,c,d){d=parseFloat(b.style[mxConstants.STYLE_STROKEWIDTH]||1)*b.view.scale/2-1;null!=b.style.backboneSize&&(d+=parseFloat(b.style.backboneSize)*b.view.scale/2-1);if("south"==b.style[mxConstants.STYLE_DIRECTION]||"north"==b.style[mxConstants.STYLE_DIRECTION])return c.x<a.getCenterX()&&(d=-1*(d+1)),
-new mxPoint(a.getCenterX()+d,Math.min(a.y+a.height,Math.max(a.y,c.y)));c.y<a.getCenterY()&&(d=-1*(d+1));return new mxPoint(Math.min(a.x+a.width,Math.max(a.x,c.x)),a.getCenterY()+d)};mxStyleRegistry.putValue("backbonePerimeter",mxPerimeter.BackbonePerimeter);mxPerimeter.CalloutPerimeter=function(a,b,c,d){return mxPerimeter.RectanglePerimeter(mxUtils.getDirectedBounds(a,new mxRectangle(0,0,0,Math.max(0,Math.min(a.height,parseFloat(mxUtils.getValue(b.style,"size",y.prototype.size))*b.view.scale))),b.style),
-b,c,d)};mxStyleRegistry.putValue("calloutPerimeter",mxPerimeter.CalloutPerimeter);mxPerimeter.ParallelogramPerimeter=function(a,b,c,d){var e=m.prototype.size;null!=b&&(e=mxUtils.getValue(b.style,"size",e));var f=a.x,g=a.y,h=a.width,k=a.height;b=null!=b?mxUtils.getValue(b.style,mxConstants.STYLE_DIRECTION,mxConstants.DIRECTION_EAST):mxConstants.DIRECTION_EAST;b==mxConstants.DIRECTION_NORTH||b==mxConstants.DIRECTION_SOUTH?(e=k*Math.max(0,Math.min(1,e)),g=[new mxPoint(f,g),new mxPoint(f+h,g+e),new mxPoint(f+
-h,g+k),new mxPoint(f,g+k-e),new mxPoint(f,g)]):(e=h*Math.max(0,Math.min(1,e)),g=[new mxPoint(f+e,g),new mxPoint(f+h,g),new mxPoint(f+h-e,g+k),new mxPoint(f,g+k),new mxPoint(f+e,g)]);k=a.getCenterX();a=a.getCenterY();a=new mxPoint(k,a);d&&(c.x<f||c.x>f+h?a.y=c.y:a.x=c.x);return mxUtils.getPerimeterPoint(g,a,c)};mxStyleRegistry.putValue("parallelogramPerimeter",mxPerimeter.ParallelogramPerimeter);mxPerimeter.TrapezoidPerimeter=function(a,b,c,d){var e=n.prototype.size;null!=b&&(e=mxUtils.getValue(b.style,
-"size",e));var f=a.x,g=a.y,h=a.width,k=a.height;b=null!=b?mxUtils.getValue(b.style,mxConstants.STYLE_DIRECTION,mxConstants.DIRECTION_EAST):mxConstants.DIRECTION_EAST;b==mxConstants.DIRECTION_EAST?(e=h*Math.max(0,Math.min(1,e)),g=[new mxPoint(f+e,g),new mxPoint(f+h-e,g),new mxPoint(f+h,g+k),new mxPoint(f,g+k),new mxPoint(f+e,g)]):b==mxConstants.DIRECTION_WEST?(e=h*Math.max(0,Math.min(1,e)),g=[new mxPoint(f,g),new mxPoint(f+h,g),new mxPoint(f+h-e,g+k),new mxPoint(f+e,g+k),new mxPoint(f,g)]):b==mxConstants.DIRECTION_NORTH?
-(e=k*Math.max(0,Math.min(1,e)),g=[new mxPoint(f,g+e),new mxPoint(f+h,g),new mxPoint(f+h,g+k),new mxPoint(f,g+k-e),new mxPoint(f,g+e)]):(e=k*Math.max(0,Math.min(1,e)),g=[new mxPoint(f,g),new mxPoint(f+h,g+e),new mxPoint(f+h,g+k-e),new mxPoint(f,g+k),new mxPoint(f,g)]);k=a.getCenterX();a=a.getCenterY();a=new mxPoint(k,a);d&&(c.x<f||c.x>f+h?a.y=c.y:a.x=c.x);return mxUtils.getPerimeterPoint(g,a,c)};mxStyleRegistry.putValue("trapezoidPerimeter",mxPerimeter.TrapezoidPerimeter);mxPerimeter.StepPerimeter=
-function(a,b,c,d){var e=x.prototype.size;null!=b&&(e=mxUtils.getValue(b.style,"size",e));var f=a.x,g=a.y,h=a.width,k=a.height,l=a.getCenterX();a=a.getCenterY();b=null!=b?mxUtils.getValue(b.style,mxConstants.STYLE_DIRECTION,mxConstants.DIRECTION_EAST):mxConstants.DIRECTION_EAST;b==mxConstants.DIRECTION_EAST?(e=h*Math.max(0,Math.min(1,e)),g=[new mxPoint(f,g),new mxPoint(f+h-e,g),new mxPoint(f+h,a),new mxPoint(f+h-e,g+k),new mxPoint(f,g+k),new mxPoint(f+e,a),new mxPoint(f,g)]):b==mxConstants.DIRECTION_WEST?
-(e=h*Math.max(0,Math.min(1,e)),g=[new mxPoint(f+e,g),new mxPoint(f+h,g),new mxPoint(f+h-e,a),new mxPoint(f+h,g+k),new mxPoint(f+e,g+k),new mxPoint(f,a),new mxPoint(f+e,g)]):b==mxConstants.DIRECTION_NORTH?(e=k*Math.max(0,Math.min(1,e)),g=[new mxPoint(f,g+e),new mxPoint(l,g),new mxPoint(f+h,g+e),new mxPoint(f+h,g+k),new mxPoint(l,g+k-e),new mxPoint(f,g+k),new mxPoint(f,g+e)]):(e=k*Math.max(0,Math.min(1,e)),g=[new mxPoint(f,g),new mxPoint(l,g+e),new mxPoint(f+h,g),new mxPoint(f+h,g+k-e),new mxPoint(l,
-g+k),new mxPoint(f,g+k-e),new mxPoint(f,g)]);l=new mxPoint(l,a);d&&(c.x<f||c.x>f+h?l.y=c.y:l.x=c.x);return mxUtils.getPerimeterPoint(g,l,c)};mxStyleRegistry.putValue("stepPerimeter",mxPerimeter.StepPerimeter);mxPerimeter.HexagonPerimeter2=function(a,b,c,d){var e=w.prototype.size;null!=b&&(e=mxUtils.getValue(b.style,"size",e));var f=a.x,g=a.y,h=a.width,k=a.height,l=a.getCenterX();a=a.getCenterY();b=null!=b?mxUtils.getValue(b.style,mxConstants.STYLE_DIRECTION,mxConstants.DIRECTION_EAST):mxConstants.DIRECTION_EAST;
-b==mxConstants.DIRECTION_NORTH||b==mxConstants.DIRECTION_SOUTH?(e=k*Math.max(0,Math.min(1,e)),g=[new mxPoint(l,g),new mxPoint(f+h,g+e),new mxPoint(f+h,g+k-e),new mxPoint(l,g+k),new mxPoint(f,g+k-e),new mxPoint(f,g+e),new mxPoint(l,g)]):(e=h*Math.max(0,Math.min(1,e)),g=[new mxPoint(f+e,g),new mxPoint(f+h-e,g),new mxPoint(f+h,a),new mxPoint(f+h-e,g+k),new mxPoint(f+e,g+k),new mxPoint(f,a),new mxPoint(f+e,g)]);l=new mxPoint(l,a);d&&(c.x<f||c.x>f+h?l.y=c.y:l.x=c.x);return mxUtils.getPerimeterPoint(g,
-l,c)};mxStyleRegistry.putValue("hexagonPerimeter2",mxPerimeter.HexagonPerimeter2);mxUtils.extend(L,mxShape);L.prototype.size=10;L.prototype.paintBackground=function(a,b,c,d,e){var f=parseFloat(mxUtils.getValue(this.style,"size",this.size));a.translate(b,c);a.ellipse((d-f)/2,0,f,f);a.fillAndStroke();a.begin();a.moveTo(d/2,f);a.lineTo(d/2,e);a.end();a.stroke()};mxCellRenderer.prototype.defaultShapes.lollipop=L;mxUtils.extend(V,mxShape);V.prototype.size=10;V.prototype.inset=2;V.prototype.paintBackground=
-function(a,b,c,d,e){var f=parseFloat(mxUtils.getValue(this.style,"size",this.size)),g=parseFloat(mxUtils.getValue(this.style,"inset",this.inset))+this.strokewidth;a.translate(b,c);a.begin();a.moveTo(d/2,f+g);a.lineTo(d/2,e);a.end();a.stroke();a.begin();a.moveTo((d-f)/2-g,f/2);a.quadTo((d-f)/2-g,f+g,d/2,f+g);a.quadTo((d+f)/2+g,f+g,(d+f)/2+g,f/2);a.end();a.stroke()};mxCellRenderer.prototype.defaultShapes.requires=V;mxUtils.extend(S,mxCylinder);S.prototype.jettyWidth=32;S.prototype.jettyHeight=12;S.prototype.redrawPath=
-function(a,b,c,d,e,f){var g=parseFloat(mxUtils.getValue(this.style,"jettyWidth",this.jettyWidth));b=parseFloat(mxUtils.getValue(this.style,"jettyHeight",this.jettyHeight));c=g/2;var g=c+g/2,h=.3*e-b/2,k=.7*e-b/2;f?(a.moveTo(c,h),a.lineTo(g,h),a.lineTo(g,h+b),a.lineTo(c,h+b),a.moveTo(c,k),a.lineTo(g,k),a.lineTo(g,k+b),a.lineTo(c,k+b)):(a.moveTo(c,0),a.lineTo(d,0),a.lineTo(d,e),a.lineTo(c,e),a.lineTo(c,k+b),a.lineTo(0,k+b),a.lineTo(0,k),a.lineTo(c,k),a.lineTo(c,h+b),a.lineTo(0,h+b),a.lineTo(0,h),a.lineTo(c,
-h),a.close());a.end()};mxCellRenderer.prototype.defaultShapes.component=S;mxUtils.extend(Z,mxDoubleEllipse);Z.prototype.outerStroke=!0;Z.prototype.paintVertexShape=function(a,b,c,d,e){var f=Math.min(4,Math.min(d/5,e/5));0<d&&0<e&&(a.ellipse(b+f,c+f,d-2*f,e-2*f),a.fillAndStroke());a.setShadow(!1);this.outerStroke&&(a.ellipse(b,c,d,e),a.stroke())};mxCellRenderer.prototype.defaultShapes.endState=Z;mxUtils.extend(A,Z);A.prototype.outerStroke=!1;mxCellRenderer.prototype.defaultShapes.startState=A;mxUtils.extend(v,
-mxArrowConnector);v.prototype.defaultWidth=4;v.prototype.isOpenEnded=function(){return!0};v.prototype.getEdgeWidth=function(){return mxUtils.getNumber(this.style,"width",this.defaultWidth)+Math.max(0,this.strokewidth-1)};v.prototype.isArrowRounded=function(){return this.isRounded};mxCellRenderer.prototype.defaultShapes.link=v;mxUtils.extend(R,mxArrowConnector);R.prototype.defaultWidth=10;R.prototype.defaultArrowWidth=20;R.prototype.getStartArrowWidth=function(){return this.getEdgeWidth()+mxUtils.getNumber(this.style,
-"startWidth",this.defaultArrowWidth)};R.prototype.getEndArrowWidth=function(){return this.getEdgeWidth()+mxUtils.getNumber(this.style,"endWidth",this.defaultArrowWidth)};R.prototype.getEdgeWidth=function(){return mxUtils.getNumber(this.style,"width",this.defaultWidth)+Math.max(0,this.strokewidth-1)};mxCellRenderer.prototype.defaultShapes.flexArrow=R;mxUtils.extend(J,mxActor);J.prototype.size=30;J.prototype.redrawPath=function(a,b,c,d,e){b=Math.min(e,parseFloat(mxUtils.getValue(this.style,"size",this.size)));
-c=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(a,[new mxPoint(0,e),new mxPoint(0,b),new mxPoint(d,0),new mxPoint(d,e)],this.isRounded,c,!0);a.end()};mxCellRenderer.prototype.defaultShapes.manualInput=J;mxUtils.extend(I,mxRectangleShape);I.prototype.dx=20;I.prototype.dy=20;I.prototype.isHtmlAllowed=function(){return!1};I.prototype.paintForeground=function(a,b,c,d,e){mxRectangleShape.prototype.paintForeground.apply(this,arguments);var f=0;if(this.isRounded)var g=
-mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,100*mxConstants.RECTANGLE_ROUNDING_FACTOR)/100,f=Math.max(f,Math.min(d*g,e*g));g=Math.max(f,Math.min(d,parseFloat(mxUtils.getValue(this.style,"dx",this.dx))));f=Math.max(f,Math.min(e,parseFloat(mxUtils.getValue(this.style,"dy",this.dy))));a.begin();a.moveTo(b,c+f);a.lineTo(b+d,c+f);a.end();a.stroke();a.begin();a.moveTo(b+g,c);a.lineTo(b+g,c+e);a.end();a.stroke()};mxCellRenderer.prototype.defaultShapes.internalStorage=I;mxUtils.extend(aa,mxActor);
-aa.prototype.dx=20;aa.prototype.dy=20;aa.prototype.redrawPath=function(a,b,c,d,e){b=Math.max(0,Math.min(d,parseFloat(mxUtils.getValue(this.style,"dx",this.dx))));c=Math.max(0,Math.min(e,parseFloat(mxUtils.getValue(this.style,"dy",this.dy))));parseFloat(mxUtils.getValue(this.style,"size",this.size));var f=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(a,[new mxPoint(0,0),new mxPoint(d,0),new mxPoint(d,c),new mxPoint(b,c),new mxPoint(b,e),new mxPoint(0,
-e)],this.isRounded,f,!0);a.end()};mxCellRenderer.prototype.defaultShapes.corner=aa;mxUtils.extend(N,mxActor);N.prototype.redrawPath=function(a,b,c,d,e){a.moveTo(0,0);a.lineTo(0,e);a.end();a.moveTo(d,0);a.lineTo(d,e);a.end();a.moveTo(0,e/2);a.lineTo(d,e/2);a.end()};mxCellRenderer.prototype.defaultShapes.crossbar=N;mxUtils.extend(H,mxActor);H.prototype.dx=20;H.prototype.dy=20;H.prototype.redrawPath=function(a,b,c,d,e){b=Math.max(0,Math.min(d,parseFloat(mxUtils.getValue(this.style,"dx",this.dx))));c=
-Math.max(0,Math.min(e,parseFloat(mxUtils.getValue(this.style,"dy",this.dy))));parseFloat(mxUtils.getValue(this.style,"size",this.size));var f=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(a,[new mxPoint(0,0),new mxPoint(d,0),new mxPoint(d,c),new mxPoint((d+b)/2,c),new mxPoint((d+b)/2,e),new mxPoint((d-b)/2,e),new mxPoint((d-b)/2,c),new mxPoint(0,c)],this.isRounded,f,!0);a.end()};mxCellRenderer.prototype.defaultShapes.tee=H;mxUtils.extend(U,mxActor);
-U.prototype.arrowWidth=.3;U.prototype.arrowSize=.2;U.prototype.redrawPath=function(a,b,c,d,e){var f=e*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"arrowWidth",this.arrowWidth))));b=d*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"arrowSize",this.arrowSize))));c=(e-f)/2;var f=c+f,g=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(a,[new mxPoint(0,c),new mxPoint(d-b,c),new mxPoint(d-b,0),new mxPoint(d,e/2),new mxPoint(d-
-b,e),new mxPoint(d-b,f),new mxPoint(0,f)],this.isRounded,g,!0);a.end()};mxCellRenderer.prototype.defaultShapes.singleArrow=U;mxUtils.extend(ba,mxActor);ba.prototype.redrawPath=function(a,b,c,d,e){var f=e*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"arrowWidth",U.prototype.arrowWidth))));b=d*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"arrowSize",U.prototype.arrowSize))));c=(e-f)/2;var f=c+f,g=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/
-2;this.addPoints(a,[new mxPoint(0,e/2),new mxPoint(b,0),new mxPoint(b,c),new mxPoint(d-b,c),new mxPoint(d-b,0),new mxPoint(d,e/2),new mxPoint(d-b,e),new mxPoint(d-b,f),new mxPoint(b,f),new mxPoint(b,e)],this.isRounded,g,!0);a.end()};mxCellRenderer.prototype.defaultShapes.doubleArrow=ba;mxUtils.extend(ea,mxActor);ea.prototype.size=.1;ea.prototype.redrawPath=function(a,b,c,d,e){b=d*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));a.moveTo(b,0);a.lineTo(d,0);a.quadTo(d-
-2*b,e/2,d,e);a.lineTo(b,e);a.quadTo(b-2*b,e/2,b,0);a.close();a.end()};mxCellRenderer.prototype.defaultShapes.dataStorage=ea;mxUtils.extend(ca,mxActor);ca.prototype.redrawPath=function(a,b,c,d,e){a.moveTo(0,0);a.quadTo(d,0,d,e/2);a.quadTo(d,e,0,e);a.close();a.end()};mxCellRenderer.prototype.defaultShapes.or=ca;mxUtils.extend(P,mxActor);P.prototype.redrawPath=function(a,b,c,d,e){a.moveTo(0,0);a.quadTo(d,0,d,e/2);a.quadTo(d,e,0,e);a.quadTo(d/2,e/2,0,0);a.close();a.end()};mxCellRenderer.prototype.defaultShapes.xor=
-P;mxUtils.extend(T,mxActor);T.prototype.size=20;T.prototype.redrawPath=function(a,b,c,d,e){b=Math.min(d/2,Math.min(e,parseFloat(mxUtils.getValue(this.style,"size",this.size))));c=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(a,[new mxPoint(b,0),new mxPoint(d-b,0),new mxPoint(d,.8*b),new mxPoint(d,e),new mxPoint(0,e),new mxPoint(0,.8*b)],this.isRounded,c,!0);a.end()};mxCellRenderer.prototype.defaultShapes.loopLimit=T;mxUtils.extend(W,mxActor);W.prototype.size=
-.375;W.prototype.redrawPath=function(a,b,c,d,e){b=e*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));c=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(a,[new mxPoint(0,0),new mxPoint(d,0),new mxPoint(d,e-b),new mxPoint(d/2,e),new mxPoint(0,e-b)],this.isRounded,c,!0);a.end()};mxCellRenderer.prototype.defaultShapes.offPageConnector=W;mxUtils.extend(O,mxEllipse);O.prototype.paintVertexShape=function(a,b,c,d,e){mxEllipse.prototype.paintVertexShape.apply(this,
-arguments);a.begin();a.moveTo(b+d/2,c+e);a.lineTo(b+d,c+e);a.end();a.stroke()};mxCellRenderer.prototype.defaultShapes.tapeData=O;mxUtils.extend(Q,mxEllipse);Q.prototype.paintVertexShape=function(a,b,c,d,e){mxEllipse.prototype.paintVertexShape.apply(this,arguments);a.setShadow(!1);a.begin();a.moveTo(b,c+e/2);a.lineTo(b+d,c+e/2);a.end();a.stroke();a.begin();a.moveTo(b+d/2,c);a.lineTo(b+d/2,c+e);a.end();a.stroke()};mxCellRenderer.prototype.defaultShapes.orEllipse=Q;mxUtils.extend(fa,mxEllipse);fa.prototype.paintVertexShape=
-function(a,b,c,d,e){mxEllipse.prototype.paintVertexShape.apply(this,arguments);a.setShadow(!1);a.begin();a.moveTo(b+.145*d,c+.145*e);a.lineTo(b+.855*d,c+.855*e);a.end();a.stroke();a.begin();a.moveTo(b+.855*d,c+.145*e);a.lineTo(b+.145*d,c+.855*e);a.end();a.stroke()};mxCellRenderer.prototype.defaultShapes.sumEllipse=fa;mxUtils.extend(X,mxRhombus);X.prototype.paintVertexShape=function(a,b,c,d,e){mxRhombus.prototype.paintVertexShape.apply(this,arguments);a.setShadow(!1);a.begin();a.moveTo(b,c+e/2);a.lineTo(b+
-d,c+e/2);a.end();a.stroke()};mxCellRenderer.prototype.defaultShapes.sortShape=X;mxUtils.extend(Y,mxEllipse);Y.prototype.paintVertexShape=function(a,b,c,d,e){a.begin();a.moveTo(b,c);a.lineTo(b+d,c);a.lineTo(b+d/2,c+e/2);a.close();a.fillAndStroke();a.begin();a.moveTo(b,c+e);a.lineTo(b+d,c+e);a.lineTo(b+d/2,c+e/2);a.close();a.fillAndStroke()};mxCellRenderer.prototype.defaultShapes.collate=Y;mxUtils.extend(va,mxEllipse);va.prototype.paintVertexShape=function(a,b,c,d,e){var f=c+e-5;a.begin();a.moveTo(b,
-c);a.lineTo(b,c+e);a.moveTo(b,f);a.lineTo(b+10,f-5);a.moveTo(b,f);a.lineTo(b+10,f+5);a.moveTo(b,f);a.lineTo(b+d,f);a.moveTo(b+d,c);a.lineTo(b+d,c+e);a.moveTo(b+d,f);a.lineTo(b+d-10,f-5);a.moveTo(b+d,f);a.lineTo(b+d-10,f+5);a.end();a.stroke()};mxCellRenderer.prototype.defaultShapes.dimension=va;mxUtils.extend(wa,mxEllipse);wa.prototype.paintVertexShape=function(a,b,c,d,e){this.outline||a.setStrokeColor(null);mxRectangleShape.prototype.paintBackground.apply(this,arguments);null!=this.style&&(a.setStrokeColor(this.stroke),
-a.rect(b,c,d,e),a.fill(),a.begin(),a.moveTo(b,c),"1"==mxUtils.getValue(this.style,"top","1")?a.lineTo(b+d,c):a.moveTo(b+d,c),"1"==mxUtils.getValue(this.style,"right","1")?a.lineTo(b+d,c+e):a.moveTo(b+d,c+e),"1"==mxUtils.getValue(this.style,"bottom","1")?a.lineTo(b,c+e):a.moveTo(b,c+e),"1"==mxUtils.getValue(this.style,"left","1")&&a.lineTo(b,c-this.strokewidth/2),a.end(),a.stroke())};mxCellRenderer.prototype.defaultShapes.partialRectangle=wa;mxUtils.extend(pa,mxEllipse);pa.prototype.paintVertexShape=
-function(a,b,c,d,e){mxEllipse.prototype.paintVertexShape.apply(this,arguments);a.setShadow(!1);a.begin();"vertical"==mxUtils.getValue(this.style,"line")?(a.moveTo(b+d/2,c),a.lineTo(b+d/2,c+e)):(a.moveTo(b,c+e/2),a.lineTo(b+d,c+e/2));a.end();a.stroke()};mxCellRenderer.prototype.defaultShapes.lineEllipse=pa;mxUtils.extend(qa,mxActor);qa.prototype.redrawPath=function(a,b,c,d,e){b=Math.min(d,e/2);a.moveTo(0,0);a.lineTo(d-b,0);a.quadTo(d,0,d,e/2);a.quadTo(d,e,d-b,e);a.lineTo(0,e);a.close();a.end()};mxCellRenderer.prototype.defaultShapes.delay=
-qa;mxUtils.extend(ka,mxActor);ka.prototype.size=.2;ka.prototype.redrawPath=function(a,b,c,d,e){b=Math.min(e,d);var f=Math.max(0,Math.min(b,b*parseFloat(mxUtils.getValue(this.style,"size",this.size))));b=(e-f)/2;c=b+f;var g=(d-f)/2,f=g+f;a.moveTo(0,b);a.lineTo(g,b);a.lineTo(g,0);a.lineTo(f,0);a.lineTo(f,b);a.lineTo(d,b);a.lineTo(d,c);a.lineTo(f,c);a.lineTo(f,e);a.lineTo(g,e);a.lineTo(g,c);a.lineTo(0,c);a.close();a.end()};mxCellRenderer.prototype.defaultShapes.cross=ka;mxUtils.extend(la,mxActor);la.prototype.size=
-.25;la.prototype.redrawPath=function(a,b,c,d,e){b=Math.min(d,e/2);c=Math.min(d-b,Math.max(0,parseFloat(mxUtils.getValue(this.style,"size",this.size)))*d);a.moveTo(0,e/2);a.lineTo(c,0);a.lineTo(d-b,0);a.quadTo(d,0,d,e/2);a.quadTo(d,e,d-b,e);a.lineTo(c,e);a.close();a.end()};mxCellRenderer.prototype.defaultShapes.display=la;mxUtils.extend(ha,mxConnector);ha.prototype.origPaintEdgeShape=ha.prototype.paintEdgeShape;ha.prototype.paintEdgeShape=function(a,b,c){var d=a.state.dashed,e=a.state.fixDash;ha.prototype.origPaintEdgeShape.apply(this,
-arguments);if(3<=a.state.strokeWidth){var f=mxUtils.getValue(this.style,"fillColor",null);null!=f&&(a.setStrokeColor(f),a.setStrokeWidth(a.state.strokeWidth-2),a.setDashed(d,e),ha.prototype.origPaintEdgeShape.apply(this,arguments))}};mxCellRenderer.prototype.defaultShapes.filledEdge=ha;mxMarker.addMarker("dash",function(a,b,c,d,e,f,g,h,k,l){var m=e*(g+k+1),n=f*(g+k+1);return function(){a.begin();a.moveTo(d.x-m/2-n/2,d.y-n/2+m/2);a.lineTo(d.x+n/2-3*m/2,d.y-3*n/2-m/2);a.stroke()}});mxMarker.addMarker("cross",
-function(a,b,c,d,e,f,g,h,k,l){var m=e*(g+k+1),n=f*(g+k+1);return function(){a.begin();a.moveTo(d.x-m/2-n/2,d.y-n/2+m/2);a.lineTo(d.x+n/2-3*m/2,d.y-3*n/2-m/2);a.moveTo(d.x-m/2+n/2,d.y-n/2-m/2);a.lineTo(d.x-n/2-3*m/2,d.y-3*n/2+m/2);a.stroke()}});mxMarker.addMarker("circle",Aa);mxMarker.addMarker("circlePlus",function(a,b,c,d,e,f,g,h,k,l){var m=d.clone(),n=Aa.apply(this,arguments),p=e*(g+2*k),q=f*(g+2*k);return function(){n.apply(this,arguments);a.begin();a.moveTo(m.x-e*k,m.y-f*k);a.lineTo(m.x-2*p+e*
-k,m.y-2*q+f*k);a.moveTo(m.x-p-q+f*k,m.y-q+p-e*k);a.lineTo(m.x+q-p-f*k,m.y-q-p+e*k);a.stroke()}});mxMarker.addMarker("async",function(a,b,c,d,e,f,g,h,k,l){b=e*k*1.118;c=f*k*1.118;e*=g+k;f*=g+k;var m=d.clone();m.x-=b;m.y-=c;d.x+=1*-e-b;d.y+=1*-f-c;return function(){a.begin();a.moveTo(m.x,m.y);h?a.lineTo(m.x-e-f/2,m.y-f+e/2):a.lineTo(m.x+f/2-e,m.y-f-e/2);a.lineTo(m.x-e,m.y-f);a.close();l?a.fillAndStroke():a.stroke()}});mxMarker.addMarker("openAsync",function(a){a=null!=a?a:2;return function(b,c,d,e,
-f,g,h,k,l,m){f*=h+l;g*=h+l;var n=e.clone();return function(){b.begin();b.moveTo(n.x,n.y);k?b.lineTo(n.x-f-g/a,n.y-g+f/a):b.lineTo(n.x+g/a-f,n.y-g-f/a);b.stroke()}}}(2));if("undefined"!==typeof mxVertexHandler){var Ca=function(a,b,c){return ma(a,["width"],b,function(b,d,e,f,g){g=a.shape.getEdgeWidth()*a.view.scale+c;return new mxPoint(f.x+d*b/4+e*g/2,f.y+e*b/4-d*g/2)},function(b,d,e,f,g,h){b=Math.sqrt(mxUtils.ptSegDistSq(f.x,f.y,g.x,g.y,h.x,h.y));a.style.width=Math.round(2*b)/a.view.scale-c})},ma=
-function(a,b,c,d,e){var f=a.absolutePoints,g=f.length-1,h=a.view.translate,k=a.view.scale,l=c?f[0]:f[g],m=c?f[1]:f[g-1],n=m.x-l.x,p=m.y-l.y,q=Math.sqrt(n*n+p*p);return da(a,b,function(a){a=d.call(this,q,n/q,p/q,l,m);return new mxPoint(a.x/k-h.x,a.y/k-h.y)},function(a,b,c){a=Math.sqrt(n*n+p*p);b.x=(b.x+h.x)*k;b.y=(b.y+h.y)*k;e.call(this,a,n/a,p/a,l,m,b,c)})},ia=function(a){return function(b){return[da(b,["arrowWidth","arrowSize"],function(b){var c=Math.max(0,Math.min(1,mxUtils.getValue(this.state.style,
-"arrowWidth",U.prototype.arrowWidth))),d=Math.max(0,Math.min(a,mxUtils.getValue(this.state.style,"arrowSize",U.prototype.arrowSize)));return new mxPoint(b.x+(1-d)*b.width,b.y+(1-c)*b.height/2)},function(b,c){this.state.style.arrowWidth=Math.max(0,Math.min(1,Math.abs(b.y+b.height/2-c.y)/b.height*2));this.state.style.arrowSize=Math.max(0,Math.min(a,(b.x+b.width-c.x)/b.width))})]}},ya=function(a,b,c){return function(d){var e=[da(d,["size"],function(c){var d=Math.max(0,Math.min(c.width,Math.min(c.height,
-parseFloat(mxUtils.getValue(this.state.style,"size",b)))))*a;return new mxPoint(c.x+d,c.y+d)},function(b,c){this.state.style.size=Math.round(Math.max(0,Math.min(Math.min(b.width,c.x-b.x),Math.min(b.height,c.y-b.y)))/a)})];c&&mxUtils.getValue(d.style,mxConstants.STYLE_ROUNDED,!1)&&e.push(ga(d));return e}},ra=function(a,b,c,d){c=null!=c?c:1;return function(e){var f=[da(e,["size"],function(b){var c=parseFloat(mxUtils.getValue(this.state.style,"size",a));return new mxPoint(b.x+c*b.width,b.getCenterY())},
-function(a,b){this.state.style.size=Math.max(0,Math.min(c,(b.x-a.x)/a.width))},null,d)];b&&mxUtils.getValue(e.style,mxConstants.STYLE_ROUNDED,!1)&&f.push(ga(e));return f}},na=function(a){return function(b){var c=[da(b,["size"],function(b){var c=Math.max(0,Math.min(a,parseFloat(mxUtils.getValue(this.state.style,"size",n.prototype.size))));return new mxPoint(b.x+c*b.width*.75,b.y+b.height/4)},function(b,c){this.state.style.size=Math.max(0,Math.min(a,(c.x-b.x)/(.75*b.width)))},null,!0)];mxUtils.getValue(b.style,
-mxConstants.STYLE_ROUNDED,!1)&&c.push(ga(b));return c}},oa=function(){return function(a){var b=[];mxUtils.getValue(a.style,mxConstants.STYLE_ROUNDED,!1)&&b.push(ga(a));return b}},ga=function(a,b){return da(a,[mxConstants.STYLE_ARCSIZE],function(c){var d=null!=b?b:c.height/8;if("1"==mxUtils.getValue(a.style,mxConstants.STYLE_ABSOLUTE_ARCSIZE,0)){var e=mxUtils.getValue(a.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;return new mxPoint(c.x+c.width-Math.min(c.width/2,e),c.y+d)}e=Math.max(0,
-parseFloat(mxUtils.getValue(a.style,mxConstants.STYLE_ARCSIZE,100*mxConstants.RECTANGLE_ROUNDING_FACTOR)))/100;return new mxPoint(c.x+c.width-Math.min(Math.max(c.width/2,c.height/2),Math.min(c.width,c.height)*e),c.y+d)},function(b,c,d){"1"==mxUtils.getValue(a.style,mxConstants.STYLE_ABSOLUTE_ARCSIZE,0)?this.state.style[mxConstants.STYLE_ARCSIZE]=Math.round(Math.max(0,Math.min(b.width,2*(b.x+b.width-c.x)))):this.state.style[mxConstants.STYLE_ARCSIZE]=Math.round(Math.min(50,Math.max(0,100*(b.width-
-c.x+b.x)/Math.min(b.width,b.height))))})},da=function(a,b,c,d,e,f){var g=new mxHandle(a,null,mxVertexHandler.prototype.secondaryHandleImage);g.execute=function(){for(var a=0;a<b.length;a++)this.copyStyle(b[a])};g.getPosition=c;g.setPosition=d;g.ignoreGrid=null!=e?e:!0;if(f){var h=g.positionChanged;g.positionChanged=function(){h.apply(this,arguments);a.view.invalidate(this.state.cell);a.view.validate()}}return g},za={link:function(a){return[Ca(a,!0,10),Ca(a,!1,10)]},flexArrow:function(a){var b=a.view.graph.gridSize/
-a.view.scale,c=[];mxUtils.getValue(a.style,mxConstants.STYLE_STARTARROW,mxConstants.NONE)!=mxConstants.NONE&&(c.push(ma(a,["width",mxConstants.STYLE_STARTSIZE,mxConstants.STYLE_ENDSIZE],!0,function(b,c,d,e,f){b=(a.shape.getEdgeWidth()-a.shape.strokewidth)*a.view.scale;f=3*mxUtils.getNumber(a.style,mxConstants.STYLE_STARTSIZE,mxConstants.ARROW_SIZE/5)*a.view.scale;return new mxPoint(e.x+c*(f+a.shape.strokewidth*a.view.scale)+d*b/2,e.y+d*(f+a.shape.strokewidth*a.view.scale)-c*b/2)},function(c,d,e,f,
-g,h,k){c=Math.sqrt(mxUtils.ptSegDistSq(f.x,f.y,g.x,g.y,h.x,h.y));d=mxUtils.ptLineDist(f.x,f.y,f.x+e,f.y-d,h.x,h.y);a.style[mxConstants.STYLE_STARTSIZE]=Math.round(100*(d-a.shape.strokewidth)/3)/100/a.view.scale;a.style.width=Math.round(2*c)/a.view.scale;mxEvent.isControlDown(k.getEvent())&&(a.style[mxConstants.STYLE_ENDSIZE]=a.style[mxConstants.STYLE_STARTSIZE]);mxEvent.isAltDown(k.getEvent())||Math.abs(parseFloat(a.style[mxConstants.STYLE_STARTSIZE])-parseFloat(a.style[mxConstants.STYLE_ENDSIZE]))<
-b/6&&(a.style[mxConstants.STYLE_STARTSIZE]=a.style[mxConstants.STYLE_ENDSIZE])})),c.push(ma(a,["startWidth","endWidth",mxConstants.STYLE_STARTSIZE,mxConstants.STYLE_ENDSIZE],!0,function(b,c,d,e,f){b=(a.shape.getStartArrowWidth()-a.shape.strokewidth)*a.view.scale;f=3*mxUtils.getNumber(a.style,mxConstants.STYLE_STARTSIZE,mxConstants.ARROW_SIZE/5)*a.view.scale;return new mxPoint(e.x+c*(f+a.shape.strokewidth*a.view.scale)+d*b/2,e.y+d*(f+a.shape.strokewidth*a.view.scale)-c*b/2)},function(c,d,e,f,g,h,k){c=
-Math.sqrt(mxUtils.ptSegDistSq(f.x,f.y,g.x,g.y,h.x,h.y));d=mxUtils.ptLineDist(f.x,f.y,f.x+e,f.y-d,h.x,h.y);a.style[mxConstants.STYLE_STARTSIZE]=Math.round(100*(d-a.shape.strokewidth)/3)/100/a.view.scale;a.style.startWidth=Math.max(0,Math.round(2*c)-a.shape.getEdgeWidth())/a.view.scale;mxEvent.isControlDown(k.getEvent())&&(a.style[mxConstants.STYLE_ENDSIZE]=a.style[mxConstants.STYLE_STARTSIZE],a.style.endWidth=a.style.startWidth);mxEvent.isAltDown(k.getEvent())||(Math.abs(parseFloat(a.style[mxConstants.STYLE_STARTSIZE])-
-parseFloat(a.style[mxConstants.STYLE_ENDSIZE]))<b/6&&(a.style[mxConstants.STYLE_STARTSIZE]=a.style[mxConstants.STYLE_ENDSIZE]),Math.abs(parseFloat(a.style.startWidth)-parseFloat(a.style.endWidth))<b&&(a.style.startWidth=a.style.endWidth))})));mxUtils.getValue(a.style,mxConstants.STYLE_ENDARROW,mxConstants.NONE)!=mxConstants.NONE&&(c.push(ma(a,["width",mxConstants.STYLE_STARTSIZE,mxConstants.STYLE_ENDSIZE],!1,function(b,c,d,e,f){b=(a.shape.getEdgeWidth()-a.shape.strokewidth)*a.view.scale;f=3*mxUtils.getNumber(a.style,
-mxConstants.STYLE_ENDSIZE,mxConstants.ARROW_SIZE/5)*a.view.scale;return new mxPoint(e.x+c*(f+a.shape.strokewidth*a.view.scale)-d*b/2,e.y+d*(f+a.shape.strokewidth*a.view.scale)+c*b/2)},function(c,d,e,f,g,h,k){c=Math.sqrt(mxUtils.ptSegDistSq(f.x,f.y,g.x,g.y,h.x,h.y));d=mxUtils.ptLineDist(f.x,f.y,f.x+e,f.y-d,h.x,h.y);a.style[mxConstants.STYLE_ENDSIZE]=Math.round(100*(d-a.shape.strokewidth)/3)/100/a.view.scale;a.style.width=Math.round(2*c)/a.view.scale;mxEvent.isControlDown(k.getEvent())&&(a.style[mxConstants.STYLE_STARTSIZE]=
-a.style[mxConstants.STYLE_ENDSIZE]);mxEvent.isAltDown(k.getEvent())||Math.abs(parseFloat(a.style[mxConstants.STYLE_ENDSIZE])-parseFloat(a.style[mxConstants.STYLE_STARTSIZE]))<b/6&&(a.style[mxConstants.STYLE_ENDSIZE]=a.style[mxConstants.STYLE_STARTSIZE])})),c.push(ma(a,["startWidth","endWidth",mxConstants.STYLE_STARTSIZE,mxConstants.STYLE_ENDSIZE],!1,function(b,c,d,e,f){b=(a.shape.getEndArrowWidth()-a.shape.strokewidth)*a.view.scale;f=3*mxUtils.getNumber(a.style,mxConstants.STYLE_ENDSIZE,mxConstants.ARROW_SIZE/
-5)*a.view.scale;return new mxPoint(e.x+c*(f+a.shape.strokewidth*a.view.scale)-d*b/2,e.y+d*(f+a.shape.strokewidth*a.view.scale)+c*b/2)},function(c,d,e,f,g,h,k){c=Math.sqrt(mxUtils.ptSegDistSq(f.x,f.y,g.x,g.y,h.x,h.y));d=mxUtils.ptLineDist(f.x,f.y,f.x+e,f.y-d,h.x,h.y);a.style[mxConstants.STYLE_ENDSIZE]=Math.round(100*(d-a.shape.strokewidth)/3)/100/a.view.scale;a.style.endWidth=Math.max(0,Math.round(2*c)-a.shape.getEdgeWidth())/a.view.scale;mxEvent.isControlDown(k.getEvent())&&(a.style[mxConstants.STYLE_STARTSIZE]=
-a.style[mxConstants.STYLE_ENDSIZE],a.style.startWidth=a.style.endWidth);mxEvent.isAltDown(k.getEvent())||(Math.abs(parseFloat(a.style[mxConstants.STYLE_ENDSIZE])-parseFloat(a.style[mxConstants.STYLE_STARTSIZE]))<b/6&&(a.style[mxConstants.STYLE_ENDSIZE]=a.style[mxConstants.STYLE_STARTSIZE]),Math.abs(parseFloat(a.style.endWidth)-parseFloat(a.style.startWidth))<b&&(a.style.endWidth=a.style.startWidth))})));return c},swimlane:function(a){var b=[da(a,[mxConstants.STYLE_STARTSIZE],function(b){var c=parseFloat(mxUtils.getValue(a.style,
-mxConstants.STYLE_STARTSIZE,mxConstants.DEFAULT_STARTSIZE));return 1==mxUtils.getValue(a.style,mxConstants.STYLE_HORIZONTAL,1)?new mxPoint(b.getCenterX(),b.y+Math.max(0,Math.min(b.height,c))):new mxPoint(b.x+Math.max(0,Math.min(b.width,c)),b.getCenterY())},function(b,c){a.style[mxConstants.STYLE_STARTSIZE]=1==mxUtils.getValue(this.state.style,mxConstants.STYLE_HORIZONTAL,1)?Math.round(Math.max(0,Math.min(b.height,c.y-b.y))):Math.round(Math.max(0,Math.min(b.width,c.x-b.x)))})];if(mxUtils.getValue(a.style,
-mxConstants.STYLE_ROUNDED)){var c=parseFloat(mxUtils.getValue(a.style,mxConstants.STYLE_STARTSIZE,mxConstants.DEFAULT_STARTSIZE));b.push(ga(a,c/2))}return b},label:oa(),ext:oa(),rectangle:oa(),triangle:oa(),rhombus:oa(),umlLifeline:function(a){return[da(a,["size"],function(a){var b=Math.max(0,Math.min(a.height,parseFloat(mxUtils.getValue(this.state.style,"size",M.prototype.size))));return new mxPoint(a.getCenterX(),a.y+b)},function(a,b){this.state.style.size=Math.round(Math.max(0,Math.min(a.height,
-b.y-a.y)))},!1)]},umlFrame:function(a){return[da(a,["width","height"],function(a){var b=Math.max(K.prototype.corner,Math.min(a.width,mxUtils.getValue(this.state.style,"width",K.prototype.width))),c=Math.max(1.5*K.prototype.corner,Math.min(a.height,mxUtils.getValue(this.state.style,"height",K.prototype.height)));return new mxPoint(a.x+b,a.y+c)},function(a,b){this.state.style.width=Math.round(Math.max(K.prototype.corner,Math.min(a.width,b.x-a.x)));this.state.style.height=Math.round(Math.max(1.5*K.prototype.corner,
-Math.min(a.height,b.y-a.y)))},!1)]},process:function(a){var b=[da(a,["size"],function(a){var b=Math.max(0,Math.min(.5,parseFloat(mxUtils.getValue(this.state.style,"size",t.prototype.size))));return new mxPoint(a.x+a.width*b,a.y+a.height/4)},function(a,b){this.state.style.size=Math.max(0,Math.min(.5,(b.x-a.x)/a.width))})];mxUtils.getValue(a.style,mxConstants.STYLE_ROUNDED,!1)&&b.push(ga(a));return b},cross:function(a){return[da(a,["size"],function(a){var b=Math.min(a.width,a.height),b=Math.max(0,Math.min(1,
-mxUtils.getValue(this.state.style,"size",ka.prototype.size)))*b/2;return new mxPoint(a.getCenterX()-b,a.getCenterY()-b)},function(a,b){var c=Math.min(a.width,a.height);this.state.style.size=Math.max(0,Math.min(1,Math.min(Math.max(0,a.getCenterY()-b.y)/c*2,Math.max(0,a.getCenterX()-b.x)/c*2)))})]},note:function(a){return[da(a,["size"],function(a){var b=Math.max(0,Math.min(a.width,Math.min(a.height,parseFloat(mxUtils.getValue(this.state.style,"size",e.prototype.size)))));return new mxPoint(a.x+a.width-
-b,a.y+b)},function(a,b){this.state.style.size=Math.round(Math.max(0,Math.min(Math.min(a.width,a.x+a.width-b.x),Math.min(a.height,b.y-a.y))))})]},manualInput:function(a){var b=[da(a,["size"],function(a){var b=Math.max(0,Math.min(a.height,mxUtils.getValue(this.state.style,"size",J.prototype.size)));return new mxPoint(a.x+a.width/4,a.y+3*b/4)},function(a,b){this.state.style.size=Math.round(Math.max(0,Math.min(a.height,4*(b.y-a.y)/3)))})];mxUtils.getValue(a.style,mxConstants.STYLE_ROUNDED,!1)&&b.push(ga(a));
-return b},dataStorage:function(a){return[da(a,["size"],function(a){var b=Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.state.style,"size",ea.prototype.size))));return new mxPoint(a.x+(1-b)*a.width,a.getCenterY())},function(a,b){this.state.style.size=Math.max(0,Math.min(1,(a.x+a.width-b.x)/a.width))})]},callout:function(a){var b=[da(a,["size","position"],function(a){var b=Math.max(0,Math.min(a.height,mxUtils.getValue(this.state.style,"size",y.prototype.size))),c=Math.max(0,Math.min(1,mxUtils.getValue(this.state.style,
-"position",y.prototype.position)));mxUtils.getValue(this.state.style,"base",y.prototype.base);return new mxPoint(a.x+c*a.width,a.y+a.height-b)},function(a,b){mxUtils.getValue(this.state.style,"base",y.prototype.base);this.state.style.size=Math.round(Math.max(0,Math.min(a.height,a.y+a.height-b.y)));this.state.style.position=Math.round(100*Math.max(0,Math.min(1,(b.x-a.x)/a.width)))/100}),da(a,["position2"],function(a){var b=Math.max(0,Math.min(1,mxUtils.getValue(this.state.style,"position2",y.prototype.position2)));
-return new mxPoint(a.x+b*a.width,a.y+a.height)},function(a,b){this.state.style.position2=Math.round(100*Math.max(0,Math.min(1,(b.x-a.x)/a.width)))/100}),da(a,["base"],function(a){var b=Math.max(0,Math.min(a.height,mxUtils.getValue(this.state.style,"size",y.prototype.size))),c=Math.max(0,Math.min(1,mxUtils.getValue(this.state.style,"position",y.prototype.position))),d=Math.max(0,Math.min(a.width,mxUtils.getValue(this.state.style,"base",y.prototype.base)));return new mxPoint(a.x+Math.min(a.width,c*
-a.width+d),a.y+a.height-b)},function(a,b){var c=Math.max(0,Math.min(1,mxUtils.getValue(this.state.style,"position",y.prototype.position)));this.state.style.base=Math.round(Math.max(0,Math.min(a.width,b.x-a.x-c*a.width)))})];mxUtils.getValue(a.style,mxConstants.STYLE_ROUNDED,!1)&&b.push(ga(a));return b},internalStorage:function(a){var b=[da(a,["dx","dy"],function(a){var b=Math.max(0,Math.min(a.width,mxUtils.getValue(this.state.style,"dx",I.prototype.dx))),c=Math.max(0,Math.min(a.height,mxUtils.getValue(this.state.style,
-"dy",I.prototype.dy)));return new mxPoint(a.x+b,a.y+c)},function(a,b){this.state.style.dx=Math.round(Math.max(0,Math.min(a.width,b.x-a.x)));this.state.style.dy=Math.round(Math.max(0,Math.min(a.height,b.y-a.y)))})];mxUtils.getValue(a.style,mxConstants.STYLE_ROUNDED,!1)&&b.push(ga(a));return b},corner:function(a){return[da(a,["dx","dy"],function(a){var b=Math.max(0,Math.min(a.width,mxUtils.getValue(this.state.style,"dx",aa.prototype.dx))),c=Math.max(0,Math.min(a.height,mxUtils.getValue(this.state.style,
-"dy",aa.prototype.dy)));return new mxPoint(a.x+b,a.y+c)},function(a,b){this.state.style.dx=Math.round(Math.max(0,Math.min(a.width,b.x-a.x)));this.state.style.dy=Math.round(Math.max(0,Math.min(a.height,b.y-a.y)))})]},tee:function(a){return[da(a,["dx","dy"],function(a){var b=Math.max(0,Math.min(a.width,mxUtils.getValue(this.state.style,"dx",H.prototype.dx))),c=Math.max(0,Math.min(a.height,mxUtils.getValue(this.state.style,"dy",H.prototype.dy)));return new mxPoint(a.x+(a.width+b)/2,a.y+c)},function(a,
-b){this.state.style.dx=Math.round(Math.max(0,2*Math.min(a.width/2,b.x-a.x-a.width/2)));this.state.style.dy=Math.round(Math.max(0,Math.min(a.height,b.y-a.y)))})]},singleArrow:ia(1),doubleArrow:ia(.5),folder:function(a){return[da(a,["tabWidth","tabHeight"],function(a){var b=Math.max(0,Math.min(a.width,mxUtils.getValue(this.state.style,"tabWidth",g.prototype.tabWidth))),c=Math.max(0,Math.min(a.height,mxUtils.getValue(this.state.style,"tabHeight",g.prototype.tabHeight)));mxUtils.getValue(this.state.style,
-"tabPosition",g.prototype.tabPosition)==mxConstants.ALIGN_RIGHT&&(b=a.width-b);return new mxPoint(a.x+b,a.y+c)},function(a,b){var c=Math.max(0,Math.min(a.width,b.x-a.x));mxUtils.getValue(this.state.style,"tabPosition",g.prototype.tabPosition)==mxConstants.ALIGN_RIGHT&&(c=a.width-c);this.state.style.tabWidth=Math.round(c);this.state.style.tabHeight=Math.round(Math.max(0,Math.min(a.height,b.y-a.y)))})]},document:function(a){return[da(a,["size"],function(a){var b=Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.state.style,
-"size",l.prototype.size))));return new mxPoint(a.x+3*a.width/4,a.y+(1-b)*a.height)},function(a,b){this.state.style.size=Math.max(0,Math.min(1,(a.y+a.height-b.y)/a.height))})]},tape:function(a){return[da(a,["size"],function(a){var b=Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.state.style,"size",k.prototype.size))));return new mxPoint(a.getCenterX(),a.y+b*a.height/2)},function(a,b){this.state.style.size=Math.max(0,Math.min(1,(b.y-a.y)/a.height*2))})]},offPageConnector:function(a){return[da(a,
-["size"],function(a){var b=Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.state.style,"size",W.prototype.size))));return new mxPoint(a.getCenterX(),a.y+(1-b)*a.height)},function(a,b){this.state.style.size=Math.max(0,Math.min(1,(a.y+a.height-b.y)/a.height))})]},step:ra(x.prototype.size,!0,null,!0),hexagon:ra(w.prototype.size,!0,.5,!0),curlyBracket:ra(p.prototype.size,!1),display:ra(la.prototype.size,!1),cube:ya(1,a.prototype.size,!1),card:ya(.5,h.prototype.size,!0),loopLimit:ya(.5,T.prototype.size,
-!0),trapezoid:na(.5),parallelogram:na(1)};Graph.createHandle=da;Graph.handleFactory=za;mxVertexHandler.prototype.createCustomHandles=function(){if(1==this.state.view.graph.getSelectionCount()&&this.graph.isCellRotatable(this.state.cell)){var a=this.state.style.shape;null==this.state.view.graph.cellRenderer.defaultShapes[a]&&null==mxStencilRegistry.getStencil(a)&&(a=mxConstants.SHAPE_RECTANGLE);a=za[a];if(null!=a)return a(this.state)}return null};mxEdgeHandler.prototype.createCustomHandles=function(){if(1==
-this.state.view.graph.getSelectionCount()){var a=this.state.style.shape;null==this.state.view.graph.cellRenderer.defaultShapes[a]&&null==mxStencilRegistry.getStencil(a)&&(a=mxConstants.SHAPE_CONNECTOR);a=za[a];if(null!=a)return a(this.state)}return null}}else Graph.createHandle=function(){},Graph.handleFactory={};var ta=new mxPoint(1,0),ua=new mxPoint(1,0),ia=mxUtils.toRadians(-30),ta=mxUtils.getRotatedPoint(ta,Math.cos(ia),Math.sin(ia)),ia=mxUtils.toRadians(-150),ua=mxUtils.getRotatedPoint(ua,Math.cos(ia),
-Math.sin(ia));mxEdgeStyle.IsometricConnector=function(a,b,c,d,e){var f=a.view;d=null!=d&&0<d.length?d[0]:null;var g=a.absolutePoints,h=g[0],g=g[g.length-1];null!=d&&(d=f.transformControlPoint(a,d));null==h&&null!=b&&(h=new mxPoint(b.getCenterX(),b.getCenterY()));null==g&&null!=c&&(g=new mxPoint(c.getCenterX(),c.getCenterY()));var k=ta.x,l=ta.y,m=ua.x,n=ua.y,p="horizontal"==mxUtils.getValue(a.style,"elbow","horizontal");if(null!=g&&null!=h){a=function(a,b,c){a-=q.x;var d=b-q.y;b=(n*a-m*d)/(k*n-l*m);
-a=(l*a-k*d)/(l*m-k*n);p?(c&&(q=new mxPoint(q.x+k*b,q.y+l*b),e.push(q)),q=new mxPoint(q.x+m*a,q.y+n*a)):(c&&(q=new mxPoint(q.x+m*a,q.y+n*a),e.push(q)),q=new mxPoint(q.x+k*b,q.y+l*b));e.push(q)};var q=h;null==d&&(d=new mxPoint(h.x+(g.x-h.x)/2,h.y+(g.y-h.y)/2));a(d.x,d.y,!0);a(g.x,g.y,!1)}};mxStyleRegistry.putValue("isometricEdgeStyle",mxEdgeStyle.IsometricConnector);var Ha=Graph.prototype.createEdgeHandler;Graph.prototype.createEdgeHandler=function(a,b){if(b==mxEdgeStyle.IsometricConnector){var c=new mxElbowEdgeHandler(a);
-c.snapToTerminals=!1;return c}return Ha.apply(this,arguments)};b.prototype.constraints=[];c.prototype.constraints=[];y.prototype.constraints=[];mxRectangleShape.prototype.constraints=[new mxConnectionConstraint(new mxPoint(.25,0),!0),new mxConnectionConstraint(new mxPoint(.5,0),!0),new mxConnectionConstraint(new mxPoint(.75,0),!0),new mxConnectionConstraint(new mxPoint(0,.25),!0),new mxConnectionConstraint(new mxPoint(0,.5),!0),new mxConnectionConstraint(new mxPoint(0,.75),!0),new mxConnectionConstraint(new mxPoint(1,
-.25),!0),new mxConnectionConstraint(new mxPoint(1,.5),!0),new mxConnectionConstraint(new mxPoint(1,.75),!0),new mxConnectionConstraint(new mxPoint(.25,1),!0),new mxConnectionConstraint(new mxPoint(.5,1),!0),new mxConnectionConstraint(new mxPoint(.75,1),!0)];mxEllipse.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,0),!0),new mxConnectionConstraint(new mxPoint(1,0),!0),new mxConnectionConstraint(new mxPoint(0,1),!0),new mxConnectionConstraint(new mxPoint(1,1),!0),new mxConnectionConstraint(new mxPoint(.5,
-0),!0),new mxConnectionConstraint(new mxPoint(.5,1),!0),new mxConnectionConstraint(new mxPoint(0,.5),!0),new mxConnectionConstraint(new mxPoint(1,.5))];mxLabel.prototype.constraints=mxRectangleShape.prototype.constraints;mxImageShape.prototype.constraints=mxRectangleShape.prototype.constraints;mxSwimlane.prototype.constraints=mxRectangleShape.prototype.constraints;z.prototype.constraints=mxRectangleShape.prototype.constraints;e.prototype.constraints=mxRectangleShape.prototype.constraints;h.prototype.constraints=
-mxRectangleShape.prototype.constraints;a.prototype.constraints=mxRectangleShape.prototype.constraints;g.prototype.constraints=mxRectangleShape.prototype.constraints;I.prototype.constraints=mxRectangleShape.prototype.constraints;ea.prototype.constraints=mxRectangleShape.prototype.constraints;O.prototype.constraints=mxEllipse.prototype.constraints;Q.prototype.constraints=mxEllipse.prototype.constraints;fa.prototype.constraints=mxEllipse.prototype.constraints;pa.prototype.constraints=mxEllipse.prototype.constraints;
-J.prototype.constraints=mxRectangleShape.prototype.constraints;qa.prototype.constraints=mxRectangleShape.prototype.constraints;la.prototype.constraints=mxRectangleShape.prototype.constraints;T.prototype.constraints=mxRectangleShape.prototype.constraints;W.prototype.constraints=mxRectangleShape.prototype.constraints;mxCylinder.prototype.constraints=[new mxConnectionConstraint(new mxPoint(.15,.05),!1),new mxConnectionConstraint(new mxPoint(.5,0),!0),new mxConnectionConstraint(new mxPoint(.85,.05),!1),
-new mxConnectionConstraint(new mxPoint(0,.3),!0),new mxConnectionConstraint(new mxPoint(0,.5),!0),new mxConnectionConstraint(new mxPoint(0,.7),!0),new mxConnectionConstraint(new mxPoint(1,.3),!0),new mxConnectionConstraint(new mxPoint(1,.5),!0),new mxConnectionConstraint(new mxPoint(1,.7),!0),new mxConnectionConstraint(new mxPoint(.15,.95),!1),new mxConnectionConstraint(new mxPoint(.5,1),!0),new mxConnectionConstraint(new mxPoint(.85,.95),!1)];E.prototype.constraints=[new mxConnectionConstraint(new mxPoint(.25,
-.1),!1),new mxConnectionConstraint(new mxPoint(.5,0),!1),new mxConnectionConstraint(new mxPoint(.75,.1),!1),new mxConnectionConstraint(new mxPoint(0,1/3),!1),new mxConnectionConstraint(new mxPoint(0,1),!1),new mxConnectionConstraint(new mxPoint(1,1/3),!1),new mxConnectionConstraint(new mxPoint(1,1),!1),new mxConnectionConstraint(new mxPoint(.5,.5),!1)];S.prototype.constraints=[new mxConnectionConstraint(new mxPoint(.25,0),!0),new mxConnectionConstraint(new mxPoint(.5,0),!0),new mxConnectionConstraint(new mxPoint(.75,
-0),!0),new mxConnectionConstraint(new mxPoint(0,.3),!0),new mxConnectionConstraint(new mxPoint(0,.7),!0),new mxConnectionConstraint(new mxPoint(1,.25),!0),new mxConnectionConstraint(new mxPoint(1,.5),!0),new mxConnectionConstraint(new mxPoint(1,.75),!0),new mxConnectionConstraint(new mxPoint(.25,1),!0),new mxConnectionConstraint(new mxPoint(.5,1),!0),new mxConnectionConstraint(new mxPoint(.75,1),!0)];mxActor.prototype.constraints=[new mxConnectionConstraint(new mxPoint(.5,0),!0),new mxConnectionConstraint(new mxPoint(.25,
-.2),!1),new mxConnectionConstraint(new mxPoint(.1,.5),!1),new mxConnectionConstraint(new mxPoint(0,.75),!0),new mxConnectionConstraint(new mxPoint(.75,.25),!1),new mxConnectionConstraint(new mxPoint(.9,.5),!1),new mxConnectionConstraint(new mxPoint(1,.75),!0),new mxConnectionConstraint(new mxPoint(.25,1),!0),new mxConnectionConstraint(new mxPoint(.5,1),!0),new mxConnectionConstraint(new mxPoint(.75,1),!0)];f.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,0),!1),new mxConnectionConstraint(new mxPoint(.5,
-.25),!1),new mxConnectionConstraint(new mxPoint(1,0),!1),new mxConnectionConstraint(new mxPoint(.25,.5),!1),new mxConnectionConstraint(new mxPoint(.75,.5),!1),new mxConnectionConstraint(new mxPoint(0,1),!1),new mxConnectionConstraint(new mxPoint(.5,.75),!1),new mxConnectionConstraint(new mxPoint(1,1),!1)];k.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,.35),!1),new mxConnectionConstraint(new mxPoint(0,.5),!1),new mxConnectionConstraint(new mxPoint(0,.65),!1),new mxConnectionConstraint(new mxPoint(1,
-.35),!1),new mxConnectionConstraint(new mxPoint(1,.5),!1),new mxConnectionConstraint(new mxPoint(1,.65),!1),new mxConnectionConstraint(new mxPoint(.25,1),!1),new mxConnectionConstraint(new mxPoint(.75,0),!1)];x.prototype.constraints=[new mxConnectionConstraint(new mxPoint(.25,0),!0),new mxConnectionConstraint(new mxPoint(.5,0),!0),new mxConnectionConstraint(new mxPoint(.75,0),!0),new mxConnectionConstraint(new mxPoint(.25,1),!0),new mxConnectionConstraint(new mxPoint(.5,1),!0),new mxConnectionConstraint(new mxPoint(.75,
-1),!0),new mxConnectionConstraint(new mxPoint(.1,.25),!0),new mxConnectionConstraint(new mxPoint(.2,.5),!0),new mxConnectionConstraint(new mxPoint(.1,.75),!0),new mxConnectionConstraint(new mxPoint(.9,.25),!0),new mxConnectionConstraint(new mxPoint(1,.5),!0),new mxConnectionConstraint(new mxPoint(.9,.75),!0)];mxLine.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,.5),!1),new mxConnectionConstraint(new mxPoint(.25,.5),!1),new mxConnectionConstraint(new mxPoint(.75,.5),!1),new mxConnectionConstraint(new mxPoint(1,
-.5),!1)];L.prototype.constraints=[new mxConnectionConstraint(new mxPoint(.5,0),!1),new mxConnectionConstraint(new mxPoint(.5,1),!1)];mxDoubleEllipse.prototype.constraints=mxEllipse.prototype.constraints;mxRhombus.prototype.constraints=mxEllipse.prototype.constraints;mxTriangle.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,.25),!0),new mxConnectionConstraint(new mxPoint(0,.5),!0),new mxConnectionConstraint(new mxPoint(0,.75),!0),new mxConnectionConstraint(new mxPoint(.5,0),!0),new mxConnectionConstraint(new mxPoint(.5,
-1),!0),new mxConnectionConstraint(new mxPoint(1,.5),!0)];mxHexagon.prototype.constraints=[new mxConnectionConstraint(new mxPoint(.375,0),!0),new mxConnectionConstraint(new mxPoint(.5,0),!0),new mxConnectionConstraint(new mxPoint(.625,0),!0),new mxConnectionConstraint(new mxPoint(.125,.25),!0),new mxConnectionConstraint(new mxPoint(0,.5),!0),new mxConnectionConstraint(new mxPoint(.125,.75),!0),new mxConnectionConstraint(new mxPoint(.875,.25),!0),new mxConnectionConstraint(new mxPoint(0,.5),!0),new mxConnectionConstraint(new mxPoint(1,
-.5),!0),new mxConnectionConstraint(new mxPoint(.875,.75),!0),new mxConnectionConstraint(new mxPoint(.375,1),!0),new mxConnectionConstraint(new mxPoint(.5,1),!0),new mxConnectionConstraint(new mxPoint(.625,1),!0)];mxCloud.prototype.constraints=[new mxConnectionConstraint(new mxPoint(.25,.25),!1),new mxConnectionConstraint(new mxPoint(.4,.1),!1),new mxConnectionConstraint(new mxPoint(.16,.55),!1),new mxConnectionConstraint(new mxPoint(.07,.4),!1),new mxConnectionConstraint(new mxPoint(.31,.8),!1),new mxConnectionConstraint(new mxPoint(.13,
-.77),!1),new mxConnectionConstraint(new mxPoint(.8,.8),!1),new mxConnectionConstraint(new mxPoint(.55,.95),!1),new mxConnectionConstraint(new mxPoint(.875,.5),!1),new mxConnectionConstraint(new mxPoint(.96,.7),!1),new mxConnectionConstraint(new mxPoint(.625,.2),!1),new mxConnectionConstraint(new mxPoint(.88,.25),!1)];m.prototype.constraints=mxRectangleShape.prototype.constraints;n.prototype.constraints=mxRectangleShape.prototype.constraints;l.prototype.constraints=[new mxConnectionConstraint(new mxPoint(.25,
-0),!0),new mxConnectionConstraint(new mxPoint(.5,0),!0),new mxConnectionConstraint(new mxPoint(.75,0),!0),new mxConnectionConstraint(new mxPoint(0,.25),!0),new mxConnectionConstraint(new mxPoint(0,.5),!0),new mxConnectionConstraint(new mxPoint(0,.75),!0),new mxConnectionConstraint(new mxPoint(1,.25),!0),new mxConnectionConstraint(new mxPoint(1,.5),!0),new mxConnectionConstraint(new mxPoint(1,.75),!0)];mxArrow.prototype.constraints=null;H.prototype.constraints=null;aa.prototype.constraints=null;N.prototype.constraints=
-[new mxConnectionConstraint(new mxPoint(0,0),!1),new mxConnectionConstraint(new mxPoint(0,.5),!1),new mxConnectionConstraint(new mxPoint(0,1),!1),new mxConnectionConstraint(new mxPoint(.25,.5),!1),new mxConnectionConstraint(new mxPoint(.5,.5),!1),new mxConnectionConstraint(new mxPoint(.75,.5),!1),new mxConnectionConstraint(new mxPoint(1,0),!1),new mxConnectionConstraint(new mxPoint(1,.5),!1),new mxConnectionConstraint(new mxPoint(1,1),!1)];U.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,
-.5),!1),new mxConnectionConstraint(new mxPoint(1,.5),!1)];ba.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,.5),!1),new mxConnectionConstraint(new mxPoint(1,.5),!1)];ka.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,.5),!1),new mxConnectionConstraint(new mxPoint(1,.5),!1),new mxConnectionConstraint(new mxPoint(.5,0),!1),new mxConnectionConstraint(new mxPoint(.5,1),!1)];M.prototype.constraints=null;ca.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,
-.25),!1),new mxConnectionConstraint(new mxPoint(0,.5),!1),new mxConnectionConstraint(new mxPoint(0,.75),!1),new mxConnectionConstraint(new mxPoint(1,.5),!1),new mxConnectionConstraint(new mxPoint(.7,.1),!1),new mxConnectionConstraint(new mxPoint(.7,.9),!1)];P.prototype.constraints=[new mxConnectionConstraint(new mxPoint(.175,.25),!1),new mxConnectionConstraint(new mxPoint(.25,.5),!1),new mxConnectionConstraint(new mxPoint(.175,.75),!1),new mxConnectionConstraint(new mxPoint(1,.5),!1),new mxConnectionConstraint(new mxPoint(.7,
-.1),!1),new mxConnectionConstraint(new mxPoint(.7,.9),!1)]})();
\ No newline at end of file
+function(a,b,c,d,e){var f=d*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));if(this.isRounded)var g=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,100*mxConstants.RECTANGLE_ROUNDING_FACTOR)/100,f=Math.max(f,Math.min(d*g,e*g));a.begin();a.moveTo(b+f,c);a.lineTo(b+f,c+e);a.moveTo(b+d-f,c);a.lineTo(b+d-f,c+e);a.end();a.stroke();mxRectangleShape.prototype.paintForeground.apply(this,arguments)};mxCellRenderer.prototype.defaultShapes.process=t;mxUtils.extend(z,mxRectangleShape);
+z.prototype.paintBackground=function(a,b,c,d,e){a.setFillColor(mxConstants.NONE);a.rect(b,c,d,e);a.fill()};z.prototype.paintForeground=function(a,b,c,d,e){};mxCellRenderer.prototype.defaultShapes.transparent=z;mxUtils.extend(w,mxHexagon);w.prototype.size=30;w.prototype.position=.5;w.prototype.position2=.5;w.prototype.base=20;w.prototype.getLabelMargins=function(){return new mxRectangle(0,0,0,parseFloat(mxUtils.getValue(this.style,"size",this.size))*this.scale)};w.prototype.redrawPath=function(a,b,
+c,d,e){b=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;c=Math.max(0,Math.min(e,parseFloat(mxUtils.getValue(this.style,"size",this.size))));var f=d*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"position",this.position)))),g=d*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"position2",this.position2)))),h=Math.max(0,Math.min(d,parseFloat(mxUtils.getValue(this.style,"base",this.base))));this.addPoints(a,[new mxPoint(0,0),new mxPoint(d,
+0),new mxPoint(d,e-c),new mxPoint(Math.min(d,f+h),e-c),new mxPoint(g,e),new mxPoint(Math.max(0,f),e-c),new mxPoint(0,e-c)],this.isRounded,b,!0,[4])};mxCellRenderer.prototype.defaultShapes.callout=w;mxUtils.extend(x,mxActor);x.prototype.size=.2;x.prototype.redrawPath=function(a,b,c,d,e){b=d*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));c=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(a,[new mxPoint(0,0),new mxPoint(d-
+b,0),new mxPoint(d,e/2),new mxPoint(d-b,e),new mxPoint(0,e),new mxPoint(b,e/2)],this.isRounded,c,!0);a.end()};mxCellRenderer.prototype.defaultShapes.step=x;mxUtils.extend(y,mxHexagon);y.prototype.size=.25;y.prototype.redrawPath=function(a,b,c,d,e){b=d*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));c=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(a,[new mxPoint(b,0),new mxPoint(d-b,0),new mxPoint(d,.5*e),new mxPoint(d-
+b,e),new mxPoint(b,e),new mxPoint(0,.5*e)],this.isRounded,c,!0)};mxCellRenderer.prototype.defaultShapes.hexagon=y;mxUtils.extend(u,mxRectangleShape);u.prototype.isHtmlAllowed=function(){return!1};u.prototype.paintForeground=function(a,b,c,d,e){var f=Math.min(d/5,e/5)+1;a.begin();a.moveTo(b+d/2,c+f);a.lineTo(b+d/2,c+e-f);a.moveTo(b+f,c+e/2);a.lineTo(b+d-f,c+e/2);a.end();a.stroke();mxRectangleShape.prototype.paintForeground.apply(this,arguments)};mxCellRenderer.prototype.defaultShapes.plus=u;var Ba=
+mxRhombus.prototype.paintVertexShape;mxRhombus.prototype.getLabelBounds=function(a){if(1==this.style["double"]){var b=(2*Math.max(2,this.strokewidth+1)+parseFloat(this.style[mxConstants.STYLE_MARGIN]||0))*this.scale;return new mxRectangle(a.x+b,a.y+b,a.width-2*b,a.height-2*b)}return a};mxRhombus.prototype.paintVertexShape=function(a,b,c,d,e){Ba.apply(this,arguments);if(!this.outline&&1==this.style["double"]){var f=2*Math.max(2,this.strokewidth+1)+parseFloat(this.style[mxConstants.STYLE_MARGIN]||0);
+b+=f;c+=f;d-=2*f;e-=2*f;0<d&&0<e&&(a.setShadow(!1),Ba.apply(this,[a,b,c,d,e]))}};mxUtils.extend(D,mxRectangleShape);D.prototype.isHtmlAllowed=function(){return!1};D.prototype.getLabelBounds=function(a){if(1==this.style["double"]){var b=(Math.max(2,this.strokewidth+1)+parseFloat(this.style[mxConstants.STYLE_MARGIN]||0))*this.scale;return new mxRectangle(a.x+b,a.y+b,a.width-2*b,a.height-2*b)}return a};D.prototype.paintForeground=function(a,b,c,d,e){if(null!=this.style){if(!this.outline&&1==this.style["double"]){var f=
+Math.max(2,this.strokewidth+1)+parseFloat(this.style[mxConstants.STYLE_MARGIN]||0);b+=f;c+=f;d-=2*f;e-=2*f;0<d&&0<e&&mxRectangleShape.prototype.paintBackground.apply(this,arguments)}a.setDashed(!1);var f=0,g;do{g=mxCellRenderer.prototype.defaultShapes[this.style["symbol"+f]];if(null!=g){var h=this.style["symbol"+f+"Align"],k=this.style["symbol"+f+"VerticalAlign"],l=this.style["symbol"+f+"Width"],m=this.style["symbol"+f+"Height"],ra=this.style["symbol"+f+"Spacing"]||0,n=this.style["symbol"+f+"VSpacing"]||
+ra,p=this.style["symbol"+f+"ArcSpacing"];null!=p&&(p*=this.getArcSize(d+this.strokewidth,e+this.strokewidth),ra+=p,n+=p);var p=b,q=c,p=h==mxConstants.ALIGN_CENTER?p+(d-l)/2:h==mxConstants.ALIGN_RIGHT?p+(d-l-ra):p+ra,q=k==mxConstants.ALIGN_MIDDLE?q+(e-m)/2:k==mxConstants.ALIGN_BOTTOM?q+(e-m-n):q+n;a.save();h=new g;h.style=this.style;g.prototype.paintVertexShape.call(h,a,p,q,l,m);a.restore()}f++}while(null!=g)}mxRectangleShape.prototype.paintForeground.apply(this,arguments)};mxCellRenderer.prototype.defaultShapes.ext=
+D;mxUtils.extend(F,mxCylinder);F.prototype.redrawPath=function(a,b,c,d,e,f){f?(a.moveTo(0,0),a.lineTo(d/2,e/2),a.lineTo(d,0),a.end()):(a.moveTo(0,0),a.lineTo(d,0),a.lineTo(d,e),a.lineTo(0,e),a.close())};mxCellRenderer.prototype.defaultShapes.message=F;mxUtils.extend(E,mxShape);E.prototype.paintBackground=function(a,b,c,d,e){a.translate(b,c);a.ellipse(d/4,0,d/2,e/4);a.fillAndStroke();a.begin();a.moveTo(d/2,e/4);a.lineTo(d/2,2*e/3);a.moveTo(d/2,e/3);a.lineTo(0,e/3);a.moveTo(d/2,e/3);a.lineTo(d,e/3);
+a.moveTo(d/2,2*e/3);a.lineTo(0,e);a.moveTo(d/2,2*e/3);a.lineTo(d,e);a.end();a.stroke()};mxCellRenderer.prototype.defaultShapes.umlActor=E;mxUtils.extend(C,mxShape);C.prototype.getLabelMargins=function(a){return new mxRectangle(a.width/6,0,0,0)};C.prototype.paintBackground=function(a,b,c,d,e){a.translate(b,c);a.begin();a.moveTo(0,e/4);a.lineTo(0,3*e/4);a.end();a.stroke();a.begin();a.moveTo(0,e/2);a.lineTo(d/6,e/2);a.end();a.stroke();a.ellipse(d/6,0,5*d/6,e);a.fillAndStroke()};mxCellRenderer.prototype.defaultShapes.umlBoundary=
+C;mxUtils.extend(G,mxEllipse);G.prototype.paintVertexShape=function(a,b,c,d,e){mxEllipse.prototype.paintVertexShape.apply(this,arguments);a.begin();a.moveTo(b+d/8,c+e);a.lineTo(b+7*d/8,c+e);a.end();a.stroke()};mxCellRenderer.prototype.defaultShapes.umlEntity=G;mxUtils.extend(B,mxShape);B.prototype.paintVertexShape=function(a,b,c,d,e){a.translate(b,c);a.begin();a.moveTo(d,0);a.lineTo(0,e);a.moveTo(0,0);a.lineTo(d,e);a.end();a.stroke()};mxCellRenderer.prototype.defaultShapes.umlDestroy=B;mxUtils.extend(M,
+mxShape);M.prototype.getLabelBounds=function(a){return new mxRectangle(a.x,a.y+a.height/8,a.width,7*a.height/8)};M.prototype.paintBackground=function(a,b,c,d,e){a.translate(b,c);a.begin();a.moveTo(3*d/8,e/8*1.1);a.lineTo(5*d/8,0);a.end();a.stroke();a.ellipse(0,e/8,d,7*e/8);a.fillAndStroke()};M.prototype.paintForeground=function(a,b,c,d,e){a.begin();a.moveTo(3*d/8,e/8*1.1);a.lineTo(5*d/8,e/4);a.end();a.stroke()};mxCellRenderer.prototype.defaultShapes.umlControl=M;mxUtils.extend(L,mxRectangleShape);
+L.prototype.size=40;L.prototype.isHtmlAllowed=function(){return!1};L.prototype.getLabelBounds=function(a){var b=Math.max(0,Math.min(a.height,parseFloat(mxUtils.getValue(this.style,"size",this.size))*this.scale));return new mxRectangle(a.x,a.y,a.width,b)};L.prototype.paintBackground=function(a,b,c,d,e){var f=Math.max(0,Math.min(e,parseFloat(mxUtils.getValue(this.style,"size",this.size)))),g=mxUtils.getValue(this.style,"participant");null==g||null==this.state?mxRectangleShape.prototype.paintBackground.call(this,
+a,b,c,d,f):(g=this.state.view.graph.cellRenderer.getShape(g),null!=g&&g!=L&&(g=new g,g.apply(this.state),a.save(),g.paintVertexShape(a,b,c,d,f),a.restore()));f<e&&(a.setDashed(!0),a.begin(),a.moveTo(b+d/2,c+f),a.lineTo(b+d/2,c+e),a.end(),a.stroke())};L.prototype.paintForeground=function(a,b,c,d,e){var f=Math.max(0,Math.min(e,parseFloat(mxUtils.getValue(this.style,"size",this.size))));mxRectangleShape.prototype.paintForeground.call(this,a,b,c,d,Math.min(e,f))};mxCellRenderer.prototype.defaultShapes.umlLifeline=
+L;mxUtils.extend(H,mxShape);H.prototype.width=60;H.prototype.height=30;H.prototype.corner=10;H.prototype.getLabelMargins=function(a){return new mxRectangle(0,0,a.width-parseFloat(mxUtils.getValue(this.style,"width",this.width)*this.scale),a.height-parseFloat(mxUtils.getValue(this.style,"height",this.height)*this.scale))};H.prototype.paintBackground=function(a,b,c,d,e){var f=this.corner,g=Math.min(d,Math.max(f,parseFloat(mxUtils.getValue(this.style,"width",this.width)))),h=Math.min(e,Math.max(1.5*
+f,parseFloat(mxUtils.getValue(this.style,"height",this.height))));a.begin();a.moveTo(b,c);a.lineTo(b+g,c);a.lineTo(b+g,c+Math.max(0,h-1.5*f));a.lineTo(b+Math.max(0,g-f),c+h);a.lineTo(b,c+h);a.close();a.fillAndStroke();a.begin();a.moveTo(b+g,c);a.lineTo(b+d,c);a.lineTo(b+d,c+e);a.lineTo(b,c+e);a.lineTo(b,c+h);a.stroke()};mxCellRenderer.prototype.defaultShapes.umlFrame=H;mxPerimeter.LifelinePerimeter=function(a,b,c,d){d=L.prototype.size;null!=b&&(d=mxUtils.getValue(b.style,"size",d)*b.view.scale);b=
+parseFloat(b.style[mxConstants.STYLE_STROKEWIDTH]||1)*b.view.scale/2-1;c.x<a.getCenterX()&&(b=-1*(b+1));return new mxPoint(a.getCenterX()+b,Math.min(a.y+a.height,Math.max(a.y+d,c.y)))};mxStyleRegistry.putValue("lifelinePerimeter",mxPerimeter.LifelinePerimeter);mxPerimeter.OrthogonalPerimeter=function(a,b,c,d){d=!0;return mxPerimeter.RectanglePerimeter.apply(this,arguments)};mxStyleRegistry.putValue("orthogonalPerimeter",mxPerimeter.OrthogonalPerimeter);mxPerimeter.BackbonePerimeter=function(a,b,c,
+d){d=parseFloat(b.style[mxConstants.STYLE_STROKEWIDTH]||1)*b.view.scale/2-1;null!=b.style.backboneSize&&(d+=parseFloat(b.style.backboneSize)*b.view.scale/2-1);if("south"==b.style[mxConstants.STYLE_DIRECTION]||"north"==b.style[mxConstants.STYLE_DIRECTION])return c.x<a.getCenterX()&&(d=-1*(d+1)),new mxPoint(a.getCenterX()+d,Math.min(a.y+a.height,Math.max(a.y,c.y)));c.y<a.getCenterY()&&(d=-1*(d+1));return new mxPoint(Math.min(a.x+a.width,Math.max(a.x,c.x)),a.getCenterY()+d)};mxStyleRegistry.putValue("backbonePerimeter",
+mxPerimeter.BackbonePerimeter);mxPerimeter.CalloutPerimeter=function(a,b,c,d){return mxPerimeter.RectanglePerimeter(mxUtils.getDirectedBounds(a,new mxRectangle(0,0,0,Math.max(0,Math.min(a.height,parseFloat(mxUtils.getValue(b.style,"size",w.prototype.size))*b.view.scale))),b.style),b,c,d)};mxStyleRegistry.putValue("calloutPerimeter",mxPerimeter.CalloutPerimeter);mxPerimeter.ParallelogramPerimeter=function(a,b,c,d){var e=m.prototype.size;null!=b&&(e=mxUtils.getValue(b.style,"size",e));var f=a.x,g=a.y,
+h=a.width,k=a.height;b=null!=b?mxUtils.getValue(b.style,mxConstants.STYLE_DIRECTION,mxConstants.DIRECTION_EAST):mxConstants.DIRECTION_EAST;b==mxConstants.DIRECTION_NORTH||b==mxConstants.DIRECTION_SOUTH?(e=k*Math.max(0,Math.min(1,e)),g=[new mxPoint(f,g),new mxPoint(f+h,g+e),new mxPoint(f+h,g+k),new mxPoint(f,g+k-e),new mxPoint(f,g)]):(e=h*Math.max(0,Math.min(1,e)),g=[new mxPoint(f+e,g),new mxPoint(f+h,g),new mxPoint(f+h-e,g+k),new mxPoint(f,g+k),new mxPoint(f+e,g)]);k=a.getCenterX();a=a.getCenterY();
+a=new mxPoint(k,a);d&&(c.x<f||c.x>f+h?a.y=c.y:a.x=c.x);return mxUtils.getPerimeterPoint(g,a,c)};mxStyleRegistry.putValue("parallelogramPerimeter",mxPerimeter.ParallelogramPerimeter);mxPerimeter.TrapezoidPerimeter=function(a,b,c,d){var e=n.prototype.size;null!=b&&(e=mxUtils.getValue(b.style,"size",e));var f=a.x,g=a.y,h=a.width,k=a.height;b=null!=b?mxUtils.getValue(b.style,mxConstants.STYLE_DIRECTION,mxConstants.DIRECTION_EAST):mxConstants.DIRECTION_EAST;b==mxConstants.DIRECTION_EAST?(e=h*Math.max(0,
+Math.min(1,e)),g=[new mxPoint(f+e,g),new mxPoint(f+h-e,g),new mxPoint(f+h,g+k),new mxPoint(f,g+k),new mxPoint(f+e,g)]):b==mxConstants.DIRECTION_WEST?(e=h*Math.max(0,Math.min(1,e)),g=[new mxPoint(f,g),new mxPoint(f+h,g),new mxPoint(f+h-e,g+k),new mxPoint(f+e,g+k),new mxPoint(f,g)]):b==mxConstants.DIRECTION_NORTH?(e=k*Math.max(0,Math.min(1,e)),g=[new mxPoint(f,g+e),new mxPoint(f+h,g),new mxPoint(f+h,g+k),new mxPoint(f,g+k-e),new mxPoint(f,g+e)]):(e=k*Math.max(0,Math.min(1,e)),g=[new mxPoint(f,g),new mxPoint(f+
+h,g+e),new mxPoint(f+h,g+k-e),new mxPoint(f,g+k),new mxPoint(f,g)]);k=a.getCenterX();a=a.getCenterY();a=new mxPoint(k,a);d&&(c.x<f||c.x>f+h?a.y=c.y:a.x=c.x);return mxUtils.getPerimeterPoint(g,a,c)};mxStyleRegistry.putValue("trapezoidPerimeter",mxPerimeter.TrapezoidPerimeter);mxPerimeter.StepPerimeter=function(a,b,c,d){var e=x.prototype.size;null!=b&&(e=mxUtils.getValue(b.style,"size",e));var f=a.x,g=a.y,h=a.width,k=a.height,l=a.getCenterX();a=a.getCenterY();b=null!=b?mxUtils.getValue(b.style,mxConstants.STYLE_DIRECTION,
+mxConstants.DIRECTION_EAST):mxConstants.DIRECTION_EAST;b==mxConstants.DIRECTION_EAST?(e=h*Math.max(0,Math.min(1,e)),g=[new mxPoint(f,g),new mxPoint(f+h-e,g),new mxPoint(f+h,a),new mxPoint(f+h-e,g+k),new mxPoint(f,g+k),new mxPoint(f+e,a),new mxPoint(f,g)]):b==mxConstants.DIRECTION_WEST?(e=h*Math.max(0,Math.min(1,e)),g=[new mxPoint(f+e,g),new mxPoint(f+h,g),new mxPoint(f+h-e,a),new mxPoint(f+h,g+k),new mxPoint(f+e,g+k),new mxPoint(f,a),new mxPoint(f+e,g)]):b==mxConstants.DIRECTION_NORTH?(e=k*Math.max(0,
+Math.min(1,e)),g=[new mxPoint(f,g+e),new mxPoint(l,g),new mxPoint(f+h,g+e),new mxPoint(f+h,g+k),new mxPoint(l,g+k-e),new mxPoint(f,g+k),new mxPoint(f,g+e)]):(e=k*Math.max(0,Math.min(1,e)),g=[new mxPoint(f,g),new mxPoint(l,g+e),new mxPoint(f+h,g),new mxPoint(f+h,g+k-e),new mxPoint(l,g+k),new mxPoint(f,g+k-e),new mxPoint(f,g)]);l=new mxPoint(l,a);d&&(c.x<f||c.x>f+h?l.y=c.y:l.x=c.x);return mxUtils.getPerimeterPoint(g,l,c)};mxStyleRegistry.putValue("stepPerimeter",mxPerimeter.StepPerimeter);mxPerimeter.HexagonPerimeter2=
+function(a,b,c,d){var e=y.prototype.size;null!=b&&(e=mxUtils.getValue(b.style,"size",e));var f=a.x,g=a.y,h=a.width,k=a.height,l=a.getCenterX();a=a.getCenterY();b=null!=b?mxUtils.getValue(b.style,mxConstants.STYLE_DIRECTION,mxConstants.DIRECTION_EAST):mxConstants.DIRECTION_EAST;b==mxConstants.DIRECTION_NORTH||b==mxConstants.DIRECTION_SOUTH?(e=k*Math.max(0,Math.min(1,e)),g=[new mxPoint(l,g),new mxPoint(f+h,g+e),new mxPoint(f+h,g+k-e),new mxPoint(l,g+k),new mxPoint(f,g+k-e),new mxPoint(f,g+e),new mxPoint(l,
+g)]):(e=h*Math.max(0,Math.min(1,e)),g=[new mxPoint(f+e,g),new mxPoint(f+h-e,g),new mxPoint(f+h,a),new mxPoint(f+h-e,g+k),new mxPoint(f+e,g+k),new mxPoint(f,a),new mxPoint(f+e,g)]);l=new mxPoint(l,a);d&&(c.x<f||c.x>f+h?l.y=c.y:l.x=c.x);return mxUtils.getPerimeterPoint(g,l,c)};mxStyleRegistry.putValue("hexagonPerimeter2",mxPerimeter.HexagonPerimeter2);mxUtils.extend(U,mxShape);U.prototype.size=10;U.prototype.paintBackground=function(a,b,c,d,e){var f=parseFloat(mxUtils.getValue(this.style,"size",this.size));
+a.translate(b,c);a.ellipse((d-f)/2,0,f,f);a.fillAndStroke();a.begin();a.moveTo(d/2,f);a.lineTo(d/2,e);a.end();a.stroke()};mxCellRenderer.prototype.defaultShapes.lollipop=U;mxUtils.extend(S,mxShape);S.prototype.size=10;S.prototype.inset=2;S.prototype.paintBackground=function(a,b,c,d,e){var f=parseFloat(mxUtils.getValue(this.style,"size",this.size)),g=parseFloat(mxUtils.getValue(this.style,"inset",this.inset))+this.strokewidth;a.translate(b,c);a.begin();a.moveTo(d/2,f+g);a.lineTo(d/2,e);a.end();a.stroke();
+a.begin();a.moveTo((d-f)/2-g,f/2);a.quadTo((d-f)/2-g,f+g,d/2,f+g);a.quadTo((d+f)/2+g,f+g,(d+f)/2+g,f/2);a.end();a.stroke()};mxCellRenderer.prototype.defaultShapes.requires=S;mxUtils.extend(ba,mxCylinder);ba.prototype.jettyWidth=32;ba.prototype.jettyHeight=12;ba.prototype.redrawPath=function(a,b,c,d,e,f){var g=parseFloat(mxUtils.getValue(this.style,"jettyWidth",this.jettyWidth));b=parseFloat(mxUtils.getValue(this.style,"jettyHeight",this.jettyHeight));c=g/2;var g=c+g/2,h=.3*e-b/2,k=.7*e-b/2;f?(a.moveTo(c,
+h),a.lineTo(g,h),a.lineTo(g,h+b),a.lineTo(c,h+b),a.moveTo(c,k),a.lineTo(g,k),a.lineTo(g,k+b),a.lineTo(c,k+b)):(a.moveTo(c,0),a.lineTo(d,0),a.lineTo(d,e),a.lineTo(c,e),a.lineTo(c,k+b),a.lineTo(0,k+b),a.lineTo(0,k),a.lineTo(c,k),a.lineTo(c,h+b),a.lineTo(0,h+b),a.lineTo(0,h),a.lineTo(c,h),a.close());a.end()};mxCellRenderer.prototype.defaultShapes.component=ba;mxUtils.extend(A,mxDoubleEllipse);A.prototype.outerStroke=!0;A.prototype.paintVertexShape=function(a,b,c,d,e){var f=Math.min(4,Math.min(d/5,e/
+5));0<d&&0<e&&(a.ellipse(b+f,c+f,d-2*f,e-2*f),a.fillAndStroke());a.setShadow(!1);this.outerStroke&&(a.ellipse(b,c,d,e),a.stroke())};mxCellRenderer.prototype.defaultShapes.endState=A;mxUtils.extend(v,A);v.prototype.outerStroke=!1;mxCellRenderer.prototype.defaultShapes.startState=v;mxUtils.extend(R,mxArrowConnector);R.prototype.defaultWidth=4;R.prototype.isOpenEnded=function(){return!0};R.prototype.getEdgeWidth=function(){return mxUtils.getNumber(this.style,"width",this.defaultWidth)+Math.max(0,this.strokewidth-
+1)};R.prototype.isArrowRounded=function(){return this.isRounded};mxCellRenderer.prototype.defaultShapes.link=R;mxUtils.extend(I,mxArrowConnector);I.prototype.defaultWidth=10;I.prototype.defaultArrowWidth=20;I.prototype.getStartArrowWidth=function(){return this.getEdgeWidth()+mxUtils.getNumber(this.style,"startWidth",this.defaultArrowWidth)};I.prototype.getEndArrowWidth=function(){return this.getEdgeWidth()+mxUtils.getNumber(this.style,"endWidth",this.defaultArrowWidth)};I.prototype.getEdgeWidth=function(){return mxUtils.getNumber(this.style,
+"width",this.defaultWidth)+Math.max(0,this.strokewidth-1)};mxCellRenderer.prototype.defaultShapes.flexArrow=I;mxUtils.extend(J,mxActor);J.prototype.size=30;J.prototype.redrawPath=function(a,b,c,d,e){b=Math.min(e,parseFloat(mxUtils.getValue(this.style,"size",this.size)));c=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(a,[new mxPoint(0,e),new mxPoint(0,b),new mxPoint(d,0),new mxPoint(d,e)],this.isRounded,c,!0);a.end()};mxCellRenderer.prototype.defaultShapes.manualInput=
+J;mxUtils.extend(ca,mxRectangleShape);ca.prototype.dx=20;ca.prototype.dy=20;ca.prototype.isHtmlAllowed=function(){return!1};ca.prototype.paintForeground=function(a,b,c,d,e){mxRectangleShape.prototype.paintForeground.apply(this,arguments);var f=0;if(this.isRounded)var g=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,100*mxConstants.RECTANGLE_ROUNDING_FACTOR)/100,f=Math.max(f,Math.min(d*g,e*g));g=Math.max(f,Math.min(d,parseFloat(mxUtils.getValue(this.style,"dx",this.dx))));f=Math.max(f,Math.min(e,
+parseFloat(mxUtils.getValue(this.style,"dy",this.dy))));a.begin();a.moveTo(b,c+f);a.lineTo(b+d,c+f);a.end();a.stroke();a.begin();a.moveTo(b+g,c);a.lineTo(b+g,c+e);a.end();a.stroke()};mxCellRenderer.prototype.defaultShapes.internalStorage=ca;mxUtils.extend(N,mxActor);N.prototype.dx=20;N.prototype.dy=20;N.prototype.redrawPath=function(a,b,c,d,e){b=Math.max(0,Math.min(d,parseFloat(mxUtils.getValue(this.style,"dx",this.dx))));c=Math.max(0,Math.min(e,parseFloat(mxUtils.getValue(this.style,"dy",this.dy))));
+parseFloat(mxUtils.getValue(this.style,"size",this.size));var f=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(a,[new mxPoint(0,0),new mxPoint(d,0),new mxPoint(d,c),new mxPoint(b,c),new mxPoint(b,e),new mxPoint(0,e)],this.isRounded,f,!0);a.end()};mxCellRenderer.prototype.defaultShapes.corner=N;mxUtils.extend(K,mxActor);K.prototype.redrawPath=function(a,b,c,d,e){a.moveTo(0,0);a.lineTo(0,e);a.end();a.moveTo(d,0);a.lineTo(d,e);a.end();a.moveTo(0,e/2);
+a.lineTo(d,e/2);a.end()};mxCellRenderer.prototype.defaultShapes.crossbar=K;mxUtils.extend(X,mxActor);X.prototype.dx=20;X.prototype.dy=20;X.prototype.redrawPath=function(a,b,c,d,e){b=Math.max(0,Math.min(d,parseFloat(mxUtils.getValue(this.style,"dx",this.dx))));c=Math.max(0,Math.min(e,parseFloat(mxUtils.getValue(this.style,"dy",this.dy))));parseFloat(mxUtils.getValue(this.style,"size",this.size));var f=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(a,
+[new mxPoint(0,0),new mxPoint(d,0),new mxPoint(d,c),new mxPoint((d+b)/2,c),new mxPoint((d+b)/2,e),new mxPoint((d-b)/2,e),new mxPoint((d-b)/2,c),new mxPoint(0,c)],this.isRounded,f,!0);a.end()};mxCellRenderer.prototype.defaultShapes.tee=X;mxUtils.extend(T,mxActor);T.prototype.arrowWidth=.3;T.prototype.arrowSize=.2;T.prototype.redrawPath=function(a,b,c,d,e){var f=e*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"arrowWidth",this.arrowWidth))));b=d*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,
+"arrowSize",this.arrowSize))));c=(e-f)/2;var f=c+f,g=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(a,[new mxPoint(0,c),new mxPoint(d-b,c),new mxPoint(d-b,0),new mxPoint(d,e/2),new mxPoint(d-b,e),new mxPoint(d-b,f),new mxPoint(0,f)],this.isRounded,g,!0);a.end()};mxCellRenderer.prototype.defaultShapes.singleArrow=T;mxUtils.extend(ea,mxActor);ea.prototype.redrawPath=function(a,b,c,d,e){var f=e*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,
+"arrowWidth",T.prototype.arrowWidth))));b=d*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"arrowSize",T.prototype.arrowSize))));c=(e-f)/2;var f=c+f,g=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(a,[new mxPoint(0,e/2),new mxPoint(b,0),new mxPoint(b,c),new mxPoint(d-b,c),new mxPoint(d-b,0),new mxPoint(d,e/2),new mxPoint(d-b,e),new mxPoint(d-b,f),new mxPoint(b,f),new mxPoint(b,e)],this.isRounded,g,!0);a.end()};mxCellRenderer.prototype.defaultShapes.doubleArrow=
+ea;mxUtils.extend(aa,mxActor);aa.prototype.size=.1;aa.prototype.redrawPath=function(a,b,c,d,e){b=d*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));a.moveTo(b,0);a.lineTo(d,0);a.quadTo(d-2*b,e/2,d,e);a.lineTo(b,e);a.quadTo(b-2*b,e/2,b,0);a.close();a.end()};mxCellRenderer.prototype.defaultShapes.dataStorage=aa;mxUtils.extend(P,mxActor);P.prototype.redrawPath=function(a,b,c,d,e){a.moveTo(0,0);a.quadTo(d,0,d,e/2);a.quadTo(d,e,0,e);a.close();a.end()};mxCellRenderer.prototype.defaultShapes.or=
+P;mxUtils.extend(V,mxActor);V.prototype.redrawPath=function(a,b,c,d,e){a.moveTo(0,0);a.quadTo(d,0,d,e/2);a.quadTo(d,e,0,e);a.quadTo(d/2,e/2,0,0);a.close();a.end()};mxCellRenderer.prototype.defaultShapes.xor=V;mxUtils.extend(W,mxActor);W.prototype.size=20;W.prototype.redrawPath=function(a,b,c,d,e){b=Math.min(d/2,Math.min(e,parseFloat(mxUtils.getValue(this.style,"size",this.size))));c=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(a,[new mxPoint(b,0),
+new mxPoint(d-b,0),new mxPoint(d,.8*b),new mxPoint(d,e),new mxPoint(0,e),new mxPoint(0,.8*b)],this.isRounded,c,!0);a.end()};mxCellRenderer.prototype.defaultShapes.loopLimit=W;mxUtils.extend(O,mxActor);O.prototype.size=.375;O.prototype.redrawPath=function(a,b,c,d,e){b=e*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));c=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(a,[new mxPoint(0,0),new mxPoint(d,0),new mxPoint(d,
+e-b),new mxPoint(d/2,e),new mxPoint(0,e-b)],this.isRounded,c,!0);a.end()};mxCellRenderer.prototype.defaultShapes.offPageConnector=O;mxUtils.extend(Q,mxEllipse);Q.prototype.paintVertexShape=function(a,b,c,d,e){mxEllipse.prototype.paintVertexShape.apply(this,arguments);a.begin();a.moveTo(b+d/2,c+e);a.lineTo(b+d,c+e);a.end();a.stroke()};mxCellRenderer.prototype.defaultShapes.tapeData=Q;mxUtils.extend(fa,mxEllipse);fa.prototype.paintVertexShape=function(a,b,c,d,e){mxEllipse.prototype.paintVertexShape.apply(this,
+arguments);a.setShadow(!1);a.begin();a.moveTo(b,c+e/2);a.lineTo(b+d,c+e/2);a.end();a.stroke();a.begin();a.moveTo(b+d/2,c);a.lineTo(b+d/2,c+e);a.end();a.stroke()};mxCellRenderer.prototype.defaultShapes.orEllipse=fa;mxUtils.extend(Y,mxEllipse);Y.prototype.paintVertexShape=function(a,b,c,d,e){mxEllipse.prototype.paintVertexShape.apply(this,arguments);a.setShadow(!1);a.begin();a.moveTo(b+.145*d,c+.145*e);a.lineTo(b+.855*d,c+.855*e);a.end();a.stroke();a.begin();a.moveTo(b+.855*d,c+.145*e);a.lineTo(b+.145*
+d,c+.855*e);a.end();a.stroke()};mxCellRenderer.prototype.defaultShapes.sumEllipse=Y;mxUtils.extend(Z,mxRhombus);Z.prototype.paintVertexShape=function(a,b,c,d,e){mxRhombus.prototype.paintVertexShape.apply(this,arguments);a.setShadow(!1);a.begin();a.moveTo(b,c+e/2);a.lineTo(b+d,c+e/2);a.end();a.stroke()};mxCellRenderer.prototype.defaultShapes.sortShape=Z;mxUtils.extend(ua,mxEllipse);ua.prototype.paintVertexShape=function(a,b,c,d,e){a.begin();a.moveTo(b,c);a.lineTo(b+d,c);a.lineTo(b+d/2,c+e/2);a.close();
+a.fillAndStroke();a.begin();a.moveTo(b,c+e);a.lineTo(b+d,c+e);a.lineTo(b+d/2,c+e/2);a.close();a.fillAndStroke()};mxCellRenderer.prototype.defaultShapes.collate=ua;mxUtils.extend(va,mxEllipse);va.prototype.paintVertexShape=function(a,b,c,d,e){var f=c+e-5;a.begin();a.moveTo(b,c);a.lineTo(b,c+e);a.moveTo(b,f);a.lineTo(b+10,f-5);a.moveTo(b,f);a.lineTo(b+10,f+5);a.moveTo(b,f);a.lineTo(b+d,f);a.moveTo(b+d,c);a.lineTo(b+d,c+e);a.moveTo(b+d,f);a.lineTo(b+d-10,f-5);a.moveTo(b+d,f);a.lineTo(b+d-10,f+5);a.end();
+a.stroke()};mxCellRenderer.prototype.defaultShapes.dimension=va;mxUtils.extend(wa,mxEllipse);wa.prototype.paintVertexShape=function(a,b,c,d,e){this.outline||a.setStrokeColor(null);mxRectangleShape.prototype.paintBackground.apply(this,arguments);null!=this.style&&(a.setStrokeColor(this.stroke),a.rect(b,c,d,e),a.fill(),a.begin(),a.moveTo(b,c),"1"==mxUtils.getValue(this.style,"top","1")?a.lineTo(b+d,c):a.moveTo(b+d,c),"1"==mxUtils.getValue(this.style,"right","1")?a.lineTo(b+d,c+e):a.moveTo(b+d,c+e),
+"1"==mxUtils.getValue(this.style,"bottom","1")?a.lineTo(b,c+e):a.moveTo(b,c+e),"1"==mxUtils.getValue(this.style,"left","1")&&a.lineTo(b,c-this.strokewidth/2),a.end(),a.stroke())};mxCellRenderer.prototype.defaultShapes.partialRectangle=wa;mxUtils.extend(pa,mxEllipse);pa.prototype.paintVertexShape=function(a,b,c,d,e){mxEllipse.prototype.paintVertexShape.apply(this,arguments);a.setShadow(!1);a.begin();"vertical"==mxUtils.getValue(this.style,"line")?(a.moveTo(b+d/2,c),a.lineTo(b+d/2,c+e)):(a.moveTo(b,
+c+e/2),a.lineTo(b+d,c+e/2));a.end();a.stroke()};mxCellRenderer.prototype.defaultShapes.lineEllipse=pa;mxUtils.extend(qa,mxActor);qa.prototype.redrawPath=function(a,b,c,d,e){b=Math.min(d,e/2);a.moveTo(0,0);a.lineTo(d-b,0);a.quadTo(d,0,d,e/2);a.quadTo(d,e,d-b,e);a.lineTo(0,e);a.close();a.end()};mxCellRenderer.prototype.defaultShapes.delay=qa;mxUtils.extend(ma,mxActor);ma.prototype.size=.2;ma.prototype.redrawPath=function(a,b,c,d,e){b=Math.min(e,d);var f=Math.max(0,Math.min(b,b*parseFloat(mxUtils.getValue(this.style,
+"size",this.size))));b=(e-f)/2;c=b+f;var g=(d-f)/2,f=g+f;a.moveTo(0,b);a.lineTo(g,b);a.lineTo(g,0);a.lineTo(f,0);a.lineTo(f,b);a.lineTo(d,b);a.lineTo(d,c);a.lineTo(f,c);a.lineTo(f,e);a.lineTo(g,e);a.lineTo(g,c);a.lineTo(0,c);a.close();a.end()};mxCellRenderer.prototype.defaultShapes.cross=ma;mxUtils.extend(ia,mxActor);ia.prototype.size=.25;ia.prototype.redrawPath=function(a,b,c,d,e){b=Math.min(d,e/2);c=Math.min(d-b,Math.max(0,parseFloat(mxUtils.getValue(this.style,"size",this.size)))*d);a.moveTo(0,
+e/2);a.lineTo(c,0);a.lineTo(d-b,0);a.quadTo(d,0,d,e/2);a.quadTo(d,e,d-b,e);a.lineTo(c,e);a.close();a.end()};mxCellRenderer.prototype.defaultShapes.display=ia;mxUtils.extend(ja,mxConnector);ja.prototype.origPaintEdgeShape=ja.prototype.paintEdgeShape;ja.prototype.paintEdgeShape=function(a,b,c){var d=a.state.dashed,e=a.state.fixDash;ja.prototype.origPaintEdgeShape.apply(this,arguments);if(3<=a.state.strokeWidth){var f=mxUtils.getValue(this.style,"fillColor",null);null!=f&&(a.setStrokeColor(f),a.setStrokeWidth(a.state.strokeWidth-
+2),a.setDashed(d,e),ja.prototype.origPaintEdgeShape.apply(this,arguments))}};mxCellRenderer.prototype.defaultShapes.filledEdge=ja;mxMarker.addMarker("dash",function(a,b,c,d,e,f,g,h,k,l){var m=e*(g+k+1),n=f*(g+k+1);return function(){a.begin();a.moveTo(d.x-m/2-n/2,d.y-n/2+m/2);a.lineTo(d.x+n/2-3*m/2,d.y-3*n/2-m/2);a.stroke()}});mxMarker.addMarker("cross",function(a,b,c,d,e,f,g,h,k,l){var m=e*(g+k+1),n=f*(g+k+1);return function(){a.begin();a.moveTo(d.x-m/2-n/2,d.y-n/2+m/2);a.lineTo(d.x+n/2-3*m/2,d.y-
+3*n/2-m/2);a.moveTo(d.x-m/2+n/2,d.y-n/2-m/2);a.lineTo(d.x-n/2-3*m/2,d.y-3*n/2+m/2);a.stroke()}});mxMarker.addMarker("circle",Aa);mxMarker.addMarker("circlePlus",function(a,b,c,d,e,f,g,h,k,l){var m=d.clone(),n=Aa.apply(this,arguments),p=e*(g+2*k),q=f*(g+2*k);return function(){n.apply(this,arguments);a.begin();a.moveTo(m.x-e*k,m.y-f*k);a.lineTo(m.x-2*p+e*k,m.y-2*q+f*k);a.moveTo(m.x-p-q+f*k,m.y-q+p-e*k);a.lineTo(m.x+q-p-f*k,m.y-q-p+e*k);a.stroke()}});mxMarker.addMarker("async",function(a,b,c,d,e,f,g,
+h,k,l){b=e*k*1.118;c=f*k*1.118;e*=g+k;f*=g+k;var m=d.clone();m.x-=b;m.y-=c;d.x+=1*-e-b;d.y+=1*-f-c;return function(){a.begin();a.moveTo(m.x,m.y);h?a.lineTo(m.x-e-f/2,m.y-f+e/2):a.lineTo(m.x+f/2-e,m.y-f-e/2);a.lineTo(m.x-e,m.y-f);a.close();l?a.fillAndStroke():a.stroke()}});mxMarker.addMarker("openAsync",function(a){a=null!=a?a:2;return function(b,c,d,e,f,g,h,k,l,m){f*=h+l;g*=h+l;var n=e.clone();return function(){b.begin();b.moveTo(n.x,n.y);k?b.lineTo(n.x-f-g/a,n.y-g+f/a):b.lineTo(n.x+g/a-f,n.y-g-f/
+a);b.stroke()}}}(2));if("undefined"!==typeof mxVertexHandler){var Ca=function(a,b,c){return na(a,["width"],b,function(b,d,e,f,g){g=a.shape.getEdgeWidth()*a.view.scale+c;return new mxPoint(f.x+d*b/4+e*g/2,f.y+e*b/4-d*g/2)},function(b,d,e,f,g,h){b=Math.sqrt(mxUtils.ptSegDistSq(f.x,f.y,g.x,g.y,h.x,h.y));a.style.width=Math.round(2*b)/a.view.scale-c})},na=function(a,b,c,d,e){var f=a.absolutePoints,g=f.length-1,h=a.view.translate,k=a.view.scale,l=c?f[0]:f[g],m=c?f[1]:f[g-1],n=m.x-l.x,p=m.y-l.y,q=Math.sqrt(n*
+n+p*p);return da(a,b,function(a){a=d.call(this,q,n/q,p/q,l,m);return new mxPoint(a.x/k-h.x,a.y/k-h.y)},function(a,b,c){a=Math.sqrt(n*n+p*p);b.x=(b.x+h.x)*k;b.y=(b.y+h.y)*k;e.call(this,a,n/a,p/a,l,m,b,c)})},ha=function(a){return function(b){return[da(b,["arrowWidth","arrowSize"],function(b){var c=Math.max(0,Math.min(1,mxUtils.getValue(this.state.style,"arrowWidth",T.prototype.arrowWidth))),d=Math.max(0,Math.min(a,mxUtils.getValue(this.state.style,"arrowSize",T.prototype.arrowSize)));return new mxPoint(b.x+
+(1-d)*b.width,b.y+(1-c)*b.height/2)},function(b,c){this.state.style.arrowWidth=Math.max(0,Math.min(1,Math.abs(b.y+b.height/2-c.y)/b.height*2));this.state.style.arrowSize=Math.max(0,Math.min(a,(b.x+b.width-c.x)/b.width))})]}},ya=function(a,b,c){return function(d){var e=[da(d,["size"],function(c){var d=Math.max(0,Math.min(c.width,Math.min(c.height,parseFloat(mxUtils.getValue(this.state.style,"size",b)))))*a;return new mxPoint(c.x+d,c.y+d)},function(b,c){this.state.style.size=Math.round(Math.max(0,Math.min(Math.min(b.width,
+c.x-b.x),Math.min(b.height,c.y-b.y)))/a)})];c&&mxUtils.getValue(d.style,mxConstants.STYLE_ROUNDED,!1)&&e.push(ga(d));return e}},la=function(a,b,c,d){c=null!=c?c:1;return function(e){var f=[da(e,["size"],function(b){var c=parseFloat(mxUtils.getValue(this.state.style,"size",a));return new mxPoint(b.x+c*b.width,b.getCenterY())},function(a,b){this.state.style.size=Math.max(0,Math.min(c,(b.x-a.x)/a.width))},null,d)];b&&mxUtils.getValue(e.style,mxConstants.STYLE_ROUNDED,!1)&&f.push(ga(e));return f}},Da=
+function(a){return function(b){var c=[da(b,["size"],function(b){var c=Math.max(0,Math.min(a,parseFloat(mxUtils.getValue(this.state.style,"size",n.prototype.size))));return new mxPoint(b.x+c*b.width*.75,b.y+b.height/4)},function(b,c){this.state.style.size=Math.max(0,Math.min(a,(c.x-b.x)/(.75*b.width)))},null,!0)];mxUtils.getValue(b.style,mxConstants.STYLE_ROUNDED,!1)&&c.push(ga(b));return c}},oa=function(){return function(a){var b=[];mxUtils.getValue(a.style,mxConstants.STYLE_ROUNDED,!1)&&b.push(ga(a));
+return b}},ga=function(a,b){return da(a,[mxConstants.STYLE_ARCSIZE],function(c){var d=null!=b?b:c.height/8;if("1"==mxUtils.getValue(a.style,mxConstants.STYLE_ABSOLUTE_ARCSIZE,0)){var e=mxUtils.getValue(a.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;return new mxPoint(c.x+c.width-Math.min(c.width/2,e),c.y+d)}e=Math.max(0,parseFloat(mxUtils.getValue(a.style,mxConstants.STYLE_ARCSIZE,100*mxConstants.RECTANGLE_ROUNDING_FACTOR)))/100;return new mxPoint(c.x+c.width-Math.min(Math.max(c.width/
+2,c.height/2),Math.min(c.width,c.height)*e),c.y+d)},function(b,c,d){"1"==mxUtils.getValue(a.style,mxConstants.STYLE_ABSOLUTE_ARCSIZE,0)?this.state.style[mxConstants.STYLE_ARCSIZE]=Math.round(Math.max(0,Math.min(b.width,2*(b.x+b.width-c.x)))):this.state.style[mxConstants.STYLE_ARCSIZE]=Math.round(Math.min(50,Math.max(0,100*(b.width-c.x+b.x)/Math.min(b.width,b.height))))})},da=function(a,b,c,d,e,f){var g=new mxHandle(a,null,mxVertexHandler.prototype.secondaryHandleImage);g.execute=function(){for(var a=
+0;a<b.length;a++)this.copyStyle(b[a])};g.getPosition=c;g.setPosition=d;g.ignoreGrid=null!=e?e:!0;if(f){var h=g.positionChanged;g.positionChanged=function(){h.apply(this,arguments);a.view.invalidate(this.state.cell);a.view.validate()}}return g},za={link:function(a){return[Ca(a,!0,10),Ca(a,!1,10)]},flexArrow:function(a){var b=a.view.graph.gridSize/a.view.scale,c=[];mxUtils.getValue(a.style,mxConstants.STYLE_STARTARROW,mxConstants.NONE)!=mxConstants.NONE&&(c.push(na(a,["width",mxConstants.STYLE_STARTSIZE,
+mxConstants.STYLE_ENDSIZE],!0,function(b,c,d,e,f){b=(a.shape.getEdgeWidth()-a.shape.strokewidth)*a.view.scale;f=3*mxUtils.getNumber(a.style,mxConstants.STYLE_STARTSIZE,mxConstants.ARROW_SIZE/5)*a.view.scale;return new mxPoint(e.x+c*(f+a.shape.strokewidth*a.view.scale)+d*b/2,e.y+d*(f+a.shape.strokewidth*a.view.scale)-c*b/2)},function(c,d,e,f,g,h,k){c=Math.sqrt(mxUtils.ptSegDistSq(f.x,f.y,g.x,g.y,h.x,h.y));d=mxUtils.ptLineDist(f.x,f.y,f.x+e,f.y-d,h.x,h.y);a.style[mxConstants.STYLE_STARTSIZE]=Math.round(100*
+(d-a.shape.strokewidth)/3)/100/a.view.scale;a.style.width=Math.round(2*c)/a.view.scale;mxEvent.isControlDown(k.getEvent())&&(a.style[mxConstants.STYLE_ENDSIZE]=a.style[mxConstants.STYLE_STARTSIZE]);mxEvent.isAltDown(k.getEvent())||Math.abs(parseFloat(a.style[mxConstants.STYLE_STARTSIZE])-parseFloat(a.style[mxConstants.STYLE_ENDSIZE]))<b/6&&(a.style[mxConstants.STYLE_STARTSIZE]=a.style[mxConstants.STYLE_ENDSIZE])})),c.push(na(a,["startWidth","endWidth",mxConstants.STYLE_STARTSIZE,mxConstants.STYLE_ENDSIZE],
+!0,function(b,c,d,e,f){b=(a.shape.getStartArrowWidth()-a.shape.strokewidth)*a.view.scale;f=3*mxUtils.getNumber(a.style,mxConstants.STYLE_STARTSIZE,mxConstants.ARROW_SIZE/5)*a.view.scale;return new mxPoint(e.x+c*(f+a.shape.strokewidth*a.view.scale)+d*b/2,e.y+d*(f+a.shape.strokewidth*a.view.scale)-c*b/2)},function(c,d,e,f,g,h,k){c=Math.sqrt(mxUtils.ptSegDistSq(f.x,f.y,g.x,g.y,h.x,h.y));d=mxUtils.ptLineDist(f.x,f.y,f.x+e,f.y-d,h.x,h.y);a.style[mxConstants.STYLE_STARTSIZE]=Math.round(100*(d-a.shape.strokewidth)/
+3)/100/a.view.scale;a.style.startWidth=Math.max(0,Math.round(2*c)-a.shape.getEdgeWidth())/a.view.scale;mxEvent.isControlDown(k.getEvent())&&(a.style[mxConstants.STYLE_ENDSIZE]=a.style[mxConstants.STYLE_STARTSIZE],a.style.endWidth=a.style.startWidth);mxEvent.isAltDown(k.getEvent())||(Math.abs(parseFloat(a.style[mxConstants.STYLE_STARTSIZE])-parseFloat(a.style[mxConstants.STYLE_ENDSIZE]))<b/6&&(a.style[mxConstants.STYLE_STARTSIZE]=a.style[mxConstants.STYLE_ENDSIZE]),Math.abs(parseFloat(a.style.startWidth)-
+parseFloat(a.style.endWidth))<b&&(a.style.startWidth=a.style.endWidth))})));mxUtils.getValue(a.style,mxConstants.STYLE_ENDARROW,mxConstants.NONE)!=mxConstants.NONE&&(c.push(na(a,["width",mxConstants.STYLE_STARTSIZE,mxConstants.STYLE_ENDSIZE],!1,function(b,c,d,e,f){b=(a.shape.getEdgeWidth()-a.shape.strokewidth)*a.view.scale;f=3*mxUtils.getNumber(a.style,mxConstants.STYLE_ENDSIZE,mxConstants.ARROW_SIZE/5)*a.view.scale;return new mxPoint(e.x+c*(f+a.shape.strokewidth*a.view.scale)-d*b/2,e.y+d*(f+a.shape.strokewidth*
+a.view.scale)+c*b/2)},function(c,d,e,f,g,h,k){c=Math.sqrt(mxUtils.ptSegDistSq(f.x,f.y,g.x,g.y,h.x,h.y));d=mxUtils.ptLineDist(f.x,f.y,f.x+e,f.y-d,h.x,h.y);a.style[mxConstants.STYLE_ENDSIZE]=Math.round(100*(d-a.shape.strokewidth)/3)/100/a.view.scale;a.style.width=Math.round(2*c)/a.view.scale;mxEvent.isControlDown(k.getEvent())&&(a.style[mxConstants.STYLE_STARTSIZE]=a.style[mxConstants.STYLE_ENDSIZE]);mxEvent.isAltDown(k.getEvent())||Math.abs(parseFloat(a.style[mxConstants.STYLE_ENDSIZE])-parseFloat(a.style[mxConstants.STYLE_STARTSIZE]))<
+b/6&&(a.style[mxConstants.STYLE_ENDSIZE]=a.style[mxConstants.STYLE_STARTSIZE])})),c.push(na(a,["startWidth","endWidth",mxConstants.STYLE_STARTSIZE,mxConstants.STYLE_ENDSIZE],!1,function(b,c,d,e,f){b=(a.shape.getEndArrowWidth()-a.shape.strokewidth)*a.view.scale;f=3*mxUtils.getNumber(a.style,mxConstants.STYLE_ENDSIZE,mxConstants.ARROW_SIZE/5)*a.view.scale;return new mxPoint(e.x+c*(f+a.shape.strokewidth*a.view.scale)-d*b/2,e.y+d*(f+a.shape.strokewidth*a.view.scale)+c*b/2)},function(c,d,e,f,g,h,k){c=
+Math.sqrt(mxUtils.ptSegDistSq(f.x,f.y,g.x,g.y,h.x,h.y));d=mxUtils.ptLineDist(f.x,f.y,f.x+e,f.y-d,h.x,h.y);a.style[mxConstants.STYLE_ENDSIZE]=Math.round(100*(d-a.shape.strokewidth)/3)/100/a.view.scale;a.style.endWidth=Math.max(0,Math.round(2*c)-a.shape.getEdgeWidth())/a.view.scale;mxEvent.isControlDown(k.getEvent())&&(a.style[mxConstants.STYLE_STARTSIZE]=a.style[mxConstants.STYLE_ENDSIZE],a.style.startWidth=a.style.endWidth);mxEvent.isAltDown(k.getEvent())||(Math.abs(parseFloat(a.style[mxConstants.STYLE_ENDSIZE])-
+parseFloat(a.style[mxConstants.STYLE_STARTSIZE]))<b/6&&(a.style[mxConstants.STYLE_ENDSIZE]=a.style[mxConstants.STYLE_STARTSIZE]),Math.abs(parseFloat(a.style.endWidth)-parseFloat(a.style.startWidth))<b&&(a.style.endWidth=a.style.startWidth))})));return c},swimlane:function(a){var b=[da(a,[mxConstants.STYLE_STARTSIZE],function(b){var c=parseFloat(mxUtils.getValue(a.style,mxConstants.STYLE_STARTSIZE,mxConstants.DEFAULT_STARTSIZE));return 1==mxUtils.getValue(a.style,mxConstants.STYLE_HORIZONTAL,1)?new mxPoint(b.getCenterX(),
+b.y+Math.max(0,Math.min(b.height,c))):new mxPoint(b.x+Math.max(0,Math.min(b.width,c)),b.getCenterY())},function(b,c){a.style[mxConstants.STYLE_STARTSIZE]=1==mxUtils.getValue(this.state.style,mxConstants.STYLE_HORIZONTAL,1)?Math.round(Math.max(0,Math.min(b.height,c.y-b.y))):Math.round(Math.max(0,Math.min(b.width,c.x-b.x)))})];if(mxUtils.getValue(a.style,mxConstants.STYLE_ROUNDED)){var c=parseFloat(mxUtils.getValue(a.style,mxConstants.STYLE_STARTSIZE,mxConstants.DEFAULT_STARTSIZE));b.push(ga(a,c/2))}return b},
+label:oa(),ext:oa(),rectangle:oa(),triangle:oa(),rhombus:oa(),umlLifeline:function(a){return[da(a,["size"],function(a){var b=Math.max(0,Math.min(a.height,parseFloat(mxUtils.getValue(this.state.style,"size",L.prototype.size))));return new mxPoint(a.getCenterX(),a.y+b)},function(a,b){this.state.style.size=Math.round(Math.max(0,Math.min(a.height,b.y-a.y)))},!1)]},umlFrame:function(a){return[da(a,["width","height"],function(a){var b=Math.max(H.prototype.corner,Math.min(a.width,mxUtils.getValue(this.state.style,
+"width",H.prototype.width))),c=Math.max(1.5*H.prototype.corner,Math.min(a.height,mxUtils.getValue(this.state.style,"height",H.prototype.height)));return new mxPoint(a.x+b,a.y+c)},function(a,b){this.state.style.width=Math.round(Math.max(H.prototype.corner,Math.min(a.width,b.x-a.x)));this.state.style.height=Math.round(Math.max(1.5*H.prototype.corner,Math.min(a.height,b.y-a.y)))},!1)]},process:function(a){var b=[da(a,["size"],function(a){var b=Math.max(0,Math.min(.5,parseFloat(mxUtils.getValue(this.state.style,
+"size",t.prototype.size))));return new mxPoint(a.x+a.width*b,a.y+a.height/4)},function(a,b){this.state.style.size=Math.max(0,Math.min(.5,(b.x-a.x)/a.width))})];mxUtils.getValue(a.style,mxConstants.STYLE_ROUNDED,!1)&&b.push(ga(a));return b},cross:function(a){return[da(a,["size"],function(a){var b=Math.min(a.width,a.height),b=Math.max(0,Math.min(1,mxUtils.getValue(this.state.style,"size",ma.prototype.size)))*b/2;return new mxPoint(a.getCenterX()-b,a.getCenterY()-b)},function(a,b){var c=Math.min(a.width,
+a.height);this.state.style.size=Math.max(0,Math.min(1,Math.min(Math.max(0,a.getCenterY()-b.y)/c*2,Math.max(0,a.getCenterX()-b.x)/c*2)))})]},note:function(a){return[da(a,["size"],function(a){var b=Math.max(0,Math.min(a.width,Math.min(a.height,parseFloat(mxUtils.getValue(this.state.style,"size",e.prototype.size)))));return new mxPoint(a.x+a.width-b,a.y+b)},function(a,b){this.state.style.size=Math.round(Math.max(0,Math.min(Math.min(a.width,a.x+a.width-b.x),Math.min(a.height,b.y-a.y))))})]},manualInput:function(a){var b=
+[da(a,["size"],function(a){var b=Math.max(0,Math.min(a.height,mxUtils.getValue(this.state.style,"size",J.prototype.size)));return new mxPoint(a.x+a.width/4,a.y+3*b/4)},function(a,b){this.state.style.size=Math.round(Math.max(0,Math.min(a.height,4*(b.y-a.y)/3)))})];mxUtils.getValue(a.style,mxConstants.STYLE_ROUNDED,!1)&&b.push(ga(a));return b},dataStorage:function(a){return[da(a,["size"],function(a){var b=Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.state.style,"size",aa.prototype.size))));
+return new mxPoint(a.x+(1-b)*a.width,a.getCenterY())},function(a,b){this.state.style.size=Math.max(0,Math.min(1,(a.x+a.width-b.x)/a.width))})]},callout:function(a){var b=[da(a,["size","position"],function(a){var b=Math.max(0,Math.min(a.height,mxUtils.getValue(this.state.style,"size",w.prototype.size))),c=Math.max(0,Math.min(1,mxUtils.getValue(this.state.style,"position",w.prototype.position)));mxUtils.getValue(this.state.style,"base",w.prototype.base);return new mxPoint(a.x+c*a.width,a.y+a.height-
+b)},function(a,b){mxUtils.getValue(this.state.style,"base",w.prototype.base);this.state.style.size=Math.round(Math.max(0,Math.min(a.height,a.y+a.height-b.y)));this.state.style.position=Math.round(100*Math.max(0,Math.min(1,(b.x-a.x)/a.width)))/100}),da(a,["position2"],function(a){var b=Math.max(0,Math.min(1,mxUtils.getValue(this.state.style,"position2",w.prototype.position2)));return new mxPoint(a.x+b*a.width,a.y+a.height)},function(a,b){this.state.style.position2=Math.round(100*Math.max(0,Math.min(1,
+(b.x-a.x)/a.width)))/100}),da(a,["base"],function(a){var b=Math.max(0,Math.min(a.height,mxUtils.getValue(this.state.style,"size",w.prototype.size))),c=Math.max(0,Math.min(1,mxUtils.getValue(this.state.style,"position",w.prototype.position))),d=Math.max(0,Math.min(a.width,mxUtils.getValue(this.state.style,"base",w.prototype.base)));return new mxPoint(a.x+Math.min(a.width,c*a.width+d),a.y+a.height-b)},function(a,b){var c=Math.max(0,Math.min(1,mxUtils.getValue(this.state.style,"position",w.prototype.position)));
+this.state.style.base=Math.round(Math.max(0,Math.min(a.width,b.x-a.x-c*a.width)))})];mxUtils.getValue(a.style,mxConstants.STYLE_ROUNDED,!1)&&b.push(ga(a));return b},internalStorage:function(a){var b=[da(a,["dx","dy"],function(a){var b=Math.max(0,Math.min(a.width,mxUtils.getValue(this.state.style,"dx",ca.prototype.dx))),c=Math.max(0,Math.min(a.height,mxUtils.getValue(this.state.style,"dy",ca.prototype.dy)));return new mxPoint(a.x+b,a.y+c)},function(a,b){this.state.style.dx=Math.round(Math.max(0,Math.min(a.width,
+b.x-a.x)));this.state.style.dy=Math.round(Math.max(0,Math.min(a.height,b.y-a.y)))})];mxUtils.getValue(a.style,mxConstants.STYLE_ROUNDED,!1)&&b.push(ga(a));return b},corner:function(a){return[da(a,["dx","dy"],function(a){var b=Math.max(0,Math.min(a.width,mxUtils.getValue(this.state.style,"dx",N.prototype.dx))),c=Math.max(0,Math.min(a.height,mxUtils.getValue(this.state.style,"dy",N.prototype.dy)));return new mxPoint(a.x+b,a.y+c)},function(a,b){this.state.style.dx=Math.round(Math.max(0,Math.min(a.width,
+b.x-a.x)));this.state.style.dy=Math.round(Math.max(0,Math.min(a.height,b.y-a.y)))})]},tee:function(a){return[da(a,["dx","dy"],function(a){var b=Math.max(0,Math.min(a.width,mxUtils.getValue(this.state.style,"dx",X.prototype.dx))),c=Math.max(0,Math.min(a.height,mxUtils.getValue(this.state.style,"dy",X.prototype.dy)));return new mxPoint(a.x+(a.width+b)/2,a.y+c)},function(a,b){this.state.style.dx=Math.round(Math.max(0,2*Math.min(a.width/2,b.x-a.x-a.width/2)));this.state.style.dy=Math.round(Math.max(0,
+Math.min(a.height,b.y-a.y)))})]},singleArrow:ha(1),doubleArrow:ha(.5),folder:function(a){return[da(a,["tabWidth","tabHeight"],function(a){var b=Math.max(0,Math.min(a.width,mxUtils.getValue(this.state.style,"tabWidth",g.prototype.tabWidth))),c=Math.max(0,Math.min(a.height,mxUtils.getValue(this.state.style,"tabHeight",g.prototype.tabHeight)));mxUtils.getValue(this.state.style,"tabPosition",g.prototype.tabPosition)==mxConstants.ALIGN_RIGHT&&(b=a.width-b);return new mxPoint(a.x+b,a.y+c)},function(a,b){var c=
+Math.max(0,Math.min(a.width,b.x-a.x));mxUtils.getValue(this.state.style,"tabPosition",g.prototype.tabPosition)==mxConstants.ALIGN_RIGHT&&(c=a.width-c);this.state.style.tabWidth=Math.round(c);this.state.style.tabHeight=Math.round(Math.max(0,Math.min(a.height,b.y-a.y)))})]},document:function(a){return[da(a,["size"],function(a){var b=Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.state.style,"size",l.prototype.size))));return new mxPoint(a.x+3*a.width/4,a.y+(1-b)*a.height)},function(a,b){this.state.style.size=
+Math.max(0,Math.min(1,(a.y+a.height-b.y)/a.height))})]},tape:function(a){return[da(a,["size"],function(a){var b=Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.state.style,"size",k.prototype.size))));return new mxPoint(a.getCenterX(),a.y+b*a.height/2)},function(a,b){this.state.style.size=Math.max(0,Math.min(1,(b.y-a.y)/a.height*2))})]},offPageConnector:function(a){return[da(a,["size"],function(a){var b=Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.state.style,"size",O.prototype.size))));
+return new mxPoint(a.getCenterX(),a.y+(1-b)*a.height)},function(a,b){this.state.style.size=Math.max(0,Math.min(1,(a.y+a.height-b.y)/a.height))})]},step:la(x.prototype.size,!0,null,!0),hexagon:la(y.prototype.size,!0,.5,!0),curlyBracket:la(p.prototype.size,!1),display:la(ia.prototype.size,!1),cube:ya(1,a.prototype.size,!1),card:ya(.5,h.prototype.size,!0),loopLimit:ya(.5,W.prototype.size,!0),trapezoid:Da(.5),parallelogram:Da(1)};Graph.createHandle=da;Graph.handleFactory=za;mxVertexHandler.prototype.createCustomHandles=
+function(){if(1==this.state.view.graph.getSelectionCount()&&this.graph.isCellRotatable(this.state.cell)){var a=this.state.style.shape;null==this.state.view.graph.cellRenderer.defaultShapes[a]&&null==mxStencilRegistry.getStencil(a)&&(a=mxConstants.SHAPE_RECTANGLE);a=za[a];if(null!=a)return a(this.state)}return null};mxEdgeHandler.prototype.createCustomHandles=function(){if(1==this.state.view.graph.getSelectionCount()){var a=this.state.style.shape;null==this.state.view.graph.cellRenderer.defaultShapes[a]&&
+null==mxStencilRegistry.getStencil(a)&&(a=mxConstants.SHAPE_CONNECTOR);a=za[a];if(null!=a)return a(this.state)}return null}}else Graph.createHandle=function(){},Graph.handleFactory={};var sa=new mxPoint(1,0),ta=new mxPoint(1,0),ha=mxUtils.toRadians(-30),sa=mxUtils.getRotatedPoint(sa,Math.cos(ha),Math.sin(ha)),ha=mxUtils.toRadians(-150),ta=mxUtils.getRotatedPoint(ta,Math.cos(ha),Math.sin(ha));mxEdgeStyle.IsometricConnector=function(a,b,c,d,e){var f=a.view;d=null!=d&&0<d.length?d[0]:null;var g=a.absolutePoints,
+h=g[0],g=g[g.length-1];null!=d&&(d=f.transformControlPoint(a,d));null==h&&null!=b&&(h=new mxPoint(b.getCenterX(),b.getCenterY()));null==g&&null!=c&&(g=new mxPoint(c.getCenterX(),c.getCenterY()));var k=sa.x,l=sa.y,m=ta.x,n=ta.y,p="horizontal"==mxUtils.getValue(a.style,"elbow","horizontal");if(null!=g&&null!=h){a=function(a,b,c){a-=q.x;var d=b-q.y;b=(n*a-m*d)/(k*n-l*m);a=(l*a-k*d)/(l*m-k*n);p?(c&&(q=new mxPoint(q.x+k*b,q.y+l*b),e.push(q)),q=new mxPoint(q.x+m*a,q.y+n*a)):(c&&(q=new mxPoint(q.x+m*a,q.y+
+n*a),e.push(q)),q=new mxPoint(q.x+k*b,q.y+l*b));e.push(q)};var q=h;null==d&&(d=new mxPoint(h.x+(g.x-h.x)/2,h.y+(g.y-h.y)/2));a(d.x,d.y,!0);a(g.x,g.y,!1)}};mxStyleRegistry.putValue("isometricEdgeStyle",mxEdgeStyle.IsometricConnector);var Ia=Graph.prototype.createEdgeHandler;Graph.prototype.createEdgeHandler=function(a,b){if(b==mxEdgeStyle.IsometricConnector){var c=new mxElbowEdgeHandler(a);c.snapToTerminals=!1;return c}return Ia.apply(this,arguments)};b.prototype.constraints=[];c.prototype.constraints=
+[];w.prototype.constraints=[];mxRectangleShape.prototype.constraints=[new mxConnectionConstraint(new mxPoint(.25,0),!0),new mxConnectionConstraint(new mxPoint(.5,0),!0),new mxConnectionConstraint(new mxPoint(.75,0),!0),new mxConnectionConstraint(new mxPoint(0,.25),!0),new mxConnectionConstraint(new mxPoint(0,.5),!0),new mxConnectionConstraint(new mxPoint(0,.75),!0),new mxConnectionConstraint(new mxPoint(1,.25),!0),new mxConnectionConstraint(new mxPoint(1,.5),!0),new mxConnectionConstraint(new mxPoint(1,
+.75),!0),new mxConnectionConstraint(new mxPoint(.25,1),!0),new mxConnectionConstraint(new mxPoint(.5,1),!0),new mxConnectionConstraint(new mxPoint(.75,1),!0)];mxEllipse.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,0),!0),new mxConnectionConstraint(new mxPoint(1,0),!0),new mxConnectionConstraint(new mxPoint(0,1),!0),new mxConnectionConstraint(new mxPoint(1,1),!0),new mxConnectionConstraint(new mxPoint(.5,0),!0),new mxConnectionConstraint(new mxPoint(.5,1),!0),new mxConnectionConstraint(new mxPoint(0,
+.5),!0),new mxConnectionConstraint(new mxPoint(1,.5))];mxLabel.prototype.constraints=mxRectangleShape.prototype.constraints;mxImageShape.prototype.constraints=mxRectangleShape.prototype.constraints;mxSwimlane.prototype.constraints=mxRectangleShape.prototype.constraints;u.prototype.constraints=mxRectangleShape.prototype.constraints;e.prototype.constraints=mxRectangleShape.prototype.constraints;h.prototype.constraints=mxRectangleShape.prototype.constraints;a.prototype.constraints=mxRectangleShape.prototype.constraints;
+g.prototype.constraints=mxRectangleShape.prototype.constraints;ca.prototype.constraints=mxRectangleShape.prototype.constraints;aa.prototype.constraints=mxRectangleShape.prototype.constraints;Q.prototype.constraints=mxEllipse.prototype.constraints;fa.prototype.constraints=mxEllipse.prototype.constraints;Y.prototype.constraints=mxEllipse.prototype.constraints;pa.prototype.constraints=mxEllipse.prototype.constraints;J.prototype.constraints=mxRectangleShape.prototype.constraints;qa.prototype.constraints=
+mxRectangleShape.prototype.constraints;ia.prototype.constraints=mxRectangleShape.prototype.constraints;W.prototype.constraints=mxRectangleShape.prototype.constraints;O.prototype.constraints=mxRectangleShape.prototype.constraints;mxCylinder.prototype.constraints=[new mxConnectionConstraint(new mxPoint(.15,.05),!1),new mxConnectionConstraint(new mxPoint(.5,0),!0),new mxConnectionConstraint(new mxPoint(.85,.05),!1),new mxConnectionConstraint(new mxPoint(0,.3),!0),new mxConnectionConstraint(new mxPoint(0,
+.5),!0),new mxConnectionConstraint(new mxPoint(0,.7),!0),new mxConnectionConstraint(new mxPoint(1,.3),!0),new mxConnectionConstraint(new mxPoint(1,.5),!0),new mxConnectionConstraint(new mxPoint(1,.7),!0),new mxConnectionConstraint(new mxPoint(.15,.95),!1),new mxConnectionConstraint(new mxPoint(.5,1),!0),new mxConnectionConstraint(new mxPoint(.85,.95),!1)];E.prototype.constraints=[new mxConnectionConstraint(new mxPoint(.25,.1),!1),new mxConnectionConstraint(new mxPoint(.5,0),!1),new mxConnectionConstraint(new mxPoint(.75,
+.1),!1),new mxConnectionConstraint(new mxPoint(0,1/3),!1),new mxConnectionConstraint(new mxPoint(0,1),!1),new mxConnectionConstraint(new mxPoint(1,1/3),!1),new mxConnectionConstraint(new mxPoint(1,1),!1),new mxConnectionConstraint(new mxPoint(.5,.5),!1)];ba.prototype.constraints=[new mxConnectionConstraint(new mxPoint(.25,0),!0),new mxConnectionConstraint(new mxPoint(.5,0),!0),new mxConnectionConstraint(new mxPoint(.75,0),!0),new mxConnectionConstraint(new mxPoint(0,.3),!0),new mxConnectionConstraint(new mxPoint(0,
+.7),!0),new mxConnectionConstraint(new mxPoint(1,.25),!0),new mxConnectionConstraint(new mxPoint(1,.5),!0),new mxConnectionConstraint(new mxPoint(1,.75),!0),new mxConnectionConstraint(new mxPoint(.25,1),!0),new mxConnectionConstraint(new mxPoint(.5,1),!0),new mxConnectionConstraint(new mxPoint(.75,1),!0)];mxActor.prototype.constraints=[new mxConnectionConstraint(new mxPoint(.5,0),!0),new mxConnectionConstraint(new mxPoint(.25,.2),!1),new mxConnectionConstraint(new mxPoint(.1,.5),!1),new mxConnectionConstraint(new mxPoint(0,
+.75),!0),new mxConnectionConstraint(new mxPoint(.75,.25),!1),new mxConnectionConstraint(new mxPoint(.9,.5),!1),new mxConnectionConstraint(new mxPoint(1,.75),!0),new mxConnectionConstraint(new mxPoint(.25,1),!0),new mxConnectionConstraint(new mxPoint(.5,1),!0),new mxConnectionConstraint(new mxPoint(.75,1),!0)];f.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,0),!1),new mxConnectionConstraint(new mxPoint(.5,.25),!1),new mxConnectionConstraint(new mxPoint(1,0),!1),new mxConnectionConstraint(new mxPoint(.25,
+.5),!1),new mxConnectionConstraint(new mxPoint(.75,.5),!1),new mxConnectionConstraint(new mxPoint(0,1),!1),new mxConnectionConstraint(new mxPoint(.5,.75),!1),new mxConnectionConstraint(new mxPoint(1,1),!1)];k.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,.35),!1),new mxConnectionConstraint(new mxPoint(0,.5),!1),new mxConnectionConstraint(new mxPoint(0,.65),!1),new mxConnectionConstraint(new mxPoint(1,.35),!1),new mxConnectionConstraint(new mxPoint(1,.5),!1),new mxConnectionConstraint(new mxPoint(1,
+.65),!1),new mxConnectionConstraint(new mxPoint(.25,1),!1),new mxConnectionConstraint(new mxPoint(.75,0),!1)];x.prototype.constraints=[new mxConnectionConstraint(new mxPoint(.25,0),!0),new mxConnectionConstraint(new mxPoint(.5,0),!0),new mxConnectionConstraint(new mxPoint(.75,0),!0),new mxConnectionConstraint(new mxPoint(.25,1),!0),new mxConnectionConstraint(new mxPoint(.5,1),!0),new mxConnectionConstraint(new mxPoint(.75,1),!0),new mxConnectionConstraint(new mxPoint(.1,.25),!0),new mxConnectionConstraint(new mxPoint(.2,
+.5),!0),new mxConnectionConstraint(new mxPoint(.1,.75),!0),new mxConnectionConstraint(new mxPoint(.9,.25),!0),new mxConnectionConstraint(new mxPoint(1,.5),!0),new mxConnectionConstraint(new mxPoint(.9,.75),!0)];mxLine.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,.5),!1),new mxConnectionConstraint(new mxPoint(.25,.5),!1),new mxConnectionConstraint(new mxPoint(.75,.5),!1),new mxConnectionConstraint(new mxPoint(1,.5),!1)];U.prototype.constraints=[new mxConnectionConstraint(new mxPoint(.5,
+0),!1),new mxConnectionConstraint(new mxPoint(.5,1),!1)];mxDoubleEllipse.prototype.constraints=mxEllipse.prototype.constraints;mxRhombus.prototype.constraints=mxEllipse.prototype.constraints;mxTriangle.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,.25),!0),new mxConnectionConstraint(new mxPoint(0,.5),!0),new mxConnectionConstraint(new mxPoint(0,.75),!0),new mxConnectionConstraint(new mxPoint(.5,0),!0),new mxConnectionConstraint(new mxPoint(.5,1),!0),new mxConnectionConstraint(new mxPoint(1,
+.5),!0)];mxHexagon.prototype.constraints=[new mxConnectionConstraint(new mxPoint(.375,0),!0),new mxConnectionConstraint(new mxPoint(.5,0),!0),new mxConnectionConstraint(new mxPoint(.625,0),!0),new mxConnectionConstraint(new mxPoint(.125,.25),!0),new mxConnectionConstraint(new mxPoint(0,.5),!0),new mxConnectionConstraint(new mxPoint(.125,.75),!0),new mxConnectionConstraint(new mxPoint(.875,.25),!0),new mxConnectionConstraint(new mxPoint(0,.5),!0),new mxConnectionConstraint(new mxPoint(1,.5),!0),new mxConnectionConstraint(new mxPoint(.875,
+.75),!0),new mxConnectionConstraint(new mxPoint(.375,1),!0),new mxConnectionConstraint(new mxPoint(.5,1),!0),new mxConnectionConstraint(new mxPoint(.625,1),!0)];mxCloud.prototype.constraints=[new mxConnectionConstraint(new mxPoint(.25,.25),!1),new mxConnectionConstraint(new mxPoint(.4,.1),!1),new mxConnectionConstraint(new mxPoint(.16,.55),!1),new mxConnectionConstraint(new mxPoint(.07,.4),!1),new mxConnectionConstraint(new mxPoint(.31,.8),!1),new mxConnectionConstraint(new mxPoint(.13,.77),!1),new mxConnectionConstraint(new mxPoint(.8,
+.8),!1),new mxConnectionConstraint(new mxPoint(.55,.95),!1),new mxConnectionConstraint(new mxPoint(.875,.5),!1),new mxConnectionConstraint(new mxPoint(.96,.7),!1),new mxConnectionConstraint(new mxPoint(.625,.2),!1),new mxConnectionConstraint(new mxPoint(.88,.25),!1)];m.prototype.constraints=mxRectangleShape.prototype.constraints;n.prototype.constraints=mxRectangleShape.prototype.constraints;l.prototype.constraints=[new mxConnectionConstraint(new mxPoint(.25,0),!0),new mxConnectionConstraint(new mxPoint(.5,
+0),!0),new mxConnectionConstraint(new mxPoint(.75,0),!0),new mxConnectionConstraint(new mxPoint(0,.25),!0),new mxConnectionConstraint(new mxPoint(0,.5),!0),new mxConnectionConstraint(new mxPoint(0,.75),!0),new mxConnectionConstraint(new mxPoint(1,.25),!0),new mxConnectionConstraint(new mxPoint(1,.5),!0),new mxConnectionConstraint(new mxPoint(1,.75),!0)];mxArrow.prototype.constraints=null;X.prototype.constraints=null;N.prototype.constraints=null;K.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,
+0),!1),new mxConnectionConstraint(new mxPoint(0,.5),!1),new mxConnectionConstraint(new mxPoint(0,1),!1),new mxConnectionConstraint(new mxPoint(.25,.5),!1),new mxConnectionConstraint(new mxPoint(.5,.5),!1),new mxConnectionConstraint(new mxPoint(.75,.5),!1),new mxConnectionConstraint(new mxPoint(1,0),!1),new mxConnectionConstraint(new mxPoint(1,.5),!1),new mxConnectionConstraint(new mxPoint(1,1),!1)];T.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,.5),!1),new mxConnectionConstraint(new mxPoint(1,
+.5),!1)];ea.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,.5),!1),new mxConnectionConstraint(new mxPoint(1,.5),!1)];ma.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,.5),!1),new mxConnectionConstraint(new mxPoint(1,.5),!1),new mxConnectionConstraint(new mxPoint(.5,0),!1),new mxConnectionConstraint(new mxPoint(.5,1),!1)];L.prototype.constraints=null;P.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,.25),!1),new mxConnectionConstraint(new mxPoint(0,
+.5),!1),new mxConnectionConstraint(new mxPoint(0,.75),!1),new mxConnectionConstraint(new mxPoint(1,.5),!1),new mxConnectionConstraint(new mxPoint(.7,.1),!1),new mxConnectionConstraint(new mxPoint(.7,.9),!1)];V.prototype.constraints=[new mxConnectionConstraint(new mxPoint(.175,.25),!1),new mxConnectionConstraint(new mxPoint(.25,.5),!1),new mxConnectionConstraint(new mxPoint(.175,.75),!1),new mxConnectionConstraint(new mxPoint(1,.5),!1),new mxConnectionConstraint(new mxPoint(.7,.1),!1),new mxConnectionConstraint(new mxPoint(.7,
+.9),!1)]})();
\ No newline at end of file
diff --git a/war/js/viewer.min.js b/war/js/viewer.min.js
index dc38c9307cccd79d2e77c631e361f5396be2cd9c..abe34d3f89f95105a0f3bb35ddd34a3f4d511079 100644
--- a/war/js/viewer.min.js
+++ b/war/js/viewer.min.js
@@ -1568,8 +1568,8 @@ g=this.getAlignmentTolerance();if(0<g){var k=this.graph.view.getState(b);if(null
 mxConnectionHandler.prototype.createEdge=function(a,b,c,d){var e=null;null!=this.factoryMethod&&(e=this.factoryMethod(b,c,d));null==e&&(e=new mxCell(a||""),e.setEdge(!0),e.setStyle(d),a=new mxGeometry,a.relative=!0,e.setGeometry(a));return e};
 mxConnectionHandler.prototype.destroy=function(){this.graph.removeMouseListener(this);null!=this.shape&&(this.shape.destroy(),this.shape=null);null!=this.marker&&(this.marker.destroy(),this.marker=null);null!=this.constraintHandler&&(this.constraintHandler.destroy(),this.constraintHandler=null);null!=this.changeHandler&&(this.graph.getModel().removeListener(this.changeHandler),this.graph.getView().removeListener(this.changeHandler),this.changeHandler=null);null!=this.drillHandler&&(this.graph.removeListener(this.drillHandler),
 this.graph.getView().removeListener(this.drillHandler),this.drillHandler=null);null!=this.escapeHandler&&(this.graph.removeListener(this.escapeHandler),this.escapeHandler=null)};
-function mxConstraintHandler(a){this.graph=a;this.resetHandler=mxUtils.bind(this,function(a,c){null!=this.currentFocus&&null==this.graph.view.getState(this.currentFocus.cell)?this.reset():this.redraw()});this.graph.model.addListener(mxEvent.CHANGE,this.resetHandler);this.graph.view.addListener(mxEvent.SCALE,this.resetHandler);this.graph.addListener(mxEvent.ROOT,this.resetHandler)}mxConstraintHandler.prototype.pointImage=new mxImage(mxClient.imageBasePath+"/point.gif",5,5);
-mxConstraintHandler.prototype.graph=null;mxConstraintHandler.prototype.enabled=!0;mxConstraintHandler.prototype.highlightColor=mxConstants.DEFAULT_VALID_COLOR;mxConstraintHandler.prototype.isEnabled=function(){return this.enabled};mxConstraintHandler.prototype.setEnabled=function(a){this.enabled=a};
+function mxConstraintHandler(a){this.graph=a;this.resetHandler=mxUtils.bind(this,function(a,c){null!=this.currentFocus&&null==this.graph.view.getState(this.currentFocus.cell)?this.reset():this.redraw()});this.graph.model.addListener(mxEvent.CHANGE,this.resetHandler);this.graph.view.addListener(mxEvent.SCALE_AND_TRANSLATE,this.resetHandler);this.graph.view.addListener(mxEvent.TRANSLATE,this.resetHandler);this.graph.view.addListener(mxEvent.SCALE,this.resetHandler);this.graph.addListener(mxEvent.ROOT,
+this.resetHandler)}mxConstraintHandler.prototype.pointImage=new mxImage(mxClient.imageBasePath+"/point.gif",5,5);mxConstraintHandler.prototype.graph=null;mxConstraintHandler.prototype.enabled=!0;mxConstraintHandler.prototype.highlightColor=mxConstants.DEFAULT_VALID_COLOR;mxConstraintHandler.prototype.isEnabled=function(){return this.enabled};mxConstraintHandler.prototype.setEnabled=function(a){this.enabled=a};
 mxConstraintHandler.prototype.reset=function(){if(null!=this.focusIcons){for(var a=0;a<this.focusIcons.length;a++)this.focusIcons[a].destroy();this.focusIcons=null}null!=this.focusHighlight&&(this.focusHighlight.destroy(),this.focusHighlight=null);this.focusPoints=this.currentFocus=this.currentPoint=this.currentFocusArea=this.currentConstraint=null};mxConstraintHandler.prototype.getTolerance=function(a){return this.graph.getTolerance()};
 mxConstraintHandler.prototype.getImageForConstraint=function(a,b,c){return this.pointImage};mxConstraintHandler.prototype.isEventIgnored=function(a,b){return!1};mxConstraintHandler.prototype.isStateIgnored=function(a,b){return!1};mxConstraintHandler.prototype.destroyIcons=function(){if(null!=this.focusIcons){for(var a=0;a<this.focusIcons.length;a++)this.focusIcons[a].destroy();this.focusPoints=this.focusIcons=null}};
 mxConstraintHandler.prototype.destroyFocusHighlight=function(){null!=this.focusHighlight&&(this.focusHighlight.destroy(),this.focusHighlight=null)};mxConstraintHandler.prototype.isKeepFocusEvent=function(a){return mxEvent.isShiftDown(a.getEvent())};
@@ -1903,7 +1903,7 @@ mxCodecRegistry.register(function(){var a=new mxObjectCodec(new mxEditor,"modifi
 c,d);return}}else if("ui"==c.nodeName){this.decodeUi(a,c,d);return}mxObjectCodec.prototype.decodeChild.apply(this,arguments)};a.decodeUi=function(a,c,d){for(a=c.firstChild;null!=a;){if("add"==a.nodeName){c=a.getAttribute("as");var b=a.getAttribute("element"),f=a.getAttribute("style");if(null!=b)b=document.getElementById(b),null!=b&&null!=f&&(b.style.cssText+=";"+f);else{var g=parseInt(a.getAttribute("x")),k=parseInt(a.getAttribute("y")),l=a.getAttribute("width"),m=a.getAttribute("height"),b=document.createElement("div");
 b.style.cssText=f;(new mxWindow(mxResources.get(c)||c,b,g,k,l,m,!1,!0)).setVisible(!0)}"graph"==c?d.setGraphContainer(b):"toolbar"==c?d.setToolbarContainer(b):"title"==c?d.setTitleContainer(b):"status"==c?d.setStatusContainer(b):"map"==c&&d.setMapContainer(b)}else"resource"==a.nodeName?mxResources.add(a.getAttribute("basename")):"stylesheet"==a.nodeName&&mxClient.link("stylesheet",a.getAttribute("name"));a=a.nextSibling}};a.decodeTemplates=function(a,c,d){null==d.templates&&(d.templates=[]);c=mxUtils.getChildNodes(c);
 for(var b=0;b<c.length;b++){for(var f=c[b].getAttribute("as"),g=c[b].firstChild;null!=g&&1!=g.nodeType;)g=g.nextSibling;null!=g&&(d.templates[f]=a.decodeCell(g))}};return a}());
-Editor=function(a,b,e,d,g){mxEventSource.call(this);this.chromeless=null!=a?a:this.chromeless;this.initStencilRegistry();this.graph=d||this.createGraph(b,e);this.editable=null!=g?g:!a;this.undoManager=this.createUndoManager();this.status="";this.getOrCreateFilename=function(){return this.filename||mxResources.get("drawing",[Editor.pageCounter])+".xml"};this.getFilename=function(){return this.filename};this.setStatus=function(a){this.status=a;this.fireEvent(new mxEventObject("statusChanged"))};this.getStatus=
+Editor=function(a,b,e,d,h){mxEventSource.call(this);this.chromeless=null!=a?a:this.chromeless;this.initStencilRegistry();this.graph=d||this.createGraph(b,e);this.editable=null!=h?h:!a;this.undoManager=this.createUndoManager();this.status="";this.getOrCreateFilename=function(){return this.filename||mxResources.get("drawing",[Editor.pageCounter])+".xml"};this.getFilename=function(){return this.filename};this.setStatus=function(a){this.status=a;this.fireEvent(new mxEventObject("statusChanged"))};this.getStatus=
 function(){return this.status};this.graphChangeListener=function(a,b){var d=null!=b?b.getProperty("edit"):null;null!=d&&d.ignoreEdit||this.setModified(!0)};this.graph.getModel().addListener(mxEvent.CHANGE,mxUtils.bind(this,function(){this.graphChangeListener.apply(this,arguments)}));this.graph.resetViewOnRootChange=!1;this.init()};Editor.pageCounter=0;
 (function(){try{for(var a=window;null!=a.opener&&"undefined"!==typeof a.opener.Editor&&!isNaN(a.opener.Editor.pageCounter)&&a.opener!=a;)a=a.opener;null!=a&&(a.Editor.pageCounter++,Editor.pageCounter=a.Editor.pageCounter)}catch(b){}})();Editor.useLocalStorage="undefined"!=typeof Storage&&mxClient.IS_IOS;
 Editor.helpImage=mxClient.IS_SVG?"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAMAAAAoLQ9TAAAAXVBMVEUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAC5BxTwAAAAH3RSTlMAlUF8boNQIE0LBgOgkGlHNSwqFIx/dGVUOjApmV9ezNACSAAAAIVJREFUGNNtjNsOgzAMQ5NeoVcKDAZs+//PXLKI8YKlWvaRU7jXuFpb9qsbdK05XILUiE8JHQox1Pv3OgFUzf1AGqWqUg+QBwLF0YAeegBlCNgRWOpB5vUfTCmeoHQ/wNdy0jLH/cM+b+wLTw4n/7ACEmHVVy8h6qy8V7MNcGowWpsNbvUFcGUEdSi1s/oAAAAASUVORK5CYII=":IMAGE_PATH+
@@ -1935,14 +1935,14 @@ this.updateGraphComponents();this.fireEvent(new mxEventObject("resetGraphView"))
 Editor.prototype.getGraphXml=function(a){a=(null!=a?a:1)?(new mxCodec(mxUtils.createXmlDocument())).encode(this.graph.getModel()):this.graph.encodeCells(mxUtils.sortCells(this.graph.model.getTopmostCells(this.graph.getSelectionCells())));if(0!=this.graph.view.translate.x||0!=this.graph.view.translate.y)a.setAttribute("dx",Math.round(100*this.graph.view.translate.x)/100),a.setAttribute("dy",Math.round(100*this.graph.view.translate.y)/100);a.setAttribute("grid",this.graph.isGridEnabled()?"1":"0");a.setAttribute("gridSize",
 this.graph.gridSize);a.setAttribute("guides",this.graph.graphHandler.guidesEnabled?"1":"0");a.setAttribute("tooltips",this.graph.tooltipHandler.isEnabled()?"1":"0");a.setAttribute("connect",this.graph.connectionHandler.isEnabled()?"1":"0");a.setAttribute("arrows",this.graph.connectionArrowsEnabled?"1":"0");a.setAttribute("fold",this.graph.foldingEnabled?"1":"0");a.setAttribute("page",this.graph.pageVisible?"1":"0");a.setAttribute("pageScale",this.graph.pageScale);a.setAttribute("pageWidth",this.graph.pageFormat.width);
 a.setAttribute("pageHeight",this.graph.pageFormat.height);null!=this.graph.background&&a.setAttribute("background",this.graph.background);return a};Editor.prototype.updateGraphComponents=function(){var a=this.graph;null!=a.container&&(a.view.validateBackground(),a.container.style.overflow=a.scrollbars?"auto":"hidden",this.fireEvent(new mxEventObject("updateGraphComponents")))};Editor.prototype.setModified=function(a){this.modified=a};Editor.prototype.setFilename=function(a){this.filename=a};
-Editor.prototype.createUndoManager=function(){var a=this.graph,b=new mxUndoManager;this.undoListener=function(a,e){b.undoableEditHappened(e.getProperty("edit"))};var e=mxUtils.bind(this,function(a,b){this.undoListener.apply(this,arguments)});a.getModel().addListener(mxEvent.UNDO,e);a.getView().addListener(mxEvent.UNDO,e);e=function(b,e){for(var d=a.getSelectionCellsForChanges(e.getProperty("edit").changes),g=a.getModel(),q=[],c=0;c<d.length;c++)(g.isVertex(d[c])||g.isEdge(d[c]))&&null!=a.view.getState(d[c])&&
+Editor.prototype.createUndoManager=function(){var a=this.graph,b=new mxUndoManager;this.undoListener=function(a,e){b.undoableEditHappened(e.getProperty("edit"))};var e=mxUtils.bind(this,function(a,b){this.undoListener.apply(this,arguments)});a.getModel().addListener(mxEvent.UNDO,e);a.getView().addListener(mxEvent.UNDO,e);e=function(b,e){for(var d=a.getSelectionCellsForChanges(e.getProperty("edit").changes),h=a.getModel(),q=[],c=0;c<d.length;c++)(h.isVertex(d[c])||h.isEdge(d[c]))&&null!=a.view.getState(d[c])&&
 q.push(d[c]);a.setSelectionCells(q)};b.addListener(mxEvent.UNDO,e);b.addListener(mxEvent.REDO,e);return b};Editor.prototype.initStencilRegistry=function(){};Editor.prototype.destroy=function(){null!=this.graph&&(this.graph.destroy(),this.graph=null)};OpenFile=function(a){this.consumer=this.producer=null;this.done=a;this.args=null};OpenFile.prototype.setConsumer=function(a){this.consumer=a;this.execute()};OpenFile.prototype.setData=function(){this.args=arguments;this.execute()};
 OpenFile.prototype.error=function(a){this.cancel(!0);mxUtils.alert(a)};OpenFile.prototype.execute=function(){null!=this.consumer&&null!=this.args&&(this.cancel(!1),this.consumer.apply(this,this.args))};OpenFile.prototype.cancel=function(a){null!=this.done&&this.done(null!=a?a:!0)};
-function Dialog(a,b,e,d,g,l,p){var q=0;mxClient.IS_VML&&(null==document.documentMode||8>document.documentMode)&&(q=80);e+=q;d+=q;var c=e,f=d,h=Math.max(document.body.clientHeight,document.documentElement.clientHeight),m=Math.max(1,Math.round((document.body.clientWidth-e-64)/2)),n=Math.max(1,Math.round((h-d-a.footerHeight)/3));mxClient.IS_QUIRKS||(b.style.maxHeight="100%");e=Math.min(e,document.body.scrollWidth-64);d>h-64&&(b.style.overflowY="auto");d=Math.min(d,h-64);0<a.dialogs.length&&(this.zIndex+=
-2*a.dialogs.length);null==this.bg&&(this.bg=a.createDiv("background"),this.bg.style.position="absolute",this.bg.style.background="white",this.bg.style.height=h+"px",this.bg.style.right="0px",this.bg.style.zIndex=this.zIndex-2,mxUtils.setOpacity(this.bg,this.bgOpacity),mxClient.IS_QUIRKS&&new mxDivResizer(this.bg));var u=mxUtils.getDocumentScrollOrigin(document);this.bg.style.left=u.x+"px";this.bg.style.top=u.y+"px";m+=u.x;n+=u.y;g&&document.body.appendChild(this.bg);var r=a.createDiv("geDialog");
-r.style.width=e+"px";r.style.height=d+"px";r.style.left=m+"px";r.style.top=n+"px";r.style.zIndex=this.zIndex;r.appendChild(b);document.body.appendChild(r);l&&(g=document.createElement("img"),g.setAttribute("src",Dialog.prototype.closeImage),g.setAttribute("title",mxResources.get("close")),g.className="geDialogClose",g.style.top=n+14+"px",g.style.left=m+e+38-q+"px",g.style.zIndex=this.zIndex,mxEvent.addListener(g,"click",mxUtils.bind(this,function(){a.hideDialog(!0)})),document.body.appendChild(g),
-this.dialogImg=g,mxEvent.addGestureListeners(this.bg,null,null,mxUtils.bind(this,function(c){a.hideDialog(!0)})));this.resizeListener=mxUtils.bind(this,function(){h=Math.max(document.body.clientHeight,document.documentElement.clientHeight);this.bg.style.height=h+"px";m=Math.max(1,Math.round((document.body.clientWidth-e-64)/2));n=Math.max(1,Math.round((h-d-a.footerHeight)/3));r.style.left=m+"px";r.style.top=n+"px";e=Math.min(c,document.body.scrollWidth-64);d=Math.min(f,h-64);r.style.width=e+"px";r.style.height=
-d+"px";b.style.overflowY=f>h-64?"auto":"";null!=this.dialogImg&&(this.dialogImg.style.top=n+14+"px",this.dialogImg.style.left=m+e+38-q+"px")});mxEvent.addListener(window,"resize",this.resizeListener);this.onDialogClose=p;this.container=r;a.editor.fireEvent(new mxEventObject("showDialog"))}Dialog.prototype.zIndex=mxPopupMenu.prototype.zIndex-1;
+function Dialog(a,b,e,d,h,l,n){var q=0;mxClient.IS_VML&&(null==document.documentMode||8>document.documentMode)&&(q=80);e+=q;d+=q;var c=e,f=d,g=Math.max(document.body.clientHeight,document.documentElement.clientHeight),p=Math.max(1,Math.round((document.body.clientWidth-e-64)/2)),m=Math.max(1,Math.round((g-d-a.footerHeight)/3));mxClient.IS_QUIRKS||(b.style.maxHeight="100%");e=Math.min(e,document.body.scrollWidth-64);d>g-64&&(b.style.overflowY="auto");d=Math.min(d,g-64);0<a.dialogs.length&&(this.zIndex+=
+2*a.dialogs.length);null==this.bg&&(this.bg=a.createDiv("background"),this.bg.style.position="absolute",this.bg.style.background="white",this.bg.style.height=g+"px",this.bg.style.right="0px",this.bg.style.zIndex=this.zIndex-2,mxUtils.setOpacity(this.bg,this.bgOpacity),mxClient.IS_QUIRKS&&new mxDivResizer(this.bg));var u=mxUtils.getDocumentScrollOrigin(document);this.bg.style.left=u.x+"px";this.bg.style.top=u.y+"px";p+=u.x;m+=u.y;h&&document.body.appendChild(this.bg);var r=a.createDiv("geDialog");
+r.style.width=e+"px";r.style.height=d+"px";r.style.left=p+"px";r.style.top=m+"px";r.style.zIndex=this.zIndex;r.appendChild(b);document.body.appendChild(r);l&&(h=document.createElement("img"),h.setAttribute("src",Dialog.prototype.closeImage),h.setAttribute("title",mxResources.get("close")),h.className="geDialogClose",h.style.top=m+14+"px",h.style.left=p+e+38-q+"px",h.style.zIndex=this.zIndex,mxEvent.addListener(h,"click",mxUtils.bind(this,function(){a.hideDialog(!0)})),document.body.appendChild(h),
+this.dialogImg=h,mxEvent.addGestureListeners(this.bg,null,null,mxUtils.bind(this,function(c){a.hideDialog(!0)})));this.resizeListener=mxUtils.bind(this,function(){g=Math.max(document.body.clientHeight,document.documentElement.clientHeight);this.bg.style.height=g+"px";p=Math.max(1,Math.round((document.body.clientWidth-e-64)/2));m=Math.max(1,Math.round((g-d-a.footerHeight)/3));r.style.left=p+"px";r.style.top=m+"px";e=Math.min(c,document.body.scrollWidth-64);d=Math.min(f,g-64);r.style.width=e+"px";r.style.height=
+d+"px";b.style.overflowY=f>g-64?"auto":"";null!=this.dialogImg&&(this.dialogImg.style.top=m+14+"px",this.dialogImg.style.left=p+e+38-q+"px")});mxEvent.addListener(window,"resize",this.resizeListener);this.onDialogClose=n;this.container=r;a.editor.fireEvent(new mxEventObject("showDialog"))}Dialog.prototype.zIndex=mxPopupMenu.prototype.zIndex-1;
 Dialog.prototype.noColorImage=mxClient.IS_SVG?"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAMAAAAoLQ9TAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAyBpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuMC1jMDYwIDYxLjEzNDc3NywgMjAxMC8wMi8xMi0xNzozMjowMCAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvIiB4bWxuczp4bXBNTT0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL21tLyIgeG1sbnM6c3RSZWY9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9zVHlwZS9SZXNvdXJjZVJlZiMiIHhtcDpDcmVhdG9yVG9vbD0iQWRvYmUgUGhvdG9zaG9wIENTNSBXaW5kb3dzIiB4bXBNTTpJbnN0YW5jZUlEPSJ4bXAuaWlkOkEzRDlBMUUwODYxMTExRTFCMzA4RDdDMjJBMEMxRDM3IiB4bXBNTTpEb2N1bWVudElEPSJ4bXAuZGlkOkEzRDlBMUUxODYxMTExRTFCMzA4RDdDMjJBMEMxRDM3Ij4gPHhtcE1NOkRlcml2ZWRGcm9tIHN0UmVmOmluc3RhbmNlSUQ9InhtcC5paWQ6QTNEOUExREU4NjExMTFFMUIzMDhEN0MyMkEwQzFEMzciIHN0UmVmOmRvY3VtZW50SUQ9InhtcC5kaWQ6QTNEOUExREY4NjExMTFFMUIzMDhEN0MyMkEwQzFEMzciLz4gPC9yZGY6RGVzY3JpcHRpb24+IDwvcmRmOlJERj4gPC94OnhtcG1ldGE+IDw/eHBhY2tldCBlbmQ9InIiPz5xh3fmAAAABlBMVEX////MzMw46qqDAAAAGElEQVR42mJggAJGKGAYIIGBth8KAAIMAEUQAIElnLuQAAAAAElFTkSuQmCC":IMAGE_PATH+
 "/nocolor.png";Dialog.prototype.closeImage=mxClient.IS_SVG?"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAkAAAAJAQMAAADaX5RTAAAABlBMVEV7mr3///+wksspAAAAAnRSTlP/AOW3MEoAAAAdSURBVAgdY9jXwCDDwNDRwHCwgeExmASygSL7GgB12QiqNHZZIwAAAABJRU5ErkJggg==":IMAGE_PATH+"/close.png";
 Dialog.prototype.clearImage=mxClient.IS_SVG?"data:image/gif;base64,R0lGODlhDQAKAIABAMDAwP///yH/C1hNUCBEYXRhWE1QPD94cGFja2V0IGJlZ2luPSLvu78iIGlkPSJXNU0wTXBDZWhpSHpyZVN6TlRjemtjOWQiPz4gPHg6eG1wbWV0YSB4bWxuczp4PSJhZG9iZTpuczptZXRhLyIgeDp4bXB0az0iQWRvYmUgWE1QIENvcmUgNS4wLWMwNjAgNjEuMTM0Nzc3LCAyMDEwLzAyLzEyLTE3OjMyOjAwICAgICAgICAiPiA8cmRmOlJERiB4bWxuczpyZGY9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkvMDIvMjItcmRmLXN5bnRheC1ucyMiPiA8cmRmOkRlc2NyaXB0aW9uIHJkZjphYm91dD0iIiB4bWxuczp4bXA9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC8iIHhtbG5zOnhtcE1NPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvbW0vIiB4bWxuczpzdFJlZj0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL3NUeXBlL1Jlc291cmNlUmVmIyIgeG1wOkNyZWF0b3JUb29sPSJBZG9iZSBQaG90b3Nob3AgQ1M1IFdpbmRvd3MiIHhtcE1NOkluc3RhbmNlSUQ9InhtcC5paWQ6OUIzOEM1NzI4NjEyMTFFMUEzMkNDMUE3NjZERDE2QjIiIHhtcE1NOkRvY3VtZW50SUQ9InhtcC5kaWQ6OUIzOEM1NzM4NjEyMTFFMUEzMkNDMUE3NjZERDE2QjIiPiA8eG1wTU06RGVyaXZlZEZyb20gc3RSZWY6aW5zdGFuY2VJRD0ieG1wLmlpZDo5QjM4QzU3MDg2MTIxMUUxQTMyQ0MxQTc2NkREMTZCMiIgc3RSZWY6ZG9jdW1lbnRJRD0ieG1wLmRpZDo5QjM4QzU3MTg2MTIxMUUxQTMyQ0MxQTc2NkREMTZCMiIvPiA8L3JkZjpEZXNjcmlwdGlvbj4gPC9yZGY6UkRGPiA8L3g6eG1wbWV0YT4gPD94cGFja2V0IGVuZD0iciI/PgH//v38+/r5+Pf29fTz8vHw7+7t7Ovq6ejn5uXk4+Lh4N/e3dzb2tnY19bV1NPS0dDPzs3My8rJyMfGxcTDwsHAv769vLu6ubi3trW0s7KxsK+urayrqqmop6alpKOioaCfnp2cm5qZmJeWlZSTkpGQj46NjIuKiYiHhoWEg4KBgH9+fXx7enl4d3Z1dHNycXBvbm1sa2ppaGdmZWRjYmFgX15dXFtaWVhXVlVUU1JRUE9OTUxLSklIR0ZFRENCQUA/Pj08Ozo5ODc2NTQzMjEwLy4tLCsqKSgnJiUkIyIhIB8eHRwbGhkYFxYVFBMSERAPDg0MCwoJCAcGBQQDAgEAACH5BAEAAAEALAAAAAANAAoAAAIXTGCJebD9jEOTqRlttXdrB32PJ2ncyRQAOw==":IMAGE_PATH+
@@ -1951,30 +1951,30 @@ Dialog.prototype.lockedImage=mxClient.IS_SVG?"data:image/png;base64,iVBORw0KGgoA
 "/locked.png";
 Dialog.prototype.unlockedImage=mxClient.IS_SVG?"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAwAAAAMCAMAAABhq6zVAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAyJpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuMC1jMDYwIDYxLjEzNDc3NywgMjAxMC8wMi8xMi0xNzozMjowMCAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvIiB4bWxuczp4bXBNTT0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL21tLyIgeG1sbnM6c3RSZWY9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9zVHlwZS9SZXNvdXJjZVJlZiMiIHhtcDpDcmVhdG9yVG9vbD0iQWRvYmUgUGhvdG9zaG9wIENTNSBNYWNpbnRvc2giIHhtcE1NOkluc3RhbmNlSUQ9InhtcC5paWQ6MzdDMDZCN0QxNzIxMTFFNUI0RTk5NTg4OTcyMUUyODEiIHhtcE1NOkRvY3VtZW50SUQ9InhtcC5kaWQ6MzdDMDZCN0UxNzIxMTFFNUI0RTk5NTg4OTcyMUUyODEiPiA8eG1wTU06RGVyaXZlZEZyb20gc3RSZWY6aW5zdGFuY2VJRD0ieG1wLmlpZDozN0MwNkI3QjE3MjExMUU1QjRFOTk1ODg5NzIxRTI4MSIgc3RSZWY6ZG9jdW1lbnRJRD0ieG1wLmRpZDozN0MwNkI3QzE3MjExMUU1QjRFOTk1ODg5NzIxRTI4MSIvPiA8L3JkZjpEZXNjcmlwdGlvbj4gPC9yZGY6UkRGPiA8L3g6eG1wbWV0YT4gPD94cGFja2V0IGVuZD0iciI/PkKMpVwAAAAYUExURZmZmbKysr+/v6ysrOXl5czMzLGxsf///zHN5lwAAAAIdFJOU/////////8A3oO9WQAAADxJREFUeNpUzFESACAEBNBVsfe/cZJU+8Mzs8CIABCidtfGOndnYsT40HDSiCcbPdoJo10o9aI677cpwACRoAF3dFNlswAAAABJRU5ErkJggg==":IMAGE_PATH+
 "/unlocked.png";Dialog.prototype.bgOpacity=80;Dialog.prototype.close=function(a){null!=this.onDialogClose&&(this.onDialogClose(a),this.onDialogClose=null);null!=this.dialogImg&&(this.dialogImg.parentNode.removeChild(this.dialogImg),this.dialogImg=null);null!=this.bg&&null!=this.bg.parentNode&&this.bg.parentNode.removeChild(this.bg);mxEvent.removeListener(window,"resize",this.resizeListener);this.container.parentNode.removeChild(this.container)};var PrintDialog=function(a,b){this.create(a,b)};
-PrintDialog.prototype.create=function(a){function b(a){var c=q.checked||f.checked,b=parseInt(m.value)/100;isNaN(b)&&(b=1,m.value="100%");var b=.75*b,d=e.pageFormat||mxConstants.PAGE_FORMAT_A4_PORTRAIT,n=1/e.pageScale;if(c){var u=q.checked?1:parseInt(h.value);isNaN(u)||(n=mxUtils.getScaleForPageCount(u,e,d))}e.getGraphBounds();var g=u=0,d=mxRectangle.fromRectangle(d);d.width=Math.ceil(d.width*b);d.height=Math.ceil(d.height*b);n*=b;!c&&e.pageVisible?(b=e.getPageLayout(),u-=b.x*d.width,g-=b.y*d.height):
-c=!0;c=PrintDialog.createPrintPreview(e,n,d,0,u,g,c);c.open();a&&PrintDialog.printPreview(c)}var e=a.editor.graph,d,g,l=document.createElement("table");l.style.width="100%";l.style.height="100%";var p=document.createElement("tbody");d=document.createElement("tr");var q=document.createElement("input");q.setAttribute("type","checkbox");g=document.createElement("td");g.setAttribute("colspan","2");g.style.fontSize="10pt";g.appendChild(q);var c=document.createElement("span");mxUtils.write(c," "+mxResources.get("fitPage"));
-g.appendChild(c);mxEvent.addListener(c,"click",function(a){q.checked=!q.checked;f.checked=!q.checked;mxEvent.consume(a)});mxEvent.addListener(q,"change",function(){f.checked=!q.checked});d.appendChild(g);p.appendChild(d);d=d.cloneNode(!1);var f=document.createElement("input");f.setAttribute("type","checkbox");g=document.createElement("td");g.style.fontSize="10pt";g.appendChild(f);c=document.createElement("span");mxUtils.write(c," "+mxResources.get("posterPrint")+":");g.appendChild(c);mxEvent.addListener(c,
-"click",function(a){f.checked=!f.checked;q.checked=!f.checked;mxEvent.consume(a)});d.appendChild(g);var h=document.createElement("input");h.setAttribute("value","1");h.setAttribute("type","number");h.setAttribute("min","1");h.setAttribute("size","4");h.setAttribute("disabled","disabled");h.style.width="50px";g=document.createElement("td");g.style.fontSize="10pt";g.appendChild(h);mxUtils.write(g," "+mxResources.get("pages")+" (max)");d.appendChild(g);p.appendChild(d);mxEvent.addListener(f,"change",
-function(){f.checked?h.removeAttribute("disabled"):h.setAttribute("disabled","disabled");q.checked=!f.checked});d=d.cloneNode(!1);g=document.createElement("td");mxUtils.write(g,mxResources.get("pageScale")+":");d.appendChild(g);g=document.createElement("td");var m=document.createElement("input");m.setAttribute("value","100 %");m.setAttribute("size","5");m.style.width="50px";g.appendChild(m);d.appendChild(g);p.appendChild(d);d=document.createElement("tr");g=document.createElement("td");g.colSpan=2;
-g.style.paddingTop="20px";g.setAttribute("align","right");c=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog()});c.className="geBtn";a.editor.cancelFirst&&g.appendChild(c);if(PrintDialog.previewEnabled){var n=mxUtils.button(mxResources.get("preview"),function(){a.hideDialog();b(!1)});n.className="geBtn";g.appendChild(n)}n=mxUtils.button(mxResources.get(PrintDialog.previewEnabled?"print":"ok"),function(){a.hideDialog();b(!0)});n.className="geBtn gePrimaryBtn";g.appendChild(n);a.editor.cancelFirst||
-g.appendChild(c);d.appendChild(g);p.appendChild(d);l.appendChild(p);this.container=l};PrintDialog.printPreview=function(a){if(null!=a.wnd){var b=function(){a.wnd.focus();a.wnd.print();a.wnd.close()};mxClient.IS_GC?window.setTimeout(b,500):b()}};
-PrintDialog.createPrintPreview=function(a,b,e,d,g,l,p){b=new mxPrintPreview(a,b,e,d,g,l);b.title=mxResources.get("preview");b.printBackgroundImage=!0;b.autoOrigin=p;a=a.background;if(null==a||""==a||a==mxConstants.NONE)a="#ffffff";b.backgroundColor=a;var q=b.writeHead;b.writeHead=function(a){q.apply(this,arguments);a.writeln('<style type="text/css">');a.writeln("@media screen {");a.writeln("  body > div { padding:30px;box-sizing:content-box; }");a.writeln("}");a.writeln("</style>")};return b};
+PrintDialog.prototype.create=function(a){function b(a){var c=q.checked||f.checked,b=parseInt(p.value)/100;isNaN(b)&&(b=1,p.value="100%");var b=.75*b,d=e.pageFormat||mxConstants.PAGE_FORMAT_A4_PORTRAIT,m=1/e.pageScale;if(c){var u=q.checked?1:parseInt(g.value);isNaN(u)||(m=mxUtils.getScaleForPageCount(u,e,d))}e.getGraphBounds();var h=u=0,d=mxRectangle.fromRectangle(d);d.width=Math.ceil(d.width*b);d.height=Math.ceil(d.height*b);m*=b;!c&&e.pageVisible?(b=e.getPageLayout(),u-=b.x*d.width,h-=b.y*d.height):
+c=!0;c=PrintDialog.createPrintPreview(e,m,d,0,u,h,c);c.open();a&&PrintDialog.printPreview(c)}var e=a.editor.graph,d,h,l=document.createElement("table");l.style.width="100%";l.style.height="100%";var n=document.createElement("tbody");d=document.createElement("tr");var q=document.createElement("input");q.setAttribute("type","checkbox");h=document.createElement("td");h.setAttribute("colspan","2");h.style.fontSize="10pt";h.appendChild(q);var c=document.createElement("span");mxUtils.write(c," "+mxResources.get("fitPage"));
+h.appendChild(c);mxEvent.addListener(c,"click",function(a){q.checked=!q.checked;f.checked=!q.checked;mxEvent.consume(a)});mxEvent.addListener(q,"change",function(){f.checked=!q.checked});d.appendChild(h);n.appendChild(d);d=d.cloneNode(!1);var f=document.createElement("input");f.setAttribute("type","checkbox");h=document.createElement("td");h.style.fontSize="10pt";h.appendChild(f);c=document.createElement("span");mxUtils.write(c," "+mxResources.get("posterPrint")+":");h.appendChild(c);mxEvent.addListener(c,
+"click",function(a){f.checked=!f.checked;q.checked=!f.checked;mxEvent.consume(a)});d.appendChild(h);var g=document.createElement("input");g.setAttribute("value","1");g.setAttribute("type","number");g.setAttribute("min","1");g.setAttribute("size","4");g.setAttribute("disabled","disabled");g.style.width="50px";h=document.createElement("td");h.style.fontSize="10pt";h.appendChild(g);mxUtils.write(h," "+mxResources.get("pages")+" (max)");d.appendChild(h);n.appendChild(d);mxEvent.addListener(f,"change",
+function(){f.checked?g.removeAttribute("disabled"):g.setAttribute("disabled","disabled");q.checked=!f.checked});d=d.cloneNode(!1);h=document.createElement("td");mxUtils.write(h,mxResources.get("pageScale")+":");d.appendChild(h);h=document.createElement("td");var p=document.createElement("input");p.setAttribute("value","100 %");p.setAttribute("size","5");p.style.width="50px";h.appendChild(p);d.appendChild(h);n.appendChild(d);d=document.createElement("tr");h=document.createElement("td");h.colSpan=2;
+h.style.paddingTop="20px";h.setAttribute("align","right");c=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog()});c.className="geBtn";a.editor.cancelFirst&&h.appendChild(c);if(PrintDialog.previewEnabled){var m=mxUtils.button(mxResources.get("preview"),function(){a.hideDialog();b(!1)});m.className="geBtn";h.appendChild(m)}m=mxUtils.button(mxResources.get(PrintDialog.previewEnabled?"print":"ok"),function(){a.hideDialog();b(!0)});m.className="geBtn gePrimaryBtn";h.appendChild(m);a.editor.cancelFirst||
+h.appendChild(c);d.appendChild(h);n.appendChild(d);l.appendChild(n);this.container=l};PrintDialog.printPreview=function(a){if(null!=a.wnd){var b=function(){a.wnd.focus();a.wnd.print();a.wnd.close()};mxClient.IS_GC?window.setTimeout(b,500):b()}};
+PrintDialog.createPrintPreview=function(a,b,e,d,h,l,n){b=new mxPrintPreview(a,b,e,d,h,l);b.title=mxResources.get("preview");b.printBackgroundImage=!0;b.autoOrigin=n;a=a.background;if(null==a||""==a||a==mxConstants.NONE)a="#ffffff";b.backgroundColor=a;var q=b.writeHead;b.writeHead=function(a){q.apply(this,arguments);a.writeln('<style type="text/css">');a.writeln("@media screen {");a.writeln("  body > div { padding:30px;box-sizing:content-box; }");a.writeln("}");a.writeln("</style>")};return b};
 PrintDialog.previewEnabled=!0;
-var PageSetupDialog=function(a){function b(){null==h||h==mxConstants.NONE?(f.style.backgroundColor="",f.style.backgroundImage="url('"+Dialog.prototype.noColorImage+"')"):(f.style.backgroundColor=h,f.style.backgroundImage="")}function e(){null==u?(n.removeAttribute("title"),n.style.fontSize="",n.innerHTML=mxResources.get("change")+"..."):(n.setAttribute("title",u.src),n.style.fontSize="11px",n.innerHTML=u.src.substring(0,42)+"...")}var d=a.editor.graph,g,l,p=document.createElement("table");p.style.width=
-"100%";p.style.height="100%";var q=document.createElement("tbody");g=document.createElement("tr");l=document.createElement("td");l.style.verticalAlign="top";l.style.fontSize="10pt";mxUtils.write(l,mxResources.get("paperSize")+":");g.appendChild(l);l=document.createElement("td");l.style.verticalAlign="top";l.style.fontSize="10pt";var c=PageSetupDialog.addPageFormatPanel(l,"pagesetupdialog",d.pageFormat);g.appendChild(l);q.appendChild(g);g=document.createElement("tr");l=document.createElement("td");
-mxUtils.write(l,mxResources.get("background")+":");g.appendChild(l);l=document.createElement("td");l.style.whiteSpace="nowrap";document.createElement("input").setAttribute("type","text");var f=document.createElement("button");f.style.width="18px";f.style.height="18px";f.style.marginRight="20px";f.style.backgroundPosition="center center";f.style.backgroundRepeat="no-repeat";var h=d.background;b();mxEvent.addListener(f,"click",function(c){a.pickColor(h||"none",function(a){h=a;b()});mxEvent.consume(c)});
-l.appendChild(f);mxUtils.write(l,mxResources.get("gridSize")+":");var m=document.createElement("input");m.setAttribute("type","number");m.setAttribute("min","0");m.style.width="40px";m.style.marginLeft="6px";m.value=d.getGridSize();l.appendChild(m);mxEvent.addListener(m,"change",function(){var a=parseInt(m.value);m.value=Math.max(1,isNaN(a)?d.getGridSize():a)});g.appendChild(l);q.appendChild(g);g=document.createElement("tr");l=document.createElement("td");mxUtils.write(l,mxResources.get("image")+
-":");g.appendChild(l);l=document.createElement("td");var n=document.createElement("a");n.style.textDecoration="underline";n.style.cursor="pointer";n.style.color="#a0a0a0";var u=d.backgroundImage;mxEvent.addListener(n,"click",function(c){a.showBackgroundImageDialog(function(a){u=a;e()});mxEvent.consume(c)});e();l.appendChild(n);g.appendChild(l);q.appendChild(g);g=document.createElement("tr");l=document.createElement("td");l.colSpan=2;l.style.paddingTop="16px";l.setAttribute("align","right");var r=
-mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog()});r.className="geBtn";a.editor.cancelFirst&&l.appendChild(r);var k=mxUtils.button(mxResources.get("apply"),function(){a.hideDialog();d.gridSize!==m.value&&d.setGridSize(parseInt(m.value));var f=new ChangePageSetup(a,h,u,c.get());f.ignoreColor=d.background==h;f.ignoreImage=(null!=d.backgroundImage?d.backgroundImage.src:null)===(null!=u?u.src:null);d.pageFormat.width==f.previousFormat.width&&d.pageFormat.height==f.previousFormat.height&&
-f.ignoreColor&&f.ignoreImage||d.model.execute(f)});k.className="geBtn gePrimaryBtn";l.appendChild(k);a.editor.cancelFirst||l.appendChild(r);g.appendChild(l);q.appendChild(g);p.appendChild(q);this.container=p};
-PageSetupDialog.addPageFormatPanel=function(a,b,e,d){function g(a,f,b){if(b||m!=document.activeElement&&n!=document.activeElement){a=!1;for(f=0;f<r.length;f++)b=r[f],x?"custom"==b.key&&(q.value=b.key,x=!1):null!=b.format&&("a4"==b.key?826==e.width?(e=mxRectangle.fromRectangle(e),e.width=827):826==e.height&&(e=mxRectangle.fromRectangle(e),e.height=827):"a5"==b.key&&(584==e.width?(e=mxRectangle.fromRectangle(e),e.width=583):584==e.height&&(e=mxRectangle.fromRectangle(e),e.height=583)),e.width==b.format.width&&
-e.height==b.format.height?(q.value=b.key,l.setAttribute("checked","checked"),l.defaultChecked=!0,l.checked=!0,p.removeAttribute("checked"),p.defaultChecked=!1,p.checked=!1,a=!0):e.width==b.format.height&&e.height==b.format.width&&(q.value=b.key,l.removeAttribute("checked"),l.defaultChecked=!1,l.checked=!1,p.setAttribute("checked","checked"),p.defaultChecked=!0,a=p.checked=!0));a?(c.style.display="",h.style.display="none"):(m.value=e.width/100,n.value=e.height/100,v.setAttribute("selected","selected"),
-l.setAttribute("checked","checked"),l.defaultChecked=!0,c.style.display="none",h.style.display="")}}b="format-"+b;var l=document.createElement("input");l.setAttribute("name",b);l.setAttribute("type","radio");l.setAttribute("value","portrait");var p=document.createElement("input");p.setAttribute("name",b);p.setAttribute("type","radio");p.setAttribute("value","landscape");var q=document.createElement("select");q.style.marginBottom="8px";q.style.width="202px";var c=document.createElement("div");c.style.marginLeft=
-"4px";c.style.width="210px";c.style.height="24px";l.style.marginRight="6px";c.appendChild(l);b=document.createElement("span");b.style.maxWidth="100px";mxUtils.write(b,mxResources.get("portrait"));c.appendChild(b);p.style.marginLeft="10px";p.style.marginRight="6px";c.appendChild(p);var f=document.createElement("span");f.style.width="100px";mxUtils.write(f,mxResources.get("landscape"));c.appendChild(f);var h=document.createElement("div");h.style.marginLeft="4px";h.style.width="210px";h.style.height=
-"24px";var m=document.createElement("input");m.setAttribute("size","7");m.setAttribute("value",e.width);m.style.textAlign="right";h.appendChild(m);mxUtils.write(h," in x ");var n=document.createElement("input");n.setAttribute("size","7");n.setAttribute("value",e.height);n.style.textAlign="right";h.appendChild(n);mxUtils.write(h," in");c.style.display="none";h.style.display="none";for(var u={},r=PageSetupDialog.getFormats(),k=0;k<r.length;k++){var t=r[k];u[t.key]=t;var v=document.createElement("option");
-v.setAttribute("value",t.key);mxUtils.write(v,t.title);q.appendChild(v)}var x=!1;g();a.appendChild(q);mxUtils.br(a);a.appendChild(c);a.appendChild(h);var w=e,D=function(){var a=u[q.value];null!=a.format?(m.value=a.format.width/100,n.value=a.format.height/100,h.style.display="none",c.style.display=""):(c.style.display="none",h.style.display="");a=new mxRectangle(0,0,Math.floor(100*parseFloat(m.value)),Math.floor(100*parseFloat(n.value)));"custom"!=q.value&&p.checked&&(a=new mxRectangle(0,0,a.height,
-a.width));if(a.width!=w.width||a.height!=w.height)w=a,null!=d&&d(w)};mxEvent.addListener(b,"click",function(a){l.checked=!0;D();mxEvent.consume(a)});mxEvent.addListener(f,"click",function(a){p.checked=!0;D();mxEvent.consume(a)});mxEvent.addListener(m,"blur",D);mxEvent.addListener(m,"click",D);mxEvent.addListener(n,"blur",D);mxEvent.addListener(n,"click",D);mxEvent.addListener(p,"change",D);mxEvent.addListener(l,"change",D);mxEvent.addListener(q,"change",function(){x="custom"==q.value;D()});D();return{set:function(a){e=
-a;g(null,null,!0)},get:function(){return w},widthInput:m,heightInput:n}};
+var PageSetupDialog=function(a){function b(){null==g||g==mxConstants.NONE?(f.style.backgroundColor="",f.style.backgroundImage="url('"+Dialog.prototype.noColorImage+"')"):(f.style.backgroundColor=g,f.style.backgroundImage="")}function e(){null==u?(m.removeAttribute("title"),m.style.fontSize="",m.innerHTML=mxResources.get("change")+"..."):(m.setAttribute("title",u.src),m.style.fontSize="11px",m.innerHTML=u.src.substring(0,42)+"...")}var d=a.editor.graph,h,l,n=document.createElement("table");n.style.width=
+"100%";n.style.height="100%";var q=document.createElement("tbody");h=document.createElement("tr");l=document.createElement("td");l.style.verticalAlign="top";l.style.fontSize="10pt";mxUtils.write(l,mxResources.get("paperSize")+":");h.appendChild(l);l=document.createElement("td");l.style.verticalAlign="top";l.style.fontSize="10pt";var c=PageSetupDialog.addPageFormatPanel(l,"pagesetupdialog",d.pageFormat);h.appendChild(l);q.appendChild(h);h=document.createElement("tr");l=document.createElement("td");
+mxUtils.write(l,mxResources.get("background")+":");h.appendChild(l);l=document.createElement("td");l.style.whiteSpace="nowrap";document.createElement("input").setAttribute("type","text");var f=document.createElement("button");f.style.width="18px";f.style.height="18px";f.style.marginRight="20px";f.style.backgroundPosition="center center";f.style.backgroundRepeat="no-repeat";var g=d.background;b();mxEvent.addListener(f,"click",function(c){a.pickColor(g||"none",function(a){g=a;b()});mxEvent.consume(c)});
+l.appendChild(f);mxUtils.write(l,mxResources.get("gridSize")+":");var p=document.createElement("input");p.setAttribute("type","number");p.setAttribute("min","0");p.style.width="40px";p.style.marginLeft="6px";p.value=d.getGridSize();l.appendChild(p);mxEvent.addListener(p,"change",function(){var a=parseInt(p.value);p.value=Math.max(1,isNaN(a)?d.getGridSize():a)});h.appendChild(l);q.appendChild(h);h=document.createElement("tr");l=document.createElement("td");mxUtils.write(l,mxResources.get("image")+
+":");h.appendChild(l);l=document.createElement("td");var m=document.createElement("a");m.style.textDecoration="underline";m.style.cursor="pointer";m.style.color="#a0a0a0";var u=d.backgroundImage;mxEvent.addListener(m,"click",function(c){a.showBackgroundImageDialog(function(a){u=a;e()});mxEvent.consume(c)});e();l.appendChild(m);h.appendChild(l);q.appendChild(h);h=document.createElement("tr");l=document.createElement("td");l.colSpan=2;l.style.paddingTop="16px";l.setAttribute("align","right");var r=
+mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog()});r.className="geBtn";a.editor.cancelFirst&&l.appendChild(r);var k=mxUtils.button(mxResources.get("apply"),function(){a.hideDialog();d.gridSize!==p.value&&d.setGridSize(parseInt(p.value));var f=new ChangePageSetup(a,g,u,c.get());f.ignoreColor=d.background==g;f.ignoreImage=(null!=d.backgroundImage?d.backgroundImage.src:null)===(null!=u?u.src:null);d.pageFormat.width==f.previousFormat.width&&d.pageFormat.height==f.previousFormat.height&&
+f.ignoreColor&&f.ignoreImage||d.model.execute(f)});k.className="geBtn gePrimaryBtn";l.appendChild(k);a.editor.cancelFirst||l.appendChild(r);h.appendChild(l);q.appendChild(h);n.appendChild(q);this.container=n};
+PageSetupDialog.addPageFormatPanel=function(a,b,e,d){function h(a,f,b){if(b||p!=document.activeElement&&m!=document.activeElement){a=!1;for(f=0;f<r.length;f++)b=r[f],x?"custom"==b.key&&(q.value=b.key,x=!1):null!=b.format&&("a4"==b.key?826==e.width?(e=mxRectangle.fromRectangle(e),e.width=827):826==e.height&&(e=mxRectangle.fromRectangle(e),e.height=827):"a5"==b.key&&(584==e.width?(e=mxRectangle.fromRectangle(e),e.width=583):584==e.height&&(e=mxRectangle.fromRectangle(e),e.height=583)),e.width==b.format.width&&
+e.height==b.format.height?(q.value=b.key,l.setAttribute("checked","checked"),l.defaultChecked=!0,l.checked=!0,n.removeAttribute("checked"),n.defaultChecked=!1,n.checked=!1,a=!0):e.width==b.format.height&&e.height==b.format.width&&(q.value=b.key,l.removeAttribute("checked"),l.defaultChecked=!1,l.checked=!1,n.setAttribute("checked","checked"),n.defaultChecked=!0,a=n.checked=!0));a?(c.style.display="",g.style.display="none"):(p.value=e.width/100,m.value=e.height/100,t.setAttribute("selected","selected"),
+l.setAttribute("checked","checked"),l.defaultChecked=!0,c.style.display="none",g.style.display="")}}b="format-"+b;var l=document.createElement("input");l.setAttribute("name",b);l.setAttribute("type","radio");l.setAttribute("value","portrait");var n=document.createElement("input");n.setAttribute("name",b);n.setAttribute("type","radio");n.setAttribute("value","landscape");var q=document.createElement("select");q.style.marginBottom="8px";q.style.width="202px";var c=document.createElement("div");c.style.marginLeft=
+"4px";c.style.width="210px";c.style.height="24px";l.style.marginRight="6px";c.appendChild(l);b=document.createElement("span");b.style.maxWidth="100px";mxUtils.write(b,mxResources.get("portrait"));c.appendChild(b);n.style.marginLeft="10px";n.style.marginRight="6px";c.appendChild(n);var f=document.createElement("span");f.style.width="100px";mxUtils.write(f,mxResources.get("landscape"));c.appendChild(f);var g=document.createElement("div");g.style.marginLeft="4px";g.style.width="210px";g.style.height=
+"24px";var p=document.createElement("input");p.setAttribute("size","7");p.setAttribute("value",e.width);p.style.textAlign="right";g.appendChild(p);mxUtils.write(g," in x ");var m=document.createElement("input");m.setAttribute("size","7");m.setAttribute("value",e.height);m.style.textAlign="right";g.appendChild(m);mxUtils.write(g," in");c.style.display="none";g.style.display="none";for(var u={},r=PageSetupDialog.getFormats(),k=0;k<r.length;k++){var v=r[k];u[v.key]=v;var t=document.createElement("option");
+t.setAttribute("value",v.key);mxUtils.write(t,v.title);q.appendChild(t)}var x=!1;h();a.appendChild(q);mxUtils.br(a);a.appendChild(c);a.appendChild(g);var w=e,D=function(){var a=u[q.value];null!=a.format?(p.value=a.format.width/100,m.value=a.format.height/100,g.style.display="none",c.style.display=""):(c.style.display="none",g.style.display="");a=new mxRectangle(0,0,Math.floor(100*parseFloat(p.value)),Math.floor(100*parseFloat(m.value)));"custom"!=q.value&&n.checked&&(a=new mxRectangle(0,0,a.height,
+a.width));if(a.width!=w.width||a.height!=w.height)w=a,null!=d&&d(w)};mxEvent.addListener(b,"click",function(a){l.checked=!0;D();mxEvent.consume(a)});mxEvent.addListener(f,"click",function(a){n.checked=!0;D();mxEvent.consume(a)});mxEvent.addListener(p,"blur",D);mxEvent.addListener(p,"click",D);mxEvent.addListener(m,"blur",D);mxEvent.addListener(m,"click",D);mxEvent.addListener(n,"change",D);mxEvent.addListener(l,"change",D);mxEvent.addListener(q,"change",function(){x="custom"==q.value;D()});D();return{set:function(a){e=
+a;h(null,null,!0)},get:function(){return w},widthInput:p,heightInput:m}};
 PageSetupDialog.getFormats=function(){return[{key:"letter",title:'US-Letter (8,5" x 11")',format:mxConstants.PAGE_FORMAT_LETTER_PORTRAIT},{key:"legal",title:'US-Legal (8,5" x 14")',format:new mxRectangle(0,0,850,1400)},{key:"tabloid",title:"US-Tabloid (279 mm x 432 mm)",format:new mxRectangle(0,0,1100,1700)},{key:"a0",title:"A0 (841 mm x 1189 mm)",format:new mxRectangle(0,0,3300,4681)},{key:"a1",title:"A1 (594 mm x 841 mm)",format:new mxRectangle(0,0,2339,3300)},{key:"a2",title:"A2 (420 mm x 594 mm)",
 format:new mxRectangle(0,0,1654,2336)},{key:"a3",title:"A3 (297 mm x 420 mm)",format:new mxRectangle(0,0,1169,1654)},{key:"a4",title:"A4 (210 mm x 297 mm)",format:mxConstants.PAGE_FORMAT_A4_PORTRAIT},{key:"a5",title:"A5 (148 mm x 210 mm)",format:new mxRectangle(0,0,583,827)},{key:"a6",title:"A6 (105 mm x 148 mm)",format:new mxRectangle(0,0,413,583)},{key:"a7",title:"A7 (74 mm x 105 mm)",format:new mxRectangle(0,0,291,413)},{key:"custom",title:mxResources.get("custom"),format:null}]};
 (function(){mxGraphView.prototype.validateBackgroundPage=function(){var a=this.graph;if(null!=a.container&&!a.transparentBackground){if(a.pageVisible){var c=this.getBackgroundPageBounds();if(null==this.backgroundPageShape){for(var f=a.container.firstChild;null!=f&&f.nodeType!=mxConstants.NODETYPE_ELEMENT;)f=f.nextSibling;null!=f&&(this.backgroundPageShape=this.createBackgroundPageShape(c),this.backgroundPageShape.scale=1,this.backgroundPageShape.isShadow=!mxClient.IS_QUIRKS,this.backgroundPageShape.dialect=
@@ -1985,31 +1985,31 @@ null);this.validateBackgroundStyles()}};mxGraphView.prototype.validateBackground
 "geDiagramContainer geDiagramBackdrop",f.style.backgroundImage="none",f.style.backgroundColor=""):(a.container.className="geDiagramContainer",f.style.backgroundPosition=d,f.style.backgroundColor=c,f.style.backgroundImage=b)};mxGraphView.prototype.createSvgGrid=function(a){for(var c=this.graph.gridSize*this.scale;c<this.minGridSize;)c*=2;for(var f=this.gridSteps*c,b=[],d=1;d<this.gridSteps;d++){var e=d*c;b.push("M 0 "+e+" L "+f+" "+e+" M "+e+" 0 L "+e+" "+f)}return'<svg width="'+f+'" height="'+f+'" xmlns="'+
 mxConstants.NS_SVG+'"><defs><pattern id="grid" width="'+f+'" height="'+f+'" patternUnits="userSpaceOnUse"><path d="'+b.join(" ")+'" fill="none" stroke="'+a+'" opacity="0.2" stroke-width="1"/><path d="M '+f+" 0 L 0 0 0 "+f+'" fill="none" stroke="'+a+'" stroke-width="1"/></pattern></defs><rect width="100%" height="100%" fill="url(#grid)"/></svg>'};var a=mxGraph.prototype.panGraph;mxGraph.prototype.panGraph=function(b,c){a.apply(this,arguments);if(null!=this.shiftPreview1){var f=this.view.canvas;null!=
 f.ownerSVGElement&&(f=f.ownerSVGElement);var d=this.gridSize*this.view.scale*this.view.gridSteps,d=-Math.round(d-mxUtils.mod(this.view.translate.x*this.view.scale+b,d))+"px "+-Math.round(d-mxUtils.mod(this.view.translate.y*this.view.scale+c,d))+"px";f.style.backgroundPosition=d}};mxGraph.prototype.updatePageBreaks=function(a,c,f){var b=this.view.scale,d=this.view.translate,e=this.pageFormat,u=b*this.pageScale,r=this.view.getBackgroundPageBounds();c=r.width;f=r.height;var k=new mxRectangle(b*d.x,b*
-d.y,e.width*u,e.height*u),t=(a=a&&Math.min(k.width,k.height)>this.minPageBreakDist)?Math.ceil(f/k.height)-1:0,v=a?Math.ceil(c/k.width)-1:0,q=r.x+c,g=r.y+f;null==this.horizontalPageBreaks&&0<t&&(this.horizontalPageBreaks=[]);null==this.verticalPageBreaks&&0<v&&(this.verticalPageBreaks=[]);a=mxUtils.bind(this,function(a){if(null!=a){for(var c=a==this.horizontalPageBreaks?t:v,f=0;f<=c;f++){var b=a==this.horizontalPageBreaks?[new mxPoint(Math.round(r.x),Math.round(r.y+(f+1)*k.height)),new mxPoint(Math.round(q),
-Math.round(r.y+(f+1)*k.height))]:[new mxPoint(Math.round(r.x+(f+1)*k.width),Math.round(r.y)),new mxPoint(Math.round(r.x+(f+1)*k.width),Math.round(g))];null!=a[f]?(a[f].points=b,a[f].redraw()):(b=new mxPolyline(b,this.pageBreakColor),b.dialect=this.dialect,b.isDashed=this.pageBreakDashed,b.pointerEvents=!1,b.init(this.view.backgroundPane),b.redraw(),a[f]=b)}for(f=c;f<a.length;f++)a[f].destroy();a.splice(c,a.length-c)}});a(this.horizontalPageBreaks);a(this.verticalPageBreaks)};var b=mxGraphHandler.prototype.shouldRemoveCellsFromParent;
+d.y,e.width*u,e.height*u),v=(a=a&&Math.min(k.width,k.height)>this.minPageBreakDist)?Math.ceil(f/k.height)-1:0,t=a?Math.ceil(c/k.width)-1:0,q=r.x+c,h=r.y+f;null==this.horizontalPageBreaks&&0<v&&(this.horizontalPageBreaks=[]);null==this.verticalPageBreaks&&0<t&&(this.verticalPageBreaks=[]);a=mxUtils.bind(this,function(a){if(null!=a){for(var c=a==this.horizontalPageBreaks?v:t,f=0;f<=c;f++){var b=a==this.horizontalPageBreaks?[new mxPoint(Math.round(r.x),Math.round(r.y+(f+1)*k.height)),new mxPoint(Math.round(q),
+Math.round(r.y+(f+1)*k.height))]:[new mxPoint(Math.round(r.x+(f+1)*k.width),Math.round(r.y)),new mxPoint(Math.round(r.x+(f+1)*k.width),Math.round(h))];null!=a[f]?(a[f].points=b,a[f].redraw()):(b=new mxPolyline(b,this.pageBreakColor),b.dialect=this.dialect,b.isDashed=this.pageBreakDashed,b.pointerEvents=!1,b.init(this.view.backgroundPane),b.redraw(),a[f]=b)}for(f=c;f<a.length;f++)a[f].destroy();a.splice(c,a.length-c)}});a(this.horizontalPageBreaks);a(this.verticalPageBreaks)};var b=mxGraphHandler.prototype.shouldRemoveCellsFromParent;
 mxGraphHandler.prototype.shouldRemoveCellsFromParent=function(a,c,f){for(var d=0;d<c.length;d++)if(this.graph.getModel().isVertex(c[d])){var e=this.graph.getCellGeometry(c[d]);if(null!=e&&e.relative)return!1}return b.apply(this,arguments)};var e=mxConnectionHandler.prototype.createMarker;mxConnectionHandler.prototype.createMarker=function(){var a=e.apply(this,arguments);a.intersects=mxUtils.bind(this,function(c,f){return this.isConnecting()?!0:mxCellMarker.prototype.intersects.apply(a,arguments)});
 return a};mxGraphView.prototype.createBackgroundPageShape=function(a){return new mxRectangleShape(a,"#ffffff","#cacaca")};mxGraphView.prototype.getBackgroundPageBounds=function(){var a=this.getGraphBounds(),c=0<a.width?a.x/this.scale-this.translate.x:0,f=0<a.height?a.y/this.scale-this.translate.y:0,b=this.graph.pageFormat,d=this.graph.pageScale,e=b.width*d,b=b.height*d,d=Math.floor(Math.min(0,c)/e),u=Math.floor(Math.min(0,f)/b);return new mxRectangle(this.scale*(this.translate.x+d*e),this.scale*(this.translate.y+
-u*b),this.scale*(Math.ceil(Math.max(1,c+a.width/this.scale)/e)-d)*e,this.scale*(Math.ceil(Math.max(1,f+a.height/this.scale)/b)-u)*b)};var d=mxGraph.prototype.panGraph;mxGraph.prototype.panGraph=function(a,c){d.apply(this,arguments);this.dialect==mxConstants.DIALECT_SVG||null==this.view.backgroundPageShape||this.useScrollbarsForPanning&&mxUtils.hasScrollbars(this.container)||(this.view.backgroundPageShape.node.style.marginLeft=a+"px",this.view.backgroundPageShape.node.style.marginTop=c+"px")};var g=
-mxPopupMenu.prototype.addItem;mxPopupMenu.prototype.addItem=function(a,c,f,b,d,e){var h=g.apply(this,arguments);null==e||e||mxEvent.addListener(h,"mousedown",function(a){mxEvent.consume(a)});return h};var l=mxGraphHandler.prototype.getInitialCellForEvent;mxGraphHandler.prototype.getInitialCellForEvent=function(a){var c=this.graph.getModel(),f=c.getParent(this.graph.getSelectionCell()),b=l.apply(this,arguments),d=c.getParent(b);if(null==f||f!=b&&f!=d)for(;!this.graph.isCellSelected(b)&&!this.graph.isCellSelected(d)&&
-c.isVertex(d)&&!this.graph.isContainer(d);)b=d,d=this.graph.getModel().getParent(b);return b};var p=mxGraphHandler.prototype.isDelayedSelection;mxGraphHandler.prototype.isDelayedSelection=function(a,c){var f=p.apply(this,arguments);if(!f)for(var b=this.graph.getModel(),d=b.getParent(a);null!=d;){if(this.graph.isCellSelected(d)&&b.isVertex(d)){f=!0;break}d=b.getParent(d)}return f};mxGraphHandler.prototype.selectDelayed=function(a){if(!this.graph.popupMenuHandler.isPopupTrigger(a)){var c=a.getCell();
+u*b),this.scale*(Math.ceil(Math.max(1,c+a.width/this.scale)/e)-d)*e,this.scale*(Math.ceil(Math.max(1,f+a.height/this.scale)/b)-u)*b)};var d=mxGraph.prototype.panGraph;mxGraph.prototype.panGraph=function(a,c){d.apply(this,arguments);this.dialect==mxConstants.DIALECT_SVG||null==this.view.backgroundPageShape||this.useScrollbarsForPanning&&mxUtils.hasScrollbars(this.container)||(this.view.backgroundPageShape.node.style.marginLeft=a+"px",this.view.backgroundPageShape.node.style.marginTop=c+"px")};var h=
+mxPopupMenu.prototype.addItem;mxPopupMenu.prototype.addItem=function(a,c,f,b,d,e){var g=h.apply(this,arguments);null==e||e||mxEvent.addListener(g,"mousedown",function(a){mxEvent.consume(a)});return g};var l=mxGraphHandler.prototype.getInitialCellForEvent;mxGraphHandler.prototype.getInitialCellForEvent=function(a){var c=this.graph.getModel(),f=c.getParent(this.graph.getSelectionCell()),b=l.apply(this,arguments),d=c.getParent(b);if(null==f||f!=b&&f!=d)for(;!this.graph.isCellSelected(b)&&!this.graph.isCellSelected(d)&&
+c.isVertex(d)&&!this.graph.isContainer(d);)b=d,d=this.graph.getModel().getParent(b);return b};var n=mxGraphHandler.prototype.isDelayedSelection;mxGraphHandler.prototype.isDelayedSelection=function(a,c){var f=n.apply(this,arguments);if(!f)for(var b=this.graph.getModel(),d=b.getParent(a);null!=d;){if(this.graph.isCellSelected(d)&&b.isVertex(d)){f=!0;break}d=b.getParent(d)}return f};mxGraphHandler.prototype.selectDelayed=function(a){if(!this.graph.popupMenuHandler.isPopupTrigger(a)){var c=a.getCell();
 null==c&&(c=this.cell);var f=this.graph.view.getState(c);if(null==f||!a.isSource(f.control))for(var f=this.graph.getModel(),b=f.getParent(c);!this.graph.isCellSelected(b)&&f.isVertex(b);)c=b,b=f.getParent(c);this.graph.selectCellForEvent(c,a.getEvent())}};mxPopupMenuHandler.prototype.getCellForPopupEvent=function(a){a=a.getCell();for(var c=this.graph.getModel(),b=c.getParent(a);c.isVertex(b)&&!this.graph.isContainer(b);)this.graph.isCellSelected(b)&&(a=b),b=c.getParent(b);return a}})();EditorUi=function(a,b,e){mxEventSource.call(this);this.destroyFunctions=[];this.editor=a||new Editor;this.container=b||document.body;var d=this.editor.graph;d.lightbox=e;mxClient.IS_SVG?mxPopupMenu.prototype.submenuImage="data:image/gif;base64,R0lGODlhCQAJAIAAAP///zMzMyH5BAEAAAAALAAAAAAJAAkAAAIPhI8WebHsHopSOVgb26AAADs=":(new Image).src=mxPopupMenu.prototype.submenuImage;mxClient.IS_SVG||null==mxConnectionHandler.prototype.connectImage||((new Image).src=mxConnectionHandler.prototype.connectImage.src);
 this.editor.chromeless&&!this.editor.editable&&(this.footerHeight=0,d.isEnabled=function(){return!1},d.panningHandler.isForcePanningEvent=function(a){return!mxEvent.isPopupTrigger(a.getEvent())});this.actions=new Actions(this);this.menus=this.createMenus();this.createDivs();this.createUi();this.refresh();b=mxUtils.bind(this,function(a){null==a&&(a=window.event);return this.isSelectionAllowed(a)||d.isEditing()});this.container==document.body&&(this.menubarContainer.onselectstart=b,this.menubarContainer.onmousedown=
 b,this.toolbarContainer.onselectstart=b,this.toolbarContainer.onmousedown=b,this.diagramContainer.onselectstart=b,this.diagramContainer.onmousedown=b,this.sidebarContainer.onselectstart=b,this.sidebarContainer.onmousedown=b,this.formatContainer.onselectstart=b,this.formatContainer.onmousedown=b,this.footerContainer.onselectstart=b,this.footerContainer.onmousedown=b,null!=this.tabContainer&&(this.tabContainer.onselectstart=b));!this.editor.chromeless||this.editor.editable?mxClient.IS_IE&&("undefined"===
 typeof document.documentMode||9>document.documentMode)?mxEvent.addListener(this.diagramContainer,"contextmenu",b):this.diagramContainer.oncontextmenu=b:d.panningHandler.usePopupTrigger=!1;d.init(this.diagramContainer);this.hoverIcons=this.createHoverIcons();mxEvent.addListener(this.diagramContainer,"mousemove",mxUtils.bind(this,function(a){var c=mxUtils.getOffset(this.diagramContainer);0<mxEvent.getClientX(a)-c.x-this.diagramContainer.clientWidth||0<mxEvent.getClientY(a)-c.y-this.diagramContainer.clientHeight?
-this.diagramContainer.setAttribute("title",mxResources.get("panTooltip")):this.diagramContainer.removeAttribute("title")}));var g=!1,l=this.hoverIcons.isResetEvent;this.hoverIcons.isResetEvent=function(a,c){return g||l.apply(this,arguments)};this.keydownHandler=mxUtils.bind(this,function(a){32==a.which?(g=!0,this.hoverIcons.reset(),d.container.style.cursor="move",d.isEditing()||mxEvent.getSource(a)!=d.container||mxEvent.consume(a)):mxEvent.isConsumed(a)||27!=a.keyCode||this.hideDialog()});mxEvent.addListener(document,
-"keydown",this.keydownHandler);this.keyupHandler=mxUtils.bind(this,function(a){d.container.style.cursor="";g=!1});mxEvent.addListener(document,"keyup",this.keyupHandler);var p=d.panningHandler.isForcePanningEvent;d.panningHandler.isForcePanningEvent=function(a){return p.apply(this,arguments)||g||mxEvent.isMouseEvent(a.getEvent())&&(this.usePopupTrigger||!mxEvent.isPopupTrigger(a.getEvent()))&&(!mxEvent.isControlDown(a.getEvent())&&mxEvent.isRightMouseButton(a.getEvent())||mxEvent.isMiddleMouseButton(a.getEvent()))};
-var q=d.cellEditor.isStopEditingEvent;d.cellEditor.isStopEditingEvent=function(a){return q.apply(this,arguments)||13==a.keyCode&&(!mxClient.IS_SF&&mxEvent.isControlDown(a)||mxClient.IS_MAC&&mxEvent.isMetaDown(a)||mxClient.IS_SF&&mxEvent.isShiftDown(a))};var c=!1,f=null,h=null,m=null,n=mxUtils.bind(this,function(){if(null!=this.toolbar&&c!=d.cellEditor.isContentEditing()){for(var a=this.toolbar.container.firstChild,b=[];null!=a;){var e=a.nextSibling;0>mxUtils.indexOf(this.toolbar.staticElements,a)&&
-(a.parentNode.removeChild(a),b.push(a));a=e}a=this.toolbar.fontMenu;e=this.toolbar.sizeMenu;if(null==m)this.toolbar.createTextToolbar();else{for(var k=0;k<m.length;k++)this.toolbar.container.appendChild(m[k]);this.toolbar.fontMenu=f;this.toolbar.sizeMenu=h}c=d.cellEditor.isContentEditing();f=a;h=e;m=b}}),u=this,r=d.cellEditor.startEditing;d.cellEditor.startEditing=function(){r.apply(this,arguments);n();if(d.cellEditor.isContentEditing()){var a=!1,c=function(){a||(a=!0,window.setTimeout(function(){for(var c=
+this.diagramContainer.setAttribute("title",mxResources.get("panTooltip")):this.diagramContainer.removeAttribute("title")}));var h=!1,l=this.hoverIcons.isResetEvent;this.hoverIcons.isResetEvent=function(a,c){return h||l.apply(this,arguments)};this.keydownHandler=mxUtils.bind(this,function(a){32==a.which?(h=!0,this.hoverIcons.reset(),d.container.style.cursor="move",d.isEditing()||mxEvent.getSource(a)!=d.container||mxEvent.consume(a)):mxEvent.isConsumed(a)||27!=a.keyCode||this.hideDialog()});mxEvent.addListener(document,
+"keydown",this.keydownHandler);this.keyupHandler=mxUtils.bind(this,function(a){d.container.style.cursor="";h=!1});mxEvent.addListener(document,"keyup",this.keyupHandler);var n=d.panningHandler.isForcePanningEvent;d.panningHandler.isForcePanningEvent=function(a){return n.apply(this,arguments)||h||mxEvent.isMouseEvent(a.getEvent())&&(this.usePopupTrigger||!mxEvent.isPopupTrigger(a.getEvent()))&&(!mxEvent.isControlDown(a.getEvent())&&mxEvent.isRightMouseButton(a.getEvent())||mxEvent.isMiddleMouseButton(a.getEvent()))};
+var q=d.cellEditor.isStopEditingEvent;d.cellEditor.isStopEditingEvent=function(a){return q.apply(this,arguments)||13==a.keyCode&&(!mxClient.IS_SF&&mxEvent.isControlDown(a)||mxClient.IS_MAC&&mxEvent.isMetaDown(a)||mxClient.IS_SF&&mxEvent.isShiftDown(a))};var c=!1,f=null,g=null,p=null,m=mxUtils.bind(this,function(){if(null!=this.toolbar&&c!=d.cellEditor.isContentEditing()){for(var a=this.toolbar.container.firstChild,b=[];null!=a;){var e=a.nextSibling;0>mxUtils.indexOf(this.toolbar.staticElements,a)&&
+(a.parentNode.removeChild(a),b.push(a));a=e}a=this.toolbar.fontMenu;e=this.toolbar.sizeMenu;if(null==p)this.toolbar.createTextToolbar();else{for(var k=0;k<p.length;k++)this.toolbar.container.appendChild(p[k]);this.toolbar.fontMenu=f;this.toolbar.sizeMenu=g}c=d.cellEditor.isContentEditing();f=a;g=e;p=b}}),u=this,r=d.cellEditor.startEditing;d.cellEditor.startEditing=function(){r.apply(this,arguments);m();if(d.cellEditor.isContentEditing()){var a=!1,c=function(){a||(a=!0,window.setTimeout(function(){for(var c=
 d.getSelectedElement();null!=c&&c.nodeType!=mxConstants.NODETYPE_ELEMENT;)c=c.parentNode;if(null!=c&&(c=mxUtils.getCurrentStyle(c),null!=c&&null!=u.toolbar)){var b=c.fontFamily;"'"==b.charAt(0)&&(b=b.substring(1));"'"==b.charAt(b.length-1)&&(b=b.substring(0,b.length-1));u.toolbar.setFontName(b);u.toolbar.setFontSize(parseInt(c.fontSize))}a=!1},0))};mxEvent.addListener(d.cellEditor.textarea,"input",c);mxEvent.addListener(d.cellEditor.textarea,"touchend",c);mxEvent.addListener(d.cellEditor.textarea,
-"mouseup",c);mxEvent.addListener(d.cellEditor.textarea,"keyup",c);c()}};var k=d.cellEditor.stopEditing;d.cellEditor.stopEditing=function(a,c){k.apply(this,arguments);n()};d.container.setAttribute("tabindex","0");d.container.style.cursor="default";if(window.self===window.top&&null!=d.container.parentNode)try{d.container.focus()}catch(C){}var t=d.fireMouseEvent;d.fireMouseEvent=function(a,c,b){a==mxEvent.MOUSE_DOWN&&this.container.focus();t.apply(this,arguments)};d.popupMenuHandler.autoExpand=!0;null!=
-this.menus&&(d.popupMenuHandler.factoryMethod=mxUtils.bind(this,function(a,c,b){this.menus.createPopupMenu(a,c,b)}));mxEvent.addGestureListeners(document,mxUtils.bind(this,function(a){d.popupMenuHandler.hideMenu()}));this.keyHandler=this.createKeyHandler(a);this.getKeyHandler=function(){return keyHandler};var v="rounded shadow glass dashed dashPattern comic labelBackgroundColor".split(" "),x="shape edgeStyle curved rounded elbow comic jumpStyle jumpSize".split(" ");this.setDefaultStyle=function(a){var c=
-d.view.getState(a);if(null!=c){a=a.clone();a.style="";a=d.getCellStyle(a);var b=[],f=[],h;for(h in c.style)a[h]!=c.style[h]&&(b.push(c.style[h]),f.push(h));h=d.getModel().getStyle(c.cell);for(var e=null!=h?h.split(";"):[],k=0;k<e.length;k++){var m=e[k],n=m.indexOf("=");0<=n&&(h=m.substring(0,n),m=m.substring(n+1),null!=a[h]&&"none"==m&&(b.push(m),f.push(h)))}d.getModel().isEdge(c.cell)?d.currentEdgeStyle={}:d.currentVertexStyle={};this.fireEvent(new mxEventObject("styleChanged","keys",f,"values",
-b,"cells",[c.cell]))}};this.clearDefaultStyle=function(){d.currentEdgeStyle=mxUtils.clone(d.defaultEdgeStyle);d.currentVertexStyle=mxUtils.clone(d.defaultVertexStyle);this.fireEvent(new mxEventObject("styleChanged","keys",[],"values",[],"cells",[]))};var w=["fontFamily","fontSize","fontColor"],D="edgeStyle startArrow startFill startSize endArrow endFill endSize jettySize orthogonalLoop".split(" "),B=["startArrow startFill startSize endArrow endFill endSize jettySize orthogonalLoop".split(" "),["strokeColor",
-"strokeWidth"],["fillColor","gradientColor"],w,["align"],["html"]];for(a=0;a<B.length;a++)for(b=0;b<B[a].length;b++)v.push(B[a][b]);for(a=0;a<x.length;a++)0>mxUtils.indexOf(v,x[a])&&v.push(x[a]);var y=function(a,c){d.getModel().beginUpdate();try{if(c)for(var b=d.getModel().isEdge(k),f=b?d.currentEdgeStyle:d.currentVertexStyle,b=["fontSize","fontFamily","fontColor"],h=0;h<b.length;h++){var e=f[b[h]];null!=e&&d.setCellStyles(b[h],e,a)}else for(e=0;e<a.length;e++){for(var k=a[e],m=d.getModel().getStyle(k),
-n=null!=m?m.split(";"):[],r=v.slice(),h=0;h<n.length;h++){var t=n[h],G=t.indexOf("=");if(0<=G){var u=t.substring(0,G),g=mxUtils.indexOf(r,u);0<=g&&r.splice(g,1);for(var q=0;q<B.length;q++){var l=B[q];if(0<=mxUtils.indexOf(l,u))for(var p=0;p<l.length;p++){var D=mxUtils.indexOf(r,l[p]);0<=D&&r.splice(D,1)}}}}f=(b=d.getModel().isEdge(k))?d.currentEdgeStyle:d.currentVertexStyle;for(h=0;h<r.length;h++){var u=r[h],w=f[u];null==w||"shape"==u&&!b||(!b||0>mxUtils.indexOf(x,u))&&d.setCellStyles(u,w,[k])}}}finally{d.getModel().endUpdate()}};
-d.addListener("cellsInserted",function(a,c){y(c.getProperty("cells"))});d.addListener("textInserted",function(a,c){y(c.getProperty("cells"),!0)});d.connectionHandler.addListener(mxEvent.CONNECT,function(a,c){var b=[c.getProperty("cell")];c.getProperty("terminalInserted")&&b.push(c.getProperty("terminal"));y(b)});this.addListener("styleChanged",mxUtils.bind(this,function(a,c){var b=c.getProperty("cells"),f=!1,h=!1;if(0<b.length)for(var e=0;e<b.length&&(f=d.getModel().isVertex(b[e])||f,!(h=d.getModel().isEdge(b[e])||
-h)||!f);e++);else h=f=!0;for(var b=c.getProperty("keys"),k=c.getProperty("values"),e=0;e<b.length;e++){var m=0<=mxUtils.indexOf(w,b[e]);if("strokeColor"!=b[e]||null!=k[e]&&"none"!=k[e])if(0<=mxUtils.indexOf(x,b[e]))h||0<=mxUtils.indexOf(D,b[e])?null==k[e]?delete d.currentEdgeStyle[b[e]]:d.currentEdgeStyle[b[e]]=k[e]:f&&0<=mxUtils.indexOf(v,b[e])&&(null==k[e]?delete d.currentVertexStyle[b[e]]:d.currentVertexStyle[b[e]]=k[e]);else if(0<=mxUtils.indexOf(v,b[e])){if(f||m)null==k[e]?delete d.currentVertexStyle[b[e]]:
-d.currentVertexStyle[b[e]]=k[e];if(h||m||0<=mxUtils.indexOf(D,b[e]))null==k[e]?delete d.currentEdgeStyle[b[e]]:d.currentEdgeStyle[b[e]]=k[e]}}null!=this.toolbar&&(this.toolbar.setFontName(d.currentVertexStyle.fontFamily||Menus.prototype.defaultFont),this.toolbar.setFontSize(d.currentVertexStyle.fontSize||Menus.prototype.defaultFontSize),null!=this.toolbar.edgeStyleMenu&&(this.toolbar.edgeStyleMenu.getElementsByTagName("div")[0].className="orthogonalEdgeStyle"==d.currentEdgeStyle.edgeStyle&&"1"==d.currentEdgeStyle.curved?
+"mouseup",c);mxEvent.addListener(d.cellEditor.textarea,"keyup",c);c()}};var k=d.cellEditor.stopEditing;d.cellEditor.stopEditing=function(a,c){k.apply(this,arguments);m()};d.container.setAttribute("tabindex","0");d.container.style.cursor="default";if(window.self===window.top&&null!=d.container.parentNode)try{d.container.focus()}catch(C){}var v=d.fireMouseEvent;d.fireMouseEvent=function(a,c,b){a==mxEvent.MOUSE_DOWN&&this.container.focus();v.apply(this,arguments)};d.popupMenuHandler.autoExpand=!0;null!=
+this.menus&&(d.popupMenuHandler.factoryMethod=mxUtils.bind(this,function(a,c,b){this.menus.createPopupMenu(a,c,b)}));mxEvent.addGestureListeners(document,mxUtils.bind(this,function(a){d.popupMenuHandler.hideMenu()}));this.keyHandler=this.createKeyHandler(a);this.getKeyHandler=function(){return keyHandler};var t="rounded shadow glass dashed dashPattern comic labelBackgroundColor".split(" "),x="shape edgeStyle curved rounded elbow comic jumpStyle jumpSize".split(" ");this.setDefaultStyle=function(a){var c=
+d.view.getState(a);if(null!=c){a=a.clone();a.style="";a=d.getCellStyle(a);var b=[],f=[],g;for(g in c.style)a[g]!=c.style[g]&&(b.push(c.style[g]),f.push(g));g=d.getModel().getStyle(c.cell);for(var e=null!=g?g.split(";"):[],k=0;k<e.length;k++){var p=e[k],m=p.indexOf("=");0<=m&&(g=p.substring(0,m),p=p.substring(m+1),null!=a[g]&&"none"==p&&(b.push(p),f.push(g)))}d.getModel().isEdge(c.cell)?d.currentEdgeStyle={}:d.currentVertexStyle={};this.fireEvent(new mxEventObject("styleChanged","keys",f,"values",
+b,"cells",[c.cell]))}};this.clearDefaultStyle=function(){d.currentEdgeStyle=mxUtils.clone(d.defaultEdgeStyle);d.currentVertexStyle=mxUtils.clone(d.defaultVertexStyle);this.fireEvent(new mxEventObject("styleChanged","keys",[],"values",[],"cells",[]))};var w=["fontFamily","fontSize","fontColor"],D="edgeStyle startArrow startFill startSize endArrow endFill endSize jettySize orthogonalLoop".split(" "),A=["startArrow startFill startSize endArrow endFill endSize jettySize orthogonalLoop".split(" "),["strokeColor",
+"strokeWidth"],["fillColor","gradientColor"],w,["align"],["html"]];for(a=0;a<A.length;a++)for(b=0;b<A[a].length;b++)t.push(A[a][b]);for(a=0;a<x.length;a++)0>mxUtils.indexOf(t,x[a])&&t.push(x[a]);var z=function(a,c){d.getModel().beginUpdate();try{if(c)for(var b=d.getModel().isEdge(k),f=b?d.currentEdgeStyle:d.currentVertexStyle,b=["fontSize","fontFamily","fontColor"],g=0;g<b.length;g++){var e=f[b[g]];null!=e&&d.setCellStyles(b[g],e,a)}else for(e=0;e<a.length;e++){for(var k=a[e],p=d.getModel().getStyle(k),
+m=null!=p?p.split(";"):[],r=t.slice(),g=0;g<m.length;g++){var v=m[g],H=v.indexOf("=");if(0<=H){var u=v.substring(0,H),h=mxUtils.indexOf(r,u);0<=h&&r.splice(h,1);for(var q=0;q<A.length;q++){var l=A[q];if(0<=mxUtils.indexOf(l,u))for(var n=0;n<l.length;n++){var D=mxUtils.indexOf(r,l[n]);0<=D&&r.splice(D,1)}}}}f=(b=d.getModel().isEdge(k))?d.currentEdgeStyle:d.currentVertexStyle;for(g=0;g<r.length;g++){var u=r[g],w=f[u];null==w||"shape"==u&&!b||(!b||0>mxUtils.indexOf(x,u))&&d.setCellStyles(u,w,[k])}}}finally{d.getModel().endUpdate()}};
+d.addListener("cellsInserted",function(a,c){z(c.getProperty("cells"))});d.addListener("textInserted",function(a,c){z(c.getProperty("cells"),!0)});d.connectionHandler.addListener(mxEvent.CONNECT,function(a,c){var b=[c.getProperty("cell")];c.getProperty("terminalInserted")&&b.push(c.getProperty("terminal"));z(b)});this.addListener("styleChanged",mxUtils.bind(this,function(a,c){var b=c.getProperty("cells"),f=!1,g=!1;if(0<b.length)for(var e=0;e<b.length&&(f=d.getModel().isVertex(b[e])||f,!(g=d.getModel().isEdge(b[e])||
+g)||!f);e++);else g=f=!0;for(var b=c.getProperty("keys"),k=c.getProperty("values"),e=0;e<b.length;e++){var p=0<=mxUtils.indexOf(w,b[e]);if("strokeColor"!=b[e]||null!=k[e]&&"none"!=k[e])if(0<=mxUtils.indexOf(x,b[e]))g||0<=mxUtils.indexOf(D,b[e])?null==k[e]?delete d.currentEdgeStyle[b[e]]:d.currentEdgeStyle[b[e]]=k[e]:f&&0<=mxUtils.indexOf(t,b[e])&&(null==k[e]?delete d.currentVertexStyle[b[e]]:d.currentVertexStyle[b[e]]=k[e]);else if(0<=mxUtils.indexOf(t,b[e])){if(f||p)null==k[e]?delete d.currentVertexStyle[b[e]]:
+d.currentVertexStyle[b[e]]=k[e];if(g||p||0<=mxUtils.indexOf(D,b[e]))null==k[e]?delete d.currentEdgeStyle[b[e]]:d.currentEdgeStyle[b[e]]=k[e]}}null!=this.toolbar&&(this.toolbar.setFontName(d.currentVertexStyle.fontFamily||Menus.prototype.defaultFont),this.toolbar.setFontSize(d.currentVertexStyle.fontSize||Menus.prototype.defaultFontSize),null!=this.toolbar.edgeStyleMenu&&(this.toolbar.edgeStyleMenu.getElementsByTagName("div")[0].className="orthogonalEdgeStyle"==d.currentEdgeStyle.edgeStyle&&"1"==d.currentEdgeStyle.curved?
 "geSprite geSprite-curved":"straight"==d.currentEdgeStyle.edgeStyle||"none"==d.currentEdgeStyle.edgeStyle||null==d.currentEdgeStyle.edgeStyle?"geSprite geSprite-straight":"entityRelationEdgeStyle"==d.currentEdgeStyle.edgeStyle?"geSprite geSprite-entity":"elbowEdgeStyle"==d.currentEdgeStyle.edgeStyle?"geSprite geSprite-"+("vertical"==d.currentEdgeStyle.elbow?"verticalelbow":"horizontalelbow"):"isometricEdgeStyle"==d.currentEdgeStyle.edgeStyle?"geSprite geSprite-"+("vertical"==d.currentEdgeStyle.elbow?
 "verticalisometric":"horizontalisometric"):"geSprite geSprite-orthogonal"),null!=this.toolbar.edgeShapeMenu&&(this.toolbar.edgeShapeMenu.getElementsByTagName("div")[0].className="link"==d.currentEdgeStyle.shape?"geSprite geSprite-linkedge":"flexArrow"==d.currentEdgeStyle.shape?"geSprite geSprite-arrow":"arrow"==d.currentEdgeStyle.shape?"geSprite geSprite-simplearrow":"geSprite geSprite-connection"),null!=this.toolbar.lineStartMenu&&(this.toolbar.lineStartMenu.getElementsByTagName("div")[0].className=
 this.getCssClassForMarker("start",d.currentEdgeStyle.shape,d.currentEdgeStyle[mxConstants.STYLE_STARTARROW],mxUtils.getValue(d.currentEdgeStyle,"startFill","1"))),null!=this.toolbar.lineEndMenu&&(this.toolbar.lineEndMenu.getElementsByTagName("div")[0].className=this.getCssClassForMarker("end",d.currentEdgeStyle.shape,d.currentEdgeStyle[mxConstants.STYLE_ENDARROW],mxUtils.getValue(d.currentEdgeStyle,"endFill","1"))))}));null!=this.toolbar&&(a=mxUtils.bind(this,function(){var a=d.currentVertexStyle.fontFamily||
@@ -2028,30 +2028,31 @@ a+"openthin":e==mxConstants.ARROW_BLOCK?"1"==d?"geSprite geSprite-"+a+"block":"g
 a+"ermany":"ERoneToMany"==e?"geSprite geSprite-"+a+"eronetomany":"ERzeroToOne"==e?"geSprite geSprite-"+a+"eroneopt":"ERzeroToMany"==e?"geSprite geSprite-"+a+"ermanyopt":"geSprite geSprite-noarrow"};EditorUi.prototype.createMenus=function(){return null};
 EditorUi.prototype.updatePasteActionStates=function(){var a=this.editor.graph,b=this.actions.get("paste"),e=this.actions.get("pasteHere");b.setEnabled(this.editor.graph.cellEditor.isContentEditing()||!mxClipboard.isEmpty()&&a.isEnabled()&&!a.isCellLocked(a.getDefaultParent()));e.setEnabled(b.isEnabled())};
 EditorUi.prototype.initClipboard=function(){var a=this,b=mxClipboard.cut;mxClipboard.cut=function(d){d.cellEditor.isContentEditing()?document.execCommand("cut",!1,null):b.apply(this,arguments);a.updatePasteActionStates()};var e=mxClipboard.copy;mxClipboard.copy=function(b){b.cellEditor.isContentEditing()?document.execCommand("copy",!1,null):e.apply(this,arguments);a.updatePasteActionStates()};var d=mxClipboard.paste;mxClipboard.paste=function(b){var e=null;b.cellEditor.isContentEditing()?document.execCommand("paste",
-!1,null):e=d.apply(this,arguments);a.updatePasteActionStates();return e};var g=this.editor.graph.cellEditor.startEditing;this.editor.graph.cellEditor.startEditing=function(){g.apply(this,arguments);a.updatePasteActionStates()};var l=this.editor.graph.cellEditor.stopEditing;this.editor.graph.cellEditor.stopEditing=function(b,d){l.apply(this,arguments);a.updatePasteActionStates()};this.updatePasteActionStates()};
+!1,null):e=d.apply(this,arguments);a.updatePasteActionStates();return e};var h=this.editor.graph.cellEditor.startEditing;this.editor.graph.cellEditor.startEditing=function(){h.apply(this,arguments);a.updatePasteActionStates()};var l=this.editor.graph.cellEditor.stopEditing;this.editor.graph.cellEditor.stopEditing=function(b,d){l.apply(this,arguments);a.updatePasteActionStates()};this.updatePasteActionStates()};
 EditorUi.prototype.initCanvas=function(){var a=this.editor.graph,a=this.editor.graph;a.timerAutoScroll=!0;a.getPagePadding=function(){return new mxPoint(Math.max(0,Math.round((a.container.offsetWidth-34)/a.view.scale)),Math.max(0,Math.round((a.container.offsetHeight-34)/a.view.scale)))};a.view.getBackgroundPageBounds=function(){var a=this.graph.getPageLayout(),c=this.graph.getPageSize();return new mxRectangle(this.scale*(this.translate.x+a.x*c.width),this.scale*(this.translate.y+a.y*c.height),this.scale*
-a.width*c.width,this.scale*a.height*c.height)};a.getPreferredPageSize=function(a,c,b){a=this.getPageLayout();c=this.getPageSize();return new mxRectangle(0,0,a.width*c.width,a.height*c.height)};var b=null;if(this.editor.chromeless){this.chromelessResize=b=mxUtils.bind(this,function(c,b){if(null!=a.container){var f=a.pageVisible?a.view.getBackgroundPageBounds():a.getGraphBounds(),d=a.view.translate,h=a.view.scale,f=mxRectangle.fromRectangle(f);f.x=f.x/h-d.x;f.y=f.y/h-d.y;f.width/=h;f.height/=h;var d=
-a.container.scrollTop,e=a.container.scrollLeft,k=mxClient.IS_QUIRKS||8<=document.documentMode?20:14;if(8==document.documentMode||9==document.documentMode)k+=3;var m=a.container.offsetWidth-k,n=c?Math.max(.3,Math.min(b||1,m/f.width)):h;a.view.scaleAndTranslate(n,Math.floor(Math.max((m-n*f.width)/2,0)/n-f.x),Math.floor(Math.max((a.container.offsetHeight-k-n*f.height)/this.lightboxVerticalDivider,0)/n-f.y));a.container.scrollTop=d*n/h;a.container.scrollLeft=e*n/h}});var e=mxUtils.bind(this,function(){b(!1)});
-mxEvent.addListener(window,"resize",e);this.destroyFunctions.push(function(){mxEvent.removeListener(window,"resize",e)});this.editor.addListener("resetGraphView",mxUtils.bind(this,function(){b(!0)}));this.actions.get("zoomIn").funct=function(c){a.zoomIn();b(!1)};this.actions.get("zoomOut").funct=function(c){a.zoomOut();b(!1)};if("0"!=urlParams.toolbar){this.chromelessToolbar=document.createElement("div");this.chromelessToolbar.style.position="fixed";this.chromelessToolbar.style.overflow="hidden";
-this.chromelessToolbar.style.boxSizing="border-box";this.chromelessToolbar.style.whiteSpace="nowrap";this.chromelessToolbar.style.backgroundColor="#000000";this.chromelessToolbar.style.padding="10px 10px 8px 10px";this.chromelessToolbar.style.left="50%";mxClient.IS_VML||(mxUtils.setPrefixedStyle(this.chromelessToolbar.style,"borderRadius","20px"),mxUtils.setPrefixedStyle(this.chromelessToolbar.style,"transition","opacity 600ms ease-in-out"));var d=mxUtils.bind(this,function(){var c=mxUtils.getCurrentStyle(a.container);
-this.chromelessToolbar.style.bottom=(null!=c?parseInt(c["margin-bottom"]||0):0)+(null!=this.tabContainer?20+parseInt(this.tabContainer.style.height):20)+"px"});this.editor.addListener("resetGraphView",d);d();var g=0,d=mxUtils.bind(this,function(a,c,b){g++;var f=document.createElement("span");f.style.paddingLeft="8px";f.style.paddingRight="8px";f.style.cursor="pointer";mxEvent.addListener(f,"click",a);null!=b&&f.setAttribute("title",b);a=document.createElement("img");a.setAttribute("border","0");a.setAttribute("src",
-c);f.appendChild(a);this.chromelessToolbar.appendChild(f);return f}),l=d(mxUtils.bind(this,function(a){this.actions.get("previousPage").funct();mxEvent.consume(a)}),Editor.previousLargeImage,mxResources.get("previousPage")),p=document.createElement("div");p.style.display="inline-block";p.style.verticalAlign="top";p.style.fontFamily="Helvetica,Arial";p.style.marginTop="8px";p.style.color="#ffffff";this.chromelessToolbar.appendChild(p);var q=d(mxUtils.bind(this,function(a){this.actions.get("nextPage").funct();
-mxEvent.consume(a)}),Editor.nextLargeImage,mxResources.get("nextPage")),c=mxUtils.bind(this,function(){null!=this.pages&&1<this.pages.length&&null!=this.currentPage&&(p.innerHTML="",mxUtils.write(p,mxUtils.indexOf(this.pages,this.currentPage)+1+" / "+this.pages.length))});l.style.paddingLeft="0px";l.style.paddingRight="4px";q.style.paddingLeft="4px";q.style.paddingRight="0px";var f=mxUtils.bind(this,function(){null!=this.pages&&1<this.pages.length&&null!=this.currentPage?(q.style.display="",l.style.display=
-"",p.style.display="inline-block"):(q.style.display="none",l.style.display="none",p.style.display="none");c()});this.editor.addListener("resetGraphView",f);this.editor.addListener("pageSelected",c);d(mxUtils.bind(this,function(a){this.actions.get("zoomOut").funct();mxEvent.consume(a)}),Editor.zoomOutLargeImage,mxResources.get("zoomOut")+" (Alt+Mousewheel)");d(mxUtils.bind(this,function(a){this.actions.get("zoomIn").funct();mxEvent.consume(a)}),Editor.zoomInLargeImage,mxResources.get("zoomIn")+" (Alt+Mousewheel)");
-d(mxUtils.bind(this,function(c){a.lightbox?(1==a.view.scale?this.lightboxFit():a.zoomTo(1),b(!1)):b(!0);mxEvent.consume(c)}),Editor.actualSizeLargeImage,mxResources.get("fit"));var h=null,m=null,n=mxUtils.bind(this,function(a){null!=h&&(window.clearTimeout(h),fadeThead=null);null!=m&&(window.clearTimeout(m),fadeThead2=null);h=window.setTimeout(mxUtils.bind(this,function(){mxUtils.setOpacity(this.chromelessToolbar,0);h=null;m=window.setTimeout(mxUtils.bind(this,function(){this.chromelessToolbar.style.display=
-"none";m=null}),600)}),a||200)}),u=mxUtils.bind(this,function(a){null!=h&&(window.clearTimeout(h),fadeThead=null);null!=m&&(window.clearTimeout(m),fadeThead2=null);this.chromelessToolbar.style.display="";mxUtils.setOpacity(this.chromelessToolbar,a||30)});if("1"==urlParams.layers){this.layersDialog=null;var r=d(mxUtils.bind(this,function(c){if(null!=this.layersDialog)this.layersDialog.parentNode.removeChild(this.layersDialog),this.layersDialog=null;else{this.layersDialog=a.createLayersDialog();mxEvent.addListener(this.layersDialog,
-"mouseleave",mxUtils.bind(this,function(){this.layersDialog.parentNode.removeChild(this.layersDialog);this.layersDialog=null}));var b=r.getBoundingClientRect();mxUtils.setPrefixedStyle(this.layersDialog.style,"borderRadius","5px");this.layersDialog.style.position="fixed";this.layersDialog.style.fontFamily="Helvetica,Arial";this.layersDialog.style.backgroundColor="#000000";this.layersDialog.style.width="160px";this.layersDialog.style.padding="4px 2px 4px 2px";this.layersDialog.style.color="#ffffff";
-mxUtils.setOpacity(this.layersDialog,70);this.layersDialog.style.left=b.left+"px";this.layersDialog.style.bottom=parseInt(this.chromelessToolbar.style.bottom)+this.chromelessToolbar.offsetHeight+4+"px";b=mxUtils.getCurrentStyle(this.editor.graph.container);this.layersDialog.style.zIndex=b.zIndex;document.body.appendChild(this.layersDialog)}mxEvent.consume(c)}),Editor.layersLargeImage,mxResources.get("layers")),k=a.getModel();k.addListener(mxEvent.CHANGE,function(){r.style.display=1<k.getChildCount(k.root)?
-"":"none"})}this.addChromelessToolbarItems(d);null!=this.editor.editButtonLink&&d(mxUtils.bind(this,function(a){"_blank"==this.editor.editButtonLink?this.editor.editAsNew(this.getEditBlankXml(),null,!0):window.open(this.editor.editButtonLink,"editWindow");mxEvent.consume(a)}),Editor.editLargeImage,mxResources.get("openInNewWindow"));!a.lightbox||"1"!=urlParams.close&&this.container==document.body||d(mxUtils.bind(this,function(a){"1"==urlParams.close?window.close():(this.destroy(),mxEvent.consume(a))}),
-Editor.closeLargeImage,mxResources.get("close")+" (Escape)");this.chromelessToolbar.style.display="none";mxUtils.setPrefixedStyle(this.chromelessToolbar.style,"transform","translate(-50%,0)");a.container.appendChild(this.chromelessToolbar);mxEvent.addListener(a.container,mxClient.IS_POINTER?"pointermove":"mousemove",mxUtils.bind(this,function(a){mxEvent.isTouchEvent(a)||(mxEvent.isShiftDown(a)||u(30),n())}));mxEvent.addListener(this.chromelessToolbar,mxClient.IS_POINTER?"pointermove":"mousemove",
-function(a){mxEvent.consume(a)});mxEvent.addListener(this.chromelessToolbar,"mouseenter",mxUtils.bind(this,function(a){mxEvent.isShiftDown(a)?n():u(100)}));mxEvent.addListener(this.chromelessToolbar,"mousemove",mxUtils.bind(this,function(a){mxEvent.isShiftDown(a)?n():u(100);mxEvent.consume(a)}));mxEvent.addListener(this.chromelessToolbar,"mouseleave",mxUtils.bind(this,function(a){mxEvent.isTouchEvent(a)||u(30)}));var t=a.getTolerance(),v=this;a.addMouseListener({startX:0,startY:0,scrollLeft:0,scrollTop:0,
-mouseDown:function(c,b){this.startX=b.getGraphX();this.startY=b.getGraphY();this.scrollLeft=a.container.scrollLeft;this.scrollTop=a.container.scrollTop},mouseMove:function(a,c){},mouseUp:function(c,b){mxEvent.isTouchEvent(b.getEvent())&&Math.abs(this.scrollLeft-a.container.scrollLeft)<t&&Math.abs(this.scrollTop-a.container.scrollTop)<t&&Math.abs(this.startX-b.getGraphX())<t&&Math.abs(this.startY-b.getGraphY())<t&&(0<parseFloat(v.chromelessToolbar.style.opacity||0)?n():u(30))}})}this.editor.editable||
-this.addChromelessClickHandler()}else if(this.editor.extendCanvas){var x=a.view.validate;a.view.validate=function(){if(null!=this.graph.container&&mxUtils.hasScrollbars(this.graph.container)){var a=this.graph.getPagePadding(),c=this.graph.getPageSize();this.translate.x=a.x-(this.x0||0)*c.width;this.translate.y=a.y-(this.y0||0)*c.height}x.apply(this,arguments)};var w=a.sizeDidChange;a.sizeDidChange=function(){if(null!=this.container&&mxUtils.hasScrollbars(this.container)){var c=this.getPageLayout(),
-b=this.getPagePadding(),f=this.getPageSize(),d=Math.ceil(2*b.x+c.width*f.width),h=Math.ceil(2*b.y+c.height*f.height),e=a.minimumGraphSize;if(null==e||e.width!=d||e.height!=h)a.minimumGraphSize=new mxRectangle(0,0,d,h);d=b.x-c.x*f.width;b=b.y-c.y*f.height;this.autoTranslate||this.view.translate.x==d&&this.view.translate.y==b?w.apply(this,arguments):(this.autoTranslate=!0,this.view.x0=c.x,this.view.y0=c.y,c=a.view.translate.x,f=a.view.translate.y,a.view.setTranslate(d,b),a.container.scrollLeft+=Math.round((d-
-c)*a.view.scale),a.container.scrollTop+=Math.round((b-f)*a.view.scale),this.autoTranslate=!1)}}}a.updateZoomTimeout=null;a.cumulativeZoomFactor=1;var D=null;a.lazyZoom=function(c){null!=this.updateZoomTimeout&&window.clearTimeout(this.updateZoomTimeout);c?.15>this.view.scale*this.cumulativeZoomFactor?this.cumulativeZoomFactor=(this.view.scale+.01)/this.view.scale:(this.cumulativeZoomFactor*=this.zoomFactor,this.cumulativeZoomFactor=Math.round(this.view.scale*this.cumulativeZoomFactor*20)/20/this.view.scale):
-.15>=this.view.scale*this.cumulativeZoomFactor?this.cumulativeZoomFactor=(this.view.scale-.01)/this.view.scale:(this.cumulativeZoomFactor/=this.zoomFactor,this.cumulativeZoomFactor=Math.round(this.view.scale*this.cumulativeZoomFactor*20)/20/this.view.scale);this.cumulativeZoomFactor=Math.max(.01,Math.min(this.view.scale*this.cumulativeZoomFactor,160)/this.view.scale);this.updateZoomTimeout=window.setTimeout(mxUtils.bind(this,function(){this.zoom(this.cumulativeZoomFactor);null!=b&&b(!1);if(null!=
-D&&mxUtils.hasScrollbars(a.container)){var c=mxUtils.getOffset(a.container),f=a.container.offsetHeight/2-D.y+c.y;a.container.scrollLeft-=(a.container.offsetWidth/2-D.x+c.x)*(this.cumulativeZoomFactor-1);a.container.scrollTop-=f*(this.cumulativeZoomFactor-1)}this.cumulativeZoomFactor=1;this.updateZoomTimeout=null}),20)};mxEvent.addMouseWheelListener(mxUtils.bind(this,function(c,b){if((mxEvent.isAltDown(c)||mxEvent.isControlDown(c)&&!mxClient.IS_MAC||a.panningHandler.isActive())&&(null==this.dialogs||
-0==this.dialogs.length))for(var f=mxEvent.getSource(c);null!=f;){if(f==a.container){D=new mxPoint(mxEvent.getClientX(c),mxEvent.getClientY(c));a.lazyZoom(b);mxEvent.consume(c);break}f=f.parentNode}}))};EditorUi.prototype.addChromelessToolbarItems=function(a){a(mxUtils.bind(this,function(a){this.actions.get("print").funct();mxEvent.consume(a)}),Editor.printLargeImage,mxResources.get("print"))};
+a.width*c.width,this.scale*a.height*c.height)};a.getPreferredPageSize=function(a,c,b){a=this.getPageLayout();c=this.getPageSize();return new mxRectangle(0,0,a.width*c.width,a.height*c.height)};var b=null;if(this.editor.chromeless){this.chromelessResize=b=mxUtils.bind(this,function(c,b,f,d){if(null!=a.container){f=null!=f?f:0;d=null!=d?d:0;var g=a.pageVisible?a.view.getBackgroundPageBounds():a.getGraphBounds(),e=mxUtils.hasScrollbars(a.container),k=a.view.translate,p=a.view.scale,m=mxRectangle.fromRectangle(g);
+m.x=m.x/p-k.x;m.y=m.y/p-k.y;m.width/=p;m.height/=p;var k=a.container.scrollTop,r=a.container.scrollLeft,t=mxClient.IS_QUIRKS||8<=document.documentMode?20:14;if(8==document.documentMode||9==document.documentMode)t+=3;var v=a.container.offsetWidth-t,t=a.container.offsetHeight-t;c=c?Math.max(.3,Math.min(b||1,v/m.width)):p;b=(v-c*m.width)/2/c;var u=(t-c*m.height)/this.lightboxVerticalDivider/c;e&&(b=Math.max(b,0),u=Math.max(u,0));if(e||g.width<v||g.height<t)a.view.scaleAndTranslate(c,Math.floor(b-m.x),
+Math.floor(u-m.y)),a.container.scrollTop=k*c/p,a.container.scrollLeft=r*c/p;else if(0!=f||0!=d)g=a.view.translate,a.view.setTranslate(Math.floor(g.x+f/p),Math.floor(g.y+d/p))}});var e=mxUtils.bind(this,function(){b(!1)});mxEvent.addListener(window,"resize",e);this.destroyFunctions.push(function(){mxEvent.removeListener(window,"resize",e)});this.editor.addListener("resetGraphView",mxUtils.bind(this,function(){b(!0)}));this.actions.get("zoomIn").funct=function(c){a.zoomIn();b(!1)};this.actions.get("zoomOut").funct=
+function(c){a.zoomOut();b(!1)};if("0"!=urlParams.toolbar){this.chromelessToolbar=document.createElement("div");this.chromelessToolbar.style.position="fixed";this.chromelessToolbar.style.overflow="hidden";this.chromelessToolbar.style.boxSizing="border-box";this.chromelessToolbar.style.whiteSpace="nowrap";this.chromelessToolbar.style.backgroundColor="#000000";this.chromelessToolbar.style.padding="10px 10px 8px 10px";this.chromelessToolbar.style.left="50%";mxClient.IS_VML||(mxUtils.setPrefixedStyle(this.chromelessToolbar.style,
+"borderRadius","20px"),mxUtils.setPrefixedStyle(this.chromelessToolbar.style,"transition","opacity 600ms ease-in-out"));var d=mxUtils.bind(this,function(){var c=mxUtils.getCurrentStyle(a.container);this.chromelessToolbar.style.bottom=(null!=c?parseInt(c["margin-bottom"]||0):0)+(null!=this.tabContainer?20+parseInt(this.tabContainer.style.height):20)+"px"});this.editor.addListener("resetGraphView",d);d();var h=0,d=mxUtils.bind(this,function(a,c,b){h++;var f=document.createElement("span");f.style.paddingLeft=
+"8px";f.style.paddingRight="8px";f.style.cursor="pointer";mxEvent.addListener(f,"click",a);null!=b&&f.setAttribute("title",b);a=document.createElement("img");a.setAttribute("border","0");a.setAttribute("src",c);f.appendChild(a);this.chromelessToolbar.appendChild(f);return f}),l=d(mxUtils.bind(this,function(a){this.actions.get("previousPage").funct();mxEvent.consume(a)}),Editor.previousLargeImage,mxResources.get("previousPage")),n=document.createElement("div");n.style.display="inline-block";n.style.verticalAlign=
+"top";n.style.fontFamily="Helvetica,Arial";n.style.marginTop="8px";n.style.color="#ffffff";this.chromelessToolbar.appendChild(n);var q=d(mxUtils.bind(this,function(a){this.actions.get("nextPage").funct();mxEvent.consume(a)}),Editor.nextLargeImage,mxResources.get("nextPage")),c=mxUtils.bind(this,function(){null!=this.pages&&1<this.pages.length&&null!=this.currentPage&&(n.innerHTML="",mxUtils.write(n,mxUtils.indexOf(this.pages,this.currentPage)+1+" / "+this.pages.length))});l.style.paddingLeft="0px";
+l.style.paddingRight="4px";q.style.paddingLeft="4px";q.style.paddingRight="0px";var f=mxUtils.bind(this,function(){null!=this.pages&&1<this.pages.length&&null!=this.currentPage?(q.style.display="",l.style.display="",n.style.display="inline-block"):(q.style.display="none",l.style.display="none",n.style.display="none");c()});this.editor.addListener("resetGraphView",f);this.editor.addListener("pageSelected",c);d(mxUtils.bind(this,function(a){this.actions.get("zoomOut").funct();mxEvent.consume(a)}),Editor.zoomOutLargeImage,
+mxResources.get("zoomOut")+" (Alt+Mousewheel)");d(mxUtils.bind(this,function(a){this.actions.get("zoomIn").funct();mxEvent.consume(a)}),Editor.zoomInLargeImage,mxResources.get("zoomIn")+" (Alt+Mousewheel)");d(mxUtils.bind(this,function(c){a.lightbox?(1==a.view.scale?this.lightboxFit():a.zoomTo(1),b(!1)):b(!0);mxEvent.consume(c)}),Editor.actualSizeLargeImage,mxResources.get("fit"));var g=null,p=null,m=mxUtils.bind(this,function(a){null!=g&&(window.clearTimeout(g),fadeThead=null);null!=p&&(window.clearTimeout(p),
+fadeThead2=null);g=window.setTimeout(mxUtils.bind(this,function(){mxUtils.setOpacity(this.chromelessToolbar,0);g=null;p=window.setTimeout(mxUtils.bind(this,function(){this.chromelessToolbar.style.display="none";p=null}),600)}),a||200)}),u=mxUtils.bind(this,function(a){null!=g&&(window.clearTimeout(g),fadeThead=null);null!=p&&(window.clearTimeout(p),fadeThead2=null);this.chromelessToolbar.style.display="";mxUtils.setOpacity(this.chromelessToolbar,a||30)});if("1"==urlParams.layers){this.layersDialog=
+null;var r=d(mxUtils.bind(this,function(c){if(null!=this.layersDialog)this.layersDialog.parentNode.removeChild(this.layersDialog),this.layersDialog=null;else{this.layersDialog=a.createLayersDialog();mxEvent.addListener(this.layersDialog,"mouseleave",mxUtils.bind(this,function(){this.layersDialog.parentNode.removeChild(this.layersDialog);this.layersDialog=null}));var b=r.getBoundingClientRect();mxUtils.setPrefixedStyle(this.layersDialog.style,"borderRadius","5px");this.layersDialog.style.position=
+"fixed";this.layersDialog.style.fontFamily="Helvetica,Arial";this.layersDialog.style.backgroundColor="#000000";this.layersDialog.style.width="160px";this.layersDialog.style.padding="4px 2px 4px 2px";this.layersDialog.style.color="#ffffff";mxUtils.setOpacity(this.layersDialog,70);this.layersDialog.style.left=b.left+"px";this.layersDialog.style.bottom=parseInt(this.chromelessToolbar.style.bottom)+this.chromelessToolbar.offsetHeight+4+"px";b=mxUtils.getCurrentStyle(this.editor.graph.container);this.layersDialog.style.zIndex=
+b.zIndex;document.body.appendChild(this.layersDialog)}mxEvent.consume(c)}),Editor.layersLargeImage,mxResources.get("layers")),k=a.getModel();k.addListener(mxEvent.CHANGE,function(){r.style.display=1<k.getChildCount(k.root)?"":"none"})}this.addChromelessToolbarItems(d);null!=this.editor.editButtonLink&&d(mxUtils.bind(this,function(a){"_blank"==this.editor.editButtonLink?this.editor.editAsNew(this.getEditBlankXml(),null,!0):window.open(this.editor.editButtonLink,"editWindow");mxEvent.consume(a)}),Editor.editLargeImage,
+mxResources.get("openInNewWindow"));!a.lightbox||"1"!=urlParams.close&&this.container==document.body||d(mxUtils.bind(this,function(a){"1"==urlParams.close?window.close():(this.destroy(),mxEvent.consume(a))}),Editor.closeLargeImage,mxResources.get("close")+" (Escape)");this.chromelessToolbar.style.display="none";mxUtils.setPrefixedStyle(this.chromelessToolbar.style,"transform","translate(-50%,0)");a.container.appendChild(this.chromelessToolbar);mxEvent.addListener(a.container,mxClient.IS_POINTER?"pointermove":
+"mousemove",mxUtils.bind(this,function(a){mxEvent.isTouchEvent(a)||(mxEvent.isShiftDown(a)||u(30),m())}));mxEvent.addListener(this.chromelessToolbar,mxClient.IS_POINTER?"pointermove":"mousemove",function(a){mxEvent.consume(a)});mxEvent.addListener(this.chromelessToolbar,"mouseenter",mxUtils.bind(this,function(a){mxEvent.isShiftDown(a)?m():u(100)}));mxEvent.addListener(this.chromelessToolbar,"mousemove",mxUtils.bind(this,function(a){mxEvent.isShiftDown(a)?m():u(100);mxEvent.consume(a)}));mxEvent.addListener(this.chromelessToolbar,
+"mouseleave",mxUtils.bind(this,function(a){mxEvent.isTouchEvent(a)||u(30)}));var v=a.getTolerance(),t=this;a.addMouseListener({startX:0,startY:0,scrollLeft:0,scrollTop:0,mouseDown:function(c,b){this.startX=b.getGraphX();this.startY=b.getGraphY();this.scrollLeft=a.container.scrollLeft;this.scrollTop=a.container.scrollTop},mouseMove:function(a,c){},mouseUp:function(c,b){mxEvent.isTouchEvent(b.getEvent())&&Math.abs(this.scrollLeft-a.container.scrollLeft)<v&&Math.abs(this.scrollTop-a.container.scrollTop)<
+v&&Math.abs(this.startX-b.getGraphX())<v&&Math.abs(this.startY-b.getGraphY())<v&&(0<parseFloat(t.chromelessToolbar.style.opacity||0)?m():u(30))}})}this.editor.editable||this.addChromelessClickHandler()}else if(this.editor.extendCanvas){var x=a.view.validate;a.view.validate=function(){if(null!=this.graph.container&&mxUtils.hasScrollbars(this.graph.container)){var a=this.graph.getPagePadding(),c=this.graph.getPageSize();this.translate.x=a.x-(this.x0||0)*c.width;this.translate.y=a.y-(this.y0||0)*c.height}x.apply(this,
+arguments)};var w=a.sizeDidChange;a.sizeDidChange=function(){if(null!=this.container&&mxUtils.hasScrollbars(this.container)){var c=this.getPageLayout(),b=this.getPagePadding(),f=this.getPageSize(),d=Math.ceil(2*b.x+c.width*f.width),g=Math.ceil(2*b.y+c.height*f.height),e=a.minimumGraphSize;if(null==e||e.width!=d||e.height!=g)a.minimumGraphSize=new mxRectangle(0,0,d,g);d=b.x-c.x*f.width;b=b.y-c.y*f.height;this.autoTranslate||this.view.translate.x==d&&this.view.translate.y==b?w.apply(this,arguments):
+(this.autoTranslate=!0,this.view.x0=c.x,this.view.y0=c.y,c=a.view.translate.x,f=a.view.translate.y,a.view.setTranslate(d,b),a.container.scrollLeft+=Math.round((d-c)*a.view.scale),a.container.scrollTop+=Math.round((b-f)*a.view.scale),this.autoTranslate=!1)}}}a.updateZoomTimeout=null;a.cumulativeZoomFactor=1;var D=null;a.lazyZoom=function(c){null!=this.updateZoomTimeout&&window.clearTimeout(this.updateZoomTimeout);c?.15>this.view.scale*this.cumulativeZoomFactor?this.cumulativeZoomFactor=(this.view.scale+
+.01)/this.view.scale:(this.cumulativeZoomFactor*=this.zoomFactor,this.cumulativeZoomFactor=Math.round(this.view.scale*this.cumulativeZoomFactor*20)/20/this.view.scale):.15>=this.view.scale*this.cumulativeZoomFactor?this.cumulativeZoomFactor=(this.view.scale-.01)/this.view.scale:(this.cumulativeZoomFactor/=this.zoomFactor,this.cumulativeZoomFactor=Math.round(this.view.scale*this.cumulativeZoomFactor*20)/20/this.view.scale);this.cumulativeZoomFactor=Math.max(.01,Math.min(this.view.scale*this.cumulativeZoomFactor,
+160)/this.view.scale);this.updateZoomTimeout=window.setTimeout(mxUtils.bind(this,function(){var c=mxUtils.getOffset(a.container),f=0,d=0;null!=D&&(f=a.container.offsetWidth/2-D.x+c.x,d=a.container.offsetHeight/2-D.y+c.y);c=this.view.scale;this.zoom(this.cumulativeZoomFactor);this.view.scale!=c&&(null!=b&&b(!1,null,f*(this.cumulativeZoomFactor-1),d*(this.cumulativeZoomFactor-1)),!mxUtils.hasScrollbars(a.container)||0==f&&0==d||(a.container.scrollLeft-=f*(this.cumulativeZoomFactor-1),a.container.scrollTop-=
+d*(this.cumulativeZoomFactor-1)));this.cumulativeZoomFactor=1;this.updateZoomTimeout=null}),20)};mxEvent.addMouseWheelListener(mxUtils.bind(this,function(c,b){if((mxEvent.isAltDown(c)||mxEvent.isControlDown(c)&&!mxClient.IS_MAC||a.panningHandler.isActive())&&(null==this.dialogs||0==this.dialogs.length))for(var f=mxEvent.getSource(c);null!=f;){if(f==a.container){D=new mxPoint(mxEvent.getClientX(c),mxEvent.getClientY(c));a.lazyZoom(b);mxEvent.consume(c);break}f=f.parentNode}}))};
+EditorUi.prototype.addChromelessToolbarItems=function(a){a(mxUtils.bind(this,function(a){this.actions.get("print").funct();mxEvent.consume(a)}),Editor.printLargeImage,mxResources.get("print"))};
 EditorUi.prototype.createTemporaryGraph=function(a){a=new Graph(document.createElement("div"),null,null,a);a.resetViewOnRootChange=!1;a.setConnectable(!1);a.gridEnabled=!1;a.autoScroll=!1;a.setTooltips(!1);a.setEnabled(!1);a.container.style.visibility="hidden";a.container.style.position="absolute";a.container.style.overflow="hidden";a.container.style.height="1px";a.container.style.width="1px";return a};
 EditorUi.prototype.addChromelessClickHandler=function(){var a=urlParams.highlight;null!=a&&0<a.length&&(a="#"+a);this.editor.graph.addClickHandler(a)};EditorUi.prototype.toggleFormatPanel=function(a){this.formatWidth=a||0<this.formatWidth?0:240;this.formatContainer.style.display=a||0<this.formatWidth?"":"none";this.refresh();this.format.refresh();this.fireEvent(new mxEventObject("formatWidthChanged"))};
 EditorUi.prototype.lightboxFit=function(){if(this.isDiagramEmpty())this.editor.graph.view.setScale(1);else{var a=urlParams.border,b=60;null!=a&&(b=parseInt(a));this.editor.graph.maxFitScale=this.lightboxMaxFitScale;this.editor.graph.fit(b);this.editor.graph.maxFitScale=null}};EditorUi.prototype.isDiagramEmpty=function(){var a=this.editor.graph.getModel();return 1==a.getChildCount(a.root)&&0==a.getChildCount(a.getChildAt(a.root,0))};
@@ -2067,27 +2068,27 @@ EditorUi.prototype.resetScrollbars=function(){var a=this.editor.graph;if(!this.e
 0<b.width&&0<b.height&&(b.x>a.container.scrollLeft+.9*a.container.clientWidth&&(a.container.scrollLeft=Math.min(b.x+b.width-a.container.clientWidth,b.x-10)),b.y>a.container.scrollTop+.9*a.container.clientHeight&&(a.container.scrollTop=Math.min(b.y+b.height-a.container.clientHeight,b.y-10)))}else{var b=a.getGraphBounds(),e=Math.max(b.width,a.scrollTileSize.width*a.view.scale);a.container.scrollTop=Math.floor(Math.max(0,b.y-Math.max(20,(a.container.clientHeight-Math.max(b.height,a.scrollTileSize.height*
 a.view.scale))/4)));a.container.scrollLeft=Math.floor(Math.max(0,b.x-Math.max(0,(a.container.clientWidth-e)/2)))}else a.pageVisible?(b=a.view.getBackgroundPageBounds(),a.view.setTranslate(Math.floor(Math.max(0,(a.container.clientWidth-b.width)/2)-b.x),Math.floor(Math.max(0,(a.container.clientHeight-b.height)/2)-b.y))):(b=a.getGraphBounds(),a.view.setTranslate(Math.floor(Math.max(0,Math.max(0,(a.container.clientWidth-b.width)/2)-b.x)),Math.floor(Math.max(0,Math.max(20,(a.container.clientHeight-b.height)/
 4))-b.y)))};
-EditorUi.prototype.setPageVisible=function(a){var b=this.editor.graph,e=mxUtils.hasScrollbars(b.container),d=0,g=0;e&&(d=b.view.translate.x*b.view.scale-b.container.scrollLeft,g=b.view.translate.y*b.view.scale-b.container.scrollTop);b.pageVisible=a;b.pageBreaksVisible=a;b.preferPageSize=a;b.view.validateBackground();e&&(a=b.getSelectionCells(),b.clearSelection(),b.setSelectionCells(a));b.sizeDidChange();e&&(b.container.scrollLeft=b.view.translate.x*b.view.scale-d,b.container.scrollTop=b.view.translate.y*
-b.view.scale-g);this.fireEvent(new mxEventObject("pageViewChanged"))};function ChangePageSetup(a,b,e,d){this.ui=a;this.previousColor=b;this.previousImage=e;this.previousFormat=d;this.ignoreImage=this.ignoreColor=!1}
+EditorUi.prototype.setPageVisible=function(a){var b=this.editor.graph,e=mxUtils.hasScrollbars(b.container),d=0,h=0;e&&(d=b.view.translate.x*b.view.scale-b.container.scrollLeft,h=b.view.translate.y*b.view.scale-b.container.scrollTop);b.pageVisible=a;b.pageBreaksVisible=a;b.preferPageSize=a;b.view.validateBackground();e&&(a=b.getSelectionCells(),b.clearSelection(),b.setSelectionCells(a));b.sizeDidChange();e&&(b.container.scrollLeft=b.view.translate.x*b.view.scale-d,b.container.scrollTop=b.view.translate.y*
+b.view.scale-h);this.fireEvent(new mxEventObject("pageViewChanged"))};function ChangePageSetup(a,b,e,d){this.ui=a;this.previousColor=b;this.previousImage=e;this.previousFormat=d;this.ignoreImage=this.ignoreColor=!1}
 ChangePageSetup.prototype.execute=function(){var a=this.ui.editor.graph;if(!this.ignoreColor){var b=a.background;this.ui.setBackgroundColor(this.previousColor);this.previousColor=b}this.ignoreImage||(b=a.backgroundImage,this.ui.setBackgroundImage(this.previousImage),this.previousImage=b);null!=this.previousFormat&&(b=a.pageFormat,this.previousFormat.width!=b.width||this.previousFormat.height!=b.height)&&(this.ui.setPageFormat(this.previousFormat),this.previousFormat=b)};
 EditorUi.prototype.setBackgroundColor=function(a){this.editor.graph.background=a;this.editor.graph.view.validateBackground();this.fireEvent(new mxEventObject("backgroundColorChanged"))};EditorUi.prototype.setFoldingEnabled=function(a){this.editor.graph.foldingEnabled=a;this.editor.graph.view.revalidate();this.fireEvent(new mxEventObject("foldingEnabledChanged"))};
 EditorUi.prototype.setPageFormat=function(a){this.editor.graph.pageFormat=a;this.editor.graph.pageVisible?(this.editor.graph.view.validateBackground(),this.editor.graph.sizeDidChange()):this.actions.get("pageView").funct();this.fireEvent(new mxEventObject("pageFormatChanged"))};EditorUi.prototype.setPageScale=function(a){this.editor.graph.pageScale=a;this.editor.graph.pageVisible?(this.editor.graph.view.validateBackground(),this.editor.graph.sizeDidChange()):this.actions.get("pageView").funct();this.fireEvent(new mxEventObject("pageScaleChanged"))};
 EditorUi.prototype.setGridColor=function(a){this.editor.graph.view.gridColor=a;this.editor.graph.view.validateBackground();this.fireEvent(new mxEventObject("gridColorChanged"))};
-EditorUi.prototype.addUndoListener=function(){var a=this.actions.get("undo"),b=this.actions.get("redo"),e=this.editor.undoManager,d=mxUtils.bind(this,function(){a.setEnabled(this.canUndo());b.setEnabled(this.canRedo())});e.addListener(mxEvent.ADD,d);e.addListener(mxEvent.UNDO,d);e.addListener(mxEvent.REDO,d);e.addListener(mxEvent.CLEAR,d);var g=this.editor.graph.cellEditor.startEditing;this.editor.graph.cellEditor.startEditing=function(){g.apply(this,arguments);d()};var l=this.editor.graph.cellEditor.stopEditing;
+EditorUi.prototype.addUndoListener=function(){var a=this.actions.get("undo"),b=this.actions.get("redo"),e=this.editor.undoManager,d=mxUtils.bind(this,function(){a.setEnabled(this.canUndo());b.setEnabled(this.canRedo())});e.addListener(mxEvent.ADD,d);e.addListener(mxEvent.UNDO,d);e.addListener(mxEvent.REDO,d);e.addListener(mxEvent.CLEAR,d);var h=this.editor.graph.cellEditor.startEditing;this.editor.graph.cellEditor.startEditing=function(){h.apply(this,arguments);d()};var l=this.editor.graph.cellEditor.stopEditing;
 this.editor.graph.cellEditor.stopEditing=function(a,b){l.apply(this,arguments);d()};d()};
-EditorUi.prototype.updateActionStates=function(){var a=this.editor.graph,b=!a.isSelectionEmpty(),e=!1,d=!1,g=a.getSelectionCells();if(null!=g)for(var l=0;l<g.length;l++){var p=g[l];a.getModel().isEdge(p)&&(d=!0);a.getModel().isVertex(p)&&(e=!0);if(d&&e)break}g="cut copy bold italic underline delete duplicate editStyle editTooltip editLink backgroundColor borderColor edit toFront toBack lockUnlock solid dashed dotted fillColor gradientColor shadow fontColor formattedText rounded toggleRounded sharp strokeColor".split(" ");for(l=
-0;l<g.length;l++)this.actions.get(g[l]).setEnabled(b);this.actions.get("setAsDefaultStyle").setEnabled(1==a.getSelectionCount());this.actions.get("clearWaypoints").setEnabled(!a.isSelectionEmpty());this.actions.get("turn").setEnabled(!a.isSelectionEmpty());this.actions.get("curved").setEnabled(d);this.actions.get("rotation").setEnabled(e);this.actions.get("wordWrap").setEnabled(e);this.actions.get("autosize").setEnabled(e);d=e&&1==a.getSelectionCount();this.actions.get("group").setEnabled(1<a.getSelectionCount()||
+EditorUi.prototype.updateActionStates=function(){var a=this.editor.graph,b=!a.isSelectionEmpty(),e=!1,d=!1,h=a.getSelectionCells();if(null!=h)for(var l=0;l<h.length;l++){var n=h[l];a.getModel().isEdge(n)&&(d=!0);a.getModel().isVertex(n)&&(e=!0);if(d&&e)break}h="cut copy bold italic underline delete duplicate editStyle editTooltip editLink backgroundColor borderColor edit toFront toBack lockUnlock solid dashed dotted fillColor gradientColor shadow fontColor formattedText rounded toggleRounded sharp strokeColor".split(" ");for(l=
+0;l<h.length;l++)this.actions.get(h[l]).setEnabled(b);this.actions.get("setAsDefaultStyle").setEnabled(1==a.getSelectionCount());this.actions.get("clearWaypoints").setEnabled(!a.isSelectionEmpty());this.actions.get("turn").setEnabled(!a.isSelectionEmpty());this.actions.get("curved").setEnabled(d);this.actions.get("rotation").setEnabled(e);this.actions.get("wordWrap").setEnabled(e);this.actions.get("autosize").setEnabled(e);d=e&&1==a.getSelectionCount();this.actions.get("group").setEnabled(1<a.getSelectionCount()||
 d&&!a.isContainer(a.getSelectionCell()));this.actions.get("ungroup").setEnabled(1==a.getSelectionCount()&&(0<a.getModel().getChildCount(a.getSelectionCell())||d&&a.isContainer(a.getSelectionCell())));this.actions.get("removeFromGroup").setEnabled(d&&a.getModel().isVertex(a.getModel().getParent(a.getSelectionCell())));a.view.getState(a.getSelectionCell());this.menus.get("navigation").setEnabled(b||null!=a.view.currentRoot);this.actions.get("collapsible").setEnabled(e&&(a.isContainer(a.getSelectionCell())||
 0<a.model.getChildCount(a.getSelectionCell())));this.actions.get("home").setEnabled(null!=a.view.currentRoot);this.actions.get("exitGroup").setEnabled(null!=a.view.currentRoot);this.actions.get("enterGroup").setEnabled(1==a.getSelectionCount()&&a.isValidRoot(a.getSelectionCell()));b=1==a.getSelectionCount()&&a.isCellFoldable(a.getSelectionCell());this.actions.get("expand").setEnabled(b);this.actions.get("collapse").setEnabled(b);this.actions.get("editLink").setEnabled(1==a.getSelectionCount());this.actions.get("openLink").setEnabled(1==
 a.getSelectionCount()&&null!=a.getLinkForCell(a.getSelectionCell()));this.actions.get("guides").setEnabled(a.isEnabled());this.actions.get("grid").setEnabled(!this.editor.chromeless||this.editor.editable);b=a.isEnabled()&&!a.isCellLocked(a.getDefaultParent());this.menus.get("layout").setEnabled(b);this.menus.get("insert").setEnabled(b);this.menus.get("direction").setEnabled(b&&e);this.menus.get("align").setEnabled(b&&e&&1<a.getSelectionCount());this.menus.get("distribute").setEnabled(b&&e&&1<a.getSelectionCount());
 this.actions.get("selectVertices").setEnabled(b);this.actions.get("selectEdges").setEnabled(b);this.actions.get("selectAll").setEnabled(b);this.actions.get("selectNone").setEnabled(b);this.updatePasteActionStates()};
-EditorUi.prototype.refresh=function(a){a=null!=a?a:!0;var b=mxClient.IS_IE&&(null==document.documentMode||5==document.documentMode),e=this.container.clientWidth,d=this.container.clientHeight;this.container==document.body&&(e=document.body.clientWidth||document.documentElement.clientWidth,d=b?document.body.clientHeight||document.documentElement.clientHeight:document.documentElement.clientHeight);var g=0;mxClient.IS_IOS&&!window.navigator.standalone&&window.innerHeight!=document.documentElement.clientHeight&&
-(g=document.documentElement.clientHeight-window.innerHeight,window.scrollTo(0,0));var l=Math.max(0,Math.min(this.hsplitPosition,e-this.splitSize-20)),p=0;null!=this.menubar&&(this.menubarContainer.style.height=this.menubarHeight+"px",p+=this.menubarHeight);null!=this.toolbar&&(this.toolbarContainer.style.top=this.menubarHeight+"px",this.toolbarContainer.style.height=this.toolbarHeight+"px",p+=this.toolbarHeight);0<p&&!mxClient.IS_QUIRKS&&(p+=1);var q=0;if(null!=this.sidebarFooterContainer){var c=
-this.footerHeight+g,q=Math.max(0,Math.min(d-p-c,this.sidebarFooterHeight));this.sidebarFooterContainer.style.width=l+"px";this.sidebarFooterContainer.style.height=q+"px";this.sidebarFooterContainer.style.bottom=c+"px"}c=null!=this.format?this.formatWidth:0;this.sidebarContainer.style.top=p+"px";this.sidebarContainer.style.width=l+"px";this.formatContainer.style.top=p+"px";this.formatContainer.style.width=c+"px";this.formatContainer.style.display=null!=this.format?"":"none";this.diagramContainer.style.left=
-null!=this.hsplit.parentNode?l+this.splitSize+"px":"0px";this.diagramContainer.style.top=this.sidebarContainer.style.top;this.footerContainer.style.height=this.footerHeight+"px";this.hsplit.style.top=this.sidebarContainer.style.top;this.hsplit.style.bottom=this.footerHeight+g+"px";this.hsplit.style.left=l+"px";null!=this.tabContainer&&(this.tabContainer.style.left=this.diagramContainer.style.left);b?(this.menubarContainer.style.width=e+"px",this.toolbarContainer.style.width=this.menubarContainer.style.width,
+EditorUi.prototype.refresh=function(a){a=null!=a?a:!0;var b=mxClient.IS_IE&&(null==document.documentMode||5==document.documentMode),e=this.container.clientWidth,d=this.container.clientHeight;this.container==document.body&&(e=document.body.clientWidth||document.documentElement.clientWidth,d=b?document.body.clientHeight||document.documentElement.clientHeight:document.documentElement.clientHeight);var h=0;mxClient.IS_IOS&&!window.navigator.standalone&&window.innerHeight!=document.documentElement.clientHeight&&
+(h=document.documentElement.clientHeight-window.innerHeight,window.scrollTo(0,0));var l=Math.max(0,Math.min(this.hsplitPosition,e-this.splitSize-20)),n=0;null!=this.menubar&&(this.menubarContainer.style.height=this.menubarHeight+"px",n+=this.menubarHeight);null!=this.toolbar&&(this.toolbarContainer.style.top=this.menubarHeight+"px",this.toolbarContainer.style.height=this.toolbarHeight+"px",n+=this.toolbarHeight);0<n&&!mxClient.IS_QUIRKS&&(n+=1);var q=0;if(null!=this.sidebarFooterContainer){var c=
+this.footerHeight+h,q=Math.max(0,Math.min(d-n-c,this.sidebarFooterHeight));this.sidebarFooterContainer.style.width=l+"px";this.sidebarFooterContainer.style.height=q+"px";this.sidebarFooterContainer.style.bottom=c+"px"}c=null!=this.format?this.formatWidth:0;this.sidebarContainer.style.top=n+"px";this.sidebarContainer.style.width=l+"px";this.formatContainer.style.top=n+"px";this.formatContainer.style.width=c+"px";this.formatContainer.style.display=null!=this.format?"":"none";this.diagramContainer.style.left=
+null!=this.hsplit.parentNode?l+this.splitSize+"px":"0px";this.diagramContainer.style.top=this.sidebarContainer.style.top;this.footerContainer.style.height=this.footerHeight+"px";this.hsplit.style.top=this.sidebarContainer.style.top;this.hsplit.style.bottom=this.footerHeight+h+"px";this.hsplit.style.left=l+"px";null!=this.tabContainer&&(this.tabContainer.style.left=this.diagramContainer.style.left);b?(this.menubarContainer.style.width=e+"px",this.toolbarContainer.style.width=this.menubarContainer.style.width,
 b=Math.max(0,d-this.footerHeight-this.menubarHeight-this.toolbarHeight),this.sidebarContainer.style.height=b-q+"px",this.formatContainer.style.height=b+"px",this.diagramContainer.style.width=null!=this.hsplit.parentNode?Math.max(0,e-l-this.splitSize-c)+"px":e+"px",this.footerContainer.style.width=this.menubarContainer.style.width,q=Math.max(0,d-this.footerHeight-this.menubarHeight-this.toolbarHeight),null!=this.tabContainer&&(this.tabContainer.style.width=this.diagramContainer.style.width,this.tabContainer.style.bottom=
-this.footerHeight+g+"px",q-=this.tabContainer.clientHeight),this.diagramContainer.style.height=q+"px",this.hsplit.style.height=q+"px"):(0<this.footerHeight&&(this.footerContainer.style.bottom=g+"px"),this.diagramContainer.style.right=c+"px",e=0,null!=this.tabContainer&&(this.tabContainer.style.bottom=this.footerHeight+g+"px",this.tabContainer.style.right=this.diagramContainer.style.right,e=this.tabContainer.clientHeight),this.sidebarContainer.style.bottom=this.footerHeight+q+g+"px",this.formatContainer.style.bottom=
-this.footerHeight+g+"px",this.diagramContainer.style.bottom=this.footerHeight+g+e+"px");a&&this.editor.graph.sizeDidChange()};EditorUi.prototype.createTabContainer=function(){return null};
+this.footerHeight+h+"px",q-=this.tabContainer.clientHeight),this.diagramContainer.style.height=q+"px",this.hsplit.style.height=q+"px"):(0<this.footerHeight&&(this.footerContainer.style.bottom=h+"px"),this.diagramContainer.style.right=c+"px",e=0,null!=this.tabContainer&&(this.tabContainer.style.bottom=this.footerHeight+h+"px",this.tabContainer.style.right=this.diagramContainer.style.right,e=this.tabContainer.clientHeight),this.sidebarContainer.style.bottom=this.footerHeight+q+h+"px",this.formatContainer.style.bottom=
+this.footerHeight+h+"px",this.diagramContainer.style.bottom=this.footerHeight+h+e+"px");a&&this.editor.graph.sizeDidChange()};EditorUi.prototype.createTabContainer=function(){return null};
 EditorUi.prototype.createDivs=function(){this.menubarContainer=this.createDiv("geMenubarContainer");this.toolbarContainer=this.createDiv("geToolbarContainer");this.sidebarContainer=this.createDiv("geSidebarContainer");this.formatContainer=this.createDiv("geSidebarContainer");this.diagramContainer=this.createDiv("geDiagramContainer");this.footerContainer=this.createDiv("geFooterContainer");this.hsplit=this.createDiv("geHsplit");this.hsplit.setAttribute("title",mxResources.get("collapseExpand"));this.menubarContainer.style.top=
 "0px";this.menubarContainer.style.left="0px";this.menubarContainer.style.right="0px";this.toolbarContainer.style.left="0px";this.toolbarContainer.style.right="0px";this.sidebarContainer.style.left="0px";this.formatContainer.style.right="0px";this.formatContainer.style.zIndex="1";this.diagramContainer.style.right=(null!=this.format?this.formatWidth:0)+"px";this.footerContainer.style.left="0px";this.footerContainer.style.right="0px";this.footerContainer.style.bottom="0px";this.footerContainer.style.zIndex=
 mxPopupMenu.prototype.zIndex-2;this.hsplit.style.width=this.splitSize+"px";this.formatContainer.style.backgroundColor="whiteSmoke";this.formatContainer.style.overflowX="hidden";this.formatContainer.style.overflowY="auto";this.formatContainer.style.fontSize="12px";if(this.sidebarFooterContainer=this.createSidebarFooterContainer())this.sidebarFooterContainer.style.left="0px";this.editor.chromeless||(this.tabContainer=this.createTabContainer())};EditorUi.prototype.createSidebarFooterContainer=function(){return null};
@@ -2096,103 +2097,103 @@ this.sidebar=this.editor.chromeless?null:this.createSidebar(this.sidebarContaine
 this.container.appendChild(this.sidebarFooterContainer);this.container.appendChild(this.diagramContainer);null!=this.container&&null!=this.tabContainer&&this.container.appendChild(this.tabContainer);this.toolbar=this.editor.chromeless?null:this.createToolbar(this.createDiv("geToolbar"));null!=this.toolbar&&(this.toolbarContainer.appendChild(this.toolbar.container),this.container.appendChild(this.toolbarContainer));null!=this.sidebar&&(this.container.appendChild(this.hsplit),this.addSplitHandler(this.hsplit,
 !0,0,mxUtils.bind(this,function(a){this.hsplitPosition=a;this.refresh()})))};EditorUi.prototype.createStatusContainer=function(){var a=document.createElement("a");a.className="geItem geStatus";420>screen.width&&(a.style.maxWidth=Math.max(20,screen.width-320)+"px",a.style.overflow="hidden");return a};EditorUi.prototype.setStatusText=function(a){this.statusContainer.innerHTML=a};EditorUi.prototype.createToolbar=function(a){return new Toolbar(this,a)};
 EditorUi.prototype.createSidebar=function(a){return new Sidebar(this,a)};EditorUi.prototype.createFormat=function(a){return new Format(this,a)};EditorUi.prototype.createFooter=function(){return this.createDiv("geFooter")};EditorUi.prototype.createDiv=function(a){var b=document.createElement("div");b.className=a;return b};
-EditorUi.prototype.addSplitHandler=function(a,b,e,d){function g(a){if(null!=p){var m=new mxPoint(mxEvent.getClientX(a),mxEvent.getClientY(a));d(Math.max(0,q+(b?m.x-p.x:p.y-m.y)-e));mxEvent.consume(a);q!=h()&&(c=!0,f=null)}}function l(a){g(a);p=q=null}var p=null,q=null,c=!0,f=null;mxClient.IS_POINTER&&(a.style.touchAction="none");var h=mxUtils.bind(this,function(){var c=parseInt(b?a.style.left:a.style.bottom);b||(c=c+e-this.footerHeight);return c});mxEvent.addGestureListeners(a,function(a){p=new mxPoint(mxEvent.getClientX(a),
-mxEvent.getClientY(a));q=h();c=!1;mxEvent.consume(a)});mxEvent.addListener(a,"click",function(a){if(!c){var b=null!=f?f-e:0;f=h();d(b);mxEvent.consume(a)}});mxEvent.addGestureListeners(document,null,g,l);this.destroyFunctions.push(function(){mxEvent.removeGestureListeners(document,null,g,l)})};EditorUi.prototype.showDialog=function(a,b,e,d,g,l){this.editor.graph.tooltipHandler.hideTooltip();null==this.dialogs&&(this.dialogs=[]);this.dialog=new Dialog(this,a,b,e,d,g,l);this.dialogs.push(this.dialog)};
+EditorUi.prototype.addSplitHandler=function(a,b,e,d){function h(a){if(null!=n){var p=new mxPoint(mxEvent.getClientX(a),mxEvent.getClientY(a));d(Math.max(0,q+(b?p.x-n.x:n.y-p.y)-e));mxEvent.consume(a);q!=g()&&(c=!0,f=null)}}function l(a){h(a);n=q=null}var n=null,q=null,c=!0,f=null;mxClient.IS_POINTER&&(a.style.touchAction="none");var g=mxUtils.bind(this,function(){var c=parseInt(b?a.style.left:a.style.bottom);b||(c=c+e-this.footerHeight);return c});mxEvent.addGestureListeners(a,function(a){n=new mxPoint(mxEvent.getClientX(a),
+mxEvent.getClientY(a));q=g();c=!1;mxEvent.consume(a)});mxEvent.addListener(a,"click",function(a){if(!c){var b=null!=f?f-e:0;f=g();d(b);mxEvent.consume(a)}});mxEvent.addGestureListeners(document,null,h,l);this.destroyFunctions.push(function(){mxEvent.removeGestureListeners(document,null,h,l)})};EditorUi.prototype.showDialog=function(a,b,e,d,h,l){this.editor.graph.tooltipHandler.hideTooltip();null==this.dialogs&&(this.dialogs=[]);this.dialog=new Dialog(this,a,b,e,d,h,l);this.dialogs.push(this.dialog)};
 EditorUi.prototype.hideDialog=function(a){null!=this.dialogs&&0<this.dialogs.length&&(this.dialogs.pop().close(a),this.dialog=0<this.dialogs.length?this.dialogs[this.dialogs.length-1]:null,null==this.dialog&&"hidden"!=this.editor.graph.container.style.visibility&&this.editor.graph.container.focus(),this.editor.fireEvent(new mxEventObject("hideDialog")))};
-EditorUi.prototype.pickColor=function(a,b){var e=this.editor.graph,d=e.cellEditor.saveSelection(),g=new ColorDialog(this,a||"none",function(a){e.cellEditor.restoreSelection(d);b(a)},function(){e.cellEditor.restoreSelection(d)});this.showDialog(g.container,220,430,!0,!1);g.init()};
+EditorUi.prototype.pickColor=function(a,b){var e=this.editor.graph,d=e.cellEditor.saveSelection(),h=new ColorDialog(this,a||"none",function(a){e.cellEditor.restoreSelection(d);b(a)},function(){e.cellEditor.restoreSelection(d)});this.showDialog(h.container,220,430,!0,!1);h.init()};
 EditorUi.prototype.openFile=function(){window.openFile=new OpenFile(mxUtils.bind(this,function(a){this.hideDialog(a)}));this.showDialog((new OpenDialog(this)).container,Editor.useLocalStorage?640:320,Editor.useLocalStorage?480:220,!0,!0,function(){window.openFile=null})};
-EditorUi.prototype.extractGraphModelFromHtml=function(a){var b=null;try{var e=a.indexOf("&lt;mxGraphModel ");if(0<=e){var d=a.lastIndexOf("&lt;/mxGraphModel&gt;");d>e&&(b=a.substring(e,d+21).replace(/&gt;/g,">").replace(/&lt;/g,"<").replace(/\\&quot;/g,'"').replace(/\n/g,""))}}catch(g){}return b};
+EditorUi.prototype.extractGraphModelFromHtml=function(a){var b=null;try{var e=a.indexOf("&lt;mxGraphModel ");if(0<=e){var d=a.lastIndexOf("&lt;/mxGraphModel&gt;");d>e&&(b=a.substring(e,d+21).replace(/&gt;/g,">").replace(/&lt;/g,"<").replace(/\\&quot;/g,'"').replace(/\n/g,""))}}catch(h){}return b};
 EditorUi.prototype.extractGraphModelFromEvent=function(a){var b=null,e=null;null!=a&&(a=null!=a.dataTransfer?a.dataTransfer:a.clipboardData,null!=a&&(10==document.documentMode||11==document.documentMode?e=a.getData("Text"):(e=0<=mxUtils.indexOf(a.types,"text/html")?a.getData("text/html"):null,mxUtils.indexOf(a.types,null==e||0==e.length)&&(e=a.getData("text/plain"))),null!=e&&(e=this.editor.graph.zapGremlins(mxUtils.trim(e)),a=this.extractGraphModelFromHtml(e),null!=a&&(e=a))));null!=e&&this.isCompatibleString(e)&&
 (b=e);return b};EditorUi.prototype.isCompatibleString=function(a){return!1};EditorUi.prototype.saveFile=function(a){a||null==this.editor.filename?(a=new FilenameDialog(this,this.editor.getOrCreateFilename(),mxResources.get("save"),mxUtils.bind(this,function(a){this.save(a)}),null,mxUtils.bind(this,function(a){if(null!=a&&0<a.length)return!0;mxUtils.confirm(mxResources.get("invalidName"));return!1})),this.showDialog(a.container,300,100,!0,!0),a.init()):this.save(this.editor.getOrCreateFilename())};
 EditorUi.prototype.save=function(a){if(null!=a){this.editor.graph.isEditing()&&this.editor.graph.stopEditing();var b=mxUtils.getXml(this.editor.getGraphXml());try{if(Editor.useLocalStorage){if(null!=localStorage.getItem(a)&&!mxUtils.confirm(mxResources.get("replaceIt",[a])))return;localStorage.setItem(a,b);this.editor.setStatus(mxUtils.htmlEntities(mxResources.get("saved"))+" "+new Date)}else if(b.length<MAX_REQUEST_SIZE)(new mxXmlRequest(SAVE_URL,"filename="+encodeURIComponent(a)+"&xml="+encodeURIComponent(b))).simulate(document,
 "_blank");else{mxUtils.alert(mxResources.get("drawingTooLarge"));mxUtils.popup(b);return}this.editor.setModified(!1);this.editor.setFilename(a);this.updateDocumentTitle()}catch(e){this.editor.setStatus(mxUtils.htmlEntities(mxResources.get("errorSavingFile")))}}};
-EditorUi.prototype.executeLayout=function(a,b,e){var d=this.editor.graph;if(d.isEnabled()){d.getModel().beginUpdate();try{a()}catch(g){throw g;}finally{this.allowAnimation&&b&&0>navigator.userAgent.indexOf("Camino")?(a=new mxMorphing(d),a.addListener(mxEvent.DONE,mxUtils.bind(this,function(){d.getModel().endUpdate();null!=e&&e()})),a.startAnimation()):(d.getModel().endUpdate(),null!=e&&e())}}};
-EditorUi.prototype.showImageDialog=function(a,b,e,d){d=this.editor.graph.cellEditor;var g=d.saveSelection(),l=mxUtils.prompt(a,b);d.restoreSelection(g);if(null!=l&&0<l.length){var p=new Image;p.onload=function(){e(l,p.width,p.height)};p.onerror=function(){e(null);mxUtils.alert(mxResources.get("fileNotFound"))};p.src=l}else e(null)};EditorUi.prototype.showLinkDialog=function(a,b,e){a=new LinkDialog(this,a,b,e);this.showDialog(a.container,420,90,!0,!0);a.init()};
+EditorUi.prototype.executeLayout=function(a,b,e){var d=this.editor.graph;if(d.isEnabled()){d.getModel().beginUpdate();try{a()}catch(h){throw h;}finally{this.allowAnimation&&b&&0>navigator.userAgent.indexOf("Camino")?(a=new mxMorphing(d),a.addListener(mxEvent.DONE,mxUtils.bind(this,function(){d.getModel().endUpdate();null!=e&&e()})),a.startAnimation()):(d.getModel().endUpdate(),null!=e&&e())}}};
+EditorUi.prototype.showImageDialog=function(a,b,e,d){d=this.editor.graph.cellEditor;var h=d.saveSelection(),l=mxUtils.prompt(a,b);d.restoreSelection(h);if(null!=l&&0<l.length){var n=new Image;n.onload=function(){e(l,n.width,n.height)};n.onerror=function(){e(null);mxUtils.alert(mxResources.get("fileNotFound"))};n.src=l}else e(null)};EditorUi.prototype.showLinkDialog=function(a,b,e){a=new LinkDialog(this,a,b,e);this.showDialog(a.container,420,90,!0,!0);a.init()};
 EditorUi.prototype.showBackgroundImageDialog=function(a){a=null!=a?a:mxUtils.bind(this,function(a){a=new ChangeGraphBackground(this,null,a);a.ignoreColor=!0;this.editor.graph.model.execute(a)});var b=mxUtils.prompt(mxResources.get("backgroundImage"),"");if(null!=b&&0<b.length){var e=new Image;e.onload=function(){a(new mxImage(b,e.width,e.height))};e.onerror=function(){a(null);mxUtils.alert(mxResources.get("fileNotFound"))};e.src=b}else a(null)};
 EditorUi.prototype.setBackgroundImage=function(a){this.editor.graph.setBackgroundImage(a);this.editor.graph.view.validateBackgroundImage();this.fireEvent(new mxEventObject("backgroundImageChanged"))};EditorUi.prototype.confirm=function(a,b,e){mxUtils.confirm(a)?null!=b&&b():null!=e&&e()};
 EditorUi.prototype.createOutline=function(a){var b=new mxOutline(this.editor.graph);b.border=20;mxEvent.addListener(window,"resize",function(){b.update()});this.addListener("pageFormatChanged",function(){b.update()});return b};
-EditorUi.prototype.createKeyHandler=function(a){function b(a,c,b){p.push(function(){if(!d.isSelectionEmpty()&&d.isEnabled())if(c=null!=c?c:1,b){d.getModel().beginUpdate();try{for(var f=d.getSelectionCells(),h=0;h<f.length;h++)if(d.getModel().isVertex(f[h])&&d.isCellResizable(f[h])){var e=d.getCellGeometry(f[h]);null!=e&&(e=e.clone(),37==a?e.width=Math.max(0,e.width-c):38==a?e.height=Math.max(0,e.height-c):39==a?e.width+=c:40==a&&(e.height+=c),d.getModel().setGeometry(f[h],e))}}finally{d.getModel().endUpdate()}}else f=
-d.getSelectionCell(),h=d.model.getParent(f),e=null,1==d.getSelectionCount()&&d.model.isVertex(f)&&null!=d.layoutManager&&!d.isCellLocked(f)&&(e=d.layoutManager.getLayout(h)),null!=e&&e.constructor==mxStackLayout?(e=h.getIndex(f),37==a||38==a?d.model.add(h,f,Math.max(0,e-1)):39!=a&&40!=a||d.model.add(h,f,Math.min(d.model.getChildCount(h),e+1))):(h=f=0,37==a?f=-c:38==a?h=-c:39==a?f=c:40==a&&(h=c),d.moveCells(d.getMovableCells(d.getSelectionCells()),f,h))});null!=q&&window.clearTimeout(q);q=window.setTimeout(function(){if(0<
-p.length){d.getModel().beginUpdate();try{for(var a=0;a<p.length;a++)p[a]();p=[]}finally{d.getModel().endUpdate()}d.scrollCellToVisible(d.getSelectionCell())}},200)}var e=this,d=this.editor.graph,g=new mxKeyHandler(d),l=g.isEventIgnored;g.isEventIgnored=function(a){return(!this.isControlDown(a)||mxEvent.isShiftDown(a)||90!=a.keyCode&&89!=a.keyCode&&188!=a.keyCode&&190!=a.keyCode&&85!=a.keyCode)&&(66!=a.keyCode&&73!=a.keyCode||!this.isControlDown(a)||this.graph.cellEditor.isContentEditing()&&!mxClient.IS_FF&&
-!mxClient.IS_SF)&&l.apply(this,arguments)};g.isEnabledForEvent=function(a){return!mxEvent.isConsumed(a)&&this.isGraphEvent(a)&&this.isEnabled()};g.isControlDown=function(a){return mxEvent.isControlDown(a)||mxClient.IS_MAC&&a.metaKey};var p=[],q=null,c={37:mxConstants.DIRECTION_WEST,38:mxConstants.DIRECTION_NORTH,39:mxConstants.DIRECTION_EAST,40:mxConstants.DIRECTION_SOUTH},f=g.getFunction,h={67:this.actions.get("clearWaypoints"),65:this.actions.get("connectionArrows"),80:this.actions.get("connectionPoints")};
-mxKeyHandler.prototype.getFunction=function(a){if(d.isEnabled()){if(mxEvent.isShiftDown(a)&&mxEvent.isAltDown(a)){var m=h[a.keyCode];if(null!=m)return m.funct}if(9==a.keyCode&&mxEvent.isAltDown(a))return mxEvent.isShiftDown(a)?function(){d.selectParentCell()}:function(){d.selectChildCell()};if(null!=c[a.keyCode]&&!d.isSelectionEmpty())if(mxEvent.isShiftDown(a)&&mxEvent.isAltDown(a)){if(d.model.isVertex(d.getSelectionCell()))return function(){var b=d.connectVertex(d.getSelectionCell(),c[a.keyCode],
-d.defaultEdgeLength,a,!0);null!=b&&0<b.length&&(1==b.length&&d.model.isEdge(b[0])?d.setSelectionCell(d.model.getTerminal(b[0],!1)):d.setSelectionCell(b[b.length-1]),d.scrollCellToVisible(d.getSelectionCell()),null!=e.hoverIcons&&e.hoverIcons.update(d.view.getState(d.getSelectionCell())))}}else return this.isControlDown(a)?function(){b(a.keyCode,mxEvent.isShiftDown(a)?d.gridSize:null,!0)}:function(){b(a.keyCode,mxEvent.isShiftDown(a)?d.gridSize:null)}}return f.apply(this,arguments)};g.bindAction=mxUtils.bind(this,
-function(a,c,b,f){var d=this.actions.get(b);null!=d&&(b=function(){d.isEnabled()&&d.funct()},c?f?g.bindControlShiftKey(a,b):g.bindControlKey(a,b):f?g.bindShiftKey(a,b):g.bindKey(a,b))});var m=g.escape;g.escape=function(a){m.apply(this,arguments)};g.enter=function(){};g.bindControlShiftKey(36,function(){d.exitGroup()});g.bindControlShiftKey(35,function(){d.enterGroup()});g.bindKey(36,function(){d.home()});g.bindKey(35,function(){d.refresh()});g.bindAction(107,!0,"zoomIn");g.bindAction(109,!0,"zoomOut");
-g.bindAction(80,!0,"print");g.bindAction(79,!0,"outline",!0);g.bindAction(112,!1,"about");if(!this.editor.chromeless||this.editor.editable)g.bindControlKey(36,function(){d.isEnabled()&&d.foldCells(!0)}),g.bindControlKey(35,function(){d.isEnabled()&&d.foldCells(!1)}),g.bindControlKey(13,function(){d.isEnabled()&&d.setSelectionCells(d.duplicateCells(d.getSelectionCells(),!1))}),g.bindAction(8,!1,"delete"),g.bindAction(8,!0,"deleteAll"),g.bindAction(46,!1,"delete"),g.bindAction(46,!0,"deleteAll"),g.bindAction(72,
-!0,"resetView"),g.bindAction(72,!0,"fitWindow",!0),g.bindAction(74,!0,"fitPage"),g.bindAction(74,!0,"fitTwoPages",!0),g.bindAction(48,!0,"customZoom"),g.bindAction(82,!0,"turn"),g.bindAction(82,!0,"clearDefaultStyle",!0),g.bindAction(83,!0,"save"),g.bindAction(83,!0,"saveAs",!0),g.bindAction(65,!0,"selectAll"),g.bindAction(65,!0,"selectNone",!0),g.bindAction(73,!0,"selectVertices",!0),g.bindAction(69,!0,"selectEdges",!0),g.bindAction(69,!0,"editStyle"),g.bindAction(66,!0,"bold"),g.bindAction(66,!0,
-"toBack",!0),g.bindAction(70,!0,"toFront",!0),g.bindAction(68,!0,"duplicate"),g.bindAction(68,!0,"setAsDefaultStyle",!0),g.bindAction(90,!0,"undo"),g.bindAction(89,!0,"autosize",!0),g.bindAction(88,!0,"cut"),g.bindAction(67,!0,"copy"),g.bindAction(86,!0,"paste"),g.bindAction(71,!0,"group"),g.bindAction(77,!0,"editData"),g.bindAction(71,!0,"grid",!0),g.bindAction(73,!0,"italic"),g.bindAction(76,!0,"lockUnlock"),g.bindAction(76,!0,"layers",!0),g.bindAction(80,!0,"formatPanel",!0),g.bindAction(85,!0,
-"underline"),g.bindAction(85,!0,"ungroup",!0),g.bindAction(190,!0,"superscript"),g.bindAction(188,!0,"subscript"),g.bindKey(13,function(){d.isEnabled()&&d.startEditingAtCell()}),g.bindKey(113,function(){d.isEnabled()&&d.startEditingAtCell()});mxClient.IS_WIN?g.bindAction(89,!0,"redo"):g.bindAction(90,!0,"redo",!0);return g};
+EditorUi.prototype.createKeyHandler=function(a){function b(a,c,b){n.push(function(){if(!d.isSelectionEmpty()&&d.isEnabled())if(c=null!=c?c:1,b){d.getModel().beginUpdate();try{for(var f=d.getSelectionCells(),g=0;g<f.length;g++)if(d.getModel().isVertex(f[g])&&d.isCellResizable(f[g])){var e=d.getCellGeometry(f[g]);null!=e&&(e=e.clone(),37==a?e.width=Math.max(0,e.width-c):38==a?e.height=Math.max(0,e.height-c):39==a?e.width+=c:40==a&&(e.height+=c),d.getModel().setGeometry(f[g],e))}}finally{d.getModel().endUpdate()}}else f=
+d.getSelectionCell(),g=d.model.getParent(f),e=null,1==d.getSelectionCount()&&d.model.isVertex(f)&&null!=d.layoutManager&&!d.isCellLocked(f)&&(e=d.layoutManager.getLayout(g)),null!=e&&e.constructor==mxStackLayout?(e=g.getIndex(f),37==a||38==a?d.model.add(g,f,Math.max(0,e-1)):39!=a&&40!=a||d.model.add(g,f,Math.min(d.model.getChildCount(g),e+1))):(g=f=0,37==a?f=-c:38==a?g=-c:39==a?f=c:40==a&&(g=c),d.moveCells(d.getMovableCells(d.getSelectionCells()),f,g))});null!=q&&window.clearTimeout(q);q=window.setTimeout(function(){if(0<
+n.length){d.getModel().beginUpdate();try{for(var a=0;a<n.length;a++)n[a]();n=[]}finally{d.getModel().endUpdate()}d.scrollCellToVisible(d.getSelectionCell())}},200)}var e=this,d=this.editor.graph,h=new mxKeyHandler(d),l=h.isEventIgnored;h.isEventIgnored=function(a){return(!this.isControlDown(a)||mxEvent.isShiftDown(a)||90!=a.keyCode&&89!=a.keyCode&&188!=a.keyCode&&190!=a.keyCode&&85!=a.keyCode)&&(66!=a.keyCode&&73!=a.keyCode||!this.isControlDown(a)||this.graph.cellEditor.isContentEditing()&&!mxClient.IS_FF&&
+!mxClient.IS_SF)&&l.apply(this,arguments)};h.isEnabledForEvent=function(a){return!mxEvent.isConsumed(a)&&this.isGraphEvent(a)&&this.isEnabled()};h.isControlDown=function(a){return mxEvent.isControlDown(a)||mxClient.IS_MAC&&a.metaKey};var n=[],q=null,c={37:mxConstants.DIRECTION_WEST,38:mxConstants.DIRECTION_NORTH,39:mxConstants.DIRECTION_EAST,40:mxConstants.DIRECTION_SOUTH},f=h.getFunction,g={67:this.actions.get("clearWaypoints"),65:this.actions.get("connectionArrows"),80:this.actions.get("connectionPoints")};
+mxKeyHandler.prototype.getFunction=function(a){if(d.isEnabled()){if(mxEvent.isShiftDown(a)&&mxEvent.isAltDown(a)){var p=g[a.keyCode];if(null!=p)return p.funct}if(9==a.keyCode&&mxEvent.isAltDown(a))return mxEvent.isShiftDown(a)?function(){d.selectParentCell()}:function(){d.selectChildCell()};if(null!=c[a.keyCode]&&!d.isSelectionEmpty())if(mxEvent.isShiftDown(a)&&mxEvent.isAltDown(a)){if(d.model.isVertex(d.getSelectionCell()))return function(){var b=d.connectVertex(d.getSelectionCell(),c[a.keyCode],
+d.defaultEdgeLength,a,!0);null!=b&&0<b.length&&(1==b.length&&d.model.isEdge(b[0])?d.setSelectionCell(d.model.getTerminal(b[0],!1)):d.setSelectionCell(b[b.length-1]),d.scrollCellToVisible(d.getSelectionCell()),null!=e.hoverIcons&&e.hoverIcons.update(d.view.getState(d.getSelectionCell())))}}else return this.isControlDown(a)?function(){b(a.keyCode,mxEvent.isShiftDown(a)?d.gridSize:null,!0)}:function(){b(a.keyCode,mxEvent.isShiftDown(a)?d.gridSize:null)}}return f.apply(this,arguments)};h.bindAction=mxUtils.bind(this,
+function(a,c,b,f){var d=this.actions.get(b);null!=d&&(b=function(){d.isEnabled()&&d.funct()},c?f?h.bindControlShiftKey(a,b):h.bindControlKey(a,b):f?h.bindShiftKey(a,b):h.bindKey(a,b))});var p=h.escape;h.escape=function(a){p.apply(this,arguments)};h.enter=function(){};h.bindControlShiftKey(36,function(){d.exitGroup()});h.bindControlShiftKey(35,function(){d.enterGroup()});h.bindKey(36,function(){d.home()});h.bindKey(35,function(){d.refresh()});h.bindAction(107,!0,"zoomIn");h.bindAction(109,!0,"zoomOut");
+h.bindAction(80,!0,"print");h.bindAction(79,!0,"outline",!0);h.bindAction(112,!1,"about");if(!this.editor.chromeless||this.editor.editable)h.bindControlKey(36,function(){d.isEnabled()&&d.foldCells(!0)}),h.bindControlKey(35,function(){d.isEnabled()&&d.foldCells(!1)}),h.bindControlKey(13,function(){d.isEnabled()&&d.setSelectionCells(d.duplicateCells(d.getSelectionCells(),!1))}),h.bindAction(8,!1,"delete"),h.bindAction(8,!0,"deleteAll"),h.bindAction(46,!1,"delete"),h.bindAction(46,!0,"deleteAll"),h.bindAction(72,
+!0,"resetView"),h.bindAction(72,!0,"fitWindow",!0),h.bindAction(74,!0,"fitPage"),h.bindAction(74,!0,"fitTwoPages",!0),h.bindAction(48,!0,"customZoom"),h.bindAction(82,!0,"turn"),h.bindAction(82,!0,"clearDefaultStyle",!0),h.bindAction(83,!0,"save"),h.bindAction(83,!0,"saveAs",!0),h.bindAction(65,!0,"selectAll"),h.bindAction(65,!0,"selectNone",!0),h.bindAction(73,!0,"selectVertices",!0),h.bindAction(69,!0,"selectEdges",!0),h.bindAction(69,!0,"editStyle"),h.bindAction(66,!0,"bold"),h.bindAction(66,!0,
+"toBack",!0),h.bindAction(70,!0,"toFront",!0),h.bindAction(68,!0,"duplicate"),h.bindAction(68,!0,"setAsDefaultStyle",!0),h.bindAction(90,!0,"undo"),h.bindAction(89,!0,"autosize",!0),h.bindAction(88,!0,"cut"),h.bindAction(67,!0,"copy"),h.bindAction(86,!0,"paste"),h.bindAction(71,!0,"group"),h.bindAction(77,!0,"editData"),h.bindAction(71,!0,"grid",!0),h.bindAction(73,!0,"italic"),h.bindAction(76,!0,"lockUnlock"),h.bindAction(76,!0,"layers",!0),h.bindAction(80,!0,"formatPanel",!0),h.bindAction(85,!0,
+"underline"),h.bindAction(85,!0,"ungroup",!0),h.bindAction(190,!0,"superscript"),h.bindAction(188,!0,"subscript"),h.bindKey(13,function(){d.isEnabled()&&d.startEditingAtCell()}),h.bindKey(113,function(){d.isEnabled()&&d.startEditingAtCell()});mxClient.IS_WIN?h.bindAction(89,!0,"redo"):h.bindAction(90,!0,"redo",!0);return h};
 EditorUi.prototype.destroy=function(){null!=this.editor&&(this.editor.destroy(),this.editor=null);null!=this.menubar&&(this.menubar.destroy(),this.menubar=null);null!=this.toolbar&&(this.toolbar.destroy(),this.toolbar=null);null!=this.sidebar&&(this.sidebar.destroy(),this.sidebar=null);null!=this.keyHandler&&(this.keyHandler.destroy(),this.keyHandler=null);null!=this.keydownHandler&&(mxEvent.removeListener(document,"keydown",this.keydownHandler),this.keydownHandler=null);null!=this.keyupHandler&&
 (mxEvent.removeListener(document,"keyup",this.keyupHandler),this.keyupHandler=null);null!=this.resizeHandler&&(mxEvent.removeListener(window,"resize",this.resizeHandler),this.resizeHandler=null);null!=this.gestureHandler&&(mxEvent.removeGestureListeners(document,this.gestureHandler),this.gestureHandler=null);null!=this.orientationChangeHandler&&(mxEvent.removeListener(window,"orientationchange",this.orientationChangeHandler),this.orientationChangeHandler=null);null!=this.scrollHandler&&(mxEvent.removeListener(window,
 "scroll",this.scrollHandler),this.scrollHandler=null);if(null!=this.destroyFunctions){for(var a=0;a<this.destroyFunctions.length;a++)this.destroyFunctions[a]();this.destroyFunctions=null}for(var b=[this.menubarContainer,this.toolbarContainer,this.sidebarContainer,this.formatContainer,this.diagramContainer,this.footerContainer,this.chromelessToolbar,this.hsplit,this.sidebarFooterContainer,this.layersDialog],a=0;a<b.length;a++)null!=b[a]&&null!=b[a].parentNode&&b[a].parentNode.removeChild(b[a])};"undefined"!==typeof html4&&(html4.ATTRIBS["a::target"]=0,html4.ATTRIBS["source::src"]=0,html4.ATTRIBS["video::src"]=0);mxConstants.SHADOW_OPACITY=.25;mxConstants.SHADOWCOLOR="#000000";mxConstants.VML_SHADOWCOLOR="#d0d0d0";mxGraph.prototype.pageBreakColor="#c0c0c0";mxGraph.prototype.pageScale=1;
 (function(){try{if(null!=navigator&&null!=navigator.language){var a=navigator.language.toLowerCase();mxGraph.prototype.pageFormat="en-us"===a||"en-ca"===a||"es-mx"===a?mxConstants.PAGE_FORMAT_LETTER_PORTRAIT:mxConstants.PAGE_FORMAT_A4_PORTRAIT}}catch(b){}})();mxText.prototype.baseSpacingTop=5;mxText.prototype.baseSpacingBottom=1;mxGraphModel.prototype.ignoreRelativeEdgeParent=!1;
 mxGraphView.prototype.gridImage=mxClient.IS_SVG?"data:image/gif;base64,R0lGODlhCgAKAJEAAAAAAP///8zMzP///yH5BAEAAAMALAAAAAAKAAoAAAIJ1I6py+0Po2wFADs=":IMAGE_PATH+"/grid.gif";mxGraphView.prototype.gridSteps=4;mxGraphView.prototype.minGridSize=4;mxGraphView.prototype.gridColor="#e0e0e0";mxSvgCanvas2D.prototype.foAltText="[Not supported by viewer]";
-Graph=function(a,b,e,d,g){mxGraph.call(this,a,b,e,d);this.themes=g||this.defaultThemes;this.currentEdgeStyle=mxUtils.clone(this.defaultEdgeStyle);this.currentVertexStyle=mxUtils.clone(this.defaultVertexStyle);a=this.baseUrl;b=a.indexOf("//");this.domainPathUrl=this.domainUrl="";0<b&&(b=a.indexOf("/",b+2),0<b&&(this.domainUrl=a.substring(0,b)),b=a.lastIndexOf("/"),0<b&&(this.domainPathUrl=a.substring(0,b+1)));this.isHtmlLabel=function(a){var c=this.view.getState(a);a=null!=c?c.style:this.getCellStyle(a);
-return"1"==a.html||"wrap"==a[mxConstants.STYLE_WHITE_SPACE]};if(this.edgeMode){var l=null,p=null,q=null,c=null,f=!1;this.addListener(mxEvent.FIRE_MOUSE_EVENT,mxUtils.bind(this,function(a,b){if("mouseDown"==b.getProperty("eventName")&&this.isEnabled()){var d=b.getProperty("event");if(!mxEvent.isControlDown(d.getEvent())&&!mxEvent.isShiftDown(d.getEvent())){var h=d.getState();null!=h&&this.model.isEdge(h.cell)&&(l=new mxPoint(d.getGraphX(),d.getGraphY()),f=this.isCellSelected(h.cell),q=h,p=d,null!=
-h.text&&null!=h.text.boundingBox&&mxUtils.contains(h.text.boundingBox,d.getGraphX(),d.getGraphY())?c=mxEvent.LABEL_HANDLE:(h=this.selectionCellsHandler.getHandler(h.cell),null!=h&&null!=h.bends&&0<h.bends.length&&(c=h.getHandleForEvent(d))))}}}));this.addMouseListener({mouseDown:function(a,c){},mouseMove:mxUtils.bind(this,function(a,b){var d=this.selectionCellsHandler.handlers.map,h;for(h in d)if(null!=d[h].index)return;if(this.isEnabled()&&!this.panningHandler.isActive()&&!mxEvent.isControlDown(b.getEvent())&&
-!mxEvent.isShiftDown(b.getEvent())&&!mxEvent.isAltDown(b.getEvent()))if(h=this.tolerance,null!=l&&null!=q&&null!=p){if(d=q,Math.abs(l.x-b.getGraphX())>h||Math.abs(l.y-b.getGraphY())>h){this.isCellSelected(d.cell)||this.setSelectionCell(d.cell);var e=this.selectionCellsHandler.getHandler(d.cell);if(null!=e&&null!=e.bends&&0<e.bends.length){var k=e.getHandleForEvent(p),m=this.view.getEdgeStyle(d);h=m==mxEdgeStyle.EntityRelation;f||c!=mxEvent.LABEL_HANDLE||(k=c);if(h&&0!=k&&k!=e.bends.length-1&&k!=mxEvent.LABEL_HANDLE)!h||
-null==d.visibleSourceState&&null==d.visibleTargetState||(this.graphHandler.reset(),b.consume());else if(k==mxEvent.LABEL_HANDLE||0==k||null!=d.visibleSourceState||k==e.bends.length-1||null!=d.visibleTargetState)h||k==mxEvent.LABEL_HANDLE||(h=d.absolutePoints,null!=h&&(null==m&&null==k||m==mxEdgeStyle.OrthConnector)&&(k=c,null==k&&(k=new mxRectangle(l.x,l.y),k.grow(mxEdgeHandler.prototype.handleImage.width/2),mxUtils.contains(k,h[0].x,h[0].y)?k=0:mxUtils.contains(k,h[h.length-1].x,h[h.length-1].y)?
-k=e.bends.length-1:null!=m&&(2==h.length||3==h.length&&(0==Math.round(h[0].x-h[1].x)&&0==Math.round(h[1].x-h[2].x)||0==Math.round(h[0].y-h[1].y)&&0==Math.round(h[1].y-h[2].y)))?k=2:(k=mxUtils.findNearestSegment(d,l.x,l.y),k=null==m?mxEvent.VIRTUAL_HANDLE-k:k+1))),null==k&&(k=mxEvent.VIRTUAL_HANDLE)),e.start(b.getGraphX(),b.getGraphX(),k),c=l=p=q=null,f=!1,b.consume(),this.graphHandler.reset()}}}else if(d=b.getState(),null!=d&&this.model.isEdge(d.cell)){e=null;h=d.absolutePoints;if(null!=h)if(k=new mxRectangle(b.getGraphX(),
-b.getGraphY()),k.grow(mxEdgeHandler.prototype.handleImage.width/2),null!=d.text&&null!=d.text.boundingBox&&mxUtils.contains(d.text.boundingBox,b.getGraphX(),b.getGraphY()))e="move";else if(mxUtils.contains(k,h[0].x,h[0].y)||mxUtils.contains(k,h[h.length-1].x,h[h.length-1].y))e="pointer";else if(null!=d.visibleSourceState||null!=d.visibleTargetState)m=this.view.getEdgeStyle(d),e="crosshair",m!=mxEdgeStyle.EntityRelation&&this.isOrthogonal(d)&&(m=mxUtils.findNearestSegment(d,b.getGraphX(),b.getGraphY()),
-m<h.length-1&&0<=m&&(e=0==Math.round(h[m].x-h[m+1].x)?"col-resize":"row-resize"));null!=e&&d.setCursor(e)}}),mouseUp:mxUtils.bind(this,function(a,b){c=l=p=q=null})})}this.cellRenderer.getLabelValue=function(a){var c=mxCellRenderer.prototype.getLabelValue.apply(this,arguments);a.view.graph.isHtmlLabel(a.cell)&&(c=1!=a.style.html?mxUtils.htmlEntities(c,!1):a.view.graph.sanitizeHtml(c));return c};if("undefined"!==typeof mxVertexHandler){this.setConnectable(!0);this.setDropEnabled(!0);this.setPanning(!0);
-this.setTooltips(!0);this.setAllowLoops(!0);this.allowAutoPanning=!0;this.constrainChildren=this.resetEdgesOnConnect=!1;this.constrainRelativeChildren=!0;this.graphHandler.scrollOnMove=!1;this.graphHandler.scaleGrid=!0;this.connectionHandler.setCreateTarget(!1);this.connectionHandler.insertBeforeSource=!0;this.connectionHandler.isValidSource=function(a,c){return!1};this.alternateEdgeStyle="vertical";null==d&&this.loadStylesheet();var h=this.graphHandler.getGuideStates;this.graphHandler.getGuideStates=
-function(){var a=h.apply(this,arguments);if(this.graph.pageVisible){for(var c=[],b=this.graph.pageFormat,f=this.graph.pageScale,d=b.width*f,b=b.height*f,f=this.graph.view.translate,e=this.graph.view.scale,k=this.graph.getPageLayout(),m=0;m<k.width;m++)c.push(new mxRectangle(((k.x+m)*d+f.x)*e,(k.y*b+f.y)*e,d*e,b*e));for(m=0;m<k.height;m++)c.push(new mxRectangle((k.x*d+f.x)*e,((k.y+m)*b+f.y)*e,d*e,b*e));a=c.concat(a)}return a};mxDragSource.prototype.dragElementZIndex=mxPopupMenu.prototype.zIndex;mxGuide.prototype.getGuideColor=
+Graph=function(a,b,e,d,h){mxGraph.call(this,a,b,e,d);this.themes=h||this.defaultThemes;this.currentEdgeStyle=mxUtils.clone(this.defaultEdgeStyle);this.currentVertexStyle=mxUtils.clone(this.defaultVertexStyle);a=this.baseUrl;b=a.indexOf("//");this.domainPathUrl=this.domainUrl="";0<b&&(b=a.indexOf("/",b+2),0<b&&(this.domainUrl=a.substring(0,b)),b=a.lastIndexOf("/"),0<b&&(this.domainPathUrl=a.substring(0,b+1)));this.isHtmlLabel=function(a){var c=this.view.getState(a);a=null!=c?c.style:this.getCellStyle(a);
+return"1"==a.html||"wrap"==a[mxConstants.STYLE_WHITE_SPACE]};if(this.edgeMode){var l=null,n=null,q=null,c=null,f=!1;this.addListener(mxEvent.FIRE_MOUSE_EVENT,mxUtils.bind(this,function(a,b){if("mouseDown"==b.getProperty("eventName")&&this.isEnabled()){var d=b.getProperty("event");if(!mxEvent.isControlDown(d.getEvent())&&!mxEvent.isShiftDown(d.getEvent())){var g=d.getState();null!=g&&this.model.isEdge(g.cell)&&(l=new mxPoint(d.getGraphX(),d.getGraphY()),f=this.isCellSelected(g.cell),q=g,n=d,null!=
+g.text&&null!=g.text.boundingBox&&mxUtils.contains(g.text.boundingBox,d.getGraphX(),d.getGraphY())?c=mxEvent.LABEL_HANDLE:(g=this.selectionCellsHandler.getHandler(g.cell),null!=g&&null!=g.bends&&0<g.bends.length&&(c=g.getHandleForEvent(d))))}}}));this.addMouseListener({mouseDown:function(a,c){},mouseMove:mxUtils.bind(this,function(a,b){var d=this.selectionCellsHandler.handlers.map,g;for(g in d)if(null!=d[g].index)return;if(this.isEnabled()&&!this.panningHandler.isActive()&&!mxEvent.isControlDown(b.getEvent())&&
+!mxEvent.isShiftDown(b.getEvent())&&!mxEvent.isAltDown(b.getEvent()))if(g=this.tolerance,null!=l&&null!=q&&null!=n){if(d=q,Math.abs(l.x-b.getGraphX())>g||Math.abs(l.y-b.getGraphY())>g){this.isCellSelected(d.cell)||this.setSelectionCell(d.cell);var e=this.selectionCellsHandler.getHandler(d.cell);if(null!=e&&null!=e.bends&&0<e.bends.length){var k=e.getHandleForEvent(n),p=this.view.getEdgeStyle(d);g=p==mxEdgeStyle.EntityRelation;f||c!=mxEvent.LABEL_HANDLE||(k=c);if(g&&0!=k&&k!=e.bends.length-1&&k!=mxEvent.LABEL_HANDLE)!g||
+null==d.visibleSourceState&&null==d.visibleTargetState||(this.graphHandler.reset(),b.consume());else if(k==mxEvent.LABEL_HANDLE||0==k||null!=d.visibleSourceState||k==e.bends.length-1||null!=d.visibleTargetState)g||k==mxEvent.LABEL_HANDLE||(g=d.absolutePoints,null!=g&&(null==p&&null==k||p==mxEdgeStyle.OrthConnector)&&(k=c,null==k&&(k=new mxRectangle(l.x,l.y),k.grow(mxEdgeHandler.prototype.handleImage.width/2),mxUtils.contains(k,g[0].x,g[0].y)?k=0:mxUtils.contains(k,g[g.length-1].x,g[g.length-1].y)?
+k=e.bends.length-1:null!=p&&(2==g.length||3==g.length&&(0==Math.round(g[0].x-g[1].x)&&0==Math.round(g[1].x-g[2].x)||0==Math.round(g[0].y-g[1].y)&&0==Math.round(g[1].y-g[2].y)))?k=2:(k=mxUtils.findNearestSegment(d,l.x,l.y),k=null==p?mxEvent.VIRTUAL_HANDLE-k:k+1))),null==k&&(k=mxEvent.VIRTUAL_HANDLE)),e.start(b.getGraphX(),b.getGraphX(),k),c=l=n=q=null,f=!1,b.consume(),this.graphHandler.reset()}}}else if(d=b.getState(),null!=d&&this.model.isEdge(d.cell)){e=null;g=d.absolutePoints;if(null!=g)if(k=new mxRectangle(b.getGraphX(),
+b.getGraphY()),k.grow(mxEdgeHandler.prototype.handleImage.width/2),null!=d.text&&null!=d.text.boundingBox&&mxUtils.contains(d.text.boundingBox,b.getGraphX(),b.getGraphY()))e="move";else if(mxUtils.contains(k,g[0].x,g[0].y)||mxUtils.contains(k,g[g.length-1].x,g[g.length-1].y))e="pointer";else if(null!=d.visibleSourceState||null!=d.visibleTargetState)p=this.view.getEdgeStyle(d),e="crosshair",p!=mxEdgeStyle.EntityRelation&&this.isOrthogonal(d)&&(p=mxUtils.findNearestSegment(d,b.getGraphX(),b.getGraphY()),
+p<g.length-1&&0<=p&&(e=0==Math.round(g[p].x-g[p+1].x)?"col-resize":"row-resize"));null!=e&&d.setCursor(e)}}),mouseUp:mxUtils.bind(this,function(a,b){c=l=n=q=null})})}this.cellRenderer.getLabelValue=function(a){var c=mxCellRenderer.prototype.getLabelValue.apply(this,arguments);a.view.graph.isHtmlLabel(a.cell)&&(c=1!=a.style.html?mxUtils.htmlEntities(c,!1):a.view.graph.sanitizeHtml(c));return c};if("undefined"!==typeof mxVertexHandler){this.setConnectable(!0);this.setDropEnabled(!0);this.setPanning(!0);
+this.setTooltips(!0);this.setAllowLoops(!0);this.allowAutoPanning=!0;this.constrainChildren=this.resetEdgesOnConnect=!1;this.constrainRelativeChildren=!0;this.graphHandler.scrollOnMove=!1;this.graphHandler.scaleGrid=!0;this.connectionHandler.setCreateTarget(!1);this.connectionHandler.insertBeforeSource=!0;this.connectionHandler.isValidSource=function(a,c){return!1};this.alternateEdgeStyle="vertical";null==d&&this.loadStylesheet();var g=this.graphHandler.getGuideStates;this.graphHandler.getGuideStates=
+function(){var a=g.apply(this,arguments);if(this.graph.pageVisible){for(var c=[],b=this.graph.pageFormat,f=this.graph.pageScale,d=b.width*f,b=b.height*f,f=this.graph.view.translate,e=this.graph.view.scale,k=this.graph.getPageLayout(),p=0;p<k.width;p++)c.push(new mxRectangle(((k.x+p)*d+f.x)*e,(k.y*b+f.y)*e,d*e,b*e));for(p=0;p<k.height;p++)c.push(new mxRectangle((k.x*d+f.x)*e,((k.y+p)*b+f.y)*e,d*e,b*e));a=c.concat(a)}return a};mxDragSource.prototype.dragElementZIndex=mxPopupMenu.prototype.zIndex;mxGuide.prototype.getGuideColor=
 function(a,c){return null==a.cell?"#ffa500":mxConstants.GUIDE_COLOR};this.graphHandler.createPreviewShape=function(a){this.previewColor="#000000"==this.graph.background?"#ffffff":mxGraphHandler.prototype.previewColor;return mxGraphHandler.prototype.createPreviewShape.apply(this,arguments)};this.graphHandler.getCells=function(a){for(var c=mxGraphHandler.prototype.getCells.apply(this,arguments),b=[],f=0;f<c.length;f++){var d=this.graph.view.getState(c[f]),d=null!=d?d.style:this.graph.getCellStyle(c[f]);
-"1"==mxUtils.getValue(d,"part","0")?(d=this.graph.model.getParent(c[f]),this.graph.model.isVertex(d)&&0>mxUtils.indexOf(c,d)&&b.push(d)):b.push(c[f])}return b};this.connectionHandler.createTargetVertex=function(a,c){var b=this.graph.view.getState(c),b=null!=b?b.style:this.graph.getCellStyle(c);mxUtils.getValue(b,"part",!1)&&(b=this.graph.model.getParent(c),this.graph.model.isVertex(b)&&(c=b));return mxConnectionHandler.prototype.createTargetVertex.apply(this,arguments)};var m=new mxRubberband(this);
-this.getRubberband=function(){return m};var n=(new Date).getTime(),u=0,r=this.connectionHandler.mouseMove;this.connectionHandler.mouseMove=function(){var a=this.currentState;r.apply(this,arguments);a!=this.currentState?(n=(new Date).getTime(),u=0):u=(new Date).getTime()-n};var k=this.connectionHandler.isOutlineConnectEvent;this.connectionHandler.isOutlineConnectEvent=function(a){return null!=this.currentState&&a.getState()==this.currentState&&2E3<u||(null==this.currentState||"0"!=mxUtils.getValue(this.currentState.style,
-"outlineConnect","1"))&&k.apply(this,arguments)};var t=this.isToggleEvent;this.isToggleEvent=function(a){return t.apply(this,arguments)||mxEvent.isShiftDown(a)};var v=m.isForceRubberbandEvent;m.isForceRubberbandEvent=function(a){return v.apply(this,arguments)||mxUtils.hasScrollbars(this.graph.container)&&mxClient.IS_FF&&mxClient.IS_WIN&&null==a.getState()&&mxEvent.isTouchEvent(a.getEvent())};var x=null;this.panningHandler.addListener(mxEvent.PAN_START,mxUtils.bind(this,function(){this.isEnabled()&&
+"1"==mxUtils.getValue(d,"part","0")?(d=this.graph.model.getParent(c[f]),this.graph.model.isVertex(d)&&0>mxUtils.indexOf(c,d)&&b.push(d)):b.push(c[f])}return b};this.connectionHandler.createTargetVertex=function(a,c){var b=this.graph.view.getState(c),b=null!=b?b.style:this.graph.getCellStyle(c);mxUtils.getValue(b,"part",!1)&&(b=this.graph.model.getParent(c),this.graph.model.isVertex(b)&&(c=b));return mxConnectionHandler.prototype.createTargetVertex.apply(this,arguments)};var p=new mxRubberband(this);
+this.getRubberband=function(){return p};var m=(new Date).getTime(),u=0,r=this.connectionHandler.mouseMove;this.connectionHandler.mouseMove=function(){var a=this.currentState;r.apply(this,arguments);a!=this.currentState?(m=(new Date).getTime(),u=0):u=(new Date).getTime()-m};var k=this.connectionHandler.isOutlineConnectEvent;this.connectionHandler.isOutlineConnectEvent=function(a){return null!=this.currentState&&a.getState()==this.currentState&&2E3<u||(null==this.currentState||"0"!=mxUtils.getValue(this.currentState.style,
+"outlineConnect","1"))&&k.apply(this,arguments)};var v=this.isToggleEvent;this.isToggleEvent=function(a){return v.apply(this,arguments)||mxEvent.isShiftDown(a)};var t=p.isForceRubberbandEvent;p.isForceRubberbandEvent=function(a){return t.apply(this,arguments)||mxUtils.hasScrollbars(this.graph.container)&&mxClient.IS_FF&&mxClient.IS_WIN&&null==a.getState()&&mxEvent.isTouchEvent(a.getEvent())};var x=null;this.panningHandler.addListener(mxEvent.PAN_START,mxUtils.bind(this,function(){this.isEnabled()&&
 (x=this.container.style.cursor,this.container.style.cursor="move")}));this.panningHandler.addListener(mxEvent.PAN_END,mxUtils.bind(this,function(){this.isEnabled()&&(this.container.style.cursor=x)}));this.popupMenuHandler.autoExpand=!0;this.popupMenuHandler.isSelectOnPopup=function(a){return mxEvent.isMouseEvent(a.getEvent())};var w=this.click;this.click=function(a){if(this.isEnabled()||a.isConsumed())return w.apply(this,arguments);var c=a.getCell();null!=c&&(c=this.getLinkForCell(c),null!=c&&window.open(c))};
-var D=this.getCursorForCell;this.getCursorForCell=function(a){if(this.isEnabled())return D.apply(this,arguments);if(null!=this.getLinkForCell(a))return"pointer"};this.selectRegion=function(a,c){var b=this.getAllCells(a.x,a.y,a.width,a.height);this.selectCellsForEvent(b,c);return b};this.getAllCells=function(a,c,b,f,d,h){h=null!=h?h:[];if(0<b||0<f){var e=this.getModel(),k=a+b,m=c+f;null==d&&(d=this.getCurrentRoot(),null==d&&(d=e.getRoot()));if(null!=d)for(var n=e.getChildCount(d),G=0;G<n;G++){var r=
-e.getChildAt(d,G),t=this.view.getState(r);if(null!=t&&this.isCellVisible(r)&&"1"!=mxUtils.getValue(t.style,"locked","0")){var v=mxUtils.getValue(t.style,mxConstants.STYLE_ROTATION)||0;0!=v&&(t=mxUtils.getBoundingBox(t,v));(e.isEdge(r)||e.isVertex(r))&&t.x>=a&&t.y+t.height<=m&&t.y>=c&&t.x+t.width<=k&&h.push(r);this.getAllCells(a,c,b,f,r,h)}}}return h};var B=this.graphHandler.shouldRemoveCellsFromParent;this.graphHandler.shouldRemoveCellsFromParent=function(a,c,b){return this.graph.isCellSelected(a)?
-!1:B.apply(this,arguments)};this.isCellLocked=function(a){for(a=this.view.getState(a);null!=a;){if("1"==mxUtils.getValue(a.style,"locked","0"))return!0;a=this.view.getState(this.model.getParent(a.cell))}return!1};var y=null;this.addListener(mxEvent.FIRE_MOUSE_EVENT,mxUtils.bind(this,function(a,c){if("mouseDown"==c.getProperty("eventName")){var b=c.getProperty("event").getState();y=null==b||this.isSelectionEmpty()||this.isCellSelected(b.cell)?null:this.getSelectionCells()}}));this.addListener(mxEvent.TAP_AND_HOLD,
-mxUtils.bind(this,function(a,c){if(!mxEvent.isMultiTouchEvent(c)){var b=c.getProperty("event"),f=c.getProperty("cell");null==f?(b=mxUtils.convertPoint(this.container,mxEvent.getClientX(b),mxEvent.getClientY(b)),m.start(b.x,b.y)):null!=y?this.addSelectionCells(y):1<this.getSelectionCount()&&this.isCellSelected(f)&&this.removeSelectionCell(f);y=null;c.consume()}}));this.connectionHandler.selectCells=function(a,c){this.graph.setSelectionCell(c||a)};this.connectionHandler.constraintHandler.isStateIgnored=
+var D=this.getCursorForCell;this.getCursorForCell=function(a){if(this.isEnabled())return D.apply(this,arguments);if(null!=this.getLinkForCell(a))return"pointer"};this.selectRegion=function(a,c){var b=this.getAllCells(a.x,a.y,a.width,a.height);this.selectCellsForEvent(b,c);return b};this.getAllCells=function(a,c,b,f,d,g){g=null!=g?g:[];if(0<b||0<f){var e=this.getModel(),k=a+b,p=c+f;null==d&&(d=this.getCurrentRoot(),null==d&&(d=e.getRoot()));if(null!=d)for(var m=e.getChildCount(d),H=0;H<m;H++){var r=
+e.getChildAt(d,H),t=this.view.getState(r);if(null!=t&&this.isCellVisible(r)&&"1"!=mxUtils.getValue(t.style,"locked","0")){var v=mxUtils.getValue(t.style,mxConstants.STYLE_ROTATION)||0;0!=v&&(t=mxUtils.getBoundingBox(t,v));(e.isEdge(r)||e.isVertex(r))&&t.x>=a&&t.y+t.height<=p&&t.y>=c&&t.x+t.width<=k&&g.push(r);this.getAllCells(a,c,b,f,r,g)}}}return g};var A=this.graphHandler.shouldRemoveCellsFromParent;this.graphHandler.shouldRemoveCellsFromParent=function(a,c,b){return this.graph.isCellSelected(a)?
+!1:A.apply(this,arguments)};this.isCellLocked=function(a){for(a=this.view.getState(a);null!=a;){if("1"==mxUtils.getValue(a.style,"locked","0"))return!0;a=this.view.getState(this.model.getParent(a.cell))}return!1};var z=null;this.addListener(mxEvent.FIRE_MOUSE_EVENT,mxUtils.bind(this,function(a,c){if("mouseDown"==c.getProperty("eventName")){var b=c.getProperty("event").getState();z=null==b||this.isSelectionEmpty()||this.isCellSelected(b.cell)?null:this.getSelectionCells()}}));this.addListener(mxEvent.TAP_AND_HOLD,
+mxUtils.bind(this,function(a,c){if(!mxEvent.isMultiTouchEvent(c)){var b=c.getProperty("event"),f=c.getProperty("cell");null==f?(b=mxUtils.convertPoint(this.container,mxEvent.getClientX(b),mxEvent.getClientY(b)),p.start(b.x,b.y)):null!=z?this.addSelectionCells(z):1<this.getSelectionCount()&&this.isCellSelected(f)&&this.removeSelectionCell(f);z=null;c.consume()}}));this.connectionHandler.selectCells=function(a,c){this.graph.setSelectionCell(c||a)};this.connectionHandler.constraintHandler.isStateIgnored=
 function(a,c){return c&&a.view.graph.isCellSelected(a.cell)};this.selectionModel.addListener(mxEvent.CHANGE,mxUtils.bind(this,function(){var a=this.connectionHandler.constraintHandler;null!=a.currentFocus&&a.isStateIgnored(a.currentFocus,!0)&&(a.currentFocus=null,a.constraints=null,a.destroyIcons());a.destroyFocusHighlight()}));Graph.touchStyle&&this.initTouch();var C=this.updateMouseEvent;this.updateMouseEvent=function(a){a=C.apply(this,arguments);this.isCellLocked(a.getCell())&&(a.state=null);return a}}};
 Graph.touchStyle=mxClient.IS_TOUCH||mxClient.IS_FF&&mxClient.IS_WIN||0<navigator.maxTouchPoints||0<navigator.msMaxTouchPoints||null==window.urlParams||"1"==urlParams.touch;Graph.fileSupport=null!=window.File&&null!=window.FileReader&&null!=window.FileList&&(null==window.urlParams||"0"!=urlParams.filesupport);Graph.lineJumpsEnabled=!0;Graph.defaultJumpSize=6;mxUtils.extend(Graph,mxGraph);Graph.prototype.minFitScale=null;Graph.prototype.maxFitScale=null;
 Graph.prototype.linkPolicy="frame"==urlParams.target?"blank":urlParams.target||"auto";Graph.prototype.linkTarget="frame"==urlParams.target?"_self":"_blank";Graph.prototype.defaultScrollbars=!mxClient.IS_IOS;Graph.prototype.defaultPageVisible=!0;Graph.prototype.lightbox=!1;Graph.prototype.defaultGraphBackground="#ffffff";Graph.prototype.scrollTileSize=new mxRectangle(0,0,400,400);Graph.prototype.transparentBackground=!0;Graph.prototype.defaultEdgeLength=80;Graph.prototype.edgeMode=!1;
 Graph.prototype.connectionArrowsEnabled=!0;Graph.prototype.placeholderPattern=RegExp("%(date{.*}|[^%^{^}]+)%","g");Graph.prototype.absoluteUrlPattern=/^(?:[a-z]+:)?\/\//i;Graph.prototype.defaultThemeName="default";Graph.prototype.defaultThemes={};Graph.prototype.baseUrl=(window!=window.top?document.referrer:document.location.toString()).split("#")[0];
-Graph.prototype.init=function(a){mxGraph.prototype.init.apply(this,arguments);this.cellRenderer.initializeLabel=function(a,e){mxCellRenderer.prototype.initializeLabel.apply(this,arguments);var b=a.view.graph.tolerance,g=!0,l=null,p=mxUtils.bind(this,function(a){g=!0;l=new mxPoint(mxEvent.getClientX(a),mxEvent.getClientY(a))}),q=mxUtils.bind(this,function(a){g=g&&null!=l&&Math.abs(l.x-mxEvent.getClientX(a))<b&&Math.abs(l.y-mxEvent.getClientY(a))<b}),c=mxUtils.bind(this,function(c){if(g)for(var b=mxEvent.getSource(c);null!=
-b&&b!=e.node;){if("a"==b.nodeName.toLowerCase()){a.view.graph.labelLinkClicked(a,b,c);break}b=b.parentNode}});mxEvent.addGestureListeners(e.node,p,q,c);mxEvent.addListener(e.node,"click",function(a){mxEvent.consume(a)})};this.initLayoutManager()};Graph.prototype.isPageLink=function(a){return!1};
+Graph.prototype.init=function(a){mxGraph.prototype.init.apply(this,arguments);this.cellRenderer.initializeLabel=function(a,e){mxCellRenderer.prototype.initializeLabel.apply(this,arguments);var b=a.view.graph.tolerance,h=!0,l=null,n=mxUtils.bind(this,function(a){h=!0;l=new mxPoint(mxEvent.getClientX(a),mxEvent.getClientY(a))}),q=mxUtils.bind(this,function(a){h=h&&null!=l&&Math.abs(l.x-mxEvent.getClientX(a))<b&&Math.abs(l.y-mxEvent.getClientY(a))<b}),c=mxUtils.bind(this,function(c){if(h)for(var b=mxEvent.getSource(c);null!=
+b&&b!=e.node;){if("a"==b.nodeName.toLowerCase()){a.view.graph.labelLinkClicked(a,b,c);break}b=b.parentNode}});mxEvent.addGestureListeners(e.node,n,q,c);mxEvent.addListener(e.node,"click",function(a){mxEvent.consume(a)})};this.initLayoutManager()};Graph.prototype.isPageLink=function(a){return!1};
 Graph.prototype.labelLinkClicked=function(a,b,e){b=b.getAttribute("href");if(null!=b&&!this.isPageLink(b)){if(!this.isEnabled()){var d=a.view.graph.isBlankLink(b)?a.view.graph.linkTarget:"_top";b=a.view.graph.getAbsoluteUrl(b);"_self"==d&&window!=window.top?window.location.href=b:b.substring(0,this.baseUrl.length)==this.baseUrl&&"#"==b.charAt(this.baseUrl.length)&&"_top"==d&&window==window.top?window.location.hash=b.split("#")[1]:(mxEvent.isLeftMouseButton(e)&&!mxEvent.isPopupTrigger(e)||mxEvent.isTouchEvent(e))&&
 window.open(b,d)}mxEvent.consume(e)}};
 Graph.prototype.initLayoutManager=function(){this.layoutManager=new mxLayoutManager(this);this.layoutManager.getLayout=function(a){var b=this.graph.view.getState(a);a=null!=b?b.style:this.graph.getCellStyle(a);return"stackLayout"==a.childLayout?(b=new mxStackLayout(this.graph,!0),b.resizeParentMax="1"==mxUtils.getValue(a,"resizeParentMax","1"),b.horizontal="1"==mxUtils.getValue(a,"horizontalStack","1"),b.resizeParent="1"==mxUtils.getValue(a,"resizeParent","1"),b.resizeLast="1"==mxUtils.getValue(a,
 "resizeLast","0"),b.marginLeft=a.marginLeft||0,b.marginRight=a.marginRight||0,b.marginTop=a.marginTop||0,b.marginBottom=a.marginBottom||0,b.fill=!0,b):"treeLayout"==a.childLayout?(b=new mxCompactTreeLayout(this.graph),b.horizontal="1"==mxUtils.getValue(a,"horizontalTree","1"),b.resizeParent="1"==mxUtils.getValue(a,"resizeParent","1"),b.groupPadding=mxUtils.getValue(a,"parentPadding",20),b.levelDistance=mxUtils.getValue(a,"treeLevelDistance",30),b.maintainParentLocation=!0,b.edgeRouting=!1,b.resetEdges=
 !1,b):"flowLayout"==a.childLayout?(b=new mxHierarchicalLayout(this.graph,mxUtils.getValue(a,"flowOrientation",mxConstants.DIRECTION_EAST)),b.resizeParent="1"==mxUtils.getValue(a,"resizeParent","1"),b.parentBorder=mxUtils.getValue(a,"parentPadding",20),b.maintainParentLocation=!0,b.intraCellSpacing=mxUtils.getValue(a,"intraCellSpacing",mxHierarchicalLayout.prototype.intraCellSpacing),b.interRankCellSpacing=mxUtils.getValue(a,"interRankCellSpacing",mxHierarchicalLayout.prototype.interRankCellSpacing),
 b.interHierarchySpacing=mxUtils.getValue(a,"interHierarchySpacing",mxHierarchicalLayout.prototype.interHierarchySpacing),b.parallelEdgeSpacing=mxUtils.getValue(a,"parallelEdgeSpacing",mxHierarchicalLayout.prototype.parallelEdgeSpacing),b):null}};Graph.prototype.getPageSize=function(){return this.pageVisible?new mxRectangle(0,0,this.pageFormat.width*this.pageScale,this.pageFormat.height*this.pageScale):this.scrollTileSize};
-Graph.prototype.getPageLayout=function(){var a=this.getPageSize(),b=this.getGraphBounds();if(0==b.width||0==b.height)return new mxRectangle(0,0,1,1);var e=Math.ceil(b.x/this.view.scale-this.view.translate.x),d=Math.ceil(b.y/this.view.scale-this.view.translate.y),g=Math.floor(e/a.width),l=Math.floor(d/a.height);return new mxRectangle(g,l,Math.ceil((e+Math.floor(b.width/this.view.scale))/a.width)-g,Math.ceil((d+Math.floor(b.height/this.view.scale))/a.height)-l)};
+Graph.prototype.getPageLayout=function(){var a=this.getPageSize(),b=this.getGraphBounds();if(0==b.width||0==b.height)return new mxRectangle(0,0,1,1);var e=Math.ceil(b.x/this.view.scale-this.view.translate.x),d=Math.ceil(b.y/this.view.scale-this.view.translate.y),h=Math.floor(e/a.width),l=Math.floor(d/a.height);return new mxRectangle(h,l,Math.ceil((e+Math.floor(b.width/this.view.scale))/a.width)-h,Math.ceil((d+Math.floor(b.height/this.view.scale))/a.height)-l)};
 Graph.prototype.sanitizeHtml=function(a,b){return html_sanitize(a,function(a){return null!=a&&"javascript:"!==a.toString().toLowerCase().substring(0,11)?a:null},function(a){return a})};Graph.prototype.updatePlaceholders=function(){var a=!1,b;for(b in this.model.cells){var e=this.model.cells[b];this.isReplacePlaceholders(e)&&(this.view.invalidate(e,!1,!1),a=!0)}a&&this.view.validate()};Graph.prototype.isReplacePlaceholders=function(a){return null!=a.value&&"object"==typeof a.value&&"1"==a.value.getAttribute("placeholders")};
 Graph.prototype.isTransparentClickEvent=function(a){return mxEvent.isAltDown(a)};Graph.prototype.isIgnoreTerminalEvent=function(a){return mxEvent.isShiftDown(a)&&mxEvent.isControlDown(a)};Graph.prototype.isSplitTarget=function(a,b,e){return!this.model.isEdge(b[0])&&!mxEvent.isAltDown(e)&&!mxEvent.isShiftDown(e)&&mxGraph.prototype.isSplitTarget.apply(this,arguments)};
 Graph.prototype.getLabel=function(a){var b=mxGraph.prototype.getLabel.apply(this,arguments);null!=b&&this.isReplacePlaceholders(a)&&null==a.getAttribute("placeholder")&&(b=this.replacePlaceholders(a,b));return b};Graph.prototype.isLabelMovable=function(a){var b=this.view.getState(a),b=null!=b?b.style:this.getCellStyle(a);return!this.isCellLocked(a)&&(this.model.isEdge(a)&&this.edgeLabelsMovable||this.model.isVertex(a)&&(this.vertexLabelsMovable||"1"==mxUtils.getValue(b,"labelMovable","0")))};
 Graph.prototype.setGridSize=function(a){this.gridSize=a;this.fireEvent(new mxEventObject("gridSizeChanged"))};Graph.prototype.getGlobalVariable=function(a){var b=null;"date"==a?b=(new Date).toLocaleDateString():"time"==a?b=(new Date).toLocaleTimeString():"timestamp"==a?b=(new Date).toLocaleString():"date{"==a.substring(0,5)&&(a=a.substring(5,a.length-1),b=this.formatDate(new Date,a));return b};
 Graph.prototype.formatDate=function(a,b,e){null==this.dateFormatCache&&(this.dateFormatCache={i18n:{dayNames:"Sun Mon Tue Wed Thu Fri Sat Sunday Monday Tuesday Wednesday Thursday Friday Saturday".split(" "),monthNames:"Jan Feb Mar Apr May Jun Jul Aug Sep Oct Nov Dec January February March April May June July August September October November December".split(" ")},masks:{"default":"ddd mmm dd yyyy HH:MM:ss",shortDate:"m/d/yy",mediumDate:"mmm d, yyyy",longDate:"mmmm d, yyyy",fullDate:"dddd, mmmm d, yyyy",
-shortTime:"h:MM TT",mediumTime:"h:MM:ss TT",longTime:"h:MM:ss TT Z",isoDate:"yyyy-mm-dd",isoTime:"HH:MM:ss",isoDateTime:"yyyy-mm-dd'T'HH:MM:ss",isoUtcDateTime:"UTC:yyyy-mm-dd'T'HH:MM:ss'Z'"}});var d=this.dateFormatCache,g=/\b(?:[PMCEA][SDP]T|(?:Pacific|Mountain|Central|Eastern|Atlantic) (?:Standard|Daylight|Prevailing) Time|(?:GMT|UTC)(?:[-+]\d{4})?)\b/g,l=/[^-+\dA-Z]/g,p=function(a,c){a=String(a);for(c=c||2;a.length<c;)a="0"+a;return a};1!=arguments.length||"[object String]"!=Object.prototype.toString.call(a)||
-/\d/.test(a)||(b=a,a=void 0);a=a?new Date(a):new Date;if(isNaN(a))throw SyntaxError("invalid date");b=String(d.masks[b]||b||d.masks["default"]);"UTC:"==b.slice(0,4)&&(b=b.slice(4),e=!0);var q=e?"getUTC":"get",c=a[q+"Date"](),f=a[q+"Day"](),h=a[q+"Month"](),m=a[q+"FullYear"](),n=a[q+"Hours"](),u=a[q+"Minutes"](),r=a[q+"Seconds"](),q=a[q+"Milliseconds"](),k=e?0:a.getTimezoneOffset(),t={d:c,dd:p(c),ddd:d.i18n.dayNames[f],dddd:d.i18n.dayNames[f+7],m:h+1,mm:p(h+1),mmm:d.i18n.monthNames[h],mmmm:d.i18n.monthNames[h+
-12],yy:String(m).slice(2),yyyy:m,h:n%12||12,hh:p(n%12||12),H:n,HH:p(n),M:u,MM:p(u),s:r,ss:p(r),l:p(q,3),L:p(99<q?Math.round(q/10):q),t:12>n?"a":"p",tt:12>n?"am":"pm",T:12>n?"A":"P",TT:12>n?"AM":"PM",Z:e?"UTC":(String(a).match(g)||[""]).pop().replace(l,""),o:(0<k?"-":"+")+p(100*Math.floor(Math.abs(k)/60)+Math.abs(k)%60,4),S:["th","st","nd","rd"][3<c%10?0:(10!=c%100-c%10)*c%10]};return b.replace(/d{1,4}|m{1,4}|yy(?:yy)?|([HhMsTt])\1?|[LloSZ]|"[^"]*"|'[^']*'/g,function(a){return a in t?t[a]:a.slice(1,
+shortTime:"h:MM TT",mediumTime:"h:MM:ss TT",longTime:"h:MM:ss TT Z",isoDate:"yyyy-mm-dd",isoTime:"HH:MM:ss",isoDateTime:"yyyy-mm-dd'T'HH:MM:ss",isoUtcDateTime:"UTC:yyyy-mm-dd'T'HH:MM:ss'Z'"}});var d=this.dateFormatCache,h=/\b(?:[PMCEA][SDP]T|(?:Pacific|Mountain|Central|Eastern|Atlantic) (?:Standard|Daylight|Prevailing) Time|(?:GMT|UTC)(?:[-+]\d{4})?)\b/g,l=/[^-+\dA-Z]/g,n=function(a,c){a=String(a);for(c=c||2;a.length<c;)a="0"+a;return a};1!=arguments.length||"[object String]"!=Object.prototype.toString.call(a)||
+/\d/.test(a)||(b=a,a=void 0);a=a?new Date(a):new Date;if(isNaN(a))throw SyntaxError("invalid date");b=String(d.masks[b]||b||d.masks["default"]);"UTC:"==b.slice(0,4)&&(b=b.slice(4),e=!0);var q=e?"getUTC":"get",c=a[q+"Date"](),f=a[q+"Day"](),g=a[q+"Month"](),p=a[q+"FullYear"](),m=a[q+"Hours"](),u=a[q+"Minutes"](),r=a[q+"Seconds"](),q=a[q+"Milliseconds"](),k=e?0:a.getTimezoneOffset(),v={d:c,dd:n(c),ddd:d.i18n.dayNames[f],dddd:d.i18n.dayNames[f+7],m:g+1,mm:n(g+1),mmm:d.i18n.monthNames[g],mmmm:d.i18n.monthNames[g+
+12],yy:String(p).slice(2),yyyy:p,h:m%12||12,hh:n(m%12||12),H:m,HH:n(m),M:u,MM:n(u),s:r,ss:n(r),l:n(q,3),L:n(99<q?Math.round(q/10):q),t:12>m?"a":"p",tt:12>m?"am":"pm",T:12>m?"A":"P",TT:12>m?"AM":"PM",Z:e?"UTC":(String(a).match(h)||[""]).pop().replace(l,""),o:(0<k?"-":"+")+n(100*Math.floor(Math.abs(k)/60)+Math.abs(k)%60,4),S:["th","st","nd","rd"][3<c%10?0:(10!=c%100-c%10)*c%10]};return b.replace(/d{1,4}|m{1,4}|yy(?:yy)?|([HhMsTt])\1?|[LloSZ]|"[^"]*"|'[^']*'/g,function(a){return a in v?v[a]:a.slice(1,
 a.length-1)})};
-Graph.prototype.createLayersDialog=function(){var a=document.createElement("div");a.style.position="absolute";for(var b=this.getModel(),e=b.getChildCount(b.root),d=0;d<e;d++)(function(d){var e=document.createElement("div");e.style.overflow="hidden";e.style.textOverflow="ellipsis";e.style.padding="2px";e.style.whiteSpace="nowrap";var g=document.createElement("input");g.style.display="inline-block";g.setAttribute("type","checkbox");b.isVisible(d)&&(g.setAttribute("checked","checked"),g.defaultChecked=
-!0);e.appendChild(g);var q=d.value||mxResources.get("background")||"Background";e.setAttribute("title",q);mxUtils.write(e,q);a.appendChild(e);mxEvent.addListener(g,"click",function(){null!=g.getAttribute("checked")?g.removeAttribute("checked"):g.setAttribute("checked","checked");b.setVisible(d,g.checked)})})(b.getChildAt(b.root,d));return a};
-Graph.prototype.replacePlaceholders=function(a,b){for(var e=[],d=0;match=this.placeholderPattern.exec(b);){var g=match[0];if(2<g.length&&"%label%"!=g&&"%tooltip%"!=g){var l=null;if(match.index>d&&"%"==b.charAt(match.index-1))l=g.substring(1);else{var p=g.substring(1,g.length-1);if(0>p.indexOf("{"))for(var q=a;null==l&&null!=q;)null!=q.value&&"object"==typeof q.value&&(l=q.hasAttribute(p)?null!=q.getAttribute(p)?q.getAttribute(p):"":null),q=this.model.getParent(q);null==l&&(l=this.getGlobalVariable(p))}e.push(b.substring(d,
-match.index)+(null!=l?l:g));d=match.index+g.length}}e.push(b.substring(d));return e.join("")};Graph.prototype.selectCellsForConnectVertex=function(a,b,e){2==a.length&&this.model.isVertex(a[1])?(this.setSelectionCell(a[1]),null!=e&&(mxEvent.isTouchEvent(b)?e.update(e.getState(this.view.getState(a[1]))):e.reset()),this.scrollCellToVisible(a[1])):this.setSelectionCells(a)};
-Graph.prototype.connectVertex=function(a,b,e,d,g,l){l=l?l:!1;var p=a.geometry.relative&&null!=a.parent.geometry?new mxPoint(a.parent.geometry.width*a.geometry.x,a.parent.geometry.height*a.geometry.y):new mxPoint(a.geometry.x,a.geometry.y);b==mxConstants.DIRECTION_NORTH?(p.x+=a.geometry.width/2,p.y-=e):b==mxConstants.DIRECTION_SOUTH?(p.x+=a.geometry.width/2,p.y+=a.geometry.height+e):(p.x=b==mxConstants.DIRECTION_WEST?p.x-e:p.x+(a.geometry.width+e),p.y+=a.geometry.height/2);e=this.view.getState(this.model.getParent(a));
-var q=this.view.scale,c=this.view.translate,f=c.x*q,c=c.y*q;this.model.isVertex(e.cell)&&(f=e.x,c=e.y);this.model.isVertex(a.parent)&&a.geometry.relative&&(p.x+=a.parent.geometry.x,p.y+=a.parent.geometry.y);l=l||mxEvent.isControlDown(d)&&!g?null:this.getCellAt(f+p.x*q,c+p.y*q);this.model.isAncestor(l,a)&&(l=null);for(e=l;null!=e;){if(this.isCellLocked(e)){l=null;break}e=this.model.getParent(e)}null!=l&&(e=this.view.getState(a),q=this.view.getState(l),null!=e&&null!=q&&mxUtils.intersects(e,q)&&(l=
-null));if(g=!mxEvent.isShiftDown(d)||g)b==mxConstants.DIRECTION_NORTH?p.y-=a.geometry.height/2:b==mxConstants.DIRECTION_SOUTH?p.y+=a.geometry.height/2:p.x=b==mxConstants.DIRECTION_WEST?p.x-a.geometry.width/2:p.x+a.geometry.width/2;null==l||this.isCellConnectable(l)||(e=this.getModel().getParent(l),this.getModel().isVertex(e)&&this.isCellConnectable(e)&&(l=e));if(l==a||this.model.isEdge(l)||!this.isCellConnectable(l))l=null;e=[];this.model.beginUpdate();try{q=l;if(null==q&&g){for(var f=a,h=this.getCellGeometry(a);null!=
-h&&h.relative;)f=this.getModel().getParent(f),h=this.getCellGeometry(f);var m=this.view.getState(f),n=null!=m?m.style:this.getCellStyle(f);if(mxUtils.getValue(n,"part",!1)){var u=this.model.getParent(f);this.model.isVertex(u)&&(f=u)}q=this.duplicateCells([f],!1)[0];h=this.getCellGeometry(q);null!=h&&(h.x=p.x-h.width/2,h.y=p.y-h.height/2)}h=null;null!=this.layoutManager&&(h=this.layoutManager.getLayout(this.model.getParent(a)));var r=mxEvent.isControlDown(d)&&g||null==l&&null!=h&&h.constructor==mxStackLayout?
-null:this.insertEdge(this.model.getParent(a),null,"",a,q,this.createCurrentEdgeStyle());if(null!=r&&this.connectionHandler.insertBeforeSource){var k=null;for(d=a;null!=d.parent&&null!=d.geometry&&d.geometry.relative&&d.parent!=r.parent;)d=this.model.getParent(d);null!=d&&null!=d.parent&&d.parent==r.parent&&(k=d.parent.getIndex(d),d.parent.insert(r,k))}null==l&&null!=q&&null!=h&&null!=a.parent&&h.constructor==mxStackLayout&&b==mxConstants.DIRECTION_WEST&&(k=a.parent.getIndex(a),a.parent.insert(q,k));
-null!=r&&e.push(r);null==l&&null!=q&&e.push(q);null==q&&null!=r&&r.geometry.setTerminalPoint(p,!1);null!=r&&this.fireEvent(new mxEventObject("cellsInserted","cells",[r]))}finally{this.model.endUpdate()}return e};
+Graph.prototype.createLayersDialog=function(){var a=document.createElement("div");a.style.position="absolute";for(var b=this.getModel(),e=b.getChildCount(b.root),d=0;d<e;d++)(function(d){var e=document.createElement("div");e.style.overflow="hidden";e.style.textOverflow="ellipsis";e.style.padding="2px";e.style.whiteSpace="nowrap";var h=document.createElement("input");h.style.display="inline-block";h.setAttribute("type","checkbox");b.isVisible(d)&&(h.setAttribute("checked","checked"),h.defaultChecked=
+!0);e.appendChild(h);var q=d.value||mxResources.get("background")||"Background";e.setAttribute("title",q);mxUtils.write(e,q);a.appendChild(e);mxEvent.addListener(h,"click",function(){null!=h.getAttribute("checked")?h.removeAttribute("checked"):h.setAttribute("checked","checked");b.setVisible(d,h.checked)})})(b.getChildAt(b.root,d));return a};
+Graph.prototype.replacePlaceholders=function(a,b){for(var e=[],d=0;match=this.placeholderPattern.exec(b);){var h=match[0];if(2<h.length&&"%label%"!=h&&"%tooltip%"!=h){var l=null;if(match.index>d&&"%"==b.charAt(match.index-1))l=h.substring(1);else{var n=h.substring(1,h.length-1);if(0>n.indexOf("{"))for(var q=a;null==l&&null!=q;)null!=q.value&&"object"==typeof q.value&&(l=q.hasAttribute(n)?null!=q.getAttribute(n)?q.getAttribute(n):"":null),q=this.model.getParent(q);null==l&&(l=this.getGlobalVariable(n))}e.push(b.substring(d,
+match.index)+(null!=l?l:h));d=match.index+h.length}}e.push(b.substring(d));return e.join("")};Graph.prototype.selectCellsForConnectVertex=function(a,b,e){2==a.length&&this.model.isVertex(a[1])?(this.setSelectionCell(a[1]),null!=e&&(mxEvent.isTouchEvent(b)?e.update(e.getState(this.view.getState(a[1]))):e.reset()),this.scrollCellToVisible(a[1])):this.setSelectionCells(a)};
+Graph.prototype.connectVertex=function(a,b,e,d,h,l){l=l?l:!1;var n=a.geometry.relative&&null!=a.parent.geometry?new mxPoint(a.parent.geometry.width*a.geometry.x,a.parent.geometry.height*a.geometry.y):new mxPoint(a.geometry.x,a.geometry.y);b==mxConstants.DIRECTION_NORTH?(n.x+=a.geometry.width/2,n.y-=e):b==mxConstants.DIRECTION_SOUTH?(n.x+=a.geometry.width/2,n.y+=a.geometry.height+e):(n.x=b==mxConstants.DIRECTION_WEST?n.x-e:n.x+(a.geometry.width+e),n.y+=a.geometry.height/2);e=this.view.getState(this.model.getParent(a));
+var q=this.view.scale,c=this.view.translate,f=c.x*q,c=c.y*q;this.model.isVertex(e.cell)&&(f=e.x,c=e.y);this.model.isVertex(a.parent)&&a.geometry.relative&&(n.x+=a.parent.geometry.x,n.y+=a.parent.geometry.y);l=l||mxEvent.isControlDown(d)&&!h?null:this.getCellAt(f+n.x*q,c+n.y*q);this.model.isAncestor(l,a)&&(l=null);for(e=l;null!=e;){if(this.isCellLocked(e)){l=null;break}e=this.model.getParent(e)}null!=l&&(e=this.view.getState(a),q=this.view.getState(l),null!=e&&null!=q&&mxUtils.intersects(e,q)&&(l=
+null));if(h=!mxEvent.isShiftDown(d)||h)b==mxConstants.DIRECTION_NORTH?n.y-=a.geometry.height/2:b==mxConstants.DIRECTION_SOUTH?n.y+=a.geometry.height/2:n.x=b==mxConstants.DIRECTION_WEST?n.x-a.geometry.width/2:n.x+a.geometry.width/2;null==l||this.isCellConnectable(l)||(e=this.getModel().getParent(l),this.getModel().isVertex(e)&&this.isCellConnectable(e)&&(l=e));if(l==a||this.model.isEdge(l)||!this.isCellConnectable(l))l=null;e=[];this.model.beginUpdate();try{q=l;if(null==q&&h){for(var f=a,g=this.getCellGeometry(a);null!=
+g&&g.relative;)f=this.getModel().getParent(f),g=this.getCellGeometry(f);var p=this.view.getState(f),m=null!=p?p.style:this.getCellStyle(f);if(mxUtils.getValue(m,"part",!1)){var u=this.model.getParent(f);this.model.isVertex(u)&&(f=u)}q=this.duplicateCells([f],!1)[0];g=this.getCellGeometry(q);null!=g&&(g.x=n.x-g.width/2,g.y=n.y-g.height/2)}g=null;null!=this.layoutManager&&(g=this.layoutManager.getLayout(this.model.getParent(a)));var r=mxEvent.isControlDown(d)&&h||null==l&&null!=g&&g.constructor==mxStackLayout?
+null:this.insertEdge(this.model.getParent(a),null,"",a,q,this.createCurrentEdgeStyle());if(null!=r&&this.connectionHandler.insertBeforeSource){var k=null;for(d=a;null!=d.parent&&null!=d.geometry&&d.geometry.relative&&d.parent!=r.parent;)d=this.model.getParent(d);null!=d&&null!=d.parent&&d.parent==r.parent&&(k=d.parent.getIndex(d),d.parent.insert(r,k))}null==l&&null!=q&&null!=g&&null!=a.parent&&g.constructor==mxStackLayout&&b==mxConstants.DIRECTION_WEST&&(k=a.parent.getIndex(a),a.parent.insert(q,k));
+null!=r&&e.push(r);null==l&&null!=q&&e.push(q);null==q&&null!=r&&r.geometry.setTerminalPoint(n,!1);null!=r&&this.fireEvent(new mxEventObject("cellsInserted","cells",[r]))}finally{this.model.endUpdate()}return e};
 Graph.prototype.getIndexableText=function(){var a=document.createElement("div"),b=[],e,d;for(d in this.model.cells)if(e=this.model.cells[d],this.model.isVertex(e)||this.model.isEdge(e))this.isHtmlLabel(e)?(a.innerHTML=this.getLabel(e),e=mxUtils.extractTextWithWhitespace([a])):e=this.getLabel(e),e=mxUtils.trim(e.replace(/[\x00-\x1F\x7F-\x9F]|\s+/g," ")),0<e.length&&b.push(e);return b.join(" ")};
 Graph.prototype.convertValueToString=function(a){if(null!=a.value&&"object"==typeof a.value){if(this.isReplacePlaceholders(a)&&null!=a.getAttribute("placeholder")){for(var b=a.getAttribute("placeholder"),e=a,d=null;null==d&&null!=e;)null!=e.value&&"object"==typeof e.value&&(d=e.hasAttribute(b)?null!=e.getAttribute(b)?e.getAttribute(b):"":null),e=this.model.getParent(e);return d||""}return a.value.getAttribute("label")}return mxGraph.prototype.convertValueToString.apply(this,arguments)};
 Graph.prototype.getLinksForState=function(a){return null!=a&&null!=a.text&&null!=a.text.node?a.text.node.getElementsByTagName("a"):null};Graph.prototype.getLinkForCell=function(a){return null!=a.value&&"object"==typeof a.value?(a=a.value.getAttribute("link"),null!=a&&"javascript:"===a.toLowerCase().substring(0,11)&&(a=a.substring(11)),a):null};
 Graph.prototype.getCellStyle=function(a){var b=mxGraph.prototype.getCellStyle.apply(this,arguments);if(null!=a&&null!=this.layoutManager){var e=this.model.getParent(a);this.model.isVertex(e)&&this.isCellCollapsed(a)&&(e=this.layoutManager.getLayout(e),null!=e&&e.constructor==mxStackLayout&&(b[mxConstants.STYLE_HORIZONTAL]=!e.horizontal))}return b};
 Graph.prototype.updateAlternateBounds=function(a,b,e){if(null!=a&&null!=b&&null!=this.layoutManager&&null!=b.alternateBounds){var d=this.layoutManager.getLayout(this.model.getParent(a));null!=d&&d.constructor==mxStackLayout&&(d.horizontal?b.alternateBounds.height=0:b.alternateBounds.width=0)}mxGraph.prototype.updateAlternateBounds.apply(this,arguments)};Graph.prototype.isMoveCellsEvent=function(a){return mxEvent.isShiftDown(a)};
-Graph.prototype.foldCells=function(a,b,e,d,g){b=null!=b?b:!1;null==e&&(e=this.getFoldableCells(this.getSelectionCells(),a));if(null!=e){this.model.beginUpdate();try{if(mxGraph.prototype.foldCells.apply(this,arguments),null!=this.layoutManager)for(var l=0;l<e.length;l++){var p=this.view.getState(e[l]),q=this.getCellGeometry(e[l]);if(null!=p&&null!=q){var c=Math.round(q.width-p.width/this.view.scale),f=Math.round(q.height-p.height/this.view.scale);if(0!=f||0!=c){var h=this.model.getParent(e[l]),m=this.layoutManager.getLayout(h);
-null==m?null!=g&&this.isMoveCellsEvent(g)&&this.moveSiblings(p,h,c,f):null!=g&&mxEvent.isAltDown(g)||m.constructor!=mxStackLayout||m.resizeLast||this.resizeParentStacks(h,m,c,f)}}}}finally{this.model.endUpdate()}this.isEnabled()&&this.setSelectionCells(e)}};
-Graph.prototype.moveSiblings=function(a,b,e,d){this.model.beginUpdate();try{var g=this.getCellsBeyond(a.x,a.y,b,!0,!0);for(b=0;b<g.length;b++)if(g[b]!=a.cell){var l=this.view.getState(g[b]),p=this.getCellGeometry(g[b]);null!=l&&null!=p&&(p=p.clone(),p.translate(Math.round(e*Math.max(0,Math.min(1,(l.x-a.x)/a.width))),Math.round(d*Math.max(0,Math.min(1,(l.y-a.y)/a.height)))),this.model.setGeometry(g[b],p))}}finally{this.model.endUpdate()}};
-Graph.prototype.resizeParentStacks=function(a,b,e,d){if(null!=this.layoutManager&&null!=b&&b.constructor==mxStackLayout&&!b.resizeLast){this.model.beginUpdate();try{for(var g=b.horizontal;null!=a&&null!=b&&b.constructor==mxStackLayout&&b.horizontal==g&&!b.resizeLast;){var l=this.getCellGeometry(a),p=this.view.getState(a);null!=p&&null!=l&&(l=l.clone(),b.horizontal?l.width+=e+Math.min(0,p.width/this.view.scale-l.width):l.height+=d+Math.min(0,p.height/this.view.scale-l.height),this.model.setGeometry(a,
+Graph.prototype.foldCells=function(a,b,e,d,h){b=null!=b?b:!1;null==e&&(e=this.getFoldableCells(this.getSelectionCells(),a));if(null!=e){this.model.beginUpdate();try{if(mxGraph.prototype.foldCells.apply(this,arguments),null!=this.layoutManager)for(var l=0;l<e.length;l++){var n=this.view.getState(e[l]),q=this.getCellGeometry(e[l]);if(null!=n&&null!=q){var c=Math.round(q.width-n.width/this.view.scale),f=Math.round(q.height-n.height/this.view.scale);if(0!=f||0!=c){var g=this.model.getParent(e[l]),p=this.layoutManager.getLayout(g);
+null==p?null!=h&&this.isMoveCellsEvent(h)&&this.moveSiblings(n,g,c,f):null!=h&&mxEvent.isAltDown(h)||p.constructor!=mxStackLayout||p.resizeLast||this.resizeParentStacks(g,p,c,f)}}}}finally{this.model.endUpdate()}this.isEnabled()&&this.setSelectionCells(e)}};
+Graph.prototype.moveSiblings=function(a,b,e,d){this.model.beginUpdate();try{var h=this.getCellsBeyond(a.x,a.y,b,!0,!0);for(b=0;b<h.length;b++)if(h[b]!=a.cell){var l=this.view.getState(h[b]),n=this.getCellGeometry(h[b]);null!=l&&null!=n&&(n=n.clone(),n.translate(Math.round(e*Math.max(0,Math.min(1,(l.x-a.x)/a.width))),Math.round(d*Math.max(0,Math.min(1,(l.y-a.y)/a.height)))),this.model.setGeometry(h[b],n))}}finally{this.model.endUpdate()}};
+Graph.prototype.resizeParentStacks=function(a,b,e,d){if(null!=this.layoutManager&&null!=b&&b.constructor==mxStackLayout&&!b.resizeLast){this.model.beginUpdate();try{for(var h=b.horizontal;null!=a&&null!=b&&b.constructor==mxStackLayout&&b.horizontal==h&&!b.resizeLast;){var l=this.getCellGeometry(a),n=this.view.getState(a);null!=n&&null!=l&&(l=l.clone(),b.horizontal?l.width+=e+Math.min(0,n.width/this.view.scale-l.width):l.height+=d+Math.min(0,n.height/this.view.scale-l.height),this.model.setGeometry(a,
 l));a=this.model.getParent(a);b=this.layoutManager.getLayout(a)}}finally{this.model.endUpdate()}}};Graph.prototype.isContainer=function(a){var b=this.view.getState(a),b=null!=b?b.style:this.getCellStyle(a);return this.isSwimlane(a)?"0"!=b.container:"1"==b.container};Graph.prototype.isCellConnectable=function(a){var b=this.view.getState(a),b=null!=b?b.style:this.getCellStyle(a);return null!=b.connectable?"0"!=b.connectable:mxGraph.prototype.isCellConnectable.apply(this,arguments)};
 Graph.prototype.selectAll=function(a){a=a||this.getDefaultParent();this.isCellLocked(a)||mxGraph.prototype.selectAll.apply(this,arguments)};Graph.prototype.selectCells=function(a,b,e){e=e||this.getDefaultParent();this.isCellLocked(e)||mxGraph.prototype.selectCells.apply(this,arguments)};Graph.prototype.getSwimlaneAt=function(a,b,e){e=e||this.getDefaultParent();return this.isCellLocked(e)?null:mxGraph.prototype.getSwimlaneAt.apply(this,arguments)};
 Graph.prototype.isCellFoldable=function(a){var b=this.view.getState(a),b=null!=b?b.style:this.getCellStyle(a);return this.foldingEnabled&&!this.isCellLocked(a)&&(this.isContainer(a)&&"0"!=b.collapsible||!this.isContainer(a)&&"1"==b.collapsible)};Graph.prototype.reset=function(){this.isEditing()&&this.stopEditing(!0);this.escape();this.isSelectionEmpty()||this.clearSelection()};
 Graph.prototype.zoom=function(a,b){a=Math.max(.01,Math.min(this.view.scale*a,160))/this.view.scale;mxGraph.prototype.zoom.apply(this,arguments)};Graph.prototype.zoomIn=function(){.15>this.view.scale?this.zoom((this.view.scale+.01)/this.view.scale):this.zoom(Math.round(this.view.scale*this.zoomFactor*20)/20/this.view.scale)};Graph.prototype.zoomOut=function(){.15>=this.view.scale?this.zoom((this.view.scale-.01)/this.view.scale):this.zoom(Math.round(1/this.zoomFactor*this.view.scale*20)/20/this.view.scale)};
-Graph.prototype.getTooltipForCell=function(a){var b="";if(mxUtils.isNode(a.value)){var e=a.value.getAttribute("tooltip");if(null!=e)null!=e&&this.isReplacePlaceholders(a)&&(e=this.replacePlaceholders(a,e)),b=this.sanitizeHtml(e);else{e=["label","tooltip","placeholders","placeholder"];a=a.value.attributes;var d=[];this.isEnabled()&&e.push("link");for(var g=0;g<a.length;g++)0>mxUtils.indexOf(e,a[g].nodeName)&&0<a[g].nodeValue.length&&d.push({name:a[g].nodeName,value:a[g].nodeValue});d.sort(function(a,
-b){return a.name<b.name?-1:a.name>b.name?1:0});for(g=0;g<d.length;g++)b+=("link"!=d[g].name?d[g].name+":":"")+mxUtils.htmlEntities(d[g].value)+"\n";0<b.length&&(b=b.substring(0,b.length-1))}}return b};Graph.prototype.stringToBytes=function(a){for(var b=Array(a.length),e=0;e<a.length;e++)b[e]=a.charCodeAt(e);return b};Graph.prototype.bytesToString=function(a){for(var b=Array(a.length),e=0;e<a.length;e++)b[e]=String.fromCharCode(a[e]);return b.join("")};
+Graph.prototype.getTooltipForCell=function(a){var b="";if(mxUtils.isNode(a.value)){var e=a.value.getAttribute("tooltip");if(null!=e)null!=e&&this.isReplacePlaceholders(a)&&(e=this.replacePlaceholders(a,e)),b=this.sanitizeHtml(e);else{e=["label","tooltip","placeholders","placeholder"];a=a.value.attributes;var d=[];this.isEnabled()&&e.push("link");for(var h=0;h<a.length;h++)0>mxUtils.indexOf(e,a[h].nodeName)&&0<a[h].nodeValue.length&&d.push({name:a[h].nodeName,value:a[h].nodeValue});d.sort(function(a,
+b){return a.name<b.name?-1:a.name>b.name?1:0});for(h=0;h<d.length;h++)"link"==d[h].name&&this.isPageLink(d[h].value)||(b+=("link"!=d[h].name?d[h].name+":":"")+mxUtils.htmlEntities(d[h].value)+"\n");0<b.length&&(b=b.substring(0,b.length-1))}}return b};Graph.prototype.stringToBytes=function(a){for(var b=Array(a.length),e=0;e<a.length;e++)b[e]=a.charCodeAt(e);return b};Graph.prototype.bytesToString=function(a){for(var b=Array(a.length),e=0;e<a.length;e++)b[e]=String.fromCharCode(a[e]);return b.join("")};
 Graph.prototype.compress=function(a){if(null==a||0==a.length||"undefined"===typeof pako)return a;a=this.bytesToString(pako.deflateRaw(encodeURIComponent(a)));return window.btoa?btoa(a):Base64.encode(a,!0)};Graph.prototype.decompress=function(a){if(null==a||0==a.length||"undefined"===typeof pako)return a;a=window.atob?atob(a):Base64.decode(a,!0);return this.zapGremlins(decodeURIComponent(this.bytesToString(pako.inflateRaw(a))))};
 Graph.prototype.zapGremlins=function(a){for(var b=[],e=0;e<a.length;e++){var d=a.charCodeAt(e);(32<=d||9==d||10==d||13==d)&&b.push(a.charAt(e))}return b.join("")};HoverIcons=function(a){this.graph=a;this.init()};HoverIcons.prototype.arrowSpacing=6;HoverIcons.prototype.updateDelay=500;HoverIcons.prototype.activationDelay=140;HoverIcons.prototype.currentState=null;HoverIcons.prototype.activeArrow=null;HoverIcons.prototype.inactiveOpacity=15;HoverIcons.prototype.checkCollisions=!0;
 HoverIcons.prototype.triangleUp=new mxImage(mxClient.IS_SVG?"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABoAAAAOCAYAAAAxDQxDAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAyJpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuMC1jMDYwIDYxLjEzNDc3NywgMjAxMC8wMi8xMi0xNzozMjowMCAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvIiB4bWxuczp4bXBNTT0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL21tLyIgeG1sbnM6c3RSZWY9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9zVHlwZS9SZXNvdXJjZVJlZiMiIHhtcDpDcmVhdG9yVG9vbD0iQWRvYmUgUGhvdG9zaG9wIENTNSBNYWNpbnRvc2giIHhtcE1NOkluc3RhbmNlSUQ9InhtcC5paWQ6N0ZBN0E3M0U5NjZGMTFFNTg5NTRDNzQwMTgwNDlEQzQiIHhtcE1NOkRvY3VtZW50SUQ9InhtcC5kaWQ6N0ZBN0E3M0Y5NjZGMTFFNTg5NTRDNzQwMTgwNDlEQzQiPiA8eG1wTU06RGVyaXZlZEZyb20gc3RSZWY6aW5zdGFuY2VJRD0ieG1wLmlpZDo3RkE3QTczQzk2NkYxMUU1ODk1NEM3NDAxODA0OURDNCIgc3RSZWY6ZG9jdW1lbnRJRD0ieG1wLmRpZDo3RkE3QTczRDk2NkYxMUU1ODk1NEM3NDAxODA0OURDNCIvPiA8L3JkZjpEZXNjcmlwdGlvbj4gPC9yZGY6UkRGPiA8L3g6eG1wbWV0YT4gPD94cGFja2V0IGVuZD0iciI/Pj625P8AAACySURBVHjaYmRY956BROABxF+A+AgpmpjIsGQjEO8CYidaWeQHtYQNiDmBeAspljGRYMlqqCUwALPMg1oWhWCxBNmyjVCHUGQRyJKlOCyBATaoQ/zItSgciFcQsATdshBSLYqC+oSZhMTCBnVYFLEWgRQuItESGGCG6o0iZFECBZagW5aAyyKQxBwKLUG2bD4Qp6FblAyVoIYlyGAmzDIWKGMmA+0AyGw2RjIKVbIAQIABAFJRHSSk2rPoAAAAAElFTkSuQmCC":
@@ -2219,13 +2220,13 @@ this.activeArrow=e,this.setDisplay("none"),mxEvent.consume(a))}));mxEvent.redire
 this.resetActiveArrow()}));return e};HoverIcons.prototype.resetActiveArrow=function(){null!=this.activeArrow&&(mxUtils.setOpacity(this.activeArrow,this.inactiveOpacity),this.activeArrow=null)};HoverIcons.prototype.getDirection=function(){var a=mxConstants.DIRECTION_EAST;this.activeArrow==this.arrowUp?a=mxConstants.DIRECTION_NORTH:this.activeArrow==this.arrowDown?a=mxConstants.DIRECTION_SOUTH:this.activeArrow==this.arrowLeft&&(a=mxConstants.DIRECTION_WEST);return a};
 HoverIcons.prototype.visitNodes=function(a){for(var b=0;b<this.elts.length;b++)null!=this.elts[b]&&a(this.elts[b])};HoverIcons.prototype.removeNodes=function(){this.visitNodes(function(a){null!=a.parentNode&&a.parentNode.removeChild(a)})};HoverIcons.prototype.setDisplay=function(a){this.visitNodes(function(b){b.style.display=a})};HoverIcons.prototype.isActive=function(){return null!=this.activeArrow&&null!=this.currentState};
 HoverIcons.prototype.drag=function(a,b,e){this.graph.popupMenuHandler.hideMenu();this.graph.stopEditing(!1);null!=this.currentState&&(this.graph.connectionHandler.start(this.currentState,b,e),this.graph.isMouseTrigger=mxEvent.isMouseEvent(a),this.graph.isMouseDown=!0,a=this.graph.selectionCellsHandler.getHandler(this.currentState.cell),null!=a&&a.setHandlesVisible(!1))};HoverIcons.prototype.getStateAt=function(a,b,e){return this.graph.view.getState(this.graph.getCellAt(b,e))};
-HoverIcons.prototype.click=function(a,b,e){var d=e.getEvent(),g=e.getGraphX(),l=e.getGraphY(),g=this.getStateAt(a,g,l);null==g||!this.graph.model.isEdge(g.cell)||mxEvent.isControlDown(d)||g.getVisibleTerminalState(!0)!=a&&g.getVisibleTerminalState(!1)!=a?null!=a&&(a=this.graph.connectVertex(a.cell,b,this.graph.defaultEdgeLength,d),this.graph.selectCellsForConnectVertex(a,d,this),2==a.length&&this.graph.model.isVertex(a[1])?(this.graph.setSelectionCell(a[1]),mxEvent.isTouchEvent(d)?this.update(this.getState(this.graph.view.getState(a[1]))):
-this.reset(),this.graph.scrollCellToVisible(a[1])):this.graph.setSelectionCells(a)):(this.graph.setSelectionCell(g.cell),this.reset());e.consume()};HoverIcons.prototype.reset=function(a){null!=a&&!a||null==this.updateThread||window.clearTimeout(this.updateThread);this.activeArrow=this.currentState=this.mouseDownPoint=null;this.removeNodes();this.bbox=null};
+HoverIcons.prototype.click=function(a,b,e){var d=e.getEvent(),h=e.getGraphX(),l=e.getGraphY(),h=this.getStateAt(a,h,l);null==h||!this.graph.model.isEdge(h.cell)||mxEvent.isControlDown(d)||h.getVisibleTerminalState(!0)!=a&&h.getVisibleTerminalState(!1)!=a?null!=a&&(a=this.graph.connectVertex(a.cell,b,this.graph.defaultEdgeLength,d),this.graph.selectCellsForConnectVertex(a,d,this),2==a.length&&this.graph.model.isVertex(a[1])?(this.graph.setSelectionCell(a[1]),mxEvent.isTouchEvent(d)?this.update(this.getState(this.graph.view.getState(a[1]))):
+this.reset(),this.graph.scrollCellToVisible(a[1])):this.graph.setSelectionCells(a)):(this.graph.setSelectionCell(h.cell),this.reset());e.consume()};HoverIcons.prototype.reset=function(a){null!=a&&!a||null==this.updateThread||window.clearTimeout(this.updateThread);this.activeArrow=this.currentState=this.mouseDownPoint=null;this.removeNodes();this.bbox=null};
 HoverIcons.prototype.repaint=function(){this.bbox=null;if(null!=this.currentState){this.currentState=this.getState(this.currentState);if(null!=this.currentState&&this.graph.model.isVertex(this.currentState.cell)&&this.graph.isCellConnectable(this.currentState.cell)){var a=mxRectangle.fromRectangle(this.currentState);null!=this.currentState.shape&&null!=this.currentState.shape.boundingBox&&(a=mxRectangle.fromRectangle(this.currentState.shape.boundingBox));a.grow(this.graph.tolerance);a.grow(this.arrowSpacing);
 var b=this.graph.selectionCellsHandler.getHandler(this.currentState.cell);null!=b&&(a.x-=b.horizontalOffset/2,a.y-=b.verticalOffset/2,a.width+=b.horizontalOffset,a.height+=b.verticalOffset,null!=b.rotationShape&&null!=b.rotationShape.node&&"hidden"!=b.rotationShape.node.style.visibility&&"none"!=b.rotationShape.node.style.display&&null!=b.rotationShape.boundingBox&&a.add(b.rotationShape.boundingBox));this.arrowUp.style.left=Math.round(this.currentState.getCenterX()-this.triangleUp.width/2-this.tolerance)+
 "px";this.arrowUp.style.top=Math.round(a.y-this.triangleUp.height-this.tolerance)+"px";mxUtils.setOpacity(this.arrowUp,this.inactiveOpacity);this.arrowRight.style.left=Math.round(a.x+a.width-this.tolerance)+"px";this.arrowRight.style.top=Math.round(this.currentState.getCenterY()-this.triangleRight.height/2-this.tolerance)+"px";mxUtils.setOpacity(this.arrowRight,this.inactiveOpacity);this.arrowDown.style.left=this.arrowUp.style.left;this.arrowDown.style.top=Math.round(a.y+a.height-this.tolerance)+
 "px";mxUtils.setOpacity(this.arrowDown,this.inactiveOpacity);this.arrowLeft.style.left=Math.round(a.x-this.triangleLeft.width-this.tolerance)+"px";this.arrowLeft.style.top=this.arrowRight.style.top;mxUtils.setOpacity(this.arrowLeft,this.inactiveOpacity);if(this.checkCollisions){var b=this.graph.getCellAt(a.x+a.width+this.triangleRight.width/2,this.currentState.getCenterY()),e=this.graph.getCellAt(a.x-this.triangleLeft.width/2,this.currentState.getCenterY()),d=this.graph.getCellAt(this.currentState.getCenterX(),
-a.y-this.triangleUp.height/2),a=this.graph.getCellAt(this.currentState.getCenterX(),a.y+a.height+this.triangleDown.height/2);null!=b&&b==e&&e==d&&d==a&&(a=d=e=b=null);var g=this.graph.getCellGeometry(this.currentState.cell),l=mxUtils.bind(this,function(a,b){var c=this.graph.model.isVertex(a)&&this.graph.getCellGeometry(a);null!=a&&!this.graph.model.isAncestor(a,this.currentState.cell)&&(null==c||null==g||c.height<6*g.height&&c.width<6*g.width)?b.style.visibility="hidden":b.style.visibility="visible"});
+a.y-this.triangleUp.height/2),a=this.graph.getCellAt(this.currentState.getCenterX(),a.y+a.height+this.triangleDown.height/2);null!=b&&b==e&&e==d&&d==a&&(a=d=e=b=null);var h=this.graph.getCellGeometry(this.currentState.cell),l=mxUtils.bind(this,function(a,b){var c=this.graph.model.isVertex(a)&&this.graph.getCellGeometry(a);null!=a&&!this.graph.model.isAncestor(a,this.currentState.cell)&&(null==c||null==h||c.height<6*h.height&&c.width<6*h.width)?b.style.visibility="hidden":b.style.visibility="visible"});
 l(b,this.arrowRight);l(e,this.arrowLeft);l(d,this.arrowUp);l(a,this.arrowDown)}else this.arrowLeft.style.visibility="visible",this.arrowRight.style.visibility="visible",this.arrowUp.style.visibility="visible",this.arrowDown.style.visibility="visible";this.graph.tooltipHandler.isEnabled()?(this.arrowLeft.setAttribute("title",mxResources.get("plusTooltip")),this.arrowRight.setAttribute("title",mxResources.get("plusTooltip")),this.arrowUp.setAttribute("title",mxResources.get("plusTooltip")),this.arrowDown.setAttribute("title",
 mxResources.get("plusTooltip"))):(this.arrowLeft.removeAttribute("title"),this.arrowRight.removeAttribute("title"),this.arrowUp.removeAttribute("title"),this.arrowDown.removeAttribute("title"))}else this.reset();null!=this.currentState&&(this.bbox=this.computeBoundingBox(),null!=this.bbox&&this.bbox.grow(10))}};
 HoverIcons.prototype.computeBoundingBox=function(){var a=this.graph.model.isEdge(this.currentState.cell)?null:mxRectangle.fromRectangle(this.currentState);this.visitNodes(function(b){null!=b.parentNode&&(b=new mxRectangle(b.offsetLeft,b.offsetTop,b.offsetWidth,b.offsetHeight),null==a?a=b:a.add(b))});return a};
@@ -2235,23 +2236,23 @@ this.setDisplay("");null!=this.currentState&&this.currentState!=a&&d<this.activa
 this.reset())}else this.reset()};HoverIcons.prototype.setCurrentState=function(a){"eastwest"!=a.style.portConstraint&&(this.graph.container.appendChild(this.arrowUp),this.graph.container.appendChild(this.arrowDown));this.graph.container.appendChild(this.arrowRight);this.graph.container.appendChild(this.arrowLeft);this.currentState=a};
 (function(){var a=mxGraphView.prototype.resetValidationState;mxGraphView.prototype.resetValidationState=function(){a.apply(this,arguments);this.validEdges=[]};var b=mxGraphView.prototype.validateCellState;mxGraphView.prototype.validateCellState=function(a,f){var c=this.getState(a);null!=c&&this.graph.model.isEdge(c.cell)&&null!=c.style&&1!=c.style[mxConstants.STYLE_CURVED]&&!c.invalid&&this.updateLineJumps(c)&&this.graph.cellRenderer.redraw(c,!1,this.isRendering());c=b.apply(this,arguments);null!=
 c&&this.graph.model.isEdge(c.cell)&&1!=c.style[mxConstants.STYLE_CURVED]&&this.validEdges.push(c);return c};var e=mxCellRenderer.prototype.isShapeInvalid;mxCellRenderer.prototype.isShapeInvalid=function(a,b){return e.apply(this,arguments)||null!=a.routedPoints&&null!=b.routedPoints&&!mxUtils.equalPoints(b.routedPoints,a.routedPoints)};var d=mxGraphView.prototype.updateCellState;mxGraphView.prototype.updateCellState=function(a){d.apply(this,arguments);this.graph.model.isEdge(a.cell)&&1!=a.style[mxConstants.STYLE_CURVED]&&
-this.updateLineJumps(a)};mxGraphView.prototype.updateLineJumps=function(a){var c=a.absolutePoints;if(Graph.lineJumpsEnabled){var b=null!=a.routedPoints,d=null;if(null!=c&&null!=this.validEdges&&"none"!==mxUtils.getValue(a.style,"jumpStyle","none")){for(var e=function(c,b,f){var h=new mxPoint(b,f);h.type=c;d.push(h);h=null!=a.routedPoints?a.routedPoints[d.length-1]:null;return null==h||h.type!=c||h.x!=b||h.y!=f},u=.5*this.scale,b=!1,d=[],r=0;r<c.length-1;r++){for(var k=c[r+1],t=c[r],v=[],g=c[r+2];r<
-c.length-2&&mxUtils.ptSegDistSq(t.x,t.y,g.x,g.y,k.x,k.y)<1*this.scale*this.scale;)k=g,r++,g=c[r+2];for(var b=e(0,t.x,t.y)||b,q=0;q<this.validEdges.length;q++){var l=this.validEdges[q],p=l.absolutePoints;if(null!=p&&mxUtils.intersects(a,l))for(l=0;l<p.length-1;l++){for(var y=p[l+1],C=p[l],g=p[l+2];l<p.length-2&&mxUtils.ptSegDistSq(C.x,C.y,g.x,g.y,y.x,y.y)<1*this.scale*this.scale;)y=g,l++,g=p[l+2];g=mxUtils.intersection(t.x,t.y,k.x,k.y,C.x,C.y,y.x,y.y);if(null!=g&&(Math.abs(g.x-C.x)>u||Math.abs(g.y-
-C.y)>u)&&(Math.abs(g.x-y.x)>u||Math.abs(g.y-y.y)>u)){y=g.x-t.x;C=g.y-t.y;g={distSq:y*y+C*C,x:g.x,y:g.y};for(y=0;y<v.length;y++)if(v[y].distSq>g.distSq){v.splice(y,0,g);g=null;break}null==g||0!=v.length&&v[v.length-1].x===g.x&&v[v.length-1].y===g.y||v.push(g)}}}for(l=0;l<v.length;l++)b=e(1,v[l].x,v[l].y)||b}g=c[c.length-1];b=e(0,g.x,g.y)||b}a.routedPoints=d;return b}return!1};var g=mxConnector.prototype.paintLine;mxConnector.prototype.paintLine=function(a,b,d){this.routedPoints=null!=this.state?this.state.routedPoints:
-null;if(this.outline||null==this.state||null==this.style||null==this.state.routedPoints||0==this.state.routedPoints.length)g.apply(this,arguments);else{var c=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2,f=(parseInt(mxUtils.getValue(this.style,"jumpSize",Graph.defaultJumpSize))-2)/2+this.strokewidth,h=mxUtils.getValue(this.style,"jumpStyle","none"),e,k=!0,t=null,v=null;e=[];var q=null;a.begin();for(var l=0;l<this.state.routedPoints.length;l++){var p=this.state.routedPoints[l],
-B=new mxPoint(p.x/this.scale,p.y/this.scale);0==l?B=b[0]:l==this.state.routedPoints.length-1&&(B=b[b.length-1]);var y=!1;if(null!=t&&1==p.type){var C=this.state.routedPoints[l+1],p=C.x/this.scale-B.x,C=C.y/this.scale-B.y,p=p*p+C*C;null==q&&(q=new mxPoint(B.x-t.x,B.y-t.y),v=Math.sqrt(q.x*q.x+q.y*q.y),q.x=q.x*f/v,q.y=q.y*f/v);p>f*f&&0<v&&(p=t.x-B.x,C=t.y-B.y,p=p*p+C*C,p>f*f&&(y=new mxPoint(B.x-q.x,B.y-q.y),p=new mxPoint(B.x+q.x,B.y+q.y),e.push(y),this.addPoints(a,e,d,c,!1,null,k),e=0>Math.round(q.x)||
-0==Math.round(q.x)&&0>=Math.round(q.y)?1:-1,k=!1,"sharp"==h?(a.lineTo(y.x-q.y*e,y.y+q.x*e),a.lineTo(p.x-q.y*e,p.y+q.x*e),a.lineTo(p.x,p.y)):"arc"==h?(e*=1.3,a.curveTo(y.x-q.y*e,y.y+q.x*e,p.x-q.y*e,p.y+q.x*e,p.x,p.y)):(a.moveTo(p.x,p.y),k=!0),e=[p],y=!0))}else q=null;y||(e.push(B),t=B)}this.addPoints(a,e,d,c,!1,null,k);a.stroke()}};var l=mxGraphView.prototype.updateFloatingTerminalPoint;mxGraphView.prototype.updateFloatingTerminalPoint=function(a,b,d,e){if(null==b||null==a||"1"!=b.style.snapToPoint&&
-"1"!=a.style.snapToPoint)l.apply(this,arguments);else{b=this.getTerminalPort(a,b,e);var c=this.getNextPoint(a,d,e),f=this.graph.isOrthogonal(a),h=mxUtils.toRadians(Number(b.style[mxConstants.STYLE_ROTATION]||"0")),k=new mxPoint(b.getCenterX(),b.getCenterY());if(0!=h)var m=Math.cos(-h),v=Math.sin(-h),c=mxUtils.getRotatedPoint(c,m,v,k);m=parseFloat(a.style[mxConstants.STYLE_PERIMETER_SPACING]||0);m+=parseFloat(a.style[e?mxConstants.STYLE_SOURCE_PERIMETER_SPACING:mxConstants.STYLE_TARGET_PERIMETER_SPACING]||
-0);c=this.getPerimeterPoint(b,c,0==h&&f,m);0!=h&&(m=Math.cos(h),v=Math.sin(h),c=mxUtils.getRotatedPoint(c,m,v,k));a.setAbsoluteTerminalPoint(this.snapToAnchorPoint(a,b,d,e,c),e)}};mxGraphView.prototype.snapToAnchorPoint=function(a,b,d,e,n){if(null!=b&&null!=a){a=this.graph.getAllConnectionConstraints(b);e=d=null;for(var c=0;c<a.length;c++){var f=this.graph.getConnectionPoint(b,a[c]);if(null!=f){var h=(f.x-n.x)*(f.x-n.x)+(f.y-n.y)*(f.y-n.y);if(null==e||h<e)d=f,e=h}}null!=d&&(n=d)}return n};var p=mxStencil.prototype.evaluateTextAttribute;
-mxStencil.prototype.evaluateTextAttribute=function(a,b,d){var c=p.apply(this,arguments);"1"==a.getAttribute("placeholders")&&null!=d.state&&(c=d.state.view.graph.replacePlaceholders(d.state.cell,c));return c};var q=mxCellRenderer.prototype.createShape;mxCellRenderer.prototype.createShape=function(a){if(null!=a.style&&"undefined"!==typeof pako){var c=mxUtils.getValue(a.style,mxConstants.STYLE_SHAPE,null);if(null!=c&&"stencil("==c.substring(0,8))try{var b=c.substring(8,c.length-1),d=mxUtils.parseXml(a.view.graph.decompress(b));
-return new mxShape(new mxStencil(d.documentElement))}catch(n){null!=window.console&&console.log("Error in shape: "+n)}}return q.apply(this,arguments)}})();mxStencilRegistry.libraries={};mxStencilRegistry.dynamicLoading=!0;mxStencilRegistry.packages=[];
-mxStencilRegistry.getStencil=function(a){var b=mxStencilRegistry.stencils[a];if(null==b&&null==mxCellRenderer.prototype.defaultShapes[a]&&mxStencilRegistry.dynamicLoading){var e=mxStencilRegistry.getBasenameForStencil(a);if(null!=e){b=mxStencilRegistry.libraries[e];if(null!=b){if(null==mxStencilRegistry.packages[e]){for(var d=0;d<b.length;d++){var g=b[d];if(".xml"==g.toLowerCase().substring(g.length-4,g.length))mxStencilRegistry.loadStencilSet(g,null);else if(".js"==g.toLowerCase().substring(g.length-
-3,g.length))try{var l=mxUtils.load(g);null!=l&&200<=l.getStatus()&&299>=l.getStatus()&&eval.call(window,l.getText())}catch(p){null!=window.console&&console.log("error in getStencil:",g,p)}}mxStencilRegistry.packages[e]=1}}else e=e.replace("_-_","_"),mxStencilRegistry.loadStencilSet(STENCIL_PATH+"/"+e+".xml",null);b=mxStencilRegistry.stencils[a]}}return b};
+this.updateLineJumps(a)};mxGraphView.prototype.updateLineJumps=function(a){var c=a.absolutePoints;if(Graph.lineJumpsEnabled){var b=null!=a.routedPoints,d=null;if(null!=c&&null!=this.validEdges&&"none"!==mxUtils.getValue(a.style,"jumpStyle","none")){for(var e=function(c,b,f){var g=new mxPoint(b,f);g.type=c;d.push(g);g=null!=a.routedPoints?a.routedPoints[d.length-1]:null;return null==g||g.type!=c||g.x!=b||g.y!=f},u=.5*this.scale,b=!1,d=[],r=0;r<c.length-1;r++){for(var k=c[r+1],v=c[r],t=[],h=c[r+2];r<
+c.length-2&&mxUtils.ptSegDistSq(v.x,v.y,h.x,h.y,k.x,k.y)<1*this.scale*this.scale;)k=h,r++,h=c[r+2];for(var b=e(0,v.x,v.y)||b,q=0;q<this.validEdges.length;q++){var l=this.validEdges[q],n=l.absolutePoints;if(null!=n&&mxUtils.intersects(a,l))for(l=0;l<n.length-1;l++){for(var z=n[l+1],C=n[l],h=n[l+2];l<n.length-2&&mxUtils.ptSegDistSq(C.x,C.y,h.x,h.y,z.x,z.y)<1*this.scale*this.scale;)z=h,l++,h=n[l+2];h=mxUtils.intersection(v.x,v.y,k.x,k.y,C.x,C.y,z.x,z.y);if(null!=h&&(Math.abs(h.x-C.x)>u||Math.abs(h.y-
+C.y)>u)&&(Math.abs(h.x-z.x)>u||Math.abs(h.y-z.y)>u)){z=h.x-v.x;C=h.y-v.y;h={distSq:z*z+C*C,x:h.x,y:h.y};for(z=0;z<t.length;z++)if(t[z].distSq>h.distSq){t.splice(z,0,h);h=null;break}null==h||0!=t.length&&t[t.length-1].x===h.x&&t[t.length-1].y===h.y||t.push(h)}}}for(l=0;l<t.length;l++)b=e(1,t[l].x,t[l].y)||b}h=c[c.length-1];b=e(0,h.x,h.y)||b}a.routedPoints=d;return b}return!1};var h=mxConnector.prototype.paintLine;mxConnector.prototype.paintLine=function(a,b,d){this.routedPoints=null!=this.state?this.state.routedPoints:
+null;if(this.outline||null==this.state||null==this.style||null==this.state.routedPoints||0==this.state.routedPoints.length)h.apply(this,arguments);else{var c=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2,f=(parseInt(mxUtils.getValue(this.style,"jumpSize",Graph.defaultJumpSize))-2)/2+this.strokewidth,g=mxUtils.getValue(this.style,"jumpStyle","none"),e,k=!0,v=null,t=null;e=[];var q=null;a.begin();for(var l=0;l<this.state.routedPoints.length;l++){var n=this.state.routedPoints[l],
+A=new mxPoint(n.x/this.scale,n.y/this.scale);0==l?A=b[0]:l==this.state.routedPoints.length-1&&(A=b[b.length-1]);var z=!1;if(null!=v&&1==n.type){var C=this.state.routedPoints[l+1],n=C.x/this.scale-A.x,C=C.y/this.scale-A.y,n=n*n+C*C;null==q&&(q=new mxPoint(A.x-v.x,A.y-v.y),t=Math.sqrt(q.x*q.x+q.y*q.y),q.x=q.x*f/t,q.y=q.y*f/t);n>f*f&&0<t&&(n=v.x-A.x,C=v.y-A.y,n=n*n+C*C,n>f*f&&(z=new mxPoint(A.x-q.x,A.y-q.y),n=new mxPoint(A.x+q.x,A.y+q.y),e.push(z),this.addPoints(a,e,d,c,!1,null,k),e=0>Math.round(q.x)||
+0==Math.round(q.x)&&0>=Math.round(q.y)?1:-1,k=!1,"sharp"==g?(a.lineTo(z.x-q.y*e,z.y+q.x*e),a.lineTo(n.x-q.y*e,n.y+q.x*e),a.lineTo(n.x,n.y)):"arc"==g?(e*=1.3,a.curveTo(z.x-q.y*e,z.y+q.x*e,n.x-q.y*e,n.y+q.x*e,n.x,n.y)):(a.moveTo(n.x,n.y),k=!0),e=[n],z=!0))}else q=null;z||(e.push(A),v=A)}this.addPoints(a,e,d,c,!1,null,k);a.stroke()}};var l=mxGraphView.prototype.updateFloatingTerminalPoint;mxGraphView.prototype.updateFloatingTerminalPoint=function(a,b,d,e){if(null==b||null==a||"1"!=b.style.snapToPoint&&
+"1"!=a.style.snapToPoint)l.apply(this,arguments);else{b=this.getTerminalPort(a,b,e);var c=this.getNextPoint(a,d,e),f=this.graph.isOrthogonal(a),g=mxUtils.toRadians(Number(b.style[mxConstants.STYLE_ROTATION]||"0")),k=new mxPoint(b.getCenterX(),b.getCenterY());if(0!=g)var p=Math.cos(-g),t=Math.sin(-g),c=mxUtils.getRotatedPoint(c,p,t,k);p=parseFloat(a.style[mxConstants.STYLE_PERIMETER_SPACING]||0);p+=parseFloat(a.style[e?mxConstants.STYLE_SOURCE_PERIMETER_SPACING:mxConstants.STYLE_TARGET_PERIMETER_SPACING]||
+0);c=this.getPerimeterPoint(b,c,0==g&&f,p);0!=g&&(p=Math.cos(g),t=Math.sin(g),c=mxUtils.getRotatedPoint(c,p,t,k));a.setAbsoluteTerminalPoint(this.snapToAnchorPoint(a,b,d,e,c),e)}};mxGraphView.prototype.snapToAnchorPoint=function(a,b,d,e,m){if(null!=b&&null!=a){a=this.graph.getAllConnectionConstraints(b);e=d=null;for(var c=0;c<a.length;c++){var f=this.graph.getConnectionPoint(b,a[c]);if(null!=f){var g=(f.x-m.x)*(f.x-m.x)+(f.y-m.y)*(f.y-m.y);if(null==e||g<e)d=f,e=g}}null!=d&&(m=d)}return m};var n=mxStencil.prototype.evaluateTextAttribute;
+mxStencil.prototype.evaluateTextAttribute=function(a,b,d){var c=n.apply(this,arguments);"1"==a.getAttribute("placeholders")&&null!=d.state&&(c=d.state.view.graph.replacePlaceholders(d.state.cell,c));return c};var q=mxCellRenderer.prototype.createShape;mxCellRenderer.prototype.createShape=function(a){if(null!=a.style&&"undefined"!==typeof pako){var c=mxUtils.getValue(a.style,mxConstants.STYLE_SHAPE,null);if(null!=c&&"stencil("==c.substring(0,8))try{var b=c.substring(8,c.length-1),d=mxUtils.parseXml(a.view.graph.decompress(b));
+return new mxShape(new mxStencil(d.documentElement))}catch(m){null!=window.console&&console.log("Error in shape: "+m)}}return q.apply(this,arguments)}})();mxStencilRegistry.libraries={};mxStencilRegistry.dynamicLoading=!0;mxStencilRegistry.packages=[];
+mxStencilRegistry.getStencil=function(a){var b=mxStencilRegistry.stencils[a];if(null==b&&null==mxCellRenderer.prototype.defaultShapes[a]&&mxStencilRegistry.dynamicLoading){var e=mxStencilRegistry.getBasenameForStencil(a);if(null!=e){b=mxStencilRegistry.libraries[e];if(null!=b){if(null==mxStencilRegistry.packages[e]){for(var d=0;d<b.length;d++){var h=b[d];if(".xml"==h.toLowerCase().substring(h.length-4,h.length))mxStencilRegistry.loadStencilSet(h,null);else if(".js"==h.toLowerCase().substring(h.length-
+3,h.length))try{var l=mxUtils.load(h);null!=l&&200<=l.getStatus()&&299>=l.getStatus()&&eval.call(window,l.getText())}catch(n){null!=window.console&&console.log("error in getStencil:",h,n)}}mxStencilRegistry.packages[e]=1}}else e=e.replace("_-_","_"),mxStencilRegistry.loadStencilSet(STENCIL_PATH+"/"+e+".xml",null);b=mxStencilRegistry.stencils[a]}}return b};
 mxStencilRegistry.getBasenameForStencil=function(a){var b=null;if(null!=a&&(a=a.split("."),0<a.length&&"mxgraph"==a[0]))for(var b=a[1],e=2;e<a.length-1;e++)b+="/"+a[e];return b};
-mxStencilRegistry.loadStencilSet=function(a,b,e,d){var g=mxStencilRegistry.packages[a];if(null!=e&&e||null==g){var l=!1;if(null==g)try{if(d){var p=mxUtils.get(a,mxUtils.bind(this,function(d){200<=d.getStatus()&&299>=d.getStatus()&&(g=d.getXml(),mxStencilRegistry.packages[a]=g,l=!0,null!=g&&null!=g.documentElement&&mxStencilRegistry.parseStencilSet(g.documentElement,b,l))}));return}p=mxUtils.load(a);g=p.getXml();mxStencilRegistry.packages[a]=g;l=!0}catch(q){null!=window.console&&console.log("error in loadStencilSet:",
-a,q)}null!=g&&null!=g.documentElement&&mxStencilRegistry.parseStencilSet(g.documentElement,b,l)}};mxStencilRegistry.parseStencilSets=function(a){for(var b=0;b<a.length;b++)mxStencilRegistry.parseStencilSet(mxUtils.parseXml(a[b]).documentElement)};
-mxStencilRegistry.parseStencilSet=function(a,b,e){if("stencils"==a.nodeName)for(var d=a.firstChild;null!=d;)"shapes"==d.nodeName&&mxStencilRegistry.parseStencilSet(d,b,e),d=d.nextSibling;else{e=null!=e?e:!0;var d=a.firstChild,g="";a=a.getAttribute("name");for(null!=a&&(g=a+".");null!=d;){if(d.nodeType==mxConstants.NODETYPE_ELEMENT&&(a=d.getAttribute("name"),null!=a)){var g=g.toLowerCase(),l=a.replace(/ /g,"_");e&&mxStencilRegistry.addStencil(g+l.toLowerCase(),new mxStencil(d));if(null!=b){var p=d.getAttribute("w"),
-q=d.getAttribute("h"),p=null==p?80:parseInt(p,10),q=null==q?80:parseInt(q,10);b(g,l,a,p,q)}}d=d.nextSibling}}};
+mxStencilRegistry.loadStencilSet=function(a,b,e,d){var h=mxStencilRegistry.packages[a];if(null!=e&&e||null==h){var l=!1;if(null==h)try{if(d){var n=mxUtils.get(a,mxUtils.bind(this,function(d){200<=d.getStatus()&&299>=d.getStatus()&&(h=d.getXml(),mxStencilRegistry.packages[a]=h,l=!0,null!=h&&null!=h.documentElement&&mxStencilRegistry.parseStencilSet(h.documentElement,b,l))}));return}n=mxUtils.load(a);h=n.getXml();mxStencilRegistry.packages[a]=h;l=!0}catch(q){null!=window.console&&console.log("error in loadStencilSet:",
+a,q)}null!=h&&null!=h.documentElement&&mxStencilRegistry.parseStencilSet(h.documentElement,b,l)}};mxStencilRegistry.parseStencilSets=function(a){for(var b=0;b<a.length;b++)mxStencilRegistry.parseStencilSet(mxUtils.parseXml(a[b]).documentElement)};
+mxStencilRegistry.parseStencilSet=function(a,b,e){if("stencils"==a.nodeName)for(var d=a.firstChild;null!=d;)"shapes"==d.nodeName&&mxStencilRegistry.parseStencilSet(d,b,e),d=d.nextSibling;else{e=null!=e?e:!0;var d=a.firstChild,h="";a=a.getAttribute("name");for(null!=a&&(h=a+".");null!=d;){if(d.nodeType==mxConstants.NODETYPE_ELEMENT&&(a=d.getAttribute("name"),null!=a)){var h=h.toLowerCase(),l=a.replace(/ /g,"_");e&&mxStencilRegistry.addStencil(h+l.toLowerCase(),new mxStencil(d));if(null!=b){var n=d.getAttribute("w"),
+q=d.getAttribute("h"),n=null==n?80:parseInt(n,10),q=null==q?80:parseInt(q,10);b(h,l,a,n,q)}}d=d.nextSibling}}};
 "undefined"!=typeof mxVertexHandler&&function(){function a(){var a=document.createElement("div");a.className="geHint";a.style.whiteSpace="nowrap";a.style.position="absolute";return a}mxConstants.HANDLE_FILLCOLOR="#99ccff";mxConstants.HANDLE_STROKECOLOR="#0088cf";mxConstants.VERTEX_SELECTION_COLOR="#00a8ff";mxConstants.OUTLINE_COLOR="#00a8ff";mxConstants.OUTLINE_HANDLE_FILLCOLOR="#99ccff";mxConstants.OUTLINE_HANDLE_STROKECOLOR="#00a8ff";mxConstants.CONNECT_HANDLE_FILLCOLOR="#cee7ff";mxConstants.EDGE_SELECTION_COLOR=
 "#00a8ff";mxConstants.DEFAULT_VALID_COLOR="#00a8ff";mxConstants.LABEL_HANDLE_FILLCOLOR="#cee7ff";mxConstants.GUIDE_COLOR="#0088cf";mxConstants.HIGHLIGHT_OPACITY=30;mxConstants.HIGHLIGHT_SIZE=8;mxEdgeHandler.prototype.snapToTerminals=!0;mxGraphHandler.prototype.guidesEnabled=!0;mxGuide.prototype.isEnabledForEvent=function(a){return!mxEvent.isAltDown(a)};var b=mxConnectionHandler.prototype.isCreateTarget;mxConnectionHandler.prototype.isCreateTarget=function(a){return mxEvent.isControlDown(a)||b.apply(this,
 arguments)};mxConstraintHandler.prototype.createHighlightShape=function(){var a=new mxEllipse(null,this.highlightColor,this.highlightColor,0);a.opacity=mxConstants.HIGHLIGHT_OPACITY;return a};mxConnectionHandler.prototype.livePreview=!0;mxConnectionHandler.prototype.cursor="crosshair";mxConnectionHandler.prototype.createEdgeState=function(a){a=this.graph.createCurrentEdgeStyle();a=this.graph.createEdge(null,null,null,null,null,a);a=new mxCellState(this.graph.view,a,this.graph.getCellStyle(a));for(var c in this.graph.currentEdgeStyle)a.style[c]=
@@ -2259,71 +2260,71 @@ this.graph.currentEdgeStyle[c];return a};var e=mxConnectionHandler.prototype.cre
 c.apply(this,arguments);this.error=null;return b});return a};Graph.prototype.defaultVertexStyle={};Graph.prototype.defaultEdgeStyle={edgeStyle:"orthogonalEdgeStyle",rounded:"0",jettySize:"auto",orthogonalLoop:"1"};Graph.prototype.createCurrentEdgeStyle=function(){var a="edgeStyle="+(this.currentEdgeStyle.edgeStyle||"none")+";";null!=this.currentEdgeStyle.shape&&(a+="shape="+this.currentEdgeStyle.shape+";");null!=this.currentEdgeStyle.curved&&(a+="curved="+this.currentEdgeStyle.curved+";");null!=this.currentEdgeStyle.rounded&&
 (a+="rounded="+this.currentEdgeStyle.rounded+";");null!=this.currentEdgeStyle.comic&&(a+="comic="+this.currentEdgeStyle.comic+";");null!=this.currentEdgeStyle.jumpStyle&&(a+="jumpStyle="+this.currentEdgeStyle.jumpStyle+";");null!=this.currentEdgeStyle.jumpSize&&(a+="jumpSize="+this.currentEdgeStyle.jumpSize+";");"elbowEdgeStyle"==this.currentEdgeStyle.edgeStyle&&null!=this.currentEdgeStyle.elbow&&(a+="elbow="+this.currentEdgeStyle.elbow+";");return a=null!=this.currentEdgeStyle.html?a+("html="+this.currentEdgeStyle.html+
 ";"):a+"html=1;"};Graph.prototype.getPagePadding=function(){return new mxPoint(0,0)};Graph.prototype.loadStylesheet=function(){var a=null!=this.themes?this.themes[this.defaultThemeName]:mxStyleRegistry.dynamicLoading?mxUtils.load(STYLE_PATH+"/default.xml").getDocumentElement():null;null!=a&&(new mxCodec(a.ownerDocument)).decode(a,this.getStylesheet())};Graph.prototype.getAllConnectionConstraints=function(a,c){if(null!=a){var b=mxUtils.getValue(a.style,"points",null);if(null!=b){var f=[];try{for(var d=
-JSON.parse(b),b=0;b<d.length;b++){var e=d[b];f.push(new mxConnectionConstraint(new mxPoint(e[0],e[1]),2<e.length?"0"!=e[2]:!0))}}catch(W){}return f}if(null!=a.shape)if(null!=a.shape.stencil){if(null!=a.shape.stencil)return a.shape.stencil.constraints}else if(null!=a.shape.constraints)return a.shape.constraints}return null};Graph.prototype.flipEdge=function(a){if(null!=a){var c=this.view.getState(a),c=null!=c?c.style:this.getCellStyle(a);null!=c&&(c=mxUtils.getValue(c,mxConstants.STYLE_ELBOW,mxConstants.ELBOW_HORIZONTAL)==
+JSON.parse(b),b=0;b<d.length;b++){var e=d[b];f.push(new mxConnectionConstraint(new mxPoint(e[0],e[1]),2<e.length?"0"!=e[2]:!0))}}catch(Y){}return f}if(null!=a.shape)if(null!=a.shape.stencil){if(null!=a.shape.stencil)return a.shape.stencil.constraints}else if(null!=a.shape.constraints)return a.shape.constraints}return null};Graph.prototype.flipEdge=function(a){if(null!=a){var c=this.view.getState(a),c=null!=c?c.style:this.getCellStyle(a);null!=c&&(c=mxUtils.getValue(c,mxConstants.STYLE_ELBOW,mxConstants.ELBOW_HORIZONTAL)==
 mxConstants.ELBOW_HORIZONTAL?mxConstants.ELBOW_VERTICAL:mxConstants.ELBOW_HORIZONTAL,this.setCellStyles(mxConstants.STYLE_ELBOW,c,[a]))}};Graph.prototype.isValidRoot=function(a){for(var c=this.model.getChildCount(a),b=0,f=0;f<c;f++){var d=this.model.getChildAt(a,f);this.model.isVertex(d)&&(d=this.getCellGeometry(d),null==d||d.relative||b++)}return 0<b||this.isContainer(a)};Graph.prototype.isValidDropTarget=function(a){var c=this.view.getState(a),c=null!=c?c.style:this.getCellStyle(a);return"1"!=mxUtils.getValue(c,
 "part","0")&&(this.isContainer(a)||mxGraph.prototype.isValidDropTarget.apply(this,arguments)&&"0"!=mxUtils.getValue(c,"dropTarget","1"))};Graph.prototype.createGroupCell=function(){var a=mxGraph.prototype.createGroupCell.apply(this,arguments);a.setStyle("group");return a};Graph.prototype.isExtendParentsOnAdd=function(a){var c=mxGraph.prototype.isExtendParentsOnAdd.apply(this,arguments);if(c&&null!=a&&null!=this.layoutManager){var b=this.model.getParent(a);null!=b&&(b=this.layoutManager.getLayout(b),
-null!=b&&b.constructor==mxStackLayout&&(c=!1))}return c};Graph.prototype.getPreferredSizeForCell=function(a){var c=mxGraph.prototype.getPreferredSizeForCell.apply(this,arguments);null!=c&&(c.width+=10,c.height+=4,this.gridEnabled&&(c.width=this.snap(c.width),c.height=this.snap(c.height)));return c};Graph.prototype.turnShapes=function(a){var c=this.getModel(),b=[];c.beginUpdate();try{for(var f=0;f<a.length;f++){var d=a[f];if(c.isEdge(d)){var e=c.getTerminal(d,!0),h=c.getTerminal(d,!1);c.setTerminal(d,
-h,!0);c.setTerminal(d,e,!1);var k=c.getGeometry(d);if(null!=k){k=k.clone();null!=k.points&&k.points.reverse();var m=k.getTerminalPoint(!0),n=k.getTerminalPoint(!1);k.setTerminalPoint(m,!1);k.setTerminalPoint(n,!0);c.setGeometry(d,k);var t=this.view.getState(d),r=this.view.getState(e),v=this.view.getState(h);if(null!=t){var g=null!=r?this.getConnectionConstraint(t,r,!0):null,G=null!=v?this.getConnectionConstraint(t,v,!1):null;this.setConnectionConstraint(d,e,!0,G);this.setConnectionConstraint(d,h,
-!1,g)}b.push(d)}}else if(c.isVertex(d)&&(k=this.getCellGeometry(d),null!=k)){k=k.clone();k.x+=k.width/2-k.height/2;k.y+=k.height/2-k.width/2;var q=k.width;k.width=k.height;k.height=q;c.setGeometry(d,k);var u=this.view.getState(d);if(null!=u){var l=u.style[mxConstants.STYLE_DIRECTION]||"east";"east"==l?l="south":"south"==l?l="west":"west"==l?l="north":"north"==l&&(l="east");this.setCellStyles(mxConstants.STYLE_DIRECTION,l,[d])}b.push(d)}}}finally{c.endUpdate()}return b};Graph.prototype.processChange=
+null!=b&&b.constructor==mxStackLayout&&(c=!1))}return c};Graph.prototype.getPreferredSizeForCell=function(a){var c=mxGraph.prototype.getPreferredSizeForCell.apply(this,arguments);null!=c&&(c.width+=10,c.height+=4,this.gridEnabled&&(c.width=this.snap(c.width),c.height=this.snap(c.height)));return c};Graph.prototype.turnShapes=function(a){var c=this.getModel(),b=[];c.beginUpdate();try{for(var f=0;f<a.length;f++){var d=a[f];if(c.isEdge(d)){var e=c.getTerminal(d,!0),g=c.getTerminal(d,!1);c.setTerminal(d,
+g,!0);c.setTerminal(d,e,!1);var k=c.getGeometry(d);if(null!=k){k=k.clone();null!=k.points&&k.points.reverse();var p=k.getTerminalPoint(!0),m=k.getTerminalPoint(!1);k.setTerminalPoint(p,!1);k.setTerminalPoint(m,!0);c.setGeometry(d,k);var t=this.view.getState(d),r=this.view.getState(e),v=this.view.getState(g);if(null!=t){var h=null!=r?this.getConnectionConstraint(t,r,!0):null,H=null!=v?this.getConnectionConstraint(t,v,!1):null;this.setConnectionConstraint(d,e,!0,H);this.setConnectionConstraint(d,g,
+!1,h)}b.push(d)}}else if(c.isVertex(d)&&(k=this.getCellGeometry(d),null!=k)){k=k.clone();k.x+=k.width/2-k.height/2;k.y+=k.height/2-k.width/2;var q=k.width;k.width=k.height;k.height=q;c.setGeometry(d,k);var u=this.view.getState(d);if(null!=u){var l=u.style[mxConstants.STYLE_DIRECTION]||"east";"east"==l?l="south":"south"==l?l="west":"west"==l?l="north":"north"==l&&(l="east");this.setCellStyles(mxConstants.STYLE_DIRECTION,l,[d])}b.push(d)}}}finally{c.endUpdate()}return b};Graph.prototype.processChange=
 function(a){mxGraph.prototype.processChange.apply(this,arguments);if(a instanceof mxValueChange&&null!=a.cell.value&&"object"==typeof a.cell.value){var c=this.model.getDescendants(a.cell);if(0<c.length)for(var b=0;b<c.length;b++)this.isReplacePlaceholders(c[b])&&this.view.invalidate(c[b],!1,!1)}};Graph.prototype.cellLabelChanged=function(a,c,b){c=this.zapGremlins(c);this.model.beginUpdate();try{if(null!=a.value&&"object"==typeof a.value){if(this.isReplacePlaceholders(a)&&null!=a.getAttribute("placeholder"))for(var f=
-a.getAttribute("placeholder"),d=a;null!=d;){if(d==this.model.getRoot()||null!=d.value&&"object"==typeof d.value&&d.hasAttribute(f)){this.setAttributeForCell(d,f,c);break}d=this.model.getParent(d)}var e=a.value.cloneNode(!0);e.setAttribute("label",c);c=e}mxGraph.prototype.cellLabelChanged.apply(this,arguments)}finally{this.model.endUpdate()}};Graph.prototype.removeCellsAfterUngroup=function(a){for(var c=[],b=0;b<a.length;b++)if(this.isCellDeletable(a[b])){var f=this.view.getState(a[b]);if(null!=f){var d=
-mxUtils.getValue(f.style,mxConstants.STYLE_STROKECOLOR,mxConstants.NONE),f=mxUtils.getValue(f.style,mxConstants.STYLE_FILLCOLOR,mxConstants.NONE);d==mxConstants.NONE&&f==mxConstants.NONE&&c.push(a[b])}}a=c;mxGraph.prototype.removeCellsAfterUngroup.apply(this,arguments)};Graph.prototype.setLinkForCell=function(a,c){this.setAttributeForCell(a,"link",c)};Graph.prototype.setTooltipForCell=function(a,c){this.setAttributeForCell(a,"tooltip",c)};Graph.prototype.setAttributeForCell=function(a,c,b){var f;
-null!=a.value&&"object"==typeof a.value?f=a.value.cloneNode(!0):(f=mxUtils.createXmlDocument().createElement("UserObject"),f.setAttribute("label",a.value||""));null!=b&&0<b.length?f.setAttribute(c,b):f.removeAttribute(c);this.model.setValue(a,f)};Graph.prototype.getDropTarget=function(a,c,b,f){this.getModel();if(mxEvent.isAltDown(c))return null;for(var d=0;d<a.length;d++)if(this.model.isEdge(this.model.getParent(a[d])))return null;return mxGraph.prototype.getDropTarget.apply(this,arguments)};Graph.prototype.click=
-function(a){mxGraph.prototype.click.call(this,a);this.firstClickState=a.getState();this.firstClickSource=a.getSource()};Graph.prototype.dblClick=function(a,c){if(this.isEnabled()){var b=mxUtils.convertPoint(this.container,mxEvent.getClientX(a),mxEvent.getClientY(a));if(null!=a&&!this.model.isVertex(c)){var f=this.model.isEdge(c)?this.view.getState(c):null,d=mxEvent.getSource(a);this.firstClickState!=f||this.firstClickSource!=d||null!=f&&null!=f.text&&null!=f.text.node&&(mxUtils.contains(f.text.boundingBox,
-b.x,b.y)||mxUtils.isAncestorNode(f.text.node,mxEvent.getSource(a)))||(null!=f||this.isCellLocked(this.getDefaultParent()))&&(null==f||this.isCellLocked(f.cell))||!(null!=f||mxClient.IS_VML&&d==this.view.getCanvas()||mxClient.IS_SVG&&d==this.view.getCanvas().ownerSVGElement)||(c=this.addText(b.x,b.y,f))}mxGraph.prototype.dblClick.call(this,a,c)}};Graph.prototype.getInsertPoint=function(){var a=this.getGridSize(),c=this.container.scrollLeft/this.view.scale-this.view.translate.x,b=this.container.scrollTop/
-this.view.scale-this.view.translate.y;if(this.pageVisible)var f=this.getPageLayout(),d=this.getPageSize(),c=Math.max(c,f.x*d.width),b=Math.max(b,f.y*d.height);return new mxPoint(this.snap(c+a),this.snap(b+a))};Graph.prototype.getFreeInsertPoint=function(){var a=this.view,c=this.getGraphBounds(),b=this.getInsertPoint(),f=this.snap(Math.round(Math.max(b.x,c.x/a.scale-a.translate.x+(0==c.width?this.gridSize:0)))),a=this.snap(Math.round(Math.max(b.y,(c.y+c.height)/a.scale-a.translate.y+(0==c.height?1:
-2)*this.gridSize)));return new mxPoint(f,a)};Graph.prototype.isMouseInsertPoint=function(){return!1};Graph.prototype.addText=function(a,c,b){var f=new mxCell;f.value="Text";f.style="text;html=1;resizable=0;points=[];";f.geometry=new mxGeometry(0,0,0,0);f.vertex=!0;if(null!=b){f.style+="align=center;verticalAlign=middle;labelBackgroundColor=#ffffff;";f.geometry.relative=!0;f.connectable=!1;var d=this.view.getRelativePoint(b,a,c);f.geometry.x=Math.round(1E4*d.x)/1E4;f.geometry.y=Math.round(d.y);f.geometry.offset=
-new mxPoint(0,0);var d=this.view.getPoint(b,f.geometry),e=this.view.scale;f.geometry.offset=new mxPoint(Math.round((a-d.x)/e),Math.round((c-d.y)/e))}else f.style+="autosize=1;align=left;verticalAlign=top;spacingTop=-4;",d=this.view.translate,f.geometry.width=40,f.geometry.height=20,f.geometry.x=Math.round(a/this.view.scale)-d.x,f.geometry.y=Math.round(c/this.view.scale)-d.y;this.getModel().beginUpdate();try{this.addCells([f],null!=b?b.cell:null),this.fireEvent(new mxEventObject("textInserted","cells",
-[f])),this.autoSizeCell(f)}finally{this.getModel().endUpdate()}return f};Graph.prototype.getAbsoluteUrl=function(a){null!=a&&this.isRelativeUrl(a)&&(a="#"==a.charAt(0)?this.baseUrl+a:"/"==a.charAt(0)?this.domainUrl+a:this.domainPathUrl+a);return a};Graph.prototype.isExternalProtocol=function(a){return"mailto:"===a.substring(0,7)};Graph.prototype.isBlankLink=function(a){return!this.isExternalProtocol(a)&&("blank"===this.linkPolicy||"self"!==this.linkPolicy&&!this.isRelativeUrl(a)&&a.substring(0,this.domainUrl.length)!==
-this.domainUrl)};Graph.prototype.isRelativeUrl=function(a){return null!=a&&!this.absoluteUrlPattern.test(a)&&"data:"!==a.substring(0,5)&&!this.isExternalProtocol(a)};Graph.prototype.addClickHandler=function(a,c,b){var f=mxUtils.bind(this,function(){var a=this.container.getElementsByTagName("a");if(null!=a)for(var b=0;b<a.length;b++){var f=this.getAbsoluteUrl(a[b].getAttribute("href"));null!=f&&(a[b].setAttribute("href",f),null!=c&&mxEvent.addGestureListeners(a[b],null,null,c))}});this.model.addListener(mxEvent.CHANGE,
-f);f();var d=this.container.style.cursor,e=this.getTolerance(),h=this,k={currentState:null,currentLink:null,highlight:null!=a&&""!=a&&a!=mxConstants.NONE?new mxCellHighlight(h,a,4):null,startX:0,startY:0,scrollLeft:0,scrollTop:0,updateCurrentState:function(a){a=h.view.getState(a.getCell());a!=this.currentState&&(null!=this.currentState&&this.clear(),this.currentState=a,null!=this.currentState&&this.activate(this.currentState))},mouseDown:function(a,c){this.startX=c.getGraphX();this.startY=c.getGraphY();
-this.scrollLeft=h.container.scrollLeft;this.scrollTop=h.container.scrollTop;null==this.currentLink&&"auto"==h.container.style.overflow&&(h.container.style.cursor="move");this.updateCurrentState(c)},mouseMove:function(a,c){if(h.isMouseDown){if(null!=this.currentLink){var b=Math.abs(this.startX-c.getGraphX()),f=Math.abs(this.startY-c.getGraphY());(b>e||f>e)&&this.clear()}}else{for(b=c.getSource();null!=b&&"a"!=b.nodeName.toLowerCase();)b=b.parentNode;null!=b?this.clear():(null==this.currentState||c.getState()!=
-this.currentState&&null!=c.getState()||!h.intersects(this.currentState,c.getGraphX(),c.getGraphY()))&&this.updateCurrentState(c)}},mouseUp:function(a,f){for(var d=f.getSource(),k=f.getEvent();null!=d&&"a"!=d.nodeName.toLowerCase();)d=d.parentNode;null==d&&Math.abs(this.scrollLeft-h.container.scrollLeft)<e&&Math.abs(this.scrollTop-h.container.scrollTop)<e&&(null==f.getState()||!f.isSource(f.getState().control))&&(mxEvent.isLeftMouseButton(k)&&!mxEvent.isPopupTrigger(k)||mxEvent.isTouchEvent(k))&&(null!=
-this.currentLink?(d=h.isBlankLink(this.currentLink),"data:"!==this.currentLink.substring(0,5)&&d||null==c||c(k,this.currentLink),mxEvent.isConsumed(k)||(k=d?h.linkTarget:"_top","_self"==k&&window!=window.top?window.location.href=this.currentLink:this.currentLink.substring(0,h.baseUrl.length)==h.baseUrl&&"#"==this.currentLink.charAt(h.baseUrl.length)&&"_top"==k&&window==window.top?window.location.hash=this.currentLink.split("#")[1]:window.open(this.currentLink,k),f.consume())):null!=b&&!f.isConsumed()&&
-Math.abs(this.scrollLeft-h.container.scrollLeft)<e&&Math.abs(this.scrollTop-h.container.scrollTop)<e&&Math.abs(this.startX-f.getGraphX())<e&&Math.abs(this.startY-f.getGraphY())<e&&b(f.getEvent()));this.clear()},activate:function(a){this.currentLink=h.getAbsoluteUrl(h.getLinkForCell(a.cell));null!=this.currentLink&&(h.container.style.cursor="pointer",null!=this.highlight&&this.highlight.highlight(a))},clear:function(){null!=h.container&&(h.container.style.cursor=d);this.currentLink=this.currentState=
-null;null!=this.highlight&&this.highlight.hide()}};h.click=function(a){};h.addMouseListener(k);mxEvent.addListener(document,"mouseleave",function(a){k.clear()})};Graph.prototype.duplicateCells=function(a,c){a=null!=a?a:this.getSelectionCells();c=null!=c?c:!0;a=this.model.getTopmostCells(a);var b=this.getModel(),f=this.gridSize,d=[];b.beginUpdate();try{for(var h=this.cloneCells(a,!1),e=0;e<a.length;e++){var k=b.getParent(a[e]),m=this.moveCells([h[e]],f,f,!1,k)[0];d.push(m);if(c)b.add(k,h[e]);else{var n=
-k.getIndex(a[e]);b.add(k,h[e],n+1)}}}finally{b.endUpdate()}return d};Graph.prototype.insertImage=function(a,c,b){if(null!=a){for(var f=this.cellEditor.textarea.getElementsByTagName("img"),d=[],e=0;e<f.length;e++)d.push(f[e]);document.execCommand("insertimage",!1,a);a=this.cellEditor.textarea.getElementsByTagName("img");if(a.length==d.length+1)for(e=a.length-1;0<=e;e--)if(0==e||a[e]!=d[e-1]){a[e].setAttribute("width",c);a[e].setAttribute("height",b);break}}};Graph.prototype.insertLink=function(a){0==
-a.length?document.execCommand("unlink",!1):document.execCommand("createlink",!1,mxUtils.trim(a))};Graph.prototype.isCellResizable=function(a){var c=mxGraph.prototype.isCellResizable.apply(this,arguments),b=this.view.getState(a),b=null!=b?b.style:this.getCellStyle(a);return c||"0"!=mxUtils.getValue(b,mxConstants.STYLE_RESIZABLE,"1")&&"wrap"==b[mxConstants.STYLE_WHITE_SPACE]};Graph.prototype.distributeCells=function(a,c){null==c&&(c=this.getSelectionCells());if(null!=c&&1<c.length){for(var b=[],f=null,
-d=null,e=0;e<c.length;e++)if(this.getModel().isVertex(c[e])){var h=this.view.getState(c[e]);if(null!=h){var k=a?h.getCenterX():h.getCenterY(),f=null!=f?Math.max(f,k):k,d=null!=d?Math.min(d,k):k;b.push(h)}}if(2<b.length){b.sort(function(c,b){return a?c.x-b.x:c.y-b.y});h=this.view.translate;k=this.view.scale;d=d/k-(a?h.x:h.y);f=f/k-(a?h.x:h.y);this.getModel().beginUpdate();try{for(var m=(f-d)/(b.length-1),f=d,e=1;e<b.length-1;e++){var n=this.view.getState(this.model.getParent(b[e].cell)),t=this.getCellGeometry(b[e].cell),
-f=f+m;null!=t&&null!=n&&(t=t.clone(),a?t.x=Math.round(f-t.width/2)-n.origin.x:t.y=Math.round(f-t.height/2)-n.origin.y,this.getModel().setGeometry(b[e].cell,t))}}finally{this.getModel().endUpdate()}}}return c};Graph.prototype.isCloneEvent=function(a){return mxClient.IS_MAC&&mxEvent.isMetaDown(a)||mxEvent.isControlDown(a)};Graph.prototype.encodeCells=function(a){for(var c=this.cloneCells(a),b=new mxDictionary,f=0;f<a.length;f++)b.put(a[f],!0);for(f=0;f<c.length;f++){var d=this.view.getState(a[f]);if(null!=
-d){var e=this.getCellGeometry(c[f]);null==e||!e.relative||this.model.isEdge(a[f])||b.get(this.model.getParent(a[f]))||(e.relative=!1,e.x=d.x/d.view.scale-d.view.translate.x,e.y=d.y/d.view.scale-d.view.translate.y)}}b=new mxCodec;d=new mxGraphModel;e=d.getChildAt(d.getRoot(),0);for(f=0;f<a.length;f++)d.add(e,c[f]);return b.encode(d)};Graph.prototype.createSvgImageExport=function(){var a=new mxImageExport;a.getLinkForCellState=mxUtils.bind(this,function(a,c){return this.getLinkForCell(a.cell)});return a};
-Graph.prototype.getSvg=function(a,c,b,f,d,e,h){c=null!=c?c:1;b=null!=b?b:0;d=null!=d?d:!0;e=null!=e?e:!0;h=null!=h?h:!0;var k=e||f?this.getGraphBounds():this.getBoundingBox(this.getSelectionCells());if(null==k)throw Error(mxResources.get("drawingEmpty"));var m=this.view.scale,n=mxUtils.createXmlDocument();f=null!=n.createElementNS?n.createElementNS(mxConstants.NS_SVG,"svg"):n.createElement("svg");null!=a&&(null!=f.style?f.style.backgroundColor=a:f.setAttribute("style","background-color:"+a));null==
-n.createElementNS?(f.setAttribute("xmlns",mxConstants.NS_SVG),f.setAttribute("xmlns:xlink",mxConstants.NS_XLINK)):f.setAttributeNS("http://www.w3.org/2000/xmlns/","xmlns:xlink",mxConstants.NS_XLINK);a=c/m;f.setAttribute("width",Math.max(1,Math.ceil(k.width*a)+2*b)+"px");f.setAttribute("height",Math.max(1,Math.ceil(k.height*a)+2*b)+"px");f.setAttribute("version","1.1");var t=f;d&&(t=null!=n.createElementNS?n.createElementNS(mxConstants.NS_SVG,"g"):n.createElement("g"),t.setAttribute("transform","translate(0.5,0.5)"),
-f.appendChild(t));n.appendChild(f);n=this.createSvgCanvas(t);n.foOffset=d?-.5:0;n.textOffset=d?-.5:0;n.imageOffset=d?-.5:0;n.translate(Math.floor((b/c-k.x)/m),Math.floor((b/c-k.y)/m));var r=n.createAlternateContent;n.createAlternateContent=function(a,c,b,f,d,e,h,k,m,n,t,v,g){var q=this.state;if(null!=this.foAltText&&(0==f||0!=q.fontSize&&e.length<5*f/q.fontSize)){var u=this.createElement("text");u.setAttribute("x",Math.round(f/2));u.setAttribute("y",Math.round((d+q.fontSize)/2));u.setAttribute("fill",
-q.fontColor||"black");u.setAttribute("text-anchor","middle");u.setAttribute("font-size",Math.round(q.fontSize)+"px");u.setAttribute("font-family",q.fontFamily);(q.fontStyle&mxConstants.FONT_BOLD)==mxConstants.FONT_BOLD&&u.setAttribute("font-weight","bold");(q.fontStyle&mxConstants.FONT_ITALIC)==mxConstants.FONT_ITALIC&&u.setAttribute("font-style","italic");(q.fontStyle&mxConstants.FONT_UNDERLINE)==mxConstants.FONT_UNDERLINE&&u.setAttribute("text-decoration","underline");mxUtils.write(u,e);return u}return r.apply(this,
-arguments)};b=this.backgroundImage;null!=b&&(d=m/c,c=this.view.translate,d=new mxRectangle(c.x*d,c.y*d,b.width*d,b.height*d),mxUtils.intersects(k,d)&&n.image(c.x,c.y,b.width,b.height,b.src,!0));n.scale(a);n.textEnabled=h;h=this.createSvgImageExport();var v=h.drawCellState;h.drawCellState=function(a,c){(e||a.view.graph.isCellSelected(a.cell))&&v.apply(this,arguments)};h.drawState(this.getView().getState(this.model.root),n);return f};Graph.prototype.createSvgCanvas=function(a){return new mxSvgCanvas2D(a)};
+a.getAttribute("placeholder"),d=a;null!=d;){if(d==this.model.getRoot()||null!=d.value&&"object"==typeof d.value&&d.hasAttribute(f)){this.setAttributeForCell(d,f,c);break}d=this.model.getParent(d)}var e=a.value.cloneNode(!0);e.setAttribute("label",c);c=e}mxGraph.prototype.cellLabelChanged.apply(this,arguments)}finally{this.model.endUpdate()}};Graph.prototype.removeCellsAfterUngroup=function(a){for(var c=[],b=0;b<a.length;b++)if(this.isCellDeletable(a[b])){var d=this.view.getState(a[b]);if(null!=d){var f=
+mxUtils.getValue(d.style,mxConstants.STYLE_STROKECOLOR,mxConstants.NONE),d=mxUtils.getValue(d.style,mxConstants.STYLE_FILLCOLOR,mxConstants.NONE);f==mxConstants.NONE&&d==mxConstants.NONE&&c.push(a[b])}}a=c;mxGraph.prototype.removeCellsAfterUngroup.apply(this,arguments)};Graph.prototype.setLinkForCell=function(a,c){this.setAttributeForCell(a,"link",c)};Graph.prototype.setTooltipForCell=function(a,c){this.setAttributeForCell(a,"tooltip",c)};Graph.prototype.setAttributeForCell=function(a,c,b){var d;
+null!=a.value&&"object"==typeof a.value?d=a.value.cloneNode(!0):(d=mxUtils.createXmlDocument().createElement("UserObject"),d.setAttribute("label",a.value||""));null!=b&&0<b.length?d.setAttribute(c,b):d.removeAttribute(c);this.model.setValue(a,d)};Graph.prototype.getDropTarget=function(a,c,b,d){this.getModel();if(mxEvent.isAltDown(c))return null;for(var f=0;f<a.length;f++)if(this.model.isEdge(this.model.getParent(a[f])))return null;return mxGraph.prototype.getDropTarget.apply(this,arguments)};Graph.prototype.click=
+function(a){mxGraph.prototype.click.call(this,a);this.firstClickState=a.getState();this.firstClickSource=a.getSource()};Graph.prototype.dblClick=function(a,c){if(this.isEnabled()){var b=mxUtils.convertPoint(this.container,mxEvent.getClientX(a),mxEvent.getClientY(a));if(null!=a&&!this.model.isVertex(c)){var d=this.model.isEdge(c)?this.view.getState(c):null,f=mxEvent.getSource(a);this.firstClickState!=d||this.firstClickSource!=f||null!=d&&null!=d.text&&null!=d.text.node&&(mxUtils.contains(d.text.boundingBox,
+b.x,b.y)||mxUtils.isAncestorNode(d.text.node,mxEvent.getSource(a)))||(null!=d||this.isCellLocked(this.getDefaultParent()))&&(null==d||this.isCellLocked(d.cell))||!(null!=d||mxClient.IS_VML&&f==this.view.getCanvas()||mxClient.IS_SVG&&f==this.view.getCanvas().ownerSVGElement)||(c=this.addText(b.x,b.y,d))}mxGraph.prototype.dblClick.call(this,a,c)}};Graph.prototype.getInsertPoint=function(){var a=this.getGridSize(),c=this.container.scrollLeft/this.view.scale-this.view.translate.x,b=this.container.scrollTop/
+this.view.scale-this.view.translate.y;if(this.pageVisible)var d=this.getPageLayout(),f=this.getPageSize(),c=Math.max(c,d.x*f.width),b=Math.max(b,d.y*f.height);return new mxPoint(this.snap(c+a),this.snap(b+a))};Graph.prototype.getFreeInsertPoint=function(){var a=this.view,c=this.getGraphBounds(),b=this.getInsertPoint(),d=this.snap(Math.round(Math.max(b.x,c.x/a.scale-a.translate.x+(0==c.width?this.gridSize:0)))),a=this.snap(Math.round(Math.max(b.y,(c.y+c.height)/a.scale-a.translate.y+(0==c.height?1:
+2)*this.gridSize)));return new mxPoint(d,a)};Graph.prototype.isMouseInsertPoint=function(){return!1};Graph.prototype.addText=function(a,c,b){var d=new mxCell;d.value="Text";d.style="text;html=1;resizable=0;points=[];";d.geometry=new mxGeometry(0,0,0,0);d.vertex=!0;if(null!=b){d.style+="align=center;verticalAlign=middle;labelBackgroundColor=#ffffff;";d.geometry.relative=!0;d.connectable=!1;var f=this.view.getRelativePoint(b,a,c);d.geometry.x=Math.round(1E4*f.x)/1E4;d.geometry.y=Math.round(f.y);d.geometry.offset=
+new mxPoint(0,0);var f=this.view.getPoint(b,d.geometry),e=this.view.scale;d.geometry.offset=new mxPoint(Math.round((a-f.x)/e),Math.round((c-f.y)/e))}else d.style+="autosize=1;align=left;verticalAlign=top;spacingTop=-4;",f=this.view.translate,d.geometry.width=40,d.geometry.height=20,d.geometry.x=Math.round(a/this.view.scale)-f.x,d.geometry.y=Math.round(c/this.view.scale)-f.y;this.getModel().beginUpdate();try{this.addCells([d],null!=b?b.cell:null),this.fireEvent(new mxEventObject("textInserted","cells",
+[d])),this.autoSizeCell(d)}finally{this.getModel().endUpdate()}return d};Graph.prototype.getAbsoluteUrl=function(a){null!=a&&this.isRelativeUrl(a)&&(a="#"==a.charAt(0)?this.baseUrl+a:"/"==a.charAt(0)?this.domainUrl+a:this.domainPathUrl+a);return a};Graph.prototype.isExternalProtocol=function(a){return"mailto:"===a.substring(0,7)};Graph.prototype.isBlankLink=function(a){return!this.isExternalProtocol(a)&&("blank"===this.linkPolicy||"self"!==this.linkPolicy&&!this.isRelativeUrl(a)&&a.substring(0,this.domainUrl.length)!==
+this.domainUrl)};Graph.prototype.isRelativeUrl=function(a){return null!=a&&!this.absoluteUrlPattern.test(a)&&"data:"!==a.substring(0,5)&&!this.isExternalProtocol(a)};Graph.prototype.addClickHandler=function(a,c,b){var d=mxUtils.bind(this,function(){var a=this.container.getElementsByTagName("a");if(null!=a)for(var b=0;b<a.length;b++){var d=this.getAbsoluteUrl(a[b].getAttribute("href"));null!=d&&(a[b].setAttribute("href",d),null!=c&&mxEvent.addGestureListeners(a[b],null,null,c))}});this.model.addListener(mxEvent.CHANGE,
+d);d();var f=this.container.style.cursor,e=this.getTolerance(),g=this,k={currentState:null,currentLink:null,highlight:null!=a&&""!=a&&a!=mxConstants.NONE?new mxCellHighlight(g,a,4):null,startX:0,startY:0,scrollLeft:0,scrollTop:0,updateCurrentState:function(a){a=g.view.getState(a.getCell());a!=this.currentState&&(null!=this.currentState&&this.clear(),this.currentState=a,null!=this.currentState&&this.activate(this.currentState))},mouseDown:function(a,c){this.startX=c.getGraphX();this.startY=c.getGraphY();
+this.scrollLeft=g.container.scrollLeft;this.scrollTop=g.container.scrollTop;null==this.currentLink&&"auto"==g.container.style.overflow&&(g.container.style.cursor="move");this.updateCurrentState(c)},mouseMove:function(a,c){if(g.isMouseDown){if(null!=this.currentLink){var b=Math.abs(this.startX-c.getGraphX()),d=Math.abs(this.startY-c.getGraphY());(b>e||d>e)&&this.clear()}}else{for(b=c.getSource();null!=b&&"a"!=b.nodeName.toLowerCase();)b=b.parentNode;null!=b?this.clear():(null==this.currentState||c.getState()!=
+this.currentState&&null!=c.getState()||!g.intersects(this.currentState,c.getGraphX(),c.getGraphY()))&&this.updateCurrentState(c)}},mouseUp:function(a,d){for(var f=d.getSource(),k=d.getEvent();null!=f&&"a"!=f.nodeName.toLowerCase();)f=f.parentNode;null==f&&Math.abs(this.scrollLeft-g.container.scrollLeft)<e&&Math.abs(this.scrollTop-g.container.scrollTop)<e&&(null==d.getState()||!d.isSource(d.getState().control))&&(mxEvent.isLeftMouseButton(k)&&!mxEvent.isPopupTrigger(k)||mxEvent.isTouchEvent(k))&&(null!=
+this.currentLink?(f=g.isBlankLink(this.currentLink),"data:"!==this.currentLink.substring(0,5)&&f||null==c||c(k,this.currentLink),mxEvent.isConsumed(k)||(k=f?g.linkTarget:"_top","_self"==k&&window!=window.top?window.location.href=this.currentLink:this.currentLink.substring(0,g.baseUrl.length)==g.baseUrl&&"#"==this.currentLink.charAt(g.baseUrl.length)&&"_top"==k&&window==window.top?window.location.hash=this.currentLink.split("#")[1]:window.open(this.currentLink,k),d.consume())):null!=b&&!d.isConsumed()&&
+Math.abs(this.scrollLeft-g.container.scrollLeft)<e&&Math.abs(this.scrollTop-g.container.scrollTop)<e&&Math.abs(this.startX-d.getGraphX())<e&&Math.abs(this.startY-d.getGraphY())<e&&b(d.getEvent()));this.clear()},activate:function(a){this.currentLink=g.getAbsoluteUrl(g.getLinkForCell(a.cell));null!=this.currentLink&&(g.container.style.cursor="pointer",null!=this.highlight&&this.highlight.highlight(a))},clear:function(){null!=g.container&&(g.container.style.cursor=f);this.currentLink=this.currentState=
+null;null!=this.highlight&&this.highlight.hide()}};g.click=function(a){};g.addMouseListener(k);mxEvent.addListener(document,"mouseleave",function(a){k.clear()})};Graph.prototype.duplicateCells=function(a,c){a=null!=a?a:this.getSelectionCells();c=null!=c?c:!0;a=this.model.getTopmostCells(a);var b=this.getModel(),d=this.gridSize,f=[];b.beginUpdate();try{for(var e=this.cloneCells(a,!1),g=0;g<a.length;g++){var k=b.getParent(a[g]),p=this.moveCells([e[g]],d,d,!1,k)[0];f.push(p);if(c)b.add(k,e[g]);else{var m=
+k.getIndex(a[g]);b.add(k,e[g],m+1)}}}finally{b.endUpdate()}return f};Graph.prototype.insertImage=function(a,c,b){if(null!=a){for(var d=this.cellEditor.textarea.getElementsByTagName("img"),f=[],g=0;g<d.length;g++)f.push(d[g]);document.execCommand("insertimage",!1,a);a=this.cellEditor.textarea.getElementsByTagName("img");if(a.length==f.length+1)for(g=a.length-1;0<=g;g--)if(0==g||a[g]!=f[g-1]){a[g].setAttribute("width",c);a[g].setAttribute("height",b);break}}};Graph.prototype.insertLink=function(a){0==
+a.length?document.execCommand("unlink",!1):document.execCommand("createlink",!1,mxUtils.trim(a))};Graph.prototype.isCellResizable=function(a){var c=mxGraph.prototype.isCellResizable.apply(this,arguments),b=this.view.getState(a),b=null!=b?b.style:this.getCellStyle(a);return c||"0"!=mxUtils.getValue(b,mxConstants.STYLE_RESIZABLE,"1")&&"wrap"==b[mxConstants.STYLE_WHITE_SPACE]};Graph.prototype.distributeCells=function(a,c){null==c&&(c=this.getSelectionCells());if(null!=c&&1<c.length){for(var b=[],d=null,
+f=null,g=0;g<c.length;g++)if(this.getModel().isVertex(c[g])){var e=this.view.getState(c[g]);if(null!=e){var k=a?e.getCenterX():e.getCenterY(),d=null!=d?Math.max(d,k):k,f=null!=f?Math.min(f,k):k;b.push(e)}}if(2<b.length){b.sort(function(c,b){return a?c.x-b.x:c.y-b.y});e=this.view.translate;k=this.view.scale;f=f/k-(a?e.x:e.y);d=d/k-(a?e.x:e.y);this.getModel().beginUpdate();try{for(var p=(d-f)/(b.length-1),d=f,g=1;g<b.length-1;g++){var m=this.view.getState(this.model.getParent(b[g].cell)),t=this.getCellGeometry(b[g].cell),
+d=d+p;null!=t&&null!=m&&(t=t.clone(),a?t.x=Math.round(d-t.width/2)-m.origin.x:t.y=Math.round(d-t.height/2)-m.origin.y,this.getModel().setGeometry(b[g].cell,t))}}finally{this.getModel().endUpdate()}}}return c};Graph.prototype.isCloneEvent=function(a){return mxClient.IS_MAC&&mxEvent.isMetaDown(a)||mxEvent.isControlDown(a)};Graph.prototype.encodeCells=function(a){for(var c=this.cloneCells(a),b=new mxDictionary,d=0;d<a.length;d++)b.put(a[d],!0);for(d=0;d<c.length;d++){var f=this.view.getState(a[d]);if(null!=
+f){var g=this.getCellGeometry(c[d]);null==g||!g.relative||this.model.isEdge(a[d])||b.get(this.model.getParent(a[d]))||(g.relative=!1,g.x=f.x/f.view.scale-f.view.translate.x,g.y=f.y/f.view.scale-f.view.translate.y)}}b=new mxCodec;f=new mxGraphModel;g=f.getChildAt(f.getRoot(),0);for(d=0;d<a.length;d++)f.add(g,c[d]);return b.encode(f)};Graph.prototype.createSvgImageExport=function(){var a=new mxImageExport;a.getLinkForCellState=mxUtils.bind(this,function(a,c){return this.getLinkForCell(a.cell)});return a};
+Graph.prototype.getSvg=function(a,c,b,d,f,g,e){c=null!=c?c:1;b=null!=b?b:0;f=null!=f?f:!0;g=null!=g?g:!0;e=null!=e?e:!0;var k=g||d?this.getGraphBounds():this.getBoundingBox(this.getSelectionCells());if(null==k)throw Error(mxResources.get("drawingEmpty"));var p=this.view.scale,m=mxUtils.createXmlDocument();d=null!=m.createElementNS?m.createElementNS(mxConstants.NS_SVG,"svg"):m.createElement("svg");null!=a&&(null!=d.style?d.style.backgroundColor=a:d.setAttribute("style","background-color:"+a));null==
+m.createElementNS?(d.setAttribute("xmlns",mxConstants.NS_SVG),d.setAttribute("xmlns:xlink",mxConstants.NS_XLINK)):d.setAttributeNS("http://www.w3.org/2000/xmlns/","xmlns:xlink",mxConstants.NS_XLINK);a=c/p;d.setAttribute("width",Math.max(1,Math.ceil(k.width*a)+2*b)+"px");d.setAttribute("height",Math.max(1,Math.ceil(k.height*a)+2*b)+"px");d.setAttribute("version","1.1");var t=d;f&&(t=null!=m.createElementNS?m.createElementNS(mxConstants.NS_SVG,"g"):m.createElement("g"),t.setAttribute("transform","translate(0.5,0.5)"),
+d.appendChild(t));m.appendChild(d);m=this.createSvgCanvas(t);m.foOffset=f?-.5:0;m.textOffset=f?-.5:0;m.imageOffset=f?-.5:0;m.translate(Math.floor((b/c-k.x)/p),Math.floor((b/c-k.y)/p));var r=m.createAlternateContent;m.createAlternateContent=function(a,c,b,d,f,g,e,k,p,m,t,v,h){var q=this.state;if(null!=this.foAltText&&(0==d||0!=q.fontSize&&g.length<5*d/q.fontSize)){var u=this.createElement("text");u.setAttribute("x",Math.round(d/2));u.setAttribute("y",Math.round((f+q.fontSize)/2));u.setAttribute("fill",
+q.fontColor||"black");u.setAttribute("text-anchor","middle");u.setAttribute("font-size",Math.round(q.fontSize)+"px");u.setAttribute("font-family",q.fontFamily);(q.fontStyle&mxConstants.FONT_BOLD)==mxConstants.FONT_BOLD&&u.setAttribute("font-weight","bold");(q.fontStyle&mxConstants.FONT_ITALIC)==mxConstants.FONT_ITALIC&&u.setAttribute("font-style","italic");(q.fontStyle&mxConstants.FONT_UNDERLINE)==mxConstants.FONT_UNDERLINE&&u.setAttribute("text-decoration","underline");mxUtils.write(u,g);return u}return r.apply(this,
+arguments)};b=this.backgroundImage;null!=b&&(f=p/c,c=this.view.translate,f=new mxRectangle(c.x*f,c.y*f,b.width*f,b.height*f),mxUtils.intersects(k,f)&&m.image(c.x,c.y,b.width,b.height,b.src,!0));m.scale(a);m.textEnabled=e;e=this.createSvgImageExport();var v=e.drawCellState;e.drawCellState=function(a,c){(g||a.view.graph.isCellSelected(a.cell))&&v.apply(this,arguments)};e.drawState(this.getView().getState(this.model.root),m);return d};Graph.prototype.createSvgCanvas=function(a){return new mxSvgCanvas2D(a)};
 Graph.prototype.getSelectedElement=function(){var a=null;if(window.getSelection){var c=window.getSelection();c.getRangeAt&&c.rangeCount&&(a=c.getRangeAt(0).commonAncestorContainer)}else document.selection&&(a=document.selection.createRange().parentElement());return a};Graph.prototype.getParentByName=function(a,c,b){for(;null!=a&&a.nodeName!=c;){if(a==b)return null;a=a.parentNode}return a};Graph.prototype.selectNode=function(a){var c=null;if(window.getSelection){if(c=window.getSelection(),c.getRangeAt&&
-c.rangeCount){var b=document.createRange();b.selectNode(a);c.removeAllRanges();c.addRange(b)}}else(c=document.selection)&&"Control"!=c.type&&(a=c.createRange(),a.collapse(!0),b=c.createRange(),b.setEndPoint("StartToStart",a),b.select())};Graph.prototype.insertRow=function(a,c){for(var b=a.tBodies[0],f=0<b.rows.length?b.rows[0].cells.length:1,b=b.insertRow(c),d=0;d<f;d++)mxUtils.br(b.insertCell(-1));return b.cells[0]};Graph.prototype.deleteRow=function(a,c){a.tBodies[0].deleteRow(c)};Graph.prototype.insertColumn=
-function(a,c){var b=a.tHead;if(null!=b)for(var f=0;f<b.rows.length;f++){var d=document.createElement("th");b.rows[f].appendChild(d);mxUtils.br(d)}b=a.tBodies[0];for(f=0;f<b.rows.length;f++)d=b.rows[f].insertCell(c),mxUtils.br(d);return b.rows[0].cells[0<=c?c:b.rows[0].cells.length-1]};Graph.prototype.deleteColumn=function(a,c){if(0<=c)for(var b=a.tBodies[0].rows,f=0;f<b.length;f++)b[f].cells.length>c&&b[f].deleteCell(c)};Graph.prototype.pasteHtmlAtCaret=function(a){var c;if(window.getSelection){if(c=
-window.getSelection(),c.getRangeAt&&c.rangeCount){c=c.getRangeAt(0);c.deleteContents();var b=document.createElement("div");b.innerHTML=a;a=document.createDocumentFragment();for(var f;f=b.firstChild;)lastNode=a.appendChild(f);c.insertNode(a)}}else(c=document.selection)&&"Control"!=c.type&&c.createRange().pasteHTML(a)};Graph.prototype.createLinkForHint=function(a,c){c=null!=c?c:a;var b=document.createElement("a");b.setAttribute("href",this.getAbsoluteUrl(a));b.setAttribute("title",a);null!=this.linkTarget&&
+c.rangeCount){var b=document.createRange();b.selectNode(a);c.removeAllRanges();c.addRange(b)}}else(c=document.selection)&&"Control"!=c.type&&(a=c.createRange(),a.collapse(!0),b=c.createRange(),b.setEndPoint("StartToStart",a),b.select())};Graph.prototype.insertRow=function(a,c){for(var b=a.tBodies[0],d=0<b.rows.length?b.rows[0].cells.length:1,b=b.insertRow(c),f=0;f<d;f++)mxUtils.br(b.insertCell(-1));return b.cells[0]};Graph.prototype.deleteRow=function(a,c){a.tBodies[0].deleteRow(c)};Graph.prototype.insertColumn=
+function(a,c){var b=a.tHead;if(null!=b)for(var d=0;d<b.rows.length;d++){var f=document.createElement("th");b.rows[d].appendChild(f);mxUtils.br(f)}b=a.tBodies[0];for(d=0;d<b.rows.length;d++)f=b.rows[d].insertCell(c),mxUtils.br(f);return b.rows[0].cells[0<=c?c:b.rows[0].cells.length-1]};Graph.prototype.deleteColumn=function(a,c){if(0<=c)for(var b=a.tBodies[0].rows,d=0;d<b.length;d++)b[d].cells.length>c&&b[d].deleteCell(c)};Graph.prototype.pasteHtmlAtCaret=function(a){var c;if(window.getSelection){if(c=
+window.getSelection(),c.getRangeAt&&c.rangeCount){c=c.getRangeAt(0);c.deleteContents();var b=document.createElement("div");b.innerHTML=a;a=document.createDocumentFragment();for(var d;d=b.firstChild;)lastNode=a.appendChild(d);c.insertNode(a)}}else(c=document.selection)&&"Control"!=c.type&&c.createRange().pasteHTML(a)};Graph.prototype.createLinkForHint=function(a,c){c=null!=c?c:a;var b=document.createElement("a");b.setAttribute("href",this.getAbsoluteUrl(a));b.setAttribute("title",a);null!=this.linkTarget&&
 b.setAttribute("target",this.linkTarget);60<c.length&&(c=c.substring(0,36)+"..."+c.substring(c.length-20));mxUtils.write(b,c);return b};Graph.prototype.initTouch=function(){this.connectionHandler.marker.isEnabled=function(){return null!=this.graph.connectionHandler.first};this.addListener(mxEvent.START_EDITING,function(a,c){this.popupMenuHandler.hideMenu()});var a=this.updateMouseEvent;this.updateMouseEvent=function(c){c=a.apply(this,arguments);if(mxEvent.isTouchEvent(c.getEvent())&&null==c.getState()){var b=
-this.getCellAt(c.graphX,c.graphY);null!=b&&this.isSwimlane(b)&&this.hitsSwimlaneContent(b,c.graphX,c.graphY)||(c.state=this.view.getState(b),null!=c.state&&null!=c.state.shape&&(this.container.style.cursor=c.state.shape.node.style.cursor))}null==c.getState()&&this.isEnabled()&&(this.container.style.cursor="default");return c};var c=!1,b=!1,f=!1,d=this.fireMouseEvent;this.fireMouseEvent=function(a,e,h){a==mxEvent.MOUSE_DOWN&&(e=this.updateMouseEvent(e),c=this.isCellSelected(e.getCell()),b=this.isSelectionEmpty(),
-f=this.popupMenuHandler.isMenuShowing());d.apply(this,arguments)};this.popupMenuHandler.mouseUp=mxUtils.bind(this,function(a,d){this.popupMenuHandler.popupTrigger=!this.isEditing()&&this.isEnabled()&&(null==d.getState()||!d.isSource(d.getState().control))&&(this.popupMenuHandler.popupTrigger||!f&&!mxEvent.isMouseEvent(d.getEvent())&&(b&&null==d.getCell()&&this.isSelectionEmpty()||c&&this.isCellSelected(d.getCell())));mxPopupMenuHandler.prototype.mouseUp.apply(this.popupMenuHandler,arguments)})};mxCellEditor.prototype.isContentEditing=
+this.getCellAt(c.graphX,c.graphY);null!=b&&this.isSwimlane(b)&&this.hitsSwimlaneContent(b,c.graphX,c.graphY)||(c.state=this.view.getState(b),null!=c.state&&null!=c.state.shape&&(this.container.style.cursor=c.state.shape.node.style.cursor))}null==c.getState()&&this.isEnabled()&&(this.container.style.cursor="default");return c};var c=!1,b=!1,d=!1,f=this.fireMouseEvent;this.fireMouseEvent=function(a,g,e){a==mxEvent.MOUSE_DOWN&&(g=this.updateMouseEvent(g),c=this.isCellSelected(g.getCell()),b=this.isSelectionEmpty(),
+d=this.popupMenuHandler.isMenuShowing());f.apply(this,arguments)};this.popupMenuHandler.mouseUp=mxUtils.bind(this,function(a,f){this.popupMenuHandler.popupTrigger=!this.isEditing()&&this.isEnabled()&&(null==f.getState()||!f.isSource(f.getState().control))&&(this.popupMenuHandler.popupTrigger||!d&&!mxEvent.isMouseEvent(f.getEvent())&&(b&&null==f.getCell()&&this.isSelectionEmpty()||c&&this.isCellSelected(f.getCell())));mxPopupMenuHandler.prototype.mouseUp.apply(this.popupMenuHandler,arguments)})};mxCellEditor.prototype.isContentEditing=
 function(){var a=this.graph.view.getState(this.editingCell);return null!=a&&1==a.style.html};mxCellEditor.prototype.saveSelection=function(){if(window.getSelection){if(sel=window.getSelection(),sel.getRangeAt&&sel.rangeCount){for(var a=[],c=0,b=sel.rangeCount;c<b;++c)a.push(sel.getRangeAt(c));return a}}else if(document.selection&&document.selection.createRange)return document.selection.createRange();return null};mxCellEditor.prototype.restoreSelection=function(a){try{if(a)if(window.getSelection){sel=
-window.getSelection();sel.removeAllRanges();for(var c=0,b=a.length;c<b;++c)sel.addRange(a[c])}else document.selection&&a.select&&a.select()}catch(E){}};var g=mxCellRenderer.prototype.initializeLabel;mxCellRenderer.prototype.initializeLabel=function(a){null!=a.text&&(a.text.replaceLinefeeds="0"!=mxUtils.getValue(a.style,"nl2Br","1"));g.apply(this,arguments)};var l=mxConstraintHandler.prototype.update;mxConstraintHandler.prototype.update=function(a,c){this.isKeepFocusEvent(a)||!mxEvent.isAltDown(a.getEvent())?
-l.apply(this,arguments):this.reset()};mxGuide.prototype.createGuideShape=function(a){return new mxPolyline([],mxConstants.GUIDE_COLOR,mxConstants.GUIDE_STROKEWIDTH)};mxCellEditor.prototype.escapeCancelsEditing=!1;var p=mxCellEditor.prototype.startEditing;mxCellEditor.prototype.startEditing=function(a,c){p.apply(this,arguments);var b=this.graph.view.getState(a);this.textarea.className=null!=b&&1==b.style.html?"mxCellEditor geContentEditable":"mxCellEditor mxPlainTextEditor";this.codeViewMode=!1;this.switchSelectionState=
-null;this.graph.setSelectionCell(a);var b=this.graph.getModel().getParent(a),f=this.graph.getCellGeometry(a);this.graph.getModel().isEdge(b)&&null!=f&&f.relative||this.graph.getModel().isEdge(a)?mxClient.IS_QUIRKS?this.textarea.style.border="gray dotted 1px":this.textarea.style.outline=mxClient.IS_IE||mxClient.IS_IE11||mxClient.IS_FF&&mxClient.IS_WIN?"gray dotted 1px":"":mxClient.IS_QUIRKS&&(this.textarea.style.outline="none",this.textarea.style.border="")};var q=mxCellEditor.prototype.installListeners;
-mxCellEditor.prototype.installListeners=function(a){function c(a,b){b.originalNode=a;a=a.firstChild;for(var f=b.firstChild;null!=a&&null!=f;)c(a,f),a=a.nextSibling,f=f.nextSibling;return b}function b(a,c){if(null!=a)if(c.originalNode!=a)f(a);else for(a=a.firstChild,c=c.firstChild;null!=a;){var d=a.nextSibling;null==c?f(a):(b(a,c),c=c.nextSibling);a=d}}function f(a){for(var c=a.firstChild;null!=c;){var b=c.nextSibling;f(c);c=b}1==a.nodeType&&("BR"===a.nodeName||null!=a.firstChild)||3==a.nodeType&&
+window.getSelection();sel.removeAllRanges();for(var c=0,b=a.length;c<b;++c)sel.addRange(a[c])}else document.selection&&a.select&&a.select()}catch(G){}};var h=mxCellRenderer.prototype.initializeLabel;mxCellRenderer.prototype.initializeLabel=function(a){null!=a.text&&(a.text.replaceLinefeeds="0"!=mxUtils.getValue(a.style,"nl2Br","1"));h.apply(this,arguments)};var l=mxConstraintHandler.prototype.update;mxConstraintHandler.prototype.update=function(a,c){this.isKeepFocusEvent(a)||!mxEvent.isAltDown(a.getEvent())?
+l.apply(this,arguments):this.reset()};mxGuide.prototype.createGuideShape=function(a){return new mxPolyline([],mxConstants.GUIDE_COLOR,mxConstants.GUIDE_STROKEWIDTH)};mxCellEditor.prototype.escapeCancelsEditing=!1;var n=mxCellEditor.prototype.startEditing;mxCellEditor.prototype.startEditing=function(a,c){n.apply(this,arguments);var b=this.graph.view.getState(a);this.textarea.className=null!=b&&1==b.style.html?"mxCellEditor geContentEditable":"mxCellEditor mxPlainTextEditor";this.codeViewMode=!1;this.switchSelectionState=
+null;this.graph.setSelectionCell(a);var b=this.graph.getModel().getParent(a),d=this.graph.getCellGeometry(a);this.graph.getModel().isEdge(b)&&null!=d&&d.relative||this.graph.getModel().isEdge(a)?mxClient.IS_QUIRKS?this.textarea.style.border="gray dotted 1px":this.textarea.style.outline=mxClient.IS_IE||mxClient.IS_IE11||mxClient.IS_FF&&mxClient.IS_WIN?"gray dotted 1px":"":mxClient.IS_QUIRKS&&(this.textarea.style.outline="none",this.textarea.style.border="")};var q=mxCellEditor.prototype.installListeners;
+mxCellEditor.prototype.installListeners=function(a){function c(a,b){b.originalNode=a;a=a.firstChild;for(var d=b.firstChild;null!=a&&null!=d;)c(a,d),a=a.nextSibling,d=d.nextSibling;return b}function b(a,c){if(null!=a)if(c.originalNode!=a)d(a);else for(a=a.firstChild,c=c.firstChild;null!=a;){var f=a.nextSibling;null==c?d(a):(b(a,c),c=c.nextSibling);a=f}}function d(a){for(var c=a.firstChild;null!=c;){var b=c.nextSibling;d(c);c=b}1==a.nodeType&&("BR"===a.nodeName||null!=a.firstChild)||3==a.nodeType&&
 0!=mxUtils.trim(mxUtils.getTextContent(a)).length?(3==a.nodeType&&mxUtils.setTextContent(a,mxUtils.getTextContent(a).replace(/\n|\r/g,"")),1==a.nodeType&&(a.removeAttribute("style"),a.removeAttribute("class"),a.removeAttribute("width"),a.removeAttribute("cellpadding"),a.removeAttribute("cellspacing"),a.removeAttribute("border"))):a.parentNode.removeChild(a)}q.apply(this,arguments);mxClient.IS_QUIRKS||7===document.documentMode||8===document.documentMode||mxEvent.addListener(this.textarea,"paste",mxUtils.bind(this,
-function(a){var f=c(this.textarea,this.textarea.cloneNode(!0));window.setTimeout(mxUtils.bind(this,function(){b(this.textarea,f)}),0)}))};mxCellEditor.prototype.toggleViewMode=function(){var a=this.graph.view.getState(this.editingCell),c=null!=a&&"0"!=mxUtils.getValue(a.style,"nl2Br","1"),b=this.saveSelection();if(this.codeViewMode){k=mxUtils.extractTextWithWhitespace(this.textarea.childNodes);0<k.length&&"\n"==k.charAt(k.length-1)&&(k=k.substring(0,k.length-1));k=this.graph.sanitizeHtml(c?k.replace(/\n/g,
-"<br/>"):k,!0);this.textarea.className="mxCellEditor geContentEditable";var f=mxUtils.getValue(a.style,mxConstants.STYLE_FONTSIZE,mxConstants.DEFAULT_FONTSIZE),c=mxUtils.getValue(a.style,mxConstants.STYLE_FONTFAMILY,mxConstants.DEFAULT_FONTFAMILY),d=mxUtils.getValue(a.style,mxConstants.STYLE_ALIGN,mxConstants.ALIGN_LEFT),e=(mxUtils.getValue(a.style,mxConstants.STYLE_FONTSTYLE,0)&mxConstants.FONT_BOLD)==mxConstants.FONT_BOLD,h=(mxUtils.getValue(a.style,mxConstants.STYLE_FONTSTYLE,0)&mxConstants.FONT_ITALIC)==
-mxConstants.FONT_ITALIC,a=(mxUtils.getValue(a.style,mxConstants.STYLE_FONTSTYLE,0)&mxConstants.FONT_UNDERLINE)==mxConstants.FONT_UNDERLINE;this.textarea.style.lineHeight=mxConstants.ABSOLUTE_LINE_HEIGHT?Math.round(f*mxConstants.LINE_HEIGHT)+"px":mxConstants.LINE_HEIGHT;this.textarea.style.fontSize=Math.round(f)+"px";this.textarea.style.textDecoration=a?"underline":"";this.textarea.style.fontWeight=e?"bold":"normal";this.textarea.style.fontStyle=h?"italic":"";this.textarea.style.fontFamily=c;this.textarea.style.textAlign=
-d;this.textarea.style.padding="0px";this.textarea.innerHTML!=k&&(this.textarea.innerHTML=k,0==this.textarea.innerHTML.length&&(this.textarea.innerHTML=this.getEmptyLabelText(),this.clearOnChange=0<this.textarea.innerHTML.length));this.codeViewMode=!1}else{this.clearOnChange&&this.textarea.innerHTML==this.getEmptyLabelText()&&(this.clearOnChange=!1,this.textarea.innerHTML="");var k=mxUtils.htmlEntities(this.textarea.innerHTML);mxClient.IS_QUIRKS||8==document.documentMode||(k=mxUtils.replaceTrailingNewlines(k,
-"<div><br></div>"));k=this.graph.sanitizeHtml(c?k.replace(/\n/g,"").replace(/&lt;br\s*.?&gt;/g,"<br>"):k,!0);this.textarea.className="mxCellEditor mxPlainTextEditor";var f=mxConstants.DEFAULT_FONTSIZE;this.textarea.style.lineHeight=mxConstants.ABSOLUTE_LINE_HEIGHT?Math.round(f*mxConstants.LINE_HEIGHT)+"px":mxConstants.LINE_HEIGHT;this.textarea.style.fontSize=Math.round(f)+"px";this.textarea.style.textDecoration="";this.textarea.style.fontWeight="normal";this.textarea.style.fontStyle="";this.textarea.style.fontFamily=
+function(a){var d=c(this.textarea,this.textarea.cloneNode(!0));window.setTimeout(mxUtils.bind(this,function(){b(this.textarea,d)}),0)}))};mxCellEditor.prototype.toggleViewMode=function(){var a=this.graph.view.getState(this.editingCell),c=null!=a&&"0"!=mxUtils.getValue(a.style,"nl2Br","1"),b=this.saveSelection();if(this.codeViewMode){k=mxUtils.extractTextWithWhitespace(this.textarea.childNodes);0<k.length&&"\n"==k.charAt(k.length-1)&&(k=k.substring(0,k.length-1));k=this.graph.sanitizeHtml(c?k.replace(/\n/g,
+"<br/>"):k,!0);this.textarea.className="mxCellEditor geContentEditable";var d=mxUtils.getValue(a.style,mxConstants.STYLE_FONTSIZE,mxConstants.DEFAULT_FONTSIZE),c=mxUtils.getValue(a.style,mxConstants.STYLE_FONTFAMILY,mxConstants.DEFAULT_FONTFAMILY),f=mxUtils.getValue(a.style,mxConstants.STYLE_ALIGN,mxConstants.ALIGN_LEFT),g=(mxUtils.getValue(a.style,mxConstants.STYLE_FONTSTYLE,0)&mxConstants.FONT_BOLD)==mxConstants.FONT_BOLD,e=(mxUtils.getValue(a.style,mxConstants.STYLE_FONTSTYLE,0)&mxConstants.FONT_ITALIC)==
+mxConstants.FONT_ITALIC,a=(mxUtils.getValue(a.style,mxConstants.STYLE_FONTSTYLE,0)&mxConstants.FONT_UNDERLINE)==mxConstants.FONT_UNDERLINE;this.textarea.style.lineHeight=mxConstants.ABSOLUTE_LINE_HEIGHT?Math.round(d*mxConstants.LINE_HEIGHT)+"px":mxConstants.LINE_HEIGHT;this.textarea.style.fontSize=Math.round(d)+"px";this.textarea.style.textDecoration=a?"underline":"";this.textarea.style.fontWeight=g?"bold":"normal";this.textarea.style.fontStyle=e?"italic":"";this.textarea.style.fontFamily=c;this.textarea.style.textAlign=
+f;this.textarea.style.padding="0px";this.textarea.innerHTML!=k&&(this.textarea.innerHTML=k,0==this.textarea.innerHTML.length&&(this.textarea.innerHTML=this.getEmptyLabelText(),this.clearOnChange=0<this.textarea.innerHTML.length));this.codeViewMode=!1}else{this.clearOnChange&&this.textarea.innerHTML==this.getEmptyLabelText()&&(this.clearOnChange=!1,this.textarea.innerHTML="");var k=mxUtils.htmlEntities(this.textarea.innerHTML);mxClient.IS_QUIRKS||8==document.documentMode||(k=mxUtils.replaceTrailingNewlines(k,
+"<div><br></div>"));k=this.graph.sanitizeHtml(c?k.replace(/\n/g,"").replace(/&lt;br\s*.?&gt;/g,"<br>"):k,!0);this.textarea.className="mxCellEditor mxPlainTextEditor";var d=mxConstants.DEFAULT_FONTSIZE;this.textarea.style.lineHeight=mxConstants.ABSOLUTE_LINE_HEIGHT?Math.round(d*mxConstants.LINE_HEIGHT)+"px":mxConstants.LINE_HEIGHT;this.textarea.style.fontSize=Math.round(d)+"px";this.textarea.style.textDecoration="";this.textarea.style.fontWeight="normal";this.textarea.style.fontStyle="";this.textarea.style.fontFamily=
 mxConstants.DEFAULT_FONTFAMILY;this.textarea.style.textAlign="left";this.textarea.style.padding="2px";this.textarea.innerHTML!=k&&(this.textarea.innerHTML=k);this.codeViewMode=!0}this.textarea.focus();null!=this.switchSelectionState&&this.restoreSelection(this.switchSelectionState);this.switchSelectionState=b;this.resize()};var c=mxCellEditor.prototype.resize;mxCellEditor.prototype.resize=function(a,b){if(null!=this.textarea)if(a=this.graph.getView().getState(this.editingCell),this.codeViewMode&&
-null!=a){var f=a.view.scale;this.bounds=mxRectangle.fromRectangle(a);if(0==this.bounds.width&&0==this.bounds.height){this.bounds.width=160*f;this.bounds.height=60*f;var d=null!=a.text?a.text.margin:null;null==d&&(d=mxUtils.getAlignmentAsPoint(mxUtils.getValue(a.style,mxConstants.STYLE_ALIGN,mxConstants.ALIGN_CENTER),mxUtils.getValue(a.style,mxConstants.STYLE_VERTICAL_ALIGN,mxConstants.ALIGN_MIDDLE)));this.bounds.x+=d.x*this.bounds.width;this.bounds.y+=d.y*this.bounds.height}this.textarea.style.width=
-Math.round((this.bounds.width-4)/f)+"px";this.textarea.style.height=Math.round((this.bounds.height-4)/f)+"px";this.textarea.style.overflow="auto";this.textarea.clientHeight<this.textarea.offsetHeight&&(this.textarea.style.height=Math.round(this.bounds.height/f)+(this.textarea.offsetHeight-this.textarea.clientHeight)+"px",this.bounds.height=parseInt(this.textarea.style.height)*f);this.textarea.clientWidth<this.textarea.offsetWidth&&(this.textarea.style.width=Math.round(this.bounds.width/f)+(this.textarea.offsetWidth-
-this.textarea.clientWidth)+"px",this.bounds.width=parseInt(this.textarea.style.width)*f);this.textarea.style.left=Math.round(this.bounds.x)+"px";this.textarea.style.top=Math.round(this.bounds.y)+"px";mxClient.IS_VML?this.textarea.style.zoom=f:mxUtils.setPrefixedStyle(this.textarea.style,"transform","scale("+f+","+f+")")}else this.textarea.style.height="",this.textarea.style.overflow="",c.apply(this,arguments)};mxCellEditorGetInitialValue=mxCellEditor.prototype.getInitialValue;mxCellEditor.prototype.getInitialValue=
+null!=a){var d=a.view.scale;this.bounds=mxRectangle.fromRectangle(a);if(0==this.bounds.width&&0==this.bounds.height){this.bounds.width=160*d;this.bounds.height=60*d;var f=null!=a.text?a.text.margin:null;null==f&&(f=mxUtils.getAlignmentAsPoint(mxUtils.getValue(a.style,mxConstants.STYLE_ALIGN,mxConstants.ALIGN_CENTER),mxUtils.getValue(a.style,mxConstants.STYLE_VERTICAL_ALIGN,mxConstants.ALIGN_MIDDLE)));this.bounds.x+=f.x*this.bounds.width;this.bounds.y+=f.y*this.bounds.height}this.textarea.style.width=
+Math.round((this.bounds.width-4)/d)+"px";this.textarea.style.height=Math.round((this.bounds.height-4)/d)+"px";this.textarea.style.overflow="auto";this.textarea.clientHeight<this.textarea.offsetHeight&&(this.textarea.style.height=Math.round(this.bounds.height/d)+(this.textarea.offsetHeight-this.textarea.clientHeight)+"px",this.bounds.height=parseInt(this.textarea.style.height)*d);this.textarea.clientWidth<this.textarea.offsetWidth&&(this.textarea.style.width=Math.round(this.bounds.width/d)+(this.textarea.offsetWidth-
+this.textarea.clientWidth)+"px",this.bounds.width=parseInt(this.textarea.style.width)*d);this.textarea.style.left=Math.round(this.bounds.x)+"px";this.textarea.style.top=Math.round(this.bounds.y)+"px";mxClient.IS_VML?this.textarea.style.zoom=d:mxUtils.setPrefixedStyle(this.textarea.style,"transform","scale("+d+","+d+")")}else this.textarea.style.height="",this.textarea.style.overflow="",c.apply(this,arguments)};mxCellEditorGetInitialValue=mxCellEditor.prototype.getInitialValue;mxCellEditor.prototype.getInitialValue=
 function(a,c){if("0"==mxUtils.getValue(a.style,"html","0"))return mxCellEditorGetInitialValue.apply(this,arguments);var b=this.graph.getEditingValue(a.cell,c);"1"==mxUtils.getValue(a.style,"nl2Br","1")&&(b=b.replace(/\n/g,"<br/>"));return b=this.graph.sanitizeHtml(b,!0)};mxCellEditorGetCurrentValue=mxCellEditor.prototype.getCurrentValue;mxCellEditor.prototype.getCurrentValue=function(a){if("0"==mxUtils.getValue(a.style,"html","0"))return mxCellEditorGetCurrentValue.apply(this,arguments);var c=this.graph.sanitizeHtml(this.textarea.innerHTML,
-!0);return c="1"==mxUtils.getValue(a.style,"nl2Br","1")?c.replace(/\r\n/g,"<br/>").replace(/\n/g,"<br/>"):c.replace(/\r\n/g,"").replace(/\n/g,"")};var f=mxCellEditor.prototype.stopEditing;mxCellEditor.prototype.stopEditing=function(a){this.codeViewMode&&this.toggleViewMode();f.apply(this,arguments);this.focusContainer()};mxCellEditor.prototype.focusContainer=function(){try{this.graph.container.focus()}catch(G){}};var h=mxCellEditor.prototype.applyValue;mxCellEditor.prototype.applyValue=function(a,
-c){this.graph.getModel().beginUpdate();try{if(h.apply(this,arguments),this.graph.isCellDeletable(a.cell)&&0==this.graph.model.getChildCount(a.cell)){var b=mxUtils.getValue(a.style,mxConstants.STYLE_STROKECOLOR,mxConstants.NONE),f=mxUtils.getValue(a.style,mxConstants.STYLE_FILLCOLOR,mxConstants.NONE);""==c&&b==mxConstants.NONE&&f==mxConstants.NONE&&this.graph.removeCells([a.cell],!1)}}finally{this.graph.getModel().endUpdate()}};mxCellEditor.prototype.getBackgroundColor=function(a){var c=null;if(this.graph.getModel().isEdge(a.cell)||
-this.graph.getModel().isEdge(this.graph.getModel().getParent(a.cell)))c=mxUtils.getValue(a.style,mxConstants.STYLE_LABEL_BACKGROUNDCOLOR,null),c==mxConstants.NONE&&(c=null);return c};mxCellEditor.prototype.getMinimumSize=function(a){var c=this.graph.getView().scale;return new mxRectangle(0,0,null==a.text?30:a.text.size*c+20,30)};var m=mxGraphHandler.prototype.moveCells;mxGraphHandler.prototype.moveCells=function(a,c,b,f,d,e){mxEvent.isAltDown(e)&&(d=null);m.apply(this,arguments)};mxGraphHandler.prototype.updateHint=
-function(c){if(null!=this.shape){null==this.hint&&(this.hint=a(),this.graph.container.appendChild(this.hint));var b=this.graph.view.translate,f=this.graph.view.scale;c=this.roundLength((this.bounds.x+this.currentDx)/f-b.x);b=this.roundLength((this.bounds.y+this.currentDy)/f-b.y);this.hint.innerHTML=c+", "+b;this.hint.style.left=this.shape.bounds.x+Math.round((this.shape.bounds.width-this.hint.clientWidth)/2)+"px";this.hint.style.top=this.shape.bounds.y+this.shape.bounds.height+12+"px"}};mxGraphHandler.prototype.removeHint=
+!0);return c="1"==mxUtils.getValue(a.style,"nl2Br","1")?c.replace(/\r\n/g,"<br/>").replace(/\n/g,"<br/>"):c.replace(/\r\n/g,"").replace(/\n/g,"")};var f=mxCellEditor.prototype.stopEditing;mxCellEditor.prototype.stopEditing=function(a){this.codeViewMode&&this.toggleViewMode();f.apply(this,arguments);this.focusContainer()};mxCellEditor.prototype.focusContainer=function(){try{this.graph.container.focus()}catch(H){}};var g=mxCellEditor.prototype.applyValue;mxCellEditor.prototype.applyValue=function(a,
+c){this.graph.getModel().beginUpdate();try{if(g.apply(this,arguments),this.graph.isCellDeletable(a.cell)&&0==this.graph.model.getChildCount(a.cell)){var b=mxUtils.getValue(a.style,mxConstants.STYLE_STROKECOLOR,mxConstants.NONE),d=mxUtils.getValue(a.style,mxConstants.STYLE_FILLCOLOR,mxConstants.NONE);""==c&&b==mxConstants.NONE&&d==mxConstants.NONE&&this.graph.removeCells([a.cell],!1)}}finally{this.graph.getModel().endUpdate()}};mxCellEditor.prototype.getBackgroundColor=function(a){var c=null;if(this.graph.getModel().isEdge(a.cell)||
+this.graph.getModel().isEdge(this.graph.getModel().getParent(a.cell)))c=mxUtils.getValue(a.style,mxConstants.STYLE_LABEL_BACKGROUNDCOLOR,null),c==mxConstants.NONE&&(c=null);return c};mxCellEditor.prototype.getMinimumSize=function(a){var c=this.graph.getView().scale;return new mxRectangle(0,0,null==a.text?30:a.text.size*c+20,30)};var p=mxGraphHandler.prototype.moveCells;mxGraphHandler.prototype.moveCells=function(a,c,b,d,f,g){mxEvent.isAltDown(g)&&(f=null);p.apply(this,arguments)};mxGraphHandler.prototype.updateHint=
+function(c){if(null!=this.shape){null==this.hint&&(this.hint=a(),this.graph.container.appendChild(this.hint));var b=this.graph.view.translate,d=this.graph.view.scale;c=this.roundLength((this.bounds.x+this.currentDx)/d-b.x);b=this.roundLength((this.bounds.y+this.currentDy)/d-b.y);this.hint.innerHTML=c+", "+b;this.hint.style.left=this.shape.bounds.x+Math.round((this.shape.bounds.width-this.hint.clientWidth)/2)+"px";this.hint.style.top=this.shape.bounds.y+this.shape.bounds.height+12+"px"}};mxGraphHandler.prototype.removeHint=
 function(){null!=this.hint&&(this.hint.parentNode.removeChild(this.hint),this.hint=null)};mxVertexHandler.prototype.isRecursiveResize=function(a,c){return!this.graph.isSwimlane(a.cell)&&0<this.graph.model.getChildCount(a.cell)&&!mxEvent.isControlDown(c.getEvent())&&!this.graph.isCellCollapsed(a.cell)&&"1"==mxUtils.getValue(a.style,"recursiveResize","1")&&null==mxUtils.getValue(a.style,"childLayout",null)};mxVertexHandler.prototype.isCenteredEvent=function(a,c){return!(!this.graph.isSwimlane(a.cell)&&
-0<this.graph.model.getChildCount(a.cell)&&!this.graph.isCellCollapsed(a.cell)&&"1"==mxUtils.getValue(a.style,"recursiveResize","1")&&null==mxUtils.getValue(a.style,"childLayout",null))&&mxEvent.isControlDown(c.getEvent())||mxEvent.isMetaDown(c.getEvent())};var n=mxVertexHandler.prototype.getHandlePadding;mxVertexHandler.prototype.getHandlePadding=function(){var a=new mxPoint(0,0),c=this.tolerance;this.graph.cellEditor.getEditingCell()==this.state.cell&&null!=this.sizers&&0<this.sizers.length&&null!=
-this.sizers[0]?(c/=2,a.x=this.sizers[0].bounds.width+c,a.y=this.sizers[0].bounds.height+c):a=n.apply(this,arguments);return a};mxVertexHandler.prototype.updateHint=function(c){this.index!=mxEvent.LABEL_HANDLE&&(null==this.hint&&(this.hint=a(),this.state.view.graph.container.appendChild(this.hint)),this.index==mxEvent.ROTATION_HANDLE?this.hint.innerHTML=this.currentAlpha+"&deg;":(c=this.state.view.scale,this.hint.innerHTML=this.roundLength(this.bounds.width/c)+" x "+this.roundLength(this.bounds.height/
-c)),c=mxUtils.getBoundingBox(this.bounds,null!=this.currentAlpha?this.currentAlpha:this.state.style[mxConstants.STYLE_ROTATION]||"0"),null==c&&(c=this.bounds),this.hint.style.left=c.x+Math.round((c.width-this.hint.clientWidth)/2)+"px",this.hint.style.top=c.y+c.height+12+"px")};mxVertexHandler.prototype.removeHint=mxGraphHandler.prototype.removeHint;mxEdgeHandler.prototype.updateHint=function(c,b){null==this.hint&&(this.hint=a(),this.state.view.graph.container.appendChild(this.hint));var f=this.graph.view.translate,
-d=this.graph.view.scale,e=this.roundLength(b.x/d-f.x),f=this.roundLength(b.y/d-f.y);this.hint.innerHTML=e+", "+f;this.hint.style.visibility="visible";if(this.isSource||this.isTarget)null!=this.constraintHandler.currentConstraint&&null!=this.constraintHandler.currentFocus?(e=this.constraintHandler.currentConstraint.point,this.hint.innerHTML="["+Math.round(100*e.x)+"%, "+Math.round(100*e.y)+"%]"):this.marker.hasValidState()&&(this.hint.style.visibility="hidden");this.hint.style.left=Math.round(c.getGraphX()-
+0<this.graph.model.getChildCount(a.cell)&&!this.graph.isCellCollapsed(a.cell)&&"1"==mxUtils.getValue(a.style,"recursiveResize","1")&&null==mxUtils.getValue(a.style,"childLayout",null))&&mxEvent.isControlDown(c.getEvent())||mxEvent.isMetaDown(c.getEvent())};var m=mxVertexHandler.prototype.getHandlePadding;mxVertexHandler.prototype.getHandlePadding=function(){var a=new mxPoint(0,0),c=this.tolerance;this.graph.cellEditor.getEditingCell()==this.state.cell&&null!=this.sizers&&0<this.sizers.length&&null!=
+this.sizers[0]?(c/=2,a.x=this.sizers[0].bounds.width+c,a.y=this.sizers[0].bounds.height+c):a=m.apply(this,arguments);return a};mxVertexHandler.prototype.updateHint=function(c){this.index!=mxEvent.LABEL_HANDLE&&(null==this.hint&&(this.hint=a(),this.state.view.graph.container.appendChild(this.hint)),this.index==mxEvent.ROTATION_HANDLE?this.hint.innerHTML=this.currentAlpha+"&deg;":(c=this.state.view.scale,this.hint.innerHTML=this.roundLength(this.bounds.width/c)+" x "+this.roundLength(this.bounds.height/
+c)),c=mxUtils.getBoundingBox(this.bounds,null!=this.currentAlpha?this.currentAlpha:this.state.style[mxConstants.STYLE_ROTATION]||"0"),null==c&&(c=this.bounds),this.hint.style.left=c.x+Math.round((c.width-this.hint.clientWidth)/2)+"px",this.hint.style.top=c.y+c.height+12+"px")};mxVertexHandler.prototype.removeHint=mxGraphHandler.prototype.removeHint;mxEdgeHandler.prototype.updateHint=function(c,b){null==this.hint&&(this.hint=a(),this.state.view.graph.container.appendChild(this.hint));var d=this.graph.view.translate,
+f=this.graph.view.scale,g=this.roundLength(b.x/f-d.x),d=this.roundLength(b.y/f-d.y);this.hint.innerHTML=g+", "+d;this.hint.style.visibility="visible";if(this.isSource||this.isTarget)null!=this.constraintHandler.currentConstraint&&null!=this.constraintHandler.currentFocus?(g=this.constraintHandler.currentConstraint.point,this.hint.innerHTML="["+Math.round(100*g.x)+"%, "+Math.round(100*g.y)+"%]"):this.marker.hasValidState()&&(this.hint.style.visibility="hidden");this.hint.style.left=Math.round(c.getGraphX()-
 this.hint.clientWidth/2)+"px";this.hint.style.top=Math.max(c.getGraphY(),b.y)+this.state.view.graph.gridSize+"px";null!=this.hideEdgeHintThread&&window.clearTimeout(this.hideEdgeHintThread);this.hideEdgeHintThread=window.setTimeout(mxUtils.bind(this,function(){null!=this.hint&&(this.hint.style.visibility="hidden")}),500)};mxEdgeHandler.prototype.removeHint=mxGraphHandler.prototype.removeHint;HoverIcons.prototype.mainHandle=new mxImage(mxClient.IS_SVG?"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABEAAAARCAYAAAA7bUf6AAAACXBIWXMAAAsTAAALEwEAmpwYAAABLUlEQVQ4y61US4rCQBBNeojiRrLSnbMOWWU3V1FPouARcgc9hyLOCSSbYZw5gRCIkM9KbevJaycS4zCOBY+iq6pf1y+xrNtiE6oEY/tVzMUXgSNoCJrUDu3qHpldutwSuIKOoEvt0m7I7DoCvNj2fb8XRdEojuN5lmVraJxhh59xFSLFF9phGL7lef6hRb63R73aHM8aAjv8JHJ47yqLlud5r0VRbHa51sPZQVuT/QU4ww4/4ljaJRubrC5SxouD6TWBQV/sEIkbs0eOIVGssSO1L5D6LQID+BHHZjdMSYpj7KZpun7/uk8CP5rNqTXLJP/OpNyTMWruP9CTP08nCILKdCp7gkCzJ8vPnz2BvW5PKhuLjJBykiQLaWIEjTP3o3Zjn/LtPO0rfvh/cgKu7z6wtPPltQAAAABJRU5ErkJggg==":
 IMAGE_PATH+"/handle-main.png",17,17);HoverIcons.prototype.fixedHandle=new mxImage(mxClient.IS_SVG?"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABEAAAARCAYAAAA7bUf6AAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAyJpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuMC1jMDYwIDYxLjEzNDc3NywgMjAxMC8wMi8xMi0xNzozMjowMCAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvIiB4bWxuczp4bXBNTT0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL21tLyIgeG1sbnM6c3RSZWY9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9zVHlwZS9SZXNvdXJjZVJlZiMiIHhtcDpDcmVhdG9yVG9vbD0iQWRvYmUgUGhvdG9zaG9wIENTNSBNYWNpbnRvc2giIHhtcE1NOkluc3RhbmNlSUQ9InhtcC5paWQ6NkE1NkU4Njk2QjI1MTFFNEFDMjFGQTcyODkzNTc3NkYiIHhtcE1NOkRvY3VtZW50SUQ9InhtcC5kaWQ6NkE1NkU4NkE2QjI1MTFFNEFDMjFGQTcyODkzNTc3NkYiPiA8eG1wTU06RGVyaXZlZEZyb20gc3RSZWY6aW5zdGFuY2VJRD0ieG1wLmlpZDo2QTU2RTg2NzZCMjUxMUU0QUMyMUZBNzI4OTM1Nzc2RiIgc3RSZWY6ZG9jdW1lbnRJRD0ieG1wLmRpZDo2QTU2RTg2ODZCMjUxMUU0QUMyMUZBNzI4OTM1Nzc2RiIvPiA8L3JkZjpEZXNjcmlwdGlvbj4gPC9yZGY6UkRGPiA8L3g6eG1wbWV0YT4gPD94cGFja2V0IGVuZD0iciI/Pmuk6K8AAAGBSURBVHjarFRBSsNQEM3/atNs6qLowixcKELoqjuXoqfQeoF6BMEj9BCC1YIXcCGlV8hGLNZlBKWlCk1JSs13Xvw/nca6UDrwmMzMy8tk/iTCWmwi52Eq53+QeWwg2bXSSNi1WiRibgRWCTahwEQmhJgw1WJGML2BC6wQnEqlsuH7fr3f7zdHo9EdPGLkUdc8mX8TJNYIpUajsR+G4YMie3pNVKebpB6GPOrgab7kr5F24Hne9ng87r6HStUuP5V1Mc2AGHnUwWMdCck6sVut1onjOHtnt4nV7M0fAuI65VEnXk3PTFq5Eyi4rnvUe1PW9fO3QOdUzvkbyqNOvEM2dMEHK2zbLr98zJ5+cJWkAvDGUC8Wi2X28Gww6bnHcTzYWp+JGAHTCQz1KIoGfFckCyZBELR3N4V1vCOyTrhHHnXw9N5kQn8+nWq1Onc6C/cERLMn7cfZniD/257wbjDxEjqiDT0fDof3tLE+PGK9HyXNy7pYyrez9K/43/+TLwEGAMb7AY6w980DAAAAAElFTkSuQmCC":
 IMAGE_PATH+"/handle-fixed.png",17,17);HoverIcons.prototype.terminalHandle=new mxImage(mxClient.IS_SVG?"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABEAAAARCAYAAAA7bUf6AAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAyJpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuMC1jMDYwIDYxLjEzNDc3NywgMjAxMC8wMi8xMi0xNzozMjowMCAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvIiB4bWxuczp4bXBNTT0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL21tLyIgeG1sbnM6c3RSZWY9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9zVHlwZS9SZXNvdXJjZVJlZiMiIHhtcDpDcmVhdG9yVG9vbD0iQWRvYmUgUGhvdG9zaG9wIENTNSBNYWNpbnRvc2giIHhtcE1NOkluc3RhbmNlSUQ9InhtcC5paWQ6MEMzRUVERTk2NzU1MTFFNTg5NjNEMjREQ0FFNENFQzgiIHhtcE1NOkRvY3VtZW50SUQ9InhtcC5kaWQ6MEMzRUVERUE2NzU1MTFFNTg5NjNEMjREQ0FFNENFQzgiPiA8eG1wTU06RGVyaXZlZEZyb20gc3RSZWY6aW5zdGFuY2VJRD0ieG1wLmlpZDowQzNFRURFNzY3NTUxMUU1ODk2M0QyNERDQUU0Q0VDOCIgc3RSZWY6ZG9jdW1lbnRJRD0ieG1wLmRpZDowQzNFRURFODY3NTUxMUU1ODk2M0QyNERDQUU0Q0VDOCIvPiA8L3JkZjpEZXNjcmlwdGlvbj4gPC9yZGY6UkRGPiA8L3g6eG1wbWV0YT4gPD94cGFja2V0IGVuZD0iciI/Poj8AGUAAAF6SURBVHjarFTBSsNAEM2u2jSXeCh6sAcPilB6ys2j6Fdo/YH6CYKf0I8QrBb8AQ9S+gu5iMV6jKC0VCEJTalZ54VNnMR4ULrwmJ2Zt5PZmdkIo3yJgsRSBfmDzPUUku2VRsz2qixIehBYJZiECgsyJ0SEhQ6WBkwO8AArBKvZbG64rtsej8dd3/fvIKHDDr/myeJNYFgj2J1OZz8IggdF6+k1VoNhnEgs2OEHT/Mlv0aSQaPR2A7DcPgeKNW6/FTGxSIDdNjhB49lJCTLxOz1eieWZe2d3cZGd5RvAvQ22eEnXkvXTBqFDlTq9frR6E0Z18+qtO83ZIefeIes6IIXVpimWXv5yB8cnMqcDn+1Wq2xj2eFSfoeRdFkaz0f5OAqzunwz2azCZ8VyZS553n93U1hHO+I0uvADj94em6yQH/ujuM4ue6UzgmI6Zz0H7/nBPbf5oRng4rbyIgm9Hw6nd7TxLqQ0PV82JqXZbGUt7P0V/zv/8mXAAMASSz1f9Cd7ycAAAAASUVORK5CYII=":
@@ -2336,192 +2337,192 @@ HoverIcons.prototype.roundDrop.src);mxVertexHandler.prototype.rotationEnabled=!0
 !0;mxEdgeHandler.prototype.virtualBendsEnabled=!0;mxEdgeHandler.prototype.mergeRemoveEnabled=!0;mxEdgeHandler.prototype.manageLabelHandle=!0;mxEdgeHandler.prototype.outlineConnect=!0;mxEdgeHandler.prototype.isAddVirtualBendEvent=function(a){return!mxEvent.isShiftDown(a.getEvent())};mxEdgeHandler.prototype.isCustomHandleEvent=function(a){return!mxEvent.isShiftDown(a.getEvent())};if(Graph.touchStyle){if(mxClient.IS_TOUCH||0<navigator.maxTouchPoints||0<navigator.msMaxTouchPoints)mxShape.prototype.svgStrokeTolerance=
 18,mxVertexHandler.prototype.tolerance=12,mxEdgeHandler.prototype.tolerance=12,Graph.prototype.tolerance=12,mxVertexHandler.prototype.rotationHandleVSpacing=-24,mxConstraintHandler.prototype.getTolerance=function(a){return mxEvent.isMouseEvent(a.getEvent())?4:this.graph.getTolerance()};mxPanningHandler.prototype.isPanningTrigger=function(a){var c=a.getEvent();return null==a.getState()&&!mxEvent.isMouseEvent(c)||mxEvent.isPopupTrigger(c)&&(null==a.getState()||mxEvent.isControlDown(c)||mxEvent.isShiftDown(c))};
 var u=mxGraphHandler.prototype.mouseDown;mxGraphHandler.prototype.mouseDown=function(a,c){u.apply(this,arguments);mxEvent.isTouchEvent(c.getEvent())&&this.graph.isCellSelected(c.getCell())&&1<this.graph.getSelectionCount()&&(this.delayedSelection=!1)}}else mxPanningHandler.prototype.isPanningTrigger=function(a){var c=a.getEvent();return mxEvent.isLeftMouseButton(c)&&(this.useLeftButtonForPanning&&null==a.getState()||mxEvent.isControlDown(c)&&!mxEvent.isShiftDown(c))||this.usePopupTrigger&&mxEvent.isPopupTrigger(c)};
-mxRubberband.prototype.isSpaceEvent=function(a){return this.graph.isEnabled()&&!this.graph.isCellLocked(this.graph.getDefaultParent())&&mxEvent.isControlDown(a.getEvent())&&mxEvent.isShiftDown(a.getEvent())};mxRubberband.prototype.mouseUp=function(a,c){var b=null!=this.div&&"none"!=this.div.style.display,f=null,d=null,e=null,h=null;null!=this.first&&null!=this.currentX&&null!=this.currentY&&(f=this.first.x,d=this.first.y,e=(this.currentX-f)/this.graph.view.scale,h=(this.currentY-d)/this.graph.view.scale,
-mxEvent.isAltDown(c.getEvent())||(e=this.graph.snap(e),h=this.graph.snap(h),this.graph.isGridEnabled()||(Math.abs(e)<this.graph.tolerance&&(e=0),Math.abs(h)<this.graph.tolerance&&(h=0))));this.reset();if(b){if(mxEvent.isAltDown(c.getEvent())&&this.graph.isToggleEvent(c.getEvent())){var e=new mxRectangle(this.x,this.y,this.width,this.height),k=this.graph.getCells(e.x,e.y,e.width,e.height);this.graph.removeSelectionCells(k)}else if(this.isSpaceEvent(c)){this.graph.model.beginUpdate();try{for(k=this.graph.getCellsBeyond(f,
-d,this.graph.getDefaultParent(),!0,!0),b=0;b<k.length;b++)if(this.graph.isCellMovable(k[b])){var m=this.graph.view.getState(k[b]),n=this.graph.getCellGeometry(k[b]);null!=m&&null!=n&&(n=n.clone(),n.translate(e,h),this.graph.model.setGeometry(k[b],n))}}finally{this.graph.model.endUpdate()}}else e=new mxRectangle(this.x,this.y,this.width,this.height),this.graph.selectRegion(e,c.getEvent());c.consume()}};mxRubberband.prototype.mouseMove=function(a,c){if(!c.isConsumed()&&null!=this.first){var b=mxUtils.getScrollOrigin(this.graph.container),
-f=mxUtils.getOffset(this.graph.container);b.x-=f.x;b.y-=f.y;var f=c.getX()+b.x,b=c.getY()+b.y,d=this.first.x-f,e=this.first.y-b,h=this.graph.tolerance;if(null!=this.div||Math.abs(d)>h||Math.abs(e)>h)null==this.div&&(this.div=this.createShape()),mxUtils.clearSelection(),this.update(f,b),this.isSpaceEvent(c)?(f=this.x+this.width,b=this.y+this.height,d=this.graph.view.scale,mxEvent.isAltDown(c.getEvent())||(this.width=this.graph.snap(this.width/d)*d,this.height=this.graph.snap(this.height/d)*d,this.graph.isGridEnabled()||
-(this.width<this.graph.tolerance&&(this.width=0),this.height<this.graph.tolerance&&(this.height=0)),this.x<this.first.x&&(this.x=f-this.width),this.y<this.first.y&&(this.y=b-this.height)),this.div.style.borderStyle="dashed",this.div.style.backgroundColor="white",this.div.style.left=this.x+"px",this.div.style.top=this.y+"px",this.div.style.width=Math.max(0,this.width)+"px",this.div.style.height=this.graph.container.clientHeight+"px",this.div.style.borderWidth=0>=this.width?"0px 1px 0px 0px":"0px 1px 0px 1px",
+mxRubberband.prototype.isSpaceEvent=function(a){return this.graph.isEnabled()&&!this.graph.isCellLocked(this.graph.getDefaultParent())&&mxEvent.isControlDown(a.getEvent())&&mxEvent.isShiftDown(a.getEvent())};mxRubberband.prototype.mouseUp=function(a,c){var b=null!=this.div&&"none"!=this.div.style.display,d=null,f=null,g=null,e=null;null!=this.first&&null!=this.currentX&&null!=this.currentY&&(d=this.first.x,f=this.first.y,g=(this.currentX-d)/this.graph.view.scale,e=(this.currentY-f)/this.graph.view.scale,
+mxEvent.isAltDown(c.getEvent())||(g=this.graph.snap(g),e=this.graph.snap(e),this.graph.isGridEnabled()||(Math.abs(g)<this.graph.tolerance&&(g=0),Math.abs(e)<this.graph.tolerance&&(e=0))));this.reset();if(b){if(mxEvent.isAltDown(c.getEvent())&&this.graph.isToggleEvent(c.getEvent())){var g=new mxRectangle(this.x,this.y,this.width,this.height),k=this.graph.getCells(g.x,g.y,g.width,g.height);this.graph.removeSelectionCells(k)}else if(this.isSpaceEvent(c)){this.graph.model.beginUpdate();try{for(k=this.graph.getCellsBeyond(d,
+f,this.graph.getDefaultParent(),!0,!0),b=0;b<k.length;b++)if(this.graph.isCellMovable(k[b])){var p=this.graph.view.getState(k[b]),m=this.graph.getCellGeometry(k[b]);null!=p&&null!=m&&(m=m.clone(),m.translate(g,e),this.graph.model.setGeometry(k[b],m))}}finally{this.graph.model.endUpdate()}}else g=new mxRectangle(this.x,this.y,this.width,this.height),this.graph.selectRegion(g,c.getEvent());c.consume()}};mxRubberband.prototype.mouseMove=function(a,c){if(!c.isConsumed()&&null!=this.first){var b=mxUtils.getScrollOrigin(this.graph.container),
+d=mxUtils.getOffset(this.graph.container);b.x-=d.x;b.y-=d.y;var d=c.getX()+b.x,b=c.getY()+b.y,f=this.first.x-d,g=this.first.y-b,e=this.graph.tolerance;if(null!=this.div||Math.abs(f)>e||Math.abs(g)>e)null==this.div&&(this.div=this.createShape()),mxUtils.clearSelection(),this.update(d,b),this.isSpaceEvent(c)?(d=this.x+this.width,b=this.y+this.height,f=this.graph.view.scale,mxEvent.isAltDown(c.getEvent())||(this.width=this.graph.snap(this.width/f)*f,this.height=this.graph.snap(this.height/f)*f,this.graph.isGridEnabled()||
+(this.width<this.graph.tolerance&&(this.width=0),this.height<this.graph.tolerance&&(this.height=0)),this.x<this.first.x&&(this.x=d-this.width),this.y<this.first.y&&(this.y=b-this.height)),this.div.style.borderStyle="dashed",this.div.style.backgroundColor="white",this.div.style.left=this.x+"px",this.div.style.top=this.y+"px",this.div.style.width=Math.max(0,this.width)+"px",this.div.style.height=this.graph.container.clientHeight+"px",this.div.style.borderWidth=0>=this.width?"0px 1px 0px 0px":"0px 1px 0px 1px",
 null==this.secondDiv&&(this.secondDiv=this.div.cloneNode(!0),this.div.parentNode.appendChild(this.secondDiv)),this.secondDiv.style.left=this.x+"px",this.secondDiv.style.top=this.y+"px",this.secondDiv.style.width=this.graph.container.clientWidth+"px",this.secondDiv.style.height=Math.max(0,this.height)+"px",this.secondDiv.style.borderWidth=0>=this.height?"1px 0px 0px 0px":"1px 0px 1px 0px"):(this.div.style.backgroundColor="",this.div.style.borderWidth="",this.div.style.borderStyle="",null!=this.secondDiv&&
-(this.secondDiv.parentNode.removeChild(this.secondDiv),this.secondDiv=null)),c.consume()}};var r=mxRubberband.prototype.reset;mxRubberband.prototype.reset=function(){null!=this.secondDiv&&(this.secondDiv.parentNode.removeChild(this.secondDiv),this.secondDiv=null);r.apply(this,arguments)};var k=(new Date).getTime(),t=0,v=mxEdgeHandler.prototype.updatePreviewState;mxEdgeHandler.prototype.updatePreviewState=function(a,c,b,f){v.apply(this,arguments);b!=this.currentTerminalState?(k=(new Date).getTime(),
-t=0):t=(new Date).getTime()-k;this.currentTerminalState=b};var x=mxEdgeHandler.prototype.isOutlineConnectEvent;mxEdgeHandler.prototype.isOutlineConnectEvent=function(a){return null!=this.currentTerminalState&&a.getState()==this.currentTerminalState&&2E3<t||(null==this.currentTerminalState||"0"!=mxUtils.getValue(this.currentTerminalState.style,"outlineConnect","1"))&&x.apply(this,arguments)};mxVertexHandler.prototype.isCustomHandleEvent=function(a){return!mxEvent.isShiftDown(a.getEvent())};mxEdgeHandler.prototype.createHandleShape=
-function(a,c){var b=null!=a&&0==a,f=this.state.getVisibleTerminalState(b),d=null!=a&&(0==a||a>=this.state.absolutePoints.length-1||this.constructor==mxElbowEdgeHandler&&2==a)?this.graph.getConnectionConstraint(this.state,f,b):null,b=null!=(null!=d?this.graph.getConnectionPoint(this.state.getVisibleTerminalState(b),d):null)?this.fixedHandleImage:null!=d&&null!=f?this.terminalHandleImage:this.handleImage;if(null!=b)return b=new mxImageShape(new mxRectangle(0,0,b.width,b.height),b.src),b.preserveImageAspect=
+(this.secondDiv.parentNode.removeChild(this.secondDiv),this.secondDiv=null)),c.consume()}};var r=mxRubberband.prototype.reset;mxRubberband.prototype.reset=function(){null!=this.secondDiv&&(this.secondDiv.parentNode.removeChild(this.secondDiv),this.secondDiv=null);r.apply(this,arguments)};var k=(new Date).getTime(),v=0,t=mxEdgeHandler.prototype.updatePreviewState;mxEdgeHandler.prototype.updatePreviewState=function(a,c,b,d){t.apply(this,arguments);b!=this.currentTerminalState?(k=(new Date).getTime(),
+v=0):v=(new Date).getTime()-k;this.currentTerminalState=b};var x=mxEdgeHandler.prototype.isOutlineConnectEvent;mxEdgeHandler.prototype.isOutlineConnectEvent=function(a){return null!=this.currentTerminalState&&a.getState()==this.currentTerminalState&&2E3<v||(null==this.currentTerminalState||"0"!=mxUtils.getValue(this.currentTerminalState.style,"outlineConnect","1"))&&x.apply(this,arguments)};mxVertexHandler.prototype.isCustomHandleEvent=function(a){return!mxEvent.isShiftDown(a.getEvent())};mxEdgeHandler.prototype.createHandleShape=
+function(a,c){var b=null!=a&&0==a,d=this.state.getVisibleTerminalState(b),f=null!=a&&(0==a||a>=this.state.absolutePoints.length-1||this.constructor==mxElbowEdgeHandler&&2==a)?this.graph.getConnectionConstraint(this.state,d,b):null,b=null!=(null!=f?this.graph.getConnectionPoint(this.state.getVisibleTerminalState(b),f):null)?this.fixedHandleImage:null!=f&&null!=d?this.terminalHandleImage:this.handleImage;if(null!=b)return b=new mxImageShape(new mxRectangle(0,0,b.width,b.height),b.src),b.preserveImageAspect=
 !1,b;b=mxConstants.HANDLE_SIZE;this.preferHtml&&--b;return new mxRectangleShape(new mxRectangle(0,0,b,b),mxConstants.HANDLE_FILLCOLOR,mxConstants.HANDLE_STROKECOLOR)};var w=mxVertexHandler.prototype.createSizerShape;mxVertexHandler.prototype.createSizerShape=function(a,c,b){this.handleImage=c==mxEvent.ROTATION_HANDLE?HoverIcons.prototype.rotationHandle:c==mxEvent.LABEL_HANDLE?this.secondaryHandleImage:this.handleImage;return w.apply(this,arguments)};var D=mxGraphHandler.prototype.getBoundingBox;mxGraphHandler.prototype.getBoundingBox=
-function(a){if(null!=a&&1==a.length){var c=this.graph.getModel(),b=c.getParent(a[0]),f=this.graph.getCellGeometry(a[0]);if(c.isEdge(b)&&null!=f&&f.relative&&(c=this.graph.view.getState(a[0]),null!=c&&2>c.width&&2>c.height&&null!=c.text&&null!=c.text.boundingBox))return mxRectangle.fromRectangle(c.text.boundingBox)}return D.apply(this,arguments)};var B=mxVertexHandler.prototype.getSelectionBounds;mxVertexHandler.prototype.getSelectionBounds=function(a){var c=this.graph.getModel(),b=c.getParent(a.cell),
-f=this.graph.getCellGeometry(a.cell);return c.isEdge(b)&&null!=f&&f.relative&&2>a.width&&2>a.height&&null!=a.text&&null!=a.text.boundingBox?(c=a.text.unrotatedBoundingBox||a.text.boundingBox,new mxRectangle(Math.round(c.x),Math.round(c.y),Math.round(c.width),Math.round(c.height))):B.apply(this,arguments)};var y=mxVertexHandler.prototype.mouseDown;mxVertexHandler.prototype.mouseDown=function(a,c){var b=this.graph.getModel(),f=b.getParent(this.state.cell),d=this.graph.getCellGeometry(this.state.cell);
-(this.getHandleForEvent(c)==mxEvent.ROTATION_HANDLE||!b.isEdge(f)||null==d||!d.relative||null==this.state||2<=this.state.width||2<=this.state.height)&&y.apply(this,arguments)};mxVertexHandler.prototype.isRotationHandleVisible=function(){return this.graph.isEnabled()&&this.rotationEnabled&&this.graph.isCellRotatable(this.state.cell)&&(0>=mxGraphHandler.prototype.maxCells||this.graph.getSelectionCount()<mxGraphHandler.prototype.maxCells)};mxVertexHandler.prototype.rotateClick=function(){this.state.view.graph.turnShapes([this.state.cell])};
-var C=mxVertexHandler.prototype.mouseMove;mxVertexHandler.prototype.mouseMove=function(a,c){C.apply(this,arguments);null!=this.graph.graphHandler.first&&null!=this.rotationShape&&null!=this.rotationShape.node&&(this.rotationShape.node.style.display="none")};var A=mxVertexHandler.prototype.mouseUp;mxVertexHandler.prototype.mouseUp=function(a,c){A.apply(this,arguments);null!=this.rotationShape&&null!=this.rotationShape.node&&(this.rotationShape.node.style.display=1==this.graph.getSelectionCount()?"":
-"none")};var F=mxVertexHandler.prototype.init;mxVertexHandler.prototype.init=function(){F.apply(this,arguments);var a=!1;null!=this.rotationShape&&this.rotationShape.node.setAttribute("title",mxResources.get("rotateTooltip"));var c=mxUtils.bind(this,function(){null!=this.rotationShape&&null!=this.rotationShape.node&&(this.rotationShape.node.style.display=1==this.graph.getSelectionCount()?"":"none");null!=this.specialHandle&&(this.specialHandle.node.style.display=this.graph.isEnabled()&&this.graph.getSelectionCount()<
+function(a){if(null!=a&&1==a.length){var c=this.graph.getModel(),b=c.getParent(a[0]),d=this.graph.getCellGeometry(a[0]);if(c.isEdge(b)&&null!=d&&d.relative&&(c=this.graph.view.getState(a[0]),null!=c&&2>c.width&&2>c.height&&null!=c.text&&null!=c.text.boundingBox))return mxRectangle.fromRectangle(c.text.boundingBox)}return D.apply(this,arguments)};var A=mxVertexHandler.prototype.getSelectionBounds;mxVertexHandler.prototype.getSelectionBounds=function(a){var c=this.graph.getModel(),b=c.getParent(a.cell),
+d=this.graph.getCellGeometry(a.cell);return c.isEdge(b)&&null!=d&&d.relative&&2>a.width&&2>a.height&&null!=a.text&&null!=a.text.boundingBox?(c=a.text.unrotatedBoundingBox||a.text.boundingBox,new mxRectangle(Math.round(c.x),Math.round(c.y),Math.round(c.width),Math.round(c.height))):A.apply(this,arguments)};var z=mxVertexHandler.prototype.mouseDown;mxVertexHandler.prototype.mouseDown=function(a,c){var b=this.graph.getModel(),d=b.getParent(this.state.cell),f=this.graph.getCellGeometry(this.state.cell);
+(this.getHandleForEvent(c)==mxEvent.ROTATION_HANDLE||!b.isEdge(d)||null==f||!f.relative||null==this.state||2<=this.state.width||2<=this.state.height)&&z.apply(this,arguments)};mxVertexHandler.prototype.isRotationHandleVisible=function(){return this.graph.isEnabled()&&this.rotationEnabled&&this.graph.isCellRotatable(this.state.cell)&&(0>=mxGraphHandler.prototype.maxCells||this.graph.getSelectionCount()<mxGraphHandler.prototype.maxCells)};mxVertexHandler.prototype.rotateClick=function(){this.state.view.graph.turnShapes([this.state.cell])};
+var C=mxVertexHandler.prototype.mouseMove;mxVertexHandler.prototype.mouseMove=function(a,c){C.apply(this,arguments);null!=this.graph.graphHandler.first&&null!=this.rotationShape&&null!=this.rotationShape.node&&(this.rotationShape.node.style.display="none")};var B=mxVertexHandler.prototype.mouseUp;mxVertexHandler.prototype.mouseUp=function(a,c){B.apply(this,arguments);null!=this.rotationShape&&null!=this.rotationShape.node&&(this.rotationShape.node.style.display=1==this.graph.getSelectionCount()?"":
+"none")};var E=mxVertexHandler.prototype.init;mxVertexHandler.prototype.init=function(){E.apply(this,arguments);var a=!1;null!=this.rotationShape&&this.rotationShape.node.setAttribute("title",mxResources.get("rotateTooltip"));var c=mxUtils.bind(this,function(){null!=this.rotationShape&&null!=this.rotationShape.node&&(this.rotationShape.node.style.display=1==this.graph.getSelectionCount()?"":"none");null!=this.specialHandle&&(this.specialHandle.node.style.display=this.graph.isEnabled()&&this.graph.getSelectionCount()<
 this.graph.graphHandler.maxCells?"":"none");this.redrawHandles()});this.selectionHandler=mxUtils.bind(this,function(a,b){c()});this.graph.getSelectionModel().addListener(mxEvent.CHANGE,this.selectionHandler);this.changeHandler=mxUtils.bind(this,function(a,b){this.updateLinkHint(this.graph.getLinkForCell(this.state.cell),this.graph.getLinksForState(this.state));c()});this.graph.getModel().addListener(mxEvent.CHANGE,this.changeHandler);this.editingHandler=mxUtils.bind(this,function(a,c){this.redrawHandles()});
-this.graph.addListener(mxEvent.EDITING_STOPPED,this.editingHandler);var b=this.graph.getLinkForCell(this.state.cell),f=this.graph.getLinksForState(this.state);this.updateLinkHint(b,f);if(null!=b||null!=f&&0<f.length)a=!0;a&&this.redrawHandles()};mxVertexHandler.prototype.updateLinkHint=function(c,b){if(null==c&&(null==b||0==b.length)||1<this.graph.getSelectionCount())null!=this.linkHint&&(this.linkHint.parentNode.removeChild(this.linkHint),this.linkHint=null);else if(null!=c||null!=b&&0<b.length){null==
-this.linkHint&&(this.linkHint=a(),this.linkHint.style.padding="6px 8px 6px 8px",this.linkHint.style.fontSize="90%",this.linkHint.style.opacity="1",this.linkHint.style.filter="",this.graph.container.appendChild(this.linkHint));this.linkHint.innerHTML="";if(null!=c&&(this.linkHint.appendChild(this.graph.createLinkForHint(c)),this.graph.isEnabled()&&"function"===typeof this.graph.editLink)){var f=document.createElement("img");f.setAttribute("src",IMAGE_PATH+"/edit.gif");f.setAttribute("title",mxResources.get("editLink"));
-f.setAttribute("width","11");f.setAttribute("height","11");f.style.marginLeft="10px";f.style.marginBottom="-1px";f.style.cursor="pointer";this.linkHint.appendChild(f);mxEvent.addListener(f,"click",mxUtils.bind(this,function(a){this.graph.setSelectionCell(this.state.cell);this.graph.editLink();mxEvent.consume(a)}))}if(null!=b)for(f=0;f<b.length;f++){var d=document.createElement("div");d.style.marginTop=null!=c||0<f?"6px":"0px";d.appendChild(this.graph.createLinkForHint(b[f].getAttribute("href"),mxUtils.getTextContent(b[f])));
-this.linkHint.appendChild(d)}}};mxEdgeHandler.prototype.updateLinkHint=mxVertexHandler.prototype.updateLinkHint;var z=mxEdgeHandler.prototype.init;mxEdgeHandler.prototype.init=function(){z.apply(this,arguments);this.constraintHandler.isEnabled=mxUtils.bind(this,function(){return this.state.view.graph.connectionHandler.isEnabled()});var a=mxUtils.bind(this,function(){null!=this.linkHint&&(this.linkHint.style.display=1==this.graph.getSelectionCount()?"":"none");null!=this.labelShape&&(this.labelShape.node.style.display=
+this.graph.addListener(mxEvent.EDITING_STOPPED,this.editingHandler);var b=this.graph.getLinkForCell(this.state.cell),d=this.graph.getLinksForState(this.state);this.updateLinkHint(b,d);if(null!=b||null!=d&&0<d.length)a=!0;a&&this.redrawHandles()};mxVertexHandler.prototype.updateLinkHint=function(c,b){if(null==c&&(null==b||0==b.length)||1<this.graph.getSelectionCount())null!=this.linkHint&&(this.linkHint.parentNode.removeChild(this.linkHint),this.linkHint=null);else if(null!=c||null!=b&&0<b.length){null==
+this.linkHint&&(this.linkHint=a(),this.linkHint.style.padding="6px 8px 6px 8px",this.linkHint.style.fontSize="90%",this.linkHint.style.opacity="1",this.linkHint.style.filter="",this.graph.container.appendChild(this.linkHint));this.linkHint.innerHTML="";if(null!=c&&(this.linkHint.appendChild(this.graph.createLinkForHint(c)),this.graph.isEnabled()&&"function"===typeof this.graph.editLink)){var d=document.createElement("img");d.setAttribute("src",IMAGE_PATH+"/edit.gif");d.setAttribute("title",mxResources.get("editLink"));
+d.setAttribute("width","11");d.setAttribute("height","11");d.style.marginLeft="10px";d.style.marginBottom="-1px";d.style.cursor="pointer";this.linkHint.appendChild(d);mxEvent.addListener(d,"click",mxUtils.bind(this,function(a){this.graph.setSelectionCell(this.state.cell);this.graph.editLink();mxEvent.consume(a)}))}if(null!=b)for(d=0;d<b.length;d++){var f=document.createElement("div");f.style.marginTop=null!=c||0<d?"6px":"0px";f.appendChild(this.graph.createLinkForHint(b[d].getAttribute("href"),mxUtils.getTextContent(b[d])));
+this.linkHint.appendChild(f)}}};mxEdgeHandler.prototype.updateLinkHint=mxVertexHandler.prototype.updateLinkHint;var y=mxEdgeHandler.prototype.init;mxEdgeHandler.prototype.init=function(){y.apply(this,arguments);this.constraintHandler.isEnabled=mxUtils.bind(this,function(){return this.state.view.graph.connectionHandler.isEnabled()});var a=mxUtils.bind(this,function(){null!=this.linkHint&&(this.linkHint.style.display=1==this.graph.getSelectionCount()?"":"none");null!=this.labelShape&&(this.labelShape.node.style.display=
 this.graph.isEnabled()&&this.graph.getSelectionCount()<this.graph.graphHandler.maxCells?"":"none")});this.selectionHandler=mxUtils.bind(this,function(c,b){a()});this.graph.getSelectionModel().addListener(mxEvent.CHANGE,this.selectionHandler);this.changeHandler=mxUtils.bind(this,function(c,b){this.updateLinkHint(this.graph.getLinkForCell(this.state.cell),this.graph.getLinksForState(this.state));a();this.redrawHandles()});this.graph.getModel().addListener(mxEvent.CHANGE,this.changeHandler);var c=this.graph.getLinkForCell(this.state.cell),
-b=this.graph.getLinksForState(this.state);if(null!=c||null!=b&&0<b.length)this.updateLinkHint(c,b),this.redrawHandles()};var J=mxConnectionHandler.prototype.init;mxConnectionHandler.prototype.init=function(){J.apply(this,arguments);this.constraintHandler.isEnabled=mxUtils.bind(this,function(){return this.graph.connectionHandler.isEnabled()})};var I=mxVertexHandler.prototype.redrawHandles;mxVertexHandler.prototype.redrawHandles=function(){I.apply(this);if(null!=this.state&&null!=this.linkHint){var a=
+b=this.graph.getLinksForState(this.state);if(null!=c||null!=b&&0<b.length)this.updateLinkHint(c,b),this.redrawHandles()};var O=mxConnectionHandler.prototype.init;mxConnectionHandler.prototype.init=function(){O.apply(this,arguments);this.constraintHandler.isEnabled=mxUtils.bind(this,function(){return this.graph.connectionHandler.isEnabled()})};var J=mxVertexHandler.prototype.redrawHandles;mxVertexHandler.prototype.redrawHandles=function(){J.apply(this);if(null!=this.state&&null!=this.linkHint){var a=
 new mxPoint(this.state.getCenterX(),this.state.getCenterY()),c=new mxRectangle(this.state.x,this.state.y-22,this.state.width+24,this.state.height+22),b=mxUtils.getBoundingBox(c,this.state.style[mxConstants.STYLE_ROTATION]||"0",a),a=null!=b?mxUtils.getBoundingBox(this.state,this.state.style[mxConstants.STYLE_ROTATION]||"0"):this.state,c=null!=this.state.text?this.state.text.boundingBox:null;null==b&&(b=this.state);b=b.y+b.height;null!=c&&(b=Math.max(b,c.y+c.height));this.linkHint.style.left=Math.round(a.x+
-(a.width-this.linkHint.clientWidth)/2)+"px";this.linkHint.style.top=Math.round(b+this.verticalOffset/2+6+this.state.view.graph.tolerance)+"px"}};var H=mxVertexHandler.prototype.reset;mxVertexHandler.prototype.reset=function(){H.apply(this,arguments);null!=this.rotationShape&&null!=this.rotationShape.node&&(this.rotationShape.node.style.display=1==this.graph.getSelectionCount()?"":"none")};var T=mxVertexHandler.prototype.destroy;mxVertexHandler.prototype.destroy=function(){T.apply(this,arguments);
-null!=this.linkHint&&(this.linkHint.parentNode.removeChild(this.linkHint),this.linkHint=null);null!=this.selectionHandler&&(this.graph.getSelectionModel().removeListener(this.selectionHandler),this.selectionHandler=null);null!=this.changeHandler&&(this.graph.getModel().removeListener(this.changeHandler),this.changeHandler=null);null!=this.editingHandler&&(this.graph.removeListener(this.editingHandler),this.editingHandler=null)};var N=mxEdgeHandler.prototype.redrawHandles;mxEdgeHandler.prototype.redrawHandles=
-function(){if(null!=this.marker&&(N.apply(this),null!=this.state&&null!=this.linkHint)){var a=this.state;null!=this.state.text&&null!=this.state.text.bounds&&(a=new mxRectangle(a.x,a.y,a.width,a.height),a.add(this.state.text.bounds));this.linkHint.style.left=Math.round(a.x+(a.width-this.linkHint.clientWidth)/2)+"px";this.linkHint.style.top=Math.round(a.y+a.height+6+this.state.view.graph.tolerance)+"px"}};var K=mxEdgeHandler.prototype.reset;mxEdgeHandler.prototype.reset=function(){K.apply(this,arguments);
-null!=this.linkHint&&(this.linkHint.style.visibility="")};var U=mxEdgeHandler.prototype.destroy;mxEdgeHandler.prototype.destroy=function(){U.apply(this,arguments);null!=this.linkHint&&(this.linkHint.parentNode.removeChild(this.linkHint),this.linkHint=null);null!=this.selectionHandler&&(this.graph.getSelectionModel().removeListener(this.selectionHandler),this.selectionHandler=null);null!=this.changeHandler&&(this.graph.getModel().removeListener(this.changeHandler),this.changeHandler=null)}}();(function(){function a(){mxCylinder.call(this)}function b(){mxActor.call(this)}function e(){mxCylinder.call(this)}function d(){mxCylinder.call(this)}function g(){mxCylinder.call(this)}function l(){mxActor.call(this)}function p(){mxCylinder.call(this)}function q(){mxActor.call(this)}function c(){mxActor.call(this)}function f(){mxActor.call(this)}function h(){mxActor.call(this)}function m(){mxActor.call(this)}function n(){mxActor.call(this)}function u(){mxActor.call(this)}function r(a,c){this.canvas=
+(a.width-this.linkHint.clientWidth)/2)+"px";this.linkHint.style.top=Math.round(b+this.verticalOffset/2+6+this.state.view.graph.tolerance)+"px"}};var F=mxVertexHandler.prototype.reset;mxVertexHandler.prototype.reset=function(){F.apply(this,arguments);null!=this.rotationShape&&null!=this.rotationShape.node&&(this.rotationShape.node.style.display=1==this.graph.getSelectionCount()?"":"none")};var R=mxVertexHandler.prototype.destroy;mxVertexHandler.prototype.destroy=function(){R.apply(this,arguments);
+null!=this.linkHint&&(this.linkHint.parentNode.removeChild(this.linkHint),this.linkHint=null);null!=this.selectionHandler&&(this.graph.getSelectionModel().removeListener(this.selectionHandler),this.selectionHandler=null);null!=this.changeHandler&&(this.graph.getModel().removeListener(this.changeHandler),this.changeHandler=null);null!=this.editingHandler&&(this.graph.removeListener(this.editingHandler),this.editingHandler=null)};var P=mxEdgeHandler.prototype.redrawHandles;mxEdgeHandler.prototype.redrawHandles=
+function(){if(null!=this.marker&&(P.apply(this),null!=this.state&&null!=this.linkHint)){var a=this.state;null!=this.state.text&&null!=this.state.text.bounds&&(a=new mxRectangle(a.x,a.y,a.width,a.height),a.add(this.state.text.bounds));this.linkHint.style.left=Math.round(a.x+(a.width-this.linkHint.clientWidth)/2)+"px";this.linkHint.style.top=Math.round(a.y+a.height+6+this.state.view.graph.tolerance)+"px"}};var I=mxEdgeHandler.prototype.reset;mxEdgeHandler.prototype.reset=function(){I.apply(this,arguments);
+null!=this.linkHint&&(this.linkHint.style.visibility="")};var S=mxEdgeHandler.prototype.destroy;mxEdgeHandler.prototype.destroy=function(){S.apply(this,arguments);null!=this.linkHint&&(this.linkHint.parentNode.removeChild(this.linkHint),this.linkHint=null);null!=this.selectionHandler&&(this.graph.getSelectionModel().removeListener(this.selectionHandler),this.selectionHandler=null);null!=this.changeHandler&&(this.graph.getModel().removeListener(this.changeHandler),this.changeHandler=null)}}();(function(){function a(){mxCylinder.call(this)}function b(){mxActor.call(this)}function e(){mxCylinder.call(this)}function d(){mxCylinder.call(this)}function h(){mxCylinder.call(this)}function l(){mxActor.call(this)}function n(){mxCylinder.call(this)}function q(){mxActor.call(this)}function c(){mxActor.call(this)}function f(){mxActor.call(this)}function g(){mxActor.call(this)}function p(){mxActor.call(this)}function m(){mxActor.call(this)}function u(){mxActor.call(this)}function r(a,c){this.canvas=
 a;this.canvas.setLineJoin("round");this.canvas.setLineCap("round");this.defaultVariation=c;this.originalLineTo=this.canvas.lineTo;this.canvas.lineTo=mxUtils.bind(this,r.prototype.lineTo);this.originalMoveTo=this.canvas.moveTo;this.canvas.moveTo=mxUtils.bind(this,r.prototype.moveTo);this.originalClose=this.canvas.close;this.canvas.close=mxUtils.bind(this,r.prototype.close);this.originalQuadTo=this.canvas.quadTo;this.canvas.quadTo=mxUtils.bind(this,r.prototype.quadTo);this.originalCurveTo=this.canvas.curveTo;
-this.canvas.curveTo=mxUtils.bind(this,r.prototype.curveTo);this.originalArcTo=this.canvas.arcTo;this.canvas.arcTo=mxUtils.bind(this,r.prototype.arcTo)}function k(){mxRectangleShape.call(this)}function t(){mxActor.call(this)}function v(){mxActor.call(this)}function x(){mxActor.call(this)}function w(){mxRectangleShape.call(this)}function D(){mxRectangleShape.call(this)}function B(){mxCylinder.call(this)}function y(){mxShape.call(this)}function C(){mxShape.call(this)}function A(){mxEllipse.call(this)}
-function F(){mxShape.call(this)}function z(){mxShape.call(this)}function J(){mxRectangleShape.call(this)}function I(){mxShape.call(this)}function H(){mxShape.call(this)}function T(){mxShape.call(this)}function N(){mxCylinder.call(this)}function K(){mxDoubleEllipse.call(this)}function U(){mxDoubleEllipse.call(this)}function G(){mxArrowConnector.call(this);this.spacing=0}function L(){mxArrowConnector.call(this);this.spacing=0}function Q(){mxActor.call(this)}function E(){mxRectangleShape.call(this)}
-function V(){mxActor.call(this)}function O(){mxActor.call(this)}function W(){mxActor.call(this)}function R(){mxActor.call(this)}function P(){mxActor.call(this)}function S(){mxActor.call(this)}function Y(){mxActor.call(this)}function X(){mxActor.call(this)}function Z(){mxActor.call(this)}function aa(){mxActor.call(this)}function ia(){mxEllipse.call(this)}function ba(){mxEllipse.call(this)}function ma(){mxEllipse.call(this)}function ca(){mxRhombus.call(this)}function ja(){mxEllipse.call(this)}function da(){mxEllipse.call(this)}
-function qa(){mxEllipse.call(this)}function na(){mxEllipse.call(this)}function ta(){mxActor.call(this)}function oa(){mxActor.call(this)}function pa(){mxActor.call(this)}function ka(){mxConnector.call(this)}function Aa(a,c,b,f,d,e,h,k,m,n){h+=m;var fa=f.clone();f.x-=d*(2*h+m);f.y-=e*(2*h+m);d*=h+m;e*=h+m;return function(){a.ellipse(fa.x-d-h,fa.y-e-h,2*h,2*h);n?a.fillAndStroke():a.stroke()}}mxUtils.extend(a,mxCylinder);a.prototype.size=20;a.prototype.redrawPath=function(a,c,b,f,d,e){c=Math.max(0,Math.min(f,
-Math.min(d,parseFloat(mxUtils.getValue(this.style,"size",this.size)))));e?(a.moveTo(c,d),a.lineTo(c,c),a.lineTo(0,0),a.moveTo(c,c),a.lineTo(f,c)):(a.moveTo(0,0),a.lineTo(f-c,0),a.lineTo(f,c),a.lineTo(f,d),a.lineTo(c,d),a.lineTo(0,d-c),a.lineTo(0,0),a.close());a.end()};a.prototype.getLabelMargins=function(a){return mxUtils.getValue(this.style,"boundedLbl",!1)?(a=parseFloat(mxUtils.getValue(this.style,"size",this.size))*this.scale,new mxRectangle(a,a,0,0)):null};mxCellRenderer.prototype.defaultShapes.cube=
-a;var xa=Math.tan(mxUtils.toRadians(30)),la=(.5-xa)/2;mxUtils.extend(b,mxActor);b.prototype.size=20;b.prototype.redrawPath=function(a,c,b,f,d){c=Math.min(f,d/xa);a.translate((f-c)/2,(d-c)/2+c/4);a.moveTo(0,.25*c);a.lineTo(.5*c,c*la);a.lineTo(c,.25*c);a.lineTo(.5*c,(.5-la)*c);a.lineTo(0,.25*c);a.close();a.end()};mxCellRenderer.prototype.defaultShapes.isoRectangle=b;mxUtils.extend(e,mxCylinder);e.prototype.size=20;e.prototype.redrawPath=function(a,c,b,f,d,e){c=Math.min(f,d/(.5+xa));e?(a.moveTo(0,.25*
-c),a.lineTo(.5*c,(.5-la)*c),a.lineTo(c,.25*c),a.moveTo(.5*c,(.5-la)*c),a.lineTo(.5*c,(1-la)*c)):(a.translate((f-c)/2,(d-c)/2),a.moveTo(0,.25*c),a.lineTo(.5*c,c*la),a.lineTo(c,.25*c),a.lineTo(c,.75*c),a.lineTo(.5*c,(1-la)*c),a.lineTo(0,.75*c),a.close());a.end()};mxCellRenderer.prototype.defaultShapes.isoCube=e;mxUtils.extend(d,mxCylinder);d.prototype.redrawPath=function(a,c,b,f,d,e){c=Math.min(d/2,Math.round(d/8)+this.strokewidth-1);if(e&&null!=this.fill||!e&&null==this.fill)a.moveTo(0,c),a.curveTo(0,
-2*c,f,2*c,f,c),e||(a.stroke(),a.begin()),a.translate(0,c/2),a.moveTo(0,c),a.curveTo(0,2*c,f,2*c,f,c),e||(a.stroke(),a.begin()),a.translate(0,c/2),a.moveTo(0,c),a.curveTo(0,2*c,f,2*c,f,c),e||(a.stroke(),a.begin()),a.translate(0,-c);e||(a.moveTo(0,c),a.curveTo(0,-c/3,f,-c/3,f,c),a.lineTo(f,d-c),a.curveTo(f,d+c/3,0,d+c/3,0,d-c),a.close())};d.prototype.getLabelMargins=function(a){return new mxRectangle(0,2.5*Math.min(a.height/2,Math.round(a.height/8)+this.strokewidth-1)*this.scale,0,0)};mxCellRenderer.prototype.defaultShapes.datastore=
-d;mxUtils.extend(g,mxCylinder);g.prototype.size=30;g.prototype.redrawPath=function(a,c,b,f,d,e){c=Math.max(0,Math.min(f,Math.min(d,parseFloat(mxUtils.getValue(this.style,"size",this.size)))));e?(a.moveTo(f-c,0),a.lineTo(f-c,c),a.lineTo(f,c)):(a.moveTo(0,0),a.lineTo(f-c,0),a.lineTo(f,c),a.lineTo(f,d),a.lineTo(0,d),a.lineTo(0,0),a.close());a.end()};mxCellRenderer.prototype.defaultShapes.note=g;mxUtils.extend(l,mxActor);l.prototype.redrawPath=function(a,c,b,f,d){a.moveTo(0,0);a.quadTo(f/2,.5*d,f,0);
-a.quadTo(.5*f,d/2,f,d);a.quadTo(f/2,.5*d,0,d);a.quadTo(.5*f,d/2,0,0);a.end()};mxCellRenderer.prototype.defaultShapes["switch"]=l;mxUtils.extend(p,mxCylinder);p.prototype.tabWidth=60;p.prototype.tabHeight=20;p.prototype.tabPosition="right";p.prototype.redrawPath=function(a,c,b,f,d,e){c=Math.max(0,Math.min(f,parseFloat(mxUtils.getValue(this.style,"tabWidth",this.tabWidth))));b=Math.max(0,Math.min(d,parseFloat(mxUtils.getValue(this.style,"tabHeight",this.tabHeight))));var h=mxUtils.getValue(this.style,
-"tabPosition",this.tabPosition);e?"left"==h?(a.moveTo(0,b),a.lineTo(c,b)):(a.moveTo(f-c,b),a.lineTo(f,b)):("left"==h?(a.moveTo(0,0),a.lineTo(c,0),a.lineTo(c,b),a.lineTo(f,b)):(a.moveTo(0,b),a.lineTo(f-c,b),a.lineTo(f-c,0),a.lineTo(f,0)),a.lineTo(f,d),a.lineTo(0,d),a.lineTo(0,b),a.close());a.end()};mxCellRenderer.prototype.defaultShapes.folder=p;mxUtils.extend(q,mxActor);q.prototype.size=30;q.prototype.redrawPath=function(a,c,b,f,d){c=Math.max(0,Math.min(f,Math.min(d,parseFloat(mxUtils.getValue(this.style,
-"size",this.size)))));b=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(a,[new mxPoint(c,0),new mxPoint(f,0),new mxPoint(f,d),new mxPoint(0,d),new mxPoint(0,c)],this.isRounded,b,!0);a.end()};mxCellRenderer.prototype.defaultShapes.card=q;mxUtils.extend(c,mxActor);c.prototype.size=.4;c.prototype.redrawPath=function(a,c,b,f,d){c=d*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));a.moveTo(0,c/2);a.quadTo(f/4,1.4*c,f/2,c/
-2);a.quadTo(3*f/4,c*(1-1.4),f,c/2);a.lineTo(f,d-c/2);a.quadTo(3*f/4,d-1.4*c,f/2,d-c/2);a.quadTo(f/4,d-c*(1-1.4),0,d-c/2);a.lineTo(0,c/2);a.close();a.end()};c.prototype.getLabelBounds=function(a){if(mxUtils.getValue(this.style,"boundedLbl",!1)){var c=mxUtils.getValue(this.style,"size",this.size),b=a.width,f=a.height;if(null==this.direction||this.direction==mxConstants.DIRECTION_EAST||this.direction==mxConstants.DIRECTION_WEST)return c*=f,new mxRectangle(a.x,a.y+c,b,f-2*c);c*=b;return new mxRectangle(a.x+
-c,a.y,b-2*c,f)}return a};mxCellRenderer.prototype.defaultShapes.tape=c;mxUtils.extend(f,mxActor);f.prototype.size=.3;f.prototype.getLabelMargins=function(a){return mxUtils.getValue(this.style,"boundedLbl",!1)?new mxRectangle(0,0,0,parseFloat(mxUtils.getValue(this.style,"size",this.size))*a.height):null};f.prototype.redrawPath=function(a,c,b,f,d){c=d*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));a.moveTo(0,0);a.lineTo(f,0);a.lineTo(f,d-c/2);a.quadTo(3*f/4,d-1.4*
-c,f/2,d-c/2);a.quadTo(f/4,d-c*(1-1.4),0,d-c/2);a.lineTo(0,c/2);a.close();a.end()};mxCellRenderer.prototype.defaultShapes.document=f;mxCylinder.prototype.getLabelMargins=function(a){return mxUtils.getValue(this.style,"boundedLbl",!1)?new mxRectangle(0,Math.min(this.maxHeight*this.scale,.3*a.height),0,0):null};mxUtils.extend(h,mxActor);h.prototype.size=.2;h.prototype.redrawPath=function(a,c,b,f,d){c=f*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));b=mxUtils.getValue(this.style,
-mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(a,[new mxPoint(0,d),new mxPoint(c,0),new mxPoint(f,0),new mxPoint(f-c,d)],this.isRounded,b,!0);a.end()};mxCellRenderer.prototype.defaultShapes.parallelogram=h;mxUtils.extend(m,mxActor);m.prototype.size=.2;m.prototype.redrawPath=function(a,c,b,f,d){c=f*Math.max(0,Math.min(.5,parseFloat(mxUtils.getValue(this.style,"size",this.size))));b=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(a,
-[new mxPoint(0,d),new mxPoint(c,0),new mxPoint(f-c,0),new mxPoint(f,d)],this.isRounded,b,!0)};mxCellRenderer.prototype.defaultShapes.trapezoid=m;mxUtils.extend(n,mxActor);n.prototype.size=.5;n.prototype.redrawPath=function(a,c,b,f,d){a.setFillColor(null);c=f*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));b=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(a,[new mxPoint(f,0),new mxPoint(c,0),new mxPoint(c,d/2),new mxPoint(0,
-d/2),new mxPoint(c,d/2),new mxPoint(c,d),new mxPoint(f,d)],this.isRounded,b,!1);a.end()};mxCellRenderer.prototype.defaultShapes.curlyBracket=n;mxUtils.extend(u,mxActor);u.prototype.redrawPath=function(a,c,b,f,d){a.setStrokeWidth(1);a.setFillColor(this.stroke);c=f/5;a.rect(0,0,c,d);a.fillAndStroke();a.rect(2*c,0,c,d);a.fillAndStroke();a.rect(4*c,0,c,d);a.fillAndStroke()};mxCellRenderer.prototype.defaultShapes.parallelMarker=u;r.prototype.moveTo=function(a,c){this.originalMoveTo.apply(this.canvas,arguments);
-this.lastX=a;this.lastY=c;this.firstX=a;this.firstY=c};r.prototype.close=function(){null!=this.firstX&&null!=this.firstY&&(this.lineTo(this.firstX,this.firstY),this.originalClose.apply(this.canvas,arguments));this.originalClose.apply(this.canvas,arguments)};r.prototype.quadTo=function(a,c,b,f){this.originalQuadTo.apply(this.canvas,arguments);this.lastX=b;this.lastY=f};r.prototype.curveTo=function(a,c,b,f,d,e){this.originalCurveTo.apply(this.canvas,arguments);this.lastX=d;this.lastY=e};r.prototype.arcTo=
-function(a,c,b,f,d,e,h){this.originalArcTo.apply(this.canvas,arguments);this.lastX=e;this.lastY=h};r.prototype.lineTo=function(a,c){if(null!=this.lastX&&null!=this.lastY){var b=function(a){return"number"===typeof a?a?0>a?-1:1:a===a?0:NaN:NaN},f=Math.abs(a-this.lastX),d=Math.abs(c-this.lastY),e=Math.sqrt(f*f+d*d);if(2>e){this.originalLineTo.apply(this.canvas,arguments);this.lastX=a;this.lastY=c;return}var h=Math.round(e/10),k=this.defaultVariation;5>h&&(h=5,k/=3);for(var fa=b(a-this.lastX)*f/h,b=b(c-
-this.lastY)*d/h,f=f/e,d=d/e,e=0;e<h;e++){var m=(Math.random()-.5)*k;this.originalLineTo.call(this.canvas,fa*e+this.lastX-m*d,b*e+this.lastY-m*f)}this.originalLineTo.call(this.canvas,a,c)}else this.originalLineTo.apply(this.canvas,arguments);this.lastX=a;this.lastY=c};r.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};var Ea=mxShape.prototype.paint;mxShape.prototype.defaultJiggle=1.5;mxShape.prototype.paint=function(a){null!=this.style&&"0"!=mxUtils.getValue(this.style,"comic","0")&&null==a.handHiggle&&(a.handJiggle=new r(a,mxUtils.getValue(this.style,"jiggle",this.defaultJiggle)));Ea.apply(this,arguments);null!=a.handJiggle&&(a.handJiggle.destroy(),delete a.handJiggle)};mxRhombus.prototype.defaultJiggle=2;var Fa=mxRectangleShape.prototype.isHtmlAllowed;mxRectangleShape.prototype.isHtmlAllowed=
-function(){return(null==this.style||"0"==mxUtils.getValue(this.style,"comic","0"))&&Fa.apply(this,arguments)};var Ga=mxRectangleShape.prototype.paintBackground;mxRectangleShape.prototype.paintBackground=function(a,c,b,f,d){if(null==a.handJiggle)Ga.apply(this,arguments);else{var e=!0;null!=this.style&&(e="1"==mxUtils.getValue(this.style,mxConstants.STYLE_POINTER_EVENTS,"1"));if(e||null!=this.fill&&this.fill!=mxConstants.NONE||null!=this.stroke&&this.stroke!=mxConstants.NONE)e||null!=this.fill&&this.fill!=
-mxConstants.NONE||(a.pointerEvents=!1),a.begin(),this.isRounded?("1"==mxUtils.getValue(this.style,mxConstants.STYLE_ABSOLUTE_ARCSIZE,0)?e=Math.min(f/2,Math.min(d/2,mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2)):(e=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,100*mxConstants.RECTANGLE_ROUNDING_FACTOR)/100,e=Math.min(f*e,d*e)),a.moveTo(c+e,b),a.lineTo(c+f-e,b),a.quadTo(c+f,b,c+f,b+e),a.lineTo(c+f,b+d-e),a.quadTo(c+f,b+d,c+f-e,b+d),a.lineTo(c+e,b+d),a.quadTo(c,
-b+d,c,b+d-e),a.lineTo(c,b+e),a.quadTo(c,b,c+e,b)):(a.moveTo(c,b),a.lineTo(c+f,b),a.lineTo(c+f,b+d),a.lineTo(c,b+d),a.lineTo(c,b)),a.close(),a.end(),a.fillAndStroke()}};var Ha=mxRectangleShape.prototype.paintForeground;mxRectangleShape.prototype.paintForeground=function(a,c,b,f,d){null==a.handJiggle&&Ha.apply(this,arguments)};mxUtils.extend(k,mxRectangleShape);k.prototype.size=.1;k.prototype.isHtmlAllowed=function(){return!1};k.prototype.getLabelBounds=function(a){if(mxUtils.getValue(this.state.style,
-mxConstants.STYLE_HORIZONTAL,!0)==(null==this.direction||this.direction==mxConstants.DIRECTION_EAST||this.direction==mxConstants.DIRECTION_WEST)){var c=a.width,b=a.height;a=new mxRectangle(a.x,a.y,c,b);var f=c*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));if(this.isRounded)var d=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,100*mxConstants.RECTANGLE_ROUNDING_FACTOR)/100,f=Math.max(f,Math.min(c*d,b*d));a.x+=f;a.width-=2*f}return a};k.prototype.paintForeground=
-function(a,c,b,f,d){var e=f*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));if(this.isRounded)var h=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,100*mxConstants.RECTANGLE_ROUNDING_FACTOR)/100,e=Math.max(e,Math.min(f*h,d*h));a.begin();a.moveTo(c+e,b);a.lineTo(c+e,b+d);a.moveTo(c+f-e,b);a.lineTo(c+f-e,b+d);a.end();a.stroke();mxRectangleShape.prototype.paintForeground.apply(this,arguments)};mxCellRenderer.prototype.defaultShapes.process=k;mxUtils.extend(t,mxHexagon);
-t.prototype.size=30;t.prototype.position=.5;t.prototype.position2=.5;t.prototype.base=20;t.prototype.getLabelMargins=function(){return new mxRectangle(0,0,0,parseFloat(mxUtils.getValue(this.style,"size",this.size))*this.scale)};t.prototype.redrawPath=function(a,c,b,f,d){c=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;b=Math.max(0,Math.min(d,parseFloat(mxUtils.getValue(this.style,"size",this.size))));var e=f*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,
-"position",this.position)))),h=f*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"position2",this.position2)))),k=Math.max(0,Math.min(f,parseFloat(mxUtils.getValue(this.style,"base",this.base))));this.addPoints(a,[new mxPoint(0,0),new mxPoint(f,0),new mxPoint(f,d-b),new mxPoint(Math.min(f,e+k),d-b),new mxPoint(h,d),new mxPoint(Math.max(0,e),d-b),new mxPoint(0,d-b)],this.isRounded,c,!0,[4])};mxCellRenderer.prototype.defaultShapes.callout=t;mxUtils.extend(v,mxActor);v.prototype.size=.2;
-v.prototype.redrawPath=function(a,c,b,f,d){c=f*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));b=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(a,[new mxPoint(0,0),new mxPoint(f-c,0),new mxPoint(f,d/2),new mxPoint(f-c,d),new mxPoint(0,d),new mxPoint(c,d/2)],this.isRounded,b,!0);a.end()};mxCellRenderer.prototype.defaultShapes.step=v;mxUtils.extend(x,mxHexagon);x.prototype.size=.25;x.prototype.redrawPath=function(a,
-c,b,f,d){c=f*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));b=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(a,[new mxPoint(c,0),new mxPoint(f-c,0),new mxPoint(f,.5*d),new mxPoint(f-c,d),new mxPoint(c,d),new mxPoint(0,.5*d)],this.isRounded,b,!0)};mxCellRenderer.prototype.defaultShapes.hexagon=x;mxUtils.extend(w,mxRectangleShape);w.prototype.isHtmlAllowed=function(){return!1};w.prototype.paintForeground=function(a,
-c,b,f,d){var e=Math.min(f/5,d/5)+1;a.begin();a.moveTo(c+f/2,b+e);a.lineTo(c+f/2,b+d-e);a.moveTo(c+e,b+d/2);a.lineTo(c+f-e,b+d/2);a.end();a.stroke();mxRectangleShape.prototype.paintForeground.apply(this,arguments)};mxCellRenderer.prototype.defaultShapes.plus=w;var Ba=mxRhombus.prototype.paintVertexShape;mxRhombus.prototype.getLabelBounds=function(a){if(1==this.style["double"]){var c=(2*Math.max(2,this.strokewidth+1)+parseFloat(this.style[mxConstants.STYLE_MARGIN]||0))*this.scale;return new mxRectangle(a.x+
-c,a.y+c,a.width-2*c,a.height-2*c)}return a};mxRhombus.prototype.paintVertexShape=function(a,c,b,f,d){Ba.apply(this,arguments);if(!this.outline&&1==this.style["double"]){var e=2*Math.max(2,this.strokewidth+1)+parseFloat(this.style[mxConstants.STYLE_MARGIN]||0);c+=e;b+=e;f-=2*e;d-=2*e;0<f&&0<d&&(a.setShadow(!1),Ba.apply(this,[a,c,b,f,d]))}};mxUtils.extend(D,mxRectangleShape);D.prototype.isHtmlAllowed=function(){return!1};D.prototype.getLabelBounds=function(a){if(1==this.style["double"]){var c=(Math.max(2,
-this.strokewidth+1)+parseFloat(this.style[mxConstants.STYLE_MARGIN]||0))*this.scale;return new mxRectangle(a.x+c,a.y+c,a.width-2*c,a.height-2*c)}return a};D.prototype.paintForeground=function(a,c,b,f,d){if(null!=this.style){if(!this.outline&&1==this.style["double"]){var e=Math.max(2,this.strokewidth+1)+parseFloat(this.style[mxConstants.STYLE_MARGIN]||0);c+=e;b+=e;f-=2*e;d-=2*e;0<f&&0<d&&mxRectangleShape.prototype.paintBackground.apply(this,arguments)}a.setDashed(!1);var e=0,h;do{h=mxCellRenderer.prototype.defaultShapes[this.style["symbol"+
-e]];if(null!=h){var k=this.style["symbol"+e+"Align"],m=this.style["symbol"+e+"VerticalAlign"],fa=this.style["symbol"+e+"Width"],n=this.style["symbol"+e+"Height"],t=this.style["symbol"+e+"Spacing"]||0,r=this.style["symbol"+e+"VSpacing"]||t,v=this.style["symbol"+e+"ArcSpacing"];null!=v&&(v*=this.getArcSize(f+this.strokewidth,d+this.strokewidth),t+=v,r+=v);var v=c,g=b,v=k==mxConstants.ALIGN_CENTER?v+(f-fa)/2:k==mxConstants.ALIGN_RIGHT?v+(f-fa-t):v+t,g=m==mxConstants.ALIGN_MIDDLE?g+(d-n)/2:m==mxConstants.ALIGN_BOTTOM?
-g+(d-n-r):g+r;a.save();k=new h;k.style=this.style;h.prototype.paintVertexShape.call(k,a,v,g,fa,n);a.restore()}e++}while(null!=h)}mxRectangleShape.prototype.paintForeground.apply(this,arguments)};mxCellRenderer.prototype.defaultShapes.ext=D;mxUtils.extend(B,mxCylinder);B.prototype.redrawPath=function(a,c,b,f,d,e){e?(a.moveTo(0,0),a.lineTo(f/2,d/2),a.lineTo(f,0),a.end()):(a.moveTo(0,0),a.lineTo(f,0),a.lineTo(f,d),a.lineTo(0,d),a.close())};mxCellRenderer.prototype.defaultShapes.message=B;mxUtils.extend(y,
-mxShape);y.prototype.paintBackground=function(a,c,b,f,d){a.translate(c,b);a.ellipse(f/4,0,f/2,d/4);a.fillAndStroke();a.begin();a.moveTo(f/2,d/4);a.lineTo(f/2,2*d/3);a.moveTo(f/2,d/3);a.lineTo(0,d/3);a.moveTo(f/2,d/3);a.lineTo(f,d/3);a.moveTo(f/2,2*d/3);a.lineTo(0,d);a.moveTo(f/2,2*d/3);a.lineTo(f,d);a.end();a.stroke()};mxCellRenderer.prototype.defaultShapes.umlActor=y;mxUtils.extend(C,mxShape);C.prototype.getLabelMargins=function(a){return new mxRectangle(a.width/6,0,0,0)};C.prototype.paintBackground=
-function(a,c,b,f,d){a.translate(c,b);a.begin();a.moveTo(0,d/4);a.lineTo(0,3*d/4);a.end();a.stroke();a.begin();a.moveTo(0,d/2);a.lineTo(f/6,d/2);a.end();a.stroke();a.ellipse(f/6,0,5*f/6,d);a.fillAndStroke()};mxCellRenderer.prototype.defaultShapes.umlBoundary=C;mxUtils.extend(A,mxEllipse);A.prototype.paintVertexShape=function(a,c,b,f,d){mxEllipse.prototype.paintVertexShape.apply(this,arguments);a.begin();a.moveTo(c+f/8,b+d);a.lineTo(c+7*f/8,b+d);a.end();a.stroke()};mxCellRenderer.prototype.defaultShapes.umlEntity=
-A;mxUtils.extend(F,mxShape);F.prototype.paintVertexShape=function(a,c,b,f,d){a.translate(c,b);a.begin();a.moveTo(f,0);a.lineTo(0,d);a.moveTo(0,0);a.lineTo(f,d);a.end();a.stroke()};mxCellRenderer.prototype.defaultShapes.umlDestroy=F;mxUtils.extend(z,mxShape);z.prototype.getLabelBounds=function(a){return new mxRectangle(a.x,a.y+a.height/8,a.width,7*a.height/8)};z.prototype.paintBackground=function(a,c,b,f,d){a.translate(c,b);a.begin();a.moveTo(3*f/8,d/8*1.1);a.lineTo(5*f/8,0);a.end();a.stroke();a.ellipse(0,
-d/8,f,7*d/8);a.fillAndStroke()};z.prototype.paintForeground=function(a,c,b,f,d){a.begin();a.moveTo(3*f/8,d/8*1.1);a.lineTo(5*f/8,d/4);a.end();a.stroke()};mxCellRenderer.prototype.defaultShapes.umlControl=z;mxUtils.extend(J,mxRectangleShape);J.prototype.size=40;J.prototype.isHtmlAllowed=function(){return!1};J.prototype.getLabelBounds=function(a){var c=Math.max(0,Math.min(a.height,parseFloat(mxUtils.getValue(this.style,"size",this.size))*this.scale));return new mxRectangle(a.x,a.y,a.width,c)};J.prototype.paintBackground=
-function(a,c,b,f,d){var e=Math.max(0,Math.min(d,parseFloat(mxUtils.getValue(this.style,"size",this.size)))),h=mxUtils.getValue(this.style,"participant");null==h||null==this.state?mxRectangleShape.prototype.paintBackground.call(this,a,c,b,f,e):(h=this.state.view.graph.cellRenderer.getShape(h),null!=h&&h!=J&&(h=new h,h.apply(this.state),a.save(),h.paintVertexShape(a,c,b,f,e),a.restore()));e<d&&(a.setDashed(!0),a.begin(),a.moveTo(c+f/2,b+e),a.lineTo(c+f/2,b+d),a.end(),a.stroke())};J.prototype.paintForeground=
-function(a,c,b,f,d){var e=Math.max(0,Math.min(d,parseFloat(mxUtils.getValue(this.style,"size",this.size))));mxRectangleShape.prototype.paintForeground.call(this,a,c,b,f,Math.min(d,e))};mxCellRenderer.prototype.defaultShapes.umlLifeline=J;mxUtils.extend(I,mxShape);I.prototype.width=60;I.prototype.height=30;I.prototype.corner=10;I.prototype.getLabelMargins=function(a){return new mxRectangle(0,0,a.width-parseFloat(mxUtils.getValue(this.style,"width",this.width)*this.scale),a.height-parseFloat(mxUtils.getValue(this.style,
-"height",this.height)*this.scale))};I.prototype.paintBackground=function(a,c,b,f,d){var e=this.corner,h=Math.min(f,Math.max(e,parseFloat(mxUtils.getValue(this.style,"width",this.width)))),k=Math.min(d,Math.max(1.5*e,parseFloat(mxUtils.getValue(this.style,"height",this.height))));a.begin();a.moveTo(c,b);a.lineTo(c+h,b);a.lineTo(c+h,b+Math.max(0,k-1.5*e));a.lineTo(c+Math.max(0,h-e),b+k);a.lineTo(c,b+k);a.close();a.fillAndStroke();a.begin();a.moveTo(c+h,b);a.lineTo(c+f,b);a.lineTo(c+f,b+d);a.lineTo(c,
-b+d);a.lineTo(c,b+k);a.stroke()};mxCellRenderer.prototype.defaultShapes.umlFrame=I;mxPerimeter.LifelinePerimeter=function(a,c,b,f){f=J.prototype.size;null!=c&&(f=mxUtils.getValue(c.style,"size",f)*c.view.scale);c=parseFloat(c.style[mxConstants.STYLE_STROKEWIDTH]||1)*c.view.scale/2-1;b.x<a.getCenterX()&&(c=-1*(c+1));return new mxPoint(a.getCenterX()+c,Math.min(a.y+a.height,Math.max(a.y+f,b.y)))};mxStyleRegistry.putValue("lifelinePerimeter",mxPerimeter.LifelinePerimeter);mxPerimeter.OrthogonalPerimeter=
-function(a,c,b,f){f=!0;return mxPerimeter.RectanglePerimeter.apply(this,arguments)};mxStyleRegistry.putValue("orthogonalPerimeter",mxPerimeter.OrthogonalPerimeter);mxPerimeter.BackbonePerimeter=function(a,c,b,f){f=parseFloat(c.style[mxConstants.STYLE_STROKEWIDTH]||1)*c.view.scale/2-1;null!=c.style.backboneSize&&(f+=parseFloat(c.style.backboneSize)*c.view.scale/2-1);if("south"==c.style[mxConstants.STYLE_DIRECTION]||"north"==c.style[mxConstants.STYLE_DIRECTION])return b.x<a.getCenterX()&&(f=-1*(f+1)),
-new mxPoint(a.getCenterX()+f,Math.min(a.y+a.height,Math.max(a.y,b.y)));b.y<a.getCenterY()&&(f=-1*(f+1));return new mxPoint(Math.min(a.x+a.width,Math.max(a.x,b.x)),a.getCenterY()+f)};mxStyleRegistry.putValue("backbonePerimeter",mxPerimeter.BackbonePerimeter);mxPerimeter.CalloutPerimeter=function(a,c,b,f){return mxPerimeter.RectanglePerimeter(mxUtils.getDirectedBounds(a,new mxRectangle(0,0,0,Math.max(0,Math.min(a.height,parseFloat(mxUtils.getValue(c.style,"size",t.prototype.size))*c.view.scale))),c.style),
-c,b,f)};mxStyleRegistry.putValue("calloutPerimeter",mxPerimeter.CalloutPerimeter);mxPerimeter.ParallelogramPerimeter=function(a,c,b,f){var d=h.prototype.size;null!=c&&(d=mxUtils.getValue(c.style,"size",d));var e=a.x,k=a.y,m=a.width,n=a.height;c=null!=c?mxUtils.getValue(c.style,mxConstants.STYLE_DIRECTION,mxConstants.DIRECTION_EAST):mxConstants.DIRECTION_EAST;c==mxConstants.DIRECTION_NORTH||c==mxConstants.DIRECTION_SOUTH?(d=n*Math.max(0,Math.min(1,d)),k=[new mxPoint(e,k),new mxPoint(e+m,k+d),new mxPoint(e+
-m,k+n),new mxPoint(e,k+n-d),new mxPoint(e,k)]):(d=m*Math.max(0,Math.min(1,d)),k=[new mxPoint(e+d,k),new mxPoint(e+m,k),new mxPoint(e+m-d,k+n),new mxPoint(e,k+n),new mxPoint(e+d,k)]);n=a.getCenterX();a=a.getCenterY();a=new mxPoint(n,a);f&&(b.x<e||b.x>e+m?a.y=b.y:a.x=b.x);return mxUtils.getPerimeterPoint(k,a,b)};mxStyleRegistry.putValue("parallelogramPerimeter",mxPerimeter.ParallelogramPerimeter);mxPerimeter.TrapezoidPerimeter=function(a,c,b,f){var d=m.prototype.size;null!=c&&(d=mxUtils.getValue(c.style,
-"size",d));var e=a.x,h=a.y,k=a.width,n=a.height;c=null!=c?mxUtils.getValue(c.style,mxConstants.STYLE_DIRECTION,mxConstants.DIRECTION_EAST):mxConstants.DIRECTION_EAST;c==mxConstants.DIRECTION_EAST?(d=k*Math.max(0,Math.min(1,d)),h=[new mxPoint(e+d,h),new mxPoint(e+k-d,h),new mxPoint(e+k,h+n),new mxPoint(e,h+n),new mxPoint(e+d,h)]):c==mxConstants.DIRECTION_WEST?(d=k*Math.max(0,Math.min(1,d)),h=[new mxPoint(e,h),new mxPoint(e+k,h),new mxPoint(e+k-d,h+n),new mxPoint(e+d,h+n),new mxPoint(e,h)]):c==mxConstants.DIRECTION_NORTH?
-(d=n*Math.max(0,Math.min(1,d)),h=[new mxPoint(e,h+d),new mxPoint(e+k,h),new mxPoint(e+k,h+n),new mxPoint(e,h+n-d),new mxPoint(e,h+d)]):(d=n*Math.max(0,Math.min(1,d)),h=[new mxPoint(e,h),new mxPoint(e+k,h+d),new mxPoint(e+k,h+n-d),new mxPoint(e,h+n),new mxPoint(e,h)]);n=a.getCenterX();a=a.getCenterY();a=new mxPoint(n,a);f&&(b.x<e||b.x>e+k?a.y=b.y:a.x=b.x);return mxUtils.getPerimeterPoint(h,a,b)};mxStyleRegistry.putValue("trapezoidPerimeter",mxPerimeter.TrapezoidPerimeter);mxPerimeter.StepPerimeter=
-function(a,c,b,f){var d=v.prototype.size;null!=c&&(d=mxUtils.getValue(c.style,"size",d));var e=a.x,h=a.y,k=a.width,m=a.height,n=a.getCenterX();a=a.getCenterY();c=null!=c?mxUtils.getValue(c.style,mxConstants.STYLE_DIRECTION,mxConstants.DIRECTION_EAST):mxConstants.DIRECTION_EAST;c==mxConstants.DIRECTION_EAST?(d=k*Math.max(0,Math.min(1,d)),h=[new mxPoint(e,h),new mxPoint(e+k-d,h),new mxPoint(e+k,a),new mxPoint(e+k-d,h+m),new mxPoint(e,h+m),new mxPoint(e+d,a),new mxPoint(e,h)]):c==mxConstants.DIRECTION_WEST?
-(d=k*Math.max(0,Math.min(1,d)),h=[new mxPoint(e+d,h),new mxPoint(e+k,h),new mxPoint(e+k-d,a),new mxPoint(e+k,h+m),new mxPoint(e+d,h+m),new mxPoint(e,a),new mxPoint(e+d,h)]):c==mxConstants.DIRECTION_NORTH?(d=m*Math.max(0,Math.min(1,d)),h=[new mxPoint(e,h+d),new mxPoint(n,h),new mxPoint(e+k,h+d),new mxPoint(e+k,h+m),new mxPoint(n,h+m-d),new mxPoint(e,h+m),new mxPoint(e,h+d)]):(d=m*Math.max(0,Math.min(1,d)),h=[new mxPoint(e,h),new mxPoint(n,h+d),new mxPoint(e+k,h),new mxPoint(e+k,h+m-d),new mxPoint(n,
-h+m),new mxPoint(e,h+m-d),new mxPoint(e,h)]);n=new mxPoint(n,a);f&&(b.x<e||b.x>e+k?n.y=b.y:n.x=b.x);return mxUtils.getPerimeterPoint(h,n,b)};mxStyleRegistry.putValue("stepPerimeter",mxPerimeter.StepPerimeter);mxPerimeter.HexagonPerimeter2=function(a,c,b,f){var d=x.prototype.size;null!=c&&(d=mxUtils.getValue(c.style,"size",d));var e=a.x,h=a.y,k=a.width,m=a.height,n=a.getCenterX();a=a.getCenterY();c=null!=c?mxUtils.getValue(c.style,mxConstants.STYLE_DIRECTION,mxConstants.DIRECTION_EAST):mxConstants.DIRECTION_EAST;
-c==mxConstants.DIRECTION_NORTH||c==mxConstants.DIRECTION_SOUTH?(d=m*Math.max(0,Math.min(1,d)),h=[new mxPoint(n,h),new mxPoint(e+k,h+d),new mxPoint(e+k,h+m-d),new mxPoint(n,h+m),new mxPoint(e,h+m-d),new mxPoint(e,h+d),new mxPoint(n,h)]):(d=k*Math.max(0,Math.min(1,d)),h=[new mxPoint(e+d,h),new mxPoint(e+k-d,h),new mxPoint(e+k,a),new mxPoint(e+k-d,h+m),new mxPoint(e+d,h+m),new mxPoint(e,a),new mxPoint(e+d,h)]);n=new mxPoint(n,a);f&&(b.x<e||b.x>e+k?n.y=b.y:n.x=b.x);return mxUtils.getPerimeterPoint(h,
-n,b)};mxStyleRegistry.putValue("hexagonPerimeter2",mxPerimeter.HexagonPerimeter2);mxUtils.extend(H,mxShape);H.prototype.size=10;H.prototype.paintBackground=function(a,c,b,f,d){var e=parseFloat(mxUtils.getValue(this.style,"size",this.size));a.translate(c,b);a.ellipse((f-e)/2,0,e,e);a.fillAndStroke();a.begin();a.moveTo(f/2,e);a.lineTo(f/2,d);a.end();a.stroke()};mxCellRenderer.prototype.defaultShapes.lollipop=H;mxUtils.extend(T,mxShape);T.prototype.size=10;T.prototype.inset=2;T.prototype.paintBackground=
-function(a,c,b,f,d){var e=parseFloat(mxUtils.getValue(this.style,"size",this.size)),h=parseFloat(mxUtils.getValue(this.style,"inset",this.inset))+this.strokewidth;a.translate(c,b);a.begin();a.moveTo(f/2,e+h);a.lineTo(f/2,d);a.end();a.stroke();a.begin();a.moveTo((f-e)/2-h,e/2);a.quadTo((f-e)/2-h,e+h,f/2,e+h);a.quadTo((f+e)/2+h,e+h,(f+e)/2+h,e/2);a.end();a.stroke()};mxCellRenderer.prototype.defaultShapes.requires=T;mxUtils.extend(N,mxCylinder);N.prototype.jettyWidth=32;N.prototype.jettyHeight=12;N.prototype.redrawPath=
-function(a,c,b,f,d,e){var h=parseFloat(mxUtils.getValue(this.style,"jettyWidth",this.jettyWidth));c=parseFloat(mxUtils.getValue(this.style,"jettyHeight",this.jettyHeight));b=h/2;var h=b+h/2,k=.3*d-c/2,m=.7*d-c/2;e?(a.moveTo(b,k),a.lineTo(h,k),a.lineTo(h,k+c),a.lineTo(b,k+c),a.moveTo(b,m),a.lineTo(h,m),a.lineTo(h,m+c),a.lineTo(b,m+c)):(a.moveTo(b,0),a.lineTo(f,0),a.lineTo(f,d),a.lineTo(b,d),a.lineTo(b,m+c),a.lineTo(0,m+c),a.lineTo(0,m),a.lineTo(b,m),a.lineTo(b,k+c),a.lineTo(0,k+c),a.lineTo(0,k),a.lineTo(b,
-k),a.close());a.end()};mxCellRenderer.prototype.defaultShapes.component=N;mxUtils.extend(K,mxDoubleEllipse);K.prototype.outerStroke=!0;K.prototype.paintVertexShape=function(a,c,b,f,d){var e=Math.min(4,Math.min(f/5,d/5));0<f&&0<d&&(a.ellipse(c+e,b+e,f-2*e,d-2*e),a.fillAndStroke());a.setShadow(!1);this.outerStroke&&(a.ellipse(c,b,f,d),a.stroke())};mxCellRenderer.prototype.defaultShapes.endState=K;mxUtils.extend(U,K);U.prototype.outerStroke=!1;mxCellRenderer.prototype.defaultShapes.startState=U;mxUtils.extend(G,
-mxArrowConnector);G.prototype.defaultWidth=4;G.prototype.isOpenEnded=function(){return!0};G.prototype.getEdgeWidth=function(){return mxUtils.getNumber(this.style,"width",this.defaultWidth)+Math.max(0,this.strokewidth-1)};G.prototype.isArrowRounded=function(){return this.isRounded};mxCellRenderer.prototype.defaultShapes.link=G;mxUtils.extend(L,mxArrowConnector);L.prototype.defaultWidth=10;L.prototype.defaultArrowWidth=20;L.prototype.getStartArrowWidth=function(){return this.getEdgeWidth()+mxUtils.getNumber(this.style,
-"startWidth",this.defaultArrowWidth)};L.prototype.getEndArrowWidth=function(){return this.getEdgeWidth()+mxUtils.getNumber(this.style,"endWidth",this.defaultArrowWidth)};L.prototype.getEdgeWidth=function(){return mxUtils.getNumber(this.style,"width",this.defaultWidth)+Math.max(0,this.strokewidth-1)};mxCellRenderer.prototype.defaultShapes.flexArrow=L;mxUtils.extend(Q,mxActor);Q.prototype.size=30;Q.prototype.redrawPath=function(a,c,b,f,d){c=Math.min(d,parseFloat(mxUtils.getValue(this.style,"size",this.size)));
-b=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(a,[new mxPoint(0,d),new mxPoint(0,c),new mxPoint(f,0),new mxPoint(f,d)],this.isRounded,b,!0);a.end()};mxCellRenderer.prototype.defaultShapes.manualInput=Q;mxUtils.extend(E,mxRectangleShape);E.prototype.dx=20;E.prototype.dy=20;E.prototype.isHtmlAllowed=function(){return!1};E.prototype.paintForeground=function(a,c,b,f,d){mxRectangleShape.prototype.paintForeground.apply(this,arguments);var e=0;if(this.isRounded)var h=
-mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,100*mxConstants.RECTANGLE_ROUNDING_FACTOR)/100,e=Math.max(e,Math.min(f*h,d*h));h=Math.max(e,Math.min(f,parseFloat(mxUtils.getValue(this.style,"dx",this.dx))));e=Math.max(e,Math.min(d,parseFloat(mxUtils.getValue(this.style,"dy",this.dy))));a.begin();a.moveTo(c,b+e);a.lineTo(c+f,b+e);a.end();a.stroke();a.begin();a.moveTo(c+h,b);a.lineTo(c+h,b+d);a.end();a.stroke()};mxCellRenderer.prototype.defaultShapes.internalStorage=E;mxUtils.extend(V,mxActor);
-V.prototype.dx=20;V.prototype.dy=20;V.prototype.redrawPath=function(a,c,b,f,d){c=Math.max(0,Math.min(f,parseFloat(mxUtils.getValue(this.style,"dx",this.dx))));b=Math.max(0,Math.min(d,parseFloat(mxUtils.getValue(this.style,"dy",this.dy))));parseFloat(mxUtils.getValue(this.style,"size",this.size));var e=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(a,[new mxPoint(0,0),new mxPoint(f,0),new mxPoint(f,b),new mxPoint(c,b),new mxPoint(c,d),new mxPoint(0,
-d)],this.isRounded,e,!0);a.end()};mxCellRenderer.prototype.defaultShapes.corner=V;mxUtils.extend(O,mxActor);O.prototype.redrawPath=function(a,c,b,f,d){a.moveTo(0,0);a.lineTo(0,d);a.end();a.moveTo(f,0);a.lineTo(f,d);a.end();a.moveTo(0,d/2);a.lineTo(f,d/2);a.end()};mxCellRenderer.prototype.defaultShapes.crossbar=O;mxUtils.extend(W,mxActor);W.prototype.dx=20;W.prototype.dy=20;W.prototype.redrawPath=function(a,c,b,f,d){c=Math.max(0,Math.min(f,parseFloat(mxUtils.getValue(this.style,"dx",this.dx))));b=
-Math.max(0,Math.min(d,parseFloat(mxUtils.getValue(this.style,"dy",this.dy))));parseFloat(mxUtils.getValue(this.style,"size",this.size));var e=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(a,[new mxPoint(0,0),new mxPoint(f,0),new mxPoint(f,b),new mxPoint((f+c)/2,b),new mxPoint((f+c)/2,d),new mxPoint((f-c)/2,d),new mxPoint((f-c)/2,b),new mxPoint(0,b)],this.isRounded,e,!0);a.end()};mxCellRenderer.prototype.defaultShapes.tee=W;mxUtils.extend(R,mxActor);
-R.prototype.arrowWidth=.3;R.prototype.arrowSize=.2;R.prototype.redrawPath=function(a,c,b,f,d){var e=d*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"arrowWidth",this.arrowWidth))));c=f*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"arrowSize",this.arrowSize))));b=(d-e)/2;var e=b+e,h=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(a,[new mxPoint(0,b),new mxPoint(f-c,b),new mxPoint(f-c,0),new mxPoint(f,d/2),new mxPoint(f-
-c,d),new mxPoint(f-c,e),new mxPoint(0,e)],this.isRounded,h,!0);a.end()};mxCellRenderer.prototype.defaultShapes.singleArrow=R;mxUtils.extend(P,mxActor);P.prototype.redrawPath=function(a,c,b,f,d){var e=d*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"arrowWidth",R.prototype.arrowWidth))));c=f*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"arrowSize",R.prototype.arrowSize))));b=(d-e)/2;var e=b+e,h=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/
-2;this.addPoints(a,[new mxPoint(0,d/2),new mxPoint(c,0),new mxPoint(c,b),new mxPoint(f-c,b),new mxPoint(f-c,0),new mxPoint(f,d/2),new mxPoint(f-c,d),new mxPoint(f-c,e),new mxPoint(c,e),new mxPoint(c,d)],this.isRounded,h,!0);a.end()};mxCellRenderer.prototype.defaultShapes.doubleArrow=P;mxUtils.extend(S,mxActor);S.prototype.size=.1;S.prototype.redrawPath=function(a,c,b,f,d){c=f*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));a.moveTo(c,0);a.lineTo(f,0);a.quadTo(f-2*
-c,d/2,f,d);a.lineTo(c,d);a.quadTo(c-2*c,d/2,c,0);a.close();a.end()};mxCellRenderer.prototype.defaultShapes.dataStorage=S;mxUtils.extend(Y,mxActor);Y.prototype.redrawPath=function(a,c,b,f,d){a.moveTo(0,0);a.quadTo(f,0,f,d/2);a.quadTo(f,d,0,d);a.close();a.end()};mxCellRenderer.prototype.defaultShapes.or=Y;mxUtils.extend(X,mxActor);X.prototype.redrawPath=function(a,c,b,f,d){a.moveTo(0,0);a.quadTo(f,0,f,d/2);a.quadTo(f,d,0,d);a.quadTo(f/2,d/2,0,0);a.close();a.end()};mxCellRenderer.prototype.defaultShapes.xor=
-X;mxUtils.extend(Z,mxActor);Z.prototype.size=20;Z.prototype.redrawPath=function(a,c,b,f,d){c=Math.min(f/2,Math.min(d,parseFloat(mxUtils.getValue(this.style,"size",this.size))));b=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(a,[new mxPoint(c,0),new mxPoint(f-c,0),new mxPoint(f,.8*c),new mxPoint(f,d),new mxPoint(0,d),new mxPoint(0,.8*c)],this.isRounded,b,!0);a.end()};mxCellRenderer.prototype.defaultShapes.loopLimit=Z;mxUtils.extend(aa,mxActor);aa.prototype.size=
-.375;aa.prototype.redrawPath=function(a,c,b,f,d){c=d*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));b=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(a,[new mxPoint(0,0),new mxPoint(f,0),new mxPoint(f,d-c),new mxPoint(f/2,d),new mxPoint(0,d-c)],this.isRounded,b,!0);a.end()};mxCellRenderer.prototype.defaultShapes.offPageConnector=aa;mxUtils.extend(ia,mxEllipse);ia.prototype.paintVertexShape=function(a,c,b,f,d){mxEllipse.prototype.paintVertexShape.apply(this,
-arguments);a.begin();a.moveTo(c+f/2,b+d);a.lineTo(c+f,b+d);a.end();a.stroke()};mxCellRenderer.prototype.defaultShapes.tapeData=ia;mxUtils.extend(ba,mxEllipse);ba.prototype.paintVertexShape=function(a,c,b,f,d){mxEllipse.prototype.paintVertexShape.apply(this,arguments);a.setShadow(!1);a.begin();a.moveTo(c,b+d/2);a.lineTo(c+f,b+d/2);a.end();a.stroke();a.begin();a.moveTo(c+f/2,b);a.lineTo(c+f/2,b+d);a.end();a.stroke()};mxCellRenderer.prototype.defaultShapes.orEllipse=ba;mxUtils.extend(ma,mxEllipse);ma.prototype.paintVertexShape=
-function(a,c,b,f,d){mxEllipse.prototype.paintVertexShape.apply(this,arguments);a.setShadow(!1);a.begin();a.moveTo(c+.145*f,b+.145*d);a.lineTo(c+.855*f,b+.855*d);a.end();a.stroke();a.begin();a.moveTo(c+.855*f,b+.145*d);a.lineTo(c+.145*f,b+.855*d);a.end();a.stroke()};mxCellRenderer.prototype.defaultShapes.sumEllipse=ma;mxUtils.extend(ca,mxRhombus);ca.prototype.paintVertexShape=function(a,c,b,f,d){mxRhombus.prototype.paintVertexShape.apply(this,arguments);a.setShadow(!1);a.begin();a.moveTo(c,b+d/2);
-a.lineTo(c+f,b+d/2);a.end();a.stroke()};mxCellRenderer.prototype.defaultShapes.sortShape=ca;mxUtils.extend(ja,mxEllipse);ja.prototype.paintVertexShape=function(a,c,b,f,d){a.begin();a.moveTo(c,b);a.lineTo(c+f,b);a.lineTo(c+f/2,b+d/2);a.close();a.fillAndStroke();a.begin();a.moveTo(c,b+d);a.lineTo(c+f,b+d);a.lineTo(c+f/2,b+d/2);a.close();a.fillAndStroke()};mxCellRenderer.prototype.defaultShapes.collate=ja;mxUtils.extend(da,mxEllipse);da.prototype.paintVertexShape=function(a,c,b,f,d){var e=b+d-5;a.begin();
-a.moveTo(c,b);a.lineTo(c,b+d);a.moveTo(c,e);a.lineTo(c+10,e-5);a.moveTo(c,e);a.lineTo(c+10,e+5);a.moveTo(c,e);a.lineTo(c+f,e);a.moveTo(c+f,b);a.lineTo(c+f,b+d);a.moveTo(c+f,e);a.lineTo(c+f-10,e-5);a.moveTo(c+f,e);a.lineTo(c+f-10,e+5);a.end();a.stroke()};mxCellRenderer.prototype.defaultShapes.dimension=da;mxUtils.extend(qa,mxEllipse);qa.prototype.paintVertexShape=function(a,c,b,f,d){this.outline||a.setStrokeColor(null);mxRectangleShape.prototype.paintBackground.apply(this,arguments);null!=this.style&&
-(a.setStrokeColor(this.stroke),a.rect(c,b,f,d),a.fill(),a.begin(),a.moveTo(c,b),"1"==mxUtils.getValue(this.style,"top","1")?a.lineTo(c+f,b):a.moveTo(c+f,b),"1"==mxUtils.getValue(this.style,"right","1")?a.lineTo(c+f,b+d):a.moveTo(c+f,b+d),"1"==mxUtils.getValue(this.style,"bottom","1")?a.lineTo(c,b+d):a.moveTo(c,b+d),"1"==mxUtils.getValue(this.style,"left","1")&&a.lineTo(c,b-this.strokewidth/2),a.end(),a.stroke())};mxCellRenderer.prototype.defaultShapes.partialRectangle=qa;mxUtils.extend(na,mxEllipse);
-na.prototype.paintVertexShape=function(a,c,b,f,d){mxEllipse.prototype.paintVertexShape.apply(this,arguments);a.setShadow(!1);a.begin();"vertical"==mxUtils.getValue(this.style,"line")?(a.moveTo(c+f/2,b),a.lineTo(c+f/2,b+d)):(a.moveTo(c,b+d/2),a.lineTo(c+f,b+d/2));a.end();a.stroke()};mxCellRenderer.prototype.defaultShapes.lineEllipse=na;mxUtils.extend(ta,mxActor);ta.prototype.redrawPath=function(a,c,b,f,d){c=Math.min(f,d/2);a.moveTo(0,0);a.lineTo(f-c,0);a.quadTo(f,0,f,d/2);a.quadTo(f,d,f-c,d);a.lineTo(0,
-d);a.close();a.end()};mxCellRenderer.prototype.defaultShapes.delay=ta;mxUtils.extend(oa,mxActor);oa.prototype.size=.2;oa.prototype.redrawPath=function(a,c,b,f,d){c=Math.min(d,f);var e=Math.max(0,Math.min(c,c*parseFloat(mxUtils.getValue(this.style,"size",this.size))));c=(d-e)/2;b=c+e;var h=(f-e)/2,e=h+e;a.moveTo(0,c);a.lineTo(h,c);a.lineTo(h,0);a.lineTo(e,0);a.lineTo(e,c);a.lineTo(f,c);a.lineTo(f,b);a.lineTo(e,b);a.lineTo(e,d);a.lineTo(h,d);a.lineTo(h,b);a.lineTo(0,b);a.close();a.end()};mxCellRenderer.prototype.defaultShapes.cross=
-oa;mxUtils.extend(pa,mxActor);pa.prototype.size=.25;pa.prototype.redrawPath=function(a,c,b,f,d){c=Math.min(f,d/2);b=Math.min(f-c,Math.max(0,parseFloat(mxUtils.getValue(this.style,"size",this.size)))*f);a.moveTo(0,d/2);a.lineTo(b,0);a.lineTo(f-c,0);a.quadTo(f,0,f,d/2);a.quadTo(f,d,f-c,d);a.lineTo(b,d);a.close();a.end()};mxCellRenderer.prototype.defaultShapes.display=pa;mxUtils.extend(ka,mxConnector);ka.prototype.origPaintEdgeShape=ka.prototype.paintEdgeShape;ka.prototype.paintEdgeShape=function(a,
-c,b){var f=a.state.dashed,d=a.state.fixDash;ka.prototype.origPaintEdgeShape.apply(this,arguments);if(3<=a.state.strokeWidth){var e=mxUtils.getValue(this.style,"fillColor",null);null!=e&&(a.setStrokeColor(e),a.setStrokeWidth(a.state.strokeWidth-2),a.setDashed(f,d),ka.prototype.origPaintEdgeShape.apply(this,arguments))}};mxCellRenderer.prototype.defaultShapes.filledEdge=ka;mxMarker.addMarker("dash",function(a,c,b,f,d,e,h,k,m,n){var t=d*(h+m+1),r=e*(h+m+1);return function(){a.begin();a.moveTo(f.x-t/
-2-r/2,f.y-r/2+t/2);a.lineTo(f.x+r/2-3*t/2,f.y-3*r/2-t/2);a.stroke()}});mxMarker.addMarker("cross",function(a,c,b,f,d,e,h,k,m,n){var t=d*(h+m+1),r=e*(h+m+1);return function(){a.begin();a.moveTo(f.x-t/2-r/2,f.y-r/2+t/2);a.lineTo(f.x+r/2-3*t/2,f.y-3*r/2-t/2);a.moveTo(f.x-t/2+r/2,f.y-r/2-t/2);a.lineTo(f.x-r/2-3*t/2,f.y-3*r/2+t/2);a.stroke()}});mxMarker.addMarker("circle",Aa);mxMarker.addMarker("circlePlus",function(a,c,b,f,d,e,h,k,m,n){var t=f.clone(),r=Aa.apply(this,arguments),v=d*(h+2*m),g=e*(h+2*m);
-return function(){r.apply(this,arguments);a.begin();a.moveTo(t.x-d*m,t.y-e*m);a.lineTo(t.x-2*v+d*m,t.y-2*g+e*m);a.moveTo(t.x-v-g+e*m,t.y-g+v-d*m);a.lineTo(t.x+g-v-e*m,t.y-g-v+d*m);a.stroke()}});mxMarker.addMarker("async",function(a,c,b,f,d,e,h,k,m,n){c=d*m*1.118;b=e*m*1.118;d*=h+m;e*=h+m;var t=f.clone();t.x-=c;t.y-=b;f.x+=1*-d-c;f.y+=1*-e-b;return function(){a.begin();a.moveTo(t.x,t.y);k?a.lineTo(t.x-d-e/2,t.y-e+d/2):a.lineTo(t.x+e/2-d,t.y-e-d/2);a.lineTo(t.x-d,t.y-e);a.close();n?a.fillAndStroke():
-a.stroke()}});mxMarker.addMarker("openAsync",function(a){a=null!=a?a:2;return function(c,b,f,d,e,h,k,m,n,t){e*=k+n;h*=k+n;var r=d.clone();return function(){c.begin();c.moveTo(r.x,r.y);m?c.lineTo(r.x-e-h/a,r.y-h+e/a):c.lineTo(r.x+h/a-e,r.y-h-e/a);c.stroke()}}}(2));if("undefined"!==typeof mxVertexHandler){var Ca=function(a,c,b){return ra(a,["width"],c,function(c,f,d,e,h){h=a.shape.getEdgeWidth()*a.view.scale+b;return new mxPoint(e.x+f*c/4+d*h/2,e.y+d*c/4-f*h/2)},function(c,f,d,e,h,k){c=Math.sqrt(mxUtils.ptSegDistSq(e.x,
-e.y,h.x,h.y,k.x,k.y));a.style.width=Math.round(2*c)/a.view.scale-b})},ra=function(a,c,b,f,d){var e=a.absolutePoints,h=e.length-1,k=a.view.translate,m=a.view.scale,n=b?e[0]:e[h],t=b?e[1]:e[h-1],r=t.x-n.x,v=t.y-n.y,g=Math.sqrt(r*r+v*v);return M(a,c,function(a){a=f.call(this,g,r/g,v/g,n,t);return new mxPoint(a.x/m-k.x,a.y/m-k.y)},function(a,c,b){a=Math.sqrt(r*r+v*v);c.x=(c.x+k.x)*m;c.y=(c.y+k.y)*m;d.call(this,a,r/a,v/a,n,t,c,b)})},ha=function(a){return function(c){return[M(c,["arrowWidth","arrowSize"],
-function(c){var b=Math.max(0,Math.min(1,mxUtils.getValue(this.state.style,"arrowWidth",R.prototype.arrowWidth))),f=Math.max(0,Math.min(a,mxUtils.getValue(this.state.style,"arrowSize",R.prototype.arrowSize)));return new mxPoint(c.x+(1-f)*c.width,c.y+(1-b)*c.height/2)},function(c,b){this.state.style.arrowWidth=Math.max(0,Math.min(1,Math.abs(c.y+c.height/2-b.y)/c.height*2));this.state.style.arrowSize=Math.max(0,Math.min(a,(c.x+c.width-b.x)/c.width))})]}},ya=function(a,c,b){return function(f){var d=[M(f,
-["size"],function(b){var f=Math.max(0,Math.min(b.width,Math.min(b.height,parseFloat(mxUtils.getValue(this.state.style,"size",c)))))*a;return new mxPoint(b.x+f,b.y+f)},function(c,b){this.state.style.size=Math.round(Math.max(0,Math.min(Math.min(c.width,b.x-c.x),Math.min(c.height,b.y-c.y)))/a)})];b&&mxUtils.getValue(f.style,mxConstants.STYLE_ROUNDED,!1)&&d.push(ea(f));return d}},ua=function(a,c,b,f){b=null!=b?b:1;return function(d){var e=[M(d,["size"],function(c){var b=parseFloat(mxUtils.getValue(this.state.style,
-"size",a));return new mxPoint(c.x+b*c.width,c.getCenterY())},function(a,c){this.state.style.size=Math.max(0,Math.min(b,(c.x-a.x)/a.width))},null,f)];c&&mxUtils.getValue(d.style,mxConstants.STYLE_ROUNDED,!1)&&e.push(ea(d));return e}},Da=function(a){return function(c){var b=[M(c,["size"],function(c){var b=Math.max(0,Math.min(a,parseFloat(mxUtils.getValue(this.state.style,"size",m.prototype.size))));return new mxPoint(c.x+b*c.width*.75,c.y+c.height/4)},function(c,b){this.state.style.size=Math.max(0,
-Math.min(a,(b.x-c.x)/(.75*c.width)))},null,!0)];mxUtils.getValue(c.style,mxConstants.STYLE_ROUNDED,!1)&&b.push(ea(c));return b}},sa=function(){return function(a){var c=[];mxUtils.getValue(a.style,mxConstants.STYLE_ROUNDED,!1)&&c.push(ea(a));return c}},ea=function(a,c){return M(a,[mxConstants.STYLE_ARCSIZE],function(b){var f=null!=c?c:b.height/8;if("1"==mxUtils.getValue(a.style,mxConstants.STYLE_ABSOLUTE_ARCSIZE,0)){var d=mxUtils.getValue(a.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/
-2;return new mxPoint(b.x+b.width-Math.min(b.width/2,d),b.y+f)}d=Math.max(0,parseFloat(mxUtils.getValue(a.style,mxConstants.STYLE_ARCSIZE,100*mxConstants.RECTANGLE_ROUNDING_FACTOR)))/100;return new mxPoint(b.x+b.width-Math.min(Math.max(b.width/2,b.height/2),Math.min(b.width,b.height)*d),b.y+f)},function(c,b,f){"1"==mxUtils.getValue(a.style,mxConstants.STYLE_ABSOLUTE_ARCSIZE,0)?this.state.style[mxConstants.STYLE_ARCSIZE]=Math.round(Math.max(0,Math.min(c.width,2*(c.x+c.width-b.x)))):this.state.style[mxConstants.STYLE_ARCSIZE]=
-Math.round(Math.min(50,Math.max(0,100*(c.width-b.x+c.x)/Math.min(c.width,c.height))))})},M=function(a,c,b,f,d,e){var h=new mxHandle(a,null,mxVertexHandler.prototype.secondaryHandleImage);h.execute=function(){for(var a=0;a<c.length;a++)this.copyStyle(c[a])};h.getPosition=b;h.setPosition=f;h.ignoreGrid=null!=d?d:!0;if(e){var k=h.positionChanged;h.positionChanged=function(){k.apply(this,arguments);a.view.invalidate(this.state.cell);a.view.validate()}}return h},za={link:function(a){return[Ca(a,!0,10),
-Ca(a,!1,10)]},flexArrow:function(a){var c=a.view.graph.gridSize/a.view.scale,b=[];mxUtils.getValue(a.style,mxConstants.STYLE_STARTARROW,mxConstants.NONE)!=mxConstants.NONE&&(b.push(ra(a,["width",mxConstants.STYLE_STARTSIZE,mxConstants.STYLE_ENDSIZE],!0,function(c,b,f,d,e){c=(a.shape.getEdgeWidth()-a.shape.strokewidth)*a.view.scale;e=3*mxUtils.getNumber(a.style,mxConstants.STYLE_STARTSIZE,mxConstants.ARROW_SIZE/5)*a.view.scale;return new mxPoint(d.x+b*(e+a.shape.strokewidth*a.view.scale)+f*c/2,d.y+
-f*(e+a.shape.strokewidth*a.view.scale)-b*c/2)},function(b,f,d,e,h,k,m){b=Math.sqrt(mxUtils.ptSegDistSq(e.x,e.y,h.x,h.y,k.x,k.y));f=mxUtils.ptLineDist(e.x,e.y,e.x+d,e.y-f,k.x,k.y);a.style[mxConstants.STYLE_STARTSIZE]=Math.round(100*(f-a.shape.strokewidth)/3)/100/a.view.scale;a.style.width=Math.round(2*b)/a.view.scale;mxEvent.isControlDown(m.getEvent())&&(a.style[mxConstants.STYLE_ENDSIZE]=a.style[mxConstants.STYLE_STARTSIZE]);mxEvent.isAltDown(m.getEvent())||Math.abs(parseFloat(a.style[mxConstants.STYLE_STARTSIZE])-
-parseFloat(a.style[mxConstants.STYLE_ENDSIZE]))<c/6&&(a.style[mxConstants.STYLE_STARTSIZE]=a.style[mxConstants.STYLE_ENDSIZE])})),b.push(ra(a,["startWidth","endWidth",mxConstants.STYLE_STARTSIZE,mxConstants.STYLE_ENDSIZE],!0,function(c,b,f,d,e){c=(a.shape.getStartArrowWidth()-a.shape.strokewidth)*a.view.scale;e=3*mxUtils.getNumber(a.style,mxConstants.STYLE_STARTSIZE,mxConstants.ARROW_SIZE/5)*a.view.scale;return new mxPoint(d.x+b*(e+a.shape.strokewidth*a.view.scale)+f*c/2,d.y+f*(e+a.shape.strokewidth*
-a.view.scale)-b*c/2)},function(b,f,d,e,h,k,m){b=Math.sqrt(mxUtils.ptSegDistSq(e.x,e.y,h.x,h.y,k.x,k.y));f=mxUtils.ptLineDist(e.x,e.y,e.x+d,e.y-f,k.x,k.y);a.style[mxConstants.STYLE_STARTSIZE]=Math.round(100*(f-a.shape.strokewidth)/3)/100/a.view.scale;a.style.startWidth=Math.max(0,Math.round(2*b)-a.shape.getEdgeWidth())/a.view.scale;mxEvent.isControlDown(m.getEvent())&&(a.style[mxConstants.STYLE_ENDSIZE]=a.style[mxConstants.STYLE_STARTSIZE],a.style.endWidth=a.style.startWidth);mxEvent.isAltDown(m.getEvent())||
-(Math.abs(parseFloat(a.style[mxConstants.STYLE_STARTSIZE])-parseFloat(a.style[mxConstants.STYLE_ENDSIZE]))<c/6&&(a.style[mxConstants.STYLE_STARTSIZE]=a.style[mxConstants.STYLE_ENDSIZE]),Math.abs(parseFloat(a.style.startWidth)-parseFloat(a.style.endWidth))<c&&(a.style.startWidth=a.style.endWidth))})));mxUtils.getValue(a.style,mxConstants.STYLE_ENDARROW,mxConstants.NONE)!=mxConstants.NONE&&(b.push(ra(a,["width",mxConstants.STYLE_STARTSIZE,mxConstants.STYLE_ENDSIZE],!1,function(c,b,f,d,e){c=(a.shape.getEdgeWidth()-
-a.shape.strokewidth)*a.view.scale;e=3*mxUtils.getNumber(a.style,mxConstants.STYLE_ENDSIZE,mxConstants.ARROW_SIZE/5)*a.view.scale;return new mxPoint(d.x+b*(e+a.shape.strokewidth*a.view.scale)-f*c/2,d.y+f*(e+a.shape.strokewidth*a.view.scale)+b*c/2)},function(b,f,d,e,h,k,m){b=Math.sqrt(mxUtils.ptSegDistSq(e.x,e.y,h.x,h.y,k.x,k.y));f=mxUtils.ptLineDist(e.x,e.y,e.x+d,e.y-f,k.x,k.y);a.style[mxConstants.STYLE_ENDSIZE]=Math.round(100*(f-a.shape.strokewidth)/3)/100/a.view.scale;a.style.width=Math.round(2*
-b)/a.view.scale;mxEvent.isControlDown(m.getEvent())&&(a.style[mxConstants.STYLE_STARTSIZE]=a.style[mxConstants.STYLE_ENDSIZE]);mxEvent.isAltDown(m.getEvent())||Math.abs(parseFloat(a.style[mxConstants.STYLE_ENDSIZE])-parseFloat(a.style[mxConstants.STYLE_STARTSIZE]))<c/6&&(a.style[mxConstants.STYLE_ENDSIZE]=a.style[mxConstants.STYLE_STARTSIZE])})),b.push(ra(a,["startWidth","endWidth",mxConstants.STYLE_STARTSIZE,mxConstants.STYLE_ENDSIZE],!1,function(c,b,f,d,e){c=(a.shape.getEndArrowWidth()-a.shape.strokewidth)*
-a.view.scale;e=3*mxUtils.getNumber(a.style,mxConstants.STYLE_ENDSIZE,mxConstants.ARROW_SIZE/5)*a.view.scale;return new mxPoint(d.x+b*(e+a.shape.strokewidth*a.view.scale)-f*c/2,d.y+f*(e+a.shape.strokewidth*a.view.scale)+b*c/2)},function(b,f,d,e,h,k,m){b=Math.sqrt(mxUtils.ptSegDistSq(e.x,e.y,h.x,h.y,k.x,k.y));f=mxUtils.ptLineDist(e.x,e.y,e.x+d,e.y-f,k.x,k.y);a.style[mxConstants.STYLE_ENDSIZE]=Math.round(100*(f-a.shape.strokewidth)/3)/100/a.view.scale;a.style.endWidth=Math.max(0,Math.round(2*b)-a.shape.getEdgeWidth())/
-a.view.scale;mxEvent.isControlDown(m.getEvent())&&(a.style[mxConstants.STYLE_STARTSIZE]=a.style[mxConstants.STYLE_ENDSIZE],a.style.startWidth=a.style.endWidth);mxEvent.isAltDown(m.getEvent())||(Math.abs(parseFloat(a.style[mxConstants.STYLE_ENDSIZE])-parseFloat(a.style[mxConstants.STYLE_STARTSIZE]))<c/6&&(a.style[mxConstants.STYLE_ENDSIZE]=a.style[mxConstants.STYLE_STARTSIZE]),Math.abs(parseFloat(a.style.endWidth)-parseFloat(a.style.startWidth))<c&&(a.style.endWidth=a.style.startWidth))})));return b},
-swimlane:function(a){var c=[M(a,[mxConstants.STYLE_STARTSIZE],function(c){var b=parseFloat(mxUtils.getValue(a.style,mxConstants.STYLE_STARTSIZE,mxConstants.DEFAULT_STARTSIZE));return 1==mxUtils.getValue(a.style,mxConstants.STYLE_HORIZONTAL,1)?new mxPoint(c.getCenterX(),c.y+Math.max(0,Math.min(c.height,b))):new mxPoint(c.x+Math.max(0,Math.min(c.width,b)),c.getCenterY())},function(c,b){a.style[mxConstants.STYLE_STARTSIZE]=1==mxUtils.getValue(this.state.style,mxConstants.STYLE_HORIZONTAL,1)?Math.round(Math.max(0,
-Math.min(c.height,b.y-c.y))):Math.round(Math.max(0,Math.min(c.width,b.x-c.x)))})];if(mxUtils.getValue(a.style,mxConstants.STYLE_ROUNDED)){var b=parseFloat(mxUtils.getValue(a.style,mxConstants.STYLE_STARTSIZE,mxConstants.DEFAULT_STARTSIZE));c.push(ea(a,b/2))}return c},label:sa(),ext:sa(),rectangle:sa(),triangle:sa(),rhombus:sa(),umlLifeline:function(a){return[M(a,["size"],function(a){var c=Math.max(0,Math.min(a.height,parseFloat(mxUtils.getValue(this.state.style,"size",J.prototype.size))));return new mxPoint(a.getCenterX(),
-a.y+c)},function(a,c){this.state.style.size=Math.round(Math.max(0,Math.min(a.height,c.y-a.y)))},!1)]},umlFrame:function(a){return[M(a,["width","height"],function(a){var c=Math.max(I.prototype.corner,Math.min(a.width,mxUtils.getValue(this.state.style,"width",I.prototype.width))),b=Math.max(1.5*I.prototype.corner,Math.min(a.height,mxUtils.getValue(this.state.style,"height",I.prototype.height)));return new mxPoint(a.x+c,a.y+b)},function(a,c){this.state.style.width=Math.round(Math.max(I.prototype.corner,
-Math.min(a.width,c.x-a.x)));this.state.style.height=Math.round(Math.max(1.5*I.prototype.corner,Math.min(a.height,c.y-a.y)))},!1)]},process:function(a){var c=[M(a,["size"],function(a){var c=Math.max(0,Math.min(.5,parseFloat(mxUtils.getValue(this.state.style,"size",k.prototype.size))));return new mxPoint(a.x+a.width*c,a.y+a.height/4)},function(a,c){this.state.style.size=Math.max(0,Math.min(.5,(c.x-a.x)/a.width))})];mxUtils.getValue(a.style,mxConstants.STYLE_ROUNDED,!1)&&c.push(ea(a));return c},cross:function(a){return[M(a,
-["size"],function(a){var c=Math.min(a.width,a.height),c=Math.max(0,Math.min(1,mxUtils.getValue(this.state.style,"size",oa.prototype.size)))*c/2;return new mxPoint(a.getCenterX()-c,a.getCenterY()-c)},function(a,c){var b=Math.min(a.width,a.height);this.state.style.size=Math.max(0,Math.min(1,Math.min(Math.max(0,a.getCenterY()-c.y)/b*2,Math.max(0,a.getCenterX()-c.x)/b*2)))})]},note:function(a){return[M(a,["size"],function(a){var c=Math.max(0,Math.min(a.width,Math.min(a.height,parseFloat(mxUtils.getValue(this.state.style,
-"size",g.prototype.size)))));return new mxPoint(a.x+a.width-c,a.y+c)},function(a,c){this.state.style.size=Math.round(Math.max(0,Math.min(Math.min(a.width,a.x+a.width-c.x),Math.min(a.height,c.y-a.y))))})]},manualInput:function(a){var c=[M(a,["size"],function(a){var c=Math.max(0,Math.min(a.height,mxUtils.getValue(this.state.style,"size",Q.prototype.size)));return new mxPoint(a.x+a.width/4,a.y+3*c/4)},function(a,c){this.state.style.size=Math.round(Math.max(0,Math.min(a.height,4*(c.y-a.y)/3)))})];mxUtils.getValue(a.style,
-mxConstants.STYLE_ROUNDED,!1)&&c.push(ea(a));return c},dataStorage:function(a){return[M(a,["size"],function(a){var c=Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.state.style,"size",S.prototype.size))));return new mxPoint(a.x+(1-c)*a.width,a.getCenterY())},function(a,c){this.state.style.size=Math.max(0,Math.min(1,(a.x+a.width-c.x)/a.width))})]},callout:function(a){var c=[M(a,["size","position"],function(a){var c=Math.max(0,Math.min(a.height,mxUtils.getValue(this.state.style,"size",t.prototype.size))),
-b=Math.max(0,Math.min(1,mxUtils.getValue(this.state.style,"position",t.prototype.position)));mxUtils.getValue(this.state.style,"base",t.prototype.base);return new mxPoint(a.x+b*a.width,a.y+a.height-c)},function(a,c){mxUtils.getValue(this.state.style,"base",t.prototype.base);this.state.style.size=Math.round(Math.max(0,Math.min(a.height,a.y+a.height-c.y)));this.state.style.position=Math.round(100*Math.max(0,Math.min(1,(c.x-a.x)/a.width)))/100}),M(a,["position2"],function(a){var c=Math.max(0,Math.min(1,
-mxUtils.getValue(this.state.style,"position2",t.prototype.position2)));return new mxPoint(a.x+c*a.width,a.y+a.height)},function(a,c){this.state.style.position2=Math.round(100*Math.max(0,Math.min(1,(c.x-a.x)/a.width)))/100}),M(a,["base"],function(a){var c=Math.max(0,Math.min(a.height,mxUtils.getValue(this.state.style,"size",t.prototype.size))),b=Math.max(0,Math.min(1,mxUtils.getValue(this.state.style,"position",t.prototype.position))),f=Math.max(0,Math.min(a.width,mxUtils.getValue(this.state.style,
-"base",t.prototype.base)));return new mxPoint(a.x+Math.min(a.width,b*a.width+f),a.y+a.height-c)},function(a,c){var b=Math.max(0,Math.min(1,mxUtils.getValue(this.state.style,"position",t.prototype.position)));this.state.style.base=Math.round(Math.max(0,Math.min(a.width,c.x-a.x-b*a.width)))})];mxUtils.getValue(a.style,mxConstants.STYLE_ROUNDED,!1)&&c.push(ea(a));return c},internalStorage:function(a){var c=[M(a,["dx","dy"],function(a){var c=Math.max(0,Math.min(a.width,mxUtils.getValue(this.state.style,
-"dx",E.prototype.dx))),b=Math.max(0,Math.min(a.height,mxUtils.getValue(this.state.style,"dy",E.prototype.dy)));return new mxPoint(a.x+c,a.y+b)},function(a,c){this.state.style.dx=Math.round(Math.max(0,Math.min(a.width,c.x-a.x)));this.state.style.dy=Math.round(Math.max(0,Math.min(a.height,c.y-a.y)))})];mxUtils.getValue(a.style,mxConstants.STYLE_ROUNDED,!1)&&c.push(ea(a));return c},corner:function(a){return[M(a,["dx","dy"],function(a){var c=Math.max(0,Math.min(a.width,mxUtils.getValue(this.state.style,
-"dx",V.prototype.dx))),b=Math.max(0,Math.min(a.height,mxUtils.getValue(this.state.style,"dy",V.prototype.dy)));return new mxPoint(a.x+c,a.y+b)},function(a,c){this.state.style.dx=Math.round(Math.max(0,Math.min(a.width,c.x-a.x)));this.state.style.dy=Math.round(Math.max(0,Math.min(a.height,c.y-a.y)))})]},tee:function(a){return[M(a,["dx","dy"],function(a){var c=Math.max(0,Math.min(a.width,mxUtils.getValue(this.state.style,"dx",W.prototype.dx))),b=Math.max(0,Math.min(a.height,mxUtils.getValue(this.state.style,
-"dy",W.prototype.dy)));return new mxPoint(a.x+(a.width+c)/2,a.y+b)},function(a,c){this.state.style.dx=Math.round(Math.max(0,2*Math.min(a.width/2,c.x-a.x-a.width/2)));this.state.style.dy=Math.round(Math.max(0,Math.min(a.height,c.y-a.y)))})]},singleArrow:ha(1),doubleArrow:ha(.5),folder:function(a){return[M(a,["tabWidth","tabHeight"],function(a){var c=Math.max(0,Math.min(a.width,mxUtils.getValue(this.state.style,"tabWidth",p.prototype.tabWidth))),b=Math.max(0,Math.min(a.height,mxUtils.getValue(this.state.style,
-"tabHeight",p.prototype.tabHeight)));mxUtils.getValue(this.state.style,"tabPosition",p.prototype.tabPosition)==mxConstants.ALIGN_RIGHT&&(c=a.width-c);return new mxPoint(a.x+c,a.y+b)},function(a,c){var b=Math.max(0,Math.min(a.width,c.x-a.x));mxUtils.getValue(this.state.style,"tabPosition",p.prototype.tabPosition)==mxConstants.ALIGN_RIGHT&&(b=a.width-b);this.state.style.tabWidth=Math.round(b);this.state.style.tabHeight=Math.round(Math.max(0,Math.min(a.height,c.y-a.y)))})]},document:function(a){return[M(a,
-["size"],function(a){var c=Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.state.style,"size",f.prototype.size))));return new mxPoint(a.x+3*a.width/4,a.y+(1-c)*a.height)},function(a,c){this.state.style.size=Math.max(0,Math.min(1,(a.y+a.height-c.y)/a.height))})]},tape:function(a){return[M(a,["size"],function(a){var b=Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.state.style,"size",c.prototype.size))));return new mxPoint(a.getCenterX(),a.y+b*a.height/2)},function(a,c){this.state.style.size=
-Math.max(0,Math.min(1,(c.y-a.y)/a.height*2))})]},offPageConnector:function(a){return[M(a,["size"],function(a){var c=Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.state.style,"size",aa.prototype.size))));return new mxPoint(a.getCenterX(),a.y+(1-c)*a.height)},function(a,c){this.state.style.size=Math.max(0,Math.min(1,(a.y+a.height-c.y)/a.height))})]},step:ua(v.prototype.size,!0,null,!0),hexagon:ua(x.prototype.size,!0,.5,!0),curlyBracket:ua(n.prototype.size,!1),display:ua(pa.prototype.size,!1),
-cube:ya(1,a.prototype.size,!1),card:ya(.5,q.prototype.size,!0),loopLimit:ya(.5,Z.prototype.size,!0),trapezoid:Da(.5),parallelogram:Da(1)};Graph.createHandle=M;Graph.handleFactory=za;mxVertexHandler.prototype.createCustomHandles=function(){if(1==this.state.view.graph.getSelectionCount()&&this.graph.isCellRotatable(this.state.cell)){var a=this.state.style.shape;null==this.state.view.graph.cellRenderer.defaultShapes[a]&&null==mxStencilRegistry.getStencil(a)&&(a=mxConstants.SHAPE_RECTANGLE);a=za[a];if(null!=
-a)return a(this.state)}return null};mxEdgeHandler.prototype.createCustomHandles=function(){if(1==this.state.view.graph.getSelectionCount()){var a=this.state.style.shape;null==this.state.view.graph.cellRenderer.defaultShapes[a]&&null==mxStencilRegistry.getStencil(a)&&(a=mxConstants.SHAPE_CONNECTOR);a=za[a];if(null!=a)return a(this.state)}return null}}else Graph.createHandle=function(){},Graph.handleFactory={};var va=new mxPoint(1,0),wa=new mxPoint(1,0),ha=mxUtils.toRadians(-30),va=mxUtils.getRotatedPoint(va,
-Math.cos(ha),Math.sin(ha)),ha=mxUtils.toRadians(-150),wa=mxUtils.getRotatedPoint(wa,Math.cos(ha),Math.sin(ha));mxEdgeStyle.IsometricConnector=function(a,c,b,f,d){var e=a.view;f=null!=f&&0<f.length?f[0]:null;var h=a.absolutePoints,k=h[0],h=h[h.length-1];null!=f&&(f=e.transformControlPoint(a,f));null==k&&null!=c&&(k=new mxPoint(c.getCenterX(),c.getCenterY()));null==h&&null!=b&&(h=new mxPoint(b.getCenterX(),b.getCenterY()));var m=va.x,n=va.y,t=wa.x,r=wa.y,v="horizontal"==mxUtils.getValue(a.style,"elbow",
-"horizontal");if(null!=h&&null!=k){a=function(a,c,b){a-=g.x;var f=c-g.y;c=(r*a-t*f)/(m*r-n*t);a=(n*a-m*f)/(n*t-m*r);v?(b&&(g=new mxPoint(g.x+m*c,g.y+n*c),d.push(g)),g=new mxPoint(g.x+t*a,g.y+r*a)):(b&&(g=new mxPoint(g.x+t*a,g.y+r*a),d.push(g)),g=new mxPoint(g.x+m*c,g.y+n*c));d.push(g)};var g=k;null==f&&(f=new mxPoint(k.x+(h.x-k.x)/2,k.y+(h.y-k.y)/2));a(f.x,f.y,!0);a(h.x,h.y,!1)}};mxStyleRegistry.putValue("isometricEdgeStyle",mxEdgeStyle.IsometricConnector);var Ia=Graph.prototype.createEdgeHandler;
-Graph.prototype.createEdgeHandler=function(a,c){if(c==mxEdgeStyle.IsometricConnector){var b=new mxElbowEdgeHandler(a);b.snapToTerminals=!1;return b}return Ia.apply(this,arguments)};b.prototype.constraints=[];e.prototype.constraints=[];t.prototype.constraints=[];mxRectangleShape.prototype.constraints=[new mxConnectionConstraint(new mxPoint(.25,0),!0),new mxConnectionConstraint(new mxPoint(.5,0),!0),new mxConnectionConstraint(new mxPoint(.75,0),!0),new mxConnectionConstraint(new mxPoint(0,.25),!0),
-new mxConnectionConstraint(new mxPoint(0,.5),!0),new mxConnectionConstraint(new mxPoint(0,.75),!0),new mxConnectionConstraint(new mxPoint(1,.25),!0),new mxConnectionConstraint(new mxPoint(1,.5),!0),new mxConnectionConstraint(new mxPoint(1,.75),!0),new mxConnectionConstraint(new mxPoint(.25,1),!0),new mxConnectionConstraint(new mxPoint(.5,1),!0),new mxConnectionConstraint(new mxPoint(.75,1),!0)];mxEllipse.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,0),!0),new mxConnectionConstraint(new mxPoint(1,
-0),!0),new mxConnectionConstraint(new mxPoint(0,1),!0),new mxConnectionConstraint(new mxPoint(1,1),!0),new mxConnectionConstraint(new mxPoint(.5,0),!0),new mxConnectionConstraint(new mxPoint(.5,1),!0),new mxConnectionConstraint(new mxPoint(0,.5),!0),new mxConnectionConstraint(new mxPoint(1,.5))];mxLabel.prototype.constraints=mxRectangleShape.prototype.constraints;mxImageShape.prototype.constraints=mxRectangleShape.prototype.constraints;mxSwimlane.prototype.constraints=mxRectangleShape.prototype.constraints;
-w.prototype.constraints=mxRectangleShape.prototype.constraints;g.prototype.constraints=mxRectangleShape.prototype.constraints;q.prototype.constraints=mxRectangleShape.prototype.constraints;a.prototype.constraints=mxRectangleShape.prototype.constraints;p.prototype.constraints=mxRectangleShape.prototype.constraints;E.prototype.constraints=mxRectangleShape.prototype.constraints;S.prototype.constraints=mxRectangleShape.prototype.constraints;ia.prototype.constraints=mxEllipse.prototype.constraints;ba.prototype.constraints=
-mxEllipse.prototype.constraints;ma.prototype.constraints=mxEllipse.prototype.constraints;na.prototype.constraints=mxEllipse.prototype.constraints;Q.prototype.constraints=mxRectangleShape.prototype.constraints;ta.prototype.constraints=mxRectangleShape.prototype.constraints;pa.prototype.constraints=mxRectangleShape.prototype.constraints;Z.prototype.constraints=mxRectangleShape.prototype.constraints;aa.prototype.constraints=mxRectangleShape.prototype.constraints;mxCylinder.prototype.constraints=[new mxConnectionConstraint(new mxPoint(.15,
-.05),!1),new mxConnectionConstraint(new mxPoint(.5,0),!0),new mxConnectionConstraint(new mxPoint(.85,.05),!1),new mxConnectionConstraint(new mxPoint(0,.3),!0),new mxConnectionConstraint(new mxPoint(0,.5),!0),new mxConnectionConstraint(new mxPoint(0,.7),!0),new mxConnectionConstraint(new mxPoint(1,.3),!0),new mxConnectionConstraint(new mxPoint(1,.5),!0),new mxConnectionConstraint(new mxPoint(1,.7),!0),new mxConnectionConstraint(new mxPoint(.15,.95),!1),new mxConnectionConstraint(new mxPoint(.5,1),
-!0),new mxConnectionConstraint(new mxPoint(.85,.95),!1)];y.prototype.constraints=[new mxConnectionConstraint(new mxPoint(.25,.1),!1),new mxConnectionConstraint(new mxPoint(.5,0),!1),new mxConnectionConstraint(new mxPoint(.75,.1),!1),new mxConnectionConstraint(new mxPoint(0,1/3),!1),new mxConnectionConstraint(new mxPoint(0,1),!1),new mxConnectionConstraint(new mxPoint(1,1/3),!1),new mxConnectionConstraint(new mxPoint(1,1),!1),new mxConnectionConstraint(new mxPoint(.5,.5),!1)];N.prototype.constraints=
-[new mxConnectionConstraint(new mxPoint(.25,0),!0),new mxConnectionConstraint(new mxPoint(.5,0),!0),new mxConnectionConstraint(new mxPoint(.75,0),!0),new mxConnectionConstraint(new mxPoint(0,.3),!0),new mxConnectionConstraint(new mxPoint(0,.7),!0),new mxConnectionConstraint(new mxPoint(1,.25),!0),new mxConnectionConstraint(new mxPoint(1,.5),!0),new mxConnectionConstraint(new mxPoint(1,.75),!0),new mxConnectionConstraint(new mxPoint(.25,1),!0),new mxConnectionConstraint(new mxPoint(.5,1),!0),new mxConnectionConstraint(new mxPoint(.75,
-1),!0)];mxActor.prototype.constraints=[new mxConnectionConstraint(new mxPoint(.5,0),!0),new mxConnectionConstraint(new mxPoint(.25,.2),!1),new mxConnectionConstraint(new mxPoint(.1,.5),!1),new mxConnectionConstraint(new mxPoint(0,.75),!0),new mxConnectionConstraint(new mxPoint(.75,.25),!1),new mxConnectionConstraint(new mxPoint(.9,.5),!1),new mxConnectionConstraint(new mxPoint(1,.75),!0),new mxConnectionConstraint(new mxPoint(.25,1),!0),new mxConnectionConstraint(new mxPoint(.5,1),!0),new mxConnectionConstraint(new mxPoint(.75,
-1),!0)];l.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,0),!1),new mxConnectionConstraint(new mxPoint(.5,.25),!1),new mxConnectionConstraint(new mxPoint(1,0),!1),new mxConnectionConstraint(new mxPoint(.25,.5),!1),new mxConnectionConstraint(new mxPoint(.75,.5),!1),new mxConnectionConstraint(new mxPoint(0,1),!1),new mxConnectionConstraint(new mxPoint(.5,.75),!1),new mxConnectionConstraint(new mxPoint(1,1),!1)];c.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,.35),
-!1),new mxConnectionConstraint(new mxPoint(0,.5),!1),new mxConnectionConstraint(new mxPoint(0,.65),!1),new mxConnectionConstraint(new mxPoint(1,.35),!1),new mxConnectionConstraint(new mxPoint(1,.5),!1),new mxConnectionConstraint(new mxPoint(1,.65),!1),new mxConnectionConstraint(new mxPoint(.25,1),!1),new mxConnectionConstraint(new mxPoint(.75,0),!1)];v.prototype.constraints=[new mxConnectionConstraint(new mxPoint(.25,0),!0),new mxConnectionConstraint(new mxPoint(.5,0),!0),new mxConnectionConstraint(new mxPoint(.75,
-0),!0),new mxConnectionConstraint(new mxPoint(.25,1),!0),new mxConnectionConstraint(new mxPoint(.5,1),!0),new mxConnectionConstraint(new mxPoint(.75,1),!0),new mxConnectionConstraint(new mxPoint(.1,.25),!0),new mxConnectionConstraint(new mxPoint(.2,.5),!0),new mxConnectionConstraint(new mxPoint(.1,.75),!0),new mxConnectionConstraint(new mxPoint(.9,.25),!0),new mxConnectionConstraint(new mxPoint(1,.5),!0),new mxConnectionConstraint(new mxPoint(.9,.75),!0)];mxLine.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,
-.5),!1),new mxConnectionConstraint(new mxPoint(.25,.5),!1),new mxConnectionConstraint(new mxPoint(.75,.5),!1),new mxConnectionConstraint(new mxPoint(1,.5),!1)];H.prototype.constraints=[new mxConnectionConstraint(new mxPoint(.5,0),!1),new mxConnectionConstraint(new mxPoint(.5,1),!1)];mxDoubleEllipse.prototype.constraints=mxEllipse.prototype.constraints;mxRhombus.prototype.constraints=mxEllipse.prototype.constraints;mxTriangle.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,.25),!0),
-new mxConnectionConstraint(new mxPoint(0,.5),!0),new mxConnectionConstraint(new mxPoint(0,.75),!0),new mxConnectionConstraint(new mxPoint(.5,0),!0),new mxConnectionConstraint(new mxPoint(.5,1),!0),new mxConnectionConstraint(new mxPoint(1,.5),!0)];mxHexagon.prototype.constraints=[new mxConnectionConstraint(new mxPoint(.375,0),!0),new mxConnectionConstraint(new mxPoint(.5,0),!0),new mxConnectionConstraint(new mxPoint(.625,0),!0),new mxConnectionConstraint(new mxPoint(.125,.25),!0),new mxConnectionConstraint(new mxPoint(0,
-.5),!0),new mxConnectionConstraint(new mxPoint(.125,.75),!0),new mxConnectionConstraint(new mxPoint(.875,.25),!0),new mxConnectionConstraint(new mxPoint(0,.5),!0),new mxConnectionConstraint(new mxPoint(1,.5),!0),new mxConnectionConstraint(new mxPoint(.875,.75),!0),new mxConnectionConstraint(new mxPoint(.375,1),!0),new mxConnectionConstraint(new mxPoint(.5,1),!0),new mxConnectionConstraint(new mxPoint(.625,1),!0)];mxCloud.prototype.constraints=[new mxConnectionConstraint(new mxPoint(.25,.25),!1),new mxConnectionConstraint(new mxPoint(.4,
-.1),!1),new mxConnectionConstraint(new mxPoint(.16,.55),!1),new mxConnectionConstraint(new mxPoint(.07,.4),!1),new mxConnectionConstraint(new mxPoint(.31,.8),!1),new mxConnectionConstraint(new mxPoint(.13,.77),!1),new mxConnectionConstraint(new mxPoint(.8,.8),!1),new mxConnectionConstraint(new mxPoint(.55,.95),!1),new mxConnectionConstraint(new mxPoint(.875,.5),!1),new mxConnectionConstraint(new mxPoint(.96,.7),!1),new mxConnectionConstraint(new mxPoint(.625,.2),!1),new mxConnectionConstraint(new mxPoint(.88,
-.25),!1)];h.prototype.constraints=mxRectangleShape.prototype.constraints;m.prototype.constraints=mxRectangleShape.prototype.constraints;f.prototype.constraints=[new mxConnectionConstraint(new mxPoint(.25,0),!0),new mxConnectionConstraint(new mxPoint(.5,0),!0),new mxConnectionConstraint(new mxPoint(.75,0),!0),new mxConnectionConstraint(new mxPoint(0,.25),!0),new mxConnectionConstraint(new mxPoint(0,.5),!0),new mxConnectionConstraint(new mxPoint(0,.75),!0),new mxConnectionConstraint(new mxPoint(1,.25),
-!0),new mxConnectionConstraint(new mxPoint(1,.5),!0),new mxConnectionConstraint(new mxPoint(1,.75),!0)];mxArrow.prototype.constraints=null;W.prototype.constraints=null;V.prototype.constraints=null;O.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,0),!1),new mxConnectionConstraint(new mxPoint(0,.5),!1),new mxConnectionConstraint(new mxPoint(0,1),!1),new mxConnectionConstraint(new mxPoint(.25,.5),!1),new mxConnectionConstraint(new mxPoint(.5,.5),!1),new mxConnectionConstraint(new mxPoint(.75,
-.5),!1),new mxConnectionConstraint(new mxPoint(1,0),!1),new mxConnectionConstraint(new mxPoint(1,.5),!1),new mxConnectionConstraint(new mxPoint(1,1),!1)];R.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,.5),!1),new mxConnectionConstraint(new mxPoint(1,.5),!1)];P.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,.5),!1),new mxConnectionConstraint(new mxPoint(1,.5),!1)];oa.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,.5),!1),new mxConnectionConstraint(new mxPoint(1,
-.5),!1),new mxConnectionConstraint(new mxPoint(.5,0),!1),new mxConnectionConstraint(new mxPoint(.5,1),!1)];J.prototype.constraints=null;Y.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,.25),!1),new mxConnectionConstraint(new mxPoint(0,.5),!1),new mxConnectionConstraint(new mxPoint(0,.75),!1),new mxConnectionConstraint(new mxPoint(1,.5),!1),new mxConnectionConstraint(new mxPoint(.7,.1),!1),new mxConnectionConstraint(new mxPoint(.7,.9),!1)];X.prototype.constraints=[new mxConnectionConstraint(new mxPoint(.175,
-.25),!1),new mxConnectionConstraint(new mxPoint(.25,.5),!1),new mxConnectionConstraint(new mxPoint(.175,.75),!1),new mxConnectionConstraint(new mxPoint(1,.5),!1),new mxConnectionConstraint(new mxPoint(.7,.1),!1),new mxConnectionConstraint(new mxPoint(.7,.9),!1)]})();function Actions(a){this.editorUi=a;this.actions={};this.init()}
-Actions.prototype.init=function(){function a(a){d.escape();var c=d.getDeletableCells(d.getSelectionCells());if(null!=c&&0<c.length){var b=d.model.getParents(c);d.removeCells(c,a);if(null!=b){a=[];for(c=0;c<b.length;c++)d.model.contains(b[c])&&(d.model.isVertex(b[c])||d.model.isEdge(b[c]))&&a.push(b[c]);d.setSelectionCells(a)}}}var b=this.editorUi,e=b.editor,d=e.graph,g=function(){return Action.prototype.isEnabled.apply(this,arguments)&&d.isEnabled()};this.addAction("new...",function(){window.open(b.getUrl())});
-this.addAction("open...",function(){window.openNew=!0;window.openKey="open";b.openFile()});this.addAction("import...",function(){window.openNew=!1;window.openKey="import";window.openFile=new OpenFile(mxUtils.bind(this,function(){b.hideDialog()}));window.openFile.setConsumer(mxUtils.bind(this,function(a,c){try{var b=mxUtils.parseXml(a),d=new mxGraphModel;(new mxCodec(b)).decode(b.documentElement,d);var m=d.getChildren(d.getChildAt(d.getRoot(),0));e.graph.setSelectionCells(e.graph.importCells(m))}catch(n){mxUtils.alert(mxResources.get("invalidOrMissingFile")+
-": "+n.message)}}));b.showDialog((new OpenDialog(this)).container,320,220,!0,!0,function(){window.openFile=null})}).isEnabled=g;this.addAction("save",function(){b.saveFile(!1)},null,null,Editor.ctrlKey+"+S").isEnabled=g;this.addAction("saveAs...",function(){b.saveFile(!0)},null,null,Editor.ctrlKey+"+Shift+S").isEnabled=g;this.addAction("export...",function(){b.showDialog((new ExportDialog(b)).container,300,230,!0,!0)});this.addAction("editDiagram...",function(){var a=new EditDiagramDialog(b);b.showDialog(a.container,
-620,420,!0,!1);a.init()});this.addAction("pageSetup...",function(){b.showDialog((new PageSetupDialog(b)).container,320,220,!0,!0)}).isEnabled=g;this.addAction("print...",function(){b.showDialog((new PrintDialog(b)).container,300,180,!0,!0)},null,"sprite-print",Editor.ctrlKey+"+P");this.addAction("preview",function(){mxUtils.show(d,null,10,10)});this.addAction("undo",function(){b.undo()},null,"sprite-undo",Editor.ctrlKey+"+Z");this.addAction("redo",function(){b.redo()},null,"sprite-redo",mxClient.IS_WIN?
+this.canvas.curveTo=mxUtils.bind(this,r.prototype.curveTo);this.originalArcTo=this.canvas.arcTo;this.canvas.arcTo=mxUtils.bind(this,r.prototype.arcTo)}function k(){mxRectangleShape.call(this)}function v(){mxRectangleShape.call(this)}function t(){mxActor.call(this)}function x(){mxActor.call(this)}function w(){mxActor.call(this)}function D(){mxRectangleShape.call(this)}function A(){mxRectangleShape.call(this)}function z(){mxCylinder.call(this)}function C(){mxShape.call(this)}function B(){mxShape.call(this)}
+function E(){mxEllipse.call(this)}function y(){mxShape.call(this)}function O(){mxShape.call(this)}function J(){mxRectangleShape.call(this)}function F(){mxShape.call(this)}function R(){mxShape.call(this)}function P(){mxShape.call(this)}function I(){mxCylinder.call(this)}function S(){mxDoubleEllipse.call(this)}function H(){mxDoubleEllipse.call(this)}function L(){mxArrowConnector.call(this);this.spacing=0}function Q(){mxArrowConnector.call(this);this.spacing=0}function G(){mxActor.call(this)}function V(){mxRectangleShape.call(this)}
+function M(){mxActor.call(this)}function Y(){mxActor.call(this)}function T(){mxActor.call(this)}function K(){mxActor.call(this)}function U(){mxActor.call(this)}function W(){mxActor.call(this)}function X(){mxActor.call(this)}function ba(){mxActor.call(this)}function Z(){mxActor.call(this)}function ca(){mxActor.call(this)}function da(){mxEllipse.call(this)}function ma(){mxEllipse.call(this)}function aa(){mxEllipse.call(this)}function ja(){mxRhombus.call(this)}function ea(){mxEllipse.call(this)}function pa(){mxEllipse.call(this)}
+function qa(){mxEllipse.call(this)}function ta(){mxEllipse.call(this)}function ua(){mxActor.call(this)}function na(){mxActor.call(this)}function oa(){mxActor.call(this)}function ka(){mxConnector.call(this)}function Ba(a,c,b,d,f,g,e,k,p,m){e+=p;var ha=d.clone();d.x-=f*(2*e+p);d.y-=g*(2*e+p);f*=e+p;g*=e+p;return function(){a.ellipse(ha.x-f-e,ha.y-g-e,2*e,2*e);m?a.fillAndStroke():a.stroke()}}mxUtils.extend(a,mxCylinder);a.prototype.size=20;a.prototype.redrawPath=function(a,c,b,d,f,g){c=Math.max(0,Math.min(d,
+Math.min(f,parseFloat(mxUtils.getValue(this.style,"size",this.size)))));g?(a.moveTo(c,f),a.lineTo(c,c),a.lineTo(0,0),a.moveTo(c,c),a.lineTo(d,c)):(a.moveTo(0,0),a.lineTo(d-c,0),a.lineTo(d,c),a.lineTo(d,f),a.lineTo(c,f),a.lineTo(0,f-c),a.lineTo(0,0),a.close());a.end()};a.prototype.getLabelMargins=function(a){return mxUtils.getValue(this.style,"boundedLbl",!1)?(a=parseFloat(mxUtils.getValue(this.style,"size",this.size))*this.scale,new mxRectangle(a,a,0,0)):null};mxCellRenderer.prototype.defaultShapes.cube=
+a;var ya=Math.tan(mxUtils.toRadians(30)),la=(.5-ya)/2;mxUtils.extend(b,mxActor);b.prototype.size=20;b.prototype.redrawPath=function(a,c,b,d,f){c=Math.min(d,f/ya);a.translate((d-c)/2,(f-c)/2+c/4);a.moveTo(0,.25*c);a.lineTo(.5*c,c*la);a.lineTo(c,.25*c);a.lineTo(.5*c,(.5-la)*c);a.lineTo(0,.25*c);a.close();a.end()};mxCellRenderer.prototype.defaultShapes.isoRectangle=b;mxUtils.extend(e,mxCylinder);e.prototype.size=20;e.prototype.redrawPath=function(a,c,b,d,f,g){c=Math.min(d,f/(.5+ya));g?(a.moveTo(0,.25*
+c),a.lineTo(.5*c,(.5-la)*c),a.lineTo(c,.25*c),a.moveTo(.5*c,(.5-la)*c),a.lineTo(.5*c,(1-la)*c)):(a.translate((d-c)/2,(f-c)/2),a.moveTo(0,.25*c),a.lineTo(.5*c,c*la),a.lineTo(c,.25*c),a.lineTo(c,.75*c),a.lineTo(.5*c,(1-la)*c),a.lineTo(0,.75*c),a.close());a.end()};mxCellRenderer.prototype.defaultShapes.isoCube=e;mxUtils.extend(d,mxCylinder);d.prototype.redrawPath=function(a,c,b,d,f,g){c=Math.min(f/2,Math.round(f/8)+this.strokewidth-1);if(g&&null!=this.fill||!g&&null==this.fill)a.moveTo(0,c),a.curveTo(0,
+2*c,d,2*c,d,c),g||(a.stroke(),a.begin()),a.translate(0,c/2),a.moveTo(0,c),a.curveTo(0,2*c,d,2*c,d,c),g||(a.stroke(),a.begin()),a.translate(0,c/2),a.moveTo(0,c),a.curveTo(0,2*c,d,2*c,d,c),g||(a.stroke(),a.begin()),a.translate(0,-c);g||(a.moveTo(0,c),a.curveTo(0,-c/3,d,-c/3,d,c),a.lineTo(d,f-c),a.curveTo(d,f+c/3,0,f+c/3,0,f-c),a.close())};d.prototype.getLabelMargins=function(a){return new mxRectangle(0,2.5*Math.min(a.height/2,Math.round(a.height/8)+this.strokewidth-1)*this.scale,0,0)};mxCellRenderer.prototype.defaultShapes.datastore=
+d;mxUtils.extend(h,mxCylinder);h.prototype.size=30;h.prototype.redrawPath=function(a,c,b,d,f,g){c=Math.max(0,Math.min(d,Math.min(f,parseFloat(mxUtils.getValue(this.style,"size",this.size)))));g?(a.moveTo(d-c,0),a.lineTo(d-c,c),a.lineTo(d,c)):(a.moveTo(0,0),a.lineTo(d-c,0),a.lineTo(d,c),a.lineTo(d,f),a.lineTo(0,f),a.lineTo(0,0),a.close());a.end()};mxCellRenderer.prototype.defaultShapes.note=h;mxUtils.extend(l,mxActor);l.prototype.redrawPath=function(a,c,b,d,f){a.moveTo(0,0);a.quadTo(d/2,.5*f,d,0);
+a.quadTo(.5*d,f/2,d,f);a.quadTo(d/2,.5*f,0,f);a.quadTo(.5*d,f/2,0,0);a.end()};mxCellRenderer.prototype.defaultShapes["switch"]=l;mxUtils.extend(n,mxCylinder);n.prototype.tabWidth=60;n.prototype.tabHeight=20;n.prototype.tabPosition="right";n.prototype.redrawPath=function(a,c,b,d,f,g){c=Math.max(0,Math.min(d,parseFloat(mxUtils.getValue(this.style,"tabWidth",this.tabWidth))));b=Math.max(0,Math.min(f,parseFloat(mxUtils.getValue(this.style,"tabHeight",this.tabHeight))));var e=mxUtils.getValue(this.style,
+"tabPosition",this.tabPosition);g?"left"==e?(a.moveTo(0,b),a.lineTo(c,b)):(a.moveTo(d-c,b),a.lineTo(d,b)):("left"==e?(a.moveTo(0,0),a.lineTo(c,0),a.lineTo(c,b),a.lineTo(d,b)):(a.moveTo(0,b),a.lineTo(d-c,b),a.lineTo(d-c,0),a.lineTo(d,0)),a.lineTo(d,f),a.lineTo(0,f),a.lineTo(0,b),a.close());a.end()};mxCellRenderer.prototype.defaultShapes.folder=n;mxUtils.extend(q,mxActor);q.prototype.size=30;q.prototype.redrawPath=function(a,c,b,d,f){c=Math.max(0,Math.min(d,Math.min(f,parseFloat(mxUtils.getValue(this.style,
+"size",this.size)))));b=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(a,[new mxPoint(c,0),new mxPoint(d,0),new mxPoint(d,f),new mxPoint(0,f),new mxPoint(0,c)],this.isRounded,b,!0);a.end()};mxCellRenderer.prototype.defaultShapes.card=q;mxUtils.extend(c,mxActor);c.prototype.size=.4;c.prototype.redrawPath=function(a,c,b,d,f){c=f*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));a.moveTo(0,c/2);a.quadTo(d/4,1.4*c,d/2,c/
+2);a.quadTo(3*d/4,c*(1-1.4),d,c/2);a.lineTo(d,f-c/2);a.quadTo(3*d/4,f-1.4*c,d/2,f-c/2);a.quadTo(d/4,f-c*(1-1.4),0,f-c/2);a.lineTo(0,c/2);a.close();a.end()};c.prototype.getLabelBounds=function(a){if(mxUtils.getValue(this.style,"boundedLbl",!1)){var c=mxUtils.getValue(this.style,"size",this.size),b=a.width,d=a.height;if(null==this.direction||this.direction==mxConstants.DIRECTION_EAST||this.direction==mxConstants.DIRECTION_WEST)return c*=d,new mxRectangle(a.x,a.y+c,b,d-2*c);c*=b;return new mxRectangle(a.x+
+c,a.y,b-2*c,d)}return a};mxCellRenderer.prototype.defaultShapes.tape=c;mxUtils.extend(f,mxActor);f.prototype.size=.3;f.prototype.getLabelMargins=function(a){return mxUtils.getValue(this.style,"boundedLbl",!1)?new mxRectangle(0,0,0,parseFloat(mxUtils.getValue(this.style,"size",this.size))*a.height):null};f.prototype.redrawPath=function(a,c,b,d,f){c=f*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));a.moveTo(0,0);a.lineTo(d,0);a.lineTo(d,f-c/2);a.quadTo(3*d/4,f-1.4*
+c,d/2,f-c/2);a.quadTo(d/4,f-c*(1-1.4),0,f-c/2);a.lineTo(0,c/2);a.close();a.end()};mxCellRenderer.prototype.defaultShapes.document=f;mxCylinder.prototype.getLabelMargins=function(a){return mxUtils.getValue(this.style,"boundedLbl",!1)?new mxRectangle(0,Math.min(this.maxHeight*this.scale,.3*a.height),0,0):null};mxUtils.extend(g,mxActor);g.prototype.size=.2;g.prototype.redrawPath=function(a,c,b,d,f){c=d*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));b=mxUtils.getValue(this.style,
+mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(a,[new mxPoint(0,f),new mxPoint(c,0),new mxPoint(d,0),new mxPoint(d-c,f)],this.isRounded,b,!0);a.end()};mxCellRenderer.prototype.defaultShapes.parallelogram=g;mxUtils.extend(p,mxActor);p.prototype.size=.2;p.prototype.redrawPath=function(a,c,b,d,f){c=d*Math.max(0,Math.min(.5,parseFloat(mxUtils.getValue(this.style,"size",this.size))));b=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(a,
+[new mxPoint(0,f),new mxPoint(c,0),new mxPoint(d-c,0),new mxPoint(d,f)],this.isRounded,b,!0)};mxCellRenderer.prototype.defaultShapes.trapezoid=p;mxUtils.extend(m,mxActor);m.prototype.size=.5;m.prototype.redrawPath=function(a,c,b,d,f){a.setFillColor(null);c=d*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));b=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(a,[new mxPoint(d,0),new mxPoint(c,0),new mxPoint(c,f/2),new mxPoint(0,
+f/2),new mxPoint(c,f/2),new mxPoint(c,f),new mxPoint(d,f)],this.isRounded,b,!1);a.end()};mxCellRenderer.prototype.defaultShapes.curlyBracket=m;mxUtils.extend(u,mxActor);u.prototype.redrawPath=function(a,c,b,d,f){a.setStrokeWidth(1);a.setFillColor(this.stroke);c=d/5;a.rect(0,0,c,f);a.fillAndStroke();a.rect(2*c,0,c,f);a.fillAndStroke();a.rect(4*c,0,c,f);a.fillAndStroke()};mxCellRenderer.prototype.defaultShapes.parallelMarker=u;r.prototype.moveTo=function(a,c){this.originalMoveTo.apply(this.canvas,arguments);
+this.lastX=a;this.lastY=c;this.firstX=a;this.firstY=c};r.prototype.close=function(){null!=this.firstX&&null!=this.firstY&&(this.lineTo(this.firstX,this.firstY),this.originalClose.apply(this.canvas,arguments));this.originalClose.apply(this.canvas,arguments)};r.prototype.quadTo=function(a,c,b,d){this.originalQuadTo.apply(this.canvas,arguments);this.lastX=b;this.lastY=d};r.prototype.curveTo=function(a,c,b,d,f,g){this.originalCurveTo.apply(this.canvas,arguments);this.lastX=f;this.lastY=g};r.prototype.arcTo=
+function(a,c,b,d,f,g,e){this.originalArcTo.apply(this.canvas,arguments);this.lastX=g;this.lastY=e};r.prototype.lineTo=function(a,c){if(null!=this.lastX&&null!=this.lastY){var b=function(a){return"number"===typeof a?a?0>a?-1:1:a===a?0:NaN:NaN},d=Math.abs(a-this.lastX),f=Math.abs(c-this.lastY),g=Math.sqrt(d*d+f*f);if(2>g){this.originalLineTo.apply(this.canvas,arguments);this.lastX=a;this.lastY=c;return}var e=Math.round(g/10),k=this.defaultVariation;5>e&&(e=5,k/=3);for(var ha=b(a-this.lastX)*d/e,b=b(c-
+this.lastY)*f/e,d=d/g,f=f/g,g=0;g<e;g++){var p=(Math.random()-.5)*k;this.originalLineTo.call(this.canvas,ha*g+this.lastX-p*f,b*g+this.lastY-p*d)}this.originalLineTo.call(this.canvas,a,c)}else this.originalLineTo.apply(this.canvas,arguments);this.lastX=a;this.lastY=c};r.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};var Fa=mxShape.prototype.paint;mxShape.prototype.defaultJiggle=1.5;mxShape.prototype.paint=function(a){null!=this.style&&"0"!=mxUtils.getValue(this.style,"comic","0")&&null==a.handHiggle&&(a.handJiggle=new r(a,mxUtils.getValue(this.style,"jiggle",this.defaultJiggle)));Fa.apply(this,arguments);null!=a.handJiggle&&(a.handJiggle.destroy(),delete a.handJiggle)};mxRhombus.prototype.defaultJiggle=2;var Ga=mxRectangleShape.prototype.isHtmlAllowed;mxRectangleShape.prototype.isHtmlAllowed=
+function(){return(null==this.style||"0"==mxUtils.getValue(this.style,"comic","0"))&&Ga.apply(this,arguments)};var Ha=mxRectangleShape.prototype.paintBackground;mxRectangleShape.prototype.paintBackground=function(a,c,b,d,f){if(null==a.handJiggle)Ha.apply(this,arguments);else{var g=!0;null!=this.style&&(g="1"==mxUtils.getValue(this.style,mxConstants.STYLE_POINTER_EVENTS,"1"));if(g||null!=this.fill&&this.fill!=mxConstants.NONE||null!=this.stroke&&this.stroke!=mxConstants.NONE)g||null!=this.fill&&this.fill!=
+mxConstants.NONE||(a.pointerEvents=!1),a.begin(),this.isRounded?("1"==mxUtils.getValue(this.style,mxConstants.STYLE_ABSOLUTE_ARCSIZE,0)?g=Math.min(d/2,Math.min(f/2,mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2)):(g=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,100*mxConstants.RECTANGLE_ROUNDING_FACTOR)/100,g=Math.min(d*g,f*g)),a.moveTo(c+g,b),a.lineTo(c+d-g,b),a.quadTo(c+d,b,c+d,b+g),a.lineTo(c+d,b+f-g),a.quadTo(c+d,b+f,c+d-g,b+f),a.lineTo(c+g,b+f),a.quadTo(c,
+b+f,c,b+f-g),a.lineTo(c,b+g),a.quadTo(c,b,c+g,b)):(a.moveTo(c,b),a.lineTo(c+d,b),a.lineTo(c+d,b+f),a.lineTo(c,b+f),a.lineTo(c,b)),a.close(),a.end(),a.fillAndStroke()}};var Ia=mxRectangleShape.prototype.paintForeground;mxRectangleShape.prototype.paintForeground=function(a,c,b,d,f){null==a.handJiggle&&Ia.apply(this,arguments)};mxUtils.extend(k,mxRectangleShape);k.prototype.size=.1;k.prototype.isHtmlAllowed=function(){return!1};k.prototype.getLabelBounds=function(a){if(mxUtils.getValue(this.state.style,
+mxConstants.STYLE_HORIZONTAL,!0)==(null==this.direction||this.direction==mxConstants.DIRECTION_EAST||this.direction==mxConstants.DIRECTION_WEST)){var c=a.width,b=a.height;a=new mxRectangle(a.x,a.y,c,b);var d=c*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));if(this.isRounded)var f=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,100*mxConstants.RECTANGLE_ROUNDING_FACTOR)/100,d=Math.max(d,Math.min(c*f,b*f));a.x+=d;a.width-=2*d}return a};k.prototype.paintForeground=
+function(a,c,b,d,f){var g=d*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));if(this.isRounded)var e=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,100*mxConstants.RECTANGLE_ROUNDING_FACTOR)/100,g=Math.max(g,Math.min(d*e,f*e));a.begin();a.moveTo(c+g,b);a.lineTo(c+g,b+f);a.moveTo(c+d-g,b);a.lineTo(c+d-g,b+f);a.end();a.stroke();mxRectangleShape.prototype.paintForeground.apply(this,arguments)};mxCellRenderer.prototype.defaultShapes.process=k;mxUtils.extend(v,mxRectangleShape);
+v.prototype.paintBackground=function(a,c,b,d,f){a.setFillColor(mxConstants.NONE);a.rect(c,b,d,f);a.fill()};v.prototype.paintForeground=function(a,c,b,d,f){};mxCellRenderer.prototype.defaultShapes.transparent=v;mxUtils.extend(t,mxHexagon);t.prototype.size=30;t.prototype.position=.5;t.prototype.position2=.5;t.prototype.base=20;t.prototype.getLabelMargins=function(){return new mxRectangle(0,0,0,parseFloat(mxUtils.getValue(this.style,"size",this.size))*this.scale)};t.prototype.redrawPath=function(a,c,
+b,d,f){c=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;b=Math.max(0,Math.min(f,parseFloat(mxUtils.getValue(this.style,"size",this.size))));var g=d*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"position",this.position)))),e=d*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"position2",this.position2)))),k=Math.max(0,Math.min(d,parseFloat(mxUtils.getValue(this.style,"base",this.base))));this.addPoints(a,[new mxPoint(0,0),new mxPoint(d,
+0),new mxPoint(d,f-b),new mxPoint(Math.min(d,g+k),f-b),new mxPoint(e,f),new mxPoint(Math.max(0,g),f-b),new mxPoint(0,f-b)],this.isRounded,c,!0,[4])};mxCellRenderer.prototype.defaultShapes.callout=t;mxUtils.extend(x,mxActor);x.prototype.size=.2;x.prototype.redrawPath=function(a,c,b,d,f){c=d*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));b=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(a,[new mxPoint(0,0),new mxPoint(d-
+c,0),new mxPoint(d,f/2),new mxPoint(d-c,f),new mxPoint(0,f),new mxPoint(c,f/2)],this.isRounded,b,!0);a.end()};mxCellRenderer.prototype.defaultShapes.step=x;mxUtils.extend(w,mxHexagon);w.prototype.size=.25;w.prototype.redrawPath=function(a,c,b,d,f){c=d*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));b=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(a,[new mxPoint(c,0),new mxPoint(d-c,0),new mxPoint(d,.5*f),new mxPoint(d-
+c,f),new mxPoint(c,f),new mxPoint(0,.5*f)],this.isRounded,b,!0)};mxCellRenderer.prototype.defaultShapes.hexagon=w;mxUtils.extend(D,mxRectangleShape);D.prototype.isHtmlAllowed=function(){return!1};D.prototype.paintForeground=function(a,c,b,d,f){var g=Math.min(d/5,f/5)+1;a.begin();a.moveTo(c+d/2,b+g);a.lineTo(c+d/2,b+f-g);a.moveTo(c+g,b+f/2);a.lineTo(c+d-g,b+f/2);a.end();a.stroke();mxRectangleShape.prototype.paintForeground.apply(this,arguments)};mxCellRenderer.prototype.defaultShapes.plus=D;var Ca=
+mxRhombus.prototype.paintVertexShape;mxRhombus.prototype.getLabelBounds=function(a){if(1==this.style["double"]){var c=(2*Math.max(2,this.strokewidth+1)+parseFloat(this.style[mxConstants.STYLE_MARGIN]||0))*this.scale;return new mxRectangle(a.x+c,a.y+c,a.width-2*c,a.height-2*c)}return a};mxRhombus.prototype.paintVertexShape=function(a,c,b,d,f){Ca.apply(this,arguments);if(!this.outline&&1==this.style["double"]){var g=2*Math.max(2,this.strokewidth+1)+parseFloat(this.style[mxConstants.STYLE_MARGIN]||0);
+c+=g;b+=g;d-=2*g;f-=2*g;0<d&&0<f&&(a.setShadow(!1),Ca.apply(this,[a,c,b,d,f]))}};mxUtils.extend(A,mxRectangleShape);A.prototype.isHtmlAllowed=function(){return!1};A.prototype.getLabelBounds=function(a){if(1==this.style["double"]){var c=(Math.max(2,this.strokewidth+1)+parseFloat(this.style[mxConstants.STYLE_MARGIN]||0))*this.scale;return new mxRectangle(a.x+c,a.y+c,a.width-2*c,a.height-2*c)}return a};A.prototype.paintForeground=function(a,c,b,d,f){if(null!=this.style){if(!this.outline&&1==this.style["double"]){var g=
+Math.max(2,this.strokewidth+1)+parseFloat(this.style[mxConstants.STYLE_MARGIN]||0);c+=g;b+=g;d-=2*g;f-=2*g;0<d&&0<f&&mxRectangleShape.prototype.paintBackground.apply(this,arguments)}a.setDashed(!1);var g=0,e;do{e=mxCellRenderer.prototype.defaultShapes[this.style["symbol"+g]];if(null!=e){var k=this.style["symbol"+g+"Align"],p=this.style["symbol"+g+"VerticalAlign"],ha=this.style["symbol"+g+"Width"],m=this.style["symbol"+g+"Height"],t=this.style["symbol"+g+"Spacing"]||0,r=this.style["symbol"+g+"VSpacing"]||
+t,v=this.style["symbol"+g+"ArcSpacing"];null!=v&&(v*=this.getArcSize(d+this.strokewidth,f+this.strokewidth),t+=v,r+=v);var v=c,h=b,v=k==mxConstants.ALIGN_CENTER?v+(d-ha)/2:k==mxConstants.ALIGN_RIGHT?v+(d-ha-t):v+t,h=p==mxConstants.ALIGN_MIDDLE?h+(f-m)/2:p==mxConstants.ALIGN_BOTTOM?h+(f-m-r):h+r;a.save();k=new e;k.style=this.style;e.prototype.paintVertexShape.call(k,a,v,h,ha,m);a.restore()}g++}while(null!=e)}mxRectangleShape.prototype.paintForeground.apply(this,arguments)};mxCellRenderer.prototype.defaultShapes.ext=
+A;mxUtils.extend(z,mxCylinder);z.prototype.redrawPath=function(a,c,b,d,f,g){g?(a.moveTo(0,0),a.lineTo(d/2,f/2),a.lineTo(d,0),a.end()):(a.moveTo(0,0),a.lineTo(d,0),a.lineTo(d,f),a.lineTo(0,f),a.close())};mxCellRenderer.prototype.defaultShapes.message=z;mxUtils.extend(C,mxShape);C.prototype.paintBackground=function(a,c,b,d,f){a.translate(c,b);a.ellipse(d/4,0,d/2,f/4);a.fillAndStroke();a.begin();a.moveTo(d/2,f/4);a.lineTo(d/2,2*f/3);a.moveTo(d/2,f/3);a.lineTo(0,f/3);a.moveTo(d/2,f/3);a.lineTo(d,f/3);
+a.moveTo(d/2,2*f/3);a.lineTo(0,f);a.moveTo(d/2,2*f/3);a.lineTo(d,f);a.end();a.stroke()};mxCellRenderer.prototype.defaultShapes.umlActor=C;mxUtils.extend(B,mxShape);B.prototype.getLabelMargins=function(a){return new mxRectangle(a.width/6,0,0,0)};B.prototype.paintBackground=function(a,c,b,d,f){a.translate(c,b);a.begin();a.moveTo(0,f/4);a.lineTo(0,3*f/4);a.end();a.stroke();a.begin();a.moveTo(0,f/2);a.lineTo(d/6,f/2);a.end();a.stroke();a.ellipse(d/6,0,5*d/6,f);a.fillAndStroke()};mxCellRenderer.prototype.defaultShapes.umlBoundary=
+B;mxUtils.extend(E,mxEllipse);E.prototype.paintVertexShape=function(a,c,b,d,f){mxEllipse.prototype.paintVertexShape.apply(this,arguments);a.begin();a.moveTo(c+d/8,b+f);a.lineTo(c+7*d/8,b+f);a.end();a.stroke()};mxCellRenderer.prototype.defaultShapes.umlEntity=E;mxUtils.extend(y,mxShape);y.prototype.paintVertexShape=function(a,c,b,d,f){a.translate(c,b);a.begin();a.moveTo(d,0);a.lineTo(0,f);a.moveTo(0,0);a.lineTo(d,f);a.end();a.stroke()};mxCellRenderer.prototype.defaultShapes.umlDestroy=y;mxUtils.extend(O,
+mxShape);O.prototype.getLabelBounds=function(a){return new mxRectangle(a.x,a.y+a.height/8,a.width,7*a.height/8)};O.prototype.paintBackground=function(a,c,b,d,f){a.translate(c,b);a.begin();a.moveTo(3*d/8,f/8*1.1);a.lineTo(5*d/8,0);a.end();a.stroke();a.ellipse(0,f/8,d,7*f/8);a.fillAndStroke()};O.prototype.paintForeground=function(a,c,b,d,f){a.begin();a.moveTo(3*d/8,f/8*1.1);a.lineTo(5*d/8,f/4);a.end();a.stroke()};mxCellRenderer.prototype.defaultShapes.umlControl=O;mxUtils.extend(J,mxRectangleShape);
+J.prototype.size=40;J.prototype.isHtmlAllowed=function(){return!1};J.prototype.getLabelBounds=function(a){var c=Math.max(0,Math.min(a.height,parseFloat(mxUtils.getValue(this.style,"size",this.size))*this.scale));return new mxRectangle(a.x,a.y,a.width,c)};J.prototype.paintBackground=function(a,c,b,d,f){var g=Math.max(0,Math.min(f,parseFloat(mxUtils.getValue(this.style,"size",this.size)))),e=mxUtils.getValue(this.style,"participant");null==e||null==this.state?mxRectangleShape.prototype.paintBackground.call(this,
+a,c,b,d,g):(e=this.state.view.graph.cellRenderer.getShape(e),null!=e&&e!=J&&(e=new e,e.apply(this.state),a.save(),e.paintVertexShape(a,c,b,d,g),a.restore()));g<f&&(a.setDashed(!0),a.begin(),a.moveTo(c+d/2,b+g),a.lineTo(c+d/2,b+f),a.end(),a.stroke())};J.prototype.paintForeground=function(a,c,b,d,f){var g=Math.max(0,Math.min(f,parseFloat(mxUtils.getValue(this.style,"size",this.size))));mxRectangleShape.prototype.paintForeground.call(this,a,c,b,d,Math.min(f,g))};mxCellRenderer.prototype.defaultShapes.umlLifeline=
+J;mxUtils.extend(F,mxShape);F.prototype.width=60;F.prototype.height=30;F.prototype.corner=10;F.prototype.getLabelMargins=function(a){return new mxRectangle(0,0,a.width-parseFloat(mxUtils.getValue(this.style,"width",this.width)*this.scale),a.height-parseFloat(mxUtils.getValue(this.style,"height",this.height)*this.scale))};F.prototype.paintBackground=function(a,c,b,d,f){var g=this.corner,e=Math.min(d,Math.max(g,parseFloat(mxUtils.getValue(this.style,"width",this.width)))),k=Math.min(f,Math.max(1.5*
+g,parseFloat(mxUtils.getValue(this.style,"height",this.height))));a.begin();a.moveTo(c,b);a.lineTo(c+e,b);a.lineTo(c+e,b+Math.max(0,k-1.5*g));a.lineTo(c+Math.max(0,e-g),b+k);a.lineTo(c,b+k);a.close();a.fillAndStroke();a.begin();a.moveTo(c+e,b);a.lineTo(c+d,b);a.lineTo(c+d,b+f);a.lineTo(c,b+f);a.lineTo(c,b+k);a.stroke()};mxCellRenderer.prototype.defaultShapes.umlFrame=F;mxPerimeter.LifelinePerimeter=function(a,c,b,d){d=J.prototype.size;null!=c&&(d=mxUtils.getValue(c.style,"size",d)*c.view.scale);c=
+parseFloat(c.style[mxConstants.STYLE_STROKEWIDTH]||1)*c.view.scale/2-1;b.x<a.getCenterX()&&(c=-1*(c+1));return new mxPoint(a.getCenterX()+c,Math.min(a.y+a.height,Math.max(a.y+d,b.y)))};mxStyleRegistry.putValue("lifelinePerimeter",mxPerimeter.LifelinePerimeter);mxPerimeter.OrthogonalPerimeter=function(a,c,b,d){d=!0;return mxPerimeter.RectanglePerimeter.apply(this,arguments)};mxStyleRegistry.putValue("orthogonalPerimeter",mxPerimeter.OrthogonalPerimeter);mxPerimeter.BackbonePerimeter=function(a,c,b,
+d){d=parseFloat(c.style[mxConstants.STYLE_STROKEWIDTH]||1)*c.view.scale/2-1;null!=c.style.backboneSize&&(d+=parseFloat(c.style.backboneSize)*c.view.scale/2-1);if("south"==c.style[mxConstants.STYLE_DIRECTION]||"north"==c.style[mxConstants.STYLE_DIRECTION])return b.x<a.getCenterX()&&(d=-1*(d+1)),new mxPoint(a.getCenterX()+d,Math.min(a.y+a.height,Math.max(a.y,b.y)));b.y<a.getCenterY()&&(d=-1*(d+1));return new mxPoint(Math.min(a.x+a.width,Math.max(a.x,b.x)),a.getCenterY()+d)};mxStyleRegistry.putValue("backbonePerimeter",
+mxPerimeter.BackbonePerimeter);mxPerimeter.CalloutPerimeter=function(a,c,b,d){return mxPerimeter.RectanglePerimeter(mxUtils.getDirectedBounds(a,new mxRectangle(0,0,0,Math.max(0,Math.min(a.height,parseFloat(mxUtils.getValue(c.style,"size",t.prototype.size))*c.view.scale))),c.style),c,b,d)};mxStyleRegistry.putValue("calloutPerimeter",mxPerimeter.CalloutPerimeter);mxPerimeter.ParallelogramPerimeter=function(a,c,b,d){var f=g.prototype.size;null!=c&&(f=mxUtils.getValue(c.style,"size",f));var e=a.x,k=a.y,
+p=a.width,m=a.height;c=null!=c?mxUtils.getValue(c.style,mxConstants.STYLE_DIRECTION,mxConstants.DIRECTION_EAST):mxConstants.DIRECTION_EAST;c==mxConstants.DIRECTION_NORTH||c==mxConstants.DIRECTION_SOUTH?(f=m*Math.max(0,Math.min(1,f)),k=[new mxPoint(e,k),new mxPoint(e+p,k+f),new mxPoint(e+p,k+m),new mxPoint(e,k+m-f),new mxPoint(e,k)]):(f=p*Math.max(0,Math.min(1,f)),k=[new mxPoint(e+f,k),new mxPoint(e+p,k),new mxPoint(e+p-f,k+m),new mxPoint(e,k+m),new mxPoint(e+f,k)]);m=a.getCenterX();a=a.getCenterY();
+a=new mxPoint(m,a);d&&(b.x<e||b.x>e+p?a.y=b.y:a.x=b.x);return mxUtils.getPerimeterPoint(k,a,b)};mxStyleRegistry.putValue("parallelogramPerimeter",mxPerimeter.ParallelogramPerimeter);mxPerimeter.TrapezoidPerimeter=function(a,c,b,d){var f=p.prototype.size;null!=c&&(f=mxUtils.getValue(c.style,"size",f));var g=a.x,e=a.y,k=a.width,m=a.height;c=null!=c?mxUtils.getValue(c.style,mxConstants.STYLE_DIRECTION,mxConstants.DIRECTION_EAST):mxConstants.DIRECTION_EAST;c==mxConstants.DIRECTION_EAST?(f=k*Math.max(0,
+Math.min(1,f)),e=[new mxPoint(g+f,e),new mxPoint(g+k-f,e),new mxPoint(g+k,e+m),new mxPoint(g,e+m),new mxPoint(g+f,e)]):c==mxConstants.DIRECTION_WEST?(f=k*Math.max(0,Math.min(1,f)),e=[new mxPoint(g,e),new mxPoint(g+k,e),new mxPoint(g+k-f,e+m),new mxPoint(g+f,e+m),new mxPoint(g,e)]):c==mxConstants.DIRECTION_NORTH?(f=m*Math.max(0,Math.min(1,f)),e=[new mxPoint(g,e+f),new mxPoint(g+k,e),new mxPoint(g+k,e+m),new mxPoint(g,e+m-f),new mxPoint(g,e+f)]):(f=m*Math.max(0,Math.min(1,f)),e=[new mxPoint(g,e),new mxPoint(g+
+k,e+f),new mxPoint(g+k,e+m-f),new mxPoint(g,e+m),new mxPoint(g,e)]);m=a.getCenterX();a=a.getCenterY();a=new mxPoint(m,a);d&&(b.x<g||b.x>g+k?a.y=b.y:a.x=b.x);return mxUtils.getPerimeterPoint(e,a,b)};mxStyleRegistry.putValue("trapezoidPerimeter",mxPerimeter.TrapezoidPerimeter);mxPerimeter.StepPerimeter=function(a,c,b,d){var f=x.prototype.size;null!=c&&(f=mxUtils.getValue(c.style,"size",f));var g=a.x,e=a.y,k=a.width,p=a.height,m=a.getCenterX();a=a.getCenterY();c=null!=c?mxUtils.getValue(c.style,mxConstants.STYLE_DIRECTION,
+mxConstants.DIRECTION_EAST):mxConstants.DIRECTION_EAST;c==mxConstants.DIRECTION_EAST?(f=k*Math.max(0,Math.min(1,f)),e=[new mxPoint(g,e),new mxPoint(g+k-f,e),new mxPoint(g+k,a),new mxPoint(g+k-f,e+p),new mxPoint(g,e+p),new mxPoint(g+f,a),new mxPoint(g,e)]):c==mxConstants.DIRECTION_WEST?(f=k*Math.max(0,Math.min(1,f)),e=[new mxPoint(g+f,e),new mxPoint(g+k,e),new mxPoint(g+k-f,a),new mxPoint(g+k,e+p),new mxPoint(g+f,e+p),new mxPoint(g,a),new mxPoint(g+f,e)]):c==mxConstants.DIRECTION_NORTH?(f=p*Math.max(0,
+Math.min(1,f)),e=[new mxPoint(g,e+f),new mxPoint(m,e),new mxPoint(g+k,e+f),new mxPoint(g+k,e+p),new mxPoint(m,e+p-f),new mxPoint(g,e+p),new mxPoint(g,e+f)]):(f=p*Math.max(0,Math.min(1,f)),e=[new mxPoint(g,e),new mxPoint(m,e+f),new mxPoint(g+k,e),new mxPoint(g+k,e+p-f),new mxPoint(m,e+p),new mxPoint(g,e+p-f),new mxPoint(g,e)]);m=new mxPoint(m,a);d&&(b.x<g||b.x>g+k?m.y=b.y:m.x=b.x);return mxUtils.getPerimeterPoint(e,m,b)};mxStyleRegistry.putValue("stepPerimeter",mxPerimeter.StepPerimeter);mxPerimeter.HexagonPerimeter2=
+function(a,c,b,d){var f=w.prototype.size;null!=c&&(f=mxUtils.getValue(c.style,"size",f));var g=a.x,e=a.y,k=a.width,p=a.height,m=a.getCenterX();a=a.getCenterY();c=null!=c?mxUtils.getValue(c.style,mxConstants.STYLE_DIRECTION,mxConstants.DIRECTION_EAST):mxConstants.DIRECTION_EAST;c==mxConstants.DIRECTION_NORTH||c==mxConstants.DIRECTION_SOUTH?(f=p*Math.max(0,Math.min(1,f)),e=[new mxPoint(m,e),new mxPoint(g+k,e+f),new mxPoint(g+k,e+p-f),new mxPoint(m,e+p),new mxPoint(g,e+p-f),new mxPoint(g,e+f),new mxPoint(m,
+e)]):(f=k*Math.max(0,Math.min(1,f)),e=[new mxPoint(g+f,e),new mxPoint(g+k-f,e),new mxPoint(g+k,a),new mxPoint(g+k-f,e+p),new mxPoint(g+f,e+p),new mxPoint(g,a),new mxPoint(g+f,e)]);m=new mxPoint(m,a);d&&(b.x<g||b.x>g+k?m.y=b.y:m.x=b.x);return mxUtils.getPerimeterPoint(e,m,b)};mxStyleRegistry.putValue("hexagonPerimeter2",mxPerimeter.HexagonPerimeter2);mxUtils.extend(R,mxShape);R.prototype.size=10;R.prototype.paintBackground=function(a,c,b,d,f){var g=parseFloat(mxUtils.getValue(this.style,"size",this.size));
+a.translate(c,b);a.ellipse((d-g)/2,0,g,g);a.fillAndStroke();a.begin();a.moveTo(d/2,g);a.lineTo(d/2,f);a.end();a.stroke()};mxCellRenderer.prototype.defaultShapes.lollipop=R;mxUtils.extend(P,mxShape);P.prototype.size=10;P.prototype.inset=2;P.prototype.paintBackground=function(a,c,b,d,f){var g=parseFloat(mxUtils.getValue(this.style,"size",this.size)),e=parseFloat(mxUtils.getValue(this.style,"inset",this.inset))+this.strokewidth;a.translate(c,b);a.begin();a.moveTo(d/2,g+e);a.lineTo(d/2,f);a.end();a.stroke();
+a.begin();a.moveTo((d-g)/2-e,g/2);a.quadTo((d-g)/2-e,g+e,d/2,g+e);a.quadTo((d+g)/2+e,g+e,(d+g)/2+e,g/2);a.end();a.stroke()};mxCellRenderer.prototype.defaultShapes.requires=P;mxUtils.extend(I,mxCylinder);I.prototype.jettyWidth=32;I.prototype.jettyHeight=12;I.prototype.redrawPath=function(a,c,b,d,f,g){var e=parseFloat(mxUtils.getValue(this.style,"jettyWidth",this.jettyWidth));c=parseFloat(mxUtils.getValue(this.style,"jettyHeight",this.jettyHeight));b=e/2;var e=b+e/2,k=.3*f-c/2,p=.7*f-c/2;g?(a.moveTo(b,
+k),a.lineTo(e,k),a.lineTo(e,k+c),a.lineTo(b,k+c),a.moveTo(b,p),a.lineTo(e,p),a.lineTo(e,p+c),a.lineTo(b,p+c)):(a.moveTo(b,0),a.lineTo(d,0),a.lineTo(d,f),a.lineTo(b,f),a.lineTo(b,p+c),a.lineTo(0,p+c),a.lineTo(0,p),a.lineTo(b,p),a.lineTo(b,k+c),a.lineTo(0,k+c),a.lineTo(0,k),a.lineTo(b,k),a.close());a.end()};mxCellRenderer.prototype.defaultShapes.component=I;mxUtils.extend(S,mxDoubleEllipse);S.prototype.outerStroke=!0;S.prototype.paintVertexShape=function(a,c,b,d,f){var g=Math.min(4,Math.min(d/5,f/5));
+0<d&&0<f&&(a.ellipse(c+g,b+g,d-2*g,f-2*g),a.fillAndStroke());a.setShadow(!1);this.outerStroke&&(a.ellipse(c,b,d,f),a.stroke())};mxCellRenderer.prototype.defaultShapes.endState=S;mxUtils.extend(H,S);H.prototype.outerStroke=!1;mxCellRenderer.prototype.defaultShapes.startState=H;mxUtils.extend(L,mxArrowConnector);L.prototype.defaultWidth=4;L.prototype.isOpenEnded=function(){return!0};L.prototype.getEdgeWidth=function(){return mxUtils.getNumber(this.style,"width",this.defaultWidth)+Math.max(0,this.strokewidth-
+1)};L.prototype.isArrowRounded=function(){return this.isRounded};mxCellRenderer.prototype.defaultShapes.link=L;mxUtils.extend(Q,mxArrowConnector);Q.prototype.defaultWidth=10;Q.prototype.defaultArrowWidth=20;Q.prototype.getStartArrowWidth=function(){return this.getEdgeWidth()+mxUtils.getNumber(this.style,"startWidth",this.defaultArrowWidth)};Q.prototype.getEndArrowWidth=function(){return this.getEdgeWidth()+mxUtils.getNumber(this.style,"endWidth",this.defaultArrowWidth)};Q.prototype.getEdgeWidth=function(){return mxUtils.getNumber(this.style,
+"width",this.defaultWidth)+Math.max(0,this.strokewidth-1)};mxCellRenderer.prototype.defaultShapes.flexArrow=Q;mxUtils.extend(G,mxActor);G.prototype.size=30;G.prototype.redrawPath=function(a,c,b,d,f){c=Math.min(f,parseFloat(mxUtils.getValue(this.style,"size",this.size)));b=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(a,[new mxPoint(0,f),new mxPoint(0,c),new mxPoint(d,0),new mxPoint(d,f)],this.isRounded,b,!0);a.end()};mxCellRenderer.prototype.defaultShapes.manualInput=
+G;mxUtils.extend(V,mxRectangleShape);V.prototype.dx=20;V.prototype.dy=20;V.prototype.isHtmlAllowed=function(){return!1};V.prototype.paintForeground=function(a,c,b,d,f){mxRectangleShape.prototype.paintForeground.apply(this,arguments);var g=0;if(this.isRounded)var e=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,100*mxConstants.RECTANGLE_ROUNDING_FACTOR)/100,g=Math.max(g,Math.min(d*e,f*e));e=Math.max(g,Math.min(d,parseFloat(mxUtils.getValue(this.style,"dx",this.dx))));g=Math.max(g,Math.min(f,
+parseFloat(mxUtils.getValue(this.style,"dy",this.dy))));a.begin();a.moveTo(c,b+g);a.lineTo(c+d,b+g);a.end();a.stroke();a.begin();a.moveTo(c+e,b);a.lineTo(c+e,b+f);a.end();a.stroke()};mxCellRenderer.prototype.defaultShapes.internalStorage=V;mxUtils.extend(M,mxActor);M.prototype.dx=20;M.prototype.dy=20;M.prototype.redrawPath=function(a,c,b,d,f){c=Math.max(0,Math.min(d,parseFloat(mxUtils.getValue(this.style,"dx",this.dx))));b=Math.max(0,Math.min(f,parseFloat(mxUtils.getValue(this.style,"dy",this.dy))));
+parseFloat(mxUtils.getValue(this.style,"size",this.size));var g=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(a,[new mxPoint(0,0),new mxPoint(d,0),new mxPoint(d,b),new mxPoint(c,b),new mxPoint(c,f),new mxPoint(0,f)],this.isRounded,g,!0);a.end()};mxCellRenderer.prototype.defaultShapes.corner=M;mxUtils.extend(Y,mxActor);Y.prototype.redrawPath=function(a,c,b,d,f){a.moveTo(0,0);a.lineTo(0,f);a.end();a.moveTo(d,0);a.lineTo(d,f);a.end();a.moveTo(0,f/2);
+a.lineTo(d,f/2);a.end()};mxCellRenderer.prototype.defaultShapes.crossbar=Y;mxUtils.extend(T,mxActor);T.prototype.dx=20;T.prototype.dy=20;T.prototype.redrawPath=function(a,c,b,d,f){c=Math.max(0,Math.min(d,parseFloat(mxUtils.getValue(this.style,"dx",this.dx))));b=Math.max(0,Math.min(f,parseFloat(mxUtils.getValue(this.style,"dy",this.dy))));parseFloat(mxUtils.getValue(this.style,"size",this.size));var g=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(a,
+[new mxPoint(0,0),new mxPoint(d,0),new mxPoint(d,b),new mxPoint((d+c)/2,b),new mxPoint((d+c)/2,f),new mxPoint((d-c)/2,f),new mxPoint((d-c)/2,b),new mxPoint(0,b)],this.isRounded,g,!0);a.end()};mxCellRenderer.prototype.defaultShapes.tee=T;mxUtils.extend(K,mxActor);K.prototype.arrowWidth=.3;K.prototype.arrowSize=.2;K.prototype.redrawPath=function(a,c,b,d,f){var g=f*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"arrowWidth",this.arrowWidth))));c=d*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,
+"arrowSize",this.arrowSize))));b=(f-g)/2;var g=b+g,e=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(a,[new mxPoint(0,b),new mxPoint(d-c,b),new mxPoint(d-c,0),new mxPoint(d,f/2),new mxPoint(d-c,f),new mxPoint(d-c,g),new mxPoint(0,g)],this.isRounded,e,!0);a.end()};mxCellRenderer.prototype.defaultShapes.singleArrow=K;mxUtils.extend(U,mxActor);U.prototype.redrawPath=function(a,c,b,d,f){var g=f*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,
+"arrowWidth",K.prototype.arrowWidth))));c=d*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"arrowSize",K.prototype.arrowSize))));b=(f-g)/2;var g=b+g,e=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(a,[new mxPoint(0,f/2),new mxPoint(c,0),new mxPoint(c,b),new mxPoint(d-c,b),new mxPoint(d-c,0),new mxPoint(d,f/2),new mxPoint(d-c,f),new mxPoint(d-c,g),new mxPoint(c,g),new mxPoint(c,f)],this.isRounded,e,!0);a.end()};mxCellRenderer.prototype.defaultShapes.doubleArrow=
+U;mxUtils.extend(W,mxActor);W.prototype.size=.1;W.prototype.redrawPath=function(a,c,b,d,f){c=d*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));a.moveTo(c,0);a.lineTo(d,0);a.quadTo(d-2*c,f/2,d,f);a.lineTo(c,f);a.quadTo(c-2*c,f/2,c,0);a.close();a.end()};mxCellRenderer.prototype.defaultShapes.dataStorage=W;mxUtils.extend(X,mxActor);X.prototype.redrawPath=function(a,c,b,d,f){a.moveTo(0,0);a.quadTo(d,0,d,f/2);a.quadTo(d,f,0,f);a.close();a.end()};mxCellRenderer.prototype.defaultShapes.or=
+X;mxUtils.extend(ba,mxActor);ba.prototype.redrawPath=function(a,c,b,d,f){a.moveTo(0,0);a.quadTo(d,0,d,f/2);a.quadTo(d,f,0,f);a.quadTo(d/2,f/2,0,0);a.close();a.end()};mxCellRenderer.prototype.defaultShapes.xor=ba;mxUtils.extend(Z,mxActor);Z.prototype.size=20;Z.prototype.redrawPath=function(a,c,b,d,f){c=Math.min(d/2,Math.min(f,parseFloat(mxUtils.getValue(this.style,"size",this.size))));b=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(a,[new mxPoint(c,
+0),new mxPoint(d-c,0),new mxPoint(d,.8*c),new mxPoint(d,f),new mxPoint(0,f),new mxPoint(0,.8*c)],this.isRounded,b,!0);a.end()};mxCellRenderer.prototype.defaultShapes.loopLimit=Z;mxUtils.extend(ca,mxActor);ca.prototype.size=.375;ca.prototype.redrawPath=function(a,c,b,d,f){c=f*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));b=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(a,[new mxPoint(0,0),new mxPoint(d,0),new mxPoint(d,
+f-c),new mxPoint(d/2,f),new mxPoint(0,f-c)],this.isRounded,b,!0);a.end()};mxCellRenderer.prototype.defaultShapes.offPageConnector=ca;mxUtils.extend(da,mxEllipse);da.prototype.paintVertexShape=function(a,c,b,d,f){mxEllipse.prototype.paintVertexShape.apply(this,arguments);a.begin();a.moveTo(c+d/2,b+f);a.lineTo(c+d,b+f);a.end();a.stroke()};mxCellRenderer.prototype.defaultShapes.tapeData=da;mxUtils.extend(ma,mxEllipse);ma.prototype.paintVertexShape=function(a,c,b,d,f){mxEllipse.prototype.paintVertexShape.apply(this,
+arguments);a.setShadow(!1);a.begin();a.moveTo(c,b+f/2);a.lineTo(c+d,b+f/2);a.end();a.stroke();a.begin();a.moveTo(c+d/2,b);a.lineTo(c+d/2,b+f);a.end();a.stroke()};mxCellRenderer.prototype.defaultShapes.orEllipse=ma;mxUtils.extend(aa,mxEllipse);aa.prototype.paintVertexShape=function(a,c,b,d,f){mxEllipse.prototype.paintVertexShape.apply(this,arguments);a.setShadow(!1);a.begin();a.moveTo(c+.145*d,b+.145*f);a.lineTo(c+.855*d,b+.855*f);a.end();a.stroke();a.begin();a.moveTo(c+.855*d,b+.145*f);a.lineTo(c+
+.145*d,b+.855*f);a.end();a.stroke()};mxCellRenderer.prototype.defaultShapes.sumEllipse=aa;mxUtils.extend(ja,mxRhombus);ja.prototype.paintVertexShape=function(a,c,b,d,f){mxRhombus.prototype.paintVertexShape.apply(this,arguments);a.setShadow(!1);a.begin();a.moveTo(c,b+f/2);a.lineTo(c+d,b+f/2);a.end();a.stroke()};mxCellRenderer.prototype.defaultShapes.sortShape=ja;mxUtils.extend(ea,mxEllipse);ea.prototype.paintVertexShape=function(a,c,b,d,f){a.begin();a.moveTo(c,b);a.lineTo(c+d,b);a.lineTo(c+d/2,b+f/
+2);a.close();a.fillAndStroke();a.begin();a.moveTo(c,b+f);a.lineTo(c+d,b+f);a.lineTo(c+d/2,b+f/2);a.close();a.fillAndStroke()};mxCellRenderer.prototype.defaultShapes.collate=ea;mxUtils.extend(pa,mxEllipse);pa.prototype.paintVertexShape=function(a,c,b,d,f){var g=b+f-5;a.begin();a.moveTo(c,b);a.lineTo(c,b+f);a.moveTo(c,g);a.lineTo(c+10,g-5);a.moveTo(c,g);a.lineTo(c+10,g+5);a.moveTo(c,g);a.lineTo(c+d,g);a.moveTo(c+d,b);a.lineTo(c+d,b+f);a.moveTo(c+d,g);a.lineTo(c+d-10,g-5);a.moveTo(c+d,g);a.lineTo(c+
+d-10,g+5);a.end();a.stroke()};mxCellRenderer.prototype.defaultShapes.dimension=pa;mxUtils.extend(qa,mxEllipse);qa.prototype.paintVertexShape=function(a,c,b,d,f){this.outline||a.setStrokeColor(null);mxRectangleShape.prototype.paintBackground.apply(this,arguments);null!=this.style&&(a.setStrokeColor(this.stroke),a.rect(c,b,d,f),a.fill(),a.begin(),a.moveTo(c,b),"1"==mxUtils.getValue(this.style,"top","1")?a.lineTo(c+d,b):a.moveTo(c+d,b),"1"==mxUtils.getValue(this.style,"right","1")?a.lineTo(c+d,b+f):
+a.moveTo(c+d,b+f),"1"==mxUtils.getValue(this.style,"bottom","1")?a.lineTo(c,b+f):a.moveTo(c,b+f),"1"==mxUtils.getValue(this.style,"left","1")&&a.lineTo(c,b-this.strokewidth/2),a.end(),a.stroke())};mxCellRenderer.prototype.defaultShapes.partialRectangle=qa;mxUtils.extend(ta,mxEllipse);ta.prototype.paintVertexShape=function(a,c,b,d,f){mxEllipse.prototype.paintVertexShape.apply(this,arguments);a.setShadow(!1);a.begin();"vertical"==mxUtils.getValue(this.style,"line")?(a.moveTo(c+d/2,b),a.lineTo(c+d/2,
+b+f)):(a.moveTo(c,b+f/2),a.lineTo(c+d,b+f/2));a.end();a.stroke()};mxCellRenderer.prototype.defaultShapes.lineEllipse=ta;mxUtils.extend(ua,mxActor);ua.prototype.redrawPath=function(a,c,b,d,f){c=Math.min(d,f/2);a.moveTo(0,0);a.lineTo(d-c,0);a.quadTo(d,0,d,f/2);a.quadTo(d,f,d-c,f);a.lineTo(0,f);a.close();a.end()};mxCellRenderer.prototype.defaultShapes.delay=ua;mxUtils.extend(na,mxActor);na.prototype.size=.2;na.prototype.redrawPath=function(a,c,b,d,f){c=Math.min(f,d);var g=Math.max(0,Math.min(c,c*parseFloat(mxUtils.getValue(this.style,
+"size",this.size))));c=(f-g)/2;b=c+g;var e=(d-g)/2,g=e+g;a.moveTo(0,c);a.lineTo(e,c);a.lineTo(e,0);a.lineTo(g,0);a.lineTo(g,c);a.lineTo(d,c);a.lineTo(d,b);a.lineTo(g,b);a.lineTo(g,f);a.lineTo(e,f);a.lineTo(e,b);a.lineTo(0,b);a.close();a.end()};mxCellRenderer.prototype.defaultShapes.cross=na;mxUtils.extend(oa,mxActor);oa.prototype.size=.25;oa.prototype.redrawPath=function(a,c,b,d,f){c=Math.min(d,f/2);b=Math.min(d-c,Math.max(0,parseFloat(mxUtils.getValue(this.style,"size",this.size)))*d);a.moveTo(0,
+f/2);a.lineTo(b,0);a.lineTo(d-c,0);a.quadTo(d,0,d,f/2);a.quadTo(d,f,d-c,f);a.lineTo(b,f);a.close();a.end()};mxCellRenderer.prototype.defaultShapes.display=oa;mxUtils.extend(ka,mxConnector);ka.prototype.origPaintEdgeShape=ka.prototype.paintEdgeShape;ka.prototype.paintEdgeShape=function(a,c,b){var d=a.state.dashed,f=a.state.fixDash;ka.prototype.origPaintEdgeShape.apply(this,arguments);if(3<=a.state.strokeWidth){var g=mxUtils.getValue(this.style,"fillColor",null);null!=g&&(a.setStrokeColor(g),a.setStrokeWidth(a.state.strokeWidth-
+2),a.setDashed(d,f),ka.prototype.origPaintEdgeShape.apply(this,arguments))}};mxCellRenderer.prototype.defaultShapes.filledEdge=ka;mxMarker.addMarker("dash",function(a,c,b,d,f,g,e,k,p,m){var t=f*(e+p+1),v=g*(e+p+1);return function(){a.begin();a.moveTo(d.x-t/2-v/2,d.y-v/2+t/2);a.lineTo(d.x+v/2-3*t/2,d.y-3*v/2-t/2);a.stroke()}});mxMarker.addMarker("cross",function(a,c,b,d,f,g,e,k,p,m){var t=f*(e+p+1),v=g*(e+p+1);return function(){a.begin();a.moveTo(d.x-t/2-v/2,d.y-v/2+t/2);a.lineTo(d.x+v/2-3*t/2,d.y-
+3*v/2-t/2);a.moveTo(d.x-t/2+v/2,d.y-v/2-t/2);a.lineTo(d.x-v/2-3*t/2,d.y-3*v/2+t/2);a.stroke()}});mxMarker.addMarker("circle",Ba);mxMarker.addMarker("circlePlus",function(a,c,b,d,f,g,e,k,p,m){var t=d.clone(),v=Ba.apply(this,arguments),r=f*(e+2*p),h=g*(e+2*p);return function(){v.apply(this,arguments);a.begin();a.moveTo(t.x-f*p,t.y-g*p);a.lineTo(t.x-2*r+f*p,t.y-2*h+g*p);a.moveTo(t.x-r-h+g*p,t.y-h+r-f*p);a.lineTo(t.x+h-r-g*p,t.y-h-r+f*p);a.stroke()}});mxMarker.addMarker("async",function(a,c,b,d,f,g,e,
+k,p,m){c=f*p*1.118;b=g*p*1.118;f*=e+p;g*=e+p;var t=d.clone();t.x-=c;t.y-=b;d.x+=1*-f-c;d.y+=1*-g-b;return function(){a.begin();a.moveTo(t.x,t.y);k?a.lineTo(t.x-f-g/2,t.y-g+f/2):a.lineTo(t.x+g/2-f,t.y-g-f/2);a.lineTo(t.x-f,t.y-g);a.close();m?a.fillAndStroke():a.stroke()}});mxMarker.addMarker("openAsync",function(a){a=null!=a?a:2;return function(c,b,d,f,g,e,k,p,m,t){g*=k+m;e*=k+m;var v=f.clone();return function(){c.begin();c.moveTo(v.x,v.y);p?c.lineTo(v.x-g-e/a,v.y-e+g/a):c.lineTo(v.x+e/a-g,v.y-e-g/
+a);c.stroke()}}}(2));if("undefined"!==typeof mxVertexHandler){var Da=function(a,c,b){return ra(a,["width"],c,function(c,d,f,g,e){e=a.shape.getEdgeWidth()*a.view.scale+b;return new mxPoint(g.x+d*c/4+f*e/2,g.y+f*c/4-d*e/2)},function(c,d,f,g,e,k){c=Math.sqrt(mxUtils.ptSegDistSq(g.x,g.y,e.x,e.y,k.x,k.y));a.style.width=Math.round(2*c)/a.view.scale-b})},ra=function(a,c,b,d,f){var g=a.absolutePoints,e=g.length-1,k=a.view.translate,p=a.view.scale,m=b?g[0]:g[e],t=b?g[1]:g[e-1],v=t.x-m.x,r=t.y-m.y,h=Math.sqrt(v*
+v+r*r);return N(a,c,function(a){a=d.call(this,h,v/h,r/h,m,t);return new mxPoint(a.x/p-k.x,a.y/p-k.y)},function(a,c,b){a=Math.sqrt(v*v+r*r);c.x=(c.x+k.x)*p;c.y=(c.y+k.y)*p;f.call(this,a,v/a,r/a,m,t,c,b)})},ia=function(a){return function(c){return[N(c,["arrowWidth","arrowSize"],function(c){var b=Math.max(0,Math.min(1,mxUtils.getValue(this.state.style,"arrowWidth",K.prototype.arrowWidth))),d=Math.max(0,Math.min(a,mxUtils.getValue(this.state.style,"arrowSize",K.prototype.arrowSize)));return new mxPoint(c.x+
+(1-d)*c.width,c.y+(1-b)*c.height/2)},function(c,b){this.state.style.arrowWidth=Math.max(0,Math.min(1,Math.abs(c.y+c.height/2-b.y)/c.height*2));this.state.style.arrowSize=Math.max(0,Math.min(a,(c.x+c.width-b.x)/c.width))})]}},za=function(a,c,b){return function(d){var f=[N(d,["size"],function(b){var d=Math.max(0,Math.min(b.width,Math.min(b.height,parseFloat(mxUtils.getValue(this.state.style,"size",c)))))*a;return new mxPoint(b.x+d,b.y+d)},function(c,b){this.state.style.size=Math.round(Math.max(0,Math.min(Math.min(c.width,
+b.x-c.x),Math.min(c.height,b.y-c.y)))/a)})];b&&mxUtils.getValue(d.style,mxConstants.STYLE_ROUNDED,!1)&&f.push(fa(d));return f}},va=function(a,c,b,d){b=null!=b?b:1;return function(f){var g=[N(f,["size"],function(c){var b=parseFloat(mxUtils.getValue(this.state.style,"size",a));return new mxPoint(c.x+b*c.width,c.getCenterY())},function(a,c){this.state.style.size=Math.max(0,Math.min(b,(c.x-a.x)/a.width))},null,d)];c&&mxUtils.getValue(f.style,mxConstants.STYLE_ROUNDED,!1)&&g.push(fa(f));return g}},Ea=
+function(a){return function(c){var b=[N(c,["size"],function(c){var b=Math.max(0,Math.min(a,parseFloat(mxUtils.getValue(this.state.style,"size",p.prototype.size))));return new mxPoint(c.x+b*c.width*.75,c.y+c.height/4)},function(c,b){this.state.style.size=Math.max(0,Math.min(a,(b.x-c.x)/(.75*c.width)))},null,!0)];mxUtils.getValue(c.style,mxConstants.STYLE_ROUNDED,!1)&&b.push(fa(c));return b}},sa=function(){return function(a){var c=[];mxUtils.getValue(a.style,mxConstants.STYLE_ROUNDED,!1)&&c.push(fa(a));
+return c}},fa=function(a,c){return N(a,[mxConstants.STYLE_ARCSIZE],function(b){var d=null!=c?c:b.height/8;if("1"==mxUtils.getValue(a.style,mxConstants.STYLE_ABSOLUTE_ARCSIZE,0)){var f=mxUtils.getValue(a.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;return new mxPoint(b.x+b.width-Math.min(b.width/2,f),b.y+d)}f=Math.max(0,parseFloat(mxUtils.getValue(a.style,mxConstants.STYLE_ARCSIZE,100*mxConstants.RECTANGLE_ROUNDING_FACTOR)))/100;return new mxPoint(b.x+b.width-Math.min(Math.max(b.width/
+2,b.height/2),Math.min(b.width,b.height)*f),b.y+d)},function(c,b,d){"1"==mxUtils.getValue(a.style,mxConstants.STYLE_ABSOLUTE_ARCSIZE,0)?this.state.style[mxConstants.STYLE_ARCSIZE]=Math.round(Math.max(0,Math.min(c.width,2*(c.x+c.width-b.x)))):this.state.style[mxConstants.STYLE_ARCSIZE]=Math.round(Math.min(50,Math.max(0,100*(c.width-b.x+c.x)/Math.min(c.width,c.height))))})},N=function(a,c,b,d,f,g){var e=new mxHandle(a,null,mxVertexHandler.prototype.secondaryHandleImage);e.execute=function(){for(var a=
+0;a<c.length;a++)this.copyStyle(c[a])};e.getPosition=b;e.setPosition=d;e.ignoreGrid=null!=f?f:!0;if(g){var k=e.positionChanged;e.positionChanged=function(){k.apply(this,arguments);a.view.invalidate(this.state.cell);a.view.validate()}}return e},Aa={link:function(a){return[Da(a,!0,10),Da(a,!1,10)]},flexArrow:function(a){var c=a.view.graph.gridSize/a.view.scale,b=[];mxUtils.getValue(a.style,mxConstants.STYLE_STARTARROW,mxConstants.NONE)!=mxConstants.NONE&&(b.push(ra(a,["width",mxConstants.STYLE_STARTSIZE,
+mxConstants.STYLE_ENDSIZE],!0,function(c,b,d,f,g){c=(a.shape.getEdgeWidth()-a.shape.strokewidth)*a.view.scale;g=3*mxUtils.getNumber(a.style,mxConstants.STYLE_STARTSIZE,mxConstants.ARROW_SIZE/5)*a.view.scale;return new mxPoint(f.x+b*(g+a.shape.strokewidth*a.view.scale)+d*c/2,f.y+d*(g+a.shape.strokewidth*a.view.scale)-b*c/2)},function(b,d,f,g,e,k,p){b=Math.sqrt(mxUtils.ptSegDistSq(g.x,g.y,e.x,e.y,k.x,k.y));d=mxUtils.ptLineDist(g.x,g.y,g.x+f,g.y-d,k.x,k.y);a.style[mxConstants.STYLE_STARTSIZE]=Math.round(100*
+(d-a.shape.strokewidth)/3)/100/a.view.scale;a.style.width=Math.round(2*b)/a.view.scale;mxEvent.isControlDown(p.getEvent())&&(a.style[mxConstants.STYLE_ENDSIZE]=a.style[mxConstants.STYLE_STARTSIZE]);mxEvent.isAltDown(p.getEvent())||Math.abs(parseFloat(a.style[mxConstants.STYLE_STARTSIZE])-parseFloat(a.style[mxConstants.STYLE_ENDSIZE]))<c/6&&(a.style[mxConstants.STYLE_STARTSIZE]=a.style[mxConstants.STYLE_ENDSIZE])})),b.push(ra(a,["startWidth","endWidth",mxConstants.STYLE_STARTSIZE,mxConstants.STYLE_ENDSIZE],
+!0,function(c,b,d,f,g){c=(a.shape.getStartArrowWidth()-a.shape.strokewidth)*a.view.scale;g=3*mxUtils.getNumber(a.style,mxConstants.STYLE_STARTSIZE,mxConstants.ARROW_SIZE/5)*a.view.scale;return new mxPoint(f.x+b*(g+a.shape.strokewidth*a.view.scale)+d*c/2,f.y+d*(g+a.shape.strokewidth*a.view.scale)-b*c/2)},function(b,d,f,g,e,k,p){b=Math.sqrt(mxUtils.ptSegDistSq(g.x,g.y,e.x,e.y,k.x,k.y));d=mxUtils.ptLineDist(g.x,g.y,g.x+f,g.y-d,k.x,k.y);a.style[mxConstants.STYLE_STARTSIZE]=Math.round(100*(d-a.shape.strokewidth)/
+3)/100/a.view.scale;a.style.startWidth=Math.max(0,Math.round(2*b)-a.shape.getEdgeWidth())/a.view.scale;mxEvent.isControlDown(p.getEvent())&&(a.style[mxConstants.STYLE_ENDSIZE]=a.style[mxConstants.STYLE_STARTSIZE],a.style.endWidth=a.style.startWidth);mxEvent.isAltDown(p.getEvent())||(Math.abs(parseFloat(a.style[mxConstants.STYLE_STARTSIZE])-parseFloat(a.style[mxConstants.STYLE_ENDSIZE]))<c/6&&(a.style[mxConstants.STYLE_STARTSIZE]=a.style[mxConstants.STYLE_ENDSIZE]),Math.abs(parseFloat(a.style.startWidth)-
+parseFloat(a.style.endWidth))<c&&(a.style.startWidth=a.style.endWidth))})));mxUtils.getValue(a.style,mxConstants.STYLE_ENDARROW,mxConstants.NONE)!=mxConstants.NONE&&(b.push(ra(a,["width",mxConstants.STYLE_STARTSIZE,mxConstants.STYLE_ENDSIZE],!1,function(c,b,d,f,g){c=(a.shape.getEdgeWidth()-a.shape.strokewidth)*a.view.scale;g=3*mxUtils.getNumber(a.style,mxConstants.STYLE_ENDSIZE,mxConstants.ARROW_SIZE/5)*a.view.scale;return new mxPoint(f.x+b*(g+a.shape.strokewidth*a.view.scale)-d*c/2,f.y+d*(g+a.shape.strokewidth*
+a.view.scale)+b*c/2)},function(b,d,f,g,e,k,p){b=Math.sqrt(mxUtils.ptSegDistSq(g.x,g.y,e.x,e.y,k.x,k.y));d=mxUtils.ptLineDist(g.x,g.y,g.x+f,g.y-d,k.x,k.y);a.style[mxConstants.STYLE_ENDSIZE]=Math.round(100*(d-a.shape.strokewidth)/3)/100/a.view.scale;a.style.width=Math.round(2*b)/a.view.scale;mxEvent.isControlDown(p.getEvent())&&(a.style[mxConstants.STYLE_STARTSIZE]=a.style[mxConstants.STYLE_ENDSIZE]);mxEvent.isAltDown(p.getEvent())||Math.abs(parseFloat(a.style[mxConstants.STYLE_ENDSIZE])-parseFloat(a.style[mxConstants.STYLE_STARTSIZE]))<
+c/6&&(a.style[mxConstants.STYLE_ENDSIZE]=a.style[mxConstants.STYLE_STARTSIZE])})),b.push(ra(a,["startWidth","endWidth",mxConstants.STYLE_STARTSIZE,mxConstants.STYLE_ENDSIZE],!1,function(c,b,d,f,g){c=(a.shape.getEndArrowWidth()-a.shape.strokewidth)*a.view.scale;g=3*mxUtils.getNumber(a.style,mxConstants.STYLE_ENDSIZE,mxConstants.ARROW_SIZE/5)*a.view.scale;return new mxPoint(f.x+b*(g+a.shape.strokewidth*a.view.scale)-d*c/2,f.y+d*(g+a.shape.strokewidth*a.view.scale)+b*c/2)},function(b,d,f,g,e,k,p){b=
+Math.sqrt(mxUtils.ptSegDistSq(g.x,g.y,e.x,e.y,k.x,k.y));d=mxUtils.ptLineDist(g.x,g.y,g.x+f,g.y-d,k.x,k.y);a.style[mxConstants.STYLE_ENDSIZE]=Math.round(100*(d-a.shape.strokewidth)/3)/100/a.view.scale;a.style.endWidth=Math.max(0,Math.round(2*b)-a.shape.getEdgeWidth())/a.view.scale;mxEvent.isControlDown(p.getEvent())&&(a.style[mxConstants.STYLE_STARTSIZE]=a.style[mxConstants.STYLE_ENDSIZE],a.style.startWidth=a.style.endWidth);mxEvent.isAltDown(p.getEvent())||(Math.abs(parseFloat(a.style[mxConstants.STYLE_ENDSIZE])-
+parseFloat(a.style[mxConstants.STYLE_STARTSIZE]))<c/6&&(a.style[mxConstants.STYLE_ENDSIZE]=a.style[mxConstants.STYLE_STARTSIZE]),Math.abs(parseFloat(a.style.endWidth)-parseFloat(a.style.startWidth))<c&&(a.style.endWidth=a.style.startWidth))})));return b},swimlane:function(a){var c=[N(a,[mxConstants.STYLE_STARTSIZE],function(c){var b=parseFloat(mxUtils.getValue(a.style,mxConstants.STYLE_STARTSIZE,mxConstants.DEFAULT_STARTSIZE));return 1==mxUtils.getValue(a.style,mxConstants.STYLE_HORIZONTAL,1)?new mxPoint(c.getCenterX(),
+c.y+Math.max(0,Math.min(c.height,b))):new mxPoint(c.x+Math.max(0,Math.min(c.width,b)),c.getCenterY())},function(c,b){a.style[mxConstants.STYLE_STARTSIZE]=1==mxUtils.getValue(this.state.style,mxConstants.STYLE_HORIZONTAL,1)?Math.round(Math.max(0,Math.min(c.height,b.y-c.y))):Math.round(Math.max(0,Math.min(c.width,b.x-c.x)))})];if(mxUtils.getValue(a.style,mxConstants.STYLE_ROUNDED)){var b=parseFloat(mxUtils.getValue(a.style,mxConstants.STYLE_STARTSIZE,mxConstants.DEFAULT_STARTSIZE));c.push(fa(a,b/2))}return c},
+label:sa(),ext:sa(),rectangle:sa(),triangle:sa(),rhombus:sa(),umlLifeline:function(a){return[N(a,["size"],function(a){var c=Math.max(0,Math.min(a.height,parseFloat(mxUtils.getValue(this.state.style,"size",J.prototype.size))));return new mxPoint(a.getCenterX(),a.y+c)},function(a,c){this.state.style.size=Math.round(Math.max(0,Math.min(a.height,c.y-a.y)))},!1)]},umlFrame:function(a){return[N(a,["width","height"],function(a){var c=Math.max(F.prototype.corner,Math.min(a.width,mxUtils.getValue(this.state.style,
+"width",F.prototype.width))),b=Math.max(1.5*F.prototype.corner,Math.min(a.height,mxUtils.getValue(this.state.style,"height",F.prototype.height)));return new mxPoint(a.x+c,a.y+b)},function(a,c){this.state.style.width=Math.round(Math.max(F.prototype.corner,Math.min(a.width,c.x-a.x)));this.state.style.height=Math.round(Math.max(1.5*F.prototype.corner,Math.min(a.height,c.y-a.y)))},!1)]},process:function(a){var c=[N(a,["size"],function(a){var c=Math.max(0,Math.min(.5,parseFloat(mxUtils.getValue(this.state.style,
+"size",k.prototype.size))));return new mxPoint(a.x+a.width*c,a.y+a.height/4)},function(a,c){this.state.style.size=Math.max(0,Math.min(.5,(c.x-a.x)/a.width))})];mxUtils.getValue(a.style,mxConstants.STYLE_ROUNDED,!1)&&c.push(fa(a));return c},cross:function(a){return[N(a,["size"],function(a){var c=Math.min(a.width,a.height),c=Math.max(0,Math.min(1,mxUtils.getValue(this.state.style,"size",na.prototype.size)))*c/2;return new mxPoint(a.getCenterX()-c,a.getCenterY()-c)},function(a,c){var b=Math.min(a.width,
+a.height);this.state.style.size=Math.max(0,Math.min(1,Math.min(Math.max(0,a.getCenterY()-c.y)/b*2,Math.max(0,a.getCenterX()-c.x)/b*2)))})]},note:function(a){return[N(a,["size"],function(a){var c=Math.max(0,Math.min(a.width,Math.min(a.height,parseFloat(mxUtils.getValue(this.state.style,"size",h.prototype.size)))));return new mxPoint(a.x+a.width-c,a.y+c)},function(a,c){this.state.style.size=Math.round(Math.max(0,Math.min(Math.min(a.width,a.x+a.width-c.x),Math.min(a.height,c.y-a.y))))})]},manualInput:function(a){var c=
+[N(a,["size"],function(a){var c=Math.max(0,Math.min(a.height,mxUtils.getValue(this.state.style,"size",G.prototype.size)));return new mxPoint(a.x+a.width/4,a.y+3*c/4)},function(a,c){this.state.style.size=Math.round(Math.max(0,Math.min(a.height,4*(c.y-a.y)/3)))})];mxUtils.getValue(a.style,mxConstants.STYLE_ROUNDED,!1)&&c.push(fa(a));return c},dataStorage:function(a){return[N(a,["size"],function(a){var c=Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.state.style,"size",W.prototype.size))));return new mxPoint(a.x+
+(1-c)*a.width,a.getCenterY())},function(a,c){this.state.style.size=Math.max(0,Math.min(1,(a.x+a.width-c.x)/a.width))})]},callout:function(a){var c=[N(a,["size","position"],function(a){var c=Math.max(0,Math.min(a.height,mxUtils.getValue(this.state.style,"size",t.prototype.size))),b=Math.max(0,Math.min(1,mxUtils.getValue(this.state.style,"position",t.prototype.position)));mxUtils.getValue(this.state.style,"base",t.prototype.base);return new mxPoint(a.x+b*a.width,a.y+a.height-c)},function(a,c){mxUtils.getValue(this.state.style,
+"base",t.prototype.base);this.state.style.size=Math.round(Math.max(0,Math.min(a.height,a.y+a.height-c.y)));this.state.style.position=Math.round(100*Math.max(0,Math.min(1,(c.x-a.x)/a.width)))/100}),N(a,["position2"],function(a){var c=Math.max(0,Math.min(1,mxUtils.getValue(this.state.style,"position2",t.prototype.position2)));return new mxPoint(a.x+c*a.width,a.y+a.height)},function(a,c){this.state.style.position2=Math.round(100*Math.max(0,Math.min(1,(c.x-a.x)/a.width)))/100}),N(a,["base"],function(a){var c=
+Math.max(0,Math.min(a.height,mxUtils.getValue(this.state.style,"size",t.prototype.size))),b=Math.max(0,Math.min(1,mxUtils.getValue(this.state.style,"position",t.prototype.position))),d=Math.max(0,Math.min(a.width,mxUtils.getValue(this.state.style,"base",t.prototype.base)));return new mxPoint(a.x+Math.min(a.width,b*a.width+d),a.y+a.height-c)},function(a,c){var b=Math.max(0,Math.min(1,mxUtils.getValue(this.state.style,"position",t.prototype.position)));this.state.style.base=Math.round(Math.max(0,Math.min(a.width,
+c.x-a.x-b*a.width)))})];mxUtils.getValue(a.style,mxConstants.STYLE_ROUNDED,!1)&&c.push(fa(a));return c},internalStorage:function(a){var c=[N(a,["dx","dy"],function(a){var c=Math.max(0,Math.min(a.width,mxUtils.getValue(this.state.style,"dx",V.prototype.dx))),b=Math.max(0,Math.min(a.height,mxUtils.getValue(this.state.style,"dy",V.prototype.dy)));return new mxPoint(a.x+c,a.y+b)},function(a,c){this.state.style.dx=Math.round(Math.max(0,Math.min(a.width,c.x-a.x)));this.state.style.dy=Math.round(Math.max(0,
+Math.min(a.height,c.y-a.y)))})];mxUtils.getValue(a.style,mxConstants.STYLE_ROUNDED,!1)&&c.push(fa(a));return c},corner:function(a){return[N(a,["dx","dy"],function(a){var c=Math.max(0,Math.min(a.width,mxUtils.getValue(this.state.style,"dx",M.prototype.dx))),b=Math.max(0,Math.min(a.height,mxUtils.getValue(this.state.style,"dy",M.prototype.dy)));return new mxPoint(a.x+c,a.y+b)},function(a,c){this.state.style.dx=Math.round(Math.max(0,Math.min(a.width,c.x-a.x)));this.state.style.dy=Math.round(Math.max(0,
+Math.min(a.height,c.y-a.y)))})]},tee:function(a){return[N(a,["dx","dy"],function(a){var c=Math.max(0,Math.min(a.width,mxUtils.getValue(this.state.style,"dx",T.prototype.dx))),b=Math.max(0,Math.min(a.height,mxUtils.getValue(this.state.style,"dy",T.prototype.dy)));return new mxPoint(a.x+(a.width+c)/2,a.y+b)},function(a,c){this.state.style.dx=Math.round(Math.max(0,2*Math.min(a.width/2,c.x-a.x-a.width/2)));this.state.style.dy=Math.round(Math.max(0,Math.min(a.height,c.y-a.y)))})]},singleArrow:ia(1),doubleArrow:ia(.5),
+folder:function(a){return[N(a,["tabWidth","tabHeight"],function(a){var c=Math.max(0,Math.min(a.width,mxUtils.getValue(this.state.style,"tabWidth",n.prototype.tabWidth))),b=Math.max(0,Math.min(a.height,mxUtils.getValue(this.state.style,"tabHeight",n.prototype.tabHeight)));mxUtils.getValue(this.state.style,"tabPosition",n.prototype.tabPosition)==mxConstants.ALIGN_RIGHT&&(c=a.width-c);return new mxPoint(a.x+c,a.y+b)},function(a,c){var b=Math.max(0,Math.min(a.width,c.x-a.x));mxUtils.getValue(this.state.style,
+"tabPosition",n.prototype.tabPosition)==mxConstants.ALIGN_RIGHT&&(b=a.width-b);this.state.style.tabWidth=Math.round(b);this.state.style.tabHeight=Math.round(Math.max(0,Math.min(a.height,c.y-a.y)))})]},document:function(a){return[N(a,["size"],function(a){var c=Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.state.style,"size",f.prototype.size))));return new mxPoint(a.x+3*a.width/4,a.y+(1-c)*a.height)},function(a,c){this.state.style.size=Math.max(0,Math.min(1,(a.y+a.height-c.y)/a.height))})]},
+tape:function(a){return[N(a,["size"],function(a){var b=Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.state.style,"size",c.prototype.size))));return new mxPoint(a.getCenterX(),a.y+b*a.height/2)},function(a,c){this.state.style.size=Math.max(0,Math.min(1,(c.y-a.y)/a.height*2))})]},offPageConnector:function(a){return[N(a,["size"],function(a){var c=Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.state.style,"size",ca.prototype.size))));return new mxPoint(a.getCenterX(),a.y+(1-c)*a.height)},
+function(a,c){this.state.style.size=Math.max(0,Math.min(1,(a.y+a.height-c.y)/a.height))})]},step:va(x.prototype.size,!0,null,!0),hexagon:va(w.prototype.size,!0,.5,!0),curlyBracket:va(m.prototype.size,!1),display:va(oa.prototype.size,!1),cube:za(1,a.prototype.size,!1),card:za(.5,q.prototype.size,!0),loopLimit:za(.5,Z.prototype.size,!0),trapezoid:Ea(.5),parallelogram:Ea(1)};Graph.createHandle=N;Graph.handleFactory=Aa;mxVertexHandler.prototype.createCustomHandles=function(){if(1==this.state.view.graph.getSelectionCount()&&
+this.graph.isCellRotatable(this.state.cell)){var a=this.state.style.shape;null==this.state.view.graph.cellRenderer.defaultShapes[a]&&null==mxStencilRegistry.getStencil(a)&&(a=mxConstants.SHAPE_RECTANGLE);a=Aa[a];if(null!=a)return a(this.state)}return null};mxEdgeHandler.prototype.createCustomHandles=function(){if(1==this.state.view.graph.getSelectionCount()){var a=this.state.style.shape;null==this.state.view.graph.cellRenderer.defaultShapes[a]&&null==mxStencilRegistry.getStencil(a)&&(a=mxConstants.SHAPE_CONNECTOR);
+a=Aa[a];if(null!=a)return a(this.state)}return null}}else Graph.createHandle=function(){},Graph.handleFactory={};var wa=new mxPoint(1,0),xa=new mxPoint(1,0),ia=mxUtils.toRadians(-30),wa=mxUtils.getRotatedPoint(wa,Math.cos(ia),Math.sin(ia)),ia=mxUtils.toRadians(-150),xa=mxUtils.getRotatedPoint(xa,Math.cos(ia),Math.sin(ia));mxEdgeStyle.IsometricConnector=function(a,c,b,d,f){var g=a.view;d=null!=d&&0<d.length?d[0]:null;var e=a.absolutePoints,k=e[0],e=e[e.length-1];null!=d&&(d=g.transformControlPoint(a,
+d));null==k&&null!=c&&(k=new mxPoint(c.getCenterX(),c.getCenterY()));null==e&&null!=b&&(e=new mxPoint(b.getCenterX(),b.getCenterY()));var p=wa.x,m=wa.y,t=xa.x,v=xa.y,r="horizontal"==mxUtils.getValue(a.style,"elbow","horizontal");if(null!=e&&null!=k){a=function(a,c,b){a-=h.x;var d=c-h.y;c=(v*a-t*d)/(p*v-m*t);a=(m*a-p*d)/(m*t-p*v);r?(b&&(h=new mxPoint(h.x+p*c,h.y+m*c),f.push(h)),h=new mxPoint(h.x+t*a,h.y+v*a)):(b&&(h=new mxPoint(h.x+t*a,h.y+v*a),f.push(h)),h=new mxPoint(h.x+p*c,h.y+m*c));f.push(h)};
+var h=k;null==d&&(d=new mxPoint(k.x+(e.x-k.x)/2,k.y+(e.y-k.y)/2));a(d.x,d.y,!0);a(e.x,e.y,!1)}};mxStyleRegistry.putValue("isometricEdgeStyle",mxEdgeStyle.IsometricConnector);var Ja=Graph.prototype.createEdgeHandler;Graph.prototype.createEdgeHandler=function(a,c){if(c==mxEdgeStyle.IsometricConnector){var b=new mxElbowEdgeHandler(a);b.snapToTerminals=!1;return b}return Ja.apply(this,arguments)};b.prototype.constraints=[];e.prototype.constraints=[];t.prototype.constraints=[];mxRectangleShape.prototype.constraints=
+[new mxConnectionConstraint(new mxPoint(.25,0),!0),new mxConnectionConstraint(new mxPoint(.5,0),!0),new mxConnectionConstraint(new mxPoint(.75,0),!0),new mxConnectionConstraint(new mxPoint(0,.25),!0),new mxConnectionConstraint(new mxPoint(0,.5),!0),new mxConnectionConstraint(new mxPoint(0,.75),!0),new mxConnectionConstraint(new mxPoint(1,.25),!0),new mxConnectionConstraint(new mxPoint(1,.5),!0),new mxConnectionConstraint(new mxPoint(1,.75),!0),new mxConnectionConstraint(new mxPoint(.25,1),!0),new mxConnectionConstraint(new mxPoint(.5,
+1),!0),new mxConnectionConstraint(new mxPoint(.75,1),!0)];mxEllipse.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,0),!0),new mxConnectionConstraint(new mxPoint(1,0),!0),new mxConnectionConstraint(new mxPoint(0,1),!0),new mxConnectionConstraint(new mxPoint(1,1),!0),new mxConnectionConstraint(new mxPoint(.5,0),!0),new mxConnectionConstraint(new mxPoint(.5,1),!0),new mxConnectionConstraint(new mxPoint(0,.5),!0),new mxConnectionConstraint(new mxPoint(1,.5))];mxLabel.prototype.constraints=
+mxRectangleShape.prototype.constraints;mxImageShape.prototype.constraints=mxRectangleShape.prototype.constraints;mxSwimlane.prototype.constraints=mxRectangleShape.prototype.constraints;D.prototype.constraints=mxRectangleShape.prototype.constraints;h.prototype.constraints=mxRectangleShape.prototype.constraints;q.prototype.constraints=mxRectangleShape.prototype.constraints;a.prototype.constraints=mxRectangleShape.prototype.constraints;n.prototype.constraints=mxRectangleShape.prototype.constraints;V.prototype.constraints=
+mxRectangleShape.prototype.constraints;W.prototype.constraints=mxRectangleShape.prototype.constraints;da.prototype.constraints=mxEllipse.prototype.constraints;ma.prototype.constraints=mxEllipse.prototype.constraints;aa.prototype.constraints=mxEllipse.prototype.constraints;ta.prototype.constraints=mxEllipse.prototype.constraints;G.prototype.constraints=mxRectangleShape.prototype.constraints;ua.prototype.constraints=mxRectangleShape.prototype.constraints;oa.prototype.constraints=mxRectangleShape.prototype.constraints;
+Z.prototype.constraints=mxRectangleShape.prototype.constraints;ca.prototype.constraints=mxRectangleShape.prototype.constraints;mxCylinder.prototype.constraints=[new mxConnectionConstraint(new mxPoint(.15,.05),!1),new mxConnectionConstraint(new mxPoint(.5,0),!0),new mxConnectionConstraint(new mxPoint(.85,.05),!1),new mxConnectionConstraint(new mxPoint(0,.3),!0),new mxConnectionConstraint(new mxPoint(0,.5),!0),new mxConnectionConstraint(new mxPoint(0,.7),!0),new mxConnectionConstraint(new mxPoint(1,
+.3),!0),new mxConnectionConstraint(new mxPoint(1,.5),!0),new mxConnectionConstraint(new mxPoint(1,.7),!0),new mxConnectionConstraint(new mxPoint(.15,.95),!1),new mxConnectionConstraint(new mxPoint(.5,1),!0),new mxConnectionConstraint(new mxPoint(.85,.95),!1)];C.prototype.constraints=[new mxConnectionConstraint(new mxPoint(.25,.1),!1),new mxConnectionConstraint(new mxPoint(.5,0),!1),new mxConnectionConstraint(new mxPoint(.75,.1),!1),new mxConnectionConstraint(new mxPoint(0,1/3),!1),new mxConnectionConstraint(new mxPoint(0,
+1),!1),new mxConnectionConstraint(new mxPoint(1,1/3),!1),new mxConnectionConstraint(new mxPoint(1,1),!1),new mxConnectionConstraint(new mxPoint(.5,.5),!1)];I.prototype.constraints=[new mxConnectionConstraint(new mxPoint(.25,0),!0),new mxConnectionConstraint(new mxPoint(.5,0),!0),new mxConnectionConstraint(new mxPoint(.75,0),!0),new mxConnectionConstraint(new mxPoint(0,.3),!0),new mxConnectionConstraint(new mxPoint(0,.7),!0),new mxConnectionConstraint(new mxPoint(1,.25),!0),new mxConnectionConstraint(new mxPoint(1,
+.5),!0),new mxConnectionConstraint(new mxPoint(1,.75),!0),new mxConnectionConstraint(new mxPoint(.25,1),!0),new mxConnectionConstraint(new mxPoint(.5,1),!0),new mxConnectionConstraint(new mxPoint(.75,1),!0)];mxActor.prototype.constraints=[new mxConnectionConstraint(new mxPoint(.5,0),!0),new mxConnectionConstraint(new mxPoint(.25,.2),!1),new mxConnectionConstraint(new mxPoint(.1,.5),!1),new mxConnectionConstraint(new mxPoint(0,.75),!0),new mxConnectionConstraint(new mxPoint(.75,.25),!1),new mxConnectionConstraint(new mxPoint(.9,
+.5),!1),new mxConnectionConstraint(new mxPoint(1,.75),!0),new mxConnectionConstraint(new mxPoint(.25,1),!0),new mxConnectionConstraint(new mxPoint(.5,1),!0),new mxConnectionConstraint(new mxPoint(.75,1),!0)];l.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,0),!1),new mxConnectionConstraint(new mxPoint(.5,.25),!1),new mxConnectionConstraint(new mxPoint(1,0),!1),new mxConnectionConstraint(new mxPoint(.25,.5),!1),new mxConnectionConstraint(new mxPoint(.75,.5),!1),new mxConnectionConstraint(new mxPoint(0,
+1),!1),new mxConnectionConstraint(new mxPoint(.5,.75),!1),new mxConnectionConstraint(new mxPoint(1,1),!1)];c.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,.35),!1),new mxConnectionConstraint(new mxPoint(0,.5),!1),new mxConnectionConstraint(new mxPoint(0,.65),!1),new mxConnectionConstraint(new mxPoint(1,.35),!1),new mxConnectionConstraint(new mxPoint(1,.5),!1),new mxConnectionConstraint(new mxPoint(1,.65),!1),new mxConnectionConstraint(new mxPoint(.25,1),!1),new mxConnectionConstraint(new mxPoint(.75,
+0),!1)];x.prototype.constraints=[new mxConnectionConstraint(new mxPoint(.25,0),!0),new mxConnectionConstraint(new mxPoint(.5,0),!0),new mxConnectionConstraint(new mxPoint(.75,0),!0),new mxConnectionConstraint(new mxPoint(.25,1),!0),new mxConnectionConstraint(new mxPoint(.5,1),!0),new mxConnectionConstraint(new mxPoint(.75,1),!0),new mxConnectionConstraint(new mxPoint(.1,.25),!0),new mxConnectionConstraint(new mxPoint(.2,.5),!0),new mxConnectionConstraint(new mxPoint(.1,.75),!0),new mxConnectionConstraint(new mxPoint(.9,
+.25),!0),new mxConnectionConstraint(new mxPoint(1,.5),!0),new mxConnectionConstraint(new mxPoint(.9,.75),!0)];mxLine.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,.5),!1),new mxConnectionConstraint(new mxPoint(.25,.5),!1),new mxConnectionConstraint(new mxPoint(.75,.5),!1),new mxConnectionConstraint(new mxPoint(1,.5),!1)];R.prototype.constraints=[new mxConnectionConstraint(new mxPoint(.5,0),!1),new mxConnectionConstraint(new mxPoint(.5,1),!1)];mxDoubleEllipse.prototype.constraints=
+mxEllipse.prototype.constraints;mxRhombus.prototype.constraints=mxEllipse.prototype.constraints;mxTriangle.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,.25),!0),new mxConnectionConstraint(new mxPoint(0,.5),!0),new mxConnectionConstraint(new mxPoint(0,.75),!0),new mxConnectionConstraint(new mxPoint(.5,0),!0),new mxConnectionConstraint(new mxPoint(.5,1),!0),new mxConnectionConstraint(new mxPoint(1,.5),!0)];mxHexagon.prototype.constraints=[new mxConnectionConstraint(new mxPoint(.375,
+0),!0),new mxConnectionConstraint(new mxPoint(.5,0),!0),new mxConnectionConstraint(new mxPoint(.625,0),!0),new mxConnectionConstraint(new mxPoint(.125,.25),!0),new mxConnectionConstraint(new mxPoint(0,.5),!0),new mxConnectionConstraint(new mxPoint(.125,.75),!0),new mxConnectionConstraint(new mxPoint(.875,.25),!0),new mxConnectionConstraint(new mxPoint(0,.5),!0),new mxConnectionConstraint(new mxPoint(1,.5),!0),new mxConnectionConstraint(new mxPoint(.875,.75),!0),new mxConnectionConstraint(new mxPoint(.375,
+1),!0),new mxConnectionConstraint(new mxPoint(.5,1),!0),new mxConnectionConstraint(new mxPoint(.625,1),!0)];mxCloud.prototype.constraints=[new mxConnectionConstraint(new mxPoint(.25,.25),!1),new mxConnectionConstraint(new mxPoint(.4,.1),!1),new mxConnectionConstraint(new mxPoint(.16,.55),!1),new mxConnectionConstraint(new mxPoint(.07,.4),!1),new mxConnectionConstraint(new mxPoint(.31,.8),!1),new mxConnectionConstraint(new mxPoint(.13,.77),!1),new mxConnectionConstraint(new mxPoint(.8,.8),!1),new mxConnectionConstraint(new mxPoint(.55,
+.95),!1),new mxConnectionConstraint(new mxPoint(.875,.5),!1),new mxConnectionConstraint(new mxPoint(.96,.7),!1),new mxConnectionConstraint(new mxPoint(.625,.2),!1),new mxConnectionConstraint(new mxPoint(.88,.25),!1)];g.prototype.constraints=mxRectangleShape.prototype.constraints;p.prototype.constraints=mxRectangleShape.prototype.constraints;f.prototype.constraints=[new mxConnectionConstraint(new mxPoint(.25,0),!0),new mxConnectionConstraint(new mxPoint(.5,0),!0),new mxConnectionConstraint(new mxPoint(.75,
+0),!0),new mxConnectionConstraint(new mxPoint(0,.25),!0),new mxConnectionConstraint(new mxPoint(0,.5),!0),new mxConnectionConstraint(new mxPoint(0,.75),!0),new mxConnectionConstraint(new mxPoint(1,.25),!0),new mxConnectionConstraint(new mxPoint(1,.5),!0),new mxConnectionConstraint(new mxPoint(1,.75),!0)];mxArrow.prototype.constraints=null;T.prototype.constraints=null;M.prototype.constraints=null;Y.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,0),!1),new mxConnectionConstraint(new mxPoint(0,
+.5),!1),new mxConnectionConstraint(new mxPoint(0,1),!1),new mxConnectionConstraint(new mxPoint(.25,.5),!1),new mxConnectionConstraint(new mxPoint(.5,.5),!1),new mxConnectionConstraint(new mxPoint(.75,.5),!1),new mxConnectionConstraint(new mxPoint(1,0),!1),new mxConnectionConstraint(new mxPoint(1,.5),!1),new mxConnectionConstraint(new mxPoint(1,1),!1)];K.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,.5),!1),new mxConnectionConstraint(new mxPoint(1,.5),!1)];U.prototype.constraints=
+[new mxConnectionConstraint(new mxPoint(0,.5),!1),new mxConnectionConstraint(new mxPoint(1,.5),!1)];na.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,.5),!1),new mxConnectionConstraint(new mxPoint(1,.5),!1),new mxConnectionConstraint(new mxPoint(.5,0),!1),new mxConnectionConstraint(new mxPoint(.5,1),!1)];J.prototype.constraints=null;X.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,.25),!1),new mxConnectionConstraint(new mxPoint(0,.5),!1),new mxConnectionConstraint(new mxPoint(0,
+.75),!1),new mxConnectionConstraint(new mxPoint(1,.5),!1),new mxConnectionConstraint(new mxPoint(.7,.1),!1),new mxConnectionConstraint(new mxPoint(.7,.9),!1)];ba.prototype.constraints=[new mxConnectionConstraint(new mxPoint(.175,.25),!1),new mxConnectionConstraint(new mxPoint(.25,.5),!1),new mxConnectionConstraint(new mxPoint(.175,.75),!1),new mxConnectionConstraint(new mxPoint(1,.5),!1),new mxConnectionConstraint(new mxPoint(.7,.1),!1),new mxConnectionConstraint(new mxPoint(.7,.9),!1)]})();function Actions(a){this.editorUi=a;this.actions={};this.init()}
+Actions.prototype.init=function(){function a(a){d.escape();var c=d.getDeletableCells(d.getSelectionCells());if(null!=c&&0<c.length){var b=d.model.getParents(c);d.removeCells(c,a);if(null!=b){a=[];for(c=0;c<b.length;c++)d.model.contains(b[c])&&(d.model.isVertex(b[c])||d.model.isEdge(b[c]))&&a.push(b[c]);d.setSelectionCells(a)}}}var b=this.editorUi,e=b.editor,d=e.graph,h=function(){return Action.prototype.isEnabled.apply(this,arguments)&&d.isEnabled()};this.addAction("new...",function(){window.open(b.getUrl())});
+this.addAction("open...",function(){window.openNew=!0;window.openKey="open";b.openFile()});this.addAction("import...",function(){window.openNew=!1;window.openKey="import";window.openFile=new OpenFile(mxUtils.bind(this,function(){b.hideDialog()}));window.openFile.setConsumer(mxUtils.bind(this,function(a,c){try{var b=mxUtils.parseXml(a),d=new mxGraphModel;(new mxCodec(b)).decode(b.documentElement,d);var p=d.getChildren(d.getChildAt(d.getRoot(),0));e.graph.setSelectionCells(e.graph.importCells(p))}catch(m){mxUtils.alert(mxResources.get("invalidOrMissingFile")+
+": "+m.message)}}));b.showDialog((new OpenDialog(this)).container,320,220,!0,!0,function(){window.openFile=null})}).isEnabled=h;this.addAction("save",function(){b.saveFile(!1)},null,null,Editor.ctrlKey+"+S").isEnabled=h;this.addAction("saveAs...",function(){b.saveFile(!0)},null,null,Editor.ctrlKey+"+Shift+S").isEnabled=h;this.addAction("export...",function(){b.showDialog((new ExportDialog(b)).container,300,230,!0,!0)});this.addAction("editDiagram...",function(){var a=new EditDiagramDialog(b);b.showDialog(a.container,
+620,420,!0,!1);a.init()});this.addAction("pageSetup...",function(){b.showDialog((new PageSetupDialog(b)).container,320,220,!0,!0)}).isEnabled=h;this.addAction("print...",function(){b.showDialog((new PrintDialog(b)).container,300,180,!0,!0)},null,"sprite-print",Editor.ctrlKey+"+P");this.addAction("preview",function(){mxUtils.show(d,null,10,10)});this.addAction("undo",function(){b.undo()},null,"sprite-undo",Editor.ctrlKey+"+Z");this.addAction("redo",function(){b.redo()},null,"sprite-redo",mxClient.IS_WIN?
 Editor.ctrlKey+"+Y":Editor.ctrlKey+"+Shift+Z");this.addAction("cut",function(){mxClipboard.cut(d)},null,"sprite-cut",Editor.ctrlKey+"+X");this.addAction("copy",function(){mxClipboard.copy(d)},null,"sprite-copy",Editor.ctrlKey+"+C");this.addAction("paste",function(){d.isEnabled()&&!d.isCellLocked(d.getDefaultParent())&&mxClipboard.paste(d)},!1,"sprite-paste",Editor.ctrlKey+"+V");this.addAction("pasteHere",function(a){if(d.isEnabled()&&!d.isCellLocked(d.getDefaultParent())){d.getModel().beginUpdate();
-try{var c=mxClipboard.paste(d);if(null!=c){var b=d.getBoundingBoxFromGeometry(c);if(null!=b){var e=d.view.translate,m=d.view.scale,n=e.y,g=Math.round(d.snap(d.popupMenuHandler.triggerX/m-e.x)),r=Math.round(d.snap(d.popupMenuHandler.triggerY/m-n));d.cellsMoved(c,g-b.x,r-b.y)}}}finally{d.getModel().endUpdate()}}});this.addAction("delete",function(b){a(null!=b&&mxEvent.isShiftDown(b))},null,null,"Delete");this.addAction("deleteAll",function(){a(!0)},null,null,Editor.ctrlKey+"+Delete");this.addAction("duplicate",
+try{var c=mxClipboard.paste(d);if(null!=c){var b=d.getBoundingBoxFromGeometry(c);if(null!=b){var g=d.view.translate,e=d.view.scale,m=g.y,h=Math.round(d.snap(d.popupMenuHandler.triggerX/e-g.x)),r=Math.round(d.snap(d.popupMenuHandler.triggerY/e-m));d.cellsMoved(c,h-b.x,r-b.y)}}}finally{d.getModel().endUpdate()}}});this.addAction("delete",function(b){a(null!=b&&mxEvent.isShiftDown(b))},null,null,"Delete");this.addAction("deleteAll",function(){a(!0)},null,null,Editor.ctrlKey+"+Delete");this.addAction("duplicate",
 function(){d.setSelectionCells(d.duplicateCells())},null,null,Editor.ctrlKey+"+D");this.put("turn",new Action(mxResources.get("turn")+" / "+mxResources.get("reverse"),function(){d.turnShapes(d.getSelectionCells())},null,null,Editor.ctrlKey+"+R"));this.addAction("selectVertices",function(){d.selectVertices()},null,null,Editor.ctrlKey+"+Shift+I");this.addAction("selectEdges",function(){d.selectEdges()},null,null,Editor.ctrlKey+"+Shift+E");this.addAction("selectAll",function(){d.selectAll(null,!0)},
 null,null,Editor.ctrlKey+"+A");this.addAction("selectNone",function(){d.clearSelection()},null,null,Editor.ctrlKey+"+Shift+A");this.addAction("lockUnlock",function(){if(!d.isSelectionEmpty()){d.getModel().beginUpdate();try{var a=d.isCellMovable(d.getSelectionCell())?1:0;d.toggleCellStyles(mxConstants.STYLE_MOVABLE,a);d.toggleCellStyles(mxConstants.STYLE_RESIZABLE,a);d.toggleCellStyles(mxConstants.STYLE_ROTATABLE,a);d.toggleCellStyles(mxConstants.STYLE_DELETABLE,a);d.toggleCellStyles(mxConstants.STYLE_EDITABLE,
 a);d.toggleCellStyles("connectable",a)}finally{d.getModel().endUpdate()}}},null,null,Editor.ctrlKey+"+L");this.addAction("home",function(){d.home()},null,null,"Home");this.addAction("exitGroup",function(){d.exitGroup()},null,null,Editor.ctrlKey+"+Shift+Page Up");this.addAction("enterGroup",function(){d.enterGroup()},null,null,Editor.ctrlKey+"+Shift+Page Down");this.addAction("expand",function(){d.foldCells(!1)},null,null,Editor.ctrlKey+"+Page Down");this.addAction("collapse",function(){d.foldCells(!0)},
 null,null,Editor.ctrlKey+"+Page Up");this.addAction("toFront",function(){d.orderCells(!1)},null,null,Editor.ctrlKey+"+Shift+F");this.addAction("toBack",function(){d.orderCells(!0)},null,null,Editor.ctrlKey+"+Shift+B");this.addAction("group",function(){1==d.getSelectionCount()?d.setCellStyles("container","1"):d.setSelectionCell(d.groupCells(null,0))},null,null,Editor.ctrlKey+"+G");this.addAction("ungroup",function(){1==d.getSelectionCount()&&0==d.getModel().getChildCount(d.getSelectionCell())?d.setCellStyles("container",
 "0"):d.setSelectionCells(d.ungroupCells())},null,null,Editor.ctrlKey+"+Shift+U");this.addAction("removeFromGroup",function(){d.removeCellsFromParent()});this.addAction("edit",function(){d.isEnabled()&&d.startEditingAtCell()},null,null,"F2/Enter");this.addAction("editData...",function(){var a=d.getSelectionCell()||d.getModel().getRoot();null!=a&&(a=new EditDataDialog(b,a),b.showDialog(a.container,320,320,!0,!1),a.init())},null,null,Editor.ctrlKey+"+M");this.addAction("editTooltip...",function(){var a=
-b.editor.graph;if(a.isEnabled()&&!a.isSelectionEmpty()){var c=a.getSelectionCell(),f="";if(mxUtils.isNode(c.value)){var d=c.value.getAttribute("tooltip");null!=d&&(f=d)}f=new TextareaDialog(b,mxResources.get("editTooltip")+":",f,function(b){a.setTooltipForCell(c,b)});b.showDialog(f.container,320,200,!0,!0);f.init()}});this.addAction("openLink",function(){var a=d.getLinkForCell(d.getSelectionCell());null!=a&&window.open(a)});this.addAction("editLink...",function(){var a=b.editor.graph;if(a.isEnabled()&&
-!a.isSelectionEmpty()){var c=a.getSelectionCell(),f=a.getLinkForCell(c)||"";b.showLinkDialog(f,mxResources.get("apply"),function(b){b=mxUtils.trim(b);a.setLinkForCell(c,0<b.length?b:null)})}});this.addAction("insertLink...",function(){d.isEnabled()&&!d.isCellLocked(d.getDefaultParent())&&b.showLinkDialog("",mxResources.get("insert"),function(a,c){a=mxUtils.trim(a);if(0<a.length){var f=null,e=a.substring(a.lastIndexOf("/")+1);if(d.isPageLink(a)){var m=a.indexOf(",");0<m&&(e=b.getPageById(a.substring(m+
-1)),e=null!=e?e.getName():mxResources.get("pageNotFound"))}null!=c&&0<c.length&&(f=c[0].iconUrl,e=c[0].name||c[0].type,e=e.charAt(0).toUpperCase()+e.substring(1),30<e.length&&(e=e.substring(0,30)+"..."));m=d.getFreeInsertPoint();f=new mxCell(e,new mxGeometry(m.x,m.y,100,40),"fontColor=#0000EE;fontStyle=4;rounded=1;overflow=hidden;"+(null!=f?"shape=label;imageWidth=16;imageHeight=16;spacingLeft=26;align=left;image="+f:"spacing=10;"));f.vertex=!0;d.setLinkForCell(f,a);d.cellSizeUpdated(f,!0);d.getModel().beginUpdate();
-try{f=d.addCell(f),d.fireEvent(new mxEventObject("cellsInserted","cells",[f]))}finally{d.getModel().endUpdate()}d.setSelectionCell(f);d.scrollCellToVisible(d.getSelectionCell())}})}).isEnabled=g;this.addAction("link...",mxUtils.bind(this,function(){var a=b.editor.graph;if(a.isEnabled())if(a.cellEditor.isContentEditing()){var c=a.getParentByName(a.getSelectedElement(),"A",a.cellEditor.textarea),f="";null!=c&&(f=c.getAttribute("href")||"");var d=a.cellEditor.saveSelection();b.showLinkDialog(f,mxResources.get("apply"),
-mxUtils.bind(this,function(c){a.cellEditor.restoreSelection(d);null!=c&&a.insertLink(c)}))}else a.isSelectionEmpty()?this.get("insertLink").funct():this.get("editLink").funct()})).isEnabled=g;this.addAction("autosize",function(){var a=d.getSelectionCells();if(null!=a){d.getModel().beginUpdate();try{for(var c=0;c<a.length;c++){var b=a[c];if(d.getModel().getChildCount(b))d.updateGroupBounds([b],20);else{var e=d.view.getState(b),m=d.getCellGeometry(b);d.getModel().isVertex(b)&&null!=e&&null!=e.text&&
-null!=m&&d.isWrapping(b)?(m=m.clone(),m.height=e.text.boundingBox.height/d.view.scale,d.getModel().setGeometry(b,m)):d.updateCellSize(b)}}}finally{d.getModel().endUpdate()}}},null,null,Editor.ctrlKey+"+Shift+Y");this.addAction("formattedText",function(){var a=d.getView().getState(d.getSelectionCell());if(null!=a){var c="1";d.stopEditing();d.getModel().beginUpdate();try{if("1"==a.style.html){var c=null,f=d.convertValueToString(a.cell);"0"!=mxUtils.getValue(a.style,"nl2Br","1")&&(f=f.replace(/\n/g,
-"").replace(/<br\s*.?>/g,"\n"));var e=document.createElement("div");e.innerHTML=f;f=mxUtils.extractTextWithWhitespace(e.childNodes);d.cellLabelChanged(a.cell,f)}else f=mxUtils.htmlEntities(d.convertValueToString(a.cell),!1),"0"!=mxUtils.getValue(a.style,"nl2Br","1")&&(f=f.replace(/\n/g,"<br/>")),d.cellLabelChanged(a.cell,d.sanitizeHtml(f));d.setCellStyles("html",c);b.fireEvent(new mxEventObject("styleChanged","keys",["html"],"values",[null!=c?c:"0"],"cells",d.getSelectionCells()))}finally{d.getModel().endUpdate()}}});
+b.editor.graph;if(a.isEnabled()&&!a.isSelectionEmpty()){var c=a.getSelectionCell(),d="";if(mxUtils.isNode(c.value)){var g=c.value.getAttribute("tooltip");null!=g&&(d=g)}d=new TextareaDialog(b,mxResources.get("editTooltip")+":",d,function(b){a.setTooltipForCell(c,b)});b.showDialog(d.container,320,200,!0,!0);d.init()}});this.addAction("openLink",function(){var a=d.getLinkForCell(d.getSelectionCell());null!=a&&window.open(a)});this.addAction("editLink...",function(){var a=b.editor.graph;if(a.isEnabled()&&
+!a.isSelectionEmpty()){var c=a.getSelectionCell(),d=a.getLinkForCell(c)||"";b.showLinkDialog(d,mxResources.get("apply"),function(b){b=mxUtils.trim(b);a.setLinkForCell(c,0<b.length?b:null)})}});this.addAction("insertLink...",function(){d.isEnabled()&&!d.isCellLocked(d.getDefaultParent())&&b.showLinkDialog("",mxResources.get("insert"),function(a,c){a=mxUtils.trim(a);if(0<a.length){var f=null,g=a.substring(a.lastIndexOf("/")+1);if(d.isPageLink(a)){var e=a.indexOf(",");0<e&&(g=b.getPageById(a.substring(e+
+1)),g=null!=g?g.getName():mxResources.get("pageNotFound"))}null!=c&&0<c.length&&(f=c[0].iconUrl,g=c[0].name||c[0].type,g=g.charAt(0).toUpperCase()+g.substring(1),30<g.length&&(g=g.substring(0,30)+"..."));e=d.getFreeInsertPoint();f=new mxCell(g,new mxGeometry(e.x,e.y,100,40),"fontColor=#0000EE;fontStyle=4;rounded=1;overflow=hidden;"+(null!=f?"shape=label;imageWidth=16;imageHeight=16;spacingLeft=26;align=left;image="+f:"spacing=10;"));f.vertex=!0;d.setLinkForCell(f,a);d.cellSizeUpdated(f,!0);d.getModel().beginUpdate();
+try{f=d.addCell(f),d.fireEvent(new mxEventObject("cellsInserted","cells",[f]))}finally{d.getModel().endUpdate()}d.setSelectionCell(f);d.scrollCellToVisible(d.getSelectionCell())}})}).isEnabled=h;this.addAction("link...",mxUtils.bind(this,function(){var a=b.editor.graph;if(a.isEnabled())if(a.cellEditor.isContentEditing()){var c=a.getParentByName(a.getSelectedElement(),"A",a.cellEditor.textarea),d="";null!=c&&(d=c.getAttribute("href")||"");var g=a.cellEditor.saveSelection();b.showLinkDialog(d,mxResources.get("apply"),
+mxUtils.bind(this,function(c){a.cellEditor.restoreSelection(g);null!=c&&a.insertLink(c)}))}else a.isSelectionEmpty()?this.get("insertLink").funct():this.get("editLink").funct()})).isEnabled=h;this.addAction("autosize",function(){var a=d.getSelectionCells();if(null!=a){d.getModel().beginUpdate();try{for(var c=0;c<a.length;c++){var b=a[c];if(d.getModel().getChildCount(b))d.updateGroupBounds([b],20);else{var g=d.view.getState(b),e=d.getCellGeometry(b);d.getModel().isVertex(b)&&null!=g&&null!=g.text&&
+null!=e&&d.isWrapping(b)?(e=e.clone(),e.height=g.text.boundingBox.height/d.view.scale,d.getModel().setGeometry(b,e)):d.updateCellSize(b)}}}finally{d.getModel().endUpdate()}}},null,null,Editor.ctrlKey+"+Shift+Y");this.addAction("formattedText",function(){var a=d.getView().getState(d.getSelectionCell());if(null!=a){var c="1";d.stopEditing();d.getModel().beginUpdate();try{if("1"==a.style.html){var c=null,f=d.convertValueToString(a.cell);"0"!=mxUtils.getValue(a.style,"nl2Br","1")&&(f=f.replace(/\n/g,
+"").replace(/<br\s*.?>/g,"\n"));var g=document.createElement("div");g.innerHTML=f;f=mxUtils.extractTextWithWhitespace(g.childNodes);d.cellLabelChanged(a.cell,f)}else f=mxUtils.htmlEntities(d.convertValueToString(a.cell),!1),"0"!=mxUtils.getValue(a.style,"nl2Br","1")&&(f=f.replace(/\n/g,"<br/>")),d.cellLabelChanged(a.cell,d.sanitizeHtml(f));d.setCellStyles("html",c);b.fireEvent(new mxEventObject("styleChanged","keys",["html"],"values",[null!=c?c:"0"],"cells",d.getSelectionCells()))}finally{d.getModel().endUpdate()}}});
 this.addAction("wordWrap",function(){var a=d.getView().getState(d.getSelectionCell()),c="wrap";d.stopEditing();null!=a&&"wrap"==a.style[mxConstants.STYLE_WHITE_SPACE]&&(c=null);d.setCellStyles(mxConstants.STYLE_WHITE_SPACE,c)});this.addAction("rotation",function(){var a="0",c=d.getView().getState(d.getSelectionCell());null!=c&&(a=c.style[mxConstants.STYLE_ROTATION]||a);a=new FilenameDialog(b,a,mxResources.get("apply"),function(a){null!=a&&0<a.length&&d.setCellStyles(mxConstants.STYLE_ROTATION,a)},
 mxResources.get("enterValue")+" ("+mxResources.get("rotation")+" 0-360)");b.showDialog(a.container,300,80,!0,!0);a.init()});this.addAction("resetView",function(){d.zoomTo(1);b.resetScrollbars()},null,null,Editor.ctrlKey+"+H");this.addAction("zoomIn",function(a){d.zoomIn()},null,null,Editor.ctrlKey+" + (Numpad) / Alt+Mousewheel");this.addAction("zoomOut",function(a){d.zoomOut()},null,null,Editor.ctrlKey+" - (Numpad) / Alt+Mousewheel");this.addAction("fitWindow",function(){d.fit()},null,null,Editor.ctrlKey+
 "+Shift+H");this.addAction("fitPage",mxUtils.bind(this,function(){d.pageVisible||this.get("pageView").funct();var a=d.pageFormat,c=d.pageScale;d.zoomTo(Math.floor(20*Math.min((d.container.clientWidth-10)/a.width/c,(d.container.clientHeight-10)/a.height/c))/20);mxUtils.hasScrollbars(d.container)&&(a=d.getPagePadding(),d.container.scrollTop=a.y*d.view.scale,d.container.scrollLeft=Math.min(a.x*d.view.scale,(d.container.scrollWidth-d.container.clientWidth)/2))}),null,null,Editor.ctrlKey+"+J");this.addAction("fitTwoPages",
@@ -2529,34 +2530,34 @@ mxUtils.bind(this,function(){d.pageVisible||this.get("pageView").funct();var a=d
 this.addAction("fitPageWidth",mxUtils.bind(this,function(){d.pageVisible||this.get("pageView").funct();d.zoomTo(Math.floor(20*(d.container.clientWidth-10)/d.pageFormat.width/d.pageScale)/20);if(mxUtils.hasScrollbars(d.container)){var a=d.getPagePadding();d.container.scrollLeft=Math.min(a.x*d.view.scale,(d.container.scrollWidth-d.container.clientWidth)/2)}}));this.put("customZoom",new Action(mxResources.get("custom")+"...",mxUtils.bind(this,function(){var a=new FilenameDialog(this.editorUi,parseInt(100*
 d.getView().getScale()),mxResources.get("apply"),mxUtils.bind(this,function(a){a=parseInt(a);!isNaN(a)&&0<a&&d.zoomTo(a/100)}),mxResources.get("zoom")+" (%)");this.editorUi.showDialog(a.container,300,80,!0,!0);a.init()}),null,null,Editor.ctrlKey+"+0"));this.addAction("pageScale...",mxUtils.bind(this,function(){var a=new FilenameDialog(this.editorUi,parseInt(100*d.pageScale),mxResources.get("apply"),mxUtils.bind(this,function(a){a=parseInt(a);!isNaN(a)&&0<a&&b.setPageScale(a/100)}),mxResources.get("pageScale")+
 " (%)");this.editorUi.showDialog(a.container,300,80,!0,!0);a.init()}));var l=null,l=this.addAction("grid",function(){d.setGridEnabled(!d.isGridEnabled());b.fireEvent(new mxEventObject("gridEnabledChanged"))},null,null,Editor.ctrlKey+"+Shift+G");l.setToggleAction(!0);l.setSelectedCallback(function(){return d.isGridEnabled()});l.setEnabled(!1);l=this.addAction("guides",function(){d.graphHandler.guidesEnabled=!d.graphHandler.guidesEnabled;b.fireEvent(new mxEventObject("guidesEnabledChanged"))});l.setToggleAction(!0);
-l.setSelectedCallback(function(){return d.graphHandler.guidesEnabled});l.setEnabled(!1);l=this.addAction("tooltips",function(){d.tooltipHandler.setEnabled(!d.tooltipHandler.isEnabled())});l.setToggleAction(!0);l.setSelectedCallback(function(){return d.tooltipHandler.isEnabled()});l=this.addAction("collapseExpand",function(){b.setFoldingEnabled(!d.foldingEnabled)});l.setToggleAction(!0);l.setSelectedCallback(function(){return d.foldingEnabled});l.isEnabled=g;l=this.addAction("scrollbars",function(){b.setScrollbars(!b.hasScrollbars())});
+l.setSelectedCallback(function(){return d.graphHandler.guidesEnabled});l.setEnabled(!1);l=this.addAction("tooltips",function(){d.tooltipHandler.setEnabled(!d.tooltipHandler.isEnabled())});l.setToggleAction(!0);l.setSelectedCallback(function(){return d.tooltipHandler.isEnabled()});l=this.addAction("collapseExpand",function(){b.setFoldingEnabled(!d.foldingEnabled)});l.setToggleAction(!0);l.setSelectedCallback(function(){return d.foldingEnabled});l.isEnabled=h;l=this.addAction("scrollbars",function(){b.setScrollbars(!b.hasScrollbars())});
 l.setToggleAction(!0);l.setSelectedCallback(function(){return d.scrollbars});l=this.addAction("pageView",mxUtils.bind(this,function(){b.setPageVisible(!d.pageVisible)}));l.setToggleAction(!0);l.setSelectedCallback(function(){return d.pageVisible});l=this.addAction("connectionArrows",function(){d.connectionArrowsEnabled=!d.connectionArrowsEnabled;b.fireEvent(new mxEventObject("connectionArrowsChanged"))},null,null,"Alt+Shift+A");l.setToggleAction(!0);l.setSelectedCallback(function(){return d.connectionArrowsEnabled});
 l=this.addAction("connectionPoints",function(){d.setConnectable(!d.connectionHandler.isEnabled());b.fireEvent(new mxEventObject("connectionPointsChanged"))},null,null,"Alt+Shift+P");l.setToggleAction(!0);l.setSelectedCallback(function(){return d.connectionHandler.isEnabled()});l=this.addAction("copyConnect",function(){d.connectionHandler.setCreateTarget(!d.connectionHandler.isCreateTarget());b.fireEvent(new mxEventObject("copyConnectChanged"))});l.setToggleAction(!0);l.setSelectedCallback(function(){return d.connectionHandler.isCreateTarget()});
-l.isEnabled=g;l=this.addAction("autosave",function(){b.editor.setAutosave(!b.editor.autosave)});l.setToggleAction(!0);l.setSelectedCallback(function(){return b.editor.autosave});l.isEnabled=g;l.visible=!1;this.addAction("help",function(){var a="";mxResources.isLanguageSupported(mxClient.language)&&(a="_"+mxClient.language);window.open(RESOURCES_PATH+"/help"+a+".html")});var p=!1;this.put("about",new Action(mxResources.get("about")+" Graph Editor...",function(){p||(b.showDialog((new AboutDialog(b)).container,
-320,280,!0,!0,function(){p=!1}),p=!0)},null,null,"F1"));l=mxUtils.bind(this,function(a,c,b,e){return this.addAction(a,function(){null!=b&&d.cellEditor.isContentEditing()?b():(d.stopEditing(!1),d.toggleCellStyleFlags(mxConstants.STYLE_FONTSTYLE,c))},null,null,e)});l("bold",mxConstants.FONT_BOLD,function(){document.execCommand("bold",!1,null)},Editor.ctrlKey+"+B");l("italic",mxConstants.FONT_ITALIC,function(){document.execCommand("italic",!1,null)},Editor.ctrlKey+"+I");l("underline",mxConstants.FONT_UNDERLINE,
+l.isEnabled=h;l=this.addAction("autosave",function(){b.editor.setAutosave(!b.editor.autosave)});l.setToggleAction(!0);l.setSelectedCallback(function(){return b.editor.autosave});l.isEnabled=h;l.visible=!1;this.addAction("help",function(){var a="";mxResources.isLanguageSupported(mxClient.language)&&(a="_"+mxClient.language);window.open(RESOURCES_PATH+"/help"+a+".html")});var n=!1;this.put("about",new Action(mxResources.get("about")+" Graph Editor...",function(){n||(b.showDialog((new AboutDialog(b)).container,
+320,280,!0,!0,function(){n=!1}),n=!0)},null,null,"F1"));l=mxUtils.bind(this,function(a,c,b,g){return this.addAction(a,function(){null!=b&&d.cellEditor.isContentEditing()?b():(d.stopEditing(!1),d.toggleCellStyleFlags(mxConstants.STYLE_FONTSTYLE,c))},null,null,g)});l("bold",mxConstants.FONT_BOLD,function(){document.execCommand("bold",!1,null)},Editor.ctrlKey+"+B");l("italic",mxConstants.FONT_ITALIC,function(){document.execCommand("italic",!1,null)},Editor.ctrlKey+"+I");l("underline",mxConstants.FONT_UNDERLINE,
 function(){document.execCommand("underline",!1,null)},Editor.ctrlKey+"+U");this.addAction("fontColor...",function(){b.menus.pickColor(mxConstants.STYLE_FONTCOLOR,"forecolor","000000")});this.addAction("strokeColor...",function(){b.menus.pickColor(mxConstants.STYLE_STROKECOLOR)});this.addAction("fillColor...",function(){b.menus.pickColor(mxConstants.STYLE_FILLCOLOR)});this.addAction("gradientColor...",function(){b.menus.pickColor(mxConstants.STYLE_GRADIENTCOLOR)});this.addAction("backgroundColor...",
 function(){b.menus.pickColor(mxConstants.STYLE_LABEL_BACKGROUNDCOLOR,"backcolor")});this.addAction("borderColor...",function(){b.menus.pickColor(mxConstants.STYLE_LABEL_BORDERCOLOR)});this.addAction("vertical",function(){b.menus.toggleStyle(mxConstants.STYLE_HORIZONTAL,!0)});this.addAction("shadow",function(){b.menus.toggleStyle(mxConstants.STYLE_SHADOW)});this.addAction("solid",function(){d.getModel().beginUpdate();try{d.setCellStyles(mxConstants.STYLE_DASHED,null),d.setCellStyles(mxConstants.STYLE_DASH_PATTERN,
 null),b.fireEvent(new mxEventObject("styleChanged","keys",[mxConstants.STYLE_DASHED,mxConstants.STYLE_DASH_PATTERN],"values",[null,null],"cells",d.getSelectionCells()))}finally{d.getModel().endUpdate()}});this.addAction("dashed",function(){d.getModel().beginUpdate();try{d.setCellStyles(mxConstants.STYLE_DASHED,"1"),d.setCellStyles(mxConstants.STYLE_DASH_PATTERN,null),b.fireEvent(new mxEventObject("styleChanged","keys",[mxConstants.STYLE_DASHED,mxConstants.STYLE_DASH_PATTERN],"values",["1",null],"cells",
 d.getSelectionCells()))}finally{d.getModel().endUpdate()}});this.addAction("dotted",function(){d.getModel().beginUpdate();try{d.setCellStyles(mxConstants.STYLE_DASHED,"1"),d.setCellStyles(mxConstants.STYLE_DASH_PATTERN,"1 4"),b.fireEvent(new mxEventObject("styleChanged","keys",[mxConstants.STYLE_DASHED,mxConstants.STYLE_DASH_PATTERN],"values",["1","1 4"],"cells",d.getSelectionCells()))}finally{d.getModel().endUpdate()}});this.addAction("sharp",function(){d.getModel().beginUpdate();try{d.setCellStyles(mxConstants.STYLE_ROUNDED,
 "0"),d.setCellStyles(mxConstants.STYLE_CURVED,"0"),b.fireEvent(new mxEventObject("styleChanged","keys",[mxConstants.STYLE_ROUNDED,mxConstants.STYLE_CURVED],"values",["0","0"],"cells",d.getSelectionCells()))}finally{d.getModel().endUpdate()}});this.addAction("rounded",function(){d.getModel().beginUpdate();try{d.setCellStyles(mxConstants.STYLE_ROUNDED,"1"),d.setCellStyles(mxConstants.STYLE_CURVED,"0"),b.fireEvent(new mxEventObject("styleChanged","keys",[mxConstants.STYLE_ROUNDED,mxConstants.STYLE_CURVED],
-"values",["1","0"],"cells",d.getSelectionCells()))}finally{d.getModel().endUpdate()}});this.addAction("toggleRounded",function(){if(!d.isSelectionEmpty()&&d.isEnabled()){d.getModel().beginUpdate();try{var a=d.getSelectionCells(),c=d.view.getState(a[0]),f=null!=c?c.style:d.getCellStyle(a[0]),e="1"==mxUtils.getValue(f,mxConstants.STYLE_ROUNDED,"0")?"0":"1";d.setCellStyles(mxConstants.STYLE_ROUNDED,e);d.setCellStyles(mxConstants.STYLE_CURVED,null);b.fireEvent(new mxEventObject("styleChanged","keys",
-[mxConstants.STYLE_ROUNDED,mxConstants.STYLE_CURVED],"values",[e,"0"],"cells",d.getSelectionCells()))}finally{d.getModel().endUpdate()}}});this.addAction("curved",function(){d.getModel().beginUpdate();try{d.setCellStyles(mxConstants.STYLE_ROUNDED,"0"),d.setCellStyles(mxConstants.STYLE_CURVED,"1"),b.fireEvent(new mxEventObject("styleChanged","keys",[mxConstants.STYLE_ROUNDED,mxConstants.STYLE_CURVED],"values",["0","1"],"cells",d.getSelectionCells()))}finally{d.getModel().endUpdate()}});this.addAction("collapsible",
+"values",["1","0"],"cells",d.getSelectionCells()))}finally{d.getModel().endUpdate()}});this.addAction("toggleRounded",function(){if(!d.isSelectionEmpty()&&d.isEnabled()){d.getModel().beginUpdate();try{var a=d.getSelectionCells(),c=d.view.getState(a[0]),f=null!=c?c.style:d.getCellStyle(a[0]),g="1"==mxUtils.getValue(f,mxConstants.STYLE_ROUNDED,"0")?"0":"1";d.setCellStyles(mxConstants.STYLE_ROUNDED,g);d.setCellStyles(mxConstants.STYLE_CURVED,null);b.fireEvent(new mxEventObject("styleChanged","keys",
+[mxConstants.STYLE_ROUNDED,mxConstants.STYLE_CURVED],"values",[g,"0"],"cells",d.getSelectionCells()))}finally{d.getModel().endUpdate()}}});this.addAction("curved",function(){d.getModel().beginUpdate();try{d.setCellStyles(mxConstants.STYLE_ROUNDED,"0"),d.setCellStyles(mxConstants.STYLE_CURVED,"1"),b.fireEvent(new mxEventObject("styleChanged","keys",[mxConstants.STYLE_ROUNDED,mxConstants.STYLE_CURVED],"values",["0","1"],"cells",d.getSelectionCells()))}finally{d.getModel().endUpdate()}});this.addAction("collapsible",
 function(){var a=d.view.getState(d.getSelectionCell()),c="1";null!=a&&null!=d.getFoldingImage(a)&&(c="0");d.setCellStyles("collapsible",c);b.fireEvent(new mxEventObject("styleChanged","keys",["collapsible"],"values",[c],"cells",d.getSelectionCells()))});this.addAction("editStyle...",mxUtils.bind(this,function(){var a=d.getSelectionCells();if(null!=a&&0<a.length){var c=d.getModel(),c=new TextareaDialog(this.editorUi,mxResources.get("editStyle")+":",c.getStyle(a[0])||"",function(c){null!=c&&d.setCellStyle(mxUtils.trim(c),
 a)},null,null,400,220);this.editorUi.showDialog(c.container,420,300,!0,!0);c.init()}}),null,null,Editor.ctrlKey+"+E");this.addAction("setAsDefaultStyle",function(){d.isEnabled()&&!d.isSelectionEmpty()&&b.setDefaultStyle(d.getSelectionCell())},null,null,Editor.ctrlKey+"+Shift+D");this.addAction("clearDefaultStyle",function(){d.isEnabled()&&b.clearDefaultStyle()},null,null,Editor.ctrlKey+"+Shift+R");this.addAction("addWaypoint",function(){var a=d.getSelectionCell();if(null!=a&&d.getModel().isEdge(a)){var c=
-e.graph.selectionCellsHandler.getHandler(a);if(c instanceof mxEdgeHandler){for(var b=d.view.translate,h=d.view.scale,m=b.x,b=b.y,a=d.getModel().getParent(a),n=d.getCellGeometry(a);d.getModel().isVertex(a)&&null!=n;)m+=n.x,b+=n.y,a=d.getModel().getParent(a),n=d.getCellGeometry(a);m=Math.round(d.snap(d.popupMenuHandler.triggerX/h-m));h=Math.round(d.snap(d.popupMenuHandler.triggerY/h-b));c.addPointAt(c.state,m,h)}}});this.addAction("removeWaypoint",function(){var a=b.actions.get("removeWaypoint");null!=
-a.handler&&a.handler.removePoint(a.handler.state,a.index)});this.addAction("clearWaypoints",function(){var a=d.getSelectionCells();if(null!=a){a=d.addAllEdges(a);d.getModel().beginUpdate();try{for(var c=0;c<a.length;c++){var b=a[c];if(d.getModel().isEdge(b)){var e=d.getCellGeometry(b);null!=e&&(e=e.clone(),e.points=null,d.getModel().setGeometry(b,e))}}}finally{d.getModel().endUpdate()}}},null,null,"Alt+Shift+C");l=this.addAction("subscript",mxUtils.bind(this,function(){d.cellEditor.isContentEditing()&&
+e.graph.selectionCellsHandler.getHandler(a);if(c instanceof mxEdgeHandler){for(var b=d.view.translate,g=d.view.scale,p=b.x,b=b.y,a=d.getModel().getParent(a),m=d.getCellGeometry(a);d.getModel().isVertex(a)&&null!=m;)p+=m.x,b+=m.y,a=d.getModel().getParent(a),m=d.getCellGeometry(a);p=Math.round(d.snap(d.popupMenuHandler.triggerX/g-p));g=Math.round(d.snap(d.popupMenuHandler.triggerY/g-b));c.addPointAt(c.state,p,g)}}});this.addAction("removeWaypoint",function(){var a=b.actions.get("removeWaypoint");null!=
+a.handler&&a.handler.removePoint(a.handler.state,a.index)});this.addAction("clearWaypoints",function(){var a=d.getSelectionCells();if(null!=a){a=d.addAllEdges(a);d.getModel().beginUpdate();try{for(var c=0;c<a.length;c++){var b=a[c];if(d.getModel().isEdge(b)){var g=d.getCellGeometry(b);null!=g&&(g=g.clone(),g.points=null,d.getModel().setGeometry(b,g))}}}finally{d.getModel().endUpdate()}}},null,null,"Alt+Shift+C");l=this.addAction("subscript",mxUtils.bind(this,function(){d.cellEditor.isContentEditing()&&
 document.execCommand("subscript",!1,null)}),null,null,Editor.ctrlKey+"+,");l=this.addAction("superscript",mxUtils.bind(this,function(){d.cellEditor.isContentEditing()&&document.execCommand("superscript",!1,null)}),null,null,Editor.ctrlKey+"+.");this.addAction("image...",function(){if(d.isEnabled()&&!d.isCellLocked(d.getDefaultParent())){var a=mxResources.get("image")+" ("+mxResources.get("url")+"):",c=d.getView().getState(d.getSelectionCell()),f="";null!=c&&(f=c.style[mxConstants.STYLE_IMAGE]||f);
-var e=d.cellEditor.saveSelection();b.showImageDialog(a,f,function(a,c,b){if(d.cellEditor.isContentEditing())d.cellEditor.restoreSelection(e),d.insertImage(a,c,b);else{var f=d.getSelectionCells();if(null!=a){var h=null;d.getModel().beginUpdate();try{if(0==f.length){var m=d.getFreeInsertPoint(),h=f=[d.insertVertex(d.getDefaultParent(),null,"",m.x,m.y,c,b,"shape=image;imageAspect=0;aspect=fixed;verticalLabelPosition=bottom;verticalAlign=top;")];d.fireEvent(new mxEventObject("cellsInserted","cells",h))}d.setCellStyles(mxConstants.STYLE_IMAGE,
-a,f);var n=d.view.getState(f[0]),g=null!=n?n.style:d.getCellStyle(f[0]);"image"!=g[mxConstants.STYLE_SHAPE]&&"label"!=g[mxConstants.STYLE_SHAPE]&&d.setCellStyles(mxConstants.STYLE_SHAPE,"image",f);if(1==d.getSelectionCount()&&null!=c&&null!=b){var u=f[0],l=d.getModel().getGeometry(u);null!=l&&(l=l.clone(),l.width=c,l.height=b,d.getModel().setGeometry(u,l))}}finally{d.getModel().endUpdate()}null!=h&&(d.setSelectionCells(h),d.scrollCellToVisible(h[0]))}}},d.cellEditor.isContentEditing(),!d.cellEditor.isContentEditing())}}).isEnabled=
-g;this.addAction("insertImage...",function(){d.isEnabled()&&!d.isCellLocked(d.getDefaultParent())&&(d.clearSelection(),b.actions.get("image").funct())}).isEnabled=g;l=this.addAction("layers",mxUtils.bind(this,function(){null==this.layersWindow?(this.layersWindow=new LayersWindow(b,document.body.offsetWidth-280,120,220,180),this.layersWindow.window.addListener("show",function(){b.fireEvent(new mxEventObject("layers"))}),this.layersWindow.window.addListener("hide",function(){b.fireEvent(new mxEventObject("layers"))}),
+var g=d.cellEditor.saveSelection();b.showImageDialog(a,f,function(a,c,b){if(d.cellEditor.isContentEditing())d.cellEditor.restoreSelection(g),d.insertImage(a,c,b);else{var f=d.getSelectionCells();if(null!=a){var e=null;d.getModel().beginUpdate();try{if(0==f.length){var p=d.getFreeInsertPoint(),e=f=[d.insertVertex(d.getDefaultParent(),null,"",p.x,p.y,c,b,"shape=image;imageAspect=0;aspect=fixed;verticalLabelPosition=bottom;verticalAlign=top;")];d.fireEvent(new mxEventObject("cellsInserted","cells",e))}d.setCellStyles(mxConstants.STYLE_IMAGE,
+a,f);var m=d.view.getState(f[0]),h=null!=m?m.style:d.getCellStyle(f[0]);"image"!=h[mxConstants.STYLE_SHAPE]&&"label"!=h[mxConstants.STYLE_SHAPE]&&d.setCellStyles(mxConstants.STYLE_SHAPE,"image",f);if(1==d.getSelectionCount()&&null!=c&&null!=b){var u=f[0],l=d.getModel().getGeometry(u);null!=l&&(l=l.clone(),l.width=c,l.height=b,d.getModel().setGeometry(u,l))}}finally{d.getModel().endUpdate()}null!=e&&(d.setSelectionCells(e),d.scrollCellToVisible(e[0]))}}},d.cellEditor.isContentEditing(),!d.cellEditor.isContentEditing())}}).isEnabled=
+h;this.addAction("insertImage...",function(){d.isEnabled()&&!d.isCellLocked(d.getDefaultParent())&&(d.clearSelection(),b.actions.get("image").funct())}).isEnabled=h;l=this.addAction("layers",mxUtils.bind(this,function(){null==this.layersWindow?(this.layersWindow=new LayersWindow(b,document.body.offsetWidth-280,120,220,180),this.layersWindow.window.addListener("show",function(){b.fireEvent(new mxEventObject("layers"))}),this.layersWindow.window.addListener("hide",function(){b.fireEvent(new mxEventObject("layers"))}),
 this.layersWindow.window.setVisible(!0),b.fireEvent(new mxEventObject("layers"))):this.layersWindow.window.setVisible(!this.layersWindow.window.isVisible())}),null,null,Editor.ctrlKey+"+Shift+L");l.setToggleAction(!0);l.setSelectedCallback(mxUtils.bind(this,function(){return null!=this.layersWindow&&this.layersWindow.window.isVisible()}));l=this.addAction("formatPanel",mxUtils.bind(this,function(){b.toggleFormatPanel()}),null,null,Editor.ctrlKey+"+Shift+P");l.setToggleAction(!0);l.setSelectedCallback(mxUtils.bind(this,
 function(){return 0<b.formatWidth}));l=this.addAction("outline",mxUtils.bind(this,function(){null==this.outlineWindow?(this.outlineWindow=new OutlineWindow(b,document.body.offsetWidth-260,100,180,180),this.outlineWindow.window.addListener("show",function(){b.fireEvent(new mxEventObject("outline"))}),this.outlineWindow.window.addListener("hide",function(){b.fireEvent(new mxEventObject("outline"))}),this.outlineWindow.window.setVisible(!0),b.fireEvent(new mxEventObject("outline"))):this.outlineWindow.window.setVisible(!this.outlineWindow.window.isVisible())}),
-null,null,Editor.ctrlKey+"+Shift+O");l.setToggleAction(!0);l.setSelectedCallback(mxUtils.bind(this,function(){return null!=this.outlineWindow&&this.outlineWindow.window.isVisible()}))};Actions.prototype.addAction=function(a,b,e,d,g){var l;"..."==a.substring(a.length-3)?(a=a.substring(0,a.length-3),l=mxResources.get(a)+"..."):l=mxResources.get(a);return this.put(a,new Action(l,b,e,d,g))};Actions.prototype.put=function(a,b){return this.actions[a]=b};Actions.prototype.get=function(a){return this.actions[a]};
-function Action(a,b,e,d,g){mxEventSource.call(this);this.label=a;this.funct=this.createFunction(b);this.enabled=null!=e?e:!0;this.iconCls=d;this.shortcut=g;this.visible=!0}mxUtils.extend(Action,mxEventSource);Action.prototype.createFunction=function(a){return a};Action.prototype.setEnabled=function(a){this.enabled!=a&&(this.enabled=a,this.fireEvent(new mxEventObject("stateChanged")))};Action.prototype.isEnabled=function(){return this.enabled};
+null,null,Editor.ctrlKey+"+Shift+O");l.setToggleAction(!0);l.setSelectedCallback(mxUtils.bind(this,function(){return null!=this.outlineWindow&&this.outlineWindow.window.isVisible()}))};Actions.prototype.addAction=function(a,b,e,d,h){var l;"..."==a.substring(a.length-3)?(a=a.substring(0,a.length-3),l=mxResources.get(a)+"..."):l=mxResources.get(a);return this.put(a,new Action(l,b,e,d,h))};Actions.prototype.put=function(a,b){return this.actions[a]=b};Actions.prototype.get=function(a){return this.actions[a]};
+function Action(a,b,e,d,h){mxEventSource.call(this);this.label=a;this.funct=this.createFunction(b);this.enabled=null!=e?e:!0;this.iconCls=d;this.shortcut=h;this.visible=!0}mxUtils.extend(Action,mxEventSource);Action.prototype.createFunction=function(a){return a};Action.prototype.setEnabled=function(a){this.enabled!=a&&(this.enabled=a,this.fireEvent(new mxEventObject("stateChanged")))};Action.prototype.isEnabled=function(){return this.enabled};
 Action.prototype.setToggleAction=function(a){this.toggleAction=a};Action.prototype.setSelectedCallback=function(a){this.selectedCallback=a};Action.prototype.isSelected=function(){return this.selectedCallback()};DrawioFile=function(a,b){mxEventSource.call(this);this.ui=a;this.data=b||""};mxUtils.extend(DrawioFile,mxEventSource);DrawioFile.prototype.autosaveDelay=1500;DrawioFile.prototype.maxAutosaveDelay=3E4;DrawioFile.prototype.autosaveThread=null;DrawioFile.prototype.lastAutosave=null;DrawioFile.prototype.modified=!1;DrawioFile.prototype.changeListenerEnabled=!0;DrawioFile.prototype.lastAutosaveRevision=null;DrawioFile.prototype.maxAutosaveRevisionDelay=18E5;DrawioFile.prototype.descriptorChanged=function(){this.fireEvent(new mxEventObject("descriptorChanged"))};
 DrawioFile.prototype.contentChanged=function(){this.fireEvent(new mxEventObject("contentChanged"))};DrawioFile.prototype.save=function(a,b,e,d){this.updateFileData();this.clearAutosave()};DrawioFile.prototype.updateFileData=function(){this.setData(this.ui.getFileData())};DrawioFile.prototype.saveAs=function(a,b,e){};DrawioFile.prototype.saveFile=function(a,b,e,d){};DrawioFile.prototype.getPublicUrl=function(a){a(null)};DrawioFile.prototype.isRestricted=function(){return!1};
 DrawioFile.prototype.isModified=function(){return this.modified};DrawioFile.prototype.setModified=function(a){this.modified=a};DrawioFile.prototype.isAutosaveOptional=function(){return!1};DrawioFile.prototype.isAutosave=function(){return this.ui.editor.autosave};DrawioFile.prototype.isRenamable=function(){return!1};DrawioFile.prototype.rename=function(a,b,e){};DrawioFile.prototype.isMovable=function(){return!1};DrawioFile.prototype.move=function(a,b,e){};DrawioFile.prototype.getHash=function(){return""};
-DrawioFile.prototype.getId=function(){return""};DrawioFile.prototype.isEditable=function(){return!this.ui.editor.chromeless};DrawioFile.prototype.getUi=function(){return this.ui};DrawioFile.prototype.getTitle=function(){return""};DrawioFile.prototype.setData=function(a){this.data=a};DrawioFile.prototype.getData=function(){return this.data};
+DrawioFile.prototype.getId=function(){return""};DrawioFile.prototype.isEditable=function(){return!this.ui.editor.chromeless||this.ui.editor.editable};DrawioFile.prototype.getUi=function(){return this.ui};DrawioFile.prototype.getTitle=function(){return""};DrawioFile.prototype.setData=function(a){this.data=a};DrawioFile.prototype.getData=function(){return this.data};
 DrawioFile.prototype.open=function(){this.ui.setFileData(this.getData());this.changeListener=mxUtils.bind(this,function(a,b){var e=null!=b?b.getProperty("edit"):null;!this.changeListenerEnabled||!this.isEditable()||null!=e&&e.ignoreEdit||(this.setModified(!0),this.isAutosave()?(this.ui.editor.setStatus(mxUtils.htmlEntities(mxResources.get("saving"))+"..."),this.autosave(this.autosaveDelay,this.maxAutosaveDelay,mxUtils.bind(this,function(a){null!=this.autosaveThread||this.ui.getCurrentFile()!=this||
 this.isModified()||this.ui.editor.setStatus(mxUtils.htmlEntities(mxResources.get("allChangesSaved")))}),mxUtils.bind(this,function(a){this.ui.getCurrentFile()==this&&this.addUnsavedStatus(a)}))):this.addUnsavedStatus())});this.ui.editor.graph.model.addListener(mxEvent.CHANGE,this.changeListener);this.ui.editor.graph.addListener("gridSizeChanged",this.changeListener);this.ui.editor.graph.addListener("shadowVisibleChanged",this.changeListener);this.ui.addListener("pageFormatChanged",this.changeListener);
 this.ui.addListener("pageScaleChanged",this.changeListener);this.ui.addListener("backgroundColorChanged",this.changeListener);this.ui.addListener("backgroundImageChanged",this.changeListener);this.ui.addListener("foldingEnabledChanged",this.changeListener);this.ui.addListener("mathEnabledChanged",this.changeListener);this.ui.addListener("gridEnabledChanged",this.changeListener);this.ui.addListener("guidesEnabledChanged",this.changeListener);this.ui.addListener("pageViewChanged",this.changeListener)};
@@ -2566,8 +2567,8 @@ DrawioFile.prototype.autosave=function(a,b,e,d){null==this.lastAutosave&&(this.l
 mxUtils.bind(this,function(a){null!=d&&d(a)}))}else null!=e&&e(null)}),a)};DrawioFile.prototype.isAutosaveNow=function(){return!0};DrawioFile.prototype.autosaveCompleted=function(){};DrawioFile.prototype.clearAutosave=function(){null!=this.autosaveThread&&(window.clearTimeout(this.autosaveThread),this.autosaveThread=null)};DrawioFile.prototype.isAutosaveRevision=function(){var a=(new Date).getTime();return null==this.lastAutosaveRevision||a-this.lastAutosaveRevision>this.maxAutosaveRevisionDelay};
 DrawioFile.prototype.close=function(a){this.isAutosave()&&this.isModified()&&this.save(this.isAutosaveRevision(),null,null,a);this.destroy()};DrawioFile.prototype.hasSameExtension=function(a,b){if(null!=a&&null!=b){var e=a.lastIndexOf("."),d=0<e?a.substring(e):"",e=b.lastIndexOf(".");return d===(0<e?b.substring(e):"")}return a==b};
 DrawioFile.prototype.destroy=function(){this.clearAutosave();null!=this.changeListener&&(this.ui.editor.graph.model.removeListener(this.changeListener),this.ui.editor.graph.removeListener(this.changeListener),this.ui.removeListener(this.changeListener),this.changeListener=null)};LocalFile=function(a,b,e,d){DrawioFile.call(this,a,b);this.title=e;this.mode=d?null:App.MODE_DEVICE};mxUtils.extend(LocalFile,DrawioFile);LocalFile.prototype.isAutosave=function(){return!1};LocalFile.prototype.getMode=function(){return this.mode};LocalFile.prototype.getTitle=function(){return this.title};LocalFile.prototype.isRenamable=function(){return!0};LocalFile.prototype.save=function(a,b,e){this.saveAs(this.title,b,e)};LocalFile.prototype.saveAs=function(a,b,e){this.saveFile(a,!1,b,e)};
-LocalFile.prototype.saveFile=function(a,b,e,d){this.title=a;this.updateFileData();b=this.getData();var g=this.ui.useCanvasForExport&&/(\.png)$/i.test(this.getTitle()),l=mxUtils.bind(this,function(b){if(this.ui.isOfflineApp()||this.ui.isLocalFileSave())this.ui.doSaveLocalFile(b,a,g?"image/png":"text/xml",g);else if(b.length<MAX_REQUEST_SIZE){var d=a.lastIndexOf("."),d=0<d?a.substring(d+1):"xml";(new mxXmlRequest(SAVE_URL,"format="+d+"&xml="+encodeURIComponent(b)+"&filename="+encodeURIComponent(a)+
-(g?"&binary=1":""))).simulate(document,"_blank")}else this.ui.handleError({message:mxResources.get("drawingTooLarge")},mxResources.get("error"),mxUtils.bind(this,function(){mxUtils.popup(b)}));this.setModified(!1);this.contentChanged();null!=e&&e()});g?this.ui.getEmbeddedPng(mxUtils.bind(this,function(a){l(a)}),d,this.ui.getCurrentFile()!=this?this.getData():null):l(b)};LocalFile.prototype.rename=function(a,b,e){this.title=a;this.descriptorChanged();null!=b&&b()};
+LocalFile.prototype.saveFile=function(a,b,e,d){this.title=a;this.updateFileData();b=this.getData();var h=this.ui.useCanvasForExport&&/(\.png)$/i.test(this.getTitle()),l=mxUtils.bind(this,function(b){if(this.ui.isOfflineApp()||this.ui.isLocalFileSave())this.ui.doSaveLocalFile(b,a,h?"image/png":"text/xml",h);else if(b.length<MAX_REQUEST_SIZE){var d=a.lastIndexOf("."),d=0<d?a.substring(d+1):"xml";(new mxXmlRequest(SAVE_URL,"format="+d+"&xml="+encodeURIComponent(b)+"&filename="+encodeURIComponent(a)+
+(h?"&binary=1":""))).simulate(document,"_blank")}else this.ui.handleError({message:mxResources.get("drawingTooLarge")},mxResources.get("error"),mxUtils.bind(this,function(){mxUtils.popup(b)}));this.setModified(!1);this.contentChanged();null!=e&&e()});h?this.ui.getEmbeddedPng(mxUtils.bind(this,function(a){l(a)}),d,this.ui.getCurrentFile()!=this?this.getData():null):l(b)};LocalFile.prototype.rename=function(a,b,e){this.title=a;this.descriptorChanged();null!=b&&b()};
 LocalFile.prototype.open=function(){this.ui.setFileData(this.getData());this.changeListener=mxUtils.bind(this,function(a,b){this.setModified(!0);this.addUnsavedStatus()});this.ui.editor.graph.model.addListener(mxEvent.CHANGE,this.changeListener)};(function(){Editor.prototype.appName="draw.io";Editor.closeImage=mxClient.IS_SVG?"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABkAAAAZCAMAAADzN3VRAAAApVBMVEUAAAD////k5OT///8AAAB1dXXMzMz9/f39/f37+/v5+fn+/v7///9iYmJaWlqFhYWnp6ejo6OHh4f////////////////7+/v5+fnx8fH///8AAAD///8bGxv7+/v5+fkoKCghISFDQ0MYGBjh4eHY2Njb29tQUFBvb29HR0c/Pz82NjYrKyu/v78SEhLu7u7s7OzV1dVVVVU7OzsVFRXAv78QEBBzqehMAAAAG3RSTlMAA/7p/vz5xZlrTiPL/v78+/v7+OXd2TYQDs8L70ZbAAABKUlEQVQoz3VS13LCMBBUXHChd8iukDslQChJ/v/TchaG4cXS+OSb1c7trU7V60OpdRz2ZtNZL4zXNlcN8BEtSG6+NxIXkeRPoBuQ1cjvZ31/VJFB10ISli6diYfH8iYO3WUNCcNlB0gTrXOtkxTo0O1aKKiBBMhhv2MNBQKoiA5wxlZo0JDzD3AYKbWacyj3fs01wxey0pyEP+R8pWKWXoqtIZ0DDg5pbki9krEKOa6LVDQsdoXEsi46Zqh69KFz7B1u7Hb2yDV8firXDKBlZ4UFiswKGRhXTS93/ECK7yxnJ3+S3y/ThpO+cfSD017nqa18aasabU0/t7d+tk0/1oMEJ1NaD67iwdF68OabFSLn+eHb0+vjy+uk8br9fdrftH0O2menfd7+AQfYM/lNjoDHAAAAAElFTkSuQmCC":
 IMAGE_PATH+"/delete.png";Editor.plusImage=mxClient.IS_SVG?"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAoAAAAKCAYAAACNMs+9AAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAyJpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuMC1jMDYwIDYxLjEzNDc3NywgMjAxMC8wMi8xMi0xNzozMjowMCAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvIiB4bWxuczp4bXBNTT0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL21tLyIgeG1sbnM6c3RSZWY9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9zVHlwZS9SZXNvdXJjZVJlZiMiIHhtcDpDcmVhdG9yVG9vbD0iQWRvYmUgUGhvdG9zaG9wIENTNSBNYWNpbnRvc2giIHhtcE1NOkluc3RhbmNlSUQ9InhtcC5paWQ6MDdCMTdENjVCOEM4MTFFNDlCRjVBNDdCODU5NjNBNUMiIHhtcE1NOkRvY3VtZW50SUQ9InhtcC5kaWQ6MDdCMTdENjZCOEM4MTFFNDlCRjVBNDdCODU5NjNBNUMiPiA8eG1wTU06RGVyaXZlZEZyb20gc3RSZWY6aW5zdGFuY2VJRD0ieG1wLmlpZDowN0IxN0Q2M0I4QzgxMUU0OUJGNUE0N0I4NTk2M0E1QyIgc3RSZWY6ZG9jdW1lbnRJRD0ieG1wLmRpZDowN0IxN0Q2NEI4QzgxMUU0OUJGNUE0N0I4NTk2M0E1QyIvPiA8L3JkZjpEZXNjcmlwdGlvbj4gPC9yZGY6UkRGPiA8L3g6eG1wbWV0YT4gPD94cGFja2V0IGVuZD0iciI/PtjrjmgAAAAtSURBVHjaYvz//z8DMigvLwcLdHZ2MiKLMzEQCaivkLGsrOw/dU0cAr4GCDAARQsQbTFrv10AAAAASUVORK5CYII=":
 IMAGE_PATH+"/plus.png";Editor.spinImage=mxClient.IS_SVG?"data:image/gif;base64,R0lGODlhDAAMAPUxAEVriVp7lmCAmmGBm2OCnGmHn3OPpneSqYKbr4OcsIScsI2kto6kt46lt5KnuZmtvpquvpuvv56ywaCzwqK1xKu7yay9yq+/zLHAzbfF0bjG0bzJ1LzK1MDN18jT28nT3M3X3tHa4dTc49Xd5Njf5dng5t3k6d/l6uDm6uru8e7x8/Dz9fT29/b4+Pj5+fj5+vr6+v///wAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACH5BAkKADEAIf8LTkVUU0NBUEUyLjADAQAAACwAAAAADAAMAAAGR8CYcEgsOgYAIax4CCQuQldrCBEsiK8VS2hoFGOrlJDA+cZQwkLnqyoJFZKviSS0ICrE0ec0jDAwIiUeGyBFGhMPFBkhZo1BACH5BAkKAC4ALAAAAAAMAAwAhVB0kFR3k1V4k2CAmmWEnW6Lo3KOpXeSqH2XrIOcsISdsImhtIqhtJCmuJGnuZuwv52wwJ+ywZ+ywqm6yLHBzbLCzrXEz7fF0LnH0rrI0r7L1b/M1sXR2cfT28rV3czW3s/Z4Nfe5Nvi6ODm6uLn6+Ln7OLo7OXq7efs7+zw8u/y9PDy9PX3+Pr7+////wAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAZDQJdwSCxGDAIAoVFkFBwYSyIwGE4OkCJxIdG6WkJEx8sSKj7elfBB0a5SQg1EQ0SVVMPKhDM6iUIkRR4ZFxsgJl6JQQAh+QQJCgAxACwAAAAADAAMAIVGa4lcfZdjgpxkg51nhp5ui6N3kqh5lKqFnbGHn7KIoLOQp7iRp7mSqLmTqbqarr6br7+fssGitcOitcSuvsuuv8uwwMyzw861xNC5x9K6x9K/zNbDztjE0NnG0drJ1NzQ2eDS2+LT2+LV3ePZ4Oba4ebb4ufc4+jm6+7t8PLt8PPt8fPx8/Xx9PX09vf19/j3+Pn///8AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAGQ8CYcEgsUhQFggFSjCQmnE1jcBhqGBXiIuAQSi7FGEIgfIzCFoCXFCZiPO0hKBMiwl7ET6eUYqlWLkUnISImKC1xbUEAIfkECQoAMgAsAAAAAAwADACFTnKPT3KPVHaTYoKcb4yjcY6leZSpf5mtgZuvh5+yiqG0i6K1jqW3kae5nrHBnrLBn7LCoLPCobTDqbrIqrvIs8LOtMPPtcPPtcTPuMbRucfSvcrUvsvVwMzWxdHaydTcytXdzNbezdff0drh2ODl2+Ln3eTp4Obq4ujs5Ont5uvu6O3w6u7w6u7x7/L09vj5+vr7+vv7////AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABkdAmXBILHIcicOCUqxELKKPxKAYgiYd4oMAEWo8RVmjIMScwhmBcJMKXwLCECmMGAhPI1QRwBiaSixCMDFhLSorLi8wYYxCQQAh+QQJCgAxACwAAAAADAAMAIVZepVggJphgZtnhp5vjKN2kah3kqmBmq+KobSLorWNpLaRp7mWq7ybr7+gs8KitcSktsWnuManucexwM2ywc63xtG6yNO9ytS+ytW/zNbDz9jH0tvL1d3N197S2+LU3OPU3ePV3eTX3+Xa4efb4ufd5Onl6u7r7vHs7/Lt8PLw8/Xy9Pby9fb09ff2+Pn3+Pn6+vr///8AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAGSMCYcEgseiwSR+RS7GA4JFGF8RiWNiEiJTERgkjFGAQh/KTCGoJwpApnBkITKrwoCFWnFlEhaAxXLC9CBwAGRS4wQgELYY1CQQAh+QQJCgAzACwAAAAADAAMAIVMcI5SdZFhgZtti6JwjaR4k6mAma6Cm6+KobSLorWLo7WNo7aPpredsMCescGitMOitcSmuMaqu8ixwc2zws63xdC4xtG5x9K9ytXAzdfCztjF0NnF0drK1d3M1t7P2N/P2eDT2+LX3+Xe5Onh5+vi5+vj6Ozk6e3n7O/o7O/q7vHs7/Lt8PPu8fPx8/X3+Pn6+vv7+/v8/Pz///8AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAGRcCZcEgsmkIbTOZTLIlGqZNnchm2SCgiJ6IRqljFmQUiXIVnoITQde4chC9Y+LEQxmTFRkFSNFAqDAMIRQoCAAEEDmeLQQAh+QQJCgAwACwAAAAADAAMAIVXeZRefplff5lhgZtph59yjqV2kaeAmq6FnbGFnrGLorWNpLaQp7mRqLmYrb2essGgs8Klt8apusitvcquv8u2xNC7yNO8ydS8ytTAzdfBzdfM1t7N197Q2eDU3OPX3+XZ4ObZ4ebc4+jf5erg5erg5uvp7fDu8fPv8vTz9fb09vf19/j3+Pn4+fn5+vr6+/v///8AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAGRUCYcEgspkwjEKhUVJ1QsBNp0xm2VixiSOMRvlxFGAcTJook5eEHIhQcwpWIkAFQECkNy9AQWFwyEAkPRQ4FAwQIE2llQQAh+QQJCgAvACwAAAAADAAMAIVNcY5SdZFigptph6BvjKN0kKd8lquAmq+EnbGGn7KHn7ONpLaOpbearr+csMCdscCescGhtMOnuMauvsuzws60w862xdC9ytW/y9a/zNbCztjG0drH0tvK1N3M1t7N19/U3ePb4uff5urj6Ozk6e3l6u7m6u7o7PDq7vDt8PPv8vTw8vTw8/X19vf6+vv///8AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAGQ8CXcEgsvlytVUplJLJIpSEDUESFTELBwSgCCQEV42kjDFiMo4uQsDB2MkLHoEHUTD7DRAHC8VAiZ0QSCgYIDxhNiUEAOw==":
@@ -2575,45 +2576,45 @@ IMAGE_PATH+"/spin.gif";Editor.tweetImage=IMAGE_PATH+"/tweet.png";Editor.facebook
 IMAGE_PATH+"/img-hi-res.png";Editor.loResImage=mxClient.IS_SVG?"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAFAAAAA+CAMAAACLMWy1AAAAS1BMVEVAQEAAAAA1NTVBQUFDQ0NDQ0NFRUVERERBQUFBQUFBQUFAQEBBQUFBQUFCQkJCQkJCQkJBQUFCQkJDQ0NDQ0NCQkJCQkJCQkJGRkb5/XqTAAAAGXRSTlP+AAWODlASCsesX+Lc2LyWe3pwa1tCPjohjSJfoAAAAI1JREFUWMPt1MkKhTAMRuG0anvneXr/J71nUypKcdqI/N8yhLMKMZE1CahnClDQzMPB44ED3EgeCubgDWnWQMHpwTtKwTe+UHD4sJ94wbUEHHFGhILlYDeSnsQeabeCgsPBgB0MOZZ9oGA5GJFiJSfUULAfjLjARrhCwX7wh2YCDwVbwZkUBKqFFJRN+wOcwSgR2sREcgAAAABJRU5ErkJggg==":
 IMAGE_PATH+"/img-lo-res.png";Editor.cameraLargeImage="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAYAAABzenr0AAAAAXNSR0IArs4c6QAAAAlwSFlzAAALEwAACxMBAJqcGAAAAVlpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IlhNUCBDb3JlIDUuNC4wIj4KICAgPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4KICAgICAgPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIKICAgICAgICAgICAgeG1sbnM6dGlmZj0iaHR0cDovL25zLmFkb2JlLmNvbS90aWZmLzEuMC8iPgogICAgICAgICA8dGlmZjpPcmllbnRhdGlvbj4xPC90aWZmOk9yaWVudGF0aW9uPgogICAgICA8L3JkZjpEZXNjcmlwdGlvbj4KICAgPC9yZGY6UkRGPgo8L3g6eG1wbWV0YT4KTMInWQAAA/BJREFUWAnFl0uIjWEYx885buPSuGwmSYwtwsY1ikKSNYNclmQnadgrZSPlsnBLSlaGBdNYKY0Vdi4L4zYzIqxGxmXG//d+7//0+uY7nWMiT/2/53mf+3v7vnNKpf9M5UbrDw8Pj4m+wzmeT1FBUS6Xf+YNox6reMONukijMXUTM3NmI75PyXcJPwRWg5kS7xysDLNmfEUxpx2rceNE50IlYjyRklcLf0prY+x4BTqfmx3ZUHQaO9ISGngYq38V/1EH+ECPa+QaK1u1kVBQirDMChiS3CTeIkwWvghtwhKBpZ8g1CO2B99FynVU/KowSRgQ3mlrBsVZ1awmQlS0SGbfXglfBPbdRGMm5O8RXg2P835pDCvzWjghTHETcLpZLHwS8kTCtBEK1SN83Egam8YxyVZqc+Do5qkwS+gT9grNwkUBG6cbsG/gs3BTuC/0ChCxq4QtwgzBMdwUZBPyN4Ftfi4sYPZHktbOSRlIuutRP5jYj0ueZp88xyYcS/zZoiLyQT1IA/cTj7eSlwnrhI+JnkQbCwo2Sx/2M7VJt17wdhVtgxvrpoFnAuSAbJQ97biZAlKxBfD9wgOhV+BgIR/AZtJ4kwD5PGSj7OmmekjWEy0oAQHAS3+KpBpzXqYK3UItopHpSRMno2N+cm7gDYnfRCcr3QBqriMHLJDkeyhFfiG5aVbK+8rhtP9M6QcIEJHX5Fp9NMAyQlYiu+OOJNlODCIXyka/P23bncTdiC7OydC1+v1Bsb+5r84DK8S3Rdmf5cRUFW3bXtWUSt1Rdk6G4SyJV2o1YId+vNUxr+x5yCJiapFtcxQzLjrxboGcMxvFJwEOKnLwjIbkx/sdSmeSaUY++SwTAxV+4DJT7RVwkbk46gNCsifIItuy0e9PF33Cb4homhN5YRyzL5q5V2VNkv98kqgoGTo3YF9CnMM5Y5rItFfvBSi9JulVXOgI+VwIntkt+SaZ6weQfcovJf7zpTfl86P/wAF7Fz18NeKwmvAWCaX0Z/uMHQr42ZxvR/Rxcw5xM+9J/CJq8w2gduDhmDgso/QrBH47dEXQ1IqczyHpIOfIRtnTtV7SwO1oKXKkU3fbToFGSDHtMWcaH1WBuVYnDbRFi99iqSMySdzxXckrazUh23KBVYGIcfNBkTxca0e4ATJ0KukGYVBgr/MnlhPOtQq/ksUfCbzh+EFCjtnCUoHfjhA/OsiTv2HcEvJMELp0VakZDliTmriTdPivxU4VmEhtPrGV+KJhO7ZKt0doFZh1fgZSBWIW2AGEHwg3BUWOnKtH+suqdw07tYMfglCrWPD5mw9qVYuniaXkT0OtWaSuo5LJTY1RBf+roF9X5+y/5qU+DAAAAABJRU5ErkJggg==";
 Editor.defaultCustomLibraries=[];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## 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## Connections between rows ("from": source colum, "to": target column).\n## Label, style and invert are optional. Defaults are \'\', current style and false.\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 width. Possible value are px or auto. Default is auto.\n#\n# width: auto\n#\n## Node height. Possible value are px or auto. Default is auto.\n#\n# height: auto\n#\n## Padding for autosize. Default is 0.\n#\n# padding: -26\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\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 parallel edges. Default is 40.\n#\n# edgespacing: 40\n#\n## Name of layout. Possible values are auto, none, verticaltree, horizontaltree,\n## verticalflow, horizontalflow, organic, circle. 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\nEvan 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-9-2-128.png\nEdward Morrison,Brand Manager,emo,Office 2,Evan 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\nRon Donovan,System Admin,rdo,Office 3,Evan 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\nTessa Valet,HR Director,tva,Office 4,Evan Miller,me@example.com,#d5e8d4,#82b366,,https://www.draw.io,https://cdn3.iconfinder.com/data/icons/user-avatars-1/512/users-3-128.png\n';
-Editor.configure=function(a){if(null!=a){Menus.prototype.defaultFonts=a.defaultFonts||Menus.prototype.defaultFonts;ColorDialog.prototype.presetColors=a.presetColors||ColorDialog.prototype.presetColors;ColorDialog.prototype.defaultColors=a.defaultColors||ColorDialog.prototype.defaultColors;StyleFormatPanel.prototype.defaultColorSchemes=a.defaultColorSchemes||StyleFormatPanel.prototype.defaultColorSchemes;if(null!=a.css){var c=document.createElement("style");c.setAttribute("type","text/css");c.appendChild(document.createTextNode(a.css));
-var b=document.getElementsByTagName("script")[0];b.parentNode.insertBefore(c,b)}null!=a.defaultLibraries&&(Sidebar.prototype.defaultEntries=a.defaultLibraries);null!=a.defaultCustomLibraries&&(Editor.defaultCustomLibraries=a.defaultCustomLibraries);null!=a.defaultVertexStyle&&(Graph.prototype.defaultVertexStyle=a.defaultVertexStyle);null!=a.defaultEdgeStyle&&(Graph.prototype.defaultEdgeStyle=a.defaultEdgeStyle);a.emptyDiagramXml&&(EditorUi.prototype.emptyDiagramXml=a.emptyDiagramXml);a.thumbWidth&&
-(Sidebar.prototype.thumbWidth=a.thumbWidth);a.thumbHeight&&(Sidebar.prototype.thumbHeight=a.thumbHeight);a.emptyLibraryXml&&(EditorUi.prototype.emptyLibraryXml=a.emptyLibraryXml);a.sidebarWidth&&(EditorUi.prototype.hsplitPosition=a.sidebarWidth);a.fontCss&&(c=document.createElement("style"),c.setAttribute("type","text/css"),c.appendChild(document.createTextNode(a.fontCss)),b=document.getElementsByTagName("script")[0],b.parentNode.insertBefore(c,b),Editor.prototype.fontCss=a.fontCss);if(null!=a.plugins)for(App.initPluginCallback(),
-c=0;c<a.plugins.length;c++)mxscript(a.plugins[c])}};Editor.prototype.editButtonLink=null!=urlParams.edit?decodeURIComponent(urlParams.edit):null;var a=Editor.prototype.setGraphXml;Editor.prototype.setGraphXml=function(c){c=null!=c&&"mxlibrary"!=c.nodeName?this.extractGraphModel(c):null;if(null!=c){var b=c.getElementsByTagName("parsererror");if(null!=b&&0<b.length){var b=b[0],f=b.getElementsByTagName("div");null!=f&&0<f.length&&(b=f[0]);throw{message:mxUtils.getTextContent(b)};}if("mxGraphModel"==
-c.nodeName){b=c.getAttribute("style")||"default-style2";if("1"==urlParams.embed||null!=b&&""!=b)b!=this.graph.currentStyle&&(f=null!=this.graph.themes?this.graph.themes[b]:mxUtils.load(STYLE_PATH+"/"+b+".xml").getDocumentElement(),null!=f&&(d=new mxCodec(f.ownerDocument),d.decode(f,this.graph.getStylesheet())));else if(f=null!=this.graph.themes?this.graph.themes["default-old"]:mxUtils.load(STYLE_PATH+"/default-old.xml").getDocumentElement(),null!=f){var d=new mxCodec(f.ownerDocument);d.decode(f,this.graph.getStylesheet())}this.graph.currentStyle=
-b;this.graph.mathEnabled="1"==urlParams.math||"1"==c.getAttribute("math");b=c.getAttribute("backgroundImage");null!=b?(b=JSON.parse(b),this.graph.setBackgroundImage(new mxImage(b.src,b.width,b.height))):this.graph.setBackgroundImage(null);mxClient.NO_FO=this.graph.mathEnabled?!0:this.originalNoForeignObject;this.graph.setShadowVisible("1"==c.getAttribute("shadow"),!1)}a.apply(this,arguments)}else throw{message:mxResources.get("notADiagramFile")||"Invalid data",toString:function(){return this.message}};
-};var b=Editor.prototype.getGraphXml;Editor.prototype.getGraphXml=function(a){a=null!=a?a:!0;var c=b.apply(this,arguments);null!=this.graph.currentStyle&&"default-style2"!=this.graph.currentStyle&&c.setAttribute("style",this.graph.currentStyle);null!=this.graph.backgroundImage&&c.setAttribute("backgroundImage",JSON.stringify(this.graph.backgroundImage));c.setAttribute("math",this.graph.mathEnabled?"1":"0");c.setAttribute("shadow",this.graph.shadowVisible?"1":"0");return c};Editor.prototype.isDataSvg=
-function(a){try{var c=mxUtils.parseXml(a).documentElement.getAttribute("content");if(null!=c&&(null!=c&&"<"!=c.charAt(0)&&"%"!=c.charAt(0)&&(c=unescape(window.atob?atob(c):Base64.decode(cont,c))),null!=c&&"%"==c.charAt(0)&&(c=decodeURIComponent(c)),null!=c&&0<c.length)){var b=mxUtils.parseXml(c).documentElement;return"mxfile"==b.nodeName||"mxGraphModel"==b.nodeName}}catch(x){}return!1};Editor.prototype.extractGraphModel=function(a,c){if(null!=a&&"undefined"!==typeof pako){var b=a.ownerDocument.getElementsByTagName("div"),
-f=[];if(null!=b&&0<b.length)for(var d=0;d<b.length;d++)if("mxgraph"==b[d].getAttribute("class")){f.push(b[d]);break}0<f.length&&(b=f[0].getAttribute("data-mxgraph"),null!=b?(f=JSON.parse(b),null!=f&&null!=f.xml&&(f=mxUtils.parseXml(f.xml),a=f.documentElement)):(f=f[0].getElementsByTagName("div"),0<f.length&&(b=mxUtils.getTextContent(f[0]),b=this.graph.decompress(b),0<b.length&&(f=mxUtils.parseXml(b),a=f.documentElement))))}if(null!=a&&"svg"==a.nodeName)if(b=a.getAttribute("content"),null!=b&&"<"!=
-b.charAt(0)&&"%"!=b.charAt(0)&&(b=unescape(window.atob?atob(b):Base64.decode(cont,b))),null!=b&&"%"==b.charAt(0)&&(b=decodeURIComponent(b)),null!=b&&0<b.length)a=mxUtils.parseXml(b).documentElement;else throw{message:mxResources.get("notADiagramFile")};null==a||c||(f=null,"diagram"==a.nodeName?f=a:"mxfile"==a.nodeName&&(b=a.getElementsByTagName("diagram"),0<b.length&&(f=b[Math.max(0,Math.min(b.length-1,urlParams.page||0))])),null!=f&&(b=this.graph.decompress(mxUtils.getTextContent(f)),null!=b&&0<
-b.length&&(a=mxUtils.parseXml(b).documentElement)));null==a||"mxGraphModel"==a.nodeName||c&&"mxfile"==a.nodeName||(a=null);return a};var e=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?!0:this.originalNoForeignObject;e.apply(this,arguments)};Editor.prototype.originalNoForeignObject=mxClient.NO_FO;var d=Editor.prototype.updateGraphComponents;Editor.prototype.updateGraphComponents=
-function(){d.apply(this,arguments);mxClient.NO_FO=this.graph.mathEnabled&&null!=Editor.MathJaxRender?!0:this.originalNoForeignObject};Editor.initMath=function(a,c){a=null!=a?a:"https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.0/MathJax.js?config=TeX-MML-AM_HTMLorMML";Editor.mathJaxQueue=[];Editor.doMathJaxRender=function(a){MathJax.Hub.Queue(["Typeset",MathJax.Hub,a])};window.MathJax={skipStartupTypeset:!0,showMathMenu:!1,messageStyle:"none",AuthorInit:function(){MathJax.Hub.Config(c||{jax:["input/TeX",
-"input/MathML","input/AsciiMath","output/HTML-CSS"],extensions:["tex2jax.js","mml2jax.js","asciimath2jax.js"],TeX:{extensions:["AMSmath.js","AMSsymbols.js","noErrors.js","noUndefined.js"]},tex2jax:{ignoreClass:"mxCellEditor"},asciimath2jax:{ignoreClass:"mxCellEditor"}});MathJax.Hub.Register.StartupHook("Begin",function(){for(var a=0;a<Editor.mathJaxQueue.length;a++)Editor.doMathJaxRender(Editor.mathJaxQueue[a])})}};Editor.MathJaxRender=function(a){"undefined"!==typeof MathJax&&"undefined"!==typeof MathJax.Hub?
-Editor.doMathJaxRender(a):Editor.mathJaxQueue.push(a)};Editor.MathJaxClear=function(){Editor.mathJaxQueue=[]};var b=Editor.prototype.init;Editor.prototype.init=function(){b.apply(this,arguments);this.graph.addListener(mxEvent.SIZE,mxUtils.bind(this,function(a,c){this.graph.mathEnabled&&Editor.MathJaxRender(this.graph.container)}))};var f=document.getElementsByTagName("script");if(null!=f&&0<f.length){var d=document.createElement("script");d.type="text/javascript";d.src=a;f[0].parentNode.appendChild(d)}};
-Editor.prototype.csvToArray=function(a){if(!/^\s*(?:'[^'\\]*(?:\\[\S\s][^'\\]*)*'|"[^"\\]*(?:\\[\S\s][^"\\]*)*"|[^,'"\s\\]*(?:\s+[^,'"\s\\]+)*)\s*(?:,\s*(?:'[^'\\]*(?:\\[\S\s][^'\\]*)*'|"[^"\\]*(?:\\[\S\s][^"\\]*)*"|[^,'"\s\\]*(?:\s+[^,'"\s\\]+)*)\s*)*$/.test(a))return null;var c=[];a.replace(/(?!\s*$)\s*(?:'([^'\\]*(?:\\[\S\s][^'\\]*)*)'|"([^"\\]*(?:\\[\S\s][^"\\]*)*)"|([^,'"\s\\]*(?:\s+[^,'"\s\\]+)*))\s*(?:,|$)/g,function(a,b,f,d){void 0!==b?c.push(b.replace(/\\'/g,"'")):void 0!==f?c.push(f.replace(/\\"/g,
-'"')):void 0!==d&&c.push(d);return""});/,\s*$/.test(a)&&c.push("");return c};if(window.ColorDialog){var g=ColorDialog.addRecentColor;ColorDialog.addRecentColor=function(a,c){g.apply(this,arguments);mxSettings.setRecentColors(ColorDialog.recentColors);mxSettings.save()};var l=ColorDialog.resetRecentColors;ColorDialog.resetRecentColors=function(){l.apply(this,arguments);mxSettings.setRecentColors(ColorDialog.recentColors);mxSettings.save()}}if(null!=window.StyleFormatPanel){var p=Format.prototype.init;
-Format.prototype.init=function(){p.apply(this,arguments);this.editorUi.editor.addListener("fileLoaded",this.update)};var q=Format.prototype.refresh;Format.prototype.refresh=function(){null!=this.editorUi.getCurrentFile()||"1"==urlParams.embed||this.editorUi.editor.chromeless?q.apply(this,arguments):this.clear()};var c=DiagramFormatPanel.prototype.addView;DiagramFormatPanel.prototype.addView=function(a){a=c.apply(this,arguments);if(mxClient.IS_SVG){var b=this.editorUi,f=b.editor.graph;a.appendChild(this.createOption(mxResources.get("shadow"),
-function(){return f.shadowVisible},function(a){f.setShadowVisible(!f.shadowVisible)},{install:function(a){this.listener=function(){a(f.shadowVisible)};b.addListener("shadowVisibleChanged",this.listener)},destroy:function(){b.removeListener(this.listener)}}))}return a};var f=DiagramFormatPanel.prototype.addOptions;DiagramFormatPanel.prototype.addOptions=function(a){a=f.apply(this,arguments);var c=this.editorUi;if(c.editor.graph.isEnabled()){var b=c.getCurrentFile();null!=b&&b.isAutosaveOptional()&&
-(b=this.createOption(mxResources.get("autosave"),function(){return c.editor.autosave},function(a){c.editor.setAutosave(a)},{install:function(a){this.listener=function(){a(c.editor.autosave)};c.editor.addListener("autosaveChanged",this.listener)},destroy:function(){c.editor.removeListener(this.listener)}}),a.appendChild(b))}return a};StyleFormatPanel.prototype.defaultColorSchemes=[[null,{fill:"#f5f5f5",stroke:"#666666"},{fill:"#dae8fc",stroke:"#6c8ebf"},{fill:"#d5e8d4",stroke:"#82b366"},{fill:"#ffe6cc",
-stroke:"#d79b00"},{fill:"#fff2cc",stroke:"#d6b656"},{fill:"#f8cecc",stroke:"#b85450"},{fill:"#e1d5e7",stroke:"#9673a6"}],[null,{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"}],[null,
-{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"}]];var h=StyleFormatPanel.prototype.init;StyleFormatPanel.prototype.init=function(){"image"!=this.format.createSelectionState().style.shape&&this.container.appendChild(this.addStyles(this.createPanel()));h.apply(this,arguments)};var m=StyleFormatPanel.prototype.addStyleOps;
-StyleFormatPanel.prototype.addStyleOps=function(a){var c=mxUtils.button(mxResources.get("copyStyle"),mxUtils.bind(this,function(a){this.editorUi.actions.get("copyStyle").funct()}));c.setAttribute("title",mxResources.get("copyStyle")+" ("+this.editorUi.actions.get("copyStyle").shortcut+")");c.style.marginBottom="2px";c.style.width="100px";c.style.marginRight="2px";a.appendChild(c);c=mxUtils.button(mxResources.get("pasteStyle"),mxUtils.bind(this,function(a){this.editorUi.actions.get("pasteStyle").funct()}));
-c.setAttribute("title",mxResources.get("pasteStyle")+" ("+this.editorUi.actions.get("pasteStyle").shortcut+")");c.style.marginBottom="2px";c.style.width="100px";a.appendChild(c);mxUtils.br(a);return m.apply(this,arguments)};StyleFormatPanel.prototype.addStyles=function(a){function c(a){function c(a){var c=mxUtils.button("",function(c){f.getModel().beginUpdate();try{var b=f.getSelectionCells();for(c=0;c<b.length;c++){for(var d=f.getModel().getStyle(b[c]),h=0;h<e.length;h++)d=mxUtils.removeStylename(d,
-e[h]);null!=a?(d=mxUtils.setStyle(d,mxConstants.STYLE_FILLCOLOR,a.fill),d=mxUtils.setStyle(d,mxConstants.STYLE_STROKECOLOR,a.stroke),d=mxUtils.setStyle(d,mxConstants.STYLE_GRADIENTCOLOR,a.gradient)):(d=mxUtils.setStyle(d,mxConstants.STYLE_FILLCOLOR,"#ffffff"),d=mxUtils.setStyle(d,mxConstants.STYLE_STROKECOLOR,"#000000"),d=mxUtils.setStyle(d,mxConstants.STYLE_GRADIENTCOLOR,null));f.getModel().setStyle(b[c],d)}}finally{f.getModel().endUpdate()}});c.className="geStyleButton";c.style.width="36px";c.style.height=
-"30px";c.style.margin="0px 6px 6px 0px";null!=a?(null!=a.gradient?mxClient.IS_IE&&(mxClient.IS_QUIRKS||10>document.documentMode)?c.style.filter="progid:DXImageTransform.Microsoft.Gradient(StartColorStr='"+a.fill+"', EndColorStr='"+a.gradient+"', GradientType=0)":c.style.backgroundImage="linear-gradient("+a.fill+" 0px,"+a.gradient+" 100%)":c.style.backgroundColor=a.fill,c.style.border="1px solid "+a.stroke):(c.style.backgroundColor="#ffffff",c.style.border="1px solid #000000");d.appendChild(c)}d.innerHTML=
-"";for(var b=0;b<a.length;b++)0<b&&0==mxUtils.mod(b,4)&&mxUtils.br(d),c(a[b])}function b(a){mxEvent.addListener(a,"mouseenter",function(){a.style.opacity="1"});mxEvent.addListener(a,"mouseleave",function(){a.style.opacity="0.5"})}var f=this.editorUi.editor.graph,d=document.createElement("div");d.style.whiteSpace="normal";d.style.paddingLeft="24px";d.style.paddingRight="20px";a.style.paddingLeft="16px";a.style.paddingBottom="6px";a.style.position="relative";a.appendChild(d);var e="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".split(" ");
-null==this.editorUi.currentScheme&&(this.editorUi.currentScheme=0);var h=document.createElement("div");h.style.cssText="position:absolute;left:10px;top:8px;bottom:8px;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(h,"click",mxUtils.bind(this,function(){this.editorUi.currentScheme=mxUtils.mod(this.editorUi.currentScheme-1,this.defaultColorSchemes.length);c(this.defaultColorSchemes[this.editorUi.currentScheme])}));var k=document.createElement("div");k.style.cssText="position:absolute;left:202px;top:8px;bottom:8px;width:20px;margin:4px;opacity:0.5;background-repeat:no-repeat;background-position:center center;background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAwAAAAQBAMAAADQT4M0AAAAIVBMVEUAAAB2dnZ2dnZ2dnZ2dnZ2dnZ2dnZ2dnZ2dnZ2dnZ2dnYBuwCcAAAACnRSTlMAfCTkhhvb7cQSPH2JPgAAADZJREFUCNdjQAOMAmBKaiGY8loF5rKswsZlrVo8AUiFrTICcbIWK8A5DF1gDoMymMPApIAwHwCS0Qx/U7qCBQAAAABJRU5ErkJggg==);";
-1<this.defaultColorSchemes.length&&(a.appendChild(h),a.appendChild(k));mxEvent.addListener(k,"click",mxUtils.bind(this,function(){this.editorUi.currentScheme=mxUtils.mod(this.editorUi.currentScheme+1,this.defaultColorSchemes.length);c(this.defaultColorSchemes[this.editorUi.currentScheme])}));b(h);b(k);c(this.defaultColorSchemes[this.editorUi.currentScheme]);return a};StyleFormatPanel.prototype.addEditOps=function(a){var c=this.format.getSelectionState(),b=null;1==this.editorUi.editor.graph.getSelectionCount()&&
-(b=mxUtils.button(mxResources.get("editStyle"),mxUtils.bind(this,function(a){this.editorUi.actions.get("editStyle").funct()})),b.setAttribute("title",mxResources.get("editStyle")+" ("+this.editorUi.actions.get("editStyle").shortcut+")"),b.style.width="202px",b.style.marginBottom="2px",a.appendChild(b));var f=this.editorUi.editor.graph,d=f.view.getState(f.getSelectionCell());1==f.getSelectionCount()&&null!=d&&null!=d.shape&&null!=d.shape.stencil?(c=mxUtils.button(mxResources.get("editShape"),mxUtils.bind(this,
+Editor.configure=function(a){if(null!=a){Menus.prototype.defaultFonts=a.defaultFonts||Menus.prototype.defaultFonts;ColorDialog.prototype.presetColors=a.presetColors||ColorDialog.prototype.presetColors;ColorDialog.prototype.defaultColors=a.defaultColors||ColorDialog.prototype.defaultColors;StyleFormatPanel.prototype.defaultColorSchemes=a.defaultColorSchemes||StyleFormatPanel.prototype.defaultColorSchemes;Graph.prototype.defaultEdgeLength=a.defaultEdgeLength||Graph.prototype.defaultEdgeLength;if(null!=
+a.css){var c=document.createElement("style");c.setAttribute("type","text/css");c.appendChild(document.createTextNode(a.css));var b=document.getElementsByTagName("script")[0];b.parentNode.insertBefore(c,b)}null!=a.defaultLibraries&&(Sidebar.prototype.defaultEntries=a.defaultLibraries);null!=a.defaultCustomLibraries&&(Editor.defaultCustomLibraries=a.defaultCustomLibraries);null!=a.defaultVertexStyle&&(Graph.prototype.defaultVertexStyle=a.defaultVertexStyle);null!=a.defaultEdgeStyle&&(Graph.prototype.defaultEdgeStyle=
+a.defaultEdgeStyle);a.emptyDiagramXml&&(EditorUi.prototype.emptyDiagramXml=a.emptyDiagramXml);a.thumbWidth&&(Sidebar.prototype.thumbWidth=a.thumbWidth);a.thumbHeight&&(Sidebar.prototype.thumbHeight=a.thumbHeight);a.emptyLibraryXml&&(EditorUi.prototype.emptyLibraryXml=a.emptyLibraryXml);a.sidebarWidth&&(EditorUi.prototype.hsplitPosition=a.sidebarWidth);a.fontCss&&(c=document.createElement("style"),c.setAttribute("type","text/css"),c.appendChild(document.createTextNode(a.fontCss)),b=document.getElementsByTagName("script")[0],
+b.parentNode.insertBefore(c,b),Editor.prototype.fontCss=a.fontCss);if(null!=a.plugins)for(App.initPluginCallback(),c=0;c<a.plugins.length;c++)mxscript(a.plugins[c])}};Editor.prototype.editButtonLink=null!=urlParams.edit?decodeURIComponent(urlParams.edit):null;var a=Editor.prototype.setGraphXml;Editor.prototype.setGraphXml=function(c){c=null!=c&&"mxlibrary"!=c.nodeName?this.extractGraphModel(c):null;if(null!=c){var b=c.getElementsByTagName("parsererror");if(null!=b&&0<b.length){var b=b[0],d=b.getElementsByTagName("div");
+null!=d&&0<d.length&&(b=d[0]);throw{message:mxUtils.getTextContent(b)};}if("mxGraphModel"==c.nodeName){b=c.getAttribute("style")||"default-style2";if("1"==urlParams.embed||null!=b&&""!=b)b!=this.graph.currentStyle&&(d=null!=this.graph.themes?this.graph.themes[b]:mxUtils.load(STYLE_PATH+"/"+b+".xml").getDocumentElement(),null!=d&&(f=new mxCodec(d.ownerDocument),f.decode(d,this.graph.getStylesheet())));else if(d=null!=this.graph.themes?this.graph.themes["default-old"]:mxUtils.load(STYLE_PATH+"/default-old.xml").getDocumentElement(),
+null!=d){var f=new mxCodec(d.ownerDocument);f.decode(d,this.graph.getStylesheet())}this.graph.currentStyle=b;this.graph.mathEnabled="1"==urlParams.math||"1"==c.getAttribute("math");b=c.getAttribute("backgroundImage");null!=b?(b=JSON.parse(b),this.graph.setBackgroundImage(new mxImage(b.src,b.width,b.height))):this.graph.setBackgroundImage(null);mxClient.NO_FO=this.graph.mathEnabled?!0:this.originalNoForeignObject;this.graph.setShadowVisible("1"==c.getAttribute("shadow"),!1)}a.apply(this,arguments)}else throw{message:mxResources.get("notADiagramFile")||
+"Invalid data",toString:function(){return this.message}};};var b=Editor.prototype.getGraphXml;Editor.prototype.getGraphXml=function(a){a=null!=a?a:!0;var c=b.apply(this,arguments);null!=this.graph.currentStyle&&"default-style2"!=this.graph.currentStyle&&c.setAttribute("style",this.graph.currentStyle);null!=this.graph.backgroundImage&&c.setAttribute("backgroundImage",JSON.stringify(this.graph.backgroundImage));c.setAttribute("math",this.graph.mathEnabled?"1":"0");c.setAttribute("shadow",this.graph.shadowVisible?
+"1":"0");return c};Editor.prototype.isDataSvg=function(a){try{var c=mxUtils.parseXml(a).documentElement.getAttribute("content");if(null!=c&&(null!=c&&"<"!=c.charAt(0)&&"%"!=c.charAt(0)&&(c=unescape(window.atob?atob(c):Base64.decode(cont,c))),null!=c&&"%"==c.charAt(0)&&(c=decodeURIComponent(c)),null!=c&&0<c.length)){var b=mxUtils.parseXml(c).documentElement;return"mxfile"==b.nodeName||"mxGraphModel"==b.nodeName}}catch(x){}return!1};Editor.prototype.extractGraphModel=function(a,c){if(null!=a&&"undefined"!==
+typeof pako){var b=a.ownerDocument.getElementsByTagName("div"),d=[];if(null!=b&&0<b.length)for(var f=0;f<b.length;f++)if("mxgraph"==b[f].getAttribute("class")){d.push(b[f]);break}0<d.length&&(b=d[0].getAttribute("data-mxgraph"),null!=b?(d=JSON.parse(b),null!=d&&null!=d.xml&&(d=mxUtils.parseXml(d.xml),a=d.documentElement)):(d=d[0].getElementsByTagName("div"),0<d.length&&(b=mxUtils.getTextContent(d[0]),b=this.graph.decompress(b),0<b.length&&(d=mxUtils.parseXml(b),a=d.documentElement))))}if(null!=a&&
+"svg"==a.nodeName)if(b=a.getAttribute("content"),null!=b&&"<"!=b.charAt(0)&&"%"!=b.charAt(0)&&(b=unescape(window.atob?atob(b):Base64.decode(cont,b))),null!=b&&"%"==b.charAt(0)&&(b=decodeURIComponent(b)),null!=b&&0<b.length)a=mxUtils.parseXml(b).documentElement;else throw{message:mxResources.get("notADiagramFile")};null==a||c||(d=null,"diagram"==a.nodeName?d=a:"mxfile"==a.nodeName&&(b=a.getElementsByTagName("diagram"),0<b.length&&(d=b[Math.max(0,Math.min(b.length-1,urlParams.page||0))])),null!=d&&
+(b=this.graph.decompress(mxUtils.getTextContent(d)),null!=b&&0<b.length&&(a=mxUtils.parseXml(b).documentElement)));null==a||"mxGraphModel"==a.nodeName||c&&"mxfile"==a.nodeName||(a=null);return a};var e=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?!0:this.originalNoForeignObject;e.apply(this,arguments)};Editor.prototype.originalNoForeignObject=mxClient.NO_FO;
+var d=Editor.prototype.updateGraphComponents;Editor.prototype.updateGraphComponents=function(){d.apply(this,arguments);mxClient.NO_FO=this.graph.mathEnabled&&null!=Editor.MathJaxRender?!0:this.originalNoForeignObject};Editor.initMath=function(a,c){a=null!=a?a:"https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.0/MathJax.js?config=TeX-MML-AM_HTMLorMML";Editor.mathJaxQueue=[];Editor.doMathJaxRender=function(a){MathJax.Hub.Queue(["Typeset",MathJax.Hub,a])};window.MathJax={skipStartupTypeset:!0,showMathMenu:!1,
+messageStyle:"none",AuthorInit:function(){MathJax.Hub.Config(c||{jax:["input/TeX","input/MathML","input/AsciiMath","output/HTML-CSS"],extensions:["tex2jax.js","mml2jax.js","asciimath2jax.js"],TeX:{extensions:["AMSmath.js","AMSsymbols.js","noErrors.js","noUndefined.js"]},tex2jax:{ignoreClass:"mxCellEditor"},asciimath2jax:{ignoreClass:"mxCellEditor"}});MathJax.Hub.Register.StartupHook("Begin",function(){for(var a=0;a<Editor.mathJaxQueue.length;a++)Editor.doMathJaxRender(Editor.mathJaxQueue[a])})}};
+Editor.MathJaxRender=function(a){"undefined"!==typeof MathJax&&"undefined"!==typeof MathJax.Hub?Editor.doMathJaxRender(a):Editor.mathJaxQueue.push(a)};Editor.MathJaxClear=function(){Editor.mathJaxQueue=[]};var b=Editor.prototype.init;Editor.prototype.init=function(){b.apply(this,arguments);this.graph.addListener(mxEvent.SIZE,mxUtils.bind(this,function(a,c){this.graph.mathEnabled&&Editor.MathJaxRender(this.graph.container)}))};var d=document.getElementsByTagName("script");if(null!=d&&0<d.length){var f=
+document.createElement("script");f.type="text/javascript";f.src=a;d[0].parentNode.appendChild(f)}};Editor.prototype.csvToArray=function(a){if(!/^\s*(?:'[^'\\]*(?:\\[\S\s][^'\\]*)*'|"[^"\\]*(?:\\[\S\s][^"\\]*)*"|[^,'"\s\\]*(?:\s+[^,'"\s\\]+)*)\s*(?:,\s*(?:'[^'\\]*(?:\\[\S\s][^'\\]*)*'|"[^"\\]*(?:\\[\S\s][^"\\]*)*"|[^,'"\s\\]*(?:\s+[^,'"\s\\]+)*)\s*)*$/.test(a))return null;var c=[];a.replace(/(?!\s*$)\s*(?:'([^'\\]*(?:\\[\S\s][^'\\]*)*)'|"([^"\\]*(?:\\[\S\s][^"\\]*)*)"|([^,'"\s\\]*(?:\s+[^,'"\s\\]+)*))\s*(?:,|$)/g,
+function(a,b,d,f){void 0!==b?c.push(b.replace(/\\'/g,"'")):void 0!==d?c.push(d.replace(/\\"/g,'"')):void 0!==f&&c.push(f);return""});/,\s*$/.test(a)&&c.push("");return c};if(window.ColorDialog){var h=ColorDialog.addRecentColor;ColorDialog.addRecentColor=function(a,c){h.apply(this,arguments);mxSettings.setRecentColors(ColorDialog.recentColors);mxSettings.save()};var l=ColorDialog.resetRecentColors;ColorDialog.resetRecentColors=function(){l.apply(this,arguments);mxSettings.setRecentColors(ColorDialog.recentColors);
+mxSettings.save()}}if(null!=window.StyleFormatPanel){var n=Format.prototype.init;Format.prototype.init=function(){n.apply(this,arguments);this.editorUi.editor.addListener("fileLoaded",this.update)};var q=Format.prototype.refresh;Format.prototype.refresh=function(){null!=this.editorUi.getCurrentFile()||"1"==urlParams.embed||this.editorUi.editor.chromeless?q.apply(this,arguments):this.clear()};var c=DiagramFormatPanel.prototype.addView;DiagramFormatPanel.prototype.addView=function(a){a=c.apply(this,
+arguments);if(mxClient.IS_SVG){var b=this.editorUi,d=b.editor.graph;a.appendChild(this.createOption(mxResources.get("shadow"),function(){return d.shadowVisible},function(a){d.setShadowVisible(!d.shadowVisible)},{install:function(a){this.listener=function(){a(d.shadowVisible)};b.addListener("shadowVisibleChanged",this.listener)},destroy:function(){b.removeListener(this.listener)}}))}return a};var f=DiagramFormatPanel.prototype.addOptions;DiagramFormatPanel.prototype.addOptions=function(a){a=f.apply(this,
+arguments);var c=this.editorUi;if(c.editor.graph.isEnabled()){var b=c.getCurrentFile();null!=b&&b.isAutosaveOptional()&&(b=this.createOption(mxResources.get("autosave"),function(){return c.editor.autosave},function(a){c.editor.setAutosave(a)},{install:function(a){this.listener=function(){a(c.editor.autosave)};c.editor.addListener("autosaveChanged",this.listener)},destroy:function(){c.editor.removeListener(this.listener)}}),a.appendChild(b))}return a};StyleFormatPanel.prototype.defaultColorSchemes=
+[[null,{fill:"#f5f5f5",stroke:"#666666"},{fill:"#dae8fc",stroke:"#6c8ebf"},{fill:"#d5e8d4",stroke:"#82b366"},{fill:"#ffe6cc",stroke:"#d79b00"},{fill:"#fff2cc",stroke:"#d6b656"},{fill:"#f8cecc",stroke:"#b85450"},{fill:"#e1d5e7",stroke:"#9673a6"}],[null,{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"}],[null,{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"}]];var g=StyleFormatPanel.prototype.init;StyleFormatPanel.prototype.init=function(){"image"!=this.format.createSelectionState().style.shape&&this.container.appendChild(this.addStyles(this.createPanel()));
+g.apply(this,arguments)};var p=StyleFormatPanel.prototype.addStyleOps;StyleFormatPanel.prototype.addStyleOps=function(a){var c=mxUtils.button(mxResources.get("copyStyle"),mxUtils.bind(this,function(a){this.editorUi.actions.get("copyStyle").funct()}));c.setAttribute("title",mxResources.get("copyStyle")+" ("+this.editorUi.actions.get("copyStyle").shortcut+")");c.style.marginBottom="2px";c.style.width="100px";c.style.marginRight="2px";a.appendChild(c);c=mxUtils.button(mxResources.get("pasteStyle"),mxUtils.bind(this,
+function(a){this.editorUi.actions.get("pasteStyle").funct()}));c.setAttribute("title",mxResources.get("pasteStyle")+" ("+this.editorUi.actions.get("pasteStyle").shortcut+")");c.style.marginBottom="2px";c.style.width="100px";a.appendChild(c);mxUtils.br(a);return p.apply(this,arguments)};StyleFormatPanel.prototype.addStyles=function(a){function c(a){function c(a){var c=mxUtils.button("",function(c){d.getModel().beginUpdate();try{var b=d.getSelectionCells();for(c=0;c<b.length;c++){for(var f=d.getModel().getStyle(b[c]),
+e=0;e<g.length;e++)f=mxUtils.removeStylename(f,g[e]);null!=a?(f=mxUtils.setStyle(f,mxConstants.STYLE_FILLCOLOR,a.fill),f=mxUtils.setStyle(f,mxConstants.STYLE_STROKECOLOR,a.stroke),f=mxUtils.setStyle(f,mxConstants.STYLE_GRADIENTCOLOR,a.gradient)):(f=mxUtils.setStyle(f,mxConstants.STYLE_FILLCOLOR,"#ffffff"),f=mxUtils.setStyle(f,mxConstants.STYLE_STROKECOLOR,"#000000"),f=mxUtils.setStyle(f,mxConstants.STYLE_GRADIENTCOLOR,null));d.getModel().setStyle(b[c],f)}}finally{d.getModel().endUpdate()}});c.className=
+"geStyleButton";c.style.width="36px";c.style.height="30px";c.style.margin="0px 6px 6px 0px";null!=a?(null!=a.gradient?mxClient.IS_IE&&(mxClient.IS_QUIRKS||10>document.documentMode)?c.style.filter="progid:DXImageTransform.Microsoft.Gradient(StartColorStr='"+a.fill+"', EndColorStr='"+a.gradient+"', GradientType=0)":c.style.backgroundImage="linear-gradient("+a.fill+" 0px,"+a.gradient+" 100%)":c.style.backgroundColor=a.fill,c.style.border="1px solid "+a.stroke):(c.style.backgroundColor="#ffffff",c.style.border=
+"1px solid #000000");f.appendChild(c)}f.innerHTML="";for(var b=0;b<a.length;b++)0<b&&0==mxUtils.mod(b,4)&&mxUtils.br(f),c(a[b])}function b(a){mxEvent.addListener(a,"mouseenter",function(){a.style.opacity="1"});mxEvent.addListener(a,"mouseleave",function(){a.style.opacity="0.5"})}var d=this.editorUi.editor.graph,f=document.createElement("div");f.style.whiteSpace="normal";f.style.paddingLeft="24px";f.style.paddingRight="20px";a.style.paddingLeft="16px";a.style.paddingBottom="6px";a.style.position="relative";
+a.appendChild(f);var g="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".split(" ");null==this.editorUi.currentScheme&&(this.editorUi.currentScheme=0);var e=document.createElement("div");e.style.cssText="position:absolute;left:10px;top:8px;bottom:8px;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(e,"click",mxUtils.bind(this,function(){this.editorUi.currentScheme=mxUtils.mod(this.editorUi.currentScheme-1,this.defaultColorSchemes.length);c(this.defaultColorSchemes[this.editorUi.currentScheme])}));var k=document.createElement("div");k.style.cssText="position:absolute;left:202px;top:8px;bottom:8px;width:20px;margin:4px;opacity:0.5;background-repeat:no-repeat;background-position:center center;background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAwAAAAQBAMAAADQT4M0AAAAIVBMVEUAAAB2dnZ2dnZ2dnZ2dnZ2dnZ2dnZ2dnZ2dnZ2dnZ2dnYBuwCcAAAACnRSTlMAfCTkhhvb7cQSPH2JPgAAADZJREFUCNdjQAOMAmBKaiGY8loF5rKswsZlrVo8AUiFrTICcbIWK8A5DF1gDoMymMPApIAwHwCS0Qx/U7qCBQAAAABJRU5ErkJggg==);";
+1<this.defaultColorSchemes.length&&(a.appendChild(e),a.appendChild(k));mxEvent.addListener(k,"click",mxUtils.bind(this,function(){this.editorUi.currentScheme=mxUtils.mod(this.editorUi.currentScheme+1,this.defaultColorSchemes.length);c(this.defaultColorSchemes[this.editorUi.currentScheme])}));b(e);b(k);c(this.defaultColorSchemes[this.editorUi.currentScheme]);return a};StyleFormatPanel.prototype.addEditOps=function(a){var c=this.format.getSelectionState(),b=null;1==this.editorUi.editor.graph.getSelectionCount()&&
+(b=mxUtils.button(mxResources.get("editStyle"),mxUtils.bind(this,function(a){this.editorUi.actions.get("editStyle").funct()})),b.setAttribute("title",mxResources.get("editStyle")+" ("+this.editorUi.actions.get("editStyle").shortcut+")"),b.style.width="202px",b.style.marginBottom="2px",a.appendChild(b));var d=this.editorUi.editor.graph,f=d.view.getState(d.getSelectionCell());1==d.getSelectionCount()&&null!=f&&null!=f.shape&&null!=f.shape.stencil?(c=mxUtils.button(mxResources.get("editShape"),mxUtils.bind(this,
 function(a){this.editorUi.actions.get("editShape").funct()})),c.setAttribute("title",mxResources.get("editShape")),c.style.marginBottom="2px",null==b?c.style.width="202px":(b.style.width="100px",c.style.width="100px",c.style.marginLeft="2px"),a.appendChild(c)):c.image&&(c=mxUtils.button(mxResources.get("editImage"),mxUtils.bind(this,function(a){this.editorUi.actions.get("image").funct()})),c.setAttribute("title",mxResources.get("editImage")),c.style.marginBottom="2px",null==b?c.style.width="202px":
-(b.style.width="100px",c.style.width="100px",c.style.marginLeft="2px"),a.appendChild(c));return a}}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.edgeMode="move"!=urlParams.edge;var n=Graph.prototype.init;Graph.prototype.init=function(){function a(a){c=a;if(mxClient.IS_QUIRKS||
-7==document.documentMode||8==document.documentMode)c=mxUtils.clone(a)}n.apply(this,arguments);var c=null;mxEvent.addListener(this.container,"mouseenter",a);mxEvent.addListener(this.container,"mousemove",a);mxEvent.addListener(this.container,"mouseleave",function(a){c=null});this.isMouseInsertPoint=function(){return null!=c};var b=this.getInsertPoint;this.getInsertPoint=function(){return null!=c?this.getPointForEvent(c):b.apply(this,arguments)};var f=this.layoutManager.getLayout;this.layoutManager.getLayout=
+(b.style.width="100px",c.style.width="100px",c.style.marginLeft="2px"),a.appendChild(c));return a}}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.edgeMode="move"!=urlParams.edge;var m=Graph.prototype.init;Graph.prototype.init=function(){function a(a){c=a;if(mxClient.IS_QUIRKS||
+7==document.documentMode||8==document.documentMode)c=mxUtils.clone(a)}m.apply(this,arguments);var c=null;mxEvent.addListener(this.container,"mouseenter",a);mxEvent.addListener(this.container,"mousemove",a);mxEvent.addListener(this.container,"mouseleave",function(a){c=null});this.isMouseInsertPoint=function(){return null!=c};var b=this.getInsertPoint;this.getInsertPoint=function(){return null!=c?this.getPointForEvent(c):b.apply(this,arguments)};var d=this.layoutManager.getLayout;this.layoutManager.getLayout=
 function(a){var c=this.graph.view.getState(a),c=null!=c?c.style:this.graph.getCellStyle(a);if("undefined"!=typeof mxRackContainer&&"rack"==c.childLayout){var b=new mxStackLayout(this.graph,!1);b.setChildGeometry=function(a,c){c.height=Math.max(c.height,20);if(1<c.height/20){var b=c.height%20;c.height+=10<b?20-b:-b}this.graph.getModel().setGeometry(a,c)};b.fill=!0;b.unitSize=mxRackContainer.unitSize|20;b.marginLeft=c.marginLeft||0;b.marginRight=c.marginRight||0;b.marginTop=c.marginTop||0;b.marginBottom=
-c.marginBottom||0;b.resizeParent=!1;return b}return f.apply(this,arguments)}};var u=Graph.prototype.loadStylesheet;Graph.prototype.loadStylesheet=function(){u.apply(this,arguments);this.currentStyle="default-style2"};Graph.prototype.isPageLink=function(a){return null!=a&&"data:page/"==a.substring(0,10)};Graph.prototype.addSvgShadow=function(a,c,b){b=null!=b?b:!1;var f=a.ownerDocument,d=null!=f.createElementNS?f.createElementNS(mxConstants.NS_SVG,"filter"):f.createElement("filter");d.setAttribute("id",
-this.shadowId);var e=null!=f.createElementNS?f.createElementNS(mxConstants.NS_SVG,"feGaussianBlur"):f.createElement("feGaussianBlur");e.setAttribute("in","SourceAlpha");e.setAttribute("stdDeviation","1.7");e.setAttribute("result","blur");d.appendChild(e);e=null!=f.createElementNS?f.createElementNS(mxConstants.NS_SVG,"feOffset"):f.createElement("feOffset");e.setAttribute("in","blur");e.setAttribute("dx","3");e.setAttribute("dy","3");e.setAttribute("result","offsetBlur");d.appendChild(e);e=null!=f.createElementNS?
-f.createElementNS(mxConstants.NS_SVG,"feFlood"):f.createElement("feFlood");e.setAttribute("flood-color","#3D4574");e.setAttribute("flood-opacity","0.4");e.setAttribute("result","offsetColor");d.appendChild(e);e=null!=f.createElementNS?f.createElementNS(mxConstants.NS_SVG,"feComposite"):f.createElement("feComposite");e.setAttribute("in","offsetColor");e.setAttribute("in2","offsetBlur");e.setAttribute("operator","in");e.setAttribute("result","offsetBlur");d.appendChild(e);e=null!=f.createElementNS?
-f.createElementNS(mxConstants.NS_SVG,"feBlend"):f.createElement("feBlend");e.setAttribute("in","SourceGraphic");e.setAttribute("in2","offsetBlur");d.appendChild(e);e=a.getElementsByTagName("defs");0==e.length?(f=null!=f.createElementNS?f.createElementNS(mxConstants.NS_SVG,"defs"):f.createElement("defs"),null!=a.firstChild?a.insertBefore(f,a.firstChild):a.appendChild(f)):f=e[0];f.appendChild(d);b||((c||a.getElementsByTagName("g")[0]).setAttribute("filter","url(#"+this.shadowId+")"),isNaN(parseInt(a.getAttribute("width")))||
-(a.setAttribute("width",parseInt(a.getAttribute("width"))+6),a.setAttribute("height",parseInt(a.getAttribute("height"))+6)));return d};Graph.prototype.setShadowVisible=function(a,c){mxClient.IS_SVG&&(c=null!=c?c:!0,(this.shadowVisible=a)?this.view.getDrawPane().setAttribute("filter","url(#"+this.shadowId+")"):this.view.getDrawPane().removeAttribute("filter"),c&&this.fireEvent(new mxEventObject("shadowVisibleChanged")))};Graph.prototype.selectUnlockedLayer=function(){if(null==this.defaultParent){var a=
+c.marginBottom||0;b.resizeParent=!1;return b}return d.apply(this,arguments)}};var u=Graph.prototype.loadStylesheet;Graph.prototype.loadStylesheet=function(){u.apply(this,arguments);this.currentStyle="default-style2"};Graph.prototype.isPageLink=function(a){return null!=a&&"data:page/"==a.substring(0,10)};Graph.prototype.addSvgShadow=function(a,c,b){b=null!=b?b:!1;var d=a.ownerDocument,f=null!=d.createElementNS?d.createElementNS(mxConstants.NS_SVG,"filter"):d.createElement("filter");f.setAttribute("id",
+this.shadowId);var g=null!=d.createElementNS?d.createElementNS(mxConstants.NS_SVG,"feGaussianBlur"):d.createElement("feGaussianBlur");g.setAttribute("in","SourceAlpha");g.setAttribute("stdDeviation","1.7");g.setAttribute("result","blur");f.appendChild(g);g=null!=d.createElementNS?d.createElementNS(mxConstants.NS_SVG,"feOffset"):d.createElement("feOffset");g.setAttribute("in","blur");g.setAttribute("dx","3");g.setAttribute("dy","3");g.setAttribute("result","offsetBlur");f.appendChild(g);g=null!=d.createElementNS?
+d.createElementNS(mxConstants.NS_SVG,"feFlood"):d.createElement("feFlood");g.setAttribute("flood-color","#3D4574");g.setAttribute("flood-opacity","0.4");g.setAttribute("result","offsetColor");f.appendChild(g);g=null!=d.createElementNS?d.createElementNS(mxConstants.NS_SVG,"feComposite"):d.createElement("feComposite");g.setAttribute("in","offsetColor");g.setAttribute("in2","offsetBlur");g.setAttribute("operator","in");g.setAttribute("result","offsetBlur");f.appendChild(g);g=null!=d.createElementNS?
+d.createElementNS(mxConstants.NS_SVG,"feBlend"):d.createElement("feBlend");g.setAttribute("in","SourceGraphic");g.setAttribute("in2","offsetBlur");f.appendChild(g);g=a.getElementsByTagName("defs");0==g.length?(d=null!=d.createElementNS?d.createElementNS(mxConstants.NS_SVG,"defs"):d.createElement("defs"),null!=a.firstChild?a.insertBefore(d,a.firstChild):a.appendChild(d)):d=g[0];d.appendChild(f);b||((c||a.getElementsByTagName("g")[0]).setAttribute("filter","url(#"+this.shadowId+")"),isNaN(parseInt(a.getAttribute("width")))||
+(a.setAttribute("width",parseInt(a.getAttribute("width"))+6),a.setAttribute("height",parseInt(a.getAttribute("height"))+6)));return f};Graph.prototype.setShadowVisible=function(a,c){mxClient.IS_SVG&&(c=null!=c?c:!0,(this.shadowVisible=a)?this.view.getDrawPane().setAttribute("filter","url(#"+this.shadowId+")"):this.view.getDrawPane().removeAttribute("filter"),c&&this.fireEvent(new mxEventObject("shadowVisibleChanged")))};Graph.prototype.selectUnlockedLayer=function(){if(null==this.defaultParent){var a=
 this.model.getChildCount(this.model.root),c,b=0;do c=this.model.getChildAt(this.model.root,b);while(b++<a&&"1"==mxUtils.getValue(this.getCellStyle(c),"locked","0"));null!=c&&this.setDefaultParent(c)}};mxStencilRegistry.libraries.mockup=[SHAPES_PATH+"/mockup/mxMockupButtons.js"];mxStencilRegistry.libraries.arrows2=[SHAPES_PATH+"/mxArrows.js"];mxStencilRegistry.libraries.atlassian=[STENCIL_PATH+"/atlassian.xml"];mxStencilRegistry.libraries.bpmn=[SHAPES_PATH+"/bpmn/mxBpmnShape2.js",STENCIL_PATH+"/bpmn.xml"];
 mxStencilRegistry.libraries.er=[SHAPES_PATH+"/er/mxER.js"];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/transmission"]=[SHAPES_PATH+"/mxElectrical.js",STENCIL_PATH+"/electrical/transmission.xml"];mxStencilRegistry.libraries["mockup/buttons"]=[SHAPES_PATH+"/mockup/mxMockupButtons.js"];mxStencilRegistry.libraries["mockup/containers"]=
@@ -2621,285 +2622,285 @@ mxStencilRegistry.libraries.er=[SHAPES_PATH+"/er/mxER.js"];mxStencilRegistry.lib
 [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",STENCIL_PATH+"/bootstrap.xml"];mxStencilRegistry.libraries.gmdl=[SHAPES_PATH+"/mxGmdl.js",STENCIL_PATH+"/gmdl.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.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(a){var c=null;null!=a&&0<a.length&&("ER"==a.substring(0,2)?c="mxgraph.er":"sysML"==a.substring(0,5)&&(c="mxgraph.sysml"));return c};
-var r=mxMarker.createMarker;mxMarker.createMarker=function(a,c,b,f,d,e,h,m,n,g){if(null!=b&&null==mxMarker.markers[b]){var k=this.getPackageForType(b);null!=k&&mxStencilRegistry.getStencil(k)}return r.apply(this,arguments)};PrintDialog.prototype.create=function(a,c){function b(){u.value=Math.max(1,Math.min(k,Math.max(parseInt(u.value),parseInt(t.value))));t.value=Math.max(1,Math.min(k,Math.min(parseInt(u.value),parseInt(t.value))))}function f(c){function b(c,b,d){var e=c.getGraphBounds(),h=0,k=0,
-m=Y.get(),n=1/c.pageScale,r=K.checked;if(r)var n=parseInt(P.value),g=parseInt(S.value),n=Math.min(m.height*g/(e.height/c.view.scale),m.width*n/(e.width/c.view.scale));else n=parseInt(q.value)/(100*c.pageScale),isNaN(n)&&(f=1/c.pageScale,q.value="100 %");m=mxRectangle.fromRectangle(m);m.width=Math.ceil(m.width*f);m.height=Math.ceil(m.height*f);n*=f;!r&&c.pageVisible?(e=c.getPageLayout(),h-=e.x*m.width,k-=e.y*m.height):r=!0;if(null==b){b=PrintDialog.createPrintPreview(c,n,m,0,h,k,r);b.pageSelector=
-!1;b.mathEnabled=!1;c=a.getCurrentFile();null!=c&&(b.title=c.getTitle());var t=b.writeHead;b.writeHead=function(c){t.apply(this,arguments);null!=a.editor.fontCss&&(c.writeln('<style type="text/css">'),c.writeln(a.editor.fontCss),c.writeln("</style>"))};if("undefined"!==typeof MathJax){var u=b.renderPage;b.renderPage=function(a,c,b,f,d,e){var h=u.apply(this,arguments);this.graph.mathEnabled?this.mathEnabled=!0:h.className="geDisableMathJax";return h}}b.open(null,null,d,!0)}else{m=c.background;if(null==
-m||""==m||m==mxConstants.NONE)m="#ffffff";b.backgroundColor=m;b.autoOrigin=r;b.appendGraph(c,n,h,k,d,!0)}return b}var f=parseInt(X.value)/100;isNaN(f)&&(f=1,X.value="100 %");var f=.75*f,e=t.value,h=u.value,k=!r.checked,n=null;k&&(k=e==m&&h==m);if(!k&&null!=a.pages&&a.pages.length){var g=0,k=a.pages.length-1;r.checked||(g=parseInt(e)-1,k=parseInt(h)-1);for(var l=g;l<=k;l++){var v=a.pages[l],e=v==a.currentPage?d:null;if(null==e){var e=a.createTemporaryGraph(d.getStylesheet()),h=!0,g=!1,p=null,z=null;
-null==v.viewState&&null==v.mapping&&null==v.root&&a.updatePageRoot(v);null!=v.viewState?(h=v.viewState.pageVisible,g=v.viewState.mathEnabled,p=v.viewState.background,z=v.viewState.backgroundImage):null!=v.mapping&&null!=v.mapping.diagramMap&&(g="0"!=v.mapping.diagramMap.get("mathEnabled"),p=v.mapping.diagramMap.get("background"),z=v.mapping.diagramMap.get("backgroundImage"),z=null!=z&&0<z.length?JSON.parse(z):null);e.background=p;e.backgroundImage=null!=z?new mxImage(z.src,z.width,z.height):null;
-e.pageVisible=h;e.mathEnabled=g;var J=e.getGlobalVariable;e.getGlobalVariable=function(a){return"page"==a?v.getName():"pagenumber"==a?l+1:J.apply(this,arguments)};document.body.appendChild(e.container);a.updatePageRoot(v);e.model.setRoot(v.root)}n=b(e,n,l!=k);e!=d&&e.container.parentNode.removeChild(e.container)}}else n=b(d);n.mathEnabled&&(k=n.wnd.document,k.writeln('<script type="text/x-mathjax-config">'),k.writeln("MathJax.Hub.Config({"),k.writeln('messageStyle: "none",'),k.writeln('jax: ["input/TeX", "input/MathML", "input/AsciiMath", "output/HTML-CSS"],'),
+var r=mxMarker.createMarker;mxMarker.createMarker=function(a,c,b,d,f,g,e,p,m,h){if(null!=b&&null==mxMarker.markers[b]){var k=this.getPackageForType(b);null!=k&&mxStencilRegistry.getStencil(k)}return r.apply(this,arguments)};PrintDialog.prototype.create=function(a,c){function b(){v.value=Math.max(1,Math.min(k,Math.max(parseInt(v.value),parseInt(u.value))));u.value=Math.max(1,Math.min(k,Math.min(parseInt(v.value),parseInt(u.value))))}function d(c){function b(c,b,f){var g=c.getGraphBounds(),e=0,k=0,
+p=W.get(),m=1/c.pageScale,r=I.checked;if(r)var m=parseInt(K.value),h=parseInt(U.value),m=Math.min(p.height*h/(g.height/c.view.scale),p.width*m/(g.width/c.view.scale));else m=parseInt(q.value)/(100*c.pageScale),isNaN(m)&&(d=1/c.pageScale,q.value="100 %");p=mxRectangle.fromRectangle(p);p.width=Math.ceil(p.width*d);p.height=Math.ceil(p.height*d);m*=d;!r&&c.pageVisible?(g=c.getPageLayout(),e-=g.x*p.width,k-=g.y*p.height):r=!0;if(null==b){b=PrintDialog.createPrintPreview(c,m,p,0,e,k,r);b.pageSelector=
+!1;b.mathEnabled=!1;c=a.getCurrentFile();null!=c&&(b.title=c.getTitle());var t=b.writeHead;b.writeHead=function(c){t.apply(this,arguments);null!=a.editor.fontCss&&(c.writeln('<style type="text/css">'),c.writeln(a.editor.fontCss),c.writeln("</style>"))};if("undefined"!==typeof MathJax){var u=b.renderPage;b.renderPage=function(a,c,b,d,f,g){var e=u.apply(this,arguments);this.graph.mathEnabled?this.mathEnabled=!0:e.className="geDisableMathJax";return e}}b.open(null,null,f,!0)}else{p=c.background;if(null==
+p||""==p||p==mxConstants.NONE)p="#ffffff";b.backgroundColor=p;b.autoOrigin=r;b.appendGraph(c,m,e,k,f,!0)}return b}var d=parseInt(X.value)/100;isNaN(d)&&(d=1,X.value="100 %");var d=.75*d,g=u.value,e=v.value,k=!h.checked,m=null;k&&(k=g==p&&e==p);if(!k&&null!=a.pages&&a.pages.length){var r=0,k=a.pages.length-1;h.checked||(r=parseInt(g)-1,k=parseInt(e)-1);for(var t=r;t<=k;t++){var l=a.pages[t],g=l==a.currentPage?f:null;if(null==g){var g=a.createTemporaryGraph(f.getStylesheet()),e=!0,r=!1,n=null,y=null;
+null==l.viewState&&null==l.mapping&&null==l.root&&a.updatePageRoot(l);null!=l.viewState?(e=l.viewState.pageVisible,r=l.viewState.mathEnabled,n=l.viewState.background,y=l.viewState.backgroundImage):null!=l.mapping&&null!=l.mapping.diagramMap&&(r="0"!=l.mapping.diagramMap.get("mathEnabled"),n=l.mapping.diagramMap.get("background"),y=l.mapping.diagramMap.get("backgroundImage"),y=null!=y&&0<y.length?JSON.parse(y):null);g.background=n;g.backgroundImage=null!=y?new mxImage(y.src,y.width,y.height):null;
+g.pageVisible=e;g.mathEnabled=r;var x=g.getGlobalVariable;g.getGlobalVariable=function(a){return"page"==a?l.getName():"pagenumber"==a?t+1:x.apply(this,arguments)};document.body.appendChild(g.container);a.updatePageRoot(l);g.model.setRoot(l.root)}m=b(g,m,t!=k);g!=f&&g.container.parentNode.removeChild(g.container)}}else m=b(f);m.mathEnabled&&(k=m.wnd.document,k.writeln('<script type="text/x-mathjax-config">'),k.writeln("MathJax.Hub.Config({"),k.writeln('messageStyle: "none",'),k.writeln('jax: ["input/TeX", "input/MathML", "input/AsciiMath", "output/HTML-CSS"],'),
 k.writeln('extensions: ["tex2jax.js", "mml2jax.js", "asciimath2jax.js"],'),k.writeln("TeX: {"),k.writeln('extensions: ["AMSmath.js", "AMSsymbols.js", "noErrors.js", "noUndefined.js"]'),k.writeln("},"),k.writeln("tex2jax: {"),k.writeln('\tignoreClass: "geDisableMathJax"'),k.writeln("},"),k.writeln("asciimath2jax: {"),k.writeln('\tignoreClass: "geDisableMathJax"'),k.writeln("}"),k.writeln("});"),c&&(k.writeln("MathJax.Hub.Queue(function () {"),k.writeln("window.print();"),k.writeln("});")),k.writeln("\x3c/script>"),
-k.writeln('<script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.0/MathJax.js">\x3c/script>'));n.closeDocument();!n.mathEnabled&&c&&PrintDialog.printPreview(n)}var d=a.editor.graph,e=document.createElement("div"),h=document.createElement("h3");h.style.width="100%";h.style.textAlign="center";h.style.marginTop="0px";mxUtils.write(h,c||mxResources.get("print"));e.appendChild(h);var k=1,m=1,n=document.createElement("div");n.style.cssText="border-bottom:1px solid lightGray;padding-bottom:12px;margin-bottom:12px;";
-var r=document.createElement("input");r.style.cssText="margin-right:8px;margin-bottom:8px;";r.setAttribute("value","all");r.setAttribute("type","radio");r.setAttribute("name","pages-printdialog");n.appendChild(r);h=document.createElement("span");mxUtils.write(h,mxResources.get("printAllPages"));n.appendChild(h);mxUtils.br(n);var g=r.cloneNode(!0);r.setAttribute("checked","checked");g.setAttribute("value","range");n.appendChild(g);h=document.createElement("span");mxUtils.write(h,mxResources.get("pages")+
-":");n.appendChild(h);var t=document.createElement("input");t.style.cssText="margin:0 8px 0 8px;";t.setAttribute("value","1");t.setAttribute("type","number");t.setAttribute("min","1");t.style.width="50px";n.appendChild(t);h=document.createElement("span");mxUtils.write(h,mxResources.get("to"));n.appendChild(h);var u=t.cloneNode(!0);n.appendChild(u);mxEvent.addListener(t,"focus",function(){g.checked=!0});mxEvent.addListener(u,"focus",function(){g.checked=!0});mxEvent.addListener(t,"change",b);mxEvent.addListener(u,
-"change",b);if(null!=a.pages&&(k=a.pages.length,null!=a.currentPage))for(h=0;h<a.pages.length;h++)if(a.currentPage==a.pages[h]){m=h+1;t.value=m;u.value=m;break}t.setAttribute("max",k);u.setAttribute("max",k);1<k&&e.appendChild(n);var l=document.createElement("div");l.style.marginBottom="10px";var p=document.createElement("input");p.style.marginRight="8px";p.setAttribute("value","adjust");p.setAttribute("type","radio");p.setAttribute("name","printZoom");l.appendChild(p);h=document.createElement("span");
-mxUtils.write(h,mxResources.get("adjustTo"));l.appendChild(h);var q=document.createElement("input");q.style.cssText="margin:0 8px 0 8px;";q.setAttribute("value","100 %");q.style.width="50px";l.appendChild(q);mxEvent.addListener(q,"focus",function(){p.checked=!0});e.appendChild(l);var n=n.cloneNode(!1),K=p.cloneNode(!0);K.setAttribute("value","fit");p.setAttribute("checked","checked");h=document.createElement("div");h.style.cssText="display:inline-block;height:100%;vertical-align:top;padding-top:2px;";
-h.appendChild(K);n.appendChild(h);l=document.createElement("table");l.style.display="inline-block";var U=document.createElement("tbody"),G=document.createElement("tr"),L=G.cloneNode(!0),Q=document.createElement("td"),E=Q.cloneNode(!0),V=Q.cloneNode(!0),O=Q.cloneNode(!0),W=Q.cloneNode(!0),R=Q.cloneNode(!0);Q.style.textAlign="right";O.style.textAlign="right";mxUtils.write(Q,mxResources.get("fitTo"));var P=document.createElement("input");P.style.cssText="margin:0 8px 0 8px;";P.setAttribute("value","1");
-P.setAttribute("min","1");P.setAttribute("type","number");P.style.width="40px";E.appendChild(P);h=document.createElement("span");mxUtils.write(h,mxResources.get("fitToSheetsAcross"));V.appendChild(h);mxUtils.write(O,mxResources.get("fitToBy"));var S=P.cloneNode(!0);W.appendChild(S);mxEvent.addListener(P,"focus",function(){K.checked=!0});mxEvent.addListener(S,"focus",function(){K.checked=!0});h=document.createElement("span");mxUtils.write(h,mxResources.get("fitToSheetsDown"));R.appendChild(h);G.appendChild(Q);
-G.appendChild(E);G.appendChild(V);L.appendChild(O);L.appendChild(W);L.appendChild(R);U.appendChild(G);U.appendChild(L);l.appendChild(U);n.appendChild(l);e.appendChild(n);n=document.createElement("div");h=document.createElement("div");h.style.fontWeight="bold";h.style.marginBottom="12px";mxUtils.write(h,mxResources.get("paperSize"));n.appendChild(h);h=document.createElement("div");h.style.marginBottom="12px";var Y=PageSetupDialog.addPageFormatPanel(h,"printdialog",a.editor.graph.pageFormat||mxConstants.PAGE_FORMAT_A4_PORTRAIT);
-n.appendChild(h);h=document.createElement("span");mxUtils.write(h,mxResources.get("pageScale"));n.appendChild(h);var X=document.createElement("input");X.style.cssText="margin:0 8px 0 8px;";X.setAttribute("value","100 %");X.style.width="60px";n.appendChild(X);e.appendChild(n);h=document.createElement("div");h.style.cssText="text-align:right;margin:62px 0 0 0;";n=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog()});n.className="geBtn";a.editor.cancelFirst&&h.appendChild(n);a.isOffline()||
-(l=mxUtils.button(mxResources.get("help"),function(){window.open("https://desk.draw.io/support/solutions/articles/16000048947")}),l.className="geBtn",h.appendChild(l));PrintDialog.previewEnabled&&(l=mxUtils.button(mxResources.get("preview"),function(){a.hideDialog();f(!1)}),l.className="geBtn",h.appendChild(l));l=mxUtils.button(mxResources.get(PrintDialog.previewEnabled?"print":"ok"),function(){a.hideDialog();f(!0)});l.className="geBtn gePrimaryBtn";h.appendChild(l);a.editor.cancelFirst||h.appendChild(n);
-e.appendChild(h);this.container=e}})();(function(){EditorUi.VERSION="@DRAWIO-VERSION@";EditorUi.compactUi="atlas"!=uiTheme;EditorUi.enableLogging=/.*\.draw\.io$/.test(window.location.hostname);EditorUi.enablePlantUml=EditorUi.enableLogging;EditorUi.isElectronApp=null!=window&&null!=window.process&&null!=window.process.versions&&null!=window.process.versions.electron;EditorUi.prototype.emptyDiagramXml='<mxGraphModel><root><mxCell id="0"/><mxCell id="1" parent="0"/></root></mxGraphModel>';EditorUi.prototype.emptyLibraryXml="<mxlibrary>[]</mxlibrary>";
+k.writeln('<script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.0/MathJax.js">\x3c/script>'));m.closeDocument();!m.mathEnabled&&c&&PrintDialog.printPreview(m)}var f=a.editor.graph,g=document.createElement("div"),e=document.createElement("h3");e.style.width="100%";e.style.textAlign="center";e.style.marginTop="0px";mxUtils.write(e,c||mxResources.get("print"));g.appendChild(e);var k=1,p=1,m=document.createElement("div");m.style.cssText="border-bottom:1px solid lightGray;padding-bottom:12px;margin-bottom:12px;";
+var h=document.createElement("input");h.style.cssText="margin-right:8px;margin-bottom:8px;";h.setAttribute("value","all");h.setAttribute("type","radio");h.setAttribute("name","pages-printdialog");m.appendChild(h);e=document.createElement("span");mxUtils.write(e,mxResources.get("printAllPages"));m.appendChild(e);mxUtils.br(m);var r=h.cloneNode(!0);h.setAttribute("checked","checked");r.setAttribute("value","range");m.appendChild(r);e=document.createElement("span");mxUtils.write(e,mxResources.get("pages")+
+":");m.appendChild(e);var u=document.createElement("input");u.style.cssText="margin:0 8px 0 8px;";u.setAttribute("value","1");u.setAttribute("type","number");u.setAttribute("min","1");u.style.width="50px";m.appendChild(u);e=document.createElement("span");mxUtils.write(e,mxResources.get("to"));m.appendChild(e);var v=u.cloneNode(!0);m.appendChild(v);mxEvent.addListener(u,"focus",function(){r.checked=!0});mxEvent.addListener(v,"focus",function(){r.checked=!0});mxEvent.addListener(u,"change",b);mxEvent.addListener(v,
+"change",b);if(null!=a.pages&&(k=a.pages.length,null!=a.currentPage))for(e=0;e<a.pages.length;e++)if(a.currentPage==a.pages[e]){p=e+1;u.value=p;v.value=p;break}u.setAttribute("max",k);v.setAttribute("max",k);1<k&&g.appendChild(m);var l=document.createElement("div");l.style.marginBottom="10px";var n=document.createElement("input");n.style.marginRight="8px";n.setAttribute("value","adjust");n.setAttribute("type","radio");n.setAttribute("name","printZoom");l.appendChild(n);e=document.createElement("span");
+mxUtils.write(e,mxResources.get("adjustTo"));l.appendChild(e);var q=document.createElement("input");q.style.cssText="margin:0 8px 0 8px;";q.setAttribute("value","100 %");q.style.width="50px";l.appendChild(q);mxEvent.addListener(q,"focus",function(){n.checked=!0});g.appendChild(l);var m=m.cloneNode(!1),I=n.cloneNode(!0);I.setAttribute("value","fit");n.setAttribute("checked","checked");e=document.createElement("div");e.style.cssText="display:inline-block;height:100%;vertical-align:top;padding-top:2px;";
+e.appendChild(I);m.appendChild(e);l=document.createElement("table");l.style.display="inline-block";var S=document.createElement("tbody"),H=document.createElement("tr"),L=H.cloneNode(!0),Q=document.createElement("td"),G=Q.cloneNode(!0),V=Q.cloneNode(!0),M=Q.cloneNode(!0),Y=Q.cloneNode(!0),T=Q.cloneNode(!0);Q.style.textAlign="right";M.style.textAlign="right";mxUtils.write(Q,mxResources.get("fitTo"));var K=document.createElement("input");K.style.cssText="margin:0 8px 0 8px;";K.setAttribute("value","1");
+K.setAttribute("min","1");K.setAttribute("type","number");K.style.width="40px";G.appendChild(K);e=document.createElement("span");mxUtils.write(e,mxResources.get("fitToSheetsAcross"));V.appendChild(e);mxUtils.write(M,mxResources.get("fitToBy"));var U=K.cloneNode(!0);Y.appendChild(U);mxEvent.addListener(K,"focus",function(){I.checked=!0});mxEvent.addListener(U,"focus",function(){I.checked=!0});e=document.createElement("span");mxUtils.write(e,mxResources.get("fitToSheetsDown"));T.appendChild(e);H.appendChild(Q);
+H.appendChild(G);H.appendChild(V);L.appendChild(M);L.appendChild(Y);L.appendChild(T);S.appendChild(H);S.appendChild(L);l.appendChild(S);m.appendChild(l);g.appendChild(m);m=document.createElement("div");e=document.createElement("div");e.style.fontWeight="bold";e.style.marginBottom="12px";mxUtils.write(e,mxResources.get("paperSize"));m.appendChild(e);e=document.createElement("div");e.style.marginBottom="12px";var W=PageSetupDialog.addPageFormatPanel(e,"printdialog",a.editor.graph.pageFormat||mxConstants.PAGE_FORMAT_A4_PORTRAIT);
+m.appendChild(e);e=document.createElement("span");mxUtils.write(e,mxResources.get("pageScale"));m.appendChild(e);var X=document.createElement("input");X.style.cssText="margin:0 8px 0 8px;";X.setAttribute("value","100 %");X.style.width="60px";m.appendChild(X);g.appendChild(m);e=document.createElement("div");e.style.cssText="text-align:right;margin:62px 0 0 0;";m=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog()});m.className="geBtn";a.editor.cancelFirst&&e.appendChild(m);a.isOffline()||
+(l=mxUtils.button(mxResources.get("help"),function(){window.open("https://desk.draw.io/support/solutions/articles/16000048947")}),l.className="geBtn",e.appendChild(l));PrintDialog.previewEnabled&&(l=mxUtils.button(mxResources.get("preview"),function(){a.hideDialog();d(!1)}),l.className="geBtn",e.appendChild(l));l=mxUtils.button(mxResources.get(PrintDialog.previewEnabled?"print":"ok"),function(){a.hideDialog();d(!0)});l.className="geBtn gePrimaryBtn";e.appendChild(l);a.editor.cancelFirst||e.appendChild(m);
+g.appendChild(e);this.container=g}})();(function(){EditorUi.VERSION="@DRAWIO-VERSION@";EditorUi.compactUi="atlas"!=uiTheme;EditorUi.enableLogging=/.*\.draw\.io$/.test(window.location.hostname);EditorUi.enablePlantUml=EditorUi.enableLogging;EditorUi.isElectronApp=null!=window&&null!=window.process&&null!=window.process.versions&&null!=window.process.versions.electron;EditorUi.prototype.emptyDiagramXml='<mxGraphModel><root><mxCell id="0"/><mxCell id="1" parent="0"/></root></mxGraphModel>';EditorUi.prototype.emptyLibraryXml="<mxlibrary>[]</mxlibrary>";
 EditorUi.prototype.mode=null;EditorUi.prototype.sidebarFooterHeight=36;EditorUi.prototype.defaultCustomShapeStyle="shape=stencil(tZRtTsQgEEBPw1+DJR7AoN6DbWftpAgE0Ortd/jYRGq72R+YNE2YgTePloEJGWblgA18ZuKFDcMj5/Sm8boZq+BgjCX4pTyqk6ZlKROitwusOMXKQDODx5iy4pXxZ5qTHiFHawxB0JrQZH7lCabQ0Fr+XWC1/E8zcsT/gAi+Subo2/3Mh6d/oJb5nU1b5tW7r2knautaa3T+U32o7f7vZwpJkaNDLORJjcu7t59m2jXxqX9un+tt022acsfmoKaQZ+vhhswZtS6Ne/ThQGt0IV0N3Yyv6P3CeT9/tHO0XFI5cAE=);whiteSpace=wrap;html=1;";EditorUi.prototype.maxBackgroundSize=1600;
 EditorUi.prototype.maxImageSize=520;EditorUi.prototype.resampleThreshold=1E5;EditorUi.prototype.maxImageBytes=1E6;EditorUi.prototype.maxBackgroundBytes=25E5;EditorUi.prototype.currentFile=null;EditorUi.prototype.printPdfExport=!1;EditorUi.prototype.pdfPageExport=!0;EditorUi.prototype.formatEnabled="0"!=urlParams.format;(function(){EditorUi.prototype.useCanvasForExport=!1;EditorUi.prototype.jpgSupported=!1;try{var a=document.createElement("canvas"),b=new Image;b.onload=function(){try{a.getContext("2d").drawImage(b,
-0,0);var c=a.toDataURL("image/png");EditorUi.prototype.useCanvasForExport=null!=c&&6<c.length}catch(n){}};b.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(m){}try{a=document.createElement("canvas");a.width=a.height=1;var d=
-a.toDataURL("image/jpeg");EditorUi.prototype.jpgSupported=null!==d.match("image/jpeg")}catch(m){}})();EditorUi.prototype.getLocalData=function(a,b){b(localStorage.getItem(a))};EditorUi.prototype.setLocalData=function(a,b,d){localStorage.setItem(a,b);d()};EditorUi.prototype.removeLocalData=function(a,b){localStorage.removeItem(a);b()};EditorUi.prototype.setMathEnabled=function(a){this.editor.graph.mathEnabled=a;this.editor.updateGraphComponents();this.editor.graph.refresh();this.fireEvent(new mxEventObject("mathEnabledChanged"))};
-EditorUi.prototype.isMathEnabled=function(a){return this.editor.graph.mathEnabled};EditorUi.prototype.movePickersToTop=function(){for(var a=document.getElementsByTagName("div"),b=0;b<a.length;b++)"picker modal-dialog picker-dialog"==a[b].className&&(a[b].style.zIndex=mxPopupMenu.prototype.zIndex+1)};EditorUi.prototype.isOfflineApp=function(){return"1"==urlParams.offline};EditorUi.prototype.isOffline=function(){return this.isOfflineApp()||!navigator.onLine||"1"==urlParams.stealth};EditorUi.prototype.createSpinner=
-function(a,b,d){d=null!=d?d:24;var c=new Spinner({lines:12,length:d,width:Math.round(d/3),radius:Math.round(d/2),rotate:0,color:"#000",speed:1.5,trail:60,shadow:!1,hwaccel:!1,zIndex:2E9}),f=c.spin;c.spin=function(d,e){var h=!1;this.active||(f.call(this,d),this.active=!0,null!=e&&(h=document.createElement("div"),h.style.position="absolute",h.style.whiteSpace="nowrap",h.style.background="#4B4243",h.style.color="white",h.style.fontFamily="Helvetica, Arial",h.style.fontSize="9pt",h.style.padding="6px",
-h.style.paddingLeft="10px",h.style.paddingRight="10px",h.style.zIndex=2E9,h.style.left=Math.max(0,a)+"px",h.style.top=Math.max(0,b+70)+"px",mxUtils.setPrefixedStyle(h.style,"borderRadius","6px"),mxUtils.setPrefixedStyle(h.style,"boxShadow","2px 2px 3px 0px #ddd"),mxUtils.setPrefixedStyle(h.style,"transform","translate(-50%,-50%)"),h.innerHTML=e+"...",d.appendChild(h),c.status=h,mxClient.IS_VML&&(null==document.documentMode||8>=document.documentMode)&&(h.style.left=Math.round(Math.max(0,a-h.offsetWidth/
-2))+"px",h.style.top=Math.round(Math.max(0,b+70-h.offsetHeight/2))+"px")),this.pause=mxUtils.bind(this,function(){var a=function(){};this.active&&(a=mxUtils.bind(this,function(){this.spin(d,e)}));this.stop();return a}),h=!0);return h};var e=c.stop;c.stop=function(){e.call(this);this.active=!1;null!=c.status&&(c.status.parentNode.removeChild(c.status),c.status=null)};c.pause=function(){return function(){}};return c};EditorUi.parsePng=function(a,b,d){function c(a,c){var b=e;e+=c;return a.substring(b,
-e)}function f(a){a=c(a,4);return a.charCodeAt(3)+(a.charCodeAt(2)<<8)+(a.charCodeAt(1)<<16)+(a.charCodeAt(0)<<24)}var e=0;if(c(a,8)!=String.fromCharCode(137)+"PNG"+String.fromCharCode(13,10,26,10))null!=d&&d();else if(c(a,4),"IHDR"!=c(a,4))null!=d&&d();else{c(a,17);do{d=f(a);var h=c(a,4);if(null!=b&&b(e-8,h,d))break;value=c(a,d);c(a,4);if("IEND"==h)break}while(d)}};EditorUi.prototype.isCompatibleString=function(a){try{var c=mxUtils.parseXml(a),b=this.editor.extractGraphModel(c.documentElement,!0);
-return null!=b&&0==b.getElementsByTagName("parsererror").length}catch(m){}return!1};var a=EditorUi.prototype.extractGraphModelFromHtml;EditorUi.prototype.extractGraphModelFromHtml=function(c){var b=a.apply(this,arguments);if(null==b)try{var d=c.indexOf("&lt;mxfile ");if(0<=d){var e=c.lastIndexOf("&lt;/mxfile&gt;");e>d&&(b=c.substring(d,e+15).replace(/&gt;/g,">").replace(/&lt;/g,"<").replace(/\\&quot;/g,'"').replace(/\n/g,""))}else var n=mxUtils.parseXml(c),g=this.editor.extractGraphModel(n.documentElement,
-null!=this.pages),b=null!=g?mxUtils.getXml(g):""}catch(r){}return b};EditorUi.prototype.validateFileData=function(a){if(null!=a&&0<a.length){var c=a.indexOf('<meta charset="utf-8">');0<=c&&(a=a.slice(0,c)+'<meta charset="utf-8"/>'+a.slice(c+23-1,a.length))}return a};EditorUi.prototype.replaceFileData=function(a){a=this.validateFileData(a);a=null!=a&&0<a.length?mxUtils.parseXml(a).documentElement:null;var c=null!=a?this.editor.extractGraphModel(a,!0):null;null!=c&&(a=c);if(null!=a){c=this.editor.graph;
-c.model.beginUpdate();try{var b=null!=this.pages?this.pages.slice():null,d=a.getElementsByTagName("diagram");if("0"!=urlParams.pages||1<d.length||1==d.length&&d[0].hasAttribute("name")){this.fileNode=a;this.pages=null!=this.pages?this.pages:[];for(var e=d.length-1;0<=e;e--){var g=this.updatePageRoot(new DiagramPage(d[e]));null==g.getName()&&g.setName(mxResources.get("pageWithNumber",[e+1]));c.model.execute(new ChangePage(this,g,0==e?g:null,0))}}else"0"!=urlParams.pages&&null==this.fileNode&&(this.fileNode=
+0,0);var c=a.toDataURL("image/png");EditorUi.prototype.useCanvasForExport=null!=c&&6<c.length}catch(m){}};b.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(p){}try{a=document.createElement("canvas");a.width=a.height=1;var d=
+a.toDataURL("image/jpeg");EditorUi.prototype.jpgSupported=null!==d.match("image/jpeg")}catch(p){}})();EditorUi.prototype.showSplash=function(a){};EditorUi.prototype.getLocalData=function(a,b){b(localStorage.getItem(a))};EditorUi.prototype.setLocalData=function(a,b,d){localStorage.setItem(a,b);d()};EditorUi.prototype.removeLocalData=function(a,b){localStorage.removeItem(a);b()};EditorUi.prototype.setMathEnabled=function(a){this.editor.graph.mathEnabled=a;this.editor.updateGraphComponents();this.editor.graph.refresh();
+this.fireEvent(new mxEventObject("mathEnabledChanged"))};EditorUi.prototype.isMathEnabled=function(a){return this.editor.graph.mathEnabled};EditorUi.prototype.movePickersToTop=function(){for(var a=document.getElementsByTagName("div"),b=0;b<a.length;b++)"picker modal-dialog picker-dialog"==a[b].className&&(a[b].style.zIndex=mxPopupMenu.prototype.zIndex+1)};EditorUi.prototype.isOfflineApp=function(){return"1"==urlParams.offline};EditorUi.prototype.isOffline=function(){return this.isOfflineApp()||!navigator.onLine||
+"1"==urlParams.stealth};EditorUi.prototype.createSpinner=function(a,b,d){d=null!=d?d:24;var c=new Spinner({lines:12,length:d,width:Math.round(d/3),radius:Math.round(d/2),rotate:0,color:"#000",speed:1.5,trail:60,shadow:!1,hwaccel:!1,zIndex:2E9}),f=c.spin;c.spin=function(d,g){var e=!1;this.active||(f.call(this,d),this.active=!0,null!=g&&(e=document.createElement("div"),e.style.position="absolute",e.style.whiteSpace="nowrap",e.style.background="#4B4243",e.style.color="white",e.style.fontFamily="Helvetica, Arial",
+e.style.fontSize="9pt",e.style.padding="6px",e.style.paddingLeft="10px",e.style.paddingRight="10px",e.style.zIndex=2E9,e.style.left=Math.max(0,a)+"px",e.style.top=Math.max(0,b+70)+"px",mxUtils.setPrefixedStyle(e.style,"borderRadius","6px"),mxUtils.setPrefixedStyle(e.style,"boxShadow","2px 2px 3px 0px #ddd"),mxUtils.setPrefixedStyle(e.style,"transform","translate(-50%,-50%)"),e.innerHTML=g+"...",d.appendChild(e),c.status=e,mxClient.IS_VML&&(null==document.documentMode||8>=document.documentMode)&&(e.style.left=
+Math.round(Math.max(0,a-e.offsetWidth/2))+"px",e.style.top=Math.round(Math.max(0,b+70-e.offsetHeight/2))+"px")),this.pause=mxUtils.bind(this,function(){var a=function(){};this.active&&(a=mxUtils.bind(this,function(){this.spin(d,g)}));this.stop();return a}),e=!0);return e};var g=c.stop;c.stop=function(){g.call(this);this.active=!1;null!=c.status&&(c.status.parentNode.removeChild(c.status),c.status=null)};c.pause=function(){return function(){}};return c};EditorUi.parsePng=function(a,b,d){function c(a,
+c){var b=g;g+=c;return a.substring(b,g)}function f(a){a=c(a,4);return a.charCodeAt(3)+(a.charCodeAt(2)<<8)+(a.charCodeAt(1)<<16)+(a.charCodeAt(0)<<24)}var g=0;if(c(a,8)!=String.fromCharCode(137)+"PNG"+String.fromCharCode(13,10,26,10))null!=d&&d();else if(c(a,4),"IHDR"!=c(a,4))null!=d&&d();else{c(a,17);do{d=f(a);var e=c(a,4);if(null!=b&&b(g-8,e,d))break;value=c(a,d);c(a,4);if("IEND"==e)break}while(d)}};EditorUi.prototype.isCompatibleString=function(a){try{var c=mxUtils.parseXml(a),b=this.editor.extractGraphModel(c.documentElement,
+!0);return null!=b&&0==b.getElementsByTagName("parsererror").length}catch(p){}return!1};var a=EditorUi.prototype.extractGraphModelFromHtml;EditorUi.prototype.extractGraphModelFromHtml=function(c){var b=a.apply(this,arguments);if(null==b)try{var d=c.indexOf("&lt;mxfile ");if(0<=d){var e=c.lastIndexOf("&lt;/mxfile&gt;");e>d&&(b=c.substring(d,e+15).replace(/&gt;/g,">").replace(/&lt;/g,"<").replace(/\\&quot;/g,'"').replace(/\n/g,""))}else var m=mxUtils.parseXml(c),h=this.editor.extractGraphModel(m.documentElement,
+null!=this.pages),b=null!=h?mxUtils.getXml(h):""}catch(r){}return b};EditorUi.prototype.validateFileData=function(a){if(null!=a&&0<a.length){var c=a.indexOf('<meta charset="utf-8">');0<=c&&(a=a.slice(0,c)+'<meta charset="utf-8"/>'+a.slice(c+23-1,a.length))}return a};EditorUi.prototype.replaceFileData=function(a){a=this.validateFileData(a);a=null!=a&&0<a.length?mxUtils.parseXml(a).documentElement:null;var c=null!=a?this.editor.extractGraphModel(a,!0):null;null!=c&&(a=c);if(null!=a){c=this.editor.graph;
+c.model.beginUpdate();try{var b=null!=this.pages?this.pages.slice():null,d=a.getElementsByTagName("diagram");if("0"!=urlParams.pages||1<d.length||1==d.length&&d[0].hasAttribute("name")){this.fileNode=a;this.pages=null!=this.pages?this.pages:[];for(var e=d.length-1;0<=e;e--){var h=this.updatePageRoot(new DiagramPage(d[e]));null==h.getName()&&h.setName(mxResources.get("pageWithNumber",[e+1]));c.model.execute(new ChangePage(this,h,0==e?h:null,0))}}else"0"!=urlParams.pages&&null==this.fileNode&&(this.fileNode=
 a.ownerDocument.createElement("mxfile"),this.currentPage=new DiagramPage(a.ownerDocument.createElement("diagram")),this.currentPage.setName(mxResources.get("pageWithNumber",[1])),c.model.execute(new ChangePage(this,this.currentPage,this.currentPage,0))),this.editor.setGraphXml(a),null!=this.currentPage&&(this.currentPage.root=this.editor.graph.model.root);if(null!=b)for(e=0;e<b.length;e++)c.model.execute(new ChangePage(this,b[e],null))}finally{c.model.endUpdate()}}};EditorUi.prototype.createFileData=
-function(a,b,d,e,n,g,r,k,t,v){b=null!=b?b:this.editor.graph;n=null!=n?n:!1;t=null!=t?t:!0;var c,f=null;null==d||d.getMode()==App.MODE_DEVICE||d.getMode()==App.MODE_BROWSER?c="_blank":f=c=e;if(null==a)return"";var h=a;if("mxfile"!=h.nodeName.toLowerCase()){var m=b.zapGremlins(mxUtils.getXml(a)),h=b.compress(m);if(b.decompress(h)!=m)return m;m=a.ownerDocument.createElement("diagram");mxUtils.setTextContent(m,h);h=a.ownerDocument.createElement("mxfile");h.appendChild(m)}v?(h=h.cloneNode(!0),h.removeAttribute("userAgent"),
-h.removeAttribute("version"),h.removeAttribute("editor"),h.removeAttribute("type")):(h.setAttribute("userAgent",navigator.userAgent),h.setAttribute("version",EditorUi.VERSION),h.setAttribute("editor","www.draw.io"),a=null!=d?d.getMode():this.mode,null!=a&&h.setAttribute("type",a));a=mxUtils.getXml(h);if(!g&&!n&&(r||null!=d&&/(\.html)$/i.test(d.getTitle())))a=this.getHtml2(mxUtils.getXml(h),b,null!=d?d.getTitle():null,c,f);else if(g||!n&&null!=d&&/(\.svg)$/i.test(d.getTitle()))null==d||d.getMode()!=
-App.MODE_DEVICE&&d.getMode()!=App.MODE_BROWSER||(e=null),a=this.getEmbeddedSvg(a,b,e,null,k,t,f);return a};EditorUi.prototype.getXmlFileData=function(a,b){a=null!=a?a:!0;b=null!=b?b:!1;var c=this.editor.getGraphXml(a);if(a&&null!=this.fileNode&&null!=this.currentPage){var f=this.editor.graph.compress(this.editor.graph.zapGremlins(mxUtils.getXml(c)));mxUtils.setTextContent(this.currentPage.node,f);c=this.fileNode.cloneNode(!1);if(b)c.appendChild(this.currentPage.node);else for(var d=0;d<this.pages.length;d++){var e=
-this.pages[d].mapping;this.currentPage!=this.pages[d]&&null!=e&&e.needsUpdate&&(f=(new mxCodec(mxUtils.createXmlDocument())).encode(e.graphModel),e.writeRealtimeToNode(f),f=this.editor.graph.compress(this.editor.graph.zapGremlins(mxUtils.getXml(f))),mxUtils.setTextContent(this.pages[d].node,f),e.needsUpdate=!1);c.appendChild(this.pages[d].node)}}return c};EditorUi.prototype.getFileData=function(a,b,d,e,n,g,r,k){n=null!=n?n:!0;r=null!=r?r:this.getXmlFileData(n,null!=g?g:!1);g=this.editor.graph;var c=
-this.getCurrentFile();if(null!=this.pages&&this.currentPage!=this.pages[0]&&(b||!a&&null!=c&&/(\.svg)$/i.test(c.getTitle()))){g=this.createTemporaryGraph(g.getStylesheet());var f=g.getGlobalVariable,h=this.pages[0];g.getGlobalVariable=function(a){return"page"==a?h.getName():"pagenumber"==a?1:f.apply(this,arguments)};document.body.appendChild(g.container);g.model.setRoot(h.root)}a=this.createFileData(r,g,c,window.location.href,a,b,d,e,n,k);g!=this.editor.graph&&g.container.parentNode.removeChild(g.container);
-return a};EditorUi.prototype.getHtml=function(a,b,d,e,n,g){g=null!=g?g:!0;var c=null,f="https://www.draw.io/js/embed-static.min.js";if(null!=b){var c=g?b.getGraphBounds():b.getBoundingBox(b.getSelectionCells()),h=b.view.scale;g=Math.floor(c.x/h-b.view.translate.x);h=Math.floor(c.y/h-b.view.translate.y);c=b.background;null==n&&(b=this.getBasenames().join(";"),0<b.length&&(f="https://www.draw.io/embed.js?s="+b));a.setAttribute("x0",g);a.setAttribute("y0",h)}null!=a&&(a.setAttribute("pan","1"),a.setAttribute("zoom",
-"1"),a.setAttribute("resize","0"),a.setAttribute("fit","0"),a.setAttribute("border","20"),a.setAttribute("links","1"),null!=e&&a.setAttribute("edit",e));null!=n&&(n=n.replace(/&/g,"&amp;"));a=null!=a?this.editor.graph.zapGremlins(mxUtils.getXml(a)):"";e=this.editor.graph.compress(a);this.editor.graph.decompress(e)!=a&&(e=encodeURIComponent(a));return(null==n?'\x3c!--[if IE]><meta http-equiv="X-UA-Compatible" content="IE=5,IE=9" ><![endif]--\x3e\n':"")+"<!DOCTYPE html>\n<html"+(null!=n?' xmlns="http://www.w3.org/1999/xhtml">':
-">")+"\n<head>\n"+(null==n?null!=d?"<title>"+mxUtils.htmlEntities(d)+"</title>\n":"":"<title>Draw.io Diagram</title>\n")+(null!=n?'<meta http-equiv="refresh" content="0;URL=\''+n+"'\"/>\n":"")+"</head>\n<body"+(null==n&&null!=c&&c!=mxConstants.NONE?' style="background-color:'+c+';">':">")+'\n<div class="mxgraph" style="position:relative;overflow:auto;width:100%;">\n<div style="width:1px;height:1px;overflow:hidden;">'+e+"</div>\n</div>\n"+(null==n?'<script type="text/javascript" src="'+f+'">\x3c/script>':
-'<a style="position:absolute;top:50%;left:50%;margin-top:-128px;margin-left:-64px;" href="'+n+'" target="_blank"><img border="0" src="https://www.draw.io/images/drawlogo128.png"/></a>')+"\n</body>\n</html>\n"};EditorUi.prototype.getHtml2=function(a,b,d,e,n){null!=n&&(n=n.replace(/&/g,"&amp;"));a={highlight:"#0000ff",nav:this.editor.graph.foldingEnabled,resize:!0,xml:this.editor.graph.zapGremlins(a),toolbar:"pages zoom layers lightbox"};null!=this.pages&&null!=this.currentPage&&(a.page=mxUtils.indexOf(this.pages,
-this.currentPage));return(null==n?'\x3c!--[if IE]><meta http-equiv="X-UA-Compatible" content="IE=5,IE=9" ><![endif]--\x3e\n':"")+"<!DOCTYPE html>\n<html"+(null!=n?' xmlns="http://www.w3.org/1999/xhtml">':">")+"\n<head>\n"+(null==n?null!=d?"<title>"+mxUtils.htmlEntities(d)+"</title>\n":"":"<title>Draw.io Diagram</title>\n")+(null!=n?'<meta http-equiv="refresh" content="0;URL=\''+n+"'\"/>\n":"")+'<meta charset="utf-8"/>\n</head>\n<body>\n<div class="mxgraph" style="max-width:100%;border:1px solid transparent;" data-mxgraph="'+
-mxUtils.htmlEntities(JSON.stringify(a))+'"></div>\n'+(null==n?'<script type="text/javascript" src="https://www.draw.io/js/viewer.min.js">\x3c/script>':'<a style="position:absolute;top:50%;left:50%;margin-top:-128px;margin-left:-64px;" href="'+n+'" target="_blank"><img border="0" src="https://www.draw.io/images/drawlogo128.png"/></a>')+"\n</body>\n</html>\n"};EditorUi.prototype.setFileData=function(a){a=this.validateFileData(a);this.pages=this.fileNode=this.currentPage=null;var c=null!=a&&0<a.length?
+function(a,b,d,e,m,h,r,k,l,t){b=null!=b?b:this.editor.graph;m=null!=m?m:!1;l=null!=l?l:!0;var c,f=null;null==d||d.getMode()==App.MODE_DEVICE||d.getMode()==App.MODE_BROWSER?c="_blank":f=c=e;if(null==a)return"";var g=a;if("mxfile"!=g.nodeName.toLowerCase()){var p=b.zapGremlins(mxUtils.getXml(a)),g=b.compress(p);if(b.decompress(g)!=p)return p;p=a.ownerDocument.createElement("diagram");mxUtils.setTextContent(p,g);g=a.ownerDocument.createElement("mxfile");g.appendChild(p)}t?(g=g.cloneNode(!0),g.removeAttribute("userAgent"),
+g.removeAttribute("version"),g.removeAttribute("editor"),g.removeAttribute("type")):(g.setAttribute("userAgent",navigator.userAgent),g.setAttribute("version",EditorUi.VERSION),g.setAttribute("editor","www.draw.io"),a=null!=d?d.getMode():this.mode,null!=a&&g.setAttribute("type",a));a=mxUtils.getXml(g);if(!h&&!m&&(r||null!=d&&/(\.html)$/i.test(d.getTitle())))a=this.getHtml2(mxUtils.getXml(g),b,null!=d?d.getTitle():null,c,f);else if(h||!m&&null!=d&&/(\.svg)$/i.test(d.getTitle()))null==d||d.getMode()!=
+App.MODE_DEVICE&&d.getMode()!=App.MODE_BROWSER||(e=null),a=this.getEmbeddedSvg(a,b,e,null,k,l,f);return a};EditorUi.prototype.getXmlFileData=function(a,b){a=null!=a?a:!0;b=null!=b?b:!1;var c=this.editor.getGraphXml(a);if(a&&null!=this.fileNode&&null!=this.currentPage){var d=this.editor.graph.compress(this.editor.graph.zapGremlins(mxUtils.getXml(c)));mxUtils.setTextContent(this.currentPage.node,d);c=this.fileNode.cloneNode(!1);if(b)c.appendChild(this.currentPage.node);else for(var f=0;f<this.pages.length;f++){var e=
+this.pages[f].mapping;this.currentPage!=this.pages[f]&&null!=e&&e.needsUpdate&&(d=(new mxCodec(mxUtils.createXmlDocument())).encode(e.graphModel),e.writeRealtimeToNode(d),d=this.editor.graph.compress(this.editor.graph.zapGremlins(mxUtils.getXml(d))),mxUtils.setTextContent(this.pages[f].node,d),e.needsUpdate=!1);c.appendChild(this.pages[f].node)}}return c};EditorUi.prototype.getFileData=function(a,b,d,e,m,h,r,k){m=null!=m?m:!0;r=null!=r?r:this.getXmlFileData(m,null!=h?h:!1);h=this.editor.graph;var c=
+this.getCurrentFile();if(null!=this.pages&&this.currentPage!=this.pages[0]&&(b||!a&&null!=c&&/(\.svg)$/i.test(c.getTitle()))){h=this.createTemporaryGraph(h.getStylesheet());var f=h.getGlobalVariable,g=this.pages[0];h.getGlobalVariable=function(a){return"page"==a?g.getName():"pagenumber"==a?1:f.apply(this,arguments)};document.body.appendChild(h.container);h.model.setRoot(g.root)}a=this.createFileData(r,h,c,window.location.href,a,b,d,e,m,k);h!=this.editor.graph&&h.container.parentNode.removeChild(h.container);
+return a};EditorUi.prototype.getHtml=function(a,b,d,e,m,h){h=null!=h?h:!0;var c=null,f="https://www.draw.io/js/embed-static.min.js";if(null!=b){var c=h?b.getGraphBounds():b.getBoundingBox(b.getSelectionCells()),g=b.view.scale;h=Math.floor(c.x/g-b.view.translate.x);g=Math.floor(c.y/g-b.view.translate.y);c=b.background;null==m&&(b=this.getBasenames().join(";"),0<b.length&&(f="https://www.draw.io/embed.js?s="+b));a.setAttribute("x0",h);a.setAttribute("y0",g)}null!=a&&(a.setAttribute("pan","1"),a.setAttribute("zoom",
+"1"),a.setAttribute("resize","0"),a.setAttribute("fit","0"),a.setAttribute("border","20"),a.setAttribute("links","1"),null!=e&&a.setAttribute("edit",e));null!=m&&(m=m.replace(/&/g,"&amp;"));a=null!=a?this.editor.graph.zapGremlins(mxUtils.getXml(a)):"";e=this.editor.graph.compress(a);this.editor.graph.decompress(e)!=a&&(e=encodeURIComponent(a));return(null==m?'\x3c!--[if IE]><meta http-equiv="X-UA-Compatible" content="IE=5,IE=9" ><![endif]--\x3e\n':"")+"<!DOCTYPE html>\n<html"+(null!=m?' xmlns="http://www.w3.org/1999/xhtml">':
+">")+"\n<head>\n"+(null==m?null!=d?"<title>"+mxUtils.htmlEntities(d)+"</title>\n":"":"<title>Draw.io Diagram</title>\n")+(null!=m?'<meta http-equiv="refresh" content="0;URL=\''+m+"'\"/>\n":"")+"</head>\n<body"+(null==m&&null!=c&&c!=mxConstants.NONE?' style="background-color:'+c+';">':">")+'\n<div class="mxgraph" style="position:relative;overflow:auto;width:100%;">\n<div style="width:1px;height:1px;overflow:hidden;">'+e+"</div>\n</div>\n"+(null==m?'<script type="text/javascript" src="'+f+'">\x3c/script>':
+'<a style="position:absolute;top:50%;left:50%;margin-top:-128px;margin-left:-64px;" href="'+m+'" target="_blank"><img border="0" src="https://www.draw.io/images/drawlogo128.png"/></a>')+"\n</body>\n</html>\n"};EditorUi.prototype.getHtml2=function(a,b,d,e,m){null!=m&&(m=m.replace(/&/g,"&amp;"));a={highlight:"#0000ff",nav:this.editor.graph.foldingEnabled,resize:!0,xml:this.editor.graph.zapGremlins(a),toolbar:"pages zoom layers lightbox"};null!=this.pages&&null!=this.currentPage&&(a.page=mxUtils.indexOf(this.pages,
+this.currentPage));return(null==m?'\x3c!--[if IE]><meta http-equiv="X-UA-Compatible" content="IE=5,IE=9" ><![endif]--\x3e\n':"")+"<!DOCTYPE html>\n<html"+(null!=m?' xmlns="http://www.w3.org/1999/xhtml">':">")+"\n<head>\n"+(null==m?null!=d?"<title>"+mxUtils.htmlEntities(d)+"</title>\n":"":"<title>Draw.io Diagram</title>\n")+(null!=m?'<meta http-equiv="refresh" content="0;URL=\''+m+"'\"/>\n":"")+'<meta charset="utf-8"/>\n</head>\n<body>\n<div class="mxgraph" style="max-width:100%;border:1px solid transparent;" data-mxgraph="'+
+mxUtils.htmlEntities(JSON.stringify(a))+'"></div>\n'+(null==m?'<script type="text/javascript" src="https://www.draw.io/js/viewer.min.js">\x3c/script>':'<a style="position:absolute;top:50%;left:50%;margin-top:-128px;margin-left:-64px;" href="'+m+'" target="_blank"><img border="0" src="https://www.draw.io/images/drawlogo128.png"/></a>')+"\n</body>\n</html>\n"};EditorUi.prototype.setFileData=function(a){a=this.validateFileData(a);this.pages=this.fileNode=this.currentPage=null;var c=null!=a&&0<a.length?
 mxUtils.parseXml(a).documentElement:null;a=null!=c?this.editor.extractGraphModel(c,!0):null;null!=a&&(c=a);if(null!=c&&"mxfile"==c.nodeName&&(a=c.getElementsByTagName("diagram"),"0"!=urlParams.pages||1<a.length||1==a.length&&a[0].hasAttribute("name"))){this.fileNode=c;this.pages=[];for(c=0;c<a.length;c++){var b=new DiagramPage(a[c]);null==b.getName()&&b.setName(mxResources.get("pageWithNumber",[c+1]));this.pages.push(b)}this.currentPage=this.pages[Math.max(0,Math.min(this.pages.length-1,urlParams.page||
 0))];c=this.currentPage.node}"0"!=urlParams.pages&&null==this.fileNode&&null!=c&&(this.fileNode=c.ownerDocument.createElement("mxfile"),this.currentPage=new DiagramPage(c.ownerDocument.createElement("diagram")),this.currentPage.setName(mxResources.get("pageWithNumber",[1])),this.pages=[this.currentPage]);this.editor.setGraphXml(c);null!=this.currentPage&&(this.currentPage.root=this.editor.graph.model.root)};EditorUi.prototype.getBaseFilename=function(){var a=this.getCurrentFile(),a=null!=a&&null!=
-a.getTitle()?a.getTitle():this.defaultFilename;if(/(\.xml)$/i.test(a)||/(\.html)$/i.test(a)||/(\.svg)$/i.test(a))a=a.substring(0,a.lastIndexOf("."));return a};EditorUi.prototype.downloadFile=function(a,b,d,e,n,g){try{e=null!=e?e:this.editor.graph.isSelectionEmpty();var c=this.getBaseFilename(),f=c+"."+a;if("xml"==a){var h='<?xml version="1.0" encoding="UTF-8"?>\n'+(b?mxUtils.getXml(this.editor.getGraphXml(e)):this.getFileData(!0,null,null,null,e,n));this.saveData(f,a,h,"text/xml")}else if("html"==
-a)h=this.getHtml2(this.getFileData(!0),this.editor.graph,c),this.saveData(f,a,h,"text/html");else if("svg"!=a&&"xmlsvg"!=a||!this.spinner.spin(document.body,mxResources.get("export")))"xmlpng"==a?f=c+".png":"jpeg"==a&&(f=c+".jpg"),this.saveRequest(f,a,mxUtils.bind(this,function(c,b){try{var d=this.editor.graph.pageVisible;null!=g&&(this.editor.graph.pageVisible=g);var f=this.createDownloadRequest(c,a,e,b);this.editor.graph.pageVisible=d;return f}catch(F){this.handleError(F)}}));else{var m=null,l=
-mxUtils.bind(this,function(a){a.length<=MAX_REQUEST_SIZE?this.saveData(f,"svg",a,"image/svg+xml"):this.handleError({message:mxResources.get("drawingTooLarge")},mxResources.get("error"),mxUtils.bind(this,function(){mxUtils.popup(m)}))});if("svg"==a){var u=this.editor.graph.background;u==mxConstants.NONE&&(u=null);var p=this.editor.graph.getSvg(u,null,null,null,null,e);d&&this.editor.graph.addSvgShadow(p);this.convertImages(p,mxUtils.bind(this,mxUtils.bind(this,function(a){this.spinner.stop();l('<?xml version="1.0" encoding="UTF-8"?>\n<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">\n'+
-mxUtils.getXml(a))})))}else f=c+".svg",m=this.getFileData(!1,!0,null,mxUtils.bind(this,function(a){this.spinner.stop();l(a)}),e)}}catch(B){this.handleError(B)}};EditorUi.prototype.createDownloadRequest=function(a,b,d,e){var c=this.editor.graph.getGraphBounds();d=this.getFileData(!0,null,null,null,d,"xmlpng"!=b);var f="";if(c.width*c.height>MAX_AREA||d.length>MAX_REQUEST_SIZE)throw{message:mxResources.get("drawingTooLarge")};c="0";if("xmlpng"==b&&(c="1",b="png",null!=this.pages&&null!=this.currentPage))for(var h=
-0;h<this.pages.length;h++)if(this.pages[h]==this.currentPage){f="&from="+h;break}return new mxXmlRequest(EXPORT_URL,"format="+b+f+"&base64="+e+"&embedXml="+c+"&xml="+encodeURIComponent(d)+(null!=a?"&filename="+encodeURIComponent(a):""))};EditorUi.prototype.setMode=function(a,b){this.mode=a};EditorUi.prototype.fileLoaded=function(a){var c=!1;this.hideDialog();var b=this.getCurrentFile();this.setCurrentFile(null);null!=b&&(b.removeListener(this.descriptorChangedListener),b.close());this.editor.graph.model.clear();
+a.getTitle()?a.getTitle():this.defaultFilename;if(/(\.xml)$/i.test(a)||/(\.html)$/i.test(a)||/(\.svg)$/i.test(a))a=a.substring(0,a.lastIndexOf("."));return a};EditorUi.prototype.downloadFile=function(a,b,d,e,m,h){try{e=null!=e?e:this.editor.graph.isSelectionEmpty();var c=this.getBaseFilename(),f=c+"."+a;if("xml"==a){var g='<?xml version="1.0" encoding="UTF-8"?>\n'+(b?mxUtils.getXml(this.editor.getGraphXml(e)):this.getFileData(!0,null,null,null,e,m));this.saveData(f,a,g,"text/xml")}else if("html"==
+a)g=this.getHtml2(this.getFileData(!0),this.editor.graph,c),this.saveData(f,a,g,"text/html");else if("svg"!=a&&"xmlsvg"!=a||!this.spinner.spin(document.body,mxResources.get("export")))"xmlpng"==a?f=c+".png":"jpeg"==a&&(f=c+".jpg"),this.saveRequest(f,a,mxUtils.bind(this,function(c,b){try{var d=this.editor.graph.pageVisible;null!=h&&(this.editor.graph.pageVisible=h);var f=this.createDownloadRequest(c,a,e,b);this.editor.graph.pageVisible=d;return f}catch(E){this.handleError(E)}}));else{var p=null,l=
+mxUtils.bind(this,function(a){a.length<=MAX_REQUEST_SIZE?this.saveData(f,"svg",a,"image/svg+xml"):this.handleError({message:mxResources.get("drawingTooLarge")},mxResources.get("error"),mxUtils.bind(this,function(){mxUtils.popup(p)}))});if("svg"==a){var u=this.editor.graph.background;u==mxConstants.NONE&&(u=null);var n=this.editor.graph.getSvg(u,null,null,null,null,e);d&&this.editor.graph.addSvgShadow(n);this.convertImages(n,mxUtils.bind(this,mxUtils.bind(this,function(a){this.spinner.stop();l('<?xml version="1.0" encoding="UTF-8"?>\n<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">\n'+
+mxUtils.getXml(a))})))}else f=c+".svg",p=this.getFileData(!1,!0,null,mxUtils.bind(this,function(a){this.spinner.stop();l(a)}),e)}}catch(A){this.handleError(A)}};EditorUi.prototype.createDownloadRequest=function(a,b,d,e){var c=this.editor.graph.getGraphBounds();d=this.getFileData(!0,null,null,null,d,"xmlpng"!=b);var f="";if(c.width*c.height>MAX_AREA||d.length>MAX_REQUEST_SIZE)throw{message:mxResources.get("drawingTooLarge")};c="0";if("xmlpng"==b&&(c="1",b="png",null!=this.pages&&null!=this.currentPage))for(var g=
+0;g<this.pages.length;g++)if(this.pages[g]==this.currentPage){f="&from="+g;break}return new mxXmlRequest(EXPORT_URL,"format="+b+f+"&base64="+e+"&embedXml="+c+"&xml="+encodeURIComponent(d)+(null!=a?"&filename="+encodeURIComponent(a):""))};EditorUi.prototype.setMode=function(a,b){this.mode=a};EditorUi.prototype.fileLoaded=function(a){var c=!1;this.hideDialog();var b=this.getCurrentFile();this.setCurrentFile(null);null!=b&&(b.removeListener(this.descriptorChangedListener),b.close());this.editor.graph.model.clear();
 this.editor.undoManager.clear();var d=mxUtils.bind(this,function(){this.setGraphEnabled(!1);this.setCurrentFile(null);null!=b&&this.updateDocumentTitle();this.editor.graph.model.clear();this.editor.undoManager.clear();null!=window.location.hash&&0<window.location.hash.length&&(window.location.hash="");null!=this.fname&&(this.fnameWrapper.style.display="none",this.fname.innerHTML="",this.fname.setAttribute("title",mxResources.get("rename")));this.updateUi();this.showSplash()});if(null!=a)try{this.setCurrentFile(a);
 a.addListener("descriptorChanged",this.descriptorChangedListener);a.addListener("contentChanged",this.descriptorChangedListener);a.open();this.setGraphEnabled(!0);this.setMode(a.getMode());this.editor.undoManager.clear();this.descriptorChanged();this.updateUi();null==a.realtime&&(a.isEditable()?this.editor.setStatus(""):this.editor.setStatus('<span class="geStatusAlert" style="margin-left:8px;">'+mxUtils.htmlEntities(mxResources.get("readOnly"))+"</span>"));!this.editor.chromeless||this.editor.editable?
-(this.editor.graph.selectUnlockedLayer(),this.showLayersDialog(),this.restoreLibraries(),window.self!==window.top&&window.focus()):this.editor.graph.lightbox&&this.lightboxFit();this.chromelessResize&&this.chromelessResize();this.editor.fireEvent(new mxEventObject("fileLoaded"));c=!0;if(EditorUi.enableLogging&&!this.isOffline()&&null!=a.getMode())try{"function"===typeof window.ga&&ga("send","event","File","open",a.getMode())}catch(n){}if(this.mode==a.getMode()&&a.getMode()!=App.MODE_DEVICE&&null!=
-a.getMode())try{this.addRecent({id:a.getHash(),title:a.getTitle(),mode:a.getMode()})}catch(n){}try{mxSettings.setOpenCounter(mxSettings.getOpenCounter()+1),mxSettings.save()}catch(n){}}catch(n){null!=window.console&&console.log("error in fileLoaded:",a,n);if(EditorUi.enableLogging&&!this.isOffline())try{(new Image).src=(null!=window.DRAWIO_LOG_URL?window.DRAWIO_LOG_URL:"")+"/log?v="+encodeURIComponent(EditorUi.VERSION)+"&msg=errorInFileLoaded:url:"+encodeURIComponent(window.location.href)+(null!=
-n&&null!=n.message?":err:"+encodeURIComponent(n.message):"")+(null!=n&&null!=n.stack?"&stack="+encodeURIComponent(n.stack):"")}catch(u){}this.handleError(n,mxResources.get("errorLoadingFile"),mxUtils.bind(this,function(){null!=urlParams.url&&this.spinner.spin(document.body,mxResources.get("reconnecting"))?window.location.search=this.getSearch(["url"]):null!=b?b.constructor==DriveFile?this.loadFile(b.getHash()):this.fileLoaded(b):d()}))}else d();return c};EditorUi.prototype.restoreLibraries=function(){};
-EditorUi.prototype.saveLibrary=function(a,b,d,e,n,g,r){};EditorUi.prototype.toggleScratchpad=function(){if(isLocalStorage||mxClient.IS_CHROMEAPP)null==this.scratchpad?this.getLocalData(".scratchpad",mxUtils.bind(this,function(a){null==a&&(a=this.emptyLibraryXml);this.loadLibrary(new StorageLibrary(this,a,".scratchpad"))})):this.closeLibrary(this.scratchpad)};EditorUi.prototype.createLibraryDataFromImages=function(a){var c=mxUtils.createXmlDocument(),b=c.createElement("mxlibrary");mxUtils.setTextContent(b,
-JSON.stringify(a));c.appendChild(b);return mxUtils.getXml(c)};EditorUi.prototype.closeLibrary=function(a){null!=a&&(this.removeLibrarySidebar(a.getHash()),a.constructor!=LocalLibrary&&mxSettings.removeCustomLibrary(a.getHash()),".scratchpad"==a.title&&(this.scratchpad=null))};EditorUi.prototype.removeLibrarySidebar=function(a){var c=this.sidebar.palettes[a];if(null!=c){for(var b=0;b<c.length;b++)c[b].parentNode.removeChild(c[b]);delete this.sidebar.palettes[a]}};EditorUi.prototype.repositionLibrary=
-function(a){var c=this.sidebar.container;if(null==a){var b=this.sidebar.palettes["L.scratchpad"];null==b&&(b=this.sidebar.palettes.search);null!=b&&(a=b[b.length-1].nextSibling)}a=null!=a?a:c.firstChild.nextSibling.nextSibling;var b=c.lastChild,d=b.previousSibling;c.insertBefore(b,a);c.insertBefore(d,b)};EditorUi.prototype.loadLibrary=function(a){var c=mxUtils.parseXml(a.getData());if("mxlibrary"==c.documentElement.nodeName){var b=JSON.parse(mxUtils.getTextContent(c.documentElement));this.libraryLoaded(a,
-b,c.documentElement.getAttribute("title"))}else throw{message:mxResources.get("notALibraryFile")};};EditorUi.prototype.getLibraryStorageHint=function(a){return""};EditorUi.prototype.libraryLoaded=function(a,b,d){a.constructor!=LocalLibrary&&mxSettings.addCustomLibrary(a.getHash());".scratchpad"==a.title&&(this.scratchpad=a);var c=this.sidebar.palettes[a.getHash()],c=null!=c?c[c.length-1].nextSibling:null;this.removeLibrarySidebar(a.getHash());var f=null,e=mxUtils.bind(this,function(c,b){if(0==c.length&&
-a.isEditable())null==f&&(f=document.createElement("div"),mxUtils.setPrefixedStyle(f.style,"borderRadius","6px"),f.style.border="3px dotted lightGray",f.style.textAlign="center",f.style.padding="8px",f.style.color="#B3B3B3",mxUtils.write(f,mxResources.get("dragElementsHere"))),b.appendChild(f);else for(var d=0;d<c.length;d++){var e=c[d],h=e.data;if(null!=h){var h=this.convertDataUri(h),k="shape=image;verticalLabelPosition=bottom;verticalAlign=top;imageAspect=0;";"fixed"==e.aspect&&(k+="aspect=fixed;");
-b.appendChild(this.sidebar.createVertexTemplate(k+"image="+h,e.w,e.h,"",e.title||"",!1,!1,!1))}else null!=e.xml&&(h=this.stringToCells(this.editor.graph.decompress(e.xml)),0<h.length&&b.appendChild(this.sidebar.createVertexTemplateFromCells(h,e.w,e.h,e.title||"",!0,!1,!1)))}});d=null!=d&&0<d.length?d:a.getTitle();var h=this.sidebar.addPalette(a.getHash(),d,!0,mxUtils.bind(this,function(a){e(b,a)}));this.repositionLibrary(c);var k=h.parentNode.previousSibling;d=k.getAttribute("title");null!=d&&0<d.length&&
-".scratchpad"!=a.title&&k.setAttribute("title",this.getLibraryStorageHint(a)+"\n"+d);var g=document.createElement("div");g.style.position="absolute";g.style.right="0px";g.style.top="5px";mxClient.IS_QUIRKS||8==document.documentMode||(g.style.backgroundColor="inherit");k.style.position="relative";var l=document.createElement("img");l.setAttribute("src",Dialog.prototype.closeImage);l.setAttribute("title",mxResources.get("close"));l.setAttribute("align","top");l.setAttribute("border","0");l.className=
-"geButton";l.style.marginRight="1px";l.style.marginTop="-1px";g.appendChild(l);var p=null;mxEvent.addListener(l,"click",mxUtils.bind(this,function(c){if(!mxEvent.isConsumed(c)){var b=mxUtils.bind(this,function(){this.closeLibrary(a)});null!=p?this.confirm(mxResources.get("allChangesLost"),null,b,mxResources.get("cancel"),mxResources.get("discardChanges")):b();mxEvent.consume(c)}}));mxEvent.addListener(h,"mousemove",mxUtils.bind(this,function(a){mxEvent.getSource(a)==h?h.setAttribute("title",mxResources.get("libraryTooltip")):
-h.removeAttribute("title")}));if(a.isEditable()){var q=this.editor.graph,D=mxUtils.bind(this,function(c){this.showLibraryDialog(a.getTitle(),h,b,a,a.getMode());mxEvent.consume(c)}),B=mxUtils.bind(this,function(c){a.setModified(!0);a.isAutosave()?(null!=A&&null!=A.parentNode&&A.parentNode.removeChild(A),A=l.cloneNode(!1),A.setAttribute("src",Editor.spinImage),A.setAttribute("title",mxResources.get("saving")),A.style.cursor="default",A.style.marginRight="2px",A.style.marginTop="-2px",g.insertBefore(A,
-g.firstChild),k.style.paddingRight=18*g.childNodes.length+"px",this.saveLibrary(a.getTitle(),b,a,a.getMode(),!0,!0,function(){null!=A&&null!=A.parentNode&&(A.parentNode.removeChild(A),k.style.paddingRight=18*g.childNodes.length+"px")})):null==p&&(p=l.cloneNode(!1),p.setAttribute("src",IMAGE_PATH+"/download.png"),p.setAttribute("title",mxResources.get("save")),g.insertBefore(p,g.firstChild),mxEvent.addListener(p,"click",mxUtils.bind(this,function(c){this.saveLibrary(a.getTitle(),b,a,a.getMode(),a.constructor==
-LocalLibrary,!0,function(){null==p||a.isModified()||(k.style.paddingRight=18*g.childNodes.length+"px",p.parentNode.removeChild(p),p=null)});mxEvent.consume(c)})),k.style.paddingRight=18*g.childNodes.length+"px")}),y=mxUtils.bind(this,function(a,c,d,e){a=q.cloneCells(mxUtils.sortCells(q.model.getTopmostCells(a)));for(var k=0;k<a.length;k++){var m=q.getCellGeometry(a[k]);null!=m&&m.translate(-c.x,-c.y)}h.appendChild(this.sidebar.createVertexTemplateFromCells(a,c.width,c.height,e||"",!0,!1,!1));a={xml:this.editor.graph.compress(mxUtils.getXml(this.editor.graph.encodeCells(a))),
-w:c.width,h:c.height};null!=e&&(a.title=e);b.push(a);B(d);null!=f&&null!=f.parentNode&&0<b.length&&(f.parentNode.removeChild(f),f=null)}),C=mxUtils.bind(this,function(a){if(q.isSelectionEmpty())q.getRubberband().isActive()?(q.getRubberband().execute(a),q.getRubberband().reset()):this.showError(mxResources.get("error"),mxResources.get("nothingIsSelected"),mxResources.get("ok"));else{var c=q.getSelectionCells(),b=q.view.getBounds(c),d=q.view.scale;b.x/=d;b.y/=d;b.width/=d;b.height/=d;b.x-=q.view.translate.x;
-b.y-=q.view.translate.y;y(c,b)}mxEvent.consume(a)});h.style.border="3px solid transparent";mxEvent.addGestureListeners(h,function(){},mxUtils.bind(this,function(a){q.isMouseDown&&null!=q.panningManager&&null!=q.graphHandler.shape&&(q.graphHandler.shape.node.style.visibility="hidden",null!=f?f.style.border="3px dotted rgb(254, 137, 12)":h.style.border="3px dotted rgb(254, 137, 12)",h.style.cursor="copy",q.panningManager.stop(),q.autoScroll=!1,null!=q.graphHandler.guide&&q.graphHandler.guide.setVisible(!1),
-null!=q.graphHandler.hint&&(q.graphHandler.hint.style.visibility="hidden"),mxEvent.consume(a))}),mxUtils.bind(this,function(a){q.isMouseDown&&null!=q.panningManager&&null!=q.graphHandler&&(h.style.border="3px solid transparent",null!=f&&(f.style.border="3px dotted lightGray"),h.style.cursor="default",this.sidebar.showTooltips=!0,q.panningManager.stop(),q.graphHandler.reset(),q.isMouseDown=!1,q.autoScroll=!0,C(a),mxEvent.consume(a))}));mxEvent.addListener(h,"mouseleave",mxUtils.bind(this,function(a){q.isMouseDown&&
-null!=q.graphHandler.shape&&(q.graphHandler.shape.node.style.visibility="visible",h.style.border="3px solid transparent",h.style.cursor="",q.autoScroll=!0,null!=q.graphHandler.guide&&q.graphHandler.guide.setVisible(!0),null!=q.graphHandler.hint&&(q.graphHandler.hint.style.visibility="visible"),null!=f&&(f.style.border="3px dotted lightGray"))}));Graph.fileSupport&&(mxEvent.addListener(h,"dragover",mxUtils.bind(this,function(a){null!=f?f.style.border="3px dotted rgb(254, 137, 12)":h.style.border="3px dotted rgb(254, 137, 12)";
-a.dataTransfer.dropEffect="copy";h.style.cursor="copy";this.sidebar.hideTooltip();a.stopPropagation();a.preventDefault()})),mxEvent.addListener(h,"drop",mxUtils.bind(this,function(a){h.style.border="3px solid transparent";h.style.cursor="";null!=f&&(f.style.border="3px dotted lightGray");0<a.dataTransfer.files.length&&this.importFiles(a.dataTransfer.files,0,0,this.maxImageSize,mxUtils.bind(this,function(c,d,k,m,n,g,r,l,u){if(null!=c&&"image/"==d.substring(0,6))c="shape=image;verticalLabelPosition=bottom;verticalAlign=top;aspect=fixed;image="+
-this.convertDataUri(c),c=[new mxCell("",new mxGeometry(0,0,n,g),c)],c[0].vertex=!0,y(c,new mxRectangle(0,0,n,g),a,mxEvent.isAltDown(a)?null:r.substring(0,r.lastIndexOf(".")).replace(/_/g," ")),null!=f&&null!=f.parentNode&&0<b.length&&(f.parentNode.removeChild(f),f=null);else{var t=!1,p=mxUtils.bind(this,function(c,d){if(null!=c&&"text/xml"==d){var k=mxUtils.parseXml(c);if("mxlibrary"==k.documentElement.nodeName)try{var m=JSON.parse(mxUtils.getTextContent(k.documentElement));e(m,h);b=b.concat(m);B(a);
-this.spinner.stop();t=!0}catch(Y){}else if("mxfile"==k.documentElement.nodeName)try{for(var n=k.documentElement.getElementsByTagName("diagram"),k=0;k<n.length;k++){var m=mxUtils.getTextContent(n[k]),g=this.stringToCells(this.editor.graph.decompress(m)),r=this.editor.graph.getBoundingBoxFromGeometry(g);y(g,new mxRectangle(0,0,r.width,r.height),a)}t=!0}catch(Y){null!=window.console&&console.log("error in drop handler:",Y)}}t||(this.spinner.stop(),this.handleError({message:mxResources.get("errorLoadingFile")}));
-null!=f&&null!=f.parentNode&&0<b.length&&(f.parentNode.removeChild(f),f=null)});!this.isOffline()&&(new XMLHttpRequest).upload&&this.isRemoteFileFormat(c,r)&&null!=u?this.parseFile(u,mxUtils.bind(this,function(a){4==a.readyState&&(this.spinner.stop(),200<=a.status&&299>=a.status?p(a.responseText,"text/xml"):this.handleError({message:mxResources.get(413==a.status?"drawingTooLarge":"invalidOrMissingFile")},mxResources.get("errorLoadingFile")))})):p(c,d)}}));a.stopPropagation();a.preventDefault()})),
-mxEvent.addListener(h,"dragleave",function(a){null!=f?f.style.border="3px dotted lightGray":(h.style.border="3px solid transparent",h.style.cursor="");a.stopPropagation();a.preventDefault()}));l=l.cloneNode(!1);l.setAttribute("src",IMAGE_PATH+"/edit.gif");l.setAttribute("title",mxResources.get("edit"));g.insertBefore(l,g.firstChild);mxEvent.addListener(l,"click",D);mxEvent.addListener(h,"dblclick",function(a){mxEvent.getSource(a)==h&&D(a)});l=l.cloneNode(!1);l.setAttribute("src",Editor.plusImage);
-l.setAttribute("title",mxResources.get("add"));g.insertBefore(l,g.firstChild);this.isOffline()||".scratchpad"!=a.title||(d=document.createElement("span"),d.setAttribute("title",mxResources.get("help")),d.style.cssText="color:gray;text-decoration:none;",d.className="geButton",mxUtils.write(d,"?"),mxEvent.addGestureListeners(d,mxUtils.bind(this,function(a){window.open("https://desk.draw.io/support/solutions/articles/16000042367");mxEvent.consume(a)})),g.insertBefore(d,g.firstChild));var A=null;mxEvent.addListener(l,
-"click",C)}k.appendChild(g);k.style.paddingRight=18*g.childNodes.length+"px"};"1"==urlParams.offline?EditorUi.prototype.footerHeight=4:("atlas"==uiTheme?("undefined"!==typeof Toolbar&&(Toolbar.prototype.unselectedBackground=mxClient.IS_QUIRKS?"none":"linear-gradient(rgb(255, 255, 255) 0px, rgb(242, 242, 242) 100%)",Toolbar.prototype.selectedBackground="rgb(242, 242, 242)"),Editor.prototype.initialTopSpacing=3,EditorUi.prototype.menubarHeight=41,EditorUi.prototype.toolbarHeight=38,EditorUi.prototype.hsplitPosition=
-188,Sidebar.prototype.thumbWidth=46,Sidebar.prototype.thumbHeight=46,Sidebar.prototype.thumbPadding=5<=document.documentMode?0:1,Sidebar.prototype.thumbBorder=2):"1"==urlParams.savesidebar&&(Sidebar.prototype.thumbWidth=64,Sidebar.prototype.thumbHeight=64),EditorUi.prototype.footerHeight=760<=screen.width&&240<=screen.height?46:0,EditorUi.prototype.createFooter=function(){var a=document.getElementById("geFooter");if(null!=a){a.style.visibility="visible";var b=document.createElement("img");b.setAttribute("border",
-"0");b.setAttribute("src",Dialog.prototype.closeImage);b.setAttribute("title",mxResources.get("hide"));a.appendChild(b);mxClient.IS_QUIRKS&&(b.style.position="relative",b.style.styleFloat="right",b.style.top="-30px",b.style.left="164px",b.style.cursor="pointer");mxEvent.addListener(b,"click",mxUtils.bind(this,function(){this.hideFooter()}))}return a});EditorUi.prototype.hideFooter=function(){var a=document.getElementById("geFooter");null!=a&&(this.footerHeight=0,a.style.display="none",this.refresh())};
-EditorUi.prototype.showImageDialog=function(a,b,d,e,n){a=new ImageDialog(this,a,b,d,e,n);this.showDialog(a.container,Graph.fileSupport?440:360,Graph.fileSupport?200:90,!0,!0);a.init()};EditorUi.prototype.showBackgroundImageDialog=function(a){a=null!=a?a:mxUtils.bind(this,function(a){a=new ChangePageSetup(this,null,a);a.ignoreColor=!0;this.editor.graph.model.execute(a)});var c=new BackgroundImageDialog(this,mxUtils.bind(this,function(c){a(c)}));this.showDialog(c.container,360,200,!0,!0);c.init()};
-EditorUi.prototype.showLibraryDialog=function(a,b,d,e,n){a=new LibraryDialog(this,a,b,d,e,n);this.showDialog(a.container,620,440,!0,!1,mxUtils.bind(this,function(a){a&&null==this.getCurrentFile()&&"1"!=urlParams.embed&&this.showSplash()}));a.init()};EditorUi.prototype.createSidebarFooterContainer=function(){var a=this.createDiv("geSidebarContainer");a.style.position="absolute";a.style.overflow="hidden";a.style.borderWidth="3px";var b=document.createElement("a");b.setAttribute("href","javascript:void(0);");
-b.className="geTitle";b.style.height="100%";b.style.paddingTop="9px";mxUtils.write(b,mxResources.get("moreShapes")+"...");mxEvent.addListener(b,"click",mxUtils.bind(this,function(a){this.actions.get("shapes").funct();mxEvent.consume(a)}));a.appendChild(b);return a};EditorUi.prototype.handleError=function(a,b,d){var c=null!=this.spinner&&null!=this.spinner.pause?this.spinner.pause():function(){},f=null!=a&&null!=a.error?a.error:a;if(null!=f||null!=b){a=mxUtils.htmlEntities(mxResources.get("unknownError"));
-var e=mxResources.get("ok"),h=null;b=null!=b?b:mxResources.get("error");if(null!=f)if(null!=f.retry&&(e=mxResources.get("cancel"),h=function(){c();f.retry()}),"undefined"!=typeof gapi&&"undefined"!=typeof gapi.drive&&"undefined"!=typeof gapi.drive.realtime&&f.type==gapi.drive.realtime.ErrorType.FORBIDDEN)a=mxUtils.htmlEntities(mxResources.get("forbidden"));else if(404==f.code||404==f.status||"undefined"!=typeof gapi&&"undefined"!=typeof gapi.drive&&"undefined"!=typeof gapi.drive.realtime&&f.type==
-gapi.drive.realtime.ErrorType.NOT_FOUND){a=mxUtils.htmlEntities(mxResources.get("fileNotFoundOrDenied"));var k=window.location.hash;null!=k&&"#G"==k.substring(0,2)&&(k=k.substring(2),a+=' <a href="https://drive.google.com/open?id='+k+'" target="_blank">'+mxUtils.htmlEntities(mxResources.get("tryOpeningViaThisPage"))+"</a>")}else f.code==App.ERROR_TIMEOUT?a=mxUtils.htmlEntities(mxResources.get("timeout")):f.code==App.ERROR_BUSY?a=mxUtils.htmlEntities(mxResources.get("busy")):null!=f.message?a=mxUtils.htmlEntities(f.message):
-null!=f.response&&null!=f.response.error&&(a=mxUtils.htmlEntities(f.response.error));this.showError(b,a,e,d,h)}else null!=d&&d()};EditorUi.prototype.showError=function(a,b,d,e,n,g,r){a=new ErrorDialog(this,a,b,d,e,n,g,r);this.showDialog(a.container,340,150,!0,!1);a.init()};EditorUi.prototype.alert=function(a,b){var c=new ErrorDialog(this,null,a,mxResources.get("ok"),b);this.showDialog(c.container,340,100,!0,!1);c.init()};EditorUi.prototype.confirm=function(a,b,d,e,n){var c=null!=this.spinner&&null!=
-this.spinner.pause?this.spinner.pause():function(){};this.showDialog((new ConfirmDialog(this,a,function(){c();null!=b&&b()},function(){c();null!=d&&d()},e,n)).container,340,90,!0,!1)};EditorUi.prototype.setCurrentFile=function(a){this.currentFile=a};EditorUi.prototype.getCurrentFile=function(){return this.currentFile};EditorUi.prototype.isExportToCanvas=function(){return mxClient.IS_CHROMEAPP||!this.editor.graph.mathEnabled&&this.useCanvasForExport};EditorUi.prototype.createSvgDataUri=function(a){return"data:image/svg+xml;base64,"+
-btoa(unescape(encodeURIComponent(a)))};EditorUi.prototype.createImageDataUri=function(a,b,d){var c=a.toDataURL("image/"+d);if(6>=c.length||c==a.cloneNode(!1).toDataURL("image/"+d))throw{message:"Invalid image"};null!=b&&(c=this.writeGraphModelToPng(c,"zTXt","mxGraphModel",atob(this.editor.graph.compress(b))));return c};EditorUi.prototype.saveCanvas=function(a,b,d){var c="jpeg"==d?"jpg":d,f=this.getBaseFilename()+"."+c;a=this.createImageDataUri(a,b,d);this.saveData(f,c,a.substring(a.lastIndexOf(",")+
-1),"image/"+d,!0)};EditorUi.prototype.isLocalFileSave=function(){return"remote"!=urlParams.save&&(mxClient.IS_IE||"undefined"!==typeof window.Blob&&"undefined"!==typeof window.URL)&&9!=document.documentMode&&8!=document.documentMode&&7!=document.documentMode&&!mxClient.IS_QUIRKS||this.isOfflineApp()||mxClient.IS_IOS};EditorUi.prototype.doSaveLocalFile=function(a,b,d,e,n){if(window.Blob&&navigator.msSaveOrOpenBlob)a=e?this.base64ToBlob(a,d):new Blob([a],{type:d}),navigator.msSaveOrOpenBlob(a,b);else if(mxClient.IS_IE)d=
-window.open("about:blank","_blank"),null==d?mxUtils.popup(a,!0):(d.document.write(a),d.document.close(),d.document.execCommand("SaveAs",!0,b),d.close());else if(mxClient.IS_IOS)b=new TextareaDialog(this,b+":",a,null,null,mxResources.get("close")),b.textarea.style.width="600px",b.textarea.style.height="380px",this.showDialog(b.container,620,460,!0,!0),b.init(),document.execCommand("selectall",!1,null);else{var c=document.createElement("a"),f=!mxClient.IS_SF&&"undefined"!==typeof c.download;if(f||this.isOffline()){c.href=
-URL.createObjectURL(e?this.base64ToBlob(a,d):new Blob([a],{type:d}));f?c.download=b:c.setAttribute("target","_blank");document.body.appendChild(c);try{window.setTimeout(function(){URL.revokeObjectURL(c.href)},0),c.click(),c.parentNode.removeChild(c)}catch(k){}}else this.createEchoRequest(a,b,d,e,n).simulate(document,"_blank")}};EditorUi.prototype.createEchoRequest=function(a,b,d,e,n,g){a="xml="+encodeURIComponent(a);return new mxXmlRequest(SAVE_URL,a+(null!=d?"&mime="+d:"")+(null!=n?"&format="+n:
-"")+(null!=g?"&base64="+g:"")+(null!=b?"&filename="+encodeURIComponent(b):"")+(e?"&binary=1":""))};EditorUi.prototype.base64ToBlob=function(a,b){b=b||"";for(var c=atob(a),d=c.length,f=Math.ceil(d/1024),e=Array(f),g=0;g<f;++g){for(var k=1024*g,l=Math.min(k+1024,d),p=Array(l-k),q=0;k<l;++q,++k)p[q]=c[k].charCodeAt(0);e[g]=new Uint8Array(p)}return new Blob(e,{type:b})};EditorUi.prototype.saveLocalFile=function(a,b,d,e,n,g){g=null!=g?g:!1;var c="vsdx"!=n&&(!mxClient.IS_IOS||!navigator.standalone);n=this.getServiceCount(g);
-b=new CreateDialog(this,b,mxUtils.bind(this,function(c,b){try{if("_blank"==b)if(null==d||"image/"!=d.substring(0,6)||"image/svg"==d.substring(0,9)&&!mxClient.IS_SVG){var f=window.open("about:blank");null==f?mxUtils.popup(a,!0):(f.document.write(mxUtils.htmlEntities(a,!1)),f.document.close())}else this.openInNewWindow(a,d,e);else b==App.MODE_DEVICE?this.doSaveLocalFile(a,c,d,e):null!=c&&0<c.length&&this.pickFolder(b,mxUtils.bind(this,function(f){try{this.exportFile(a,c,d,e,b,f)}catch(w){this.handleError(w)}}))}catch(x){this.handleError(x)}}),
-mxUtils.bind(this,function(){this.hideDialog()}),mxResources.get("saveAs"),mxResources.get("download"),!1,g,c,null,null,4<n?3:4,a,d,e);this.showDialog(b.container,380,4<n?390:270,!0,!0);b.init()};EditorUi.prototype.openInNewWindow=function(a,b,d){if(mxClient.IS_GC||mxClient.IS_EDGE||11==document.documentMode||10==document.documentMode){var c=window.open("about:blank");null==c?mxUtils.popup(a,!0):(c.document.write('<html><img src="data:'+b+(d?";base64,"+a:";charset=utf8,"+encodeURIComponent(a))+'"/></html>'),
-c.document.close())}else c=window.open("data:"+b+(d?";base64,"+a:";charset=utf8,"+encodeURIComponent(a))),null==c&&mxUtils.popup(a,!0)};var b=EditorUi.prototype.addChromelessToolbarItems;EditorUi.prototype.addChromelessToolbarItems=function(a){if(this.isExportToCanvas()){this.exportDialog=null;var c=a(mxUtils.bind(this,function(a){var b=mxUtils.bind(this,function(){mxEvent.removeListener(this.editor.graph.container,"click",b);null!=this.exportDialog&&(this.exportDialog.parentNode.removeChild(this.exportDialog),
-this.exportDialog=null)});if(null!=this.exportDialog)b.apply(this);else{this.exportDialog=document.createElement("div");var d=c.getBoundingClientRect();mxUtils.setPrefixedStyle(this.exportDialog.style,"borderRadius","5px");this.exportDialog.style.position="fixed";this.exportDialog.style.textAlign="center";this.exportDialog.style.fontFamily="Helvetica,Arial";this.exportDialog.style.backgroundColor="#000000";this.exportDialog.style.width="50px";this.exportDialog.style.height="50px";this.exportDialog.style.padding=
-"4px 2px 4px 2px";this.exportDialog.style.color="#ffffff";mxUtils.setOpacity(this.exportDialog,70);this.exportDialog.style.left=d.left+"px";this.exportDialog.style.bottom=parseInt(this.chromelessToolbar.style.bottom)+this.chromelessToolbar.offsetHeight+4+"px";d=mxUtils.getCurrentStyle(this.editor.graph.container);this.exportDialog.style.zIndex=d.zIndex;var f=new Spinner({lines:8,length:6,width:5,radius:6,rotate:0,color:"#fff",speed:1.5,trail:60,shadow:!1,hwaccel:!1,top:"28px",zIndex:2E9});f.spin(this.exportDialog);
-this.exportToCanvas(mxUtils.bind(this,function(a){f.stop();this.exportDialog.style.width="auto";this.exportDialog.style.height="auto";this.exportDialog.style.padding="10px";var c=this.createImageDataUri(a,null,"png");a=document.createElement("img");a.style.maxWidth="140px";a.style.maxHeight="140px";a.style.cursor="pointer";a.setAttribute("title",mxResources.get("openInNewWindow"));a.setAttribute("border","0");a.setAttribute("src",c);this.exportDialog.appendChild(a);mxEvent.addListener(a,"click",mxUtils.bind(this,
-function(){this.openInNewWindow(c.substring(c.indexOf(",")+1),"image/png",!0);b.apply(this,arguments)}))}),null,this.thumbImageCache,null,mxUtils.bind(this,function(a){this.spinner.stop();this.handleError(a)}));mxEvent.addListener(this.editor.graph.container,"click",b);document.body.appendChild(this.exportDialog)}mxEvent.consume(a)}),Editor.cameraLargeImage,mxResources.get("export"))}b.apply(this,arguments)};EditorUi.prototype.saveData=function(a,b,d,e,n){this.isLocalFileSave()?this.saveLocalFile(d,
-a,e,n,b):this.saveRequest(a,b,mxUtils.bind(this,function(a,c){return this.createEchoRequest(d,a,e,n,b,c)}),d,n,e)};EditorUi.prototype.saveRequest=function(a,b,d,e,n,g){var c=!mxClient.IS_IOS||!navigator.standalone,f=this.getServiceCount(!1);a=new CreateDialog(this,a,mxUtils.bind(this,function(a,c){if("_blank"==c||null!=a&&0<a.length){var f=d("_blank"==c?null:a,c==App.MODE_DEVICE||null==c||"_blank"==c?"0":"1");null!=f&&(c==App.MODE_DEVICE||"_blank"==c?f.simulate(document,"_blank"):this.pickFolder(c,
-mxUtils.bind(this,function(d){g=null!=g?g:"pdf"==b?"application/pdf":"image/"+b;if(null!=e)try{this.exportFile(e,a,g,!0,c,d)}catch(D){this.handleError(D)}else this.spinner.spin(document.body,mxResources.get("saving"))&&f.send(mxUtils.bind(this,function(){this.spinner.stop();if(200<=f.getStatus()&&299>=f.getStatus())try{this.exportFile(f.getText(),a,g,!0,c,d)}catch(D){this.handleError(D)}else this.handleError({message:mxResources.get("errorSavingFile")})}),function(a){this.spinner.stop();this.handleError(a)})})))}}),
-mxUtils.bind(this,function(){this.hideDialog()}),mxResources.get("saveAs"),mxResources.get("download"),!1,!1,c,null,null,4<f?3:4,e,g,n);this.showDialog(a.container,380,4<f?390:270,!0,!0);a.init()};EditorUi.prototype.exportFile=function(a,b,d,e,n,g){};EditorUi.prototype.pickFolder=function(a,b,d){b(null)};EditorUi.prototype.exportSvg=function(a,b,d,e,n,g,r,k,l){if(this.spinner.spin(document.body,mxResources.get("export"))){var c=this.editor.graph.isSelectionEmpty();d=null!=d?d:c;c=b?null:this.editor.graph.background;
-c==mxConstants.NONE&&(c=null);null==c&&0==b&&(c="#ffffff");var f=this.editor.graph.getSvg(c,a,r,k,null,d);e&&this.editor.graph.addSvgShadow(f);var h=this.getBaseFilename()+".svg",m=mxUtils.bind(this,function(a){this.spinner.stop();n&&a.setAttribute("content",this.getFileData(!0,null,null,null,d,l));var c='<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">\n'+mxUtils.getXml(a);this.isLocalFileSave()||c.length<=MAX_REQUEST_SIZE?this.saveData(h,"svg",c,
-"image/svg+xml"):this.handleError({message:mxResources.get("drawingTooLarge")},mxResources.get("error"),mxUtils.bind(this,function(){mxUtils.popup(c)}))});this.convertMath(this.editor.graph,f,!1,mxUtils.bind(this,function(){g?(null==this.thumbImageCache&&(this.thumbImageCache={}),this.convertImages(f,m,this.thumbImageCache)):m(f)}))}};EditorUi.prototype.addCheckbox=function(a,b,d,e,n,g){g=null!=g?g:!0;var c=document.createElement("input");c.style.marginRight="8px";c.style.marginTop="16px";c.setAttribute("type",
-"checkbox");d&&(c.setAttribute("checked","checked"),c.defaultChecked=!0);e&&c.setAttribute("disabled","disabled");g&&(a.appendChild(c),mxUtils.write(a,b),n||mxUtils.br(a));return c};EditorUi.prototype.addEditButton=function(a,b){var c=this.addCheckbox(a,mxResources.get("edit")+":",!0,null,!0);c.style.marginLeft="24px";var d=this.getCurrentFile(),f="";null!=d&&d.getMode()!=App.MODE_DEVICE&&d.getMode()!=App.MODE_BROWSER&&(f=window.location.href);var e=document.createElement("select");e.style.width=
-"120px";e.style.marginLeft="8px";e.style.marginRight="10px";e.className="geBtn";d=document.createElement("option");d.setAttribute("value","blank");mxUtils.write(d,mxResources.get("makeCopy"));e.appendChild(d);d=document.createElement("option");d.setAttribute("value","custom");mxUtils.write(d,mxResources.get("custom")+"...");e.appendChild(d);a.appendChild(e);mxEvent.addListener(e,"change",mxUtils.bind(this,function(){if("custom"==e.value){var a=new FilenameDialog(this,f,mxResources.get("ok"),function(a){null!=
-a?f=a:e.value="blank"},mxResources.get("url"),null,null,null,null,function(){e.value="blank"});this.showDialog(a.container,300,80,!0,!1);a.init()}}));mxEvent.addListener(c,"change",mxUtils.bind(this,function(){c.checked&&(null==b||b.checked)?e.removeAttribute("disabled"):e.setAttribute("disabled","disabled")}));mxUtils.br(a);return{getLink:function(){return c.checked?"blank"===e.value?"_blank":f:null},getEditInput:function(){return c},getEditSelect:function(){return e}}};EditorUi.prototype.addLinkSection=
-function(a,b){function c(){g.innerHTML='<div style="width:100%;height:100%;box-sizing:border-box;'+(null!=e&&e!=mxConstants.NONE?"border:1px solid black;background-color:"+e:"background-position:center center;background-repeat:no-repeat;background-image:url('"+Dialog.prototype.closeImage+"')")+';"></div>'}mxUtils.write(a,mxResources.get("links")+":");var d=document.createElement("select");d.style.width="100px";d.style.marginLeft="8px";d.style.marginRight="10px";d.className="geBtn";var f=document.createElement("option");
-f.setAttribute("value","auto");mxUtils.write(f,mxResources.get("automatic"));d.appendChild(f);f=document.createElement("option");f.setAttribute("value","blank");mxUtils.write(f,mxResources.get("openInNewWindow"));d.appendChild(f);f=document.createElement("option");f.setAttribute("value","self");mxUtils.write(f,mxResources.get("openInThisWindow"));d.appendChild(f);b&&(f=document.createElement("option"),f.setAttribute("value","frame"),mxUtils.write(f,mxResources.get("openInThisWindow")+" ("+mxResources.get("iframe")+
-")"),d.appendChild(f));a.appendChild(d);mxUtils.write(a,mxResources.get("borderColor")+":");var e="#0000ff",g=null,g=mxUtils.button("",mxUtils.bind(this,function(a){this.pickColor(e||"none",function(a){e=a;c()});mxEvent.consume(a)}));c();g.style.padding=mxClient.IS_FF?"4px 2px 4px 2px":"4px";g.style.marginLeft="4px";g.style.height="22px";g.style.width="22px";g.style.position="relative";g.style.top=mxClient.IS_IE||mxClient.IS_IE11||mxClient.IS_EDGE?"6px":"1px";g.className="geColorBtn";a.appendChild(g);
-mxUtils.br(a);return{getColor:function(){return e},getTarget:function(){return d.value},focus:function(){d.focus()}}};EditorUi.prototype.createLink=function(a,b,d,e,n,g,l,k){var c=this.getCurrentFile(),f=[];e&&(f.push("lightbox=1"),"auto"!=a&&f.push("target="+a),null!=b&&b!=mxConstants.NONE&&f.push("highlight="+("#"==b.charAt(0)?b.substring(1):b)),null!=n&&0<n.length&&f.push("edit="+encodeURIComponent(n)),g&&f.push("layers=1"),this.editor.graph.foldingEnabled&&f.push("nav=1"));if(d&&null!=this.pages&&
-null!=this.currentPage)for(a=0;a<this.pages.length;a++)if(this.pages[a]==this.currentPage){0<a&&f.push("page="+a);break}a=!0;null!=l?d="#U"+encodeURIComponent(l):(c=this.getCurrentFile(),k||null==c||c.constructor!=window.DriveFile?d="#R"+encodeURIComponent(d?this.getFileData(!0,null,null,null,null,null,null,!0):this.editor.graph.compress(mxUtils.getXml(this.editor.getGraphXml()))):(d="#"+c.getHash(),a=!1));a&&null!=c&&null!=c.getTitle()&&c.getTitle()!=this.defaultFilename&&f.push("title="+encodeURIComponent(c.getTitle()));
-return(mxClient.IS_CHROMEAPP||EditorUi.isElectronApp?"https://www.draw.io/":"https://"+location.host+"/")+(0<f.length?"?"+f.join("&"):"")+d};EditorUi.prototype.createHtml=function(a,b,d,e,n,g,l,k,p,v,q){this.getBasenames();var c={};""!=n&&n!=mxConstants.NONE&&(c.highlight=n);"auto"!==e&&(c.target=e);p||(c.lightbox=!1);c.nav=this.editor.graph.foldingEnabled;d=parseInt(d);isNaN(d)||100==d||(c.zoom=d/100);d=[];l&&(d.push("pages"),c.resize=!0,null!=this.pages&&null!=this.currentPage&&(c.page=mxUtils.indexOf(this.pages,
-this.currentPage)));b&&(d.push("zoom"),c.resize=!0);k&&d.push("layers");0<d.length&&(p&&d.push("lightbox"),c.toolbar=d.join(" "));null!=v&&0<v.length&&(c.edit=v);null!=a?c.url=a:c.xml=this.getFileData(!0,null,null,null,null,!l);b='<div class="mxgraph" style="'+(g?"max-width:100%;":"")+(""!=d?"border:1px solid transparent;":"")+'" data-mxgraph="'+mxUtils.htmlEntities(JSON.stringify(c))+'"></div>';a=null!=a?"&fetch="+encodeURIComponent(a):"";q(b,'<script type="text/javascript" src="'+(0<a.length?("1"==
-urlParams.dev?"https://test.draw.io/embed2.js?dev=1":"https://www.draw.io/embed2.js?")+a:"1"==urlParams.dev?"https://test.draw.io/js/viewer.min.js":"https://www.draw.io/js/viewer.min.js")+'">\x3c/script>')};EditorUi.prototype.showHtmlDialog=function(a,b,d,e){var c=document.createElement("div");c.style.whiteSpace="nowrap";var f=document.createElement("h3");mxUtils.write(f,mxResources.get("html"));f.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:12px";c.appendChild(f);var h=
-document.createElement("div");h.style.cssText="border-bottom:1px solid lightGray;padding-bottom:8px;margin-bottom:12px;";var k=document.createElement("input");k.style.cssText="margin-right:8px;margin-top:8px;margin-bottom:8px;";k.setAttribute("value","url");k.setAttribute("type","radio");k.setAttribute("name","type-embedhtmldialog");f=k.cloneNode(!0);f.setAttribute("value","copy");h.appendChild(f);var m=document.createElement("span");mxUtils.write(m,mxResources.get("includeCopyOfMyDiagram"));h.appendChild(m);
-mxUtils.br(h);h.appendChild(k);m=document.createElement("span");mxUtils.write(m,mxResources.get("publicDiagramUrl"));h.appendChild(m);var g=this.getCurrentFile();null==d&&null!=g&&g.constructor==window.DriveFile&&(m=document.createElement("a"),m.style.paddingLeft="12px",m.style.color="gray",m.setAttribute("href","javascript:void(0);"),mxUtils.write(m,mxResources.get("share")),h.appendChild(m),mxEvent.addListener(m,"click",mxUtils.bind(this,function(){this.hideDialog();this.drive.showPermissions(g.getId())})));
-f.setAttribute("checked","checked");null==d&&k.setAttribute("disabled","disabled");c.appendChild(h);var l=this.addLinkSection(c),p=this.addCheckbox(c,mxResources.get("zoom"),!0,null,!0);mxUtils.write(c,":");var q=document.createElement("input");q.setAttribute("type","text");q.style.marginRight="16px";q.style.width="60px";q.style.marginLeft="4px";q.style.marginRight="12px";q.value="100%";c.appendChild(q);var B=this.addCheckbox(c,mxResources.get("fit"),!0),h=null!=this.pages&&1<this.pages.length,y=
-y=this.addCheckbox(c,mxResources.get("allPages"),h,!h),C=this.addCheckbox(c,mxResources.get("layers"),!0),A=this.addCheckbox(c,mxResources.get("lightbox"),!0),F=this.addEditButton(c,A),z=F.getEditInput();z.style.marginBottom="16px";mxEvent.addListener(A,"change",function(){A.checked?z.removeAttribute("disabled"):z.setAttribute("disabled","disabled");z.checked&&A.checked?F.getEditSelect().removeAttribute("disabled"):F.getEditSelect().setAttribute("disabled","disabled")});a=new CustomDialog(this,c,
-mxUtils.bind(this,function(){e(k.checked?d:null,p.checked,q.value,l.getTarget(),l.getColor(),B.checked,y.checked,C.checked,A.checked,F.getLink())}),null,a,b);this.showDialog(a.container,340,360,!0,!0);f.focus()};EditorUi.prototype.showPublishLinkDialog=function(a,b,d,e,g,l){var c=document.createElement("div");c.style.whiteSpace="nowrap";var f=document.createElement("h3");mxUtils.write(f,a||mxResources.get("link"));f.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:12px";c.appendChild(f);
-var h=this.getCurrentFile(),f="https://desk.draw.io/support/solutions/articles/16000051941";a=0;if(null!=h&&h.constructor==window.DriveFile&&!b){a=80;var f="https://desk.draw.io/support/solutions/articles/16000039384",m=document.createElement("div");m.style.cssText="border-bottom:1px solid lightGray;padding-bottom:14px;padding-top:6px;margin-bottom:14px;text-align:center;";var n=document.createElement("div");n.style.whiteSpace="normal";mxUtils.write(n,mxResources.get("linkAccountRequired"));m.appendChild(n);
-n=mxUtils.button(mxResources.get("share"),mxUtils.bind(this,function(){this.drive.showPermissions(h.getId())}));n.style.marginTop="12px";n.className="geBtn";m.appendChild(n);c.appendChild(m);n=document.createElement("a");n.style.paddingLeft="12px";n.style.color="gray";n.style.fontSize="11px";n.setAttribute("href","javascript:void(0);");mxUtils.write(n,mxResources.get("check"));m.appendChild(n);mxEvent.addListener(n,"click",mxUtils.bind(this,function(){this.spinner.spin(document.body,mxResources.get("loading"))&&
-this.getPublicUrl(this.getCurrentFile(),mxUtils.bind(this,function(a){this.spinner.stop();a=new ErrorDialog(this,null,mxResources.get(null!=a?"diagramIsPublic":"diagramIsNotPublic"),mxResources.get("ok"));this.showDialog(a.container,300,80,!0,!1);a.init()}))}))}var p=null,q=null;if(null!=d||null!=e)a+=30,mxUtils.write(c,mxResources.get("width")+":"),p=document.createElement("input"),p.setAttribute("type","text"),p.style.marginRight="16px",p.style.width="50px",p.style.marginLeft="6px",p.style.marginRight=
-"16px",p.style.marginBottom="10px",p.value="100%",c.appendChild(p),mxUtils.write(c,mxResources.get("height")+":"),q=document.createElement("input"),q.setAttribute("type","text"),q.style.width="50px",q.style.marginLeft="6px",q.style.marginBottom="10px",q.value=e+"px",c.appendChild(q),mxUtils.br(c);var u=this.addLinkSection(c,l);d=null!=this.pages&&1<this.pages.length;var y=null;if(null==h||h.constructor!=window.DriveFile||b)y=this.addCheckbox(c,mxResources.get("allPages"),d,!d);var C=this.addCheckbox(c,
-mxResources.get("lightbox"),!0),A=this.addEditButton(c,C),F=A.getEditInput(),z=this.addCheckbox(c,mxResources.get("layers"),!0);z.style.marginLeft=F.style.marginLeft;z.style.marginBottom="16px";z.style.marginTop="8px";mxEvent.addListener(C,"change",function(){C.checked?(z.removeAttribute("disabled"),F.removeAttribute("disabled")):(z.setAttribute("disabled","disabled"),F.setAttribute("disabled","disabled"));F.checked&&C.checked?A.getEditSelect().removeAttribute("disabled"):A.getEditSelect().setAttribute("disabled",
-"disabled")});b=new CustomDialog(this,c,mxUtils.bind(this,function(){g(u.getTarget(),u.getColor(),null==y?!0:y.checked,C.checked,A.getLink(),z.checked,null!=p?p.value:null,null!=q?q.value:null)}),null,mxResources.get("create"),f);this.showDialog(b.container,340,246+a,!0,!0);null!=p?(p.focus(),mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode||mxClient.IS_QUIRKS?p.select():document.execCommand("selectAll",!1,null)):u.focus()};EditorUi.prototype.showRemoteExportDialog=function(a,b,d,e){var c=
-document.createElement("div");c.style.whiteSpace="nowrap";var f=document.createElement("h3");mxUtils.write(f,mxResources.get("image"));f.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:4px";c.appendChild(f);var h=this.addCheckbox(c,mxResources.get("selectionOnly"),!1,this.editor.graph.isSelectionEmpty()),k=e?null:this.addCheckbox(c,mxResources.get("includeCopyOfMyDiagram"),!0);null!=k&&(k.style.marginBottom="16px");a=new CustomDialog(this,c,mxUtils.bind(this,function(){d(!h.checked,
-null!=k?k.checked:!1)}),null,a,b);this.showDialog(a.container,300,e?100:146,!0,!0)};EditorUi.prototype.showExportDialog=function(a,b,d,e,g,l,p,k){p=null!=p?p:!0;var c=document.createElement("div");c.style.whiteSpace="nowrap";var f=this.editor.graph,h="jpeg"==k?170:280,m=document.createElement("h3");mxUtils.write(m,a);m.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:10px";c.appendChild(m);mxUtils.write(c,mxResources.get("zoom")+":");var n=document.createElement("input");n.setAttribute("type",
-"text");n.style.marginRight="16px";n.style.width="60px";n.style.marginLeft="4px";n.style.marginRight="12px";n.value=this.lastExportZoom||"100%";c.appendChild(n);mxUtils.write(c,mxResources.get("borderWidth")+":");var r=document.createElement("input");r.setAttribute("type","text");r.style.marginRight="16px";r.style.width="60px";r.style.marginLeft="4px";r.value=this.lastExportBorder||"0";c.appendChild(r);mxUtils.br(c);var q=this.addCheckbox(c,mxResources.get("transparentBackground"),f.background==mxConstants.NONE||
-null==f.background,null,null,"jpeg"!=k),u=this.addCheckbox(c,mxResources.get("selectionOnly"),!1,f.isSelectionEmpty()),A=document.createElement("input");A.style.marginTop="16px";A.style.marginRight="8px";A.style.marginLeft="24px";A.setAttribute("disabled","disabled");A.setAttribute("type","checkbox");l&&(c.appendChild(A),mxUtils.write(c,mxResources.get("crop")),mxUtils.br(c),h+=26,mxEvent.addListener(u,"change",function(){u.checked?A.removeAttribute("disabled"):A.setAttribute("disabled","disabled")}));
-f.isSelectionEmpty()||(A.setAttribute("checked","checked"),A.defaultChecked=!0);var F=this.addCheckbox(c,mxResources.get("shadow"),f.shadowVisible),z=document.createElement("input");z.style.marginTop="16px";z.style.marginRight="8px";z.setAttribute("type","checkbox");!this.isOffline()&&this.canvasSupported||z.setAttribute("disabled","disabled");b&&(c.appendChild(z),mxUtils.write(c,mxResources.get("embedImages")),mxUtils.br(c),h+=26);var J=this.addCheckbox(c,mxResources.get("includeCopyOfMyDiagram"),
-p,null,null,"jpeg"!=k),I=null!=this.pages&&1<this.pages.length,H=this.addCheckbox(c,I?mxResources.get("allPages"):"",I,!I,null,"jpeg"!=k);H.style.marginLeft="24px";H.style.marginBottom="16px";I||(H.style.visibility="hidden");mxEvent.addListener(J,"change",function(){J.checked&&I?H.removeAttribute("disabled"):H.setAttribute("disabled","disabled")});p&&I||H.setAttribute("disabled","disabled");a=new CustomDialog(this,c,mxUtils.bind(this,function(){this.lastExportBorder=r.value;this.lastExportZoom=n.value;
-g(n.value,q.checked,!u.checked,F.checked,J.checked,z.checked,r.value,A.checked,!H.checked)}),null,d,e);this.showDialog(a.container,320,h,!0,!0);n.focus();mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode||mxClient.IS_QUIRKS?n.select():document.execCommand("selectAll",!1,null)};EditorUi.prototype.showEmbedImageDialog=function(a,b,d,e,n){var c=document.createElement("div");c.style.whiteSpace="nowrap";var f=this.editor.graph;if(null!=b){var h=document.createElement("h3");mxUtils.write(h,b);h.style.cssText=
-"width:100%;text-align:center;margin-top:0px;margin-bottom:4px";c.appendChild(h)}var m=this.addCheckbox(c,mxResources.get("fit"),!0),g=this.addCheckbox(c,mxResources.get("shadow"),f.shadowVisible&&e,!e),l=this.addCheckbox(c,d),p=this.addCheckbox(c,mxResources.get("lightbox"),!0),q=this.addEditButton(c,p),B=q.getEditInput(),y=1<f.model.getChildCount(f.model.getRoot()),C=this.addCheckbox(c,mxResources.get("layers"),y,!y);C.style.marginLeft=B.style.marginLeft;C.style.marginBottom="12px";C.style.marginTop=
-"8px";mxEvent.addListener(p,"change",function(){p.checked?(y&&C.removeAttribute("disabled"),B.removeAttribute("disabled")):(C.setAttribute("disabled","disabled"),B.setAttribute("disabled","disabled"));B.checked&&p.checked?q.getEditSelect().removeAttribute("disabled"):q.getEditSelect().setAttribute("disabled","disabled")});b=new CustomDialog(this,c,mxUtils.bind(this,function(){a(m.checked,g.checked,l.checked,p.checked,q.getLink(),C.checked)}),null,mxResources.get("embed"),n);this.showDialog(b.container,
-280,280,!0,!0)};EditorUi.prototype.createEmbedImage=function(a,b,d,e,g,l,p,k){function c(c){var b=" ",h="";e&&(b=" onclick=\"(function(img){if(img.wnd!=null&&!img.wnd.closed){img.wnd.focus();}else{var r=function(evt){if(evt.data=='ready'&&evt.source==img.wnd){img.wnd.postMessage(decodeURIComponent(img.getAttribute('src')),'*');window.removeEventListener('message',r);}};window.addEventListener('message',r);img.wnd=window.open('https://www.draw.io/?client=1&lightbox=1"+(g?"&edit=_blank":"")+(l?"&layers=1":
-"")+"');}})(this);\"",h+="cursor:pointer;");a&&(h+="max-width:100%;");var k="";d&&(k=' width="'+Math.round(f.width)+'" height="'+Math.round(f.height)+'"');p('<img src="'+c+'"'+k+(""!=h?' style="'+h+'"':"")+b+"/>")}var f=this.editor.graph.getGraphBounds();if(this.isExportToCanvas())this.exportToCanvas(mxUtils.bind(this,function(a){var b=e?this.getFileData(!0):null;a=this.createImageDataUri(a,b,"png");c(a)}),null,null,null,mxUtils.bind(this,function(a){k({message:mxResources.get("unknownError")})}),
-null,!0,d?2:1,null,b);else if(b=this.getFileData(!0),f.width*f.height<=MAX_AREA&&b.length<=MAX_REQUEST_SIZE){var h="";d&&(h="&w="+Math.round(2*f.width)+"&h="+Math.round(2*f.height));var m=new mxXmlRequest(EXPORT_URL,"format=png&base64=1&embedXml="+(e?"1":"0")+h+"&xml="+encodeURIComponent(b));m.send(mxUtils.bind(this,function(){200<=m.getStatus()&&299>=m.getStatus()?c("data:image/png;base64,"+m.getText()):k({message:mxResources.get("unknownError")})}))}else k({message:mxResources.get("drawingTooLarge")})};
-EditorUi.prototype.createEmbedSvg=function(a,b,d,e,g,l,p){var c=this.editor.graph.getSvg(),f=c.getElementsByTagName("a");if(null!=f)for(var h=0;h<f.length;h++){var m=f[h].getAttribute("href");null!=m&&"#"==m.charAt(0)&&"_blank"==f[h].getAttribute("target")&&f[h].removeAttribute("target")}e&&c.setAttribute("content",this.getFileData(!0));b&&this.editor.graph.addSvgShadow(c);if(d){var n=" ",r="";e&&(n="onclick=\"(function(img){if(img.wnd!=null&&!img.wnd.closed){img.wnd.focus();}else{var r=function(evt){if(evt.data=='ready'&&evt.source==img.wnd){img.wnd.postMessage(decodeURIComponent(img.getAttribute('src')),'*');window.removeEventListener('message',r);}};window.addEventListener('message',r);img.wnd=window.open('https://www.draw.io/?client=1&lightbox=1"+
-(g?"&edit=_blank":"")+(l?"&layers=1":"")+"');}})(this);\"",r+="cursor:pointer;");a&&(r+="max-width:100%;");this.convertImages(c,mxUtils.bind(this,function(a){p('<img src="'+this.createSvgDataUri(mxUtils.getXml(a))+'"'+(""!=r?' style="'+r+'"':"")+n+"/>")}))}else r="",e&&(c.setAttribute("onclick","(function(svg){var src=window.event.target||window.event.srcElement;while (src!=null&&src.nodeName.toLowerCase()!='a'){src=src.parentNode;}if(src==null){if(svg.wnd!=null&&!svg.wnd.closed){svg.wnd.focus();}else{var r=function(evt){if(evt.data=='ready'&&evt.source==svg.wnd){svg.wnd.postMessage(decodeURIComponent(svg.getAttribute('content')),'*');window.removeEventListener('message',r);}};window.addEventListener('message',r);svg.wnd=window.open('https://www.draw.io/?client=1&lightbox=1"+
-(g?"&edit=_blank":"")+(l?"&layers=1":"")+"');}}})(this);"),r+="cursor:pointer;"),a&&(a=parseInt(c.getAttribute("width")),b=parseInt(c.getAttribute("height")),c.setAttribute("viewBox","0 0 "+a+" "+b),r+="max-width:100%;max-height:"+b+"px;",c.removeAttribute("height")),""!=r&&c.setAttribute("style",r),p(mxUtils.getXml(c))};EditorUi.prototype.timeSince=function(a){a=Math.floor((new Date-a)/1E3);var c=Math.floor(a/31536E3);if(1<c)return c+" "+mxResources.get("years");c=Math.floor(a/2592E3);if(1<c)return c+
+(this.editor.graph.selectUnlockedLayer(),this.showLayersDialog(),this.restoreLibraries(),window.self!==window.top&&window.focus()):this.editor.graph.lightbox&&this.lightboxFit();this.chromelessResize&&this.chromelessResize();this.editor.fireEvent(new mxEventObject("fileLoaded"));c=!0;if(EditorUi.enableLogging&&!this.isOffline()&&null!=a.getMode())try{"function"===typeof window.ga&&ga("send","event","File","open",a.getMode())}catch(m){}if(this.mode==a.getMode()&&a.getMode()!=App.MODE_DEVICE&&null!=
+a.getMode())try{this.addRecent({id:a.getHash(),title:a.getTitle(),mode:a.getMode()})}catch(m){}try{mxSettings.setOpenCounter(mxSettings.getOpenCounter()+1),mxSettings.save()}catch(m){}}catch(m){null!=window.console&&console.log("error in fileLoaded:",a,m);if(EditorUi.enableLogging&&!this.isOffline())try{(new Image).src=(null!=window.DRAWIO_LOG_URL?window.DRAWIO_LOG_URL:"")+"/log?v="+encodeURIComponent(EditorUi.VERSION)+"&msg=errorInFileLoaded:url:"+encodeURIComponent(window.location.href)+(null!=
+m&&null!=m.message?":err:"+encodeURIComponent(m.message):"")+(null!=m&&null!=m.stack?"&stack="+encodeURIComponent(m.stack):"")}catch(u){}this.handleError(m,mxResources.get("errorLoadingFile"),mxUtils.bind(this,function(){null!=urlParams.url&&this.spinner.spin(document.body,mxResources.get("reconnecting"))?window.location.search=this.getSearch(["url"]):null!=b?b.constructor==DriveFile?this.loadFile(b.getHash()):this.fileLoaded(b):d()}))}else d();return c};EditorUi.prototype.restoreLibraries=function(){};
+EditorUi.prototype.saveLibrary=function(a,b,d,e,m,h,r){};EditorUi.prototype.isScratchpadEnabled=function(){return isLocalStorage||mxClient.IS_CHROMEAPP};EditorUi.prototype.toggleScratchpad=function(){this.isScratchpadEnabled()&&(null==this.scratchpad?this.getLocalData(".scratchpad",mxUtils.bind(this,function(a){null==a&&(a=this.emptyLibraryXml);this.loadLibrary(new StorageLibrary(this,a,".scratchpad"))})):this.closeLibrary(this.scratchpad))};EditorUi.prototype.createLibraryDataFromImages=function(a){var c=
+mxUtils.createXmlDocument(),b=c.createElement("mxlibrary");mxUtils.setTextContent(b,JSON.stringify(a));c.appendChild(b);return mxUtils.getXml(c)};EditorUi.prototype.closeLibrary=function(a){null!=a&&(this.removeLibrarySidebar(a.getHash()),a.constructor!=LocalLibrary&&mxSettings.removeCustomLibrary(a.getHash()),".scratchpad"==a.title&&(this.scratchpad=null))};EditorUi.prototype.removeLibrarySidebar=function(a){var c=this.sidebar.palettes[a];if(null!=c){for(var b=0;b<c.length;b++)c[b].parentNode.removeChild(c[b]);
+delete this.sidebar.palettes[a]}};EditorUi.prototype.repositionLibrary=function(a){var c=this.sidebar.container;if(null==a){var b=this.sidebar.palettes["L.scratchpad"];null==b&&(b=this.sidebar.palettes.search);null!=b&&(a=b[b.length-1].nextSibling)}a=null!=a?a:c.firstChild.nextSibling.nextSibling;var b=c.lastChild,d=b.previousSibling;c.insertBefore(b,a);c.insertBefore(d,b)};EditorUi.prototype.loadLibrary=function(a){var c=mxUtils.parseXml(a.getData());if("mxlibrary"==c.documentElement.nodeName){var b=
+JSON.parse(mxUtils.getTextContent(c.documentElement));this.libraryLoaded(a,b,c.documentElement.getAttribute("title"))}else throw{message:mxResources.get("notALibraryFile")};};EditorUi.prototype.getLibraryStorageHint=function(a){return""};EditorUi.prototype.libraryLoaded=function(a,b,d){a.constructor!=LocalLibrary&&mxSettings.addCustomLibrary(a.getHash());".scratchpad"==a.title&&(this.scratchpad=a);var c=this.sidebar.palettes[a.getHash()],c=null!=c?c[c.length-1].nextSibling:null;this.removeLibrarySidebar(a.getHash());
+var f=null,e=mxUtils.bind(this,function(c,b){if(0==c.length&&a.isEditable())null==f&&(f=document.createElement("div"),mxUtils.setPrefixedStyle(f.style,"borderRadius","6px"),f.style.border="3px dotted lightGray",f.style.textAlign="center",f.style.padding="8px",f.style.color="#B3B3B3",mxUtils.write(f,mxResources.get("dragElementsHere"))),b.appendChild(f);else for(var d=0;d<c.length;d++){var e=c[d],g=e.data;if(null!=g){var g=this.convertDataUri(g),k="shape=image;verticalLabelPosition=bottom;verticalAlign=top;imageAspect=0;";
+"fixed"==e.aspect&&(k+="aspect=fixed;");b.appendChild(this.sidebar.createVertexTemplate(k+"image="+g,e.w,e.h,"",e.title||"",!1,!1,!1))}else null!=e.xml&&(g=this.stringToCells(this.editor.graph.decompress(e.xml)),0<g.length&&b.appendChild(this.sidebar.createVertexTemplateFromCells(g,e.w,e.h,e.title||"",!0,!1,!1)))}});d=null!=d&&0<d.length?d:a.getTitle();var g=this.sidebar.addPalette(a.getHash(),d,!0,mxUtils.bind(this,function(a){e(b,a)}));this.repositionLibrary(c);var k=g.parentNode.previousSibling;
+d=k.getAttribute("title");null!=d&&0<d.length&&".scratchpad"!=a.title&&k.setAttribute("title",this.getLibraryStorageHint(a)+"\n"+d);var h=document.createElement("div");h.style.position="absolute";h.style.right="0px";h.style.top="5px";mxClient.IS_QUIRKS||8==document.documentMode||(h.style.backgroundColor="inherit");k.style.position="relative";var t=document.createElement("img");t.setAttribute("src",Dialog.prototype.closeImage);t.setAttribute("title",mxResources.get("close"));t.setAttribute("align",
+"top");t.setAttribute("border","0");t.className="geButton";t.style.marginRight="1px";t.style.marginTop="-1px";h.appendChild(t);var l=null;mxEvent.addListener(t,"click",mxUtils.bind(this,function(c){if(!mxEvent.isConsumed(c)){var b=mxUtils.bind(this,function(){this.closeLibrary(a)});null!=l?this.confirm(mxResources.get("allChangesLost"),null,b,mxResources.get("cancel"),mxResources.get("discardChanges")):b();mxEvent.consume(c)}}));mxEvent.addListener(g,"mousemove",mxUtils.bind(this,function(a){mxEvent.getSource(a)==
+g?g.setAttribute("title",mxResources.get("libraryTooltip")):g.removeAttribute("title")}));if(a.isEditable()){var n=this.editor.graph,q=mxUtils.bind(this,function(c){this.showLibraryDialog(a.getTitle(),g,b,a,a.getMode());mxEvent.consume(c)}),A=mxUtils.bind(this,function(c){a.setModified(!0);a.isAutosave()?(null!=B&&null!=B.parentNode&&B.parentNode.removeChild(B),B=t.cloneNode(!1),B.setAttribute("src",Editor.spinImage),B.setAttribute("title",mxResources.get("saving")),B.style.cursor="default",B.style.marginRight=
+"2px",B.style.marginTop="-2px",h.insertBefore(B,h.firstChild),k.style.paddingRight=18*h.childNodes.length+"px",this.saveLibrary(a.getTitle(),b,a,a.getMode(),!0,!0,function(){null!=B&&null!=B.parentNode&&(B.parentNode.removeChild(B),k.style.paddingRight=18*h.childNodes.length+"px")})):null==l&&(l=t.cloneNode(!1),l.setAttribute("src",IMAGE_PATH+"/download.png"),l.setAttribute("title",mxResources.get("save")),h.insertBefore(l,h.firstChild),mxEvent.addListener(l,"click",mxUtils.bind(this,function(c){this.saveLibrary(a.getTitle(),
+b,a,a.getMode(),a.constructor==LocalLibrary,!0,function(){null==l||a.isModified()||(k.style.paddingRight=18*h.childNodes.length+"px",l.parentNode.removeChild(l),l=null)});mxEvent.consume(c)})),k.style.paddingRight=18*h.childNodes.length+"px")}),z=mxUtils.bind(this,function(a,c,d,e){a=n.cloneCells(mxUtils.sortCells(n.model.getTopmostCells(a)));for(var k=0;k<a.length;k++){var p=n.getCellGeometry(a[k]);null!=p&&p.translate(-c.x,-c.y)}g.appendChild(this.sidebar.createVertexTemplateFromCells(a,c.width,
+c.height,e||"",!0,!1,!1));a={xml:this.editor.graph.compress(mxUtils.getXml(this.editor.graph.encodeCells(a))),w:c.width,h:c.height};null!=e&&(a.title=e);b.push(a);A(d);null!=f&&null!=f.parentNode&&0<b.length&&(f.parentNode.removeChild(f),f=null)}),C=mxUtils.bind(this,function(a){if(n.isSelectionEmpty())n.getRubberband().isActive()?(n.getRubberband().execute(a),n.getRubberband().reset()):this.showError(mxResources.get("error"),mxResources.get("nothingIsSelected"),mxResources.get("ok"));else{var c=
+n.getSelectionCells(),b=n.view.getBounds(c),d=n.view.scale;b.x/=d;b.y/=d;b.width/=d;b.height/=d;b.x-=n.view.translate.x;b.y-=n.view.translate.y;z(c,b)}mxEvent.consume(a)});g.style.border="3px solid transparent";mxEvent.addGestureListeners(g,function(){},mxUtils.bind(this,function(a){n.isMouseDown&&null!=n.panningManager&&null!=n.graphHandler.shape&&(n.graphHandler.shape.node.style.visibility="hidden",null!=f?f.style.border="3px dotted rgb(254, 137, 12)":g.style.border="3px dotted rgb(254, 137, 12)",
+g.style.cursor="copy",n.panningManager.stop(),n.autoScroll=!1,null!=n.graphHandler.guide&&n.graphHandler.guide.setVisible(!1),null!=n.graphHandler.hint&&(n.graphHandler.hint.style.visibility="hidden"),mxEvent.consume(a))}),mxUtils.bind(this,function(a){n.isMouseDown&&null!=n.panningManager&&null!=n.graphHandler&&(g.style.border="3px solid transparent",null!=f&&(f.style.border="3px dotted lightGray"),g.style.cursor="default",this.sidebar.showTooltips=!0,n.panningManager.stop(),n.graphHandler.reset(),
+n.isMouseDown=!1,n.autoScroll=!0,C(a),mxEvent.consume(a))}));mxEvent.addListener(g,"mouseleave",mxUtils.bind(this,function(a){n.isMouseDown&&null!=n.graphHandler.shape&&(n.graphHandler.shape.node.style.visibility="visible",g.style.border="3px solid transparent",g.style.cursor="",n.autoScroll=!0,null!=n.graphHandler.guide&&n.graphHandler.guide.setVisible(!0),null!=n.graphHandler.hint&&(n.graphHandler.hint.style.visibility="visible"),null!=f&&(f.style.border="3px dotted lightGray"))}));Graph.fileSupport&&
+(mxEvent.addListener(g,"dragover",mxUtils.bind(this,function(a){null!=f?f.style.border="3px dotted rgb(254, 137, 12)":g.style.border="3px dotted rgb(254, 137, 12)";a.dataTransfer.dropEffect="copy";g.style.cursor="copy";this.sidebar.hideTooltip();a.stopPropagation();a.preventDefault()})),mxEvent.addListener(g,"drop",mxUtils.bind(this,function(a){g.style.border="3px solid transparent";g.style.cursor="";null!=f&&(f.style.border="3px dotted lightGray");0<a.dataTransfer.files.length&&this.importFiles(a.dataTransfer.files,
+0,0,this.maxImageSize,mxUtils.bind(this,function(c,d,k,p,m,h,t,r,l){if(null!=c&&"image/"==d.substring(0,6))c="shape=image;verticalLabelPosition=bottom;verticalAlign=top;aspect=fixed;image="+this.convertDataUri(c),c=[new mxCell("",new mxGeometry(0,0,m,h),c)],c[0].vertex=!0,z(c,new mxRectangle(0,0,m,h),a,mxEvent.isAltDown(a)?null:t.substring(0,t.lastIndexOf(".")).replace(/_/g," ")),null!=f&&null!=f.parentNode&&0<b.length&&(f.parentNode.removeChild(f),f=null);else{var n=!1,u=mxUtils.bind(this,function(c,
+d){if(null!=c&&"text/xml"==d){var k=mxUtils.parseXml(c);if("mxlibrary"==k.documentElement.nodeName)try{var p=JSON.parse(mxUtils.getTextContent(k.documentElement));e(p,g);b=b.concat(p);A(a);this.spinner.stop();n=!0}catch(W){}else if("mxfile"==k.documentElement.nodeName)try{for(var m=k.documentElement.getElementsByTagName("diagram"),k=0;k<m.length;k++){var p=mxUtils.getTextContent(m[k]),h=this.stringToCells(this.editor.graph.decompress(p)),t=this.editor.graph.getBoundingBoxFromGeometry(h);z(h,new mxRectangle(0,
+0,t.width,t.height),a)}n=!0}catch(W){null!=window.console&&console.log("error in drop handler:",W)}}n||(this.spinner.stop(),this.handleError({message:mxResources.get("errorLoadingFile")}));null!=f&&null!=f.parentNode&&0<b.length&&(f.parentNode.removeChild(f),f=null)});!this.isOffline()&&(new XMLHttpRequest).upload&&this.isRemoteFileFormat(c,t)&&null!=l?this.parseFile(l,mxUtils.bind(this,function(a){4==a.readyState&&(this.spinner.stop(),200<=a.status&&299>=a.status?u(a.responseText,"text/xml"):this.handleError({message:mxResources.get(413==
+a.status?"drawingTooLarge":"invalidOrMissingFile")},mxResources.get("errorLoadingFile")))})):u(c,d)}}));a.stopPropagation();a.preventDefault()})),mxEvent.addListener(g,"dragleave",function(a){null!=f?f.style.border="3px dotted lightGray":(g.style.border="3px solid transparent",g.style.cursor="");a.stopPropagation();a.preventDefault()}));t=t.cloneNode(!1);t.setAttribute("src",IMAGE_PATH+"/edit.gif");t.setAttribute("title",mxResources.get("edit"));h.insertBefore(t,h.firstChild);mxEvent.addListener(t,
+"click",q);mxEvent.addListener(g,"dblclick",function(a){mxEvent.getSource(a)==g&&q(a)});t=t.cloneNode(!1);t.setAttribute("src",Editor.plusImage);t.setAttribute("title",mxResources.get("add"));h.insertBefore(t,h.firstChild);this.isOffline()||".scratchpad"!=a.title||(d=document.createElement("span"),d.setAttribute("title",mxResources.get("help")),d.style.cssText="color:gray;text-decoration:none;",d.className="geButton",mxUtils.write(d,"?"),mxEvent.addGestureListeners(d,mxUtils.bind(this,function(a){window.open("https://desk.draw.io/support/solutions/articles/16000042367");
+mxEvent.consume(a)})),h.insertBefore(d,h.firstChild));var B=null;mxEvent.addListener(t,"click",C)}k.appendChild(h);k.style.paddingRight=18*h.childNodes.length+"px"};"1"==urlParams.offline?EditorUi.prototype.footerHeight=4:("atlas"==uiTheme?("undefined"!==typeof Toolbar&&(Toolbar.prototype.unselectedBackground=mxClient.IS_QUIRKS?"none":"linear-gradient(rgb(255, 255, 255) 0px, rgb(242, 242, 242) 100%)",Toolbar.prototype.selectedBackground="rgb(242, 242, 242)"),Editor.prototype.initialTopSpacing=3,EditorUi.prototype.menubarHeight=
+41,EditorUi.prototype.toolbarHeight=38,EditorUi.prototype.hsplitPosition=188,Sidebar.prototype.thumbWidth=46,Sidebar.prototype.thumbHeight=46,Sidebar.prototype.thumbPadding=5<=document.documentMode?0:1,Sidebar.prototype.thumbBorder=2):"1"==urlParams.savesidebar&&(Sidebar.prototype.thumbWidth=64,Sidebar.prototype.thumbHeight=64),EditorUi.prototype.footerHeight=760<=screen.width&&240<=screen.height?46:0,EditorUi.prototype.createFooter=function(){var a=document.getElementById("geFooter");if(null!=a){a.style.visibility=
+"visible";var b=document.createElement("img");b.setAttribute("border","0");b.setAttribute("src",Dialog.prototype.closeImage);b.setAttribute("title",mxResources.get("hide"));a.appendChild(b);mxClient.IS_QUIRKS&&(b.style.position="relative",b.style.styleFloat="right",b.style.top="-30px",b.style.left="164px",b.style.cursor="pointer");mxEvent.addListener(b,"click",mxUtils.bind(this,function(){this.hideFooter()}))}return a});EditorUi.prototype.hideFooter=function(){var a=document.getElementById("geFooter");
+null!=a&&(this.footerHeight=0,a.style.display="none",this.refresh())};EditorUi.prototype.showImageDialog=function(a,b,d,e,m){a=new ImageDialog(this,a,b,d,e,m);this.showDialog(a.container,Graph.fileSupport?440:360,Graph.fileSupport?200:90,!0,!0);a.init()};EditorUi.prototype.showBackgroundImageDialog=function(a){a=null!=a?a:mxUtils.bind(this,function(a){a=new ChangePageSetup(this,null,a);a.ignoreColor=!0;this.editor.graph.model.execute(a)});var c=new BackgroundImageDialog(this,mxUtils.bind(this,function(c){a(c)}));
+this.showDialog(c.container,360,200,!0,!0);c.init()};EditorUi.prototype.showLibraryDialog=function(a,b,d,e,m){a=new LibraryDialog(this,a,b,d,e,m);this.showDialog(a.container,620,440,!0,!1,mxUtils.bind(this,function(a){a&&null==this.getCurrentFile()&&"1"!=urlParams.embed&&this.showSplash()}));a.init()};EditorUi.prototype.createSidebarFooterContainer=function(){var a=this.createDiv("geSidebarContainer");a.style.position="absolute";a.style.overflow="hidden";a.style.borderWidth="3px";var b=document.createElement("a");
+b.setAttribute("href","javascript:void(0);");b.className="geTitle";b.style.height="100%";b.style.paddingTop="9px";mxUtils.write(b,mxResources.get("moreShapes")+"...");mxEvent.addListener(b,"click",mxUtils.bind(this,function(a){this.actions.get("shapes").funct();mxEvent.consume(a)}));a.appendChild(b);return a};EditorUi.prototype.handleError=function(a,b,d){var c=null!=this.spinner&&null!=this.spinner.pause?this.spinner.pause():function(){},f=null!=a&&null!=a.error?a.error:a;if(null!=f||null!=b){a=
+mxUtils.htmlEntities(mxResources.get("unknownError"));var e=mxResources.get("ok"),g=null;b=null!=b?b:mxResources.get("error");if(null!=f)if(null!=f.retry&&(e=mxResources.get("cancel"),g=function(){c();f.retry()}),"undefined"!=typeof gapi&&"undefined"!=typeof gapi.drive&&"undefined"!=typeof gapi.drive.realtime&&f.type==gapi.drive.realtime.ErrorType.FORBIDDEN)a=mxUtils.htmlEntities(mxResources.get("forbidden"));else if(404==f.code||404==f.status||"undefined"!=typeof gapi&&"undefined"!=typeof gapi.drive&&
+"undefined"!=typeof gapi.drive.realtime&&f.type==gapi.drive.realtime.ErrorType.NOT_FOUND){a=mxUtils.htmlEntities(mxResources.get("fileNotFoundOrDenied"));var k=window.location.hash;null!=k&&"#G"==k.substring(0,2)&&(k=k.substring(2),a+=' <a href="https://drive.google.com/open?id='+k+'" target="_blank">'+mxUtils.htmlEntities(mxResources.get("tryOpeningViaThisPage"))+"</a>")}else f.code==App.ERROR_TIMEOUT?a=mxUtils.htmlEntities(mxResources.get("timeout")):f.code==App.ERROR_BUSY?a=mxUtils.htmlEntities(mxResources.get("busy")):
+null!=f.message?a=mxUtils.htmlEntities(f.message):null!=f.response&&null!=f.response.error&&(a=mxUtils.htmlEntities(f.response.error));this.showError(b,a,e,d,g)}else null!=d&&d()};EditorUi.prototype.showError=function(a,b,d,e,m,h,r){a=new ErrorDialog(this,a,b,d,e,m,h,r);this.showDialog(a.container,340,150,!0,!1);a.init()};EditorUi.prototype.alert=function(a,b){var c=new ErrorDialog(this,null,a,mxResources.get("ok"),b);this.showDialog(c.container,340,100,!0,!1);c.init()};EditorUi.prototype.confirm=
+function(a,b,d,e,m){var c=null!=this.spinner&&null!=this.spinner.pause?this.spinner.pause():function(){};this.showDialog((new ConfirmDialog(this,a,function(){c();null!=b&&b()},function(){c();null!=d&&d()},e,m)).container,340,90,!0,!1)};EditorUi.prototype.setCurrentFile=function(a){this.currentFile=a};EditorUi.prototype.getCurrentFile=function(){return this.currentFile};EditorUi.prototype.isExportToCanvas=function(){return mxClient.IS_CHROMEAPP||!this.editor.graph.mathEnabled&&this.useCanvasForExport};
+EditorUi.prototype.createSvgDataUri=function(a){return"data:image/svg+xml;base64,"+btoa(unescape(encodeURIComponent(a)))};EditorUi.prototype.createImageDataUri=function(a,b,d){var c=a.toDataURL("image/"+d);if(6>=c.length||c==a.cloneNode(!1).toDataURL("image/"+d))throw{message:"Invalid image"};null!=b&&(c=this.writeGraphModelToPng(c,"zTXt","mxGraphModel",atob(this.editor.graph.compress(b))));return c};EditorUi.prototype.saveCanvas=function(a,b,d){var c="jpeg"==d?"jpg":d,f=this.getBaseFilename()+"."+
+c;a=this.createImageDataUri(a,b,d);this.saveData(f,c,a.substring(a.lastIndexOf(",")+1),"image/"+d,!0)};EditorUi.prototype.isLocalFileSave=function(){return"remote"!=urlParams.save&&(mxClient.IS_IE||"undefined"!==typeof window.Blob&&"undefined"!==typeof window.URL)&&9!=document.documentMode&&8!=document.documentMode&&7!=document.documentMode&&!mxClient.IS_QUIRKS||this.isOfflineApp()||mxClient.IS_IOS};EditorUi.prototype.doSaveLocalFile=function(a,b,d,e,m){if(window.Blob&&navigator.msSaveOrOpenBlob)a=
+e?this.base64ToBlob(a,d):new Blob([a],{type:d}),navigator.msSaveOrOpenBlob(a,b);else if(mxClient.IS_IE)d=window.open("about:blank","_blank"),null==d?mxUtils.popup(a,!0):(d.document.write(a),d.document.close(),d.document.execCommand("SaveAs",!0,b),d.close());else if(mxClient.IS_IOS)b=new TextareaDialog(this,b+":",a,null,null,mxResources.get("close")),b.textarea.style.width="600px",b.textarea.style.height="380px",this.showDialog(b.container,620,460,!0,!0),b.init(),document.execCommand("selectall",!1,
+null);else{var c=document.createElement("a"),f=!mxClient.IS_SF&&"undefined"!==typeof c.download;if(f||this.isOffline()){c.href=URL.createObjectURL(e?this.base64ToBlob(a,d):new Blob([a],{type:d}));f?c.download=b:c.setAttribute("target","_blank");document.body.appendChild(c);try{window.setTimeout(function(){URL.revokeObjectURL(c.href)},0),c.click(),c.parentNode.removeChild(c)}catch(k){}}else this.createEchoRequest(a,b,d,e,m).simulate(document,"_blank")}};EditorUi.prototype.createEchoRequest=function(a,
+b,d,e,m,h){a="xml="+encodeURIComponent(a);return new mxXmlRequest(SAVE_URL,a+(null!=d?"&mime="+d:"")+(null!=m?"&format="+m:"")+(null!=h?"&base64="+h:"")+(null!=b?"&filename="+encodeURIComponent(b):"")+(e?"&binary=1":""))};EditorUi.prototype.base64ToBlob=function(a,b){b=b||"";for(var c=atob(a),d=c.length,f=Math.ceil(d/1024),e=Array(f),h=0;h<f;++h){for(var k=1024*h,l=Math.min(k+1024,d),t=Array(l-k),n=0;k<l;++n,++k)t[n]=c[k].charCodeAt(0);e[h]=new Uint8Array(t)}return new Blob(e,{type:b})};EditorUi.prototype.saveLocalFile=
+function(a,b,d,e,m,h){h=null!=h?h:!1;var c="vsdx"!=m&&(!mxClient.IS_IOS||!navigator.standalone);m=this.getServiceCount(h);b=new CreateDialog(this,b,mxUtils.bind(this,function(c,b){try{if("_blank"==b)if(null==d||"image/"!=d.substring(0,6)||"image/svg"==d.substring(0,9)&&!mxClient.IS_SVG){var f=window.open("about:blank");null==f?mxUtils.popup(a,!0):(f.document.write(mxUtils.htmlEntities(a,!1)),f.document.close())}else this.openInNewWindow(a,d,e);else b==App.MODE_DEVICE?this.doSaveLocalFile(a,c,d,e):
+null!=c&&0<c.length&&this.pickFolder(b,mxUtils.bind(this,function(f){try{this.exportFile(a,c,d,e,b,f)}catch(w){this.handleError(w)}}))}catch(x){this.handleError(x)}}),mxUtils.bind(this,function(){this.hideDialog()}),mxResources.get("saveAs"),mxResources.get("download"),!1,h,c,null,null,4<m?3:4,a,d,e);this.showDialog(b.container,380,4<m?390:270,!0,!0);b.init()};EditorUi.prototype.openInNewWindow=function(a,b,d){if(mxClient.IS_GC||mxClient.IS_EDGE||11==document.documentMode||10==document.documentMode){var c=
+window.open("about:blank");null==c?mxUtils.popup(a,!0):(c.document.write('<html><img src="data:'+b+(d?";base64,"+a:";charset=utf8,"+encodeURIComponent(a))+'"/></html>'),c.document.close())}else c=window.open("data:"+b+(d?";base64,"+a:";charset=utf8,"+encodeURIComponent(a))),null==c&&mxUtils.popup(a,!0)};var b=EditorUi.prototype.addChromelessToolbarItems;EditorUi.prototype.addChromelessToolbarItems=function(a){if(this.isExportToCanvas()){this.exportDialog=null;var c=a(mxUtils.bind(this,function(a){var b=
+mxUtils.bind(this,function(){mxEvent.removeListener(this.editor.graph.container,"click",b);null!=this.exportDialog&&(this.exportDialog.parentNode.removeChild(this.exportDialog),this.exportDialog=null)});if(null!=this.exportDialog)b.apply(this);else{this.exportDialog=document.createElement("div");var d=c.getBoundingClientRect();mxUtils.setPrefixedStyle(this.exportDialog.style,"borderRadius","5px");this.exportDialog.style.position="fixed";this.exportDialog.style.textAlign="center";this.exportDialog.style.fontFamily=
+"Helvetica,Arial";this.exportDialog.style.backgroundColor="#000000";this.exportDialog.style.width="50px";this.exportDialog.style.height="50px";this.exportDialog.style.padding="4px 2px 4px 2px";this.exportDialog.style.color="#ffffff";mxUtils.setOpacity(this.exportDialog,70);this.exportDialog.style.left=d.left+"px";this.exportDialog.style.bottom=parseInt(this.chromelessToolbar.style.bottom)+this.chromelessToolbar.offsetHeight+4+"px";d=mxUtils.getCurrentStyle(this.editor.graph.container);this.exportDialog.style.zIndex=
+d.zIndex;var f=new Spinner({lines:8,length:6,width:5,radius:6,rotate:0,color:"#fff",speed:1.5,trail:60,shadow:!1,hwaccel:!1,top:"28px",zIndex:2E9});f.spin(this.exportDialog);this.exportToCanvas(mxUtils.bind(this,function(a){f.stop();this.exportDialog.style.width="auto";this.exportDialog.style.height="auto";this.exportDialog.style.padding="10px";var c=this.createImageDataUri(a,null,"png");a=document.createElement("img");a.style.maxWidth="140px";a.style.maxHeight="140px";a.style.cursor="pointer";a.setAttribute("title",
+mxResources.get("openInNewWindow"));a.setAttribute("border","0");a.setAttribute("src",c);this.exportDialog.appendChild(a);mxEvent.addListener(a,"click",mxUtils.bind(this,function(){this.openInNewWindow(c.substring(c.indexOf(",")+1),"image/png",!0);b.apply(this,arguments)}))}),null,this.thumbImageCache,null,mxUtils.bind(this,function(a){this.spinner.stop();this.handleError(a)}));mxEvent.addListener(this.editor.graph.container,"click",b);document.body.appendChild(this.exportDialog)}mxEvent.consume(a)}),
+Editor.cameraLargeImage,mxResources.get("export"))}b.apply(this,arguments)};EditorUi.prototype.saveData=function(a,b,d,e,m){this.isLocalFileSave()?this.saveLocalFile(d,a,e,m,b):this.saveRequest(a,b,mxUtils.bind(this,function(a,c){return this.createEchoRequest(d,a,e,m,b,c)}),d,m,e)};EditorUi.prototype.saveRequest=function(a,b,d,e,m,h){var c=!mxClient.IS_IOS||!navigator.standalone,f=this.getServiceCount(!1);a=new CreateDialog(this,a,mxUtils.bind(this,function(a,c){if("_blank"==c||null!=a&&0<a.length){var f=
+d("_blank"==c?null:a,c==App.MODE_DEVICE||null==c||"_blank"==c?"0":"1");null!=f&&(c==App.MODE_DEVICE||"_blank"==c?f.simulate(document,"_blank"):this.pickFolder(c,mxUtils.bind(this,function(d){h=null!=h?h:"pdf"==b?"application/pdf":"image/"+b;if(null!=e)try{this.exportFile(e,a,h,!0,c,d)}catch(D){this.handleError(D)}else this.spinner.spin(document.body,mxResources.get("saving"))&&f.send(mxUtils.bind(this,function(){this.spinner.stop();if(200<=f.getStatus()&&299>=f.getStatus())try{this.exportFile(f.getText(),
+a,h,!0,c,d)}catch(D){this.handleError(D)}else this.handleError({message:mxResources.get("errorSavingFile")})}),function(a){this.spinner.stop();this.handleError(a)})})))}}),mxUtils.bind(this,function(){this.hideDialog()}),mxResources.get("saveAs"),mxResources.get("download"),!1,!1,c,null,null,4<f?3:4,e,h,m);this.showDialog(a.container,380,4<f?390:270,!0,!0);a.init()};EditorUi.prototype.exportFile=function(a,b,d,e,m,h){};EditorUi.prototype.pickFolder=function(a,b,d){b(null)};EditorUi.prototype.exportSvg=
+function(a,b,d,e,m,h,l,k,n){if(this.spinner.spin(document.body,mxResources.get("export"))){var c=this.editor.graph.isSelectionEmpty();d=null!=d?d:c;c=b?null:this.editor.graph.background;c==mxConstants.NONE&&(c=null);null==c&&0==b&&(c="#ffffff");var f=this.editor.graph.getSvg(c,a,l,k,null,d);e&&this.editor.graph.addSvgShadow(f);var g=this.getBaseFilename()+".svg",p=mxUtils.bind(this,function(a){this.spinner.stop();m&&a.setAttribute("content",this.getFileData(!0,null,null,null,d,n));var c='<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">\n'+
+mxUtils.getXml(a);this.isLocalFileSave()||c.length<=MAX_REQUEST_SIZE?this.saveData(g,"svg",c,"image/svg+xml"):this.handleError({message:mxResources.get("drawingTooLarge")},mxResources.get("error"),mxUtils.bind(this,function(){mxUtils.popup(c)}))});this.convertMath(this.editor.graph,f,!1,mxUtils.bind(this,function(){h?(null==this.thumbImageCache&&(this.thumbImageCache={}),this.convertImages(f,p,this.thumbImageCache)):p(f)}))}};EditorUi.prototype.addCheckbox=function(a,b,d,e,m,h){h=null!=h?h:!0;var c=
+document.createElement("input");c.style.marginRight="8px";c.style.marginTop="16px";c.setAttribute("type","checkbox");d&&(c.setAttribute("checked","checked"),c.defaultChecked=!0);e&&c.setAttribute("disabled","disabled");h&&(a.appendChild(c),mxUtils.write(a,b),m||mxUtils.br(a));return c};EditorUi.prototype.addEditButton=function(a,b){var c=this.addCheckbox(a,mxResources.get("edit")+":",!0,null,!0);c.style.marginLeft="24px";var d=this.getCurrentFile(),f="";null!=d&&d.getMode()!=App.MODE_DEVICE&&d.getMode()!=
+App.MODE_BROWSER&&(f=window.location.href);var e=document.createElement("select");e.style.width="120px";e.style.marginLeft="8px";e.style.marginRight="10px";e.className="geBtn";d=document.createElement("option");d.setAttribute("value","blank");mxUtils.write(d,mxResources.get("makeCopy"));e.appendChild(d);d=document.createElement("option");d.setAttribute("value","custom");mxUtils.write(d,mxResources.get("custom")+"...");e.appendChild(d);a.appendChild(e);mxEvent.addListener(e,"change",mxUtils.bind(this,
+function(){if("custom"==e.value){var a=new FilenameDialog(this,f,mxResources.get("ok"),function(a){null!=a?f=a:e.value="blank"},mxResources.get("url"),null,null,null,null,function(){e.value="blank"});this.showDialog(a.container,300,80,!0,!1);a.init()}}));mxEvent.addListener(c,"change",mxUtils.bind(this,function(){c.checked&&(null==b||b.checked)?e.removeAttribute("disabled"):e.setAttribute("disabled","disabled")}));mxUtils.br(a);return{getLink:function(){return c.checked?"blank"===e.value?"_blank":
+f:null},getEditInput:function(){return c},getEditSelect:function(){return e}}};EditorUi.prototype.addLinkSection=function(a,b){function c(){h.innerHTML='<div style="width:100%;height:100%;box-sizing:border-box;'+(null!=e&&e!=mxConstants.NONE?"border:1px solid black;background-color:"+e:"background-position:center center;background-repeat:no-repeat;background-image:url('"+Dialog.prototype.closeImage+"')")+';"></div>'}mxUtils.write(a,mxResources.get("links")+":");var d=document.createElement("select");
+d.style.width="100px";d.style.marginLeft="8px";d.style.marginRight="10px";d.className="geBtn";var f=document.createElement("option");f.setAttribute("value","auto");mxUtils.write(f,mxResources.get("automatic"));d.appendChild(f);f=document.createElement("option");f.setAttribute("value","blank");mxUtils.write(f,mxResources.get("openInNewWindow"));d.appendChild(f);f=document.createElement("option");f.setAttribute("value","self");mxUtils.write(f,mxResources.get("openInThisWindow"));d.appendChild(f);b&&
+(f=document.createElement("option"),f.setAttribute("value","frame"),mxUtils.write(f,mxResources.get("openInThisWindow")+" ("+mxResources.get("iframe")+")"),d.appendChild(f));a.appendChild(d);mxUtils.write(a,mxResources.get("borderColor")+":");var e="#0000ff",h=null,h=mxUtils.button("",mxUtils.bind(this,function(a){this.pickColor(e||"none",function(a){e=a;c()});mxEvent.consume(a)}));c();h.style.padding=mxClient.IS_FF?"4px 2px 4px 2px":"4px";h.style.marginLeft="4px";h.style.height="22px";h.style.width=
+"22px";h.style.position="relative";h.style.top=mxClient.IS_IE||mxClient.IS_IE11||mxClient.IS_EDGE?"6px":"1px";h.className="geColorBtn";a.appendChild(h);mxUtils.br(a);return{getColor:function(){return e},getTarget:function(){return d.value},focus:function(){d.focus()}}};EditorUi.prototype.createLink=function(a,b,d,e,m,h,l,k){var c=this.getCurrentFile(),f=[];e&&(f.push("lightbox=1"),"auto"!=a&&f.push("target="+a),null!=b&&b!=mxConstants.NONE&&f.push("highlight="+("#"==b.charAt(0)?b.substring(1):b)),
+null!=m&&0<m.length&&f.push("edit="+encodeURIComponent(m)),h&&f.push("layers=1"),this.editor.graph.foldingEnabled&&f.push("nav=1"));if(d&&null!=this.pages&&null!=this.currentPage)for(a=0;a<this.pages.length;a++)if(this.pages[a]==this.currentPage){0<a&&f.push("page="+a);break}a=!0;null!=l?d="#U"+encodeURIComponent(l):(c=this.getCurrentFile(),k||null==c||c.constructor!=window.DriveFile?d="#R"+encodeURIComponent(d?this.getFileData(!0,null,null,null,null,null,null,!0):this.editor.graph.compress(mxUtils.getXml(this.editor.getGraphXml()))):
+(d="#"+c.getHash(),a=!1));a&&null!=c&&null!=c.getTitle()&&c.getTitle()!=this.defaultFilename&&f.push("title="+encodeURIComponent(c.getTitle()));return(mxClient.IS_CHROMEAPP||EditorUi.isElectronApp?"https://www.draw.io/":"https://"+location.host+"/")+(0<f.length?"?"+f.join("&"):"")+d};EditorUi.prototype.createHtml=function(a,b,d,e,m,h,l,k,n,t,q){this.getBasenames();var c={};""!=m&&m!=mxConstants.NONE&&(c.highlight=m);"auto"!==e&&(c.target=e);n||(c.lightbox=!1);c.nav=this.editor.graph.foldingEnabled;
+d=parseInt(d);isNaN(d)||100==d||(c.zoom=d/100);d=[];l&&(d.push("pages"),c.resize=!0,null!=this.pages&&null!=this.currentPage&&(c.page=mxUtils.indexOf(this.pages,this.currentPage)));b&&(d.push("zoom"),c.resize=!0);k&&d.push("layers");0<d.length&&(n&&d.push("lightbox"),c.toolbar=d.join(" "));null!=t&&0<t.length&&(c.edit=t);null!=a?c.url=a:c.xml=this.getFileData(!0,null,null,null,null,!l);b='<div class="mxgraph" style="'+(h?"max-width:100%;":"")+(""!=d?"border:1px solid transparent;":"")+'" data-mxgraph="'+
+mxUtils.htmlEntities(JSON.stringify(c))+'"></div>';a=null!=a?"&fetch="+encodeURIComponent(a):"";q(b,'<script type="text/javascript" src="'+(0<a.length?("1"==urlParams.dev?"https://test.draw.io/embed2.js?dev=1":"https://www.draw.io/embed2.js?")+a:"1"==urlParams.dev?"https://test.draw.io/js/viewer.min.js":"https://www.draw.io/js/viewer.min.js")+'">\x3c/script>')};EditorUi.prototype.showHtmlDialog=function(a,b,d,e){var c=document.createElement("div");c.style.whiteSpace="nowrap";var f=document.createElement("h3");
+mxUtils.write(f,mxResources.get("html"));f.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:12px";c.appendChild(f);var g=document.createElement("div");g.style.cssText="border-bottom:1px solid lightGray;padding-bottom:8px;margin-bottom:12px;";var k=document.createElement("input");k.style.cssText="margin-right:8px;margin-top:8px;margin-bottom:8px;";k.setAttribute("value","url");k.setAttribute("type","radio");k.setAttribute("name","type-embedhtmldialog");f=k.cloneNode(!0);f.setAttribute("value",
+"copy");g.appendChild(f);var p=document.createElement("span");mxUtils.write(p,mxResources.get("includeCopyOfMyDiagram"));g.appendChild(p);mxUtils.br(g);g.appendChild(k);p=document.createElement("span");mxUtils.write(p,mxResources.get("publicDiagramUrl"));g.appendChild(p);var h=this.getCurrentFile();null==d&&null!=h&&h.constructor==window.DriveFile&&(p=document.createElement("a"),p.style.paddingLeft="12px",p.style.color="gray",p.setAttribute("href","javascript:void(0);"),mxUtils.write(p,mxResources.get("share")),
+g.appendChild(p),mxEvent.addListener(p,"click",mxUtils.bind(this,function(){this.hideDialog();this.drive.showPermissions(h.getId())})));f.setAttribute("checked","checked");null==d&&k.setAttribute("disabled","disabled");c.appendChild(g);var l=this.addLinkSection(c),n=this.addCheckbox(c,mxResources.get("zoom"),!0,null,!0);mxUtils.write(c,":");var q=document.createElement("input");q.setAttribute("type","text");q.style.marginRight="16px";q.style.width="60px";q.style.marginLeft="4px";q.style.marginRight=
+"12px";q.value="100%";c.appendChild(q);var A=this.addCheckbox(c,mxResources.get("fit"),!0),g=null!=this.pages&&1<this.pages.length,z=z=this.addCheckbox(c,mxResources.get("allPages"),g,!g),C=this.addCheckbox(c,mxResources.get("layers"),!0),B=this.addCheckbox(c,mxResources.get("lightbox"),!0),E=this.addEditButton(c,B),y=E.getEditInput();y.style.marginBottom="16px";mxEvent.addListener(B,"change",function(){B.checked?y.removeAttribute("disabled"):y.setAttribute("disabled","disabled");y.checked&&B.checked?
+E.getEditSelect().removeAttribute("disabled"):E.getEditSelect().setAttribute("disabled","disabled")});a=new CustomDialog(this,c,mxUtils.bind(this,function(){e(k.checked?d:null,n.checked,q.value,l.getTarget(),l.getColor(),A.checked,z.checked,C.checked,B.checked,E.getLink())}),null,a,b);this.showDialog(a.container,340,360,!0,!0);f.focus()};EditorUi.prototype.showPublishLinkDialog=function(a,b,d,e,h,l){var c=document.createElement("div");c.style.whiteSpace="nowrap";var f=document.createElement("h3");
+mxUtils.write(f,a||mxResources.get("link"));f.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:12px";c.appendChild(f);var g=this.getCurrentFile(),f="https://desk.draw.io/support/solutions/articles/16000051941";a=0;if(null!=g&&g.constructor==window.DriveFile&&!b){a=80;var f="https://desk.draw.io/support/solutions/articles/16000039384",p=document.createElement("div");p.style.cssText="border-bottom:1px solid lightGray;padding-bottom:14px;padding-top:6px;margin-bottom:14px;text-align:center;";
+var m=document.createElement("div");m.style.whiteSpace="normal";mxUtils.write(m,mxResources.get("linkAccountRequired"));p.appendChild(m);m=mxUtils.button(mxResources.get("share"),mxUtils.bind(this,function(){this.drive.showPermissions(g.getId())}));m.style.marginTop="12px";m.className="geBtn";p.appendChild(m);c.appendChild(p);m=document.createElement("a");m.style.paddingLeft="12px";m.style.color="gray";m.style.fontSize="11px";m.setAttribute("href","javascript:void(0);");mxUtils.write(m,mxResources.get("check"));
+p.appendChild(m);mxEvent.addListener(m,"click",mxUtils.bind(this,function(){this.spinner.spin(document.body,mxResources.get("loading"))&&this.getPublicUrl(this.getCurrentFile(),mxUtils.bind(this,function(a){this.spinner.stop();a=new ErrorDialog(this,null,mxResources.get(null!=a?"diagramIsPublic":"diagramIsNotPublic"),mxResources.get("ok"));this.showDialog(a.container,300,80,!0,!1);a.init()}))}))}var n=null,u=null;if(null!=d||null!=e)a+=30,mxUtils.write(c,mxResources.get("width")+":"),n=document.createElement("input"),
+n.setAttribute("type","text"),n.style.marginRight="16px",n.style.width="50px",n.style.marginLeft="6px",n.style.marginRight="16px",n.style.marginBottom="10px",n.value="100%",c.appendChild(n),mxUtils.write(c,mxResources.get("height")+":"),u=document.createElement("input"),u.setAttribute("type","text"),u.style.width="50px",u.style.marginLeft="6px",u.style.marginBottom="10px",u.value=e+"px",c.appendChild(u),mxUtils.br(c);var q=this.addLinkSection(c,l);d=null!=this.pages&&1<this.pages.length;var z=null;
+if(null==g||g.constructor!=window.DriveFile||b)z=this.addCheckbox(c,mxResources.get("allPages"),d,!d);var C=this.addCheckbox(c,mxResources.get("lightbox"),!0),B=this.addEditButton(c,C),E=B.getEditInput(),y=this.addCheckbox(c,mxResources.get("layers"),!0);y.style.marginLeft=E.style.marginLeft;y.style.marginBottom="16px";y.style.marginTop="8px";mxEvent.addListener(C,"change",function(){C.checked?(y.removeAttribute("disabled"),E.removeAttribute("disabled")):(y.setAttribute("disabled","disabled"),E.setAttribute("disabled",
+"disabled"));E.checked&&C.checked?B.getEditSelect().removeAttribute("disabled"):B.getEditSelect().setAttribute("disabled","disabled")});b=new CustomDialog(this,c,mxUtils.bind(this,function(){h(q.getTarget(),q.getColor(),null==z?!0:z.checked,C.checked,B.getLink(),y.checked,null!=n?n.value:null,null!=u?u.value:null)}),null,mxResources.get("create"),f);this.showDialog(b.container,340,246+a,!0,!0);null!=n?(n.focus(),mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode||mxClient.IS_QUIRKS?n.select():
+document.execCommand("selectAll",!1,null)):q.focus()};EditorUi.prototype.showRemoteExportDialog=function(a,b,d,e){var c=document.createElement("div");c.style.whiteSpace="nowrap";var f=document.createElement("h3");mxUtils.write(f,mxResources.get("image"));f.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:4px";c.appendChild(f);var g=this.addCheckbox(c,mxResources.get("selectionOnly"),!1,this.editor.graph.isSelectionEmpty()),k=e?null:this.addCheckbox(c,mxResources.get("includeCopyOfMyDiagram"),
+!0);null!=k&&(k.style.marginBottom="16px");a=new CustomDialog(this,c,mxUtils.bind(this,function(){d(!g.checked,null!=k?k.checked:!1)}),null,a,b);this.showDialog(a.container,300,e?100:146,!0,!0)};EditorUi.prototype.showExportDialog=function(a,b,d,e,h,l,n,k){n=null!=n?n:!0;var c=document.createElement("div");c.style.whiteSpace="nowrap";var f=this.editor.graph,g="jpeg"==k?170:280,p=document.createElement("h3");mxUtils.write(p,a);p.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:10px";
+c.appendChild(p);mxUtils.write(c,mxResources.get("zoom")+":");var m=document.createElement("input");m.setAttribute("type","text");m.style.marginRight="16px";m.style.width="60px";m.style.marginLeft="4px";m.style.marginRight="12px";m.value=this.lastExportZoom||"100%";c.appendChild(m);mxUtils.write(c,mxResources.get("borderWidth")+":");var r=document.createElement("input");r.setAttribute("type","text");r.style.marginRight="16px";r.style.width="60px";r.style.marginLeft="4px";r.value=this.lastExportBorder||
+"0";c.appendChild(r);mxUtils.br(c);var u=this.addCheckbox(c,mxResources.get("transparentBackground"),f.background==mxConstants.NONE||null==f.background,null,null,"jpeg"!=k),q=this.addCheckbox(c,mxResources.get("selectionOnly"),!1,f.isSelectionEmpty()),B=document.createElement("input");B.style.marginTop="16px";B.style.marginRight="8px";B.style.marginLeft="24px";B.setAttribute("disabled","disabled");B.setAttribute("type","checkbox");l&&(c.appendChild(B),mxUtils.write(c,mxResources.get("crop")),mxUtils.br(c),
+g+=26,mxEvent.addListener(q,"change",function(){q.checked?B.removeAttribute("disabled"):B.setAttribute("disabled","disabled")}));f.isSelectionEmpty()||(B.setAttribute("checked","checked"),B.defaultChecked=!0);var E=this.addCheckbox(c,mxResources.get("shadow"),f.shadowVisible),y=document.createElement("input");y.style.marginTop="16px";y.style.marginRight="8px";y.setAttribute("type","checkbox");!this.isOffline()&&this.canvasSupported||y.setAttribute("disabled","disabled");b&&(c.appendChild(y),mxUtils.write(c,
+mxResources.get("embedImages")),mxUtils.br(c),g+=26);var O=this.addCheckbox(c,mxResources.get("includeCopyOfMyDiagram"),n,null,null,"jpeg"!=k),J=null!=this.pages&&1<this.pages.length,F=this.addCheckbox(c,J?mxResources.get("allPages"):"",J,!J,null,"jpeg"!=k);F.style.marginLeft="24px";F.style.marginBottom="16px";J||(F.style.visibility="hidden");mxEvent.addListener(O,"change",function(){O.checked&&J?F.removeAttribute("disabled"):F.setAttribute("disabled","disabled")});n&&J||F.setAttribute("disabled",
+"disabled");a=new CustomDialog(this,c,mxUtils.bind(this,function(){this.lastExportBorder=r.value;this.lastExportZoom=m.value;h(m.value,u.checked,!q.checked,E.checked,O.checked,y.checked,r.value,B.checked,!F.checked)}),null,d,e);this.showDialog(a.container,320,g,!0,!0);m.focus();mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode||mxClient.IS_QUIRKS?m.select():document.execCommand("selectAll",!1,null)};EditorUi.prototype.showEmbedImageDialog=function(a,b,d,e,m){var c=document.createElement("div");
+c.style.whiteSpace="nowrap";var f=this.editor.graph;if(null!=b){var g=document.createElement("h3");mxUtils.write(g,b);g.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:4px";c.appendChild(g)}var p=this.addCheckbox(c,mxResources.get("fit"),!0),h=this.addCheckbox(c,mxResources.get("shadow"),f.shadowVisible&&e,!e),l=this.addCheckbox(c,d),n=this.addCheckbox(c,mxResources.get("lightbox"),!0),q=this.addEditButton(c,n),A=q.getEditInput(),z=1<f.model.getChildCount(f.model.getRoot()),
+C=this.addCheckbox(c,mxResources.get("layers"),z,!z);C.style.marginLeft=A.style.marginLeft;C.style.marginBottom="12px";C.style.marginTop="8px";mxEvent.addListener(n,"change",function(){n.checked?(z&&C.removeAttribute("disabled"),A.removeAttribute("disabled")):(C.setAttribute("disabled","disabled"),A.setAttribute("disabled","disabled"));A.checked&&n.checked?q.getEditSelect().removeAttribute("disabled"):q.getEditSelect().setAttribute("disabled","disabled")});b=new CustomDialog(this,c,mxUtils.bind(this,
+function(){a(p.checked,h.checked,l.checked,n.checked,q.getLink(),C.checked)}),null,mxResources.get("embed"),m);this.showDialog(b.container,280,280,!0,!0)};EditorUi.prototype.createEmbedImage=function(a,b,d,e,m,h,l,k){function c(c){var b=" ",g="";e&&(b=" onclick=\"(function(img){if(img.wnd!=null&&!img.wnd.closed){img.wnd.focus();}else{var r=function(evt){if(evt.data=='ready'&&evt.source==img.wnd){img.wnd.postMessage(decodeURIComponent(img.getAttribute('src')),'*');window.removeEventListener('message',r);}};window.addEventListener('message',r);img.wnd=window.open('https://www.draw.io/?client=1&lightbox=1"+
+(m?"&edit=_blank":"")+(h?"&layers=1":"")+"');}})(this);\"",g+="cursor:pointer;");a&&(g+="max-width:100%;");var k="";d&&(k=' width="'+Math.round(f.width)+'" height="'+Math.round(f.height)+'"');l('<img src="'+c+'"'+k+(""!=g?' style="'+g+'"':"")+b+"/>")}var f=this.editor.graph.getGraphBounds();if(this.isExportToCanvas())this.exportToCanvas(mxUtils.bind(this,function(a){var b=e?this.getFileData(!0):null;a=this.createImageDataUri(a,b,"png");c(a)}),null,null,null,mxUtils.bind(this,function(a){k({message:mxResources.get("unknownError")})}),
+null,!0,d?2:1,null,b);else if(b=this.getFileData(!0),f.width*f.height<=MAX_AREA&&b.length<=MAX_REQUEST_SIZE){var g="";d&&(g="&w="+Math.round(2*f.width)+"&h="+Math.round(2*f.height));var p=new mxXmlRequest(EXPORT_URL,"format=png&base64=1&embedXml="+(e?"1":"0")+g+"&xml="+encodeURIComponent(b));p.send(mxUtils.bind(this,function(){200<=p.getStatus()&&299>=p.getStatus()?c("data:image/png;base64,"+p.getText()):k({message:mxResources.get("unknownError")})}))}else k({message:mxResources.get("drawingTooLarge")})};
+EditorUi.prototype.createEmbedSvg=function(a,b,d,e,m,h,l){var c=this.editor.graph.getSvg(),f=c.getElementsByTagName("a");if(null!=f)for(var g=0;g<f.length;g++){var p=f[g].getAttribute("href");null!=p&&"#"==p.charAt(0)&&"_blank"==f[g].getAttribute("target")&&f[g].removeAttribute("target")}e&&c.setAttribute("content",this.getFileData(!0));b&&this.editor.graph.addSvgShadow(c);if(d){var n=" ",r="";e&&(n="onclick=\"(function(img){if(img.wnd!=null&&!img.wnd.closed){img.wnd.focus();}else{var r=function(evt){if(evt.data=='ready'&&evt.source==img.wnd){img.wnd.postMessage(decodeURIComponent(img.getAttribute('src')),'*');window.removeEventListener('message',r);}};window.addEventListener('message',r);img.wnd=window.open('https://www.draw.io/?client=1&lightbox=1"+
+(m?"&edit=_blank":"")+(h?"&layers=1":"")+"');}})(this);\"",r+="cursor:pointer;");a&&(r+="max-width:100%;");this.convertImages(c,mxUtils.bind(this,function(a){l('<img src="'+this.createSvgDataUri(mxUtils.getXml(a))+'"'+(""!=r?' style="'+r+'"':"")+n+"/>")}))}else r="",e&&(c.setAttribute("onclick","(function(svg){var src=window.event.target||window.event.srcElement;while (src!=null&&src.nodeName.toLowerCase()!='a'){src=src.parentNode;}if(src==null){if(svg.wnd!=null&&!svg.wnd.closed){svg.wnd.focus();}else{var r=function(evt){if(evt.data=='ready'&&evt.source==svg.wnd){svg.wnd.postMessage(decodeURIComponent(svg.getAttribute('content')),'*');window.removeEventListener('message',r);}};window.addEventListener('message',r);svg.wnd=window.open('https://www.draw.io/?client=1&lightbox=1"+
+(m?"&edit=_blank":"")+(h?"&layers=1":"")+"');}}})(this);"),r+="cursor:pointer;"),a&&(a=parseInt(c.getAttribute("width")),b=parseInt(c.getAttribute("height")),c.setAttribute("viewBox","0 0 "+a+" "+b),r+="max-width:100%;max-height:"+b+"px;",c.removeAttribute("height")),""!=r&&c.setAttribute("style",r),l(mxUtils.getXml(c))};EditorUi.prototype.timeSince=function(a){a=Math.floor((new Date-a)/1E3);var c=Math.floor(a/31536E3);if(1<c)return c+" "+mxResources.get("years");c=Math.floor(a/2592E3);if(1<c)return c+
 " "+mxResources.get("months");c=Math.floor(a/86400);if(1<c)return c+" "+mxResources.get("days");c=Math.floor(a/3600);if(1<c)return c+" "+mxResources.get("hours");c=Math.floor(a/60);return 1<c?c+" "+mxResources.get("minutes"):1==c?c+" "+mxResources.get("minute"):null};EditorUi.prototype.convertMath=function(a,b,d,e){e()};EditorUi.prototype.decodeNodeIntoGraph=function(a,b){if(null!=a){var c=null;if("diagram"==a.nodeName)c=a;else if("mxfile"==a.nodeName){var d=a.getElementsByTagName("diagram");if(0<
 d.length){var c=d[0],f=b.getGlobalVariable;b.getGlobalVariable=function(a){return"page"==a?c.getAttribute("name")||mxResources.get("pageWithNumber",[1]):"pagenumber"==a?1:f.apply(this,arguments)}}}null!=c&&(d=b.decompress(mxUtils.getTextContent(c)),null!=d&&0<d.length&&(a=mxUtils.parseXml(d).documentElement))}d=this.editor.graph;try{this.editor.graph=b,this.editor.setGraphXml(a)}catch(u){}finally{this.editor.graph=d}return a};EditorUi.prototype.getEmbeddedPng=function(a,b,d){var c=this.editor.graph,
-f=null;if(null!=d&&0<d.length)c=this.createTemporaryGraph(this.editor.graph.getStylesheet()),document.body.appendChild(c.container),this.decodeNodeIntoGraph(this.editor.extractGraphModel(mxUtils.parseXml(d).documentElement,!0),c),f=d;else if(null!=this.pages&&this.currentPage!=this.pages[0]){var c=this.createTemporaryGraph(c.getStylesheet()),e=c.getGlobalVariable,h=this.pages[0];c.getGlobalVariable=function(a){return"page"==a?h.getName():"pagenumber"==a?1:e.apply(this,arguments)};document.body.appendChild(c.container);
-c.model.setRoot(h.root)}this.exportToCanvas(mxUtils.bind(this,function(d){try{null==f&&(f=this.getFileData(!0));var e=d.toDataURL("image/png"),e=this.writeGraphModelToPng(e,"zTXt","mxGraphModel",atob(this.editor.graph.compress(f)));a(e.substring(e.lastIndexOf(",")+1));c!=this.editor.graph&&c.container.parentNode.removeChild(c.container)}catch(v){null!=b&&b(v)}}),null,null,null,mxUtils.bind(this,function(a){null!=b&&b(a)}),null,null,null,null,c.shadowVisible,null,c)};EditorUi.prototype.getEmbeddedSvg=
-function(a,b,d,e,g,l,p){p=b.background;p==mxConstants.NONE&&(p=null);b=b.getSvg(p,null,null,null,null,l);null!=a&&b.setAttribute("content",a);null!=d&&b.setAttribute("resource",d);if(null!=g)this.convertImages(b,mxUtils.bind(this,function(a){g((e?"":'<?xml version="1.0" encoding="UTF-8"?>\n<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">\n')+mxUtils.getXml(a))}));else return(e?"":'<?xml version="1.0" encoding="UTF-8"?>\n<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">\n')+
-mxUtils.getXml(b)};EditorUi.prototype.exportImage=function(a,b,d,e,g,l,p,k,q){q=null!=q?q:"png";if(this.spinner.spin(document.body,mxResources.get("exporting"))){var c=this.editor.graph.isSelectionEmpty();d=null!=d?d:c;null==this.thumbImageCache&&(this.thumbImageCache={});try{this.exportToCanvas(mxUtils.bind(this,function(a){this.spinner.stop();try{this.saveCanvas(a,g?this.getFileData(!0,null,null,null,d,k):null,q)}catch(w){"Invalid image"==w.message?this.downloadFile(q):this.handleError(w)}}),null,
-this.thumbImageCache,null,mxUtils.bind(this,function(a){this.spinner.stop();this.handleError(a)}),null,d,a||1,b,e,null,null,l,p)}catch(x){this.spinner.stop(),this.handleError(x)}}};EditorUi.prototype.loadFonts=function(a){if(null!=this.editor.fontCss&&null==this.editor.resolvedFontCss){var c=this.editor.fontCss.split("url("),b=0,d={},e=mxUtils.bind(this,function(){if(0==b){for(var f=[c[0]],e=1;e<c.length;e++){var h=c[e].indexOf(")");f.push("url(");f.push(d[c[e].substring(0,h)]);f.push(c[e].substring(h))}this.editor.resolvedFontCss=
-f.join("");a()}});if(0<c.length)for(var g=1;g<c.length;g++){var l=c[g].indexOf(")");mxUtils.bind(this,function(a){if(null==d[a]){d[a]=a;b++;var c="application/x-font-ttf";/(\.svg)($|\?)/i.test(a)?c="image/svg+xml":/(\.otf)($|\?)/i.test(a)?c="application/x-font-opentype":/(\.woff)($|\?)/i.test(a)?c="application/font-woff":/(\.woff2)($|\?)/i.test(a)?c="application/font-woff2":/(\.eot)($|\?)/i.test(a)?c="application/vnd.ms-fontobject":/(\.sfnt)($|\?)/i.test(a)&&(c="application/font-sfnt");var f=a;/^https?:\/\//.test(f)&&
-!this.isCorsEnabledForUrl(f)&&(f=PROXY_URL+"?url="+encodeURIComponent(a));this.loadUrl(f,mxUtils.bind(this,function(c){d[a]=c;b--;e()}),mxUtils.bind(this,function(a){b--;e()}),!0,null,"data:"+c+";charset=utf-8;base64,")}})(c[g].substring(0,l))}}else a()};EditorUi.prototype.exportToCanvas=function(a,b,d,e,g,l,p,k,q,v,x,w,D,B){l=null!=l?l:!0;w=null!=w?w:this.editor.graph;D=null!=D?D:0;var c=q?null:w.background;c==mxConstants.NONE&&(c=null);null==c&&(c=e);null==c&&0==q&&(c="#ffffff");this.convertImages(w.getSvg(c,
-null,null,B,null,null!=p?p:!0),mxUtils.bind(this,function(d){var f=new Image;f.onload=mxUtils.bind(this,function(){try{var e=document.createElement("canvas"),h=parseInt(d.getAttribute("width")),m=parseInt(d.getAttribute("height"));k=null!=k?k:1;null!=b&&(k=l?Math.min(1,Math.min(3*b/(4*m),b/h)):b/h);h=Math.ceil(k*h)+2*D;m=Math.ceil(k*m)+2*D;e.setAttribute("width",h);e.setAttribute("height",m);var n=e.getContext("2d");null!=c&&(n.beginPath(),n.rect(0,0,h,m),n.fillStyle=c,n.fill());n.scale(k,k);n.drawImage(f,
-D/k,D/k);a(e)}catch(T){null!=g&&g(T)}});f.onerror=function(a){null!=g&&g(a)};try{v&&this.editor.graph.addSvgShadow(d);var e=mxUtils.bind(this,function(){if(null!=this.editor.resolvedFontCss){var a=document.createElement("style");a.setAttribute("type","text/css");a.innerHTML=this.editor.resolvedFontCss;d.getElementsByTagName("defs")[0].appendChild(a)}this.convertMath(w,d,!0,mxUtils.bind(this,function(){f.src=this.createSvgDataUri(mxUtils.getXml(d))}))});this.loadFonts(e)}catch(z){null!=g&&g(z)}}),
+f=null;if(null!=d&&0<d.length)c=this.createTemporaryGraph(this.editor.graph.getStylesheet()),document.body.appendChild(c.container),this.decodeNodeIntoGraph(this.editor.extractGraphModel(mxUtils.parseXml(d).documentElement,!0),c),f=d;else if(null!=this.pages&&this.currentPage!=this.pages[0]){var c=this.createTemporaryGraph(c.getStylesheet()),e=c.getGlobalVariable,g=this.pages[0];c.getGlobalVariable=function(a){return"page"==a?g.getName():"pagenumber"==a?1:e.apply(this,arguments)};document.body.appendChild(c.container);
+c.model.setRoot(g.root)}this.exportToCanvas(mxUtils.bind(this,function(d){try{null==f&&(f=this.getFileData(!0));var e=d.toDataURL("image/png"),e=this.writeGraphModelToPng(e,"zTXt","mxGraphModel",atob(this.editor.graph.compress(f)));a(e.substring(e.lastIndexOf(",")+1));c!=this.editor.graph&&c.container.parentNode.removeChild(c.container)}catch(t){null!=b&&b(t)}}),null,null,null,mxUtils.bind(this,function(a){null!=b&&b(a)}),null,null,null,null,c.shadowVisible,null,c)};EditorUi.prototype.getEmbeddedSvg=
+function(a,b,d,e,h,l,n){n=b.background;n==mxConstants.NONE&&(n=null);b=b.getSvg(n,null,null,null,null,l);null!=a&&b.setAttribute("content",a);null!=d&&b.setAttribute("resource",d);if(null!=h)this.convertImages(b,mxUtils.bind(this,function(a){h((e?"":'<?xml version="1.0" encoding="UTF-8"?>\n<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">\n')+mxUtils.getXml(a))}));else return(e?"":'<?xml version="1.0" encoding="UTF-8"?>\n<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">\n')+
+mxUtils.getXml(b)};EditorUi.prototype.exportImage=function(a,b,d,e,h,l,n,k,q){q=null!=q?q:"png";if(this.spinner.spin(document.body,mxResources.get("exporting"))){var c=this.editor.graph.isSelectionEmpty();d=null!=d?d:c;null==this.thumbImageCache&&(this.thumbImageCache={});try{this.exportToCanvas(mxUtils.bind(this,function(a){this.spinner.stop();try{this.saveCanvas(a,h?this.getFileData(!0,null,null,null,d,k):null,q)}catch(w){"Invalid image"==w.message?this.downloadFile(q):this.handleError(w)}}),null,
+this.thumbImageCache,null,mxUtils.bind(this,function(a){this.spinner.stop();this.handleError(a)}),null,d,a||1,b,e,null,null,l,n)}catch(x){this.spinner.stop(),this.handleError(x)}}};EditorUi.prototype.loadFonts=function(a){if(null!=this.editor.fontCss&&null==this.editor.resolvedFontCss){var c=this.editor.fontCss.split("url("),b=0,d={},e=mxUtils.bind(this,function(){if(0==b){for(var f=[c[0]],e=1;e<c.length;e++){var g=c[e].indexOf(")");f.push("url(");f.push(d[c[e].substring(0,g)]);f.push(c[e].substring(g))}this.editor.resolvedFontCss=
+f.join("");a()}});if(0<c.length)for(var h=1;h<c.length;h++){var l=c[h].indexOf(")");mxUtils.bind(this,function(a){if(null==d[a]){d[a]=a;b++;var c="application/x-font-ttf";/(\.svg)($|\?)/i.test(a)?c="image/svg+xml":/(\.otf)($|\?)/i.test(a)?c="application/x-font-opentype":/(\.woff)($|\?)/i.test(a)?c="application/font-woff":/(\.woff2)($|\?)/i.test(a)?c="application/font-woff2":/(\.eot)($|\?)/i.test(a)?c="application/vnd.ms-fontobject":/(\.sfnt)($|\?)/i.test(a)&&(c="application/font-sfnt");var f=a;/^https?:\/\//.test(f)&&
+!this.isCorsEnabledForUrl(f)&&(f=PROXY_URL+"?url="+encodeURIComponent(a));this.loadUrl(f,mxUtils.bind(this,function(c){d[a]=c;b--;e()}),mxUtils.bind(this,function(a){b--;e()}),!0,null,"data:"+c+";charset=utf-8;base64,")}})(c[h].substring(0,l))}}else a()};EditorUi.prototype.exportToCanvas=function(a,b,d,e,h,l,n,k,q,t,x,w,D,A){l=null!=l?l:!0;w=null!=w?w:this.editor.graph;D=null!=D?D:0;var c=q?null:w.background;c==mxConstants.NONE&&(c=null);null==c&&(c=e);null==c&&0==q&&(c="#ffffff");this.convertImages(w.getSvg(c,
+null,null,A,null,null!=n?n:!0),mxUtils.bind(this,function(d){var f=new Image;f.onload=mxUtils.bind(this,function(){try{var e=document.createElement("canvas"),g=parseInt(d.getAttribute("width")),p=parseInt(d.getAttribute("height"));k=null!=k?k:1;null!=b&&(k=l?Math.min(1,Math.min(3*b/(4*p),b/g)):b/g);g=Math.ceil(k*g)+2*D;p=Math.ceil(k*p)+2*D;e.setAttribute("width",g);e.setAttribute("height",p);var m=e.getContext("2d");null!=c&&(m.beginPath(),m.rect(0,0,g,p),m.fillStyle=c,m.fill());m.scale(k,k);m.drawImage(f,
+D/k,D/k);a(e)}catch(R){null!=h&&h(R)}});f.onerror=function(a){null!=h&&h(a)};try{t&&this.editor.graph.addSvgShadow(d);var e=mxUtils.bind(this,function(){if(null!=this.editor.resolvedFontCss){var a=document.createElement("style");a.setAttribute("type","text/css");a.innerHTML=this.editor.resolvedFontCss;d.getElementsByTagName("defs")[0].appendChild(a)}this.convertMath(w,d,!0,mxUtils.bind(this,function(){f.src=this.createSvgDataUri(mxUtils.getXml(d))}))});this.loadFonts(e)}catch(y){null!=h&&h(y)}}),
 d,x)};EditorUi.prototype.createImageUrlConverter=function(){var a=new mxUrlConverter;a.updateBaseUrl();var b=a.convert;a.convert=function(c){null!=c&&("http://"!=c.substring(0,7)&&"https://"!=c.substring(0,8)||c.substring(0,a.baseUrl.length)==a.baseUrl?"chrome-extension://"!=c.substring(0,19)&&(c=b.apply(this,arguments)):c=PROXY_URL+"?url="+encodeURIComponent(c));return c};return a};EditorUi.prototype.convertImages=function(a,b,d,e){null==e&&(e=this.createImageUrlConverter());var c=0,f=d||{};d=mxUtils.bind(this,
-function(d,h){for(var k=a.getElementsByTagName(d),g=0;g<k.length;g++)mxUtils.bind(this,function(d){var k=e.convert(d.getAttribute(h));if(null!=k&&"data:"!=k.substring(0,5)){var g=f[k];null==g?(c++,this.convertImageToDataUri(k,function(e){null!=e&&(f[k]=e,d.setAttribute(h,e));c--;0==c&&b(a)})):d.setAttribute(h,g)}})(k[g])});d("image","xlink:href");d("img","src");0==c&&b(a)};EditorUi.prototype.loadUrl=function(a,b,d,e,g,l){try{var c=e||/(\.png)($|\?)/i.test(a)||/(\.jpe?g)($|\?)/i.test(a)||/(\.gif)($|\?)/i.test(a);
-g=null!=g?g:!0;var f=mxUtils.bind(this,function(){mxUtils.get(a,mxUtils.bind(this,function(a){if(200<=a.getStatus()&&299>=a.getStatus()){if(null!=b){var f=a.getText();if(c){if((9==document.documentMode||10==document.documentMode)&&"undefined"!==typeof window.mxUtilsBinaryToArray){a=mxUtilsBinaryToArray(a.request.responseBody).toArray();for(var f=Array(a.length),e=0;e<a.length;e++)f[e]=String.fromCharCode(a[e]);f=f.join("")}l=null!=l?l:"data:image/png;base64,";f=l+this.base64Encode(f)}b(f)}}else null!=
-d&&d({code:App.ERROR_UNKNOWN})}),function(){null!=d&&d({code:App.ERROR_UNKNOWN})},c,this.timeout,function(){g&&null!=d&&d({code:App.ERROR_TIMEOUT,retry:f})})});f()}catch(t){null!=d&&d(t)}};EditorUi.prototype.isCorsEnabledForUrl=function(a){return"https?://raw.githubusercontent.com/"===a.substring(0,34)||/^https?:\/\/.*\.github\.io\//.test(a)||/^https?:\/\/(.*\.)?rawgit\.com\//.test(a)};EditorUi.prototype.convertImageToDataUri=function(a,b){if(/(\.svg)$/i.test(a))mxUtils.get(a,mxUtils.bind(this,function(a){b(this.createSvgDataUri(a.getText()))}),
-function(){b()});else{var c=new Image;c.onload=function(){var a=document.createElement("canvas"),d=a.getContext("2d");a.height=c.height;a.width=c.width;d.drawImage(c,0,0);b(a.toDataURL())};c.onerror=function(){b()};c.src=a}};EditorUi.prototype.importXml=function(a,b,d,e,g){b=null!=b?b:0;d=null!=d?d:0;var c=[];try{var f=this.editor.graph;if(null!=a&&0<a.length){var h=mxUtils.parseXml(a),m=this.editor.extractGraphModel(h.documentElement,null!=this.pages);if(null!=m&&"mxfile"==m.nodeName&&null!=this.pages){var n=
-m.getElementsByTagName("diagram");if(1==n.length)m=mxUtils.parseXml(f.decompress(mxUtils.getTextContent(n[0]))).documentElement;else if(1<n.length){f.model.beginUpdate();try{for(var l=0;l<n.length;l++){var p=this.updatePageRoot(new DiagramPage(n[l])),q=this.pages.length;null==p.getName()&&p.setName(mxResources.get("pageWithNumber",[q+1]));f.model.execute(new ChangePage(this,p,p,q))}}finally{f.model.endUpdate()}}}if(null!=m&&"mxGraphModel"===m.nodeName){var B=new mxGraphModel;(new mxCodec(m.ownerDocument)).decode(m,
-B);var y=B.getChildCount(B.getRoot());f.model.getChildCount(f.model.getRoot());f.model.beginUpdate();try{a={};for(l=0;l<y;l++){var C=B.getChildAt(B.getRoot(),l);if(1!=y||f.isCellLocked(f.getDefaultParent()))C=f.importCells([C],0,0,f.model.getRoot(),null,a)[0],A=f.model.getChildren(C),f.moveCells(A,b,d),c=c.concat(A);else var A=B.getChildren(C),c=c.concat(f.importCells(A,b,d,f.getDefaultParent(),null,a))}if(e){f.isGridEnabled()&&(b=f.snap(b),d=f.snap(d));var F=f.getBoundingBoxFromGeometry(c,!0);null!=
-F&&f.moveCells(c,b-F.x,d-F.y)}}finally{f.model.endUpdate()}}}}catch(z){throw g||this.handleError(z,mxResources.get("invalidOrMissingFile")),z;}return c};EditorUi.prototype.importLucidChart=function(a,b,d,e,g){var c=mxUtils.bind(this,function(){if(this.pasteLucidChart)try{this.insertLucidChart(a,b,d,e,g)}catch(r){this.handleError(r)}finally{null!=g&&g()}});this.pasteLucidChart||this.loadingExtensions||this.isOffline()?window.setTimeout(c,0):(this.loadingExtensions=!0,"1"==urlParams.dev?mxscript("js/diagramly/Extensions.js",
-c):mxscript("js/extensions.min.js",c))};EditorUi.prototype.insertLucidChart=function(a,b,d,e,g){g=JSON.parse(a);a=[];if(null!=g.state){g=JSON.parse(g.state);for(var c in g.Pages)a.push(g.Pages[c]);a.sort(function(a,c){return a.Properties.Order<c.Properties.Order?-1:a.Properties.Order>c.Properties.Order?1:0})}else a.push(g);if(0<a.length){this.editor.graph.getModel().beginUpdate();try{if(this.pasteLucidChart(a[0],b,d,e),null!=this.pages){var f=this.currentPage;for(b=1;b<a.length;b++)this.insertPage(),
-this.pasteLucidChart(a[b]);this.selectPage(f)}}finally{this.editor.graph.getModel().endUpdate()}}};EditorUi.prototype.insertTextAt=function(a,b,d,e,g,l,p){l=null!=l?l:!0;p=null!=p?p:!0;if(null!=a)if(Graph.fileSupport&&!this.isOffline()&&(new XMLHttpRequest).upload&&this.isRemoteFileFormat(a))this.parseFile(new Blob([a.replace(/\s+/g," ")],{type:"application/octet-stream"}),mxUtils.bind(this,function(a){4==a.readyState&&200<=a.status&&299>=a.status&&this.editor.graph.setSelectionCells(this.insertTextAt(a.responseText,
-b,d,!0))}));else if("data:"==a.substring(0,5)||!this.isOffline()&&(g||/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(a))){var c=this.editor.graph;if("data:image/png;base64,"==a.substring(0,22)){var f=this.extractGraphModelFromPng(a),h=this.importXml(f,b,d,l,!0);if(0<h.length)return h}if("data:image/svg+xml;"==a.substring(0,19))try{if(f=null,"data:image/svg+xml;base64,"==a.substring(0,26)?(f=a.substring(a.indexOf(",")+1),f=window.atob&&!mxClient.IS_SF?atob(f):Base64.decode(f,!0)):f=decodeURIComponent(a.substring(a.indexOf(",")+
-1)),h=this.importXml(f,b,d,l,!0),0<h.length)return h}catch(x){}this.loadImage(a,mxUtils.bind(this,function(f){if("data:"==a.substring(0,5))this.resizeImage(f,a,mxUtils.bind(this,function(a,f,e){c.setSelectionCell(c.insertVertex(null,null,"",c.snap(b),c.snap(d),f,e,"shape=image;verticalLabelPosition=bottom;labelBackgroundColor=#ffffff;verticalAlign=top;aspect=fixed;imageAspect=0;image="+this.convertDataUri(a)+";"))}),p,this.maxImageSize);else{var e=Math.min(1,Math.min(this.maxImageSize/f.width,this.maxImageSize/
-f.height)),h=Math.round(f.width*e);f=Math.round(f.height*e);c.setSelectionCell(c.insertVertex(null,null,"",c.snap(b),c.snap(d),h,f,"shape=image;verticalLabelPosition=bottom;labelBackgroundColor=#ffffff;verticalAlign=top;aspect=fixed;imageAspect=0;image="+a+";"))}}),mxUtils.bind(this,function(){var f=null;c.getModel().beginUpdate();try{f=c.insertVertex(c.getDefaultParent(),null,a,c.snap(b),c.snap(d),1,1,"text;"+(e?"html=1;":"")),c.updateCellSize(f),c.fireEvent(new mxEventObject("textInserted","cells",
-[f]))}finally{c.getModel().endUpdate()}c.setSelectionCell(f)}))}else{a=this.editor.graph.zapGremlins(mxUtils.trim(a));if(this.isCompatibleString(a))return this.importXml(a,b,d,l);if(0<a.length)if('{"state":"{\\"Properties\\":'==a.substring(0,26))this.importLucidChart(a,b,d,l);else{c=this.editor.graph;g=null;c.getModel().beginUpdate();try{g=c.insertVertex(c.getDefaultParent(),null,"",c.snap(b),c.snap(d),1,1,"text;"+(e?"html=1;":"")),c.fireEvent(new mxEventObject("textInserted","cells",[g])),g.value=
-a,c.updateCellSize(g),/\b((?:[a-z][\w-]+:(?:\/{1,3}|[a-z0-9%])|www\d{0,3}[.]|[a-z0-9.\-]+[.][a-z]{2,4}\/)(?:[^\s()<>]+|\(([^\s()<>]+|(\([^\s()<>]+\)))*\))+(?:\(([^\s()<>]+|(\([^\s()<>]+\)))*\)|[^\s`!()\[\]{};:'".,<>?«»“”‘’]))/i.test(g.value)&&c.setLinkForCell(g,g.value),g.geometry.width+=c.gridSize,g.geometry.height+=c.gridSize}finally{c.getModel().endUpdate()}return[g]}}return[]};EditorUi.prototype.formatFileSize=function(a){var c=-1;do a/=1024,c++;while(1024<a);return Math.max(a,.1).toFixed(1)+
-" kB; MB; GB; TB;PB;EB;ZB;YB".split(";")[c]};EditorUi.prototype.convertDataUri=function(a){if("data:"==a.substring(0,5)){var c=a.indexOf(";");0<c&&(a=a.substring(0,c)+a.substring(a.indexOf(",",c+1)))}return a};EditorUi.prototype.isRemoteFileFormat=function(a,b){return/(\.*<graphml xmlns=\".*)/.test(a)||/(\"contentType\":\s*\"application\/gliffy\+json\")/.test(a)||null!=b&&/(\.vsdx)($|\?)/i.test(b)||null!=b&&/(\.vssx)($|\?)/i.test(b)};EditorUi.prototype.importFile=function(a,b,d,e,g,l,p,k,q,v,x){v=
-null!=v?v:!0;var c=!1,f=null;"image"==b.substring(0,5)?(q=!1,"image/png"==b.substring(0,9)&&(b=x?null:this.extractGraphModelFromPng(a),null!=b&&0<b.length&&(f=this.importXml(b,d,e,v),q=!0)),q||(f=this.editor.graph,b=a.indexOf(";"),0<b&&(a=a.substring(0,b)+a.substring(a.indexOf(",",b+1))),v&&f.isGridEnabled()&&(d=f.snap(d),e=f.snap(e)),f=[f.insertVertex(null,null,"",d,e,g,l,"shape=image;verticalLabelPosition=bottom;labelBackgroundColor=#ffffff;verticalAlign=top;aspect=fixed;imageAspect=0;image="+a+
-";")])):!this.isOffline()&&(new XMLHttpRequest).upload&&this.isRemoteFileFormat(a,p)?(c=!0,this.parseFile(null!=q?q:new Blob([a],{type:"application/octet-stream"}),mxUtils.bind(this,function(a){if(4==a.readyState){var c=null;200<=a.status&&299>=a.status&&(a=a.responseText,null!=a&&"<mxlibrary"==a.substring(0,10)?(null!=p&&".vssx"==p.toLowerCase().substring(p.length-5)&&(p=p.substring(0,p.length-5)+".xml"),this.loadLibrary(new LocalLibrary(this,a,p))):c=this.importXml(a,d,e,v));null!=k&&k(c)}}),p)):
-/(\.vsd)($|\?)/i.test(p)||(f=this.insertTextAt(this.validateFileData(a),d,e,!0,null,v));c||null==k||k(f);return f};EditorUi.prototype.base64Encode=function(a){for(var c="",b=0,d=a.length,e,g,l;b<d;){e=a.charCodeAt(b++)&255;if(b==d){c+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(e>>2);c+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((e&3)<<4);c+="==";break}g=a.charCodeAt(b++);if(b==d){c+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(e>>
-2);c+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((e&3)<<4|(g&240)>>4);c+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((g&15)<<2);c+="=";break}l=a.charCodeAt(b++);c+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(e>>2);c+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((e&3)<<4|(g&240)>>4);c+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((g&15)<<2|(l&192)>>6);
-c+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(l&63)}return c};EditorUi.prototype.importFiles=function(a,b,d,e,g,l,p,k,q,v,x,w){b=null!=b?b:0;d=null!=d?d:0;e=null!=e?e:this.maxImageSize;v=null!=v?v:this.maxImageBytes;var c=null!=b&&null!=d,f=!0,h=!1;if(!mxClient.IS_CHROMEAPP&&null!=a)for(var m=x||this.resampleThreshold,n=0;n<a.length;n++)if("image/"==a[n].type.substring(0,6)&&a[n].size>m){h=!0;break}var r=mxUtils.bind(this,function(){var h=this.editor.graph,m=h.gridSize;
-g=null!=g?g:mxUtils.bind(this,function(a,b,d,f,e,h,k,g,m){return null!=a&&"<mxlibrary"==a.substring(0,10)?(this.spinner.stop(),this.loadLibrary(new LocalLibrary(this,a,k)),null):this.importFile(a,b,d,f,e,h,k,g,m,c,w)});l=null!=l?l:mxUtils.bind(this,function(a){h.setSelectionCells(a)});if(this.spinner.spin(document.body,mxResources.get("loading")))for(var n=a.length,q=n,r=[],t=mxUtils.bind(this,function(a,b){r[a]=b;if(0==--q){this.spinner.stop();if(null!=k)k(r);else{var c=[];h.getModel().beginUpdate();
-try{for(var d=0;d<r.length;d++){var f=r[d]();null!=f&&(c=c.concat(f))}}finally{h.getModel().endUpdate()}}l(c)}}),u=0;u<n;u++)mxUtils.bind(this,function(c){var h=a[c],k=new FileReader;k.onload=mxUtils.bind(this,function(a){if(null==p||p(h))if("image/"==h.type.substring(0,6))if("image/svg"==h.type.substring(0,9)){var k=a.target.result,n=k.indexOf(","),l=atob(k.substring(n+1)),q=mxUtils.parseXml(l),l=q.getElementsByTagName("svg");if(0<l.length){var l=l[0],r=w?null:l.getAttribute("content");null!=r&&
-"<"!=r.charAt(0)&&"%"!=r.charAt(0)&&(r=unescape(window.atob?atob(r):Base64.decode(r,!0)));null!=r&&"%"==r.charAt(0)&&(r=decodeURIComponent(r));null==r||"<mxfile "!==r.substring(0,8)&&"<mxGraphModel "!==r.substring(0,14)?t(c,mxUtils.bind(this,function(){try{if(k.substring(0,n+1),null!=q){var a=q.getElementsByTagName("svg");if(0<a.length){var f=a[0],l=parseFloat(f.getAttribute("width")),p=parseFloat(f.getAttribute("height")),r=f.getAttribute("viewBox");if(null==r||0==r.length)f.setAttribute("viewBox",
-"0 0 "+l+" "+p);else if(isNaN(l)||isNaN(p)){var z=r.split(" ");3<z.length&&(l=parseFloat(z[2]),p=parseFloat(z[3]))}k=this.createSvgDataUri(mxUtils.getXml(a[0]));var v=Math.min(1,Math.min(e/Math.max(1,l)),e/Math.max(1,p));return g(k,h.type,b+c*m,d+c*m,Math.max(1,Math.round(l*v)),Math.max(1,Math.round(p*v)),h.name)}}}catch(ca){}return null})):t(c,mxUtils.bind(this,function(){return g(r,"text/xml",b+c*m,d+c*m,0,0,h.name)}))}}else{l=!1;if("image/png"==h.type){var z=w?null:this.extractGraphModelFromPng(a.target.result);
-if(null!=z&&0<z.length){var u=new Image;u.src=a.target.result;t(c,mxUtils.bind(this,function(){return g(z,"text/xml",b+c*m,d+c*m,u.width,u.height,h.name)}));l=!0}}l||(mxClient.IS_CHROMEAPP?(this.spinner.stop(),this.showError(mxResources.get("error"),mxResources.get("dragAndDropNotSupported"),mxResources.get("cancel"),mxUtils.bind(this,function(){}),null,mxResources.get("ok"),mxUtils.bind(this,function(){this.actions.get("import").funct()}))):this.loadImage(a.target.result,mxUtils.bind(this,function(k){this.resizeImage(k,
-a.target.result,mxUtils.bind(this,function(k,n,l){t(c,mxUtils.bind(this,function(){if(null!=k&&k.length<v){var p=f&&this.isResampleImage(a.target.result,x)?Math.min(1,Math.min(e/n,e/l)):1;return g(k,h.type,b+c*m,d+c*m,Math.round(n*p),Math.round(l*p),h.name)}this.handleError({message:mxResources.get("imageTooBig")});return null}))}),f,e,x)})))}else g(a.target.result,h.type,b+c*m,d+c*m,240,160,h.name,function(a){t(c,function(){return a})})});/(\.vsdx)($|\?)/i.test(h.name)||/(\.vssx)($|\?)/i.test(h.name)?
-g(null,h.type,b+c*m,d+c*m,240,160,h.name,function(a){t(c,function(){return a})},h):"image"==h.type.substring(0,5)?k.readAsDataURL(h):k.readAsText(h)})(u)});h?this.confirmImageResize(function(a){f=a;r()},q):r()};EditorUi.prototype.confirmImageResize=function(a,b){b=null!=b?b:!1;var c=null!=this.spinner&&null!=this.spinner.pause?this.spinner.pause():function(){},d=isLocalStorage||mxClient.IS_CHROMEAPP?mxSettings.getResizeImages():null,f=function(d,f){if(d||b)mxSettings.setResizeImages(d?f:null),mxSettings.save();
+function(d,g){for(var k=a.getElementsByTagName(d),h=0;h<k.length;h++)mxUtils.bind(this,function(d){var k=e.convert(d.getAttribute(g));if(null!=k&&"data:"!=k.substring(0,5)){var h=f[k];null==h?(c++,this.convertImageToDataUri(k,function(e){null!=e&&(f[k]=e,d.setAttribute(g,e));c--;0==c&&b(a)})):d.setAttribute(g,h)}})(k[h])});d("image","xlink:href");d("img","src");0==c&&b(a)};EditorUi.prototype.loadUrl=function(a,b,d,e,h,l){try{var c=e||/(\.png)($|\?)/i.test(a)||/(\.jpe?g)($|\?)/i.test(a)||/(\.gif)($|\?)/i.test(a);
+h=null!=h?h:!0;var f=mxUtils.bind(this,function(){mxUtils.get(a,mxUtils.bind(this,function(a){if(200<=a.getStatus()&&299>=a.getStatus()){if(null!=b){var f=a.getText();if(c){if((9==document.documentMode||10==document.documentMode)&&"undefined"!==typeof window.mxUtilsBinaryToArray){a=mxUtilsBinaryToArray(a.request.responseBody).toArray();for(var f=Array(a.length),e=0;e<a.length;e++)f[e]=String.fromCharCode(a[e]);f=f.join("")}l=null!=l?l:"data:image/png;base64,";f=l+this.base64Encode(f)}b(f)}}else null!=
+d&&d({code:App.ERROR_UNKNOWN})}),function(){null!=d&&d({code:App.ERROR_UNKNOWN})},c,this.timeout,function(){h&&null!=d&&d({code:App.ERROR_TIMEOUT,retry:f})})});f()}catch(v){null!=d&&d(v)}};EditorUi.prototype.isCorsEnabledForUrl=function(a){return"https?://raw.githubusercontent.com/"===a.substring(0,34)||/^https?:\/\/.*\.github\.io\//.test(a)||/^https?:\/\/(.*\.)?rawgit\.com\//.test(a)};EditorUi.prototype.convertImageToDataUri=function(a,b){if(/(\.svg)$/i.test(a))mxUtils.get(a,mxUtils.bind(this,function(a){b(this.createSvgDataUri(a.getText()))}),
+function(){b()});else{var c=new Image;c.onload=function(){var a=document.createElement("canvas"),d=a.getContext("2d");a.height=c.height;a.width=c.width;d.drawImage(c,0,0);b(a.toDataURL())};c.onerror=function(){b()};c.src=a}};EditorUi.prototype.importXml=function(a,b,d,e,h){b=null!=b?b:0;d=null!=d?d:0;var c=[];try{var f=this.editor.graph;if(null!=a&&0<a.length){var g=mxUtils.parseXml(a),p=this.editor.extractGraphModel(g.documentElement,null!=this.pages);if(null!=p&&"mxfile"==p.nodeName&&null!=this.pages){var m=
+p.getElementsByTagName("diagram");if(1==m.length)p=mxUtils.parseXml(f.decompress(mxUtils.getTextContent(m[0]))).documentElement;else if(1<m.length){f.model.beginUpdate();try{for(var l=0;l<m.length;l++){var n=this.updatePageRoot(new DiagramPage(m[l])),q=this.pages.length;null==n.getName()&&n.setName(mxResources.get("pageWithNumber",[q+1]));f.model.execute(new ChangePage(this,n,n,q))}}finally{f.model.endUpdate()}}}if(null!=p&&"mxGraphModel"===p.nodeName){var A=new mxGraphModel;(new mxCodec(p.ownerDocument)).decode(p,
+A);var z=A.getChildCount(A.getRoot());f.model.getChildCount(f.model.getRoot());f.model.beginUpdate();try{a={};for(l=0;l<z;l++){var C=A.getChildAt(A.getRoot(),l);if(1!=z||f.isCellLocked(f.getDefaultParent()))C=f.importCells([C],0,0,f.model.getRoot(),null,a)[0],B=f.model.getChildren(C),f.moveCells(B,b,d),c=c.concat(B);else var B=A.getChildren(C),c=c.concat(f.importCells(B,b,d,f.getDefaultParent(),null,a))}if(e){f.isGridEnabled()&&(b=f.snap(b),d=f.snap(d));var E=f.getBoundingBoxFromGeometry(c,!0);null!=
+E&&f.moveCells(c,b-E.x,d-E.y)}}finally{f.model.endUpdate()}}}}catch(y){throw h||this.handleError(y,mxResources.get("invalidOrMissingFile")),y;}return c};EditorUi.prototype.importLucidChart=function(a,b,d,e,h){var c=mxUtils.bind(this,function(){if(this.pasteLucidChart)try{this.insertLucidChart(a,b,d,e,h)}catch(r){this.handleError(r)}finally{null!=h&&h()}});this.pasteLucidChart||this.loadingExtensions||this.isOffline()?window.setTimeout(c,0):(this.loadingExtensions=!0,"1"==urlParams.dev?mxscript("js/diagramly/Extensions.js",
+c):mxscript("js/extensions.min.js",c))};EditorUi.prototype.insertLucidChart=function(a,b,d,e,h){h=JSON.parse(a);a=[];if(null!=h.state){h=JSON.parse(h.state);for(var c in h.Pages)a.push(h.Pages[c]);a.sort(function(a,c){return a.Properties.Order<c.Properties.Order?-1:a.Properties.Order>c.Properties.Order?1:0})}else a.push(h);if(0<a.length){this.editor.graph.getModel().beginUpdate();try{if(this.pasteLucidChart(a[0],b,d,e),null!=this.pages){var f=this.currentPage;for(b=1;b<a.length;b++)this.insertPage(),
+this.pasteLucidChart(a[b]);this.selectPage(f)}}finally{this.editor.graph.getModel().endUpdate()}}};EditorUi.prototype.insertTextAt=function(a,b,d,e,h,l,n){l=null!=l?l:!0;n=null!=n?n:!0;if(null!=a)if(Graph.fileSupport&&!this.isOffline()&&(new XMLHttpRequest).upload&&this.isRemoteFileFormat(a))this.parseFile(new Blob([a.replace(/\s+/g," ")],{type:"application/octet-stream"}),mxUtils.bind(this,function(a){4==a.readyState&&200<=a.status&&299>=a.status&&this.editor.graph.setSelectionCells(this.insertTextAt(a.responseText,
+b,d,!0))}));else if("data:"==a.substring(0,5)||!this.isOffline()&&(h||/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(a))){var c=this.editor.graph;if("data:image/png;base64,"==a.substring(0,22)){var f=this.extractGraphModelFromPng(a),g=this.importXml(f,b,d,l,!0);if(0<g.length)return g}if("data:image/svg+xml;"==a.substring(0,19))try{if(f=null,"data:image/svg+xml;base64,"==a.substring(0,26)?(f=a.substring(a.indexOf(",")+1),f=window.atob&&!mxClient.IS_SF?atob(f):Base64.decode(f,!0)):f=decodeURIComponent(a.substring(a.indexOf(",")+
+1)),g=this.importXml(f,b,d,l,!0),0<g.length)return g}catch(x){}this.loadImage(a,mxUtils.bind(this,function(f){if("data:"==a.substring(0,5))this.resizeImage(f,a,mxUtils.bind(this,function(a,f,e){c.setSelectionCell(c.insertVertex(null,null,"",c.snap(b),c.snap(d),f,e,"shape=image;verticalLabelPosition=bottom;labelBackgroundColor=#ffffff;verticalAlign=top;aspect=fixed;imageAspect=0;image="+this.convertDataUri(a)+";"))}),n,this.maxImageSize);else{var e=Math.min(1,Math.min(this.maxImageSize/f.width,this.maxImageSize/
+f.height)),g=Math.round(f.width*e);f=Math.round(f.height*e);c.setSelectionCell(c.insertVertex(null,null,"",c.snap(b),c.snap(d),g,f,"shape=image;verticalLabelPosition=bottom;labelBackgroundColor=#ffffff;verticalAlign=top;aspect=fixed;imageAspect=0;image="+a+";"))}}),mxUtils.bind(this,function(){var f=null;c.getModel().beginUpdate();try{f=c.insertVertex(c.getDefaultParent(),null,a,c.snap(b),c.snap(d),1,1,"text;"+(e?"html=1;":"")),c.updateCellSize(f),c.fireEvent(new mxEventObject("textInserted","cells",
+[f]))}finally{c.getModel().endUpdate()}c.setSelectionCell(f)}))}else{a=this.editor.graph.zapGremlins(mxUtils.trim(a));if(this.isCompatibleString(a))return this.importXml(a,b,d,l);if(0<a.length)if('{"state":"{\\"Properties\\":'==a.substring(0,26))this.importLucidChart(a,b,d,l);else{c=this.editor.graph;h=null;c.getModel().beginUpdate();try{h=c.insertVertex(c.getDefaultParent(),null,"",c.snap(b),c.snap(d),1,1,"text;"+(e?"html=1;":"")),c.fireEvent(new mxEventObject("textInserted","cells",[h])),h.value=
+a,c.updateCellSize(h),/\b((?:[a-z][\w-]+:(?:\/{1,3}|[a-z0-9%])|www\d{0,3}[.]|[a-z0-9.\-]+[.][a-z]{2,4}\/)(?:[^\s()<>]+|\(([^\s()<>]+|(\([^\s()<>]+\)))*\))+(?:\(([^\s()<>]+|(\([^\s()<>]+\)))*\)|[^\s`!()\[\]{};:'".,<>?«»“”‘’]))/i.test(h.value)&&c.setLinkForCell(h,h.value),h.geometry.width+=c.gridSize,h.geometry.height+=c.gridSize}finally{c.getModel().endUpdate()}return[h]}}return[]};EditorUi.prototype.formatFileSize=function(a){var c=-1;do a/=1024,c++;while(1024<a);return Math.max(a,.1).toFixed(1)+
+" kB; MB; GB; TB;PB;EB;ZB;YB".split(";")[c]};EditorUi.prototype.convertDataUri=function(a){if("data:"==a.substring(0,5)){var c=a.indexOf(";");0<c&&(a=a.substring(0,c)+a.substring(a.indexOf(",",c+1)))}return a};EditorUi.prototype.isRemoteFileFormat=function(a,b){return/(\.*<graphml xmlns=\".*)/.test(a)||/(\"contentType\":\s*\"application\/gliffy\+json\")/.test(a)||null!=b&&/(\.vsdx)($|\?)/i.test(b)||null!=b&&/(\.vssx)($|\?)/i.test(b)};EditorUi.prototype.importFile=function(a,b,d,e,h,l,n,k,q,t,x){t=
+null!=t?t:!0;var c=!1,f=null;"image"==b.substring(0,5)?(q=!1,"image/png"==b.substring(0,9)&&(b=x?null:this.extractGraphModelFromPng(a),null!=b&&0<b.length&&(f=this.importXml(b,d,e,t),q=!0)),q||(f=this.editor.graph,b=a.indexOf(";"),0<b&&(a=a.substring(0,b)+a.substring(a.indexOf(",",b+1))),t&&f.isGridEnabled()&&(d=f.snap(d),e=f.snap(e)),f=[f.insertVertex(null,null,"",d,e,h,l,"shape=image;verticalLabelPosition=bottom;labelBackgroundColor=#ffffff;verticalAlign=top;aspect=fixed;imageAspect=0;image="+a+
+";")])):!this.isOffline()&&(new XMLHttpRequest).upload&&this.isRemoteFileFormat(a,n)?(c=!0,this.parseFile(null!=q?q:new Blob([a],{type:"application/octet-stream"}),mxUtils.bind(this,function(a){if(4==a.readyState){var c=null;200<=a.status&&299>=a.status&&(a=a.responseText,null!=a&&"<mxlibrary"==a.substring(0,10)?(null!=n&&".vssx"==n.toLowerCase().substring(n.length-5)&&(n=n.substring(0,n.length-5)+".xml"),this.loadLibrary(new LocalLibrary(this,a,n))):c=this.importXml(a,d,e,t));null!=k&&k(c)}}),n)):
+/(\.vsd)($|\?)/i.test(n)||(f=this.insertTextAt(this.validateFileData(a),d,e,!0,null,t));c||null==k||k(f);return f};EditorUi.prototype.base64Encode=function(a){for(var c="",b=0,d=a.length,e,h,l;b<d;){e=a.charCodeAt(b++)&255;if(b==d){c+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(e>>2);c+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((e&3)<<4);c+="==";break}h=a.charCodeAt(b++);if(b==d){c+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(e>>
+2);c+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((e&3)<<4|(h&240)>>4);c+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((h&15)<<2);c+="=";break}l=a.charCodeAt(b++);c+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(e>>2);c+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((e&3)<<4|(h&240)>>4);c+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((h&15)<<2|(l&192)>>6);
+c+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(l&63)}return c};EditorUi.prototype.importFiles=function(a,b,d,e,h,l,n,k,q,t,x,w){b=null!=b?b:0;d=null!=d?d:0;e=null!=e?e:this.maxImageSize;t=null!=t?t:this.maxImageBytes;var c=null!=b&&null!=d,f=!0,g=!1;if(!mxClient.IS_CHROMEAPP&&null!=a)for(var p=x||this.resampleThreshold,m=0;m<a.length;m++)if("image/"==a[m].type.substring(0,6)&&a[m].size>p){g=!0;break}var r=mxUtils.bind(this,function(){var g=this.editor.graph,p=g.gridSize;
+h=null!=h?h:mxUtils.bind(this,function(a,b,d,f,e,g,k,h,p){return null!=a&&"<mxlibrary"==a.substring(0,10)?(this.spinner.stop(),this.loadLibrary(new LocalLibrary(this,a,k)),null):this.importFile(a,b,d,f,e,g,k,h,p,c,w)});l=null!=l?l:mxUtils.bind(this,function(a){g.setSelectionCells(a)});if(this.spinner.spin(document.body,mxResources.get("loading")))for(var m=a.length,q=m,r=[],u=mxUtils.bind(this,function(a,b){r[a]=b;if(0==--q){this.spinner.stop();if(null!=k)k(r);else{var c=[];g.getModel().beginUpdate();
+try{for(var d=0;d<r.length;d++){var f=r[d]();null!=f&&(c=c.concat(f))}}finally{g.getModel().endUpdate()}}l(c)}}),v=0;v<m;v++)mxUtils.bind(this,function(c){var g=a[c],k=new FileReader;k.onload=mxUtils.bind(this,function(a){if(null==n||n(g))if("image/"==g.type.substring(0,6))if("image/svg"==g.type.substring(0,9)){var k=a.target.result,m=k.indexOf(","),l=atob(k.substring(m+1)),q=mxUtils.parseXml(l),l=q.getElementsByTagName("svg");if(0<l.length){var l=l[0],r=w?null:l.getAttribute("content");null!=r&&
+"<"!=r.charAt(0)&&"%"!=r.charAt(0)&&(r=unescape(window.atob?atob(r):Base64.decode(r,!0)));null!=r&&"%"==r.charAt(0)&&(r=decodeURIComponent(r));null==r||"<mxfile "!==r.substring(0,8)&&"<mxGraphModel "!==r.substring(0,14)?u(c,mxUtils.bind(this,function(){try{if(k.substring(0,m+1),null!=q){var a=q.getElementsByTagName("svg");if(0<a.length){var f=a[0],l=parseFloat(f.getAttribute("width")),n=parseFloat(f.getAttribute("height")),t=f.getAttribute("viewBox");if(null==t||0==t.length)f.setAttribute("viewBox",
+"0 0 "+l+" "+n);else if(isNaN(l)||isNaN(n)){var r=t.split(" ");3<r.length&&(l=parseFloat(r[2]),n=parseFloat(r[3]))}k=this.createSvgDataUri(mxUtils.getXml(a[0]));var y=Math.min(1,Math.min(e/Math.max(1,l)),e/Math.max(1,n));return h(k,g.type,b+c*p,d+c*p,Math.max(1,Math.round(l*y)),Math.max(1,Math.round(n*y)),g.name)}}}catch(aa){}return null})):u(c,mxUtils.bind(this,function(){return h(r,"text/xml",b+c*p,d+c*p,0,0,g.name)}))}}else{l=!1;if("image/png"==g.type){var y=w?null:this.extractGraphModelFromPng(a.target.result);
+if(null!=y&&0<y.length){var O=new Image;O.src=a.target.result;u(c,mxUtils.bind(this,function(){return h(y,"text/xml",b+c*p,d+c*p,O.width,O.height,g.name)}));l=!0}}l||(mxClient.IS_CHROMEAPP?(this.spinner.stop(),this.showError(mxResources.get("error"),mxResources.get("dragAndDropNotSupported"),mxResources.get("cancel"),mxUtils.bind(this,function(){}),null,mxResources.get("ok"),mxUtils.bind(this,function(){this.actions.get("import").funct()}))):this.loadImage(a.target.result,mxUtils.bind(this,function(k){this.resizeImage(k,
+a.target.result,mxUtils.bind(this,function(k,m,l){u(c,mxUtils.bind(this,function(){if(null!=k&&k.length<t){var n=f&&this.isResampleImage(a.target.result,x)?Math.min(1,Math.min(e/m,e/l)):1;return h(k,g.type,b+c*p,d+c*p,Math.round(m*n),Math.round(l*n),g.name)}this.handleError({message:mxResources.get("imageTooBig")});return null}))}),f,e,x)})))}else h(a.target.result,g.type,b+c*p,d+c*p,240,160,g.name,function(a){u(c,function(){return a})})});/(\.vsdx)($|\?)/i.test(g.name)||/(\.vssx)($|\?)/i.test(g.name)?
+h(null,g.type,b+c*p,d+c*p,240,160,g.name,function(a){u(c,function(){return a})},g):"image"==g.type.substring(0,5)?k.readAsDataURL(g):k.readAsText(g)})(v)});g?this.confirmImageResize(function(a){f=a;r()},q):r()};EditorUi.prototype.confirmImageResize=function(a,b){b=null!=b?b:!1;var c=null!=this.spinner&&null!=this.spinner.pause?this.spinner.pause():function(){},d=isLocalStorage||mxClient.IS_CHROMEAPP?mxSettings.getResizeImages():null,f=function(d,f){if(d||b)mxSettings.setResizeImages(d?f:null),mxSettings.save();
 c();a(f)};null==d||b?this.showDialog((new ConfirmDialog(this,mxResources.get("resizeLargeImages"),function(a){f(a,!0)},function(a){f(a,!1)},mxResources.get("resize"),mxResources.get("actualSize"),'<img style="margin-top:8px;" src="'+Editor.loResImage+'"/>','<img style="margin-top:8px;" src="'+Editor.hiResImage+'"/>',isLocalStorage||mxClient.IS_CHROMEAPP)).container,340,isLocalStorage||mxClient.IS_CHROMEAPP?220:200,!0,!0):f(!1,d)};EditorUi.prototype.parseFile=function(a,b,d){d=null!=d?d:a.name;var c=
-new FormData;c.append("format","xml");c.append("upfile",a,d);var f=new XMLHttpRequest;f.open("POST",OPEN_URL);f.onreadystatechange=function(){b(f)};f.send(c)};EditorUi.prototype.isResampleImage=function(a,b){b=null!=b?b:this.resampleThreshold;return a.length>b};EditorUi.prototype.resizeImage=function(a,b,d,e,g,l){g=null!=g?g:this.maxImageSize;var c=Math.max(1,a.width),f=Math.max(1,a.height);if(e&&this.isResampleImage(b,l))try{var h=Math.max(c/g,f/g);if(1<h){var m=Math.round(c/h),n=Math.round(f/h),
-p=document.createElement("canvas");p.width=m;p.height=n;p.getContext("2d").drawImage(a,0,0,m,n);var q=p.toDataURL();if(q.length<b.length){var u=document.createElement("canvas");u.width=m;u.height=n;var y=u.toDataURL();q!==y&&(b=q,c=m,f=n)}}}catch(C){}d(b,c,f)};EditorUi.prototype.crcTable=[];for(var e=0;256>e;e++)for(var d=e,g=0;8>g;g++)d=1==(d&1)?3988292384^d>>>1:d>>>1,EditorUi.prototype.crcTable[e]=d;EditorUi.prototype.updateCRC=function(a,b,d,e){for(var c=0;c<e;c++)a=EditorUi.prototype.crcTable[(a^
-b[d+c])&255]^a>>>8;return a};EditorUi.prototype.writeGraphModelToPng=function(a,b,d,e,g){function c(a,b){var c=m;m+=b;return a.substring(c,m)}function f(a){a=c(a,4);return a.charCodeAt(3)+(a.charCodeAt(2)<<8)+(a.charCodeAt(1)<<16)+(a.charCodeAt(0)<<24)}function h(a){return String.fromCharCode(a>>24&255,a>>16&255,a>>8&255,a&255)}a=a.substring(a.indexOf(",")+1);a=window.atob?atob(a):Base64.decode(a,!0);var m=0;if(c(a,8)!=String.fromCharCode(137)+"PNG"+String.fromCharCode(13,10,26,10))null!=g&&g();else if(c(a,
-4),"IHDR"!=c(a,4))null!=g&&g();else{c(a,17);g=a.substring(0,m);do{var n=f(a);if("IDAT"==c(a,4)){g=a.substring(0,m-8);d=d+String.fromCharCode(0)+("zTXt"==b?String.fromCharCode(0):"")+e;e=4294967295;e=this.updateCRC(e,b,0,4);e=this.updateCRC(e,d,0,d.length);g+=h(d.length)+b+d+h(e^4294967295);g+=a.substring(m-8,a.length);break}g+=a.substring(m-8,m-4+n);e=c(a,n);c(a,4)}while(n);return"data:image/png;base64,"+(window.btoa?btoa(g):Base64.encode(g,!0))}};EditorUi.prototype.extractGraphModelFromPng=function(a){var b=
-null;try{var c=a.substring(a.indexOf(",")+1),d=window.atob&&!mxClient.IS_SF?atob(c):Base64.decode(c,!0);EditorUi.parsePng(d,mxUtils.bind(this,function(a,c,f){a=d.substring(a+8,a+8+f);"zTXt"==c?(f=a.indexOf(String.fromCharCode(0)),"mxGraphModel"==a.substring(0,f)&&(a=this.editor.graph.bytesToString(pako.inflateRaw(a.substring(f+2))).replace(/\+/g," "),null!=a&&0<a.length&&(b=a))):"tEXt"==c&&(a=a.split(String.fromCharCode(0)),1<a.length&&"mxGraphModel"==a[0]&&(b=a[1]));if(null!=b||"IDAT"==c)return!0}))}catch(n){}null!=
+new FormData;c.append("format","xml");c.append("upfile",a,d);var f=new XMLHttpRequest;f.open("POST",OPEN_URL);f.onreadystatechange=function(){b(f)};f.send(c)};EditorUi.prototype.isResampleImage=function(a,b){b=null!=b?b:this.resampleThreshold;return a.length>b};EditorUi.prototype.resizeImage=function(a,b,d,e,h,l){h=null!=h?h:this.maxImageSize;var c=Math.max(1,a.width),f=Math.max(1,a.height);if(e&&this.isResampleImage(b,l))try{var g=Math.max(c/h,f/h);if(1<g){var p=Math.round(c/g),m=Math.round(f/g),
+n=document.createElement("canvas");n.width=p;n.height=m;n.getContext("2d").drawImage(a,0,0,p,m);var q=n.toDataURL();if(q.length<b.length){var u=document.createElement("canvas");u.width=p;u.height=m;var z=u.toDataURL();q!==z&&(b=q,c=p,f=m)}}}catch(C){}d(b,c,f)};EditorUi.prototype.crcTable=[];for(var e=0;256>e;e++)for(var d=e,h=0;8>h;h++)d=1==(d&1)?3988292384^d>>>1:d>>>1,EditorUi.prototype.crcTable[e]=d;EditorUi.prototype.updateCRC=function(a,b,d,e){for(var c=0;c<e;c++)a=EditorUi.prototype.crcTable[(a^
+b[d+c])&255]^a>>>8;return a};EditorUi.prototype.writeGraphModelToPng=function(a,b,d,e,h){function c(a,b){var c=p;p+=b;return a.substring(c,p)}function f(a){a=c(a,4);return a.charCodeAt(3)+(a.charCodeAt(2)<<8)+(a.charCodeAt(1)<<16)+(a.charCodeAt(0)<<24)}function g(a){return String.fromCharCode(a>>24&255,a>>16&255,a>>8&255,a&255)}a=a.substring(a.indexOf(",")+1);a=window.atob?atob(a):Base64.decode(a,!0);var p=0;if(c(a,8)!=String.fromCharCode(137)+"PNG"+String.fromCharCode(13,10,26,10))null!=h&&h();else if(c(a,
+4),"IHDR"!=c(a,4))null!=h&&h();else{c(a,17);h=a.substring(0,p);do{var m=f(a);if("IDAT"==c(a,4)){h=a.substring(0,p-8);d=d+String.fromCharCode(0)+("zTXt"==b?String.fromCharCode(0):"")+e;e=4294967295;e=this.updateCRC(e,b,0,4);e=this.updateCRC(e,d,0,d.length);h+=g(d.length)+b+d+g(e^4294967295);h+=a.substring(p-8,a.length);break}h+=a.substring(p-8,p-4+m);e=c(a,m);c(a,4)}while(m);return"data:image/png;base64,"+(window.btoa?btoa(h):Base64.encode(h,!0))}};EditorUi.prototype.extractGraphModelFromPng=function(a){var b=
+null;try{var c=a.substring(a.indexOf(",")+1),d=window.atob&&!mxClient.IS_SF?atob(c):Base64.decode(c,!0);EditorUi.parsePng(d,mxUtils.bind(this,function(a,c,f){a=d.substring(a+8,a+8+f);"zTXt"==c?(f=a.indexOf(String.fromCharCode(0)),"mxGraphModel"==a.substring(0,f)&&(a=this.editor.graph.bytesToString(pako.inflateRaw(a.substring(f+2))).replace(/\+/g," "),null!=a&&0<a.length&&(b=a))):"tEXt"==c&&(a=a.split(String.fromCharCode(0)),1<a.length&&"mxGraphModel"==a[0]&&(b=a[1]));if(null!=b||"IDAT"==c)return!0}))}catch(m){}null!=
 b&&"%"==b.charAt(0)&&(b=decodeURIComponent(b));null!=b&&"%"==b.charAt(0)&&(b=decodeURIComponent(b));return b};EditorUi.prototype.loadImage=function(a,b,d){var c=new Image;c.onload=function(){b(c)};null!=d&&(c.onerror=d);c.src=a};var l=EditorUi.prototype.init;EditorUi.prototype.init=function(){function a(a){var c=a.indexOf(",");0<c&&(a=b.getPageById(a.substring(c+1)))&&b.selectPage(a)}"undefined"!==typeof window.mxSettings&&(this.formatWidth=mxSettings.getFormatWidth());var b=this,d=this.editor.graph,
-e=b.editor.getEditBlankUrl;this.editor.getEditBlankUrl=function(a){a=null!=a?a:"";if(null!=b.pages&&null!=b.currentPage)for(var c=0;c<b.pages.length;c++)if(b.pages[c]==b.currentPage){0<c&&(a+=(0<a.length?"&":"?")+"page="+c);break}"1"==urlParams.dev&&(a+=(0<a.length?"&":"?")+"dev=1&drawdev=1");return e.apply(this,arguments)};var g=d.addClickHandler;d.addClickHandler=function(b,c,f){var e=c;c=function(b,c){if(null==c){var f=mxEvent.getSource(b);"a"==f.nodeName.toLowerCase()&&(c=f.getAttribute("href"))}null==
-c||!d.isPageLink(c)||!mxEvent.isTouchEvent(b)&&mxEvent.isPopupTrigger(b)||(a(c),mxEvent.consume(b));null!=e&&e(b,c)};g.call(this,b,c,f)};l.apply(this,arguments);mxClient.IS_SVG&&this.editor.graph.addSvgShadow(d.view.canvas.ownerSVGElement,null,!0);b.actions.get("print").funct=function(){b.showDialog((new PrintDialog(b)).container,360,null!=b.pages&&1<b.pages.length?420:360,!0,!0)};this.defaultFilename=mxResources.get("untitledDiagram");var p=d.getGlobalVariable;d.getGlobalVariable=function(a){return"page"==
-a&&null!=b.currentPage?b.currentPage.getName():"pagenumber"==a?null!=b.currentPage&&null!=b.pages?mxUtils.indexOf(b.pages,b.currentPage)+1:1:p.apply(this,arguments)};var q=d.createLinkForHint;d.createLinkForHint=function(c,f){var e=d.isPageLink(c);if(e){var h=c.indexOf(",");0<h&&(h=b.getPageById(c.substring(h+1)),f=null!=h?h.getName():mxResources.get("pageNotFound"))}h=q.call(this,c,f);e&&mxEvent.addListener(h,"click",function(b){a(c);mxEvent.consume(b)});return h};var k=d.labelLinkClicked;d.labelLinkClicked=
-function(b,c,f){var e=c.getAttribute("href");null==e||!d.isPageLink(e)||!mxEvent.isTouchEvent(f)&&mxEvent.isPopupTrigger(f)?k.apply(this,arguments):(d.isEnabled()||a(e),mxEvent.consume(f))};this.editor.getOrCreateFilename=function(){var a=b.defaultFilename,c=b.getCurrentFile();null!=c&&(a=null!=c.getTitle()?c.getTitle():a);return a};var t=this.actions.get("print");t.setEnabled(!mxClient.IS_IOS||!navigator.standalone);t.visible=t.isEnabled();if(!this.editor.chromeless||this.editor.editable){var v=
+e=b.editor.getEditBlankUrl;this.editor.getEditBlankUrl=function(a){a=null!=a?a:"";if(null!=b.pages&&null!=b.currentPage)for(var c=0;c<b.pages.length;c++)if(b.pages[c]==b.currentPage){0<c&&(a+=(0<a.length?"&":"?")+"page="+c);break}"1"==urlParams.dev&&(a+=(0<a.length?"&":"?")+"dev=1&drawdev=1");return e.apply(this,arguments)};var h=d.addClickHandler;d.addClickHandler=function(b,c,f){var e=c;c=function(b,c){if(null==c){var f=mxEvent.getSource(b);"a"==f.nodeName.toLowerCase()&&(c=f.getAttribute("href"))}null==
+c||!d.isPageLink(c)||!mxEvent.isTouchEvent(b)&&mxEvent.isPopupTrigger(b)||(a(c),mxEvent.consume(b));null!=e&&e(b,c)};h.call(this,b,c,f)};l.apply(this,arguments);mxClient.IS_SVG&&this.editor.graph.addSvgShadow(d.view.canvas.ownerSVGElement,null,!0);b.actions.get("print").funct=function(){b.showDialog((new PrintDialog(b)).container,360,null!=b.pages&&1<b.pages.length?420:360,!0,!0)};this.defaultFilename=mxResources.get("untitledDiagram");var n=d.getGlobalVariable;d.getGlobalVariable=function(a){return"page"==
+a&&null!=b.currentPage?b.currentPage.getName():"pagenumber"==a?null!=b.currentPage&&null!=b.pages?mxUtils.indexOf(b.pages,b.currentPage)+1:1:n.apply(this,arguments)};var q=d.createLinkForHint;d.createLinkForHint=function(c,f){var e=d.isPageLink(c);if(e){var g=c.indexOf(",");0<g&&(g=b.getPageById(c.substring(g+1)),f=null!=g?g.getName():mxResources.get("pageNotFound"))}g=q.call(this,c,f);e&&mxEvent.addListener(g,"click",function(b){a(c);mxEvent.consume(b)});return g};var k=d.labelLinkClicked;d.labelLinkClicked=
+function(b,c,f){var e=c.getAttribute("href");null==e||!d.isPageLink(e)||!mxEvent.isTouchEvent(f)&&mxEvent.isPopupTrigger(f)?k.apply(this,arguments):(d.isEnabled()||a(e),mxEvent.consume(f))};this.editor.getOrCreateFilename=function(){var a=b.defaultFilename,c=b.getCurrentFile();null!=c&&(a=null!=c.getTitle()?c.getTitle():a);return a};var v=this.actions.get("print");v.setEnabled(!mxClient.IS_IOS||!navigator.standalone);v.visible=v.isEnabled();if(!this.editor.chromeless||this.editor.editable){var t=
 function(){window.setTimeout(function(){x.innerHTML="&nbsp;";x.focus();document.execCommand("selectAll",!1,null)},0)};this.keyHandler.bindAction(70,!0,"find");this.keyHandler.bindAction(67,!0,"copyStyle",!0);this.keyHandler.bindAction(86,!0,"pasteStyle",!0);this.keyHandler.bindAction(77,!0,"editGeometry",!0);this.keyHandler.bindAction(88,!0,"insertText",!0);this.keyHandler.bindAction(75,!0,"insertRectangle");this.keyHandler.bindAction(75,!0,"insertEllipse",!0);mxClient.IS_IE||d.container.addEventListener("paste",
-mxUtils.bind(this,function(a){var b=this.editor.graph;if(!mxEvent.isConsumed(a))try{for(var c=a.clipboardData||a.originalEvent.clipboardData,d=!1,f=0;f<c.types.length;f++)if("text/"===c.types[f].substring(0,5)){d=!0;break}if(!d){var e=c.items;for(index in e){var h=e[index];if("file"===h.kind){if(b.isEditing())this.importFiles([h.getAsFile()],0,0,this.maxImageSize,function(a,c,d,f,e,h){b.insertImage(a,e,h)},function(){},function(a){return"image/"==a.type.substring(0,6)},function(a){for(var b=0;b<a.length;b++)a[b]()});
-else{var k=this.editor.graph.getInsertPoint();this.importFiles([h.getAsFile()],k.x,k.y,this.maxImageSize);mxEvent.consume(a)}break}}}}catch(U){}}),!1);var x=document.createElement("div");x.style.position="absolute";x.style.whiteSpace="nowrap";x.style.overflow="hidden";x.style.display="block";x.contentEditable=!0;mxUtils.setOpacity(x,0);x.style.width="1px";x.style.height="1px";x.innerHTML="&nbsp;";var w=!1;this.keyHandler.bindControlKey(88,null);this.keyHandler.bindControlKey(67,null);this.keyHandler.bindControlKey(86,
+mxUtils.bind(this,function(a){var b=this.editor.graph;if(!mxEvent.isConsumed(a))try{for(var c=a.clipboardData||a.originalEvent.clipboardData,d=!1,f=0;f<c.types.length;f++)if("text/"===c.types[f].substring(0,5)){d=!0;break}if(!d){var e=c.items;for(index in e){var g=e[index];if("file"===g.kind){if(b.isEditing())this.importFiles([g.getAsFile()],0,0,this.maxImageSize,function(a,c,d,f,e,g){b.insertImage(a,e,g)},function(){},function(a){return"image/"==a.type.substring(0,6)},function(a){for(var b=0;b<a.length;b++)a[b]()});
+else{var k=this.editor.graph.getInsertPoint();this.importFiles([g.getAsFile()],k.x,k.y,this.maxImageSize);mxEvent.consume(a)}break}}}}catch(S){}}),!1);var x=document.createElement("div");x.style.position="absolute";x.style.whiteSpace="nowrap";x.style.overflow="hidden";x.style.display="block";x.contentEditable=!0;mxUtils.setOpacity(x,0);x.style.width="1px";x.style.height="1px";x.innerHTML="&nbsp;";var w=!1;this.keyHandler.bindControlKey(88,null);this.keyHandler.bindControlKey(67,null);this.keyHandler.bindControlKey(86,
 null);mxEvent.addListener(document,"keydown",mxUtils.bind(this,function(a){var b=mxEvent.getSource(a);null==d.container||!d.isEnabled()||d.isMouseDown||d.isEditing()||null!=this.dialog||"INPUT"==b.nodeName||"TEXTAREA"==b.nodeName||!(224==a.keyCode||!mxClient.IS_MAC&&17==a.keyCode||mxClient.IS_MAC&&91==a.keyCode)||w||(x.style.left=d.container.scrollLeft+10+"px",x.style.top=d.container.scrollTop+10+"px",d.container.appendChild(x),w=!0,mxClient.IS_QUIRKS?window.setTimeout(function(){x.focus();document.execCommand("selectAll",
-!1,null)},0):(x.focus(),document.execCommand("selectAll",!1,null)))}));mxEvent.addListener(document,"keyup",mxUtils.bind(this,function(a){var b=a.keyCode;window.setTimeout(mxUtils.bind(this,function(){!w||224!=b&&17!=b&&91!=b||(w=!1,d.isEditing()||null!=this.dialog||null==d.container||d.container.focus(),x.parentNode.removeChild(x))}),0)}));mxEvent.addListener(x,"copy",mxUtils.bind(this,function(a){d.isEnabled()&&(mxClipboard.copy(d),this.copyCells(x),v())}));mxEvent.addListener(x,"cut",mxUtils.bind(this,
-function(a){d.isEnabled()&&(this.copyCells(x,!0),v())}));mxEvent.addListener(x,"paste",mxUtils.bind(this,function(a){d.isEnabled()&&!d.isCellLocked(d.getDefaultParent())&&(x.innerHTML="&nbsp;",x.focus(),window.setTimeout(mxUtils.bind(this,function(){this.pasteCells(a,x);x.innerHTML="&nbsp;"}),0))}),!0);var D=this.isSelectionAllowed;this.isSelectionAllowed=function(a){return mxEvent.getSource(a)==x?!0:D.apply(this,arguments)}}this.spinner=this.createSpinner(document.body.clientWidth/2-2,Math.max(document.body.clientHeight||
+!1,null)},0):(x.focus(),document.execCommand("selectAll",!1,null)))}));mxEvent.addListener(document,"keyup",mxUtils.bind(this,function(a){var b=a.keyCode;window.setTimeout(mxUtils.bind(this,function(){!w||224!=b&&17!=b&&91!=b||(w=!1,d.isEditing()||null!=this.dialog||null==d.container||d.container.focus(),x.parentNode.removeChild(x))}),0)}));mxEvent.addListener(x,"copy",mxUtils.bind(this,function(a){d.isEnabled()&&(mxClipboard.copy(d),this.copyCells(x),t())}));mxEvent.addListener(x,"cut",mxUtils.bind(this,
+function(a){d.isEnabled()&&(this.copyCells(x,!0),t())}));mxEvent.addListener(x,"paste",mxUtils.bind(this,function(a){d.isEnabled()&&!d.isCellLocked(d.getDefaultParent())&&(x.innerHTML="&nbsp;",x.focus(),window.setTimeout(mxUtils.bind(this,function(){this.pasteCells(a,x);x.innerHTML="&nbsp;"}),0))}),!0);var D=this.isSelectionAllowed;this.isSelectionAllowed=function(a){return mxEvent.getSource(a)==x?!0:D.apply(this,arguments)}}this.spinner=this.createSpinner(document.body.clientWidth/2-2,Math.max(document.body.clientHeight||
 0,document.documentElement.clientHeight||0)/2,24);Graph.fileSupport&&this.editor.graph.addListener(mxEvent.EDITING_STARTED,mxUtils.bind(this,function(a){var b=this.editor.graph,c=b.cellEditor.text2,d=null;null!=c&&(mxEvent.addListener(c,"dragleave",function(a){null!=d&&(d.parentNode.removeChild(d),d=null);a.stopPropagation();a.preventDefault()}),mxEvent.addListener(c,"dragover",mxUtils.bind(this,function(a){null==d&&(!mxClient.IS_IE||10<document.documentMode)&&(d=this.highlightElement(c));a.stopPropagation();
-a.preventDefault()})),mxEvent.addListener(c,"drop",mxUtils.bind(this,function(a){null!=d&&(d.parentNode.removeChild(d),d=null);if(0<a.dataTransfer.files.length)this.importFiles(a.dataTransfer.files,0,0,this.maxImageSize,function(a,c,d,f,e,h){b.insertImage(a,e,h)},function(){},function(a){return"image/"==a.type.substring(0,6)},function(a){for(var b=0;b<a.length;b++)a[b]()},mxEvent.isControlDown(a));else if(0<=mxUtils.indexOf(a.dataTransfer.types,"text/uri-list")){var c=a.dataTransfer.getData("text/uri-list");
+a.preventDefault()})),mxEvent.addListener(c,"drop",mxUtils.bind(this,function(a){null!=d&&(d.parentNode.removeChild(d),d=null);if(0<a.dataTransfer.files.length)this.importFiles(a.dataTransfer.files,0,0,this.maxImageSize,function(a,c,d,f,e,g){b.insertImage(a,e,g)},function(){},function(a){return"image/"==a.type.substring(0,6)},function(a){for(var b=0;b<a.length;b++)a[b]()},mxEvent.isControlDown(a));else if(0<=mxUtils.indexOf(a.dataTransfer.types,"text/uri-list")){var c=a.dataTransfer.getData("text/uri-list");
 /\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(c)?this.loadImage(decodeURIComponent(c),mxUtils.bind(this,function(a){var d=Math.max(1,a.width);a=Math.max(1,a.height);var f=this.maxImageSize,f=Math.min(1,Math.min(f/Math.max(1,d)),f/Math.max(1,a));b.insertImage(decodeURIComponent(c),d*f,a*f)})):document.execCommand("insertHTML",!1,a.dataTransfer.getData("text/plain"))}else 0<=mxUtils.indexOf(a.dataTransfer.types,"text/html")?document.execCommand("insertHTML",!1,a.dataTransfer.getData("text/html")):0<=mxUtils.indexOf(a.dataTransfer.types,
-"text/plain")&&document.execCommand("insertHTML",!1,a.dataTransfer.getData("text/plain"));a.stopPropagation();a.preventDefault()})))}));if("1"==urlParams.ruler&&"undefined"!==typeof mxRuler){t=document.createElement("div");t.style.position="absolute";t.style.top="95px";t.style.left="250px";t.style.width="2000px";t.style.height="30px";t.style.background="whiteSmoke";document.body.appendChild(t);var B=document.createElement("div");B.style.position="absolute";B.style.top="125px";B.style.left="220px";
-B.style.width="30px";B.style.height="1000px";B.style.background="whiteSmoke";document.body.appendChild(B);var y=document.createElement("div");y.style.position="absolute";y.style.top="95px";y.style.left="220px";y.style.width="30px";y.style.height="30px";y.style.background="whiteSmoke";document.body.appendChild(y);this.vRuler=new mxRuler(this.editor.graph,B,!0);this.hRuler=new mxRuler(this.editor.graph,t,!1)}if("1"==urlParams.test){t=document.getElementById("geFooter");null!=t&&(this.styleInput=document.createElement("input"),
-this.styleInput.setAttribute("type","text"),this.styleInput.style.position="absolute",this.styleInput.style.top="14px",this.styleInput.style.left="2px",this.styleInput.style.width="98%",this.styleInput.style.visibility="hidden",this.styleInput.style.opacity="0.9",mxEvent.addListener(this.styleInput,"change",mxUtils.bind(this,function(){this.editor.graph.getModel().setStyle(this.editor.graph.getSelectionCell(),this.styleInput.value)})),t.appendChild(this.styleInput),this.editor.graph.getSelectionModel().addListener(mxEvent.CHANGE,
-mxUtils.bind(this,function(a,b){if(0<this.editor.graph.getSelectionCount()){var c=this.editor.graph.getSelectionCell(),c=this.editor.graph.getModel().getStyle(c);this.styleInput.value=c||"";this.styleInput.style.visibility="visible"}else this.styleInput.style.visibility="hidden"})));var C=this.isSelectionAllowed;this.isSelectionAllowed=function(a){return mxEvent.getSource(a)==this.styleInput?!0:C.apply(this,arguments)}}t=document.getElementById("geInfo");null!=t&&t.parentNode.removeChild(t);if(Graph.fileSupport&&
-(!this.editor.chromeless||this.editor.editable)){var A=null;mxEvent.addListener(d.container,"dragleave",function(a){d.isEnabled()&&(null!=A&&(A.parentNode.removeChild(A),A=null),a.stopPropagation(),a.preventDefault())});mxEvent.addListener(d.container,"dragover",mxUtils.bind(this,function(a){null==A&&(!mxClient.IS_IE||10<document.documentMode)&&(A=this.highlightElement(d.container));null!=this.sidebar&&this.sidebar.hideTooltip();a.stopPropagation();a.preventDefault()}));mxEvent.addListener(d.container,
-"drop",mxUtils.bind(this,function(a){null!=A&&(A.parentNode.removeChild(A),A=null);if(d.isEnabled()){var b=mxUtils.convertPoint(d.container,mxEvent.getClientX(a),mxEvent.getClientY(a)),c=d.view.translate,f=d.view.scale,e=b.x/f-c.x,h=b.y/f-c.y;mxEvent.isAltDown(a)&&(h=e=0);if(0<a.dataTransfer.files.length)this.importFiles(a.dataTransfer.files,e,h,this.maxImageSize,null,null,null,null,mxEvent.isControlDown(a),null,null,mxEvent.isShiftDown(a));else{var k=0<=mxUtils.indexOf(a.dataTransfer.types,"text/uri-list")?
-a.dataTransfer.getData("text/uri-list"):null,b=this.extractGraphModelFromEvent(a,null!=this.pages);if(null!=b)d.setSelectionCells(this.importXml(b,e,h,!0));else if(0<=mxUtils.indexOf(a.dataTransfer.types,"text/html")){var g=a.dataTransfer.getData("text/html"),b=document.createElement("div");b.innerHTML=g;var m=null,c=b.getElementsByTagName("img");null!=c&&1==c.length?(g=c[0].getAttribute("src"),/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(g)||(m=!0)):(b=b.getElementsByTagName("a"),null!=b&&1==b.length&&
-(g=b[0].getAttribute("href")));var n=!0,l=mxUtils.bind(this,function(){d.setSelectionCells(this.insertTextAt(g,e,h,!0,m,null,n))});m&&g.length>this.resampleThreshold?this.confirmImageResize(function(a){n=a;l()},mxEvent.isControlDown(a)):l()}else null!=k&&/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(k)?this.loadImage(decodeURIComponent(k),mxUtils.bind(this,function(a){var b=Math.max(1,a.width);a=Math.max(1,a.height);var c=this.maxImageSize,c=Math.min(1,Math.min(c/Math.max(1,b)),c/Math.max(1,a));d.setSelectionCell(d.insertVertex(null,
-null,"",e,h,b*c,a*c,"shape=image;verticalLabelPosition=bottom;labelBackgroundColor=#ffffff;verticalAlign=top;aspect=fixed;imageAspect=0;image="+k+";"))}),mxUtils.bind(this,function(a){d.setSelectionCells(this.insertTextAt(k,e,h,!0))})):0<=mxUtils.indexOf(a.dataTransfer.types,"text/plain")&&d.setSelectionCells(this.insertTextAt(a.dataTransfer.getData("text/plain"),e,h,!0))}}a.stopPropagation();a.preventDefault()}),!1)}this.initPages();"1"==urlParams.embed&&this.initializeEmbedMode();"undefined"!==
-typeof window.mxSettings&&this.installSettings()};EditorUi.prototype.installSettings=function(){if(isLocalStorage||mxClient.IS_CHROMEAPP){ColorDialog.recentColors=mxSettings.getRecentColors();this.editor.graph.currentEdgeStyle=mxSettings.getCurrentEdgeStyle();this.editor.graph.currentVertexStyle=mxSettings.getCurrentVertexStyle();this.fireEvent(new mxEventObject("styleChanged","keys",[],"values",[],"cells",[]));this.addListener("styleChanged",mxUtils.bind(this,function(a,b){mxSettings.setCurrentEdgeStyle(this.editor.graph.currentEdgeStyle);
-mxSettings.setCurrentVertexStyle(this.editor.graph.currentVertexStyle);mxSettings.save()}));this.editor.graph.connectionHandler.setCreateTarget(mxSettings.isCreateTarget());this.fireEvent(new mxEventObject("copyConnectChanged"));this.addListener("copyConnectChanged",mxUtils.bind(this,function(a,b){mxSettings.setCreateTarget(this.editor.graph.connectionHandler.isCreateTarget());mxSettings.save()}));this.editor.graph.pageFormat=mxSettings.getPageFormat();this.addListener("pageFormatChanged",mxUtils.bind(this,
-function(a,b){mxSettings.setPageFormat(this.editor.graph.pageFormat);mxSettings.save()}));this.editor.graph.view.gridColor=mxSettings.getGridColor();this.addListener("gridColorChanged",mxUtils.bind(this,function(a,b){mxSettings.setGridColor(this.editor.graph.view.gridColor);mxSettings.save()}));if(mxClient.IS_CHROMEAPP||EditorUi.isElectronApp)this.editor.addListener("autosaveChanged",mxUtils.bind(this,function(a,b){mxSettings.setAutosave(this.editor.autosave);mxSettings.save()})),this.editor.autosave=
-mxSettings.getAutosave();null!=this.sidebar&&this.sidebar.showPalette("search",mxSettings.settings.search);this.editor.chromeless&&!this.editor.editable||null==this.sidebar||!(mxSettings.settings.isNew||8>=parseInt(mxSettings.settings.version||0))||(this.toggleScratchpad(),mxSettings.save());this.addListener("formatWidthChanged",function(){mxSettings.setFormatWidth(this.formatWidth);mxSettings.save()})}};EditorUi.prototype.copyCells=function(a,b){var c=this.editor.graph;if(c.isSelectionEmpty())a.innerHTML=
-"";else{var d=mxUtils.sortCells(c.model.getTopmostCells(c.getSelectionCells())),f=mxUtils.getXml(this.editor.graph.encodeCells(d));mxUtils.setTextContent(a,encodeURIComponent(f));b?(c.removeCells(d,!1),c.lastPasteXml=null):(c.lastPasteXml=f,c.pasteCounter=0);a.focus();document.execCommand("selectAll",!1,null)}};EditorUi.prototype.pasteCells=function(a,b){if(!mxEvent.isConsumed(a)){var c=b.getElementsByTagName("span");if(null!=c&&0<c.length&&"application/vnd.lucid.chart.objects"===c[0].getAttribute("data-lucid-type")){var d=
-c[0].getAttribute("data-lucid-content");null!=d&&0<d.length&&(this.importLucidChart(d,0,0),mxEvent.consume(a))}else{var d=this.editor.graph,f=mxUtils.trim(mxClient.IS_QUIRKS||8==document.documentMode?mxUtils.getTextContent(b):b.textContent),e=!1;try{var g=f.lastIndexOf("%3E");0<=g&&g<f.length-3&&(f=f.substring(0,g+3))}catch(t){}try{var c=b.getElementsByTagName("span"),k=null!=c&&0<c.length?mxUtils.trim(decodeURIComponent(c[0].textContent)):decodeURIComponent(f);this.isCompatibleString(k)&&(e=!0,f=
-k)}catch(t){}d.lastPasteXml==f?d.pasteCounter++:(d.lastPasteXml=f,d.pasteCounter=0);c=d.pasteCounter*d.gridSize;if(null!=f&&0<f.length&&(e||this.isCompatibleString(f)?d.setSelectionCells(this.importXml(f,c,c)):(e=d.getInsertPoint(),d.isMouseInsertPoint()&&(c=0,d.lastPasteXml==f&&0<d.pasteCounter&&d.pasteCounter--),d.setSelectionCells(this.insertTextAt(f,e.x+c,e.y+c,!0))),!d.isSelectionEmpty())){d.scrollCellToVisible(d.getSelectionCell());null!=this.hoverIcons&&this.hoverIcons.update(d.view.getState(d.getSelectionCell()));
-try{mxEvent.consume(a)}catch(t){}}}}};EditorUi.prototype.addFileDropHandler=function(a){if(Graph.fileSupport)for(var b=null,c=0;c<a.length;c++)mxEvent.addListener(a[c],"dragleave",function(a){null!=b&&(b.parentNode.removeChild(b),b=null);a.stopPropagation();a.preventDefault()}),mxEvent.addListener(a[c],"dragover",mxUtils.bind(this,function(a){(this.editor.graph.isEnabled()||"1"!=urlParams.embed)&&null==b&&(!mxClient.IS_IE||10<document.documentMode&&12>document.documentMode)&&(b=this.highlightElement());
-a.stopPropagation();a.preventDefault()})),mxEvent.addListener(a[c],"drop",mxUtils.bind(this,function(a){null!=b&&(b.parentNode.removeChild(b),b=null);if(this.editor.graph.isEnabled()||"1"!=urlParams.embed)if(0<a.dataTransfer.files.length)this.hideDialog(),"1"==urlParams.embed?this.importFiles(a.dataTransfer.files,0,0,this.maxImageSize,null,null,null,null,!mxEvent.isControlDown(a)&&!mxEvent.isShiftDown(a)):this.openFiles(a.dataTransfer.files,!0);else{var c=this.extractGraphModelFromEvent(a);if(null==
-c){var d=null!=a.dataTransfer?a.dataTransfer:a.clipboardData;null!=d&&(10==document.documentMode||11==document.documentMode?c=d.getData("Text"):(c=null,c=0<=mxUtils.indexOf(d.types,"text/uri-list")?a.dataTransfer.getData("text/uri-list"):0<=mxUtils.indexOf(d.types,"text/html")?d.getData("text/html"):null,null!=c&&0<c.length?(d=document.createElement("div"),d.innerHTML=c,d=d.getElementsByTagName("img"),0<d.length&&(c=d[0].getAttribute("src"))):0<=mxUtils.indexOf(d.types,"text/plain")&&(c=d.getData("text/plain"))),
-null!=c&&("data:image/png;base64,"==c.substring(0,22)?(c=this.extractGraphModelFromPng(c),null!=c&&0<c.length&&this.openLocalFile(c,null,!0)):!this.isOffline()&&this.isRemoteFileFormat(c)?(new mxXmlRequest(OPEN_URL,"format=xml&data="+encodeURIComponent(c))).send(mxUtils.bind(this,function(a){200<=a.getStatus()&&299>=a.getStatus()&&this.openLocalFile(a.getText(),null,!0)})):/^https?:\/\//.test(c)&&(null==this.getCurrentFile()?window.location.hash="#U"+encodeURIComponent(c):window.openWindow((mxClient.IS_CHROMEAPP?
-"https://www.draw.io/":"https://"+location.host+"/")+window.location.search+"#U"+encodeURIComponent(c)))))}else this.openLocalFile(c,null,!0)}a.stopPropagation();a.preventDefault()}))};EditorUi.prototype.highlightElement=function(a){var b=0,c=0,d,e;if(null==a){e=document.body;var g=document.documentElement;d=(e.clientWidth||g.clientWidth)-3;e=Math.max(e.clientHeight||0,g.clientHeight)-3}else b=a.offsetTop,c=a.offsetLeft,d=a.clientWidth,e=a.clientHeight;g=document.createElement("div");g.style.zIndex=
-mxPopupMenu.prototype.zIndex+2;g.style.border="3px dotted rgb(254, 137, 12)";g.style.pointerEvents="none";g.style.position="absolute";g.style.top=b+"px";g.style.left=c+"px";g.style.width=Math.max(0,d-3)+"px";g.style.height=Math.max(0,e-3)+"px";null!=a&&a.parentNode==this.editor.graph.container?this.editor.graph.container.appendChild(g):document.body.appendChild(g);return g};EditorUi.prototype.stringToCells=function(a){a=mxUtils.parseXml(a);var b=this.editor.extractGraphModel(a.documentElement);a=
-[];if(null!=b){var c=new mxCodec(b.ownerDocument),d=new mxGraphModel;c.decode(b,d);b=d.getChildAt(d.getRoot(),0);for(c=0;c<d.getChildCount(b);c++)a.push(d.getChildAt(b,c))}return a};EditorUi.prototype.openFiles=function(a,b){if(this.spinner.spin(document.body,mxResources.get("loading")))for(var c=0;c<a.length;c++)mxUtils.bind(this,function(a){var c=new FileReader;c.onload=mxUtils.bind(this,function(c){var d=c.target.result,f=a.name;if(null!=f&&0<f.length)if(!this.useCanvasForExport&&/(\.png)$/i.test(f)&&
-(f=f.substring(0,f.length-4)+".xml"),Graph.fileSupport&&!this.isOffline()&&(new XMLHttpRequest).upload&&this.isRemoteFileFormat(d,f))f=0<=f.lastIndexOf(".")?f.substring(0,f.lastIndexOf("."))+".xml":f+".xml",this.parseFile(a,mxUtils.bind(this,function(a){if(4==a.readyState)if(this.spinner.stop(),200<=a.status&&299>=a.status)if(a=a.responseText,"<mxlibrary"==a.substring(0,10)){null==this.getCurrentFile()&&"1"!=urlParams.embed&&this.openLocalFile(this.emptyDiagramXml,this.defaultFilename,b);null!=f&&
-".vssx"==f.toLowerCase().substring(f.length-5)&&(f=f.substring(0,filename.length-5)+".xml");try{this.loadLibrary(new LocalLibrary(this,a,f))}catch(v){this.handleError(v,mxResources.get("errorLoadingFile"))}}else this.openLocalFile(a,f,b);else this.handleError({message:mxResources.get(413==a.status?"drawingTooLarge":"invalidOrMissingFile")},mxResources.get("errorLoadingFile"))}));else if('{"state":"{\\"Properties\\":'==d.substring(0,26))/(\.json)$/i.test(f)&&(f=f.substring(0,f.length-5)+".xml"),this.openLocalFile(this.emptyDiagramXml,
-f,b),this.importLucidChart(d,0,0,null,mxUtils.bind(this,function(){this.editor.undoManager.clear();this.spinner.stop()}));else if("<mxlibrary"==c.target.result.substring(0,10)){this.spinner.stop();null==this.getCurrentFile()&&"1"!=urlParams.embed&&this.openLocalFile(this.emptyDiagramXml,this.defaultFilename,b);try{this.loadLibrary(new LocalLibrary(this,c.target.result,a.name))}catch(t){this.handleError(t,mxResources.get("errorLoadingFile"))}}else"image/png"==a.type.substring(0,9)&&(d=this.extractGraphModelFromPng(d)),
-this.spinner.stop(),this.openLocalFile(d,f,b)});c.onerror=mxUtils.bind(this,function(a){this.spinner.stop();this.handleError(a);window.openFile=null});"image"===a.type.substring(0,5)&&"image/svg"!==a.type.substring(0,9)?c.readAsDataURL(a):c.readAsText(a)})(a[c])};EditorUi.prototype.openLocalFile=function(a,b,d){var c=this.getCurrentFile(),f=mxUtils.bind(this,function(){window.openFile=null;if(null==b&&null!=this.getCurrentFile()&&this.isDiagramEmpty()){var c=mxUtils.parseXml(a);null!=c&&(this.editor.setGraphXml(c.documentElement),
-this.editor.graph.selectAll())}else this.fileLoaded(new LocalFile(this,a,b||this.defaultFilename,d))});null!=a&&0<a.length&&(null==c||!c.isModified()&&(mxClient.IS_CHROMEAPP||EditorUi.isElectronApp)?f():(mxClient.IS_CHROMEAPP||EditorUi.isElectronApp)&&null!=c&&c.isModified()?this.confirm(mxResources.get("allChangesLost"),null,f,mxResources.get("cancel"),mxResources.get("discardChanges")):(window.openFile=new OpenFile(function(){window.openFile=null}),window.openFile.setData(a,b),window.openWindow(this.getUrl(),
-null,mxUtils.bind(this,function(){this.confirm(mxResources.get("allChangesLost"),null,f,mxResources.get("cancel"),mxResources.get("discardChanges"))}))))};EditorUi.prototype.getBasenames=function(){var a={};if(null!=this.pages)for(var b=0;b<this.pages.length;b++)this.updatePageRoot(this.pages[b]),this.addBasenamesForCell(this.pages[b].root,a);else this.addBasenamesForCell(this.editor.graph.model.getRoot(),a);var b=[],d;for(d in a)b.push(d);return b};EditorUi.prototype.addBasenamesForCell=function(a,
-b){function c(a){if(null!=a){var c=a.lastIndexOf(".");0<c&&(a=a.substring(c+1,a.length));null==b[a]&&(b[a]=!0)}}var d=this.editor.graph,f=d.getCellStyle(a);c(mxStencilRegistry.getBasenameForStencil(f[mxConstants.STYLE_SHAPE]));d.model.isEdge(a)&&(c(mxMarker.getPackageForType(f[mxConstants.STYLE_STARTARROW])),c(mxMarker.getPackageForType(f[mxConstants.STYLE_ENDARROW])));for(var f=d.model.getChildCount(a),e=0;e<f;e++)this.addBasenamesForCell(d.model.getChildAt(a,e),b)};EditorUi.prototype.setGraphEnabled=
-function(a){this.diagramContainer.style.visibility=a?"":"hidden";this.formatContainer.style.visibility=a?"":"hidden";this.sidebarFooterContainer.style.display=a?"":"none";this.sidebarContainer.style.display=a?"":"none";this.hsplit.style.display=a?"":"none";this.editor.graph.setEnabled(a);null!=this.tabContainer&&(this.tabContainer.style.visibility=a?"":"hidden")};EditorUi.prototype.initializeEmbedMode=function(){this.setGraphEnabled(!1);(window.opener||window.parent)!=window&&("1"!=urlParams.spin||
-this.spinner.spin(document.body,mxResources.get("loading")))&&this.installMessageHandler(mxUtils.bind(this,function(a,b,d){this.spinner.stop();this.addEmbedButtons();this.setGraphEnabled(!0);null!=a&&0<a.length?(this.setFileData(a),this.editor.chromeless?this.editor.graph.lightbox&&this.lightboxFit():this.showLayersDialog(),this.chromelessResize&&this.chromelessResize()):(this.editor.graph.model.clear(),this.editor.fireEvent(new mxEventObject("resetGraphView")));this.editor.undoManager.clear();this.editor.modified=
-null!=d?d:!1;this.updateUi();window.self!==window.top&&window.focus();null!=this.format&&this.format.refresh()}))};EditorUi.prototype.showLayersDialog=function(){1<this.editor.graph.getModel().getChildCount(this.editor.graph.getModel().getRoot())&&(null==this.actions.layersWindow?this.actions.get("layers").funct():this.actions.layersWindow.window.setVisible(!0))};EditorUi.prototype.getPublicUrl=function(a,b){null!=a?a.getPublicUrl(b):b(null)};EditorUi.prototype.createLoadMessage=function(a){var b=
-this.editor.graph;return{event:a,pageVisible:b.pageVisible,translate:b.view.translate,scale:b.view.scale,page:b.view.getBackgroundPageBounds(),bounds:b.getGraphBounds()}};EditorUi.prototype.installMessageHandler=function(a){var b=null,c=!1,d=!1,e=null,g=mxUtils.bind(this,function(a,b){this.editor.modified&&"0"!=urlParams.modified?null!=urlParams.modified&&this.editor.setStatus(mxUtils.htmlEntities(mxResources.get(urlParams.modified))):this.editor.setStatus("")});this.editor.graph.model.addListener(mxEvent.CHANGE,
-g);mxEvent.addListener(window,"message",mxUtils.bind(this,function(f){function h(a){if(null!=a&&"function"===typeof a.charAt&&"<"!=a.charAt(0))try{"data:image/svg+xml;base64,"==a.substring(0,26)?a=atob(a.substring(26)):"data:image/svg+xml;utf8,"==a.substring(0,24)&&(a=a.substring(24)),null!=a&&("%"==a.charAt(0)?a=decodeURIComponent(a):"<"!=a.charAt(0)&&(a=this.editor.graph.decompress(a)))}catch(N){}return a}var g=f.data;if("json"==urlParams.proto){try{g=JSON.parse(g)}catch(T){g=null}if(null==g)return;
-if("dialog"==g.action){this.showError(null!=g.titleKey?mxResources.get(g.titleKey):g.title,null!=g.messageKey?mxResources.get(g.messageKey):g.message,null!=g.buttonKey?mxResources.get(g.buttonKey):g.button);null!=g.modified&&(this.editor.modified=g.modified);return}if("prompt"==g.action){this.spinner.stop();var k=new FilenameDialog(this,g.defaultValue||"",null!=g.okKey?mxResources.get(g.okKey):null,function(a){null!=a&&l.postMessage(JSON.stringify({event:"prompt",value:a,message:g}),"*")},null!=g.titleKey?
-mxResources.get(g.titleKey):g.title);this.showDialog(k.container,300,80,!0,!1);k.init();return}if("draft"==g.action){k=null;k="data:image/png;base64,"==g.xml.substring(0,22)?this.extractGraphModelFromPng(g.xml):h(g.xml);this.spinner.stop();k=new DraftDialog(this,mxResources.get("draftFound",[g.name||this.defaultFilename]),k,mxUtils.bind(this,function(){this.hideDialog();l.postMessage(JSON.stringify({event:"draft",result:"edit",message:g}),"*")}),mxUtils.bind(this,function(){this.hideDialog();l.postMessage(JSON.stringify({event:"draft",
-result:"discard",message:g}),"*")}),g.editKey?mxResources.get(g.editKey):null,g.discardKey?mxResources.get(g.discardKey):null,g.ignore?mxUtils.bind(this,function(){this.hideDialog();l.postMessage(JSON.stringify({event:"draft",result:"ignore",message:g}),"*")}):null);this.showDialog(k.container,640,480,!0,!1,mxUtils.bind(this,function(a){a&&this.actions.get("exit").funct()}));try{k.init()}catch(T){l.postMessage(JSON.stringify({event:"draft",error:T.toString(),message:g}),"*")}return}if("template"==
-g.action){this.spinner.stop();k=new NewDialog(this,!1,null!=g.callback,mxUtils.bind(this,function(b,c){b=b||this.emptyDiagramXml;null!=g.callback?l.postMessage(JSON.stringify({event:"template",xml:b,blank:b==this.emptyDiagramXml,name:c}),"*"):(a(b,f,b!=this.emptyDiagramXml),this.editor.modified||this.editor.setStatus(""))}));this.showDialog(k.container,620,440,!0,!1,mxUtils.bind(this,function(a){a&&this.actions.get("exit").funct()}));k.init();return}if("status"==g.action){null!=g.messageKey?this.editor.setStatus(mxUtils.htmlEntities(mxResources.get(g.messageKey))):
-null!=g.message&&this.editor.setStatus(mxUtils.htmlEntities(g.message));null!=g.modified&&(this.editor.modified=g.modified);return}if("spinner"==g.action){var m=null!=g.messageKey?mxResources.get(g.messageKey):g.message;null==g.show||g.show?this.spinner.spin(document.body,m):this.spinner.stop();return}if("export"==g.action){if("png"==g.format||"xmlpng"==g.format){if(null==g.spin&&null==g.spinKey||this.spinner.spin(document.body,null!=g.spinKey?mxResources.get(g.spinKey):g.spin)){var p=null!=g.xml?
-g.xml:this.getFileData(!0);this.editor.graph.setEnabled(!1);var n=this.editor.graph,q=mxUtils.bind(this,function(a){this.editor.graph.setEnabled(!0);this.spinner.stop();var b=this.createLoadMessage("export");b.format=g.format;b.message=g;b.data=a;b.xml=encodeURIComponent(p);l.postMessage(JSON.stringify(b),"*")}),r=mxUtils.bind(this,function(a){null==a&&(a=Editor.blankImage);"xmlpng"==g.format&&(a=this.writeGraphModelToPng(a,"zTXt","mxGraphModel",atob(this.editor.graph.compress(p))));n!=this.editor.graph&&
-n.container.parentNode.removeChild(n.container);q(a)});if(this.isExportToCanvas()){if(null!=this.pages&&this.currentPage!=this.pages[0]){var n=this.createTemporaryGraph(n.getStylesheet()),u=n.getGlobalVariable,F=this.pages[0];n.getGlobalVariable=function(a){return"page"==a?F.getName():"pagenumber"==a?1:u.apply(this,arguments)};document.body.appendChild(n.container);n.model.setRoot(F.root)}this.exportToCanvas(mxUtils.bind(this,function(a){r(a.toDataURL("image/png"))}),null,null,null,mxUtils.bind(this,
-function(){r(null)}),null,null,null,null,null,null,n)}else(new mxXmlRequest(EXPORT_URL,"format=png&embedXml="+("xmlpng"==g.format?"1":"0")+"&base64=1&xml="+encodeURIComponent(encodeURIComponent(p)))).send(mxUtils.bind(this,function(a){200<=a.getStatus()&&299>=a.getStatus()?q("data:image/png;base64,"+a.getText()):r(null)}),mxUtils.bind(this,function(){r(null)}))}}else{null!=g.xml&&0<g.xml.length&&this.setFileData(g.xml);m=this.createLoadMessage("export");if("html2"==g.format||"html"==g.format&&("0"!=
-urlParams.pages||null!=this.pages&&1<this.pages.length))k=this.getXmlFileData(),m.xml=mxUtils.getXml(k),m.data=this.getFileData(null,null,!0,null,null,null,k),m.format=g.format;else if("html"==g.format)p=this.editor.getGraphXml(),m.data=this.getHtml(p,this.editor.graph),m.xml=mxUtils.getXml(p),m.format=g.format;else{mxSvgCanvas2D.prototype.foAltText=null;k=this.editor.graph.background;k==mxConstants.NONE&&(k=null);m.xml=this.getFileData(!0);m.format="svg";if(g.embedImages||null==g.embedImages){if(null==
-g.spin&&null==g.spinKey||this.spinner.spin(document.body,null!=g.spinKey?mxResources.get(g.spinKey):g.spin))this.editor.graph.setEnabled(!1),"xmlsvg"==g.format?this.getEmbeddedSvg(m.xml,this.editor.graph,null,!0,mxUtils.bind(this,function(a){this.editor.graph.setEnabled(!0);this.spinner.stop();m.data=this.createSvgDataUri(a);l.postMessage(JSON.stringify(m),"*")})):this.convertImages(this.editor.graph.getSvg(k),mxUtils.bind(this,function(a){this.editor.graph.setEnabled(!0);this.spinner.stop();m.data=
-this.createSvgDataUri(mxUtils.getXml(a));l.postMessage(JSON.stringify(m),"*")}));return}k="xmlsvg"==g.format?this.getEmbeddedSvg(this.getFileData(!0),this.editor.graph,null,!0):mxUtils.getXml(this.editor.graph.getSvg(k));m.data=this.createSvgDataUri(k)}l.postMessage(JSON.stringify(m),"*")}return}if("create"==g.action&&this.createFile){if("trello"==g.mode){var z=mxUtils.bind(this,function(a){this.createFile(g.name,a||this.getFileData(/(\.xml)$/i.test(name)||0>name.indexOf("."),/(\.svg)$/i.test(name),
-/(\.html)$/i.test(name)),null,g.mode,null,!0,g.folder)}),J=mxUtils.bind(this,function(){null!=g.template?this.trello.getFile(g.folder+this.trello.SEPARATOR+g.template,function(a){z(a.getData())},function(){z()}):z()});if(null==this.trello){var I=function(){null!=this.trello&&(this.removeListener(I),J())};this.addListener("clientLoaded",I)}else J()}return}if("load"==g.action)d=1==g.autosave,this.hideDialog(),null!=g.modified&&null==urlParams.modified&&(urlParams.modified=g.modified),null!=g.saveAndExit&&
-null==urlParams.saveAndExit&&(urlParams.saveAndExit=g.saveAndExit),null!=g.title&&null!=this.buttonContainer&&(k=document.createElement("span"),mxUtils.write(k,g.title),"atlas"==uiTheme?(this.buttonContainer.style.paddingRight="12px",this.buttonContainer.style.paddingTop="12px"):(this.buttonContainer.style.paddingRight="38px",this.buttonContainer.style.paddingTop="6px"),null!=this.embedFilenameSpan&&this.embedFilenameSpan.parentNode.removeChild(this.embedFilenameSpan),this.buttonContainer.appendChild(k),
-this.embedFilenameSpan=k),g=null!=g.xmlpng?this.extractGraphModelFromPng(g.xmlpng):null!=g.xml&&"data:image/png;base64,"==g.xml.substring(0,22)?this.extractGraphModelFromPng(g.xml):g.xml;else{l.postMessage(JSON.stringify({error:"unknownMessage",data:JSON.stringify(g)}),"*");return}}g=h(g);c=!0;try{a(g,f)}catch(T){this.handleError(T)}c=!1;null!=urlParams.modified&&this.editor.setStatus("");var H=mxUtils.bind(this,function(){return"0"!=urlParams.pages||null!=this.pages&&1<this.pages.length?this.getFileData(!0):
-mxUtils.getXml(this.editor.getGraphXml())});e=H();d&&null==b&&(b=mxUtils.bind(this,function(a,b){var d=H();if(d!=e&&!c){var f=this.createLoadMessage("autosave");f.xml=d;d=JSON.stringify(f);(window.opener||window.parent).postMessage(d,"*")}e=d}),this.editor.graph.model.addListener(mxEvent.CHANGE,b),this.editor.graph.addListener("gridSizeChanged",b),this.editor.graph.addListener("shadowVisibleChanged",b),this.addListener("pageFormatChanged",b),this.addListener("pageScaleChanged",b),this.addListener("backgroundColorChanged",
-b),this.addListener("backgroundImageChanged",b),this.addListener("foldingEnabledChanged",b),this.addListener("mathEnabledChanged",b),this.addListener("gridEnabledChanged",b),this.addListener("guidesEnabledChanged",b),this.addListener("pageViewChanged",b));"1"!=urlParams.returnbounds&&"json"!=urlParams.proto||l.postMessage(JSON.stringify(this.createLoadMessage("load")),"*")}));var l=window.opener||window.parent,g="json"==urlParams.proto?JSON.stringify({event:"init"}):urlParams.ready||"ready";l.postMessage(g,
+"text/plain")&&document.execCommand("insertHTML",!1,a.dataTransfer.getData("text/plain"));a.stopPropagation();a.preventDefault()})))}));if("1"==urlParams.ruler&&"undefined"!==typeof mxRuler){v=document.createElement("div");v.style.position="absolute";v.style.top="95px";v.style.left="250px";v.style.width="2000px";v.style.height="30px";v.style.background="whiteSmoke";document.body.appendChild(v);var A=document.createElement("div");A.style.position="absolute";A.style.top="125px";A.style.left="220px";
+A.style.width="30px";A.style.height="1000px";A.style.background="whiteSmoke";document.body.appendChild(A);var z=document.createElement("div");z.style.position="absolute";z.style.top="95px";z.style.left="220px";z.style.width="30px";z.style.height="30px";z.style.background="whiteSmoke";document.body.appendChild(z);this.vRuler=new mxRuler(this.editor.graph,A,!0);this.hRuler=new mxRuler(this.editor.graph,v,!1)}if("1"==urlParams.test){v=document.getElementById("geFooter");null!=v&&(this.styleInput=document.createElement("input"),
+this.styleInput.setAttribute("type","text"),this.styleInput.style.position="absolute",this.styleInput.style.top="14px",this.styleInput.style.left="2px",this.styleInput.style.width="98%",this.styleInput.style.visibility="hidden",this.styleInput.style.opacity="0.9",mxEvent.addListener(this.styleInput,"change",mxUtils.bind(this,function(){this.editor.graph.getModel().setStyle(this.editor.graph.getSelectionCell(),this.styleInput.value)})),v.appendChild(this.styleInput),this.editor.graph.getSelectionModel().addListener(mxEvent.CHANGE,
+mxUtils.bind(this,function(a,b){if(0<this.editor.graph.getSelectionCount()){var c=this.editor.graph.getSelectionCell(),c=this.editor.graph.getModel().getStyle(c);this.styleInput.value=c||"";this.styleInput.style.visibility="visible"}else this.styleInput.style.visibility="hidden"})));var C=this.isSelectionAllowed;this.isSelectionAllowed=function(a){return mxEvent.getSource(a)==this.styleInput?!0:C.apply(this,arguments)}}v=document.getElementById("geInfo");null!=v&&v.parentNode.removeChild(v);if(Graph.fileSupport&&
+(!this.editor.chromeless||this.editor.editable)){var B=null;mxEvent.addListener(d.container,"dragleave",function(a){d.isEnabled()&&(null!=B&&(B.parentNode.removeChild(B),B=null),a.stopPropagation(),a.preventDefault())});mxEvent.addListener(d.container,"dragover",mxUtils.bind(this,function(a){null==B&&(!mxClient.IS_IE||10<document.documentMode)&&(B=this.highlightElement(d.container));null!=this.sidebar&&this.sidebar.hideTooltip();a.stopPropagation();a.preventDefault()}));mxEvent.addListener(d.container,
+"drop",mxUtils.bind(this,function(a){null!=B&&(B.parentNode.removeChild(B),B=null);if(d.isEnabled()){var b=mxUtils.convertPoint(d.container,mxEvent.getClientX(a),mxEvent.getClientY(a)),c=d.view.translate,f=d.view.scale,e=b.x/f-c.x,g=b.y/f-c.y;mxEvent.isAltDown(a)&&(g=e=0);if(0<a.dataTransfer.files.length)this.importFiles(a.dataTransfer.files,e,g,this.maxImageSize,null,null,null,null,mxEvent.isControlDown(a),null,null,mxEvent.isShiftDown(a));else{var k=0<=mxUtils.indexOf(a.dataTransfer.types,"text/uri-list")?
+a.dataTransfer.getData("text/uri-list"):null,b=this.extractGraphModelFromEvent(a,null!=this.pages);if(null!=b)d.setSelectionCells(this.importXml(b,e,g,!0));else if(0<=mxUtils.indexOf(a.dataTransfer.types,"text/html")){var h=a.dataTransfer.getData("text/html"),b=document.createElement("div");b.innerHTML=h;var p=null,c=b.getElementsByTagName("img");null!=c&&1==c.length?(h=c[0].getAttribute("src"),/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(h)||(p=!0)):(b=b.getElementsByTagName("a"),null!=b&&1==b.length&&
+(h=b[0].getAttribute("href")));var m=!0,l=mxUtils.bind(this,function(){d.setSelectionCells(this.insertTextAt(h,e,g,!0,p,null,m))});p&&h.length>this.resampleThreshold?this.confirmImageResize(function(a){m=a;l()},mxEvent.isControlDown(a)):l()}else null!=k&&/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(k)?this.loadImage(decodeURIComponent(k),mxUtils.bind(this,function(a){var b=Math.max(1,a.width);a=Math.max(1,a.height);var c=this.maxImageSize,c=Math.min(1,Math.min(c/Math.max(1,b)),c/Math.max(1,a));d.setSelectionCell(d.insertVertex(null,
+null,"",e,g,b*c,a*c,"shape=image;verticalLabelPosition=bottom;labelBackgroundColor=#ffffff;verticalAlign=top;aspect=fixed;imageAspect=0;image="+k+";"))}),mxUtils.bind(this,function(a){d.setSelectionCells(this.insertTextAt(k,e,g,!0))})):0<=mxUtils.indexOf(a.dataTransfer.types,"text/plain")&&d.setSelectionCells(this.insertTextAt(a.dataTransfer.getData("text/plain"),e,g,!0))}}a.stopPropagation();a.preventDefault()}),!1)}this.initPages();"1"==urlParams.embed&&this.initializeEmbedMode();this.installSettings()};
+EditorUi.prototype.isSettingsEnabled=function(){return"undefined"!==typeof window.mxSettings&&(isLocalStorage||mxClient.IS_CHROMEAPP)};EditorUi.prototype.installSettings=function(){if(this.isSettingsEnabled()){ColorDialog.recentColors=mxSettings.getRecentColors();this.editor.graph.currentEdgeStyle=mxSettings.getCurrentEdgeStyle();this.editor.graph.currentVertexStyle=mxSettings.getCurrentVertexStyle();this.fireEvent(new mxEventObject("styleChanged","keys",[],"values",[],"cells",[]));this.addListener("styleChanged",
+mxUtils.bind(this,function(a,b){mxSettings.setCurrentEdgeStyle(this.editor.graph.currentEdgeStyle);mxSettings.setCurrentVertexStyle(this.editor.graph.currentVertexStyle);mxSettings.save()}));this.editor.graph.connectionHandler.setCreateTarget(mxSettings.isCreateTarget());this.fireEvent(new mxEventObject("copyConnectChanged"));this.addListener("copyConnectChanged",mxUtils.bind(this,function(a,b){mxSettings.setCreateTarget(this.editor.graph.connectionHandler.isCreateTarget());mxSettings.save()}));this.editor.graph.pageFormat=
+mxSettings.getPageFormat();this.addListener("pageFormatChanged",mxUtils.bind(this,function(a,b){mxSettings.setPageFormat(this.editor.graph.pageFormat);mxSettings.save()}));this.editor.graph.view.gridColor=mxSettings.getGridColor();this.addListener("gridColorChanged",mxUtils.bind(this,function(a,b){mxSettings.setGridColor(this.editor.graph.view.gridColor);mxSettings.save()}));if(mxClient.IS_CHROMEAPP||EditorUi.isElectronApp)this.editor.addListener("autosaveChanged",mxUtils.bind(this,function(a,b){mxSettings.setAutosave(this.editor.autosave);
+mxSettings.save()})),this.editor.autosave=mxSettings.getAutosave();null!=this.sidebar&&this.sidebar.showPalette("search",mxSettings.settings.search);this.editor.chromeless&&!this.editor.editable||null==this.sidebar||!(mxSettings.settings.isNew||8>=parseInt(mxSettings.settings.version||0))||(this.toggleScratchpad(),mxSettings.save());this.addListener("formatWidthChanged",function(){mxSettings.setFormatWidth(this.formatWidth);mxSettings.save()})}};EditorUi.prototype.copyCells=function(a,b){var c=this.editor.graph;
+if(c.isSelectionEmpty())a.innerHTML="";else{var d=mxUtils.sortCells(c.model.getTopmostCells(c.getSelectionCells())),f=mxUtils.getXml(this.editor.graph.encodeCells(d));mxUtils.setTextContent(a,encodeURIComponent(f));b?(c.removeCells(d,!1),c.lastPasteXml=null):(c.lastPasteXml=f,c.pasteCounter=0);a.focus();document.execCommand("selectAll",!1,null)}};EditorUi.prototype.pasteCells=function(a,b){if(!mxEvent.isConsumed(a)){var c=b.getElementsByTagName("span");if(null!=c&&0<c.length&&"application/vnd.lucid.chart.objects"===
+c[0].getAttribute("data-lucid-type")){var d=c[0].getAttribute("data-lucid-content");null!=d&&0<d.length&&(this.importLucidChart(d,0,0),mxEvent.consume(a))}else{var d=this.editor.graph,f=mxUtils.trim(mxClient.IS_QUIRKS||8==document.documentMode?mxUtils.getTextContent(b):b.textContent),e=!1;try{var h=f.lastIndexOf("%3E");0<=h&&h<f.length-3&&(f=f.substring(0,h+3))}catch(v){}try{var c=b.getElementsByTagName("span"),k=null!=c&&0<c.length?mxUtils.trim(decodeURIComponent(c[0].textContent)):decodeURIComponent(f);
+this.isCompatibleString(k)&&(e=!0,f=k)}catch(v){}d.lastPasteXml==f?d.pasteCounter++:(d.lastPasteXml=f,d.pasteCounter=0);c=d.pasteCounter*d.gridSize;if(null!=f&&0<f.length&&(e||this.isCompatibleString(f)?d.setSelectionCells(this.importXml(f,c,c)):(e=d.getInsertPoint(),d.isMouseInsertPoint()&&(c=0,d.lastPasteXml==f&&0<d.pasteCounter&&d.pasteCounter--),d.setSelectionCells(this.insertTextAt(f,e.x+c,e.y+c,!0))),!d.isSelectionEmpty())){d.scrollCellToVisible(d.getSelectionCell());null!=this.hoverIcons&&
+this.hoverIcons.update(d.view.getState(d.getSelectionCell()));try{mxEvent.consume(a)}catch(v){}}}}};EditorUi.prototype.addFileDropHandler=function(a){if(Graph.fileSupport)for(var b=null,c=0;c<a.length;c++)mxEvent.addListener(a[c],"dragleave",function(a){null!=b&&(b.parentNode.removeChild(b),b=null);a.stopPropagation();a.preventDefault()}),mxEvent.addListener(a[c],"dragover",mxUtils.bind(this,function(a){(this.editor.graph.isEnabled()||"1"!=urlParams.embed)&&null==b&&(!mxClient.IS_IE||10<document.documentMode&&
+12>document.documentMode)&&(b=this.highlightElement());a.stopPropagation();a.preventDefault()})),mxEvent.addListener(a[c],"drop",mxUtils.bind(this,function(a){null!=b&&(b.parentNode.removeChild(b),b=null);if(this.editor.graph.isEnabled()||"1"!=urlParams.embed)if(0<a.dataTransfer.files.length)this.hideDialog(),"1"==urlParams.embed?this.importFiles(a.dataTransfer.files,0,0,this.maxImageSize,null,null,null,null,!mxEvent.isControlDown(a)&&!mxEvent.isShiftDown(a)):this.openFiles(a.dataTransfer.files,!0);
+else{var c=this.extractGraphModelFromEvent(a);if(null==c){var d=null!=a.dataTransfer?a.dataTransfer:a.clipboardData;null!=d&&(10==document.documentMode||11==document.documentMode?c=d.getData("Text"):(c=null,c=0<=mxUtils.indexOf(d.types,"text/uri-list")?a.dataTransfer.getData("text/uri-list"):0<=mxUtils.indexOf(d.types,"text/html")?d.getData("text/html"):null,null!=c&&0<c.length?(d=document.createElement("div"),d.innerHTML=c,d=d.getElementsByTagName("img"),0<d.length&&(c=d[0].getAttribute("src"))):
+0<=mxUtils.indexOf(d.types,"text/plain")&&(c=d.getData("text/plain"))),null!=c&&("data:image/png;base64,"==c.substring(0,22)?(c=this.extractGraphModelFromPng(c),null!=c&&0<c.length&&this.openLocalFile(c,null,!0)):!this.isOffline()&&this.isRemoteFileFormat(c)?(new mxXmlRequest(OPEN_URL,"format=xml&data="+encodeURIComponent(c))).send(mxUtils.bind(this,function(a){200<=a.getStatus()&&299>=a.getStatus()&&this.openLocalFile(a.getText(),null,!0)})):/^https?:\/\//.test(c)&&(null==this.getCurrentFile()?window.location.hash=
+"#U"+encodeURIComponent(c):window.openWindow((mxClient.IS_CHROMEAPP?"https://www.draw.io/":"https://"+location.host+"/")+window.location.search+"#U"+encodeURIComponent(c)))))}else this.openLocalFile(c,null,!0)}a.stopPropagation();a.preventDefault()}))};EditorUi.prototype.highlightElement=function(a){var b=0,c=0,d,e;if(null==a){e=document.body;var h=document.documentElement;d=(e.clientWidth||h.clientWidth)-3;e=Math.max(e.clientHeight||0,h.clientHeight)-3}else b=a.offsetTop,c=a.offsetLeft,d=a.clientWidth,
+e=a.clientHeight;h=document.createElement("div");h.style.zIndex=mxPopupMenu.prototype.zIndex+2;h.style.border="3px dotted rgb(254, 137, 12)";h.style.pointerEvents="none";h.style.position="absolute";h.style.top=b+"px";h.style.left=c+"px";h.style.width=Math.max(0,d-3)+"px";h.style.height=Math.max(0,e-3)+"px";null!=a&&a.parentNode==this.editor.graph.container?this.editor.graph.container.appendChild(h):document.body.appendChild(h);return h};EditorUi.prototype.stringToCells=function(a){a=mxUtils.parseXml(a);
+var b=this.editor.extractGraphModel(a.documentElement);a=[];if(null!=b){var c=new mxCodec(b.ownerDocument),d=new mxGraphModel;c.decode(b,d);b=d.getChildAt(d.getRoot(),0);for(c=0;c<d.getChildCount(b);c++)a.push(d.getChildAt(b,c))}return a};EditorUi.prototype.openFiles=function(a,b){if(this.spinner.spin(document.body,mxResources.get("loading")))for(var c=0;c<a.length;c++)mxUtils.bind(this,function(a){var c=new FileReader;c.onload=mxUtils.bind(this,function(c){var d=c.target.result,e=a.name;if(null!=
+e&&0<e.length)if(!this.useCanvasForExport&&/(\.png)$/i.test(e)&&(e=e.substring(0,e.length-4)+".xml"),Graph.fileSupport&&!this.isOffline()&&(new XMLHttpRequest).upload&&this.isRemoteFileFormat(d,e))e=0<=e.lastIndexOf(".")?e.substring(0,e.lastIndexOf("."))+".xml":e+".xml",this.parseFile(a,mxUtils.bind(this,function(a){if(4==a.readyState)if(this.spinner.stop(),200<=a.status&&299>=a.status)if(a=a.responseText,"<mxlibrary"==a.substring(0,10)){null==this.getCurrentFile()&&"1"!=urlParams.embed&&this.openLocalFile(this.emptyDiagramXml,
+this.defaultFilename,b);null!=e&&".vssx"==e.toLowerCase().substring(e.length-5)&&(e=e.substring(0,filename.length-5)+".xml");try{this.loadLibrary(new LocalLibrary(this,a,e))}catch(t){this.handleError(t,mxResources.get("errorLoadingFile"))}}else this.openLocalFile(a,e,b);else this.handleError({message:mxResources.get(413==a.status?"drawingTooLarge":"invalidOrMissingFile")},mxResources.get("errorLoadingFile"))}));else if('{"state":"{\\"Properties\\":'==d.substring(0,26))/(\.json)$/i.test(e)&&(e=e.substring(0,
+e.length-5)+".xml"),this.openLocalFile(this.emptyDiagramXml,e,b),this.importLucidChart(d,0,0,null,mxUtils.bind(this,function(){this.editor.undoManager.clear();this.spinner.stop()}));else if("<mxlibrary"==c.target.result.substring(0,10)){this.spinner.stop();null==this.getCurrentFile()&&"1"!=urlParams.embed&&this.openLocalFile(this.emptyDiagramXml,this.defaultFilename,b);try{this.loadLibrary(new LocalLibrary(this,c.target.result,a.name))}catch(v){this.handleError(v,mxResources.get("errorLoadingFile"))}}else"image/png"==
+a.type.substring(0,9)&&(d=this.extractGraphModelFromPng(d)),this.spinner.stop(),this.openLocalFile(d,e,b)});c.onerror=mxUtils.bind(this,function(a){this.spinner.stop();this.handleError(a);window.openFile=null});"image"===a.type.substring(0,5)&&"image/svg"!==a.type.substring(0,9)?c.readAsDataURL(a):c.readAsText(a)})(a[c])};EditorUi.prototype.openLocalFile=function(a,b,d){var c=this.getCurrentFile(),e=mxUtils.bind(this,function(){window.openFile=null;if(null==b&&null!=this.getCurrentFile()&&this.isDiagramEmpty()){var c=
+mxUtils.parseXml(a);null!=c&&(this.editor.setGraphXml(c.documentElement),this.editor.graph.selectAll())}else this.fileLoaded(new LocalFile(this,a,b||this.defaultFilename,d))});null!=a&&0<a.length&&(null==c||!c.isModified()&&(mxClient.IS_CHROMEAPP||EditorUi.isElectronApp)?e():(mxClient.IS_CHROMEAPP||EditorUi.isElectronApp)&&null!=c&&c.isModified()?this.confirm(mxResources.get("allChangesLost"),null,e,mxResources.get("cancel"),mxResources.get("discardChanges")):(window.openFile=new OpenFile(function(){window.openFile=
+null}),window.openFile.setData(a,b),window.openWindow(this.getUrl(),null,mxUtils.bind(this,function(){this.confirm(mxResources.get("allChangesLost"),null,e,mxResources.get("cancel"),mxResources.get("discardChanges"))}))))};EditorUi.prototype.getBasenames=function(){var a={};if(null!=this.pages)for(var b=0;b<this.pages.length;b++)this.updatePageRoot(this.pages[b]),this.addBasenamesForCell(this.pages[b].root,a);else this.addBasenamesForCell(this.editor.graph.model.getRoot(),a);var b=[],d;for(d in a)b.push(d);
+return b};EditorUi.prototype.addBasenamesForCell=function(a,b){function c(a){if(null!=a){var c=a.lastIndexOf(".");0<c&&(a=a.substring(c+1,a.length));null==b[a]&&(b[a]=!0)}}var d=this.editor.graph,e=d.getCellStyle(a);c(mxStencilRegistry.getBasenameForStencil(e[mxConstants.STYLE_SHAPE]));d.model.isEdge(a)&&(c(mxMarker.getPackageForType(e[mxConstants.STYLE_STARTARROW])),c(mxMarker.getPackageForType(e[mxConstants.STYLE_ENDARROW])));for(var e=d.model.getChildCount(a),f=0;f<e;f++)this.addBasenamesForCell(d.model.getChildAt(a,
+f),b)};EditorUi.prototype.setGraphEnabled=function(a){this.diagramContainer.style.visibility=a?"":"hidden";this.formatContainer.style.visibility=a?"":"hidden";this.sidebarFooterContainer.style.display=a?"":"none";this.sidebarContainer.style.display=a?"":"none";this.hsplit.style.display=a?"":"none";this.editor.graph.setEnabled(a);null!=this.tabContainer&&(this.tabContainer.style.visibility=a?"":"hidden")};EditorUi.prototype.initializeEmbedMode=function(){this.setGraphEnabled(!1);(window.opener||window.parent)!=
+window&&("1"!=urlParams.spin||this.spinner.spin(document.body,mxResources.get("loading")))&&this.installMessageHandler(mxUtils.bind(this,function(a,b,d){this.spinner.stop();this.addEmbedButtons();this.setGraphEnabled(!0);null!=a&&0<a.length?(this.setFileData(a),this.editor.chromeless?this.editor.graph.lightbox&&this.lightboxFit():this.showLayersDialog(),this.chromelessResize&&this.chromelessResize()):(this.editor.graph.model.clear(),this.editor.fireEvent(new mxEventObject("resetGraphView")));this.editor.undoManager.clear();
+this.editor.modified=null!=d?d:!1;this.updateUi();window.self!==window.top&&window.focus();null!=this.format&&this.format.refresh()}))};EditorUi.prototype.showLayersDialog=function(){1<this.editor.graph.getModel().getChildCount(this.editor.graph.getModel().getRoot())&&(null==this.actions.layersWindow?this.actions.get("layers").funct():this.actions.layersWindow.window.setVisible(!0))};EditorUi.prototype.getPublicUrl=function(a,b){null!=a?a.getPublicUrl(b):b(null)};EditorUi.prototype.createLoadMessage=
+function(a){var b=this.editor.graph;return{event:a,pageVisible:b.pageVisible,translate:b.view.translate,scale:b.view.scale,page:b.view.getBackgroundPageBounds(),bounds:b.getGraphBounds()}};EditorUi.prototype.installMessageHandler=function(a){var b=null,c=!1,d=!1,e=null,h=mxUtils.bind(this,function(a,b){this.editor.modified&&"0"!=urlParams.modified?null!=urlParams.modified&&this.editor.setStatus(mxUtils.htmlEntities(mxResources.get(urlParams.modified))):this.editor.setStatus("")});this.editor.graph.model.addListener(mxEvent.CHANGE,
+h);mxEvent.addListener(window,"message",mxUtils.bind(this,function(f){function g(a){if(null!=a&&"function"===typeof a.charAt&&"<"!=a.charAt(0))try{"data:image/svg+xml;base64,"==a.substring(0,26)?a=atob(a.substring(26)):"data:image/svg+xml;utf8,"==a.substring(0,24)&&(a=a.substring(24)),null!=a&&("%"==a.charAt(0)?a=decodeURIComponent(a):"<"!=a.charAt(0)&&(a=this.editor.graph.decompress(a)))}catch(P){}return a}var h=f.data;if("json"==urlParams.proto){try{h=JSON.parse(h)}catch(R){h=null}if(null==h)return;
+if("dialog"==h.action){this.showError(null!=h.titleKey?mxResources.get(h.titleKey):h.title,null!=h.messageKey?mxResources.get(h.messageKey):h.message,null!=h.buttonKey?mxResources.get(h.buttonKey):h.button);null!=h.modified&&(this.editor.modified=h.modified);return}if("prompt"==h.action){this.spinner.stop();var k=new FilenameDialog(this,h.defaultValue||"",null!=h.okKey?mxResources.get(h.okKey):null,function(a){null!=a&&l.postMessage(JSON.stringify({event:"prompt",value:a,message:h}),"*")},null!=h.titleKey?
+mxResources.get(h.titleKey):h.title);this.showDialog(k.container,300,80,!0,!1);k.init();return}if("draft"==h.action){k=null;k="data:image/png;base64,"==h.xml.substring(0,22)?this.extractGraphModelFromPng(h.xml):g(h.xml);this.spinner.stop();k=new DraftDialog(this,mxResources.get("draftFound",[h.name||this.defaultFilename]),k,mxUtils.bind(this,function(){this.hideDialog();l.postMessage(JSON.stringify({event:"draft",result:"edit",message:h}),"*")}),mxUtils.bind(this,function(){this.hideDialog();l.postMessage(JSON.stringify({event:"draft",
+result:"discard",message:h}),"*")}),h.editKey?mxResources.get(h.editKey):null,h.discardKey?mxResources.get(h.discardKey):null,h.ignore?mxUtils.bind(this,function(){this.hideDialog();l.postMessage(JSON.stringify({event:"draft",result:"ignore",message:h}),"*")}):null);this.showDialog(k.container,640,480,!0,!1,mxUtils.bind(this,function(a){a&&this.actions.get("exit").funct()}));try{k.init()}catch(R){l.postMessage(JSON.stringify({event:"draft",error:R.toString(),message:h}),"*")}return}if("template"==
+h.action){this.spinner.stop();k=new NewDialog(this,!1,null!=h.callback,mxUtils.bind(this,function(b,c){b=b||this.emptyDiagramXml;null!=h.callback?l.postMessage(JSON.stringify({event:"template",xml:b,blank:b==this.emptyDiagramXml,name:c}),"*"):(a(b,f,b!=this.emptyDiagramXml),this.editor.modified||this.editor.setStatus(""))}));this.showDialog(k.container,620,440,!0,!1,mxUtils.bind(this,function(a){a&&this.actions.get("exit").funct()}));k.init();return}if("status"==h.action){null!=h.messageKey?this.editor.setStatus(mxUtils.htmlEntities(mxResources.get(h.messageKey))):
+null!=h.message&&this.editor.setStatus(mxUtils.htmlEntities(h.message));null!=h.modified&&(this.editor.modified=h.modified);return}if("spinner"==h.action){var p=null!=h.messageKey?mxResources.get(h.messageKey):h.message;null==h.show||h.show?this.spinner.spin(document.body,p):this.spinner.stop();return}if("export"==h.action){if("png"==h.format||"xmlpng"==h.format){if(null==h.spin&&null==h.spinKey||this.spinner.spin(document.body,null!=h.spinKey?mxResources.get(h.spinKey):h.spin)){var n=null!=h.xml?
+h.xml:this.getFileData(!0);this.editor.graph.setEnabled(!1);var m=this.editor.graph,q=mxUtils.bind(this,function(a){this.editor.graph.setEnabled(!0);this.spinner.stop();var b=this.createLoadMessage("export");b.format=h.format;b.message=h;b.data=a;b.xml=encodeURIComponent(n);l.postMessage(JSON.stringify(b),"*")}),r=mxUtils.bind(this,function(a){null==a&&(a=Editor.blankImage);"xmlpng"==h.format&&(a=this.writeGraphModelToPng(a,"zTXt","mxGraphModel",atob(this.editor.graph.compress(n))));m!=this.editor.graph&&
+m.container.parentNode.removeChild(m.container);q(a)});if(this.isExportToCanvas()){if(null!=this.pages&&this.currentPage!=this.pages[0]){var m=this.createTemporaryGraph(m.getStylesheet()),u=m.getGlobalVariable,E=this.pages[0];m.getGlobalVariable=function(a){return"page"==a?E.getName():"pagenumber"==a?1:u.apply(this,arguments)};document.body.appendChild(m.container);m.model.setRoot(E.root)}this.exportToCanvas(mxUtils.bind(this,function(a){r(a.toDataURL("image/png"))}),null,null,null,mxUtils.bind(this,
+function(){r(null)}),null,null,null,null,null,null,m)}else(new mxXmlRequest(EXPORT_URL,"format=png&embedXml="+("xmlpng"==h.format?"1":"0")+"&base64=1&xml="+encodeURIComponent(encodeURIComponent(n)))).send(mxUtils.bind(this,function(a){200<=a.getStatus()&&299>=a.getStatus()?q("data:image/png;base64,"+a.getText()):r(null)}),mxUtils.bind(this,function(){r(null)}))}}else{null!=h.xml&&0<h.xml.length&&this.setFileData(h.xml);p=this.createLoadMessage("export");if("html2"==h.format||"html"==h.format&&("0"!=
+urlParams.pages||null!=this.pages&&1<this.pages.length))k=this.getXmlFileData(),p.xml=mxUtils.getXml(k),p.data=this.getFileData(null,null,!0,null,null,null,k),p.format=h.format;else if("html"==h.format)n=this.editor.getGraphXml(),p.data=this.getHtml(n,this.editor.graph),p.xml=mxUtils.getXml(n),p.format=h.format;else{mxSvgCanvas2D.prototype.foAltText=null;k=this.editor.graph.background;k==mxConstants.NONE&&(k=null);p.xml=this.getFileData(!0);p.format="svg";if(h.embedImages||null==h.embedImages){if(null==
+h.spin&&null==h.spinKey||this.spinner.spin(document.body,null!=h.spinKey?mxResources.get(h.spinKey):h.spin))this.editor.graph.setEnabled(!1),"xmlsvg"==h.format?this.getEmbeddedSvg(p.xml,this.editor.graph,null,!0,mxUtils.bind(this,function(a){this.editor.graph.setEnabled(!0);this.spinner.stop();p.data=this.createSvgDataUri(a);l.postMessage(JSON.stringify(p),"*")})):this.convertImages(this.editor.graph.getSvg(k),mxUtils.bind(this,function(a){this.editor.graph.setEnabled(!0);this.spinner.stop();p.data=
+this.createSvgDataUri(mxUtils.getXml(a));l.postMessage(JSON.stringify(p),"*")}));return}k="xmlsvg"==h.format?this.getEmbeddedSvg(this.getFileData(!0),this.editor.graph,null,!0):mxUtils.getXml(this.editor.graph.getSvg(k));p.data=this.createSvgDataUri(k)}l.postMessage(JSON.stringify(p),"*")}return}if("create"==h.action&&this.createFile){if("trello"==h.mode){var y=mxUtils.bind(this,function(a){this.createFile(h.name,a||this.getFileData(/(\.xml)$/i.test(name)||0>name.indexOf("."),/(\.svg)$/i.test(name),
+/(\.html)$/i.test(name)),null,h.mode,null,!0,h.folder)}),O=mxUtils.bind(this,function(){null!=h.template?this.trello.getFile(h.folder+this.trello.SEPARATOR+h.template,function(a){y(a.getData())},function(){y()}):y()});if(null==this.trello){var J=function(){null!=this.trello&&(this.removeListener(J),O())};this.addListener("clientLoaded",J)}else O()}return}if("load"==h.action)d=1==h.autosave,this.hideDialog(),null!=h.modified&&null==urlParams.modified&&(urlParams.modified=h.modified),null!=h.saveAndExit&&
+null==urlParams.saveAndExit&&(urlParams.saveAndExit=h.saveAndExit),null!=h.title&&null!=this.buttonContainer&&(k=document.createElement("span"),mxUtils.write(k,h.title),"atlas"==uiTheme?(this.buttonContainer.style.paddingRight="12px",this.buttonContainer.style.paddingTop="12px"):(this.buttonContainer.style.paddingRight="38px",this.buttonContainer.style.paddingTop="6px"),null!=this.embedFilenameSpan&&this.embedFilenameSpan.parentNode.removeChild(this.embedFilenameSpan),this.buttonContainer.appendChild(k),
+this.embedFilenameSpan=k),h=null!=h.xmlpng?this.extractGraphModelFromPng(h.xmlpng):null!=h.xml&&"data:image/png;base64,"==h.xml.substring(0,22)?this.extractGraphModelFromPng(h.xml):h.xml;else{l.postMessage(JSON.stringify({error:"unknownMessage",data:JSON.stringify(h)}),"*");return}}h=g(h);c=!0;try{a(h,f)}catch(R){this.handleError(R)}c=!1;null!=urlParams.modified&&this.editor.setStatus("");var F=mxUtils.bind(this,function(){return"0"!=urlParams.pages||null!=this.pages&&1<this.pages.length?this.getFileData(!0):
+mxUtils.getXml(this.editor.getGraphXml())});e=F();d&&null==b&&(b=mxUtils.bind(this,function(a,b){var d=F();if(d!=e&&!c){var f=this.createLoadMessage("autosave");f.xml=d;d=JSON.stringify(f);(window.opener||window.parent).postMessage(d,"*")}e=d}),this.editor.graph.model.addListener(mxEvent.CHANGE,b),this.editor.graph.addListener("gridSizeChanged",b),this.editor.graph.addListener("shadowVisibleChanged",b),this.addListener("pageFormatChanged",b),this.addListener("pageScaleChanged",b),this.addListener("backgroundColorChanged",
+b),this.addListener("backgroundImageChanged",b),this.addListener("foldingEnabledChanged",b),this.addListener("mathEnabledChanged",b),this.addListener("gridEnabledChanged",b),this.addListener("guidesEnabledChanged",b),this.addListener("pageViewChanged",b));"1"!=urlParams.returnbounds&&"json"!=urlParams.proto||l.postMessage(JSON.stringify(this.createLoadMessage("load")),"*")}));var l=window.opener||window.parent,h="json"==urlParams.proto?JSON.stringify({event:"init"}):urlParams.ready||"ready";l.postMessage(h,
 "*")};EditorUi.prototype.addEmbedButtons=function(){if(null!=this.menubar){var a=document.createElement("div");a.style.display="inline-block";a.style.position="absolute";a.style.paddingTop="atlas"==uiTheme?"2px":"3px";a.style.paddingLeft="8px";a.style.paddingBottom="2px";var b=document.createElement("button");mxUtils.write(b,mxResources.get("save"));b.setAttribute("title",mxResources.get("save")+" ("+Editor.ctrlKey+"+S)");b.className="geBigButton";b.style.fontSize="12px";b.style.padding="4px 6px 4px 6px";
 b.style.borderRadius="3px";mxEvent.addListener(b,"click",mxUtils.bind(this,function(){this.actions.get("save").funct()}));a.appendChild(b);"1"==urlParams.saveAndExit&&(b=document.createElement("a"),mxUtils.write(b,mxResources.get("saveAndExit")),b.setAttribute("title",mxResources.get("saveAndExit")),b.style.fontSize="12px",b.style.marginLeft="6px",b.style.padding="4px",b.style.cursor="pointer",mxEvent.addListener(b,"click",mxUtils.bind(this,function(){this.actions.get("saveAndExit").funct()})),a.appendChild(b));
 b=document.createElement("a");mxUtils.write(b,mxResources.get("exit"));b.setAttribute("title",mxResources.get("exit"));b.style.fontSize="12px";b.style.marginLeft="6px";b.style.marginRight="20px";b.style.padding="4px";b.style.cursor="pointer";mxEvent.addListener(b,"click",mxUtils.bind(this,function(){this.actions.get("exit").funct()}));a.appendChild(b);this.toolbar.container.appendChild(a);this.toolbar.staticElements.push(a);a.style.right="atlas"!=uiTheme?"52px":"42px"}};EditorUi.prototype.showImportCsvDialog=
-function(){null==this.importCsvDialog&&(this.importCsvDialog=new TextareaDialog(this,mxResources.get("csv")+":",Editor.defaultCsvValue,mxUtils.bind(this,function(a){this.importCsv(a)}),null,null,620,430,null,!0,!0,mxResources.get("import")));this.showDialog(this.importCsvDialog.container,640,520,!0,!0);this.importCsvDialog.init()};EditorUi.prototype.importCsv=function(a){try{var b=a.split("\n"),c=[];if(0<b.length){var d={},e=null,g=null,l="auto",k="auto",p=40,q=40,x=0,w=this.editor.graph;w.getGraphBounds();
-for(var D=function(){w.setSelectionCells(P);w.scrollCellToVisible(w.getSelectionCell())},B=w.getFreeInsertPoint(),y=B.x,C=B.y,B=C,A=null,F="auto",z=[],J=null,I=null,H=0;H<b.length&&"#"==b[H].charAt(0);){a=b[H];for(H++;H<b.length&&"\\"==a.charAt(a.length-1)&&"#"==b[H].charAt(0);)a=a.substring(0,a.length-1)+mxUtils.trim(b[H].substring(1)),H++;if("#"!=a.charAt(1)){var T=a.indexOf(":");if(0<T){var N=mxUtils.trim(a.substring(1,T)),K=mxUtils.trim(a.substring(T+1));"label"==N?A=w.sanitizeHtml(K):"style"==
-N?e=K:"identity"==N&&0<K.length&&"-"!=K?g=K:"width"==N?l=K:"height"==N?k=K:"ignore"==N?I=K.split(","):"connect"==N?z.push(JSON.parse(K)):"link"==N?J=K:"padding"==N?x=parseFloat(K):"edgespacing"==N?p=parseFloat(K):"nodespacing"==N?q=parseFloat(K):"layout"==N&&(F=K)}}}var U=this.editor.csvToArray(b[H]);a=null;if(null!=g)for(var G=0;G<U.length;G++)if(g==U[G]){a=G;break}null==A&&(A="%"+U[0]+"%");if(null!=z)for(var L=0;L<z.length;L++)null==d[z[L].to]&&(d[z[L].to]={});w.model.beginUpdate();try{for(G=H+
-1;G<b.length;G++){var Q=this.editor.csvToArray(b[G]);if(Q.length==U.length){var E=null,V=null!=a?Q[a]:null;null!=V&&(E=w.model.getCell(V));null==E&&(E=new mxCell(A,new mxGeometry(y,B,0,0),e||"whiteSpace=wrap;html=1;"),E.vertex=!0,E.id=V);for(var O=0;O<Q.length;O++)w.setAttributeForCell(E,U[O],Q[O]);w.setAttributeForCell(E,"placeholders","1");E.style=w.replacePlaceholders(E,E.style);for(L=0;L<z.length;L++)d[z[L].to][E.getAttribute(z[L].to)]=E;null!=J&&"link"!=J&&(w.setLinkForCell(E,E.getAttribute(J)),
-w.setAttributeForCell(E,J,null));var W=this.editor.graph.getPreferredSizeForCell(E);E.geometry.width="auto"==l?W.width+x:parseFloat(l);E.geometry.height="auto"==k?W.height+x:parseFloat(k);B+=E.geometry.height+q;c.push(w.addCell(E))}}null==e&&w.fireEvent(new mxEventObject("cellsInserted","cells",c));for(var R=c.slice(),P=c.slice(),L=0;L<z.length;L++)for(var S=z[L],G=0;G<c.length;G++){var E=c[G],Y=E.getAttribute(S.from);if(null!=Y){w.setAttributeForCell(E,S.from,null);for(var X=Y.split(","),O=0;O<X.length;O++){var Z=
-d[S.to][X[O]];null!=Z&&(P.push(w.insertEdge(null,null,S.label||"",S.invert?Z:E,S.invert?E:Z,S.style||w.createCurrentEdgeStyle())),mxUtils.remove(S.invert?E:Z,R))}}}if(null!=I)for(G=0;G<c.length;G++)for(E=c[G],O=0;O<I.length;O++)w.setAttributeForCell(E,mxUtils.trim(I[O]),null);var aa=new mxParallelEdgeLayout(w);aa.spacing=p;var ia=function(){aa.execute(w.getDefaultParent());for(var a=0;a<c.length;a++){var b=w.getCellGeometry(c[a]);b.x=Math.round(w.snap(b.x));b.y=Math.round(w.snap(b.y));"auto"==l&&
-(b.width=Math.round(w.snap(b.width)));"auto"==k&&(b.height=Math.round(w.snap(b.height)))}};if("circle"==F){var ba=new mxCircleLayout(w);ba.resetEdges=!1;var ma=ba.isVertexIgnored;ba.isVertexIgnored=function(a){return ma.apply(this,arguments)||0>mxUtils.indexOf(c,a)};this.executeLayout(function(){ba.execute(w.getDefaultParent());ia()},!0,D);D=null}else if("horizontaltree"==F||"verticaltree"==F||"auto"==F&&P.length==2*c.length-1&&1==R.length){w.view.validate();var ca=new mxCompactTreeLayout(w,"horizontaltree"==
-F);ca.levelDistance=q;ca.edgeRouting=!1;ca.resetEdges=!1;this.executeLayout(function(){ca.execute(w.getDefaultParent(),0<R.length?R[0]:null)},!0,D);D=null}else if("horizontalflow"==F||"verticalflow"==F||"auto"==F&&1==R.length){w.view.validate();var ja=new mxHierarchicalLayout(w,"horizontalflow"==F?mxConstants.DIRECTION_WEST:mxConstants.DIRECTION_NORTH);ja.intraCellSpacing=q;ja.disableEdgeStyle=!1;this.executeLayout(function(){ja.execute(w.getDefaultParent(),P);w.moveCells(P,y,C)},!0,D);D=null}else if("organic"==
-F||"auto"==F&&P.length>c.length){w.view.validate();var da=new mxFastOrganicLayout(w);da.forceConstant=3*q;da.resetEdges=!1;var qa=da.isVertexIgnored;da.isVertexIgnored=function(a){return qa.apply(this,arguments)||0>mxUtils.indexOf(c,a)};aa=new mxParallelEdgeLayout(w);aa.spacing=p;this.executeLayout(function(){da.execute(w.getDefaultParent());ia()},!0,D);D=null}this.hideDialog()}finally{w.model.endUpdate()}null!=D&&D()}}catch(na){this.handleError(na)}};EditorUi.prototype.getSearch=function(a){var b=
+function(){null==this.importCsvDialog&&(this.importCsvDialog=new TextareaDialog(this,mxResources.get("csv")+":",Editor.defaultCsvValue,mxUtils.bind(this,function(a){this.importCsv(a)}),null,null,620,430,null,!0,!0,mxResources.get("import")));this.showDialog(this.importCsvDialog.container,640,520,!0,!0);this.importCsvDialog.init()};EditorUi.prototype.importCsv=function(a){try{var b=a.split("\n"),c=[];if(0<b.length){var d={},e=null,h=null,l="auto",k="auto",n=40,q=40,x=0,w=this.editor.graph;w.getGraphBounds();
+for(var D=function(){w.setSelectionCells(K);w.scrollCellToVisible(w.getSelectionCell())},A=w.getFreeInsertPoint(),z=A.x,C=A.y,A=C,B=null,E="auto",y=[],O=null,J=null,F=0;F<b.length&&"#"==b[F].charAt(0);){a=b[F];for(F++;F<b.length&&"\\"==a.charAt(a.length-1)&&"#"==b[F].charAt(0);)a=a.substring(0,a.length-1)+mxUtils.trim(b[F].substring(1)),F++;if("#"!=a.charAt(1)){var R=a.indexOf(":");if(0<R){var P=mxUtils.trim(a.substring(1,R)),I=mxUtils.trim(a.substring(R+1));"label"==P?B=w.sanitizeHtml(I):"style"==
+P?e=I:"identity"==P&&0<I.length&&"-"!=I?h=I:"width"==P?l=I:"height"==P?k=I:"ignore"==P?J=I.split(","):"connect"==P?y.push(JSON.parse(I)):"link"==P?O=I:"padding"==P?x=parseFloat(I):"edgespacing"==P?n=parseFloat(I):"nodespacing"==P?q=parseFloat(I):"layout"==P&&(E=I)}}}var S=this.editor.csvToArray(b[F]);a=null;if(null!=h)for(var H=0;H<S.length;H++)if(h==S[H]){a=H;break}null==B&&(B="%"+S[0]+"%");if(null!=y)for(var L=0;L<y.length;L++)null==d[y[L].to]&&(d[y[L].to]={});w.model.beginUpdate();try{for(H=F+
+1;H<b.length;H++){var Q=this.editor.csvToArray(b[H]);if(Q.length==S.length){var G=null,V=null!=a?Q[a]:null;null!=V&&(G=w.model.getCell(V));null==G&&(G=new mxCell(B,new mxGeometry(z,A,0,0),e||"whiteSpace=wrap;html=1;"),G.vertex=!0,G.id=V);for(var M=0;M<Q.length;M++)w.setAttributeForCell(G,S[M],Q[M]);w.setAttributeForCell(G,"placeholders","1");G.style=w.replacePlaceholders(G,G.style);for(L=0;L<y.length;L++)d[y[L].to][G.getAttribute(y[L].to)]=G;null!=O&&"link"!=O&&(w.setLinkForCell(G,G.getAttribute(O)),
+w.setAttributeForCell(G,O,null));var Y=this.editor.graph.getPreferredSizeForCell(G);G.geometry.width="auto"==l?Y.width+x:parseFloat(l);G.geometry.height="auto"==k?Y.height+x:parseFloat(k);A+=G.geometry.height+q;c.push(w.addCell(G))}}null==e&&w.fireEvent(new mxEventObject("cellsInserted","cells",c));for(var T=c.slice(),K=c.slice(),L=0;L<y.length;L++)for(var U=y[L],H=0;H<c.length;H++){var G=c[H],W=G.getAttribute(U.from);if(null!=W){w.setAttributeForCell(G,U.from,null);for(var X=W.split(","),M=0;M<X.length;M++){var ba=
+d[U.to][X[M]];null!=ba&&(K.push(w.insertEdge(null,null,U.label||"",U.invert?ba:G,U.invert?G:ba,U.style||w.createCurrentEdgeStyle())),mxUtils.remove(U.invert?G:ba,T))}}}if(null!=J)for(H=0;H<c.length;H++)for(G=c[H],M=0;M<J.length;M++)w.setAttributeForCell(G,mxUtils.trim(J[M]),null);var Z=new mxParallelEdgeLayout(w);Z.spacing=n;var ca=function(){Z.execute(w.getDefaultParent());for(var a=0;a<c.length;a++){var b=w.getCellGeometry(c[a]);b.x=Math.round(w.snap(b.x));b.y=Math.round(w.snap(b.y));"auto"==l&&
+(b.width=Math.round(w.snap(b.width)));"auto"==k&&(b.height=Math.round(w.snap(b.height)))}};if("circle"==E){var da=new mxCircleLayout(w);da.resetEdges=!1;var ma=da.isVertexIgnored;da.isVertexIgnored=function(a){return ma.apply(this,arguments)||0>mxUtils.indexOf(c,a)};this.executeLayout(function(){da.execute(w.getDefaultParent());ca()},!0,D);D=null}else if("horizontaltree"==E||"verticaltree"==E||"auto"==E&&K.length==2*c.length-1&&1==T.length){w.view.validate();var aa=new mxCompactTreeLayout(w,"horizontaltree"==
+E);aa.levelDistance=q;aa.edgeRouting=!1;aa.resetEdges=!1;this.executeLayout(function(){aa.execute(w.getDefaultParent(),0<T.length?T[0]:null)},!0,D);D=null}else if("horizontalflow"==E||"verticalflow"==E||"auto"==E&&1==T.length){w.view.validate();var ja=new mxHierarchicalLayout(w,"horizontalflow"==E?mxConstants.DIRECTION_WEST:mxConstants.DIRECTION_NORTH);ja.intraCellSpacing=q;ja.disableEdgeStyle=!1;this.executeLayout(function(){ja.execute(w.getDefaultParent(),K);w.moveCells(K,z,C)},!0,D);D=null}else if("organic"==
+E||"auto"==E&&K.length>c.length){w.view.validate();var ea=new mxFastOrganicLayout(w);ea.forceConstant=3*q;ea.resetEdges=!1;var pa=ea.isVertexIgnored;ea.isVertexIgnored=function(a){return pa.apply(this,arguments)||0>mxUtils.indexOf(c,a)};Z=new mxParallelEdgeLayout(w);Z.spacing=n;this.executeLayout(function(){ea.execute(w.getDefaultParent());ca()},!0,D);D=null}this.hideDialog()}finally{w.model.endUpdate()}null!=D&&D()}}catch(qa){this.handleError(qa)}};EditorUi.prototype.getSearch=function(a){var b=
 "";if("1"!=urlParams.offline&&"1"!=urlParams.demo&&null!=a&&0<window.location.search.length){var c="?",d;for(d in urlParams)0>mxUtils.indexOf(a,d)&&null!=urlParams[d]&&(b+=c+d+"="+urlParams[d],c="&")}else b=window.location.search;return b};EditorUi.prototype.getUrl=function(a){a=null!=a?a:window.location.pathname;var b=0<a.indexOf("?")?1:0;if("1"==urlParams.offline)a+=window.location.search;else{var c="tmp libs clibs state fileId code share notitle data url embed client create title splash".split(" "),
-d;for(d in urlParams)0>mxUtils.indexOf(c,d)&&(a=0==b?a+"?":a+"&",null!=urlParams[d]&&(a+=d+"="+urlParams[d],b++))}return a};EditorUi.prototype.showLinkDialog=function(a,b,d){a=new LinkDialog(this,a,b,d,!0);this.showDialog(a.container,420,120,!0,!0);a.init()};var p=EditorUi.prototype.createOutline;EditorUi.prototype.createOutline=function(a){var b=p.apply(this,arguments),c=this.editor.graph,d=b.getSourceGraphBounds;b.getSourceGraphBounds=function(){if(mxUtils.hasScrollbars(c.container)&&c.pageVisible&&
+d;for(d in urlParams)0>mxUtils.indexOf(c,d)&&(a=0==b?a+"?":a+"&",null!=urlParams[d]&&(a+=d+"="+urlParams[d],b++))}return a};EditorUi.prototype.showLinkDialog=function(a,b,d){a=new LinkDialog(this,a,b,d,!0);this.showDialog(a.container,420,120,!0,!0);a.init()};var n=EditorUi.prototype.createOutline;EditorUi.prototype.createOutline=function(a){var b=n.apply(this,arguments),c=this.editor.graph,d=b.getSourceGraphBounds;b.getSourceGraphBounds=function(){if(mxUtils.hasScrollbars(c.container)&&c.pageVisible&&
 null!=this.source.minimumGraphSize){var a=this.source.getPagePadding(),b=this.source.view.scale;return new mxRectangle(0,0,Math.ceil(this.source.minimumGraphSize.width-2*a.x/b),Math.ceil(this.source.minimumGraphSize.height-2*a.y/b))}return d.apply(this,arguments)};var e=b.getSourceContainerSize;b.getSourceContainerSize=function(){if(mxUtils.hasScrollbars(c.container)&&null!=this.source.minimumGraphSize){var a=this.source.getPagePadding(),b=this.source.view.scale;return new mxRectangle(0,0,Math.ceil(this.source.minimumGraphSize.width*
 b-2*a.x),Math.ceil(this.source.minimumGraphSize.height*b-2*a.y))}return e.apply(this,arguments)};b.getOutlineOffset=function(a){if(mxUtils.hasScrollbars(c.container)&&null!=this.source.minimumGraphSize){var d=this.source.getPagePadding();return new mxPoint(Math.round(Math.max(0,(b.outline.container.clientWidth/a-(this.source.minimumGraphSize.width-2*d.x))/2)-d.x),Math.round(Math.max(0,(b.outline.container.clientHeight/a-(this.source.minimumGraphSize.height-2*d.y))/2)-d.y-5/a))}return new mxPoint(8/
-a,8/a)};var g=b.init;b.init=function(){g.apply(this,arguments);b.outline.view.getBackgroundPageBounds=function(){var a=c.getPageLayout(),b=c.getPageSize();return new mxRectangle(this.scale*(this.translate.x+a.x*b.width),this.scale*(this.translate.y+a.y*b.height),this.scale*a.width*b.width,this.scale*a.height*b.height)};b.outline.view.validateBackgroundPage()};this.editor.addListener("pageSelected",function(a,c){var d=c.getProperty("change"),e=b.source,f=b.outline;f.pageScale=e.pageScale;f.pageFormat=
-e.pageFormat;f.background=e.background;f.pageVisible=e.pageVisible;f.background=e.background;var h=mxUtils.getCurrentStyle(e.container);f.container.style.backgroundColor=h.backgroundColor;null!=e.view.backgroundPageShape&&null!=f.view.backgroundPageShape&&(f.view.backgroundPageShape.fill=e.view.backgroundPageShape.fill);b.outline.view.clear(d.previousPage.root,!0);b.outline.view.validate()});return b};EditorUi.prototype.getServiceCount=function(a){var b=0;null==this.drive&&"function"!==typeof window.DriveClient||
+a,8/a)};var h=b.init;b.init=function(){h.apply(this,arguments);b.outline.view.getBackgroundPageBounds=function(){var a=c.getPageLayout(),b=c.getPageSize();return new mxRectangle(this.scale*(this.translate.x+a.x*b.width),this.scale*(this.translate.y+a.y*b.height),this.scale*a.width*b.width,this.scale*a.height*b.height)};b.outline.view.validateBackgroundPage()};this.editor.addListener("pageSelected",function(a,c){var d=c.getProperty("change"),e=b.source,f=b.outline;f.pageScale=e.pageScale;f.pageFormat=
+e.pageFormat;f.background=e.background;f.pageVisible=e.pageVisible;f.background=e.background;var g=mxUtils.getCurrentStyle(e.container);f.container.style.backgroundColor=g.backgroundColor;null!=e.view.backgroundPageShape&&null!=f.view.backgroundPageShape&&(f.view.backgroundPageShape.fill=e.view.backgroundPageShape.fill);b.outline.view.clear(d.previousPage.root,!0);b.outline.view.validate()});return b};EditorUi.prototype.getServiceCount=function(a){var b=0;null==this.drive&&"function"!==typeof window.DriveClient||
 b++;null==this.dropbox&&"function"!==typeof window.DropboxClient||b++;null==this.oneDrive&&"function"!==typeof window.OneDriveClient||b++;null!=this.gitHub&&b++;null==this.trello&&"function"!==typeof window.TrelloClient||b++;a&&isLocalStorage&&("1"==urlParams.browser||mxClient.IS_IOS)&&b++;mxClient.IS_IOS||b++;return b};EditorUi.prototype.updateUi=function(){this.updateButtonContainer();this.updateActionStates();var a=this.getCurrentFile(),b=null!=a||"1"==urlParams.embed&&this.editor.graph.isEnabled();
 this.menus.get("viewPanels").setEnabled(b);this.menus.get("viewZoom").setEnabled(b);var d=("1"!=urlParams.embed||!this.editor.graph.isEnabled())&&(null==a||a.isRestricted());this.actions.get("makeCopy").setEnabled(!d);this.actions.get("print").setEnabled(!d);this.menus.get("exportAs").setEnabled(!d);this.menus.get("embed").setEnabled(!d);d="1"!=urlParams.embed||this.editor.graph.isEnabled();this.menus.get("openLibraryFrom").setEnabled(d);this.menus.get("newLibrary").setEnabled(d);this.menus.get("extras").setEnabled(d);
 a="1"==urlParams.embed&&this.editor.graph.isEnabled()||null!=a&&a.isEditable();this.actions.get("image").setEnabled(b);this.actions.get("zoomIn").setEnabled(b);this.actions.get("zoomOut").setEnabled(b);this.actions.get("resetView").setEnabled(b);this.menus.get("edit").setEnabled(b);this.menus.get("view").setEnabled(b);this.menus.get("importFrom").setEnabled(a);this.menus.get("arrange").setEnabled(a);null!=this.toolbar&&(null!=this.toolbar.edgeShapeMenu&&this.toolbar.edgeShapeMenu.setEnabled(a),null!=
 this.toolbar.edgeStyleMenu&&this.toolbar.edgeStyleMenu.setEnabled(a));if(this.isOfflineApp()){var e=applicationCache;if(null!=e&&null==this.offlineStatus){this.offlineStatus=document.createElement("div");this.offlineStatus.className="geItem";this.offlineStatus.style.position="absolute";this.offlineStatus.style.fontSize="8pt";this.offlineStatus.style.top="2px";this.offlineStatus.style.right="12px";this.offlineStatus.style.color="#666";this.offlineStatus.style.margin="4px";this.offlineStatus.style.padding=
-"2px";this.offlineStatus.style.verticalAlign="middle";this.offlineStatus.innerHTML="";this.menubarContainer.appendChild(this.offlineStatus);mxEvent.addListener(this.offlineStatus,"click",mxUtils.bind(this,function(){var a=this.offlineStatus.getElementsByTagName("img");null!=a&&0<a.length&&this.alert(a[0].getAttribute("title"))}));var e=window.applicationCache,g=null,b=mxUtils.bind(this,function(){var a=e.status,b;a==e.CHECKING&&(a=e.DOWNLOADING);switch(a){case e.UNCACHED:b="";break;case e.IDLE:b=
+"2px";this.offlineStatus.style.verticalAlign="middle";this.offlineStatus.innerHTML="";this.menubarContainer.appendChild(this.offlineStatus);mxEvent.addListener(this.offlineStatus,"click",mxUtils.bind(this,function(){var a=this.offlineStatus.getElementsByTagName("img");null!=a&&0<a.length&&this.alert(a[0].getAttribute("title"))}));var e=window.applicationCache,h=null,b=mxUtils.bind(this,function(){var a=e.status,b;a==e.CHECKING&&(a=e.DOWNLOADING);switch(a){case e.UNCACHED:b="";break;case e.IDLE:b=
 '<img title="draw.io is up to date." border="0" src="'+IMAGE_PATH+'/checkmark.gif"/>';break;case e.DOWNLOADING:b='<img title="Downloading new version..." border="0" src="'+IMAGE_PATH+'/spin.gif"/>';break;case e.UPDATEREADY:b='<img title="'+mxUtils.htmlEntities(mxResources.get("restartForChangeRequired"))+'" border="0" src="'+IMAGE_PATH+'/download.png"/>';break;case e.OBSOLETE:b='<img title="Obsolete" border="0" src="'+IMAGE_PATH+'/clear.gif"/>';break;default:b='<img title="Unknown" border="0" src="'+
-IMAGE_PATH+'/clear.gif"/>'}a!=g&&(this.offlineStatus.innerHTML=b,g=a)});mxEvent.addListener(e,"checking",b);mxEvent.addListener(e,"noupdate",b);mxEvent.addListener(e,"downloading",b);mxEvent.addListener(e,"progress",b);mxEvent.addListener(e,"cached",b);mxEvent.addListener(e,"updateready",b);mxEvent.addListener(e,"obsolete",b);mxEvent.addListener(e,"error",b);b()}}else this.updateUserElement()};EditorUi.prototype.updateButtonContainer=function(){};EditorUi.prototype.updateUserElement=function(){};
+IMAGE_PATH+'/clear.gif"/>'}a!=h&&(this.offlineStatus.innerHTML=b,h=a)});mxEvent.addListener(e,"checking",b);mxEvent.addListener(e,"noupdate",b);mxEvent.addListener(e,"downloading",b);mxEvent.addListener(e,"progress",b);mxEvent.addListener(e,"cached",b);mxEvent.addListener(e,"updateready",b);mxEvent.addListener(e,"obsolete",b);mxEvent.addListener(e,"error",b);b()}}else this.updateUserElement()};EditorUi.prototype.updateButtonContainer=function(){};EditorUi.prototype.updateUserElement=function(){};
 var q=EditorUi.prototype.updateActionStates;EditorUi.prototype.updateActionStates=function(){q.apply(this,arguments);var a=this.editor.graph,b=this.getCurrentFile(),d=null!=b&&b.isEditable()||"1"==urlParams.embed&&this.editor.graph.isEnabled();this.actions.get("pageSetup").setEnabled(d);this.actions.get("autosave").setEnabled(null!=b&&b.isEditable()&&b.isAutosaveOptional());this.actions.get("guides").setEnabled(d);this.actions.get("editData").setEnabled(d);this.actions.get("shadowVisible").setEnabled(d);
 this.actions.get("connectionArrows").setEnabled(d);this.actions.get("connectionPoints").setEnabled(d);this.actions.get("copyStyle").setEnabled(d&&!a.isSelectionEmpty());this.actions.get("pasteStyle").setEnabled(d&&!a.isSelectionEmpty());this.actions.get("editGeometry").setEnabled(a.getModel().isVertex(a.getSelectionCell()));this.actions.get("createShape").setEnabled(d);this.actions.get("createRevision").setEnabled(d);this.actions.get("moveToFolder").setEnabled(null!=b);this.actions.get("makeCopy").setEnabled(null!=
 b&&!b.isRestricted());this.actions.get("editDiagram").setEnabled("1"==urlParams.embed&&this.editor.graph.isEnabled()||null!=b&&!b.isRestricted());this.actions.get("publishLink").setEnabled(null!=b&&!b.isRestricted());this.actions.get("tags").setEnabled("1"==urlParams.embed&&this.editor.graph.isEnabled()||null!=b&&!b.isRestricted());this.actions.get("close").setEnabled(null!=b);this.menus.get("publish").setEnabled(null!=b&&!b.isRestricted());a=a.view.getState(a.getSelectionCell());this.actions.get("editShape").setEnabled(d&&
-null!=a&&null!=a.shape&&null!=a.shape.stencil)};null!=window.ExportDialog&&(ExportDialog.showXmlOption=!1,ExportDialog.showGifOption=!1,ExportDialog.exportFile=function(a,b,d,e,g,l){var c=a.editor.graph;if("xml"==d)a.hideDialog(),a.saveData(b,"xml",mxUtils.getXml(a.editor.getGraphXml()),"text/xml");else if("svg"==d)a.hideDialog(),a.saveData(b,"svg",mxUtils.getXml(c.getSvg(e,g,l)),"image/svg+xml");else{var f=a.getFileData(!0,null,null,null,null,!0),h=c.getGraphBounds(),m=Math.floor(h.width*g/c.view.scale),
-p=Math.floor(h.height*g/c.view.scale);f.length<=MAX_REQUEST_SIZE&&m*p<MAX_AREA?(a.hideDialog(),a.saveRequest(b,d,function(a,b){return new mxXmlRequest(EXPORT_URL,"format="+d+"&base64="+(b||"0")+(null!=a?"&filename="+encodeURIComponent(a):"")+"&bg="+(null!=e?e:"none")+"&w="+m+"&h="+p+"&border="+l+"&xml="+encodeURIComponent(f))})):mxUtils.alert(mxResources.get("drawingTooLarge"))}})})();function DiagramPage(a){this.node=a;(null==this.node.hasAttribute&&null==this.node.getAttribute("id")||null!=this.node.hasAttribute&&!this.node.hasAttribute("id"))&&this.node.setAttribute("id",function(){function a(){return Math.floor(65536*(1+Math.random())).toString(16).substring(1)}return a()+a()+"-"+a()+"-"+a()+"-"+a()+"-"+a()+a()+a()}())}DiagramPage.prototype.node=null;DiagramPage.prototype.root=null;DiagramPage.prototype.viewState=null;DiagramPage.prototype.getId=function(){return this.node.getAttribute("id")};
+null!=a&&null!=a.shape&&null!=a.shape.stencil)};null!=window.ExportDialog&&(ExportDialog.showXmlOption=!1,ExportDialog.showGifOption=!1,ExportDialog.exportFile=function(a,b,d,e,h,l){var c=a.editor.graph;if("xml"==d)a.hideDialog(),a.saveData(b,"xml",mxUtils.getXml(a.editor.getGraphXml()),"text/xml");else if("svg"==d)a.hideDialog(),a.saveData(b,"svg",mxUtils.getXml(c.getSvg(e,h,l)),"image/svg+xml");else{var f=a.getFileData(!0,null,null,null,null,!0),g=c.getGraphBounds(),n=Math.floor(g.width*h/c.view.scale),
+p=Math.floor(g.height*h/c.view.scale);f.length<=MAX_REQUEST_SIZE&&n*p<MAX_AREA?(a.hideDialog(),a.saveRequest(b,d,function(a,b){return new mxXmlRequest(EXPORT_URL,"format="+d+"&base64="+(b||"0")+(null!=a?"&filename="+encodeURIComponent(a):"")+"&bg="+(null!=e?e:"none")+"&w="+n+"&h="+p+"&border="+l+"&xml="+encodeURIComponent(f))})):mxUtils.alert(mxResources.get("drawingTooLarge"))}})})();function DiagramPage(a){this.node=a;(null==this.node.hasAttribute&&null==this.node.getAttribute("id")||null!=this.node.hasAttribute&&!this.node.hasAttribute("id"))&&this.node.setAttribute("id",function(){function a(){return Math.floor(65536*(1+Math.random())).toString(16).substring(1)}return a()+a()+"-"+a()+"-"+a()+"-"+a()+"-"+a()+a()+a()}())}DiagramPage.prototype.node=null;DiagramPage.prototype.root=null;DiagramPage.prototype.viewState=null;DiagramPage.prototype.getId=function(){return this.node.getAttribute("id")};
 DiagramPage.prototype.getName=function(){return this.node.getAttribute("name")};DiagramPage.prototype.setName=function(a){null==a?this.node.removeAttribute("name"):this.node.setAttribute("name",a)};function RenamePage(a,b,e){this.ui=a;this.page=b;this.previous=e}RenamePage.prototype.execute=function(){var a=this.page.getName();this.page.setName(this.previous);this.previous=a;this.ui.editor.graph.updatePlaceholders();this.ui.editor.fireEvent(new mxEventObject("pageRenamed"))};
 function MovePage(a,b,e){this.ui=a;this.oldIndex=b;this.newIndex=e}MovePage.prototype.execute=function(){this.ui.pages.splice(this.newIndex,0,this.ui.pages.splice(this.oldIndex,1)[0]);var a=this.oldIndex;this.oldIndex=this.newIndex;this.newIndex=a;this.ui.editor.graph.updatePlaceholders();this.ui.editor.fireEvent(new mxEventObject("pageMoved"))};
 function SelectPage(a,b){this.ui=a;this.previousPage=this.page=b;this.neverShown=!0;null!=b&&(this.neverShown=null==b.viewState,this.ui.updatePageRoot(b))}
@@ -2908,11 +2909,11 @@ b.fireEvent(new mxEventObject("setViewState","change",this));e.gridEnabled=e.gri
 mxUtils.extend(ChangePage,SelectPage);ChangePage.prototype.execute=function(){this.ui.editor.fireEvent(new mxEventObject("beforePageChange","change",this));this.previousIndex=this.index;if(null==this.index){var a=mxUtils.indexOf(this.ui.pages,this.relatedPage);this.ui.pages.splice(a,1);this.index=a}else this.ui.pages.splice(this.index,0,this.relatedPage),this.index=null;SelectPage.prototype.execute.apply(this,arguments)};
 EditorUi.prototype.getPageById=function(a){if(null!=this.pages)for(var b=0;b<this.pages.length;b++)if(this.pages[b].getId()==a)return this.pages[b];return null};
 EditorUi.prototype.initPages=function(){this.actions.addAction("previousPage",mxUtils.bind(this,function(){this.selectNextPage(!1)}));this.actions.addAction("nextPage",mxUtils.bind(this,function(){this.selectNextPage(!0)}));this.keyHandler.bindAction(33,!0,"previousPage",!0);this.keyHandler.bindAction(34,!0,"nextPage",!0);var a=this.editor.graph,b=a.view.validateBackground;a.view.validateBackground=mxUtils.bind(this,function(){if(null!=this.tabContainer){var d=this.tabContainer.style.height;this.tabContainer.style.height=
-null==this.fileNode||null==this.pages||1==this.pages.length&&"0"==urlParams.pages?"0px":"30px";d!=this.tabContainer.style.height&&this.refresh(!1)}b.apply(a.view,arguments)});var e=!1,d=null,g=mxUtils.bind(this,function(){this.updateTabContainer();var b=this.currentPage;null!=b&&b!=d&&(null==b.viewState||null==b.viewState.scrollLeft?(this.resetScrollbars(),a.lightbox&&this.lightboxFit(),null!=this.chromelessResize&&(a.container.scrollLeft=0,a.container.scrollTop=0,this.chromelessResize())):(a.container.scrollLeft=
+null==this.fileNode||null==this.pages||1==this.pages.length&&"0"==urlParams.pages?"0px":"30px";d!=this.tabContainer.style.height&&this.refresh(!1)}b.apply(a.view,arguments)});var e=!1,d=null,h=mxUtils.bind(this,function(){this.updateTabContainer();var b=this.currentPage;null!=b&&b!=d&&(null==b.viewState||null==b.viewState.scrollLeft?(this.resetScrollbars(),a.lightbox&&this.lightboxFit(),null!=this.chromelessResize&&(a.container.scrollLeft=0,a.container.scrollTop=0,this.chromelessResize())):(a.container.scrollLeft=
 a.view.translate.x*a.view.scale+b.viewState.scrollLeft,a.container.scrollTop=a.view.translate.y*a.view.scale+b.viewState.scrollTop),d=b);null!=this.actions.layersWindow&&this.actions.layersWindow.refreshLayers();"undefined"!==typeof MathJax&&"undefined"!==typeof MathJax.Hub?e||(1!=MathJax.Hub.queue.pending||this.editor.graph.mathEnabled||MathJax.Hub.Queue(mxUtils.bind(this,function(){this.editor.graph.refresh()})),MathJax.Hub.Queue(mxUtils.bind(this,function(){e=!0}))):"undefined"===typeof Editor.MathJaxClear||
-this.editor.graph.mathEnabled||(e=!0,Editor.MathJaxClear())});this.editor.graph.model.addListener(mxEvent.CHANGE,mxUtils.bind(this,function(a,b){for(var d=b.getProperty("edit").changes,c=0;c<d.length;c++)if(d[c]instanceof SelectPage||d[c]instanceof RenamePage||d[c]instanceof MovePage||d[c]instanceof mxRootChange){g();break}}));null!=this.toolbar&&this.editor.addListener("pageSelected",this.toolbar.updateZoom)};
-Graph.prototype.createViewState=function(a){var b=a.getAttribute("page"),e=a.getAttribute("pageScale"),d=a.getAttribute("pageWidth"),g=a.getAttribute("pageHeight"),l=a.getAttribute("background"),p=a.getAttribute("backgroundImage"),p=null!=p&&0<p.length?JSON.parse(p):null;return{gridEnabled:"0"!=a.getAttribute("grid"),gridSize:parseFloat(a.getAttribute("gridSize"))||mxGraph.prototype.gridSize,guidesEnabled:"0"!=a.getAttribute("guides"),foldingEnabled:"0"!=a.getAttribute("fold"),shadowVisible:"1"==
-a.getAttribute("shadow"),pageVisible:this.lightbox?!1:null!=b?"0"!=b:this.defaultPageVisible,background:null!=l&&0<l.length?l:this.defaultGraphBackground,backgroundImage:null!=p?new mxImage(p.src,p.width,p.height):null,pageScale:null!=e?e:mxGraph.prototype.pageScale,pageFormat:null!=d&&null!=g?new mxRectangle(0,0,parseFloat(d),parseFloat(g)):this.pageFormat,tooltips:"0"!=a.getAttribute("tooltips"),connect:"0"!=a.getAttribute("connect"),arrows:"0"!=a.getAttribute("arrows"),mathEnabled:"0"!=a.getAttribute("math"),
+this.editor.graph.mathEnabled||(e=!0,Editor.MathJaxClear())});this.editor.graph.model.addListener(mxEvent.CHANGE,mxUtils.bind(this,function(a,b){for(var d=b.getProperty("edit").changes,c=0;c<d.length;c++)if(d[c]instanceof SelectPage||d[c]instanceof RenamePage||d[c]instanceof MovePage||d[c]instanceof mxRootChange){h();break}}));null!=this.toolbar&&this.editor.addListener("pageSelected",this.toolbar.updateZoom)};
+Graph.prototype.createViewState=function(a){var b=a.getAttribute("page"),e=a.getAttribute("pageScale"),d=a.getAttribute("pageWidth"),h=a.getAttribute("pageHeight"),l=a.getAttribute("background"),n=a.getAttribute("backgroundImage"),n=null!=n&&0<n.length?JSON.parse(n):null;return{gridEnabled:"0"!=a.getAttribute("grid"),gridSize:parseFloat(a.getAttribute("gridSize"))||mxGraph.prototype.gridSize,guidesEnabled:"0"!=a.getAttribute("guides"),foldingEnabled:"0"!=a.getAttribute("fold"),shadowVisible:"1"==
+a.getAttribute("shadow"),pageVisible:this.lightbox?!1:null!=b?"0"!=b:this.defaultPageVisible,background:null!=l&&0<l.length?l:this.defaultGraphBackground,backgroundImage:null!=n?new mxImage(n.src,n.width,n.height):null,pageScale:null!=e?e:mxGraph.prototype.pageScale,pageFormat:null!=d&&null!=h?new mxRectangle(0,0,parseFloat(d),parseFloat(h)):this.pageFormat,tooltips:"0"!=a.getAttribute("tooltips"),connect:"0"!=a.getAttribute("connect"),arrows:"0"!=a.getAttribute("arrows"),mathEnabled:"0"!=a.getAttribute("math"),
 selectionCells:null,defaultParent:null,scrollbars:this.defaultScrollbars,scale:1}};
 Graph.prototype.getViewState=function(){return{defaultParent:this.defaultParent,currentRoot:this.view.currentRoot,gridEnabled:this.gridEnabled,gridSize:this.gridSize,guidesEnabled:this.graphHandler.guidesEnabled,foldingEnabled:this.foldingEnabled,shadowVisible:this.shadowVisible,scrollbars:this.scrollbars,pageVisible:this.pageVisible,background:this.background,backgroundImage:this.backgroundImage,pageScale:this.pageScale,pageFormat:this.pageFormat,tooltips:this.tooltipHandler.isEnabled(),connect:this.connectionHandler.isEnabled(),
 arrows:this.connectionArrowsEnabled,scale:this.view.scale,scrollLeft:this.container.scrollLeft-this.view.translate.x*this.view.scale,scrollTop:this.container.scrollTop-this.view.translate.y*this.view.scale,translate:this.view.translate.clone(),lastPasteXml:this.lastPasteXml,pasteCounter:this.pasteCounter,mathEnabled:this.mathEnabled}};
@@ -2928,72 +2929,72 @@ EditorUi.prototype.duplicatePage=function(a,b){var e=this.editor.graph,d=null;e.
 EditorUi.prototype.renamePage=function(a){if(this.editor.graph.isEnabled()){var b=new FilenameDialog(this,a.getName(),mxResources.get("rename"),mxUtils.bind(this,function(b){null!=b&&0<b.length&&this.editor.graph.model.execute(new RenamePage(this,a,b))}),mxResources.get("rename"));this.showDialog(b.container,300,80,!0,!0);b.init()}return a};EditorUi.prototype.movePage=function(a,b){this.editor.graph.model.execute(new MovePage(this,a,b))};
 EditorUi.prototype.createTabContainer=function(){var a=document.createElement("div");a.style.backgroundColor="#dcdcdc";a.style.position="absolute";a.style.whiteSpace="nowrap";a.style.overflow="hidden";a.style.height="0px";return a};
 EditorUi.prototype.updateTabContainer=function(){if(null!=this.tabContainer&&null!=this.pages){var a=this.editor.graph,b=document.createElement("div");b.style.position="relative";b.style.display=mxClient.IS_QUIRKS?"inline":"inline-block";b.style.verticalAlign="top";b.style.height=this.tabContainer.style.height;b.style.whiteSpace="nowrap";b.style.overflow="hidden";b.style.fontSize="12px";b.style.marginLeft="30px";for(var e=this.editor.chromeless?29:59,d=Math.min(140,Math.max(20,(this.tabContainer.clientWidth-
-e)/this.pages.length)+1),g=null,l=0;l<this.pages.length;l++)mxUtils.bind(this,function(c,d){this.pages[c]==this.currentPage&&(d.style.backgroundColor="#eeeeee",d.style.fontWeight="bold",d.style.borderTopStyle="none");d.setAttribute("draggable","true");mxEvent.addListener(d,"dragstart",mxUtils.bind(this,function(b){a.isEnabled()?(mxClient.IS_FF&&b.dataTransfer.setData("Text","<diagram/>"),g=c):mxEvent.consume(b)}));mxEvent.addListener(d,"dragend",mxUtils.bind(this,function(a){g=null;a.stopPropagation();
-a.preventDefault()}));mxEvent.addListener(d,"dragover",mxUtils.bind(this,function(a){null!=g&&(a.dataTransfer.dropEffect="move");a.stopPropagation();a.preventDefault()}));mxEvent.addListener(d,"drop",mxUtils.bind(this,function(a){null!=g&&c!=g&&this.movePage(g,c);a.stopPropagation();a.preventDefault()}));b.appendChild(d)})(l,this.createTabForPage(this.pages[l],d,this.pages[l]!=this.currentPage));this.tabContainer.innerHTML="";this.tabContainer.appendChild(b);d=this.createPageMenuTab();this.tabContainer.appendChild(d);
-d=null;if(1==urlParams.embed||null!=this.getCurrentFile()&&this.getCurrentFile().isEditable())d=this.createPageInsertTab(),this.tabContainer.appendChild(d);if(b.clientWidth>this.tabContainer.clientWidth-e){null!=d&&(d.style.position="absolute",d.style.right="0px",b.style.marginRight="30px");var p=this.createControlTab(4,"&nbsp;&#10094;&nbsp;");p.style.position="absolute";p.style.right=this.editor.chromeless?"29px":"55px";p.style.fontSize="13pt";this.tabContainer.appendChild(p);var q=this.createControlTab(4,
-"&nbsp;&#10095;");q.style.position="absolute";q.style.right=this.editor.chromeless?"0px":"29px";q.style.fontSize="13pt";this.tabContainer.appendChild(q);var c=Math.max(0,this.tabContainer.clientWidth-(this.editor.chromeless?86:116));b.style.width=c+"px";mxEvent.addListener(p,"click",mxUtils.bind(this,function(a){b.scrollLeft-=Math.max(20,c-20);mxUtils.setOpacity(p,0<b.scrollLeft?100:50);mxUtils.setOpacity(q,b.scrollLeft<b.scrollWidth-b.clientWidth?100:50);mxEvent.consume(a)}));mxUtils.setOpacity(p,
-0<b.scrollLeft?100:50);mxUtils.setOpacity(q,b.scrollLeft<b.scrollWidth-b.clientWidth?100:50);mxEvent.addListener(q,"click",mxUtils.bind(this,function(a){b.scrollLeft+=Math.max(20,c-20);mxUtils.setOpacity(p,0<b.scrollLeft?100:50);mxUtils.setOpacity(q,b.scrollLeft<b.scrollWidth-b.clientWidth?100:50);mxEvent.consume(a)}))}}};
+e)/this.pages.length)+1),h=null,l=0;l<this.pages.length;l++)mxUtils.bind(this,function(c,d){this.pages[c]==this.currentPage&&(d.style.backgroundColor="#eeeeee",d.style.fontWeight="bold",d.style.borderTopStyle="none");d.setAttribute("draggable","true");mxEvent.addListener(d,"dragstart",mxUtils.bind(this,function(b){a.isEnabled()?(mxClient.IS_FF&&b.dataTransfer.setData("Text","<diagram/>"),h=c):mxEvent.consume(b)}));mxEvent.addListener(d,"dragend",mxUtils.bind(this,function(a){h=null;a.stopPropagation();
+a.preventDefault()}));mxEvent.addListener(d,"dragover",mxUtils.bind(this,function(a){null!=h&&(a.dataTransfer.dropEffect="move");a.stopPropagation();a.preventDefault()}));mxEvent.addListener(d,"drop",mxUtils.bind(this,function(a){null!=h&&c!=h&&this.movePage(h,c);a.stopPropagation();a.preventDefault()}));b.appendChild(d)})(l,this.createTabForPage(this.pages[l],d,this.pages[l]!=this.currentPage));this.tabContainer.innerHTML="";this.tabContainer.appendChild(b);d=this.createPageMenuTab();this.tabContainer.appendChild(d);
+d=null;if(1==urlParams.embed||null!=this.getCurrentFile()&&this.getCurrentFile().isEditable())d=this.createPageInsertTab(),this.tabContainer.appendChild(d);if(b.clientWidth>this.tabContainer.clientWidth-e){null!=d&&(d.style.position="absolute",d.style.right="0px",b.style.marginRight="30px");var n=this.createControlTab(4,"&nbsp;&#10094;&nbsp;");n.style.position="absolute";n.style.right=this.editor.chromeless?"29px":"55px";n.style.fontSize="13pt";this.tabContainer.appendChild(n);var q=this.createControlTab(4,
+"&nbsp;&#10095;");q.style.position="absolute";q.style.right=this.editor.chromeless?"0px":"29px";q.style.fontSize="13pt";this.tabContainer.appendChild(q);var c=Math.max(0,this.tabContainer.clientWidth-(this.editor.chromeless?86:116));b.style.width=c+"px";mxEvent.addListener(n,"click",mxUtils.bind(this,function(a){b.scrollLeft-=Math.max(20,c-20);mxUtils.setOpacity(n,0<b.scrollLeft?100:50);mxUtils.setOpacity(q,b.scrollLeft<b.scrollWidth-b.clientWidth?100:50);mxEvent.consume(a)}));mxUtils.setOpacity(n,
+0<b.scrollLeft?100:50);mxUtils.setOpacity(q,b.scrollLeft<b.scrollWidth-b.clientWidth?100:50);mxEvent.addListener(q,"click",mxUtils.bind(this,function(a){b.scrollLeft+=Math.max(20,c-20);mxUtils.setOpacity(n,0<b.scrollLeft?100:50);mxUtils.setOpacity(q,b.scrollLeft<b.scrollWidth-b.clientWidth?100:50);mxEvent.consume(a)}))}}};
 EditorUi.prototype.createTab=function(a){var b=document.createElement("div");b.style.display=mxClient.IS_QUIRKS?"inline":"inline-block";b.style.whiteSpace="nowrap";b.style.boxSizing="border-box";b.style.position="relative";b.style.overflow="hidden";b.style.marginLeft="-1px";b.style.height=this.tabContainer.clientHeight+"px";b.style.padding="8px 4px 8px 4px";b.style.border="1px solid #c0c0c0";b.style.borderBottomStyle="solid";b.style.backgroundColor=this.tabContainer.style.backgroundColor;b.style.cursor=
 "default";b.style.color="gray";a&&(mxEvent.addListener(b,"mouseenter",mxUtils.bind(this,function(a){this.editor.graph.isMouseDown||(b.style.backgroundColor="#d3d3d3",mxEvent.consume(a))})),mxEvent.addListener(b,"mouseleave",mxUtils.bind(this,function(a){b.style.backgroundColor=this.tabContainer.style.backgroundColor;mxEvent.consume(a)})));return b};
 EditorUi.prototype.createControlTab=function(a,b){var e=this.createTab(!0);e.style.paddingTop=a+"px";e.style.cursor="pointer";e.style.width="30px";e.style.lineHeight="30px";e.innerHTML=b;null!=e.firstChild&&null!=e.firstChild.style&&mxUtils.setOpacity(e.firstChild,40);return e};
 EditorUi.prototype.createPageMenuTab=function(){var a=this.createControlTab(3,'<div class="geSprite geSprite-dots" style="display:inline-block;width:21px;height:21px;"></div>');a.setAttribute("title",mxResources.get("pages"));a.style.position="absolute";a.style.left="1px";mxEvent.addListener(a,"click",mxUtils.bind(this,function(a){this.editor.graph.popupMenuHandler.hideMenu();var b=new mxPopupMenu(mxUtils.bind(this,function(a,b){for(var d=0;d<this.pages.length;d++)mxUtils.bind(this,function(c){var d=
 a.addItem(this.pages[c].getName(),null,mxUtils.bind(this,function(){this.selectPage(this.pages[c])}),b);this.pages[c]==this.currentPage&&a.addCheckmark(d,Editor.checkmarkImage)})(d);if(this.editor.graph.isEnabled()){a.addSeparator(b);a.addItem(mxResources.get("insertPage"),null,mxUtils.bind(this,function(){this.insertPage()}),b);var c=this.currentPage;null!=c&&(a.addSeparator(b),a.addItem(mxResources.get("delete"),null,mxUtils.bind(this,function(){this.removePage(c)}),b),a.addItem(mxResources.get("rename"),
-null,mxUtils.bind(this,function(){this.renamePage(c,c.getName())}),b),a.addSeparator(b),a.addItem(mxResources.get("duplicate"),null,mxUtils.bind(this,function(){this.duplicatePage(c,mxResources.get("copyOf",[c.getName()]))}),b))}}));b.div.className+=" geMenubarMenu";b.smartSeparators=!0;b.showDisabled=!0;b.autoExpand=!0;b.hideMenu=mxUtils.bind(this,function(){mxPopupMenu.prototype.hideMenu.apply(b,arguments);b.destroy()});var d=mxEvent.getClientX(a),g=mxEvent.getClientY(a);b.popup(d,g,null,a);this.setCurrentMenu(b);
+null,mxUtils.bind(this,function(){this.renamePage(c,c.getName())}),b),a.addSeparator(b),a.addItem(mxResources.get("duplicate"),null,mxUtils.bind(this,function(){this.duplicatePage(c,mxResources.get("copyOf",[c.getName()]))}),b))}}));b.div.className+=" geMenubarMenu";b.smartSeparators=!0;b.showDisabled=!0;b.autoExpand=!0;b.hideMenu=mxUtils.bind(this,function(){mxPopupMenu.prototype.hideMenu.apply(b,arguments);b.destroy()});var d=mxEvent.getClientX(a),h=mxEvent.getClientY(a);b.popup(d,h,null,a);this.setCurrentMenu(b);
 mxEvent.consume(a)}));return a};EditorUi.prototype.createPageInsertTab=function(){var a=this.createControlTab(4,'<div class="geSprite geSprite-plus" style="display:inline-block;width:21px;height:21px;"></div>');a.setAttribute("title",mxResources.get("insertPage"));mxEvent.addListener(a,"click",mxUtils.bind(this,function(a){this.insertPage();mxEvent.consume(a)}));return a};
 EditorUi.prototype.createTabForPage=function(a,b,e){e=this.createTab(e);var d=a.getName();e.setAttribute("title",d);mxUtils.write(e,d);e.style.maxWidth=b+"px";e.style.width=b+"px";this.addTabListeners(a,e);42<b&&(e.style.textOverflow="ellipsis");return e};
-EditorUi.prototype.addTabListeners=function(a,b){mxEvent.disableContextMenu(b);var e=this.editor.graph;mxEvent.addListener(b,"dblclick",mxUtils.bind(this,function(b){this.renamePage(a);mxEvent.consume(b)}));var d=!1,g=!1;mxEvent.addGestureListeners(b,mxUtils.bind(this,function(b){d=null!=this.currentMenu;g=a==this.currentPage;e.isMouseDown||g||this.selectPage(a)}),null,mxUtils.bind(this,function(l){if(e.isEnabled()&&!e.isMouseDown&&(mxEvent.isTouchEvent(l)&&g||mxEvent.isPopupTrigger(l))){e.popupMenuHandler.hideMenu();
-this.hideCurrentMenu();if(!mxEvent.isTouchEvent(l)||!d){var p=new mxPopupMenu(this.createPageMenu(a));p.div.className+=" geMenubarMenu";p.smartSeparators=!0;p.showDisabled=!0;p.autoExpand=!0;p.hideMenu=mxUtils.bind(this,function(){mxPopupMenu.prototype.hideMenu.apply(p,arguments);this.resetCurrentMenu();p.destroy()});var q=mxEvent.getClientX(l),c=mxEvent.getClientY(l);p.popup(q,c,null,l);this.setCurrentMenu(p,b)}mxEvent.consume(l)}}))};
+EditorUi.prototype.addTabListeners=function(a,b){mxEvent.disableContextMenu(b);var e=this.editor.graph;mxEvent.addListener(b,"dblclick",mxUtils.bind(this,function(b){this.renamePage(a);mxEvent.consume(b)}));var d=!1,h=!1;mxEvent.addGestureListeners(b,mxUtils.bind(this,function(b){d=null!=this.currentMenu;h=a==this.currentPage;e.isMouseDown||h||this.selectPage(a)}),null,mxUtils.bind(this,function(l){if(e.isEnabled()&&!e.isMouseDown&&(mxEvent.isTouchEvent(l)&&h||mxEvent.isPopupTrigger(l))){e.popupMenuHandler.hideMenu();
+this.hideCurrentMenu();if(!mxEvent.isTouchEvent(l)||!d){var n=new mxPopupMenu(this.createPageMenu(a));n.div.className+=" geMenubarMenu";n.smartSeparators=!0;n.showDisabled=!0;n.autoExpand=!0;n.hideMenu=mxUtils.bind(this,function(){mxPopupMenu.prototype.hideMenu.apply(n,arguments);this.resetCurrentMenu();n.destroy()});var q=mxEvent.getClientX(l),c=mxEvent.getClientY(l);n.popup(q,c,null,l);this.setCurrentMenu(n,b)}mxEvent.consume(l)}}))};
 EditorUi.prototype.createPageMenu=function(a,b){return mxUtils.bind(this,function(e,d){e.addItem(mxResources.get("insert"),null,mxUtils.bind(this,function(){this.insertPage(null,mxUtils.indexOf(this.pages,a)+1)}),d);e.addItem(mxResources.get("delete"),null,mxUtils.bind(this,function(){this.removePage(a)}),d);e.addItem(mxResources.get("rename"),null,mxUtils.bind(this,function(){this.renamePage(a,b)}),d);e.addSeparator(d);e.addItem(mxResources.get("duplicate"),null,mxUtils.bind(this,function(){this.duplicatePage(a,
 mxResources.get("copyOf",[a.getName()]))}),d)})};(function(){var a=mxClient.IS_SVG?"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADQAAAA0CAMAAADypuvZAAAAhFBMVEUAAAD///8KCgpNTU24uLgBAQEBAQEMDAxFRUWEhIQBAQEBAQEBAQEAAAAVFRXAwMBYWFgBAQEBAQEAAAAAAAAAAAAAAAAAAAABAQEBAQEAAAAAAAAAAAABAQEBAQEAAAAAAAASEhLAwMC+vr4BAQEBAQEAAAAAAAAAAAABAQEAAAD///+vipwtAAAAKnRSTlMA/Prw9f7A+fHq1uvFOfPv7+TOmkUyCwb3kT9UT+yPLAL49PTbkmloKvYw/P7BAAABe0lEQVRIx52W63LCIBBGwRhUkFxNYtTEa9Xi+79fR9KxrgtY9/xjMmcIH5ddhmmqSylk3nW5FOWlath7dCsNQLY6bOzWwjgQ64CzmhsPYuVR6jY2XuK2djnbwgQptthZKPMGtXh1NkvzluXmZR7geC0w17YziNHIILrrU26FwzkeHVbxl+GXwxnfbmOH1T72NHY6Tiv+3eXd3Ol4rPnOSmv0YWIda03QxyF3NNE+5XxwOE/3aCp7F9CKkiyacevMoixBq9JDdJjpIE2NcQbYnIyDaJAi4+DUsCqGGSRYSmAaccXOMOs0w1KWwuTPrIT7w6dwTcMA7lfJBHDugd2x6T0NgCWYfDkH3GKdpwGwJMuB4wFaOVOP3A63IIdHhookkX6PFAQpctLmko4R6cCSrgbtEjJtCNed8LAQnjDSY0l4ljWhAPT0UmO5/rOoqSulfH5eqL83lJaA1nxg6j7U5vS1r6ESgYbKj7d1C6N7Cf9L9joogHZUKW87+gMYYTZWVGas2QAAAABJRU5ErkJggg==":
-IMAGE_PATH+"/move.png",b=Graph.prototype.foldCells;Graph.prototype.foldCells=function(a,d,e,q,c){d=null!=d?d:!1;null==e&&(e=this.getFoldableCells(this.getSelectionCells(),a));this.stopEditing();this.model.beginUpdate();try{for(var f=e.slice(),g=[],l=0;l<e.length;l++){var p=this.view.getState(e[l]),u=null!=p?p.style:this.getCellStyle(e[l]);"1"==mxUtils.getValue(u,"treeFolding","0")&&(this.traverse(e[l],!0,mxUtils.bind(this,function(a,b){null!=b&&g.push(b);a!=e[l]&&g.push(a);return a==e[l]||!this.model.isCollapsed(a)})),
-this.model.setCollapsed(e[l],a))}for(l=0;l<g.length;l++)this.model.setVisible(g[l],!a);e=f;e=b.apply(this,arguments)}finally{this.model.endUpdate()}return e};var e=EditorUi.prototype.init;EditorUi.prototype.init=function(){e.apply(this,arguments);this.editor.chromeless||this.addTrees()};EditorUi.prototype.addTrees=function(){function b(a){return t.isVertex(a)&&d(a)}function d(a){var b=!1;null!=a&&(a=t.getParent(a),b=k.view.getState(a),k.view.getState(a),b="tree"==(null!=b?b.style:k.getCellStyle(a)).containerType);
-return b}function e(a){var b=!1;null!=a&&(a=t.getParent(a),b=k.view.getState(a),k.view.getState(a),b=null!=(null!=b?b.style:k.getCellStyle(a)).childLayout);return b}function q(a){a=k.view.getState(a);if(null!=a){var b=k.getIncomingEdges(a.cell);if(0<b.length&&(b=k.view.getState(b[0]),null!=b&&(b=b.absolutePoints,null!=b&&0<b.length&&(b=b[b.length-1],null!=b)))){if(b.y==a.y&&Math.abs(b.x-a.getCenterX())<a.width/2)return mxConstants.DIRECTION_SOUTH;if(b.y==a.y+a.height&&Math.abs(b.x-a.getCenterX())<
-a.width/2)return mxConstants.DIRECTION_NORTH;if(b.x>a.getCenterX())return mxConstants.DIRECTION_WEST}}return mxConstants.DIRECTION_EAST}function c(a,b){b=null!=b?b:!0;k.model.beginUpdate();try{var c=k.model.getParent(a),d=k.getIncomingEdges(a),e=k.cloneCells([d[0],a]);k.model.setTerminal(e[0],k.model.getTerminal(d[0],!0),!0);var f=q(a),h=c.geometry;f==mxConstants.DIRECTION_SOUTH||f==mxConstants.DIRECTION_NORTH?e[1].geometry.x+=b?a.geometry.width+10:-e[1].geometry.width-10:e[1].geometry.y+=b?a.geometry.height+
-10:-e[1].geometry.height-10;f==mxConstants.DIRECTION_WEST&&(e[1].geometry.x=a.geometry.x+a.geometry.width-e[1].geometry.width);k.view.currentRoot!=c&&(e[1].geometry.x-=h.x,e[1].geometry.y-=h.y);var g=k.view.getState(a),l=k.view.scale;if(null!=g){var m=mxRectangle.fromRectangle(g);f==mxConstants.DIRECTION_SOUTH||f==mxConstants.DIRECTION_NORTH?m.x+=(b?a.geometry.width+10:-e[1].geometry.width-10)*l:m.y+=(b?a.geometry.height+10:-e[1].geometry.height-10)*l;var p=k.getOutgoingEdges(k.model.getTerminal(d[0],
-!0));if(null!=p){for(var n=f==mxConstants.DIRECTION_SOUTH||f==mxConstants.DIRECTION_NORTH,r=h=d=0;r<p.length;r++){var z=k.model.getTerminal(p[r],!1);if(f==q(z)){var t=k.view.getState(z);z!=a&&null!=t&&(n&&b!=t.getCenterX()<g.getCenterX()||!n&&b!=t.getCenterY()<g.getCenterY())&&mxUtils.intersects(m,t)&&(d=10+Math.max(d,(Math.min(m.x+m.width,t.x+t.width)-Math.max(m.x,t.x))/l),h=10+Math.max(h,(Math.min(m.y+m.height,t.y+t.height)-Math.max(m.y,t.y))/l))}}n?h=0:d=0;for(r=0;r<p.length;r++)if(z=k.model.getTerminal(p[r],
-!1),f==q(z)&&(t=k.view.getState(z),z!=a&&null!=t&&(n&&b!=t.getCenterX()<g.getCenterX()||!n&&b!=t.getCenterY()<g.getCenterY()))){var u=[];k.traverse(t.cell,!0,function(a,b){null!=b&&u.push(b);u.push(a);return!0});k.moveCells(u,(b?1:-1)*d,(b?1:-1)*h)}}}return k.addCells(e,c)}finally{k.model.endUpdate()}}function f(a){k.model.beginUpdate();try{var b=q(a),c=k.getIncomingEdges(a),d=k.cloneCells([c[0],a]);k.model.setTerminal(c[0],d[1],!1);k.model.setTerminal(d[0],d[1],!0);k.model.setTerminal(d[0],a,!1);
-var e=k.model.getParent(a),f=e.geometry,h=[];k.view.currentRoot!=e&&(d[1].geometry.x-=f.x,d[1].geometry.y-=f.y);k.traverse(a,!0,function(a,b){null!=b&&h.push(b);h.push(a);return!0});var g=a.geometry.width+40,l=a.geometry.height+40;b==mxConstants.DIRECTION_SOUTH?g=0:b==mxConstants.DIRECTION_NORTH?(g=0,l=-40):b==mxConstants.DIRECTION_WEST?(g=-40,l=0):b==mxConstants.DIRECTION_EAST&&(l=0);k.moveCells(h,g,l);return k.addCells(d,e)}finally{k.model.endUpdate()}}function h(a){k.model.beginUpdate();try{var b=
-k.model.getParent(a),c=k.getIncomingEdges(a),d=k.cloneCells([c[0],a]);k.model.setTerminal(d[0],a,!0);var c=k.getOutgoingEdges(a),e=b.geometry,f=[];k.view.currentRoot==b&&(e=new mxRectangle);for(var h=0;h<c.length;h++){var g=k.model.getTerminal(c[h],!1);null!=g&&f.push(g)}var l=k.view.getBounds(f),m=q(a),p=k.view.translate,n=k.view.scale;m==mxConstants.DIRECTION_SOUTH?(d[1].geometry.x=null==l?a.geometry.x+(a.geometry.width-d[1].geometry.width)/2:(l.x+l.width)/n-p.x-e.x+10,d[1].geometry.y+=a.geometry.height-
-e.y+40):m==mxConstants.DIRECTION_NORTH?(d[1].geometry.x=null==l?a.geometry.x+(a.geometry.width-d[1].geometry.width)/2:(l.x+l.width)/n-p.x+-e.x+10,d[1].geometry.y-=d[1].geometry.height-e.y+40):(d[1].geometry.x=m==mxConstants.DIRECTION_WEST?d[1].geometry.x-(d[1].geometry.width-e.x+40):d[1].geometry.x+(a.geometry.width-e.x+40),d[1].geometry.y=null==l?a.geometry.y+(a.geometry.height-d[1].geometry.height)/2:(l.y+l.height)/n-p.y+-e.y+10);return k.addCells(d,b)}finally{k.model.endUpdate()}}function m(a,
-b,c){a=k.getOutgoingEdges(a);c=k.view.getState(c);var d=[];if(null!=c&&null!=a){for(var e=0;e<a.length;e++){var f=k.view.getState(k.model.getTerminal(a[e],!1));null!=f&&(!b&&Math.min(f.x+f.width,c.x+c.width)>=Math.max(f.x,c.x)||b&&Math.min(f.y+f.height,c.y+c.height)>=Math.max(f.y,c.y))&&d.push(f)}d.sort(function(a,c){return b?a.x+a.width-c.x-c.width:a.y+a.height-c.y-c.height})}return d}function n(a,b){var c=q(a),d=b==mxConstants.DIRECTION_EAST||b==mxConstants.DIRECTION_WEST;(c==mxConstants.DIRECTION_EAST||
-c==mxConstants.DIRECTION_WEST)==d&&c!=b?r.actions.get("selectParent").funct():c==b?(d=k.getOutgoingEdges(a),null!=d&&0<d.length&&k.setSelectionCell(k.model.getTerminal(d[0],!1))):(c=k.getIncomingEdges(a),null!=c&&0<c.length&&(d=m(k.model.getTerminal(c[0],!0),d,a),c=k.view.getState(a),null!=c&&(c=mxUtils.indexOf(d,c),0<=c&&(c+=b==mxConstants.DIRECTION_NORTH||b==mxConstants.DIRECTION_WEST?-1:1,0<=c&&c<=d.length-1&&k.setSelectionCell(d[c].cell)))))}function u(b){this.images=[];var c=b.view.graph,d=mxUtils.createImage(a);
+IMAGE_PATH+"/move.png",b=Graph.prototype.foldCells;Graph.prototype.foldCells=function(a,d,e,q,c){d=null!=d?d:!1;null==e&&(e=this.getFoldableCells(this.getSelectionCells(),a));this.stopEditing();this.model.beginUpdate();try{for(var f=e.slice(),g=[],h=0;h<e.length;h++){var l=this.view.getState(e[h]),n=null!=l?l.style:this.getCellStyle(e[h]);"1"==mxUtils.getValue(n,"treeFolding","0")&&(this.traverse(e[h],!0,mxUtils.bind(this,function(a,b){null!=b&&g.push(b);a!=e[h]&&g.push(a);return a==e[h]||!this.model.isCollapsed(a)})),
+this.model.setCollapsed(e[h],a))}for(h=0;h<g.length;h++)this.model.setVisible(g[h],!a);e=f;e=b.apply(this,arguments)}finally{this.model.endUpdate()}return e};var e=EditorUi.prototype.init;EditorUi.prototype.init=function(){e.apply(this,arguments);this.editor.chromeless||this.addTrees()};EditorUi.prototype.addTrees=function(){function b(a){return v.isVertex(a)&&d(a)}function d(a){var b=!1;null!=a&&(a=v.getParent(a),b=k.view.getState(a),k.view.getState(a),b="tree"==(null!=b?b.style:k.getCellStyle(a)).containerType);
+return b}function e(a){var b=!1;null!=a&&(a=v.getParent(a),b=k.view.getState(a),k.view.getState(a),b=null!=(null!=b?b.style:k.getCellStyle(a)).childLayout);return b}function q(a){a=k.view.getState(a);if(null!=a){var b=k.getIncomingEdges(a.cell);if(0<b.length&&(b=k.view.getState(b[0]),null!=b&&(b=b.absolutePoints,null!=b&&0<b.length&&(b=b[b.length-1],null!=b)))){if(b.y==a.y&&Math.abs(b.x-a.getCenterX())<a.width/2)return mxConstants.DIRECTION_SOUTH;if(b.y==a.y+a.height&&Math.abs(b.x-a.getCenterX())<
+a.width/2)return mxConstants.DIRECTION_NORTH;if(b.x>a.getCenterX())return mxConstants.DIRECTION_WEST}}return mxConstants.DIRECTION_EAST}function c(a,b){b=null!=b?b:!0;k.model.beginUpdate();try{var c=k.model.getParent(a),d=k.getIncomingEdges(a),e=k.cloneCells([d[0],a]);k.model.setTerminal(e[0],k.model.getTerminal(d[0],!0),!0);var f=q(a),g=c.geometry;f==mxConstants.DIRECTION_SOUTH||f==mxConstants.DIRECTION_NORTH?e[1].geometry.x+=b?a.geometry.width+10:-e[1].geometry.width-10:e[1].geometry.y+=b?a.geometry.height+
+10:-e[1].geometry.height-10;f==mxConstants.DIRECTION_WEST&&(e[1].geometry.x=a.geometry.x+a.geometry.width-e[1].geometry.width);k.view.currentRoot!=c&&(e[1].geometry.x-=g.x,e[1].geometry.y-=g.y);var h=k.view.getState(a),l=k.view.scale;if(null!=h){var n=mxRectangle.fromRectangle(h);f==mxConstants.DIRECTION_SOUTH||f==mxConstants.DIRECTION_NORTH?n.x+=(b?a.geometry.width+10:-e[1].geometry.width-10)*l:n.y+=(b?a.geometry.height+10:-e[1].geometry.height-10)*l;var p=k.getOutgoingEdges(k.model.getTerminal(d[0],
+!0));if(null!=p){for(var m=f==mxConstants.DIRECTION_SOUTH||f==mxConstants.DIRECTION_NORTH,r=g=d=0;r<p.length;r++){var t=k.model.getTerminal(p[r],!1);if(f==q(t)){var y=k.view.getState(t);t!=a&&null!=y&&(m&&b!=y.getCenterX()<h.getCenterX()||!m&&b!=y.getCenterY()<h.getCenterY())&&mxUtils.intersects(n,y)&&(d=10+Math.max(d,(Math.min(n.x+n.width,y.x+y.width)-Math.max(n.x,y.x))/l),g=10+Math.max(g,(Math.min(n.y+n.height,y.y+y.height)-Math.max(n.y,y.y))/l))}}m?g=0:d=0;for(r=0;r<p.length;r++)if(t=k.model.getTerminal(p[r],
+!1),f==q(t)&&(y=k.view.getState(t),t!=a&&null!=y&&(m&&b!=y.getCenterX()<h.getCenterX()||!m&&b!=y.getCenterY()<h.getCenterY()))){var u=[];k.traverse(y.cell,!0,function(a,b){null!=b&&u.push(b);u.push(a);return!0});k.moveCells(u,(b?1:-1)*d,(b?1:-1)*g)}}}return k.addCells(e,c)}finally{k.model.endUpdate()}}function f(a){k.model.beginUpdate();try{var b=q(a),c=k.getIncomingEdges(a),d=k.cloneCells([c[0],a]);k.model.setTerminal(c[0],d[1],!1);k.model.setTerminal(d[0],d[1],!0);k.model.setTerminal(d[0],a,!1);
+var e=k.model.getParent(a),f=e.geometry,g=[];k.view.currentRoot!=e&&(d[1].geometry.x-=f.x,d[1].geometry.y-=f.y);k.traverse(a,!0,function(a,b){null!=b&&g.push(b);g.push(a);return!0});var h=a.geometry.width+40,l=a.geometry.height+40;b==mxConstants.DIRECTION_SOUTH?h=0:b==mxConstants.DIRECTION_NORTH?(h=0,l=-40):b==mxConstants.DIRECTION_WEST?(h=-40,l=0):b==mxConstants.DIRECTION_EAST&&(l=0);k.moveCells(g,h,l);return k.addCells(d,e)}finally{k.model.endUpdate()}}function g(a){k.model.beginUpdate();try{var b=
+k.model.getParent(a),c=k.getIncomingEdges(a),d=k.cloneCells([c[0],a]);k.model.setTerminal(d[0],a,!0);var c=k.getOutgoingEdges(a),e=b.geometry,f=[];k.view.currentRoot==b&&(e=new mxRectangle);for(var g=0;g<c.length;g++){var h=k.model.getTerminal(c[g],!1);null!=h&&f.push(h)}var l=k.view.getBounds(f),n=q(a),p=k.view.translate,m=k.view.scale;n==mxConstants.DIRECTION_SOUTH?(d[1].geometry.x=null==l?a.geometry.x+(a.geometry.width-d[1].geometry.width)/2:(l.x+l.width)/m-p.x-e.x+10,d[1].geometry.y+=a.geometry.height-
+e.y+40):n==mxConstants.DIRECTION_NORTH?(d[1].geometry.x=null==l?a.geometry.x+(a.geometry.width-d[1].geometry.width)/2:(l.x+l.width)/m-p.x+-e.x+10,d[1].geometry.y-=d[1].geometry.height-e.y+40):(d[1].geometry.x=n==mxConstants.DIRECTION_WEST?d[1].geometry.x-(d[1].geometry.width-e.x+40):d[1].geometry.x+(a.geometry.width-e.x+40),d[1].geometry.y=null==l?a.geometry.y+(a.geometry.height-d[1].geometry.height)/2:(l.y+l.height)/m-p.y+-e.y+10);return k.addCells(d,b)}finally{k.model.endUpdate()}}function p(a,
+b,c){a=k.getOutgoingEdges(a);c=k.view.getState(c);var d=[];if(null!=c&&null!=a){for(var e=0;e<a.length;e++){var f=k.view.getState(k.model.getTerminal(a[e],!1));null!=f&&(!b&&Math.min(f.x+f.width,c.x+c.width)>=Math.max(f.x,c.x)||b&&Math.min(f.y+f.height,c.y+c.height)>=Math.max(f.y,c.y))&&d.push(f)}d.sort(function(a,c){return b?a.x+a.width-c.x-c.width:a.y+a.height-c.y-c.height})}return d}function m(a,b){var c=q(a),d=b==mxConstants.DIRECTION_EAST||b==mxConstants.DIRECTION_WEST;(c==mxConstants.DIRECTION_EAST||
+c==mxConstants.DIRECTION_WEST)==d&&c!=b?r.actions.get("selectParent").funct():c==b?(d=k.getOutgoingEdges(a),null!=d&&0<d.length&&k.setSelectionCell(k.model.getTerminal(d[0],!1))):(c=k.getIncomingEdges(a),null!=c&&0<c.length&&(d=p(k.model.getTerminal(c[0],!0),d,a),c=k.view.getState(a),null!=c&&(c=mxUtils.indexOf(d,c),0<=c&&(c+=b==mxConstants.DIRECTION_NORTH||b==mxConstants.DIRECTION_WEST?-1:1,0<=c&&c<=d.length-1&&k.setSelectionCell(d[c].cell)))))}function u(b){this.images=[];var c=b.view.graph,d=mxUtils.createImage(a);
 d.setAttribute("title","Move Cell without Subtree");d.style.position="absolute";d.style.cursor="pointer";d.style.width="26px";d.style.height="26px";d.style.left=b.getCenterX()-13+"px";d.style.top=b.getCenterY()-13+"px";mxEvent.addGestureListeners(d,mxUtils.bind(this,function(a){c.stopEditing(!1);r.hoverIcons.reset();c.isCellSelected(b.cell)||c.setSelectionCell(b.cell);c.graphHandler.start(b.cell,mxEvent.getClientX(a),mxEvent.getClientY(a));c.graphHandler.cells=[b.cell];c.graphHandler.bounds=c.graphHandler.graph.getView().getBounds(c.graphHandler.cells);
-c.graphHandler.pBounds=c.graphHandler.getPreviewBounds(c.graphHandler.cells);c.graphHandler.cellWasClicked=!0;c.isMouseDown=!0;c.isMouseTrigger=mxEvent.isMouseEvent(a);mxEvent.consume(a);mxEvent.consume(a);this.destroy()}));b.view.graph.container.appendChild(d);this.images.push(d)}var r=this,k=r.editor.graph,t=k.getModel();mxResources.parse("selectChildren=Select Children");mxResources.parse("selectSiblings=Select Siblings");mxResources.parse("selectSubtree=Select Subtree");mxResources.parse("selectParent=Select Parent");
-var v=r.menus.createPopupMenu;r.menus.createPopupMenu=function(a,c,d){v.apply(this,arguments);if(b(k.getSelectionCell())&&1==k.getSelectionCount()){c=k.getSelectionCell();var e=k.getOutgoingEdges(c);a.addSeparator();null!=e&&0<e.length&&this.addMenuItems(a,["selectChildren","selectSubtree"],null,d);a.addSeparator();0<k.getIncomingEdges(c).length&&this.addMenuItems(a,["selectSiblings","selectParent"],null,d)}};r.actions.addAction("selectChildren",function(){if(k.isEnabled()&&1==k.getSelectionCount()){var a=
+c.graphHandler.pBounds=c.graphHandler.getPreviewBounds(c.graphHandler.cells);c.graphHandler.cellWasClicked=!0;c.isMouseDown=!0;c.isMouseTrigger=mxEvent.isMouseEvent(a);mxEvent.consume(a);mxEvent.consume(a);this.destroy()}));b.view.graph.container.appendChild(d);this.images.push(d)}var r=this,k=r.editor.graph,v=k.getModel();mxResources.parse("selectChildren=Select Children");mxResources.parse("selectSiblings=Select Siblings");mxResources.parse("selectSubtree=Select Subtree");mxResources.parse("selectParent=Select Parent");
+var t=r.menus.createPopupMenu;r.menus.createPopupMenu=function(a,c,d){t.apply(this,arguments);if(b(k.getSelectionCell())&&1==k.getSelectionCount()){c=k.getSelectionCell();var e=k.getOutgoingEdges(c);a.addSeparator();null!=e&&0<e.length&&this.addMenuItems(a,["selectChildren","selectSubtree"],null,d);a.addSeparator();0<k.getIncomingEdges(c).length&&this.addMenuItems(a,["selectSiblings","selectParent"],null,d)}};r.actions.addAction("selectChildren",function(){if(k.isEnabled()&&1==k.getSelectionCount()){var a=
 k.getSelectionCell(),a=k.getOutgoingEdges(a);if(null!=a){for(var b=[],c=0;c<a.length;c++)b.push(k.model.getTerminal(a[c],!1));k.setSelectionCells(b)}}},null,null,"Alt+Shift+X");r.actions.addAction("selectSiblings",function(){if(k.isEnabled()&&1==k.getSelectionCount()){var a=k.getSelectionCell(),a=k.getIncomingEdges(a);if(null!=a&&0<a.length&&(a=k.getOutgoingEdges(k.model.getTerminal(a[0],!0)),null!=a)){for(var b=[],c=0;c<a.length;c++)b.push(k.model.getTerminal(a[c],!1));k.setSelectionCells(b)}}},
 null,null,"Alt+Shift+S");r.actions.addAction("selectParent",function(){if(k.isEnabled()&&1==k.getSelectionCount()){var a=k.getSelectionCell(),a=k.getIncomingEdges(a);null!=a&&0<a.length&&k.setSelectionCell(k.model.getTerminal(a[0],!0))}},null,null,"Alt+Shift+P");r.actions.addAction("selectSubtree",function(){if(k.isEnabled()&&1==k.getSelectionCount()){var a=k.getSelectionCell(),b=[];k.traverse(a,!0,function(a,c){null!=c&&b.push(c);b.push(a);return!0});k.setSelectionCells(b)}},null,null,"Alt+Shift+T");
-var x=k.removeCells;k.removeCells=function(a,c){c=null!=c?c:!0;null==a&&(a=this.getDeletableCells(this.getSelectionCells()));c&&(a=this.getDeletableCells(this.addAllEdges(a)));for(var e=[],f=0;f<a.length;f++){var h=a[f];t.isEdge(h)&&d(h)&&(e.push(h),h=t.getTerminal(h,!1));b(h)?(k.traverse(h,!0,function(a,b){null!=b&&e.push(b);e.push(a);return!0}),h=k.getIncomingEdges(a[f]),a=a.concat(h)):e.push(a[f])}a=e;return x.apply(this,arguments)};r.hoverIcons.getStateAt=function(a,c,d){return b(a.cell)?null:
-this.graph.view.getState(this.graph.getCellAt(c,d))};var w=k.duplicateCells;k.duplicateCells=function(a,c){a=null!=a?a:this.getSelectionCells();for(var d=a.slice(0),e=0;e<d.length;e++){var f=k.view.getState(d[e]);if(null!=f&&b(f.cell))for(var h=k.getIncomingEdges(f.cell),f=0;f<h.length;f++)mxUtils.remove(h[f],a)}this.model.beginUpdate();try{var g=w.call(this,a,c);if(g.length==a.length)for(e=0;e<a.length;e++)if(b(a[e])){var l=k.getIncomingEdges(g[e]),h=k.getIncomingEdges(a[e]);if(0==l.length&&0<h.length){var m=
-this.cloneCells([h[0]])[0];this.addEdge(m,k.getDefaultParent(),this.model.getTerminal(h[0],!0),g[e])}}}finally{this.model.endUpdate()}return g};var D=k.moveCells;k.moveCells=function(a,c,d,e,f,h,g){var l=null;this.model.beginUpdate();try{var m=f,p=this.view.getState(f),n=null!=p?p.style:this.getCellStyle(f);if(null!=a&&b(f)&&"1"==mxUtils.getValue(n,"treeFolding","0")){for(var q=0;q<a.length;q++)if(b(a[q])||k.model.isEdge(a[q])&&null==k.model.getTerminal(a[q],!0)){f=k.model.getParent(a[q]);break}if(null!=
-m&&f!=m&&null!=this.view.getState(a[0])){var r=k.getIncomingEdges(a[0]);if(0<r.length){var t=k.view.getState(k.model.getTerminal(r[0],!0));if(null!=t){var u=k.view.getState(m);null!=u&&(c=(u.getCenterX()-t.getCenterX())/k.view.scale,d=(u.getCenterY()-t.getCenterY())/k.view.scale)}}}}l=D.apply(this,arguments);if(null!=l&&null!=a&&l.length==a.length)for(q=0;q<l.length;q++)if(this.model.isEdge(l[q]))b(m)&&0>mxUtils.indexOf(l,this.model.getTerminal(l[q],!0))&&this.model.setTerminal(l[q],m,!0);else if(b(a[q])&&
-(r=k.getIncomingEdges(a[q]),0<r.length))if(!e)b(m)&&0>mxUtils.indexOf(a,this.model.getTerminal(r[0],!0))&&this.model.setTerminal(r[0],m,!0);else if(0==k.getIncomingEdges(l[q]).length){p=m;if(null==p||p==k.model.getParent(a[q]))p=k.model.getTerminal(r[0],!0);e=this.cloneCells([r[0]])[0];this.addEdge(e,k.getDefaultParent(),p,l[q])}}finally{this.model.endUpdate()}return l};var B=r.sidebar.dropAndConnect;r.sidebar.dropAndConnect=function(a,c,d,e){var f=k.model,h=null;f.beginUpdate();try{if(h=B.apply(this,
-arguments),b(a))for(var g=0;g<h.length;g++)if(f.isEdge(h[g])&&null==f.getTerminal(h[g],!0)){f.setTerminal(h[g],a,!0);var l=k.getCellGeometry(h[g]);l.points=null;null!=l.getTerminalPoint(!0)&&l.setTerminalPoint(null,!0)}}finally{f.endUpdate()}return h};var y={88:r.actions.get("selectChildren"),84:r.actions.get("selectSubtree"),80:r.actions.get("selectParent"),83:r.actions.get("selectSiblings")},C=r.onKeyDown;r.onKeyDown=function(a){try{if(k.isEnabled()&&!k.isEditing()&&b(k.getSelectionCell())&&1==
-k.getSelectionCount()){var d=null;0<k.getIncomingEdges(k.getSelectionCell()).length&&(9==a.which?d=mxEvent.isShiftDown(a)?f(k.getSelectionCell()):h(k.getSelectionCell()):13==a.which&&(d=c(k.getSelectionCell(),!mxEvent.isShiftDown(a))));if(null!=d&&0<d.length)1==d.length&&k.model.isEdge(d[0])?k.setSelectionCell(k.model.getTerminal(d[0],!1)):k.setSelectionCell(d[d.length-1]),null!=r.hoverIcons&&r.hoverIcons.update(k.view.getState(k.getSelectionCell())),k.startEditingAtCell(k.getSelectionCell()),mxEvent.consume(a);
-else if(mxEvent.isAltDown(a)&&mxEvent.isShiftDown(a)){var e=y[a.keyCode];null!=e&&(e.funct(a),mxEvent.consume(a))}else 37==a.keyCode?(n(k.getSelectionCell(),mxConstants.DIRECTION_WEST),mxEvent.consume(a)):38==a.keyCode?(n(k.getSelectionCell(),mxConstants.DIRECTION_NORTH),mxEvent.consume(a)):39==a.keyCode?(n(k.getSelectionCell(),mxConstants.DIRECTION_EAST),mxEvent.consume(a)):40==a.keyCode&&(n(k.getSelectionCell(),mxConstants.DIRECTION_SOUTH),mxEvent.consume(a))}}catch(H){console.log("error",H)}mxEvent.isConsumed(a)||
-C.apply(this,arguments)};var A=k.connectVertex;k.connectVertex=function(a,d,e,g,l,m){var p=k.getIncomingEdges(a);if(b(a)&&0<p.length)return e=q(a),g=e==mxConstants.DIRECTION_EAST||e==mxConstants.DIRECTION_WEST,l=d==mxConstants.DIRECTION_EAST||d==mxConstants.DIRECTION_WEST,e==d?h(a):g==l?f(a):c(a,d!=mxConstants.DIRECTION_NORTH&&d!=mxConstants.DIRECTION_WEST);this.model.beginUpdate();try{var n=A.call(this,a,d,e,g,l,m||0==p.length)}finally{this.model.endUpdate()}return n};var F=k.graphHandler.getCells;
-k.graphHandler.getCells=function(a){for(var c=F.apply(this,arguments),d=c.slice(0),f=0;f<d.length;f++)if(b(d[f]))for(var h=k.getIncomingEdges(d[f]),g=0;g<h.length;g++)mxUtils.remove(h[g],c);for(f=0;f<d.length;f++)h=c[f],b(h)&&!e(h)&&k.traverse(h,!0,function(a,b){null!=b&&0>mxUtils.indexOf(c,b)&&c.push(b);0>mxUtils.indexOf(c,a)&&c.push(a);return!0});return c};u.prototype.destroy=function(){if(null!=this.images)for(var a=0;a<this.images.length;a++){var b=this.images[a];b.parentNode.removeChild(b)}this.images=
+var x=k.removeCells;k.removeCells=function(a,c){c=null!=c?c:!0;null==a&&(a=this.getDeletableCells(this.getSelectionCells()));c&&(a=this.getDeletableCells(this.addAllEdges(a)));for(var e=[],f=0;f<a.length;f++){var g=a[f];v.isEdge(g)&&d(g)&&(e.push(g),g=v.getTerminal(g,!1));b(g)?(k.traverse(g,!0,function(a,b){null!=b&&e.push(b);e.push(a);return!0}),g=k.getIncomingEdges(a[f]),a=a.concat(g)):e.push(a[f])}a=e;return x.apply(this,arguments)};r.hoverIcons.getStateAt=function(a,c,d){return b(a.cell)?null:
+this.graph.view.getState(this.graph.getCellAt(c,d))};var w=k.duplicateCells;k.duplicateCells=function(a,c){a=null!=a?a:this.getSelectionCells();for(var d=a.slice(0),e=0;e<d.length;e++){var f=k.view.getState(d[e]);if(null!=f&&b(f.cell))for(var g=k.getIncomingEdges(f.cell),f=0;f<g.length;f++)mxUtils.remove(g[f],a)}this.model.beginUpdate();try{var h=w.call(this,a,c);if(h.length==a.length)for(e=0;e<a.length;e++)if(b(a[e])){var l=k.getIncomingEdges(h[e]),g=k.getIncomingEdges(a[e]);if(0==l.length&&0<g.length){var n=
+this.cloneCells([g[0]])[0];this.addEdge(n,k.getDefaultParent(),this.model.getTerminal(g[0],!0),h[e])}}}finally{this.model.endUpdate()}return h};var D=k.moveCells;k.moveCells=function(a,c,d,e,f,g,h){var l=null;this.model.beginUpdate();try{var n=f,p=this.view.getState(f),m=null!=p?p.style:this.getCellStyle(f);if(null!=a&&b(f)&&"1"==mxUtils.getValue(m,"treeFolding","0")){for(var q=0;q<a.length;q++)if(b(a[q])||k.model.isEdge(a[q])&&null==k.model.getTerminal(a[q],!0)){f=k.model.getParent(a[q]);break}if(null!=
+n&&f!=n&&null!=this.view.getState(a[0])){var r=k.getIncomingEdges(a[0]);if(0<r.length){var t=k.view.getState(k.model.getTerminal(r[0],!0));if(null!=t){var u=k.view.getState(n);null!=u&&(c=(u.getCenterX()-t.getCenterX())/k.view.scale,d=(u.getCenterY()-t.getCenterY())/k.view.scale)}}}}l=D.apply(this,arguments);if(null!=l&&null!=a&&l.length==a.length)for(q=0;q<l.length;q++)if(this.model.isEdge(l[q]))b(n)&&0>mxUtils.indexOf(l,this.model.getTerminal(l[q],!0))&&this.model.setTerminal(l[q],n,!0);else if(b(a[q])&&
+(r=k.getIncomingEdges(a[q]),0<r.length))if(!e)b(n)&&0>mxUtils.indexOf(a,this.model.getTerminal(r[0],!0))&&this.model.setTerminal(r[0],n,!0);else if(0==k.getIncomingEdges(l[q]).length){p=n;if(null==p||p==k.model.getParent(a[q]))p=k.model.getTerminal(r[0],!0);e=this.cloneCells([r[0]])[0];this.addEdge(e,k.getDefaultParent(),p,l[q])}}finally{this.model.endUpdate()}return l};var A=r.sidebar.dropAndConnect;r.sidebar.dropAndConnect=function(a,c,d,e){var f=k.model,g=null;f.beginUpdate();try{if(g=A.apply(this,
+arguments),b(a))for(var h=0;h<g.length;h++)if(f.isEdge(g[h])&&null==f.getTerminal(g[h],!0)){f.setTerminal(g[h],a,!0);var l=k.getCellGeometry(g[h]);l.points=null;null!=l.getTerminalPoint(!0)&&l.setTerminalPoint(null,!0)}}finally{f.endUpdate()}return g};var z={88:r.actions.get("selectChildren"),84:r.actions.get("selectSubtree"),80:r.actions.get("selectParent"),83:r.actions.get("selectSiblings")},C=r.onKeyDown;r.onKeyDown=function(a){try{if(k.isEnabled()&&!k.isEditing()&&b(k.getSelectionCell())&&1==
+k.getSelectionCount()){var d=null;0<k.getIncomingEdges(k.getSelectionCell()).length&&(9==a.which?d=mxEvent.isShiftDown(a)?f(k.getSelectionCell()):g(k.getSelectionCell()):13==a.which&&(d=c(k.getSelectionCell(),!mxEvent.isShiftDown(a))));if(null!=d&&0<d.length)1==d.length&&k.model.isEdge(d[0])?k.setSelectionCell(k.model.getTerminal(d[0],!1)):k.setSelectionCell(d[d.length-1]),null!=r.hoverIcons&&r.hoverIcons.update(k.view.getState(k.getSelectionCell())),k.startEditingAtCell(k.getSelectionCell()),mxEvent.consume(a);
+else if(mxEvent.isAltDown(a)&&mxEvent.isShiftDown(a)){var e=z[a.keyCode];null!=e&&(e.funct(a),mxEvent.consume(a))}else 37==a.keyCode?(m(k.getSelectionCell(),mxConstants.DIRECTION_WEST),mxEvent.consume(a)):38==a.keyCode?(m(k.getSelectionCell(),mxConstants.DIRECTION_NORTH),mxEvent.consume(a)):39==a.keyCode?(m(k.getSelectionCell(),mxConstants.DIRECTION_EAST),mxEvent.consume(a)):40==a.keyCode&&(m(k.getSelectionCell(),mxConstants.DIRECTION_SOUTH),mxEvent.consume(a))}}catch(F){console.log("error",F)}mxEvent.isConsumed(a)||
+C.apply(this,arguments)};var B=k.connectVertex;k.connectVertex=function(a,d,e,h,l,n){var p=k.getIncomingEdges(a);if(b(a)&&0<p.length)return e=q(a),h=e==mxConstants.DIRECTION_EAST||e==mxConstants.DIRECTION_WEST,l=d==mxConstants.DIRECTION_EAST||d==mxConstants.DIRECTION_WEST,e==d?g(a):h==l?f(a):c(a,d!=mxConstants.DIRECTION_NORTH&&d!=mxConstants.DIRECTION_WEST);this.model.beginUpdate();try{var m=B.call(this,a,d,e,h,l,n||0==p.length)}finally{this.model.endUpdate()}return m};var E=k.graphHandler.getCells;
+k.graphHandler.getCells=function(a){for(var c=E.apply(this,arguments),d=c.slice(0),f=0;f<d.length;f++)if(b(d[f]))for(var g=k.getIncomingEdges(d[f]),h=0;h<g.length;h++)mxUtils.remove(g[h],c);for(f=0;f<d.length;f++)g=c[f],b(g)&&!e(g)&&k.traverse(g,!0,function(a,b){null!=b&&0>mxUtils.indexOf(c,b)&&c.push(b);0>mxUtils.indexOf(c,a)&&c.push(a);return!0});return c};u.prototype.destroy=function(){if(null!=this.images)for(var a=0;a<this.images.length;a++){var b=this.images[a];b.parentNode.removeChild(b)}this.images=
 null};k.addMouseListener({currentState:null,currentIconSet:null,mouseDown:function(a,b){null!=this.currentState&&(this.dragLeave(b.getEvent(),this.currentState),this.currentState=null)},mouseMove:function(a,c){if(null!=this.currentState&&(c.getState()==this.currentState||null==c.getState())){var d=new mxRectangle(c.getGraphX()-20,c.getGraphY()-20,40,40);if(mxUtils.intersects(d,this.currentState))return}d=c.getState();if(k.isMouseDown&&!mxEvent.isTouchEvent(c.getEvent())||k.isEditing()||null!=d&&(!k.getModel().isVertex(d.cell)||
 !b(c.getCell())||e(d.cell)))d=null;d!=this.currentState&&(null!=this.currentState&&this.dragLeave(c.getEvent(),this.currentState),this.currentState=d,null!=this.currentState&&this.dragEnter(c.getEvent(),this.currentState))},mouseUp:function(a,b){},dragEnter:function(a,b){null==this.currentIconSet&&(this.currentIconSet=new u(b))},dragLeave:function(a,b){null!=this.currentIconSet&&(this.currentIconSet.destroy(),this.currentIconSet=null)}})};if("undefined"!==typeof Sidebar){var d=Sidebar.prototype.createAdvancedShapes;
 Sidebar.prototype.createAdvancedShapes=function(){var a=d.apply(this,arguments),b=this.editorUi.editor.graph;return a.concat([this.addEntry("tree mindmap central idea branch topic",function(){var a=new mxCell("Mindmap",new mxGeometry(0,0,420,126),"swimlane;html=1;startSize=20;horizontal=1;containerType=tree;");a.vertex=!0;var b=new mxCell("Central Idea",new mxGeometry(160,60,100,40),"ellipse;whiteSpace=wrap;html=1;align=center;container=1;recursiveResize=0;treeFolding=1;");b.vertex=!0;var c=new mxCell("Topic",
 new mxGeometry(320,40,80,20),"whiteSpace=wrap;html=1;rounded=1;arcSize=50;align=center;verticalAlign=middle;container=1;recursiveResize=0;strokeWidth=1;autosize=1;spacing=4;treeFolding=1;");c.vertex=!0;var d=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=entityRelationEdgeStyle;startArrow=none;endArrow=none;segment=10;curved=1;");d.geometry.relative=!0;d.edge=!0;b.insertEdge(d,!0);c.insertEdge(d,!1);var e=new mxCell("Branch",new mxGeometry(320,80,72,26),"whiteSpace=wrap;html=1;shape=partialRectangle;top=0;left=0;bottom=1;right=0;points=[[0,1],[1,1]];strokeColor=#000000;fillColor=none;align=center;verticalAlign=bottom;routingCenterY=0.5;snapToPoint=1;container=1;recursiveResize=0;autosize=1;treeFolding=1;");
-e.vertex=!0;var g=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=entityRelationEdgeStyle;startArrow=none;endArrow=none;segment=10;curved=1;");g.geometry.relative=!0;g.edge=!0;b.insertEdge(g,!0);e.insertEdge(g,!1);var l=new mxCell("Topic",new mxGeometry(20,40,80,20),"whiteSpace=wrap;html=1;rounded=1;arcSize=50;align=center;verticalAlign=middle;container=1;recursiveResize=0;strokeWidth=1;autosize=1;spacing=4;treeFolding=1;");l.vertex=!0;var u=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=entityRelationEdgeStyle;startArrow=none;endArrow=none;segment=10;curved=1;");
+e.vertex=!0;var h=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=entityRelationEdgeStyle;startArrow=none;endArrow=none;segment=10;curved=1;");h.geometry.relative=!0;h.edge=!0;b.insertEdge(h,!0);e.insertEdge(h,!1);var l=new mxCell("Topic",new mxGeometry(20,40,80,20),"whiteSpace=wrap;html=1;rounded=1;arcSize=50;align=center;verticalAlign=middle;container=1;recursiveResize=0;strokeWidth=1;autosize=1;spacing=4;treeFolding=1;");l.vertex=!0;var u=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=entityRelationEdgeStyle;startArrow=none;endArrow=none;segment=10;curved=1;");
 u.geometry.relative=!0;u.edge=!0;b.insertEdge(u,!0);l.insertEdge(u,!1);var r=new mxCell("Branch",new mxGeometry(20,80,72,26),"whiteSpace=wrap;html=1;shape=partialRectangle;top=0;left=0;bottom=1;right=0;points=[[0,1],[1,1]];strokeColor=#000000;fillColor=none;align=center;verticalAlign=bottom;routingCenterY=0.5;snapToPoint=1;container=1;recursiveResize=0;autosize=1;treeFolding=1;");r.vertex=!0;var k=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=entityRelationEdgeStyle;startArrow=none;endArrow=none;segment=10;curved=1;");
-k.geometry.relative=!0;k.edge=!0;b.insertEdge(k,!0);r.insertEdge(k,!1);a.insert(d);a.insert(g);a.insert(u);a.insert(k);a.insert(b);a.insert(c);a.insert(e);a.insert(l);a.insert(r);return sb.createVertexTemplateFromCells([a],a.geometry.width,a.geometry.height,a.value)}),this.addEntry("tree mindmap central idea",function(){var a=new mxCell("Central Idea",new mxGeometry(0,0,100,40),"ellipse;whiteSpace=wrap;html=1;align=center;container=1;recursiveResize=0;treeFolding=1;");a.vertex=!0;return sb.createVertexTemplateFromCells([a],
+k.geometry.relative=!0;k.edge=!0;b.insertEdge(k,!0);r.insertEdge(k,!1);a.insert(d);a.insert(h);a.insert(u);a.insert(k);a.insert(b);a.insert(c);a.insert(e);a.insert(l);a.insert(r);return sb.createVertexTemplateFromCells([a],a.geometry.width,a.geometry.height,a.value)}),this.addEntry("tree mindmap central idea",function(){var a=new mxCell("Central Idea",new mxGeometry(0,0,100,40),"ellipse;whiteSpace=wrap;html=1;align=center;container=1;recursiveResize=0;treeFolding=1;");a.vertex=!0;return sb.createVertexTemplateFromCells([a],
 a.geometry.width,a.geometry.height,a.value)}),this.addEntry("tree mindmap branch",function(){var a=new mxCell("Branch",new mxGeometry(0,0,80,20),"whiteSpace=wrap;html=1;shape=partialRectangle;top=0;left=0;bottom=1;right=0;points=[[0,1],[1,1]];strokeColor=#000000;fillColor=none;align=center;verticalAlign=bottom;routingCenterY=0.5;snapToPoint=1;container=1;recursiveResize=0;autosize=1;treeFolding=1;");a.vertex=!0;var b=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=entityRelationEdgeStyle;startArrow=none;endArrow=none;segment=10;curved=1;");
 b.geometry.setTerminalPoint(new mxPoint(-40,40),!0);b.geometry.relative=!0;b.edge=!0;a.insertEdge(b,!1);return sb.createVertexTemplateFromCells([a,b],a.geometry.width,a.geometry.height,a.value)}),this.addEntry("tree mindmap sub topic",function(){var a=new mxCell("Sub Topic",new mxGeometry(0,0,72,26),"whiteSpace=wrap;html=1;rounded=1;arcSize=50;align=center;verticalAlign=middle;container=1;recursiveResize=0;strokeWidth=1;autosize=1;spacing=4;treeFolding=1;");a.vertex=!0;var b=new mxCell("",new mxGeometry(0,
 0,0,0),"edgeStyle=entityRelationEdgeStyle;startArrow=none;endArrow=none;segment=10;curved=1;");b.geometry.setTerminalPoint(new mxPoint(-40,40),!0);b.geometry.relative=!0;b.edge=!0;a.insertEdge(b,!1);return sb.createVertexTemplateFromCells([a,b],a.geometry.width,a.geometry.height,a.value)}),this.addEntry("tree orgchart organization division",function(){var a=new mxCell("Orgchart",new mxGeometry(0,0,280,220),"swimlane;html=1;startSize=20;horizontal=1;containerType=tree;");a.vertex=!0;var d=new mxCell("Organization",
 new mxGeometry(80,40,120,60),"whiteSpace=wrap;html=1;align=center;treeFolding=1;container=1;recursiveResize=0;");b.setAttributeForCell(d,"treeRoot","1");d.vertex=!0;var c=new mxCell("Division",new mxGeometry(20,140,100,60),"whiteSpace=wrap;html=1;align=center;verticalAlign=middle;container=1;recursiveResize=0;treeFolding=1;");c.vertex=!0;var e=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=elbowEdgeStyle;elbow=vertical;startArrow=none;endArrow=none;rounded=0;");e.geometry.relative=!0;e.edge=!0;
-d.insertEdge(e,!0);c.insertEdge(e,!1);var h=new mxCell("Division",new mxGeometry(160,140,100,60),"whiteSpace=wrap;html=1;align=center;verticalAlign=middle;container=1;recursiveResize=0;treeFolding=1;");h.vertex=!0;var g=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=elbowEdgeStyle;elbow=vertical;startArrow=none;endArrow=none;rounded=0;");g.geometry.relative=!0;g.edge=!0;d.insertEdge(g,!0);h.insertEdge(g,!1);a.insert(e);a.insert(g);a.insert(d);a.insert(c);a.insert(h);return sb.createVertexTemplateFromCells([a],
+d.insertEdge(e,!0);c.insertEdge(e,!1);var g=new mxCell("Division",new mxGeometry(160,140,100,60),"whiteSpace=wrap;html=1;align=center;verticalAlign=middle;container=1;recursiveResize=0;treeFolding=1;");g.vertex=!0;var h=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=elbowEdgeStyle;elbow=vertical;startArrow=none;endArrow=none;rounded=0;");h.geometry.relative=!0;h.edge=!0;d.insertEdge(h,!0);g.insertEdge(h,!1);a.insert(e);a.insert(h);a.insert(d);a.insert(c);a.insert(g);return sb.createVertexTemplateFromCells([a],
 a.geometry.width,a.geometry.height,a.value)}),this.addEntry("tree container",function(){var a=new mxCell("Tree Container",new mxGeometry(0,0,220,160),"swimlane;html=1;startSize=20;horizontal=1;containerType=tree;");a.vertex=!0;return sb.createVertexTemplateFromCells([a],a.geometry.width,a.geometry.height,a.value)}),this.addEntry("tree root",function(){var a=new mxCell("Organization",new mxGeometry(0,0,120,60),"whiteSpace=wrap;html=1;align=center;treeFolding=1;container=1;recursiveResize=0;");b.setAttributeForCell(a,
 "treeRoot","1");a.vertex=!0;return sb.createVertexTemplateFromCells([a],a.geometry.width,a.geometry.height,a.value)}),this.addEntry("tree sub sections",function(){var a=new mxCell("Sub Section",new mxGeometry(0,0,100,60),"whiteSpace=wrap;html=1;align=center;verticalAlign=middle;container=1;recursiveResize=0;treeFolding=1;");a.vertex=!0;var b=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=orthogonalEdgeStyle;startArrow=none;endArrow=none;rounded=0;targetPortConstraint=eastwest;sourcePortConstraint=northsouth;");
 b.geometry.setTerminalPoint(new mxPoint(110,-40),!0);b.geometry.relative=!0;b.edge=!0;a.insertEdge(b,!1);var c=new mxCell("Sub Section",new mxGeometry(120,0,100,60),"whiteSpace=wrap;html=1;align=center;verticalAlign=middle;container=1;recursiveResize=0;treeFolding=1;");c.vertex=!0;var d=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=orthogonalEdgeStyle;startArrow=none;endArrow=none;rounded=0;targetPortConstraint=eastwest;sourcePortConstraint=northsouth;");d.geometry.setTerminalPoint(new mxPoint(110,
--40),!0);d.geometry.relative=!0;d.edge=!0;c.insertEdge(d,!1);return sb.createVertexTemplateFromCells([b,d,a,c],220,60,"Sub Sections")})])}}})();mxResources.parse("# *DO NOT DIRECTLY EDIT THIS FILE, IT IS AUTOMATICALLY GENERATED AND IT IS BASED ON:*\n# https://docs.google.com/spreadsheet/ccc?key=0AmQEO36liL4FdDJLWVNMaVV2UmRKSnpXU09MYkdGbEE\naboutDrawio=About draw.io\naccessDenied=Access Denied\nactualSize=Actual Size\nadd=Add\naddedFile=Added {1}\naddImages=Add Images\naddImageUrl=Add Image URL\naddLayer=Add Layer\naddProperty=Add Property\naddress=Address\naddToExistingDrawing=Add to Existing Drawing\naddWaypoint=Add Waypoint\nadjustTo=Adjust to\nadvanced=Advanced\nalign=Align\nalignment=Alignment\nallChangesLost=All changes will be lost!\nallPages=All Pages\nallProjects=All Projects\nallSpaces=All Spaces\nallTags=All Tags\nanchor=Anchor\nandroid=Android\nangle=Angle\narc=Arc\nareYouSure=Are you sure?\nensureDataSaved=Please ensure your data is saved before closing.\nallChangesSaved=All changes saved\nallChangesSavedInDrive=All changes saved in Drive\nallowPopups=Allow pop-ups to avoid this dialog.\nallowRelativeUrl=Allow relative URL\nalreadyConnected=Nodes already connected\napply=Apply\narchiMate21=ArchiMate 2.1\narrange=Arrange\narrow=Arrow\narrows=Arrows\nasNew=As New\natlas=Atlas\nauthor=Author\nauthorizationRequired=Authorization required\nauthorizeThisAppIn=Authorize this app in {1}:\nauthorize=Authorize\nauthorizing=Authorizing\nautomatic=Automatic\nautosave=Autosave\nautosize=Autosize\nattachments=Attachments\naws=AWS\naws3d=AWS 3D\nazure=Azure\nbackground=Background\nbackgroundColor=Background Color\nbackgroundImage=Background Image\nbasic=Basic\nblankDrawing=Blank Drawing\nblankDiagram=Blank Diagram\nblock=Block\nblockquote=Blockquote\nblog=Blog\nbold=Bold\nbootstrap=Bootstrap\nborderColor=Border Color\nborderWidth=Borderwidth\nbottom=Bottom\nbottomAlign=Bottom Align\nbottomLeft=Bottom Left\nbottomRight=Bottom Right\nbpmn=BPMN\nbrowser=Browser\nbulletedList=Bulleted List\nbusiness=Business\nbusy=Operation in progress\ncabinets=Cabinets\ncancel=Cancel\ncenter=Center\ncannotLoad=Load attempts failed. Please try again later.\ncannotLogin=Log in attempts failed. Please try again later.\ncannotOpenFile=Cannot open file\ncardName=Card Name\nchange=Change\nchangeOrientation=Change Orientation\nchangeUser=Change user\nchangesNotSaved=Changes have not been saved\nchatJoined={1} has joined\nchatLeft={1} has left\nchatWindowTitle=Chat\nchooseAnOption=Choose an option\nchromeApp=Chrome App\ncompressed=Compressed\ncommitMessage=Commit Message\ncsv=CSV\ndraftFound=A draft for '{1}' has been found. Load it into the editor or discard it to continue.\ndragAndDropNotSupported=Drag and drop not supported for images. Would you like to import instead?\ndropboxCharsNotAllowed=The following characters are not allowed:  / : ? * \" |\ncheck=Check\ncircle=Circle\ncisco=Cisco\nclassic=Classic\nclearDefaultStyle=Clear Default Style\nclearFilter=Clear Filter\nclearWaypoints=Clear Waypoints\nclipart=Clipart\nclose=Close\ncollaborator=Collaborator\ncollaborators=Collaborators\ncollapse=Collapse\ncollapseExpand=Collapse/Expand\ncollapse-expand=Click to collapse/expand\nShift-click to move neighbors \nAlt-click to protect group size\ncollapsible=Collapsible\ncomic=Comic\ncomment=Comment\ncommentsNotes=Comments/Notes\nconnect=Connect\nconnecting=Connecting\nconnectWithDrive=Connect with Google Drive\nconnection=Connection\nconnectionArrows=Connection Arrows\nconnectionPoints=Connection Points\nconstrainProportions=Constrain Proportions\ncontainsValidationErrors=Contains validation errors\ncopiedToClipboard=Copied to clipboard\ncopy=Copy\ncopyConnect=Copy on connect\ncopyOf=Copy of {1}\ncopyOfDrawing=Copy of Drawing\ncopyStyle=Copy Style\ncreate=Create\ncreateNewDiagram=Create New Diagram\ncreateRevision=Create Revision\ncreateShape=Create Shape\ncrop=Crop\ncurved=Curved\ncustom=Custom\ncurrent=Current\ncut=Cut\ndashed=Dashed\ndecideLater=Decide later\ndefault=Default\ndelete=Delete\ndeleteColumn=Delete Column\ndeleteLibrary401=Insufficient permissions to delete this library\ndeleteLibrary404=Selected library could not be found\ndeleteLibrary500=Error deleting library\ndeleteLibraryConfirm=You are about to permanently delete this library. Are you sure you want to do this?\ndeleteRow=Delete Row\ndescription=Description\ndevice=Device\ndiagram=Diagram\ndiagramContent=Diagram Content\ndiagramLocked=Diagram has been locked to prevent further data loss.\ndiagramName=Diagram Name\ndiagramIsPublic=Diagram is public\ndiagramIsNotPublic=Diagram is not public\ndiamond=Diamond\ndiamondThin=Diamond (thin)\ndidYouKnow=Did you know...\ndirection=Direction\ndiscard=Discard\ndiscardChangesAndReconnect=Discard Changes and Reconnect\ngoogleDriveMissingClickHere=Google Drive missing? Click here!\ndiscardChanges=Discard Changes\ndisconnected=Disconnected\ndistribute=Distribute\ndone=Done\ndotted=Dotted\ndoubleClickOrientation=Doubleclick to change orientation\ndoubleClickTooltip=Doubleclick to insert text\ndoubleClickChangeProperty=Doubleclick to change property name\ndownload=Download\ndownloadAs=Download as\nclickHereToSave=Click here to save.\ndraftDiscarded=Draft discarded\ndraftSaved=Draft saved\ndragElementsHere=Drag elements here\ndragImagesHere=Drag images or URLs here\ndragUrlsHere=Drag URLs here\ndraw.io=draw.io\ndrawing=Drawing{1}\ndrawingEmpty=Drawing is empty\ndrawingTooLarge=Drawing is too large\ndrawioForWork=Draw.io for GSuite\ndropbox=Dropbox\nduplicate=Duplicate\nduplicateIt=Duplicate {1}\ndivider=Divider\neast=East\nedit=Edit\neditData=Edit Data\neditDiagram=Edit Diagram\neditGeometry=Edit Geometry\neditImage=Edit Image\neditImageUrl=Edit Image URL\neditLink=Edit Link\neditShape=Edit Shape\neditStyle=Edit Style\neditText=Edit Text\neditTooltip=Edit Tooltip\nglass=Glass\ngoogleImages=Google Images\nimageSearch=Image Search\neip=EIP\nembed=Embed\nembedImages=Embed Images\nmainEmbedNotice=Paste this into the page\nelectrical=Electrical\nembedNotice=Paste this once at the end of the page\nenterGroup=Enter Group\nenterName=Enter Name\nenterPropertyName=Enter Property Name\nenterValue=Enter Value\nentityRelation=Entity Relation\nerror=Error\nerrorDeletingFile=Error Deleting File\nerrorLoadingFile=Error loading file\nerrorRenamingFile=Error renaming file.\nerrorRenamingFileNotFound=Error renaming file. File was not found.\nerrorRenamingFileForbidden=Error renaming file. Insufficient access rights.\nerrorSavingDraft=Error saving draft\nerrorSavingFile=Error saving file\nerrorSavingFileUnknown=Error authorizing with Google's servers. Please refresh the page to re-attempt.\nerrorSavingFileForbidden=Error saving file. Insufficient access rights.\nerrorSavingFileNameConflict=Could not save diagram. Current page already contains file named '{1}'.\nerrorSavingFileNotFound=Error saving file. File was not found.\nerrorSavingFileSessionTimeout=Your session has ended. Please <a target='_blank' href='{1}'>{2}</a> and return to this tab to try to save again.\nerrorSendingFeedback=Error sending feedback.\nerrorUpdatingPreview=Error updating preview.\nexit=Exit\nexitGroup=Exit Group\nexpand=Expand\nexport=Export\nexporting=Exporting\nexportAs=Export as\nexportOptionsDisabled=Export options disabled\nexportOptionsDisabledDetails=The owner has disabled options to download, print or copy for commenters and viewers on this file.\nextras=Extras\nfacebook=Facebook\nfailedToSaveTryReconnect=Failed to save, trying to reconnect\nfeatureRequest=Feature Request\nfeedback=Feedback\nfeedbackSent=Feedback successfully sent.\nfloorplans=Floorplans\nfile=File\nfileChangedOverwrite=File was changed. Overwrite changes?\noverwrite=Overwrite\nfilename=Filename\nfileExists=File already exists\nfileNearlyFullSeeFaq=File nearly full, please see FAQ\nfileNotFound=File not found\nrepositoryNotFound=Repository not found\nfileNotFoundOrDenied=The file was not found. It does not exist or you do not have read access.\nfileNotLoaded=File not loaded\nfileNotSaved=File not saved\nfileOpenLocation=How would you like to open these file(s)?\nfileWillBeSavedInAppFolder={1} will be saved in the app folder.\nfill=Fill\nfillColor=Fill Color\nfilterCards=Filter Cards\nfind=Find\nfit=Fit\nfitContainer=Resize Container\nfitIntoContainer=Fit into Container\nfitPage=Fit Page\nfitPageWidth=Fit Page Width\nfitTo=Fit to\nfitToSheetsAcross=sheet(s) across\nfitToBy=by\nfitToSheetsDown=sheet(s) down\nfitTwoPages=Two Pages\nfitWindow=Fit Window\nflip=Flip\nflipH=Flip Horizontal\nflipV=Flip Vertical\nflowchart=Flowchart\nfolder=Folder\nfont=Font\nfontColor=Font Color\nfontFamily=Font Family\nfontSize=Font Size\nforbidden=You are not authorized to access this file\nformat=Format\nformatPanel=Format Panel\nformatted=Formatted\nformattedText=Formatted Text\nformatPng=PNG\nformatGif=GIF\nformatJpg=JPEG\nformatPdf=PDF\nformatSvg=SVG\nformatHtmlEmbedded=HTML\nformatSvgEmbedded=SVG (with XML)\nformatVsdx=VSDX\nformatVssx=VSSX\nformatXmlPlain=XML (Plain)\nformatXml=XML\nforum=Discussion/Help Forums\nfromTemplate=From Template\nfromTemplateUrl=From Template URL\nfromText=From Text\nfromUrl=From URL\nfromThisPage=From this page\nfullscreen=Fullscreen\ngap=Gap\ngeneral=General\ngithub=GitHub\ngliffy=Gliffy\nglobal=Global\ngoogleDocs=Google Docs\ngoogleDrive=Google Drive\ngoogleGadget=Google Gadget\ngooglePlus=Google+\ngoogleSites=Google Sites\ngradient=Gradient\ngradientColor=Color\ngrid=Grid\ngridColor=Grid Color\ngridSize=Grid Size\ngroup=Group\nguides=Guides\nhateApp=I hate draw.io\nheading=Heading\nheight=Height\nhelp=Help\nhelpTranslate=Help us translate this application\nhide=Hide\nhideIt=Hide {1}\nhidden=Hidden\nhome=Home\nhorizontal=Horizontal\nhorizontalFlow=Horizontal Flow\nhorizontalTree=Horizontal Tree\nhowTranslate=How good is the translation in your language?\nhtml=HTML\nhtmlText=HTML Text\niframe=IFrame\nignore=Ignore\nimage=Image\nimageUrl=Image URL\nimages=Images\nimagePreviewError=This image couldn't be loaded for preview. Please check the URL.\nimageTooBig=Image too big\nimgur=Imgur\nimport=Import\nimportFrom=Import from\nincludeCopyOfMyDiagram=Include a copy of my diagram\nincreaseIndent=Increase Indent\ndecreaseIndent=Decrease Indent\ninsert=Insert\ninsertColumnBefore=Insert Column Left\ninsertColumnAfter=Insert Column Right\ninsertEllipse=Insert Ellipse\ninsertImage=Insert Image\ninsertHorizontalRule=Insert Horizontal Rule\ninsertLink=Insert Link\ninsertPage=Insert Page\ninsertRectangle=Insert Rectangle\ninsertRowBefore=Insert Row Above\ninsertRowAfter=Insert Row After\ninsertText=Insert Text\ninserting=Inserting\ninvalidFilename=Diagram names must not contain the following characters:  / | : ; { } < > & + ? = \"\ninvalidLicenseSeeThisPage=Your license is invalid, please see this <a target=\"_blank\" href=\"https://support.draw.io/display/DFCS/Licensing+your+draw.io+plugin\">page</a>.\ninvalidName=Invalid name\ninvalidOrMissingFile=Invalid or missing file\ninvalidPublicUrl=Invalid public URL\nisometric=Isometric\nios=iOS\nitalic=Italic\nkennedy=Kennedy\nkeyboardShortcuts=Keyboard shortcuts\nlayers=Layers\nlandscape=Landscape\nlanguage=Language\nleanMapping=Lean Mapping\nlastChange=Last change {1} ago\nlessThanAMinute=less than a minute\nlicensingError=Licensing Error\nlicenseHasExpired=The license for {1} has expired on {2}. Click here.\nlicenseWillExpire=The license for {1} will expire on {2}. Click here.\nlineJumps=Line jumps\nlinkAccountRequired=If the diagram is not public a Google account is required to view the link.\nlinkText=Link Text\nlist=List\nminute=minute\nminutes=minutes\nhours=hours\ndays=days\nmonths=months\nyears=years\nrestartForChangeRequired=Changes will take effect after page refresh.\nlaneColor=Lanecolor\nlastModified=Last modified\nlayout=Layout\nleft=Left\nleftAlign=Left Align\nleftToRight=Left to right\nlibraryTooltip=Drag and drop shapes here or click + to insert. Double click to edit.\nlightbox=Lightbox\nline=Line\nlineend=Line end\nlineheight=Line Height\nlinestart=Line start\nlinewidth=Linewidth\nlink=Link\nlinks=Links\nloading=Loading\nlockUnlock=Lock/Unlock\nloggedOut=Logged Out\nlogIn=log in\nloveIt=I love {1}\nlucidchart=Lucidchart\nmathematicalTypesetting=Mathematical Typesetting\nmakeCopy=Make a Copy\nmanual=Manual\nmiddle=Middle\nmisc=Misc\nmockups=Mockups\nmodificationDate=Modification date\nmodifiedBy=Modified by\nmore=More\nmoreResults=More Results\nmoreShapes=More Shapes\nmove=Move\nmoveToFolder=Move to Folder\nmoving=Moving\nmoveSelectionTo=Move selection to {1}\nname=Name\nnavigation=Navigation\nnetworking=Networking\nnew=New\nnewLibrary=New Library\nnextPage=Next Page\nnoAttachments=No attachments found\nnoColor=No Color\nnoFiles=No Files\nnoFileSelected=No file selected\nnoLibraries=No libraries found\nnoMoreResults=No more results\nnone=None\nnoOtherViewers=No other viewers\nnoPlugins=No plugins\nnoPreview=No preview\nnoResponse=No response from server\nnoResultsFor=No results for '{1}'\nnoRevisions=No revisions\nnoSearchResults=No search results found\nnoPageContentOrNotSaved=No anchors found on this page or it hasn't been saved yet\nnormal=Normal\nnorth=North\nnotADiagramFile=Not a diagram file\nnotALibraryFile=Not a library file\nnotAvailable=Not available\nnotAUtf8File=Not a UTF-8 file\nnotConnected=Not connected\nnote=Note\nnotUsingService=Not using {1}?\nnumberedList=Numbered list\noffline=Offline\nok=OK\noneDrive=OneDrive\nonline=Online\nopacity=Opacity\nopen=Open\nopenArrow=Open Arrow\nopenExistingDiagram=Open Existing Diagram\nopenFile=Open File\nopenFrom=Open from\nopenLibrary=Open Library\nopenLibraryFrom=Open Library from\nopenLink=Open Link\nopenInNewWindow=Open in New Window\nopenInThisWindow=Open in This Window\nopenIt=Open {1}\nopenRecent=Open Recent\nopenSupported=Supported formats are files saved from this software (.xml), .vsdx and .gliffy\noptions=Options\norganic=Organic\northogonal=Orthogonal\notherViewer=other viewer\notherViewers=other viewers\noutline=Outline\noval=Oval\npage=Page\npageContent=Page Content\npageNotFound=Page not found\npageWithNumber=Page-{1}\npages=Pages\npageView=Page View\npageSetup=Page Setup\npageScale=Page Scale\npan=Pan\npanTooltip=Space+Drag to pan\npaperSize=Paper Size\npattern=Pattern\npaste=Paste\npasteHere=Paste here\npasteStyle=Paste Style\nperimeter=Perimeter\npermissionAnyone=Anyone can edit\npermissionAuthor=Only I can edit\npickFolder=Pick a folder\npickLibraryDialogTitle=Select Library\npublicDiagramUrl=Public URL of the diagram\nplaceholders=Placeholders\nplantUml=PlantUML\nplugins=Plugins\npluginUrl=Plugin URL\npluginWarning=The page has requested to load the following plugin(s):\n \n {1}\n \n Would you like to load these plugin(s) now?\n \n NOTE : Only allow plugins to run if you fully understand the security implications of doing so.\n\nplusTooltip=Click to connect and clone (ctrl+click to clone, shift+click to connect). Drag to connect (ctrl+drag to clone).\nportrait=Portrait\nposition=Position\nposterPrint=Poster Print\npreferences=Preferences\npreview=Preview\npreviousPage=Previous Page\nprint=Print\nprintAllPages=Print All Pages\nprocEng=Proc. Eng.\nproject=Project\npriority=Priority\nproperties=Properties\npublish=Publish\nquickStart=Quick Start Video\nrack=Rack\nradialTree=Radial Tree\nreadOnly=Read-only\nreconnecting=Reconnecting\nrecentlyUpdated=Recently Updated\nrecentlyViewed=Recently Viewed\nredirectToNewApp=This file was created or modified in a newer version of this app. You will be redirected now.\nrealtimeTimeout=It looks like you've made a few changes while offline. We're sorry, these changes cannot be saved.\nredo=Redo\nrefresh=Refresh\nregularExpression=Regular Expression\nrelativeUrlNotAllowed=Relative URL not allowed\nrememberMe=Remember me\nrememberThisSetting=Remember this setting\nremoveFormat=Clear Formatting\nremoveFromGroup=Remove from Group\nremoveIt=Remove {1}\nremoveWaypoint=Remove Waypoint\nrename=Rename\nrenamed=Renamed\nrenameIt=Rename {1}\nrenaming=Renaming\nreplace=Replace\nreplaceIt={1} already exists. Do you want to replace it?\nreplaceExistingDrawing=Replace existing drawing\nrequired=required\nreset=Reset\nresetView=Reset View\nresize=Resize\nresizeLargeImages=Do you want to resize large images to make the application run faster?\nretina=Retina\nresponsive=Responsive\nrestore=Restore\nrestoring=Restoring\nretryingIn=Retrying in {1} second(s)\nretryingLoad=Load failed. Retrying...\nretryingLogin=Login time out. Retrying...\nreverse=Reverse\nrevision=Revision\nrevisionHistory=Revision History\nright=Right\nrightAlign=Right Align\nrightToLeft=Right to left\nrotate=Rotate\nrotateTooltip=Click and drag to rotate, click to turn by 90 degrees\nrotation=Rotation\nrounded=Rounded\nsave=Save\nsaveAndExit=Save & Exit\nsaveAs=Save as\nsaveAsXmlFile=Save as XML file?\nsaved=Saved\nsaveDiagramsTo=Save diagrams to\nsaveLibrary403=Insufficient permissions to edit this library\nsaveLibrary500=There was an error while saving the library\nsaving=Saving\nscratchpad=Scratchpad\nscrollbars=Scrollbars\nsearch=Search\nsearchShapes=Search Shapes\nselectAll=Select All\nselectionOnly=Selection Only\nselectCard=Select Card\nselectEdges=Select Edges\nselectFile=Select File\nselectFolder=Select Folder\nselectFont=Select Font\nselectNone=Select None\nselectVertices=Select Vertices\nsendMessage=Send\nsendYourFeedbackToDrawIo=Send your feedback to draw.io\nserviceUnavailableOrBlocked=Service unavailable or blocked\nsessionExpired=Your session has expired. Please refresh the browser window.\nsessionTimeoutOnSave=Your session has timed out and you have been disconnected from the Google Drive. Press OK to login and save. \nsetAsDefaultStyle=Set as Default Style\nshadow=Shadow\nshape=Shape\nshapes=Shapes\nshare=Share\nshareLink=Link for shared editing\nsharp=Sharp\nshow=Show\nshowStartScreen=Show Start Screen\nsidebarTooltip=Click to expand. Drag and drop shapes into the diagram. Shift+click to change selection. Alt+click to insert and connect.\nsigns=Signs\nsignOut=Sign out\nsimple=Simple\nsimpleArrow=Simple Arrow\nsize=Size\nsolid=Solid\nsourceSpacing=Source Spacing\nsouth=South\nsoftware=Software\nspace=Space\nspacing=Spacing\nspecialLink=Special Link\nstandard=Standard\nstarting=Starting\nstraight=Straight\nstrokeColor=Line Color\nstyle=Style\nsubscript=Subscript\nsummary=Summary\nsuperscript=Superscript\nsupport=Support\nsysml=SysML\ntags=Tags\ntable=Table\ntargetSpacing=Target Spacing\ntemplate=Template\ntemplates=Templates\ntext=Text\ntextAlignment=Text Alignment\ntextOpacity=Text Opacity\ntheme=Theme\ntimeout=Timeout\ntitle=Title\nto=to\ntoBack=To Back\ntoFront=To Front\ntooltips=Tooltips\ntop=Top\ntopAlign=Top Align\ntopLeft=Top Left\ntopRight=Top Right\ntransparent=Transparent\ntransparentBackground=Transparent Background\ntrello=Trello\ntryAgain=Try again\ntryOpeningViaThisPage=Try opening via this page.\nturn=Rotate 90°\ntype=Type\ntwitter=Twitter\numl=UML\nunderline=Underline\nundo=Undo\nungroup=Ungroup\nunsavedChanges=Unsaved changes\nunsavedChangesClickHereToSave=Unsaved changes. Click here to save.\nuntitled=Untitled\nuntitledDiagram=Untitled Diagram\nuntitledLayer=Untitled Layer\nuntitledLibrary=Untitled Library\nunknownError=Unknown error\nupdateFile=Update {1}\nupdatingDocument=Updating Document. Please wait...\nupdatingPreview=Updating Preview. Please wait...\nupdatingSelection=Updating Selection. Please wait...\nupload=Upload\nurl=URL\nuserManual=User Manual\nvertical=Vertical\nverticalFlow=Vertical Flow\nverticalTree=Vertical Tree\nview=View\nviewUrl=Link to view: {1}\nvoiceAssistant=Voice Assistant (beta)\nwarning=Warning\nwaypoints=Waypoints\nwest=West\nwidth=Width\nwiki=Wiki\nwordWrap=Word Wrap\nwritingDirection=Writing Direction\nyourEmailAddress=Your email address\nzoom=Zoom\nzoomIn=Zoom In\nzoomOut=Zoom Out\nbasic=Basic\nbusinessprocess=Business Processes\ncharts=Charts\nengineering=Engineering\nflowcharts=Flowcharts\ngmdl=Material Design\nmindmaps=Mindmaps\nmockups=Mockups\nnetworkdiagrams=Network Diagrams\nnothingIsSelected=Nothing is selected\nother=Other\nsoftwaredesign=Software Design\nvenndiagrams=Venn Diagrams\nwebEmailOrOther=Web, email or any other internet address\nwebLink=Web Link\nwireframes=Wireframes\n");Graph.prototype.defaultThemes[Graph.prototype.defaultThemeName]=mxUtils.parseXml('<mxStylesheet><add as="defaultVertex"><add as="shape" value="label"/><add as="perimeter" value="rectanglePerimeter"/><add as="fontSize" value="12"/><add as="fontFamily" value="Helvetica"/><add as="align" value="center"/><add as="verticalAlign" value="middle"/><add as="fillColor" value="#ffffff"/><add as="strokeColor" value="#000000"/><add as="fontColor" value="#000000"/></add><add as="defaultEdge"><add as="shape" value="connector"/><add as="labelBackgroundColor" value="#ffffff"/><add as="endArrow" value="classic"/><add as="fontSize" value="11"/><add as="fontFamily" value="Helvetica"/><add as="align" value="center"/><add as="verticalAlign" value="middle"/><add as="rounded" value="1"/><add as="strokeColor" value="#000000"/><add as="fontColor" value="#000000"/></add><add as="fancy"><add as="shadow" value="1"/><add as="glass" value="1"/></add><add as="gray" extend="fancy"><add as="gradientColor" value="#B3B3B3"/><add as="fillColor" value="#F5F5F5"/><add as="strokeColor" value="#666666"/></add><add as="blue" extend="fancy"><add as="gradientColor" value="#7EA6E0"/><add as="fillColor" value="#DAE8FC"/><add as="strokeColor" value="#6C8EBF"/></add><add as="green" extend="fancy"><add as="gradientColor" value="#97D077"/><add as="fillColor" value="#D5E8D4"/><add as="strokeColor" value="#82B366"/></add><add as="turquoise" extend="fancy"><add as="gradientColor" value="#67AB9F"/><add as="fillColor" value="#D5E8D4"/><add as="strokeColor" value="#6A9153"/></add><add as="yellow" extend="fancy"><add as="gradientColor" value="#FFD966"/><add as="fillColor" value="#FFF2CC"/><add as="strokeColor" value="#D6B656"/></add><add as="orange" extend="fancy"><add as="gradientColor" value="#FFA500"/><add as="fillColor" value="#FFCD28"/><add as="strokeColor" value="#D79B00"/></add><add as="red" extend="fancy"><add as="gradientColor" value="#EA6B66"/><add as="fillColor" value="#F8CECC"/><add as="strokeColor" value="#B85450"/></add><add as="pink" extend="fancy"><add as="gradientColor" value="#B5739D"/><add as="fillColor" value="#E6D0DE"/><add as="strokeColor" value="#996185"/></add><add as="purple" extend="fancy"><add as="gradientColor" value="#8C6C9C"/><add as="fillColor" value="#E1D5E7"/><add as="strokeColor" value="#9673A6"/></add><add as="plain-gray"><add as="gradientColor" value="#B3B3B3"/><add as="fillColor" value="#F5F5F5"/><add as="strokeColor" value="#666666"/></add><add as="plain-blue"><add as="gradientColor" value="#7EA6E0"/><add as="fillColor" value="#DAE8FC"/><add as="strokeColor" value="#6C8EBF"/></add><add as="plain-green"><add as="gradientColor" value="#97D077"/><add as="fillColor" value="#D5E8D4"/><add as="strokeColor" value="#82B366"/></add><add as="plain-turquoise"><add as="gradientColor" value="#67AB9F"/><add as="fillColor" value="#D5E8D4"/><add as="strokeColor" value="#6A9153"/></add><add as="plain-yellow"><add as="gradientColor" value="#FFD966"/><add as="fillColor" value="#FFF2CC"/><add as="strokeColor" value="#D6B656"/></add><add as="plain-orange"><add as="gradientColor" value="#FFA500"/><add as="fillColor" value="#FFCD28"/><add as="strokeColor" value="#D79B00"/></add><add as="plain-red"><add as="gradientColor" value="#EA6B66"/><add as="fillColor" value="#F8CECC"/><add as="strokeColor" value="#B85450"/></add><add as="plain-pink"><add as="gradientColor" value="#B5739D"/><add as="fillColor" value="#E6D0DE"/><add as="strokeColor" value="#996185"/></add><add as="plain-purple"><add as="gradientColor" value="#8C6C9C"/><add as="fillColor" value="#E1D5E7"/><add as="strokeColor" value="#9673A6"/></add><add as="text"><add as="fillColor" value="none"/><add as="gradientColor" value="none"/><add as="strokeColor" value="none"/><add as="align" value="left"/><add as="verticalAlign" value="top"/></add><add as="label"><add as="fontStyle" value="1"/><add as="align" value="left"/><add as="verticalAlign" value="middle"/><add as="spacing" value="2"/><add as="spacingLeft" value="52"/><add as="imageWidth" value="42"/><add as="imageHeight" value="42"/><add as="rounded" value="1"/></add><add as="icon" extend="label"><add as="align" value="center"/><add as="imageAlign" value="center"/><add as="verticalLabelPosition" value="bottom"/><add as="verticalAlign" value="top"/><add as="spacingTop" value="4"/><add as="labelBackgroundColor" value="#ffffff"/><add as="spacing" value="0"/><add as="spacingLeft" value="0"/><add as="spacingTop" value="6"/><add as="fontStyle" value="0"/><add as="imageWidth" value="48"/><add as="imageHeight" value="48"/></add><add as="swimlane"><add as="shape" value="swimlane"/><add as="fontSize" value="12"/><add as="fontStyle" value="1"/><add as="startSize" value="23"/></add><add as="group"><add as="verticalAlign" value="top"/><add as="fillColor" value="none"/><add as="strokeColor" value="none"/><add as="gradientColor" value="none"/><add as="pointerEvents" value="0"/></add><add as="ellipse"><add as="shape" value="ellipse"/><add as="perimeter" value="ellipsePerimeter"/></add><add as="rhombus"><add as="shape" value="rhombus"/><add as="perimeter" value="rhombusPerimeter"/></add><add as="triangle"><add as="shape" value="triangle"/><add as="perimeter" value="trianglePerimeter"/></add><add as="line"><add as="shape" value="line"/><add as="strokeWidth" value="4"/><add as="labelBackgroundColor" value="#ffffff"/><add as="verticalAlign" value="top"/><add as="spacingTop" value="8"/></add><add as="image"><add as="shape" value="image"/><add as="labelBackgroundColor" value="white"/><add as="verticalAlign" value="top"/><add as="verticalLabelPosition" value="bottom"/></add><add as="roundImage" extend="image"><add as="perimeter" value="ellipsePerimeter"/></add><add as="rhombusImage" extend="image"><add as="perimeter" value="rhombusPerimeter"/></add><add as="arrow"><add as="shape" value="arrow"/><add as="edgeStyle" value="none"/><add as="fillColor" value="#ffffff"/></add></mxStylesheet>').documentElement;GraphViewer=function(a,b,e){this.init(a,b,e)};mxUtils.extend(GraphViewer,mxEventSource);GraphViewer.prototype.editBlankUrl="https://www.draw.io/";GraphViewer.prototype.imageBaseUrl="https://www.draw.io/";GraphViewer.prototype.toolbarHeight="BackCompat"==document.compatMode?28:30;GraphViewer.prototype.lightboxChrome=!0;GraphViewer.prototype.lightboxZIndex=999;GraphViewer.prototype.toolbarZIndex=999;GraphViewer.prototype.imageBaseUrl="https://www.draw.io/";GraphViewer.prototype.autoFit=!0;
+-40),!0);d.geometry.relative=!0;d.edge=!0;c.insertEdge(d,!1);return sb.createVertexTemplateFromCells([b,d,a,c],220,60,"Sub Sections")})])}}})();mxResources.parse("# *DO NOT DIRECTLY EDIT THIS FILE, IT IS AUTOMATICALLY GENERATED AND IT IS BASED ON:*\n# https://docs.google.com/spreadsheet/ccc?key=0AmQEO36liL4FdDJLWVNMaVV2UmRKSnpXU09MYkdGbEE\naboutDrawio=About draw.io\naccessDenied=Access Denied\nactualSize=Actual Size\nadd=Add\naddedFile=Added {1}\naddImages=Add Images\naddImageUrl=Add Image URL\naddLayer=Add Layer\naddProperty=Add Property\naddress=Address\naddToExistingDrawing=Add to Existing Drawing\naddWaypoint=Add Waypoint\nadjustTo=Adjust to\nadvanced=Advanced\nalign=Align\nalignment=Alignment\nallChangesLost=All changes will be lost!\nallPages=All Pages\nallProjects=All Projects\nallSpaces=All Spaces\nallTags=All Tags\nanchor=Anchor\nandroid=Android\nangle=Angle\narc=Arc\nareYouSure=Are you sure?\nensureDataSaved=Please ensure your data is saved before closing.\nallChangesSaved=All changes saved\nallChangesSavedInDrive=All changes saved in Drive\nallowPopups=Allow pop-ups to avoid this dialog.\nallowRelativeUrl=Allow relative URL\nalreadyConnected=Nodes already connected\napply=Apply\narchiMate21=ArchiMate 2.1\narrange=Arrange\narrow=Arrow\narrows=Arrows\nasNew=As New\natlas=Atlas\nauthor=Author\nauthorizationRequired=Authorization required\nauthorizeThisAppIn=Authorize this app in {1}:\nauthorize=Authorize\nauthorizing=Authorizing\nautomatic=Automatic\nautosave=Autosave\nautosize=Autosize\nattachments=Attachments\naws=AWS\naws3d=AWS 3D\nazure=Azure\nbackground=Background\nbackgroundColor=Background Color\nbackgroundImage=Background Image\nbasic=Basic\nblankDrawing=Blank Drawing\nblankDiagram=Blank Diagram\nblock=Block\nblockquote=Blockquote\nblog=Blog\nbold=Bold\nbootstrap=Bootstrap\nborderColor=Border Color\nborderWidth=Borderwidth\nbottom=Bottom\nbottomAlign=Bottom Align\nbottomLeft=Bottom Left\nbottomRight=Bottom Right\nbpmn=BPMN\nbrowser=Browser\nbulletedList=Bulleted List\nbusiness=Business\nbusy=Operation in progress\ncabinets=Cabinets\ncancel=Cancel\ncenter=Center\ncannotLoad=Load attempts failed. Please try again later.\ncannotLogin=Log in attempts failed. Please try again later.\ncannotOpenFile=Cannot open file\ncardName=Card Name\nchange=Change\nchangeOrientation=Change Orientation\nchangeUser=Change user\nchangesNotSaved=Changes have not been saved\nchatJoined={1} has joined\nchatLeft={1} has left\nchatWindowTitle=Chat\nchooseAnOption=Choose an option\nchromeApp=Chrome App\ncompressed=Compressed\ncommitMessage=Commit Message\ncsv=CSV\ndraftFound=A draft for '{1}' has been found. Load it into the editor or discard it to continue.\ndragAndDropNotSupported=Drag and drop not supported for images. Would you like to import instead?\ndropboxCharsNotAllowed=The following characters are not allowed:  / : ? * \" |\ncheck=Check\ncircle=Circle\ncisco=Cisco\nclassic=Classic\nclearDefaultStyle=Clear Default Style\nclearFilter=Clear Filter\nclearWaypoints=Clear Waypoints\nclipart=Clipart\nclose=Close\ncollaborator=Collaborator\ncollaborators=Collaborators\ncollapse=Collapse\ncollapseExpand=Collapse/Expand\ncollapse-expand=Click to collapse/expand\nShift-click to move neighbors \nAlt-click to protect group size\ncollapsible=Collapsible\ncomic=Comic\ncomment=Comment\ncommentsNotes=Comments/Notes\nconnect=Connect\nconnecting=Connecting\nconnectWithDrive=Connect with Google Drive\nconnection=Connection\nconnectionArrows=Connection Arrows\nconnectionPoints=Connection Points\nconstrainProportions=Constrain Proportions\ncontainsValidationErrors=Contains validation errors\ncopiedToClipboard=Copied to clipboard\ncopy=Copy\ncopyConnect=Copy on connect\ncopyOf=Copy of {1}\ncopyOfDrawing=Copy of Drawing\ncopyStyle=Copy Style\ncreate=Create\ncreateNewDiagram=Create New Diagram\ncreateRevision=Create Revision\ncreateShape=Create Shape\ncrop=Crop\ncurved=Curved\ncustom=Custom\ncurrent=Current\ncut=Cut\ndashed=Dashed\ndecideLater=Decide later\ndefault=Default\ndelete=Delete\ndeleteColumn=Delete Column\ndeleteLibrary401=Insufficient permissions to delete this library\ndeleteLibrary404=Selected library could not be found\ndeleteLibrary500=Error deleting library\ndeleteLibraryConfirm=You are about to permanently delete this library. Are you sure you want to do this?\ndeleteRow=Delete Row\ndescription=Description\ndevice=Device\ndiagram=Diagram\ndiagramContent=Diagram Content\ndiagramLocked=Diagram has been locked to prevent further data loss.\ndiagramName=Diagram Name\ndiagramIsPublic=Diagram is public\ndiagramIsNotPublic=Diagram is not public\ndiamond=Diamond\ndiamondThin=Diamond (thin)\ndidYouKnow=Did you know...\ndirection=Direction\ndiscard=Discard\ndiscardChangesAndReconnect=Discard Changes and Reconnect\ngoogleDriveMissingClickHere=Google Drive missing? Click here!\ndiscardChanges=Discard Changes\ndisconnected=Disconnected\ndistribute=Distribute\ndone=Done\ndotted=Dotted\ndoubleClickOrientation=Doubleclick to change orientation\ndoubleClickTooltip=Doubleclick to insert text\ndoubleClickChangeProperty=Doubleclick to change property name\ndownload=Download\ndownloadAs=Download as\nclickHereToSave=Click here to save.\ndraftDiscarded=Draft discarded\ndraftSaved=Draft saved\ndragElementsHere=Drag elements here\ndragImagesHere=Drag images or URLs here\ndragUrlsHere=Drag URLs here\ndraw.io=draw.io\ndrawing=Drawing{1}\ndrawingEmpty=Drawing is empty\ndrawingTooLarge=Drawing is too large\ndrawioForWork=Draw.io for GSuite\ndropbox=Dropbox\nduplicate=Duplicate\nduplicateIt=Duplicate {1}\ndivider=Divider\neast=East\nedit=Edit\neditData=Edit Data\neditDiagram=Edit Diagram\neditGeometry=Edit Geometry\neditImage=Edit Image\neditImageUrl=Edit Image URL\neditLink=Edit Link\neditShape=Edit Shape\neditStyle=Edit Style\neditText=Edit Text\neditTooltip=Edit Tooltip\nglass=Glass\ngoogleImages=Google Images\nimageSearch=Image Search\neip=EIP\nembed=Embed\nembedImages=Embed Images\nmainEmbedNotice=Paste this into the page\nelectrical=Electrical\nembedNotice=Paste this once at the end of the page\nenterGroup=Enter Group\nenterName=Enter Name\nenterPropertyName=Enter Property Name\nenterValue=Enter Value\nentityRelation=Entity Relation\nerror=Error\nerrorDeletingFile=Error Deleting File\nerrorLoadingFile=Error loading file\nerrorRenamingFile=Error renaming file.\nerrorRenamingFileNotFound=Error renaming file. File was not found.\nerrorRenamingFileForbidden=Error renaming file. Insufficient access rights.\nerrorSavingDraft=Error saving draft\nerrorSavingFile=Error saving file\nerrorSavingFileUnknown=Error authorizing with Google's servers. Please refresh the page to re-attempt.\nerrorSavingFileForbidden=Error saving file. Insufficient access rights.\nerrorSavingFileNameConflict=Could not save diagram. Current page already contains file named '{1}'.\nerrorSavingFileNotFound=Error saving file. File was not found.\nerrorSavingFileSessionTimeout=Your session has ended. Please <a target='_blank' href='{1}'>{2}</a> and return to this tab to try to save again.\nerrorSendingFeedback=Error sending feedback.\nerrorUpdatingPreview=Error updating preview.\nexit=Exit\nexitGroup=Exit Group\nexpand=Expand\nexport=Export\nexporting=Exporting\nexportAs=Export as\nexportOptionsDisabled=Export options disabled\nexportOptionsDisabledDetails=The owner has disabled options to download, print or copy for commenters and viewers on this file.\nextras=Extras\nfacebook=Facebook\nfailedToSaveTryReconnect=Failed to save, trying to reconnect\nfeatureRequest=Feature Request\nfeedback=Feedback\nfeedbackSent=Feedback successfully sent.\nfloorplans=Floorplans\nfile=File\nfileChangedOverwrite=File was changed. Overwrite changes?\noverwrite=Overwrite\nfilename=Filename\nfileExists=File already exists\nfileNearlyFullSeeFaq=File nearly full, please see FAQ\nfileNotFound=File not found\nrepositoryNotFound=Repository not found\nfileNotFoundOrDenied=The file was not found. It does not exist or you do not have read access.\nfileNotLoaded=File not loaded\nfileNotSaved=File not saved\nfileOpenLocation=How would you like to open these file(s)?\nfileWillBeSavedInAppFolder={1} will be saved in the app folder.\nfill=Fill\nfillColor=Fill Color\nfilterCards=Filter Cards\nfind=Find\nfit=Fit\nfitContainer=Resize Container\nfitIntoContainer=Fit into Container\nfitPage=Fit Page\nfitPageWidth=Fit Page Width\nfitTo=Fit to\nfitToSheetsAcross=sheet(s) across\nfitToBy=by\nfitToSheetsDown=sheet(s) down\nfitTwoPages=Two Pages\nfitWindow=Fit Window\nflip=Flip\nflipH=Flip Horizontal\nflipV=Flip Vertical\nflowchart=Flowchart\nfolder=Folder\nfont=Font\nfontColor=Font Color\nfontFamily=Font Family\nfontSize=Font Size\nforbidden=You are not authorized to access this file\nformat=Format\nformatPanel=Format Panel\nformatted=Formatted\nformattedText=Formatted Text\nformatPng=PNG\nformatGif=GIF\nformatJpg=JPEG\nformatPdf=PDF\nformatSvg=SVG\nformatHtmlEmbedded=HTML\nformatSvgEmbedded=SVG (with XML)\nformatVsdx=VSDX\nformatVssx=VSSX\nformatXmlPlain=XML (Plain)\nformatXml=XML\nforum=Discussion/Help Forums\nfromTemplate=From Template\nfromTemplateUrl=From Template URL\nfromText=From Text\nfromUrl=From URL\nfromThisPage=From this page\nfullscreen=Fullscreen\ngap=Gap\ngeneral=General\ngithub=GitHub\ngliffy=Gliffy\nglobal=Global\ngoogleDocs=Google Docs\ngoogleDrive=Google Drive\ngoogleGadget=Google Gadget\ngooglePlus=Google+\ngoogleSites=Google Sites\ngradient=Gradient\ngradientColor=Color\ngrid=Grid\ngridColor=Grid Color\ngridSize=Grid Size\ngroup=Group\nguides=Guides\nhateApp=I hate draw.io\nheading=Heading\nheight=Height\nhelp=Help\nhelpTranslate=Help us translate this application\nhide=Hide\nhideIt=Hide {1}\nhidden=Hidden\nhome=Home\nhorizontal=Horizontal\nhorizontalFlow=Horizontal Flow\nhorizontalTree=Horizontal Tree\nhowTranslate=How good is the translation in your language?\nhtml=HTML\nhtmlText=HTML Text\niframe=IFrame\nignore=Ignore\nimage=Image\nimageUrl=Image URL\nimages=Images\nimagePreviewError=This image couldn't be loaded for preview. Please check the URL.\nimageTooBig=Image too big\nimgur=Imgur\nimport=Import\nimportFrom=Import from\nincludeCopyOfMyDiagram=Include a copy of my diagram\nincreaseIndent=Increase Indent\ndecreaseIndent=Decrease Indent\ninsert=Insert\ninsertColumnBefore=Insert Column Left\ninsertColumnAfter=Insert Column Right\ninsertEllipse=Insert Ellipse\ninsertImage=Insert Image\ninsertHorizontalRule=Insert Horizontal Rule\ninsertLink=Insert Link\ninsertPage=Insert Page\ninsertRectangle=Insert Rectangle\ninsertRowBefore=Insert Row Above\ninsertRowAfter=Insert Row After\ninsertText=Insert Text\ninserting=Inserting\ninvalidFilename=Diagram names must not contain the following characters:  / | : ; { } < > & + ? = \"\ninvalidLicenseSeeThisPage=Your license is invalid, please see this <a target=\"_blank\" href=\"https://support.draw.io/display/DFCS/Licensing+your+draw.io+plugin\">page</a>.\ninvalidName=Invalid name\ninvalidOrMissingFile=Invalid or missing file\ninvalidPublicUrl=Invalid public URL\nisometric=Isometric\nios=iOS\nitalic=Italic\nkennedy=Kennedy\nkeyboardShortcuts=Keyboard Shortcuts\nlayers=Layers\nlandscape=Landscape\nlanguage=Language\nleanMapping=Lean Mapping\nlastChange=Last change {1} ago\nlessThanAMinute=less than a minute\nlicensingError=Licensing Error\nlicenseHasExpired=The license for {1} has expired on {2}. Click here.\nlicenseWillExpire=The license for {1} will expire on {2}. Click here.\nlineJumps=Line jumps\nlinkAccountRequired=If the diagram is not public a Google account is required to view the link.\nlinkText=Link Text\nlist=List\nminute=minute\nminutes=minutes\nhours=hours\ndays=days\nmonths=months\nyears=years\nrestartForChangeRequired=Changes will take effect after page refresh.\nlaneColor=Lanecolor\nlastModified=Last modified\nlayout=Layout\nleft=Left\nleftAlign=Left Align\nleftToRight=Left to right\nlibraryTooltip=Drag and drop shapes here or click + to insert. Double click to edit.\nlightbox=Lightbox\nline=Line\nlineend=Line end\nlineheight=Line Height\nlinestart=Line start\nlinewidth=Linewidth\nlink=Link\nlinks=Links\nloading=Loading\nlockUnlock=Lock/Unlock\nloggedOut=Logged Out\nlogIn=log in\nloveIt=I love {1}\nlucidchart=Lucidchart\nmathematicalTypesetting=Mathematical Typesetting\nmakeCopy=Make a Copy\nmanual=Manual\nmiddle=Middle\nmisc=Misc\nmockups=Mockups\nmodificationDate=Modification date\nmodifiedBy=Modified by\nmore=More\nmoreResults=More Results\nmoreShapes=More Shapes\nmove=Move\nmoveToFolder=Move to Folder\nmoving=Moving\nmoveSelectionTo=Move selection to {1}\nname=Name\nnavigation=Navigation\nnetworking=Networking\nnew=New\nnewLibrary=New Library\nnextPage=Next Page\nnoAttachments=No attachments found\nnoColor=No Color\nnoFiles=No Files\nnoFileSelected=No file selected\nnoLibraries=No libraries found\nnoMoreResults=No more results\nnone=None\nnoOtherViewers=No other viewers\nnoPlugins=No plugins\nnoPreview=No preview\nnoResponse=No response from server\nnoResultsFor=No results for '{1}'\nnoRevisions=No revisions\nnoSearchResults=No search results found\nnoPageContentOrNotSaved=No anchors found on this page or it hasn't been saved yet\nnormal=Normal\nnorth=North\nnotADiagramFile=Not a diagram file\nnotALibraryFile=Not a library file\nnotAvailable=Not available\nnotAUtf8File=Not a UTF-8 file\nnotConnected=Not connected\nnote=Note\nnotUsingService=Not using {1}?\nnumberedList=Numbered list\noffline=Offline\nok=OK\noneDrive=OneDrive\nonline=Online\nopacity=Opacity\nopen=Open\nopenArrow=Open Arrow\nopenExistingDiagram=Open Existing Diagram\nopenFile=Open File\nopenFrom=Open from\nopenLibrary=Open Library\nopenLibraryFrom=Open Library from\nopenLink=Open Link\nopenInNewWindow=Open in New Window\nopenInThisWindow=Open in This Window\nopenIt=Open {1}\nopenRecent=Open Recent\nopenSupported=Supported formats are files saved from this software (.xml), .vsdx and .gliffy\noptions=Options\norganic=Organic\northogonal=Orthogonal\notherViewer=other viewer\notherViewers=other viewers\noutline=Outline\noval=Oval\npage=Page\npageContent=Page Content\npageNotFound=Page not found\npageWithNumber=Page-{1}\npages=Pages\npageView=Page View\npageSetup=Page Setup\npageScale=Page Scale\npan=Pan\npanTooltip=Space+Drag to pan\npaperSize=Paper Size\npattern=Pattern\npaste=Paste\npasteHere=Paste here\npasteStyle=Paste Style\nperimeter=Perimeter\npermissionAnyone=Anyone can edit\npermissionAuthor=Only I can edit\npickFolder=Pick a folder\npickLibraryDialogTitle=Select Library\npublicDiagramUrl=Public URL of the diagram\nplaceholders=Placeholders\nplantUml=PlantUML\nplugins=Plugins\npluginUrl=Plugin URL\npluginWarning=The page has requested to load the following plugin(s):\n \n {1}\n \n Would you like to load these plugin(s) now?\n \n NOTE : Only allow plugins to run if you fully understand the security implications of doing so.\n\nplusTooltip=Click to connect and clone (ctrl+click to clone, shift+click to connect). Drag to connect (ctrl+drag to clone).\nportrait=Portrait\nposition=Position\nposterPrint=Poster Print\npreferences=Preferences\npreview=Preview\npreviousPage=Previous Page\nprint=Print\nprintAllPages=Print All Pages\nprocEng=Proc. Eng.\nproject=Project\npriority=Priority\nproperties=Properties\npublish=Publish\nquickStart=Quick Start Video\nrack=Rack\nradialTree=Radial Tree\nreadOnly=Read-only\nreconnecting=Reconnecting\nrecentlyUpdated=Recently Updated\nrecentlyViewed=Recently Viewed\nredirectToNewApp=This file was created or modified in a newer version of this app. You will be redirected now.\nrealtimeTimeout=It looks like you've made a few changes while offline. We're sorry, these changes cannot be saved.\nredo=Redo\nrefresh=Refresh\nregularExpression=Regular Expression\nrelativeUrlNotAllowed=Relative URL not allowed\nrememberMe=Remember me\nrememberThisSetting=Remember this setting\nremoveFormat=Clear Formatting\nremoveFromGroup=Remove from Group\nremoveIt=Remove {1}\nremoveWaypoint=Remove Waypoint\nrename=Rename\nrenamed=Renamed\nrenameIt=Rename {1}\nrenaming=Renaming\nreplace=Replace\nreplaceIt={1} already exists. Do you want to replace it?\nreplaceExistingDrawing=Replace existing drawing\nrequired=required\nreset=Reset\nresetView=Reset View\nresize=Resize\nresizeLargeImages=Do you want to resize large images to make the application run faster?\nretina=Retina\nresponsive=Responsive\nrestore=Restore\nrestoring=Restoring\nretryingIn=Retrying in {1} second(s)\nretryingLoad=Load failed. Retrying...\nretryingLogin=Login time out. Retrying...\nreverse=Reverse\nrevision=Revision\nrevisionHistory=Revision History\nright=Right\nrightAlign=Right Align\nrightToLeft=Right to left\nrotate=Rotate\nrotateTooltip=Click and drag to rotate, click to turn by 90 degrees\nrotation=Rotation\nrounded=Rounded\nsave=Save\nsaveAndExit=Save & Exit\nsaveAs=Save as\nsaveAsXmlFile=Save as XML file?\nsaved=Saved\nsaveDiagramsTo=Save diagrams to\nsaveLibrary403=Insufficient permissions to edit this library\nsaveLibrary500=There was an error while saving the library\nsaving=Saving\nscratchpad=Scratchpad\nscrollbars=Scrollbars\nsearch=Search\nsearchShapes=Search Shapes\nselectAll=Select All\nselectionOnly=Selection Only\nselectCard=Select Card\nselectEdges=Select Edges\nselectFile=Select File\nselectFolder=Select Folder\nselectFont=Select Font\nselectNone=Select None\nselectVertices=Select Vertices\nsendMessage=Send\nsendYourFeedbackToDrawIo=Send your feedback to draw.io\nserviceUnavailableOrBlocked=Service unavailable or blocked\nsessionExpired=Your session has expired. Please refresh the browser window.\nsessionTimeoutOnSave=Your session has timed out and you have been disconnected from the Google Drive. Press OK to login and save. \nsetAsDefaultStyle=Set as Default Style\nshadow=Shadow\nshape=Shape\nshapes=Shapes\nshare=Share\nshareLink=Link for shared editing\nsharp=Sharp\nshow=Show\nshowStartScreen=Show Start Screen\nsidebarTooltip=Click to expand. Drag and drop shapes into the diagram. Shift+click to change selection. Alt+click to insert and connect.\nsigns=Signs\nsignOut=Sign out\nsimple=Simple\nsimpleArrow=Simple Arrow\nsize=Size\nsolid=Solid\nsourceSpacing=Source Spacing\nsouth=South\nsoftware=Software\nspace=Space\nspacing=Spacing\nspecialLink=Special Link\nstandard=Standard\nstarting=Starting\nstraight=Straight\nstrokeColor=Line Color\nstyle=Style\nsubscript=Subscript\nsummary=Summary\nsuperscript=Superscript\nsupport=Support\nsysml=SysML\ntags=Tags\ntable=Table\ntargetSpacing=Target Spacing\ntemplate=Template\ntemplates=Templates\ntext=Text\ntextAlignment=Text Alignment\ntextOpacity=Text Opacity\ntheme=Theme\ntimeout=Timeout\ntitle=Title\nto=to\ntoBack=To Back\ntoFront=To Front\ntooltips=Tooltips\ntop=Top\ntopAlign=Top Align\ntopLeft=Top Left\ntopRight=Top Right\ntransparent=Transparent\ntransparentBackground=Transparent Background\ntrello=Trello\ntryAgain=Try again\ntryOpeningViaThisPage=Try opening via this page.\nturn=Rotate 90°\ntype=Type\ntwitter=Twitter\numl=UML\nunderline=Underline\nundo=Undo\nungroup=Ungroup\nunsavedChanges=Unsaved changes\nunsavedChangesClickHereToSave=Unsaved changes. Click here to save.\nuntitled=Untitled\nuntitledDiagram=Untitled Diagram\nuntitledLayer=Untitled Layer\nuntitledLibrary=Untitled Library\nunknownError=Unknown error\nupdateFile=Update {1}\nupdatingDocument=Updating Document. Please wait...\nupdatingPreview=Updating Preview. Please wait...\nupdatingSelection=Updating Selection. Please wait...\nupload=Upload\nurl=URL\nuserManual=User Manual\nvertical=Vertical\nverticalFlow=Vertical Flow\nverticalTree=Vertical Tree\nview=View\nviewUrl=Link to view: {1}\nvoiceAssistant=Voice Assistant (beta)\nwarning=Warning\nwaypoints=Waypoints\nwest=West\nwidth=Width\nwiki=Wiki\nwordWrap=Word Wrap\nwritingDirection=Writing Direction\nyourEmailAddress=Your email address\nzoom=Zoom\nzoomIn=Zoom In\nzoomOut=Zoom Out\nbasic=Basic\nbusinessprocess=Business Processes\ncharts=Charts\nengineering=Engineering\nflowcharts=Flowcharts\ngmdl=Material Design\nmindmaps=Mindmaps\nmockups=Mockups\nnetworkdiagrams=Network Diagrams\nnothingIsSelected=Nothing is selected\nother=Other\nsoftwaredesign=Software Design\nvenndiagrams=Venn Diagrams\nwebEmailOrOther=Web, email or any other internet address\nwebLink=Web Link\nwireframes=Wireframes\n");Graph.prototype.defaultThemes[Graph.prototype.defaultThemeName]=mxUtils.parseXml('<mxStylesheet><add as="defaultVertex"><add as="shape" value="label"/><add as="perimeter" value="rectanglePerimeter"/><add as="fontSize" value="12"/><add as="fontFamily" value="Helvetica"/><add as="align" value="center"/><add as="verticalAlign" value="middle"/><add as="fillColor" value="#ffffff"/><add as="strokeColor" value="#000000"/><add as="fontColor" value="#000000"/></add><add as="defaultEdge"><add as="shape" value="connector"/><add as="labelBackgroundColor" value="#ffffff"/><add as="endArrow" value="classic"/><add as="fontSize" value="11"/><add as="fontFamily" value="Helvetica"/><add as="align" value="center"/><add as="verticalAlign" value="middle"/><add as="rounded" value="1"/><add as="strokeColor" value="#000000"/><add as="fontColor" value="#000000"/></add><add as="fancy"><add as="shadow" value="1"/><add as="glass" value="1"/></add><add as="gray" extend="fancy"><add as="gradientColor" value="#B3B3B3"/><add as="fillColor" value="#F5F5F5"/><add as="strokeColor" value="#666666"/></add><add as="blue" extend="fancy"><add as="gradientColor" value="#7EA6E0"/><add as="fillColor" value="#DAE8FC"/><add as="strokeColor" value="#6C8EBF"/></add><add as="green" extend="fancy"><add as="gradientColor" value="#97D077"/><add as="fillColor" value="#D5E8D4"/><add as="strokeColor" value="#82B366"/></add><add as="turquoise" extend="fancy"><add as="gradientColor" value="#67AB9F"/><add as="fillColor" value="#D5E8D4"/><add as="strokeColor" value="#6A9153"/></add><add as="yellow" extend="fancy"><add as="gradientColor" value="#FFD966"/><add as="fillColor" value="#FFF2CC"/><add as="strokeColor" value="#D6B656"/></add><add as="orange" extend="fancy"><add as="gradientColor" value="#FFA500"/><add as="fillColor" value="#FFCD28"/><add as="strokeColor" value="#D79B00"/></add><add as="red" extend="fancy"><add as="gradientColor" value="#EA6B66"/><add as="fillColor" value="#F8CECC"/><add as="strokeColor" value="#B85450"/></add><add as="pink" extend="fancy"><add as="gradientColor" value="#B5739D"/><add as="fillColor" value="#E6D0DE"/><add as="strokeColor" value="#996185"/></add><add as="purple" extend="fancy"><add as="gradientColor" value="#8C6C9C"/><add as="fillColor" value="#E1D5E7"/><add as="strokeColor" value="#9673A6"/></add><add as="plain-gray"><add as="gradientColor" value="#B3B3B3"/><add as="fillColor" value="#F5F5F5"/><add as="strokeColor" value="#666666"/></add><add as="plain-blue"><add as="gradientColor" value="#7EA6E0"/><add as="fillColor" value="#DAE8FC"/><add as="strokeColor" value="#6C8EBF"/></add><add as="plain-green"><add as="gradientColor" value="#97D077"/><add as="fillColor" value="#D5E8D4"/><add as="strokeColor" value="#82B366"/></add><add as="plain-turquoise"><add as="gradientColor" value="#67AB9F"/><add as="fillColor" value="#D5E8D4"/><add as="strokeColor" value="#6A9153"/></add><add as="plain-yellow"><add as="gradientColor" value="#FFD966"/><add as="fillColor" value="#FFF2CC"/><add as="strokeColor" value="#D6B656"/></add><add as="plain-orange"><add as="gradientColor" value="#FFA500"/><add as="fillColor" value="#FFCD28"/><add as="strokeColor" value="#D79B00"/></add><add as="plain-red"><add as="gradientColor" value="#EA6B66"/><add as="fillColor" value="#F8CECC"/><add as="strokeColor" value="#B85450"/></add><add as="plain-pink"><add as="gradientColor" value="#B5739D"/><add as="fillColor" value="#E6D0DE"/><add as="strokeColor" value="#996185"/></add><add as="plain-purple"><add as="gradientColor" value="#8C6C9C"/><add as="fillColor" value="#E1D5E7"/><add as="strokeColor" value="#9673A6"/></add><add as="text"><add as="fillColor" value="none"/><add as="gradientColor" value="none"/><add as="strokeColor" value="none"/><add as="align" value="left"/><add as="verticalAlign" value="top"/></add><add as="label"><add as="fontStyle" value="1"/><add as="align" value="left"/><add as="verticalAlign" value="middle"/><add as="spacing" value="2"/><add as="spacingLeft" value="52"/><add as="imageWidth" value="42"/><add as="imageHeight" value="42"/><add as="rounded" value="1"/></add><add as="icon" extend="label"><add as="align" value="center"/><add as="imageAlign" value="center"/><add as="verticalLabelPosition" value="bottom"/><add as="verticalAlign" value="top"/><add as="spacingTop" value="4"/><add as="labelBackgroundColor" value="#ffffff"/><add as="spacing" value="0"/><add as="spacingLeft" value="0"/><add as="spacingTop" value="6"/><add as="fontStyle" value="0"/><add as="imageWidth" value="48"/><add as="imageHeight" value="48"/></add><add as="swimlane"><add as="shape" value="swimlane"/><add as="fontSize" value="12"/><add as="fontStyle" value="1"/><add as="startSize" value="23"/></add><add as="group"><add as="verticalAlign" value="top"/><add as="fillColor" value="none"/><add as="strokeColor" value="none"/><add as="gradientColor" value="none"/><add as="pointerEvents" value="0"/></add><add as="ellipse"><add as="shape" value="ellipse"/><add as="perimeter" value="ellipsePerimeter"/></add><add as="rhombus"><add as="shape" value="rhombus"/><add as="perimeter" value="rhombusPerimeter"/></add><add as="triangle"><add as="shape" value="triangle"/><add as="perimeter" value="trianglePerimeter"/></add><add as="line"><add as="shape" value="line"/><add as="strokeWidth" value="4"/><add as="labelBackgroundColor" value="#ffffff"/><add as="verticalAlign" value="top"/><add as="spacingTop" value="8"/></add><add as="image"><add as="shape" value="image"/><add as="labelBackgroundColor" value="white"/><add as="verticalAlign" value="top"/><add as="verticalLabelPosition" value="bottom"/></add><add as="roundImage" extend="image"><add as="perimeter" value="ellipsePerimeter"/></add><add as="rhombusImage" extend="image"><add as="perimeter" value="rhombusPerimeter"/></add><add as="arrow"><add as="shape" value="arrow"/><add as="edgeStyle" value="none"/><add as="fillColor" value="#ffffff"/></add></mxStylesheet>').documentElement;GraphViewer=function(a,b,e){this.init(a,b,e)};mxUtils.extend(GraphViewer,mxEventSource);GraphViewer.prototype.editBlankUrl="https://www.draw.io/";GraphViewer.prototype.imageBaseUrl="https://www.draw.io/";GraphViewer.prototype.toolbarHeight="BackCompat"==document.compatMode?28:30;GraphViewer.prototype.lightboxChrome=!0;GraphViewer.prototype.lightboxZIndex=999;GraphViewer.prototype.toolbarZIndex=999;GraphViewer.prototype.imageBaseUrl="https://www.draw.io/";GraphViewer.prototype.autoFit=!0;
 GraphViewer.prototype.allowZoomIn=!1;GraphViewer.prototype.showTitleAsTooltip=!1;GraphViewer.prototype.checkVisibleState=!0;
 GraphViewer.prototype.init=function(a,b,e){this.graphConfig=null!=e?e:{};this.autoFit=null!=this.graphConfig["auto-fit"]?this.graphConfig["auto-fit"]:this.autoFit;this.allowZoomIn=null!=this.graphConfig["allow-zoom-in"]?this.graphConfig["allow-zoom-in"]:this.allowZoomIn;this.checkVisibleState=null!=this.graphConfig["check-visible-state"]?this.graphConfig["check-visible-state"]:this.checkVisibleState;this.toolbarItems=null!=this.graphConfig.toolbar?this.graphConfig.toolbar.split(" "):[];this.zoomEnabled=
 0<=mxUtils.indexOf(this.toolbarItems,"zoom");this.layersEnabled=0<=mxUtils.indexOf(this.toolbarItems,"layers");this.lightboxEnabled=0<=mxUtils.indexOf(this.toolbarItems,"lightbox");this.lightboxClickEnabled=0!=this.graphConfig.lightbox;this.initialWidth=null!=a?a.style.width:null;this.widthIsEmpty=null!=this.initialWidth?""==this.initialWidth:!0;this.currentPage=parseInt(this.graphConfig.page)||0;this.editor=null;if(null!=b&&(this.xmlDocument=b.ownerDocument,this.xmlNode=b,this.xml=mxUtils.getXml(b),
 null!=a)){this.graph=new Graph(a);this.graph.transparentBackground=!1;this.graphConfig.move&&(this.graph.isMoveCellsEvent=function(a){return!0});this.lightboxClickEnabled&&(a.style.cursor="pointer");this.editor=new Editor(!0,null,null,this.graph);this.editor.editBlankUrl=this.editBlankUrl;this.graph.lightbox=!0;this.graph.centerZoom=!1;this.graph.autoExtend=!1;this.graph.autoScroll=!1;this.graph.setEnabled(!1);var d=this;this.graph.getImageFromBundles=function(a){return d.getImageUrl(a)};mxClient.IS_SVG&&
-this.editor.graph.addSvgShadow(this.graph.view.canvas.ownerSVGElement,null,!0);if("mxfile"==b.nodeName){var g=b.getElementsByTagName("diagram");if(0<g.length){var l=this.graph.getGlobalVariable,d=this;this.graph.getGlobalVariable=function(a){var b=g[d.currentPage];return"page"==a?b.getAttribute("name")||"Page-"+(d.currentPage+1):"pagenumber"==a?d.currentPage+1:l.apply(this,arguments)}}}this.diagrams=[];var p=null;this.selectPage=function(a){this.currentPage=mxUtils.mod(a,this.diagrams.length);this.updateGraphXml(mxUtils.parseXml(this.graph.decompress(mxUtils.getTextContent(this.diagrams[this.currentPage]))).documentElement)};
-this.selectPageById=function(a){for(var b=0;b<this.diagrams.length;b++)if(this.diagrams[b].getAttribute("id")==a){this.selectPage(b);break}};b=mxUtils.bind(this,function(){if(null==this.xmlNode||"mxfile"!=this.xmlNode.nodeName)this.diagrams=[];this.xmlNode!=p&&(this.diagrams=this.xmlNode.getElementsByTagName("diagram"),p=this.xmlNode)});this.addListener("xmlNodeChanged",b);b();urlParams.page=d.currentPage;var q=mxUtils.bind(this,function(){this.graph.getModel().beginUpdate();try{urlParams.nav=0!=
+this.editor.graph.addSvgShadow(this.graph.view.canvas.ownerSVGElement,null,!0);if("mxfile"==b.nodeName){var h=b.getElementsByTagName("diagram");if(0<h.length){var l=this.graph.getGlobalVariable,d=this;this.graph.getGlobalVariable=function(a){var b=h[d.currentPage];return"page"==a?b.getAttribute("name")||"Page-"+(d.currentPage+1):"pagenumber"==a?d.currentPage+1:l.apply(this,arguments)}}}this.diagrams=[];var n=null;this.selectPage=function(a){this.currentPage=mxUtils.mod(a,this.diagrams.length);this.updateGraphXml(mxUtils.parseXml(this.graph.decompress(mxUtils.getTextContent(this.diagrams[this.currentPage]))).documentElement)};
+this.selectPageById=function(a){for(var b=0;b<this.diagrams.length;b++)if(this.diagrams[b].getAttribute("id")==a){this.selectPage(b);break}};b=mxUtils.bind(this,function(){if(null==this.xmlNode||"mxfile"!=this.xmlNode.nodeName)this.diagrams=[];this.xmlNode!=n&&(this.diagrams=this.xmlNode.getElementsByTagName("diagram"),n=this.xmlNode)});this.addListener("xmlNodeChanged",b);b();urlParams.page=d.currentPage;var q=mxUtils.bind(this,function(){this.graph.getModel().beginUpdate();try{urlParams.nav=0!=
 this.graphConfig.nav?"1":"0",this.editor.setGraphXml(this.xmlNode),this.graph.border=null!=this.graphConfig.border?this.graphConfig.border:8,this.graph.view.scale=this.graphConfig.zoom||1}finally{this.graph.getModel().endUpdate()}this.graph.panningHandler.useLeftButtonForPanning=!0;this.graph.panningHandler.isForcePanningEvent=function(a){return!mxEvent.isPopupTrigger(a.getEvent())&&"auto"==this.graph.container.style.overflow};this.graph.panningHandler.usePopupTrigger=!1;this.graph.panningHandler.pinchEnabled=
 !1;this.graph.panningHandler.ignoreCell=!0;this.graph.setPanning(!1);this.addSizeHandler();this.showLayers(this.graph);this.addClickHandler(this.graph);this.graph.setTooltips(0!=this.graphConfig.tooltips);this.graph.initialViewState={translate:this.graph.view.translate.clone(),scale:this.graph.view.scale};null!=this.graphConfig.toolbar?this.addToolbar():null!=this.graphConfig.title&&this.showTitleAsTooltip&&a.setAttribute("title",this.graphConfig.title)});b=window.MutationObserver||window.WebKitMutationObserver||
 window.MozMutationObserver;if(this.checkVisibleState&&0==a.offsetWidth&&"undefined"!==typeof b){e=this.getObservableParent(a);var c=new b(mxUtils.bind(this,function(b){0<a.offsetWidth&&(c.disconnect(),q())}));c.observe(e,{attributes:!0})}else q()}};GraphViewer.prototype.getObservableParent=function(a){for(a=a.parentNode;a!=document.body&&null!=a.parentNode&&"none"!==mxUtils.getCurrentStyle(a).display;)a=a.parentNode;return a};
@@ -3001,48 +3002,48 @@ GraphViewer.prototype.getImageUrl=function(a){null!=a&&"http://"!=a.substring(0,
 GraphViewer.prototype.setFileNode=function(a){null==this.xmlNode&&(this.xmlDocument=a.ownerDocument,this.xml=mxUtils.getXml(a),this.xmlNode=a);this.setGraphXml(a)};GraphViewer.prototype.updateGraphXml=function(a){this.setGraphXml(a);this.fireEvent(new mxEventObject("graphChanged"))};
 GraphViewer.prototype.setGraphXml=function(a){null!=this.graph&&(this.graph.view.translate=new mxPoint,this.graph.view.scale=1,this.graph.getModel().clear(),this.editor.setGraphXml(a),this.widthIsEmpty?(this.graph.container.style.width="",this.graph.container.style.height=""):this.graph.container.style.width=this.initialWidth,this.positionGraph(),this.graph.initialViewState={translate:this.graph.view.translate.clone(),scale:this.graph.view.scale})};
 GraphViewer.prototype.addSizeHandler=function(){var a=this.graph.container,b=this.graph.getGraphBounds(),e=!1;a.style.overflow="hidden";var d=mxUtils.bind(this,function(){if(!e){e=!0;var b=this.graph.getGraphBounds();a.style.overflow=a.offsetWidth<b.width+this.graph.border?"auto":"hidden";if(null!=this.toolbar){var b=a.getBoundingClientRect(),d=mxUtils.getScrollOrigin(document.body),d="relative"===document.body.style.position?document.body.getBoundingClientRect():{left:-d.x,top:-d.y},b={left:b.left-
-d.left,top:b.top-d.top,bottom:b.bottom-d.top,right:b.right-d.left};this.toolbar.style.left=b.left+"px";"bottom"==this.graphConfig["toolbar-position"]?this.toolbar.style.top=b.bottom-1+"px":"inline"!=this.graphConfig["toolbar-position"]?(this.toolbar.style.width=Math.max(this.minToolbarWidth,a.offsetWidth)+"px",this.toolbar.style.top=b.top+1+"px"):this.toolbar.style.top=b.top+"px"}e=!1}}),g=null,l=!1;this.fitGraph=function(b){var c=a.offsetWidth;c==g||l||(l=!0,this.graph.maxFitScale=null!=b?b:this.graphConfig.zoom||
-(this.allowZoomIn?null:1),this.graph.fit(null,null,null,null,!1,!0),this.graph.maxFitScale=null,b=this.graph.getGraphBounds(),this.updateContainerHeight(a,b.height+2*this.graph.border+1),this.graph.initialViewState={translate:this.graph.view.translate.clone(),scale:this.graph.view.scale},g=c,window.setTimeout(function(){l=!1},0))};GraphViewer.useResizeSensor&&(mxClient.IS_QUIRKS||9>=document.documentMode?(mxEvent.addListener(window,"resize",d),this.graph.addListener("size",d)):new ResizeSensor(this.graph.container,
-d));if(this.graphConfig.resize||(this.zoomEnabled||!this.autoFit)&&0!=this.graphConfig.resize)this.graph.minimumContainerSize=new mxRectangle(0,0,100,this.toolbarHeight),this.graph.resizeContainer=!0;else if(this.widthIsEmpty&&this.updateContainerWidth(a,b.width+2*this.graph.border),this.updateContainerHeight(a,b.height+2*this.graph.border+1),!this.zoomEnabled&&this.autoFit){var p=g=null,d=mxUtils.bind(this,function(){window.clearTimeout(p);l||(p=window.setTimeout(mxUtils.bind(this,this.fitGraph),
+d.left,top:b.top-d.top,bottom:b.bottom-d.top,right:b.right-d.left};this.toolbar.style.left=b.left+"px";"bottom"==this.graphConfig["toolbar-position"]?this.toolbar.style.top=b.bottom-1+"px":"inline"!=this.graphConfig["toolbar-position"]?(this.toolbar.style.width=Math.max(this.minToolbarWidth,a.offsetWidth)+"px",this.toolbar.style.top=b.top+1+"px"):this.toolbar.style.top=b.top+"px"}e=!1}}),h=null,l=!1;this.fitGraph=function(b){var c=a.offsetWidth;c==h||l||(l=!0,this.graph.maxFitScale=null!=b?b:this.graphConfig.zoom||
+(this.allowZoomIn?null:1),this.graph.fit(null,null,null,null,!1,!0),this.graph.maxFitScale=null,b=this.graph.getGraphBounds(),this.updateContainerHeight(a,b.height+2*this.graph.border+1),this.graph.initialViewState={translate:this.graph.view.translate.clone(),scale:this.graph.view.scale},h=c,window.setTimeout(function(){l=!1},0))};GraphViewer.useResizeSensor&&(mxClient.IS_QUIRKS||9>=document.documentMode?(mxEvent.addListener(window,"resize",d),this.graph.addListener("size",d)):new ResizeSensor(this.graph.container,
+d));if(this.graphConfig.resize||(this.zoomEnabled||!this.autoFit)&&0!=this.graphConfig.resize)this.graph.minimumContainerSize=new mxRectangle(0,0,100,this.toolbarHeight),this.graph.resizeContainer=!0;else if(this.widthIsEmpty&&this.updateContainerWidth(a,b.width+2*this.graph.border),this.updateContainerHeight(a,b.height+2*this.graph.border+1),!this.zoomEnabled&&this.autoFit){var n=h=null,d=mxUtils.bind(this,function(){window.clearTimeout(n);l||(n=window.setTimeout(mxUtils.bind(this,this.fitGraph),
 100))});GraphViewer.useResizeSensor&&(mxClient.IS_QUIRKS||9>=document.documentMode?mxEvent.addListener(window,"resize",d):new ResizeSensor(this.graph.container,d))}else mxClient.IS_QUIRKS||9>=document.documentMode||this.graph.addListener("size",d);var q=mxUtils.bind(this,function(){var c=a.style.minWidth;this.widthIsEmpty&&(a.style.minWidth="100%");if(0<a.offsetWidth&&(this.allowZoomIn||b.width+2*this.graph.border>a.offsetWidth||b.height+2*this.graph.border>this.graphConfig["max-height"])){var d=
-null;null!=this.graphConfig["max-height"]&&(d=this.graphConfig["max-height"]/(b.height+2*this.graph.border));this.fitGraph(d)}else this.graph.view.setTranslate(Math.floor((this.graph.border-b.x)/this.graph.view.scale),Math.floor((this.graph.border-b.y)/this.graph.view.scale)),g=a.offsetWidth;a.style.minWidth=c});mxClient.IS_QUIRKS||8==document.documentMode?window.setTimeout(q,0):q();this.positionGraph=function(){b=this.graph.getGraphBounds();g=null;q()}};
+null;null!=this.graphConfig["max-height"]&&(d=this.graphConfig["max-height"]/(b.height+2*this.graph.border));this.fitGraph(d)}else this.graph.view.setTranslate(Math.floor((this.graph.border-b.x)/this.graph.view.scale),Math.floor((this.graph.border-b.y)/this.graph.view.scale)),h=a.offsetWidth;a.style.minWidth=c});mxClient.IS_QUIRKS||8==document.documentMode?window.setTimeout(q,0):q();this.positionGraph=function(){b=this.graph.getGraphBounds();h=null;q()}};
 GraphViewer.prototype.updateContainerWidth=function(a,b){a.style.width=b+"px"};GraphViewer.prototype.updateContainerHeight=function(a,b){if(this.zoomEnabled||!this.autoFit||"BackCompat"==document.compatMode||mxClient.IS_QUIRKS||8==document.documentMode)a.style.height=b+"px"};
-GraphViewer.prototype.showLayers=function(a,b){var e=this.graphConfig.layers;if(null!=e||null!=b)if(e=null!=e?e.split(" "):null,null!=b||0<e.length){var d=null!=b?b.getModel():null,g=a.getModel();g.beginUpdate();try{for(var l=g.getChildCount(g.root),p=0;p<l;p++)g.setVisible(g.getChildAt(g.root,p),null!=b?d.isVisible(d.getChildAt(d.root,p)):!1);if(null==d)for(p=0;p<e.length;p++)g.setVisible(g.getChildAt(g.root,parseInt(e[p])),!0)}finally{g.endUpdate()}}};
+GraphViewer.prototype.showLayers=function(a,b){var e=this.graphConfig.layers;if(null!=e||null!=b)if(e=null!=e?e.split(" "):null,null!=b||0<e.length){var d=null!=b?b.getModel():null,h=a.getModel();h.beginUpdate();try{for(var l=h.getChildCount(h.root),n=0;n<l;n++)h.setVisible(h.getChildAt(h.root,n),null!=b?d.isVisible(d.getChildAt(d.root,n)):!1);if(null==d)for(n=0;n<e.length;n++)h.setVisible(h.getChildAt(h.root,parseInt(e[n])),!0)}finally{h.endUpdate()}}};
 GraphViewer.prototype.addToolbar=function(){function a(a,b,c,d){var f=document.createElement("div");f.style.borderRight="1px solid #d0d0d0";f.style.padding="3px 6px 3px 6px";mxEvent.addListener(f,"click",a);null!=c&&f.setAttribute("title",c);f.style.display=mxClient.IS_QUIRKS?"inline":"inline-block";a=document.createElement("img");a.setAttribute("border","0");a.setAttribute("src",b);null==d||d?(mxEvent.addListener(f,"mouseenter",function(){f.style.backgroundColor="#ddd"}),mxEvent.addListener(f,"mouseleave",
-function(){f.style.backgroundColor="#eee"}),mxUtils.setOpacity(a,60),f.style.cursor="pointer"):mxUtils.setOpacity(f,30);f.appendChild(a);e.appendChild(f);h++;return f}var b=this.graph.container;"bottom"==this.graphConfig["toolbar-position"]?b.style.marginBottom=this.toolbarHeight+"px":"inline"!=this.graphConfig["toolbar-position"]&&(b.style.marginTop=this.toolbarHeight+"px");var e=b.ownerDocument.createElement("div");e.style.position="absolute";e.style.overflow="hidden";e.style.boxSizing="border-box";
-e.style.whiteSpace="nowrap";e.style.zIndex=this.toolbarZIndex;e.style.backgroundColor="#eee";e.style.height=this.toolbarHeight+"px";this.toolbar=e;if("inline"==this.graphConfig["toolbar-position"]){mxUtils.setPrefixedStyle(e.style,"transition","opacity 100ms ease-in-out");mxUtils.setOpacity(e,30);var d=null,g=null,l=mxUtils.bind(this,function(a){null!=d&&(window.clearTimeout(d),fadeThead=null);null!=g&&(window.clearTimeout(g),fadeThead2=null);d=window.setTimeout(mxUtils.bind(this,function(){mxUtils.setOpacity(e,
-0);d=null;g=window.setTimeout(mxUtils.bind(this,function(){e.style.display="none";g=null}),100)}),a||200)}),p=mxUtils.bind(this,function(a){null!=d&&(window.clearTimeout(d),fadeThead=null);null!=g&&(window.clearTimeout(g),fadeThead2=null);e.style.display="";mxUtils.setOpacity(e,a||30)});mxEvent.addListener(this.graph.container,mxClient.IS_POINTER?"pointermove":"mousemove",mxUtils.bind(this,function(a){mxEvent.isTouchEvent(a)||(p(30),l())}));mxEvent.addListener(e,mxClient.IS_POINTER?"pointermove":
-"mousemove",function(a){mxEvent.consume(a)});mxEvent.addListener(e,"mouseenter",mxUtils.bind(this,function(a){p(100)}));mxEvent.addListener(e,"mousemove",mxUtils.bind(this,function(a){p(100);mxEvent.consume(a)}));mxEvent.addListener(e,"mouseleave",mxUtils.bind(this,function(a){mxEvent.isTouchEvent(a)||p(30)}));var q=this.graph,c=q.getTolerance();q.addMouseListener({startX:0,startY:0,scrollLeft:0,scrollTop:0,mouseDown:function(a,b){this.startX=b.getGraphX();this.startY=b.getGraphY();this.scrollLeft=
-q.container.scrollLeft;this.scrollTop=q.container.scrollTop},mouseMove:function(a,b){},mouseUp:function(a,b){mxEvent.isTouchEvent(b.getEvent())&&Math.abs(this.scrollLeft-q.container.scrollLeft)<c&&Math.abs(this.scrollTop-q.container.scrollTop)<c&&Math.abs(this.startX-b.getGraphX())<c&&Math.abs(this.startY-b.getGraphY())<c&&(0<parseFloat(e.style.opacity||0)?l():p(30))}})}for(var f=this.toolbarItems,h=0,m=null,n=null,u=0;u<f.length;u++){var r=f[u];if("pages"==r){n=b.ownerDocument.createElement("div");
-n.style.cssText="display:inline-block;position:relative;padding:3px 4px 0 4px;vertical-align:top;font-family:Helvetica,Arial;font-size:12px;top:4px;cursor:default;";mxUtils.setOpacity(n,70);var k=a(mxUtils.bind(this,function(){this.selectPage(this.currentPage-1)}),Editor.previousImage,mxResources.get("previousPage")||"Previous Page");k.style.borderRightStyle="none";k.style.paddingLeft="0px";k.style.paddingRight="0px";e.appendChild(n);var t=a(mxUtils.bind(this,function(){this.selectPage(this.currentPage+
-1)}),Editor.nextImage,mxResources.get("nextPage")||"Next Page");t.style.paddingLeft="0px";t.style.paddingRight="0px";r=mxUtils.bind(this,function(){n.innerHTML="";mxUtils.write(n,this.currentPage+1+" / "+this.diagrams.length);n.style.display=1<this.diagrams.length?"inline-block":"none";k.style.display=n.style.display;t.style.display=n.style.display});this.addListener("graphChanged",r);r()}else if("zoom"==r)this.zoomEnabled&&(a(mxUtils.bind(this,function(){this.graph.zoomOut()}),Editor.zoomOutImage,
-mxResources.get("zoomOut")||"Zoom Out"),a(mxUtils.bind(this,function(){this.graph.zoomIn()}),Editor.zoomInImage,mxResources.get("zoomIn")||"Zoom In"),a(mxUtils.bind(this,function(){this.graph.view.scaleAndTranslate(this.graph.initialViewState.scale,this.graph.initialViewState.translate.x,this.graph.initialViewState.translate.y)}),Editor.zoomFitImage,mxResources.get("fit")||"Fit"));else if("layers"==r){if(this.layersEnabled){var v=this.graph.getModel(),x=a(mxUtils.bind(this,function(a){if(null!=m)m.parentNode.removeChild(m),
-m=null;else{m=this.graph.createLayersDialog();mxEvent.addListener(m,"mouseleave",function(){m.parentNode.removeChild(m);m=null});a=x.getBoundingClientRect();m.style.width="140px";m.style.padding="2px 0px 2px 0px";m.style.border="1px solid #d0d0d0";m.style.backgroundColor="#eee";m.style.fontFamily="Helvetica Neue,Helvetica,Arial Unicode MS,Arial";m.style.fontSize="11px";m.style.zIndex=this.toolbarZIndex+1;mxUtils.setOpacity(m,80);var b=mxUtils.getDocumentScrollOrigin(document);m.style.left=b.x+a.left+
-"px";m.style.top=b.y+a.bottom+"px";document.body.appendChild(m)}}),Editor.layersImage,mxResources.get("layers")||"Layers");v.addListener(mxEvent.CHANGE,function(){x.style.display=1<v.getChildCount(v.root)?"inline-block":"none"});x.style.display=1<v.getChildCount(v.root)?"inline-block":"none"}}else"lightbox"==r?this.lightboxEnabled&&a(mxUtils.bind(this,function(){this.showLightbox()}),Editor.maximizeImage,mxResources.get("show")||"Show"):null!=this.graphConfig["toolbar-buttons"]&&(r=this.graphConfig["toolbar-buttons"][r],
-null!=r&&a(null==r.enabled||r.enabled?r.handler:function(){},r.image,r.title,r.enabled))}null!=this.graph.minimumContainerSize&&(this.graph.minimumContainerSize.width=34*h);null!=this.graphConfig.title&&(f=b.ownerDocument.createElement("div"),f.style.cssText="display:inline-block;position:relative;padding:3px 6px 0 6px;vertical-align:top;font-family:Helvetica,Arial;font-size:12px;top:4px;cursor:default;",f.setAttribute("title",this.graphConfig.title),mxUtils.write(f,this.graphConfig.title),mxUtils.setOpacity(f,
-70),e.appendChild(f));this.minToolbarWidth=34*h;var w=b.style.border,f=mxUtils.bind(this,function(){var a=b.getBoundingClientRect(),c=mxUtils.getScrollOrigin(document.body),c="relative"===document.body.style.position?document.body.getBoundingClientRect():{left:-c.x,top:-c.y},a={left:a.left-c.left,top:a.top-c.top,bottom:a.bottom-c.top,right:a.right-c.left};e.style.left=a.left+"px";e.style.width="inline"==this.graphConfig["toolbar-position"]?"auto":Math.max(this.minToolbarWidth,b.offsetWidth)+"px";
-e.style.border="1px solid #d0d0d0";"bottom"==this.graphConfig["toolbar-position"]?e.style.top=a.bottom-1+"px":"inline"!=this.graphConfig["toolbar-position"]?(e.style.marginTop=-this.toolbarHeight+"px",e.style.top=a.top+1+"px"):e.style.top=a.top+"px";"1px solid transparent"==w&&(b.style.border="1px solid #d0d0d0");document.body.appendChild(e);var d=mxUtils.bind(this,function(){1!=this.graphConfig["toolbar-nohide"]&&(null!=e.parentNode&&e.parentNode.removeChild(e),null!=m&&(m.parentNode.removeChild(m),
-m=null),b.style.border=w)});mxEvent.addListener(document,"mousemove",function(a){for(a=mxEvent.getSource(a);null!=a;){if(a==b||a==e||a==m)return;a=a.parentNode}d()});mxEvent.addListener(document,"mouseleave",function(a){d()})});mxEvent.addListener(b,"mouseenter",f)};
-GraphViewer.prototype.addClickHandler=function(a,b){a.linkPolicy=this.graphConfig.target||a.linkPolicy;a.addClickHandler(this.graphConfig.highlight,mxUtils.bind(this,function(e,d){if(null==d){var g=mxEvent.getSource(e);"a"==g.nodeName.toLowerCase()&&(d=g.getAttribute("href"))}null!=b?null==d||a.isExternalProtocol(d)||a.isBlankLink(d)||window.setTimeout(function(){b.destroy()},0):null==d||!a.isPageLink(d)||!mxEvent.isTouchEvent(e)&&mxEvent.isPopupTrigger(e)||(g=d.indexOf(","),0<g&&(g=d.substring(g+
-1),this.selectPageById(g),mxEvent.consume(e)))}),mxUtils.bind(this,function(a){null!=b||!this.lightboxClickEnabled||mxEvent.isTouchEvent(a)&&0!=this.toolbarItems.length||this.showLightbox()}))};
+function(){f.style.backgroundColor="#eee"}),mxUtils.setOpacity(a,60),f.style.cursor="pointer"):mxUtils.setOpacity(f,30);f.appendChild(a);e.appendChild(f);g++;return f}var b=this.graph.container;"bottom"==this.graphConfig["toolbar-position"]?b.style.marginBottom=this.toolbarHeight+"px":"inline"!=this.graphConfig["toolbar-position"]&&(b.style.marginTop=this.toolbarHeight+"px");var e=b.ownerDocument.createElement("div");e.style.position="absolute";e.style.overflow="hidden";e.style.boxSizing="border-box";
+e.style.whiteSpace="nowrap";e.style.zIndex=this.toolbarZIndex;e.style.backgroundColor="#eee";e.style.height=this.toolbarHeight+"px";this.toolbar=e;if("inline"==this.graphConfig["toolbar-position"]){mxUtils.setPrefixedStyle(e.style,"transition","opacity 100ms ease-in-out");mxUtils.setOpacity(e,30);var d=null,h=null,l=mxUtils.bind(this,function(a){null!=d&&(window.clearTimeout(d),fadeThead=null);null!=h&&(window.clearTimeout(h),fadeThead2=null);d=window.setTimeout(mxUtils.bind(this,function(){mxUtils.setOpacity(e,
+0);d=null;h=window.setTimeout(mxUtils.bind(this,function(){e.style.display="none";h=null}),100)}),a||200)}),n=mxUtils.bind(this,function(a){null!=d&&(window.clearTimeout(d),fadeThead=null);null!=h&&(window.clearTimeout(h),fadeThead2=null);e.style.display="";mxUtils.setOpacity(e,a||30)});mxEvent.addListener(this.graph.container,mxClient.IS_POINTER?"pointermove":"mousemove",mxUtils.bind(this,function(a){mxEvent.isTouchEvent(a)||(n(30),l())}));mxEvent.addListener(e,mxClient.IS_POINTER?"pointermove":
+"mousemove",function(a){mxEvent.consume(a)});mxEvent.addListener(e,"mouseenter",mxUtils.bind(this,function(a){n(100)}));mxEvent.addListener(e,"mousemove",mxUtils.bind(this,function(a){n(100);mxEvent.consume(a)}));mxEvent.addListener(e,"mouseleave",mxUtils.bind(this,function(a){mxEvent.isTouchEvent(a)||n(30)}));var q=this.graph,c=q.getTolerance();q.addMouseListener({startX:0,startY:0,scrollLeft:0,scrollTop:0,mouseDown:function(a,b){this.startX=b.getGraphX();this.startY=b.getGraphY();this.scrollLeft=
+q.container.scrollLeft;this.scrollTop=q.container.scrollTop},mouseMove:function(a,b){},mouseUp:function(a,b){mxEvent.isTouchEvent(b.getEvent())&&Math.abs(this.scrollLeft-q.container.scrollLeft)<c&&Math.abs(this.scrollTop-q.container.scrollTop)<c&&Math.abs(this.startX-b.getGraphX())<c&&Math.abs(this.startY-b.getGraphY())<c&&(0<parseFloat(e.style.opacity||0)?l():n(30))}})}for(var f=this.toolbarItems,g=0,p=null,m=null,u=0;u<f.length;u++){var r=f[u];if("pages"==r){m=b.ownerDocument.createElement("div");
+m.style.cssText="display:inline-block;position:relative;padding:3px 4px 0 4px;vertical-align:top;font-family:Helvetica,Arial;font-size:12px;top:4px;cursor:default;";mxUtils.setOpacity(m,70);var k=a(mxUtils.bind(this,function(){this.selectPage(this.currentPage-1)}),Editor.previousImage,mxResources.get("previousPage")||"Previous Page");k.style.borderRightStyle="none";k.style.paddingLeft="0px";k.style.paddingRight="0px";e.appendChild(m);var v=a(mxUtils.bind(this,function(){this.selectPage(this.currentPage+
+1)}),Editor.nextImage,mxResources.get("nextPage")||"Next Page");v.style.paddingLeft="0px";v.style.paddingRight="0px";r=mxUtils.bind(this,function(){m.innerHTML="";mxUtils.write(m,this.currentPage+1+" / "+this.diagrams.length);m.style.display=1<this.diagrams.length?"inline-block":"none";k.style.display=m.style.display;v.style.display=m.style.display});this.addListener("graphChanged",r);r()}else if("zoom"==r)this.zoomEnabled&&(a(mxUtils.bind(this,function(){this.graph.zoomOut()}),Editor.zoomOutImage,
+mxResources.get("zoomOut")||"Zoom Out"),a(mxUtils.bind(this,function(){this.graph.zoomIn()}),Editor.zoomInImage,mxResources.get("zoomIn")||"Zoom In"),a(mxUtils.bind(this,function(){this.graph.view.scaleAndTranslate(this.graph.initialViewState.scale,this.graph.initialViewState.translate.x,this.graph.initialViewState.translate.y)}),Editor.zoomFitImage,mxResources.get("fit")||"Fit"));else if("layers"==r){if(this.layersEnabled){var t=this.graph.getModel(),x=a(mxUtils.bind(this,function(a){if(null!=p)p.parentNode.removeChild(p),
+p=null;else{p=this.graph.createLayersDialog();mxEvent.addListener(p,"mouseleave",function(){p.parentNode.removeChild(p);p=null});a=x.getBoundingClientRect();p.style.width="140px";p.style.padding="2px 0px 2px 0px";p.style.border="1px solid #d0d0d0";p.style.backgroundColor="#eee";p.style.fontFamily="Helvetica Neue,Helvetica,Arial Unicode MS,Arial";p.style.fontSize="11px";p.style.zIndex=this.toolbarZIndex+1;mxUtils.setOpacity(p,80);var b=mxUtils.getDocumentScrollOrigin(document);p.style.left=b.x+a.left+
+"px";p.style.top=b.y+a.bottom+"px";document.body.appendChild(p)}}),Editor.layersImage,mxResources.get("layers")||"Layers");t.addListener(mxEvent.CHANGE,function(){x.style.display=1<t.getChildCount(t.root)?"inline-block":"none"});x.style.display=1<t.getChildCount(t.root)?"inline-block":"none"}}else"lightbox"==r?this.lightboxEnabled&&a(mxUtils.bind(this,function(){this.showLightbox()}),Editor.maximizeImage,mxResources.get("show")||"Show"):null!=this.graphConfig["toolbar-buttons"]&&(r=this.graphConfig["toolbar-buttons"][r],
+null!=r&&a(null==r.enabled||r.enabled?r.handler:function(){},r.image,r.title,r.enabled))}null!=this.graph.minimumContainerSize&&(this.graph.minimumContainerSize.width=34*g);null!=this.graphConfig.title&&(f=b.ownerDocument.createElement("div"),f.style.cssText="display:inline-block;position:relative;padding:3px 6px 0 6px;vertical-align:top;font-family:Helvetica,Arial;font-size:12px;top:4px;cursor:default;",f.setAttribute("title",this.graphConfig.title),mxUtils.write(f,this.graphConfig.title),mxUtils.setOpacity(f,
+70),e.appendChild(f));this.minToolbarWidth=34*g;var w=b.style.border,f=mxUtils.bind(this,function(){var a=b.getBoundingClientRect(),c=mxUtils.getScrollOrigin(document.body),c="relative"===document.body.style.position?document.body.getBoundingClientRect():{left:-c.x,top:-c.y},a={left:a.left-c.left,top:a.top-c.top,bottom:a.bottom-c.top,right:a.right-c.left};e.style.left=a.left+"px";e.style.width="inline"==this.graphConfig["toolbar-position"]?"auto":Math.max(this.minToolbarWidth,b.offsetWidth)+"px";
+e.style.border="1px solid #d0d0d0";"bottom"==this.graphConfig["toolbar-position"]?e.style.top=a.bottom-1+"px":"inline"!=this.graphConfig["toolbar-position"]?(e.style.marginTop=-this.toolbarHeight+"px",e.style.top=a.top+1+"px"):e.style.top=a.top+"px";"1px solid transparent"==w&&(b.style.border="1px solid #d0d0d0");document.body.appendChild(e);var d=mxUtils.bind(this,function(){1!=this.graphConfig["toolbar-nohide"]&&(null!=e.parentNode&&e.parentNode.removeChild(e),null!=p&&(p.parentNode.removeChild(p),
+p=null),b.style.border=w)});mxEvent.addListener(document,"mousemove",function(a){for(a=mxEvent.getSource(a);null!=a;){if(a==b||a==e||a==p)return;a=a.parentNode}d()});mxEvent.addListener(document,"mouseleave",function(a){d()})});mxEvent.addListener(b,"mouseenter",f)};
+GraphViewer.prototype.addClickHandler=function(a,b){a.linkPolicy=this.graphConfig.target||a.linkPolicy;a.addClickHandler(this.graphConfig.highlight,mxUtils.bind(this,function(e,d){if(null==d){var h=mxEvent.getSource(e);"a"==h.nodeName.toLowerCase()&&(d=h.getAttribute("href"))}null!=b?null==d||a.isExternalProtocol(d)||a.isBlankLink(d)||window.setTimeout(function(){b.destroy()},0):null==d||!a.isPageLink(d)||!mxEvent.isTouchEvent(e)&&mxEvent.isPopupTrigger(e)||(h=d.indexOf(","),0<h&&(h=d.substring(h+
+1),this.selectPageById(h),mxEvent.consume(e)))}),mxUtils.bind(this,function(a){null!=b||!this.lightboxClickEnabled||mxEvent.isTouchEvent(a)&&0!=this.toolbarItems.length||this.showLightbox()}))};
 GraphViewer.prototype.showLightbox=function(a,b,e){if("open"==this.graphConfig.lightbox||window.self!==window.top)if(null==this.lightboxWindow||this.lightboxWindow.closed){a=null!=a?a:null!=this.graphConfig.editable?this.graphConfig.editable:!0;e={client:1,lightbox:1,target:null!=e?e:"blank"};a&&(e.edit=this.graphConfig.edit||"_blank");if(null!=b?b:1)e.close=1;this.layersEnabled&&(e.layers=1);null!=this.graphConfig&&0!=this.graphConfig.nav&&(e.nav=1);null!=this.graphConfig&&null!=this.graphConfig.highlight&&
 (e.highlight=this.graphConfig.highlight.substring(1));null!=this.currentPage&&0<this.currentPage&&(e.page=this.currentPage);"undefined"!==typeof window.postMessage&&(null==document.documentMode||10<=document.documentMode)?null==this.lightboxWindow&&mxEvent.addListener(window,"message",mxUtils.bind(this,function(a){"ready"==a.data&&a.source==this.lightboxWindow&&this.lightboxWindow.postMessage(this.xml,"*")})):e.data=encodeURIComponent(this.xml);a="www.draw.io";"1"==urlParams.dev&&(e.dev="1",e.drawdev=
 "1",a="test.draw.io");this.lightboxWindow=window.open("https://"+a+"/#P"+encodeURIComponent(JSON.stringify(e)))}else this.lightboxWindow.focus();else this.showLocalLightbox()};
 GraphViewer.prototype.showLocalLightbox=function(){var a=mxUtils.getDocumentScrollOrigin(document),b=document.createElement("div");mxClient.IS_QUIRKS?(b.style.position="absolute",b.style.left=a.x+"px",b.style.top=a.y+"px",b.style.width=document.body.offsetWidth+"px",b.style.height=document.body.offsetHeight+"px"):b.style.cssText="position:fixed;top:0;left:0;bottom:0;right:0;";b.style.zIndex=this.lightboxZIndex;b.style.backgroundColor="#000000";mxUtils.setOpacity(b,70);document.body.appendChild(b);
 var e=document.createElement("img");e.setAttribute("border","0");e.setAttribute("src",Editor.closeImage);mxClient.IS_QUIRKS?(e.style.position="absolute",e.style.right="32px",e.style.top=a.y+32+"px"):e.style.cssText="position:fixed;top:32px;right:32px;";e.style.cursor="pointer";mxEvent.addListener(e,"click",function(){d.destroy()});urlParams.pages="1";urlParams.page=this.currentPage;urlParams.nav=0!=this.graphConfig.nav?"1":"0";urlParams.layers=this.layersEnabled?"1":"0";if(null==document.documentMode||
 10<=document.documentMode)Editor.prototype.editButtonLink=this.graphConfig.edit;EditorUi.prototype.updateActionStates=function(){};EditorUi.prototype.addBeforeUnloadListener=function(){};EditorUi.prototype.addChromelessClickHandler=function(){};Graph.prototype.shadowId="lightboxDropShadow";var d=new EditorUi(new Editor(!0),document.createElement("div"),!0);d.editor.editBlankUrl=this.editBlankUrl;Graph.prototype.shadowId="dropShadow";d.refresh=function(){};mxEvent.addListener(b,"click",function(){d.destroy()});
-var g=mxUtils.bind(this,function(a){27==a.keyCode&&d.destroy()}),l=d.destroy;d.destroy=function(){mxEvent.removeListener(document.documentElement,"keydown",g);document.body.removeChild(b);document.body.removeChild(e);document.body.style.overflow="auto";GraphViewer.resizeSensorEnabled=!0;l.apply(this,arguments)};var p=d.editor.graph,q=p.container;q.style.overflow="hidden";this.lightboxChrome?(q.style.border="1px solid #c0c0c0",q.style.margin="40px",mxEvent.addListener(document.documentElement,"keydown",
-g)):(b.style.display="none",e.style.display="none");var c=this;p.getImageFromBundles=function(a){return c.getImageUrl(a)};var f=d.createTemporaryGraph;d.createTemporaryGraph=function(){var a=f.apply(this,arguments);a.getImageFromBundles=function(a){return c.getImageUrl(a)};return a};this.graphConfig.move&&(p.isMoveCellsEvent=function(a){return!0});mxClient.IS_QUIRKS||(mxUtils.setPrefixedStyle(q.style,"border-radius","4px"),q.style.position="fixed");GraphViewer.resizeSensorEnabled=!1;document.body.style.overflow=
-"hidden";mxClient.IS_SF||(mxUtils.setPrefixedStyle(q.style,"transform","rotateY(90deg)"),mxUtils.setPrefixedStyle(q.style,"transition","all .25s ease-in-out"));this.addClickHandler(p,d);window.setTimeout(mxUtils.bind(this,function(){q.style.outline="none";q.style.zIndex=this.lightboxZIndex;e.style.zIndex=this.lightboxZIndex;document.body.appendChild(q);document.body.appendChild(e);d.setFileData(this.xml);mxUtils.setPrefixedStyle(q.style,"transform","rotateY(0deg)");d.chromelessToolbar.style.bottom=
+var h=mxUtils.bind(this,function(a){27==a.keyCode&&d.destroy()}),l=d.destroy;d.destroy=function(){mxEvent.removeListener(document.documentElement,"keydown",h);document.body.removeChild(b);document.body.removeChild(e);document.body.style.overflow="auto";GraphViewer.resizeSensorEnabled=!0;l.apply(this,arguments)};var n=d.editor.graph,q=n.container;q.style.overflow="hidden";this.lightboxChrome?(q.style.border="1px solid #c0c0c0",q.style.margin="40px",mxEvent.addListener(document.documentElement,"keydown",
+h)):(b.style.display="none",e.style.display="none");var c=this;n.getImageFromBundles=function(a){return c.getImageUrl(a)};var f=d.createTemporaryGraph;d.createTemporaryGraph=function(){var a=f.apply(this,arguments);a.getImageFromBundles=function(a){return c.getImageUrl(a)};return a};this.graphConfig.move&&(n.isMoveCellsEvent=function(a){return!0});mxClient.IS_QUIRKS||(mxUtils.setPrefixedStyle(q.style,"border-radius","4px"),q.style.position="fixed");GraphViewer.resizeSensorEnabled=!1;document.body.style.overflow=
+"hidden";mxClient.IS_SF||(mxUtils.setPrefixedStyle(q.style,"transform","rotateY(90deg)"),mxUtils.setPrefixedStyle(q.style,"transition","all .25s ease-in-out"));this.addClickHandler(n,d);window.setTimeout(mxUtils.bind(this,function(){q.style.outline="none";q.style.zIndex=this.lightboxZIndex;e.style.zIndex=this.lightboxZIndex;document.body.appendChild(q);document.body.appendChild(e);d.setFileData(this.xml);mxUtils.setPrefixedStyle(q.style,"transform","rotateY(0deg)");d.chromelessToolbar.style.bottom=
 "60px";d.chromelessToolbar.style.zIndex=this.lightboxZIndex;document.body.appendChild(d.chromelessToolbar);d.getEditBlankXml=mxUtils.bind(this,function(){return this.xml});mxClient.IS_QUIRKS&&(q.style.position="absolute",q.style.display="block",q.style.left=a.x+"px",q.style.top=a.y+"px",q.style.width=document.body.clientWidth-80+"px",q.style.height=document.body.clientHeight-80+"px",q.style.backgroundColor="white",d.chromelessToolbar.style.display="block",d.chromelessToolbar.style.position="absolute",
-d.chromelessToolbar.style.bottom="",d.chromelessToolbar.style.top=a.y+document.body.clientHeight-100+"px");d.lightboxFit();d.chromelessResize();this.showLayers(p,this.graph)}),0);return d};GraphViewer.processElements=function(a){mxUtils.forEach(GraphViewer.getElementsByClassName(a||"mxgraph"),function(a){try{a.innerHTML="",GraphViewer.createViewerForElement(a)}catch(e){throw a.innerHTML=e.message,e;}})};
-GraphViewer.getElementsByClassName=function(a){if(document.getElementsByClassName){var b=document.getElementsByClassName(a);a=[];for(var e=0;e<b.length;e++)a.push(b[e]);return a}for(var d=document.getElementsByTagName("*"),b=[],e=0;e<d.length;e++){var g=d[e].className;null!=g&&0<g.length&&(g=g.split(" "),0<=mxUtils.indexOf(g,a)&&b.push(d[e]))}return b};
-GraphViewer.createViewerForElement=function(a,b){var e=a.getAttribute("data-mxgraph");if(null!=e){var d=JSON.parse(e),g=function(e){e=mxUtils.parseXml(e);e=new GraphViewer(a,e.documentElement,d);null!=b&&b(e)};null!=d.url?GraphViewer.getUrl(d.url,function(a){g(a)}):g(d.xml)}};
+d.chromelessToolbar.style.bottom="",d.chromelessToolbar.style.top=a.y+document.body.clientHeight-100+"px");d.lightboxFit();d.chromelessResize();this.showLayers(n,this.graph)}),0);return d};GraphViewer.processElements=function(a){mxUtils.forEach(GraphViewer.getElementsByClassName(a||"mxgraph"),function(a){try{a.innerHTML="",GraphViewer.createViewerForElement(a)}catch(e){throw a.innerHTML=e.message,e;}})};
+GraphViewer.getElementsByClassName=function(a){if(document.getElementsByClassName){var b=document.getElementsByClassName(a);a=[];for(var e=0;e<b.length;e++)a.push(b[e]);return a}for(var d=document.getElementsByTagName("*"),b=[],e=0;e<d.length;e++){var h=d[e].className;null!=h&&0<h.length&&(h=h.split(" "),0<=mxUtils.indexOf(h,a)&&b.push(d[e]))}return b};
+GraphViewer.createViewerForElement=function(a,b){var e=a.getAttribute("data-mxgraph");if(null!=e){var d=JSON.parse(e),h=function(e){e=mxUtils.parseXml(e);e=new GraphViewer(a,e.documentElement,d);null!=b&&b(e)};null!=d.url?GraphViewer.getUrl(d.url,function(a){h(a)}):h(d.xml)}};
 GraphViewer.initCss=function(){try{var a=document.createElement("style");a.type="text/css";a.innerHTML="div.mxTooltip {\n-webkit-box-shadow: 3px 3px 12px #C0C0C0;\n-moz-box-shadow: 3px 3px 12px #C0C0C0;\nbox-shadow: 3px 3px 12px #C0C0C0;\nbackground: #FFFFCC;\nborder-style: solid;\nborder-width: 1px;\nborder-color: black;\nfont-family: Arial;\nfont-size: 8pt;\nposition: absolute;\ncursor: default;\npadding: 4px;\ncolor: black;}\ntd.mxPopupMenuIcon div {\nwidth:16px;\nheight:16px;}\nhtml div.mxPopupMenu {\n-webkit-box-shadow:2px 2px 3px #d5d5d5;\n-moz-box-shadow:2px 2px 3px #d5d5d5;\nbox-shadow:2px 2px 3px #d5d5d5;\n_filter:progid:DXImageTransform.Microsoft.DropShadow(OffX=2, OffY=2, Color='#d0d0d0',Positive='true');\nbackground:white;\nposition:absolute;\nborder:3px solid #e7e7e7;\npadding:3px;}\nhtml table.mxPopupMenu {\nborder-collapse:collapse;\nmargin:0px;}\nhtml td.mxPopupMenuItem {\npadding:7px 30px 7px 30px;\nfont-family:Helvetica Neue,Helvetica,Arial Unicode MS,Arial;\nfont-size:10pt;}\nhtml td.mxPopupMenuIcon {\nbackground-color:white;\npadding:0px;}\ntd.mxPopupMenuIcon .geIcon {\npadding:2px;\npadding-bottom:4px;\nmargin:2px;\nborder:1px solid transparent;\nopacity:0.5;\n_width:26px;\n_height:26px;}\ntd.mxPopupMenuIcon .geIcon:hover {\nborder:1px solid gray;\nborder-radius:2px;\nopacity:1;}\nhtml tr.mxPopupMenuItemHover {\nbackground-color: #eeeeee;\ncolor: black;}\ntable.mxPopupMenu hr {\ncolor:#cccccc;\nbackground-color:#cccccc;\nborder:none;\nheight:1px;}\ntable.mxPopupMenu tr {\tfont-size:4pt;}\n.geDialog { font-family:Helvetica Neue,Helvetica,Arial Unicode MS,Arial;\nfont-size:10pt;\nborder:none;\nmargin:0px;}\n.geDialog {\tposition:absolute;\tbackground:white;\toverflow:hidden;\tpadding:30px;\tborder:1px solid #acacac;\t-webkit-box-shadow:0px 0px 2px 2px #d5d5d5;\t-moz-box-shadow:0px 0px 2px 2px #d5d5d5;\tbox-shadow:0px 0px 2px 2px #d5d5d5;\t_filter:progid:DXImageTransform.Microsoft.DropShadow(OffX=2, OffY=2, Color='#d5d5d5', Positive='true');\tz-index: 2;}.geDialogClose {\tposition:absolute;\twidth:9px;\theight:9px;\topacity:0.5;\tcursor:pointer;\t_filter:alpha(opacity=50);}.geDialogClose:hover {\topacity:1;}.geDialogTitle {\tbox-sizing:border-box;\twhite-space:nowrap;\tbackground:rgb(229, 229, 229);\tborder-bottom:1px solid rgb(192, 192, 192);\tfont-size:15px;\tfont-weight:bold;\ttext-align:center;\tcolor:rgb(35, 86, 149);}.geDialogFooter {\tbackground:whiteSmoke;\twhite-space:nowrap;\ttext-align:right;\tbox-sizing:border-box;\tborder-top:1px solid #e5e5e5;\tcolor:darkGray;}\n.geBtn {\tbackground-color: #f5f5f5;\tborder-radius: 2px;\tborder: 1px solid #d8d8d8;\tcolor: #333;\tcursor: default;\tfont-size: 11px;\tfont-weight: bold;\theight: 29px;\tline-height: 27px;\tmargin: 0 0 0 8px;\tmin-width: 72px;\toutline: 0;\tpadding: 0 8px;\tcursor: pointer;}.geBtn:hover, .geBtn:focus {\t-webkit-box-shadow: 0px 1px 1px rgba(0,0,0,0.1);\t-moz-box-shadow: 0px 1px 1px rgba(0,0,0,0.1);\tbox-shadow: 0px 1px 1px rgba(0,0,0,0.1);\tborder: 1px solid #c6c6c6;\tbackground-color: #f8f8f8;\tbackground-image: linear-gradient(#f8f8f8 0px,#f1f1f1 100%);\tcolor: #111;}.geBtn:disabled {\topacity: .5;}.gePrimaryBtn {\tbackground-color: #4d90fe;\tbackground-image: linear-gradient(#4d90fe 0px,#4787ed 100%);\tborder: 1px solid #3079ed;\tcolor: #fff;}.gePrimaryBtn:hover, .gePrimaryBtn:focus {\tbackground-color: #357ae8;\tbackground-image: linear-gradient(#4d90fe 0px,#357ae8 100%);\tborder: 1px solid #2f5bb7;\tcolor: #fff;}.gePrimaryBtn:disabled {\topacity: .5;}";document.getElementsByTagName("head")[0].appendChild(a)}catch(b){}};
 GraphViewer.cachedUrls={};GraphViewer.getUrl=function(a,b,e){if(null!=GraphViewer.cachedUrls[a])b(GraphViewer.cachedUrls[a]);else{var d=0<navigator.userAgent.indexOf("MSIE 9")?new XDomainRequest:new XMLHttpRequest;d.open("GET",a);d.onload=function(){b(null!=d.getText?d.getText():d.responseText)};d.onerror=e;d.send()}};GraphViewer.resizeSensorEnabled=!0;GraphViewer.useResizeSensor=!0;
-(function(){var a=window.requestAnimationFrame||window.mozRequestAnimationFrame||window.webkitRequestAnimationFrame||function(a){return window.setTimeout(a,20)},b=function(e,d){function g(){this.q=[];this.add=function(a){this.q.push(a)};var a,b;this.call=function(){a=0;for(b=this.q.length;a<b;a++)this.q[a].call()}}function l(a,b){return a.currentStyle?a.currentStyle[b]:window.getComputedStyle?window.getComputedStyle(a,null).getPropertyValue(b):a.style[b]}function p(b,c){if(!b.resizedAttached)b.resizedAttached=
-new g,b.resizedAttached.add(c);else if(b.resizedAttached){b.resizedAttached.add(c);return}b.resizeSensor=document.createElement("div");b.resizeSensor.className="resize-sensor";b.resizeSensor.style.cssText="position: absolute; left: 0; top: 0; right: 0; bottom: 0; overflow: hidden; z-index: -1; visibility: hidden;";b.resizeSensor.innerHTML='<div class="resize-sensor-expand" style="position: absolute; left: 0; top: 0; right: 0; bottom: 0; overflow: hidden; z-index: -1; visibility: hidden;"><div style="position: absolute; left: 0; top: 0; transition: 0s;"></div></div><div class="resize-sensor-shrink" style="position: absolute; left: 0; top: 0; right: 0; bottom: 0; overflow: hidden; z-index: -1; visibility: hidden;"><div style="position: absolute; left: 0; top: 0; transition: 0s; width: 200%; height: 200%"></div></div>';
-b.appendChild(b.resizeSensor);"static"==l(b,"position")&&(b.style.position="relative");var d=b.resizeSensor.childNodes[0],e=d.childNodes[0],f=b.resizeSensor.childNodes[1],h=function(){e.style.width="100000px";e.style.height="100000px";d.scrollLeft=1E5;d.scrollTop=1E5;f.scrollLeft=1E5;f.scrollTop=1E5};h();var m=!1,n=function(){b.resizedAttached&&(m&&(b.resizedAttached.call(),m=!1),a(n))};a(n);var p,q,B,y,C=function(){if((B=b.offsetWidth)!=p||(y=b.offsetHeight)!=q)m=!0,p=B,q=y;h()},A=function(a,b,c){a.attachEvent?
-a.attachEvent("on"+b,c):a.addEventListener(b,c)};A(d,"scroll",C);A(f,"scroll",C)}var q=function(){GraphViewer.resizeSensorEnabled&&d()},c=Object.prototype.toString.call(e),f="[object Array]"===c||"[object NodeList]"===c||"[object HTMLCollection]"===c||"undefined"!==typeof jQuery&&e instanceof jQuery||"undefined"!==typeof Elements&&e instanceof Elements;if(f)for(var c=0,h=e.length;c<h;c++)p(e[c],q);else p(e,q);this.detach=function(){if(f)for(var a=0,c=e.length;a<c;a++)b.detach(e[a]);else b.detach(e)}};
+(function(){var a=window.requestAnimationFrame||window.mozRequestAnimationFrame||window.webkitRequestAnimationFrame||function(a){return window.setTimeout(a,20)},b=function(e,d){function h(){this.q=[];this.add=function(a){this.q.push(a)};var a,b;this.call=function(){a=0;for(b=this.q.length;a<b;a++)this.q[a].call()}}function l(a,b){return a.currentStyle?a.currentStyle[b]:window.getComputedStyle?window.getComputedStyle(a,null).getPropertyValue(b):a.style[b]}function n(b,c){if(!b.resizedAttached)b.resizedAttached=
+new h,b.resizedAttached.add(c);else if(b.resizedAttached){b.resizedAttached.add(c);return}b.resizeSensor=document.createElement("div");b.resizeSensor.className="resize-sensor";b.resizeSensor.style.cssText="position: absolute; left: 0; top: 0; right: 0; bottom: 0; overflow: hidden; z-index: -1; visibility: hidden;";b.resizeSensor.innerHTML='<div class="resize-sensor-expand" style="position: absolute; left: 0; top: 0; right: 0; bottom: 0; overflow: hidden; z-index: -1; visibility: hidden;"><div style="position: absolute; left: 0; top: 0; transition: 0s;"></div></div><div class="resize-sensor-shrink" style="position: absolute; left: 0; top: 0; right: 0; bottom: 0; overflow: hidden; z-index: -1; visibility: hidden;"><div style="position: absolute; left: 0; top: 0; transition: 0s; width: 200%; height: 200%"></div></div>';
+b.appendChild(b.resizeSensor);"static"==l(b,"position")&&(b.style.position="relative");var d=b.resizeSensor.childNodes[0],e=d.childNodes[0],f=b.resizeSensor.childNodes[1],g=function(){e.style.width="100000px";e.style.height="100000px";d.scrollLeft=1E5;d.scrollTop=1E5;f.scrollLeft=1E5;f.scrollTop=1E5};g();var m=!1,n=function(){b.resizedAttached&&(m&&(b.resizedAttached.call(),m=!1),a(n))};a(n);var p,q,A,z,C=function(){if((A=b.offsetWidth)!=p||(z=b.offsetHeight)!=q)m=!0,p=A,q=z;g()},B=function(a,b,c){a.attachEvent?
+a.attachEvent("on"+b,c):a.addEventListener(b,c)};B(d,"scroll",C);B(f,"scroll",C)}var q=function(){GraphViewer.resizeSensorEnabled&&d()},c=Object.prototype.toString.call(e),f="[object Array]"===c||"[object NodeList]"===c||"[object HTMLCollection]"===c||"undefined"!==typeof jQuery&&e instanceof jQuery||"undefined"!==typeof Elements&&e instanceof Elements;if(f)for(var c=0,g=e.length;c<g;c++)n(e[c],q);else n(e,q);this.detach=function(){if(f)for(var a=0,c=e.length;a<c;a++)b.detach(e[a]);else b.detach(e)}};
 b.detach=function(a){a.resizeSensor&&(a.removeChild(a.resizeSensor),delete a.resizeSensor,delete a.resizedAttached)};window.ResizeSensor=b})();
 (function(){Editor.initMath();GraphViewer.initCss();if(null!=window.onDrawioViewerLoad)window.onDrawioViewerLoad();else GraphViewer.processElements()})();
diff --git a/war/resources/dia.txt b/war/resources/dia.txt
index 747c6c0643c5440a6df05539bde9d903ee863a7c..73a5fdcadacea12d9f0d0c4f15ba900ba23af3f1 100644
--- a/war/resources/dia.txt
+++ b/war/resources/dia.txt
@@ -369,7 +369,7 @@ isometric=Isometric
 ios=iOS
 italic=Italic
 kennedy=Kennedy
-keyboardShortcuts=Keyboard shortcuts
+keyboardShortcuts=Keyboard Shortcuts
 layers=Layers
 landscape=Landscape
 language=Language
diff --git a/war/resources/dia_am.txt b/war/resources/dia_am.txt
index 747c6c0643c5440a6df05539bde9d903ee863a7c..73a5fdcadacea12d9f0d0c4f15ba900ba23af3f1 100644
--- a/war/resources/dia_am.txt
+++ b/war/resources/dia_am.txt
@@ -369,7 +369,7 @@ isometric=Isometric
 ios=iOS
 italic=Italic
 kennedy=Kennedy
-keyboardShortcuts=Keyboard shortcuts
+keyboardShortcuts=Keyboard Shortcuts
 layers=Layers
 landscape=Landscape
 language=Language
diff --git a/war/resources/dia_ar.txt b/war/resources/dia_ar.txt
index 0dd2d1d7fe539aecaed7a7f65356c6bbbfdbada6..5121507b9971174bdf11fb1d68ba01e6310c0eb5 100644
--- a/war/resources/dia_ar.txt
+++ b/war/resources/dia_ar.txt
@@ -369,7 +369,7 @@ isometric=Isometric
 ios=iOS
 italic=‫خط مائل‬
 kennedy=‫كنيدي‬
-keyboardShortcuts=Keyboard shortcuts
+keyboardShortcuts=Keyboard Shortcuts
 layers=‫طبقات‬
 landscape=‫طباعة بالعرض‬
 language=‫لغة‬
diff --git a/war/resources/dia_bn.txt b/war/resources/dia_bn.txt
index 747c6c0643c5440a6df05539bde9d903ee863a7c..73a5fdcadacea12d9f0d0c4f15ba900ba23af3f1 100644
--- a/war/resources/dia_bn.txt
+++ b/war/resources/dia_bn.txt
@@ -369,7 +369,7 @@ isometric=Isometric
 ios=iOS
 italic=Italic
 kennedy=Kennedy
-keyboardShortcuts=Keyboard shortcuts
+keyboardShortcuts=Keyboard Shortcuts
 layers=Layers
 landscape=Landscape
 language=Language
diff --git a/war/resources/dia_eo.txt b/war/resources/dia_eo.txt
index 84d242e1cef3ba2e13c06027b255e79cb3dff93f..cbbf968f7255c36be7b286c87546ab8d54a8bff7 100644
--- a/war/resources/dia_eo.txt
+++ b/war/resources/dia_eo.txt
@@ -369,7 +369,7 @@ isometric=Isometric
 ios=iOS
 italic=Italic
 kennedy=Kennedy
-keyboardShortcuts=Keyboard shortcuts
+keyboardShortcuts=Keyboard Shortcuts
 layers=Layers
 landscape=Landscape
 language=Lingvo
diff --git a/war/resources/dia_gu.txt b/war/resources/dia_gu.txt
index 747c6c0643c5440a6df05539bde9d903ee863a7c..73a5fdcadacea12d9f0d0c4f15ba900ba23af3f1 100644
--- a/war/resources/dia_gu.txt
+++ b/war/resources/dia_gu.txt
@@ -369,7 +369,7 @@ isometric=Isometric
 ios=iOS
 italic=Italic
 kennedy=Kennedy
-keyboardShortcuts=Keyboard shortcuts
+keyboardShortcuts=Keyboard Shortcuts
 layers=Layers
 landscape=Landscape
 language=Language
diff --git a/war/resources/dia_hi.txt b/war/resources/dia_hi.txt
index 747c6c0643c5440a6df05539bde9d903ee863a7c..73a5fdcadacea12d9f0d0c4f15ba900ba23af3f1 100644
--- a/war/resources/dia_hi.txt
+++ b/war/resources/dia_hi.txt
@@ -369,7 +369,7 @@ isometric=Isometric
 ios=iOS
 italic=Italic
 kennedy=Kennedy
-keyboardShortcuts=Keyboard shortcuts
+keyboardShortcuts=Keyboard Shortcuts
 layers=Layers
 landscape=Landscape
 language=Language
diff --git a/war/resources/dia_hr.txt b/war/resources/dia_hr.txt
index 747c6c0643c5440a6df05539bde9d903ee863a7c..73a5fdcadacea12d9f0d0c4f15ba900ba23af3f1 100644
--- a/war/resources/dia_hr.txt
+++ b/war/resources/dia_hr.txt
@@ -369,7 +369,7 @@ isometric=Isometric
 ios=iOS
 italic=Italic
 kennedy=Kennedy
-keyboardShortcuts=Keyboard shortcuts
+keyboardShortcuts=Keyboard Shortcuts
 layers=Layers
 landscape=Landscape
 language=Language
diff --git a/war/resources/dia_kn.txt b/war/resources/dia_kn.txt
index 747c6c0643c5440a6df05539bde9d903ee863a7c..73a5fdcadacea12d9f0d0c4f15ba900ba23af3f1 100644
--- a/war/resources/dia_kn.txt
+++ b/war/resources/dia_kn.txt
@@ -369,7 +369,7 @@ isometric=Isometric
 ios=iOS
 italic=Italic
 kennedy=Kennedy
-keyboardShortcuts=Keyboard shortcuts
+keyboardShortcuts=Keyboard Shortcuts
 layers=Layers
 landscape=Landscape
 language=Language
diff --git a/war/resources/dia_lt.txt b/war/resources/dia_lt.txt
index 747c6c0643c5440a6df05539bde9d903ee863a7c..73a5fdcadacea12d9f0d0c4f15ba900ba23af3f1 100644
--- a/war/resources/dia_lt.txt
+++ b/war/resources/dia_lt.txt
@@ -369,7 +369,7 @@ isometric=Isometric
 ios=iOS
 italic=Italic
 kennedy=Kennedy
-keyboardShortcuts=Keyboard shortcuts
+keyboardShortcuts=Keyboard Shortcuts
 layers=Layers
 landscape=Landscape
 language=Language
diff --git a/war/resources/dia_lv.txt b/war/resources/dia_lv.txt
index 747c6c0643c5440a6df05539bde9d903ee863a7c..73a5fdcadacea12d9f0d0c4f15ba900ba23af3f1 100644
--- a/war/resources/dia_lv.txt
+++ b/war/resources/dia_lv.txt
@@ -369,7 +369,7 @@ isometric=Isometric
 ios=iOS
 italic=Italic
 kennedy=Kennedy
-keyboardShortcuts=Keyboard shortcuts
+keyboardShortcuts=Keyboard Shortcuts
 layers=Layers
 landscape=Landscape
 language=Language
diff --git a/war/resources/dia_ml.txt b/war/resources/dia_ml.txt
index 747c6c0643c5440a6df05539bde9d903ee863a7c..73a5fdcadacea12d9f0d0c4f15ba900ba23af3f1 100644
--- a/war/resources/dia_ml.txt
+++ b/war/resources/dia_ml.txt
@@ -369,7 +369,7 @@ isometric=Isometric
 ios=iOS
 italic=Italic
 kennedy=Kennedy
-keyboardShortcuts=Keyboard shortcuts
+keyboardShortcuts=Keyboard Shortcuts
 layers=Layers
 landscape=Landscape
 language=Language
diff --git a/war/resources/dia_mr.txt b/war/resources/dia_mr.txt
index 747c6c0643c5440a6df05539bde9d903ee863a7c..73a5fdcadacea12d9f0d0c4f15ba900ba23af3f1 100644
--- a/war/resources/dia_mr.txt
+++ b/war/resources/dia_mr.txt
@@ -369,7 +369,7 @@ isometric=Isometric
 ios=iOS
 italic=Italic
 kennedy=Kennedy
-keyboardShortcuts=Keyboard shortcuts
+keyboardShortcuts=Keyboard Shortcuts
 layers=Layers
 landscape=Landscape
 language=Language
diff --git a/war/resources/dia_sk.txt b/war/resources/dia_sk.txt
index 747c6c0643c5440a6df05539bde9d903ee863a7c..73a5fdcadacea12d9f0d0c4f15ba900ba23af3f1 100644
--- a/war/resources/dia_sk.txt
+++ b/war/resources/dia_sk.txt
@@ -369,7 +369,7 @@ isometric=Isometric
 ios=iOS
 italic=Italic
 kennedy=Kennedy
-keyboardShortcuts=Keyboard shortcuts
+keyboardShortcuts=Keyboard Shortcuts
 layers=Layers
 landscape=Landscape
 language=Language
diff --git a/war/resources/dia_sl.txt b/war/resources/dia_sl.txt
index 747c6c0643c5440a6df05539bde9d903ee863a7c..73a5fdcadacea12d9f0d0c4f15ba900ba23af3f1 100644
--- a/war/resources/dia_sl.txt
+++ b/war/resources/dia_sl.txt
@@ -369,7 +369,7 @@ isometric=Isometric
 ios=iOS
 italic=Italic
 kennedy=Kennedy
-keyboardShortcuts=Keyboard shortcuts
+keyboardShortcuts=Keyboard Shortcuts
 layers=Layers
 landscape=Landscape
 language=Language
diff --git a/war/resources/dia_sr.txt b/war/resources/dia_sr.txt
index 1d8d9fb6629bab14c985742ffbf20d262a0b51d2..1a8a619f251b8ead6471bdb653f067cf7743601c 100644
--- a/war/resources/dia_sr.txt
+++ b/war/resources/dia_sr.txt
@@ -369,7 +369,7 @@ isometric=Isometric
 ios=iOS
 italic=Kurziv
 kennedy=Kennedy
-keyboardShortcuts=Keyboard shortcuts
+keyboardShortcuts=Keyboard Shortcuts
 layers=Slojevi
 landscape=Pejzaž
 language=Jezik
diff --git a/war/resources/dia_sw.txt b/war/resources/dia_sw.txt
index 747c6c0643c5440a6df05539bde9d903ee863a7c..73a5fdcadacea12d9f0d0c4f15ba900ba23af3f1 100644
--- a/war/resources/dia_sw.txt
+++ b/war/resources/dia_sw.txt
@@ -369,7 +369,7 @@ isometric=Isometric
 ios=iOS
 italic=Italic
 kennedy=Kennedy
-keyboardShortcuts=Keyboard shortcuts
+keyboardShortcuts=Keyboard Shortcuts
 layers=Layers
 landscape=Landscape
 language=Language
diff --git a/war/resources/dia_ta.txt b/war/resources/dia_ta.txt
index 747c6c0643c5440a6df05539bde9d903ee863a7c..73a5fdcadacea12d9f0d0c4f15ba900ba23af3f1 100644
--- a/war/resources/dia_ta.txt
+++ b/war/resources/dia_ta.txt
@@ -369,7 +369,7 @@ isometric=Isometric
 ios=iOS
 italic=Italic
 kennedy=Kennedy
-keyboardShortcuts=Keyboard shortcuts
+keyboardShortcuts=Keyboard Shortcuts
 layers=Layers
 landscape=Landscape
 language=Language
diff --git a/war/resources/dia_te.txt b/war/resources/dia_te.txt
index 747c6c0643c5440a6df05539bde9d903ee863a7c..73a5fdcadacea12d9f0d0c4f15ba900ba23af3f1 100644
--- a/war/resources/dia_te.txt
+++ b/war/resources/dia_te.txt
@@ -369,7 +369,7 @@ isometric=Isometric
 ios=iOS
 italic=Italic
 kennedy=Kennedy
-keyboardShortcuts=Keyboard shortcuts
+keyboardShortcuts=Keyboard Shortcuts
 layers=Layers
 landscape=Landscape
 language=Language